freeipmi-1.6.4/0000755002055400205540000000000013527342551013261 5ustar00achuachu00000000000000freeipmi-1.6.4/config/0000755002055400205540000000000013527342540014524 5ustar00achuachu00000000000000freeipmi-1.6.4/config/ac_dont_check_for_root.m40000644002055400205540000000233113527331635021445 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_dont_check_for_root.m4,v 1.2 2009-03-10 18:15:46 chu11 Exp $ ##***************************************************************************** ## This configure option will allow packagers to disable the check for root ## in FreeIPMI tools before executing in-band communication. ## ## This may be desired in some environments where permission checks for ## IPMI are defined more by device files (i.e. /dev/ipmi). ##***************************************************************************** AC_DEFUN([AC_DONT_CHECK_FOR_ROOT], [ AC_MSG_CHECKING([whether tools should check for root before executing in-band IPMI communication]) AC_ARG_WITH([dont-check-for-root], AC_HELP_STRING([--with-dont-check-for-root], [don't check for root before executing in-band IPMI communication]), [ case "$withval" in yes) ac_dont_check_for_root=yes ;; no) ac_dont_check_for_root=no ;; *) ac_dont_check_for_root=yes ;; esac ] ) AC_MSG_RESULT([${ac_dont_check_for_root=no}]) if test "$ac_dont_check_for_root" = "yes"; then AC_DEFINE([IPMI_DONT_CHECK_FOR_ROOT], [1], [Define to 1 to not check for root]) fi ]) freeipmi-1.6.4/config/ac_freeipmi_config_file.m40000644002055400205540000000243713527331635021566 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_freeipmi_config_file.m4,v 1.1 2008-05-20 22:49:04 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_FREEIPMI_CONFIG_FILE], [ # Must expand nested unquoting FREEIPMI_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi.conf`" FREEIPMI_CONFIG_FILE_DEFAULT_TMP2="`echo $FREEIPMI_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" FREEIPMI_CONFIG_FILE_DEFAULT="`eval echo $FREEIPMI_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([FREEIPMI_CONFIG_FILE_DEFAULT], ["$FREEIPMI_CONFIG_FILE_DEFAULT"], [Define default freeipmi config file.]) AC_SUBST(FREEIPMI_CONFIG_FILE_DEFAULT) # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ FREEIPMI_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/freeipmi.conf`" FREEIPMI_CONFIG_FILE_LEGACY_TMP2="`echo $FREEIPMI_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" FREEIPMI_CONFIG_FILE_LEGACY="`eval echo $FREEIPMI_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([FREEIPMI_CONFIG_FILE_LEGACY], ["$FREEIPMI_CONFIG_FILE_LEGACY"], [Define legacy freeipmi config file.]) ]) freeipmi-1.6.4/config/ac_freeipmi_interpret_sel_config_file.m40000644002055400205540000000155513527331635024525 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_freeipmi_interpret_sel_config_file.m4,v 1.2 2010-03-10 19:36:31 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_INTERPRET_SEL_CONFIG_FILE], [ # Must expand nested unquoting INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi_interpret_sel.conf`" INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP2="`echo $INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" INTERPRET_SEL_CONFIG_FILE_DEFAULT="`eval echo $INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([INTERPRET_SEL_CONFIG_FILE_DEFAULT], ["$INTERPRET_SEL_CONFIG_FILE_DEFAULT"], [Define default interpret sel config file.]) AC_SUBST(INTERPRET_SEL_CONFIG_FILE_DEFAULT) ]) freeipmi-1.6.4/config/ac_freeipmi_interpret_sensor_config_file.m40000644002055400205540000000162113527331635025245 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_freeipmi_interpret_sensor_config_file.m4,v 1.3 2010-03-10 19:36:31 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_INTERPRET_SENSOR_CONFIG_FILE], [ # Must expand nested unquoting INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi_interpret_sensor.conf`" INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP2="`echo $INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" INTERPRET_SENSOR_CONFIG_FILE_DEFAULT="`eval echo $INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([INTERPRET_SENSOR_CONFIG_FILE_DEFAULT], ["$INTERPRET_SENSOR_CONFIG_FILE_DEFAULT"], [Define default interpret sensor config file.]) AC_SUBST(INTERPRET_SENSOR_CONFIG_FILE_DEFAULT) ]) freeipmi-1.6.4/config/ac_ipmi_monitoring_sdr_cache_dir.m40000644002055400205540000000237513527331635023477 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmi_monitoring_sdr_cache_dir.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMI_MONITORING_SDR_CACHE_DIR], [ # Must expand nested unquoting IPMI_MONITORING_SDR_CACHE_DIR_TMP1="`eval echo ${localstatedir}/cache/ipmimonitoringsdrcache`" IPMI_MONITORING_SDR_CACHE_DIR_TMP2="`echo $IPMI_MONITORING_SDR_CACHE_DIR_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMI_MONITORING_SDR_CACHE_DIR="`eval echo $IPMI_MONITORING_SDR_CACHE_DIR_TMP2`" AC_MSG_CHECKING([for ipmi_monitoring sdr cache dir default path]) AC_ARG_WITH([ipmi-monitoring-sdr-cache-dir], AC_HELP_STRING([--with-ipmi-monitoring-sdr-cache-dir=PATH], [Specify default ipmi_monitoring sdr cache dir path]), [ case "$withval" in no) ;; yes) ;; *) IPMI_MONITORING_SDR_CACHE_DIR=$withval esac ] ) AC_MSG_RESULT($IPMI_MONITORING_SDR_CACHE_DIR) AC_DEFINE_UNQUOTED([IPMI_MONITORING_SDR_CACHE_DIR], ["$IPMI_MONITORING_SDR_CACHE_DIR"], [Define default ipmi_monitoring sdr_cache_dir.]) AC_SUBST(IPMI_MONITORING_SDR_CACHE_DIR) ]) freeipmi-1.6.4/config/ac_ipmi_monitoring_sensor_config_file.m40000644002055400205540000000174113527331635024557 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmi_monitoring_sensor_config_file.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMI_MONITORING_SENSOR_CONFIG_FILE], [ # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmi_monitoring_sensors.conf`" IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP2="`echo $IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY="`eval echo $IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY], ["$IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY"], [Define legacy ipmi_monitoring_sensor config file.]) AC_SUBST(IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY) ]) freeipmi-1.6.4/config/ac_ipmiconsole_config_file.m40000644002055400205540000000154713527331635022310 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmi_monitoring_sensor_config_file.m4,v 1.2 2007/12/14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMICONSOLE_CONFIG_FILE], [ # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMICONSOLE_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmiconsole.conf`" IPMICONSOLE_CONFIG_FILE_LEGACY_TMP2="`echo $IPMICONSOLE_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMICONSOLE_CONFIG_FILE_LEGACY="`eval echo $IPMICONSOLE_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([IPMICONSOLE_CONFIG_FILE_LEGACY], ["$IPMICONSOLE_CONFIG_FILE_LEGACY"], [Define legacy ipmiconsole config file.]) AC_SUBST(IPMICONSOLE_CONFIG_FILE_LEGACY) ]) freeipmi-1.6.4/config/ac_ipmidetect_config_file.m40000644002055400205540000000250713527331635022113 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmidetect_config_file.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMIDETECT_CONFIG_FILE], [ # Must expand nested unquoting IPMIDETECT_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmidetect.conf`" IPMIDETECT_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMIDETECT_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECT_CONFIG_FILE_DEFAULT="`eval echo $IPMIDETECT_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([IPMIDETECT_CONFIG_FILE_DEFAULT], ["$IPMIDETECT_CONFIG_FILE_DEFAULT"], [Define default ipmidetect config file.]) AC_SUBST(IPMIDETECT_CONFIG_FILE_DEFAULT) # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIDETECT_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmidetect.conf`" IPMIDETECT_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIDETECT_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECT_CONFIG_FILE_LEGACY="`eval echo $IPMIDETECT_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([IPMIDETECT_CONFIG_FILE_LEGACY], ["$IPMIDETECT_CONFIG_FILE_LEGACY"], [Define legacy ipmidetect config file.]) ]) freeipmi-1.6.4/config/ac_ipmidetectd_config_file.m40000644002055400205540000000253413527331635022257 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmidetectd_config_file.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMIDETECTD_CONFIG_FILE], [ # Must expand nested unquoting IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmidetectd.conf`" IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECTD_CONFIG_FILE_DEFAULT="`eval echo $IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([IPMIDETECTD_CONFIG_FILE_DEFAULT], ["$IPMIDETECTD_CONFIG_FILE_DEFAULT"], [Define default ipmidetectd config file.]) AC_SUBST(IPMIDETECTD_CONFIG_FILE_DEFAULT) # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIDETECTD_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmidetectd.conf`" IPMIDETECTD_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIDETECTD_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECTD_CONFIG_FILE_LEGACY="`eval echo $IPMIDETECTD_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([IPMIDETECTD_CONFIG_FILE_LEGACY], ["$IPMIDETECTD_CONFIG_FILE_LEGACY"], [Define legacy ipmidetectd config file.]) ]) freeipmi-1.6.4/config/ac_ipmipower_config_file.m40000644002055400205540000000152113527331635021772 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmi_monitoring_sensor_config_file.m4,v 1.2 2007/12/14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMIPOWER_CONFIG_FILE], [ # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIPOWER_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmipower.conf`" IPMIPOWER_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIPOWER_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIPOWER_CONFIG_FILE_LEGACY="`eval echo $IPMIPOWER_CONFIG_FILE_LEGACY_TMP2`" AC_DEFINE_UNQUOTED([IPMIPOWER_CONFIG_FILE_LEGACY], ["$IPMIPOWER_CONFIG_FILE_LEGACY"], [Define legacy ipmipower config file.]) AC_SUBST(IPMIPOWER_CONFIG_FILE_LEGACY) ]) freeipmi-1.6.4/config/ac_ipmiseld_cache_dir.m40000644002055400205540000000220413527331635021221 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmi_monitoring_cache_directory.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMISELD_CACHE_DIRECTORY], [ # Must expand nested unquoting IPMISELD_CACHE_DIRECTORY_TMP1="`eval echo ${localstatedir}/cache/ipmiseld/`" IPMISELD_CACHE_DIRECTORY_TMP2="`echo $IPMISELD_CACHE_DIRECTORY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMISELD_CACHE_DIRECTORY="`eval echo $IPMISELD_CACHE_DIRECTORY_TMP2`" AC_MSG_CHECKING([for ipmiseld cache dir default path]) AC_ARG_WITH([ipmiseld-cache-dir], AC_HELP_STRING([--with-ipmiseld-cache-dir=PATH], [Specify default ipmiseld cache dir path]), [ case "$withval" in no) ;; yes) ;; *) IPMISELD_CACHE_DIRECTORY=$withval esac ] ) AC_MSG_RESULT($IPMISELD_CACHE_DIRECTORY) AC_DEFINE_UNQUOTED([IPMISELD_CACHE_DIRECTORY], ["$IPMISELD_CACHE_DIRECTORY"], [Define default ipmiseld cache dir.]) AC_SUBST(IPMISELD_CACHE_DIRECTORY) ]) freeipmi-1.6.4/config/ac_ipmiseld_config_file.m40000644002055400205540000000143713527331635021573 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_ipmiseld_config_file.m4,v 1.2 2007-12-14 19:16:19 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_IPMISELD_CONFIG_FILE], [ # Must expand nested unquoting IPMISELD_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmiseld.conf`" IPMISELD_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMISELD_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMISELD_CONFIG_FILE_DEFAULT="`eval echo $IPMISELD_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([IPMISELD_CONFIG_FILE_DEFAULT], ["$IPMISELD_CONFIG_FILE_DEFAULT"], [Define default ipmiseld config file.]) AC_SUBST(IPMISELD_CONFIG_FILE_DEFAULT) ]) freeipmi-1.6.4/config/ac_libipmiconsole_config_file.m40000644002055400205540000000155713527331635023000 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_freeipmi_interpret_sel_config_file.m4,v 1.2 2010-03-10 19:36:31 chu11 Exp $ ##***************************************************************************** AC_DEFUN([AC_LIBIPMICONSOLE_CONFIG_FILE], [ # Must expand nested unquoting LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/libipmiconsole.conf`" LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP2="`echo $LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" LIBIPMICONSOLE_CONFIG_FILE_DEFAULT="`eval echo $LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP2`" AC_DEFINE_UNQUOTED([LIBIPMICONSOLE_CONFIG_FILE_DEFAULT], ["$LIBIPMICONSOLE_CONFIG_FILE_DEFAULT"], [Define default libipmiconsole config file.]) AC_SUBST(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT) ]) freeipmi-1.6.4/config/ac_lsh_gcc_attributes.m40000644002055400205540000000233213527331635021304 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: ac_lsh_gcc_attributes.m4,v 1.4 2008-08-12 18:14:35 chu11 Exp $ ##***************************************************************************** ## Original Author: ??? ## ## Yoinked from acinclude.m4 from argp-standalone 1.3 ##***************************************************************************** dnl LSH_GCC_ATTRIBUTES dnl Check for gcc's __attribute__ construction AC_DEFUN([LSH_GCC_ATTRIBUTES], [AC_CACHE_CHECK(for __attribute__, lsh_cv_c_attribute, [ AC_TRY_COMPILE([ #include ], [ static void foo(void) __attribute__ ((noreturn)); static void __attribute__ ((noreturn)) foo(void) { exit(1); } ], lsh_cv_c_attribute=yes, lsh_cv_c_attribute=no)]) AH_TEMPLATE([HAVE_GCC_ATTRIBUTE], [Define if the compiler understands __attribute__]) if test "x$lsh_cv_c_attribute" = "xyes"; then AC_DEFINE(HAVE_GCC_ATTRIBUTE) fi AH_BOTTOM( [#if __GNUC__ && HAVE_GCC_ATTRIBUTE # define NORETURN __attribute__ ((__noreturn__)) # define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a))) # define UNUSED __attribute__ ((__unused__)) #else # define NORETURN # define PRINTF_STYLE(f, a) # define UNUSED #endif ])]) freeipmi-1.6.4/config/acx_pthread.m40000644002055400205540000002215413527331635017257 0ustar00achuachu00000000000000dnl @synopsis ACX_PTHREAD([ACTION-IF-FOUND[, ACTION-IF-NOT-FOUND]]) dnl dnl This macro figures out how to build C programs using POSIX dnl threads. It sets the PTHREAD_LIBS output variable to the threads dnl library and linker flags, and the PTHREAD_CFLAGS output variable dnl to any special C compiler flags that are needed. (The user can also dnl force certain compiler flags/libs to be tested by setting these dnl environment variables.) dnl dnl Also sets PTHREAD_CC to any special C compiler that is needed for dnl multi-threaded programs (defaults to the value of CC otherwise). dnl (This is necessary on AIX to use the special cc_r compiler alias.) dnl dnl If you are only building threads programs, you may wish to dnl use these variables in your default LIBS, CFLAGS, and CC: dnl dnl LIBS="$PTHREAD_LIBS $LIBS" dnl CFLAGS="$CFLAGS $PTHREAD_CFLAGS" dnl CC="$PTHREAD_CC" dnl dnl In addition, if the PTHREAD_CREATE_JOINABLE thread-attribute dnl constant has a nonstandard name, defines PTHREAD_CREATE_JOINABLE dnl to that name (e.g. PTHREAD_CREATE_UNDETACHED on AIX). dnl dnl ACTION-IF-FOUND is a list of shell commands to run if a threads dnl library is found, and ACTION-IF-NOT-FOUND is a list of commands dnl to run it if it is not found. If ACTION-IF-FOUND is not specified, dnl the default action will define HAVE_PTHREAD. dnl dnl Please let the authors know if this macro fails on any platform, dnl or if you have any other suggestions or comments. This macro was dnl based on work by SGJ on autoconf scripts for FFTW (www.fftw.org) dnl (with help from M. Frigo), as well as ac_pthread and hb_pthread dnl macros posted by AFC to the autoconf macro repository. We are also dnl grateful for the helpful feedback of numerous users. dnl dnl @version $Id: acx_pthread.m4,v 1.3 2009-11-25 17:37:44 chu11 Exp $ dnl @author Steven G. Johnson and Alejandro Forero Cuervo AC_DEFUN([ACX_PTHREAD], [ AC_REQUIRE([AC_CANONICAL_HOST]) AC_LANG_SAVE AC_LANG_C acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" AC_MSG_CHECKING([for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS]) AC_TRY_LINK_FUNC(pthread_join, acx_pthread_ok=yes) AC_MSG_RESULT($acx_pthread_ok) if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; *linux*|*k*bsd*) # achu # # libipmiconsole is a library, not an application, so move pthread # earlier to override just building with the -pthread # flag # acx_pthread_flags="pthreads pthread none -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) AC_MSG_CHECKING([whether pthreads work without any flags]) ;; -*) AC_MSG_CHECKING([whether pthreads work with $flag]) PTHREAD_CFLAGS="$flag" ;; *) AC_MSG_CHECKING([for the pthreads library -l$flag]) PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. AC_TRY_LINK([#include ], [pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ], [acx_pthread_ok=yes]) LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" AC_MSG_RESULT($acx_pthread_ok) if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). AC_MSG_CHECKING([for joinable pthread attribute]) AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_JOINABLE;], ok=PTHREAD_CREATE_JOINABLE, ok=unknown) if test x"$ok" = xunknown; then AC_TRY_LINK([#include ], [int attr=PTHREAD_CREATE_UNDETACHED;], ok=PTHREAD_CREATE_UNDETACHED, ok=unknown) fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then AC_DEFINE(PTHREAD_CREATE_JOINABLE, $ok, [Define to the necessary symbol if this constant uses a non-standard name on your system.]) fi AC_MSG_RESULT(${ok}) if test x"$ok" = xunknown; then AC_MSG_WARN([we do not know how to create joinable pthreads]) fi AC_MSG_CHECKING([if more special flags are required for pthreads]) flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | alpha*-osf*) flag="-D_REENTRANT";; esac AC_MSG_RESULT(${flag}) if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r AC_CHECK_PROG(PTHREAD_CC, cc_r, cc_r, ${CC}) else PTHREAD_CC="$CC" fi AC_SUBST(PTHREAD_LIBS) AC_SUBST(PTHREAD_CFLAGS) AC_SUBST(PTHREAD_CC) # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then ifelse([$1],,AC_DEFINE(HAVE_PTHREAD,1,[Define if you have POSIX threads libraries and header files.]),[$1]) : else acx_pthread_ok=no $2 fi AC_LANG_RESTORE ])dnl ACX_PTHREAD freeipmi-1.6.4/config/systemd.m40000644002055400205540000000433313527331635016464 0ustar00achuachu00000000000000dnl Probe for systemd libraries and installation paths. dnl dnl Provides the RRA_WITH_SYSTEMD_UNITDIR macro, which adds the dnl --with-systemdsystemunitdir configure flag, sets the systemdsystemunitdir dnl substitution variable, and provides the HAVE_SYSTEMD Automake conditional dnl to use to control whether to install unit files. dnl dnl Provides the RRA_LIB_SYSTEMD_DAEMON_OPTIONAL macro, which sets dnl SYSTEMD_CFLAGS and SYSTEMD_LIBS substitution variables if dnl libsystemd-daemon is available and defines HAVE_SD_NOTIFY. pkg-config dnl support for libsystemd-daemon is required for it to be detected. dnl dnl Depends on the Autoconf macros that come with pkg-config. dnl dnl The canonical version of this file is maintained in the rra-c-util dnl package, available at . dnl dnl Written by Russ Allbery dnl Copyright 2013, 2014 dnl The Board of Trustees of the Leland Stanford Junior University dnl dnl This file is free software; the authors give unlimited permission to copy dnl and/or distribute it, with or without modifications, as long as this dnl notice is preserved. dnl Determine the systemd system unit directory, along with a configure flag dnl to override, and sets @systemdsystemunitdir@. Provides the Automake dnl HAVE_SYSTEMD Automake conditional. AC_DEFUN([RRA_WITH_SYSTEMD_UNITDIR], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) AS_IF([test x"$PKG_CONFIG" = x], [PKG_CONFIG=false]) AC_ARG_WITH([systemdsystemunitdir], [AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files])], [], [with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd)]) AS_IF([test x"$with_systemdsystemunitdir" != xno], [AC_SUBST([systemdsystemunitdir], [$with_systemdsystemunitdir])]) AM_CONDITIONAL([HAVE_SYSTEMD], [test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno])]) dnl Check for libsystemd-daemon and define SYSTEMD_DAEMON_{CFLAGS,LIBS} if it dnl is available. AC_DEFUN([RRA_LIB_SYSTEMD_DAEMON_OPTIONAL], [PKG_CHECK_EXISTS([libsystemd-daemon], [PKG_CHECK_MODULES([SYSTEMD_DAEMON], [libsystemd-daemon]) AC_DEFINE([HAVE_SD_NOTIFY], 1, [Define if sd_notify is available.])])]) freeipmi-1.6.4/config/config.h.in0000644002055400205540000002464513527342537016570 0ustar00achuachu00000000000000/* config/config.h.in. Generated from configure.ac by autoheader. */ /* Define if building universal (internal helper macro) */ #undef AC_APPLE_UNIVERSAL_BUILD /* Define to one of `_getb67', `GETB67', `getb67' for Cray-2 and Cray-YMP systems. This function is required for `alloca.c' support on those systems. */ #undef CRAY_STACKSEG_END /* Define to 1 if using `alloca.c'. */ #undef C_ALLOCA /* Define default freeipmi config file. */ #undef FREEIPMI_CONFIG_FILE_DEFAULT /* Define legacy freeipmi config file. */ #undef FREEIPMI_CONFIG_FILE_LEGACY /* Define to 1 if you have `alloca', as a function or macro. */ #undef HAVE_ALLOCA /* Define to 1 if you have and it should be used (not on Ultrix). */ #undef HAVE_ALLOCA_H /* Define if you have argp.h */ #undef HAVE_ARGP_H /* Define to 1 if you have the header file. */ #undef HAVE_ASM_IO_H /* Define to 1 if you have the `asprintf' function. */ #undef HAVE_ASPRINTF /* Define to 1 if you have the header file. */ #undef HAVE_BMC_INTF_H /* Define to 1 if you have the `cbrt' function. */ #undef HAVE_CBRT /* Define to 1 if you have the declaration of `program_invocation_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_NAME /* Define to 1 if you have the declaration of `program_invocation_short_name', and to 0 if you don't. */ #undef HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME /* Define that you found /dev/random */ #undef HAVE_DEVRANDOM /* Define that you found /dev/urandom */ #undef HAVE_DEVURANDOM /* Define to 1 if you have the header file. */ #undef HAVE_DLFCN_H /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ #undef HAVE_DOPRNT /* Define to 1 if you have the header file. */ #undef HAVE_ERROR_H /* Define to 1 if you have the header file. */ #undef HAVE_FCNTL_H /* Define to 1 if you have the `flockfile' function. */ #undef HAVE_FLOCKFILE /* Define to 1 if you have the `fputs_unlocked' function. */ #undef HAVE_FPUTS_UNLOCKED /* Define is you have __FUNCTION__ */ #undef HAVE_FUNCTION_MACRO /* Define gethostbyname_r with 3 args */ #undef HAVE_FUNC_GETHOSTBYNAME_R_3 /* Define gethostbyname_r with 5 args */ #undef HAVE_FUNC_GETHOSTBYNAME_R_5 /* Define gethostbyname_r with 6 args */ #undef HAVE_FUNC_GETHOSTBYNAME_R_6 /* Define getpwuid_r with 4 args */ #undef HAVE_FUNC_GETPWUID_R_4 /* Define getpwuid_r with 5 args */ #undef HAVE_FUNC_GETPWUID_R_5 /* Define to 1 if you have the `fwrite_unlocked' function. */ #undef HAVE_FWRITE_UNLOCKED /* Define if the compiler understands __attribute__ */ #undef HAVE_GCC_ATTRIBUTE /* Define to 1 if you have the header file. */ #undef HAVE_GCRYPT_H /* Define to 1 if you have the `getline' function. */ #undef HAVE_GETLINE /* Define to 1 if you have the header file. */ #undef HAVE_GETOPT_H /* define if you found getopt_long */ #undef HAVE_GETOPT_LONG /* Define to 1 if you have the `getpagesize' function. */ #undef HAVE_GETPAGESIZE /* Define to 1 if you have the `getprogname' function. */ #undef HAVE_GETPROGNAME /* Define if you have hstrerror */ #undef HAVE_HSTRERROR /* Define to 1 if you have the header file. */ #undef HAVE_INTTYPES_H /* Define to 1 if you have the `iopl' function. */ #undef HAVE_IOPL /* Define to 1 if you have the `m' library (-lm). */ #undef HAVE_LIBM /* Define to 1 if you have the `socket' library (-lsocket). */ #undef HAVE_LIBSOCKET /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_COMPILER_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_IPMI_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_IPMI_MSGDEFS_H /* Define to 1 if you have the header file. */ #undef HAVE_LINUX_TYPES_H /* Define to 1 if you have the `memcpy' function. */ #undef HAVE_MEMCPY /* Define to 1 if you have the header file. */ #undef HAVE_MEMORY_H /* Define to 1 if you have the `mempcpy' function. */ #undef HAVE_MEMPCPY /* Define to 1 if you have the `memset' function. */ #undef HAVE_MEMSET /* Define to 1 if you have the `mlock' function. */ #undef HAVE_MLOCK /* Define to 1 if you have a working `mmap' system call. */ #undef HAVE_MMAP /* Define to 1 if you have the header file. */ #undef HAVE_NETDB_H /* Define if you have POSIX threads libraries and header files. */ #undef HAVE_PTHREAD /* Define to 1 if you have the header file. */ #undef HAVE_PTHREAD_H /* Define to 1 if you have putc_unlocked */ #undef HAVE_PUTC_UNLOCKED /* Define to 1 if the system has the type `sighandler_t'. */ #undef HAVE_SIGHANDLER_T /* Define to 1 if you have the header file. */ #undef HAVE_SIGNAL_H /* Define to 1 if you have the header file. */ #undef HAVE_STDINT_H /* Define to 1 if you have the header file. */ #undef HAVE_STDLIB_H /* Define to 1 if you have the `strchr' function. */ #undef HAVE_STRCHR /* Define to 1 if you have the `strchrnul' function. */ #undef HAVE_STRCHRNUL /* Define to 1 if you have the `strerror' function. */ #undef HAVE_STRERROR /* Define to 1 if you have the `strerror_r' function. */ #undef HAVE_STRERROR_R /* Define to 1 if you have the header file. */ #undef HAVE_STRINGS_H /* Define to 1 if you have the header file. */ #undef HAVE_STRING_H /* Define to 1 if you have the `stristr' function. */ #undef HAVE_STRISTR /* Define to 1 if you have the `strndup' function. */ #undef HAVE_STRNDUP /* Define to 1 if you have the header file. */ #undef HAVE_STROPTS_H /* Define to 1 if you have the `strsep' function. */ #undef HAVE_STRSEP /* Define to 1 if you have the header file. */ #undef HAVE_SYS_INT_TYPES_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IOCCOM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_IPMI_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_PARAM_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_SOCKIO_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STAT_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_STROPTS_H /* Define to 1 if you have the header file. */ #undef HAVE_SYS_TYPES_H /* Define to 1 if you have that is POSIX.1 compatible. */ #undef HAVE_SYS_WAIT_H /* Define if you have thread-safe gethostbyname() implementation */ #undef HAVE_THREAD_SAFE_GETHOSTBYNAME /* Define to 1 if you have the header file. */ #undef HAVE_UNISTD_H /* Define to 1 if you have the `vprintf' function. */ #undef HAVE_VPRINTF /* Define default interpret sel config file. */ #undef INTERPRET_SEL_CONFIG_FILE_DEFAULT /* Define default interpret sensor config file. */ #undef INTERPRET_SENSOR_CONFIG_FILE_DEFAULT /* Define legacy ipmiconsole config file. */ #undef IPMICONSOLE_CONFIG_FILE_LEGACY /* Define default ipmidetectd config file. */ #undef IPMIDETECTD_CONFIG_FILE_DEFAULT /* Define legacy ipmidetectd config file. */ #undef IPMIDETECTD_CONFIG_FILE_LEGACY /* Define default ipmidetect config file. */ #undef IPMIDETECT_CONFIG_FILE_DEFAULT /* Define legacy ipmidetect config file. */ #undef IPMIDETECT_CONFIG_FILE_LEGACY /* Define legacy ipmipower config file. */ #undef IPMIPOWER_CONFIG_FILE_LEGACY /* Define default ipmiseld cache dir. */ #undef IPMISELD_CACHE_DIRECTORY /* Define default ipmiseld config file. */ #undef IPMISELD_CONFIG_FILE_DEFAULT /* Define to 1 to not check for root */ #undef IPMI_DONT_CHECK_FOR_ROOT /* Define default ipmi_monitoring sdr_cache_dir. */ #undef IPMI_MONITORING_SDR_CACHE_DIR /* Define legacy ipmi_monitoring_sensor config file. */ #undef IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY /* Define to turn on error tracing */ #undef IPMI_TRACE /* Define default libipmiconsole config file. */ #undef LIBIPMICONSOLE_CONFIG_FILE_DEFAULT /* Define to the sub-directory in which libtool stores uninstalled libraries. */ #undef LT_OBJDIR /* Define to 1 for a production release */ #undef NDEBUG /* Define to 1 if your C compiler doesn't accept -c and -o together. */ #undef NO_MINUS_C_MINUS_O /* Name of package */ #undef PACKAGE /* Define to the address where bug reports for this package should be sent. */ #undef PACKAGE_BUGREPORT /* Define to the full name of this package. */ #undef PACKAGE_NAME /* Define to the full name and version of this package. */ #undef PACKAGE_STRING /* Define to the one symbol short name of this package. */ #undef PACKAGE_TARNAME /* Define to the home page for this package. */ #undef PACKAGE_URL /* Define to the version of this package. */ #undef PACKAGE_VERSION /* Define to the necessary symbol if this constant uses a non-standard name on your system. */ #undef PTHREAD_CREATE_JOINABLE /* If using the C implementation of alloca, define if you know the direction of stack growth for your system; otherwise it will be automatically deduced at runtime. STACK_DIRECTION > 0 => grows toward higher addresses STACK_DIRECTION < 0 => grows toward lower addresses STACK_DIRECTION = 0 => direction of growth unknown */ #undef STACK_DIRECTION /* Define to 1 if you have the ANSI C header files. */ #undef STDC_HEADERS /* Define to 1 if you can safely include both and . */ #undef TIME_WITH_SYS_TIME /* Version number of package */ #undef VERSION /* Define if you want encryption */ #undef WITH_ENCRYPTION /* Define if you want raw dumps */ #undef WITH_RAWDUMPS /* Define WORDS_BIGENDIAN to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel). */ #if defined AC_APPLE_UNIVERSAL_BUILD # if defined __BIG_ENDIAN__ # define WORDS_BIGENDIAN 1 # endif #else # ifndef WORDS_BIGENDIAN # undef WORDS_BIGENDIAN # endif #endif /* Define to empty if `const' does not conform to ANSI C. */ #undef const /* Define to `__inline__' or `__inline' if that's what the C compiler calls it, or to nothing if 'inline' is not supported under any name. */ #ifndef __cplusplus #undef inline #endif /* Define to `unsigned int' if does not define. */ #undef size_t #if __GNUC__ && HAVE_GCC_ATTRIBUTE # define NORETURN __attribute__ ((__noreturn__)) # define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a))) # define UNUSED __attribute__ ((__unused__)) #else # define NORETURN # define PRINTF_STYLE(f, a) # define UNUSED #endif freeipmi-1.6.4/config/compile0000755002055400205540000001624513527342443016114 0ustar00achuachu00000000000000#! /bin/sh # Wrapper for compilers which do not understand '-c -o'. scriptversion=2012-10-14.11; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # Written by Tom Tromey . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . nl=' ' # We need space, tab and new line, in precisely that order. Quoting is # there to prevent tools from complaining about whitespace usage. IFS=" "" $nl" file_conv= # func_file_conv build_file lazy # Convert a $build file to $host form and store it in $file # Currently only supports Windows hosts. If the determined conversion # type is listed in (the comma separated) LAZY, no conversion will # take place. func_file_conv () { file=$1 case $file in / | /[!/]*) # absolute file, and not a UNC file if test -z "$file_conv"; then # lazily determine how to convert abs files case `uname -s` in MINGW*) file_conv=mingw ;; CYGWIN*) file_conv=cygwin ;; *) file_conv=wine ;; esac fi case $file_conv/,$2, in *,$file_conv,*) ;; mingw/*) file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'` ;; cygwin/*) file=`cygpath -m "$file" || echo "$file"` ;; wine/*) file=`winepath -w "$file" || echo "$file"` ;; esac ;; esac } # func_cl_dashL linkdir # Make cl look for libraries in LINKDIR func_cl_dashL () { func_file_conv "$1" if test -z "$lib_path"; then lib_path=$file else lib_path="$lib_path;$file" fi linker_opts="$linker_opts -LIBPATH:$file" } # func_cl_dashl library # Do a library search-path lookup for cl func_cl_dashl () { lib=$1 found=no save_IFS=$IFS IFS=';' for dir in $lib_path $LIB do IFS=$save_IFS if $shared && test -f "$dir/$lib.dll.lib"; then found=yes lib=$dir/$lib.dll.lib break fi if test -f "$dir/$lib.lib"; then found=yes lib=$dir/$lib.lib break fi if test -f "$dir/lib$lib.a"; then found=yes lib=$dir/lib$lib.a break fi done IFS=$save_IFS if test "$found" != yes; then lib=$lib.lib fi } # func_cl_wrapper cl arg... # Adjust compile command to suit cl func_cl_wrapper () { # Assume a capable shell lib_path= shared=: linker_opts= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. eat=1 case $2 in *.o | *.[oO][bB][jJ]) func_file_conv "$2" set x "$@" -Fo"$file" shift ;; *) func_file_conv "$2" set x "$@" -Fe"$file" shift ;; esac ;; -I) eat=1 func_file_conv "$2" mingw set x "$@" -I"$file" shift ;; -I*) func_file_conv "${1#-I}" mingw set x "$@" -I"$file" shift ;; -l) eat=1 func_cl_dashl "$2" set x "$@" "$lib" shift ;; -l*) func_cl_dashl "${1#-l}" set x "$@" "$lib" shift ;; -L) eat=1 func_cl_dashL "$2" ;; -L*) func_cl_dashL "${1#-L}" ;; -static) shared=false ;; -Wl,*) arg=${1#-Wl,} save_ifs="$IFS"; IFS=',' for flag in $arg; do IFS="$save_ifs" linker_opts="$linker_opts $flag" done IFS="$save_ifs" ;; -Xlinker) eat=1 linker_opts="$linker_opts $2" ;; -*) set x "$@" "$1" shift ;; *.cc | *.CC | *.cxx | *.CXX | *.[cC]++) func_file_conv "$1" set x "$@" -Tp"$file" shift ;; *.c | *.cpp | *.CPP | *.lib | *.LIB | *.Lib | *.OBJ | *.obj | *.[oO]) func_file_conv "$1" mingw set x "$@" "$file" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -n "$linker_opts"; then linker_opts="-link$linker_opts" fi exec "$@" $linker_opts exit 1 } eat= case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: compile [--help] [--version] PROGRAM [ARGS] Wrapper for compilers which do not understand '-c -o'. Remove '-o dest.o' from ARGS, run PROGRAM with the remaining arguments, and rename the output as expected. If you are trying to build a whole package this is not the right script to run: please start by reading the file 'INSTALL'. Report bugs to . EOF exit $? ;; -v | --v*) echo "compile $scriptversion" exit $? ;; cl | *[/\\]cl | cl.exe | *[/\\]cl.exe ) func_cl_wrapper "$@" # Doesn't return... ;; esac ofile= cfile= for arg do if test -n "$eat"; then eat= else case $1 in -o) # configure might choose to run compile as 'compile cc -o foo foo.c'. # So we strip '-o arg' only if arg is an object. eat=1 case $2 in *.o | *.obj) ofile=$2 ;; *) set x "$@" -o "$2" shift ;; esac ;; *.c) cfile=$1 set x "$@" "$1" shift ;; *) set x "$@" "$1" shift ;; esac fi shift done if test -z "$ofile" || test -z "$cfile"; then # If no '-o' option was seen then we might have been invoked from a # pattern rule where we don't need one. That is ok -- this is a # normal compilation that the losing compiler can handle. If no # '.c' file was seen then we are probably linking. That is also # ok. exec "$@" fi # Name of file we expect compiler to create. cofile=`echo "$cfile" | sed 's|^.*[\\/]||; s|^[a-zA-Z]:||; s/\.c$/.o/'` # Create the lock directory. # Note: use '[/\\:.-]' here to ensure that we don't use the same name # that we are using for the .o file. Also, base the name on the expected # object file name, since that is what matters with a parallel build. lockdir=`echo "$cofile" | sed -e 's|[/\\:.-]|_|g'`.d while true; do if mkdir "$lockdir" >/dev/null 2>&1; then break fi sleep 1 done # FIXME: race condition here if user kills between mkdir and trap. trap "rmdir '$lockdir'; exit 1" 1 2 15 # Run the compile. "$@" ret=$? if test -f "$cofile"; then test "$cofile" = "$ofile" || mv "$cofile" "$ofile" elif test -f "${cofile}bj"; then test "${cofile}bj" = "$ofile" || mv "${cofile}bj" "$ofile" fi rmdir "$lockdir" exit $ret # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: freeipmi-1.6.4/config/config.guess0000755002055400205540000013036113527342443017052 0ustar00achuachu00000000000000#! /bin/sh # Attempt to guess a canonical system name. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-06-10' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # # Originally written by Per Bothner. # # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD # # Please send patches with a ChangeLog entry to config-patches@gnu.org. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] Output the configuration name of the system \`$me' is run on. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.guess ($timestamp) Originally written by Per Bothner. Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" >&2 exit 1 ;; * ) break ;; esac done if test $# != 0; then echo "$me: too many arguments$help" >&2 exit 1 fi trap 'exit 1' 1 2 15 # CC_FOR_BUILD -- compiler used by this script. Note that the use of a # compiler to aid in system detection is discouraged as it requires # temporary files to be created and, as you can see below, it is a # headache to deal with in a portable fashion. # Historically, `CC_FOR_BUILD' used to be named `HOST_CC'. We still # use `HOST_CC' if defined, but it is deprecated. # Portable tmp directory creation inspired by the Autoconf team. set_cc_for_build=' trap "exitcode=\$?; (rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null) && exit \$exitcode" 0 ; trap "rm -f \$tmpfiles 2>/dev/null; rmdir \$tmp 2>/dev/null; exit 1" 1 2 13 15 ; : ${TMPDIR=/tmp} ; { tmp=`(umask 077 && mktemp -d "$TMPDIR/cgXXXXXX") 2>/dev/null` && test -n "$tmp" && test -d "$tmp" ; } || { test -n "$RANDOM" && tmp=$TMPDIR/cg$$-$RANDOM && (umask 077 && mkdir $tmp) ; } || { tmp=$TMPDIR/cg-$$ && (umask 077 && mkdir $tmp) && echo "Warning: creating insecure temp directory" >&2 ; } || { echo "$me: cannot create a temporary directory in $TMPDIR" >&2 ; exit 1 ; } ; dummy=$tmp/dummy ; tmpfiles="$dummy.c $dummy.o $dummy.rel $dummy" ; case $CC_FOR_BUILD,$HOST_CC,$CC in ,,) echo "int x;" > $dummy.c ; for c in cc gcc c89 c99 ; do if ($c -c -o $dummy.o $dummy.c) >/dev/null 2>&1 ; then CC_FOR_BUILD="$c"; break ; fi ; done ; if test x"$CC_FOR_BUILD" = x ; then CC_FOR_BUILD=no_compiler_found ; fi ;; ,,*) CC_FOR_BUILD=$CC ;; ,*,*) CC_FOR_BUILD=$HOST_CC ;; esac ; set_cc_for_build= ;' # This is needed to find uname on a Pyramid OSx when run in the BSD universe. # (ghazi@noc.rutgers.edu 1994-08-24) if (test -f /.attbin/uname) >/dev/null 2>&1 ; then PATH=$PATH:/.attbin ; export PATH fi UNAME_MACHINE=`(uname -m) 2>/dev/null` || UNAME_MACHINE=unknown UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown UNAME_SYSTEM=`(uname -s) 2>/dev/null` || UNAME_SYSTEM=unknown UNAME_VERSION=`(uname -v) 2>/dev/null` || UNAME_VERSION=unknown case "${UNAME_SYSTEM}" in Linux|GNU|GNU/*) # If the system lacks a compiler, then just pick glibc. # We could probably try harder. LIBC=gnu eval $set_cc_for_build cat <<-EOF > $dummy.c #include #if defined(__UCLIBC__) LIBC=uclibc #elif defined(__dietlibc__) LIBC=dietlibc #else LIBC=gnu #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^LIBC'` ;; esac # Note: order is significant - the case branches are not exclusive. case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in *:NetBSD:*:*) # NetBSD (nbsd) targets should (where applicable) match one or # more of the tuples: *-*-netbsdelf*, *-*-netbsdaout*, # *-*-netbsdecoff* and *-*-netbsd*. For targets that recently # switched to ELF, *-*-netbsd* would select the old # object file format. This provides both forward # compatibility and a consistent mechanism for selecting the # object file format. # # Note: NetBSD doesn't particularly care about the vendor # portion of the name. We always set it to "unknown". sysctl="sysctl -n hw.machine_arch" UNAME_MACHINE_ARCH=`(/sbin/$sysctl 2>/dev/null || \ /usr/sbin/$sysctl 2>/dev/null || echo unknown)` case "${UNAME_MACHINE_ARCH}" in armeb) machine=armeb-unknown ;; arm*) machine=arm-unknown ;; sh3el) machine=shl-unknown ;; sh3eb) machine=sh-unknown ;; sh5el) machine=sh5le-unknown ;; *) machine=${UNAME_MACHINE_ARCH}-unknown ;; esac # The Operating System including object format, if it has switched # to ELF recently, or will in the future. case "${UNAME_MACHINE_ARCH}" in arm*|i386|m68k|ns32k|sh3*|sparc|vax) eval $set_cc_for_build if echo __ELF__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ELF__ then # Once all utilities can be ECOFF (netbsdecoff) or a.out (netbsdaout). # Return netbsd for either. FIX? os=netbsd else os=netbsdelf fi ;; *) os=netbsd ;; esac # The OS release # Debian GNU/NetBSD machines have a different userland, and # thus, need a distinct triplet. However, they do not need # kernel version information, so it can be replaced with a # suitable tag, in the style of linux-gnu. case "${UNAME_VERSION}" in Debian*) release='-gnu' ;; *) release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` ;; esac # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: # contains redundant information, the shorter form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. echo "${machine}-${os}${release}" exit ;; *:Bitrig:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/Bitrig.//'` echo ${UNAME_MACHINE_ARCH}-unknown-bitrig${UNAME_RELEASE} exit ;; *:OpenBSD:*:*) UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'` echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE} exit ;; *:ekkoBSD:*:*) echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE} exit ;; *:SolidBSD:*:*) echo ${UNAME_MACHINE}-unknown-solidbsd${UNAME_RELEASE} exit ;; macppc:MirBSD:*:*) echo powerpc-unknown-mirbsd${UNAME_RELEASE} exit ;; *:MirBSD:*:*) echo ${UNAME_MACHINE}-unknown-mirbsd${UNAME_RELEASE} exit ;; alpha:OSF1:*:*) case $UNAME_RELEASE in *4.0) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $3}'` ;; *5.*) UNAME_RELEASE=`/usr/sbin/sizer -v | awk '{print $4}'` ;; esac # According to Compaq, /usr/sbin/psrinfo has been available on # OSF/1 and Tru64 systems produced since 1995. I hope that # covers most systems running today. This code pipes the CPU # types through head -n 1, so we only detect the type of CPU 0. ALPHA_CPU_TYPE=`/usr/sbin/psrinfo -v | sed -n -e 's/^ The alpha \(.*\) processor.*$/\1/p' | head -n 1` case "$ALPHA_CPU_TYPE" in "EV4 (21064)") UNAME_MACHINE="alpha" ;; "EV4.5 (21064)") UNAME_MACHINE="alpha" ;; "LCA4 (21066/21068)") UNAME_MACHINE="alpha" ;; "EV5 (21164)") UNAME_MACHINE="alphaev5" ;; "EV5.6 (21164A)") UNAME_MACHINE="alphaev56" ;; "EV5.6 (21164PC)") UNAME_MACHINE="alphapca56" ;; "EV5.7 (21164PC)") UNAME_MACHINE="alphapca57" ;; "EV6 (21264)") UNAME_MACHINE="alphaev6" ;; "EV6.7 (21264A)") UNAME_MACHINE="alphaev67" ;; "EV6.8CB (21264C)") UNAME_MACHINE="alphaev68" ;; "EV6.8AL (21264B)") UNAME_MACHINE="alphaev68" ;; "EV6.8CX (21264D)") UNAME_MACHINE="alphaev68" ;; "EV6.9A (21264/EV69A)") UNAME_MACHINE="alphaev69" ;; "EV7 (21364)") UNAME_MACHINE="alphaev7" ;; "EV7.9 (21364A)") UNAME_MACHINE="alphaev79" ;; esac # A Pn.n version is a patched version. # A Vn.n version is a released version. # A Tn.n version is a released field test version. # A Xn.n version is an unreleased experimental baselevel. # 1.2 uses "1.2" for uname -r. echo ${UNAME_MACHINE}-dec-osf`echo ${UNAME_RELEASE} | sed -e 's/^[PVTX]//' | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` # Reset EXIT trap before exiting to avoid spurious non-zero exit code. exitcode=$? trap '' 0 exit $exitcode ;; Alpha\ *:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # Should we change UNAME_MACHINE based on the output of uname instead # of the specific Alpha model? echo alpha-pc-interix exit ;; 21064:Windows_NT:50:3) echo alpha-dec-winnt3.5 exit ;; Amiga*:UNIX_System_V:4.0:*) echo m68k-unknown-sysv4 exit ;; *:[Aa]miga[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-amigaos exit ;; *:[Mm]orph[Oo][Ss]:*:*) echo ${UNAME_MACHINE}-unknown-morphos exit ;; *:OS/390:*:*) echo i370-ibm-openedition exit ;; *:z/VM:*:*) echo s390-ibm-zvmoe exit ;; *:OS400:*:*) echo powerpc-ibm-os400 exit ;; arm:RISC*:1.[012]*:*|arm:riscix:1.[012]*:*) echo arm-acorn-riscix${UNAME_RELEASE} exit ;; arm*:riscos:*:*|arm*:RISCOS:*:*) echo arm-unknown-riscos exit ;; SR2?01:HI-UX/MPP:*:* | SR8000:HI-UX/MPP:*:*) echo hppa1.1-hitachi-hiuxmpp exit ;; Pyramid*:OSx*:*:* | MIS*:OSx*:*:* | MIS*:SMP_DC-OSx*:*:*) # akee@wpdis03.wpafb.af.mil (Earle F. Ake) contributed MIS and NILE. if test "`(/bin/universe) 2>/dev/null`" = att ; then echo pyramid-pyramid-sysv3 else echo pyramid-pyramid-bsd fi exit ;; NILE*:*:*:dcosx) echo pyramid-pyramid-svr4 exit ;; DRS?6000:unix:4.0:6*) echo sparc-icl-nx6 exit ;; DRS?6000:UNIX_SV:4.2*:7* | DRS?6000:isis:4.2*:7*) case `/usr/bin/uname -p` in sparc) echo sparc-icl-nx7; exit ;; esac ;; s390x:SunOS:*:*) echo ${UNAME_MACHINE}-ibm-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4H:SunOS:5.*:*) echo sparc-hal-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:5.*:* | tadpole*:SunOS:5.*:*) echo sparc-sun-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; i86pc:AuroraUX:5.*:* | i86xen:AuroraUX:5.*:*) echo i386-pc-auroraux${UNAME_RELEASE} exit ;; i86pc:SunOS:5.*:* | i86xen:SunOS:5.*:*) eval $set_cc_for_build SUN_ARCH="i386" # If there is a compiler, see if it is configured for 64-bit objects. # Note that the Sun cc does not turn __LP64__ into 1 like gcc does. # This test works for both compilers. if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __amd64'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then SUN_ARCH="x86_64" fi fi echo ${SUN_ARCH}-pc-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:6*:*) # According to config.sub, this is the proper way to canonicalize # SunOS6. Hard to guess exactly what SunOS6 will be like, but # it's likely to be more like Solaris than SunOS4. echo sparc-sun-solaris3`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; sun4*:SunOS:*:*) case "`/usr/bin/arch -k`" in Series*|S4*) UNAME_RELEASE=`uname -v` ;; esac # Japanese Language versions have a version number like `4.1.3-JL'. echo sparc-sun-sunos`echo ${UNAME_RELEASE}|sed -e 's/-/_/'` exit ;; sun3*:SunOS:*:*) echo m68k-sun-sunos${UNAME_RELEASE} exit ;; sun*:*:4.2BSD:*) UNAME_RELEASE=`(sed 1q /etc/motd | awk '{print substr($5,1,3)}') 2>/dev/null` test "x${UNAME_RELEASE}" = "x" && UNAME_RELEASE=3 case "`/bin/arch`" in sun3) echo m68k-sun-sunos${UNAME_RELEASE} ;; sun4) echo sparc-sun-sunos${UNAME_RELEASE} ;; esac exit ;; aushp:SunOS:*:*) echo sparc-auspex-sunos${UNAME_RELEASE} exit ;; # The situation for MiNT is a little confusing. The machine name # can be virtually everything (everything which is not # "atarist" or "atariste" at least should have a processor # > m68000). The system name ranges from "MiNT" over "FreeMiNT" # to the lowercase version "mint" (or "freemint"). Finally # the system name "TOS" denotes a system which is actually not # MiNT. But MiNT is downward compatible to TOS, so this should # be no problem. atarist[e]:*MiNT:*:* | atarist[e]:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; atari*:*MiNT:*:* | atari*:*mint:*:* | atarist[e]:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; *falcon*:*MiNT:*:* | *falcon*:*mint:*:* | *falcon*:*TOS:*:*) echo m68k-atari-mint${UNAME_RELEASE} exit ;; milan*:*MiNT:*:* | milan*:*mint:*:* | *milan*:*TOS:*:*) echo m68k-milan-mint${UNAME_RELEASE} exit ;; hades*:*MiNT:*:* | hades*:*mint:*:* | *hades*:*TOS:*:*) echo m68k-hades-mint${UNAME_RELEASE} exit ;; *:*MiNT:*:* | *:*mint:*:* | *:*TOS:*:*) echo m68k-unknown-mint${UNAME_RELEASE} exit ;; m68k:machten:*:*) echo m68k-apple-machten${UNAME_RELEASE} exit ;; powerpc:machten:*:*) echo powerpc-apple-machten${UNAME_RELEASE} exit ;; RISC*:Mach:*:*) echo mips-dec-mach_bsd4.3 exit ;; RISC*:ULTRIX:*:*) echo mips-dec-ultrix${UNAME_RELEASE} exit ;; VAX*:ULTRIX*:*:*) echo vax-dec-ultrix${UNAME_RELEASE} exit ;; 2020:CLIX:*:* | 2430:CLIX:*:*) echo clipper-intergraph-clix${UNAME_RELEASE} exit ;; mips:*:*:UMIPS | mips:*:*:RISCos) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #ifdef __cplusplus #include /* for printf() prototype */ int main (int argc, char *argv[]) { #else int main (argc, argv) int argc; char *argv[]; { #endif #if defined (host_mips) && defined (MIPSEB) #if defined (SYSTYPE_SYSV) printf ("mips-mips-riscos%ssysv\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_SVR4) printf ("mips-mips-riscos%ssvr4\n", argv[1]); exit (0); #endif #if defined (SYSTYPE_BSD43) || defined(SYSTYPE_BSD) printf ("mips-mips-riscos%sbsd\n", argv[1]); exit (0); #endif #endif exit (-1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && dummyarg=`echo "${UNAME_RELEASE}" | sed -n 's/\([0-9]*\).*/\1/p'` && SYSTEM_NAME=`$dummy $dummyarg` && { echo "$SYSTEM_NAME"; exit; } echo mips-mips-riscos${UNAME_RELEASE} exit ;; Motorola:PowerMAX_OS:*:*) echo powerpc-motorola-powermax exit ;; Motorola:*:4.3:PL8-*) echo powerpc-harris-powermax exit ;; Night_Hawk:*:*:PowerMAX_OS | Synergy:PowerMAX_OS:*:*) echo powerpc-harris-powermax exit ;; Night_Hawk:Power_UNIX:*:*) echo powerpc-harris-powerunix exit ;; m88k:CX/UX:7*:*) echo m88k-harris-cxux7 exit ;; m88k:*:4*:R4*) echo m88k-motorola-sysv4 exit ;; m88k:*:3*:R3*) echo m88k-motorola-sysv3 exit ;; AViiON:dgux:*:*) # DG/UX returns AViiON for all architectures UNAME_PROCESSOR=`/usr/bin/uname -p` if [ $UNAME_PROCESSOR = mc88100 ] || [ $UNAME_PROCESSOR = mc88110 ] then if [ ${TARGET_BINARY_INTERFACE}x = m88kdguxelfx ] || \ [ ${TARGET_BINARY_INTERFACE}x = x ] then echo m88k-dg-dgux${UNAME_RELEASE} else echo m88k-dg-dguxbcs${UNAME_RELEASE} fi else echo i586-dg-dgux${UNAME_RELEASE} fi exit ;; M88*:DolphinOS:*:*) # DolphinOS (SVR3) echo m88k-dolphin-sysv3 exit ;; M88*:*:R3*:*) # Delta 88k system running SVR3 echo m88k-motorola-sysv3 exit ;; XD88*:*:*:*) # Tektronix XD88 system running UTekV (SVR3) echo m88k-tektronix-sysv3 exit ;; Tek43[0-9][0-9]:UTek:*:*) # Tektronix 4300 system running UTek (BSD) echo m68k-tektronix-bsd exit ;; *:IRIX*:*:*) echo mips-sgi-irix`echo ${UNAME_RELEASE}|sed -e 's/-/_/g'` exit ;; ????????:AIX?:[12].1:2) # AIX 2.2.1 or AIX 2.1.1 is RT/PC AIX. echo romp-ibm-aix # uname -m gives an 8 hex-code CPU id exit ;; # Note that: echo "'`uname -s`'" gives 'AIX ' i*86:AIX:*:*) echo i386-ibm-aix exit ;; ia64:AIX:*:*) if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${UNAME_MACHINE}-ibm-aix${IBM_REV} exit ;; *:AIX:2:3) if grep bos325 /usr/include/stdio.h >/dev/null 2>&1; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include main() { if (!__power_pc()) exit(1); puts("powerpc-ibm-aix3.2.5"); exit(0); } EOF if $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` then echo "$SYSTEM_NAME" else echo rs6000-ibm-aix3.2.5 fi elif grep bos324 /usr/include/stdio.h >/dev/null 2>&1; then echo rs6000-ibm-aix3.2.4 else echo rs6000-ibm-aix3.2 fi exit ;; *:AIX:*:[4567]) IBM_CPU_ID=`/usr/sbin/lsdev -C -c processor -S available | sed 1q | awk '{ print $1 }'` if /usr/sbin/lsattr -El ${IBM_CPU_ID} | grep ' POWER' >/dev/null 2>&1; then IBM_ARCH=rs6000 else IBM_ARCH=powerpc fi if [ -x /usr/bin/oslevel ] ; then IBM_REV=`/usr/bin/oslevel` else IBM_REV=${UNAME_VERSION}.${UNAME_RELEASE} fi echo ${IBM_ARCH}-ibm-aix${IBM_REV} exit ;; *:AIX:*:*) echo rs6000-ibm-aix exit ;; ibmrt:4.4BSD:*|romp-ibm:BSD:*) echo romp-ibm-bsd4.4 exit ;; ibmrt:*BSD:*|romp-ibm:BSD:*) # covers RT/PC BSD and echo romp-ibm-bsd${UNAME_RELEASE} # 4.3 with uname added to exit ;; # report: romp-ibm BSD 4.3 *:BOSX:*:*) echo rs6000-bull-bosx exit ;; DPX/2?00:B.O.S.:*:*) echo m68k-bull-sysv3 exit ;; 9000/[34]??:4.3bsd:1.*:*) echo m68k-hp-bsd exit ;; hp300:4.4BSD:*:* | 9000/[34]??:4.3bsd:2.*:*) echo m68k-hp-bsd4.4 exit ;; 9000/[34678]??:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` case "${UNAME_MACHINE}" in 9000/31? ) HP_ARCH=m68000 ;; 9000/[34]?? ) HP_ARCH=m68k ;; 9000/[678][0-9][0-9]) if [ -x /usr/bin/getconf ]; then sc_cpu_version=`/usr/bin/getconf SC_CPU_VERSION 2>/dev/null` sc_kernel_bits=`/usr/bin/getconf SC_KERNEL_BITS 2>/dev/null` case "${sc_cpu_version}" in 523) HP_ARCH="hppa1.0" ;; # CPU_PA_RISC1_0 528) HP_ARCH="hppa1.1" ;; # CPU_PA_RISC1_1 532) # CPU_PA_RISC2_0 case "${sc_kernel_bits}" in 32) HP_ARCH="hppa2.0n" ;; 64) HP_ARCH="hppa2.0w" ;; '') HP_ARCH="hppa2.0" ;; # HP-UX 10.20 esac ;; esac fi if [ "${HP_ARCH}" = "" ]; then eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #define _HPUX_SOURCE #include #include int main () { #if defined(_SC_KERNEL_BITS) long bits = sysconf(_SC_KERNEL_BITS); #endif long cpu = sysconf (_SC_CPU_VERSION); switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0"); break; case CPU_PA_RISC1_1: puts ("hppa1.1"); break; case CPU_PA_RISC2_0: #if defined(_SC_KERNEL_BITS) switch (bits) { case 64: puts ("hppa2.0w"); break; case 32: puts ("hppa2.0n"); break; default: puts ("hppa2.0"); break; } break; #else /* !defined(_SC_KERNEL_BITS) */ puts ("hppa2.0"); break; #endif default: puts ("hppa1.0"); break; } exit (0); } EOF (CCOPTS= $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null) && HP_ARCH=`$dummy` test -z "$HP_ARCH" && HP_ARCH=hppa fi ;; esac if [ ${HP_ARCH} = "hppa2.0w" ] then eval $set_cc_for_build # hppa2.0w-hp-hpux* has a 64-bit kernel and a compiler generating # 32-bit code. hppa64-hp-hpux* has the same kernel and a compiler # generating 64-bit code. GNU and HP use different nomenclature: # # $ CC_FOR_BUILD=cc ./config.guess # => hppa2.0w-hp-hpux11.23 # $ CC_FOR_BUILD="cc +DA2.0w" ./config.guess # => hppa64-hp-hpux11.23 if echo __LP64__ | (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | grep -q __LP64__ then HP_ARCH="hppa2.0w" else HP_ARCH="hppa64" fi fi echo ${HP_ARCH}-hp-hpux${HPUX_REV} exit ;; ia64:HP-UX:*:*) HPUX_REV=`echo ${UNAME_RELEASE}|sed -e 's/[^.]*.[0B]*//'` echo ia64-hp-hpux${HPUX_REV} exit ;; 3050*:HI-UX:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #include int main () { long cpu = sysconf (_SC_CPU_VERSION); /* The order matters, because CPU_IS_HP_MC68K erroneously returns true for CPU_PA_RISC1_0. CPU_IS_PA_RISC returns correct results, however. */ if (CPU_IS_PA_RISC (cpu)) { switch (cpu) { case CPU_PA_RISC1_0: puts ("hppa1.0-hitachi-hiuxwe2"); break; case CPU_PA_RISC1_1: puts ("hppa1.1-hitachi-hiuxwe2"); break; case CPU_PA_RISC2_0: puts ("hppa2.0-hitachi-hiuxwe2"); break; default: puts ("hppa-hitachi-hiuxwe2"); break; } } else if (CPU_IS_HP_MC68K (cpu)) puts ("m68k-hitachi-hiuxwe2"); else puts ("unknown-hitachi-hiuxwe2"); exit (0); } EOF $CC_FOR_BUILD -o $dummy $dummy.c && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } echo unknown-hitachi-hiuxwe2 exit ;; 9000/7??:4.3bsd:*:* | 9000/8?[79]:4.3bsd:*:* ) echo hppa1.1-hp-bsd exit ;; 9000/8??:4.3bsd:*:*) echo hppa1.0-hp-bsd exit ;; *9??*:MPE/iX:*:* | *3000*:MPE/iX:*:*) echo hppa1.0-hp-mpeix exit ;; hp7??:OSF1:*:* | hp8?[79]:OSF1:*:* ) echo hppa1.1-hp-osf exit ;; hp8??:OSF1:*:*) echo hppa1.0-hp-osf exit ;; i*86:OSF1:*:*) if [ -x /usr/sbin/sysversion ] ; then echo ${UNAME_MACHINE}-unknown-osf1mk else echo ${UNAME_MACHINE}-unknown-osf1 fi exit ;; parisc*:Lites*:*:*) echo hppa1.1-hp-lites exit ;; C1*:ConvexOS:*:* | convex:ConvexOS:C1*:*) echo c1-convex-bsd exit ;; C2*:ConvexOS:*:* | convex:ConvexOS:C2*:*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; C34*:ConvexOS:*:* | convex:ConvexOS:C34*:*) echo c34-convex-bsd exit ;; C38*:ConvexOS:*:* | convex:ConvexOS:C38*:*) echo c38-convex-bsd exit ;; C4*:ConvexOS:*:* | convex:ConvexOS:C4*:*) echo c4-convex-bsd exit ;; CRAY*Y-MP:*:*:*) echo ymp-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*[A-Z]90:*:*:*) echo ${UNAME_MACHINE}-cray-unicos${UNAME_RELEASE} \ | sed -e 's/CRAY.*\([A-Z]90\)/\1/' \ -e y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/ \ -e 's/\.[^.]*$/.X/' exit ;; CRAY*TS:*:*:*) echo t90-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*T3E:*:*:*) echo alphaev5-cray-unicosmk${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; CRAY*SV1:*:*:*) echo sv1-cray-unicos${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; *:UNICOS/mp:*:*) echo craynv-cray-unicosmp${UNAME_RELEASE} | sed -e 's/\.[^.]*$/.X/' exit ;; F30[01]:UNIX_System_V:*:* | F700:UNIX_System_V:*:*) FUJITSU_PROC=`uname -m | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz'` FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | sed -e 's/ /_/'` echo "${FUJITSU_PROC}-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; 5000:UNIX_System_V:4.*:*) FUJITSU_SYS=`uname -p | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/\///'` FUJITSU_REL=`echo ${UNAME_RELEASE} | tr 'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 'abcdefghijklmnopqrstuvwxyz' | sed -e 's/ /_/'` echo "sparc-fujitsu-${FUJITSU_SYS}${FUJITSU_REL}" exit ;; i*86:BSD/386:*:* | i*86:BSD/OS:*:* | *:Ascend\ Embedded/OS:*:*) echo ${UNAME_MACHINE}-pc-bsdi${UNAME_RELEASE} exit ;; sparc*:BSD/OS:*:*) echo sparc-unknown-bsdi${UNAME_RELEASE} exit ;; *:BSD/OS:*:*) echo ${UNAME_MACHINE}-unknown-bsdi${UNAME_RELEASE} exit ;; *:FreeBSD:*:*) UNAME_PROCESSOR=`/usr/bin/uname -p` case ${UNAME_PROCESSOR} in amd64) echo x86_64-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; *) echo ${UNAME_PROCESSOR}-unknown-freebsd`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` ;; esac exit ;; i*:CYGWIN*:*) echo ${UNAME_MACHINE}-pc-cygwin exit ;; *:MINGW64*:*) echo ${UNAME_MACHINE}-pc-mingw64 exit ;; *:MINGW*:*) echo ${UNAME_MACHINE}-pc-mingw32 exit ;; i*:MSYS*:*) echo ${UNAME_MACHINE}-pc-msys exit ;; i*:windows32*:*) # uname -m includes "-pc" on this system. echo ${UNAME_MACHINE}-mingw32 exit ;; i*:PW*:*) echo ${UNAME_MACHINE}-pc-pw32 exit ;; *:Interix*:*) case ${UNAME_MACHINE} in x86) echo i586-pc-interix${UNAME_RELEASE} exit ;; authenticamd | genuineintel | EM64T) echo x86_64-unknown-interix${UNAME_RELEASE} exit ;; IA64) echo ia64-unknown-interix${UNAME_RELEASE} exit ;; esac ;; [345]86:Windows_95:* | [345]86:Windows_98:* | [345]86:Windows_NT:*) echo i${UNAME_MACHINE}-pc-mks exit ;; 8664:Windows_NT:*) echo x86_64-pc-mks exit ;; i*:Windows_NT*:* | Pentium*:Windows_NT*:*) # How do we know it's Interix rather than the generic POSIX subsystem? # It also conflicts with pre-2.0 versions of AT&T UWIN. Should we # UNAME_MACHINE based on the output of uname instead of i386? echo i586-pc-interix exit ;; i*:UWIN*:*) echo ${UNAME_MACHINE}-pc-uwin exit ;; amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*) echo x86_64-unknown-cygwin exit ;; p*:CYGWIN*:*) echo powerpcle-unknown-cygwin exit ;; prep*:SunOS:5.*:*) echo powerpcle-unknown-solaris2`echo ${UNAME_RELEASE}|sed -e 's/[^.]*//'` exit ;; *:GNU:*:*) # the GNU system echo `echo ${UNAME_MACHINE}|sed -e 's,[-/].*$,,'`-unknown-${LIBC}`echo ${UNAME_RELEASE}|sed -e 's,/.*$,,'` exit ;; *:GNU/*:*:*) # other systems with GNU libc and userland echo ${UNAME_MACHINE}-unknown-`echo ${UNAME_SYSTEM} | sed 's,^[^/]*/,,' | tr '[A-Z]' '[a-z]'``echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'`-${LIBC} exit ;; i*86:Minix:*:*) echo ${UNAME_MACHINE}-pc-minix exit ;; aarch64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; aarch64_be:Linux:*:*) UNAME_MACHINE=aarch64_be echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; alpha:Linux:*:*) case `sed -n '/^cpu model/s/^.*: \(.*\)/\1/p' < /proc/cpuinfo` in EV5) UNAME_MACHINE=alphaev5 ;; EV56) UNAME_MACHINE=alphaev56 ;; PCA56) UNAME_MACHINE=alphapca56 ;; PCA57) UNAME_MACHINE=alphapca56 ;; EV6) UNAME_MACHINE=alphaev6 ;; EV67) UNAME_MACHINE=alphaev67 ;; EV68*) UNAME_MACHINE=alphaev68 ;; esac objdump --private-headers /bin/sh | grep -q ld.so.1 if test "$?" = 0 ; then LIBC="gnulibc1" ; fi echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arc:Linux:*:* | arceb:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; arm*:Linux:*:*) eval $set_cc_for_build if echo __ARM_EABI__ | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_EABI__ then echo ${UNAME_MACHINE}-unknown-linux-${LIBC} else if echo __ARM_PCS_VFP | $CC_FOR_BUILD -E - 2>/dev/null \ | grep -q __ARM_PCS_VFP then echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabi else echo ${UNAME_MACHINE}-unknown-linux-${LIBC}eabihf fi fi exit ;; avr32*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; cris:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; crisv32:Linux:*:*) echo ${UNAME_MACHINE}-axis-linux-${LIBC} exit ;; frv:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; hexagon:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:Linux:*:*) echo ${UNAME_MACHINE}-pc-linux-${LIBC} exit ;; ia64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m32r*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; m68*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; mips:Linux:*:* | mips64:Linux:*:*) eval $set_cc_for_build sed 's/^ //' << EOF >$dummy.c #undef CPU #undef ${UNAME_MACHINE} #undef ${UNAME_MACHINE}el #if defined(__MIPSEL__) || defined(__MIPSEL) || defined(_MIPSEL) || defined(MIPSEL) CPU=${UNAME_MACHINE}el #else #if defined(__MIPSEB__) || defined(__MIPSEB) || defined(_MIPSEB) || defined(MIPSEB) CPU=${UNAME_MACHINE} #else CPU= #endif #endif EOF eval `$CC_FOR_BUILD -E $dummy.c 2>/dev/null | grep '^CPU'` test x"${CPU}" != x && { echo "${CPU}-unknown-linux-${LIBC}"; exit; } ;; or1k:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; or32:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; padre:Linux:*:*) echo sparc-unknown-linux-${LIBC} exit ;; parisc64:Linux:*:* | hppa64:Linux:*:*) echo hppa64-unknown-linux-${LIBC} exit ;; parisc:Linux:*:* | hppa:Linux:*:*) # Look for CPU level case `grep '^cpu[^a-z]*:' /proc/cpuinfo 2>/dev/null | cut -d' ' -f2` in PA7*) echo hppa1.1-unknown-linux-${LIBC} ;; PA8*) echo hppa2.0-unknown-linux-${LIBC} ;; *) echo hppa-unknown-linux-${LIBC} ;; esac exit ;; ppc64:Linux:*:*) echo powerpc64-unknown-linux-${LIBC} exit ;; ppc:Linux:*:*) echo powerpc-unknown-linux-${LIBC} exit ;; ppc64le:Linux:*:*) echo powerpc64le-unknown-linux-${LIBC} exit ;; ppcle:Linux:*:*) echo powerpcle-unknown-linux-${LIBC} exit ;; s390:Linux:*:* | s390x:Linux:*:*) echo ${UNAME_MACHINE}-ibm-linux-${LIBC} exit ;; sh64*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sh*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; sparc:Linux:*:* | sparc64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; tile*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; vax:Linux:*:*) echo ${UNAME_MACHINE}-dec-linux-${LIBC} exit ;; x86_64:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; xtensa*:Linux:*:*) echo ${UNAME_MACHINE}-unknown-linux-${LIBC} exit ;; i*86:DYNIX/ptx:4*:*) # ptx 4.0 does uname -s correctly, with DYNIX/ptx in there. # earlier versions are messed up and put the nodename in both # sysname and nodename. echo i386-sequent-sysv4 exit ;; i*86:UNIX_SV:4.2MP:2.*) # Unixware is an offshoot of SVR4, but it has its own version # number series starting with 2... # I am not positive that other SVR4 systems won't match this, # I just have to hope. -- rms. # Use sysv4.2uw... so that sysv4* matches it. echo ${UNAME_MACHINE}-pc-sysv4.2uw${UNAME_VERSION} exit ;; i*86:OS/2:*:*) # If we were able to find `uname', then EMX Unix compatibility # is probably installed. echo ${UNAME_MACHINE}-pc-os2-emx exit ;; i*86:XTS-300:*:STOP) echo ${UNAME_MACHINE}-unknown-stop exit ;; i*86:atheos:*:*) echo ${UNAME_MACHINE}-unknown-atheos exit ;; i*86:syllable:*:*) echo ${UNAME_MACHINE}-pc-syllable exit ;; i*86:LynxOS:2.*:* | i*86:LynxOS:3.[01]*:* | i*86:LynxOS:4.[02]*:*) echo i386-unknown-lynxos${UNAME_RELEASE} exit ;; i*86:*DOS:*:*) echo ${UNAME_MACHINE}-pc-msdosdjgpp exit ;; i*86:*:4.*:* | i*86:SYSTEM_V:4.*:*) UNAME_REL=`echo ${UNAME_RELEASE} | sed 's/\/MP$//'` if grep Novell /usr/include/link.h >/dev/null 2>/dev/null; then echo ${UNAME_MACHINE}-univel-sysv${UNAME_REL} else echo ${UNAME_MACHINE}-pc-sysv${UNAME_REL} fi exit ;; i*86:*:5:[678]*) # UnixWare 7.x, OpenUNIX and OpenServer 6. case `/bin/uname -X | grep "^Machine"` in *486*) UNAME_MACHINE=i486 ;; *Pentium) UNAME_MACHINE=i586 ;; *Pent*|*Celeron) UNAME_MACHINE=i686 ;; esac echo ${UNAME_MACHINE}-unknown-sysv${UNAME_RELEASE}${UNAME_SYSTEM}${UNAME_VERSION} exit ;; i*86:*:3.2:*) if test -f /usr/options/cb.name; then UNAME_REL=`sed -n 's/.*Version //p' /dev/null >/dev/null ; then UNAME_REL=`(/bin/uname -X|grep Release|sed -e 's/.*= //')` (/bin/uname -X|grep i80486 >/dev/null) && UNAME_MACHINE=i486 (/bin/uname -X|grep '^Machine.*Pentium' >/dev/null) \ && UNAME_MACHINE=i586 (/bin/uname -X|grep '^Machine.*Pent *II' >/dev/null) \ && UNAME_MACHINE=i686 (/bin/uname -X|grep '^Machine.*Pentium Pro' >/dev/null) \ && UNAME_MACHINE=i686 echo ${UNAME_MACHINE}-pc-sco$UNAME_REL else echo ${UNAME_MACHINE}-pc-sysv32 fi exit ;; pc:*:*:*) # Left here for compatibility: # uname -m prints for DJGPP always 'pc', but it prints nothing about # the processor, so we play safe by assuming i586. # Note: whatever this is, it MUST be the same as what config.sub # prints for the "djgpp" host, or else GDB configury will decide that # this is a cross-build. echo i586-pc-msdosdjgpp exit ;; Intel:Mach:3*:*) echo i386-pc-mach3 exit ;; paragon:*:*:*) echo i860-intel-osf1 exit ;; i860:*:4.*:*) # i860-SVR4 if grep Stardent /usr/include/sys/uadmin.h >/dev/null 2>&1 ; then echo i860-stardent-sysv${UNAME_RELEASE} # Stardent Vistra i860-SVR4 else # Add other i860-SVR4 vendors below as they are discovered. echo i860-unknown-sysv${UNAME_RELEASE} # Unknown i860-SVR4 fi exit ;; mini*:CTIX:SYS*5:*) # "miniframe" echo m68010-convergent-sysv exit ;; mc68k:UNIX:SYSTEM5:3.51m) echo m68k-convergent-sysv exit ;; M680?0:D-NIX:5.3:*) echo m68k-diab-dnix exit ;; M68*:*:R3V[5678]*:*) test -r /sysV68 && { echo 'm68k-motorola-sysv'; exit; } ;; 3[345]??:*:4.0:3.0 | 3[34]??A:*:4.0:3.0 | 3[34]??,*:*:4.0:3.0 | 3[34]??/*:*:4.0:3.0 | 4400:*:4.0:3.0 | 4850:*:4.0:3.0 | SKA40:*:4.0:3.0 | SDS2:*:4.0:3.0 | SHG2:*:4.0:3.0 | S7501*:*:4.0:3.0) OS_REL='' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; 3[34]??:*:4.0:* | 3[34]??,*:*:4.0:*) /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4; exit; } ;; NCR*:*:4.2:* | MPRAS*:*:4.2:*) OS_REL='.3' test -r /etc/.relid \ && OS_REL=.`sed -n 's/[^ ]* [^ ]* \([0-9][0-9]\).*/\1/p' < /etc/.relid` /bin/uname -p 2>/dev/null | grep 86 >/dev/null \ && { echo i486-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep entium >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } /bin/uname -p 2>/dev/null | /bin/grep pteron >/dev/null \ && { echo i586-ncr-sysv4.3${OS_REL}; exit; } ;; m68*:LynxOS:2.*:* | m68*:LynxOS:3.0*:*) echo m68k-unknown-lynxos${UNAME_RELEASE} exit ;; mc68030:UNIX_System_V:4.*:*) echo m68k-atari-sysv4 exit ;; TSUNAMI:LynxOS:2.*:*) echo sparc-unknown-lynxos${UNAME_RELEASE} exit ;; rs6000:LynxOS:2.*:*) echo rs6000-unknown-lynxos${UNAME_RELEASE} exit ;; PowerPC:LynxOS:2.*:* | PowerPC:LynxOS:3.[01]*:* | PowerPC:LynxOS:4.[02]*:*) echo powerpc-unknown-lynxos${UNAME_RELEASE} exit ;; SM[BE]S:UNIX_SV:*:*) echo mips-dde-sysv${UNAME_RELEASE} exit ;; RM*:ReliantUNIX-*:*:*) echo mips-sni-sysv4 exit ;; RM*:SINIX-*:*:*) echo mips-sni-sysv4 exit ;; *:SINIX-*:*:*) if uname -p 2>/dev/null >/dev/null ; then UNAME_MACHINE=`(uname -p) 2>/dev/null` echo ${UNAME_MACHINE}-sni-sysv4 else echo ns32k-sni-sysv fi exit ;; PENTIUM:*:4.0*:*) # Unisys `ClearPath HMP IX 4000' SVR4/MP effort # says echo i586-unisys-sysv4 exit ;; *:UNIX_System_V:4*:FTX*) # From Gerald Hewes . # How about differentiating between stratus architectures? -djm echo hppa1.1-stratus-sysv4 exit ;; *:*:*:FTX*) # From seanf@swdc.stratus.com. echo i860-stratus-sysv4 exit ;; i*86:VOS:*:*) # From Paul.Green@stratus.com. echo ${UNAME_MACHINE}-stratus-vos exit ;; *:VOS:*:*) # From Paul.Green@stratus.com. echo hppa1.1-stratus-vos exit ;; mc68*:A/UX:*:*) echo m68k-apple-aux${UNAME_RELEASE} exit ;; news*:NEWS-OS:6*:*) echo mips-sony-newsos6 exit ;; R[34]000:*System_V*:*:* | R4000:UNIX_SYSV:*:* | R*000:UNIX_SV:*:*) if [ -d /usr/nec ]; then echo mips-nec-sysv${UNAME_RELEASE} else echo mips-unknown-sysv${UNAME_RELEASE} fi exit ;; BeBox:BeOS:*:*) # BeOS running on hardware made by Be, PPC only. echo powerpc-be-beos exit ;; BeMac:BeOS:*:*) # BeOS running on Mac or Mac clone, PPC only. echo powerpc-apple-beos exit ;; BePC:BeOS:*:*) # BeOS running on Intel PC compatible. echo i586-pc-beos exit ;; BePC:Haiku:*:*) # Haiku running on Intel PC compatible. echo i586-pc-haiku exit ;; x86_64:Haiku:*:*) echo x86_64-unknown-haiku exit ;; SX-4:SUPER-UX:*:*) echo sx4-nec-superux${UNAME_RELEASE} exit ;; SX-5:SUPER-UX:*:*) echo sx5-nec-superux${UNAME_RELEASE} exit ;; SX-6:SUPER-UX:*:*) echo sx6-nec-superux${UNAME_RELEASE} exit ;; SX-7:SUPER-UX:*:*) echo sx7-nec-superux${UNAME_RELEASE} exit ;; SX-8:SUPER-UX:*:*) echo sx8-nec-superux${UNAME_RELEASE} exit ;; SX-8R:SUPER-UX:*:*) echo sx8r-nec-superux${UNAME_RELEASE} exit ;; Power*:Rhapsody:*:*) echo powerpc-apple-rhapsody${UNAME_RELEASE} exit ;; *:Rhapsody:*:*) echo ${UNAME_MACHINE}-apple-rhapsody${UNAME_RELEASE} exit ;; *:Darwin:*:*) UNAME_PROCESSOR=`uname -p` || UNAME_PROCESSOR=unknown eval $set_cc_for_build if test "$UNAME_PROCESSOR" = unknown ; then UNAME_PROCESSOR=powerpc fi if [ "$CC_FOR_BUILD" != 'no_compiler_found' ]; then if (echo '#ifdef __LP64__'; echo IS_64BIT_ARCH; echo '#endif') | \ (CCOPTS= $CC_FOR_BUILD -E - 2>/dev/null) | \ grep IS_64BIT_ARCH >/dev/null then case $UNAME_PROCESSOR in i386) UNAME_PROCESSOR=x86_64 ;; powerpc) UNAME_PROCESSOR=powerpc64 ;; esac fi fi echo ${UNAME_PROCESSOR}-apple-darwin${UNAME_RELEASE} exit ;; *:procnto*:*:* | *:QNX:[0123456789]*:*) UNAME_PROCESSOR=`uname -p` if test "$UNAME_PROCESSOR" = "x86"; then UNAME_PROCESSOR=i386 UNAME_MACHINE=pc fi echo ${UNAME_PROCESSOR}-${UNAME_MACHINE}-nto-qnx${UNAME_RELEASE} exit ;; *:QNX:*:4*) echo i386-pc-qnx exit ;; NEO-?:NONSTOP_KERNEL:*:*) echo neo-tandem-nsk${UNAME_RELEASE} exit ;; NSE-*:NONSTOP_KERNEL:*:*) echo nse-tandem-nsk${UNAME_RELEASE} exit ;; NSR-?:NONSTOP_KERNEL:*:*) echo nsr-tandem-nsk${UNAME_RELEASE} exit ;; *:NonStop-UX:*:*) echo mips-compaq-nonstopux exit ;; BS2000:POSIX*:*:*) echo bs2000-siemens-sysv exit ;; DS/*:UNIX_System_V:*:*) echo ${UNAME_MACHINE}-${UNAME_SYSTEM}-${UNAME_RELEASE} exit ;; *:Plan9:*:*) # "uname -m" is not consistent, so use $cputype instead. 386 # is converted to i386 for consistency with other x86 # operating systems. if test "$cputype" = "386"; then UNAME_MACHINE=i386 else UNAME_MACHINE="$cputype" fi echo ${UNAME_MACHINE}-unknown-plan9 exit ;; *:TOPS-10:*:*) echo pdp10-unknown-tops10 exit ;; *:TENEX:*:*) echo pdp10-unknown-tenex exit ;; KS10:TOPS-20:*:* | KL10:TOPS-20:*:* | TYPE4:TOPS-20:*:*) echo pdp10-dec-tops20 exit ;; XKL-1:TOPS-20:*:* | TYPE5:TOPS-20:*:*) echo pdp10-xkl-tops20 exit ;; *:TOPS-20:*:*) echo pdp10-unknown-tops20 exit ;; *:ITS:*:*) echo pdp10-unknown-its exit ;; SEI:*:*:SEIUX) echo mips-sei-seiux${UNAME_RELEASE} exit ;; *:DragonFly:*:*) echo ${UNAME_MACHINE}-unknown-dragonfly`echo ${UNAME_RELEASE}|sed -e 's/[-(].*//'` exit ;; *:*VMS:*:*) UNAME_MACHINE=`(uname -p) 2>/dev/null` case "${UNAME_MACHINE}" in A*) echo alpha-dec-vms ; exit ;; I*) echo ia64-dec-vms ; exit ;; V*) echo vax-dec-vms ; exit ;; esac ;; *:XENIX:*:SysV) echo i386-pc-xenix exit ;; i*86:skyos:*:*) echo ${UNAME_MACHINE}-pc-skyos`echo ${UNAME_RELEASE}` | sed -e 's/ .*$//' exit ;; i*86:rdos:*:*) echo ${UNAME_MACHINE}-pc-rdos exit ;; i*86:AROS:*:*) echo ${UNAME_MACHINE}-pc-aros exit ;; x86_64:VMkernel:*:*) echo ${UNAME_MACHINE}-unknown-esx exit ;; esac eval $set_cc_for_build cat >$dummy.c < # include #endif main () { #if defined (sony) #if defined (MIPSEB) /* BFD wants "bsd" instead of "newsos". Perhaps BFD should be changed, I don't know.... */ printf ("mips-sony-bsd\n"); exit (0); #else #include printf ("m68k-sony-newsos%s\n", #ifdef NEWSOS4 "4" #else "" #endif ); exit (0); #endif #endif #if defined (__arm) && defined (__acorn) && defined (__unix) printf ("arm-acorn-riscix\n"); exit (0); #endif #if defined (hp300) && !defined (hpux) printf ("m68k-hp-bsd\n"); exit (0); #endif #if defined (NeXT) #if !defined (__ARCHITECTURE__) #define __ARCHITECTURE__ "m68k" #endif int version; version=`(hostinfo | sed -n 's/.*NeXT Mach \([0-9]*\).*/\1/p') 2>/dev/null`; if (version < 4) printf ("%s-next-nextstep%d\n", __ARCHITECTURE__, version); else printf ("%s-next-openstep%d\n", __ARCHITECTURE__, version); exit (0); #endif #if defined (MULTIMAX) || defined (n16) #if defined (UMAXV) printf ("ns32k-encore-sysv\n"); exit (0); #else #if defined (CMU) printf ("ns32k-encore-mach\n"); exit (0); #else printf ("ns32k-encore-bsd\n"); exit (0); #endif #endif #endif #if defined (__386BSD__) printf ("i386-pc-bsd\n"); exit (0); #endif #if defined (sequent) #if defined (i386) printf ("i386-sequent-dynix\n"); exit (0); #endif #if defined (ns32000) printf ("ns32k-sequent-dynix\n"); exit (0); #endif #endif #if defined (_SEQUENT_) struct utsname un; uname(&un); if (strncmp(un.version, "V2", 2) == 0) { printf ("i386-sequent-ptx2\n"); exit (0); } if (strncmp(un.version, "V1", 2) == 0) { /* XXX is V1 correct? */ printf ("i386-sequent-ptx1\n"); exit (0); } printf ("i386-sequent-ptx\n"); exit (0); #endif #if defined (vax) # if !defined (ultrix) # include # if defined (BSD) # if BSD == 43 printf ("vax-dec-bsd4.3\n"); exit (0); # else # if BSD == 199006 printf ("vax-dec-bsd4.3reno\n"); exit (0); # else printf ("vax-dec-bsd\n"); exit (0); # endif # endif # else printf ("vax-dec-bsd\n"); exit (0); # endif # else printf ("vax-dec-ultrix\n"); exit (0); # endif #endif #if defined (alliant) && defined (i860) printf ("i860-alliant-bsd\n"); exit (0); #endif exit (1); } EOF $CC_FOR_BUILD -o $dummy $dummy.c 2>/dev/null && SYSTEM_NAME=`$dummy` && { echo "$SYSTEM_NAME"; exit; } # Apollos put the system type in the environment. test -d /usr/apollo && { echo ${ISP}-apollo-${SYSTYPE}; exit; } # Convex versions that predate uname can use getsysinfo(1) if [ -x /usr/convex/getsysinfo ] then case `getsysinfo -f cpu_type` in c1*) echo c1-convex-bsd exit ;; c2*) if getsysinfo -f scalar_acc then echo c32-convex-bsd else echo c2-convex-bsd fi exit ;; c34*) echo c34-convex-bsd exit ;; c38*) echo c38-convex-bsd exit ;; c4*) echo c4-convex-bsd exit ;; esac fi cat >&2 < in order to provide the needed information to handle your system. config.guess timestamp = $timestamp uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null` /bin/uname -X = `(/bin/uname -X) 2>/dev/null` hostinfo = `(hostinfo) 2>/dev/null` /bin/universe = `(/bin/universe) 2>/dev/null` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null` /bin/arch = `(/bin/arch) 2>/dev/null` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null` UNAME_MACHINE = ${UNAME_MACHINE} UNAME_RELEASE = ${UNAME_RELEASE} UNAME_SYSTEM = ${UNAME_SYSTEM} UNAME_VERSION = ${UNAME_VERSION} EOF exit 1 # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: freeipmi-1.6.4/config/config.sub0000755002055400205540000010531513527342443016516 0ustar00achuachu00000000000000#! /bin/sh # Configuration validation subroutine script. # Copyright 1992-2013 Free Software Foundation, Inc. timestamp='2013-04-24' # This file is free software; you can redistribute it and/or modify it # under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, see . # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that # program. This Exception is an additional permission under section 7 # of the GNU General Public License, version 3 ("GPLv3"). # Please send patches with a ChangeLog entry to config-patches@gnu.org. # # Configuration subroutine to validate and canonicalize a configuration type. # Supply the specified configuration type as an argument. # If it is invalid, we print an error message on stderr and exit with code 1. # Otherwise, we print the canonical config type on stdout and succeed. # You can get the latest version of this script from: # http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD # This file is supposed to be the same for all GNU packages # and recognize all the CPU types, system types and aliases # that are meaningful with *any* GNU software. # Each package is responsible for reporting which valid configurations # it does not support. The user should be able to distinguish # a failure to support a valid configuration from a meaningless # configuration. # The goal of this file is to map all the various variations of a given # machine specification into a single specification in the form: # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM # or in some cases, the newer four-part form: # CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM # It is wrong to echo any other type of specification. me=`echo "$0" | sed -e 's,.*/,,'` usage="\ Usage: $0 [OPTION] CPU-MFR-OPSYS $0 [OPTION] ALIAS Canonicalize a configuration name. Operation modes: -h, --help print this help, then exit -t, --time-stamp print date of last modification, then exit -v, --version print version number, then exit Report bugs and patches to ." version="\ GNU config.sub ($timestamp) Copyright 1992-2013 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE." help=" Try \`$me --help' for more information." # Parse command line while test $# -gt 0 ; do case $1 in --time-stamp | --time* | -t ) echo "$timestamp" ; exit ;; --version | -v ) echo "$version" ; exit ;; --help | --h* | -h ) echo "$usage"; exit ;; -- ) # Stop option processing shift; break ;; - ) # Use stdin as input. break ;; -* ) echo "$me: invalid option $1$help" exit 1 ;; *local*) # First pass through any local machine types. echo $1 exit ;; * ) break ;; esac done case $# in 0) echo "$me: missing argument$help" >&2 exit 1;; 1) ;; *) echo "$me: too many arguments$help" >&2 exit 1;; esac # Separate what the user gave into CPU-COMPANY and OS or KERNEL-OS (if any). # Here we must recognize all the valid KERNEL-OS combinations. maybe_os=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\2/'` case $maybe_os in nto-qnx* | linux-gnu* | linux-android* | linux-dietlibc | linux-newlib* | \ linux-musl* | linux-uclibc* | uclinux-uclibc* | uclinux-gnu* | kfreebsd*-gnu* | \ knetbsd*-gnu* | netbsd*-gnu* | \ kopensolaris*-gnu* | \ storm-chaos* | os2-emx* | rtmk-nova*) os=-$maybe_os basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'` ;; android-linux) os=-linux-android basic_machine=`echo $1 | sed 's/^\(.*\)-\([^-]*-[^-]*\)$/\1/'`-unknown ;; *) basic_machine=`echo $1 | sed 's/-[^-]*$//'` if [ $basic_machine != $1 ] then os=`echo $1 | sed 's/.*-/-/'` else os=; fi ;; esac ### Let's recognize common machines as not being operating systems so ### that things like config.sub decstation-3100 work. We also ### recognize some manufacturers as not being operating systems, so we ### can provide default operating systems below. case $os in -sun*os*) # Prevent following clause from handling this invalid input. ;; -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \ -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \ -unicom* | -ibm* | -next | -hp | -isi* | -apollo | -altos* | \ -convergent* | -ncr* | -news | -32* | -3600* | -3100* | -hitachi* |\ -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \ -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp | \ -apple | -axis | -knuth | -cray | -microblaze*) os= basic_machine=$1 ;; -bluegene*) os=-cnk ;; -sim | -cisco | -oki | -wec | -winbond) os= basic_machine=$1 ;; -scout) ;; -wrs) os=-vxworks basic_machine=$1 ;; -chorusos*) os=-chorusos basic_machine=$1 ;; -chorusrdb) os=-chorusrdb basic_machine=$1 ;; -hiux*) os=-hiuxwe2 ;; -sco6) os=-sco5v6 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5) os=-sco3.2v5 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco4) os=-sco3.2v4 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2.[4-9]*) os=`echo $os | sed -e 's/sco3.2./sco3.2v/'` basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco3.2v[4-9]*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco5v6*) # Don't forget version if it is 3.2v4 or newer. basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -sco*) os=-sco3.2v2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -udk*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -isc) os=-isc2.2 basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -clix*) basic_machine=clipper-intergraph ;; -isc*) basic_machine=`echo $1 | sed -e 's/86-.*/86-pc/'` ;; -lynx*178) os=-lynxos178 ;; -lynx*5) os=-lynxos5 ;; -lynx*) os=-lynxos ;; -ptx*) basic_machine=`echo $1 | sed -e 's/86-.*/86-sequent/'` ;; -windowsnt*) os=`echo $os | sed -e 's/windowsnt/winnt/'` ;; -psos*) os=-psos ;; -mint | -mint[0-9]*) basic_machine=m68k-atari os=-mint ;; esac # Decode aliases for certain CPU-COMPANY combinations. case $basic_machine in # Recognize the basic CPU types without company name. # Some are omitted here because they have special meanings below. 1750a | 580 \ | a29k \ | aarch64 | aarch64_be \ | alpha | alphaev[4-8] | alphaev56 | alphaev6[78] | alphapca5[67] \ | alpha64 | alpha64ev[4-8] | alpha64ev56 | alpha64ev6[78] | alpha64pca5[67] \ | am33_2.0 \ | arc | arceb \ | arm | arm[bl]e | arme[lb] | armv[2-8] | armv[3-8][lb] | armv7[arm] \ | avr | avr32 \ | be32 | be64 \ | bfin \ | c4x | clipper \ | d10v | d30v | dlx | dsp16xx \ | epiphany \ | fido | fr30 | frv \ | h8300 | h8500 | hppa | hppa1.[01] | hppa2.0 | hppa2.0[nw] | hppa64 \ | hexagon \ | i370 | i860 | i960 | ia64 \ | ip2k | iq2000 \ | le32 | le64 \ | lm32 \ | m32c | m32r | m32rle | m68000 | m68k | m88k \ | maxq | mb | microblaze | microblazeel | mcore | mep | metag \ | mips | mipsbe | mipseb | mipsel | mipsle \ | mips16 \ | mips64 | mips64el \ | mips64octeon | mips64octeonel \ | mips64orion | mips64orionel \ | mips64r5900 | mips64r5900el \ | mips64vr | mips64vrel \ | mips64vr4100 | mips64vr4100el \ | mips64vr4300 | mips64vr4300el \ | mips64vr5000 | mips64vr5000el \ | mips64vr5900 | mips64vr5900el \ | mipsisa32 | mipsisa32el \ | mipsisa32r2 | mipsisa32r2el \ | mipsisa64 | mipsisa64el \ | mipsisa64r2 | mipsisa64r2el \ | mipsisa64sb1 | mipsisa64sb1el \ | mipsisa64sr71k | mipsisa64sr71kel \ | mipsr5900 | mipsr5900el \ | mipstx39 | mipstx39el \ | mn10200 | mn10300 \ | moxie \ | mt \ | msp430 \ | nds32 | nds32le | nds32be \ | nios | nios2 | nios2eb | nios2el \ | ns16k | ns32k \ | open8 \ | or1k | or32 \ | pdp10 | pdp11 | pj | pjl \ | powerpc | powerpc64 | powerpc64le | powerpcle \ | pyramid \ | rl78 | rx \ | score \ | sh | sh[1234] | sh[24]a | sh[24]aeb | sh[23]e | sh[34]eb | sheb | shbe | shle | sh[1234]le | sh3ele \ | sh64 | sh64le \ | sparc | sparc64 | sparc64b | sparc64v | sparc86x | sparclet | sparclite \ | sparcv8 | sparcv9 | sparcv9b | sparcv9v \ | spu \ | tahoe | tic4x | tic54x | tic55x | tic6x | tic80 | tron \ | ubicom32 \ | v850 | v850e | v850e1 | v850e2 | v850es | v850e2v3 \ | we32k \ | x86 | xc16x | xstormy16 | xtensa \ | z8k | z80) basic_machine=$basic_machine-unknown ;; c54x) basic_machine=tic54x-unknown ;; c55x) basic_machine=tic55x-unknown ;; c6x) basic_machine=tic6x-unknown ;; m6811 | m68hc11 | m6812 | m68hc12 | m68hcs12x | picochip) basic_machine=$basic_machine-unknown os=-none ;; m88110 | m680[12346]0 | m683?2 | m68360 | m5200 | v70 | w65 | z8k) ;; ms1) basic_machine=mt-unknown ;; strongarm | thumb | xscale) basic_machine=arm-unknown ;; xgate) basic_machine=$basic_machine-unknown os=-none ;; xscaleeb) basic_machine=armeb-unknown ;; xscaleel) basic_machine=armel-unknown ;; # We use `pc' rather than `unknown' # because (1) that's what they normally are, and # (2) the word "unknown" tends to confuse beginning users. i*86 | x86_64) basic_machine=$basic_machine-pc ;; # Object if more than one company name word. *-*-*) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; # Recognize the basic CPU types with company name. 580-* \ | a29k-* \ | aarch64-* | aarch64_be-* \ | alpha-* | alphaev[4-8]-* | alphaev56-* | alphaev6[78]-* \ | alpha64-* | alpha64ev[4-8]-* | alpha64ev56-* | alpha64ev6[78]-* \ | alphapca5[67]-* | alpha64pca5[67]-* | arc-* | arceb-* \ | arm-* | armbe-* | armle-* | armeb-* | armv*-* \ | avr-* | avr32-* \ | be32-* | be64-* \ | bfin-* | bs2000-* \ | c[123]* | c30-* | [cjt]90-* | c4x-* \ | clipper-* | craynv-* | cydra-* \ | d10v-* | d30v-* | dlx-* \ | elxsi-* \ | f30[01]-* | f700-* | fido-* | fr30-* | frv-* | fx80-* \ | h8300-* | h8500-* \ | hppa-* | hppa1.[01]-* | hppa2.0-* | hppa2.0[nw]-* | hppa64-* \ | hexagon-* \ | i*86-* | i860-* | i960-* | ia64-* \ | ip2k-* | iq2000-* \ | le32-* | le64-* \ | lm32-* \ | m32c-* | m32r-* | m32rle-* \ | m68000-* | m680[012346]0-* | m68360-* | m683?2-* | m68k-* \ | m88110-* | m88k-* | maxq-* | mcore-* | metag-* \ | microblaze-* | microblazeel-* \ | mips-* | mipsbe-* | mipseb-* | mipsel-* | mipsle-* \ | mips16-* \ | mips64-* | mips64el-* \ | mips64octeon-* | mips64octeonel-* \ | mips64orion-* | mips64orionel-* \ | mips64r5900-* | mips64r5900el-* \ | mips64vr-* | mips64vrel-* \ | mips64vr4100-* | mips64vr4100el-* \ | mips64vr4300-* | mips64vr4300el-* \ | mips64vr5000-* | mips64vr5000el-* \ | mips64vr5900-* | mips64vr5900el-* \ | mipsisa32-* | mipsisa32el-* \ | mipsisa32r2-* | mipsisa32r2el-* \ | mipsisa64-* | mipsisa64el-* \ | mipsisa64r2-* | mipsisa64r2el-* \ | mipsisa64sb1-* | mipsisa64sb1el-* \ | mipsisa64sr71k-* | mipsisa64sr71kel-* \ | mipsr5900-* | mipsr5900el-* \ | mipstx39-* | mipstx39el-* \ | mmix-* \ | mt-* \ | msp430-* \ | nds32-* | nds32le-* | nds32be-* \ | nios-* | nios2-* | nios2eb-* | nios2el-* \ | none-* | np1-* | ns16k-* | ns32k-* \ | open8-* \ | orion-* \ | pdp10-* | pdp11-* | pj-* | pjl-* | pn-* | power-* \ | powerpc-* | powerpc64-* | powerpc64le-* | powerpcle-* \ | pyramid-* \ | rl78-* | romp-* | rs6000-* | rx-* \ | sh-* | sh[1234]-* | sh[24]a-* | sh[24]aeb-* | sh[23]e-* | sh[34]eb-* | sheb-* | shbe-* \ | shle-* | sh[1234]le-* | sh3ele-* | sh64-* | sh64le-* \ | sparc-* | sparc64-* | sparc64b-* | sparc64v-* | sparc86x-* | sparclet-* \ | sparclite-* \ | sparcv8-* | sparcv9-* | sparcv9b-* | sparcv9v-* | sv1-* | sx?-* \ | tahoe-* \ | tic30-* | tic4x-* | tic54x-* | tic55x-* | tic6x-* | tic80-* \ | tile*-* \ | tron-* \ | ubicom32-* \ | v850-* | v850e-* | v850e1-* | v850es-* | v850e2-* | v850e2v3-* \ | vax-* \ | we32k-* \ | x86-* | x86_64-* | xc16x-* | xps100-* \ | xstormy16-* | xtensa*-* \ | ymp-* \ | z8k-* | z80-*) ;; # Recognize the basic CPU types without company name, with glob match. xtensa*) basic_machine=$basic_machine-unknown ;; # Recognize the various machine names and aliases which stand # for a CPU type and a company and sometimes even an OS. 386bsd) basic_machine=i386-unknown os=-bsd ;; 3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc) basic_machine=m68000-att ;; 3b*) basic_machine=we32k-att ;; a29khif) basic_machine=a29k-amd os=-udi ;; abacus) basic_machine=abacus-unknown ;; adobe68k) basic_machine=m68010-adobe os=-scout ;; alliant | fx80) basic_machine=fx80-alliant ;; altos | altos3068) basic_machine=m68k-altos ;; am29k) basic_machine=a29k-none os=-bsd ;; amd64) basic_machine=x86_64-pc ;; amd64-*) basic_machine=x86_64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; amdahl) basic_machine=580-amdahl os=-sysv ;; amiga | amiga-*) basic_machine=m68k-unknown ;; amigaos | amigados) basic_machine=m68k-unknown os=-amigaos ;; amigaunix | amix) basic_machine=m68k-unknown os=-sysv4 ;; apollo68) basic_machine=m68k-apollo os=-sysv ;; apollo68bsd) basic_machine=m68k-apollo os=-bsd ;; aros) basic_machine=i386-pc os=-aros ;; aux) basic_machine=m68k-apple os=-aux ;; balance) basic_machine=ns32k-sequent os=-dynix ;; blackfin) basic_machine=bfin-unknown os=-linux ;; blackfin-*) basic_machine=bfin-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; bluegene*) basic_machine=powerpc-ibm os=-cnk ;; c54x-*) basic_machine=tic54x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c55x-*) basic_machine=tic55x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c6x-*) basic_machine=tic6x-`echo $basic_machine | sed 's/^[^-]*-//'` ;; c90) basic_machine=c90-cray os=-unicos ;; cegcc) basic_machine=arm-unknown os=-cegcc ;; convex-c1) basic_machine=c1-convex os=-bsd ;; convex-c2) basic_machine=c2-convex os=-bsd ;; convex-c32) basic_machine=c32-convex os=-bsd ;; convex-c34) basic_machine=c34-convex os=-bsd ;; convex-c38) basic_machine=c38-convex os=-bsd ;; cray | j90) basic_machine=j90-cray os=-unicos ;; craynv) basic_machine=craynv-cray os=-unicosmp ;; cr16 | cr16-*) basic_machine=cr16-unknown os=-elf ;; crds | unos) basic_machine=m68k-crds ;; crisv32 | crisv32-* | etraxfs*) basic_machine=crisv32-axis ;; cris | cris-* | etrax*) basic_machine=cris-axis ;; crx) basic_machine=crx-unknown os=-elf ;; da30 | da30-*) basic_machine=m68k-da30 ;; decstation | decstation-3100 | pmax | pmax-* | pmin | dec3100 | decstatn) basic_machine=mips-dec ;; decsystem10* | dec10*) basic_machine=pdp10-dec os=-tops10 ;; decsystem20* | dec20*) basic_machine=pdp10-dec os=-tops20 ;; delta | 3300 | motorola-3300 | motorola-delta \ | 3300-motorola | delta-motorola) basic_machine=m68k-motorola ;; delta88) basic_machine=m88k-motorola os=-sysv3 ;; dicos) basic_machine=i686-pc os=-dicos ;; djgpp) basic_machine=i586-pc os=-msdosdjgpp ;; dpx20 | dpx20-*) basic_machine=rs6000-bull os=-bosx ;; dpx2* | dpx2*-bull) basic_machine=m68k-bull os=-sysv3 ;; ebmon29k) basic_machine=a29k-amd os=-ebmon ;; elxsi) basic_machine=elxsi-elxsi os=-bsd ;; encore | umax | mmax) basic_machine=ns32k-encore ;; es1800 | OSE68k | ose68k | ose | OSE) basic_machine=m68k-ericsson os=-ose ;; fx2800) basic_machine=i860-alliant ;; genix) basic_machine=ns32k-ns ;; gmicro) basic_machine=tron-gmicro os=-sysv ;; go32) basic_machine=i386-pc os=-go32 ;; h3050r* | hiux*) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; h8300hms) basic_machine=h8300-hitachi os=-hms ;; h8300xray) basic_machine=h8300-hitachi os=-xray ;; h8500hms) basic_machine=h8500-hitachi os=-hms ;; harris) basic_machine=m88k-harris os=-sysv3 ;; hp300-*) basic_machine=m68k-hp ;; hp300bsd) basic_machine=m68k-hp os=-bsd ;; hp300hpux) basic_machine=m68k-hp os=-hpux ;; hp3k9[0-9][0-9] | hp9[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k2[0-9][0-9] | hp9k31[0-9]) basic_machine=m68000-hp ;; hp9k3[2-9][0-9]) basic_machine=m68k-hp ;; hp9k6[0-9][0-9] | hp6[0-9][0-9]) basic_machine=hppa1.0-hp ;; hp9k7[0-79][0-9] | hp7[0-79][0-9]) basic_machine=hppa1.1-hp ;; hp9k78[0-9] | hp78[0-9]) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[67]1 | hp8[67]1 | hp9k80[24] | hp80[24] | hp9k8[78]9 | hp8[78]9 | hp9k893 | hp893) # FIXME: really hppa2.0-hp basic_machine=hppa1.1-hp ;; hp9k8[0-9][13679] | hp8[0-9][13679]) basic_machine=hppa1.1-hp ;; hp9k8[0-9][0-9] | hp8[0-9][0-9]) basic_machine=hppa1.0-hp ;; hppa-next) os=-nextstep3 ;; hppaosf) basic_machine=hppa1.1-hp os=-osf ;; hppro) basic_machine=hppa1.1-hp os=-proelf ;; i370-ibm* | ibm*) basic_machine=i370-ibm ;; i*86v32) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv32 ;; i*86v4*) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv4 ;; i*86v) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-sysv ;; i*86sol2) basic_machine=`echo $1 | sed -e 's/86.*/86-pc/'` os=-solaris2 ;; i386mach) basic_machine=i386-mach os=-mach ;; i386-vsta | vsta) basic_machine=i386-unknown os=-vsta ;; iris | iris4d) basic_machine=mips-sgi case $os in -irix*) ;; *) os=-irix4 ;; esac ;; isi68 | isi) basic_machine=m68k-isi os=-sysv ;; m68knommu) basic_machine=m68k-unknown os=-linux ;; m68knommu-*) basic_machine=m68k-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; m88k-omron*) basic_machine=m88k-omron ;; magnum | m3230) basic_machine=mips-mips os=-sysv ;; merlin) basic_machine=ns32k-utek os=-sysv ;; microblaze*) basic_machine=microblaze-xilinx ;; mingw64) basic_machine=x86_64-pc os=-mingw64 ;; mingw32) basic_machine=i386-pc os=-mingw32 ;; mingw32ce) basic_machine=arm-unknown os=-mingw32ce ;; miniframe) basic_machine=m68000-convergent ;; *mint | -mint[0-9]* | *MiNT | *MiNT[0-9]*) basic_machine=m68k-atari os=-mint ;; mips3*-*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'` ;; mips3*) basic_machine=`echo $basic_machine | sed -e 's/mips3/mips64/'`-unknown ;; monitor) basic_machine=m68k-rom68k os=-coff ;; morphos) basic_machine=powerpc-unknown os=-morphos ;; msdos) basic_machine=i386-pc os=-msdos ;; ms1-*) basic_machine=`echo $basic_machine | sed -e 's/ms1-/mt-/'` ;; msys) basic_machine=i386-pc os=-msys ;; mvs) basic_machine=i370-ibm os=-mvs ;; nacl) basic_machine=le32-unknown os=-nacl ;; ncr3000) basic_machine=i486-ncr os=-sysv4 ;; netbsd386) basic_machine=i386-unknown os=-netbsd ;; netwinder) basic_machine=armv4l-rebel os=-linux ;; news | news700 | news800 | news900) basic_machine=m68k-sony os=-newsos ;; news1000) basic_machine=m68030-sony os=-newsos ;; news-3600 | risc-news) basic_machine=mips-sony os=-newsos ;; necv70) basic_machine=v70-nec os=-sysv ;; next | m*-next ) basic_machine=m68k-next case $os in -nextstep* ) ;; -ns2*) os=-nextstep2 ;; *) os=-nextstep3 ;; esac ;; nh3000) basic_machine=m68k-harris os=-cxux ;; nh[45]000) basic_machine=m88k-harris os=-cxux ;; nindy960) basic_machine=i960-intel os=-nindy ;; mon960) basic_machine=i960-intel os=-mon960 ;; nonstopux) basic_machine=mips-compaq os=-nonstopux ;; np1) basic_machine=np1-gould ;; neo-tandem) basic_machine=neo-tandem ;; nse-tandem) basic_machine=nse-tandem ;; nsr-tandem) basic_machine=nsr-tandem ;; op50n-* | op60c-*) basic_machine=hppa1.1-oki os=-proelf ;; openrisc | openrisc-*) basic_machine=or32-unknown ;; os400) basic_machine=powerpc-ibm os=-os400 ;; OSE68000 | ose68000) basic_machine=m68000-ericsson os=-ose ;; os68k) basic_machine=m68k-none os=-os68k ;; pa-hitachi) basic_machine=hppa1.1-hitachi os=-hiuxwe2 ;; paragon) basic_machine=i860-intel os=-osf ;; parisc) basic_machine=hppa-unknown os=-linux ;; parisc-*) basic_machine=hppa-`echo $basic_machine | sed 's/^[^-]*-//'` os=-linux ;; pbd) basic_machine=sparc-tti ;; pbb) basic_machine=m68k-tti ;; pc532 | pc532-*) basic_machine=ns32k-pc532 ;; pc98) basic_machine=i386-pc ;; pc98-*) basic_machine=i386-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium | p5 | k5 | k6 | nexgen | viac3) basic_machine=i586-pc ;; pentiumpro | p6 | 6x86 | athlon | athlon_*) basic_machine=i686-pc ;; pentiumii | pentium2 | pentiumiii | pentium3) basic_machine=i686-pc ;; pentium4) basic_machine=i786-pc ;; pentium-* | p5-* | k5-* | k6-* | nexgen-* | viac3-*) basic_machine=i586-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumpro-* | p6-* | 6x86-* | athlon-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentiumii-* | pentium2-* | pentiumiii-* | pentium3-*) basic_machine=i686-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pentium4-*) basic_machine=i786-`echo $basic_machine | sed 's/^[^-]*-//'` ;; pn) basic_machine=pn-gould ;; power) basic_machine=power-ibm ;; ppc | ppcbe) basic_machine=powerpc-unknown ;; ppc-* | ppcbe-*) basic_machine=powerpc-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppcle | powerpclittle | ppc-le | powerpc-little) basic_machine=powerpcle-unknown ;; ppcle-* | powerpclittle-*) basic_machine=powerpcle-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64) basic_machine=powerpc64-unknown ;; ppc64-* | ppc64p7-*) basic_machine=powerpc64-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ppc64le | powerpc64little | ppc64-le | powerpc64-little) basic_machine=powerpc64le-unknown ;; ppc64le-* | powerpc64little-*) basic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'` ;; ps2) basic_machine=i386-ibm ;; pw32) basic_machine=i586-unknown os=-pw32 ;; rdos | rdos64) basic_machine=x86_64-pc os=-rdos ;; rdos32) basic_machine=i386-pc os=-rdos ;; rom68k) basic_machine=m68k-rom68k os=-coff ;; rm[46]00) basic_machine=mips-siemens ;; rtpc | rtpc-*) basic_machine=romp-ibm ;; s390 | s390-*) basic_machine=s390-ibm ;; s390x | s390x-*) basic_machine=s390x-ibm ;; sa29200) basic_machine=a29k-amd os=-udi ;; sb1) basic_machine=mipsisa64sb1-unknown ;; sb1el) basic_machine=mipsisa64sb1el-unknown ;; sde) basic_machine=mipsisa32-sde os=-elf ;; sei) basic_machine=mips-sei os=-seiux ;; sequent) basic_machine=i386-sequent ;; sh) basic_machine=sh-hitachi os=-hms ;; sh5el) basic_machine=sh5le-unknown ;; sh64) basic_machine=sh64-unknown ;; sparclite-wrs | simso-wrs) basic_machine=sparclite-wrs os=-vxworks ;; sps7) basic_machine=m68k-bull os=-sysv2 ;; spur) basic_machine=spur-unknown ;; st2000) basic_machine=m68k-tandem ;; stratus) basic_machine=i860-stratus os=-sysv4 ;; strongarm-* | thumb-*) basic_machine=arm-`echo $basic_machine | sed 's/^[^-]*-//'` ;; sun2) basic_machine=m68000-sun ;; sun2os3) basic_machine=m68000-sun os=-sunos3 ;; sun2os4) basic_machine=m68000-sun os=-sunos4 ;; sun3os3) basic_machine=m68k-sun os=-sunos3 ;; sun3os4) basic_machine=m68k-sun os=-sunos4 ;; sun4os3) basic_machine=sparc-sun os=-sunos3 ;; sun4os4) basic_machine=sparc-sun os=-sunos4 ;; sun4sol2) basic_machine=sparc-sun os=-solaris2 ;; sun3 | sun3-*) basic_machine=m68k-sun ;; sun4) basic_machine=sparc-sun ;; sun386 | sun386i | roadrunner) basic_machine=i386-sun ;; sv1) basic_machine=sv1-cray os=-unicos ;; symmetry) basic_machine=i386-sequent os=-dynix ;; t3e) basic_machine=alphaev5-cray os=-unicos ;; t90) basic_machine=t90-cray os=-unicos ;; tile*) basic_machine=$basic_machine-unknown os=-linux-gnu ;; tx39) basic_machine=mipstx39-unknown ;; tx39el) basic_machine=mipstx39el-unknown ;; toad1) basic_machine=pdp10-xkl os=-tops20 ;; tower | tower-32) basic_machine=m68k-ncr ;; tpf) basic_machine=s390x-ibm os=-tpf ;; udi29k) basic_machine=a29k-amd os=-udi ;; ultra3) basic_machine=a29k-nyu os=-sym1 ;; v810 | necv810) basic_machine=v810-nec os=-none ;; vaxv) basic_machine=vax-dec os=-sysv ;; vms) basic_machine=vax-dec os=-vms ;; vpp*|vx|vx-*) basic_machine=f301-fujitsu ;; vxworks960) basic_machine=i960-wrs os=-vxworks ;; vxworks68) basic_machine=m68k-wrs os=-vxworks ;; vxworks29k) basic_machine=a29k-wrs os=-vxworks ;; w65*) basic_machine=w65-wdc os=-none ;; w89k-*) basic_machine=hppa1.1-winbond os=-proelf ;; xbox) basic_machine=i686-pc os=-mingw32 ;; xps | xps100) basic_machine=xps100-honeywell ;; xscale-* | xscalee[bl]-*) basic_machine=`echo $basic_machine | sed 's/^xscale/arm/'` ;; ymp) basic_machine=ymp-cray os=-unicos ;; z8k-*-coff) basic_machine=z8k-unknown os=-sim ;; z80-*-coff) basic_machine=z80-unknown os=-sim ;; none) basic_machine=none-none os=-none ;; # Here we handle the default manufacturer of certain CPU types. It is in # some cases the only manufacturer, in others, it is the most popular. w89k) basic_machine=hppa1.1-winbond ;; op50n) basic_machine=hppa1.1-oki ;; op60c) basic_machine=hppa1.1-oki ;; romp) basic_machine=romp-ibm ;; mmix) basic_machine=mmix-knuth ;; rs6000) basic_machine=rs6000-ibm ;; vax) basic_machine=vax-dec ;; pdp10) # there are many clones, so DEC is not a safe bet basic_machine=pdp10-unknown ;; pdp11) basic_machine=pdp11-dec ;; we32k) basic_machine=we32k-att ;; sh[1234] | sh[24]a | sh[24]aeb | sh[34]eb | sh[1234]le | sh[23]ele) basic_machine=sh-unknown ;; sparc | sparcv8 | sparcv9 | sparcv9b | sparcv9v) basic_machine=sparc-sun ;; cydra) basic_machine=cydra-cydrome ;; orion) basic_machine=orion-highlevel ;; orion105) basic_machine=clipper-highlevel ;; mac | mpw | mac-mpw) basic_machine=m68k-apple ;; pmac | pmac-mpw) basic_machine=powerpc-apple ;; *-unknown) # Make sure to match an already-canonicalized machine name. ;; *) echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2 exit 1 ;; esac # Here we canonicalize certain aliases for manufacturers. case $basic_machine in *-digital*) basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'` ;; *-commodore*) basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'` ;; *) ;; esac # Decode manufacturer-specific aliases for certain operating systems. if [ x"$os" != x"" ] then case $os in # First match some system type aliases # that might get confused with valid system types. # -solaris* is a basic system type, with this one exception. -auroraux) os=-auroraux ;; -solaris1 | -solaris1.*) os=`echo $os | sed -e 's|solaris1|sunos4|'` ;; -solaris) os=-solaris2 ;; -svr4*) os=-sysv4 ;; -unixware*) os=-sysv4.2uw ;; -gnu/linux*) os=`echo $os | sed -e 's|gnu/linux|linux-gnu|'` ;; # First accept the basic system types. # The portable systems comes first. # Each alternative MUST END IN A *, to match a version number. # -sysv* is not here because it comes later, after sysvr4. -gnu* | -bsd* | -mach* | -minix* | -genix* | -ultrix* | -irix* \ | -*vms* | -sco* | -esix* | -isc* | -aix* | -cnk* | -sunos | -sunos[34]*\ | -hpux* | -unos* | -osf* | -luna* | -dgux* | -auroraux* | -solaris* \ | -sym* | -kopensolaris* | -plan9* \ | -amigaos* | -amigados* | -msdos* | -newsos* | -unicos* | -aof* \ | -aos* | -aros* \ | -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \ | -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \ | -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \ | -bitrig* | -openbsd* | -solidbsd* \ | -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \ | -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \ | -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \ | -udi* | -eabi* | -lites* | -ieee* | -go32* | -aux* \ | -chorusos* | -chorusrdb* | -cegcc* \ | -cygwin* | -msys* | -pe* | -psos* | -moss* | -proelf* | -rtems* \ | -mingw32* | -mingw64* | -linux-gnu* | -linux-android* \ | -linux-newlib* | -linux-musl* | -linux-uclibc* \ | -uxpv* | -beos* | -mpeix* | -udk* \ | -interix* | -uwin* | -mks* | -rhapsody* | -darwin* | -opened* \ | -openstep* | -oskit* | -conix* | -pw32* | -nonstopux* \ | -storm-chaos* | -tops10* | -tenex* | -tops20* | -its* \ | -os2* | -vos* | -palmos* | -uclinux* | -nucleus* \ | -morphos* | -superux* | -rtmk* | -rtmk-nova* | -windiss* \ | -powermax* | -dnix* | -nx6 | -nx7 | -sei* | -dragonfly* \ | -skyos* | -haiku* | -rdos* | -toppers* | -drops* | -es*) # Remember, each alternative MUST END IN *, to match a version number. ;; -qnx*) case $basic_machine in x86-* | i*86-*) ;; *) os=-nto$os ;; esac ;; -nto-qnx*) ;; -nto*) os=`echo $os | sed -e 's|nto|nto-qnx|'` ;; -sim | -es1800* | -hms* | -xray | -os68k* | -none* | -v88r* \ | -windows* | -osx | -abug | -netware* | -os9* | -beos* | -haiku* \ | -macos* | -mpw* | -magic* | -mmixware* | -mon960* | -lnews*) ;; -mac*) os=`echo $os | sed -e 's|mac|macos|'` ;; -linux-dietlibc) os=-linux-dietlibc ;; -linux*) os=`echo $os | sed -e 's|linux|linux-gnu|'` ;; -sunos5*) os=`echo $os | sed -e 's|sunos5|solaris2|'` ;; -sunos6*) os=`echo $os | sed -e 's|sunos6|solaris3|'` ;; -opened*) os=-openedition ;; -os400*) os=-os400 ;; -wince*) os=-wince ;; -osfrose*) os=-osfrose ;; -osf*) os=-osf ;; -utek*) os=-bsd ;; -dynix*) os=-bsd ;; -acis*) os=-aos ;; -atheos*) os=-atheos ;; -syllable*) os=-syllable ;; -386bsd) os=-bsd ;; -ctix* | -uts*) os=-sysv ;; -nova*) os=-rtmk-nova ;; -ns2 ) os=-nextstep2 ;; -nsk*) os=-nsk ;; # Preserve the version number of sinix5. -sinix5.*) os=`echo $os | sed -e 's|sinix|sysv|'` ;; -sinix*) os=-sysv4 ;; -tpf*) os=-tpf ;; -triton*) os=-sysv3 ;; -oss*) os=-sysv3 ;; -svr4) os=-sysv4 ;; -svr3) os=-sysv3 ;; -sysvr4) os=-sysv4 ;; # This must come after -sysvr4. -sysv*) ;; -ose*) os=-ose ;; -es1800*) os=-ose ;; -xenix) os=-xenix ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) os=-mint ;; -aros*) os=-aros ;; -zvmoe) os=-zvmoe ;; -dicos*) os=-dicos ;; -nacl*) ;; -none) ;; *) # Get rid of the `-' at the beginning of $os. os=`echo $os | sed 's/[^-]*-//'` echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2 exit 1 ;; esac else # Here we handle the default operating systems that come with various machines. # The value should be what the vendor currently ships out the door with their # machine or put another way, the most popular os provided with the machine. # Note that if you're going to try to match "-MANUFACTURER" here (say, # "-sun"), then you have to tell the case statement up towards the top # that MANUFACTURER isn't an operating system. Otherwise, code above # will signal an error saying that MANUFACTURER isn't an operating # system, and we'll never get to this point. case $basic_machine in score-*) os=-elf ;; spu-*) os=-elf ;; *-acorn) os=-riscix1.2 ;; arm*-rebel) os=-linux ;; arm*-semi) os=-aout ;; c4x-* | tic4x-*) os=-coff ;; hexagon-*) os=-elf ;; tic54x-*) os=-coff ;; tic55x-*) os=-coff ;; tic6x-*) os=-coff ;; # This must come before the *-dec entry. pdp10-*) os=-tops20 ;; pdp11-*) os=-none ;; *-dec | vax-*) os=-ultrix4.2 ;; m68*-apollo) os=-domain ;; i386-sun) os=-sunos4.0.2 ;; m68000-sun) os=-sunos3 ;; m68*-cisco) os=-aout ;; mep-*) os=-elf ;; mips*-cisco) os=-elf ;; mips*-*) os=-elf ;; or1k-*) os=-elf ;; or32-*) os=-coff ;; *-tti) # must be before sparc entry or we get the wrong os. os=-sysv3 ;; sparc-* | *-sun) os=-sunos4.1.1 ;; *-be) os=-beos ;; *-haiku) os=-haiku ;; *-ibm) os=-aix ;; *-knuth) os=-mmixware ;; *-wec) os=-proelf ;; *-winbond) os=-proelf ;; *-oki) os=-proelf ;; *-hp) os=-hpux ;; *-hitachi) os=-hiux ;; i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent) os=-sysv ;; *-cbm) os=-amigaos ;; *-dg) os=-dgux ;; *-dolphin) os=-sysv3 ;; m68k-ccur) os=-rtu ;; m88k-omron*) os=-luna ;; *-next ) os=-nextstep ;; *-sequent) os=-ptx ;; *-crds) os=-unos ;; *-ns) os=-genix ;; i370-*) os=-mvs ;; *-next) os=-nextstep3 ;; *-gould) os=-sysv ;; *-highlevel) os=-bsd ;; *-encore) os=-bsd ;; *-sgi) os=-irix ;; *-siemens) os=-sysv4 ;; *-masscomp) os=-rtu ;; f30[01]-fujitsu | f700-fujitsu) os=-uxpv ;; *-rom68k) os=-coff ;; *-*bug) os=-coff ;; *-apple) os=-macos ;; *-atari*) os=-mint ;; *) os=-none ;; esac fi # Here we handle the case where we know the os, and the CPU type, but not the # manufacturer. We pick the logical manufacturer. vendor=unknown case $basic_machine in *-unknown) case $os in -riscix*) vendor=acorn ;; -sunos*) vendor=sun ;; -cnk*|-aix*) vendor=ibm ;; -beos*) vendor=be ;; -hpux*) vendor=hp ;; -mpeix*) vendor=hp ;; -hiux*) vendor=hitachi ;; -unos*) vendor=crds ;; -dgux*) vendor=dg ;; -luna*) vendor=omron ;; -genix*) vendor=ns ;; -mvs* | -opened*) vendor=ibm ;; -os400*) vendor=ibm ;; -ptx*) vendor=sequent ;; -tpf*) vendor=ibm ;; -vxsim* | -vxworks* | -windiss*) vendor=wrs ;; -aux*) vendor=apple ;; -hms*) vendor=hitachi ;; -mpw* | -macos*) vendor=apple ;; -*mint | -mint[0-9]* | -*MiNT | -MiNT[0-9]*) vendor=atari ;; -vos*) vendor=stratus ;; esac basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"` ;; esac echo $basic_machine$os exit # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "timestamp='" # time-stamp-format: "%:y-%02m-%02d" # time-stamp-end: "'" # End: freeipmi-1.6.4/config/install-sh0000755002055400205540000003325513527342443016542 0ustar00achuachu00000000000000#!/bin/sh # install - install a program, script, or datafile scriptversion=2011-11-20.07; # UTC # This originates from X11R5 (mit/util/scripts/install.sh), which was # later released in X11R6 (xc/config/util/install.sh) with the # following copyright and license. # # Copyright (C) 1994 X Consortium # # 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 # X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN # AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNEC- # TION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # # Except as contained in this notice, the name of the X Consortium shall not # be used in advertising or otherwise to promote the sale, use or other deal- # ings in this Software without prior written authorization from the X Consor- # tium. # # # FSF changes to this file are in the public domain. # # Calling this script install-sh is preferred over install.sh, to prevent # 'make' implicit rules from creating a file called install from it # when there is no Makefile. # # This script is compatible with the BSD install script, but was written # from scratch. nl=' ' IFS=" "" $nl" # set DOITPROG to echo to test this script # Don't use :- since 4.3BSD and earlier shells don't like it. doit=${DOITPROG-} if test -z "$doit"; then doit_exec=exec else doit_exec=$doit fi # Put in absolute file names if you don't have them in your path; # or use environment vars. chgrpprog=${CHGRPPROG-chgrp} chmodprog=${CHMODPROG-chmod} chownprog=${CHOWNPROG-chown} cmpprog=${CMPPROG-cmp} cpprog=${CPPROG-cp} mkdirprog=${MKDIRPROG-mkdir} mvprog=${MVPROG-mv} rmprog=${RMPROG-rm} stripprog=${STRIPPROG-strip} posix_glob='?' initialize_posix_glob=' test "$posix_glob" != "?" || { if (set -f) 2>/dev/null; then posix_glob= else posix_glob=: fi } ' posix_mkdir= # Desired mode of installed file. mode=0755 chgrpcmd= chmodcmd=$chmodprog chowncmd= mvcmd=$mvprog rmcmd="$rmprog -f" stripcmd= src= dst= dir_arg= dst_arg= copy_on_change=false no_target_directory= usage="\ Usage: $0 [OPTION]... [-T] SRCFILE DSTFILE or: $0 [OPTION]... SRCFILES... DIRECTORY or: $0 [OPTION]... -t DIRECTORY SRCFILES... or: $0 [OPTION]... -d DIRECTORIES... In the 1st form, copy SRCFILE to DSTFILE. In the 2nd and 3rd, copy all SRCFILES to DIRECTORY. In the 4th, create DIRECTORIES. Options: --help display this help and exit. --version display version info and exit. -c (ignored) -C install only if different (preserve the last data modification time) -d create directories instead of installing files. -g GROUP $chgrpprog installed files to GROUP. -m MODE $chmodprog installed files to MODE. -o USER $chownprog installed files to USER. -s $stripprog installed files. -t DIRECTORY install into DIRECTORY. -T report an error if DSTFILE is a directory. Environment variables override the default commands: CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG RMPROG STRIPPROG " while test $# -ne 0; do case $1 in -c) ;; -C) copy_on_change=true;; -d) dir_arg=true;; -g) chgrpcmd="$chgrpprog $2" shift;; --help) echo "$usage"; exit $?;; -m) mode=$2 case $mode in *' '* | *' '* | *' '* | *'*'* | *'?'* | *'['*) echo "$0: invalid mode: $mode" >&2 exit 1;; esac shift;; -o) chowncmd="$chownprog $2" shift;; -s) stripcmd=$stripprog;; -t) dst_arg=$2 # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac shift;; -T) no_target_directory=true;; --version) echo "$0 $scriptversion"; exit $?;; --) shift break;; -*) echo "$0: invalid option: $1" >&2 exit 1;; *) break;; esac shift done if test $# -ne 0 && test -z "$dir_arg$dst_arg"; then # When -d is used, all remaining arguments are directories to create. # When -t is used, the destination is already specified. # Otherwise, the last argument is the destination. Remove it from $@. for arg do if test -n "$dst_arg"; then # $@ is not empty: it contains at least $arg. set fnord "$@" "$dst_arg" shift # fnord fi shift # arg dst_arg=$arg # Protect names problematic for 'test' and other utilities. case $dst_arg in -* | [=\(\)!]) dst_arg=./$dst_arg;; esac done fi if test $# -eq 0; then if test -z "$dir_arg"; then echo "$0: no input file specified." >&2 exit 1 fi # It's OK to call 'install-sh -d' without argument. # This can happen when creating conditional directories. exit 0 fi if test -z "$dir_arg"; then do_exit='(exit $ret); exit $ret' trap "ret=129; $do_exit" 1 trap "ret=130; $do_exit" 2 trap "ret=141; $do_exit" 13 trap "ret=143; $do_exit" 15 # Set umask so as not to create temps with too-generous modes. # However, 'strip' requires both read and write access to temps. case $mode in # Optimize common cases. *644) cp_umask=133;; *755) cp_umask=22;; *[0-7]) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw='% 200' fi cp_umask=`expr '(' 777 - $mode % 1000 ')' $u_plus_rw`;; *) if test -z "$stripcmd"; then u_plus_rw= else u_plus_rw=,u+rw fi cp_umask=$mode$u_plus_rw;; esac fi for src do # Protect names problematic for 'test' and other utilities. case $src in -* | [=\(\)!]) src=./$src;; esac if test -n "$dir_arg"; then dst=$src dstdir=$dst test -d "$dstdir" dstdir_status=$? else # Waiting for this to be detected by the "$cpprog $src $dsttmp" command # might cause directories to be created, which would be especially bad # if $src (and thus $dsttmp) contains '*'. if test ! -f "$src" && test ! -d "$src"; then echo "$0: $src does not exist." >&2 exit 1 fi if test -z "$dst_arg"; then echo "$0: no destination specified." >&2 exit 1 fi dst=$dst_arg # If destination is a directory, append the input filename; won't work # if double slashes aren't ignored. if test -d "$dst"; then if test -n "$no_target_directory"; then echo "$0: $dst_arg: Is a directory" >&2 exit 1 fi dstdir=$dst dst=$dstdir/`basename "$src"` dstdir_status=0 else # Prefer dirname, but fall back on a substitute if dirname fails. dstdir=` (dirname "$dst") 2>/dev/null || expr X"$dst" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$dst" : 'X\(//\)[^/]' \| \ X"$dst" : 'X\(//\)$' \| \ X"$dst" : 'X\(/\)' \| . 2>/dev/null || echo X"$dst" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q' ` test -d "$dstdir" dstdir_status=$? fi fi obsolete_mkdir_used=false if test $dstdir_status != 0; then case $posix_mkdir in '') # Create intermediate dirs using mode 755 as modified by the umask. # This is like FreeBSD 'install' as of 1997-10-28. umask=`umask` case $stripcmd.$umask in # Optimize common cases. *[2367][2367]) mkdir_umask=$umask;; .*0[02][02] | .[02][02] | .[02]) mkdir_umask=22;; *[0-7]) mkdir_umask=`expr $umask + 22 \ - $umask % 100 % 40 + $umask % 20 \ - $umask % 10 % 4 + $umask % 2 `;; *) mkdir_umask=$umask,go-w;; esac # With -d, create the new directory with the user-specified mode. # Otherwise, rely on $mkdir_umask. if test -n "$dir_arg"; then mkdir_mode=-m$mode else mkdir_mode= fi posix_mkdir=false case $umask in *[123567][0-7][0-7]) # POSIX mkdir -p sets u+wx bits regardless of umask, which # is incompatible with FreeBSD 'install' when (umask & 300) != 0. ;; *) tmpdir=${TMPDIR-/tmp}/ins$RANDOM-$$ trap 'ret=$?; rmdir "$tmpdir/d" "$tmpdir" 2>/dev/null; exit $ret' 0 if (umask $mkdir_umask && exec $mkdirprog $mkdir_mode -p -- "$tmpdir/d") >/dev/null 2>&1 then if test -z "$dir_arg" || { # Check for POSIX incompatibilities with -m. # HP-UX 11.23 and IRIX 6.5 mkdir -m -p sets group- or # other-writable bit of parent directory when it shouldn't. # FreeBSD 6.1 mkdir -m -p sets mode of existing directory. ls_ld_tmpdir=`ls -ld "$tmpdir"` case $ls_ld_tmpdir in d????-?r-*) different_mode=700;; d????-?--*) different_mode=755;; *) false;; esac && $mkdirprog -m$different_mode -p -- "$tmpdir" && { ls_ld_tmpdir_1=`ls -ld "$tmpdir"` test "$ls_ld_tmpdir" = "$ls_ld_tmpdir_1" } } then posix_mkdir=: fi rmdir "$tmpdir/d" "$tmpdir" else # Remove any dirs left behind by ancient mkdir implementations. rmdir ./$mkdir_mode ./-p ./-- 2>/dev/null fi trap '' 0;; esac;; esac if $posix_mkdir && ( umask $mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir" ) then : else # The umask is ridiculous, or mkdir does not conform to POSIX, # or it failed possibly due to a race condition. Create the # directory the slow way, step by step, checking for races as we go. case $dstdir in /*) prefix='/';; [-=\(\)!]*) prefix='./';; *) prefix='';; esac eval "$initialize_posix_glob" oIFS=$IFS IFS=/ $posix_glob set -f set fnord $dstdir shift $posix_glob set +f IFS=$oIFS prefixes= for d do test X"$d" = X && continue prefix=$prefix$d if test -d "$prefix"; then prefixes= else if $posix_mkdir; then (umask=$mkdir_umask && $doit_exec $mkdirprog $mkdir_mode -p -- "$dstdir") && break # Don't fail if two instances are running concurrently. test -d "$prefix" || exit 1 else case $prefix in *\'*) qprefix=`echo "$prefix" | sed "s/'/'\\\\\\\\''/g"`;; *) qprefix=$prefix;; esac prefixes="$prefixes '$qprefix'" fi fi prefix=$prefix/ done if test -n "$prefixes"; then # Don't fail if two instances are running concurrently. (umask $mkdir_umask && eval "\$doit_exec \$mkdirprog $prefixes") || test -d "$dstdir" || exit 1 obsolete_mkdir_used=true fi fi fi if test -n "$dir_arg"; then { test -z "$chowncmd" || $doit $chowncmd "$dst"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dst"; } && { test "$obsolete_mkdir_used$chowncmd$chgrpcmd" = false || test -z "$chmodcmd" || $doit $chmodcmd $mode "$dst"; } || exit 1 else # Make a couple of temp file names in the proper directory. dsttmp=$dstdir/_inst.$$_ rmtmp=$dstdir/_rm.$$_ # Trap to clean up those temp files at exit. trap 'ret=$?; rm -f "$dsttmp" "$rmtmp" && exit $ret' 0 # Copy the file name to the temp name. (umask $cp_umask && $doit_exec $cpprog "$src" "$dsttmp") && # and set any options; do chmod last to preserve setuid bits. # # If any of these fail, we abort the whole thing. If we want to # ignore errors from any of these, just make sure not to ignore # errors from the above "$doit $cpprog $src $dsttmp" command. # { test -z "$chowncmd" || $doit $chowncmd "$dsttmp"; } && { test -z "$chgrpcmd" || $doit $chgrpcmd "$dsttmp"; } && { test -z "$stripcmd" || $doit $stripcmd "$dsttmp"; } && { test -z "$chmodcmd" || $doit $chmodcmd $mode "$dsttmp"; } && # If -C, don't bother to copy if it wouldn't change the file. if $copy_on_change && old=`LC_ALL=C ls -dlL "$dst" 2>/dev/null` && new=`LC_ALL=C ls -dlL "$dsttmp" 2>/dev/null` && eval "$initialize_posix_glob" && $posix_glob set -f && set X $old && old=:$2:$4:$5:$6 && set X $new && new=:$2:$4:$5:$6 && $posix_glob set +f && test "$old" = "$new" && $cmpprog "$dst" "$dsttmp" >/dev/null 2>&1 then rm -f "$dsttmp" else # Rename the file to the real destination. $doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null || # The rename failed, perhaps because mv can't rename something else # to itself, or perhaps because mv is so ancient that it does not # support -f. { # Now remove or move aside any old file at destination location. # We try this two ways since rm can't unlink itself on some # systems and the destination file might be busy for other # reasons. In this case, the final cleanup might fail but the new # file should still install successfully. { test ! -f "$dst" || $doit $rmcmd -f "$dst" 2>/dev/null || { $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null && { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; } } || { echo "$0: cannot unlink or rename $dst" >&2 (exit 1); exit 1 } } && # Now rename the file to the real destination. $doit $mvcmd "$dsttmp" "$dst" } fi || exit 1 trap '' 0 fi done # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: freeipmi-1.6.4/config/missing0000755002055400205540000001533113527342443016130 0ustar00achuachu00000000000000#! /bin/sh # Common wrapper for a few potentially missing GNU programs. scriptversion=2012-06-26.16; # UTC # Copyright (C) 1996-2013 Free Software Foundation, Inc. # Originally written by Fran,cois Pinard , 1996. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. if test $# -eq 0; then echo 1>&2 "Try '$0 --help' for more information" exit 1 fi case $1 in --is-lightweight) # Used by our autoconf macros to check whether the available missing # script is modern enough. exit 0 ;; --run) # Back-compat with the calling convention used by older automake. shift ;; -h|--h|--he|--hel|--help) echo "\ $0 [OPTION]... PROGRAM [ARGUMENT]... Run 'PROGRAM [ARGUMENT]...', returning a proper advice when this fails due to PROGRAM being missing or too old. Options: -h, --help display this help and exit -v, --version output version information and exit Supported PROGRAM values: aclocal autoconf autoheader autom4te automake makeinfo bison yacc flex lex help2man Version suffixes to PROGRAM as well as the prefixes 'gnu-', 'gnu', and 'g' are ignored when checking the name. Send bug reports to ." exit $? ;; -v|--v|--ve|--ver|--vers|--versi|--versio|--version) echo "missing $scriptversion (GNU Automake)" exit $? ;; -*) echo 1>&2 "$0: unknown '$1' option" echo 1>&2 "Try '$0 --help' for more information" exit 1 ;; esac # Run the given program, remember its exit status. "$@"; st=$? # If it succeeded, we are done. test $st -eq 0 && exit 0 # Also exit now if we it failed (or wasn't found), and '--version' was # passed; such an option is passed most likely to detect whether the # program is present and works. case $2 in --version|--help) exit $st;; esac # Exit code 63 means version mismatch. This often happens when the user # tries to use an ancient version of a tool on a file that requires a # minimum version. if test $st -eq 63; then msg="probably too old" elif test $st -eq 127; then # Program was missing. msg="missing on your system" else # Program was found and executed, but failed. Give up. exit $st fi perl_URL=http://www.perl.org/ flex_URL=http://flex.sourceforge.net/ gnu_software_URL=http://www.gnu.org/software program_details () { case $1 in aclocal|automake) echo "The '$1' program is part of the GNU Automake package:" echo "<$gnu_software_URL/automake>" echo "It also requires GNU Autoconf, GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/autoconf>" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; autoconf|autom4te|autoheader) echo "The '$1' program is part of the GNU Autoconf package:" echo "<$gnu_software_URL/autoconf/>" echo "It also requires GNU m4 and Perl in order to run:" echo "<$gnu_software_URL/m4/>" echo "<$perl_URL>" ;; esac } give_advice () { # Normalize program name to check for. normalized_program=`echo "$1" | sed ' s/^gnu-//; t s/^gnu//; t s/^g//; t'` printf '%s\n' "'$1' is $msg." configure_deps="'configure.ac' or m4 files included by 'configure.ac'" case $normalized_program in autoconf*) echo "You should only need it if you modified 'configure.ac'," echo "or m4 files included by it." program_details 'autoconf' ;; autoheader*) echo "You should only need it if you modified 'acconfig.h' or" echo "$configure_deps." program_details 'autoheader' ;; automake*) echo "You should only need it if you modified 'Makefile.am' or" echo "$configure_deps." program_details 'automake' ;; aclocal*) echo "You should only need it if you modified 'acinclude.m4' or" echo "$configure_deps." program_details 'aclocal' ;; autom4te*) echo "You might have modified some maintainer files that require" echo "the 'automa4te' program to be rebuilt." program_details 'autom4te' ;; bison*|yacc*) echo "You should only need it if you modified a '.y' file." echo "You may want to install the GNU Bison package:" echo "<$gnu_software_URL/bison/>" ;; lex*|flex*) echo "You should only need it if you modified a '.l' file." echo "You may want to install the Fast Lexical Analyzer package:" echo "<$flex_URL>" ;; help2man*) echo "You should only need it if you modified a dependency" \ "of a man page." echo "You may want to install the GNU Help2man package:" echo "<$gnu_software_URL/help2man/>" ;; makeinfo*) echo "You should only need it if you modified a '.texi' file, or" echo "any other file indirectly affecting the aspect of the manual." echo "You might want to install the Texinfo package:" echo "<$gnu_software_URL/texinfo/>" echo "The spurious makeinfo call might also be the consequence of" echo "using a buggy 'make' (AIX, DU, IRIX), in which case you might" echo "want to install GNU make:" echo "<$gnu_software_URL/make/>" ;; *) echo "You might have modified some files without having the proper" echo "tools for further handling them. Check the 'README' file, it" echo "often tells you about the needed prerequisites for installing" echo "this package. You may also peek at any GNU archive site, in" echo "case some other package contains this missing '$1' program." ;; esac } give_advice "$1" | sed -e '1s/^/WARNING: /' \ -e '2,$s/^/ /' >&2 # Propagate the correct exit status (expected to be 127 for a program # not found, 63 for a program that failed due to version mismatch). exit $st # Local variables: # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: freeipmi-1.6.4/config/ltmain.sh0000644002055400205540000105152213527342441016352 0ustar00achuachu00000000000000 # libtool (GNU libtool) 2.4.2 # Written by Gordon Matzigkeit , 1996 # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, 2006, # 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc. # This is free software; see the source for copying conditions. There is NO # warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. # GNU Libtool is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, # or obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # Usage: $progname [OPTION]... [MODE-ARG]... # # Provide generalized library-building support services. # # --config show all configuration variables # --debug enable verbose shell tracing # -n, --dry-run display commands without modifying any files # --features display basic configuration information and exit # --mode=MODE use operation mode MODE # --preserve-dup-deps don't remove duplicate dependency libraries # --quiet, --silent don't print informational messages # --no-quiet, --no-silent # print informational messages (default) # --no-warn don't display warning messages # --tag=TAG use configuration variables from tag TAG # -v, --verbose print more informational messages than default # --no-verbose don't print the extra informational messages # --version print version information # -h, --help, --help-all print short, long, or detailed help message # # MODE must be one of the following: # # clean remove files from the build directory # compile compile a source file into a libtool object # execute automatically set library path, then run a program # finish complete the installation of libtool libraries # install install libraries or executables # link create a library or an executable # uninstall remove libraries from an installed directory # # MODE-ARGS vary depending on the MODE. When passed as first option, # `--mode=MODE' may be abbreviated as `MODE' or a unique abbreviation of that. # Try `$progname --help --mode=MODE' for a more detailed description of MODE. # # When reporting a bug, please describe a test case to reproduce it and # include the following information: # # host-triplet: $host # shell: $SHELL # compiler: $LTCC # compiler flags: $LTCFLAGS # linker: $LD (gnu? $with_gnu_ld) # $progname: (GNU libtool) 2.4.2 # automake: $automake_version # autoconf: $autoconf_version # # Report bugs to . # GNU libtool home page: . # General help using GNU software: . PROGRAM=libtool PACKAGE=libtool VERSION=2.4.2 TIMESTAMP="" package_revision=1.3337 # Be Bourne compatible if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } # NLS nuisances: We save the old values to restore during execute mode. lt_user_locale= lt_safe_locale= for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${$lt_var+set}\" = set; then save_$lt_var=\$$lt_var $lt_var=C export $lt_var lt_user_locale=\"$lt_var=\\\$save_\$lt_var; \$lt_user_locale\" lt_safe_locale=\"$lt_var=C; \$lt_safe_locale\" fi" done LC_ALL=C LANGUAGE=C export LANGUAGE LC_ALL $lt_unset CDPATH # Work around backward compatibility issue on IRIX 6.5. On IRIX 6.4+, sh # is ksh but when the shell is invoked as "sh" and the current value of # the _XPG environment variable is not equal to 1 (one), the special # positional parameter $0, within a function call, is the name of the # function. progpath="$0" : ${CP="cp -f"} test "${ECHO+set}" = set || ECHO=${as_echo-'printf %s\n'} : ${MAKE="make"} : ${MKDIR="mkdir"} : ${MV="mv -f"} : ${RM="rm -f"} : ${SHELL="${CONFIG_SHELL-/bin/sh}"} : ${Xsed="$SED -e 1s/^X//"} # Global variables: EXIT_SUCCESS=0 EXIT_FAILURE=1 EXIT_MISMATCH=63 # $? = 63 is used to indicate version mismatch to missing. EXIT_SKIP=77 # $? = 77 is used to indicate a skipped test to automake. exit_status=$EXIT_SUCCESS # Make sure IFS has a sensible default lt_nl=' ' IFS=" $lt_nl" dirname="s,/[^/]*$,," basename="s,^.*/,," # func_dirname file append nondir_replacement # Compute the dirname of FILE. If nonempty, add APPEND to the result, # otherwise set result to NONDIR_REPLACEMENT. func_dirname () { func_dirname_result=`$ECHO "${1}" | $SED "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi } # func_dirname may be replaced by extended shell implementation # func_basename file func_basename () { func_basename_result=`$ECHO "${1}" | $SED "$basename"` } # func_basename may be replaced by extended shell implementation # func_dirname_and_basename file append nondir_replacement # perform func_basename and func_dirname in a single function # call: # dirname: Compute the dirname of FILE. If nonempty, # add APPEND to the result, otherwise set result # to NONDIR_REPLACEMENT. # value returned in "$func_dirname_result" # basename: Compute filename of FILE. # value retuned in "$func_basename_result" # Implementation must be kept synchronized with func_dirname # and func_basename. For efficiency, we do not delegate to # those functions but instead duplicate the functionality here. func_dirname_and_basename () { # Extract subdirectory from the argument. func_dirname_result=`$ECHO "${1}" | $SED -e "$dirname"` if test "X$func_dirname_result" = "X${1}"; then func_dirname_result="${3}" else func_dirname_result="$func_dirname_result${2}" fi func_basename_result=`$ECHO "${1}" | $SED -e "$basename"` } # func_dirname_and_basename may be replaced by extended shell implementation # func_stripname prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # func_strip_suffix prefix name func_stripname () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname may be replaced by extended shell implementation # These SED scripts presuppose an absolute path with a trailing slash. pathcar='s,^/\([^/]*\).*$,\1,' pathcdr='s,^/[^/]*,,' removedotparts=':dotsl s@/\./@/@g t dotsl s,/\.$,/,' collapseslashes='s@/\{1,\}@/@g' finalslash='s,/*$,/,' # func_normal_abspath PATH # Remove doubled-up and trailing slashes, "." path components, # and cancel out any ".." path components in PATH after making # it an absolute path. # value returned in "$func_normal_abspath_result" func_normal_abspath () { # Start from root dir and reassemble the path. func_normal_abspath_result= func_normal_abspath_tpath=$1 func_normal_abspath_altnamespace= case $func_normal_abspath_tpath in "") # Empty path, that just means $cwd. func_stripname '' '/' "`pwd`" func_normal_abspath_result=$func_stripname_result return ;; # The next three entries are used to spot a run of precisely # two leading slashes without using negated character classes; # we take advantage of case's first-match behaviour. ///*) # Unusual form of absolute path, do nothing. ;; //*) # Not necessarily an ordinary path; POSIX reserves leading '//' # and for example Cygwin uses it to access remote file shares # over CIFS/SMB, so we conserve a leading double slash if found. func_normal_abspath_altnamespace=/ ;; /*) # Absolute path, do nothing. ;; *) # Relative path, prepend $cwd. func_normal_abspath_tpath=`pwd`/$func_normal_abspath_tpath ;; esac # Cancel out all the simple stuff to save iterations. We also want # the path to end with a slash for ease of parsing, so make sure # there is one (and only one) here. func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$removedotparts" -e "$collapseslashes" -e "$finalslash"` while :; do # Processed it all yet? if test "$func_normal_abspath_tpath" = / ; then # If we ascended to the root using ".." the result may be empty now. if test -z "$func_normal_abspath_result" ; then func_normal_abspath_result=/ fi break fi func_normal_abspath_tcomponent=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcar"` func_normal_abspath_tpath=`$ECHO "$func_normal_abspath_tpath" | $SED \ -e "$pathcdr"` # Figure out what to do with it case $func_normal_abspath_tcomponent in "") # Trailing empty path component, ignore it. ;; ..) # Parent dir; strip last assembled component from result. func_dirname "$func_normal_abspath_result" func_normal_abspath_result=$func_dirname_result ;; *) # Actual path component, append it. func_normal_abspath_result=$func_normal_abspath_result/$func_normal_abspath_tcomponent ;; esac done # Restore leading double-slash if one was found on entry. func_normal_abspath_result=$func_normal_abspath_altnamespace$func_normal_abspath_result } # func_relative_path SRCDIR DSTDIR # generates a relative path from SRCDIR to DSTDIR, with a trailing # slash if non-empty, suitable for immediately appending a filename # without needing to append a separator. # value returned in "$func_relative_path_result" func_relative_path () { func_relative_path_result= func_normal_abspath "$1" func_relative_path_tlibdir=$func_normal_abspath_result func_normal_abspath "$2" func_relative_path_tbindir=$func_normal_abspath_result # Ascend the tree starting from libdir while :; do # check if we have found a prefix of bindir case $func_relative_path_tbindir in $func_relative_path_tlibdir) # found an exact match func_relative_path_tcancelled= break ;; $func_relative_path_tlibdir*) # found a matching prefix func_stripname "$func_relative_path_tlibdir" '' "$func_relative_path_tbindir" func_relative_path_tcancelled=$func_stripname_result if test -z "$func_relative_path_result"; then func_relative_path_result=. fi break ;; *) func_dirname $func_relative_path_tlibdir func_relative_path_tlibdir=${func_dirname_result} if test "x$func_relative_path_tlibdir" = x ; then # Have to descend all the way to the root! func_relative_path_result=../$func_relative_path_result func_relative_path_tcancelled=$func_relative_path_tbindir break fi func_relative_path_result=../$func_relative_path_result ;; esac done # Now calculate path; take care to avoid doubling-up slashes. func_stripname '' '/' "$func_relative_path_result" func_relative_path_result=$func_stripname_result func_stripname '/' '/' "$func_relative_path_tcancelled" if test "x$func_stripname_result" != x ; then func_relative_path_result=${func_relative_path_result}/${func_stripname_result} fi # Normalisation. If bindir is libdir, return empty string, # else relative path ending with a slash; either way, target # file name can be directly appended. if test ! -z "$func_relative_path_result"; then func_stripname './' '' "$func_relative_path_result/" func_relative_path_result=$func_stripname_result fi } # The name of this program: func_dirname_and_basename "$progpath" progname=$func_basename_result # Make sure we have an absolute path for reexecution: case $progpath in [\\/]*|[A-Za-z]:\\*) ;; *[\\/]*) progdir=$func_dirname_result progdir=`cd "$progdir" && pwd` progpath="$progdir/$progname" ;; *) save_IFS="$IFS" IFS=${PATH_SEPARATOR-:} for progdir in $PATH; do IFS="$save_IFS" test -x "$progdir/$progname" && break done IFS="$save_IFS" test -n "$progdir" || progdir=`pwd` progpath="$progdir/$progname" ;; esac # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. Xsed="${SED}"' -e 1s/^X//' sed_quote_subst='s/\([`"$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution that turns a string into a regex matching for the # string literally. sed_make_literal_regex='s,[].[^$\\*\/],\\&,g' # Sed substitution that converts a w32 file name or path # which contains forward slashes, into one that contains # (escaped) backslashes. A very naive implementation. lt_sed_naive_backslashify='s|\\\\*|\\|g;s|/|\\|g;s|\\|\\\\|g' # Re-`\' parameter expansions in output of double_quote_subst that were # `\'-ed in input to the same. If an odd number of `\' preceded a '$' # in input to double_quote_subst, that '$' was protected from expansion. # Since each input `\' is now two `\'s, look for any number of runs of # four `\'s followed by two `\'s and then a '$'. `\' that '$'. bs='\\' bs2='\\\\' bs4='\\\\\\\\' dollar='\$' sed_double_backslash="\ s/$bs4/&\\ /g s/^$bs2$dollar/$bs&/ s/\\([^$bs]\\)$bs2$dollar/\\1$bs2$bs$dollar/g s/\n//g" # Standard options: opt_dry_run=false opt_help=false opt_quiet=false opt_verbose=false opt_warning=: # func_echo arg... # Echo program name prefixed message, along with the current mode # name if it has been set yet. func_echo () { $ECHO "$progname: ${opt_mode+$opt_mode: }$*" } # func_verbose arg... # Echo program name prefixed message in verbose mode only. func_verbose () { $opt_verbose && func_echo ${1+"$@"} # A bug in bash halts the script if the last line of a function # fails when set -e is in force, so we need another command to # work around that: : } # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } # func_error arg... # Echo program name prefixed message to standard error. func_error () { $ECHO "$progname: ${opt_mode+$opt_mode: }"${1+"$@"} 1>&2 } # func_warning arg... # Echo program name prefixed warning message to standard error. func_warning () { $opt_warning && $ECHO "$progname: ${opt_mode+$opt_mode: }warning: "${1+"$@"} 1>&2 # bash bug again: : } # func_fatal_error arg... # Echo program name prefixed message to standard error, and exit. func_fatal_error () { func_error ${1+"$@"} exit $EXIT_FAILURE } # func_fatal_help arg... # Echo program name prefixed message to standard error, followed by # a help hint, and exit. func_fatal_help () { func_error ${1+"$@"} func_fatal_error "$help" } help="Try \`$progname --help' for more information." ## default # func_grep expression filename # Check whether EXPRESSION matches any line of FILENAME, without output. func_grep () { $GREP "$1" "$2" >/dev/null 2>&1 } # func_mkdir_p directory-path # Make sure the entire path to DIRECTORY-PATH is available. func_mkdir_p () { my_directory_path="$1" my_dir_list= if test -n "$my_directory_path" && test "$opt_dry_run" != ":"; then # Protect directory names starting with `-' case $my_directory_path in -*) my_directory_path="./$my_directory_path" ;; esac # While some portion of DIR does not yet exist... while test ! -d "$my_directory_path"; do # ...make a list in topmost first order. Use a colon delimited # list incase some portion of path contains whitespace. my_dir_list="$my_directory_path:$my_dir_list" # If the last portion added has no slash in it, the list is done case $my_directory_path in */*) ;; *) break ;; esac # ...otherwise throw away the child directory and loop my_directory_path=`$ECHO "$my_directory_path" | $SED -e "$dirname"` done my_dir_list=`$ECHO "$my_dir_list" | $SED 's,:*$,,'` save_mkdir_p_IFS="$IFS"; IFS=':' for my_dir in $my_dir_list; do IFS="$save_mkdir_p_IFS" # mkdir can fail with a `File exist' error if two processes # try to create one of the directories concurrently. Don't # stop in that case! $MKDIR "$my_dir" 2>/dev/null || : done IFS="$save_mkdir_p_IFS" # Bail out if we (or some other process) failed to create a directory. test -d "$my_directory_path" || \ func_fatal_error "Failed to create \`$1'" fi } # func_mktempdir [string] # Make a temporary directory that won't clash with other running # libtool processes, and avoids race conditions if possible. If # given, STRING is the basename for that directory. func_mktempdir () { my_template="${TMPDIR-/tmp}/${1-$progname}" if test "$opt_dry_run" = ":"; then # Return a directory name, but don't create it in dry-run mode my_tmpdir="${my_template}-$$" else # If mktemp works, use that first and foremost my_tmpdir=`mktemp -d "${my_template}-XXXXXXXX" 2>/dev/null` if test ! -d "$my_tmpdir"; then # Failing that, at least try and use $RANDOM to avoid a race my_tmpdir="${my_template}-${RANDOM-0}$$" save_mktempdir_umask=`umask` umask 0077 $MKDIR "$my_tmpdir" umask $save_mktempdir_umask fi # If we're not in dry-run mode, bomb out on failure test -d "$my_tmpdir" || \ func_fatal_error "cannot create temporary directory \`$my_tmpdir'" fi $ECHO "$my_tmpdir" } # func_quote_for_eval arg # Aesthetically quote ARG to be evaled later. # This function returns two values: FUNC_QUOTE_FOR_EVAL_RESULT # is double-quoted, suitable for a subsequent eval, whereas # FUNC_QUOTE_FOR_EVAL_UNQUOTED_RESULT has merely all characters # which are still active within double quotes backslashified. func_quote_for_eval () { case $1 in *[\\\`\"\$]*) func_quote_for_eval_unquoted_result=`$ECHO "$1" | $SED "$sed_quote_subst"` ;; *) func_quote_for_eval_unquoted_result="$1" ;; esac case $func_quote_for_eval_unquoted_result in # Double-quote args containing shell metacharacters to delay # word splitting, command substitution and and variable # expansion for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") func_quote_for_eval_result="\"$func_quote_for_eval_unquoted_result\"" ;; *) func_quote_for_eval_result="$func_quote_for_eval_unquoted_result" esac } # func_quote_for_expand arg # Aesthetically quote ARG to be evaled later; same as above, # but do not quote variable references. func_quote_for_expand () { case $1 in *[\\\`\"]*) my_arg=`$ECHO "$1" | $SED \ -e "$double_quote_subst" -e "$sed_double_backslash"` ;; *) my_arg="$1" ;; esac case $my_arg in # Double-quote args containing shell metacharacters to delay # word splitting and command substitution for a subsequent eval. # Many Bourne shells cannot handle close brackets correctly # in scan sets, so we specify it separately. *[\[\~\#\^\&\*\(\)\{\}\|\;\<\>\?\'\ \ ]*|*]*|"") my_arg="\"$my_arg\"" ;; esac func_quote_for_expand_result="$my_arg" } # func_show_eval cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. func_show_eval () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$my_cmd" my_status=$? if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_show_eval_locale cmd [fail_exp] # Unless opt_silent is true, then output CMD. Then, if opt_dryrun is # not true, evaluate CMD. If the evaluation of CMD fails, and FAIL_EXP # is given, then evaluate it. Use the saved locale for evaluation. func_show_eval_locale () { my_cmd="$1" my_fail_exp="${2-:}" ${opt_silent-false} || { func_quote_for_expand "$my_cmd" eval "func_echo $func_quote_for_expand_result" } if ${opt_dry_run-false}; then :; else eval "$lt_user_locale $my_cmd" my_status=$? eval "$lt_safe_locale" if test "$my_status" -eq 0; then :; else eval "(exit $my_status); $my_fail_exp" fi fi } # func_tr_sh # Turn $1 into a string suitable for a shell variable name. # Result is stored in $func_tr_sh_result. All characters # not in the set a-zA-Z0-9_ are replaced with '_'. Further, # if $1 begins with a digit, a '_' is prepended as well. func_tr_sh () { case $1 in [0-9]* | *[!a-zA-Z0-9_]*) func_tr_sh_result=`$ECHO "$1" | $SED 's/^\([0-9]\)/_\1/; s/[^a-zA-Z0-9_]/_/g'` ;; * ) func_tr_sh_result=$1 ;; esac } # func_version # Echo version message to standard output and exit. func_version () { $opt_debug $SED -n '/(C)/!b go :more /\./!{ N s/\n# / / b more } :go /^# '$PROGRAM' (GNU /,/# warranty; / { s/^# // s/^# *$// s/\((C)\)[ 0-9,-]*\( [1-9][0-9]*\)/\1\2/ p }' < "$progpath" exit $? } # func_usage # Echo short help message to standard output and exit. func_usage () { $opt_debug $SED -n '/^# Usage:/,/^# *.*--help/ { s/^# // s/^# *$// s/\$progname/'$progname'/ p }' < "$progpath" echo $ECHO "run \`$progname --help | more' for full usage" exit $? } # func_help [NOEXIT] # Echo long help message to standard output and exit, # unless 'noexit' is passed as argument. func_help () { $opt_debug $SED -n '/^# Usage:/,/# Report bugs to/ { :print s/^# // s/^# *$// s*\$progname*'$progname'* s*\$host*'"$host"'* s*\$SHELL*'"$SHELL"'* s*\$LTCC*'"$LTCC"'* s*\$LTCFLAGS*'"$LTCFLAGS"'* s*\$LD*'"$LD"'* s/\$with_gnu_ld/'"$with_gnu_ld"'/ s/\$automake_version/'"`(${AUTOMAKE-automake} --version) 2>/dev/null |$SED 1q`"'/ s/\$autoconf_version/'"`(${AUTOCONF-autoconf} --version) 2>/dev/null |$SED 1q`"'/ p d } /^# .* home page:/b print /^# General help using/b print ' < "$progpath" ret=$? if test -z "$1"; then exit $ret fi } # func_missing_arg argname # Echo program name prefixed message to standard error and set global # exit_cmd. func_missing_arg () { $opt_debug func_error "missing argument for $1." exit_cmd=exit } # func_split_short_opt shortopt # Set func_split_short_opt_name and func_split_short_opt_arg shell # variables after splitting SHORTOPT after the 2nd character. func_split_short_opt () { my_sed_short_opt='1s/^\(..\).*$/\1/;q' my_sed_short_rest='1s/^..\(.*\)$/\1/;q' func_split_short_opt_name=`$ECHO "$1" | $SED "$my_sed_short_opt"` func_split_short_opt_arg=`$ECHO "$1" | $SED "$my_sed_short_rest"` } # func_split_short_opt may be replaced by extended shell implementation # func_split_long_opt longopt # Set func_split_long_opt_name and func_split_long_opt_arg shell # variables after splitting LONGOPT at the `=' sign. func_split_long_opt () { my_sed_long_opt='1s/^\(--[^=]*\)=.*/\1/;q' my_sed_long_arg='1s/^--[^=]*=//' func_split_long_opt_name=`$ECHO "$1" | $SED "$my_sed_long_opt"` func_split_long_opt_arg=`$ECHO "$1" | $SED "$my_sed_long_arg"` } # func_split_long_opt may be replaced by extended shell implementation exit_cmd=: magic="%%%MAGIC variable%%%" magic_exe="%%%MAGIC EXE variable%%%" # Global variables. nonopt= preserve_args= lo2o="s/\\.lo\$/.${objext}/" o2lo="s/\\.${objext}\$/.lo/" extracted_archives= extracted_serial=0 # If this variable is set in any of the actions, the command in it # will be execed at the end. This prevents here-documents from being # left over by shells. exec_cmd= # func_append var value # Append VALUE to the end of shell variable VAR. func_append () { eval "${1}=\$${1}\${2}" } # func_append may be replaced by extended shell implementation # func_append_quoted var value # Quote VALUE and append to the end of shell variable VAR, separated # by a space. func_append_quoted () { func_quote_for_eval "${2}" eval "${1}=\$${1}\\ \$func_quote_for_eval_result" } # func_append_quoted may be replaced by extended shell implementation # func_arith arithmetic-term... func_arith () { func_arith_result=`expr "${@}"` } # func_arith may be replaced by extended shell implementation # func_len string # STRING may not start with a hyphen. func_len () { func_len_result=`expr "${1}" : ".*" 2>/dev/null || echo $max_cmd_len` } # func_len may be replaced by extended shell implementation # func_lo2o object func_lo2o () { func_lo2o_result=`$ECHO "${1}" | $SED "$lo2o"` } # func_lo2o may be replaced by extended shell implementation # func_xform libobj-or-source func_xform () { func_xform_result=`$ECHO "${1}" | $SED 's/\.[^.]*$/.lo/'` } # func_xform may be replaced by extended shell implementation # func_fatal_configuration arg... # Echo program name prefixed message to standard error, followed by # a configuration failure hint, and exit. func_fatal_configuration () { func_error ${1+"$@"} func_error "See the $PACKAGE documentation for more information." func_fatal_error "Fatal configuration error." } # func_config # Display the configuration for all the tags in this script. func_config () { re_begincf='^# ### BEGIN LIBTOOL' re_endcf='^# ### END LIBTOOL' # Default configuration. $SED "1,/$re_begincf CONFIG/d;/$re_endcf CONFIG/,\$d" < "$progpath" # Now print the configurations for the tags. for tagname in $taglist; do $SED -n "/$re_begincf TAG CONFIG: $tagname\$/,/$re_endcf TAG CONFIG: $tagname\$/p" < "$progpath" done exit $? } # func_features # Display the features supported by this script. func_features () { echo "host: $host" if test "$build_libtool_libs" = yes; then echo "enable shared libraries" else echo "disable shared libraries" fi if test "$build_old_libs" = yes; then echo "enable static libraries" else echo "disable static libraries" fi exit $? } # func_enable_tag tagname # Verify that TAGNAME is valid, and either flag an error and exit, or # enable the TAGNAME tag. We also add TAGNAME to the global $taglist # variable here. func_enable_tag () { # Global variable: tagname="$1" re_begincf="^# ### BEGIN LIBTOOL TAG CONFIG: $tagname\$" re_endcf="^# ### END LIBTOOL TAG CONFIG: $tagname\$" sed_extractcf="/$re_begincf/,/$re_endcf/p" # Validate tagname. case $tagname in *[!-_A-Za-z0-9,/]*) func_fatal_error "invalid tag name: $tagname" ;; esac # Don't test for the "default" C tag, as we know it's # there but not specially marked. case $tagname in CC) ;; *) if $GREP "$re_begincf" "$progpath" >/dev/null 2>&1; then taglist="$taglist $tagname" # Evaluate the configuration. Be careful to quote the path # and the sed script, to avoid splitting on whitespace, but # also don't use non-portable quotes within backquotes within # quotes we have to do it in 2 steps: extractedcf=`$SED -n -e "$sed_extractcf" < "$progpath"` eval "$extractedcf" else func_error "ignoring unknown tag $tagname" fi ;; esac } # func_check_version_match # Ensure that we are using m4 macros, and libtool script from the same # release of libtool. func_check_version_match () { if test "$package_revision" != "$macro_revision"; then if test "$VERSION" != "$macro_version"; then if test -z "$macro_version"; then cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from an older release. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, but the $progname: definition of this LT_INIT comes from $PACKAGE $macro_version. $progname: You should recreate aclocal.m4 with macros from $PACKAGE $VERSION $progname: and run autoconf again. _LT_EOF fi else cat >&2 <<_LT_EOF $progname: Version mismatch error. This is $PACKAGE $VERSION, revision $package_revision, $progname: but the definition of this LT_INIT comes from revision $macro_revision. $progname: You should recreate aclocal.m4 with macros from revision $package_revision $progname: of $PACKAGE $VERSION and run autoconf again. _LT_EOF fi exit $EXIT_MISMATCH fi } # Shorthand for --mode=foo, only valid as the first argument case $1 in clean|clea|cle|cl) shift; set dummy --mode clean ${1+"$@"}; shift ;; compile|compil|compi|comp|com|co|c) shift; set dummy --mode compile ${1+"$@"}; shift ;; execute|execut|execu|exec|exe|ex|e) shift; set dummy --mode execute ${1+"$@"}; shift ;; finish|finis|fini|fin|fi|f) shift; set dummy --mode finish ${1+"$@"}; shift ;; install|instal|insta|inst|ins|in|i) shift; set dummy --mode install ${1+"$@"}; shift ;; link|lin|li|l) shift; set dummy --mode link ${1+"$@"}; shift ;; uninstall|uninstal|uninsta|uninst|unins|unin|uni|un|u) shift; set dummy --mode uninstall ${1+"$@"}; shift ;; esac # Option defaults: opt_debug=: opt_dry_run=false opt_config=false opt_preserve_dup_deps=false opt_features=false opt_finish=false opt_help=false opt_help_all=false opt_silent=: opt_warning=: opt_verbose=: opt_silent=false opt_verbose=false # Parse options once, thoroughly. This comes as soon as possible in the # script to make things like `--version' happen as quickly as we can. { # this just eases exit handling while test $# -gt 0; do opt="$1" shift case $opt in --debug|-x) opt_debug='set -x' func_echo "enabling shell trace mode" $opt_debug ;; --dry-run|--dryrun|-n) opt_dry_run=: ;; --config) opt_config=: func_config ;; --dlopen|-dlopen) optarg="$1" opt_dlopen="${opt_dlopen+$opt_dlopen }$optarg" shift ;; --preserve-dup-deps) opt_preserve_dup_deps=: ;; --features) opt_features=: func_features ;; --finish) opt_finish=: set dummy --mode finish ${1+"$@"}; shift ;; --help) opt_help=: ;; --help-all) opt_help_all=: opt_help=': help-all' ;; --mode) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_mode="$optarg" case $optarg in # Valid mode arguments: clean|compile|execute|finish|install|link|relink|uninstall) ;; # Catch anything else as an error *) func_error "invalid argument for $opt" exit_cmd=exit break ;; esac shift ;; --no-silent|--no-quiet) opt_silent=false func_append preserve_args " $opt" ;; --no-warning|--no-warn) opt_warning=false func_append preserve_args " $opt" ;; --no-verbose) opt_verbose=false func_append preserve_args " $opt" ;; --silent|--quiet) opt_silent=: func_append preserve_args " $opt" opt_verbose=false ;; --verbose|-v) opt_verbose=: func_append preserve_args " $opt" opt_silent=false ;; --tag) test $# = 0 && func_missing_arg $opt && break optarg="$1" opt_tag="$optarg" func_append preserve_args " $opt $optarg" func_enable_tag "$optarg" shift ;; -\?|-h) func_usage ;; --help) func_help ;; --version) func_version ;; # Separate optargs to long options: --*=*) func_split_long_opt "$opt" set dummy "$func_split_long_opt_name" "$func_split_long_opt_arg" ${1+"$@"} shift ;; # Separate non-argument short options: -\?*|-h*|-n*|-v*) func_split_short_opt "$opt" set dummy "$func_split_short_opt_name" "-$func_split_short_opt_arg" ${1+"$@"} shift ;; --) break ;; -*) func_fatal_help "unrecognized option \`$opt'" ;; *) set dummy "$opt" ${1+"$@"}; shift; break ;; esac done # Validate options: # save first non-option argument if test "$#" -gt 0; then nonopt="$opt" shift fi # preserve --debug test "$opt_debug" = : || func_append preserve_args " --debug" case $host in *cygwin* | *mingw* | *pw32* | *cegcc*) # don't eliminate duplications in $postdeps and $predeps opt_duplicate_compiler_generated_deps=: ;; *) opt_duplicate_compiler_generated_deps=$opt_preserve_dup_deps ;; esac $opt_help || { # Sanity checks first: func_check_version_match if test "$build_libtool_libs" != yes && test "$build_old_libs" != yes; then func_fatal_configuration "not configured to build any kind of library" fi # Darwin sucks eval std_shrext=\"$shrext_cmds\" # Only execute mode is allowed to have -dlopen flags. if test -n "$opt_dlopen" && test "$opt_mode" != execute; then func_error "unrecognized option \`-dlopen'" $ECHO "$help" 1>&2 exit $EXIT_FAILURE fi # Change the help message to a mode-specific one. generic_help="$help" help="Try \`$progname --help --mode=$opt_mode' for more information." } # Bail if the options were screwed $exit_cmd $EXIT_FAILURE } ## ----------- ## ## Main. ## ## ----------- ## # func_lalib_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_lalib_p () { test -f "$1" && $SED -e 4q "$1" 2>/dev/null \ | $GREP "^# Generated by .*$PACKAGE" > /dev/null 2>&1 } # func_lalib_unsafe_p file # True iff FILE is a libtool `.la' library or `.lo' object file. # This function implements the same check as func_lalib_p without # resorting to external programs. To this end, it redirects stdin and # closes it afterwards, without saving the original file descriptor. # As a safety measure, use it only where a negative result would be # fatal anyway. Works if `file' does not exist. func_lalib_unsafe_p () { lalib_p=no if test -f "$1" && test -r "$1" && exec 5<&0 <"$1"; then for lalib_p_l in 1 2 3 4 do read lalib_p_line case "$lalib_p_line" in \#\ Generated\ by\ *$PACKAGE* ) lalib_p=yes; break;; esac done exec 0<&5 5<&- fi test "$lalib_p" = yes } # func_ltwrapper_script_p file # True iff FILE is a libtool wrapper script # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_script_p () { func_lalib_p "$1" } # func_ltwrapper_executable_p file # True iff FILE is a libtool wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_executable_p () { func_ltwrapper_exec_suffix= case $1 in *.exe) ;; *) func_ltwrapper_exec_suffix=.exe ;; esac $GREP "$magic_exe" "$1$func_ltwrapper_exec_suffix" >/dev/null 2>&1 } # func_ltwrapper_scriptname file # Assumes file is an ltwrapper_executable # uses $file to determine the appropriate filename for a # temporary ltwrapper_script. func_ltwrapper_scriptname () { func_dirname_and_basename "$1" "" "." func_stripname '' '.exe' "$func_basename_result" func_ltwrapper_scriptname_result="$func_dirname_result/$objdir/${func_stripname_result}_ltshwrapper" } # func_ltwrapper_p file # True iff FILE is a libtool wrapper script or wrapper executable # This function is only a basic sanity check; it will hardly flush out # determined imposters. func_ltwrapper_p () { func_ltwrapper_script_p "$1" || func_ltwrapper_executable_p "$1" } # func_execute_cmds commands fail_cmd # Execute tilde-delimited COMMANDS. # If FAIL_CMD is given, eval that upon failure. # FAIL_CMD may read-access the current command in variable CMD! func_execute_cmds () { $opt_debug save_ifs=$IFS; IFS='~' for cmd in $1; do IFS=$save_ifs eval cmd=\"$cmd\" func_show_eval "$cmd" "${2-:}" done IFS=$save_ifs } # func_source file # Source FILE, adding directory component if necessary. # Note that it is not necessary on cygwin/mingw to append a dot to # FILE even if both FILE and FILE.exe exist: automatic-append-.exe # behavior happens only for exec(3), not for open(2)! Also, sourcing # `FILE.' does not work on cygwin managed mounts. func_source () { $opt_debug case $1 in */* | *\\*) . "$1" ;; *) . "./$1" ;; esac } # func_resolve_sysroot PATH # Replace a leading = in PATH with a sysroot. Store the result into # func_resolve_sysroot_result func_resolve_sysroot () { func_resolve_sysroot_result=$1 case $func_resolve_sysroot_result in =*) func_stripname '=' '' "$func_resolve_sysroot_result" func_resolve_sysroot_result=$lt_sysroot$func_stripname_result ;; esac } # func_replace_sysroot PATH # If PATH begins with the sysroot, replace it with = and # store the result into func_replace_sysroot_result. func_replace_sysroot () { case "$lt_sysroot:$1" in ?*:"$lt_sysroot"*) func_stripname "$lt_sysroot" '' "$1" func_replace_sysroot_result="=$func_stripname_result" ;; *) # Including no sysroot. func_replace_sysroot_result=$1 ;; esac } # func_infer_tag arg # Infer tagged configuration to use if any are available and # if one wasn't chosen via the "--tag" command line option. # Only attempt this if the compiler in the base compile # command doesn't match the default compiler. # arg is usually of the form 'gcc ...' func_infer_tag () { $opt_debug if test -n "$available_tags" && test -z "$tagname"; then CC_quoted= for arg in $CC; do func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case $@ in # Blanks in the command may have been stripped by the calling shell, # but not from the CC environment variable when configure was run. " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) ;; # Blanks at the start of $base_compile will cause this to fail # if we don't check for them as well. *) for z in $available_tags; do if $GREP "^# ### BEGIN LIBTOOL TAG CONFIG: $z$" < "$progpath" > /dev/null; then # Evaluate the configuration. eval "`${SED} -n -e '/^# ### BEGIN LIBTOOL TAG CONFIG: '$z'$/,/^# ### END LIBTOOL TAG CONFIG: '$z'$/p' < $progpath`" CC_quoted= for arg in $CC; do # Double-quote args containing other shell metacharacters. func_append_quoted CC_quoted "$arg" done CC_expanded=`func_echo_all $CC` CC_quoted_expanded=`func_echo_all $CC_quoted` case "$@ " in " $CC "* | "$CC "* | " $CC_expanded "* | "$CC_expanded "* | \ " $CC_quoted"* | "$CC_quoted "* | " $CC_quoted_expanded "* | "$CC_quoted_expanded "*) # The compiler in the base compile command matches # the one in the tagged configuration. # Assume this is the tagged configuration we want. tagname=$z break ;; esac fi done # If $tagname still isn't set, then no tagged configuration # was found and let the user know that the "--tag" command # line option must be used. if test -z "$tagname"; then func_echo "unable to infer tagged configuration" func_fatal_error "specify a tag with \`--tag'" # else # func_verbose "using $tagname tagged configuration" fi ;; esac fi } # func_write_libtool_object output_name pic_name nonpic_name # Create a libtool object file (analogous to a ".la" file), # but don't create it if we're doing a dry run. func_write_libtool_object () { write_libobj=${1} if test "$build_libtool_libs" = yes; then write_lobj=\'${2}\' else write_lobj=none fi if test "$build_old_libs" = yes; then write_oldobj=\'${3}\' else write_oldobj=none fi $opt_dry_run || { cat >${write_libobj}T </dev/null` if test "$?" -eq 0 && test -n "${func_convert_core_file_wine_to_w32_tmp}"; then func_convert_core_file_wine_to_w32_result=`$ECHO "$func_convert_core_file_wine_to_w32_tmp" | $SED -e "$lt_sed_naive_backslashify"` else func_convert_core_file_wine_to_w32_result= fi fi } # end: func_convert_core_file_wine_to_w32 # func_convert_core_path_wine_to_w32 ARG # Helper function used by path conversion functions when $build is *nix, and # $host is mingw, cygwin, or some other w32 environment. Relies on a correctly # configured wine environment available, with the winepath program in $build's # $PATH. Assumes ARG has no leading or trailing path separator characters. # # ARG is path to be converted from $build format to win32. # Result is available in $func_convert_core_path_wine_to_w32_result. # Unconvertible file (directory) names in ARG are skipped; if no directory names # are convertible, then the result may be empty. func_convert_core_path_wine_to_w32 () { $opt_debug # unfortunately, winepath doesn't convert paths, only file names func_convert_core_path_wine_to_w32_result="" if test -n "$1"; then oldIFS=$IFS IFS=: for func_convert_core_path_wine_to_w32_f in $1; do IFS=$oldIFS func_convert_core_file_wine_to_w32 "$func_convert_core_path_wine_to_w32_f" if test -n "$func_convert_core_file_wine_to_w32_result" ; then if test -z "$func_convert_core_path_wine_to_w32_result"; then func_convert_core_path_wine_to_w32_result="$func_convert_core_file_wine_to_w32_result" else func_append func_convert_core_path_wine_to_w32_result ";$func_convert_core_file_wine_to_w32_result" fi fi done IFS=$oldIFS fi } # end: func_convert_core_path_wine_to_w32 # func_cygpath ARGS... # Wrapper around calling the cygpath program via LT_CYGPATH. This is used when # when (1) $build is *nix and Cygwin is hosted via a wine environment; or (2) # $build is MSYS and $host is Cygwin, or (3) $build is Cygwin. In case (1) or # (2), returns the Cygwin file name or path in func_cygpath_result (input # file name or path is assumed to be in w32 format, as previously converted # from $build's *nix or MSYS format). In case (3), returns the w32 file name # or path in func_cygpath_result (input file name or path is assumed to be in # Cygwin format). Returns an empty string on error. # # ARGS are passed to cygpath, with the last one being the file name or path to # be converted. # # Specify the absolute *nix (or w32) name to cygpath in the LT_CYGPATH # environment variable; do not put it in $PATH. func_cygpath () { $opt_debug if test -n "$LT_CYGPATH" && test -f "$LT_CYGPATH"; then func_cygpath_result=`$LT_CYGPATH "$@" 2>/dev/null` if test "$?" -ne 0; then # on failure, ensure result is empty func_cygpath_result= fi else func_cygpath_result= func_error "LT_CYGPATH is empty or specifies non-existent file: \`$LT_CYGPATH'" fi } #end: func_cygpath # func_convert_core_msys_to_w32 ARG # Convert file name or path ARG from MSYS format to w32 format. Return # result in func_convert_core_msys_to_w32_result. func_convert_core_msys_to_w32 () { $opt_debug # awkward: cmd appends spaces to result func_convert_core_msys_to_w32_result=`( cmd //c echo "$1" ) 2>/dev/null | $SED -e 's/[ ]*$//' -e "$lt_sed_naive_backslashify"` } #end: func_convert_core_msys_to_w32 # func_convert_file_check ARG1 ARG2 # Verify that ARG1 (a file name in $build format) was converted to $host # format in ARG2. Otherwise, emit an error message, but continue (resetting # func_to_host_file_result to ARG1). func_convert_file_check () { $opt_debug if test -z "$2" && test -n "$1" ; then func_error "Could not determine host file name corresponding to" func_error " \`$1'" func_error "Continuing, but uninstalled executables may not work." # Fallback: func_to_host_file_result="$1" fi } # end func_convert_file_check # func_convert_path_check FROM_PATHSEP TO_PATHSEP FROM_PATH TO_PATH # Verify that FROM_PATH (a path in $build format) was converted to $host # format in TO_PATH. Otherwise, emit an error message, but continue, resetting # func_to_host_file_result to a simplistic fallback value (see below). func_convert_path_check () { $opt_debug if test -z "$4" && test -n "$3"; then func_error "Could not determine the host path corresponding to" func_error " \`$3'" func_error "Continuing, but uninstalled executables may not work." # Fallback. This is a deliberately simplistic "conversion" and # should not be "improved". See libtool.info. if test "x$1" != "x$2"; then lt_replace_pathsep_chars="s|$1|$2|g" func_to_host_path_result=`echo "$3" | $SED -e "$lt_replace_pathsep_chars"` else func_to_host_path_result="$3" fi fi } # end func_convert_path_check # func_convert_path_front_back_pathsep FRONTPAT BACKPAT REPL ORIG # Modifies func_to_host_path_result by prepending REPL if ORIG matches FRONTPAT # and appending REPL if ORIG matches BACKPAT. func_convert_path_front_back_pathsep () { $opt_debug case $4 in $1 ) func_to_host_path_result="$3$func_to_host_path_result" ;; esac case $4 in $2 ) func_append func_to_host_path_result "$3" ;; esac } # end func_convert_path_front_back_pathsep ################################################## # $build to $host FILE NAME CONVERSION FUNCTIONS # ################################################## # invoked via `$to_host_file_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # Result will be available in $func_to_host_file_result. # func_to_host_file ARG # Converts the file name ARG from $build format to $host format. Return result # in func_to_host_file_result. func_to_host_file () { $opt_debug $to_host_file_cmd "$1" } # end func_to_host_file # func_to_tool_file ARG LAZY # converts the file name ARG from $build format to toolchain format. Return # result in func_to_tool_file_result. If the conversion in use is listed # in (the comma separated) LAZY, no conversion takes place. func_to_tool_file () { $opt_debug case ,$2, in *,"$to_tool_file_cmd",*) func_to_tool_file_result=$1 ;; *) $to_tool_file_cmd "$1" func_to_tool_file_result=$func_to_host_file_result ;; esac } # end func_to_tool_file # func_convert_file_noop ARG # Copy ARG to func_to_host_file_result. func_convert_file_noop () { func_to_host_file_result="$1" } # end func_convert_file_noop # func_convert_file_msys_to_w32 ARG # Convert file name ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_file_result. func_convert_file_msys_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_to_host_file_result="$func_convert_core_msys_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_w32 # func_convert_file_cygwin_to_w32 ARG # Convert file name ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_file_cygwin_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # because $build is cygwin, we call "the" cygpath in $PATH; no need to use # LT_CYGPATH in this case. func_to_host_file_result=`cygpath -m "$1"` fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_cygwin_to_w32 # func_convert_file_nix_to_w32 ARG # Convert file name ARG from *nix to w32 format. Requires a wine environment # and a working winepath. Returns result in func_to_host_file_result. func_convert_file_nix_to_w32 () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_file_wine_to_w32 "$1" func_to_host_file_result="$func_convert_core_file_wine_to_w32_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_w32 # func_convert_file_msys_to_cygwin ARG # Convert file name ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_file_msys_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then func_convert_core_msys_to_w32 "$1" func_cygpath -u "$func_convert_core_msys_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_msys_to_cygwin # func_convert_file_nix_to_cygwin ARG # Convert file name ARG from *nix to Cygwin format. Requires Cygwin installed # in a wine environment, working winepath, and LT_CYGPATH set. Returns result # in func_to_host_file_result. func_convert_file_nix_to_cygwin () { $opt_debug func_to_host_file_result="$1" if test -n "$1"; then # convert from *nix to w32, then use cygpath to convert from w32 to cygwin. func_convert_core_file_wine_to_w32 "$1" func_cygpath -u "$func_convert_core_file_wine_to_w32_result" func_to_host_file_result="$func_cygpath_result" fi func_convert_file_check "$1" "$func_to_host_file_result" } # end func_convert_file_nix_to_cygwin ############################################# # $build to $host PATH CONVERSION FUNCTIONS # ############################################# # invoked via `$to_host_path_cmd ARG' # # In each case, ARG is the path to be converted from $build to $host format. # The result will be available in $func_to_host_path_result. # # Path separators are also converted from $build format to $host format. If # ARG begins or ends with a path separator character, it is preserved (but # converted to $host format) on output. # # All path conversion functions are named using the following convention: # file name conversion function : func_convert_file_X_to_Y () # path conversion function : func_convert_path_X_to_Y () # where, for any given $build/$host combination the 'X_to_Y' value is the # same. If conversion functions are added for new $build/$host combinations, # the two new functions must follow this pattern, or func_init_to_host_path_cmd # will break. # func_init_to_host_path_cmd # Ensures that function "pointer" variable $to_host_path_cmd is set to the # appropriate value, based on the value of $to_host_file_cmd. to_host_path_cmd= func_init_to_host_path_cmd () { $opt_debug if test -z "$to_host_path_cmd"; then func_stripname 'func_convert_file_' '' "$to_host_file_cmd" to_host_path_cmd="func_convert_path_${func_stripname_result}" fi } # func_to_host_path ARG # Converts the path ARG from $build format to $host format. Return result # in func_to_host_path_result. func_to_host_path () { $opt_debug func_init_to_host_path_cmd $to_host_path_cmd "$1" } # end func_to_host_path # func_convert_path_noop ARG # Copy ARG to func_to_host_path_result. func_convert_path_noop () { func_to_host_path_result="$1" } # end func_convert_path_noop # func_convert_path_msys_to_w32 ARG # Convert path ARG from (mingw) MSYS to (mingw) w32 format; automatic # conversion to w32 is not available inside the cwrapper. Returns result in # func_to_host_path_result. func_convert_path_msys_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from ARG. MSYS # behavior is inconsistent here; cygpath turns them into '.;' and ';.'; # and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_msys_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_msys_to_w32 # func_convert_path_cygwin_to_w32 ARG # Convert path ARG from Cygwin to w32 format. Returns result in # func_to_host_file_result. func_convert_path_cygwin_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_to_host_path_result=`cygpath -m -p "$func_to_host_path_tmp1"` func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_cygwin_to_w32 # func_convert_path_nix_to_w32 ARG # Convert path ARG from *nix to w32 format. Requires a wine environment and # a working winepath. Returns result in func_to_host_file_result. func_convert_path_nix_to_w32 () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_to_host_path_result="$func_convert_core_path_wine_to_w32_result" func_convert_path_check : ";" \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" ";" "$1" fi } # end func_convert_path_nix_to_w32 # func_convert_path_msys_to_cygwin ARG # Convert path ARG from MSYS to Cygwin format. Requires LT_CYGPATH set. # Returns result in func_to_host_file_result. func_convert_path_msys_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # See func_convert_path_msys_to_w32: func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_msys_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_msys_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_msys_to_cygwin # func_convert_path_nix_to_cygwin ARG # Convert path ARG from *nix to Cygwin format. Requires Cygwin installed in a # a wine environment, working winepath, and LT_CYGPATH set. Returns result in # func_to_host_file_result. func_convert_path_nix_to_cygwin () { $opt_debug func_to_host_path_result="$1" if test -n "$1"; then # Remove leading and trailing path separator characters from # ARG. msys behavior is inconsistent here, cygpath turns them # into '.;' and ';.', and winepath ignores them completely. func_stripname : : "$1" func_to_host_path_tmp1=$func_stripname_result func_convert_core_path_wine_to_w32 "$func_to_host_path_tmp1" func_cygpath -u -p "$func_convert_core_path_wine_to_w32_result" func_to_host_path_result="$func_cygpath_result" func_convert_path_check : : \ "$func_to_host_path_tmp1" "$func_to_host_path_result" func_convert_path_front_back_pathsep ":*" "*:" : "$1" fi } # end func_convert_path_nix_to_cygwin # func_mode_compile arg... func_mode_compile () { $opt_debug # Get the compilation command and the source file. base_compile= srcfile="$nonopt" # always keep a non-empty value in "srcfile" suppress_opt=yes suppress_output= arg_mode=normal libobj= later= pie_flag= for arg do case $arg_mode in arg ) # do not "continue". Instead, add this to base_compile lastarg="$arg" arg_mode=normal ;; target ) libobj="$arg" arg_mode=normal continue ;; normal ) # Accept any command-line options. case $arg in -o) test -n "$libobj" && \ func_fatal_error "you cannot specify \`-o' more than once" arg_mode=target continue ;; -pie | -fpie | -fPIE) func_append pie_flag " $arg" continue ;; -shared | -static | -prefer-pic | -prefer-non-pic) func_append later " $arg" continue ;; -no-suppress) suppress_opt=no continue ;; -Xcompiler) arg_mode=arg # the next one goes into the "base_compile" arg list continue # The current "srcfile" will either be retained or ;; # replaced later. I would guess that would be a bug. -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result lastarg= save_ifs="$IFS"; IFS=',' for arg in $args; do IFS="$save_ifs" func_append_quoted lastarg "$arg" done IFS="$save_ifs" func_stripname ' ' '' "$lastarg" lastarg=$func_stripname_result # Add the arguments to base_compile. func_append base_compile " $lastarg" continue ;; *) # Accept the current argument as the source file. # The previous "srcfile" becomes the current argument. # lastarg="$srcfile" srcfile="$arg" ;; esac # case $arg ;; esac # case $arg_mode # Aesthetically quote the previous argument. func_append_quoted base_compile "$lastarg" done # for arg case $arg_mode in arg) func_fatal_error "you must specify an argument for -Xcompile" ;; target) func_fatal_error "you must specify a target with \`-o'" ;; *) # Get the name of the library object. test -z "$libobj" && { func_basename "$srcfile" libobj="$func_basename_result" } ;; esac # Recognize several different file suffixes. # If the user specifies -o file.o, it is replaced with file.lo case $libobj in *.[cCFSifmso] | \ *.ada | *.adb | *.ads | *.asm | \ *.c++ | *.cc | *.ii | *.class | *.cpp | *.cxx | \ *.[fF][09]? | *.for | *.java | *.go | *.obj | *.sx | *.cu | *.cup) func_xform "$libobj" libobj=$func_xform_result ;; esac case $libobj in *.lo) func_lo2o "$libobj"; obj=$func_lo2o_result ;; *) func_fatal_error "cannot determine name of library object from \`$libobj'" ;; esac func_infer_tag $base_compile for arg in $later; do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no continue ;; -static) build_libtool_libs=no build_old_libs=yes continue ;; -prefer-pic) pic_mode=yes continue ;; -prefer-non-pic) pic_mode=no continue ;; esac done func_quote_for_eval "$libobj" test "X$libobj" != "X$func_quote_for_eval_result" \ && $ECHO "X$libobj" | $GREP '[]~#^*{};<>?"'"'"' &()|`$[]' \ && func_warning "libobj name \`$libobj' may not contain shell special characters." func_dirname_and_basename "$obj" "/" "" objname="$func_basename_result" xdir="$func_dirname_result" lobj=${xdir}$objdir/$objname test -z "$base_compile" && \ func_fatal_help "you must specify a compilation command" # Delete any leftover library objects. if test "$build_old_libs" = yes; then removelist="$obj $lobj $libobj ${libobj}T" else removelist="$lobj $libobj ${libobj}T" fi # On Cygwin there's no "real" PIC flag so we must build both object types case $host_os in cygwin* | mingw* | pw32* | os2* | cegcc*) pic_mode=default ;; esac if test "$pic_mode" = no && test "$deplibs_check_method" != pass_all; then # non-PIC code in shared libraries is not supported pic_mode=default fi # Calculate the filename of the output object if compiler does # not support -o with -c if test "$compiler_c_o" = no; then output_obj=`$ECHO "$srcfile" | $SED 's%^.*/%%; s%\.[^.]*$%%'`.${objext} lockfile="$output_obj.lock" else output_obj= need_locks=no lockfile= fi # Lock this critical section if it is needed # We use this script file to make the link, it avoids creating a new file if test "$need_locks" = yes; then until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done elif test "$need_locks" = warn; then if test -f "$lockfile"; then $ECHO "\ *** ERROR, $lockfile exists and contains: `cat $lockfile 2>/dev/null` This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi func_append removelist " $output_obj" $ECHO "$srcfile" > "$lockfile" fi $opt_dry_run || $RM $removelist func_append removelist " $lockfile" trap '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' 1 2 15 func_to_tool_file "$srcfile" func_convert_file_msys_to_w32 srcfile=$func_to_tool_file_result func_quote_for_eval "$srcfile" qsrcfile=$func_quote_for_eval_result # Only build a PIC object if we are building libtool libraries. if test "$build_libtool_libs" = yes; then # Without this assignment, base_compile gets emptied. fbsd_hideous_sh_bug=$base_compile if test "$pic_mode" != no; then command="$base_compile $qsrcfile $pic_flag" else # Don't build PIC code command="$base_compile $qsrcfile" fi func_mkdir_p "$xdir$objdir" if test -z "$output_obj"; then # Place PIC objects in $objdir func_append command " -o $lobj" fi func_show_eval_locale "$command" \ 'test -n "$output_obj" && $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed, then go on to compile the next one if test -n "$output_obj" && test "X$output_obj" != "X$lobj"; then func_show_eval '$MV "$output_obj" "$lobj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi # Allow error messages only from the first compilation. if test "$suppress_opt" = yes; then suppress_output=' >/dev/null 2>&1' fi fi # Only build a position-dependent object if we build old libraries. if test "$build_old_libs" = yes; then if test "$pic_mode" != yes; then # Don't build PIC code command="$base_compile $qsrcfile$pie_flag" else command="$base_compile $qsrcfile $pic_flag" fi if test "$compiler_c_o" = yes; then func_append command " -o $obj" fi # Suppress compiler output if we already did a PIC compilation. func_append command "$suppress_output" func_show_eval_locale "$command" \ '$opt_dry_run || $RM $removelist; exit $EXIT_FAILURE' if test "$need_locks" = warn && test "X`cat $lockfile 2>/dev/null`" != "X$srcfile"; then $ECHO "\ *** ERROR, $lockfile contains: `cat $lockfile 2>/dev/null` but it should contain: $srcfile This indicates that another process is trying to use the same temporary object file, and libtool could not work around it because your compiler does not support \`-c' and \`-o' together. If you repeat this compilation, it may succeed, by chance, but you had better avoid parallel builds (make -j) in this platform, or get a better compiler." $opt_dry_run || $RM $removelist exit $EXIT_FAILURE fi # Just move the object if needed if test -n "$output_obj" && test "X$output_obj" != "X$obj"; then func_show_eval '$MV "$output_obj" "$obj"' \ 'error=$?; $opt_dry_run || $RM $removelist; exit $error' fi fi $opt_dry_run || { func_write_libtool_object "$libobj" "$objdir/$objname" "$objname" # Unlock the critical section if it was locked if test "$need_locks" != no; then removelist=$lockfile $RM "$lockfile" fi } exit $EXIT_SUCCESS } $opt_help || { test "$opt_mode" = compile && func_mode_compile ${1+"$@"} } func_mode_help () { # We need to display help for each of the modes. case $opt_mode in "") # Generic help is extracted from the usage comments # at the start of this file. func_help ;; clean) $ECHO \ "Usage: $progname [OPTION]... --mode=clean RM [RM-OPTION]... FILE... Remove files from the build directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, object or program, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; compile) $ECHO \ "Usage: $progname [OPTION]... --mode=compile COMPILE-COMMAND... SOURCEFILE Compile a source file into a libtool library object. This mode accepts the following additional options: -o OUTPUT-FILE set the output file name to OUTPUT-FILE -no-suppress do not suppress compiler output for multiple passes -prefer-pic try to build PIC objects only -prefer-non-pic try to build non-PIC objects only -shared do not build a \`.o' file suitable for static linking -static only build a \`.o' file suitable for static linking -Wc,FLAG pass FLAG directly to the compiler COMPILE-COMMAND is a command to be used in creating a \`standard' object file from the given SOURCEFILE. The output file name is determined by removing the directory component from SOURCEFILE, then substituting the C source code suffix \`.c' with the library object suffix, \`.lo'." ;; execute) $ECHO \ "Usage: $progname [OPTION]... --mode=execute COMMAND [ARGS]... Automatically set library path, then run a program. This mode accepts the following additional options: -dlopen FILE add the directory containing FILE to the library path This mode sets the library path environment variable according to \`-dlopen' flags. If any of the ARGS are libtool executable wrappers, then they are translated into their corresponding uninstalled binary, and any of their required library directories are added to the library path. Then, COMMAND is executed, with ARGS as arguments." ;; finish) $ECHO \ "Usage: $progname [OPTION]... --mode=finish [LIBDIR]... Complete the installation of libtool libraries. Each LIBDIR is a directory that contains libtool libraries. The commands that this mode executes may require superuser privileges. Use the \`--dry-run' option if you just want to see what would be executed." ;; install) $ECHO \ "Usage: $progname [OPTION]... --mode=install INSTALL-COMMAND... Install executables or libraries. INSTALL-COMMAND is the installation command. The first component should be either the \`install' or \`cp' program. The following components of INSTALL-COMMAND are treated specially: -inst-prefix-dir PREFIX-DIR Use PREFIX-DIR as a staging area for installation The rest of the components are interpreted as arguments to that command (only BSD-compatible install options are recognized)." ;; link) $ECHO \ "Usage: $progname [OPTION]... --mode=link LINK-COMMAND... Link object files or libraries together to form another library, or to create an executable program. LINK-COMMAND is a command using the C compiler that you would use to create a program from several object files. The following components of LINK-COMMAND are treated specially: -all-static do not do any dynamic linking at all -avoid-version do not add a version suffix if possible -bindir BINDIR specify path to binaries directory (for systems where libraries must be found in the PATH setting at runtime) -dlopen FILE \`-dlpreopen' FILE if it cannot be dlopened at runtime -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3) -export-symbols SYMFILE try to export only the symbols listed in SYMFILE -export-symbols-regex REGEX try to export only the symbols matching REGEX -LLIBDIR search LIBDIR for required installed libraries -lNAME OUTPUT-FILE requires the installed library libNAME -module build a library that can dlopened -no-fast-install disable the fast-install mode -no-install link a not-installable executable -no-undefined declare that a library does not refer to external symbols -o OUTPUT-FILE create OUTPUT-FILE from the specified objects -objectlist FILE Use a list of object files found in FILE to specify objects -precious-files-regex REGEX don't remove output files matching REGEX -release RELEASE specify package release information -rpath LIBDIR the created library will eventually be installed in LIBDIR -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries -shared only do dynamic linking of libtool libraries -shrext SUFFIX override the standard shared library file extension -static do not do any dynamic linking of uninstalled libtool libraries -static-libtool-libs do not do any dynamic linking of libtool libraries -version-info CURRENT[:REVISION[:AGE]] specify library version info [each variable defaults to 0] -weak LIBNAME declare that the target provides the LIBNAME interface -Wc,FLAG -Xcompiler FLAG pass linker-specific FLAG directly to the compiler -Wl,FLAG -Xlinker FLAG pass linker-specific FLAG directly to the linker -XCClinker FLAG pass link-specific FLAG to the compiler driver (CC) All other options (arguments beginning with \`-') are ignored. Every other argument is treated as a filename. Files ending in \`.la' are treated as uninstalled libtool libraries, other files are standard or library object files. If the OUTPUT-FILE ends in \`.la', then a libtool library is created, only library objects (\`.lo' files) may be specified, and \`-rpath' is required, except when creating a convenience library. If OUTPUT-FILE ends in \`.a' or \`.lib', then a standard library is created using \`ar' and \`ranlib', or on Windows using \`lib'. If OUTPUT-FILE ends in \`.lo' or \`.${objext}', then a reloadable object file is created, otherwise an executable program is created." ;; uninstall) $ECHO \ "Usage: $progname [OPTION]... --mode=uninstall RM [RM-OPTION]... FILE... Remove libraries from an installation directory. RM is the name of the program to use to delete files associated with each FILE (typically \`/bin/rm'). RM-OPTIONS are options (such as \`-f') to be passed to RM. If FILE is a libtool library, all the files associated with it are deleted. Otherwise, only FILE itself is deleted using RM." ;; *) func_fatal_help "invalid operation mode \`$opt_mode'" ;; esac echo $ECHO "Try \`$progname --help' for more information about other modes." } # Now that we've collected a possible --mode arg, show help if necessary if $opt_help; then if test "$opt_help" = :; then func_mode_help else { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do func_mode_help done } | sed -n '1p; 2,$s/^Usage:/ or: /p' { func_help noexit for opt_mode in compile link execute install finish uninstall clean; do echo func_mode_help done } | sed '1d /^When reporting/,/^Report/{ H d } $x /information about other modes/d /more detailed .*MODE/d s/^Usage:.*--mode=\([^ ]*\) .*/Description of \1 mode:/' fi exit $? fi # func_mode_execute arg... func_mode_execute () { $opt_debug # The first argument is the command name. cmd="$nonopt" test -z "$cmd" && \ func_fatal_help "you must specify a COMMAND" # Handle -dlopen flags immediately. for file in $opt_dlopen; do test -f "$file" \ || func_fatal_help "\`$file' is not a file" dir= case $file in *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$lib' is not a valid libtool archive" # Read the libtool library. dlname= library_names= func_source "$file" # Skip this library if it cannot be dlopened. if test -z "$dlname"; then # Warn if it was a shared library. test -n "$library_names" && \ func_warning "\`$file' was not linked with \`-export-dynamic'" continue fi func_dirname "$file" "" "." dir="$func_dirname_result" if test -f "$dir/$objdir/$dlname"; then func_append dir "/$objdir" else if test ! -f "$dir/$dlname"; then func_fatal_error "cannot find \`$dlname' in \`$dir' or \`$dir/$objdir'" fi fi ;; *.lo) # Just add the directory containing the .lo file. func_dirname "$file" "" "." dir="$func_dirname_result" ;; *) func_warning "\`-dlopen' is ignored for non-libtool libraries and objects" continue ;; esac # Get the absolute pathname. absdir=`cd "$dir" && pwd` test -n "$absdir" && dir="$absdir" # Now add the directory to shlibpath_var. if eval "test -z \"\$$shlibpath_var\""; then eval "$shlibpath_var=\"\$dir\"" else eval "$shlibpath_var=\"\$dir:\$$shlibpath_var\"" fi done # This variable tells wrapper scripts just to set shlibpath_var # rather than running their programs. libtool_execute_magic="$magic" # Check if any of the arguments is a wrapper script. args= for file do case $file in -* | *.la | *.lo ) ;; *) # Do a test to see if this is really a libtool program. if func_ltwrapper_script_p "$file"; then func_source "$file" # Transform arg to wrapped name. file="$progdir/$program" elif func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" func_source "$func_ltwrapper_scriptname_result" # Transform arg to wrapped name. file="$progdir/$program" fi ;; esac # Quote arguments (to preserve shell metacharacters). func_append_quoted args "$file" done if test "X$opt_dry_run" = Xfalse; then if test -n "$shlibpath_var"; then # Export the shlibpath_var. eval "export $shlibpath_var" fi # Restore saved environment variables for lt_var in LANG LANGUAGE LC_ALL LC_CTYPE LC_COLLATE LC_MESSAGES do eval "if test \"\${save_$lt_var+set}\" = set; then $lt_var=\$save_$lt_var; export $lt_var else $lt_unset $lt_var fi" done # Now prepare to actually exec the command. exec_cmd="\$cmd$args" else # Display what would be done. if test -n "$shlibpath_var"; then eval "\$ECHO \"\$shlibpath_var=\$$shlibpath_var\"" echo "export $shlibpath_var" fi $ECHO "$cmd$args" exit $EXIT_SUCCESS fi } test "$opt_mode" = execute && func_mode_execute ${1+"$@"} # func_mode_finish arg... func_mode_finish () { $opt_debug libs= libdirs= admincmds= for opt in "$nonopt" ${1+"$@"} do if test -d "$opt"; then func_append libdirs " $opt" elif test -f "$opt"; then if func_lalib_unsafe_p "$opt"; then func_append libs " $opt" else func_warning "\`$opt' is not a valid libtool archive" fi else func_fatal_error "invalid argument \`$opt'" fi done if test -n "$libs"; then if test -n "$lt_sysroot"; then sysroot_regex=`$ECHO "$lt_sysroot" | $SED "$sed_make_literal_regex"` sysroot_cmd="s/\([ ']\)$sysroot_regex/\1/g;" else sysroot_cmd= fi # Remove sysroot references if $opt_dry_run; then for lib in $libs; do echo "removing references to $lt_sysroot and \`=' prefixes from $lib" done else tmpdir=`func_mktempdir` for lib in $libs; do sed -e "${sysroot_cmd} s/\([ ']-[LR]\)=/\1/g; s/\([ ']\)=/\1/g" $lib \ > $tmpdir/tmp-la mv -f $tmpdir/tmp-la $lib done ${RM}r "$tmpdir" fi fi if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then for libdir in $libdirs; do if test -n "$finish_cmds"; then # Do each command in the finish commands. func_execute_cmds "$finish_cmds" 'admincmds="$admincmds '"$cmd"'"' fi if test -n "$finish_eval"; then # Do the single finish_eval. eval cmds=\"$finish_eval\" $opt_dry_run || eval "$cmds" || func_append admincmds " $cmds" fi done fi # Exit here if they wanted silent mode. $opt_silent && exit $EXIT_SUCCESS if test -n "$finish_cmds$finish_eval" && test -n "$libdirs"; then echo "----------------------------------------------------------------------" echo "Libraries have been installed in:" for libdir in $libdirs; do $ECHO " $libdir" done echo echo "If you ever happen to want to link against installed libraries" echo "in a given directory, LIBDIR, you must either use libtool, and" echo "specify the full pathname of the library, or use the \`-LLIBDIR'" echo "flag during linking and do at least one of the following:" if test -n "$shlibpath_var"; then echo " - add LIBDIR to the \`$shlibpath_var' environment variable" echo " during execution" fi if test -n "$runpath_var"; then echo " - add LIBDIR to the \`$runpath_var' environment variable" echo " during linking" fi if test -n "$hardcode_libdir_flag_spec"; then libdir=LIBDIR eval flag=\"$hardcode_libdir_flag_spec\" $ECHO " - use the \`$flag' linker flag" fi if test -n "$admincmds"; then $ECHO " - have your system administrator run these commands:$admincmds" fi if test -f /etc/ld.so.conf; then echo " - have your system administrator add LIBDIR to \`/etc/ld.so.conf'" fi echo echo "See any operating system documentation about shared libraries for" case $host in solaris2.[6789]|solaris2.1[0-9]) echo "more information, such as the ld(1), crle(1) and ld.so(8) manual" echo "pages." ;; *) echo "more information, such as the ld(1) and ld.so(8) manual pages." ;; esac echo "----------------------------------------------------------------------" fi exit $EXIT_SUCCESS } test "$opt_mode" = finish && func_mode_finish ${1+"$@"} # func_mode_install arg... func_mode_install () { $opt_debug # There may be an optional sh(1) argument at the beginning of # install_prog (especially on Windows NT). if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh || # Allow the use of GNU shtool's install command. case $nonopt in *shtool*) :;; *) false;; esac; then # Aesthetically quote it. func_quote_for_eval "$nonopt" install_prog="$func_quote_for_eval_result " arg=$1 shift else install_prog= arg=$nonopt fi # The real first argument should be the name of the installation program. # Aesthetically quote it. func_quote_for_eval "$arg" func_append install_prog "$func_quote_for_eval_result" install_shared_prog=$install_prog case " $install_prog " in *[\\\ /]cp\ *) install_cp=: ;; *) install_cp=false ;; esac # We need to accept at least all the BSD install flags. dest= files= opts= prev= install_type= isdir=no stripme= no_mode=: for arg do arg2= if test -n "$dest"; then func_append files " $dest" dest=$arg continue fi case $arg in -d) isdir=yes ;; -f) if $install_cp; then :; else prev=$arg fi ;; -g | -m | -o) prev=$arg ;; -s) stripme=" -s" continue ;; -*) ;; *) # If the previous option needed an argument, then skip it. if test -n "$prev"; then if test "x$prev" = x-m && test -n "$install_override_mode"; then arg2=$install_override_mode no_mode=false fi prev= else dest=$arg continue fi ;; esac # Aesthetically quote the argument. func_quote_for_eval "$arg" func_append install_prog " $func_quote_for_eval_result" if test -n "$arg2"; then func_quote_for_eval "$arg2" fi func_append install_shared_prog " $func_quote_for_eval_result" done test -z "$install_prog" && \ func_fatal_help "you must specify an install program" test -n "$prev" && \ func_fatal_help "the \`$prev' option requires an argument" if test -n "$install_override_mode" && $no_mode; then if $install_cp; then :; else func_quote_for_eval "$install_override_mode" func_append install_shared_prog " -m $func_quote_for_eval_result" fi fi if test -z "$files"; then if test -z "$dest"; then func_fatal_help "no file or destination specified" else func_fatal_help "you must specify a destination" fi fi # Strip any trailing slash from the destination. func_stripname '' '/' "$dest" dest=$func_stripname_result # Check to see that the destination is a directory. test -d "$dest" && isdir=yes if test "$isdir" = yes; then destdir="$dest" destname= else func_dirname_and_basename "$dest" "" "." destdir="$func_dirname_result" destname="$func_basename_result" # Not a directory, so check to see that there is only one file specified. set dummy $files; shift test "$#" -gt 1 && \ func_fatal_help "\`$dest' is not a directory" fi case $destdir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) for file in $files; do case $file in *.lo) ;; *) func_fatal_help "\`$destdir' must be an absolute directory name" ;; esac done ;; esac # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" staticlibs= future_libdirs= current_libdirs= for file in $files; do # Do each installation. case $file in *.$libext) # Do the static libraries later. func_append staticlibs " $file" ;; *.la) func_resolve_sysroot "$file" file=$func_resolve_sysroot_result # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$file" \ || func_fatal_help "\`$file' is not a valid libtool archive" library_names= old_library= relink_command= func_source "$file" # Add the libdir to current_libdirs if it is the destination. if test "X$destdir" = "X$libdir"; then case "$current_libdirs " in *" $libdir "*) ;; *) func_append current_libdirs " $libdir" ;; esac else # Note the libdir as a future libdir. case "$future_libdirs " in *" $libdir "*) ;; *) func_append future_libdirs " $libdir" ;; esac fi func_dirname "$file" "/" "" dir="$func_dirname_result" func_append dir "$objdir" if test -n "$relink_command"; then # Determine the prefix the user has applied to our future dir. inst_prefix_dir=`$ECHO "$destdir" | $SED -e "s%$libdir\$%%"` # Don't allow the user to place us outside of our expected # location b/c this prevents finding dependent libraries that # are installed to the same prefix. # At present, this check doesn't affect windows .dll's that # are installed into $libdir/../bin (currently, that works fine) # but it's something to keep an eye on. test "$inst_prefix_dir" = "$destdir" && \ func_fatal_error "error: cannot install \`$file' to a directory not ending in $libdir" if test -n "$inst_prefix_dir"; then # Stick the inst_prefix_dir data into the link command. relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%-inst-prefix-dir $inst_prefix_dir%"` else relink_command=`$ECHO "$relink_command" | $SED "s%@inst_prefix_dir@%%"` fi func_warning "relinking \`$file'" func_show_eval "$relink_command" \ 'func_fatal_error "error: relink \`$file'\'' with the above command before installing it"' fi # See the names of the shared library. set dummy $library_names; shift if test -n "$1"; then realname="$1" shift srcname="$realname" test -n "$relink_command" && srcname="$realname"T # Install the shared library and build the symlinks. func_show_eval "$install_shared_prog $dir/$srcname $destdir/$realname" \ 'exit $?' tstripme="$stripme" case $host_os in cygwin* | mingw* | pw32* | cegcc*) case $realname in *.dll.a) tstripme="" ;; esac ;; esac if test -n "$tstripme" && test -n "$striplib"; then func_show_eval "$striplib $destdir/$realname" 'exit $?' fi if test "$#" -gt 0; then # Delete the old symlinks, and create new ones. # Try `ln -sf' first, because the `ln' binary might depend on # the symlink we replace! Solaris /bin/ln does not understand -f, # so we also need to try rm && ln -s. for linkname do test "$linkname" != "$realname" \ && func_show_eval "(cd $destdir && { $LN_S -f $realname $linkname || { $RM $linkname && $LN_S $realname $linkname; }; })" done fi # Do each command in the postinstall commands. lib="$destdir/$realname" func_execute_cmds "$postinstall_cmds" 'exit $?' fi # Install the pseudo-library for information purposes. func_basename "$file" name="$func_basename_result" instname="$dir/$name"i func_show_eval "$install_prog $instname $destdir/$name" 'exit $?' # Maybe install the static library, too. test -n "$old_library" && func_append staticlibs " $dir/$old_library" ;; *.lo) # Install (i.e. copy) a libtool object. # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # Deduce the name of the destination old-style object file. case $destfile in *.lo) func_lo2o "$destfile" staticdest=$func_lo2o_result ;; *.$objext) staticdest="$destfile" destfile= ;; *) func_fatal_help "cannot copy a libtool object to \`$destfile'" ;; esac # Install the libtool object if requested. test -n "$destfile" && \ func_show_eval "$install_prog $file $destfile" 'exit $?' # Install the old object if enabled. if test "$build_old_libs" = yes; then # Deduce the name of the old-style object file. func_lo2o "$file" staticobj=$func_lo2o_result func_show_eval "$install_prog \$staticobj \$staticdest" 'exit $?' fi exit $EXIT_SUCCESS ;; *) # Figure out destination file name, if it wasn't already specified. if test -n "$destname"; then destfile="$destdir/$destname" else func_basename "$file" destfile="$func_basename_result" destfile="$destdir/$destfile" fi # If the file is missing, and there is a .exe on the end, strip it # because it is most likely a libtool script we actually want to # install stripped_ext="" case $file in *.exe) if test ! -f "$file"; then func_stripname '' '.exe' "$file" file=$func_stripname_result stripped_ext=".exe" fi ;; esac # Do a test to see if this is really a libtool program. case $host in *cygwin* | *mingw*) if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" wrapper=$func_ltwrapper_scriptname_result else func_stripname '' '.exe' "$file" wrapper=$func_stripname_result fi ;; *) wrapper=$file ;; esac if func_ltwrapper_script_p "$wrapper"; then notinst_deplibs= relink_command= func_source "$wrapper" # Check the variables that should have been set. test -z "$generated_by_libtool_version" && \ func_fatal_error "invalid libtool wrapper script \`$wrapper'" finalize=yes for lib in $notinst_deplibs; do # Check to see that each library is installed. libdir= if test -f "$lib"; then func_source "$lib" fi libfile="$libdir/"`$ECHO "$lib" | $SED 's%^.*/%%g'` ### testsuite: skip nested quoting test if test -n "$libdir" && test ! -f "$libfile"; then func_warning "\`$lib' has not been installed in \`$libdir'" finalize=no fi done relink_command= func_source "$wrapper" outputname= if test "$fast_install" = no && test -n "$relink_command"; then $opt_dry_run || { if test "$finalize" = yes; then tmpdir=`func_mktempdir` func_basename "$file$stripped_ext" file="$func_basename_result" outputname="$tmpdir/$file" # Replace the output file specification. relink_command=`$ECHO "$relink_command" | $SED 's%@OUTPUT@%'"$outputname"'%g'` $opt_silent || { func_quote_for_expand "$relink_command" eval "func_echo $func_quote_for_expand_result" } if eval "$relink_command"; then : else func_error "error: relink \`$file' with the above command before installing it" $opt_dry_run || ${RM}r "$tmpdir" continue fi file="$outputname" else func_warning "cannot relink \`$file'" fi } else # Install the binary that we compiled earlier. file=`$ECHO "$file$stripped_ext" | $SED "s%\([^/]*\)$%$objdir/\1%"` fi fi # remove .exe since cygwin /usr/bin/install will append another # one anyway case $install_prog,$host in */usr/bin/install*,*cygwin*) case $file:$destfile in *.exe:*.exe) # this is ok ;; *.exe:*) destfile=$destfile.exe ;; *:*.exe) func_stripname '' '.exe' "$destfile" destfile=$func_stripname_result ;; esac ;; esac func_show_eval "$install_prog\$stripme \$file \$destfile" 'exit $?' $opt_dry_run || if test -n "$outputname"; then ${RM}r "$tmpdir" fi ;; esac done for file in $staticlibs; do func_basename "$file" name="$func_basename_result" # Set up the ranlib parameters. oldlib="$destdir/$name" func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result func_show_eval "$install_prog \$file \$oldlib" 'exit $?' if test -n "$stripme" && test -n "$old_striplib"; then func_show_eval "$old_striplib $tool_oldlib" 'exit $?' fi # Do each command in the postinstall commands. func_execute_cmds "$old_postinstall_cmds" 'exit $?' done test -n "$future_libdirs" && \ func_warning "remember to run \`$progname --finish$future_libdirs'" if test -n "$current_libdirs"; then # Maybe just do a dry run. $opt_dry_run && current_libdirs=" -n$current_libdirs" exec_cmd='$SHELL $progpath $preserve_args --finish$current_libdirs' else exit $EXIT_SUCCESS fi } test "$opt_mode" = install && func_mode_install ${1+"$@"} # func_generate_dlsyms outputname originator pic_p # Extract symbols from dlprefiles and create ${outputname}S.o with # a dlpreopen symbol table. func_generate_dlsyms () { $opt_debug my_outputname="$1" my_originator="$2" my_pic_p="${3-no}" my_prefix=`$ECHO "$my_originator" | sed 's%[^a-zA-Z0-9]%_%g'` my_dlsyms= if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then if test -n "$NM" && test -n "$global_symbol_pipe"; then my_dlsyms="${my_outputname}S.c" else func_error "not configured to extract global symbols from dlpreopened files" fi fi if test -n "$my_dlsyms"; then case $my_dlsyms in "") ;; *.c) # Discover the nlist of each of the dlfiles. nlist="$output_objdir/${my_outputname}.nm" func_show_eval "$RM $nlist ${nlist}S ${nlist}T" # Parse the name list into a source file. func_verbose "creating $output_objdir/$my_dlsyms" $opt_dry_run || $ECHO > "$output_objdir/$my_dlsyms" "\ /* $my_dlsyms - symbol resolution table for \`$my_outputname' dlsym emulation. */ /* Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION */ #ifdef __cplusplus extern \"C\" { #endif #if defined(__GNUC__) && (((__GNUC__ == 4) && (__GNUC_MINOR__ >= 4)) || (__GNUC__ > 4)) #pragma GCC diagnostic ignored \"-Wstrict-prototypes\" #endif /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif /* External symbol declarations for the compiler. */\ " if test "$dlself" = yes; then func_verbose "generating symbol list for \`$output'" $opt_dry_run || echo ': @PROGRAM@ ' > "$nlist" # Add our own program objects to the symbol list. progfiles=`$ECHO "$objs$old_deplibs" | $SP2NL | $SED "$lo2o" | $NL2SP` for progfile in $progfiles; do func_to_tool_file "$progfile" func_convert_file_msys_to_w32 func_verbose "extracting global C symbols from \`$func_to_tool_file_result'" $opt_dry_run || eval "$NM $func_to_tool_file_result | $global_symbol_pipe >> '$nlist'" done if test -n "$exclude_expsyms"; then $opt_dry_run || { eval '$EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi if test -n "$export_symbols_regex"; then $opt_dry_run || { eval '$EGREP -e "$export_symbols_regex" "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' } fi # Prepare the list of exported symbols if test -z "$export_symbols"; then export_symbols="$output_objdir/$outputname.exp" $opt_dry_run || { $RM $export_symbols eval "${SED} -n -e '/^: @PROGRAM@ $/d' -e 's/^.* \(.*\)$/\1/p' "'< "$nlist" > "$export_symbols"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$export_symbols" >> "$output_objdir/$outputname.def"' ;; esac } else $opt_dry_run || { eval "${SED} -e 's/\([].[*^$]\)/\\\\\1/g' -e 's/^/ /' -e 's/$/$/'"' < "$export_symbols" > "$output_objdir/$outputname.exp"' eval '$GREP -f "$output_objdir/$outputname.exp" < "$nlist" > "$nlist"T' eval '$MV "$nlist"T "$nlist"' case $host in *cygwin* | *mingw* | *cegcc* ) eval "echo EXPORTS "'> "$output_objdir/$outputname.def"' eval 'cat "$nlist" >> "$output_objdir/$outputname.def"' ;; esac } fi fi for dlprefile in $dlprefiles; do func_verbose "extracting global C symbols from \`$dlprefile'" func_basename "$dlprefile" name="$func_basename_result" case $host in *cygwin* | *mingw* | *cegcc* ) # if an import library, we need to obtain dlname if func_win32_import_lib_p "$dlprefile"; then func_tr_sh "$dlprefile" eval "curr_lafile=\$libfile_$func_tr_sh_result" dlprefile_dlbasename="" if test -n "$curr_lafile" && func_lalib_p "$curr_lafile"; then # Use subshell, to avoid clobbering current variable values dlprefile_dlname=`source "$curr_lafile" && echo "$dlname"` if test -n "$dlprefile_dlname" ; then func_basename "$dlprefile_dlname" dlprefile_dlbasename="$func_basename_result" else # no lafile. user explicitly requested -dlpreopen . $sharedlib_from_linklib_cmd "$dlprefile" dlprefile_dlbasename=$sharedlib_from_linklib_result fi fi $opt_dry_run || { if test -n "$dlprefile_dlbasename" ; then eval '$ECHO ": $dlprefile_dlbasename" >> "$nlist"' else func_warning "Could not compute DLL name from $name" eval '$ECHO ": $name " >> "$nlist"' fi func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe | $SED -e '/I __imp/d' -e 's/I __nm_/D /;s/_nm__//' >> '$nlist'" } else # not an import lib $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } fi ;; *) $opt_dry_run || { eval '$ECHO ": $name " >> "$nlist"' func_to_tool_file "$dlprefile" func_convert_file_msys_to_w32 eval "$NM \"$func_to_tool_file_result\" 2>/dev/null | $global_symbol_pipe >> '$nlist'" } ;; esac done $opt_dry_run || { # Make sure we have at least an empty file. test -f "$nlist" || : > "$nlist" if test -n "$exclude_expsyms"; then $EGREP -v " ($exclude_expsyms)$" "$nlist" > "$nlist"T $MV "$nlist"T "$nlist" fi # Try sorting and uniquifying the output. if $GREP -v "^: " < "$nlist" | if sort -k 3 /dev/null 2>&1; then sort -k 3 else sort +2 fi | uniq > "$nlist"S; then : else $GREP -v "^: " < "$nlist" > "$nlist"S fi if test -f "$nlist"S; then eval "$global_symbol_to_cdecl"' < "$nlist"S >> "$output_objdir/$my_dlsyms"' else echo '/* NONE */' >> "$output_objdir/$my_dlsyms" fi echo >> "$output_objdir/$my_dlsyms" "\ /* The mapping between symbol names and symbols. */ typedef struct { const char *name; void *address; } lt_dlsymlist; extern LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[]; LT_DLSYM_CONST lt_dlsymlist lt_${my_prefix}_LTX_preloaded_symbols[] = {\ { \"$my_originator\", (void *) 0 }," case $need_lib_prefix in no) eval "$global_symbol_to_c_name_address" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; *) eval "$global_symbol_to_c_name_address_lib_prefix" < "$nlist" >> "$output_objdir/$my_dlsyms" ;; esac echo >> "$output_objdir/$my_dlsyms" "\ {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt_${my_prefix}_LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif\ " } # !$opt_dry_run pic_flag_for_symtable= case "$compile_command " in *" -static "*) ;; *) case $host in # compiling the symbol table file with pic_flag works around # a FreeBSD bug that causes programs to crash when -lm is # linked before any other PIC object. But we must not use # pic_flag when linking with -static. The problem exists in # FreeBSD 2.2.6 and is fixed in FreeBSD 3.1. *-*-freebsd2.*|*-*-freebsd3.0*|*-*-freebsdelf3.0*) pic_flag_for_symtable=" $pic_flag -DFREEBSD_WORKAROUND" ;; *-*-hpux*) pic_flag_for_symtable=" $pic_flag" ;; *) if test "X$my_pic_p" != Xno; then pic_flag_for_symtable=" $pic_flag" fi ;; esac ;; esac symtab_cflags= for arg in $LTCFLAGS; do case $arg in -pie | -fpie | -fPIE) ;; *) func_append symtab_cflags " $arg" ;; esac done # Now compile the dynamic symbol file. func_show_eval '(cd $output_objdir && $LTCC$symtab_cflags -c$no_builtin_flag$pic_flag_for_symtable "$my_dlsyms")' 'exit $?' # Clean up the generated files. func_show_eval '$RM "$output_objdir/$my_dlsyms" "$nlist" "${nlist}S" "${nlist}T"' # Transform the symbol file into the correct name. symfileobj="$output_objdir/${my_outputname}S.$objext" case $host in *cygwin* | *mingw* | *cegcc* ) if test -f "$output_objdir/$my_outputname.def"; then compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$output_objdir/$my_outputname.def $symfileobj%"` else compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` fi ;; *) compile_command=`$ECHO "$compile_command" | $SED "s%@SYMFILE@%$symfileobj%"` finalize_command=`$ECHO "$finalize_command" | $SED "s%@SYMFILE@%$symfileobj%"` ;; esac ;; *) func_fatal_error "unknown suffix for \`$my_dlsyms'" ;; esac else # We keep going just in case the user didn't refer to # lt_preloaded_symbols. The linker will fail if global_symbol_pipe # really was required. # Nullify the symbol file. compile_command=`$ECHO "$compile_command" | $SED "s% @SYMFILE@%%"` finalize_command=`$ECHO "$finalize_command" | $SED "s% @SYMFILE@%%"` fi } # func_win32_libid arg # return the library type of file 'arg' # # Need a lot of goo to handle *both* DLLs and import libs # Has to be a shell function in order to 'eat' the argument # that is supplied when $file_magic_command is called. # Despite the name, also deal with 64 bit binaries. func_win32_libid () { $opt_debug win32_libid_type="unknown" win32_fileres=`file -L $1 2>/dev/null` case $win32_fileres in *ar\ archive\ import\ library*) # definitely import win32_libid_type="x86 archive import" ;; *ar\ archive*) # could be an import, or static # Keep the egrep pattern in sync with the one in _LT_CHECK_MAGIC_METHOD. if eval $OBJDUMP -f $1 | $SED -e '10q' 2>/dev/null | $EGREP 'file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' >/dev/null; then func_to_tool_file "$1" func_convert_file_msys_to_w32 win32_nmres=`eval $NM -f posix -A \"$func_to_tool_file_result\" | $SED -n -e ' 1,100{ / I /{ s,.*,import, p q } }'` case $win32_nmres in import*) win32_libid_type="x86 archive import";; *) win32_libid_type="x86 archive static";; esac fi ;; *DLL*) win32_libid_type="x86 DLL" ;; *executable*) # but shell scripts are "executable" too... case $win32_fileres in *MS\ Windows\ PE\ Intel*) win32_libid_type="x86 DLL" ;; esac ;; esac $ECHO "$win32_libid_type" } # func_cygming_dll_for_implib ARG # # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib () { $opt_debug sharedlib_from_linklib_result=`$DLLTOOL --identify-strict --identify "$1"` } # func_cygming_dll_for_implib_fallback_core SECTION_NAME LIBNAMEs # # The is the core of a fallback implementation of a # platform-specific function to extract the name of the # DLL associated with the specified import library LIBNAME. # # SECTION_NAME is either .idata$6 or .idata$7, depending # on the platform and compiler that created the implib. # # Echos the name of the DLL associated with the # specified import library. func_cygming_dll_for_implib_fallback_core () { $opt_debug match_literal=`$ECHO "$1" | $SED "$sed_make_literal_regex"` $OBJDUMP -s --section "$1" "$2" 2>/dev/null | $SED '/^Contents of section '"$match_literal"':/{ # Place marker at beginning of archive member dllname section s/.*/====MARK====/ p d } # These lines can sometimes be longer than 43 characters, but # are always uninteresting /:[ ]*file format pe[i]\{,1\}-/d /^In archive [^:]*:/d # Ensure marker is printed /^====MARK====/p # Remove all lines with less than 43 characters /^.\{43\}/!d # From remaining lines, remove first 43 characters s/^.\{43\}//' | $SED -n ' # Join marker and all lines until next marker into a single line /^====MARK====/ b para H $ b para b :para x s/\n//g # Remove the marker s/^====MARK====// # Remove trailing dots and whitespace s/[\. \t]*$// # Print /./p' | # we now have a list, one entry per line, of the stringified # contents of the appropriate section of all members of the # archive which possess that section. Heuristic: eliminate # all those which have a first or second character that is # a '.' (that is, objdump's representation of an unprintable # character.) This should work for all archives with less than # 0x302f exports -- but will fail for DLLs whose name actually # begins with a literal '.' or a single character followed by # a '.'. # # Of those that remain, print the first one. $SED -e '/^\./d;/^.\./d;q' } # func_cygming_gnu_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is a GNU/binutils-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_gnu_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_gnu_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $EGREP ' (_head_[A-Za-z0-9_]+_[ad]l*|[A-Za-z0-9_]+_[ad]l*_iname)$'` test -n "$func_cygming_gnu_implib_tmp" } # func_cygming_ms_implib_p ARG # This predicate returns with zero status (TRUE) if # ARG is an MS-style import library. Returns # with nonzero status (FALSE) otherwise. func_cygming_ms_implib_p () { $opt_debug func_to_tool_file "$1" func_convert_file_msys_to_w32 func_cygming_ms_implib_tmp=`$NM "$func_to_tool_file_result" | eval "$global_symbol_pipe" | $GREP '_NULL_IMPORT_DESCRIPTOR'` test -n "$func_cygming_ms_implib_tmp" } # func_cygming_dll_for_implib_fallback ARG # Platform-specific function to extract the # name of the DLL associated with the specified # import library ARG. # # This fallback implementation is for use when $DLLTOOL # does not support the --identify-strict option. # Invoked by eval'ing the libtool variable # $sharedlib_from_linklib_cmd # Result is available in the variable # $sharedlib_from_linklib_result func_cygming_dll_for_implib_fallback () { $opt_debug if func_cygming_gnu_implib_p "$1" ; then # binutils import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$7' "$1"` elif func_cygming_ms_implib_p "$1" ; then # ms-generated import library sharedlib_from_linklib_result=`func_cygming_dll_for_implib_fallback_core '.idata$6' "$1"` else # unknown sharedlib_from_linklib_result="" fi } # func_extract_an_archive dir oldlib func_extract_an_archive () { $opt_debug f_ex_an_ar_dir="$1"; shift f_ex_an_ar_oldlib="$1" if test "$lock_old_archive_extraction" = yes; then lockfile=$f_ex_an_ar_oldlib.lock until $opt_dry_run || ln "$progpath" "$lockfile" 2>/dev/null; do func_echo "Waiting for $lockfile to be removed" sleep 2 done fi func_show_eval "(cd \$f_ex_an_ar_dir && $AR x \"\$f_ex_an_ar_oldlib\")" \ 'stat=$?; rm -f "$lockfile"; exit $stat' if test "$lock_old_archive_extraction" = yes; then $opt_dry_run || rm -f "$lockfile" fi if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then : else func_fatal_error "object name conflicts in archive: $f_ex_an_ar_dir/$f_ex_an_ar_oldlib" fi } # func_extract_archives gentop oldlib ... func_extract_archives () { $opt_debug my_gentop="$1"; shift my_oldlibs=${1+"$@"} my_oldobjs="" my_xlib="" my_xabs="" my_xdir="" for my_xlib in $my_oldlibs; do # Extract the objects. case $my_xlib in [\\/]* | [A-Za-z]:[\\/]*) my_xabs="$my_xlib" ;; *) my_xabs=`pwd`"/$my_xlib" ;; esac func_basename "$my_xlib" my_xlib="$func_basename_result" my_xlib_u=$my_xlib while :; do case " $extracted_archives " in *" $my_xlib_u "*) func_arith $extracted_serial + 1 extracted_serial=$func_arith_result my_xlib_u=lt$extracted_serial-$my_xlib ;; *) break ;; esac done extracted_archives="$extracted_archives $my_xlib_u" my_xdir="$my_gentop/$my_xlib_u" func_mkdir_p "$my_xdir" case $host in *-darwin*) func_verbose "Extracting $my_xabs" # Do not bother doing anything if just a dry run $opt_dry_run || { darwin_orig_dir=`pwd` cd $my_xdir || exit $? darwin_archive=$my_xabs darwin_curdir=`pwd` darwin_base_archive=`basename "$darwin_archive"` darwin_arches=`$LIPO -info "$darwin_archive" 2>/dev/null | $GREP Architectures 2>/dev/null || true` if test -n "$darwin_arches"; then darwin_arches=`$ECHO "$darwin_arches" | $SED -e 's/.*are://'` darwin_arch= func_verbose "$darwin_base_archive has multiple architectures $darwin_arches" for darwin_arch in $darwin_arches ; do func_mkdir_p "unfat-$$/${darwin_base_archive}-${darwin_arch}" $LIPO -thin $darwin_arch -output "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" "${darwin_archive}" cd "unfat-$$/${darwin_base_archive}-${darwin_arch}" func_extract_an_archive "`pwd`" "${darwin_base_archive}" cd "$darwin_curdir" $RM "unfat-$$/${darwin_base_archive}-${darwin_arch}/${darwin_base_archive}" done # $darwin_arches ## Okay now we've a bunch of thin objects, gotta fatten them up :) darwin_filelist=`find unfat-$$ -type f -name \*.o -print -o -name \*.lo -print | $SED -e "$basename" | sort -u` darwin_file= darwin_files= for darwin_file in $darwin_filelist; do darwin_files=`find unfat-$$ -name $darwin_file -print | sort | $NL2SP` $LIPO -create -output "$darwin_file" $darwin_files done # $darwin_filelist $RM -rf unfat-$$ cd "$darwin_orig_dir" else cd $darwin_orig_dir func_extract_an_archive "$my_xdir" "$my_xabs" fi # $darwin_arches } # !$opt_dry_run ;; *) func_extract_an_archive "$my_xdir" "$my_xabs" ;; esac my_oldobjs="$my_oldobjs "`find $my_xdir -name \*.$objext -print -o -name \*.lo -print | sort | $NL2SP` done func_extract_archives_result="$my_oldobjs" } # func_emit_wrapper [arg=no] # # Emit a libtool wrapper script on stdout. # Don't directly open a file because we may want to # incorporate the script contents within a cygwin/mingw # wrapper executable. Must ONLY be called from within # func_mode_link because it depends on a number of variables # set therein. # # ARG is the value that the WRAPPER_SCRIPT_BELONGS_IN_OBJDIR # variable will take. If 'yes', then the emitted script # will assume that the directory in which it is stored is # the $objdir directory. This is a cygwin/mingw-specific # behavior. func_emit_wrapper () { func_emit_wrapper_arg1=${1-no} $ECHO "\ #! $SHELL # $output - temporary wrapper script for $objdir/$outputname # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # The $output program cannot be directly executed until all the libtool # libraries that it depends on are installed. # # This wrapper script should never be moved out of the build directory. # If it is, it will not operate correctly. # Sed substitution that helps us do robust quoting. It backslashifies # metacharacters that are still active within double-quoted strings. sed_quote_subst='$sed_quote_subst' # Be Bourne compatible if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Zsh 3.x and 4.x performs word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in *posix*) set -o posix;; esac fi BIN_SH=xpg4; export BIN_SH # for Tru64 DUALCASE=1; export DUALCASE # for MKS sh # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH relink_command=\"$relink_command\" # This environment variable determines our operation mode. if test \"\$libtool_install_magic\" = \"$magic\"; then # install mode needs the following variables: generated_by_libtool_version='$macro_version' notinst_deplibs='$notinst_deplibs' else # When we are sourced in execute mode, \$file and \$ECHO are already set. if test \"\$libtool_execute_magic\" != \"$magic\"; then file=\"\$0\"" qECHO=`$ECHO "$ECHO" | $SED "$sed_quote_subst"` $ECHO "\ # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } ECHO=\"$qECHO\" fi # Very basic option parsing. These options are (a) specific to # the libtool wrapper, (b) are identical between the wrapper # /script/ and the wrapper /executable/ which is used only on # windows platforms, and (c) all begin with the string "--lt-" # (application programs are unlikely to have options which match # this pattern). # # There are only two supported options: --lt-debug and # --lt-dump-script. There is, deliberately, no --lt-help. # # The first argument to this parsing function should be the # script's $0 value, followed by "$@". lt_option_debug= func_parse_lt_options () { lt_script_arg0=\$0 shift for lt_opt do case \"\$lt_opt\" in --lt-debug) lt_option_debug=1 ;; --lt-dump-script) lt_dump_D=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%/[^/]*$%%'\` test \"X\$lt_dump_D\" = \"X\$lt_script_arg0\" && lt_dump_D=. lt_dump_F=\`\$ECHO \"X\$lt_script_arg0\" | $SED -e 's/^X//' -e 's%^.*/%%'\` cat \"\$lt_dump_D/\$lt_dump_F\" exit 0 ;; --lt-*) \$ECHO \"Unrecognized --lt- option: '\$lt_opt'\" 1>&2 exit 1 ;; esac done # Print the debug banner immediately: if test -n \"\$lt_option_debug\"; then echo \"${outputname}:${output}:\${LINENO}: libtool wrapper (GNU $PACKAGE$TIMESTAMP) $VERSION\" 1>&2 fi } # Used when --lt-debug. Prints its arguments to stdout # (redirection is the responsibility of the caller) func_lt_dump_args () { lt_dump_args_N=1; for lt_arg do \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[\$lt_dump_args_N]: \$lt_arg\" lt_dump_args_N=\`expr \$lt_dump_args_N + 1\` done } # Core function for launching the target application func_exec_program_core () { " case $host in # Backslashes separate directories on plain windows *-*-mingw | *-*-os2* | *-cegcc*) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir\\\\\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir\\\\\$program\" \${1+\"\$@\"} " ;; *) $ECHO "\ if test -n \"\$lt_option_debug\"; then \$ECHO \"${outputname}:${output}:\${LINENO}: newargv[0]: \$progdir/\$program\" 1>&2 func_lt_dump_args \${1+\"\$@\"} 1>&2 fi exec \"\$progdir/\$program\" \${1+\"\$@\"} " ;; esac $ECHO "\ \$ECHO \"\$0: cannot exec \$program \$*\" 1>&2 exit 1 } # A function to encapsulate launching the target application # Strips options in the --lt-* namespace from \$@ and # launches target application with the remaining arguments. func_exec_program () { case \" \$* \" in *\\ --lt-*) for lt_wr_arg do case \$lt_wr_arg in --lt-*) ;; *) set x \"\$@\" \"\$lt_wr_arg\"; shift;; esac shift done ;; esac func_exec_program_core \${1+\"\$@\"} } # Parse options func_parse_lt_options \"\$0\" \${1+\"\$@\"} # Find the directory that this script lives in. thisdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*$%%'\` test \"x\$thisdir\" = \"x\$file\" && thisdir=. # Follow symbolic links until we get to the real thisdir. file=\`ls -ld \"\$file\" | $SED -n 's/.*-> //p'\` while test -n \"\$file\"; do destdir=\`\$ECHO \"\$file\" | $SED 's%/[^/]*\$%%'\` # If there was a directory component, then change thisdir. if test \"x\$destdir\" != \"x\$file\"; then case \"\$destdir\" in [\\\\/]* | [A-Za-z]:[\\\\/]*) thisdir=\"\$destdir\" ;; *) thisdir=\"\$thisdir/\$destdir\" ;; esac fi file=\`\$ECHO \"\$file\" | $SED 's%^.*/%%'\` file=\`ls -ld \"\$thisdir/\$file\" | $SED -n 's/.*-> //p'\` done # Usually 'no', except on cygwin/mingw when embedded into # the cwrapper. WRAPPER_SCRIPT_BELONGS_IN_OBJDIR=$func_emit_wrapper_arg1 if test \"\$WRAPPER_SCRIPT_BELONGS_IN_OBJDIR\" = \"yes\"; then # special case for '.' if test \"\$thisdir\" = \".\"; then thisdir=\`pwd\` fi # remove .libs from thisdir case \"\$thisdir\" in *[\\\\/]$objdir ) thisdir=\`\$ECHO \"\$thisdir\" | $SED 's%[\\\\/][^\\\\/]*$%%'\` ;; $objdir ) thisdir=. ;; esac fi # Try to get the absolute directory name. absdir=\`cd \"\$thisdir\" && pwd\` test -n \"\$absdir\" && thisdir=\"\$absdir\" " if test "$fast_install" = yes; then $ECHO "\ program=lt-'$outputname'$exeext progdir=\"\$thisdir/$objdir\" if test ! -f \"\$progdir/\$program\" || { file=\`ls -1dt \"\$progdir/\$program\" \"\$progdir/../\$program\" 2>/dev/null | ${SED} 1q\`; \\ test \"X\$file\" != \"X\$progdir/\$program\"; }; then file=\"\$\$-\$program\" if test ! -d \"\$progdir\"; then $MKDIR \"\$progdir\" else $RM \"\$progdir/\$file\" fi" $ECHO "\ # relink executable if necessary if test -n \"\$relink_command\"; then if relink_command_output=\`eval \$relink_command 2>&1\`; then : else $ECHO \"\$relink_command_output\" >&2 $RM \"\$progdir/\$file\" exit 1 fi fi $MV \"\$progdir/\$file\" \"\$progdir/\$program\" 2>/dev/null || { $RM \"\$progdir/\$program\"; $MV \"\$progdir/\$file\" \"\$progdir/\$program\"; } $RM \"\$progdir/\$file\" fi" else $ECHO "\ program='$outputname' progdir=\"\$thisdir/$objdir\" " fi $ECHO "\ if test -f \"\$progdir/\$program\"; then" # fixup the dll searchpath if we need to. # # Fix the DLL searchpath if we need to. Do this before prepending # to shlibpath, because on Windows, both are PATH and uninstalled # libraries must come first. if test -n "$dllsearchpath"; then $ECHO "\ # Add the dll search path components to the executable PATH PATH=$dllsearchpath:\$PATH " fi # Export our shlibpath_var if we have one. if test "$shlibpath_overrides_runpath" = yes && test -n "$shlibpath_var" && test -n "$temp_rpath"; then $ECHO "\ # Add our own library path to $shlibpath_var $shlibpath_var=\"$temp_rpath\$$shlibpath_var\" # Some systems cannot cope with colon-terminated $shlibpath_var # The second colon is a workaround for a bug in BeOS R4 sed $shlibpath_var=\`\$ECHO \"\$$shlibpath_var\" | $SED 's/::*\$//'\` export $shlibpath_var " fi $ECHO "\ if test \"\$libtool_execute_magic\" != \"$magic\"; then # Run the actual program with our arguments. func_exec_program \${1+\"\$@\"} fi else # The program doesn't exist. \$ECHO \"\$0: error: \\\`\$progdir/\$program' does not exist\" 1>&2 \$ECHO \"This script is just a wrapper for \$program.\" 1>&2 \$ECHO \"See the $PACKAGE documentation for more information.\" 1>&2 exit 1 fi fi\ " } # func_emit_cwrapperexe_src # emit the source code for a wrapper executable on stdout # Must ONLY be called from within func_mode_link because # it depends on a number of variable set therein. func_emit_cwrapperexe_src () { cat < #include #ifdef _MSC_VER # include # include # include #else # include # include # ifdef __CYGWIN__ # include # endif #endif #include #include #include #include #include #include #include #include /* declarations of non-ANSI functions */ #if defined(__MINGW32__) # ifdef __STRICT_ANSI__ int _putenv (const char *); # endif #elif defined(__CYGWIN__) # ifdef __STRICT_ANSI__ char *realpath (const char *, char *); int putenv (char *); int setenv (const char *, const char *, int); # endif /* #elif defined (other platforms) ... */ #endif /* portability defines, excluding path handling macros */ #if defined(_MSC_VER) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv # define S_IXUSR _S_IEXEC # ifndef _INTPTR_T_DEFINED # define _INTPTR_T_DEFINED # define intptr_t int # endif #elif defined(__MINGW32__) # define setmode _setmode # define stat _stat # define chmod _chmod # define getcwd _getcwd # define putenv _putenv #elif defined(__CYGWIN__) # define HAVE_SETENV # define FOPEN_WB "wb" /* #elif defined (other platforms) ... */ #endif #if defined(PATH_MAX) # define LT_PATHMAX PATH_MAX #elif defined(MAXPATHLEN) # define LT_PATHMAX MAXPATHLEN #else # define LT_PATHMAX 1024 #endif #ifndef S_IXOTH # define S_IXOTH 0 #endif #ifndef S_IXGRP # define S_IXGRP 0 #endif /* path handling portability macros */ #ifndef DIR_SEPARATOR # define DIR_SEPARATOR '/' # define PATH_SEPARATOR ':' #endif #if defined (_WIN32) || defined (__MSDOS__) || defined (__DJGPP__) || \ defined (__OS2__) # define HAVE_DOS_BASED_FILE_SYSTEM # define FOPEN_WB "wb" # ifndef DIR_SEPARATOR_2 # define DIR_SEPARATOR_2 '\\' # endif # ifndef PATH_SEPARATOR_2 # define PATH_SEPARATOR_2 ';' # endif #endif #ifndef DIR_SEPARATOR_2 # define IS_DIR_SEPARATOR(ch) ((ch) == DIR_SEPARATOR) #else /* DIR_SEPARATOR_2 */ # define IS_DIR_SEPARATOR(ch) \ (((ch) == DIR_SEPARATOR) || ((ch) == DIR_SEPARATOR_2)) #endif /* DIR_SEPARATOR_2 */ #ifndef PATH_SEPARATOR_2 # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR) #else /* PATH_SEPARATOR_2 */ # define IS_PATH_SEPARATOR(ch) ((ch) == PATH_SEPARATOR_2) #endif /* PATH_SEPARATOR_2 */ #ifndef FOPEN_WB # define FOPEN_WB "w" #endif #ifndef _O_BINARY # define _O_BINARY 0 #endif #define XMALLOC(type, num) ((type *) xmalloc ((num) * sizeof(type))) #define XFREE(stale) do { \ if (stale) { free ((void *) stale); stale = 0; } \ } while (0) #if defined(LT_DEBUGWRAPPER) static int lt_debug = 1; #else static int lt_debug = 0; #endif const char *program_name = "libtool-wrapper"; /* in case xstrdup fails */ void *xmalloc (size_t num); char *xstrdup (const char *string); const char *base_name (const char *name); char *find_executable (const char *wrapper); char *chase_symlinks (const char *pathspec); int make_executable (const char *path); int check_executable (const char *path); char *strendzap (char *str, const char *pat); void lt_debugprintf (const char *file, int line, const char *fmt, ...); void lt_fatal (const char *file, int line, const char *message, ...); static const char *nonnull (const char *s); static const char *nonempty (const char *s); void lt_setenv (const char *name, const char *value); char *lt_extend_str (const char *orig_value, const char *add, int to_end); void lt_update_exe_path (const char *name, const char *value); void lt_update_lib_path (const char *name, const char *value); char **prepare_spawn (char **argv); void lt_dump_script (FILE *f); EOF cat <= 0) && (st.st_mode & (S_IXUSR | S_IXGRP | S_IXOTH))) return 1; else return 0; } int make_executable (const char *path) { int rval = 0; struct stat st; lt_debugprintf (__FILE__, __LINE__, "(make_executable): %s\n", nonempty (path)); if ((!path) || (!*path)) return 0; if (stat (path, &st) >= 0) { rval = chmod (path, st.st_mode | S_IXOTH | S_IXGRP | S_IXUSR); } return rval; } /* Searches for the full path of the wrapper. Returns newly allocated full path name if found, NULL otherwise Does not chase symlinks, even on platforms that support them. */ char * find_executable (const char *wrapper) { int has_slash = 0; const char *p; const char *p_next; /* static buffer for getcwd */ char tmp[LT_PATHMAX + 1]; int tmp_len; char *concat_name; lt_debugprintf (__FILE__, __LINE__, "(find_executable): %s\n", nonempty (wrapper)); if ((wrapper == NULL) || (*wrapper == '\0')) return NULL; /* Absolute path? */ #if defined (HAVE_DOS_BASED_FILE_SYSTEM) if (isalpha ((unsigned char) wrapper[0]) && wrapper[1] == ':') { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } else { #endif if (IS_DIR_SEPARATOR (wrapper[0])) { concat_name = xstrdup (wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } #if defined (HAVE_DOS_BASED_FILE_SYSTEM) } #endif for (p = wrapper; *p; p++) if (*p == '/') { has_slash = 1; break; } if (!has_slash) { /* no slashes; search PATH */ const char *path = getenv ("PATH"); if (path != NULL) { for (p = path; *p; p = p_next) { const char *q; size_t p_len; for (q = p; *q; q++) if (IS_PATH_SEPARATOR (*q)) break; p_len = q - p; p_next = (*q == '\0' ? q : q + 1); if (p_len == 0) { /* empty path: current directory */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); } else { concat_name = XMALLOC (char, p_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, p, p_len); concat_name[p_len] = '/'; strcpy (concat_name + p_len + 1, wrapper); } if (check_executable (concat_name)) return concat_name; XFREE (concat_name); } } /* not found in PATH; assume curdir */ } /* Relative path | not found in path: prepend cwd */ if (getcwd (tmp, LT_PATHMAX) == NULL) lt_fatal (__FILE__, __LINE__, "getcwd failed: %s", nonnull (strerror (errno))); tmp_len = strlen (tmp); concat_name = XMALLOC (char, tmp_len + 1 + strlen (wrapper) + 1); memcpy (concat_name, tmp, tmp_len); concat_name[tmp_len] = '/'; strcpy (concat_name + tmp_len + 1, wrapper); if (check_executable (concat_name)) return concat_name; XFREE (concat_name); return NULL; } char * chase_symlinks (const char *pathspec) { #ifndef S_ISLNK return xstrdup (pathspec); #else char buf[LT_PATHMAX]; struct stat s; char *tmp_pathspec = xstrdup (pathspec); char *p; int has_symlinks = 0; while (strlen (tmp_pathspec) && !has_symlinks) { lt_debugprintf (__FILE__, __LINE__, "checking path component for symlinks: %s\n", tmp_pathspec); if (lstat (tmp_pathspec, &s) == 0) { if (S_ISLNK (s.st_mode) != 0) { has_symlinks = 1; break; } /* search backwards for last DIR_SEPARATOR */ p = tmp_pathspec + strlen (tmp_pathspec) - 1; while ((p > tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) p--; if ((p == tmp_pathspec) && (!IS_DIR_SEPARATOR (*p))) { /* no more DIR_SEPARATORS left */ break; } *p = '\0'; } else { lt_fatal (__FILE__, __LINE__, "error accessing file \"%s\": %s", tmp_pathspec, nonnull (strerror (errno))); } } XFREE (tmp_pathspec); if (!has_symlinks) { return xstrdup (pathspec); } tmp_pathspec = realpath (pathspec, buf); if (tmp_pathspec == 0) { lt_fatal (__FILE__, __LINE__, "could not follow symlinks for %s", pathspec); } return xstrdup (tmp_pathspec); #endif } char * strendzap (char *str, const char *pat) { size_t len, patlen; assert (str != NULL); assert (pat != NULL); len = strlen (str); patlen = strlen (pat); if (patlen <= len) { str += len - patlen; if (strcmp (str, pat) == 0) *str = '\0'; } return str; } void lt_debugprintf (const char *file, int line, const char *fmt, ...) { va_list args; if (lt_debug) { (void) fprintf (stderr, "%s:%s:%d: ", program_name, file, line); va_start (args, fmt); (void) vfprintf (stderr, fmt, args); va_end (args); } } static void lt_error_core (int exit_status, const char *file, int line, const char *mode, const char *message, va_list ap) { fprintf (stderr, "%s:%s:%d: %s: ", program_name, file, line, mode); vfprintf (stderr, message, ap); fprintf (stderr, ".\n"); if (exit_status >= 0) exit (exit_status); } void lt_fatal (const char *file, int line, const char *message, ...) { va_list ap; va_start (ap, message); lt_error_core (EXIT_FAILURE, file, line, "FATAL", message, ap); va_end (ap); } static const char * nonnull (const char *s) { return s ? s : "(null)"; } static const char * nonempty (const char *s) { return (s && !*s) ? "(empty)" : nonnull (s); } void lt_setenv (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_setenv) setting '%s' to '%s'\n", nonnull (name), nonnull (value)); { #ifdef HAVE_SETENV /* always make a copy, for consistency with !HAVE_SETENV */ char *str = xstrdup (value); setenv (name, str, 1); #else int len = strlen (name) + 1 + strlen (value) + 1; char *str = XMALLOC (char, len); sprintf (str, "%s=%s", name, value); if (putenv (str) != EXIT_SUCCESS) { XFREE (str); } #endif } } char * lt_extend_str (const char *orig_value, const char *add, int to_end) { char *new_value; if (orig_value && *orig_value) { int orig_value_len = strlen (orig_value); int add_len = strlen (add); new_value = XMALLOC (char, add_len + orig_value_len + 1); if (to_end) { strcpy (new_value, orig_value); strcpy (new_value + orig_value_len, add); } else { strcpy (new_value, add); strcpy (new_value + add_len, orig_value); } } else { new_value = xstrdup (add); } return new_value; } void lt_update_exe_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_exe_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); /* some systems can't cope with a ':'-terminated path #' */ int len = strlen (new_value); while (((len = strlen (new_value)) > 0) && IS_PATH_SEPARATOR (new_value[len-1])) { new_value[len-1] = '\0'; } lt_setenv (name, new_value); XFREE (new_value); } } void lt_update_lib_path (const char *name, const char *value) { lt_debugprintf (__FILE__, __LINE__, "(lt_update_lib_path) modifying '%s' by prepending '%s'\n", nonnull (name), nonnull (value)); if (name && *name && value && *value) { char *new_value = lt_extend_str (getenv (name), value, 0); lt_setenv (name, new_value); XFREE (new_value); } } EOF case $host_os in mingw*) cat <<"EOF" /* Prepares an argument vector before calling spawn(). Note that spawn() does not by itself call the command interpreter (getenv ("COMSPEC") != NULL ? getenv ("COMSPEC") : ({ OSVERSIONINFO v; v.dwOSVersionInfoSize = sizeof(OSVERSIONINFO); GetVersionEx(&v); v.dwPlatformId == VER_PLATFORM_WIN32_NT; }) ? "cmd.exe" : "command.com"). Instead it simply concatenates the arguments, separated by ' ', and calls CreateProcess(). We must quote the arguments since Win32 CreateProcess() interprets characters like ' ', '\t', '\\', '"' (but not '<' and '>') in a special way: - Space and tab are interpreted as delimiters. They are not treated as delimiters if they are surrounded by double quotes: "...". - Unescaped double quotes are removed from the input. Their only effect is that within double quotes, space and tab are treated like normal characters. - Backslashes not followed by double quotes are not special. - But 2*n+1 backslashes followed by a double quote become n backslashes followed by a double quote (n >= 0): \" -> " \\\" -> \" \\\\\" -> \\" */ #define SHELL_SPECIAL_CHARS "\"\\ \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" #define SHELL_SPACE_CHARS " \001\002\003\004\005\006\007\010\011\012\013\014\015\016\017\020\021\022\023\024\025\026\027\030\031\032\033\034\035\036\037" char ** prepare_spawn (char **argv) { size_t argc; char **new_argv; size_t i; /* Count number of arguments. */ for (argc = 0; argv[argc] != NULL; argc++) ; /* Allocate new argument vector. */ new_argv = XMALLOC (char *, argc + 1); /* Put quoted arguments into the new argument vector. */ for (i = 0; i < argc; i++) { const char *string = argv[i]; if (string[0] == '\0') new_argv[i] = xstrdup ("\"\""); else if (strpbrk (string, SHELL_SPECIAL_CHARS) != NULL) { int quote_around = (strpbrk (string, SHELL_SPACE_CHARS) != NULL); size_t length; unsigned int backslashes; const char *s; char *quoted_string; char *p; length = 0; backslashes = 0; if (quote_around) length++; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') length += backslashes + 1; length++; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) length += backslashes + 1; quoted_string = XMALLOC (char, length + 1); p = quoted_string; backslashes = 0; if (quote_around) *p++ = '"'; for (s = string; *s != '\0'; s++) { char c = *s; if (c == '"') { unsigned int j; for (j = backslashes + 1; j > 0; j--) *p++ = '\\'; } *p++ = c; if (c == '\\') backslashes++; else backslashes = 0; } if (quote_around) { unsigned int j; for (j = backslashes; j > 0; j--) *p++ = '\\'; *p++ = '"'; } *p = '\0'; new_argv[i] = quoted_string; } else new_argv[i] = (char *) string; } new_argv[argc] = NULL; return new_argv; } EOF ;; esac cat <<"EOF" void lt_dump_script (FILE* f) { EOF func_emit_wrapper yes | $SED -n -e ' s/^\(.\{79\}\)\(..*\)/\1\ \2/ h s/\([\\"]\)/\\\1/g s/$/\\n/ s/\([^\n]*\).*/ fputs ("\1", f);/p g D' cat <<"EOF" } EOF } # end: func_emit_cwrapperexe_src # func_win32_import_lib_p ARG # True if ARG is an import lib, as indicated by $file_magic_cmd func_win32_import_lib_p () { $opt_debug case `eval $file_magic_cmd \"\$1\" 2>/dev/null | $SED -e 10q` in *import*) : ;; *) false ;; esac } # func_mode_link arg... func_mode_link () { $opt_debug case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) # It is impossible to link a dll without this setting, and # we shouldn't force the makefile maintainer to figure out # which system we are compiling for in order to pass an extra # flag for every libtool invocation. # allow_undefined=no # FIXME: Unfortunately, there are problems with the above when trying # to make a dll which has undefined symbols, in which case not # even a static library is built. For now, we need to specify # -no-undefined on the libtool link line when we can be certain # that all symbols are satisfied, otherwise we get a static library. allow_undefined=yes ;; *) allow_undefined=yes ;; esac libtool_args=$nonopt base_compile="$nonopt $@" compile_command=$nonopt finalize_command=$nonopt compile_rpath= finalize_rpath= compile_shlibpath= finalize_shlibpath= convenience= old_convenience= deplibs= old_deplibs= compiler_flags= linker_flags= dllsearchpath= lib_search_path=`pwd` inst_prefix_dir= new_inherited_linker_flags= avoid_version=no bindir= dlfiles= dlprefiles= dlself=no export_dynamic=no export_symbols= export_symbols_regex= generated= libobjs= ltlibs= module=no no_install=no objs= non_pic_objects= precious_files_regex= prefer_static_libs=no preload=no prev= prevarg= release= rpath= xrpath= perm_rpath= temp_rpath= thread_safe=no vinfo= vinfo_number=no weak_libs= single_module="${wl}-single_module" func_infer_tag $base_compile # We need to know -static, to get the right output filenames. for arg do case $arg in -shared) test "$build_libtool_libs" != yes && \ func_fatal_configuration "can not build a shared library" build_old_libs=no break ;; -all-static | -static | -static-libtool-libs) case $arg in -all-static) if test "$build_libtool_libs" = yes && test -z "$link_static_flag"; then func_warning "complete static linking is impossible in this configuration" fi if test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; -static) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=built ;; -static-libtool-libs) if test -z "$pic_flag" && test -n "$link_static_flag"; then dlopen_self=$dlopen_self_static fi prefer_static_libs=yes ;; esac build_libtool_libs=no build_old_libs=yes break ;; esac done # See if our shared archives depend on static archives. test -n "$old_archive_from_new_cmds" && build_old_libs=yes # Go through the arguments, transforming them on the way. while test "$#" -gt 0; do arg="$1" shift func_quote_for_eval "$arg" qarg=$func_quote_for_eval_unquoted_result func_append libtool_args " $func_quote_for_eval_result" # If the previous option needs an argument, assign it. if test -n "$prev"; then case $prev in output) func_append compile_command " @OUTPUT@" func_append finalize_command " @OUTPUT@" ;; esac case $prev in bindir) bindir="$arg" prev= continue ;; dlfiles|dlprefiles) if test "$preload" = no; then # Add the symbol object into the linking commands. func_append compile_command " @SYMFILE@" func_append finalize_command " @SYMFILE@" preload=yes fi case $arg in *.la | *.lo) ;; # We handle these cases below. force) if test "$dlself" = no; then dlself=needless export_dynamic=yes fi prev= continue ;; self) if test "$prev" = dlprefiles; then dlself=yes elif test "$prev" = dlfiles && test "$dlopen_self" != yes; then dlself=yes else dlself=needless export_dynamic=yes fi prev= continue ;; *) if test "$prev" = dlfiles; then func_append dlfiles " $arg" else func_append dlprefiles " $arg" fi prev= continue ;; esac ;; expsyms) export_symbols="$arg" test -f "$arg" \ || func_fatal_error "symbol file \`$arg' does not exist" prev= continue ;; expsyms_regex) export_symbols_regex="$arg" prev= continue ;; framework) case $host in *-*-darwin*) case "$deplibs " in *" $qarg.ltframework "*) ;; *) func_append deplibs " $qarg.ltframework" # this is fixed later ;; esac ;; esac prev= continue ;; inst_prefix) inst_prefix_dir="$arg" prev= continue ;; objectlist) if test -f "$arg"; then save_arg=$arg moreargs= for fil in `cat "$save_arg"` do # func_append moreargs " $fil" arg=$fil # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi done else func_fatal_error "link input file \`$arg' does not exist" fi arg=$save_arg prev= continue ;; precious_regex) precious_files_regex="$arg" prev= continue ;; release) release="-$arg" prev= continue ;; rpath | xrpath) # We need an absolute path. case $arg in [\\/]* | [A-Za-z]:[\\/]*) ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac if test "$prev" = rpath; then case "$rpath " in *" $arg "*) ;; *) func_append rpath " $arg" ;; esac else case "$xrpath " in *" $arg "*) ;; *) func_append xrpath " $arg" ;; esac fi prev= continue ;; shrext) shrext_cmds="$arg" prev= continue ;; weak) func_append weak_libs " $arg" prev= continue ;; xcclinker) func_append linker_flags " $qarg" func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xcompiler) func_append compiler_flags " $qarg" prev= func_append compile_command " $qarg" func_append finalize_command " $qarg" continue ;; xlinker) func_append linker_flags " $qarg" func_append compiler_flags " $wl$qarg" prev= func_append compile_command " $wl$qarg" func_append finalize_command " $wl$qarg" continue ;; *) eval "$prev=\"\$arg\"" prev= continue ;; esac fi # test -n "$prev" prevarg="$arg" case $arg in -all-static) if test -n "$link_static_flag"; then # See comment for -static flag below, for more details. func_append compile_command " $link_static_flag" func_append finalize_command " $link_static_flag" fi continue ;; -allow-undefined) # FIXME: remove this flag sometime in the future. func_fatal_error "\`-allow-undefined' must not be used because it is the default" ;; -avoid-version) avoid_version=yes continue ;; -bindir) prev=bindir continue ;; -dlopen) prev=dlfiles continue ;; -dlpreopen) prev=dlprefiles continue ;; -export-dynamic) export_dynamic=yes continue ;; -export-symbols | -export-symbols-regex) if test -n "$export_symbols" || test -n "$export_symbols_regex"; then func_fatal_error "more than one -exported-symbols argument is not allowed" fi if test "X$arg" = "X-export-symbols"; then prev=expsyms else prev=expsyms_regex fi continue ;; -framework) prev=framework continue ;; -inst-prefix-dir) prev=inst_prefix continue ;; # The native IRIX linker understands -LANG:*, -LIST:* and -LNO:* # so, if we see these flags be careful not to treat them like -L -L[A-Z][A-Z]*:*) case $with_gcc/$host in no/*-*-irix* | /*-*-irix*) func_append compile_command " $arg" func_append finalize_command " $arg" ;; esac continue ;; -L*) func_stripname "-L" '' "$arg" if test -z "$func_stripname_result"; then if test "$#" -gt 0; then func_fatal_error "require no space between \`-L' and \`$1'" else func_fatal_error "need path for \`-L' option" fi fi func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; *) absdir=`cd "$dir" && pwd` test -z "$absdir" && \ func_fatal_error "cannot determine absolute directory name of \`$dir'" dir="$absdir" ;; esac case "$deplibs " in *" -L$dir "* | *" $arg "*) # Will only happen for absolute or sysroot arguments ;; *) # Preserve sysroot, but never include relative directories case $dir in [\\/]* | [A-Za-z]:[\\/]* | =*) func_append deplibs " $arg" ;; *) func_append deplibs " -L$dir" ;; esac func_append lib_search_path " $dir" ;; esac case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`$ECHO "$dir" | $SED 's*/lib$*/bin*'` case :$dllsearchpath: in *":$dir:"*) ;; ::) dllsearchpath=$dir;; *) func_append dllsearchpath ":$dir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac continue ;; -l*) if test "X$arg" = "X-lc" || test "X$arg" = "X-lm"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-beos* | *-cegcc* | *-*-haiku*) # These systems don't actually have a C or math library (as such) continue ;; *-*-os2*) # These systems don't actually have a C library (as such) test "X$arg" = "X-lc" && continue ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. test "X$arg" = "X-lc" && continue ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C and math libraries are in the System framework func_append deplibs " System.ltframework" continue ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype test "X$arg" = "X-lc" && continue ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work test "X$arg" = "X-lc" && continue ;; esac elif test "X$arg" = "X-lc_r"; then case $host in *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc_r directly, use -pthread flag. continue ;; esac fi func_append deplibs " $arg" continue ;; -module) module=yes continue ;; # Tru64 UNIX uses -model [arg] to determine the layout of C++ # classes, name mangling, and exception handling. # Darwin uses the -arch flag to determine output architecture. -model|-arch|-isysroot|--sysroot) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" prev=xcompiler continue ;; -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) func_append compiler_flags " $arg" func_append compile_command " $arg" func_append finalize_command " $arg" case "$new_inherited_linker_flags " in *" $arg "*) ;; * ) func_append new_inherited_linker_flags " $arg" ;; esac continue ;; -multi_module) single_module="${wl}-multi_module" continue ;; -no-fast-install) fast_install=no continue ;; -no-install) case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-darwin* | *-cegcc*) # The PATH hackery in wrapper scripts is required on Windows # and Darwin in order for the loader to find any dlls it needs. func_warning "\`-no-install' is ignored for $host" func_warning "assuming \`-no-fast-install' instead" fast_install=no ;; *) no_install=yes ;; esac continue ;; -no-undefined) allow_undefined=no continue ;; -objectlist) prev=objectlist continue ;; -o) prev=output ;; -precious-files-regex) prev=precious_regex continue ;; -release) prev=release continue ;; -rpath) prev=rpath continue ;; -R) prev=xrpath continue ;; -R*) func_stripname '-R' '' "$arg" dir=$func_stripname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) ;; =*) func_stripname '=' '' "$dir" dir=$lt_sysroot$func_stripname_result ;; *) func_fatal_error "only absolute run-paths are allowed" ;; esac case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac continue ;; -shared) # The effects of -shared are defined in a previous loop. continue ;; -shrext) prev=shrext continue ;; -static | -static-libtool-libs) # The effects of -static are defined in a previous loop. # We used to do the same as -all-static on platforms that # didn't have a PIC flag, but the assumption that the effects # would be equivalent was wrong. It would break on at least # Digital Unix and AIX. continue ;; -thread-safe) thread_safe=yes continue ;; -version-info) prev=vinfo continue ;; -version-number) prev=vinfo vinfo_number=yes continue ;; -weak) prev=weak continue ;; -Wc,*) func_stripname '-Wc,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $func_quote_for_eval_result" func_append compiler_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Wl,*) func_stripname '-Wl,' '' "$arg" args=$func_stripname_result arg= save_ifs="$IFS"; IFS=',' for flag in $args; do IFS="$save_ifs" func_quote_for_eval "$flag" func_append arg " $wl$func_quote_for_eval_result" func_append compiler_flags " $wl$func_quote_for_eval_result" func_append linker_flags " $func_quote_for_eval_result" done IFS="$save_ifs" func_stripname ' ' '' "$arg" arg=$func_stripname_result ;; -Xcompiler) prev=xcompiler continue ;; -Xlinker) prev=xlinker continue ;; -XCClinker) prev=xcclinker continue ;; # -msg_* for osf cc -msg_*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; # Flags to be passed through unchanged, with rationale: # -64, -mips[0-9] enable 64-bit mode for the SGI compiler # -r[0-9][0-9]* specify processor for the SGI compiler # -xarch=*, -xtarget=* enable 64-bit mode for the Sun compiler # +DA*, +DD* enable 64-bit mode for the HP compiler # -q* compiler args for the IBM compiler # -m*, -t[45]*, -txscale* architecture-specific flags for GCC # -F/path path to uninstalled frameworks, gcc on darwin # -p, -pg, --coverage, -fprofile-* profiling flags for GCC # @file GCC response files # -tp=* Portland pgcc target processor selection # --sysroot=* for sysroot support # -O*, -flto*, -fwhopr*, -fuse-linker-plugin GCC link-time optimization -64|-mips[0-9]|-r[0-9][0-9]*|-xarch=*|-xtarget=*|+DA*|+DD*|-q*|-m*| \ -t[45]*|-txscale*|-p|-pg|--coverage|-fprofile-*|-F*|@*|-tp=*|--sysroot=*| \ -O*|-flto*|-fwhopr*|-fuse-linker-plugin) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" func_append compile_command " $arg" func_append finalize_command " $arg" func_append compiler_flags " $arg" continue ;; # Some other compiler flag. -* | +*) func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; *.$objext) # A standard object. func_append objs " $arg" ;; *.lo) # A libtool-controlled object. # Check to see that this really is a libtool object. if func_lalib_unsafe_p "$arg"; then pic_object= non_pic_object= # Read the .lo file func_source "$arg" if test -z "$pic_object" || test -z "$non_pic_object" || test "$pic_object" = none && test "$non_pic_object" = none; then func_fatal_error "cannot find name of object for \`$arg'" fi # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" if test "$pic_object" != none; then # Prepend the subdirectory the object is found in. pic_object="$xdir$pic_object" if test "$prev" = dlfiles; then if test "$build_libtool_libs" = yes && test "$dlopen_support" = yes; then func_append dlfiles " $pic_object" prev= continue else # If libtool objects are unsupported, then we need to preload. prev=dlprefiles fi fi # CHECK ME: I think I busted this. -Ossama if test "$prev" = dlprefiles; then # Preload the old-style object. func_append dlprefiles " $pic_object" prev= fi # A PIC object. func_append libobjs " $pic_object" arg="$pic_object" fi # Non-PIC object. if test "$non_pic_object" != none; then # Prepend the subdirectory the object is found in. non_pic_object="$xdir$non_pic_object" # A standard non-PIC object func_append non_pic_objects " $non_pic_object" if test -z "$pic_object" || test "$pic_object" = none ; then arg="$non_pic_object" fi else # If the PIC object exists, use it instead. # $xdir was prepended to $pic_object above. non_pic_object="$pic_object" func_append non_pic_objects " $non_pic_object" fi else # Only an error if not doing a dry-run. if $opt_dry_run; then # Extract subdirectory from the argument. func_dirname "$arg" "/" "" xdir="$func_dirname_result" func_lo2o "$arg" pic_object=$xdir$objdir/$func_lo2o_result non_pic_object=$xdir$func_lo2o_result func_append libobjs " $pic_object" func_append non_pic_objects " $non_pic_object" else func_fatal_error "\`$arg' is not a valid libtool object" fi fi ;; *.$libext) # An archive. func_append deplibs " $arg" func_append old_deplibs " $arg" continue ;; *.la) # A libtool-controlled library. func_resolve_sysroot "$arg" if test "$prev" = dlfiles; then # This library was specified with -dlopen. func_append dlfiles " $func_resolve_sysroot_result" prev= elif test "$prev" = dlprefiles; then # The library was specified with -dlpreopen. func_append dlprefiles " $func_resolve_sysroot_result" prev= else func_append deplibs " $func_resolve_sysroot_result" fi continue ;; # Some other compiler argument. *) # Unknown arguments in both finalize_command and compile_command need # to be aesthetically quoted because they are evaled later. func_quote_for_eval "$arg" arg="$func_quote_for_eval_result" ;; esac # arg # Now actually substitute the argument into the commands. if test -n "$arg"; then func_append compile_command " $arg" func_append finalize_command " $arg" fi done # argument parsing loop test -n "$prev" && \ func_fatal_help "the \`$prevarg' option requires an argument" if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then eval arg=\"$export_dynamic_flag_spec\" func_append compile_command " $arg" func_append finalize_command " $arg" fi oldlibs= # calculate the name of the file, without its directory func_basename "$output" outputname="$func_basename_result" libobjs_save="$libobjs" if test -n "$shlibpath_var"; then # get the directories listed in $shlibpath_var eval shlib_search_path=\`\$ECHO \"\${$shlibpath_var}\" \| \$SED \'s/:/ /g\'\` else shlib_search_path= fi eval sys_lib_search_path=\"$sys_lib_search_path_spec\" eval sys_lib_dlsearch_path=\"$sys_lib_dlsearch_path_spec\" func_dirname "$output" "/" "" output_objdir="$func_dirname_result$objdir" func_to_tool_file "$output_objdir/" tool_output_objdir=$func_to_tool_file_result # Create the object directory. func_mkdir_p "$output_objdir" # Determine the type of output case $output in "") func_fatal_help "you must specify an output file" ;; *.$libext) linkmode=oldlib ;; *.lo | *.$objext) linkmode=obj ;; *.la) linkmode=lib ;; *) linkmode=prog ;; # Anything else should be a program. esac specialdeplibs= libs= # Find all interdependent deplibs by searching for libraries # that are linked more than once (e.g. -la -lb -la) for deplib in $deplibs; do if $opt_preserve_dup_deps ; then case "$libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append libs " $deplib" done if test "$linkmode" = lib; then libs="$predeps $libs $compiler_lib_search_path $postdeps" # Compute libraries that are listed more than once in $predeps # $postdeps and mark them as special (i.e., whose duplicates are # not to be eliminated). pre_post_deps= if $opt_duplicate_compiler_generated_deps; then for pre_post_dep in $predeps $postdeps; do case "$pre_post_deps " in *" $pre_post_dep "*) func_append specialdeplibs " $pre_post_deps" ;; esac func_append pre_post_deps " $pre_post_dep" done fi pre_post_deps= fi deplibs= newdependency_libs= newlib_search_path= need_relink=no # whether we're linking any uninstalled libtool libraries notinst_deplibs= # not-installed libtool libraries notinst_path= # paths that contain not-installed libtool libraries case $linkmode in lib) passes="conv dlpreopen link" for file in $dlfiles $dlprefiles; do case $file in *.la) ;; *) func_fatal_help "libraries can \`-dlopen' only libtool libraries: $file" ;; esac done ;; prog) compile_deplibs= finalize_deplibs= alldeplibs=no newdlfiles= newdlprefiles= passes="conv scan dlopen dlpreopen link" ;; *) passes="conv" ;; esac for pass in $passes; do # The preopen pass in lib mode reverses $deplibs; put it back here # so that -L comes before libs that need it for instance... if test "$linkmode,$pass" = "lib,link"; then ## FIXME: Find the place where the list is rebuilt in the wrong ## order, and fix it there properly tmp_deplibs= for deplib in $deplibs; do tmp_deplibs="$deplib $tmp_deplibs" done deplibs="$tmp_deplibs" fi if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan"; then libs="$deplibs" deplibs= fi if test "$linkmode" = prog; then case $pass in dlopen) libs="$dlfiles" ;; dlpreopen) libs="$dlprefiles" ;; link) libs="$deplibs %DEPLIBS% $dependency_libs" ;; esac fi if test "$linkmode,$pass" = "lib,dlpreopen"; then # Collect and forward deplibs of preopened libtool libs for lib in $dlprefiles; do # Ignore non-libtool-libs dependency_libs= func_resolve_sysroot "$lib" case $lib in *.la) func_source "$func_resolve_sysroot_result" ;; esac # Collect preopened libtool deplibs, except any this library # has declared as weak libs for deplib in $dependency_libs; do func_basename "$deplib" deplib_base=$func_basename_result case " $weak_libs " in *" $deplib_base "*) ;; *) func_append deplibs " $deplib" ;; esac done done libs="$dlprefiles" fi if test "$pass" = dlopen; then # Collect dlpreopened libraries save_deplibs="$deplibs" deplibs= fi for deplib in $libs; do lib= found=no case $deplib in -mt|-mthreads|-kthread|-Kthread|-pthread|-pthreads|--thread-safe \ |-threads|-fopenmp|-openmp|-mp|-xopenmp|-omp|-qsmp=*) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append compiler_flags " $deplib" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -l*) if test "$linkmode" != lib && test "$linkmode" != prog; then func_warning "\`-l' is ignored for archives/objects" continue fi func_stripname '-l' '' "$deplib" name=$func_stripname_result if test "$linkmode" = lib; then searchdirs="$newlib_search_path $lib_search_path $compiler_lib_search_dirs $sys_lib_search_path $shlib_search_path" else searchdirs="$newlib_search_path $lib_search_path $sys_lib_search_path $shlib_search_path" fi for searchdir in $searchdirs; do for search_ext in .la $std_shrext .so .a; do # Search the libtool library lib="$searchdir/lib${name}${search_ext}" if test -f "$lib"; then if test "$search_ext" = ".la"; then found=yes else found=no fi break 2 fi done done if test "$found" != yes; then # deplib doesn't seem to be a libtool library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue else # deplib is a libtool library # If $allow_libtool_libs_with_static_runtimes && $deplib is a stdlib, # We need to do some special things here, and not later. if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $deplib "*) if func_lalib_p "$lib"; then library_names= old_library= func_source "$lib" for l in $old_library $library_names; do ll="$l" done if test "X$ll" = "X$old_library" ; then # only static version available found=no func_dirname "$lib" "" "." ladir="$func_dirname_result" lib=$ladir/$old_library if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" test "$linkmode" = lib && newdependency_libs="$deplib $newdependency_libs" fi continue fi fi ;; *) ;; esac fi fi ;; # -l *.ltframework) if test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else deplibs="$deplib $deplibs" if test "$linkmode" = lib ; then case "$new_inherited_linker_flags " in *" $deplib "*) ;; * ) func_append new_inherited_linker_flags " $deplib" ;; esac fi fi continue ;; -L*) case $linkmode in lib) deplibs="$deplib $deplibs" test "$pass" = conv && continue newdependency_libs="$deplib $newdependency_libs" func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; prog) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi if test "$pass" = scan; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; *) func_warning "\`-L' is ignored for archives/objects" ;; esac # linkmode continue ;; # -L -R*) if test "$pass" = link; then func_stripname '-R' '' "$deplib" func_resolve_sysroot "$func_stripname_result" dir=$func_resolve_sysroot_result # Make sure the xrpath contains only unique directories. case "$xrpath " in *" $dir "*) ;; *) func_append xrpath " $dir" ;; esac fi deplibs="$deplib $deplibs" continue ;; *.la) func_resolve_sysroot "$deplib" lib=$func_resolve_sysroot_result ;; *.$libext) if test "$pass" = conv; then deplibs="$deplib $deplibs" continue fi case $linkmode in lib) # Linking convenience modules into shared libraries is allowed, # but linking other static libraries is non-portable. case " $dlpreconveniencelibs " in *" $deplib "*) ;; *) valid_a_lib=no case $deplibs_check_method in match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` if eval "\$ECHO \"$deplib\"" 2>/dev/null | $SED 10q \ | $EGREP "$match_pattern_regex" > /dev/null; then valid_a_lib=yes fi ;; pass_all) valid_a_lib=yes ;; esac if test "$valid_a_lib" != yes; then echo $ECHO "*** Warning: Trying to link with static lib archive $deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because the file extensions .$libext of this argument makes me believe" echo "*** that it is just a static archive that I should not use here." else echo $ECHO "*** Warning: Linking the shared library $output against the" $ECHO "*** static library $deplib is not portable!" deplibs="$deplib $deplibs" fi ;; esac continue ;; prog) if test "$pass" != link; then deplibs="$deplib $deplibs" else compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" fi continue ;; esac # linkmode ;; # *.$libext *.lo | *.$objext) if test "$pass" = conv; then deplibs="$deplib $deplibs" elif test "$linkmode" = prog; then if test "$pass" = dlpreopen || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlopen support or we're linking statically, # we need to preload. func_append newdlprefiles " $deplib" compile_deplibs="$deplib $compile_deplibs" finalize_deplibs="$deplib $finalize_deplibs" else func_append newdlfiles " $deplib" fi fi continue ;; %DEPLIBS%) alldeplibs=yes continue ;; esac # case $deplib if test "$found" = yes || test -f "$lib"; then : else func_fatal_error "cannot find the library \`$lib' or unhandled argument \`$deplib'" fi # Check to see that this really is a libtool archive. func_lalib_unsafe_p "$lib" \ || func_fatal_error "\`$lib' is not a valid libtool archive" func_dirname "$lib" "" "." ladir="$func_dirname_result" dlname= dlopen= dlpreopen= libdir= library_names= old_library= inherited_linker_flags= # If the library was installed with an old release of libtool, # it will not redefine variables installed, or shouldnotlink installed=yes shouldnotlink=no avoidtemprpath= # Read the .la file func_source "$lib" # Convert "-framework foo" to "foo.ltframework" if test -n "$inherited_linker_flags"; then tmp_inherited_linker_flags=`$ECHO "$inherited_linker_flags" | $SED 's/-framework \([^ $]*\)/\1.ltframework/g'` for tmp_inherited_linker_flag in $tmp_inherited_linker_flags; do case " $new_inherited_linker_flags " in *" $tmp_inherited_linker_flag "*) ;; *) func_append new_inherited_linker_flags " $tmp_inherited_linker_flag";; esac done fi dependency_libs=`$ECHO " $dependency_libs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` if test "$linkmode,$pass" = "lib,link" || test "$linkmode,$pass" = "prog,scan" || { test "$linkmode" != prog && test "$linkmode" != lib; }; then test -n "$dlopen" && func_append dlfiles " $dlopen" test -n "$dlpreopen" && func_append dlprefiles " $dlpreopen" fi if test "$pass" = conv; then # Only check for convenience libraries deplibs="$lib $deplibs" if test -z "$libdir"; then if test -z "$old_library"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # It is a libtool convenience library, so add in its objects. func_append convenience " $ladir/$objdir/$old_library" func_append old_convenience " $ladir/$objdir/$old_library" elif test "$linkmode" != prog && test "$linkmode" != lib; then func_fatal_error "\`$lib' is not a convenience library" fi tmp_libs= for deplib in $dependency_libs; do deplibs="$deplib $deplibs" if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done continue fi # $pass = conv # Get the name of the library we link against. linklib= if test -n "$old_library" && { test "$prefer_static_libs" = yes || test "$prefer_static_libs,$installed" = "built,no"; }; then linklib=$old_library else for l in $old_library $library_names; do linklib="$l" done fi if test -z "$linklib"; then func_fatal_error "cannot find name of link library for \`$lib'" fi # This library was specified with -dlopen. if test "$pass" = dlopen; then if test -z "$libdir"; then func_fatal_error "cannot -dlopen a convenience library: \`$lib'" fi if test -z "$dlname" || test "$dlopen_support" != yes || test "$build_libtool_libs" = no; then # If there is no dlname, no dlopen support or we're linking # statically, we need to preload. We also need to preload any # dependent libraries so libltdl's deplib preloader doesn't # bomb out in the load deplibs phase. func_append dlprefiles " $lib $dependency_libs" else func_append newdlfiles " $lib" fi continue fi # $pass = dlopen # We need an absolute path. case $ladir in [\\/]* | [A-Za-z]:[\\/]*) abs_ladir="$ladir" ;; *) abs_ladir=`cd "$ladir" && pwd` if test -z "$abs_ladir"; then func_warning "cannot determine absolute directory name of \`$ladir'" func_warning "passing it literally to the linker, although it might fail" abs_ladir="$ladir" fi ;; esac func_basename "$lib" laname="$func_basename_result" # Find the relevant object directory and library name. if test "X$installed" = Xyes; then if test ! -f "$lt_sysroot$libdir/$linklib" && test -f "$abs_ladir/$linklib"; then func_warning "library \`$lib' was moved." dir="$ladir" absdir="$abs_ladir" libdir="$abs_ladir" else dir="$lt_sysroot$libdir" absdir="$lt_sysroot$libdir" fi test "X$hardcode_automatic" = Xyes && avoidtemprpath=yes else if test ! -f "$ladir/$objdir/$linklib" && test -f "$abs_ladir/$linklib"; then dir="$ladir" absdir="$abs_ladir" # Remove this search path later func_append notinst_path " $abs_ladir" else dir="$ladir/$objdir" absdir="$abs_ladir/$objdir" # Remove this search path later func_append notinst_path " $abs_ladir" fi fi # $installed = yes func_stripname 'lib' '.la' "$laname" name=$func_stripname_result # This library was specified with -dlpreopen. if test "$pass" = dlpreopen; then if test -z "$libdir" && test "$linkmode" = prog; then func_fatal_error "only libraries may -dlpreopen a convenience library: \`$lib'" fi case "$host" in # special handling for platforms with PE-DLLs. *cygwin* | *mingw* | *cegcc* ) # Linker will automatically link against shared library if both # static and shared are present. Therefore, ensure we extract # symbols from the import library if a shared library is present # (otherwise, the dlopen module name will be incorrect). We do # this by putting the import library name into $newdlprefiles. # We recover the dlopen module name by 'saving' the la file # name in a special purpose variable, and (later) extracting the # dlname from the la file. if test -n "$dlname"; then func_tr_sh "$dir/$linklib" eval "libfile_$func_tr_sh_result=\$abs_ladir/\$laname" func_append newdlprefiles " $dir/$linklib" else func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" fi ;; * ) # Prefer using a static library (so that no silly _DYNAMIC symbols # are required to link). if test -n "$old_library"; then func_append newdlprefiles " $dir/$old_library" # Keep a list of preopened convenience libraries to check # that they are being used correctly in the link pass. test -z "$libdir" && \ func_append dlpreconveniencelibs " $dir/$old_library" # Otherwise, use the dlname, so that lt_dlopen finds it. elif test -n "$dlname"; then func_append newdlprefiles " $dir/$dlname" else func_append newdlprefiles " $dir/$linklib" fi ;; esac fi # $pass = dlpreopen if test -z "$libdir"; then # Link the convenience library if test "$linkmode" = lib; then deplibs="$dir/$old_library $deplibs" elif test "$linkmode,$pass" = "prog,link"; then compile_deplibs="$dir/$old_library $compile_deplibs" finalize_deplibs="$dir/$old_library $finalize_deplibs" else deplibs="$lib $deplibs" # used for prog,scan pass fi continue fi if test "$linkmode" = prog && test "$pass" != link; then func_append newlib_search_path " $ladir" deplibs="$lib $deplibs" linkalldeplibs=no if test "$link_all_deplibs" != no || test -z "$library_names" || test "$build_libtool_libs" = no; then linkalldeplibs=yes fi tmp_libs= for deplib in $dependency_libs; do case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result" func_append newlib_search_path " $func_resolve_sysroot_result" ;; esac # Need to link against all dependency_libs? if test "$linkalldeplibs" = yes; then deplibs="$deplib $deplibs" else # Need to hardcode shared library paths # or/and link against static libraries newdependency_libs="$deplib $newdependency_libs" fi if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $deplib "*) func_append specialdeplibs " $deplib" ;; esac fi func_append tmp_libs " $deplib" done # for deplib continue fi # $linkmode = prog... if test "$linkmode,$pass" = "prog,link"; then if test -n "$library_names" && { { test "$prefer_static_libs" = no || test "$prefer_static_libs,$installed" = "built,yes"; } || test -z "$old_library"; }; then # We need to hardcode the library path if test -n "$shlibpath_var" && test -z "$avoidtemprpath" ; then # Make sure the rpath contains only unique directories. case "$temp_rpath:" in *"$absdir:"*) ;; *) func_append temp_rpath "$absdir:" ;; esac fi # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi # $linkmode,$pass = prog,link... if test "$alldeplibs" = yes && { test "$deplibs_check_method" = pass_all || { test "$build_libtool_libs" = yes && test -n "$library_names"; }; }; then # We only need to search for static libraries continue fi fi link_static=no # Whether the deplib will be linked statically use_static_libs=$prefer_static_libs if test "$use_static_libs" = built && test "$installed" = yes; then use_static_libs=no fi if test -n "$library_names" && { test "$use_static_libs" = no || test -z "$old_library"; }; then case $host in *cygwin* | *mingw* | *cegcc*) # No point in relinking DLLs because paths are not encoded func_append notinst_deplibs " $lib" need_relink=no ;; *) if test "$installed" = no; then func_append notinst_deplibs " $lib" need_relink=yes fi ;; esac # This is a shared library # Warn about portability, can't link against -module's on some # systems (darwin). Don't bleat about dlopened modules though! dlopenmodule="" for dlpremoduletest in $dlprefiles; do if test "X$dlpremoduletest" = "X$lib"; then dlopenmodule="$dlpremoduletest" break fi done if test -z "$dlopenmodule" && test "$shouldnotlink" = yes && test "$pass" = link; then echo if test "$linkmode" = prog; then $ECHO "*** Warning: Linking the executable $output against the loadable module" else $ECHO "*** Warning: Linking the shared library $output against the loadable module" fi $ECHO "*** $linklib is not portable!" fi if test "$linkmode" = lib && test "$hardcode_into_libs" = yes; then # Hardcode the library path. # Skip directories that are in the system default run-time # search path. case " $sys_lib_dlsearch_path " in *" $absdir "*) ;; *) case "$compile_rpath " in *" $absdir "*) ;; *) func_append compile_rpath " $absdir" ;; esac ;; esac case " $sys_lib_dlsearch_path " in *" $libdir "*) ;; *) case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac ;; esac fi if test -n "$old_archive_from_expsyms_cmds"; then # figure out the soname set dummy $library_names shift realname="$1" shift libname=`eval "\\$ECHO \"$libname_spec\""` # use dlname if we got it. it's perfectly good, no? if test -n "$dlname"; then soname="$dlname" elif test -n "$soname_spec"; then # bleh windows case $host in *cygwin* | mingw* | *cegcc*) func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; esac eval soname=\"$soname_spec\" else soname="$realname" fi # Make a new name for the extract_expsyms_cmds to use soroot="$soname" func_basename "$soroot" soname="$func_basename_result" func_stripname 'lib' '.dll' "$soname" newlib=libimp-$func_stripname_result.a # If the library has no export list, then create one now if test -f "$output_objdir/$soname-def"; then : else func_verbose "extracting exported symbol list from \`$soname'" func_execute_cmds "$extract_expsyms_cmds" 'exit $?' fi # Create $newlib if test -f "$output_objdir/$newlib"; then :; else func_verbose "generating import library for \`$soname'" func_execute_cmds "$old_archive_from_expsyms_cmds" 'exit $?' fi # make sure the library variables are pointing to the new library dir=$output_objdir linklib=$newlib fi # test -n "$old_archive_from_expsyms_cmds" if test "$linkmode" = prog || test "$opt_mode" != relink; then add_shlibpath= add_dir= add= lib_linked=yes case $hardcode_action in immediate | unsupported) if test "$hardcode_direct" = no; then add="$dir/$linklib" case $host in *-*-sco3.2v5.0.[024]*) add_dir="-L$dir" ;; *-*-sysv4*uw2*) add_dir="-L$dir" ;; *-*-sysv5OpenUNIX* | *-*-sysv5UnixWare7.[01].[10]* | \ *-*-unixware7*) add_dir="-L$dir" ;; *-*-darwin* ) # if the lib is a (non-dlopened) module then we can not # link against it, someone is ignoring the earlier warnings if /usr/bin/file -L $add 2> /dev/null | $GREP ": [^:]* bundle" >/dev/null ; then if test "X$dlopenmodule" != "X$lib"; then $ECHO "*** Warning: lib $linklib is a module, not a shared library" if test -z "$old_library" ; then echo echo "*** And there doesn't seem to be a static archive available" echo "*** The link will probably fail, sorry" else add="$dir/$old_library" fi elif test -n "$old_library"; then add="$dir/$old_library" fi fi esac elif test "$hardcode_minus_L" = no; then case $host in *-*-sunos*) add_shlibpath="$dir" ;; esac add_dir="-L$dir" add="-l$name" elif test "$hardcode_shlibpath_var" = no; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; relink) if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$dir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$absdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then add_shlibpath="$dir" add="-l$name" else lib_linked=no fi ;; *) lib_linked=no ;; esac if test "$lib_linked" != yes; then func_fatal_configuration "unsupported hardcode properties" fi if test -n "$add_shlibpath"; then case :$compile_shlibpath: in *":$add_shlibpath:"*) ;; *) func_append compile_shlibpath "$add_shlibpath:" ;; esac fi if test "$linkmode" = prog; then test -n "$add_dir" && compile_deplibs="$add_dir $compile_deplibs" test -n "$add" && compile_deplibs="$add $compile_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" if test "$hardcode_direct" != yes && test "$hardcode_minus_L" != yes && test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac fi fi fi if test "$linkmode" = prog || test "$opt_mode" = relink; then add_shlibpath= add_dir= add= # Finalize command for both is simple: just hardcode it. if test "$hardcode_direct" = yes && test "$hardcode_direct_absolute" = no; then add="$libdir/$linklib" elif test "$hardcode_minus_L" = yes; then add_dir="-L$libdir" add="-l$name" elif test "$hardcode_shlibpath_var" = yes; then case :$finalize_shlibpath: in *":$libdir:"*) ;; *) func_append finalize_shlibpath "$libdir:" ;; esac add="-l$name" elif test "$hardcode_automatic" = yes; then if test -n "$inst_prefix_dir" && test -f "$inst_prefix_dir$libdir/$linklib" ; then add="$inst_prefix_dir$libdir/$linklib" else add="$libdir/$linklib" fi else # We cannot seem to hardcode it, guess we'll fake it. add_dir="-L$libdir" # Try looking first in the location we're being installed to. if test -n "$inst_prefix_dir"; then case $libdir in [\\/]*) func_append add_dir " -L$inst_prefix_dir$libdir" ;; esac fi add="-l$name" fi if test "$linkmode" = prog; then test -n "$add_dir" && finalize_deplibs="$add_dir $finalize_deplibs" test -n "$add" && finalize_deplibs="$add $finalize_deplibs" else test -n "$add_dir" && deplibs="$add_dir $deplibs" test -n "$add" && deplibs="$add $deplibs" fi fi elif test "$linkmode" = prog; then # Here we assume that one of hardcode_direct or hardcode_minus_L # is not unsupported. This is valid on all known static and # shared platforms. if test "$hardcode_direct" != unsupported; then test -n "$old_library" && linklib="$old_library" compile_deplibs="$dir/$linklib $compile_deplibs" finalize_deplibs="$dir/$linklib $finalize_deplibs" else compile_deplibs="-l$name -L$dir $compile_deplibs" finalize_deplibs="-l$name -L$dir $finalize_deplibs" fi elif test "$build_libtool_libs" = yes; then # Not a shared library if test "$deplibs_check_method" != pass_all; then # We're trying link a shared library against a static one # but the system doesn't support it. # Just print a warning and add the library to dependency_libs so # that the program can be linked against the static library. echo $ECHO "*** Warning: This system can not link to static lib archive $lib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have." if test "$module" = yes; then echo "*** But as you try to build a module library, libtool will still create " echo "*** a static module, that should work as long as the dlopening application" echo "*** is linked with the -dlopen flag to resolve symbols at runtime." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi else deplibs="$dir/$old_library $deplibs" link_static=yes fi fi # link shared/static library? if test "$linkmode" = lib; then if test -n "$dependency_libs" && { test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes || test "$link_static" = yes; }; then # Extract -R from dependency_libs temp_deplibs= for libdir in $dependency_libs; do case $libdir in -R*) func_stripname '-R' '' "$libdir" temp_xrpath=$func_stripname_result case " $xrpath " in *" $temp_xrpath "*) ;; *) func_append xrpath " $temp_xrpath";; esac;; *) func_append temp_deplibs " $libdir";; esac done dependency_libs="$temp_deplibs" fi func_append newlib_search_path " $absdir" # Link against this library test "$link_static" = no && newdependency_libs="$abs_ladir/$laname $newdependency_libs" # ... and its dependency_libs tmp_libs= for deplib in $dependency_libs; do newdependency_libs="$deplib $newdependency_libs" case $deplib in -L*) func_stripname '-L' '' "$deplib" func_resolve_sysroot "$func_stripname_result";; *) func_resolve_sysroot "$deplib" ;; esac if $opt_preserve_dup_deps ; then case "$tmp_libs " in *" $func_resolve_sysroot_result "*) func_append specialdeplibs " $func_resolve_sysroot_result" ;; esac fi func_append tmp_libs " $func_resolve_sysroot_result" done if test "$link_all_deplibs" != no; then # Add the search paths of all dependency libraries for deplib in $dependency_libs; do path= case $deplib in -L*) path="$deplib" ;; *.la) func_resolve_sysroot "$deplib" deplib=$func_resolve_sysroot_result func_dirname "$deplib" "" "." dir=$func_dirname_result # We need an absolute path. case $dir in [\\/]* | [A-Za-z]:[\\/]*) absdir="$dir" ;; *) absdir=`cd "$dir" && pwd` if test -z "$absdir"; then func_warning "cannot determine absolute directory name of \`$dir'" absdir="$dir" fi ;; esac if $GREP "^installed=no" $deplib > /dev/null; then case $host in *-*-darwin*) depdepl= eval deplibrary_names=`${SED} -n -e 's/^library_names=\(.*\)$/\1/p' $deplib` if test -n "$deplibrary_names" ; then for tmp in $deplibrary_names ; do depdepl=$tmp done if test -f "$absdir/$objdir/$depdepl" ; then depdepl="$absdir/$objdir/$depdepl" darwin_install_name=`${OTOOL} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` if test -z "$darwin_install_name"; then darwin_install_name=`${OTOOL64} -L $depdepl | awk '{if (NR == 2) {print $1;exit}}'` fi func_append compiler_flags " ${wl}-dylib_file ${wl}${darwin_install_name}:${depdepl}" func_append linker_flags " -dylib_file ${darwin_install_name}:${depdepl}" path= fi fi ;; *) path="-L$absdir/$objdir" ;; esac else eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $deplib` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" test "$absdir" != "$libdir" && \ func_warning "\`$deplib' seems to be moved" path="-L$absdir" fi ;; esac case " $deplibs " in *" $path "*) ;; *) deplibs="$path $deplibs" ;; esac done fi # link_all_deplibs != no fi # linkmode = lib done # for deplib in $libs if test "$pass" = link; then if test "$linkmode" = "prog"; then compile_deplibs="$new_inherited_linker_flags $compile_deplibs" finalize_deplibs="$new_inherited_linker_flags $finalize_deplibs" else compiler_flags="$compiler_flags "`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` fi fi dependency_libs="$newdependency_libs" if test "$pass" = dlpreopen; then # Link the dlpreopened libraries before other libraries for deplib in $save_deplibs; do deplibs="$deplib $deplibs" done fi if test "$pass" != dlopen; then if test "$pass" != conv; then # Make sure lib_search_path contains only unique directories. lib_search_path= for dir in $newlib_search_path; do case "$lib_search_path " in *" $dir "*) ;; *) func_append lib_search_path " $dir" ;; esac done newlib_search_path= fi if test "$linkmode,$pass" != "prog,link"; then vars="deplibs" else vars="compile_deplibs finalize_deplibs" fi for var in $vars dependency_libs; do # Add libraries to $var in reverse order eval tmp_libs=\"\$$var\" new_libs= for deplib in $tmp_libs; do # FIXME: Pedantically, this is the right thing to do, so # that some nasty dependency loop isn't accidentally # broken: #new_libs="$deplib $new_libs" # Pragmatically, this seems to cause very few problems in # practice: case $deplib in -L*) new_libs="$deplib $new_libs" ;; -R*) ;; *) # And here is the reason: when a library appears more # than once as an explicit dependence of a library, or # is implicitly linked in more than once by the # compiler, it is considered special, and multiple # occurrences thereof are not removed. Compare this # with having the same library being listed as a # dependency of multiple other libraries: in this case, # we know (pedantically, we assume) the library does not # need to be listed more than once, so we keep only the # last copy. This is not always right, but it is rare # enough that we require users that really mean to play # such unportable linking tricks to link the library # using -Wl,-lname, so that libtool does not consider it # for duplicate removal. case " $specialdeplibs " in *" $deplib "*) new_libs="$deplib $new_libs" ;; *) case " $new_libs " in *" $deplib "*) ;; *) new_libs="$deplib $new_libs" ;; esac ;; esac ;; esac done tmp_libs= for deplib in $new_libs; do case $deplib in -L*) case " $tmp_libs " in *" $deplib "*) ;; *) func_append tmp_libs " $deplib" ;; esac ;; *) func_append tmp_libs " $deplib" ;; esac done eval $var=\"$tmp_libs\" done # for var fi # Last step: remove runtime libs from dependency_libs # (they stay in deplibs) tmp_libs= for i in $dependency_libs ; do case " $predeps $postdeps $compiler_lib_search_path " in *" $i "*) i="" ;; esac if test -n "$i" ; then func_append tmp_libs " $i" fi done dependency_libs=$tmp_libs done # for pass if test "$linkmode" = prog; then dlfiles="$newdlfiles" fi if test "$linkmode" = prog || test "$linkmode" = lib; then dlprefiles="$newdlprefiles" fi case $linkmode in oldlib) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for archives" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for archives" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for archives" test -n "$xrpath" && \ func_warning "\`-R' is ignored for archives" test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for archives" test -n "$release" && \ func_warning "\`-release' is ignored for archives" test -n "$export_symbols$export_symbols_regex" && \ func_warning "\`-export-symbols' is ignored for archives" # Now set the variables for building old libraries. build_libtool_libs=no oldlibs="$output" func_append objs "$old_deplibs" ;; lib) # Make sure we only generate libraries of the form `libNAME.la'. case $outputname in lib*) func_stripname 'lib' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" ;; *) test "$module" = no && \ func_fatal_help "libtool library \`$output' must begin with \`lib'" if test "$need_lib_prefix" != no; then # Add the "lib" prefix for modules if required func_stripname '' '.la' "$outputname" name=$func_stripname_result eval shared_ext=\"$shrext_cmds\" eval libname=\"$libname_spec\" else func_stripname '' '.la' "$outputname" libname=$func_stripname_result fi ;; esac if test -n "$objs"; then if test "$deplibs_check_method" != pass_all; then func_fatal_error "cannot build libtool library \`$output' from non-libtool objects on this host:$objs" else echo $ECHO "*** Warning: Linking the shared library $output against the non-libtool" $ECHO "*** objects $objs is not portable!" func_append libobjs " $objs" fi fi test "$dlself" != no && \ func_warning "\`-dlopen self' is ignored for libtool libraries" set dummy $rpath shift test "$#" -gt 1 && \ func_warning "ignoring multiple \`-rpath's for a libtool library" install_libdir="$1" oldlibs= if test -z "$rpath"; then if test "$build_libtool_libs" = yes; then # Building a libtool convenience library. # Some compilers have problems with a `.al' extension so # convenience libraries should have the same extension an # archive normally would. oldlibs="$output_objdir/$libname.$libext $oldlibs" build_libtool_libs=convenience build_old_libs=yes fi test -n "$vinfo" && \ func_warning "\`-version-info/-version-number' is ignored for convenience libraries" test -n "$release" && \ func_warning "\`-release' is ignored for convenience libraries" else # Parse the version information argument. save_ifs="$IFS"; IFS=':' set dummy $vinfo 0 0 0 shift IFS="$save_ifs" test -n "$7" && \ func_fatal_help "too many parameters to \`-version-info'" # convert absolute version numbers to libtool ages # this retains compatibility with .la files and attempts # to make the code below a bit more comprehensible case $vinfo_number in yes) number_major="$1" number_minor="$2" number_revision="$3" # # There are really only two kinds -- those that # use the current revision as the major version # and those that subtract age and use age as # a minor version. But, then there is irix # which has an extra 1 added just for fun # case $version_type in # correct linux to gnu/linux during the next big refactor darwin|linux|osf|windows|none) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_revision" ;; freebsd-aout|freebsd-elf|qnx|sunos) current="$number_major" revision="$number_minor" age="0" ;; irix|nonstopux) func_arith $number_major + $number_minor current=$func_arith_result age="$number_minor" revision="$number_minor" lt_irix_increment=no ;; esac ;; no) current="$1" revision="$2" age="$3" ;; esac # Check that each of the things are valid numbers. case $current in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "CURRENT \`$current' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $revision in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "REVISION \`$revision' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac case $age in 0|[1-9]|[1-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9][0-9][0-9]|[1-9][0-9][0-9][0-9][0-9]) ;; *) func_error "AGE \`$age' must be a nonnegative integer" func_fatal_error "\`$vinfo' is not valid version information" ;; esac if test "$age" -gt "$current"; then func_error "AGE \`$age' is greater than the current interface number \`$current'" func_fatal_error "\`$vinfo' is not valid version information" fi # Calculate the version variables. major= versuffix= verstring= case $version_type in none) ;; darwin) # Like Linux, but with the current version available in # verstring for coding it into the library header func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" # Darwin ld doesn't like 0 for these options... func_arith $current + 1 minor_current=$func_arith_result xlcverstring="${wl}-compatibility_version ${wl}$minor_current ${wl}-current_version ${wl}$minor_current.$revision" verstring="-compatibility_version $minor_current -current_version $minor_current.$revision" ;; freebsd-aout) major=".$current" versuffix=".$current.$revision"; ;; freebsd-elf) major=".$current" versuffix=".$current" ;; irix | nonstopux) if test "X$lt_irix_increment" = "Xno"; then func_arith $current - $age else func_arith $current - $age + 1 fi major=$func_arith_result case $version_type in nonstopux) verstring_prefix=nonstopux ;; *) verstring_prefix=sgi ;; esac verstring="$verstring_prefix$major.$revision" # Add in all the interfaces that we are compatible with. loop=$revision while test "$loop" -ne 0; do func_arith $revision - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring_prefix$major.$iface:$verstring" done # Before this point, $major must not contain `.'. major=.$major versuffix="$major.$revision" ;; linux) # correct to gnu/linux during the next big refactor func_arith $current - $age major=.$func_arith_result versuffix="$major.$age.$revision" ;; osf) func_arith $current - $age major=.$func_arith_result versuffix=".$current.$age.$revision" verstring="$current.$age.$revision" # Add in all the interfaces that we are compatible with. loop=$age while test "$loop" -ne 0; do func_arith $current - $loop iface=$func_arith_result func_arith $loop - 1 loop=$func_arith_result verstring="$verstring:${iface}.0" done # Make executables depend on our current version. func_append verstring ":${current}.0" ;; qnx) major=".$current" versuffix=".$current" ;; sunos) major=".$current" versuffix=".$current.$revision" ;; windows) # Use '-' rather than '.', since we only want one # extension on DOS 8.3 filesystems. func_arith $current - $age major=$func_arith_result versuffix="-$major" ;; *) func_fatal_configuration "unknown library version type \`$version_type'" ;; esac # Clear the version info if we defaulted, and they specified a release. if test -z "$vinfo" && test -n "$release"; then major= case $version_type in darwin) # we can't check for "0.0" in archive_cmds due to quoting # problems, so we reset it completely verstring= ;; *) verstring="0.0" ;; esac if test "$need_version" = no; then versuffix= else versuffix=".0.0" fi fi # Remove version info from name if versioning should be avoided if test "$avoid_version" = yes && test "$need_version" = no; then major= versuffix= verstring="" fi # Check to see if the archive will have undefined symbols. if test "$allow_undefined" = yes; then if test "$allow_undefined_flag" = unsupported; then func_warning "undefined symbols not allowed in $host shared libraries" build_libtool_libs=no build_old_libs=yes fi else # Don't allow undefined symbols. allow_undefined_flag="$no_undefined_flag" fi fi func_generate_dlsyms "$libname" "$libname" "yes" func_append libobjs " $symfileobj" test "X$libobjs" = "X " && libobjs= if test "$opt_mode" != relink; then # Remove our outputs, but don't remove object files since they # may have been created when compiling PIC objects. removelist= tempremovelist=`$ECHO "$output_objdir/*"` for p in $tempremovelist; do case $p in *.$objext | *.gcno) ;; $output_objdir/$outputname | $output_objdir/$libname.* | $output_objdir/${libname}${release}.*) if test "X$precious_files_regex" != "X"; then if $ECHO "$p" | $EGREP -e "$precious_files_regex" >/dev/null 2>&1 then continue fi fi func_append removelist " $p" ;; *) ;; esac done test -n "$removelist" && \ func_show_eval "${RM}r \$removelist" fi # Now set the variables for building old libraries. if test "$build_old_libs" = yes && test "$build_libtool_libs" != convenience ; then func_append oldlibs " $output_objdir/$libname.$libext" # Transform .lo files to .o files. oldobjs="$objs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; $lo2o" | $NL2SP` fi # Eliminate all temporary directories. #for path in $notinst_path; do # lib_search_path=`$ECHO "$lib_search_path " | $SED "s% $path % %g"` # deplibs=`$ECHO "$deplibs " | $SED "s% -L$path % %g"` # dependency_libs=`$ECHO "$dependency_libs " | $SED "s% -L$path % %g"` #done if test -n "$xrpath"; then # If the user specified any rpath flags, then add them. temp_xrpath= for libdir in $xrpath; do func_replace_sysroot "$libdir" func_append temp_xrpath " -R$func_replace_sysroot_result" case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done if test "$hardcode_into_libs" != yes || test "$build_old_libs" = yes; then dependency_libs="$temp_xrpath $dependency_libs" fi fi # Make sure dlfiles contains only unique files that won't be dlpreopened old_dlfiles="$dlfiles" dlfiles= for lib in $old_dlfiles; do case " $dlprefiles $dlfiles " in *" $lib "*) ;; *) func_append dlfiles " $lib" ;; esac done # Make sure dlprefiles contains only unique files old_dlprefiles="$dlprefiles" dlprefiles= for lib in $old_dlprefiles; do case "$dlprefiles " in *" $lib "*) ;; *) func_append dlprefiles " $lib" ;; esac done if test "$build_libtool_libs" = yes; then if test -n "$rpath"; then case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-*-beos* | *-cegcc* | *-*-haiku*) # these systems don't actually have a c library (as such)! ;; *-*-rhapsody* | *-*-darwin1.[012]) # Rhapsody C library is in the System framework func_append deplibs " System.ltframework" ;; *-*-netbsd*) # Don't link with libc until the a.out ld.so is fixed. ;; *-*-openbsd* | *-*-freebsd* | *-*-dragonfly*) # Do not include libc due to us having libc/libc_r. ;; *-*-sco3.2v5* | *-*-sco5v6*) # Causes problems with __ctype ;; *-*-sysv4.2uw2* | *-*-sysv5* | *-*-unixware* | *-*-OpenUNIX*) # Compiler inserts libc in the correct place for threads to work ;; *) # Add libc to deplibs on all other systems if necessary. if test "$build_libtool_need_lc" = "yes"; then func_append deplibs " -lc" fi ;; esac fi # Transform deplibs into only deplibs that can be linked in shared. name_save=$name libname_save=$libname release_save=$release versuffix_save=$versuffix major_save=$major # I'm not sure if I'm treating the release correctly. I think # release should show up in the -l (ie -lgmp5) so we don't want to # add it in twice. Is that correct? release="" versuffix="" major="" newdeplibs= droppeddeps=no case $deplibs_check_method in pass_all) # Don't check for shared/static. Everything works. # This might be a little naive. We might want to check # whether the library exists or not. But this is on # osf3 & osf4 and I'm not really sure... Just # implementing what was already the behavior. newdeplibs=$deplibs ;; test_compile) # This code stresses the "libraries are programs" paradigm to its # limits. Maybe even breaks it. We compile a program, linking it # against the deplibs as a proxy for the library. Then we can check # whether they linked in statically or dynamically with ldd. $opt_dry_run || $RM conftest.c cat > conftest.c </dev/null` $nocaseglob else potential_libs=`ls $i/$libnameglob[.-]* 2>/dev/null` fi for potent_lib in $potential_libs; do # Follow soft links. if ls -lLd "$potent_lib" 2>/dev/null | $GREP " -> " >/dev/null; then continue fi # The statement above tries to avoid entering an # endless loop below, in case of cyclic links. # We might still enter an endless loop, since a link # loop can be closed while we follow links, # but so what? potlib="$potent_lib" while test -h "$potlib" 2>/dev/null; do potliblink=`ls -ld $potlib | ${SED} 's/.* -> //'` case $potliblink in [\\/]* | [A-Za-z]:[\\/]*) potlib="$potliblink";; *) potlib=`$ECHO "$potlib" | $SED 's,[^/]*$,,'`"$potliblink";; esac done if eval $file_magic_cmd \"\$potlib\" 2>/dev/null | $SED -e 10q | $EGREP "$file_magic_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for file magic test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a file magic. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; match_pattern*) set dummy $deplibs_check_method; shift match_pattern_regex=`expr "$deplibs_check_method" : "$1 \(.*\)"` for a_deplib in $deplibs; do case $a_deplib in -l*) func_stripname -l '' "$a_deplib" name=$func_stripname_result if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then case " $predeps $postdeps " in *" $a_deplib "*) func_append newdeplibs " $a_deplib" a_deplib="" ;; esac fi if test -n "$a_deplib" ; then libname=`eval "\\$ECHO \"$libname_spec\""` for i in $lib_search_path $sys_lib_search_path $shlib_search_path; do potential_libs=`ls $i/$libname[.-]* 2>/dev/null` for potent_lib in $potential_libs; do potlib="$potent_lib" # see symlink-check above in file_magic test if eval "\$ECHO \"$potent_lib\"" 2>/dev/null | $SED 10q | \ $EGREP "$match_pattern_regex" > /dev/null; then func_append newdeplibs " $a_deplib" a_deplib="" break 2 fi done done fi if test -n "$a_deplib" ; then droppeddeps=yes echo $ECHO "*** Warning: linker path does not have real file for library $a_deplib." echo "*** I have the capability to make that library automatically link in when" echo "*** you link to this library. But I can only do this if you have a" echo "*** shared version of the library, which you do not appear to have" echo "*** because I did check the linker path looking for a file starting" if test -z "$potlib" ; then $ECHO "*** with $libname but no candidates were found. (...for regex pattern test)" else $ECHO "*** with $libname and none of the candidates passed a file format test" $ECHO "*** using a regex pattern. Last file checked: $potlib" fi fi ;; *) # Add a -L argument. func_append newdeplibs " $a_deplib" ;; esac done # Gone through all deplibs. ;; none | unknown | *) newdeplibs="" tmp_deplibs=`$ECHO " $deplibs" | $SED 's/ -lc$//; s/ -[LR][^ ]*//g'` if test "X$allow_libtool_libs_with_static_runtimes" = "Xyes" ; then for i in $predeps $postdeps ; do # can't use Xsed below, because $i might contain '/' tmp_deplibs=`$ECHO " $tmp_deplibs" | $SED "s,$i,,"` done fi case $tmp_deplibs in *[!\ \ ]*) echo if test "X$deplibs_check_method" = "Xnone"; then echo "*** Warning: inter-library dependencies are not supported in this platform." else echo "*** Warning: inter-library dependencies are not known to be supported." fi echo "*** All declared inter-library dependencies are being dropped." droppeddeps=yes ;; esac ;; esac versuffix=$versuffix_save major=$major_save release=$release_save libname=$libname_save name=$name_save case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library with the System framework newdeplibs=`$ECHO " $newdeplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac if test "$droppeddeps" = yes; then if test "$module" = yes; then echo echo "*** Warning: libtool could not satisfy all declared inter-library" $ECHO "*** dependencies of module $libname. Therefore, libtool will create" echo "*** a static module, that should work as long as the dlopening" echo "*** application is linked with the -dlopen flag." if test -z "$global_symbol_pipe"; then echo echo "*** However, this would only work if libtool was able to extract symbol" echo "*** lists from a program, using \`nm' or equivalent, but libtool could" echo "*** not find such a program. So, this module is probably useless." echo "*** \`nm' from GNU binutils and a full rebuild may help." fi if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi else echo "*** The inter-library dependencies that have been dropped here will be" echo "*** automatically added whenever a program is linked with this library" echo "*** or is declared to -dlopen it." if test "$allow_undefined" = no; then echo echo "*** Since this library must not contain undefined symbols," echo "*** because either the platform does not support them or" echo "*** it was explicitly requested with -no-undefined," echo "*** libtool will only create a static version of it." if test "$build_old_libs" = no; then oldlibs="$output_objdir/$libname.$libext" build_libtool_libs=module build_old_libs=yes else build_libtool_libs=no fi fi fi fi # Done checking deplibs! deplibs=$newdeplibs fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" case $host in *-*-darwin*) newdeplibs=`$ECHO " $newdeplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` new_inherited_linker_flags=`$ECHO " $new_inherited_linker_flags" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` deplibs=`$ECHO " $deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done deplibs="$new_libs" # All the library-specific variables (install_libdir is set above). library_names= old_library= dlname= # Test again, we may have decided not to build it any more if test "$build_libtool_libs" = yes; then # Remove ${wl} instances when linking with ld. # FIXME: should test the right _cmds variable. case $archive_cmds in *\$LD\ *) wl= ;; esac if test "$hardcode_into_libs" = yes; then # Hardcode the library paths hardcode_libdirs= dep_rpath= rpath="$finalize_rpath" test "$opt_mode" != relink && rpath="$compile_rpath$rpath" for libdir in $rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then func_replace_sysroot "$libdir" libdir=$func_replace_sysroot_result if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append dep_rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval "dep_rpath=\"$hardcode_libdir_flag_spec\"" fi if test -n "$runpath_var" && test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done eval "$runpath_var='$rpath\$$runpath_var'; export $runpath_var" fi test -n "$dep_rpath" && deplibs="$dep_rpath $deplibs" fi shlibpath="$finalize_shlibpath" test "$opt_mode" != relink && shlibpath="$compile_shlibpath$shlibpath" if test -n "$shlibpath"; then eval "$shlibpath_var='$shlibpath\$$shlibpath_var'; export $shlibpath_var" fi # Get the real and link names of the library. eval shared_ext=\"$shrext_cmds\" eval library_names=\"$library_names_spec\" set dummy $library_names shift realname="$1" shift if test -n "$soname_spec"; then eval soname=\"$soname_spec\" else soname="$realname" fi if test -z "$dlname"; then dlname=$soname fi lib="$output_objdir/$realname" linknames= for link do func_append linknames " $link" done # Use standard objects if they are pic test -z "$pic_flag" && libobjs=`$ECHO "$libobjs" | $SP2NL | $SED "$lo2o" | $NL2SP` test "X$libobjs" = "X " && libobjs= delfiles= if test -n "$export_symbols" && test -n "$include_expsyms"; then $opt_dry_run || cp "$export_symbols" "$output_objdir/$libname.uexp" export_symbols="$output_objdir/$libname.uexp" func_append delfiles " $export_symbols" fi orig_export_symbols= case $host_os in cygwin* | mingw* | cegcc*) if test -n "$export_symbols" && test -z "$export_symbols_regex"; then # exporting using user supplied symfile if test "x`$SED 1q $export_symbols`" != xEXPORTS; then # and it's NOT already a .def file. Must figure out # which of the given symbols are data symbols and tag # them as such. So, trigger use of export_symbols_cmds. # export_symbols gets reassigned inside the "prepare # the list of exported symbols" if statement, so the # include_expsyms logic still works. orig_export_symbols="$export_symbols" export_symbols= always_export_symbols=yes fi fi ;; esac # Prepare the list of exported symbols if test -z "$export_symbols"; then if test "$always_export_symbols" = yes || test -n "$export_symbols_regex"; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols cmds=$export_symbols_cmds save_ifs="$IFS"; IFS='~' for cmd1 in $cmds; do IFS="$save_ifs" # Take the normal branch if the nm_file_list_spec branch # doesn't work or if tool conversion is not needed. case $nm_file_list_spec~$to_tool_file_cmd in *~func_convert_file_noop | *~func_convert_file_msys_to_w32 | ~*) try_normal_branch=yes eval cmd=\"$cmd1\" func_len " $cmd" len=$func_len_result ;; *) try_normal_branch=no ;; esac if test "$try_normal_branch" = yes \ && { test "$len" -lt "$max_cmd_len" \ || test "$max_cmd_len" -le -1; } then func_show_eval "$cmd" 'exit $?' skipped_export=false elif test -n "$nm_file_list_spec"; then func_basename "$output" output_la=$func_basename_result save_libobjs=$libobjs save_output=$output output=${output_objdir}/${output_la}.nm func_to_tool_file "$output" libobjs=$nm_file_list_spec$func_to_tool_file_result func_append delfiles " $output" func_verbose "creating $NM input file list: $output" for obj in $save_libobjs; do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > "$output" eval cmd=\"$cmd1\" func_show_eval "$cmd" 'exit $?' output=$save_output libobjs=$save_libobjs skipped_export=false else # The command line is too long to execute in one step. func_verbose "using reloadable object file for export list..." skipped_export=: # Break out early, otherwise skipped_export may be # set to false by a later but shorter cmd. break fi done IFS="$save_ifs" if test -n "$export_symbols_regex" && test "X$skipped_export" != "X:"; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi fi if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test "X$skipped_export" != "X:" && test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi tmp_deplibs= for test_deplib in $deplibs; do case " $convenience " in *" $test_deplib "*) ;; *) func_append tmp_deplibs " $test_deplib" ;; esac done deplibs="$tmp_deplibs" if test -n "$convenience"; then if test -n "$whole_archive_flag_spec" && test "$compiler_needs_object" = yes && test -z "$libobjs"; then # extract the archives, so we have objects to list. # TODO: could optimize this to just extract one archive. whole_archive_flag_spec= fi if test -n "$whole_archive_flag_spec"; then save_libobjs=$libobjs eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= else gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $convenience func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi fi if test "$thread_safe" = yes && test -n "$thread_safe_flag_spec"; then eval flag=\"$thread_safe_flag_spec\" func_append linker_flags " $flag" fi # Make a backup of the uninstalled library when relinking if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}U && $MV $realname ${realname}U)' || exit $? fi # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then eval test_cmds=\"$module_expsym_cmds\" cmds=$module_expsym_cmds else eval test_cmds=\"$module_cmds\" cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then eval test_cmds=\"$archive_expsym_cmds\" cmds=$archive_expsym_cmds else eval test_cmds=\"$archive_cmds\" cmds=$archive_cmds fi fi if test "X$skipped_export" != "X:" && func_len " $test_cmds" && len=$func_len_result && test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then : else # The command line is too long to link in one step, link piecewise # or, if using GNU ld and skipped_export is not :, use a linker # script. # Save the value of $output and $libobjs because we want to # use them later. If we have whole_archive_flag_spec, we # want to use save_libobjs as it was before # whole_archive_flag_spec was expanded, because we can't # assume the linker understands whole_archive_flag_spec. # This may have to be revisited, in case too many # convenience libraries get linked in and end up exceeding # the spec. if test -z "$convenience" || test -z "$whole_archive_flag_spec"; then save_libobjs=$libobjs fi save_output=$output func_basename "$output" output_la=$func_basename_result # Clear the reloadable object creation command queue and # initialize k to one. test_cmds= concat_cmds= objlist= last_robj= k=1 if test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "$with_gnu_ld" = yes; then output=${output_objdir}/${output_la}.lnkscript func_verbose "creating GNU ld script: $output" echo 'INPUT (' > $output for obj in $save_libobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done echo ')' >> $output func_append delfiles " $output" func_to_tool_file "$output" output=$func_to_tool_file_result elif test -n "$save_libobjs" && test "X$skipped_export" != "X:" && test "X$file_list_spec" != X; then output=${output_objdir}/${output_la}.lnk func_verbose "creating linker input file list: $output" : > $output set x $save_libobjs shift firstobj= if test "$compiler_needs_object" = yes; then firstobj="$1 " shift fi for obj do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" >> $output done func_append delfiles " $output" func_to_tool_file "$output" output=$firstobj\"$file_list_spec$func_to_tool_file_result\" else if test -n "$save_libobjs"; then func_verbose "creating reloadable object files..." output=$output_objdir/$output_la-${k}.$objext eval test_cmds=\"$reload_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 # Loop over the list of objects to be linked. for obj in $save_libobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result if test "X$objlist" = X || test "$len" -lt "$max_cmd_len"; then func_append objlist " $obj" else # The command $test_cmds is almost too long, add a # command to the queue. if test "$k" -eq 1 ; then # The first file doesn't have a previous command to add. reload_objs=$objlist eval concat_cmds=\"$reload_cmds\" else # All subsequent reloadable object files will link in # the last one created. reload_objs="$objlist $last_robj" eval concat_cmds=\"\$concat_cmds~$reload_cmds~\$RM $last_robj\" fi last_robj=$output_objdir/$output_la-${k}.$objext func_arith $k + 1 k=$func_arith_result output=$output_objdir/$output_la-${k}.$objext objlist=" $obj" func_len " $last_robj" func_arith $len0 + $func_len_result len=$func_arith_result fi done # Handle the remaining objects by creating one last # reloadable object file. All subsequent reloadable object # files will link in the last one created. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ reload_objs="$objlist $last_robj" eval concat_cmds=\"\${concat_cmds}$reload_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\${concat_cmds}~\$RM $last_robj\" fi func_append delfiles " $output" else output= fi if ${skipped_export-false}; then func_verbose "generating symbol list for \`$libname.la'" export_symbols="$output_objdir/$libname.exp" $opt_dry_run || $RM $export_symbols libobjs=$output # Append the command to create the export file. test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\$concat_cmds$export_symbols_cmds\" if test -n "$last_robj"; then eval concat_cmds=\"\$concat_cmds~\$RM $last_robj\" fi fi test -n "$save_libobjs" && func_verbose "creating a temporary reloadable object file: $output" # Loop through the commands generated above and execute them. save_ifs="$IFS"; IFS='~' for cmd in $concat_cmds; do IFS="$save_ifs" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" if test -n "$export_symbols_regex" && ${skipped_export-false}; then func_show_eval '$EGREP -e "$export_symbols_regex" "$export_symbols" > "${export_symbols}T"' func_show_eval '$MV "${export_symbols}T" "$export_symbols"' fi fi if ${skipped_export-false}; then if test -n "$export_symbols" && test -n "$include_expsyms"; then tmp_export_symbols="$export_symbols" test -n "$orig_export_symbols" && tmp_export_symbols="$orig_export_symbols" $opt_dry_run || eval '$ECHO "$include_expsyms" | $SP2NL >> "$tmp_export_symbols"' fi if test -n "$orig_export_symbols"; then # The given exports_symbols file has to be filtered, so filter it. func_verbose "filter symbol list for \`$libname.la' to tag DATA exports" # FIXME: $output_objdir/$libname.filter potentially contains lots of # 's' commands which not all seds can handle. GNU sed should be fine # though. Also, the filter scales superlinearly with the number of # global variables. join(1) would be nice here, but unfortunately # isn't a blessed tool. $opt_dry_run || $SED -e '/[ ,]DATA/!d;s,\(.*\)\([ \,].*\),s|^\1$|\1\2|,' < $export_symbols > $output_objdir/$libname.filter func_append delfiles " $export_symbols $output_objdir/$libname.filter" export_symbols=$output_objdir/$libname.def $opt_dry_run || $SED -f $output_objdir/$libname.filter < $orig_export_symbols > $export_symbols fi fi libobjs=$output # Restore the value of output. output=$save_output if test -n "$convenience" && test -n "$whole_archive_flag_spec"; then eval libobjs=\"\$libobjs $whole_archive_flag_spec\" test "X$libobjs" = "X " && libobjs= fi # Expand the library linking commands again to reset the # value of $libobjs for piecewise linking. # Do each of the archive commands. if test "$module" = yes && test -n "$module_cmds" ; then if test -n "$export_symbols" && test -n "$module_expsym_cmds"; then cmds=$module_expsym_cmds else cmds=$module_cmds fi else if test -n "$export_symbols" && test -n "$archive_expsym_cmds"; then cmds=$archive_expsym_cmds else cmds=$archive_cmds fi fi fi if test -n "$delfiles"; then # Append the command to remove temporary files to $cmds. eval cmds=\"\$cmds~\$RM $delfiles\" fi # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append libobjs " $func_extract_archives_result" test "X$libobjs" = "X " && libobjs= fi save_ifs="$IFS"; IFS='~' for cmd in $cmds; do IFS="$save_ifs" eval cmd=\"$cmd\" $opt_silent || { func_quote_for_expand "$cmd" eval "func_echo $func_quote_for_expand_result" } $opt_dry_run || eval "$cmd" || { lt_exit=$? # Restore the uninstalled library and exit if test "$opt_mode" = relink; then ( cd "$output_objdir" && \ $RM "${realname}T" && \ $MV "${realname}U" "$realname" ) fi exit $lt_exit } done IFS="$save_ifs" # Restore the uninstalled library and exit if test "$opt_mode" = relink; then $opt_dry_run || eval '(cd $output_objdir && $RM ${realname}T && $MV $realname ${realname}T && $MV ${realname}U $realname)' || exit $? if test -n "$convenience"; then if test -z "$whole_archive_flag_spec"; then func_show_eval '${RM}r "$gentop"' fi fi exit $EXIT_SUCCESS fi # Create links to the real library. for linkname in $linknames; do if test "$realname" != "$linkname"; then func_show_eval '(cd "$output_objdir" && $RM "$linkname" && $LN_S "$realname" "$linkname")' 'exit $?' fi done # If -module or -export-dynamic was specified, set the dlname. if test "$module" = yes || test "$export_dynamic" = yes; then # On all known operating systems, these are identical. dlname="$soname" fi fi ;; obj) if test -n "$dlfiles$dlprefiles" || test "$dlself" != no; then func_warning "\`-dlopen' is ignored for objects" fi case " $deplibs" in *\ -l* | *\ -L*) func_warning "\`-l' and \`-L' are ignored for objects" ;; esac test -n "$rpath" && \ func_warning "\`-rpath' is ignored for objects" test -n "$xrpath" && \ func_warning "\`-R' is ignored for objects" test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for objects" test -n "$release" && \ func_warning "\`-release' is ignored for objects" case $output in *.lo) test -n "$objs$old_deplibs" && \ func_fatal_error "cannot build library object \`$output' from non-libtool objects" libobj=$output func_lo2o "$libobj" obj=$func_lo2o_result ;; *) libobj= obj="$output" ;; esac # Delete the old objects. $opt_dry_run || $RM $obj $libobj # Objects from convenience libraries. This assumes # single-version convenience libraries. Whenever we create # different ones for PIC/non-PIC, this we'll have to duplicate # the extraction. reload_conv_objs= gentop= # reload_cmds runs $LD directly, so let us get rid of # -Wl from whole_archive_flag_spec and hope we can get by with # turning comma into space.. wl= if test -n "$convenience"; then if test -n "$whole_archive_flag_spec"; then eval tmp_whole_archive_flags=\"$whole_archive_flag_spec\" reload_conv_objs=$reload_objs\ `$ECHO "$tmp_whole_archive_flags" | $SED 's|,| |g'` else gentop="$output_objdir/${obj}x" func_append generated " $gentop" func_extract_archives $gentop $convenience reload_conv_objs="$reload_objs $func_extract_archives_result" fi fi # If we're not building shared, we need to use non_pic_objs test "$build_libtool_libs" != yes && libobjs="$non_pic_objects" # Create the old-style object. reload_objs="$objs$old_deplibs "`$ECHO "$libobjs" | $SP2NL | $SED "/\.${libext}$/d; /\.lib$/d; $lo2o" | $NL2SP`" $reload_conv_objs" ### testsuite: skip nested quoting test output="$obj" func_execute_cmds "$reload_cmds" 'exit $?' # Exit if we aren't doing a library object file. if test -z "$libobj"; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS fi if test "$build_libtool_libs" != yes; then if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi # Create an invalid libtool object if no PIC, so that we don't # accidentally link it into a program. # $show "echo timestamp > $libobj" # $opt_dry_run || eval "echo timestamp > $libobj" || exit $? exit $EXIT_SUCCESS fi if test -n "$pic_flag" || test "$pic_mode" != default; then # Only do commands if we really have different PIC objects. reload_objs="$libobjs $reload_conv_objs" output="$libobj" func_execute_cmds "$reload_cmds" 'exit $?' fi if test -n "$gentop"; then func_show_eval '${RM}r "$gentop"' fi exit $EXIT_SUCCESS ;; prog) case $host in *cygwin*) func_stripname '' '.exe' "$output" output=$func_stripname_result.exe;; esac test -n "$vinfo" && \ func_warning "\`-version-info' is ignored for programs" test -n "$release" && \ func_warning "\`-release' is ignored for programs" test "$preload" = yes \ && test "$dlopen_support" = unknown \ && test "$dlopen_self" = unknown \ && test "$dlopen_self_static" = unknown && \ func_warning "\`LT_INIT([dlopen])' not used. Assuming no dlopen support." case $host in *-*-rhapsody* | *-*-darwin1.[012]) # On Rhapsody replace the C library is the System framework compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's/ -lc / System.ltframework /'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's/ -lc / System.ltframework /'` ;; esac case $host in *-*-darwin*) # Don't allow lazy linking, it breaks C++ global constructors # But is supposedly fixed on 10.4 or later (yay!). if test "$tagname" = CXX ; then case ${MACOSX_DEPLOYMENT_TARGET-10.0} in 10.[0123]) func_append compile_command " ${wl}-bind_at_load" func_append finalize_command " ${wl}-bind_at_load" ;; esac fi # Time to change all our "foo.ltframework" stuff back to "-framework foo" compile_deplibs=`$ECHO " $compile_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` finalize_deplibs=`$ECHO " $finalize_deplibs" | $SED 's% \([^ $]*\).ltframework% -framework \1%g'` ;; esac # move library search paths that coincide with paths to not yet # installed libraries to the beginning of the library search list new_libs= for path in $notinst_path; do case " $new_libs " in *" -L$path/$objdir "*) ;; *) case " $compile_deplibs " in *" -L$path/$objdir "*) func_append new_libs " -L$path/$objdir" ;; esac ;; esac done for deplib in $compile_deplibs; do case $deplib in -L*) case " $new_libs " in *" $deplib "*) ;; *) func_append new_libs " $deplib" ;; esac ;; *) func_append new_libs " $deplib" ;; esac done compile_deplibs="$new_libs" func_append compile_command " $compile_deplibs" func_append finalize_command " $finalize_deplibs" if test -n "$rpath$xrpath"; then # If the user specified any rpath flags, then add them. for libdir in $rpath $xrpath; do # This is the magic to use -rpath. case "$finalize_rpath " in *" $libdir "*) ;; *) func_append finalize_rpath " $libdir" ;; esac done fi # Now hardcode the library paths rpath= hardcode_libdirs= for libdir in $compile_rpath $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$perm_rpath " in *" $libdir "*) ;; *) func_append perm_rpath " $libdir" ;; esac fi case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2* | *-cegcc*) testbindir=`${ECHO} "$libdir" | ${SED} -e 's*/lib$*/bin*'` case :$dllsearchpath: in *":$libdir:"*) ;; ::) dllsearchpath=$libdir;; *) func_append dllsearchpath ":$libdir";; esac case :$dllsearchpath: in *":$testbindir:"*) ;; ::) dllsearchpath=$testbindir;; *) func_append dllsearchpath ":$testbindir";; esac ;; esac done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi compile_rpath="$rpath" rpath= hardcode_libdirs= for libdir in $finalize_rpath; do if test -n "$hardcode_libdir_flag_spec"; then if test -n "$hardcode_libdir_separator"; then if test -z "$hardcode_libdirs"; then hardcode_libdirs="$libdir" else # Just accumulate the unique libdirs. case $hardcode_libdir_separator$hardcode_libdirs$hardcode_libdir_separator in *"$hardcode_libdir_separator$libdir$hardcode_libdir_separator"*) ;; *) func_append hardcode_libdirs "$hardcode_libdir_separator$libdir" ;; esac fi else eval flag=\"$hardcode_libdir_flag_spec\" func_append rpath " $flag" fi elif test -n "$runpath_var"; then case "$finalize_perm_rpath " in *" $libdir "*) ;; *) func_append finalize_perm_rpath " $libdir" ;; esac fi done # Substitute the hardcoded libdirs into the rpath. if test -n "$hardcode_libdir_separator" && test -n "$hardcode_libdirs"; then libdir="$hardcode_libdirs" eval rpath=\" $hardcode_libdir_flag_spec\" fi finalize_rpath="$rpath" if test -n "$libobjs" && test "$build_old_libs" = yes; then # Transform all the library objects into standard objects. compile_command=`$ECHO "$compile_command" | $SP2NL | $SED "$lo2o" | $NL2SP` finalize_command=`$ECHO "$finalize_command" | $SP2NL | $SED "$lo2o" | $NL2SP` fi func_generate_dlsyms "$outputname" "@PROGRAM@" "no" # template prelinking step if test -n "$prelink_cmds"; then func_execute_cmds "$prelink_cmds" 'exit $?' fi wrappers_required=yes case $host in *cegcc* | *mingw32ce*) # Disable wrappers for cegcc and mingw32ce hosts, we are cross compiling anyway. wrappers_required=no ;; *cygwin* | *mingw* ) if test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; *) if test "$need_relink" = no || test "$build_libtool_libs" != yes; then wrappers_required=no fi ;; esac if test "$wrappers_required" = no; then # Replace the output file specification. compile_command=`$ECHO "$compile_command" | $SED 's%@OUTPUT@%'"$output"'%g'` link_command="$compile_command$compile_rpath" # We have no uninstalled library dependencies, so finalize right now. exit_status=0 func_show_eval "$link_command" 'exit_status=$?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Delete the generated files. if test -f "$output_objdir/${outputname}S.${objext}"; then func_show_eval '$RM "$output_objdir/${outputname}S.${objext}"' fi exit $exit_status fi if test -n "$compile_shlibpath$finalize_shlibpath"; then compile_command="$shlibpath_var=\"$compile_shlibpath$finalize_shlibpath\$$shlibpath_var\" $compile_command" fi if test -n "$finalize_shlibpath"; then finalize_command="$shlibpath_var=\"$finalize_shlibpath\$$shlibpath_var\" $finalize_command" fi compile_var= finalize_var= if test -n "$runpath_var"; then if test -n "$perm_rpath"; then # We should set the runpath_var. rpath= for dir in $perm_rpath; do func_append rpath "$dir:" done compile_var="$runpath_var=\"$rpath\$$runpath_var\" " fi if test -n "$finalize_perm_rpath"; then # We should set the runpath_var. rpath= for dir in $finalize_perm_rpath; do func_append rpath "$dir:" done finalize_var="$runpath_var=\"$rpath\$$runpath_var\" " fi fi if test "$no_install" = yes; then # We don't need to create a wrapper script. link_command="$compile_var$compile_command$compile_rpath" # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output"'%g'` # Delete the old output file. $opt_dry_run || $RM $output # Link the executable and exit func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi exit $EXIT_SUCCESS fi if test "$hardcode_action" = relink; then # Fast installation is not supported link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" func_warning "this platform does not like uninstalled shared libraries" func_warning "\`$output' will be relinked during installation" else if test "$fast_install" != no; then link_command="$finalize_var$compile_command$finalize_rpath" if test "$fast_install" = yes; then relink_command=`$ECHO "$compile_var$compile_command$compile_rpath" | $SED 's%@OUTPUT@%\$progdir/\$file%g'` else # fast_install is set to needless relink_command= fi else link_command="$compile_var$compile_command$compile_rpath" relink_command="$finalize_var$finalize_command$finalize_rpath" fi fi # Replace the output file specification. link_command=`$ECHO "$link_command" | $SED 's%@OUTPUT@%'"$output_objdir/$outputname"'%g'` # Delete the old output files. $opt_dry_run || $RM $output $output_objdir/$outputname $output_objdir/lt-$outputname func_show_eval "$link_command" 'exit $?' if test -n "$postlink_cmds"; then func_to_tool_file "$output_objdir/$outputname" postlink_cmds=`func_echo_all "$postlink_cmds" | $SED -e 's%@OUTPUT@%'"$output_objdir/$outputname"'%g' -e 's%@TOOL_OUTPUT@%'"$func_to_tool_file_result"'%g'` func_execute_cmds "$postlink_cmds" 'exit $?' fi # Now create the wrapper script. func_verbose "creating $output" # Quote the relink command for shipping. if test -n "$relink_command"; then # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done relink_command="(cd `pwd`; $relink_command)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` fi # Only actually do things if not in dry run mode. $opt_dry_run || { # win32 will think the script is a binary if it has # a .exe suffix, so we strip it off here. case $output in *.exe) func_stripname '' '.exe' "$output" output=$func_stripname_result ;; esac # test for cygwin because mv fails w/o .exe extensions case $host in *cygwin*) exeext=.exe func_stripname '' '.exe' "$outputname" outputname=$func_stripname_result ;; *) exeext= ;; esac case $host in *cygwin* | *mingw* ) func_dirname_and_basename "$output" "" "." output_name=$func_basename_result output_path=$func_dirname_result cwrappersource="$output_path/$objdir/lt-$output_name.c" cwrapper="$output_path/$output_name.exe" $RM $cwrappersource $cwrapper trap "$RM $cwrappersource $cwrapper; exit $EXIT_FAILURE" 1 2 15 func_emit_cwrapperexe_src > $cwrappersource # The wrapper executable is built using the $host compiler, # because it contains $host paths and files. If cross- # compiling, it, like the target executable, must be # executed on the $host or under an emulation environment. $opt_dry_run || { $LTCC $LTCFLAGS -o $cwrapper $cwrappersource $STRIP $cwrapper } # Now, create the wrapper script for func_source use: func_ltwrapper_scriptname $cwrapper $RM $func_ltwrapper_scriptname_result trap "$RM $func_ltwrapper_scriptname_result; exit $EXIT_FAILURE" 1 2 15 $opt_dry_run || { # note: this script will not be executed, so do not chmod. if test "x$build" = "x$host" ; then $cwrapper --lt-dump-script > $func_ltwrapper_scriptname_result else func_emit_wrapper no > $func_ltwrapper_scriptname_result fi } ;; * ) $RM $output trap "$RM $output; exit $EXIT_FAILURE" 1 2 15 func_emit_wrapper no > $output chmod +x $output ;; esac } exit $EXIT_SUCCESS ;; esac # See if we need to build an old-fashioned archive. for oldlib in $oldlibs; do if test "$build_libtool_libs" = convenience; then oldobjs="$libobjs_save $symfileobj" addlibs="$convenience" build_libtool_libs=no else if test "$build_libtool_libs" = module; then oldobjs="$libobjs_save" build_libtool_libs=no else oldobjs="$old_deplibs $non_pic_objects" if test "$preload" = yes && test -f "$symfileobj"; then func_append oldobjs " $symfileobj" fi fi addlibs="$old_convenience" fi if test -n "$addlibs"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $addlibs func_append oldobjs " $func_extract_archives_result" fi # Do each command in the archive commands. if test -n "$old_archive_from_new_cmds" && test "$build_libtool_libs" = yes; then cmds=$old_archive_from_new_cmds else # Add any objects from preloaded convenience libraries if test -n "$dlprefiles"; then gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_extract_archives $gentop $dlprefiles func_append oldobjs " $func_extract_archives_result" fi # POSIX demands no paths to be encoded in archives. We have # to avoid creating archives with duplicate basenames if we # might have to extract them afterwards, e.g., when creating a # static archive out of a convenience library, or when linking # the entirety of a libtool archive into another (currently # not supported by libtool). if (for obj in $oldobjs do func_basename "$obj" $ECHO "$func_basename_result" done | sort | sort -uc >/dev/null 2>&1); then : else echo "copying selected object files to avoid basename conflicts..." gentop="$output_objdir/${outputname}x" func_append generated " $gentop" func_mkdir_p "$gentop" save_oldobjs=$oldobjs oldobjs= counter=1 for obj in $save_oldobjs do func_basename "$obj" objbase="$func_basename_result" case " $oldobjs " in " ") oldobjs=$obj ;; *[\ /]"$objbase "*) while :; do # Make sure we don't pick an alternate name that also # overlaps. newobj=lt$counter-$objbase func_arith $counter + 1 counter=$func_arith_result case " $oldobjs " in *[\ /]"$newobj "*) ;; *) if test ! -f "$gentop/$newobj"; then break; fi ;; esac done func_show_eval "ln $obj $gentop/$newobj || cp $obj $gentop/$newobj" func_append oldobjs " $gentop/$newobj" ;; *) func_append oldobjs " $obj" ;; esac done fi func_to_tool_file "$oldlib" func_convert_file_msys_to_w32 tool_oldlib=$func_to_tool_file_result eval cmds=\"$old_archive_cmds\" func_len " $cmds" len=$func_len_result if test "$len" -lt "$max_cmd_len" || test "$max_cmd_len" -le -1; then cmds=$old_archive_cmds elif test -n "$archiver_list_spec"; then func_verbose "using command file archive linking..." for obj in $oldobjs do func_to_tool_file "$obj" $ECHO "$func_to_tool_file_result" done > $output_objdir/$libname.libcmd func_to_tool_file "$output_objdir/$libname.libcmd" oldobjs=" $archiver_list_spec$func_to_tool_file_result" cmds=$old_archive_cmds else # the command line is too long to link in one step, link in parts func_verbose "using piecewise archive linking..." save_RANLIB=$RANLIB RANLIB=: objlist= concat_cmds= save_oldobjs=$oldobjs oldobjs= # Is there a better way of finding the last object in the list? for obj in $save_oldobjs do last_oldobj=$obj done eval test_cmds=\"$old_archive_cmds\" func_len " $test_cmds" len0=$func_len_result len=$len0 for obj in $save_oldobjs do func_len " $obj" func_arith $len + $func_len_result len=$func_arith_result func_append objlist " $obj" if test "$len" -lt "$max_cmd_len"; then : else # the above command should be used before it gets too long oldobjs=$objlist if test "$obj" = "$last_oldobj" ; then RANLIB=$save_RANLIB fi test -z "$concat_cmds" || concat_cmds=$concat_cmds~ eval concat_cmds=\"\${concat_cmds}$old_archive_cmds\" objlist= len=$len0 fi done RANLIB=$save_RANLIB oldobjs=$objlist if test "X$oldobjs" = "X" ; then eval cmds=\"\$concat_cmds\" else eval cmds=\"\$concat_cmds~\$old_archive_cmds\" fi fi fi func_execute_cmds "$cmds" 'exit $?' done test -n "$generated" && \ func_show_eval "${RM}r$generated" # Now create the libtool archive. case $output in *.la) old_library= test "$build_old_libs" = yes && old_library="$libname.$libext" func_verbose "creating $output" # Preserve any variables that may affect compiler behavior for var in $variables_saved_for_relink; do if eval test -z \"\${$var+set}\"; then relink_command="{ test -z \"\${$var+set}\" || $lt_unset $var || { $var=; export $var; }; }; $relink_command" elif eval var_value=\$$var; test -z "$var_value"; then relink_command="$var=; export $var; $relink_command" else func_quote_for_eval "$var_value" relink_command="$var=$func_quote_for_eval_result; export $var; $relink_command" fi done # Quote the link command for shipping. relink_command="(cd `pwd`; $SHELL $progpath $preserve_args --mode=relink $libtool_args @inst_prefix_dir@)" relink_command=`$ECHO "$relink_command" | $SED "$sed_quote_subst"` if test "$hardcode_automatic" = yes ; then relink_command= fi # Only create the output if not a dry run. $opt_dry_run || { for installed in no yes; do if test "$installed" = yes; then if test -z "$install_libdir"; then break fi output="$output_objdir/$outputname"i # Replace all uninstalled libtool libraries with the installed ones newdependency_libs= for deplib in $dependency_libs; do case $deplib in *.la) func_basename "$deplib" name="$func_basename_result" func_resolve_sysroot "$deplib" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $func_resolve_sysroot_result` test -z "$libdir" && \ func_fatal_error "\`$deplib' is not a valid libtool archive" func_append newdependency_libs " ${lt_sysroot:+=}$libdir/$name" ;; -L*) func_stripname -L '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -L$func_replace_sysroot_result" ;; -R*) func_stripname -R '' "$deplib" func_replace_sysroot "$func_stripname_result" func_append newdependency_libs " -R$func_replace_sysroot_result" ;; *) func_append newdependency_libs " $deplib" ;; esac done dependency_libs="$newdependency_libs" newdlfiles= for lib in $dlfiles; do case $lib in *.la) func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlfiles " ${lt_sysroot:+=}$libdir/$name" ;; *) func_append newdlfiles " $lib" ;; esac done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in *.la) # Only pass preopened files to the pseudo-archive (for # eventual linking with the app. that links it) if we # didn't already link the preopened objects directly into # the library: func_basename "$lib" name="$func_basename_result" eval libdir=`${SED} -n -e 's/^libdir=\(.*\)$/\1/p' $lib` test -z "$libdir" && \ func_fatal_error "\`$lib' is not a valid libtool archive" func_append newdlprefiles " ${lt_sysroot:+=}$libdir/$name" ;; esac done dlprefiles="$newdlprefiles" else newdlfiles= for lib in $dlfiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlfiles " $abs" done dlfiles="$newdlfiles" newdlprefiles= for lib in $dlprefiles; do case $lib in [\\/]* | [A-Za-z]:[\\/]*) abs="$lib" ;; *) abs=`pwd`"/$lib" ;; esac func_append newdlprefiles " $abs" done dlprefiles="$newdlprefiles" fi $RM $output # place dlname in correct position for cygwin # In fact, it would be nice if we could use this code for all target # systems that can't hard-code library paths into their executables # and that have no shared library path variable independent of PATH, # but it turns out we can't easily determine that from inspecting # libtool variables, so we have to hard-code the OSs to which it # applies here; at the moment, that means platforms that use the PE # object format with DLL files. See the long comment at the top of # tests/bindir.at for full details. tdlname=$dlname case $host,$output,$installed,$module,$dlname in *cygwin*,*lai,yes,no,*.dll | *mingw*,*lai,yes,no,*.dll | *cegcc*,*lai,yes,no,*.dll) # If a -bindir argument was supplied, place the dll there. if test "x$bindir" != x ; then func_relative_path "$install_libdir" "$bindir" tdlname=$func_relative_path_result$dlname else # Otherwise fall back on heuristic. tdlname=../bin/$dlname fi ;; esac $ECHO > $output "\ # $outputname - a libtool library file # Generated by $PROGRAM (GNU $PACKAGE$TIMESTAMP) $VERSION # # Please DO NOT delete this file! # It is necessary for linking the library. # The name that we can dlopen(3). dlname='$tdlname' # Names of this library. library_names='$library_names' # The name of the static archive. old_library='$old_library' # Linker flags that can not go in dependency_libs. inherited_linker_flags='$new_inherited_linker_flags' # Libraries that this one depends upon. dependency_libs='$dependency_libs' # Names of additional weak libraries provided by this library weak_library_names='$weak_libs' # Version information for $libname. current=$current age=$age revision=$revision # Is this an already installed library? installed=$installed # Should we warn about portability when linking against -modules? shouldnotlink=$module # Files to dlopen/dlpreopen dlopen='$dlfiles' dlpreopen='$dlprefiles' # Directory that this library needs to be installed in: libdir='$install_libdir'" if test "$installed" = no && test "$need_relink" = yes; then $ECHO >> $output "\ relink_command=\"$relink_command\"" fi done } # Do a symbolic link so that the libtool archive can be found in # LD_LIBRARY_PATH before the program is installed. func_show_eval '( cd "$output_objdir" && $RM "$outputname" && $LN_S "../$outputname" "$outputname" )' 'exit $?' ;; esac exit $EXIT_SUCCESS } { test "$opt_mode" = link || test "$opt_mode" = relink; } && func_mode_link ${1+"$@"} # func_mode_uninstall arg... func_mode_uninstall () { $opt_debug RM="$nonopt" files= rmforce= exit_status=0 # This variable tells wrapper scripts just to set variables rather # than running their programs. libtool_install_magic="$magic" for arg do case $arg in -f) func_append RM " $arg"; rmforce=yes ;; -*) func_append RM " $arg" ;; *) func_append files " $arg" ;; esac done test -z "$RM" && \ func_fatal_help "you must specify an RM program" rmdirs= for file in $files; do func_dirname "$file" "" "." dir="$func_dirname_result" if test "X$dir" = X.; then odir="$objdir" else odir="$dir/$objdir" fi func_basename "$file" name="$func_basename_result" test "$opt_mode" = uninstall && odir="$dir" # Remember odir for removal later, being careful to avoid duplicates if test "$opt_mode" = clean; then case " $rmdirs " in *" $odir "*) ;; *) func_append rmdirs " $odir" ;; esac fi # Don't error if the file doesn't exist and rm -f was used. if { test -L "$file"; } >/dev/null 2>&1 || { test -h "$file"; } >/dev/null 2>&1 || test -f "$file"; then : elif test -d "$file"; then exit_status=1 continue elif test "$rmforce" = yes; then continue fi rmfiles="$file" case $name in *.la) # Possibly a libtool archive, so verify it. if func_lalib_p "$file"; then func_source $dir/$name # Delete the libtool libraries and symlinks. for n in $library_names; do func_append rmfiles " $odir/$n" done test -n "$old_library" && func_append rmfiles " $odir/$old_library" case "$opt_mode" in clean) case " $library_names " in *" $dlname "*) ;; *) test -n "$dlname" && func_append rmfiles " $odir/$dlname" ;; esac test -n "$libdir" && func_append rmfiles " $odir/$name $odir/${name}i" ;; uninstall) if test -n "$library_names"; then # Do each command in the postuninstall commands. func_execute_cmds "$postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi if test -n "$old_library"; then # Do each command in the old_postuninstall commands. func_execute_cmds "$old_postuninstall_cmds" 'test "$rmforce" = yes || exit_status=1' fi # FIXME: should reinstall the best remaining shared library. ;; esac fi ;; *.lo) # Possibly a libtool object, so verify it. if func_lalib_p "$file"; then # Read the .lo file func_source $dir/$name # Add PIC object to the list of files to remove. if test -n "$pic_object" && test "$pic_object" != none; then func_append rmfiles " $dir/$pic_object" fi # Add non-PIC object to the list of files to remove. if test -n "$non_pic_object" && test "$non_pic_object" != none; then func_append rmfiles " $dir/$non_pic_object" fi fi ;; *) if test "$opt_mode" = clean ; then noexename=$name case $file in *.exe) func_stripname '' '.exe' "$file" file=$func_stripname_result func_stripname '' '.exe' "$name" noexename=$func_stripname_result # $file with .exe has already been added to rmfiles, # add $file without .exe func_append rmfiles " $file" ;; esac # Do a test to see if this is a libtool program. if func_ltwrapper_p "$file"; then if func_ltwrapper_executable_p "$file"; then func_ltwrapper_scriptname "$file" relink_command= func_source $func_ltwrapper_scriptname_result func_append rmfiles " $func_ltwrapper_scriptname_result" else relink_command= func_source $dir/$noexename fi # note $name still contains .exe if it was in $file originally # as does the version of $file that was added into $rmfiles func_append rmfiles " $odir/$name $odir/${name}S.${objext}" if test "$fast_install" = yes && test -n "$relink_command"; then func_append rmfiles " $odir/lt-$name" fi if test "X$noexename" != "X$name" ; then func_append rmfiles " $odir/lt-${noexename}.c" fi fi fi ;; esac func_show_eval "$RM $rmfiles" 'exit_status=1' done # Try to remove the ${objdir}s in the directories where we deleted files for dir in $rmdirs; do if test -d "$dir"; then func_show_eval "rmdir $dir >/dev/null 2>&1" fi done exit $exit_status } { test "$opt_mode" = uninstall || test "$opt_mode" = clean; } && func_mode_uninstall ${1+"$@"} test -z "$opt_mode" && { help="$generic_help" func_fatal_help "you must specify a MODE" } test -z "$exec_cmd" && \ func_fatal_help "invalid operation mode \`$opt_mode'" if test -n "$exec_cmd"; then eval exec "$exec_cmd" exit $EXIT_FAILURE fi exit $exit_status # The TAGs below are defined such that we never get into a situation # in which we disable both kinds of libraries. Given conflicting # choices, we go for a static library, that is the most portable, # since we can't tell whether shared libraries were disabled because # the user asked for that or because the platform doesn't support # them. This is particularly important on AIX, because we don't # support having both static and shared libraries enabled at the same # time on that platform, so we default to a shared-only configuration. # If a disable-shared tag is given, we'll fallback to a static-only # configuration. But we'll never go from static-only to shared-only. # ### BEGIN LIBTOOL TAG CONFIG: disable-shared build_libtool_libs=no build_old_libs=yes # ### END LIBTOOL TAG CONFIG: disable-shared # ### BEGIN LIBTOOL TAG CONFIG: disable-static build_old_libs=`case $build_libtool_libs in yes) echo no;; *) echo yes;; esac` # ### END LIBTOOL TAG CONFIG: disable-static # Local Variables: # mode:shell-script # sh-indentation:2 # End: # vi:sw=2 freeipmi-1.6.4/config/mdate-sh0000755002055400205540000001363713527342444016171 0ustar00achuachu00000000000000#!/bin/sh # Get modification time of a file or directory and pretty-print it. scriptversion=2010-08-21.06; # UTC # Copyright (C) 1995-2013 Free Software Foundation, Inc. # written by Ulrich Drepper , June 1995 # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # This file is maintained in Automake, please report # bugs to or send patches to # . if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST fi case $1 in '') echo "$0: No file. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: mdate-sh [--help] [--version] FILE Pretty-print the modification day of FILE, in the format: 1 January 1970 Report bugs to . EOF exit $? ;; -v | --v*) echo "mdate-sh $scriptversion" exit $? ;; esac error () { echo "$0: $1" >&2 exit 1 } # Prevent date giving response in another language. LANG=C export LANG LC_ALL=C export LC_ALL LC_TIME=C export LC_TIME # GNU ls changes its time format in response to the TIME_STYLE # variable. Since we cannot assume 'unset' works, revert this # variable to its documented default. if test "${TIME_STYLE+set}" = set; then TIME_STYLE=posix-long-iso export TIME_STYLE fi save_arg1=$1 # Find out how to get the extended ls output of a file or directory. if ls -L /dev/null 1>/dev/null 2>&1; then ls_command='ls -L -l -d' else ls_command='ls -l -d' fi # Avoid user/group names that might have spaces, when possible. if ls -n /dev/null 1>/dev/null 2>&1; then ls_command="$ls_command -n" fi # A 'ls -l' line looks as follows on OS/2. # drwxrwx--- 0 Aug 11 2001 foo # This differs from Unix, which adds ownership information. # drwxrwx--- 2 root root 4096 Aug 11 2001 foo # # To find the date, we split the line on spaces and iterate on words # until we find a month. This cannot work with files whose owner is a # user named "Jan", or "Feb", etc. However, it's unlikely that '/' # will be owned by a user whose name is a month. So we first look at # the extended ls output of the root directory to decide how many # words should be skipped to get the date. # On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below. set x`$ls_command /` # Find which argument is the month. month= command= until test $month do test $# -gt 0 || error "failed parsing '$ls_command /' output" shift # Add another shift to the command. command="$command shift;" case $1 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac done test -n "$month" || error "failed parsing '$ls_command /' output" # Get the extended ls output of the file or directory. set dummy x`eval "$ls_command \"\\\$save_arg1\""` # Remove all preceding arguments eval $command # Because of the dummy argument above, month is in $2. # # On a POSIX system, we should have # # $# = 5 # $1 = file size # $2 = month # $3 = day # $4 = year or time # $5 = filename # # On Darwin 7.7.0 and 7.6.0, we have # # $# = 4 # $1 = day # $2 = month # $3 = year or time # $4 = filename # Get the month. case $2 in Jan) month=January; nummonth=1;; Feb) month=February; nummonth=2;; Mar) month=March; nummonth=3;; Apr) month=April; nummonth=4;; May) month=May; nummonth=5;; Jun) month=June; nummonth=6;; Jul) month=July; nummonth=7;; Aug) month=August; nummonth=8;; Sep) month=September; nummonth=9;; Oct) month=October; nummonth=10;; Nov) month=November; nummonth=11;; Dec) month=December; nummonth=12;; esac case $3 in ???*) day=$1;; *) day=$3; shift;; esac # Here we have to deal with the problem that the ls output gives either # the time of day or the year. case $3 in *:*) set `date`; eval year=\$$# case $2 in Jan) nummonthtod=1;; Feb) nummonthtod=2;; Mar) nummonthtod=3;; Apr) nummonthtod=4;; May) nummonthtod=5;; Jun) nummonthtod=6;; Jul) nummonthtod=7;; Aug) nummonthtod=8;; Sep) nummonthtod=9;; Oct) nummonthtod=10;; Nov) nummonthtod=11;; Dec) nummonthtod=12;; esac # For the first six month of the year the time notation can also # be used for files modified in the last year. if (expr $nummonth \> $nummonthtod) > /dev/null; then year=`expr $year - 1` fi;; *) year=$3;; esac # The result. echo $day $month $year # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: freeipmi-1.6.4/config/texinfo.tex0000644002055400205540000116703613527342444016743 0ustar00achuachu00000000000000% texinfo.tex -- TeX macros to handle Texinfo files. % % Load plain if necessary, i.e., if running under initex. \expandafter\ifx\csname fmtname\endcsname\relax\input plain\fi % \def\texinfoversion{2013-02-01.11} % % Copyright 1985, 1986, 1988, 1990, 1991, 1992, 1993, 1994, 1995, % 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, % 2007, 2008, 2009, 2010, 2011, 2012, 2013 Free Software Foundation, Inc. % % This texinfo.tex file is free software: you can redistribute it and/or % modify it under the terms of the GNU General Public License as % published by the Free Software Foundation, either version 3 of the % License, or (at your option) any later version. % % This texinfo.tex file is distributed in the hope that it will be % useful, but WITHOUT ANY WARRANTY; without even the implied warranty % of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU % General Public License for more details. % % You should have received a copy of the GNU General Public License % along with this program. If not, see . % % As a special exception, when this file is read by TeX when processing % a Texinfo source document, you may use the result without % restriction. This Exception is an additional permission under section 7 % of the GNU General Public License, version 3 ("GPLv3"). % % Please try the latest version of texinfo.tex before submitting bug % reports; you can get the latest version from: % http://ftp.gnu.org/gnu/texinfo/ (the Texinfo release area), or % http://ftpmirror.gnu.org/texinfo/ (same, via a mirror), or % http://www.gnu.org/software/texinfo/ (the Texinfo home page) % The texinfo.tex in any given distribution could well be out % of date, so if that's what you're using, please check. % % Send bug reports to bug-texinfo@gnu.org. Please include including a % complete document in each bug report with which we can reproduce the % problem. Patches are, of course, greatly appreciated. % % To process a Texinfo manual with TeX, it's most reliable to use the % texi2dvi shell script that comes with the distribution. For a simple % manual foo.texi, however, you can get away with this: % tex foo.texi % texindex foo.?? % tex foo.texi % tex foo.texi % dvips foo.dvi -o # or whatever; this makes foo.ps. % The extra TeX runs get the cross-reference information correct. % Sometimes one run after texindex suffices, and sometimes you need more % than two; texi2dvi does it as many times as necessary. % % It is possible to adapt texinfo.tex for other languages, to some % extent. You can get the existing language-specific files from the % full Texinfo distribution. % % The GNU Texinfo home page is http://www.gnu.org/software/texinfo. \message{Loading texinfo [version \texinfoversion]:} % If in a .fmt file, print the version number % and turn on active characters that we couldn't do earlier because % they might have appeared in the input file name. \everyjob{\message{[Texinfo version \texinfoversion]}% \catcode`+=\active \catcode`\_=\active} \chardef\other=12 % We never want plain's \outer definition of \+ in Texinfo. % For @tex, we can use \tabalign. \let\+ = \relax % Save some plain tex macros whose names we will redefine. \let\ptexb=\b \let\ptexbullet=\bullet \let\ptexc=\c \let\ptexcomma=\, \let\ptexdot=\. \let\ptexdots=\dots \let\ptexend=\end \let\ptexequiv=\equiv \let\ptexexclam=\! \let\ptexfootnote=\footnote \let\ptexgtr=> \let\ptexhat=^ \let\ptexi=\i \let\ptexindent=\indent \let\ptexinsert=\insert \let\ptexlbrace=\{ \let\ptexless=< \let\ptexnewwrite\newwrite \let\ptexnoindent=\noindent \let\ptexplus=+ \let\ptexraggedright=\raggedright \let\ptexrbrace=\} \let\ptexslash=\/ \let\ptexstar=\* \let\ptext=\t \let\ptextop=\top {\catcode`\'=\active \global\let\ptexquoteright'}% active in plain's math mode % If this character appears in an error message or help string, it % starts a new line in the output. \newlinechar = `^^J % Use TeX 3.0's \inputlineno to get the line number, for better error % messages, but if we're using an old version of TeX, don't do anything. % \ifx\inputlineno\thisisundefined \let\linenumber = \empty % Pre-3.0. \else \def\linenumber{l.\the\inputlineno:\space} \fi % Set up fixed words for English if not already set. \ifx\putwordAppendix\undefined \gdef\putwordAppendix{Appendix}\fi \ifx\putwordChapter\undefined \gdef\putwordChapter{Chapter}\fi \ifx\putworderror\undefined \gdef\putworderror{error}\fi \ifx\putwordfile\undefined \gdef\putwordfile{file}\fi \ifx\putwordin\undefined \gdef\putwordin{in}\fi \ifx\putwordIndexIsEmpty\undefined \gdef\putwordIndexIsEmpty{(Index is empty)}\fi \ifx\putwordIndexNonexistent\undefined \gdef\putwordIndexNonexistent{(Index is nonexistent)}\fi \ifx\putwordInfo\undefined \gdef\putwordInfo{Info}\fi \ifx\putwordInstanceVariableof\undefined \gdef\putwordInstanceVariableof{Instance Variable of}\fi \ifx\putwordMethodon\undefined \gdef\putwordMethodon{Method on}\fi \ifx\putwordNoTitle\undefined \gdef\putwordNoTitle{No Title}\fi \ifx\putwordof\undefined \gdef\putwordof{of}\fi \ifx\putwordon\undefined \gdef\putwordon{on}\fi \ifx\putwordpage\undefined \gdef\putwordpage{page}\fi \ifx\putwordsection\undefined \gdef\putwordsection{section}\fi \ifx\putwordSection\undefined \gdef\putwordSection{Section}\fi \ifx\putwordsee\undefined \gdef\putwordsee{see}\fi \ifx\putwordSee\undefined \gdef\putwordSee{See}\fi \ifx\putwordShortTOC\undefined \gdef\putwordShortTOC{Short Contents}\fi \ifx\putwordTOC\undefined \gdef\putwordTOC{Table of Contents}\fi % \ifx\putwordMJan\undefined \gdef\putwordMJan{January}\fi \ifx\putwordMFeb\undefined \gdef\putwordMFeb{February}\fi \ifx\putwordMMar\undefined \gdef\putwordMMar{March}\fi \ifx\putwordMApr\undefined \gdef\putwordMApr{April}\fi \ifx\putwordMMay\undefined \gdef\putwordMMay{May}\fi \ifx\putwordMJun\undefined \gdef\putwordMJun{June}\fi \ifx\putwordMJul\undefined \gdef\putwordMJul{July}\fi \ifx\putwordMAug\undefined \gdef\putwordMAug{August}\fi \ifx\putwordMSep\undefined \gdef\putwordMSep{September}\fi \ifx\putwordMOct\undefined \gdef\putwordMOct{October}\fi \ifx\putwordMNov\undefined \gdef\putwordMNov{November}\fi \ifx\putwordMDec\undefined \gdef\putwordMDec{December}\fi % \ifx\putwordDefmac\undefined \gdef\putwordDefmac{Macro}\fi \ifx\putwordDefspec\undefined \gdef\putwordDefspec{Special Form}\fi \ifx\putwordDefvar\undefined \gdef\putwordDefvar{Variable}\fi \ifx\putwordDefopt\undefined \gdef\putwordDefopt{User Option}\fi \ifx\putwordDeffunc\undefined \gdef\putwordDeffunc{Function}\fi % Since the category of space is not known, we have to be careful. \chardef\spacecat = 10 \def\spaceisspace{\catcode`\ =\spacecat} % sometimes characters are active, so we need control sequences. \chardef\ampChar = `\& \chardef\colonChar = `\: \chardef\commaChar = `\, \chardef\dashChar = `\- \chardef\dotChar = `\. \chardef\exclamChar= `\! \chardef\hashChar = `\# \chardef\lquoteChar= `\` \chardef\questChar = `\? \chardef\rquoteChar= `\' \chardef\semiChar = `\; \chardef\slashChar = `\/ \chardef\underChar = `\_ % Ignore a token. % \def\gobble#1{} % The following is used inside several \edef's. \def\makecsname#1{\expandafter\noexpand\csname#1\endcsname} % Hyphenation fixes. \hyphenation{ Flor-i-da Ghost-script Ghost-view Mac-OS Post-Script ap-pen-dix bit-map bit-maps data-base data-bases eshell fall-ing half-way long-est man-u-script man-u-scripts mini-buf-fer mini-buf-fers over-view par-a-digm par-a-digms rath-er rec-tan-gu-lar ro-bot-ics se-vere-ly set-up spa-ces spell-ing spell-ings stand-alone strong-est time-stamp time-stamps which-ever white-space wide-spread wrap-around } % Margin to add to right of even pages, to left of odd pages. \newdimen\bindingoffset \newdimen\normaloffset \newdimen\pagewidth \newdimen\pageheight % For a final copy, take out the rectangles % that mark overfull boxes (in case you have decided % that the text looks ok even though it passes the margin). % \def\finalout{\overfullrule=0pt } % Sometimes it is convenient to have everything in the transcript file % and nothing on the terminal. We don't just call \tracingall here, % since that produces some useless output on the terminal. We also make % some effort to order the tracing commands to reduce output in the log % file; cf. trace.sty in LaTeX. % \def\gloggingall{\begingroup \globaldefs = 1 \loggingall \endgroup}% \def\loggingall{% \tracingstats2 \tracingpages1 \tracinglostchars2 % 2 gives us more in etex \tracingparagraphs1 \tracingoutput1 \tracingmacros2 \tracingrestores1 \showboxbreadth\maxdimen \showboxdepth\maxdimen \ifx\eTeXversion\thisisundefined\else % etex gives us more logging \tracingscantokens1 \tracingifs1 \tracinggroups1 \tracingnesting2 \tracingassigns1 \fi \tracingcommands3 % 3 gives us more in etex \errorcontextlines16 }% % @errormsg{MSG}. Do the index-like expansions on MSG, but if things % aren't perfect, it's not the end of the world, being an error message, % after all. % \def\errormsg{\begingroup \indexnofonts \doerrormsg} \def\doerrormsg#1{\errmessage{#1}} % add check for \lastpenalty to plain's definitions. If the last thing % we did was a \nobreak, we don't want to insert more space. % \def\smallbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\smallskipamount \removelastskip\penalty-50\smallskip\fi\fi} \def\medbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\medskipamount \removelastskip\penalty-100\medskip\fi\fi} \def\bigbreak{\ifnum\lastpenalty<10000\par\ifdim\lastskip<\bigskipamount \removelastskip\penalty-200\bigskip\fi\fi} % Do @cropmarks to get crop marks. % \newif\ifcropmarks \let\cropmarks = \cropmarkstrue % % Dimensions to add cropmarks at corners. % Added by P. A. MacKay, 12 Nov. 1986 % \newdimen\outerhsize \newdimen\outervsize % set by the paper size routines \newdimen\cornerlong \cornerlong=1pc \newdimen\cornerthick \cornerthick=.3pt \newdimen\topandbottommargin \topandbottommargin=.75in % Output a mark which sets \thischapter, \thissection and \thiscolor. % We dump everything together because we only have one kind of mark. % This works because we only use \botmark / \topmark, not \firstmark. % % A mark contains a subexpression of the \ifcase ... \fi construct. % \get*marks macros below extract the needed part using \ifcase. % % Another complication is to let the user choose whether \thischapter % (\thissection) refers to the chapter (section) in effect at the top % of a page, or that at the bottom of a page. The solution is % described on page 260 of The TeXbook. It involves outputting two % marks for the sectioning macros, one before the section break, and % one after. I won't pretend I can describe this better than DEK... \def\domark{% \toks0=\expandafter{\lastchapterdefs}% \toks2=\expandafter{\lastsectiondefs}% \toks4=\expandafter{\prevchapterdefs}% \toks6=\expandafter{\prevsectiondefs}% \toks8=\expandafter{\lastcolordefs}% \mark{% \the\toks0 \the\toks2 \noexpand\or \the\toks4 \the\toks6 \noexpand\else \the\toks8 }% } % \topmark doesn't work for the very first chapter (after the title % page or the contents), so we use \firstmark there -- this gets us % the mark with the chapter defs, unless the user sneaks in, e.g., % @setcolor (or @url, or @link, etc.) between @contents and the very % first @chapter. \def\gettopheadingmarks{% \ifcase0\topmark\fi \ifx\thischapter\empty \ifcase0\firstmark\fi \fi } \def\getbottomheadingmarks{\ifcase1\botmark\fi} \def\getcolormarks{\ifcase2\topmark\fi} % Avoid "undefined control sequence" errors. \def\lastchapterdefs{} \def\lastsectiondefs{} \def\prevchapterdefs{} \def\prevsectiondefs{} \def\lastcolordefs{} % Main output routine. \chardef\PAGE = 255 \output = {\onepageout{\pagecontents\PAGE}} \newbox\headlinebox \newbox\footlinebox % \onepageout takes a vbox as an argument. Note that \pagecontents % does insertions, but you have to call it yourself. \def\onepageout#1{% \ifcropmarks \hoffset=0pt \else \hoffset=\normaloffset \fi % \ifodd\pageno \advance\hoffset by \bindingoffset \else \advance\hoffset by -\bindingoffset\fi % % Do this outside of the \shipout so @code etc. will be expanded in % the headline as they should be, not taken literally (outputting ''code). \ifodd\pageno \getoddheadingmarks \else \getevenheadingmarks \fi \setbox\headlinebox = \vbox{\let\hsize=\pagewidth \makeheadline}% \ifodd\pageno \getoddfootingmarks \else \getevenfootingmarks \fi \setbox\footlinebox = \vbox{\let\hsize=\pagewidth \makefootline}% % {% % Have to do this stuff outside the \shipout because we want it to % take effect in \write's, yet the group defined by the \vbox ends % before the \shipout runs. % \indexdummies % don't expand commands in the output. \normalturnoffactive % \ in index entries must not stay \, e.g., if % the page break happens to be in the middle of an example. % We don't want .vr (or whatever) entries like this: % \entry{{\tt \indexbackslash }acronym}{32}{\code {\acronym}} % "\acronym" won't work when it's read back in; % it needs to be % {\code {{\tt \backslashcurfont }acronym} \shipout\vbox{% % Do this early so pdf references go to the beginning of the page. \ifpdfmakepagedest \pdfdest name{\the\pageno} xyz\fi % \ifcropmarks \vbox to \outervsize\bgroup \hsize = \outerhsize \vskip-\topandbottommargin \vtop to0pt{% \line{\ewtop\hfil\ewtop}% \nointerlineskip \line{% \vbox{\moveleft\cornerthick\nstop}% \hfill \vbox{\moveright\cornerthick\nstop}% }% \vss}% \vskip\topandbottommargin \line\bgroup \hfil % center the page within the outer (page) hsize. \ifodd\pageno\hskip\bindingoffset\fi \vbox\bgroup \fi % \unvbox\headlinebox \pagebody{#1}% \ifdim\ht\footlinebox > 0pt % Only leave this space if the footline is nonempty. % (We lessened \vsize for it in \oddfootingyyy.) % The \baselineskip=24pt in plain's \makefootline has no effect. \vskip 24pt \unvbox\footlinebox \fi % \ifcropmarks \egroup % end of \vbox\bgroup \hfil\egroup % end of (centering) \line\bgroup \vskip\topandbottommargin plus1fill minus1fill \boxmaxdepth = \cornerthick \vbox to0pt{\vss \line{% \vbox{\moveleft\cornerthick\nsbot}% \hfill \vbox{\moveright\cornerthick\nsbot}% }% \nointerlineskip \line{\ewbot\hfil\ewbot}% }% \egroup % \vbox from first cropmarks clause \fi }% end of \shipout\vbox }% end of group with \indexdummies \advancepageno \ifnum\outputpenalty>-20000 \else\dosupereject\fi } \newinsert\margin \dimen\margin=\maxdimen \def\pagebody#1{\vbox to\pageheight{\boxmaxdepth=\maxdepth #1}} {\catcode`\@ =11 \gdef\pagecontents#1{\ifvoid\topins\else\unvbox\topins\fi % marginal hacks, juha@viisa.uucp (Juha Takala) \ifvoid\margin\else % marginal info is present \rlap{\kern\hsize\vbox to\z@{\kern1pt\box\margin \vss}}\fi \dimen@=\dp#1\relax \unvbox#1\relax \ifvoid\footins\else\vskip\skip\footins\footnoterule \unvbox\footins\fi \ifr@ggedbottom \kern-\dimen@ \vfil \fi} } % Here are the rules for the cropmarks. Note that they are % offset so that the space between them is truly \outerhsize or \outervsize % (P. A. MacKay, 12 November, 1986) % \def\ewtop{\vrule height\cornerthick depth0pt width\cornerlong} \def\nstop{\vbox {\hrule height\cornerthick depth\cornerlong width\cornerthick}} \def\ewbot{\vrule height0pt depth\cornerthick width\cornerlong} \def\nsbot{\vbox {\hrule height\cornerlong depth\cornerthick width\cornerthick}} % Parse an argument, then pass it to #1. The argument is the rest of % the input line (except we remove a trailing comment). #1 should be a % macro which expects an ordinary undelimited TeX argument. % \def\parsearg{\parseargusing{}} \def\parseargusing#1#2{% \def\argtorun{#2}% \begingroup \obeylines \spaceisspace #1% \parseargline\empty% Insert the \empty token, see \finishparsearg below. } {\obeylines % \gdef\parseargline#1^^M{% \endgroup % End of the group started in \parsearg. \argremovecomment #1\comment\ArgTerm% }% } % First remove any @comment, then any @c comment. \def\argremovecomment#1\comment#2\ArgTerm{\argremovec #1\c\ArgTerm} \def\argremovec#1\c#2\ArgTerm{\argcheckspaces#1\^^M\ArgTerm} % Each occurrence of `\^^M' or `\^^M' is replaced by a single space. % % \argremovec might leave us with trailing space, e.g., % @end itemize @c foo % This space token undergoes the same procedure and is eventually removed % by \finishparsearg. % \def\argcheckspaces#1\^^M{\argcheckspacesX#1\^^M \^^M} \def\argcheckspacesX#1 \^^M{\argcheckspacesY#1\^^M} \def\argcheckspacesY#1\^^M#2\^^M#3\ArgTerm{% \def\temp{#3}% \ifx\temp\empty % Do not use \next, perhaps the caller of \parsearg uses it; reuse \temp: \let\temp\finishparsearg \else \let\temp\argcheckspaces \fi % Put the space token in: \temp#1 #3\ArgTerm } % If a _delimited_ argument is enclosed in braces, they get stripped; so % to get _exactly_ the rest of the line, we had to prevent such situation. % We prepended an \empty token at the very beginning and we expand it now, % just before passing the control to \argtorun. % (Similarly, we have to think about #3 of \argcheckspacesY above: it is % either the null string, or it ends with \^^M---thus there is no danger % that a pair of braces would be stripped. % % But first, we have to remove the trailing space token. % \def\finishparsearg#1 \ArgTerm{\expandafter\argtorun\expandafter{#1}} % \parseargdef\foo{...} % is roughly equivalent to % \def\foo{\parsearg\Xfoo} % \def\Xfoo#1{...} % % Actually, I use \csname\string\foo\endcsname, ie. \\foo, as it is my % favourite TeX trick. --kasal, 16nov03 \def\parseargdef#1{% \expandafter \doparseargdef \csname\string#1\endcsname #1% } \def\doparseargdef#1#2{% \def#2{\parsearg#1}% \def#1##1% } % Several utility definitions with active space: { \obeyspaces \gdef\obeyedspace{ } % Make each space character in the input produce a normal interword % space in the output. Don't allow a line break at this space, as this % is used only in environments like @example, where each line of input % should produce a line of output anyway. % \gdef\sepspaces{\obeyspaces\let =\tie} % If an index command is used in an @example environment, any spaces % therein should become regular spaces in the raw index file, not the % expansion of \tie (\leavevmode \penalty \@M \ ). \gdef\unsepspaces{\let =\space} } \def\flushcr{\ifx\par\lisppar \def\next##1{}\else \let\next=\relax \fi \next} % Define the framework for environments in texinfo.tex. It's used like this: % % \envdef\foo{...} % \def\Efoo{...} % % It's the responsibility of \envdef to insert \begingroup before the % actual body; @end closes the group after calling \Efoo. \envdef also % defines \thisenv, so the current environment is known; @end checks % whether the environment name matches. The \checkenv macro can also be % used to check whether the current environment is the one expected. % % Non-false conditionals (@iftex, @ifset) don't fit into this, so they % are not treated as environments; they don't open a group. (The % implementation of @end takes care not to call \endgroup in this % special case.) % At run-time, environments start with this: \def\startenvironment#1{\begingroup\def\thisenv{#1}} % initialize \let\thisenv\empty % ... but they get defined via ``\envdef\foo{...}'': \long\def\envdef#1#2{\def#1{\startenvironment#1#2}} \def\envparseargdef#1#2{\parseargdef#1{\startenvironment#1#2}} % Check whether we're in the right environment: \def\checkenv#1{% \def\temp{#1}% \ifx\thisenv\temp \else \badenverr \fi } % Environment mismatch, #1 expected: \def\badenverr{% \errhelp = \EMsimple \errmessage{This command can appear only \inenvironment\temp, not \inenvironment\thisenv}% } \def\inenvironment#1{% \ifx#1\empty outside of any environment% \else in environment \expandafter\string#1% \fi } % @end foo executes the definition of \Efoo. % But first, it executes a specialized version of \checkenv % \parseargdef\end{% \if 1\csname iscond.#1\endcsname \else % The general wording of \badenverr may not be ideal. \expandafter\checkenv\csname#1\endcsname \csname E#1\endcsname \endgroup \fi } \newhelp\EMsimple{Press RETURN to continue.} % Be sure we're in horizontal mode when doing a tie, since we make space % equivalent to this in @example-like environments. Otherwise, a space % at the beginning of a line will start with \penalty -- and % since \penalty is valid in vertical mode, we'd end up putting the % penalty on the vertical list instead of in the new paragraph. {\catcode`@ = 11 % Avoid using \@M directly, because that causes trouble % if the definition is written into an index file. \global\let\tiepenalty = \@M \gdef\tie{\leavevmode\penalty\tiepenalty\ } } % @: forces normal size whitespace following. \def\:{\spacefactor=1000 } % @* forces a line break. \def\*{\unskip\hfil\break\hbox{}\ignorespaces} % @/ allows a line break. \let\/=\allowbreak % @. is an end-of-sentence period. \def\.{.\spacefactor=\endofsentencespacefactor\space} % @! is an end-of-sentence bang. \def\!{!\spacefactor=\endofsentencespacefactor\space} % @? is an end-of-sentence query. \def\?{?\spacefactor=\endofsentencespacefactor\space} % @frenchspacing on|off says whether to put extra space after punctuation. % \def\onword{on} \def\offword{off} % \parseargdef\frenchspacing{% \def\temp{#1}% \ifx\temp\onword \plainfrenchspacing \else\ifx\temp\offword \plainnonfrenchspacing \else \errhelp = \EMsimple \errmessage{Unknown @frenchspacing option `\temp', must be on|off}% \fi\fi } % @w prevents a word break. Without the \leavevmode, @w at the % beginning of a paragraph, when TeX is still in vertical mode, would % produce a whole line of output instead of starting the paragraph. \def\w#1{\leavevmode\hbox{#1}} % @group ... @end group forces ... to be all on one page, by enclosing % it in a TeX vbox. We use \vtop instead of \vbox to construct the box % to keep its height that of a normal line. According to the rules for % \topskip (p.114 of the TeXbook), the glue inserted is % max (\topskip - \ht (first item), 0). If that height is large, % therefore, no glue is inserted, and the space between the headline and % the text is small, which looks bad. % % Another complication is that the group might be very large. This can % cause the glue on the previous page to be unduly stretched, because it % does not have much material. In this case, it's better to add an % explicit \vfill so that the extra space is at the bottom. The % threshold for doing this is if the group is more than \vfilllimit % percent of a page (\vfilllimit can be changed inside of @tex). % \newbox\groupbox \def\vfilllimit{0.7} % \envdef\group{% \ifnum\catcode`\^^M=\active \else \errhelp = \groupinvalidhelp \errmessage{@group invalid in context where filling is enabled}% \fi \startsavinginserts % \setbox\groupbox = \vtop\bgroup % Do @comment since we are called inside an environment such as % @example, where each end-of-line in the input causes an % end-of-line in the output. We don't want the end-of-line after % the `@group' to put extra space in the output. Since @group % should appear on a line by itself (according to the Texinfo % manual), we don't worry about eating any user text. \comment } % % The \vtop produces a box with normal height and large depth; thus, TeX puts % \baselineskip glue before it, and (when the next line of text is done) % \lineskip glue after it. Thus, space below is not quite equal to space % above. But it's pretty close. \def\Egroup{% % To get correct interline space between the last line of the group % and the first line afterwards, we have to propagate \prevdepth. \endgraf % Not \par, as it may have been set to \lisppar. \global\dimen1 = \prevdepth \egroup % End the \vtop. % \dimen0 is the vertical size of the group's box. \dimen0 = \ht\groupbox \advance\dimen0 by \dp\groupbox % \dimen2 is how much space is left on the page (more or less). \dimen2 = \pageheight \advance\dimen2 by -\pagetotal % if the group doesn't fit on the current page, and it's a big big % group, force a page break. \ifdim \dimen0 > \dimen2 \ifdim \pagetotal < \vfilllimit\pageheight \page \fi \fi \box\groupbox \prevdepth = \dimen1 \checkinserts } % % TeX puts in an \escapechar (i.e., `@') at the beginning of the help % message, so this ends up printing `@group can only ...'. % \newhelp\groupinvalidhelp{% group can only be used in environments such as @example,^^J% where each line of input produces a line of output.} % @need space-in-mils % forces a page break if there is not space-in-mils remaining. \newdimen\mil \mil=0.001in \parseargdef\need{% % Ensure vertical mode, so we don't make a big box in the middle of a % paragraph. \par % % If the @need value is less than one line space, it's useless. \dimen0 = #1\mil \dimen2 = \ht\strutbox \advance\dimen2 by \dp\strutbox \ifdim\dimen0 > \dimen2 % % Do a \strut just to make the height of this box be normal, so the % normal leading is inserted relative to the preceding line. % And a page break here is fine. \vtop to #1\mil{\strut\vfil}% % % TeX does not even consider page breaks if a penalty added to the % main vertical list is 10000 or more. But in order to see if the % empty box we just added fits on the page, we must make it consider % page breaks. On the other hand, we don't want to actually break the % page after the empty box. So we use a penalty of 9999. % % There is an extremely small chance that TeX will actually break the % page at this \penalty, if there are no other feasible breakpoints in % sight. (If the user is using lots of big @group commands, which % almost-but-not-quite fill up a page, TeX will have a hard time doing % good page breaking, for example.) However, I could not construct an % example where a page broke at this \penalty; if it happens in a real % document, then we can reconsider our strategy. \penalty9999 % % Back up by the size of the box, whether we did a page break or not. \kern -#1\mil % % Do not allow a page break right after this kern. \nobreak \fi } % @br forces paragraph break (and is undocumented). \let\br = \par % @page forces the start of a new page. % \def\page{\par\vfill\supereject} % @exdent text.... % outputs text on separate line in roman font, starting at standard page margin % This records the amount of indent in the innermost environment. % That's how much \exdent should take out. \newskip\exdentamount % This defn is used inside fill environments such as @defun. \parseargdef\exdent{\hfil\break\hbox{\kern -\exdentamount{\rm#1}}\hfil\break} % This defn is used inside nofill environments such as @example. \parseargdef\nofillexdent{{\advance \leftskip by -\exdentamount \leftline{\hskip\leftskip{\rm#1}}}} % @inmargin{WHICH}{TEXT} puts TEXT in the WHICH margin next to the current % paragraph. For more general purposes, use the \margin insertion % class. WHICH is `l' or `r'. Not documented, written for gawk manual. % \newskip\inmarginspacing \inmarginspacing=1cm \def\strutdepth{\dp\strutbox} % \def\doinmargin#1#2{\strut\vadjust{% \nobreak \kern-\strutdepth \vtop to \strutdepth{% \baselineskip=\strutdepth \vss % if you have multiple lines of stuff to put here, you'll need to % make the vbox yourself of the appropriate size. \ifx#1l% \llap{\ignorespaces #2\hskip\inmarginspacing}% \else \rlap{\hskip\hsize \hskip\inmarginspacing \ignorespaces #2}% \fi \null }% }} \def\inleftmargin{\doinmargin l} \def\inrightmargin{\doinmargin r} % % @inmargin{TEXT [, RIGHT-TEXT]} % (if RIGHT-TEXT is given, use TEXT for left page, RIGHT-TEXT for right; % else use TEXT for both). % \def\inmargin#1{\parseinmargin #1,,\finish} \def\parseinmargin#1,#2,#3\finish{% not perfect, but better than nothing. \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \def\lefttext{#1}% have both texts \def\righttext{#2}% \else \def\lefttext{#1}% have only one text \def\righttext{#1}% \fi % \ifodd\pageno \def\temp{\inrightmargin\righttext}% odd page -> outside is right margin \else \def\temp{\inleftmargin\lefttext}% \fi \temp } % @| inserts a changebar to the left of the current line. It should % surround any changed text. This approach does *not* work if the % change spans more than two lines of output. To handle that, we would % have adopt a much more difficult approach (putting marks into the main % vertical list for the beginning and end of each change). This command % is not documented, not supported, and doesn't work. % \def\|{% % \vadjust can only be used in horizontal mode. \leavevmode % % Append this vertical mode material after the current line in the output. \vadjust{% % We want to insert a rule with the height and depth of the current % leading; that is exactly what \strutbox is supposed to record. \vskip-\baselineskip % % \vadjust-items are inserted at the left edge of the type. So % the \llap here moves out into the left-hand margin. \llap{% % % For a thicker or thinner bar, change the `1pt'. \vrule height\baselineskip width1pt % % This is the space between the bar and the text. \hskip 12pt }% }% } % @include FILE -- \input text of FILE. % \def\include{\parseargusing\filenamecatcodes\includezzz} \def\includezzz#1{% \pushthisfilestack \def\thisfile{#1}% {% \makevalueexpandable % we want to expand any @value in FILE. \turnoffactive % and allow special characters in the expansion \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @include of #1^^J}% \edef\temp{\noexpand\input #1 }% % % This trickery is to read FILE outside of a group, in case it makes % definitions, etc. \expandafter }\temp \popthisfilestack } \def\filenamecatcodes{% \catcode`\\=\other \catcode`~=\other \catcode`^=\other \catcode`_=\other \catcode`|=\other \catcode`<=\other \catcode`>=\other \catcode`+=\other \catcode`-=\other \catcode`\`=\other \catcode`\'=\other } \def\pushthisfilestack{% \expandafter\pushthisfilestackX\popthisfilestack\StackTerm } \def\pushthisfilestackX{% \expandafter\pushthisfilestackY\thisfile\StackTerm } \def\pushthisfilestackY #1\StackTerm #2\StackTerm {% \gdef\popthisfilestack{\gdef\thisfile{#1}\gdef\popthisfilestack{#2}}% } \def\popthisfilestack{\errthisfilestackempty} \def\errthisfilestackempty{\errmessage{Internal error: the stack of filenames is empty.}} % \def\thisfile{} % @center line % outputs that line, centered. % \parseargdef\center{% \ifhmode \let\centersub\centerH \else \let\centersub\centerV \fi \centersub{\hfil \ignorespaces#1\unskip \hfil}% \let\centersub\relax % don't let the definition persist, just in case } \def\centerH#1{{% \hfil\break \advance\hsize by -\leftskip \advance\hsize by -\rightskip \line{#1}% \break }} % \newcount\centerpenalty \def\centerV#1{% % The idea here is the same as in \startdefun, \cartouche, etc.: if % @center is the first thing after a section heading, we need to wipe % out the negative parskip inserted by \sectionheading, but still % prevent a page break here. \centerpenalty = \lastpenalty \ifnum\centerpenalty>10000 \vskip\parskip \fi \ifnum\centerpenalty>9999 \penalty\centerpenalty \fi \line{\kern\leftskip #1\kern\rightskip}% } % @sp n outputs n lines of vertical space % \parseargdef\sp{\vskip #1\baselineskip} % @comment ...line which is ignored... % @c is the same as @comment % @ignore ... @end ignore is another way to write a comment % \def\comment{\begingroup \catcode`\^^M=\other% \catcode`\@=\other \catcode`\{=\other \catcode`\}=\other% \commentxxx} {\catcode`\^^M=\other \gdef\commentxxx#1^^M{\endgroup}} % \let\c=\comment % @paragraphindent NCHARS % We'll use ems for NCHARS, close enough. % NCHARS can also be the word `asis' or `none'. % We cannot feasibly implement @paragraphindent asis, though. % \def\asisword{asis} % no translation, these are keywords \def\noneword{none} % \parseargdef\paragraphindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \defaultparindent = 0pt \else \defaultparindent = #1em \fi \fi \parindent = \defaultparindent } % @exampleindent NCHARS % We'll use ems for NCHARS like @paragraphindent. % It seems @exampleindent asis isn't necessary, but % I preserve it to make it similar to @paragraphindent. \parseargdef\exampleindent{% \def\temp{#1}% \ifx\temp\asisword \else \ifx\temp\noneword \lispnarrowing = 0pt \else \lispnarrowing = #1em \fi \fi } % @firstparagraphindent WORD % If WORD is `none', then suppress indentation of the first paragraph % after a section heading. If WORD is `insert', then do indent at such % paragraphs. % % The paragraph indentation is suppressed or not by calling % \suppressfirstparagraphindent, which the sectioning commands do. % We switch the definition of this back and forth according to WORD. % By default, we suppress indentation. % \def\suppressfirstparagraphindent{\dosuppressfirstparagraphindent} \def\insertword{insert} % \parseargdef\firstparagraphindent{% \def\temp{#1}% \ifx\temp\noneword \let\suppressfirstparagraphindent = \dosuppressfirstparagraphindent \else\ifx\temp\insertword \let\suppressfirstparagraphindent = \relax \else \errhelp = \EMsimple \errmessage{Unknown @firstparagraphindent option `\temp'}% \fi\fi } % Here is how we actually suppress indentation. Redefine \everypar to % \kern backwards by \parindent, and then reset itself to empty. % % We also make \indent itself not actually do anything until the next % paragraph. % \gdef\dosuppressfirstparagraphindent{% \gdef\indent{% \restorefirstparagraphindent \indent }% \gdef\noindent{% \restorefirstparagraphindent \noindent }% \global\everypar = {% \kern -\parindent \restorefirstparagraphindent }% } \gdef\restorefirstparagraphindent{% \global \let \indent = \ptexindent \global \let \noindent = \ptexnoindent \global \everypar = {}% } % @refill is a no-op. \let\refill=\relax % If working on a large document in chapters, it is convenient to % be able to disable indexing, cross-referencing, and contents, for test runs. % This is done with @novalidate (before @setfilename). % \newif\iflinks \linkstrue % by default we want the aux files. \let\novalidate = \linksfalse % @setfilename is done at the beginning of every texinfo file. % So open here the files we need to have open while reading the input. % This makes it possible to make a .fmt file for texinfo. \def\setfilename{% \fixbackslash % Turn off hack to swallow `\input texinfo'. \iflinks \tryauxfile % Open the new aux file. TeX will close it automatically at exit. \immediate\openout\auxfile=\jobname.aux \fi % \openindices needs to do some work in any case. \openindices \let\setfilename=\comment % Ignore extra @setfilename cmds. % % If texinfo.cnf is present on the system, read it. % Useful for site-wide @afourpaper, etc. \openin 1 texinfo.cnf \ifeof 1 \else \input texinfo.cnf \fi \closein 1 % \comment % Ignore the actual filename. } % Called from \setfilename. % \def\openindices{% \newindex{cp}% \newcodeindex{fn}% \newcodeindex{vr}% \newcodeindex{tp}% \newcodeindex{ky}% \newcodeindex{pg}% } % @bye. \outer\def\bye{\pagealignmacro\tracingstats=1\ptexend} \message{pdf,} % adobe `portable' document format \newcount\tempnum \newcount\lnkcount \newtoks\filename \newcount\filenamelength \newcount\pgn \newtoks\toksA \newtoks\toksB \newtoks\toksC \newtoks\toksD \newbox\boxA \newcount\countA \newif\ifpdf \newif\ifpdfmakepagedest % when pdftex is run in dvi mode, \pdfoutput is defined (so \pdfoutput=1 % can be set). So we test for \relax and 0 as well as being undefined. \ifx\pdfoutput\thisisundefined \else \ifx\pdfoutput\relax \else \ifcase\pdfoutput \else \pdftrue \fi \fi \fi % PDF uses PostScript string constants for the names of xref targets, % for display in the outlines, and in other places. Thus, we have to % double any backslashes. Otherwise, a name like "\node" will be % interpreted as a newline (\n), followed by o, d, e. Not good. % % See http://www.ntg.nl/pipermail/ntg-pdftex/2004-July/000654.html and % related messages. The final outcome is that it is up to the TeX user % to double the backslashes and otherwise make the string valid, so % that's what we do. pdftex 1.30.0 (ca.2005) introduced a primitive to % do this reliably, so we use it. % #1 is a control sequence in which to do the replacements, % which we \xdef. \def\txiescapepdf#1{% \ifx\pdfescapestring\thisisundefined % No primitive available; should we give a warning or log? % Many times it won't matter. \else % The expandable \pdfescapestring primitive escapes parentheses, % backslashes, and other special chars. \xdef#1{\pdfescapestring{#1}}% \fi } \newhelp\nopdfimagehelp{Texinfo supports .png, .jpg, .jpeg, and .pdf images with PDF output, and none of those formats could be found. (.eps cannot be supported due to the design of the PDF format; use regular TeX (DVI output) for that.)} \ifpdf % % Color manipulation macros based on pdfcolor.tex, % except using rgb instead of cmyk; the latter is said to render as a % very dark gray on-screen and a very dark halftone in print, instead % of actual black. \def\rgbDarkRed{0.50 0.09 0.12} \def\rgbBlack{0 0 0} % % k sets the color for filling (usual text, etc.); % K sets the color for stroking (thin rules, e.g., normal _'s). \def\pdfsetcolor#1{\pdfliteral{#1 rg #1 RG}} % % Set color, and create a mark which defines \thiscolor accordingly, % so that \makeheadline knows which color to restore. \def\setcolor#1{% \xdef\lastcolordefs{\gdef\noexpand\thiscolor{#1}}% \domark \pdfsetcolor{#1}% } % \def\maincolor{\rgbBlack} \pdfsetcolor{\maincolor} \edef\thiscolor{\maincolor} \def\lastcolordefs{} % \def\makefootline{% \baselineskip24pt \line{\pdfsetcolor{\maincolor}\the\footline}% } % \def\makeheadline{% \vbox to 0pt{% \vskip-22.5pt \line{% \vbox to8.5pt{}% % Extract \thiscolor definition from the marks. \getcolormarks % Typeset the headline with \maincolor, then restore the color. \pdfsetcolor{\maincolor}\the\headline\pdfsetcolor{\thiscolor}% }% \vss }% \nointerlineskip } % % \pdfcatalog{/PageMode /UseOutlines} % % #1 is image name, #2 width (might be empty/whitespace), #3 height (ditto). \def\dopdfimage#1#2#3{% \def\pdfimagewidth{#2}\setbox0 = \hbox{\ignorespaces #2}% \def\pdfimageheight{#3}\setbox2 = \hbox{\ignorespaces #3}% % % pdftex (and the PDF format) support .pdf, .png, .jpg (among % others). Let's try in that order, PDF first since if % someone has a scalable image, presumably better to use that than a % bitmap. \let\pdfimgext=\empty \begingroup \openin 1 #1.pdf \ifeof 1 \openin 1 #1.PDF \ifeof 1 \openin 1 #1.png \ifeof 1 \openin 1 #1.jpg \ifeof 1 \openin 1 #1.jpeg \ifeof 1 \openin 1 #1.JPG \ifeof 1 \errhelp = \nopdfimagehelp \errmessage{Could not find image file #1 for pdf}% \else \gdef\pdfimgext{JPG}% \fi \else \gdef\pdfimgext{jpeg}% \fi \else \gdef\pdfimgext{jpg}% \fi \else \gdef\pdfimgext{png}% \fi \else \gdef\pdfimgext{PDF}% \fi \else \gdef\pdfimgext{pdf}% \fi \closein 1 \endgroup % % without \immediate, ancient pdftex seg faults when the same image is % included twice. (Version 3.14159-pre-1.0-unofficial-20010704.) \ifnum\pdftexversion < 14 \immediate\pdfimage \else \immediate\pdfximage \fi \ifdim \wd0 >0pt width \pdfimagewidth \fi \ifdim \wd2 >0pt height \pdfimageheight \fi \ifnum\pdftexversion<13 #1.\pdfimgext \else {#1.\pdfimgext}% \fi \ifnum\pdftexversion < 14 \else \pdfrefximage \pdflastximage \fi} % \def\pdfmkdest#1{{% % We have to set dummies so commands such as @code, and characters % such as \, aren't expanded when present in a section title. \indexnofonts \turnoffactive \makevalueexpandable \def\pdfdestname{#1}% \txiescapepdf\pdfdestname \safewhatsit{\pdfdest name{\pdfdestname} xyz}% }} % % used to mark target names; must be expandable. \def\pdfmkpgn#1{#1} % % by default, use a color that is dark enough to print on paper as % nearly black, but still distinguishable for online viewing. \def\urlcolor{\rgbDarkRed} \def\linkcolor{\rgbDarkRed} \def\endlink{\setcolor{\maincolor}\pdfendlink} % % Adding outlines to PDF; macros for calculating structure of outlines % come from Petr Olsak \def\expnumber#1{\expandafter\ifx\csname#1\endcsname\relax 0% \else \csname#1\endcsname \fi} \def\advancenumber#1{\tempnum=\expnumber{#1}\relax \advance\tempnum by 1 \expandafter\xdef\csname#1\endcsname{\the\tempnum}} % % #1 is the section text, which is what will be displayed in the % outline by the pdf viewer. #2 is the pdf expression for the number % of subentries (or empty, for subsubsections). #3 is the node text, % which might be empty if this toc entry had no corresponding node. % #4 is the page number % \def\dopdfoutline#1#2#3#4{% % Generate a link to the node text if that exists; else, use the % page number. We could generate a destination for the section % text in the case where a section has no node, but it doesn't % seem worth the trouble, since most documents are normally structured. \edef\pdfoutlinedest{#3}% \ifx\pdfoutlinedest\empty \def\pdfoutlinedest{#4}% \else \txiescapepdf\pdfoutlinedest \fi % % Also escape PDF chars in the display string. \edef\pdfoutlinetext{#1}% \txiescapepdf\pdfoutlinetext % \pdfoutline goto name{\pdfmkpgn{\pdfoutlinedest}}#2{\pdfoutlinetext}% } % \def\pdfmakeoutlines{% \begingroup % Read toc silently, to get counts of subentries for \pdfoutline. \def\partentry##1##2##3##4{}% ignore parts in the outlines \def\numchapentry##1##2##3##4{% \def\thischapnum{##2}% \def\thissecnum{0}% \def\thissubsecnum{0}% }% \def\numsecentry##1##2##3##4{% \advancenumber{chap\thischapnum}% \def\thissecnum{##2}% \def\thissubsecnum{0}% }% \def\numsubsecentry##1##2##3##4{% \advancenumber{sec\thissecnum}% \def\thissubsecnum{##2}% }% \def\numsubsubsecentry##1##2##3##4{% \advancenumber{subsec\thissubsecnum}% }% \def\thischapnum{0}% \def\thissecnum{0}% \def\thissubsecnum{0}% % % use \def rather than \let here because we redefine \chapentry et % al. a second time, below. \def\appentry{\numchapentry}% \def\appsecentry{\numsecentry}% \def\appsubsecentry{\numsubsecentry}% \def\appsubsubsecentry{\numsubsubsecentry}% \def\unnchapentry{\numchapentry}% \def\unnsecentry{\numsecentry}% \def\unnsubsecentry{\numsubsecentry}% \def\unnsubsubsecentry{\numsubsubsecentry}% \readdatafile{toc}% % % Read toc second time, this time actually producing the outlines. % The `-' means take the \expnumber as the absolute number of % subentries, which we calculated on our first read of the .toc above. % % We use the node names as the destinations. \def\numchapentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{chap##2}}{##3}{##4}}% \def\numsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{sec##2}}{##3}{##4}}% \def\numsubsecentry##1##2##3##4{% \dopdfoutline{##1}{count-\expnumber{subsec##2}}{##3}{##4}}% \def\numsubsubsecentry##1##2##3##4{% count is always zero \dopdfoutline{##1}{}{##3}{##4}}% % % PDF outlines are displayed using system fonts, instead of % document fonts. Therefore we cannot use special characters, % since the encoding is unknown. For example, the eogonek from % Latin 2 (0xea) gets translated to a | character. Info from % Staszek Wawrykiewicz, 19 Jan 2004 04:09:24 +0100. % % TODO this right, we have to translate 8-bit characters to % their "best" equivalent, based on the @documentencoding. Too % much work for too little return. Just use the ASCII equivalents % we use for the index sort strings. % \indexnofonts \setupdatafile % We can have normal brace characters in the PDF outlines, unlike % Texinfo index files. So set that up. \def\{{\lbracecharliteral}% \def\}{\rbracecharliteral}% \catcode`\\=\active \otherbackslash \input \tocreadfilename \endgroup } {\catcode`[=1 \catcode`]=2 \catcode`{=\other \catcode`}=\other \gdef\lbracecharliteral[{]% \gdef\rbracecharliteral[}]% ] % \def\skipspaces#1{\def\PP{#1}\def\D{|}% \ifx\PP\D\let\nextsp\relax \else\let\nextsp\skipspaces \addtokens{\filename}{\PP}% \advance\filenamelength by 1 \fi \nextsp} \def\getfilename#1{% \filenamelength=0 % If we don't expand the argument now, \skipspaces will get % snagged on things like "@value{foo}". \edef\temp{#1}% \expandafter\skipspaces\temp|\relax } \ifnum\pdftexversion < 14 \let \startlink \pdfannotlink \else \let \startlink \pdfstartlink \fi % make a live url in pdf output. \def\pdfurl#1{% \begingroup % it seems we really need yet another set of dummies; have not % tried to figure out what each command should do in the context % of @url. for now, just make @/ a no-op, that's the only one % people have actually reported a problem with. % \normalturnoffactive \def\@{@}% \let\/=\empty \makevalueexpandable % do we want to go so far as to use \indexnofonts instead of just % special-casing \var here? \def\var##1{##1}% % \leavevmode\setcolor{\urlcolor}% \startlink attr{/Border [0 0 0]}% user{/Subtype /Link /A << /S /URI /URI (#1) >>}% \endgroup} \def\pdfgettoks#1.{\setbox\boxA=\hbox{\toksA={#1.}\toksB={}\maketoks}} \def\addtokens#1#2{\edef\addtoks{\noexpand#1={\the#1#2}}\addtoks} \def\adn#1{\addtokens{\toksC}{#1}\global\countA=1\let\next=\maketoks} \def\poptoks#1#2|ENDTOKS|{\let\first=#1\toksD={#1}\toksA={#2}} \def\maketoks{% \expandafter\poptoks\the\toksA|ENDTOKS|\relax \ifx\first0\adn0 \else\ifx\first1\adn1 \else\ifx\first2\adn2 \else\ifx\first3\adn3 \else\ifx\first4\adn4 \else\ifx\first5\adn5 \else\ifx\first6\adn6 \else\ifx\first7\adn7 \else\ifx\first8\adn8 \else\ifx\first9\adn9 \else \ifnum0=\countA\else\makelink\fi \ifx\first.\let\next=\done\else \let\next=\maketoks \addtokens{\toksB}{\the\toksD} \ifx\first,\addtokens{\toksB}{\space}\fi \fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \next} \def\makelink{\addtokens{\toksB}% {\noexpand\pdflink{\the\toksC}}\toksC={}\global\countA=0} \def\pdflink#1{% \startlink attr{/Border [0 0 0]} goto name{\pdfmkpgn{#1}} \setcolor{\linkcolor}#1\endlink} \def\done{\edef\st{\global\noexpand\toksA={\the\toksB}}\st} \else % non-pdf mode \let\pdfmkdest = \gobble \let\pdfurl = \gobble \let\endlink = \relax \let\setcolor = \gobble \let\pdfsetcolor = \gobble \let\pdfmakeoutlines = \relax \fi % \ifx\pdfoutput \message{fonts,} % Change the current font style to #1, remembering it in \curfontstyle. % For now, we do not accumulate font styles: @b{@i{foo}} prints foo in % italics, not bold italics. % \def\setfontstyle#1{% \def\curfontstyle{#1}% not as a control sequence, because we are \edef'd. \csname ten#1\endcsname % change the current font } % Select #1 fonts with the current style. % \def\selectfonts#1{\csname #1fonts\endcsname \csname\curfontstyle\endcsname} \def\rm{\fam=0 \setfontstyle{rm}} \def\it{\fam=\itfam \setfontstyle{it}} \def\sl{\fam=\slfam \setfontstyle{sl}} \def\bf{\fam=\bffam \setfontstyle{bf}}\def\bfstylename{bf} \def\tt{\fam=\ttfam \setfontstyle{tt}} % Unfortunately, we have to override this for titles and the like, since % in those cases "rm" is bold. Sigh. \def\rmisbold{\rm\def\curfontstyle{bf}} % Texinfo sort of supports the sans serif font style, which plain TeX does not. % So we set up a \sf. \newfam\sffam \def\sf{\fam=\sffam \setfontstyle{sf}} \let\li = \sf % Sometimes we call it \li, not \sf. % We don't need math for this font style. \def\ttsl{\setfontstyle{ttsl}} % Set the baselineskip to #1, and the lineskip and strut size % correspondingly. There is no deep meaning behind these magic numbers % used as factors; they just match (closely enough) what Knuth defined. % \def\lineskipfactor{.08333} \def\strutheightpercent{.70833} \def\strutdepthpercent {.29167} % % can get a sort of poor man's double spacing by redefining this. \def\baselinefactor{1} % \newdimen\textleading \def\setleading#1{% \dimen0 = #1\relax \normalbaselineskip = \baselinefactor\dimen0 \normallineskip = \lineskipfactor\normalbaselineskip \normalbaselines \setbox\strutbox =\hbox{% \vrule width0pt height\strutheightpercent\baselineskip depth \strutdepthpercent \baselineskip }% } % PDF CMaps. See also LaTeX's t1.cmap. % % do nothing with this by default. \expandafter\let\csname cmapOT1\endcsname\gobble \expandafter\let\csname cmapOT1IT\endcsname\gobble \expandafter\let\csname cmapOT1TT\endcsname\gobble % if we are producing pdf, and we have \pdffontattr, then define cmaps. % (\pdffontattr was introduced many years ago, but people still run % older pdftex's; it's easy to conditionalize, so we do.) \ifpdf \ifx\pdffontattr\thisisundefined \else \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1-0) %%Title: (TeX-OT1-0 TeX OT1 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1) /Supplement 0 >> def /CMapName /TeX-OT1-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <23> <26> <0023> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 40 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1IT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1IT-0) %%Title: (TeX-OT1IT-0 TeX OT1IT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1IT) /Supplement 0 >> def /CMapName /TeX-OT1IT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 8 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <25> <26> <0025> <28> <3B> <0028> <3F> <5B> <003F> <5D> <5E> <005D> <61> <7A> <0061> <7B> <7C> <2013> endbfrange 42 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <00660066> <0C> <00660069> <0D> <0066006C> <0E> <006600660069> <0F> <00660066006C> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <21> <0021> <22> <201D> <23> <0023> <24> <00A3> <27> <2019> <3C> <00A1> <3D> <003D> <3E> <00BF> <5C> <201C> <5F> <02D9> <60> <2018> <7D> <02DD> <7E> <007E> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1IT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% % % \cmapOT1TT \begingroup \catcode`\^^M=\active \def^^M{^^J}% Output line endings as the ^^J char. \catcode`\%=12 \immediate\pdfobj stream {%!PS-Adobe-3.0 Resource-CMap %%DocumentNeededResources: ProcSet (CIDInit) %%IncludeResource: ProcSet (CIDInit) %%BeginResource: CMap (TeX-OT1TT-0) %%Title: (TeX-OT1TT-0 TeX OT1TT 0) %%Version: 1.000 %%EndComments /CIDInit /ProcSet findresource begin 12 dict begin begincmap /CIDSystemInfo << /Registry (TeX) /Ordering (OT1TT) /Supplement 0 >> def /CMapName /TeX-OT1TT-0 def /CMapType 2 def 1 begincodespacerange <00> <7F> endcodespacerange 5 beginbfrange <00> <01> <0393> <09> <0A> <03A8> <21> <26> <0021> <28> <5F> <0028> <61> <7E> <0061> endbfrange 32 beginbfchar <02> <0398> <03> <039B> <04> <039E> <05> <03A0> <06> <03A3> <07> <03D2> <08> <03A6> <0B> <2191> <0C> <2193> <0D> <0027> <0E> <00A1> <0F> <00BF> <10> <0131> <11> <0237> <12> <0060> <13> <00B4> <14> <02C7> <15> <02D8> <16> <00AF> <17> <02DA> <18> <00B8> <19> <00DF> <1A> <00E6> <1B> <0153> <1C> <00F8> <1D> <00C6> <1E> <0152> <1F> <00D8> <20> <2423> <27> <2019> <60> <2018> <7F> <00A8> endbfchar endcmap CMapName currentdict /CMap defineresource pop end end %%EndResource %%EOF }\endgroup \expandafter\edef\csname cmapOT1TT\endcsname#1{% \pdffontattr#1{/ToUnicode \the\pdflastobj\space 0 R}% }% \fi\fi % Set the font macro #1 to the font named \fontprefix#2. % #3 is the font's design size, #4 is a scale factor, #5 is the CMap % encoding (only OT1, OT1IT and OT1TT are allowed, or empty to omit). % Example: % #1 = \textrm % #2 = \rmshape % #3 = 10 % #4 = \mainmagstep % #5 = OT1 % \def\setfont#1#2#3#4#5{% \font#1=\fontprefix#2#3 scaled #4 \csname cmap#5\endcsname#1% } % This is what gets called when #5 of \setfont is empty. \let\cmap\gobble % % (end of cmaps) % Use cm as the default font prefix. % To specify the font prefix, you must define \fontprefix % before you read in texinfo.tex. \ifx\fontprefix\thisisundefined \def\fontprefix{cm} \fi % Support font families that don't use the same naming scheme as CM. \def\rmshape{r} \def\rmbshape{bx} % where the normal face is bold \def\bfshape{b} \def\bxshape{bx} \def\ttshape{tt} \def\ttbshape{tt} \def\ttslshape{sltt} \def\itshape{ti} \def\itbshape{bxti} \def\slshape{sl} \def\slbshape{bxsl} \def\sfshape{ss} \def\sfbshape{ss} \def\scshape{csc} \def\scbshape{csc} % Definitions for a main text size of 11pt. (The default in Texinfo.) % \def\definetextfontsizexi{% % Text fonts (11.2pt, magstep1). \def\textnominalsize{11pt} \edef\mainmagstep{\magstephalf} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1095} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstep1}{OT1} \setfont\deftt\ttshape{10}{\magstep1}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstep1}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter (and unnumbered) fonts (17.28pt). \def\chapnominalsize{17pt} \setfont\chaprm\rmbshape{12}{\magstep2}{OT1} \setfont\chapit\itbshape{10}{\magstep3}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep3}{OT1} \setfont\chaptt\ttbshape{12}{\magstep2}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep3}{OT1TT} \setfont\chapsf\sfbshape{17}{1000}{OT1} \let\chapbf=\chaprm \setfont\chapsc\scbshape{10}{\magstep3}{OT1} \font\chapi=cmmi12 scaled \magstep2 \font\chapsy=cmsy10 scaled \magstep3 \def\chapecsize{1728} % Section fonts (14.4pt). \def\secnominalsize{14pt} \setfont\secrm\rmbshape{12}{\magstep1}{OT1} \setfont\secit\itbshape{10}{\magstep2}{OT1IT} \setfont\secsl\slbshape{10}{\magstep2}{OT1} \setfont\sectt\ttbshape{12}{\magstep1}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\secsf\sfbshape{12}{\magstep1}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep2}{OT1} \font\seci=cmmi12 scaled \magstep1 \font\secsy=cmsy10 scaled \magstep2 \def\sececsize{1440} % Subsection fonts (13.15pt). \def\ssecnominalsize{13pt} \setfont\ssecrm\rmbshape{12}{\magstephalf}{OT1} \setfont\ssecit\itbshape{10}{1315}{OT1IT} \setfont\ssecsl\slbshape{10}{1315}{OT1} \setfont\ssectt\ttbshape{12}{\magstephalf}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1315}{OT1TT} \setfont\ssecsf\sfbshape{12}{\magstephalf}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1315}{OT1} \font\sseci=cmmi12 scaled \magstephalf \font\ssecsy=cmsy10 scaled 1315 \def\ssececsize{1200} % Reduced fonts for @acro in text (10pt). \def\reducednominalsize{10pt} \setfont\reducedrm\rmshape{10}{1000}{OT1} \setfont\reducedtt\ttshape{10}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{1000}{OT1} \setfont\reducedit\itshape{10}{1000}{OT1IT} \setfont\reducedsl\slshape{10}{1000}{OT1} \setfont\reducedsf\sfshape{10}{1000}{OT1} \setfont\reducedsc\scshape{10}{1000}{OT1} \setfont\reducedttsl\ttslshape{10}{1000}{OT1TT} \font\reducedi=cmmi10 \font\reducedsy=cmsy10 \def\reducedecsize{1000} \textleading = 13.2pt % line spacing for 11pt CM \textfonts % reset the current fonts \rm } % end of 11pt text font size definitions, \definetextfontsizexi % Definitions to make the main text be 10pt Computer Modern, with % section, chapter, etc., sizes following suit. This is for the GNU % Press printing of the Emacs 22 manual. Maybe other manuals in the % future. Used with @smallbook, which sets the leading to 12pt. % \def\definetextfontsizex{% % Text fonts (10pt). \def\textnominalsize{10pt} \edef\mainmagstep{1000} \setfont\textrm\rmshape{10}{\mainmagstep}{OT1} \setfont\texttt\ttshape{10}{\mainmagstep}{OT1TT} \setfont\textbf\bfshape{10}{\mainmagstep}{OT1} \setfont\textit\itshape{10}{\mainmagstep}{OT1IT} \setfont\textsl\slshape{10}{\mainmagstep}{OT1} \setfont\textsf\sfshape{10}{\mainmagstep}{OT1} \setfont\textsc\scshape{10}{\mainmagstep}{OT1} \setfont\textttsl\ttslshape{10}{\mainmagstep}{OT1TT} \font\texti=cmmi10 scaled \mainmagstep \font\textsy=cmsy10 scaled \mainmagstep \def\textecsize{1000} % A few fonts for @defun names and args. \setfont\defbf\bfshape{10}{\magstephalf}{OT1} \setfont\deftt\ttshape{10}{\magstephalf}{OT1TT} \setfont\defttsl\ttslshape{10}{\magstephalf}{OT1TT} \def\df{\let\tentt=\deftt \let\tenbf = \defbf \let\tenttsl=\defttsl \bf} % Fonts for indices, footnotes, small examples (9pt). \def\smallnominalsize{9pt} \setfont\smallrm\rmshape{9}{1000}{OT1} \setfont\smalltt\ttshape{9}{1000}{OT1TT} \setfont\smallbf\bfshape{10}{900}{OT1} \setfont\smallit\itshape{9}{1000}{OT1IT} \setfont\smallsl\slshape{9}{1000}{OT1} \setfont\smallsf\sfshape{9}{1000}{OT1} \setfont\smallsc\scshape{10}{900}{OT1} \setfont\smallttsl\ttslshape{10}{900}{OT1TT} \font\smalli=cmmi9 \font\smallsy=cmsy9 \def\smallecsize{0900} % Fonts for small examples (8pt). \def\smallernominalsize{8pt} \setfont\smallerrm\rmshape{8}{1000}{OT1} \setfont\smallertt\ttshape{8}{1000}{OT1TT} \setfont\smallerbf\bfshape{10}{800}{OT1} \setfont\smallerit\itshape{8}{1000}{OT1IT} \setfont\smallersl\slshape{8}{1000}{OT1} \setfont\smallersf\sfshape{8}{1000}{OT1} \setfont\smallersc\scshape{10}{800}{OT1} \setfont\smallerttsl\ttslshape{10}{800}{OT1TT} \font\smalleri=cmmi8 \font\smallersy=cmsy8 \def\smallerecsize{0800} % Fonts for title page (20.4pt): \def\titlenominalsize{20pt} \setfont\titlerm\rmbshape{12}{\magstep3}{OT1} \setfont\titleit\itbshape{10}{\magstep4}{OT1IT} \setfont\titlesl\slbshape{10}{\magstep4}{OT1} \setfont\titlett\ttbshape{12}{\magstep3}{OT1TT} \setfont\titlettsl\ttslshape{10}{\magstep4}{OT1TT} \setfont\titlesf\sfbshape{17}{\magstep1}{OT1} \let\titlebf=\titlerm \setfont\titlesc\scbshape{10}{\magstep4}{OT1} \font\titlei=cmmi12 scaled \magstep3 \font\titlesy=cmsy10 scaled \magstep4 \def\titleecsize{2074} % Chapter fonts (14.4pt). \def\chapnominalsize{14pt} \setfont\chaprm\rmbshape{12}{\magstep1}{OT1} \setfont\chapit\itbshape{10}{\magstep2}{OT1IT} \setfont\chapsl\slbshape{10}{\magstep2}{OT1} \setfont\chaptt\ttbshape{12}{\magstep1}{OT1TT} \setfont\chapttsl\ttslshape{10}{\magstep2}{OT1TT} \setfont\chapsf\sfbshape{12}{\magstep1}{OT1} \let\chapbf\chaprm \setfont\chapsc\scbshape{10}{\magstep2}{OT1} \font\chapi=cmmi12 scaled \magstep1 \font\chapsy=cmsy10 scaled \magstep2 \def\chapecsize{1440} % Section fonts (12pt). \def\secnominalsize{12pt} \setfont\secrm\rmbshape{12}{1000}{OT1} \setfont\secit\itbshape{10}{\magstep1}{OT1IT} \setfont\secsl\slbshape{10}{\magstep1}{OT1} \setfont\sectt\ttbshape{12}{1000}{OT1TT} \setfont\secttsl\ttslshape{10}{\magstep1}{OT1TT} \setfont\secsf\sfbshape{12}{1000}{OT1} \let\secbf\secrm \setfont\secsc\scbshape{10}{\magstep1}{OT1} \font\seci=cmmi12 \font\secsy=cmsy10 scaled \magstep1 \def\sececsize{1200} % Subsection fonts (10pt). \def\ssecnominalsize{10pt} \setfont\ssecrm\rmbshape{10}{1000}{OT1} \setfont\ssecit\itbshape{10}{1000}{OT1IT} \setfont\ssecsl\slbshape{10}{1000}{OT1} \setfont\ssectt\ttbshape{10}{1000}{OT1TT} \setfont\ssecttsl\ttslshape{10}{1000}{OT1TT} \setfont\ssecsf\sfbshape{10}{1000}{OT1} \let\ssecbf\ssecrm \setfont\ssecsc\scbshape{10}{1000}{OT1} \font\sseci=cmmi10 \font\ssecsy=cmsy10 \def\ssececsize{1000} % Reduced fonts for @acro in text (9pt). \def\reducednominalsize{9pt} \setfont\reducedrm\rmshape{9}{1000}{OT1} \setfont\reducedtt\ttshape{9}{1000}{OT1TT} \setfont\reducedbf\bfshape{10}{900}{OT1} \setfont\reducedit\itshape{9}{1000}{OT1IT} \setfont\reducedsl\slshape{9}{1000}{OT1} \setfont\reducedsf\sfshape{9}{1000}{OT1} \setfont\reducedsc\scshape{10}{900}{OT1} \setfont\reducedttsl\ttslshape{10}{900}{OT1TT} \font\reducedi=cmmi9 \font\reducedsy=cmsy9 \def\reducedecsize{0900} \divide\parskip by 2 % reduce space between paragraphs \textleading = 12pt % line spacing for 10pt CM \textfonts % reset the current fonts \rm } % end of 10pt text font size definitions, \definetextfontsizex % We provide the user-level command % @fonttextsize 10 % (or 11) to redefine the text font size. pt is assumed. % \def\xiword{11} \def\xword{10} \def\xwordpt{10pt} % \parseargdef\fonttextsize{% \def\textsizearg{#1}% %\wlog{doing @fonttextsize \textsizearg}% % % Set \globaldefs so that documents can use this inside @tex, since % makeinfo 4.8 does not support it, but we need it nonetheless. % \begingroup \globaldefs=1 \ifx\textsizearg\xword \definetextfontsizex \else \ifx\textsizearg\xiword \definetextfontsizexi \else \errhelp=\EMsimple \errmessage{@fonttextsize only supports `10' or `11', not `\textsizearg'} \fi\fi \endgroup } % In order for the font changes to affect most math symbols and letters, % we have to define the \textfont of the standard families. Since % texinfo doesn't allow for producing subscripts and superscripts except % in the main text, we don't bother to reset \scriptfont and % \scriptscriptfont (which would also require loading a lot more fonts). % \def\resetmathfonts{% \textfont0=\tenrm \textfont1=\teni \textfont2=\tensy \textfont\itfam=\tenit \textfont\slfam=\tensl \textfont\bffam=\tenbf \textfont\ttfam=\tentt \textfont\sffam=\tensf } % The font-changing commands redefine the meanings of \tenSTYLE, instead % of just \STYLE. We do this because \STYLE needs to also set the % current \fam for math mode. Our \STYLE (e.g., \rm) commands hardwire % \tenSTYLE to set the current font. % % Each font-changing command also sets the names \lsize (one size lower) % and \lllsize (three sizes lower). These relative commands are used in % the LaTeX logo and acronyms. % % This all needs generalizing, badly. % \def\textfonts{% \let\tenrm=\textrm \let\tenit=\textit \let\tensl=\textsl \let\tenbf=\textbf \let\tentt=\texttt \let\smallcaps=\textsc \let\tensf=\textsf \let\teni=\texti \let\tensy=\textsy \let\tenttsl=\textttsl \def\curfontsize{text}% \def\lsize{reduced}\def\lllsize{smaller}% \resetmathfonts \setleading{\textleading}} \def\titlefonts{% \let\tenrm=\titlerm \let\tenit=\titleit \let\tensl=\titlesl \let\tenbf=\titlebf \let\tentt=\titlett \let\smallcaps=\titlesc \let\tensf=\titlesf \let\teni=\titlei \let\tensy=\titlesy \let\tenttsl=\titlettsl \def\curfontsize{title}% \def\lsize{chap}\def\lllsize{subsec}% \resetmathfonts \setleading{27pt}} \def\titlefont#1{{\titlefonts\rmisbold #1}} \def\chapfonts{% \let\tenrm=\chaprm \let\tenit=\chapit \let\tensl=\chapsl \let\tenbf=\chapbf \let\tentt=\chaptt \let\smallcaps=\chapsc \let\tensf=\chapsf \let\teni=\chapi \let\tensy=\chapsy \let\tenttsl=\chapttsl \def\curfontsize{chap}% \def\lsize{sec}\def\lllsize{text}% \resetmathfonts \setleading{19pt}} \def\secfonts{% \let\tenrm=\secrm \let\tenit=\secit \let\tensl=\secsl \let\tenbf=\secbf \let\tentt=\sectt \let\smallcaps=\secsc \let\tensf=\secsf \let\teni=\seci \let\tensy=\secsy \let\tenttsl=\secttsl \def\curfontsize{sec}% \def\lsize{subsec}\def\lllsize{reduced}% \resetmathfonts \setleading{16pt}} \def\subsecfonts{% \let\tenrm=\ssecrm \let\tenit=\ssecit \let\tensl=\ssecsl \let\tenbf=\ssecbf \let\tentt=\ssectt \let\smallcaps=\ssecsc \let\tensf=\ssecsf \let\teni=\sseci \let\tensy=\ssecsy \let\tenttsl=\ssecttsl \def\curfontsize{ssec}% \def\lsize{text}\def\lllsize{small}% \resetmathfonts \setleading{15pt}} \let\subsubsecfonts = \subsecfonts \def\reducedfonts{% \let\tenrm=\reducedrm \let\tenit=\reducedit \let\tensl=\reducedsl \let\tenbf=\reducedbf \let\tentt=\reducedtt \let\reducedcaps=\reducedsc \let\tensf=\reducedsf \let\teni=\reducedi \let\tensy=\reducedsy \let\tenttsl=\reducedttsl \def\curfontsize{reduced}% \def\lsize{small}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallfonts{% \let\tenrm=\smallrm \let\tenit=\smallit \let\tensl=\smallsl \let\tenbf=\smallbf \let\tentt=\smalltt \let\smallcaps=\smallsc \let\tensf=\smallsf \let\teni=\smalli \let\tensy=\smallsy \let\tenttsl=\smallttsl \def\curfontsize{small}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{10.5pt}} \def\smallerfonts{% \let\tenrm=\smallerrm \let\tenit=\smallerit \let\tensl=\smallersl \let\tenbf=\smallerbf \let\tentt=\smallertt \let\smallcaps=\smallersc \let\tensf=\smallersf \let\teni=\smalleri \let\tensy=\smallersy \let\tenttsl=\smallerttsl \def\curfontsize{smaller}% \def\lsize{smaller}\def\lllsize{smaller}% \resetmathfonts \setleading{9.5pt}} % Fonts for short table of contents. \setfont\shortcontrm\rmshape{12}{1000}{OT1} \setfont\shortcontbf\bfshape{10}{\magstep1}{OT1} % no cmb12 \setfont\shortcontsl\slshape{12}{1000}{OT1} \setfont\shortconttt\ttshape{12}{1000}{OT1TT} % Define these just so they can be easily changed for other fonts. \def\angleleft{$\langle$} \def\angleright{$\rangle$} % Set the fonts to use with the @small... environments. \let\smallexamplefonts = \smallfonts % About \smallexamplefonts. If we use \smallfonts (9pt), @smallexample % can fit this many characters: % 8.5x11=86 smallbook=72 a4=90 a5=69 % If we use \scriptfonts (8pt), then we can fit this many characters: % 8.5x11=90+ smallbook=80 a4=90+ a5=77 % For me, subjectively, the few extra characters that fit aren't worth % the additional smallness of 8pt. So I'm making the default 9pt. % % By the way, for comparison, here's what fits with @example (10pt): % 8.5x11=71 smallbook=60 a4=75 a5=58 % --karl, 24jan03. % Set up the default fonts, so we can use them for creating boxes. % \definetextfontsizexi \message{markup,} % Check if we are currently using a typewriter font. Since all the % Computer Modern typewriter fonts have zero interword stretch (and % shrink), and it is reasonable to expect all typewriter fonts to have % this property, we can check that font parameter. % \def\ifmonospace{\ifdim\fontdimen3\font=0pt } % Markup style infrastructure. \defmarkupstylesetup\INITMACRO will % define and register \INITMACRO to be called on markup style changes. % \INITMACRO can check \currentmarkupstyle for the innermost % style and the set of \ifmarkupSTYLE switches for all styles % currently in effect. \newif\ifmarkupvar \newif\ifmarkupsamp \newif\ifmarkupkey %\newif\ifmarkupfile % @file == @samp. %\newif\ifmarkupoption % @option == @samp. \newif\ifmarkupcode \newif\ifmarkupkbd %\newif\ifmarkupenv % @env == @code. %\newif\ifmarkupcommand % @command == @code. \newif\ifmarkuptex % @tex (and part of @math, for now). \newif\ifmarkupexample \newif\ifmarkupverb \newif\ifmarkupverbatim \let\currentmarkupstyle\empty \def\setupmarkupstyle#1{% \csname markup#1true\endcsname \def\currentmarkupstyle{#1}% \markupstylesetup } \let\markupstylesetup\empty \def\defmarkupstylesetup#1{% \expandafter\def\expandafter\markupstylesetup \expandafter{\markupstylesetup #1}% \def#1% } % Markup style setup for left and right quotes. \defmarkupstylesetup\markupsetuplq{% \expandafter\let\expandafter \temp \csname markupsetuplq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuplqdefault \else \temp \fi } \defmarkupstylesetup\markupsetuprq{% \expandafter\let\expandafter \temp \csname markupsetuprq\currentmarkupstyle\endcsname \ifx\temp\relax \markupsetuprqdefault \else \temp \fi } { \catcode`\'=\active \catcode`\`=\active \gdef\markupsetuplqdefault{\let`\lq} \gdef\markupsetuprqdefault{\let'\rq} \gdef\markupsetcodequoteleft{\let`\codequoteleft} \gdef\markupsetcodequoteright{\let'\codequoteright} } \let\markupsetuplqcode \markupsetcodequoteleft \let\markupsetuprqcode \markupsetcodequoteright % \let\markupsetuplqexample \markupsetcodequoteleft \let\markupsetuprqexample \markupsetcodequoteright % \let\markupsetuplqkbd \markupsetcodequoteleft \let\markupsetuprqkbd \markupsetcodequoteright % \let\markupsetuplqsamp \markupsetcodequoteleft \let\markupsetuprqsamp \markupsetcodequoteright % \let\markupsetuplqverb \markupsetcodequoteleft \let\markupsetuprqverb \markupsetcodequoteright % \let\markupsetuplqverbatim \markupsetcodequoteleft \let\markupsetuprqverbatim \markupsetcodequoteright % Allow an option to not use regular directed right quote/apostrophe % (char 0x27), but instead the undirected quote from cmtt (char 0x0d). % The undirected quote is ugly, so don't make it the default, but it % works for pasting with more pdf viewers (at least evince), the % lilypond developers report. xpdf does work with the regular 0x27. % \def\codequoteright{% \expandafter\ifx\csname SETtxicodequoteundirected\endcsname\relax \expandafter\ifx\csname SETcodequoteundirected\endcsname\relax '% \else \char'15 \fi \else \char'15 \fi } % % and a similar option for the left quote char vs. a grave accent. % Modern fonts display ASCII 0x60 as a grave accent, so some people like % the code environments to do likewise. % \def\codequoteleft{% \expandafter\ifx\csname SETtxicodequotebacktick\endcsname\relax \expandafter\ifx\csname SETcodequotebacktick\endcsname\relax % [Knuth] pp. 380,381,391 % \relax disables Spanish ligatures ?` and !` of \tt font. \relax`% \else \char'22 \fi \else \char'22 \fi } % Commands to set the quote options. % \parseargdef\codequoteundirected{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequoteundirected\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequoteundirected\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequoteundirected value `\temp', must be on|off}% \fi\fi } % \parseargdef\codequotebacktick{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxicodequotebacktick\endcsname = t% \else\ifx\temp\offword \expandafter\let\csname SETtxicodequotebacktick\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @codequotebacktick value `\temp', must be on|off}% \fi\fi } % [Knuth] pp. 380,381,391, disable Spanish ligatures ?` and !` of \tt font. \def\noligaturesquoteleft{\relax\lq} % Count depth in font-changes, for error checks \newcount\fontdepth \fontdepth=0 % Font commands. % #1 is the font command (\sl or \it), #2 is the text to slant. % If we are in a monospaced environment, however, 1) always use \ttsl, % and 2) do not add an italic correction. \def\dosmartslant#1#2{% \ifusingtt {{\ttsl #2}\let\next=\relax}% {\def\next{{#1#2}\futurelet\next\smartitaliccorrection}}% \next } \def\smartslanted{\dosmartslant\sl} \def\smartitalic{\dosmartslant\it} % Output an italic correction unless \next (presumed to be the following % character) is such as not to need one. \def\smartitaliccorrection{% \ifx\next,% \else\ifx\next-% \else\ifx\next.% \else\ptexslash \fi\fi\fi \aftersmartic } % Unconditional use \ttsl, and no ic. @var is set to this for defuns. \def\ttslanted#1{{\ttsl #1}} % @cite is like \smartslanted except unconditionally use \sl. We never want % ttsl for book titles, do we? \def\cite#1{{\sl #1}\futurelet\next\smartitaliccorrection} \def\aftersmartic{} \def\var#1{% \let\saveaftersmartic = \aftersmartic \def\aftersmartic{\null\let\aftersmartic=\saveaftersmartic}% \smartslanted{#1}% } \let\i=\smartitalic \let\slanted=\smartslanted \let\dfn=\smartslanted \let\emph=\smartitalic % Explicit font changes: @r, @sc, undocumented @ii. \def\r#1{{\rm #1}} % roman font \def\sc#1{{\smallcaps#1}} % smallcaps font \def\ii#1{{\it #1}} % italic font % @b, explicit bold. Also @strong. \def\b#1{{\bf #1}} \let\strong=\b % @sansserif, explicit sans. \def\sansserif#1{{\sf #1}} % We can't just use \exhyphenpenalty, because that only has effect at % the end of a paragraph. Restore normal hyphenation at the end of the % group within which \nohyphenation is presumably called. % \def\nohyphenation{\hyphenchar\font = -1 \aftergroup\restorehyphenation} \def\restorehyphenation{\hyphenchar\font = `- } % Set sfcode to normal for the chars that usually have another value. % Can't use plain's \frenchspacing because it uses the `\x notation, and % sometimes \x has an active definition that messes things up. % \catcode`@=11 \def\plainfrenchspacing{% \sfcode\dotChar =\@m \sfcode\questChar=\@m \sfcode\exclamChar=\@m \sfcode\colonChar=\@m \sfcode\semiChar =\@m \sfcode\commaChar =\@m \def\endofsentencespacefactor{1000}% for @. and friends } \def\plainnonfrenchspacing{% \sfcode`\.3000\sfcode`\?3000\sfcode`\!3000 \sfcode`\:2000\sfcode`\;1500\sfcode`\,1250 \def\endofsentencespacefactor{3000}% for @. and friends } \catcode`@=\other \def\endofsentencespacefactor{3000}% default % @t, explicit typewriter. \def\t#1{% {\tt \rawbackslash \plainfrenchspacing #1}% \null } % @samp. \def\samp#1{{\setupmarkupstyle{samp}\lq\tclose{#1}\rq\null}} % @indicateurl is \samp, that is, with quotes. \let\indicateurl=\samp % @code (and similar) prints in typewriter, but with spaces the same % size as normal in the surrounding text, without hyphenation, etc. % This is a subroutine for that. \def\tclose#1{% {% % Change normal interword space to be same as for the current font. \spaceskip = \fontdimen2\font % % Switch to typewriter. \tt % % But `\ ' produces the large typewriter interword space. \def\ {{\spaceskip = 0pt{} }}% % % Turn off hyphenation. \nohyphenation % \rawbackslash \plainfrenchspacing #1% }% \null % reset spacefactor to 1000 } % We *must* turn on hyphenation at `-' and `_' in @code. % Otherwise, it is too hard to avoid overfull hboxes % in the Emacs manual, the Library manual, etc. % % Unfortunately, TeX uses one parameter (\hyphenchar) to control % both hyphenation at - and hyphenation within words. % We must therefore turn them both off (\tclose does that) % and arrange explicitly to hyphenate at a dash. % -- rms. { \catcode`\-=\active \catcode`\_=\active \catcode`\'=\active \catcode`\`=\active \global\let'=\rq \global\let`=\lq % default definitions % \global\def\code{\begingroup \setupmarkupstyle{code}% % The following should really be moved into \setupmarkupstyle handlers. \catcode\dashChar=\active \catcode\underChar=\active \ifallowcodebreaks \let-\codedash \let_\codeunder \else \let-\normaldash \let_\realunder \fi \codex } } \def\codex #1{\tclose{#1}\endgroup} \def\normaldash{-} \def\codedash{-\discretionary{}{}{}} \def\codeunder{% % this is all so @math{@code{var_name}+1} can work. In math mode, _ % is "active" (mathcode"8000) and \normalunderscore (or \char95, etc.) % will therefore expand the active definition of _, which is us % (inside @code that is), therefore an endless loop. \ifusingtt{\ifmmode \mathchar"075F % class 0=ordinary, family 7=ttfam, pos 0x5F=_. \else\normalunderscore \fi \discretionary{}{}{}}% {\_}% } % An additional complication: the above will allow breaks after, e.g., % each of the four underscores in __typeof__. This is bad. % @allowcodebreaks provides a document-level way to turn breaking at - % and _ on and off. % \newif\ifallowcodebreaks \allowcodebreakstrue \def\keywordtrue{true} \def\keywordfalse{false} \parseargdef\allowcodebreaks{% \def\txiarg{#1}% \ifx\txiarg\keywordtrue \allowcodebreakstrue \else\ifx\txiarg\keywordfalse \allowcodebreaksfalse \else \errhelp = \EMsimple \errmessage{Unknown @allowcodebreaks option `\txiarg', must be true|false}% \fi\fi } % For @command, @env, @file, @option quotes seem unnecessary, % so use \code rather than \samp. \let\command=\code \let\env=\code \let\file=\code \let\option=\code % @uref (abbreviation for `urlref') takes an optional (comma-separated) % second argument specifying the text to display and an optional third % arg as text to display instead of (rather than in addition to) the url % itself. First (mandatory) arg is the url. % (This \urefnobreak definition isn't used now, leaving it for a while % for comparison.) \def\urefnobreak#1{\dourefnobreak #1,,,\finish} \def\dourefnobreak#1,#2,#3,#4\finish{\begingroup \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\code{#1})% DVI: 2nd arg given, show both it and url \fi \else \code{#1}% only url given, so show it \fi \fi \endlink \endgroup} % This \urefbreak definition is the active one. \def\urefbreak{\begingroup \urefcatcodes \dourefbreak} \let\uref=\urefbreak \def\dourefbreak#1{\urefbreakfinish #1,,,\finish} \def\urefbreakfinish#1,#2,#3,#4\finish{% doesn't work in @example \unsepspaces \pdfurl{#1}% \setbox0 = \hbox{\ignorespaces #3}% \ifdim\wd0 > 0pt \unhbox0 % third arg given, show only that \else \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0 > 0pt \ifpdf \unhbox0 % PDF: 2nd arg given, show only it \else \unhbox0\ (\urefcode{#1})% DVI: 2nd arg given, show both it and url \fi \else \urefcode{#1}% only url given, so show it \fi \fi \endlink \endgroup} % Allow line breaks around only a few characters (only). \def\urefcatcodes{% \catcode\ampChar=\active \catcode\dotChar=\active \catcode\hashChar=\active \catcode\questChar=\active \catcode\slashChar=\active } { \urefcatcodes % \global\def\urefcode{\begingroup \setupmarkupstyle{code}% \urefcatcodes \let&\urefcodeamp \let.\urefcodedot \let#\urefcodehash \let?\urefcodequest \let/\urefcodeslash \codex } % % By default, they are just regular characters. \global\def&{\normalamp} \global\def.{\normaldot} \global\def#{\normalhash} \global\def?{\normalquest} \global\def/{\normalslash} } % we put a little stretch before and after the breakable chars, to help % line breaking of long url's. The unequal skips make look better in % cmtt at least, especially for dots. \def\urefprestretch{\urefprebreak \hskip0pt plus.13em } \def\urefpoststretch{\urefpostbreak \hskip0pt plus.1em } % \def\urefcodeamp{\urefprestretch \&\urefpoststretch} \def\urefcodedot{\urefprestretch .\urefpoststretch} \def\urefcodehash{\urefprestretch \#\urefpoststretch} \def\urefcodequest{\urefprestretch ?\urefpoststretch} \def\urefcodeslash{\futurelet\next\urefcodeslashfinish} { \catcode`\/=\active \global\def\urefcodeslashfinish{% \urefprestretch \slashChar % Allow line break only after the final / in a sequence of % slashes, to avoid line break between the slashes in http://. \ifx\next/\else \urefpoststretch \fi } } % One more complication: by default we'll break after the special % characters, but some people like to break before the special chars, so % allow that. Also allow no breaking at all, for manual control. % \parseargdef\urefbreakstyle{% \def\txiarg{#1}% \ifx\txiarg\wordnone \def\urefprebreak{\nobreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordbefore \def\urefprebreak{\allowbreak}\def\urefpostbreak{\nobreak} \else\ifx\txiarg\wordafter \def\urefprebreak{\nobreak}\def\urefpostbreak{\allowbreak} \else \errhelp = \EMsimple \errmessage{Unknown @urefbreakstyle setting `\txiarg'}% \fi\fi\fi } \def\wordafter{after} \def\wordbefore{before} \def\wordnone{none} \urefbreakstyle after % @url synonym for @uref, since that's how everyone uses it. % \let\url=\uref % rms does not like angle brackets --karl, 17may97. % So now @email is just like @uref, unless we are pdf. % %\def\email#1{\angleleft{\tt #1}\angleright} \ifpdf \def\email#1{\doemail#1,,\finish} \def\doemail#1,#2,#3\finish{\begingroup \unsepspaces \pdfurl{mailto:#1}% \setbox0 = \hbox{\ignorespaces #2}% \ifdim\wd0>0pt\unhbox0\else\code{#1}\fi \endlink \endgroup} \else \let\email=\uref \fi % @kbdinputstyle -- arg is `distinct' (@kbd uses slanted tty font always), % `example' (@kbd uses ttsl only inside of @example and friends), % or `code' (@kbd uses normal tty font always). \parseargdef\kbdinputstyle{% \def\txiarg{#1}% \ifx\txiarg\worddistinct \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\ttsl}% \else\ifx\txiarg\wordexample \gdef\kbdexamplefont{\ttsl}\gdef\kbdfont{\tt}% \else\ifx\txiarg\wordcode \gdef\kbdexamplefont{\tt}\gdef\kbdfont{\tt}% \else \errhelp = \EMsimple \errmessage{Unknown @kbdinputstyle setting `\txiarg'}% \fi\fi\fi } \def\worddistinct{distinct} \def\wordexample{example} \def\wordcode{code} % Default is `distinct'. \kbdinputstyle distinct % @kbd is like @code, except that if the argument is just one @key command, % then @kbd has no effect. \def\kbd#1{{\def\look{#1}\expandafter\kbdsub\look??\par}} \def\xkey{\key} \def\kbdsub#1#2#3\par{% \def\one{#1}\def\three{#3}\def\threex{??}% \ifx\one\xkey\ifx\threex\three \key{#2}% \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi \else{\tclose{\kbdfont\setupmarkupstyle{kbd}\look}}\fi } % definition of @key that produces a lozenge. Doesn't adjust to text size. %\setfont\keyrm\rmshape{8}{1000}{OT1} %\font\keysy=cmsy9 %\def\key#1{{\keyrm\textfont2=\keysy \leavevmode\hbox{% % \raise0.4pt\hbox{\angleleft}\kern-.08em\vtop{% % \vbox{\hrule\kern-0.4pt % \hbox{\raise0.4pt\hbox{\vphantom{\angleleft}}#1}}% % \kern-0.4pt\hrule}% % \kern-.06em\raise0.4pt\hbox{\angleright}}}} % definition of @key with no lozenge. If the current font is already % monospace, don't change it; that way, we respect @kbdinputstyle. But % if it isn't monospace, then use \tt. % \def\key#1{{\setupmarkupstyle{key}% \nohyphenation \ifmonospace\else\tt\fi #1}\null} % @clicksequence{File @click{} Open ...} \def\clicksequence#1{\begingroup #1\endgroup} % @clickstyle @arrow (by default) \parseargdef\clickstyle{\def\click{#1}} \def\click{\arrow} % Typeset a dimension, e.g., `in' or `pt'. The only reason for the % argument is to make the input look right: @dmn{pt} instead of @dmn{}pt. % \def\dmn#1{\thinspace #1} % @l was never documented to mean ``switch to the Lisp font'', % and it is not used as such in any manual I can find. We need it for % Polish suppressed-l. --karl, 22sep96. %\def\l#1{{\li #1}\null} % @acronym for "FBI", "NATO", and the like. % We print this one point size smaller, since it's intended for % all-uppercase. % \def\acronym#1{\doacronym #1,,\finish} \def\doacronym#1,#2,#3\finish{% {\selectfonts\lsize #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @abbr for "Comput. J." and the like. % No font change, but don't do end-of-sentence spacing. % \def\abbr#1{\doabbr #1,,\finish} \def\doabbr#1,#2,#3\finish{% {\plainfrenchspacing #1}% \def\temp{#2}% \ifx\temp\empty \else \space ({\unsepspaces \ignorespaces \temp \unskip})% \fi \null % reset \spacefactor=1000 } % @asis just yields its argument. Used with @table, for example. % \def\asis#1{#1} % @math outputs its argument in math mode. % % One complication: _ usually means subscripts, but it could also mean % an actual _ character, as in @math{@var{some_variable} + 1}. So make % _ active, and distinguish by seeing if the current family is \slfam, % which is what @var uses. { \catcode`\_ = \active \gdef\mathunderscore{% \catcode`\_=\active \def_{\ifnum\fam=\slfam \_\else\sb\fi}% } } % Another complication: we want \\ (and @\) to output a math (or tt) \. % FYI, plain.tex uses \\ as a temporary control sequence (for no % particular reason), but this is not advertised and we don't care. % % The \mathchar is class=0=ordinary, family=7=ttfam, position=5C=\. \def\mathbackslash{\ifnum\fam=\ttfam \mathchar"075C \else\backslash \fi} % \def\math{% \tex \mathunderscore \let\\ = \mathbackslash \mathactive % make the texinfo accent commands work in math mode \let\"=\ddot \let\'=\acute \let\==\bar \let\^=\hat \let\`=\grave \let\u=\breve \let\v=\check \let\~=\tilde \let\dotaccent=\dot $\finishmath } \def\finishmath#1{#1$\endgroup} % Close the group opened by \tex. % Some active characters (such as <) are spaced differently in math. % We have to reset their definitions in case the @math was an argument % to a command which sets the catcodes (such as @item or @section). % { \catcode`^ = \active \catcode`< = \active \catcode`> = \active \catcode`+ = \active \catcode`' = \active \gdef\mathactive{% \let^ = \ptexhat \let< = \ptexless \let> = \ptexgtr \let+ = \ptexplus \let' = \ptexquoteright } } % ctrl is no longer a Texinfo command, but leave this definition for fun. \def\ctrl #1{{\tt \rawbackslash \hat}#1} % @inlinefmt{FMTNAME,PROCESSED-TEXT} and @inlineraw{FMTNAME,RAW-TEXT}. % Ignore unless FMTNAME == tex; then it is like @iftex and @tex, % except specified as a normal braced arg, so no newlines to worry about. % \def\outfmtnametex{tex} % \long\def\inlinefmt#1{\doinlinefmt #1,\finish} \long\def\doinlinefmt#1,#2,\finish{% \def\inlinefmtname{#1}% \ifx\inlinefmtname\outfmtnametex \ignorespaces #2\fi } % For raw, must switch into @tex before parsing the argument, to avoid % setting catcodes prematurely. Doing it this way means that, for % example, @inlineraw{html, foo{bar} gets a parse error instead of being % ignored. But this isn't important because if people want a literal % *right* brace they would have to use a command anyway, so they may as % well use a command to get a left brace too. We could re-use the % delimiter character idea from \verb, but it seems like overkill. % \long\def\inlineraw{\tex \doinlineraw} \long\def\doinlineraw#1{\doinlinerawtwo #1,\finish} \def\doinlinerawtwo#1,#2,\finish{% \def\inlinerawname{#1}% \ifx\inlinerawname\outfmtnametex \ignorespaces #2\fi \endgroup % close group opened by \tex. } \message{glyphs,} % and logos. % @@ prints an @, as does @atchar{}. \def\@{\char64 } \let\atchar=\@ % @{ @} @lbracechar{} @rbracechar{} all generate brace characters. % Unless we're in typewriter, use \ecfont because the CM text fonts do % not have braces, and we don't want to switch into math. \def\mylbrace{{\ifmonospace\else\ecfont\fi \char123}} \def\myrbrace{{\ifmonospace\else\ecfont\fi \char125}} \let\{=\mylbrace \let\lbracechar=\{ \let\}=\myrbrace \let\rbracechar=\} \begingroup % Definitions to produce \{ and \} commands for indices, % and @{ and @} for the aux/toc files. \catcode`\{ = \other \catcode`\} = \other \catcode`\[ = 1 \catcode`\] = 2 \catcode`\! = 0 \catcode`\\ = \other !gdef!lbracecmd[\{]% !gdef!rbracecmd[\}]% !gdef!lbraceatcmd[@{]% !gdef!rbraceatcmd[@}]% !endgroup % @comma{} to avoid , parsing problems. \let\comma = , % Accents: @, @dotaccent @ringaccent @ubaraccent @udotaccent % Others are defined by plain TeX: @` @' @" @^ @~ @= @u @v @H. \let\, = \ptexc \let\dotaccent = \ptexdot \def\ringaccent#1{{\accent23 #1}} \let\tieaccent = \ptext \let\ubaraccent = \ptexb \let\udotaccent = \d % Other special characters: @questiondown @exclamdown @ordf @ordm % Plain TeX defines: @AA @AE @O @OE @L (plus lowercase versions) @ss. \def\questiondown{?`} \def\exclamdown{!`} \def\ordf{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{a}}} \def\ordm{\leavevmode\raise1ex\hbox{\selectfonts\lllsize \underbar{o}}} % Dotless i and dotless j, used for accents. \def\imacro{i} \def\jmacro{j} \def\dotless#1{% \def\temp{#1}% \ifx\temp\imacro \ifmmode\imath \else\ptexi \fi \else\ifx\temp\jmacro \ifmmode\jmath \else\j \fi \else \errmessage{@dotless can be used only with i or j}% \fi\fi } % The \TeX{} logo, as in plain, but resetting the spacing so that a % period following counts as ending a sentence. (Idea found in latex.) % \edef\TeX{\TeX \spacefactor=1000 } % @LaTeX{} logo. Not quite the same results as the definition in % latex.ltx, since we use a different font for the raised A; it's most % convenient for us to use an explicitly smaller font, rather than using % the \scriptstyle font (since we don't reset \scriptstyle and % \scriptscriptstyle). % \def\LaTeX{% L\kern-.36em {\setbox0=\hbox{T}% \vbox to \ht0{\hbox{% \ifx\textnominalsize\xwordpt % for 10pt running text, \lllsize (8pt) is too small for the A in LaTeX. % Revert to plain's \scriptsize, which is 7pt. \count255=\the\fam $\fam\count255 \scriptstyle A$% \else % For 11pt, we can use our lllsize. \selectfonts\lllsize A% \fi }% \vss }}% \kern-.15em \TeX } % Some math mode symbols. \def\bullet{$\ptexbullet$} \def\geq{\ifmmode \ge\else $\ge$\fi} \def\leq{\ifmmode \le\else $\le$\fi} \def\minus{\ifmmode -\else $-$\fi} % @dots{} outputs an ellipsis using the current font. % We do .5em per period so that it has the same spacing in the cm % typewriter fonts as three actual period characters; on the other hand, % in other typewriter fonts three periods are wider than 1.5em. So do % whichever is larger. % \def\dots{% \leavevmode \setbox0=\hbox{...}% get width of three periods \ifdim\wd0 > 1.5em \dimen0 = \wd0 \else \dimen0 = 1.5em \fi \hbox to \dimen0{% \hskip 0pt plus.25fil .\hskip 0pt plus1fil .\hskip 0pt plus1fil .\hskip 0pt plus.5fil }% } % @enddots{} is an end-of-sentence ellipsis. % \def\enddots{% \dots \spacefactor=\endofsentencespacefactor } % @point{}, @result{}, @expansion{}, @print{}, @equiv{}. % % Since these characters are used in examples, they should be an even number of % \tt widths. Each \tt character is 1en, so two makes it 1em. % \def\point{$\star$} \def\arrow{\leavevmode\raise.05ex\hbox to 1em{\hfil$\rightarrow$\hfil}} \def\result{\leavevmode\raise.05ex\hbox to 1em{\hfil$\Rightarrow$\hfil}} \def\expansion{\leavevmode\hbox to 1em{\hfil$\mapsto$\hfil}} \def\print{\leavevmode\lower.1ex\hbox to 1em{\hfil$\dashv$\hfil}} \def\equiv{\leavevmode\hbox to 1em{\hfil$\ptexequiv$\hfil}} % The @error{} command. % Adapted from the TeXbook's \boxit. % \newbox\errorbox % {\tentt \global\dimen0 = 3em}% Width of the box. \dimen2 = .55pt % Thickness of rules % The text. (`r' is open on the right, `e' somewhat less so on the left.) \setbox0 = \hbox{\kern-.75pt \reducedsf \putworderror\kern-1.5pt} % \setbox\errorbox=\hbox to \dimen0{\hfil \hsize = \dimen0 \advance\hsize by -5.8pt % Space to left+right. \advance\hsize by -2\dimen2 % Rules. \vbox{% \hrule height\dimen2 \hbox{\vrule width\dimen2 \kern3pt % Space to left of text. \vtop{\kern2.4pt \box0 \kern2.4pt}% Space above/below. \kern3pt\vrule width\dimen2}% Space to right. \hrule height\dimen2} \hfil} % \def\error{\leavevmode\lower.7ex\copy\errorbox} % @pounds{} is a sterling sign, which Knuth put in the CM italic font. % \def\pounds{{\it\$}} % @euro{} comes from a separate font, depending on the current style. % We use the free feym* fonts from the eurosym package by Henrik % Theiling, which support regular, slanted, bold and bold slanted (and % "outlined" (blackboard board, sort of) versions, which we don't need). % It is available from http://www.ctan.org/tex-archive/fonts/eurosym. % % Although only regular is the truly official Euro symbol, we ignore % that. The Euro is designed to be slightly taller than the regular % font height. % % feymr - regular % feymo - slanted % feybr - bold % feybo - bold slanted % % There is no good (free) typewriter version, to my knowledge. % A feymr10 euro is ~7.3pt wide, while a normal cmtt10 char is ~5.25pt wide. % Hmm. % % Also doesn't work in math. Do we need to do math with euro symbols? % Hope not. % % \def\euro{{\eurofont e}} \def\eurofont{% % We set the font at each command, rather than predefining it in % \textfonts and the other font-switching commands, so that % installations which never need the symbol don't have to have the % font installed. % % There is only one designed size (nominal 10pt), so we always scale % that to the current nominal size. % % By the way, simply using "at 1em" works for cmr10 and the like, but % does not work for cmbx10 and other extended/shrunken fonts. % \def\eurosize{\csname\curfontsize nominalsize\endcsname}% % \ifx\curfontstyle\bfstylename % bold: \font\thiseurofont = \ifusingit{feybo10}{feybr10} at \eurosize \else % regular: \font\thiseurofont = \ifusingit{feymo10}{feymr10} at \eurosize \fi \thiseurofont } % Glyphs from the EC fonts. We don't use \let for the aliases, because % sometimes we redefine the original macro, and the alias should reflect % the redefinition. % % Use LaTeX names for the Icelandic letters. \def\DH{{\ecfont \char"D0}} % Eth \def\dh{{\ecfont \char"F0}} % eth \def\TH{{\ecfont \char"DE}} % Thorn \def\th{{\ecfont \char"FE}} % thorn % \def\guillemetleft{{\ecfont \char"13}} \def\guillemotleft{\guillemetleft} \def\guillemetright{{\ecfont \char"14}} \def\guillemotright{\guillemetright} \def\guilsinglleft{{\ecfont \char"0E}} \def\guilsinglright{{\ecfont \char"0F}} \def\quotedblbase{{\ecfont \char"12}} \def\quotesinglbase{{\ecfont \char"0D}} % % This positioning is not perfect (see the ogonek LaTeX package), but % we have the precomposed glyphs for the most common cases. We put the % tests to use those glyphs in the single \ogonek macro so we have fewer % dummy definitions to worry about for index entries, etc. % % ogonek is also used with other letters in Lithuanian (IOU), but using % the precomposed glyphs for those is not so easy since they aren't in % the same EC font. \def\ogonek#1{{% \def\temp{#1}% \ifx\temp\macrocharA\Aogonek \else\ifx\temp\macrochara\aogonek \else\ifx\temp\macrocharE\Eogonek \else\ifx\temp\macrochare\eogonek \else \ecfont \setbox0=\hbox{#1}% \ifdim\ht0=1ex\accent"0C #1% \else\ooalign{\unhbox0\crcr\hidewidth\char"0C \hidewidth}% \fi \fi\fi\fi\fi }% } \def\Aogonek{{\ecfont \char"81}}\def\macrocharA{A} \def\aogonek{{\ecfont \char"A1}}\def\macrochara{a} \def\Eogonek{{\ecfont \char"86}}\def\macrocharE{E} \def\eogonek{{\ecfont \char"A6}}\def\macrochare{e} % % Use the ec* fonts (cm-super in outline format) for non-CM glyphs. \def\ecfont{% % We can't distinguish serif/sans and italic/slanted, but this % is used for crude hacks anyway (like adding French and German % quotes to documents typeset with CM, where we lose kerning), so % hopefully nobody will notice/care. \edef\ecsize{\csname\curfontsize ecsize\endcsname}% \edef\nominalsize{\csname\curfontsize nominalsize\endcsname}% \ifmonospace % typewriter: \font\thisecfont = ectt\ecsize \space at \nominalsize \else \ifx\curfontstyle\bfstylename % bold: \font\thisecfont = ecb\ifusingit{i}{x}\ecsize \space at \nominalsize \else % regular: \font\thisecfont = ec\ifusingit{ti}{rm}\ecsize \space at \nominalsize \fi \fi \thisecfont } % @registeredsymbol - R in a circle. The font for the R should really % be smaller yet, but lllsize is the best we can do for now. % Adapted from the plain.tex definition of \copyright. % \def\registeredsymbol{% $^{{\ooalign{\hfil\raise.07ex\hbox{\selectfonts\lllsize R}% \hfil\crcr\Orb}}% }$% } % @textdegree - the normal degrees sign. % \def\textdegree{$^\circ$} % Laurent Siebenmann reports \Orb undefined with: % Textures 1.7.7 (preloaded format=plain 93.10.14) (68K) 16 APR 2004 02:38 % so we'll define it if necessary. % \ifx\Orb\thisisundefined \def\Orb{\mathhexbox20D} \fi % Quotes. \chardef\quotedblleft="5C \chardef\quotedblright=`\" \chardef\quoteleft=`\` \chardef\quoteright=`\' \message{page headings,} \newskip\titlepagetopglue \titlepagetopglue = 1.5in \newskip\titlepagebottomglue \titlepagebottomglue = 2pc % First the title page. Must do @settitle before @titlepage. \newif\ifseenauthor \newif\iffinishedtitlepage % Do an implicit @contents or @shortcontents after @end titlepage if the % user says @setcontentsaftertitlepage or @setshortcontentsaftertitlepage. % \newif\ifsetcontentsaftertitlepage \let\setcontentsaftertitlepage = \setcontentsaftertitlepagetrue \newif\ifsetshortcontentsaftertitlepage \let\setshortcontentsaftertitlepage = \setshortcontentsaftertitlepagetrue \parseargdef\shorttitlepage{% \begingroup \hbox{}\vskip 1.5in \chaprm \centerline{#1}% \endgroup\page\hbox{}\page} \envdef\titlepage{% % Open one extra group, as we want to close it in the middle of \Etitlepage. \begingroup \parindent=0pt \textfonts % Leave some space at the very top of the page. \vglue\titlepagetopglue % No rule at page bottom unless we print one at the top with @title. \finishedtitlepagetrue % % Most title ``pages'' are actually two pages long, with space % at the top of the second. We don't want the ragged left on the second. \let\oldpage = \page \def\page{% \iffinishedtitlepage\else \finishtitlepage \fi \let\page = \oldpage \page \null }% } \def\Etitlepage{% \iffinishedtitlepage\else \finishtitlepage \fi % It is important to do the page break before ending the group, % because the headline and footline are only empty inside the group. % If we use the new definition of \page, we always get a blank page % after the title page, which we certainly don't want. \oldpage \endgroup % % Need this before the \...aftertitlepage checks so that if they are % in effect the toc pages will come out with page numbers. \HEADINGSon % % If they want short, they certainly want long too. \ifsetshortcontentsaftertitlepage \shortcontents \contents \global\let\shortcontents = \relax \global\let\contents = \relax \fi % \ifsetcontentsaftertitlepage \contents \global\let\contents = \relax \global\let\shortcontents = \relax \fi } \def\finishtitlepage{% \vskip4pt \hrule height 2pt width \hsize \vskip\titlepagebottomglue \finishedtitlepagetrue } % Settings used for typesetting titles: no hyphenation, no indentation, % don't worry much about spacing, ragged right. This should be used % inside a \vbox, and fonts need to be set appropriately first. Because % it is always used for titles, nothing else, we call \rmisbold. \par % should be specified before the end of the \vbox, since a vbox is a group. % \def\raggedtitlesettings{% \rmisbold \hyphenpenalty=10000 \parindent=0pt \tolerance=5000 \ptexraggedright } % Macros to be used within @titlepage: \let\subtitlerm=\tenrm \def\subtitlefont{\subtitlerm \normalbaselineskip = 13pt \normalbaselines} \parseargdef\title{% \checkenv\titlepage \vbox{\titlefonts \raggedtitlesettings #1\par}% % print a rule at the page bottom also. \finishedtitlepagefalse \vskip4pt \hrule height 4pt width \hsize \vskip4pt } \parseargdef\subtitle{% \checkenv\titlepage {\subtitlefont \rightline{#1}}% } % @author should come last, but may come many times. % It can also be used inside @quotation. % \parseargdef\author{% \def\temp{\quotation}% \ifx\thisenv\temp \def\quotationauthor{#1}% printed in \Equotation. \else \checkenv\titlepage \ifseenauthor\else \vskip 0pt plus 1filll \seenauthortrue \fi {\secfonts\rmisbold \leftline{#1}}% \fi } % Set up page headings and footings. \let\thispage=\folio \newtoks\evenheadline % headline on even pages \newtoks\oddheadline % headline on odd pages \newtoks\evenfootline % footline on even pages \newtoks\oddfootline % footline on odd pages % Now make TeX use those variables \headline={{\textfonts\rm \ifodd\pageno \the\oddheadline \else \the\evenheadline \fi}} \footline={{\textfonts\rm \ifodd\pageno \the\oddfootline \else \the\evenfootline \fi}\HEADINGShook} \let\HEADINGShook=\relax % Commands to set those variables. % For example, this is what @headings on does % @evenheading @thistitle|@thispage|@thischapter % @oddheading @thischapter|@thispage|@thistitle % @evenfooting @thisfile|| % @oddfooting ||@thisfile \def\evenheading{\parsearg\evenheadingxxx} \def\evenheadingxxx #1{\evenheadingyyy #1\|\|\|\|\finish} \def\evenheadingyyy #1\|#2\|#3\|#4\finish{% \global\evenheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddheading{\parsearg\oddheadingxxx} \def\oddheadingxxx #1{\oddheadingyyy #1\|\|\|\|\finish} \def\oddheadingyyy #1\|#2\|#3\|#4\finish{% \global\oddheadline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \parseargdef\everyheading{\oddheadingxxx{#1}\evenheadingxxx{#1}}% \def\evenfooting{\parsearg\evenfootingxxx} \def\evenfootingxxx #1{\evenfootingyyy #1\|\|\|\|\finish} \def\evenfootingyyy #1\|#2\|#3\|#4\finish{% \global\evenfootline={\rlap{\centerline{#2}}\line{#1\hfil#3}}} \def\oddfooting{\parsearg\oddfootingxxx} \def\oddfootingxxx #1{\oddfootingyyy #1\|\|\|\|\finish} \def\oddfootingyyy #1\|#2\|#3\|#4\finish{% \global\oddfootline = {\rlap{\centerline{#2}}\line{#1\hfil#3}}% % % Leave some space for the footline. Hopefully ok to assume % @evenfooting will not be used by itself. \global\advance\pageheight by -12pt \global\advance\vsize by -12pt } \parseargdef\everyfooting{\oddfootingxxx{#1}\evenfootingxxx{#1}} % @evenheadingmarks top \thischapter <- chapter at the top of a page % @evenheadingmarks bottom \thischapter <- chapter at the bottom of a page % % The same set of arguments for: % % @oddheadingmarks % @evenfootingmarks % @oddfootingmarks % @everyheadingmarks % @everyfootingmarks \def\evenheadingmarks{\headingmarks{even}{heading}} \def\oddheadingmarks{\headingmarks{odd}{heading}} \def\evenfootingmarks{\headingmarks{even}{footing}} \def\oddfootingmarks{\headingmarks{odd}{footing}} \def\everyheadingmarks#1 {\headingmarks{even}{heading}{#1} \headingmarks{odd}{heading}{#1} } \def\everyfootingmarks#1 {\headingmarks{even}{footing}{#1} \headingmarks{odd}{footing}{#1} } % #1 = even/odd, #2 = heading/footing, #3 = top/bottom. \def\headingmarks#1#2#3 {% \expandafter\let\expandafter\temp \csname get#3headingmarks\endcsname \global\expandafter\let\csname get#1#2marks\endcsname \temp } \everyheadingmarks bottom \everyfootingmarks bottom % @headings double turns headings on for double-sided printing. % @headings single turns headings on for single-sided printing. % @headings off turns them off. % @headings on same as @headings double, retained for compatibility. % @headings after turns on double-sided headings after this page. % @headings doubleafter turns on double-sided headings after this page. % @headings singleafter turns on single-sided headings after this page. % By default, they are off at the start of a document, % and turned `on' after @end titlepage. \def\headings #1 {\csname HEADINGS#1\endcsname} \def\headingsoff{% non-global headings elimination \evenheadline={\hfil}\evenfootline={\hfil}% \oddheadline={\hfil}\oddfootline={\hfil}% } \def\HEADINGSoff{{\globaldefs=1 \headingsoff}} % global setting \HEADINGSoff % it's the default % When we turn headings on, set the page number to 1. % For double-sided printing, put current file name in lower left corner, % chapter name on inside top of right hand pages, document % title on inside top of left hand pages, and page numbers on outside top % edge of all pages. \def\HEADINGSdouble{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \let\contentsalignmacro = \chappager % For single-sided printing, chapter title goes across top left of page, % page number on top right. \def\HEADINGSsingle{% \global\pageno=1 \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } \def\HEADINGSon{\HEADINGSdouble} \def\HEADINGSafter{\let\HEADINGShook=\HEADINGSdoublex} \let\HEADINGSdoubleafter=\HEADINGSafter \def\HEADINGSdoublex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\folio\hfil\thistitle}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chapoddpage } \def\HEADINGSsingleafter{\let\HEADINGShook=\HEADINGSsinglex} \def\HEADINGSsinglex{% \global\evenfootline={\hfil} \global\oddfootline={\hfil} \global\evenheadline={\line{\thischapter\hfil\folio}} \global\oddheadline={\line{\thischapter\hfil\folio}} \global\let\contentsalignmacro = \chappager } % Subroutines used in generating headings % This produces Day Month Year style of output. % Only define if not already defined, in case a txi-??.tex file has set % up a different format (e.g., txi-cs.tex does this). \ifx\today\thisisundefined \def\today{% \number\day\space \ifcase\month \or\putwordMJan\or\putwordMFeb\or\putwordMMar\or\putwordMApr \or\putwordMMay\or\putwordMJun\or\putwordMJul\or\putwordMAug \or\putwordMSep\or\putwordMOct\or\putwordMNov\or\putwordMDec \fi \space\number\year} \fi % @settitle line... specifies the title of the document, for headings. % It generates no output of its own. \def\thistitle{\putwordNoTitle} \def\settitle{\parsearg{\gdef\thistitle}} \message{tables,} % Tables -- @table, @ftable, @vtable, @item(x). % default indentation of table text \newdimen\tableindent \tableindent=.8in % default indentation of @itemize and @enumerate text \newdimen\itemindent \itemindent=.3in % margin between end of table item and start of table text. \newdimen\itemmargin \itemmargin=.1in % used internally for \itemindent minus \itemmargin \newdimen\itemmax % Note @table, @ftable, and @vtable define @item, @itemx, etc., with % these defs. % They also define \itemindex % to index the item name in whatever manner is desired (perhaps none). \newif\ifitemxneedsnegativevskip \def\itemxpar{\par\ifitemxneedsnegativevskip\nobreak\vskip-\parskip\nobreak\fi} \def\internalBitem{\smallbreak \parsearg\itemzzz} \def\internalBitemx{\itemxpar \parsearg\itemzzz} \def\itemzzz #1{\begingroup % \advance\hsize by -\rightskip \advance\hsize by -\tableindent \setbox0=\hbox{\itemindicate{#1}}% \itemindex{#1}% \nobreak % This prevents a break before @itemx. % % If the item text does not fit in the space we have, put it on a line % by itself, and do not allow a page break either before or after that % line. We do not start a paragraph here because then if the next % command is, e.g., @kindex, the whatsit would get put into the % horizontal list on a line by itself, resulting in extra blank space. \ifdim \wd0>\itemmax % % Make this a paragraph so we get the \parskip glue and wrapping, % but leave it ragged-right. \begingroup \advance\leftskip by-\tableindent \advance\hsize by\tableindent \advance\rightskip by0pt plus1fil\relax \leavevmode\unhbox0\par \endgroup % % We're going to be starting a paragraph, but we don't want the % \parskip glue -- logically it's part of the @item we just started. \nobreak \vskip-\parskip % % Stop a page break at the \parskip glue coming up. However, if % what follows is an environment such as @example, there will be no % \parskip glue; then the negative vskip we just inserted would % cause the example and the item to crash together. So we use this % bizarre value of 10001 as a signal to \aboveenvbreak to insert % \parskip glue after all. Section titles are handled this way also. % \penalty 10001 \endgroup \itemxneedsnegativevskipfalse \else % The item text fits into the space. Start a paragraph, so that the % following text (if any) will end up on the same line. \noindent % Do this with kerns and \unhbox so that if there is a footnote in % the item text, it can migrate to the main vertical list and % eventually be printed. \nobreak\kern-\tableindent \dimen0 = \itemmax \advance\dimen0 by \itemmargin \advance\dimen0 by -\wd0 \unhbox0 \nobreak\kern\dimen0 \endgroup \itemxneedsnegativevskiptrue \fi } \def\item{\errmessage{@item while not in a list environment}} \def\itemx{\errmessage{@itemx while not in a list environment}} % @table, @ftable, @vtable. \envdef\table{% \let\itemindex\gobble \tablecheck{table}% } \envdef\ftable{% \def\itemindex ##1{\doind {fn}{\code{##1}}}% \tablecheck{ftable}% } \envdef\vtable{% \def\itemindex ##1{\doind {vr}{\code{##1}}}% \tablecheck{vtable}% } \def\tablecheck#1{% \ifnum \the\catcode`\^^M=\active \endgroup \errmessage{This command won't work in this context; perhaps the problem is that we are \inenvironment\thisenv}% \def\next{\doignore{#1}}% \else \let\next\tablex \fi \next } \def\tablex#1{% \def\itemindicate{#1}% \parsearg\tabley } \def\tabley#1{% {% \makevalueexpandable \edef\temp{\noexpand\tablez #1\space\space\space}% \expandafter }\temp \endtablez } \def\tablez #1 #2 #3 #4\endtablez{% \aboveenvbreak \ifnum 0#1>0 \advance \leftskip by #1\mil \fi \ifnum 0#2>0 \tableindent=#2\mil \fi \ifnum 0#3>0 \advance \rightskip by #3\mil \fi \itemmax=\tableindent \advance \itemmax by -\itemmargin \advance \leftskip by \tableindent \exdentamount=\tableindent \parindent = 0pt \parskip = \smallskipamount \ifdim \parskip=0pt \parskip=2pt \fi \let\item = \internalBitem \let\itemx = \internalBitemx } \def\Etable{\endgraf\afterenvbreak} \let\Eftable\Etable \let\Evtable\Etable \let\Eitemize\Etable \let\Eenumerate\Etable % This is the counter used by @enumerate, which is really @itemize \newcount \itemno \envdef\itemize{\parsearg\doitemize} \def\doitemize#1{% \aboveenvbreak \itemmax=\itemindent \advance\itemmax by -\itemmargin \advance\leftskip by \itemindent \exdentamount=\itemindent \parindent=0pt \parskip=\smallskipamount \ifdim\parskip=0pt \parskip=2pt \fi % % Try typesetting the item mark that if the document erroneously says % something like @itemize @samp (intending @table), there's an error % right away at the @itemize. It's not the best error message in the % world, but it's better than leaving it to the @item. This means if % the user wants an empty mark, they have to say @w{} not just @w. \def\itemcontents{#1}% \setbox0 = \hbox{\itemcontents}% % % @itemize with no arg is equivalent to @itemize @bullet. \ifx\itemcontents\empty\def\itemcontents{\bullet}\fi % \let\item=\itemizeitem } % Definition of @item while inside @itemize and @enumerate. % \def\itemizeitem{% \advance\itemno by 1 % for enumerations {\let\par=\endgraf \smallbreak}% reasonable place to break {% % If the document has an @itemize directly after a section title, a % \nobreak will be last on the list, and \sectionheading will have % done a \vskip-\parskip. In that case, we don't want to zero % parskip, or the item text will crash with the heading. On the % other hand, when there is normal text preceding the item (as there % usually is), we do want to zero parskip, or there would be too much % space. In that case, we won't have a \nobreak before. At least % that's the theory. \ifnum\lastpenalty<10000 \parskip=0in \fi \noindent \hbox to 0pt{\hss \itemcontents \kern\itemmargin}% % \vadjust{\penalty 1200}}% not good to break after first line of item. \flushcr } % \splitoff TOKENS\endmark defines \first to be the first token in % TOKENS, and \rest to be the remainder. % \def\splitoff#1#2\endmark{\def\first{#1}\def\rest{#2}}% % Allow an optional argument of an uppercase letter, lowercase letter, % or number, to specify the first label in the enumerated list. No % argument is the same as `1'. % \envparseargdef\enumerate{\enumeratey #1 \endenumeratey} \def\enumeratey #1 #2\endenumeratey{% % If we were given no argument, pretend we were given `1'. \def\thearg{#1}% \ifx\thearg\empty \def\thearg{1}\fi % % Detect if the argument is a single token. If so, it might be a % letter. Otherwise, the only valid thing it can be is a number. % (We will always have one token, because of the test we just made. % This is a good thing, since \splitoff doesn't work given nothing at % all -- the first parameter is undelimited.) \expandafter\splitoff\thearg\endmark \ifx\rest\empty % Only one token in the argument. It could still be anything. % A ``lowercase letter'' is one whose \lccode is nonzero. % An ``uppercase letter'' is one whose \lccode is both nonzero, and % not equal to itself. % Otherwise, we assume it's a number. % % We need the \relax at the end of the \ifnum lines to stop TeX from % continuing to look for a . % \ifnum\lccode\expandafter`\thearg=0\relax \numericenumerate % a number (we hope) \else % It's a letter. \ifnum\lccode\expandafter`\thearg=\expandafter`\thearg\relax \lowercaseenumerate % lowercase letter \else \uppercaseenumerate % uppercase letter \fi \fi \else % Multiple tokens in the argument. We hope it's a number. \numericenumerate \fi } % An @enumerate whose labels are integers. The starting integer is % given in \thearg. % \def\numericenumerate{% \itemno = \thearg \startenumeration{\the\itemno}% } % The starting (lowercase) letter is in \thearg. \def\lowercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more lowercase letters in @enumerate; get a bigger alphabet}% \fi \char\lccode\itemno }% } % The starting (uppercase) letter is in \thearg. \def\uppercaseenumerate{% \itemno = \expandafter`\thearg \startenumeration{% % Be sure we're not beyond the end of the alphabet. \ifnum\itemno=0 \errmessage{No more uppercase letters in @enumerate; get a bigger alphabet} \fi \char\uccode\itemno }% } % Call \doitemize, adding a period to the first argument and supplying the % common last two arguments. Also subtract one from the initial value in % \itemno, since @item increments \itemno. % \def\startenumeration#1{% \advance\itemno by -1 \doitemize{#1.}\flushcr } % @alphaenumerate and @capsenumerate are abbreviations for giving an arg % to @enumerate. % \def\alphaenumerate{\enumerate{a}} \def\capsenumerate{\enumerate{A}} \def\Ealphaenumerate{\Eenumerate} \def\Ecapsenumerate{\Eenumerate} % @multitable macros % Amy Hendrickson, 8/18/94, 3/6/96 % % @multitable ... @end multitable will make as many columns as desired. % Contents of each column will wrap at width given in preamble. Width % can be specified either with sample text given in a template line, % or in percent of \hsize, the current width of text on page. % Table can continue over pages but will only break between lines. % To make preamble: % % Either define widths of columns in terms of percent of \hsize: % @multitable @columnfractions .25 .3 .45 % @item ... % % Numbers following @columnfractions are the percent of the total % current hsize to be used for each column. You may use as many % columns as desired. % Or use a template: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item ... % using the widest term desired in each column. % Each new table line starts with @item, each subsequent new column % starts with @tab. Empty columns may be produced by supplying @tab's % with nothing between them for as many times as empty columns are needed, % ie, @tab@tab@tab will produce two empty columns. % @item, @tab do not need to be on their own lines, but it will not hurt % if they are. % Sample multitable: % @multitable {Column 1 template} {Column 2 template} {Column 3 template} % @item first col stuff @tab second col stuff @tab third col % @item % first col stuff % @tab % second col stuff % @tab % third col % @item first col stuff @tab second col stuff % @tab Many paragraphs of text may be used in any column. % % They will wrap at the width determined by the template. % @item@tab@tab This will be in third column. % @end multitable % Default dimensions may be reset by user. % @multitableparskip is vertical space between paragraphs in table. % @multitableparindent is paragraph indent in table. % @multitablecolmargin is horizontal space to be left between columns. % @multitablelinespace is space to leave between table items, baseline % to baseline. % 0pt means it depends on current normal line spacing. % \newskip\multitableparskip \newskip\multitableparindent \newdimen\multitablecolspace \newskip\multitablelinespace \multitableparskip=0pt \multitableparindent=6pt \multitablecolspace=12pt \multitablelinespace=0pt % Macros used to set up halign preamble: % \let\endsetuptable\relax \def\xendsetuptable{\endsetuptable} \let\columnfractions\relax \def\xcolumnfractions{\columnfractions} \newif\ifsetpercent % #1 is the @columnfraction, usually a decimal number like .5, but might % be just 1. We just use it, whatever it is. % \def\pickupwholefraction#1 {% \global\advance\colcount by 1 \expandafter\xdef\csname col\the\colcount\endcsname{#1\hsize}% \setuptable } \newcount\colcount \def\setuptable#1{% \def\firstarg{#1}% \ifx\firstarg\xendsetuptable \let\go = \relax \else \ifx\firstarg\xcolumnfractions \global\setpercenttrue \else \ifsetpercent \let\go\pickupwholefraction \else \global\advance\colcount by 1 \setbox0=\hbox{#1\unskip\space}% Add a normal word space as a % separator; typically that is always in the input, anyway. \expandafter\xdef\csname col\the\colcount\endcsname{\the\wd0}% \fi \fi \ifx\go\pickupwholefraction % Put the argument back for the \pickupwholefraction call, so % we'll always have a period there to be parsed. \def\go{\pickupwholefraction#1}% \else \let\go = \setuptable \fi% \fi \go } % multitable-only commands. % % @headitem starts a heading row, which we typeset in bold. % Assignments have to be global since we are inside the implicit group % of an alignment entry. \everycr resets \everytab so we don't have to % undo it ourselves. \def\headitemfont{\b}% for people to use in the template row; not changeable \def\headitem{% \checkenv\multitable \crcr \global\everytab={\bf}% can't use \headitemfont since the parsing differs \the\everytab % for the first item }% % % A \tab used to include \hskip1sp. But then the space in a template % line is not enough. That is bad. So let's go back to just `&' until % we again encounter the problem the 1sp was intended to solve. % --karl, nathan@acm.org, 20apr99. \def\tab{\checkenv\multitable &\the\everytab}% % @multitable ... @end multitable definitions: % \newtoks\everytab % insert after every tab. % \envdef\multitable{% \vskip\parskip \startsavinginserts % % @item within a multitable starts a normal row. % We use \def instead of \let so that if one of the multitable entries % contains an @itemize, we don't choke on the \item (seen as \crcr aka % \endtemplate) expanding \doitemize. \def\item{\crcr}% % \tolerance=9500 \hbadness=9500 \setmultitablespacing \parskip=\multitableparskip \parindent=\multitableparindent \overfullrule=0pt \global\colcount=0 % \everycr = {% \noalign{% \global\everytab={}% \global\colcount=0 % Reset the column counter. % Check for saved footnotes, etc. \checkinserts % Keeps underfull box messages off when table breaks over pages. %\filbreak % Maybe so, but it also creates really weird page breaks when the % table breaks over pages. Wouldn't \vfil be better? Wait until the % problem manifests itself, so it can be fixed for real --karl. }% }% % \parsearg\domultitable } \def\domultitable#1{% % To parse everything between @multitable and @item: \setuptable#1 \endsetuptable % % This preamble sets up a generic column definition, which will % be used as many times as user calls for columns. % \vtop will set a single line and will also let text wrap and % continue for many paragraphs if desired. \halign\bgroup &% \global\advance\colcount by 1 \multistrut \vtop{% % Use the current \colcount to find the correct column width: \hsize=\expandafter\csname col\the\colcount\endcsname % % In order to keep entries from bumping into each other % we will add a \leftskip of \multitablecolspace to all columns after % the first one. % % If a template has been used, we will add \multitablecolspace % to the width of each template entry. % % If the user has set preamble in terms of percent of \hsize we will % use that dimension as the width of the column, and the \leftskip % will keep entries from bumping into each other. Table will start at % left margin and final column will justify at right margin. % % Make sure we don't inherit \rightskip from the outer environment. \rightskip=0pt \ifnum\colcount=1 % The first column will be indented with the surrounding text. \advance\hsize by\leftskip \else \ifsetpercent \else % If user has not set preamble in terms of percent of \hsize % we will advance \hsize by \multitablecolspace. \advance\hsize by \multitablecolspace \fi % In either case we will make \leftskip=\multitablecolspace: \leftskip=\multitablecolspace \fi % Ignoring space at the beginning and end avoids an occasional spurious % blank line, when TeX decides to break the line at the space before the % box from the multistrut, so the strut ends up on a line by itself. % For example: % @multitable @columnfractions .11 .89 % @item @code{#} % @tab Legal holiday which is valid in major parts of the whole country. % Is automatically provided with highlighting sequences respectively % marking characters. \noindent\ignorespaces##\unskip\multistrut }\cr } \def\Emultitable{% \crcr \egroup % end the \halign \global\setpercentfalse } \def\setmultitablespacing{% \def\multistrut{\strut}% just use the standard line spacing % % Compute \multitablelinespace (if not defined by user) for use in % \multitableparskip calculation. We used define \multistrut based on % this, but (ironically) that caused the spacing to be off. % See bug-texinfo report from Werner Lemberg, 31 Oct 2004 12:52:20 +0100. \ifdim\multitablelinespace=0pt \setbox0=\vbox{X}\global\multitablelinespace=\the\baselineskip \global\advance\multitablelinespace by-\ht0 \fi % Test to see if parskip is larger than space between lines of % table. If not, do nothing. % If so, set to same dimension as multitablelinespace. \ifdim\multitableparskip>\multitablelinespace \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi% \ifdim\multitableparskip=0pt \global\multitableparskip=\multitablelinespace \global\advance\multitableparskip-7pt % to keep parskip somewhat smaller % than skip between lines in the table. \fi} \message{conditionals,} % @iftex, @ifnotdocbook, @ifnothtml, @ifnotinfo, @ifnotplaintext, % @ifnotxml always succeed. They currently do nothing; we don't % attempt to check whether the conditionals are properly nested. But we % have to remember that they are conditionals, so that @end doesn't % attempt to close an environment group. % \def\makecond#1{% \expandafter\let\csname #1\endcsname = \relax \expandafter\let\csname iscond.#1\endcsname = 1 } \makecond{iftex} \makecond{ifnotdocbook} \makecond{ifnothtml} \makecond{ifnotinfo} \makecond{ifnotplaintext} \makecond{ifnotxml} % Ignore @ignore, @ifhtml, @ifinfo, and the like. % \def\direntry{\doignore{direntry}} \def\documentdescription{\doignore{documentdescription}} \def\docbook{\doignore{docbook}} \def\html{\doignore{html}} \def\ifdocbook{\doignore{ifdocbook}} \def\ifhtml{\doignore{ifhtml}} \def\ifinfo{\doignore{ifinfo}} \def\ifnottex{\doignore{ifnottex}} \def\ifplaintext{\doignore{ifplaintext}} \def\ifxml{\doignore{ifxml}} \def\ignore{\doignore{ignore}} \def\menu{\doignore{menu}} \def\xml{\doignore{xml}} % Ignore text until a line `@end #1', keeping track of nested conditionals. % % A count to remember the depth of nesting. \newcount\doignorecount \def\doignore#1{\begingroup % Scan in ``verbatim'' mode: \obeylines \catcode`\@ = \other \catcode`\{ = \other \catcode`\} = \other % % Make sure that spaces turn into tokens that match what \doignoretext wants. \spaceisspace % % Count number of #1's that we've seen. \doignorecount = 0 % % Swallow text until we reach the matching `@end #1'. \dodoignore{#1}% } { \catcode`_=11 % We want to use \_STOP_ which cannot appear in texinfo source. \obeylines % % \gdef\dodoignore#1{% % #1 contains the command name as a string, e.g., `ifinfo'. % % Define a command to find the next `@end #1'. \long\def\doignoretext##1^^M@end #1{% \doignoretextyyy##1^^M@#1\_STOP_}% % % And this command to find another #1 command, at the beginning of a % line. (Otherwise, we would consider a line `@c @ifset', for % example, to count as an @ifset for nesting.) \long\def\doignoretextyyy##1^^M@#1##2\_STOP_{\doignoreyyy{##2}\_STOP_}% % % And now expand that command. \doignoretext ^^M% }% } \def\doignoreyyy#1{% \def\temp{#1}% \ifx\temp\empty % Nothing found. \let\next\doignoretextzzz \else % Found a nested condition, ... \advance\doignorecount by 1 \let\next\doignoretextyyy % ..., look for another. % If we're here, #1 ends with ^^M\ifinfo (for example). \fi \next #1% the token \_STOP_ is present just after this macro. } % We have to swallow the remaining "\_STOP_". % \def\doignoretextzzz#1{% \ifnum\doignorecount = 0 % We have just found the outermost @end. \let\next\enddoignore \else % Still inside a nested condition. \advance\doignorecount by -1 \let\next\doignoretext % Look for the next @end. \fi \next } % Finish off ignored text. { \obeylines% % Ignore anything after the last `@end #1'; this matters in verbatim % environments, where otherwise the newline after an ignored conditional % would result in a blank line in the output. \gdef\enddoignore#1^^M{\endgroup\ignorespaces}% } % @set VAR sets the variable VAR to an empty value. % @set VAR REST-OF-LINE sets VAR to the value REST-OF-LINE. % % Since we want to separate VAR from REST-OF-LINE (which might be % empty), we can't just use \parsearg; we have to insert a space of our % own to delimit the rest of the line, and then take it out again if we % didn't need it. % We rely on the fact that \parsearg sets \catcode`\ =10. % \parseargdef\set{\setyyy#1 \endsetyyy} \def\setyyy#1 #2\endsetyyy{% {% \makevalueexpandable \def\temp{#2}% \edef\next{\gdef\makecsname{SET#1}}% \ifx\temp\empty \next{}% \else \setzzz#2\endsetzzz \fi }% } % Remove the trailing space \setxxx inserted. \def\setzzz#1 \endsetzzz{\next{#1}} % @clear VAR clears (i.e., unsets) the variable VAR. % \parseargdef\clear{% {% \makevalueexpandable \global\expandafter\let\csname SET#1\endcsname=\relax }% } % @value{foo} gets the text saved in variable foo. \def\value{\begingroup\makevalueexpandable\valuexxx} \def\valuexxx#1{\expandablevalue{#1}\endgroup} { \catcode`\- = \active \catcode`\_ = \active % \gdef\makevalueexpandable{% \let\value = \expandablevalue % We don't want these characters active, ... \catcode`\-=\other \catcode`\_=\other % ..., but we might end up with active ones in the argument if % we're called from @code, as @code{@value{foo-bar_}}, though. % So \let them to their normal equivalents. \let-\normaldash \let_\normalunderscore } } % We have this subroutine so that we can handle at least some @value's % properly in indexes (we call \makevalueexpandable in \indexdummies). % The command has to be fully expandable (if the variable is set), since % the result winds up in the index file. This means that if the % variable's value contains other Texinfo commands, it's almost certain % it will fail (although perhaps we could fix that with sufficient work % to do a one-level expansion on the result, instead of complete). % \def\expandablevalue#1{% \expandafter\ifx\csname SET#1\endcsname\relax {[No value for ``#1'']}% \message{Variable `#1', used in @value, is not set.}% \else \csname SET#1\endcsname \fi } % @ifset VAR ... @end ifset reads the `...' iff VAR has been defined % with @set. % % To get special treatment of `@end ifset,' call \makeond and the redefine. % \makecond{ifset} \def\ifset{\parsearg{\doifset{\let\next=\ifsetfail}}} \def\doifset#1#2{% {% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname SET#2\endcsname\relax #1% If not set, redefine \next. \fi \expandafter }\next } \def\ifsetfail{\doignore{ifset}} % @ifclear VAR ... @end executes the `...' iff VAR has never been % defined with @set, or has been undefined with @clear. % % The `\else' inside the `\doifset' parameter is a trick to reuse the % above code: if the variable is not set, do nothing, if it is set, % then redefine \next to \ifclearfail. % \makecond{ifclear} \def\ifclear{\parsearg{\doifset{\else \let\next=\ifclearfail}}} \def\ifclearfail{\doignore{ifclear}} % @ifcommandisdefined CMD ... @end executes the `...' if CMD (written % without the @) is in fact defined. We can only feasibly check at the % TeX level, so something like `mathcode' is going to considered % defined even though it is not a Texinfo command. % \makecond{ifcommanddefined} \def\ifcommanddefined{\parsearg{\doifcmddefined{\let\next=\ifcmddefinedfail}}} % \def\doifcmddefined#1#2{{% \makevalueexpandable \let\next=\empty \expandafter\ifx\csname #2\endcsname\relax #1% If not defined, \let\next as above. \fi \expandafter }\next } \def\ifcmddefinedfail{\doignore{ifcommanddefined}} % @ifcommandnotdefined CMD ... handled similar to @ifclear above. \makecond{ifcommandnotdefined} \def\ifcommandnotdefined{% \parsearg{\doifcmddefined{\else \let\next=\ifcmdnotdefinedfail}}} \def\ifcmdnotdefinedfail{\doignore{ifcommandnotdefined}} % Set the `txicommandconditionals' variable, so documents have a way to % test if the @ifcommand...defined conditionals are available. \set txicommandconditionals % @dircategory CATEGORY -- specify a category of the dir file % which this file should belong to. Ignore this in TeX. \let\dircategory=\comment % @defininfoenclose. \let\definfoenclose=\comment \message{indexing,} % Index generation facilities % Define \newwrite to be identical to plain tex's \newwrite % except not \outer, so it can be used within macros and \if's. \edef\newwrite{\makecsname{ptexnewwrite}} % \newindex {foo} defines an index named foo. % It automatically defines \fooindex such that % \fooindex ...rest of line... puts an entry in the index foo. % It also defines \fooindfile to be the number of the output channel for % the file that accumulates this index. The file's extension is foo. % The name of an index should be no more than 2 characters long % for the sake of vms. % \def\newindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 % Open the file \fi \expandafter\xdef\csname#1index\endcsname{% % Define @#1index \noexpand\doindex{#1}} } % @defindex foo == \newindex{foo} % \def\defindex{\parsearg\newindex} % Define @defcodeindex, like @defindex except put all entries in @code. % \def\defcodeindex{\parsearg\newcodeindex} % \def\newcodeindex#1{% \iflinks \expandafter\newwrite \csname#1indfile\endcsname \openout \csname#1indfile\endcsname \jobname.#1 \fi \expandafter\xdef\csname#1index\endcsname{% \noexpand\docodeindex{#1}}% } % @synindex foo bar makes index foo feed into index bar. % Do this instead of @defindex foo if you don't want it as a separate index. % % @syncodeindex foo bar similar, but put all entries made for index foo % inside @code. % \def\synindex#1 #2 {\dosynindex\doindex{#1}{#2}} \def\syncodeindex#1 #2 {\dosynindex\docodeindex{#1}{#2}} % #1 is \doindex or \docodeindex, #2 the index getting redefined (foo), % #3 the target index (bar). \def\dosynindex#1#2#3{% % Only do \closeout if we haven't already done it, else we'll end up % closing the target index. \expandafter \ifx\csname donesynindex#2\endcsname \relax % The \closeout helps reduce unnecessary open files; the limit on the % Acorn RISC OS is a mere 16 files. \expandafter\closeout\csname#2indfile\endcsname \expandafter\let\csname donesynindex#2\endcsname = 1 \fi % redefine \fooindfile: \expandafter\let\expandafter\temp\expandafter=\csname#3indfile\endcsname \expandafter\let\csname#2indfile\endcsname=\temp % redefine \fooindex: \expandafter\xdef\csname#2index\endcsname{\noexpand#1{#3}}% } % Define \doindex, the driver for all \fooindex macros. % Argument #1 is generated by the calling \fooindex macro, % and it is "foo", the name of the index. % \doindex just uses \parsearg; it calls \doind for the actual work. % This is because \doind is more useful to call from other macros. % There is also \dosubind {index}{topic}{subtopic} % which makes an entry in a two-level index such as the operation index. \def\doindex#1{\edef\indexname{#1}\parsearg\singleindexer} \def\singleindexer #1{\doind{\indexname}{#1}} % like the previous two, but they put @code around the argument. \def\docodeindex#1{\edef\indexname{#1}\parsearg\singlecodeindexer} \def\singlecodeindexer #1{\doind{\indexname}{\code{#1}}} % Take care of Texinfo commands that can appear in an index entry. % Since there are some commands we want to expand, and others we don't, % we have to laboriously prevent expansion for those that we don't. % \def\indexdummies{% \escapechar = `\\ % use backslash in output files. \def\@{@}% change to @@ when we switch to @ as escape char in index files. \def\ {\realbackslash\space }% % % Need these unexpandable (because we define \tt as a dummy) % definitions when @{ or @} appear in index entry text. Also, more % complicated, when \tex is in effect and \{ is a \delimiter again. % We can't use \lbracecmd and \rbracecmd because texindex assumes % braces and backslashes are used only as delimiters. Perhaps we % should define @lbrace and @rbrace commands a la @comma. \def\{{{\tt\char123}}% \def\}{{\tt\char125}}% % % I don't entirely understand this, but when an index entry is % generated from a macro call, the \endinput which \scanmacro inserts % causes processing to be prematurely terminated. This is, % apparently, because \indexsorttmp is fully expanded, and \endinput % is an expandable command. The redefinition below makes \endinput % disappear altogether for that purpose -- although logging shows that % processing continues to some further point. On the other hand, it % seems \endinput does not hurt in the printed index arg, since that % is still getting written without apparent harm. % % Sample source (mac-idx3.tex, reported by Graham Percival to % help-texinfo, 22may06): % @macro funindex {WORD} % @findex xyz % @end macro % ... % @funindex commtest % % The above is not enough to reproduce the bug, but it gives the flavor. % % Sample whatsit resulting: % .@write3{\entry{xyz}{@folio }{@code {xyz@endinput }}} % % So: \let\endinput = \empty % % Do the redefinitions. \commondummies } % For the aux and toc files, @ is the escape character. So we want to % redefine everything using @ as the escape character (instead of % \realbackslash, still used for index files). When everything uses @, % this will be simpler. % \def\atdummies{% \def\@{@@}% \def\ {@ }% \let\{ = \lbraceatcmd \let\} = \rbraceatcmd % % Do the redefinitions. \commondummies \otherbackslash } % Called from \indexdummies and \atdummies. % \def\commondummies{% % % \definedummyword defines \#1 as \string\#1\space, thus effectively % preventing its expansion. This is used only for control words, % not control letters, because the \space would be incorrect for % control characters, but is needed to separate the control word % from whatever follows. % % For control letters, we have \definedummyletter, which omits the % space. % % These can be used both for control words that take an argument and % those that do not. If it is followed by {arg} in the input, then % that will dutifully get written to the index (or wherever). % \def\definedummyword ##1{\def##1{\string##1\space}}% \def\definedummyletter##1{\def##1{\string##1}}% \let\definedummyaccent\definedummyletter % \commondummiesnofonts % \definedummyletter\_% \definedummyletter\-% % % Non-English letters. \definedummyword\AA \definedummyword\AE \definedummyword\DH \definedummyword\L \definedummyword\O \definedummyword\OE \definedummyword\TH \definedummyword\aa \definedummyword\ae \definedummyword\dh \definedummyword\exclamdown \definedummyword\l \definedummyword\o \definedummyword\oe \definedummyword\ordf \definedummyword\ordm \definedummyword\questiondown \definedummyword\ss \definedummyword\th % % Although these internal commands shouldn't show up, sometimes they do. \definedummyword\bf \definedummyword\gtr \definedummyword\hat \definedummyword\less \definedummyword\sf \definedummyword\sl \definedummyword\tclose \definedummyword\tt % \definedummyword\LaTeX \definedummyword\TeX % % Assorted special characters. \definedummyword\arrow \definedummyword\bullet \definedummyword\comma \definedummyword\copyright \definedummyword\registeredsymbol \definedummyword\dots \definedummyword\enddots \definedummyword\entrybreak \definedummyword\equiv \definedummyword\error \definedummyword\euro \definedummyword\expansion \definedummyword\geq \definedummyword\guillemetleft \definedummyword\guillemetright \definedummyword\guilsinglleft \definedummyword\guilsinglright \definedummyword\lbracechar \definedummyword\leq \definedummyword\minus \definedummyword\ogonek \definedummyword\pounds \definedummyword\point \definedummyword\print \definedummyword\quotedblbase \definedummyword\quotedblleft \definedummyword\quotedblright \definedummyword\quoteleft \definedummyword\quoteright \definedummyword\quotesinglbase \definedummyword\rbracechar \definedummyword\result \definedummyword\textdegree % % We want to disable all macros so that they are not expanded by \write. \macrolist % \normalturnoffactive % % Handle some cases of @value -- where it does not contain any % (non-fully-expandable) commands. \makevalueexpandable } % \commondummiesnofonts: common to \commondummies and \indexnofonts. % \def\commondummiesnofonts{% % Control letters and accents. \definedummyletter\!% \definedummyaccent\"% \definedummyaccent\'% \definedummyletter\*% \definedummyaccent\,% \definedummyletter\.% \definedummyletter\/% \definedummyletter\:% \definedummyaccent\=% \definedummyletter\?% \definedummyaccent\^% \definedummyaccent\`% \definedummyaccent\~% \definedummyword\u \definedummyword\v \definedummyword\H \definedummyword\dotaccent \definedummyword\ogonek \definedummyword\ringaccent \definedummyword\tieaccent \definedummyword\ubaraccent \definedummyword\udotaccent \definedummyword\dotless % % Texinfo font commands. \definedummyword\b \definedummyword\i \definedummyword\r \definedummyword\sansserif \definedummyword\sc \definedummyword\slanted \definedummyword\t % % Commands that take arguments. \definedummyword\abbr \definedummyword\acronym \definedummyword\anchor \definedummyword\cite \definedummyword\code \definedummyword\command \definedummyword\dfn \definedummyword\dmn \definedummyword\email \definedummyword\emph \definedummyword\env \definedummyword\file \definedummyword\image \definedummyword\indicateurl \definedummyword\inforef \definedummyword\kbd \definedummyword\key \definedummyword\math \definedummyword\option \definedummyword\pxref \definedummyword\ref \definedummyword\samp \definedummyword\strong \definedummyword\tie \definedummyword\uref \definedummyword\url \definedummyword\var \definedummyword\verb \definedummyword\w \definedummyword\xref } % \indexnofonts is used when outputting the strings to sort the index % by, and when constructing control sequence names. It eliminates all % control sequences and just writes whatever the best ASCII sort string % would be for a given command (usually its argument). % \def\indexnofonts{% % Accent commands should become @asis. \def\definedummyaccent##1{\let##1\asis}% % We can just ignore other control letters. \def\definedummyletter##1{\let##1\empty}% % All control words become @asis by default; overrides below. \let\definedummyword\definedummyaccent % \commondummiesnofonts % % Don't no-op \tt, since it isn't a user-level command % and is used in the definitions of the active chars like <, >, |, etc. % Likewise with the other plain tex font commands. %\let\tt=\asis % \def\ { }% \def\@{@}% \def\_{\normalunderscore}% \def\-{}% @- shouldn't affect sorting % % Unfortunately, texindex is not prepared to handle braces in the % content at all. So for index sorting, we map @{ and @} to strings % starting with |, since that ASCII character is between ASCII { and }. \def\{{|a}% \def\lbracechar{|a}% % \def\}{|b}% \def\rbracechar{|b}% % % Non-English letters. \def\AA{AA}% \def\AE{AE}% \def\DH{DZZ}% \def\L{L}% \def\OE{OE}% \def\O{O}% \def\TH{ZZZ}% \def\aa{aa}% \def\ae{ae}% \def\dh{dzz}% \def\exclamdown{!}% \def\l{l}% \def\oe{oe}% \def\ordf{a}% \def\ordm{o}% \def\o{o}% \def\questiondown{?}% \def\ss{ss}% \def\th{zzz}% % \def\LaTeX{LaTeX}% \def\TeX{TeX}% % % Assorted special characters. % (The following {} will end up in the sort string, but that's ok.) \def\arrow{->}% \def\bullet{bullet}% \def\comma{,}% \def\copyright{copyright}% \def\dots{...}% \def\enddots{...}% \def\equiv{==}% \def\error{error}% \def\euro{euro}% \def\expansion{==>}% \def\geq{>=}% \def\guillemetleft{<<}% \def\guillemetright{>>}% \def\guilsinglleft{<}% \def\guilsinglright{>}% \def\leq{<=}% \def\minus{-}% \def\point{.}% \def\pounds{pounds}% \def\print{-|}% \def\quotedblbase{"}% \def\quotedblleft{"}% \def\quotedblright{"}% \def\quoteleft{`}% \def\quoteright{'}% \def\quotesinglbase{,}% \def\registeredsymbol{R}% \def\result{=>}% \def\textdegree{o}% % \expandafter\ifx\csname SETtxiindexlquoteignore\endcsname\relax \else \indexlquoteignore \fi % % We need to get rid of all macros, leaving only the arguments (if present). % Of course this is not nearly correct, but it is the best we can do for now. % makeinfo does not expand macros in the argument to @deffn, which ends up % writing an index entry, and texindex isn't prepared for an index sort entry % that starts with \. % % Since macro invocations are followed by braces, we can just redefine them % to take a single TeX argument. The case of a macro invocation that % goes to end-of-line is not handled. % \macrolist } % Undocumented (for FSFS 2nd ed.): @set txiindexlquoteignore makes us % ignore left quotes in the sort term. {\catcode`\`=\active \gdef\indexlquoteignore{\let`=\empty}} \let\indexbackslash=0 %overridden during \printindex. \let\SETmarginindex=\relax % put index entries in margin (undocumented)? % Most index entries go through here, but \dosubind is the general case. % #1 is the index name, #2 is the entry text. \def\doind#1#2{\dosubind{#1}{#2}{}} % Workhorse for all \fooindexes. % #1 is name of index, #2 is stuff to put there, #3 is subentry -- % empty if called from \doind, as we usually are (the main exception % is with most defuns, which call us directly). % \def\dosubind#1#2#3{% \iflinks {% % Store the main index entry text (including the third arg). \toks0 = {#2}% % If third arg is present, precede it with a space. \def\thirdarg{#3}% \ifx\thirdarg\empty \else \toks0 = \expandafter{\the\toks0 \space #3}% \fi % \edef\writeto{\csname#1indfile\endcsname}% % \safewhatsit\dosubindwrite }% \fi } % Write the entry in \toks0 to the index file: % \def\dosubindwrite{% % Put the index entry in the margin if desired. \ifx\SETmarginindex\relax\else \insert\margin{\hbox{\vrule height8pt depth3pt width0pt \the\toks0}}% \fi % % Remember, we are within a group. \indexdummies % Must do this here, since \bf, etc expand at this stage \def\backslashcurfont{\indexbackslash}% \indexbackslash isn't defined now % so it will be output as is; and it will print as backslash. % % Process the index entry with all font commands turned off, to % get the string to sort by. {\indexnofonts \edef\temp{\the\toks0}% need full expansion \xdef\indexsorttmp{\temp}% }% % % Set up the complete index entry, with both the sort key and % the original text, including any font commands. We write % three arguments to \entry to the .?? file (four in the % subentry case), texindex reduces to two when writing the .??s % sorted result. \edef\temp{% \write\writeto{% \string\entry{\indexsorttmp}{\noexpand\folio}{\the\toks0}}% }% \temp } % Take care of unwanted page breaks/skips around a whatsit: % % If a skip is the last thing on the list now, preserve it % by backing up by \lastskip, doing the \write, then inserting % the skip again. Otherwise, the whatsit generated by the % \write or \pdfdest will make \lastskip zero. The result is that % sequences like this: % @end defun % @tindex whatever % @defun ... % will have extra space inserted, because the \medbreak in the % start of the @defun won't see the skip inserted by the @end of % the previous defun. % % But don't do any of this if we're not in vertical mode. We % don't want to do a \vskip and prematurely end a paragraph. % % Avoid page breaks due to these extra skips, too. % % But wait, there is a catch there: % We'll have to check whether \lastskip is zero skip. \ifdim is not % sufficient for this purpose, as it ignores stretch and shrink parts % of the skip. The only way seems to be to check the textual % representation of the skip. % % The following is almost like \def\zeroskipmacro{0.0pt} except that % the ``p'' and ``t'' characters have catcode \other, not 11 (letter). % \edef\zeroskipmacro{\expandafter\the\csname z@skip\endcsname} % \newskip\whatsitskip \newcount\whatsitpenalty % % ..., ready, GO: % \def\safewhatsit#1{\ifhmode #1% \else % \lastskip and \lastpenalty cannot both be nonzero simultaneously. \whatsitskip = \lastskip \edef\lastskipmacro{\the\lastskip}% \whatsitpenalty = \lastpenalty % % If \lastskip is nonzero, that means the last item was a % skip. And since a skip is discardable, that means this % -\whatsitskip glue we're inserting is preceded by a % non-discardable item, therefore it is not a potential % breakpoint, therefore no \nobreak needed. \ifx\lastskipmacro\zeroskipmacro \else \vskip-\whatsitskip \fi % #1% % \ifx\lastskipmacro\zeroskipmacro % If \lastskip was zero, perhaps the last item was a penalty, and % perhaps it was >=10000, e.g., a \nobreak. In that case, we want % to re-insert the same penalty (values >10000 are used for various % signals); since we just inserted a non-discardable item, any % following glue (such as a \parskip) would be a breakpoint. For example: % @deffn deffn-whatever % @vindex index-whatever % Description. % would allow a break between the index-whatever whatsit % and the "Description." paragraph. \ifnum\whatsitpenalty>9999 \penalty\whatsitpenalty \fi \else % On the other hand, if we had a nonzero \lastskip, % this make-up glue would be preceded by a non-discardable item % (the whatsit from the \write), so we must insert a \nobreak. \nobreak\vskip\whatsitskip \fi \fi} % The index entry written in the file actually looks like % \entry {sortstring}{page}{topic} % or % \entry {sortstring}{page}{topic}{subtopic} % The texindex program reads in these files and writes files % containing these kinds of lines: % \initial {c} % before the first topic whose initial is c % \entry {topic}{pagelist} % for a topic that is used without subtopics % \primary {topic} % for the beginning of a topic that is used with subtopics % \secondary {subtopic}{pagelist} % for each subtopic. % Define the user-accessible indexing commands % @findex, @vindex, @kindex, @cindex. \def\findex {\fnindex} \def\kindex {\kyindex} \def\cindex {\cpindex} \def\vindex {\vrindex} \def\tindex {\tpindex} \def\pindex {\pgindex} \def\cindexsub {\begingroup\obeylines\cindexsub} {\obeylines % \gdef\cindexsub "#1" #2^^M{\endgroup % \dosubind{cp}{#2}{#1}}} % Define the macros used in formatting output of the sorted index material. % @printindex causes a particular index (the ??s file) to get printed. % It does not print any chapter heading (usually an @unnumbered). % \parseargdef\printindex{\begingroup \dobreak \chapheadingskip{10000}% % \smallfonts \rm \tolerance = 9500 \plainfrenchspacing \everypar = {}% don't want the \kern\-parindent from indentation suppression. % % See if the index file exists and is nonempty. % Change catcode of @ here so that if the index file contains % \initial {@} % as its first line, TeX doesn't complain about mismatched braces % (because it thinks @} is a control sequence). \catcode`\@ = 11 \openin 1 \jobname.#1s \ifeof 1 % \enddoublecolumns gets confused if there is no text in the index, % and it loses the chapter title and the aux file entries for the % index. The easiest way to prevent this problem is to make sure % there is some text. \putwordIndexNonexistent \else % % If the index file exists but is empty, then \openin leaves \ifeof % false. We have to make TeX try to read something from the file, so % it can discover if there is anything in it. \read 1 to \temp \ifeof 1 \putwordIndexIsEmpty \else % Index files are almost Texinfo source, but we use \ as the escape % character. It would be better to use @, but that's too big a change % to make right now. \def\indexbackslash{\backslashcurfont}% \catcode`\\ = 0 \escapechar = `\\ \begindoublecolumns \input \jobname.#1s \enddoublecolumns \fi \fi \closein 1 \endgroup} % These macros are used by the sorted index file itself. % Change them to control the appearance of the index. \def\initial#1{{% % Some minor font changes for the special characters. \let\tentt=\sectt \let\tt=\sectt \let\sf=\sectt % % Remove any glue we may have, we'll be inserting our own. \removelastskip % % We like breaks before the index initials, so insert a bonus. \nobreak \vskip 0pt plus 3\baselineskip \penalty 0 \vskip 0pt plus -3\baselineskip % % Typeset the initial. Making this add up to a whole number of % baselineskips increases the chance of the dots lining up from column % to column. It still won't often be perfect, because of the stretch % we need before each entry, but it's better. % % No shrink because it confuses \balancecolumns. \vskip 1.67\baselineskip plus .5\baselineskip \leftline{\secbf #1}% % Do our best not to break after the initial. \nobreak \vskip .33\baselineskip plus .1\baselineskip }} % \entry typesets a paragraph consisting of the text (#1), dot leaders, and % then page number (#2) flushed to the right margin. It is used for index % and table of contents entries. The paragraph is indented by \leftskip. % % A straightforward implementation would start like this: % \def\entry#1#2{... % But this freezes the catcodes in the argument, and can cause problems to % @code, which sets - active. This problem was fixed by a kludge--- % ``-'' was active throughout whole index, but this isn't really right. % The right solution is to prevent \entry from swallowing the whole text. % --kasal, 21nov03 \def\entry{% \begingroup % % Start a new paragraph if necessary, so our assignments below can't % affect previous text. \par % % Do not fill out the last line with white space. \parfillskip = 0in % % No extra space above this paragraph. \parskip = 0in % % Do not prefer a separate line ending with a hyphen to fewer lines. \finalhyphendemerits = 0 % % \hangindent is only relevant when the entry text and page number % don't both fit on one line. In that case, bob suggests starting the % dots pretty far over on the line. Unfortunately, a large % indentation looks wrong when the entry text itself is broken across % lines. So we use a small indentation and put up with long leaders. % % \hangafter is reset to 1 (which is the value we want) at the start % of each paragraph, so we need not do anything with that. \hangindent = 2em % % When the entry text needs to be broken, just fill out the first line % with blank space. \rightskip = 0pt plus1fil % % A bit of stretch before each entry for the benefit of balancing % columns. \vskip 0pt plus1pt % % When reading the text of entry, convert explicit line breaks % from @* into spaces. The user might give these in long section % titles, for instance. \def\*{\unskip\space\ignorespaces}% \def\entrybreak{\hfil\break}% % % Swallow the left brace of the text (first parameter): \afterassignment\doentry \let\temp = } \def\entrybreak{\unskip\space\ignorespaces}% \def\doentry{% \bgroup % Instead of the swallowed brace. \noindent \aftergroup\finishentry % And now comes the text of the entry. } \def\finishentry#1{% % #1 is the page number. % % The following is kludged to not output a line of dots in the index if % there are no page numbers. The next person who breaks this will be % cursed by a Unix daemon. \setbox\boxA = \hbox{#1}% \ifdim\wd\boxA = 0pt \ % \else % % If we must, put the page number on a line of its own, and fill out % this line with blank space. (The \hfil is overwhelmed with the % fill leaders glue in \indexdotfill if the page number does fit.) \hfil\penalty50 \null\nobreak\indexdotfill % Have leaders before the page number. % % The `\ ' here is removed by the implicit \unskip that TeX does as % part of (the primitive) \par. Without it, a spurious underfull % \hbox ensues. \ifpdf \pdfgettoks#1.% \ \the\toksA \else \ #1% \fi \fi \par \endgroup } % Like plain.tex's \dotfill, except uses up at least 1 em. \def\indexdotfill{\cleaders \hbox{$\mathsurround=0pt \mkern1.5mu.\mkern1.5mu$}\hskip 1em plus 1fill} \def\primary #1{\line{#1\hfil}} \newskip\secondaryindent \secondaryindent=0.5cm \def\secondary#1#2{{% \parfillskip=0in \parskip=0in \hangindent=1in \hangafter=1 \noindent\hskip\secondaryindent\hbox{#1}\indexdotfill \ifpdf \pdfgettoks#2.\ \the\toksA % The page number ends the paragraph. \else #2 \fi \par }} % Define two-column mode, which we use to typeset indexes. % Adapted from the TeXbook, page 416, which is to say, % the manmac.tex format used to print the TeXbook itself. \catcode`\@=11 \newbox\partialpage \newdimen\doublecolumnhsize \def\begindoublecolumns{\begingroup % ended by \enddoublecolumns % Grab any single-column material above us. \output = {% % % Here is a possibility not foreseen in manmac: if we accumulate a % whole lot of material, we might end up calling this \output % routine twice in a row (see the doublecol-lose test, which is % essentially a couple of indexes with @setchapternewpage off). In % that case we just ship out what is in \partialpage with the normal % output routine. Generally, \partialpage will be empty when this % runs and this will be a no-op. See the indexspread.tex test case. \ifvoid\partialpage \else \onepageout{\pagecontents\partialpage}% \fi % \global\setbox\partialpage = \vbox{% % Unvbox the main output page. \unvbox\PAGE \kern-\topskip \kern\baselineskip }% }% \eject % run that output routine to set \partialpage % % Use the double-column output routine for subsequent pages. \output = {\doublecolumnout}% % % Change the page size parameters. We could do this once outside this % routine, in each of @smallbook, @afourpaper, and the default 8.5x11 % format, but then we repeat the same computation. Repeating a couple % of assignments once per index is clearly meaningless for the % execution time, so we may as well do it in one place. % % First we halve the line length, less a little for the gutter between % the columns. We compute the gutter based on the line length, so it % changes automatically with the paper format. The magic constant % below is chosen so that the gutter has the same value (well, +-<1pt) % as it did when we hard-coded it. % % We put the result in a separate register, \doublecolumhsize, so we % can restore it in \pagesofar, after \hsize itself has (potentially) % been clobbered. % \doublecolumnhsize = \hsize \advance\doublecolumnhsize by -.04154\hsize \divide\doublecolumnhsize by 2 \hsize = \doublecolumnhsize % % Double the \vsize as well. (We don't need a separate register here, % since nobody clobbers \vsize.) \vsize = 2\vsize } % The double-column output routine for all double-column pages except % the last. % \def\doublecolumnout{% \splittopskip=\topskip \splitmaxdepth=\maxdepth % Get the available space for the double columns -- the normal % (undoubled) page height minus any material left over from the % previous page. \dimen@ = \vsize \divide\dimen@ by 2 \advance\dimen@ by -\ht\partialpage % % box0 will be the left-hand column, box2 the right. \setbox0=\vsplit255 to\dimen@ \setbox2=\vsplit255 to\dimen@ \onepageout\pagesofar \unvbox255 \penalty\outputpenalty } % % Re-output the contents of the output page -- any previous material, % followed by the two boxes we just split, in box0 and box2. \def\pagesofar{% \unvbox\partialpage % \hsize = \doublecolumnhsize \wd0=\hsize \wd2=\hsize \hbox to\pagewidth{\box0\hfil\box2}% } % % All done with double columns. \def\enddoublecolumns{% % The following penalty ensures that the page builder is exercised % _before_ we change the output routine. This is necessary in the % following situation: % % The last section of the index consists only of a single entry. % Before this section, \pagetotal is less than \pagegoal, so no % break occurs before the last section starts. However, the last % section, consisting of \initial and the single \entry, does not % fit on the page and has to be broken off. Without the following % penalty the page builder will not be exercised until \eject % below, and by that time we'll already have changed the output % routine to the \balancecolumns version, so the next-to-last % double-column page will be processed with \balancecolumns, which % is wrong: The two columns will go to the main vertical list, with % the broken-off section in the recent contributions. As soon as % the output routine finishes, TeX starts reconsidering the page % break. The two columns and the broken-off section both fit on the % page, because the two columns now take up only half of the page % goal. When TeX sees \eject from below which follows the final % section, it invokes the new output routine that we've set after % \balancecolumns below; \onepageout will try to fit the two columns % and the final section into the vbox of \pageheight (see % \pagebody), causing an overfull box. % % Note that glue won't work here, because glue does not exercise the % page builder, unlike penalties (see The TeXbook, pp. 280-281). \penalty0 % \output = {% % Split the last of the double-column material. Leave it on the % current page, no automatic page break. \balancecolumns % % If we end up splitting too much material for the current page, % though, there will be another page break right after this \output % invocation ends. Having called \balancecolumns once, we do not % want to call it again. Therefore, reset \output to its normal % definition right away. (We hope \balancecolumns will never be % called on to balance too much material, but if it is, this makes % the output somewhat more palatable.) \global\output = {\onepageout{\pagecontents\PAGE}}% }% \eject \endgroup % started in \begindoublecolumns % % \pagegoal was set to the doubled \vsize above, since we restarted % the current page. We're now back to normal single-column % typesetting, so reset \pagegoal to the normal \vsize (after the % \endgroup where \vsize got restored). \pagegoal = \vsize } % % Called at the end of the double column material. \def\balancecolumns{% \setbox0 = \vbox{\unvbox255}% like \box255 but more efficient, see p.120. \dimen@ = \ht0 \advance\dimen@ by \topskip \advance\dimen@ by-\baselineskip \divide\dimen@ by 2 % target to split to %debug\message{final 2-column material height=\the\ht0, target=\the\dimen@.}% \splittopskip = \topskip % Loop until we get a decent breakpoint. {% \vbadness = 10000 \loop \global\setbox3 = \copy0 \global\setbox1 = \vsplit3 to \dimen@ \ifdim\ht3>\dimen@ \global\advance\dimen@ by 1pt \repeat }% %debug\message{split to \the\dimen@, column heights: \the\ht1, \the\ht3.}% \setbox0=\vbox to\dimen@{\unvbox1}% \setbox2=\vbox to\dimen@{\unvbox3}% % \pagesofar } \catcode`\@ = \other \message{sectioning,} % Chapters, sections, etc. % Let's start with @part. \outer\parseargdef\part{\partzzz{#1}} \def\partzzz#1{% \chapoddpage \null \vskip.3\vsize % move it down on the page a bit \begingroup \noindent \titlefonts\rmisbold #1\par % the text \let\lastnode=\empty % no node to associate with \writetocentry{part}{#1}{}% but put it in the toc \headingsoff % no headline or footline on the part page \chapoddpage \endgroup } % \unnumberedno is an oxymoron. But we count the unnumbered % sections so that we can refer to them unambiguously in the pdf % outlines by their "section number". We avoid collisions with chapter % numbers by starting them at 10000. (If a document ever has 10000 % chapters, we're in trouble anyway, I'm sure.) \newcount\unnumberedno \unnumberedno = 10000 \newcount\chapno \newcount\secno \secno=0 \newcount\subsecno \subsecno=0 \newcount\subsubsecno \subsubsecno=0 % This counter is funny since it counts through charcodes of letters A, B, ... \newcount\appendixno \appendixno = `\@ % % \def\appendixletter{\char\the\appendixno} % We do the following ugly conditional instead of the above simple % construct for the sake of pdftex, which needs the actual % letter in the expansion, not just typeset. % \def\appendixletter{% \ifnum\appendixno=`A A% \else\ifnum\appendixno=`B B% \else\ifnum\appendixno=`C C% \else\ifnum\appendixno=`D D% \else\ifnum\appendixno=`E E% \else\ifnum\appendixno=`F F% \else\ifnum\appendixno=`G G% \else\ifnum\appendixno=`H H% \else\ifnum\appendixno=`I I% \else\ifnum\appendixno=`J J% \else\ifnum\appendixno=`K K% \else\ifnum\appendixno=`L L% \else\ifnum\appendixno=`M M% \else\ifnum\appendixno=`N N% \else\ifnum\appendixno=`O O% \else\ifnum\appendixno=`P P% \else\ifnum\appendixno=`Q Q% \else\ifnum\appendixno=`R R% \else\ifnum\appendixno=`S S% \else\ifnum\appendixno=`T T% \else\ifnum\appendixno=`U U% \else\ifnum\appendixno=`V V% \else\ifnum\appendixno=`W W% \else\ifnum\appendixno=`X X% \else\ifnum\appendixno=`Y Y% \else\ifnum\appendixno=`Z Z% % The \the is necessary, despite appearances, because \appendixletter is % expanded while writing the .toc file. \char\appendixno is not % expandable, thus it is written literally, thus all appendixes come out % with the same letter (or @) in the toc without it. \else\char\the\appendixno \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi \fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi\fi} % Each @chapter defines these (using marks) as the number+name, number % and name of the chapter. Page headings and footings can use % these. @section does likewise. \def\thischapter{} \def\thischapternum{} \def\thischaptername{} \def\thissection{} \def\thissectionnum{} \def\thissectionname{} \newcount\absseclevel % used to calculate proper heading level \newcount\secbase\secbase=0 % @raisesections/@lowersections modify this count % @raisesections: treat @section as chapter, @subsection as section, etc. \def\raisesections{\global\advance\secbase by -1} \let\up=\raisesections % original BFox name % @lowersections: treat @chapter as section, @section as subsection, etc. \def\lowersections{\global\advance\secbase by 1} \let\down=\lowersections % original BFox name % we only have subsub. \chardef\maxseclevel = 3 % % A numbered section within an unnumbered changes to unnumbered too. % To achieve this, remember the "biggest" unnum. sec. we are currently in: \chardef\unnlevel = \maxseclevel % % Trace whether the current chapter is an appendix or not: % \chapheadtype is "N" or "A", unnumbered chapters are ignored. \def\chapheadtype{N} % Choose a heading macro % #1 is heading type % #2 is heading level % #3 is text for heading \def\genhead#1#2#3{% % Compute the abs. sec. level: \absseclevel=#2 \advance\absseclevel by \secbase % Make sure \absseclevel doesn't fall outside the range: \ifnum \absseclevel < 0 \absseclevel = 0 \else \ifnum \absseclevel > 3 \absseclevel = 3 \fi \fi % The heading type: \def\headtype{#1}% \if \headtype U% \ifnum \absseclevel < \unnlevel \chardef\unnlevel = \absseclevel \fi \else % Check for appendix sections: \ifnum \absseclevel = 0 \edef\chapheadtype{\headtype}% \else \if \headtype A\if \chapheadtype N% \errmessage{@appendix... within a non-appendix chapter}% \fi\fi \fi % Check for numbered within unnumbered: \ifnum \absseclevel > \unnlevel \def\headtype{U}% \else \chardef\unnlevel = 3 \fi \fi % Now print the heading: \if \headtype U% \ifcase\absseclevel \unnumberedzzz{#3}% \or \unnumberedseczzz{#3}% \or \unnumberedsubseczzz{#3}% \or \unnumberedsubsubseczzz{#3}% \fi \else \if \headtype A% \ifcase\absseclevel \appendixzzz{#3}% \or \appendixsectionzzz{#3}% \or \appendixsubseczzz{#3}% \or \appendixsubsubseczzz{#3}% \fi \else \ifcase\absseclevel \chapterzzz{#3}% \or \seczzz{#3}% \or \numberedsubseczzz{#3}% \or \numberedsubsubseczzz{#3}% \fi \fi \fi \suppressfirstparagraphindent } % an interface: \def\numhead{\genhead N} \def\apphead{\genhead A} \def\unnmhead{\genhead U} % @chapter, @appendix, @unnumbered. Increment top-level counter, reset % all lower-level sectioning counters to zero. % % Also set \chaplevelprefix, which we prepend to @float sequence numbers % (e.g., figures), q.v. By default (before any chapter), that is empty. \let\chaplevelprefix = \empty % \outer\parseargdef\chapter{\numhead0{#1}} % normally numhead0 calls chapterzzz \def\chapterzzz#1{% % section resetting is \global in case the chapter is in a group, such % as an @include file. \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\chapno by 1 % % Used for \float. \gdef\chaplevelprefix{\the\chapno.}% \resetallfloatnos % % \putwordChapter can contain complex things in translations. \toks0=\expandafter{\putwordChapter}% \message{\the\toks0 \space \the\chapno}% % % Write the actual heading. \chapmacro{#1}{Ynumbered}{\the\chapno}% % % So @section and the like are numbered underneath this chapter. \global\let\section = \numberedsec \global\let\subsection = \numberedsubsec \global\let\subsubsection = \numberedsubsubsec } \outer\parseargdef\appendix{\apphead0{#1}} % normally calls appendixzzz % \def\appendixzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\appendixno by 1 \gdef\chaplevelprefix{\appendixletter.}% \resetallfloatnos % % \putwordAppendix can contain complex things in translations. \toks0=\expandafter{\putwordAppendix}% \message{\the\toks0 \space \appendixletter}% % \chapmacro{#1}{Yappendix}{\appendixletter}% % \global\let\section = \appendixsec \global\let\subsection = \appendixsubsec \global\let\subsubsection = \appendixsubsubsec } % normally unnmhead0 calls unnumberedzzz: \outer\parseargdef\unnumbered{\unnmhead0{#1}} \def\unnumberedzzz#1{% \global\secno=0 \global\subsecno=0 \global\subsubsecno=0 \global\advance\unnumberedno by 1 % % Since an unnumbered has no number, no prefix for figures. \global\let\chaplevelprefix = \empty \resetallfloatnos % % This used to be simply \message{#1}, but TeX fully expands the % argument to \message. Therefore, if #1 contained @-commands, TeX % expanded them. For example, in `@unnumbered The @cite{Book}', TeX % expanded @cite (which turns out to cause errors because \cite is meant % to be executed, not expanded). % % Anyway, we don't want the fully-expanded definition of @cite to appear % as a result of the \message, we just want `@cite' itself. We use % \the to achieve this: TeX expands \the only once, % simply yielding the contents of . (We also do this for % the toc entries.) \toks0 = {#1}% \message{(\the\toks0)}% % \chapmacro{#1}{Ynothing}{\the\unnumberedno}% % \global\let\section = \unnumberedsec \global\let\subsection = \unnumberedsubsec \global\let\subsubsection = \unnumberedsubsubsec } % @centerchap is like @unnumbered, but the heading is centered. \outer\parseargdef\centerchap{% % Well, we could do the following in a group, but that would break % an assumption that \chapmacro is called at the outermost level. % Thus we are safer this way: --kasal, 24feb04 \let\centerparametersmaybe = \centerparameters \unnmhead0{#1}% \let\centerparametersmaybe = \relax } % @top is like @unnumbered. \let\top\unnumbered % Sections. % \outer\parseargdef\numberedsec{\numhead1{#1}} % normally calls seczzz \def\seczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynumbered}{\the\chapno.\the\secno}% } % normally calls appendixsectionzzz: \outer\parseargdef\appendixsection{\apphead1{#1}} \def\appendixsectionzzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Yappendix}{\appendixletter.\the\secno}% } \let\appendixsec\appendixsection % normally calls unnumberedseczzz: \outer\parseargdef\unnumberedsec{\unnmhead1{#1}} \def\unnumberedseczzz#1{% \global\subsecno=0 \global\subsubsecno=0 \global\advance\secno by 1 \sectionheading{#1}{sec}{Ynothing}{\the\unnumberedno.\the\secno}% } % Subsections. % % normally calls numberedsubseczzz: \outer\parseargdef\numberedsubsec{\numhead2{#1}} \def\numberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynumbered}{\the\chapno.\the\secno.\the\subsecno}% } % normally calls appendixsubseczzz: \outer\parseargdef\appendixsubsec{\apphead2{#1}} \def\appendixsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno}% } % normally calls unnumberedsubseczzz: \outer\parseargdef\unnumberedsubsec{\unnmhead2{#1}} \def\unnumberedsubseczzz#1{% \global\subsubsecno=0 \global\advance\subsecno by 1 \sectionheading{#1}{subsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno}% } % Subsubsections. % % normally numberedsubsubseczzz: \outer\parseargdef\numberedsubsubsec{\numhead3{#1}} \def\numberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynumbered}% {\the\chapno.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally appendixsubsubseczzz: \outer\parseargdef\appendixsubsubsec{\apphead3{#1}} \def\appendixsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Yappendix}% {\appendixletter.\the\secno.\the\subsecno.\the\subsubsecno}% } % normally unnumberedsubsubseczzz: \outer\parseargdef\unnumberedsubsubsec{\unnmhead3{#1}} \def\unnumberedsubsubseczzz#1{% \global\advance\subsubsecno by 1 \sectionheading{#1}{subsubsec}{Ynothing}% {\the\unnumberedno.\the\secno.\the\subsecno.\the\subsubsecno}% } % These macros control what the section commands do, according % to what kind of chapter we are in (ordinary, appendix, or unnumbered). % Define them by default for a numbered chapter. \let\section = \numberedsec \let\subsection = \numberedsubsec \let\subsubsection = \numberedsubsubsec % Define @majorheading, @heading and @subheading \def\majorheading{% {\advance\chapheadingskip by 10pt \chapbreak }% \parsearg\chapheadingzzz } \def\chapheading{\chapbreak \parsearg\chapheadingzzz} \def\chapheadingzzz#1{% \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip \nobreak \suppressfirstparagraphindent } % @heading, @subheading, @subsubheading. \parseargdef\heading{\sectionheading{#1}{sec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subheading{\sectionheading{#1}{subsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} \parseargdef\subsubheading{\sectionheading{#1}{subsubsec}{Yomitfromtoc}{} \suppressfirstparagraphindent} % These macros generate a chapter, section, etc. heading only % (including whitespace, linebreaking, etc. around it), % given all the information in convenient, parsed form. % Args are the skip and penalty (usually negative) \def\dobreak#1#2{\par\ifdim\lastskip<#1\removelastskip\penalty#2\vskip#1\fi} % Parameter controlling skip before chapter headings (if needed) \newskip\chapheadingskip % Define plain chapter starts, and page on/off switching for it. \def\chapbreak{\dobreak \chapheadingskip {-4000}} \def\chappager{\par\vfill\supereject} % Because \domark is called before \chapoddpage, the filler page will % get the headings for the next chapter, which is wrong. But we don't % care -- we just disable all headings on the filler page. \def\chapoddpage{% \chappager \ifodd\pageno \else \begingroup \headingsoff \null \chappager \endgroup \fi } \def\setchapternewpage #1 {\csname CHAPPAG#1\endcsname} \def\CHAPPAGoff{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chapbreak \global\let\pagealignmacro=\chappager} \def\CHAPPAGon{% \global\let\contentsalignmacro = \chappager \global\let\pchapsepmacro=\chappager \global\let\pagealignmacro=\chappager \global\def\HEADINGSon{\HEADINGSsingle}} \def\CHAPPAGodd{% \global\let\contentsalignmacro = \chapoddpage \global\let\pchapsepmacro=\chapoddpage \global\let\pagealignmacro=\chapoddpage \global\def\HEADINGSon{\HEADINGSdouble}} \CHAPPAGon % Chapter opening. % % #1 is the text, #2 is the section type (Ynumbered, Ynothing, % Yappendix, Yomitfromtoc), #3 the chapter number. % % To test against our argument. \def\Ynothingkeyword{Ynothing} \def\Yomitfromtockeyword{Yomitfromtoc} \def\Yappendixkeyword{Yappendix} % \def\chapmacro#1#2#3{% % Insert the first mark before the heading break (see notes for \domark). \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \gdef\lastsectiondefs{\gdef\thissectionname{}\gdef\thissectionnum{}% \gdef\thissection{}}% % \def\temptype{#2}% \ifx\temptype\Ynothingkeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{\thischaptername}}% \else\ifx\temptype\Yomitfromtockeyword \gdef\lastchapterdefs{\gdef\thischaptername{#1}\gdef\thischapternum{}% \gdef\thischapter{}}% \else\ifx\temptype\Yappendixkeyword \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\appendixletter}% % \noexpand\putwordAppendix avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordAppendix{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \else \toks0={#1}% \xdef\lastchapterdefs{% \gdef\noexpand\thischaptername{\the\toks0}% \gdef\noexpand\thischapternum{\the\chapno}% % \noexpand\putwordChapter avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thischapter{\noexpand\putwordChapter{} \noexpand\thischapternum: \noexpand\thischaptername}% }% \fi\fi\fi % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert the chapter heading break. \pchapsepmacro % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevchapterdefs=\lastchapterdefs \let\prevsectiondefs=\lastsectiondefs \domark % {% \chapfonts \rmisbold % % Have to define \lastsection before calling \donoderef, because the % xref code eventually uses it. On the other hand, it has to be called % after \pchapsepmacro, or the headline will change too soon. \gdef\lastsection{#1}% % % Only insert the separating space if we have a chapter/appendix % number, and don't print the unnumbered ``number''. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unnchap}% \else\ifx\temptype\Yomitfromtockeyword \setbox0 = \hbox{}% contents like unnumbered, but no toc entry \def\toctype{omit}% \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{\putwordAppendix{} #3\enspace}% \def\toctype{app}% \else \setbox0 = \hbox{#3\enspace}% \def\toctype{numchap}% \fi\fi\fi % % Write the toc entry for this chapter. Must come before the % \donoderef, because we include the current node name in the toc % entry, and \donoderef resets it to empty. \writetocentry{\toctype}{#1}{#3}% % % For pdftex, we have to write out the node definition (aka, make % the pdfdest) after any page break, but before the actual text has % been typeset. If the destination for the pdf outline is after the % text, then jumping from the outline may wind up with the text not % being visible, for instance under high magnification. \donoderef{#2}% % % Typeset the actual heading. \nobreak % Avoid page breaks at the interline glue. \vbox{\raggedtitlesettings \hangindent=\wd0 \centerparametersmaybe \unhbox0 #1\par}% }% \nobreak\bigskip % no page break after a chapter title \nobreak } % @centerchap -- centered and unnumbered. \let\centerparametersmaybe = \relax \def\centerparameters{% \advance\rightskip by 3\rightskip \leftskip = \rightskip \parfillskip = 0pt } % I don't think this chapter style is supported any more, so I'm not % updating it with the new noderef stuff. We'll see. --karl, 11aug03. % \def\setchapterstyle #1 {\csname CHAPF#1\endcsname} % \def\unnchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings #1\par}% \nobreak\bigskip\nobreak } \def\chfopen #1#2{\chapoddpage {\chapfonts \vbox to 3in{\vfil \hbox to\hsize{\hfil #2} \hbox to\hsize{\hfil #1} \vfil}}% \par\penalty 5000 % } \def\centerchfopen #1{% \chapoddpage \vbox{\chapfonts \raggedtitlesettings \hfill #1\hfill}% \nobreak\bigskip \nobreak } \def\CHAPFopen{% \global\let\chapmacro=\chfopen \global\let\centerchapmacro=\centerchfopen} % Section titles. These macros combine the section number parts and % call the generic \sectionheading to do the printing. % \newskip\secheadingskip \def\secheadingbreak{\dobreak \secheadingskip{-1000}} % Subsection titles. \newskip\subsecheadingskip \def\subsecheadingbreak{\dobreak \subsecheadingskip{-500}} % Subsubsection titles. \def\subsubsecheadingskip{\subsecheadingskip} \def\subsubsecheadingbreak{\subsecheadingbreak} % Print any size, any type, section title. % % #1 is the text, #2 is the section level (sec/subsec/subsubsec), #3 is % the section type for xrefs (Ynumbered, Ynothing, Yappendix), #4 is the % section number. % \def\seckeyword{sec} % \def\sectionheading#1#2#3#4{% {% \checkenv{}% should not be in an environment. % % Switch to the right set of fonts. \csname #2fonts\endcsname \rmisbold % \def\sectionlevel{#2}% \def\temptype{#3}% % % Insert first mark before the heading break (see notes for \domark). \let\prevsectiondefs=\lastsectiondefs \ifx\temptype\Ynothingkeyword \ifx\sectionlevel\seckeyword \gdef\lastsectiondefs{\gdef\thissectionname{#1}\gdef\thissectionnum{}% \gdef\thissection{\thissectionname}}% \fi \else\ifx\temptype\Yomitfromtockeyword % Don't redefine \thissection. \else\ifx\temptype\Yappendixkeyword \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \else \ifx\sectionlevel\seckeyword \toks0={#1}% \xdef\lastsectiondefs{% \gdef\noexpand\thissectionname{\the\toks0}% \gdef\noexpand\thissectionnum{#4}% % \noexpand\putwordSection avoids expanding indigestible % commands in some of the translations. \gdef\noexpand\thissection{\noexpand\putwordSection{} \noexpand\thissectionnum: \noexpand\thissectionname}% }% \fi \fi\fi\fi % % Go into vertical mode. Usually we'll already be there, but we % don't want the following whatsit to end up in a preceding paragraph % if the document didn't happen to have a blank line. \par % % Output the mark. Pass it through \safewhatsit, to take care of % the preceding space. \safewhatsit\domark % % Insert space above the heading. \csname #2headingbreak\endcsname % % Now the second mark, after the heading break. No break points % between here and the heading. \let\prevsectiondefs=\lastsectiondefs \domark % % Only insert the space after the number if we have a section number. \ifx\temptype\Ynothingkeyword \setbox0 = \hbox{}% \def\toctype{unn}% \gdef\lastsection{#1}% \else\ifx\temptype\Yomitfromtockeyword % for @headings -- no section number, don't include in toc, % and don't redefine \lastsection. \setbox0 = \hbox{}% \def\toctype{omit}% \let\sectionlevel=\empty \else\ifx\temptype\Yappendixkeyword \setbox0 = \hbox{#4\enspace}% \def\toctype{app}% \gdef\lastsection{#1}% \else \setbox0 = \hbox{#4\enspace}% \def\toctype{num}% \gdef\lastsection{#1}% \fi\fi\fi % % Write the toc entry (before \donoderef). See comments in \chapmacro. \writetocentry{\toctype\sectionlevel}{#1}{#4}% % % Write the node reference (= pdf destination for pdftex). % Again, see comments in \chapmacro. \donoderef{#3}% % % Interline glue will be inserted when the vbox is completed. % That glue will be a valid breakpoint for the page, since it'll be % preceded by a whatsit (usually from the \donoderef, or from the % \writetocentry if there was no node). We don't want to allow that % break, since then the whatsits could end up on page n while the % section is on page n+1, thus toc/etc. are wrong. Debian bug 276000. \nobreak % % Output the actual section heading. \vbox{\hyphenpenalty=10000 \tolerance=5000 \parindent=0pt \ptexraggedright \hangindent=\wd0 % zero if no section number \unhbox0 #1}% }% % Add extra space after the heading -- half of whatever came above it. % Don't allow stretch, though. \kern .5 \csname #2headingskip\endcsname % % Do not let the kern be a potential breakpoint, as it would be if it % was followed by glue. \nobreak % % We'll almost certainly start a paragraph next, so don't let that % glue accumulate. (Not a breakpoint because it's preceded by a % discardable item.) However, when a paragraph is not started next % (\startdefun, \cartouche, \center, etc.), this needs to be wiped out % or the negative glue will cause weirdly wrong output, typically % obscuring the section heading with something else. \vskip-\parskip % % This is so the last item on the main vertical list is a known % \penalty > 10000, so \startdefun, etc., can recognize the situation % and do the needful. \penalty 10001 } \message{toc,} % Table of contents. \newwrite\tocfile % Write an entry to the toc file, opening it if necessary. % Called from @chapter, etc. % % Example usage: \writetocentry{sec}{Section Name}{\the\chapno.\the\secno} % We append the current node name (if any) and page number as additional % arguments for the \{chap,sec,...}entry macros which will eventually % read this. The node name is used in the pdf outlines as the % destination to jump to. % % We open the .toc file for writing here instead of at @setfilename (or % any other fixed time) so that @contents can be anywhere in the document. % But if #1 is `omit', then we don't do anything. This is used for the % table of contents chapter openings themselves. % \newif\iftocfileopened \def\omitkeyword{omit}% % \def\writetocentry#1#2#3{% \edef\writetoctype{#1}% \ifx\writetoctype\omitkeyword \else \iftocfileopened\else \immediate\openout\tocfile = \jobname.toc \global\tocfileopenedtrue \fi % \iflinks {\atdummies \edef\temp{% \write\tocfile{@#1entry{#2}{#3}{\lastnode}{\noexpand\folio}}}% \temp }% \fi \fi % % Tell \shipout to create a pdf destination on each page, if we're % writing pdf. These are used in the table of contents. We can't % just write one on every page because the title pages are numbered % 1 and 2 (the page numbers aren't printed), and so are the first % two pages of the document. Thus, we'd have two destinations named % `1', and two named `2'. \ifpdf \global\pdfmakepagedesttrue \fi } % These characters do not print properly in the Computer Modern roman % fonts, so we must take special care. This is more or less redundant % with the Texinfo input format setup at the end of this file. % \def\activecatcodes{% \catcode`\"=\active \catcode`\$=\active \catcode`\<=\active \catcode`\>=\active \catcode`\\=\active \catcode`\^=\active \catcode`\_=\active \catcode`\|=\active \catcode`\~=\active } % Read the toc file, which is essentially Texinfo input. \def\readtocfile{% \setupdatafile \activecatcodes \input \tocreadfilename } \newskip\contentsrightmargin \contentsrightmargin=1in \newcount\savepageno \newcount\lastnegativepageno \lastnegativepageno = -1 % Prepare to read what we've written to \tocfile. % \def\startcontents#1{% % If @setchapternewpage on, and @headings double, the contents should % start on an odd page, unlike chapters. Thus, we maintain % \contentsalignmacro in parallel with \pagealignmacro. % From: Torbjorn Granlund \contentsalignmacro \immediate\closeout\tocfile % % Don't need to put `Contents' or `Short Contents' in the headline. % It is abundantly clear what they are. \chapmacro{#1}{Yomitfromtoc}{}% % \savepageno = \pageno \begingroup % Set up to handle contents files properly. \raggedbottom % Worry more about breakpoints than the bottom. \advance\hsize by -\contentsrightmargin % Don't use the full line length. % % Roman numerals for page numbers. \ifnum \pageno>0 \global\pageno = \lastnegativepageno \fi } % redefined for the two-volume lispref. We always output on % \jobname.toc even if this is redefined. % \def\tocreadfilename{\jobname.toc} % Normal (long) toc. % \def\contents{% \startcontents{\putwordTOC}% \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \ifeof 1 \else \pdfmakeoutlines \fi \closein 1 \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } % And just the chapters. \def\summarycontents{% \startcontents{\putwordShortTOC}% % \let\partentry = \shortpartentry \let\numchapentry = \shortchapentry \let\appentry = \shortchapentry \let\unnchapentry = \shortunnchapentry % We want a true roman here for the page numbers. \secfonts \let\rm=\shortcontrm \let\bf=\shortcontbf \let\sl=\shortcontsl \let\tt=\shortconttt \rm \hyphenpenalty = 10000 \advance\baselineskip by 1pt % Open it up a little. \def\numsecentry##1##2##3##4{} \let\appsecentry = \numsecentry \let\unnsecentry = \numsecentry \let\numsubsecentry = \numsecentry \let\appsubsecentry = \numsecentry \let\unnsubsecentry = \numsecentry \let\numsubsubsecentry = \numsecentry \let\appsubsubsecentry = \numsecentry \let\unnsubsubsecentry = \numsecentry \openin 1 \tocreadfilename\space \ifeof 1 \else \readtocfile \fi \closein 1 \vfill \eject \contentsalignmacro % in case @setchapternewpage odd is in effect \endgroup \lastnegativepageno = \pageno \global\pageno = \savepageno } \let\shortcontents = \summarycontents % Typeset the label for a chapter or appendix for the short contents. % The arg is, e.g., `A' for an appendix, or `3' for a chapter. % \def\shortchaplabel#1{% % This space should be enough, since a single number is .5em, and the % widest letter (M) is 1em, at least in the Computer Modern fonts. % But use \hss just in case. % (This space doesn't include the extra space that gets added after % the label; that gets put in by \shortchapentry above.) % % We'd like to right-justify chapter numbers, but that looks strange % with appendix letters. And right-justifying numbers and % left-justifying letters looks strange when there is less than 10 % chapters. Have to read the whole toc once to know how many chapters % there are before deciding ... \hbox to 1em{#1\hss}% } % These macros generate individual entries in the table of contents. % The first argument is the chapter or section name. % The last argument is the page number. % The arguments in between are the chapter number, section number, ... % Parts, in the main contents. Replace the part number, which doesn't % exist, with an empty box. Let's hope all the numbers have the same width. % Also ignore the page number, which is conventionally not printed. \def\numeralbox{\setbox0=\hbox{8}\hbox to \wd0{\hfil}} \def\partentry#1#2#3#4{\dochapentry{\numeralbox\labelspace#1}{}} % % Parts, in the short toc. \def\shortpartentry#1#2#3#4{% \penalty-300 \vskip.5\baselineskip plus.15\baselineskip minus.1\baselineskip \shortchapentry{{\bf #1}}{\numeralbox}{}{}% } % Chapters, in the main contents. \def\numchapentry#1#2#3#4{\dochapentry{#2\labelspace#1}{#4}} % % Chapters, in the short toc. % See comments in \dochapentry re vbox and related settings. \def\shortchapentry#1#2#3#4{% \tocentry{\shortchaplabel{#2}\labelspace #1}{\doshortpageno\bgroup#4\egroup}% } % Appendices, in the main contents. % Need the word Appendix, and a fixed-size box. % \def\appendixbox#1{% % We use M since it's probably the widest letter. \setbox0 = \hbox{\putwordAppendix{} M}% \hbox to \wd0{\putwordAppendix{} #1\hss}} % \def\appentry#1#2#3#4{\dochapentry{\appendixbox{#2}\labelspace#1}{#4}} % Unnumbered chapters. \def\unnchapentry#1#2#3#4{\dochapentry{#1}{#4}} \def\shortunnchapentry#1#2#3#4{\tocentry{#1}{\doshortpageno\bgroup#4\egroup}} % Sections. \def\numsecentry#1#2#3#4{\dosecentry{#2\labelspace#1}{#4}} \let\appsecentry=\numsecentry \def\unnsecentry#1#2#3#4{\dosecentry{#1}{#4}} % Subsections. \def\numsubsecentry#1#2#3#4{\dosubsecentry{#2\labelspace#1}{#4}} \let\appsubsecentry=\numsubsecentry \def\unnsubsecentry#1#2#3#4{\dosubsecentry{#1}{#4}} % And subsubsections. \def\numsubsubsecentry#1#2#3#4{\dosubsubsecentry{#2\labelspace#1}{#4}} \let\appsubsubsecentry=\numsubsubsecentry \def\unnsubsubsecentry#1#2#3#4{\dosubsubsecentry{#1}{#4}} % This parameter controls the indentation of the various levels. % Same as \defaultparindent. \newdimen\tocindent \tocindent = 15pt % Now for the actual typesetting. In all these, #1 is the text and #2 is the % page number. % % If the toc has to be broken over pages, we want it to be at chapters % if at all possible; hence the \penalty. \def\dochapentry#1#2{% \penalty-300 \vskip1\baselineskip plus.33\baselineskip minus.25\baselineskip \begingroup \chapentryfonts \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup \nobreak\vskip .25\baselineskip plus.1\baselineskip } \def\dosecentry#1#2{\begingroup \secentryfonts \leftskip=\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsecentry#1#2{\begingroup \subsecentryfonts \leftskip=2\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} \def\dosubsubsecentry#1#2{\begingroup \subsubsecentryfonts \leftskip=3\tocindent \tocentry{#1}{\dopageno\bgroup#2\egroup}% \endgroup} % We use the same \entry macro as for the index entries. \let\tocentry = \entry % Space between chapter (or whatever) number and the title. \def\labelspace{\hskip1em \relax} \def\dopageno#1{{\rm #1}} \def\doshortpageno#1{{\rm #1}} \def\chapentryfonts{\secfonts \rm} \def\secentryfonts{\textfonts} \def\subsecentryfonts{\textfonts} \def\subsubsecentryfonts{\textfonts} \message{environments,} % @foo ... @end foo. % @tex ... @end tex escapes into raw TeX temporarily. % One exception: @ is still an escape character, so that @end tex works. % But \@ or @@ will get a plain @ character. \envdef\tex{% \setupmarkupstyle{tex}% \catcode `\\=0 \catcode `\{=1 \catcode `\}=2 \catcode `\$=3 \catcode `\&=4 \catcode `\#=6 \catcode `\^=7 \catcode `\_=8 \catcode `\~=\active \let~=\tie \catcode `\%=14 \catcode `\+=\other \catcode `\"=\other \catcode `\|=\other \catcode `\<=\other \catcode `\>=\other \catcode`\`=\other \catcode`\'=\other \escapechar=`\\ % % ' is active in math mode (mathcode"8000). So reset it, and all our % other math active characters (just in case), to plain's definitions. \mathactive % \let\b=\ptexb \let\bullet=\ptexbullet \let\c=\ptexc \let\,=\ptexcomma \let\.=\ptexdot \let\dots=\ptexdots \let\equiv=\ptexequiv \let\!=\ptexexclam \let\i=\ptexi \let\indent=\ptexindent \let\noindent=\ptexnoindent \let\{=\ptexlbrace \let\+=\tabalign \let\}=\ptexrbrace \let\/=\ptexslash \let\*=\ptexstar \let\t=\ptext \expandafter \let\csname top\endcsname=\ptextop % outer \let\frenchspacing=\plainfrenchspacing % \def\endldots{\mathinner{\ldots\ldots\ldots\ldots}}% \def\enddots{\relax\ifmmode\endldots\else$\mathsurround=0pt \endldots\,$\fi}% \def\@{@}% } % There is no need to define \Etex. % Define @lisp ... @end lisp. % @lisp environment forms a group so it can rebind things, % including the definition of @end lisp (which normally is erroneous). % Amount to narrow the margins by for @lisp. \newskip\lispnarrowing \lispnarrowing=0.4in % This is the definition that ^^M gets inside @lisp, @example, and other % such environments. \null is better than a space, since it doesn't % have any width. \def\lisppar{\null\endgraf} % This space is always present above and below environments. \newskip\envskipamount \envskipamount = 0pt % Make spacing and below environment symmetrical. We use \parskip here % to help in doing that, since in @example-like environments \parskip % is reset to zero; thus the \afterenvbreak inserts no space -- but the % start of the next paragraph will insert \parskip. % \def\aboveenvbreak{{% % =10000 instead of <10000 because of a special case in \itemzzz and % \sectionheading, q.v. \ifnum \lastpenalty=10000 \else \advance\envskipamount by \parskip \endgraf \ifdim\lastskip<\envskipamount \removelastskip % it's not a good place to break if the last penalty was \nobreak % or better ... \ifnum\lastpenalty<10000 \penalty-50 \fi \vskip\envskipamount \fi \fi }} \let\afterenvbreak = \aboveenvbreak % \nonarrowing is a flag. If "set", @lisp etc don't narrow margins; it will % also clear it, so that its embedded environments do the narrowing again. \let\nonarrowing=\relax % @cartouche ... @end cartouche: draw rectangle w/rounded corners around % environment contents. \font\circle=lcircle10 \newdimen\circthick \newdimen\cartouter\newdimen\cartinner \newskip\normbskip\newskip\normpskip\newskip\normlskip \circthick=\fontdimen8\circle % \def\ctl{{\circle\char'013\hskip -6pt}}% 6pt from pl file: 1/2charwidth \def\ctr{{\hskip 6pt\circle\char'010}} \def\cbl{{\circle\char'012\hskip -6pt}} \def\cbr{{\hskip 6pt\circle\char'011}} \def\carttop{\hbox to \cartouter{\hskip\lskip \ctl\leaders\hrule height\circthick\hfil\ctr \hskip\rskip}} \def\cartbot{\hbox to \cartouter{\hskip\lskip \cbl\leaders\hrule height\circthick\hfil\cbr \hskip\rskip}} % \newskip\lskip\newskip\rskip \envdef\cartouche{% \ifhmode\par\fi % can't be in the midst of a paragraph. \startsavinginserts \lskip=\leftskip \rskip=\rightskip \leftskip=0pt\rightskip=0pt % we want these *outside*. \cartinner=\hsize \advance\cartinner by-\lskip \advance\cartinner by-\rskip \cartouter=\hsize \advance\cartouter by 18.4pt % allow for 3pt kerns on either % side, and for 6pt waste from % each corner char, and rule thickness \normbskip=\baselineskip \normpskip=\parskip \normlskip=\lineskip % Flag to tell @lisp, etc., not to narrow margin. \let\nonarrowing = t% % % If this cartouche directly follows a sectioning command, we need the % \parskip glue (backspaced over by default) or the cartouche can % collide with the section heading. \ifnum\lastpenalty>10000 \vskip\parskip \penalty\lastpenalty \fi % \vbox\bgroup \baselineskip=0pt\parskip=0pt\lineskip=0pt \carttop \hbox\bgroup \hskip\lskip \vrule\kern3pt \vbox\bgroup \kern3pt \hsize=\cartinner \baselineskip=\normbskip \lineskip=\normlskip \parskip=\normpskip \vskip -\parskip \comment % For explanation, see the end of def\group. } \def\Ecartouche{% \ifhmode\par\fi \kern3pt \egroup \kern3pt\vrule \hskip\rskip \egroup \cartbot \egroup \checkinserts } % This macro is called at the beginning of all the @example variants, % inside a group. \newdimen\nonfillparindent \def\nonfillstart{% \aboveenvbreak \hfuzz = 12pt % Don't be fussy \sepspaces % Make spaces be word-separators rather than space tokens. \let\par = \lisppar % don't ignore blank lines \obeylines % each line of input is a line of output \parskip = 0pt % Turn off paragraph indentation but redefine \indent to emulate % the normal \indent. \nonfillparindent=\parindent \parindent = 0pt \let\indent\nonfillindent % \emergencystretch = 0pt % don't try to avoid overfull boxes \ifx\nonarrowing\relax \advance \leftskip by \lispnarrowing \exdentamount=\lispnarrowing \else \let\nonarrowing = \relax \fi \let\exdent=\nofillexdent } \begingroup \obeyspaces % We want to swallow spaces (but not other tokens) after the fake % @indent in our nonfill-environments, where spaces are normally % active and set to @tie, resulting in them not being ignored after % @indent. \gdef\nonfillindent{\futurelet\temp\nonfillindentcheck}% \gdef\nonfillindentcheck{% \ifx\temp % \expandafter\nonfillindentgobble% \else% \leavevmode\nonfillindentbox% \fi% }% \endgroup \def\nonfillindentgobble#1{\nonfillindent} \def\nonfillindentbox{\hbox to \nonfillparindent{\hss}} % If you want all examples etc. small: @set dispenvsize small. % If you want even small examples the full size: @set dispenvsize nosmall. % This affects the following displayed environments: % @example, @display, @format, @lisp % \def\smallword{small} \def\nosmallword{nosmall} \let\SETdispenvsize\relax \def\setnormaldispenv{% \ifx\SETdispenvsize\smallword % end paragraph for sake of leading, in case document has no blank % line. This is redundant with what happens in \aboveenvbreak, but % we need to do it before changing the fonts, and it's inconvenient % to change the fonts afterward. \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } \def\setsmalldispenv{% \ifx\SETdispenvsize\nosmallword \else \ifnum \lastpenalty=10000 \else \endgraf \fi \smallexamplefonts \rm \fi } % We often define two environments, @foo and @smallfoo. % Let's do it in one command. #1 is the env name, #2 the definition. \def\makedispenvdef#1#2{% \expandafter\envdef\csname#1\endcsname {\setnormaldispenv #2}% \expandafter\envdef\csname small#1\endcsname {\setsmalldispenv #2}% \expandafter\let\csname E#1\endcsname \afterenvbreak \expandafter\let\csname Esmall#1\endcsname \afterenvbreak } % Define two environment synonyms (#1 and #2) for an environment. \def\maketwodispenvdef#1#2#3{% \makedispenvdef{#1}{#3}% \makedispenvdef{#2}{#3}% } % % @lisp: indented, narrowed, typewriter font; % @example: same as @lisp. % % @smallexample and @smalllisp: use smaller fonts. % Originally contributed by Pavel@xerox. % \maketwodispenvdef{lisp}{example}{% \nonfillstart \tt\setupmarkupstyle{example}% \let\kbdfont = \kbdexamplefont % Allow @kbd to do something special. \gobble % eat return } % @display/@smalldisplay: same as @lisp except keep current font. % \makedispenvdef{display}{% \nonfillstart \gobble } % @format/@smallformat: same as @display except don't narrow margins. % \makedispenvdef{format}{% \let\nonarrowing = t% \nonfillstart \gobble } % @flushleft: same as @format, but doesn't obey \SETdispenvsize. \envdef\flushleft{% \let\nonarrowing = t% \nonfillstart \gobble } \let\Eflushleft = \afterenvbreak % @flushright. % \envdef\flushright{% \let\nonarrowing = t% \nonfillstart \advance\leftskip by 0pt plus 1fill\relax \gobble } \let\Eflushright = \afterenvbreak % @raggedright does more-or-less normal line breaking but no right % justification. From plain.tex. \envdef\raggedright{% \rightskip0pt plus2em \spaceskip.3333em \xspaceskip.5em\relax } \let\Eraggedright\par \envdef\raggedleft{% \parindent=0pt \leftskip0pt plus2em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedleft\par \envdef\raggedcenter{% \parindent=0pt \rightskip0pt plus1em \leftskip0pt plus1em \spaceskip.3333em \xspaceskip.5em \parfillskip=0pt \hbadness=10000 % Last line will usually be underfull, so turn off % badness reporting. } \let\Eraggedcenter\par % @quotation does normal linebreaking (hence we can't use \nonfillstart) % and narrows the margins. We keep \parskip nonzero in general, since % we're doing normal filling. So, when using \aboveenvbreak and % \afterenvbreak, temporarily make \parskip 0. % \makedispenvdef{quotation}{\quotationstart} % \def\quotationstart{% \indentedblockstart % same as \indentedblock, but increase right margin too. \ifx\nonarrowing\relax \advance\rightskip by \lispnarrowing \fi \parsearg\quotationlabel } % We have retained a nonzero parskip for the environment, since we're % doing normal filling. % \def\Equotation{% \par \ifx\quotationauthor\thisisundefined\else % indent a bit. \leftline{\kern 2\leftskip \sl ---\quotationauthor}% \fi {\parskip=0pt \afterenvbreak}% } \def\Esmallquotation{\Equotation} % If we're given an argument, typeset it in bold with a colon after. \def\quotationlabel#1{% \def\temp{#1}% \ifx\temp\empty \else {\bf #1: }% \fi } % @indentedblock is like @quotation, but indents only on the left and % has no optional argument. % \makedispenvdef{indentedblock}{\indentedblockstart} % \def\indentedblockstart{% {\parskip=0pt \aboveenvbreak}% because \aboveenvbreak inserts \parskip \parindent=0pt % % @cartouche defines \nonarrowing to inhibit narrowing at next level down. \ifx\nonarrowing\relax \advance\leftskip by \lispnarrowing \exdentamount = \lispnarrowing \else \let\nonarrowing = \relax \fi } % Keep a nonzero parskip for the environment, since we're doing normal filling. % \def\Eindentedblock{% \par {\parskip=0pt \afterenvbreak}% } \def\Esmallindentedblock{\Eindentedblock} % LaTeX-like @verbatim...@end verbatim and @verb{...} % If we want to allow any as delimiter, % we need the curly braces so that makeinfo sees the @verb command, eg: % `@verbx...x' would look like the '@verbx' command. --janneke@gnu.org % % [Knuth]: Donald Ervin Knuth, 1996. The TeXbook. % % [Knuth] p.344; only we need to do the other characters Texinfo sets % active too. Otherwise, they get lost as the first character on a % verbatim line. \def\dospecials{% \do\ \do\\\do\{\do\}\do\$\do\&% \do\#\do\^\do\^^K\do\_\do\^^A\do\%\do\~% \do\<\do\>\do\|\do\@\do+\do\"% % Don't do the quotes -- if we do, @set txicodequoteundirected and % @set txicodequotebacktick will not have effect on @verb and % @verbatim, and ?` and !` ligatures won't get disabled. %\do\`\do\'% } % % [Knuth] p. 380 \def\uncatcodespecials{% \def\do##1{\catcode`##1=\other}\dospecials} % % Setup for the @verb command. % % Eight spaces for a tab \begingroup \catcode`\^^I=\active \gdef\tabeightspaces{\catcode`\^^I=\active\def^^I{\ \ \ \ \ \ \ \ }} \endgroup % \def\setupverb{% \tt % easiest (and conventionally used) font for verbatim \def\par{\leavevmode\endgraf}% \setupmarkupstyle{verb}% \tabeightspaces % Respect line breaks, % print special symbols as themselves, and % make each space count % must do in this order: \obeylines \uncatcodespecials \sepspaces } % Setup for the @verbatim environment % % Real tab expansion. \newdimen\tabw \setbox0=\hbox{\tt\space} \tabw=8\wd0 % tab amount % % We typeset each line of the verbatim in an \hbox, so we can handle % tabs. The \global is in case the verbatim line starts with an accent, % or some other command that starts with a begin-group. Otherwise, the % entire \verbbox would disappear at the corresponding end-group, before % it is typeset. Meanwhile, we can't have nested verbatim commands % (can we?), so the \global won't be overwriting itself. \newbox\verbbox \def\starttabbox{\global\setbox\verbbox=\hbox\bgroup} % \begingroup \catcode`\^^I=\active \gdef\tabexpand{% \catcode`\^^I=\active \def^^I{\leavevmode\egroup \dimen\verbbox=\wd\verbbox % the width so far, or since the previous tab \divide\dimen\verbbox by\tabw \multiply\dimen\verbbox by\tabw % compute previous multiple of \tabw \advance\dimen\verbbox by\tabw % advance to next multiple of \tabw \wd\verbbox=\dimen\verbbox \box\verbbox \starttabbox }% } \endgroup % start the verbatim environment. \def\setupverbatim{% \let\nonarrowing = t% \nonfillstart \tt % easiest (and conventionally used) font for verbatim % The \leavevmode here is for blank lines. Otherwise, we would % never \starttabox and the \egroup would end verbatim mode. \def\par{\leavevmode\egroup\box\verbbox\endgraf}% \tabexpand \setupmarkupstyle{verbatim}% % Respect line breaks, % print special symbols as themselves, and % make each space count. % Must do in this order: \obeylines \uncatcodespecials \sepspaces \everypar{\starttabbox}% } % Do the @verb magic: verbatim text is quoted by unique % delimiter characters. Before first delimiter expect a % right brace, after last delimiter expect closing brace: % % \def\doverb'{'#1'}'{#1} % % [Knuth] p. 382; only eat outer {} \begingroup \catcode`[=1\catcode`]=2\catcode`\{=\other\catcode`\}=\other \gdef\doverb{#1[\def\next##1#1}[##1\endgroup]\next] \endgroup % \def\verb{\begingroup\setupverb\doverb} % % % Do the @verbatim magic: define the macro \doverbatim so that % the (first) argument ends when '@end verbatim' is reached, ie: % % \def\doverbatim#1@end verbatim{#1} % % For Texinfo it's a lot easier than for LaTeX, % because texinfo's \verbatim doesn't stop at '\end{verbatim}': % we need not redefine '\', '{' and '}'. % % Inspired by LaTeX's verbatim command set [latex.ltx] % \begingroup \catcode`\ =\active \obeylines % % ignore everything up to the first ^^M, that's the newline at the end % of the @verbatim input line itself. Otherwise we get an extra blank % line in the output. \xdef\doverbatim#1^^M#2@end verbatim{#2\noexpand\end\gobble verbatim}% % We really want {...\end verbatim} in the body of the macro, but % without the active space; thus we have to use \xdef and \gobble. \endgroup % \envdef\verbatim{% \setupverbatim\doverbatim } \let\Everbatim = \afterenvbreak % @verbatiminclude FILE - insert text of file in verbatim environment. % \def\verbatiminclude{\parseargusing\filenamecatcodes\doverbatiminclude} % \def\doverbatiminclude#1{% {% \makevalueexpandable \setupverbatim \indexnofonts % Allow `@@' and other weird things in file names. \wlog{texinfo.tex: doing @verbatiminclude of #1^^J}% \input #1 \afterenvbreak }% } % @copying ... @end copying. % Save the text away for @insertcopying later. % % We save the uninterpreted tokens, rather than creating a box. % Saving the text in a box would be much easier, but then all the % typesetting commands (@smallbook, font changes, etc.) have to be done % beforehand -- and a) we want @copying to be done first in the source % file; b) letting users define the frontmatter in as flexible order as % possible is very desirable. % \def\copying{\checkenv{}\begingroup\scanargctxt\docopying} \def\docopying#1@end copying{\endgroup\def\copyingtext{#1}} % \def\insertcopying{% \begingroup \parindent = 0pt % paragraph indentation looks wrong on title page \scanexp\copyingtext \endgroup } \message{defuns,} % @defun etc. \newskip\defbodyindent \defbodyindent=.4in \newskip\defargsindent \defargsindent=50pt \newskip\deflastargmargin \deflastargmargin=18pt \newcount\defunpenalty % Start the processing of @deffn: \def\startdefun{% \ifnum\lastpenalty<10000 \medbreak \defunpenalty=10003 % Will keep this @deffn together with the % following @def command, see below. \else % If there are two @def commands in a row, we'll have a \nobreak, % which is there to keep the function description together with its % header. But if there's nothing but headers, we need to allow a % break somewhere. Check specifically for penalty 10002, inserted % by \printdefunline, instead of 10000, since the sectioning % commands also insert a nobreak penalty, and we don't want to allow % a break between a section heading and a defun. % % As a further refinement, we avoid "club" headers by signalling % with penalty of 10003 after the very first @deffn in the % sequence (see above), and penalty of 10002 after any following % @def command. \ifnum\lastpenalty=10002 \penalty2000 \else \defunpenalty=10002 \fi % % Similarly, after a section heading, do not allow a break. % But do insert the glue. \medskip % preceded by discardable penalty, so not a breakpoint \fi % \parindent=0in \advance\leftskip by \defbodyindent \exdentamount=\defbodyindent } \def\dodefunx#1{% % First, check whether we are in the right environment: \checkenv#1% % % As above, allow line break if we have multiple x headers in a row. % It's not a great place, though. \ifnum\lastpenalty=10002 \penalty3000 \else \defunpenalty=10002 \fi % % And now, it's time to reuse the body of the original defun: \expandafter\gobbledefun#1% } \def\gobbledefun#1\startdefun{} % \printdefunline \deffnheader{text} % \def\printdefunline#1#2{% \begingroup % call \deffnheader: #1#2 \endheader % common ending: \interlinepenalty = 10000 \advance\rightskip by 0pt plus 1fil\relax \endgraf \nobreak\vskip -\parskip \penalty\defunpenalty % signal to \startdefun and \dodefunx % Some of the @defun-type tags do not enable magic parentheses, % rendering the following check redundant. But we don't optimize. \checkparencounts \endgroup } \def\Edefun{\endgraf\medbreak} % \makedefun{deffn} creates \deffn, \deffnx and \Edeffn; % the only thing remaining is to define \deffnheader. % \def\makedefun#1{% \expandafter\let\csname E#1\endcsname = \Edefun \edef\temp{\noexpand\domakedefun \makecsname{#1}\makecsname{#1x}\makecsname{#1header}}% \temp } % \domakedefun \deffn \deffnx \deffnheader % % Define \deffn and \deffnx, without parameters. % \deffnheader has to be defined explicitly. % \def\domakedefun#1#2#3{% \envdef#1{% \startdefun \doingtypefnfalse % distinguish typed functions from all else \parseargusing\activeparens{\printdefunline#3}% }% \def#2{\dodefunx#1}% \def#3% } \newif\ifdoingtypefn % doing typed function? \newif\ifrettypeownline % typeset return type on its own line? % @deftypefnnewline on|off says whether the return type of typed functions % are printed on their own line. This affects @deftypefn, @deftypefun, % @deftypeop, and @deftypemethod. % \parseargdef\deftypefnnewline{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETtxideftypefnnl\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETtxideftypefnnl\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @txideftypefnnl value `\temp', must be on|off}% \fi\fi } % Untyped functions: % @deffn category name args \makedefun{deffn}{\deffngeneral{}} % @deffn category class name args \makedefun{defop}#1 {\defopon{#1\ \putwordon}} % \defopon {category on}class name args \def\defopon#1#2 {\deffngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deffngeneral {subind}category name args % \def\deffngeneral#1#2 #3 #4\endheader{% % Remember that \dosubind{fn}{foo}{} is equivalent to \doind{fn}{foo}. \dosubind{fn}{\code{#3}}{#1}% \defname{#2}{}{#3}\magicamp\defunargs{#4\unskip}% } % Typed functions: % @deftypefn category type name args \makedefun{deftypefn}{\deftypefngeneral{}} % @deftypeop category class type name args \makedefun{deftypeop}#1 {\deftypeopon{#1\ \putwordon}} % \deftypeopon {category on}class type name args \def\deftypeopon#1#2 {\deftypefngeneral{\putwordon\ \code{#2}}{#1\ \code{#2}} } % \deftypefngeneral {subind}category type name args % \def\deftypefngeneral#1#2 #3 #4 #5\endheader{% \dosubind{fn}{\code{#4}}{#1}% \doingtypefntrue \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Typed variables: % @deftypevr category type var args \makedefun{deftypevr}{\deftypecvgeneral{}} % @deftypecv category class type var args \makedefun{deftypecv}#1 {\deftypecvof{#1\ \putwordof}} % \deftypecvof {category of}class type var args \def\deftypecvof#1#2 {\deftypecvgeneral{\putwordof\ \code{#2}}{#1\ \code{#2}} } % \deftypecvgeneral {subind}category type var args % \def\deftypecvgeneral#1#2 #3 #4 #5\endheader{% \dosubind{vr}{\code{#4}}{#1}% \defname{#2}{#3}{#4}\defunargs{#5\unskip}% } % Untyped variables: % @defvr category var args \makedefun{defvr}#1 {\deftypevrheader{#1} {} } % @defcv category class var args \makedefun{defcv}#1 {\defcvof{#1\ \putwordof}} % \defcvof {category of}class var args \def\defcvof#1#2 {\deftypecvof{#1}#2 {} } % Types: % @deftp category name args \makedefun{deftp}#1 #2 #3\endheader{% \doind{tp}{\code{#2}}% \defname{#1}{}{#2}\defunargs{#3\unskip}% } % Remaining @defun-like shortcuts: \makedefun{defun}{\deffnheader{\putwordDeffunc} } \makedefun{defmac}{\deffnheader{\putwordDefmac} } \makedefun{defspec}{\deffnheader{\putwordDefspec} } \makedefun{deftypefun}{\deftypefnheader{\putwordDeffunc} } \makedefun{defvar}{\defvrheader{\putwordDefvar} } \makedefun{defopt}{\defvrheader{\putwordDefopt} } \makedefun{deftypevar}{\deftypevrheader{\putwordDefvar} } \makedefun{defmethod}{\defopon\putwordMethodon} \makedefun{deftypemethod}{\deftypeopon\putwordMethodon} \makedefun{defivar}{\defcvof\putwordInstanceVariableof} \makedefun{deftypeivar}{\deftypecvof\putwordInstanceVariableof} % \defname, which formats the name of the @def (not the args). % #1 is the category, such as "Function". % #2 is the return type, if any. % #3 is the function name. % % We are followed by (but not passed) the arguments, if any. % \def\defname#1#2#3{% \par % Get the values of \leftskip and \rightskip as they were outside the @def... \advance\leftskip by -\defbodyindent % % Determine if we are typesetting the return type of a typed function % on a line by itself. \rettypeownlinefalse \ifdoingtypefn % doing a typed function specifically? % then check user option for putting return type on its own line: \expandafter\ifx\csname SETtxideftypefnnl\endcsname\relax \else \rettypeownlinetrue \fi \fi % % How we'll format the category name. Putting it in brackets helps % distinguish it from the body text that may end up on the next line % just below it. \def\temp{#1}% \setbox0=\hbox{\kern\deflastargmargin \ifx\temp\empty\else [\rm\temp]\fi} % % Figure out line sizes for the paragraph shape. We'll always have at % least two. \tempnum = 2 % % The first line needs space for \box0; but if \rightskip is nonzero, % we need only space for the part of \box0 which exceeds it: \dimen0=\hsize \advance\dimen0 by -\wd0 \advance\dimen0 by \rightskip % % If doing a return type on its own line, we'll have another line. \ifrettypeownline \advance\tempnum by 1 \def\maybeshapeline{0in \hsize}% \else \def\maybeshapeline{}% \fi % % The continuations: \dimen2=\hsize \advance\dimen2 by -\defargsindent % % The final paragraph shape: \parshape \tempnum 0in \dimen0 \maybeshapeline \defargsindent \dimen2 % % Put the category name at the right margin. \noindent \hbox to 0pt{% \hfil\box0 \kern-\hsize % \hsize has to be shortened this way: \kern\leftskip % Intentionally do not respect \rightskip, since we need the space. }% % % Allow all lines to be underfull without complaint: \tolerance=10000 \hbadness=10000 \exdentamount=\defbodyindent {% % defun fonts. We use typewriter by default (used to be bold) because: % . we're printing identifiers, they should be in tt in principle. % . in languages with many accents, such as Czech or French, it's % common to leave accents off identifiers. The result looks ok in % tt, but exceedingly strange in rm. % . we don't want -- and --- to be treated as ligatures. % . this still does not fix the ?` and !` ligatures, but so far no % one has made identifiers using them :). \df \tt \def\temp{#2}% text of the return type \ifx\temp\empty\else \tclose{\temp}% typeset the return type \ifrettypeownline % put return type on its own line; prohibit line break following: \hfil\vadjust{\nobreak}\break \else \space % type on same line, so just followed by a space \fi \fi % no return type #3% output function name }% {\rm\enskip}% hskip 0.5 em of \tenrm % \boldbrax % arguments will be output next, if any. } % Print arguments in slanted roman (not ttsl), inconsistently with using % tt for the name. This is because literal text is sometimes needed in % the argument list (groff manual), and ttsl and tt are not very % distinguishable. Prevent hyphenation at `-' chars. % \def\defunargs#1{% % use sl by default (not ttsl), % tt for the names. \df \sl \hyphenchar\font=0 % % On the other hand, if an argument has two dashes (for instance), we % want a way to get ttsl. We used to recommend @var for that, so % leave the code in, but it's strange for @var to lead to typewriter. % Nowadays we recommend @code, since the difference between a ttsl hyphen % and a tt hyphen is pretty tiny. @code also disables ?` !`. \def\var##1{{\setupmarkupstyle{var}\ttslanted{##1}}}% #1% \sl\hyphenchar\font=45 } % We want ()&[] to print specially on the defun line. % \def\activeparens{% \catcode`\(=\active \catcode`\)=\active \catcode`\[=\active \catcode`\]=\active \catcode`\&=\active } % Make control sequences which act like normal parenthesis chars. \let\lparen = ( \let\rparen = ) % Be sure that we always have a definition for `(', etc. For example, % if the fn name has parens in it, \boldbrax will not be in effect yet, % so TeX would otherwise complain about undefined control sequence. { \activeparens \global\let(=\lparen \global\let)=\rparen \global\let[=\lbrack \global\let]=\rbrack \global\let& = \& \gdef\boldbrax{\let(=\opnr\let)=\clnr\let[=\lbrb\let]=\rbrb} \gdef\magicamp{\let&=\amprm} } \newcount\parencount % If we encounter &foo, then turn on ()-hacking afterwards \newif\ifampseen \def\amprm#1 {\ampseentrue{\bf\ }} \def\parenfont{% \ifampseen % At the first level, print parens in roman, % otherwise use the default font. \ifnum \parencount=1 \rm \fi \else % The \sf parens (in \boldbrax) actually are a little bolder than % the contained text. This is especially needed for [ and ] . \sf \fi } \def\infirstlevel#1{% \ifampseen \ifnum\parencount=1 #1% \fi \fi } \def\bfafterword#1 {#1 \bf} \def\opnr{% \global\advance\parencount by 1 {\parenfont(}% \infirstlevel \bfafterword } \def\clnr{% {\parenfont)}% \infirstlevel \sl \global\advance\parencount by -1 } \newcount\brackcount \def\lbrb{% \global\advance\brackcount by 1 {\bf[}% } \def\rbrb{% {\bf]}% \global\advance\brackcount by -1 } \def\checkparencounts{% \ifnum\parencount=0 \else \badparencount \fi \ifnum\brackcount=0 \else \badbrackcount \fi } % these should not use \errmessage; the glibc manual, at least, actually % has such constructs (when documenting function pointers). \def\badparencount{% \message{Warning: unbalanced parentheses in @def...}% \global\parencount=0 } \def\badbrackcount{% \message{Warning: unbalanced square brackets in @def...}% \global\brackcount=0 } \message{macros,} % @macro. % To do this right we need a feature of e-TeX, \scantokens, % which we arrange to emulate with a temporary file in ordinary TeX. \ifx\eTeXversion\thisisundefined \newwrite\macscribble \def\scantokens#1{% \toks0={#1}% \immediate\openout\macscribble=\jobname.tmp \immediate\write\macscribble{\the\toks0}% \immediate\closeout\macscribble \input \jobname.tmp } \fi \def\scanmacro#1{\begingroup \newlinechar`\^^M \let\xeatspaces\eatspaces % % Undo catcode changes of \startcontents and \doprintindex % When called from @insertcopying or (short)caption, we need active % backslash to get it printed correctly. Previously, we had % \catcode`\\=\other instead. We'll see whether a problem appears % with macro expansion. --kasal, 19aug04 \catcode`\@=0 \catcode`\\=\active \escapechar=`\@ % % ... and for \example: \spaceisspace % % The \empty here causes a following catcode 5 newline to be eaten as % part of reading whitespace after a control sequence. It does not % eat a catcode 13 newline. There's no good way to handle the two % cases (untried: maybe e-TeX's \everyeof could help, though plain TeX % would then have different behavior). See the Macro Details node in % the manual for the workaround we recommend for macros and % line-oriented commands. % \scantokens{#1\empty}% \endgroup} \def\scanexp#1{% \edef\temp{\noexpand\scanmacro{#1}}% \temp } \newcount\paramno % Count of parameters \newtoks\macname % Macro name \newif\ifrecursive % Is it recursive? % List of all defined macros in the form % \definedummyword\macro1\definedummyword\macro2... % Currently is also contains all @aliases; the list can be split % if there is a need. \def\macrolist{} % Add the macro to \macrolist \def\addtomacrolist#1{\expandafter \addtomacrolistxxx \csname#1\endcsname} \def\addtomacrolistxxx#1{% \toks0 = \expandafter{\macrolist\definedummyword#1}% \xdef\macrolist{\the\toks0}% } % Utility routines. % This does \let #1 = #2, with \csnames; that is, % \let \csname#1\endcsname = \csname#2\endcsname % (except of course we have to play expansion games). % \def\cslet#1#2{% \expandafter\let \csname#1\expandafter\endcsname \csname#2\endcsname } % Trim leading and trailing spaces off a string. % Concepts from aro-bend problem 15 (see CTAN). {\catcode`\@=11 \gdef\eatspaces #1{\expandafter\trim@\expandafter{#1 }} \gdef\trim@ #1{\trim@@ @#1 @ #1 @ @@} \gdef\trim@@ #1@ #2@ #3@@{\trim@@@\empty #2 @} \def\unbrace#1{#1} \unbrace{\gdef\trim@@@ #1 } #2@{#1} } % Trim a single trailing ^^M off a string. {\catcode`\^^M=\other \catcode`\Q=3% \gdef\eatcr #1{\eatcra #1Q^^MQ}% \gdef\eatcra#1^^MQ{\eatcrb#1Q}% \gdef\eatcrb#1Q#2Q{#1}% } % Macro bodies are absorbed as an argument in a context where % all characters are catcode 10, 11 or 12, except \ which is active % (as in normal texinfo). It is necessary to change the definition of \ % to recognize macro arguments; this is the job of \mbodybackslash. % % Non-ASCII encodings make 8-bit characters active, so un-activate % them to avoid their expansion. Must do this non-globally, to % confine the change to the current group. % % It's necessary to have hard CRs when the macro is executed. This is % done by making ^^M (\endlinechar) catcode 12 when reading the macro % body, and then making it the \newlinechar in \scanmacro. % \def\scanctxt{% used as subroutine \catcode`\"=\other \catcode`\+=\other \catcode`\<=\other \catcode`\>=\other \catcode`\@=\other \catcode`\^=\other \catcode`\_=\other \catcode`\|=\other \catcode`\~=\other \ifx\declaredencoding\ascii \else \setnonasciicharscatcodenonglobal\other \fi } \def\scanargctxt{% used for copying and captions, not macros. \scanctxt \catcode`\\=\other \catcode`\^^M=\other } \def\macrobodyctxt{% used for @macro definitions \scanctxt \catcode`\{=\other \catcode`\}=\other \catcode`\^^M=\other \usembodybackslash } \def\macroargctxt{% used when scanning invocations \scanctxt \catcode`\\=0 } % why catcode 0 for \ in the above? To recognize \\ \{ \} as "escapes" % for the single characters \ { }. Thus, we end up with the "commands" % that would be written @\ @{ @} in a Texinfo document. % % We already have @{ and @}. For @\, we define it here, and only for % this purpose, to produce a typewriter backslash (so, the @\ that we % define for @math can't be used with @macro calls): % \def\\{\normalbackslash}% % % We would like to do this for \, too, since that is what makeinfo does. % But it is not possible, because Texinfo already has a command @, for a % cedilla accent. Documents must use @comma{} instead. % % \anythingelse will almost certainly be an error of some kind. % \mbodybackslash is the definition of \ in @macro bodies. % It maps \foo\ => \csname macarg.foo\endcsname => #N % where N is the macro parameter number. % We define \csname macarg.\endcsname to be \realbackslash, so % \\ in macro replacement text gets you a backslash. % {\catcode`@=0 @catcode`@\=@active @gdef@usembodybackslash{@let\=@mbodybackslash} @gdef@mbodybackslash#1\{@csname macarg.#1@endcsname} } \expandafter\def\csname macarg.\endcsname{\realbackslash} \def\margbackslash#1{\char`\#1 } \def\macro{\recursivefalse\parsearg\macroxxx} \def\rmacro{\recursivetrue\parsearg\macroxxx} \def\macroxxx#1{% \getargs{#1}% now \macname is the macname and \argl the arglist \ifx\argl\empty % no arguments \paramno=0\relax \else \expandafter\parsemargdef \argl;% \if\paramno>256\relax \ifx\eTeXversion\thisisundefined \errhelp = \EMsimple \errmessage{You need eTeX to compile a file with macros with more than 256 arguments} \fi \fi \fi \if1\csname ismacro.\the\macname\endcsname \message{Warning: redefining \the\macname}% \else \expandafter\ifx\csname \the\macname\endcsname \relax \else \errmessage{Macro name \the\macname\space already defined}\fi \global\cslet{macsave.\the\macname}{\the\macname}% \global\expandafter\let\csname ismacro.\the\macname\endcsname=1% \addtomacrolist{\the\macname}% \fi \begingroup \macrobodyctxt \ifrecursive \expandafter\parsermacbody \else \expandafter\parsemacbody \fi} \parseargdef\unmacro{% \if1\csname ismacro.#1\endcsname \global\cslet{#1}{macsave.#1}% \global\expandafter\let \csname ismacro.#1\endcsname=0% % Remove the macro name from \macrolist: \begingroup \expandafter\let\csname#1\endcsname \relax \let\definedummyword\unmacrodo \xdef\macrolist{\macrolist}% \endgroup \else \errmessage{Macro #1 not defined}% \fi } % Called by \do from \dounmacro on each macro. The idea is to omit any % macro definitions that have been changed to \relax. % \def\unmacrodo#1{% \ifx #1\relax % remove this \else \noexpand\definedummyword \noexpand#1% \fi } % This makes use of the obscure feature that if the last token of a % is #, then the preceding argument is delimited by % an opening brace, and that opening brace is not consumed. \def\getargs#1{\getargsxxx#1{}} \def\getargsxxx#1#{\getmacname #1 \relax\getmacargs} \def\getmacname#1 #2\relax{\macname={#1}} \def\getmacargs#1{\def\argl{#1}} % For macro processing make @ a letter so that we can make Texinfo private macro names. \edef\texiatcatcode{\the\catcode`\@} \catcode `@=11\relax % Parse the optional {params} list. Set up \paramno and \paramlist % so \defmacro knows what to do. Define \macarg.BLAH for each BLAH % in the params list to some hook where the argument si to be expanded. If % there are less than 10 arguments that hook is to be replaced by ##N where N % is the position in that list, that is to say the macro arguments are to be % defined `a la TeX in the macro body. % % That gets used by \mbodybackslash (above). % % We need to get `macro parameter char #' into several definitions. % The technique used is stolen from LaTeX: let \hash be something % unexpandable, insert that wherever you need a #, and then redefine % it to # just before using the token list produced. % % The same technique is used to protect \eatspaces till just before % the macro is used. % % If there are 10 or more arguments, a different technique is used, where the % hook remains in the body, and when macro is to be expanded the body is % processed again to replace the arguments. % % In that case, the hook is \the\toks N-1, and we simply set \toks N-1 to the % argument N value and then \edef the body (nothing else will expand because of % the catcode regime underwhich the body was input). % % If you compile with TeX (not eTeX), and you have macros with 10 or more % arguments, you need that no macro has more than 256 arguments, otherwise an % error is produced. \def\parsemargdef#1;{% \paramno=0\def\paramlist{}% \let\hash\relax \let\xeatspaces\relax \parsemargdefxxx#1,;,% % In case that there are 10 or more arguments we parse again the arguments % list to set new definitions for the \macarg.BLAH macros corresponding to % each BLAH argument. It was anyhow needed to parse already once this list % in order to count the arguments, and as macros with at most 9 arguments % are by far more frequent than macro with 10 or more arguments, defining % twice the \macarg.BLAH macros does not cost too much processing power. \ifnum\paramno<10\relax\else \paramno0\relax \parsemmanyargdef@@#1,;,% 10 or more arguments \fi } \def\parsemargdefxxx#1,{% \if#1;\let\next=\relax \else \let\next=\parsemargdefxxx \advance\paramno by 1 \expandafter\edef\csname macarg.\eatspaces{#1}\endcsname {\xeatspaces{\hash\the\paramno}}% \edef\paramlist{\paramlist\hash\the\paramno,}% \fi\next} \def\parsemmanyargdef@@#1,{% \if#1;\let\next=\relax \else \let\next=\parsemmanyargdef@@ \edef\tempb{\eatspaces{#1}}% \expandafter\def\expandafter\tempa \expandafter{\csname macarg.\tempb\endcsname}% % Note that we need some extra \noexpand\noexpand, this is because we % don't want \the to be expanded in the \parsermacbody as it uses an % \xdef . \expandafter\edef\tempa {\noexpand\noexpand\noexpand\the\toks\the\paramno}% \advance\paramno by 1\relax \fi\next} % These two commands read recursive and nonrecursive macro bodies. % (They're different since rec and nonrec macros end differently.) % \catcode `\@\texiatcatcode \long\def\parsemacbody#1@end macro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \long\def\parsermacbody#1@end rmacro% {\xdef\temp{\eatcr{#1}}\endgroup\defmacro}% \catcode `\@=11\relax \let\endargs@\relax \let\nil@\relax \def\nilm@{\nil@}% \long\def\nillm@{\nil@}% % This macro is expanded during the Texinfo macro expansion, not during its % definition. It gets all the arguments values and assigns them to macros % macarg.ARGNAME % % #1 is the macro name % #2 is the list of argument names % #3 is the list of argument values \def\getargvals@#1#2#3{% \def\macargdeflist@{}% \def\saveparamlist@{#2}% Need to keep a copy for parameter expansion. \def\paramlist{#2,\nil@}% \def\macroname{#1}% \begingroup \macroargctxt \def\argvaluelist{#3,\nil@}% \def\@tempa{#3}% \ifx\@tempa\empty \setemptyargvalues@ \else \getargvals@@ \fi } % \def\getargvals@@{% \ifx\paramlist\nilm@ % Some sanity check needed here that \argvaluelist is also empty. \ifx\argvaluelist\nillm@ \else \errhelp = \EMsimple \errmessage{Too many arguments in macro `\macroname'!}% \fi \let\next\macargexpandinbody@ \else \ifx\argvaluelist\nillm@ % No more arguments values passed to macro. Set remaining named-arg % macros to empty. \let\next\setemptyargvalues@ \else % pop current arg name into \@tempb \def\@tempa##1{\pop@{\@tempb}{\paramlist}##1\endargs@}% \expandafter\@tempa\expandafter{\paramlist}% % pop current argument value into \@tempc \def\@tempa##1{\longpop@{\@tempc}{\argvaluelist}##1\endargs@}% \expandafter\@tempa\expandafter{\argvaluelist}% % Here \@tempb is the current arg name and \@tempc is the current arg value. % First place the new argument macro definition into \@tempd \expandafter\macname\expandafter{\@tempc}% \expandafter\let\csname macarg.\@tempb\endcsname\relax \expandafter\def\expandafter\@tempe\expandafter{% \csname macarg.\@tempb\endcsname}% \edef\@tempd{\long\def\@tempe{\the\macname}}% \push@\@tempd\macargdeflist@ \let\next\getargvals@@ \fi \fi \next } \def\push@#1#2{% \expandafter\expandafter\expandafter\def \expandafter\expandafter\expandafter#2% \expandafter\expandafter\expandafter{% \expandafter#1#2}% } % Replace arguments by their values in the macro body, and place the result % in macro \@tempa \def\macvalstoargs@{% % To do this we use the property that token registers that are \the'ed % within an \edef expand only once. So we are going to place all argument % values into respective token registers. % % First we save the token context, and initialize argument numbering. \begingroup \paramno0\relax % Then, for each argument number #N, we place the corresponding argument % value into a new token list register \toks#N \expandafter\putargsintokens@\saveparamlist@,;,% % Then, we expand the body so that argument are replaced by their % values. The trick for values not to be expanded themselves is that they % are within tokens and that tokens expand only once in an \edef . \edef\@tempc{\csname mac.\macroname .body\endcsname}% % Now we restore the token stack pointer to free the token list registers % which we have used, but we make sure that expanded body is saved after % group. \expandafter \endgroup \expandafter\def\expandafter\@tempa\expandafter{\@tempc}% } \def\macargexpandinbody@{% %% Define the named-macro outside of this group and then close this group. \expandafter \endgroup \macargdeflist@ % First the replace in body the macro arguments by their values, the result % is in \@tempa . \macvalstoargs@ % Then we point at the \norecurse or \gobble (for recursive) macro value % with \@tempb . \expandafter\let\expandafter\@tempb\csname mac.\macroname .recurse\endcsname % Depending on whether it is recursive or not, we need some tailing % \egroup . \ifx\@tempb\gobble \let\@tempc\relax \else \let\@tempc\egroup \fi % And now we do the real job: \edef\@tempd{\noexpand\@tempb{\macroname}\noexpand\scanmacro{\@tempa}\@tempc}% \@tempd } \def\putargsintokens@#1,{% \if#1;\let\next\relax \else \let\next\putargsintokens@ % First we allocate the new token list register, and give it a temporary % alias \@tempb . \toksdef\@tempb\the\paramno % Then we place the argument value into that token list register. \expandafter\let\expandafter\@tempa\csname macarg.#1\endcsname \expandafter\@tempb\expandafter{\@tempa}% \advance\paramno by 1\relax \fi \next } % Save the token stack pointer into macro #1 \def\texisavetoksstackpoint#1{\edef#1{\the\@cclvi}} % Restore the token stack pointer from number in macro #1 \def\texirestoretoksstackpoint#1{\expandafter\mathchardef\expandafter\@cclvi#1\relax} % newtoks that can be used non \outer . \def\texinonouternewtoks{\alloc@ 5\toks \toksdef \@cclvi} % Tailing missing arguments are set to empty \def\setemptyargvalues@{% \ifx\paramlist\nilm@ \let\next\macargexpandinbody@ \else \expandafter\setemptyargvaluesparser@\paramlist\endargs@ \let\next\setemptyargvalues@ \fi \next } \def\setemptyargvaluesparser@#1,#2\endargs@{% \expandafter\def\expandafter\@tempa\expandafter{% \expandafter\def\csname macarg.#1\endcsname{}}% \push@\@tempa\macargdeflist@ \def\paramlist{#2}% } % #1 is the element target macro % #2 is the list macro % #3,#4\endargs@ is the list value \def\pop@#1#2#3,#4\endargs@{% \def#1{#3}% \def#2{#4}% } \long\def\longpop@#1#2#3,#4\endargs@{% \long\def#1{#3}% \long\def#2{#4}% } % This defines a Texinfo @macro. There are eight cases: recursive and % nonrecursive macros of zero, one, up to nine, and many arguments. % Much magic with \expandafter here. % \xdef is used so that macro definitions will survive the file % they're defined in; @include reads the file inside a group. % \def\defmacro{% \let\hash=##% convert placeholders to macro parameter chars \ifrecursive \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\scanmacro{\temp}}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup\noexpand\scanmacro{\temp}}% \else \ifnum\paramno<10\relax % at most 9 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{\egroup\noexpand\scanmacro{\temp}}% \else % 10 or more \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\gobble \fi \fi \else \ifcase\paramno % 0 \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \or % 1 \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \noexpand\braceorline \expandafter\noexpand\csname\the\macname xxx\endcsname}% \expandafter\xdef\csname\the\macname xxx\endcsname##1{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % at most 9 \ifnum\paramno<10\relax \expandafter\xdef\csname\the\macname\endcsname{% \bgroup\noexpand\macroargctxt \expandafter\noexpand\csname\the\macname xx\endcsname}% \expandafter\xdef\csname\the\macname xx\endcsname##1{% \expandafter\noexpand\csname\the\macname xxx\endcsname ##1,}% \expandafter\expandafter \expandafter\xdef \expandafter\expandafter \csname\the\macname xxx\endcsname \paramlist{% \egroup \noexpand\norecurse{\the\macname}% \noexpand\scanmacro{\temp}\egroup}% \else % 10 or more: \expandafter\xdef\csname\the\macname\endcsname{% \noexpand\getargvals@{\the\macname}{\argl}% }% \global\expandafter\let\csname mac.\the\macname .body\endcsname\temp \global\expandafter\let\csname mac.\the\macname .recurse\endcsname\norecurse \fi \fi \fi} \catcode `\@\texiatcatcode\relax \def\norecurse#1{\bgroup\cslet{#1}{macsave.#1}} % \braceorline decides whether the next nonwhitespace character is a % {. If so it reads up to the closing }, if not, it reads the whole % line. Whatever was read is then fed to the next control sequence % as an argument (by \parsebrace or \parsearg). % \def\braceorline#1{\let\macnamexxx=#1\futurelet\nchar\braceorlinexxx} \def\braceorlinexxx{% \ifx\nchar\bgroup\else \expandafter\parsearg \fi \macnamexxx} % @alias. % We need some trickery to remove the optional spaces around the equal % sign. Make them active and then expand them all to nothing. % \def\alias{\parseargusing\obeyspaces\aliasxxx} \def\aliasxxx #1{\aliasyyy#1\relax} \def\aliasyyy #1=#2\relax{% {% \expandafter\let\obeyedspace=\empty \addtomacrolist{#1}% \xdef\next{\global\let\makecsname{#1}=\makecsname{#2}}% }% \next } \message{cross references,} \newwrite\auxfile \newif\ifhavexrefs % True if xref values are known. \newif\ifwarnedxrefs % True if we warned once that they aren't known. % @inforef is relatively simple. \def\inforef #1{\inforefzzz #1,,,,**} \def\inforefzzz #1,#2,#3,#4**{% \putwordSee{} \putwordInfo{} \putwordfile{} \file{\ignorespaces #3{}}, node \samp{\ignorespaces#1{}}} % @node's only job in TeX is to define \lastnode, which is used in % cross-references. The @node line might or might not have commas, and % might or might not have spaces before the first comma, like: % @node foo , bar , ... % We don't want such trailing spaces in the node name. % \parseargdef\node{\checkenv{}\donode #1 ,\finishnodeparse} % % also remove a trailing comma, in case of something like this: % @node Help-Cross, , , Cross-refs \def\donode#1 ,#2\finishnodeparse{\dodonode #1,\finishnodeparse} \def\dodonode#1,#2\finishnodeparse{\gdef\lastnode{#1}} \let\nwnode=\node \let\lastnode=\empty % Write a cross-reference definition for the current node. #1 is the % type (Ynumbered, Yappendix, Ynothing). % \def\donoderef#1{% \ifx\lastnode\empty\else \setref{\lastnode}{#1}% \global\let\lastnode=\empty \fi } % @anchor{NAME} -- define xref target at arbitrary point. % \newcount\savesfregister % \def\savesf{\relax \ifhmode \savesfregister=\spacefactor \fi} \def\restoresf{\relax \ifhmode \spacefactor=\savesfregister \fi} \def\anchor#1{\savesf \setref{#1}{Ynothing}\restoresf \ignorespaces} % \setref{NAME}{SNT} defines a cross-reference point NAME (a node or an % anchor), which consists of three parts: % 1) NAME-title - the current sectioning name taken from \lastsection, % or the anchor name. % 2) NAME-snt - section number and type, passed as the SNT arg, or % empty for anchors. % 3) NAME-pg - the page number. % % This is called from \donoderef, \anchor, and \dofloat. In the case of % floats, there is an additional part, which is not written here: % 4) NAME-lof - the text as it should appear in a @listoffloats. % \def\setref#1#2{% \pdfmkdest{#1}% \iflinks {% \atdummies % preserve commands, but don't expand them \edef\writexrdef##1##2{% \write\auxfile{@xrdef{#1-% #1 of \setref, expanded by the \edef ##1}{##2}}% these are parameters of \writexrdef }% \toks0 = \expandafter{\lastsection}% \immediate \writexrdef{title}{\the\toks0 }% \immediate \writexrdef{snt}{\csname #2\endcsname}% \Ynumbered etc. \safewhatsit{\writexrdef{pg}{\folio}}% will be written later, at \shipout }% \fi } % @xrefautosectiontitle on|off says whether @section(ing) names are used % automatically in xrefs, if the third arg is not explicitly specified. % This was provided as a "secret" @set xref-automatic-section-title % variable, now it's official. % \parseargdef\xrefautomaticsectiontitle{% \def\temp{#1}% \ifx\temp\onword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \empty \else\ifx\temp\offword \expandafter\let\csname SETxref-automatic-section-title\endcsname = \relax \else \errhelp = \EMsimple \errmessage{Unknown @xrefautomaticsectiontitle value `\temp', must be on|off}% \fi\fi } % % @xref, @pxref, and @ref generate cross-references. For \xrefX, #1 is % the node name, #2 the name of the Info cross-reference, #3 the printed % node name, #4 the name of the Info file, #5 the name of the printed % manual. All but the node name can be omitted. % \def\pxref#1{\putwordsee{} \xrefX[#1,,,,,,,]} \def\xref#1{\putwordSee{} \xrefX[#1,,,,,,,]} \def\ref#1{\xrefX[#1,,,,,,,]} % \newbox\toprefbox \newbox\printedrefnamebox \newbox\infofilenamebox \newbox\printedmanualbox % \def\xrefX[#1,#2,#3,#4,#5,#6]{\begingroup \unsepspaces % % Get args without leading/trailing spaces. \def\printedrefname{\ignorespaces #3}% \setbox\printedrefnamebox = \hbox{\printedrefname\unskip}% % \def\infofilename{\ignorespaces #4}% \setbox\infofilenamebox = \hbox{\infofilename\unskip}% % \def\printedmanual{\ignorespaces #5}% \setbox\printedmanualbox = \hbox{\printedmanual\unskip}% % % If the printed reference name (arg #3) was not explicitly given in % the @xref, figure out what we want to use. \ifdim \wd\printedrefnamebox = 0pt % No printed node name was explicitly given. \expandafter\ifx\csname SETxref-automatic-section-title\endcsname \relax % Not auto section-title: use node name inside the square brackets. \def\printedrefname{\ignorespaces #1}% \else % Auto section-title: use chapter/section title inside % the square brackets if we have it. \ifdim \wd\printedmanualbox > 0pt % It is in another manual, so we don't have it; use node name. \def\printedrefname{\ignorespaces #1}% \else \ifhavexrefs % We (should) know the real title if we have the xref values. \def\printedrefname{\refx{#1-title}{}}% \else % Otherwise just copy the Info node name. \def\printedrefname{\ignorespaces #1}% \fi% \fi \fi \fi % % Make link in pdf output. \ifpdf {\indexnofonts \turnoffactive \makevalueexpandable % This expands tokens, so do it after making catcode changes, so _ % etc. don't get their TeX definitions. This ignores all spaces in % #4, including (wrongly) those in the middle of the filename. \getfilename{#4}% % % This (wrongly) does not take account of leading or trailing % spaces in #1, which should be ignored. \edef\pdfxrefdest{#1}% \ifx\pdfxrefdest\empty \def\pdfxrefdest{Top}% no empty targets \else \txiescapepdf\pdfxrefdest % escape PDF special chars \fi % \leavevmode \startlink attr{/Border [0 0 0]}% \ifnum\filenamelength>0 goto file{\the\filename.pdf} name{\pdfxrefdest}% \else goto name{\pdfmkpgn{\pdfxrefdest}}% \fi }% \setcolor{\linkcolor}% \fi % % Float references are printed completely differently: "Figure 1.2" % instead of "[somenode], p.3". We distinguish them by the % LABEL-title being set to a magic string. {% % Have to otherify everything special to allow the \csname to % include an _ in the xref name, etc. \indexnofonts \turnoffactive \expandafter\global\expandafter\let\expandafter\Xthisreftitle \csname XR#1-title\endcsname }% \iffloat\Xthisreftitle % If the user specified the print name (third arg) to the ref, % print it instead of our usual "Figure 1.2". \ifdim\wd\printedrefnamebox = 0pt \refx{#1-snt}{}% \else \printedrefname \fi % % If the user also gave the printed manual name (fifth arg), append % "in MANUALNAME". \ifdim \wd\printedmanualbox > 0pt \space \putwordin{} \cite{\printedmanual}% \fi \else % node/anchor (non-float) references. % % If we use \unhbox to print the node names, TeX does not insert % empty discretionaries after hyphens, which means that it will not % find a line break at a hyphen in a node names. Since some manuals % are best written with fairly long node names, containing hyphens, % this is a loss. Therefore, we give the text of the node name % again, so it is as if TeX is seeing it for the first time. % \ifdim \wd\printedmanualbox > 0pt % Cross-manual reference with a printed manual name. % \crossmanualxref{\cite{\printedmanual\unskip}}% % \else\ifdim \wd\infofilenamebox > 0pt % Cross-manual reference with only an info filename (arg 4), no % printed manual name (arg 5). This is essentially the same as % the case above; we output the filename, since we have nothing else. % \crossmanualxref{\code{\infofilename\unskip}}% % \else % Reference within this manual. % % _ (for example) has to be the character _ for the purposes of the % control sequence corresponding to the node, but it has to expand % into the usual \leavevmode...\vrule stuff for purposes of % printing. So we \turnoffactive for the \refx-snt, back on for the % printing, back off for the \refx-pg. {\turnoffactive % Only output a following space if the -snt ref is nonempty; for % @unnumbered and @anchor, it won't be. \setbox2 = \hbox{\ignorespaces \refx{#1-snt}{}}% \ifdim \wd2 > 0pt \refx{#1-snt}\space\fi }% % output the `[mynode]' via the macro below so it can be overridden. \xrefprintnodename\printedrefname % % But we always want a comma and a space: ,\space % % output the `page 3'. \turnoffactive \putwordpage\tie\refx{#1-pg}{}% \fi\fi \fi \endlink \endgroup} % Output a cross-manual xref to #1. Used just above (twice). % % Only include the text "Section ``foo'' in" if the foo is neither % missing or Top. Thus, @xref{,,,foo,The Foo Manual} outputs simply % "see The Foo Manual", the idea being to refer to the whole manual. % % But, this being TeX, we can't easily compare our node name against the % string "Top" while ignoring the possible spaces before and after in % the input. By adding the arbitrary 7sp below, we make it much less % likely that a real node name would have the same width as "Top" (e.g., % in a monospaced font). Hopefully it will never happen in practice. % % For the same basic reason, we retypeset the "Top" at every % reference, since the current font is indeterminate. % \def\crossmanualxref#1{% \setbox\toprefbox = \hbox{Top\kern7sp}% \setbox2 = \hbox{\ignorespaces \printedrefname \unskip \kern7sp}% \ifdim \wd2 > 7sp % nonempty? \ifdim \wd2 = \wd\toprefbox \else % same as Top? \putwordSection{} ``\printedrefname'' \putwordin{}\space \fi \fi #1% } % This macro is called from \xrefX for the `[nodename]' part of xref % output. It's a separate macro only so it can be changed more easily, % since square brackets don't work well in some documents. Particularly % one that Bob is working on :). % \def\xrefprintnodename#1{[#1]} % Things referred to by \setref. % \def\Ynothing{} \def\Yomitfromtoc{} \def\Ynumbered{% \ifnum\secno=0 \putwordChapter@tie \the\chapno \else \ifnum\subsecno=0 \putwordSection@tie \the\chapno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie \the\chapno.\the\secno.\the\subsecno \else \putwordSection@tie \the\chapno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } \def\Yappendix{% \ifnum\secno=0 \putwordAppendix@tie @char\the\appendixno{}% \else \ifnum\subsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno \else \ifnum\subsubsecno=0 \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno \else \putwordSection@tie @char\the\appendixno.\the\secno.\the\subsecno.\the\subsubsecno \fi\fi\fi } % Define \refx{NAME}{SUFFIX} to reference a cross-reference string named NAME. % If its value is nonempty, SUFFIX is output afterward. % \def\refx#1#2{% {% \indexnofonts \otherbackslash \expandafter\global\expandafter\let\expandafter\thisrefX \csname XR#1\endcsname }% \ifx\thisrefX\relax % If not defined, say something at least. \angleleft un\-de\-fined\angleright \iflinks \ifhavexrefs {\toks0 = {#1}% avoid expansion of possibly-complex value \message{\linenumber Undefined cross reference `\the\toks0'.}}% \else \ifwarnedxrefs\else \global\warnedxrefstrue \message{Cross reference values unknown; you must run TeX again.}% \fi \fi \fi \else % It's defined, so just use it. \thisrefX \fi #2% Output the suffix in any case. } % This is the macro invoked by entries in the aux file. Usually it's % just a \def (we prepend XR to the control sequence name to avoid % collisions). But if this is a float type, we have more work to do. % \def\xrdef#1#2{% {% The node name might contain 8-bit characters, which in our current % implementation are changed to commands like @'e. Don't let these % mess up the control sequence name. \indexnofonts \turnoffactive \xdef\safexrefname{#1}% }% % \expandafter\gdef\csname XR\safexrefname\endcsname{#2}% remember this xref % % Was that xref control sequence that we just defined for a float? \expandafter\iffloat\csname XR\safexrefname\endcsname % it was a float, and we have the (safe) float type in \iffloattype. \expandafter\let\expandafter\floatlist \csname floatlist\iffloattype\endcsname % % Is this the first time we've seen this float type? \expandafter\ifx\floatlist\relax \toks0 = {\do}% yes, so just \do \else % had it before, so preserve previous elements in list. \toks0 = \expandafter{\floatlist\do}% \fi % % Remember this xref in the control sequence \floatlistFLOATTYPE, % for later use in \listoffloats. \expandafter\xdef\csname floatlist\iffloattype\endcsname{\the\toks0 {\safexrefname}}% \fi } % Read the last existing aux file, if any. No error if none exists. % \def\tryauxfile{% \openin 1 \jobname.aux \ifeof 1 \else \readdatafile{aux}% \global\havexrefstrue \fi \closein 1 } \def\setupdatafile{% \catcode`\^^@=\other \catcode`\^^A=\other \catcode`\^^B=\other \catcode`\^^C=\other \catcode`\^^D=\other \catcode`\^^E=\other \catcode`\^^F=\other \catcode`\^^G=\other \catcode`\^^H=\other \catcode`\^^K=\other \catcode`\^^L=\other \catcode`\^^N=\other \catcode`\^^P=\other \catcode`\^^Q=\other \catcode`\^^R=\other \catcode`\^^S=\other \catcode`\^^T=\other \catcode`\^^U=\other \catcode`\^^V=\other \catcode`\^^W=\other \catcode`\^^X=\other \catcode`\^^Z=\other \catcode`\^^[=\other \catcode`\^^\=\other \catcode`\^^]=\other \catcode`\^^^=\other \catcode`\^^_=\other % It was suggested to set the catcode of ^ to 7, which would allow ^^e4 etc. % in xref tags, i.e., node names. But since ^^e4 notation isn't % supported in the main text, it doesn't seem desirable. Furthermore, % that is not enough: for node names that actually contain a ^ % character, we would end up writing a line like this: 'xrdef {'hat % b-title}{'hat b} and \xrdef does a \csname...\endcsname on the first % argument, and \hat is not an expandable control sequence. It could % all be worked out, but why? Either we support ^^ or we don't. % % The other change necessary for this was to define \auxhat: % \def\auxhat{\def^{'hat }}% extra space so ok if followed by letter % and then to call \auxhat in \setq. % \catcode`\^=\other % % Special characters. Should be turned off anyway, but... \catcode`\~=\other \catcode`\[=\other \catcode`\]=\other \catcode`\"=\other \catcode`\_=\other \catcode`\|=\other \catcode`\<=\other \catcode`\>=\other \catcode`\$=\other \catcode`\#=\other \catcode`\&=\other \catcode`\%=\other \catcode`+=\other % avoid \+ for paranoia even though we've turned it off % % This is to support \ in node names and titles, since the \ % characters end up in a \csname. It's easier than % leaving it active and making its active definition an actual \ % character. What I don't understand is why it works in the *value* % of the xrdef. Seems like it should be a catcode12 \, and that % should not typeset properly. But it works, so I'm moving on for % now. --karl, 15jan04. \catcode`\\=\other % % Make the characters 128-255 be printing characters. {% \count1=128 \def\loop{% \catcode\count1=\other \advance\count1 by 1 \ifnum \count1<256 \loop \fi }% }% % % @ is our escape character in .aux files, and we need braces. \catcode`\{=1 \catcode`\}=2 \catcode`\@=0 } \def\readdatafile#1{% \begingroup \setupdatafile \input\jobname.#1 \endgroup} \message{insertions,} % including footnotes. \newcount \footnoteno % The trailing space in the following definition for supereject is % vital for proper filling; pages come out unaligned when you do a % pagealignmacro call if that space before the closing brace is % removed. (Generally, numeric constants should always be followed by a % space to prevent strange expansion errors.) \def\supereject{\par\penalty -20000\footnoteno =0 } % @footnotestyle is meaningful for Info output only. \let\footnotestyle=\comment {\catcode `\@=11 % % Auto-number footnotes. Otherwise like plain. \gdef\footnote{% \let\indent=\ptexindent \let\noindent=\ptexnoindent \global\advance\footnoteno by \@ne \edef\thisfootno{$^{\the\footnoteno}$}% % % In case the footnote comes at the end of a sentence, preserve the % extra spacing after we do the footnote number. \let\@sf\empty \ifhmode\edef\@sf{\spacefactor\the\spacefactor}\ptexslash\fi % % Remove inadvertent blank space before typesetting the footnote number. \unskip \thisfootno\@sf \dofootnote }% % Don't bother with the trickery in plain.tex to not require the % footnote text as a parameter. Our footnotes don't need to be so general. % % Oh yes, they do; otherwise, @ifset (and anything else that uses % \parseargline) fails inside footnotes because the tokens are fixed when % the footnote is read. --karl, 16nov96. % \gdef\dofootnote{% \insert\footins\bgroup % We want to typeset this text as a normal paragraph, even if the % footnote reference occurs in (for example) a display environment. % So reset some parameters. \hsize=\pagewidth \interlinepenalty\interfootnotelinepenalty \splittopskip\ht\strutbox % top baseline for broken footnotes \splitmaxdepth\dp\strutbox \floatingpenalty\@MM \leftskip\z@skip \rightskip\z@skip \spaceskip\z@skip \xspaceskip\z@skip \parindent\defaultparindent % \smallfonts \rm % % Because we use hanging indentation in footnotes, a @noindent appears % to exdent this text, so make it be a no-op. makeinfo does not use % hanging indentation so @noindent can still be needed within footnote % text after an @example or the like (not that this is good style). \let\noindent = \relax % % Hang the footnote text off the number. Use \everypar in case the % footnote extends for more than one paragraph. \everypar = {\hang}% \textindent{\thisfootno}% % % Don't crash into the line above the footnote text. Since this % expands into a box, it must come within the paragraph, lest it % provide a place where TeX can split the footnote. \footstrut % % Invoke rest of plain TeX footnote routine. \futurelet\next\fo@t } }%end \catcode `\@=11 % In case a @footnote appears in a vbox, save the footnote text and create % the real \insert just after the vbox finished. Otherwise, the insertion % would be lost. % Similarly, if a @footnote appears inside an alignment, save the footnote % text to a box and make the \insert when a row of the table is finished. % And the same can be done for other insert classes. --kasal, 16nov03. % Replace the \insert primitive by a cheating macro. % Deeper inside, just make sure that the saved insertions are not spilled % out prematurely. % \def\startsavinginserts{% \ifx \insert\ptexinsert \let\insert\saveinsert \else \let\checkinserts\relax \fi } % This \insert replacement works for both \insert\footins{foo} and % \insert\footins\bgroup foo\egroup, but it doesn't work for \insert27{foo}. % \def\saveinsert#1{% \edef\next{\noexpand\savetobox \makeSAVEname#1}% \afterassignment\next % swallow the left brace \let\temp = } \def\makeSAVEname#1{\makecsname{SAVE\expandafter\gobble\string#1}} \def\savetobox#1{\global\setbox#1 = \vbox\bgroup \unvbox#1} \def\checksaveins#1{\ifvoid#1\else \placesaveins#1\fi} \def\placesaveins#1{% \ptexinsert \csname\expandafter\gobblesave\string#1\endcsname {\box#1}% } % eat @SAVE -- beware, all of them have catcode \other: { \def\dospecials{\do S\do A\do V\do E} \uncatcodespecials % ;-) \gdef\gobblesave @SAVE{} } % initialization: \def\newsaveins #1{% \edef\next{\noexpand\newsaveinsX \makeSAVEname#1}% \next } \def\newsaveinsX #1{% \csname newbox\endcsname #1% \expandafter\def\expandafter\checkinserts\expandafter{\checkinserts \checksaveins #1}% } % initialize: \let\checkinserts\empty \newsaveins\footins \newsaveins\margin % @image. We use the macros from epsf.tex to support this. % If epsf.tex is not installed and @image is used, we complain. % % Check for and read epsf.tex up front. If we read it only at @image % time, we might be inside a group, and then its definitions would get % undone and the next image would fail. \openin 1 = epsf.tex \ifeof 1 \else % Do not bother showing banner with epsf.tex v2.7k (available in % doc/epsf.tex and on ctan). \def\epsfannounce{\toks0 = }% \input epsf.tex \fi \closein 1 % % We will only complain once about lack of epsf.tex. \newif\ifwarnednoepsf \newhelp\noepsfhelp{epsf.tex must be installed for images to work. It is also included in the Texinfo distribution, or you can get it from ftp://tug.org/tex/epsf.tex.} % \def\image#1{% \ifx\epsfbox\thisisundefined \ifwarnednoepsf \else \errhelp = \noepsfhelp \errmessage{epsf.tex not found, images will be ignored}% \global\warnednoepsftrue \fi \else \imagexxx #1,,,,,\finish \fi } % % Arguments to @image: % #1 is (mandatory) image filename; we tack on .eps extension. % #2 is (optional) width, #3 is (optional) height. % #4 is (ignored optional) html alt text. % #5 is (ignored optional) extension. % #6 is just the usual extra ignored arg for parsing stuff. \newif\ifimagevmode \def\imagexxx#1,#2,#3,#4,#5,#6\finish{\begingroup \catcode`\^^M = 5 % in case we're inside an example \normalturnoffactive % allow _ et al. in names % If the image is by itself, center it. \ifvmode \imagevmodetrue \else \ifx\centersub\centerV % for @center @image, we need a vbox so we can have our vertical space \imagevmodetrue \vbox\bgroup % vbox has better behavior than vtop herev \fi\fi % \ifimagevmode \nobreak\medskip % Usually we'll have text after the image which will insert % \parskip glue, so insert it here too to equalize the space % above and below. \nobreak\vskip\parskip \nobreak \fi % % Leave vertical mode so that indentation from an enclosing % environment such as @quotation is respected. % However, if we're at the top level, we don't want the % normal paragraph indentation. % On the other hand, if we are in the case of @center @image, we don't % want to start a paragraph, which will create a hsize-width box and % eradicate the centering. \ifx\centersub\centerV\else \noindent \fi % % Output the image. \ifpdf \dopdfimage{#1}{#2}{#3}% \else % \epsfbox itself resets \epsf?size at each figure. \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \epsfxsize=#2\relax \fi \setbox0 = \hbox{\ignorespaces #3}\ifdim\wd0 > 0pt \epsfysize=#3\relax \fi \epsfbox{#1.eps}% \fi % \ifimagevmode \medskip % space after a standalone image \fi \ifx\centersub\centerV \egroup \fi \endgroup} % @float FLOATTYPE,LABEL,LOC ... @end float for displayed figures, tables, % etc. We don't actually implement floating yet, we always include the % float "here". But it seemed the best name for the future. % \envparseargdef\float{\eatcommaspace\eatcommaspace\dofloat#1, , ,\finish} % There may be a space before second and/or third parameter; delete it. \def\eatcommaspace#1, {#1,} % #1 is the optional FLOATTYPE, the text label for this float, typically % "Figure", "Table", "Example", etc. Can't contain commas. If omitted, % this float will not be numbered and cannot be referred to. % % #2 is the optional xref label. Also must be present for the float to % be referable. % % #3 is the optional positioning argument; for now, it is ignored. It % will somehow specify the positions allowed to float to (here, top, bottom). % % We keep a separate counter for each FLOATTYPE, which we reset at each % chapter-level command. \let\resetallfloatnos=\empty % \def\dofloat#1,#2,#3,#4\finish{% \let\thiscaption=\empty \let\thisshortcaption=\empty % % don't lose footnotes inside @float. % % BEWARE: when the floats start float, we have to issue warning whenever an % insert appears inside a float which could possibly float. --kasal, 26may04 % \startsavinginserts % % We can't be used inside a paragraph. \par % \vtop\bgroup \def\floattype{#1}% \def\floatlabel{#2}% \def\floatloc{#3}% we do nothing with this yet. % \ifx\floattype\empty \let\safefloattype=\empty \else {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% \fi % % If label is given but no type, we handle that as the empty type. \ifx\floatlabel\empty \else % We want each FLOATTYPE to be numbered separately (Figure 1, % Table 1, Figure 2, ...). (And if no label, no number.) % \expandafter\getfloatno\csname\safefloattype floatno\endcsname \global\advance\floatno by 1 % {% % This magic value for \lastsection is output by \setref as the % XREFLABEL-title value. \xrefX uses it to distinguish float % labels (which have a completely different output format) from % node and anchor labels. And \xrdef uses it to construct the % lists of floats. % \edef\lastsection{\floatmagic=\safefloattype}% \setref{\floatlabel}{Yfloat}% }% \fi % % start with \parskip glue, I guess. \vskip\parskip % % Don't suppress indentation if a float happens to start a section. \restorefirstparagraphindent } % we have these possibilities: % @float Foo,lbl & @caption{Cap}: Foo 1.1: Cap % @float Foo,lbl & no caption: Foo 1.1 % @float Foo & @caption{Cap}: Foo: Cap % @float Foo & no caption: Foo % @float ,lbl & Caption{Cap}: 1.1: Cap % @float ,lbl & no caption: 1.1 % @float & @caption{Cap}: Cap % @float & no caption: % \def\Efloat{% \let\floatident = \empty % % In all cases, if we have a float type, it comes first. \ifx\floattype\empty \else \def\floatident{\floattype}\fi % % If we have an xref label, the number comes next. \ifx\floatlabel\empty \else \ifx\floattype\empty \else % if also had float type, need tie first. \appendtomacro\floatident{\tie}% \fi % the number. \appendtomacro\floatident{\chaplevelprefix\the\floatno}% \fi % % Start the printed caption with what we've constructed in % \floatident, but keep it separate; we need \floatident again. \let\captionline = \floatident % \ifx\thiscaption\empty \else \ifx\floatident\empty \else \appendtomacro\captionline{: }% had ident, so need a colon between \fi % % caption text. \appendtomacro\captionline{\scanexp\thiscaption}% \fi % % If we have anything to print, print it, with space before. % Eventually this needs to become an \insert. \ifx\captionline\empty \else \vskip.5\parskip \captionline % % Space below caption. \vskip\parskip \fi % % If have an xref label, write the list of floats info. Do this % after the caption, to avoid chance of it being a breakpoint. \ifx\floatlabel\empty \else % Write the text that goes in the lof to the aux file as % \floatlabel-lof. Besides \floatident, we include the short % caption if specified, else the full caption if specified, else nothing. {% \atdummies % % since we read the caption text in the macro world, where ^^M % is turned into a normal character, we have to scan it back, so % we don't write the literal three characters "^^M" into the aux file. \scanexp{% \xdef\noexpand\gtemp{% \ifx\thisshortcaption\empty \thiscaption \else \thisshortcaption \fi }% }% \immediate\write\auxfile{@xrdef{\floatlabel-lof}{\floatident \ifx\gtemp\empty \else : \gtemp \fi}}% }% \fi \egroup % end of \vtop % % place the captured inserts % % BEWARE: when the floats start floating, we have to issue warning % whenever an insert appears inside a float which could possibly % float. --kasal, 26may04 % \checkinserts } % Append the tokens #2 to the definition of macro #1, not expanding either. % \def\appendtomacro#1#2{% \expandafter\def\expandafter#1\expandafter{#1#2}% } % @caption, @shortcaption % \def\caption{\docaption\thiscaption} \def\shortcaption{\docaption\thisshortcaption} \def\docaption{\checkenv\float \bgroup\scanargctxt\defcaption} \def\defcaption#1#2{\egroup \def#1{#2}} % The parameter is the control sequence identifying the counter we are % going to use. Create it if it doesn't exist and assign it to \floatno. \def\getfloatno#1{% \ifx#1\relax % Haven't seen this figure type before. \csname newcount\endcsname #1% % % Remember to reset this floatno at the next chap. \expandafter\gdef\expandafter\resetallfloatnos \expandafter{\resetallfloatnos #1=0 }% \fi \let\floatno#1% } % \setref calls this to get the XREFLABEL-snt value. We want an @xref % to the FLOATLABEL to expand to "Figure 3.1". We call \setref when we % first read the @float command. % \def\Yfloat{\floattype@tie \chaplevelprefix\the\floatno}% % Magic string used for the XREFLABEL-title value, so \xrefX can % distinguish floats from other xref types. \def\floatmagic{!!float!!} % #1 is the control sequence we are passed; we expand into a conditional % which is true if #1 represents a float ref. That is, the magic % \lastsection value which we \setref above. % \def\iffloat#1{\expandafter\doiffloat#1==\finish} % % #1 is (maybe) the \floatmagic string. If so, #2 will be the % (safe) float type for this float. We set \iffloattype to #2. % \def\doiffloat#1=#2=#3\finish{% \def\temp{#1}% \def\iffloattype{#2}% \ifx\temp\floatmagic } % @listoffloats FLOATTYPE - print a list of floats like a table of contents. % \parseargdef\listoffloats{% \def\floattype{#1}% floattype {% % the floattype might have accents or other special characters, % but we need to use it in a control sequence name. \indexnofonts \turnoffactive \xdef\safefloattype{\floattype}% }% % % \xrdef saves the floats as a \do-list in \floatlistSAFEFLOATTYPE. \expandafter\ifx\csname floatlist\safefloattype\endcsname \relax \ifhavexrefs % if the user said @listoffloats foo but never @float foo. \message{\linenumber No `\safefloattype' floats to list.}% \fi \else \begingroup \leftskip=\tocindent % indent these entries like a toc \let\do=\listoffloatsdo \csname floatlist\safefloattype\endcsname \endgroup \fi } % This is called on each entry in a list of floats. We're passed the % xref label, in the form LABEL-title, which is how we save it in the % aux file. We strip off the -title and look up \XRLABEL-lof, which % has the text we're supposed to typeset here. % % Figures without xref labels will not be included in the list (since % they won't appear in the aux file). % \def\listoffloatsdo#1{\listoffloatsdoentry#1\finish} \def\listoffloatsdoentry#1-title\finish{{% % Can't fully expand XR#1-lof because it can contain anything. Just % pass the control sequence. On the other hand, XR#1-pg is just the % page number, and we want to fully expand that so we can get a link % in pdf output. \toksA = \expandafter{\csname XR#1-lof\endcsname}% % % use the same \entry macro we use to generate the TOC and index. \edef\writeentry{\noexpand\entry{\the\toksA}{\csname XR#1-pg\endcsname}}% \writeentry }} \message{localization,} % For single-language documents, @documentlanguage is usually given very % early, just after @documentencoding. Single argument is the language % (de) or locale (de_DE) abbreviation. % { \catcode`\_ = \active \globaldefs=1 \parseargdef\documentlanguage{\begingroup \let_=\normalunderscore % normal _ character for filenames \tex % read txi-??.tex file in plain TeX. % Read the file by the name they passed if it exists. \openin 1 txi-#1.tex \ifeof 1 \documentlanguagetrywithoutunderscore{#1_\finish}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 \endgroup % end raw TeX \endgroup} % % If they passed de_DE, and txi-de_DE.tex doesn't exist, % try txi-de.tex. % \gdef\documentlanguagetrywithoutunderscore#1_#2\finish{% \openin 1 txi-#1.tex \ifeof 1 \errhelp = \nolanghelp \errmessage{Cannot read language file txi-#1.tex}% \else \globaldefs = 1 % everything in the txi-LL files needs to persist \input txi-#1.tex \fi \closein 1 } }% end of special _ catcode % \newhelp\nolanghelp{The given language definition file cannot be found or is empty. Maybe you need to install it? Putting it in the current directory should work if nowhere else does.} % This macro is called from txi-??.tex files; the first argument is the % \language name to set (without the "\lang@" prefix), the second and % third args are \{left,right}hyphenmin. % % The language names to pass are determined when the format is built. % See the etex.log file created at that time, e.g., % /usr/local/texlive/2008/texmf-var/web2c/pdftex/etex.log. % % With TeX Live 2008, etex now includes hyphenation patterns for all % available languages. This means we can support hyphenation in % Texinfo, at least to some extent. (This still doesn't solve the % accented characters problem.) % \catcode`@=11 \def\txisetlanguage#1#2#3{% % do not set the language if the name is undefined in the current TeX. \expandafter\ifx\csname lang@#1\endcsname \relax \message{no patterns for #1}% \else \global\language = \csname lang@#1\endcsname \fi % but there is no harm in adjusting the hyphenmin values regardless. \global\lefthyphenmin = #2\relax \global\righthyphenmin = #3\relax } % Helpers for encodings. % Set the catcode of characters 128 through 255 to the specified number. % \def\setnonasciicharscatcode#1{% \count255=128 \loop\ifnum\count255<256 \global\catcode\count255=#1\relax \advance\count255 by 1 \repeat } \def\setnonasciicharscatcodenonglobal#1{% \count255=128 \loop\ifnum\count255<256 \catcode\count255=#1\relax \advance\count255 by 1 \repeat } % @documentencoding sets the definition of non-ASCII characters % according to the specified encoding. % \parseargdef\documentencoding{% % Encoding being declared for the document. \def\declaredencoding{\csname #1.enc\endcsname}% % % Supported encodings: names converted to tokens in order to be able % to compare them with \ifx. \def\ascii{\csname US-ASCII.enc\endcsname}% \def\latnine{\csname ISO-8859-15.enc\endcsname}% \def\latone{\csname ISO-8859-1.enc\endcsname}% \def\lattwo{\csname ISO-8859-2.enc\endcsname}% \def\utfeight{\csname UTF-8.enc\endcsname}% % \ifx \declaredencoding \ascii \asciichardefs % \else \ifx \declaredencoding \lattwo \setnonasciicharscatcode\active \lattwochardefs % \else \ifx \declaredencoding \latone \setnonasciicharscatcode\active \latonechardefs % \else \ifx \declaredencoding \latnine \setnonasciicharscatcode\active \latninechardefs % \else \ifx \declaredencoding \utfeight \setnonasciicharscatcode\active \utfeightchardefs % \else \message{Unknown document encoding #1, ignoring.}% % \fi % utfeight \fi % latnine \fi % latone \fi % lattwo \fi % ascii } % A message to be logged when using a character that isn't available % the default font encoding (OT1). % \def\missingcharmsg#1{\message{Character missing in OT1 encoding: #1.}} % Take account of \c (plain) vs. \, (Texinfo) difference. \def\cedilla#1{\ifx\c\ptexc\c{#1}\else\,{#1}\fi} % First, make active non-ASCII characters in order for them to be % correctly categorized when TeX reads the replacement text of % macros containing the character definitions. \setnonasciicharscatcode\active % % Latin1 (ISO-8859-1) character definitions. \def\latonechardefs{% \gdef^^a0{\tie} \gdef^^a1{\exclamdown} \gdef^^a2{\missingcharmsg{CENT SIGN}} \gdef^^a3{{\pounds}} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\missingcharmsg{YEN SIGN}} \gdef^^a6{\missingcharmsg{BROKEN BAR}} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\copyright} \gdef^^aa{\ordf} \gdef^^ab{\guillemetleft} \gdef^^ac{$\lnot$} \gdef^^ad{\-} \gdef^^ae{\registeredsymbol} \gdef^^af{\={}} % \gdef^^b0{\textdegree} \gdef^^b1{$\pm$} \gdef^^b2{$^2$} \gdef^^b3{$^3$} \gdef^^b4{\'{}} \gdef^^b5{$\mu$} \gdef^^b6{\P} % \gdef^^b7{$^.$} \gdef^^b8{\cedilla\ } \gdef^^b9{$^1$} \gdef^^ba{\ordm} % \gdef^^bb{\guillemetright} \gdef^^bc{$1\over4$} \gdef^^bd{$1\over2$} \gdef^^be{$3\over4$} \gdef^^bf{\questiondown} % \gdef^^c0{\`A} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\~A} \gdef^^c4{\"A} \gdef^^c5{\ringaccent A} \gdef^^c6{\AE} \gdef^^c7{\cedilla C} \gdef^^c8{\`E} \gdef^^c9{\'E} \gdef^^ca{\^E} \gdef^^cb{\"E} \gdef^^cc{\`I} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\"I} % \gdef^^d0{\DH} \gdef^^d1{\~N} \gdef^^d2{\`O} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\~O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\O} \gdef^^d9{\`U} \gdef^^da{\'U} \gdef^^db{\^U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\TH} \gdef^^df{\ss} % \gdef^^e0{\`a} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\~a} \gdef^^e4{\"a} \gdef^^e5{\ringaccent a} \gdef^^e6{\ae} \gdef^^e7{\cedilla c} \gdef^^e8{\`e} \gdef^^e9{\'e} \gdef^^ea{\^e} \gdef^^eb{\"e} \gdef^^ec{\`{\dotless i}} \gdef^^ed{\'{\dotless i}} \gdef^^ee{\^{\dotless i}} \gdef^^ef{\"{\dotless i}} % \gdef^^f0{\dh} \gdef^^f1{\~n} \gdef^^f2{\`o} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\~o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\o} \gdef^^f9{\`u} \gdef^^fa{\'u} \gdef^^fb{\^u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\th} \gdef^^ff{\"y} } % Latin9 (ISO-8859-15) encoding character definitions. \def\latninechardefs{% % Encoding is almost identical to Latin1. \latonechardefs % \gdef^^a4{\euro} \gdef^^a6{\v S} \gdef^^a8{\v s} \gdef^^b4{\v Z} \gdef^^b8{\v z} \gdef^^bc{\OE} \gdef^^bd{\oe} \gdef^^be{\"Y} } % Latin2 (ISO-8859-2) character definitions. \def\lattwochardefs{% \gdef^^a0{\tie} \gdef^^a1{\ogonek{A}} \gdef^^a2{\u{}} \gdef^^a3{\L} \gdef^^a4{\missingcharmsg{CURRENCY SIGN}} \gdef^^a5{\v L} \gdef^^a6{\'S} \gdef^^a7{\S} \gdef^^a8{\"{}} \gdef^^a9{\v S} \gdef^^aa{\cedilla S} \gdef^^ab{\v T} \gdef^^ac{\'Z} \gdef^^ad{\-} \gdef^^ae{\v Z} \gdef^^af{\dotaccent Z} % \gdef^^b0{\textdegree} \gdef^^b1{\ogonek{a}} \gdef^^b2{\ogonek{ }} \gdef^^b3{\l} \gdef^^b4{\'{}} \gdef^^b5{\v l} \gdef^^b6{\'s} \gdef^^b7{\v{}} \gdef^^b8{\cedilla\ } \gdef^^b9{\v s} \gdef^^ba{\cedilla s} \gdef^^bb{\v t} \gdef^^bc{\'z} \gdef^^bd{\H{}} \gdef^^be{\v z} \gdef^^bf{\dotaccent z} % \gdef^^c0{\'R} \gdef^^c1{\'A} \gdef^^c2{\^A} \gdef^^c3{\u A} \gdef^^c4{\"A} \gdef^^c5{\'L} \gdef^^c6{\'C} \gdef^^c7{\cedilla C} \gdef^^c8{\v C} \gdef^^c9{\'E} \gdef^^ca{\ogonek{E}} \gdef^^cb{\"E} \gdef^^cc{\v E} \gdef^^cd{\'I} \gdef^^ce{\^I} \gdef^^cf{\v D} % \gdef^^d0{\DH} \gdef^^d1{\'N} \gdef^^d2{\v N} \gdef^^d3{\'O} \gdef^^d4{\^O} \gdef^^d5{\H O} \gdef^^d6{\"O} \gdef^^d7{$\times$} \gdef^^d8{\v R} \gdef^^d9{\ringaccent U} \gdef^^da{\'U} \gdef^^db{\H U} \gdef^^dc{\"U} \gdef^^dd{\'Y} \gdef^^de{\cedilla T} \gdef^^df{\ss} % \gdef^^e0{\'r} \gdef^^e1{\'a} \gdef^^e2{\^a} \gdef^^e3{\u a} \gdef^^e4{\"a} \gdef^^e5{\'l} \gdef^^e6{\'c} \gdef^^e7{\cedilla c} \gdef^^e8{\v c} \gdef^^e9{\'e} \gdef^^ea{\ogonek{e}} \gdef^^eb{\"e} \gdef^^ec{\v e} \gdef^^ed{\'{\dotless{i}}} \gdef^^ee{\^{\dotless{i}}} \gdef^^ef{\v d} % \gdef^^f0{\dh} \gdef^^f1{\'n} \gdef^^f2{\v n} \gdef^^f3{\'o} \gdef^^f4{\^o} \gdef^^f5{\H o} \gdef^^f6{\"o} \gdef^^f7{$\div$} \gdef^^f8{\v r} \gdef^^f9{\ringaccent u} \gdef^^fa{\'u} \gdef^^fb{\H u} \gdef^^fc{\"u} \gdef^^fd{\'y} \gdef^^fe{\cedilla t} \gdef^^ff{\dotaccent{}} } % UTF-8 character definitions. % % This code to support UTF-8 is based on LaTeX's utf8.def, with some % changes for Texinfo conventions. It is included here under the GPL by % permission from Frank Mittelbach and the LaTeX team. % \newcount\countUTFx \newcount\countUTFy \newcount\countUTFz \gdef\UTFviiiTwoOctets#1#2{\expandafter \UTFviiiDefined\csname u8:#1\string #2\endcsname} % \gdef\UTFviiiThreeOctets#1#2#3{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\endcsname} % \gdef\UTFviiiFourOctets#1#2#3#4{\expandafter \UTFviiiDefined\csname u8:#1\string #2\string #3\string #4\endcsname} \gdef\UTFviiiDefined#1{% \ifx #1\relax \message{\linenumber Unicode char \string #1 not defined for Texinfo}% \else \expandafter #1% \fi } \begingroup \catcode`\~13 \catcode`\"12 \def\UTFviiiLoop{% \global\catcode\countUTFx\active \uccode`\~\countUTFx \uppercase\expandafter{\UTFviiiTmp}% \advance\countUTFx by 1 \ifnum\countUTFx < \countUTFy \expandafter\UTFviiiLoop \fi} \countUTFx = "C2 \countUTFy = "E0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiTwoOctets\string~}} \UTFviiiLoop \countUTFx = "E0 \countUTFy = "F0 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiThreeOctets\string~}} \UTFviiiLoop \countUTFx = "F0 \countUTFy = "F4 \def\UTFviiiTmp{% \xdef~{\noexpand\UTFviiiFourOctets\string~}} \UTFviiiLoop \endgroup \begingroup \catcode`\"=12 \catcode`\<=12 \catcode`\.=12 \catcode`\,=12 \catcode`\;=12 \catcode`\!=12 \catcode`\~=13 \gdef\DeclareUnicodeCharacter#1#2{% \countUTFz = "#1\relax %\wlog{\space\space defining Unicode char U+#1 (decimal \the\countUTFz)}% \begingroup \parseXMLCharref \def\UTFviiiTwoOctets##1##2{% \csname u8:##1\string ##2\endcsname}% \def\UTFviiiThreeOctets##1##2##3{% \csname u8:##1\string ##2\string ##3\endcsname}% \def\UTFviiiFourOctets##1##2##3##4{% \csname u8:##1\string ##2\string ##3\string ##4\endcsname}% \expandafter\expandafter\expandafter\expandafter \expandafter\expandafter\expandafter \gdef\UTFviiiTmp{#2}% \endgroup} \gdef\parseXMLCharref{% \ifnum\countUTFz < "A0\relax \errhelp = \EMsimple \errmessage{Cannot define Unicode char value < 00A0}% \else\ifnum\countUTFz < "800\relax \parseUTFviiiA,% \parseUTFviiiB C\UTFviiiTwoOctets.,% \else\ifnum\countUTFz < "10000\relax \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiB E\UTFviiiThreeOctets.{,;}% \else \parseUTFviiiA;% \parseUTFviiiA,% \parseUTFviiiA!% \parseUTFviiiB F\UTFviiiFourOctets.{!,;}% \fi\fi\fi } \gdef\parseUTFviiiA#1{% \countUTFx = \countUTFz \divide\countUTFz by 64 \countUTFy = \countUTFz \multiply\countUTFz by 64 \advance\countUTFx by -\countUTFz \advance\countUTFx by 128 \uccode `#1\countUTFx \countUTFz = \countUTFy} \gdef\parseUTFviiiB#1#2#3#4{% \advance\countUTFz by "#10\relax \uccode `#3\countUTFz \uppercase{\gdef\UTFviiiTmp{#2#3#4}}} \endgroup \def\utfeightchardefs{% \DeclareUnicodeCharacter{00A0}{\tie} \DeclareUnicodeCharacter{00A1}{\exclamdown} \DeclareUnicodeCharacter{00A3}{\pounds} \DeclareUnicodeCharacter{00A8}{\"{ }} \DeclareUnicodeCharacter{00A9}{\copyright} \DeclareUnicodeCharacter{00AA}{\ordf} \DeclareUnicodeCharacter{00AB}{\guillemetleft} \DeclareUnicodeCharacter{00AD}{\-} \DeclareUnicodeCharacter{00AE}{\registeredsymbol} \DeclareUnicodeCharacter{00AF}{\={ }} \DeclareUnicodeCharacter{00B0}{\ringaccent{ }} \DeclareUnicodeCharacter{00B4}{\'{ }} \DeclareUnicodeCharacter{00B8}{\cedilla{ }} \DeclareUnicodeCharacter{00BA}{\ordm} \DeclareUnicodeCharacter{00BB}{\guillemetright} \DeclareUnicodeCharacter{00BF}{\questiondown} \DeclareUnicodeCharacter{00C0}{\`A} \DeclareUnicodeCharacter{00C1}{\'A} \DeclareUnicodeCharacter{00C2}{\^A} \DeclareUnicodeCharacter{00C3}{\~A} \DeclareUnicodeCharacter{00C4}{\"A} \DeclareUnicodeCharacter{00C5}{\AA} \DeclareUnicodeCharacter{00C6}{\AE} \DeclareUnicodeCharacter{00C7}{\cedilla{C}} \DeclareUnicodeCharacter{00C8}{\`E} \DeclareUnicodeCharacter{00C9}{\'E} \DeclareUnicodeCharacter{00CA}{\^E} \DeclareUnicodeCharacter{00CB}{\"E} \DeclareUnicodeCharacter{00CC}{\`I} \DeclareUnicodeCharacter{00CD}{\'I} \DeclareUnicodeCharacter{00CE}{\^I} \DeclareUnicodeCharacter{00CF}{\"I} \DeclareUnicodeCharacter{00D0}{\DH} \DeclareUnicodeCharacter{00D1}{\~N} \DeclareUnicodeCharacter{00D2}{\`O} \DeclareUnicodeCharacter{00D3}{\'O} \DeclareUnicodeCharacter{00D4}{\^O} \DeclareUnicodeCharacter{00D5}{\~O} \DeclareUnicodeCharacter{00D6}{\"O} \DeclareUnicodeCharacter{00D8}{\O} \DeclareUnicodeCharacter{00D9}{\`U} \DeclareUnicodeCharacter{00DA}{\'U} \DeclareUnicodeCharacter{00DB}{\^U} \DeclareUnicodeCharacter{00DC}{\"U} \DeclareUnicodeCharacter{00DD}{\'Y} \DeclareUnicodeCharacter{00DE}{\TH} \DeclareUnicodeCharacter{00DF}{\ss} \DeclareUnicodeCharacter{00E0}{\`a} \DeclareUnicodeCharacter{00E1}{\'a} \DeclareUnicodeCharacter{00E2}{\^a} \DeclareUnicodeCharacter{00E3}{\~a} \DeclareUnicodeCharacter{00E4}{\"a} \DeclareUnicodeCharacter{00E5}{\aa} \DeclareUnicodeCharacter{00E6}{\ae} \DeclareUnicodeCharacter{00E7}{\cedilla{c}} \DeclareUnicodeCharacter{00E8}{\`e} \DeclareUnicodeCharacter{00E9}{\'e} \DeclareUnicodeCharacter{00EA}{\^e} \DeclareUnicodeCharacter{00EB}{\"e} \DeclareUnicodeCharacter{00EC}{\`{\dotless{i}}} \DeclareUnicodeCharacter{00ED}{\'{\dotless{i}}} \DeclareUnicodeCharacter{00EE}{\^{\dotless{i}}} \DeclareUnicodeCharacter{00EF}{\"{\dotless{i}}} \DeclareUnicodeCharacter{00F0}{\dh} \DeclareUnicodeCharacter{00F1}{\~n} \DeclareUnicodeCharacter{00F2}{\`o} \DeclareUnicodeCharacter{00F3}{\'o} \DeclareUnicodeCharacter{00F4}{\^o} \DeclareUnicodeCharacter{00F5}{\~o} \DeclareUnicodeCharacter{00F6}{\"o} \DeclareUnicodeCharacter{00F8}{\o} \DeclareUnicodeCharacter{00F9}{\`u} \DeclareUnicodeCharacter{00FA}{\'u} \DeclareUnicodeCharacter{00FB}{\^u} \DeclareUnicodeCharacter{00FC}{\"u} \DeclareUnicodeCharacter{00FD}{\'y} \DeclareUnicodeCharacter{00FE}{\th} \DeclareUnicodeCharacter{00FF}{\"y} \DeclareUnicodeCharacter{0100}{\=A} \DeclareUnicodeCharacter{0101}{\=a} \DeclareUnicodeCharacter{0102}{\u{A}} \DeclareUnicodeCharacter{0103}{\u{a}} \DeclareUnicodeCharacter{0104}{\ogonek{A}} \DeclareUnicodeCharacter{0105}{\ogonek{a}} \DeclareUnicodeCharacter{0106}{\'C} \DeclareUnicodeCharacter{0107}{\'c} \DeclareUnicodeCharacter{0108}{\^C} \DeclareUnicodeCharacter{0109}{\^c} \DeclareUnicodeCharacter{0118}{\ogonek{E}} \DeclareUnicodeCharacter{0119}{\ogonek{e}} \DeclareUnicodeCharacter{010A}{\dotaccent{C}} \DeclareUnicodeCharacter{010B}{\dotaccent{c}} \DeclareUnicodeCharacter{010C}{\v{C}} \DeclareUnicodeCharacter{010D}{\v{c}} \DeclareUnicodeCharacter{010E}{\v{D}} \DeclareUnicodeCharacter{0112}{\=E} \DeclareUnicodeCharacter{0113}{\=e} \DeclareUnicodeCharacter{0114}{\u{E}} \DeclareUnicodeCharacter{0115}{\u{e}} \DeclareUnicodeCharacter{0116}{\dotaccent{E}} \DeclareUnicodeCharacter{0117}{\dotaccent{e}} \DeclareUnicodeCharacter{011A}{\v{E}} \DeclareUnicodeCharacter{011B}{\v{e}} \DeclareUnicodeCharacter{011C}{\^G} \DeclareUnicodeCharacter{011D}{\^g} \DeclareUnicodeCharacter{011E}{\u{G}} \DeclareUnicodeCharacter{011F}{\u{g}} \DeclareUnicodeCharacter{0120}{\dotaccent{G}} \DeclareUnicodeCharacter{0121}{\dotaccent{g}} \DeclareUnicodeCharacter{0124}{\^H} \DeclareUnicodeCharacter{0125}{\^h} \DeclareUnicodeCharacter{0128}{\~I} \DeclareUnicodeCharacter{0129}{\~{\dotless{i}}} \DeclareUnicodeCharacter{012A}{\=I} \DeclareUnicodeCharacter{012B}{\={\dotless{i}}} \DeclareUnicodeCharacter{012C}{\u{I}} \DeclareUnicodeCharacter{012D}{\u{\dotless{i}}} \DeclareUnicodeCharacter{0130}{\dotaccent{I}} \DeclareUnicodeCharacter{0131}{\dotless{i}} \DeclareUnicodeCharacter{0132}{IJ} \DeclareUnicodeCharacter{0133}{ij} \DeclareUnicodeCharacter{0134}{\^J} \DeclareUnicodeCharacter{0135}{\^{\dotless{j}}} \DeclareUnicodeCharacter{0139}{\'L} \DeclareUnicodeCharacter{013A}{\'l} \DeclareUnicodeCharacter{0141}{\L} \DeclareUnicodeCharacter{0142}{\l} \DeclareUnicodeCharacter{0143}{\'N} \DeclareUnicodeCharacter{0144}{\'n} \DeclareUnicodeCharacter{0147}{\v{N}} \DeclareUnicodeCharacter{0148}{\v{n}} \DeclareUnicodeCharacter{014C}{\=O} \DeclareUnicodeCharacter{014D}{\=o} \DeclareUnicodeCharacter{014E}{\u{O}} \DeclareUnicodeCharacter{014F}{\u{o}} \DeclareUnicodeCharacter{0150}{\H{O}} \DeclareUnicodeCharacter{0151}{\H{o}} \DeclareUnicodeCharacter{0152}{\OE} \DeclareUnicodeCharacter{0153}{\oe} \DeclareUnicodeCharacter{0154}{\'R} \DeclareUnicodeCharacter{0155}{\'r} \DeclareUnicodeCharacter{0158}{\v{R}} \DeclareUnicodeCharacter{0159}{\v{r}} \DeclareUnicodeCharacter{015A}{\'S} \DeclareUnicodeCharacter{015B}{\'s} \DeclareUnicodeCharacter{015C}{\^S} \DeclareUnicodeCharacter{015D}{\^s} \DeclareUnicodeCharacter{015E}{\cedilla{S}} \DeclareUnicodeCharacter{015F}{\cedilla{s}} \DeclareUnicodeCharacter{0160}{\v{S}} \DeclareUnicodeCharacter{0161}{\v{s}} \DeclareUnicodeCharacter{0162}{\cedilla{t}} \DeclareUnicodeCharacter{0163}{\cedilla{T}} \DeclareUnicodeCharacter{0164}{\v{T}} \DeclareUnicodeCharacter{0168}{\~U} \DeclareUnicodeCharacter{0169}{\~u} \DeclareUnicodeCharacter{016A}{\=U} \DeclareUnicodeCharacter{016B}{\=u} \DeclareUnicodeCharacter{016C}{\u{U}} \DeclareUnicodeCharacter{016D}{\u{u}} \DeclareUnicodeCharacter{016E}{\ringaccent{U}} \DeclareUnicodeCharacter{016F}{\ringaccent{u}} \DeclareUnicodeCharacter{0170}{\H{U}} \DeclareUnicodeCharacter{0171}{\H{u}} \DeclareUnicodeCharacter{0174}{\^W} \DeclareUnicodeCharacter{0175}{\^w} \DeclareUnicodeCharacter{0176}{\^Y} \DeclareUnicodeCharacter{0177}{\^y} \DeclareUnicodeCharacter{0178}{\"Y} \DeclareUnicodeCharacter{0179}{\'Z} \DeclareUnicodeCharacter{017A}{\'z} \DeclareUnicodeCharacter{017B}{\dotaccent{Z}} \DeclareUnicodeCharacter{017C}{\dotaccent{z}} \DeclareUnicodeCharacter{017D}{\v{Z}} \DeclareUnicodeCharacter{017E}{\v{z}} \DeclareUnicodeCharacter{01C4}{D\v{Z}} \DeclareUnicodeCharacter{01C5}{D\v{z}} \DeclareUnicodeCharacter{01C6}{d\v{z}} \DeclareUnicodeCharacter{01C7}{LJ} \DeclareUnicodeCharacter{01C8}{Lj} \DeclareUnicodeCharacter{01C9}{lj} \DeclareUnicodeCharacter{01CA}{NJ} \DeclareUnicodeCharacter{01CB}{Nj} \DeclareUnicodeCharacter{01CC}{nj} \DeclareUnicodeCharacter{01CD}{\v{A}} \DeclareUnicodeCharacter{01CE}{\v{a}} \DeclareUnicodeCharacter{01CF}{\v{I}} \DeclareUnicodeCharacter{01D0}{\v{\dotless{i}}} \DeclareUnicodeCharacter{01D1}{\v{O}} \DeclareUnicodeCharacter{01D2}{\v{o}} \DeclareUnicodeCharacter{01D3}{\v{U}} \DeclareUnicodeCharacter{01D4}{\v{u}} \DeclareUnicodeCharacter{01E2}{\={\AE}} \DeclareUnicodeCharacter{01E3}{\={\ae}} \DeclareUnicodeCharacter{01E6}{\v{G}} \DeclareUnicodeCharacter{01E7}{\v{g}} \DeclareUnicodeCharacter{01E8}{\v{K}} \DeclareUnicodeCharacter{01E9}{\v{k}} \DeclareUnicodeCharacter{01F0}{\v{\dotless{j}}} \DeclareUnicodeCharacter{01F1}{DZ} \DeclareUnicodeCharacter{01F2}{Dz} \DeclareUnicodeCharacter{01F3}{dz} \DeclareUnicodeCharacter{01F4}{\'G} \DeclareUnicodeCharacter{01F5}{\'g} \DeclareUnicodeCharacter{01F8}{\`N} \DeclareUnicodeCharacter{01F9}{\`n} \DeclareUnicodeCharacter{01FC}{\'{\AE}} \DeclareUnicodeCharacter{01FD}{\'{\ae}} \DeclareUnicodeCharacter{01FE}{\'{\O}} \DeclareUnicodeCharacter{01FF}{\'{\o}} \DeclareUnicodeCharacter{021E}{\v{H}} \DeclareUnicodeCharacter{021F}{\v{h}} \DeclareUnicodeCharacter{0226}{\dotaccent{A}} \DeclareUnicodeCharacter{0227}{\dotaccent{a}} \DeclareUnicodeCharacter{0228}{\cedilla{E}} \DeclareUnicodeCharacter{0229}{\cedilla{e}} \DeclareUnicodeCharacter{022E}{\dotaccent{O}} \DeclareUnicodeCharacter{022F}{\dotaccent{o}} \DeclareUnicodeCharacter{0232}{\=Y} \DeclareUnicodeCharacter{0233}{\=y} \DeclareUnicodeCharacter{0237}{\dotless{j}} \DeclareUnicodeCharacter{02DB}{\ogonek{ }} \DeclareUnicodeCharacter{1E02}{\dotaccent{B}} \DeclareUnicodeCharacter{1E03}{\dotaccent{b}} \DeclareUnicodeCharacter{1E04}{\udotaccent{B}} \DeclareUnicodeCharacter{1E05}{\udotaccent{b}} \DeclareUnicodeCharacter{1E06}{\ubaraccent{B}} \DeclareUnicodeCharacter{1E07}{\ubaraccent{b}} \DeclareUnicodeCharacter{1E0A}{\dotaccent{D}} \DeclareUnicodeCharacter{1E0B}{\dotaccent{d}} \DeclareUnicodeCharacter{1E0C}{\udotaccent{D}} \DeclareUnicodeCharacter{1E0D}{\udotaccent{d}} \DeclareUnicodeCharacter{1E0E}{\ubaraccent{D}} \DeclareUnicodeCharacter{1E0F}{\ubaraccent{d}} \DeclareUnicodeCharacter{1E1E}{\dotaccent{F}} \DeclareUnicodeCharacter{1E1F}{\dotaccent{f}} \DeclareUnicodeCharacter{1E20}{\=G} \DeclareUnicodeCharacter{1E21}{\=g} \DeclareUnicodeCharacter{1E22}{\dotaccent{H}} \DeclareUnicodeCharacter{1E23}{\dotaccent{h}} \DeclareUnicodeCharacter{1E24}{\udotaccent{H}} \DeclareUnicodeCharacter{1E25}{\udotaccent{h}} \DeclareUnicodeCharacter{1E26}{\"H} \DeclareUnicodeCharacter{1E27}{\"h} \DeclareUnicodeCharacter{1E30}{\'K} \DeclareUnicodeCharacter{1E31}{\'k} \DeclareUnicodeCharacter{1E32}{\udotaccent{K}} \DeclareUnicodeCharacter{1E33}{\udotaccent{k}} \DeclareUnicodeCharacter{1E34}{\ubaraccent{K}} \DeclareUnicodeCharacter{1E35}{\ubaraccent{k}} \DeclareUnicodeCharacter{1E36}{\udotaccent{L}} \DeclareUnicodeCharacter{1E37}{\udotaccent{l}} \DeclareUnicodeCharacter{1E3A}{\ubaraccent{L}} \DeclareUnicodeCharacter{1E3B}{\ubaraccent{l}} \DeclareUnicodeCharacter{1E3E}{\'M} \DeclareUnicodeCharacter{1E3F}{\'m} \DeclareUnicodeCharacter{1E40}{\dotaccent{M}} \DeclareUnicodeCharacter{1E41}{\dotaccent{m}} \DeclareUnicodeCharacter{1E42}{\udotaccent{M}} \DeclareUnicodeCharacter{1E43}{\udotaccent{m}} \DeclareUnicodeCharacter{1E44}{\dotaccent{N}} \DeclareUnicodeCharacter{1E45}{\dotaccent{n}} \DeclareUnicodeCharacter{1E46}{\udotaccent{N}} \DeclareUnicodeCharacter{1E47}{\udotaccent{n}} \DeclareUnicodeCharacter{1E48}{\ubaraccent{N}} \DeclareUnicodeCharacter{1E49}{\ubaraccent{n}} \DeclareUnicodeCharacter{1E54}{\'P} \DeclareUnicodeCharacter{1E55}{\'p} \DeclareUnicodeCharacter{1E56}{\dotaccent{P}} \DeclareUnicodeCharacter{1E57}{\dotaccent{p}} \DeclareUnicodeCharacter{1E58}{\dotaccent{R}} \DeclareUnicodeCharacter{1E59}{\dotaccent{r}} \DeclareUnicodeCharacter{1E5A}{\udotaccent{R}} \DeclareUnicodeCharacter{1E5B}{\udotaccent{r}} \DeclareUnicodeCharacter{1E5E}{\ubaraccent{R}} \DeclareUnicodeCharacter{1E5F}{\ubaraccent{r}} \DeclareUnicodeCharacter{1E60}{\dotaccent{S}} \DeclareUnicodeCharacter{1E61}{\dotaccent{s}} \DeclareUnicodeCharacter{1E62}{\udotaccent{S}} \DeclareUnicodeCharacter{1E63}{\udotaccent{s}} \DeclareUnicodeCharacter{1E6A}{\dotaccent{T}} \DeclareUnicodeCharacter{1E6B}{\dotaccent{t}} \DeclareUnicodeCharacter{1E6C}{\udotaccent{T}} \DeclareUnicodeCharacter{1E6D}{\udotaccent{t}} \DeclareUnicodeCharacter{1E6E}{\ubaraccent{T}} \DeclareUnicodeCharacter{1E6F}{\ubaraccent{t}} \DeclareUnicodeCharacter{1E7C}{\~V} \DeclareUnicodeCharacter{1E7D}{\~v} \DeclareUnicodeCharacter{1E7E}{\udotaccent{V}} \DeclareUnicodeCharacter{1E7F}{\udotaccent{v}} \DeclareUnicodeCharacter{1E80}{\`W} \DeclareUnicodeCharacter{1E81}{\`w} \DeclareUnicodeCharacter{1E82}{\'W} \DeclareUnicodeCharacter{1E83}{\'w} \DeclareUnicodeCharacter{1E84}{\"W} \DeclareUnicodeCharacter{1E85}{\"w} \DeclareUnicodeCharacter{1E86}{\dotaccent{W}} \DeclareUnicodeCharacter{1E87}{\dotaccent{w}} \DeclareUnicodeCharacter{1E88}{\udotaccent{W}} \DeclareUnicodeCharacter{1E89}{\udotaccent{w}} \DeclareUnicodeCharacter{1E8A}{\dotaccent{X}} \DeclareUnicodeCharacter{1E8B}{\dotaccent{x}} \DeclareUnicodeCharacter{1E8C}{\"X} \DeclareUnicodeCharacter{1E8D}{\"x} \DeclareUnicodeCharacter{1E8E}{\dotaccent{Y}} \DeclareUnicodeCharacter{1E8F}{\dotaccent{y}} \DeclareUnicodeCharacter{1E90}{\^Z} \DeclareUnicodeCharacter{1E91}{\^z} \DeclareUnicodeCharacter{1E92}{\udotaccent{Z}} \DeclareUnicodeCharacter{1E93}{\udotaccent{z}} \DeclareUnicodeCharacter{1E94}{\ubaraccent{Z}} \DeclareUnicodeCharacter{1E95}{\ubaraccent{z}} \DeclareUnicodeCharacter{1E96}{\ubaraccent{h}} \DeclareUnicodeCharacter{1E97}{\"t} \DeclareUnicodeCharacter{1E98}{\ringaccent{w}} \DeclareUnicodeCharacter{1E99}{\ringaccent{y}} \DeclareUnicodeCharacter{1EA0}{\udotaccent{A}} \DeclareUnicodeCharacter{1EA1}{\udotaccent{a}} \DeclareUnicodeCharacter{1EB8}{\udotaccent{E}} \DeclareUnicodeCharacter{1EB9}{\udotaccent{e}} \DeclareUnicodeCharacter{1EBC}{\~E} \DeclareUnicodeCharacter{1EBD}{\~e} \DeclareUnicodeCharacter{1ECA}{\udotaccent{I}} \DeclareUnicodeCharacter{1ECB}{\udotaccent{i}} \DeclareUnicodeCharacter{1ECC}{\udotaccent{O}} \DeclareUnicodeCharacter{1ECD}{\udotaccent{o}} \DeclareUnicodeCharacter{1EE4}{\udotaccent{U}} \DeclareUnicodeCharacter{1EE5}{\udotaccent{u}} \DeclareUnicodeCharacter{1EF2}{\`Y} \DeclareUnicodeCharacter{1EF3}{\`y} \DeclareUnicodeCharacter{1EF4}{\udotaccent{Y}} \DeclareUnicodeCharacter{1EF8}{\~Y} \DeclareUnicodeCharacter{1EF9}{\~y} \DeclareUnicodeCharacter{2013}{--} \DeclareUnicodeCharacter{2014}{---} \DeclareUnicodeCharacter{2018}{\quoteleft} \DeclareUnicodeCharacter{2019}{\quoteright} \DeclareUnicodeCharacter{201A}{\quotesinglbase} \DeclareUnicodeCharacter{201C}{\quotedblleft} \DeclareUnicodeCharacter{201D}{\quotedblright} \DeclareUnicodeCharacter{201E}{\quotedblbase} \DeclareUnicodeCharacter{2022}{\bullet} \DeclareUnicodeCharacter{2026}{\dots} \DeclareUnicodeCharacter{2039}{\guilsinglleft} \DeclareUnicodeCharacter{203A}{\guilsinglright} \DeclareUnicodeCharacter{20AC}{\euro} \DeclareUnicodeCharacter{2192}{\expansion} \DeclareUnicodeCharacter{21D2}{\result} \DeclareUnicodeCharacter{2212}{\minus} \DeclareUnicodeCharacter{2217}{\point} \DeclareUnicodeCharacter{2261}{\equiv} }% end of \utfeightchardefs % US-ASCII character definitions. \def\asciichardefs{% nothing need be done \relax } % Make non-ASCII characters printable again for compatibility with % existing Texinfo documents that may use them, even without declaring a % document encoding. % \setnonasciicharscatcode \other \message{formatting,} \newdimen\defaultparindent \defaultparindent = 15pt \chapheadingskip = 15pt plus 4pt minus 2pt \secheadingskip = 12pt plus 3pt minus 2pt \subsecheadingskip = 9pt plus 2pt minus 2pt % Prevent underfull vbox error messages. \vbadness = 10000 % Don't be very finicky about underfull hboxes, either. \hbadness = 6666 % Following George Bush, get rid of widows and orphans. \widowpenalty=10000 \clubpenalty=10000 % Use TeX 3.0's \emergencystretch to help line breaking, but if we're % using an old version of TeX, don't do anything. We want the amount of % stretch added to depend on the line length, hence the dependence on % \hsize. We call this whenever the paper size is set. % \def\setemergencystretch{% \ifx\emergencystretch\thisisundefined % Allow us to assign to \emergencystretch anyway. \def\emergencystretch{\dimen0}% \else \emergencystretch = .15\hsize \fi } % Parameters in order: 1) textheight; 2) textwidth; % 3) voffset; 4) hoffset; 5) binding offset; 6) topskip; % 7) physical page height; 8) physical page width. % % We also call \setleading{\textleading}, so the caller should define % \textleading. The caller should also set \parskip. % \def\internalpagesizes#1#2#3#4#5#6#7#8{% \voffset = #3\relax \topskip = #6\relax \splittopskip = \topskip % \vsize = #1\relax \advance\vsize by \topskip \outervsize = \vsize \advance\outervsize by 2\topandbottommargin \pageheight = \vsize % \hsize = #2\relax \outerhsize = \hsize \advance\outerhsize by 0.5in \pagewidth = \hsize % \normaloffset = #4\relax \bindingoffset = #5\relax % \ifpdf \pdfpageheight #7\relax \pdfpagewidth #8\relax % if we don't reset these, they will remain at "1 true in" of % whatever layout pdftex was dumped with. \pdfhorigin = 1 true in \pdfvorigin = 1 true in \fi % \setleading{\textleading} % \parindent = \defaultparindent \setemergencystretch } % @letterpaper (the default). \def\letterpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % If page is nothing but text, make it come out even. \internalpagesizes{607.2pt}{6in}% that's 46 lines {\voffset}{.25in}% {\bindingoffset}{36pt}% {11in}{8.5in}% }} % Use @smallbook to reset parameters for 7x9.25 trim size. \def\smallbook{{\globaldefs = 1 \parskip = 2pt plus 1pt \textleading = 12pt % \internalpagesizes{7.5in}{5in}% {-.2in}{0in}% {\bindingoffset}{16pt}% {9.25in}{7in}% % \lispnarrowing = 0.3in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .5cm }} % Use @smallerbook to reset parameters for 6x9 trim size. % (Just testing, parameters still in flux.) \def\smallerbook{{\globaldefs = 1 \parskip = 1.5pt plus 1pt \textleading = 12pt % \internalpagesizes{7.4in}{4.8in}% {-.2in}{-.4in}% {0pt}{14pt}% {9in}{6in}% % \lispnarrowing = 0.25in \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = .4cm }} % Use @afourpaper to print on European A4 paper. \def\afourpaper{{\globaldefs = 1 \parskip = 3pt plus 2pt minus 1pt \textleading = 13.2pt % % Double-side printing via postscript on Laserjet 4050 % prints double-sided nicely when \bindingoffset=10mm and \hoffset=-6mm. % To change the settings for a different printer or situation, adjust % \normaloffset until the front-side and back-side texts align. Then % do the same for \bindingoffset. You can set these for testing in % your texinfo source file like this: % @tex % \global\normaloffset = -6mm % \global\bindingoffset = 10mm % @end tex \internalpagesizes{673.2pt}{160mm}% that's 51 lines {\voffset}{\hoffset}% {\bindingoffset}{44pt}% {297mm}{210mm}% % \tolerance = 700 \hfuzz = 1pt \contentsrightmargin = 0pt \defbodyindent = 5mm }} % Use @afivepaper to print on European A5 paper. % From romildo@urano.iceb.ufop.br, 2 July 2000. % He also recommends making @example and @lisp be small. \def\afivepaper{{\globaldefs = 1 \parskip = 2pt plus 1pt minus 0.1pt \textleading = 12.5pt % \internalpagesizes{160mm}{120mm}% {\voffset}{\hoffset}% {\bindingoffset}{8pt}% {210mm}{148mm}% % \lispnarrowing = 0.2in \tolerance = 800 \hfuzz = 1.2pt \contentsrightmargin = 0pt \defbodyindent = 2mm \tableindent = 12mm }} % A specific text layout, 24x15cm overall, intended for A4 paper. \def\afourlatex{{\globaldefs = 1 \afourpaper \internalpagesizes{237mm}{150mm}% {\voffset}{4.6mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% % % Must explicitly reset to 0 because we call \afourpaper. \globaldefs = 0 }} % Use @afourwide to print on A4 paper in landscape format. \def\afourwide{{\globaldefs = 1 \afourpaper \internalpagesizes{241mm}{165mm}% {\voffset}{-2.95mm}% {\bindingoffset}{7mm}% {297mm}{210mm}% \globaldefs = 0 }} % @pagesizes TEXTHEIGHT[,TEXTWIDTH] % Perhaps we should allow setting the margins, \topskip, \parskip, % and/or leading, also. Or perhaps we should compute them somehow. % \parseargdef\pagesizes{\pagesizesyyy #1,,\finish} \def\pagesizesyyy#1,#2,#3\finish{{% \setbox0 = \hbox{\ignorespaces #2}\ifdim\wd0 > 0pt \hsize=#2\relax \fi \globaldefs = 1 % \parskip = 3pt plus 2pt minus 1pt \setleading{\textleading}% % \dimen0 = #1\relax \advance\dimen0 by \voffset % \dimen2 = \hsize \advance\dimen2 by \normaloffset % \internalpagesizes{#1}{\hsize}% {\voffset}{\normaloffset}% {\bindingoffset}{44pt}% {\dimen0}{\dimen2}% }} % Set default to letter. % \letterpaper \message{and turning on texinfo input format.} \def^^L{\par} % remove \outer, so ^L can appear in an @comment % DEL is a comment character, in case @c does not suffice. \catcode`\^^? = 14 % Define macros to output various characters with catcode for normal text. \catcode`\"=\other \def\normaldoublequote{"} \catcode`\$=\other \def\normaldollar{$}%$ font-lock fix \catcode`\+=\other \def\normalplus{+} \catcode`\<=\other \def\normalless{<} \catcode`\>=\other \def\normalgreater{>} \catcode`\^=\other \def\normalcaret{^} \catcode`\_=\other \def\normalunderscore{_} \catcode`\|=\other \def\normalverticalbar{|} \catcode`\~=\other \def\normaltilde{~} % This macro is used to make a character print one way in \tt % (where it can probably be output as-is), and another way in other fonts, % where something hairier probably needs to be done. % % #1 is what to print if we are indeed using \tt; #2 is what to print % otherwise. Since all the Computer Modern typewriter fonts have zero % interword stretch (and shrink), and it is reasonable to expect all % typewriter fonts to have this, we can check that font parameter. % \def\ifusingtt#1#2{\ifdim \fontdimen3\font=0pt #1\else #2\fi} % Same as above, but check for italic font. Actually this also catches % non-italic slanted fonts since it is impossible to distinguish them from % italic fonts. But since this is only used by $ and it uses \sl anyway % this is not a problem. \def\ifusingit#1#2{\ifdim \fontdimen1\font>0pt #1\else #2\fi} % Turn off all special characters except @ % (and those which the user can use as if they were ordinary). % Most of these we simply print from the \tt font, but for some, we can % use math or other variants that look better in normal text. \catcode`\"=\active \def\activedoublequote{{\tt\char34}} \let"=\activedoublequote \catcode`\~=\active \def~{{\tt\char126}} \chardef\hat=`\^ \catcode`\^=\active \def^{{\tt \hat}} \catcode`\_=\active \def_{\ifusingtt\normalunderscore\_} \let\realunder=_ % Subroutine for the previous macro. \def\_{\leavevmode \kern.07em \vbox{\hrule width.3em height.1ex}\kern .07em } \catcode`\|=\active \def|{{\tt\char124}} \chardef \less=`\< \catcode`\<=\active \def<{{\tt \less}} \chardef \gtr=`\> \catcode`\>=\active \def>{{\tt \gtr}} \catcode`\+=\active \def+{{\tt \char 43}} \catcode`\$=\active \def${\ifusingit{{\sl\$}}\normaldollar}%$ font-lock fix % If a .fmt file is being used, characters that might appear in a file % name cannot be active until we have parsed the command line. % So turn them off again, and have \everyjob (or @setfilename) turn them on. % \otherifyactive is called near the end of this file. \def\otherifyactive{\catcode`+=\other \catcode`\_=\other} % Used sometimes to turn off (effectively) the active characters even after % parsing them. \def\turnoffactive{% \normalturnoffactive \otherbackslash } \catcode`\@=0 % \backslashcurfont outputs one backslash character in current font, % as in \char`\\. \global\chardef\backslashcurfont=`\\ \global\let\rawbackslashxx=\backslashcurfont % let existing .??s files work % \realbackslash is an actual character `\' with catcode other, and % \doublebackslash is two of them (for the pdf outlines). {\catcode`\\=\other @gdef@realbackslash{\} @gdef@doublebackslash{\\}} % In texinfo, backslash is an active character; it prints the backslash % in fixed width font. \catcode`\\=\active % @ for escape char from now on. % The story here is that in math mode, the \char of \backslashcurfont % ends up printing the roman \ from the math symbol font (because \char % in math mode uses the \mathcode, and plain.tex sets % \mathcode`\\="026E). It seems better for @backslashchar{} to always % print a typewriter backslash, hence we use an explicit \mathchar, % which is the decimal equivalent of "715c (class 7, e.g., use \fam; % ignored family value; char position "5C). We can't use " for the % usual hex value because it has already been made active. @def@normalbackslash{{@tt @ifmmode @mathchar29020 @else @backslashcurfont @fi}} @let@backslashchar = @normalbackslash % @backslashchar{} is for user documents. % On startup, @fixbackslash assigns: % @let \ = @normalbackslash % \rawbackslash defines an active \ to do \backslashcurfont. % \otherbackslash defines an active \ to be a literal `\' character with % catcode other. We switch back and forth between these. @gdef@rawbackslash{@let\=@backslashcurfont} @gdef@otherbackslash{@let\=@realbackslash} % Same as @turnoffactive except outputs \ as {\tt\char`\\} instead of % the literal character `\'. Also revert - to its normal character, in % case the active - from code has slipped in. % {@catcode`- = @active @gdef@normalturnoffactive{% @let-=@normaldash @let"=@normaldoublequote @let$=@normaldollar %$ font-lock fix @let+=@normalplus @let<=@normalless @let>=@normalgreater @let\=@normalbackslash @let^=@normalcaret @let_=@normalunderscore @let|=@normalverticalbar @let~=@normaltilde @markupsetuplqdefault @markupsetuprqdefault @unsepspaces } } % Make _ and + \other characters, temporarily. % This is canceled by @fixbackslash. @otherifyactive % If a .fmt file is being used, we don't want the `\input texinfo' to show up. % That is what \eatinput is for; after that, the `\' should revert to printing % a backslash. % @gdef@eatinput input texinfo{@fixbackslash} @global@let\ = @eatinput % On the other hand, perhaps the file did not have a `\input texinfo'. Then % the first `\' in the file would cause an error. This macro tries to fix % that, assuming it is called before the first `\' could plausibly occur. % Also turn back on active characters that might appear in the input % file name, in case not using a pre-dumped format. % @gdef@fixbackslash{% @ifx\@eatinput @let\ = @normalbackslash @fi @catcode`+=@active @catcode`@_=@active } % Say @foo, not \foo, in error messages. @escapechar = `@@ % These (along with & and #) are made active for url-breaking, so need % active definitions as the normal characters. @def@normaldot{.} @def@normalquest{?} @def@normalslash{/} % These look ok in all fonts, so just make them not special. % @hashchar{} gets its own user-level command, because of #line. @catcode`@& = @other @def@normalamp{&} @catcode`@# = @other @def@normalhash{#} @catcode`@% = @other @def@normalpercent{%} @let @hashchar = @normalhash @c Finally, make ` and ' active, so that txicodequoteundirected and @c txicodequotebacktick work right in, e.g., @w{@code{`foo'}}. If we @c don't make ` and ' active, @code will not get them as active chars. @c Do this last of all since we use ` in the previous @catcode assignments. @catcode`@'=@active @catcode`@`=@active @markupsetuplqdefault @markupsetuprqdefault @c Local variables: @c eval: (add-hook 'write-file-hooks 'time-stamp) @c page-delimiter: "^\\\\message" @c time-stamp-start: "def\\\\texinfoversion{" @c time-stamp-format: "%:y-%02m-%02d.%02H" @c time-stamp-end: "}" @c End: @c vim:sw=2: @ignore arch-tag: e1b36e32-c96e-4135-a41a-0b2efa2ea115 @end ignore freeipmi-1.6.4/config/depcomp0000755002055400205540000005601613527342443016113 0ustar00achuachu00000000000000#! /bin/sh # depcomp - compile a program generating dependencies as side-effects scriptversion=2013-05-30.07; # UTC # Copyright (C) 1999-2013 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2, or (at your option) # any later version. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # You should have received a copy of the GNU General Public License # along with this program. If not, see . # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # Originally written by Alexandre Oliva . case $1 in '') echo "$0: No command. Try '$0 --help' for more information." 1>&2 exit 1; ;; -h | --h*) cat <<\EOF Usage: depcomp [--help] [--version] PROGRAM [ARGS] Run PROGRAMS ARGS to compile a file, generating dependencies as side-effects. Environment variables: depmode Dependency tracking mode. source Source file read by 'PROGRAMS ARGS'. object Object file output by 'PROGRAMS ARGS'. DEPDIR directory where to store dependencies. depfile Dependency file to output. tmpdepfile Temporary file to use when outputting dependencies. libtool Whether libtool is used (yes/no). Report bugs to . EOF exit $? ;; -v | --v*) echo "depcomp $scriptversion" exit $? ;; esac # Get the directory component of the given path, and save it in the # global variables '$dir'. Note that this directory component will # be either empty or ending with a '/' character. This is deliberate. set_dir_from () { case $1 in */*) dir=`echo "$1" | sed -e 's|/[^/]*$|/|'`;; *) dir=;; esac } # Get the suffix-stripped basename of the given path, and save it the # global variable '$base'. set_base_from () { base=`echo "$1" | sed -e 's|^.*/||' -e 's/\.[^.]*$//'` } # If no dependency file was actually created by the compiler invocation, # we still have to create a dummy depfile, to avoid errors with the # Makefile "include basename.Plo" scheme. make_dummy_depfile () { echo "#dummy" > "$depfile" } # Factor out some common post-processing of the generated depfile. # Requires the auxiliary global variable '$tmpdepfile' to be set. aix_post_process_depfile () { # If the compiler actually managed to produce a dependency file, # post-process it. if test -f "$tmpdepfile"; then # Each line is of the form 'foo.o: dependency.h'. # Do two passes, one to just change these to # $object: dependency.h # and one to simply output # dependency.h: # which is needed to avoid the deleted-header problem. { sed -e "s,^.*\.[$lower]*:,$object:," < "$tmpdepfile" sed -e "s,^.*\.[$lower]*:[$tab ]*,," -e 's,$,:,' < "$tmpdepfile" } > "$depfile" rm -f "$tmpdepfile" else make_dummy_depfile fi } # A tabulation character. tab=' ' # A newline character. nl=' ' # Character ranges might be problematic outside the C locale. # These definitions help. upper=ABCDEFGHIJKLMNOPQRSTUVWXYZ lower=abcdefghijklmnopqrstuvwxyz digits=0123456789 alpha=${upper}${lower} if test -z "$depmode" || test -z "$source" || test -z "$object"; then echo "depcomp: Variables source, object and depmode must be set" 1>&2 exit 1 fi # Dependencies for sub/bar.o or sub/bar.obj go into sub/.deps/bar.Po. depfile=${depfile-`echo "$object" | sed 's|[^\\/]*$|'${DEPDIR-.deps}'/&|;s|\.\([^.]*\)$|.P\1|;s|Pobj$|Po|'`} tmpdepfile=${tmpdepfile-`echo "$depfile" | sed 's/\.\([^.]*\)$/.T\1/'`} rm -f "$tmpdepfile" # Avoid interferences from the environment. gccflag= dashmflag= # Some modes work just like other modes, but use different flags. We # parameterize here, but still list the modes in the big case below, # to make depend.m4 easier to write. Note that we *cannot* use a case # here, because this file can only contain one case statement. if test "$depmode" = hp; then # HP compiler uses -M and no extra arg. gccflag=-M depmode=gcc fi if test "$depmode" = dashXmstdout; then # This is just like dashmstdout with a different argument. dashmflag=-xM depmode=dashmstdout fi cygpath_u="cygpath -u -f -" if test "$depmode" = msvcmsys; then # This is just like msvisualcpp but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvisualcpp fi if test "$depmode" = msvc7msys; then # This is just like msvc7 but w/o cygpath translation. # Just convert the backslash-escaped backslashes to single forward # slashes to satisfy depend.m4 cygpath_u='sed s,\\\\,/,g' depmode=msvc7 fi if test "$depmode" = xlc; then # IBM C/C++ Compilers xlc/xlC can output gcc-like dependency information. gccflag=-qmakedep=gcc,-MF depmode=gcc fi case "$depmode" in gcc3) ## gcc 3 implements dependency tracking that does exactly what ## we want. Yay! Note: for some reason libtool 1.4 doesn't like ## it if -MD -MP comes after the -MF stuff. Hmm. ## Unfortunately, FreeBSD c89 acceptance of flags depends upon ## the command line argument order; so add the flags where they ## appear in depend2.am. Note that the slowdown incurred here ## affects only configure: in makefiles, %FASTDEP% shortcuts this. for arg do case $arg in -c) set fnord "$@" -MT "$object" -MD -MP -MF "$tmpdepfile" "$arg" ;; *) set fnord "$@" "$arg" ;; esac shift # fnord shift # $arg done "$@" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi mv "$tmpdepfile" "$depfile" ;; gcc) ## Note that this doesn't just cater to obsosete pre-3.x GCC compilers. ## but also to in-use compilers like IMB xlc/xlC and the HP C compiler. ## (see the conditional assignment to $gccflag above). ## There are various ways to get dependency output from gcc. Here's ## why we pick this rather obscure method: ## - Don't want to use -MD because we'd like the dependencies to end ## up in a subdir. Having to rename by hand is ugly. ## (We might end up doing this anyway to support other compilers.) ## - The DEPENDENCIES_OUTPUT environment variable makes gcc act like ## -MM, not -M (despite what the docs say). Also, it might not be ## supported by the other compilers which use the 'gcc' depmode. ## - Using -M directly means running the compiler twice (even worse ## than renaming). if test -z "$gccflag"; then gccflag=-MD, fi "$@" -Wp,"$gccflag$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The second -e expression handles DOS-style file names with drive # letters. sed -e 's/^[^:]*: / /' \ -e 's/^['$alpha']:\/[^:]*: / /' < "$tmpdepfile" >> "$depfile" ## This next piece of magic avoids the "deleted header file" problem. ## The problem is that when a header file which appears in a .P file ## is deleted, the dependency causes make to die (because there is ## typically no way to rebuild the header). We avoid this by adding ## dummy dependencies for each header file. Too bad gcc doesn't do ## this for us directly. ## Some versions of gcc put a space before the ':'. On the theory ## that the space means something, we add a space to the output as ## well. hp depmode also adds that space, but also prefixes the VPATH ## to the object. Take care to not repeat it in the output. ## Some versions of the HPUX 10.20 sed can't process this invocation ## correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e "s|.*$object$||" -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; sgi) if test "$libtool" = yes; then "$@" "-Wp,-MDupdate,$tmpdepfile" else "$@" -MDupdate "$tmpdepfile" fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" if test -f "$tmpdepfile"; then # yes, the sourcefile depend on other files echo "$object : \\" > "$depfile" # Clip off the initial element (the dependent). Don't try to be # clever and replace this with sed code, as IRIX sed won't handle # lines with more than a fixed number of characters (4096 in # IRIX 6.2 sed, 8192 in IRIX 6.5). We also remove comment lines; # the IRIX cc adds comments like '#:fec' to the end of the # dependency line. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' \ | tr "$nl" ' ' >> "$depfile" echo >> "$depfile" # The second pass generates a dummy entry for each header file. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^.*\.o://' -e 's/#.*$//' -e '/^$/ d' -e 's/$/:/' \ >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" ;; xlc) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; aix) # The C for AIX Compiler uses -M and outputs the dependencies # in a .u file. In older versions, this file always lives in the # current directory. Also, the AIX compiler puts '$object:' at the # start of each line; $object doesn't have directory information. # Version 6 uses the directory in both cases. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.u tmpdepfile2=$base.u tmpdepfile3=$dir.libs/$base.u "$@" -Wc,-M else tmpdepfile1=$dir$base.u tmpdepfile2=$dir$base.u tmpdepfile3=$dir$base.u "$@" -M fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done aix_post_process_depfile ;; tcc) # tcc (Tiny C Compiler) understand '-MD -MF file' since version 0.9.26 # FIXME: That version still under development at the moment of writing. # Make that this statement remains true also for stable, released # versions. # It will wrap lines (doesn't matter whether long or short) with a # trailing '\', as in: # # foo.o : \ # foo.c \ # foo.h \ # # It will put a trailing '\' even on the last line, and will use leading # spaces rather than leading tabs (at least since its commit 0394caf7 # "Emit spaces for -MD"). "$@" -MD -MF "$tmpdepfile" stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each non-empty line is of the form 'foo.o : \' or ' dep.h \'. # We have to change lines of the first kind to '$object: \'. sed -e "s|.*:|$object :|" < "$tmpdepfile" > "$depfile" # And for each line of the second kind, we have to emit a 'dep.h:' # dummy dependency, to avoid the deleted-header problem. sed -n -e 's|^ *\(.*\) *\\$|\1:|p' < "$tmpdepfile" >> "$depfile" rm -f "$tmpdepfile" ;; ## The order of this option in the case statement is important, since the ## shell code in configure will try each of these formats in the order ## listed in this file. A plain '-MD' option would be understood by many ## compilers, so we must ensure this comes after the gcc and icc options. pgcc) # Portland's C compiler understands '-MD'. # Will always output deps to 'file.d' where file is the root name of the # source file under compilation, even if file resides in a subdirectory. # The object file name does not affect the name of the '.d' file. # pgcc 10.2 will output # foo.o: sub/foo.c sub/foo.h # and will wrap long lines using '\' : # foo.o: sub/foo.c ... \ # sub/foo.h ... \ # ... set_dir_from "$object" # Use the source, not the object, to determine the base name, since # that's sadly what pgcc will do too. set_base_from "$source" tmpdepfile=$base.d # For projects that build the same source file twice into different object # files, the pgcc approach of using the *source* file root name can cause # problems in parallel builds. Use a locking strategy to avoid stomping on # the same $tmpdepfile. lockdir=$base.d-lock trap " echo '$0: caught signal, cleaning up...' >&2 rmdir '$lockdir' exit 1 " 1 2 13 15 numtries=100 i=$numtries while test $i -gt 0; do # mkdir is a portable test-and-set. if mkdir "$lockdir" 2>/dev/null; then # This process acquired the lock. "$@" -MD stat=$? # Release the lock. rmdir "$lockdir" break else # If the lock is being held by a different process, wait # until the winning process is done or we timeout. while test -d "$lockdir" && test $i -gt 0; do sleep 1 i=`expr $i - 1` done fi i=`expr $i - 1` done trap - 1 2 13 15 if test $i -le 0; then echo "$0: failed to acquire lock after $numtries attempts" >&2 echo "$0: check lockdir '$lockdir'" >&2 exit 1 fi if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" # Each line is of the form `foo.o: dependent.h', # or `foo.o: dep1.h dep2.h \', or ` dep3.h dep4.h \'. # Do two passes, one to just change these to # `$object: dependent.h' and one to simply `dependent.h:'. sed "s,^[^:]*:,$object :," < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this invocation # correctly. Breaking it into two sed invocations is a workaround. sed 's,^[^:]*: \(.*\)$,\1,;s/^\\$//;/^$/d;/:$/d' < "$tmpdepfile" \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; hp2) # The "hp" stanza above does not work with aCC (C++) and HP's ia64 # compilers, which have integrated preprocessors. The correct option # to use with these is +Maked; it writes dependencies to a file named # 'foo.d', which lands next to the object file, wherever that # happens to be. # Much of this is similar to the tru64 case; see comments there. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then tmpdepfile1=$dir$base.d tmpdepfile2=$dir.libs/$base.d "$@" -Wc,+Maked else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d "$@" +Maked fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" do test -f "$tmpdepfile" && break done if test -f "$tmpdepfile"; then sed -e "s,^.*\.[$lower]*:,$object:," "$tmpdepfile" > "$depfile" # Add 'dependent.h:' lines. sed -ne '2,${ s/^ *// s/ \\*$// s/$/:/ p }' "$tmpdepfile" >> "$depfile" else make_dummy_depfile fi rm -f "$tmpdepfile" "$tmpdepfile2" ;; tru64) # The Tru64 compiler uses -MD to generate dependencies as a side # effect. 'cc -MD -o foo.o ...' puts the dependencies into 'foo.o.d'. # At least on Alpha/Redhat 6.1, Compaq CCC V6.2-504 seems to put # dependencies in 'foo.d' instead, so we check for that too. # Subdirectories are respected. set_dir_from "$object" set_base_from "$object" if test "$libtool" = yes; then # Libtool generates 2 separate objects for the 2 libraries. These # two compilations output dependencies in $dir.libs/$base.o.d and # in $dir$base.o.d. We have to check for both files, because # one of the two compilations can be disabled. We should prefer # $dir$base.o.d over $dir.libs/$base.o.d because the latter is # automatically cleaned when .libs/ is deleted, while ignoring # the former would cause a distcleancheck panic. tmpdepfile1=$dir$base.o.d # libtool 1.5 tmpdepfile2=$dir.libs/$base.o.d # Likewise. tmpdepfile3=$dir.libs/$base.d # Compaq CCC V6.2-504 "$@" -Wc,-MD else tmpdepfile1=$dir$base.d tmpdepfile2=$dir$base.d tmpdepfile3=$dir$base.d "$@" -MD fi stat=$? if test $stat -ne 0; then rm -f "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" exit $stat fi for tmpdepfile in "$tmpdepfile1" "$tmpdepfile2" "$tmpdepfile3" do test -f "$tmpdepfile" && break done # Same post-processing that is required for AIX mode. aix_post_process_depfile ;; msvc7) if test "$libtool" = yes; then showIncludes=-Wc,-showIncludes else showIncludes=-showIncludes fi "$@" $showIncludes > "$tmpdepfile" stat=$? grep -v '^Note: including file: ' "$tmpdepfile" if test $stat -ne 0; then rm -f "$tmpdepfile" exit $stat fi rm -f "$depfile" echo "$object : \\" > "$depfile" # The first sed program below extracts the file names and escapes # backslashes for cygpath. The second sed program outputs the file # name when reading, but also accumulates all include files in the # hold buffer in order to output them again at the end. This only # works with sed implementations that can handle large buffers. sed < "$tmpdepfile" -n ' /^Note: including file: *\(.*\)/ { s//\1/ s/\\/\\\\/g p }' | $cygpath_u | sort -u | sed -n ' s/ /\\ /g s/\(.*\)/'"$tab"'\1 \\/p s/.\(.*\) \\/\1:/ H $ { s/.*/'"$tab"'/ G p }' >> "$depfile" echo >> "$depfile" # make sure the fragment doesn't end with a backslash rm -f "$tmpdepfile" ;; msvc7msys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; #nosideeffect) # This comment above is used by automake to tell side-effect # dependency tracking mechanisms from slower ones. dashmstdout) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout, regardless of -o. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done test -z "$dashmflag" && dashmflag=-M # Require at least two characters before searching for ':' # in the target name. This is to cope with DOS-style filenames: # a dependency such as 'c:/foo/bar' could be seen as target 'c' otherwise. "$@" $dashmflag | sed "s|^[$tab ]*[^:$tab ][^:][^:]*:[$tab ]*|$object: |" > "$tmpdepfile" rm -f "$depfile" cat < "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process this sed invocation # correctly. Breaking it into two sed invocations is a workaround. tr ' ' "$nl" < "$tmpdepfile" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; dashXmstdout) # This case only exists to satisfy depend.m4. It is never actually # run, as this mode is specially recognized in the preamble. exit 1 ;; makedepend) "$@" || exit $? # Remove any Libtool call if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # X makedepend shift cleared=no eat=no for arg do case $cleared in no) set ""; shift cleared=yes ;; esac if test $eat = yes; then eat=no continue fi case "$arg" in -D*|-I*) set fnord "$@" "$arg"; shift ;; # Strip any option that makedepend may not understand. Remove # the object too, otherwise makedepend will parse it as a source file. -arch) eat=yes ;; -*|$object) ;; *) set fnord "$@" "$arg"; shift ;; esac done obj_suffix=`echo "$object" | sed 's/^.*\././'` touch "$tmpdepfile" ${MAKEDEPEND-makedepend} -o"$obj_suffix" -f"$tmpdepfile" "$@" rm -f "$depfile" # makedepend may prepend the VPATH from the source file name to the object. # No need to regex-escape $object, excess matching of '.' is harmless. sed "s|^.*\($object *:\)|\1|" "$tmpdepfile" > "$depfile" # Some versions of the HPUX 10.20 sed can't process the last invocation # correctly. Breaking it into two sed invocations is a workaround. sed '1,2d' "$tmpdepfile" \ | tr ' ' "$nl" \ | sed -e 's/^\\$//' -e '/^$/d' -e '/:$/d' \ | sed -e 's/$/ :/' >> "$depfile" rm -f "$tmpdepfile" "$tmpdepfile".bak ;; cpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi # Remove '-o $object'. IFS=" " for arg do case $arg in -o) shift ;; $object) shift ;; *) set fnord "$@" "$arg" shift # fnord shift # $arg ;; esac done "$@" -E \ | sed -n -e '/^# [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ -e '/^#line [0-9][0-9]* "\([^"]*\)".*/ s:: \1 \\:p' \ | sed '$ s: \\$::' > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" cat < "$tmpdepfile" >> "$depfile" sed < "$tmpdepfile" '/^$/d;s/^ //;s/ \\$//;s/$/ :/' >> "$depfile" rm -f "$tmpdepfile" ;; msvisualcpp) # Important note: in order to support this mode, a compiler *must* # always write the preprocessed file to stdout. "$@" || exit $? # Remove the call to Libtool. if test "$libtool" = yes; then while test "X$1" != 'X--mode=compile'; do shift done shift fi IFS=" " for arg do case "$arg" in -o) shift ;; $object) shift ;; "-Gm"|"/Gm"|"-Gi"|"/Gi"|"-ZI"|"/ZI") set fnord "$@" shift shift ;; *) set fnord "$@" "$arg" shift shift ;; esac done "$@" -E 2>/dev/null | sed -n '/^#line [0-9][0-9]* "\([^"]*\)"/ s::\1:p' | $cygpath_u | sort -u > "$tmpdepfile" rm -f "$depfile" echo "$object : \\" > "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::'"$tab"'\1 \\:p' >> "$depfile" echo "$tab" >> "$depfile" sed < "$tmpdepfile" -n -e 's% %\\ %g' -e '/^\(.*\)$/ s::\1\::p' >> "$depfile" rm -f "$tmpdepfile" ;; msvcmsys) # This case exists only to let depend.m4 do its work. It works by # looking at the text of this script. This case will never be run, # since it is checked for above. exit 1 ;; none) exec "$@" ;; *) echo "Unknown depmode $depmode" 1>&2 exit 1 ;; esac exit 0 # Local Variables: # mode: shell-script # sh-indentation: 2 # eval: (add-hook 'write-file-hooks 'time-stamp) # time-stamp-start: "scriptversion=" # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC" # time-stamp-end: "; # UTC" # End: freeipmi-1.6.4/libfreeipmi/0000755002055400205540000000000013527342543015551 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/0000755002055400205540000000000013527342543017174 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/0000755002055400205540000000000013527342543020774 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/freeipmi.h.in0000644002055400205540000003122413527331636023355 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2012 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef FREEIPMI_H #define FREEIPMI_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #include #define FREEIPMI_PACKAGE_VERSION @PACKAGE_VERSION@ #define FREEIPMI_PACKAGE_VERSION_MAJOR @FREEIPMI_PACKAGE_VERSION_MAJOR@ #define FREEIPMI_PACKAGE_VERSION_MINOR @FREEIPMI_PACKAGE_VERSION_MINOR@ #define FREEIPMI_PACKAGE_VERSION_PATCH @FREEIPMI_PACKAGE_VERSION_PATCH@ /* * Libfreeipmi version * * MAJOR - Incremented when interfaces are changed or removed. * Interfaces may be binary incompatible. When incremented, MINOR * and PATCH are zeroed. * * MINOR - Incremented when interfaces are added. Interfaces are * binary compatible with older minor versions. When incremented, * PATCH is zeroed. * * PATCH - Incremented when interfaces are not changed. Typically * incremented due to bug fixes or minor features. Interfaces are * forward and backward compatible to other PATCH versions. */ #define LIBFREEIPMI_VERSION_MAJOR @LIBFREEIPMI_VERSION_MAJOR@ #define LIBFREEIPMI_VERSION_MINOR @LIBFREEIPMI_VERSION_MINOR@ #define LIBFREEIPMI_VERSION_PATCH @LIBFREEIPMI_VERSION_PATCH@ #ifdef __cplusplus } #endif #endif /* FREEIPMI_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/0000755002055400205540000000000013527342543021545 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-api.h0000644002055400205540000003604013527331636023427 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_API_H #define IPMI_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* ERROR CODE NOTES * * IPMI_ERR_BMC_BUSY vs IPMI_ERR_DRIVER_BUSY * * BMC_BUSY indicates the BMC cannot handle more requests, it is an * error typically from a completion code returned from the BMC. The * DRIVER_BUSY error indicates a driver is too busy to handle * additional requests, the error does not come from the BMC. * * IPMI_ERR_MESSAGE_TIMEOUT * * message timeout is typical of bridging commands. The * session/connection has not timed out and is fine, but a * bridging command could not get its bridged response back in a * reasonable timeframe. */ /* IPMI COMPLETION CODE / RMCPPLUS CODE MAPPING * * For most users, the high level error codes listed below will * suffice. However, for those who want/need to see deeper IPMI * completion code or RMCPPlus errors, the following are mappings of * IPMI completion codes and RMCPPlus codes to their respective error * codes. * * Not that other factors outside of completion codes/RMCPPlus codes * could also lead to these IPMI errors. For example, depending on * motherboard support of username types, a IPMI_ERR_USERNAME_INVALID * could be returned even though no IPMI error occurred. In addition, * completion codes/RMCPPlus codes could map to different error codes, * depending on when the error occurred (such as during session * authentication vs. after authentication). * * (*) - Completion code is specific to an IPMI command * * IPMI_ERR_USERNAME_INVALID * - IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME (*) * - IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED (*) * * IPMI_ERR_PASSWORD_INVALID * - RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE * * IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT * - IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL * * IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED * - IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL (*) * - IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL * - IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER (*) * - IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT (*) * - RMCPPLUS_STATUS_INVALID_ROLE * - RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED * * IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE * - RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS * * IPMI_ERR_MESSAGE_TIMEOUT * - IPMI_COMP_CODE_COMMAND_TIMEOUT * * IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED * - IPMI_COMP_CODE_INVALID_COMMAND * - IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN * - IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID * - IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED * - IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE * - IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST * * IPMI_ERR_BMC_BUSY * - IPMI_COMP_CODE_NODE_BUSY * - IPMI_COMP_CODE_OUT_OF_SPACE * - IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE * - IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE * - IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS * * All other IPMI completion codes will map to IPMI_ERR_BAD_COMPLETION_CODE. * All other RMCPPlus codes will map to IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE. */ enum ipmi_errnum { IPMI_ERR_SUCCESS = 0, IPMI_ERR_CTX_NULL = 1, IPMI_ERR_CTX_INVALID = 2, IPMI_ERR_PERMISSION = 3, IPMI_ERR_USERNAME_INVALID = 4, IPMI_ERR_PASSWORD_INVALID = 5, IPMI_ERR_K_G_INVALID = 6, IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT = 7, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED = 8, IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE = 9, IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE = 10, IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT = 11, IPMI_ERR_IPMI_2_0_UNAVAILABLE = 12, IPMI_ERR_CONNECTION_TIMEOUT = 13, IPMI_ERR_SESSION_TIMEOUT = 14, IPMI_ERR_DEVICE_ALREADY_OPEN = 15, IPMI_ERR_DEVICE_NOT_OPEN = 16, IPMI_ERR_DEVICE_NOT_SUPPORTED = 17, IPMI_ERR_DEVICE_NOT_FOUND = 18, IPMI_ERR_DRIVER_BUSY = 19, IPMI_ERR_DRIVER_TIMEOUT = 20, IPMI_ERR_MESSAGE_TIMEOUT = 21, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE = 22, IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED = 23, IPMI_ERR_BAD_COMPLETION_CODE = 24, IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE = 25, IPMI_ERR_NOT_FOUND = 26, IPMI_ERR_BMC_BUSY = 27, IPMI_ERR_OUT_OF_MEMORY = 28, IPMI_ERR_HOSTNAME_INVALID = 29, IPMI_ERR_PARAMETERS = 30, IPMI_ERR_DRIVER_PATH_REQUIRED = 31, IPMI_ERR_IPMI_ERROR = 32, IPMI_ERR_SYSTEM_ERROR = 33, IPMI_ERR_INTERNAL_ERROR = 34, IPMI_ERR_ERRNUMRANGE = 35, }; typedef enum ipmi_errnum ipmi_errnum_type_t; enum ipmi_driver_type { IPMI_DEVICE_UNKNOWN = 0, IPMI_DEVICE_LAN = 1, IPMI_DEVICE_LAN_2_0 = 2, IPMI_DEVICE_KCS = 3, IPMI_DEVICE_SMIC = 4, IPMI_DEVICE_BT = 5, IPMI_DEVICE_SSIF = 6, IPMI_DEVICE_OPENIPMI = 7, IPMI_DEVICE_SUNBMC = 8, IPMI_DEVICE_INTELDCMI = 9, }; typedef enum ipmi_driver_type ipmi_driver_type_t; #define IPMI_SESSION_TIMEOUT_DEFAULT 20000 #define IPMI_RETRANSMISSION_TIMEOUT_DEFAULT 1000 #define IPMI_WORKAROUND_FLAGS_DEFAULT 0x00000000 /* For use w/ ipmi_ctx_open_outofband() */ #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES 0x00000001 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO 0x00000002 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION 0x00000004 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE 0x00000008 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER 0x00000010 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK 0x00000020 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK 0x00000040 /* For use w/ ipmi_ctx_open_outofband_2_0() */ #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES 0x00000001 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION 0x00000002 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION 0x00000004 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION 0x00000008 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE 0x00000010 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE 0x00000020 #define IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK 0x00000040 /* For use w/ ipmi_ctx_open_inband() or ipmi_ctx_find_inband() */ #define IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS 0x00000001 #define IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL 0x00000002 /* NONBLOCKING - for inband only, do no block if device busy. * * NOSESSION - for outofband only, do not create an IPMI session. * Useful for the few IPMI payloads that do not require a session for * an IPMI command to be sent (e.g. Get Channel Authentication * Capabilities, Get System GUID, PET Acknowledge). Can only be set * during opening, not later using ipmi_ctx_set_flags(). If set, you * cannot call most IPMI payload functions, only those few that send * data without a session. * * DEBUG_DUMP - for all interfaces * * NO_VALID_CHECK - do not check if IPMI response payloads are valid * (i.e. all required fields set). Useful to workaround non-compliant * motherboards. For example, if an IPMI payload did not return a * required flag in the payload, an error would be returned. The * error might possibly be a session timeout, as no valid response * packet was ever received. This flag would skip the checks for * valid fields and return the packet to the user. * * NO_LEGAL_CHECK - do no check if IPMI response payloads have * sufficient data (i.e. completion code fields) to be legal. Useful * to work around non-compliant motherboards. This flag is ignores * the legality of IPMI payloads greater than the NO_VALID_CHECK * option. For example, NO_VALID_CHECK would still return an error if * an IPMI payload did not return a completion code in an IPMI * response. The NO_LEGAL_CHECK would return such a packet to the * user without an error. If the payload did not return a completion * code, the completion code will not be checked for. * * IGNORE_AUTHENTICATION_CODE - for IPMI 1.5 packets, do not check the * authentication code on response packets. Useful to workaround * around non-compliant motherboards implementing invalid code/hashes. * Note that this is different than * IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK above. With the * workaround flag, all authentication codes will be ignored during * the entire IPMI session. With this flag, specific packets can have * their authentication codes ignored. */ #define IPMI_FLAGS_DEFAULT 0x00000000 #define IPMI_FLAGS_NONBLOCKING 0x00000001 #define IPMI_FLAGS_NOSESSION 0x00000002 #define IPMI_FLAGS_DEBUG_DUMP 0x00000010 #define IPMI_FLAGS_NO_VALID_CHECK 0x00000100 #define IPMI_FLAGS_NO_LEGAL_CHECK 0x00000200 #define IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE 0x00000400 typedef struct ipmi_ctx *ipmi_ctx_t; ipmi_ctx_t ipmi_ctx_create (void); int ipmi_ctx_errnum (ipmi_ctx_t ctx); char *ipmi_ctx_strerror (int errnum); char *ipmi_ctx_errormsg (ipmi_ctx_t ctx); int ipmi_ctx_get_flags (ipmi_ctx_t ctx, unsigned int *flags); /* for changing flags mid-operation for corner cases */ int ipmi_ctx_set_flags (ipmi_ctx_t ctx, unsigned int flags); /* For IPMI 1.5 sessions */ /* For session_timeout and retransmission_timeout, specify 0 for default */ int ipmi_ctx_open_outofband (ipmi_ctx_t ctx, const char *hostname, const char *username, const char *password, uint8_t authentication_type, uint8_t privilege_level, unsigned int session_timeout, unsigned int retransmission_timeout, unsigned int workaround_flags, unsigned int flags); /* For IPMI 2.0 sessions */ /* For session_timeout and retransmission_timeout, specify 0 for default */ int ipmi_ctx_open_outofband_2_0 (ipmi_ctx_t ctx, const char *hostname, const char *username, const char *password, const unsigned char *k_g, unsigned int k_g_len, uint8_t privilege_level, uint8_t cipher_suite_id, unsigned int session_timeout, unsigned int retransmission_timeout, unsigned int workaround_flags, unsigned int flags); /* For inband sessions */ int ipmi_ctx_open_inband (ipmi_ctx_t ctx, ipmi_driver_type_t driver_type, int disable_auto_probe, uint16_t driver_address, uint8_t register_spacing, const char *driver_device, unsigned int workaround_flags, unsigned int flags); /* like ipmi_ctx_open_inband, but finds probes/discovers an inband device */ /* returns 1 on driver found, 0 on not found, -1 on error */ /* if specified, driver type returned in 'driver_type' */ int ipmi_ctx_find_inband (ipmi_ctx_t ctx, ipmi_driver_type_t *driver_type, int disable_auto_probe, uint16_t driver_address, uint8_t register_spacing, const char *driver_device, unsigned int workaround_flags, unsigned int flags); /* Set target channel and slave address so all ipmi_cmd() calls and * library API calls use ipmb. * * To set only one parameter, pass in NULL for the other parameter. * When only one parameter is passed, the other will be the default * target channel of IPMI_CHANNEL_NUMBER_PRIMARY_IPMB (0x0) or the * default rs_addr of IPMI_SLAVE_ADDRESS_BMC (0x20). * * To reset to defaults, pass in NULL for both parameters. * * Can only be called after device opened. */ int ipmi_ctx_set_target (ipmi_ctx_t ctx, uint8_t *channel_number, uint8_t *rs_addr); int ipmi_ctx_get_target (ipmi_ctx_t ctx, uint8_t *channel_number, uint8_t *rs_addr); int ipmi_cmd (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); /* convenience function to perform a single bridged IPMI command. * Will effectively call ipmi_ctx_set_target(), then ipmi_cmd(), then * will set targets back to prior originals. */ int ipmi_cmd_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); /* for request/response, byte #1 = cmd */ /* for response, byte #2 (typically) = completion code */ /* returns length written into buf_fs on success, -1 on error */ int ipmi_cmd_raw (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); /* convenience function to perform a single bridged IPMI raw command. * Will effectively call ipmi_ctx_set_target(), then ipmi_cmd_raw(), * then will set targets back to prior originals. */ int ipmi_cmd_raw_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int ipmi_ctx_close (ipmi_ctx_t ctx); void ipmi_ctx_destroy (ipmi_ctx_t ctx); #ifdef __cplusplus } #endif #endif /* IPMI_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-chassis-cmds-api.h0000644002055400205540000002447313527331636026015 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHASSIS_CMDS_API_H #define IPMI_CHASSIS_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_chassis_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_chassis_status (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_chassis_control (ipmi_ctx_t ctx, uint8_t chassis_control, fiid_obj_t obj_cmd_rs); int ipmi_cmd_chassis_identify (ipmi_ctx_t ctx, const uint8_t *identify_interval, const uint8_t *force_identify, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_front_panel_enables (ipmi_ctx_t ctx, uint8_t disable_power_off_button_for_power_off_only, uint8_t disable_reset_button, uint8_t disable_diagnostic_interrupt_button, uint8_t disable_standby_button_for_entering_standby, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_power_restore_policy (ipmi_ctx_t ctx, uint8_t power_restore_policy, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_power_cycle_interval (ipmi_ctx_t ctx, uint8_t interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_restart_cause (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t parameter_valid, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_set_in_progress (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t dont_clear_on_power_up, uint8_t dont_clear_on_pushbutton_reset_soft_reset, uint8_t dont_clear_on_watchdog_timeout, uint8_t dont_clear_on_chassis_control, uint8_t dont_clear_on_PEF, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx, uint8_t parameter_valid, const uint8_t *bios_or_post_handled_boot_info, const uint8_t *os_loader_handled_boot_info, const uint8_t *os_or_service_partition_handled_boot_info, const uint8_t *sms_handled_boot_info, const uint8_t *oem_handled_boot_info, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_boot_flags (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t bios_boot_type, uint8_t boot_flags_persistent, uint8_t boot_flags_valid, uint8_t lock_out_reset_button, uint8_t screen_blank, uint8_t boot_device, uint8_t lock_keyboard, uint8_t cmos_clear, uint8_t console_redirection, uint8_t lock_out_sleep_button, uint8_t user_password_bypass, uint8_t force_progress_event_traps, uint8_t firmware_bios_verbosity, uint8_t lock_out_via_power_button, uint8_t bios_mux_control_override, uint8_t bios_shared_mode_override, uint8_t device_instance_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t boot_source_channel_number, uint32_t session_id, uint32_t boot_info_timestamp, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t set_selector, const void *block_data, unsigned int block_data_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_set_in_progress (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_service_partition_selector (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_service_partition_scan (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_boot_flags (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_power_on_hours_counter (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_CHASSIS_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-dcmi-cmds-api.h0000644002055400205540000002615313527331636025271 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_CMDS_API_H #define IPMI_DCMI_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_dcmi_get_dcmi_capability_info (ipmi_ctx_t ctx, uint8_t parameter_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t activate, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t option_12, uint8_t option_60_with_option_43, uint8_t random_back_off, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t initial_timeout_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx, uint8_t set_selector, uint16_t server_contact_timeout_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx, uint8_t set_selector, uint16_t server_contact_retry_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_asset_tag (ipmi_ctx_t ctx, uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_asset_tag (ipmi_ctx_t ctx, uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_management_controller_identifier_string (ipmi_ctx_t ctx, uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_management_controller_identifier_string (ipmi_ctx_t ctx, uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_dcmi_sensor_info (ipmi_ctx_t ctx, uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_power_reading (ipmi_ctx_t ctx, uint8_t mode, uint8_t mode_attributes, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_power_limit (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_power_limit (ipmi_ctx_t ctx, uint8_t exception_actions, uint16_t power_limit_requested, uint32_t correction_time_limit, uint16_t management_application_statistics_sampling_period, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_activate_deactivate_power_limit (ipmi_ctx_t ctx, uint8_t power_limit_activation, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_thermal_limit (ipmi_ctx_t ctx, uint8_t entity_id, uint8_t entity_instance, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_set_thermal_limit (ipmi_ctx_t ctx, uint8_t entity_id, uint8_t entity_instance, uint8_t temperature_limit, uint8_t exception_actions_log_event_to_sel_only, uint8_t exception_actions_hard_power_off_system_and_log_event, uint16_t exception_time, fiid_obj_t obj_cmd_rs); int ipmi_cmd_dcmi_get_temperature_reading (ipmi_ctx_t ctx, uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_DCMI_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-device-global-cmds-api.h0000644002055400205540000000361613527331636027051 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_GLOBAL_CMDS_API_H #define IPMI_DEVICE_GLOBAL_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_device_id (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_cold_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_warm_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_acpi_power_state (ipmi_ctx_t ctx, uint8_t system_power_state_enumeration, uint8_t set_system_power_state, uint8_t device_power_state_enumeration, uint8_t set_device_power_state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_acpi_power_state (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_self_test_results (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_device_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_GLOBAL_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-event-cmds-api.h0000644002055400205540000000452313527331636025473 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_CMDS_API_H #define IPMI_EVENT_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_event_receiver (ipmi_ctx_t ctx, uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_event_receiver_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_event_receiver (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); /* generator_id is optional */ int ipmi_cmd_platform_event (ipmi_ctx_t ctx, uint8_t *generator_id, uint8_t event_message_format_version, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_type_code, uint8_t event_dir, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h0000644002055400205540000001522013527331636033406 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_netfn_support (ipmi_ctx_t ctx, uint8_t channel_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_command_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_command_sub_function_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_configurable_commands (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_configurable_command_sub_functions (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_command_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint8_t *enable_disable_bitmask, unsigned int enable_disable_bitmask_len, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_command_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_command_sub_function_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_command_sub_function_enables_defining_body_code (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint8_t defining_body_code, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_command_sub_function_enables_oem_iana (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t oem_iana, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_command_sub_function_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_oem_netfn_iana_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t list_index, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-fru-inventory-device-cmds-api.h0000644002055400205540000000615613527331636030442 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H #define IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_fru_inventory_area_info (ipmi_ctx_t ctx, uint8_t fru_device_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_read_fru_data (ipmi_ctx_t ctx, uint8_t fru_device_id, uint16_t fru_inventory_offset_to_read, uint8_t count_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_write_fru_data (ipmi_ctx_t ctx, uint8_t fru_device_id, uint16_t fru_inventory_offset_to_write, const void *data_to_write, unsigned int data_to_write_len, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_FRU_INVENTORY_DEVICE_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-lan-cmds-api.h0000644002055400205540000015704613527331636025135 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CMDS_API_H #define IPMI_LAN_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_lan_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t callback_level_none, uint8_t callback_level_md2, uint8_t callback_level_md5, uint8_t callback_level_straight_password, uint8_t callback_level_oem_proprietary, uint8_t user_level_none, uint8_t user_level_md2, uint8_t user_level_md5, uint8_t user_level_straight_password, uint8_t user_level_oem_proprietary, uint8_t operator_level_none, uint8_t operator_level_md2, uint8_t operator_level_md5, uint8_t operator_level_straight_password, uint8_t operator_level_oem_proprietary, uint8_t admin_level_none, uint8_t admin_level_md2, uint8_t admin_level_md5, uint8_t admin_level_straight_password, uint8_t admin_level_oem_proprietary, uint8_t oem_level_none, uint8_t oem_level_md2, uint8_t oem_level_md5, uint8_t oem_level_straight_password, uint8_t oem_level_oem_proprietary, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t ip_address_source, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t subnet_mask, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t time_to_live, uint8_t flags, uint8_t type_of_service, uint8_t precedence, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t primary_rmcp_port_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t secondary_rmcp_port_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bmc_generated_gratuitous_arps, uint8_t bmc_generated_arp_responses, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t gratuitous_arp_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_community_string (ipmi_ctx_t ctx, uint8_t channel_number, const char *community_string, unsigned int community_string_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t destination_type, uint8_t alert_acknowledge, uint8_t alert_acknowledge_timeout, uint8_t retries, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t gateway_selector, uint32_t alerting_ip_address, uint64_t alerting_mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t vlan_id, uint8_t vlan_id_enable, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t vlan_priority, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t maximum_privilege_for_cipher_suite_1, uint8_t maximum_privilege_for_cipher_suite_2, uint8_t maximum_privilege_for_cipher_suite_3, uint8_t maximum_privilege_for_cipher_suite_4, uint8_t maximum_privilege_for_cipher_suite_5, uint8_t maximum_privilege_for_cipher_suite_6, uint8_t maximum_privilege_for_cipher_suite_7, uint8_t maximum_privilege_for_cipher_suite_8, uint8_t maximum_privilege_for_cipher_suite_9, uint8_t maximum_privilege_for_cipher_suite_10, uint8_t maximum_privilege_for_cipher_suite_11, uint8_t maximum_privilege_for_cipher_suite_12, uint8_t maximum_privilege_for_cipher_suite_13, uint8_t maximum_privilege_for_cipher_suite_14, uint8_t maximum_privilege_for_cipher_suite_15, uint8_t maximum_privilege_for_cipher_suite_16, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_disabled_event_message, uint8_t bad_password_threshold_number, uint16_t attempt_count_reset_interval, uint16_t user_lockout_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t enables, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t traffic_class, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t static_hop_limit, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_flow_label (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t flow_label, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t set_selector, uint8_t source, uint8_t enable, uint8_t address[IPMI_IPV6_BYTES], uint8_t address_prefix_length, uint8_t address_status, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t enable_static_router_address, uint8_t enable_dynamic_router_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_authentication_type_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_community_string (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_number_of_destinations (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_flow_label (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_status (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_suspend_bmc_arps (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t gratuitous_arp_suspend, uint8_t arp_response_suspend, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_ip_udp_rmcp_statistics (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t clear_all_statistics, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-messaging-support-cmds-api.h0000644002055400205540000005730613527331636030050 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_MESSAGING_SUPPORT_CMDS_API_H #define IPMI_MESSAGING_SUPPORT_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_bmc_global_enables (ipmi_ctx_t ctx, uint8_t receive_message_queue_interrupt, uint8_t event_message_buffer_full_interrupt, uint8_t event_message_buffer, uint8_t system_event_logging, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_bmc_global_enables (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_clear_message_flags (ipmi_ctx_t ctx, uint8_t receive_message_queue, uint8_t event_message_buffer, uint8_t watchdog_pre_timeout_interrupt_flag, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_message_flags (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_enable_message_channel_receive (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t channel_operation, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_message (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_send_message (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t message_authentication, uint8_t message_encryption, uint8_t tracking_operation, const void *message_data, unsigned int message_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_read_event_message_buffer (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_interface_capabilities (ipmi_ctx_t ctx, uint8_t system_interface, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_interface_capabilities_ssif (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_interface_capabilities_kcs (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_bt_interface_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_master_write_read (ipmi_ctx_t ctx, uint8_t bus_type, uint8_t bus_id, uint8_t channel_number, uint8_t slave_address, uint8_t read_count, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_channel_authentication_capabilities (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t maximum_privilege_level, uint8_t get_ipmi_v20_extended_data, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_operating_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_bmc_url (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_operating_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_bmc_url (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_session_challenge (ipmi_ctx_t ctx, uint8_t authentication_type, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_activate_session (ipmi_ctx_t ctx, uint8_t authentication_type, uint8_t maximum_privilege_level, const void *challenge_string, unsigned int challenge_string_len, uint32_t initial_outbound_sequence_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_session_privilege_level (ipmi_ctx_t ctx, uint8_t privilege_level, fiid_obj_t obj_cmd_rs); int ipmi_cmd_close_session (ipmi_ctx_t ctx, uint32_t session_id, uint8_t *session_handle, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_channel_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t ipmi_messaging_access_mode, uint8_t user_level_authentication, uint8_t per_message_authentication, uint8_t pef_alerting, uint8_t channel_access_set, uint8_t channel_privilege_level_limit, uint8_t channel_privilege_level_limit_set, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_channel_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t channel_access_get, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_channel_info (ipmi_ctx_t ctx, uint8_t channel_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_channel_security_keys (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t operation, uint8_t key_id, const void *key_value, unsigned int key_value_len, fiid_obj_t obj_cmd_rq); int ipmi_cmd_set_user_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_ipmi_messaging, uint8_t user_link_authentication, uint8_t user_restricted_to_callback, uint8_t change_bits_in_byte, uint8_t user_id, uint8_t user_privilege_level_limit, uint8_t user_session_number_limit, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_user_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_user_name (ipmi_ctx_t ctx, uint8_t user_id, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_user_name (ipmi_ctx_t ctx, uint8_t user_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_user_password (ipmi_ctx_t ctx, uint8_t user_id, uint8_t password_size, uint8_t operation, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_MESSAGING_SUPPORT_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h0000644002055400205540000006015613527331636030602 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H #define IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ /******************************************* * Intel * *******************************************/ /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ int ipmi_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t policy_enable_disable, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint16_t policy_target_limit, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint8_t platform_booting_mode, uint8_t cores_disabled, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, uint16_t *alert_threshold1, uint16_t *alert_threshold2, uint16_t *alert_threshold3, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, uint8_t *policy1_suspend_start_time, uint8_t *policy1_suspend_stop_time, uint8_t *policy1_suspend_period_recurrence_monday, uint8_t *policy1_suspend_period_recurrence_tuesday, uint8_t *policy1_suspend_period_recurrence_wednesday, uint8_t *policy1_suspend_period_recurrence_thursday, uint8_t *policy1_suspend_period_recurrence_friday, uint8_t *policy1_suspend_period_recurrence_saturday, uint8_t *policy1_suspend_period_recurrence_sunday, uint8_t *policy2_suspend_start_time, uint8_t *policy2_suspend_stop_time, uint8_t *policy2_suspend_period_recurrence_monday, uint8_t *policy2_suspend_period_recurrence_tuesday, uint8_t *policy2_suspend_period_recurrence_wednesday, uint8_t *policy2_suspend_period_recurrence_thursday, uint8_t *policy2_suspend_period_recurrence_friday, uint8_t *policy2_suspend_period_recurrence_saturday, uint8_t *policy2_suspend_period_recurrence_sunday, uint8_t *policy3_suspend_start_time, uint8_t *policy3_suspend_stop_time, uint8_t *policy3_suspend_period_recurrence_monday, uint8_t *policy3_suspend_period_recurrence_tuesday, uint8_t *policy3_suspend_period_recurrence_wednesday, uint8_t *policy3_suspend_period_recurrence_thursday, uint8_t *policy3_suspend_period_recurrence_friday, uint8_t *policy3_suspend_period_recurrence_saturday, uint8_t *policy3_suspend_period_recurrence_sunday, uint8_t *policy4_suspend_start_time, uint8_t *policy4_suspend_stop_time, uint8_t *policy4_suspend_period_recurrence_monday, uint8_t *policy4_suspend_period_recurrence_tuesday, uint8_t *policy4_suspend_period_recurrence_wednesday, uint8_t *policy4_suspend_period_recurrence_thursday, uint8_t *policy4_suspend_period_recurrence_friday, uint8_t *policy4_suspend_period_recurrence_saturday, uint8_t *policy4_suspend_period_recurrence_sunday, uint8_t *policy5_suspend_start_time, uint8_t *policy5_suspend_stop_time, uint8_t *policy5_suspend_period_recurrence_monday, uint8_t *policy5_suspend_period_recurrence_tuesday, uint8_t *policy5_suspend_period_recurrence_wednesday, uint8_t *policy5_suspend_period_recurrence_thursday, uint8_t *policy5_suspend_period_recurrence_friday, uint8_t *policy5_suspend_period_recurrence_saturday, uint8_t *policy5_suspend_period_recurrence_sunday, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_reset_node_manager_statistics (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_statistics (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_capabilities (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_version (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint16_t minimum_power_draw, uint16_t maximum_power_draw, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_information, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t slave_address, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_selector, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_node_manager_alert_destination (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t cpu_socket_number, uint8_t active_cores_configuration, uint8_t turbo_ratio_limit, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t cpu_socket_number, uint8_t active_cores_configuration, fiid_obj_t obj_cmd_rs); int ipmi_cmd_oem_intel_node_manager_get_limiting_policy_id (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_OEM_INTEL_NODE_MANAGER_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-pef-and-alerting-cmds-api.h0000644002055400205540000004045213527331636027470 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PEF_AND_ALERTING_CMDS_API_H #define IPMI_PEF_AND_ALERTING_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_pef_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_arm_pef_postpone_timer (ipmi_ctx_t ctx, uint8_t pef_postpone_timeout, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx, uint8_t pef, uint8_t pef_event_messages, uint8_t pef_startup_delay, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx, uint8_t alert_action, uint8_t power_down_action, uint8_t reset_action, uint8_t power_cycle_action, uint8_t oem_action, uint8_t diagnostic_interrupt, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx, uint8_t pef_startup_delay, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx, uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, uint8_t event_filter_action_alert, uint8_t event_filter_action_power_off, uint8_t event_filter_action_reset, uint8_t event_filter_action_power_cycle, uint8_t event_filter_action_oem, uint8_t event_filter_action_diagnostic_interrupt, uint8_t event_filter_action_group_control_operation, uint8_t alert_policy_number_policy_number, uint8_t alert_policy_number_group_control_selector, uint8_t event_severity, uint8_t generator_id_byte1, uint8_t generator_id_byte2, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_trigger, uint16_t event_data1_offset_mask, uint8_t event_data1_AND_mask, uint8_t event_data1_compare1, uint8_t event_data1_compare2, uint8_t event_data2_AND_mask, uint8_t event_data2_compare1, uint8_t event_data2_compare2, uint8_t event_data3_AND_mask, uint8_t event_data3_compare1, uint8_t event_data3_compare2, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx, uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx, uint8_t alert_policy_entry_number, uint8_t policy_type, uint8_t policy_enabled, uint8_t policy_number, uint8_t destination_selector, uint8_t channel_number, uint8_t alert_string_set_selector, uint8_t event_specific_alert_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx, uint8_t string_selector, uint8_t filter_number, uint8_t set_number_for_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_pef_configuration_parameters_alert_strings (ipmi_ctx_t ctx, uint8_t string_selector, uint8_t block_selector, const uint8_t *string_data, unsigned int string_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_alert_string (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_last_processed_event_id (ipmi_ctx_t ctx, uint8_t set_record_id_for_last_record, uint16_t record_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_last_processed_event_id (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_alert_immediate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t operation, uint8_t string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs); int ipmi_cmd_pet_acknowledge (ipmi_ctx_t ctx, uint16_t sequence_number, uint32_t local_timestamp, uint8_t event_source_type, uint8_t sensor_device, uint8_t sensor_number, uint32_t event_data, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_PEF_AND_ALERTING_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h0000644002055400205540000000513613527331636032121 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H #define IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_user_payload_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, uint8_t operation, uint8_t standard_payload_1, uint8_t standard_payload_2, uint8_t standard_payload_3, uint8_t standard_payload_4, uint8_t standard_payload_5, uint8_t standard_payload_6, uint8_t standard_payload_7, uint8_t oem_payload_0, uint8_t oem_payload_1, uint8_t oem_payload_2, uint8_t oem_payload_3, uint8_t oem_payload_4, uint8_t oem_payload_5, uint8_t oem_payload_6, uint8_t oem_payload_7, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_user_payload_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-sdr-repository-cmds-api.h0000644002055400205540000000401713527331636027355 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_REPOSITORY_CMDS_API_H #define IPMI_SDR_REPOSITORY_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_sdr_repository_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sdr_repository_allocation_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_reserve_sdr_repository (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sdr (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sdr_repository_time (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sdr_repository_time (ipmi_ctx_t ctx, uint32_t time, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SDR_REPOSITORY_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-sensor-cmds-api.h0000644002055400205540000003174313527331636025667 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_CMDS_API_H #define IPMI_SENSOR_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_device_sdr_info (ipmi_ctx_t ctx, uint8_t operation, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_device_sdr (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_reserve_device_sdr_repository (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int ipmi_cmd_set_sensor_hysteresis (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t hysteresis_mask, uint8_t positive_going_threshold_hysteresis_value, uint8_t negative_going_threshold_hysteresis_value, fiid_obj_t obj_cmd_rs); /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int ipmi_cmd_get_sensor_hysteresis (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t hysteresis_mask, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sensor_thresholds (ipmi_ctx_t ctx, uint8_t sensor_number, const uint8_t *lower_non_critical_threshold, const uint8_t *lower_critical_threshold, const uint8_t *lower_non_recoverable_threshold, const uint8_t *upper_non_critical_threshold, const uint8_t *upper_critical_threshold, const uint8_t *upper_non_recoverable_threshold, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_thresholds (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sensor_event_enable (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sensor_event_enable_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_lower_non_critical_going_low, uint8_t assertion_event_lower_non_critical_going_high, uint8_t assertion_event_lower_critical_going_low, uint8_t assertion_event_lower_critical_going_high, uint8_t assertion_event_lower_non_recoverable_going_low, uint8_t assertion_event_lower_non_recoverable_going_high, uint8_t assertion_event_upper_non_critical_going_low, uint8_t assertion_event_upper_non_critical_going_high, uint8_t assertion_event_upper_critical_going_low, uint8_t assertion_event_upper_critical_going_high, uint8_t assertion_event_upper_non_recoverable_going_low, uint8_t assertion_event_upper_non_recoverable_going_high, uint8_t deassertion_event_lower_non_critical_going_low, uint8_t deassertion_event_lower_non_critical_going_high, uint8_t deassertion_event_lower_critical_going_low, uint8_t deassertion_event_lower_critical_going_high, uint8_t deassertion_event_lower_non_recoverable_going_low, uint8_t deassertion_event_lower_non_recoverable_going_high, uint8_t deassertion_event_upper_non_critical_going_low, uint8_t deassertion_event_upper_non_critical_going_high, uint8_t deassertion_event_upper_critical_going_low, uint8_t deassertion_event_upper_critical_going_high, uint8_t deassertion_event_upper_non_recoverable_going_low, uint8_t deassertion_event_upper_non_recoverable_going_high, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sensor_event_enable_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_state_bit_0, uint8_t assertion_event_state_bit_1, uint8_t assertion_event_state_bit_2, uint8_t assertion_event_state_bit_3, uint8_t assertion_event_state_bit_4, uint8_t assertion_event_state_bit_5, uint8_t assertion_event_state_bit_6, uint8_t assertion_event_state_bit_7, uint8_t assertion_event_state_bit_8, uint8_t assertion_event_state_bit_9, uint8_t assertion_event_state_bit_10, uint8_t assertion_event_state_bit_11, uint8_t assertion_event_state_bit_12, uint8_t assertion_event_state_bit_13, uint8_t assertion_event_state_bit_14, uint8_t deassertion_event_state_bit_0, uint8_t deassertion_event_state_bit_1, uint8_t deassertion_event_state_bit_2, uint8_t deassertion_event_state_bit_3, uint8_t deassertion_event_state_bit_4, uint8_t deassertion_event_state_bit_5, uint8_t deassertion_event_state_bit_6, uint8_t deassertion_event_state_bit_7, uint8_t deassertion_event_state_bit_8, uint8_t deassertion_event_state_bit_9, uint8_t deassertion_event_state_bit_10, uint8_t deassertion_event_state_bit_11, uint8_t deassertion_event_state_bit_12, uint8_t deassertion_event_state_bit_13, uint8_t deassertion_event_state_bit_14, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_event_enable (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_event_enable_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_event_enable_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_re_arm_sensor_events (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rs); int ipmi_cmd_re_arm_sensor_events_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t lun, uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_reading (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_reading_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t lun, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_reading_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sensor_reading_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sensor_reading_and_event_status (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t sensor_reading_operation, uint8_t deassertion_bits_operation, uint8_t assertion_bits_operation, uint8_t event_data_bytes_operation, uint8_t sensor_reading, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-sel-cmds-api.h0000644002055400205540000000603713527331636025137 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_CMDS_API_H #define IPMI_SEL_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_get_sel_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sel_allocation_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_reserve_sel (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sel_entry (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs); int ipmi_cmd_delete_sel_entry (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, fiid_obj_t obj_cmd_rs); int ipmi_cmd_clear_sel (ipmi_ctx_t ctx, uint16_t reservation_id, uint8_t operation, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sel_time (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sel_time (ipmi_ctx_t ctx, uint32_t time, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sel_time_utc_offset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sel_time_utc_offset (ipmi_ctx_t ctx, int16_t offset, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_auxiliary_log_status (ipmi_ctx_t ctx, uint8_t log_type, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_auxiliary_log_status (ipmi_ctx_t ctx, uint8_t log_type, const void *log_data, unsigned int log_data_len, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SEL_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-serial-modem-cmds-api.h0000644002055400205540000001535713527331636026737 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SERIAL_MODEM_CMDS_API_H #define IPMI_SERIAL_MODEM_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_serial_modem_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t basic_mode, uint8_t ppp_mode, uint8_t terminal_mode, uint8_t connect_mode, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t dtr_hangup, uint8_t flow_control, uint8_t bit_rate, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t page_blackout_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t call_retry_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SERIAL_MODEM_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/api/ipmi-sol-cmds-api.h0000644002055400205540000002412113527331636025143 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CMDS_API_H #define IPMI_SOL_CMDS_API_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* * ipmi_cmd* functions return 0 on success, -1 on error. * * obj_cmd_rs must be for the function's respective fiid template * response. * */ int ipmi_cmd_set_sol_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t sol_enable, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t sol_privilege_level, uint8_t force_sol_payload_authentication, uint8_t force_sol_payload_encryption, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t character_accumulate_interval, uint8_t character_send_threshold, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t retry_count, uint8_t retry_interval, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rs); int ipmi_cmd_set_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t port_number, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_payload_channel (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); int ipmi_cmd_get_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CMDS_API_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/0000755002055400205540000000000013527342543021722 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h0000644002055400205540000001422613527331636027436 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_BMC_WATCHDOG_TIMER_CMDS_H #define IPMI_BMC_WATCHDOG_TIMER_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2 0x1 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST 0x2 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD 0x3 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS 0x4 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM 0x5 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2 \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE 0x0 #define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_DISABLE 0x1 #define IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_DISABLE) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE 0x0 #define IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE 0x1 #define IPMI_BMC_WATCHDOG_TIMER_LOG_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION 0x0 #define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET 0x1 #define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN 0x2 #define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE 0x3 #define IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE 0x0 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI 0x1 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI 0x2 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT 0x3 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_CLEAR_TIMER_EXPIRATION_BIT 0x1 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_LEAVE_ALONE 0x0 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID(__x) \ (((__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_CLEAR_TIMER_EXPIRATION_BIT \ || (__x) == IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_LEAVE_ALONE) ? 1 : 0) #define IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_RUNNING 0x1 #define IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_STOPPED 0x0 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MIN 0x00 #define IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MAX 0xFF #define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN 0x0000 #define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX 0xFFFF #define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN_SECONDS IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN #define IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX_SECONDS (IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX/10) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_reset_watchdog_timer_rq; extern fiid_template_t tmpl_cmd_reset_watchdog_timer_rs; extern fiid_template_t tmpl_cmd_set_watchdog_timer_rq; extern fiid_template_t tmpl_cmd_set_watchdog_timer_rs; extern fiid_template_t tmpl_cmd_get_watchdog_timer_rq; extern fiid_template_t tmpl_cmd_get_watchdog_timer_rs; int fill_cmd_reset_watchdog_timer (fiid_obj_t obj_cmd_rq); int fill_cmd_set_watchdog_timer (uint8_t timer_use, uint8_t stop_timer, uint8_t log, uint8_t timeout_action, uint8_t pre_timeout_interrupt, uint8_t pre_timeout_interval, uint8_t timer_use_expiration_flag_bios_frb2, uint8_t timer_use_expiration_flag_bios_post, uint8_t timer_use_expiration_flag_os_load, uint8_t timer_use_expiration_flag_sms_os, uint8_t timer_use_expiration_flag_oem, uint16_t initial_countdown_value, fiid_obj_t obj_cmd_rq); int fill_cmd_get_watchdog_timer (fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_BMC_WATCHDOG_TIMER_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-chassis-cmds.h0000644002055400205540000006125613527331636025423 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHASSIS_CMDS_H #define IPMI_CHASSIS_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_POWER_RESTORE_POLICY_POWERED_OFF_AFTER_AC_RETURNS 0x00 #define IPMI_POWER_RESTORE_POLICY_POWER_RESTORED_TO_STATE 0x01 #define IPMI_POWER_RESTORE_POLICY_POWERS_UP_AFTER_AC_RETURNS 0x02 #define IPMI_POWER_RESTORE_POLICY_UNKNOWN 0x03 #define IPMI_SYSTEM_POWER_IS_ON 1 #define IPMI_SYSTEM_POWER_IS_OFF 0 #define IPMI_LAST_POWER_EVENT_AC_FAILED 0x00 #define IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_OVERLOAD 0x01 #define IPMI_LAST_POWER_EVENT_POWER_DOWN_INTERLOCK_ACTIVATED 0x02 #define IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_FAULT 0x03 #define IPMI_LAST_POWER_EVENT_POWER_ON_VIA_IPMI 0x04 #define IPMI_LAST_POWER_EVENT_UNKNOWN 0x05 #define IPMI_CHASSIS_CONTROL_POWER_DOWN 0x00 #define IPMI_CHASSIS_CONTROL_POWER_UP 0x01 #define IPMI_CHASSIS_CONTROL_POWER_CYCLE 0x02 #define IPMI_CHASSIS_CONTROL_HARD_RESET 0x03 #define IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT 0x04 #define IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN 0x05 #define IPMI_CHASSIS_CONTROL_VALID(__chassis_control) \ (((__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_DOWN \ || (__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_UP \ || (__chassis_control) == IPMI_CHASSIS_CONTROL_POWER_CYCLE \ || (__chassis_control) == IPMI_CHASSIS_CONTROL_HARD_RESET \ || (__chassis_control) == IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT \ || (__chassis_control) == IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN) ? 1 : 0) #define IPMI_CHASSIS_FORCE_IDENTIFY_OFF 0x00 #define IPMI_CHASSIS_FORCE_IDENTIFY_ON 0x01 #define IPMI_CHASSIS_FORCE_IDENTIFY_VALID(__force_identify) \ (((__force_identify) == IPMI_CHASSIS_FORCE_IDENTIFY_OFF \ || (__force_identify) == IPMI_CHASSIS_FORCE_IDENTIFY_ON) ? 1 : 0) #define IPMI_CHASSIS_IDENTIFY_STATE_OFF 0x00 #define IPMI_CHASSIS_IDENTIFY_STATE_TEMPORARY_ON 0x01 #define IPMI_CHASSIS_IDENTIFY_STATE_INDEFINITE_ON 0x02 /* min is degenerate "off" case */ #define IPMI_CHASSIS_IDENTIFY_INTERVAL_MIN 0x00 #define IPMI_CHASSIS_IDENTIFY_INTERVAL_MAX 0xFF /* min is degenerate "no delay" case */ #define IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MIN 0x00 #define IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MAX 0xFF /* achu: it's backwards on buttons, I don't know why */ #define IPMI_CHASSIS_BUTTON_ENABLE 0x00 #define IPMI_CHASSIS_BUTTON_DISABLE 0x01 #define IPMI_CHASSIS_BUTTON_VALID(__button) \ (((__button) == IPMI_CHASSIS_BUTTON_ENABLE \ || (__button) == IPMI_CHASSIS_BUTTON_DISABLE) ? 1 : 0) #define IPMI_CHASSIS_BUTTON_DISABLE_ALLOWED 0x1 #define IPMI_CHASSIS_BUTTON_DISABLE_NOT_ALLOWED 0x0 #define IPMI_POWER_RESTORE_POLICY_ALWAYS_STAY_POWERED_OFF 0x00 #define IPMI_POWER_RESTORE_POLICY_RESTORE_POWER_TO_STATE_WHEN_AC_WAS_LOST 0x01 #define IPMI_POWER_RESTORE_POLICY_ALWAYS_POWER_UP_AFTER_AC_IS_LOST 0x02 #define IPMI_POWER_RESTORE_POLICY_NO_CHANGE 0x03 #define IPMI_POWER_RESTORE_POLICY_VALID(__policy) \ (((__policy) == IPMI_POWER_RESTORE_POLICY_NO_CHANGE \ || (__policy) == IPMI_POWER_RESTORE_POLICY_ALWAYS_POWER_UP_AFTER_AC_IS_LOST \ || (__policy) == IPMI_POWER_RESTORE_POLICY_RESTORE_POWER_TO_STATE_WHEN_AC_WAS_LOST \ || (__policy) == IPMI_POWER_RESTORE_POLICY_ALWAYS_STAY_POWERED_OFF) ? 1 : 0) #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_UNKNOWN 0x00 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND 0x01 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PUSHBUTTON 0x02 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_POWER_PUSHBUTTON 0x03 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRATION 0x04 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_OEM 0x05 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_ALWAYS_RESTORE 0x06 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_RESTORE_PREVIOUS 0x07 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PEF 0x08 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_CYCLE_VIA_PEF 0x09 #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_SOFT_RESET 0x0A #define IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_RTC 0x0B #define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED 0x0 #define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_INVALID_LOCKED 0x1 #define IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED \ || (__value) == IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_INVALID_LOCKED) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTIONS_NO_SET_SELECTOR 0x0 #define IPMI_SYSTEM_BOOT_OPTIONS_NO_BLOCK_SELECTOR 0x0 #define IPMI_SYSTEM_BOOT_OPTION_SET_COMPLETE 0x00 #define IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS 0x01 #define IPMI_SYSTEM_BOOT_OPTION_SET_COMMIT_WRITE 0x02 #define IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SET_COMPLETE \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_INVALID 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID_FOR_NEXT_BOOT 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID_PERSISTENTLY 0x01 /* achu: below is not a typo, IPMI spec orders it 0x09, 0x08, 0x0B, 0x0F */ #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE 0x02 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE 0x03 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION 0x04 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD 0x05 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP 0x06 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA 0x07 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA 0x09 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD 0x08 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE 0x0B #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA 0x0F #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_VALID(__boot_device) \ (((__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE \ || (__boot_device) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_BIOS_SETTING IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE 0x02 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_VALID(__console_redirection) \ (((__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT \ || (__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS \ || (__console_redirection) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_NO 0x00 #define IPMI_SYSTEM_BOOT_OPTION_YES 0x01 #define IPMI_SYSTEM_BOOT_OPTION_DISABLE 0x00 #define IPMI_SYSTEM_BOOT_OPTION_ENABLE 0x01 #define IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTION_ENABLE \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_DISABLE) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BIOS_BOOT_TYPE_VALID(__boot_type) \ (((__boot_type) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE \ || (__boot_type) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE 0x02 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VALID(__verbosity) \ (((__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT \ || (__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET \ || (__verbosity) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNSPECIFIED 0x00 #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED 0X01 #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNDISCOVERED 0X00 #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_UNDISCOVERED) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN 0X01 #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DO_NOT_SCAN 0X00 #define IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DO_NOT_SCAN) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_ACKNOWLEDGE 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE 0x01 #define IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT 0x01 #define IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT 0x00 #define IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID(__value) \ (((__value) == IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT \ || (__value) == IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_RECOMENDED_AT_END_OF_POST 0x00 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_BMC 0x01 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_SYSTEM 0x02 #define IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_BIOS_MUX_CONTROL_OVERRIDE_VALID(__bios_mux_control) \ (((__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_RECOMENDED_AT_END_OF_POST \ || (__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_BMC \ || (__bios_mux_control) == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_SET_MUX_TO_SYSTEM) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MIN 0x00 #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MAX 0x31 #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MIN 0x01 #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MAX 0x15 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_VALID(__value) \ ((((__value) + 1) >= (IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MIN + 1) \ && (__value) <= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_MAX) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_VALID(__value) \ (((__value) >= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MIN \ && (__value) <= IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_MAX) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_INTERNAL_BITMASK 0x10 #define IPMI_SYSTEM_BOOT_OPTION_BLOCK_DATA_LEN_MAX 16 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_chassis_capabilities_rq; extern fiid_template_t tmpl_cmd_get_chassis_capabilities_rs; extern fiid_template_t tmpl_cmd_get_chassis_status_rq; extern fiid_template_t tmpl_cmd_get_chassis_status_rs; extern fiid_template_t tmpl_cmd_chassis_control_rq; extern fiid_template_t tmpl_cmd_chassis_control_rs; extern fiid_template_t tmpl_cmd_chassis_identify_rq; extern fiid_template_t tmpl_cmd_chassis_identify_rs; extern fiid_template_t tmpl_cmd_set_front_panel_enables_rq; extern fiid_template_t tmpl_cmd_set_front_panel_enables_rs; extern fiid_template_t tmpl_cmd_set_power_restore_policy_rq; extern fiid_template_t tmpl_cmd_set_power_restore_policy_rs; extern fiid_template_t tmpl_cmd_set_power_cycle_interval_rq; extern fiid_template_t tmpl_cmd_set_power_cycle_interval_rs; extern fiid_template_t tmpl_cmd_get_system_restart_cause_rq; extern fiid_template_t tmpl_cmd_get_system_restart_cause_rs; extern fiid_template_t tmpl_cmd_set_system_boot_options_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_rs; extern fiid_template_t tmpl_cmd_set_system_boot_options_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_selector_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_scan_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_flags_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_info_rq; extern fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq; extern fiid_template_t tmpl_cmd_get_system_boot_options_rq; extern fiid_template_t tmpl_cmd_get_system_boot_options_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_selector_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_scan_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_info_acknowledge_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_flags_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_info_rs; extern fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_mailbox_rs; extern fiid_template_t tmpl_cmd_get_power_on_hours_counter_rq; extern fiid_template_t tmpl_cmd_get_power_on_hours_counter_rs; int fill_cmd_get_chassis_capabilities (fiid_obj_t obj_cmd_rq); int fill_cmd_get_chassis_status (fiid_obj_t obj_cmd_rq); int fill_cmd_chassis_control (uint8_t chassis_control, fiid_obj_t obj_cmd_rq); int fill_cmd_chassis_identify (const uint8_t *identify_interval, const uint8_t *force_identify, fiid_obj_t obj_cmd_rq); int fill_cmd_set_front_panel_enables (uint8_t disable_power_off_button_for_power_off_only, uint8_t disable_reset_button, uint8_t disable_diagnostic_interrupt_button, uint8_t disable_standby_button_for_entering_standby, fiid_obj_t obj_cmd_rq); int fill_cmd_set_power_restore_policy (uint8_t power_restore_policy, fiid_obj_t obj_cmd_rq); int fill_cmd_set_power_cycle_interval (uint8_t interval, fiid_obj_t obj_cmd_rq); int fill_cmd_get_system_restart_cause (fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options (uint8_t parameter_selector, uint8_t parameter_valid, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_set_in_progress (uint8_t parameter_valid, uint8_t state, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_service_partition_selector (uint8_t parameter_valid, uint8_t service_partition_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_service_partition_scan (uint8_t parameter_valid, uint8_t service_partition_discovered, uint8_t service_partition_scan, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (uint8_t parameter_valid, uint8_t dont_clear_on_power_up, uint8_t dont_clear_on_pushbutton_or_soft_reset, uint8_t dont_clear_on_watchdog_timeout, uint8_t dont_clear_on_chassis_control, uint8_t dont_clear_on_PEF, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_boot_info_acknowledge (uint8_t parameter_valid, const uint8_t *bios_or_post_handled_boot_info, const uint8_t *os_loader_handled_boot_info, const uint8_t *os_or_service_partition_handled_boot_info, const uint8_t *sms_handled_boot_info, const uint8_t *oem_handled_boot_info, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_boot_flags (uint8_t parameter_valid, uint8_t bios_boot_type, uint8_t boot_flags_persistent, uint8_t boot_flags_valid, uint8_t lock_out_reset_button, uint8_t screen_blank, uint8_t boot_device, uint8_t lock_keyboard, uint8_t clear_cmos, uint8_t console_redirection, uint8_t lock_out_sleep_button, uint8_t user_password_bypass, uint8_t force_progress_event_traps, uint8_t firmware_bios_verbosity, uint8_t lock_out_via_power_button, uint8_t bios_mux_control_override, uint8_t bios_shared_mode_override, uint8_t device_instance_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_boot_initiator_info (uint8_t parameter_valid, uint8_t boot_source_channel_number, uint32_t session_id, uint32_t boot_info_timestamp, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_boot_options_boot_initiator_mailbox (uint8_t parameter_valid, uint8_t set_selector, const void *block_data, unsigned int block_data_length, fiid_obj_t obj_cmd_rq); int fill_cmd_get_system_boot_options (uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_get_power_on_hours_counter (fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_CHASSIS_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-cmds.h0000644002055400205540000004274213527331636024701 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_CMDS_H #define IPMI_DCMI_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SUPPORTED_DCMI_CAPABILITIES 0x01 #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANDATORY_PLATFORM_ATTRIBUTES 0x02 #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_OPTIONAL_PLATFORM_ATTRIBUTES 0x03 #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANAGEABILITY_ACCESS_ATTRIBUTES 0x04 #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_ENHANCED_SYSTEM_POWER_STATISTICS_ATTRIBUTES 0x05 #define IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector)) >= (IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SUPPORTED_DCMI_CAPABILITIES) && \ ((__parameter_selector)) <= (IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_ENHANCED_SYSTEM_POWER_STATISTICS_ATTRIBUTES)) ? 1 : 0) #define IPMI_DCMI_AVAILABLE 0x1 #define IPMI_DCMI_NOT_PRESENT 0x0 #define IPMI_DCMI_AVAILABLE 0x1 #define IPMI_DCMI_AT_LEAST_1_PRESENT 0x1 #define IPMI_DCMI_NOT_PRESENT 0x0 #define IPMI_DCMI_CHANNEL_NOT_SUPPORTED 0xFF #define IPMI_DCMI_TIME_DURATION_UNITS_SECONDS 0x00 #define IPMI_DCMI_TIME_DURATION_UNITS_MINUTES 0x01 #define IPMI_DCMI_TIME_DURATION_UNITS_HOURS 0x02 #define IPMI_DCMI_TIME_DURATION_UNITS_DAYS 0x03 #define IPMI_DCMI_CONFIGURATION_PARAMETER_ACTIVATE_DHCP 0x01 #define IPMI_DCMI_CONFIGURATION_PARAMETER_DISCOVERY_CONFIGURATION 0x02 #define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_1 0x03 #define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_2 0x04 #define IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3 0x05 #define IPMI_DCMI_CONFIGURATION_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector)) >= (IPMI_DCMI_CONFIGURATION_PARAMETER_ACTIVATE_DHCP) && \ ((__parameter_selector)) <= (IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3)) ? 1 : 0) #define IPMI_DCMI_DHCP_ACTIVATE 0x01 #define IPMI_DCMI_DHCP_INCLUDE_OPTION 0x01 #define IPMI_DCMI_DHCP_DO_NOT_INCLUDE_OPTION 0x00 #define IPMI_DCMI_DHCP_INCLUDE_OPTION_VALID(__val) \ ((((__val)) == IPMI_DCMI_DHCP_INCLUDE_OPTION && \ ((__val)) == IPMI_DCMI_DHCP_DO_NOT_INCLUDE_OPTION) ? 1 : 0) #define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_ENABLE 0x01 #define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_DISABLE 0x00 #define IPMI_DCMI_DHCP_RANDOM_BACK_OFF_VALID(__val) \ ((((__val)) == IPMI_DCMI_DHCP_RANDOM_BACK_OFF_ENABLE && \ ((__val)) == IPMI_DCMI_DHCP_RANDOM_BACK_OFF_DISABLE) ? 1 : 0) #define IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX 16 #define IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX 16 #define IPMI_DCMI_MAX_ASSET_TAG_LENGTH 63 #define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE0 0xEF #define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE1 0xBB #define IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE2 0xBF #define IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX 16 #define IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX 16 /* length includes NUL byte */ #define IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH 64 #define IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE 0x40 #define IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE 0x41 #define IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE 0x42 #define IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE_STR "Inlet Temperature" #define IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE_STR "CPU Temperature" #define IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE_STR "Baseboard temperature" #define IPMI_DCMI_ENTITY_ID_VALID(__entity_id) \ (((__entity_id) == IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE \ || (__entity_id) == IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE \ || (__entity_id) == IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE) ? 1 : 0) #define IPMI_DCMI_ENTITY_INSTANCE_ALL 0x00 #define IPMI_DCMI_POWER_READING_MODE_SYSTEM_POWER_STATISTICS 0x01 #define IPMI_DCMI_POWER_READING_MODE_POWER_STATISTICS IPMI_DCMI_POWER_READING_MODE_SYSTEM_POWER_STATISTICS #define IPMI_DCMI_POWER_READING_MODE_ENHANCED_SYSTEM_POWER_STATISTICS 0x02 /* spec only lists one mode right now, assume there can/will be more in the future */ #define IPMI_DCMI_POWER_READING_MODE_VALID(__mode) \ (((__mode) == IPMI_DCMI_POWER_READING_MODE_POWER_STATISTICS \ || (__mode) == IPMI_DCMI_POWER_READING_MODE_ENHANCED_SYSTEM_POWER_STATISTICS) ? 1 : 0) #define IPMI_DCMI_POWER_READING_STATE_POWER_MEASUREMENT_ACTIVE 0x1 #define IPMI_DCMI_POWER_READING_STATE_NO_POWER_MEASUREMENT_AVAILABLE 0x0 /* HLiebig: specific value, not a bitmask */ /* With power limit commands */ #define IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION 0x00 #define IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM 0x01 #define IPMI_DCMI_EXCEPTION_ACTION_OEM_MIN 0x02 #define IPMI_DCMI_EXCEPTION_ACTION_OEM_MAX 0x10 #define IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY 0x11 /* With thermal limit commands */ #define IPMI_DCMI_EXCEPTION_ACTION_BIT_ON 1 #define IPMI_DCMI_EXCEPTION_ACTION_BIT_OFF 0 #define IPMI_DCMI_EXCEPTION_ACTION_BIT_VALID(__bit) \ (((__bit) == IPMI_DCMI_EXCEPTION_ACTION_BIT_ON \ || (__bit) == IPMI_DCMI_EXCEPTION_ACTION_BIT_OFF) ? 1 : 0) /* achu: it's an 8 bit field, why not allow all 8 bitmasks? Beats * me, that's what's in the spec */ #define IPMI_DCMI_EXCEPTION_ACTIONS_MIN 0x00 #define IPMI_DCMI_EXCEPTION_ACTIONS_MAX 0x1F #define IPMI_DCMI_POWER_LIMIT_REQUESTED_MIN 0x0000 #define IPMI_DCMI_POWER_LIMIT_REQUESTED_MAX 0xFFFF #define IPMI_DCMI_CORRECTION_TIME_LIMIT_MIN 0x00000000 #define IPMI_DCMI_CORRECTION_TIME_LIMIT_MAX 0xFFFFFFFF #define IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MIN 0x0000 #define IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MAX 0xFFFF #define IPMI_DCMI_EXCEPTION_ACTION_VALID(__exception_action) \ (((__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION \ || (__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM \ || (__exception_action) == IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY \ || ((__exception_action) >= IPMI_DCMI_EXCEPTION_ACTION_OEM_MIN && (__exception_action) <= IPMI_DCMI_EXCEPTION_ACTION_OEM_MAX)) ? 1 : 0) #define IPMI_DCMI_POWER_LIMIT_ACTIVATION_DEACTIVATE_POWER_LIMIT 0x0 #define IPMI_DCMI_POWER_LIMIT_ACTIVATION_ACTIVATE_POWER_LIMIT 0x1 #define IPMI_DCMI_POWER_LIMIT_ACTIVATION_VALID(__power_limit_activation) \ (((__power_limit_activation) == IPMI_DCMI_POWER_LIMIT_ACTIVATION_DEACTIVATE_POWER_LIMIT \ || (__power_limit_activation) == IPMI_DCMI_POWER_LIMIT_ACTIVATION_ACTIVATE_POWER_LIMIT) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_dcmi_rolling_average_time_period; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rq; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq; extern fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3_rs; extern fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rq; extern fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rs; extern fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rq; extern fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rs; extern fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rq; extern fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rs; extern fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rq; extern fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rs; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rq; extern fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rs; extern fiid_template_t tmpl_cmd_dcmi_get_power_reading_rq; extern fiid_template_t tmpl_cmd_dcmi_get_power_reading_rs; extern fiid_template_t tmpl_cmd_dcmi_get_power_limit_rq; extern fiid_template_t tmpl_cmd_dcmi_get_power_limit_rs; extern fiid_template_t tmpl_cmd_dcmi_set_power_limit_rq; extern fiid_template_t tmpl_cmd_dcmi_set_power_limit_rs; extern fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rq; extern fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rs; extern fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rq; extern fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rs; extern fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rq; extern fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rs; extern fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rq; extern fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rs; int fill_cmd_dcmi_get_dcmi_capability_info (uint8_t parameter_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters (uint8_t parameter_selector, uint8_t set_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (uint8_t set_selector, uint8_t activate, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (uint8_t set_selector, uint8_t option_12, uint8_t option_60_with_option_43, uint8_t random_back_off, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (uint8_t set_selector, uint8_t initial_timeout_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (uint8_t set_selector, uint16_t server_contact_timeout_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (uint8_t set_selector, uint16_t server_contact_retry_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_dcmi_configuration_parameters (uint8_t parameter_selector, uint8_t set_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_asset_tag (uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_asset_tag (uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_management_controller_identifier_string (uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_management_controller_identifier_string (uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_dcmi_sensor_info (uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_power_reading (uint8_t mode, uint8_t mode_attributes, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_power_limit (fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_power_limit (uint8_t exception_actions, uint16_t power_limit_requested, uint32_t correction_time_limit, uint16_t management_application_statistics_sampling_period, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_activate_deactivate_power_limit (uint8_t power_limit_activation, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_thermal_limit (uint8_t entity_id, uint8_t entity_instance, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_set_thermal_limit (uint8_t entity_id, uint8_t entity_instance, uint8_t temperature_limit, uint8_t exception_actions_log_event_to_sel_only, uint8_t exception_actions_hard_power_off_system_and_log_event, uint16_t exception_time, fiid_obj_t obj_cmd_rq); int fill_cmd_dcmi_get_temperature_reading (uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_DCMI_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-oem-cmds.h0000644002055400205540000000157213527331636025453 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DCMI_OEM_CMDS_H #define IPMI_DCMI_OEM_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #ifdef __cplusplus } #endif #endif /* IPMI_DCMI_OEM_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h0000644002055400205540000001607013527331636026455 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_GLOBAL_CMDS_H #define IPMI_DEVICE_GLOBAL_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_DEVICE_ID_UNSPECIFIED 0x00 #define IPMI_MANUFACTURER_ID_UNSPECIFIED 0x000000 #define IPMI_MANUFACTURER_ID_RESERVED 0x0FFFFF #define IPMI_1_5_MAJOR_VERSION 1 #define IPMI_1_5_MINOR_VERSION 5 #define IPMI_2_0_MAJOR_VERSION 2 #define IPMI_2_0_MINOR_VERSION 0 #define IPMI_SELF_TEST_RESULT_NO_ERROR 0x55 #define IPMI_SELF_TEST_RESULT_SELF_TEST_FUNCTION_NOT_IMPLEMENTED_IN_THIS_CONTROLLER 0x56 #define IPMI_SELF_TEST_RESULT_CORRUPTED_OR_INACCESSIBLE_DATA_OR_DEVICES 0x57 #define IPMI_SELF_TEST_RESULT_FATAL_HARDWARE_ERROR 0x58 #define IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0 0x00 #define IPMI_ACPI_SYSTEM_POWER_STATE_S1 0x01 #define IPMI_ACPI_SYSTEM_POWER_STATE_S2 0x02 #define IPMI_ACPI_SYSTEM_POWER_STATE_S3 0x03 #define IPMI_ACPI_SYSTEM_POWER_STATE_S4 0x04 #define IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2 0x05 #define IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5 0x06 #define IPMI_ACPI_SYSTEM_POWER_STATE_G3 0x07 #define IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING 0x08 #define IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING 0x09 #define IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE 0x0A #define IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON 0x20 #define IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF 0x21 #define IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN 0x2A #define IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE 0x7F #define IPMI_ACPI_SYSTEM_POWER_STATE_VALID(__acpi_system_power_state) \ (((__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S1 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S2 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S3 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S4 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_G3 \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN \ || (__acpi_system_power_state) == IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE) ? 1 : 0) #define IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE 0x1 #define IPMI_ACPI_SET_SYSTEM_POWER_STATE_DONT_SET_SYSTEM_POWER_STATE 0x0 #define IPMI_ACPI_SET_SYSTEM_POWER_STATE_VALID(__set_system_power_state) \ (((__set_system_power_state) == IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE \ || (__set_system_power_state) == IPMI_ACPI_SET_SYSTEM_POWER_STATE_DONT_SET_SYSTEM_POWER_STATE) ? 1 : 0) #define IPMI_ACPI_DEVICE_POWER_STATE_D0 0x00 #define IPMI_ACPI_DEVICE_POWER_STATE_D1 0x01 #define IPMI_ACPI_DEVICE_POWER_STATE_D2 0x02 #define IPMI_ACPI_DEVICE_POWER_STATE_D3 0x03 #define IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN 0x2A #define IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE 0x7F #define IPMI_ACPI_DEVICE_POWER_STATE_VALID(__acpi_device_power_state) \ (((__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D0 \ || (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D1 \ || (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D2 \ || (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_D3 \ || (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN \ || (__acpi_device_power_state) == IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE) ? 1 : 0) #define IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE 0x1 #define IPMI_ACPI_SET_DEVICE_POWER_STATE_DONT_SET_DEVICE_POWER_STATE 0x0 #define IPMI_ACPI_SET_DEVICE_POWER_STATE_VALID(__set_device_power_state) \ (((__set_device_power_state) == IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE \ || (__set_device_power_state) == IPMI_ACPI_SET_DEVICE_POWER_STATE_DONT_SET_DEVICE_POWER_STATE) ? 1 : 0) #define IPMI_SYSTEM_GUID_LENGTH 16 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_device_id_rq; extern fiid_template_t tmpl_cmd_get_device_id_rs; extern fiid_template_t tmpl_cmd_cold_reset_rq; extern fiid_template_t tmpl_cmd_cold_reset_rs; extern fiid_template_t tmpl_cmd_warm_reset_rq; extern fiid_template_t tmpl_cmd_warm_reset_rs; extern fiid_template_t tmpl_cmd_get_self_test_results_rq; extern fiid_template_t tmpl_cmd_get_self_test_results_rs; extern fiid_template_t tmpl_cmd_set_acpi_power_state_rq; extern fiid_template_t tmpl_cmd_set_acpi_power_state_rs; extern fiid_template_t tmpl_cmd_get_acpi_power_state_rq; extern fiid_template_t tmpl_cmd_get_acpi_power_state_rs; extern fiid_template_t tmpl_cmd_get_device_guid_rq; extern fiid_template_t tmpl_cmd_get_device_guid_rs; extern fiid_template_t tmpl_cmd_get_device_guid_format_rs; int fill_cmd_get_device_id (fiid_obj_t obj_cmd_rq); int fill_cmd_cold_reset (fiid_obj_t obj_cmd_rq); int fill_cmd_warm_reset (fiid_obj_t obj_cmd_rq); int fill_cmd_set_acpi_power_state (uint8_t system_power_state_enumeration, uint8_t set_system_power_state, uint8_t device_power_state_enumeration, uint8_t set_device_power_state, fiid_obj_t obj_cmd_rq); int fill_cmd_get_acpi_power_state (fiid_obj_t obj_cmd_rq); int fill_cmd_get_self_test_results (fiid_obj_t obj_cmd_rq); int fill_cmd_get_device_guid (fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_GLOBAL_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-event-cmds.h0000644002055400205540000000430513527331636025077 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_CMDS_H #define IPMI_EVENT_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_set_event_receiver_rq; extern fiid_template_t tmpl_cmd_set_event_receiver_rs; extern fiid_template_t tmpl_cmd_get_event_receiver_rq; extern fiid_template_t tmpl_cmd_get_event_receiver_rs; extern fiid_template_t tmpl_cmd_platform_event_rq; extern fiid_template_t tmpl_cmd_platform_event_rs; int fill_cmd_set_event_receiver (uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rq); int fill_cmd_get_event_receiver (fiid_obj_t obj_cmd_rq); /* generator_id is optional */ int fill_cmd_platform_event (uint8_t *generator_id, uint8_t event_message_format_version, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_type_code, uint8_t event_dir, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h0000644002055400205540000002203313527331636033014 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_NETFN_LUN_SUPPORT_NO_COMMANDS_SUPPORTED 0x0 #define IPMI_NETFN_LUN_SUPPORT_COMMANDS_FOLLOW_BASE_IPMI_SPECIFICATION 0x1 #define IPMI_NETFN_LUN_SUPPORT_COMMANDS_EXIST_ON_LUN 0x2 #define IPMI_NETFN_PAIR_IS_NOT_USED 0x0 #define IPMI_NETFN_PAIR_IS_USED 0x1 #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_00H_TO_7FH 0x0 #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_80H_TO_FFH 0x1 #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID(__val) \ (((__val) == IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_00H_TO_7FH \ || (__val) == IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_80H_TO_FFH) ? 1 : 0) /* achu: Yes, this one is backwards. I don't know why */ #define IPMI_COMMAND_AVAILABLE 0x0 #define IPMI_COMMAND_UNAVAILABLE 0x1 /* achu: Yes, this one is backwards. I don't know why */ #define IPMI_SUB_FUNCTION_AVAILABLE 0x0 #define IPMI_SUB_FUNCTION_UNAVAILABLE 0x1 #define IPMI_COMMAND_NOT_CONFIGURABLE 0x0 #define IPMI_COMMAND_CAN_BE_ENABLED_DISABLED 0x1 #define IPMI_SUB_FUNCTION_NOT_CONFIGURABLE 0x0 #define IPMI_SUB_FUNCTION_CAN_BE_ENABLED_DISABLED 0x1 #define IPMI_COMMAND_DISABLED_OR_NOT_SUPPORTED 0x0 #define IPMI_COMMAND_ENABLED 0x1 #define IPMI_SUB_FUNCTION_DISABLED_OR_NOT_SUPPORTED 0x0 #define IPMI_SUB_FUNCTION_ENABLED 0x1 #define IPMI_SPECIFICATION_TYPE_IPMI 0x0 #define IPMI_SPECIFICATION_TYPE_IPMB 0x1 #define IPMI_SPECIFICATION_TYPE_ICMB 0x2 #define IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_ENABLE_DISABLE_BITMASK_LEN 16 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_netfn_support_rq; extern fiid_template_t tmpl_cmd_get_netfn_support_rs; extern fiid_template_t tmpl_cmd_get_command_support_rq; extern fiid_template_t tmpl_cmd_get_command_support_rs; extern fiid_template_t tmpl_cmd_get_command_sub_function_support_rq; extern fiid_template_t tmpl_cmd_get_command_sub_function_support_specification_errata_rs; extern fiid_template_t tmpl_cmd_get_command_sub_function_support_extension_errata_rs; extern fiid_template_t tmpl_cmd_get_configurable_commands_rq; extern fiid_template_t tmpl_cmd_get_configurable_commands_rs; extern fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rq; extern fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rs; extern fiid_template_t tmpl_cmd_set_command_enables_rq; extern fiid_template_t tmpl_cmd_set_command_enables_rs; extern fiid_template_t tmpl_cmd_get_command_enables_rq; extern fiid_template_t tmpl_cmd_get_command_enables_rs; extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_rq; extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_defining_body_code_rq; extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_oem_iana_rq; extern fiid_template_t tmpl_cmd_set_command_sub_function_enables_rs; extern fiid_template_t tmpl_cmd_get_command_sub_function_enables_rq; extern fiid_template_t tmpl_cmd_get_command_sub_function_enables_rs; extern fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rq; extern fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rs; int fill_cmd_get_netfn_support (uint8_t channel_number, fiid_obj_t obj_cmd_rq); int fill_cmd_get_command_support (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_command_sub_function_support (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_configurable_commands (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_configurable_command_sub_functions (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_set_command_enables (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint8_t *enable_disable_bitmask, unsigned int enable_disable_bitmask_len, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_command_enables (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_set_command_sub_function_enables (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq); int fill_cmd_set_command_sub_function_enables_defining_body_code (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint8_t defining_body_code, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq); int fill_cmd_set_command_sub_function_enables_oem_iana (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t oem_iana, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq); int fill_cmd_get_command_sub_function_enables (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_oem_netfn_iana_support (uint8_t channel_number, uint8_t net_fn, uint8_t list_index, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-fru-inventory-device-cmds.h0000644002055400205540000000725513527331636030051 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_INVENTORY_DEVICE_CMDS_H #define IPMI_FRU_INVENTORY_DEVICE_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_FRU_DEVICE_ID_DEFAULT 0x00 /* FRU for Management Controller - Chap 38 */ #define IPMI_FRU_DEVICE_ID_RESERVED 0xFF #define IPMI_FRU_DEVICE_ID_MIN 0x00 #define IPMI_FRU_DEVICE_ID_MAX 0xFE #define IPMI_FRU_INVENTORY_AREA_SIZE_MAX 65536 /* 16 bit field for length */ #define IPMI_FRU_DATA_MAX 255 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_fru_inventory_area_info_rq; extern fiid_template_t tmpl_cmd_get_fru_inventory_area_info_rs; extern fiid_template_t tmpl_cmd_read_fru_data_rq; extern fiid_template_t tmpl_cmd_read_fru_data_rs; extern fiid_template_t tmpl_cmd_write_fru_data_rq; extern fiid_template_t tmpl_cmd_write_fru_data_rs; int fill_cmd_get_fru_inventory_area_info (uint8_t fru_device_id, fiid_obj_t obj_cmd_rq); int fill_cmd_read_fru_data (uint8_t fru_device_id, uint16_t fru_inventory_offset_to_read, uint8_t count_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_write_fru_data (uint8_t fru_device_id, uint16_t fru_inventory_offset_to_write, const void *data_to_write, unsigned int data_to_write_len, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_FRU_INVENTORY_DEVICE_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-lan-cmds.h0000644002055400205540000011224613527331636024534 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CMDS_H #define IPMI_LAN_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0 #define IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0 #define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00 #define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01 #define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02 #define IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMPLETE \ || (__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \ || (__value) == IPMI_LAN_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_AUTHENTICATION_TYPE_SUPPORTED 0x1 #define IPMI_AUTHENTICATION_TYPE_UNSUPPORTED 0x0 #define IPMI_AUTHENTICATION_TYPE_ENABLE 0x1 #define IPMI_AUTHENTICATION_TYPE_DISABLE 0x0 #define IPMI_AUTHENTICATION_TYPE_ENABLE_VALID(__val) \ (((__val) == IPMI_AUTHENTICATION_TYPE_ENABLE \ || (__val) == IPMI_AUTHENTICATION_TYPE_DISABLE) ? 1 : 0) #define IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED 0x0 #define IPMI_IP_ADDRESS_SOURCE_STATIC 0x1 #define IPMI_IP_ADDRESS_SOURCE_DHCP 0x2 #define IPMI_IP_ADDRESS_SOURCE_BIOS 0x3 #define IPMI_IP_ADDRESS_SOURCE_OTHER 0x4 #define IPMI_IP_ADDRESS_SOURCE_VALID(__val) \ (((__val) == IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED \ || (__val) == IPMI_IP_ADDRESS_SOURCE_STATIC \ || (__val) == IPMI_IP_ADDRESS_SOURCE_DHCP \ || (__val) == IPMI_IP_ADDRESS_SOURCE_BIOS \ || (__val) == IPMI_IP_ADDRESS_SOURCE_OTHER) ? 1 : 0) #define IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_DISABLED 0x0 #define IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_ONLY 0x1 #define IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_AND_IPV4 0x2 #define IPMI_IPV6_IPV4_ADDRESSING_ENABLES_VALID(__val) \ (((__val) == IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_DISABLED \ || (__val) == IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_ONLY \ || (__val) == IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_AND_IPV4) ? 1 : 0) #define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE 0x1 #define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE 0x0 #define IPMI_BMC_GENERATED_GRATUITOUS_ARPS_VALID(__val) \ (((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_ENABLE \ || (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARPS_DISABLE) ? 1 : 0) #define IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE 0x1 #define IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE 0x0 #define IPMI_BMC_GENERATED_ARP_RESPONSES_VALID(__val) \ (((__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_ENABLE \ || (__val) == IPMI_BMC_GENERATED_ARP_RESPONSES_DISABLE) ? 1 : 0) #define IPMI_MAX_COMMUNITY_STRING_LENGTH 18 #define IPMI_DESTINATION_SELECTOR_MIN 0 #define IPMI_DESTINATION_SELECTOR_MAX 15 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_DESTINATION_SELECTOR_VALID(__val) \ (((__val + 1) >= (IPMI_DESTINATION_SELECTOR_MIN + 1) \ || (__val) <= IPMI_DESTINATION_SELECTOR_MAX) ? 1 : 0) #define IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION 0x0 #define IPMI_DESTINATION_TYPE_OEM1 0x6 #define IPMI_DESTINATION_TYPE_OEM2 0x7 #define IPMI_DESTINATION_TYPE_VALID(__val) \ (((__val) == IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION \ || (__val) == IPMI_DESTINATION_TYPE_OEM1 \ || (__val) == IPMI_DESTINATION_TYPE_OEM2) ? 1 : 0) #define IPMI_ALERT_UNACKNOWLEDGED 0 #define IPMI_ALERT_ACKNOWLEDGED 1 #define IPMI_ALERT_VALID(__val) \ (((__val) == IPMI_ALERT_UNACKNOWLEDGED \ || (__val) == IPMI_ALERT_ACKNOWLEDGED) ? 1 : 0) #define IPMI_ADDRESS_FORMAT_IPV4 0 #define IPMI_GATEWAY_SELECTOR_DEFAULT 0 #define IPMI_GATEWAY_SELECTOR_BACKUP 1 #define IPMI_GATEWAY_SELECTOR_VALID(__val) \ (((__val) == IPMI_GATEWAY_SELECTOR_DEFAULT \ || (__val) == IPMI_GATEWAY_SELECTOR_BACKUP) ? 1 : 0) /* 3 bit number */ #define IPMI_ALERT_RETRIES_MAX 7 #define IPMI_VLAN_ID_ENABLE 0x1 #define IPMI_VLAN_ID_DISABLE 0x0 #define IPMI_VLAN_ID_ENABLE_VALID(__val) \ (((__val) == IPMI_VLAN_ID_ENABLE \ || (__val) == IPMI_VLAN_ID_DISABLE) ? 1 : 0) #define IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND 0x0 #define IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND 0x1 #define IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID(__val) \ (((__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND \ || (__val) == IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND) ? 1 : 0) #define IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND 0x0 #define IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND 0x1 #define IPMI_BMC_GENERATED_ARP_RESPONSE_VALID(__val) \ (((__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND \ || (__val) == IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND) ? 1 : 0) #define IPMI_USER_DISABLED_EVENT_MESSAGE_ON 0x1 #define IPMI_USER_DISABLED_EVENT_MESSAGE_OFF 0x0 #define IPMI_USER_DISABLED_EVENT_MESSAGE_VALID(__val) \ (((__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_ON \ || (__val) == IPMI_USER_DISABLED_EVENT_MESSAGE_OFF) ? 1 : 0) #define IPMI_GET_LAN_PARAMETER 0x0 #define IPMI_GET_LAN_PARAMETER_REVISION_ONLY 0x1 #define IPMI_GET_LAN_PARAMETER_VALID(__val) \ (((__val) == IPMI_GET_LAN_PARAMETER \ || (__val) == IPMI_GET_LAN_PARAMETER_REVISION_ONLY) ? 1 : 0) #define IPMI_CLEAR_ALL_STATISTICS 0x1 #define IPMI_DONT_CLEAR_ALL_STATISTICS 0x0 #define IPMI_IPV6_BYTES 16 #define IPMI_IPV6_PREFIX_LENGTH_MAX 128 #define IPMI_CLEAR_ALL_STATISTICS_VALID(__val) \ (((__val) == IPMI_CLEAR_ALL_STATISTICS \ || (__val) == IPMI_DONT_CLEAR_ALL_STATISTICS) ? 1 : 0) #define IPMI_IPV6_ADDRESS_SOURCE_STATIC 0x00 #define IPMI_IPV6_ADDRESS_SOURCE_SLAAC 0x01 #define IPMI_IPV6_ADDRESS_SOURCE_DHCPV6 0x02 #define IPMI_IPV6_STATIC_ADDRESS_SOURCE_VALID(__address_status) \ (((__address_status) == IPMI_IPV6_ADDRESS_SOURCE_STATIC) ? 1 : 0) #define IPMI_IPV6_DYNAMIC_ADDRESS_SOURCE_VALID(__address_status) \ (((__address_status) == IPMI_IPV6_ADDRESS_SOURCE_SLAAC \ || (__address_status) == IPMI_IPV6_ADDRESS_SOURCE_DHCPV6) ? 1 : 0) #define IPMI_IPV6_ADDRESS_SOURCE_ENABLE 0x01 #define IPMI_IPV6_ADDRESS_SOURCE_DISABLE 0x00 #define IPMI_IPV6_ADDRESS_SOURCE_ENABLE_VALID(__val) \ (((__val) == IPMI_IPV6_ADDRESS_SOURCE_ENABLE \ || (__val) == IPMI_IPV6_ADDRESS_SOURCE_DISABLE) ? 1 : 0) #define IPMI_IPV6_ADDRESS_STATUS_ACTIVE 0x00 #define IPMI_IPV6_ADDRESS_STATUS_DISABLED 0x01 #define IPMI_IPV6_ADDRESS_STATUS_PENDING 0x02 #define IPMI_IPV6_ADDRESS_STATUS_FAILED 0x03 #define IPMI_IPV6_ADDRESS_STATUS_DEPRECATED 0x04 #define IPMI_IPV6_ADDRESS_STATUS_INVALID 0x05 #define IPMI_IPV6_ADDRESS_STATUS_VALID(__address_status) \ (((__address_status) == IPMI_IPV6_ADDRESS_STATUS_ACTIVE \ || (__address_status) == IPMI_IPV6_ADDRESS_STATUS_DISABLED \ || (__address_status) == IPMI_IPV6_ADDRESS_STATUS_PENDING \ || (__address_status) == IPMI_IPV6_ADDRESS_STATUS_FAILED \ || (__address_status) == IPMI_IPV6_ADDRESS_STATUS_DEPRECATED \ || (__address_status) == IPMI_IPV6_ADDRESS_STATUS_INVALID) ? 1 : 0) #define IPMI_IPV6_STATIC_ROUTER_ADDRESS_ENABLE 0x1 #define IPMI_IPV6_STATIC_ROUTER_ADDRESS_DISABLE 0x0 #define IPMI_IPV6_STATIC_ROUTER_ADDRESS_ENABLE_VALID(__val) \ (((__val) == IPMI_IPV6_STATIC_ROUTER_ADDRESS_ENABLE \ || (__val) == IPMI_IPV6_STATIC_ROUTER_ADDRESS_DISABLE) ? 1 : 0) #define IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_ENABLE 0x1 #define IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_DISABLE 0x0 #define IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_ENABLE_VALID(__val) \ (((__val) == IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_ENABLE \ || (__val) == IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_DISABLE) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_mac_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv4_header_parameters_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_primary_rmcp_port_number_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_community_string_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_type_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_addresses_rq; /* TODO extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_dhcpv6_static_duids_rq; */ /* TODO extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids_rq; */ /* TODO extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration_rq; */ extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rq; extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rq; /* TODO extern fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_rq; */ extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv4_header_parameters_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_primary_rmcp_port_number_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_community_string_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_type_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_support_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_flow_label_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_status_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_addresses_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support_rs; extern fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_rs; extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rq; extern fiid_template_t tmpl_cmd_suspend_bmc_arps_rs; extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rq; extern fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rs; int fill_cmd_set_lan_configuration_parameters (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_authentication_type_enables (uint8_t channel_number, uint8_t callback_level_none, uint8_t callback_level_md2, uint8_t callback_level_md5, uint8_t callback_level_straight_password, uint8_t callback_level_oem_proprietary, uint8_t user_level_none, uint8_t user_level_md2, uint8_t user_level_md5, uint8_t user_level_straight_password, uint8_t user_level_oem_proprietary, uint8_t operator_level_none, uint8_t operator_level_md2, uint8_t operator_level_md5, uint8_t operator_level_straight_password, uint8_t operator_level_oem_proprietary, uint8_t admin_level_none, uint8_t admin_level_md2, uint8_t admin_level_md5, uint8_t admin_level_straight_password, uint8_t admin_level_oem_proprietary, uint8_t oem_level_none, uint8_t oem_level_md2, uint8_t oem_level_md5, uint8_t oem_level_straight_password, uint8_t oem_level_oem_proprietary, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ip_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ip_address_source (uint8_t channel_number, uint8_t ip_address_source, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_subnet_mask (uint8_t channel_number, uint32_t subnet_mask, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv4_header_parameters (uint8_t channel_number, uint8_t time_to_live, uint8_t flags, uint8_t type_of_service, uint8_t precedence, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (uint8_t channel_number, uint16_t primary_rmcp_port_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (uint8_t channel_number, uint16_t secondary_rmcp_port_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (uint8_t channel_number, uint8_t bmc_generated_gratuitous_arps, uint8_t bmc_generated_arp_responses, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (uint8_t channel_number, uint8_t gratuitous_arp_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_default_gateway_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_default_gateway_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_backup_gateway_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_community_string (uint8_t channel_number, const char *community_string, unsigned int community_string_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_destination_type (uint8_t channel_number, uint8_t destination_selector, uint8_t destination_type, uint8_t alert_acknowledge, uint8_t alert_acknowledge_timeout, uint8_t retries, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_destination_addresses (uint8_t channel_number, uint8_t destination_selector, uint8_t gateway_selector, uint32_t alerting_ip_address, uint64_t alerting_mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_vlan_id (uint8_t channel_number, uint16_t vlan_id, uint8_t vlan_id_enable, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_vlan_priority (uint8_t channel_number, uint8_t vlan_priority, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (uint8_t channel_number, uint8_t maximum_privilege_for_cipher_suite_1, uint8_t maximum_privilege_for_cipher_suite_2, uint8_t maximum_privilege_for_cipher_suite_3, uint8_t maximum_privilege_for_cipher_suite_4, uint8_t maximum_privilege_for_cipher_suite_5, uint8_t maximum_privilege_for_cipher_suite_6, uint8_t maximum_privilege_for_cipher_suite_7, uint8_t maximum_privilege_for_cipher_suite_8, uint8_t maximum_privilege_for_cipher_suite_9, uint8_t maximum_privilege_for_cipher_suite_10, uint8_t maximum_privilege_for_cipher_suite_11, uint8_t maximum_privilege_for_cipher_suite_12, uint8_t maximum_privilege_for_cipher_suite_13, uint8_t maximum_privilege_for_cipher_suite_14, uint8_t maximum_privilege_for_cipher_suite_15, uint8_t maximum_privilege_for_cipher_suite_16, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_bad_password_threshold (uint8_t channel_number, uint8_t user_disabled_event_message, uint8_t bad_password_threshold_number, uint16_t attempt_count_reset_interval, uint16_t user_lockout_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (uint8_t channel_number, uint8_t enables, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class (uint8_t channel_number, uint8_t traffic_class, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit (uint8_t channel_number, uint8_t static_hop_limit, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_header_flow_label (uint8_t channel_number, uint64_t flow_label, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_addresses (uint8_t channel_number, uint8_t set_selector, uint8_t source, uint8_t enable, uint8_t address[IPMI_IPV6_BYTES], uint8_t address_prefix_length, uint8_t address_status, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (uint8_t channel_number, uint8_t enable_static_router_address, uint8_t enable_dynamic_router_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq); int fill_cmd_get_lan_configuration_parameters (uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_suspend_bmc_arps (uint8_t channel_number, uint8_t gratuitous_arp_suspend, uint8_t arp_response_suspend, fiid_obj_t obj_cmd_rq); int fill_cmd_get_ip_udp_rmcp_statistics (uint8_t channel_number, uint8_t clear_all_statistics, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-messaging-support-cmds.h0000644002055400205540000010062413527331636027446 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_MESSAGING_SUPPORT_CMDS_H #define IPMI_MESSAGING_SUPPORT_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_MAX_USER_NAME_LENGTH 16 #define IPMI_1_5_MAX_PASSWORD_LENGTH 16 #define IPMI_2_0_MAX_PASSWORD_LENGTH 20 #define IPMI_MAX_PASSWORD_LENGTH IPMI_2_0_MAX_PASSWORD_LENGTH #define IPMI_CHALLENGE_STRING_LENGTH 16 #define IPMI_MAX_K_R_LENGTH 20 #define IPMI_MAX_K_G_LENGTH 20 #define IPMI_BMC_GLOBAL_ENABLES_ENABLED 0x1 #define IPMI_BMC_GLOBAL_ENALBES_DISABLED 0x0 #define IPMI_BMC_GLOBAL_ENABLES_VALID(__val) \ (((__val) == IPMI_BMC_GLOBAL_ENABLES_ENABLED \ || (__val) == IPMI_BMC_GLOBAL_ENALBES_DISABLED) ? 1 : 0) #define IPMI_MESSAGE_FLAGS_CLEAR 0x1 #define IPMI_MESSAGE_FLAGS_DONT_CLEAR 0x0 #define IPMI_MESSAGE_FLAGS_VALID(__val) \ (((__val) == IPMI_MESSAGE_FLAGS_CLEAR \ || (__val) == IPMI_MESSAGE_FLAGS_DONT_CLEAR) ? 1 : 0) #define IPMI_CHANNEL_OPERATION_DISABLE_CHANNEL 0x00 #define IPMI_CHANNEL_OPERATION_ENABLE_CHANNEL 0x01 #define IPMI_CHANNEL_OPERATION_GET_CHANNEL_ENABLE_DISABLE_STATE 0x02 #define IPMI_CHANNEL_OPERATION_VALID(__val) \ (((__val) == IPMI_CHANNEL_OPERATION_DISABLE_CHANNEL \ || (__val) == IPMI_CHANNEL_OPERATION_ENABLE_CHANNEL \ || (__val) == IPMI_CHANNEL_OPERATION_GET_CHANNEL_ENABLE_DISABLE_STATE) ? 1 : 0) #define IPMI_CHANNEL_DISABLED 0x00 #define IPMI_CHANNEL_ENABLED 0x01 #define IPMI_SEND_MESSAGE_WITH_AUTHENTICATION 0x1 #define IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED 0x0 #define IPMI_SEND_MESSAGE_AUTHENTICATION_VALID(__val) \ (((__val) == IPMI_SEND_MESSAGE_WITH_AUTHENTICATION \ || (__val) == IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED) ? 1 : 0) #define IPMI_SEND_MESSAGE_WITH_ENCRYPTION 0x1 #define IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED 0x0 #define IPMI_SEND_MESSAGE_ENCRYPTION_VALID(__val) \ (((__val) == IPMI_SEND_MESSAGE_WITH_ENCRYPTION \ || (__val) == IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED) ? 1 : 0) #define IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING 0x0 #define IPMI_SEND_MESSAGE_TRACKING_OPERATION_TRACKING_REQUEST 0x1 #define IPMI_SEND_MESSAGE_TRACKING_OPERATION_SEND_RAW 0x2 #define IPMI_SEND_MESSAGE_TRACKING_VALID(__val) \ (((__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING \ || (__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_TRACKING_REQUEST \ || (__val) == IPMI_SEND_MESSAGE_TRACKING_OPERATION_SEND_RAW) ? 1 : 0) #define IPMI_SYSTEM_INTERFACE_SSIF 0x00 #define IPMI_SYSTEM_INTERFACE_KCS 0x01 #define IPMI_SYSTEM_INTERFACE_SMIC 0x02 #define IPMI_SYSTEM_INTERFACE_VALID(__val) \ (((__val) == IPMI_SYSTEM_INTERFACE_SSIF \ || (__val) == IPMI_SYSTEM_INTERFACE_KCS \ || (__val) == IPMI_SYSTEM_INTERFACE_SMIC) ? 1 : 0) #define IPMI_SSIF_SYSTEM_INTERFACE_VERSION_1 0x0 #define IPMI_SSIF_SYSTEM_INTERFACE_IMPLEMENTS_PEC 0x1 #define IPMI_SSIF_SYSTEM_INTERFACE_DOES_NOT_SUPPORT_PEC 0x0 #define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_SINGLE_PART_READS_WRITES_SUPPORTED 0x0 #define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_AND_END_ONLY 0x1 #define IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_MIDDLE_END 0x2 #define IPMI_KCS_SYSTEM_INTERFACE_VERSION_1 0x0 #define IPMI_BUS_TYPE_PUBLIC 0x0 #define IPMI_BUS_TYPE_PRIVATE 0x1 #define IPMI_BUS_TYPE_VALID(__bus_type) \ (((__bus_type) == IPMI_BUS_TYPE_PUBLIC \ || (__bus_type) == IPMI_BUS_TYPE_PRIVATE) ? 1 : 0) #define IPMI_GET_IPMI_V20_EXTENDED_DATA 0x01 #define IPMI_GET_IPMI_V15_DATA 0x00 #define IPMI_GET_IPMI_DATA_VALID(__val) \ (((__val) == IPMI_GET_IPMI_V20_EXTENDED_DATA \ || (__val) == IPMI_GET_IPMI_V15_DATA) ? 1 : 0) #define IPMI_GET_SYSTEM_INFO_PARAMETER 0x0 #define IPMI_GET_SYSTEM_INFO_PARAMETER_REVISION_ONLY 0x1 #define IPMI_GET_SYSTEM_INFO_PARAMETER_VALID(__val) \ (((__val) == IPMI_GET_SYSTEM_INFO_PARAMETER \ || (__val) == IPMI_GET_SYSTEM_INFO_PARAMETER_REVISION_ONLY) ? 1 : 0) #define IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR 0x0 #define IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR 0x0 #define IPMI_SYSTEM_INFO_PARAMETERS_SET_COMPLETE 0x00 #define IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS 0x01 #define IPMI_SYSTEM_INFO_PARAMETERS_SET_COMMIT_WRITE 0x02 #define IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_COMPLETE \ || (__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS \ || (__value) == IPMI_SYSTEM_INFO_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1 0x0 #define IPMI_SYSTEM_INFO_ENCODING_UTF_8 0x1 #define IPMI_SYSTEM_INFO_ENCODING_UNICODE 0x2 #define IPMI_SYSTEM_INFO_ENCODING_VALID(__val) \ (((__val) == IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1 \ || (__val) == IPMI_SYSTEM_INFO_ENCODING_UTF_8 \ || (__val) == IPMI_SYSTEM_INFO_ENCODING_UNICODE) ? 1 : 0) #define IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX 14 #define IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX 16 #define IPMI_SYSTEM_INFO_STRING_LEN_MAX 255 #define IPMI_LIST_ALGORITHMS_BY_CIPHER_SUITE 0x1 #define IPMI_LIST_SUPPORTED_ALGORITHMS 0x0 #define IPMI_LIST_ALGORITHM_TYPE_VALID(__val) \ (((__val) == IPMI_LIST_ALGORITHMS_BY_CIPHER_SUITE \ || (__val) == IPMI_LIST_SUPPORTED_ALGORITHMS) ? 1 : 0) #define IPMI_MESSAGING_ACCESS_MODE_DISABLED 0x0 #define IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY 0x1 #define IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE 0x2 #define IPMI_MESSAGING_ACCESS_MODE_SHARED 0x3 #define IPMI_MESSAGING_ACCESS_MODE_VALID(__access_mode) \ (((__access_mode) == IPMI_MESSAGING_ACCESS_MODE_DISABLED \ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY \ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE \ || (__access_mode) == IPMI_MESSAGING_ACCESS_MODE_SHARED) ? 1 : 0) #define IPMI_USER_LEVEL_AUTHENTICATION_ENABLE 0x0 #define IPMI_USER_LEVEL_AUTHENTICATION_DISABLE 0x1 #define IPMI_USER_LEVEL_AUTHENTICATION_VALID(__val) \ (((__val) == IPMI_USER_LEVEL_AUTHENTICATION_ENABLE \ || (__val) == IPMI_USER_LEVEL_AUTHENTICATION_DISABLE) ? 1 : 0) #define IPMI_PER_MESSAGE_AUTHENTICATION_ENABLE 0x0 #define IPMI_PER_MESSAGE_AUTHENTICATION_DISABLE 0x1 #define IPMI_PER_MESSAGE_AUTHENTICATION_VALID(__val) \ (((__val) == IPMI_PER_MESSAGE_AUTHENTICATION_ENABLE \ || (__val) == IPMI_PER_MESSAGE_AUTHENTICATION_DISABLE) ? 1 : 0) #define IPMI_PEF_ALERTING_ENABLE 0x0 #define IPMI_PEF_ALERTING_DISABLE 0x1 #define IPMI_PEF_ALERTING_VALID(__val) \ (((__val) == IPMI_PEF_ALERTING_ENABLE \ || (__val) == IPMI_PEF_ALERTING_DISABLE) ? 1 : 0) #define IPMI_CHANNEL_ACCESS_NO_CHANGE 0x0 #define IPMI_CHANNEL_ACCESS_SET_NON_VOLATILE 0x1 #define IPMI_CHANNEL_ACCESS_SET_VOLATILE 0x2 #define IPMI_CHANNEL_ACCESS_RESERVED 0x3 #define IPMI_CHANNEL_ACCESS_VALID(__access_mode) \ (((__access_mode) == IPMI_CHANNEL_ACCESS_NO_CHANGE \ || (__access_mode) == IPMI_CHANNEL_ACCESS_SET_NON_VOLATILE \ || (__access_mode) == IPMI_CHANNEL_ACCESS_SET_VOLATILE) ? 1 : 0) #define IPMI_PRIVILEGE_LEVEL_LIMIT_NO_CHANGE 0x0 #define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_NON_VOLATILE 0x1 #define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VOLATILE 0x2 #define IPMI_PRIVILEGE_LEVEL_LIMIT_RESERVED 0x3 #define IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VALID(__privilege_level_limit) \ (((__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_NO_CHANGE \ || (__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_SET_NON_VOLATILE \ || (__privilege_level_limit) == IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VOLATILE) ? 1 : 0) #define IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE 0x1 #define IPMI_CHANNEL_ACCESS_GET_VOLATILE 0x2 #define IPMI_CHANNEL_ACCESS_GET_VALID(__val) \ (((__val) == IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE \ || (__val) == IPMI_CHANNEL_ACCESS_GET_VOLATILE) ? 1 : 0) #define IPMI_USER_RESTRICTED_TO_CALLBACK_ENABLE 0x1 #define IPMI_USER_RESTRICTED_TO_CALLBACK_DISABLE 0x0 #define IPMI_USER_RESTRICTED_TO_CALLBACK_VALID(__val) \ (((__val) == IPMI_USER_RESTRICTED_TO_CALLBACK_ENABLE \ || (__val) == IPMI_USER_RESTRICTED_TO_CALLBACK_DISABLE) ? 1 : 0) #define IPMI_PRIVILEGE_LEVEL_LIMIT_VALID(__privilege_level) \ (((__privilege_level) == IPMI_PRIVILEGE_LEVEL_CALLBACK \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_USER \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OPERATOR \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_ADMIN \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OEM \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_NO_ACCESS) ? 1 : 0) #define IPMI_USER_LINK_AUTHENTICATION_ENABLE 0x1 #define IPMI_USER_LINK_AUTHENTICATION_DISABLE 0x0 #define IPMI_USER_LINK_AUTHENTICATION_VALID(__val) \ (((__val) == IPMI_USER_LINK_AUTHENTICATION_ENABLE \ || (__val) == IPMI_USER_LINK_AUTHENTICATION_DISABLE) ? 1 : 0) #define IPMI_USER_IPMI_MESSAGING_ENABLE 0x1 #define IPMI_USER_IPMI_MESSAGING_DISABLE 0x0 #define IPMI_USER_IPMI_MESSAGING_VALID(__val) \ (((__val) == IPMI_USER_IPMI_MESSAGING_ENABLE \ || (__val) == IPMI_USER_IPMI_MESSAGING_DISABLE) ? 1 : 0) #define IPMI_CHANGE_BITS_YES 0x1 #define IPMI_CHANGE_BITS_NO 0x0 #define IPMI_CHANGE_BITS_VALID(__val) \ (((__val) == IPMI_CHANGE_BITS_YES \ || (__val) == IPMI_CHANGE_BITS_NO) ? 1 : 0) #define IPMI_SESSION_SUPPORT_SESSION_LESS 0x00 #define IPMI_SESSION_SUPPORT_SINGLE_SESSION 0x01 #define IPMI_SESSION_SUPPORT_MULTI_SESSION 0x02 #define IPMI_SESSION_SUPPORT_SESSION_BASED 0x03 #define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_READ_KEY 0x0 #define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY 0x1 #define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_LOCK_KEY 0x2 #define IPMI_CHANNEL_SECURITY_KEYS_OPERATION_VALID(__val) \ (((__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_READ_KEY \ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY \ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_LOCK_KEY) ? 1 : 0) #define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R 0x0 #define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G 0x1 #define IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_VALID(__val) \ (((__val) == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R \ || (__val) == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G) ? 1 : 0) #define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_NOT_LOCKABLE 0x0 #define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_LOCKED 0x1 #define IPMI_CHANNEL_SECURITY_KEYS_LOCK_STATUS_KEY_IS_UNLOCKED 0x2 #define IPMI_PASSWORD_OPERATION_DISABLE_USER 0x0 #define IPMI_PASSWORD_OPERATION_ENABLE_USER 0x1 #define IPMI_PASSWORD_OPERATION_SET_PASSWORD 0x2 #define IPMI_PASSWORD_OPERATION_TEST_PASSWORD 0x3 #define IPMI_PASSWORD_OPERATION_VALID(__operation) \ (((__operation) == IPMI_PASSWORD_OPERATION_DISABLE_USER \ || (__operation) == IPMI_PASSWORD_OPERATION_ENABLE_USER \ || (__operation) == IPMI_PASSWORD_OPERATION_SET_PASSWORD \ || (__operation) == IPMI_PASSWORD_OPERATION_TEST_PASSWORD) ? 1 : 0) #define IPMI_PASSWORD_SIZE_16_BYTES 0x0 #define IPMI_PASSWORD_SIZE_20_BYTES 0x1 #define IPMI_PASSWORD_SIZE_VALID(__password_size) \ (((__password_size) == IPMI_PASSWORD_SIZE_16_BYTES \ || (__password_size) == IPMI_PASSWORD_SIZE_20_BYTES) ? 1 : 0) #define IPMI_USER_ID_ENABLE_STATUS_UNSPECIFIED 0x0 #define IPMI_USER_ID_ENABLE_STATUS_ENABLED 0x1 #define IPMI_USER_ID_ENABLE_STATUS_DISABLED 0x2 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_set_bmc_global_enables_rq; extern fiid_template_t tmpl_cmd_set_bmc_global_enables_rs; extern fiid_template_t tmpl_cmd_get_bmc_global_enables_rq; extern fiid_template_t tmpl_cmd_get_bmc_global_enables_rs; extern fiid_template_t tmpl_cmd_clear_message_flags_rq; extern fiid_template_t tmpl_cmd_clear_message_flags_rs; extern fiid_template_t tmpl_cmd_get_message_flags_rq; extern fiid_template_t tmpl_cmd_get_message_flags_rs; extern fiid_template_t tmpl_cmd_enable_message_channel_receive_rq; extern fiid_template_t tmpl_cmd_enable_message_channel_receive_rs; extern fiid_template_t tmpl_cmd_get_message_rq; extern fiid_template_t tmpl_cmd_get_message_rs; extern fiid_template_t tmpl_cmd_send_message_rq; extern fiid_template_t tmpl_cmd_send_message_rs; extern fiid_template_t tmpl_cmd_read_event_message_buffer_rq; extern fiid_template_t tmpl_cmd_read_event_message_buffer_rs; extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_rq; extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_rs; extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_ssif_rs; extern fiid_template_t tmpl_cmd_get_system_interface_capabilities_kcs_rs; extern fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rq; extern fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rs; extern fiid_template_t tmpl_cmd_master_write_read_rq; extern fiid_template_t tmpl_cmd_master_write_read_rs; extern fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rq; extern fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rs; extern fiid_template_t tmpl_cmd_get_system_guid_rq; extern fiid_template_t tmpl_cmd_get_system_guid_rs; extern fiid_template_t tmpl_cmd_get_device_guid_format_rs; extern fiid_template_t tmpl_cmd_set_system_info_parameters_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_rs; extern fiid_template_t tmpl_cmd_set_system_info_parameters_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq; extern fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq; extern fiid_template_t tmpl_cmd_get_system_info_parameters_rq; extern fiid_template_t tmpl_cmd_get_system_info_parameters_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set_rs; extern fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_rs; extern fiid_template_t tmpl_cmd_get_channel_cipher_suites_rq; extern fiid_template_t tmpl_cmd_get_channel_cipher_suites_rs; extern fiid_template_t tmpl_cmd_get_session_challenge_rq; extern fiid_template_t tmpl_cmd_get_session_challenge_rs; extern fiid_template_t tmpl_cmd_activate_session_rq; extern fiid_template_t tmpl_cmd_activate_session_rs; extern fiid_template_t tmpl_cmd_set_session_privilege_level_rq; extern fiid_template_t tmpl_cmd_set_session_privilege_level_rs; extern fiid_template_t tmpl_cmd_close_session_rq; extern fiid_template_t tmpl_cmd_close_session_rs; extern fiid_template_t tmpl_cmd_set_channel_access_rq; extern fiid_template_t tmpl_cmd_set_channel_access_rs; extern fiid_template_t tmpl_cmd_get_channel_access_rq; extern fiid_template_t tmpl_cmd_get_channel_access_rs; extern fiid_template_t tmpl_cmd_get_channel_info_rq; extern fiid_template_t tmpl_cmd_get_channel_info_rs; extern fiid_template_t tmpl_cmd_set_channel_security_keys_rq; extern fiid_template_t tmpl_cmd_set_channel_security_keys_rs; extern fiid_template_t tmpl_cmd_set_user_access_rq; extern fiid_template_t tmpl_cmd_set_user_access_rs; extern fiid_template_t tmpl_cmd_get_user_access_rq; extern fiid_template_t tmpl_cmd_get_user_access_rs; extern fiid_template_t tmpl_cmd_set_user_name_rq; extern fiid_template_t tmpl_cmd_set_user_name_rs; extern fiid_template_t tmpl_cmd_get_user_name_rq; extern fiid_template_t tmpl_cmd_get_user_name_rs; extern fiid_template_t tmpl_cmd_set_user_password_rq; extern fiid_template_t tmpl_cmd_set_user_password_rs; int fill_cmd_set_bmc_global_enables (uint8_t receive_message_queue_interrupt, uint8_t event_message_buffer_full_interrupt, uint8_t event_message_buffer, uint8_t system_event_logging, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rq); int fill_cmd_get_bmc_global_enables (fiid_obj_t obj_cmd_rq); int fill_cmd_clear_message_flags (uint8_t receive_message_queue, uint8_t event_message_buffer, uint8_t watchdog_pre_timeout_interrupt_flag, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rq); int fill_cmd_get_message_flags (fiid_obj_t obj_cmd_rq); int fill_cmd_enable_message_channel_receive (uint8_t channel_number, uint8_t channel_operation, fiid_obj_t obj_cmd_rq); int fill_cmd_get_message (fiid_obj_t obj_cmd_rq); int fill_cmd_send_message (uint8_t channel_number, uint8_t message_authentication, uint8_t message_encryption, uint8_t tracking_operation, const void *message_data, unsigned int message_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_read_event_message_buffer (fiid_obj_t obj_cmd_rq); int fill_cmd_get_system_interface_capabilities (uint8_t system_interface, fiid_obj_t obj_cmd_rq); int fill_cmd_get_bt_interface_capabilities (fiid_obj_t obj_cmd_rq); int fill_cmd_master_write_read (uint8_t bus_type, uint8_t bus_id, uint8_t channel_number, uint8_t slave_address, uint8_t read_count, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_authentication_capabilities (uint8_t channel_number, uint8_t maximum_privilege_level, uint8_t get_ipmi_v20_extended_data, fiid_obj_t obj_cmd_rq); int fill_cmd_get_system_guid (fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters (uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_set_in_progress (uint8_t state, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_system_firmware_version_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_system_firmware_version (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_primary_operating_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_primary_operating_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_operating_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_operating_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_present_os_version_number_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_present_os_version_number (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_bmc_url_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_bmc_url (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_set_system_info_parameters_base_os_hypervisor_url (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq); int fill_cmd_get_system_info_parameters (uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_cipher_suites (uint8_t channel_number, uint8_t payload_type, uint8_t list_index, uint8_t list_algorithm_type, fiid_obj_t obj_cmd_rq); int fill_cmd_get_session_challenge (uint8_t authentication_type, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rq); int fill_cmd_activate_session (uint8_t authentication_type, uint8_t maximum_privilege_level, const void *challenge_string, unsigned int challenge_string_len, uint32_t initial_outbound_sequence_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_session_privilege_level (uint8_t privilege_level, fiid_obj_t obj_cmd_rq); int fill_cmd_close_session (uint32_t session_id, uint8_t *session_handle, fiid_obj_t obj_cmd_rq); int fill_cmd_set_channel_access (uint8_t channel_number, uint8_t ipmi_messaging_access_mode, uint8_t user_level_authentication, uint8_t per_message_authentication, uint8_t pef_alerting, uint8_t channel_access_set, uint8_t channel_privilege_level_limit, uint8_t channel_privilege_level_limit_set, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_access (uint8_t channel_number, uint8_t channel_access_get, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_info (uint8_t channel_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_channel_security_keys (uint8_t channel_number, uint8_t operation, uint8_t key_id, const void *key_value, unsigned int key_value_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_user_access (uint8_t channel_number, uint8_t user_ipmi_messaging, uint8_t user_link_authentication, uint8_t user_restricted_to_callback, uint8_t change_bits_in_byte, uint8_t user_id, uint8_t user_privilege_level_limit, uint8_t user_session_limit, fiid_obj_t obj_cmd_rq); int fill_cmd_get_user_access (uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rq); int fill_cmd_set_user_name (uint8_t user_id, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rq); int fill_cmd_get_user_name (uint8_t user_id, fiid_obj_t obj_cmd_rq); int fill_cmd_set_user_password (uint8_t user_id, uint8_t password_size, uint8_t operation, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_MESSAGING_SUPPORT_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h0000644002055400205540000011373613527331636030213 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H #define IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MIN 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MAX 0xF #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_RESERVED 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_DISABLE_NODE_MANAGER_POLICY_CONTROL 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_ENABLE_NODE_MANAGER_POLICY_CONTROL 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_DISABLE_NODE_MANAGER_POLICIES 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_ENABLE_NODE_MANAGER_POLITICES 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_DISABLE_NODE_MANAGER_POLICIES 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_ENABLE_NODE_MANAGER_POLITICES 0x05 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_DISABLE_NODE_MANAGER_POLICY_CONTROL \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_ENABLE_NODE_MANAGER_POLICY_CONTROL \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_DISABLE_NODE_MANAGER_POLICIES \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_ENABLE_NODE_MANAGER_POLITICES \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_DISABLE_NODE_MANAGER_POLICIES \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_ENABLE_NODE_MANAGER_POLITICES) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED) ? 1 : 0) /* Celsius */ #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER 0x1 /* 1/10 seconds units */ #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT 0x2 /* 1/10 seconds units */ #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER 0x3 /* Only to domain 0 = Entire Platform */ #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY 0x4 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_POLICY_POINTED_BY_POLICY_ID_SHALL_BE_REMOVED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_POLICY_POINTED_BY_POLICY_ID_SHALL_BE_REMOVED \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY) ? 1 : 0) /* achu: not in spec, assume it to be true */ #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_PER_DOMAIN_NODE_MANAGER_POLICY_CONTROL_ENABLED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_PER_DOMAIN_NODE_MANAGER_POLICY_CONTROL_DISABLED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_GLOBAL_NODE_MANAGER_POLICY_CONTROL_ENABLED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_GLOBAL_NODE_MANAGER_POLICY_CONTROL_DISABLED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CREATED_AND_MANAGED_BY_OTHER_MANAGEMENT 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_NOT_CREATED_AND_MANAGED_BY_OTHER_MANAGEMENT 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_POWER_OPTIMIZED_MODE 0 #define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_PERFORMANCE_OPTIMIZED_MODE 1 #define IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_POWER_OPTIMIZED_MODE \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_PERFORMANCE_OPTIMIZED_MODE) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_MAX 3 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MIN 0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MAX 239 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID(__val) \ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MIN + 1) \ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_MAX) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MIN 0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MAX 240 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID(__val) \ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MIN + 1) \ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_MAX) ? 1 : 0) /* achu: not in spec, assume it to be true */ #define IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX 5 #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS 0x1B #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_RESPONSE_TIME_STATISTICS 0x1C #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS 0x1D #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS 0x1E #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS 0x1F #define IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_RESPONSE_TIME_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS 0x05 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS 0x06 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS 0x11 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS 0x12 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS 0x13 #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS 0x1B #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS 0x1C #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS 0x1D #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS 0x1E #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS 0x1F #define IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_GLOBAL_ADMINISTRATIVE_STATE_ENABLED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_GLOBAL_ADMINISTRATIVE_STATE_OTHERWISE 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_OPERATIONAL_STATE_ACTIVELY_MONITORING_DEFINED_TRIGGER 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_OPERATIONAL_STATE_SUSPENDED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_MEASUREMENTS_STATE_IN_PROGRESS 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_MEASUREMENTS_STATE_SUSPENDED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ACTIVATION_STATE_TRIGGERED_AND_ACTIVELY_LIMITING_TARGET 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ACTIVATION_STATE_NOT_TRIGGERED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_TYPE_PLATFORM_POWER_LIMITING 0 /* Legacy, no longer in 2.0 spec */ #define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_TYPE_CPU_POWER_LIMITING 1 /* Legacy, no longer in 2.0 spec */ #define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_WALL_INPUT_POWER_PSU_INPUT_POWER 0 #define IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_DC_POWER_PSU_OUTPUT_POWER_OR_BLADED_SYSTEM 1 #define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_0 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_5 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0 0x05 #define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_1_0 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_2_0 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_3_0 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER) ? 1 : 0) /* legacy names */ #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_REGISTER_ALERT_RECEIVER IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_UNREGISTER_ALERT_RECEIVER IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_VALID(__val) \ IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID((__val)) #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_USE_VOLATILE_ALERT_STRING 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MIN 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MAX 0x7F #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_VALID(__val) \ ((((__val) + 1) >= (IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MIN + 1) \ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_MAX) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_VALID(__val) \ (((__val) == IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_VALID 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_INVALID 0x1 /* legacy names */ #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_CONFIGURATION_VALID IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_VALID #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_INFORMATION_OPERATION_CONFIGURATION_INVALID IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_CONFIGURATION_INVALID #define IPMI_OEM_INTEL_NODE_MANAGER_DESTINATION_SELECTOR_OPERATOR_USE_VOLATILE_DESTINATION_INFO 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MIN 0 #define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MAX 7 #define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS 0xFF #define IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID(__val) \ ((((__val) >= IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MIN \ && (__val) <= IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_MAX) \ || (__val) == IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION 0xFF #define IPMI_OEM_INTEL_NODE_MANAGER_SET_ACTIVE_CORES_CONFIGURATION_VALID(__val) \ (((__val) != IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED \ && ((__val) == IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION \ || (__val) > 0)) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_GET_ACTIVE_CORES_CONFIGURATION_VALID(__val) \ (((__val) != IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_RESERVED) ? 1 : 0) #define IPMI_OEM_INTEL_NODE_MANAGER_TURBO_RATIO_LIMIT_RESTORE_DEFAULT_SETTINGS 0x00 /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq; extern fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs; int fill_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (uint8_t policy_enable_disable, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_policy (uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint16_t policy_target_limit, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint8_t platform_booting_mode, uint8_t cores_disabled, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_policy (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (uint8_t domain_id, uint8_t policy_id, uint16_t *alert_threshold1, uint16_t *alert_threshold2, uint16_t *alert_threshold3, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (uint8_t domain_id, uint8_t policy_id, uint8_t *policy1_suspend_start_time, uint8_t *policy1_suspend_stop_time, uint8_t *policy1_suspend_period_recurrence_monday, uint8_t *policy1_suspend_period_recurrence_tuesday, uint8_t *policy1_suspend_period_recurrence_wednesday, uint8_t *policy1_suspend_period_recurrence_thursday, uint8_t *policy1_suspend_period_recurrence_friday, uint8_t *policy1_suspend_period_recurrence_saturday, uint8_t *policy1_suspend_period_recurrence_sunday, uint8_t *policy2_suspend_start_time, uint8_t *policy2_suspend_stop_time, uint8_t *policy2_suspend_period_recurrence_monday, uint8_t *policy2_suspend_period_recurrence_tuesday, uint8_t *policy2_suspend_period_recurrence_wednesday, uint8_t *policy2_suspend_period_recurrence_thursday, uint8_t *policy2_suspend_period_recurrence_friday, uint8_t *policy2_suspend_period_recurrence_saturday, uint8_t *policy2_suspend_period_recurrence_sunday, uint8_t *policy3_suspend_start_time, uint8_t *policy3_suspend_stop_time, uint8_t *policy3_suspend_period_recurrence_monday, uint8_t *policy3_suspend_period_recurrence_tuesday, uint8_t *policy3_suspend_period_recurrence_wednesday, uint8_t *policy3_suspend_period_recurrence_thursday, uint8_t *policy3_suspend_period_recurrence_friday, uint8_t *policy3_suspend_period_recurrence_saturday, uint8_t *policy3_suspend_period_recurrence_sunday, uint8_t *policy4_suspend_start_time, uint8_t *policy4_suspend_stop_time, uint8_t *policy4_suspend_period_recurrence_monday, uint8_t *policy4_suspend_period_recurrence_tuesday, uint8_t *policy4_suspend_period_recurrence_wednesday, uint8_t *policy4_suspend_period_recurrence_thursday, uint8_t *policy4_suspend_period_recurrence_friday, uint8_t *policy4_suspend_period_recurrence_saturday, uint8_t *policy4_suspend_period_recurrence_sunday, uint8_t *policy5_suspend_start_time, uint8_t *policy5_suspend_stop_time, uint8_t *policy5_suspend_period_recurrence_monday, uint8_t *policy5_suspend_period_recurrence_tuesday, uint8_t *policy5_suspend_period_recurrence_wednesday, uint8_t *policy5_suspend_period_recurrence_thursday, uint8_t *policy5_suspend_period_recurrence_friday, uint8_t *policy5_suspend_period_recurrence_saturday, uint8_t *policy5_suspend_period_recurrence_sunday, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_reset_node_manager_statistics (uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_statistics (uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_capabilities (uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_version (fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (uint8_t domain_id, uint16_t minimum_power_draw, uint16_t maximum_power_draw, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_information, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t slave_address, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_selector, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_node_manager_alert_destination (fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (uint8_t cpu_socket_number, uint8_t active_cores_configuration, uint8_t turbo_ratio_limit, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (uint8_t cpu_socket_number, uint8_t active_cores_configuration, fiid_obj_t obj_cmd_rq); int fill_cmd_oem_intel_node_manager_get_limiting_policy_id (uint8_t domain_id, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_OEM_INTEL_NODE_MANAGER_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-pef-and-alerting-cmds.h0000644002055400205540000006700113527331636027075 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PEF_AND_ALERTING_CMDS_H #define IPMI_PEF_AND_ALERTING_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #include #define IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0 #define IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0 #define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00 #define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01 #define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02 #define IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMPLETE \ || (__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \ || (__value) == IPMI_PEF_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_PEF_POSTPONE_TIMER_DISABLE 0x00 #define IPMI_PEF_POSTPONE_TIMER_TEMPORARY_DISABLE 0xFE #define IPMI_PEF_POSTPONE_TIMER_GET_PRESENT_COUNTDOWN_VALUE 0xFF #define IPMI_PEF_ENABLE 0x1 #define IPMI_PEF_DISABLE 0x0 #define IPMI_PEF_VALID(__val) \ (((__val) == IPMI_PEF_ENABLE \ || (__val) == IPMI_PEF_DISABLE) ? 1 : 0) #define IPMI_PEF_ENABLE 0x1 #define IPMI_PEF_DISABLE 0x0 #define IPMI_PEF_VALID(__val) \ (((__val) == IPMI_PEF_ENABLE \ || (__val) == IPMI_PEF_DISABLE) ? 1 : 0) #define IPMI_PEF_EVENT_MESSAGES_ENABLE 0x1 #define IPMI_PEF_EVENT_MESSAGES_DISABLE 0x0 #define IPMI_PEF_EVENT_MESSAGES_VALID(__val) \ (((__val) == IPMI_PEF_EVENT_MESSAGES_ENABLE \ || (__val) == IPMI_PEF_EVENT_MESSAGES_DISABLE) ? 1 : 0) #define IPMI_PEF_STARTUP_DELAY_ENABLE 0x1 #define IPMI_PEF_STARTUP_DELAY_DISABLE 0x0 #define IPMI_PEF_STARTUP_DELAY_VALID(__val) \ (((__val) == IPMI_PEF_STARTUP_DELAY_ENABLE \ || (__val) == IPMI_PEF_STARTUP_DELAY_DISABLE) ? 1 : 0) #define IPMI_PEF_ALERT_STARTUP_DELAY_ENABLE 0x1 #define IPMI_PEF_ALERT_STARTUP_DELAY_DISABLE 0x0 #define IPMI_PEF_ALERT_STARTUP_DELAY_VALID(__val) \ (((__val) == IPMI_PEF_ALERT_STARTUP_DELAY_ENABLE \ || (__val) == IPMI_PEF_ALERT_STARTUP_DELAY_DISABLE) ? 1 : 0) #define IPMI_PEF_ALERT_ACTION_ENABLE 0x1 #define IPMI_PEF_ALERT_ACTION_DISABLE 0x0 #define IPMI_PEF_ALERT_ACTION_VALID(__val) \ (((__val) == IPMI_PEF_ALERT_ACTION_ENABLE \ || (__val) == IPMI_PEF_ALERT_ACTION_DISABLE) ? 1 : 0) #define IPMI_PEF_POWER_DOWN_ACTION_ENABLE 0x1 #define IPMI_PEF_POWER_DOWN_ACTION_DISABLE 0x0 #define IPMI_PEF_POWER_DOWN_ACTION_VALID(__val) \ (((__val) == IPMI_PEF_POWER_DOWN_ACTION_ENABLE \ || (__val) == IPMI_PEF_POWER_DOWN_ACTION_DISABLE) ? 1 : 0) #define IPMI_PEF_RESET_ACTION_ENABLE 0x1 #define IPMI_PEF_RESET_ACTION_DISABLE 0x0 #define IPMI_PEF_RESET_ACTION_VALID(__val) \ (((__val) == IPMI_PEF_RESET_ACTION_ENABLE \ || (__val) == IPMI_PEF_RESET_ACTION_DISABLE) ? 1 : 0) #define IPMI_PEF_POWER_CYCLE_ACTION_ENABLE 0x1 #define IPMI_PEF_POWER_CYCLE_ACTION_DISABLE 0x0 #define IPMI_PEF_POWER_CYCLE_ACTION_VALID(__val) \ (((__val) == IPMI_PEF_POWER_CYCLE_ACTION_ENABLE \ || (__val) == IPMI_PEF_POWER_CYCLE_ACTION_DISABLE) ? 1 : 0) #define IPMI_PEF_OEM_ACTION_ENABLE 0x1 #define IPMI_PEF_OEM_ACTION_DISABLE 0x0 #define IPMI_PEF_OEM_ACTION_VALID(__val) \ (((__val) == IPMI_PEF_OEM_ACTION_ENABLE \ || (__val) == IPMI_PEF_OEM_ACTION_DISABLE) ? 1 : 0) #define IPMI_PEF_DIAGNOSTIC_INTERRUPT_ENABLE 0x1 #define IPMI_PEF_DIAGNOSTIC_INTERRUPT_DISABLE 0x0 #define IPMI_PEF_DIAGNOSTIC_INTERRUPT_VALID(__val) \ (((__val) == IPMI_PEF_DIAGNOSTIC_INTERRUPT_ENABLE \ || (__val) == IPMI_PEF_DIAGNOSTIC_INTERRUPT_DISABLE) ? 1 : 0) #define IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER 0x2 #define IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER 0x0 #define IPMI_FILTER_CONFIGURATION_FILTER_TYPE_VALID(__val) \ (((__val) == IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER \ || (__val) == IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER) ? 1 : 0) #define IPMI_FILTER_CONFIGURATION_FILTER_ENABLE 0x1 #define IPMI_FILTER_CONFIGURATION_FILTER_DISABLE 0x0 #define IPMI_FILTER_CONFIGURATION_FILTER_VALID(__val) \ (((__val) == IPMI_FILTER_CONFIGURATION_FILTER_ENABLE \ || (__val) == IPMI_FILTER_CONFIGURATION_FILTER_DISABLE) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_ALERT 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_ALERT 0x0 #define IPMI_EVENT_FILTER_ACTION_ALERT_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_ALERT \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_ALERT) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_POWER_OFF 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_POWER_OFF 0x0 #define IPMI_EVENT_FILTER_ACTION_POWER_OFF_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_POWER_OFF \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_POWER_OFF) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_RESET 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_RESET 0x0 #define IPMI_EVENT_FILTER_ACTION_RESET_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_RESET \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_RESET) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_POWER_CYCLE 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_POWER_CYCLE 0x0 #define IPMI_EVENT_FILTER_ACTION_POWER_CYCLE_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_POWER_CYCLE \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_POWER_CYCLE) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_OEM_ACTION 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_OEM 0x0 #define IPMI_EVENT_FILTER_ACTION_OEM_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_OEM_ACTION \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_OEM) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_DIAGNOSTIC_INTERRUPT 0x0 #define IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_DIAGNOSTIC_INTERRUPT) ? 1 : 0) #define IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION 0x1 #define IPMI_EVENT_FILTER_ACTION_NO_GROUP_CONTROL_OPERATION 0x0 #define IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION_VALID(__val) \ (((__val) == IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION \ || (__val) == IPMI_EVENT_FILTER_ACTION_NO_GROUP_CONTROL_OPERATION) ? 1 : 0) #define IPMI_EVENT_SEVERITY_UNSPECIFIED 0x00 #define IPMI_EVENT_SEVERITY_MONITOR 0x01 #define IPMI_EVENT_SEVERITY_INFORMATION 0x02 #define IPMI_EVENT_SEVERITY_OK 0x04 #define IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION 0x08 #define IPMI_EVENT_SEVERITY_CRITICAL_CONDITION 0x10 #define IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION 0x20 #define IPMI_EVENT_SEVERITY_VALID(__val) \ (((__val) == IPMI_EVENT_SEVERITY_UNSPECIFIED \ || (__val) == IPMI_EVENT_SEVERITY_MONITOR \ || (__val) == IPMI_EVENT_SEVERITY_INFORMATION \ || (__val) == IPMI_EVENT_SEVERITY_OK \ || (__val) == IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION \ || (__val) == IPMI_EVENT_SEVERITY_CRITICAL_CONDITION \ || (__val) == IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION) ? 1 : 0) #define IPMI_EVENT_SENSOR_TYPE_RESERVED IPMI_SENSOR_TYPE_RESERVED #define IPMI_EVENT_SENSOR_TYPE_TEMPERATURE IPMI_SENSOR_TYPE_TEMPERATURE #define IPMI_EVENT_SENSOR_TYPE_VOLTAGE IPMI_SENSOR_TYPE_VOLTAGE #define IPMI_EVENT_SENSOR_TYPE_CURRENT IPMI_SENSOR_TYPE_CURRENT #define IPMI_EVENT_SENSOR_TYPE_FAN IPMI_SENSOR_TYPE_FAN #define IPMI_EVENT_SENSOR_TYPE_PHYSICAL_SECURITY IPMI_SENSOR_TYPE_PHYSICAL_SECURITY #define IPMI_EVENT_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT #define IPMI_EVENT_SENSOR_TYPE_PROCESSOR IPMI_SENSOR_TYPE_PROCESSOR #define IPMI_EVENT_SENSOR_TYPE_POWER_SUPPLY IPMI_SENSOR_TYPE_POWER_SUPPLY #define IPMI_EVENT_SENSOR_TYPE_POWER_UNIT IPMI_SENSOR_TYPE_POWER_UNIT #define IPMI_EVENT_SENSOR_TYPE_COOLING_DEVICE IPMI_SENSOR_TYPE_COOLING_DEVICE #define IPMI_EVENT_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR #define IPMI_EVENT_SENSOR_TYPE_MEMORY IPMI_SENSOR_TYPE_MEMORY #define IPMI_EVENT_SENSOR_TYPE_DRIVE_SLOT IPMI_SENSOR_TYPE_DRIVE_SLOT #define IPMI_EVENT_SENSOR_TYPE_POST_MEMORY_RESIZE IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE #define IPMI_EVENT_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS #define IPMI_EVENT_SENSOR_TYPE_EVENT_LOGGING_DISABLED IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED #define IPMI_EVENT_SENSOR_TYPE_WATCHDOG1 IPMI_SENSOR_TYPE_WATCHDOG1 #define IPMI_EVENT_SENSOR_TYPE_SYSTEM_EVENT IPMI_SENSOR_TYPE_SYSTEM_EVENT #define IPMI_EVENT_SENSOR_TYPE_CRITICAL_INTERRUPT IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT #define IPMI_EVENT_SENSOR_TYPE_BUTTON_SWITCH IPMI_SENSOR_TYPE_BUTTON_SWITCH #define IPMI_EVENT_SENSOR_TYPE_MODULE_BOARD IPMI_SENSOR_TYPE_MODULE_BOARD #define IPMI_EVENT_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR #define IPMI_EVENT_SENSOR_TYPE_ADD_IN_CARD IPMI_SENSOR_TYPE_ADD_IN_CARD #define IPMI_EVENT_SENSOR_TYPE_CHASSIS IPMI_SENSOR_TYPE_CHASSIS #define IPMI_EVENT_SENSOR_TYPE_CHIP_SET IPMI_SENSOR_TYPE_CHIP_SET #define IPMI_EVENT_SENSOR_TYPE_OTHER_FRU IPMI_SENSOR_TYPE_OTHER_FRU #define IPMI_EVENT_SENSOR_TYPE_CABLE_INTERCONNECT IPMI_SENSOR_TYPE_CABLE_INTERCONNECT #define IPMI_EVENT_SENSOR_TYPE_TERMINATOR IPMI_SENSOR_TYPE_TERMINATOR #define IPMI_EVENT_SENSOR_TYPE_SYSTEM_BOOT_INITIATED IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED #define IPMI_EVENT_SENSOR_TYPE_BOOT_ERROR IPMI_SENSOR_TYPE_BOOT_ERROR #define IPMI_EVENT_SENSOR_TYPE_OS_BOOT IPMI_SENSOR_TYPE_OS_BOOT #define IPMI_EVENT_SENSOR_TYPE_OS_CRITICAL_STOP IPMI_SENSOR_TYPE_OS_CRITICAL_STOP #define IPMI_EVENT_SENSOR_TYPE_SLOT_CONNECTOR IPMI_SENSOR_TYPE_SLOT_CONNECTOR #define IPMI_EVENT_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE #define IPMI_EVENT_SENSOR_TYPE_WATCHDOG2 IPMI_SENSOR_TYPE_WATCHDOG2 #define IPMI_EVENT_SENSOR_TYPE_PLATFORM_ALERT IPMI_SENSOR_TYPE_PLATFORM_ALERT #define IPMI_EVENT_SENSOR_TYPE_ENTITY_PRESENCE IPMI_SENSOR_TYPE_ENTITY_PRESENCE #define IPMI_EVENT_SENSOR_TYPE_MONITOR_ASIC_IC IPMI_SENSOR_TYPE_MONITOR_ASIC_IC #define IPMI_EVENT_SENSOR_TYPE_LAN IPMI_SENSOR_TYPE_LAN #define IPMI_EVENT_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH #define IPMI_EVENT_SENSOR_TYPE_BATTERY IPMI_SENSOR_TYPE_BATTERY #define IPMI_EVENT_SENSOR_TYPE_SESSION_AUDIT IPMI_SENSOR_TYPE_SESSION_AUDIT #define IPMI_EVENT_SENSOR_TYPE_VERSION_CHANGE IPMI_SENSOR_TYPE_VERSION_CHANGE #define IPMI_EVENT_SENSOR_TYPE_FRU_STATE IPMI_SENSOR_TYPE_FRU_STATE #define IPMI_EVENT_SENSOR_TYPE_ANY 0xff #define IPMI_STRING_SELECTOR_MIN 0x00 #define IPMI_STRING_SELECTOR_MAX 0x7F #define IPMI_STRING_SELECTOR_VOLATILE 0x0 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_STRING_SELECTOR_VALID(__val) \ (((__val+1) >= (IPMI_STRING_SELECTOR_MIN + 1) \ && (__val) <= IPMI_STRING_SELECTOR_MAX) ? 1 : 0) #define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_SOFTWARE 0x0 #define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_BMC 0x1 #define IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_VALID(__val) \ (((__val) == IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_SOFTWARE \ || (__val) == IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_BY_BMC) ? 1 : 0) #define IPMI_ALERT_IMMEDIATE_OPERATION_INITIATE_ALERT 0x0 #define IPMI_ALERT_IMMEDIATE_OPERATION_GET_ALERT_IMMEDIATE_STATUS 0x1 #define IPMI_ALERT_IMMEDIATE_OPERATION_CLEAR_ALERT_IMMEDIATE_STATUS 0x2 #define IPMI_ALERT_IMMEDIATE_OPERATION_RESERVED 0x3 #define IPMI_ALERT_IMMEDIATE_OPERATION_VALID(__val) \ (((__val) == IPMI_ALERT_IMMEDIATE_OPERATION_INITIATE_ALERT \ || (__val) == IPMI_ALERT_IMMEDIATE_OPERATION_GET_ALERT_IMMEDIATE_STATUS \ || (__val) == IPMI_ALERT_IMMEDIATE_OPERATION_CLEAR_ALERT_IMMEDIATE_STATUS) ? 1 : 0) #define IPMI_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR 0x1 #define IPMI_DO_NOT_SEND_AN_ALERT_STRING 0x0 #define IPMI_SEND_ALERT_STRING_VALID(__val) \ (((__val) == IPMI_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR \ || (__val) == IPMI_DO_NOT_SEND_AN_ALERT_STRING) ? 1 : 0) #define IPMI_GET_PEF_PARAMETER 0x0 #define IPMI_GET_PEF_PARAMETER_REVISION_ONLY 0x1 #define IPMI_GET_PEF_PARAMETER_VALID(__val) \ (((__val) == IPMI_GET_PEF_PARAMETER \ || (__val) == IPMI_GET_PEF_PARAMETER_REVISION_ONLY) ? 1 : 0) #define IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE 16 #define IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE_VALID(__val) \ (((__val) <= IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE) ? 1 : 0) #define IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION 0x0 #define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY 0x1 #define IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES 0x2 #define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL 0x3 #define IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE 0x4 #define IPMI_ALERT_POLICY_TABLE_POLICY_TYPE_VALID(__val) \ (((__val) == IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION \ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY \ || (__val) == IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES \ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL \ || (__val) == IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE) ? 1 : 0) #define IPMI_ALERT_POLICY_DISABLED 0x0 #define IPMI_ALERT_POLICY_ENABLED 0x1 #define IPMI_ALERT_POLICY_ENABLED_DISABLED_VALID(__val) \ (((__val) == IPMI_ALERT_POLICY_DISABLED \ || (__val) == IPMI_ALERT_POLICY_ENABLED) ? 1 : 0) #define IPMI_EVENT_SPECIFIC_ALERT_STRING_NO 0x0 #define IPMI_EVENT_SPECIFIC_ALERT_STRING_YES 0x1 #define IPMI_EVENT_SPECIFIC_ALERT_STRING_VALID(__val) \ (((__val) == IPMI_EVENT_SPECIFIC_ALERT_STRING_NO \ || (__val) == IPMI_EVENT_SPECIFIC_ALERT_STRING_YES) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_pef_capabilities_rq; extern fiid_template_t tmpl_cmd_get_pef_capabilities_rs; extern fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rq; extern fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rs; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_control_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq; extern fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_control_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_data1_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs; extern fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs; extern fiid_template_t tmpl_cmd_set_last_processed_event_id_rq; extern fiid_template_t tmpl_cmd_set_last_processed_event_id_rs; extern fiid_template_t tmpl_cmd_get_last_processed_event_id_rq; extern fiid_template_t tmpl_cmd_get_last_processed_event_id_rs; extern fiid_template_t tmpl_cmd_alert_immediate_rq; extern fiid_template_t tmpl_cmd_alert_immediate_rs; extern fiid_template_t tmpl_cmd_pet_acknowledge_rq; extern fiid_template_t tmpl_cmd_pet_acknowledge_rs; int fill_cmd_get_pef_capabilities (fiid_obj_t obj_cmd_rq); int fill_cmd_arm_pef_postpone_timer (uint8_t pef_postpone_timeout, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters (uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_set_in_progress (uint8_t state, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_pef_control (uint8_t pef, uint8_t pef_event_messages, uint8_t pef_startup_delay, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_pef_action_global_control (uint8_t alert_action, uint8_t power_down_action, uint8_t reset_action, uint8_t power_cycle_action, uint8_t oem_action, uint8_t diagnostic_interrupt, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_pef_startup_delay (uint8_t pef_startup_delay, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_event_filter_table (uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_enable, uint8_t event_filter_action_alert, uint8_t event_filter_action_power_off, uint8_t event_filter_action_reset, uint8_t event_filter_action_power_cycle, uint8_t event_filter_action_oem, uint8_t event_filter_action_diagnostic_interrupt, uint8_t event_filter_action_group_control_operation, uint8_t alert_policy_number_policy_number, uint8_t alert_policy_number_group_control_selector, uint8_t event_severity, uint8_t generator_id_byte1, uint8_t generator_id_byte2, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_trigger, uint16_t event_data1_offset_mask, uint8_t event_data1_AND_mask, uint8_t event_data1_compare1, uint8_t event_data1_compare2, uint8_t event_data2_AND_mask, uint8_t event_data2_compare1, uint8_t event_data2_compare2, uint8_t event_data3_AND_mask, uint8_t event_data3_compare1, uint8_t event_data3_compare2, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_event_filter_table_data1 (uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_enable, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_alert_string_keys (uint8_t string_selector, uint8_t filter_number, uint8_t set_number_for_string, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_alert_strings (uint8_t string_selector, uint8_t block_selector, const uint8_t *string_data, unsigned int string_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_pef_configuration_parameters_alert_policy_table (uint8_t alert_policy_entry_number, uint8_t policy_type, uint8_t policy_enabled, uint8_t policy_number, uint8_t destination_selector, uint8_t channel_number, uint8_t alert_string_set_selector, uint8_t event_specific_alert_string, fiid_obj_t obj_cmd_rq); int fill_cmd_get_pef_configuration_parameters (uint8_t parameter_selector, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq); int fill_cmd_set_last_processed_event_id (uint8_t set_record_id_for_last_record, uint16_t record_id, fiid_obj_t obj_cmd_rq); int fill_cmd_get_last_processed_event_id (fiid_obj_t obj_cmd_rq); int fill_cmd_alert_immediate (uint8_t channel_number, uint8_t destination_selector, uint8_t operation, uint8_t string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq); int fill_cmd_pet_acknowledge (uint16_t sequence_number, uint32_t local_timestamp, uint8_t event_source_type, uint8_t sensor_device, uint8_t sensor_number, uint32_t event_data, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_PEF_AND_ALERTING_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h0000644002055400205540000002220613527331636031524 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H #define IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include /* achu: 4 bit field is 1 based * * note that Get Payload Activation Status returns instance status for * 16 instances, which is not possible. */ #define IPMI_PAYLOAD_INSTANCE_MIN 1 #define IPMI_PAYLOAD_INSTANCE_MAX 15 #define IPMI_PAYLOAD_INSTANCE_VALID(__val) \ (((__val) >= IPMI_PAYLOAD_INSTANCE_MIN \ || (__val) <= IPMI_PAYLOAD_INSTANCE_MAX) ? 1 : 0) #define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_ASSERTED 0x0 #define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_DEASSERTED 0x1 #define IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_VALID(__val) \ (((__val) == IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_ASSERTED \ || (__val) == IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_DEASSERTED) ? 1 : 0) #define IPMI_SERIAL_MODEM_ALERTS_FAIL_WHILE_SOL_ACTIVE 0x0 #define IPMI_SERIAL_MODEM_ALERTS_DEFERRED_WHILE_SOL_ACTIVE 0x1 #define IPMI_SERIAL_MODEM_ALERTS_SUCCEED_WHILE_SOL_ACTIVE 0x2 #define IPMI_SERIAL_MODEM_ALERTS_RESERVED 0x3 #define IPMI_SERIAL_MODEM_ALERTS_VALID(__val) \ (((__val) == IPMI_SERIAL_MODEM_ALERTS_FAIL_WHILE_SOL_ACTIVE \ || (__val) == IPMI_SERIAL_MODEM_ALERTS_DEFERRED_WHILE_SOL_ACTIVE \ || (__val) == IPMI_SERIAL_MODEM_ALERTS_SUCCEED_WHILE_SOL_ACTIVE) ? 1 : 0) #define IPMI_TEST_MODE_ACTIVATED 0x1 #define IPMI_TEST_MODE_DEACTIVATED 0x0 #define IPMI_TEST_MODE_VALID(__val) \ (((__val) == IPMI_TEST_MODE_ACTIVATED \ || (__val) == IPMI_TEST_MODE_DEACTIVATED) ? 1 : 0) #define IPMI_ACTIVATE_PAYLOAD_WITH_AUTHENTICATION 0x1 #define IPMI_ACTIVATE_PAYLOAD_WITHOUT_AUTHENTICATION 0x0 #define IPMI_AUTHENTICATION_ACTIVATION_VALID(__val) \ (((__val) == IPMI_ACTIVATE_PAYLOAD_WITH_AUTHENTICATION \ || (__val) == IPMI_ACTIVATE_PAYLOAD_WITHOUT_AUTHENTICATION) ? 1 : 0) #define IPMI_ACTIVATE_PAYLOAD_WITH_ENCRYPTION 0x1 #define IPMI_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION 0x0 #define IPMI_ENCRYPTION_ACTIVATION_VALID(__val) \ (((__val) == IPMI_ACTIVATE_PAYLOAD_WITH_ENCRYPTION \ || (__val) == IPMI_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION) ? 1 : 0) #define IPMI_TEST_MODE_NOT_SUPPORTED 0x0 #define IPMI_TEST_MODE_ENABLED 0x1 #define IPMI_SUSPEND_ENCRYPTION 0x0 #define IPMI_RESUME_ENCRYPTION 0x1 #define IPMI_REGENERATE_INITIALIZATION_VECTOR 0x2 #define IPMI_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_VALID(__val) \ (((__val) == IPMI_SUSPEND_ENCRYPTION \ || (__val) == IPMI_RESUME_ENCRYPTION \ || (__val) == IPMI_REGENERATE_INITIALIZATION_VECTOR) ? 1 : 0) #define IPMI_SET_USER_PAYLOAD_OPERATION_ENABLE 0x00 #define IPMI_SET_USER_PAYLOAD_OPERATION_DISABLE 0x01 #define IPMI_SET_USER_PAYLOAD_OPERATION_VALID(__val) \ (((__val) == IPMI_SET_USER_PAYLOAD_OPERATION_ENABLE \ || (__val) == IPMI_SET_USER_PAYLOAD_OPERATION_DISABLE) ? 1 : 0) /* achu: See IPMI Spec Set User Payload Access command. Enable may be * 0 or 1, and Disable may be 0 or 1 as well. */ #define IPMI_PAYLOAD_ACCESS_VALID(__val) \ (((__val) == 0 \ || (__val) == 1) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_activate_payload_rq; extern fiid_template_t tmpl_cmd_activate_payload_sol_rq; extern fiid_template_t tmpl_cmd_activate_payload_rs; extern fiid_template_t tmpl_cmd_activate_payload_sol_rs; extern fiid_template_t tmpl_cmd_deactivate_payload_rq; extern fiid_template_t tmpl_cmd_deactivate_payload_rs; extern fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rq; extern fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rq; extern fiid_template_t tmpl_cmd_get_payload_activation_status_rq; extern fiid_template_t tmpl_cmd_get_payload_activation_status_rs; extern fiid_template_t tmpl_cmd_get_payload_instance_info_rq; extern fiid_template_t tmpl_cmd_get_payload_instance_info_rs; extern fiid_template_t tmpl_cmd_set_user_payload_access_rq; extern fiid_template_t tmpl_cmd_set_user_payload_access_rs; extern fiid_template_t tmpl_cmd_get_user_payload_access_rq; extern fiid_template_t tmpl_cmd_get_user_payload_access_rs; extern fiid_template_t tmpl_cmd_get_channel_payload_support_rq; extern fiid_template_t tmpl_cmd_get_channel_payload_support_rs; extern fiid_template_t tmpl_cmd_get_channel_payload_version_rq; extern fiid_template_t tmpl_cmd_get_channel_payload_version_rs; extern fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rq; extern fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rs; int fill_cmd_activate_payload (uint8_t payload_type, uint8_t payload_instance, const void *auxiliary_request_data, unsigned int auxiliary_request_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_activate_payload_sol (uint8_t payload_type, uint8_t payload_instance, uint8_t sol_startup_handshake, uint8_t shared_serial_alert_behavior, uint8_t test_mode, uint8_t authentication_activation, uint8_t encryption_activation, fiid_obj_t obj_cmd_rq); int fill_cmd_deactivate_payload (uint8_t payload_type, uint8_t payload_instance, uint32_t payload_auxiliary_data, fiid_obj_t obj_cmd_rq); int fill_cmd_suspend_resume_payload_encryption (uint8_t payload_type, uint8_t payload_instance, uint8_t operation, fiid_obj_t obj_cmd_rq); int fill_cmd_get_payload_activation_status (uint8_t payload_type, fiid_obj_t obj_cmd_rq); int fill_cmd_get_payload_instance_info (uint8_t payload_type, uint8_t payload_instance, fiid_obj_t obj_cmd_rq); int fill_cmd_set_user_payload_access (uint8_t channel_number, uint8_t user_id, uint8_t operation, uint8_t standard_payload_1, uint8_t standard_payload_2, uint8_t standard_payload_3, uint8_t standard_payload_4, uint8_t standard_payload_5, uint8_t standard_payload_6, uint8_t standard_payload_7, uint8_t oem_payload_0, uint8_t oem_payload_1, uint8_t oem_payload_2, uint8_t oem_payload_3, uint8_t oem_payload_4, uint8_t oem_payload_5, uint8_t oem_payload_6, uint8_t oem_payload_7, fiid_obj_t obj_cmd_rq); int fill_cmd_get_user_payload_access (uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_payload_support (uint8_t channel_number, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_payload_version (uint8_t channel_number, uint8_t payload_type, fiid_obj_t obj_cmd_rq); int fill_cmd_get_channel_oem_payload_info (uint8_t channel_number, uint8_t payload_type, uint32_t oem_iana, uint16_t oem_payload_id, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-sdr-repository-cmds.h0000644002055400205540000000556613527331636026775 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_REPOSITORY_CMDS_H #define IPMI_SDR_REPOSITORY_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_UNSPECIFIED 0x0 #define IPMI_SDR_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x1 #define IPMI_SDR_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x2 #define IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED 0x3 #define IPMI_SDR_IPMB_SLAVE_ADDRESS 0x0 #define IPMI_SDR_SYSTEM_SOFTWARE_ID 0x1 #define IPMI_SDR_RECORD_ID_FIRST 0x0000 #define IPMI_SDR_RECORD_ID_LAST 0xFFFF #define IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ 0xFF /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_sdr_repository_info_rq; extern fiid_template_t tmpl_cmd_get_sdr_repository_info_rs; extern fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rq; extern fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rs; extern fiid_template_t tmpl_cmd_reserve_sdr_repository_rq; extern fiid_template_t tmpl_cmd_reserve_sdr_repository_rs; extern fiid_template_t tmpl_cmd_get_sdr_rq; extern fiid_template_t tmpl_cmd_get_sdr_rs; extern fiid_template_t tmpl_cmd_get_sdr_repository_time_rq; extern fiid_template_t tmpl_cmd_get_sdr_repository_time_rs; extern fiid_template_t tmpl_cmd_set_sdr_repository_time_rq; extern fiid_template_t tmpl_cmd_set_sdr_repository_time_rs; int fill_cmd_get_repository_info (fiid_obj_t obj_cmd_rq); int fill_cmd_get_repository_allocation_info (fiid_obj_t obj_cmd_rq); int fill_cmd_reserve_sdr_repository (fiid_obj_t obj_cmd_rq); int fill_cmd_get_sdr (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sdr_repository_time (fiid_obj_t obj_cmd_rq); int fill_cmd_set_sdr_repository_time (uint32_t time, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_SDR_REPOSITORY_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-sel-cmds.h0000644002055400205540000001204113527331636024535 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_CMDS_H #define IPMI_SEL_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY 0x0000 #define IPMI_SEL_GET_RECORD_ID_LAST_ENTRY 0xFFFF #define IPMI_SEL_CLEAR_OPERATION_INITIATE_ERASE 0xAA #define IPMI_SEL_CLEAR_OPERATION_GET_ERASURE_STATUS 0x0 #define IPMI_SEL_CLEAR_OPERATION_VALID(__val) \ (((__val) == IPMI_SEL_CLEAR_OPERATION_INITIATE_ERASE \ || (__val) == IPMI_SEL_CLEAR_OPERATION_GET_ERASURE_STATUS) ? 1 : 0) #define IPMI_SEL_CLEAR_ERASURE_IN_PROGRESS 0x0 #define IPMI_SEL_CLEAR_ERASE_COMPLETED 0x1 #define IPMI_SEL_READ_ENTIRE_RECORD_BYTES_TO_READ 0xFF #define IPMI_SEL_TIME_UTC_OFFSET_MIN -1440 #define IPMI_SEL_TIME_UTC_OFFSET_MAX 1440 #define IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED 0x07FF #define IPMI_SEL_TIME_UTC_OFFSET_VALID(__val) \ ((((__val) >= IPMI_SEL_TIME_UTC_OFFSET_MIN \ && (__val) <= IPMI_SEL_TIME_UTC_OFFSET_MAX) \ || (__val) == IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED) ? 1 : 0) #define IPMI_AUXILIARY_LOG_TYPE_MCA 0x00 #define IPMI_AUXILIARY_LOG_TYPE_OEM1 0x01 #define IPMI_AUXILIARY_LOG_TYPE_OEM2 0x02 #define IPMI_AUXILIARY_LOG_TYPE_VALID(__val) \ (((__val) == IPMI_AUXILIARY_LOG_TYPE_MCA \ || (__val) == IPMI_AUXILIARY_LOG_TYPE_OEM1 \ || (__val) == IPMI_AUXILIARY_LOG_TYPE_OEM2) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_sel_info_rq; extern fiid_template_t tmpl_cmd_get_sel_info_rs; extern fiid_template_t tmpl_cmd_get_sel_allocation_info_rq; extern fiid_template_t tmpl_cmd_get_sel_allocation_info_rs; extern fiid_template_t tmpl_cmd_reserve_sel_rq; extern fiid_template_t tmpl_cmd_reserve_sel_rs; extern fiid_template_t tmpl_cmd_get_sel_entry_rq; extern fiid_template_t tmpl_cmd_get_sel_entry_rs; extern fiid_template_t tmpl_cmd_delete_sel_entry_rq; extern fiid_template_t tmpl_cmd_delete_sel_entry_rs; extern fiid_template_t tmpl_cmd_clear_sel_rq; extern fiid_template_t tmpl_cmd_clear_sel_rs; extern fiid_template_t tmpl_cmd_get_sel_time_rq; extern fiid_template_t tmpl_cmd_get_sel_time_rs; extern fiid_template_t tmpl_cmd_set_sel_time_rq; extern fiid_template_t tmpl_cmd_set_sel_time_rs; extern fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rq; extern fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rs; extern fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rq; extern fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rs; extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_rq; extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_rs; extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_mca_rs; extern fiid_template_t tmpl_cmd_get_auxiliary_log_status_oem_rs; extern fiid_template_t tmpl_cmd_set_auxiliary_log_status_rq; extern fiid_template_t tmpl_cmd_set_auxiliary_log_status_rs; int fill_cmd_get_sel_info (fiid_obj_t obj_cmd_rq); int fill_cmd_get_sel_allocation_info (fiid_obj_t obj_cmd_rq); int fill_cmd_reserve_sel (fiid_obj_t obj_cmd_rq); int fill_cmd_get_sel_entry (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_delete_sel_entry (uint16_t reservation_id, uint16_t record_id, fiid_obj_t obj_cmd_rq); int fill_cmd_clear_sel (uint16_t reservation_id, uint8_t operation, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sel_time (fiid_obj_t obj_cmd_rq); int fill_cmd_set_sel_time (uint32_t time, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sel_time_utc_offset (fiid_obj_t obj_cmd_rq); int fill_cmd_set_sel_time_utc_offset (int16_t offset, fiid_obj_t obj_cmd_rq); int fill_cmd_get_auxiliary_log_status (uint8_t log_type, fiid_obj_t obj_cmd_rq); int fill_cmd_set_auxiliary_log_status (uint8_t log_type, const void *log_data, unsigned int log_data_len, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_SEL_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-sensor-cmds.h0000644002055400205540000004317713527331636025301 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_CMDS_H #define IPMI_SENSOR_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SENSOR_GET_SENSOR_COUNT 0x00 #define IPMI_SENSOR_GET_SDR_COUNT 0x01 #define IPMI_SENSOR_GET_SDR_INFO_OPERATION_VALID(__val) \ (((__val) == IPMI_SENSOR_GET_SENSOR_COUNT \ || (__val) == IPMI_SENSOR_GET_SDR_COUNT) ? 1 : 0) #define IPMI_SENSOR_STATIC_SENSOR_POPULATION 0x0 #define IPMI_SENSOR_DYNAMIC_SENSOR_POPULATION 0x1 /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ #define IPMI_SENSOR_HYSTERESIS_MASK 0xFF #define IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES 0x0 #define IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES 0x1 #define IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES 0x2 #define IPMI_SENSOR_EVENT_MESSAGE_ACTION_VALID(__val) \ (((__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES \ || (__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES \ || (__val) == IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES) ? 1 : 0) #define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_ENABLE 0x1 #define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE 0x0 #define IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_VALID(__val) \ (((__val) == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_ENABLE \ || (__val) == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) ? 1 : 0) #define IPMI_SENSOR_ALL_EVENT_MESSAGES_ENABLE 0x1 #define IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE 0x0 #define IPMI_SENSOR_ALL_EVENT_MESSAGES_VALID(__val) \ (((__val) == IPMI_SENSOR_ALL_EVENT_MESSAGES_ENABLE \ || (__val) == IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE) ? 1 : 0) #define IPMI_SENSOR_EVENT_FLAG_ENABLE 0x1 #define IPMI_SENSOR_EVENT_FLAG_DISABLE 0x0 #define IPMI_SENSOR_EVENT_FLAG_VALID(__val) \ (((__val) == IPMI_SENSOR_EVENT_FLAG_ENABLE \ || (__val) == IPMI_SENSOR_EVENT_FLAG_DISABLE) ? 1 : 0) /* achu: Yes, this one is backwards. I don't know why */ #define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_ENABLED 0x0 #define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_DISABLED 0x1 #define IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_VALID(__val) \ (((__val) == IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_ENABLED \ || (__val) == IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_DISABLED) ? 1 : 0) /* achu: Yes, this one is backwards. I don't know why */ #define IPMI_SENSOR_READING_STATE_UNAVAILABLE 0x1 #define IPMI_SENSOR_READING_STATE_AVAILABLE 0x0 #define IPMI_SENSOR_THRESHOLD_SET 0x1 #define IPMI_SENSOR_THRESHOLD_NOT_SET 0x0 #define IPMI_SENSOR_READING_OPERATION_WRITE_GIVEN_VALUE_TO_SENSOR_READING_BYTE 0x01 #define IPMI_SENSOR_READING_OPERATION_DONT_CHANGE_SENSOR_READING_BYTE 0x00 #define IPMI_SENSOR_READING_OPERATION_VALID(__val) \ (((__val) == IPMI_SENSOR_READING_OPERATION_WRITE_GIVEN_VALUE_TO_SENSOR_READING_BYTE \ || (__val) == IPMI_SENSOR_READING_OPERATION_DONT_CHANGE_SENSOR_READING_BYTE) ? 1 : 0) #define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS 0x03 #define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS 0x02 #define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS 0x01 #define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS 0x00 #define IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_VALID(__val) \ (((__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS \ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS \ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS \ || (__val) == IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS) ? 1 : 0) #define IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_EXCLUDING_EVENT_OFFSET 0x02 #define IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_INCLUDING_EVENT_OFFSET 0x01 #define IPMI_EVENT_DATA_BYTES_OPERATION_DONT_WRITE_EVENT_DATA_BYTES 0x00 #define IPMI_EVENT_DATA_BYTES_OPERATION_VALID(__val) \ (((__val) == IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_EXCLUDING_EVENT_OFFSET \ || (__val) == IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_INCLUDING_EVENT_OFFSET \ || (__val) == IPMI_EVENT_DATA_BYTES_OPERATION_DONT_WRITE_EVENT_DATA_BYTES) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_get_device_sdr_info_rq; extern fiid_template_t tmpl_cmd_get_device_sdr_info_rs; extern fiid_template_t tmpl_cmd_get_device_sdr_rq; extern fiid_template_t tmpl_cmd_get_device_sdr_rs; extern fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rq; extern fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rs; extern fiid_template_t tmpl_cmd_get_sensor_reading_factors_rq; extern fiid_template_t tmpl_cmd_get_sensor_reading_factors_rs; extern fiid_template_t tmpl_cmd_set_sensor_hysteresis_rq; extern fiid_template_t tmpl_cmd_set_sensor_hysteresis_rs; extern fiid_template_t tmpl_cmd_get_sensor_hysteresis_rq; extern fiid_template_t tmpl_cmd_get_sensor_hysteresis_rs; extern fiid_template_t tmpl_cmd_set_sensor_thresholds_rq; extern fiid_template_t tmpl_cmd_set_sensor_thresholds_rs; extern fiid_template_t tmpl_cmd_get_sensor_thresholds_rq; extern fiid_template_t tmpl_cmd_get_sensor_thresholds_rs; extern fiid_template_t tmpl_cmd_set_sensor_event_enable_rq; extern fiid_template_t tmpl_cmd_set_sensor_event_enable_threshold_rq; extern fiid_template_t tmpl_cmd_set_sensor_event_enable_discrete_rq; extern fiid_template_t tmpl_cmd_set_sensor_event_enable_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_enable_rq; extern fiid_template_t tmpl_cmd_get_sensor_event_enable_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_enable_threshold_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_enable_discrete_rs; extern fiid_template_t tmpl_cmd_re_arm_sensor_events_rq; extern fiid_template_t tmpl_cmd_re_arm_sensor_events_threshold_rq; extern fiid_template_t tmpl_cmd_re_arm_sensor_events_discrete_rq; extern fiid_template_t tmpl_cmd_re_arm_sensor_events_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_status_rq; extern fiid_template_t tmpl_cmd_get_sensor_event_status_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_status_threshold_rs; extern fiid_template_t tmpl_cmd_get_sensor_event_status_discerete_rs; extern fiid_template_t tmpl_cmd_get_sensor_reading_rq; extern fiid_template_t tmpl_cmd_get_sensor_reading_rs; extern fiid_template_t tmpl_cmd_get_sensor_reading_threshold_rs; extern fiid_template_t tmpl_cmd_get_sensor_reading_discrete_rs; extern fiid_template_t tmpl_cmd_set_sensor_type_rq; extern fiid_template_t tmpl_cmd_set_sensor_type_rs; extern fiid_template_t tmpl_cmd_get_sensor_type_rq; extern fiid_template_t tmpl_cmd_get_sensor_type_rs; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_event_fields_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_event_fields_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_event_fields_rq; extern fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rs; int fill_cmd_get_device_sdr_info (uint8_t operation, fiid_obj_t obj_cmd_rq); int fill_cmd_get_device_sdr (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq); int fill_cmd_reserve_device_sdr_repository (fiid_obj_t obj_cmd_rq); /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int fill_cmd_set_sensor_hysteresis (uint8_t sensor_number, uint8_t hysteresis_mask, uint8_t positive_going_threshold_hysteresis_value, uint8_t negative_going_threshold_hysteresis_value, fiid_obj_t obj_cmd_rq); /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int fill_cmd_get_sensor_hysteresis (uint8_t sensor_number, uint8_t hysteresis_mask, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sensor_thresholds (uint8_t sensor_number, const uint8_t *lower_non_critical_threshold, const uint8_t *lower_critical_threshold, const uint8_t *lower_non_recoverable_threshold, const uint8_t *upper_non_critical_threshold, const uint8_t *upper_critical_threshold, const uint8_t *upper_non_recoverable_threshold, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sensor_thresholds (uint8_t sensor_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sensor_event_enable (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sensor_event_enable_threshold (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_lower_non_critical_going_low, uint8_t assertion_event_lower_non_critical_going_high, uint8_t assertion_event_lower_critical_going_low, uint8_t assertion_event_lower_critical_going_high, uint8_t assertion_event_lower_non_recoverable_going_low, uint8_t assertion_event_lower_non_recoverable_going_high, uint8_t assertion_event_upper_non_critical_going_low, uint8_t assertion_event_upper_non_critical_going_high, uint8_t assertion_event_upper_critical_going_low, uint8_t assertion_event_upper_critical_going_high, uint8_t assertion_event_upper_non_recoverable_going_low, uint8_t assertion_event_upper_non_recoverable_going_high, uint8_t deassertion_event_lower_non_critical_going_low, uint8_t deassertion_event_lower_non_critical_going_high, uint8_t deassertion_event_lower_critical_going_low, uint8_t deassertion_event_lower_critical_going_high, uint8_t deassertion_event_lower_non_recoverable_going_low, uint8_t deassertion_event_lower_non_recoverable_going_high, uint8_t deassertion_event_upper_non_critical_going_low, uint8_t deassertion_event_upper_non_critical_going_high, uint8_t deassertion_event_upper_critical_going_low, uint8_t deassertion_event_upper_critical_going_high, uint8_t deassertion_event_upper_non_recoverable_going_low, uint8_t deassertion_event_upper_non_recoverable_going_high, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sensor_event_enable_discrete (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_state_bit_0, uint8_t assertion_event_state_bit_1, uint8_t assertion_event_state_bit_2, uint8_t assertion_event_state_bit_3, uint8_t assertion_event_state_bit_4, uint8_t assertion_event_state_bit_5, uint8_t assertion_event_state_bit_6, uint8_t assertion_event_state_bit_7, uint8_t assertion_event_state_bit_8, uint8_t assertion_event_state_bit_9, uint8_t assertion_event_state_bit_10, uint8_t assertion_event_state_bit_11, uint8_t assertion_event_state_bit_12, uint8_t assertion_event_state_bit_13, uint8_t assertion_event_state_bit_14, uint8_t deassertion_event_state_bit_0, uint8_t deassertion_event_state_bit_1, uint8_t deassertion_event_state_bit_2, uint8_t deassertion_event_state_bit_3, uint8_t deassertion_event_state_bit_4, uint8_t deassertion_event_state_bit_5, uint8_t deassertion_event_state_bit_6, uint8_t deassertion_event_state_bit_7, uint8_t deassertion_event_state_bit_8, uint8_t deassertion_event_state_bit_9, uint8_t deassertion_event_state_bit_10, uint8_t deassertion_event_state_bit_11, uint8_t deassertion_event_state_bit_12, uint8_t deassertion_event_state_bit_13, uint8_t deassertion_event_state_bit_14, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sensor_event_enable (uint8_t sensor_number, fiid_obj_t obj_cmd_rq); int fill_cmd_re_arm_sensor_events (uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sensor_reading (uint8_t sensor_number, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sensor_reading_and_event_status (uint8_t sensor_number, uint8_t sensor_reading_operation, uint8_t deassertion_bits_operation, uint8_t assertion_bits_operation, uint8_t event_data_bytes_operation, uint8_t sensor_reading, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-serial-modem-cmds.h0000644002055400205540000002007313527331636026334 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SERIAL_MODEM_CMDS_H #define IPMI_SERIAL_MODEM_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR 0x0 #define IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR 0x0 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMPLETE \ || (__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \ || (__value) == IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_BASIC_MODE_ENABLE 0x1 #define IPMI_BASIC_MODE_DISABLE 0x0 #define IPMI_BASIC_MODE_VALID(__val) \ (((__val) == IPMI_BASIC_MODE_ENABLE \ || (__val) == IPMI_BASIC_MODE_DISABLE) ? 1 : 0) #define IPMI_PPP_MODE_ENABLE 0x1 #define IPMI_PPP_MODE_DISABLE 0x0 #define IPMI_PPP_MODE_VALID(__val) \ (((__val) == IPMI_PPP_MODE_ENABLE \ || (__val) == IPMI_PPP_MODE_DISABLE) ? 1 : 0) #define IPMI_TERMINAL_MODE_ENABLE 0x1 #define IPMI_TERMINAL_MODE_DISABLE 0x0 #define IPMI_TERMINAL_MODE_VALID(__val) \ (((__val) == IPMI_TERMINAL_MODE_ENABLE \ || (__val) == IPMI_TERMINAL_MODE_DISABLE) ? 1 : 0) #define IPMI_CONNECT_MODE_DIRECT 0x1 #define IPMI_CONNECT_MODE_MODEM 0x0 #define IPMI_CONNECT_MODE_VALID(__val) \ (((__val) == IPMI_CONNECT_MODE_DIRECT \ || (__val) == IPMI_CONNECT_MODE_MODEM) ? 1 : 0) #define IPMI_DTR_HANGUP_ENABLE 0x1 #define IPMI_DTR_HANGUP_DISABLE 0x0 #define IPMI_DTR_HANGUP_VALID(__val) \ (((__val) == IPMI_DTR_HANGUP_ENABLE \ || (__val) == IPMI_DTR_HANGUP_DISABLE) ? 1 : 0) #define IPMI_FLOW_CONTROL_NO_FLOW_CONTROL 0x0 #define IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL 0x1 #define IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL 0x2 #define IPMI_FLOW_CONTROL_RESERVED 0x3 #define IPMI_FLOW_CONTROL_VALID(__val) \ (((__val) == IPMI_FLOW_CONTROL_NO_FLOW_CONTROL \ || (__val) == IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL \ || (__val) == IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL) ? 1 : 0) #define IPMI_BIT_RATE_9600_BPS 0x6 #define IPMI_BIT_RATE_19200_BPS 0x7 #define IPMI_BIT_RATE_38400_BPS 0x8 #define IPMI_BIT_RATE_57600_BPS 0x9 #define IPMI_BIT_RATE_115200_BPS 0xA #define IPMI_BIT_RATE_VALID(__val) \ (((__val) == IPMI_BIT_RATE_9600_BPS \ || (__val) == IPMI_BIT_RATE_19200_BPS \ || (__val) == IPMI_BIT_RATE_38400_BPS \ || (__val) == IPMI_BIT_RATE_57600_BPS \ || (__val) == IPMI_BIT_RATE_115200_BPS) ? 1 : 0) #define IPMI_GET_SERIAL_MODEM_PARAMETER 0x0 #define IPMI_GET_SERIAL_MODEM_PARAMETER_REVISION_ONLY 0x1 #define IPMI_GET_SERIAL_MODEM_PARAMETER_VALID(__flag) \ (((__flag) == IPMI_GET_SERIAL_MODEM_PARAMETER \ || (__flag) == IPMI_GET_SERIAL_MODEM_PARAMETER_REVISION_ONLY) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_rq; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_rs; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_connection_mode_rq; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq; extern fiid_template_t tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_rq; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_rs; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_connection_mode_rs; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs; extern fiid_template_t tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs; int fill_cmd_set_serial_modem_configuration (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq); int fill_cmd_set_serial_modem_configuration_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rq); int fill_cmd_set_serial_modem_configuration_connection_mode (uint8_t channel_number, uint8_t basic_mode, uint8_t ppp_mode, uint8_t terminal_mode, uint8_t connect_mode, fiid_obj_t obj_cmd_rq); int fill_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (uint8_t channel_number, uint8_t dtr_hangup, uint8_t flow_control, uint8_t bit_rate, fiid_obj_t obj_cmd_rq); int fill_cmd_set_serial_modem_configuration_page_blackout_interval (uint8_t channel_number, uint8_t page_blackout_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_set_serial_modem_configuration_call_retry_interval (uint8_t channel_number, uint8_t call_retry_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_get_serial_modem_configuration (uint8_t channel_number, uint8_t parameter_type, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq); #ifdef __cplusplus } #endif #endif /* IPMI_SERIAL_MODEM_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/ipmi-sol-cmds.h0000644002055400205540000002142713527331636024557 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CMDS_H #define IPMI_SOL_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR 0x0 #define IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR 0x0 #define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMPLETE 0x00 #define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS 0x01 #define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE 0x02 #define IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID(__value) \ (((__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMPLETE \ || (__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS \ || (__value) == IPMI_SOL_CONFIGURATION_PARAMETERS_SET_COMMIT_WRITE) ? 1 : 0) #define IPMI_SOL_SOL_DISABLE 0x0 #define IPMI_SOL_SOL_ENABLE 0x1 #define IPMI_SOL_SOL_ENABLE_VALID(__val) \ (((__val) == IPMI_SOL_SOL_DISABLE \ || (__val) == IPMI_SOL_SOL_ENABLE) ? 1 : 0) #define IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION 0x1 #define IPMI_SOL_AUTHENTICATION_CONTROLLED_BY_REMOTE_SOFTWARE 0x0 #define IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION_VALID(__val) \ (((__val) == IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION \ || (__val) == IPMI_SOL_AUTHENTICATION_CONTROLLED_BY_REMOTE_SOFTWARE) ? 1 : 0) #define IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION 0x1 #define IPMI_SOL_ENCRYPTION_CONTROLLED_BY_REMOTE_SOFTWARE 0x0 #define IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION_VALID(__val) \ (((__val) == IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION \ || (__val) == IPMI_SOL_ENCRYPTION_CONTROLLED_BY_REMOTE_SOFTWARE) ? 1 : 0) #define IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE 0x0 #define IPMI_SOL_BIT_RATE_96_KBPS 0x6 #define IPMI_SOL_BIT_RATE_192_KBPS 0x7 #define IPMI_SOL_BIT_RATE_384_KBPS 0x8 #define IPMI_SOL_BIT_RATE_576_KBPS 0x9 #define IPMI_SOL_BIT_RATE_1152_KBPS 0xA #define IPMI_SOL_BIT_RATE_VALID(__val) \ (((__val) == IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE \ || (__val) == IPMI_SOL_BIT_RATE_96_KBPS \ || (__val) == IPMI_SOL_BIT_RATE_192_KBPS \ || (__val) == IPMI_SOL_BIT_RATE_384_KBPS \ || (__val) == IPMI_SOL_BIT_RATE_576_KBPS \ || (__val) == IPMI_SOL_BIT_RATE_1152_KBPS) ? 1 : 0) #define IPMI_GET_SOL_PARAMETER 0x0 #define IPMI_GET_SOL_PARAMETER_REVISION_ONLY 0x1 #define IPMI_GET_SOL_PARAMETER_VALID(__val) \ (((__val) == IPMI_GET_SOL_PARAMETER \ || (__val) == IPMI_GET_SOL_PARAMETER_REVISION_ONLY) ? 1 : 0) /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq; extern fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rq; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_set_in_progress_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs; extern fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs; int fill_cmd_set_sol_configuration_parameters (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_data_rq); int fill_cmd_set_sol_configuration_parameters_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_data_rq); int fill_cmd_set_sol_configuration_parameters_sol_enable (uint8_t channel_number, uint8_t sol_enable, fiid_obj_t obj_data_rq); int fill_cmd_set_sol_configuration_parameters_sol_authentication (uint8_t channel_number, uint8_t sol_privilege_level, uint8_t force_sol_payload_authentication, uint8_t force_sol_payload_encryption, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (uint8_t channel_number, uint8_t character_accumulate_interval, uint8_t character_send_threshold, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sol_configuration_parameters_sol_retry (uint8_t channel_number, uint8_t retry_count, uint8_t retry_interval, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rq); int fill_cmd_set_sol_configuration_parameters_sol_payload_port_number (uint8_t channel_number, uint16_t port_number, fiid_obj_t obj_cmd_rq); int fill_cmd_get_sol_configuration_parameters (uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_data_rq); #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/cmds/rmcp-cmds.h0000644002055400205540000000270613527331636023766 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RMCP_CMDS_H #define RMCP_CMDS_H #ifdef __cplusplus extern "C" { #endif #include #include /* * fill* functions return 0 on success, -1 on error. * * obj_cmd_rq must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cmd_asf_presence_ping; extern fiid_template_t tmpl_cmd_asf_presence_pong; /* MESSAGE_TAG: achu: Consecutive ping messages should use different message tags, ranging from 0x00 to 0xFE. This is because the RMCP consumers may optionally discard duplicate messages. */ int fill_cmd_asf_presence_ping (uint8_t message_tag, fiid_obj_t obj_cmd); #ifdef __cplusplus } #endif #endif /* RMCP_CMDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/debug/0000755002055400205540000000000013527342543022062 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/debug/ipmi-debug.h0000644002055400205540000001405613527331636024264 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEBUG_H #define IPMI_DEBUG_H #ifdef __cplusplus extern "C" { #endif #include #include extern fiid_template_t tmpl_unexpected_data; int ipmi_obj_dump (int fd, const char *prefix, const char *hdr, const char *trlr, fiid_obj_t obj); int ipmi_obj_dump_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, fiid_obj_t obj, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd); int ipmi_dump_rmcp_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd); int ipmi_dump_kcs_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd); int ipmi_dump_kcs_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd); int ipmi_dump_ssif_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd); int ipmi_dump_lan_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd); int ipmi_dump_lan_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd); int ipmi_dump_rmcpplus_packet (int fd, const char *prefix, const char *hdr, const char *trlr, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd); int ipmi_dump_rmcpplus_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd); int ipmi_dump_sdr_record (int fd, const char *prefix, const char *hdr, const char *trlr, const void *sdr_record, unsigned int sdr_record_len); int ipmi_dump_hex (int fd, const char *prefix, const char *hdr, const char *trlr, const void *buf, unsigned int buf_len); #ifdef __cplusplus } #endif #endif /* IPMI_DEBUG_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/0000755002055400205540000000000013527342543022267 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/ipmi-inteldcmi-driver.h0000644002055400205540000000570713527331636026647 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTELDCMI_DRIVER_H #define IPMI_INTELDCMI_DRIVER_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_INTELDCMI_DRIVER_DEVICE_DEFAULT "/dev/dcmi" #define IPMI_INTELDCMI_ERR_SUCCESS 0 #define IPMI_INTELDCMI_ERR_NULL 1 #define IPMI_INTELDCMI_ERR_INVALID 2 #define IPMI_INTELDCMI_ERR_PARAMETERS 3 #define IPMI_INTELDCMI_ERR_PERMISSION 4 #define IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND 5 #define IPMI_INTELDCMI_ERR_IO_NOT_INITIALIZED 6 #define IPMI_INTELDCMI_ERR_OUT_OF_MEMORY 7 #define IPMI_INTELDCMI_ERR_DRIVER_TIMEOUT 8 #define IPMI_INTELDCMI_ERR_IPMI_ERROR 9 #define IPMI_INTELDCMI_ERR_SYSTEM_ERROR 10 #define IPMI_INTELDCMI_ERR_INTERNAL_ERROR 11 #define IPMI_INTELDCMI_ERR_ERRNUMRANGE 12 #define IPMI_INTELDCMI_FLAGS_DEFAULT 0x00000000 typedef struct ipmi_inteldcmi_ctx *ipmi_inteldcmi_ctx_t; ipmi_inteldcmi_ctx_t ipmi_inteldcmi_ctx_create (void); void ipmi_inteldcmi_ctx_destroy (ipmi_inteldcmi_ctx_t ctx); int ipmi_inteldcmi_ctx_errnum (ipmi_inteldcmi_ctx_t ctx); char *ipmi_inteldcmi_ctx_strerror (int errnum); char *ipmi_inteldcmi_ctx_errormsg (ipmi_inteldcmi_ctx_t ctx); int ipmi_inteldcmi_ctx_get_driver_device (ipmi_inteldcmi_ctx_t ctx, char **driver_device); int ipmi_inteldcmi_ctx_get_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int *flags); int ipmi_inteldcmi_ctx_set_driver_device (ipmi_inteldcmi_ctx_t ctx, const char *driver_device); int ipmi_inteldcmi_ctx_set_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int flags); int ipmi_inteldcmi_ctx_io_init (ipmi_inteldcmi_ctx_t ctx); int ipmi_inteldcmi_cmd (ipmi_inteldcmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int ipmi_inteldcmi_cmd_ipmb (ipmi_inteldcmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_INTELDCMI_DRIVER_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/ipmi-kcs-driver.h0000644002055400205540000000673413527331636025460 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_KCS_DRIVER_H #define IPMI_KCS_DRIVER_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_KCS_SMS_IO_BASE_DEFAULT 0x0CA2 #define IPMI_KCS_ERR_SUCCESS 0 #define IPMI_KCS_ERR_NULL 1 #define IPMI_KCS_ERR_INVALID 2 #define IPMI_KCS_ERR_PARAMETERS 3 #define IPMI_KCS_ERR_PERMISSION 4 #define IPMI_KCS_ERR_IO_NOT_INITIALIZED 5 #define IPMI_KCS_ERR_OVERFLOW 6 #define IPMI_KCS_ERR_BUSY 7 #define IPMI_KCS_ERR_OUT_OF_MEMORY 8 #define IPMI_KCS_ERR_DEVICE_NOT_FOUND 9 #define IPMI_KCS_ERR_DRIVER_TIMEOUT 10 #define IPMI_KCS_ERR_IPMI_ERROR 11 #define IPMI_KCS_ERR_SYSTEM_ERROR 12 #define IPMI_KCS_ERR_INTERNAL_ERROR 13 #define IPMI_KCS_ERR_ERRNUMRANGE 14 /* NONBLOCKING - if busy, IPMI_KCS_ERR_BUSY will be returned. * * SPIN_POLL - when polling, internally spin instead of putting * process to sleep. If polling intervals are small, may improve * inband performance by removing context switches and OS timer * granularity. */ #define IPMI_KCS_FLAGS_DEFAULT 0x00000000 #define IPMI_KCS_FLAGS_NONBLOCKING 0x00000001 #define IPMI_KCS_FLAGS_SPIN_POLL 0x00000002 typedef struct ipmi_kcs_ctx *ipmi_kcs_ctx_t; ipmi_kcs_ctx_t ipmi_kcs_ctx_create (void); void ipmi_kcs_ctx_destroy (ipmi_kcs_ctx_t ctx); int ipmi_kcs_ctx_errnum (ipmi_kcs_ctx_t ctx); char *ipmi_kcs_ctx_strerror (int errnum); char *ipmi_kcs_ctx_errormsg (ipmi_kcs_ctx_t ctx); int ipmi_kcs_ctx_get_driver_address (ipmi_kcs_ctx_t ctx, uint16_t *bmc_iobase_address); int ipmi_kcs_ctx_get_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t *register_spacing); int ipmi_kcs_ctx_get_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t *poll_interval); int ipmi_kcs_ctx_get_flags (ipmi_kcs_ctx_t ctx, unsigned int *flags); int ipmi_kcs_ctx_set_driver_address (ipmi_kcs_ctx_t ctx, uint16_t bmc_iobase_address); int ipmi_kcs_ctx_set_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t register_spacing); int ipmi_kcs_ctx_set_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t poll_interval); int ipmi_kcs_ctx_set_flags (ipmi_kcs_ctx_t ctx, unsigned int flags); int ipmi_kcs_ctx_io_init (ipmi_kcs_ctx_t ctx); /* returns length written on success, -1 on error */ int ipmi_kcs_write (ipmi_kcs_ctx_t ctx, const void *buf, unsigned int buf_len); /* returns length read on success, -1 on error */ int ipmi_kcs_read (ipmi_kcs_ctx_t ctx, void *buf, unsigned int buf_len); int ipmi_kcs_cmd (ipmi_kcs_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_KCS_DRIVER_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/ipmi-openipmi-driver.h0000644002055400205540000000562513527331636026516 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OPENIPMI_DRIVER_H #define IPMI_OPENIPMI_DRIVER_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_OPENIPMI_DRIVER_DEVICE_DEFAULT "/dev/ipmi0" #define IPMI_OPENIPMI_ERR_SUCCESS 0 #define IPMI_OPENIPMI_ERR_NULL 1 #define IPMI_OPENIPMI_ERR_INVALID 2 #define IPMI_OPENIPMI_ERR_PARAMETERS 3 #define IPMI_OPENIPMI_ERR_PERMISSION 4 #define IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND 5 #define IPMI_OPENIPMI_ERR_IO_NOT_INITIALIZED 6 #define IPMI_OPENIPMI_ERR_OUT_OF_MEMORY 7 #define IPMI_OPENIPMI_ERR_DRIVER_TIMEOUT 8 #define IPMI_OPENIPMI_ERR_IPMI_ERROR 9 #define IPMI_OPENIPMI_ERR_SYSTEM_ERROR 10 #define IPMI_OPENIPMI_ERR_INTERNAL_ERROR 11 #define IPMI_OPENIPMI_ERR_ERRNUMRANGE 12 #define IPMI_OPENIPMI_FLAGS_DEFAULT 0x00000000 typedef struct ipmi_openipmi_ctx *ipmi_openipmi_ctx_t; ipmi_openipmi_ctx_t ipmi_openipmi_ctx_create (void); void ipmi_openipmi_ctx_destroy (ipmi_openipmi_ctx_t ctx); int ipmi_openipmi_ctx_errnum (ipmi_openipmi_ctx_t ctx); char *ipmi_openipmi_ctx_strerror (int errnum); char *ipmi_openipmi_ctx_errormsg (ipmi_openipmi_ctx_t ctx); int ipmi_openipmi_ctx_get_driver_device (ipmi_openipmi_ctx_t ctx, char **driver_device); int ipmi_openipmi_ctx_get_flags (ipmi_openipmi_ctx_t ctx, unsigned int *flags); int ipmi_openipmi_ctx_set_driver_device (ipmi_openipmi_ctx_t ctx, const char *driver_device); int ipmi_openipmi_ctx_set_flags (ipmi_openipmi_ctx_t ctx, unsigned int flags); int ipmi_openipmi_ctx_io_init (ipmi_openipmi_ctx_t ctx); int ipmi_openipmi_cmd (ipmi_openipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int ipmi_openipmi_cmd_ipmb (ipmi_openipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_OPENIPMI_DRIVER_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/ipmi-sunbmc-driver.h0000644002055400205540000000506013527331636026156 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SUNBMC_DRIVER_H #define IPMI_SUNBMC_DRIVER_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SUNBMC_DRIVER_DEVICE_DEFAULT "/dev/bmc" #define IPMI_SUNBMC_ERR_SUCCESS 0 #define IPMI_SUNBMC_ERR_NULL 1 #define IPMI_SUNBMC_ERR_INVALID 2 #define IPMI_SUNBMC_ERR_PARAMETERS 3 #define IPMI_SUNBMC_ERR_PERMISSION 4 #define IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND 5 #define IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED 6 #define IPMI_SUNBMC_ERR_IO_NOT_INITIALIZED 7 #define IPMI_SUNBMC_ERR_OUT_OF_MEMORY 8 #define IPMI_SUNBMC_ERR_DRIVER_TIMEOUT 9 #define IPMI_SUNBMC_ERR_IPMI_ERROR 10 #define IPMI_SUNBMC_ERR_SYSTEM_ERROR 11 #define IPMI_SUNBMC_ERR_INTERNAL_ERROR 12 #define IPMI_SUNBMC_ERR_ERRNUMRANGE 13 #define IPMI_SUNBMC_FLAGS_DEFAULT 0x00000000 typedef struct ipmi_sunbmc_ctx *ipmi_sunbmc_ctx_t; ipmi_sunbmc_ctx_t ipmi_sunbmc_ctx_create (void); void ipmi_sunbmc_ctx_destroy (ipmi_sunbmc_ctx_t ctx); int ipmi_sunbmc_ctx_errnum (ipmi_sunbmc_ctx_t ctx); char *ipmi_sunbmc_ctx_strerror (int errnum); char *ipmi_sunbmc_ctx_errormsg (ipmi_sunbmc_ctx_t ctx); int ipmi_sunbmc_ctx_get_driver_device (ipmi_sunbmc_ctx_t ctx, char **driver_device); int ipmi_sunbmc_ctx_get_flags (ipmi_sunbmc_ctx_t ctx, unsigned int *flags); int ipmi_sunbmc_ctx_set_driver_device (ipmi_sunbmc_ctx_t ctx, const char *driver_device); int ipmi_sunbmc_ctx_set_flags (ipmi_sunbmc_ctx_t ctx, unsigned int flags); int ipmi_sunbmc_ctx_io_init (ipmi_sunbmc_ctx_t ctx); int ipmi_sunbmc_cmd (ipmi_sunbmc_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SUNBMC_DRIVER_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/driver/ipmi-ssif-driver.h0000644002055400205540000000626013527331636025636 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SSIF_DRIVER_H #define IPMI_SSIF_DRIVER_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_DEFAULT_I2C_DEVICE "/dev/i2c-0" #define IPMI_DEFAULT_SSIF_IPMB_ADDR 0x42 #define IPMI_SSIF_ERR_SUCCESS 0 #define IPMI_SSIF_ERR_NULL 1 #define IPMI_SSIF_ERR_INVALID 2 #define IPMI_SSIF_ERR_PARAMETERS 3 #define IPMI_SSIF_ERR_PERMISSION 4 #define IPMI_SSIF_ERR_IO_NOT_INITIALIZED 5 #define IPMI_SSIF_ERR_OVERFLOW 6 #define IPMI_SSIF_ERR_BUSY 7 #define IPMI_SSIF_ERR_OUT_OF_MEMORY 8 #define IPMI_SSIF_ERR_DEVICE_NOT_FOUND 9 #define IPMI_SSIF_ERR_DRIVER_TIMEOUT 10 #define IPMI_SSIF_ERR_IPMI_ERROR 11 #define IPMI_SSIF_ERR_SYSTEM_ERROR 12 #define IPMI_SSIF_ERR_INTERNAL_ERROR 13 #define IPMI_SSIF_ERR_ERRNUMRANGE 14 #define IPMI_SSIF_FLAGS_DEFAULT 0x00000000 #define IPMI_SSIF_FLAGS_NONBLOCKING 0x00000001 typedef struct ipmi_ssif_ctx *ipmi_ssif_ctx_t; /* Notes: * * IPMBAddress - slave address of the BMC on the SMBus (usually 0x42) * */ ipmi_ssif_ctx_t ipmi_ssif_ctx_create (void); void ipmi_ssif_ctx_destroy (ipmi_ssif_ctx_t ctx); int ipmi_ssif_ctx_errnum (ipmi_ssif_ctx_t ctx); char *ipmi_ssif_ctx_strerror (int errnum); char *ipmi_ssif_ctx_errormsg (ipmi_ssif_ctx_t ctx); int ipmi_ssif_ctx_get_driver_device (ipmi_ssif_ctx_t ctx, char **driver_device); int ipmi_ssif_ctx_get_driver_address (ipmi_ssif_ctx_t ctx, uint8_t *driver_address); int ipmi_ssif_ctx_get_flags (ipmi_ssif_ctx_t ctx, unsigned int *flags); int ipmi_ssif_ctx_set_driver_device (ipmi_ssif_ctx_t ctx, const char *driver_device); int ipmi_ssif_ctx_set_driver_address (ipmi_ssif_ctx_t ctx, uint8_t driver_address); int ipmi_ssif_ctx_set_flags (ipmi_ssif_ctx_t ctx, unsigned int flags); int ipmi_ssif_ctx_io_init (ipmi_ssif_ctx_t ctx); /* returns length written on success, -1 on error */ int ipmi_ssif_write (ipmi_ssif_ctx_t ctx, const void *buf, unsigned int buf_len); /* returns length read on success, -1 on error */ int ipmi_ssif_read (ipmi_ssif_ctx_t ctx, void *buf, unsigned int buf_len); int ipmi_ssif_cmd (ipmi_ssif_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #ifdef __cplusplus } #endif #endif /* IPMI_SSIF_DRIVER_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/fiid/0000755002055400205540000000000013527342543021707 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/fiid/fiid.h0000644002055400205540000005230013527331636022774 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef FIID_H #define FIID_H #ifdef __cplusplus extern "C" { #endif #include /* * FIID Error Codes */ enum fiid_err { FIID_ERR_SUCCESS = 0, FIID_ERR_OBJ_NULL = 1, FIID_ERR_OBJ_INVALID = 2, FIID_ERR_ITERATOR_NULL = 3, FIID_ERR_ITERATOR_INVALID = 4, FIID_ERR_PARAMETERS = 5, FIID_ERR_TEMPLATE_INVALID = 6, FIID_ERR_FIELD_NOT_FOUND = 7, FIID_ERR_KEY_INVALID = 8, FIID_ERR_FLAGS_INVALID = 9, FIID_ERR_TEMPLATE_NOT_BYTE_ALIGNED = 10, FIID_ERR_FIELD_NOT_BYTE_ALIGNED = 11, FIID_ERR_BLOCK_NOT_BYTE_ALIGNED = 12, FIID_ERR_OVERFLOW = 13, FIID_ERR_MAX_FIELD_LEN_MISMATCH = 14, FIID_ERR_KEY_FIELD_MISMATCH = 15, FIID_ERR_FLAGS_FIELD_MISMATCH = 16, FIID_ERR_TEMPLATE_LENGTH_MISMATCH = 17, FIID_ERR_DATA_NOT_BYTE_ALIGNED = 18, FIID_ERR_REQUIRED_FIELD_MISSING = 19, FIID_ERR_FIXED_LENGTH_FIELD_INVALID = 20, FIID_ERR_DATA_NOT_AVAILABLE = 21, FIID_ERR_NOT_IDENTICAL = 22, FIID_ERR_OUT_OF_MEMORY = 23, FIID_ERR_INTERNAL_ERROR = 24, FIID_ERR_ERRNUMRANGE = 25 }; typedef enum fiid_err fiid_err_t; /* * FIID Field Maximum Key Length */ #define FIID_FIELD_MAX_KEY_LEN 256 /* * FIID Field Flags * * FIID Field Requirement Flags * * REQUIRED * * The field in the template is required. For requests, if not set, a * packet cannot be created. For responses, if not set, a packet is * invalid. * * OPTIONAL * * The field in the template is not required. For requests, if not * set, a packet can still be created. For responses, if not set, a * packet is still valid. * * In a template field, either the REQUIRED or OPTIONAL flag must be * specified. * * FIID Field Length Flags * * LENGTH_FIXED * * The number of bits that must be set in the field is fixed. It * cannot be any other length. * * LENGTH_VARIABLE * * The number of bits that must be set in the field is variable in * length. * * In a template field, either the LENGTH_FIXED or LENGTH_VARIABLE * flag must be specified. * * FIID Field Misc Flags * * MAKES_PACKET_SUFFICIENT * * Used to indicate a sufficient set of fields, that if set, may allow * a packet to be "sufficiently valid", despite other "required" * fields not being set. Typically used in response packets to * indicate the few fields necessary to be set for a payload to be * accepted. */ #define FIID_FIELD_REQUIRED 0x00000001 #define FIID_FIELD_OPTIONAL 0x00000002 #define FIID_FIELD_REQUIRED_MASK 0x0000000F #define FIID_FIELD_REQUIRED_FLAG(__flags) \ ((__flags) & FIID_FIELD_REQUIRED_MASK) #define FIID_FIELD_REQUIRED_FLAG_VALID(__flags) \ ((FIID_FIELD_REQUIRED_FLAG (__flags) == FIID_FIELD_REQUIRED \ || FIID_FIELD_REQUIRED_FLAG (__flags) == FIID_FIELD_OPTIONAL) ? 1 : 0) #define FIID_FIELD_LENGTH_FIXED 0x00000010 #define FIID_FIELD_LENGTH_VARIABLE 0x00000020 #define FIID_FIELD_LENGTH_MASK 0x000000F0 #define FIID_FIELD_LENGTH_FLAG(__flags) \ ((__flags) & FIID_FIELD_LENGTH_MASK) #define FIID_FIELD_LENGTH_FLAG_VALID(__flags) \ ((FIID_FIELD_LENGTH_FLAG (__flags) == FIID_FIELD_LENGTH_FIXED \ || FIID_FIELD_LENGTH_FLAG (__flags) == FIID_FIELD_LENGTH_VARIABLE) ? 1 : 0) #define FIID_FIELD_MAKES_PACKET_SUFFICIENT 0x00010000 #define FIID_FIELD_SECURE_MEMSET_ON_CLEAR 0x00100000 /* * fiid_field_t * * Defines a FIID field: * * max_field_len - maximum length of a field in bits * key - field name * flags - indicating field requirements * * An array of field's makes up a FIID template. */ typedef struct fiid_field { unsigned int max_field_len; char key[FIID_FIELD_MAX_KEY_LEN]; unsigned int flags; } fiid_field_t; /* * FIID Template * * An array of fiid_field_t's make up a fiid template. The array should be * terminated with a field with a maximum field length of 0. * * The FIID template should be a multiple of 8 (i.e. byte aligned) otherwise * most of the FIID API will return errors. */ typedef fiid_field_t fiid_template_t[]; typedef struct fiid_obj *fiid_obj_t; typedef struct fiid_iterator *fiid_iterator_t; /***************************** * FIID Template API * *****************************/ /* * fiid_template_field_lookup * * Returns 1 if the field is found in the template, 0 if not, -1 on * error. */ int fiid_template_field_lookup (fiid_template_t tmpl, const char *field); /* * FIID_TEMPLATE_FIELD_LOOKUP * * Returns 1 if the field is found in the template, -1 on error. * Identical to fiid_template_field_lookup() except a return of 0 is * not possible. If the field is not found, -1 is returned and * errno EINVAL is the error code set. */ int FIID_TEMPLATE_FIELD_LOOKUP (fiid_template_t tmpl, const char *field); /* * fiid_template_len * * Returns the total length (in bits) of the all the fields in the * template, -1 on error. */ int fiid_template_len (fiid_template_t tmpl); /* * fiid_template_len_bytes * * Returns the total length (in bytes) of the all the fields in the * template, -1 on error. Will return an error if template bit length * is not a multiple of 8. */ int fiid_template_len_bytes (fiid_template_t tmpl); /* * fiid_template_field_start * * Returns the offset (in bits) of the beginning of the field within * this template, -1 on error. */ int fiid_template_field_start (fiid_template_t tmpl, const char *field); /* * fiid_template_field_start_bytes * * Returns the offset (in bytes) of the beginning of the field within * this template, -1 on error. Will return an error if field bit * offset is not a multiple of 8. */ int fiid_template_field_start_bytes (fiid_template_t tmpl, const char *field); /* * fiid_template_field_end * * Returns the offset (in bits) of the ending of the field within this * template, -1 on error. */ int fiid_template_field_end (fiid_template_t tmpl, const char *field); /* * fiid_template_field_end_bytes * * Returns the offset (in bytes) of the ending of the field within * this template, -1 on error. Will return an error if field bit * offset is not a multiple of 8. */ int fiid_template_field_end_bytes (fiid_template_t tmpl, const char *field); /* * fiid_template_field_len * * Returns the maximum length (in bits) of the specified field, -1 on * error. */ int fiid_template_field_len (fiid_template_t tmpl, const char *field); /* * fiid_template_field_len_bytes * * Returns the maximum length (in bytes) of the specified field, -1 on * error. Will return an error if the field maximum bit length is not * a multiple of 8. */ int fiid_template_field_len_bytes (fiid_template_t tmpl, const char *field); /* * fiid_template_block_len * * Returns the maximum length (in bits) of the block of fields * beginning at 'field_start' and ending at 'field_end'. Returns -1 * on error. */ int fiid_template_block_len (fiid_template_t tmpl, const char *field_start, const char *field_end); /* * fiid_template_block_len_bytes * * Returns the maximum length (in bytes) of the block of fields * beginning at 'field_start' and ending at 'field_end'. Returns -1 * on error. Will return an error if the calculated bit length is not * a multiple of 8. */ int fiid_template_block_len_bytes (fiid_template_t tmpl, const char *field_start, const char *field_end); /* * fiid_template_compare * * Returns 1 if the two specified templates are identical, 0 if not, * -1 on error. */ int fiid_template_compare (fiid_template_t tmpl1, fiid_template_t tmpl2); /* * FIID_TEMPLATE_COMPARE * * Returns 1 if the two specified templates are identical, -1 on * error. Identical to fiid_template_compare() except a return of 0 * is not possible. If templates are not identical, -1 is returned and * errno EINVAL is the error code set. */ int FIID_TEMPLATE_COMPARE (fiid_template_t tmpl1, fiid_template_t tmpl2); /* * fiid_template_free * * Free's a template created by fiid_obj_template. */ void fiid_template_free (fiid_field_t *tmpl_dynamic); /***************************** * FIID Object API * *****************************/ /* * fiid_strerror * * Return statically allocated string describing the specified error. */ char *fiid_strerror (fiid_err_t errnum); /* * fiid_obj_create * * Return a fiid object based on the specified template. Returns NULL * on error. */ fiid_obj_t fiid_obj_create (fiid_template_t tmpl); /* * fiid_obj_destroy * * Destroy and free memory from a fiid object. */ void fiid_obj_destroy (fiid_obj_t obj); /* * fiid_obj_dup * * Create and return a duplicate object from the one specified. * Returns NULL on error. */ fiid_obj_t fiid_obj_dup (fiid_obj_t src_obj); /* * fiid_obj_copy * * Create and return a duplicate object from the one specified, but * base the new object on the alternate template specified. Template * length of the original and alternate template must be the same. * Returns NULL on error. */ fiid_obj_t fiid_obj_copy (fiid_obj_t src_obj, fiid_template_t alt_tmpl); /* * fiid_obj_valid * * Returns 1 if the object passed in is a valid fiid object, 0 if not. */ int fiid_obj_valid (fiid_obj_t obj); /* * fiid_obj_packet_valid * * Returns 1 if the object contains all the data for a valid packet, * 0 if not, -1 on error. A valid packet is based on the field flags * specified in the original fiid template. For example, this * function will check if all required fields have been set with the * correct number of bytes. It will also check that data set within * the object is byte aligned. The FIID_FIELD_MAKES_PACKET_SUFFICIENT * is not considered in this function. */ int fiid_obj_packet_valid (fiid_obj_t obj); /* * FIID_OBJ_PACKET_VALID * * Returns 1 if the object contains all the data for a valid packet, * -1 on error. Identical to fiid_obj_packet_valid() except a return * of 0 is not possible. The FIID_FIELD_MAKES_PACKET_SUFFICIENT is * not considered in this function. */ int FIID_OBJ_PACKET_VALID (fiid_obj_t obj); /* * fiid_obj_packet_sufficient * * Returns 1 if the object contains all the data for a sufficient * packet, 0 if not, -1 on error. Identical to * fiid_obj_packet_valid() except FIID_FIELD_MAKES_PACKET_SUFFICIENT * is considered. If a packet does not meet the conditions to pass * fiid_obj_packet_valid(), sufficient fields are subsequently * checked. */ int fiid_obj_packet_sufficient (fiid_obj_t obj); /* * FIID_OBJ_PACKET_SUFFICIENT * * Returns 1 if the object contains a all the data for a valid packet, * -1 on error. Identical to fiid_obj_packet_sufficient() except a return * of 0 is not possible. */ int FIID_OBJ_PACKET_SUFFICIENT (fiid_obj_t obj); /* * fiid_obj_template * * Create a template based on what is stored internally within the * object. Returns NULL on error. Free the resulting template using * fiid_template_free(). */ fiid_field_t *fiid_obj_template (fiid_obj_t obj); /* * fiid_obj_template_compare * * Returns 1 if the template specified is the one used to create the * object, 0 if not, -1 one error. */ int fiid_obj_template_compare (fiid_obj_t obj, fiid_template_t tmpl); /* * FIID_OBJ_TEMPLATE_COMPARE * * Returns 1 if the template specified is the one used to create the * object, -1 one error. Identical to fiid_obj_template_compare() * except a return of 0 is not possible. If object template and input * template are not identical, -1 is returned and * FIID_ERR_NOT_IDENTICAL is the error code set. */ int FIID_OBJ_TEMPLATE_COMPARE (fiid_obj_t obj, fiid_template_t tmpl); /* * fiid_obj_errnum * * Returns the error code for the most recently occurring error. */ fiid_err_t fiid_obj_errnum (fiid_obj_t obj); /* * fiid_obj_errormsg * * Returns the error string for the most recently occurring error. */ char *fiid_obj_errormsg (fiid_obj_t obj); /* * fiid_obj_len * * Returns the total length (in bits) of data stored within the * object, -1 on error. */ int fiid_obj_len (fiid_obj_t obj); /* * fiid_obj_len_bytes * * Returns the total length (in bytes) of data stored within the * object, -1 on error. Will return an error if the total bit length * of data is not a multiple of 8. */ int fiid_obj_len_bytes (fiid_obj_t obj); /* * fiid_obj_field_len * * Returns the length (in bits) of data stored within the * specified field, -1 on error. */ int fiid_obj_field_len (fiid_obj_t obj, const char *field); /* * fiid_obj_field_len_bytes * * Returns the length (in bytes) of data stored within the specified * field, -1 on error. Will return an error if the bit length of data * is not a multiple of 8. */ int fiid_obj_field_len_bytes (fiid_obj_t obj, const char *field); /* * fiid_obj_block_len * * Returns the length (in bits) of data stored within the block of * fields beginning at 'field_start' and ending at 'field_end'. * Returns -1 on error. */ int fiid_obj_block_len (fiid_obj_t obj, const char *field_start, const char *field_end); /* * fiid_obj_block_len_bytes * * Returns the length (in bytes) of data stored within the block of * fields beginning at 'field_start' and ending at 'field_end'. * Returns -1 on error. Will return an error if the calculated bit * length is not a multiple of 8. */ int fiid_obj_block_len_bytes (fiid_obj_t obj, const char *field_start, const char *field_end); /* * fiid_obj_clear * * Clear all data stored in the object. Return 0 on success, -1 on * error. */ int fiid_obj_clear (fiid_obj_t obj); /* * fiid_obj_clear_field * * Clear all data stored in a specified field in the object. Return 0 * on success, -1 on error. */ int fiid_obj_clear_field (fiid_obj_t obj, const char *field); /* * fiid_obj_field_lookup * * Returns 1 if the field is found in the object, 0 if not, -1 on * error. */ int fiid_obj_field_lookup (fiid_obj_t obj, const char *field); /* * FIID_OBJ_FIELD_LOOKUP * * Returns 1 if the field is found in the object, -1 on error. * Identical to fiid_obj_field_lookup() except a return of 0 is not * possible. If the field is not found, -1 is returned and * FIID_ERR_FIELD_NOT_FOUND is the error code set. */ int FIID_OBJ_FIELD_LOOKUP (fiid_obj_t obj, const char *field); /* * fiid_obj_set * * Set data in the object for the specified field. Returns 0 on * success, -1 on error. */ int fiid_obj_set (fiid_obj_t obj, const char *field, uint64_t val); /* * fiid_obj_get * * Get data stored in the object for the specified field. Returns 1 * if data was available and returned, 0 if no data was available, -1 * on error. */ int fiid_obj_get (fiid_obj_t obj, const char *field, uint64_t *val); /* * FIID_OBJ_GET * * Get data stored in the object for the specified field. Returns 1 * if data was available and returned, -1 on error. Identical to * fiid_obj_get() except a return of 0 is not possible. If no data is * available, -1 is returned and FIID_ERR_DATA_NOT_AVAILABLE is the * error code set. */ int FIID_OBJ_GET (fiid_obj_t obj, const char *field, uint64_t *val); /* * fiid_obj_set_data * * Set an array of data in the object for the specified field. * Returns length of data set on success, -1 on error. The field * specified must begin on a byte boundary and have a maximum bit * length that is a multiple of 8. Will truncate the data written * if the field maximum length is smaller than the data given. */ int fiid_obj_set_data (fiid_obj_t obj, const char *field, const void *data, unsigned int data_len); /* * fiid_obj_get_data * * Get an array of data in the object for the specified field. * Returns length of data read on success, -1 on error. The field * specified must begin on a byte boundary and have a data bit length * that is a multiple of 8. */ int fiid_obj_get_data (fiid_obj_t obj, const char *field, void *data, unsigned int data_len); /* * fiid_obj_set_all * * Set all fields in the object with the specified array of data. * Returns length of data set on success, -1 on error. The given data * must fall on a byte boundary of the object. Will truncate the data * written if the total object maximum length is smaller than the data * given. Will write as much as possible if data is not large enough * to fill the entire object. */ int fiid_obj_set_all (fiid_obj_t obj, const void *data, unsigned int data_len); /* * fiid_obj_get_all * * Get an array of all data in the object. Returns length of data * read on success, -1 on error. */ int fiid_obj_get_all (fiid_obj_t obj, void *data, unsigned int data_len); /* * fiid_obj_set_block * * Set a block of fields in the object, beginning with 'field_start' * and ending with 'field_end'. Returns length of data set on * success, -1 on error. The fields given must fall on a byte * boundary of the object. Will truncate the data written if the * total block maximum length is smaller than the data given. Will * write as much as possible if data is not large enough to fill the * entire block. */ int fiid_obj_set_block (fiid_obj_t obj, const char *field_start, const char *field_end, const void *data, unsigned int data_len); /* * fiid_obj_get_block * * Get a block of data in the object, beginning with 'field_start' and * ending with 'field_end'. Returns length of data read on success, * -1 on error. Data being read must fall on a byte boundary. */ int fiid_obj_get_block (fiid_obj_t obj, const char *field_start, const char *field_end, void *data, unsigned int data_len); /***************************** * FIID Iterator API * *****************************/ /* * fiid_iterator_create * * Create a fiid iterator to iteratate through each field in an * object. Returns iterator on success, NULL on error. */ fiid_iterator_t fiid_iterator_create (fiid_obj_t obj); /* * fiid_iterator_destroy * * Destroy and free memory from a fiid iterator. */ void fiid_iterator_destroy (fiid_iterator_t iter); /* * fiid_iterator_errnum * * Returns the error code for the most recently occurring error. */ fiid_err_t fiid_iterator_errnum (fiid_iterator_t iter); /* * fiid_iterator_errormsg * * Returns the error string for the most recently occurring error. */ char *fiid_iterator_errormsg (fiid_iterator_t iter); /* * fiid_iterator_reset * * Reset the iterator back to the beginning. Returns 0 on success, -1 * on error. */ int fiid_iterator_reset (fiid_iterator_t iter); /* * fiid_iterator_next * * Move the iterator to the next field. Returns 0 on success, -1 on * error. */ int fiid_iterator_next (fiid_iterator_t iter); /* * fiid_iterator_end * * Returns 1 if you are at the end of the iterator, 0 if not, -1 * error. */ int fiid_iterator_end (fiid_iterator_t iter); /* * fiid_iterator_field_len * * Returns the number of bits set for the current field. Returns -1 * on error. */ int fiid_iterator_field_len (fiid_iterator_t iter); /* * fiid_iterator_key * * Returns the key name for the current field. Returns NULL on error. */ char *fiid_iterator_key (fiid_iterator_t iter); /* * fiid_iterator_get * * Get data stored in the object for the current field. Returns 1 * if data was available and returned, 0 if no data was available, -1 * on error. */ int fiid_iterator_get (fiid_iterator_t iter, uint64_t *val); /* * fiid_iterator_get_data * * Get an array of data in the object for the current field. Returns * length of data read on success, -1 on error. The current field * must begin on a byte boundary and have a data bit length that is a * multiple of 8. */ int fiid_iterator_get_data (fiid_iterator_t iter, void *data, unsigned int data_len); #ifdef __cplusplus } #endif #endif /* FIID_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/fru/0000755002055400205540000000000013527342543021570 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/fru/ipmi-fru.h0000644002055400205540000004526313527331636023504 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_H #define IPMI_FRU_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_FRU_ERR_SUCCESS 0 #define IPMI_FRU_ERR_CONTEXT_NULL 1 #define IPMI_FRU_ERR_CONTEXT_INVALID 2 #define IPMI_FRU_ERR_PARAMETERS 3 #define IPMI_FRU_ERR_DEVICE_ID_NOT_OPEN 4 #define IPMI_FRU_ERR_DEVICE_ID_ALREADY_OPEN 5 #define IPMI_FRU_ERR_NO_FRU_INFORMATION 6 #define IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID 7 #define IPMI_FRU_ERR_COMMON_HEADER_CHECKSUM_INVALID 8 #define IPMI_FRU_ERR_CHASSIS_INFO_AREA_CHECKSUM_INVALID 9 #define IPMI_FRU_ERR_BOARD_INFO_AREA_CHECKSUM_INVALID 10 #define IPMI_FRU_ERR_PRODUCT_INFO_AREA_CHECKSUM_INVALID 11 #define IPMI_FRU_ERR_MULTIRECORD_AREA_CHECKSUM_INVALID 12 #define IPMI_FRU_ERR_COMMON_HEADER_FORMAT_INVALID 13 #define IPMI_FRU_ERR_CHASSIS_INFO_AREA_FORMAT_INVALID 14 #define IPMI_FRU_ERR_BOARD_INFO_AREA_FORMAT_INVALID 15 #define IPMI_FRU_ERR_PRODUCT_INFO_AREA_FORMAT_INVALID 16 #define IPMI_FRU_ERR_MULTIRECORD_AREA_FORMAT_INVALID 17 #define IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT 18 #define IPMI_FRU_ERR_FRU_LANGUAGE_CODE_NOT_SUPPORTED 19 #define IPMI_FRU_ERR_FRU_INVALID_BCD_ENCODING 20 #define IPMI_FRU_ERR_FRU_SENTINEL_VALUE_NOT_FOUND 21 #define IPMI_FRU_ERR_NOT_AVAILABLE_FOR_THIS_RECORD 22 #define IPMI_FRU_ERR_OVERFLOW 23 #define IPMI_FRU_ERR_OUT_OF_MEMORY 24 #define IPMI_FRU_ERR_DEVICE_BUSY 25 #define IPMI_FRU_ERR_IPMI_ERROR 26 #define IPMI_FRU_ERR_SYSTEM_ERROR 27 #define IPMI_FRU_ERR_INTERNAL_ERROR 28 #define IPMI_FRU_ERR_ERRNUMRANGE 29 #define IPMI_FRU_FLAGS_DEFAULT 0x0000 #define IPMI_FRU_FLAGS_DEBUG_DUMP 0x0001 #define IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS 0x0002 #define IPMI_FRU_FLAGS_INTERPRET_OEM_DATA 0x0004 /* Do not parse FRU inventory information like normal * - iterator functions no longer serve purpose * - ipmi_fru_read_data_area will read as much data as in * can into buffer. */ #define IPMI_FRU_FLAGS_READ_RAW 0x0008 #define IPMI_FRU_AREA_TYPE_CHASSIS_INFO_AREA 0 #define IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA 1 #define IPMI_FRU_AREA_TYPE_PRODUCT_INFO_AREA 2 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION 3 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_OUTPUT 4 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_LOAD 5 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_MANAGEMENT_ACCESS_RECORD 6 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_BASE_COMPATABILITY_RECORD 7 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_COMPATABILITY_RECORD 8 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_FIXED_SMBUS_DEVICE_RECORD 9 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_LEGACY_DEVICE_ALERTS 10 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_REMOTE_CONTROL 11 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_OUTPUT 12 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_LOAD 13 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_NVM_EXPRESS 14 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_OEM 15 #define IPMI_FRU_AREA_TYPE_MULTIRECORD_UNKNOWN 16 #define IPMI_FRU_AREA_TYPE_RAW_DATA 17 /* multirecord length field is 1 byte => max 256 chars. Round up to * 512 for good measure. */ #define IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX 512 /* length field is 6 bits = 64 bytes of text, x2 b/c could be hex * output, x2 because of possible space in between hex output and 'h' * at end of hex output, x2 for extra measure. This length is * sufficient for 6-bit ASCII as well, since you have 4 chars / 3 * bytes. */ #define IPMI_FRU_AREA_STRING_MAX 512 /* 16 bit field for length */ #define IPMI_FRU_AREA_SIZE_MAX 65536 struct ipmi_fru_field { uint8_t type_length_field[IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX]; /* store length of data stored in buffer */ unsigned int type_length_field_length; }; typedef struct ipmi_fru_field ipmi_fru_field_t; typedef struct ipmi_fru_ctx *ipmi_fru_ctx_t; /* FRU Parse Context Functions * - if specified, ipmi_ctx must be open and ready to go * - if NULL ipmi_ctx, FRU ctx cannot be used for FRU reading, only parsing records */ ipmi_fru_ctx_t ipmi_fru_ctx_create (ipmi_ctx_t ipmi_ctx); void ipmi_fru_ctx_destroy (ipmi_fru_ctx_t ctx); int ipmi_fru_ctx_errnum (ipmi_fru_ctx_t ctx); char * ipmi_fru_ctx_strerror (int errnum); char * ipmi_fru_ctx_errormsg (ipmi_fru_ctx_t ctx); /* FRU Parse flag functions */ int ipmi_fru_ctx_get_flags (ipmi_fru_ctx_t ctx, unsigned int *flags); int ipmi_fru_ctx_set_flags (ipmi_fru_ctx_t ctx, unsigned int flags); /* for use w/ IPMI_FRU_FLAGS_INTERPRET_OEM_DATA */ int ipmi_fru_ctx_get_manufacturer_id (ipmi_fru_ctx_t ctx, uint32_t *manufacturer_id); int ipmi_fru_ctx_set_manufacturer_id (ipmi_fru_ctx_t ctx, uint32_t manufacturer_id); /* for use w/ IPMI_FRU_FLAGS_INTERPRET_OEM_DATA */ int ipmi_fru_ctx_get_product_id (ipmi_fru_ctx_t ctx, uint16_t *product_id); int ipmi_fru_ctx_set_product_id (ipmi_fru_ctx_t ctx, uint16_t product_id); char *ipmi_fru_ctx_get_debug_prefix (ipmi_fru_ctx_t ctx); int ipmi_fru_ctx_set_debug_prefix (ipmi_fru_ctx_t ctx, const char *debug_prefix); /* FRU data retrieval setup functions */ int ipmi_fru_open_device_id (ipmi_fru_ctx_t ctx, uint8_t fru_device_id); int ipmi_fru_close_device_id (ipmi_fru_ctx_t ctx); /* Identical to ipmi_fru_open_device_id, but do not read from IPMI, use data in buffer */ int ipmi_fru_open_device_id_with_buffer (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen); /* FRU data iterator functions */ int ipmi_fru_first (ipmi_fru_ctx_t ctx); /* returns 1 if iterator can continue, 0 if at end, -1 on error */ int ipmi_fru_next (ipmi_fru_ctx_t ctx); /* area read will not include record headers */ /* utiliize area_type and area_length in/out parameters for later parsing */ /* if reading in raw mode, read as much data as you can into buffer * - area_length will return total size of data that exists * - area_type will return IPMI_FRU_AREA_TYPE_RAW_DATA */ int ipmi_fru_read_data_area (ipmi_fru_ctx_t ctx, unsigned int *area_type, unsigned int *area_length, void *areabuf, unsigned int areabuflen); /* most useful for OEM record handling, will error if not at a multirecord area */ int ipmi_fru_read_multirecord_record_type_id (ipmi_fru_ctx_t ctx, uint8_t *record_type_id); /* FRU area parsing */ /* Functions assume record headers have been stripped out */ int ipmi_fru_chassis_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *chassis_type, ipmi_fru_field_t *chassis_part_number, ipmi_fru_field_t *chassis_serial_number, ipmi_fru_field_t *chassis_custom_fields, unsigned int chassis_custom_fields_len); /* mfg_date_time returned in seconds since unix epoch, not FRU defined epoch */ int ipmi_fru_board_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *language_code, uint32_t *mfg_date_time, ipmi_fru_field_t *board_manufacturer, ipmi_fru_field_t *board_product_name, ipmi_fru_field_t *board_serial_number, ipmi_fru_field_t *board_part_number, ipmi_fru_field_t *board_fru_file_id, ipmi_fru_field_t *board_custom_fields, unsigned int chassis_custom_fields_len); int ipmi_fru_product_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *language_code, ipmi_fru_field_t *product_manufacturer_name, ipmi_fru_field_t *product_name, ipmi_fru_field_t *product_part_model_number, ipmi_fru_field_t *product_version, ipmi_fru_field_t *product_serial_number, ipmi_fru_field_t *product_asset_tag, ipmi_fru_field_t *product_fru_file_id, ipmi_fru_field_t *product_custom_fields, unsigned int product_custom_fields_len); /* 10 mV multipliers factored in return voltages */ /* FRU Revision 1.2 renamed ac_dropout_tolerance to input_dropout_tolerance, are identical */ int ipmi_fru_multirecord_power_supply_information (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *overall_capacity, unsigned int *peak_va, unsigned int *inrush_current, unsigned int *inrush_interval, int *low_end_input_voltage_range_1, int *high_end_input_voltage_range_1, int *low_end_input_voltage_range_2, int *high_end_input_voltage_range_2, unsigned int *low_end_input_frequency_range, unsigned int *high_end_input_frequency_range, unsigned int *ac_dropout_tolerance, unsigned int *predictive_fail_support, unsigned int *power_factor_correction, unsigned int *autoswitch, unsigned int *hot_swap_support, unsigned int *tachometer_pulses_per_rotation_predictive_fail_polarity, unsigned int *peak_capacity, unsigned int *hold_up_time, unsigned int *voltage_1, unsigned int *voltage_2, unsigned int *total_combined_wattage, unsigned int *predictive_fail_tachometer_lower_threshold); /* 10 mV multipliers factored in return voltages */ int ipmi_fru_multirecord_dc_output (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *standby, int *nominal_voltage, int *maximum_negative_voltage_deviation, int *maximum_positive_voltage_deviation, unsigned int *ripple_and_noise_pk_pk, unsigned int *minimum_current_draw, unsigned int *maximum_current_draw); /* 10 mV multipliers factored in return voltages */ int ipmi_fru_multirecord_dc_load (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *standby, int *nominal_voltage, int *specd_minimum_voltage, int *specd_maximum_voltage, unsigned int *specd_ripple_and_noise_pk_pk, unsigned int *minimum_current_load, unsigned int *maximum_current_load); int ipmi_fru_multirecord_management_access_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *sub_record_type, void *sub_record_data, unsigned int *sub_record_data_len); int ipmi_fru_multirecord_base_compatibility_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, unsigned int *entity_id_code, unsigned int *compatibility_base, unsigned int *compatibility_code_start_value, uint8_t *code_range_mask, unsigned int *code_range_mask_len); int ipmi_fru_multirecord_extended_compatibility_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, unsigned int *entity_id_code, unsigned int *compatibility_base, unsigned int *compatibility_code_start_value, uint8_t *code_range_mask, unsigned int *code_range_mask_len); /* 10 mV multipliers factored in return voltages */ /* draw in mA units, already factoring in current_units */ int ipmi_fru_multirecord_extended_dc_output (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *current_units, unsigned int *standby, int *nominal_voltage, int *maximum_negative_voltage_deviation, int *maximum_positive_voltage_deviation, unsigned int *ripple_and_noise_pk_pk, unsigned int *minimum_current_draw, unsigned int *maximum_current_draw); /* 10 mV multipliers factored in return voltages */ /* load in mA units, already factoring in current_units */ int ipmi_fru_multirecord_extended_dc_load (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *current_units, unsigned int *standby, int *nominal_voltage, int *specd_minimum_voltage, int *specd_maximum_voltage, unsigned int *specd_ripple_and_noise_pk_pk, unsigned int *minimum_current_load, unsigned int *maximum_current_load); int ipmi_fru_multirecord_oem_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, void *oem_data, unsigned int *oem_data_len); /* FRU utility functions */ /* Typically pass in buffer and length from ipmi_fru_field_t * after info area is parsed. strbuflen is an in/out value. input * indicates length of buffer, output indicates bytes written to * buffer. */ int ipmi_fru_type_length_field_to_string (ipmi_fru_ctx_t ctx, const uint8_t *type_length_buf, unsigned int type_length_buflen, uint8_t language_code, char *strbuf, unsigned int *strbuflen); #ifdef __cplusplus } #endif #endif /* IPMI_FRU_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/0000755002055400205540000000000013527342543022734 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/ipmi-interface.h0000644002055400205540000000231313527331636026001 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERFACE_H #define IPMI_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include /* NO_LEGAL_CHECK - do no check if IPMI response payloads have * sufficient data (i.e. completion code fields) to be legal. Useful * to work around non-compliant motherboards. Only applicable to * interface unassemble functions. */ #define IPMI_INTERFACE_FLAGS_DEFAULT 0x00000000 #define IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK 0x00000001 #ifdef __cplusplus } #endif #endif /* IPMI_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/rmcp-interface.h0000644002055400205540000000566713527331636026023 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RMCP_INTERFACE_H #define RMCP_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include #include #define RMCP_VERSION_1_0 0x06 /* RMCP Version 1.0 */ #define RMCP_AUX_BUS_SHUNT 0x26F /* 623 */ #define RMCP_PRIMARY_RMCP_PORT RMCP_AUX_BUS_SHUNT #define RMCP_SECURE_AUX_BUS 0x298 /* 664 */ #define RMCP_SECONDARY_RMCP_PORT RMCP_SECURE_AUX_BUS #define RMCP_HDR_SEQ_NUM_NO_RMCP_ACK 0xFF #define RMCP_HDR_MESSAGE_CLASS_BIT_RMCP_NORMAL 0x0 #define RMCP_HDR_MESSAGE_CLASS_BIT_RMCP_ACK 0x1 #define RMCP_HDR_MESSAGE_CLASS_ASF 0x06 #define RMCP_HDR_MESSAGE_CLASS_IPMI 0x07 #define RMCP_HDR_MESSAGE_CLASS_OEM 0x08 #define RMCP_HDR_MESSAGE_CLASS_VALID(__message_class) \ (((__message_class) == RMCP_HDR_MESSAGE_CLASS_ASF \ || (__message_class) == RMCP_HDR_MESSAGE_CLASS_IPMI \ || (__message_class) == RMCP_HDR_MESSAGE_CLASS_OEM) ? 1 : 0) #define RMCP_ASF_IANA_ENTERPRISE_NUM 0x11BE /* 4542 */ #define RMCP_ASF_MESSAGE_TYPE_PRESENCE_PING 0x80 #define RMCP_ASF_MESSAGE_TYPE_PRESENCE_PONG 0x40 #define RMCP_ASF_MESSAGE_TAG_MAX 0xFE /* * fill* functions return 0 on success, -1 on error. * * object must be for the fill function's respective fiid * template. * * assemble/unassemble functions must be passed fiid objects of the * respective expected header/trailer templates. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_rmcp_hdr; int fill_rmcp_hdr (uint8_t message_class, fiid_obj_t obj_rmcp_hdr); int fill_rmcp_hdr_ipmi (fiid_obj_t obj_rmcp_hdr); int fill_rmcp_hdr_asf (fiid_obj_t obj_rmcp_hdr); /* returns length written to pkt on success, -1 on error */ int assemble_rmcp_pkt (fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_cmd, void *pkt, unsigned int pkt_len, unsigned int flags); /* returns 1 if fully unparsed, 0 if not, -1 on error */ int unassemble_rmcp_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_cmd, unsigned int flags); #ifdef __cplusplus } #endif #endif /* RMCP_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/ipmi-ipmb-interface.h0000644002055400205540000000451113527331636026730 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IPMB_INTERFACE_H #define IPMI_IPMB_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX 0x3F /* 111111b */ /* * fill* functions return 0 on success, -1 on error. * * object must be for the fill function's respective fiid * template. * * assemble/unassemble functions must be passed fiid objects of the * respective expected header/trailer templates. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_ipmb_msg_hdr_rq; extern fiid_template_t tmpl_ipmb_msg_hdr_rs; extern fiid_template_t tmpl_ipmb_msg_trlr; extern fiid_template_t tmpl_ipmb_msg; int fill_ipmb_msg_hdr (uint8_t rs_addr, uint8_t net_fn, uint8_t rs_lun, uint8_t rq_addr, uint8_t rq_lun, uint8_t rq_seq, fiid_obj_t obj_ipmb_msg_hdr); /* returns length written to obj_ipmb_msg on success, -1 on error */ int assemble_ipmi_ipmb_msg (fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg, unsigned int flags); /* returns 1 if fully unparsed, 0 if not, -1 on error */ int unassemble_ipmi_ipmb_msg (fiid_obj_t obj_ipmb_msg, fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg_trlr, unsigned int flags); #ifdef __cplusplus } #endif #endif /* IPMI_IPMB_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/ipmi-kcs-interface.h0000644002055400205540000000370613527331636026566 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_KCS_INTERFACE_H #define IPMI_KCS_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include #include /* * fill* functions return 0 on success, -1 on error. * * object must be for the fill function's respective fiid * template. * * assemble/unassemble functions must be passed fiid objects of the * respective expected header/trailer templates. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_hdr_kcs; int fill_hdr_ipmi_kcs (uint8_t lun, uint8_t fn, fiid_obj_t obj_kcs_hdr); /* returns length written to pkt on success, -1 on error */ int assemble_ipmi_kcs_pkt (fiid_obj_t obj_kcs_hdr, fiid_obj_t obj_cmd, void *pkt, unsigned int pkt_len, unsigned int flags); /* returns 1 if fully unparsed, 0 if not, -1 on error */ int unassemble_ipmi_kcs_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_kcs_hdr, fiid_obj_t obj_cmd, unsigned int flags); #ifdef __cplusplus } #endif #endif /* IPMI_KCS_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/ipmi-lan-interface.h0000644002055400205540000000724013527331636026555 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_INTERFACE_H #define IPMI_LAN_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #define IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX 0x3F /* 111111b */ /* * fill* functions return 0 on success, -1 on error. * * object must be for the fill function's respective fiid * template. * * assemble/unassemble functions must be passed fiid objects of the * respective expected header/trailer templates. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_lan_session_hdr; extern fiid_template_t tmpl_lan_msg_hdr_rq; extern fiid_template_t tmpl_lan_msg_hdr_rs; extern fiid_template_t tmpl_lan_msg_trlr; int fill_lan_session_hdr (uint8_t authentication_type, uint32_t session_sequence_number, uint32_t session_id, fiid_obj_t obj_lan_session_hdr); int fill_lan_msg_hdr (uint8_t rs_addr, uint8_t net_fn, uint8_t rs_lun, uint8_t rq_seq, fiid_obj_t obj_lan_msg_hdr); /* returns length written to pkt on success, -1 on error */ int assemble_ipmi_lan_pkt (fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_lan_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, const void *authentication_code_data, unsigned int authentication_code_data_len, void *pkt, unsigned int pkt_len, unsigned int flags); /* returns 1 if fully unparsed, 0 if not, -1 on error */ int unassemble_ipmi_lan_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_lan_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, unsigned int flags); /* returns length sent on success, -1 on error */ /* A few extra error checks, but nearly identical to system sendto() */ ssize_t ipmi_lan_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); /* returns length received on success, 0 on orderly shutdown, -1 on error */ /* A few extra error checks, but nearly identical to system recvfrom() */ ssize_t ipmi_lan_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); #ifdef __cplusplus } #endif #endif /* IPMI_LAN_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interface/ipmi-rmcpplus-interface.h0000644002055400205540000003722413527331636027655 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_INTERFACE_H #define IPMI_RMCPPLUS_INTERFACE_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include /************************** * IPMI 2.0 Payload Types * **************************/ #define IPMI_PAYLOAD_TYPE_IPMI 0x00 #define IPMI_PAYLOAD_TYPE_SOL 0x01 #define IPMI_PAYLOAD_TYPE_OEM_EXPLICIT 0x02 #define IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST 0x10 #define IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE 0x11 #define IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 0x12 #define IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 0x13 #define IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 0x14 #define IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4 0x15 /* 20h - 27h - OEM */ /* all other reserved */ #define IPMI_PAYLOAD_TYPE_VALID(__payload_type) \ (((__payload_type) == IPMI_PAYLOAD_TYPE_IPMI \ || (__payload_type) == IPMI_PAYLOAD_TYPE_SOL \ || (__payload_type) == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) ? 1 : 0) #define IPMI_PAYLOAD_TYPE_SESSION_SETUP(__payload_type) \ (((__payload_type) == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 \ || (__payload_type) == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) ? 1 : 0) /************************** * IPMI 2.0 Payload Flags * **************************/ #define IPMI_PAYLOAD_FLAG_UNENCRYPTED 0x0 #define IPMI_PAYLOAD_FLAG_ENCRYPTED 0x1 #define IPMI_PAYLOAD_FLAG_UNAUTHENTICATED 0x0 #define IPMI_PAYLOAD_FLAG_AUTHENTICATED 0x1 #define IPMI_PAYLOAD_ENCRYPTED_FLAG_VALID(__payload_flag) \ (((__payload_flag) == IPMI_PAYLOAD_FLAG_UNENCRYPTED \ || (__payload_flag) == IPMI_PAYLOAD_FLAG_ENCRYPTED) ? 1 : 0) #define IPMI_PAYLOAD_AUTHENTICATED_FLAG_VALID(__payload_flag) \ (((__payload_flag) == IPMI_PAYLOAD_FLAG_UNENCRYPTED \ || (__payload_flag) == IPMI_PAYLOAD_FLAG_ENCRYPTED) ? 1 : 0) /********************************************* * IPMI 2.0 Authentication Algorithm Numbers * *********************************************/ #define IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE 0x00 #define IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 0x01 #define IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 0x02 #define IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 0x03 /* C0h - FFh - OEM */ /* all other reserved */ #define IPMI_AUTHENTICATION_ALGORITHM_VALID(__algorithm) \ (((__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) ? 1 : 0) #define IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED(__algorithm) \ (((__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ || (__algorithm) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) ? 1 : 0) /**************************************** * IPMI 2.0 Integrity Algorithm Numbers * ****************************************/ #define IPMI_INTEGRITY_ALGORITHM_NONE 0x00 #define IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 0x01 #define IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 0x02 #define IPMI_INTEGRITY_ALGORITHM_MD5_128 0x03 #define IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 0x04 /* C0h - FFh - OEM */ /* all other reserved */ #define IPMI_INTEGRITY_ALGORITHM_VALID(__algorithm) \ (((__algorithm) == IPMI_INTEGRITY_ALGORITHM_NONE \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_MD5_128 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) ? 1 : 0) #define IPMI_INTEGRITY_ALGORITHM_SUPPORTED(__algorithm) \ (((__algorithm) == IPMI_INTEGRITY_ALGORITHM_NONE \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_MD5_128 \ || (__algorithm) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) ? 1 : 0) /********************************************** * IPMI 2.0 Confidentiality Algorithm Numbers * **********************************************/ #define IPMI_CONFIDENTIALITY_ALGORITHM_NONE 0x00 #define IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 0x01 #define IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 0x02 #define IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40 0x03 /* 30h - 3Fh - OEM */ /* all other reserved */ #define IPMI_CONFIDENTIALITY_ALGORITHM_VALID(__algorithm) \ (((__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 \ || (__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 \ || (__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40) ? 1 : 0) #define IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED(__algorithm) \ (((__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__algorithm) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) ? 1 : 0) /*************************************** * IPMI 2.0 Misc Flags and Definitions * ***************************************/ #define IPMI_AUTHENTICATION_PAYLOAD_TYPE 0x00 #define IPMI_AUTHENTICATION_PAYLOAD_LENGTH 0x08 #define IPMI_INTEGRITY_PAYLOAD_TYPE 0x01 #define IPMI_INTEGRITY_PAYLOAD_LENGTH 0x08 #define IPMI_CONFIDENTIALITY_PAYLOAD_TYPE 0x02 #define IPMI_CONFIDENTIALITY_PAYLOAD_LENGTH 0x08 #define IPMI_USER_NAME_PRIVILEGE_LOOKUP 0x0 #define IPMI_NAME_ONLY_LOOKUP 0x1 #define IPMI_USER_NAME_LOOKUP_VALID(__username_lookup_flag) \ (((__username_lookup_flag) == IPMI_USER_NAME_PRIVILEGE_LOOKUP \ || (__username_lookup_flag) == IPMI_NAME_ONLY_LOOKUP) ? 1 : 0) #define IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH 16 #define IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH 16 #define IPMI_MANAGED_SYSTEM_GUID_LENGTH 16 #define IPMI_NEXT_HEADER 0x07 #define IPMI_INTEGRITY_PAD_MULTIPLE 4 #define IPMI_INTEGRITY_PAD_DATA 0xFF #define IPMI_MAX_PAYLOAD_LENGTH 65536 /* achu: b/c ipmi_msg_len is 2 bytes */ #define IPMI_HMAC_SHA1_DIGEST_LENGTH 20 #define IPMI_HMAC_MD5_DIGEST_LENGTH 16 #define IPMI_MD5_DIGEST_LENGTH 16 #define IPMI_HMAC_SHA1_96_DIGEST_LENGTH 12 #define IPMI_HMAC_SHA256_DIGEST_LENGTH 32 #define IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH 12 #define IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH 16 #define IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH 16 #define IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH 16 /* Refer to table 22-19 */ /* XXX - Errata 4 defines SHA256 but not cipher suite IDs */ /* achu: Intel support says Cipher Suite 15-19 maps to 1-5 using * SHA256 instead of SHA1 and SHA256-128 instead of SHA1-96. */ /* Cipher Suite 17 confirmed via DCMI 1.1 specification */ #define IPMI_CIPHER_SUITE_ID_MIN 0 #define IPMI_CIPHER_SUITE_ID_MAX 19 /* * fill* functions return 0 on success, -1 on error. * * object must be for the fill function's respective fiid * template. * * assemble/unassemble functions must be passed fiid objects of the * respective expected header/trailer templates. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_rmcpplus_session_hdr; extern fiid_template_t tmpl_rmcpplus_session_trlr; extern fiid_template_t tmpl_rmcpplus_payload; extern fiid_template_t tmpl_rmcpplus_open_session_request; extern fiid_template_t tmpl_rmcpplus_open_session_response; extern fiid_template_t tmpl_rmcpplus_rakp_message_1; extern fiid_template_t tmpl_rmcpplus_rakp_message_2; extern fiid_template_t tmpl_rmcpplus_rakp_message_3; extern fiid_template_t tmpl_rmcpplus_rakp_message_4; /* ipmi_rmcpplus_init * * Must be called first to initialize crypt libs. In threaded * programs, must be called before threads are created. * * If errno returned == EPERM, underlying crypt library incompatible. * * Returns 0 on success, -1 on error. */ int ipmi_rmcpplus_init (void); int fill_rmcpplus_session_hdr (uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint32_t oem_iana, uint16_t oem_payload_id, uint32_t session_id, uint32_t session_sequence_number, fiid_obj_t obj_rmcpplus_session_hdr); int fill_rmcpplus_session_trlr (fiid_obj_t obj_rmcpplus_session_trlr); int fill_rmcpplus_payload (const void *confidentiality_header, unsigned int confidentiality_header_len, const void *payload_data, unsigned int payload_data_len, const void *confidentiality_trailer, unsigned int confidentiality_trailer_len, fiid_obj_t obj_cmd_rq); int fill_rmcpplus_open_session (uint8_t message_tag, uint8_t requested_maximum_privilege_level, uint32_t remote_console_session_id, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, fiid_obj_t obj_cmd_rq); int fill_rmcpplus_rakp_message_1 (uint8_t message_tag, uint32_t managed_system_session_id, const void *remote_console_random_number, unsigned int remote_console_random_number_len, uint8_t requested_maximum_privilege_level, uint8_t name_only_lookup_flag, const char *username, unsigned int username_len, fiid_obj_t obj_cmd_rq); int fill_rmcpplus_rakp_message_3 (uint8_t message_tag, uint8_t rmcpplus_status_code, uint32_t managed_system_session_id, const void *key_exchange_authentication_code, unsigned int key_exchange_authentication_code_len, fiid_obj_t obj_cmd_rq); /* returns length written to pkt on success, -1 on error */ int assemble_ipmi_rmcpplus_pkt (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *authentication_code_data, unsigned int authentication_code_data_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_rmcpplus_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_rmcpplus_session_trlr, void *pkt, unsigned int pkt_len, unsigned int flags); /* returns 1 if fully unparsed, 0 if not, -1 on error */ int unassemble_ipmi_rmcpplus_pkt (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_rmcpplus_session_hdr, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, fiid_obj_t obj_rmcpplus_session_trlr, unsigned int flags); /* returns length sent on success, -1 on error */ /* A few extra error checks, but nearly identical to system sendto() */ ssize_t ipmi_rmcpplus_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); /* returns length received on success, 0 on orderly shutdown, -1 on error */ /* A few extra error checks, but nearly identical to system recvfrom() */ ssize_t ipmi_rmcpplus_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_INTERFACE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/interpret/0000755002055400205540000000000013527342543023010 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/interpret/ipmi-interpret.h0000644002055400205540000001047313527331636026137 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_H #define IPMI_INTERPRET_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_INTERPRET_ERR_SUCCESS 0 #define IPMI_INTERPRET_ERR_CONTEXT_NULL 1 #define IPMI_INTERPRET_ERR_CONTEXT_INVALID 2 #define IPMI_INTERPRET_ERR_PARAMETERS 3 #define IPMI_INTERPRET_ERR_OUT_OF_MEMORY 4 #define IPMI_INTERPRET_ERR_PERMISSION 5 #define IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST 6 #define IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_PARSE 7 #define IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST 8 #define IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_PARSE 9 #define IPMI_INTERPRET_ERR_INVALID_SEL_RECORD 10 #define IPMI_INTERPRET_ERR_SYSTEM_ERROR 11 #define IPMI_INTERPRET_ERR_OVERFLOW 12 #define IPMI_INTERPRET_ERR_INTERNAL_ERROR 13 #define IPMI_INTERPRET_ERR_ERRNUMRANGE 14 #define IPMI_INTERPRET_FLAGS_DEFAULT 0x0000 #define IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA 0x0001 #define IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS 0x0002 #define IPMI_INTERPRET_FLAGS_IGNORE_UNRECOGNIZED_EVENTS 0x0004 #define IPMI_INTERPRET_STATE_NOMINAL 0x00 #define IPMI_INTERPRET_STATE_WARNING 0x01 #define IPMI_INTERPRET_STATE_CRITICAL 0x02 #define IPMI_INTERPRET_STATE_UNKNOWN 0x03 typedef struct ipmi_interpret_ctx *ipmi_interpret_ctx_t; /* Interpret Context Functions */ ipmi_interpret_ctx_t ipmi_interpret_ctx_create (void); void ipmi_interpret_ctx_destroy (ipmi_interpret_ctx_t ctx); int ipmi_interpret_ctx_errnum (ipmi_interpret_ctx_t ctx); char * ipmi_interpret_ctx_strerror (int errnum); char * ipmi_interpret_ctx_errormsg (ipmi_interpret_ctx_t ctx); /* interpret flag functions */ int ipmi_interpret_ctx_get_flags (ipmi_interpret_ctx_t ctx, unsigned int *flags); int ipmi_interpret_ctx_set_flags (ipmi_interpret_ctx_t ctx, unsigned int flags); /* for use w/ IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA */ int ipmi_interpret_ctx_get_manufacturer_id (ipmi_interpret_ctx_t ctx, uint32_t *manufacturer_id); int ipmi_interpret_ctx_set_manufacturer_id (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id); /* for use w/ IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA */ int ipmi_interpret_ctx_get_product_id (ipmi_interpret_ctx_t ctx, uint16_t *product_id); int ipmi_interpret_ctx_set_product_id (ipmi_interpret_ctx_t ctx, uint16_t product_id); /* interpret file config loading */ /* specify NULL for default config file */ /* if not called, library default will always be used */ int ipmi_interpret_load_sel_config (ipmi_interpret_ctx_t ctx, const char *sel_config_file); /* specify NULL for default config file */ /* if not called, library default will always be used */ int ipmi_interpret_load_sensor_config (ipmi_interpret_ctx_t ctx, const char *sensor_config_file); /* interpret core functions */ int ipmi_interpret_sel (ipmi_interpret_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, unsigned int *sel_state); int ipmi_interpret_sensor (ipmi_interpret_ctx_t ctx, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask, unsigned int *sensor_state); #ifdef __cplusplus } #endif #endif /* IPMI_INTERPRET_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/locate/0000755002055400205540000000000013527342543022243 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/locate/ipmi-locate.h0000644002055400205540000001137013527331636024622 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LOCATE_H #define IPMI_LOCATE_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_LOCATE_PATH_MAX 1024 #define IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY 0x00 #define IPMI_ADDRESS_SPACE_ID_SYSTEM_IO 0x01 #define IPMI_ADDRESS_SPACE_ID_SMBUS 0x04 #define IPMI_LOCATE_ERR_SUCCESS 0 #define IPMI_LOCATE_ERR_NULL 1 #define IPMI_LOCATE_ERR_INVALID 2 #define IPMI_LOCATE_ERR_PARAMETERS 3 #define IPMI_LOCATE_ERR_PERMISSION 4 #define IPMI_LOCATE_ERR_OUT_OF_MEMORY 5 #define IPMI_LOCATE_ERR_SYSTEM_ERROR 6 #define IPMI_LOCATE_ERR_INTERNAL_ERROR 7 #define IPMI_LOCATE_ERR_ERRNUMRANGE 8 typedef struct ipmi_locate_ctx *ipmi_locate_ctx_t; enum ipmi_locate_driver_type { IPMI_LOCATE_DRIVER_NONE = 0, IPMI_LOCATE_DRIVER_DEFAULTS = 1, IPMI_LOCATE_DRIVER_SMBIOS = 2, IPMI_LOCATE_DRIVER_ACPI = 3, IPMI_LOCATE_DRIVER_PCI = 4, IPMI_LOCATE_DRIVER_DMIDECODE = 5 }; typedef enum ipmi_locate_driver_type ipmi_locate_driver_type_t; #define IPMI_LOCATE_DRIVER_VALID(__val) \ (((__val) == IPMI_LOCATE_DRIVER_NONE \ || (__val) == IPMI_LOCATE_DRIVER_DEFAULTS \ || (__val) == IPMI_LOCATE_DRIVER_SMBIOS \ || (__val) == IPMI_LOCATE_DRIVER_ACPI \ || (__val) == IPMI_LOCATE_DRIVER_PCI \ || (__val) == IPMI_LOCATE_DRIVER_DMIDECODE) ? 1 : 0) enum ipmi_interface_type { IPMI_INTERFACE_RESERVED = 0, IPMI_INTERFACE_KCS = 1, IPMI_INTERFACE_SMIC = 2, IPMI_INTERFACE_BT = 3, IPMI_INTERFACE_SSIF = 4, }; typedef enum ipmi_interface_type ipmi_interface_type_t; #define IPMI_INTERFACE_TYPE_VALID(__val) \ (((__val) == IPMI_INTERFACE_KCS \ || (__val) == IPMI_INTERFACE_SMIC \ || (__val) == IPMI_INTERFACE_BT \ || (__val) == IPMI_INTERFACE_SSIF) ? 1 : 0) struct ipmi_locate_info { uint8_t ipmi_version_major; uint8_t ipmi_version_minor; ipmi_locate_driver_type_t locate_driver_type; ipmi_interface_type_t interface_type; /* KCS, SMIC, BT, SSIF */ char driver_device[IPMI_LOCATE_PATH_MAX]; uint8_t address_space_id; /* Memory mapped, IO mapped, SMBus*/ uint64_t driver_address; uint8_t register_spacing; /* Register spacing in bytes */ }; ipmi_locate_ctx_t ipmi_locate_ctx_create (void); void ipmi_locate_ctx_destroy (ipmi_locate_ctx_t ctx); int ipmi_locate_ctx_errnum (ipmi_locate_ctx_t ctx); char *ipmi_locate_ctx_strerror (int errnum); char *ipmi_locate_ctx_errormsg (ipmi_locate_ctx_t ctx); int ipmi_locate_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); /* Identical to ipmi_locate_get_device_info() but will NOT return * defaults if no device info is found. */ int ipmi_locate_discover_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); int ipmi_locate_smbios_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); int ipmi_locate_pci_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); int ipmi_locate_acpi_spmi_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t interface_type, struct ipmi_locate_info *info); int ipmi_locate_defaults_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); int ipmi_locate_dmidecode_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info); #ifdef __cplusplus } #endif #endif /* IPMI_LOCATE_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/payload/0000755002055400205540000000000013527342543022425 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/payload/ipmi-sol-payload.h0000644002055400205540000001134313527331636025761 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_PAYLOAD_H #define IPMI_SOL_PAYLOAD_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SOL_PACKET_SEQUENCE_NUMBER_MAX 0xF #define IPMI_SOL_FLUSH_OUTBOUND 0x1 #define IPMI_SOL_DO_NOT_FLUSH_OUTBOUND 0x0 #define IPMI_SOL_FLUSH_OUTBOUND_VALID(__val) \ (((__val) == IPMI_SOL_FLUSH_OUTBOUND \ || (__val) == IPMI_SOL_DO_NOT_FLUSH_OUTBOUND) ? 1 : 0) #define IPMI_SOL_FLUSH_INBOUND 0x1 #define IPMI_SOL_DO_NOT_FLUSH_INBOUND 0x0 #define IPMI_SOL_FLUSH_INBOUND_VALID(__val) \ (((__val) == IPMI_SOL_FLUSH_INBOUND \ || (__val) == IPMI_SOL_DO_NOT_FLUSH_INBOUND) ? 1 : 0) #define IPMI_SOL_ASSERT_DCD_DSR 0x0 #define IPMI_SOL_DEASSERT_DCD_DSR 0x1 #define IPMI_SOL_ASSERT_DCD_DSR_VALID(__val) \ (((__val) == IPMI_SOL_ASSERT_DCD_DSR \ || (__val) == IPMI_SOL_DEASSERT_DCD_DSR) ? 1 : 0) #define IPMI_SOL_ASSERT_CTS 0x0 #define IPMI_SOL_DEASSERT_CTS 0x1 #define IPMI_SOL_ASSERT_CTS_VALID(__val) \ (((__val) == IPMI_SOL_ASSERT_CTS \ || (__val) == IPMI_SOL_DEASSERT_CTS) ? 1 : 0) #define IPMI_SOL_GENERATE_BREAK 0x1 #define IPMI_SOL_DO_NOT_GENERATE_BREAK 0x0 #define IPMI_SOL_GENERATE_BREAK_VALID(__val) \ (((__val) == IPMI_SOL_GENERATE_BREAK \ || (__val) == IPMI_SOL_DO_NOT_GENERATE_BREAK) ? 1 : 0) #define IPMI_SOL_ASSERT_RI 0x0 #define IPMI_SOL_DEASSERT_RI 0x1 #define IPMI_SOL_ASSERT_RI_VALID(__val) \ (((__val) == IPMI_SOL_ASSERT_RI \ || (__val) == IPMI_SOL_DEASSERT_RI) ? 1 : 0) #define IPMI_SOL_ACK 0x0 #define IPMI_SOL_NACK 0x1 #define IPMI_SOL_ACK_VALID(__val) \ (((__val) == IPMI_SOL_ACK \ || (__val) == IPMI_SOL_NACK) ? 1 : 0) #define IPMI_SOL_NACK_VALID(__val) \ (((__val) == IPMI_SOL_ACK \ || (__val) == IPMI_SOL_NACK) ? 1 : 0) #define IPMI_SOL_BREAK_CONDITION_DETECTED 0x1 #define IPMI_SOL_NO_BREAK_DETECTED 0x0 #define IPMI_SOL_TRANSMIT_OVERRUN_CHARACTERS_DROPPED 0x1 #define IPMI_SOL_TRANSMIT_OVERRUN_NO_CHARACTERS_DROPPED 0x0 #define IPMI_SOL_SOL_DEACTIVATING 0x1 #define IPMI_SOL_SOL_ACTIVE 0x0 #define IPMI_SOL_CHARACTER_TRANSFER_UNAVAILABLE 0x1 #define IPMI_SOL_CHARACTER_TRANSFER_AVAILABLE 0x0 /* * fill* functions return 0 on success, -1 on error. * * obj_sol_payload must be for the fill function's respective fiid * template request. * * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_sol_payload_data; extern fiid_template_t tmpl_sol_payload_data_remote_console_to_bmc; extern fiid_template_t tmpl_sol_payload_data_bmc_to_remote_console; int fill_sol_payload_data (uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t operation_status, const void *character_data, unsigned int character_data_len, fiid_obj_t obj_sol_payload); int fill_sol_payload_data_remote_console_to_bmc (uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t flush_outbound, uint8_t flush_inbound, uint8_t drop_dcd_dsr, uint8_t cts_pause, uint8_t generate_break, uint8_t ring_wor, uint8_t nack, const void *character_data, unsigned int character_data_len, fiid_obj_t obj_sol_payload); #ifdef __cplusplus } #endif #endif /* IPMI_SOL_PAYLOAD_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/0000755002055400205540000000000013527342543023540 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/0000755002055400205540000000000013527342543024320 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/ipmi-fru-wistron-oem-record-format.h0000644002055400205540000000221413527331636033244 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_OEM_WISTRON_RECORD_FORMAT_H #define IPMI_FRU_OEM_WISTRON_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include /* * see freeipmi/templates/ for template definitions */ /* * Wistron / Dell Poweredge C6220 */ /* achu: not official names, named based on use context */ #define IPMI_FRU_OEM_WISTRON_PROPRIETARY_STRING 0xC0 #ifdef __cplusplus } #endif #endif /* IPMI_FRU_OEM_WISTRON_RECORD_FORMAT_H */ ipmi-sdr-oem-intel-node-manager-record-format.h0000644002055400205540000000315413527331636035126 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_H #define IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include /* * see freeipmi/templates/ for template definitions */ /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ #define IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_SUBTYPE_NM_DISCOVERY 0x0D #define IPMI_SDR_OEM_INTEL_NODE_MANAGER_DISCOVERY_VERSION 0x01 extern fiid_template_t tmpl_sdr_oem_intel_node_manager_record; #ifdef __cplusplus } #endif #endif /* IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/ipmi-sdr-oem-intel-record-format.h0000644002055400205540000001471313527331636032655 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_OEM_INTEL_RECORD_FORMAT_H #define IPMI_SDR_OEM_INTEL_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif /* * see freeipmi/templates/ for template definitions */ /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_OEM_DATA_LENGTH 11 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_SUBTYPE_INDEX 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_SUBTYPE 0x0B #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_INDEX 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_BITMASK 0x03 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_SHIFT 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_NONE_SUPPORTED 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_OPEN_LOOP_THROUGHPUT_THROTTLING 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_CLOSE_LOOP_THERMAL_THROTTLING 2 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX 2 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE0_BITMASK 0x01 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE0_SHIFT 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE1_BITMASK 0x02 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE1_SHIFT 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE2_BITMASK 0x04 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE2_SHIFT 2 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE3_BITMASK 0x08 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE3_SHIFT 3 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE4_BITMASK 0x10 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE4_SHIFT 4 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE5_BITMASK 0x20 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE5_SHIFT 5 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE6_BITMASK 0x40 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE6_SHIFT 6 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE7_BITMASK 0x80 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE7_SHIFT 7 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_VALID 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INVALID 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_TEMPINLET_INDEX 3 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_TEMPRISE_INDEX 4 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_AIRFLOW_INDEX_START 5 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_AIRFLOW_INDEX_END 6 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_DIMMPITCH_INDEX_START 7 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_DIMMPITCH_INDEX_END 8 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_INDEX 9 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_BITMASK 0x03 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_SHIFT 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_DISABLED 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_VTS_ONLY 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_SOFTWARE_MODE 2 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_EXTTS_CLTT 3 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_INDEX 10 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_BITMASK 0x01 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_SHIFT 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_INDEX 10 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_BITMASK 0x06 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_SHIFT 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_DISABLE 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_1_5C 1 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_3C 2 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_6C 3 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_INDEX 10 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_BITMASK 0x04 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_SHIFT 3 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_ASSERT_NOT_ONLY_CRITICAL 0 #define IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_ASSERT_ONLY_CRITICAL 1 #ifdef __cplusplus } #endif #endif /* IPMI_SDR_OEM_INTEL_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h0000644002055400205540000001373413527331636032652 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_OEM_INTEL_RECORD_FORMAT_H #define IPMI_SEL_OEM_INTEL_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_ID_INDEX_LSB_INDEX 10 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_ID_INDEX_MSB_INDEX 11 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_LSB_INDEX 12 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_MSB_INDEX 13 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_DEVICE_0_IN_DMI_MODE 0x3C00 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_DMI_PORT_IN_PCIE_MODE 0x3C01 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_1A 0x3C02 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_1B 0x3C03 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2A 0x3C04 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2B 0x3C05 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2C 0x3C06 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2D 0x3C07 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3A_IN_PCIE_MODE 0x3C08 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3B 0x3C09 #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3C 0x3C0A #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3D 0x3C0B #define IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_IIO_NTB_SECONDARY_ENDPOINT 0x3C0F #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_INDEX_LSB_INDEX 14 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_INDEX_MSB_INDEX 15 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVER_ERROR 0x70 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_BAD_TLP 0x71 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_BAD_DLLP 0x72 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_REPLAY_TIMEOUT 0x73 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_REPLAY_NUMBER_ROLLOVER 0x74 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_ADVISORY_NON_FATAL_ERROR 0x78 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_COR_MESSAGE_FROM_DOWNSTREAM_DEVICE 0x75 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_LINK_BANDWIDTH_CHANGED 0x76 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_UNSUPPORTED_REQUEST_COMPLETION_STATUS_FROM_DOWNSTREAM_DEVICE 0x80 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SENT_A_PCI_EXPRESS_UNSUPPORTED_REQUEST_RESPOND_ON_INBOUND_REQUEST 0x81 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_COMPLETER_ABORT_COMPLETION_STATUS_FROM_DOWNSTREAM_DEVICE 0x82 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SENT_A_PCI_EXPRESS_COMPLETER_ABORT_CONDITION_ON_INBOUND_REQUEST 0x83 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_COMPLETION_TIMEOUT_ON_NP_TRANSACTION_OUTSTANDING_ON_PCI_EXPRESS_DMI 0x84 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_PCI_EXPRESS_POISONED_TLP 0x85 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_PCI_EXPRESS_UNEXPECTED_COMPLETION 0x86 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_FLOW_CONTROL_PROTOCOL_ERROR 0x87 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_NONFATAL_MESSAGE_FROM_DOWNSTREAM_DEVICE 0x88 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_A_REQUEST_FROM_A_DOWNSTREAM_COMPONENT_THAT_IS_UNSUPPORTED 0x89 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_A_REQUEST_FROM_A_DOWNSTREAM_COMPONENT_THAT_IS_TO_BE_COMPLETER_ABORTED 0x8A #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_ACS_VIOLATION 0x8B #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_MALFORMED_TLP 0x90 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_DATA_LINK_PROTOCOL_ERROR 0x91 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_RECEIVER_OVERFLOW 0x92 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SURPRISE_DOWN 0x93 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_FATAL_MESSAGE_FROM_DOWNSTREAM_DEVICE 0x94 #define IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_OUTBOUND_SWITCH_HEADER_QUEUE_PARITY_ERROR 0x97 #ifdef __cplusplus } #endif #endif /* IPMI_SEL_OEM_INTEL_RECORD_FORMAT_H */ ipmi-sel-oem-linux-kernel-record-format.h0000644002055400205540000000175513527331636034075 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_OEM_LINUX_KERNEL_RECORD_FORMAT_H #define IPMI_SEL_OEM_LINUX_KERNEL_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_LINUX_KERNEL_PANIC 0xF0 #ifdef __cplusplus } #endif #endif /* IPMI_SEL_OEM_LINUX_KERNEL_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-cipher-suite-record-format.h0000644002055400205540000000417113527331636032014 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CIPHER_SUITE_RECORD_FORMAT_H #define IPMI_CIPHER_SUITE_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include #include /* Notes: Refer to IPMI 2.0 spec Table 22-18. */ #define IPMI_CIPHER_SUITE_TAG_BITS_AUTHENTICATION_ALGORITHM 0x0 #define IPMI_CIPHER_SUITE_TAG_BITS_INTEGRITY_ALGORITHM 0x1 #define IPMI_CIPHER_SUITE_TAG_BITS_CONFIDENTIALITY_ALGORITHM 0x2 #define IPMI_CIPHER_SUITE_TAG_BITS_RECORD 0x3 #define IPMI_CIPHER_SUITE_RECORD_FORMAT_STANDARD 0x00 #define IPMI_CIPHER_SUITE_RECORD_FORMAT_OEM 0x01 #define IPMI_CIPHER_SUITE_RECORD_FORMAT_VALID(__val) \ (((__val) == IPMI_CIPHER_SUITE_RECORD_FORMAT_STANDARD \ || (__val) == IPMI_CIPHER_SUITE_RECORD_FORMAT_OEM) ? 1 : 0) #define IPMI_CIPHER_SUITE_TAG_BITS_VALID(__val) \ (((__val) == IPMI_CIPHER_SUITE_TAG_BITS_AUTHENTICATION_ALGORITHM \ || (__val) == IPMI_CIPHER_SUITE_TAG_BITS_INTEGRITY_ALGORITHM \ || (__val) == IPMI_CIPHER_SUITE_TAG_BITS_CONFIDENTIALITY_ALGORITHM \ || (__val) == IPMI_CIPHER_SUITE_TAG_BITS_RECORD) ? 1 : 0) /* * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_cipher_suite_record_header; extern fiid_template_t tmpl_cipher_suite_record; extern fiid_template_t tmpl_oem_cipher_suite_record; #ifdef __cplusplus } #endif #endif /* IPMI_CIPHER_SUITE_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-fru-dimmspd-record-format.h0000644002055400205540000005626413527331636031654 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_DIMMSPD_RECORD_FORMAT_H #define IPMI_FRU_DIMMSPD_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include /* * see freeipmi/templates/ for template definitions */ /* From "Annex K: Serial Presence Detect (SPD) for DDR3 SDRAM Modules" * and * "Annex L: Serial Presence Detect (SPD) for DDR4 SDRAM Modules" * * Released by JEDEC */ #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_RESERVED 0x00 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_STANDARD_FPM_DRAM 0x01 /* Fast Page Mode */ #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_EDO 0x02 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_PIPELINED_NIBBLE 0x03 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_SDRAM 0x04 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_ROM 0x05 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR_SGRAM 0x06 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR_SDRAM 0x07 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM 0x08 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM_FB_DIMM 0x09 #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM_FB_DIMM_PROBE 0x0A #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR3_SDRAM 0x0B #define IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR4_SDRAM 0x0C /* From "Annex K: Serial Presence Detect (SPD) for DDR3 SDRAM Modules" * * Released by JEDEC */ #define IPMI_FRU_DIMMSPD_SPD_BYTES_USED_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_SPD_BYTES_USED_128 0x1 #define IPMI_FRU_DIMMSPD_SPD_BYTES_USED_176 0x2 #define IPMI_FRU_DIMMSPD_SPD_BYTES_USED_256 0x3 #define IPMI_FRU_DIMMSPD_SPD_BYTES_TOTAL_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_SPD_BYTES_TOTAL_256 0x1 #define IPMI_FRU_DIMMSPD_CRC_COVERAGE_0_TO_125 0x0 #define IPMI_FRU_DIMMSPD_CRC_COVERAGE_0_TO_116 0x1 /* RDIMM - Registered Dual In-Line Memory Module * LRDIMM - Load Reduction DIMM * UDIMM - Unbuffered DIMM * SO-DIMM - Unbuffered 64-bit Small Outline DIMM * Micro-DIMM - Micro DIMM * Mini-RDIMM - Mini RDIMM * Mini-UDIMM - Mini UDIMM * Mini-CDIMM - Clocked 72-bit Mini DIMM * 72b-SO-UDIMM - Unbuffered 72-bit SO-DIMM * 72b-SO-RDIMM - Registered 72-bit SO-DIMM * 72b-SO-CDIMM - Clocked 72-bit SO-DIMM * 16b-SO-DIMM - Unbuffered 16-bit SO-DIMM * 32b-SO-DIMM - Unbuffered 32-bit SO-DIMM */ #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_RDIMM 0x1 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_UDIMM 0x2 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_SO_DIMM 0x3 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_MICRO_DIMM 0x4 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_MINI_RDIMM 0x5 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_MINI_UDIMM 0x6 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_MINI_CDIMM 0x7 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_72B_SO_UDIMM 0x8 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_72B_SO_RDIMM 0x9 #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_72B_SO_CDIMM 0xA #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_LRDIMM 0xB #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_16B_SO_DIMM 0xC #define IPMI_FRU_DIMMSPD_DRAM_MODULE_TYPE_32B_SO_DIMM 0xD /* In megabits / gigabits */ #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_256_MB 0x0 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_512_MB 0x1 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_1_GB 0x2 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_2_GB 0x3 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_4_GB 0x4 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_8_GB 0x5 #define IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_16_GB 0x6 #define IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_3 0x0 /* 8 banks */ #define IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_4 0x1 /* 16 banks */ #define IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_5 0x2 /* 32 banks */ #define IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_6 0x3 /* 64 banks */ #define IPMI_FRU_DIMMSPD_COLUMN_ADDRESS_BITS_9 0x0 #define IPMI_FRU_DIMMSPD_COLUMN_ADDRESS_BITS_10 0x1 #define IPMI_FRU_DIMMSPD_COLUMN_ADDRESS_BITS_11 0x2 #define IPMI_FRU_DIMMSPD_COLUMN_ADDRESS_BITS_12 0x3 #define IPMI_FRU_DIMMSPD_ROW_ADDRESS_BITS_12 0x0 #define IPMI_FRU_DIMMSPD_ROW_ADDRESS_BITS_13 0x1 #define IPMI_FRU_DIMMSPD_ROW_ADDRESS_BITS_14 0x2 #define IPMI_FRU_DIMMSPD_ROW_ADDRESS_BITS_15 0x3 #define IPMI_FRU_DIMMSPD_ROW_ADDRESS_BITS_16 0x4 /* Yes, flags are opposite of normal logic for 1.5V */ #define IPMI_FRU_DIMMSPD_VOLTAGE_1_5_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_VOLTAGE_1_5_NOT_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_VOLTAGE_1_35_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_VOLTAGE_1_35_NOT_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_VOLTAGE_1_25_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_VOLTAGE_1_25_NOT_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_DEVICE_WIDTH_4_BITS 0x0 #define IPMI_FRU_DIMMSPD_DEVICE_WIDTH_8_BITS 0x1 #define IPMI_FRU_DIMMSPD_DEVICE_WIDTH_16_BITS 0x2 #define IPMI_FRU_DIMMSPD_DEVICE_WIDTH_32_BITS 0x3 #define IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_1 0x0 #define IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_2 0x1 #define IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_3 0x2 #define IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_4 0x3 #define IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_8_BITS 0x0 #define IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_16_BITS 0x1 #define IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_32_BITS 0x2 #define IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_64_BITS 0x3 #define IPMI_FRU_DIMMSPD_BUS_WIDTH_EXTENSION_0_BITS 0x0 #define IPMI_FRU_DIMMSPD_BUS_WIDTH_EXTENSION_8_BITS 0x1 #define IPMI_FRU_DIMMSPD_CAS_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_CAS_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_RZQ_6_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_RZQ_6_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_RZQ_7_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_RZQ_7_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_DLL_OFF_MODE_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_DLL_OFF_MODE_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_EXTENDED_TEMPERATURE_RANGE_NORMAL_RANGE 0x0 /* 0-85 C */ #define IPMI_FRU_DIMMSPD_EXTENDED_TEMPERATURE_RANGE_NORMAL_AND_EXTENDED_RANGE 0x1 /* 0-95 C */ #define IPMI_FRU_DIMMSPD_EXTENDED_TEMPERATURE_RANGE_REFRESH_RATE_2X 0x0 #define IPMI_FRU_DIMMSPD_EXTENDED_TEMPERATURE_RANGE_REFRESH_RATE_1X 0x1 #define IPMI_FRU_DIMMSPD_AUTO_SELF_REFRESH_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_AUTO_SELF_REFRESH_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_ON_DIE_THERMAL_SENSOR_READOUT_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_ON_DIE_THERMAL_SENSOR_READOUT_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_PARTIAL_ARRAY_SELF_REFRESH_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_PARTIAL_ARRAY_SELF_REFRESH_SUPPORTED 0x1 #define IPMI_FRU_DIMMSPD_THERMAL_SENSOR_NOT_INCORPORATED 0x0 #define IPMI_FRU_DIMMSPD_THERMAL_SENSOR_INCORPORATED 0x1 #define IPMI_FRU_DIMMSPD_SIGNAL_LOADING_NOT_SPECIFIED 0x0 #define IPMI_FRU_DIMMSPD_SIGNAL_LOADING_MULTI_LOAD_STACK 0x1 #define IPMI_FRU_DIMMSPD_SIGNAL_LOADING_SINGLE_LOAD_STACK 0x2 #define IPMI_FRU_DIMMSPD_SIGNAL_LOADING_RESERVED 0x3 #define IPMI_FRU_DIMMSPD_DIE_COUNT_NOT_SPECIFIED 0x0 #define IPMI_FRU_DIMMSPD_DIE_COUNT_SINGLE_DIE 0x1 #define IPMI_FRU_DIMMSPD_DIE_COUNT_2_DIE 0x2 #define IPMI_FRU_DIMMSPD_DIE_COUNT_4_DIE 0x3 #define IPMI_FRU_DIMMSPD_DIE_COUNT_8_DIE 0x4 #define IPMI_FRU_DIMMSPD_SDRAM_DEVICE_TYPE_STANDARD_MONOLITHIC_DRAM_DEVICE 0x0 #define IPMI_FRU_DIMMSPD_SDRAM_DEVICE_TYPE_NON_STANDARD_DEVICE 0x1 /* From "Annex L: Serial Presence Detect (SPD) for DDR4 SDRAM Modules" * * Released by JEDEC */ #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_USED_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_USED_128 0x1 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_USED_256 0x2 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_USED_384 0x3 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_USED_512 0x4 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_TOTAL_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_TOTAL_256 0x1 #define IPMI_FRU_DIMMSPD_DDR4_SPD_BYTES_TOTAL_512 0x2 /* RDIMM - Registered Dual In-Line Memory Module * UDIMM - Unbuffered Dual In-Line Memory Module * SO-DIMM - Unbuffered Small Outline Dual In-Line Memory Module, 64-bit data bus * LRDIMM - Load Reduced Dual In-Line Memory Module * Mini-RDIMM - Mini RDIMM * Mini-UDIMM - Mini UDIMM * 72b-SO-RDIMM - Small Outline Registered DIMM, 72-bit data bus * 72b-SO-UDIMM - Small Outline Unbuffered DIMM, 72-bit data bus * 16b-SO-DIMM - Small Outline Unbuffered DIMM, 16-bit data bus * 32b-SO-DIMM - Small Outline Unbuffered DIMM, 32-bit data bus */ #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_EXTENDED_MODULE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_RDIMM 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_UDIMM 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_SO_DIMM 0x3 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_LR_DIMM 0x4 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_MINI_RDIMM 0x5 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_MINI_UDIMM 0x6 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_72B_SO_RDIMM 0x8 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_72B_SO_UDIMM 0x9 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_16B_SO_DIMM 0xC #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_32B_SO_DIMM 0xD #define IPMI_FRU_DIMMSPD_DDR4_DRAM_MODULE_TYPE_NO_BASE_MEMORY_PRESENT 0xF /* In megabits / gigabits */ #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_256_MB 0x0 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_512_MB 0x1 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_1_GB 0x2 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_2_GB 0x3 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_4_GB 0x4 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_8_GB 0x5 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_16_GB 0x6 #define IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_32_GB 0x7 #define IPMI_FRU_DIMMSPD_DDR4_BANK_ADDRESS_BITS_2 0x0 /* 4 banks */ #define IPMI_FRU_DIMMSPD_DDR4_BANK_ADDRESS_BITS_3 0x1 /* 8 banks */ #define IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_0 0x0 /* no bank groups */ #define IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_1 0x1 /* 2 bank groups */ #define IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_2 0x2 /* 4 bank groups */ #define IPMI_FRU_DIMMSPD_DDR4_COLUMN_ADDRESS_BITS_9 0x0 #define IPMI_FRU_DIMMSPD_DDR4_COLUMN_ADDRESS_BITS_10 0x1 #define IPMI_FRU_DIMMSPD_DDR4_COLUMN_ADDRESS_BITS_11 0x2 #define IPMI_FRU_DIMMSPD_DDR4_COLUMN_ADDRESS_BITS_12 0x3 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_12 0x0 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_13 0x1 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_14 0x2 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_15 0x3 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_16 0x4 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_17 0x5 #define IPMI_FRU_DIMMSPD_DDR4_ROW_ADDRESS_BITS_18 0x6 #define IPMI_FRU_DIMMSPD_DDR4_SIGNAL_LOADING_NOT_SPECIFIED 0x00 #define IPMI_FRU_DIMMSPD_DDR4_SIGNAL_LOADING_MULTI_LOAD_STACK 0x01 #define IPMI_FRU_DIMMSPD_DDR4_SIGNAL_LOADING_SINGLE_LOAD_STACK 0x02 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_SINGLE_DIE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_2_DIE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_3_DIE 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_4_DIE 0x3 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_5_DIE 0x4 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_6_DIE 0x5 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_7_DIE 0x6 #define IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_8_DIE 0x7 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_PACKAGE_TYPE_MONOLITHIC_DRAM_DEVICE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_PACKAGE_TYPE_NON_MONOLITHIC_DRAM_DEVICE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_UNTESTED_MAC 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_700_K 0x1 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_600_K 0x2 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_500_K 0x3 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_400_K 0x4 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_300_K 0x5 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_200_K 0x6 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_COUNT_UNLIMITED_MAC 0x7 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_WINDOW_8192xtREFI 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_WINDOW_4096xtREFI 0x1 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_MAXIMUM_ACTIVATE_WINDOW_2048xtREFI 0x2 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_POST_PACKAGE_REPAIR_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_SDRAM_POST_PACKAGE_REPAIR_SUPPORTED_ONE_ROW_PER_BANK_GROUP 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_1_2_NOT_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_1_2_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_1_2_NOT_ENDURANT 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_1_2_ENDURANT 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD1_NOT_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD1_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD1_NOT_ENDURANT 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD1_ENDURANT 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD2_NOT_OPERABLE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD2_OPERABLE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD2_NOT_ENDURANT 0x0 #define IPMI_FRU_DIMMSPD_DDR4_VDD_TBD2_ENDURANT 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_4_BITS 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_8_BITS 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_16_BITS 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_32_BITS 0x3 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_1 0x0 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_2 0x1 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_3 0x2 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_4 0x3 #define IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_8_BITS 0x0 #define IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_16_BITS 0x1 #define IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_32_BITS 0x2 #define IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_64_BITS 0x3 #define IPMI_FRU_DIMMSPD_DDR4_BUS_WIDTH_EXTENSION_0_BITS 0x0 #define IPMI_FRU_DIMMSPD_DDR4_BUS_WIDTH_EXTENSION_8_BITS 0x1 #define IPMI_FRU_DIMMSPD_DDR4_THERMAL_SENSOR_NOT_INCORPORATED_ONTO_THIS_ASSEMBLY 0x0 #define IPMI_FRU_DIMMSPD_DDR4_THERMAL_SENSOR_INCORPORATED_ONTO_THIS_ASSEMBLY 0x1 #define IPMI_FRU_DIMMSPD_DDR4_CAS_NOT_SUPPORTED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_CAS_SUPPORTED 0x1 /* For unbuffered memory modules & registered memory modules & load reduction memory modules */ /* in mm */ #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_HEIGHT_LT_15 0x00 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_15_TO_16 0x01 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_16_TO_17 0x02 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_17_TO_18 0x03 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_18_TO_19 0x04 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_19_TO_20 0x05 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_20_TO_21 0x06 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_21_TO_22 0x07 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_22_TO_23 0x08 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_23_TO_24 0x09 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_24_TO_25 0x0A #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_25_TO_26 0x0B #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_26_TO_27 0x0C #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_27_TO_28 0x0D #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_28_TO_39 0x0E #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_29_TO_30 0x0F #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_30_TO_31 0x10 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_31_TO_32 0x11 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_32_TO_33 0x12 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_33_TO_34 0x13 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_34_TO_35 0x14 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_35_TO_36 0x15 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_36_TO_37 0x16 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_37_TO_38 0x17 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_38_TO_39 0x18 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_39_TO_40 0x19 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_40_TO_41 0x1A #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_41_TO_42 0x1B #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_42_TO_43 0x1C #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_43_TO_44 0x1D #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_44_TO_45 0x1E #define IPMI_FRU_DIMMSPD_DDR4_MODULE_NOMINAL_HEIGHT_MAX_45_GT_HEIGHT 0x1F #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_0_TO_3 0x0 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_4 0x1 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_5 0x2 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_6 0x3 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_7 0x4 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_8 0x5 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_9 0x6 #define IPMI_FRU_DIMMSPD_DDR4_RAW_CARD_REVISIONS_10 0x7 /* in mm */ #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_THICKNESS_LT_1 0x0 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_1_TO_2 0x1 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_2_TO_3 0x2 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_3_TO_4 0x3 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_4_TO_5 0x4 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_5_TO_6 0x5 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_6_TO_7 0x6 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_7_TO_8 0x7 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_8_TO_9 0x8 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_9_TO_10 0x9 #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_10_TO_11 0xA #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_11_TO_12 0xB #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_12_TO_13 0xC #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_13_TO_14 0xD #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_14_TO_15 0xE #define IPMI_FRU_DIMMSPD_DDR4_MODULE_MAXIMUM_THICKNESS_15_GT_THICKNESS 0xF #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_EXTENSION_A_THROUGH_AL 0x0 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_EXTENSION_AM_THROUGH_B 0x1 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_REVISION_0 0x0 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_REVISION_1 0x1 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_REVISION_2 0x2 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_REVISION_3 0x3 #define IPMI_FRU_DIMMSPD_DDR4_REFERENCE_RAW_CARD_NO_JEDEC_REFERENCE_RAW_CARD_DESIGN_USED 0x1F #define IPMI_FRU_DIMMSPD_DDR4_RANK_1_MAPPING_STANDARD 0x0 #define IPMI_FRU_DIMMSPD_DDR4_RANK_1_MAPPING_MIRRORED 0x1 /* For registered memory modules & load reduction memory modules */ #define IPMI_FRU_DIMMSPD_DDR4_HEAT_SPREADER_SOLUTION_NOT_INCORPORATED_INTO_THIS_ASSEMBLY 0x0 #define IPMI_FRU_DIMMSPD_DDR4_HEAT_SPREADER_SOLUTION_INCORPORATED_INTO_THIS_ASSEMBLY 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRIVE_STRENGTH_LIGHT_DRIVE 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRIVE_STRENGTH_MODERATE_DRIVE 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRIVE_STRENGTH_STRONG_DRIVE 0x2 /* For registered memory modules */ #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_RDIMM_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_RDIMM_1_REGISTER 0x1 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_RDIMM_2_REGISTERS 0x2 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_RDIMM_4_REGISTERS 0x3 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_RDIMM_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_RDIMM_1_ROW 0x1 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_RDIMM_2_ROWS 0x2 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_RDIMM_4_ROWS 0x3 #define IPMI_FRU_DIMMSPD_DDR4_HEAT_SPREADER_THERMAL_CHARACTERISTICS_UNDEFINED 0x0 /* For load reduction memory modules */ #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_LRDIMM_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_REGISTERS_USED_ON_LRDIMM_1_REGISTER 0x1 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_LRDIMM_UNDEFINED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_LRDIMM_1_ROW 0x1 #define IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_ROWS_OF_DRAMS_ON_LRDIMM_2_ROWS 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_DISABLED 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ4 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ2 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ6 0x3 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ 0x4 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ5 0x5 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ3 0x6 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_READ_TERMINATION_STRENGTH_RZQ7 0x7 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_DRIVE_STRENGTH_RZQ6 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_DRIVE_STRENGTH_RZQ7 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_DRIVE_STRENGTH_RZQ5 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_INTERFACE_MDQ_DRIVE_STRENGTH_RZQ4 0x5 /* not a typo, jumps to 5 */ #define IPMI_FRU_DIMMSPD_DDR4_DRAM_DRIVE_STRENGTH_RZQ7 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_DRIVE_STRENGTH_RZQ5 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_ODT_STRENGTH_DYNAMIC_ODT_OFF 0x0 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_ODT_STRENGTH_RZQ2 0x1 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_ODT_STRENGTH_RZQ 0x2 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_ODT_STRENGTH_HI_IMPEDANCE 0x3 #define IPMI_FRU_DIMMSPD_DDR4_DRAM_ODT_STRENGTH_RZQ3 0x4 extern fiid_template_t tmpl_fru_dimm_spd_ddr_header; extern fiid_template_t tmpl_fru_dimm_spd_ddr3_record; extern fiid_template_t tmpl_fru_dimm_spd_ddr4_record; extern fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_unbuffered_memory_module; extern fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_registered_memory_module; extern fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_load_reduction_memory_module; #ifdef __cplusplus } #endif #endif /* IPMI_FRU_DIMMSPD_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h0000644002055400205540000001574413527331636032542 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_INFORMATION_RECORD_FORMAT_H #define IPMI_FRU_INFORMATION_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include /* * achu: * * Not in IPMI spec. In "Platform Management FRU Information Storage * Definition" document. */ #define IPMI_FRU_COMMON_HEADER_FORMAT_VERSION 0x01 #define IPMI_FRU_CHASSIS_INFO_AREA_FORMAT_VERSION 0x01 #define IPMI_FRU_BOARD_INFO_AREA_FORMAT_VERSION 0x01 #define IPMI_FRU_PRODUCT_INFO_AREA_FORMAT_VERSION 0x01 #define IPMI_FRU_MULTIRECORD_AREA_FORMAT_VERSION 0x02 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_POWER_SUPPLY_INFORMATION 0x00 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_DC_OUTPUT 0x01 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_DC_LOAD 0x02 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_MANAGEMENT_ACCESS_RECORD 0x03 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_BASE_COMPATIBILITY_RECORD 0x04 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_COMPATIBILITY_RECORD 0x05 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_FIXED_SMBUS_DEVICE_RECORD 0x06 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_LEGACY_DEVICE_ALERTS 0x07 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_REMOTE_CONTROL 0x08 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_DC_OUTPUT 0x09 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_DC_LOAD 0x0A #define IPMI_FRU_MULTIRECORD_AREA_TYPE_NVM_EXPRESS_MIN 0x0B #define IPMI_FRU_MULTIRECORD_AREA_TYPE_NVM_EXPRESS_MAX 0x0F #define IPMI_FRU_MULTIRECORD_AREA_TYPE_OEM_MIN 0xC0 #define IPMI_FRU_MULTIRECORD_AREA_TYPE_OEM_MAX 0xFF #define IPMI_FRU_MULTIRECORD_AREA_TYPE_VALID(__multirecord_area_type) \ (((__multirecord_area_type) >= IPMI_FRU_MULTIRECORD_AREA_TYPE_POWER_SUPPLY_INFORMATION \ && (__multirecord_area_type) <= IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_DC_LOAD) ? 1 : 0) #define IPMI_FRU_MULTIRECORD_AREA_TYPE_IS_NVM_EXPRESS(__multirecord_area_type) \ (((__multirecord_area_type) >= IPMI_FRU_MULTIRECORD_AREA_TYPE_NVM_EXPRESS_MIN \ && (__multirecord_area_type) <= IPMI_FRU_MULTIRECORD_AREA_TYPE_NVM_EXPRESS_MAX) ? 1 : 0) #define IPMI_FRU_MULTIRECORD_AREA_TYPE_IS_OEM(__multirecord_area_type) \ (((__multirecord_area_type) >= IPMI_FRU_MULTIRECORD_AREA_TYPE_OEM_MIN \ && (__multirecord_area_type) <= IPMI_FRU_MULTIRECORD_AREA_TYPE_OEM_MAX) ? 1 : 0) #define IPMI_FRU_MFG_DATE_TIME_UNSPECIFIED 0x000000 #define IPMI_FRU_ONE_PULSE_PER_ROTATION 0x0 #define IPMI_FRU_TWO_PULSES_PER_ROTATION 0x1 #define IPMI_FRU_PEAK_CAPACITY_UNSPECIFIED 0xFFF #define IPMI_FRU_VOLTAGE_12V 0x0 #define IPMI_FRU_VOLTAGE_MINUS12V 0x1 #define IPMI_FRU_VOLTAGE_5V 0x2 #define IPMI_FRU_VOLTAGE_3_3V 0x3 #define IPMI_FRU_PREDICTIVE_FAIL_PIN_IS_PASS_FAIL 0x0 #define IPMI_FRU_CURRENT_UNITS_10MA 0x0 #define IPMI_FRU_CURRENT_UNITS_100MA 0x1 #define IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_MANAGEMENT_URL 0x01 #define IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_NAME 0x02 #define IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_PING_ADDRESS 0x03 #define IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_MANAGEMENT_URL 0x04 #define IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_NAME 0x05 #define IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_PING_ADDRESS 0x06 #define IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_UNIQUE_ID 0x07 #define IPMI_FRU_SUB_RECORD_TYPE_VALID(__sub_record_type) \ (((__sub_record_type) >= IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_MANAGEMENT_URL \ && (__sub_record_type) <= IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_UNIQUE_ID) ? 1 : 0) #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_BINARY 0x00 #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_BCD 0x01 #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SIXBIT_ASCII 0x02 #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_LANGUAGE_CODE 0x03 #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_MASK 0xC0 #define IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SHIFT 0x06 #define IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK 0x3F #define IPMI_FRU_BCD_DIGIT_MIN 0x0 #define IPMI_FRU_BCD_DIGIT_MAX 0x9 #define IPMI_FRU_BCD_SPACE 0xA #define IPMI_FRU_BCD_DASH 0xB #define IPMI_FRU_BCD_PERIOD 0xC #define IPMI_FRU_SENTINEL_VALUE 0xC1 /* * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_fru_common_header; extern fiid_template_t tmpl_fru_info_area_header; extern fiid_template_t tmpl_fru_multirecord_area_header; extern fiid_template_t tmpl_fru_power_supply_information; extern fiid_template_t tmpl_fru_dc_output; extern fiid_template_t tmpl_fru_dc_load; extern fiid_template_t tmpl_fru_management_access_record; extern fiid_template_t tmpl_fru_base_compatibility_record; extern fiid_template_t tmpl_fru_extended_compatibility_record; extern fiid_template_t tmpl_fru_extended_dc_output; extern fiid_template_t tmpl_fru_extended_dc_load; extern fiid_template_t tmpl_fru_oem_record; #ifdef __cplusplus } #endif #endif /* IPMI_FRU_INFORMATION_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-fru-oem-record-format.h0000644002055400205540000000201113527331636030754 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_OEM_RECORD_FORMAT_H #define IPMI_FRU_OEM_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-fru-oem-record-format.h header file is deprecated #include #ifdef __cplusplus } #endif #endif /* IPMI_FRU_OEM_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-platform-event-trap-record-format.h0000644002055400205540000001267513527331636033332 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PLATFORM_EVENT_TRAP_RECORD_FORMAT_H #define IPMI_PLATFORM_EVENT_TRAP_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include /* * achu: * * Not in IPMI spec. In "Platform Event Trap Specification" document. */ #define IPMI_PLATFORM_EVENT_TRAP_MIN_VARIABLE_BINDINGS_LENGTH 47 #define IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH 110 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_SENSOR_TYPE_MASK 0x00FF0000 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_SENSOR_TYPE_SHIFT 16 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_TYPE_MASK 0x0000FF00 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_TYPE_SHIFT 8 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_DIRECTION_MASK 0x00000080 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_DIRECTION_SHIFT 7 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_MASK 0x0000000F #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_SHIFT 0 #define IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_UNSPECIFIED 0x0F #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_GUID_INDEX_START 0 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_GUID_INDEX_END 15 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_START 16 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_END 17 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_COOKIE_INDEX_START IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_START #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_COOKIE_INDEX_END IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_END #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_START 18 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_END 21 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_UNSPECIFIED 0x0000 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_INDEX_START 22 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_INDEX_END 23 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_UNSPECIFIED 0xFFFF #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_TRAP_SOURCE_TYPE_INDEX 24 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_TRAP_SOURCE_UNSPECIFIED 0xFF #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SOURCE_TYPE_INDEX 25 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SOURCE_UNSPECIFIED 0xFF #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_INDEX 26 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_UNSPECIFIED 0x00 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_MONITOR 0x01 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_INFORMATION 0x02 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_OK 0x04 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_NON_CRITICAL_CONDITION 0x08 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_CRITICAL_CONDITION 0x10 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION 0x20 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_DEVICE_INDEX 27 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_DEVICE_UNSPECIFIED 0xFF #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_NUMBER_INDEX 28 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_NUMBER_UNSPECIFIED_A 0x00 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_NUMBER_UNSPECIFIED_B 0xFF #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INDEX 29 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_UNSPECIFIED 0x00 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INSTANCE_INDEX 30 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INSTANCE_UNSPECIFIED 0x00 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_INDEX_START 31 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_INDEX_END 38 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_LENGTH 8 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LANGUAGE_CODE_INDEX 39 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_START 40 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_END 43 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SYSTEM_ID_INDEX_START 44 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SYSTEM_ID_INDEX_END 45 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_INDEX_START 46 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_INDEX_END 109 #define IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_LENGTH 64 #ifdef __cplusplus } #endif #endif /* IPMI_PLATFORM_EVENT_TRAP_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-sdr-record-format.h0000644002055400205540000002516713527331636030213 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_RECORD_FORMAT_H #define IPMI_SDR_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_SDR_FORMAT_FULL_SENSOR_RECORD 0x01 #define IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD 0x02 #define IPMI_SDR_FORMAT_EVENT_ONLY_RECORD 0x03 #define IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD 0x08 #define IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD 0x09 #define IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD 0x10 #define IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD 0x11 #define IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD 0x12 #define IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD 0x13 #define IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD 0x14 #define IPMI_SDR_FORMAT_OEM_RECORD 0xC0 #define IPMI_SDR_FORMAT_TYPE_VALID(__val) \ (((__val) == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD \ || (__val) == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD \ || (__val) == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD \ || (__val) == IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD \ || (__val) == IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD \ || (__val) == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD \ || (__val) == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD \ || (__val) == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD \ || (__val) == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD \ || (__val) == IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD \ || (__val) == IPMI_SDR_FORMAT_OEM_RECORD) ? 1 : 0) #define IPMI_SDR_SENSOR_OWNER_ID_TYPE_IPMB_SLAVE_ADDRESS 0x0 #define IPMI_SDR_SENSOR_OWNER_ID_TYPE_SYSTEM_SOFTWARE_ID 0x1 #define IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED 0x0 #define IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT 0x1 #define IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT 0x2 #define IPMI_SDR_ANALOG_DATA_FORMAT_NOT_ANALOG 0x3 #define IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED_STRING "unsigned" #define IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT_STRING "1's complement (signed)" #define IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT_STRING "2's complement (signed)" #define IPMI_SDR_ANALOG_DATA_FORMAT_NOT_ANALOG_STRING "Does not return analog (numeric) reading" #define IPMI_SDR_ANALOG_DATA_FORMAT_VALID(__val) \ (((__val) == IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED \ || (__val) == IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT \ || (__val) == IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT) ? 1 : 0) #define IPMI_SDR_MODIFIER_UNIT_NONE 0 #define IPMI_SDR_MODIFIER_UNIT_DIVIDE 1 #define IPMI_SDR_MODIFIER_UNIT_MULTIPLY 2 #define IPMI_SDR_MODIFIER_UNIT_VALID(__sensor_modifier_unit) \ (((__sensor_modifier_unit) == IPMI_SDR_MODIFIER_UNIT_NONE \ || (__sensor_modifier_unit) == IPMI_SDR_MODIFIER_UNIT_DIVIDE \ || (__sensor_modifier_unit) == IPMI_SDR_MODIFIER_UNIT_MULTIPLY) ? 1 : 0) #define IPMI_SDR_LINEARIZATION_LINEAR 0 #define IPMI_SDR_LINEARIZATION_LN 1 #define IPMI_SDR_LINEARIZATION_LOG10 2 #define IPMI_SDR_LINEARIZATION_LOG2 3 #define IPMI_SDR_LINEARIZATION_E 4 #define IPMI_SDR_LINEARIZATION_EXP10 5 #define IPMI_SDR_LINEARIZATION_EXP2 6 #define IPMI_SDR_LINEARIZATION_INVERSE 7 #define IPMI_SDR_LINEARIZATION_SQR 8 #define IPMI_SDR_LINEARIZATION_CUBE 9 #define IPMI_SDR_LINEARIZATION_SQRT 10 #define IPMI_SDR_LINEARIZATION_CUBERT 11 #define IPMI_SDR_LINEARIZATION_NON_LINEAR 0x70 #define IPMI_SDR_LINEARIZATION_NON_LINEAR_OEM_MIN 0x71 #define IPMI_SDR_LINEARIZATION_NON_LINEAR_OEM_MAX 0x7F #define IPMI_SDR_LINEARIZATION_LINEAR_STRING "linear" #define IPMI_SDR_LINEARIZATION_LN_STRING "ln" #define IPMI_SDR_LINEARIZATION_LOG10_STRING "log10" #define IPMI_SDR_LINEARIZATION_LOG2_STRING "log2" #define IPMI_SDR_LINEARIZATION_E_STRING "e" #define IPMI_SDR_LINEARIZATION_EXP10_STRING "exp10" #define IPMI_SDR_LINEARIZATION_EXP2_STRING "exp2" #define IPMI_SDR_LINEARIZATION_INVERSE_STRING "1/x" #define IPMI_SDR_LINEARIZATION_SQR_STRING "sqr(x)" #define IPMI_SDR_LINEARIZATION_CUBE_STRING "cube(x)" #define IPMI_SDR_LINEARIZATION_SQRT_STRING "sqrt(x)" #define IPMI_SDR_LINEARIZATION_CUBERT_STRING "cube^-1(x)" #define IPMI_SDR_LINEARIZATION_NON_LINEAR_STRING "non-linear" /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SDR_LINEARIZATION_IS_LINEAR(__sensor_linearization) \ ((((__sensor_linearization) + 1) >= IPMI_SDR_LINEARIZATION_LN \ && (__sensor_linearization) <= IPMI_SDR_LINEARIZATION_CUBERT) ? 1 : 0) #define IPMI_SDR_LINEARIZATION_IS_NON_LINEAR(__sensor_linearization) \ (((__sensor_linearization) >= IPMI_SDR_LINEARIZATION_NON_LINEAR \ && (__sensor_linearization) <=IPMI_SDR_LINEARIZATION_NON_LINEAR_OEM_MAX) ? 1 : 0) #define IPMI_SDR_PERCENTAGE_NO 0 #define IPMI_SDR_PERCENTAGE_YES 1 #define IPMI_SDR_PERCENTAGE_VALID(__val) \ (((__val) == IPMI_SDR_PERCENTAGE_NO \ || (__val) == IPMI_SDR_PERCENTAGE_YES) ? 1 : 0) #define IPMI_SDR_PHYSICAL_ENTITY 0x0 #define IPMI_SDR_LOGICAL_CONTAINER_ENTITY 0x1 #define IPMI_SDR_SENSOR_SCANNING_ENABLED 0x1 #define IPMI_SDR_SENSOR_SCANNING_DISABLED 0x0 #define IPMI_SDR_EVENT_GENERATION_ENABLED 0x1 #define IPMI_SDR_EVENT_GENERATION_DISABLED 0x0 #define IPMI_SDR_SENSOR_AUTO_REARM_SUPPORT_MANUAL 0x0 #define IPMI_SDR_SENSOR_AUTO_REARM_SUPPORT_AUTO 0x1 #define IPMI_SDR_PER_EVENT_ENABLE_DISABLE_SUPPORT 0x0 #define IPMI_SDR_ENTIRE_SENSOR_ONLY 0x1 #define IPMI_SDR_GLOBAL_DISABLE_ONLY 0x2 #define IPMI_SDR_NO_EVENTS_FROM_SENSOR 0x3 #define IPMI_SDR_NO_THRESHOLDS_SUPPORT 0x0 #define IPMI_SDR_READABLE_THRESHOLDS_SUPPORT 0x1 #define IPMI_SDR_READABLE_SETTABLE_THRESHOLDS_SUPPORT 0x2 #define IPMI_SDR_FIXED_UNREADABLE_THRESHOLDS_SUPPORT 0x3 #define IPMI_SDR_NO_HYSTERESIS_SUPPORT 0x0 #define IPMI_SDR_READABLE_HYSTERESIS_SUPPORT 0x1 #define IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT 0x2 #define IPMI_SDR_FIXED_UNREADABLE_HYSTERESIS_SUPPORT 0x3 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NOMINAL_READING_SPECIFIED 0x1 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NOMINAL_READING_UNSPECIFIED 0x0 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NORMAL_MAX_SPECIFIED 0x1 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NORMAL_MAX_UNSPECIFIED 0x0 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NORMAL_MIN_SPECIFIED 0x1 #define IPMI_SDR_ANALOG_CHARACTERISTICS_NORMAL_MIN_UNSPECIFIED 0x0 #define IPMI_SDR_ID_STRING_INSTANCE_MODIFIER_TYPE_NUMERIC 0x0 #define IPMI_SDR_ID_STRING_INSTANCE_MODIFIER_TYPE_ALPHA 0x1 #define IPMI_SDR_SENSOR_DIRECTION_UNSPECIFIED 0x0 #define IPMI_SDR_SENSOR_DIRECTION_INPUT 0x1 #define IPMI_SDR_SENSOR_DIRECTION_OUTPUT 0x2 #define IPMI_SDR_SENSOR_DIRECTION_RESERVED 0x3 #define IPMI_SDR_ENTITY_INSTANCE_SAME_FOR_ALL_SHARED_RECORDS 0x0 #define IPMI_SDR_ENTITY_INSTANCE_INCREMENTS_FOR_EACH_SHARED_RECORD 0x1 #define IPMI_SDR_RECORD_NO_LINKED_ENTITY_ASSOCIATION_RECORDS_EXIST 0x0 #define IPMI_SDR_RECORD_LINKED_ENTITY_ASSOCIATION_RECORDS_EXIST 0x1 #define IPMI_SDR_CONTAINED_ENTITY_SPECIFIED_AS_LIST 0x0 #define IPMI_SDR_CONTAINED_ENTITY_SPECIFIED_AS_RANGE 0x1 #define IPMI_SDR_DEVICE_IS_NOT_A_LOGICAL_FRU_DEVICE 0x0 #define IPMI_SDR_DEVICE_IS_LOGICAL_FRU_DEVICE 0x1 #define IPMI_SDR_EVENT_MESSAGE_GENERATION_FROM_CONTROLLER_ENABLE 0x0 #define IPMI_SDR_EVENT_MESSAGE_GENERATION_FROM_CONTROLLER_DISABLE 0x1 #define IPMI_SDR_EVENT_MESSAGE_GENERATION_DO_NOT_INITIALIZE_CONTROLLER 0x2 #define IPMI_SDR_EVENT_MESSAGE_GENERATION_RESERVED 0x3 #define IPMI_SDR_LOG_INITIALIZATION_AGENT_ERRORS_ENABLE 0x0 #define IPMI_SDR_LOG_INITIALIZATION_AGENT_ERRORS_DISABLE 0x1 #define IPMI_SDR_CONTROLLER_LOGS_INITIALIZATION_AGENT_ERRORS_ENABLE 0x0 #define IPMI_SDR_CONTROLLER_LOGS_INITIALIZATION_AGENT_ERRORS_DISABLE 0x1 #define IPMI_SDR_CONTROLLER_DYNAMIC 0x0 #define IPMI_SDR_CONTROLLER_STATIC 0x1 #define IPMI_SDR_ACPI_DEVICE_POWER_STATE_NOTIFICATION_REQUIRED 0x0 #define IPMI_SDR_NO_ACPI_DEVICE_POWER_STATE_NOTIFICATION_REQUIRED 0x1 #define IPMI_SDR_ACPI_SYSTEM_POWER_STATE_NOTIFICATION_REQUIRED 0x0 #define IPMI_SDR_NO_ACPI_SYSTEM_POWER_STATE_NOTIFICATION_REQUIRED 0x1 #define IPMI_SDR_MAX_ID_STRING_LENGTH 16 #define IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH 16 /* * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_sdr_record_header; extern fiid_template_t tmpl_sdr_full_sensor_record; extern fiid_template_t tmpl_sdr_full_sensor_record_non_threshold_based_sensors; extern fiid_template_t tmpl_sdr_full_sensor_record_threshold_based_sensors; extern fiid_template_t tmpl_sdr_compact_sensor_record; extern fiid_template_t tmpl_sdr_compact_sensor_record_non_threshold_based_sensors; extern fiid_template_t tmpl_sdr_compact_sensor_record_threshold_based_sensors; extern fiid_template_t tmpl_sdr_event_only_record; extern fiid_template_t tmpl_sdr_entity_association_record; extern fiid_template_t tmpl_sdr_device_relative_entity_association_record; extern fiid_template_t tmpl_sdr_generic_device_locator_record; extern fiid_template_t tmpl_sdr_fru_device_locator_record; extern fiid_template_t tmpl_sdr_fru_device_locator_record_non_intelligent; extern fiid_template_t tmpl_sdr_management_controller_device_locator_record; extern fiid_template_t tmpl_sdr_management_controller_confirmation_record; extern fiid_template_t tmpl_sdr_bmc_message_channel_info_record; extern fiid_template_t tmpl_sdr_oem_record; #ifdef __cplusplus } #endif #endif /* IPMI_SDR_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-sdr-oem-record-format.h0000644002055400205540000000213513527331636030757 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_OEM_RECORD_FORMAT_H #define IPMI_SDR_OEM_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-sdr-oem-record-format.h header file is deprecated #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SDR_OEM_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-sel-record-format.h0000644002055400205540000000712713527331636030202 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_RECORD_FORMAT_H #define IPMI_SEL_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_V1_0_EVENT_MESSAGE_FORMAT 0x03 #define IPMI_V1_5_EVENT_MESSAGE_FORMAT 0x04 #define IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD 0x02 #define IPMI_SEL_RECORD_TYPE_TIMESTAMPED_OEM_MIN 0xC0 #define IPMI_SEL_RECORD_TYPE_TIMESTAMPED_OEM_MAX 0xDF #define IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_MIN 0xE0 #define IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_MAX 0xFF #define IPMI_SEL_RECORD_TYPE_IS_EVENT(__record_type) \ (((__record_type) == IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD) ? 1 : 0) #define IPMI_SEL_RECORD_TYPE_IS_TIMESTAMPED_OEM(__record_type) \ (((__record_type) >= IPMI_SEL_RECORD_TYPE_TIMESTAMPED_OEM_MIN \ && (__record_type) <= IPMI_SEL_RECORD_TYPE_TIMESTAMPED_OEM_MAX) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_SEL_RECORD_TYPE_IS_NON_TIMESTAMPED_OEM(__record_type) \ (((__record_type) >= IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_MIN \ && (((__record_type) - 1) <= (IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_MAX - 1))) ? 1 : 0) #define IPMI_SEL_RECORD_TYPE_VALID(__record_type) \ ((IPMI_SEL_RECORD_TYPE_IS_EVENT((__record_type)) \ || IPMI_SEL_RECORD_TYPE_IS_TIMESTAMPED_OEM((__record_type)) \ || IPMI_SEL_RECORD_TYPE_IS_NON_TIMESTAMPED_OEM((__record_type))) ? 1 : 0) #define IPMI_SEL_RECORD_ASSERTION_EVENT 0x0 #define IPMI_SEL_RECORD_DEASSERTION_EVENT 0x1 #define IPMI_SEL_RECORD_EVENT_DIRECTION_VALID(__event_direction) \ (((__event_direction) == IPMI_SEL_RECORD_ASSERTION_EVENT \ || (__event_direction) == IPMI_SEL_RECORD_DEASSERTION_EVENT) ? 1 : 0) /* Refer to Table 29-6 */ #define IPMI_SEL_EVENT_DATA_UNSPECIFIED_BYTE 0x0 #define IPMI_SEL_EVENT_DATA_TRIGGER_READING 0x1 #define IPMI_SEL_EVENT_DATA_TRIGGER_THRESHOLD_VALUE 0x1 #define IPMI_SEL_EVENT_DATA_PREVIOUS_STATE_OR_SEVERITY 0x1 #define IPMI_SEL_EVENT_DATA_OEM_CODE 0x2 #define IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE 0x3 #define IPMI_SEL_RECORD_UNSPECIFIED_EVENT 0xFF #define IPMI_SEL_RECORD_UNSPECIFIED_OFFSET 0x0F #define IPMI_SEL_RECORD_MAX_RECORD_LENGTH 16 /* * see freeipmi/templates/ for template definitions */ extern fiid_template_t tmpl_sel_record_header; extern fiid_template_t tmpl_sel_system_event_record; extern fiid_template_t tmpl_sel_system_event_record_event_fields; extern fiid_template_t tmpl_sel_system_event_record_discrete_previous_state_severity; extern fiid_template_t tmpl_sel_timestamped_oem_record; extern fiid_template_t tmpl_sel_non_timestamped_oem_record; extern fiid_template_t tmpl_threshold_event_data; extern fiid_template_t tmpl_discrete_event_data; extern fiid_template_t tmpl_oem_event_data; #ifdef __cplusplus } #endif #endif /* IPMI_SEL_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/record-format/ipmi-sel-oem-record-format.h0000644002055400205540000000212713527331636030753 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_OEM_RECORD_FORMAT_H #define IPMI_SEL_OEM_RECORD_FORMAT_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-sel-oem-record-format.h header file is deprecated #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SEL_OEM_RECORD_FORMAT_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/sdr/0000755002055400205540000000000013527342543021564 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/sdr/oem/0000755002055400205540000000000013527342543022344 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h0000644002055400205540000000423413527331636030467 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_INTEL_NODE_MANAGER_OEM_H #define IPMI_SDR_INTEL_NODE_MANAGER_OEM_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ /* return (1) - is oem intel node manager, fully parsed * return (0) - is not oem intel node manager * return (-1) - error */ int ipmi_sdr_oem_parse_intel_node_manager (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *nm_device_slave_address, uint8_t *sensor_owner_lun, uint8_t *channel_number, uint8_t *nm_health_event_sensor_number, uint8_t *nm_exception_event_sensor_number, uint8_t *nm_operational_capabilities_sensor_number, uint8_t *nm_alert_threshold_exceeded_sensor_number); #ifdef __cplusplus } #endif #endif /* IPMI_SDR_INTEL_NODE_MANAGER_OEM_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/sdr/ipmi-sdr.h0000644002055400205540000010316613527331636023471 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_SDR_H #define IPMI_SDR_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_SDR_ERR_SUCCESS 0 #define IPMI_SDR_ERR_CONTEXT_NULL 1 #define IPMI_SDR_ERR_CONTEXT_INVALID 2 #define IPMI_SDR_ERR_PARAMETERS 3 #define IPMI_SDR_ERR_OUT_OF_MEMORY 4 #define IPMI_SDR_ERR_FILENAME_INVALID 5 #define IPMI_SDR_ERR_FILESYSTEM 6 #define IPMI_SDR_ERR_PERMISSION 7 #define IPMI_SDR_ERR_CONTEXT_PERFORMING_OTHER_OPERATION 8 #define IPMI_SDR_ERR_CACHE_CREATE_CACHE_EXISTS 9 #define IPMI_SDR_ERR_CACHE_CREATE_DUPLICATE_RECORD_ID 10 #define IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_LENGTH 11 #define IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_COUNT 12 #define IPMI_SDR_ERR_CACHE_READ_ALREADY_INITIALIZED 13 #define IPMI_SDR_ERR_CACHE_READ_INITIALIZATION 14 #define IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST 15 #define IPMI_SDR_ERR_CACHE_INVALID 16 #define IPMI_SDR_ERR_CACHE_OUT_OF_DATE 17 #define IPMI_SDR_ERR_STATS_NOT_COMPILED 18 #define IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD 19 #define IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD 20 #define IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE 21 #define IPMI_SDR_ERR_ERROR_RETURNED_IN_CALLBACK 22 #define IPMI_SDR_ERR_NOT_FOUND 23 #define IPMI_SDR_ERR_IPMI_ERROR 24 #define IPMI_SDR_ERR_SYSTEM_ERROR 25 #define IPMI_SDR_ERR_OVERFLOW 26 #define IPMI_SDR_ERR_INTERNAL_ERROR 27 #define IPMI_SDR_ERR_ERRNUMRANGE 28 #define IPMI_SDR_FLAGS_DEFAULT 0x0000 #define IPMI_SDR_FLAGS_DEBUG_DUMP 0x0001 /* Flags just for cache creation * * OVERWRITE - overwrite any previously created cache. * * DUPLICATE_RECORD_ID - check for duplicate record IDs and return error if one is found. * * ASSUME_MAX_SDR_RECORD_COUNT - If motherboard does not implement SDR * record reading properly, this workaround will allow code to not * fail out. */ #define IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT 0x00 #define IPMI_SDR_CACHE_CREATE_FLAGS_OVERWRITE 0x01 #define IPMI_SDR_CACHE_CREATE_FLAGS_DUPLICATE_RECORD_ID 0x02 #define IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT 0x04 #define IPMI_SDR_SENSOR_NAME_FLAGS_DEFAULT 0x00000000 #define IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS 0x00000001 /* applicable only to entity sensor names */ #define IPMI_SDR_SENSOR_NAME_FLAGS_ALWAYS_OUTPUT_INSTANCE_NUMBER 0x00000002 #define IPMI_SDR_MAX_RECORD_LENGTH 261 /* 256 + header */ #define IPMI_SDR_MAX_SENSOR_NAME_LENGTH 128 typedef struct ipmi_sdr_ctx *ipmi_sdr_ctx_t; typedef void (*Ipmi_Sdr_Cache_Create_Callback)(uint8_t sdr_version, uint16_t record_count, uint32_t most_recent_addition_timestamp, uint32_t most_recent_erase_timestamp, uint16_t record_id, void *data); /* return != 0 to quit iteration, return val will be returned up * through original caller. return < 0 will result in * IPMI_SDR_ERR_ERROR_RETURNED_IN_CALLBACK to bet set. * * Users should be mindful of the API calls they make will in a * callback. Calls to some functions, such as ipmi_sdr_cache_first() * may change iteration behavior. */ typedef int (*Ipmi_Sdr_Cache_Iterate_Callback)(ipmi_sdr_ctx_t ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *data); /* * SDR Cache Context and General functions */ ipmi_sdr_ctx_t ipmi_sdr_ctx_create (void); void ipmi_sdr_ctx_destroy (ipmi_sdr_ctx_t ctx); int ipmi_sdr_ctx_errnum (ipmi_sdr_ctx_t ctx); char * ipmi_sdr_ctx_strerror (int errnum); char * ipmi_sdr_ctx_errormsg (ipmi_sdr_ctx_t ctx); int ipmi_sdr_ctx_get_flags (ipmi_sdr_ctx_t ctx, unsigned int *flags); int ipmi_sdr_ctx_set_flags (ipmi_sdr_ctx_t ctx, unsigned int flags); char *ipmi_sdr_ctx_get_debug_prefix (ipmi_sdr_ctx_t ctx); int ipmi_sdr_ctx_set_debug_prefix (ipmi_sdr_ctx_t ctx, const char *debug_prefix); /* * SDR Cache Creation Functions */ /* ipmi_sdr_cache_create * - callback called between every record that is cached */ int ipmi_sdr_cache_create (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, const char *filename, int cache_create_flags, Ipmi_Sdr_Cache_Create_Callback create_callback, void *create_callback_data); /* * SDR Cache Reading Functions */ /* ipmi_sdr_cache_open * - ipmi_ctx is optional * - if ipmi_ctx is specified, timestamps/version of the SDR will be * checked for out-of-dateness */ int ipmi_sdr_cache_open (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, const char *filename); int ipmi_sdr_cache_sdr_version (ipmi_sdr_ctx_t ctx, uint8_t *sdr_version); int ipmi_sdr_cache_record_count (ipmi_sdr_ctx_t ctx, uint16_t *record_count); int ipmi_sdr_cache_most_recent_addition_timestamp (ipmi_sdr_ctx_t ctx, uint32_t *most_recent_addition_timestamp); int ipmi_sdr_cache_most_recent_erase_timestamp (ipmi_sdr_ctx_t ctx, uint32_t *most_recent_erase_timestamp); int ipmi_sdr_cache_first (ipmi_sdr_ctx_t ctx); int ipmi_sdr_cache_next (ipmi_sdr_ctx_t ctx); int ipmi_sdr_cache_seek (ipmi_sdr_ctx_t ctx, unsigned int index); int ipmi_sdr_cache_search_record_id (ipmi_sdr_ctx_t ctx, uint16_t record_id); /* sensor owner id is 8bit field - 7 bit slave or system software id + 1 bit indicating type */ int ipmi_sdr_cache_search_sensor (ipmi_sdr_ctx_t ctx, uint8_t sensor_number, uint8_t sensor_owner_id); /* return length of data read into buffer on success, -1 on error */ int ipmi_sdr_cache_record_read (ipmi_sdr_ctx_t ctx, void *buf, unsigned int buflen); /* ipmi_sdr_cache_iterate * - iterate through all SDR records calling callback for each one. * - if callback returns < 0, that will break iteration and return * value is returned here. */ int ipmi_sdr_cache_iterate (ipmi_sdr_ctx_t ctx, Ipmi_Sdr_Cache_Iterate_Callback iterate_callback, void *iterate_callback_data); int ipmi_sdr_cache_close (ipmi_sdr_ctx_t ctx); /* * SDR stats functions * * After opening an SDR cache (i.e. ipmi_sdr_cache_open() has been * called), loop through the cache and compile data on the cache for * a variety of utility functions. */ int ipmi_sdr_stats_compile (ipmi_sdr_ctx_t ctx); /* returns the number of unique entity instances for an entity id found * in the SDR */ int ipmi_sdr_stats_entity_instance_unique (ipmi_sdr_ctx_t ctx, uint8_t entity_id); /* * SDR Record Parsing Functions * * For all parsing functions, if currently reading the SDR cache * (i.e. ipmi_sdr_cache_open() has been called), if sdr_record is NULL * and sdr_record_len is 0, the current sdr record in the iterator * will be used in parsing. * * See ipmi-sdr-oem.h for parsing OEM records. */ /* For all SDR records */ int ipmi_sdr_parse_record_id_and_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint16_t *record_id, uint8_t *record_type); /* For Full, Compact, Event SDR records */ int ipmi_sdr_parse_sensor_owner_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_owner_id_type, uint8_t *sensor_owner_id); /* For Full, Compact, Event SDR records */ int ipmi_sdr_parse_sensor_owner_lun (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_owner_lun, uint8_t *channel_number); /* For Full, Compact, Event SDR records */ int ipmi_sdr_parse_sensor_number (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_number); /* For Full, Compact, Event SDR, Generic Device Locator, Management Controller Device Locator SDR records */ int ipmi_sdr_parse_entity_id_instance_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *entity_id, uint8_t *entity_instance, uint8_t *entity_instance_type); /* For Full, Compact, Event SDR records */ int ipmi_sdr_parse_sensor_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_type); /* For Full, Compact, Event SDR records */ int ipmi_sdr_parse_event_reading_type_code (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_reading_type_code); /* For Full, Compact, Event SDR records */ /* return length of data read into buffer on success, -1 on error */ int ipmi_sdr_parse_id_string (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, char *id_string, unsigned int id_string_len); /* For Full, Compact SDR records */ int ipmi_sdr_parse_sensor_units (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_units_percentage, uint8_t *sensor_units_modifier, uint8_t *sensor_units_rate, uint8_t *sensor_base_unit_type, uint8_t *sensor_modifier_unit_type); /* For Full, Compact SDR records */ int ipmi_sdr_parse_sensor_capabilities (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_message_control_support, uint8_t *threshold_access_support, uint8_t *hysteresis_support, uint8_t *auto_re_arm_support, uint8_t *entity_ignore_support); /* For Full, Compact SDR records */ int ipmi_sdr_parse_sensor_direction (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_direction); /* For Full, Compact SDR records */ /* event reading type must indicate a discrete sensor */ int ipmi_sdr_parse_assertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_state_0, uint8_t *event_state_1, uint8_t *event_state_2, uint8_t *event_state_3, uint8_t *event_state_4, uint8_t *event_state_5, uint8_t *event_state_6, uint8_t *event_state_7, uint8_t *event_state_8, uint8_t *event_state_9, uint8_t *event_state_10, uint8_t *event_state_11, uint8_t *event_state_12, uint8_t *event_state_13, uint8_t *event_state_14); /* For Full, Compact SDR records */ /* event reading type must indicate a discrete sensor */ int ipmi_sdr_parse_deassertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_state_0, uint8_t *event_state_1, uint8_t *event_state_2, uint8_t *event_state_3, uint8_t *event_state_4, uint8_t *event_state_5, uint8_t *event_state_6, uint8_t *event_state_7, uint8_t *event_state_8, uint8_t *event_state_9, uint8_t *event_state_10, uint8_t *event_state_11, uint8_t *event_state_12, uint8_t *event_state_13, uint8_t *event_state_14); /* For Full SDR records */ /* event reading type must indicate a threshold sensor */ int ipmi_sdr_parse_threshold_assertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_going_low, uint8_t *lower_non_critical_going_high, uint8_t *lower_critical_going_low, uint8_t *lower_critical_going_high, uint8_t *lower_non_recoverable_going_low, uint8_t *lower_non_recoverable_going_high, uint8_t *upper_non_critical_going_low, uint8_t *upper_non_critical_going_high, uint8_t *upper_critical_going_low, uint8_t *upper_critical_going_high, uint8_t *upper_non_recoverable_going_low, uint8_t *upper_non_recoverable_going_high); /* For Full SDR records */ /* event reading type must indicate a threshold sensor */ int ipmi_sdr_parse_threshold_deassertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_going_low, uint8_t *lower_non_critical_going_high, uint8_t *lower_critical_going_low, uint8_t *lower_critical_going_high, uint8_t *lower_non_recoverable_going_low, uint8_t *lower_non_recoverable_going_high, uint8_t *upper_non_critical_going_low, uint8_t *upper_non_critical_going_high, uint8_t *upper_critical_going_low, uint8_t *upper_critical_going_high, uint8_t *upper_non_recoverable_going_low, uint8_t *upper_non_recoverable_going_high); /* For Full SDR records */ /* event reading type must indicate a threshold sensor */ int ipmi_sdr_parse_threshold_readable (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold); /* For Full SDR records */ /* event reading type must indicate a threshold sensor */ int ipmi_sdr_parse_threshold_settable (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold); /* For Full SDR records */ /* b_exponent - sometimes documented as k1 */ /* r_exponent - sometimes documented as k2 */ int ipmi_sdr_parse_sensor_decoding_data (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, int8_t *r_exponent, int8_t *b_exponent, int16_t *m, int16_t *b, uint8_t *linearization, uint8_t *analog_data_format); /* For Full SDR records */ int ipmi_sdr_parse_sensor_reading_ranges_specified (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *nominal_reading_specified, uint8_t *normal_maximum_specified, uint8_t *normal_minimum_specified); /* For Full SDR records */ /* Results must be freed by user */ int ipmi_sdr_parse_sensor_reading_ranges (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **nominal_reading, double **normal_maximum, double **normal_minimum, double **sensor_maximum_reading, double **sensor_minimum_reading); /* For Full SDR records */ /* Results must be freed by user */ int ipmi_sdr_parse_thresholds (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **lower_non_critical_threshold, double **lower_critical_threshold, double **lower_non_recoverable_threshold, double **upper_non_critical_threshold, double **upper_critical_threshold, double **upper_non_recoverable_threshold); /* For Full SDR records */ int ipmi_sdr_parse_thresholds_raw (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold); /* For Full SDR records */ /* Results must be freed by user */ int ipmi_sdr_parse_tolerance (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **tolerance); /* For Full SDR records */ /* Result returned is in percentage */ /* Results must be freed by user */ int ipmi_sdr_parse_accuracy (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **tolerance); /* For Full SDR records */ int ipmi_sdr_parse_hysteresis (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *positive_going_threshold_hysteresis, uint8_t *negative_going_threshold_hysteresis); /* For Compact SDR records */ int ipmi_sdr_parse_sensor_record_sharing (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *share_count, uint8_t *id_string_instance_modifier_type, uint8_t *id_string_instance_modifier_offset, uint8_t *entity_instance_sharing); /* For Entity Association, Device Relative Entity Association SDR records */ int ipmi_sdr_parse_container_entity (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *container_entity_id, uint8_t *container_entity_instance); /* For Generic Device Locator, FRU Device Locator, Management Controller Device Locator SDR records */ /* return length of data read into buffer on success, -1 on error */ int ipmi_sdr_parse_device_id_string (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, char *device_id_string, unsigned int device_id_string_len); /* For Generic Device Locator, FRU Device Locator SDR records */ int ipmi_sdr_parse_device_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_type, uint8_t *device_type_modifier); /* For Generic Device Locator SDR records */ int ipmi_sdr_parse_generic_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_access_address, uint8_t *channel_number, uint8_t *device_slave_address, uint8_t *private_bus_id, uint8_t *lun_for_master_write_read_command, uint8_t *address_span, uint8_t *oem); /* For FRU Device Locator SDR records */ int ipmi_sdr_parse_fru_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_access_address, uint8_t *logical_fru_device_device_slave_address, uint8_t *private_bus_id, uint8_t *lun_for_master_write_read_fru_command, uint8_t *logical_physical_fru_device, uint8_t *channel_number); /* For FRU Device Locator SDR records */ int ipmi_sdr_parse_fru_entity_id_and_instance (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *fru_entity_id, uint8_t *fru_entity_instance); /* For Management Controller Device Locator SDR records */ int ipmi_sdr_parse_management_controller_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_slave_address, uint8_t *channel_number, uint8_t *global_initialization_event_message_generation, uint8_t *global_initialization_log_initialization_agent_errors, uint8_t *global_initialization_controller_logs_initialization_agent_errors, uint8_t *power_state_notification_controller, uint8_t *power_state_notification_acpi_device_power_state_notification, uint8_t *power_state_notification_acpi_system_power_state_notification, uint8_t *device_capabilities_sensor_device, uint8_t *device_capabilities_sdr_repository_device, uint8_t *device_capabilities_sel_device, uint8_t *device_capabilities_fru_inventory_device, uint8_t *device_capabilities_ipmb_event_receiver, uint8_t *device_capabilities_ipmb_event_generator, uint8_t *device_capabilities_bridge, uint8_t *device_capabilities_chassis_device); /* For Management Controller Confirmation, OEM SDR records */ int ipmi_sdr_parse_manufacturer_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint32_t *manufacturer_id); /* For Management Controller Confirmation SDR records */ int ipmi_sdr_parse_product_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint16_t *product_id); /* For OEM SDR records */ /* return length of data read into buffer on success, -1 on error */ int ipmi_sdr_parse_oem_data (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, void *oem_data, unsigned int oem_data_len); /* * SDR Cache Utility Functions */ int ipmi_sdr_cache_delete (ipmi_sdr_ctx_t ctx, const char *filename); /* ipmi_sensor_parse_sensor_name_string * - Wrapper that will return id_string or device_id_string dependent * on SDR type. * - Based on flags, will deal with shared sensors and alter sensor * name if necessary. * - if sdr_record is NULL and sdr_record_len is 0, the current sdr * record in the iterator will be used in parsing. */ /* For Full, Compact, Event, Generic Device Locator, FRU Device * Locator, and Management Controller Device Locator SDR records */ /* returns length written into buffer on success, -1 on error */ int ipmi_sdr_parse_sensor_name (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t sensor_number, unsigned int flags, char *buf, unsigned int buflen); /* ipmi_sensor_parse_entity_sensor_name * - Creates sensor names with the entity id and instance for better * names on some systems. * - For example, on some systems sensor ID strings are all called * "Temp". The entity ID and instance are needed to turn the name * into "Processor 1 Temp" or "Processor 2 Temp". * - Based on flags, will deal with shared sensors and alter sensor * name if necessary. * - if sdr_record is NULL and sdr_record_len is 0, the current sdr * record in the iterator will be used in parsing. */ /* For Full, Compact, Event, Generic Device Locator, and Management * Controller Device Locator SDR records */ /* returns length written into buffer on success, -1 on error */ int ipmi_sdr_parse_entity_sensor_name (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t sensor_number, unsigned int flags, char *buf, unsigned int buflen); #ifdef __cplusplus } #endif #endif /* IPMI_SDR_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/sdr/ipmi-sdr-oem.h0000644002055400205540000000170413527331636024242 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_OEM_H #define IPMI_SDR_OEM_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-sdr-oem.h header file is deprecated #include #ifdef __cplusplus } #endif #endif /* IPMI_SDR_OEM_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/sel/0000755002055400205540000000000013527342543021557 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/sel/ipmi-sel.h0000644002055400205540000005114713527331636023460 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_H #define IPMI_SEL_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #define IPMI_SEL_ERR_SUCCESS 0 #define IPMI_SEL_ERR_CONTEXT_NULL 1 #define IPMI_SEL_ERR_CONTEXT_INVALID 2 #define IPMI_SEL_ERR_PARAMETERS 3 #define IPMI_SEL_ERR_OUT_OF_MEMORY 4 #define IPMI_SEL_ERR_SDR_CACHE_ERROR 5 #define IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED 6 #define IPMI_SEL_ERR_NO_SEL_ENTRIES 7 #define IPMI_SEL_ERR_SEL_ENTRIES_LIST_END 8 #define IPMI_SEL_ERR_INVALID_SEL_ENTRY 9 #define IPMI_SEL_ERR_NOT_FOUND 10 #define IPMI_SEL_ERR_RESERVATION_CANCELED 11 #define IPMI_SEL_ERR_INTERPRET_ERROR 12 #define IPMI_SEL_ERR_CALLBACK_ERROR 13 #define IPMI_SEL_ERR_IPMI_ERROR 14 #define IPMI_SEL_ERR_SYSTEM_ERROR 15 #define IPMI_SEL_ERR_OVERFLOW 16 #define IPMI_SEL_ERR_INTERNAL_ERROR 17 #define IPMI_SEL_ERR_ERRNUMRANGE 18 #define IPMI_SEL_FLAGS_DEFAULT 0x0000 #define IPMI_SEL_FLAGS_DEBUG_DUMP 0x0001 #define IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS 0x0002 #define IPMI_SEL_PARAMETER_INTERPRET_CONTEXT 0x0001 #define IPMI_SEL_PARAMETER_UTC_OFFSET 0x0002 #define IPMI_SEL_STRING_FLAGS_DEFAULT 0x0000 #define IPMI_SEL_STRING_FLAGS_VERBOSE 0x0001 #define IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD 0x0002 #define IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE 0x0004 #define IPMI_SEL_STRING_FLAGS_DATE_USE_SLASH 0x0008 #define IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING 0x0010 #define IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS 0x0020 #define IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES 0x0040 #define IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA 0x0100 /* Timestamps are defined as localtime. If there are UTC and * one wishes to output in localtime, this flag will do so. */ #define IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME 0x0200 /* Convert localtimes to UTC times, as it may be convenient * for certain purposes. */ #define IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC 0x0400 #define IPMI_SEL_STRING_FLAGS_LEGACY 0x1000 #define IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD 0x0 #define IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD 0x1 #define IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD 0x2 #define IPMI_SEL_RECORD_TYPE_CLASS_UNKNOWN 0x3 #define IPMI_SEL_RECORD_ID_FIRST IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY #define IPMI_SEL_RECORD_ID_LAST IPMI_SEL_GET_RECORD_ID_LAST_ENTRY typedef struct ipmi_sel_ctx *ipmi_sel_ctx_t; typedef int (*Ipmi_Sel_Parse_Callback)(ipmi_sel_ctx_t ctx, void *callback_data); /* * SEL Context Functions */ /* ipmi_sel_ctx_create * - if specified, ipmi_ctx must be open and ready to go * - if NULL ipmi_ctx, SEL ctx cannot be used for SEL reading, only parsing records * - if specified, sdr_ctx cache must be open and ready for reading * - if NULL sdr_ctx, sdr won't be used */ ipmi_sel_ctx_t ipmi_sel_ctx_create (ipmi_ctx_t ipmi_ctx, ipmi_sdr_ctx_t sdr_ctx); void ipmi_sel_ctx_destroy (ipmi_sel_ctx_t ctx); int ipmi_sel_ctx_errnum (ipmi_sel_ctx_t ctx); char * ipmi_sel_ctx_strerror (int errnum); char * ipmi_sel_ctx_errormsg (ipmi_sel_ctx_t ctx); /* SEL Parse flag functions and settings functions */ int ipmi_sel_ctx_get_flags (ipmi_sel_ctx_t ctx, unsigned int *flags); int ipmi_sel_ctx_set_flags (ipmi_sel_ctx_t ctx, unsigned int flags); /* for use w/ string parsing w/ IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA */ int ipmi_sel_ctx_get_manufacturer_id (ipmi_sel_ctx_t ctx, uint32_t *manufacturer_id); int ipmi_sel_ctx_set_manufacturer_id (ipmi_sel_ctx_t ctx, uint32_t manufacturer_id); int ipmi_sel_ctx_get_product_id (ipmi_sel_ctx_t ctx, uint16_t *product_id); int ipmi_sel_ctx_set_product_id (ipmi_sel_ctx_t ctx, uint16_t product_id); int ipmi_sel_ctx_get_ipmi_version (ipmi_sel_ctx_t ctx, uint8_t *ipmi_version_major, uint8_t *ipmi_vesion_minor); int ipmi_sel_ctx_set_ipmi_version (ipmi_sel_ctx_t ctx, uint8_t ipmi_version_major, uint8_t ipmi_version_minor); /* get/set parameters * * For misc uses. * * INTERPRET_CONTEXT - for use with %I - see below. interpret_ctx * assumed loaded with whatever config desired for interpretation * * UTC_OFFSET - specific UTC offset to apply to timestamps (int) */ int ipmi_sel_ctx_get_parameter (ipmi_sel_ctx_t ctx, unsigned int parameter, void *ptr); /* Pass NULL as ptr for default value */ int ipmi_sel_ctx_set_parameter (ipmi_sel_ctx_t ctx, unsigned int parameter, const void *ptr); char *ipmi_sel_ctx_get_debug_prefix (ipmi_sel_ctx_t ctx); int ipmi_sel_ctx_set_debug_prefix (ipmi_sel_ctx_t ctx, const char *debug_prefix); /* determines separator between fields in string functions * * defaults to " | " */ char *ipmi_sel_ctx_get_separator (ipmi_sel_ctx_t ctx); int ipmi_sel_ctx_set_separator (ipmi_sel_ctx_t ctx, const char *separator); /* register/clear a reservation ID * - Almost all SEL operations use a reservation ID. Generally * speaking, it can be considered an advisory lock. The same * reservation ID can be used for all "read" operations and will only * be canceled when some "write" operation has occurred on the SEL. * This "write" operation could be a new SEL event, a SEL event that * was deleted, etc. * - Normally, it is no big deal for a reservation ID to be canceled. * The most normal circumstance is a new SEL event has been generated * while reading the current list of SEL records. Therefore, under * most circumstances, this library will simple re-retrieve a * reservation ID once it has noticed one has been canceled. * - These functions allow you to override the default functionality. * You may inform the library to register a specific reservation ID * and continue to use it for all SEL operations. In the event that * it has been canceled, a IPMI_SEL_ERR_RESERVATION_CANCELED * errnum will be returned. * - These functions are predominantly useful for doing a set of * operations and wanting to be informed of a possible race * condition occurring. For example, perhaps you wish to read all * the SEL records, log them, then clear them. There is a small * window where a new SEL event could be generated, then cleared * without the user knowing it ever existed. Use of a fixed * reservation ID would be a mechanism to notice this. * - In the event a reservation ID is canceled, it is up to the user * to re-register a reservation ID, otherwise SEL operations will * continue to default to grab its own reservation ID. * - In ipmi_sel_ctx_register_reservation_id(), an optional * reservation_id can be passed to see what reservation ID was * specifically registered. */ int ipmi_sel_ctx_register_reservation_id (ipmi_sel_ctx_t ctx, uint16_t *reservation_id); int ipmi_sel_ctx_clear_reservation_id (ipmi_sel_ctx_t ctx); /* * SEL Parse Functions */ /* ipmi_sel_parse and ipmi_sel_parse_record_ids * - callback is called after each SEL entry is parsed * - Returns the number of entries parsed */ int ipmi_sel_parse (ipmi_sel_ctx_t ctx, uint16_t record_id_start, uint16_t record_id_last, Ipmi_Sel_Parse_Callback callback, void *callback_data); int ipmi_sel_parse_record_ids (ipmi_sel_ctx_t ctx, uint16_t *record_ids, unsigned int record_ids_len, Ipmi_Sel_Parse_Callback callback, void *callback_data); /* SEL data retrieval functions after SEL is parsed * * seek_record_id moves the iterator to the closest record_id >= record_id * search_record_id finds the record id, will return NOT_FOUND if it can't be found */ int ipmi_sel_parse_first (ipmi_sel_ctx_t ctx); int ipmi_sel_parse_next (ipmi_sel_ctx_t ctx); int ipmi_sel_parse_sel_entry_count (ipmi_sel_ctx_t ctx); int ipmi_sel_parse_seek_record_id (ipmi_sel_ctx_t ctx, uint16_t record_id); int ipmi_sel_parse_search_record_id (ipmi_sel_ctx_t ctx, uint16_t record_id); /* return length of data read into buffer on success, -1 on error */ int ipmi_sel_parse_read_record (ipmi_sel_ctx_t ctx, void *buf, unsigned int buflen); /* SEL record parsing functions * * - if a sel_record is passed in, that sel_record is used for * reading/parsing * * - if the sel_record is NULL sel_record_len is 0, the current sel * parsed after ipmi_sel_parse() or ipmi_sel_parse_record_ids() is * used. It can be the record used within the iterator functions * (i.e. ipmi_sel_parse_next()) or in callbacks. * * - will return IPMI_SEL_ERR_INVALID_SEL_ENTRY if current sel * entry is not appropriate for data requested. */ /* record_id & record_type - works with all SEL record types */ int ipmi_sel_parse_read_record_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint16_t *record_id); int ipmi_sel_parse_read_record_type (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *record_type); /* timetamp - works with sel event and timestamped OEM record types */ int ipmi_sel_parse_read_timestamp (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint32_t *timestamp); /* generator_id, event message format version, sensor type, sensor * number, event direction, event type code, and event data available * form system event record type */ int ipmi_sel_parse_read_generator_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *generator_id); int ipmi_sel_parse_read_ipmb_device_lun (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *ipmb_device_lun); int ipmi_sel_parse_read_channel_number (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *channel_number); int ipmi_sel_parse_read_event_message_format_version (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_message_format_version); int ipmi_sel_parse_read_sensor_type (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *sensor_type); int ipmi_sel_parse_read_sensor_number (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *sensor_number); int ipmi_sel_parse_read_event_direction (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_direction); int ipmi_sel_parse_read_event_type_code (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_type_code); int ipmi_sel_parse_read_event_data1 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data1); int ipmi_sel_parse_read_event_data1_offset_from_event_reading_type_code (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data1_offset); int ipmi_sel_parse_read_event_data1_event_data2_flag (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data2_flag); int ipmi_sel_parse_read_event_data1_event_data3_flag (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data3_flag); int ipmi_sel_parse_read_event_data2 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data2); int ipmi_sel_parse_read_event_data3 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data3); /* manufacturer_id - works with sel timestamped OEM record types */ int ipmi_sel_parse_read_manufacturer_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint32_t *manufacturer_id); /* oem - works with sel timestamped and non-timestamped OEM record types */ /* return length of data read into buffer on success, -1 on error */ int ipmi_sel_parse_read_oem (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, void *buf, unsigned int buflen); /* * create a string output of the SEL entry. * * String format - availability for output dependent on SEL record * type. * * Available in all SEL record types * * %i - record ID in decimal * %I - event nominal vs. warning vs. critical interpretation [1] * * [1] - see libfreeipmi interpret library for information. See * ipmi_sel_ctx_set_interpret_ctx(). If interpret context not * available, returns INTERPRET_ERROR. * * Available in SEL event and timestamped OEM SEL records * * %t - time in format H:M:S using 24 hour clock * %d - date in format D-M-YEAR * * Available in SEL event records * * %T - sensor type * %s - sensor name * %e - event data 1 string (usually offset from event/reading code type string) * %f - event data 2 string [2] * %h - event data 3 string * %c - combined event data 2 and event data 3 string [3] * %p - event data 2 previous state string [4] * %S - event data 2 severity string [4] * %E - combined event data 1, 2, and 3 string [5] * %k - event direction * * [2] - if a previous state and a severity state string are available * from a discrete sensor, they are concatenated with the defined * separator in between. * * [3] - for events where both event data 2 and event data 3 hold data * that must be combined for an effective output. As an example, data * 2 holds a minor version number and data 3 holds a major version * number. The combined output might print out "Version 1.2" instead * of a separated "Major Version 1 ; Minor Version 2" if you did them * separately. If a combined output is not available or not * reasonable, event data 2 and event data 3 output will be output * separately with the defined separator between them * (e.g. effectively "%f ; %h"). * * [4] - if event type code indicates a discrete sensor and event data 2 * flag indicates a previous state and/or severity state is available. * * [5] - this can be loosely considered the equivalent of "%e" and * "%c" concatenated with the defined separator between them. * However, various corner cases will be handled for the user to * create a nicer output. For example, "Foo ; NA" will never be * output. This will be condensed into just "Foo". * * Available in timestamped OEM SEL records * * %m - manufacturer id * * Available in SEL timestamped and non-timestamped OEM record types * * %o - oem data in hex (or strings if interpreted OEM available) * * Available in all record types for certain manufacturers * * %O - output an OEM supplied string describing the event. [6] * * [6] On some motherboards, the vendor is capable of supplying a full * string describing the event data, in particular supplying strings * for OEM records and OEM event extensions. Under the right * conditions, this output option may be used as a potential * replacement for %e, %f, %h, %c, and/or %E. If an OEM supplied string * is not available, nothing will be output (with the exception of N/A * if the OUTPUT_NOT_AVAILABLE flag is set). Currently, this output * option supports Fujitsu systems with iRMC S1/iRMC S2. * * Misc * * %% - percent sign * * flags * * VERBOSE * * Output slightly more verbose text for selected fields. For example: * * - If a sensor does not have a name, output sensor number and * generator id instead of just sensor number. * - If an event data string cannot be determined (i.e. it is OEM or * not defined by IPMI), output both the data and event type code * instead of just the event data. * * IGNORE_UNAVAILABLE_FIELD * * If a field is not available for output (for example, a timestamp field * in a SEL entry w/o a timestamp field), do not return an error. Output * nothing. * * OUTPUT_NOT_AVAILABLE * * If a field is not available, do not output an empty string, output * "N/A" (sometimes must have IGNORE_UNAVAILABLE_FIELD set) * * DATE_USE_SLASH * * Use a '/' instead of hyphens when outputting the date. * * DATE_MONTH_STRING * * Output a month name (Jan, Feb, Mar, etc.) instead of the month * number when outputting the date. * * LEGACY * * Output strings in legacy format. * * Returns length of data written to buffer. If >= buflen, no null * termination exists in buffer. */ int ipmi_sel_parse_read_record_string (ipmi_sel_ctx_t ctx, const char *fmt, const void *sel_record, unsigned int sel_record_len, char *buf, unsigned int buflen, unsigned int flags); /* * SEL Utility functions */ int ipmi_sel_clear_sel (ipmi_sel_ctx_t ctx); int ipmi_sel_delete_sel_entry (ipmi_sel_ctx_t ctx, uint16_t record_id); int ipmi_sel_record_type_class (uint8_t record_type); #ifdef __cplusplus } #endif #endif /* IPMI_SEL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/sensor-read/0000755002055400205540000000000013527342543023216 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/sensor-read/ipmi-sensor-read.h0000644002055400205540000001153713527342002026542 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_READ_H #define IPMI_SENSOR_READ_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* note: SENSOR_READING_UNAVAILABLE and SENSOR_SCANNING_DISABLED are * because of configuration of a sensor. It is "ok" to some extent. * SENSOR_READING_CANNOT_BE_OBTAINED is due to a retrieval error. */ #define IPMI_SENSOR_READ_ERR_SUCCESS 0 #define IPMI_SENSOR_READ_ERR_CONTEXT_NULL 1 #define IPMI_SENSOR_READ_ERR_CONTEXT_INVALID 2 #define IPMI_SENSOR_READ_ERR_PARAMETERS 3 #define IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY 4 #define IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE 5 #define IPMI_SENSOR_READ_ERR_SENSOR_SCANNING_DISABLED 6 #define IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG 7 #define IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR 8 #define IPMI_SENSOR_READ_ERR_SENSOR_NOT_OWNED_BY_BMC 9 #define IPMI_SENSOR_READ_ERR_SENSOR_IS_SYSTEM_SOFTWARE 10 #define IPMI_SENSOR_READ_ERR_SENSOR_CANNOT_BE_BRIDGED 11 #define IPMI_SENSOR_READ_ERR_SENSOR_READING_CANNOT_BE_OBTAINED 12 #define IPMI_SENSOR_READ_ERR_NODE_BUSY 13 #define IPMI_SENSOR_READ_ERR_INVALID_SDR_RECORD_TYPE 14 #define IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR 15 #define IPMI_SENSOR_READ_ERR_IPMI_ERROR 16 #define IPMI_SENSOR_READ_ERR_SYSTEM_ERROR 17 #define IPMI_SENSOR_READ_ERR_OVERFLOW 18 #define IPMI_SENSOR_READ_ERR_INTERNAL_ERROR 19 #define IPMI_SENSOR_READ_ERR_ERRNUMRANGE 20 #define IPMI_SENSOR_READ_FLAGS_DEFAULT 0x0000 #define IPMI_SENSOR_READ_FLAGS_BRIDGE_SENSORS 0x0001 #define IPMI_SENSOR_READ_FLAGS_DISCRETE_READING 0x0002 #define IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED 0x0004 #define IPMI_SENSOR_READ_FLAGS_ASSUME_BMC_OWNER 0x0008 typedef struct ipmi_sensor_read_ctx *ipmi_sensor_read_ctx_t; /* Sensor Read Context Functions * - ipmi_ctx assumes ipmi opened and ready to go */ ipmi_sensor_read_ctx_t ipmi_sensor_read_ctx_create (ipmi_ctx_t ipmi_ctx); void ipmi_sensor_read_ctx_destroy (ipmi_sensor_read_ctx_t ctx); int ipmi_sensor_read_ctx_errnum (ipmi_sensor_read_ctx_t ctx); char * ipmi_sensor_read_ctx_strerror (int errnum); char * ipmi_sensor_read_ctx_errormsg (ipmi_sensor_read_ctx_t ctx); /* Sensor read flag functions */ int ipmi_sensor_read_ctx_get_flags (ipmi_sensor_read_ctx_t ctx, unsigned int *flags); int ipmi_sensor_read_ctx_set_flags (ipmi_sensor_read_ctx_t ctx, unsigned int flags); /* * return 1 - reading a success (although for some sensor types, a * reading may not be returned. For example with discrete sensors, a * reading is not returned but a sensor_event_bitmask is.) * * return 0 - cannot obtain reading, but sensor_event_bitmask still * returned. This is most common because the sensor cannot be * interpreted, b/c (for example) it is a non-analog or non-linear * sensor. errnum will be set appropriately. * * return (-1) - error, neither a reading nor sensor_event_bitmask can * be returned. * * if reading returned, must be free'd by caller * * 'sensor_reading_raw' is optional and need not be specified. * * under return of 0 or 1, the sensor_reading_raw will be filled with the raw reading * * Notes: * * shared_sensor_number_offset used for sensor record sharing in compact * records. If not used or not available, must be set to 0. */ int ipmi_sensor_read (ipmi_sensor_read_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t shared_sensor_number_offset, uint8_t *sensor_reading_raw, double **sensor_reading, uint16_t *sensor_event_bitmask); #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_READ_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/0000755002055400205540000000000013527342543021726 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/0000755002055400205540000000000013527342544022507 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-dell-spec.h0000644002055400205540000000752513527331636027014 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_DELL_SPEC_H #define IPMI_CMD_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ #define IPMI_CMD_OEM_DELL_RESERVED_EXTENDED_CONFIGURATION 0x01 #define IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION 0x02 #define IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION 0x03 /* IPMI_NET_FN_OEM_DELL_GENERIC_RQ / IPMI_NET_FN_OEM_DELL_GENERIC_RS */ #define IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS 0x21 #define IPMI_CMD_OEM_DELL_SET_NIC_SELECTION 0x24 #define IPMI_CMD_OEM_DELL_GET_NIC_SELECTION 0x25 #define IPMI_CMD_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS 0x32 #define IPMI_CMD_OEM_DELL_GET_CPLD_VERSION 0x33 #define IPMI_CMD_OEM_DELL_GET_POWER_CONSUMPTION_DATA 0x9C #define IPMI_CMD_OEM_DELL_RESET_POWER_CONSUMPTION_DATA 0x9D #define IPMI_CMD_OEM_DELL_POWER_SUPPLY_INFO 0xB0 #define IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL 0xB1 #define IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE 0xB2 #define IPMI_CMD_OEM_DELL_POWER_CONSUMPTION 0xB3 #define IPMI_CMD_OEM_DELL_FRONT_PANEL_INFO 0xB5 /* renamed "front panel info" in 12g */ #define IPMI_CMD_OEM_DELL_LCD_INFO IPMI_CMD_OEM_DELL_FRONT_PANEL_INFO /* achu: this one is taken from code, is correct name? */ #define IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS 0xBA #define IPMI_CMD_OEM_DELL_GET_POWER_HEAD_ROOM 0xBB #define IPMI_CMD_OEM_DELL_ROLLBACK_FIRMWARE_VERSION 0xBE #define IPMI_CMD_OEM_DELL_GET_IDRAC_FIRMWARE_VERSION_NUMBER 0xBF #define IPMI_CMD_OEM_DELL_GET_ACTIVE_LOM_STATUS 0xC1 #define IPMI_CMD_OEM_DELL_IDRAC_VIRTUAL_MAC 0xC9 /* * Dell Poweredge R720 */ #define IPMI_CMD_OEM_DELL_GET_BLADE_SLOT_ID 0x18 #define IPMI_CMD_OEM_DELL_SET_NIC_SELECTION_FAILOVER 0x28 #define IPMI_CMD_OEM_DELL_GET_NIC_SELECTION_FAILOVER 0x29 #define IPMI_CMD_OEM_DELL_FRESH_AIR 0x35 #define IPMI_CMD_OEM_DELL_GET_LAST_POST_CODE 0x99 #define IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2 0xCC #define IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2 0xCD /* * Dell Poweredge C410x */ /* IPMI_NET_FN_OEM_DELL_GENERIC_RQ / IPMI_NET_FN_OEM_DELL_GENERIC_RS */ #define IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL 0xF0 /* IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RQ / IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RS */ #define IPMI_CMD_OEM_DELL_PORT_MAP 0xC8 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-fujitsu-spec.h0000644002055400205540000000322113527331636027552 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_FUJITSU_SPEC_H #define IPMI_CMD_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Fujitsu iRMC S1 / iRMC S2 * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf */ /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ #define IPMI_CMD_OEM_FUJITSU_POWER 0x01 #define IPMI_CMD_OEM_FUJITSU_COMMUNICATION 0x02 #define IPMI_CMD_OEM_FUJITSU_FAN_TEST 0x10 #define IPMI_CMD_OEM_FUJITSU_BIOS 0xF1 #define IPMI_CMD_OEM_FUJITSU_SYSTEM 0xF5 /* IPMI_NET_FN_FIRMWARE_RQ / IPMI_NET_FN_FIRMWARE_RS */ #define IPMI_CMD_OEM_FUJITSU_SET_FIRMWARE_SELECTOR 0x04 #define IPMI_CMD_OEM_FUJITSU_GET_FIRMWARE_SELECTOR 0x05 /* IPMI_NET_FN_OEM_FUJITSU_GENERIC_RQ / IPMI_NET_FN_OEM_FUJITSU_GENERIC_RS */ #define IPMI_CMD_OEM_FUJITSU_GET_REMOTE_STORAGE_CONNECTION_OR_STATUS 0x19 #define IPMI_CMD_OEM_FUJITSU_SET_VIDEO_DISPLAY_ON_OFF 0x1A #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_FUJITSU_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-gigabyte-spec.h0000644002055400205540000000244613527331636027664 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_GIGABYTE_SPEC_H #define IPMI_CMD_OEM_GIGABYTE_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * GIGABYTE MD90-FS0-ZB */ /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION 0xCC /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION 0x20 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION2 0x21 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_GIGABYTE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-ibm-spec.h0000644002055400205540000000204713527331636026635 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_IBM_SPEC_H #define IPMI_CMD_OEM_IBM_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * IBM x3455/x3755 */ /* IPMI_NET_FN_OEM_IBM_LED_RQ / IPMI_NET_FN_OEM_IBM_LED_RS */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_IBM_GET_LED 0xC0 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_IBM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-intel-node-manager-spec.h0000644002055400205540000000617613527331636031543 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_ENABLE_DISABLE_NODE_MANAGER_POLICY_CONTROL 0xC0 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY 0xC1 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY 0xC2 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS 0xC3 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS 0xC4 /* legacy names */ #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_THRESHOLDS IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_ALERT_THRESHOLDS IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS 0xC5 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_SUSPEND_PERIODS 0xC6 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_RESET_NODE_MANAGER_STATISTICS 0xC7 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_STATISTICS 0xC8 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_CAPABILITIES 0xC9 #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_VERSION 0xCA #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POWER_DRAW_RANGE 0xCB #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_TURBO_SYNCHRONIZATION_RATIO 0xCC #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_TURBO_SYNCHRONIZATION_RATIO 0xCD #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION 0xCE #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_ALERT_DESTINATION 0xCF #define IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_LIMITING_POLICY_ID 0xF2 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_INTEL_NODE_MANAGER_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-intel-spec.h0000644002055400205540000000320213527331636027173 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_INTEL_SPEC_H #define IPMI_CMD_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X */ /* IPMI_NET_FN_OEM_INTEL_GENERIC_RQ / IPMI_NET_FN_OEM_INTEL_GENERIC_RS */ #define IPMI_CMD_OEM_INTEL_RESTORE_CONFIGURATION 0x02 #define IPMI_CMD_OEM_INTEL_SET_FAULT_INDICATION 0x57 /* IPMI_NET_FN_OEM_INTEL_CONFIG_RQ / IPMI_NET_FN_OEM_INTEL_CONFIG_RS */ #define IPMI_CMD_OEM_INTEL_SET_SMTP_CONFIGURATION 0x37 #define IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION 0x38 /* * Intel S2600JF/Appro 512X */ /* IPMI_NET_FN_OEM_INTEL_GENERIC_RQ / IPMI_NET_FN_OEM_INTEL_GENERIC_RS */ #define IPMI_CMD_OEM_INTEL_SET_POWER_RESTORE_DELAY 0x54 #define IPMI_CMD_OEM_INTEL_GET_POWER_RESTORE_DELAY 0x55 #define IPMI_CMD_OEM_INTEL_GET_BMC_SERVICE_STATUS 0xB2 #define IPMI_CMD_OEM_INTEL_CONTROL_BMC_SERVICES 0xB1 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-inventec-spec.h0000644002055400205540000000661313527331636027704 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_INVENTEC_SPEC_H #define IPMI_CMD_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* IPMI_NET_FN_FIRMWARE_RQ / IPMI_NET_FN_FIRMWARE_RS */ #define IPMI_CMD_OEM_INVENTEC_UPDATE_FIRMARE 0x01 #define IPMI_CMD_OEM_INVENTEC_GET_UPDATE_STATUS 0x02 #define IPMI_CMD_OEM_INVENTEC_COPY_IMAGE_DATA 0x03 /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_INVENTEC_SET_DEDICATED_MAC_ADDRESS 0x21 #define IPMI_CMD_OEM_INVENTEC_SET_SHARED_MAC_ADDRESS 0x23 /* IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ / IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS */ #define IPMI_CMD_OEM_INVENTEC_RESERVED_EXTENDED_CONFIGURATION 0x01 #define IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION 0x02 #define IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION 0x03 #define IPMI_CMD_OEM_INVENTEC_RESTORE_TO_DEFAULTS 0x04 #define IPMI_CMD_OEM_INVENTEC_GET_RESTORE_STATUS 0x05 #define IPMI_CMD_OEM_INVENTEC_SET_SYSTEM_GUID 0xB3 /* IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ / IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS */ #define IPMI_CMD_OEM_INVENTEC_SET_WEB_PORT_NUM 0x02 #define IPMI_CMD_OEM_INVENTEC_GET_WEB_PORT_NUM 0x03 #define IPMI_CMD_OEM_INVENTEC_SET_BOARD_ID 0x10 #define IPMI_CMD_OEM_INVENTEC_GET_BOARD_ID 0x11 #define IPMI_CMD_OEM_INVENTEC_SET_ASSET_TAG 0x12 #define IPMI_CMD_OEM_INVENTEC_SET_LAN_SOURCE 0x13 #define IPMI_CMD_OEM_INVENTEC_GET_LAN_SOURCE 0x14 #define IPMI_CMD_OEM_INVENTEC_SET_FCB_FW_VERSION 0x15 #define IPMI_CMD_OEM_INVENTEC_GET_FCB_FW_VERSION 0x16 #define IPMI_CMD_OEM_INVENTEC_SET_FAN_CONTROL 0x61 #define IPMI_CMD_OEM_INVENTEC_GET_FAN_CONTROL 0x62 #define IPMI_CMD_OEM_INVENTEC_SET_FSC_TABLE 0x63 #define IPMI_CMD_OEM_INVENTEC_GET_FSC_TABLE 0x64 #define IPMI_CMD_OEM_INVENTEC_GET_FCB_SKU_INFO 0x6A #define IPMI_CMD_OEM_INVENTEC_GET_FCB_POWER_THROTTLING_STATUS 0x6B #define IPMI_CMD_OEM_INVENTEC_OEM_GET_PIC_MODEL 0x70 #define IPMI_CMD_OEM_INVENTEC_OEM_SET_FLASH_PIN 0x71 #define IPMI_CMD_OEM_INVENTEC_OEM_GET_FLASH_PIN 0x72 #define IPMI_CMD_OEM_INVENTEC_OEM_NEW_MASTER_WRITE_READ 0x73 #define IPMI_CMD_OEM_INVENTEC_SET_POWER_THROTTLING_BEHAVIOR 0xB1 #define IPMI_CMD_OEM_INVENTEC_GET_POWER_THROTTLING_BEHAVIOR 0xB2 #define IPMI_CMD_OEM_INVENTEC_GET_PSU_MISMATCH_AND_TYPE 0xB3 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-quanta-spec.h0000644002055400205540000000341413527331636027356 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_QUANTA_SPEC_H #define IPMI_CMD_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ /* IPMI_NET_FN_FIRMWARE_RQ / IPMI_NET_FN_FIRMWARE_RS */ #define IPMI_CMD_OEM_QUANTA_UPDATE_FIRMARE 0x01 #define IPMI_CMD_OEM_QUANTA_GET_UPDATE_STATUS 0x02 #define IPMI_CMD_OEM_QUANTA_COPY_IMAGE_DATA 0x03 #define IPMI_CMD_OEM_QUANTA_USB_FIRMWARE_UPDATE 0x04 /* IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ / IPMI_NET_FN_OEM_QUANTA_GENERIC_RS */ #define IPMI_CMD_OEM_QUANTA_RESERVED_EXTENDED_CONFIGURATION 0x01 #define IPMI_CMD_OEM_QUANTA_GET_EXTENDED_CONFIGURATION 0x02 #define IPMI_CMD_OEM_QUANTA_SET_EXTENDED_CONFIGURATION 0x03 #define IPMI_CMD_OEM_QUANTA_RESET_TO_DEFAULTS 0x04 #define IPMI_CMD_OEM_QUANTA_GET_RESTORE_STATUS 0x05 #define IPMI_CMD_OEM_QUANTA_GET_SENSOR_TEMPERATURE_READING 0x10 #define IPMI_CMD_OEM_QUANTA_GET_PROCESSOR_INFORMATION 0x18 #define IPMI_CMD_OEM_QUANTA_SET_POWER_ON_BY_WAKE_ON_LAN_EVENT 0x1B #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_QUANTA_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-sun-microsystems-spec.h0000644002055400205540000000205713527331636031433 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_SUN_MICROSYSTEMS_SPEC_H #define IPMI_CMD_OEM_SUN_MICROSYSTEMS_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Sun 4140 */ /* IPMI_NET_FN_OEM_GROUP_RQ / IPMI_NET_FN_OEM_GROUP_RS */ #define IPMI_CMD_OEM_SUN_GET_LED 0x21 #define IPMI_CMD_OEM_SUN_SET_LED 0x22 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_SUN_MICROSYSTEMS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-supermicro-spec.h0000644002055400205540000000233513527331636030256 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_SUPERMICRO_SPEC_H #define IPMI_CMD_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Supermicro H8QME */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_SUPERMICRO_EXTRA_FIRMWARE_INFO 0x20 #define IPMI_CMD_OEM_SUPERMICRO_RESET_INTRUSION 0x03 /* * Supermicro X8DTG */ /* achu: not official names, named based on use context */ #define IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION 0x70 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_SUPERMICRO_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-cmd-oem-wistron-spec.h0000644002055400205540000000731613527331636027577 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_OEM_WISTRON_SPEC_H #define IPMI_CMD_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ /* IPMI_NET_FN_FIRMWARE_RQ / IPMI_NET_FN_FIRMWARE_RS */ #define IPMI_CMD_OEM_WISTRON_UPDATE_FIRMARE 0x01 #define IPMI_CMD_OEM_WISTRON_GET_UPDATE_STATUS 0x02 #define IPMI_CMD_OEM_WISTRON_COPY_IMAGE_DATA 0x03 #define IPMI_CMD_OEM_WISTRON_USB_FIRMWARE_UPDATE 0x04 #define IPMI_CMD_OEM_WISTRON_WRITE_PROPRIETARY_STRING 0x0B #define IPMI_CMD_OEM_WISTRON_READ_PROPRIETARY_STRING 0x0C #define IPMI_CMD_OEM_WISTRON_CLEAR_PROPRIETARY_STRING 0x0D /* IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ / IPMI_NET_FN_OEM_WISTRON_GENERIC_RS */ #define IPMI_CMD_OEM_WISTRON_RESERVED_EXTENDED_CONFIGURATION 0x01 #define IPMI_CMD_OEM_WISTRON_GET_EXTENDED_CONFIGURATION 0x02 #define IPMI_CMD_OEM_WISTRON_SET_EXTENDED_CONFIGURATION 0x03 #define IPMI_CMD_OEM_WISTRON_RESET_TO_DEFAULTS 0x04 #define IPMI_CMD_OEM_WISTRON_GET_RESTORE_STATUS 0x05 #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_CONFIGURATION 0x11 #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_CONFIGURATION 0x12 #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_NAME 0x13 #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_NAME 0x14 #define IPMI_CMD_OEM_WISTRON_SET_SENSOR_INFO 0x15 #define IPMI_CMD_OEM_WISTRON_GET_SENSOR_INFO 0x16 #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_ENCLOSURE_POWER_CAPPING 0x17 #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_ENCLOSURE_POWER_CAPPING 0x18 #define IPMI_CMD_OEM_WISTRON_SET_FAN_SPEED_CONTROL 0x19 #define IPMI_CMD_OEM_WISTRON_GET_FAN_SPEED_CONTROL 0x1A #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_LED_STATUS 0x1B #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_LED_STATUS 0x1C #define IPMI_CMD_OEM_WISTRON_SET_HDD_INFO 0x1D #define IPMI_CMD_OEM_WISTRON_SET_PSU_INFO 0x1E #define IPMI_CMD_OEM_WISTRON_GET_PSU_INFO 0x1F #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_SERVICE_TAG 0x20 #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_SERVICE_TAG 0x25 #define IPMI_CMD_OEM_WISTRON_SYNCHRONIZE CHASSIS_SERVICE_TAG 0x26 #define IPMI_CMD_OEM_WISTRON_SET_PSU_CONFIGURATION 0x27 #define IPMI_CMD_OEM_WISTRON_GET_PSU_CONFIGURATION 0x28 #define IPMI_CMD_OEM_WISTRON_SYNCHRONIZE_CHASSIS_ENCLOSURE_POWER 0x29 #define IPMI_CMD_OEM_WISTRON_SET_THERMAL_THROTTLING 0x2A #define IPMI_CMD_OEM_WISTRON_GET_THERMAL_THROTTLING 0x2B #define IPMI_CMD_OEM_WISTRON_GET_BMC_SC_BMC_PROTOCOL_VERSION 0x2C #define IPMI_CMD_OEM_WISTRON_GET_SC_SC_BMC_PROTOCOL_VERSION 0x2D #define IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS 0x2E #define IPMI_CMD_OEM_WISTRON_SET_CHASSIS_POWER_READINGS 0x2F #define IPMI_CMD_OEM_WISTRON_SET_PASSWORD_POLICY 0x51 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-comp-code-oem-dell-spec.h0000644002055400205540000000333713527331636030114 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_DELL_SPEC_H #define IPMI_COMP_CODE_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R720 */ /* w/ IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION * IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION * IPMI_CMD_OEM_DELL_SET_NIC_SELECTION_FAILOVER * IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2 * IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2 * IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS * IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS */ #define IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED 0x6F #define IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED_STR \ "Not licensed" /* w/ IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2 * IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2 */ #define IPMI_COMP_CODE_OEM_DELL_SUBSYSTEM_LEVEL_POWER_IS_NOT_SUPPORTED 0x81 #define IPMI_COMP_CODE_OEM_DELL_SUBSYSTEM_LEVEL_POWER_IS_NOT_SUPPORTED_STR \ "subsystem-level power is not supported" #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-comp-code-oem-fujitsu-spec.h0000644002055400205540000000231413527331636030657 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_FUJITSU_SPEC_H #define IPMI_COMP_CODE_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Fujitsu RX100 S5 * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf */ /* IPMI_CMD_OEM_FUJITSU_BIOS - w/ GET_CPU_INFO Command Specifier */ #define IPMI_COMP_CODE_OEM_FUJITSU_BIOS_UNPOPULATED_CPU_SOCKET 0x01 #define IPMI_COMP_CODE_OEM_FUJITSU_BIOS_UNPOPULATED_CPU_SOCKET_STR \ "Unpopulated CPU Socket" #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_FUJITSU_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-comp-code-oem-intel-node-manager-spec.h0000644002055400205540000002472713527331636032650 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ /* IPMI_CMD_OEM_INTEL_ENABLE_DISABLE_NODE_MANAGER_POLICY_CONTROL */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY_SUSPEND_PERIODS */ /* IPMI_CMD_OEM_INTEL_RESET_NODE_MANAGER_STATISTICS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_STATISTICS */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID 0x80 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR \ "Invalid Policy Id" /* IPMI_CMD_OEM_INTEL_ENABLE_DISABLE_NODE_MANAGER_POLICY_CONTROL */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_POLICY_SUSPEND_PERIODS */ /* IPMI_CMD_OEM_INTEL_RESET_NODE_MANAGER_STATISTICS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_STATISTICS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_CAPABILITIES */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POWER_DRAW_RANGE */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID 0x81 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR \ "Invalid Domain Id" /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY */ /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE 0x82 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE_STR \ "unknown or unsupported Policy Trigger Type" /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_CONFIGURATION_ACTION 0x83 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_CONFIGURATION_ACTION_STR \ "unknown or unsupported Policy Configuration Action" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POWER_LIMIT_OUT_OF_RANGE 0x84 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POWER_LIMIT_OUT_OF_RANGE_STR \ "Power Limit out of range" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CORRECTION_TIME_OUT_OF_RANGE 0x85 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CORRECTION_TIME_OUT_OF_RANGE_STR \ "Correction Time out of range" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_VALUE_OUT_OF_RANGE 0x86 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_VALUE_OUT_OF_RANGE_STR \ "Policy Trigger value out of range" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE 0x89 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR \ "Statistics Reporting Period out of range" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_VALUE_OF_AGGRESSIVE_CPU_POWER_CORRECTION_FIELD 0x8B #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_VALUE_OF_AGGRESSIVE_CPU_POWER_CORRECTION_FIELD_STR \ "Invalid value of Aggressive CPU Power Correction field" /* Standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_REQUEST_PARAMETER_NOT_SUPPORTED 0xD5 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_REQUEST_PARAMETER_NOT_SUPPORTED_STR \ "Policy could not be updated since PolicyId already exists and is enabled" /* Standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_ILLEGAL 0xD6 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_ILLEGAL_STR \ "Command disabled/unavailable due to lack of RTC synchronization" /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS */ /* No longer in 3.0 */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_LIMIT_IN_ONE_OF_THRESHOLDS_IS_INVALID 0x84 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_LIMIT_IN_ONE_OF_THRESHOLDS_IS_INVALID_STR \ "Limit in one of thresholds is invalid" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID 0x87 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID_STR \ "Number of thresholds is too large or power limits are invalid" /* legacy name */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_THRESHOLDS IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_THRESHOLDS_STR IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID_STR /* Standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED 0xD5 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED_STR \ "Alert thresholds can not be changed for enabled policy, disable it first" /* legacy name */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED_STR IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED_STR /* IPMI_CMD_OEM_INTEL_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_ONE_OF_PERIODS_IN_THE_TABLE_IS_INCONSISTENT 0x85 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_ONE_OF_PERIODS_IN_THE_TABLE_IS_INCONSISTENT_STR \ "One of the periods in the table is inconsistent. Start time is greater than or " \ "equal to stop time or stop time sets time beyond 1 day" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_SUSPEND_PERIODS 0x87 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_SUSPEND_PERIODS_STR \ "Invalid Number of policy suspend periods" /* Standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_NOT_SUPPORTED 0xD5 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_NOT_SUPPORTED_STR \ "Suspend periods can not be changed for enabled policy, disable it first" /* IPMI_CMD_OEM_INTEL_RESET_NODE_MANAGER_STATISTICS */ /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_STATISTICS */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_MODE 0x88 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_MODE_STR \ "Invalid Mode" /* IPMI_CMD_OEM_INTEL_GET_NODE_MANAGER_CAPABILITIES */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TRIGGER_TYPE 0x82 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TRIGGER_TYPE_STR \ "unknown Policy Trigger Type" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TYPE 0x83 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TYPE_STR \ "unknown Policy Type" /* IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_LIMITING_POLICY_ID */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NO_POLICY_IS_CURRENTLY_LIMITING 0xA1 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NO_POLICY_IS_CURRENTLY_LIMITING_STR \ "No policy is currently limiting for the specified DomainID" /* IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_TURBO_SYNCHRONIZATION_RATIO */ /* IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_TURBO_SYNChRONIZATION_RATIO */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_WRONG_CPU_SOCKET_NUMBER 0xA1 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_WRONG_CPU_SOCKET_NUMBER_STR \ "Wrong CPU socket number" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_COMMAND_RESPONSE_TIMEOUT 0xA2 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_COMMAND_RESPONSE_TIMEOUT_STR \ "Command response timeout" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_READ_FSC_IN_THE_RESPONSE 0xA4 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_READ_FSC_IN_THE_RESPONSE_STR \ "Bad read FSC in the response" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_WRITE_FCS_FIELD_IN_THE_RESPONSE 0xA5 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_WRITE_FCS_FIELD_IN_THE_RESPONSE_STR \ "Bad write FCS field in the response" #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CPU_NOT_PRESENT 0xAC #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CPU_NOT_PRESENT_STR \ "CPU not present" /* standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_PLATFORM_NOT_IN_S0_S1_STATE 0xD5 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_PLATFORM_NOT_IN_S0_S1_STATE_STR \ "Platform not in the S0/S1 state " /* standard error with special meaning */ #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INCORRECT_ACTIVE_CORES_CONFIGURATION 0xC9 #define IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INCORRECT_ACTIVE_CORES_CONFIGURATION_STR \ "Incorrect active cores configuration. Number of active cores exceeding number of cores on CPU" #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-comp-code-oem-intel-spec.h0000644002055400205540000000347013527331636030305 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_INTEL_SPEC_H #define IPMI_COMP_CODE_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 */ /* IPMI_CMD_OEM_INTEL_SET_SMTP_CONFIGURATION */ #define IPMI_COMP_CODE_SET_SMTP_CONFIGURATION_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_SMTP_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_SMTP_CONFIGURATION_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_SMTP_CONFIGURATION_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" /* IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION */ /* achu: document from Intel also sites a "write read-only parameter" * error code, but I assume that is a cut and paste typo. Shouldn't * be possible for the "get" command */ #define IPMI_COMP_CODE_GET_SMTP_CONFIGURATION_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_SMTP_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-comp-code-oem-wistron-spec.h0000644002055400205540000000652313527331636030701 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_WISTRON_SPEC_H #define IPMI_COMP_CODE_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ /* IPMI_CMD_OEM_WISTRON_GET_CHASSIS_LED_STATUS */ #define IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER 0x80 #define IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER_STR \ "Not yet received any information from Satellite Controller" #define IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS 0x81 #define IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS_STR \ "Satellite Controller Not Reporting for more than 10 consecutive seconds, but SC was alive before" /* IPMI_CMD_OEM_WISTRON_SET_CHASSIS_LED_STATUS */ #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER 0x80 #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER_STR \ "Not yet received any information from Satellite Controller" #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS 0x81 #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS_STR \ "Satellite Controller Not Reporting for more than 10 consecutive seconds, but SC was alive before" #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_DOES_NOT_SUPPORT_CHASSIS_LED_REQUESTED 0x82 #define IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_DOES_NOT_SUPPORT_CHASSIS_LED_REQUESTED_STR \ "Satellite Controller does not support one or many chassis LED requested" /* IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS */ #define IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_BMC_HAS_NOT_YET_RECEIVED_ANY_COMMANDS_FROM_SC 0x81 #define IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_BMC_HAS_NOT_YET_RECEIVED_ANY_COMMANDS_FROM_SC_STR \ "BMC has not yet received any commands from SC" /* achu: spec says "timeout" I'm going to say "timedout" */ #define IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_SC_HAS_TIMEDOUT 0x82 #define IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_SC_HAS_TIMEDOUT_STR \ "BMC has received Set Chassis Power Readings/Set Sensor Info from SC, but SC has timedout and is considered offline now." #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h0000644002055400205540000000267213527331636032666 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 */ /* achu: not official names, named based on use context */ /* achu: the strings are all over the place, "status" is the best name * I can think of */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS 0x70 /* achu: names taken from code, are correct names? */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_OEM_DIAGNOSTIC_EVENT_DATA 0x7E /* * Dell Poweredge R720 */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE 0x8A #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-event-reading-type-code-oem-hp-spec.h0000644002055400205540000000213713527331636032351 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_HP_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_HP_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * HP Proliant DL160 G8 */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_HP_UID_LIGHT 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_HP_HEALTH_LED 0x71 #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_HP_SPEC_H */ ipmi-event-reading-type-code-oem-intel-node-manager-spec.h0000644002055400205540000000432113527331636035326 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT 0x73 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT 0x74 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT 0x75 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_THERMAL_SENSOR_ON_DIMM 0x76 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_CUPS_EVENT 0x72 #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h0000644002055400205540000001343513527331636033060 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR 0x71 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_CORRECTABLE_SENSOR 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_NON_FATAL_SENSOR 0x73 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_FATAL_SENSOR 0x74 /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ /* achu: Similar to above, but some events changed and some new ones, * so new macros to differentiate */ /* achu: not official names, named based on use context */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR 0x71 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR 0x73 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR 0x74 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR 0x76 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_UNCORRECTABLE_ERROR 0x77 /* * Intel S2600JF/Appro 512X */ /* achu: some are similar to above, but different names, new events, * new numbers, so making new macros to differentiate */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR 0x71 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_CORRECTABLE_ERRORS 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR 0x73 /* continuation for IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR for more offsets */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 0x74 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_CHIPSET_PROPRIETARY 0x75 /* continuation for IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR for more offsets */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 0x76 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED 0x77 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_MEMORY_ERROR_EXTENSION 0x7F /* * Intel S2600WP */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR 0x71 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_CORRECTABLE_ERRORS 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR 0x73 /* continuation for IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR for more offsets */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 0x74 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_CHIPSET_PROPRIETARY 0x75 /* continuation for IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR for more offsets */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 0x76 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED 0x77 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_MEMORY_ERROR_EXTENSION 0x7F #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_FIRMWARE_UPDATE_STATUS_SENSOR 0x70 /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ /* achu: Like Intel Node Manager, but no Intel Node Manager on these nodes, so cut & paste to differentiate */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR 0x75 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR 0x70 /* * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_CORRECTABLE_ERROR 0x72 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR 0x73 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR_2 0x74 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_LINK_WIDTH_REDUCED 0x77 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2 0x76 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS 0x71 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_FIRMWARE_UPDATE_STATUS_SENSOR 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_START 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_FINISH 0xF0 #define IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO 0x70 #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_SPEC_H */ ipmi-event-reading-type-code-oem-inventec-spec.h0000644002055400205540000000217013527331636033473 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS 0x70 #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_SPEC_H */ ipmi-event-reading-type-code-oem-supermicro-spec.h0000644002055400205540000000334613527331636034056 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Supermicro X7DBR-3 (X7DBR_3) * Supermicro X7DB8 * Supermicro X8DTN * Supermicro X7SBI-LN4 (X7SBI_LN4) * Supermicro X8DTH * Supermicro X8DTG * Supermicro X8DTU * Supermicro X8DT3-LN4F (X8DT3_LN4F) * Supermicro X8DTU-6+ (X8DTU_6PLUS) * Supermicro X8DTL * Supermicro X8DTL-3F (X8DTL_3F) * Supermicro X8SIL-F (X8SIL_F) * Supermicro X9SCL * Supermicro X9SCM * Supermicro X8DTN+-F (X8DTNPLUS_F) * Supermicro X8SIE * Supermicro X9SCA-F-O (X9SCA_F_O) * Supermicro H8DGU-F (H8DGU_F) * Supermicro X9DRi-F (X9DRI_F) * Supermicro X9DRI-LN4F+ (X9DRI_LN4F_PLUS) * Supermicro X9SPU-F-O (X9SPU_F_O) * Supermicro X9SCM-iiF (X9SCM_IIF) * Supermicro H8SGL-F (H8SGL_F) */ /* achu: not official names, named based on use context */ #define IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC 0x70 #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_SPEC_H */ ipmi-lan-configuration-parameters-oem-inventec-spec.h0000644002055400205540000000250313527331636034634 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_INVENTEC_SPEC_H #define IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY 192 /* w/ IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY */ #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY_NO_RETRIES 0x00 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY_INDEFINITE_RETRY 0xFF #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CONFIGURATION_PARAMETERS_INVENTEC_SPEC_H */ ipmi-lan-configuration-parameters-oem-wistron-spec.h0000644002055400205540000000355113527331636034532 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_WISTRON_SPEC_H #define IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY 192 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL 193 /* w/ IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY */ #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_NO_RETRIES 0x00 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_INDEFINITE_RETRY 0xFF /* w/ IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL */ #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_BITMASK 0x80 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_SHIFT 7 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_LINK_DOWN_RESILIENCE_ENABLED 1 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_DHCP_RE_DISCOVERY_ENABLED 0 #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CONFIGURATION_PARAMETERS_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-dell-spec.h0000644002055400205540000000246713527331636027363 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_DELL_SPEC_H #define IPMI_NETFN_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 * Dell Poweredge C410x */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_DELL_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_DELL_GENERIC_RS 0x31 /* * Dell Poweredge C410x */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RQ 0x34 #define IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RS 0x35 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-fujitsu-spec.h0000644002055400205540000000177313527331636030133 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_FUJITSU_SPEC_H #define IPMI_NETFN_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Fujitsu RX100 S5 */ #define IPMI_NET_FN_OEM_FUJITSU_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_FUJITSU_GENERIC_RS 0x31 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_FUJITSU_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-ibm-spec.h0000644002055400205540000000203113527331636027175 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_IBM_SPEC_H #define IPMI_NETFN_OEM_IBM_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * IBM x3455/x3755 */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_IBM_LED_RQ 0x3A #define IPMI_NET_FN_OEM_IBM_LED_RS 0x3B #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_IBM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-intel-spec.h0000644002055400205540000000227613527331636027554 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_INTEL_SPEC_H #define IPMI_NETFN_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_INTEL_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_INTEL_GENERIC_RS 0x31 #define IPMI_NET_FN_OEM_INTEL_CONFIG_RQ 0x32 #define IPMI_NET_FN_OEM_INTEL_CONFIG_RS 0x33 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-inventec-spec.h0000644002055400205540000000231513527331636030246 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_INVENTEC_SPEC_H #define IPMI_NETFN_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS 0x31 #define IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ 0x34 #define IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS 0x35 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-quanta-spec.h0000644002055400205540000000207113527331636027723 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_QUANTA_SPEC_H #define IPMI_NETFN_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_QUANTA_GENERIC_RS 0x31 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_QUANTA_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-supermicro-spec.h0000644002055400205540000000226013527331636030622 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_SUPERMICRO_SPEC_H #define IPMI_NETFN_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Supermicro H8QME */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RS 0x31 #define IPMI_NET_FN_OEM_SUPERMICRO_PEPPERCON_RQ 0x3C #define IPMI_NET_FN_OEM_SUPERMICRO_PEPPERCON_RS 0x3D #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_SUPERMICRO_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-netfn-oem-wistron-spec.h0000644002055400205540000000210513527331636030135 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_WISTRON_SPEC_H #define IPMI_NETFN_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ /* achu: not official names, named based on use context */ #define IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ 0x30 #define IPMI_NET_FN_OEM_WISTRON_GENERIC_RS 0x31 #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-dell-spec.h0000644002055400205540000021144613527331636026252 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_DELL_SPEC_H #define IPMI_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 * * Support of below varies by system. Will be noted as appropriate. */ /* w/ IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION / IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION */ #define IPMI_OEM_DELL_TOKEN_ID_NIC_LINK_SETTING_GROUP 0x02 #define IPMI_OEM_DELL_TOKEN_ID_RAC_USER_PRIVILEGE 0x04 #define IPMI_OEM_DELL_TOKEN_ID_SNMP_GROUP 0x05 #define IPMI_OEM_DELL_TOKEN_ID_DNS_AND_DDNS_GROUP 0x06 #define IPMI_OEM_DELL_TOKEN_ID_AD_CONFIGURATION 0x07 #define IPMI_OEM_DELL_TOKEN_ID_EMAIL_ALERT_CONFIGURATION 0x08 #define IPMI_OEM_DELL_TOKEN_ID_SSL_CONFIGURATION 0x09 #define IPMI_OEM_DELL_TOKEN_ID_SSH_CONFIGURATION 0x0A #define IPMI_OEM_DELL_TOKEN_ID_TELNET_CONFIGURATION 0x0B #define IPMI_OEM_DELL_TOKEN_ID_WEB_SERVER_CONFIGURATION 0x0C #define IPMI_OEM_DELL_TOKEN_ID_CR_CONFIGURATION 0x0D #define IPMI_OEM_DELL_TOKEN_ID_VM_CONFIGURATION 0x0E #define IPMI_OEM_DELL_TOKEN_ID_RAC_INFO 0x0F #define IPMI_OEM_DELL_TOKEN_ID_RAC_FW_UPDATE 0x10 #define IPMI_OEM_DELL_TOKEN_ID_RAC_SERIAL_SHELL 0x11 #define IPMI_OEM_DELL_TOKEN_ID_MISC 0x12 #define IPMI_OEM_DELL_TOKEN_ID_OOB_SECURITY 0x13 #define IPMI_OEM_DELL_TOKEN_ID_RAC_CONTROL 0x14 #define IPMI_OEM_DELL_TOKEN_ID_RAC_LOG_FILES 0x15 #define IPMI_OEM_DELL_TOKEN_ID_RAC_CERTIFICATE_FILES 0x16 #define IPMI_OEM_DELL_TOKEN_ID_RAC_SESSION_INFO 0x17 #define IPMI_OEM_DELL_TOKEN_ID_RAC_TIME 0x19 #define IPMI_OEM_DELL_TOKEN_ID_RAC_SSAD_CONFIGURATION 0x1B #define IPMI_OEM_DELL_TOKEN_ID_RAC_USER_CERT_FILES 0x1C #define IPMI_OEM_DELL_TOKEN_ID_RAC_LOCAL_CONFIGURATION 0x1D #define IPMI_OEM_DELL_TOKEN_ID_RAC_VKVM_CONFIGURATION 0x1E #define IPMI_OEM_DELL_TOKEN_ID_IPV6_EXTENDED_GROUP 0x20 #define IPMI_OEM_DELL_TOKEN_ID_IPV6_URL_GROUP 0x23 #define IPMI_OEM_DELL_TOKEN_ID_ACTIVE_DIRECTORY_USER_DOMAIN_GROUP 0x24 #define IPMI_OEM_DELL_TOKEN_ID_SMART_CARD_GROUP 0x25 #define IPMI_OEM_DELL_TOKEN_ID_VMEDIA_SHARING_VIA_CMC 0x27 /* achu: renamed in r720 docs, dunno why */ #define IPMI_OEM_DELL_TOKEN_ID_REMOTE_FILE_SHARE IPMI_OEM_DELL_TOKEN_ID_VMEDIA_SHARING_VIA_CMC #define IPMI_OEM_DELL_TOKEN_ID_REMOTE_SYSLOG 0x28 #define IPMI_OEM_DELL_TOKEN_ID_GENERIC_LDAP_GROUP 0x29 #define IPMI_OEM_DELL_TOKEN_ID_LDAP_ROLE_GROUP 0x2A #define IPMI_OEM_DELL_TOKEN_ID_SSH_PK_GROUP 0x2B #define IPMI_OEM_DELL_TOKEN_ID_AD_SRV_LOOKUP_GROUP 0x2D #define IPMI_OEM_DELL_TOKEN_ID_CLOSE_RAC_SESSION_INFO 0x2E #define IPMI_OEM_DELL_TOKEN_ID_IPV4_STATIC_EXTENDED_GROUP 0x30 #define IPMI_OEM_DELL_TOKEN_ID_IPV6_STATIC_EXTENDED_GROUP 0x31 #define IPMI_OEM_DELL_TOKEN_ID_STATIC_DNS_DOMAIN_NAME_GROUP 0x32 #define IPMI_OEM_DELL_TOKEN_VERSION 0x01 #define IPMI_OEM_DELL_TOKEN_DATA_MAX 65536 #define IPMI_OEM_DELL_TOKEN_STRING_MAX 255 /* IPMI over LAN has a max payload length of 255 total. So we round * down to some reasonable guestimate of what is good. */ #define IPMI_OEM_DELL_TOKEN_WRITE_MAX 128 #define IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN 5 #define IPMI_OEM_DELL_EXTENDED_CONFIG_READ_ALL_BYTES 0xFF #define IPMI_OEM_DELL_EXTENDED_CONFIG_IN_PROGRESS 0x00 #define IPMI_OEM_DELL_EXTENDED_CONFIG_LAST_TOKEN 0x01 /* w/ IPMI_OEM_DELL_TOKEN_ID_NIC_LINK_SETTING_GROUP * * dedicated nic full duplex - boolean * dedicated nic auto negotiation - boolean * dedicated nic 10b/100b/1000b - boolean (achu: uint8?) * nic selection - uint8 * nic enable - boolean * ipv4 enable - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_FULL_DUPLEX_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_AUTO_NEGOTIATION_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_BANDWIDTH_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_NIC_SELECTION_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_NIC_ENABLE_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_IPV4_ENABLE_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_FULL_DUPLEX_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_AUTO_NEGOTIATION_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_DEDICATED_NIC_BANDWIDTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_NIC_SELECTION_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_NIC_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_NIC_LINK_SETTING_GROUP_IPV4_ENABLE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_USER_PRIVILEGE * * rac style privilege - uint32 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_PRIVILEGE_RAC_STYLE_PRIVILEGE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_PRIVILEGE_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_PRIVILEGE_RAC_STYLE_PRIVILEGE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_SNMP_GROUP * * snmp agent enable - boolean * community name for get string length - uint8 * community name for get string - 0-31 * community name for set string length - uint8 * community name for set string - 0-31 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_SNMP_AGENT_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_COMMUNITY_NAME_FOR_GET_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_COMMUNITY_NAME_FOR_SET_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_SNMP_AGENT_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_COMMUNITY_NAME_FOR_GET_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SNMP_GROUP_COMMUNITY_NAME_FOR_SET_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_DNS_AND_DDNS_GROUP * * dns dhcp enable - boolean * dnsserver1 - uint8 * 4 * dnsserver2 - uint8 * 4 * dnsregister rac - boolean * dns rac name string length - uint8 * dns rac name string - 0-63 * dns domain name dhcp enable - boolean * dns domain name string length - uint8 * dns domain name string - 0-255 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DHCP_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_SERVER_1_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_SERVER_2_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_REGISTER_RAC_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_RAC_NAME_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DOMAIN_NAME_DHCP_ENABLE_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DOMAIN_NAME_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DHCP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_SERVER_1_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_SERVER_2_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_REGISTER_RAC_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_RAC_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DOMAIN_NAME_DHCP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_AND_DDNS_GROUP_DNS_DOMAIN_NAME_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_AD_CONFIGURATION * * ad enable - boolean * ad timeout - uint32 * ad root domain string length - uint8 * ad root domain * ad rac domain string length - uint8 * ad rac domain string - 0-255 * ad rac name string length - uint8 * ad rac name string - 0-255 * ad type - uint8 * scl state - uint8 (drac5) * crl state - uint8 (drac5) * ad sso enable - boolean * ad dc filter1 string length - uint8 * ad dc filter1 string - 0-255 * ad dc filter2 string length - uint8 * ad dc filter2 string - 0-255 * ad dc filter3 string length - uint8 * ad dc filter3 string - 0-255 * ad gc filter1 string length - uint8 * ad gc filter1 string - 0-255 * ad gc filter2 string length - uint8 * ad gc filter2 string - 0-255 * ad gc filter3 string length - uint8 * ad gc filter3 string - 0-255 * ad certificate validation enable - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ENABLE_FIELD_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TIMEOUT_FIELD_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ROOT_DOMAIN_FIELD_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_DOMAIN_FIELD_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_NAME_FIELD_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TYPE_FIELD_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_SCL_STATE_FIELD_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_CRL_STATE_FIELD_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_SSO_ENABLE_FIELD_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER1_FIELD_MASK 0x0200 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER2_FIELD_MASK 0x0400 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER3_FIELD_MASK 0x0800 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER1_FIELD_MASK 0x1000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER2_FIELD_MASK 0x2000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER3_FIELD_MASK 0x4000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_CERTIFICATE_VALIDATION_ENABLE_FIELD_MASK 0x8000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ENABLE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TIMEOUT_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ROOT_DOMAIN_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_DOMAIN_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_NAME_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TYPE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_SCL_STATE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_CRL_STATE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_SSO_ENABLE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER1_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER2_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER3_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER1_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER2_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER3_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_CERTIFICATE_VALIDATION_ENABLE_FIELD_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_TYPE_EXTENDED 1 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_TYPE_STANDARD 2 /* w/ IPMI_OEM_DELL_TOKEN_ID_EMAIL_ALERT_CONFIGURATION * * indexed 1-4 * * email alert enable - boolean * email address string length - uint8 * email address string - 0-63 * email alert custon message string length - uint8 * email alert custom message string - 0-31 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ALERT_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ADDRESS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ALERT_CUSTOM_MSG_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ALERT_ENABLE \ | IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ADDRESS \ | IPMI_OEM_DELL_EXTENDED_CONFIG_EMAIL_ALERT_CONFIGURATION_EMAIL_ALERT_CUSTOM_MSG) /* w/ IPMI_OEM_DELL_TOKEN_ID_SSL_CONFIGURATION * * csr key size - uint32 * csr common name string length - uint8 * csr comomn name string - 0-255 * csr organization name string length - uint8 * csr organization name string - 0-255 * csr organization unit string length - uint8 * csr organization unit string - 0-255 * csr locality name string length - uint8 * csr locality name string - 0-255 * csr state name string length - uint8 * csr state name string - 0-255 * csr country code string length - uint8 * csr country code string - 0-4 * csr email address string length - uint8 * csr email address string - 0-255 * csr data set type - uint8 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_KEY_SIZE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_COMMON_NAME_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_ORGANIZATION_NAME_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_ORGANIZATION_UNIT_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_LOCALITY_NAME_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_STATE_NAME_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_COUNTRY_CODE_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_EMAIL_ADDRESS_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_DATA_SET_TYPE_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_KEY_SIZE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_COMMON_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_ORGANIZATION_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_ORGANIZATION_UNIT_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_LOCALITY_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_STATE_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_COUNTRY_CODE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_EMAIL_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSL_CONFIGURATION_CSR_DATA_SET_TYPE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_SSH_CONFIGURATION * * ssh enable - boolean * max connections - uint8 (read only) * active connections - uint8 (read only) * idle timeout - uint32 * port number - uint16 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ENABLE_FIELD_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_MAX_CONNECTIONS_FIELD_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ACTIVE_CONNECTIONS_FIELD_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_IDLE_TIMEOUT_FIELD_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_PORT_NUMBER_FIELD_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ENABLE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_MAX_CONNECTIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ACTIVE_CONNECTIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_IDLE_TIMEOUT_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_PORT_NUMBER_FIELD_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_TELNET_CONFIGURATION * * ssh enable - boolean * max session - uint8 (read only) * active session - uint8 (read only) * session timeout - uint32 * port number - uint16 * 7fls backspace - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ENABLE_FIELD_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_MAX_SESSIONS_FIELD_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ACTIVE_SESSIONS_FIELD_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_PORT_NUMBER_FIELD_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_7FLS_BACKSPACE_FIELD_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ENABLE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_MAX_SESSIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ACTIVE_SESSIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_PORT_NUMBER_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_7FLS_BACKSPACE_FIELD_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_WEB_SERVER_CONFIGURATION * * web server enable - boolean * max sessions - uint8 (read only) * active session - uint8 (read only) * session timeout - uint32 * http port num - uint16 * https port num - uint16 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ENABLE_FIELD_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_MAX_SESSIONS_FIELD_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ACTIVE_SESSIONS_FIELD_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUMBER_FIELD_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUMBER_FIELD_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ENABLE_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_MAX_SESSIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ACTIVE_SESSIONS_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUMBER_FIELD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUMBER_FIELD_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_CR_CONFIGURATION * * CR enable - boolean * max sessions - uint8 * active sessions - uint8 * km portnum - uint16 * cr encryption - boolean * asr enable - boolean * video portnum - uint16 * local server video - boolean * ie console use java - boolean * authorize multiple sessions - uint8 (drac5 only) */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_CR_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_MAX_SESSIONS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_ACTIVE_SESSIONS_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_KM_PORT_NUMBER_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_CR_ENCRYPTION_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_ASR_ENABLE_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_VIDEO_PORT_NUMBER_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_LOCAL_SERVER_VIDEO_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_IE_CONSOLE_USE_JAVA_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_AUTHORIZE_MULTIPLE_SESSIONS_MASK 0x0200 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_CR_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_MAX_SESSIONS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_ACTIVE_SESSIONS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_KM_PORT_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_CR_ENCRYPTION_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_ASR_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_VIDEO_PORT_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_LOCAL_SERVER_VIDEO_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_IE_CONSOLE_USE_JAVA_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CR_CONFIGURATION_AUTHORIZE_MULTIPLE_SESSIONS_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_VM_CONFIGURATION * * vm enable - uint8 (achu: boolean??) * max sessions - uint8 * active sessions - uint8 * portnum - uint16 * vm key enable - boolean * ssl port num - uint16 * vm image type - uint8 * vm image path string length - uint8 * vm image path string - 0-255 * vm image filename string length - uint8 * vm image filename string - 0-255 * vm auto-eject enable - boolean * vm floppy emul - boolean * sd card read write status - boolean (read only) */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_MAX_SESSIONS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_ACTIVE_SESSIONS_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_PORT_NUMBER_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_KEY_ENABLE_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_SSL_PORT_NUMBER_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_TYPE_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_PATH_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_FILENAME_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_AUTO_EJECT_ENABLE_MASK 0x0200 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_FLOPPY_EMUL_MASK 0x0400 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_SD_CARD_READ_WRITE_STATUS_MASK 0x0800 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_MAX_SESSIONS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_ACTIVE_SESSIONS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_PORT_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_KEY_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_SSL_PORT_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_TYPE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_PATH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_IMAGE_FILENAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_AUTO_EJECT_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_VM_FLOPPY_EMUL_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VM_CONFIGURATION_SD_CARD_READ_WRITE_STATUS_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_INFO * * rac name string length - uint8 * rac name string - 0-31 * rac description string length - uint8 * rac description string - 0-255 * rac type string length - uint8 * rac type string - 1-10 * rac product info string length - uint8 * rac product info string - 0-63 * rac hw version string length - uint8 * rac hw version string - 0-10 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_NAME_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_DESCRIPTION_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_TYPE_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_PRODUCT_INFO_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_HW_VERSION_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_DESCRIPTION_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_TYPE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_PRODUCT_INFO_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_INFO_RAC_HW_VERSION_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_FW_UPDATE * * version string length - uint8 * version string - 0-16 * build number string length - uint8 * build number string - 0-131 * tftp fw update enable - boolean * tftp fw update ip address - uint8 * 4 * tftp fw update path string length - uint8 * tftp fw update path string - 0-255 * last fw update time string length - uint8 * last fw update time string - 0-32 * tftp server address string length - uint8 * tftp server address string - 0-39 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_VERSION_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_BUILD_NUMBER_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_ENABLE_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_IP_ADDRESS_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_PATH_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_LAST_FW_UPDATE_PATH_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_SERVER_ADDRESS_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_VERSION_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_BUILD_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_FW_UPDATE_PATH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_LAST_FW_UPDATE_PATH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_FW_UPDATE_TFTP_SERVER_ADDRESS_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_SERIAL_SHELL * * enable - boolean * shell type - uint8 * com2 redirect enable - boolean * sessions timeout - uint32 * baud rate - uint32 * console no auth - boolean * escape key string length - uint8 * escape key string - 0-31 * history buffer size - uint32 * login cmd string length - uint8 (achu: doc says uint32, doubt it) * login cmd string - 0-128 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_SHELL_TYPE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_COM2_REDIRECT_ENABLE_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_SESSION_TIMEOUT_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_BAUD_RATE_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_CONSOLE_NO_AUTH_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_ESCAPE_KEY_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_HISTORY_BUFFER_SIZE_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_LOGIN_CMD_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_SHELL_TYPE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_COM2_REDIRECT_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_SESSION_TIMEOUT_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_BAUD_RATE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_CONSOLE_NO_AUTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_ESCAPE_KEY_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_HISTORY_BUFFER_SIZE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SERIAL_SHELL_LOGIN_CMD_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_MISC * * remote racadm enable - boolean * smtp sever ip address - uint8 * 4 (obsolete) * remote racadm max sessions - uint8 * remote racadm session timeout - uint32 * smtp server ipv4/ipv6/dns address string length * smtp server ipv4/ipv6/dns address string - 0-255 * smtp alerting source email name string length - uint8 * smtp alerting source email name string - 0-255 * lc drive enable - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_SERVER_IP_ADDRESS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_MAX_SESSIONS_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_SESSION_TIMEOUT_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_SERVER_ADDRESS_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_ALERTING_SOURCE_EMAIL_NAME_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_LC_DRIVE_ENABLE 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_SERVER_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_MAX_SESSIONS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_REMOTE_RACADM_SESSION_TIMEOUT_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_SERVER_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_SMTP_ALERTING_SOURCE_EMAIL_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_MISC_LC_DRIVE_ENABLE) /* w/ IPMI_OEM_DELL_TOKEN_ID_OOB_SECURITY * * enforced client ip enable - boolean * enforced client ip address - uint8 * 4 * enforced client ip mask - uint8 * 4 * enforced ip block enable - boolean * enforced ip block failure count - uint8 * enforce dip block failure window - uint32 * enforced ip block penalty time - uint32 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_ADDRESS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_MASK_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_ENABLE_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_FAILURE_COUNT_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_FAILURE_WINDOW_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_PENALTY_TIME_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_CLIENT_IP_MASK_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_FAILURE_COUNT_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_FAILURE_WINDOW_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_OOB_SECURITY_ENFORCED_IP_BLOCK_PENALTY_TIME_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_CONTROL * * indexed ?-? * * control command - uint8 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_HARD_RESET 1 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_SOFT_RESET 2 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_GRACEFUL_RESET 3 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_RESET_CONFIG_TO_DEFAULT 4 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_CLEAR_RACLOG 5 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_CLEAR_COREDUMP 6 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_START_FIRMWARE_UPDATE_PHASE1 7 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_START_FIRMWARE_UPDATE_PHASE2 8 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_TEST_EMAIL_ALERT 9 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_GENERATES_CSR 10 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_CLEAR_ASR_SCREEN 11 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_VM_DISCONNECT 12 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_RESET_RAC_CONFIG 13 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_START_TFTP_FWUPDATE 14 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_RESET_VM_KEYSIZE 15 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_GENERATES_KMC_SELF_ASSIGNED_CERTIFICATE 16 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_GENERATES_KMC_CSR 17 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CONTROL_CONTROL_COMMAND_RAC_RESET_SSL_CERTIFICATE 18 /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_LOG_FILES * * data - uint8 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_DATA_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_DATA_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_RACLOG_FILE 1 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_COREDUMP_FILE 2 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOG_FILES_TRACELOG_FILE 3 /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_CERTIFICATE_FILES * * indexed ?-? * * data - uint8 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_DATA_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_DATA_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_SERVER_CERTIFICATE_FILE 1 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CA_CERTIFICATE_FILE 2 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CSR_FILE 3 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CSR_STATUS 4 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_SERVER_CERTIFICATE_FORMATTED_VIEW 5 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CA_CERTIFICATE_FORMATTED_VIEW 6 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CA_CERTIFICATE_FILE_FOR_GENERIC_LDAP 7 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_CA_CERTIFICATE_FILE_FOR_GENERIC_LDAP_FORMATTED_VIEW 8 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_KERBEROS_KEYTAB_UPLOAD 9 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_KMS_SERVER_CERTIFICATE 10 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_KMS_CA_SERVER_CERTIFICATE 11 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_KMS_SERVER_CERTIFICATE_FORMATTED_VIEW 12 /* r */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_CERTIFICATE_FILES_KMS_CA_CERTIFICATE_FORMATTED_VIEW 13 /* r */ /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_SESSION_INFO * * login time - uint32 * client ipv4 - uint8 * 4 * associated console - uint8 * login user id string length - uint8 * login user id string - 0-255 * client ipv6/ipv4 address string length - uint8 * client ipv5/ipv4 address string - 0-39 * session id uint16 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_SESSION_TYPE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_LOGIN_TIME_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_CLIENT_IPV4_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_ASSOCIATED_CONSOLE_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_LOGIN_USER_ID_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_CLIENT_IP_ADDRESS_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_SESSION_ID_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_SESSION_TYPE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_LOGIN_TIME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_CLIENT_IPV4_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_ASSOCIATED_CONSOLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_LOGIN_USER_ID_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_CLIENT_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SESSION_INFO_SESSION_ID_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_TIME * * time zone - int32 (minutes west of greenwich) * daylight saving - uint8 (adjust minutes) */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_TIME_TIME_ZONE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_TIME_DAYLIGHT_SAVING_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_TIME_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_TIME_TIME_ZONE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_TIME_DAYLIGHT_SAVING_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_SSAD_CONFIGURATION * * ssad role group name string length - uint8 * ssad role group name string - 0-255 * ssad role group domain string length - uint8 * ssad role group domain string - 0-255 * ssad role group privilege - uint32 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_NAME_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_DOMAIN_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_PRIVILEGE_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_DOMAIN_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_SSAD_CONFIGURATION_SSAD_ROLE_GROUP_PRIVILEGE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_USER_CERT_FILES * * data - uint8 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_CERT_FILES_DATA_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_CERT_FILES_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_CERT_FILES_DATA_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_CERT_FILES_SERVER_CERTIFICATE_FILE 1 /* r/w */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_USER_CERT_FILES_CA_CERTIFICATE_FILE 2 /* r/w */ /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_LOCAL_CONFIGURATION * * bbb config disable - boolean * local config disable - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOCAL_CONFIGURATION_BBB_CONFIG_DISABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOCAL_CONFIGURATION_LOCAL_CONFIG_DISABLE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOCAL_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOCAL_CONFIGURATION_BBB_CONFIG_DISABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_LOCAL_CONFIGURATION_LOCAL_CONFIG_DISABLE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_RAC_VKVM_CONFIGURATION * * cr local consred disable - boolean * cr post consred disable - boolean */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_VKVM_CONFIGURATION_CR_LOCAL_CONSRED_DISABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_VKVM_CONFIGURATION_CR_POST_CONSRED_DISABLE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_VKVM_CONFIGURATION_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_VKVM_CONFIGURATION_CR_LOCAL_CONSRED_DISABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_RAC_VKVM_CONFIGURATION_CR_POST_CONSRED_DISABLE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_IPV6_EXTENDED_GROUP * * ipv6 enable - boolean * ipv6 addr string length - uint8 * ipv6 addr string - 0-39 * ipv6 gateway ip string length - uint8 * ipv6 gateway ip string - 0-39 * ipv6 prefix lenth - uint8 * ipv6 auto config - boolean * ipv6 link local addr string length - uint8 * ipv6 link locl address string - 0-39 (read only) * ipv6 addr2 string length - uint8 * ipv6 addr2 string 0 0-39 (read only) * ipv6 auto dns - uin8 (achu: boolean??) * ipv6 dns server1 address string length - uint8 * ipv6 dns server1 address string - 0-39 * ipv6 dns server2 address string length - uint8 * ipv6 dns server2 address string - 0-39 * reserved - uint8 * ipv6 addr2 prefix length - uint8 (read only) * ipv6 link local prefix length - uint8 (read only) * reserved - uint8 * 12 * total number of extended ip - uint8 (read only) * ipv6 extended addr X prefix length - uint8 (read only) * ipv6 extended addr X string length - uint8 (read only) * ipv6 extended addr X string - 0-39 * * achu: doc says 1-13 extended address possible. have to use index? * unclear. */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_GATEWAYY_IP_ADDRESS_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_PREFIX_LENGTH_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_AUTO_CONFIG_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_LINK_LOCAL_ADDRESS_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS2_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_AUTO_DNS_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_DNS_SERVER1_ADDRESS_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_DNS_SERVER2_ADDRESS_MASK 0x0200 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS2_PREFIX_LENGTH_MASK 0x0400 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_LINK_LOCAL_PREFIX_LENGTH_MASK 0x0800 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_TOTAL_NUMBER_OF_EXTENDED_IP_MASK 0x1000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_EXTENDED_ADDRESS_X_PREFIX_LENGTH_MASK 0x2000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_EXTENDED_ADDRESS_X_MASK 0x4000 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_GATEWAYY_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_PREFIX_LENGTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_AUTO_CONFIG_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_LINK_LOCAL_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS2_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_AUTO_DNS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_DNS_SERVER1_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_DNS_SERVER2_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_ADDRESS2_PREFIX_LENGTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_LINK_LOCAL_PREFIX_LENGTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_TOTAL_NUMBER_OF_EXTENDED_IP_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_EXTENDED_ADDRESS_X_PREFIX_LENGTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_EXTENDED_GROUP_IPV6_EXTENDED_ADDRESS_X_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_IPV6_URL_GROUP * * ldrac ipv6 url string length - uint8 * ldrac ipv6 url string - 0-80 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_URL_GROUP_LDRAC_IPV6_URL_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_URL_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_URL_GROUP_LDRAC_IPV6_URL_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_ACTIVE_DIRECTORY_USER_DOMAIN_GROUP * * indexed 1-40 * * ad user domain name string length - uint8 * ad user domain name string - 0-255 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_ACTIVE_DIRECTORY_USER_DOMAIN_GROUP_AD_USER_DOMAIN_NAME_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_ACTIVE_DIRECTORY_USER_DOMAIN_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_ACTIVE_DIRECTORY_USER_DOMAIN_GROUP_AD_USER_DOMAIN_NAME_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_SMART_CARD_GROUP * * scl state - uint8 (0,1,2) * crl state - uint8 * * used only by ldrac (achu: what is ldrac?) */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_SMART_CARD_GROUP_SCL_STATE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SMART_CARD_GROUP_CRL_STATE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SMART_CARD_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_SMART_CARD_GROUP_SCL_STATE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SMART_CARD_GROUP_CRL_STATE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_VMEDIA_SHARING_VIA_CMC * * status - boolean - 0 = disconnect, 1 = connect * image type - uint8 - 0 = use file extensions, 1 = floppy, 2 = cd * user name string length - uint8 * user name string - 0-255 * password string length - uint8 * password string - 0-255 * share and image name string length - uint16 * share and image name string - 0-511 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_STATUS_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_IMAGE_TYPE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_USER_NAME_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_PASSWORD_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_SHARE_AND_IMAGE_NAME_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_STATUS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_IMAGE_TYPE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_USER_NAME_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_PASSWORD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_SHARE_AND_IMAGE_NAME_MASK) #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_STATUS_DISCONNECT 0 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_STATUS_CONNECT 1 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_IMAGE_TYPE_USE_FILE_EXTENSIONS 0 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_IMAGE_TYPE_FLOPPY 1 #define IPMI_OEM_DELL_EXTENDED_CONFIG_VMEDIA_SHARING_VIA_CMC_IMAGE_TYPE_CD 2 /* w/ IPMI_OEM_DELL_TOKEN_ID_REMOTE_SYSLOG * * remote syslog enable - boolean * syslog port number - uint16 * remote syslog server1 string length - uint16 * remote syslog server1 string - 0-256 * remote syslog server2 string length - uint16 * remote syslog server2 string - 0-256 * remote syslog server3 string length - uint16 * remote syslog server3 string - 0-256 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_SYSLOG_PORT_NUMBER_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER1_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER2_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER3_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_SYSLOG_PORT_NUMBER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER1_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER2_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_REMOTE_SYSLOG_REMOTE_SYSLOG_SERVER3_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_GENERIC_LDAP_GROUP * * ldap enable - boolean * ldap server string length - uint16 * ladp server string - 0-1023 * ldap port - uint16 * ldap base dn string length - uint8 * ldap base dn string - 0-253 * ldap user attribute string length - uint8 * ldap user attribute string - 0-253 * ldap group attribute string length - uint8 * ldap group attribute string - 0-253 * ldap group attribute ls dn - boolean (achu: ??) * ldap bind dn string length - uint8 * ldap bind dn string - 0-253 * ldap bind password string length - uint8 * ldap bind password string - 0-253 * ldap search filter string length - uint16 * ldap search filter string - 0-1023 * */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_SERVER_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_PORT_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BASE_DN_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_USER_ATTRIBUTE_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_GROUP_ATTRIBUTE_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_ATTRIBUTE_LS_DN_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BIND_DN_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BIND_PASSWORD_MASK 0x0100 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_SEARCH_FILTER_MASK 0x0200 #define IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_SERVER_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_PORT_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BASE_DN_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_USER_ATTRIBUTE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_GROUP_ATTRIBUTE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_ATTRIBUTE_LS_DN_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BIND_DN_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_BIND_PASSWORD_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_GENERIC_LDAP_GROUP_LDAP_SEARCH_FILTER_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_LDAP_ROLE_GROUP * * indexed 1-5 * * ldap role group dn string length - uint16 * ldap role group dn string - 0-1023 * ldap role group privilege - uint32 (0x00000000 - 0x000001FF) */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_LDAP_ROLE_GROUP_LDAP_ROLE_GROUP_DN_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_LDAP_ROLE_GROUP_LDAP_ROLE_GROUP_PRIVILEGE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_LDAP_ROLE_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_LDAP_ROLE_GROUP_LDAP_ROLE_GROUP_DN_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_LDAP_ROLE_GROUP_LDAP_ROLE_GROUP_PRIVILEGE_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_SSH_PK_GROUP * * indexed 2-16 * * pk key number delete - uint8 (range 1-4) * pk key text string1 length - uint16 * pk key text string1 - 0-1023 * pk key text string2 length - uint16 * pk key text string2 - 0-1023 * pk key text string3 length - uint16 * pk key text string3 - 0-1023 * pk key text string4 length - uint16 * pk key text string4 - 0-1023 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_NUMBER_DELETE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT1_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT2_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT3_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT4_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_NUMBER_DELETE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT1_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT2_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT3_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_PK_GROUP_PK_KEY_TEXT4_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_AD_SRV_LOOKUP_GROUP * * addc srv lookup enable - uint8 (achu: boolean??) * addc srv lookup by userdomain - uint8 (achu: boolean??) * addc srv lookup domain name string length - uint8 * addc srv lookup domain name string - 0-255 * adgc srv lookup enable - uint8 (achu: boolean??) * adgc srv root domain string length - uint8 * adgc srv root domain string - 0-255 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_ENABLE 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_BY_USERDOMAIN 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_DOMAIN_NAME 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADGC_SRV_LOOKUP_ENABLE 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADGC_ROOT_DOMAIN 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_ENABLE \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_BY_USERDOMAIN \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADDC_SRV_LOOKUP_DOMAIN_NAME \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADGC_SRV_LOOKUP_ENABLE \ | IPMI_OEM_DELL_EXTENDED_CONFIG_AD_SRV_LOOKUP_GROUP_ADGC_ROOT_DOMAIN) /* w/ IPMI_OEM_DELL_TOKEN_ID_CLOSE_RAC_SESSION_INFO * * session id - uint16 * login user id string length - uint8 * login user id string - 0-255 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_CLOSE_RAC_SESSION_INFO_SESSION_ID_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CLOSE_RAC_SESSION_INFO_LOGIN_USER_ID_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_CLOSE_RAC_SESSION_INFO_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_CLOSE_RAC_SESSION_INFO_SESSION_ID_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_CLOSE_RAC_SESSION_INFO_LOGIN_USER_ID_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_IPV4_STATIC_EXTENDED_GROUP * * ipv4 static enable - boolean * ipv4 static dhcp enable - boolean * ipv4 static address - uint8 * 4 * ipv4 static netmask - uint8 * 4 * ipv4 static gateway ip address - uint8 * 4 * ipv4 static auto dns - boolean * ipv4 static dns server1 address - uint8 * 4 * ipv4 static dns server2 address - uint8 * 4 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DHCP_ENABLE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_ADDRESS_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_NETMASK_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_GATEWAY_IP_ADDRESS_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_AUTO_DNS_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DNS_SERVER1_ADDRESS_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DNS_SERVER2_ADDRESS_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DHCP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_NETMASK_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_GATEWAY_IP_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_AUTO_DNS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DNS_SERVER1_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV4_STATIC_EXTENDED_GROUP_IPV4_STATIC_DNS_SERVER2_ADDRESS_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_IPV6_STATIC_EXTENDED_GROUP * * ipv6 static enable - boolean * ipv6 static auto config - boolean * ipv6 static address string length - uint8 * ipv6 static address string - 0-39 * ipv6 static gateway ip address string length - uint8 * ipv6 static gateway ip address string - 0-39 * ipv6 static prefix length - uint8 * ipv6 static auto dns - uint8 * ipv6 static dns server1 address string length - uint8 * ipv6 static dns server1 address string - 0-39 * ipv6 static dns server2 address string length - uint8 * ipv6 static dns server2 address string - 0-39 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_AUTO_CONFIG_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_ADDRESS_STRING_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_GATEWAY_IP_ADDRESS_STRING_MASK 0x0008 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_PREFIX_LENGTH_MASK 0x0010 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_AUTO_DNS_MASK 0x0020 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_DNS_SERVER1_ADDRESS_MASK 0x0040 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_DNS_SERVER2_ADDRESS_MASK 0x0080 #define IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_AUTO_CONFIG_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_ADDRESS_STRING_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_GATEWAY_IP_ADDRESS_STRING_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_PREFIX_LENGTH_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_AUTO_DNS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_DNS_SERVER1_ADDRESS_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_IPV6_STATIC_EXTENDED_GROUP_IPV6_STATIC_DNS_SERVER2_ADDRESS_MASK) /* w/ IPMI_OEM_DELL_TOKEN_ID_STATIC_DNS_DOMAIN_NAME_GROUP * * nic static enable - boolean * nic static domain name dhcp enable - boolean * nic static domain name string length - uint8 * nic static domain name string - 0-255 */ #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_ENABLE_MASK 0x0001 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_DHCP_ENABLE_MASK 0x0002 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_DOMAIN_NAME_MASK 0x0004 #define IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_ALL_FIELD_MASK \ (IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_DHCP_ENABLE_MASK \ | IPMI_OEM_DELL_EXTENDED_CONFIG_DNS_DOMAIN_NAME_GROUP_NIC_STATIC_DOMAIN_NAME_MASK) /* w/ IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS */ #define IPMI_OEM_DELL_RESET_TO_DEFAULTS_GET_STATUS 0x00 #define IPMI_OEM_DELL_RESET_TO_DEFAULTS_INITIATE_RESULT_TO_DEFAULTS 0xAA #define IPMI_OEM_DELL_RESET_TO_DEFAULTS_IN_PROGRESS 0x00 #define IPMI_OEM_DELL_RESET_TO_DEFAULTS_COMPLETE 0x01 /* w/ IPMI_CMD_OEM_DELL_SET_NIC_SELECTION / IPMI_CMD_OEM_DELL_GET_NIC_SELECTION */ #define IPMI_OEM_DELL_NIC_SELECTION_SHARED 0x00 #define IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_NIC2 0x01 #define IPMI_OEM_DELL_NIC_SELECTION_DEDICATED 0x02 #define IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_ALL_NICS 0x03 /* w/ IPMI_CMD_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS */ #define IPMI_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS_OFF 0x00 #define IPMI_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS_ON 0x01 /* w/ IPMI_CMD_OEM_DELL_GET_ACTIVE_LOM_STATUS */ #define IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_GET_STATUS 0x00 #define IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_STATUS 0x01 #define IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_SPEED 0x02 #define IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_MODE 0x03 #define IPMI_OEM_DELL_LOM_STATUS_NO_ACTIVE_LOM 0x00 #define IPMI_OEM_DELL_LOM_STATUS_LOM_1 0x01 #define IPMI_OEM_DELL_LOM_STATUS_LOM_2 0x02 #define IPMI_OEM_DELL_LOM_STATUS_LOM_3 0x03 #define IPMI_OEM_DELL_LOM_STATUS_LOM_4 0x04 #define IPMI_OEM_DELL_LOM_STATUS_DEDICATED 0x05 #define IPMI_OEM_DELL_LOM_STATUS_UNKNOWN 0xFF #define IPMI_OEM_DELL_LOM_LINK_STATUS_BITMASK 0x0F #define IPMI_OEM_DELL_LOM_LINK_STATUS_SHIFT 0 #define IPMI_OEM_DELL_LOM_LINK_STATUS_NO_LINK 0 #define IPMI_OEM_DELL_LOM_LINK_STATUS_LINK_PRESENT 1 #define IPMI_OEM_DELL_LOM_LINK_SPEED_BITMASK 0x0F #define IPMI_OEM_DELL_LOM_LINK_SPEED_SHIFT 0 #define IPMI_OEM_DELL_LOM_LINK_SPEED_10MBPS 0x00 #define IPMI_OEM_DELL_LOM_LINK_SPEED_100MBPS 0x01 #define IPMI_OEM_DELL_LOM_LINK_SPEED_1GBPS 0x02 #define IPMI_OEM_DELL_LOM_LINK_SPEED_UNKNOWN 0x0F #define IPMI_OEM_DELL_LOM_LINK_MODE_BITMASK 0x0F #define IPMI_OEM_DELL_LOM_LINK_MODE_SHIFT 0 #define IPMI_OEM_DELL_LOM_LINK_MODE_HALF_DUPLEX 0x00 #define IPMI_OEM_DELL_LOM_LINK_MODE_FULL_DUPLEX 0x01 #define IPMI_OEM_DELL_LOM_LINK_MODE_UNKNOWN 0x0F /* w/ IPMI_CMD_OEM_DELL_RESET_POWER_CONSUMPTION_DATA */ #define IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_CUMULATIVE 0x01 #define IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_PEAK 0x02 #define IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_ALL 0x04 /* w/ IPMI_CMD_OEM_DELL_POWER_SUPPLY_INFO */ #define IPMI_OEM_DELL_POWER_SUPPLY_INFO_AC 0x00 #define IPMI_OEM_DELL_POWER_SUPPLY_INFO_DC 0x01 /* w/ IPMI_CMD_OEM_DELL_POWER_CONSUMPTION */ #define IPMI_OEM_DELL_POWER_CONSUMPTION_ENTITY_INSTANCE_ALL 0x00 /* w/ IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS */ #define IPMI_OEM_DELL_GET_POWER_CAPACITY_STATUS_BITMASK 0x01 #define IPMI_OEM_DELL_GET_POWER_CAPACITY_STATUS_SHIFT 0 #define IPMI_OEM_DELL_GET_POWER_CAPACITY_IS_SETTABLE_BITMASK 0x02 #define IPMI_OEM_DELL_GET_POWER_CAPACITY_IS_SETTABLE_SHIFT 1 #define IPMI_OEM_DELL_SET_POWER_CAPACITY_STATUS_ENABLE 0x01 #define IPMI_OEM_DELL_SET_POWER_CAPACITY_STATUS_DISABLE 0x00 /* * Dell Poweredge R720 */ /* w/ IPMI_CMD_OEM_DELL_GET_BLADE_SLOT_ID */ #define IPMI_OEM_DELL_SLEEVE_BASED_BLADE_BITMASK 0x80 #define IPMI_OEM_DELL_SLEEVE_BASED_BLADE_SHIFT 7 #define IPMI_OEM_DELL_BLADE_SLOT_NUMBER_BITMASK 0x3F #define IPMI_OEM_DELL_BLADE_SLOT_NUMBER_SHIFT 0 #define IPMI_OEM_DELL_SLEEVE_BASED_BLADE_YES 1 #define IPMI_OEM_DELL_SLEEVE_BASED_BLADE_NO 0 #define IPMI_OEM_DELL_SLEEVE_A_RANGE_MIN 1 #define IPMI_OEM_DELL_SLEEVE_A_RANGE_MAX 8 #define IPMI_OEM_DELL_SLEEVE_B_RANGE_MIN 17 #define IPMI_OEM_DELL_SLEEVE_B_RANGE_MAX 24 #define IPMI_OEM_DELL_SLEEVE_C_RANGE_MIN 9 #define IPMI_OEM_DELL_SLEEVE_C_RANGE_MAX 16 #define IPMI_OEM_DELL_SLEEVE_D_RANGE_MIN 25 #define IPMI_OEM_DELL_SLEEVE_D_RANGE_MAX 32 /* w/ IPMI_CMD_OEM_DELL_SET_NIC_SELECTION_FAILOVER * IPMI_CMD_OEM_DELL_GET_NIC_SELECTION_FAILOVER */ #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_DEDICATED 0x01 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM1 0x02 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM2 0x03 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM3 0x04 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM4 0x05 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_NONE 0x00 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM1 0x02 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM2 0x03 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM3 0x04 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM4 0x05 #define IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_ALL 0x06 /* w/ IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2 * IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2 */ #define IPMI_OEM_DELL_POWER_MONITORING_SYSTEM_POWER 0x00 #define IPMI_OEM_DELL_POWER_MONITORING_CPU1_SUBSYSTEM 0x01 #define IPMI_OEM_DELL_POWER_MONITORING_CPU2_SUBSYSTEM 0x02 #define IPMI_OEM_DELL_POWER_MONITORING_CPU3_SUBSYSTEM 0x03 #define IPMI_OEM_DELL_POWER_MONITORING_CPU4_SUBSYSTEM 0x04 #define IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN1 0x05 #define IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN2 0x06 #define IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN3 0x07 #define IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN4 0x08 #define IPMI_OEM_DELL_POWER_MONITORING_DRIVES 0x09 #define IPMI_OEM_DELL_POWER_MONITORING_FANS 0x0A #define IPMI_OEM_DELL_POWER_MONITORING_PCIE_ADD_IN_CARDS 0x0B #define IPMI_OEM_DELL_POWER_MONITORING_GPU_CABLES 0x0C /* averaging interval 30-900s */ #define IPMI_OEM_DELL_POWER_MONITORING_RETURN_AVG_MIN_MAX_POWER 0x00 /* averaging interval 5-900s */ #define IPMI_OEM_DELL_POWER_MONITORING_RETURN_ONLY_AVG_POWER 0x01 #define IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_MIN 5 #define IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_MAX 900 #define IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_AVG_MIN_MAX_MIN 30 /* * Dell Poweredge C410x */ /* w/ IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL */ #define IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN 1 #define IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX 16 /* w/ IPMI_CMD_OEM_DELL_PORT_MAP */ #define IPMI_OEM_DELL_PORT_MAP_GET_SET_BITMASK 0x80 #define IPMI_OEM_DELL_PORT_MAP_GET_SET_SHIFT 7 #define IPMI_OEM_DELL_PORT_MAP_GET 0 #define IPMI_OEM_DELL_PORT_MAP_SET 1 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_REQUEST_BITMASK 0x70 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_REQUEST_SHIFT 4 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_RESPONSE_BITMASK 0xF0 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_RESPONSE_SHIFT 4 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_JUMPER 1 #define IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_BMC 2 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_BITMASK 0x08 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_SHIFT 3 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_BITMASK 0x04 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_SHIFT 2 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_BITMASK 0x02 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_SHIFT 1 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_BITMASK 0x01 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_SHIFT 0 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2 1 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_4 0 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_MIN 1 #define IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_MAX 16 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_BITMASK 0xF0 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_SHIFT 4 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_BITMASK 0x0F #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_SHIFT 0 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8_NOT_SUPPORTED 0 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4 1 #define IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8 2 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-fujitsu-spec.h0000644002055400205540000002773713527331636027033 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_FUJITSU_SPEC_H #define IPMI_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Fujitsu iRMC S1 / iRMC S2 * * All of the below are from * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf */ /* w/ IPMI_CMD_OEM_FUJITSU_POWER */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_ON_SOURCE 0x15 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_OFF_SOURCE 0x16 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SET_POWER_OFF_INHIBIT 0x1C #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_OFF_INHIBIT 0x1D #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SET_NEXT_POWER_ON_TIME 0x20 /* w/ IPMI_CMD_OEM_FUJITSU_COMMUNICATION */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SYSTEM_OS_SHUTDOWN_REQUEST 0x05 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SYSTEM_OS_SHUTDOWN_REQUEST_AND_RESET 0x06 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_AGENT_CONNECT_STATUS 0x08 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SHUTDOWN_REQUEST_CANCELLED 0x09 /* w/ IPMI_CMD_OEM_FUJITSU_FAN_TEST */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_WRITE_TO_SYSTEM_DISPLAY 0x02 /* w/ IPMI_CMD_OEM_FUJITSU_BIOS */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_BIOS_POST_STATE 0x09 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_CPU_INFO 0x15 /* w/ IPMI_CMD_OEM_FUJITSU_SYSTEM */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SYSTEM_STATUS 0x10 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_EEPROM_VERSION_INFO 0x12 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SEL_ENTRY_LONG_TEXT 0x43 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SEL_ENTRY_TEXT 0x45 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SET_IDENTIFY_LED 0xB0 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_IDENTIFY_LED 0xB1 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_ERROR_LED 0xB3 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_RESET_NONVOLATILE_CFG_VARIABLES_TO_DEFAULT 0xDF #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_RESET_CONFIGSPACE_VARIABLES_TO_DEFAULT 0xE0 /* w/ IPMI_CMD_OEM_FUJITSU_GET_REMOTE_STORAGE_CONNECTION_OR_STATUS */ /* achu: making up names, not listed in documents */ #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_REMOTE_STORAGE_CONNECTED 0x01 #define IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_REMOTE_STORAGE_STATUS 0x02 /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_ON_SOURCE */ #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_SOFTWARE_OR_COMMAND 0x00 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWER_SWITCH 0x01 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_POWER_FAILURE 0x02 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_CLOCK_OR_TIMER 0x03 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_FAN_FAILURE_SHUTDOWN 0x04 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_CRITICAL_TEMPERATURE_SHUTDOWN 0x05 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_WATCHDOG_TIMEOUT 0x08 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REMOTE_ON 0x09 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_A_CPU_ERROR 0x0C #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_BY_HARDWARE_RESET 0x15 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_WARM_START 0x16 #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWERED_ON_BY_A_PCI_BUS_POWER_MANAGEMENT_EVENT 0x1A #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWERED_ON_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER 0x1D #define IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_RESET_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER 0x1E /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_OFF_SOURCE */ #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_SOFTWARE 0x00 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_POWER_SWITCH 0x01 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_AC_POWER_FAIL 0x02 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_CLOCK_OR_TIMER 0x03 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FAN_FAILURE 0x04 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_CRITICAL_TEMPERATURE 0x05 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FINAL_POWER_OFF_AFTER_REPEATED_WATCHDOG_TIMEOUTS 0x08 #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FINAL_POWER_OFF_AFTER_REPEATED_CPU_ERRORS 0x0C #define IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_POWERED_OFF_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER 0x1D /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SYSTEM_STATUS */ #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SYSTEM_POWER_BITMASK 0x80 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SYSTEM_POWER_SHIFT 7 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SEL_ENTRIES_AVAILABLE_BITMASK 0x10 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SEL_ENTRIES_AVAILABLE_SHIFT 4 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_WATCHDOG_ACTIVE_BITMASK 0x04 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_WATCHDOG_ACTIVE_SHIFT 2 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_AGENT_CONNECTED_BITMASK 0x02 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_AGENT_CONNECTED_SHIFT 1 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_POST_STATE_BITMASK 0x01 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_POST_STATE_SHIFT 0 /* rename from "localize" */ /* Bit 7 */ #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_LOCAL_LED_BITMASK 0x80 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_LOCAL_LED_SHIFT 7 /* Bit 6..4 currently undefined */ /* Bit 3..2 */ #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_CSS_LED_BITMASK 0x0C #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_CSS_LED_SHIFT 2 /* Bit 1..0 */ #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_GLOBAL_ERROR_LED_BITMASK 0x03 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_GLOBAL_ERROR_LED_SHIFT 0 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SEL_MODIFIED_NEW_SEL_ENTRY_BITMASK 0x80 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SEL_MODIFIED_NEW_SEL_ENTRY_SHIFT 7 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SEL_MODIFIED_SEL_CLEARED_BITMASK 0x40 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SEL_MODIFIED_SEL_CLEARED_SHIFT 6 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SDR_MODIFIED_BITMASK 0x20 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_SDR_MODIFIED_SHIFT 5 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_NONVOLATILE_IPMI_VARIABLE_MODIFIED_BITMASK 0x10 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_NONVOLATILE_IPMI_VARIABLE_MODIFIED_SHIFT 4 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_CONFIGSPACE_MODIFIED_BITMASK 0x08 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_CONFIGSPACE_MODIFIED_SHIFT 3 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_NEW_OUTPUT_ON_LOCALVIEW_DISPLAY_BITMASK 0x01 #define IPMI_OEM_FUJITSU_SYSTEM_STATUS_NOTIFICATIONS_NEW_OUTPUT_ON_LOCALVIEW_DISPLAY_SHIFT 0 /* achu: not defined in Fujitsu docs. "off" is confirmed to be * correct, but "on" and "blink" are being gussed based on ordering of * error leds in LED sections. */ #define IPMI_OEM_FUJITSU_CSS_LED_OFF 0x0 #define IPMI_OEM_FUJITSU_CSS_LED_ON 0x1 #define IPMI_OEM_FUJITSU_CSS_LED_BLINK 0x2 /* achu: not defined in Fujitsu docs. "off" is confirmed to be * correct, but "on" and "blink" are being gussed based on ordering of * error leds in LED sections. */ #define IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_OFF 0x0 #define IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_ON 0x1 #define IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_BLINK 0x2 /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_EEPROM_VERSION_INFO */ #define IPMI_OEM_FUJITSU_EEPROM_NUMBER_MIN 0 #define IPMI_OEM_FUJITSU_EEPROM_NUMBER_MAX 1 #define IPMI_OEM_FUJITSU_EEPROM_CHECKSUM_OK 0x01 #define IPMI_OEM_FUJITSU_EEPROM_CHECKSUM_ERROR 0x00 /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SEL_ENTRY_LONG_TEXT */ #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_READ_LENGTH 32 #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_READ_LENGTH 100 #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_DATA_LENGTH 80 #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_DATA_LENGTH 100 #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_READ_LENGTH 100 #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH 100 /* * CSS (Customer Self Service) * * If the component is marked as CSS, the customer can replace it by * himself without a service technican (e.g. Memory DIMM etc.) CSS is * combined with the severity information. */ #define IPMI_OEM_FUJITSU_CSS_BITMASK 0x80 #define IPMI_OEM_FUJITSU_CSS_SHIFT 7 /* * Severity of a decoded event. All events should have an assigned severity. */ #define IPMI_OEM_FUJITSU_SEVERITY_BITMASK 0x70 #define IPMI_OEM_FUJITSU_SEVERITY_SHIFT 4 #define IPMI_OEM_FUJITSU_CSS_COMPONENT 1 #define IPMI_OEM_FUJITSU_NO_CSS_COMPONENT 0 #define IPMI_OEM_FUJITSU_SEVERITY_INFORMATIONAL 0 #define IPMI_OEM_FUJITSU_SEVERITY_MINOR 1 #define IPMI_OEM_FUJITSU_SEVERITY_MAJOR 2 #define IPMI_OEM_FUJITSU_SEVERITY_CRITICAL 3 /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SET_IDENTIFY_LED / IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_IDENTIFY_LED */ #define IPMI_OEM_FUJITSU_IDENTIFY_LED_ON 0x1 #define IPMI_OEM_FUJITSU_IDENTIFY_LED_OFF 0x0 #define IPMI_OEM_FUJITSU_IDENTIFY_LED_BITMASK 0x01 #define IPMI_OEM_FUJITSU_IDENTIFY_LED_SHIFT 0 /* IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_ERROR_LED */ #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_OFF 0 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_ON 1 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_BLINK 2 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_OFF 3 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_ON 4 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_BLINK 5 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_OFF 6 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_ON 7 #define IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_BLINK 8 /* w/ IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_REMOTE_STORAGE_STATUS */ #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_CONNECTION_MIN 0 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_CONNECTION_MAX 1 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_CONNECTED 0x01 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_NOT_CONNECTED 0x00 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_INVALID_UNKNOWN 0x00 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_IDLE 0x01 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_ATTEMPT_PENDING 0x02 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTED 0x03 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_ATTEMPTS_RETRIES_EXHAUSTED_FAILED 0x04 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_LOST 0x05 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_DISCONNECT_PENDING 0x06 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_INVALID_UNKNOWN 0x00 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_STORAGE_SERVER_IPMI 0x01 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_APPLET 0x02 #define IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_NONE_NOT_CONNECTED 0x03 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_FUJITSU_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-gigabyte-spec.h0000644002055400205540000000254713527331636027125 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_GIGABYTE_SPEC_H #define IPMI_OEM_GIGABYTE_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * GIGABYTE MD90-FS0-ZB */ /* w/ IPMI_CMD_OEM_GIGABYTE_CONFIGURATION */ #define IPMI_OEM_GIGABYTE_NIC_MODE_DEDICATED 0x01 #define IPMI_OEM_GIGABYTE_NIC_MODE_SHARED 0x02 #define IPMI_OEM_GIGABYTE_NIC_MODE_FAILOVER 0x03 /* w/ IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION */ #define IPMI_OEM_GIGABYTE_BLOCK_PORT 0 #define IPMI_OEM_GIGABYTE_UNBLOCK_PORT 1 /* w/ IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION2 */ #define IPMI_OEM_GIGABYTE_PORT_DISABLED 0 #define IPMI_OEM_GIGABYTE_PORT_ENABLED 1 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_GIGABYTE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-ibm-spec.h0000644002055400205540000001313013527331636026067 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_IBM_SPEC_H #define IPMI_OEM_IBM_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * IBM x3455/x3755 */ /* w/ IPMI_CMD_OEM_IBM_GET_LED */ #define IPMI_OEM_IBM_LED_STATE_INACTIVE 0x0 #define IPMI_OEM_IBM_LED_ACTIVE_BY_LED 0x1 #define IPMI_OEM_IBM_LED_ACTIVE_BY_SENSOR 0x2 #define IPMI_OEM_IBM_LED_ACTIVE_BY_USER 0x3 #define IPMI_OEM_IBM_LED_ACTIVE_BY_BIOS_OR_ADMINISTRATOR 0x4 #define IPMI_OEM_IBM_LED_X3455_LOCATION 0x1 #define IPMI_OEM_IBM_LED_X3755_CPU 0x0010 #define IPMI_OEM_IBM_LED_X3755_CPU1 0x0030 #define IPMI_OEM_IBM_LED_X3755_CPU2 0x0031 #define IPMI_OEM_IBM_LED_X3755_CPU3 0x0032 #define IPMI_OEM_IBM_LED_X3755_CPU4 0x0033 #define IPMI_OEM_IBM_LED_X3755_CPU1_BOARD 0x00B8 #define IPMI_OEM_IBM_LED_X3755_CPU2_BOARD 0x00B9 #define IPMI_OEM_IBM_LED_X3755_CPU3_BOARD 0x00BA #define IPMI_OEM_IBM_LED_X3755_CPU4_BOARD 0x00BB #define IPMI_OEM_IBM_LED_X3755_DIMM_1 0x0060 #define IPMI_OEM_IBM_LED_X3755_DIMM_2 0x0061 #define IPMI_OEM_IBM_LED_X3755_DIMM_3 0x0062 #define IPMI_OEM_IBM_LED_X3755_DIMM_4 0x0063 #define IPMI_OEM_IBM_LED_X3755_DIMM_5 0x0064 #define IPMI_OEM_IBM_LED_X3755_DIMM_6 0x0065 #define IPMI_OEM_IBM_LED_X3755_DIMM_7 0x0066 #define IPMI_OEM_IBM_LED_X3755_DIMM_8 0x0067 #define IPMI_OEM_IBM_LED_X3755_DIMM_9 0x0068 #define IPMI_OEM_IBM_LED_X3755_DIMM_10 0x0069 #define IPMI_OEM_IBM_LED_X3755_DIMM_11 0x006A #define IPMI_OEM_IBM_LED_X3755_DIMM_12 0x006B #define IPMI_OEM_IBM_LED_X3755_DIMM_13 0x006C #define IPMI_OEM_IBM_LED_X3755_DIMM_14 0x006D #define IPMI_OEM_IBM_LED_X3755_DIMM_15 0x006E #define IPMI_OEM_IBM_LED_X3755_DIMM_16 0x006F #define IPMI_OEM_IBM_LED_X3755_DIMM_17 0x00C0 #define IPMI_OEM_IBM_LED_X3755_DIMM_18 0x00C1 #define IPMI_OEM_IBM_LED_X3755_DIMM_19 0x00C2 #define IPMI_OEM_IBM_LED_X3755_DIMM_20 0x00C3 #define IPMI_OEM_IBM_LED_X3755_DIMM_21 0x00C4 #define IPMI_OEM_IBM_LED_X3755_DIMM_22 0x00C5 #define IPMI_OEM_IBM_LED_X3755_DIMM_23 0x00C6 #define IPMI_OEM_IBM_LED_X3755_DIMM_24 0x00C7 #define IPMI_OEM_IBM_LED_X3755_DIMM_25 0x00C8 #define IPMI_OEM_IBM_LED_X3755_DIMM_26 0x00C9 #define IPMI_OEM_IBM_LED_X3755_DIMM_27 0x00CA #define IPMI_OEM_IBM_LED_X3755_DIMM_28 0x00CB #define IPMI_OEM_IBM_LED_X3755_DIMM_29 0x00CC #define IPMI_OEM_IBM_LED_X3755_DIMM_30 0x00CD #define IPMI_OEM_IBM_LED_X3755_DIMM_31 0x00CE #define IPMI_OEM_IBM_LED_X3755_DIMM_32 0x00CF #define IPMI_OEM_IBM_LED_X3755_FAN 0x0014 #define IPMI_OEM_IBM_LED_X3755_FAN_1 0x0050 #define IPMI_OEM_IBM_LED_X3755_FAN_2 0x0051 #define IPMI_OEM_IBM_LED_X3755_FAN_3 0x0052 #define IPMI_OEM_IBM_LED_X3755_FAN_4 0x0053 #define IPMI_OEM_IBM_LED_X3755_FAN_5 0x0054 #define IPMI_OEM_IBM_LED_X3755_FAN_6 0x0055 #define IPMI_OEM_IBM_LED_X3755_FAN_7 0x0056 #define IPMI_OEM_IBM_LED_X3755_FAN_8 0x0057 #define IPMI_OEM_IBM_LED_X3755_PCI 0x0020 #define IPMI_OEM_IBM_LED_X3755_PCI_1 0x0070 #define IPMI_OEM_IBM_LED_X3755_PCI_2 0x0071 #define IPMI_OEM_IBM_LED_X3755_PCI_3 0x0072 #define IPMI_OEM_IBM_LED_X3755_PCI_4 0x0073 #define IPMI_OEM_IBM_LED_X3755_PCI_5 0x0074 #define IPMI_OEM_IBM_LED_X3755_PCI_6 0x0075 #define IPMI_OEM_IBM_LED_X3755_SERVERAID_8K_BATT 0x00D0 #define IPMI_OEM_IBM_LED_X3755_SERVERAID_8K_ERR 0x00D1 #define IPMI_OEM_IBM_LED_X3755_ALERT 0x00D9 #define IPMI_OEM_IBM_LED_X3755_BK_BLUE 0x00D8 #define IPMI_OEM_IBM_LED_X3755_BOARD 0x000E #define IPMI_OEM_IBM_LED_X3755_CNFG 0x0006 #define IPMI_OEM_IBM_LED_X3755_DASD 0x0013 #define IPMI_OEM_IBM_LED_X3755_FAULT 0x0000 #define IPMI_OEM_IBM_LED_X3755_HTX 0x00B0 #define IPMI_OEM_IBM_LED_X3755_INFO 0x0003 #define IPMI_OEM_IBM_LED_X3755_LOCATION 0x0001 #define IPMI_OEM_IBM_LED_X3755_MEM 0x0015 #define IPMI_OEM_IBM_LED_X3755_NMI 0x0019 #define IPMI_OEM_IBM_LED_X3755_OVERSPEC 0x001B #define IPMI_OEM_IBM_LED_X3755_RAID 0x000F #define IPMI_OEM_IBM_LED_X3755_SEER 0x000B #define IPMI_OEM_IBM_LED_X3755_SP 0x001E #define IPMI_OEM_IBM_LED_X3755_TEMP 0x001C #define IPMI_OEM_IBM_LED_X3755_VRM 0x0011 #define IPMI_OEM_IBM_LED_X3755_UNKNOWN1 0x0040 #define IPMI_OEM_IBM_LED_X3755_UNKNOWN2 0x0041 #define IPMI_OEM_IBM_LED_X3755_UNKNOWN3 0x0047 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_IBM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-intel-spec.h0000644002055400205540000001156713527331636026447 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTEL_SPEC_H #define IPMI_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X */ /* w/ IPMI_CMD_OEM_INTEL_RESTORE_CONFIGURATION */ #define IPMI_OEM_INTEL_RESTORE_CONFIGURATION_OPERATION_INITIATE_RESTORE 0xAA #define IPMI_OEM_INTEL_RESTORE_CONFIGURATION_OPERATION_GET_RESTORE_STATUS 0x00 #define IPMI_OEM_INTEL_RESTORE_CONFIGURATION_RESTORE_PROGRESS_RESTORE_IN_PROGRESS 0x00 #define IPMI_OEM_INTEL_RESTORE_CONFIGURATION_RESTORE_PROGRESS_RESTORE_COMPLETED 0x01 /* w/ IPMI_CMD_OEM_INTEL_SET_SMTP_CONFIGURATION / IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP 0x00 /* MS byte first */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS 0x01 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME 0x02 /* write only */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD 0x03 /* read only */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS 0x04 /* max 2 blocks - doc says 64 bytes, but 2 blocks appears to be correct */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS 0x05 /* max 2 blocks */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT 0x06 /* max 4 blocks */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT 0x07 /* max 4 blocks according to doc, but according to firmware max 1 block when you write */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS 0x08 /* max 2 blocks */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME 0x09 #define IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH 16 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME_MAX_BLOCKS 1 /* XXX: document says max 20 bytes, but fails on second block, so we use 1 block */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD_MAX_BLOCKS 1 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS_MAX_BLOCKS 2 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT_MAX_BLOCKS 2 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT_MAX_BLOCKS 4 /* XXX: document indicates 2 blocks, but firmware has errors on > 1 block, so we use 1 block */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS_MAX_BLOCKS 1 /* XXX: document indicates 2 blocks, but firmware has errors on > 1 block, so we use 1 block */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME_MAX_BLOCKS 1 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX (4*IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH) #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD_LENGTH_MAX 20 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_VALID(__value) \ (((__value + 1) >= (IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP + 1) \ && (__value) <= IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME) ? 1 : 0) #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_SET_SELECTOR 0x0 #define IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_BLOCK_SELECTOR 0x0 #define IPMI_OEM_INTEL_SMTP_ENABLE_BITMASK 0x01 #define IPMI_OEM_INTEL_SMTP_ENABLE_SHIFT 0 #define IPMI_OEM_INTEL_SMTP_ENABLE 0x1 #define IPMI_OEM_INTEL_SMTP_DISABLE 0x0 /* * Intel S2600JF/Appro 512X */ /* w/ IPMI_CMD_OEM_INTEL_SET_POWER_RESTORE_DELAY / IPMI_CMD_OEM_INTEL_GET_POWER_RESTORE_DELAY */ #define IPMI_OEM_INTEL_POWER_RESTORE_DELAY_MSB_MASK 0x07 #define IPMI_OEM_INTEL_POWER_RESTORE_DELAY_LSB_MASK 0xFF #define IPMI_OEM_INTEL_POWER_RESTORE_DELAY_MAX 0x07FF /* * Intel S2600WT2 */ /* w/ IPMI_CMD_OEM_INTEL_GET_BMC_SERVICE_STATUS / IPMI_CMD_OEM_INTEL_CONTROL_BMC_SERVICES */ #define IPMI_OEM_INTEL_DISABLE_SERVICES 0x00 #define IPMI_OEM_INTEL_ENABLE_SERVICES 0x01 #define IPMI_OEM_INTEL_STANDARD_SERVICES_SSH 0x80 #define IPMI_OEM_INTEL_STANDARD_SERVICES_HTTP 0x20 #define IPMI_OEM_INTEL_STANDARD_SERVICES_RMCP 0x08 #define IPMI_OEM_INTEL_OEM_SPECIFIC_SERVICES_KVM 0x80 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-inventec-spec.h0000644002055400205540000004016413527331636027142 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INVENTEC_SPEC_H #define IPMI_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: all named from doc except 'lan' configuration id, which I assumed names */ /* w/ IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION / IPMI_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS 0x06 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION 0x0C #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_LOG 0x0E #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION 0x0F #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE 0x10 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT 0x11 /* nic status - 1 byte, 0 = shared, 1 = dedicated */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE 0x01 /* sol idle timeout - 2 bytes, ls byte first, 0h = no timeout, default = 01h * * telnet/ssh redirect enable - 1 byte, 0 = disable, 1 = enabled */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE 0x02 /* service disabled - 1 byte, bitmask * - 0x01 = all service except IPMI are disabled * (takes precedence over other bits) * - 0x02 = KVM/Virtual Storage * - 0x04 = HTTP/HTTPS * - 0x08 = SSH/Telnet * * max authentication failures - 1 byte, 0 = disable * * lockout window - 2 bytes, in seconds, 0 = disable, default = 180 * * lockout time - 2 bytes, in seconds, 0 = disable, default = 3600 */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_MAX_AUTHENTICATION_FAILURES 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_WINDOW 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_TIME 0x04 /* number of user - 1 byte, read only * * number of enabled user - 1 byte, read only * * user name - 1-17 bytes, read only * - Inventec 5441/Xanadu II - reports stored as p-string, does not return p-string * - Inventec 5442/Xanadu III - returns as p-string * * account status - 1 byte * - 0x00 - status unspecified * - 0x01 - enabled via set user password * - 0x02 - disabled via set user password * - 0x03 - user id is lockout */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_USER 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_ENABLED_USER 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS 0x04 /* DNS DHCP enable - 1 byte, 0 - false, 1 - true * - DNS server IP addresses should be assigned from DHCP server * * DNS Server1 - 4 bytes * - IP address for DNS server 1, read only if DNS DHCP Enable and DHCP are enabled * * DNS Server2 - 4 bytes * - IP address for DNS server 2, read only if DNS DHCP Enable and DHCP are enabled * * DNS Register BMC - 0 - false, 1 - true * - Enable registering the BMC host name on the DNS server * * DNS BMC Host Name - 1-64 bytes * - Specifies the DNS BMC host name, read only if DNS Register BMC is TRUE. * - Stored as P-string * * DNS Domain Name DHCP Enable - 1 byte * - DNS domain name should be assigned from DHCP * * DNS Domain Name - 1-256 bytes * - DNS domain name string, read only if DNS Domain Name DHCP Enable is TRUE * - Stored as P-string */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE 0x06 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME 0x07 /* web server enabled - 1 byte, 0 = false, 1 = true (default) * * max web sessions - 1 byte, read only * * active web sessions - 1 byte, read only * * web server timeout - 4 bytes, in seconds, 0 = disable, range 60-1920, default 300 * * http port num - 2 bytes, default 80 * * https port num - 2 bytes, default 443 */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM 0x06 /* entity - 1 byte (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * * update date / time - 3 bytes, from 0:00 1/1/08, lsbyte first */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_ENTITY 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_FIRMWARE_VERSION 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BRANCH 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BUILD_INFORMATION 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_UPDATE_DATE_TIME 0x05 /* name - 1-16 bytes (read only) * * description - 1-256 bytes (read only) * * entity - 1 byte (read only) * * product info - 1-64 bytes (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH 0x06 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION 0x07 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN 16 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN 256 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN 64 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN 16 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN 16 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN 16 /* remote update enable - 1 byte, ?? * * protocol - 1 byte, bitmask, 7:3 reserved, 2 : http, 1: ftp, 0: tftp (read only) * * uri - 1-256 bytes * note - first char should be a file or unit separator * * connection retry - 1 byte, 0 = no retries * * retry interval - 1 byte, in 5 second increments * * delay time - 1 byte, in seconds, 0h = immediate, ffh = random between 5 and 10 */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_CONNECTION_RETRY 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME 0x06 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS 5 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN 256 /* power management enable - 1 byte, bit 7: 0 = disable, 1 = enable, reset reserved * * power staggery ac recovery - 1 byte, 0x00 = immediate power on * (default), 0x01 = auto, random between min and max below, 0x02 = * user defined, must be between min and max below * * power on delay - 2 bytes * * minimum power on delay - 2 bytes (read only) * * maximum power on delay - 2 bytes */ #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY 0x03 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY 0x05 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES 0xFF /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED 0x00 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED 0x01 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL 0x00 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS 0x04 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET 0x08 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED 0x00 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT 0x03 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX 64 /* IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX 256 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_BMC 0 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_SYSTEM_BIOS 1 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_PDB 2 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_FCB 3 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_TFTP 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_FTP 0x02 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_HTTP 0x04 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_DELAY_TIME_RANDOM 0xFF /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE */ /* DPNM = Dynamic Power Node Management */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_BITMASK 0x80 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT 7 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_ENABLE 1 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_DISABLE 0 /* w/ IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY */ #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE 0x00 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO 0x01 #define IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED 0x02 /* w/ IPMI_CMD_OEM_INVENTEC_UPDATE_FIRMARE */ #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_INTERFACE_SYSTEM_INTERFACE 0x00 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_INTERFACE_NETWORKING 0x01 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_INTERFACE_USB 0x02 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_BITMASK 0x80 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_SHIFT 7 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_FORCE_UPDATE 1 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_NORMAL_UPDATE 0 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_OEM_DELL_CONFIG_PRESERVE 0x00 #define IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_OEM_DELL_CONFIG_NOPRESERVE 0x01 /* w/ IPMI_CMD_OEM_INVENTEC_GET_UPDATE_STATUS */ #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_TRANSMITTING_IMAGE 0x00 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_VALIDATING_IMAGE 0x01 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_PROGRAMMING 0x02 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_READY_TO_ACCEPT_IMAGE 0x03 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_GENERAL_ERROR 0x80 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_CANNOT_ESTABLISH_CONNECTION 0x81 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_PATH_NOT_FOUND 0x82 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_TRANSMISSION_ABORT 0x83 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_CHECKSUM_ERROR 0x84 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_INCORRECT_PLATFORM 0x85 #define IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_COMPLETED 0xFF /* w/ IPMI_CMD_OEM_INVENTEC_RESTORE_TO_DEFAULTS */ #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW 0x7 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS 0x0 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_SHIFT 5 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_PEF_BITMASK 0x10 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK 0x08 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK 0x04 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK 0x02 #define IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_USER_ACCOUNTS_BITMASK 0x01 /* w/ IPMI_CMD_OEM_INVENTEC_GET_RESTORE_STATUS */ #define IPMI_OEM_INVENTEC_GET_RESTORE_STATUS_RESTORE_IN_PROGRESS 0x00 #define IPMI_OEM_INVENTEC_GET_RESTORE_STATUS_RESTORE_COMPLETE 0x01 /* w/ IPMI_CMD_OEM_INVENTEC_SET_ASSET_TAG */ #define IPMI_OEM_INVENTEC_ASSET_TAG_MAX 10 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-quanta-spec.h0000644002055400205540000003647613527331636026633 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_QUANTA_SPEC_H #define IPMI_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ /* achu: all named from doc except 'lan' configuration id, which I assumed names */ /* w/ IPMI_CMD_OEM_QUANTA_GET_EXTENDED_CONFIGURATION / IPMI_OEM_QUANTA_SET_EXTENDED_CONFIGURATION */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_NIC 0x02 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SOL 0x03 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SECURITY 0x04 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS 0x05 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_DNS 0x06 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION 0x0C #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_FIRMWARE_LOG 0x0E #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION 0x0F #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE 0x10 #define IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT 0x11 /* nic status - 1 byte, 0 = shared, 1 = dedicated */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_NIC_MODE 0x01 /* sol idle timeout - 2 bytes, ls byte first, 0h = no timeout, default = 01h * * telnet/ssh redirect enable - 1 byte, 0 = disable, 1 = enabled */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE 0x02 /* service disabled - 1 byte, bitmask * - 0x01 = all service except IPMI are disabled * (takes precedence over other bits) * - 0x02 = KVM/Virtual Storage * - 0x04 = HTTP/HTTPS * - 0x08 = SSH/Telnet */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED 0x01 /* number of user - 1 byte, read only * * number of enabled user - 1 byte, read only * * user name - 1-17 bytes, read only * - Quanta 5441/Xanadu II - reports stored as p-string, does not return p-string * - Quanta 5442/Xanadu III - returns as p-string * * account status - 1 byte * - 0x00 - status unspecified * - 0x01 - enabled via set user password * - 0x02 - disabled via set user password * - 0x03 - user id is lockout */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_USER 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_ENABLED_USER 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS 0x04 /* DNS DHCP enable - 1 byte, 0 - false, 1 - true * - DNS server IP addresses should be assigned from DHCP server * * DNS Server1 - 4 bytes * - IP address for DNS server 1, read only if DNS DHCP Enable and DHCP are enabled * * DNS Server2 - 4 bytes * - IP address for DNS server 2, read only if DNS DHCP Enable and DHCP are enabled * * DNS Register BMC - 0 - false, 1 - true * - Enable registering the BMC host name on the DNS server * * DNS BMC Host Name - 1-64 bytes * - Specifies the DNS BMC host name, read only if DNS Register BMC is TRUE. * - Stored as P-string * * DNS Domain Name DHCP Enable - 1 byte * - DNS domain name should be assigned from DHCP * * DNS Domain Name - 1-256 bytes * - DNS domain name string, read only if DNS Domain Name DHCP Enable is TRUE * - Stored as P-string */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME 0x05 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE 0x06 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME 0x07 /* web server enabled - 1 byte, 0 = false, 1 = true (default) * * max web sessions - 1 byte, read only * * active web sessions - 1 byte, read only * * web server timeout - 4 bytes, in seconds, 0 = disable, range 60-1920, default 300 * * http port num - 2 bytes, default 80 * * https port num - 2 bytes, default 443 */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM 0x05 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM 0x06 /* entity - 1 byte (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * * update date / time - 3 bytes, from 0:00 1/1/08, lsbyte first */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_ENTITY 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_FIRMWARE_VERSION 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BRANCH 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BUILD_INFORMATION 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_UPDATE_DATE_TIME 0x05 /* name - 1-16 bytes (read only) * * description - 1-256 bytes (read only) * * entity - 1 byte (read only) * * product info - 1-64 bytes (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION 0x05 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH 0x06 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION 0x07 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN 16 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN 256 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN 64 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN 16 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN 16 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN 16 /* remote update enable - 1 byte, ?? * * protocol - 1 byte, bitmask, 7:3 reserved, 2 : http, 1: ftp, 0: tftp (read only) * * uri - 1-256 bytes * note - first char should be a file or unit separator * * connection retry - 1 byte, 0 = no retries * * retry interval - 1 byte, in 5 second increments * * delay time - 1 byte, in seconds, 0h = immediate, ffh = random between 5 and 10 */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_CONNECTION_RETRY 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL 0x05 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME 0x06 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS 5 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN 256 /* power management enable - 1 byte, bit 7: 0 = disable, 1 = enable, reset reserved * * power staggery ac recovery - 1 byte, 0x00 = immediate power on * (default), 0x01 = auto, random between min and max below, 0x02 = * user defined, must be between min and max below * * power on delay - 2 bytes * * minimum power on delay - 2 bytes (read only) * * maximum power on delay - 2 bytes */ #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE 0x01 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY 0x02 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY 0x03 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY 0x04 #define IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY 0x05 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_READ_ALL_BYTES 0xFF /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_NIC_MODE */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_SHARED 0x00 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_DEDICATED 0x01 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL 0x00 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL 0x01 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE 0x02 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS 0x04 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET 0x08 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED 0x00 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED 0x01 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED 0x02 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT 0x03 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX 64 /* IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX 256 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_BMC 0 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_SYSTEM_BIOS 1 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_PDB 2 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_FCB 3 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_TFTP 0x01 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_FTP 0x02 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_HTTP 0x04 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_FIRMWARE_UPDATE_DELAY_TIME_RANDOM 0xFF /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE */ /* DPNM = Dynamic Power Node Management */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_BITMASK 0x80 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT 7 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_ENABLE 1 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_DISABLE 0 /* w/ IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY */ #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE 0x00 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO 0x01 #define IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED 0x02 /* w/ IPMI_CMD_OEM_QUANTA_RESET_TO_DEFAULTS */ #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW 0x7 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS 0x0 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT 5 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_PEF_BITMASK 0x10 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK 0x08 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK 0x04 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK 0x02 #define IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK 0x01 /* w/ IPMI_CMD_OEM_QUANTA_GET_RESTORE_STATUS */ #define IPMI_OEM_QUANTA_GET_RESTORE_STATUS_RESTORE_IN_PROGRESS 0x00 #define IPMI_OEM_QUANTA_GET_RESTORE_STATUS_RESTORE_COMPLETE 0x01 /* w/ IPMI_CMD_OEM_QUANTA_GET_PROCESSOR_INFORMATION */ #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_CELERON 0x00 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_PENTIUM_3 0x01 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_PENTIUM_4 0x02 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_XEON 0x03 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_PRESTONIA 0x04 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_NOCONA 0x05 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_OPTERON 0x06 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_DEMPSEY 0x07 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_CLOVERTOWN 0x08 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_TIGERTON 0x09 #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_DUNNINGTON 0x0A /* achu: listed as "Hapertown" in spec, assuming typo */ #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_HARPERTOWN 0x0B #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_WOLFDALE_DP 0x0C #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_NEHALEM_EP 0x0D #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_WESTMERE_EP 0x0E /* 0x0F-0xFE - Reserved */ #define IPMI_OEM_QUANTA_PROCESSOR_TYPE_NO_CPU_PRESENT 0xFF /******************************************* * Sun Microsystems * *******************************************/ /* * Sun 4140 */ /* w/ IPMI_CMD_OEM_SUN_GET_LED / IPMI_CMD_OEM_SUN_SET_LED */ #define IPMI_OEM_SUN_LED_MODE_OFF 0 #define IPMI_OEM_SUN_LED_MODE_ON 1 #define IPMI_OEM_SUN_LED_MODE_STANDBY 2 #define IPMI_OEM_SUN_LED_MODE_SLOW 3 #define IPMI_OEM_SUN_LED_MODE_FAST 4 #define IPMI_OEM_SUN_LED_FORCE_GO_THRU_CONTROLLER 0 #define IPMI_OEM_SUN_LED_FORCE_DIRECTLY_ACCESS_DEVICE 1 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_QUANTA_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-sun-microsystems-spec.h0000644002055400205540000000242313527331636030667 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_SUN_MICROSYSTEMS_SPEC_H #define IPMI_OEM_SUN_MICROSYSTEMS_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Sun 4140 */ /* w/ IPMI_CMD_OEM_SUN_GET_LED / IPMI_CMD_OEM_SUN_SET_LED */ #define IPMI_OEM_SUN_LED_MODE_OFF 0 #define IPMI_OEM_SUN_LED_MODE_ON 1 #define IPMI_OEM_SUN_LED_MODE_STANDBY 2 #define IPMI_OEM_SUN_LED_MODE_SLOW 3 #define IPMI_OEM_SUN_LED_MODE_FAST 4 #define IPMI_OEM_SUN_LED_FORCE_GO_THRU_CONTROLLER 0 #define IPMI_OEM_SUN_LED_FORCE_DIRECTLY_ACCESS_DEVICE 1 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_SUN_MICROSYSTEMS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-supermicro-spec.h0000644002055400205540000000547713527331636027527 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_SUPERMICRO_SPEC_H #define IPMI_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Supermicro X8DTG */ /* w/ IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION */ #define IPMI_OEM_SUPERMICRO_SUB_COMMAND_BMC_SERVICES 0xF0 /* w/ IPMI_OEM_SUPERMICRO_SUB_COMMAND_BMC_SERVICES */ #define IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_DISABLE 0x00 #define IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_ENABLE 0x01 #define IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_STATUS 0x02 #define IPMI_OEM_SUPERMICRO_BMC_SERVICES_STATUS_DISABLED 0x00 #define IPMI_OEM_SUPERMICRO_BMC_SERVICES_STATUS_ENABLED 0x01 /* * Supermicro X8DTU, X8STi, X9DRW */ #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_CHANNEL 0x07 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS1 0x70 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS2 0x72 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS3 0x74 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_MAGIC 0x0C #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_GOOD 0x01 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_BAD 0x00 #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_CHANNEL 0x07 #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS1 0x78 #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS2 0x7A #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS3 0x7C #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_MAGIC 0x78 #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_GOOD 0x01 #define IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_BAD 0x00 /* * Supermicro X10DRU-i+ */ #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_CHANNEL 0x07 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_PS1 0xB0 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_PS2 0xB2 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_MAGIC 0x79 /* achu: Both of these mean good ... yeah, makes no sense :P */ #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_GOOD1 0x00 #define IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_GOOD2 0x02 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_SUPERMICRO_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-wistron-spec.h0000644002055400205540000005344113527331636027036 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_WISTRON_SPEC_H #define IPMI_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ /* achu: all named from doc except 'lan' configuration id, which I assumed names */ /* w/ IPMI_CMD_OEM_WISTRON_GET_EXTENDED_CONFIGURATION / IPMI_OEM_WISTRON_SET_EXTENDED_CONFIGURATION */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_NIC 0x02 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SOL 0x03 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SECURITY 0x04 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS 0x05 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS 0x06 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION 0x0C #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_LOG 0x0E #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION 0x0F #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE 0x10 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT 0x11 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING 0xC0 #define IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING 0xC1 /* nic selection - 1 byte, 0 = shared, 1 = dedicated * * shared nic selection - 1 byte, 0 = reerved, 1 = nic1, ..., 4 = nic4 * - for when nic selection is shared */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SELECTION 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION 0x02 /* sol idle timeout - 2 bytes, ls byte first, 0h = no timeout, default = 01h * * telnet redirect function selection - 1 byte, 0 = disable, 1 = sol enabled , 2 = smash enabled * * ssh redirect function selection - 1 byte, 0 = disable, 1 = sol enabled , 2 = smash enabled */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION 0x03 /* service disabled - 1 byte, bitmask * - 0x01 = all service except IPMI are disabled * (takes precedence over other bits) * - 0x02 = KVM/Virtual Storage * - 0x04 = HTTP/HTTPS * - 0x08 = SSH * - 0x10 = SNMP v2c agent * - 0x20 = telnet */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED 0x01 /* number of user - 1 byte, read only * * number of enabled user - 1 byte, read only * * user name - 1-17 bytes, read only * - Wistron 5441/Xanadu II - reports stored as p-string, does not return p-string * - Wistron 5442/Xanadu III - returns as p-string * * account status - 1 byte * - 0x00 - status unspecified * - 0x01 - enabled via set user password * - 0x02 - disabled via set user password * - 0x03 - user id is lockout */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_USER 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_ENABLED_USER 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS 0x04 /* DNS DHCP enable - 1 byte, 0 - false, 1 - true * - DNS server IP addresses should be assigned from DHCP server * * DNS Server1 - 4 bytes * - IP address for DNS server 1, read only if DNS DHCP Enable and DHCP are enabled * * DNS Server2 - 4 bytes * - IP address for DNS server 2, read only if DNS DHCP Enable and DHCP are enabled * * DNS Register BMC - 0 - false, 1 - true * - Enable registering the BMC host name on the DNS server * * DNS BMC Host Name - 1-64 bytes * - Specifies the DNS BMC host name, read only if DNS Register BMC is TRUE. * - Stored as P-string * * DNS Domain Name DHCP Enable - 1 byte * - DNS domain name should be assigned from DHCP * * DNS Domain Name - 1-256 bytes * - DNS domain name string, read only if DNS Domain Name DHCP Enable is TRUE * - Stored as P-string * * DNS Registration Delay - 1 byte (range 1-255) * - Delay BMC should take after the IPMI process is up and running. - Default 5 seconds. */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME 0x05 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE 0x06 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME 0x07 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTRATION_DELAY 0x08 /* web server enabled - 1 byte, 0 = false, 1 = true (default) * * max web sessions - 1 byte, read only * * active web sessions - 1 byte, read only * * web server timeout - 4 bytes, in seconds, 0 = disable, range 60-1920, default 300 * * http port num - 2 bytes, default 80 * * https port num - 2 bytes, default 443 * * kvm port num - 2 bytes, default 7578 * * telnet port num - 2 bytes, default 23 * * ssh port num - 2 bytes, default 22 */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM 0x05 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM 0x06 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_KVM_PORT_NUM 0x07 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_TELNET_PORT_NUM 0x08 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_SSH_PORT_NUM 0x09 /* entity - 1 byte (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * * update date / time - 3 bytes, from 0:00 1/1/08, lsbyte first */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_ENTITY 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_FIRMWARE_VERSION 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BRANCH 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_BUILD_INFORMATION 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_LOG_UPDATE_DATE_TIME 0x05 /* name - 1-16 bytes (read only) * * description - 1-256 bytes (read only) * * entity - 1 byte (read only) * * product info - 1-64 bytes (read only) * * firmware version - 1-16 bytes (read only) * * branch - 1-16 bytes (read only) * * build information - 1-16 bytes (read only) * * user default setting - 1 byte (write only) * */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION 0x05 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH 0x06 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION 0x07 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING 0x08 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN 16 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN 256 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN 64 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN 16 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN 16 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN 16 /* remote update enable - 1 byte, ?? * * protocol - 1 byte, bitmask, 7:3 reserved, 2 : http, 1: ftp, 0: tftp (read only) * * uri - 1-256 bytes * note - first char should be a file or unit separator * * connection retry - 1 byte, 0 = no retries * * retry interval - 1 byte, in 5 second increments, defalut 01h * * delay time - 1 byte, in seconds, 0h = immediate, ffh = random between 5 and 10 */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_CONNECTION_RETRY 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL 0x05 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME 0x06 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS 5 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN 256 /* power staggery ac recovery - 1 byte, 0x00 = immediate power on * (default), 0x01 = auto, random between min and max below, 0x02 = * user defined, must be between min and max below * * power on delay - 2 bytes * * minimum power on delay - 2 bytes (read only) * * maximum power on delay - 2 bytes */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY 0x05 /* ipv6 enable - 1 byte, 0 = false, 1 = true * * ipv6 address - 1-40 bytes (read only if autoconfig is true) * * ipv6 gateway ip - 1-40 bytes * * ipv6 prefix length - 1 byte * * ipv6 autoconfig - 1 byte, 0 = false, 1 = true * * ipv6 link local address - 1-40 bytes (read only) * * ipv6 auto dns - 1 byte, 0 = false, 1 = true (can't set to 1 if autoconfig is false) * * ipv6 dns server 1 - 1-40 bytes (can't set if auto dns is true) * * ipv6 dns server 2 - 1-40 bytes (can't set if auto dns is true) */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_PREFIX_LENGTH 0x04 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG 0x05 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS 0x06 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS 0x07 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1 0x08 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2 0x09 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN 40 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN 40 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN 40 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN 40 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN 40 /* ipv6 snmp trap destination setting - 3 bytes * byte 1 - destination type * byte 2 - alert ack timeout * byte 3 - retries * * ipv6 snmp trap destination address - 1-40 bytes * * number of ipv6 snmp trap desitnations - 1 byte (read only) */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NUMBER_OF_IPV6_SNMP_TRAP_DESTINATION 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN 40 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_READ_ALL_BYTES 0xFF /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SELECTION */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_SHARED 0x00 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_DEDICATED 0x01 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION */ /* 0h - recommended when nic selection is dedicated */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_RESERVED 0x00 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_1 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_2 0x02 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_3 0x03 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_4 0x04 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_DISABLE 0x00 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED 0x02 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_DISABLE 0x00 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED 0x01 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED 0x02 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL 0x00 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL 0x01 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE 0x02 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS 0x04 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH 0x08 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SNMP_V2C_AGENT 0x10 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_TELNET 0x20 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED 0x00 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED 0x01 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED 0x02 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT 0x03 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX 64 /* IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX 256 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_BMC 0 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_SYSTEM_BIOS 1 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_PDB 2 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_FCB 3 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING_SET_DEFAULT 0x0 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING_RESTORE_DEFAULT 0x1 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_DISABLE 0x00 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE 0x01 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_TFTP 0x01 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_FTP 0x02 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_HTTP 0x04 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_UPDATE_DELAY_TIME_RANDOM 0xFF /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY */ #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE 0x00 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO 0x01 #define IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED 0x02 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE_FALSE 0 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE_TRUE 1 /* w/ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG_ENABLE_FALSE 0 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG_ENABLE_TRUE 1 /* w/ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS_ENABLE_FALSE 0 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS_ENABLE_TRUE 1 /* w/ IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING */ #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_PET IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM1 IPMI_DESTINATION_TYPE_OEM1 #define IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM2 IPMI_DESTINATION_TYPE_OEM2 /* w/ IPMI_CMD_OEM_WISTRON_RESET_TO_DEFAULTS */ #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW 0x7 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS 0x0 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT 5 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_PEF_BITMASK 0x10 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK 0x08 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK 0x04 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK 0x02 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK 0x01 #define IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_ALL_SC_SETTINGS 0xFF /* w/ IPMI_CMD_OEM_WISTRON_GET_RESTORE_STATUS */ #define IPMI_OEM_WISTRON_GET_RESTORE_STATUS_RESTORE_IN_PROGRESS 0x00 #define IPMI_OEM_WISTRON_GET_RESTORE_STATUS_RESTORE_COMPLETE 0x01 /* w/ IPMI_CMD_OEM_WISTRON_SET_CHASSIS_SERVICE_TAG and IPMI_CMD_OEM_WISTRON_GET_CHASSIS_SERVICE_TAG */ #define IPMI_OEM_WISTRON_SC_BMC_COMMUNICATION_PROTOCOL_VERSION 0x01 #define IPMI_OEM_WISTRON_CHASSIS_IDENTIFICATION_LED_CONTROLLED_BY_SC_BITMASK 0x01 #define IPMI_OEM_WISTRON_CHASSIS_IDENTIFICATION_LED_CONTROLLED_BY_SC_SHIFT 0 #define IPMI_OEM_WISTRON_CHASSIS_FAULT_LED_CONTROLLED_BY_SC_BITMASK 0x02 #define IPMI_OEM_WISTRON_CHASSIS_FAULT_LED_CONTROLLED_BY_SC_SHIFT 1 #define IPMI_OEM_WISTRON_CHASSIS_LED_OFF 0x00 #define IPMI_OEM_WISTRON_CHASSIS_LED_SOLID_ON 0x01 #define IPMI_OEM_WISTRON_CHASSIS_LED_BLINK_ON 0x02 /* w/ IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS */ #define IPMI_OEM_WISTRON_CHASSIS_TOTAL_POWER_CONSUMPTION_AVAILABLE_BITMASK 0x01 #define IPMI_OEM_WISTRON_CHASSIS_TOTAL_POWER_CONSUMPTION_AVAILABLE_SHIFT 0 #define IPMI_OEM_WISTRON_CHASSIS_COOLING_POWER_CONSUMPTION_AVAILABLE_BITMASK 0x02 #define IPMI_OEM_WISTRON_CHASSIS_COOLING_POWER_CONSUMPTION_AVAILABLE_SHIFT 1 /* w/ IPMI_CMD_OEM_WISTRON_SET_PASSWORD_POLICY */ #define IPMI_OEM_WISTRON_PASSWORD_POLICY_DISABLE 0x00 #define IPMI_OEM_WISTRON_PASSWORD_POLICY_ENABLE 0x01 /* w/ IPMI_CMD_OEM_WISTRON_WRITE_PROPRIETARY_STRING * and IPMI_CMD_OEM_WISTRON_READ_PROPRIETARY_STRING */ #define IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX 80 #define IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK 16 #ifdef __cplusplus } #endif #endif /* IPMI_OEM_WISTRON_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-dell-spec.h0000644002055400205540000013324613527331636033542 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_DELL_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /************************************************ * Generic Event Reading Type Code Offsets * ************************************************/ #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_ABSENT 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_STANDBY 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_IPMI_FUNCTION_READY 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_FULLY_READY 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_OFFLINE 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_FAILED 0x05 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_ACTIVE 0x06 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_BOOTING 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_WRITE_PROTECTED 0x08 /* 0x00 through 0x02 unknown */ #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE_MEMORY_FAILED_TO_TRANSITION_TO_ONLINE 0x03 /* * String arrays for above */ extern const char * const ipmi_generic_event_reading_type_code_oem_dell_status[]; extern unsigned int ipmi_generic_event_reading_type_code_oem_dell_status_max_index; extern const char * const ipmi_generic_event_reading_type_code_oem_dell_failure[]; extern unsigned int ipmi_generic_event_reading_type_code_oem_dell_failure_max_index; /************************************************ * Sensor Type Code Offsets OEM Specific * ************************************************/ #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_GOOD 0x00 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_OTHER 0x01 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_THERMAL_PROTECTION 0x02 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_COOLING_CAPACITY_CHANGE 0x03 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_POWER_CAPACITY_CHANGE 0x04 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_USER_DEFINED_POWER_CAPACITY 0x05 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_HALTED_SYSTEM_POWER_EXCEEDS_CAPACITY 0x06 #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_SYSTEM_POWER_EXCEEDS_CAPACITY 0x07 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_GOOD 0x00 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_FAILED_TO_PROGRAM_VIRTUAL_MAC_ADDRESS 0x01 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_DEVICE_OPTION_ROM_FAILED_TO_SUPPORT_LINK_TUNING_OR_FLEX_ADDRESS 0x02 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_FAILED_TO_GET_LINK_TUNING_OR_FLEX_ADDRESS_DATA 0x03 /* 0x01 not yet published/known */ #define IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR_PCIE_ERROR 0x00 #define IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR_QPI_LINK_DEGRADE 0x02 #define IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR_SUCCESSFUL 0x00 #define IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR_FATAL_IO_ERROR 0x01 #define IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE_SUCCESSFUL 0x00 #define IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE_FAILED 0x01 /* * String arrays for above */ extern const char * const ipmi_sensor_type_oem_dell_system_performance_degradation_status[]; extern unsigned int ipmi_sensor_type_oem_dell_system_performance_degradation_status_max_index; extern const char * const ipmi_sensor_type_oem_dell_link_tuning[]; extern unsigned int ipmi_sensor_type_oem_dell_link_tuning_max_index; extern const char * const ipmi_sensor_type_oem_dell_non_fatal_error[]; extern unsigned int ipmi_sensor_type_oem_dell_non_fatal_error_max_index; extern const char * const ipmi_sensor_type_oem_dell_fatal_io_error[]; extern unsigned int ipmi_sensor_type_oem_dell_fatal_io_error_max_index; extern const char * const ipmi_sensor_type_oem_dell_upgrade[]; extern unsigned int ipmi_sensor_type_oem_dell_upgrade_max_index; /************************************************ * Sensor Type Code Offsets OEM Extra * ************************************************/ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_DELL_POST_FATAL_ERROR 0x0F /* Other Event Macros */ #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_INTRUSION_WHILE_SYSTEM_ON 0x01 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_INTRUSION_WHILE_SYSTEM_OFF 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_PSU_COMMUNICATION_ERROR 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_WARNING 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_FAULT 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_UNDER_VOLTAGE_FAULT 0x04 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_VOLTAGE_FAULT 0x05 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_CURRENT_FAULT 0x06 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_FAN_FAULT 0x07 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_SHIFT 4 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_BITMASK 0x0F #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_SPARE_MODE_BITMASK 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_RAID_MODE_BITMASK 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MIRROR_MODE_BITMASK 0x4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_MIN 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_MAX 0x07 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_VALID(__memory_card) \ (((__memory_card + 1) >= (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_MIN + 1) \ && (__memory_card) <= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_MAX) ? 1 : 0) #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_MIN 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_MAX 0x07 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_VALID(__bank_number) \ (((__bank_number + 1) >= (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_MIN + 1) \ && (__bank_number) <= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_MAX) ? 1 : 0) #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_MIN 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_MAX 0x7F /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_VALID(__bank_number) \ (((__bank_number + 1) >= (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_MIN + 1) \ && (__bank_number) <= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_MAX) ? 1 : 0) #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_4_DIMMS_PER_NODE 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_6_DIMMS_PER_NODE 0x09 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_8_DIMMS_PER_NODE 0x0A #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_9_DIMMS_PER_NODE 0x0B #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_12_DIMMS_PER_NODE 0x0C #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_24_DIMMS_PER_NODE 0x0D #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_USE_DATA1_UPPER_NIBBLE 0x0E #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_NO_CARD 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA1_OEM_DELL_DIMMS_PER_PACKAGE_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA1_OEM_DELL_DIMMS_PER_PACKAGE_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA1_OEM_DELL_DIMMS_PER_PACKAGE_3 0x00 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OEM_DELL_MANAGEMENT_CONTROLLER_FIRMWARE_REVISION 0x02 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA3_OEM_DELL_OTHER 0x00 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA3_OEM_DELL_CPU 0x01 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_BITMASK 0xC0 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_SHIFT 6 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_SINGLE_HEIGHT 0 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_DOUBLE_HEIGHT 1 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_DOUBLE_HEIGHT_DOUBLE_WEIGHT 2 /* device number, function number, bus/slot number apply to multiple * sensor types */ #define IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_SHIFT 3 #define IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_SHIFT 0 #define IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_FLAG_BITMASK 0x80 #define IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_FLAG_SHIFT 7 #define IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_BITMASK 0x7F #define IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_SHIFT 0 /* option rom macros apply to multiple sensor types */ #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_BITMASK 0x80 #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SHIFT 7 #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_EMBEDDED 0 #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT 1 #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT_BITMASK 0x7F #define IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT_SHIFT 0 /* BIOS Progress and Fatal Error Codes */ /* * 00h and FFh are reserved * Progress codes range from 01h to 7Fh * Fatal error codes range from 80h to FEh * Progress codes less than 3Fh are pre-video activity * Progress codes greather than 40h are post-video activity * Fatal error codes less than BFh indicate pre-video failure * Fatal error codes greater than C0h indicate post-video failure. */ #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_SYSTEM_POWER_ON 0x01 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_CPU_MICROCODE_LOAD 0x02 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_CHIPSET_INITIALIZATION 0x03 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_MEMORY_CONFIGURATION 0x04 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_SHADOW_BIOS 0x05 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_MULTIPROCESSOR_INITIALIZATION 0x06 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_POST_PROCESSING_START 0x07 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_SMM_MODE_INITIALIZATION 0x08 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_PCI_BUS_ENUMERATION_VIDEO_INITIALIZATION 0x09 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_DISPLAY_SIGN_ON 0x40 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_PCI_CONFIGURATION 0x41 #define IPMI_OEM_DELL_BIOS_PROGRESS_CODE_GIVE_CONTROL_TO_OS 0x7F #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_NO_MEMORY_DETECTED 0x80 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_MEMORY_DETECTED_BUT_IS_NOT_CONFIGURABLE 0x81 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_MEMORY_CONFIGURED_BUT_NOT_USABLE 0x82 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SYSTEM_BIOS_SHADOW_FAILURE 0x83 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_CMOS_FAILURE 0x84 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_DMA_CONTROLLER_FAILURE 0x85 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_INTERRUPT_CONTROLLER_FAILURE 0x86 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_TIMER_REFRESH_FAILURE 0x87 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_PROGRAMMABLE_INTERVAL_TIMER_ERROR 0x88 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_PARITY_ERROR 0x89 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SIO_FAILURE 0x8A #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_KEYBOARD_CONTROLLER_FAILURE 0x8B #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SMI_INITIALIZATION_FAILURE 0x8C #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SHUTDOWN_TEST_FAILURE 0xC0 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_POST_MEMORY_TEST_FAILURE 0xC1 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_RAC_CONFIGURATION_FAILURE 0xC2 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_CPU_CONFIGURATION_FAILURE 0xC3 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_INCORRECT_MEMORY_CONFIGURATION 0xC4 #define IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_GENERAL_FAILURE_AFTER_VIDEO 0xFE /* * Dell Poweredge R720 */ #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_ID_BITMASK 0x03 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_ID_SHIFT 0 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_LINK_ID_BITMASK 0x0C #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_LINK_ID_SHIFT 2 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_AGENT_ID_BITMASK 0x30 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_AGENT_ID_SHIFT 4 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_LINK_ID_BITMASK 0xC0 #define IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_LINK_ID_SHIFT 6 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_REPORTING_AGENT_TYPE_BITMASK 0x01 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_REPORTING_AGENT_TYPE_SHIFT 0 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_PARTNER_AGENT_TYPE_BITMASK 0x02 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_PARTNER_AGENT_TYPE_SHIFT 1 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_BITMASK 0xFC #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_SHIFT 2 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_CPU 0 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_IOH 1 #define IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_LINK_WIDTH_DEGRADED 0 #define IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_BIOS_TXT_ERROR 0x00 #define IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_PROCESSOR_FIT_TXT_ERROR 0x02 #define IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_BIOS_ACM_TXT_ERROR 0x03 #define IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_SINIT_ACM_TXT_ERROR 0x04 /* achu: TT instead of TXT in spec, assume typo */ #define IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_UNRECOGNIZED_TXT_ERROR 0xFF #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_VT_CONFIGURATION_INVALID 0x01 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_TPM_CONFIGURATION_INVALID 0x02 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_FIT_CRTM_ERROR 0x03 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_BIOS_ACM_ERROR 0x04 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_SINIT_ACM_ERROR 0x05 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_TPM_PROVISIONING_ERROR 0x06 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_LEGACY_SHUTDOWN 0x0A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_ACM_TYPE 0x0B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNSUPPORTED_ACM 0x0C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_AUTHENTICATE_FAIL 0x0D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_ACM_FORMAT 0x0E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNEXPECTED_HITM 0x0F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ILLEGAL_EVENT 0x10 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_JOIN_FORMAT 0x11 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNRECOVERABLE_MC_ERROR 0x12 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_VMX_ABORT 0x13 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ACM_CORRUPT 0x14 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ILLEGAL_VID_RATIO 0x15 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_ACM_ENTRY_POINT 0x1E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_HEAP_UNINITIALIZED 0x1F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DPR_UNINITIALIZED 0x20 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_HEAP_ABOVE_TOP_OF_LOWER_MEMORY 0x21 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_PCIEXBAR_SET_TO_INVALID_VALUE 0x22 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_HEAP_IS_ABOVE_4GB 0x23 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_HEAP_IS_NOT_IN_DPR_REGION 0x24 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TXT_DISABLED_BY_MEANS_OF_TXT_POLICY_BIT 0x25 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_EITHER_STARTUP_ACM_WAS_CALLED_FROM_BIOS_OR_CPU_OFFSET_IN_PCIEXBAR_IS_TOO_LARGE 0x26 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_NON_SUPPORTED_DEVICE_ID 0x27 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_IS_NOT_LOCKED 0x28 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_SENTER_USED_TO_LAUNCH_AC_MODULE 0x29 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_START_MTRR_CHECK 0x2A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_1_ERROR 0x2B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_2_ERROR 0x2C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_3_ERROR 0x2D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_4_ERROR 0x2E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_5_ERROR 0x2F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_6_ERROR 0x30 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_PCIEXBAR_SET_TO_INVALID_SIZE 0x31 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_EXTEND_ATTEMPT 0x32 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_ACCESS_REGISTER_CONTENTS_INVALID 0x33 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_UNABLE_TO_GET_ACCESS_TO_THE_LOCALITY 0x34 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_OUTPUT_BUFFER_FOR_THE_TPM_RESPONSE_TOO_SHORT 0x35 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INPUT_PARAMETER_FOR_THE_FUNCTION_INVALID 0x36 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INVALID_RESPONSE_FOR_THE_TPM 0x37 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TIME_OUT_FOR_TPM_RESPONSE 0x38 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_RETURNED_AN_ERROR 0x39 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_NV_RAM_NOT_LOCKED 0x3A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_IS_DISABLED 0x3B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_IS_DEACTIVATED 0x3C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_NV_INDICES_INCORRECTLY_DEFINED 0x3D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LCP_NO_PO_POLICY_DATA_DEFINED 0x3E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_MLE_MISMATC 0x3F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PLATFORM_CONFIG_MISMATC 0x40 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_SINIT_REVOKED 0x41 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_NPW_NOT_ALLOWED 0x42 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PO_POLICY_INTEGRITY_FAILED 0x43 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PS_POLICY_INTEGRITY_FAILED 0x44 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INTERRUPT_OCCURED 0x45 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_CPU_NOT_SUPPORTED_BY_THIS_ACM 0x46 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_ONE_OF_THE_FIT_TABLE_CHECKS_FAILED 0x47 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_VERIFY_BIOS_FAILED 0x48 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_POLICY_FAILURE 0x49 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_LOCKED_WHEN_CLEARSECRETS_IS_CALLED 0x4A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_UNTRUSTED_WHEN_CLEARSECRETS_IS_CALLED 0x4B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_LOCKED_WHEN_CLEARSECRETS_IS_CALLED2 0x4C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FIT_POLICY_TPM_OR_TXT_POLICY_DATA_BAD 0x4D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FIT_TABLE_END_NOT_BELOW_4GB 0x4E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DIDNT_FIND_BIOS_STARTUP_RECORD_THAT_INCLUDES_RESET_VECTOR 0x4F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DIDNT_FIND_BIOS_STARTUP_RECORD_THAT_INCLUDES_FIT_POINTER 0x50 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FOUND_OVERLAP_BETWEEN_BIOS_STARTUP_REGIONS 0x51 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FOUND_OVERLAP_BETWEEN_A_BIOS_STARTUP_REGION_AND_THE_STARTUP_ACM 0x52 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_SCHECK_CALL 0x53 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_CLEAR_SECRETS_CALL 0x54 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_UNLOCK_CONFIG_CALL 0x55 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_RESET_AUX_CALL 0x56 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_MASK_ERROR_EX_ONLY 0x57 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_MAP_ERROR_EX_ONLY 0x58 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TIMEOUT_WHILE_ACQUIRING_SHARED_RESOURCE_EX_ONLY 0x59 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BAD_RESOURCE_NUMBER_SPECIFIED_WHEN_ACQUIRING_SHARED 0x5A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_CPU_REV_IS_NOT_SUPPORTED_BY_THIS_ACM 0x5B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_SINIT_EXIT_ADDRESS 0x64 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LOCK_CONFIG_CALL_TO_BIOS_ACM_NOT_DONE_BY_ALL_SOCKETS 0x65 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MLE_JOIN_ABOVE_4GB 0x66 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_UNINITIALIZED 0x67 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_UNINITIALIZED 0x68 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_REGION_DEFINED_ABOVE_4GB 0x69 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TXT_MEMORY_REGION_DISABLED 0x6A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_NON_SUPPORTED_DEVICE_ID 0x6B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MEMORY_IS_NOT_LOCKED 0x6C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SENTER_USED_TO_LAUNCH_THE_AC_MODULE 0x6D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_START_MTRR_CHECK 0x6E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_1_ERROR 0x6F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_2_ERROR 0x70 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_3_ERROR 0x71 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_4_ERROR 0x72 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_5_ERROR 0x73 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_6_ERROR 0x74 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_MTRR_MASK_VALUE 0x75 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_MTRR_MAPPING 0x76 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_SIZE_ERROR 0x77 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_BASE_ERROR 0x78 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_SIZE_ERROR 0x79 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_BASE_ERROR 0x7A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_SIZE_ERROR 0x7B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_BAR_OVERLAP 0x7C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_NOT_LOCKED 0x7D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_BAR_SIZE_ERROR 0x7E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_PMR_NOT_PROGRAMMED 0x7F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_LOC_ERROR 0x80 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MCHBAR_LOCATED_ABOVE_4GB 0x81 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_MEMORY_SPACE_LOCATED_ABOVE_4GB 0x82 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_VERSION_ERROR 0x83 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_ERROR 0x84 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_BASE_ERROR 0x85 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_SIZE_ERROR 0x86 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_HIGH_ERROR 0x87 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_OVERLAP 0x88 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_ABOVE_PHYSICAL_MEMORY 0x89 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_SIZE_ERROR 0x8A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_REQ_CAPABILITIES_ERROR 0x8B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_POLICY_NOT_IN_DMA_PROTECTED_REGION 0x8C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDP_NOT_FOUND 0x8D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDP_CHECKSUM_ERROR 0x8E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDT_CHECKSUM_ERROR 0x8F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_NOT_FOUND 0x90 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_CHECKSUM_ERROR 0x91 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DRHD_BAR_NOT_FOUND 0x92 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_LENGTH_ERROR 0x93 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DRHD_DEV_SCOPE_ERROR 0x94 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RMRR_NOT_FOUND 0x95 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_DMAR_OVERLAP 0x96 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_SIZE_ERROR 0x97 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_BASE_ERROR 0x98 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_DIFF_BASE_ERROR 0x99 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_EXTEND_ATTEMPT 0x9A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_ACCESS_REGISTER_CONTENTS_INVALID 0x9B #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_UNABLE_TO_GET_ACCESS_TO_THE_LOCALITY 0x9C #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OUTPUT_BUFFER_FOR_THE_TPM_RESPONSE_TOO_SHORT 0x9D #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INPUT_PARAMETER_FOR_THE_FUNCTION_INVALID 0x9E #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_RESPONSE_FOR_THE_TPM 0x9F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TIME_OUT_FOR_TPM_RESPONSE 0xA0 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_RETURNED_AN_ERROR 0xA1 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_NV_RAM_NOT_LOCKED 0xA2 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_IS_DISABLED 0xA3 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_IS_DEACTIVATED 0xA4 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_NV_INDICES_INCORRECTLY_DEFINED 0xA5 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_PCR17_NOT_VALID 0xA6 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VALUE_IN_PCR17_DOES_NOT_MATCH_EXPECTED_RESULT 0xA7 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VALUE_IN_PCR18_DOES_NOT_MATCH_EXPECTED_RESULT 0xA8 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_STARTUP_HAS_ALREADY_BEEN_RUN 0xA9 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TOLM_ERROR 0xAA #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_ALIAS_ERROR 0xAB #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TOHM_ERROR 0xAC #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SAD_RULES_ERROR 0xAD #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TSEG_ERROR 0xAE #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_PCIEX_BAR_ERROR 0xAF #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_MAD_OVERLAP 0xB0 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_UNCORE_IIO_SAD_ERROR 0xB1 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TAD_RULES_ERROR 0xB2 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SAG_ERROR 0xB3 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_RIR_ERROR 0xB4 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SMRR_ERROR 0xB5 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_CHANNEL_MAPPER_ERROR 0xB6 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMA_REMAP_ERROR 0xB7 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_ME_VT_POLICY_ERROR 0xB8 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_NO_PO_POLICY_DATA_DEFINE 0xB9 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_MLE_MISMATCH 0xBA #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PLATFORM_CONFIG_MISMATCH 0xBB #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_SINIT_REVOKED 0xBC #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_NPW_NOT_ALLOWED 0xBD #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PO_POLICY_INTEGRITY_FAILED 0xBE #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PS_POLICY_INTEGRITY_FAILED 0xBF #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INTERRUPT_ERROR 0xC0 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VTD_TABLE_LARGER_THAN_HEAP_SIZE 0xC1 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_CPU_NOT_SUPPORTED_BY_THIS_ACM 0xC2 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_DELL_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.h0000644002055400205540000000655613527331636034316 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_FUJITSU_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * Fujitsu Siemens Computers * Fujitsu Technology Solutions * iRMC S1 / iRMC S2 */ /* 0xC0 / IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS*/ extern const char * const ipmi_sensor_type_oem_fujitsu_i2c_bus[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_i2c_bus_max_index; /* 0xDD / IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION */ extern const char * const ipmi_sensor_type_oem_fujitsu_system_power_consumption[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_system_power_consumption_max_index; /* 0xDE / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS */ extern const char * const ipmi_sensor_type_oem_fujitsu_memory_status[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_memory_status_max_index; /* 0xDF / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG */ extern const char * const ipmi_sensor_type_oem_fujitsu_memory_config[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_memory_config_max_index; /* 0xE1 / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY */ extern const char * const ipmi_sensor_type_oem_fujitsu_memory[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_memory_max_index; /* 0xE3 / IPMI_SENSOR_TYPE_OEM_FUJITSU_HW_ERROR */ extern const char * const ipmi_sensor_type_oem_fujitsu_hw_error[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_hw_error_max_index; /* 0xE4 / IPMI_SENSOR_TYPE_OEM_FUJITSU_SYS_ERROR */ extern const char * const ipmi_sensor_type_oem_fujitsu_sys_error[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_sys_error_max_index; /* 0xE6 / IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS */ extern const char * const ipmi_sensor_type_oem_fujitsu_fan_status[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_fan_status_max_index; /* 0xE8 / IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS */ extern const char * const ipmi_sensor_type_oem_fujitsu_psu_status[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_psu_status_max_index; /* 0xE9 / IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY */ extern const char * const ipmi_sensor_type_oem_fujitsu_psu_redundancy[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_psu_redundancy_max_index; /* 0xEC / IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH */ extern const char * const ipmi_sensor_type_oem_fujitsu_flash[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_flash_max_index; /* 0xEF / IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP */ extern const char * const ipmi_sensor_type_oem_fujitsu_config_backup[]; extern unsigned int ipmi_sensor_type_oem_fujitsu_config_backup_max_index; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_FUJITSU_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h0000644002055400205540000000536613527331636034416 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_GIGABYTE_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_GIGABYTE_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * Gigabyte MD90-FS0-ZB * Gigabyte MG20-OP0-ZB */ /************************************************ * Sensor Type Code Offsets OEM Extra * ************************************************/ /* IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_DEVICE_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_FUNCTION_NUMBER_SHIFT 0 /* IPMI_SENSOR_TYPE_MEMORY */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_A 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_B 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_C 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_D 0x3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_E 0x4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_F 0x5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_G 0x6 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_H 0x7 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_0 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_1 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_2 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_3 0x3 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_GIGABYTE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-hp-spec.h0000644002055400205540000000275413527331636033307 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_HP_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_HP_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * HP Proliant DL160 G8 */ #define IPMI_OEM_HP_UID_LIGHT_ON 0x00 #define IPMI_OEM_HP_UID_LIGHT_OFF 0x01 #define IPMI_OEM_HP_UID_LIGHT_BLINKING 0x02 #define IPMI_OEM_HP_HEALTH_LED_GREEN 0x00 #define IPMI_OEM_HP_HEALTH_LED_AMBER 0x01 #define IPMI_OEM_HP_HEALTH_LED_RED 0x02 /* * String arrays for above */ extern const char * const ipmi_oem_hp_uid_light[]; extern unsigned int ipmi_oem_hp_uid_light_max_index; extern const char * const ipmi_oem_hp_health_led[]; extern unsigned int ipmi_oem_hp_health_led_max_index; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_HP_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-intel-node-manager-spec.h0000644002055400205540000005611613527331636036270 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK 0x08 #define IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT 3 #define IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK 0x0F #define IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT 0 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_BITMASK 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_BITMASK 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_SHIFT 1 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_BITMASK 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_SHIFT 2 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_NOT_AVAILABLE 0 #define IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_AVAILABLE 1 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_THRESHOLD_NUMBER_BITMASK 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_THRESHOLD_NUMBER_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK 0x08 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT 3 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_THRESHOLD_EXCEEDED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED 0x1 #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA2_DOMAIN_ID_BITMASK 0x0F #define IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA2_DOMAIN_ID_SHIFT 0 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS /* Recovery GPIO forced. Recovery Image loaded due to MGPIO pin * asserted. Pin number is configurable in factory presets, Default * recovery pin is MGPIO1. Repair action: Deassert MGPIO1 and reset * the Intel ME */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_RECOVERY_GPIO_FORCED 0x00 /* Image execution failed. Recovery Image or backup operational image * loaded because operational image is corrupted. This may be caused * by Flash device corruption or failed upgrade procedure. Repair * action: Either the flash device must be replaced (if error is * persistent) or the upgrade procedure must be started again. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED 0x01 /* Flash erase error. Error during Flash erasure procedure probably * due to flash part corruption. Repair action: The flash device * must be replaced. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR 0x02 /* Flash state information. Repair action: Check extended info byte * in Event Data 3 (byte 7) whether wearout protection is causing this * event. If so, wait until wearout protection expires; otherwise * probably the flash device must be replaced (if error is * persistent). */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION 0x03 /* Internal error. Error during firmware execution - if Event Data 3 * (byte 7) contains 0 then FW Watchdog Timeout; otherwise please * contact Intel representative for support. Repair action: * Operational image shall be updated to other version or hardware * board repair is needed (if error is persistent). */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR 0x04 /* BMC did not respond to cold reset request and Intel ME rebooted * the platform. Repair action: Verify the Intel NM configuration. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_BMC_COLD_RESET_ERROR 0x05 /* Direct flash update requested by the BIOS. Intel ME firmware * will switch to recovery mode to perform full update from BIOS. * Repair action: This is transient state. Intel ME firmware should * return to operational mode after successful image update * performed b the BIOS. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_DIRECT_FLASH_UPDATE 0x06 /* Manufacturing error. Wrong manufacturing configuration detected * by Intel ME firmware Repair action: The flash device must be * replaced (if error is persistent). */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MANUFACTURING_ERROR 0x07 /* Persistent storage integrity error. Flash file system error * detected. Repair action. If error is persistent, restore * factory presets using "Force ME Recovery" IPMI command or by * doing AC power cycle with Recovery jumper asserted. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PERSISTENT_STORAGE_INTEGRITY_ERROR 0x08 /* Firmware exception. Repair action: Restore factory presets using * "Force ME Recovery" IPMI command or by doing AC power cycle with * Recovery jumper asserted. If this does not clear the issue, * reflash the SPI flash. If the issue persists, provide the * content of Event Data 3 to Intel support team for interpretation. * (Event Data 3 codes are not documented because they only provide * clues that must be interpreted individually. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FIRMWARE_EXCEPTION 0x09 /* Flash Wear-Out Protection Warning. Warning threshold for number * of flash operations has been exceeded. Repair action: No immediate * repair action needed. This i sjust a warning event. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_WEAR_OUT_PROTECTION_WARNING 0x0A /* PECI over DMI interface error. This is a notification that PECI * over DMI interface failure was detected and it is not functional * any more. It may indicatethe situation when PECI over DMI was not * configured by BIOS or a defect which may require a CPU Host reset * to recover from. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PECI_OVER_DMI_INTERFACE_ERROR 0x0D /* MCTP interface error. This is a notification that MCTP interface * failure was detected and it is not functional any more. It may * indicate the situation when MCTP was not configured by BIOS or a * defect which may need a Host reset to recover from. Repair action: * Recovery via CPU Host reset or platform reset. */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MCTP_INTERFACE_ERROR 0x0E /* Auto-configuration finished. Operational image finished power * source auto-configuration. Repair action: Auto-configuration could * be enforced by restore to factory defaults */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_AUTO_CONFIGURATION_FINISHED 0x0F /* Legacy macros, changed b/c of new names in Intel NM 2.0 specification */ #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FORCED_GPIO_RECOVER IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_RECOVERY_GPIO_FORCED #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_CORRUPTED IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION #define IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_IMAGE_CORRUPTED 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_FLASH_ERASE_LIMIT_REACHED 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_FLASH_WRITE_LIMIT_REACHED 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_WRITING_TO_FLASH_ENABLED 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_FW_WATCHDOG_TIMEOUT 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_LOADER_MANIFEST_VALIDATION_FAILURE 0x1D #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_UNKNOWN_POWER_MANAGEMENT_EVENT 0x37 /* Spec says "None graceful", assuming typo */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_NON_GRACEFUL_PMC_RESET_EVENT 0x45 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_FLASH_WEAROUT_PROTECTION 0x8E #if 0 /* In Intel Node Manager 2.0 spec this was 0x04, but changed in 3.0 spec */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_INTEL_ME_FW_CONFIGURATION_BAD 0x04 #endif #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_GENERIC_ERROR 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_OR_MISSING_VSCC_TABLE 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_SENSOR_SCANNING_PERIOD_IN_PIA 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_DEVICE_DEFINITION_IN_PIA 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_SMART_CLST_CONFIGURATION 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_INTEL_ME_FW_CONFIGURATION_IS_INCONSISTENT_OR_OUT_OF_RANGE 0x05 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_PERCENTAGE_OF_FLASH_WRITE_OPERATIONS_WHICH_HAVE_BEEN_CONDUCTED 0x0A #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_DRAM_INIT_DONE_EVENT_NOT_RECEIVED 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MCTP_SAD_REGISTER_NOT_CORRECTLY_CONFIGURED_BY_BIOS 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_DMI_TIMEOUT_OF_PECI_REQUEST 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_BITMASK 0x80 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SHIFT 7 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS 0 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE 1 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_BITMASK 0x60 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_SHIFT 5 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_BMC 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_PSU 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_ON_BOARD_POWER_SENSOR 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_BITMASK 0x18 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_SHIFT 3 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_BMC 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_PSU 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_ON_BOARD_POWER_SENSOR_PSU_EFFICIENCY 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_NOT_SUPPORTED 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_BITMASK 0x06 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_SHIFT 1 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_BMC 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_PSU 0x01 /* Not a typo, jumps to 0x03 */ #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_NOT_SUPPORTED 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_BITMASK 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_BMC 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_ESTIMATED 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_BITMASK 0x60 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_SHIFT 5 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_BMC_DISCOVERY_FAILURE 0x00 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_INSUFFICIENT_FACTORY_CONFIGURATION 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_UNKNOWN_SENSOR_TYPE 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_OTHER_ERROR_ENCOUNTERED 0x03 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR_NODE_MANAGER 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK 0x0F #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_BITMASK 0xF0 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_SHIFT 4 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_OUTLET_TEMPERATURE_READING_FAILURE 0x8 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_VOLUMETRIC_AIRFLOW_READING_FAILURE 0x9 #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POLICY_MISCONFIGURATION 0xA #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POWER_SENSOR_READING_FAILURE 0xB #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_INLET_TEMPERATURE_READING_FAILURE 0xC #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_HOST_COMMUNICATION_ERROR 0xD #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_REAL_TIME_CLOCK_SYNCHRONIZATION_FAILURE 0xE #define IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_PLATFORM_SHUTDOWN_INITIATED_BY_INTEL_NM_POLICY 0xF /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_THERMAL_SENSOR_ON_DIMM * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM */ #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_0_BITMASK 0x01 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_0_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_1_BITMASK 0x02 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_1_SHIFT 1 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_0_BITMASK 0x04 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_0_SHIFT 2 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_1_BITMASK 0x08 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_1_SHIFT 3 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_0_BITMASK 0x10 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_0_SHIFT 4 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_1_BITMASK 0x20 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_1_SHIFT 5 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_0_BITMASK 0x40 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_0_SHIFT 6 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_1_BITMASK 0x80 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_1_SHIFT 7 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE 0 #define IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_NOT_AVAILABLE 1 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_CUPS_EVENT * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_THRESHOLD_NUMBER_BITMASK 0x03 #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_THRESHOLD_NUMBER_SHIFT 0 #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_POLICY_EVENT_BITMASK 0x08 #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_POLICY_EVENT_SHIFT 3 #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_EVENT_EVENT_THRESHOLD_EXCEEDED 0x0 #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK 0x0F #define IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT 0 /* Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_STATE * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER */ #define IPMI_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR_EVENT_DATA2_OFFSET_FROM_SEVERITY_BITMASK 0xF0 #define IPMI_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR_EVENT_DATA2_OFFSET_FROM_SEVERITY_SHIFT 4 #define IPMI_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR_EVENT_DATA3_EXTERNAL 0 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_NODE_MANAGER_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-intel-spec.h0000644002055400205540000063155713527331636033745 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * Intel S5500WB/Penguin Computing Relion 700 */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_DATA_LINK_LAYER_PROTOCOL_ERROR 0x00 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_SURPRISE_LINK_DOWN 0x01 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_UNEXPECTED_COMPLETION_A 0x02 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_UNSUPPORTED_REQUEST 0x03 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_POISONED_TLP 0x04 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_FLOW_CONTROL_PROTOCOL 0x05 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_COMPLETION_TIMEOUT 0x06 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_COMPLETER_ABORT 0x07 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVER_BUFFER_OVERFLOW 0x08 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_ACS_VIOLATION 0x09 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_MALFORMED_TLP 0x0A #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVED_FATAL_MESSAGE 0x0B #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_UNEXPECTED_COMPLETION_B 0x0C #define IPMI_OEM_INTEL_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVED_NON_FATAL_MESSAGE 0x0D /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_RECEIVER_ERROR 0x00 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_BAD_DLLP 0x01 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_BAD_TLLP 0x02 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_REPLAY_NUM_ROLLOVER 0x03 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_REPLAY_TIMER_TIMEOUT 0x04 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_ADVISORY_NON_FATAL 0x05 #define IPMI_OEM_INTEL_SPECIFIC_PCIE_CORRECTABLE_SENSOR_LINK_BW_CHANGED 0x06 /* * String arrays for above */ extern const char * const ipmi_oem_intel_specific_pci_fatal_sensor[]; extern unsigned int ipmi_oem_intel_specific_pci_fatal_sensor_max_index; extern const char * const ipmi_oem_intel_specific_pci_correctable_sensor[]; extern unsigned int ipmi_oem_intel_specific_pci_correctable_sensor_max_index; /* * Intel S5500WB/Penguin Computing Relion 700 */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALIDITY_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALIDITY_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALID 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_INVALID 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALIDITY_BITMASK 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALIDITY_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALID 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_INVALID 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_UNKNOWN_ERROR 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_DATA_PARITY_ERROR 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_ADDRESS_PARITY_ERROR 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOGICAL_RANK_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOGICAL_RANK_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_0_1 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_0_2 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_1_2 0x3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_FIRST_SOCKET_ID_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_FIRST_SOCKET_ID_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_APPLIES_TO_ALL_SOCKETS 0xE #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_SECOND_SOCKET_ID_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_SECOND_SOCKET_ID_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_UNUSED_FIELD 0xF #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_1 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_2 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_A 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_B 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_C 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_1 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_2 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_BITMASK 0x80 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_SHIFT 7 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_LOCAL 0x0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_GLOBAL 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_INSTANCE_ID_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_INSTANCE_ID_SHIFT 0 /* * Intel S5500WB/Penguin Computing Relion 700 * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) * Intel S2600JF/Appro 512X * Intel S2600WP */ #define IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_SHIFT 3 #define IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_SHIFT 0 /* * * Intel Server Board S5500WB Technical Product Specification * * http://download.intel.com/support/motherboards/server/s5500wb/sb/s5500wb_tps_r1_8.pdf */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORD_CHECK_FAILED 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_LOCKED_ERROR 0x0108 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_STUCK_KEY_ERROR 0x0109 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_FIXED_MEDIA_THE_SAS_RAID_FIRMWARE_CAN_NOT_RUN_PROPERLY 0x0113 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0x0140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT 0x0141 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR 0x0146 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_CACHE_SIZE_MISMATCH_DETECTED 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_STEPPING_MISMATCH 0x0193 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_MISMATCH_DETECTED 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_INTEL_QPI_SPEED_MISMATCH 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_MODEL_MISMATCH 0x0196 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_SPEEDS_MISMATCHED 0x0197 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_IS_NOT_SUPPORTED 0x0198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED 0x019F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED 0x5220 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER 0x5221 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET 0x5224 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_MICROCODE_UPDATE_NOT_FOUND 0x8180 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT 0x8190 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE 0x8198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST 0x8300 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND 0x84F2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE 0x84F3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY 0x84F4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL 0x84FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE 0x8500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_POPULATION_ERROR 0x8501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CLTT_CONFIGURATION_FAILURE_ERROR 0x8502 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_BIST 0x8520 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_BIST 0x8521 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_BIST 0x8522 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_BIST 0x8523 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_BIST 0x8524 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_BIST 0x8525 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_BIST 0x8526 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_BIST 0x8527 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_BIST 0x8528 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_BIST 0x8529 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_BIST 0x852A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_BIST 0x852B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_DISABLED 0x8540 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_DISABLED 0x8541 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_DISABLED 0x8542 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_DISABLED 0x8543 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_DISABLED 0x8544 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_DISABLED 0x8545 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_DISABLED 0x8546 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_DISABLED 0x8547 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_DISABLED 0x8548 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_DISABLED 0x8549 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_DISABLED 0x854A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_DISABLED 0x854B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8560 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8561 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8562 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8563 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8564 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8565 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8566 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8567 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8568 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8569 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85AA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85AB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE 0x8604 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_UNSPECIFIED_PROCESSOR_COMPONENT_HAS_ENCOUNTERED_A_NON_SPECIFIC_ERROR 0x9000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_WAS_NOT_DETECTED 0x9223 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9226 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MOUSE_COMPONENT_WAS_NOT_DETECTED 0x9243 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MOUSE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9246 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9266 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x9268 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x9269 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9286 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR 0x9287 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x9288 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED 0x92A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x92A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR 0x92C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR 0x92C7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x92C8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x94C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x94C9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9506 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x95A6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_READ_ERROR 0x95A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_WRITE_ERROR 0x95A8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_UNSPECIFIED_SOFTWARE_COMPONENT_ENCOUNTERED_A_START_ERROR 0x9609 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PEI_CORE_COMPONENT_ENCOUNTERED_A_LOAD_ERROR 0x9641 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PEI_MODULE_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR 0x9667 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_CORE_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR 0x9687 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR 0x96A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_INVALID_CONFIGURATION 0x96AB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SMM_DRIVER_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR 0x96E7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED 0xA000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING 0xA001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_FAILURE 0xA002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST 0xA003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_MISMATCH_ERROR 0xA022 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_LOW_VOLTAGE_ERROR 0xA027 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_HIGH_VOLTAGE_ERROR 0xA028 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA421 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_ATA_BUS_SMART_NOT_SUPPORTED 0xA500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_ATA_SMART_IS_DISABLED 0xA501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0xA5A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA5A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_IBIST_ERROR 0xA5A4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM 0xA6A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_UNRECOGNIZED 0xB6A3 /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed, so new macros to differentiate */ #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_DATA_LINK_LAYER_PROTOCOL_ERROR 0x00 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_SURPRISE_LINK_DOWN 0x01 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_UNEXPECTED_COMPLETER 0x02 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_UNSUPPORTED_REQUEST 0x03 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_POISONED_TLP 0x04 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_FLOW_CONTROL_PROTOCOL 0x05 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_COMPLETION_TIMEOUT 0x06 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_COMPLETER_ABORT 0x07 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVER_BUFFER_OVERFLOW 0x08 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_ACS_VIOLATION 0x09 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_MALFORMED_TLP 0x0A #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVED_FATAL_MESSAGE 0x0B #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_UNEXPECTED_COMPLETION 0x0C #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_FATAL_SENSOR_RECEIVED_NON_FATAL_MESSAGE 0x0D /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed, so new macros to differentiate */ #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_RECEIVER_ERROR 0x00 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_BAD_DLLP 0x01 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_BAD_TLLP 0x02 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_REPLAY_NUM_ROLLOVER 0x03 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_REPLAY_TIMER_TIMEOUT 0x04 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_ADVISORY_NON_FATAL 0x05 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_PCIE_CORRECTABLE_SENSOR_LINK_BW_CHANGED 0x06 /* * String arrays for above */ /* achu: Similar to above, but some events text changed, so new arrays to differentiate */ extern const char * const ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor[]; extern unsigned int ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor_max_index; extern const char * const ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor[]; extern unsigned int ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor_max_index; /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR * Sensor Type = IPMI_SENSOR_TYPE_MEMORY * Sensor Number = IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_PERSISTENT */ /* achu: 7 instead of 3? Typo in document?*/ #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_RECOVERABLE_ERROR 0 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_ALERT 1 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_STATUS 2 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_SMI_LINK_LANE_FAIL_OVER_EVENT 7 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_UNCORRECTABLE_ERROR * Sensor Type = IPMI_SENSOR_TYPE_MEMORY * Sensor Number = IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_UNCORRECTABLE */ #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_CRC_ERROR 0 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ALERT_FRAME 1 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR * Sensor Type = IPMI_SENSOR_TYPE_MEMORY * Sensor Number = IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PATROL_SCRUB_ERROR */ /* achu: This is just like normal memory specific sensors. Typo in document? */ #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_CORRECTABLE_RROR 0 #define IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ERROR 1 /* Note: Difference to IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_* fields above */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_MIRRORING_INTRA_SOCKET 0x1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_GLOBAL_MEMORY_MIRRORING_INTER_SOCKET 0x2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_SHIFT 0 /* When Intra Mirroring is Enabled */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_2 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_3_4 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_6 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_7_8 3 /* When Inter socket mirroring is enabled & Hemispher is disabled */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_4 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_3_2 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_8 6 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_7_6 7 /* When Inter socket mirroring is enabled & Hemispher is enabled */ /* achu: Jump in numbers not an error, why jump in numbers? */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_3 12 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_2_4 13 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_7 14 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_6_8 15 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_GLOBAL_MEMORY_SPARING 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_TYPE_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING_SPARING_TYPE_DIMM_SPARING 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING_SPARING_TYPE_RANK_SPARING 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_INDEX_OF_SPARED_MEMORY_BOARD_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_INDEX_OF_SPARED_MEMORY_BOARD_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_1B_LOCKSTEP_DIMM_1D 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_1A_LOCKSTEP_DIMM_1C 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_2B_LOCKSTEP_DIMM_2D 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_2A_LOCKSTEP_DIMM_2C 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_COUNT_OF_CORRECTABLE_ECC_ERROR_BITMASK 0xFC #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_COUNT_OF_CORRECTABLE_ECC_ERROR_SHIFT 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_BITMASK 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_SHIFT 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM1_SLOT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM2_SLOT 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM3_SLOT 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM4_SLOT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM5_SLOT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM6_SLOT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM7_SLOT 6 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM8_SLOT 7 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1B 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1A 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2B 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2A 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1D 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1C 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2D 6 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2C 7 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_0 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_1 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_VALID_BITMASK 0x20 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_VALID_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_VALID_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_VALID_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_MIRROR 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_SPARE 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_INTERLEAVE 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_HEMISPHERE 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_POPULATION 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_DEVICE_MISMATCH 6 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_BITMASK 0x34 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_INVALID_INFORMATION 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_BOARD_HOT_REPLACED_WITH_MISMATCHED_OR_FAULTY_MEMORY 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_GENERIC_INITIALIZATION_ERROR 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_TIMEOUT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_USER_INITIATED_CANCELATION 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_SHIFT 0 /* When IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_GENERIC_INITIALIZATION_ERROR occurs */ /* BIST = Built in Self-Test */ /* SPD = Serial Presence Detect */ /* CLTT = Closed Loop Thermal Throttling */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_MEMORY_BIST_ERROR 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_SPD_ERROR 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_CLTT_CONFIGURATION_ERROR 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_POPULATION_RULE_ERROR 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_MISMATCHED_DIMM_ERROR 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_OTHER_MEMORY_INITIALIZATION_ERRORS 6 /* * QSSC S4R Technical Product Specification * * Very similar to POST Error Code list above, but slightly different. * Some rewording, new errors, removed errors, cut & pasted to be * clear on differences. */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORD_CHECK_FAILED 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_KEYBOARD_LOCKED_ERROR 0x0108 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_KEYBOARD_STUCK_KEY_ERROR 0x0109 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_THE_SAS_RAID_FIRMWARE_CANNOT_RUN_PROPERLY 0x0113 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_PARITY_ERROR 0x0140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT_ERROR 0x0141 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR 0x0146 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_STEPPING_MISMATCH 0x0193 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_SPEED_MISMATCH 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED 0x019F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED 0x5220 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER 0x5221 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET 0x5224 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_DISABLED 0x8130 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_FRB_3_TIMEOUT 0x8140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8162 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8163 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_BUILD_IN_SELF_TEST_FAILURE 0x8170 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_MICROCODE_UPDATE_NOT_FOUND 0x8180 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT 0x8190 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE 0x8198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST 0x8300 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND 0x84F2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE 0x84F3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_SENSOR_DATA_RECORD_EMPTY 0x84F4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_SYSTEM_EVENT_LOG_FULL 0x84FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE 0x8604 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED 0xA000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING 0xA001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_FAILURE 0xA002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST 0xA003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_MEMORY_WAS_NOT_CONFIGURED_FOR_THE_SELECTED_MEMORY_RAS_CONFIGURATION 0xE4FC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_BITMASK 0xF000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_SHIFT 12 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY 0xE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_BITMASK 0x0F00 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_SHIFT 8 /* BIST = Built in Self-Test */ /* SPD = Serial Presence Detect */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_INVALID_TYPE_ERROR 0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_DISABLED 1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_MISMATCH_ERROR 2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_TRAINING_ERROR 3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_TOO_MANY_DIMM_TYPES 5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_BIST_FAILED 6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_SPD_FAILED 7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_BITMASK 0x000E0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_SHIFT 5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_1 0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_2 1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_3 2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_4 3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_DIMM_SLOT_BITMASK 0x00007 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_DIMM_SLOT_SHIFT 0 /* * Intel S2600JF/Appro 512X */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed and new ones, * so new macros to differentiate */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_DATA_LINK_LAYER_PROTOCOL_ERROR 0x00 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_SURPRISE_LINK_DOWN_ERROR 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_COMPLETER_ABORT 0x02 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_UNSUPPORTED_REQUEST 0x03 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_POISONED_TLP 0x04 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_FLOW_CONTROL_PROTOCOL 0x05 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_COMPLETION_TIMEOUT 0x06 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_RECEIVER_BUFFER_OVERFLOW 0x07 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_ACS_VIOLATION 0x08 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_MALFORMED_TLP 0x09 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_ECRC_ERROR 0x0A #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_RECEIVED_FATAL_MESSAGE 0x0B #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_UNEXPECTED_COMPLETION 0x0C #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_RECEIVED_NON_FATAL_MESSAGE 0x0D #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_UNCORRECTABLE_INTERNAL 0x0E #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_MC_BLOCKED_TLP 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: not a typo, why a from from 0x01 to 0x0f? */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_2_ATOMIC_EGRESS_BLOCKED 0x00 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_2_TLP_PREFIX_BLOCKED 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_FATAL_ERROR_2_UNSPECIFIED_NON_AER_FATAL_ERROR 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed, so new macros to differentiate */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_RECEIVER_ERROR 0x00 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_BAD_DLLP 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_BAD_TLP 0x02 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_REPLAY_NUM_ROLLOVER 0x03 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_REPLAY_TIMER_TIMEOUT 0x04 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_ADVISORY_NON_FATAL 0x05 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_LINK_BW_CHANGED 0x06 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_CORRECTABLE_INTERNAL 0x07 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_PCIE_CORRECTABLE_ERROR_HEADER_LOG_OVERFLOW 0x08 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_LINK_LAYER_UNCORRECTABLE_ECC_ERROR 0x00 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_POISONED_PACKET_RECEPTION_ERROR 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_LINK_PHY_INIT_FAILURE 0x02 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_CSI_PHY_LAYER_DETECTED_DRIFT_BUFFER_ALARM 0x03 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_CSI_PHY_DETECTED_LATENCY_BUFFER_ROLLOVER 0x04 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_CSI_PHY_INIT_FAILURE 0x05 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_CSI_LINK_LAYER_GENERIC_CONTROL_ERROR 0x06 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PARITY_ERROR_IN_LINK_OR_PHY_LAYER 0x07 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_TIMEOUT_DETECTED 0x08 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_FAILED_RESPONSE 0x09 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_ILLEGAL_PACKET_FIELD 0x0A #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_QUEUE_TABLE_OVERFLOW_UNDERFLOW 0x0B #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_VIRAL_ERROR 0x0C #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_PROTOCOL_LAYER_PARITY_ERROR 0x0D #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_ROUTING_TABLE_ERROR 0x0E /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_ILLEGAL_INBOUND_REQUEST 0x00 #if 0 /* achu: Intel informed me there was an error in their documentation and the following was not correct. * I'll leave this here for legacy documentation */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR_2 0x02 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR_3 0x03 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_RECEIVED_XPF_PHYSICAL_LOGICAL_REDIRECT_INTERRUPT_INBOUND 0x04 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_ILLEGAL_SAD_OR_ILLEGAL_OR_NON_EXISTENT_ADDRESS_OR_MEMORY 0x05 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_PCH_WRITE_CACHE_COHERENCY_VIOLATION 0x06 #else /* !0 */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_IIO_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_IIO_CSR_CROSSING_32_BIT_BOUNDARY_ERROR 0x02 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_IIO_RECEIVED_XPF_PHYSICAL_LOGICAL_REDIRECT_INTERRUPT_INBOUND 0x03 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_IIO_ILLEGAL_SAD_OR_ILLEGAL_OR_NON_EXISTENT_ADDRESS_OR_MEMORY 0x04 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_OPI_FATAL_ERROR_2_IIO_WRITE_CACHE_COHERENCY_VIOLATION 0x05 #endif /* !0 */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_QPI_LINK_WIDTH_REDUCED_HALF_WIDTH 0x01 #define IPMI_OEM_INTEL_S2600JF_SPECIFIC_QPI_LINK_WIDTH_REDUCED_QUARTER_WIDTH 0x02 /* * String arrays for above */ /* achu: Similar to above, but some events text changed, so new arrays to differentiate */ extern const char * const ipmi_oem_intel_s2600jf_specific_pci_fatal_error[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_pci_fatal_error_max_index; extern const char * const ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2_max_index; extern const char * const ipmi_oem_intel_s2600jf_specific_pci_correctable_error[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_pci_correctable_error_max_index; extern const char * const ipmi_oem_intel_s2600jf_specific_opi_fatal_error[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_opi_fatal_error_max_index; extern const char * const ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2_max_index; extern const char * const ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced[]; extern unsigned int ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced_max_index; #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_MIRRORING_DOMAIN_CHANNEL_BITMASK 0xF0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_MIRRORING_DOMAIN_CHANNEL_SHIFT 4 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_BITMASK 0xF0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_VALID_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_VALID_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_NOT_VALID 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_VALID_BITMASK 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_VALID_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_NOT_VALID 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_SHIFT 0 /* achu: not a typo, 0, then 2 */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_NOT_KNOWN 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_ADDRESS_PARITY_ERROR 2 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_A 0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_B 1 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_C 2 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_D 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_3 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_4 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_A 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_B 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_C 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_D 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_3 2 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_SHIFT 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_INVALID_DIMM_CONFIG_FOR_RAS_MODE 3 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_SHIFT 0 /* achu: Not a typo, lockstep = 2, rank sparing = 4, where is 3? */ #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_MIRRORING 1 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_LOCKSTEP 2 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_RANK_SPARING 4 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_1 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_2 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_3 2 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_4 3 /* Very similar to POST Error Code list above, but slightly different. * Some changes in messages, cut & paste to be clear on differences. */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORD_CHECK_FAILED 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_LOCKED_ERROR 0x0108 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_STUCK_KEY_ERROR 0x0109 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_FIXED_MEDIA_THE_SAS_RAID_FIRMWARE_CANNOT_RUN_PROPERLY 0x0113 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0x0140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT 0x0141 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR 0x0146 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_CACHE_SIZE_MISMATCH_DETECTED 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_STEPPING_MISMATCH 0x0193 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_MISMATCH_DETECTED 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_INTEL_QPI_SPEED_MISMATCH 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_MODEL_MISMATCH 0x0196 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_SPEEDS_MISMATCHED 0x0197 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_IS_NOT_SUPPORTED 0x0198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED 0x019F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED 0x5220 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER 0x5221 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET 0x5224 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_MICROCODE_UPDATE_NOT_FOUND 0x8180 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT 0x8190 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE 0x8198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST 0x8300 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND 0x84F2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE 0x84F3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY 0x84F4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL 0x84FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE 0x8500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_POPULATION_ERROR 0x8501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CLTT_CONFIGURATION_FAILURE_ERROR 0x8502 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_BIST 0x8520 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_BIST 0x8521 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_BIST 0x8522 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_BIST 0x8523 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_BIST 0x8524 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_BIST 0x8525 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_BIST 0x8526 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_BIST 0x8527 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_BIST 0x8528 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_BIST 0x8529 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_BIST 0x852A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_BIST 0x852B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_DISABLED 0x8540 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_DISABLED 0x8541 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_DISABLED 0x8542 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_DISABLED 0x8543 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_DISABLED 0x8544 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_DISABLED 0x8545 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_DISABLED 0x8546 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_DISABLED 0x8547 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_DISABLED 0x8548 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_DISABLED 0x8549 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_DISABLED 0x854A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_DISABLED 0x854B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8560 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8561 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8562 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8563 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8564 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8565 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8566 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8567 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8568 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8569 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85AA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED 0x85AB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE 0x8604 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_UNSPECIFIED_PROCESSOR_COMPONENT_HAS_ENCOUNTERED_A_NONSPECIFIC_ERROR 0x9000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_WAS_NOT_DETECTED 0x9223 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9226 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MOUSE_COMPONENT_WAS_NOT_DETECTED 0x9243 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MOUSE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9246 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9266 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x9268 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x9269 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9286 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR 0x9287 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x9288 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED 0x92A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x92A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR 0x92C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR 0x92C7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR 0x92C8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x94C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x94C9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x9506 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR 0x95A6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_READ_ERROR 0x95A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_WRITE_ERROR 0x95A8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_UNSPECIFIED_SOFTWARE_COMPONENT_ENCOUNTERED_A_START_ERROR 0x9609 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PEI_CORE_COMPONENT_ENCOUNTERED_A_LOAD_ERROR 0x9641 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PEI_MODULE_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR 0x9667 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_CORE_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR 0x9687 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR 0x96A7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_AN_INVALID_CONFIGURATION 0x96AB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SMM_DRIVER_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR 0x96E7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED 0xA000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING 0xA001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_FAILURE 0xA002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST 0xA003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_MISMATCH_ERROR 0xA022 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_LOW_VOLTAGE_ERROR 0xA027 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_HIGH_VOLTAGE_ERROR 0xA028 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA421 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_ATA_BUS_SMART_NOT_SUPPORTED 0xA500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_ATA_SMART_IS_DISABLED 0xA501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0xA5A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA5A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_IBIST_ERROR 0xA5A4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM 0xA6A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_UNRECOGNIZED 0xB6A3 /* * Intel S2600WP */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed and new ones, * so new macros to differentiate */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_DATA_LINK_LAYER_PROTOCOL_ERROR 0x00 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_SURPRISE_LINK_DOWN_ERROR 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_COMPLETER_ABORT 0x02 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_UNSUPPORTED_REQUEST 0x03 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_POISONED_TLP 0x04 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_FLOW_CONTROL_PROTOCOL 0x05 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_COMPLETION_TIMEOUT 0x06 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_RECEIVER_BUFFER_OVERFLOW 0x07 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_ACS_VIOLATION 0x08 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_MALFORMED_TLP 0x09 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_ECRC_ERROR 0x0A #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_RECEIVED_FATAL_MESSAGE 0x0B #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_UNEXPECTED_COMPLETION 0x0C #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_RECEIVED_NON_FATAL_MESSAGE 0x0D #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_UNCORRECTABLE_INTERNAL 0x0E #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_MC_BLOCKED_TLP 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: not a typo, why a from from 0x01 to 0x0f? */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_2_ATOMIC_EGRESS_BLOCKED 0x00 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_2_TLP_PREFIX_BLOCKED 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_FATAL_ERROR_2_UNSPECIFIED_NON_AER_FATAL_ERROR 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: Similar to above, but some events text changed, so new macros to differentiate */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_RECEIVER_ERROR 0x00 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_BAD_DLLP 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_BAD_TLP 0x02 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_REPLAY_NUM_ROLLOVER 0x03 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_REPLAY_TIMER_TIMEOUT 0x04 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_ADVISORY_NON_FATAL 0x05 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_LINK_BW_CHANGED 0x06 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_CORRECTABLE_INTERNAL 0x07 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_PCIE_CORRECTABLE_ERROR_HEADER_LOG_OVERFLOW 0x08 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_LINK_LAYER_UNCORRECTABLE_ECC_ERROR 0x00 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_POISONED_PACKET_RECEPTION_ERROR 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_LINK_PHY_INIT_FAILURE 0x02 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_CSI_PHY_LAYER_DETECTED_DRIFT_BUFFER_ALARM 0x03 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_CSI_PHY_DETECTED_LATENCY_BUFFER_ROLLOVER 0x04 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_CSI_PHY_INIT_FAILURE 0x05 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_CSI_LINK_LAYER_GENERIC_CONTROL_ERROR 0x06 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PARITY_ERROR_IN_LINK_OR_PHY_LAYER 0x07 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_TIMEOUT_DETECTED 0x08 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_FAILED_RESPONSE 0x09 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_ILLEGAL_PACKET_FIELD 0x0A #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_QUEUE_TABLE_OVERFLOW_UNDERFLOW 0x0B #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_VIRAL_ERROR 0x0C #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_PARITY_ERROR 0x0D #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_ROUTING_TABLE_ERROR 0x0E /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_ILLEGAL_INBOUND_REQUEST 0x00 #if 0 /* achu: Intel informed me there was an error in their documentation and the following was not correct. * I'll leave this here for legacy documentation */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR_2 0x02 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR_3 0x03 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_RECEIVED_XPF_PHYSICAL_LOGICAL_REDIRECT_INTERRUPT_INBOUND 0x04 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_ILLEGAL_SAD_OR_ILLEGAL_OR_NON_EXISTENT_ADDRESS_OR_MEMORY 0x05 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_PCH_WRITE_CACHE_COHERENCY_VIOLATION 0x06 #else /* !0 */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_IIO_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_IIO_CSR_CROSSING_32_BIT_BOUNDARY_ERROR 0x02 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_IIO_RECEIVED_XPF_PHYSICAL_LOGICAL_REDIRECT_INTERRUPT_INBOUND 0x03 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_IIO_ILLEGAL_SAD_OR_ILLEGAL_OR_NON_EXISTENT_ADDRESS_OR_MEMORY 0x04 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_FATAL_ERROR_2_IIO_WRITE_CACHE_COHERENCY_VIOLATION 0x05 #endif /* !0 */ /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_LINK_WIDTH_REDUCED_HALF_WIDTH 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_QPI_LINK_WIDTH_REDUCED_QUARTER_WIDTH 0x02 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_FIRMWARE_UPDATE_STATUS_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_VERSION_CHANGE */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_STARTED 0x00 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_COMPLETED_SUCCESSFULLY 0x01 #define IPMI_OEM_INTEL_S2600WP_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_FAILURE 0x02 /* * String arrays for above */ extern const char * const ipmi_oem_intel_s2600wp_specific_pcie_fatal_error[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_pcie_correctable_error[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_pcie_correctable_error_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_qpi_fatal_error[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced_max_index; extern const char * const ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor[]; extern unsigned int ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor_max_index; #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_MIRRORING_DOMAIN_CHANNEL_BITMASK 0xF0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_MIRRORING_DOMAIN_CHANNEL_SHIFT 4 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_BITMASK 0xF0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_VALID_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_VALID_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_NOT_VALID 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_VALID_BITMASK 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_VALID_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_NOT_VALID 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_SHIFT 0 /* achu: not a typo, 0, then 2 */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_NOT_KNOWN 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_ADDRESS_PARITY_ERROR 2 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_A 0 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_B 1 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_C 2 #define IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_D 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_3 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_4 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_A 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_B 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_C 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_D 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_3 2 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_SHIFT 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_INVALID_DIMM_CONFIG_FOR_RAS_MODE 3 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_SHIFT 0 /* achu: Not a typo, lockstep = 2, rank sparing = 4, where is 3? */ #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_MIRRORING 1 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_LOCKSTEP 2 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_RANK_SPARING 4 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_1 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_2 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_3 2 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_4 3 /* Very similar to POST Error Code list above, but slightly different. */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SYSTEM_RTC_DATE_TIME_NOT_SET 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORD_CHECK_FAILED 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_FIXED_MEDIA_NOT_DETECTED 0x0113 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0x0140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT 0x0141 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR 0x0146 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_CORE_THREAD_COUNT_MISMATCH_DETECTED 0x0191 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_LINK_FREQUENCIES_UNABLE_TO_SYNCHRONIZE 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_MODEL_MISMATCH_DETECTED 0x0196 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_FREQUENCIES_UNABLE_TO_SYNCHRONIZE 0x0197 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_SETTINGS_RESET_TO_DEFAULT_SETTINGS 0x5220 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER 0x5221 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET 0x5224 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_DISABLED 0x8130 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_DISABLED 0x8131 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_DISABLED 0x8132 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_DISABLED 0x8133 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8162 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8163 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_FAILED_SELF_TEST_BIST 0x8170 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_FAILED_SELF_TEST_BIST 0x8171 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_FAILED_SELF_TEST_BIST 0x8172 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_FAILED_SELF_TEST_BIST 0x8173 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_MICROCODE_UPDATE_NOT_FOUND 0x8180 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_MICROCODE_UPDATE_NOT_FOUND 0x8181 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_MICROCODE_UPDATE_NOT_FOUND 0x8182 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_MICROCODE_UPDATE_NOT_FOUND 0x8183 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT 0x8190 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE 0x8198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST 0x8300 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_HOT_SWAP_CONTROLLER_FAILURE 0x8305 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MANAGEMENT_ENGINE_FAILED_SELF_TEST 0x83A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MANAGEMENT_ENGINE_FAILED_TO_RESPOND 0x83A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND 0x84F2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE 0x84F3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY 0x84F4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL 0x84FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE 0x8500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_POPULATION_ERROR 0x8501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_FAILED_TEST_INITIALIZATION 0x8520 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_FAILED_TEST_INITIALIZATION 0x8521 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_FAILED_TEST_INITIALIZATION 0x8522 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_FAILED_TEST_INITIALIZATION 0x8523 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_FAILED_TEST_INITIALIZATION 0x8524 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_FAILED_TEST_INITIALIZATION 0x8525 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_FAILED_TEST_INITIALIZATION 0x8526 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_FAILED_TEST_INITIALIZATION 0x8527 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_FAILED_TEST_INITIALIZATION 0x8528 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_FAILED_TEST_INITIALIZATION 0x8529 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_FAILED_TEST_INITIALIZATION 0x852A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_FAILED_TEST_INITIALIZATION 0x852B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_FAILED_TEST_INITIALIZATION 0x852C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_FAILED_TEST_INITIALIZATION 0x852D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_FAILED_TEST_INITIALIZATION 0x852E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_FAILED_TEST_INITIALIZATION 0x852F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_FAILED_TEST_INITIALIZATION 0x8530 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_FAILED_TEST_INITIALIZATION 0x8531 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_FAILED_TEST_INITIALIZATION 0x8532 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_FAILED_TEST_INITIALIZATION 0x8533 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_FAILED_TEST_INITIALIZATION 0x8534 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_FAILED_TEST_INITIALIZATION 0x8535 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_FAILED_TEST_INITIALIZATION 0x8536 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_FAILED_TEST_INITIALIZATION 0x8537 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_FAILED_TEST_INITIALIZATION 0x8538 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_FAILED_TEST_INITIALIZATION 0x8539 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_FAILED_TEST_INITIALIZATION 0x853A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_FAILED_TEST_INITIALIZATION 0x853B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_FAILED_TEST_INITIALIZATION 0x853C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_FAILED_TEST_INITIALIZATION 0x853D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_FAILED_TEST_INITIALIZATION 0x853E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_FAILED_TEST_INITIALIZATION 0x853F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_FAILED_TEST_INITIALIZATION 0x85C0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_FAILED_TEST_INITIALIZATION 0x85C1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_FAILED_TEST_INITIALIZATION 0x85C2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_FAILED_TEST_INITIALIZATION 0x85C3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_FAILED_TEST_INITIALIZATION 0x85C4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_FAILED_TEST_INITIALIZATION 0x85C5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_FAILED_TEST_INITIALIZATION 0x85C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_FAILED_TEST_INITIALIZATION 0x85C7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_FAILED_TEST_INITIALIZATION 0x85C8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_FAILED_TEST_INITIALIZATION 0x85C9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_FAILED_TEST_INITIALIZATION 0x85CA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_FAILED_TEST_INITIALIZATION 0x85CB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_FAILED_TEST_INITIALIZATION 0x85CC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_FAILED_TEST_INITIALIZATION 0x85CD #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_FAILED_TEST_INITIALIZATION 0x85CE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_FAILED_TEST_INITIALIZATION 0x85CF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_DISABLED 0x8540 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_DISABLED 0x8541 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_DISABLED 0x8542 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_DISABLED 0x8543 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_DISABLED 0x8544 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_DISABLED 0x8545 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_DISABLED 0x8546 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_DISABLED 0x8547 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_DISABLED 0x8548 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_DISABLED 0x8549 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_DISABLED 0x854A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_DISABLED 0x854B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_DISABLED 0x854C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_DISABLED 0x854D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_DISABLED 0x854E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_DISABLED 0x854F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_DISABLED 0x8550 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_DISABLED 0x8551 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_DISABLED 0x8552 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_DISABLED 0x8553 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_DISABLED 0x8554 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_DISABLED 0x8555 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_DISABLED 0x8556 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_DISABLED 0x8557 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_DISABLED 0x8558 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_DISABLED 0x8559 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_DISABLED 0x855A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_DISABLED 0x855B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_DISABLED 0x855C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_DISABLED 0x855D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_DISABLED 0x855E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_DISABLED 0x855F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_DISABLED 0x85D0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_DISABLED 0x85D1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_DISABLED 0x85D2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_DISABLED 0x85D3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_DISABLED 0x85D4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_DISABLED 0x85D5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_DISABLED 0x85D6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_DISABLED 0x85D7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_DISABLED 0x85D8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_DISABLED 0x85D9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_DISABLED 0x85DA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_DISABLED 0x85DB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_DISABLED 0x85DC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_DISABLED 0x85DD #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_DISABLED 0x85DE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_DISABLED 0x85DF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8560 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8561 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8562 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8563 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8564 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8565 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8566 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8567 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8568 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8569 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x856F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8570 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8571 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8572 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8573 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8574 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8575 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8576 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8577 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8578 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x8579 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x857F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85E9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85EA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85EB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85EC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85ED #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85EE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR 0x85EF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_POST_RECLAIM_OF_NON_CRITICAL_NVRAM_VARIABLES 0x8604 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_SETTINGS_ARE_CORRUPTED 0x8605 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_NVRAM_VARIABLE_SPACE_WAS_CORRUPTED_AND_HAS_BEEN_REINITIALIZED 0x8606 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED 0x92A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x92A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_ATA_ATPI_INTERFACE_ERROR 0x9505 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED 0xA000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING 0xA001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_FAILURE 0xA002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST 0xA003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_ACM_ERROR 0xA100 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA421 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0xA5A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA5A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM 0xA6A0 /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ /* achu: These are Intel Node Manager events, but Intel Node Manager * does not exist on these boards. So cutting & pasting into this * section to differentiate */ #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS 0x00 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_RECOVERY_GPIO_FORCED 0x00 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED 0x01 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR 0x02 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION 0x03 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR 0x04 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_BMC_COLD_RESET_ERROR 0x05 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_DIRECT_FLASH_UPDATE 0x06 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MANUFACTURING_ERROR 0x07 #define IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PERSISTENT_STORAGE_INTEGRITY_ERROR 0x08 /* No 0x09 - not available unlike newer Intel Node Manager */ #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_THROTTLING_BITMASK 0x03 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_THROTTLING_SHIFT 0 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_NATIVE_THROTTLING 0 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_EXTERNAL_THROTTLING 1 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_BITMASK 0xE0 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_SHIFT 5 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CHANNEL_NUMBER_BITMASK 0x18 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CHANNEL_NUMBER_SHIFT 3 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_DIMM_BITMASK 0x07 #define IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_CPU_NUMBER_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_CPU_NUMBER_SHIFT 5 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_BITMASK 0x18 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_SHIFT 3 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_QPI 0 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_LLC 1 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_BITMASK 0x07 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_SHIFT 0 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_QPI0 0 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_QPI1 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_DEVICE_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_FUNCTION_NUMBER_SHIFT 0 /* These are from WiWynn doc */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_MISMATCH 0x0057 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_SELF_TEST_FAILED 0x0058 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_CACHE_ERROR 0x0158 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_MICROCODE_UPDATE_FAILED 0x0059 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_NO_MICROCODE 0x0159 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_INTERNAL_ERROR 0x005A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RESET_NOT_AVAILABLE1 0x005B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RESET_NOT_AVAILABLE2 0x00F8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RECOVERY_NO_CAPSULE 0x00F9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_SB_PWR_FLR 0x5724 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_SB_SYSPWR_FLR 0x5723 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_CLEAR_CMOS 0x5720 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NB_ERROR 0x00D1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_ARCH_PROTOCOL_NOT_AVAILABLE 0x00D3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_PCI_BUS_OUT_OF_RESOURCES 0x00D4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_LEGACY_OPROM_NO_SPACE 0x00D5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NO_CON_OUT 0x00D6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NO_CON_IN 0x00D7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_FLASH_UPDATE_FAILED 0x00DB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_RESET_NOT_AVAILABLE 0x00DC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_ME_RECOVERED_VIA_GR 0x5725 /* These are from a Quanta doc */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_CMOS_CLEAR 0x5120 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_THERMAL_TRIP 0x5122 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_SYS_PWROK_DROPS_UNEXPECTEDLY 0x5123 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_AC_LOST 0x5124 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_RECOVER_ME_FROM_ABNORMAL_MODE 0x5125 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_BACKUP_IMAGE_LOADED_DIRECT_FW_UPDATE_NEEDED 0x5126 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_ROCVER_HECI_FROM_ABNORMAL_MODE 0x5128 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_SHIFT 5 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_SHIFT 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IRP0 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IRP1 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IIO_CORE 2 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_VT_D 3 /* achu: doc lists bit [1], not bit [0], but given rollover is bit [8], and from testing, assuming it's bit [0] */ #define IPMI_SENSOR_TYPE_OEM_INTEL_SEL_CLEAR_BITMASK 0x01 #define IPMI_SENSOR_TYPE_OEM_INTEL_SEL_CLEAR_SHIFT 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_SEL_ROLLOVER_BITMASK 0x10 #define IPMI_SENSOR_TYPE_OEM_INTEL_SEL_ROLLOVER_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_WINDMILL_LOGICAL_RANK_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_WINDMILL_LOGICAL_RANK_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CHANNEL_NUMBER_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CHANNEL_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_DIMM_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_DOWN 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_CYCLE_RESET 1 #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_ON 2 #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_AC_LOST 4 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_NONE_OF_THE_ABOVE 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_CML_ERROR 1 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_VIN_UV_FAULT 3 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_IOUT_OC_FAULT 4 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_HOTSWAP_OFF 6 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_POWER_GOOD 3 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_MFR_STATUS 4 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_INPUT_STATUS 5 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_IOUT_STATUS 6 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_VOUT_STATUS 7 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_IOUT_WARN2 0 /* achu: HS_SHUTDOWN_CAUSE1 & HS_SHUTDOWN_CAUSE2 list 4 error messages * with <00>, <01>, <10>, & <11> listed next to them. I have no idea * where these other bits come from. */ #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE1 1 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE2 2 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_INLIM 3 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_OV_CMP_OUT 5 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_UV_CMP_OUT 6 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_FET_HEALTH_BAD 7 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_PIN_OP_WARN 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_FAULT 4 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_WARN 5 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_WARN 6 #define IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_FAULT 7 /* * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_VOLTAGE_FAULT 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_POWER_FAULT 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_OVER_CURRENT_FAULT 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OVER_TEMPERATURE_FAULT 0x04 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_FAN_FAULT 0x05 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_VOLTAGE_WARNING 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_POWER_WARNING 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_OVER_CURRENT_WARNING 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OVER_TEMPERATURE_WARNING 0x04 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_FAN_WARNING 0x05 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_UNDER_VOLTAGE_WARNING 0x06 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_OVER_CURRENT_WARNING 0x07 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_OVER_POWER_WARNING 0x08 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_BMC_CANNOT_ACCESS_PMBUS 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PMBUS_REVISION_NOT_SUPPORTED 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PMBUS_REVISION_ERROR 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PSU_INCOMPATIBLE 0x04 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PSU_FW_DEGRADED 0x05 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_BITMASK 0x0F #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_SHIFT 0 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU1 0x01 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU2 0x02 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU3 0x04 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU4 0x08 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU1_DIMM_CHANNEL_1_2 0x01 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU1_DIMM_CHANNEL_3_4 0x02 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU2_DIMM_CHANNEL_1_2 0x04 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU2_DIMM_CHANNEL_3_4 0x08 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU3_DIMM_CHANNEL_1_2 0x10 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU3_DIMM_CHANNEL_3_4 0x20 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU4_DIMM_CHANNEL_1_2 0x40 #define IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU4_DIMM_CHANNEL_3_4 0x80 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_CHANNEL_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_CHANNEL_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU3 2 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU4 3 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_1 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_2 1 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_3 2 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_THERMAL_TRIP_OEM_INTEL_E52600V3_CPU_NON_RECOVERABLE_OVER_TEMP_CONDITION 0x00 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_THERMAL_TRIP_OEM_INTEL_E52600V3_CPU_BOOT_FIVR_FAULT 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_UNKNOWN 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CATERR 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_CORE_ERROR 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_MSID_MISMATCH 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA3_OEM_INTEL_E52600V3_CPU1 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA3_OEM_INTEL_E52600V3_CPU2 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA3_OEM_INTEL_E52600V3_CPU3 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA3_OEM_INTEL_E52600V3_CPU4 0x08 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_BITMASK 0x0F #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_SHIFT 0 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU1 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU2 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU3 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU4 0x08 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_BITMASK 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SHIFT 0 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_CFG_SYNTAX_ERROR 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_CHASSIS_AUTO_DETECT_ERROR 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_CFG_FILE_MISMATCH 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_OR_CFG_FILE_CORRUPTED 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_SYNTAX_ERROR 0x04 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_SHIFT 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_INVALID_DIMM_CONFIGURATION_FOR_RAS_MODE 3 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_BITMASK 0x0F #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_SHIFT 0 /* achu: Not a typo, lockstep = 2, rank sparing = 4, where is 3? */ #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_NONE 0 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_MIRRORING 1 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_LOCKSTEP 2 #define IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_RANK_SPARING 4 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_DEVICE_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_FUNCTION_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SYSTEM_RTC_DATE_TIME_NOT_SET 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORD_CHECK_FAILED 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0x0140 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT 0x0141 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR 0x0146 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_CORE_THREAD_COUNT_MISMATCH_DETECTED 0x0191 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_LINK_FREQUENCIES_UNABLE_TO_SYNCHRONIZE 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_MODEL_MISMATCH_DETECTED 0x0196 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_FREQUENCIES_UNABLE_TO_SYNCHRONIZE 0x0197 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_SETTINGS_RESET_TO_DEFAULT_SETTINGS 0x5220 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER 0x5221 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET 0x5224 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_DISABLED 0x8130 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_DISABLED 0x8131 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_DISABLED 0x8132 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_DISABLED 0x8133 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8162 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE 0x8163 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_FAILED_SELF_TEST_BIST 0x8170 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_FAILED_SELF_TEST_BIST 0x8171 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_FAILED_SELF_TEST_BIST 0x8172 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_FAILED_SELF_TEST_BIST 0x8173 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_MICROCODE_UPDATE_NOT_FOUND 0x8180 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_MICROCODE_UPDATE_NOT_FOUND 0x8181 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_MICROCODE_UPDATE_NOT_FOUND 0x8182 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_MICROCODE_UPDATE_NOT_FOUND 0x8183 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT 0x8190 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE 0x8198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST 0x8300 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_HOT_SWAP_CONTROLLER_FAILURE 0x8305 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MANAGEMENT_ENGINE_ME_FAILED_SELF_TEST 0x83A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MANAGEMENT_ME_FAILED_TO_RESPOND 0x83A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND 0x84F2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE 0x84F3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY 0x84F4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL 0x84FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE 0x8500 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_POPULATION_ERROR 0x8501 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_INITIALIZATION 0x8520 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_INITIALIZATION 0x8521 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_FAILED_SELF_TEST_INITIALIZATION 0x8522 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_INITIALIZATION 0x8523 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_INITIALIZATION 0x8524 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_FAILED_SELF_TEST_INITIALIZATION 0x8525 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_INITIALIZATION 0x8526 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_INITIALIZATION 0x8527 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_FAILED_SELF_TEST_INITIALIZATION 0x8528 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_INITIALIZATION 0x8529 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_INITIALIZATION 0x852A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_FAILED_SELF_TEST_INITIALIZATION 0x852B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_INITIALIZATION 0x852C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_INITIALIZATION 0x852D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_FAILED_SELF_TEST_INITIALIZATION 0x852E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_INITIALIZATION 0x852F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_INITIALIZATION 0x8530 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_FAILED_SELF_TEST_INITIALIZATION 0x8531 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_FAILED_SELF_TEST_INITIALIZATION 0x8532 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_FAILED_SELF_TEST_INITIALIZATION 0x8533 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_FAILED_SELF_TEST_INITIALIZATION 0x8534 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_FAILED_SELF_TEST_INITIALIZATION 0x8535 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_FAILED_SELF_TEST_INITIALIZATION 0x8536 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_FAILED_SELF_TEST_INITIALIZATION 0x8537 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_FAILED_SELF_TEST_INITIALIZATION 0x8538 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_FAILED_SELF_TEST_INITIALIZATION 0x8539 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_FAILED_SELF_TEST_INITIALIZATION 0x853A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_FAILED_SELF_TEST_INITIALIZATION 0x853B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_FAILED_SELF_TEST_INITIALIZATION 0x853C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_FAILED_SELF_TEST_INITIALIZATION 0x853D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_FAILED_SELF_TEST_INITIALIZATION 0x853E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_FAILED_SELF_TEST_INITIALIZATION 0x853F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_FAILED_SELF_TEST_INITIALIZATION 0x85C0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_FAILED_SELF_TEST_INITIALIZATION 0x85C1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_FAILED_SELF_TEST_INITIALIZATION 0x85C2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_FAILED_SELF_TEST_INITIALIZATION 0x85C3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_FAILED_SELF_TEST_INITIALIZATION 0x85C4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_FAILED_SELF_TEST_INITIALIZATION 0x85C5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_FAILED_SELF_TEST_INITIALIZATION 0x85C6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_FAILED_SELF_TEST_INITIALIZATION 0x85C7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_FAILED_SELF_TEST_INITIALIZATION 0x85C8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_FAILED_SELF_TEST_INITIALIZATION 0x85C9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_FAILED_SELF_TEST_INITIALIZATION 0x85CA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_FAILED_SELF_TEST_INITIALIZATION 0x85CB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_FAILED_SELF_TEST_INITIALIZATION 0x85CC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_FAILED_SELF_TEST_INITIALIZATION 0x85CD #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_FAILED_SELF_TEST_INITIALIZATION 0x85CE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_FAILED_SELF_TEST_INITIALIZATION 0x85CF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_DISABLED 0x8540 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_DISABLED 0x8541 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_DISABLED 0x8542 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_DISABLED 0x8543 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_DISABLED 0x8544 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_DISABLED 0x8545 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_DISABLED 0x8546 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_DISABLED 0x8547 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_DISABLED 0x8548 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_DISABLED 0x8549 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_DISABLED 0x854A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_DISABLED 0x854B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_DISABLED 0x854C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_DISABLED 0x854D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_DISABLED 0x854E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_DISABLED 0x854F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_DISABLED 0x8550 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_DISABLED 0x8551 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_DISABLED 0x8552 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_DISABLED 0x8553 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_DISABLED 0x8554 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_DISABLED 0x8555 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_DISABLED 0x8556 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_DISABLED 0x8557 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_DISABLED 0x8558 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_DISABLED 0x8559 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_DISABLED 0x855A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_DISABLED 0x855B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_DISABLED 0x855C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_DISABLED 0x855D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_DISABLED 0x855E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_DISABLED 0x855F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_DISABLED 0x85D0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_DISABLED 0x85D1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_DISABLED 0x85D2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_DISABLED 0x85D3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_DISABLED 0x85D4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_DISABLED 0x85D5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_DISABLED 0x85D6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_DISABLED 0x85D7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_DISABLED 0x85D8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_DISABLED 0x85D9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_DISABLED 0x85DA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_DISABLED 0x85DB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_DISABLED 0x85DC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_DISABLED 0x85DD #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_DISABLED 0x85DE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_DISABLED 0x85DF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8560 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8561 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8562 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8563 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8564 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8565 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8566 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8567 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8568 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8569 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x856F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8570 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8571 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8572 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8573 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8574 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8575 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8576 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8577 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8578 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x8579 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x857F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E2 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E4 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E5 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E6 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E7 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E8 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85E9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85EA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85EB #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85EC #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85ED #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85EE #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED 0x85EF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_POST_RECLAIM_OF_NON_CRITICAL_VARIABLES 0x8604 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_SETTINGS_ARE_CORRUPTED 0x8605 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_NVRAM_VARIABLE_SPACE_WAS_CORRUPTED_AND_HAS_BEEN_REINITIALIZED 0x8606 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED 0x92A3 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR 0x92A9 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED 0xA000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING 0xA001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_FAILURE 0xA002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST 0xA003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_ACM_ERROR 0xA100 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA421 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR 0xA5A0 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR 0xA5A1 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM 0xA6A0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_0 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_1 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_A 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_B 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_C 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_D 3 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_BITMASK 0x18 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU1 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU2 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU3 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU4 3 /* For CPU1 */ #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_A 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_B 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_C 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_D 3 /* For CPU2 */ #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_E 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_F 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_G 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_H 3 /* For CPU3 */ #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_J 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_K 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_L 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_M 3 /* For CPU4 */ #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_N 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_P 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_R 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_T 3 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_1 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_2 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_3 2 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_CHANNEL_NUMBER_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_CHANNEL_NUMBER_INVALID 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_SHIFT 3 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_DIMM_SLOT_ID_VALID 1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_DIMM_SLOT_ID_INVALID 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_BITMASK 0x07 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_PARITY_ERROR_TYPE_NOT_KNOWN 0x0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_DATA_PARITY_ERROR 0x1 #define IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_COMMAND_AND_ADDRESS_PARITY_ERROR 0x3 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_OPI_FATAL_ERROR * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_LINK_LAYER_UNCORRECTABLE_ECC_ERROR 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_POISONED_PACKET_RECEPTION_ERROR 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_LINK_PHY_INIT_FAILURE_WITH_RESULTANT_DEGRADATION_IN_LINK_WIDTH 0x02 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PHY_LAYER_DETECTED_DRIFT_BUFFER_ALARM 0x03 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PHY_DETECTED_LATENCY_BUFFER_ROLLOVER 0x04 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PHY_INIT_FAILURE 0x05 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_LINK_LAYER_GENERIC_CONTROL_ERROR 0x06 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PARITY_ERROR_IN_LINK_OR_PHY_LAYER 0x07 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_TIMEOUT_DETECTED 0x08 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_FAILED_RESPONSE 0x09 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_ILLEGAL_PACKET_FIELD 0x0A #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_QUEUE_TABLE_OVERFLOW_UNDERFLOW 0x0B #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_VIRAL_ERROR 0x0C #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_PROTOCOL_LAYER_PARITY_ERROR 0x0D #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_ROUTING_TABLE_ERROR 0x0E /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_ILLEGAL_INBOUND_REQUEST 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_IIO_WRITE_CACHE_UNCORRECTABLE_DATA_ECC_ERROR 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_IIO_CSR_CROSSING_32_BIT_BOUNDARY_ERROR 0x02 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_IIO_RECEIVED_XPF_PHYSICAL_LOGICAL_REDIRECT_INTERRUPT_INBOUND 0x03 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_IIO_ILLEGAL_SAD_OR_ILLEGAL_OR_NON_EXISTENT_ADDRESS_OR_MEMORY 0x04 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_FATAL_ERROR_2_IIO_WRITE_CACHE_COHERENCY_VIOLATION 0x05 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_LINK_WIDTH_REDUCED * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_LINK_WIDTH_REDUCED_HALF_WIDTH 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_QPI_LINK_WIDTH_REDUCED_QUARTER_WIDTH 0x02 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_DATA_LINK_LAYER_PROTOCOL_ERROR 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_SURPRISE_LINK_DOWN_ERROR 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_COMPLETER_ABORT 0x02 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_UNSUPPORTED_REQUEST 0x03 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_POISONED_TLP 0x04 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_FLOW_CONTROL_PROTOCOL 0x05 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_COMPLETION_TIMEOUT 0x06 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_RECEIVER_BUFFER_OVERFLOW 0x07 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_ACS_VIOLATION 0x08 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_MALFORMED_TLP 0x09 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_ECRC_ERROR 0x0A #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_RECEIVED_FATAL_MESSAGE_FROM_DOWNSTREAM 0x0B #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_UNEXPECTED_COMPLETION 0x0C #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_RECEIVED_ERR_NONFATAL_MESSAGE 0x0D #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_UNCORRECTABLE_INTERNAL 0x0E #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_MC_BLOCKED_TLP 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2 * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_2_ATOMIC_EGRESS_BLOCKED 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_2_TLP_PREFIX_BLOCKED 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_FATAL_ERRORS_2_UNSPECIFIED_NON_AER_FATAL_ERROR 0x0F /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS * Sensor Type = IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_RECEIVER_ERROR 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_BAD_DLLP 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_BAD_TLP 0x02 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_REPLAY_NUM_ROLLOVER 0x03 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_REPLAY_TIMER_TIMEOUT 0x04 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_ADVISORY_NON_FATAL 0x05 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_LINK_BW_CHANGED 0x06 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_CORRECTABLE_INTERNAL 0x07 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_PCI_EXPRESS_CORRECTABLE_ERRORS_HEADER_LOG_OVERFLOW 0x08 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_FIRMWARE_UPDATE_STATUS_SENSOR * Sensor Type = IPMI_SENSOR_TYPE_VERSION_CHANGE */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_STARTED 0x00 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_COMPLETED_SUCCESSFULLY 0x01 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_UPDATE_FAILURE 0x02 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BITMASK 0xF0 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_SHIFT 4 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BMC 0x0 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BIOS 0x1 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_ME 0x2 #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_INSTANCE_BITMASK 0x0C #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_INSTANCE_SHIFT 2 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_START * Sensor Type = IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_BIOS_RECOVERY_START 0x01 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_FINISH * Sensor Type = IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS */ /* achu: not a typo, no 0x00 offset */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_BIOS_RECOVERY_FINISH 0x01 /* * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO * Sensor Type = IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO */ #define IPMI_OEM_INTEL_E52600V3_SPECIFIC_IERR_RECOVERY_DUMP_INFO_DUMP_FAILED 0x01 /* * String arrays for above */ extern const char * const ipmi_oem_intel_e52600v3_specific_qpi_fatal_error[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_bios_recovery_start[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_bios_recovery_start_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_bios_recovery_finish[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_bios_recovery_finish_max_index; extern const char * const ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info[]; extern unsigned int ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info_max_index; #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_1 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_2 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_3 2 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_4 3 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_BITMASK 0x1F #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_SHIFT 0 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_UNCORE_MSR_REGISTER 0x01 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_CORE_MSR_REGISTERS 0x02 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_IIO_REGISTER 0x04 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_PCI_CONFIG_SPACE 0x08 #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_MCA_ERROR_SOURCE_REGISTER 0x10 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INTEL_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-inventec-spec.h0000644002055400205540000003032613527331636034430 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INVENTEC_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_WARNING_THRESHOLD 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_CRITICAL_THRESHOLD 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_OTHER 0xFF #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM1 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM0 0x02 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM1 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM0 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM1 0x05 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM0 0x06 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH0_DIM0 0x11 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH1_DIM0 0x12 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH2_DIM0 0x13 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM1 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM0 0x02 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM1 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM0 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM1 0x05 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM0 0x06 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM1 0x11 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM0 0x12 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM1 0x13 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM0 0x14 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM1 0x15 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM0 0x16 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_EXTENDED_MEMORY_TEST 0x3A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_SETUP_MENU 0x87 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_OPTION_ROM_SCAN 0x78 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_TIMER_COUNT_READ_WRITE_ERROR 0x0000 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_MASTER_PIC_ERROR 0x0001 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_SLAVE_PIC_ERROR 0x0002 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_BATTERY_ERROR 0x0003 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_DIAGNOSTIC_STATUS_ERROR 0x0004 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_CHECKSUM_ERROR 0x0005 /* achu: Inventec 5441 lists "Config Error", while Inventec 5442 lists "Configuration Error" * We'll just keep "Config Error" */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_CONFIG_ERROR 0x0006 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KEYBOARD_LOCK_ERROR 0x0008 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NO_KEYBOARD_ERROR 0x0009 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KBC_BAT_TEST_ERROR 0x000A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_MEMORY_SIZE_ERROR 0x000B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_RAM_READ_WRITE_TEST_ERROR 0x000C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FDD_0_ERROR 0x000E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FLOPPY_CONTROLLER_ERROR 0x0010 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_DATE_TIME_ERROR 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NO_PS2_MOUSE_ERROR 0x0014 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_REFRESH_TIMER_ERROR 0x0040 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DISPLAY_MEMORY_ERROR 0x0041 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_POST_THE_INS_KEY_ERROR 0x0043 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC_PAGE_REGISTER_ERROR 0x0044 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC1_CHANNEL_REGISTER_ERROR 0x0045 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC2_CHANNEL_REGISTER_ERROR 0x0046 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PMM_MEMORY_ALLOCATION_ERROR 0x0047 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PASSWORD_CHECK_ERROR 0x0048 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ADM_MODULE_ERROR 0x004A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_LANGUAGE_MODULE_ERROR 0x004B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KBC_INTERFACE_ERROR 0x004C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_0_ERROR 0x004D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_1_ERROR 0x004E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_2_ERROR 0x004F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_3_ERROR 0x0050 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_4_ERROR 0x0051 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_5_ERROR 0x0052 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_6_ERROR 0x0053 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_7_ERROR 0x0054 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_0_ERROR 0x0055 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_1_ERROR 0x0056 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_2_ERROR 0x0057 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_3_ERROR 0x0058 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_4_ERROR 0x0059 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_5_ERROR 0x005A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_6_ERROR 0x005B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_7_ERROR 0x005C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATA_SMART_FEATURE_ERROR 0x005D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NON_CRITICAL_PASSWORD_CHECK_ERROR 0x005E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DUMMY_BIOS_ERROR 0x00FF #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_HC_NOT_FOUND 0x8101 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_DEVICE_INIT_ERROR 0x8102 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_DEVICE_DISABLED 0x8103 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_OHCI_EMUL_NOT_SUPPORTED 0x8104 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_EHCI_64BIT_DATA_STRUCTURE_ERROR 0x8105 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_SMBIOS_NOT_ENOUGH_SPACE_IN_F000 0x8301 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_AP_APPLICATION_PROCESSOR_FAILED_BIST 0x0110 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU1_THERMAL_FAILURE_DUE_TO_PROCHOT 0x0120 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU2_THERMAL_FAILURE_DUE_TO_PROCHOT 0x0121 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU3_THERMAL_FAILURE_DUE_TO_PROCHOT 0x0122 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU4_THERMAL_FAILURE_DUE_TO_PROCHOT 0x0123 /* BSP = Baseboard Service Processor */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PROCESSOR_FAILED_BIST_BSP 0x0150 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU1_PROCESSOR_MISSING_MICROCODE 0x0160 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU2_PROCESSOR_MISSING_MICROCODE 0x0161 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU3_PROCESSOR_MISSING_MICROCODE 0x0162 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU4_PROCESSOR_MISSING_MICROCODE 0x0163 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_L2_CACHE_SIZE_MISMATCH 0x0192 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_STEPPING_ARE_DIFFERENT 0x0193 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_FAMILY_ARE_DIFFERENT 0x0194 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FRONT_SIDE_BUS_MISMATCH 0x0195 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_MODEL_ARE_DIFFERENT 0x0196 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PROCESSOR_SPEEDS_MISMATCHED 0x0197 /* QPI Mismatch only for Inventec 5442 */ /* QPI = Quickpath Interconnect */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_QPI_MISMATCHED 0x0198 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_UNDEFINED_BIOS_ERROR 0xFFFF #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_INVENTEC_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-quanta-spec.h0000644002055400205540000000630513527331636034106 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_QUANTA_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A0 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A1 0x02 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A2 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B0 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B1 0x05 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B2 0x06 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C0 0x07 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C1 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C2 0x09 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D0 0x0A #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D1 0x0B #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D2 0x0C #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E0 0x0D #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E1 0x0E #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E2 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F0 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F1 0x11 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F2 0x12 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_DEVICE_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_FUNCTION_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI0_ERROR 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI1_ERROR 1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI2_ERROR 2 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI3_ERROR 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_MISCELLANEOUS_ERROR 23 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_IOH_CORE_ERROR 24 #define IPMI_OEM_QUANTA_EVENT_DATA #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_QUANTA_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h0000644002055400205540000000533713527331636035011 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SUPERMICRO_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /******************************************* * Supermicro * *******************************************/ /* * Supermicro X7DBR-3 (X7DBR_3) * Supermicro X7DB8 * Supermicro X8DTN * Supermicro X7SBI-LN4 (X7SBI_LN4) * Supermicro X8DTH * Supermicro X8DTG * Supermicro X8DTU * Supermicro X8DT3-LN4F (X8DT3_LN4F) * Supermicro X8DTU-6+ (X8DTU_6PLUS) * Supermicro X8DTL * Supermicro X8DTL-3F (X8DTL_3F) * Supermicro X8SIL-F (X8SIL_F) * Supermicro X9SCL * Supermicro X9SCM * Supermicro X8DTN+-F (X8DTNPLUS_F) * Supermicro X8SIE * Supermicro X9SCA-F-O (X9SCA_F_O) * Supermicro H8DGU-F (H8DGU_F) * Supermicro X9DRi-F (X9DRI_F) * Supermicro X9DRI-LN4F+ (X9DRI_LN4F_PLUS) * Supermicro X9SPU-F-O (X9SPU_F_O) * Supermicro X9SCM-iiF (X9SCM_IIF) * Supermicro H8SGL-F (H8SGL_F) */ /* achu: not official names, named based on use context */ #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_LOW 0x00 #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_MEDIUM 0x01 #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_HIGH 0x02 #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_OVERHEAT 0x04 #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_NOT_INSTALLED 0x07 /* achu: Different for SEL, I don't know why */ #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_SEL_OVERHEAT 0x02 /* * X10SLM+-F */ #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_PAIR_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_PAIR_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_DIMM_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_SUPERMICRO_CPU_BITMASK 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_SUPERMICRO_CPU_SHIFT 0 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SUPERMICRO_SPEC_H */ ipmi-sensor-and-event-code-tables-oem-wistron-spec.h0000644002055400205540000003220513527331636034320 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_WISTRON_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * Wistron / Dell Poweredge C6220 */ #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_1 0x00 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_2 0x01 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_3 0x02 #define IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_4 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_THRESHOLD_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_THRESHOLD_SHIFT 4 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_SBE_WARNING_THRESHOLD 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_SBE_CRITICAL_THRESHOLD 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_UNSPECIFIED 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU_DIMM_BITMASK 0x0F #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU_DIMM_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU1_DIMM_A 0x00 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU2_DIMM_B 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU3_DIMM_C 0x02 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU4_DIMM_D 0x03 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_1_BITMASK 0x01 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_2_BITMASK 0x02 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_3_BITMASK 0x04 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_4_BITMASK 0x08 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_5_BITMASK 0x10 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_6_BITMASK 0x20 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_7_BITMASK 0x40 #define IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_8_BITMASK 0x80 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_DEVICE_NUMBER_BITMASK 0xF8 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_DEVICE_NUMBER_SHIFT 3 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_FUNCTION_NUMBER_BITMASK 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_FUNCTION_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_CORE 0x07 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_NON_FATAL 0x08 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_FATAL 0x0A #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI0_ERROR 0x00 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI1_ERROR 0x01 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI2_ERROR 0x02 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI3_ERROR 0x03 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI0_PROTOCOL_ERROR 0x04 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI1_PROTOCOL_ERROR 0x05 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI2_PROTOCOL_ERROR 0x06 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI3_PROTOCOL_ERROR 0x07 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_MISCELLANEOUS_ERROR 0x23 #define IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_IOH_CORE_ERROR 0x24 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_BITMASK 0x1F #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_SHIFT 0 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PERIODIC_CRC_ERROR 0x00 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PROTOCOL_ERROR 0x01 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_FLOW_CONTROL_BUFFER_OVERFLOW 0x02 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_RESPONSE_ERROR 0x03 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PER_PACKET_CRC_ERROR 0x04 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_RETRY_COUNTER_ERROR 0x05 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_MCU_PARITY_ERROR 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_FIRST_FIELD_BITMASK 0xF0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_FIRST_FIELD_SHIFT 4 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_BITMASK 0x0F #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_SHIFT 0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_LEFT_SHIFT 2 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_SECOND_FIELD_LOW_BITS_BITMASK 0xC0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_SECOND_FIELD_LOW_BITS_SHIFT 6 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_THIRD_FIELD_BITMASK 0x3F #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_THIRD_FIELD_SHIFT 0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_BITMASK 0x80 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_SHIFT 7 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_PC_COMPATIBLE_BOOT 0x0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_UEFI_BOOT 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_BITMASK 0x7F #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_SHIFT 0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_FORCE_PXE_BOOT 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_NIC_PXE_BOOT 0x2 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_HARD_DISK_BOOT 0x3 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_RAID_HDD_BOOT 0x4 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_USB_STORAGE_BOOT 0x5 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_CD_DVD_ROM_BOOT 0x7 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_ISCSI_BOOT 0x8 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_UEFI_SHELL 0x9 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_EPSA_DIAGNOSTIC_BOOT 0xA #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_RESOURCE_CONFLICT 0x0010 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_CONTROLLER_ERROR 0x0011 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_OUTPUT_ERROR 0x0012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_CONTROLLER_ERROR 0x0013 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_RESOURCE_CONFLICT 0x0014 /* achu: Doc lists "controller error" again, Dell confirms its not a typo. */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_CONTROLLER_ERROR2 0x0015 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_CONTROLLER_ERROR 0x0016 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_INPUT_ERROR 0x0017 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_OUTPUT_ERROR 0x0018 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_READ_ERROR 0x0019 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_WRITE_ERROR 0x001A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_INTERFACE_ERROR 0x001B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MOUSE_INTERFACE_ERROR 0x001C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_NOT_DETECTED 0x001E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_CONTROLLER_ERROR 0x001F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_STUCK_KEY_ERROR 0x0020 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_LOCKED_ERROR 0x0021 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_CORRECTABLE_ERROR 0x0023 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_UNCORRECTABLE_ERROR 0x0024 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_NON_SPECIFIC_ERROR 0x0025 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MP_SERVICE_SELF_TEST_ERROR 0x0026 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_CONTROLLER_ERROR 0x0027 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_READ_ERROR 0x0028 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_WRITE_ERROR 0x0029 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_NOT_DETECTED 0x002A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR 0x002B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_INPUT_ERROR 0x002C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_OUTPUT_ERROR 0x002D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MICROCODE_UPDATE_ERROR 0x002E /* achu: spec says "be updated", I assume English typo */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_NO_MICROCODE_UPDATED 0x002F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_0_DEVICE_NOT_FOUND 0x8012 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_1_DEVICE_NOT_FOUND 0x8013 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_2_DEVICE_NOT_FOUND 0x8014 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_3_DEVICE_NOT_FOUND 0x8015 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_4_DEVICE_NOT_FOUND 0x8016 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_5_DEVICE_NOT_FOUND 0x8017 /* achu: spec says "be Configured", I assume English error */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SPARING_MODE_IS_NOT_CONFIGURED 0x8018 /* achu: spec says "be Configured", I assume English error */ #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MIRROR_MODE_IS_NOT_CONFIGURED 0x8019 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SUPERVISER_AND_USER_PASSWORDS_CLEARED 0x8020 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_CMOS_BATTERY_FAULT 0x8021 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_START_RECOVERY 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_RECOVERY_SUCCESS 0x2 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_LOAD_IMAGE_FAIL 0x3 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_SIGNED_FAIL 0x4 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_ME_FAIL 0x1 /* * String arrays for above */ extern const char * const ipmi_sensor_type_oem_wistron_ioh_core_error[]; extern unsigned int ipmi_sensor_type_oem_wistron_ioh_core_error_max_index; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-numbers-oem-dell-spec.h0000644002055400205540000001714513527331636031232 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_DELL_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 */ #define IPMI_SENSOR_NUMBER_OEM_DELL_ECC_CORRECTABLE_ERRORS 0x01 #define IPMI_SENSOR_NUMBER_OEM_DELL_ECC_UNCORRECTABLE_ERRORS 0x02 #define IPMI_SENSOR_NUMBER_OEM_DELL_IO_CHANNEL_CHECK 0x03 #define IPMI_SENSOR_NUMBER_OEM_DELL_PCI_PARITY_ERROR 0x04 #define IPMI_SENSOR_NUMBER_OEM_DELL_PCI_SYSTEM_ERROR 0x05 #define IPMI_SENSOR_NUMBER_OEM_DELL_EVENT_LOGGING_FOR_CORRECTABLE_ECC_EVENTS_DISABLED 0x06 #define IPMI_SENSOR_NUMBER_OEM_DELL_EVENT_LOGGING_DISABLED 0x07 #define IPMI_SENSOR_NUMBER_OEM_DELL_UNKNOWN_ERROR 0x08 #define IPMI_SENSOR_NUMBER_OEM_DELL_CPU_INTERNAL_ERROR 0x09 #define IPMI_SENSOR_NUMBER_OEM_DELL_CPU_PROTOCOL_ERROR 0x0A #define IPMI_SENSOR_NUMBER_OEM_DELL_CPU_BUS_PERR 0x0B #define IPMI_SENSOR_NUMBER_OEM_DELL_CPU_BUS_INITIALIZATION_ERROR 0x0C #define IPMI_SENSOR_NUMBER_OEM_DELL_CPU_MACHINE_CHECK_ERROR 0x0D #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_SPARE 0x11 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_MIRROR 0x12 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_RAID 0x13 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_HOT_ADD 0x14 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_HOT_REMOVE 0x15 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_HOT_FAILURE 0x16 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_REDUNDANCY_REGAINED 0x17 #define IPMI_SENSOR_NUMBER_OEM_DELL_FATAL_PCI_EXPRESS_ERRORS 0x18 #define IPMI_SENSOR_NUMBER_OEM_DELL_CHIPSET_ERROR 0x19 #define IPMI_SENSOR_NUMBER_OEM_DELL_ERROR_REGISTER_POINTER 0x1A #define IPMI_SENSOR_NUMBER_OEM_DELL_MEMORY_CORRECTABLE_ECC_WARNING_OR_CRITICAL_EXCEEDED 0x1B #define IPMI_SENSOR_NUMBER_OEM_DELL_CRC_MEMORY_ERROR 0x1C #define IPMI_SENSOR_NUMBER_OEM_DELL_USB_OVER_CURRENT 0x1D #define IPMI_SENSOR_NUMBER_OEM_DELL_POST_FATAL_ERROR 0x1E #define IPMI_SENSOR_NUMBER_OEM_DELL_INCOMPATIBLE_BMC_FIRMWARE 0x1F #define IPMI_SENSOR_NUMBER_OEM_DELL_MEM_OVERTEMP 0x20 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEM_FATAL_SB_CRC 0x21 #define IPMI_SENSOR_NUMBER_OEM_DELL_MEM_FATAL_NB_CRC 0x22 #define IPMI_SENSOR_NUMBER_OEM_DELL_OS_WATCHDOG_TIMER 0x23 #define IPMI_SENSOR_NUMBER_OEM_DELL_LINK_TUNING_ERROR 0x24 #define IPMI_SENSOR_NUMBER_OEM_DELL_LT_FLEXADDR 0x25 #define IPMI_SENSOR_NUMBER_OEM_DELL_NON_FATAL_PCI_EXPRESS_ERRORS 0x26 #define IPMI_SENSOR_NUMBER_OEM_DELL_FATAL_IO_ERROR 0x27 #define IPMI_SENSOR_NUMBER_OEM_DELL_MSR_INFO_LOG 0x28 #define IPMI_SENSOR_NUMBER_OEM_DELL_QPI_LINK_ERROR_SENSOR 0x29 #define IPMI_SENSOR_NUMBER_OEM_DELL_TXT_SX_SENTER_COMMAND_ERROR 0x2A #define IPMI_SENSOR_NUMBER_OEM_DELL_IDPT_MEMORY_ONLINE_FAILURE 0x2B /* * Dell Poweredge C410x */ #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FB_TEMP 0x17 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_1 0x01 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_2 0x02 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_3 0x03 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_4 0x04 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_5 0x05 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_BOARD_TEMP_6 0x06 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_1_TEMP 0x07 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_2_TEMP 0x08 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_3_TEMP 0x09 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_4_TEMP 0x0A #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_5_TEMP 0x0B #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_6_TEMP 0x0C #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_7_TEMP 0x0D #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_8_TEMP 0x0E #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_9_TEMP 0x0F #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_10_TEMP 0x10 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_11_TEMP 0x11 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_12_TEMP 0x12 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_13_TEMP 0x13 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_14_TEMP 0x14 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_15_TEMP 0x15 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_16_TEMP 0x16 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_1_WATT 0x50 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_2_WATT 0x51 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_3_WATT 0x52 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_4_WATT 0x53 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_5_WATT 0x54 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_6_WATT 0x55 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_7_WATT 0x56 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_8_WATT 0x57 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_9_WATT 0x58 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_10_WATT 0x59 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_11_WATT 0x5A #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_12_WATT 0x5B #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_13_WATT 0x5C #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_14_WATT 0x5D #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_15_WATT 0x5E #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_16_WATT 0x5F #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PSU_1_WATT 0x60 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PSU_2_WATT 0x61 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PSU_3_WATT 0x62 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PSU_4_WATT 0x63 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_1 0x80 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_2 0x81 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_3 0x82 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_4 0x83 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_5 0x84 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_6 0x85 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_7 0x86 #define IPMI_SENSOR_NUMBER_OEM_DELL_C410X_FAN_8 0x87 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_DELL_SPEC_H */ ipmi-sensor-numbers-oem-intel-node-manager-spec.h0000644002055400205540000000445713527331636033703 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_ME_POWER_STATE 0x16 #define IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT /* Defined in Spec 2.0, but not in 1.5 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR 0x19 #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_SENSOR 0x18 #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_SENSOR 0x1A #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_SENSOR 0x1B #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_SMBUS_STATUS 0x6E /* Defined in Spec 3.0 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR 0xB2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_SENSOR 0xC1 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_INTEL_NODE_MANAGER_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h0000644002055400205540000006012613527331636031422 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_INTEL_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_SENSOR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_FATAL_SENSOR 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_CORRECTABLE_SENSOR 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_CORRECTABLE_SENSOR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_NON_FATAL_SENSOR 0x07 /* QPI_FATAL_SENSOR_A and QPI_FATAL_SENSOR_B are identical, they are * logical extensions to provide additional offset values */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_A 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_B 0x18 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_ERROR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_RAS_STATUS_INFORMATION_FOR_MEMORY_MIRRORING_MIRRORING_MODE 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_ECC_ERROR 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_RAS_STATUS_INFORMATION_FOR_MEMORY_MIRRORING_SPARING_MODE 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_MIRRORING_RAS_CONFIGURATION_INFORMATION 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_SPARING_RAS_CONFIGURATION_INFORMATION 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_PARITY_ERROR 0x14 /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ /* achu: Few same as above, but to clearly differentiate motherboards, duplicate them */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCI_SENSOR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR 0x07 /* QPI_FATAL_SENSOR_A and QPI_FATAL_SENSOR_B are identical, they are * logical extensions to provide additional offset values */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_A 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_B 0x18 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_BIOS_POST_ERROR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_RAS_STATE_INFORMATION_FOR_MEMORY_MIRRORING_MIRRORING_MODE 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_ECC_ERROR 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_MISMATCH_CONFIGURATION_ERROR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_PERSISTENT 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PATROL_SCRUB_ERROR 0x0B #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_UNCORRECTABLE 0x0C #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_RAS_STATE_INFORMATION_FOR_MEMORY_MIRRORING_SPARING_MODE 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_MIRRORING_RAS_CONFIGURATION_INFORMATION 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_SPARING_RAS_CONFIGURATION_INFORMATION 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_STATE 0x20 /* * Intel S2600JF/Appro 512X */ /* achu: Few same as above, but to clearly differentiate motherboards, duplicate them */ /* achu: note a typo, memory ras configuration status & memory ecc error both 2, not sure why in doc */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MIRRORING_REDUNDANCY_STATE 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_CONFIGURATION_STATUS 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_ECC_ERROR 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_LEGACY_PCI_ERROR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_BIOS_POST_ERROR 0x06 /* not a typo, also 0x06 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_QPI_CORRECTABLE_ERRORS 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR 0x07 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_CHIPSET_PROPRIETARY 0x08 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED 0x09 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_ERROR_EXTENSION 0x10 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_SPARING_REDUNDANCY_STATE 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_MODE_SELECT 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_PARITY_ERROR 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 0x14 /* not a typo, jumps to 0x17 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_SYSTEM_EVENT 0x83 /* * Intel S2600WP */ /* achu: Similar to above, but to clearly differentiate motherboards, duplicate them */ /* achu: note a typo, memory ras configuration status & memory ecc error both 2, not sure why in doc */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MIRRORING_REDUNDANCY_STATE 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_CONFIGURATION_STATUS 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_ECC_ERROR 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_LEGACY_PCI_ERROR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_BIOS_POST_ERROR 0x06 /* not a typo, also 0x06 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_CORRECTABLE_ERRORS 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR 0x07 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_CHIPSET_PROPRIETARY 0x08 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED 0x09 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_ERROR_EXTENSION 0x10 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_SPARING_REDUNDANCY_STATE 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_MODE_SELECT 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_PARITY_ERROR 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 0x14 /* not a typo, jumps to 0x17 */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_SYSTEM_EVENT 0x83 /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PROC_HOT_EXTENDED_SENSOR 0x3C #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEM_HOT_EXTENDED_SENSOR 0x3D #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SENSOR 0x40 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PCIE_ERROR_SENSOR 0x41 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_POST_ERROR_SENSOR 0x2B #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR 0x43 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CPU_SEL_STATUS 0x5F #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEMORY_ECC_ERROR 0x63 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS 0x70 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_LOW 0x28 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH 0x42 #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC 0x5E #define IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT 0x9F /* Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ /* BMC owned sensors (GID = 0020h) */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_UNIT_STATUS 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_UNIT_REDUNDANCY 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_IPMI_WATCHDOG 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PHYSICAL_SECURITY 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FP_INTERRUPT 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SMI_TIMEOUT 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SYSTEM_EVENT_LOG 0x07 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SYSTEM_EVENT 0x08 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BUTTON_SENSOR 0x09 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BMC_WATCHDOG 0x0A #define IPMI_SENSOR_NUMBER_OEM_INTEL_VOLTAGE_REGULATOR_WATCHDOG 0x0B #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_REDUNDANCY 0x0C #define IPMI_SENSOR_NUMBER_OEM_INTEL_SSB_THERMAL_TRIP 0x0D #define IPMI_SENSOR_NUMBER_OEM_INTEL_IO_MODULE_PRESENCE 0x0E #define IPMI_SENSOR_NUMBER_OEM_INTEL_SAS_MODULE_PRESENCE 0x0F #define IPMI_SENSOR_NUMBER_OEM_INTEL_BMC_FIRMWARE_HEALTH 0x10 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SYSTEM_AIRFLOW 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FIRMWARE_UPDATE_STATUS 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_IO_MODULE2_PRESENCE 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE5 0x14 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE6 0x15 #define IPMI_SENSOR_NUMBER_OEM_INTEL_IO_MODULE2_TEMPERATURE 0x16 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_RISER3_TEMPERATURE 0x17 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_RISER4_TEMPERATURE 0x18 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE1 0x20 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FRONT_PANEL_TEMPERATURE 0x21 #define IPMI_SENSOR_NUMBER_OEM_INTEL_SSB_TEMPERATURE 0x22 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE2 0x23 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE3 0x24 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE4 0x25 #define IPMI_SENSOR_NUMBER_OEM_INTEL_IO_MODULE_TEMPERATURE 0x26 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_RISER1_TEMPERATURE 0x27 #define IPMI_SENSOR_NUMBER_OEM_INTEL_IO_RISER_TEMPERATURE 0x28 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_BACK_PLANE1_TEMPERATURE 0x29 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_BACK_PLANE2_TEMPERATURE 0x2A #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_BACK_PLANE3_TEMPERATURE 0x2B #define IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_RISER2_TEMPERATURE 0x2C #define IPMI_SENSOR_NUMBER_OEM_INTEL_SAS_MODULE_TEMPERATURE 0x2D #define IPMI_SENSOR_NUMBER_OEM_INTEL_EXIT_AIR_TEMPERATURE 0x2E #define IPMI_SENSOR_NUMBER_OEM_INTEL_NETWORK_INTERFACE_CONTROLLER_TEMPERATURE 0x2F #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_TACHOMETER_SENSORS_MIN 0x30 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_TACHOMETER_SENSORS_MAX 0x3F #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_PRESENT_SENSORS_MIN 0x40 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_PRESENT_SENSORS_MAX 0x4F #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_STATUS 0x50 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_STATUS 0x51 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_AC_POWER_INPUT 0x54 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_AC_POWER_INPUT 0x55 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_12V_PERCENT_OF_MAXIMUM_CURRENT_OUTPUT 0x58 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_12V_PERCENT_OF_MAXIMUM_CURRENT_OUTPUT 0x59 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_TEMPERATURE 0x5C #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_TEMPERATURE 0x5D #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE15 0x60 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE16 0x61 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE17 0x62 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE18 0x63 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE19 0x64 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE20 0x65 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE21 0x66 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE22 0x67 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE23 0x68 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_CONTROLLER1_STATUS 0x69 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_CONTROLLER2_STATUS 0x6A #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_CONTROLLER3_STATUS 0x6B #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_STATUS 0x70 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_STATUS 0x71 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_STATUS 0x72 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_STATUS 0x73 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_THERMAL_MARGIN 0x74 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_THERMAL_MARGIN 0x75 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_THERMAL_MARGIN 0x76 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_THERMAL_MARGIN 0x77 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_THERMAL_CONTROL_PERCENT 0x78 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_THERMAL_CONTROL_PERCENT 0x79 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_THERMAL_CONTROL_PERCENT 0x7A #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_THERMAL_CONTROL_PERCENT 0x7B #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR_ERR2_TIMEOUT 0x7C #define IPMI_SENSOR_NUMBER_OEM_INTEL_IERR_RECOVERY_DUMP_INFO 0x7D #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTERNAL_ERROR 0x80 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR_POPULATION_FAULT 0x82 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_DTS_THERMAL_MARGIN 0x83 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_DTS_THERMAL_MARGIN 0x84 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_DTS_THERMAL_MARGIN 0x85 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_DTS_THERMAL_MARGIN 0x86 #define IPMI_SENSOR_NUMBER_OEM_INTEL_AUTO_CONFIG_STATUS 0x87 #define IPMI_SENSOR_NUMBER_OEM_INTEL_VRD_OVER_TEMPERATURE 0x90 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_FAN_TACHOMETER1 0xA0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_FAN_TACHOMETER2 0xA1 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_STATUS1 0xA2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_STATUS2 0xA3 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_FAN_TACHOMETER1 0xA4 #define IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_FAN_TACHOMETER2 0xA5 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_STATUS3 0xA6 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_STATUS4 0xA7 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_DIMM_AGGREGATE_THERMAL_MARGIN1 0xB0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_DIMM_AGGREGATE_THERMAL_MARGIN2 0xB1 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_DIMM_AGGREGATE_THERMAL_MARGIN1 0xB2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_DIMM_AGGREGATE_THERMAL_MARGIN2 0xB3 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_DIMM_AGGREGATE_THERMAL_MARGIN1 0xB4 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_DIMM_AGGREGATE_THERMAL_MARGIN2 0xB5 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_DIMM_AGGREGATE_THERMAL_MARGIN1 0xB6 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_DIMM_AGGREGATE_THERMAL_MARGIN2 0xB7 #define IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_AUTO_SHUTDOWN_SENSOR 0xB8 #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_TACHOMETER_SENSORS2_MIN 0xBA #define IPMI_SENSOR_NUMBER_OEM_INTEL_FAN_TACHOMETER_SENSORS2_MAX 0xBF #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_THERMAL_TRIP 0xC0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_THERMAL_TRIP 0xC1 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_THERMAL_TRIP 0xC2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_THERMAL_TRIP 0xC3 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_THERMAL_MARGIN1 0xC4 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_THERMAL_MARGIN2 0xC5 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_THERMAL_MARGIN3 0xC6 #define IPMI_SENSOR_NUMBER_OEM_INTEL_INTEL_XEON_PHI_COPROCESSOR_THERMAL_MARGIN4 0xC7 #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN1 0xC8 #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN2 0xC9 #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN3 0xCA #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN4 0xCB #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN5 0xCC #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN6 0xCD #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN7 0xCE #define IPMI_SENSOR_NUMBER_OEM_INTEL_GLOBAL_AGGREGATE_TEMPERATURE_MARGIN8 0xCF #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_12V 0xD0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_VOLTAGE_FAULT 0xD1 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE7 0xD5 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_TEMPERATURE8 0xD6 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BASEBOARD_CMOS_BATTERY 0xDE #define IPMI_SENSOR_NUMBER_OEM_INTEL_HOT_SWAP_BACKPLANE4_TEMPERATURE 0xE0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_REAR_HARD_DISK_DRIVE0_STATUS 0xE2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_REAR_HARD_DISK_DRIVE1_STATUS 0xE3 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE0_STATUS 0xF0 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE1_STATUS 0xF1 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE2_STATUS 0xF2 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE3_STATUS 0xF3 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE4_STATUS 0xF4 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE5_STATUS 0xF5 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE6_STATUS 0xF6 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE7_STATUS 0xF7 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE8_STATUS 0xF8 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE9_STATUS 0xF9 #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE10_STATUS 0xFA #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE11_STATUS 0xFB #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE12_STATUS 0xFC #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE13_STATUS 0xFD #define IPMI_SENSOR_NUMBER_OEM_INTEL_HARD_DISK_DRIVE14_STATUS 0xFE /* BIOS POST owned sensors (GID = 0001h) */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_CONFIGURATION_STATUS 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_POST_ERROR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_INTEL_QUICK_PATH_INTERFACE_LINK_WIDTH_REDUCED 0x09 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_MODE_SELECT 0x12 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_SYSTEM_EVENT 0x83 /* BIOS SMI Handler owned sensors (GID = 0033h) */ #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MIRRORING_REDUNDANCY_STATE 0x01 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MEMORY_ECC_ERROR 0x02 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_LEGACY_PCI_ERROR 0x03 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR 0x04 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_CORRECTABLE_ERROR 0x05 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_CORRECTABLE_ERROR 0x06 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_FATAL_ERROR 0x07 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_SPARING_REDUNDANCY_STATE 0x11 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MEMORY_PARITY_ERROR 0x13 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR2 0x14 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_BIOS_RECOVERY 0x15 #define IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICKPATH_INTERFACE_FATAL_ERROR2 0x17 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h0000644002055400205540000000253413527331636032121 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_INVENTEC_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START 0x81 #define IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_OK 0x85 #define IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_ERROR_CODE 0x06 #define IPMI_SENSOR_NUMBER_OEM_INVENTEC_PORT80_CODE_EVENT 0x55 #define IPMI_SENSOR_NUMBER_OEM_INVENTEC_MEMORY 0x60 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-numbers-oem-quanta-spec.h0000644002055400205540000000236613527331636031602 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_QUANTA_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ #define IPMI_SENSOR_NUMBER_OEM_QUANTA_MEMORY 0x60 #define IPMI_SENSOR_NUMBER_OEM_QUANTA_PCI_SENSORID 0x81 #define IPMI_SENSOR_NUMBER_OEM_QUANTA_QPI_SENSORID 0x82 #define IPMI_SENSOR_NUMBER_OEM_QUANTA_INT_SENSORID 0x83 #define IPMI_SENSOR_NUMBER_OEM_QUANTA_SOFTWARE_NMI 0xA5 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_QUANTA_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-numbers-oem-wistron-spec.h0000644002055400205540000000317213527331636032012 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_WISTRON_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ #define IPMI_SENSOR_NUMBER_OEM_WISTRON_PROCESSOR 0x04 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_MEMORY 0x60 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_QPI_SENSOR_ID 0x71 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_INT_SENSOR_ID 0x72 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_PCI_SENSOR_ID 0x73 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_SB_SENSOR_ID 0x77 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_START 0x81 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_END 0x85 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_ERROR 0x86 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_BIOS_RECOVERY_FAIL 0x89 #define IPMI_SENSOR_NUMBER_OEM_WISTRON_ME_FAIL 0x8A #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-dell-spec.h0000644002055400205540000000262013527331636030713 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_DELL_SPEC_H #define IPMI_SENSOR_TYPES_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* achu: names taken from code, are correct names? */ #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS 0xC0 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING 0xC1 #define IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR 0xC2 #define IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR 0xC3 #define IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE 0xC4 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_DELL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h0000644002055400205540000000403013527331636031461 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_FUJITSU_SPEC_H #define IPMI_SENSOR_TYPES_OEM_FUJITSU_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Fujitsu Siemens Computers * Fujitsu Technology Solutions * iRMC S1 / iRMC S2 */ #define IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS 0xC0 #define IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION 0xDD // Events only #define IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS 0xDE #define IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG 0xDF #define IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY 0xE1 // Events only #define IPMI_SENSOR_TYPE_OEM_FUJITSU_HW_ERROR 0xE3 // Events only #define IPMI_SENSOR_TYPE_OEM_FUJITSU_SYS_ERROR 0xE4 // Events only #define IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS 0xE6 #define IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS 0xE8 #define IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY 0xE9 #define IPMI_SENSOR_TYPE_OEM_FUJITSU_COMMUNICATION 0xEA // Reserved #define IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH 0xEC // Events only #define IPMI_SENSOR_TYPE_OEM_FUJITSU_EVENT 0xEE // Reserved #define IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP 0xEF #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_FUJITSU_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-hp-spec.h0000644002055400205540000000175313527331636030410 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_HP_SPEC_H #define IPMI_SENSOR_TYPES_OEM_HP_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * HP Proliant DL160 G8 */ #define IPMI_SENSOR_TYPE_OEM_HP_LED 0xC0 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_HP_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-intel-node-manager-spec.h0000644002055400205540000000267613527331636033454 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_INTEL_NODE_MANAGER_SPEC_H #define IPMI_SENSOR_TYPES_OEM_INTEL_NODE_MANAGER_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ #define IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER 0xDC #define IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM 0x28 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_INTEL_NODE_MANAGER_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-inventec-spec.h0000644002055400205540000000211313527331636031603 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_INVENTEC_SPEC_H #define IPMI_SENSOR_TYPES_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS 0xC1 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h0000644002055400205540000000461313527331636031112 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_INTEL_SPEC_H #define IPMI_SENSOR_TYPES_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /******************************************* * Dell * *******************************************/ /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* achu: names taken from code, are correct names? */ #define IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS 0xC0 #define IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING 0xC1 #define IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR 0xC2 #define IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR 0xC3 #define IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE 0xC4 /* * Intel S5500WB/Penguin Computing Relion 700 * Intel SR1625 * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ #define IPMI_SENSOR_TYPE_OEM_INTEL_SMI_TIMEOUT 0xF3 /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ #define IPMI_SENSOR_TYPE_OEM_INTEL_POWER_THROTTLED 0xF3 /* * Intel S5000PAL */ #define IPMI_SENSOR_TYPE_OEM_INTEL_NMI_STATE 0xC0 /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR 0xDC /* Used by many sensors */ #define IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC 0xC0 /* * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ #define IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO 0xD1 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-supermicro-spec.h0000644002055400205540000000327113527331636032166 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_SUPERMICRO_SPEC_H #define IPMI_SENSOR_TYPES_OEM_SUPERMICRO_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Supermicro X7DBR-3 (X7DBR_3) * Supermicro X7DB8 * Supermicro X8DTN * Supermicro X7SBI-LN4 (X7SBI_LN4) * Supermicro X8DTH * Supermicro X8DTG * Supermicro X8DTU * Supermicro X8DT3-LN4F (X8DT3_LN4F) * Supermicro X8DTU-6+ (X8DTU_6PLUS) * Supermicro X8DTL * Supermicro X8DTL-3F (X8DTL_3F) * Supermicro X8SIL-F (X8SIL_F) * Supermicro X9SCL * Supermicro X9SCM * Supermicro X8DTN+-F (X8DTNPLUS_F) * Supermicro X8SIE * Supermicro X9SCA-F-O (X9SCA-F-O) * Supermicro H8DGU-F (H8DGU_F) * Supermicro X9DRi-F (X9DRI_F) * Supermicro X9DRI-LN4F+ (X9DRI_LN4F_PLUS) * Supermicro X9SPU-F-O (X9SPU-F-O) * Supermicro X9SCM-iiF (X9SCM_IIF) * Supermicro H8SGL-F (H8SGL_F) */ /* achu: not official names, named based on use context */ #define IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP 0xC0 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_SUPERMICRO_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-sensor-types-oem-wistron-spec.h0000644002055400205540000000177013527331636031505 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_WISTRON_SPEC_H #define IPMI_SENSOR_TYPES_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ #define IPMI_SENSOR_TYPE_OEM_WISTRON_IOH_CORE_ERROR 0xC0 #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_WISTRON_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h0000644002055400205540000000350513527331636031173 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_INTEL_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_INTEL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Intel S5500WB/Penguin Computing Relion 700 */ #define IPMI_GENERATOR_ID_OEM_INTEL_BIOS_SMI_HANDLER 0x33 #define IPMI_GENERATOR_ID_OEM_INTEL_ME_FIRMWARE 0x2C #define IPMI_GENERATOR_ID_OEM_INTEL_HSC_FIRMWARE 0xC0 /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ #define IPMI_GENERATOR_ID_OEM_INTEL_QUANTA_QSSC_S4R_BIOS_POST 0x33 /* * Intel S2600JF/Appro 512X */ #define IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST 0x01 #define IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER 0x33 /* * Intel S2600WP */ #define IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST 0x01 #define IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER 0x33 /* * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ #define IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST 0x01 #define IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER 0x33 #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_INTEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h0000644002055400205540000000232213527331636031667 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_INVENTEC_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_INVENTEC_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ /* achu: not official names, named based on use context */ #define IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS 0x01 #define IPMI_GENERATOR_ID_OEM_INVENTEC_SMI 0x21 #define IPMI_GENERATOR_ID_OEM_INVENTEC_POST_ERROR_CODE 0x31 #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_INVENTEC_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h0000644002055400205540000000173013527331636032473 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL 0x21 #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-slave-address-oem-quanta-spec.h0000644002055400205540000000205513527331636031350 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_QUANTA_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_QUANTA_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Quanta S99Q/Dell FS12-TY */ /* achu: not official names, named based on use context */ #define IPMI_GENERATOR_ID_OEM_QUANTA_ERROR 0x01 #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_QUANTA_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-slave-address-oem-wistron-spec.h0000644002055400205540000000225613527331636031567 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_WISTRON_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ /* achu: not official names, named based on use context */ #define IPMI_GENERATOR_ID_OEM_WISTRON_BIOS 0x01 #define IPMI_GENERATOR_ID_OEM_WISTRON_SMI 0x21 #define IPMI_GENERATOR_ID_OEM_WISTRON_ME 0x2C #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_WISTRON_SPEC_H */ ipmi-sol-configuration-parameters-oem-inventec-spec.h0000644002055400205540000000212713527331636034661 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CONFIGURATION_PARAMETERS_INVENTEC_OEM_SPEC_H #define IPMI_SOL_CONFIGURATION_PARAMETERS_INVENTEC_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ #define IPMI_SOL_CONFIGURATION_PARAMETER_OEM_INVENTEC_SOL_TIMEOUT 192 #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CONFIGURATION_PARAMETERS_INVENTEC_OEM_SPEC_H */ ipmi-sol-configuration-parameters-oem-wistron-spec.h0000644002055400205540000000206513527331636034554 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CONFIGURATION_PARAMETERS_WISTRON_OEM_SPEC_H #define IPMI_SOL_CONFIGURATION_PARAMETERS_WISTRON_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ #define IPMI_SOL_CONFIGURATION_PARAMETER_OEM_WISTRON_SOL_TIMEOUT 192 #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CONFIGURATION_PARAMETERS_WISTRON_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-system-info-parameters-oem-dell-spec.h0000644002055400205540000002740313527331636032664 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_INFO_PARAMETERS_OEM_DELL_SPEC_H #define IPMI_SYSTEM_INFO_PARAMETERS_OEM_DELL_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Dell Poweredge 2900 * Dell Poweredge 2950 * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 * Dell Poweredge M600 * Dell Poweredge M610 * Dell Poweredge M610X * Dell Poweredge M910 * * Support of below varies by system. */ /* achu note: called "front panel string" in newer 12G docs */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_LCD_STRING 0xC1 /* achu note: called "front panel configuration" in newer 12G docs */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_LCD_CONFIGURATION 0xC2 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_GUID 0xC3 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_ASSET_TAG 0xC4 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_SERVICE_TAG 0xC5 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CHASSIS_SERVICE_TAG 0xC6 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CHASSIS_RELATED_SERVICE_TAG 0xC7 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_BOARD_REVISION 0xC8 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_ID 0xC9 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_BIOS_FEATURE 0xCA /* Only for 10G systems */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_NICS_MAC_ADDRESSES 0xCB #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_NICS_CAPABILITY 0xCE #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_PLATFORM_MODEL_NAME 0xD1 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_LOCAL_CONSOLE_LOCKOUT 0xD6 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_POWER_STAGGERING_AC_RECOVERY 0xD8 /* achu: this one is taken from code, is correct name? */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_11G_MAC_ADDRESSES 0xDA #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_12G_MAC_ADDRESSES IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_11G_MAC_ADDRESSES #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_BLADE_SLOT_INFO 0xDC /* legacy from prior reverse engineering */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SLOT_NUMBER IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_BLADE_SLOT_INFO #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_INFO 0xDD #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_IPV4_URL 0xDE #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_INFO 0xDF /* CMC = Chassis Management Controller */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV4_URL 0xE0 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_GUI_WEBSERVER_CONTROL 0xE1 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_PLATFORM_SPECIFIC_DEVICE_INFORMATION 0xE3 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_NIC_CONTROL 0xE5 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_LCD_STATUS 0xE7 /* achu: this one is taken from code, is correct name? */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_POWER_CAPACITY 0xEA #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_AVERAGE_POWER_CONSUMPTION_STATISTICS 0xEB #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS 0xEC #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS 0xED #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_VIDEO_STATUS 0xEE #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_ISCSI_NICS_MAC_ADDRESSES 0xEF #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IPV6_SNMP_TRAP_DESTINATION_ADDRESS 0xF0 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_INTERNAL_STORAGE_SLOT_INFO 0xF1 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_INFO 0xF2 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_URL 0xF3 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_REVISION 0xF4 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_REDUNDANCY_POLICY 0xFE /* Dell System Info Parameter macros */ /* 256 b/c length is 8 bit field */ #define IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES 256 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_PLATFORM_MODEL_NAME, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SLOT_NUMBER, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_IPV4_URL, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_INFO, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV4_URL, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_INFO, * IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_URL */ #define IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK 0xF #define IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT 0 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_NICS_MAC_ADDRESSES */ #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_LENGTH 6 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_11G_MAC_ADDRESSES */ #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_BITMASK 0x30 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_SHIFT 4 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_STATUS_BITMASK 0xC0 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_STATUS_SHIFT 6 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_NUMBER_BITMASK 0x1F #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_NUMBER_SHIFT 0 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_ETHERNET 0 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_ISCSI 1 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_RESERVED 3 /* achu: Dell calls an ethernet port that has been PCI disabled in the * BIOS, but has an active service processor "playing dead" */ #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_ENABLED 0 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_DISABLED 1 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_PLAYING_DEAD 2 #define IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_RESERVED 3 #define IPMI_OEM_DELL_SYSTEM_INFO_11G_OR_12G_MAC_ADDRESS_LENGTH 8 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_INFO */ #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_MIN_LEN 41 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_FORMAT_IPV4 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_FORMAT_IPV6 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_CONFIG_DHCP 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_CONFIG_STATIC 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_FIRMWARE_VERSION_STRING_LENGTH 20 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_10G 0x08 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_CMC 0x09 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MONOLITHIC 0x0A #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MODULAR 0x0B #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_MASER_LITE_BMC 0x0D /* From ipmitool, http://ipmitool.sourceforge.net/ */ #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MONOLITHIC 0x10 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MODULAR 0x11 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_GUI_WEBSERVER_CONTROL */ #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_WEB_GUI_SERVER_CONTROL_DISABLED 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_WEB_GUI_SERVER_CONTROL_ENABLED 0x01 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_POWER_CAPACITY */ #define IPMI_OEM_DELL_SYSTEM_INFO_POWER_CAPACITY_UNITS_WATTS 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_POWER_CAPACITY_UNITS_BTUPHR 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_POWER_CAPACITY_UNITS_PERCENT 0x03 #define IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_NORMAL_SYSTEM_OPERATION 0 #define IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_SYSTEM_NEEDS_TO_BE_THROTTLED 1 #define IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_SYSTEM_IS_OVERCONFIGURED 2 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_VIDEO_STATUS */ #define IPMI_OEM_DELL_SYSTEM_INFO_EMBEDDED_VIDEO_STATUS_DISABLED 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_EMBEDDED_VIDEO_STATUS_ENABLED 0x01 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IPV6_SNMP_TRAP_DESTINATION_ADDRESS */ #define IPMI_OEM_DELL_SYSTEM_INFO_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_MIN_LEN 6 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_INFO */ #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_MIN_LEN 43 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_FORMAT_IPV4 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_FORMAT_IPV6 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_SOURCE_DHCP 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_SOURCE_STATIC 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_STRING_LENGTH 16 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_CMC_FIRMWARE_VERSION_STRING_LENGTH 22 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_GUI_STATUS_DISABLED 0x00 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_GUI_STATUS_ENABLED 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_BITMASK 0x01 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_SHIFT 0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_DISABLED 0x0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_ENABLED 0x1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_BITMASK 0x02 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_SHIFT 1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_DISCONNECTED 0x0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_CONNECTED 0x1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_BITMASK 0x04 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_SHIFT 2 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_NOT_FROM_FAILOVER 0x0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_FROM_FAILOVER 0x1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_BITMASK 0x08 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_SHIFT 3 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_NO_HARDWARE_VENDOR_MODE 0x0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_HAS_HARDWARE_VENDOR_MODE 0x1 /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_INFO */ #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_MIN_LEN 57 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_ADDRESS_STRING_LENGTH 39 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_BITMASK 0x1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_SHIFT 0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_DISABLED 0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_ENABLED 1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_BITMASK 0x1 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_SHIFT 0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_DISABLED 0 #define IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_ENABLED 1 #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/oem/ipmi-system-info-parameters-oem-wistron-spec.h0000644002055400205540000000326013527331636033444 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_INFO_PARAMETERS_OEM_WISTRON_SPEC_H #define IPMI_SYSTEM_INFO_PARAMETERS_OEM_WISTRON_SPEC_H #ifdef __cplusplus extern "C" { #endif /* * Wistron / Dell Poweredge C6220 */ #define IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG 196 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG 197 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_PRODUCT_NAME 209 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG_MAX_LEN 20 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG_MAX_LEN 7 /* Wistron System Info Parameter macros */ /* w/ IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_PRODUCT_NAME */ #define IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_BITMASK 0xF #define IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_SHIFT 0 #define IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_PRINTABLE_ASCII 0x0 /* 256 b/c length is 8 bit field */ #define IPMI_OEM_WISTRON_SYSTEM_INFO_MAX_STRING_BYTES 256 #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-authentication-type-spec.h0000644002055400205540000000463613527331636027773 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_AUTHENTICATION_TYPE_SPEC_H #define IPMI_AUTHENTICATION_TYPE_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_AUTHENTICATION_TYPE_NONE 0x00 #define IPMI_AUTHENTICATION_TYPE_MD2 0x01 #define IPMI_AUTHENTICATION_TYPE_MD5 0x02 #define IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY 0x04 #define IPMI_AUTHENTICATION_TYPE_OEM_PROP 0x05 #define IPMI_AUTHENTICATION_TYPE_RMCPPLUS 0x06 #define IPMI_AUTHENTICATION_TYPE_VALID(__authentication_type) \ (((__authentication_type) == IPMI_AUTHENTICATION_TYPE_NONE \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_MD2 \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_MD5 \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_OEM_PROP \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_RMCPPLUS) ? 1 : 0) #define IPMI_1_5_AUTHENTICATION_TYPE_VALID(__authentication_type) \ (((__authentication_type) == IPMI_AUTHENTICATION_TYPE_NONE \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_MD2 \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_MD5 \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY \ || (__authentication_type) == IPMI_AUTHENTICATION_TYPE_OEM_PROP) ? 1 : 0) #define IPMI_2_0_AUTHENTICATION_TYPE_VALID(__authentication_type) \ IPMI_AUTHENTICATION_TYPE_VALID ((__authentication_type)) #ifdef __cplusplus } #endif #endif /* IPMI_AUTHENTICATION_TYPE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-channel-spec.h0000644002055400205540000001136213527331636025377 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHANNEL_SPEC_H #define IPMI_CHANNEL_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_CHANNEL_NUMBER_PRIMARY_IPMB 0x0 #define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_MIN 0x01 /* 0x01 to 0x0B */ #define IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_MAX 0x0B /* 0x01 to 0x0B */ #define IPMI_CHANNEL_NUMBER_RESERVED_MIN 0x0C /* 0x0C to 0x0D */ #define IPMI_CHANNEL_NUMBER_RESERVED_MAX 0x0D /* 0x0C to 0x0D */ #define IPMI_CHANNEL_NUMBER_PRESENT_IF 0xE #define IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL IPMI_CHANNEL_NUMBER_PRESENT_IF #define IPMI_CHANNEL_NUMBER_SYSTEM_INTERFACE 0xF #define IPMI_CHANNEL_NUMBERS_MAX 16 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_CHANNEL_NUMBER_VALID(__channel_number) \ ((((__channel_number + 1) >= (IPMI_CHANNEL_NUMBER_PRIMARY_IPMB + 1) \ && (__channel_number) < IPMI_CHANNEL_NUMBER_RESERVED_MIN) \ || ((__channel_number) > IPMI_CHANNEL_NUMBER_RESERVED_MAX \ && (__channel_number) <= IPMI_CHANNEL_NUMBER_SYSTEM_INTERFACE)) ? 1 : 0) #define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED 0x0 /* 0x03, 0x0A to 0x1B */ #define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_1 IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED #define IPMI_CHANNEL_PROTOCOL_TYPE_IPMB 0x1 #define IPMI_CHANNEL_PROTOCOL_TYPE_ICMB_10 0x2 #define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_2 0x0 /* 0x03, 0x0A to 0x1B */ #define IPMI_CHANNEL_PROTOCOL_TYPE_SMBUS_1X_2X 0x4 #define IPMI_CHANNEL_PROTOCOL_TYPE_KCS 0x5 #define IPMI_CHANNEL_PROTOCOL_TYPE_SMIC 0x6 #define IPMI_CHANNEL_PROTOCOL_TYPE_BT_10 0x7 #define IPMI_CHANNEL_PROTOCOL_TYPE_BT_15 0x8 #define IPMI_CHANNEL_PROTOCOL_TYPE_TMODE 0x9 #define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_MIN 0x0A /* 0x03, 0x0A to 0x1B */ #define IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_MAX 0x1B /* 0x03, 0x0A to 0x1B */ #define IPMI_CHANNEL_PROTOCOL_TYPE_OEM_MIN 0x1C /* 0x1C to 0x1F */ #define IPMI_CHANNEL_PROTOCOL_TYPE_OEM_MAX 0x1F /* 0x1C to 0x1F */ #define IPMI_CHANNEL_PROTOCOL_TYPE_IS_RESERVED(__val) \ (((__val) == IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_1 \ || (__val) == IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_2 \ || ((__val) >= IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_MIN \ && (__val) <= IPMI_CHANNEL_PROTOCOL_TYPE_RESERVED_MAX)) ? 1 : 0) #define IPMI_CHANNEL_PROTOCOL_TYPE_IS_OEM(__val) \ (((__val) >= IPMI_CHANNEL_PROTOCOL_TYPE_OEM_MIN \ && (__val) <= IPMI_CHANNEL_PROTOCOL_TYPE_OEM_MAX) ? 1 : 0) #define IPMI_CHANNEL_MEDIUM_TYPE_RESERVED 0x0 /* 0x0D to 0x5F */ #define IPMI_CHANNEL_MEDIUM_TYPE_IPMB 0x1 #define IPMI_CHANNEL_MEDIUM_TYPE_ICMB_10 0x2 #define IPMI_CHANNEL_MEDIUM_TYPE_ICMB_09 0x3 #define IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3 0x4 #define IPMI_CHANNEL_MEDIUM_TYPE_RS232 0x5 #define IPMI_CHANNEL_MEDIUM_TYPE_OTHER_LAN 0x6 #define IPMI_CHANNEL_MEDIUM_TYPE_PCI_SMBUS 0x7 #define IPMI_CHANNEL_MEDIUM_TYPE_SMBUS_10_11 0x8 #define IPMI_CHANNEL_MEDIUM_TYPE_SMBUS_20 0x9 #define IPMI_CHANNEL_MEDIUM_TYPE_USB_1X 0xA #define IPMI_CHANNEL_MEDIUM_TYPE_USB_2X 0xB #define IPMI_CHANNEL_MEDIUM_TYPE_SYSTEM_INTERFACE 0xC #define IPMI_CHANNEL_MEDIUM_TYPE_RESERVED_MIN 0x0D /* 0x0D to 0x59 */ #define IPMI_CHANNEL_MEDIUM_TYPE_RESERVED_MAX 0x59 /* 0x0D to 0x59 */ #define IPMI_CHANNEL_MEDIUM_TYPE_OEM_MIN 0x60 /* 0x60 to 0x7F */ #define IPMI_CHANNEL_MEDIUM_TYPE_OEM_MAX 0x7F /* 0x60 to 0x7F */ #define IPMI_CHANNEL_MEDIUM_TYPE_IS_RESERVED(__val) \ (((__val) == IPMI_CHANNEL_MEDIUM_TYPE_RESERVED \ || ((__val) >= IPMI_CHANNEL_MEDIUM_TYPE_RESERVED_MIN \ && (__val) <= IPMI_CHANNEL_MEDIUM_TYPE_RESERVED_MAX)) ? 1 : 0) #define IPMI_CHANNEL_MEDIUM_TYPE_IS_OEM(__val) \ (((__val) >= IPMI_CHANNEL_MEDIUM_TYPE_OEM_MIN \ && (__val) <= IPMI_CHANNEL_MEDIUM_TYPE_OEM_MAX) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_CHANNEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-cmd-spec.h0000644002055400205540000003645413527331636024543 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CMD_SPEC_H #define IPMI_CMD_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Notes: Refer to IPMIv1_5_rev1_1.pdf Table G-1, Command Number Assignments and Privilege Levels for complete description */ /* IPMI Device Global Commands */ #define IPMI_CMD_RESERVED 0x00 #define IPMI_CMD_GET_DEVICE_ID 0x01 #define IPMI_CMD_GET_DEVICE_ID_BCST IPMI_CMD_GET_DEVICE_ID #define IPMI_CMD_COLD_RESET 0x02 #define IPMI_CMD_WARM_RESET 0x03 #define IPMI_CMD_GET_SELF_TEST_RESULTS 0x04 #define IPMI_CMD_MANUFACTURING_TEST_ON 0x05 #define IPMI_CMD_SET_ACPI_POWER_STATE 0x06 #define IPMI_CMD_GET_ACPI_POWER_STATE 0x07 #define IPMI_CMD_GET_DEVICE_GUID 0x08 #define IPMI_CMD_GET_NETFN_SUPPORT 0x09 #define IPMI_CMD_GET_COMMAND_SUPPORT 0x0A #define IPMI_CMD_GET_COMMAND_SUB_FUNCTION_SUPPORT 0x0B #define IPMI_CMD_GET_CONFIGURABLE_COMMANDS 0x0C #define IPMI_CMD_GET_CONFIGURABLE_COMMAND_SUB_FUNCTIONS 0x0D /* RESERVED 0x0E to 0x0F */ #define IPMI_CMD_SET_COMMAND_ENABLES 0x60 #define IPMI_CMD_GET_COMMAND_ENABLES 0x61 #define IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES 0x62 #define IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES 0x63 #define IPMI_CMD_GET_OEM_NETFN_IANA_SUPPORT 0x64 /* BMC Watchdog Timer Commands */ #define IPMI_CMD_RESET_WATCHDOG_TIMER 0x22 #define IPMI_CMD_SET_WATCHDOG_TIMER 0x24 #define IPMI_CMD_GET_WATCHDOG_TIMER 0x25 /* BMC Device And Messaging Commands */ #define IPMI_CMD_SET_BMC_GLOBAL_ENABLES 0x2E #define IPMI_CMD_GET_BMC_GLOBAL_ENABLES 0x2F #define IPMI_CMD_CLEAR_MESSAGE_FLAGS 0x30 #define IPMI_CMD_GET_MESSAGE_FLAGS 0x31 #define IPMI_CMD_ENABLE_MESSAGE_CHANNEL_RECEIVE 0x32 #define IPMI_CMD_GET_MESSAGE 0x33 #define IPMI_CMD_SEND_MESSAGE 0x34 #define IPMI_CMD_READ_EVENT_MESSAGE_BUFFER 0x35 #define IPMI_CMD_GET_BT_INTERFACE_CAPABILITIES 0x36 #define IPMI_CMD_GET_SYSTEM_GUID 0x37 #define IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS 0x58 #define IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS 0x59 #define IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES 0x38 #define IPMI_CMD_GET_SESSION_CHALLENGE 0x39 #define IPMI_CMD_ACTIVATE_SESSION 0x3A #define IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL 0x3B #define IPMI_CMD_CLOSE_SESSION 0x3C #define IPMI_CMD_GET_SESSION_INFO 0x3D /* UNASSIGNED 0x3E */ #define IPMI_CMD_GET_AUTHCODE 0x3F #define IPMI_CMD_SET_CHANNEL_ACCESS 0x40 #define IPMI_CMD_GET_CHANNEL_ACCESS 0x41 #define IPMI_CMD_GET_CHANNEL_INFO_COMMAND 0x42 #define IPMI_CMD_SET_USER_ACCESS_COMMAND 0x43 #define IPMI_CMD_GET_USER_ACCESS_COMMAND 0x44 #define IPMI_CMD_SET_USER_NAME 0x45 #define IPMI_CMD_GET_USER_NAME_COMMAND 0x46 #define IPMI_CMD_SET_USER_PASSWORD_COMMAND 0x47 #define IPMI_CMD_ACTIVATE_PAYLOAD 0x48 #define IPMI_CMD_DEACTIVATE_PAYLOAD 0x49 #define IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS 0x4A #define IPMI_CMD_GET_PAYLOAD_INSTANCE_INFO 0x4B #define IPMI_CMD_SET_USER_PAYLOAD_ACCESS 0x4C #define IPMI_CMD_GET_USER_PAYLOAD_ACCESS 0x4D #define IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT 0x4E #define IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION 0x4F #define IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO 0x50 /* unassigned 0x51 */ #define IPMI_CMD_MASTER_WRITE_READ 0x52 /* unassigned 0x53 */ #define IPMI_CMD_GET_CHANNEL_CIPHER_SUITES 0x54 #define IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION 0x53 #define IPMI_CMD_SET_CHANNEL_SECURITY_KEYS 0x56 #define IPMI_CMD_GET_SYSTEM_INTERFACE_CAPABILITIES 0x57 /* unassigned 0x58 to 0x5F */ /* Firmware Firewall Configuration 0x60 to 0x64 */ /* Chassis Device Commands */ /* achu: Cmd is named "set front panel enables", but cmd in appendix G is * named "set front panel button enables". Go fig ... */ #define IPMI_CMD_GET_CHASSIS_CAPABILITIES 0x00 #define IPMI_CMD_GET_CHASSIS_STATUS 0x01 #define IPMI_CMD_CHASSIS_CONTROL 0x02 #define IPMI_CMD_CHASSIS_RESET 0x03 #define IPMI_CMD_CHASSIS_IDENTIFY 0x04 #define IPMI_CMD_SET_CHASSIS_CAPABILITIES 0x05 #define IPMI_CMD_SET_POWER_RESTORE_POLICY 0x06 #define IPMI_CMD_GET_SYSTEM_RESTART_CAUSE 0x07 #define IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS 0x08 #define IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS 0x09 #define IPMI_CMD_SET_FRONT_PANEL_BUTTON_ENABLES 0x0A #define IPMI_CMD_SET_FRONT_PANEL_ENABLES IPMI_CMD_SET_FRONT_PANEL_BUTTON_ENABLES #define IPMI_CMD_SET_POWER_CYCLE_INTERVAL 0x0B /* unassigned 0x0C to 0x0E */ #define IPMI_CMD_GET_POWER_ON_HOURS_COUNTER 0x0F /* Event Commands */ #define IPMI_CMD_SET_EVENT_RECEIVER 0x00 #define IPMI_CMD_GET_EVENT_RECEIVER 0x01 #define IPMI_CMD_PLATFORM_EVENT 0x02 /* (a.k.a. Event Message) */ /* unassigned 0x03h to 0x0F */ /* PEF and Alerting Commands */ #define IPMI_CMD_GET_PEF_CAPABILITIES 0x10 #define IPMI_CMD_ARM_PEF_POSTPONE_TIMER 0x11 #define IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS 0x12 #define IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS 0x13 #define IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID 0x14 #define IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID 0x15 #define IPMI_CMD_ALERT_IMMEDIATE 0x16 #define IPMI_CMD_PET_ACKNOWLEDGE 0x17 /* Sensor Device Commands */ #define IPMI_CMD_GET_DEVICE_SDR_INFO 0x20 #define IPMI_CMD_GET_DEVICE_SDR 0x21 #define IPMI_CMD_RESERVE_DEVICE_SDR_REPOSITORY 0x22 #define IPMI_CMD_GET_SENSOR_READING_FACTORS 0x23 #define IPMI_CMD_SET_SENSOR_HYSTERESIS 0x24 #define IPMI_CMD_GET_SENSOR_HYSTERESIS 0x25 #define IPMI_CMD_SET_SENSOR_THRESHOLDS 0x26 #define IPMI_CMD_GET_SENSOR_THRESHOLDS 0x27 #define IPMI_CMD_SET_SENSOR_EVENT_ENABLE 0x28 #define IPMI_CMD_GET_SENSOR_EVENT_ENABLE 0x29 #define IPMI_CMD_RE_ARM_SENSOR_EVENTS 0x2A #define IPMI_CMD_GET_SENSOR_EVENT_STATUS 0x2B #define IPMI_CMD_GET_SENSOR_READING 0x2D #define IPMI_CMD_SET_SENSOR_TYPE 0x2E #define IPMI_CMD_GET_SENSOR_TYPE 0x2F #define IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS 0x30 /* FRU Device Commands */ #define IPMI_CMD_GET_FRU_INVENTORY_AREA_INFO 0x10 #define IPMI_CMD_READ_FRU_DATA 0x11 #define IPMI_CMD_WRITE_FRU_DATA 0x12 /* SDR Device Commands */ #define IPMI_CMD_GET_SDR_REPOSITORY_INFO 0x20 #define IPMI_CMD_GET_SDR_REPOSITORY_ALLOCATION_INFO 0x21 #define IPMI_CMD_RESERVE_SDR_REPOSITORY 0x22 #define IPMI_CMD_GET_SDR 0x23 #define IPMI_CMD_ADD_SDR 0x24 #define IPMI_CMD_PARTIAL_ADD_SDR 0x25 #define IPMI_CMD_DELETE_SDR 0x26 #define IPMI_CMD_CLEAR_SDR_REPOSITORY 0x27 #define IPMI_CMD_GET_SDR_REPOSITORY_TIME 0x28 #define IPMI_CMD_SET_SDR_REPOSITORY_TIME 0x29 #define IPMI_CMD_ENTER_SDR_REPOSITORY_UPDATE_MODE 0x2A #define IPMI_CMD_EXIT_SDR_REPOSITORY_UPDATE_MODE 0x2B #define IPMI_CMD_RUN_INITIALIZATION_AGENT 0x2C /* SEL Device Commands */ #define IPMI_CMD_GET_SEL_INFO 0x40 #define IPMI_CMD_GET_SEL_ALLOCATION_INFO 0x41 #define IPMI_CMD_RESERVE_SEL 0x42 #define IPMI_CMD_GET_SEL_ENTRY 0x43 #define IPMI_CMD_ADD_SEL_ENTRY 0x44 #define IPMI_CMD_PARTIAL_ADD_SEL_ENTRY 0x45 #define IPMI_CMD_DELETE_SEL_ENTRY 0x46 #define IPMI_CMD_CLEAR_SEL 0x47 #define IPMI_CMD_GET_SEL_TIME 0x48 #define IPMI_CMD_SET_SEL_TIME 0x49 #define IPMI_CMD_GET_AUXILIARY_LOG_STATUS 0x5A #define IPMI_CMD_SET_AUXILIARY_LOG_STATUS 0x5B #define IPMI_CMD_GET_SEL_TIME_UTC_OFFSET 0x5C #define IPMI_CMD_SET_SEL_TIME_UTC_OFFSET 0x5D /* LAN Device Commands */ #define IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS 0x01 #define IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS 0x02 #define IPMI_CMD_SUSPEND_BMC_ARPS 0x03 #define IPMI_CMD_GET_IP_UDP_RMCP_STATISTICS 0x04 /* Serial/Modem Device Commands */ #define IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION 0x10 #define IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION 0x11 #define IPMI_CMD_SET_SERIAL_MODEM_MUX 0x12 #define IPMI_CMD_GET_TAP_RESPONSE_CODES 0x13 #define IPMI_CMD_SET_PPP_UDP_PROXY_TRANSMIT_DATA 0x14 #define IPMI_CMD_GET_PPP_UDP_PROXY_TRANSMIT_DATA 0x15 #define IPMI_CMD_SEND_PPP_UDP_PROXY_PACKET 0x16 #define IPMI_CMD_GET_PPP_UDP_PROXY_RECEIVE_DATA 0x17 #define IPMI_CMD_SERIAL_MODEM_CONNECTION_ACTIVE 0x18 #define IPMI_CMD_CALLBACK 0x19 #define IPMI_CMD_SET_USER_CALLBACK_OPTIONS 0x1A #define IPMI_CMD_GET_USER_CALLBACK_OPTIONS 0x1B #define IPMI_CMD_SET_SERIAL_ROUTING_MUX 0x1C #define IPMI_CMD_SOL_ACTIVATING 0x20 #define IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS 0x21 #define IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS 0x22 /* Command Forwarding Commands */ #define IPMI_CMD_FORWARDED_COMMAND 0x30 #define IPMI_CMD_SET_FORWARDED_COMMANDS 0x31 #define IPMI_CMD_GET_FORWARDED_COMMANDS 0x32 #define IPMI_CMD_ENABLE_FORWARDED_COMMANDS 0x33 /* Bridge Management Commands (ICMB) */ #define IPMI_CMD_GET_BRIDGE_STATE 0x00 #define IPMI_CMD_SET_BRIDGE_STATE 0x01 #define IPMI_CMD_GET_ICMB_ADDRESS 0x02 #define IPMI_CMD_SET_ICMB_ADDRESS 0x03 #define IPMI_CMD_SET_BRIDGE_PROXY_ADDRESS 0x04 #define IPMI_CMD_GET_BRIDGE_STATISTICS 0x05 #define IPMI_CMD_GET_ICMB_CAPABILITIES 0x06 #define IPMI_CMD_CLEAR_BRIDGE_STATISTICS 0x08 #define IPMI_CMD_GET_BRIDGE_PROXY_ADDRESS 0x09 #define IPMI_CMD_GET_ICMB_CONNECTOR_INFO 0x0A #define IPMI_CMD_GET_ICMB_CONNECTION_ID 0x0B #define IPMI_CMD_SEND_ICMB_CONNECTION_ID 0x0C /* Discovery Commands (ICMB) */ #define IPMI_CMD_PREPARE_FOR_DISCOVERY 0x10 #define IPMI_CMD_GET_ADDRESSES 0x11 #define IPMI_CMD_SET_DISCOVERED 0x12 #define IPMI_CMD_GET_CHASSIS_DEVICE_ID 0x13 #define IPMI_CMD_SET_CHASSIS_DEVICE_ID 0x14 /* Bridging Commands (ICMB) */ #define IPMI_CMD_BRIDGE_REQUEST 0x20 #define IPMI_CMD_BRIDGE_MESSAGE 0x21 /* Event Commands (ICMB) */ #define IPMI_CMD_GET_EVENT_COUNT 0x30 #define IPMI_CMD_SET_EVENT_DESTINATION 0x31 #define IPMI_CMD_SET_EVENT_RECEPTION_STATE 0x32 #define IPMI_CMD_SEND_ICMB_EVENT_MESSAGE 0x33 #define IPMI_CMD_GET_EVENT_DESTINATION 0x34 #define IPMI_CMD_GET_EVENT_RECEPTION_STATE 0x35 /* OEM Commands for Bridge NetFn */ /* OEM Commands 0xC0 to 0xFE */ /* Other Bridge Commands */ #define IPMI_CMD_ERROR_REPORT 0xFF #ifdef __cplusplus } #endif #endif /* IPMI_CMD_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-cmd-dcmi-spec.h0000644002055400205540000000606413527331636025447 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_CMD_DCMI_SPEC_H #define IPMI_CMD_DCMI_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_CMD_DCMI_GET_DCMI_CAPABILITY_INFO 0x01 #define IPMI_CMD_DCMI_GET_POWER_READING 0x02 #define IPMI_CMD_DCMI_GET_POWER_LIMIT 0x03 #define IPMI_CMD_DCMI_SET_POWER_LIMIT 0x04 #define IPMI_CMD_DCMI_ACTIVATE_DEACTIVATE_POWER_LIMIT 0x05 #define IPMI_CMD_DCMI_GET_ASSET_TAG 0x06 #define IPMI_CMD_DCMI_GET_DCMI_SENSOR_INFO 0x07 #define IPMI_CMD_DCMI_SET_ASSET_TAG 0x08 #define IPMI_CMD_DCMI_GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING 0x09 #define IPMI_CMD_DCMI_SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING 0x0A #define IPMI_CMD_DCMI_SET_THERMAL_LIMIT 0x0B #define IPMI_CMD_DCMI_GET_THERMAL_LIMIT 0x0C #define IPMI_CMD_DCMI_GET_TEMPERATURE_READING 0x10 #define IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS 0x12 #define IPMI_CMD_DCMI_GET_DCMI_CONFIGURATION_PARAMETERS 0x13 #ifdef __cplusplus } #endif #endif /* IPMI_CMD_DCMI_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h0000644002055400205540000010442413527331636025637 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_SPEC_H #define IPMI_COMP_CODE_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_COMP_CODE_COMMAND_SUCCESS 0x00 #define IPMI_COMP_CODE_COMMAND_SUCCESS_STR \ "Command Completed Normally." #define IPMI_COMP_CODE_NODE_BUSY 0xC0 #define IPMI_COMP_CODE_NODE_BUSY_STR \ "Node Busy. Command could not be processed because command " \ "processing resources are temporarily unavailable." #define IPMI_COMP_CODE_INVALID_COMMAND 0xC1 #define IPMI_COMP_CODE_INVALID_COMMAND_STR \ "Invalid Command. Used to indicate an unrecognized or unsupported command." #define IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN 0xC2 #define IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN_STR \ "Command invalid for given LUN." #define IPMI_COMP_CODE_COMMAND_TIMEOUT 0xC3 #define IPMI_COMP_CODE_COMMAND_TIMEOUT_STR \ "Timeout while processing command. Response unavailable." #define IPMI_COMP_CODE_OUT_OF_SPACE 0xC4 #define IPMI_COMP_CODE_OUT_OF_SPACE_STR \ "Out of space. Command could not be completed because of a " \ "lack of storage space required to execute the given command " \ "operation." #define IPMI_COMP_CODE_RESERVATION_CANCELLED 0xC5 #define IPMI_COMP_CODE_RESERVATION_CANCELLED_STR \ "Reservation Canceled or Invalid Reservation ID." #define IPMI_COMP_CODE_INVALID_RESERVATION_ID IPMI_COMP_CODE_RESERVATION_CANCELLED #define IPMI_COMP_CODE_INVALID_RESERVATION_ID_STR IPMI_COMP_CODE_RESERVATION_CANCELLED_STR #define IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED 0xC6 #define IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED_STR \ "Request data truncated." #define IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID 0xC7 #define IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID_STR \ "Request data length invalid." #define IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED 0xC8 #define IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED_STR \ "Request data field length limit exceeded." #define IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE 0xC9 #define IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE_STR \ "Parameter out of range. One or more parameters in the data " \ "field of the Request are out of range. This is different from " \ "'Invalid data field' (CCh) code in that it indicates that the " \ "erroneous field(s) has a contiguous range of possible values." #define IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES 0xCA #define IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES_STR \ "Cannot return number of requested data bytes." #define IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT 0xCB #define IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT_STR \ "Requested Sensor, data, or record not present." #define IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST 0xCC #define IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST_STR \ "Invalid data field in Request" #define IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE 0xCD #define IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE_STR \ "Command illegal for specified sensor or record type." #define IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED 0xCE #define IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED_STR \ "Command response could not be provided." #define IPMI_COMP_CODE_CANNOT_EXECUTE_DUPLICATE_REQUEST 0xCF #define IPMI_COMP_CODE_CANNOT_EXECUTE_DUPLICATE_REQUEST_STR \ "Cannot execute duplicated request. This completion code is " \ "for devices which cannot return the response that was returned " \ "for the original instance of the request. Such devices should " \ "provide separate commands that allow the completion status of " \ "the original request to be determined. An Event Receiver does not " \ "use this completion code, but returns the 00h completion code in " \ "the response to (valid) duplicated requests." #define IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE 0xD0 #define IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE_STR \ "Command response could not be provided. SDR Repository in " \ "update mode." #define IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE 0xD1 #define IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE_STR \ "Command response could not be provided. Device in firmware " \ "update mode." #define IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS 0xD2 #define IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS_STR \ "Command response could not be provided. BMC initialization or " \ "initialization agent in progress." #define IPMI_COMP_CODE_DESTINATION_UNAVAILABLE 0xD3 #define IPMI_COMP_CODE_DESTINATION_UNAVAILABLE_STR \ "Destination unavailable. Cannot deliver request to selected " \ "destination. E.g. this code can be returned if a request message " \ "is targeted to SMS, but receive message queue reception is disabled " \ "for the particular channel." #define IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL 0xD4 #define IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL_STR \ "Cannot execute command due to insufficient privilege level or other " \ "security-based restriction (e.g. disabled for 'firmware firewall')." #define IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED 0xD5 #define IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED_STR \ "Cannot execute command. Command, or request parameter(s), not " \ "supported in present state." #define IPMI_COMP_CODE_REQUEST_PARAMETER_ILLEGAL 0xD6 #define IPMI_COMP_CODE_REQUEST_PARAMETER_ILLEGAL_STR \ "Cannot execute command. Parameter is illegal because command " \ "sub-function has been disabled or is unavailable " \ "(e.g. disabled for 'firmware firewall')." #define IPMI_COMP_CODE_UNSPECIFIED_ERROR 0xFF #define IPMI_COMP_CODE_UNSPECIFIED_ERROR_STR \ "Unspecified error." /* DEVICE-SPECIFIC (OEM) CODES 01h-7Eh This range is used for command-specific codes that are also specific for a particular device and version. A-priori knowledge of the device command set is required for interpretation of these codes. */ /* COMMAND-SPECIFIC CODES 80h-BEh 80h-BEh Standard command-specific codes. This range is reserved for command-specific completion codes for commands specified in this document. */ /* * IPMI Device "Global Commands" */ /* IPMI_CMD_SET_COMMAND_ENABLES */ #define IPMI_COMP_CODE_SET_COMMAND_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND 0x80 #define IPMI_COMP_CODE_SET_COMMAND_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR \ "attempt to enable an unsupported or un-configurable command" /* IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES */ #define IPMI_COMP_CODE_SET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND 0x80 #define IPMI_COMP_CODE_SET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR \ "attempt to enable an unsupported or un-configurable command" /* IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES */ #define IPMI_COMP_CODE_GET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND 0x80 #define IPMI_COMP_CODE_GET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR \ "attempt to enable an unsupported or un-configurable command" /* * BMC Watchdog Timer Commands */ /* IPMI_CMD_RESET_WATCHDOG_TIMER */ #define IPMI_COMP_CODE_RESET_WATCHDOG_TIMER_ATTEMPT_TO_START_UNINITIALIZED_WATCHDOG 0x80 #define IPMI_COMP_CODE_RESET_WATCHDOG_TIMER_ATTEMPT_TO_START_UNINITIALIZED_WATCHDOG_STR \ "Attempt to start un-initialized watchdog." /* * BMC Device and Messaging Commands */ /* IPMI_CMD_GET_MESSAGE */ #define IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE 0x80 #define IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE_STR \ "data not available (queue/buffer empty)" /* IPMI_CMD_SEND_MESSAGE */ #define IPMI_COMP_CODE_SEND_MESSAGE_INVALID_SESSION_HANDLE 0x80 #define IPMI_COMP_CODE_SEND_MESSAGE_INVALID_SESSION_HANDLE_STR \ "Invalid Session Handle. The session handle does not match up with any " \ "currently active sessions for this channel." #define IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION 0x81 #define IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION_STR \ "Lost Arbitration" #define IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR 0x82 #define IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR_STR \ "Bus Error" #define IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE 0x83 #define IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE_STR \ "NAK on Write" /* IPMI_CMD_MASTER_WRITE_READ */ #define IPMI_COMP_CODE_MASTER_WRITE_READ_LOST_ARBITRATION 0x81 #define IPMI_COMP_CODE_MASTER_WRITE_READ_LOST_ARBITRATION_STR \ "Lost Arbitration" #define IPMI_COMP_CODE_MASTER_WRITE_READ_BUS_ERROR 0x82 #define IPMI_COMP_CODE_MASTER_WRITE_READ_BUS_ERROR_STR \ "Bus Error" #define IPMI_COMP_CODE_MASTER_WRITE_READ_NAK_ON_WRITE 0x83 #define IPMI_COMP_CODE_MASTER_WRITE_READ_NAK_ON_WRITE_STR \ "NAK on Write" #define IPMI_COMP_CODE_MASTER_WRITE_READ_TRUNCATED_READ 0x84 #define IPMI_COMP_CODE_MASTER_WRITE_READ_TRUNCATED_READ_STR \ "Truncated Read" /* IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS */ #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS */ #define IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* IPMI_CMD_GET_SESSION_CHALLENGE */ #define IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME 0x81 #define IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME_STR \ "Invalid user name" #define IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED 0x82 #define IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED_STR \ "Null user name (User 1) not enabled" /* IPMI_CMD_ACTIVATE_SESSION */ #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE 0x81 #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE_STR \ "No session slot available (BMC cannot accept any more sessions)" #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER 0x82 #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER_STR \ "No slot available for given user. (Limit of user sessions " \ "allowed under that name has been reached)" #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_TO_SUPPORT_USER 0x83 #define IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILALBE_TO_SUPPORT_USER_STR \ "No slot available to support user due to maximum privilege " \ "capability. (An implementation may only be able to support " \ "a certain number of sessions based on what authentication " \ "resources are required. For example, if User Level " \ "Authentication is disabled, an implementation may be able " \ "to allow a larger number of users that are limited to User " \ "Level privilege, than users that require higher privilege." #define IPMI_COMP_CODE_ACTIVATE_SESSION_SESSION_SEQ_NUM_OUT_OF_RANGE 0x84 #define IPMI_COMP_CODE_ACTIVATE_SESSION_SESSION_SEQ_NUM_OUT_OF_RANGE_STR \ "Session sequence number out-of-range" #define IPMI_COMP_CODE_ACTIVATE_SESSION_INVALID_SESSION_ID 0x85 #define IPMI_COMP_CODE_ACTIVATE_SESSION_INVALID_SESSION_ID_STR \ "Invalid session ID in request" #define IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL 0x86 #define IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL_STR \ "Requested maximum privilege level exceeds user and/or " \ "channel privilege limit" /* IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL */ #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER 0x80 #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER_STR \ "Requested level not available for this user" #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT 0x81 #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT_STR \ "Requested level exceeds Channel and/or User Privilege Limit" #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_CANNOT_DISABLE_USER_LEVEL_AUTHENTICATION 0x82 #define IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_CANNOT_DISABLE_USER_LEVEL_AUTHENTICATION_STR \ "Cannot disable User Level authentication" /* IPMI_CMD_CLOSE_SESSION */ #define IPMI_COMP_CODE_CLOSE_SESSION_INVALID_SESSION_ID_IN_REQUEST 0x87 #define IPMI_COMP_CODE_CLOSE_SESSION_INVALID_SESSION_ID_IN_REQUEST_STR \ "Invalid session ID in request" /* IPMI_CMD_SET_CHANNEL_ACCESS */ #define IPMI_COMP_CODE_SET_CHANNEL_ACCESS_SET_NOT_SUPPORTED_ON_SELECTED_CHANNEL 0x82 #define IPMI_COMP_CODE_SET_CHANNEL_ACCESS_SET_NOT_SUPPORTED_ON_SELECTED_CHANNEL_STR \ "set not supported on selected channel" #define IPMI_COMP_CODE_SET_CHANNEL_ACCESS_ACCESS_MODE_NOT_SUPPORTED 0x83 #define IPMI_COMP_CODE_SET_CHANNEL_ACCESS_ACCESS_MODE_NOT_SUPPORTED_STR \ "access mode not supported" /* IPMI_CMD_GET_CHANNEL_ACCESS */ #define IPMI_COMP_CODE_GET_CHANNEL_ACCESS_COMMAND_NOT_SUPPORTED_FOR_SELECTED_CHANNEL 0x82 #define IPMI_COMP_CODE_GET_CHANNEL_ACCESS_COMMAND_NOT_SUPPORTED_FOR_SELECTED_CHANNEL_STR \ "command not supported for selected channel" /* IPMI_CMD_SET_USER_PASSWORD_COMMAND */ #define IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_CORRECT 0x80 #define IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_CORRECT_STR \ "password test failed. Password size correct, but password " \ "data does not match stored value." #define IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT 0x81 #define IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT_STR \ "password test failed. Wrong password size was used." /* IPMI_CMD_ACTIVATE_PAYLOAD */ #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION 0x80 #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION_STR \ "Payload already active on another session" #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED 0x81 #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED_STR \ "Payload type disabled. Given payload type is not configured " \ "to be enabled for activation." #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED 0x82 #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED_STR \ "Payload activation limit reached. Cannot activate given payload type " \ "because the maximum number of simultaneous instances of that payload type " \ "are already running." #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION 0x83 #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION_STR \ "Cannot activate payload with encryption." #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION 0x84 #define IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION_STR \ "Cannot activate payload without encryption. BMC requires encryption " \ "for all payloads for given privilege level." /* IPMI_CMD_DEACTIVATE_PAYLOAD */ #define IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_ALREADY_DEACTIVATED 0x80 #define IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_ALREADY_DEACTIVATED_STR \ "Payload already deactivated" #define IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED 0x81 #define IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED_STR \ "Payload type disabled. Given payload type is not configured " \ "to be enabled for activation." /* IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION */ #define IPMI_COMP_CODE_GET_CHANNEL_PAYLOAD_VERSION_PAYLOAD_TYPE_NOT_AVAILABLE_ON_GIVEN_CHANNEL 0x80 #define IPMI_COMP_CODE_GET_CHANNEL_PAYLOAD_VERSION_PAYLOAD_TYPE_NOT_AVAILABLE_ON_GIVEN_CHANNEL_STR \ "Payload type not available on given channel" /* IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO */ #define IPMI_COMP_CODE_GET_CHANNEL_OEM_PAYLOAD_INFO_OEM_PAYLOAD_IANA_OR_PAYLOAD_ID_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_CHANNEL_OEM_PAYLOAD_INFO_OEM_PAYLOAD_IANA_OR_PAYLOAD_ID_NOT_SUPPORTED_STR \ "OEM Payload IANA and/or Payload ID not supported" /* IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION */ #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_SUPPORTED_STR \ "Operation not supported for given payload type." #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_ALLOWED_UNDER_PRESENT_CONFIGURATION 0x81 #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_ALLOWED_UNDER_PRESENT_CONFIGURATION_STR \ "Operation now allowed under present configuration for given payload type." #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_ENCRYPTION_IS_NOT_AVAILABLE_FOR_SESSION 0x82 #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_ENCRYPTION_IS_NOT_AVAILABLE_FOR_SESSION_STR \ "Encryption is not available for session that payload type is active under." #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_PAYLOAD_INSTANCE_NOT_PRESENTLY_ACTIVE 0x83 #define IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_PAYLOAD_INSTANCE_NOT_PRESENTLY_ACTIVE_STR \ "The payload instance is not presently active." /* IPMI_CMD_SET_CHANNEL_SECURITY_KEYS */ #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_CANNOT_PERFORM_SET_CONFIRM_KEY_IS_LOCKED 0x80 #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_CANNOT_PERFORM_SET_CONFIRM_KEY_IS_LOCKED_STR \ "Cannot perform set/confirm. Key is locked" #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_INSUFFICIENT_KEY_BYTES 0x81 #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_INSUFFICIENT_KEY_BYTES_STR \ "insufficient key bytes" #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_TOO_MANY_KEY_BYTES 0x82 #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_TOO_MANY_KEY_BYTES_STR \ "too many key bytes" #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KEY_VALUE_DOES_NOT_MEET_CRITERIA 0x83 #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KEY_VALUE_DOES_NOT_MEET_CRITERIA_STR \ "key value does not meet criteria for specified type of key" #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KR_IS_NOT_USED 0x84 #define IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KR_IS_NOT_USED_STR \ "K_R is not used. BMC uses a random number generation approach " \ "that does not require a K_R value" /* * Chassis Device Commands */ /* IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS */ #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_BOOT_OPTIONS_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS */ #define IPMI_COMP_CODE_GET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* * Event Commands */ /* * PEF and Alerting Commands */ /* IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_GET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID */ #define IPMI_COMP_CODE_SET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS_STR \ "cannot execute command, SEL erase in progress" /* IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID */ #define IPMI_COMP_CODE_GET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_GET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS_STR \ "cannot execute command, SEL erase in progress" /* IPMI_CMD_ALERT_IMMEDIATE */ #define IPMI_COMP_CODE_ALERT_ALREADY_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_ALERT_ALREADY_IN_PROGRESS_STR \ "Alert Immediate rejected due to alert already in progress" #define IPMI_COMP_CODE_ALERT_IPMI_MESSAGING_SESSION_ACTIVE 0x82 #define IPMI_COMP_CODE_ALERT_IPMI_MESSAGING_SESSION_ACTIVE_STR \ "Alert Immedate rejected due to IPMI messaging session active on this channel" /* * Sensor Device Commands */ /* IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS */ #define IPMI_COMP_CODE_SENSOR_READING_OR_STATUS_NOT_SETTABLE 0x80 #define IPMI_COMP_CODE_SENSOR_READING_OR_STATUS_NOT_SETTABLE_STR \ "Attempt to change reading or set or clear status bits that " \ "are not settable via this command" #define IPMI_COMP_CODE_EVENT_DATA_BYTES_NOT_SETTABLE 0x81 #define IPMI_COMP_CODE_EVENT_DATA_BYTES_NOT_SETTABLE_STR \ "Attempted to set Event Data Bytes, but setting Event Data Bytes is not " \ "supported for this sensor." /* * FRU Device Commands */ /* IPMI_CMD_READ_FRU_DATA */ #define IPMI_COMP_CODE_READ_FRU_DATA_FRU_DEVICE_BUSY 0x81 #define IPMI_COMP_CODE_READ_FRU_DATA_FRU_DEVICE_BUSY_STR \ "FRU device busy. The requested cannot be completed because the " \ "implementation of the logical FRU device is in a state where the FRU " \ "information is temporarily unavailable. This could be due to a " \ "condition such as a loss of arbitration if the FRU is implemented as a " \ "device on a shared bus." /* IPMI_CMD_WRITE_FRU_DATA */ #define IPMI_COMP_CODE_WRITE_FRU_DATA_WRITE_PROTECTED_OFFSET 0x80 #define IPMI_COMP_CODE_WRITE_FRU_DATA_WRITE_PROTECTED_OFFSET_STR \ "write-protected offset. Cannot complete write because one or more " \ "bytes of FRU data are to a write-protected offset in the FRU device. " \ "Note that an implementation may have allowed a 'partial write' of the " \ "data to occur." #define IPMI_COMP_CODE_WRITE_FRU_DATA_FRU_DEVICE_BUSY 0x81 #define IPMI_COMP_CODE_WRITE_FRU_DATA_FRU_DEVICE_BUSY_STR \ "FRU device busy. The requested cannot be completed because the " \ "implementation of the logical FRU device is in a state where the FRU " \ "information is temporarily unavailable. This could be due to a " \ "condition such as a loss of arbitration if the FRU is implemented as a " \ "device on a shared bus." /* * SDR Device Commands */ /* * SEL Device Commands */ /* IPMI_CMD_GET_SEL_ENTRY */ #define IPMI_COMP_CODE_GET_SEL_ENTRY_SEL_ERASE_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_GET_SEL_ENTRY_SEL_ERASE_IN_PROGRESS_STR \ "cannot execute command, SEL erase in progress" /* IPMI_CMD_DELETE_SEL_ENTRY */ #define IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_OPERATION_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_OPERATION_NOT_SUPPORTED_STR \ "Operation not supported for this Record Type" #define IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_ERASE_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_ERASE_IN_PROGRESS_STR \ "cannot execute command, SEL erase in progress" /* * LAN Device Commands */ /* IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_GET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* * Serial/Modem Device Commands */ /* IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION */ #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION */ #define IPMI_COMP_CODE_GET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS 0x81 #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR \ "attempt to set the 'set in progress' value (in parameter #0) " \ "when not int the 'set complete' state." #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER 0x82 #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR \ "attempt to write read-only parameter" #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER 0x83 #define IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR \ "attempt to read write-only parameter" /* IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS */ #define IPMI_COMP_CODE_GET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED 0x80 #define IPMI_COMP_CODE_GET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR \ "parameter not supported." /* * Bridge Management Commands (ICMB) */ /* * Discovery Commands (ICMB) */ /* * Bridging Commands (ICMB) */ /* * Event Commands (ICMB) */ /* * OEM Commands for Bridge NetFN */ /* * OEM Bridge Commands */ #define IPMI_COMP_CODE_GENERIC_COMPLETION_CODES_MIN 0xC0 #define IPMI_COMP_CODE_GENERIC_COMPLETION_CODES_MAX 0xFF #define IPMI_COMP_CODE_GENERIC_COMPLETION_CODES(__comp_code) \ (((__comp_code) == IPMI_COMP_CODE_COMMAND_SUCCESS \ || ((__comp_code) >= IPMI_COMP_CODE_GENERIC_COMPLETION_CODES_MIN \ && (__comp_code) <= IPMI_COMP_CODE_GENERIC_COMPLETION_CODES_MAX)) ? 1 : 0) #define IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES_MIN 0x01 #define IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES_MAX 0x7E #define IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES(__comp_code) \ (((__comp_code) >= IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES_MIN \ && (__comp_code) <= IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES_MAX) ? 1 : 0) #define IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES_MIN 0x80 #define IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES_MAX 0xBE #define IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES(__comp_code) \ (((__comp_code) >= IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES_MIN \ && (__comp_code) <= IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES_MAX) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-comp-code-dcmi-spec.h0000644002055400205540000000740513527331636026552 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_COMP_CODE_DCMI_SPEC_H #define IPMI_COMP_CODE_DCMI_SPEC_H #ifdef __cplusplus extern "C" { #endif /* IPMI_CMD_DCMI_GET_POWER_LIMIT */ #define IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT 0x80 #define IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT_STR \ "No Set Power Limit" /* IPMI_CMD_DCMI_SET_POWER_LIMIT */ #define IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE 0x84 #define IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE_STR \ "Power Limit out of range" #define IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE 0x85 #define IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE_STR \ "Correction Time out of range" #define IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE 0x89 /* not a typo, is 0x89 */ #define IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR \ "Statistics Reporting Period out of range" /* IPMI_CMD_DCMI_GET_ASSET_TAG */ #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BINARY_UNSPECIFIED 0x80 #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BINARY_UNSPECIFIED_STR \ "Encoding type in FRU is binary / unspecified" #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BCD_PLUS 0x81 #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BCD_PLUS_STR \ "Encoding type in FRU is BCD Plus" #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_6BIT_ASCII_PACKED 0x82 #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_6BIT_ASCII_PACKED_STR \ "Encoding type in FRU is 6-bit ASCII Packed" #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_SET_TO_ASCII_LATIN1_NOT_ENGLISH 0x83 #define IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_SET_TO_ASCII_LATIN1_NOT_ENGLISH_STR \ "Encoding type in FRU is set to ASCII+Latin1 but language code is " \ "not set to English (indicating data is 2-byte UNICODE)" #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_DCMI_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-comp-code-oem-spec.h0000644002055400205540000000236313527331636026414 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_COMP_CODE_OEM_SPEC_H #define IPMI_COMP_CODE_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-comp-code-oem-spec.h header file is deprecated #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_COMP_CODE_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-device-types-spec.h0000644002055400205540000004275713527331636026404 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_TYPES_SPEC_H #define IPMI_DEVICE_TYPES_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Note that the macros are not in sequential order, per spec table 43-12 */ #define IPMI_DEVICE_TYPE_DS1624_TEMPERATURE_SENSOR_EEPROM_OR_EQUIVALENT 0x02 #define IPMI_DEVICE_TYPE_DS1621_TEMPERATURE_SENSOR_OR_EQUIVALENT 0x03 #define IPMI_DEVICE_TYPE_LM75_TEMPERATURE_SENSOR_OR_EQUIVALENT 0x04 #define IPMI_DEVICE_TYPE_HECETA_ASIC_OR_SIMILAR 0x05 #define IPMI_DEVICE_TYPE_EEPROM_24C01_OR_EQUIVALENT 0x08 #define IPMI_DEVICE_TYPE_EEPROM_24C02_OR_EQUIVALENT 0x09 #define IPMI_DEVICE_TYPE_EEPROM_24C04_OR_EQUIVALENT 0x0A #define IPMI_DEVICE_TYPE_EEPROM_24C08_OR_EQUIVALENT 0x0B #define IPMI_DEVICE_TYPE_EEPROM_24C16_OR_EQUIVALENT 0x0C #define IPMI_DEVICE_TYPE_EEPROM_24C17_OR_EQUIVALENT 0x0D #define IPMI_DEVICE_TYPE_EEPROM_24C32_OR_EQUIVALENT 0x0E #define IPMI_DEVICE_TYPE_EEPROM_24C64_OR_EQUIVALENT 0x0F #define IPMI_DEVICE_TYPE_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER 0x10 #define IPMI_DEVICE_TYPE_PCF_8570_256_BYTE_RAM_OR_EQUIVALENT 0x14 #define IPMI_DEVICE_TYPE_PCF_8573_CLOCK_CALENDAR_OR_EQUIVALENT 0x15 #define IPMI_DEVICE_TYPE_PCF_8574A_IO_PORT_OR_EQUIVALENT 0x16 #define IPMI_DEVICE_TYPE_PCF_8583_CLOCK_CALENDAR_OR_EQUIVALENT 0x17 #define IPMI_DEVICE_TYPE_PCF_8593_CLOCK_CALENDAR_OR_EQUIVALENT 0x18 #define IPMI_DEVICE_TYPE_CLOCK_CALENDAR_TYPE_NOT_SPECIFIED 0x19 #define IPMI_DEVICE_TYPE_PCF_8591_AD_DA_CONVERTER_OR_EQUIVALENT 0x1A #define IPMI_DEVICE_TYPE_IO_PORT_SPECIFIC_DEVICE_NOT_SPECIFIED 0x1B #define IPMI_DEVICE_TYPE_AD_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED 0x1C #define IPMI_DEVICE_TYPE_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED 0x1D #define IPMI_DEVICE_TYPE_AD_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED 0x1E #define IPMI_DEVICE_TYPE_LCD_CONTROLLER_DRIVER_SPECIFIC_DEVICE_NOT_SPECIFIED 0x1F #define IPMI_DEVICE_TYPE_CORE_LOGIC_DEVICE_SPECIFIC_DEVICE_NOT_SPECIFIED 0x20 #define IPMI_DEVICE_TYPE_LMC6874_INTELLIGENT_BATTERY_CONTROLLER_OR_EQUIVALENT 0x21 #define IPMI_DEVICE_TYPE_INTELLIGENT_BATTERY_CONTROLLER_SPECIFIC_DEVICE_NOT_SPECIFIED 0x22 #define IPMI_DEVICE_TYPE_COMBO_MANAGEMENT_ASIC_SPECIFIC_DEVICE_NOT_SPECIFIED 0x23 #define IPMI_DEVICE_TYPE_MAXIM_1617_TEMPERATURE_SENSOR 0x24 #define IPMI_DEVICE_TYPE_OTHER_UNSPECIFIED_DEVICE 0xBF #define IPMI_DEVICE_TYPE_OEM_MIN 0xC0 #define IPMI_DEVICE_TYPE_OEM_MAX 0xFF #define IPMI_DEVICE_TYPE_MODIFIER_DS1624_TEMPERATURE_SENSOR_EEPROM_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_DS1621_TEMPERATURE_SENSOR_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_LM75_TEMPERATURE_SENSOR_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_HECETA_1 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_HECETA_2 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_LM80 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_HECETA_3 0x03 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_HECETA_4 0x04 #define IPMI_DEVICE_TYPE_MODIFIER_HECETA_ASIC_OR_SIMILAR_HECETA_5 0x05 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* PI = processor information */ #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 /* achu: not a typo, 00h and 0x02 are same. 00h for backwards compatability, see spec */ #define IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_IPMI_FRU_INVENTORY_BACKWARDS_COMPATABILITY 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_DIMM_MEMORY_ID 0x01 #define IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_IPMI_FRU_INVENTORY 0x02 #define IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_SYSTEM_PROCESSOR_CARTRIDGE_FRU_PI_ROM 0x03 #define IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_UNSPECIFIED 0xFF #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8570_256_BYTE_RAM_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8573_CLOCK_CALENDAR_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8574A_IO_PORT_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8583_CLOCK_CALENDAR_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8593_CLOCK_CALENDAR_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_CLOCK_CALENDAR_TYPE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_PCF_8591_AD_DA_CONVERTER_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_IO_PORT_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_AD_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_AD_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_LCD_CONTROLLER_DRIVER_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_CORE_LOGIC_DEVICE_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_LMC6874_INTELLIGENT_BATTERY_CONTROLLER_OR_EQUIVALENT_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_INTELLIGENT_BATTERY_CONTROLLER_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_COMBO_MANAGEMENT_ASIC_SPECIFIC_DEVICE_NOT_SPECIFIED_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_MAXIM_1617_TEMPERATURE_SENSOR_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_MODIFIER_OTHER_UNSPECIFIED_DEVICE_UNSPECIFIED 0x00 #define IPMI_DEVICE_TYPE_VALID(__device_type) \ ((((__device_type) >= IPMI_DEVICE_TYPE_DS1624_TEMPERATURE_SENSOR_EEPROM_OR_EQUIVALENT \ && (__device_type) <= IPMI_DEVICE_TYPE_HECETA_ASIC_OR_SIMILAR) \ || ((__device_type) >= IPMI_DEVICE_TYPE_EEPROM_24C01_OR_EQUIVALENT \ && (__device_type) <= IPMI_DEVICE_TYPE_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER) \ || ((__device_type) >= IPMI_DEVICE_TYPE_PCF_8570_256_BYTE_RAM_OR_EQUIVALENT \ && (__device_type) <= IPMI_DEVICE_TYPE_MAXIM_1617_TEMPERATURE_SENSOR) \ || (__device_type) == IPMI_DEVICE_TYPE_OTHER_UNSPECIFIED_DEVICE) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_DEVICE_TYPE_IS_OEM(__device_type) \ (((__device_type) >= IPMI_DEVICE_TYPE_OEM_MIN \ && (((__device_type) - 1) <= (IPMI_DEVICE_TYPE_OEM_MAX - 1))) ? 1 : 0) /* * String arrays for above */ extern const char *const ipmi_device_types[]; extern const char *const ipmi_oem_device_type; extern const char * const ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_heceta_asic_or_similar[]; extern unsigned int ipmi_device_type_modifier_heceta_asic_or_similar_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c01_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c01_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c02_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c02_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c04_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c04_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c08_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c08_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c16_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c16_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c17_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c17_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c32_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c32_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_eeprom_24c64_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_eeprom_24c64_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_fru_inventory_device_behind_management_controller[]; extern unsigned int ipmi_device_type_modifier_fru_inventory_device_behind_management_controller_max_index; extern const char * const ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_clock_calendar_type_not_specified[]; extern unsigned int ipmi_device_type_modifier_clock_calendar_type_not_specified_max_index; extern const char * const ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_io_port_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_io_port_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_ad_converter_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_ad_converter_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_da_converter_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_da_converter_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_core_logic_device_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_core_logic_device_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent[]; extern unsigned int ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent_max_index; extern const char * const ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified[]; extern unsigned int ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified_max_index; extern const char * const ipmi_device_type_modifier_maxim_1617_temperature_sensor[]; extern unsigned int ipmi_device_type_modifier_maxim_1617_temperature_sensor_max_index; extern const char * const ipmi_device_type_modifier_other_unspecified_device[]; extern unsigned int ipmi_device_type_modifier_other_unspecified_device_max_index; #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_TYPES_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-device-types-oem-spec.h0000644002055400205540000000167513527331636027154 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_TYPES_OEM_SPEC_H #define IPMI_DEVICE_TYPES_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-device-types-oem-spec.h header file is deprecated #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_TYPES_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-entity-ids-spec.h0000644002055400205540000001770013527331636026062 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_ENTITY_IDS_SPEC_H #define IPMI_ENTITY_IDS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_ENTITY_ID_UNSPECIFIED 0x00 #define IPMI_ENTITY_ID_OTHER 0x01 #define IPMI_ENTITY_ID_UNKNOWN 0x02 #define IPMI_ENTITY_ID_PROCESSOR 0x03 #define IPMI_ENTITY_ID_DISK_OR_DISK_BAY 0x04 #define IPMI_ENTITY_ID_PERIPHERAL_BAY 0x05 /* "peripheral bay" in spec */ #define IPMI_ENTITY_ID_SYSTEM_MANAGEMENT_MODULE 0x06 #define IPMI_ENTITY_ID_SYSTEM_BOARD 0x07 #define IPMI_ENTITY_ID_MEMORY_MODULE 0x08 #define IPMI_ENTITY_ID_PROCESSOR_MODULE 0x09 #define IPMI_ENTITY_ID_POWER_SUPPLY 0x0A #define IPMI_ENTITY_ID_ADD_IN_CARD 0x0B #define IPMI_ENTITY_ID_FRONT_PANEL_BOARD 0x0C #define IPMI_ENTITY_ID_BACK_PANEL_BOARD 0x0D #define IPMI_ENTITY_ID_POWER_SYSTEM_BOARD 0x0E #define IPMI_ENTITY_ID_DRIVE_BACKPLANE 0x0F #define IPMI_ENTITY_ID_SYSTEM_INTERNAL_EXPANSION_BOARD 0x10 #define IPMI_ENTITY_ID_OTHER_SYSTEM_BOARD 0x11 #define IPMI_ENTITY_ID_PROCESSOR_BOARD 0x12 #define IPMI_ENTITY_ID_POWER_UNIT_POWER_DOMAIN 0x13 #define IPMI_ENTITY_ID_POWER_MODULE_DC_TO_DC_CONVERTER 0x14 #define IPMI_ENTITY_ID_POWER_MANAGEMENT_POWER_DISTRIBUTION_BOARD 0x15 #define IPMI_ENTITY_ID_CHASSI_BACK_PANEL_BOARD 0x16 #define IPMI_ENTITY_ID_SYSTEM_CHASSIS 0x17 #define IPMI_ENTITY_ID_SUB_CHASSIS 0x18 #define IPMI_ENTITY_ID_OTHER_CHASSIS_BOARD 0x19 #define IPMI_ENTITY_ID_DISK_DRIVE_BAY 0x1A #define IPMI_ENTITY_ID_PERIPHERAL_BAY2 0x1B /* "Peripheral Bay" in spec */ #define IPMI_ENTITY_ID_DEVICE_BAY 0x1C #define IPMI_ENTITY_ID_FAN_COOLING_DEVICE 0x1D #define IPMI_ENTITY_ID_COOLING_UNIT_COOLING_DOMAIN 0x1E /* see errata */ #define IPMI_ENTITY_ID_CABLE_INTERCONNECT 0x1F #define IPMI_ENTITY_ID_MEMORY_DEVICE 0x20 #define IPMI_ENTITY_ID_SYSTEM_MANAGEMENT_SOFTWARE 0x21 #define IPMI_ENTITY_ID_SYSTEM_FIRMWARE 0x22 /* see errata */ #define IPMI_ENTITY_ID_OPERATING_SYSTEM 0x23 #define IPMI_ENTITY_ID_SYSTEM_BUS 0x24 #define IPMI_ENTITY_ID_GROUP 0x25 #define IPMI_ENTITY_ID_REMOTE_MANAGEMENT_COMMUNICATION_DEVICE 0x26 #define IPMI_ENTITY_ID_EXTERNAL_ENVIRONMENT 0x27 #define IPMI_ENTITY_ID_BATTERY 0x28 #define IPMI_ENTITY_ID_PROCESSING_BLADE 0x29 #define IPMI_ENTITY_ID_CONNECTIVITY_SWTICH 0x2A #define IPMI_ENTITY_ID_PROCESSOR_MEMORY_MODULE 0x2B #define IPMI_ENTITY_ID_IO_MODULE 0x2C #define IPMI_ENTITY_ID_PROCESSOR_IO_MODULE 0x2D #define IPMI_ENTITY_ID_MANAGEMENT_CONTROLLER_FIRMWARE 0x2E #define IPMI_ENTITY_ID_IPMI_CHANNEL 0x2F #define IPMI_ENTITY_ID_PCI_BUS 0x30 #define IPMI_ENTITY_ID_PCI_EXPRESS_BUS 0x31 #define IPMI_ENTITY_ID_SCSI_BUS 0x32 #define IPMI_ENTITY_ID_SATA_SAS_BUS 0x33 #define IPMI_ENTITY_ID_PROCESSOR_FRONT_SIDE_BUS 0x34 #define IPMI_ENTITY_ID_REAL_TIME_CLOCK 0x35 /* 0x36 - reserved */ /* achu: * * Ugh .. 0x37 is listed as air inlet in markup 4 spec, but not in * errata 4. Initial assumption was that it was a typo. Later, DCMI * v1.5 spec lits 0x37 is inlet temperature. * * So the assumption is it's not a typo now, we'll list 0x37 as * AIR_INLET "B" */ #define IPMI_ENTITY_ID_AIR_INLET_B 0x37 /* 0x38 - 0x3F - reserved */ #define IPMI_ENTITY_ID_AIR_INLET 0x40 #define IPMI_ENTITY_ID_AIR_INLET_A IPMI_ENTITY_ID_AIR_INLET #define IPMI_ENTITY_ID_PROCESSOR_CPU 0x41 /* considered same as 0x03, to match DCMI */ #define IPMI_ENTITY_ID_BASEBOARD_MAIN_SYSTEM_BOARD 0x42 /* considered same as 0x07, to match DCMI */ #define IPMI_ENTITY_ID_CHASSIS_SPECIFIC_MIN 0x90 #define IPMI_ENTITY_ID_CHASSIS_SPECIFIC_MAX 0xAF #define IPMI_ENTITY_ID_BOARD_SET_SPECIFIC_MIN 0xB0 #define IPMI_ENTITY_ID_BOARD_SET_SPECIFIC_MAX 0xCF #define IPMI_ENTITY_ID_OEM_SYSTEM_INTEGRATOR_DEFINED_MIN 0xD0 #define IPMI_ENTITY_ID_OEM_SYSTEM_INTEGRATOR_DEFINED_MAX 0xFF /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_ENTITY_ID_VALID(__entity_id) \ ((((__entity_id + 1) >= (IPMI_ENTITY_ID_UNSPECIFIED + 1) \ && (__entity_id) <= IPMI_ENTITY_ID_REAL_TIME_CLOCK) \ || ((__entity_id) >= IPMI_ENTITY_ID_AIR_INLET \ && (__entity_id) <= IPMI_ENTITY_ID_BASEBOARD_MAIN_SYSTEM_BOARD)) ? 1 : 0) #define IPMI_ENTITY_ID_IS_CHASSIS_SPECIFIC(__entity_id) \ (((__entity_id) >= IPMI_ENTITY_ID_CHASSIS_SPECIFIC_MIN \ && ((__entity_id) <= IPMI_ENTITY_ID_CHASSIS_SPECIFIC_MAX)) ? 1 : 0) #define IPMI_ENTITY_ID_IS_BOARD_SET_SPECIFIC(__entity_id) \ (((__entity_id) >= IPMI_ENTITY_ID_BOARD_SET_SPECIFIC_MIN \ && ((__entity_id) <= IPMI_ENTITY_ID_BOARD_SET_SPECIFIC_MAX)) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_ENTITY_ID_IS_OEM_SYSTEM_INTEGRATOR_DEFINED(__entity_id) \ (((__entity_id) >= IPMI_ENTITY_ID_OEM_SYSTEM_INTEGRATOR_DEFINED_MIN \ && ((__entity_id - 1) <= (IPMI_ENTITY_ID_OEM_SYSTEM_INTEGRATOR_DEFINED_MAX - 1))) ? 1 : 0) #define IPMI_ENTITY_INSTANCE_SYSTEM_RELATIVE_MIN 0x00 #define IPMI_ENTITY_INSTANCE_SYSTEM_RELATIVE_MAX 0x5F #define IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE_MIN 0x60 #define IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE_MAX 0x7F /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_ENTITY_INSTANCE_SYSTEM_RELATIVE(__entity_instance) \ (((__entity_instance + 1) >= (IPMI_ENTITY_INSTANCE_SYSTEM_RELATIVE_MIN + 1)) \ && ((__entity_instance) >= IPMI_ENTITY_INSTANCE_SYSTEM_RELATIVE_MAX) ? 1 : 0) #define IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE(__entity_instance) \ (((__entity_instance) >= IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE_MIN) \ && ((__entity_instance) >= IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE_MAX) ? 1 : 0) extern const char *const ipmi_entity_ids[]; extern const char *const ipmi_entity_id_chassis_specific; extern const char *const ipmi_entity_id_board_set_specific; extern const char *const ipmi_entity_id_oem_system_integrator; /* properly capitalize, for some entries if entity has an "or" or "/" remove it and pick one element, etc. */ extern const char *const ipmi_entity_ids_pretty[]; #ifdef __cplusplus } #endif #endif /* IPMI_ENTITY_IDS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-event-reading-type-code-spec.h0000644002055400205540000000557013527331636030412 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Table 42-1 */ #define IPMI_EVENT_READING_TYPE_CODE_UNSPECIFIED 0x00 #define IPMI_EVENT_READING_TYPE_CODE_THRESHOLD 0x01 #define IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE 0x02 #define IPMI_EVENT_READING_TYPE_CODE_STATE 0x03 #define IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE 0x04 #define IPMI_EVENT_READING_TYPE_CODE_LIMIT 0x05 #define IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE 0x06 #define IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY 0x07 #define IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT 0x08 #define IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED 0x09 #define IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY 0x0A #define IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY 0x0B #define IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE 0x0C #define IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC 0x6F #define IPMI_EVENT_READING_TYPE_CODE_OEM_MIN 0x70 #define IPMI_EVENT_READING_TYPE_CODE_OEM_MAX 0x7F #define IPMI_EVENT_READING_TYPE_CODE_IS_UNSPECIFIED(__val) \ (((__val) == IPMI_EVENT_READING_TYPE_CODE_UNSPECIFIED) ? 1 : 0) #define IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD(__val) \ (((__val) == IPMI_EVENT_READING_TYPE_CODE_THRESHOLD) ? 1 : 0) #define IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC(__val) \ (((__val) >= IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE \ && (__val) <= IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE) ? 1 : 0) #define IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC(__val) \ (((__val) == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC) ? 1 : 0) #define IPMI_EVENT_READING_TYPE_CODE_IS_OEM(__val) \ (((__val) >= IPMI_EVENT_READING_TYPE_CODE_OEM_MIN \ && (__val) <= IPMI_EVENT_READING_TYPE_CODE_OEM_MAX) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-event-reading-type-code-oem-spec.h0000644002055400205540000000267513527331636031173 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_READING_TYPE_CODE_OEM_SPEC_H #define IPMI_EVENT_READING_TYPE_CODE_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-event-reading-type-code-oem-spec.h header file is deprecated #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_READING_TYPE_CODE_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-fru-chassis-types-spec.h0000644002055400205540000001043513527331636027360 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_CHASSIS_TYPES_SPEC_H #define IPMI_FRU_CHASSIS_TYPES_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * achu: * * Not in IPMI spec. In "Platform Management FRU Information Storage * Definition" document. * * Starting w/ FRU Revision 1.2, this table is defined by SMBIOS * specification, Table 16 - "System Enclosure or Chassis Types" */ #define IPMI_FRU_CHASSIS_TYPE_OTHER 0x01 #define IPMI_FRU_CHASSIS_TYPE_UNKNOWN 0x02 #define IPMI_FRU_CHASSIS_TYPE_DESKTOP 0x03 #define IPMI_FRU_CHASSIS_TYPE_LOW_PROFILE_DESKTOP 0x04 #define IPMI_FRU_CHASSIS_TYPE_PIZZA_BOX 0x05 #define IPMI_FRU_CHASSIS_TYPE_MINI_TOWER 0x06 #define IPMI_FRU_CHASSIS_TYPE_TOWER 0x07 #define IPMI_FRU_CHASSIS_TYPE_PORTABLE 0x08 #define IPMI_FRU_CHASSIS_TYPE_LAPTOP 0x09 #define IPMI_FRU_CHASSIS_TYPE_NOTEBOOK 0x0a #define IPMI_FRU_CHASSIS_TYPE_HAND_HELD 0x0b #define IPMI_FRU_CHASSIS_TYPE_DOCKING_STATION 0x0c #define IPMI_FRU_CHASSIS_TYPE_ALL_IN_ONE 0x0d #define IPMI_FRU_CHASSIS_TYPE_SUB_NOTEBOOK 0x0e #define IPMI_FRU_CHASSIS_TYPE_SPACE_SAVING 0x0f #define IPMI_FRU_CHASSIS_TYPE_LUNCH_BOX 0x10 #define IPMI_FRU_CHASSIS_TYPE_MAIN_SERVER_CHASSIS 0x11 #define IPMI_FRU_CHASSIS_TYPE_EXPANSION_CHASSIS 0x12 #define IPMI_FRU_CHASSIS_TYPE_SUBCHASSIS 0x13 #define IPMI_FRU_CHASSIS_TYPE_BUS_EXPANSION_CHASSIS 0x14 #define IPMI_FRU_CHASSIS_TYPE_PERIPHERAL_CHASSIS 0x15 #define IPMI_FRU_CHASSIS_TYPE_RAID_CHASSIS 0x16 #define IPMI_FRU_CHASSIS_TYPE_RACK_MOUNT_CHASSIS 0x17 #define IPMI_FRU_CHASSIS_TYPE_SEALED_CASE_PC 0x18 #define IPMI_FRU_CHASSIS_TYPE_MULTI_SYSTEM_CHASSIS 0x19 #define IPMI_FRU_CHASSIS_TYPE_COMPACT_PCI 0x1A #define IPMI_FRU_CHASSIS_TYPE_ADVANCED_TCA 0x1B #define IPMI_FRU_CHASSIS_TYPE_BLADE 0x1C #define IPMI_FRU_CHASSIS_TYPE_BLADE_ENCLOSURE 0x1D /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_FRU_CHASSIS_TYPE_VALID(__chassis_type) \ (((__chassis_type + 1) >= (IPMI_FRU_CHASSIS_TYPE_OTHER + 1) \ && (__chassis_type) <= IPMI_FRU_CHASSIS_TYPE_BLADE_ENCLOSURE) ? 1 : 0) extern const char *const ipmi_fru_chassis_types[]; #ifdef __cplusplus } #endif #endif /* IPMI_FRU_CHASSIS_TYPES_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-fru-language-codes-spec.h0000644002055400205540000002406713527331636027445 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_LANGUAGE_CODES_SPEC_H #define IPMI_FRU_LANGUAGE_CODES_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /* * achu: * * Not in IPMI spec. In "Platform Management FRU Information Storage * Definition" document. */ #define IPMI_FRU_LANGUAGE_CODE_ENGLISH_LEGACY 0 #define IPMI_FRU_LANGUAGE_CODE_AFAR 1 #define IPMI_FRU_LANGUAGE_CODE_ABKHAZIAN 2 #define IPMI_FRU_LANGUAGE_CODE_AFRIKAANS 3 #define IPMI_FRU_LANGUAGE_CODE_AMHARIC 4 #define IPMI_FRU_LANGUAGE_CODE_ARABIC 5 #define IPMI_FRU_LANGUAGE_CODE_ASSAMESE 6 #define IPMI_FRU_LANGUAGE_CODE_AYMARA 7 #define IPMI_FRU_LANGUAGE_CODE_AZERBAIJANI 8 #define IPMI_FRU_LANGUAGE_CODE_BASHKIR 9 #define IPMI_FRU_LANGUAGE_CODE_BYELORUSSIAN 10 #define IPMI_FRU_LANGUAGE_CODE_BULGARIAN 11 #define IPMI_FRU_LANGUAGE_CODE_BIHARI 12 #define IPMI_FRU_LANGUAGE_CODE_BISLAMA 13 #define IPMI_FRU_LANGUAGE_CODE_BENGALI_BANGLA 14 #define IPMI_FRU_LANGUAGE_CODE_TIBETAN 15 #define IPMI_FRU_LANGUAGE_CODE_BRETON 16 #define IPMI_FRU_LANGUAGE_CODE_CATALAN 17 #define IPMI_FRU_LANGUAGE_CODE_CORSICAN 18 #define IPMI_FRU_LANGUAGE_CODE_CZECH 19 #define IPMI_FRU_LANGUAGE_CODE_WELSH 20 #define IPMI_FRU_LANGUAGE_CODE_DANISH 21 #define IPMI_FRU_LANGUAGE_CODE_GERMAN 22 #define IPMI_FRU_LANGUAGE_CODE_BHUTANI 23 #define IPMI_FRU_LANGUAGE_CODE_GREEK 24 #define IPMI_FRU_LANGUAGE_CODE_ENGLISH 25 #define IPMI_FRU_LANGUAGE_CODE_ESPERANTO 26 #define IPMI_FRU_LANGUAGE_CODE_SPANISH 27 #define IPMI_FRU_LANGUAGE_CODE_ESTONIAN 28 #define IPMI_FRU_LANGUAGE_CODE_BASQUE 29 #define IPMI_FRU_LANGUAGE_CODE_PERSIAN 30 #define IPMI_FRU_LANGUAGE_CODE_FINNISH 31 #define IPMI_FRU_LANGUAGE_CODE_FIJI 32 #define IPMI_FRU_LANGUAGE_CODE_FAEROESE 33 #define IPMI_FRU_LANGUAGE_CODE_FRENCH 34 #define IPMI_FRU_LANGUAGE_CODE_FRISIAN 35 #define IPMI_FRU_LANGUAGE_CODE_IRISH 36 #define IPMI_FRU_LANGUAGE_CODE_SCOTS_GAELIC 37 #define IPMI_FRU_LANGUAGE_CODE_GALICIAN 38 #define IPMI_FRU_LANGUAGE_CODE_GUARANI 39 #define IPMI_FRU_LANGUAGE_CODE_GUJARATI 40 #define IPMI_FRU_LANGUAGE_CODE_HAUSA 41 #define IPMI_FRU_LANGUAGE_CODE_HINDI 42 #define IPMI_FRU_LANGUAGE_CODE_CROATIAN 43 #define IPMI_FRU_LANGUAGE_CODE_HUNGARIAN 44 #define IPMI_FRU_LANGUAGE_CODE_ARMENIAN 45 #define IPMI_FRU_LANGUAGE_CODE_INTERLINGUA 46 #define IPMI_FRU_LANGUAGE_CODE_INTERLINGUE 47 #define IPMI_FRU_LANGUAGE_CODE_INUPIAK 48 #define IPMI_FRU_LANGUAGE_CODE_INDONESIAN 49 #define IPMI_FRU_LANGUAGE_CODE_ICELANDIC 50 #define IPMI_FRU_LANGUAGE_CODE_ITALIAN 51 #define IPMI_FRU_LANGUAGE_CODE_HEBREW 52 #define IPMI_FRU_LANGUAGE_CODE_JAPANESE 53 #define IPMI_FRU_LANGUAGE_CODE_YIDDISH 54 #define IPMI_FRU_LANGUAGE_CODE_JAVANESE 55 #define IPMI_FRU_LANGUAGE_CODE_GEORGIAN 56 #define IPMI_FRU_LANGUAGE_CODE_KAZAKH 57 #define IPMI_FRU_LANGUAGE_CODE_GREENLANDIC 58 #define IPMI_FRU_LANGUAGE_CODE_CAMBODIAN 59 #define IPMI_FRU_LANGUAGE_CODE_KANNADA 60 #define IPMI_FRU_LANGUAGE_CODE_KOREAN 61 #define IPMI_FRU_LANGUAGE_CODE_KASHMIRI 62 #define IPMI_FRU_LANGUAGE_CODE_KURDISH 63 #define IPMI_FRU_LANGUAGE_CODE_KIRGHIZ 64 #define IPMI_FRU_LANGUAGE_CODE_LATIN 65 #define IPMI_FRU_LANGUAGE_CODE_LINGALA 66 #define IPMI_FRU_LANGUAGE_CODE_LAOTHIAN 67 #define IPMI_FRU_LANGUAGE_CODE_LITHUANIAN 68 #define IPMI_FRU_LANGUAGE_CODE_LATVIAN_LETTISH 69 #define IPMI_FRU_LANGUAGE_CODE_MALAGASY 70 #define IPMI_FRU_LANGUAGE_CODE_MAORI 71 #define IPMI_FRU_LANGUAGE_CODE_MACEDONIAN 72 #define IPMI_FRU_LANGUAGE_CODE_MALAYALAM 73 #define IPMI_FRU_LANGUAGE_CODE_MONGOLIAN 74 #define IPMI_FRU_LANGUAGE_CODE_MOLDAVIAN 75 #define IPMI_FRU_LANGUAGE_CODE_MARATHI 76 #define IPMI_FRU_LANGUAGE_CODE_MALAY 77 #define IPMI_FRU_LANGUAGE_CODE_MALTESE 78 #define IPMI_FRU_LANGUAGE_CODE_BURMESE 79 #define IPMI_FRU_LANGUAGE_CODE_NAURU 80 #define IPMI_FRU_LANGUAGE_CODE_NEPALI 81 #define IPMI_FRU_LANGUAGE_CODE_DUTCH 82 #define IPMI_FRU_LANGUAGE_CODE_NORWEGIAN 83 #define IPMI_FRU_LANGUAGE_CODE_OCCITAN 84 #define IPMI_FRU_LANGUAGE_CODE_AFAN_OROMO 85 #define IPMI_FRU_LANGUAGE_CODE_ORIYA 86 #define IPMI_FRU_LANGUAGE_CODE_PUNJABI 87 #define IPMI_FRU_LANGUAGE_CODE_POLISH 88 #define IPMI_FRU_LANGUAGE_CODE_PASHTO_PUSHTO 89 #define IPMI_FRU_LANGUAGE_CODE_PORTUGUESE 90 #define IPMI_FRU_LANGUAGE_CODE_QUECHUA 91 #define IPMI_FRU_LANGUAGE_CODE_RHAETO_ROMANCE 92 #define IPMI_FRU_LANGUAGE_CODE_KIRUNDI 93 #define IPMI_FRU_LANGUAGE_CODE_ROMANIAN 94 #define IPMI_FRU_LANGUAGE_CODE_RUSSIAN 95 #define IPMI_FRU_LANGUAGE_CODE_KINYARWANDA 96 #define IPMI_FRU_LANGUAGE_CODE_SANSKRIT 97 #define IPMI_FRU_LANGUAGE_CODE_SINDHI 98 #define IPMI_FRU_LANGUAGE_CODE_SANGRO 99 #define IPMI_FRU_LANGUAGE_CODE_SERBO_CROATION 100 #define IPMI_FRU_LANGUAGE_CODE_SINGHALESE 101 #define IPMI_FRU_LANGUAGE_CODE_SLOVAK 102 #define IPMI_FRU_LANGUAGE_CODE_SLOVENIAN 103 #define IPMI_FRU_LANGUAGE_CODE_SAMOAN 104 #define IPMI_FRU_LANGUAGE_CODE_SHONA 105 #define IPMI_FRU_LANGUAGE_CODE_SOMALI 106 #define IPMI_FRU_LANGUAGE_CODE_ALBANIAN 107 #define IPMI_FRU_LANGUAGE_CODE_SERBIAN 108 #define IPMI_FRU_LANGUAGE_CODE_SISWATI 109 #define IPMI_FRU_LANGUAGE_CODE_SESOTHO 110 #define IPMI_FRU_LANGUAGE_CODE_SUDANESE 111 #define IPMI_FRU_LANGUAGE_CODE_SWEDISH 112 #define IPMI_FRU_LANGUAGE_CODE_SWAHILI 113 #define IPMI_FRU_LANGUAGE_CODE_TAMIL 114 #define IPMI_FRU_LANGUAGE_CODE_TELUGU 115 /* Spec has "Tegulu", likely a typo */ #define IPMI_FRU_LANGUAGE_CODE_TEGULU IPMI_FRU_LANGUAGE_CODE_TELUGU #define IPMI_FRU_LANGUAGE_CODE_TAJIK 116 #define IPMI_FRU_LANGUAGE_CODE_THAI 117 #define IPMI_FRU_LANGUAGE_CODE_TIGRINYA 118 #define IPMI_FRU_LANGUAGE_CODE_TURKMEN 119 #define IPMI_FRU_LANGUAGE_CODE_TAGALOG 120 #define IPMI_FRU_LANGUAGE_CODE_SETSWANA 121 #define IPMI_FRU_LANGUAGE_CODE_TONGA 122 #define IPMI_FRU_LANGUAGE_CODE_TURKISH 123 #define IPMI_FRU_LANGUAGE_CODE_TSONGA 124 #define IPMI_FRU_LANGUAGE_CODE_TATAR 125 #define IPMI_FRU_LANGUAGE_CODE_TWI 126 #define IPMI_FRU_LANGUAGE_CODE_UKRANIAN 127 #define IPMI_FRU_LANGUAGE_CODE_URDU 128 #define IPMI_FRU_LANGUAGE_CODE_UZBEK 129 #define IPMI_FRU_LANGUAGE_CODE_VIETNAMESE 130 #define IPMI_FRU_LANGUAGE_CODE_VOLAPUK 131 #define IPMI_FRU_LANGUAGE_CODE_WOLOF 132 #define IPMI_FRU_LANGUAGE_CODE_XHOSA 133 #define IPMI_FRU_LANGUAGE_CODE_YORUBA 134 #define IPMI_FRU_LANGUAGE_CODE_CHINESE 135 #define IPMI_FRU_LANGUAGE_CODE_ZULU 136 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_FRU_LANGUAGE_CODE_VALID(__language_code) \ (((__language_code + 1) >= (IPMI_FRU_LANGUAGE_CODE_ENGLISH_LEGACY + 1) \ && (__language_code) <= IPMI_FRU_LANGUAGE_CODE_ZULU) ? 1 : 0) extern const char *const ipmi_fru_language_codes[]; #ifdef __cplusplus } #endif #endif /* IPMI_FRU_LANGUAGE_CODES_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h0000644002055400205540000000511313527331636030523 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IANA_ENTERPRISE_NUMBERS_SPEC_H #define IPMI_IANA_ENTERPRISE_NUMBERS_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Convenience macros, will be added as needed in code */ #define IPMI_IANA_ENTERPRISE_ID_IBM 2 #define IPMI_IANA_ENTERPRISE_ID_HP 11 #define IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS 42 #define IPMI_IANA_ENTERPRISE_ID_INTEL 343 #define IPMI_IANA_ENTERPRISE_ID_DELL 674 #define IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES 5593 #define IPMI_IANA_ENTERPRISE_ID_QUANTA 7244 #define IPMI_IANA_ENTERPRISE_ID_FUJITSU 10368 #define IPMI_IANA_ENTERPRISE_ID_PEPPERCON 10437 #define IPMI_IANA_ENTERPRISE_ID_SUPERMICRO 10876 #define IPMI_IANA_ENTERPRISE_ID_WISTRON 11161 #define IPMI_IANA_ENTERPRISE_ID_GIGABYTE 15370 #define IPMI_IANA_ENTERPRISE_ID_INVENTEC 20569 /* Workarounds for motherboards with invalid enterprise IDs */ #define IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND 47488 #define IPMI_IANA_ENTERPRISE_ID_MAX 47861 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_IANA_ENTERPRISE_ID_VALID(__iana_enterprise_id) \ (((__iana_enterprise_id + 1) >= (0 + 1) \ && (__iana_enterprise_id) <= IPMI_IANA_ENTERPRISE_ID_MAX) ? 1 : 0) #define IPMI_IANA_ENTERPRISE_ID_RECOGNIZED(__iana_enterprise_id) \ (IPMI_IANA_ENTERPRISE_ID_VALID((__iana_enterprise_id)) \ || (__iana_enterprise_id) == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND) /* Some fields can be NULL if they were not assigned/removed by IANA */ /* consider using ipmi_iana_enerprise_numbers_string() function to * handle some workaround situations this array will not have. */ extern const char *const ipmi_iana_enterprise_numbers[]; #ifdef __cplusplus } #endif #endif /* IPMI_IANA_ENTERPRISE_NUMBERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-ipmb-lun-spec.h0000644002055400205540000000370413527331636025513 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IPMB_LUN_SPEC_H #define IPMI_IPMB_LUN_SPEC_H #ifdef __cplusplus extern "C" { #endif /* BMC IPMI LUNs */ /* BMC commands and Event Request Messages: Event Request Messages received on this LUN are routed to the Event Receiver function in the BMC, and automatically logged if SEL logging is enabled */ #define IPMI_BMC_IPMB_LUN_BMC 0x00 /* OEM LUN 1: OEM reserved for BMC implementer / system integrator definition. */ #define IPMI_BMC_IPMB_LUN_OEM_LUN1 0x01 /* SMS Message LUN (Intended for messages to System Management Software): Messages received on this LUN are routed to the Receive Message Queue and retrieved using a Read Message command. The SMS_Avail flag is set whenever the Receive Message Queue has valid contents. */ #define IPMI_BMC_IPMB_LUN_SMS_MSG_LUN 0x02 /* OEM LUN 2: OEM reserved for BMC implementer / system integrator definition. */ #define IPMI_BMC_IPMB_LUN_OEM_LUN2 0x03 #define IPMI_BMC_LUN_VALID(__lun) \ (((__lun) == IPMI_BMC_IPMB_LUN_BMC \ || (__lun) == IPMI_BMC_IPMB_LUN_OEM_LUN1 \ || (__lun) == IPMI_BMC_IPMB_LUN_SMS_MSG_LUN \ || (__lun) == IPMI_BMC_IPMB_LUN_OEM_LUN2) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_IPMB_LUN_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h0000644002055400205540000000440613527331636033433 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_SPEC_H #define IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_MIN 0 #define IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_MAX 8 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_VALID(__manufacturer_continuation_codes) \ (((__manufacturer_continuation_codes + 1) >= (IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_MIN + 1) \ && (__manufacturer_continuation_codes) <= IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_MAX) ? 1 : 0) struct ipmi_jedec_manufacturer_id_pair { uint8_t id; char *str; }; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank1[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank2[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank3[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank4[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank5[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank6[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank7[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank8[]; extern const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank9[]; #ifdef __cplusplus } #endif #endif /* IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-lan-configuration-parameters-spec.h0000644002055400205540000001713113527331636031547 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CONFIGURATION_PARAMETERS_SPEC_H #define IPMI_LAN_CONFIGURATION_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_LAN_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 #define IPMI_LAN_CONFIGURATION_PARAMETER_AUTHENTICATION_TYPE_SUPPORT 1 #define IPMI_LAN_CONFIGURATION_PARAMETER_AUTHENTICATION_TYPE_ENABLES 2 #define IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS 3 #define IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS_SOURCE 4 #define IPMI_LAN_CONFIGURATION_PARAMETER_MAC_ADDRESS 5 #define IPMI_LAN_CONFIGURATION_PARAMETER_SUBNET_MASK 6 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV4_HEADER_PARAMETERS 7 #define IPMI_LAN_CONFIGURATION_PARAMETER_PRIMARY_RMCP_PORT_NUMBER 8 #define IPMI_LAN_CONFIGURATION_PARAMETER_SECONDARY_RMCP_PORT_NUMBER 9 #define IPMI_LAN_CONFIGURATION_PARAMETER_BMC_GENERATED_ARP_CONTROL 10 #define IPMI_LAN_CONFIGURATION_PARAMETER_GRATUITOUS_ARP_INTERVAL 11 #define IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_ADDRESS 12 #define IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_MAC_ADDRESS 13 #define IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_ADDRESS 14 #define IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_MAC_ADDRESS 15 #define IPMI_LAN_CONFIGURATION_PARAMETER_COMMUNITY_STRING 16 #define IPMI_LAN_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS 17 #define IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_TYPE 18 #define IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_ADDRESSES 19 #define IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_ID 20 #define IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_PRIORITY 21 #define IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_ENTRY_SUPPORT 22 #define IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_ENTRIES 23 #define IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_PRIVILEGE_LEVELS 24 #define IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_ADDRESS_VLAN_TAGS 25 #define IPMI_LAN_CONFIGURATION_PARAMETER_BAD_PASSWORD_THRESHOLD 26 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_IPV4_SUPPORT 50 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_IPV4_ADDRESSING_ENABLES 51 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_TRAFFIC_CLASS 52 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_HOP_LIMIT 53 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_FLOW_LABEL 54 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATUS 55 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ADDRESSES 56 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_STATIC_DUID_STORAGE_LENGTH 57 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_STATIC_DUIDS 58 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ADDRESS 59 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_DYNAMIC_DUID_STORAGE_LENGTH 60 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_DYNAMIC_DUIDS 61 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_TIMING_CONFIGURATION_SUPPORT 62 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_TIMING_AND_CONFIGURATION 63 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_ROUTER_ADDRESS_CONFIGURATION_CONTROL 64 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_IP_ADDRESS 65 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_MAC_ADDRESS 66 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_LENGTH 67 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_VALUE 68 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_IP_ADDRESS 69 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_MAC_ADDRESS 70 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_LENGTH 71 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_VALUE 72 #define IPMI_LAN_CONFIGURATION_PARAMETER_NUMBER_OF_DYNAMIC_ROUTER_INFO_SETS 73 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_IP_ADDRESS 74 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_MAC_ADDRESS 75 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_PREFIX_LENGTH 76 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_PREFIX_VALUE 77 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_RECEIVED_HOP_LIMIT 78 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_NEIGHBOR_DISCOVERY_SLAAC_TIMING_CONFIGURATION_SUPPORT 79 #define IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_NEIGHBOR_DISCOVERY_SLAAC_TIMING_CONFIGURATION 80 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_MIN 192 #define IPMI_LAN_CONFIGURATION_PARAMETER_OEM_MAX 255 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector) + 1) > (IPMI_LAN_CONFIGURATION_PARAMETER_SET_IN_PROGRESS + 1) \ && (__parameter_selector) <= IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_NEIGHBOR_DISCOVERY_SLAAC_TIMING_CONFIGURATION) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= IPMI_LAN_CONFIGURATION_PARAMETER_OEM_MIN \ && ((__parameter_selector) - 1) <= (IPMI_LAN_CONFIGURATION_PARAMETER_OEM_MAX - 1)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CONFIGURATION_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-lan-configuration-parameters-oem-spec.h0000644002055400205540000000211613527331636032322 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_SPEC_H #define IPMI_LAN_CONFIGURATION_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CONFIGURATION_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-netfn-spec.h0000644002055400205540000000713313527331636025102 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_SPEC_H #define IPMI_NETFN_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Notes: Refer to IPMIv1_5_rev1_1.pdf Table 5-1, Network Function Codes for complete description */ #define IPMI_NET_FN_CHASSIS_RQ 0x00 #define IPMI_NET_FN_CHASSIS_RS 0x01 #define IPMI_NET_FN_BRIDGE_RQ 0x02 #define IPMI_NET_FN_BRIDGE_RS 0x03 #define IPMI_NET_FN_SENSOR_EVENT_RQ 0x04 #define IPMI_NET_FN_SENSOR_EVENT_RS 0x05 #define IPMI_NET_FN_APP_RQ 0x06 #define IPMI_NET_FN_APP_RS 0x07 #define IPMI_NET_FN_FIRMWARE_RQ 0x08 #define IPMI_NET_FN_FIRMWARE_RS 0x09 #define IPMI_NET_FN_STORAGE_RQ 0x0A #define IPMI_NET_FN_STORAGE_RS 0x0B #define IPMI_NET_FN_TRANSPORT_RQ 0x0C #define IPMI_NET_FN_TRANSPORT_RS 0x0D #define IPMI_NET_FN_GROUP_EXTENSION_RQ 0x2C #define IPMI_NET_FN_GROUP_EXTENSION_RS 0x2D #define IPMI_NET_FN_OEM_GROUP_RQ 0x2E #define IPMI_NET_FN_OEM_GROUP_RS 0x2F #define IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP_MIN 0x30 #define IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP_MAX 0x3F #define IPMI_NET_FN_RQ_RS_MASK 0x1 #define IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_PICMG 0x00 #define IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DMTF 0x01 #define IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_SSI 0x02 #define IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_VITA 0x03 #define IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI 0xDC /* To avoid gcc warnings, add +1 in comparison */ /* Include checks for possible oem network functions */ #define IPMI_NET_FN_VALID(__net_fn) \ ((((__net_fn+1) >= IPMI_NET_FN_CHASSIS_RS \ && (__net_fn) <= IPMI_NET_FN_TRANSPORT_RS) \ || ((__net_fn) >= IPMI_NET_FN_GROUP_EXTENSION_RQ \ && (__net_fn) <= IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP_MAX)) ? 1 : 0) #define IPMI_NET_FN_RQ_VALID(__net_fn) \ ((IPMI_NET_FN_VALID (__net_fn) \ && (!((__net_fn) & IPMI_NET_FN_RQ_RS_MASK))) ? 1 : 0) #define IPMI_NET_FN_RS_VALID(__net_fn) \ ((IPMI_NET_FN_VALID (__net_fn) \ && ((__net_fn) & IPMI_NET_FN_RQ_RS_MASK)) ? 1 : 0) #define IPMI_NET_FN_GROUP_EXTENSION(__net_fn) \ (((__net_fn) == IPMI_NET_FN_GROUP_EXTENSION_RQ \ || (__net_fn) == IPMI_NET_FN_GROUP_EXTENSION_RS) ? 1 : 0) #define IPMI_NET_FN_OEM_GROUP(__net_fn) \ (((__net_fn) == IPMI_NET_FN_OEM_GROUP_RQ \ || (__net_fn) == IPMI_NET_FN_OEM_GROUP_RS) ? 1 : 0) #define IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP(__net_fn) \ (((__net_fn) >= IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP_MIN \ && (__net_fn) <= IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP_MAX) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-netfn-oem-spec.h0000644002055400205540000000256413527331636025663 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETFN_OEM_SPEC_H #define IPMI_NETFN_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-netfn-oem-spec.h header file is deprecated #include #include #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_NETFN_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h0000644002055400205540000000255213527331636024550 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_SPEC_H #define IPMI_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #warning ipmi-oem-spec.h header file is deprecated #include #include #include #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-pef-configuration-parameters-spec.h0000644002055400205540000000555513527331636031556 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PEF_CONFIGURATION_PARAMETERS_SPEC_H #define IPMI_PEF_CONFIGURATION_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_PEF_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 #define IPMI_PEF_CONFIGURATION_PARAMETER_PEF_CONTROL 1 #define IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ACTION_GLOBAL_CONTROL 2 #define IPMI_PEF_CONFIGURATION_PARAMETER_PEF_STARTUP_DELAY 3 #define IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ALERT_STARTUP_DELAY 4 #define IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_EVENT_FILTERS 5 #define IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE 6 #define IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE_DATA_1 7 #define IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_ALERT_POLICY_ENTRIES 8 #define IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_POLICY_TABLE 9 #define IPMI_PEF_CONFIGURATION_PARAMETER_SYSTEM_GUID 10 #define IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_ALERT_STRINGS 11 #define IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRING_KEYS 12 #define IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRINGS 13 #define IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_GROUP_CONTROL_TABLE_ENTRIES 14 #define IPMI_PEF_CONFIGURATION_PARAMETER_GROUP_CONTROL_TABLE 15 #define IPMI_PEF_CONFIGURATION_PARAMETER_OEM_MIN 96 #define IPMI_PEF_CONFIGURATION_PARAMETER_OEM_MAX 127 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector) + 1) > (IPMI_PEF_CONFIGURATION_PARAMETER_SET_IN_PROGRESS + 1) \ && (__parameter_selector) <= IPMI_PEF_CONFIGURATION_PARAMETER_GROUP_CONTROL_TABLE) ? 1 : 0) #define IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= IPMI_PEF_CONFIGURATION_PARAMETER_OEM_MIN \ && (__parameter_selector) <= IPMI_PEF_CONFIGURATION_PARAMETER_OEM_MAX) ? 1 : 0) #ifdef __cplusplus } #endif #endif freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-pef-configuration-parameters-oem-spec.h0000644002055400205540000000157213527331636032327 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PEF_CONFIGURATION_PARAMETERS_OEM_SPEC_H #define IPMI_PEF_CONFIGURATION_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-privilege-level-spec.h0000644002055400205540000000400513527331636027056 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PRIVILEGE_LEVEL_SPEC_H #define IPMI_PRIVILEGE_LEVEL_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_PRIVILEGE_LEVEL_RESERVED 0x00 #define IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL 0x00 /* IPMI 2.0 */ #define IPMI_PRIVILEGE_LEVEL_UNSPECIFIED 0x00 /* RMCP+ Cipher Suite Priv Config */ #define IPMI_PRIVILEGE_LEVEL_CALLBACK 0x01 #define IPMI_PRIVILEGE_LEVEL_USER 0x02 #define IPMI_PRIVILEGE_LEVEL_OPERATOR 0x03 #define IPMI_PRIVILEGE_LEVEL_ADMIN 0x04 #define IPMI_PRIVILEGE_LEVEL_OEM 0x05 #define IPMI_PRIVILEGE_LEVEL_NO_ACCESS 0x0F #define IPMI_PRIVILEGE_LEVEL_VALID(__privilege_level) \ (((__privilege_level) == IPMI_PRIVILEGE_LEVEL_CALLBACK \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_USER \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OPERATOR \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_ADMIN \ || (__privilege_level) == IPMI_PRIVILEGE_LEVEL_OEM) ? 1 : 0) #define IPMI_1_5_PRIVILEGE_LEVEL_VALID(__privilege_level) \ IPMI_PRIVILEGE_LEVEL_VALID (__privilege_level) #define IPMI_2_0_PRIVILEGE_LEVEL_VALID(__privilege_level) \ (((__privilege_level) == IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL \ || IPMI_PRIVILEGE_LEVEL_VALID (__privilege_level)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_PRIVILEGE_LEVEL_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h0000644002055400205540000003235013527331636026041 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PRODUCT_ID_SPEC_H #define IPMI_PRODUCT_ID_SPEC_H #ifdef __cplusplus extern "C" { #endif /******************************************* * Dell * *******************************************/ /* achu: I believe 256 to be the poweredge "family" of products, but * I'm not sure. At minimum, it covers the 2900, 2950, R610, and * R710. */ #define IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE 256 #define IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE #define IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE #define IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE #define IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE #define IPMI_DELL_PRODUCT_ID_POWEREDGE_R720 IPMI_DELL_PRODUCT_ID_POWEREDGE_BASE /* achu: 0 doesn't seem right? Did the manufacturer not burn the * right ID in? */ #define IPMI_DELL_PRODUCT_ID_POWEREDGE_C410X 0 /******************************************* * Fujitsu * *******************************************/ /* * Fujitsu Siemens Computers * Fujitsu Technology Solutions * iRMC S1 / iRMC S2 */ #define IPMI_FUJITSU_PRODUCT_ID_MIN 0x0200 #define IPMI_FUJITSU_PRODUCT_ID_MAX 0x05FF // iRMC-S1 based systems #define IPMI_FUJITSU_PRODUCT_ID_TX200S3 0x0200 #define IPMI_FUJITSU_PRODUCT_ID_TX300S3 0x0201 #define IPMI_FUJITSU_PRODUCT_ID_RX200S3 0x0202 #define IPMI_FUJITSU_PRODUCT_ID_RX300S3 0x0203 #define IPMI_FUJITSU_PRODUCT_ID_UNUSEDS3 0x0204 #define IPMI_FUJITSU_PRODUCT_ID_RX100S4 0x0205 #define IPMI_FUJITSU_PRODUCT_ID_TX150S5 0x0206 #define IPMI_FUJITSU_PRODUCT_ID_TX120S1 0x0207 #define IPMI_FUJITSU_PRODUCT_ID_BX630S2 0x0208 #define IPMI_FUJITSU_PRODUCT_ID_RX330S1 0x0209 #define IPMI_FUJITSU_PRODUCT_ID_E230RN1 0x0210 #define IPMI_FUJITSU_PRODUCT_ID_E230RSL 0x0211 #define IPMI_FUJITSU_PRODUCT_ID_RX330S1_SHA 0x0212 #define IPMI_FUJITSU_PRODUCT_ID_BX630S2_SHA 0x0213 #define IPMI_FUJITSU_PRODUCT_ID_IS_IRMC_S1(__product_id) \ (((__product_id) == IPMI_FUJITSU_PRODUCT_ID_TX200S3 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_TX300S3 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_RX200S3 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_RX300S3 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_UNUSEDS3 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_RX100S4 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_TX150S5 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_TX120S1 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_BX630S2 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_RX330S1 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_E230RN1 \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_E230RSL \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_RX330S1_SHA \ || (__product_id) == IPMI_FUJITSU_PRODUCT_ID_BX630S2_SHA) ? 1 : 0) // iRMC-S2 based systems #define IPMI_FUJITSU_PRODUCT_ID_RX600S4 0x0218 #define IPMI_FUJITSU_PRODUCT_ID_TX200S4 0x0220 #define IPMI_FUJITSU_PRODUCT_ID_TX300S4 0x0221 #define IPMI_FUJITSU_PRODUCT_ID_RX200S4 0x0222 #define IPMI_FUJITSU_PRODUCT_ID_RX300S4 0x0223 #define IPMI_FUJITSU_PRODUCT_ID_UNUSEDS4 0x0224 #define IPMI_FUJITSU_PRODUCT_ID_RX100S5 0x0225 #define IPMI_FUJITSU_PRODUCT_ID_TX150S6 0x0226 #define IPMI_FUJITSU_PRODUCT_ID_TX120S2 0x0227 #define IPMI_FUJITSU_PRODUCT_ID_TX150S6_64K 0x0233 #define IPMI_FUJITSU_PRODUCT_ID_TX200S4_64K 0x0234 #define IPMI_FUJITSU_PRODUCT_ID_TX300S4_64K 0x0235 #define IPMI_FUJITSU_PRODUCT_ID_TX200S5 0x0240 #define IPMI_FUJITSU_PRODUCT_ID_TX300S5 0x0241 #define IPMI_FUJITSU_PRODUCT_ID_RX200S5 0x0242 #define IPMI_FUJITSU_PRODUCT_ID_RX300S5 0x0243 #define IPMI_FUJITSU_PRODUCT_ID_BX620S5 0x0244 #define IPMI_FUJITSU_PRODUCT_ID_RX100S6 0x0245 #define IPMI_FUJITSU_PRODUCT_ID_TX150S7 0x0246 #define IPMI_FUJITSU_PRODUCT_ID_BX960S1 0x0254 #define IPMI_FUJITSU_PRODUCT_ID_BX924S1 0x0255 #define IPMI_FUJITSU_PRODUCT_ID_BX920S1 0x0256 #define IPMI_FUJITSU_PRODUCT_ID_BX922S1 0x0257 #define IPMI_FUJITSU_PRODUCT_ID_RX600S5 0x0258 #define IPMI_FUJITSU_PRODUCT_ID_TX200S6 0x0260 #define IPMI_FUJITSU_PRODUCT_ID_TX300S6 0x0261 #define IPMI_FUJITSU_PRODUCT_ID_RX200S6 0x0262 #define IPMI_FUJITSU_PRODUCT_ID_RX300S6 0x0263 /******************************************* * HP * *******************************************/ #define IPMI_HP_PRODUCT_ID_PROLIANT_DL160_G8 8192 /******************************************* * Intel * *******************************************/ #define IPMI_INTEL_PRODUCT_ID_SR870BN4 256 #define IPMI_INTEL_PRODUCT_ID_TIGER4 IPMI_INTEL_PRODUCT_ID_SR870BN4 #define IPMI_INTEL_PRODUCT_ID_S5500WB 62 #define IPMI_INTEL_PRODUCT_ID_SR1625 62 /* Quanta motherboard, but listed under a Intel manufacturer ID, why?? */ #define IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R 64 #define IPMI_INTEL_PRODUCT_ID_S2600JF 77 #define IPMI_INTEL_PRODUCT_ID_S2600GZ 73 #define IPMI_INTEL_PRODUCT_ID_S2600WP 78 #define IPMI_INTEL_PRODUCT_ID_S5000PAL 40 #define IPMI_INTEL_PRODUCT_ID_WINDMILL 2818 #define IPMI_INTEL_PRODUCT_ID_S2600KP 111 #define IPMI_INTEL_PRODUCT_ID_S2600KPR 112 #define IPMI_INTEL_PRODUCT_ID_S2600WT2 112 #define IPMI_INTEL_PRODUCT_ID_S2600WTT 112 /* * Intel derived */ #define IPMI_CALIFORNIA_DIGITAL_PRODUCT_ID_6440 IPMI_INTEL_PRODUCT_ID_SR870BN4 #define IPMI_PENGUIN_COMPUTING_PRODUCT_ID_RELION_700 IPMI_INTEL_PRODUCT_ID_S5500WB #define IPMI_APPRO_PRODUCT_ID_512X IPMI_INTEL_PRODUCT_ID_S2600JF #define IPMI_APPRO_PRODUCT_ID_QG812X_CN IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R #define IPMI_QUANTA_PRODUCT_ID_WINTERFELL IPMI_INTEL_PRODUCT_ID_WINDMILL #define IPMI_WIWYNN_PRODUCT_ID_WINDMILL IPMI_INTEL_PRODUCT_ID_WINDMILL /******************************************* * IBM * *******************************************/ #define IPMI_IBM_PRODUCT_ID_X3455 20566 #define IPMI_IBM_PRODUCT_ID_X3755 14 /******************************************* * Inventec * *******************************************/ #define IPMI_INVENTEC_PRODUCT_ID_5441 51 #define IPMI_INVENTEC_PRODUCT_ID_5442 52 /* * Inventec derived */ #define IPMI_DELL_PRODUCT_ID_XANADU_II IPMI_INVENTEC_PRODUCT_ID_5441 #define IPMI_DELL_PRODUCT_ID_XANADU_III IPMI_INVENTEC_PRODUCT_ID_5442 /******************************************* * Gigabyte * *******************************************/ #define IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB 266 #define IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB 280 /* * Gigabyte derived */ #define IPMI_PENGUIN_COMPUTING_PRODUCT_ID_RELION_X1904GT IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB /******************************************* * Quanta * *******************************************/ #define IPMI_QUANTA_PRODUCT_ID_S99Q 21401 /* * Quanta derived */ #define IPMI_DELL_PRODUCT_ID_FS12_TY IPMI_QUANTA_PRODUCT_ID_S99Q /******************************************* * Sun Microsystems * *******************************************/ #define IPMI_SUN_MICROSYSTEMS_PRODUCT_ID_X4140 18177 /******************************************* * Supermicro * *******************************************/ /* Seen in the wild w/ Peppercon IANA number 10437 */ /* achu: there is no product name pattern here, what gives Supermicro? */ #define IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE 4 #define IPMI_SUPERMICRO_PRODUCT_ID_X7DBR_3 IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X7DB8 IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTN IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X7SBI_LN4 IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 IPMI_SUPERMICRO_PRODUCT_ID_X7DBR_3 #define IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DB8 IPMI_SUPERMICRO_PRODUCT_ID_X7DB8 #define IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X8DTN IPMI_SUPERMICRO_PRODUCT_ID_X8DTN #define IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7SBI_LN4 IPMI_SUPERMICRO_PRODUCT_ID_X7SBI_LN4 /* Seen in the wild w/ Supermicro workaround IANA number 47488 */ #define IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE 43707 #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTH IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTG IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTU IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE /* achu: X8DTU-6+, why not same as above? Not sure, possibly created * specifically for vendor or vendor changed for themselves. */ #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS 1549 #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE 6 #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTL IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F 1541 #define IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE 1572 #define IPMI_SUPERMICRO_PRODUCT_ID_X9SCL IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X9SCM IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F 1551 #define IPMI_SUPERMICRO_PRODUCT_ID_X8SIE 1037 #define IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O 1585 #define IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F 43025 #define IPMI_SUPERMICRO_PRODUCT_ID_H8DG6 48145 #define IPMI_SUPERMICRO_PRODUCT_ID_H8DGU 4520 #define IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS 1574 #define IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F 42769 /* Seen in the wild w/ proper IANA number 10876 */ /* defined above: IPMI_SUPERMICRO_PRODUCT_ID_X9SCM */ #define IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F 1576 #define IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O 1603 #define IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF 1600 /* Seen in the wild w/ Magnum Technologies IANA number 5593 */ #define IPMI_SUPERMICRO_PRODUCT_ID_MAGNUM_TECHNOLOGIES_X8DTL IPMI_SUPERMICRO_PRODUCT_ID_X8DTL #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_BASE 2201 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRH IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_LN4 IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_BASE 2148 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_E IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_N IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_BASE 1832 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRI IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_T IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10SL_BASE 2051 #define IPMI_SUPERMICRO_PRODUCT_ID_X10SLH_F IPMI_SUPERMICRO_PRODUCT_ID_X10SL_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10SLMPLUS_F IPMI_SUPERMICRO_PRODUCT_ID_X10SL_BASE #define IPMI_SUPERMICRO_PRODUCT_ID_X10SLL_F 2049 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRL_I 2097 #define IPMI_SUPERMICRO_PRODUCT_ID_X10SLM_F 2065 #define IPMI_SUPERMICRO_PRODUCT_ID_X10SRW_F 2099 #define IPMI_SUPERMICRO_PRODUCT_ID_X10SRI_F 2100 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_I 2081 #define IPMI_SUPERMICRO_PRODUCT_ID_X10SRL_F 2098 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DDW_I 2117 #define IPMI_SUPERMICRO_PRODUCT_ID_X10DRG_HT 2115 /******************************************* * Wistron * *******************************************/ /* achu: don't know original product name, so just using C6220. * Will readjust as needed if learned later. */ #define IPMI_WISTRON_PRODUCT_ID_C6220 131 /* * Wistron derived */ #define IPMI_DELL_PRODUCT_ID_POWEREDGE_C6220 IPMI_WISTRON_PRODUCT_ID_C6220 #ifdef __cplusplus } #endif #endif /* IPMI_PRODUCT_ID_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-rmcpplus-status-spec.h0000644002055400205540000001161313527331636027154 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_STATUS_SPEC_H #define IPMI_RMCPPLUS_STATUS_SPEC_H #ifdef __cplusplus extern "C" { #endif /* RMCP+ and RAKP Message Status Codes -------------------------------- */ #define RMCPPLUS_STATUS_NO_ERRORS 0x00 #define RMCPPLUS_STATUS_NO_ERRORS_STR \ "No errors." #define RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION 0x01 #define RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_STR \ "Insufficient resources to create a session." #define RMCPPLUS_STATUS_INVALID_SESSION_ID 0x02 #define RMCPPLUS_STATUS_INVALID_SESSION_ID_STR \ "Invalid Session ID." #define RMCPPLUS_STATUS_INVALID_PAYLOAD_TYPE 0x03 #define RMCPPLUS_STATUS_INVALID_PAYLOAD_TYPE_STR \ "Invalid payload type." #define RMCPPLUS_STATUS_INVALID_AUTHENTICATION_ALGORITHM 0x04 #define RMCPPLUS_STATUS_INVALID_AUTHENTICATION_ALGORITHM_STR \ "Invalid authentication algorithm." #define RMCPPLUS_STATUS_INVALID_INTEGRITY_ALGORITHM 0x05 #define RMCPPLUS_STATUS_INVALID_INTEGRITY_ALGORITHM_STR \ "Invalid integrity algorithm." #define RMCPPLUS_STATUS_NO_MATCHING_AUTHENTICATION_PAYLOAD 0x06 #define RMCPPLUS_STATUS_NO_MATCHING_AUTHENTICATION_PAYLOAD_STR \ "No matching authentication payload." #define RMCPPLUS_STATUS_NO_MATCHING_INTEGRITY_PAYLOAD 0x07 #define RMCPPLUS_STATUS_NO_MATCHING_INTEGRITY_PAYLOAD_STR \ "No mathing integrity payload." #define RMCPPLUS_STATUS_INACTIVE_SESSION_ID 0x08 #define RMCPPLUS_STATUS_INACTIVE_SESSION_ID_STR \ "Inactive Session ID" #define RMCPPLUS_STATUS_INVALID_ROLE 0x09 #define RMCPPLUS_STATUS_INVALID_ROLE_STR \ "Invalid role." #define RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED 0x0A #define RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED_STR \ "Unauthorized role or privelege level requested." #define RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME 0x0B #define RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME_STR \ "Insufficient resources to create a session at the requested time." #define RMCPPLUS_STATUS_INVALID_NAME_LENGTH 0x0C #define RMCPPLUS_STATUS_INVALID_NAME_LENGTH_STR \ "Invalid name length." #define RMCPPLUS_STATUS_UNAUTHORIZED_NAME 0x0D #define RMCPPLUS_STATUS_UNAUTHORIZED_NAME_STR \ "Unauthorized name." #define RMCPPLUS_STATUS_UNAUTHORIZED_GUID 0x0E #define RMCPPLUS_STATUS_UNAUTHORIZED_GUID_STR \ "Unauthorized GUID. (GUID that BMC submitted in " \ "RAKP Message 2 was not accepted by remote console)." #define RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE 0x0F #define RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE_STR \ "Invalid integrity check value." #define RMCPPLUS_STATUS_INVALID_CONFIDENTIALITY_ALGORITHM 0x10 #define RMCPPLUS_STATUS_INVALID_CONFIDENTIALITY_ALGORITHM_STR \ "Invalid confidentiality algorithm." #define RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS 0x11 #define RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS_STR \ "No Cipher Suite match with proposed security algorithms." #define RMCPPLUS_STATUS_ILLEGAL_OR_UNRECOGNIZED_PARAMETER 0x12 #define RMCPPLUS_STATUS_ILLEGAL_OR_UNRECOGNIZED_PARAMETER_STR \ "Illegal or Unrecognized parameter." /* Reserved - all others */ /* To avoid gcc warnings, add +1 in comparison */ #define RMCPPLUS_STATUS_VALID(__status) \ (((__status + 1) >= RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION \ && (__status) <= RMCPPLUS_STATUS_ILLEGAL_OR_UNRECOGNIZED_PARAMETER) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_STATUS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h0000644002055400205540000020560513527331636031344 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_SPEC_H #ifdef __cplusplus extern "C" { #endif #include /************************************************ * Generic Event Reading Type Code Offsets * ************************************************/ #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_NON_CRITICAL_GOING_LOW 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_NON_CRITICAL_GOING_HIGH 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_CRITICAL_GOING_LOW 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_CRITICAL_GOING_HIGH 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_NON_RECOVERABLE_GOING_LOW 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_LOWER_NON_RECOVERABLE_GOING_HIGH 0x05 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_NON_CRITICAL_GOING_LOW 0x06 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_NON_CRITICAL_GOING_HIGH 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_CRITICAL_GOING_LOW 0x08 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_CRITICAL_GOING_HIGH 0x09 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_NON_RECOVERABLE_GOING_LOW 0x0A #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_THRESHOLD_UPPER_NON_RECOVERABLE_GOING_HIGH 0x0B #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_STATE_TRANSITION_TO_IDLE 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_STATE_TRANSITION_TO_ACTIVE 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_STATE_TRANSITION_TO_BUSY 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_DEASSERTED 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE_DEASSERTED 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE_ASSERTED 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_LIMIT_NOT_EXCEEDED 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_LIMIT_EXCEEDED 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_PERFORMANCE_MET 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_PERFORMANCE_LAGS 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_OK 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_CRITICAL_FROM_OK 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_CRITICAL_FROM_LESS_SEVERE 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_RECOVERABLE_FROM_LESS_SEVERE 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_CRITICAL_FROM_MORE_SEVERE 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_CRITICAL_FROM_NON_RECOVERABLE 0x05 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_RECOVERABLE 0x06 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_MONITOR 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_INFORMATIONAL 0x08 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_PRESENT_DEVICE_PRESENT 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_PRESENT_DEVICE_ABSENT 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_RUNNING 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_IN_TEST 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_POWER_OFF 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_ON_LINE 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_OFF_LINE 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_OFF_DUTY 0x05 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_DEGRADED 0x06 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_TRANSITION_TO_POWER_SAVE 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY_INSTALL_ERROR 0x08 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_REDUNDANT 0x03 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_INSUFFICIENT_RESOURCES 0x04 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_NON_REDUNDANT_INSUFFICIENT_RESOURCES 0x05 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED_FROM_FULLY_REDUNDANT 0x06 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED_FROM_NON_REDUNDANT 0x07 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE_D0_POWER_STATE 0x00 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE_D1_POWER_STATE 0x01 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE_D2_POWER_STATE 0x02 #define IPMI_GENERIC_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE_D3_POWER_STATE 0x03 /* * String arrays for above */ extern const char * const ipmi_generic_event_reading_type_code_threshold[]; extern unsigned int ipmi_generic_event_reading_type_code_threshold_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_state[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_state_max_index; extern const char * const ipmi_generic_event_reading_type_code_state[]; extern unsigned int ipmi_generic_event_reading_type_code_state_max_index; extern const char * const ipmi_generic_event_reading_type_code_predictive_failure[]; extern unsigned int ipmi_generic_event_reading_type_code_predictive_failure_max_index; extern const char * const ipmi_generic_event_reading_type_code_limit[]; extern unsigned int ipmi_generic_event_reading_type_code_limit_max_index; extern const char * const ipmi_generic_event_reading_type_code_performance[]; extern unsigned int ipmi_generic_event_reading_type_code_performance_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_severity[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_severity_max_index; extern const char * const ipmi_generic_event_reading_type_code_device_present[]; extern unsigned int ipmi_generic_event_reading_type_code_device_present_max_index; extern const char * const ipmi_generic_event_reading_type_code_device_enabled[]; extern unsigned int ipmi_generic_event_reading_type_code_device_enabled_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_availability[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_availability_max_index; extern const char * const ipmi_generic_event_reading_type_code_redundancy[]; extern unsigned int ipmi_generic_event_reading_type_code_redundancy_max_index; extern const char * const ipmi_generic_event_reading_type_code_acpi_power_state[]; extern unsigned int ipmi_generic_event_reading_type_code_acpi_power_state_max_index; /* * "short" arrays are same strings, but shortened to more reasonble lengths for output */ extern const char * const ipmi_generic_event_reading_type_code_threshold_short[]; extern unsigned int ipmi_generic_event_reading_type_code_threshold_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_state_short[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_state_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_state_short[]; extern unsigned int ipmi_generic_event_reading_type_code_state_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_predictive_failure_short[]; extern unsigned int ipmi_generic_event_reading_type_code_predictive_failure_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_limit_short[]; extern unsigned int ipmi_generic_event_reading_type_code_limit_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_performance_short[]; extern unsigned int ipmi_generic_event_reading_type_code_performance_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_severity_short[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_severity_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_device_present_short[]; extern unsigned int ipmi_generic_event_reading_type_code_device_present_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_device_enabled_short[]; extern unsigned int ipmi_generic_event_reading_type_code_device_enabled_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_transition_availability_short[]; extern unsigned int ipmi_generic_event_reading_type_code_transition_availability_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_redundancy_short[]; extern unsigned int ipmi_generic_event_reading_type_code_redundancy_short_max_index; extern const char * const ipmi_generic_event_reading_type_code_acpi_power_state_short[]; extern unsigned int ipmi_generic_event_reading_type_code_acpi_power_state_short_max_index; /************************************************ * Sensor Type Code Offsets * ************************************************/ #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_GENERAL_CHASSIS_INTRUSION 0x00 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_DRIVE_BAY_INTRUSION 0x01 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_IO_CARD_AREA_INTRUSION 0x02 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_PROCESSOR_AREA_INTRUSION 0x03 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_LAN_LEASH_LOST 0x04 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_UNAUTHORIZED_DOCK 0x05 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_FAN_AREA_INTRUSION 0x06 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_SECURE_MODE_VIOLATION_ATTEMPT 0x00 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_USER_PASSWORD 0x01 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_ATTEMPT_SETUP_PASSWORD 0x02 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_NETWORK_BOOT_PASSWORD 0x03 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OTHER_PRE_BOOT_PASSWORD_VIOLATION 0x04 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OUT_OF_BAND_ACCESS_PASSWORD_VIOLATION 0x05 #define IPMI_SENSOR_TYPE_PROCESSOR_IERR 0x00 #define IPMI_SENSOR_TYPE_PROCESSOR_THERMAL_TRIP 0x01 #define IPMI_SENSOR_TYPE_PROCESSOR_FRB1_BIST_FAILURE 0x02 #define IPMI_SENSOR_TYPE_PROCESSOR_FRB2_HANG_IN_POST_FAILURE 0x03 #define IPMI_SENSOR_TYPE_PROCESSOR_FRB3_PROCESSOR_STARTUP_INITIALIZATION_FAILURE 0x04 #define IPMI_SENSOR_TYPE_PROCESSOR_CONFIGURATION_ERROR 0x05 #define IPMI_SENSOR_TYPE_PROCESSOR_SMBIOS_UNCORRECTABLE_CPU_COMPLEX_ERROR 0x06 #define IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_PRESENCE_DETECTED 0x07 #define IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_DISABLED 0x08 #define IPMI_SENSOR_TYPE_PROCESSOR_TERMINATOR_PRESENCE_DETECTED 0x09 #define IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED 0x0A #define IPMI_SENSOR_TYPE_PROCESSOR_MACHINE_CHECK_EXCEPTION 0x0B #define IPMI_SENSOR_TYPE_PROCESSOR_CORRECTABLE_MACHINE_CHECK_ERROR 0x0C #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PRESENCE_DETECTED 0x00 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_AC_DC 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_OR_OUT_OF_RANGE 0x04 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_INPUT_OUT_OF_RANGE_BUT_PRESENT 0x05 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR 0x06 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_INACTIVE 0x07 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_VENDOR_MISMATCH 0x00 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_REVISION_MISMATCH 0x01 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_PROCESSOR_MISSING 0x02 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_POWER_SUPPLY_RATING_MISMATCH 0x03 #define IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_VOLTAGE_RATING_MISMATCH 0x04 #define IPMI_SENSOR_TYPE_POWER_UNIT_POWER_OFF_POWER_DOWN 0x00 #define IPMI_SENSOR_TYPE_POWER_UNIT_POWER_CYCLE 0x01 #define IPMI_SENSOR_TYPE_POWER_UNIT_240VA_POWER_DOWN 0x02 #define IPMI_SENSOR_TYPE_POWER_UNIT_INTERLOCK_POWER_DOWN 0x03 #define IPMI_SENSOR_TYPE_POWER_UNIT_AC_LOST 0x04 #define IPMI_SENSOR_TYPE_POWER_UNIT_SOFT_POWER_CONTROL_FAILURE 0x05 #define IPMI_SENSOR_TYPE_POWER_UNIT_POWER_UNIT_FAILURE_DETECTED 0x06 #define IPMI_SENSOR_TYPE_POWER_UNIT_PREDICTIVE_FAILURE 0x07 #define IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR 0x00 #define IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR 0x01 #define IPMI_SENSOR_TYPE_MEMORY_PARITY 0x02 #define IPMI_SENSOR_TYPE_MEMORY_MEMORY_SCRUB_FAILED 0x03 #define IPMI_SENSOR_TYPE_MEMORY_MEMORY_DEVICE_DISABLED 0x04 #define IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED 0x05 #define IPMI_SENSOR_TYPE_MEMORY_PRESENCE_DETECTED 0x06 #define IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR 0x07 #define IPMI_SENSOR_TYPE_MEMORY_SPARE 0x08 #define IPMI_SENSOR_TYPE_MEMORY_MEMORY_AUTOMATICALLY_THROTTLED 0x09 #define IPMI_SENSOR_TYPE_MEMORY_CRITICAL_OVERTEMPERATURE 0x0A #define IPMI_SENSOR_TYPE_DRIVE_SLOT_DRIVE_PRESENCE 0x00 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_DRIVE_FAULT 0x01 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_PREDICTIVE_FAILURE 0x02 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_HOT_SPARE 0x03 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_CONSISTENCY_CHECK_PARITY_CHECK_IN_PROGRESS 0x04 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_IN_CRITICAL_ARRAY 0x05 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_IN_FAILED_ARRAY 0x06 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_REBUILD_REMAP_IN_PROGRESS 0x07 #define IPMI_SENSOR_TYPE_DRIVE_SLOT_REBUILD_REMAP_ABORTED 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_HANG 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_PROGRESS 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNSPECIFIED 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_NO_SYSTEM_MEMORY 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_NO_USABLE_SYSTEM_MEMORY 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_HARD_DISK_ATPI_IDE_DEVICE_FAILURE 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_SYSTEM_BOARD_FAILURE 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_DISKETTE_SUBSYSTEM_FAILURE 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_HARD_DISK_CONTROLLER_FAILURE 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_PS2_OR_USB_KEYBOARD_FAILURE 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_REMOVABLE_BOOT_MEDIA_NOT_FOUND 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_UNRECOVERABLE_VIDEO_CONTROLLER_FAILURE 0x09 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_NO_VIDEO_DEVICE_DETECTED 0x0A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_FIRMWARE_ROM_CORRUPTION_DETECTED 0x0B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_CPU_VOLTAGE_MISMATCH 0x0C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_ERROR_CPU_SPEED_MATCHING_FAILURE 0x0D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_UNSPECIFIED 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_MEMORY_INITIALIZATION 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_HARD_DISK_INITIALIZATION 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_SECONDARY_PROCESSORS_INITIALIZATION 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_USER_AUTHENTICATION 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_USER_INITIATED_SYSTEM_SETUP 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_USB_RESOURCE_CONFIGURATION 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_PCI_RESOURCE_CONFIGURATION 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_OPTION_ROM_INITIALIZATION 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_VIDEO_INITIALIZATION 0x09 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_CACHE_INITIALIZATION 0x0A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_SM_BUS_INITIALIZATION 0x0B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_KEYBOARD_CONTROLLER_INITIALIZATION 0x0C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_EMBEDDED_CONTROLLER_MANAGEMENT_CONTROLLER_INITIALIZATION 0x0D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_DOCKING_STATION_ATTACHMENT 0x0E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_ENABLING_DOCKING_STATION 0x0F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_DOCKING_STATION_EJECTION 0x10 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_DISABLING_DOCKING_STATION 0x11 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_CALLING_OPERATING_SYSTEM_WAKE_UP_VECTOR 0x12 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_STARTING_OPERATING_SYSTEM_BOOT_PROCESS 0x13 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_BASEBOARD_OR_MOTHERBOARD_INITIALIZATION 0x14 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_RESERVED 0x15 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_FLOPPY_INITIALIZATION 0x16 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_KEYBOARD_TEST 0x17 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_POINTING_DEVICE_TEST 0x18 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_HANG_PRIMARY_PROCESSOR_INITIALIZATION 0x19 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_UNSPECIFIED 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_MEMORY_INITIALIZATION 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_HARD_DISK_INITIALIZATION 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_SECONDARY_PROCESSORS_INITIALIZATION 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_USER_AUTHENTICATION 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_USER_INITIATED_SYSTEM_SETUP 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_USB_RESOURCE_CONFIGURATION 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_PCI_RESOURCE_CONFIGURATION 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_OPTION_ROM_INITIALIZATION 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_VIDEO_INITIALIZATION 0x09 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_CACHE_INITIALIZATION 0x0A #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_SM_BUS_INITIALIZATION 0x0B #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_KEYBOARD_CONTROLLER_INITIALIZATION 0x0C #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_EMBEDDED_CONTROLLER_MANAGEMENT_CONTROLLER_INITIALIZATION 0x0D #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_DOCKING_STATION_ATTACHMENT 0x0E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_ENABLING_DOCKING_STATION 0x0F #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_DOCKING_STATION_EJECTION 0x10 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_DISABLING_DOCKING_STATION 0x11 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_CALLING_OPERATING_SYSTEM_WAKE_UP_VECTOR 0x12 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_STARTING_OPERATING_SYSTEM_BOOT_PROCESS 0x13 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_BASEBOARD_OR_MOTHERBOARD_INITIALIZATION 0x14 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_RESERVED 0x15 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_FLOPPY_INITIALIZATION 0x16 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_KEYBOARD_TEST 0x17 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_POINTING_DEVICE_TEST 0x18 #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA2_OFFSET_SYSTEM_FIRMWARE_PROGRESS_PRIMARY_PROCESSOR_INITIALIZATION 0x19 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED 0x00 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_TYPE_LOGGING_DISABLED 0x01 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_LOG_AREA_RESET_CLEARED 0x02 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_ALL_EVENT_LOGGING_DISABLED 0x03 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_SEL_FULL 0x04 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_SEL_ALMOST_FULL 0x05 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED 0x06 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_EVENT_TYPE_LOGGING_DISABLED_DEASSERTION_EVENT 0x0 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_EVENT_TYPE_LOGGING_DISABLED_ASSERTION_EVENT 0x1 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_EVENT_TYPE_LOGGING_DISABLED_LOGGING_HAS_BEEN_DISABLED_FOR_ALL_EVENTS_OF_A_GIVEN_TYPE 0x1 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED_ENTITY_INSTANCE_NUMBER 0x0 #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED_VENDOR_SPECIFIC_PROCESSOR_NUMBER 0x1 #define IPMI_SENSOR_TYPE_WATCHDOG1_BIOS_WATCHDOG_RESET 0x00 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_RESET 0x01 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_SHUT_DOWN 0x02 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_POWER_DOWN 0x03 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_POWER_CYCLE 0x04 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_NMI_DIAGNOSTIC_INTERRUPT 0x05 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_EXPIRED_STATUS_ONLY 0x06 #define IPMI_SENSOR_TYPE_WATCHDOG1_OS_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NON_NMI 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_SYSTEM_RECONFIGURED 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_UNDETERMINED_SYSTEM_HARDWARE_FAILURE 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_ENTRY_ADDED_TO_AUXILIARY_LOG 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_PEF_ACTION 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_TIMESTAMP_CLOCK_SYNCH 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_ENTRY_ADDED 0x0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_ENTRY_ADDED_BECAUSE_EVENT_DID_NOT_BE_MAP_TO_STANDARD_IPMI_EVENT 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_ENTRY_ADDED_ALONG_WITH_ONE_OR_MORE_CORRESPONDING_SEL_ENTRIES 0x2 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_LOG_CLEARED 0x3 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_LOG_DISABLED 0x4 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_ENTRY_ACTION_LOG_ENABLED 0x5 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_TYPE_MCA 0x0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_TYPE_OEM1 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_ENTRY_ADDED_TO_AUXILIARY_LOG_LOG_TYPE_OEM2 0x2 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_ALERT 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_POWER_OFF 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_RESET 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_POWER_CYCLE 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_OEM_ACTION 0x10 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_PEF_ACTION_BITMASK_DIAGNOSTIC_INTERRUPT 0x20 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_TIMESTAMP_CLOCK_SYNCH_EVENT_IS_FIRST_OF_PAIR 0x0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_TIMESTAMP_CLOCK_SYNCH_EVENT_IS_SECOND_OF_PAIR 0x1 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_TIMESTAMP_CLOCK_SYNCH_SEL_TIMESTAMP_CLOCK_UPDATED 0x0 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OFFSET_TIMESTAMP_CLOCK_SYNCH_SDR_TIMESTAMP_CLOCK_UPDATED 0x1 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_FRONT_PANEL_NMI_DIAGNOSTIC_INTERRUPT 0x00 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_TIMEOUT 0x01 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_IO_CHANNEL_CHECK_NMI 0x02 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_SOFTWARE_NMI 0x03 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR 0x04 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR 0x05 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EISA_FAIL_SAFE_TIMEOUT 0x06 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR 0x07 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR 0x08 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_FATAL_NMI 0x09 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR 0x0A #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_DEGRADED 0x0B #define IPMI_SENSOR_TYPE_BUTTON_SWITCH_POWER_BUTTON_PRESSED 0x00 #define IPMI_SENSOR_TYPE_BUTTON_SWITCH_SLEEP_BUTTON_PRESSED 0x01 #define IPMI_SENSOR_TYPE_BUTTON_SWITCH_RESET_BUTTON_PRESSED 0x02 #define IPMI_SENSOR_TYPE_BUTTON_SWITCH_FRU_LATCH_OPEN 0x03 #define IPMI_SENSOR_TYPE_BUTTON_SWITCH_FRU_SERVICE_REQUEST_BUTTON 0x04 #define IPMI_SENSOR_TYPE_CHIP_SET_SOFT_POWER_CONTROL_FAILURE 0x00 #define IPMI_SENSOR_TYPE_CHIP_SET_THERMAL_TRIP 0x01 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S0_G0 0x00 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S1 0x01 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S2 0x02 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S3 0x03 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S4 0x04 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S5_G2 0x05 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S4_S5_SOFT_OFF 0x06 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_G3 0x07 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_SLEEPING_S1_S2_S3 0x08 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_G1_SLEEPING 0x09 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_S5_ENTERED_BY_OVERRIDE 0x0A #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_LEGACY_ON_STATE 0x0B #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA2_LEGACY_OFF_STATE 0x0C #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S0_G0 0x00 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S1 0x01 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S2 0x02 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S3 0x03 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S4 0x04 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S5_G2 0x05 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S4_S5_SOFT_OFF 0x06 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_G3 0x07 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_SLEEPING_S1_S2_S3 0x08 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_G1_SLEEPING 0x09 #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_S5_ENTERED_BY_OVERRIDE 0x0A #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_LEGACY_ON_STATE 0x0B #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_LEGACY_OFF_STATE 0x0C #define IPMI_SENSOR_TYPE_CHIP_EVENT_DATA3_UNKNOWN 0x0D #define IPMI_SENSOR_TYPE_CABLE_INTERCONNECT_IS_CONNECTED 0x00 #define IPMI_SENSOR_TYPE_CABLE_INTERCONNECT_CONFIGURATION_ERROR 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_INITIATED_BY_POWER_UP 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_INITIATED_BY_HARD_RESET 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_INITIATED_BY_WARM_RESET 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_USER_REQUESTED_PXE_BOOT 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_AUTOMATIC_BOOT_TO_DIAGNOSTIC 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_HARD_RESET 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_WARM_RESET 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_SYSTEM_RESTART 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_UNKNOWN 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_CHASSIS_CONTROL_COMMAND 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_RESET_VIA_PUSHBUTTON 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_POWER_UP_VIA_POWER_PUSHBUTTON 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_WATCHDOG_EXPIRATION 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_OEM 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_AUTOMATIC_POWER_UP_DUE_TO_ALWAYS_RESTORE_POWER_RESTORE_POLICY 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_AUTOMATIC_POWER_UP_DUE_TO_RESTORE_PREVIOUS_POWER_STATE_POWER_RESTORE_POLICY 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_RESET_VIA_PEF 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_POWER_CYCLE_VIA_PEF 0x09 #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_SOFT_RESET 0x0A #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_EVENT_DATA2_OFFSET_SYSTEM_RESTART_POWER_UP_VIA_RTC_WAKEUP 0x0B #define IPMI_SENSOR_TYPE_BOOT_ERROR_NO_BOOTABLE_MEDIA 0x00 #define IPMI_SENSOR_TYPE_BOOT_ERROR_NON_BOOTABLE_DISKETTE_LEFT_IN_DRIVE 0x01 #define IPMI_SENSOR_TYPE_BOOT_ERROR_PXE_SERVER_NOT_FOUND 0x02 #define IPMI_SENSOR_TYPE_BOOT_ERROR_INVALID_BOOT_SECTOR 0x03 #define IPMI_SENSOR_TYPE_BOOT_ERROR_TIMEOUT_WAITING_FOR_USER_SELECTION_OF_BOOT_SOURCE 0x04 #define IPMI_SENSOR_TYPE_OS_BOOT_A_BOOT_COMPLETED 0x00 #define IPMI_SENSOR_TYPE_OS_BOOT_C_BOOT_COMPLETED 0x01 #define IPMI_SENSOR_TYPE_OS_BOOT_PXE_BOOT_COMPLETED 0x02 #define IPMI_SENSOR_TYPE_OS_BOOT_DIAGNOSTIC_BOOT_COMPLETED 0x03 #define IPMI_SENSOR_TYPE_OS_BOOT_CD_ROM_BOOT_COMPLETED 0x04 #define IPMI_SENSOR_TYPE_OS_BOOT_ROM_BOOT_COMPLETED 0x05 #define IPMI_SENSOR_TYPE_OS_BOOT_BOOT_COMPLETED_BOOT_DEVICE_NOT_SPECIFIED 0x06 #define IPMI_SENSOR_TYPE_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_STARTED 0x07 #define IPMI_SENSOR_TYPE_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_COMPLETED 0x08 #define IPMI_SENSOR_TYPE_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_ABORTED 0x09 #define IPMI_SENSOR_TYPE_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_FAILED 0x0A #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_CRITICAL_STOP_DURING_OS_LOAD 0x00 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_RUN_TIME_CRITICAL_STOP 0x01 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OS_GRACEFUL_STOP 0x02 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OS_GRACEFUL_SHUTDOWN 0x03 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_SOFT_SHUTDOWN_INITIATED_BY_PEF 0x04 #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_AGENT_NOT_RESPONDING 0x05 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_FAULT_STATUS_ASSERTED 0x00 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_IDENTIFY_STATUS_ASSERTED 0x01 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_INSTALLED_ATTACHED 0x02 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_INSTALLATION 0x03 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_REMOVAL 0x04 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_POWER_IS_OFF 0x05 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_REMOVAL_REQUEST 0x06 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_INTERLOCK_ASSERTED 0x07 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_IS_DISABLED 0x08 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_SLOT_HOLDS_SPARE_DEVICE 0x09 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_PCI 0x00 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_DRIVE_ARRAY 0x01 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_EXTERNAL_PERIPHERAL_CONNECTOR 0x02 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_DOCKING 0x03 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_OTHER_STANDARD_INTERNAL_EXPANSION_SLOT 0x04 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_SLOT_ASSOCIATED_WITH_ENTITY_SPECIFIED_BY_ENTITY_ID_FOR_SENSOR 0x05 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_ADVANCEDTCA 0x06 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_DIMM_MEMORY_DEVICE 0x07 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_FAN 0x08 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_PCI_EXPRESS 0x09 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_SCSI 0x0A #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_SATA_SAS 0x0B #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR_EVENT_DATA2_USB 0x0C #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S0_G0 0x00 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S1 0x01 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S2 0x02 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S3 0x03 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S4 0x04 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S5_G2 0x05 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S4_S5_SOFT_OFF 0x06 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_G3_MECHANICAL_OFF 0x07 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_SLEEPING_IN_AN_S1_S2_OR_S3_STATES 0x08 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_G1_SLEEPING 0x09 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_S5_ENTERED_BY_OVERRIDE 0x0A #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_LEGACY_ON_STATE 0x0B #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_LEGACY_OFF_STATE 0x0C #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_UNSPECIFIED 0x0D #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE_UNKNOWN 0x0E #define IPMI_SENSOR_TYPE_WATCHDOG2_TIMER_EXPIRED 0x00 #define IPMI_SENSOR_TYPE_WATCHDOG2_HARD_RESET 0x01 #define IPMI_SENSOR_TYPE_WATCHDOG2_POWER_DOWN 0x02 #define IPMI_SENSOR_TYPE_WATCHDOG2_POWER_CYCLE 0x03 #define IPMI_SENSOR_TYPE_WATCHDOG2_RESERVED1 0x04 #define IPMI_SENSOR_TYPE_WATCHDOG2_RESERVED2 0x05 #define IPMI_SENSOR_TYPE_WATCHDOG2_RESERVED3 0x06 #define IPMI_SENSOR_TYPE_WATCHDOG2_RESERVED4 0x07 #define IPMI_SENSOR_TYPE_WATCHDOG2_TIMER_INTERRUPT 0x08 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_INTERRUPT_TYPE_NONE 0x0 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_INTERRUPT_TYPE_SMI 0x1 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_INTERRUPT_TYPE_NMI 0x2 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_INTERRUPT_TYPE_MESSAGE_INTERRUPT 0x3 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_INTERRUPT_TYPE_UNSPECIFIED 0xF #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_RESERVED 0x0 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_BIOS_FRB2 0x1 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_BIOS_POST 0x2 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_OS_LOAD 0x3 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_SMS_OS 0x4 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_OEM 0x5 #define IPMI_SENSOR_TYPE_WATCHDOG2_EVENT_DATA2_TIMER_USE_AT_EXPIRATION_UNSPECIFIED 0xF #define IPMI_SENSOR_TYPE_PLATFORM_ALERT_PLATFORM_GENERATED_PAGE 0x00 #define IPMI_SENSOR_TYPE_PLATFORM_ALERT_PLATFORM_GENERATED_LAN_ALERT 0x01 #define IPMI_SENSOR_TYPE_PLATFORM_ALERT_PLATFORM_EVENT_TRAP_GENERATED 0x02 #define IPMI_SENSOR_TYPE_PLATFORM_ALERT_PLATFORM_GENERATED_SNMP_TRAP 0x03 #define IPMI_SENSOR_TYPE_ENTITY_PRESENCE_ENTITY_PRESENT 0x00 #define IPMI_SENSOR_TYPE_ENTITY_PRESENCE_ENTITY_ABSENT 0x01 #define IPMI_SENSOR_TYPE_ENTITY_PRESENCE_ENTITY_DISABLED 0x02 #define IPMI_SENSOR_TYPE_LAN_HEARTBEAT_LOST 0x00 #define IPMI_SENSOR_TYPE_LAN_HEARTBEAT 0x01 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_ACCESS_DEGRADED_OR_UNAVAILABLE 0x00 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_CONTROLLER_ACCESS_DEGRADED_OR_UNAVAILABLE 0x01 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_OFF_LINE 0x02 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_UNAVAILABLE 0x03 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_FAILURE 0x04 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_FRU_FAILURE 0x05 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_EVENT_DATA2_OFFSET_FRU_FAILURE_DEVICE_IS_NOT_A_LOGICAL_FRU_DEVICE 0x0 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_EVENT_DATA2_OFFSET_FRU_FAILURE_DEVICE_IS_LOGICAL_FRU_DEVICE 0x1 #define IPMI_SENSOR_TYPE_BATTERY_BATTERY_LOW 0x00 #define IPMI_SENSOR_TYPE_BATTERY_BATTERY_FAILED 0x01 #define IPMI_SENSOR_TYPE_BATTERY_BATTERY_PRESENCE_DETECTED 0x02 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_SESSION_ACTIVATED 0x00 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_SESSION_DEACTIVATED 0x01 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_INVALID_USERNAME_OR_PASSWORD 0x02 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_INVALID_PASSWORD_DISABLE 0x03 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_EVENT_DATA3_OFFSET_SESSION_DEACTIVATED_DEACTIVATION_CAUSE_UNSPECIFIED 0x0 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_EVENT_DATA3_OFFSET_SESSION_DEACTIVATED_DEACTIVATION_CAUSE_CLOSE_SESSION_COMMAND 0x1 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_EVENT_DATA3_OFFSET_SESSION_DEACTIVATED_DEACTIVATION_CAUSE_TIMEOUT 0x2 #define IPMI_SENSOR_TYPE_SESSION_AUDIT_EVENT_DATA3_OFFSET_SESSION_DEACTIVATED_DEACTIVATION_CAUSE_CONFIGURATION_CHANGE 0x3 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY 0x00 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY 0x01 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_HARDWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY 0x02 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY 0x03 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_ENTITY_IS_OF_AN_INVALID_OR_UNSUPPORTED_HARDWARE_VERSION 0x04 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_ENTITY_CONTAINS_AN_INVALID_OR_UNSUPPORTED_FIRMWARE_OR_SOFTWARE_VERSION 0x05 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL 0x06 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL 0x07 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_UNSPECIFIED 0x00 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_DEVICE_ID 0x01 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_FIRMWARE_REVISION 0x02 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_DEVICE_REVISION 0x03 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_MANUFACTURER_ID 0x04 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_IPMI_VERSION 0x05 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_AUXILIARY_FIRMWARE_ID 0x06 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_CONTROLLER_FIRMWARE_BOOT_BLOCK 0x07 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_OTHER_MANAGEMENT_CONTROLLER_FIRMWARE 0x08 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_SYSTEM_FIRMWARE_CHANGE 0x09 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_SMBIOS_CHANGE 0x0A #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_OPERATING_SYSTEM_CHANGE 0x0B #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_OPERATING_SYSTEM_LOADER_CHANGE 0x0C #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_SERVICE_OR_DIAGNOSTIC_PARTITION_CHANGE 0x0D #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_SOFTWARE_AGENT_CHANGE 0x0E #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_SOFTWARE_APPLICATION_CHANGE 0x0F #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_MANAGEMENT_SOFTWARE_MIDDLEWARE_CHANGE 0x10 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_PROGRAMMABLE_HARDWARE_CHANGE 0x11 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_MODULE_CHANGE 0x12 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_COMPONENT_CHANGE 0x13 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_REPLACED_WITH_EQUIVALENT_VERSION 0x14 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_REPLACED_WITH_NEWER_VERSION 0x15 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_REPLACED_WITH_OLDER_VERSION 0x16 #define IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OFFSET_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL_BOARD_FRU_HARDWARE_CONFIGURATION_CHANGE 0x17 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_NOT_INSTALLED 0x00 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_INACTIVE 0x01 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_ACTIVATION_REQUESTED 0x02 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_ACTIVATION_IN_PROGRESS 0x03 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_ACTIVE 0x04 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_DEACTIVATION_REQUESTED 0x05 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_DEACTIVATION_IN_PROGRESS 0x06 #define IPMI_SENSOR_TYPE_FRU_STATE_FRU_COMMUNICATION_LOST 0x07 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_NORMAL_STATE_CHANGE 0x0 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_CHANGE_COMMAND_BY_SOFTWARE_EXTERNAL_TO_FRU 0x1 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_DUE_TO_OPERATOR_CHANGING_A_HANDLE_LATCH 0x2 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_DUE_TO_OPERATOR_PRESSING_THE_HOTSWAP_PUSH_BUTTON 0x3 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_DUE_TO_FRU_PROGRAMMATIC_ACTION 0x4 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_COMMUNICATION_LOST 0x5 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_COMMUNICATION_LOST_DUE_TO_LOCAL_FAILURE 0x6 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_DUE_TO_UNEXPECTED_EXTRACTION 0x7 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_DUE_TO_OPERATOR_INTERVENTION_UPDATE 0x8 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_UNABLE_TO_COMPUTE_IPMB_ADDRESS 0x9 #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_UNEXPECTED_DEACTIVATION 0xA #define IPMI_SENSOR_TYPE_FRU_STATE_EVENT_DATA2_OFFSET_COMMUNICATION_LOST_CAUSE_OF_STATE_CHANGE_STATE_CHANGE_CAUSE_UNKNOWN 0xF /* * String arrays for above */ extern const char * const ipmi_sensor_type_physical_security[]; extern unsigned int ipmi_sensor_type_physical_security_max_index; extern const char * const ipmi_sensor_type_platform_security_violation_attempt[]; extern unsigned int ipmi_sensor_type_platform_security_violation_attempt_max_index; extern const char * const ipmi_sensor_type_processor[]; extern unsigned int ipmi_sensor_type_processor_max_index; extern const char * const ipmi_sensor_type_power_supply[]; extern unsigned int ipmi_sensor_type_power_supply_max_index; extern const char * const ipmi_sensor_type_power_unit[]; extern unsigned int ipmi_sensor_type_power_unit_max_index; extern const char * const ipmi_sensor_type_memory[]; extern unsigned int ipmi_sensor_type_memory_max_index; extern const char * const ipmi_sensor_type_drive_slot[]; extern unsigned int ipmi_sensor_type_drive_slot_max_index; extern const char * const ipmi_sensor_type_system_firmware_progress[]; extern unsigned int ipmi_sensor_type_system_firmware_progress_max_index; extern const char * const ipmi_sensor_type_event_logging_disabled[]; extern unsigned int ipmi_sensor_type_event_logging_disabled_max_index; extern const char * const ipmi_sensor_type_watchdog1[]; extern unsigned int ipmi_sensor_type_watchdog1_max_index; extern const char * const ipmi_sensor_type_system_event[]; extern unsigned int ipmi_sensor_type_system_event_max_index; extern const char * const ipmi_sensor_type_critical_interrupt[]; extern unsigned int ipmi_sensor_type_critical_interrupt_max_index; extern const char * const ipmi_sensor_type_button_switch[]; extern unsigned int ipmi_sensor_type_button_switch_max_index; extern const char * const ipmi_sensor_type_chip_set[]; extern unsigned int ipmi_sensor_type_chip_set_max_index; extern const char * const ipmi_sensor_type_cable_interconnect[]; extern unsigned int ipmi_sensor_type_cable_interconnect_max_index; extern const char * const ipmi_sensor_type_system_boot_initiated[]; extern unsigned int ipmi_sensor_type_system_boot_initiated_max_index; extern const char * const ipmi_sensor_type_boot_error[]; extern unsigned int ipmi_sensor_type_boot_error_max_index; extern const char * const ipmi_sensor_type_os_boot[]; extern unsigned int ipmi_sensor_type_os_boot_max_index; extern const char * const ipmi_sensor_type_os_critical_stop[]; extern unsigned int ipmi_sensor_type_os_critical_stop_max_index; extern const char * const ipmi_sensor_type_slot_connector[]; extern unsigned int ipmi_sensor_type_slot_connector_max_index; extern const char * const ipmi_sensor_type_acpi_power_state[]; extern unsigned int ipmi_sensor_type_acpi_power_state_max_index; extern const char * const ipmi_sensor_type_watchdog2[]; extern unsigned int ipmi_sensor_type_watchdog2_max_index; extern const char * const ipmi_sensor_type_platform_alert[]; extern unsigned int ipmi_sensor_type_platform_alert_max_index; extern const char * const ipmi_sensor_type_entity_presence[]; extern unsigned int ipmi_sensor_type_entity_presence_max_index; extern const char * const ipmi_sensor_type_lan[]; extern unsigned int ipmi_sensor_type_lan_max_index; extern const char * const ipmi_sensor_type_management_subsystem_health[]; extern unsigned int ipmi_sensor_type_management_subsystem_health_max_index; extern const char * const ipmi_sensor_type_battery[]; extern unsigned int ipmi_sensor_type_battery_max_index; extern const char * const ipmi_sensor_type_session_audit[]; extern unsigned int ipmi_sensor_type_session_audit_max_index; extern const char * const ipmi_sensor_type_version_change[]; extern unsigned int ipmi_sensor_type_version_change_max_index; extern const char * const ipmi_sensor_type_fru_state[]; extern unsigned int ipmi_sensor_type_fru_state_max_index; /* * "short" arrays are same strings, but shortened to more reasonble lengths for output */ extern const char * const ipmi_sensor_type_physical_security_short[]; extern unsigned int ipmi_sensor_type_physical_security_short_max_index; extern const char * const ipmi_sensor_type_platform_security_violation_attempt_short[]; extern unsigned int ipmi_sensor_type_platform_security_violation_attempt_short_max_index; extern const char * const ipmi_sensor_type_processor_short[]; extern unsigned int ipmi_sensor_type_processor_short_max_index; extern const char * const ipmi_sensor_type_power_supply_short[]; extern unsigned int ipmi_sensor_type_power_supply_short_max_index; extern const char * const ipmi_sensor_type_power_unit_short[]; extern unsigned int ipmi_sensor_type_power_unit_short_max_index; extern const char * const ipmi_sensor_type_memory_short[]; extern unsigned int ipmi_sensor_type_memory_short_max_index; extern const char * const ipmi_sensor_type_drive_slot_short[]; extern unsigned int ipmi_sensor_type_drive_slot_short_max_index; extern const char * const ipmi_sensor_type_system_firmware_progress_short[]; extern unsigned int ipmi_sensor_type_system_firmware_progress_short_max_index; extern const char * const ipmi_sensor_type_event_logging_disabled_short[]; extern unsigned int ipmi_sensor_type_event_logging_disabled_short_max_index; extern const char * const ipmi_sensor_type_watchdog1_short[]; extern unsigned int ipmi_sensor_type_watchdog1_short_max_index; extern const char * const ipmi_sensor_type_system_event_short[]; extern unsigned int ipmi_sensor_type_system_event_short_max_index; extern const char * const ipmi_sensor_type_critical_interrupt_short[]; extern unsigned int ipmi_sensor_type_critical_interrupt_short_max_index; extern const char * const ipmi_sensor_type_button_switch_short[]; extern unsigned int ipmi_sensor_type_button_switch_short_max_index; extern const char * const ipmi_sensor_type_chip_set_short[]; extern unsigned int ipmi_sensor_type_chip_set_short_max_index; extern const char * const ipmi_sensor_type_cable_interconnect_short[]; extern unsigned int ipmi_sensor_type_cable_interconnect_short_max_index; extern const char * const ipmi_sensor_type_system_boot_initiated_short[]; extern unsigned int ipmi_sensor_type_system_boot_initiated_short_max_index; extern const char * const ipmi_sensor_type_boot_error_short[]; extern unsigned int ipmi_sensor_type_boot_error_short_max_index; extern const char * const ipmi_sensor_type_os_boot_short[]; extern unsigned int ipmi_sensor_type_os_boot_short_max_index; extern const char * const ipmi_sensor_type_os_critical_stop_short[]; extern unsigned int ipmi_sensor_type_os_critical_stop_short_max_index; extern const char * const ipmi_sensor_type_slot_connector_short[]; extern unsigned int ipmi_sensor_type_slot_connector_short_max_index; extern const char * const ipmi_sensor_type_acpi_power_state_short[]; extern unsigned int ipmi_sensor_type_acpi_power_state_short_max_index; extern const char * const ipmi_sensor_type_watchdog2_short[]; extern unsigned int ipmi_sensor_type_watchdog2_short_max_index; extern const char * const ipmi_sensor_type_platform_alert_short[]; extern unsigned int ipmi_sensor_type_platform_alert_short_max_index; extern const char * const ipmi_sensor_type_entity_presence_short[]; extern unsigned int ipmi_sensor_type_entity_presence_short_max_index; extern const char * const ipmi_sensor_type_lan_short[]; extern unsigned int ipmi_sensor_type_lan_short_max_index; extern const char * const ipmi_sensor_type_management_subsystem_health_short[]; extern unsigned int ipmi_sensor_type_management_subsystem_health_short_max_index; extern const char * const ipmi_sensor_type_battery_short[]; extern unsigned int ipmi_sensor_type_battery_short_max_index; extern const char * const ipmi_sensor_type_session_audit_short[]; extern unsigned int ipmi_sensor_type_session_audit_short_max_index; extern const char * const ipmi_sensor_type_version_change_short[]; extern unsigned int ipmi_sensor_type_version_change_short_max_index; extern const char * const ipmi_sensor_type_fru_state_short[]; extern unsigned int ipmi_sensor_type_fru_state_short_max_index; /* * event data 2 */ extern const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error[]; extern unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error_max_index; extern const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang[]; extern unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang_max_index; extern const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress[]; extern unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress_max_index; extern const char * const ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action[]; extern unsigned int ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action_max_index; extern const char * const ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type[]; extern unsigned int ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type_max_index; extern const char * const ipmi_sensor_type_system_event_event_data2_offset_pef_action[]; extern unsigned int ipmi_sensor_type_system_event_event_data2_offset_pef_action_max_index; extern const char * const ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second[]; extern unsigned int ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second_max_index; extern const char * const ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type[]; extern unsigned int ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type_max_index; extern const char * const ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure[]; extern unsigned int ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure_max_index; extern const char * const ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause[]; extern unsigned int ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause_max_index; extern const char * const ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type[]; extern unsigned int ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type_max_index; extern const char * const ipmi_sensor_type_watchdog2_event_data2_interrupt_type[]; extern unsigned int ipmi_sensor_type_watchdog2_event_data2_interrupt_type_max_index; extern const char * const ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration[]; extern unsigned int ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration_max_index; extern const char * const ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device[]; extern unsigned int ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device_max_index; extern const char * const ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type[]; extern unsigned int ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type_max_index; extern const char * const ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change[]; extern unsigned int ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change_max_index; /* * event data 2 */ extern const char * const ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type[]; extern unsigned int ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type_max_index; extern const char * const ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event[]; extern unsigned int ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event_max_index; extern const char * const ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events[]; extern unsigned int ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events_max_index; extern const char * const ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure[]; extern unsigned int ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure_max_index; extern const char * const ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause[]; extern unsigned int ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause_max_index; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h0000644002055400205540000000325013527331636032112 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SPEC_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-numbers-oem-spec.h0000644002055400205540000000244113527331636027525 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_NUMBERS_OEM_SPEC_H #define IPMI_SENSOR_NUMBERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_NUMBERS_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-spec.h0000644002055400205540000001104013527331636026433 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_SPEC_H #define IPMI_SENSOR_TYPES_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SENSOR_TYPE_RESERVED 0x00 #define IPMI_SENSOR_TYPE_TEMPERATURE 0x01 #define IPMI_SENSOR_TYPE_VOLTAGE 0x02 #define IPMI_SENSOR_TYPE_CURRENT 0x03 #define IPMI_SENSOR_TYPE_FAN 0x04 #define IPMI_SENSOR_TYPE_PHYSICAL_SECURITY 0x05 #define IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT 0x06 #define IPMI_SENSOR_TYPE_PROCESSOR 0x07 #define IPMI_SENSOR_TYPE_POWER_SUPPLY 0x08 #define IPMI_SENSOR_TYPE_POWER_UNIT 0x09 #define IPMI_SENSOR_TYPE_COOLING_DEVICE 0x0A #define IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR 0x0B #define IPMI_SENSOR_TYPE_MEMORY 0x0C #define IPMI_SENSOR_TYPE_DRIVE_SLOT 0x0D #define IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE 0x0E #define IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS 0x0F #define IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED 0x10 #define IPMI_SENSOR_TYPE_WATCHDOG1 0x11 #define IPMI_SENSOR_TYPE_SYSTEM_EVENT 0x12 #define IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT 0x13 #define IPMI_SENSOR_TYPE_BUTTON_SWITCH 0x14 #define IPMI_SENSOR_TYPE_MODULE_BOARD 0x15 #define IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR 0x16 #define IPMI_SENSOR_TYPE_ADD_IN_CARD 0x17 #define IPMI_SENSOR_TYPE_CHASSIS 0x18 #define IPMI_SENSOR_TYPE_CHIP_SET 0x19 #define IPMI_SENSOR_TYPE_OTHER_FRU 0x1A #define IPMI_SENSOR_TYPE_CABLE_INTERCONNECT 0x1B #define IPMI_SENSOR_TYPE_TERMINATOR 0x1C #define IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED 0x1D #define IPMI_SENSOR_TYPE_BOOT_ERROR 0x1E /* OS BOOT renamed Base OS Boot/Installation Status, but gonna keep legacy name for ease */ #define IPMI_SENSOR_TYPE_OS_BOOT 0x1F #define IPMI_SENSOR_TYPE_OS_CRITICAL_STOP 0x20 #define IPMI_SENSOR_TYPE_SLOT_CONNECTOR 0x21 #define IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE 0x22 #define IPMI_SENSOR_TYPE_WATCHDOG2 0x23 #define IPMI_SENSOR_TYPE_PLATFORM_ALERT 0x24 #define IPMI_SENSOR_TYPE_ENTITY_PRESENCE 0x25 #define IPMI_SENSOR_TYPE_MONITOR_ASIC_IC 0x26 #define IPMI_SENSOR_TYPE_LAN 0x27 #define IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH 0x28 #define IPMI_SENSOR_TYPE_BATTERY 0x29 #define IPMI_SENSOR_TYPE_SESSION_AUDIT 0x2A #define IPMI_SENSOR_TYPE_VERSION_CHANGE 0x2B #define IPMI_SENSOR_TYPE_FRU_STATE 0x2C #define IPMI_SENSOR_TYPE_OEM_MIN 0xC0 #define IPMI_SENSOR_TYPE_OEM_MAX 0xFF /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_TYPE_VALID(__sensor_type) \ ((((__sensor_type) + 1) >= (IPMI_SENSOR_TYPE_RESERVED + 1) \ && (__sensor_type) <= IPMI_SENSOR_TYPE_FRU_STATE) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_SENSOR_TYPE_IS_OEM(__sensor_type) \ (((__sensor_type) >= IPMI_SENSOR_TYPE_OEM_MIN \ && (((__sensor_type) - 1) <= (IPMI_SENSOR_TYPE_OEM_MAX - 1))) ? 1 : 0) extern const char *const ipmi_sensor_types[]; extern const char *const ipmi_oem_sensor_type; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-oem-spec.h0000644002055400205540000000262213527331636027217 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_TYPES_OEM_SPEC_H #define IPMI_SENSOR_TYPES_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_TYPES_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sensor-units-spec.h0000644002055400205540000001473613527331636026450 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_UNITS_SPEC_H #define IPMI_SENSOR_UNITS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SENSOR_UNIT_UNSPECIFIED 0 #define IPMI_SENSOR_UNIT_DEGREES_C 1 #define IPMI_SENSOR_UNIT_DEGREES_F 2 #define IPMI_SENSOR_UNIT_DEGREES_K 3 #define IPMI_SENSOR_UNIT_VOLTS 4 #define IPMI_SENSOR_UNIT_AMPS 5 #define IPMI_SENSOR_UNIT_WATTS 6 #define IPMI_SENSOR_UNIT_JOULES 7 #define IPMI_SENSOR_UNIT_COULOMBS 8 #define IPMI_SENSOR_UNIT_VA 9 #define IPMI_SENSOR_UNIT_NITS 10 #define IPMI_SENSOR_UNIT_LUMEN 11 #define IPMI_SENSOR_UNIT_LUX 12 #define IPMI_SENSOR_UNIT_CANDELA 13 #define IPMI_SENSOR_UNIT_KPA 14 #define IPMI_SENSOR_UNIT_PSI 15 #define IPMI_SENSOR_UNIT_NEWTON 16 #define IPMI_SENSOR_UNIT_CFM 17 #define IPMI_SENSOR_UNIT_RPM 18 #define IPMI_SENSOR_UNIT_HZ 19 #define IPMI_SENSOR_UNIT_MICROSECOND 20 #define IPMI_SENSOR_UNIT_MILLISECOND 21 #define IPMI_SENSOR_UNIT_SECOND 22 #define IPMI_SENSOR_UNIT_MINUTE 23 #define IPMI_SENSOR_UNIT_HOUR 24 #define IPMI_SENSOR_UNIT_DAY 25 #define IPMI_SENSOR_UNIT_WEEK 26 #define IPMI_SENSOR_UNIT_MIL 27 #define IPMI_SENSOR_UNIT_INCHES 28 #define IPMI_SENSOR_UNIT_FEET 29 #define IPMI_SENSOR_UNIT_CU_IN 30 #define IPMI_SENSOR_UNIT_CU_FEET 31 #define IPMI_SENSOR_UNIT_MM 32 #define IPMI_SENSOR_UNIT_CM 33 #define IPMI_SENSOR_UNIT_M 34 #define IPMI_SENSOR_UNIT_CU_CM 35 #define IPMI_SENSOR_UNIT_CU_M 36 #define IPMI_SENSOR_UNIT_LITERS 37 #define IPMI_SENSOR_UNIT_FLUID_OUNCE 38 #define IPMI_SENSOR_UNIT_RADIANS 39 #define IPMI_SENSOR_UNIT_STERADIANS 40 #define IPMI_SENSOR_UNIT_REVOLUTIONS 41 #define IPMI_SENSOR_UNIT_CYCLES 42 #define IPMI_SENSOR_UNIT_GRAVITIES 43 #define IPMI_SENSOR_UNIT_OUNCE 44 #define IPMI_SENSOR_UNIT_POUND 45 #define IPMI_SENSOR_UNIT_FT_LB 46 #define IPMI_SENSOR_UNIT_OZ_IN 47 #define IPMI_SENSOR_UNIT_GAUSS 48 #define IPMI_SENSOR_UNIT_GILBERTS 49 #define IPMI_SENSOR_UNIT_HENRY 50 #define IPMI_SENSOR_UNIT_MILLIHENRY 51 #define IPMI_SENSOR_UNIT_FARAD 52 #define IPMI_SENSOR_UNIT_MICROFARAD 53 #define IPMI_SENSOR_UNIT_OHMS 54 #define IPMI_SENSOR_UNIT_SIEMENS 55 #define IPMI_SENSOR_UNIT_MOLE 56 #define IPMI_SENSOR_UNIT_BECQUEREL 57 #define IPMI_SENSOR_UNIT_PPM 58 #define IPMI_SENSOR_UNIT_RESERVED 59 #define IPMI_SENSOR_UNIT_DECIBELS 60 #define IPMI_SENSOR_UNIT_DBA 61 #define IPMI_SENSOR_UNIT_DBC 62 #define IPMI_SENSOR_UNIT_GRAY 63 #define IPMI_SENSOR_UNIT_SIEVERT 64 #define IPMI_SENSOR_UNIT_COLOR_TEMP_DEG_K 65 #define IPMI_SENSOR_UNIT_BIT 66 #define IPMI_SENSOR_UNIT_KILOBIT 67 #define IPMI_SENSOR_UNIT_MEGABIT 68 #define IPMI_SENSOR_UNIT_GIGABIT 69 #define IPMI_SENSOR_UNIT_BYTE 70 #define IPMI_SENSOR_UNIT_KILOBYTE 71 #define IPMI_SENSOR_UNIT_MEGABYTE 72 #define IPMI_SENSOR_UNIT_GIGABYTE 73 #define IPMI_SENSOR_UNIT_WORD 74 #define IPMI_SENSOR_UNIT_DWORD 75 #define IPMI_SENSOR_UNIT_QWORD 76 #define IPMI_SENSOR_UNIT_LINE 77 #define IPMI_SENSOR_UNIT_HIT 78 #define IPMI_SENSOR_UNIT_MISS 79 #define IPMI_SENSOR_UNIT_RETRY 80 #define IPMI_SENSOR_UNIT_RESET 81 #define IPMI_SENSOR_UNIT_OVERRUN_OVERFLOW 82 #define IPMI_SENSOR_UNIT_UNDERRUN 83 #define IPMI_SENSOR_UNIT_COLLISION 84 #define IPMI_SENSOR_UNIT_PACKETS 85 #define IPMI_SENSOR_UNIT_MESSAGES 86 #define IPMI_SENSOR_UNIT_CHARACTERS 87 #define IPMI_SENSOR_UNIT_ERROR 88 #define IPMI_SENSOR_UNIT_CORRECTABLE_ERROR 89 #define IPMI_SENSOR_UNIT_UNCORRECTABLE_ERROR 90 #define IPMI_SENSOR_UNIT_FATAL_ERROR 91 #define IPMI_SENSOR_UNIT_GRAMS 92 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_UNIT_VALID(__sensor_unit) \ (((__sensor_unit + 1) >= (IPMI_SENSOR_UNIT_UNSPECIFIED + 1) \ && (__sensor_unit) <= IPMI_SENSOR_UNIT_GRAMS) ? 1 : 0) #define IPMI_SENSOR_RATE_UNIT_NONE 0 #define IPMI_SENSOR_RATE_UNIT_PER_US 1 #define IPMI_SENSOR_RATE_UNIT_PER_MS 2 #define IPMI_SENSOR_RATE_UNIT_PER_S 3 #define IPMI_SENSOR_RATE_UNIT_PER_MINUTE 4 #define IPMI_SENSOR_RATE_UNIT_PER_HOUR 5 #define IPMI_SENSOR_RATE_UNIT_PER_DAY 6 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SENSOR_RATE_UNIT_VALID(__sensor_rate_unit) \ (((__sensor_rate_unit + 1) >= (IPMI_SENSOR_RATE_UNIT_NONE + 1) \ && (__sensor_rate_unit) <= IPMI_SENSOR_RATE_UNIT_PER_DAY) ? 1 : 0) extern const char *const ipmi_sensor_units[]; extern const char *const ipmi_sensor_units_abbreviated[]; extern const char *const ipmi_sensor_rate_units[]; #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_UNITS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-serial-modem-configuration-parameters-spec.h0000644002055400205540000001415313527331636033354 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SPEC_H #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_AUTH_TYPE_SUPPORT 1 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_AUTH_TYPE_ENABLES 2 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CONNECTION_MODE 3 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SESSION_INACTIVITY_TIMEOUT 4 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CHANNEL_CALLBACK_CONTROL 5 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SESSION_TERMINATION 6 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_IPMI_MESSAGING_COMM_SETTINGS 7 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MUX_SWITCH_CONTROL 8 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MODEM_RING_TIME 9 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MODEM_INIT_STRING 10 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MODEM_ESCAPE_SEQUENCE 11 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MODEM_HANG_UP_SEQUENCE 12 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_MODEM_DIAL_COMMAND 13 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PAGE_BLACKOUT_INTERVAL 14 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_COMMUNITY_STRING 15 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_NO_OF_ALERT_DESTINATIONS 16 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_DESTINATION_INFO 17 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CALL_RETRY_INTERVAL 18 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_DESTINATION_COMM_SETTINGS 19 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_NO_OF_DIAL_STRINGS 20 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_DESTINATION_DIAL_STRINGS 21 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_NO_OF_ALERT_DESTINATION_IP_ADDRS 22 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_DESTINATION_IP_ADDRS 23 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_NO_OF_TAP_ACCOUNTS 24 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_TAP_ACCOUNT 25 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_TAP_PASSWORDS 26 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_TAP_PAGER_ID_STRINGS 27 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_TAP_SERVICE_SETTINGS 28 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_TERMINAL_MODE_CONF 29 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_PROTOCOL_OPTIONS 30 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_PRIMARY_RMCP_PORT_NO 31 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_SECONDARY_RMCP_PORT_NO 32 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_LINK_AUTH 33 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CHAP_NAME 34 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCM 35 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_SNOOP_ACCM 36 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_NO_OF_PPP_ACCOUNT 37 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_DIAL_STRING_SELECTOR 38 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_BMC_IP_ADDRESSES 39 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_USER_NAMES 40 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_USER_DOMAINS 41 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_USER_PASSWORDS 42 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_AUTH_SETTINGS 43 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_ACCOUNT_CONNECTION_HOLD_TIMES 44 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_UDP_PROXY_IP_HEADER_DATA 45 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_UDP_PROXY_TRANSMIT_BUFFER_SIZE 46 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_UDP_PROXY_RECEIVE_BUFFER_SIZE 47 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_REMOTE_CONSOLE_IP_ADDRESS 48 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_OEM_MIN 192 #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_OEM_MAX 255 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SERIAL_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector) + 1) > (IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SET_IN_PROGRESS + 1) \ && (__parameter_selector) <= IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PPP_REMOTE_CONSOLE_IP_ADDRESS) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_SERIAL_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_OEM_MIN \ && ((__parameter_selector) - 1) <= (IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_OEM_MAX - 1)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SPEC_H */ ipmi-serial-modem-configuration-parameters-oem-spec.h0000644002055400205540000000170713527331636034054 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_OEM_SPEC_H #define IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-slave-address-spec.h0000644002055400205540000000354413527331636026527 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_SPEC_H #define IPMI_SLAVE_ADDRESS_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Slave Addresses - 7 bits BIOS 0x00 to 0x0F SMI HANDLER 0x10 to 0x1F System Management Software 0x20 to 0x2F OEM 0x30 to 0x3F Remote Console Software 0x40 to 0x46 Terminal Mode Remote Console Software 0x47 */ /* Software IDs - 8 bits, Least Significant Bit is 0x1 BIOS 0x01 to 0x1F SMI HANDLER 0x21 to 0x3F System Management Software 0x41 to 0x5F OEM 0x61 to 0x7F Remote Console Software 0x81 to 0x8D Terminal Mode Remote Console Software 0x8F */ #define IPMI_SLAVE_ADDRESS_BMC 0x20 #define IPMI_LAN_SLAVE_ADDRESS_BMC IPMI_SLAVE_ADDRESS_BMC #define IPMI_SSIF_SMBUS_SLAVE_ADDRESS 0x42 #define IPMI_LAN_SOFTWARE_ID_REMOTE_CONSOLE_SOFTWARE 0x81 #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-slave-address-oem-spec.h0000644002055400205540000000232213527331636027276 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SLAVE_ADDRESS_OEM_SPEC_H #define IPMI_SLAVE_ADDRESS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #include #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SLAVE_ADDRESS_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sol-configuration-parameters-spec.h0000644002055400205540000000501613527331636031571 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CONFIGURATION_PARAMETERS_SPEC_H #define IPMI_SOL_CONFIGURATION_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS 0 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE 1 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION 2 #define IPMI_SOL_CONFIGURATION_PARAMETER_CHARACTER_ACCUMULATE_INTERVAL_AND_SEND_THRESHOLD 3 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY 4 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NON_VOLATILE_BIT_RATE 5 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE 6 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL 7 #define IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT_NUMBER 8 #define IPMI_SOL_CONFIGURATION_PARAMETER_OEM_MIN 192 #define IPMI_SOL_CONFIGURATION_PARAMETER_OEM_MAX 255 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector) + 1) > (IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS + 1) \ && (__parameter_selector) <= IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT_NUMBER) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= IPMI_SOL_CONFIGURATION_PARAMETER_OEM_MIN \ && ((__parameter_selector) - 1) <= (IPMI_SOL_CONFIGURATION_PARAMETER_OEM_MAX - 1)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CONFIGURATION_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-sol-configuration-parameters-oem-spec.h0000644002055400205540000000212213527331636032342 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CONFIGURATION_PARAMETERS_OEM_SPEC_H #define IPMI_SOL_CONFIGURATION_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CONFIGURATION_PARAMETERS_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-system-boot-option-parameters-spec.h0000644002055400205540000000400013527331636031712 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_SPEC_H #define IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SET_IN_PROGRESS 0x0 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SELECTOR 0x1 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SCAN 0x2 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BMC_BOOT_FLAG_VALID_BIT_CLEARING 0x3 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INFO_ACKNOWLEDGE 0x4 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_FLAGS 0x5 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_INFO 0x6 #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_MAILBOX 0x7 /* Add +1 to avoid compiler warnings */ #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector + 1)) > (IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SET_IN_PROGRESS+1) && \ (__parameter_selector) <= IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_MAILBOX) ? 1 : 0) #define IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= 96 && (__parameter_selector) <= 127) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-system-boot-option-parameters-oem-spec.h0000644002055400205540000000165613527331636032506 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_OEM_SPEC_H #define IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_BOOT_OPTION_PARAMETERS_OEM_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameters-spec.h0000644002055400205540000000422413527331636030404 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H #define IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_SYSTEM_INFO_PARAMETER_SET_IN_PROGRESS 0 #define IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION 1 #define IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_NAME 2 #define IPMI_SYSTEM_INFO_PARAMETER_PRIMARY_OPERATING_SYSTEM_NAME 3 #define IPMI_SYSTEM_INFO_PARAMETER_OPERATING_SYSTEM_NAME 4 #define IPMI_SYSTEM_INFO_PARAMETER_PRESENT_OS_VERSION_NUMBER 5 #define IPMI_SYSTEM_INFO_PARAMETER_BMC_URL 6 #define IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL 7 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_MIN 192 #define IPMI_SYSTEM_INFO_PARAMETER_OEM_MAX 255 /* Add +1 to avoid compiler warnings */ #define IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_VALID(__parameter_selector) \ ((((__parameter_selector) + 1) > (IPMI_SYSTEM_INFO_PARAMETER_SET_IN_PROGRESS + 1) \ && (__parameter_selector) <= IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL) ? 1 : 0) /* To avoid gcc warnings, subtract -1 in comparison */ #define IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_IS_OEM(__parameter_selector) \ (((__parameter_selector) >= IPMI_SYSTEM_INFO_PARAMETER_OEM_MIN \ && ((__parameter_selector) - 1) <= (IPMI_SYSTEM_INFO_PARAMETER_OEM_MAX - 1)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameters-oem-spec.h0000644002055400205540000000205313527331636031160 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_INFO_PARAMETERS_OEM_SPEC_H #define IPMI_SYSTEM_INFO_PARAMETERS_OEM_SPEC_H #ifdef __cplusplus extern "C" { #endif #include #include #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_INFO_PARAMETERS_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-system-software-id-spec.h0000644002055400205540000000560613527331636027541 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SYSTEM_SOFTWARE_ID_SPEC_H #define IPMI_SYSTEM_SOFTWARE_ID_SPEC_H #ifdef __cplusplus extern "C" { #endif /* Table 5-4 */ #define IPMI_SYSTEM_SOFTWARE_TYPE_BIOS_MIN 0x01 #define IPMI_SYSTEM_SOFTWARE_TYPE_BIOS_MAX 0x0F #define IPMI_SYSTEM_SOFTWARE_TYPE_SMI_HANDLER_MIN 0x10 #define IPMI_SYSTEM_SOFTWARE_TYPE_SMI_HANDLER_MAX 0x1F #define IPMI_SYSTEM_SOFTWARE_TYPE_SYSTEM_MANAGEMENT_SOFTWARE_MIN 0x20 #define IPMI_SYSTEM_SOFTWARE_TYPE_SYSTEM_MANAGEMENT_SOFTWARE_MAX 0x2F #define IPMI_SYSTEM_SOFTWARE_TYPE_OEM_MIN 0x30 #define IPMI_SYSTEM_SOFTWARE_TYPE_OEM_MAX 0x3F #define IPMI_SYSTEM_SOFTWARE_TYPE_REMOTE_CONSOLE_SOFTWARE_MIN 0x40 #define IPMI_SYSTEM_SOFTWARE_TYPE_REMOTE_CONSOLE_SOFTWARE_MAX 0x46 #define IPMI_SYSTEM_SOFTWARE_TYPE_TERMINAL_MODE_REMOTE_CONSOLE_SOFTWARE 0x47 #define IPMI_SYSTEM_SOFTWARE_TYPE_RESERVED_MIN 0x48 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_BIOS(__val) \ (((__val + 1) >= IPMI_SYSTEM_SOFTWARE_TYPE_BIOS_MIN \ && (__val) <= IPMI_SYSTEM_SOFTWARE_TYPE_BIOS_MAX) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_SMI_HANDLER(__val) \ (((__val) >= IPMI_SYSTEM_SOFTWARE_TYPE_SMI_HANDLER_MIN \ && (__val) <= IPMI_SYSTEM_SOFTWARE_TYPE_SMI_HANDLER_MAX) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_SYSTEM_MANAGEMENT_SOFTWARE(__val) \ (((__val) >= IPMI_SYSTEM_SOFTWARE_TYPE_SYSTEM_MANAGEMENT_SOFTWARE_MIN \ && (__val) <= IPMI_SYSTEM_SOFTWARE_TYPE_SYSTEM_MANAGEMENT_SOFTWARE_MAX) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_OEM(__val) \ (((__val) >= IPMI_SYSTEM_SOFTWARE_TYPE_OEM_MIN \ && (__val) <= IPMI_SYSTEM_SOFTWARE_TYPE_OEM_MAX) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_REMOTE_CONSOLE_SOFTWARE(__val) \ (((__val) >= IPMI_SYSTEM_SOFTWARE_TYPE_REMOTE_CONSOLE_SOFTWARE_MIN \ && (__val) <= IPMI_SYSTEM_SOFTWARE_TYPE_REMOTE_CONSOLE_SOFTWARE_MAX) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_TERMINAL_MODE_REMOTE_CONSOLE_SOFTWARE(__val) \ (((__val) == IPMI_SYSTEM_SOFTWARE_TYPE_TERMINAL_MODE_REMOTE_CONSOLE_SOFTWARE)) ? 1 : 0) #define IPMI_SYSTEM_SOFTWARE_TYPE_IS_RESERVED(__val) \ (((__val) >= IPMI_SYSTEM_SOFTWARE_TYPE_RESERVED_MIN) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_SYSTEM_SOFTWARE_ID_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/spec/ipmi-timestamp-spec.h0000644002055400205540000000233213527331636025767 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_TIMESTAMP_SPEC_H #define IPMI_TIMESTAMP_SPEC_H #ifdef __cplusplus extern "C" { #endif #define IPMI_TIMESTAMP_UNSPECIFIED 0xFFFFFFFF #define IPMI_TIMESTAMP_POST_INIT_MIN 0x00000000 #define IPMI_TIMESTAMP_POST_INIT_MAX 0x20000000 /* To avoid gcc warnings, add +1 in comparison */ #define IPMI_TIMESTAMP_POST_INIT(__timestamp) \ ((((__timestamp + 1) >= (IPMI_TIMESTAMP_POST_INIT_MIN + 1) \ && (__timestamp) <= IPMI_TIMESTAMP_POST_INIT_MAX)) ? 1 : 0) #ifdef __cplusplus } #endif #endif /* IPMI_TIMESTAMP_SPEC_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/0000755002055400205540000000000013527342544022773 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/oem/0000755002055400205540000000000013527342544023553 5ustar00achuachu00000000000000ipmi-sdr-oem-intel-node-manager-record-format-templates.h0000644002055400205540000000732513527331637036361 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/oem/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_TEMPLATES_H #define IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ SDR OEM Intel Node Manager Record --------------------------------- FIID Template: tmpl_sdr_oem_intel_node_manager_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "record_subtype", REQUIRED, LENGTH-FIXED } { 8, "version_number", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "nm_device_slave_address", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "nm_health_event_sensor_number", REQUIRED, LENGTH-FIXED } { 8, "nm_exception_event_sensor_number", REQUIRED, LENGTH-FIXED } { 8, "nm_operational_capabilities_sensor_number", REQUIRED, LENGTH-FIXED } { 8, "nm_alert_threshold_exceeded_sensor_number", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-bmc-watchdog-timer-cmds-templates.h0000644002055400205540000001231513527331636032477 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_BMC_WATCHDOG_TIMER_CMDS_TEMPLATES_H #define IPMI_BMC_WATCHDOG_TIMER_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Reset Watchdog Timer Request ---------------------------- FIID Template: tmpl_cmd_reset_watchdog_timer_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Reset Watchdog Timer Response ----------------------------- FIID Template: tmpl_cmd_reset_watchdog_timer_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set Watchdog Timer Request -------------------------- FIID Template: tmpl_cmd_set_watchdog_timer_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 3, "timer_use", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "stop_timer", REQUIRED, LENGTH-FIXED } { 1, "log", REQUIRED, LENGTH-FIXED } { 3, "timeout_action", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 3, "pre_timeout_interrupt", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "pre_timeout_interval", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.bios_frb2", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.bios_post", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.os_load", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.sms_os", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.oem", REQUIRED, LENGTH-FIXED } { 1, "reserved5", REQUIRED, LENGTH-FIXED } { 1, "reserved6", REQUIRED, LENGTH-FIXED } { 16, "initial_countdown_value", REQUIRED, LENGTH-FIXED } Set Watchdog Timer Response --------------------------- FIID Template: tmpl_cmd_set_watchdog_timer_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Watchdog Timer Request -------------------------- FIID Template: tmpl_cmd_get_watchdog_timer_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Watchdog Timer Response --------------------------- FIID Template: tmpl_cmd_get_watchdog_timer_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 3, "timer_use", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "timer_state", REQUIRED, LENGTH-FIXED } { 1, "log", REQUIRED, LENGTH-FIXED } { 3, "timeout_action", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 3, "pre_timeout_interrupt", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "pre_timeout_interval", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.bios_frb2", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.bios_post", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.os_load", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.sms_os", REQUIRED, LENGTH-FIXED } { 1, "timer_use_expiration_flag.oem", REQUIRED, LENGTH-FIXED } { 1, "reserved5", REQUIRED, LENGTH-FIXED } { 1, "reserved6", REQUIRED, LENGTH-FIXED } { 16, "initial_countdown_value", REQUIRED, LENGTH-FIXED } { 16, "present_countdown_value", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_BMC_WATCHDOG_TIMER_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-chassis-cmds-templates.h0000644002055400205540000006032013527331636030456 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHASSIS_CMDS_TEMPLATES_H #define IPMI_CHASSIS_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get Chassis Capabilities Request -------------------------------- FIID Template: tmpl_cmd_get_chassis_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Chassis Capabilities Response --------------------------------- FIID Template: tmpl_cmd_get_chassis_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "capabilities_flags.provides_intrusion_sensor", REQUIRED, LENGTH-FIXED } { 1, "capabilities_flags.provides_front_panel_lockout", REQUIRED, LENGTH-FIXED } { 1, "capabilities_flags.provides_diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 1, "capabilities_flags.provides_power_interlock", REQUIRED, LENGTH-FIXED } { 4, "capabilities_flags.reserved", REQUIRED, LENGTH-FIXED } { 8, "fru_info_device_address", REQUIRED, LENGTH-FIXED } { 8, "sdr_device_address", REQUIRED, LENGTH-FIXED } { 8, "sel_device_address", REQUIRED, LENGTH-FIXED } { 8, "system_management_device_address", REQUIRED, LENGTH-FIXED } { 8, "bridge_device_address", OPTIONAL, LENGTH-FIXED } Get Chassis Status Request -------------------------- FIID Template: tmpl_cmd_get_chassis_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Chassis Status Response --------------------------- FIID Template: tmpl_cmd_get_chassis_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "current_power_state.power_is_on", REQUIRED, LENGTH-FIXED } { 1, "current_power_state.power_overload", REQUIRED, LENGTH-FIXED } { 1, "current_power_state.interlock", REQUIRED, LENGTH-FIXED } { 1, "current_power_state.power_fault", REQUIRED, LENGTH-FIXED } { 1, "current_power_state.power_control_fault", REQUIRED, LENGTH-FIXED } { 2, "current_power_state.power_restore_policy", REQUIRED, LENGTH-FIXED } { 1, "current_power_state.reserved", REQUIRED, LENGTH-FIXED } { 1, "last_power_event.ac_failed", REQUIRED, LENGTH-FIXED } { 1, "last_power_event.power_down_caused_by_power_overload", REQUIRED, LENGTH-FIXED } { 1, "last_power_event.power_down_caused_by_power_interlock_being_activated", REQUIRED, LENGTH-FIXED } { 1, "last_power_event.power_down_caused_by_power_fault", REQUIRED, LENGTH-FIXED } { 1, "last_power_event.power_on_entered_via_ipmi", REQUIRED, LENGTH-FIXED } { 3, "last_power_event.reserved", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.chassis_intrusion_active", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.front_panel_lockout_active", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.drive_fault", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.cooling_fan_fault_detected", REQUIRED, LENGTH-FIXED } { 2, "misc_chassis_state.chassis_identify_state", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.chassis_identify_command_and_state_info_supported", REQUIRED, LENGTH-FIXED } { 1, "misc_chassis_state.reserved", REQUIRED, LENGTH-FIXED } { 1, "front_panel.power_off_button_disabled", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.reset_button_disabled", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.diagnostic_interrupt_button_disabled", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.standby_button_disabled", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.power_off_button_disable_allowed", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.reset_button_disable_allowed", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.diagnostic_interrupt_button_disable_allowed", OPTIONAL, LENGTH-FIXED } { 1, "front_panel.standby_button_disable_allowed", OPTIONAL, LENGTH-FIXED } Chassis Control Request ----------------------- FIID Template: tmpl_cmd_chassis_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "chassis_control", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Chassis Control Response ------------------------ FIID Template: tmpl_cmd_chassis_control_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Chassis Identify Request ------------------------ FIID Template: tmpl_cmd_chassis_identify_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "identify_interval", OPTIONAL, LENGTH-FIXED } { 1, "force_identify", OPTIONAL, LENGTH-FIXED } { 7, "reserved", OPTIONAL, LENGTH-FIXED } Chassis Identify Response ------------------------- FIID Template: tmpl_cmd_chassis_identify_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set Front Panel Button Enables Request -------------------------------------- FIID Template: tmpl_cmd_set_front_panel_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "disable_power_off_button_for_power_off_only", REQUIRED, LENGTH-FIXED } { 1, "disable_reset_button", REQUIRED, LENGTH-FIXED } { 1, "disable_diagnostic_interrupt_button", REQUIRED, LENGTH-FIXED } { 1, "disable_standby_button_for_entering_standby", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Set Front Panel Button Enables Response --------------------------------------- FIID Template: tmpl_cmd_set_front_panel_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set Power Restore Policy Request -------------------------------- FIID Template: tmpl_cmd_set_power_restore_policy_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 3, "power_restore_policy", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } Set Power Restore Policy Response --------------------------------- FIID Template: tmpl_cmd_set_power_restore_policy_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "powered_off_after_ac_mains_returns", REQUIRED, LENGTH-FIXED } { 1, "restoring_power_to_state_when_ac_mains_was_lost", REQUIRED, LENGTH-FIXED } { 1, "always_powering_up_after_ac_mains_returns", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } Set Power Cycle Interval Request -------------------------------- FIID Template: tmpl_cmd_set_power_cycle_interval_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "interval", REQUIRED, LENGTH-FIXED } Set Power Cycle Interval Response --------------------------------- FIID Template: tmpl_cmd_set_power_cycle_interval_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get System Restart Cause Request -------------------------------- FIID Template: tmpl_cmd_get_system_restart_cause_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get System Restart Cause Response --------------------------------- FIID Template: tmpl_cmd_get_system_restart_cause_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "restart_cause", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "channel", REQUIRED, LENGTH-FIXED } Set System Boot Options Request ------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 296, "configuration_parameter_data", OPTIONAL, LENGTH-VARIABLE } Set System Boot Options Response -------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set System Boot Options (Set In Progress) Request ------------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Set System Boot Options (Service Partition Selector) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_system_boot_options_service_partition_selector_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 8, "service_partition_selector", REQUIRED, LENGTH-FIXED } Set System Boot Options (Service Partition Scan) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_service_partition_scan_rq {8, "cmd", REQUIRED, LENGTH-FIXED } {7, "parameter_selector", REQUIRED, LENGTH-FIXED } {1, "parameter_valid", REQUIRED, LENGTH-FIXED } {1, "service_partition_discovered", REQUIRED, LENGTH-FIXED } {1, "service_partition_scan", REQUIRED, LENGTH-FIXED } {6, "reserved", REQUIRED, LENGTH-FIXED } Set System Boot Options (BMC Boot Flag Valid Bit Clearing) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", REQUIRED, LENGTH-FIXED } { 1, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } Set System Boot Options (Boot Info Acknowledge) Request ------------------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_0", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_1", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_2", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_3", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_4", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_5", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_6", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_7", REQUIRED, LENGTH-FIXED } { 1, "bios_or_post_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "os_loader_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "os_or_service_partition_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "sms_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "oem_handled_boot_info", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } Set System Boot Options (Boot Flags) Request -------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_boot_flags_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "bios_boot_type", REQUIRED, LENGTH-FIXED } { 1, "boot_flags_persistent", REQUIRED, LENGTH-FIXED } { 1, "boot_flags_valid", REQUIRED, LENGTH-FIXED } { 1, "lock_out_reset_button", REQUIRED, LENGTH-FIXED } { 1, "screen_blank", REQUIRED, LENGTH-FIXED } { 4, "boot_device", REQUIRED, LENGTH-FIXED } { 1, "lock_keyboard", REQUIRED, LENGTH-FIXED } { 1, "cmos_clear", REQUIRED, LENGTH-FIXED } { 2, "console_redirection", REQUIRED, LENGTH-FIXED } { 1, "lock_out_sleep_button", REQUIRED, LENGTH-FIXED } { 1, "user_password_bypass", REQUIRED, LENGTH-FIXED } { 1, "force_progress_event_traps", REQUIRED, LENGTH-FIXED } { 2, "firmware_bios_verbosity", REQUIRED, LENGTH-FIXED } { 1, "lock_out_via_power_button", REQUIRED, LENGTH-FIXED } { 3, "bios_mux_control_override", REQUIRED, LENGTH-FIXED } { 1, "bios_shared_mode_override", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 5, "device_instance_selector", REQUIRED, LENGTH-FIXED } { 3, "reserved3", REQUIRED, LENGTH-FIXED } Set System Boot Options (Boot Initiator Info) Request ----------------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_boot_initiator_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 4, "boot_source.channel_number", REQUIRED, LENGTH-FIXED } { 4, "boot_source.reserved", REQUIRED, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 32, "boot_info_timestamp", REQUIRED, LENGTH-FIXED } Set System Boot Options (Boot Initiator Mailbox) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "block_data", OPTIONAL, LENGTH-VARIABLE } Get System Boot Options Request ------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get System Boot Options Response -------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 296, "configuration_parameter_data", OPTIONAL, LENGTH-VARIABLE } Get System Boot Options (Set In Progress) Response -------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_set_in_progress_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Get System Boot Options (Service Partition Selector) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_service_partition_selector_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 8, "service_partition_selector", REQUIRED, LENGTH-FIXED } Get System Boot Options (Service Partition Scan) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_service_partition_scan_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 1, "service_partition_discovered", REQUIRED, LENGTH-FIXED } { 1, "service_partition_scan", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Get System Boot Options (BMC Boot Flag Valid Bit Clearing) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", REQUIRED, LENGTH-FIXED } { 1, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", REQUIRED, LENGTH-FIXED } { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } Get System Boot Options (Boot Info Acknowledge) Response -------------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_boot_info_acknowledge_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_0", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_1", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_2", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_3", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_4", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_5", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_6", REQUIRED, LENGTH-FIXED } { 1, "enable_write_bit_7", REQUIRED, LENGTH-FIXED } { 1, "bios_or_post_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "os_loader_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "os_or_service_partition_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "sms_handled_boot_info", REQUIRED, LENGTH-FIXED } { 1, "oem_handled_boot_info", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } Get System Boot Options (Boot Flags) Response --------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_boot_flags_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "bios_boot_type", REQUIRED, LENGTH-FIXED } { 1, "boot_flags_persistent", REQUIRED, LENGTH-FIXED } { 1, "boot_flags_valid", REQUIRED, LENGTH-FIXED } { 1, "lock_out_reset_button", REQUIRED, LENGTH-FIXED } { 1, "screen_blank", REQUIRED, LENGTH-FIXED } { 4, "boot_device", REQUIRED, LENGTH-FIXED } { 1, "lock_keyboard", REQUIRED, LENGTH-FIXED } { 1, "cmos_clear", REQUIRED, LENGTH-FIXED } { 2, "console_redirection", REQUIRED, LENGTH-FIXED } { 1, "lock_out_sleep_button", REQUIRED, LENGTH-FIXED } { 1, "user_password_bypass", REQUIRED, LENGTH-FIXED } { 1, "force_progress_event_traps", REQUIRED, LENGTH-FIXED } { 2, "firmware_bios_verbosity", REQUIRED, LENGTH-FIXED } { 1, "lock_out_via_power_button", REQUIRED, LENGTH-FIXED } { 3, "bios_mux_control_override", REQUIRED, LENGTH-FIXED } { 1, "bios_shared_mode_override", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 5, "device_instance_selector", REQUIRED, LENGTH-FIXED } { 3, "reserved3", REQUIRED, LENGTH-FIXED } Get System Boot Options (Boot Initiator Info) Response ------------------------------------------------------ FIID Template: tmpl_cmd_get_system_boot_options_boot_initiator_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 4, "boot_source.channel_number", REQUIRED, LENGTH-FIXED } { 4, "boot_source.reserved", REQUIRED, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 32, "boot_info_timestamp", REQUIRED, LENGTH-FIXED } Get System Boot Options (Boot Initiator Mailbox) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_system_boot_options_boot_initiator_mailbox_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "parameter_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "parameter_valid", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "block_data", OPTIONAL, LENGTH-VARIABLE } Get Power On Hours Counter Request ---------------------------------- FIID Template: tmpl_cmd_get_power_on_hours_counter_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Power On Hours Counter Response ----------------------------------- FIID Template: tmpl_cmd_get_power_on_hours_counter_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "minutes_per_counter", REQUIRED, LENGTH-FIXED } { 32, "counter_reading", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_CHASSIS_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-dcmi-cmds-templates.h0000644002055400205540000007261013527331636027742 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_CMDS_TEMPLATES_H #define IPMI_DCMI_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. DCMI Rolling Average Time Period -------------------------------- FIID Template: tmpl_dcmi_rolling_average_time_period { 6, "time_duration", REQUIRED, LENGTH-FIXED } { 2, "time_duration_units", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Capability Info Request ------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Capability Info Response -------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1024, "parameter_data", REQUIRED, LENGTH-VARIABLE } DCMI Get DCMI Capability Info (Supported DCMI Capabilities) Response -------------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1, "mandatory_platform_capabilities.identification_support", REQUIRED, LENGTH-FIXED } { 1, "mandatory_platform_capabilities.sel_logging", REQUIRED, LENGTH-FIXED } { 1, "mandatory_platform_capabilities.chassis_power", REQUIRED, LENGTH-FIXED } { 1, "mandatory_platform_capabilities.temperature_monitor", REQUIRED, LENGTH-FIXED } { 4, "mandatory_platform_capabilities.reserved", REQUIRED, LENGTH-FIXED } { 1, "optional_platform_capabilities.power_management_monitoring_support", REQUIRED, LENGTH-FIXED } { 7, "optional_platform_capabilities.reserved", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.in_band_system_interface_channel_available", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.serial_tmode_available", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.out_of_band_secondary_lan_channel_available", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.out_of_band_primary_lan_channel_available", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.sol_supported", REQUIRED, LENGTH-FIXED } { 1, "manageability_access_capabilities.vlan_capable", REQUIRED, LENGTH-FIXED } { 2, "manageability_access_capabilities.reserved", REQUIRED, LENGTH-FIXED } Notes: Some fields not valid when parameter revision >= 2. Please see DCMI specification for details. DCMI Get DCMI Capability Info (Mandatory Platform Attributes) Response ---------------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 12, "sel_attributes.number_of_sel_entries", REQUIRED, LENGTH-FIXED } { 1, "sel_attributes.record_level_sel_flush_upon_rollover", REQUIRED, LENGTH-FIXED } { 1, "sel_attributes.entire_sel_flush_upon_rollover", REQUIRED, LENGTH-FIXED } { 1, "sel_attributes.reserved", REQUIRED, LENGTH-FIXED } { 1, "sel_attributes.sel_automatic_rollover_enabled", REQUIRED, LENGTH-FIXED } { 1, "identification_attributes.guid_support", REQUIRED, LENGTH-FIXED } { 1, "identification_attributes.dhcp_host_name_support", REQUIRED, LENGTH-FIXED } { 1, "identification_attributes.asset_tag_support", REQUIRED, LENGTH-FIXED } { 5, "identification_attributes.reserved", REQUIRED, LENGTH-FIXED } { 1, "temperature_monitoring.inlet_temperature", REQUIRED, LENGTH-FIXED } { 1, "temperature_monitoring.processors_temperature", REQUIRED, LENGTH-FIXED } { 1, "temperature_monitoring.baseboard_temperature", REQUIRED, LENGTH-FIXED } { 5, "temperature_monitoring.reserved", REQUIRED, LENGTH-FIXED } Notes: Some fields not valid when parameter revision >= 2. Please see DCMI specification for details. DCMI Get DCMI Capability Info (Optional Platform Attributes) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1, "power_management_device_slave_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "power_management_device_slave_address.slave_address", REQUIRED, LENGTH-FIXED } { 4, "power_management_controller_channel_number.device_revision", REQUIRED, LENGTH-FIXED } { 4, "power_management_controller_channel_number.channel_number", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Capability Info (Manageability Access Attributes) Response ------------------------------------------------------------------------ FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "mandatory_primary_lan_out_of_band_support_channel_number", REQUIRED, LENGTH-FIXED } { 8, "optional_secondary_lan_out_of_band_support_channel_number", REQUIRED, LENGTH-FIXED } { 8, "optional_serial_out_of_band_tmode_capability_channel_number", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Capability Info (Enhanced System Power Statistics Attributes) Response ------------------------------------------------------------------------------------ FIID Template: tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "number_of_supported_rolling_average_time_periods", REQUIRED, LENGTH-FIXED } { 2048, "rolling_average_time_periods", OPTIONAL, LENGTH-VARIABLE } DCMI Set DCMI Configuration Parameters Request ---------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } DCMI Set DCMI Configuration Parameters Response ----------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } DCMI Set DCMI Configuration Parameters (Activate DHCP) Response --------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "activate", REQUIRED, LENGTH-FIXED } DCMI Set DCMI Configuration Parameters (Discovery Configuration) Response ------------------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 1, "option_12", REQUIRED, LENGTH-FIXED } { 1, "option_60_with_option_43", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } { 1, "random_back_off", REQUIRED, LENGTH-FIXED } DCMI Set DCMI Configuration Parameters (DHCP Timing 1) Response --------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "initial_timeout_interval", REQUIRED, LENGTH-FIXED } DCMI Set DCMI Configuration Parameters (DHCP Timing 2) Response --------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 16, "server_contact_timeout_interval", REQUIRED, LENGTH-FIXED } DCMI Set DCMI Configuration Parameters (DHCP Timing 3) Response --------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 16, "server_contact_retry_interval", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Configuration Parameters Request ---------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Configuration Parameters Response ----------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1024, "parameter_data", REQUIRED, LENGTH-VARIABLE } DCMI Get DCMI Configuration Parameters (Discovery Configuration) Request ------------------------------------------------------------------------ FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1, "option_12", REQUIRED, LENGTH-FIXED } { 1, "option_60_with_option_43", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } { 1, "random_back_off", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Configuration Parameters (DHCP Timing 1) Request -------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "initial_timeout_interval", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Configuration Parameters (DHCP Timing 2) Request -------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 16, "server_contact_timeout_interval", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Configuration Parameters (DHCP Timing 3) Request -------------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.major_version", REQUIRED, LENGTH-FIXED } { 8, "dcmi_specification_conformance.minor_version", REQUIRED, LENGTH-FIXED } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 16, "server_contact_retry_interval", REQUIRED, LENGTH-FIXED } DCMI Get Asset Tag Request -------------------------- FIID Template: tmpl_cmd_dcmi_get_asset_tag_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "offset_to_read", REQUIRED, LENGTH-FIXED } { 8, "number_of_bytes_to_read", REQUIRED, LENGTH-FIXED } DCMI Get Asset Tag Response --------------------------- FIID Template: tmpl_cmd_dcmi_get_asset_tag_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_asset_tag_length", REQUIRED, LENGTH-FIXED } { 512, "data", OPTIONAL, LENGTH-VARIABLE } DCMI Set Asset Tag Request -------------------------- FIID Template: tmpl_cmd_dcmi_set_asset_tag_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "offset_to_write", REQUIRED, LENGTH-FIXED } { 8, "number_of_bytes_to_write", REQUIRED, LENGTH-FIXED } { 512, "data", OPTIONAL, LENGTH-VARIABLE } DCMI Set Asset Tag Response --------------------------- FIID Template: tmpl_cmd_dcmi_set_asset_tag_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_asset_tag_length_written", REQUIRED, LENGTH-FIXED } DCMI Get Management Controller Identifier String Request -------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_management_controller_identifier_string_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "offset_to_read", REQUIRED, LENGTH-FIXED } { 8, "number_of_bytes_to_read", REQUIRED, LENGTH-FIXED } DCMI Get Management Controller Identifier String Response --------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_get_management_controller_identifier_string_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_length", REQUIRED, LENGTH-FIXED } { 512, "data", OPTIONAL, LENGTH-VARIABLE } DCMI Set Management Controller Identifier String Request -------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_management_controller_identifier_string_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "offset_to_write", REQUIRED, LENGTH-FIXED } { 8, "number_of_bytes_to_write", REQUIRED, LENGTH-FIXED } { 512, "data", OPTIONAL, LENGTH-VARIABLE } DCMI Set Management Controller Identifier String Response --------------------------------------------------------- FIID Template: tmpl_cmd_dcmi_set_management_controller_identifier_string_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_length_written", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Sensor Info Request --------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_sensor_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 8, "entity_instance", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_start", REQUIRED, LENGTH-FIXED } DCMI Get DCMI Sensor Info Response ---------------------------------- FIID Template: tmpl_cmd_dcmi_get_dcmi_sensor_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_number_of_available_instances", REQUIRED, LENGTH-FIXED } { 8, "number_of_record_ids_in_this_response", REQUIRED, LENGTH-FIXED } { 4096, "sdr_record_ids", OPTIONAL, LENGTH-VARIABLE } Notes: Record IDs LS byte first. DCMI Get Power Reading Request ------------------------------ FIID Template: tmpl_cmd_dcmi_get_power_reading_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "mode", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } DCMI Get Power Reading Response ------------------------------- FIID Template: tmpl_cmd_dcmi_get_power_reading_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 16, "current_power", REQUIRED, LENGTH-FIXED } { 16, "minimum_power_over_sampling_duration", REQUIRED, LENGTH-FIXED } { 16, "maximum_power_over_sampling_duration", REQUIRED, LENGTH-FIXED } { 16, "average_power_over_sampling_duration", REQUIRED, LENGTH-FIXED } { 32, "time_stamp", REQUIRED, LENGTH-FIXED } { 32, "statistics_reporting_time_period", REQUIRED, LENGTH-FIXED } { 6, "power_reading_state.reserved1", REQUIRED, LENGTH-FIXED } { 1, "power_reading_state.power_measurement", REQUIRED, LENGTH-FIXED } { 1, "power_reading_state.reserved2", REQUIRED, LENGTH-FIXED } DCMI Get Power Limit Request ---------------------------- FIID Template: tmpl_cmd_dcmi_get_power_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } DCMI Get Power Limit Response ----------------------------- FIID Template: tmpl_cmd_dcmi_get_power_limit_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 16, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "exception_actions", REQUIRED, LENGTH-FIXED } { 16, "power_limit_requested", REQUIRED, LENGTH-FIXED } { 32, "correction_time_limit", REQUIRED, LENGTH-FIXED } { 16, "reserved2", REQUIRED, LENGTH-FIXED } { 16, "management_application_statistics_sampling_period", REQUIRED, LENGTH-FIXED } DCMI Set Power Limit Request ---------------------------- FIID Template: tmpl_cmd_dcmi_set_power_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 24, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "exception_actions", REQUIRED, LENGTH-FIXED } { 16, "power_limit_requested", REQUIRED, LENGTH-FIXED } { 32, "correction_time_limit", REQUIRED, LENGTH-FIXED } { 16, "reserved2", REQUIRED, LENGTH-FIXED } { 16, "management_application_statistics_sampling_period", REQUIRED, LENGTH-FIXED } DCMI Set Power Limit Response ----------------------------- FIID Template: tmpl_cmd_dcmi_set_power_limit_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } DCMI Activate/Deactivate Power Limit Request -------------------------------------------- FIID Template: tmpl_cmd_dcmi_activate_deactivate_power_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "power_limit_activation", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } DCMI Activate/Deactivate Power Limit Response --------------------------------------------- FIID Template: tmpl_cmd_dcmi_activate_deactivate_power_limit_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } DCMI Get Thermal Limit Request ------------------------------ FIID Template: tmpl_cmd_dcmi_get_thermal_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 8, "entity_instance", REQUIRED, LENGTH-FIXED } DCMI Get Thermal Limit Response ------------------------------- FIID Template: tmpl_cmd_dcmi_get_thermal_limit_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "temperature_limit", REQUIRED, LENGTH-FIXED } { 5, "exception_actions.reserved1", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.log_event_to_sel_only", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.hard_power_off_system_and_log_event", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.reserved2", REQUIRED, LENGTH-FIXED } { 16, "exception_time", REQUIRED, LENGTH-FIXED } DCMI Set Thermal Limit Request ------------------------------ FIID Template: tmpl_cmd_dcmi_set_thermal_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 8, "entity_instance", REQUIRED, LENGTH-FIXED } { 8, "temperature_limit", REQUIRED, LENGTH-FIXED } { 5, "exception_actions.reserved1", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.log_event_to_sel_only", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.hard_power_off_system_and_log_event", REQUIRED, LENGTH-FIXED } { 1, "exception_actions.reserved2", REQUIRED, LENGTH-FIXED } { 16, "exception_time", REQUIRED, LENGTH-FIXED } DCMI Set Thermal Limit Response ------------------------------- FIID Template: tmpl_cmd_dcmi_set_thermal_limit_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } DCMI Get Temperature Reading Request ------------------------------------ FIID Template: tmpl_cmd_dcmi_get_temperature_reading_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 8, "entity_instance", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_start", REQUIRED, LENGTH-FIXED } DCMI Get Temperature Reading Response ------------------------------------- FIID Template: tmpl_cmd_dcmi_get_temperature_reading_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "group_extension_identification", REQUIRED, LENGTH-FIXED } { 8, "total_number_of_available_instances", REQUIRED, LENGTH-FIXED } { 8, "number_of_sets_of_temperature_data", REQUIRED, LENGTH-FIXED } { 8, "temperature1", OPTIONAL, LENGTH-FIXED } { 8, "temperature2", OPTIONAL, LENGTH-FIXED } { 8, "temperature3", OPTIONAL, LENGTH-FIXED } { 8, "temperature4", OPTIONAL, LENGTH-FIXED } { 8, "temperature5", OPTIONAL, LENGTH-FIXED } { 8, "temperature6", OPTIONAL, LENGTH-FIXED } { 8, "temperature7", OPTIONAL, LENGTH-FIXED } { 8, "temperature8", OPTIONAL, LENGTH-FIXED } Notes: temperature fields are signed ints. #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_DCMI_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-device-global-cmds-templates.h0000644002055400205540000001724513527331636031526 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_GLOBAL_CMDS_TEMPLATES_H #define IPMI_DEVICE_GLOBAL_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get Device ID Request --------------------- FIID Template: tmpl_cmd_get_device_id_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Device ID Response ---------------------- FIID Template: tmpl_cmd_get_device_id_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "device_id", REQUIRED, LENGTH-FIXED } { 4, "device_revision.revision", REQUIRED, LENGTH-FIXED } { 3, "device_revision.reserved1", REQUIRED, LENGTH-FIXED } { 1, "device_revision.sdr_support", REQUIRED, LENGTH-FIXED } { 7, "firmware_revision1.major_revision", REQUIRED, LENGTH-FIXED } { 1, "firmware_revision1.device_available", REQUIRED, LENGTH-FIXED } { 8, "firmware_revision2.minor_revision", REQUIRED, LENGTH-FIXED } { 4, "ipmi_version_major", REQUIRED, LENGTH-FIXED } { 4, "ipmi_version_minor", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.sensor_device", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.sdr_repository_device", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.sel_device", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.fru_inventory_device", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.ipmb_event_receiver", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.ipmb_event_generator", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.bridge", REQUIRED, LENGTH-FIXED } { 1, "additional_device_support.chassis_device", REQUIRED, LENGTH-FIXED } { 20, "manufacturer_id.id", REQUIRED, LENGTH-FIXED } { 4, "manufacturer_id.reserved1", REQUIRED, LENGTH-FIXED } { 16, "product_id", REQUIRED, LENGTH-FIXED } { 32, "auxiliary_firmware_revision_information", OPTIONAL, LENGTH-FIXED } Cold Reset Request ------------------ FIID Template: tmpl_cmd_cold_reset_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Cold Reset Response ------------------- FIID Template: tmpl_cmd_cold_reset_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Warm Reset Request ------------------ FIID Template: tmpl_cmd_warm_reset_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Warm Reset Response ------------------- FIID Template: tmpl_cmd_warm_reset_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set ACPI Power State Request ---------------------------- FIID Template: tmpl_cmd_set_acpi_power_state_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "system_power_state_enumeration", REQUIRED, LENGTH-FIXED } { 1, "set_system_power_state", REQUIRED, LENGTH-FIXED } { 7, "device_power_state_enumeration", REQUIRED, LENGTH-FIXED } { 1, "set_device_power_state", REQUIRED, LENGTH-FIXED } Set ACPI Power State Response ----------------------------- FIID Template: tmpl_cmd_set_acpi_power_state_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get ACPI Power State Request ---------------------------- FIID Template: tmpl_cmd_get_acpi_power_state_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get ACPI Power State Response ----------------------------- FIID Template: tmpl_cmd_get_acpi_power_state_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 7, "system_power_state_enumeration", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "device_power_state_enumeration", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } Get Self Test Results Request ----------------------------- FIID Template: tmpl_cmd_get_self_test_results_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Self Test Results Response ------------------------------ FIID Template: tmpl_cmd_get_self_test_results_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "self_test_result", REQUIRED, LENGTH-FIXED } { 1, "controller_operation_firmware_corrupted", REQUIRED, LENGTH-FIXED } { 1, "controller_update_boot_block_firmware_corrupted", REQUIRED, LENGTH-FIXED } { 1, "internal_use_area_of_bmc_fru_corrupted", REQUIRED, LENGTH-FIXED } { 1, "sdr_repository_empty", REQUIRED, LENGTH-FIXED } { 1, "ipmb_signal_lines_do_not_respond", REQUIRED, LENGTH-FIXED } { 1, "cannot_access_bmc_fru_device", REQUIRED, LENGTH-FIXED } { 1, "cannot_access_sdr_repository", REQUIRED, LENGTH-FIXED } { 1, "cannot_access_sel_device", REQUIRED, LENGTH-FIXED } Get Device GUID Request ----------------------- FIID Template: tmpl_cmd_get_device_guid_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Device GUID Response ------------------------ FIID Template: tmpl_cmd_get_device_guid_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "guid", REQUIRED, LENGTH-FIXED } Get Device GUID (with Format) Response -------------------------------------- FIID Template: tmpl_cmd_get_device_guid_format_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 48, "node", REQUIRED, LENGTH-FIXED } { 8, "clock_seq_low", REQUIRED, LENGTH-FIXED } { 8, "clock_seq_hi_and_reserved", REQUIRED, LENGTH-FIXED } { 16, "time_high_and_version", REQUIRED, LENGTH-FIXED } { 16, "time_mid", REQUIRED, LENGTH-FIXED } { 32, "time_low", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_GLOBAL_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-event-cmds-templates.h0000644002055400205540000000761413527331636030151 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_EVENT_CMDS_TEMPLATES_H #define IPMI_EVENT_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Set Event Receiver Request -------------------------- FIID Template: tmpl_cmd_set_event_receiver_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "event_receiver_slave_address", REQUIRED, LENGTH-FIXED } { 2, "event_receiver_lun", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Set Event Receiver Response --------------------------- FIID Template: tmpl_cmd_set_event_receiver_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Event Receiver Request -------------------------- FIID Template: tmpl_cmd_get_event_receiver_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Event Receiver Response --------------------------- FIID Template: tmpl_cmd_get_event_receiver_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "event_receiver_slave_address", REQUIRED, LENGTH-FIXED } { 2, "event_receiver_lun", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Platform Event Request ---------------------- FIID Template: tmpl_cmd_platform_event_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "generator_id", OPTIONAL, LENGTH-FIXED } { 8, "event_message_format_version", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "event_type_code", REQUIRED, LENGTH-FIXED } { 1, "event_dir", REQUIRED, LENGTH-FIXED } { 8, "event_data1", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Platform Event Response ----------------------- FIID Template: tmpl_cmd_platform_event_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_CMDS_TEMPLATES_H */ ipmi-firmware-firewall-command-discovery-cmds-templates.h0000644002055400205540000003204713527331636036007 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FIRMWARE_FIRMWARE_COMMAND_DISCOVERY_CMDS_TEMPLATES_H #define IPMI_FIRMWARE_FIRMWARE_COMMAND_DISCOVERY_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get NetFN Support Request ------------------------- FIID Template: tmpl_cmd_get_netfn_support_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get NetFN Support Response -------------------------- FIID Template: tmpl_cmd_get_netfn_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 2, "lun0", REQUIRED, LENGTH-FIXED } { 2, "lun1", REQUIRED, LENGTH-FIXED } { 2, "lun2", REQUIRED, LENGTH-FIXED } { 2, "lun3", REQUIRED, LENGTH-FIXED } { 32, "lun0_netfn_support_bitmask", REQUIRED, LENGTH-FIXED } { 32, "lun1_netfn_support_bitmask", REQUIRED, LENGTH-FIXED } { 32, "lun2_netfn_support_bitmask", REQUIRED, LENGTH-FIXED } { 32, "lun3_netfn_support_bitmask", REQUIRED, LENGTH-FIXED } Get Command Support Request --------------------------- FIID Template: tmpl_cmd_get_command_support_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Command Support Response ---------------------------- FIID Template: tmpl_cmd_get_command_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "command_support_mask", REQUIRED, LENGTH-FIXED } Get Command Sub-Function Support Request ---------------------------------------- FIID Template: tmpl_cmd_get_command_sub_function_support_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Command Sub-Function Support (Specification Errata) Response ---------------------------------------------------------------- FIID Template: tmpl_cmd_get_command_sub_function_support_specification_errata_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "errata_version", REQUIRED, LENGTH-FIXED } { 4, "specification_type", REQUIRED, LENGTH-FIXED } { 8, "specification_version", REQUIRED, LENGTH-FIXED } { 8, "specification_revision", REQUIRED, LENGTH-FIXED } { 32, "sub_function_support_mask", REQUIRED, LENGTH-FIXED } Get Command Sub-Function Support (Extension Errata) Response ------------------------------------------------------------ FIID Template: tmpl_cmd_get_command_sub_function_support_extension_errata_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "oem_group_defining_body_errata", REQUIRED, LENGTH-FIXED } { 8, "specification_version", REQUIRED, LENGTH-FIXED } { 8, "specification_revision", REQUIRED, LENGTH-FIXED } { 32, "sub_function_support_mask", REQUIRED, LENGTH-FIXED } Get Configurable Commands Request --------------------------------- FIID Template: tmpl_cmd_get_configurable_commands_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Configurable Commands Response ---------------------------------- FIID Template: tmpl_cmd_get_configurable_commands_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "command_support_mask", REQUIRED, LENGTH-FIXED } Get Configurable Command Sub-Functions Request ---------------------------------------------- FIID Template: tmpl_cmd_get_configurable_command_sub_functions_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Configurable Command Sub-Functions Response ----------------------------------------------- FIID Template: tmpl_cmd_get_configurable_command_sub_functions_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "sub_function_enables1", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables2", OPTIONAL, LENGTH-FIXED } Set Command Enables Request --------------------------- FIID Template: tmpl_cmd_set_command_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 128, "enable_disable_mask", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Set Command Enables Response ---------------------------- FIID Template: tmpl_cmd_set_command_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Command Enables Request --------------------------- FIID Template: tmpl_cmd_get_command_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Command Enables Response ---------------------------- FIID Template: tmpl_cmd_get_command_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "enable_disable_mask", REQUIRED, LENGTH-FIXED } Set Command Sub-Function Enables Request ---------------------------------------- FIID Template: tmpl_cmd_set_command_sub_function_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables1", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables2", OPTIONAL, LENGTH-FIXED } Set Command Sub-Function Enables (Defining Body Code) Request ------------------------------------------------------------- FIID Template: tmpl_cmd_set_command_sub_function_enables_defining_body_code_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 8, "defining_body_code", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables1", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables2", OPTIONAL, LENGTH-FIXED } Set Command Sub-Function Enables (OEM IANA) Request --------------------------------------------------- FIID Template: tmpl_cmd_set_command_sub_function_enables_oem_iana_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 24, "oem_iana", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables1", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables2", OPTIONAL, LENGTH-FIXED } Set Command Sub-Function Enables Response ----------------------------------------- FIID Template: tmpl_cmd_set_command_sub_function_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Command Sub-Function Enables Request ---------------------------------------- FIID Template: tmpl_cmd_get_command_sub_function_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "command", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } Get Command Sub-Function Enables Response ----------------------------------------- FIID Template: tmpl_cmd_get_command_sub_function_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "sub_function_enables1", REQUIRED, LENGTH-FIXED } { 32, "sub_function_enables2", OPTIONAL, LENGTH-FIXED } Get OEM NetFN IANA Support Request ---------------------------------- FIID Template: tmpl_cmd_get_oem_netfn_iana_support_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 6, "list_index", REQUIRED, LENGTH-FIXED } { 2, "reserved3", REQUIRED, LENGTH-FIXED } Get OEM NetFN IANA Support Response ----------------------------------- FIID Template: tmpl_cmd_get_oem_netfn_iana_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 7, "last_iana", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 2, "lun0", REQUIRED, LENGTH-FIXED } { 2, "lun1", REQUIRED, LENGTH-FIXED } { 2, "lun2", REQUIRED, LENGTH-FIXED } { 2, "lun3", REQUIRED, LENGTH-FIXED } { 24, "net_fn_data", OPTIONAL, LENGTH-VARIABLE } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_EVENT_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h0000644002055400205540000007323113527331636033073 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_DIMMSPD_RECORD_FORMAT_TEMPLATES_H #define IPMI_FRU_DIMMSPD_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. DDR Header ---------- FIID Template: tmpl_fru_dimm_spd_ddr_header /* Byte 0: Number of Bytes Used/ Number of Bytes in SPD Device / CRC Coverage */ { 4, "spd_bytes_used", REQUIRED, LENGTH-FIXED } { 3, "spd_bytes_total", REQUIRED, LENGTH-FIXED } { 1, "crc_coverage", REQUIRED, LENGTH-FIXED } /* Byte 1: SPD Revision (X.Y = encoding_level.additions_level) */ { 4, "additions_level", REQUIRED, LENGTH-FIXED } { 4, "encoding_level", REQUIRED, LENGTH-FIXED } /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", REQUIRED, LENGTH-FIXED } /* Byte 3: Key Byte / Module Type */ { 4, "module_type", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } DDR3 SDRAM SPD -------------- FIID Template: tmpl_fru_dimm_spd_ddr3_record /* Byte 0: Number of Bytes Used/ Number of Bytes in SPD Device / CRC Coverage */ { 4, "spd_bytes_used", REQUIRED, LENGTH-FIXED } { 3, "spd_bytes_total", REQUIRED, LENGTH-FIXED } { 1, "crc_coverage", REQUIRED, LENGTH-FIXED } /* Byte 1: SPD Revision (X.Y = encoding_level.additions_level) */ { 4, "additions_level", REQUIRED, LENGTH-FIXED } { 4, "encoding_level", REQUIRED, LENGTH-FIXED } /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", REQUIRED, LENGTH-FIXED } /* Byte 3: Key Byte / Module Type */ { 4, "module_type", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } /* Byte 4: SDRAM Density and Banks */ /* in megabits */ { 4, "total_sdram_capacity", REQUIRED, LENGTH-FIXED } { 3, "bank_address_bits", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } /* Byte 5: SDRAM Addressing */ { 3, "column_address_bits", REQUIRED, LENGTH-FIXED } { 3, "row_address_bits", REQUIRED, LENGTH-FIXED } { 2, "reserved3", REQUIRED, LENGTH-FIXED } /* Byte 6: Module Nominal Voltage, VDD */ { 1, "module_minimum_nominal_voltage.1_5", REQUIRED, LENGTH-FIXED } { 1, "module_minimum_nominal_voltage.1_35", REQUIRED, LENGTH-FIXED } { 1, "module_minimum_nominal_voltage.1_25", REQUIRED, LENGTH-FIXED } { 5, "reserved4", REQUIRED, LENGTH-FIXED } /* Byte 7: Module Organization */ { 3, "sdram_device_width", REQUIRED, LENGTH-FIXED } { 3, "number_of_ranks", REQUIRED, LENGTH-FIXED } { 2, "reserved5", REQUIRED, LENGTH-FIXED } /* Byte 8: Module Memory Bus Width */ { 3, "primary_bus_width", REQUIRED, LENGTH-FIXED } { 2, "bus_width_extension", REQUIRED, LENGTH-FIXED } { 3, "reserve6", REQUIRED, LENGTH-FIXED } /* Byte 9: Fine Timebase (FTB) Dividend / Divisor */ { 4, "fine_timebase_divisor", REQUIRED, LENGTH-FIXED } { 4, "fine_timebase_dividend", REQUIRED, LENGTH-FIXED } /* Byte 10: Medium Timebase (MTB) Dividend */ { 8, "medium_timebase_dividend", REQUIRED, LENGTH-FIXED } /* Byte 11: Medium Timebase (MTB) Divisor */ { 8, "medium_timebase_divisor", REQUIRED, LENGTH-FIXED } /* Byte 12: SDRAM Minimum Cycle Time (t_ck min) (MTB Units) */ { 8, "minimum_sdram_cycle_time", REQUIRED, LENGTH-FIXED } { 8, "reserved7", REQUIRED, LENGTH-FIXED } /* Byte 14-15: CAS Latencies Supported */ { 16, "cas_latencies_supported", REQUIRED, LENGTH-FIXED } /* Byte 16: Minimum CAS Latency Time (t_aa min) (MTB Units) */ { 8, "minimum_sdram_cas_latency_time", REQUIRED, LENGTH-FIXED } /* Byte 17: Minimum Write Recovery Time (t_wr min) (MTB Units) */ { 8, "minimum_write_recovery_time", REQUIRED, LENGTH-FIXED } /* Byte 18: Minimum RAS# to CAS# Delay Time (t_rcd min) */ { 8, "minimum_ras_to_cas_delay", REQUIRED, LENGTH-FIXED } /* Byte 19: Minimum Row Active to Row Active Delay Time (t_rrd min) (MTB Units) */ { 8, "minimum_row_active_to_row_active_delay", REQUIRED, LENGTH-FIXED } /* Byte 20: Minimum Row Precharge Delay Time (t_rp min) (MTB Units) */ { 8, "minimum_row_precharge_time", REQUIRED, LENGTH-FIXED } /* Byte 21: Upper Nibbles for t_ras and t_rc */ { 4, "t_ras_msn", REQUIRED, LENGTH-FIXED } { 4, "t_rc_msn", REQUIRED, LENGTH-FIXED } /* Byte 22: Minimum Active to Precharge Delay Time (t_ras min), LSB (MTB Units) */ { 8, "minimum_active_to_precharge_time", REQUIRED, LENGTH-FIXED } /* Byte 23: Minimum Active to Active/Refresh Delay Time (t_rc min), LSB (MTB Units) */ { 8, "minimum_active_to_active_refresh_time", REQUIRED, LENGTH-FIXED } /* Byte 24-25: Minimum Refresh Recovery Delay Time (t_rfc min) (MTB Units) */ { 16, "minimum_active_to_active_refresh_time", REQUIRED, LENGTH-FIXED } /* Byte 26: Minimum Internal Write to Read Command Delay Time (t_wtr min) (MTB Units) */ { 8, "internal_write_to_read_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 27: Minimum Internal Read to Precharge Command Delay Time (t_rtp min) (MTB Units) */ { 8, "internal_read_to_precharge_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 28: Upper Nibble for t_faw */ { 4, "t_faw_msn", REQUIRED, LENGTH-FIXED } { 4, "reserved8", REQUIRED, LENGTH-FIXED } /* Byte 29: Minimum Four Active Window Delay Time (t_faw min), LSB (MTB Units) */ { 8, "minimum_four_active_window_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 30: SDRAM Optional Features */ { 1, "rzq_6_supported", REQUIRED, LENGTH-FIXED } { 1, "rzq_7_supported", REQUIRED, LENGTH-FIXED } { 5, "reserved9", REQUIRED, LENGTH-FIXED } { 1, "dll_off_mode_supported", REQUIRED, LENGTH-FIXED } /* Byte 31: SDRAM Thermal and Refresh Options */ { 1, "extended_temperature_range", REQUIRED, LENGTH-FIXED } { 1, "extended_temperature_refresh_rate", REQUIRED, LENGTH-FIXED } { 1, "auto_self_refresh", REQUIRED, LENGTH-FIXED } { 1, "on_die_thermal_sensor_readout", REQUIRED, LENGTH-FIXED } { 3, "reserved10", REQUIRED, LENGTH-FIXED } { 1, "partial_array_self_refresh", REQUIRED, LENGTH-FIXED } /* Byte 32: Module Thermal Sensor */ { 7, "thermal_sensor_accuracy", REQUIRED, LENGTH-FIXED } { 1, "thermal_sensor_incorporated", REQUIRED, LENGTH-FIXED } /* Byte 33: SDRAM Device Type */ { 2, "signal_loading", REQUIRED, LENGTH-FIXED } { 2, "reserved11", REQUIRED, LENGTH-FIXED } { 3, "die_count", REQUIRED, LENGTH-FIXED } { 1, "sdram_device_type", REQUIRED, LENGTH-FIXED } /* Byte 34: Fine Offset for SDRAM Minimum Cycle Time (tCKmin) */ { 8, "fine_offset_for_sdram_minimum_cycle_time", REQUIRED, LENGTH-FIXED } /* Byte 35: Fine Offset for Minimum CAS Latency Time (tAAmin) */ { 8, "fine_offset_for_minimum_cas_latency_time", REQUIRED, LENGTH-FIXED } /* Byte 36: Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) */ { 8, "fine_offset_for_minimum_ras_to_cas_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 37: Minimum Row Precharge Delay Time (tRPmin) */ { 8, "minimum_row_precharge_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 38: Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) */ { 8, "fine_offset_for_minimum_active_to_active_refresh_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 39-59: Reserved */ { 168, "reserved12", REQUIRED, LENGTH-FIXED } /* Byte 60-116: Module-Specific Section */ { 456, "module_specific_section", REQUIRED, LENGTH-FIXED } /* Byte 117-125: Unique Module ID */ { 7, "number_of_continuation_codes_module_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_module_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_module_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "module_manufacturing_location", REQUIRED, LENGTH-FIXED } { 8, "module_manufacturing_date.year", REQUIRED, LENGTH-FIXED } /* BCD encoded */ { 8, "module_manufacturing_date.week", REQUIRED, LENGTH-FIXED } /* BCD encoded */ { 32, "module_serial_number", REQUIRED, LENGTH-FIXED } /* Bytes 126-127: SPD Cyclical Redundancy Code (CRC) */ { 16, "crc", REQUIRED, LENGTH-FIXED } /* Bytes 128-145: Module Part Number */ { 144, "module_part_number", REQUIRED, LENGTH-FIXED } /* ASCII */ /* Bytes 146-147: Module Revision Code */ { 16, "module_revision_code", REQUIRED, LENGTH-FIXED } /* Bytes 148-149: DRAM Manufacturer ID Code */ { 7, "number_of_continuation_codes_dram_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_dram_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_dram_manufacturer", REQUIRED, LENGTH-FIXED } /* Bytes 150-175: Manufacturer's Specific Data */ { 208, "manufacturer_specific_data", REQUIRED, LENGTH-FIXED } /* Bytes 176-255: Manufacturer's Specific Data */ { 640, "open_for_customer_use", REQUIRED, LENGTH-FIXED } DDR4 SDRAM SPD -------------- FIID Template: tmpl_fru_dimm_spd_ddr4_record /* Byte 0: Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage */ { 4, "spd_bytes_used", REQUIRED, LENGTH-FIXED } { 3, "spd_bytes_total", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } /* Byte 1: SPD Revision */ { 4, "additions_level", REQUIRED, LENGTH-FIXED } { 4, "encoding_level", REQUIRED, LENGTH-FIXED } /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", REQUIRED, LENGTH-FIXED } /* Byte 3: Key Byte / Module Type */ { 4, "module_type", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } /* Byte 4: SDRAM Density and Banks */ /* in megabits */ { 4, "total_sdram_capacity", REQUIRED, LENGTH-FIXED } { 2, "bank_address_bits", REQUIRED, LENGTH-FIXED } { 2, "bank_group_bits", REQUIRED, LENGTH-FIXED } /* Byte 5: SDRAM Addressing */ { 3, "column_address_bits", REQUIRED, LENGTH-FIXED } { 3, "row_address_bits", REQUIRED, LENGTH-FIXED } { 2, "reserved3", REQUIRED, LENGTH-FIXED } /* Byte 6: SDRAM Package Type */ { 2, "signal_loading", REQUIRED, LENGTH-FIXED } { 2, "reserved4", REQUIRED, LENGTH-FIXED } { 3, "die_count", REQUIRED, LENGTH-FIXED } { 1, "sdram_package_type", REQUIRED, LENGTH-FIXED } /* Byte 7: SDRAM Optional Features */ { 4, "maximum_activate_count", REQUIRED, LENGTH-FIXED } { 2, "maximum_activate_window", REQUIRED, LENGTH-FIXED } { 2, "reserved5", REQUIRED, LENGTH-FIXED } /* Byte 8: SDRAM Thermal and Refresh Options */ { 8, "reserved6", REQUIRED, LENGTH-FIXED } /* Byte 9: Other SDRAM Optional Features */ { 6, "reserved7", REQUIRED, LENGTH-FIXED } { 2, "post_package_repair", REQUIRED, LENGTH-FIXED } /* Byte 10: Reserved */ { 8, "reserved8", REQUIRED, LENGTH-FIXED } /* Byte 11: Module Nominal Voltage, VDD */ { 1, "module_nominal_voltage.dram_vdd.1_2_operable", REQUIRED, LENGTH-FIXED } { 1, "module_nominal_voltage.dram_vdd.1_2_endurant", REQUIRED, LENGTH-FIXED } { 1, "module_nominal_voltage.dram_vdd.TBD1_operable", REQUIRED, LENGTH-FIXED } { 1, "module_nominal_voltage.dram_vdd.TBD1_endurant", REQUIRED, LENGTH-FIXED } { 1, "module_nominal_voltage.dram_vdd.TBD2_operable", REQUIRED, LENGTH-FIXED } { 1, "module_nominal_voltage.dram_vdd.TBD2_endurant", REQUIRED, LENGTH-FIXED } { 2, "reserved9", REQUIRED, LENGTH-FIXED } /* Byte 12: Module Organization */ { 3, "sdram_device_width", REQUIRED, LENGTH-FIXED } { 3, "number_of_package_ranks_per_dimm", REQUIRED, LENGTH-FIXED } { 2, "reserved10", REQUIRED, LENGTH-FIXED } /* Byte 13: Module Memory Bus Width */ { 3, "primary_bus_width", REQUIRED, LENGTH-FIXED } { 2, "bus_width_extension", REQUIRED, LENGTH-FIXED } { 3, "reserve11", REQUIRED, LENGTH-FIXED } /* Byte 14: Module Thermal Sensor */ { 7, "reserved12", REQUIRED, LENGTH-FIXED } { 1, "thermal_sensor", REQUIRED, LENGTH-FIXED } /* Byte 15: Extended module type */ { 4, "extended_base_module_type", REQUIRED, LENGTH-FIXED } { 4, "reserved13", REQUIRED, LENGTH-FIXED } /* Byte 16: Reserved */ { 8, "reserved14", REQUIRED, LENGTH-FIXED } /* Byte 17: Timebases */ { 2, "fine_timebase", REQUIRED, LENGTH-FIXED } { 2, "medium_timebase", REQUIRED, LENGTH-FIXED } { 4, "reserved15", REQUIRED, LENGTH-FIXED } /* Byte 18: SDRAM Minimum Cycle Time (t_ckavg min) */ { 8, "minimum_sdram_cycle_time", REQUIRED, LENGTH-FIXED } /* Byte 19: SDRAM Maximum Cycle Time (t_ckavg max) */ { 8, "maximum_sdram_cycle_time", REQUIRED, LENGTH-FIXED } /* Byte 20-23: CAS Latencies Supported */ { 32, "cas_latencies_supported", REQUIRED, LENGTH-FIXED } /* Byte 24: Minimum CAS Latency Time (t_aa min) */ { 8, "minimum_sdram_cas_latency_time", REQUIRED, LENGTH-FIXED } /* Byte 25: Minimum RAS to CAS Delay Time (t_rcd min) */ { 8, "minimum_sdram_ras_to_cas_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 26: Minimum Row Precharge Delay Time (t_rp min) */ { 8, "minimum_row_precharge_time", REQUIRED, LENGTH-FIXED } /* Byte 27: Upper Nibbles for t_ras min and t_rc min */ { 4, "t_ras_min_msn", REQUIRED, LENGTH-FIXED } { 4, "t_rc_min_msn", REQUIRED, LENGTH-FIXED } /* Byte 28: Minimum Active to Precharge Delay Time (t_ras min), LSB */ { 8, "minimum_active_to_precharge_time", REQUIRED, LENGTH-FIXED } /* Byte 29: Minimum Active to Active/Refresh Delay Time (t_rc min), LSB */ { 8, "minimum_active_to_active_refresh_time", REQUIRED, LENGTH-FIXED } /* Byte 30-31: Minimum Refresh Recovery Delay Time (t_RFC1 min) */ { 16, "minimum_refresh_recovery_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 32-33: Minimum Refresh Recovery Delay Time (t_RFC2 min) */ { 16, "minimum_refresh_recovery_delay_time1", REQUIRED, LENGTH-FIXED } /* Byte 34-35: Minimum Refresh Recovery Delay Time (t_RFC4 min) */ { 16, "minimum_refrsh_recovery_delay_time4", REQUIRED, LENGTH-FIXED } /* Byte 36: Minimum Four Activate Window Time (t_FAW min), Most Significant Nibble */ { 4, "tfaw_msn", REQUIRED, LENGTH-FIXED } { 4, "reserved16", REQUIRED, LENGTH-FIXED } /* Byte 37: Minimum Four Activate Window Time (t_FAW min), Least Significant Byte */ { 8, "minimum_four_activate_window_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 38: Minimum Activate to Activate Delay Time (t_RRD_S min), different bank group */ { 8, "minimum_active_to_active_refresh_time_different_bank_group", REQUIRED, LENGTH-FIXED } /* Byte 39: Minimum Activate to Activate Delay Time (t_RRD_S min), same bank group */ { 8, "minimum_active_to_active_refresh_time_same_bank_group", REQUIRED, LENGTH-FIXED } /* Byte 40: Minimum CAS to CAS Delay Time (t_CCD_L min), same bank group */ { 8, "minimum_cas_to_cas_time_same_bank_group", REQUIRED, LENGTH-FIXED } /* Byte 41-59: Reserved */ { 152, "reserved17", REQUIRED, LENGTH-FIXED } /* Byte 60-77: Connector to SDRAM Bit Mapping */ { 144, "connector_to_sdram_bit_mapping", REQUIRED, LENGTH-FIXED } /* Byte 78-116: Reserved */ { 312, "reserved18", REQUIRED, LENGTH-FIXED } /* Byte 117: Fine Offset for Minimum CAS to CAS Delay Time (t_CCD_L min), same bank group */ { 8, "fine_offset_for_minimum_cas_to_cas_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 118: Fine Offset for Minimum Activate to Activate Delay Time (t_RRD_L min), same bank group */ { 8, "fine_offset_for_minimum_activate_to_activate_delay_time_same_bank_group", REQUIRED, LENGTH-FIXED } /* Byte 119: Fine Offset for Minimum Activate to Activate Delay Time (t_RRD_S min), different bank group */ { 8, "fine_offset_for_minimum_activate_to_activate_delay_time_different_bank_group", REQUIRED, LENGTH-FIXED } /* Byte 120: Fine Offset for Minimum Activate to Activate/Refresh Delay Time (t_RC min) */ { 8, "fine_offset_for_minimum_activate_to_activate_refresh_time", REQUIRED, LENGTH-FIXED } /* Byte 121: Fine Offset for Minimum Row Precharge Delay Time (t_RP min) */ { 8, "fine_offset_for_minimum_row_precharge_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 122: Fine Offset for Minimum RAS to CAS Delay Time (t_RCD min) */ { 8, "fine_offset_for_minimum_ras_to_cas_delay_time", REQUIRED, LENGTH-FIXED } /* Byte 123: Fine Offset for Minimum CAS Latency Time (t_AA min) */ { 8, "fine_offset_for_minimum_cas_latency_time", REQUIRED, LENGTH-FIXED } /* Byte 124: Fine Offset for SDRAM Maximum Cycle Time (t_CKAVG max) */ { 8, "fine_offset_for_sdram_maximum_cycle_time", REQUIRED, LENGTH-FIXED } /* Byte 125: Fine Offset for SDRAM Minimum Cycle Time (t_CKAVG min) */ { 8, "fine_offset_for_sdram_minimum_cycle_time", REQUIRED, LENGTH-FIXED } /* Byte 126-127: CRC for Base Configuration Section */ { 16, "crc", REQUIRED, LENGTH-FIXED } /* Byte 128-255: Module Specific Parameters */ { 1024, "module_specific_sections", REQUIRED, LENGTH-FIXED } /* Byte 256-319: Reserved */ { 512, "reserved19", REQUIRED, LENGTH-FIXED } /* Byte 320-383: Manufacturing Information */ /* Bytes 320-321: Module Manufacturer's ID Code */ { 7, "number_of_continuation_codes_module_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_module_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_module_manufacturer", REQUIRED, LENGTH-FIXED } /* Byte 322: Module Manufacturing Location */ { 8, "module_manufacturing_location", REQUIRED, LENGTH-FIXED } /* Bytes 323-324: Module Manufacturing Date */ { 8, "module_manufacturing_date.year", REQUIRED, LENGTH-FIXED } /* BCD encoded */ { 8, "module_manufacturing_date.week", REQUIRED, LENGTH-FIXED } /* BCD encoded */ /* Bytes 325-328: Module Serial Number */ { 32, "module_serial_number", REQUIRED, LENGTH-FIXED } /* Bytes 329-348: Module Part Number */ { 160, "module_part_number", REQUIRED, LENGTH-FIXED } /* ASCII */ /* Byte 349: Module Revision Code */ { 16, "module_revision_code", REQUIRED, LENGTH-FIXED } /* Bytes 350-351: DRAM Manufacturer's ID Code */ { 7, "number_of_continuation_codes_dram_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_dram_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_dram_manufacturer", REQUIRED, LENGTH-FIXED } /* Byte 352: DRAM Stepping */ { 8, "dram_stepping", REQUIRED, LENGTH-FIXED } /* Bytes 353-381: Module Manufacturer's Specific Data */ { 232, "module_manufacturer_specific_data", REQUIRED, LENGTH-FIXED } /* Bytes 382-383: Reserved */ { 16, "reserved20", REQUIRED, LENGTH-FIXED } /* Bytes 384-511: End User Programmable */ { 1024, "end_user_programmable", OPTIONAL, LENGTH-VARIABLE } DDR4 SDRAM SPD Module Specific - Unbuffered Memory Module --------------------------------------------------------- FIID Template: tmpl_fru_dimm_spd_ddr4_module_specific_unbuffered_memory_module /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", REQUIRED, LENGTH-FIXED } { 3, "raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", REQUIRED, LENGTH-FIXED } { 4, "module_maximum_thickness_back", REQUIRED, LENGTH-FIXED } /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", REQUIRED, LENGTH-FIXED } { 2, "reference_raw_card_revision", REQUIRED, LENGTH-FIXED } { 1, "reference_raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 131: Address Mapping from Edge Connector to DRAM */ { 1, "rank_1_mapping", REQUIRED, LENGTH-FIXED } { 7, "reserved1", REQUIRED, LENGTH-FIXED } /* Bytes 132-253: Reserved */ { 976, "reserved2", REQUIRED, LENGTH-FIXED } /* Bytes 254-255: CRC */ { 16, "crc", REQUIRED, LENGTH-FIXED } DDR4 SDRAM SPD Module Specific - Registered Memory Module --------------------------------------------------------- FIID Template: tmpl_fru_dimm_spd_ddr4_module_specific_registered_memory_module /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", REQUIRED, LENGTH-FIXED } { 3, "raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", REQUIRED, LENGTH-FIXED } { 4, "module_maximum_thickness_back", REQUIRED, LENGTH-FIXED } /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", REQUIRED, LENGTH-FIXED } { 2, "reference_raw_card_revision", REQUIRED, LENGTH-FIXED } { 1, "reference_raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 131: DIMM Module Attributes */ { 2, "number_of_registers_used_on_rdimm", REQUIRED, LENGTH-FIXED } { 2, "number_of_rows_of_drams_on_rdimm", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } /* Byte 132: RDIMM Thermal Heat Spreader Solution */ { 7, "heat_spreader_thermal_characteristics", REQUIRED, LENGTH-FIXED } { 1, "heat_spreader_solution", REQUIRED, LENGTH-FIXED } /* Bytes 133-134: Register Manufacturer ID Code */ { 7, "number_of_continuation_codes_register_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_register_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_register_manufacturer", REQUIRED, LENGTH-FIXED } /* Byte 135: Register Revision Number */ { 8, "register_revision_number", REQUIRED, LENGTH-FIXED } /* Byte 136: Address Mapping from Register to DRAM */ { 1, "rank_1_mapping", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } /* Byte 137: Register Output Drive Strength for Control */ { 2, "cke", REQUIRED, LENGTH-FIXED } { 2, "odt", REQUIRED, LENGTH-FIXED } { 2, "command_address", REQUIRED, LENGTH-FIXED } { 2, "chip_select", REQUIRED, LENGTH-FIXED } /* Byte 138: Register Output Drive Strength for CK */ { 2, "y0_y2", REQUIRED, LENGTH-FIXED } { 2, "y1_y3", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } /* Bytes 139-253: Reserved */ { 920, "reserved4", REQUIRED, LENGTH-FIXED } /* Bytes 254-255: CRC */ { 16, "crc", REQUIRED, LENGTH-FIXED } DDR4 SDRAM SPD Module Specific - Load Reduction Memory Module ------------------------------------------------------------- FIID Template: tmpl_fru_dimm_spd_ddr4_module_specific_load_reduction_memory_module /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", REQUIRED, LENGTH-FIXED } { 3, "raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", REQUIRED, LENGTH-FIXED } { 4, "module_maximum_thickness_back", REQUIRED, LENGTH-FIXED } /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", REQUIRED, LENGTH-FIXED } { 2, "reference_raw_card_revision", REQUIRED, LENGTH-FIXED } { 1, "reference_raw_card_extension", REQUIRED, LENGTH-FIXED } /* Byte 131: DIMM Module Attributes */ { 2, "number_of_registers_used_on_lrdimm", REQUIRED, LENGTH-FIXED } { 2, "number_of_rows_of_drams_on_lrdimm", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } /* Byte 132: LRDIMM Thermal Heat Spreader Solution */ { 7, "heat_spreader_thermal_characteristics", REQUIRED, LENGTH-FIXED } { 1, "heat_spreader_solution", REQUIRED, LENGTH-FIXED } /* Bytes 133-134: Register and Data Buffer Manufacturer ID Code */ { 7, "number_of_continuation_codes_memory_buffer_manufacturer", REQUIRED, LENGTH-FIXED } { 1, "odd_parity_byte_memory_buffer_manufacturer", REQUIRED, LENGTH-FIXED } { 8, "last_non_zero_memory_buffer_manufacturer", REQUIRED, LENGTH-FIXED } /* Byte 135: Register Revision Number */ { 8, "register_revision_number", REQUIRED, LENGTH-FIXED } /* Byte 136: Address Mapping from Register to DRAM */ { 1, "odd_rank_mapping", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } /* Byte 137: Register Output Drive Strength for Control and Command/Address */ { 2, "cke", REQUIRED, LENGTH-FIXED } { 2, "odt", REQUIRED, LENGTH-FIXED } { 2, "command_address", REQUIRED, LENGTH-FIXED } { 2, "chip_select", REQUIRED, LENGTH-FIXED } /* Byte 138: Register Output Drive Strength for CK */ { 2, "y0_y2", REQUIRED, LENGTH-FIXED } { 2, "y1_y3", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } /* Byte 139: Drive Buffer Revision Number */ { 8, "drive_buffer_revision_number", REQUIRED, LENGTH-FIXED } /* Byte 140: DRAM VrefDQ for Package Rank 0 */ { 6, "dram_vrefq_for_package_rank0_drams", REQUIRED, LENGTH-FIXED } { 2, "reserved4", REQUIRED, LENGTH-FIXED } /* Byte 141: DRAM VrefDQ for Package Rank 1 */ { 6, "dram_vrefq_for_package_rank1_drams", REQUIRED, LENGTH-FIXED } { 2, "reserved5", REQUIRED, LENGTH-FIXED } /* Byte 142: DRAM VrefDQ for Package Rank 2 */ { 6, "dram_vrefq_for_package_rank2_drams", REQUIRED, LENGTH-FIXED } { 2, "reserved6", REQUIRED, LENGTH-FIXED } /* Byte 143: DRAM VrefDQ for Package Rank 3 */ { 6, "dram_vrefq_for_package_rank3_drams", REQUIRED, LENGTH-FIXED } { 2, "reserved7", REQUIRED, LENGTH-FIXED } /* Byte 144: Data Buffer VrefDQ for DRAM Interface */ { 8, "data_buffer_vrefq_for_dram", REQUIRED, LENGTH-FIXED } /* Byte 145: Data Buffer MDQ Drive Strength and RTT for data rate <= 1866 */ { 3, "dram_interface_mdq_read_termination_strength_lt_1866", REQUIRED, LENGTH-FIXED } { 1, "reserved8", REQUIRED, LENGTH-FIXED } { 3, "dram_interface_mdq_drive_strength_lt_1866", REQUIRED, LENGTH-FIXED } { 1, "reserved9", REQUIRED, LENGTH-FIXED } /* Byte 146: Data Buffer MDQ Drive Strength and RTT for 1866 < data rate <= 2400 */ { 3, "dram_interface_mdq_read_termination_strength_lt_2400", REQUIRED, LENGTH-FIXED } { 1, "reserved10", REQUIRED, LENGTH-FIXED } { 3, "dram_interface_mdq_drive_strength_lt_2400", REQUIRED, LENGTH-FIXED } { 1, "reserved11", REQUIRED, LENGTH-FIXED } /* Byte 147: Data Buffer MDQ Drive Strength and RTT for 2400 < data rate <= 3200 */ { 3, "dram_interface_mdq_read_termination_strength_lt_3200", REQUIRED, LENGTH-FIXED } { 1, "reserved12", REQUIRED, LENGTH-FIXED } { 3, "dram_interface_mdq_drive_strength_lt_3200", REQUIRED, LENGTH-FIXED } { 1, "reserved13", REQUIRED, LENGTH-FIXED } /* Byte 148: DRAM Drive Strength (for data rates <= 1866, 1866 < data rate < 2400, and 2400 < data rate <= 3200) */ { 2, "dram_drive_strength_lt_1866", REQUIRED, LENGTH-FIXED } { 2, "dram_drive_strength_lt_2400", REQUIRED, LENGTH-FIXED } { 2, "dram_drive_strength_lt_3200", REQUIRED, LENGTH-FIXED } { 2, "reserved14", REQUIRED, LENGTH-FIXED } /* Byte 149: DRAM ODT (RTT_WR, RTT_NOM) for data rate <= 1866 */ { 3, "dram_odt_strength_rtt_nom_lt_1866", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_wr_lt_1866", REQUIRED, LENGTH-FIXED } { 2, "reserved15", REQUIRED, LENGTH-FIXED } /* Byte 150: DRAM ODT (RTT_WR, RTT_NOM) for 1866 < data rate <= 2400 */ { 3, "dram_odt_strength_rtt_nom_lt_2400", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_wr_lt_2400", REQUIRED, LENGTH-FIXED } { 2, "reserved16", REQUIRED, LENGTH-FIXED } /* Byte 151: DRAM ODT (RTT_WR, RTT_NOM) for 2400 < data rat e<= 3200 */ { 3, "dram_odt_strength_rtt_nom_lt_3200", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_wr_lt_3200", REQUIRED, LENGTH-FIXED } { 2, "reserved17", REQUIRED, LENGTH-FIXED } /* Byte 152: DRAM ODT (RTT_PARK) for data rate <= 1866 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_1866", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_1866", REQUIRED, LENGTH-FIXED } { 2, "reserved18", REQUIRED, LENGTH-FIXED } /* Byte 153: DRAM ODT (RTT_PARK) for 1866 < data rate <= 2400 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_2400", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_2400", REQUIRED, LENGTH-FIXED } { 2, "reserved19", REQUIRED, LENGTH-FIXED } /* Byte 153: DRAM ODT (RTT_PARK) for 2400 < data rate <= 3200 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_3200", REQUIRED, LENGTH-FIXED } { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_3200", REQUIRED, LENGTH-FIXED } { 2, "reserved20", REQUIRED, LENGTH-FIXED } /* Bytes 139-253: Reserved */ { 792, "reserved4", REQUIRED, LENGTH-FIXED } /* Bytes 254-255: CRC */ { 16, "crc", REQUIRED, LENGTH-FIXED } { 0, "", 0} #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_FRU_DIMMSPD_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-fru-inventory-device-cmds-templates.h0000644002055400205540000000760313527331636033112 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_INVENTORY_DEVICE_CMDS_TEMPLATES_H #define IPMI_FRU_INVENTORY_DEVICE_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get FRU Inventory Area Info Request ----------------------------------- FIID Template: tmpl_cmd_get_fru_inventory_area_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "fru_device_id", REQUIRED, LENGTH-FIXED } Get FRU Inventory Area Info Response ------------------------------------ FIID Template: tmpl_cmd_get_fru_inventory_area_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "fru_inventory_area_size", REQUIRED, LENGTH-FIXED } { 1, "device_is_accessed", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } Read FRU Data Request --------------------- FIID Template: tmpl_cmd_read_fru_data_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "fru_device_id", REQUIRED, LENGTH-FIXED } { 16, "fru_inventory_offset_to_read", REQUIRED, LENGTH-FIXED } { 8, "count_to_read", REQUIRED, LENGTH-FIXED } Read FRU Data Response ---------------------- FIID Template: tmpl_cmd_read_fru_data_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "count_returned", REQUIRED, LENGTH-FIXED } { 2040, "requested_data", OPTIONAL, LENGTH-VARIABLE } Write FRU Data Request ---------------------- FIID Template: tmpl_cmd_write_fru_data_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "fru_device_id", REQUIRED, LENGTH-FIXED } { 16, "fru_inventory_offset_to_write", REQUIRED, LENGTH-FIXED } { 2040, "data_to_write", REQUIRED, LENGTH-VARIABLE } Write FRU Data Response ----------------------- FIID Template: tmpl_cmd_write_fru_data_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "count_written", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_FRU_INVENTORY_DEVICE_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-lan-cmds-templates.h0000644002055400205540000017473013527331637027607 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_CMDS_TEMPLATES_H #define IPMI_LAN_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Set LAN Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Set LAN Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set LAN Configuration Parameters (Set In Progress) Request ---------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Authentication Type Enables) Request ---------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "callback_level.none", REQUIRED, LENGTH-FIXED } { 1, "callback_level.md2", REQUIRED, LENGTH-FIXED } { 1, "callback_level.md5", REQUIRED, LENGTH-FIXED } { 1, "callback_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "callback_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "callback_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "callback_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "user_level.none", REQUIRED, LENGTH-FIXED } { 1, "user_level.md2", REQUIRED, LENGTH-FIXED } { 1, "user_level.md5", REQUIRED, LENGTH-FIXED } { 1, "user_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "user_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "user_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "user_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "operator_level.none", REQUIRED, LENGTH-FIXED } { 1, "operator_level.md2", REQUIRED, LENGTH-FIXED } { 1, "operator_level.md5", REQUIRED, LENGTH-FIXED } { 1, "operator_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "operator_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "operator_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "operator_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "admin_level.none", REQUIRED, LENGTH-FIXED } { 1, "admin_level.md2", REQUIRED, LENGTH-FIXED } { 1, "admin_level.md5", REQUIRED, LENGTH-FIXED } { 1, "admin_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "admin_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "admin_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "admin_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "oem_level.none", REQUIRED, LENGTH-FIXED } { 1, "oem_level.md2", REQUIRED, LENGTH-FIXED } { 1, "oem_level.md5", REQUIRED, LENGTH-FIXED } { 1, "oem_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "oem_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "oem_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "oem_level.reserved2", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (IP Address) Request ----------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ip_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (IP Address Source) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "ip_address_source", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (MAC Address) Request ------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_mac_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Subnet Mask) Request ------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 32, "subnet_mask", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (BMC Generated ARP Control) Request -------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "bmc_generated_gratuitous_arps", REQUIRED, LENGTH-FIXED } { 1, "bmc_generated_arp_responses", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Gratuitous ARP Interval) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "gratuitous_arp_interval", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Default Gateway Address) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Default Gateway MAC Address) Request ---------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Backup Gateway Address) Request ----------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Backup Gateway MAC Address) Request --------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Community String) Request ----------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_community_string_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 144, "community_string", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Destination Type) Request ----------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_destination_type_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 3, "destination_type", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "alert_acknowledge", REQUIRED, LENGTH-FIXED } { 8, "alert_acknowledge_timeout", REQUIRED, LENGTH-FIXED } { 3, "retries", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } { 4, "reserved5", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (Destination Addresses) Request ---------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } { 4, "address_format", REQUIRED, LENGTH-FIXED } { 1, "gateway_selector", REQUIRED, LENGTH-FIXED } { 7, "reserved4", REQUIRED, LENGTH-FIXED } { 32, "alerting_ip_address", REQUIRED, LENGTH-FIXED } { 48, "alerting_mac_address", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (VLAN ID) Request -------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 12, "vlan_id", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "vlan_id_enable", REQUIRED, LENGTH-FIXED } Notes: Vlan ID LS byte first. Set LAN Configuration Parameters (VLAN Priority) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 3, "vlan_priority", REQUIRED, LENGTH-FIXED } { 2, "unspecified", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (RMCP+ Messaging Cipher Suite Privilege Levels) Request ---------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_1", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_2", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_3", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_4", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_5", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_6", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_7", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_8", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_9", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_10", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_11", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_12", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_13", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_14", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_15", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_16", OPTIONAL, LENGTH-FIXED } Set LAN Configuration Parameters (Bad Password Threshold) Request ----------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "user_disabled_event_message", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "bad_password_threshold_number", REQUIRED, LENGTH-FIXED } { 16, "attempt_count_reset_interval", REQUIRED, LENGTH-FIXED } { 16, "user_lockout_interval", REQUIRED, LENGTH-FIXED } Set LAN Configuration Parameters (IPv6/IPv4 Addressing Enables) Request ----------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "enables", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Header Static Traffic Class) Request --------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "traffic_class", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Header Static Hop Limit) Request ----------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "static_hop_limit", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Header Flow Label) Request ----------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved1", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 20, "flow_label", REQUIRED, LENGTH-FIXED} /* MS byte first */ { 4, "reserved2", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Addresses) Request ---------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_addresses_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved1", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "set_selector", REQUIRED, LENGTH-FIXED} { 4, "source", REQUIRED, LENGTH-FIXED} { 3, "reserved2", REQUIRED, LENGTH-FIXED} { 1, "enable", REQUIRED, LENGTH-FIXED} { 128, "address", REQUIRED, LENGTH-FIXED} { 8, "address_prefix_length", REQUIRED, LENGTH-FIXED} { 8, "address_status", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Router Address Configuration Control) Request ------------------------------------------------------------------------------------ FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved1", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 1, "enable_static_router_address", REQUIRED, LENGTH-FIXED} { 1, "enable_dynamic_router_address", REQUIRED, LENGTH-FIXED} { 6, "reserved2", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 2 IP Address) Request -------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 128, "ipv6_router_ip_address", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 1 MAC Address) Request --------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 48, "router_mac_address", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 1 Prefix Length) Request ----------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "prefix_length", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 1 Prefix Value) Request ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 128, "prefix_value", REQUIRED, LENGTH-FIXED} /* MS byte first */ Set LAN Configuration Parameters (IPv6 Static Router 2 IP Address) Request -------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 128, "ipv6_router_ip_address", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 2 MAC Address) Request --------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 48, "router_mac_address", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 2 Prefix Length) Request ----------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 8, "prefix_length", REQUIRED, LENGTH-FIXED} Set LAN Configuration Parameters (IPv6 Static Router 2 Prefix Value) Request ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rq { 8, "cmd", REQUIRED, LENGTH-FIXED} { 4, "channel_number", REQUIRED, LENGTH-FIXED} { 4, "reserved", REQUIRED, LENGTH-FIXED} { 8, "parameter_selector", REQUIRED, LENGTH-FIXED} { 128, "prefix_value", REQUIRED, LENGTH-FIXED} /* MS byte first */ Get LAN Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "get_parameter", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Get LAN Configuration Parameters (Set In Progress) Response ----------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_set_in_progress_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Authentication Type Support) Response ----------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "none", REQUIRED, LENGTH-FIXED } { 1, "md2", REQUIRED, LENGTH-FIXED } { 1, "md5", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "straight_password", REQUIRED, LENGTH-FIXED } { 1, "oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get LAN Configuration Parameters (Authentication Type Enables) Response ----------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "callback_level.none", REQUIRED, LENGTH-FIXED } { 1, "callback_level.md2", REQUIRED, LENGTH-FIXED } { 1, "callback_level.md5", REQUIRED, LENGTH-FIXED } { 1, "callback_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "callback_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "callback_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "callback_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "user_level.none", REQUIRED, LENGTH-FIXED } { 1, "user_level.md2", REQUIRED, LENGTH-FIXED } { 1, "user_level.md5", REQUIRED, LENGTH-FIXED } { 1, "user_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "user_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "user_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "user_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "operator_level.none", REQUIRED, LENGTH-FIXED } { 1, "operator_level.md2", REQUIRED, LENGTH-FIXED } { 1, "operator_level.md5", REQUIRED, LENGTH-FIXED } { 1, "operator_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "operator_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "operator_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "operator_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "admin_level.none", REQUIRED, LENGTH-FIXED } { 1, "admin_level.md2", REQUIRED, LENGTH-FIXED } { 1, "admin_level.md5", REQUIRED, LENGTH-FIXED } { 1, "admin_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "admin_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "admin_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "admin_level.reserved2", REQUIRED, LENGTH-FIXED } { 1, "oem_level.none", REQUIRED, LENGTH-FIXED } { 1, "oem_level.md2", REQUIRED, LENGTH-FIXED } { 1, "oem_level.md5", REQUIRED, LENGTH-FIXED } { 1, "oem_level.reserved1", REQUIRED, LENGTH-FIXED } { 1, "oem_level.straight_password", REQUIRED, LENGTH-FIXED } { 1, "oem_level.oem_proprietary", REQUIRED, LENGTH-FIXED } { 2, "oem_level.reserved2", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (IP Address) Response ------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ip_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (IP Address Source) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "ip_address_source", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (MAC Address) Response ------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_mac_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Subnet Mask) Response ------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 32, "subnet_mask", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (BMC Generated ARP Control) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "bmc_generated_gratuitous_arps", REQUIRED, LENGTH-FIXED } { 1, "bmc_generated_arp_responses", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Gratuitous ARP Interval) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "gratuitous_arp_interval", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Default Gateway Address) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Default Gateway MAC Address) Response ----------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Backup Gateway Address) Response ------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 32, "ip_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Backup Gateway MAC Address) Response ---------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 48, "mac_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Community String) Response ------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_community_string_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 144, "community_string", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Number of Destinations) Response ------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "number_of_lan_destinations", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Destination Type) Response ------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_destination_type_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 3, "destination_type", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "alert_acknowledge", REQUIRED, LENGTH-FIXED } { 8, "alert_acknowledge_timeout", REQUIRED, LENGTH-FIXED } { 3, "retries", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 4, "reserved4", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (Destination Addresses) Response ----------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "address_format", REQUIRED, LENGTH-FIXED } { 7, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "gateway_selector", REQUIRED, LENGTH-FIXED } { 32, "alerting_ip_address", REQUIRED, LENGTH-FIXED } { 48, "alerting_mac_address", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (VLAN ID) Response --------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 12, "vlan_id", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "vlan_id_enable", REQUIRED, LENGTH-FIXED } Notes: Vlan ID LS byte first. Get LAN Configuration Parameters (VLAN Priority) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 3, "vlan_priority", REQUIRED, LENGTH-FIXED } { 2, "unspecified", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (RMCP+ Messaging Cipher Suite Entry Support) Response -------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 5, "cipher_suite_entry_count", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get LAN Configuration Parameters (RMCP+ Messaging Cipher Suite Entries) Response -------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "cipher_suite_id_entry_A", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_B", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_C", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_D", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_E", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_F", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_G", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_H", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_I", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_J", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_K", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_L", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_M", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_N", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_O", OPTIONAL, LENGTH-FIXED } { 8, "cipher_suite_id_entry_P", OPTIONAL, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get LAN Configuration Parameters (RMCP+ Messaging Cipher Suite Privilege Levels) Response ----------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_1", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_2", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_3", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_4", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_5", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_6", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_7", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_8", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_9", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_10", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_11", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_12", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_13", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_14", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_15", OPTIONAL, LENGTH-FIXED } { 4, "maximum_privilege_for_cipher_suite_16", OPTIONAL, LENGTH-FIXED } Get LAN Configuration Parameters (Bad Password Threshold) Response ------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "user_disabled_event_message", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "bad_password_threshold_number", REQUIRED, LENGTH-FIXED } { 16, "attempt_count_reset_interval", REQUIRED, LENGTH-FIXED } { 16, "user_lockout_interval", REQUIRED, LENGTH-FIXED } Get LAN Configuration Parameters (IPv6 IPv4 Support) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_support_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 1, "supports_ipv6_only", REQUIRED | LENGTH_FIXED} { 1, "supports_ipv6_and_ipv4_simultaneously", REQUIRED | LENGTH_FIXED} { 1, "supports_ipv6_destination_address_for_lan_alert", REQUIRED | LENGTH_FIXED} { 5, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 IPv4 Addressing Enables) Response ------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "enables", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Header Static Traffic Class) Response ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "traffic_class", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Header Static Hop Limit) Response ------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "static_hop_limit", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Header Flow Label) Response ------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_header_flow_label_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 20, "flow_label", REQUIRED | LENGTH_FIXED} /* LS byte first */ { 4, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Status) Response ------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_status_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "static_address_max", REQUIRED | LENGTH_FIXED} { 8, "dynamic_address_max", REQUIRED | LENGTH_FIXED} { 1, "dhcpv6_addressing_supported", REQUIRED | LENGTH_FIXED} { 1, "slaac_addressing_supported", REQUIRED | LENGTH_FIXED} { 6, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Addresses) Response ----------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_addresses_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 4, "source", REQUIRED | LENGTH_FIXED} { 3, "reserved2", REQUIRED | LENGTH_FIXED} { 1, "enable", REQUIRED | LENGTH_FIXED} { 128, "address", REQUIRED | LENGTH_FIXED} { 8, "address_prefix_length", REQUIRED | LENGTH_FIXED} { 8, "address_status", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Static Duid Storage Length) Response ---------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "maximum_blocks", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Static Duids) Response -------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 8, "block_selector", REQUIRED | LENGTH_FIXED} { 128, "duid", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Address) Response ---------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 4, "source_type", REQUIRED | LENGTH_FIXED} { 4, "reserved2", REQUIRED | LENGTH_FIXED} { 128, "address", REQUIRED | LENGTH_FIXED} { 8, "address_prefix_length", REQUIRED | LENGTH_FIXED} { 8, "address_status", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Dynamic Duid Storage Length) Response ----------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "maximum_blocks", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Dynamic Duids) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 8, "block_selector", REQUIRED | LENGTH_FIXED} { 128, "duid", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Timing Configuration Support) Response ------------------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 2, "timing_configuration", REQUIRED | LENGTH_FIXED} { 6, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dhcpv6 Timing And Configuration) Response -------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 8, "block_selector", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Router Address Configuration Control) Response ------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 1, "enable_static_router_address", REQUIRED | LENGTH_FIXED} { 1, "enable_dynamic_router_address", REQUIRED | LENGTH_FIXED} { 6, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 1 IP Address) Response --------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 128, "ipv6_router_ip_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 1 Mac Address) Response ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 48, "router_mac_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 1 Prefix Length) Response ------------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "prefix_length", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 1 Prefix Value) Response ----------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 128, "prefix_value", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 2 IP Address) Response --------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 128, "ipv6_router_ip_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 2 Mac Address) Response ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 48, "router_mac_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 2 Prefix Length) Response ------------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "prefix_length", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Static Router 2 Prefix Value) Response ----------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 128, "prefix_value", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (Number Of Dynamic Router Info Sets) Response ------------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "number_of_dynamic_router_address_information_entries", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Router Info IP Address) Response ------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | FIXED} { 128, "router_ip_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Router Info Mac Address) Response -------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | FIXED} { 48, "router_mac_address", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Router Info Prefix Length) Response ---------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | FIXED} { 8, "prefix_length", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Router Info Prefix Value) Response --------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | FIXED} { 128, "prefix_value", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Dynamic Router Received Hop Limit) Response ---------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "hop_limit", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Neighbor Discovery Slaac Timing Configuration Support) Response ------------------------------------------------------------------------------------------------------ FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 2, "timing_configuration", REQUIRED | LENGTH_FIXED} { 6, "reserved2", REQUIRED | LENGTH_FIXED} Get LAN Configuration Parameters (IPv6 Neighbor Discovery Slaac Timing Configuration) Response ---------------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_rs { 8, "cmd", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 8, "comp_code", REQUIRED | LENGTH_FIXED | MAKES_PACKET_SUFFICIENT} { 4, "present_revision", REQUIRED | LENGTH_FIXED} { 4, "oldest_revision_parameter", REQUIRED | LENGTH_FIXED} { 8, "set_selector", REQUIRED | LENGTH_FIXED} { 8, "block_selector", REQUIRED | LENGTH_FIXED} Suspend BMC ARPs Request ------------------------ FIID Template: tmpl_cmd_suspend_bmc_arps_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "gratuitous_arp_suspend", REQUIRED, LENGTH-FIXED } { 1, "arp_response_suspend", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Suspend BMC ARPs Response ------------------------- FIID Template: tmpl_cmd_suspend_bmc_arps_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "gratuitous_arp_response_status", REQUIRED, LENGTH-FIXED } { 1, "arp_response_status", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Get IP UDP RMCP Statistics Request ---------------------------------- FIID Template: tmpl_cmd_get_ip_udp_rmcp_statistics_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "clear_all_statistics", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } Get IP UDP RMCP Statistics Response ----------------------------------- FIID Template: tmpl_cmd_get_ip_udp_rmcp_statistics_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "ip_packets_received", REQUIRED, LENGTH-FIXED } { 16, "received_ip_header_errors", REQUIRED, LENGTH-FIXED } { 16, "received_ip_address_errors", REQUIRED, LENGTH-FIXED } { 16, "fragmented_ip_packets_received", REQUIRED, LENGTH-FIXED } { 16, "ip_packets_transmitted", REQUIRED, LENGTH-FIXED } { 16, "udp_packets_received", REQUIRED, LENGTH-FIXED } { 16, "valid_rmcp_packets_received", REQUIRED, LENGTH-FIXED } { 16, "udp_proxy_packets_received", REQUIRED, LENGTH-FIXED } { 16, "udp_proxy_packets_dropped", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_LAN_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-messaging-support-cmds-templates.h0000644002055400205540000011520413527331637032513 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_MESSAGING_SUPPORT_CMDS_TEMPLATES_H #define IPMI_MESSAGING_SUPPORT_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Set BMC Global Enables Request ------------------------------ FIID Template: tmpl_cmd_set_bmc_global_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "receive_message_queue_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_message_buffer_full_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_message_buffer", REQUIRED, LENGTH-FIXED } { 1, "system_event_logging", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 1, "oem_0", REQUIRED, LENGTH-FIXED } { 1, "oem_1", REQUIRED, LENGTH-FIXED } { 1, "oem_2", REQUIRED, LENGTH-FIXED } Set BMC Global Enables Response ------------------------------- FIID Template: tmpl_cmd_set_bmc_global_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get BMC Global Enables Request ------------------------------ FIID Template: tmpl_cmd_get_bmc_global_enables_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get BMC Global Enables Response ------------------------------- FIID Template: tmpl_cmd_get_bmc_global_enables_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "receive_message_queue_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_message_buffer_full_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_message_buffer", REQUIRED, LENGTH-FIXED } { 1, "system_event_logging", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 1, "oem_0", REQUIRED, LENGTH-FIXED } { 1, "oem_1", REQUIRED, LENGTH-FIXED } { 1, "oem_2", REQUIRED, LENGTH-FIXED } Clear Message Flags Request --------------------------- FIID Template: tmpl_cmd_clear_message_flags_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "clear_receive_message_queue", REQUIRED, LENGTH-FIXED } { 1, "clear_event_message_buffer", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "clear_watchdog_pre_timeout_interrupt_flag", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "clear_oem_0", REQUIRED, LENGTH-FIXED } { 1, "clear_oem_1", REQUIRED, LENGTH-FIXED } { 1, "clear_oem_2", REQUIRED, LENGTH-FIXED } Clear Message Flags Response ---------------------------- FIID Template: tmpl_cmd_clear_message_flags_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Message Flags Request ------------------------- FIID Template: tmpl_cmd_get_message_flags_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Message Flags Response -------------------------- FIID Template: tmpl_cmd_get_message_flags_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "receive_message_available", REQUIRED, LENGTH-FIXED } { 1, "event_message_buffer_full", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "watchdog_pre_timeout_interrupt_occurred", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "oem_0_data_available", REQUIRED, LENGTH-FIXED } { 1, "oem_1_data_available", REQUIRED, LENGTH-FIXED } { 1, "oem_2_data_available", REQUIRED, LENGTH-FIXED } Enable Message Channel Receive Request -------------------------------------- FIID Template: tmpl_cmd_enable_message_channel_receive_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 2, "channel_operation", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Enable Message Channel Receive Response --------------------------------------- FIID Template: tmpl_cmd_enable_message_channel_receive_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "channel_state", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } Get Message Request ------------------- FIID Template: tmpl_cmd_get_message_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Message Response -------------------- FIID Template: tmpl_cmd_get_message_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "inferred_privilege_level", REQUIRED, LENGTH-FIXED } { 1024, "message_data", OPTIONAL, LENGTH-VARIABLE } Send Message Request -------------------- FIID Template: tmpl_cmd_send_message_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 1, "send_message_with_authentication", REQUIRED, LENGTH-FIXED } { 1, "send_message_with_encryption", REQUIRED, LENGTH-FIXED } { 2, "tracking_operation", REQUIRED, LENGTH-FIXED } { 1024, "message_data", REQUIRED, LENGTH-VARIABLE } Send Message Response --------------------- FIID Template: tmpl_cmd_send_message_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1024, "response_data", OPTIONAL, LENGTH-VARIABLE } Read Event Message Buffer Request --------------------------------- FIID Template: tmpl_cmd_read_event_message_buffer_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Read Event Message Buffer Response ---------------------------------- FIID Template: tmpl_cmd_read_event_message_buffer_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "message_data", REQUIRED, LENGTH-FIXED } Get System Interface Capabilities Request ----------------------------------------- FIID Template: tmpl_cmd_get_system_interface_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "system_interface", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get System Interface Capabilities Response ------------------------------------------ FIID Template: tmpl_cmd_get_system_interface_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "data", OPTIONAL, LENGTH-VARIABLE } Get System Interface Capabilities (SSIF) Response -------------------------------------------------- FIID Template: tmpl_cmd_get_system_interface_capabilities_ssif_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "reserved1", REQUIRED, LENGTH-FIXED } { 3, "ssif_version", REQUIRED, LENGTH-FIXED } { 1, "pec_support", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "transaction_support", REQUIRED, LENGTH-FIXED } { 8, "input_message_size", REQUIRED, LENGTH-FIXED } { 8, "output_message_size", REQUIRED, LENGTH-FIXED } Get System Interface Capabilities (KCS) Response ------------------------------------------------ FIID Template: tmpl_cmd_get_system_interface_capabilities_kcs_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "reserved1", REQUIRED, LENGTH-FIXED } { 3, "system_interface_version", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } { 8, "input_maximum_message_size", REQUIRED, LENGTH-FIXED } Get BT Interface Capabilities Request ------------------------------------- FIID Template: tmpl_cmd_get_bt_interface_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get BT Interface Capabilities Response -------------------------------------- FIID Template: tmpl_cmd_get_bt_interface_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "number_of_outstanding_requests_supported", REQUIRED, LENGTH-FIXED } { 8, "input_buffer_size", REQUIRED, LENGTH-FIXED } { 8, "output_buffer_size", REQUIRED, LENGTH-FIXED } { 8, "bmc_request_to_response_time", REQUIRED, LENGTH-FIXED } { 8, "recommended_retries", REQUIRED, LENGTH-FIXED } Master Write-Read Request ------------------------- FIID Template: tmpl_cmd_master_write_read_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "bus_type", REQUIRED, LENGTH-FIXED } { 3, "bus_id", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 7, "slave_address", REQUIRED, LENGTH-FIXED } { 8, "read_count", REQUIRED, LENGTH-FIXED } { 2040, "data", OPTIONAL, LENGTH-VARIABLE } Master Write-Read Response -------------------------- FIID Template: tmpl_cmd_master_write_read_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 2040, "data", OPTIONAL, LENGTH-VARIABLE } Get Channel Authentication Capabilities Request ----------------------------------------------- FIID Template: tmpl_cmd_get_channel_authentication_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "get_ipmi_v2.0_extended_data", REQUIRED, LENGTH-FIXED } { 4, "maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Get Channel Authentication Capabilities Response ------------------------------------------------ FIID Template: tmpl_cmd_get_channel_authentication_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "channel_number", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.none", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.md2", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.md5", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.reserved1", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.straight_password_key", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.oem_prop", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.reserved2", REQUIRED, LENGTH-FIXED } { 1, "authentication_type.ipmi_v2.0_extended_capabilities_available", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.anonymous_login", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.null_username", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.non_null_username", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.user_level_authentication", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.per_message_authentication", REQUIRED, LENGTH-FIXED } { 1, "authentication_status.k_g", REQUIRED, LENGTH-FIXED } { 2, "authentication_status.reserved", REQUIRED, LENGTH-FIXED } { 1, "channel_supports_ipmi_v1.5_connections", REQUIRED, LENGTH-FIXED } { 1, "channel_supports_ipmi_v2.0_connections", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } { 24, "oem_id", REQUIRED, LENGTH-FIXED } { 8, "oem_auxiliary_data", REQUIRED, LENGTH-FIXED } Get System GUID Request ----------------------- FIID Template: tmpl_cmd_get_system_guid_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get System GUID Response ------------------------ FIID Template: tmpl_cmd_get_system_guid_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "guid", REQUIRED, LENGTH-FIXED } Get System GUID (with Format) Response -------------------------------------- FIID Template: tmpl_cmd_get_system_guid_format_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 48, "node", REQUIRED, LENGTH-FIXED } { 8, "clock_seq_low", REQUIRED, LENGTH-FIXED } { 8, "clock_seq_hi_and_reserved", REQUIRED, LENGTH-FIXED } { 16, "time_high_and_version", REQUIRED, LENGTH-FIXED } { 16, "time_mid", REQUIRED, LENGTH-FIXED } { 32, "time_low", REQUIRED, LENGTH-FIXED } Notes: node and time values LS byte first. Set System Info Parameters Request ---------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Set System Info Parameters Response ----------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set System Info Parameters (Set In Progress) Request ---------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Set System Info Parameters (System Firmware Version First Set) Request ---------------------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (System Firmware Version) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_system_info_parameters_system_firmware_version_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (System Name First Set) Request ---------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_system_name_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (System Name) Request ------------------------------------------------ FIID Template: tmpl_cmd_set_system_info_parameters_system_name_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (Primary Operating System Name First Set) Request ---------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (Primary Operating System Name) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (Operating System Name First Set) Request -------------------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (Operating System Name) Request ---------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_operating_system_name_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (Present OS Version Number First Set) Request ------------------------------------------------------------------------ FIID Template: tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (Present OS Version Number) Request -------------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_present_os_version_number_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (BMC URL First Set) Request ------------------------------------------------------ FIID Template: tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (BMC URL) Request -------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_bmc_url_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Set System Info Parameters (Base OS/Hypervisor URL First Set) Request --------------------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Set System Info Parameters (Base OS/Hypervisor URL) Request ----------------------------------------------------------- FIID Template: tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Get System Info Parameters Request ---------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } { 1, "get_parameter", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get System Info Parameters Response ----------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Get System Info Parameters (Set In Progress) Response ----------------------------------------------------- Get System Info Parameters (System Firmware Version First Set) Response ----------------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Get System Info Parameters (System Firmware Version) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_system_firmware_version_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Get System Info Parameters (System Name First Set) Response ----------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_system_name_first_set_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Get System Info Parameters (System Name) Response ------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_system_name_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Get System Info Parameters (Primary Operating System Name First Set) Response ----------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Get System Info Parameters (Primary Operating System Name) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Get System Info Parameters (Operating System Name First Set) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 4, "encoding", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "string_length", REQUIRED, LENGTH-FIXED } { 112, "string", OPTIONAL, LENGTH-VARIABLE } Get System Info Parameters (Operating System Name) Response ----------------------------------------------------------- FIID Template: tmpl_cmd_get_system_info_parameters_operating_system_name_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "parameter_revision", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 128, "string", REQUIRED, LENGTH-FIXED } Get Channel Cipher Suites Request --------------------------------- FIID Template: tmpl_cmd_get_channel_cipher_suites_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 6, "list_index", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "list_algorithm_type", REQUIRED, LENGTH-FIXED } Get Channel Cipher Suites Response ---------------------------------- FIID Template: tmpl_cmd_get_channel_cipher_suites_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "channel_number", REQUIRED, LENGTH-FIXED } { 128, "cipher_suite_record_data", OPTIONAL, LENGTH-VARIABLE } Get Session Challenge Request ----------------------------- FIID Template: tmpl_cmd_get_session_challenge_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "authentication_type", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 128, "user_name", REQUIRED, LENGTH-FIXED } Get Session Challenge Response ------------------------------ FIID Template: tmpl_cmd_get_session_challenge_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "temp_session_id", REQUIRED, LENGTH-FIXED } { 128, "challenge_string", REQUIRED, LENGTH-FIXED } Notes: Session id LS byte first. Activate Session Request ------------------------ FIID Template: tmpl_cmd_activate_session_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "authentication_type", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 128, "challenge_string", REQUIRED, LENGTH-FIXED } { 32, "initial_outbound_sequence_number", REQUIRED, LENGTH-FIXED } Activate Session Response ------------------------- FIID Template: tmpl_cmd_activate_session_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "authentication_type", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 32, "initial_inbound_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Set Session Privilege Level Request ----------------------------------- FIID Template: tmpl_cmd_set_session_privilege_level_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } Set Session Privilege Level Response ------------------------------------ FIID Template: tmpl_cmd_set_session_privilege_level_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } Close Session Request --------------------- FIID Template: tmpl_cmd_close_session_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 8, "session_handle", OPTIONAL, LENGTH-FIXED } Close Session Response ---------------------- FIID Template: tmpl_cmd_close_session_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set Channel Access Request -------------------------- FIID Template: tmpl_cmd_set_channel_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 3, "ipmi_messaging_access_mode", REQUIRED, LENGTH-FIXED } { 1, "user_level_authentication", REQUIRED, LENGTH-FIXED } { 1, "per_message_authentication", REQUIRED, LENGTH-FIXED } { 1, "pef_alerting", REQUIRED, LENGTH-FIXED } { 2, "channel_access_set", REQUIRED, LENGTH-FIXED } { 4, "channel_privilege_level_limit", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "channel_privilege_level_limit_set", REQUIRED, LENGTH-FIXED } Set Channel Access Response --------------------------- FIID Template: tmpl_cmd_set_channel_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Channel Access Request -------------------------- FIID Template: tmpl_cmd_get_channel_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "channel_access_get", REQUIRED, LENGTH-FIXED } Get Channel Access Response --------------------------- FIID Template: tmpl_cmd_get_channel_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 3, "ipmi_messaging_access_mode", REQUIRED, LENGTH-FIXED } { 1, "user_level_authentication", REQUIRED, LENGTH-FIXED } { 1, "per_message_authentication", REQUIRED, LENGTH-FIXED } { 1, "pef_alerting", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "channel_privilege_level_limit", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Get Channel Info Command Request -------------------------------- FIID Template: tmpl_cmd_get_channel_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get Channel Info Command Response --------------------------------- FIID Template: tmpl_cmd_get_channel_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "actual_channel_number", REQUIRED, LENGTH-FIXED } { 4, "actual_channel_number.reserved", REQUIRED, LENGTH-FIXED } { 7, "channel_medium_type", REQUIRED, LENGTH-FIXED } { 1, "channel_medium_type.reserved", REQUIRED, LENGTH-FIXED } { 5, "channel_protocol_type", REQUIRED, LENGTH-FIXED } { 3, "channel_protocol_type.reserved", REQUIRED, LENGTH-FIXED } { 6, "active_session_count", REQUIRED, LENGTH-FIXED } { 2, "session_support", REQUIRED, LENGTH-FIXED } { 24, "vendor_id", REQUIRED, LENGTH-FIXED } { 16, "auxiliary_channel_info", REQUIRED, LENGTH-FIXED } Set Channel Security Keys Request --------------------------------- FIID Template: tmpl_cmd_set_channel_security_keys_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "key_id", REQUIRED, LENGTH-FIXED } { 160, "key_value", OPTIONAL, LENGTH-VARIABLE } Set Channel Security Keys Response ---------------------------------- FIID Template: tmpl_cmd_set_channel_security_keys_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 2, "lock_status", OPTIONAL, LENGTH-FIXED } { 6, "reserved", OPTIONAL, LENGTH-FIXED } { 160, "key_value", OPTIONAL, LENGTH-VARIABLE } Set User Access Command Request ------------------------------- FIID Template: tmpl_cmd_set_user_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 1, "user_ipmi_messaging", REQUIRED, LENGTH-FIXED } { 1, "user_link_authentication", REQUIRED, LENGTH-FIXED } { 1, "user_restricted_to_callback", REQUIRED, LENGTH-FIXED } { 1, "change_bits_in_byte", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "user_privilege_level_limit", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "user_session_limit", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } Set User Access Command Response -------------------------------- FIID Template: tmpl_cmd_set_user_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get User Access Command Request ------------------------------- FIID Template: tmpl_cmd_get_user_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } Get User Access Command Response -------------------------------- FIID Template: tmpl_cmd_get_user_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 6, "max_channel_user_ids", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "current_channel_user_ids", REQUIRED, LENGTH-FIXED } { 2, "user_id_enable_status", REQUIRED, LENGTH-FIXED } { 6, "current_channel_fixed_names", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "user_privilege_level_limit", REQUIRED, LENGTH-FIXED } { 1, "user_ipmi_messaging", REQUIRED, LENGTH-FIXED } { 1, "user_link_authentication", REQUIRED, LENGTH-FIXED } { 1, "user_restricted_to_callback", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } Set User Name Command Request ----------------------------- FIID Template: tmpl_cmd_set_user_name_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "user_id.reserved", REQUIRED, LENGTH-FIXED } { 128, "user_name", REQUIRED, LENGTH-FIXED } Set User Name Command Response ------------------------------ FIID Template: tmpl_cmd_set_user_name_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get User Name Command Request ----------------------------- FIID Template: tmpl_cmd_get_user_name_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "user_id.reserved", REQUIRED, LENGTH-FIXED } Get User Name Command Response ------------------------------ FIID Template: tmpl_cmd_get_user_name_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 128, "user_name", REQUIRED, LENGTH-FIXED } Set User Password Command Request --------------------------------- FIID Template: tmpl_cmd_set_user_password_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 1, "user_id.reserved", REQUIRED, LENGTH-FIXED } { 1, "password_size", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 6, "operation.reserved", REQUIRED, LENGTH-FIXED } { 160, "password", OPTIONAL, LENGTH-VARIABLE } Notes: password is variable length, but limited to length of 0, 16, or 20. Set User Password Command Response ---------------------------------- FIID Template: tmpl_cmd_set_user_password_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_MESSAGING_SUPPORT_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-oem-intel-node-manager-cmds-templates.h0000644002055400205540000007475213527331637033264 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTEL_NODE_MANAGER_CMDS_TEMPLATES_H #define IPMI_OEM_INTEL_NODE_MANAGER_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN */ Enable Disable Node Manager Policy Control Request -------------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "policy_enable_disable", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Enable Disable Node Manager Policy Control Response --------------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Set Node Manager Policy Request ------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 1, "policy_enabled", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } { 4, "policy_trigger_type", REQUIRED, LENGTH-FIXED } { 1, "policy_configuration_action", REQUIRED, LENGTH-FIXED } { 2, "aggressive_cpu_power_correction", REQUIRED, LENGTH-FIXED } { 1, "policy_storage_option", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.send_alert", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.shutdown_system", REQUIRED, LENGTH-FIXED } { 5, "policy_exception_actions.reserved", REQUIRED, LENGTH-FIXED } { 1, "policy_power_domain", REQUIRED, LENGTH-FIXED } { 16, "policy_target_limit", REQUIRED, LENGTH-FIXED } { 32, "correction_time_limit", REQUIRED, LENGTH-FIXED } { 16, "policy_trigger_limit", REQUIRED, LENGTH-FIXED } { 16, "statistics_reporting_period", REQUIRED, LENGTH-FIXED } Set Node Manager Policy Request - Boot Time Policy -------------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 1, "policy_enabled", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } { 4, "policy_trigger_type", REQUIRED, LENGTH-FIXED } { 1, "policy_configuration_action", REQUIRED, LENGTH-FIXED } { 2, "aggressive_cpu_power_correction", REQUIRED, LENGTH-FIXED } { 1, "policy_storage_option", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.send_alert", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.shutdown_system", REQUIRED, LENGTH-FIXED } { 5, "policy_exception_actions.reserved", REQUIRED, LENGTH-FIXED } { 1, "policy_power_domain", REQUIRED, LENGTH-FIXED } { 1, "policy_target_limit.platform_booting_mode", REQUIRED, LENGTH-FIXED } { 7, "policy_target_limit.cores_disabled", REQUIRED, LENGTH-FIXED } { 8, "policy_target_limit.reserved", REQUIRED, LENGTH-FIXED } { 16, "policy_target_limit", REQUIRED, LENGTH-FIXED } { 32, "correction_time_limit", REQUIRED, LENGTH-FIXED } { 16, "policy_trigger_limit", REQUIRED, LENGTH-FIXED } { 16, "statistics_reporting_period", REQUIRED, LENGTH-FIXED } Set Node Manager Policy Response -------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Policy Request ------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Get Node Manager Policy Response -------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 1, "policy_enabled", REQUIRED, LENGTH-FIXED } { 1, "per_domain_node_manager_policy_control_enabled", REQUIRED, LENGTH-FIXED } { 1, "global_node_manager_policy_control_enabled", REQUIRED, LENGTH-FIXED } { 1, "policy_created_and_managed_by_other_management", REQUIRED, LENGTH-FIXED } { 4, "policy_trigger_type", REQUIRED, LENGTH-FIXED } { 1, "policy_type", REQUIRED, LENGTH-FIXED } { 2, "aggressive_cpu_power_correction", REQUIRED, LENGTH-FIXED } { 1, "policy_storage_option", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.send_alert", REQUIRED, LENGTH-FIXED } { 1, "policy_exception_actions.shutdown_system", REQUIRED, LENGTH-FIXED } { 5, "policy_exception_actions.reserved", REQUIRED, LENGTH-FIXED } { 1, "policy_power_domain", REQUIRED, LENGTH-FIXED } { 16, "policy_target_limit", REQUIRED, LENGTH-FIXED } { 32, "correction_time_limit", REQUIRED, LENGTH-FIXED } { 16, "policy_trigger_limit", REQUIRED, LENGTH-FIXED } { 16, "statistics_reporting_period", REQUIRED, LENGTH-FIXED } Set Node Manager Alert Thresholds Request ----------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } { 8, "number_of_alert_thresholds", REQUIRED, LENGTH-FIXED } { 16, "alert_threshold1", OPTIONAL, LENGTH-FIXED } { 16, "alert_threshold2", OPTIONAL, LENGTH-FIXED } { 16, "alert_threshold3", OPTIONAL, LENGTH-FIXED } Set Node Manager Alert Thresholds Response ------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Alert Thresholds Request ----------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Get Node Manager Alert Thresholds Response ------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "number_of_alert_thresholds", REQUIRED, LENGTH-FIXED } { 16, "alert_threshold1", OPTIONAL, LENGTH-FIXED } { 16, "alert_threshold2", OPTIONAL, LENGTH-FIXED } { 16, "alert_threshold3", OPTIONAL, LENGTH-FIXED } Set Node Manager Policy Suspend Periods Request ----------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } { 8, "number_of_policy_suspend_periods", REQUIRED, LENGTH-FIXED } { 8, "policy1.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy1.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy2.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy2.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy3.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy3.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy4.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy4.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy5.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy5.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } Set Node Manager Policy Suspend Periods Response ------------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Policy Suspend Periods Request ----------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Get Node Manager Policy Suspend Periods Response ------------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "number_of_policy_suspend_periods", REQUIRED, LENGTH-FIXED } { 8, "policy1.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy1.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy1.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy2.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy2.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy2.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy3.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy3.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy3.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy4.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy4.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy4.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } { 8, "policy5.suspend_start_time", OPTIONAL, LENGTH-FIXED } { 8, "policy5.suspend_stop_time", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.monday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.tuesday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.wednesday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.thursday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.friday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.saturday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.sunday", OPTIONAL, LENGTH-FIXED } { 1, "policy5.suspend_period_recurrence.reserved", OPTIONAL, LENGTH-FIXED } Reset Node Manager Statistics Request ------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "mode", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Reset Node Manager Statistics Response -------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Statistics Request ----------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "mode", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } Get Node Manager Statistics Response ------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 16, "current", REQUIRED, LENGTH-FIXED } { 16, "minimum", REQUIRED, LENGTH-FIXED } { 16, "maximum", REQUIRED, LENGTH-FIXED } { 16, "average", REQUIRED, LENGTH-FIXED } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 32, "statistics_reporting_period", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 1, "policy_global_administrative_state", REQUIRED, LENGTH-FIXED } { 1, "policy_operational_state", REQUIRED, LENGTH-FIXED } { 1, "measurements_state", REQUIRED, LENGTH-FIXED } { 1, "policy_activation_state", REQUIRED, LENGTH-FIXED } Get Node Manager Capabilities Request ------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 4, "policy_trigger_type", REQUIRED, LENGTH-FIXED } { 3, "policy_type", REQUIRED, LENGTH-FIXED } { 1, "policy_power_domain", REQUIRED, LENGTH-FIXED } Get Node Manager Capabilities Response -------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "max_concurrent_settings", REQUIRED, LENGTH-FIXED } { 16, "max_power_thermal_time_after_reset", REQUIRED, LENGTH-FIXED } { 16, "min_power_thermal_time_after_reset", REQUIRED, LENGTH-FIXED } { 32, "min_correction_time", REQUIRED, LENGTH-FIXED } { 32, "max_correction_time", REQUIRED, LENGTH-FIXED } { 16, "min_statistics_reporting_period", REQUIRED, LENGTH-FIXED } { 16, "max_statistics_reporting_period", REQUIRED, LENGTH-FIXED } { 4, "domain_limiting_scope.domain_id", REQUIRED, LENGTH-FIXED } { 3, "domain_limiting_scope.reserved", REQUIRED, LENGTH-FIXED } { 1, "domain_limiting_scope.limiting_based_on", REQUIRED, LENGTH-FIXED } Get Node Manager Version Request -------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Version Response --------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "node_manager_version", REQUIRED, LENGTH-FIXED } { 8, "ipmi_interface_version", REQUIRED, LENGTH-FIXED } { 8, "patch_version", REQUIRED, LENGTH-FIXED } { 8, "major_firmware_revision", REQUIRED, LENGTH-FIXED } { 8, "minor_firmware_revision", REQUIRED, LENGTH-FIXED } Set Node Manager Power Draw Range Request ----------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 16, "minimum_power_draw", REQUIRED, LENGTH-FIXED } { 16, "maximum_power_draw", REQUIRED, LENGTH-FIXED } Set Node Manager Power Draw Range Response ------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Set Node Manager Alert Destination Request ------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "alert_receiver_deactivation", REQUIRED, LENGTH-FIXED } { 8, "destination_information", REQUIRED, LENGTH-FIXED } { 7, "alert_string_selector", REQUIRED, LENGTH-FIXED } { 1, "send_alert_string", REQUIRED, LENGTH-FIXED } Set Node Manager Alert Destination (IPMB) Request ------------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "alert_receiver_deactivation", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 7, "slave_address", REQUIRED, LENGTH-FIXED } { 7, "alert_string_selector", REQUIRED, LENGTH-FIXED } { 1, "send_alert_string", REQUIRED, LENGTH-FIXED } Set Node Manager Alert Destination (LAN) Request ------------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "alert_receiver_deactivation", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 7, "alert_string_selector", REQUIRED, LENGTH-FIXED } { 1, "send_alert_string", REQUIRED, LENGTH-FIXED } Set Node Manager Alert Destination Response ------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Alert Destination Request ------------------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } Get Node Manager Alert Destination Response ------------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "alert_receiver_deactivation", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 7, "alert_string_selector", REQUIRED, LENGTH-FIXED } { 1, "send_alert_string", REQUIRED, LENGTH-FIXED } Get Turbo Synchronization Ratio Request --------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq { 8, "cmd",REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id",REQUIRED, LENGTH-FIXED } { 8, "cpu_socket_number",REQUIRED, LENGTH-FIXED } { 8, "active_cores_configuration",REQUIRED, LENGTH-FIXED } { 8, "turbo_ratio_limit",REQUIRED, LENGTH-FIXED } Get Turbo Synchronization Ratio Response ---------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id",REQUIRED, LENGTH-FIXED } Get Turbo Synchronization Ratio Request --------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq { 8, "cmd",REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id",REQUIRED, LENGTH-FIXED } { 8, "cpu_socket_number",REQUIRED, LENGTH-FIXED } { 8, "active_cores_configuration",REQUIRED, LENGTH-FIXED } Get Turbo Synchronization Ratio Response ---------------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id",REQUIRED, LENGTH-FIXED } { 8, "current_turbo_ratio_limit",REQUIRED, LENGTH-FIXED } { 8, "default_turbo_ratio_limit",REQUIRED, LENGTH-FIXED } { 8, "maximum_turbo_ratio_limit",REQUIRED, LENGTH-FIXED } { 8, "minimum_turbo_ratio_limit",REQUIRED, LENGTH-FIXED } Get Limiting Policy ID Request ------------------------------ FIID Template: tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq = { 8, "cmd", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4, "domain_id", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get Limiting Policy ID Response ------------------------------- FIID Template: tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs = { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "policy_id", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_OEM_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-pef-and-alerting-cmds-templates.h0000644002055400205540000006335013527331637032145 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PEF_AND_ALERTING_CMDS_TEMPLATES_H #define IPMI_PEF_AND_ALERTING_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get PEF Capabilities Request ---------------------------- FIID Template: tmpl_cmd_get_pef_capabilities_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get PEF Capabilities Response ----------------------------- FIID Template: tmpl_cmd_get_pef_capabilities_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "pef_version_major", REQUIRED, LENGTH-FIXED } { 4, "pef_version_minor", REQUIRED, LENGTH-FIXED } { 1, "action_support.alert", REQUIRED, LENGTH-FIXED } { 1, "action_support.power_down", REQUIRED, LENGTH-FIXED } { 1, "action_support.reset", REQUIRED, LENGTH-FIXED } { 1, "action_support.power_cycle", REQUIRED, LENGTH-FIXED } { 1, "action_support.oem_action", REQUIRED, LENGTH-FIXED } { 1, "action_support.diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 1, "oem_event_record_filtering_supported", REQUIRED, LENGTH-FIXED } { 8, "number_of_event_filter_table_entries", REQUIRED, LENGTH-FIXED } ARM PEF Postpone Timer Request ------------------------------ FIID Template: tmpl_cmd_arm_pef_postpone_timer_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "pef_postpone_timeout", REQUIRED, LENGTH-FIXED } ARM PEF Postpone Timer Response ------------------------------- FIID Template: tmpl_cmd_arm_pef_postpone_timer_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "present_timer_countdown_value", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Set PEF Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set PEF Configuration Parameters (Set In Progress) Request ---------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (PEF Control) Request ------------------------------------------------------ FIID Template: tmpl_cmd_set_pef_configuration_parameters_pef_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "pef", REQUIRED, LENGTH-FIXED } { 1, "pef_event_messages", REQUIRED, LENGTH-FIXED } { 1, "pef_startup_delay", REQUIRED, LENGTH-FIXED } { 1, "pef_alert_startup_delay", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (PEF Action Global Control) Request -------------------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "alert_action", REQUIRED, LENGTH-FIXED } { 1, "power_down_action", REQUIRED, LENGTH-FIXED } { 1, "reset_action", REQUIRED, LENGTH-FIXED } { 1, "power_cycle_action", REQUIRED, LENGTH-FIXED } { 1, "oem_action", REQUIRED, LENGTH-FIXED } { 1, "diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (PEF Startup Delay) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 8, "pef_startup_delay", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (PEF Alert Startup Delay) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 8, "pef_alert_startup_delay", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (Event Filter Table) Request ------------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 5, "filter_configuration.reserved", REQUIRED, LENGTH-FIXED } { 2, "filter_configuration.type", REQUIRED, LENGTH-FIXED } { 1, "filter_configuration.filter", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.alert", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.power_off", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.reset", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.power_cycle", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.oem", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.group_control_operation", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.reserved", REQUIRED, LENGTH-FIXED } { 4, "alert_policy_number.policy_number", REQUIRED, LENGTH-FIXED } { 3, "alert_policy_number.group_control_selector", REQUIRED, LENGTH-FIXED } { 1, "alert_policy_number.reserved", REQUIRED, LENGTH-FIXED } { 8, "event_severity", REQUIRED, LENGTH-FIXED } { 8, "generator_id_byte1", REQUIRED, LENGTH-FIXED } { 8, "generator_id_byte2", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "event_trigger", REQUIRED, LENGTH-FIXED } { 16, "event_data1_offset_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data1_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data1_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data1_compare2", REQUIRED, LENGTH-FIXED } { 8, "event_data2_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data2_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data2_compare2", REQUIRED, LENGTH-FIXED } { 8, "event_data3_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data3_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data3_compare2", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (Event Filter Table Data1) Request ------------------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 5, "filter_configuration.reserved", REQUIRED, LENGTH-FIXED } { 2, "filter_configuration.type", REQUIRED, LENGTH-FIXED } { 1, "filter_configuration.filter", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (Alert String Keys) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "string_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } /* Not indicated as 8 bits in E451, but all other filter number fields adjusted to 8 bits */ { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 7, "set_number_for_string", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } Set PEF Configuration Parameters (Alert Strings) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "string_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } { 128, "string_data", OPTIONAL, LENGTH-VARIABLE } Set PEF Configuration Parameters (Alert Policy Table) Request ------------------------------------------------------------- FIID Template: tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 7, "alert_policy_entry_number", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 3, "policy_number.policy_type", REQUIRED, LENGTH-FIXED } { 1, "policy_number.enabled", REQUIRED, LENGTH-FIXED } { 4, "policy_number.policy_number", REQUIRED, LENGTH-FIXED } { 4, "channel_destination.destination_selector", REQUIRED, LENGTH-FIXED } { 4, "channel_destination.channel_number", REQUIRED, LENGTH-FIXED } { 7, "alert_string_key.alert_string_set_selector", REQUIRED, LENGTH-FIXED } { 1, "alert_string_key.event_specific_alert_string", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 7, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "get_parameter", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Get PEF Configuration Parameters (Set In Progress) Response ----------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_set_in_progress_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (PEF Control) Response ------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_pef_control_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "pef", REQUIRED, LENGTH-FIXED } { 1, "pef_event_messages", REQUIRED, LENGTH-FIXED } { 1, "pef_startup_delay", REQUIRED, LENGTH-FIXED } { 1, "pef_alert_startup_delay", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (PEF Action Global Control) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "alert_action", REQUIRED, LENGTH-FIXED } { 1, "power_down_action", REQUIRED, LENGTH-FIXED } { 1, "reset_action", REQUIRED, LENGTH-FIXED } { 1, "power_cycle_action", REQUIRED, LENGTH-FIXED } { 1, "oem_action", REQUIRED, LENGTH-FIXED } { 1, "diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (PEF Startup Delay) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "pef_startup_delay", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (PEF Alert Startup Delay) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "pef_alert_startup_delay", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (Number of Event Filters) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "number_of_event_filters", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get PEF Configuration Parameters (Event Filter Table) Response -------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 5, "filter_configuration.reserved", REQUIRED, LENGTH-FIXED } { 2, "filter_configuration.type", REQUIRED, LENGTH-FIXED } { 1, "filter_configuration.filter", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.alert", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.power_off", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.reset", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.power_cycle", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.oem", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.diagnostic_interrupt", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.group_control_operation", REQUIRED, LENGTH-FIXED } { 1, "event_filter_action.reserved", REQUIRED, LENGTH-FIXED } { 4, "alert_policy_number.policy_number", REQUIRED, LENGTH-FIXED } { 3, "alert_policy_number.group_control_selector", REQUIRED, LENGTH-FIXED } { 1, "alert_policy_number.reserved", REQUIRED, LENGTH-FIXED } { 8, "event_severity", REQUIRED, LENGTH-FIXED } { 8, "generator_id_byte1", REQUIRED, LENGTH-FIXED } { 8, "generator_id_byte2", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "event_trigger", REQUIRED, LENGTH-FIXED } { 16, "event_data1_offset_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data1_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data1_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data1_compare2", REQUIRED, LENGTH-FIXED } { 8, "event_data2_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data2_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data2_compare2", REQUIRED, LENGTH-FIXED } { 8, "event_data3_AND_mask", REQUIRED, LENGTH-FIXED } { 8, "event_data3_compare1", REQUIRED, LENGTH-FIXED } { 8, "event_data3_compare2", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (Event Filter Table Data1) Response -------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_event_filter_table_data1_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 5, "filter_configuration.reserved", REQUIRED, LENGTH-FIXED } { 2, "filter_configuration.type", REQUIRED, LENGTH-FIXED } { 1, "filter_configuration.filter", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (Number of Alert Policy Entries) Response -------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 7, "number_of_alert_policy_entries", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get PEF Configuration Parameters (Number of Alert Strings) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 7, "number_of_alert_strings", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get PEF Configuration Parameters (Alert String Keys) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 7, "string_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } /* Not indicated as 8 bits in E451, but all other filter number fields adjusted to 8 bits */ { 8, "filter_number", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 7, "set_number_for_string", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } Get PEF Configuration Parameters (Alert Strings) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 7, "string_selector", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } { 128, "string_data", OPTIONAL, LENGTH-VARIABLE } Get PEF Configuration Parameters (Alert Policy Table) Response -------------------------------------------------------------- FIID Template: tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 7, "alert_policy_entry_number", REQUIRED, LENGTH-FIXED } { 1, "alert_policy_entry_number.reserved", REQUIRED, LENGTH-FIXED } { 3, "policy_number.policy_type", REQUIRED, LENGTH-FIXED } { 1, "policy_number.enabled", REQUIRED, LENGTH-FIXED } { 4, "policy_number.policy_number", REQUIRED, LENGTH-FIXED } { 4, "channel_destination.destination_selector", REQUIRED, LENGTH-FIXED } { 4, "channel_destination.channel_number", REQUIRED, LENGTH-FIXED } { 7, "alert_string_key.alert_string_set_selector", REQUIRED, LENGTH-FIXED } { 1, "alert_string_key.event_specific_alert_string", REQUIRED, LENGTH-FIXED } Set Last Processed Event ID Request ----------------------------------- FIID Template: tmpl_cmd_set_last_processed_event_id_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "set_record_id_for_last_record", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } { 16, "record_id", REQUIRED, LENGTH-FIXED } Set Last Processed Event ID Response ------------------------------------ FIID Template: tmpl_cmd_set_last_processed_event_id_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Last Processed Event ID Request ----------------------------------- FIID Template: tmpl_cmd_get_last_processed_event_id_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get Last Processed Event ID Response ------------------------------------ FIID Template: tmpl_cmd_get_last_processed_event_id_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "most_recent_addition_timestamp", REQUIRED, LENGTH-FIXED } { 16, "record_id_for_last_record_in_sel", REQUIRED, LENGTH-FIXED } { 16, "last_sw_processed_event_record_id", REQUIRED, LENGTH-FIXED } { 16, "last_bmc_processed_event_record_id", REQUIRED, LENGTH-FIXED } Alert Immediate Request ----------------------- FIID Template: tmpl_cmd_alert_immediate_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "destination_selector", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 7, "string_selector", REQUIRED, LENGTH-FIXED } { 1, "send_alert_string", REQUIRED, LENGTH-FIXED } Alert Immediate Response ------------------------ FIID Template: tmpl_cmd_alert_immediate_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } PET Acknowledge Request ----------------------- FIID Template: tmpl_cmd_pet_acknowledge_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "sequence_number", REQUIRED, LENGTH-FIXED } { 32, "local_timestamp", REQUIRED, LENGTH-FIXED } { 8, "event_source_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_device", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 24, "event_data", REQUIRED, LENGTH-FIXED } PET Acknowledge Response ------------------------ FIID Template: tmpl_cmd_pet_acknowledge_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_PEF_AND_ALERTING_CMDS_TEMPLATES_H */ ipmi-rmcpplus-support-and-payload-cmds-templates.h0000644002055400205540000004062513527331637034517 0ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_TEMPLATES_H #define IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Activate Payload Request ------------------------ FIID Template: tmpl_cmd_activate_payload_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "payload_instance", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 32, "auxiliary_request_data", REQUIRED, LENGTH-FIXED } Activate Payload (SOL) Request ------------------------------ FIID Template: tmpl_cmd_activate_payload_sol_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "payload_instance", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "sol_startup_handshake", REQUIRED, LENGTH-FIXED } { 2, "shared_serial_alert_behavior", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } { 1, "test_mode", REQUIRED, LENGTH-FIXED } { 1, "authentication_activation", REQUIRED, LENGTH-FIXED } { 1, "encryption_activation", REQUIRED, LENGTH-FIXED } { 24, "reserved5", REQUIRED, LENGTH-FIXED } Activate Payload Response ------------------------- FIID Template: tmpl_cmd_activate_payload_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "auxiliary_response_data", REQUIRED, LENGTH-FIXED } { 16, "inbound_payload_size", REQUIRED, LENGTH-FIXED } { 16, "outbound_payload_size", REQUIRED, LENGTH-FIXED } { 16, "payload_udp_port_number", REQUIRED, LENGTH-FIXED } { 16, "payload_vlan_number", REQUIRED, LENGTH-FIXED } Activate Payload (SOL) Response ------------------------------- FIID Template: tmpl_cmd_activate_payload_sol_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "test_mode", REQUIRED, LENGTH-FIXED } { 31, "reserved1", REQUIRED, LENGTH-FIXED } { 16, "inbound_payload_size", REQUIRED, LENGTH-FIXED } { 16, "outbound_payload_size", REQUIRED, LENGTH-FIXED } { 16, "payload_udp_port_number", REQUIRED, LENGTH-FIXED } { 16, "payload_vlan_number", REQUIRED, LENGTH-FIXED } Deactivate Payload Request -------------------------- FIID Template: tmpl_cmd_deactivate_payload_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "payload_instance", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 32, "payload_auxiliary_data", REQUIRED, LENGTH-FIXED } Deactivate Payload Response --------------------------- FIID Template: tmpl_cmd_deactivate_payload_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Suspend Resume Payload Encryption Request ----------------------------------------- FIID Template: tmpl_cmd_suspend_resume_payload_encryption_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 2, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "payload_instance", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } /* achu: The IPMI spec says [4:0] for Operation and [7:2] for reserved3. Needless to say, one is wrong. Since there are only three operations, we'll assume they meant for operation to be a 2 bit field */ { 2, "operation", REQUIRED, LENGTH-FIXED } { 6, "reserved3", REQUIRED, LENGTH-FIXED } Suspend Resume Payload Encryption Response ------------------------------------------ FIID Template: tmpl_cmd_suspend_resume_payload_encryption_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Payload Activation Status Request ------------------------------------- FIID Template: tmpl_cmd_get_payload_activation_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "payload_type", REQUIRED, LENGTH-FIXED } Get Payload Activation Status Response -------------------------------------- FIID Template: tmpl_cmd_get_payload_activation_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "instance_capacity", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 1, "instance_1", REQUIRED, LENGTH-FIXED } { 1, "instance_2", REQUIRED, LENGTH-FIXED } { 1, "instance_3", REQUIRED, LENGTH-FIXED } { 1, "instance_4", REQUIRED, LENGTH-FIXED } { 1, "instance_5", REQUIRED, LENGTH-FIXED } { 1, "instance_6", REQUIRED, LENGTH-FIXED } { 1, "instance_7", REQUIRED, LENGTH-FIXED } { 1, "instance_8", REQUIRED, LENGTH-FIXED } { 1, "instance_9", REQUIRED, LENGTH-FIXED } { 1, "instance_10", REQUIRED, LENGTH-FIXED } { 1, "instance_11", REQUIRED, LENGTH-FIXED } { 1, "instance_12", REQUIRED, LENGTH-FIXED } { 1, "instance_13", REQUIRED, LENGTH-FIXED } { 1, "instance_14", REQUIRED, LENGTH-FIXED } { 1, "instance_15", REQUIRED, LENGTH-FIXED } { 1, "instance_16", REQUIRED, LENGTH-FIXED } Get Payload Instance Info Request --------------------------------- FIID Template: tmpl_cmd_get_payload_instance_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "payload_type", REQUIRED, LENGTH-FIXED } { 8, "payload_instance", REQUIRED, LENGTH-FIXED } Get Payload Instance Info Response ---------------------------------- FIID Template: tmpl_cmd_get_payload_instance_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 8, "port_number", REQUIRED, LENGTH-FIXED } { 56, "reserved", REQUIRED, LENGTH-FIXED } Set User Payload Access Request ------------------------------- FIID Template: tmpl_cmd_set_user_payload_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "operation", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_1", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_2", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_3", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_4", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_5", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_6", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_7", REQUIRED, LENGTH-FIXED } { 8, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_0", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_1", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_2", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_3", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_4", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_5", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_6", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_7", REQUIRED, LENGTH-FIXED } { 8, "reserved4", REQUIRED, LENGTH-FIXED } Set User Payload Access Response -------------------------------- FIID Template: tmpl_cmd_set_user_payload_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get User Payload Access Request ------------------------------- FIID Template: tmpl_cmd_get_user_payload_access_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "user_id", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } Get User Payload Access Response -------------------------------- FIID Template: tmpl_cmd_get_user_payload_access_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_1", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_2", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_3", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_4", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_5", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_6", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_7", REQUIRED, LENGTH-FIXED } { 8, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_0", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_1", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_2", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_3", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_4", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_5", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_6", REQUIRED, LENGTH-FIXED } { 1, "oem_payload_7", REQUIRED, LENGTH-FIXED } { 8, "reserved3", REQUIRED, LENGTH-FIXED } Get Channel Payload Support Request ----------------------------------- FIID Template: tmpl_cmd_get_channel_payload_support_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get Channel Payload Support Response ------------------------------------ FIID Template: tmpl_cmd_get_channel_payload_support_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "standard_payload_type_0_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_1_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_2_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_3_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_4_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_5_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_6_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_7_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_8_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_9_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_10_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_11_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_12_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_13_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_14_supported", REQUIRED, LENGTH-FIXED } { 1, "standard_payload_type_15_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_0_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_1_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_2_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_3_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_4_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_5_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_6_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_7_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_8_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_9_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_10_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_11_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_12_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_13_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_14_supported", REQUIRED, LENGTH-FIXED } { 1, "session_setup_payload_15_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_20h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_21h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_22h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_23h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_24h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_25h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_26h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_27h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_28h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_29h_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Ah_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Bh_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Ch_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Dh_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Eh_supported", REQUIRED, LENGTH-FIXED } { 1, "payload_type_2Fh_supported", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } Get Channel Payload Version Request ----------------------------------- FIID Template: tmpl_cmd_get_channel_payload_version_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "payload_type", REQUIRED, LENGTH-FIXED } Get Channel Payload Version Response ------------------------------------ FIID Template: tmpl_cmd_get_channel_payload_version_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "minor_format_version", REQUIRED, LENGTH-FIXED } { 4, "major_format_version", REQUIRED, LENGTH-FIXED } Get Channel OEM Payload Info Request ------------------------------------ FIID Template: tmpl_cmd_get_channel_oem_payload_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "payload_type", REQUIRED, LENGTH-FIXED } { 24, "oem_iana", REQUIRED, LENGTH-FIXED } { 16, "oem_payload_id", REQUIRED, LENGTH-FIXED } Get Channel OEM Payload Info Response ------------------------------------- FIID Template: tmpl_cmd_get_channel_oem_payload_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "payload_type", REQUIRED, LENGTH-FIXED } { 24, "oem_iana", REQUIRED, LENGTH-FIXED } { 16, "oem_payload_id", REQUIRED, LENGTH-FIXED } { 4, "minor_format_version", REQUIRED, LENGTH-FIXED } { 4, "major_format_version", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_SUPPORT_AND_PAYLOAD_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sdr-repository-cmds-templates.h0000644002055400205540000001412713527331637032033 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_REPOSITORY_CMDS_TEMPLATES_H #define IPMI_SDR_REPOSITORY_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get SDR Repository Info Request ------------------------------- FIID Template: tmpl_cmd_get_sdr_repository_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SDR Repository Info Response -------------------------------- FIID Template: tmpl_cmd_get_sdr_repository_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 16, "record_count", REQUIRED, LENGTH-FIXED } { 16, "free_space", REQUIRED, LENGTH-FIXED } { 32, "most_recent_addition_timestamp", REQUIRED, LENGTH-FIXED } { 32, "most_recent_erase_timestamp", REQUIRED, LENGTH-FIXED } { 1, "get_sdr_repository_allocation_info_command_supported", REQUIRED, LENGTH-FIXED } { 1, "reserve_sdr_repository_command_supported", REQUIRED, LENGTH-FIXED } { 1, "partial_add_sdr_command_supported", REQUIRED, LENGTH-FIXED } { 1, "delete_sdr_command_supported", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 2, "modal_non_modal_sdr_repository_update_operation_supported", REQUIRED, LENGTH-FIXED } { 1, "overflow_flag", REQUIRED, LENGTH-FIXED } Get SDR Repository Allocation Info Request ------------------------------------------ FIID Template: tmpl_cmd_get_sdr_repository_allocation_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SDR Repository Allocation Info Response ------------------------------------------- FIID Template: tmpl_cmd_get_sdr_repository_allocation_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "number_of_possible_allocation_units", REQUIRED, LENGTH-FIXED } { 16, "allocation_unit_size", REQUIRED, LENGTH-FIXED } { 16, "number_of_free_allocation_units", REQUIRED, LENGTH-FIXED } { 16, "largest_free_block", REQUIRED, LENGTH-FIXED } { 8, "maximum_record_size", REQUIRED, LENGTH-FIXED } Reserve SDR Repository Request ------------------------------ FIID Template: tmpl_cmd_reserve_sdr_repository_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Reserve SDR Repository Response ------------------------------- FIID Template: tmpl_cmd_reserve_sdr_repository_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } Get SDR Request --------------- FIID Template: tmpl_cmd_get_sdr_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "offset_into_record", REQUIRED, LENGTH-FIXED } { 8, "bytes_to_read", REQUIRED, LENGTH-FIXED } Get SDR Response ---------------- FIID Template: tmpl_cmd_get_sdr_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "next_record_id", REQUIRED, LENGTH-FIXED } /* 2040 = 255 * 8, 255 b/c bytes_to_read field in request is 1 byte long */ { 2040, "record_data", REQUIRED, LENGTH-VARIABLE } Get SDR Repository Time Request ------------------------------- FIID Template: tmpl_cmd_get_sdr_repository_time_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SDR Repository Time Response -------------------------------- FIID Template: tmpl_cmd_get_sdr_repository_time_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "time", REQUIRED, LENGTH-FIXED } Set SDR Repository Time Request ------------------------------- FIID Template: tmpl_cmd_set_sdr_repository_time_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 32, "time", REQUIRED, LENGTH-FIXED } Set SDR Repository Time Response -------------------------------- FIID Template: tmpl_cmd_set_sdr_repository_time_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SDR_REPOSITORY_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sel-cmds-templates.h0000644002055400205540000002307613527331637027614 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_CMDS_TEMPLATES_H #define IPMI_SEL_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get SEL Info Request -------------------- FIID Template: tmpl_cmd_get_sel_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SEL Info Response --------------------- FIID Template: tmpl_cmd_get_sel_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "sel_version_major", REQUIRED, LENGTH-FIXED } { 4, "sel_version_minor", REQUIRED, LENGTH-FIXED } { 16, "entries", REQUIRED, LENGTH-FIXED } { 16, "free_space", REQUIRED, LENGTH-FIXED } { 32, "most_recent_addition_timestamp", REQUIRED, LENGTH-FIXED } { 32, "most_recent_erase_timestamp", REQUIRED, LENGTH-FIXED } { 1, "get_sel_allocation_info_command_supported", REQUIRED, LENGTH-FIXED } { 1, "reserve_sel_command_supported", REQUIRED, LENGTH-FIXED } { 1, "partial_add_sel_entry_command_supported", REQUIRED, LENGTH-FIXED } { 1, "delete_sel_command_supported", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "overflow_flag", REQUIRED, LENGTH-FIXED } Get SEL Allocation Info Request ------------------------------- FIID Template: tmpl_cmd_get_sel_allocation_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SEL Allocation Info Response -------------------------------- FIID Template: tmpl_cmd_get_sel_allocation_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "number_of_possible_allocation_units", REQUIRED, LENGTH-FIXED } { 16, "allocation_unit_size", REQUIRED, LENGTH-FIXED } { 16, "number_of_free_allocation_units", REQUIRED, LENGTH-FIXED } { 16, "largest_free_block", REQUIRED, LENGTH-FIXED } { 8, "maximum_record_size", REQUIRED, LENGTH-FIXED } Reserve SEL Request ------------------- FIID Template: tmpl_cmd_reserve_sel_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Reserve SEL Response -------------------- FIID Template: tmpl_cmd_reserve_sel_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } Get SEL Entry Request --------------------- FIID Template: tmpl_cmd_get_sel_entry_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "offset_into_record", REQUIRED, LENGTH-FIXED } { 8, "bytes_to_read", REQUIRED, LENGTH-FIXED } Get SEL Entry Response ---------------------- FIID Template: tmpl_cmd_get_sel_entry_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "next_record_id", REQUIRED, LENGTH-FIXED } { 128, "record_data", OPTIONAL, LENGTH-VARIABLE } Delete SEL Entry Request ------------------------ FIID Template: tmpl_cmd_delete_sel_entry_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } { 16, "record_id", REQUIRED, LENGTH-FIXED } Delete SEL Entry Response ------------------------- FIID Template: tmpl_cmd_delete_sel_entry_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "record_id", REQUIRED, LENGTH-FIXED } Clear SEL Request ----------------- FIID Template: tmpl_cmd_clear_sel_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } { 8, "C", REQUIRED, LENGTH-FIXED } { 8, "L", REQUIRED, LENGTH-FIXED } { 8, "R", REQUIRED, LENGTH-FIXED } { 8, "operation", REQUIRED, LENGTH-FIXED } Clear SEL Response ------------------ FIID Template: tmpl_cmd_clear_sel_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "erasure_progress", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get SEL Time Request -------------------- FIID Template: tmpl_cmd_get_sel_time_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SEL Time Response --------------------- FIID Template: tmpl_cmd_get_sel_time_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "time", REQUIRED, LENGTH-FIXED } Set SEL Time Request -------------------- FIID Template: tmpl_cmd_set_sel_time_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 32, "time", REQUIRED, LENGTH-FIXED } Set SEL Time Response --------------------- FIID Template: tmpl_cmd_set_sel_time_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get SEL Time UTC Offset Request ------------------------------- FIID Template: tmpl_cmd_get_sel_time_utc_offset_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } Get SEL Time UTC Offset Response -------------------------------- FIID Template: tmpl_cmd_get_sel_time_utc_offset_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "offset", REQUIRED, LENGTH-FIXED } Set SEL Time UTC Offset Request ------------------------------- FIID Template: tmpl_cmd_set_sel_time_utc_offset_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "offset", REQUIRED, LENGTH-FIXED } Set SEL Time UTC Offset Response -------------------------------- FIID Template: tmpl_cmd_set_sel_time_utc_offset_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Auxiliary Log Status Request -------------------------------- FIID Template: tmpl_cmd_get_auxiliary_log_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "log_type", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get Auxiliary Log Status Response --------------------------------- FIID Template: tmpl_cmd_get_auxiliary_log_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 120, "log_data", REQUIRED, LENGTH-VARIABLE } Get Auxiliary Log Status (MCA) Response --------------------------------------- FIID Template: tmpl_cmd_get_auxiliary_log_status_mca_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 32, "mca_log_entry_count", REQUIRED, LENGTH-FIXED } { 56, "log_data", OPTIONAL, LENGTH-VARIABLE } Get Auxiliary Log Status (OEM) Response --------------------------------------- FIID Template: tmpl_cmd_get_auxiliary_log_status_oem_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 24, "oem_id", REQUIRED, LENGTH-FIXED } { 64, "log_data", REQUIRED, LENGTH-VARIABLE } Set Auxiliary Log Status Request -------------------------------- FIID Template: tmpl_cmd_set_auxiliary_log_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "log_type", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 120, "log_data", REQUIRED, LENGTH-VARIABLE } Set Auxiliary Log Status Response --------------------------------- FIID Template: tmpl_cmd_set_auxiliary_log_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SEL_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sensor-cmds-templates.h0000644002055400205540000015010213527331637030331 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_CMDS_TEMPLATES_H #define IPMI_SENSOR_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Get Device SDR Info Request --------------------------- FIID Template: tmpl_cmd_get_device_sdr_info_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 1, "operation", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } Get Device SDR Info Response ---------------------------- FIID Template: tmpl_cmd_get_device_sdr_info_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "number", REQUIRED, LENGTH-FIXED } { 1, "flags.device_lun_0_has_sensors", REQUIRED, LENGTH-FIXED } { 1, "flags.device_lun_1_has_sensors", REQUIRED, LENGTH-FIXED } { 1, "flags.device_lun_2_has_sensors", REQUIRED, LENGTH-FIXED } { 1, "flags.device_lun_3_has_sensors", REQUIRED, LENGTH-FIXED } { 3, "flags.reserved", REQUIRED, LENGTH-FIXED } { 1, "flags.sensor_population", REQUIRED, LENGTH-FIXED } { 32, "sensor_population_change_indicator", REQUIRED, LENGTH-FIXED } Get Device SDR Request ---------------------- FIID Template: tmpl_cmd_get_device_sdr_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 16, "reservation_id", REQUIRED, LENGTH-FIXED } { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "offset_into_record", REQUIRED, LENGTH-FIXED } { 8, "bytes_to_read", REQUIRED, LENGTH-FIXED } Get Device SDR Response ----------------------- FIID Template: tmpl_cmd_get_device_sdr_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "next_record_id", REQUIRED, LENGTH-FIXED } /* 2040 = 255 * 8, 255 b/c bytes_to_read field in request is 1 byte long */ { 2040, "record_data", REQUIRED, LENGTH-VARIABLE } Reserve Device SDR Repository Request ------------------------------------- FIID Template: tmpl_cmd_reserve_device_sdr_repository_rq { 8, "cmd", REQUIRED, LENGTH-FIXED }, Reserve Device SDR Repository Response -------------------------------------- FIID Template: tmpl_cmd_reserve_device_sdr_repository_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT }, { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT }, { 16, "reservation_id", REQUIRED, LENGTH-FIXED }, /* LS byte first */ Get Sensor Reading Factors Request ---------------------------------- FIID Template: tmpl_cmd_get_sensor_reading_factors_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "reading_byte", REQUIRED, LENGTH-FIXED } Get Sensor Reading Factors Response ----------------------------------- FIID Template: tmpl_cmd_get_sensor_reading_factors_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "next_reading", REQUIRED, LENGTH-FIXED } { 8, "m_ls", REQUIRED, LENGTH-FIXED } { 6, "tolerance", REQUIRED, LENGTH-FIXED } { 2, "m_ms", REQUIRED, LENGTH-FIXED } { 8, "b_ls", REQUIRED, LENGTH-FIXED } { 6, "accuracy_ls", REQUIRED, LENGTH-FIXED } { 2, "b_ms", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 2, "accuracy_exp", REQUIRED, LENGTH-FIXED } { 4, "accuracy_ms", REQUIRED, LENGTH-FIXED } { 4, "b_exponent", REQUIRED, LENGTH-FIXED } { 4, "r_exponent", REQUIRED, LENGTH-FIXED } Set Sensor Hysteresis Request ----------------------------- FIID Template: tmpl_cmd_set_sensor_hysteresis_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "hysteresis_mask", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis_value", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis_value", REQUIRED, LENGTH-FIXED } Set Sensor Hysteresis Response ------------------------------ FIID Template: tmpl_cmd_set_sensor_hysteresis_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Sensor Hysteresis Request ----------------------------- FIID Template: tmpl_cmd_get_sensor_hysteresis_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "hysteresis_mask", REQUIRED, LENGTH-FIXED } Get Sensor Hysteresis Response ------------------------------ FIID Template: tmpl_cmd_get_sensor_hysteresis_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "positive_going_threshold_hysteresis_value", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis_value", REQUIRED, LENGTH-FIXED } Set Sensor Thresholds Request ----------------------------- FIID Template: tmpl_cmd_set_sensor_thresholds_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 1, "set_lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "set_lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "set_lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 1, "set_upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "set_upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "set_upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 8, "lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } Set Sensor Thresholds Response ------------------------------ FIID Template: tmpl_cmd_set_sensor_thresholds_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Sensor Thresholds Request ----------------------------- FIID Template: tmpl_cmd_get_sensor_thresholds_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } Get Sensor Thresholds Response ------------------------------ FIID Template: tmpl_cmd_get_sensor_thresholds_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 1, "readable_thresholds.lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "readable_thresholds.lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "readable_thresholds.lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 1, "readable_thresholds.upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "readable_thresholds.upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "readable_thresholds.upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 8, "lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } Set Sensor Event Enable Request ------------------------------- FIID Template: tmpl_cmd_set_sensor_event_enable_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 2, "event_message_action", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 16, "assertion_event_bitmask", OPTIONAL, LENGTH-FIXED } { 16, "deassertion_event_bitmask", OPTIONAL, LENGTH-FIXED } Set Sensor Event Enable (Threshold) Request ------------------------------------------- FIID Template: tmpl_cmd_set_sensor_event_enable_threshold_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 2, "event_message_action", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved3", OPTIONAL, LENGTH-FIXED } Set Sensor Event Enable (Discrete) Request ------------------------------------------ FIID Template: tmpl_cmd_set_sensor_event_enable_discrete_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 2, "event_message_action", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved3", OPTIONAL, LENGTH-FIXED } Set Sensor Event Enable Response -------------------------------- FIID Template: tmpl_cmd_set_sensor_event_enable_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Sensor Event Enable Request ------------------------------- FIID Template: tmpl_cmd_get_sensor_event_enable_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } Get Sensor Event Enable Response -------------------------------- FIID Template: tmpl_cmd_get_sensor_event_enable_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 6, "reserved", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 16, "assertion_event_bitmask", OPTIONAL, LENGTH-FIXED } { 16, "deassertion_event_bitmask", OPTIONAL, LENGTH-FIXED } Get Sensor Event Enable (Threshold) Response -------------------------------------------- FIID Template: tmpl_cmd_get_sensor_event_enable_threshold_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 6, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_for_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_for_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_for_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved3", OPTIONAL, LENGTH-FIXED } Get Sensor Event Enable (Discrete) Response ------------------------------------------- FIID Template: tmpl_cmd_get_sensor_event_enable_discrete_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 6, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "scanning_on_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "assertion_event_message_for_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "deassertion_event_message_for_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved3", OPTIONAL, LENGTH-FIXED } Re-arm Sensor Events Request ---------------------------- FIID Template: tmpl_cmd_re_arm_sensor_events_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } { 1, "re_arm_all_event_status_from_this_sensor", REQUIRED, LENGTH-FIXED } { 16, "re_arm_assertion_event", OPTIONAL, LENGTH-FIXED } { 16, "re_arm_deassertion_event", OPTIONAL, LENGTH-FIXED } Re-arm Sensor Events (Threshold) Request ---------------------------------------- FIID Template: tmpl_cmd_re_arm_sensor_events_threshold_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "re_arm_all_event_status_from_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_lower_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_non_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_non_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_critical_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_critical_going_high", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_non_recoverable_going_low", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_upper_non_recoverable_going_high", OPTIONAL, LENGTH-FIXED } { 4, "reserved3", OPTIONAL, LENGTH-FIXED } Re-arm Sensor Events (Discrete) Request --------------------------------------- FIID Template: tmpl_cmd_re_arm_sensor_events_discrete_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "re_arm_all_event_status_from_this_sensor", REQUIRED, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_assertion_event_for_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved2", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_0", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_1", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_2", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_3", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_4", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_5", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_6", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_7", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_8", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_9", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_10", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_11", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_12", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_13", OPTIONAL, LENGTH-FIXED } { 1, "re_arm_deassertion_event_for_state_bit_14", OPTIONAL, LENGTH-FIXED } { 1, "reserved3", OPTIONAL, LENGTH-FIXED } Re-arm Sensor Events Response ----------------------------- FIID Template: tmpl_cmd_re_arm_sensor_events_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Sensor Event Status Request ------------------------------- FIID Template: tmpl_cmd_get_sensor_event_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } Get Sensor Event Status Response -------------------------------- FIID Template: tmpl_cmd_get_sensor_event_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 16, "assertion_event", REQUIRED, LENGTH-FIXED } { 16, "deassertion_event", REQUIRED, LENGTH-FIXED } Get Sensor Event Status (Threshold) Response -------------------------------------------- FIID Template: tmpl_cmd_get_sensor_event_status_threshold_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_non_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_non_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_non_recoverable_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_lower_non_recoverable_going_high", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_non_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_non_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_non_recoverable_going_low", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_condition_for_upper_non_recoverable_going_high", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_non_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_non_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_non_recoverable_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_lower_non_recoverable_going_high", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_non_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_non_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_critical_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_critical_going_high", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_non_recoverable_going_low", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_condition_for_upper_non_recoverable_going_high", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } Get Sensor Event Status (Discrete) Response -------------------------------------------- FIID Template: tmpl_cmd_get_sensor_event_status_discrete_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "state_0_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_1_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_2_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_3_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_4_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_5_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_6_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_7_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_8_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_9_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_10_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_11_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_12_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_13_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_14_assertion_event", REQUIRED, LENGTH-FIXED } { 1, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "state_0_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_1_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_2_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_3_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_4_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_5_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_6_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_7_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_8_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_9_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_10_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_11_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_12_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_13_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "state_14_deassertion_event", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } Get Sensor Reading Request -------------------------- FIID Template: tmpl_cmd_get_sensor_reading_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } Get Sensor Reading Response --------------------------- FIID Template: tmpl_cmd_get_sensor_reading_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 8, "sensor_event_bitmask1", REQUIRED, LENGTH-FIXED } { 7, "sensor_event_bitmask2", OPTIONAL, LENGTH-FIXED } { 1, "reserved2", OPTIONAL, LENGTH-FIXED } Get Sensor Reading (Threshold) Response --------------------------------------- FIID Template: tmpl_cmd_get_sensor_reading_threshold_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "at_or_below_lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "at_or_below_lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "at_or_below_lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 1, "at_or_above_upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "at_or_above_upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 1, "at_or_above_upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "reserved3", OPTIONAL, LENGTH-FIXED } Get Sensor Reading (Discrete) Response -------------------------------------- FIID Template: tmpl_cmd_get_sensor_reading_discrete_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "reading_state", REQUIRED, LENGTH-FIXED } { 1, "sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "all_event_messages", REQUIRED, LENGTH-FIXED } { 1, "state_0_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_1_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_2_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_3_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_4_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_5_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_6_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_7_asserted", REQUIRED, LENGTH-FIXED } { 1, "state_8_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_9_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_10_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_11_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_12_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_13_asserted", OPTIONAL, LENGTH-FIXED } { 1, "state_14_asserted", OPTIONAL, LENGTH-FIXED } { 1, "reserved2", OPTIONAL, LENGTH-FIXED } Set Sensor Type Request ----------------------- FIID Template: tmpl_cmd_set_sensor_type_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 7, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } Set Sensor Type Response ------------------------ FIID Template: tmpl_cmd_set_sensor_type_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Get Sensor Type Request ----------------------- FIID Template: tmpl_cmd_get_sensor_type_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } Get Sensor Type Response ------------------------ FIID Template: tmpl_cmd_get_sensor_type_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 7, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status Request ------------------------------------------- FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 8, "assertion_event_bitmask1", REQUIRED, LENGTH-FIXED } { 8, "assertion_event_bitmask2", REQUIRED, LENGTH-FIXED } { 8, "deassertion_event_bitmask1", REQUIRED, LENGTH-FIXED } { 8, "deassertion_event_bitmask2", REQUIRED, LENGTH-FIXED } { 8, "event_data1", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status (Threshold) Request ------------------------------------------------------- FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_threshold_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "event_data1", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status (Discrete) Request ------------------------------------------------------ FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_discrete_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 1, "state_0_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_1_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_2_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_3_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_4_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_5_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_6_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_7_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_8_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_9_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_10_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_11_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_12_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_13_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_14_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "state_0_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_1_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_2_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_3_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_4_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_5_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_6_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_7_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_8_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_9_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_10_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_11_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_12_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_13_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_14_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "event_data1", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status (with Event Fields) Request --------------------------------------------------------------- FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_event_fields_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 8, "assertion_event_bitmask1", REQUIRED, LENGTH-FIXED } { 8, "assertion_event_bitmask2", REQUIRED, LENGTH-FIXED } { 8, "deassertion_event_bitmask1", REQUIRED, LENGTH-FIXED } { 8, "deassertion_event_bitmask2", REQUIRED, LENGTH-FIXED } { 4, "offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 2, "event_data3_flag", REQUIRED, LENGTH-FIXED } { 2, "event_data2_flag", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status (Threshold with Event Fields) Request ------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_threshold_event_fields_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_lower_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_upper_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_lower_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_critical_going_high_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_low_occurred", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_upper_non_recoverable_going_high_occurred", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 4, "offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 2, "event_data3_flag", REQUIRED, LENGTH-FIXED } { 2, "event_data2_flag", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status (Discrete with Event Fields) Request ------------------------------------------------------------------------ FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_discrete_event_fields_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 2, "sensor_reading_operation", REQUIRED, LENGTH-FIXED } { 2, "deassertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "assertion_bits_operation", REQUIRED, LENGTH-FIXED } { 2, "event_data_bytes_operation", REQUIRED, LENGTH-FIXED } { 8, "sensor_reading", REQUIRED, LENGTH-FIXED } { 1, "state_0_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_1_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_2_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_3_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_4_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_5_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_6_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_7_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_8_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_9_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_10_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_11_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_12_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_13_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_14_assertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "state_0_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_1_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_2_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_3_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_4_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_5_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_6_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_7_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_8_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_9_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_10_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_11_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_12_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_13_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "state_14_deassertion_event_occurred", REQUIRED, LENGTH-FIXED } { 1, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 2, "event_data3_flag", REQUIRED, LENGTH-FIXED } { 2, "event_data2_flag", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } Set Sensor Reading and Event Status Response -------------------------------------------- FIID Template: tmpl_cmd_set_sensor_reading_and_event_status_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-serial-modem-cmds-templates.h0000644002055400205540000002226213527331637031403 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SERIAL_MODEM_CMDS_TEMPLATES_H #define IPMI_SERIAL_MODEM_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Set Serial Modem Configuration Request -------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Set Serial Modem Configuration Response --------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set Serial Modem Configuration (Set In Progress) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Set Serial Modem Configuration (Connection Mode) Request -------------------------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_connection_mode_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "basic_mode", REQUIRED, LENGTH-FIXED } { 1, "ppp_mode", REQUIRED, LENGTH-FIXED } { 1, "terminal_mode", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "connect_mode", REQUIRED, LENGTH-FIXED } Set Serial Modem Configuration (IPMI Messaging Comm Settings) Request --------------------------------------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 5, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "dtr_hangup", REQUIRED, LENGTH-FIXED } { 2, "flow_control", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved3", REQUIRED, LENGTH-FIXED } Set Serial Modem Configuration (Page Blackout Interval) Request --------------------------------------------------------------- FIID Template: tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "page_blackout_interval", REQUIRED, LENGTH-FIXED } Set Serial Modem Configuration (Call Retry Interval) Request ------------------------------------------------------------ FIID Template: tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "call_retry_interval", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration Request -------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "get_parameter", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration Response --------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Get Serial Modem Configuration (Set In Progress) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_set_in_progress_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration (Connection Mode) Response --------------------------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_connection_mode_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "basic_mode", REQUIRED, LENGTH-FIXED } { 1, "ppp_mode", REQUIRED, LENGTH-FIXED } { 1, "terminal_mode", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 1, "connect_mode", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration (IPMI Messaging Comm Settings) Response ---------------------------------------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 5, "reserved1", REQUIRED, LENGTH-FIXED } { 1, "dtr_hangup", REQUIRED, LENGTH-FIXED } { 2, "flow_control", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration (Page Blackout Interval) Response ---------------------------------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "page_blackout_interval", REQUIRED, LENGTH-FIXED } Get Serial Modem Configuration (Call Retry Interval) Response ------------------------------------------------------------- FIID Template: tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "call_retry_interval", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SERIAL_MODEM_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sol-cmds-templates.h0000644002055400205540000003163213527331637027623 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_CMDS_TEMPLATES_H #define IPMI_SOL_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Set SOL Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Set SOL Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } Set SOL Configuration Parameters (Set In Progress) Request ---------------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved2", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Enable) Request ----------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 1, "sol_enable", REQUIRED, LENGTH-FIXED } { 7, "reserved2", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Authentication) Request -------------------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "sol_privilege_level", REQUIRED, LENGTH-FIXED } { 2, "reserved2", REQUIRED, LENGTH-FIXED } { 1, "force_sol_payload_authentication", REQUIRED, LENGTH-FIXED } { 1, "force_sol_payload_encryption", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (Character Accumulate Interval and Send Threshold) Request ------------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "character_accumulate_interval", REQUIRED, LENGTH-FIXED } { 8, "character_send_threshold", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Retry) Request ---------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 3, "retry_count", REQUIRED, LENGTH-FIXED } { 5, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "retry_interval", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Non-Volatile Bit Rate) Request -------------------------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Volatile Bit Rate) Request ---------------------------------------------------------------- FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } Set SOL Configuration Parameters (SOL Payload Port Number) Request ------------------------------------------------------------------ FIID Template: tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 16, "port_number", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters Request ---------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_rq { 8, "cmd", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "get_parameter", REQUIRED, LENGTH-FIXED } { 8, "parameter_selector", REQUIRED, LENGTH-FIXED } { 8, "set_selector", REQUIRED, LENGTH-FIXED } { 8, "block_selector", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters Response ----------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1024, "configuration_parameter_data", REQUIRED, LENGTH-VARIABLE } Get SOL Configuration Parameters (Set In Progress) Response ----------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_set_in_progress_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 2, "state", REQUIRED, LENGTH-FIXED } { 6, "reserved", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Enable) Response ------------------------------------------------------ FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 1, "sol_enable", REQUIRED, LENGTH-FIXED } { 7, "reserved", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Authentication) Response -------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "sol_privilege_level", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 1, "force_sol_payload_authentication", REQUIRED, LENGTH-FIXED } { 1, "force_sol_payload_encryption", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (Character Accumulate Interval and Send Threshold) Response -------------------------------------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "character_accumulate_interval", REQUIRED, LENGTH-FIXED } { 8, "character_send_threshold", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Retry) Response ----------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 3, "retry_count", REQUIRED, LENGTH-FIXED } { 5, "reserved", REQUIRED, LENGTH-FIXED } { 8, "retry_interval", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Non-Volatile Bit Rate) Response --------------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Volatile Bit Rate) Response ----------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 4, "bit_rate", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } Get SOL Configuration Parameters (SOL Payload Channel) Response --------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 8, "payload_channel", REQUIRED, LENGTH-FIXED } Notes: Read only field, no "set" equivalent. Get SOL Configuration Parameters (SOL Payload Port Number) Response ------------------------------------------------------------------- FIID Template: tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs { 8, "cmd", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "comp_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "present_revision", REQUIRED, LENGTH-FIXED } { 4, "oldest_revision_parameter", REQUIRED, LENGTH-FIXED } { 16, "port_number", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sol-payload-templates.h0000644002055400205540000001021713527331637030322 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SOL_PAYLOAD_TEMPLATES_H #define IPMI_SOL_PAYLOAD_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. SOL Payload Data ---------------- FIID Template: tmpl_sol_payload_data { 4, "packet_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "packet_ack_nack_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "accepted_character_count", REQUIRED, LENGTH-FIXED } { 8, "operation_status", REQUIRED, LENGTH-FIXED } { 524288, "character_data", OPTIONAL, LENGTH-VARIABLE } SOL Payload Data Remote Console to BMC -------------------------------------- FIID Template: tmpl_sol_payload_data_remote_console_to_bmc { 4, "packet_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "packet_ack_nack_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "accepted_character_count", REQUIRED, LENGTH-FIXED } { 1, "flush_outbound", REQUIRED, LENGTH-FIXED } { 1, "flush_inbound", REQUIRED, LENGTH-FIXED } { 1, "drop_dcd_dsr", REQUIRED, LENGTH-FIXED } { 1, "cts_pause", REQUIRED, LENGTH-FIXED } { 1, "generate_break", REQUIRED, LENGTH-FIXED } { 1, "ring_wor", REQUIRED, LENGTH-FIXED } { 1, "nack", REQUIRED, LENGTH-FIXED } { 1, "reserved3", REQUIRED, LENGTH-FIXED } { 524288, "character_data", OPTIONAL, LENGTH-VARIABLE } SOL Payload Data BMC to Remote Console -------------------------------------- FIID Template: tmpl_sol_payload_data_bmc_to_remote_console { 4, "packet_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 4, "packet_ack_nack_sequence_number", REQUIRED, LENGTH-FIXED } { 4, "reserved2", REQUIRED, LENGTH-FIXED } { 8, "accepted_character_count", REQUIRED, LENGTH-FIXED } { 2, "reserved3", REQUIRED, LENGTH-FIXED } { 1, "break_condition", REQUIRED, LENGTH-FIXED } { 1, "transmit_overrun", REQUIRED, LENGTH-FIXED } { 1, "sol_deactivating", REQUIRED, LENGTH-FIXED } { 1, "character_transfer_unavailable", REQUIRED, LENGTH-FIXED } { 1, "nack", REQUIRED, LENGTH-FIXED } { 1, "reserved4", REQUIRED, LENGTH-FIXED } { 524288, "character_data", OPTIONAL, LENGTH-VARIABLE } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SOL_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/rmcp-cmds-templates.h0000644002055400205540000000621313527331637027030 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RMCP_CMDS_TEMPLATES_H #define RMCP_CMDS_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. ASF Presence Ping ----------------- FIID Template: tmpl_cmd_asf_presence_ping { 32, "iana_enterprise_number", REQUIRED, LENGTH-FIXED } { 8, "message_type", REQUIRED, LENGTH-FIXED } { 8, "message_tag", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "data_length", REQUIRED, LENGTH-FIXED } ASF Presence Pong ----------------- FIID Template: tmpl_cmd_asf_presence_pong { 32, "iana_enterprise_number", REQUIRED, LENGTH-FIXED } { 8, "message_type", REQUIRED, LENGTH-FIXED } { 8, "message_tag", REQUIRED, LENGTH-FIXED } { 8, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "data_length", REQUIRED, LENGTH-FIXED } { 32, "oem_iana_enterprise_number", REQUIRED, LENGTH-FIXED } { 32, "oem_defined", REQUIRED, LENGTH-FIXED } { 4, "supported_entities.version", REQUIRED, LENGTH-FIXED } { 3, "supported_entities.reserved", REQUIRED, LENGTH-FIXED } { 1, "supported_entities.ipmi_supported", REQUIRED, LENGTH-FIXED } { 7, "supported_interactions.reserved", REQUIRED, LENGTH-FIXED } { 1, "supported_interactions.security_extensions", REQUIRED, LENGTH-FIXED } { 48, "reserved2", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* RMCP_CMDS_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-ipmb-interface-templates.h0000644002055400205540000000565713527331636030776 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IPMB_INTERFACE_TEMPLATES_H #define IPMI_IPMB_INTERFACE_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. IPMB Message Header Request --------------------------- FIID Template: tmpl_ipmb_msg_hdr_rq { 8, "rs_addr", REQUIRED, LENGTH-FIXED } { 2, "rs_lun", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 8, "checksum1", REQUIRED, LENGTH-FIXED } { 8, "rq_addr", REQUIRED, LENGTH-FIXED } { 2, "rq_lun", REQUIRED, LENGTH-FIXED } { 6, "rq_seq", REQUIRED, LENGTH-FIXED } IPMB Message Header Response ---------------------------- FIID Template: tmpl_ipmb_msg_hdr_rs { 2, "rq_lun", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 8, "checksum1", REQUIRED, LENGTH-FIXED } { 8, "rs_addr", REQUIRED, LENGTH-FIXED } { 2, "rs_lun", REQUIRED, LENGTH-FIXED } { 6, "rq_seq", REQUIRED, LENGTH-FIXED } FIID Template: tmpl_ipmb_msg_trlr { 8, "checksum2", REQUIRED, LENGTH-FIXED } FIID Template: tmpl_ipmb_msg { 2040, "data", REQUIRED, LENGTH-VARIABLE } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_IPMB_INTERFACE_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-kcs-interface-templates.h0000644002055400205540000000421713527331636030616 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_KCS_INTERFACE_TEMPLATES_H #define IPMI_KCS_INTERFACE_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. KCS Header ---------- FIID Template: tmpl_hdr_kcs { 2, "lun", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_KCS_INTERFACE_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-lan-interface-templates.h0000644002055400205540000000656013527331637030614 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_INTERFACE_TEMPLATES_H #define IPMI_LAN_INTERFACE_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. SECURE_MEMSET_ON_CLEAR - when clearing field, securely memset field. LAN Session Header ------------------ FIID Template: tmpl_lan_session_hdr { 8, "authentication_type", REQUIRED, LENGTH-FIXED } { 32, "session_sequence_number", REQUIRED, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 128, "authentication_code", OPTIONAL, LENGTH-FIXED, SECURE_MEMSET_ON_CLEAR } { 8, "ipmi_msg_len", REQUIRED, LENGTH-FIXED } LAN Message Header Request -------------------------- FIID Template: tmpl_lan_msg_hdr_rq { 8, "rs_addr", REQUIRED, LENGTH-FIXED } { 2, "rs_lun", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 8, "checksum1", REQUIRED, LENGTH-FIXED } { 8, "rq_addr", REQUIRED, LENGTH-FIXED } { 2, "rq_lun", REQUIRED, LENGTH-FIXED } { 6, "rq_seq", REQUIRED, LENGTH-FIXED } LAN Message Header Response --------------------------- FIID Template: tmpl_lan_msg_hdr_rs { 8, "rq_addr", REQUIRED, LENGTH-FIXED } { 2, "rq_lun", REQUIRED, LENGTH-FIXED } { 6, "net_fn", REQUIRED, LENGTH-FIXED } { 8, "checksum1", REQUIRED, LENGTH-FIXED } { 8, "rs_addr", REQUIRED, LENGTH-FIXED } { 2, "rs_lun", REQUIRED, LENGTH-FIXED } { 6, "rq_seq", REQUIRED, LENGTH-FIXED } LAN Message Trailer ------------------- FIID Template: tmpl_lan_msg_trlr { 8, "checksum2", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_LAN_INTERFACE_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-rmcpplus-interface-templates.h0000644002055400205540000002043613527331637031705 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_INTERFACE_TEMPLATES_H #define IPMI_RMCPPLUS_INTERFACE_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. RMCP+ Session Header -------------------- FIID Template: tmpl_rmcpplus_session_hdr { 4, "authentication_type", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 6, "payload_type", REQUIRED, LENGTH-FIXED } { 1, "payload_type.authenticated", REQUIRED, LENGTH-FIXED } { 1, "payload_type.encrypted", REQUIRED, LENGTH-FIXED } { 24, "oem_iana", OPTIONAL, LENGTH-FIXED } { 8, "reserved2", OPTIONAL, LENGTH-FIXED } { 16, "oem_payload_id", OPTIONAL, LENGTH-FIXED } { 32, "session_id", REQUIRED, LENGTH-FIXED } { 32, "session_sequence_number", REQUIRED, LENGTH-FIXED } { 16, "ipmi_payload_len", REQUIRED, LENGTH-FIXED } RMCP+ Session Trailer --------------------- FIID Template: tmpl_rmcpplus_session_trlr { 32, "integrity_pad", OPTIONAL, LENGTH-VARIABLE } { 8, "pad_length", REQUIRED, LENGTH-FIXED } { 8, "next_header", REQUIRED, LENGTH-FIXED } { 256, "authentication_code", OPTIONAL, LENGTH-VARIABLE } RMCP+ Payload ------------- FIID Template: tmpl_rmcpplus_payload { 512, "confidentiality_header", OPTIONAL, LENGTH-VARIABLE } { 524288, "payload_data", REQUIRED, LENGTH-VARIABLE } { 512, "confidentiality_trailer", OPTIONAL, LENGTH-VARIABLE } RMCP+ Open Session Request -------------------------- FIID Template: tmpl_rmcpplus_open_session_request { 8, "message_tag", REQUIRED, LENGTH-FIXED } { 4, "requested_maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 16, "reserved2", REQUIRED, LENGTH-FIXED } { 32, "remote_console_session_id", REQUIRED, LENGTH-FIXED } { 8, "authentication_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "authentication_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "authentication_payload.authentication_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved4", REQUIRED, LENGTH-FIXED } { 24, "reserved5", REQUIRED, LENGTH-FIXED } { 8, "integrity_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved6", REQUIRED, LENGTH-FIXED } { 8, "integrity_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "integrity_payload.integrity_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved7", REQUIRED, LENGTH-FIXED } { 24, "reserved8", REQUIRED, LENGTH-FIXED } { 8, "confidentiality_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved9", REQUIRED, LENGTH-FIXED } { 8, "confidentiality_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "confidentiality_payload.confidentiality_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved10", REQUIRED, LENGTH-FIXED } { 24, "reserved11", REQUIRED, LENGTH-FIXED } RMCP+ Open Session Response --------------------------- FIID Template: tmpl_rmcpplus_open_session_response { 8, "message_tag", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "rmcpplus_status_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 4, "maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 8, "reserved2", REQUIRED, LENGTH-FIXED } { 32, "remote_console_session_id", REQUIRED, LENGTH-FIXED } { 32, "managed_system_session_id", REQUIRED, LENGTH-FIXED } { 8, "authentication_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "authentication_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "authentication_payload.authentication_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved4", REQUIRED, LENGTH-FIXED } { 24, "reserved5", REQUIRED, LENGTH-FIXED } { 8, "integrity_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved6", REQUIRED, LENGTH-FIXED } { 8, "integrity_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "integrity_payload.integrity_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved7", REQUIRED, LENGTH-FIXED } { 24, "reserved8", REQUIRED, LENGTH-FIXED } { 8, "confidentiality_payload.payload_type", REQUIRED, LENGTH-FIXED } { 16, "reserved9", REQUIRED, LENGTH-FIXED } { 8, "confidentiality_payload.payload_length", REQUIRED, LENGTH-FIXED } { 6, "confidentiality_payload.confidentiality_algorithm", REQUIRED, LENGTH-FIXED } { 2, "reserved10", REQUIRED, LENGTH-FIXED } { 24, "reserved11", REQUIRED, LENGTH-FIXED } RMCP+ RAKP Message 1 -------------------- FIID Template: tmpl_rmcpplus_rakp_message_1 { 8, "message_tag", REQUIRED, LENGTH-FIXED } { 24, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "managed_system_session_id", REQUIRED, LENGTH-FIXED } { 128, "remote_console_random_number", REQUIRED, LENGTH-FIXED } { 4, "requested_maximum_privilege_level", REQUIRED, LENGTH-FIXED } { 1, "name_only_lookup", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } { 16, "reserved3", REQUIRED, LENGTH-FIXED } { 8, "user_name_length", REQUIRED, LENGTH-FIXED } { 128, "user_name", OPTIONAL, LENGTH-VARIABLE } RMCP+ RAKP Message 2 -------------------- FIID Template: tmpl_rmcpplus_rakp_message_2 { 8, "message_tag", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "rmcpplus_status_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "remote_console_session_id", REQUIRED, LENGTH-FIXED } { 128, "managed_system_random_number", REQUIRED, LENGTH-FIXED } { 128, "managed_system_guid", REQUIRED, LENGTH-FIXED } { 512, "key_exchange_authentication_code", OPTIONAL, LENGTH-VARIABLE } RMCP+ RAKP Message 3 -------------------- FIID Template: tmpl_rmcpplus_rakp_message_3 { 8, "message_tag", REQUIRED, LENGTH-FIXED } { 8, "rmcpplus_status_code", REQUIRED, LENGTH-FIXED } { 16, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "managed_system_session_id", REQUIRED, LENGTH-FIXED } { 512, "key_exchange_authentication_code", OPTIONAL, LENGTH-VARIABLE } RMCP+ RAKP Message 4 -------------------- FIID Template: tmpl_rmcpplus_rakp_message_4 { 8, "message_tag", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 8, "rmcpplus_status_code", REQUIRED, LENGTH-FIXED, MAKES-PACKET-SUFFICIENT } { 16, "reserved1", REQUIRED, LENGTH-FIXED } { 32, "remote_console_session_id", REQUIRED, LENGTH-FIXED } { 512, "integrity_check_value", OPTIONAL, LENGTH-VARIABLE } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_INTERFACE_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/rmcp-interface-templates.h0000644002055400205540000000455513527331637030051 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RMCP_INTERFACE_TEMPLATES_H #define RMCP_INTERFACE_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. RMCP Header ----------- FIID Template: tmpl_rmcp_hdr { 8, "version", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "sequence_number", REQUIRED, LENGTH-FIXED } { 5, "message_class.class", REQUIRED, LENGTH-FIXED } { 2, "message_class.reserved", REQUIRED, LENGTH-FIXED } { 1, "message_class.ack", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* RMCP_INTERFACE_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-cipher-suite-record-format-templates.h0000644002055400205540000000702413527331636033242 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CIPHER_SUITE_RECORD_FORMAT_TEMPLATES_H #define IPMI_CIPHER_SUITE_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. Cipher Suite Record Header -------------------------- FIID Template: tmpl_cipher_suite_record_header { 6, "record_format", REQUIRED, LENGTH-FIXED } { 2, "tag_bits", REQUIRED, LENGTH-FIXED } Cipher Suite Record ------------------- FIID Template: tmpl_cipher_suite_record { 6, "record_format", REQUIRED, LENGTH-FIXED } { 2, "tag_bits", REQUIRED, LENGTH-FIXED } { 8, "cipher_suite_id", REQUIRED, LENGTH-FIXED } { 6, "authentication_algorithm", REQUIRED, LENGTH-FIXED } { 2, "authentication_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } { 6, "integrity_algorithm", REQUIRED, LENGTH-FIXED } { 2, "integrity_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } { 6, "confidentiality_algorithm", REQUIRED, LENGTH-FIXED } { 2, "confidentiality_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } OEM Cipher Suite Record ----------------------- FIID Template: tmpl_oem_cipher_suite_record { 6, "record_format", REQUIRED, LENGTH-FIXED } { 2, "tag_bits", REQUIRED, LENGTH-FIXED } { 8, "oem_cipher_suite_id", REQUIRED, LENGTH-FIXED } { 24, "oem_iana", REQUIRED, LENGTH-FIXED } { 6, "authentication_algorithm", REQUIRED, LENGTH-FIXED } { 2, "authentication_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } { 6, "integrity_algorithm", REQUIRED, LENGTH-FIXED } { 2, "integrity_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } { 6, "confidentiality_algorithm", REQUIRED, LENGTH-FIXED } { 2, "confidentiality_algorithm_tag_bits", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_CIPHER_SUITE_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-fru-information-record-format-templates.h0000644002055400205540000001626613527331636033770 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_INFORMATION_RECORD_FORMAT_TEMPLATES_H #define IPMI_FRU_INFORMATION_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. FRU Common Header ----------------- FIID Template: tmpl_fru_common_header { 4, "format_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "internal_use_area_starting_offset", REQUIRED, LENGTH-FIXED } { 8, "chassis_info_area_starting_offset", REQUIRED, LENGTH-FIXED } { 8, "board_info_area_starting_offset", REQUIRED, LENGTH-FIXED } { 8, "product_info_area_starting_offset", REQUIRED, LENGTH-FIXED } { 8, "multirecord_area_starting_offset", REQUIRED, LENGTH-FIXED } { 8, "pad", REQUIRED, LENGTH-FIXED } { 8, "checksum", REQUIRED, LENGTH-FIXED } FRU Info Area Header -------------------- FIID Template: tmpl_fru_info_area_header { 4, "format_version", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 8, "info_area_length", REQUIRED, LENGTH-FIXED } FRU Multirecord Area Header --------------------------- FIID Template: tmpl_fru_multirecord_area_header { 8, "record_type_id", REQUIRED, LENGTH-FIXED } { 4, "record_format_version", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "end_of_list", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } { 8, "record_checksum", REQUIRED, LENGTH-FIXED } { 8, "header_checksum", REQUIRED, LENGTH-FIXED } FRU Power Supply Information ---------------------------- FIID Template: tmpl_fru_power_supply_information { 12, "overall_capacity", REQUIRED, LENGTH-FIXED } { 4, "reserved1", REQUIRED, LENGTH-FIXED } { 16, "peak_va", REQUIRED, LENGTH-FIXED } { 8, "inrush_current", REQUIRED, LENGTH-FIXED } { 8, "inrush_interval", REQUIRED, LENGTH-FIXED } { 16, "low_end_input_voltage_range_1", REQUIRED, LENGTH-FIXED } { 16, "high_end_input_voltage_range_1", REQUIRED, LENGTH-FIXED } { 16, "low_end_input_voltage_range_2", REQUIRED, LENGTH-FIXED } { 16, "high_end_input_voltage_range_2", REQUIRED, LENGTH-FIXED } { 8, "low_end_input_frequency_range", REQUIRED, LENGTH-FIXED } { 8, "high_end_input_frequency_range", REQUIRED, LENGTH-FIXED } { 8, "ac_dropout_tolerance", REQUIRED, LENGTH-FIXED } { 1, "predictive_fail_support", REQUIRED, LENGTH-FIXED } { 1, "power_factor_correction", REQUIRED, LENGTH-FIXED } { 1, "autoswitch", REQUIRED, LENGTH-FIXED } { 1, "hot_swap_support", REQUIRED, LENGTH-FIXED } { 1, "tachometer_pulses_per_rotation_predictive_fail_polarity", REQUIRED, LENGTH-FIXED } { 3, "reserved2", REQUIRED, LENGTH-FIXED } { 12, "peak_capacity", REQUIRED, LENGTH-FIXED } { 4, "hold_up_time", REQUIRED, LENGTH-FIXED } { 4, "voltage_2", REQUIRED, LENGTH-FIXED } { 4, "voltage_1", REQUIRED, LENGTH-FIXED } { 16, "total_combined_wattage", REQUIRED, LENGTH-FIXED } { 8, "predictive_fail_tachometer_lower_threshold", REQUIRED, LENGTH-FIXED } FRU DC Output ------------- FIID Template: tmpl_fru_dc_output { 4, "output_number", REQUIRED, LENGTH-FIXED } { 3, "reserved", REQUIRED, LENGTH-FIXED } { 1, "standby", REQUIRED, LENGTH-FIXED } { 16, "nominal_voltage", REQUIRED, LENGTH-FIXED } { 16, "maximum_negative_voltage_deviation", REQUIRED, LENGTH-FIXED } { 16, "maximum_positive_voltage_deviation", REQUIRED, LENGTH-FIXED } { 16, "ripple_and_noise_pk_pk", REQUIRED, LENGTH-FIXED } { 16, "minimum_current_draw", REQUIRED, LENGTH-FIXED } { 16, "maximum_current_draw", REQUIRED, LENGTH-FIXED } FRU DC Load ----------- FIID Template: tmpl_fru_dc_load { 4, "output_number", REQUIRED, LENGTH-FIXED } { 4, "reserved", REQUIRED, LENGTH-FIXED } { 16, "nominal_voltage", REQUIRED, LENGTH-FIXED } { 16, "specd_minimum_voltage", REQUIRED, LENGTH-FIXED } { 16, "specd_maximum_voltage", REQUIRED, LENGTH-FIXED } { 16, "specd_ripple_and_noise_pk_pk", REQUIRED, LENGTH-FIXED } { 16, "minimum_current_load", REQUIRED, LENGTH-FIXED } { 16, "maximum_current_load", REQUIRED, LENGTH-FIXED } FRU Management Access Record ---------------------------- FIID Template: tmpl_fru_management_access_record { 8, "sub_record_type", REQUIRED, LENGTH-FIXED } { 2048, "record", REQUIRED, LENGTH-VARIABLE } FRU Base Compatability Record ----------------------------- FIID Template: tmpl_fru_base_compatibility_record { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "entity_id_code", REQUIRED, LENGTH-FIXED } { 8, "compatibility_base", REQUIRED, LENGTH-FIXED } { 7, "compatibility_code_start_value", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 4096, "code_range_mask", REQUIRED, LENGTH-VARIABLE } FRU Extended Compatability Record --------------------------------- FIID Template: tmpl_fru_extended_compatibility_record { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 8, "entity_id_code", REQUIRED, LENGTH-FIXED } { 8, "compatibility_base", REQUIRED, LENGTH-FIXED } { 7, "compatibility_code_start_value", REQUIRED, LENGTH-FIXED } { 1, "reserved", REQUIRED, LENGTH-FIXED } { 4096, "code_range_mask", REQUIRED, LENGTH-VARIABLE } FRU OEM Record -------------- FIID Template: tmpl_fru_oem_record { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 4096, "oem_data", REQUIRED, LENGTH-VARIABLE } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_FRU_INFORMATION_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sdr-record-format-templates.h0000644002055400205540000016747113527331637031447 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_RECORD_FORMAT_TEMPLATES_H #define IPMI_SDR_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. SDR Record Header ----------------- FIID Template: tmpl_sdr_record_header { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } SDR Full Sensor Record ---------------------- FIID Template: tmpl_sdr_full_sensor_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.settable_sensor", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 16, "assertion_event_lower_threshold_reading_mask", REQUIRED, LENGTH-FIXED } { 16, "deassertion_event_upper_threshold_reading_mask", REQUIRED, LENGTH-FIXED } { 16, "discrete_reading_settable_threshold_readable_threshold_mask", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 7, "linearization", REQUIRED, LENGTH-FIXED } { 1, "linearization.reserved", REQUIRED, LENGTH-FIXED } { 8, "m_ls", REQUIRED, LENGTH-FIXED } { 6, "tolerance", REQUIRED, LENGTH-FIXED } { 2, "m_ms", REQUIRED, LENGTH-FIXED } { 8, "b_ls", REQUIRED, LENGTH-FIXED } { 6, "accuracy_ls", REQUIRED, LENGTH-FIXED } { 2, "b_ms", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 2, "accuracy_exp", REQUIRED, LENGTH-FIXED } { 4, "accuracy_ms", REQUIRED, LENGTH-FIXED } { 4, "b_exponent", REQUIRED, LENGTH-FIXED } { 4, "r_exponent", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.nominal_reading", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_max", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_min", REQUIRED, LENGTH-FIXED } { 5, "analog_characteristics_flag.reserved", REQUIRED, LENGTH-FIXED } { 8, "nominal_reading", REQUIRED, LENGTH-FIXED } { 8, "normal_maximum", REQUIRED, LENGTH-FIXED } { 8, "normal_minimum", REQUIRED, LENGTH-FIXED } { 8, "sensor_maximum_reading", REQUIRED, LENGTH-FIXED } { 8, "sensor_minimum_reading", REQUIRED, LENGTH-FIXED } { 8, "upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Full Sensor Record (Non-Threshold Base Sensors) --------------------------------------------------- FIID Template: tmpl_sdr_full_sensor_record_non_threshold_based_sensors /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.reserved", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_0", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_1", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_2", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_3", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_4", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_5", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_6", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_7", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_8", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_9", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_10", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_11", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_12", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_13", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_14", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_0", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_1", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_2", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_3", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_4", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_5", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_6", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_7", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_8", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_9", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_10", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_11", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_12", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_13", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_14", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_0", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_1", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_2", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_3", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_4", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_5", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_6", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_7", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_8", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_9", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_10", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_11", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_12", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_13", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_14", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 7, "linearization", REQUIRED, LENGTH-FIXED } { 1, "linearization.reserved", REQUIRED, LENGTH-FIXED } { 8, "m_ls", REQUIRED, LENGTH-FIXED } { 6, "tolerance", REQUIRED, LENGTH-FIXED } { 2, "m_ms", REQUIRED, LENGTH-FIXED } { 8, "b_ls", REQUIRED, LENGTH-FIXED } { 6, "accuracy_ls", REQUIRED, LENGTH-FIXED } { 2, "b_ms", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 2, "accuracy_exp", REQUIRED, LENGTH-FIXED } { 4, "accuracy_ms", REQUIRED, LENGTH-FIXED } { 4, "b_exponent", REQUIRED, LENGTH-FIXED } { 4, "r_exponent", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.nominal_reading", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_max", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_min", REQUIRED, LENGTH-FIXED } { 5, "analog_characteristics_flag.reserved", REQUIRED, LENGTH-FIXED } { 8, "nominal_reading", REQUIRED, LENGTH-FIXED } { 8, "normal_maximum", REQUIRED, LENGTH-FIXED } { 8, "normal_minimum", REQUIRED, LENGTH-FIXED } { 8, "sensor_maximum_reading", REQUIRED, LENGTH-FIXED } { 8, "sensor_minimum_reading", REQUIRED, LENGTH-FIXED } { 8, "upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Full Sensor Record (Threshold Base Sensors) ----------------------------------------------- FIID Template: tmpl_sdr_full_sensor_record_threshold_based_sensors /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.reserved", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_non_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_non_recoverable_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_non_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_non_recoverable_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_non_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_non_recoverable_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_non_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_non_recoverable_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.reserved1", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.reserved2", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_non_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_non_recoverable_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_non_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_non_recoverable_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.reserved1", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.reserved2", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 7, "linearization", REQUIRED, LENGTH-FIXED } { 1, "linearization.reserved", REQUIRED, LENGTH-FIXED } { 8, "m_ls", REQUIRED, LENGTH-FIXED } { 6, "tolerance", REQUIRED, LENGTH-FIXED } { 2, "m_ms", REQUIRED, LENGTH-FIXED } { 8, "b_ls", REQUIRED, LENGTH-FIXED } { 6, "accuracy_ls", REQUIRED, LENGTH-FIXED } { 2, "b_ms", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 2, "accuracy_exp", REQUIRED, LENGTH-FIXED } { 4, "accuracy_ms", REQUIRED, LENGTH-FIXED } { 4, "b_exponent", REQUIRED, LENGTH-FIXED } { 4, "r_exponent", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.nominal_reading", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_max", REQUIRED, LENGTH-FIXED } { 1, "analog_characteristics_flag.normal_min", REQUIRED, LENGTH-FIXED } { 5, "analog_characteristics_flag.reserved", REQUIRED, LENGTH-FIXED } { 8, "nominal_reading", REQUIRED, LENGTH-FIXED } { 8, "normal_maximum", REQUIRED, LENGTH-FIXED } { 8, "normal_minimum", REQUIRED, LENGTH-FIXED } { 8, "sensor_maximum_reading", REQUIRED, LENGTH-FIXED } { 8, "sensor_minimum_reading", REQUIRED, LENGTH-FIXED } { 8, "upper_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "upper_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_recoverable_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "lower_non_critical_threshold", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 16, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Compact Sensor Record ------------------------- FIID Template: tmpl_sdr_compact_sensor_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.reserved", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 16, "assertion_event_lower_threshold_reading_mask", REQUIRED, LENGTH-FIXED } { 16, "deassertion_event_upper_threshold_reading_mask", REQUIRED, LENGTH-FIXED } { 16, "discrete_reading_settable_threshold_readable_threshold_mask", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 4, "share_count", REQUIRED, LENGTH-FIXED } { 2, "id_string_instance_modifier_type", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 7, "id_string_instance_modifier_offset", REQUIRED, LENGTH-FIXED } { 1, "entity_instance_sharing", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 24, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Compact Sensor Record (Non-Threshold Based Sensors) ------------------------------------------------------- FIID Template: tmpl_sdr_compact_sensor_record_non_threshold_based_sensors /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.reserved", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_0", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_1", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_2", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_3", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_4", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_5", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_6", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_7", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_8", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_9", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_10", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_11", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_12", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_13", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.event_offset_14", REQUIRED, LENGTH-FIXED } { 1, "assertion_event_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_0", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_1", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_2", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_3", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_4", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_5", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_6", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_7", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_8", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_9", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_10", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_11", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_12", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_13", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.event_offset_14", REQUIRED, LENGTH-FIXED } { 1, "deassertion_event_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_0", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_1", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_2", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_3", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_4", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_5", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_6", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_7", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_8", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_9", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_10", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_11", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_12", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_13", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.state_bit_14", REQUIRED, LENGTH-FIXED } { 1, "discrete_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 4, "share_count", REQUIRED, LENGTH-FIXED } { 2, "id_string_instance_modifier_type", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 7, "id_string_instance_modifier_offset", REQUIRED, LENGTH-FIXED } { 1, "entity_instance_sharing", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 24, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Compact Sensor Record (Threshold Based Sensors) --------------------------------------------------- FIID Template: tmpl_sdr_compact_sensor_record_threshold_based_sensors /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.sensor_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.event_generation", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_sensor_type", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_hysteresis", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_thresholds", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_events", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.init_scanning", REQUIRED, LENGTH-FIXED } { 1, "sensor_initialization.reserved", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.event_message_control_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.threshold_access_support", REQUIRED, LENGTH-FIXED } { 2, "sensor_capabilities.hysteresis_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.auto_re_arm_support", REQUIRED, LENGTH-FIXED } { 1, "sensor_capabilities.entity_ignore_support", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_non_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.lower_non_recoverable_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "lower_threshold_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_critical_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_critical_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_low_supported", REQUIRED, LENGTH-FIXED } { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_high_supported", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_non_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_critical_threshold_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.upper_non_recoverable_is_comparison", REQUIRED, LENGTH-FIXED } { 1, "upper_threshold_reading_mask.reserved", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_non_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.lower_non_recoverable_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_non_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_critical_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.upper_non_recoverable_threshold_is_readable", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.reserved1", REQUIRED, LENGTH-FIXED } { 1, "readable_threshold_mask.reserved2", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_non_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.lower_non_recoverable_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_non_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_critical_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.upper_non_recoverable_threshold_is_settable", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.reserved1", REQUIRED, LENGTH-FIXED } { 1, "settable_threshold_mask.reserved2", REQUIRED, LENGTH-FIXED } { 1, "sensor_unit1.percentage", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.modifier_unit", REQUIRED, LENGTH-FIXED } { 3, "sensor_unit1.rate_unit", REQUIRED, LENGTH-FIXED } { 2, "sensor_unit1.analog_data_format", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit2.base_unit", REQUIRED, LENGTH-FIXED } { 8, "sensor_unit3.modifier_unit", REQUIRED, LENGTH-FIXED } { 4, "share_count", REQUIRED, LENGTH-FIXED } { 2, "id_string_instance_modifier_type", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 7, "id_string_instance_modifier_offset", REQUIRED, LENGTH-FIXED } { 1, "entity_instance_sharing", REQUIRED, LENGTH-FIXED } { 8, "positive_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 8, "negative_going_threshold_hysteresis", REQUIRED, LENGTH-FIXED } { 24, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Event Only Record --------------------- FIID Template: tmpl_sdr_event_only_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", REQUIRED, LENGTH-FIXED } { 7, "sensor_owner_id", REQUIRED, LENGTH-FIXED } { 2, "sensor_owner_lun", REQUIRED, LENGTH-FIXED } { 2, "fru_inventory_device_owner_lun", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "event_reading_type_code", REQUIRED, LENGTH-FIXED } /******************************************* * Sensor Record Sharing, Sensor Direction * *******************************************/ { 4, "share_count", REQUIRED, LENGTH-FIXED } { 2, "id_string_instance_modifier_type", REQUIRED, LENGTH-FIXED } { 2, "sensor_direction", REQUIRED, LENGTH-FIXED } { 7, "id_string_instance_modifier_offset", REQUIRED, LENGTH-FIXED } { 1, "entity_instance_sharing", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "id_string_type_length_code", REQUIRED, LENGTH-FIXED } { 128, "id_string", OPTIONAL, LENGTH-VARIABLE } SDR Entity Association Record ----------------------------- FIID Template: tmpl_sdr_entity_association_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 8, "container_entity_id", REQUIRED, LENGTH-FIXED } { 8, "container_entity_instance", REQUIRED, LENGTH-FIXED } { 5, "flags.reserved", REQUIRED, LENGTH-FIXED } { 1, "flags.sensor_presence", REQUIRED, LENGTH-FIXED } { 1, "flags.record_link", REQUIRED, LENGTH-FIXED } { 1, "flags.contained_entities", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_1", REQUIRED, LENGTH-FIXED } { 8, "instance_id_contained_entity_range_1", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "entity_id_contained_entity_range_2", REQUIRED, LENGTH-FIXED } { 8, "instance_id_contained_entity_range_2", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_3", REQUIRED, LENGTH-FIXED } { 8, "instance_id_contained_entity_range_3", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_4", REQUIRED, LENGTH-FIXED } { 8, "instance_id_contained_entity_range_4", REQUIRED, LENGTH-FIXED } SDR Device Relative Entity Association Record --------------------------------------------- FIID Template: tmpl_sdr_device_relative_entity_association_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 8, "container_entity_id", REQUIRED, LENGTH-FIXED } { 8, "container_entity_instance", REQUIRED, LENGTH-FIXED } { 1, "container_entity_device_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "container_entity_device_address", REQUIRED, LENGTH-FIXED } { 4, "container_entity_device_channel.reserved", REQUIRED, LENGTH-FIXED } { 4, "container_entity_device_channel", REQUIRED, LENGTH-FIXED } { 5, "flags.reserved", REQUIRED, LENGTH-FIXED } { 1, "flags.sensor_presence", REQUIRED, LENGTH-FIXED } { 1, "flags.record_link", REQUIRED, LENGTH-FIXED } { 1, "flags.contained_entities", REQUIRED, LENGTH-FIXED } { 1, "contained_entity_1_device_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "contained_entity_1_device_address", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_1_device_channel.reserved", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_1_device_channel", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_1", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_contained_entity_range_1", REQUIRED, LENGTH-FIXED } { 1, "contained_entity_2_device_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "contained_entity_2_device_address", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_2_device_channel.reserved", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_2_device_channel", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_2", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_contained_entity_range_2", REQUIRED, LENGTH-FIXED } { 1, "contained_entity_3_device_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "contained_entity_3_device_address", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_3_device_channel.reserved", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_3_device_channel", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_3", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_contained_entity_range_3", REQUIRED, LENGTH-FIXED } { 1, "contained_entity_4_device_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "contained_entity_4_device_address", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_4_device_channel.reserved", REQUIRED, LENGTH-FIXED } { 4, "contained_entity_4_device_channel", REQUIRED, LENGTH-FIXED } { 8, "entity_id_contained_entity_range_4", REQUIRED, LENGTH-FIXED } { 8, "entity_instance_contained_entity_range_4", REQUIRED, LENGTH-FIXED } { 48, "reserved", REQUIRED, LENGTH-FIXED } SDR Generic Device Locator Record --------------------------------- FIID Template: tmpl_sdr_generic_device_locator_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "direct_access_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "direct_access_address", REQUIRED, LENGTH-FIXED } { 1, "channel_number_ms", REQUIRED, LENGTH-FIXED } { 7, "device_slave_address", REQUIRED, LENGTH-FIXED } { 3, "private_bus_id", REQUIRED, LENGTH-FIXED } { 2, "lun_for_master_write_read_command", REQUIRED, LENGTH-FIXED } { 3, "channel_number_ls", REQUIRED, LENGTH-FIXED } { 3, "address_span", REQUIRED, LENGTH-FIXED } { 5, "address_span.reserved", REQUIRED, LENGTH-FIXED } { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "device_type", REQUIRED, LENGTH-FIXED } { 8, "device_type_modifier", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "device_id_string_type_length", REQUIRED, LENGTH-FIXED } { 128, "device_id_string", OPTIONAL, LENGTH-VARIABLE } SDR FRU Device Locator Record ----------------------------- FIID Template: tmpl_sdr_fru_device_locator_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "direct_access_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "direct_access_address", REQUIRED, LENGTH-FIXED } { 8, "logical_fru_device_device_slave_address", REQUIRED, LENGTH-FIXED } { 3, "private_bus_id", REQUIRED, LENGTH-FIXED } { 2, "lun_for_master_write_read_fru_command", REQUIRED, LENGTH-FIXED } { 2, "logical_physical_access_lun_bus_id.reserved", REQUIRED, LENGTH-FIXED } { 1, "logical_physical_fru_device", REQUIRED, LENGTH-FIXED } { 4, "channel_number.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "device_type", REQUIRED, LENGTH-FIXED } { 8, "device_type_modifier", REQUIRED, LENGTH-FIXED } { 8, "fru_entity_id", REQUIRED, LENGTH-FIXED } { 8, "fru_entity_instance", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "device_id_string_type_length", REQUIRED, LENGTH-FIXED } { 128, "device_id_string", OPTIONAL, LENGTH-VARIABLE } SDR FRU Device Locator Record (Non-Intelligent) ----------------------------------------------- FIID Template: tmpl_sdr_fru_device_locator_record_non_intelligent /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "direct_access_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "direct_access_address", REQUIRED, LENGTH-FIXED } { 1, "non_intelligent_fru_device.reserved", REQUIRED, LENGTH-FIXED } { 7, "non_intelligent_fru_device.slave_address", REQUIRED, LENGTH-FIXED } { 3, "private_bus_id", REQUIRED, LENGTH-FIXED } { 2, "lun_for_master_write_read_fru_command", REQUIRED, LENGTH-FIXED } { 2, "logical_physical_access_lun_bus_id.reserved", REQUIRED, LENGTH-FIXED } { 1, "logical_physical_fru_device", REQUIRED, LENGTH-FIXED } { 4, "channel_number.reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 8, "reserved", REQUIRED, LENGTH-FIXED } { 8, "device_type", REQUIRED, LENGTH-FIXED } { 8, "device_type_modifier", REQUIRED, LENGTH-FIXED } { 8, "fru_entity_id", REQUIRED, LENGTH-FIXED } { 8, "fru_entity_instance", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "device_id_string_type_length", REQUIRED, LENGTH-FIXED } { 128, "device_id_string", OPTIONAL, LENGTH-VARIABLE } SDR Management Controller Device Locator Record ----------------------------------------------- FIID Template: tmpl_sdr_management_controller_device_locator_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "device_slave_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "device_slave_address", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 4, "channel_number.reserved", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 2, "global_initialization.event_message_generation", REQUIRED, LENGTH-FIXED } { 1, "global_initialization.log_initialization_agent_errors", REQUIRED, LENGTH-FIXED } { 1, "global_initialization.controller_logs_initialization_agent_errors", REQUIRED, LENGTH-FIXED } { 1, "power_state_notification.reserved", REQUIRED, LENGTH-FIXED } { 1, "power_state_notification.controller", REQUIRED, LENGTH-FIXED } { 1, "power_state_notification.acpi_device_power_state_notification", REQUIRED, LENGTH-FIXED } { 1, "power_state_notification.acpi_system_power_state_notification", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.sensor_device", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.sdr_repository_device", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.sel_device", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.fru_inventory_device", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.ipmb_event_receiver", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.ipmb_event_generator", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.bridge", REQUIRED, LENGTH-FIXED } { 1, "device_capabilities.chassis_device", REQUIRED, LENGTH-FIXED } { 24, "reserved", REQUIRED, LENGTH-FIXED } { 8, "entity_id", REQUIRED, LENGTH-FIXED } { 7, "entity_instance", REQUIRED, LENGTH-FIXED } { 1, "entity_instance.type", REQUIRED, LENGTH-FIXED } { 8, "oem", REQUIRED, LENGTH-FIXED } { 8, "device_id_string_type_length", REQUIRED, LENGTH-FIXED } { 128, "device_id_string", OPTIONAL, LENGTH-VARIABLE } SDR Management Controller Confirmation Record --------------------------------------------- FIID Template: tmpl_sdr_management_controller_confirmation_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 1, "device_slave_address.reserved", REQUIRED, LENGTH-FIXED } { 7, "device_slave_address", REQUIRED, LENGTH-FIXED } { 8, "device_id", REQUIRED, LENGTH-FIXED } { 4, "device_revision", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } /********************* * Record Body Bytes * *********************/ { 7, "major_firmware_revision", REQUIRED, LENGTH-FIXED } { 1, "major_firmware_revision.reserved", REQUIRED, LENGTH-FIXED } { 8, "minor_firmware_revision", REQUIRED, LENGTH-FIXED } { 8, "ipmi_version", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 16, "product_id", REQUIRED, LENGTH-FIXED } { 128, "device_guid", REQUIRED, LENGTH-FIXED } SDR BMC Message Channel Info ---------------------------- FIID Template: tmpl_sdr_bmc_message_channel_info_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 4, "channel_0_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_0_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_0_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_1_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_1_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_1_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_2_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_2_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_2_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_3_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_3_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_3_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_4_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_4_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_4_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_5_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_5_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_5_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_6_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_6_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_6_transmit_supported", REQUIRED, LENGTH-FIXED } { 4, "channel_7_protocol", REQUIRED, LENGTH-FIXED } { 3, "channel_7_message_receive_lun", REQUIRED, LENGTH-FIXED } { 1, "channel_7_transmit_supported", REQUIRED, LENGTH-FIXED } SDR OEM Record -------------- FIID Template: tmpl_sdr_oem_record /********************* * SDR Record Header * *********************/ { 16, "record_id", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_major", REQUIRED, LENGTH-FIXED } { 4, "sdr_version_minor", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 8, "record_length", REQUIRED, LENGTH-FIXED } /******************** * Record Key Bytes * ********************/ { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 448, "oem_data", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SDR_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/templates/ipmi-sel-record-format-templates.h0000644002055400205540000001403213527331637031422 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_RECORD_FORMAT_TEMPLATES_H #define IPMI_SEL_RECORD_FORMAT_TEMPLATES_H #ifdef __cplusplus extern "C" { #endif /* This header file is for documentation only */ #if 0 Please see fiid.h for details concerning the fiid interface. The following list the configurable fields of individual packet/record templates in FreeIPMI. Each field is listed as a list of the following. { bits, "field name", field flag, field flag, ... } bits - indicates the number of bits in the field field name - indicates the name of the field, used for getting/setting fields in the fiid API. field flags - flags indicating qualities of the field. The following qualities may exist for each field. REQUIRED - field is required for the packet/record OPTIONAL - field is optional for the packet/record LENGTH-FIXED - field length is fixed at the number of bits listed LENGTH-VARIABLE - field length is variable for the number of bits listed MAKES-PACKET-SUFFICIENT - indicates field or fields are "sufficient" to make a packet/record valid and not malformed, but not necessarily a complete packet/record. SEL Record Header ----------------- FIID Template: tmpl_sel_record_header { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } SEL System Event Record ----------------------- FIID Template: tmpl_sel_system_event_record { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 1, "generator_id.id_type", REQUIRED, LENGTH-FIXED } { 7, "generator_id.id", REQUIRED, LENGTH-FIXED } { 2, "ipmb_device_lun", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "event_message_format_version", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "event_type_code", REQUIRED, LENGTH-FIXED } { 1, "event_dir", REQUIRED, LENGTH-FIXED } { 8, "event_data1", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } SEL System Event Record (with Event Fields) ------------------------------------------- FIID Template: tmpl_sel_system_event_record_event_fields { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 1, "generator_id.id_type", REQUIRED, LENGTH-FIXED } { 7, "generator_id.id", REQUIRED, LENGTH-FIXED } { 2, "ipmb_device_lun", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "event_message_format_version", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "event_type_code", REQUIRED, LENGTH-FIXED } { 1, "event_dir", REQUIRED, LENGTH-FIXED } { 4, "offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 2, "event_data3_flag", REQUIRED, LENGTH-FIXED } { 2, "event_data2_flag", REQUIRED, LENGTH-FIXED } { 8, "event_data2", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } SEL System Event Record (w/ Previous and Severity Offset fields) ---------------------------------------------------------------- FIID Template: tmpl_sel_system_event_record_discrete_previous_state_severity { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 1, "generator_id.id_type", REQUIRED, LENGTH-FIXED } { 7, "generator_id.id", REQUIRED, LENGTH-FIXED } { 2, "ipmb_device_lun", REQUIRED, LENGTH-FIXED } { 2, "reserved", REQUIRED, LENGTH-FIXED } { 4, "channel_number", REQUIRED, LENGTH-FIXED } { 8, "event_message_format_version", REQUIRED, LENGTH-FIXED } { 8, "sensor_type", REQUIRED, LENGTH-FIXED } { 8, "sensor_number", REQUIRED, LENGTH-FIXED } { 7, "event_type_code", REQUIRED, LENGTH-FIXED } { 1, "event_dir", REQUIRED, LENGTH-FIXED } { 4, "offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 2, "event_data3_flag", REQUIRED, LENGTH-FIXED } { 2, "event_data2_flag", REQUIRED, LENGTH-FIXED } { 4, "previous_offset_from_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 4, "offset_from_severity_event_reading_type_code", REQUIRED, LENGTH-FIXED } { 8, "event_data3", REQUIRED, LENGTH-FIXED } SEL Timestamped OEM Record -------------------------- FIID Template: tmpl_sel_timestamped_oem_record { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 32, "timestamp", REQUIRED, LENGTH-FIXED } { 24, "manufacturer_id", REQUIRED, LENGTH-FIXED } { 48, "oem_defined", REQUIRED, LENGTH-FIXED } SEL Non-Timestamped OEM Record ------------------------------ FIID Template: tmpl_sel_non_timestamped_oem_record { 16, "record_id", REQUIRED, LENGTH-FIXED } { 8, "record_type", REQUIRED, LENGTH-FIXED } { 104, "oem_defined", REQUIRED, LENGTH-FIXED } #endif /* 0 */ #ifdef __cplusplus } #endif #endif /* IPMI_SEL_RECORD_FORMAT_TEMPLATES_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/0000755002055400205540000000000013527342544021752 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-channel-util.h0000644002055400205540000000302213527331637025440 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHANNEL_UTIL_H #define IPMI_CHANNEL_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* Get first channel found for medium type*/ int ipmi_get_channel_number (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t *channel_number); /* Returns all channel numbers found for medium type, return value is * number of channel numbers returned. If number of channel numbers * found exceeds channel_numbers_len, return is truncated. */ int ipmi_get_channel_numbers (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t *channel_numbers, unsigned int channel_numbers_len); #ifdef __cplusplus } #endif #endif /* IPMI_CHANNEL_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-cipher-suite-util.h0000644002055400205540000001746713527331637026453 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CIPHER_SUITE_UTIL_H #define IPMI_CIPHER_SUITE_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include #define IPMI_CIPHER_SUITE_COMBINATION_VALID(__a, __i, __c) \ /* Cipher Suite 0 */ \ ((((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE \ && (__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) \ /* Cipher Suite 1 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 2-5 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40))) \ /* Cipher Suite 6 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 7-10 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40))) \ /* Cipher Suite 11-14 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_MD5_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40))) \ /* Cipher Suite 15 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 16-19 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128 \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40))) ) ? 1 : 0) #define IPMI_CIPHER_SUITE_COMBINATION_SUPPORTED(__a, __i, __c) \ /* Cipher Suite 0 */ \ ((((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE \ && (__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) \ /* Cipher Suite 1 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 2-3 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128))) \ /* Cipher Suite 6 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 7-8 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128))) \ /* Cipher Suite 11-12 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_MD5_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128))) \ /* Cipher Suite 15 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_NONE \ && (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE)) \ /* Cipher Suite 16-17 */ \ || ((__a) == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 \ && ((__i) == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 \ && ((__c) == IPMI_CONFIDENTIALITY_ALGORITHM_NONE \ || (__c) == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128))) ) ? 1 : 0) /* To avoid gcc warnings, add +1 in comparison */ /* achu: no macros here, cipher suite ids are numbers */ #define IPMI_CIPHER_SUITE_ID_SUPPORTED(__id) \ ((((__id + 1) >= (0 + 1) && (__id) <= 3) \ || ((__id) >= 6 && (__id) <= 8) \ || ((__id) >= 11 && (__id) <= 12) \ || ((__id) >= 15 && (__id) <= 17)) ? 1 : 0) int ipmi_cipher_suite_id_to_algorithms (uint8_t cipher_suite_id, uint8_t *authentication_algorithm, uint8_t *integrity_algorithm, uint8_t *confidentiality_algorithm); int ipmi_algorithms_to_cipher_suite_id (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, uint8_t *cipher_suite_id); #ifdef __cplusplus } #endif #endif /* IPMI_CIPHER_SUITE_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-device-types-util.h0000644002055400205540000000226713527331637026443 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEVICE_TYPES_UTIL_H #define IPMI_DEVICE_TYPES_UTIL_H #ifdef __cplusplus extern "C" { #endif #include /* return length of string written into buffer on success, -1 on error */ int ipmi_device_type_modifer_message (uint8_t device_type, uint8_t device_modifier, char *buf, unsigned int buflen); #ifdef __cplusplus } #endif #endif /* IPMI_DEVICE_TYPES_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-entity-ids-util.h0000644002055400205540000000165413527331637026132 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_ENTITY_IDS_H #define IPMI_ENTITY_IDS_H #ifdef __cplusplus extern "C" { #endif #include const char *ipmi_get_entity_id_string (uint8_t entity_id); #ifdef __cplusplus } #endif #endif /* IPMI_ENTITY_IDS_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-error-util.h0000644002055400205540000000334213527331637025166 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_ERROR_UTIL_H #define IPMI_ERROR_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include #include #define IPMI_ERR_STR_MAX_LEN 2048 /* returns 0 on success, -1 on error */ int ipmi_completion_code_strerror_r (uint8_t cmd, uint8_t netfn, uint8_t comp_code, char *errstr, size_t len); /* returns 0 on success, -1 on error */ int ipmi_completion_code_strerror_cmd_r (fiid_obj_t obj_cmd, uint8_t netfn, char *errstr, size_t len); /* returns 0 on success, -1 on error */ int ipmi_rmcpplus_status_strerror_r (uint8_t rmcpplus_status_code, char *errstr, size_t len); #ifdef __cplusplus } #endif #endif /* IPMI_ERROR_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-error-dcmi-util.h0000644002055400205540000000530013527331637026074 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_ERROR_DCMI_UTIL_H #define IPMI_ERROR_DCMI_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include #include /* returns 0 on success, -1 on error */ int ipmi_completion_code_dcmi_strerror_r (uint8_t cmd, uint8_t netfn, uint8_t comp_code, char *errstr, size_t len); /* returns 0 on success, -1 on error */ int ipmi_completion_code_dcmi_strerror_cmd_r (fiid_obj_t obj_cmd, uint8_t netfn, char *errstr, size_t len); #ifdef __cplusplus } #endif #endif /* IPMI_ERROR_DCMI_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-iana-enterprise-numbers-util.h0000644002055400205540000000252513527331637030576 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IANA_ENTERPRISE_NUMBERS_UTIL_H #define IPMI_IANA_ENTERPRISE_NUMBERS_UTIL_H #ifdef __cplusplus extern "C" { #endif #include /* returns length written into buffer on success, -1 on error */ /* if 0 bytes written, indicates no strings for manufacturer id * if -1 w/ EINVAL, indicates manufacturer id out of range * will handle special case known bad manufacturer ids */ int ipmi_iana_enterprise_numbers_string (uint32_t manufacturer_id, char *buf, unsigned int buflen); #ifdef __cplusplus } #endif #endif /* IPMI_IANA_ENTERPRISE_NUMBERS_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-ipmb-util.h0000644002055400205540000000242213527331637024762 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_IPMB_UTIL_H #define IPMI_IPMB_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_ipmb_check_rq_seq (fiid_obj_t obj_ipmb_msg_hdr, uint8_t rq_seq); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_ipmb_check_checksum (uint8_t rq_addr, fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg_trlr); #ifdef __cplusplus } #endif #endif /* IPMI_IPMB_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-jedec-manufacturer-identification-code-util.h0000644002055400205540000000205413527331637033477 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_UTIL_H #define IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_UTIL_H #ifdef __cplusplus extern "C" { #endif #include char *ipmi_jedec_manufacturer_id_search (uint8_t continuation_codes_count, uint8_t id); #ifdef __cplusplus } #endif #endif /* IPMI_JEDEC_MANUFACTURER_IDENTIFICATION_CODE_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-lan-util.h0000644002055400205540000000560013527331637024606 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_UTIL_H #define IPMI_LAN_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_session_sequence_number (fiid_obj_t obj_lan_session_hdr, uint32_t session_sequence_number); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_session_id (fiid_obj_t obj_lan_session_hdr, uint32_t session_id); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_session_authentication_code (fiid_obj_t obj_lan_session_hdr_rs, fiid_obj_t obj_lan_msg_hdr_rs, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr_rs, uint8_t authentication_type, const void *authentication_code_data, unsigned int authentication_code_data_len); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_packet_session_authentication_code (const void *pkt, unsigned int pkt_len, uint8_t authentication_type, const void *authentication_code_data, unsigned int authentication_code_data_len); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_net_fn (fiid_obj_t obj_lan_msg_hdr, uint8_t net_fn); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_rq_seq (fiid_obj_t obj_lan_msg_hdr, uint8_t rq_seq); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_checksum (fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_lan_check_packet_checksum (const void *pkt, unsigned int pkt_len); #ifdef __cplusplus } #endif #endif /* IPMI_LAN_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-outofband-util.h0000644002055400205540000001016413527331637026016 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OUTOFBAND_UTIL_H #define IPMI_OUTOFBAND_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_is_ipmi_1_5_packet (const void *pkt, unsigned int pkt_len); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_is_ipmi_2_0_packet (const void *pkt, unsigned int pkt_len); int ipmi_check_session_sequence_number_1_5_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list); int ipmi_check_session_sequence_number_2_0_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list); /* returns 1 if sequence number in range, 0 if not, -1 on error */ /* highest_received_sequence_number and previously_received_list updated on success */ /* set sequence_number_window to 0 for default */ int ipmi_check_session_sequence_number_1_5 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window); /* returns 1 if sequence number in range, 0 if not, -1 on error */ /* highest_received_sequence_number and previously_received_list updated on success */ /* set sequence_number_window to 0 for default */ int ipmi_check_session_sequence_number_2_0 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window); /* returns 1 on supported, 0 on not-supported, -1 on error */ /* obj_cmd must be get authentication capabilities response */ int ipmi_check_authentication_capabilities_authentication_type (uint8_t authentication_type, fiid_obj_t obj_cmd); /* returns 1 on supported, 0 on not-supported, -1 on error */ /* username NULL == no username */ /* password NULL == no password */ /* obj_cmd must be get authentication capabilities response */ /* note that length of fields unimportant, only NULL vs. non-NULL checked */ int ipmi_check_authentication_capabilities_username (const char *username, const char *password, fiid_obj_t obj_cmd); /* returns 1 on supported, 0 on not-supported, -1 on error */ /* obj_cmd must be get authentication capabilities response */ int ipmi_check_authentication_capabilities_ipmi_2_0 (fiid_obj_t obj_cmd); /* returns 1 on supported, 0 on not-supported, -1 on error */ /* k_g NULL == no k_g */ /* obj_cmd must be get authentication capabilities response */ /* note that length of fields unimportant, only NULL vs. non-NULL checked */ int ipmi_check_authentication_capabilities_k_g (const void *k_g, fiid_obj_t obj_cmd); /* returns 1 on privilege level supported, 0 on not-supported, -1 on error */ /* obj_cmd must be open session response */ int ipmi_check_open_session_maximum_privilege (uint8_t privilege_level, fiid_obj_t obj_cmd); #ifdef __cplusplus } #endif #endif /* IPMI_OUTOFBAND_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-rmcpplus-util.h0000644002055400205540000002340113527331637025700 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RMCPPLUS_UTIL_H #define IPMI_RMCPPLUS_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* return length of data written into buffer on success, -1 on error */ int ipmi_calculate_sik (uint8_t authentication_algorithm, const void *k_g, unsigned int k_g_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void *sik, unsigned int sik_len); /* return length of data written into buffer on success, -1 on error */ int ipmi_calculate_k1 (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, void *k1, unsigned int k1_len); /* return length of data written into buffer on success, -1 on error */ int ipmi_calculate_k2 (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, void *k2, unsigned int k2_len); /* returns 0 on success, -1 on error. * * sik_key, integrity_key, confidentiality_key should be pointers to * buffers. length parameters should contains lengths of buffers. * * returned pointers and lengths reflect appropriate keys for * remaining rmcpplus communication. */ int ipmi_calculate_rmcpplus_session_keys (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *authentication_code_data, unsigned int authentication_code_data_len, const void *k_g, unsigned int k_g_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void **sik_key, unsigned int *sik_key_len, void **integrity_key, unsigned int *integrity_key_len, void **confidentiality_key, unsigned int *confidentiality_key_len); /* return length of data written into buffer on success, -1 on error */ int ipmi_calculate_rakp_3_key_exchange_authentication_code (uint8_t authentication_algorithm, const void *k_uid, unsigned int k_uid_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint32_t remote_console_session_id, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void *key_exchange_authentication_code, unsigned int key_exchange_authentication_code_len); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_payload_pad (uint8_t confidentiality_algorithm, fiid_obj_t obj_rmcpplus_payload); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_integrity_pad (fiid_obj_t obj_rmcpplus_session_trlr); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code (uint8_t authentication_algorithm, const void *k_uid, unsigned int k_uid_len, uint32_t remote_console_session_id, uint32_t managed_system_session_id, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, const void *managed_system_guid, unsigned int managed_system_guid_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_rakp_4_integrity_check_value (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, uint32_t managed_system_session_id, const void *managed_system_guid, unsigned int managed_system_guid_len, fiid_obj_t obj_cmd); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_packet_session_authentication_code (uint8_t integrity_algorithm, const void *pkt, unsigned int pkt_len, const void *integrity_key, unsigned int integrity_key_len, const void *authentication_code_data, unsigned int authentication_code_data_len, fiid_obj_t obj_rmcpplus_session_trlr); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_payload_type (fiid_obj_t obj_rmcpplus_session_hdr, uint8_t payload_type); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_status_code (fiid_obj_t obj_cmd, uint8_t status_code); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_message_tag (fiid_obj_t obj_cmd, uint8_t message_tag); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_remote_console_session_id (fiid_obj_t obj_cmd, uint32_t remote_console_session_id); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcpplus_check_session_id (fiid_obj_t obj_rmcpplus_session_hdr, uint32_t session_id); int ipmi_rmcpplus_calculate_payload_type (const void *pkt, unsigned int pkt_len, uint8_t *payload_type); #ifdef __cplusplus } #endif #endif /* IPMI_RMCPPLUS_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h0000644002055400205540000002105113527331637031402 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_AND_EVENT_CODE_TABLES_UTIL_H #define IPMI_SENSOR_AND_EVENT_CODE_TABLES_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD 0x01 #define IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE 0x02 #define IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE 0x03 #define IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM 0x04 #define IPMI_EVENT_READING_TYPE_CODE_CLASS_UNKNOWN 0x05 #define IPMI_GET_EVENT_MESSAGES_FLAGS_DEFAULT 0x0000 #define IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT 0x0001 #define IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA 0x0002 #define IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING 0x0004 #define IPMI_GET_EVENT_MESSAGES_FLAGS_IGNORE_UNRECOGNIZED_EVENTS 0x0008 int ipmi_event_reading_type_code_class (uint8_t event_reading_type_code); int ipmi_event_message_separator (const char *separator); /* return length of string written into buffer on success, -1 on error */ int ipmi_get_generic_event_message (uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* this function is for sensor specific messages, sensors with event * reading typo codes of 0x6F */ int ipmi_get_sensor_type_message (uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* identical to above but returns "short" strings when appropriate */ int ipmi_get_generic_event_message_short (uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* identical to above but returns "short" strings when appropriate */ int ipmi_get_sensor_type_message_short (uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ int ipmi_get_event_data2_message (uint8_t sensor_type, unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ int ipmi_get_event_data3_message (uint8_t sensor_type, unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* this function is for OEM event reading type codes */ int ipmi_get_oem_generic_event_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* this function is for sensor specific messages, sensors with event * reading typo codes of 0x6F */ int ipmi_get_oem_sensor_type_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t sensor_type, uint8_t sensor_number, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* this function is for string mappings from vendors that are specific * to a event reading typo code and sensor type combination. */ int ipmi_get_oem_specific_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen); /* return length of string written into buffer on success, -1 on error */ /* some vendors return values instead of event bitmasks in the * sensor or SEL event, this is to handle this special case */ int ipmi_get_oem_event_bitmask_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t event_bitmask, char *buf, unsigned int buflen); /* wrapper function to handle retrieval of an array of event messages. * The array is NULL pointer terminated. * * collectively wraps * * ipmi_get_generic_event_message() * ipmi_get_sensor_type_message() * * If flag IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT is specified, * ipmi_get_generic_event_message_short() and * ipmi_get_sensor_type_message_short() are called respectively inplace * of ipmi_get_generic_event_message() and ipmi_get_sensor_type_message(). * * If flag IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA is * specified ipmi_get_oem_generic_event_message(), * ipmi_get_oem_sensor_type_message(), and * ipmi_get_oem_sensor_event_bitmask_message() are called respectively * if necessary. * * If flag IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING is * specified ipmi_get_threshold_message() will be called for a * sensor_event_bitmask instead of ipmi_get_generic_event_message() if * it is a threshold sensor. Primarily used for event messages * following a get sensor reading in which threshold event bitmasks * are slightly different. * * If flag IPMI_GET_EVENT_MESSAGES_FLAG_IGNORE_UNRECOGNIZED_EVENTS is * specified ipmi_get_threshold_message() will not store event strings * for unrecognized events. * * If there are no event messages, and 'no_event_message_string' is * non-NULL, it will be placed into 'event_messages' as the lone event * message. * * Returns 0 on success, -1 on error. Number of messages allocated in * 'event_messages' is returned in 'event_messages_count'. * * User responsible for clearing memory created in 'event_messages'. */ int ipmi_get_event_messages (uint8_t event_reading_type_code, uint8_t sensor_type, /* ignored if not relevant for event_reading_type_code */ uint8_t sensor_number, /* ignored if not relevant for event_reading_type_code or sensor_type */ uint16_t event_bitmask, uint32_t manufacturer_id, /* ignored if INTERPRET_OEM_DATA not set */ uint16_t product_id, /* ignored if INTERPRET_OEM_DATA not set */ char ***event_messages, unsigned int *event_messages_count, const char *no_event_message_string, unsigned int flags); #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_AND_EVENT_CODE_TABLES_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-sensor-util.h0000644002055400205540000000706613527331637025355 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_UTIL_H #define IPMI_SENSOR_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* return length of string written into buffer on success, -1 on error */ int ipmi_get_threshold_message (uint8_t offset, char *buf, unsigned int buflen); const char *ipmi_get_sensor_type_string (uint8_t sensor_type); const char *ipmi_get_oem_sensor_type_string (uint8_t sensor_type, uint8_t event_reading_code, uint32_t manufacturer_id, uint16_t product_id); /* returns length written into buffer on success, -1 on error */ int ipmi_sensor_units_string (uint8_t sensor_units_percentage, uint8_t sensor_units_modifier, uint8_t sensor_units_rate, uint8_t sensor_base_unit_type, uint8_t sensor_modifier_unit_type, char *buf, unsigned int buflen, unsigned int abbreviated_units_flag); /* b_exponent - sometimes documented as k1 */ /* r_exponent - sometimes documented as k2 */ int ipmi_sensor_decode_value (int8_t r_exponent, int8_t b_exponent, int16_t m, int16_t b, uint8_t linearization, uint8_t analog_data_format, uint8_t raw_data, double *value); /* b_exponent - sometimes documented as k1 */ /* r_exponent - sometimes documented as k2 */ int ipmi_sensor_decode_raw_value (int8_t r_exponent, int8_t b_exponent, int16_t m, int16_t b, uint8_t linearization, uint8_t analog_data_format, double value, uint8_t *raw_data); /* r_exponent - sometimes documented as k2 */ int ipmi_sensor_decode_tolerance (int8_t r_exponent, int16_t m, uint8_t raw_data, uint8_t linearization, double *value); /* accuracy returned as percentage */ int ipmi_sensor_decode_accuracy (uint16_t accuracy_raw, uint8_t accuracy_exp, double *value); /* r_exponent - sometimes documented as k2 */ int ipmi_sensor_decode_resolution (int8_t r_exponent, int16_t m, double *value); #ifdef __cplusplus } #endif #endif /* IPMI_SENSOR_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-timestamp-util.h0000644002055400205540000000431213527331637026036 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_TIMESTAMP_UTIL_H #define IPMI_TIMESTAMP_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #define IPMI_TIMESTAMP_FLAG_DEFAULT 0x00 /* Special string abbreviations * "Unspecified" will be abbreviated "Unspec." * "Post-Init X s" will be abbreviated to just "PostInit" */ #define IPMI_TIMESTAMP_FLAG_ABBREVIATE 0x01 /* Assume timestamp is UTC instead of localtime, convert to localtime. */ #define IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME 0x02 /* Assume timestamp is localtime, convert to UTC */ #define IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC 0x04 #define IPMI_UTC_OFFSET_SECONDS_MIN -86400 #define IPMI_UTC_OFFSET_SECONDS_MAX 86400 #define IPMI_UTC_OFFSET_VALID(__val) \ (((__val) >= IPMI_UTC_OFFSET_SECONDS_MIN \ && (__val) <= IPMI_UTC_OFFSET_SECONDS_MAX) ? 1 : 0) /* Handles special case timestamps in IPMI and timestamp * conversations. Special case timestamps most notably unspecified * timestamps and timestamps in the range of initialization of the * BMC. In those respective cases, an appropriate string will written * into the buffer instead of the actual time/date. */ /* format uses format from strftime(), pass NULL for default one */ int ipmi_timestamp_string (uint32_t timestamp, int utc_offset, unsigned int flags, const char *format, char *buf, unsigned int buflen); #ifdef __cplusplus } #endif #endif /* IPMI_TIMESTAMP_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-util.h0000644002055400205540000000647613527331637024052 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_UTIL_H #define IPMI_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include uint8_t ipmi_checksum (const void *buf, unsigned int buflen); /* Call first time w/ checksum_initial 0, pass in result for subsequent calls */ uint8_t ipmi_checksum_incremental (const void *buf, unsigned int buflen, uint8_t checksum_initial); /* Can pass NULL/0 for final buf/buflen */ uint8_t ipmi_checksum_final (const void *buf, unsigned int buflen, uint8_t checksum_initial); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_check_cmd (fiid_obj_t obj_cmd, uint8_t cmd); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_check_completion_code (fiid_obj_t obj_cmd, uint8_t completion_code); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_check_completion_code_success (fiid_obj_t obj_cmd); int ipmi_get_random (void *buf, unsigned int buflen); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_is_ipmi_1_5_packet (const void *pkt, unsigned int pkt_len); /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_is_ipmi_2_0_packet (const void *pkt, unsigned int pkt_len); int ipmi_check_session_sequence_number_1_5_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list); int ipmi_check_session_sequence_number_2_0_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list); /* returns 1 if sequence number in range, 0 if not, -1 on error */ /* highest_received_sequence_number and previously_received_list updated on success */ /* set sequence_number_window to 0 for default */ int ipmi_check_session_sequence_number_1_5 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window); /* returns 1 if sequence number in range, 0 if not, -1 on error */ /* highest_received_sequence_number and previously_received_list updated on success */ /* set sequence_number_window to 0 for default */ int ipmi_check_session_sequence_number_2_0 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window); const char *ipmi_cmd_str (uint8_t net_fn, uint8_t cmd); #ifdef __cplusplus } #endif #endif /* IPMI_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/ipmi-dcmi-util.h0000644002055400205540000000414113527331637024747 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_UTIL_H #define IPMI_DCMI_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include const char *ipmi_cmd_dcmi_str (uint8_t cmd); #ifdef __cplusplus } #endif #endif /* IPMI_DCMI_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/freeipmi/util/rmcp-util.h0000644002055400205540000000177013527331637024045 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef RMCP_UTIL_H #define RMCP_UTIL_H #ifdef __cplusplus extern "C" { #endif #include #include /* returns 1 on pass, 0 on fail, -1 on error */ int ipmi_rmcp_check_message_tag (fiid_obj_t pong, uint8_t message_tag); #ifdef __cplusplus } #endif #endif /* RMCP_UTIL_H */ freeipmi-1.6.4/libfreeipmi/include/Makefile.in0000644002055400205540000010134113527342446021243 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfreeipmi/include DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(nobase_include_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" HEADERS = $(nobase_include_HEADERS) $(nobase_nodist_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ nobase_nodist_include_HEADERS = \ freeipmi/freeipmi.h nobase_include_HEADERS = \ freeipmi/api/ipmi-api.h \ freeipmi/api/ipmi-chassis-cmds-api.h \ freeipmi/api/ipmi-dcmi-cmds-api.h \ freeipmi/api/ipmi-device-global-cmds-api.h \ freeipmi/api/ipmi-event-cmds-api.h \ freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h \ freeipmi/api/ipmi-fru-inventory-device-cmds-api.h \ freeipmi/api/ipmi-lan-cmds-api.h \ freeipmi/api/ipmi-messaging-support-cmds-api.h \ freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h \ freeipmi/api/ipmi-pef-and-alerting-cmds-api.h \ freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h \ freeipmi/api/ipmi-sdr-repository-cmds-api.h \ freeipmi/api/ipmi-sensor-cmds-api.h \ freeipmi/api/ipmi-sel-cmds-api.h \ freeipmi/api/ipmi-serial-modem-cmds-api.h \ freeipmi/api/ipmi-sol-cmds-api.h \ freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h \ freeipmi/cmds/ipmi-chassis-cmds.h \ freeipmi/cmds/ipmi-dcmi-cmds.h \ freeipmi/cmds/ipmi-dcmi-oem-cmds.h \ freeipmi/cmds/ipmi-device-global-cmds.h \ freeipmi/cmds/ipmi-event-cmds.h \ freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h \ freeipmi/cmds/ipmi-fru-inventory-device-cmds.h \ freeipmi/cmds/ipmi-lan-cmds.h \ freeipmi/cmds/ipmi-messaging-support-cmds.h \ freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h \ freeipmi/cmds/ipmi-pef-and-alerting-cmds.h \ freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h \ freeipmi/cmds/ipmi-sdr-repository-cmds.h \ freeipmi/cmds/ipmi-sel-cmds.h \ freeipmi/cmds/ipmi-sensor-cmds.h \ freeipmi/cmds/ipmi-serial-modem-cmds.h \ freeipmi/cmds/ipmi-sol-cmds.h \ freeipmi/cmds/rmcp-cmds.h \ freeipmi/debug/ipmi-debug.h \ freeipmi/driver/ipmi-inteldcmi-driver.h \ freeipmi/driver/ipmi-kcs-driver.h \ freeipmi/driver/ipmi-openipmi-driver.h \ freeipmi/driver/ipmi-sunbmc-driver.h \ freeipmi/driver/ipmi-ssif-driver.h \ freeipmi/fiid/fiid.h \ freeipmi/fru/ipmi-fru.h \ freeipmi/interface/ipmi-interface.h \ freeipmi/interface/rmcp-interface.h \ freeipmi/interface/ipmi-ipmb-interface.h \ freeipmi/interface/ipmi-kcs-interface.h \ freeipmi/interface/ipmi-lan-interface.h \ freeipmi/interface/ipmi-rmcpplus-interface.h \ freeipmi/interpret/ipmi-interpret.h \ freeipmi/locate/ipmi-locate.h \ freeipmi/payload/ipmi-sol-payload.h \ freeipmi/record-format/ipmi-cipher-suite-record-format.h \ freeipmi/record-format/ipmi-fru-dimmspd-record-format.h \ freeipmi/record-format/ipmi-fru-information-record-format.h \ freeipmi/record-format/ipmi-fru-oem-record-format.h \ freeipmi/record-format/ipmi-platform-event-trap-record-format.h \ freeipmi/record-format/ipmi-sdr-record-format.h \ freeipmi/record-format/ipmi-sdr-oem-record-format.h \ freeipmi/record-format/ipmi-sel-record-format.h \ freeipmi/record-format/ipmi-sel-oem-record-format.h \ freeipmi/record-format/oem/ipmi-fru-wistron-oem-record-format.h \ freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h \ freeipmi/record-format/oem/ipmi-sdr-oem-intel-record-format.h \ freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h \ freeipmi/record-format/oem/ipmi-sel-oem-linux-kernel-record-format.h \ freeipmi/sdr/ipmi-sdr.h \ freeipmi/sdr/ipmi-sdr-oem.h \ freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h \ freeipmi/sel/ipmi-sel.h \ freeipmi/sensor-read/ipmi-sensor-read.h \ freeipmi/spec/ipmi-authentication-type-spec.h \ freeipmi/spec/ipmi-channel-spec.h \ freeipmi/spec/ipmi-cmd-spec.h \ freeipmi/spec/ipmi-cmd-dcmi-spec.h \ freeipmi/spec/ipmi-comp-code-spec.h \ freeipmi/spec/ipmi-comp-code-dcmi-spec.h \ freeipmi/spec/ipmi-comp-code-oem-spec.h \ freeipmi/spec/ipmi-device-types-spec.h \ freeipmi/spec/ipmi-device-types-oem-spec.h \ freeipmi/spec/ipmi-entity-ids-spec.h \ freeipmi/spec/ipmi-event-reading-type-code-spec.h \ freeipmi/spec/ipmi-event-reading-type-code-oem-spec.h \ freeipmi/spec/ipmi-fru-chassis-types-spec.h \ freeipmi/spec/ipmi-fru-language-codes-spec.h \ freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h \ freeipmi/spec/ipmi-ipmb-lun-spec.h \ freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h \ freeipmi/spec/ipmi-lan-configuration-parameters-spec.h \ freeipmi/spec/ipmi-lan-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-netfn-spec.h \ freeipmi/spec/ipmi-netfn-oem-spec.h \ freeipmi/spec/ipmi-oem-spec.h \ freeipmi/spec/ipmi-pef-configuration-parameters-spec.h \ freeipmi/spec/ipmi-pef-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-privilege-level-spec.h \ freeipmi/spec/ipmi-product-id-spec.h \ freeipmi/spec/ipmi-rmcpplus-status-spec.h \ freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h \ freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h \ freeipmi/spec/ipmi-sensor-numbers-oem-spec.h \ freeipmi/spec/ipmi-sensor-types-spec.h \ freeipmi/spec/ipmi-sensor-types-oem-spec.h \ freeipmi/spec/ipmi-sensor-units-spec.h \ freeipmi/spec/ipmi-serial-modem-configuration-parameters-spec.h \ freeipmi/spec/ipmi-serial-modem-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-slave-address-spec.h \ freeipmi/spec/ipmi-slave-address-oem-spec.h \ freeipmi/spec/ipmi-sol-configuration-parameters-spec.h \ freeipmi/spec/ipmi-sol-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-boot-option-parameters-spec.h \ freeipmi/spec/ipmi-system-boot-option-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-info-parameters-spec.h \ freeipmi/spec/ipmi-system-info-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-software-id-spec.h \ freeipmi/spec/ipmi-timestamp-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-sun-microsystems-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-lan-configuration-parameters-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-lan-configuration-parameters-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-oem-sun-microsystems-spec.h \ freeipmi/spec/oem/ipmi-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sol-configuration-parameters-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sol-configuration-parameters-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-system-info-parameters-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-system-info-parameters-oem-wistron-spec.h \ freeipmi/templates/ipmi-bmc-watchdog-timer-cmds-templates.h \ freeipmi/templates/ipmi-chassis-cmds-templates.h \ freeipmi/templates/ipmi-dcmi-cmds-templates.h \ freeipmi/templates/ipmi-device-global-cmds-templates.h \ freeipmi/templates/ipmi-event-cmds-templates.h \ freeipmi/templates/ipmi-firmware-firewall-command-discovery-cmds-templates.h \ freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h \ freeipmi/templates/ipmi-fru-inventory-device-cmds-templates.h \ freeipmi/templates/ipmi-lan-cmds-templates.h \ freeipmi/templates/ipmi-messaging-support-cmds-templates.h \ freeipmi/templates/ipmi-oem-intel-node-manager-cmds-templates.h \ freeipmi/templates/ipmi-pef-and-alerting-cmds-templates.h \ freeipmi/templates/ipmi-rmcpplus-support-and-payload-cmds-templates.h \ freeipmi/templates/ipmi-sdr-repository-cmds-templates.h \ freeipmi/templates/ipmi-sel-cmds-templates.h \ freeipmi/templates/ipmi-sensor-cmds-templates.h \ freeipmi/templates/ipmi-serial-modem-cmds-templates.h \ freeipmi/templates/ipmi-sol-cmds-templates.h \ freeipmi/templates/ipmi-sol-payload-templates.h \ freeipmi/templates/rmcp-cmds-templates.h \ freeipmi/templates/ipmi-ipmb-interface-templates.h \ freeipmi/templates/ipmi-kcs-interface-templates.h \ freeipmi/templates/ipmi-lan-interface-templates.h \ freeipmi/templates/ipmi-rmcpplus-interface-templates.h \ freeipmi/templates/rmcp-interface-templates.h \ freeipmi/templates/ipmi-cipher-suite-record-format-templates.h \ freeipmi/templates/ipmi-fru-information-record-format-templates.h \ freeipmi/templates/ipmi-sdr-record-format-templates.h \ freeipmi/templates/ipmi-sel-record-format-templates.h \ freeipmi/templates/oem/ipmi-sdr-oem-intel-node-manager-record-format-templates.h \ freeipmi/util/ipmi-channel-util.h \ freeipmi/util/ipmi-cipher-suite-util.h \ freeipmi/util/ipmi-device-types-util.h \ freeipmi/util/ipmi-entity-ids-util.h \ freeipmi/util/ipmi-error-util.h \ freeipmi/util/ipmi-error-dcmi-util.h \ freeipmi/util/ipmi-iana-enterprise-numbers-util.h \ freeipmi/util/ipmi-ipmb-util.h \ freeipmi/util/ipmi-jedec-manufacturer-identification-code-util.h \ freeipmi/util/ipmi-lan-util.h \ freeipmi/util/ipmi-outofband-util.h \ freeipmi/util/ipmi-rmcpplus-util.h \ freeipmi/util/ipmi-sensor-and-event-code-tables-util.h \ freeipmi/util/ipmi-sensor-util.h \ freeipmi/util/ipmi-timestamp-util.h \ freeipmi/util/ipmi-util.h \ freeipmi/util/ipmi-dcmi-util.h \ freeipmi/util/rmcp-util.h all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfreeipmi/include/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfreeipmi/include/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-nobase_includeHEADERS: $(nobase_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-nobase_nodist_includeHEADERS: $(nobase_nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ $(am__nobase_list) | while read dir files; do \ xfiles=; for file in $$files; do \ if test -f "$$file"; then xfiles="$$xfiles $$file"; \ else xfiles="$$xfiles $(srcdir)/$$file"; fi; done; \ test -z "$$xfiles" || { \ test "x$$dir" = x. || { \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)/$$dir'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)/$$dir"; }; \ echo " $(INSTALL_HEADER) $$xfiles '$(DESTDIR)$(includedir)/$$dir'"; \ $(INSTALL_HEADER) $$xfiles "$(DESTDIR)$(includedir)/$$dir" || exit $$?; }; \ done uninstall-nobase_nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nobase_nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(HEADERS) installdirs: for dir in "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-generic distclean-libtool distclean-tags distdir dvi \ dvi-am html html-am info info-am install install-am \ install-data install-data-am install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man \ install-nobase_includeHEADERS \ install-nobase_nodist_includeHEADERS install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-nobase_includeHEADERS \ uninstall-nobase_nodist_includeHEADERS # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/libfreeipmi/include/Makefile.am0000644002055400205540000003060013527331636021230 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: Makefile.am,v 1.63 2010-07-29 20:20:49 chu11 Exp $ ##***************************************************************************** nobase_nodist_include_HEADERS = \ freeipmi/freeipmi.h nobase_include_HEADERS = \ freeipmi/api/ipmi-api.h \ freeipmi/api/ipmi-chassis-cmds-api.h \ freeipmi/api/ipmi-dcmi-cmds-api.h \ freeipmi/api/ipmi-device-global-cmds-api.h \ freeipmi/api/ipmi-event-cmds-api.h \ freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h \ freeipmi/api/ipmi-fru-inventory-device-cmds-api.h \ freeipmi/api/ipmi-lan-cmds-api.h \ freeipmi/api/ipmi-messaging-support-cmds-api.h \ freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h \ freeipmi/api/ipmi-pef-and-alerting-cmds-api.h \ freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h \ freeipmi/api/ipmi-sdr-repository-cmds-api.h \ freeipmi/api/ipmi-sensor-cmds-api.h \ freeipmi/api/ipmi-sel-cmds-api.h \ freeipmi/api/ipmi-serial-modem-cmds-api.h \ freeipmi/api/ipmi-sol-cmds-api.h \ freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h \ freeipmi/cmds/ipmi-chassis-cmds.h \ freeipmi/cmds/ipmi-dcmi-cmds.h \ freeipmi/cmds/ipmi-dcmi-oem-cmds.h \ freeipmi/cmds/ipmi-device-global-cmds.h \ freeipmi/cmds/ipmi-event-cmds.h \ freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h \ freeipmi/cmds/ipmi-fru-inventory-device-cmds.h \ freeipmi/cmds/ipmi-lan-cmds.h \ freeipmi/cmds/ipmi-messaging-support-cmds.h \ freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h \ freeipmi/cmds/ipmi-pef-and-alerting-cmds.h \ freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h \ freeipmi/cmds/ipmi-sdr-repository-cmds.h \ freeipmi/cmds/ipmi-sel-cmds.h \ freeipmi/cmds/ipmi-sensor-cmds.h \ freeipmi/cmds/ipmi-serial-modem-cmds.h \ freeipmi/cmds/ipmi-sol-cmds.h \ freeipmi/cmds/rmcp-cmds.h \ freeipmi/debug/ipmi-debug.h \ freeipmi/driver/ipmi-inteldcmi-driver.h \ freeipmi/driver/ipmi-kcs-driver.h \ freeipmi/driver/ipmi-openipmi-driver.h \ freeipmi/driver/ipmi-sunbmc-driver.h \ freeipmi/driver/ipmi-ssif-driver.h \ freeipmi/fiid/fiid.h \ freeipmi/fru/ipmi-fru.h \ freeipmi/interface/ipmi-interface.h \ freeipmi/interface/rmcp-interface.h \ freeipmi/interface/ipmi-ipmb-interface.h \ freeipmi/interface/ipmi-kcs-interface.h \ freeipmi/interface/ipmi-lan-interface.h \ freeipmi/interface/ipmi-rmcpplus-interface.h \ freeipmi/interpret/ipmi-interpret.h \ freeipmi/locate/ipmi-locate.h \ freeipmi/payload/ipmi-sol-payload.h \ freeipmi/record-format/ipmi-cipher-suite-record-format.h \ freeipmi/record-format/ipmi-fru-dimmspd-record-format.h \ freeipmi/record-format/ipmi-fru-information-record-format.h \ freeipmi/record-format/ipmi-fru-oem-record-format.h \ freeipmi/record-format/ipmi-platform-event-trap-record-format.h \ freeipmi/record-format/ipmi-sdr-record-format.h \ freeipmi/record-format/ipmi-sdr-oem-record-format.h \ freeipmi/record-format/ipmi-sel-record-format.h \ freeipmi/record-format/ipmi-sel-oem-record-format.h \ freeipmi/record-format/oem/ipmi-fru-wistron-oem-record-format.h \ freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h \ freeipmi/record-format/oem/ipmi-sdr-oem-intel-record-format.h \ freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h \ freeipmi/record-format/oem/ipmi-sel-oem-linux-kernel-record-format.h \ freeipmi/sdr/ipmi-sdr.h \ freeipmi/sdr/ipmi-sdr-oem.h \ freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h \ freeipmi/sel/ipmi-sel.h \ freeipmi/sensor-read/ipmi-sensor-read.h \ freeipmi/spec/ipmi-authentication-type-spec.h \ freeipmi/spec/ipmi-channel-spec.h \ freeipmi/spec/ipmi-cmd-spec.h \ freeipmi/spec/ipmi-cmd-dcmi-spec.h \ freeipmi/spec/ipmi-comp-code-spec.h \ freeipmi/spec/ipmi-comp-code-dcmi-spec.h \ freeipmi/spec/ipmi-comp-code-oem-spec.h \ freeipmi/spec/ipmi-device-types-spec.h \ freeipmi/spec/ipmi-device-types-oem-spec.h \ freeipmi/spec/ipmi-entity-ids-spec.h \ freeipmi/spec/ipmi-event-reading-type-code-spec.h \ freeipmi/spec/ipmi-event-reading-type-code-oem-spec.h \ freeipmi/spec/ipmi-fru-chassis-types-spec.h \ freeipmi/spec/ipmi-fru-language-codes-spec.h \ freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h \ freeipmi/spec/ipmi-ipmb-lun-spec.h \ freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h \ freeipmi/spec/ipmi-lan-configuration-parameters-spec.h \ freeipmi/spec/ipmi-lan-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-netfn-spec.h \ freeipmi/spec/ipmi-netfn-oem-spec.h \ freeipmi/spec/ipmi-oem-spec.h \ freeipmi/spec/ipmi-pef-configuration-parameters-spec.h \ freeipmi/spec/ipmi-pef-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-privilege-level-spec.h \ freeipmi/spec/ipmi-product-id-spec.h \ freeipmi/spec/ipmi-rmcpplus-status-spec.h \ freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h \ freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h \ freeipmi/spec/ipmi-sensor-numbers-oem-spec.h \ freeipmi/spec/ipmi-sensor-types-spec.h \ freeipmi/spec/ipmi-sensor-types-oem-spec.h \ freeipmi/spec/ipmi-sensor-units-spec.h \ freeipmi/spec/ipmi-serial-modem-configuration-parameters-spec.h \ freeipmi/spec/ipmi-serial-modem-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-slave-address-spec.h \ freeipmi/spec/ipmi-slave-address-oem-spec.h \ freeipmi/spec/ipmi-sol-configuration-parameters-spec.h \ freeipmi/spec/ipmi-sol-configuration-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-boot-option-parameters-spec.h \ freeipmi/spec/ipmi-system-boot-option-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-info-parameters-spec.h \ freeipmi/spec/ipmi-system-info-parameters-oem-spec.h \ freeipmi/spec/ipmi-system-software-id-spec.h \ freeipmi/spec/ipmi-timestamp-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-sun-microsystems-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-cmd-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-comp-code-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-lan-configuration-parameters-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-lan-configuration-parameters-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-netfn-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-oem-ibm-spec.h \ freeipmi/spec/oem/ipmi-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-oem-sun-microsystems-spec.h \ freeipmi/spec/oem/ipmi-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-sensor-numbers-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-hp-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-intel-node-manager-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-supermicro-spec.h \ freeipmi/spec/oem/ipmi-sensor-types-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-quanta-spec.h \ freeipmi/spec/oem/ipmi-slave-address-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-sol-configuration-parameters-oem-inventec-spec.h \ freeipmi/spec/oem/ipmi-sol-configuration-parameters-oem-wistron-spec.h \ freeipmi/spec/oem/ipmi-system-info-parameters-oem-dell-spec.h \ freeipmi/spec/oem/ipmi-system-info-parameters-oem-wistron-spec.h \ freeipmi/templates/ipmi-bmc-watchdog-timer-cmds-templates.h \ freeipmi/templates/ipmi-chassis-cmds-templates.h \ freeipmi/templates/ipmi-dcmi-cmds-templates.h \ freeipmi/templates/ipmi-device-global-cmds-templates.h \ freeipmi/templates/ipmi-event-cmds-templates.h \ freeipmi/templates/ipmi-firmware-firewall-command-discovery-cmds-templates.h \ freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h \ freeipmi/templates/ipmi-fru-inventory-device-cmds-templates.h \ freeipmi/templates/ipmi-lan-cmds-templates.h \ freeipmi/templates/ipmi-messaging-support-cmds-templates.h \ freeipmi/templates/ipmi-oem-intel-node-manager-cmds-templates.h \ freeipmi/templates/ipmi-pef-and-alerting-cmds-templates.h \ freeipmi/templates/ipmi-rmcpplus-support-and-payload-cmds-templates.h \ freeipmi/templates/ipmi-sdr-repository-cmds-templates.h \ freeipmi/templates/ipmi-sel-cmds-templates.h \ freeipmi/templates/ipmi-sensor-cmds-templates.h \ freeipmi/templates/ipmi-serial-modem-cmds-templates.h \ freeipmi/templates/ipmi-sol-cmds-templates.h \ freeipmi/templates/ipmi-sol-payload-templates.h \ freeipmi/templates/rmcp-cmds-templates.h \ freeipmi/templates/ipmi-ipmb-interface-templates.h \ freeipmi/templates/ipmi-kcs-interface-templates.h \ freeipmi/templates/ipmi-lan-interface-templates.h \ freeipmi/templates/ipmi-rmcpplus-interface-templates.h \ freeipmi/templates/rmcp-interface-templates.h \ freeipmi/templates/ipmi-cipher-suite-record-format-templates.h \ freeipmi/templates/ipmi-fru-information-record-format-templates.h \ freeipmi/templates/ipmi-sdr-record-format-templates.h \ freeipmi/templates/ipmi-sel-record-format-templates.h \ freeipmi/templates/oem/ipmi-sdr-oem-intel-node-manager-record-format-templates.h \ freeipmi/util/ipmi-channel-util.h \ freeipmi/util/ipmi-cipher-suite-util.h \ freeipmi/util/ipmi-device-types-util.h \ freeipmi/util/ipmi-entity-ids-util.h \ freeipmi/util/ipmi-error-util.h \ freeipmi/util/ipmi-error-dcmi-util.h \ freeipmi/util/ipmi-iana-enterprise-numbers-util.h \ freeipmi/util/ipmi-ipmb-util.h \ freeipmi/util/ipmi-jedec-manufacturer-identification-code-util.h \ freeipmi/util/ipmi-lan-util.h \ freeipmi/util/ipmi-outofband-util.h \ freeipmi/util/ipmi-rmcpplus-util.h \ freeipmi/util/ipmi-sensor-and-event-code-tables-util.h \ freeipmi/util/ipmi-sensor-util.h \ freeipmi/util/ipmi-timestamp-util.h \ freeipmi/util/ipmi-util.h \ freeipmi/util/ipmi-dcmi-util.h \ freeipmi/util/rmcp-util.h freeipmi-1.6.4/libfreeipmi/api/0000755002055400205540000000000013527342541016320 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/api/ipmi-api.c0000644002055400205540000021615513527331636020206 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/cmds/ipmi-event-cmds.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/driver/ipmi-inteldcmi-driver.h" #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/driver/ipmi-openipmi-driver.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/driver/ipmi-sunbmc-driver.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-cipher-suite-util.h" #include "freeipmi/util/ipmi-outofband-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-inteldcmi-driver-api.h" #include "ipmi-lan-interface-api.h" #include "ipmi-lan-session-common.h" #include "ipmi-kcs-driver-api.h" #include "ipmi-openipmi-driver-api.h" #include "ipmi-sunbmc-driver-api.h" #include "ipmi-ssif-driver-api.h" #include "libcommon/ipmi-crypt.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" #include "fi_hostlist.h" #include "network.h" #include "secure.h" #define IPMI_POLL_INTERVAL_USECS 10 #define GETHOSTBYNAME_AUX_BUFLEN 1024 extern int h_errno; static char *ipmi_errmsg[] = { "success", /* 0 */ "device null", /* 1 */ "device invalid", /* 2 */ "permission denied", /* 3 */ "username invalid", /* 4 */ "password invalid", /* 5 */ "k_g invalid", /* 6 */ "privilege level insufficient", /* 7 */ "privilege level cannot be obtained for this user", /* 8 */ "authentication type unavailable for attempted privilege level", /* 9 */ "cipher suite id unavailable", /* 10 */ "password verification timeout", /* 11 */ "ipmi 2.0 unavailable", /* 12 */ "connection timeout", /* 13 */ "session timeout", /* 14 */ "device already open", /* 15 */ "device not open", /* 16 */ "device not supported", /* 17 */ "device not found", /* 18 */ "driver busy", /* 19 */ "driver timeout", /* 20 */ "message timeout", /* 21 */ "command invalid for selected interface", /* 22 */ "command invalid or unsupported", /* 23 */ "bad completion code", /* 24 */ "bad rmcpplus status code", /* 25 */ "not found", /* 26 */ "BMC busy", /* 27 */ "out of memory", /* 28 */ "invalid hostname", /* 29 */ "invalid parameters", /* 30 */ "driver path required", /* 31 */ "internal IPMI error", /* 32 */ "internal system error", /* 33 */ "internal error", /* 34 */ "errnum out of range", /* 35 */ }; static void _ipmi_ctx_init (struct ipmi_ctx *ctx) { assert (ctx); memset (ctx, '\0', sizeof (struct ipmi_ctx)); ctx->magic = IPMI_CTX_MAGIC; ctx->type = IPMI_DEVICE_UNKNOWN; } ipmi_ctx_t ipmi_ctx_create (void) { struct ipmi_ctx *ctx; if (!(ctx = (struct ipmi_ctx *)malloc (sizeof (struct ipmi_ctx)))) { ERRNO_TRACE (errno); return (NULL); } _ipmi_ctx_init (ctx); ctx->errnum = IPMI_ERR_SUCCESS; return (ctx); } int ipmi_ctx_errnum (ipmi_ctx_t ctx) { if (!ctx) return (IPMI_ERR_CTX_NULL); else if (ctx->magic != IPMI_CTX_MAGIC) return (IPMI_ERR_CTX_INVALID); else return (ctx->errnum); } char * ipmi_ctx_strerror (int errnum) { if (errnum >= IPMI_ERR_SUCCESS && errnum <= IPMI_ERR_ERRNUMRANGE) return (ipmi_errmsg[errnum]); else return (ipmi_errmsg[IPMI_ERR_ERRNUMRANGE]); } char * ipmi_ctx_errormsg (ipmi_ctx_t ctx) { return (ipmi_ctx_strerror (ipmi_ctx_errnum (ctx))); } int ipmi_ctx_get_flags (ipmi_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!flags) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } (*flags) = ctx->flags; ctx->errnum = IPMI_ERR_SUCCESS; return (0); } int ipmi_ctx_set_flags (ipmi_ctx_t ctx, unsigned int flags) { unsigned int flags_mask = (IPMI_FLAGS_NONBLOCKING | IPMI_FLAGS_NOSESSION | IPMI_FLAGS_DEBUG_DUMP | IPMI_FLAGS_NO_VALID_CHECK | IPMI_FLAGS_NO_LEGAL_CHECK | IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (flags & ~flags_mask) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } /* Some flags are only configurable at creation time, cannot be * changed mid-session. */ if (ctx->type != IPMI_DEVICE_UNKNOWN) { flags_mask = IPMI_FLAGS_NOSESSION; if ((ctx->flags & flags_mask) != (flags & flags_mask)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } } ctx->flags = flags; ctx->errnum = IPMI_ERR_SUCCESS; return (0); } static void _ipmi_outofband_free (ipmi_ctx_t ctx) { /* Function Note: No need to set errnum - just return */ assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); fiid_obj_destroy (ctx->io.outofband.rq.obj_rmcp_hdr); ctx->io.outofband.rq.obj_rmcp_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rq.obj_lan_session_hdr); ctx->io.outofband.rq.obj_lan_session_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rq.obj_rmcpplus_session_hdr); ctx->io.outofband.rq.obj_rmcpplus_session_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rq.obj_lan_msg_hdr); ctx->io.outofband.rq.obj_lan_msg_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rq.obj_rmcpplus_session_trlr); ctx->io.outofband.rq.obj_rmcpplus_session_trlr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_rmcp_hdr); ctx->io.outofband.rs.obj_rmcp_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_lan_session_hdr); ctx->io.outofband.rs.obj_lan_session_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_rmcpplus_session_hdr); ctx->io.outofband.rs.obj_rmcpplus_session_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_lan_msg_hdr); ctx->io.outofband.rs.obj_lan_msg_hdr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_rmcpplus_payload); ctx->io.outofband.rs.obj_rmcpplus_payload = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_lan_msg_trlr); ctx->io.outofband.rs.obj_lan_msg_trlr = NULL; fiid_obj_destroy (ctx->io.outofband.rs.obj_rmcpplus_session_trlr); ctx->io.outofband.rs.obj_rmcpplus_session_trlr = NULL; } static void _ipmi_inband_free (ipmi_ctx_t ctx) { /* Function Note: No need to set errnum - just return */ assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); if (ctx->type == IPMI_DEVICE_KCS) { ipmi_kcs_ctx_destroy (ctx->io.inband.kcs_ctx); ctx->io.inband.kcs_ctx = NULL; } if (ctx->type == IPMI_DEVICE_SSIF) { ipmi_ssif_ctx_destroy (ctx->io.inband.ssif_ctx); ctx->io.inband.ssif_ctx = NULL; } if (ctx->type == IPMI_DEVICE_OPENIPMI) { ipmi_openipmi_ctx_destroy (ctx->io.inband.openipmi_ctx); ctx->io.inband.openipmi_ctx = NULL; } if (ctx->type == IPMI_DEVICE_SUNBMC) { ipmi_sunbmc_ctx_destroy (ctx->io.inband.sunbmc_ctx); ctx->io.inband.sunbmc_ctx = NULL; } if (ctx->type == IPMI_DEVICE_INTELDCMI) { ipmi_inteldcmi_ctx_destroy (ctx->io.inband.inteldcmi_ctx); ctx->io.inband.inteldcmi_ctx = NULL; } fiid_obj_destroy (ctx->io.inband.rq.obj_hdr); ctx->io.inband.rq.obj_hdr = NULL; fiid_obj_destroy (ctx->io.inband.rs.obj_hdr); ctx->io.inband.rs.obj_hdr = NULL; } static int _setup_hostname (ipmi_ctx_t ctx, const char *hostname) { char *hostname_copy = NULL; char *port_copy = NULL; const char *hostname_ptr = NULL; const char *port_ptr = NULL; uint16_t port = RMCP_AUX_BUS_SHUNT; struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; char port_str[MAXPORTBUFLEN + 1]; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); assert (hostname); if ((ret = host_is_host_with_port (hostname, &hostname_copy, &port_copy)) < 0) { API_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); goto cleanup; } if (ret) { hostname_ptr = hostname_copy; port_ptr = port_copy; } else hostname_ptr = hostname; if ((ret = host_is_valid (hostname_ptr, port_ptr, &port)) < 0) { API_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); goto cleanup; } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); goto cleanup; } memset (port_str, '\0', MAXPORTBUFLEN + 1); snprintf (port_str, MAXPORTBUFLEN, "%d", port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if (getaddrinfo (hostname_ptr, port_str, &ai_hints, &ai_res)) { API_SET_ERRNUM (ctx, IPMI_ERR_HOSTNAME_INVALID); goto cleanup; } /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { memcpy (&(ctx->io.outofband.remote_host4), ai->ai_addr, ai->ai_addrlen); ctx->io.outofband.remote_host = (struct sockaddr *)&(ctx->io.outofband.remote_host4); ctx->io.outofband.remote_host_len = sizeof (struct sockaddr_in); } else if (ai->ai_family == AF_INET6) { memcpy (&(ctx->io.outofband.remote_host6), ai->ai_addr, ai->ai_addrlen); ctx->io.outofband.remote_host = (struct sockaddr *)&(ctx->io.outofband.remote_host6); ctx->io.outofband.remote_host_len = sizeof (struct sockaddr_in6); } else continue; break; } if (!ai) { API_SET_ERRNUM (ctx, IPMI_ERR_HOSTNAME_INVALID); goto cleanup; } strncpy (ctx->io.outofband.hostname, hostname_ptr, MAXHOSTNAMELEN); rv = 0; cleanup: free (hostname_copy); free (port_copy); freeaddrinfo (ai_res); return (rv); } static int _setup_socket (ipmi_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); /* Open client (local) UDP socket */ /* achu: ephemeral ports are > 1023, so no way we will bind to an IPMI port */ if ((ctx->io.outofband.sockfd = socket (ctx->io.outofband.remote_host->sa_family, SOCK_DGRAM, 0)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (ctx->io.outofband.remote_host->sa_family == AF_INET) { /* zero everywhere, secure ephemeral port */ memset (&(ctx->io.outofband.srcaddr4), 0, sizeof (struct sockaddr_in)); ctx->io.outofband.srcaddr4.sin_family = AF_INET; ctx->io.outofband.srcaddr = (struct sockaddr *)&(ctx->io.outofband.srcaddr4); ctx->io.outofband.srcaddr_len = sizeof (struct sockaddr_in); } else { /* zero everywhere, secure ephemeral port */ memset (&(ctx->io.outofband.srcaddr6), 0, sizeof (struct sockaddr_in6)); ctx->io.outofband.srcaddr6.sin6_family = AF_INET6; ctx->io.outofband.srcaddr = (struct sockaddr *)&(ctx->io.outofband.srcaddr6); ctx->io.outofband.srcaddr_len = sizeof (struct sockaddr_in6); } if (bind (ctx->io.outofband.sockfd, ctx->io.outofband.srcaddr, ctx->io.outofband.srcaddr_len) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } return (0); } int ipmi_ctx_open_outofband (ipmi_ctx_t ctx, const char *hostname, const char *username, const char *password, uint8_t authentication_type, uint8_t privilege_level, unsigned int session_timeout, unsigned int retransmission_timeout, unsigned int workaround_flags, unsigned int flags) { unsigned int workaround_flags_mask = (IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES | IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO | IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION | IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE | IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER | IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK | IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK); unsigned int flags_mask = (IPMI_FLAGS_NOSESSION | IPMI_FLAGS_DEBUG_DUMP | IPMI_FLAGS_NO_VALID_CHECK | IPMI_FLAGS_NO_LEGAL_CHECK); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* hostname length checks in _setup_hostname() */ if (!hostname || (username && strlen (username) > IPMI_MAX_USER_NAME_LENGTH) || (password && strlen (password) > IPMI_1_5_MAX_PASSWORD_LENGTH) || !IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) || !IPMI_PRIVILEGE_LEVEL_VALID (privilege_level) || (workaround_flags & ~workaround_flags_mask) || (flags & ~flags_mask)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (ctx->type != IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_ALREADY_OPEN); return (-1); } ctx->type = IPMI_DEVICE_LAN; ctx->workaround_flags_outofband = workaround_flags; ctx->flags = flags; if (_setup_hostname (ctx, hostname) < 0) goto cleanup; memset (ctx->io.outofband.username, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (username) memcpy (ctx->io.outofband.username, username, strlen (username)); memset (ctx->io.outofband.password, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH+1); if (password) memcpy (ctx->io.outofband.password, password, strlen (password)); ctx->io.outofband.privilege_level = privilege_level; ctx->io.outofband.session_timeout = (session_timeout ? session_timeout : IPMI_SESSION_TIMEOUT_DEFAULT); ctx->io.outofband.retransmission_timeout = (retransmission_timeout ? retransmission_timeout : IPMI_RETRANSMISSION_TIMEOUT_DEFAULT); if (ctx->io.outofband.retransmission_timeout >= ctx->io.outofband.session_timeout) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } memset (&ctx->io.outofband.last_send, '\0', sizeof (struct timeval)); memset (&ctx->io.outofband.last_received, '\0', sizeof (struct timeval)); if (ipmi_check_session_sequence_number_1_5_init (&(ctx->io.outofband.highest_received_sequence_number), &(ctx->io.outofband.previously_received_list)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } ctx->io.outofband.authentication_type = authentication_type; if (!(ctx->io.outofband.rq.obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (_setup_socket (ctx) < 0) goto cleanup; /* errnum set in api_lan_open_session */ if (api_lan_open_session (ctx) < 0) goto cleanup; ctx->errnum = IPMI_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, cleanup path */ if (ctx->io.outofband.sockfd) close (ctx->io.outofband.sockfd); _ipmi_outofband_free (ctx); ctx->type = IPMI_DEVICE_UNKNOWN; return (-1); } int ipmi_ctx_open_outofband_2_0 (ipmi_ctx_t ctx, const char *hostname, const char *username, const char *password, const unsigned char *k_g, unsigned int k_g_len, uint8_t privilege_level, uint8_t cipher_suite_id, unsigned int session_timeout, unsigned int retransmission_timeout, unsigned int workaround_flags, unsigned int flags) { unsigned int workaround_flags_mask = (IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE | IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK); unsigned int flags_mask = (IPMI_FLAGS_DEBUG_DUMP | IPMI_FLAGS_NO_VALID_CHECK | IPMI_FLAGS_NO_LEGAL_CHECK); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* hostname length checks in _setup_hostname() */ if (!hostname || (username && strlen (username) > IPMI_MAX_USER_NAME_LENGTH) || (password && strlen (password) > IPMI_2_0_MAX_PASSWORD_LENGTH) || (k_g && k_g_len > IPMI_MAX_K_G_LENGTH) || !IPMI_PRIVILEGE_LEVEL_VALID (privilege_level) || !IPMI_CIPHER_SUITE_ID_SUPPORTED (cipher_suite_id) || (workaround_flags & ~workaround_flags_mask) || (flags & ~flags_mask)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (ctx->type != IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_ALREADY_OPEN); return (-1); } if (ipmi_rmcpplus_init () < 0) { if (errno == EPERM) API_SET_ERRNUM (ctx, IPMI_ERR_SYSTEM_ERROR); else API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } ctx->type = IPMI_DEVICE_LAN_2_0; ctx->workaround_flags_outofband_2_0 = workaround_flags; ctx->flags = flags; if (_setup_hostname (ctx, hostname) < 0) goto cleanup; memset (ctx->io.outofband.username, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (username) memcpy (ctx->io.outofband.username, username, strlen (username)); memset (ctx->io.outofband.password, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH+1); if (password) memcpy (ctx->io.outofband.password, password, strlen (password)); ctx->io.outofband.privilege_level = privilege_level; ctx->io.outofband.session_timeout = (session_timeout ? session_timeout : IPMI_SESSION_TIMEOUT_DEFAULT); ctx->io.outofband.retransmission_timeout = (retransmission_timeout ? retransmission_timeout : IPMI_RETRANSMISSION_TIMEOUT_DEFAULT); if (ctx->io.outofband.retransmission_timeout >= ctx->io.outofband.session_timeout) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } memset (ctx->io.outofband.k_g, '\0', IPMI_MAX_K_G_LENGTH); ctx->io.outofband.k_g_configured = 0; if (k_g && k_g_len) { unsigned int i; int all_zeroes = 1; memcpy (ctx->io.outofband.k_g, k_g, k_g_len); ctx->io.outofband.k_g_configured++; /* Special case, check to make sure user didn't input zero as a * k_g key. */ for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++) { if (k_g[i] != 0) { all_zeroes = 0; break; } } if (all_zeroes) ctx->io.outofband.k_g_configured = 0; } ctx->io.outofband.cipher_suite_id = cipher_suite_id; memset (ctx->io.outofband.sik_key, '\0', IPMI_MAX_SIK_KEY_LENGTH); ctx->io.outofband.sik_key_ptr = ctx->io.outofband.sik_key; ctx->io.outofband.sik_key_len = IPMI_MAX_SIK_KEY_LENGTH; memset (ctx->io.outofband.integrity_key, '\0', IPMI_MAX_INTEGRITY_KEY_LENGTH); ctx->io.outofband.integrity_key_ptr = ctx->io.outofband.integrity_key; ctx->io.outofband.integrity_key_len = IPMI_MAX_INTEGRITY_KEY_LENGTH; memset (ctx->io.outofband.confidentiality_key, '\0', IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH); ctx->io.outofband.confidentiality_key_ptr = ctx->io.outofband.confidentiality_key; ctx->io.outofband.confidentiality_key_len = IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH; memset (&ctx->io.outofband.last_send, '\0', sizeof (struct timeval)); memset (&ctx->io.outofband.last_received, '\0', sizeof (struct timeval)); if (ipmi_check_session_sequence_number_2_0_init (&(ctx->io.outofband.highest_received_sequence_number), &(ctx->io.outofband.previously_received_list)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_rmcpplus_session_hdr = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rq.obj_rmcpplus_session_trlr = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_rmcpplus_session_hdr = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_rmcpplus_payload = fiid_obj_create (tmpl_rmcpplus_payload))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.outofband.rs.obj_rmcpplus_session_trlr = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (_setup_socket (ctx) < 0) goto cleanup; /* errnum set in api_lan_2_0_open_session */ if (api_lan_2_0_open_session (ctx) < 0) goto cleanup; ctx->errnum = IPMI_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, cleanup path */ if (ctx->io.outofband.sockfd) close (ctx->io.outofband.sockfd); _ipmi_outofband_free (ctx); ctx->type = IPMI_DEVICE_UNKNOWN; return (-1); } int ipmi_ctx_open_inband (ipmi_ctx_t ctx, ipmi_driver_type_t driver_type, int disable_auto_probe, uint16_t driver_address, uint8_t register_spacing, const char *driver_device, unsigned int workaround_flags, unsigned int flags) { ipmi_locate_ctx_t locate_ctx = NULL; struct ipmi_locate_info locate_info; unsigned int seedp; unsigned int temp_flags = 0; unsigned int workaround_flags_mask = (IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS | IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL); unsigned int flags_mask = (IPMI_FLAGS_NONBLOCKING | IPMI_FLAGS_DEBUG_DUMP | IPMI_FLAGS_NO_VALID_CHECK | IPMI_FLAGS_NO_LEGAL_CHECK); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* No workaround flags currently supported */ if ((driver_type != IPMI_DEVICE_KCS && driver_type != IPMI_DEVICE_SMIC && driver_type != IPMI_DEVICE_BT && driver_type != IPMI_DEVICE_SSIF && driver_type != IPMI_DEVICE_OPENIPMI && driver_type != IPMI_DEVICE_SUNBMC && driver_type != IPMI_DEVICE_INTELDCMI) || (workaround_flags & ~workaround_flags_mask) || (flags & ~flags_mask)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (ctx->type != IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_ALREADY_OPEN); return (-1); } ctx->workaround_flags_inband = workaround_flags; ctx->flags = flags; ctx->io.inband.kcs_ctx = NULL; ctx->io.inband.ssif_ctx = NULL; ctx->io.inband.openipmi_ctx = NULL; ctx->io.inband.sunbmc_ctx = NULL; /* Random number generation */ seedp = (unsigned int) clock () + (unsigned int) time (NULL); srand (seedp); ctx->io.inband.rq_seq = (double)(IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX) * (rand ()/(RAND_MAX + 1.0)); if (!(locate_ctx = ipmi_locate_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } switch (driver_type) { case IPMI_DEVICE_KCS: if (disable_auto_probe) { memset (&locate_info, '\0', sizeof (struct ipmi_locate_info)); locate_info.ipmi_version_major = 1; locate_info.ipmi_version_minor = 5; locate_info.locate_driver_type = IPMI_LOCATE_DRIVER_NONE; locate_info.interface_type = IPMI_INTERFACE_KCS; if (driver_device) { strncpy (locate_info.driver_device, driver_device, IPMI_LOCATE_PATH_MAX); locate_info.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } locate_info.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; locate_info.driver_address = driver_address; locate_info.register_spacing = register_spacing; } else { if (ipmi_locate_get_device_info (locate_ctx, IPMI_INTERFACE_KCS, &locate_info) < 0) { API_LOCATE_ERRNUM_TO_API_ERRNUM (ctx, ipmi_locate_ctx_errnum (locate_ctx)); goto cleanup; } if (driver_device) { strncpy (locate_info.driver_device, driver_device, IPMI_LOCATE_PATH_MAX); locate_info.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } if (driver_address) locate_info.driver_address = driver_address; if (register_spacing) locate_info.register_spacing = register_spacing; } ctx->type = driver_type; /* IPMI Workaround * * Discovered on HP ProLiant DL145 G1 * * The system uses KCS w/ an I/O base address, but the bit is * set incorrectly. Ignore it if specified by the user. * * Note: Linux OpenIPMI kernel driver always assumes System I/O. * In ipmi_si_intf.c * * "Note that technically, the lower bit of the base address * should be 1 if the address is I/O and 0 if the address is in * memory. So many systems get that wrong (and all that I have * seen are I/O) so we just ignore that bit and assume I/O. * Systems that use memory should use the newer spec, anyway." */ if (!(ctx->workaround_flags_inband & IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS)) { /* At this point we only support SYSTEM_IO, i.e. inb/outb style IO. * If we cant find the base address, we better exit. * -- Anand Babu */ /* achu: IPMI spec indicates KCS is only IO, not Memory * based. Memory based KCS is not part of IPMI spec */ if (locate_info.address_space_id != IPMI_ADDRESS_SPACE_ID_SYSTEM_IO) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_SUPPORTED); goto cleanup; } } if (!(ctx->io.inband.kcs_ctx = ipmi_kcs_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_kcs_ctx_set_driver_address (ctx->io.inband.kcs_ctx, locate_info.driver_address) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } if (ipmi_kcs_ctx_set_register_spacing (ctx->io.inband.kcs_ctx, locate_info.register_spacing) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } if (ipmi_kcs_ctx_set_poll_interval (ctx->io.inband.kcs_ctx, IPMI_POLL_INTERVAL_USECS) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } if (ctx->flags & IPMI_FLAGS_NONBLOCKING) temp_flags |= IPMI_KCS_FLAGS_NONBLOCKING; if (ctx->workaround_flags_inband & IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL) temp_flags |= IPMI_KCS_FLAGS_SPIN_POLL; if (ipmi_kcs_ctx_set_flags (ctx->io.inband.kcs_ctx, temp_flags) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } if (ipmi_kcs_ctx_io_init (ctx->io.inband.kcs_ctx) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } break; case IPMI_DEVICE_SMIC: ctx->errnum = IPMI_ERR_DEVICE_NOT_SUPPORTED; goto cleanup; case IPMI_DEVICE_BT: ctx->errnum = IPMI_ERR_DEVICE_NOT_SUPPORTED; goto cleanup; case IPMI_DEVICE_SSIF: if (disable_auto_probe) { memset (&locate_info, '\0', sizeof (struct ipmi_locate_info)); locate_info.ipmi_version_major = 1; locate_info.ipmi_version_minor = 5; locate_info.locate_driver_type = IPMI_LOCATE_DRIVER_NONE; locate_info.interface_type = IPMI_INTERFACE_SSIF; if (driver_device) { strncpy (locate_info.driver_device, driver_device, IPMI_LOCATE_PATH_MAX); locate_info.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } locate_info.address_space_id = IPMI_ADDRESS_SPACE_ID_SMBUS; locate_info.driver_address = driver_address; locate_info.register_spacing = register_spacing; } else { if (ipmi_locate_get_device_info (locate_ctx, IPMI_INTERFACE_SSIF, &locate_info) < 0) { API_LOCATE_ERRNUM_TO_API_ERRNUM (ctx, ipmi_locate_ctx_errnum (locate_ctx)); goto cleanup; } if (driver_device) { strncpy (locate_info.driver_device, driver_device, IPMI_LOCATE_PATH_MAX); locate_info.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } if (driver_address) locate_info.driver_address = driver_address; if (register_spacing) locate_info.register_spacing = register_spacing; } ctx->type = driver_type; if (!(ctx->io.inband.ssif_ctx = ipmi_ssif_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (driver_device) { if (ipmi_ssif_ctx_set_driver_device (ctx->io.inband.ssif_ctx, locate_info.driver_device) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } } if (ipmi_ssif_ctx_set_driver_address (ctx->io.inband.ssif_ctx, locate_info.driver_address) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } if (ctx->flags & IPMI_FLAGS_NONBLOCKING) temp_flags |= IPMI_SSIF_FLAGS_NONBLOCKING; if (ipmi_ssif_ctx_set_flags (ctx->io.inband.ssif_ctx, temp_flags) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } if (ipmi_ssif_ctx_io_init (ctx->io.inband.ssif_ctx) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } break; case IPMI_DEVICE_OPENIPMI: ctx->type = driver_type; if (!(ctx->io.inband.openipmi_ctx = ipmi_openipmi_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (driver_device) { if (ipmi_openipmi_ctx_set_driver_device (ctx->io.inband.openipmi_ctx, driver_device) < 0) { API_OPENIPMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_openipmi_ctx_errnum (ctx->io.inband.openipmi_ctx)); goto cleanup; } } if (ipmi_openipmi_ctx_io_init (ctx->io.inband.openipmi_ctx) < 0) { API_OPENIPMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_openipmi_ctx_errnum (ctx->io.inband.openipmi_ctx)); goto cleanup; } break; case IPMI_DEVICE_SUNBMC: ctx->type = driver_type; if (!(ctx->io.inband.sunbmc_ctx = ipmi_sunbmc_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (driver_device) { if (ipmi_sunbmc_ctx_set_driver_device (ctx->io.inband.sunbmc_ctx, driver_device) < 0) { API_SUNBMC_ERRNUM_TO_API_ERRNUM (ctx, ipmi_sunbmc_ctx_errnum (ctx->io.inband.sunbmc_ctx)); goto cleanup; } } if (ipmi_sunbmc_ctx_io_init (ctx->io.inband.sunbmc_ctx) < 0) { API_SUNBMC_ERRNUM_TO_API_ERRNUM (ctx, ipmi_sunbmc_ctx_errnum (ctx->io.inband.sunbmc_ctx)); goto cleanup; } break; case IPMI_DEVICE_INTELDCMI: ctx->type = driver_type; if (!(ctx->io.inband.inteldcmi_ctx = ipmi_inteldcmi_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (driver_device) { if (ipmi_inteldcmi_ctx_set_driver_device (ctx->io.inband.inteldcmi_ctx, driver_device) < 0) { API_INTELDCMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_inteldcmi_ctx_errnum (ctx->io.inband.inteldcmi_ctx)); goto cleanup; } } if (ipmi_inteldcmi_ctx_io_init (ctx->io.inband.inteldcmi_ctx) < 0) { API_INTELDCMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_inteldcmi_ctx_errnum (ctx->io.inband.inteldcmi_ctx)); goto cleanup; } break; default: goto cleanup; } /* Prepare in-band headers */ if (!(ctx->io.inband.rq.obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(ctx->io.inband.rs.obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } ipmi_locate_ctx_destroy (locate_ctx); ctx->errnum = IPMI_ERR_SUCCESS; return (0); cleanup: ipmi_locate_ctx_destroy (locate_ctx); _ipmi_inband_free (ctx); ctx->type = IPMI_DEVICE_UNKNOWN; return (-1); } static int _is_ctx_fatal_error (ipmi_ctx_t ctx) { /* some are fatal b/c they are outfoband and shouldn't happen */ /* note parameters is not fatal, for some drivers, inputs from users may not be ok */ /* note internal error is not fatal, could be a bad errno from a syscall */ assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); if (ipmi_ctx_errnum (ctx) == IPMI_ERR_CTX_NULL || ipmi_ctx_errnum (ctx) == IPMI_ERR_CTX_INVALID || ipmi_ctx_errnum (ctx) == IPMI_ERR_USERNAME_INVALID || ipmi_ctx_errnum (ctx) == IPMI_ERR_PASSWORD_INVALID || ipmi_ctx_errnum (ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmi_ctx_errnum (ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmi_ctx_errnum (ctx) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE || ipmi_ctx_errnum (ctx) == IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE || ipmi_ctx_errnum (ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT || ipmi_ctx_errnum (ctx) == IPMI_ERR_IPMI_2_0_UNAVAILABLE || ipmi_ctx_errnum (ctx) == IPMI_ERR_CONNECTION_TIMEOUT || ipmi_ctx_errnum (ctx) == IPMI_ERR_SESSION_TIMEOUT || ipmi_ctx_errnum (ctx) == IPMI_ERR_DEVICE_ALREADY_OPEN || ipmi_ctx_errnum (ctx) == IPMI_ERR_DEVICE_NOT_OPEN || ipmi_ctx_errnum (ctx) == IPMI_ERR_NOT_FOUND || ipmi_ctx_errnum (ctx) == IPMI_ERR_OUT_OF_MEMORY || ipmi_ctx_errnum (ctx) == IPMI_ERR_HOSTNAME_INVALID) return (1); return (0); } static int _is_locate_ctx_fatal_error (ipmi_locate_ctx_t locate_ctx) { /* some are fatal b/c they are outfoband and shouldn't happen */ /* note parameters is not fatal, for some drivers, inputs from users may not be ok */ /* note internal error is not fatal, could be a bad errno from a syscall */ assert (locate_ctx); if (ipmi_locate_ctx_errnum (locate_ctx) == IPMI_LOCATE_ERR_NULL || ipmi_locate_ctx_errnum (locate_ctx) == IPMI_LOCATE_ERR_INVALID || ipmi_locate_ctx_errnum (locate_ctx) == IPMI_LOCATE_ERR_OUT_OF_MEMORY) return (1); return (0); } int ipmi_ctx_find_inband (ipmi_ctx_t ctx, ipmi_driver_type_t *driver_type, int disable_auto_probe, uint16_t driver_address, uint8_t register_spacing, const char *driver_device, unsigned int workaround_flags, unsigned int flags) { ipmi_locate_ctx_t locate_ctx = NULL; struct ipmi_locate_info locate_info; int ret, rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type != IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_ALREADY_OPEN); return (-1); } if (!(locate_ctx = ipmi_locate_ctx_create ())) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* achu * * Try OpenIPMI, SunBMC, and IntelDCMI drivers first, since they * cannot be found via probing. Do it before probing for KCS/SSIF, * because it is possible, even though the OpenIPMI/SunBMC driver is * installed, probing may find KCS/SSIF anyways, and try to use * those first/instead. */ if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_OPENIPMI, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_SUNBMC, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_INTELDCMI, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } /* achu * * If one of KCS or SSIF is found, we try that one first. * We don't want to hang on one or another if one is bad. * * If neither is found (perhaps b/c the vendor just assumes * default values), then there's not much we can do, we can * only guess. * * This does mean in-band communication is slower (doing * excessive early probing). It's a justified cost to me. */ if ((ret = ipmi_locate_discover_device_info (locate_ctx, IPMI_INTERFACE_KCS, &locate_info)) < 0) { if (_is_locate_ctx_fatal_error (locate_ctx)) goto cleanup; } if (!ret) { if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_KCS, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } } if (!ipmi_locate_discover_device_info (locate_ctx, IPMI_INTERFACE_SSIF, &locate_info)) { if (_is_locate_ctx_fatal_error (locate_ctx)) goto cleanup; } if (!ret) { if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_SSIF, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } } /* achu * * If KCS/SSIF was not discovered, try plain old default values */ if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_KCS, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } if ((ret = ipmi_ctx_open_inband (ctx, IPMI_DEVICE_SSIF, disable_auto_probe, driver_address, register_spacing, driver_device, workaround_flags, flags)) < 0) { if (_is_ctx_fatal_error (ctx)) goto cleanup; } if (!ret) { rv = 1; goto out; } rv = 0; out: if (driver_type) (*driver_type) = ctx->type; ctx->errnum = IPMI_ERR_SUCCESS; cleanup: ipmi_locate_ctx_destroy (locate_ctx); return (rv); } int ipmi_ctx_set_target (ipmi_ctx_t ctx, uint8_t *channel_number, uint8_t *rs_addr) { if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (!channel_number && !rs_addr) { ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; goto out; } /* Special case, don't want to do bridging */ if ((channel_number && (*channel_number) == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB) && (rs_addr && (*rs_addr) == IPMI_SLAVE_ADDRESS_BMC)) { ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; goto out; } if (channel_number) { if (!IPMI_CHANNEL_NUMBER_VALID (*channel_number)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } } if (channel_number) ctx->target.channel_number = *channel_number; else ctx->target.channel_number = IPMI_CHANNEL_NUMBER_PRIMARY_IPMB; ctx->target.channel_number_is_set = 1; if (rs_addr) ctx->target.rs_addr = *rs_addr; else ctx->target.rs_addr = IPMI_SLAVE_ADDRESS_BMC; ctx->target.rs_addr_is_set = 1; out: ctx->errnum = IPMI_ERR_SUCCESS; return (0); } int ipmi_ctx_get_target (ipmi_ctx_t ctx, uint8_t *channel_number, uint8_t *rs_addr) { if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (channel_number) { if (ctx->target.channel_number_is_set) (*channel_number) = ctx->target.channel_number; else (*channel_number) = IPMI_CHANNEL_NUMBER_PRIMARY_IPMB; } if (rs_addr) { if (ctx->target.rs_addr_is_set) (*rs_addr) = ctx->target.rs_addr; else (*rs_addr) = IPMI_SLAVE_ADDRESS_BMC; } ctx->errnum = IPMI_ERR_SUCCESS; return (0); } int ipmi_cmd (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int rv = 0; /* achu: * * Thanks to the OpenIPMI folks and tcpdumps from their project. I * had trouble figuring out a few chunks of the bridging code. */ if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (ctx->flags & IPMI_FLAGS_NOSESSION && ctx->type != IPMI_DEVICE_LAN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF && ctx->type != IPMI_DEVICE_OPENIPMI && ctx->type != IPMI_DEVICE_SUNBMC && ctx->type != IPMI_DEVICE_INTELDCMI) { API_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); return (-1); } if (!fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (!fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd_rq) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); return (-1); } ctx->target.lun = lun; ctx->target.net_fn = net_fn; if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* lan packets are dumped in ipmi lan code */ /* kcs packets are dumped in kcs code */ /* ssif packets are dumped in ssif code */ if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; uint8_t cmd = 0; uint8_t group_extension = 0; uint64_t val; /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, DEBUG_UTIL_DIRECTION_REQUEST, ctx->target.net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ctx->tmpl_ipmb_cmd_rq && cmd == IPMI_CMD_SEND_MESSAGE) { ipmi_obj_dump_ipmb (STDERR_FILENO, NULL, hdrbuf, NULL, obj_cmd_rq, tmpl_ipmb_msg_hdr_rq, ctx->tmpl_ipmb_cmd_rq); } else ipmi_obj_dump (STDERR_FILENO, NULL, hdrbuf, NULL, obj_cmd_rq); } } if (ctx->type == IPMI_DEVICE_LAN) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_lan_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_lan_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else if (ctx->type == IPMI_DEVICE_LAN_2_0) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_lan_2_0_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_lan_2_0_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else if (ctx->type == IPMI_DEVICE_KCS) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_kcs_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_kcs_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else if (ctx->type == IPMI_DEVICE_SSIF) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_ssif_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_ssif_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else if (ctx->type == IPMI_DEVICE_OPENIPMI) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_openipmi_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_openipmi_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else if (ctx->type == IPMI_DEVICE_SUNBMC) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); rv = -1; } else rv = api_sunbmc_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } else /* ctx->type == IPMI_DEVICE_INTELDCMI */ { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_inteldcmi_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs); else rv = api_inteldcmi_cmd (ctx, obj_cmd_rq, obj_cmd_rs); } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* lan packets are dumped in ipmi lan code */ /* kcs packets are dumped in kcs code */ /* ssif packets are dumped in ssif code */ if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; uint8_t cmd = 0; uint8_t group_extension = 0; uint64_t val; /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } /* its ok to use the "request" net_fn */ debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, DEBUG_UTIL_DIRECTION_RESPONSE, ctx->target.net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ctx->tmpl_ipmb_cmd_rs && cmd == IPMI_CMD_GET_MESSAGE) { ipmi_obj_dump_ipmb (STDERR_FILENO, NULL, hdrbuf, NULL, obj_cmd_rs, tmpl_ipmb_msg_hdr_rs, ctx->tmpl_ipmb_cmd_rs); } else ipmi_obj_dump (STDERR_FILENO, NULL, hdrbuf, NULL, obj_cmd_rs); } } /* errnum set in ipmi_*_cmd functions */ return (rv); } int ipmi_cmd_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { struct ipmi_ctx_target target_save; int rv = 0; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_CHANNEL_NUMBER_VALID (channel_number)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number = channel_number; ctx->target.channel_number_is_set = 1; ctx->target.rs_addr = rs_addr; ctx->target.rs_addr_is_set = 1; rv = ipmi_cmd (ctx, lun, net_fn, obj_cmd_rq, obj_cmd_rs); memcpy (&ctx->target, &target_save, sizeof (target_save)); /* errnum set in ipmi_cmd() */ return (rv); } int ipmi_cmd_raw (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { int rv = 0; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!buf_rq || !buf_rq_len || !buf_rs || !buf_rs_len) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (!IPMI_NET_FN_RQ_VALID (net_fn)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (ctx->type == IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (ctx->flags & IPMI_FLAGS_NOSESSION && ctx->type != IPMI_DEVICE_LAN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF && ctx->type != IPMI_DEVICE_OPENIPMI && ctx->type != IPMI_DEVICE_SUNBMC && ctx->type != IPMI_DEVICE_INTELDCMI) { API_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); return (-1); } ctx->target.lun = lun; ctx->target.net_fn = net_fn; if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* lan packets are dumped in ipmi lan code */ /* kcs packets are dumped in kcs code */ /* ssif packets are dumped in ssif code */ if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; uint8_t cmd = 0; uint8_t group_extension = 0; cmd = ((uint8_t *)buf_rq)[0]; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { if (buf_rq_len > 1) group_extension = ((uint8_t *)buf_rq)[1]; } debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, DEBUG_UTIL_DIRECTION_REQUEST, ctx->target.net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); ipmi_dump_hex (STDERR_FILENO, NULL, hdrbuf, NULL, buf_rq, buf_rq_len); } } if (ctx->type == IPMI_DEVICE_LAN) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_lan_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_lan_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else if (ctx->type == IPMI_DEVICE_LAN_2_0) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_lan_2_0_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_lan_2_0_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else if (ctx->type == IPMI_DEVICE_KCS) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_kcs_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_kcs_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else if (ctx->type == IPMI_DEVICE_SSIF) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_ssif_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_ssif_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else if (ctx->type == IPMI_DEVICE_OPENIPMI) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_openipmi_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_openipmi_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else if (ctx->type == IPMI_DEVICE_SUNBMC) { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); rv = -1; } else rv = api_sunbmc_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } else /* ctx->type == IPMI_DEVICE_INTELDCMI */ { if (ctx->target.channel_number_is_set && ctx->target.rs_addr_is_set) rv = api_inteldcmi_cmd_raw_ipmb (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); else rv = api_inteldcmi_cmd_raw (ctx, buf_rq, buf_rq_len, buf_rs, buf_rs_len); } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && rv >= 0) { /* lan packets are dumped in ipmi lan code */ /* kcs packets are dumped in kcs code */ /* ssif packets are dumped in ssif code */ if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SSIF) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; uint8_t cmd = 0; uint8_t group_extension = 0; cmd = ((uint8_t *)buf_rq)[0]; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { if (buf_rq_len > 1) group_extension = ((uint8_t *)buf_rq)[1]; } /* its ok to use the "request" net_fn */ debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, DEBUG_UTIL_DIRECTION_RESPONSE, ctx->target.net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); ipmi_dump_hex (STDERR_FILENO, NULL, hdrbuf, NULL, buf_rs, rv); } } /* errnum set in ipmi_*_cmd_raw functions */ return (rv); } int ipmi_cmd_raw_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { struct ipmi_ctx_target target_save; int rv = 0; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_CHANNEL_NUMBER_VALID (channel_number)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number = channel_number; ctx->target.channel_number_is_set = 1; ctx->target.rs_addr = rs_addr; ctx->target.rs_addr_is_set = 1; rv = ipmi_cmd_raw (ctx, lun, net_fn, buf_rq, buf_rq_len, buf_rs, buf_rs_len); memcpy (&ctx->target, &target_save, sizeof (target_save)); /* errnum set in ipmi_cmd_raw() */ return (rv); } static void _ipmi_outofband_close (ipmi_ctx_t ctx) { /* Function Note: No need to set errnum - just return */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN); /* No need to set errnum - if the anything in close session * fails, session will eventually timeout anyways */ if (!(ctx->flags & IPMI_FLAGS_NOSESSION)) { if (api_lan_close_session (ctx) < 0) goto cleanup; } cleanup: /* ignore potential error, destroy path */ if (ctx->io.outofband.sockfd) close (ctx->io.outofband.sockfd); _ipmi_outofband_free (ctx); } static void _ipmi_outofband_2_0_close (ipmi_ctx_t ctx) { /* Function Note: No need to set errnum - just return */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0); /* No need to set errnum - if the anything in close session * fails, session will eventually timeout anyways */ if (api_lan_2_0_close_session (ctx) < 0) goto cleanup; cleanup: /* ignore potential error, destroy path */ if (ctx->io.outofband.sockfd) close (ctx->io.outofband.sockfd); _ipmi_outofband_free (ctx); } static void _ipmi_inband_close (ipmi_ctx_t ctx) { /* Function Note: No need to set errnum - just return */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_KCS || ctx->type == IPMI_DEVICE_SMIC || ctx->type == IPMI_DEVICE_BT || ctx->type == IPMI_DEVICE_SSIF || ctx->type == IPMI_DEVICE_OPENIPMI || ctx->type == IPMI_DEVICE_SUNBMC || ctx->type == IPMI_DEVICE_INTELDCMI)); _ipmi_inband_free (ctx); } int ipmi_ctx_close (ipmi_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_UNKNOWN) { API_SET_ERRNUM (ctx, IPMI_ERR_DEVICE_NOT_OPEN); return (-1); } if (ctx->type != IPMI_DEVICE_LAN && ctx->type != IPMI_DEVICE_LAN_2_0 && ctx->type != IPMI_DEVICE_KCS && ctx->type != IPMI_DEVICE_SMIC && ctx->type != IPMI_DEVICE_BT && ctx->type != IPMI_DEVICE_SSIF && ctx->type != IPMI_DEVICE_OPENIPMI && ctx->type != IPMI_DEVICE_SUNBMC && ctx->type != IPMI_DEVICE_INTELDCMI) { API_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); return (-1); } /* closing session - end channel/slave targeting */ ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; if (ctx->type == IPMI_DEVICE_LAN) _ipmi_outofband_close (ctx); else if (ctx->type == IPMI_DEVICE_LAN_2_0) _ipmi_outofband_2_0_close (ctx); else _ipmi_inband_close (ctx); ctx->type = IPMI_DEVICE_UNKNOWN; ctx->errnum = IPMI_ERR_SUCCESS; return (0); } void ipmi_ctx_destroy (ipmi_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return; } if (ctx->type != IPMI_DEVICE_UNKNOWN) ipmi_ctx_close (ctx); /* secure_memset b/c ctx contains ipmi password */ secure_memset (ctx, '\0', sizeof (struct ipmi_ctx)); free (ctx); } freeipmi-1.6.4/libfreeipmi/api/ipmi-api-defs.h0000644002055400205540000001317413527331636021126 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_API_DEFS_H #define IPMI_API_DEFS_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/driver/ipmi-inteldcmi-driver.h" #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/driver/ipmi-openipmi-driver.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/driver/ipmi-sunbmc-driver.h" #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/api/ipmi-api.h" #define IPMI_MAX_SIK_KEY_LENGTH 64 #define IPMI_MAX_INTEGRITY_KEY_LENGTH 64 #define IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH 64 #define IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH 64 #define IPMI_MAX_PKT_LEN 4096 #define IPMI_CTX_MAGIC 0xfafab0b0 #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif #define MAXPORTBUFLEN 16 struct ipmi_ctx_target { uint8_t channel_number; /* for ipmb */ int channel_number_is_set; /* for ipmb */ uint8_t rs_addr; /* for ipmb */ int rs_addr_is_set; /* for ipmb */ uint8_t lun; uint8_t net_fn; }; struct ipmi_ctx { uint32_t magic; ipmi_driver_type_t type; unsigned int workaround_flags_outofband; unsigned int workaround_flags_outofband_2_0; unsigned int workaround_flags_inband; unsigned int flags; struct ipmi_ctx_target target; fiid_field_t *tmpl_ipmb_cmd_rq; fiid_field_t *tmpl_ipmb_cmd_rs; ipmi_errnum_type_t errnum; union { struct { ipmi_kcs_ctx_t kcs_ctx; ipmi_ssif_ctx_t ssif_ctx; ipmi_openipmi_ctx_t openipmi_ctx; ipmi_sunbmc_ctx_t sunbmc_ctx; ipmi_inteldcmi_ctx_t inteldcmi_ctx; uint8_t rq_seq; struct { fiid_obj_t obj_hdr; } rq; struct { fiid_obj_t obj_hdr; } rs; } inband; struct { int sockfd; char hostname[MAXHOSTNAMELEN+1]; struct sockaddr *remote_host; socklen_t remote_host_len; struct sockaddr_in remote_host4; struct sockaddr_in6 remote_host6; struct sockaddr *srcaddr; socklen_t srcaddr_len; struct sockaddr_in srcaddr4; struct sockaddr_in6 srcaddr6; /* Configured by User for IPMI 1.5 and IPMI 2.0*/ char username[IPMI_MAX_USER_NAME_LENGTH+1]; char password[IPMI_2_0_MAX_PASSWORD_LENGTH+1]; uint8_t privilege_level; unsigned int session_timeout; unsigned int retransmission_timeout; /* Configured by User for IPMI 1.5 */ uint8_t authentication_type; /* Configured by User for IPMI 2.0 */ uint8_t k_g[IPMI_MAX_K_G_LENGTH]; int k_g_configured; uint8_t cipher_suite_id; /* Data based on Configuration Parameters */ uint8_t authentication_algorithm; uint8_t integrity_algorithm; uint8_t confidentiality_algorithm; /* Used by IPMI 1.5 and IPMI 2.0 code */ uint32_t session_sequence_number; uint8_t rq_seq; struct timeval last_send; struct timeval last_received; uint32_t highest_received_sequence_number; uint32_t previously_received_list; /* Used by IPMI 1.5 */ uint32_t session_id; /* achu: per_msg_auth is backwards for some reason * * 0 = enabled * 1 = disabled */ int per_msg_auth_disabled; /* Used by IPMI 2.0 */ uint32_t remote_console_session_id; uint32_t managed_system_session_id; uint8_t sik_key[IPMI_MAX_SIK_KEY_LENGTH]; /* not actually needed globally */ void *sik_key_ptr; unsigned int sik_key_len; uint8_t integrity_key[IPMI_MAX_INTEGRITY_KEY_LENGTH]; void *integrity_key_ptr; unsigned int integrity_key_len; uint8_t confidentiality_key[IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH]; void *confidentiality_key_ptr; unsigned int confidentiality_key_len; struct { fiid_obj_t obj_rmcp_hdr; fiid_obj_t obj_lan_session_hdr; fiid_obj_t obj_rmcpplus_session_hdr; fiid_obj_t obj_lan_msg_hdr; fiid_obj_t obj_rmcpplus_session_trlr; } rq; struct { fiid_obj_t obj_rmcp_hdr; fiid_obj_t obj_lan_session_hdr; fiid_obj_t obj_rmcpplus_session_hdr; fiid_obj_t obj_lan_msg_hdr; fiid_obj_t obj_rmcpplus_payload; fiid_obj_t obj_lan_msg_trlr; fiid_obj_t obj_rmcpplus_session_trlr; } rs; } outofband; } io; }; #endif /* IPMI_API_DEFS_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-api-trace.h0000644002055400205540000001272713527331636021306 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_API_TRACE_H #define IPMI_API_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/util/ipmi-error-util.h" #include "freeipmi/util/ipmi-util.h" #include "libcommon/ipmi-trace.h" #include "ipmi-api-util.h" #if defined (IPMI_TRACE) #define API_BAD_RESPONSE_TRACE(___ctx, ___rs) \ do { \ int __rserrnum = 0; \ uint64_t __rsval = 0; \ char __rserrstr[IPMI_ERR_STR_MAX_LEN + 1]; \ fiid_obj_get (___rs, "comp_code", &__rsval); \ __rserrnum = __rsval; \ memset (__rserrstr, '\0', IPMI_ERR_STR_MAX_LEN + 1); \ ipmi_completion_code_strerror_cmd_r ((___rs), \ (___ctx)->target.net_fn, \ __rserrstr, \ IPMI_ERR_STR_MAX_LEN); \ TRACE_MSG_OUT (__rserrstr, __rserrnum); \ } while (0) #else #define API_BAD_RESPONSE_TRACE(__ctx, __rs) #endif /* IPMI_TRACE */ #define API_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_ctx_errormsg ((__ctx)), __errnum); \ } while (0) #define API_ERRNO_TO_API_ERRNUM(__ctx, __errno) \ do { \ api_set_api_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define API_FIID_OBJECT_ERROR_TO_API_ERRNUM(__ctx, __obj) \ do { \ api_set_api_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #define API_BAD_RESPONSE_TO_API_ERRNUM(__ctx, __obj_rs) \ do { \ api_set_api_errnum_by_bad_response ((__ctx), (__obj_rs)); \ API_BAD_RESPONSE_TRACE ((__ctx), (__obj_rs)); \ } while (0) #define API_KCS_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_kcs_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_kcs_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #define API_SSIF_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_ssif_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_ssif_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #define API_OPENIPMI_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_openipmi_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_openipmi_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #define API_SUNBMC_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_sunbmc_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_sunbmc_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #define API_INTELDCMI_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_inteldcmi_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_inteldcmi_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #define API_LOCATE_ERRNUM_TO_API_ERRNUM(__ctx, __errnum) \ do { \ api_set_api_errnum_by_locate_errnum ((__ctx), (__errnum)); \ TRACE_MSG_OUT (ipmi_locate_ctx_strerror ((__errnum)), (__errnum)); \ } while (0) #endif /* IPMI_API_TRACE_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-api-util.c0000644002055400205540000002771313527331636021161 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/driver/ipmi-inteldcmi-driver.h" #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/driver/ipmi-openipmi-driver.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/driver/ipmi-sunbmc-driver.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-api-defs.h" #include "ipmi-api-util.h" #include "ipmi-api-trace.h" #include "freeipmi-portability.h" void api_set_api_errnum_by_errno (ipmi_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_ERR_SUCCESS; break; case ENOMEM: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case ENODEV: ctx->errnum = IPMI_ERR_DEVICE_NOT_SUPPORTED; break; case ECONNRESET: ctx->errnum = IPMI_ERR_IPMI_ERROR; break; case ECONNREFUSED: ctx->errnum = IPMI_ERR_IPMI_ERROR; break; case EINVAL: ctx->errnum = IPMI_ERR_PARAMETERS; break; case ENETUNREACH: case EHOSTUNREACH: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_fiid_object (ipmi_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_ERR_IPMI_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_bad_response (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); /* IPMI_COMP_CODE_COMMAND_TIMEOUT, assumes it's a IPMB or command * specific timeout, so set to "MESSAGE_TIMEOUT" so user can * continue on if they wish. At minimum, returned by openipmi * driver for (what seems to be) collection of potential errors. */ if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_TIMEOUT) == 1) ctx->errnum = IPMI_ERR_MESSAGE_TIMEOUT; else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_NODE_BUSY) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OUT_OF_SPACE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS) == 1) ctx->errnum = IPMI_ERR_BMC_BUSY; else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) == 1) ctx->errnum = IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT; else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1) ctx->errnum = IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED; else ctx->errnum = IPMI_ERR_BAD_COMPLETION_CODE; } void api_set_api_errnum_by_locate_errnum (ipmi_ctx_t ctx, int locate_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (locate_errnum) { case IPMI_LOCATE_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_LOCATE_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_LOCATE_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_LOCATE_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_kcs_errnum (ipmi_ctx_t ctx, int kcs_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (kcs_errnum) { case IPMI_KCS_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_KCS_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_KCS_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_KCS_ERR_DEVICE_NOT_FOUND: ctx->errnum = IPMI_ERR_DEVICE_NOT_FOUND; break; case IPMI_KCS_ERR_DRIVER_TIMEOUT: ctx->errnum = IPMI_ERR_DRIVER_TIMEOUT; break; case IPMI_KCS_ERR_BUSY: ctx->errnum = IPMI_ERR_DRIVER_BUSY; break; case IPMI_KCS_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_ssif_errnum (ipmi_ctx_t ctx, int ssif_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (ssif_errnum) { case IPMI_SSIF_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_SSIF_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_SSIF_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_SSIF_ERR_DEVICE_NOT_FOUND: ctx->errnum = IPMI_ERR_DEVICE_NOT_FOUND; break; case IPMI_SSIF_ERR_DRIVER_TIMEOUT: ctx->errnum = IPMI_ERR_DRIVER_TIMEOUT; break; case IPMI_SSIF_ERR_BUSY: ctx->errnum = IPMI_ERR_DRIVER_BUSY; break; case IPMI_SSIF_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_openipmi_errnum (ipmi_ctx_t ctx, int openipmi_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (openipmi_errnum) { case IPMI_OPENIPMI_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_OPENIPMI_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_OPENIPMI_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND: ctx->errnum = IPMI_ERR_DEVICE_NOT_FOUND; break; case IPMI_OPENIPMI_ERR_DRIVER_TIMEOUT: ctx->errnum = IPMI_ERR_DRIVER_TIMEOUT; break; case IPMI_OPENIPMI_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_sunbmc_errnum (ipmi_ctx_t ctx, int sunbmc_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (sunbmc_errnum) { case IPMI_SUNBMC_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_SUNBMC_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_SUNBMC_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND: ctx->errnum = IPMI_ERR_DEVICE_NOT_FOUND; break; case IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED: ctx->errnum = IPMI_ERR_DEVICE_NOT_SUPPORTED; break; case IPMI_SUNBMC_ERR_DRIVER_TIMEOUT: ctx->errnum = IPMI_ERR_DRIVER_TIMEOUT; break; case IPMI_SUNBMC_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } void api_set_api_errnum_by_inteldcmi_errnum (ipmi_ctx_t ctx, int inteldcmi_errnum) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); switch (inteldcmi_errnum) { case IPMI_INTELDCMI_ERR_SUCCESS: ctx->errnum = IPMI_ERR_SUCCESS; break; case IPMI_INTELDCMI_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_ERR_OUT_OF_MEMORY; break; case IPMI_INTELDCMI_ERR_PERMISSION: ctx->errnum = IPMI_ERR_PERMISSION; break; case IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND: ctx->errnum = IPMI_ERR_DEVICE_NOT_FOUND; break; case IPMI_INTELDCMI_ERR_DRIVER_TIMEOUT: ctx->errnum = IPMI_ERR_DRIVER_TIMEOUT; break; case IPMI_INTELDCMI_ERR_SYSTEM_ERROR: ctx->errnum = IPMI_ERR_SYSTEM_ERROR; break; default: ctx->errnum = IPMI_ERR_INTERNAL_ERROR; } } static int _api_ipmi_cmd_post (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { int ret; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) { uint64_t val; /* Do not check completion code if data not available * (i.e. FIID_ERR_DATA_NOT_AVAILABLE completion code). * * Fallthrough to normal error if it's an alternate fiid error * (invalid packet, field not found, etc.) */ if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { if (fiid_obj_errnum (obj_cmd_rs) == FIID_ERR_DATA_NOT_AVAILABLE) goto skip_comp_code_check; } } if ((ret = ipmi_check_completion_code_success (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!ret) { API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } skip_comp_code_check: if (!(ctx->flags & IPMI_FLAGS_NO_VALID_CHECK) && !(ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK)) { if ((ret = fiid_obj_packet_valid (obj_cmd_rs)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_IPMI_ERROR); return (-1); } } return (0); } int api_ipmi_cmd (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); /* Note: ctx->errnum set in call to ipmi_cmd() */ if (ipmi_cmd (ctx, lun, net_fn, obj_cmd_rq, obj_cmd_rs) < 0) return (-1); return (_api_ipmi_cmd_post (ctx, obj_cmd_rs)); } int api_ipmi_cmd_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC); /* Note: ctx->errnum set in call to ipmi_cmd_ipmb() */ if (ipmi_cmd_ipmb (ctx, channel_number, rs_addr, lun, net_fn, obj_cmd_rq, obj_cmd_rs) < 0) return (-1); return (_api_ipmi_cmd_post (ctx, obj_cmd_rs)); } freeipmi-1.6.4/libfreeipmi/api/ipmi-api-util.h0000644002055400205540000000442713527331636021163 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_API_UTIL_H #define IPMI_API_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/util/ipmi-error-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-api-defs.h" void api_set_api_errnum_by_errno (ipmi_ctx_t ctx, int __errno); void api_set_api_errnum_by_fiid_object (ipmi_ctx_t ctx, fiid_obj_t obj); void api_set_api_errnum_by_bad_response (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs); void api_set_api_errnum_by_locate_errnum (ipmi_ctx_t ctx, int locate_errnum); void api_set_api_errnum_by_kcs_errnum (ipmi_ctx_t ctx, int kcs_errnum); void api_set_api_errnum_by_ssif_errnum (ipmi_ctx_t ctx, int ssif_errnum); void api_set_api_errnum_by_openipmi_errnum (ipmi_ctx_t ctx, int openipmi_errnum); void api_set_api_errnum_by_sunbmc_errnum (ipmi_ctx_t ctx, int sunbmc_errnum); void api_set_api_errnum_by_inteldcmi_errnum (ipmi_ctx_t ctx, int inteldcmi_errnum); int api_ipmi_cmd (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_ipmi_cmd_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); #endif /* IPMI_API_UTIL_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-chassis-cmds-api.c0000644002055400205540000012627213527331636022565 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-chassis-cmds-api.h" #include "freeipmi/cmds/ipmi-chassis-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-system-boot-option-parameters-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_chassis_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_chassis_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_chassis_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_chassis_capabilities (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_chassis_status (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_chassis_status_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_chassis_status_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_chassis_status (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_chassis_control (ipmi_ctx_t ctx, uint8_t chassis_control, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_chassis_control_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_chassis_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_chassis_control (chassis_control, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_chassis_identify (ipmi_ctx_t ctx, const uint8_t *identify_interval, const uint8_t *force_identify, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_chassis_identify_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_chassis_identify_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_chassis_identify (identify_interval, force_identify, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_front_panel_enables (ipmi_ctx_t ctx, uint8_t disable_power_off_button_for_power_off_only, uint8_t disable_reset_button, uint8_t disable_diagnostic_interrupt_button, uint8_t disable_standby_button_for_entering_standby, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_front_panel_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_front_panel_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_front_panel_enables (disable_power_off_button_for_power_off_only, disable_reset_button, disable_diagnostic_interrupt_button, disable_standby_button_for_entering_standby, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_power_restore_policy (ipmi_ctx_t ctx, uint8_t power_restore_policy, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_power_restore_policy_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_power_restore_policy_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_power_restore_policy (power_restore_policy, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_power_cycle_interval (ipmi_ctx_t ctx, uint8_t interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_power_cycle_interval_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_power_cycle_interval_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_power_cycle_interval (interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_restart_cause (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_system_restart_cause_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_restart_cause_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_restart_cause (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t parameter_valid, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options (parameter_selector, parameter_valid, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_set_in_progress (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_set_in_progress (parameter_valid, state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_service_partition_selector (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t service_partition_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_service_partition_selector_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_service_partition_selector (parameter_valid, service_partition_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_service_partition_scan (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t service_partition_discovered, uint8_t service_partition_scan, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_service_partition_scan_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_service_partition_scan (parameter_valid, service_partition_discovered, service_partition_scan, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t dont_clear_on_power_up, uint8_t dont_clear_on_pushbutton_rest_soft_reset, uint8_t dont_clear_on_watchdog_timeout, uint8_t dont_clear_on_chassis_control, uint8_t dont_clear_on_PEF, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (parameter_valid, dont_clear_on_power_up, dont_clear_on_pushbutton_rest_soft_reset, dont_clear_on_watchdog_timeout, dont_clear_on_chassis_control, dont_clear_on_PEF, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx, uint8_t parameter_valid, const uint8_t *bios_or_post_handled_boot_info, const uint8_t *os_loader_handled_boot_info, const uint8_t *os_or_service_partition_handled_boot_info, const uint8_t *sms_handled_boot_info, const uint8_t *oem_handled_boot_info, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_boot_info_acknowledge (parameter_valid, bios_or_post_handled_boot_info, os_loader_handled_boot_info, os_or_service_partition_handled_boot_info, sms_handled_boot_info, oem_handled_boot_info, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_boot_flags (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t bios_boot_type, uint8_t boot_flags_persistent, uint8_t boot_flags_valid, uint8_t lock_out_reset_button, uint8_t screen_blank, uint8_t boot_device, uint8_t lock_keyboard, uint8_t cmos_clear, uint8_t console_redirection, uint8_t lock_out_sleep_button, uint8_t user_password_bypass, uint8_t force_progress_event_traps, uint8_t firmware_bios_verbosity, uint8_t lock_out_via_power_button, uint8_t bios_mux_control_override, uint8_t bios_shared_mode_override, uint8_t device_instance_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_boot_flags_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_boot_flags (parameter_valid, bios_boot_type, boot_flags_persistent, boot_flags_valid, lock_out_reset_button, screen_blank, boot_device, lock_keyboard, cmos_clear, console_redirection, lock_out_sleep_button, user_password_bypass, force_progress_event_traps, firmware_bios_verbosity, lock_out_via_power_button, bios_mux_control_override, bios_shared_mode_override, device_instance_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t boot_source_channel_number, uint32_t session_id, uint32_t boot_info_timestamp, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_boot_initiator_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_boot_initiator_info (parameter_valid, boot_source_channel_number, session_id, boot_info_timestamp, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx, uint8_t parameter_valid, uint8_t set_selector, const void *block_data, unsigned int block_data_length, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_boot_options_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_boot_options_boot_initiator_mailbox (parameter_valid, set_selector, block_data, block_data_length, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_get_system_boot_options_common (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rs_expected); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_boot_options_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_boot_options (parameter_selector, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_boot_options (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_set_in_progress (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_set_in_progress_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_service_partition_selector (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_service_partition_selector_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SELECTOR) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_service_partition_scan (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_service_partition_scan_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SCAN) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BMC_BOOT_FLAG_VALID_BIT_CLEARING) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_boot_info_acknowledge (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_boot_info_acknowledge_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INFO_ACKNOWLEDGE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_boot_flags (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_boot_flags_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_FLAGS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_boot_initiator_info (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_boot_initiator_info_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_INFO) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_boot_options_boot_initiator_mailbox (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_boot_options_common (ctx, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_boot_options_boot_initiator_mailbox_rs, IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_MAILBOX) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_power_on_hours_counter (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_power_on_hours_counter_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_power_on_hours_counter_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_power_on_hours_counter (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_CHASSIS_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-dcmi-cmds-api.c0000644002055400205540000013765713527331636022055 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-dcmi-cmds-api.c,v 1.4 2010-05-17 17:42:45 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-dcmi-cmds-api.h" #include "freeipmi/cmds/ipmi-dcmi-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" static int _ipmi_cmd_dcmi_get_dcmi_capability_info_common (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_capability_info (parameter_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_capability_info (ipmi_ctx_t ctx, uint8_t parameter_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs, IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SUPPORTED_DCMI_CAPABILITIES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs, IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANDATORY_PLATFORM_ATTRIBUTES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs, IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_OPTIONAL_PLATFORM_ATTRIBUTES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs, IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_MANAGEABILITY_ACCESS_ATTRIBUTES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_dcmi_get_dcmi_capability_info_common (ctx, obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs, IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_ENHANCED_SYSTEM_POWER_STATISTICS_ATTRIBUTES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters (parameter_selector, set_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t activate, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (set_selector, activate, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t option_12, uint8_t option_60_with_option_43, uint8_t random_back_off, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (set_selector, option_12, option_60_with_option_43, random_back_off, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t initial_timeout_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (set_selector, initial_timeout_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx, uint8_t set_selector, uint16_t server_contact_timeout_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (set_selector, server_contact_timeout_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx, uint8_t set_selector, uint16_t server_contact_retry_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (set_selector, server_contact_retry_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t set_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_configuration_parameters (parameter_selector, set_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_configuration_parameters (IPMI_DCMI_CONFIGURATION_PARAMETER_DISCOVERY_CONFIGURATION, set_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_configuration_parameters (IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_1, set_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_configuration_parameters (IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_2, set_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3 (ipmi_ctx_t ctx, uint8_t set_selector, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_configuration_parameters (IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3, set_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_asset_tag (ipmi_ctx_t ctx, uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_asset_tag_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_asset_tag_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_asset_tag (offset_to_read, number_of_bytes_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_asset_tag (ipmi_ctx_t ctx, uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_asset_tag_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_asset_tag_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_asset_tag (offset_to_write, number_of_bytes_to_write, data, data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_management_controller_identifier_string (ipmi_ctx_t ctx, uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_management_controller_identifier_string_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_management_controller_identifier_string_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_management_controller_identifier_string (offset_to_read, number_of_bytes_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_management_controller_identifier_string (ipmi_ctx_t ctx, uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_management_controller_identifier_string_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_management_controller_identifier_string_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_management_controller_identifier_string (offset_to_write, number_of_bytes_to_write, data, data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_dcmi_sensor_info (ipmi_ctx_t ctx, uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_dcmi_sensor_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_sensor_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_dcmi_sensor_info (sensor_type, entity_id, entity_instance, entity_instance_start, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_power_reading (ipmi_ctx_t ctx, uint8_t mode, uint8_t mode_attributes, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_power_reading_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_power_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_power_reading (mode, mode_attributes, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_power_limit (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_power_limit_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_power_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_power_limit (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_power_limit (ipmi_ctx_t ctx, uint8_t exception_actions, uint16_t power_limit_requested, uint32_t correction_time_limit, uint16_t management_application_statistics_sampling_period, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_power_limit_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_power_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_power_limit (exception_actions, power_limit_requested, correction_time_limit, management_application_statistics_sampling_period, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_activate_deactivate_power_limit (ipmi_ctx_t ctx, uint8_t power_limit_activation, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_activate_deactivate_power_limit_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_activate_deactivate_power_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_activate_deactivate_power_limit (power_limit_activation, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_thermal_limit (ipmi_ctx_t ctx, uint8_t entity_id, uint8_t entity_instance, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_thermal_limit_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_thermal_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_thermal_limit (entity_id, entity_instance, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_set_thermal_limit (ipmi_ctx_t ctx, uint8_t entity_id, uint8_t entity_instance, uint8_t temperature_limit, uint8_t exception_actions_log_event_to_sel_only, uint8_t exception_actions_hard_power_off_system_and_log_event, uint16_t exception_time, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_set_thermal_limit_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_set_thermal_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_set_thermal_limit (entity_id, entity_instance, temperature_limit, exception_actions_log_event_to_sel_only, exception_actions_hard_power_off_system_and_log_event, exception_time, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_dcmi_get_temperature_reading (ipmi_ctx_t ctx, uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_dcmi_get_temperature_reading_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_dcmi_get_temperature_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_dcmi_get_temperature_reading (sensor_type, entity_id, entity_instance, entity_instance_start, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_GROUP_EXTENSION_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-device-global-cmds-api.c0000644002055400205540000002432713527331636023623 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-device-global-cmds-api.h" #include "freeipmi/cmds/ipmi-device-global-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_device_id (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_device_id_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_id_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_device_id (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_cold_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_cold_reset_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_cold_reset_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_cold_reset (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_warm_reset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_warm_reset_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_warm_reset_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_warm_reset (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_acpi_power_state (ipmi_ctx_t ctx, uint8_t system_power_state_enumeration, uint8_t set_system_power_state, uint8_t device_power_state_enumeration, uint8_t set_device_power_state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_acpi_power_state_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_acpi_power_state_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_acpi_power_state (system_power_state_enumeration, set_system_power_state, device_power_state_enumeration, set_device_power_state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_acpi_power_state (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_acpi_power_state_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_acpi_power_state_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_acpi_power_state (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_self_test_results (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_self_test_results_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_self_test_results_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_self_test_results (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_device_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if ((FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_device_guid_rs) < 0) && (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_device_guid_format_rs) < 0)) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_guid_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_device_guid (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-event-cmds-api.c0000644002055400205540000001735213527331636022247 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-event-cmds-api.h" #include "freeipmi/cmds/ipmi-event-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_event_receiver (ipmi_ctx_t ctx, uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_event_receiver_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_event_receiver_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_event_receiver (event_receiver_slave_address, event_receiver_lun, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_event_receiver_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_event_receiver_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_event_receiver_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_event_receiver (event_receiver_slave_address, event_receiver_lun, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd_ipmb (ctx, channel_number, slave_address, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_event_receiver (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_event_receiver_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_event_receiver_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_event_receiver (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_platform_event (ipmi_ctx_t ctx, uint8_t *generator_id, uint8_t event_message_format_version, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_type_code, uint8_t event_dir, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_platform_event_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_platform_event_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_platform_event (generator_id, event_message_format_version, sensor_type, sensor_number, event_type_code, event_dir, event_data1, event_data2, event_data3, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.c0000644002055400205540000006125513527331636030167 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-firmware-firewall-command-discovery-cmds-api.h" #include "freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_netfn_support (ipmi_ctx_t ctx, uint8_t channel_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_netfn_support_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_netfn_support_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_netfn_support (channel_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_command_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_command_support_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_command_support_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_command_support (channel_number, net_fn, operation, lun, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_command_sub_function_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if ((FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_command_sub_function_support_specification_errata_rs) < 0) && (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_command_sub_function_support_extension_errata_rs) < 0)) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_command_sub_function_support_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_command_sub_function_support (channel_number, net_fn, lun, command, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_configurable_commands (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_configurable_commands_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_configurable_commands_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_configurable_commands (channel_number, net_fn, operation, lun, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_configurable_command_sub_functions (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_configurable_command_sub_functions_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_configurable_command_sub_functions_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_configurable_command_sub_functions (channel_number, net_fn, lun, command, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_command_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint8_t *enable_disable_bitmask, unsigned int enable_disable_bitmask_len, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_command_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_command_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_command_enables (channel_number, net_fn, operation, lun, enable_disable_bitmask, enable_disable_bitmask_len, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_command_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_command_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_command_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_command_enables (channel_number, net_fn, operation, lun, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_command_sub_function_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_command_sub_function_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_command_sub_function_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_command_sub_function_enables (channel_number, net_fn, lun, command, sub_function_enables1, sub_function_enables2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_command_sub_function_enables_defining_body_code (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint8_t defining_body_code, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_command_sub_function_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_command_sub_function_enables_defining_body_code_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_command_sub_function_enables_defining_body_code (channel_number, net_fn, lun, command, defining_body_code, sub_function_enables1, sub_function_enables2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_command_sub_function_enables_oem_iana (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t oem_iana, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_command_sub_function_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_command_sub_function_enables_oem_iana_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_command_sub_function_enables_oem_iana (channel_number, net_fn, lun, command, oem_iana, sub_function_enables1, sub_function_enables2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_command_sub_function_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_command_sub_function_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_command_sub_function_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_command_sub_function_enables (channel_number, net_fn, lun, command, net_fn_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_oem_netfn_iana_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t net_fn, uint8_t list_index, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_oem_netfn_iana_support_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_oem_netfn_iana_support_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_oem_netfn_iana_support (channel_number, net_fn, list_index, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-fru-inventory-device-cmds-api.c0000644002055400205540000001471513527331636025212 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-inventory-device-cmds-api.c,v 1.20 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-fru-inventory-device-cmds-api.h" #include "freeipmi/cmds/ipmi-fru-inventory-device-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_fru_inventory_area_info (ipmi_ctx_t ctx, uint8_t fru_device_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_fru_inventory_area_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_fru_inventory_area_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_fru_inventory_area_info (fru_device_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_read_fru_data (ipmi_ctx_t ctx, uint8_t fru_device_id, uint16_t fru_inventory_offset_to_read, uint8_t count_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_read_fru_data_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_read_fru_data_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_read_fru_data (fru_device_id, fru_inventory_offset_to_read, count_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_write_fru_data (ipmi_ctx_t ctx, uint8_t fru_device_id, uint16_t fru_inventory_offset_to_write, const void *data_to_write, unsigned int data_to_write_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_write_fru_data_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_write_fru_data_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_write_fru_data (fru_device_id, fru_inventory_offset_to_write, data_to_write, data_to_write_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-inteldcmi-driver-api.c0000644002055400205540000001351013527331636023433 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/driver/ipmi-inteldcmi-driver.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-inteldcmi-driver-api.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" fiid_template_t tmpl_inteldcmi_raw = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int api_inteldcmi_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_INTELDCMI && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ipmi_inteldcmi_cmd (ctx->io.inband.inteldcmi_ctx, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_INTELDCMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_inteldcmi_ctx_errnum (ctx->io.inband.inteldcmi_ctx)); return (-1); } return (0); } int api_inteldcmi_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_INTELDCMI && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ipmi_inteldcmi_cmd_ipmb (ctx->io.inband.inteldcmi_ctx, ctx->target.channel_number, ctx->target.rs_addr, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_INTELDCMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_inteldcmi_ctx_errnum (ctx->io.inband.inteldcmi_ctx)); return (-1); } return (0); } int api_inteldcmi_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_INTELDCMI && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_inteldcmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_inteldcmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_inteldcmi_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_inteldcmi_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_INTELDCMI && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_inteldcmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_inteldcmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_inteldcmi_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-inteldcmi-driver-api.h0000644002055400205540000000323013527331636023436 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTELDCMI_DRIVER_API_H #define IPMI_INTELDCMI_DRIVER_API_H #include #include #include int api_inteldcmi_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_inteldcmi_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_inteldcmi_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_inteldcmi_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_INTELDCMI_DRIVER_API_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-kcs-driver-api.c0000644002055400205540000005624513527331636022257 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/util/ipmi-ipmb-util.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-kcs-driver-api.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" /* achu: I dunno what's a good number, 32 seems good. Similar to the * inband "TIMEOUT", the purpose is to just not hang any user code * trying to do ipmb. You gotta give up at some point. * * achu: On Inventec 5441/Dell Xanadu II 10 seemed too low, so upped it to * 32. * * achu: On Wistron / Dell Poweredge C6220 32 seemed too low, so upped * it to 64. */ #define IPMI_KCS_IPMB_RETRANSMISSION_COUNT 64 #define IPMI_KCS_IPMB_REREAD_COUNT 64 #define IPMI_KCS_IPMB_REREAD_WAIT 5000 fiid_template_t tmpl_kcs_raw = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; static void _api_kcs_dump (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, unsigned int debug_direction, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && pkt && pkt_len && (debug_direction == DEBUG_UTIL_DIRECTION_REQUEST || debug_direction == DEBUG_UTIL_DIRECTION_RESPONSE) && tmpl_cmd); /* Don't cleanup/return an error here. It's just debug code. */ debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, debug_direction, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (tmpl_ipmb_cmd && ((cmd == IPMI_CMD_SEND_MESSAGE && debug_direction == DEBUG_UTIL_DIRECTION_REQUEST) || (cmd == IPMI_CMD_GET_MESSAGE && debug_direction == DEBUG_UTIL_DIRECTION_RESPONSE))) ipmi_dump_kcs_packet_ipmb (STDERR_FILENO, NULL, hdrbuf, NULL, pkt, pkt_len, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd); else ipmi_dump_kcs_packet (STDERR_FILENO, NULL, hdrbuf, NULL, pkt, pkt_len, tmpl_cmd); } static void _api_kcs_dump_rq (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { fiid_field_t *tmpl_cmd = NULL; if ((tmpl_cmd = fiid_obj_template (obj_cmd_rq))) { _api_kcs_dump (ctx, pkt, pkt_len, cmd, net_fn, group_extension, DEBUG_UTIL_DIRECTION_REQUEST, tmpl_cmd, tmpl_ipmb_msg_hdr_rq, ctx->tmpl_ipmb_cmd_rq); fiid_template_free (tmpl_cmd); } } static void _api_kcs_dump_rs (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { fiid_field_t *tmpl_cmd = NULL; if ((tmpl_cmd = fiid_obj_template (obj_cmd_rs))) { _api_kcs_dump (ctx, pkt, pkt_len, cmd, net_fn, group_extension, DEBUG_UTIL_DIRECTION_RESPONSE, tmpl_cmd, tmpl_ipmb_msg_hdr_rs, ctx->tmpl_ipmb_cmd_rs); fiid_template_free (tmpl_cmd); } } static int _kcs_cmd_write (ipmi_ctx_t ctx, uint8_t cmd, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, send_len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && fiid_obj_valid (obj_cmd_rq)); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_hdr_ipmi_kcs (ctx->target.lun, ctx->target.net_fn, ctx->io.inband.rq.obj_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((send_len = assemble_ipmi_kcs_pkt (ctx->io.inband.rq.obj_hdr, obj_cmd_rq, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && send_len) _api_kcs_dump_rq (ctx, pkt, send_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rq); if (ipmi_kcs_write (ctx->io.inband.kcs_ctx, pkt, send_len) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } rv = 0; cleanup: free (pkt); return (rv); } static int _kcs_cmd_read (ipmi_ctx_t ctx, uint8_t cmd, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, read_len; fiid_field_t *tmpl = NULL; int ret, rv = -1; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(tmpl = fiid_obj_template (obj_cmd_rs))) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if ((cmd_len = fiid_template_len_bytes (tmpl)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((read_len = ipmi_kcs_read (ctx->io.inband.kcs_ctx, pkt, pkt_len)) < 0) { API_KCS_ERRNUM_TO_API_ERRNUM (ctx, ipmi_kcs_ctx_errnum (ctx->io.inband.kcs_ctx)); goto cleanup; } if (!read_len) { API_SET_ERRNUM (ctx, IPMI_ERR_SYSTEM_ERROR); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && read_len) _api_kcs_dump_rs (ctx, pkt, read_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_kcs_pkt (pkt, read_len, ctx->io.inband.rs.obj_hdr, obj_cmd_rs, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* IPMI didn't return enough data back to you */ if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_IPMI_ERROR); goto cleanup; } rv = 0; cleanup: free (pkt); fiid_template_free (tmpl); return (rv); } int api_kcs_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint64_t val; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } if (_kcs_cmd_write (ctx, cmd, group_extension, obj_cmd_rq) < 0) return (-1); if (_kcs_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0) return (-1); return (0); } static int _api_kcs_ipmb_send (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq) { struct ipmi_ctx_target target_save; uint8_t buf[IPMI_MAX_PKT_LEN]; fiid_obj_t obj_ipmb_msg_hdr_rq = NULL; fiid_obj_t obj_ipmb_msg_rq = NULL; fiid_obj_t obj_send_cmd_rs = NULL; int len, ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1); if (!(obj_ipmb_msg_hdr_rq = fiid_obj_create (tmpl_ipmb_msg_hdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_ipmb_msg_rq = fiid_obj_create (tmpl_ipmb_msg))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_send_cmd_rs = fiid_obj_create (tmpl_cmd_send_message_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_ipmb_msg_hdr (ctx->target.rs_addr, ctx->target.net_fn, ctx->target.lun, IPMI_SLAVE_ADDRESS_BMC, IPMI_BMC_IPMB_LUN_BMC, ctx->io.inband.rq_seq, obj_ipmb_msg_hdr_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (assemble_ipmi_ipmb_msg (obj_ipmb_msg_hdr_rq, obj_cmd_rq, obj_ipmb_msg_rq, IPMI_INTERFACE_FLAGS_DEFAULT) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((len = fiid_obj_get_all (obj_ipmb_msg_rq, buf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_ipmb_msg_rq); goto cleanup; } /* send_message will send to the BMC, so clear out target information */ memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; ret = ipmi_cmd_send_message (ctx, target_save.channel_number, IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED, IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED, IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING, buf, len, obj_send_cmd_rs); /* restore target info */ memcpy (&ctx->target, &target_save, sizeof (target_save)); if (ret < 0) { /* assume these mean can't send message, bad slave address, etc. */ if (ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION) == 1 || ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR) == 1 || ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_send_cmd_rs); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_hdr_rq); fiid_obj_destroy (obj_ipmb_msg_rq); fiid_obj_destroy (obj_send_cmd_rs); return (rv); } static int _api_kcs_ipmb_recv (ipmi_ctx_t ctx, fiid_obj_t obj_ipmb_msg_hdr_rs, fiid_obj_t obj_ipmb_msg_trlr, fiid_obj_t obj_cmd_rs) { struct ipmi_ctx_target target_save; uint8_t buf[IPMI_MAX_PKT_LEN]; fiid_obj_t obj_ipmb_msg_rs = NULL; fiid_obj_t obj_get_cmd_rs = NULL; int len, ret, rv = -1; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && fiid_obj_valid (obj_ipmb_msg_hdr_rs) && fiid_obj_valid (obj_ipmb_msg_trlr) && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (!(obj_ipmb_msg_rs = fiid_obj_create (tmpl_ipmb_msg))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_get_cmd_rs = fiid_obj_create (tmpl_cmd_get_message_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* get_message will send to the BMC, so clear out target information */ memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; ret = ipmi_cmd_get_message (ctx, obj_get_cmd_rs); /* restore target info */ memcpy (&ctx->target, &target_save, sizeof (target_save)); if (ret < 0) { if (ipmi_check_completion_code (obj_get_cmd_rs, IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_get_cmd_rs); goto cleanup; } if ((len = fiid_obj_get_data (obj_get_cmd_rs, "message_data", buf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_get_cmd_rs); goto cleanup; } if (fiid_obj_set_all (obj_ipmb_msg_rs, buf, len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_ipmb_msg_rs); goto cleanup; } if (unassemble_ipmi_ipmb_msg (obj_ipmb_msg_rs, obj_ipmb_msg_hdr_rs, obj_cmd_rs, obj_ipmb_msg_trlr, intf_flags) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_rs); fiid_obj_destroy (obj_get_cmd_rs); return (rv); } int api_kcs_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_ipmb_msg_hdr_rs = NULL; fiid_obj_t obj_ipmb_msg_trlr = NULL; unsigned retransmission_count = 0; unsigned reread_count = 0; int ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (!(obj_ipmb_msg_hdr_rs = fiid_obj_create (tmpl_ipmb_msg_hdr_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_ipmb_msg_trlr = fiid_obj_create (tmpl_ipmb_msg_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* for debugging */ ctx->tmpl_ipmb_cmd_rq = fiid_obj_template (obj_cmd_rq); ctx->tmpl_ipmb_cmd_rs = fiid_obj_template (obj_cmd_rs); if (_api_kcs_ipmb_send (ctx, obj_cmd_rq) < 0) goto cleanup; while (1) { if (_api_kcs_ipmb_recv (ctx, obj_ipmb_msg_hdr_rs, obj_ipmb_msg_trlr, obj_cmd_rs) < 0) { if (ctx->errnum == IPMI_ERR_MESSAGE_TIMEOUT) { reread_count++; if (reread_count > IPMI_KCS_IPMB_REREAD_COUNT) { API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); goto cleanup; } /* Wait a little bit to avoid spinning and killing the * controller. Observed on the Quanta QSSC-S4R/Appro * GB812X-CN that when bridging FRU reads, this allowed * records to be read more successfully. */ usleep (IPMI_KCS_IPMB_REREAD_WAIT); continue; } goto cleanup; } if ((ret = ipmi_ipmb_check_rq_seq (obj_ipmb_msg_hdr_rs, ctx->io.inband.rq_seq)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* if it's the wrong rq_seq, get another packet */ if (!ret) continue; if ((ret = ipmi_ipmb_check_checksum (IPMI_SLAVE_ADDRESS_BMC, obj_ipmb_msg_hdr_rs, obj_cmd_rs, obj_ipmb_msg_trlr)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* if the checksum is wrong, assume an error and resend */ if (!ret) { retransmission_count++; if (retransmission_count > IPMI_KCS_IPMB_RETRANSMISSION_COUNT) { API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); goto cleanup; } ctx->io.inband.rq_seq = ((ctx->io.inband.rq_seq) + 1) % (IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX + 1); if (_api_kcs_ipmb_send (ctx, obj_cmd_rq) < 0) goto cleanup; continue; } break; } rv = 0; cleanup: ctx->io.inband.rq_seq = ((ctx->io.inband.rq_seq) + 1) % (IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX + 1); fiid_obj_destroy (obj_ipmb_msg_hdr_rs); fiid_obj_destroy (obj_ipmb_msg_trlr); fiid_template_free (ctx->tmpl_ipmb_cmd_rq); ctx->tmpl_ipmb_cmd_rq = NULL; fiid_template_free (ctx->tmpl_ipmb_cmd_rs); ctx->tmpl_ipmb_cmd_rs = NULL; return (rv); } int api_kcs_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_kcs_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_kcs_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_kcs_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_kcs_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_KCS && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_kcs_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_kcs_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_kcs_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-kcs-driver-api.h0000644002055400205540000000340713527331636022254 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_KCS_DRIVER_API_H #define IPMI_KCS_DRIVER_API_H #include #include #include /* High level calls */ /* BMC treats "write followed by a read" as one transaction. It is highly recommended to use ipmi_kcs_cmd instead. Otherwise make sure you check the return status of write before calling read. */ int api_kcs_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_kcs_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_kcs_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_kcs_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_KCS_DRIVER_API_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-lan-cmds-api.c0000644002055400205540000050566413527331636021710 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-lan-cmds-api.h" #include "freeipmi/cmds/ipmi-lan-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-lan-configuration-parameters-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_lan_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters (channel_number, parameter_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_set_in_progress (channel_number, state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t callback_level_none, uint8_t callback_level_md2, uint8_t callback_level_md5, uint8_t callback_level_straight_password, uint8_t callback_level_oem_proprietary, uint8_t user_level_none, uint8_t user_level_md2, uint8_t user_level_md5, uint8_t user_level_straight_password, uint8_t user_level_oem_proprietary, uint8_t operator_level_none, uint8_t operator_level_md2, uint8_t operator_level_md5, uint8_t operator_level_straight_password, uint8_t operator_level_oem_proprietary, uint8_t admin_level_none, uint8_t admin_level_md2, uint8_t admin_level_md5, uint8_t admin_level_straight_password, uint8_t admin_level_oem_proprietary, uint8_t oem_level_none, uint8_t oem_level_md2, uint8_t oem_level_md5, uint8_t oem_level_straight_password, uint8_t oem_level_oem_proprietary, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_authentication_type_enables (channel_number, callback_level_none, callback_level_md2, callback_level_md5, callback_level_straight_password, callback_level_oem_proprietary, user_level_none, user_level_md2, user_level_md5, user_level_straight_password, user_level_oem_proprietary, operator_level_none, operator_level_md2, operator_level_md5, operator_level_straight_password, operator_level_oem_proprietary, admin_level_none, admin_level_md2, admin_level_md5, admin_level_straight_password, admin_level_oem_proprietary, oem_level_none, oem_level_md2, oem_level_md5, oem_level_straight_password, oem_level_oem_proprietary, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ip_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ip_address (channel_number, ip_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t ip_address_source, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ip_address_source (channel_number, ip_address_source, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_mac_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_mac_address (channel_number, mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t subnet_mask, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_subnet_mask (channel_number, subnet_mask, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t time_to_live, uint8_t flags, uint8_t type_of_service, uint8_t precedence, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv4_header_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv4_header_parameters (channel_number, time_to_live, flags, type_of_service, precedence, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t primary_rmcp_port_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_primary_rmcp_port_number_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (channel_number, primary_rmcp_port_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t secondary_rmcp_port_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (channel_number, secondary_rmcp_port_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bmc_generated_gratuitous_arps, uint8_t bmc_generated_arp_responses, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (channel_number, bmc_generated_gratuitous_arps, bmc_generated_arp_responses, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t gratuitous_arp_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (channel_number, gratuitous_arp_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ip_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_default_gateway_address (channel_number, ip_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_mac_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_default_gateway_mac_address (channel_number, mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ip_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_backup_gateway_address (channel_number, ip_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_mac_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (channel_number, mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_community_string (ipmi_ctx_t ctx, uint8_t channel_number, const char *community_string, unsigned int community_string_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_community_string_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_community_string (channel_number, community_string, community_string_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t destination_type, uint8_t alert_acknowledge, uint8_t alert_acknowledge_timeout, uint8_t retries, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_destination_type_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_destination_type (channel_number, destination_selector, destination_type, alert_acknowledge, alert_acknowledge_timeout, retries, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t gateway_selector, uint32_t alerting_ip_address, uint64_t alerting_mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_destination_addresses (channel_number, destination_selector, gateway_selector, alerting_ip_address, alerting_mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t vlan_id, uint8_t vlan_id_enable, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_vlan_id (channel_number, vlan_id, vlan_id_enable, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx, uint8_t channel_number, uint32_t vlan_priority, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_vlan_priority (channel_number, vlan_priority, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t maximum_privilege_for_cipher_suite_1, uint8_t maximum_privilege_for_cipher_suite_2, uint8_t maximum_privilege_for_cipher_suite_3, uint8_t maximum_privilege_for_cipher_suite_4, uint8_t maximum_privilege_for_cipher_suite_5, uint8_t maximum_privilege_for_cipher_suite_6, uint8_t maximum_privilege_for_cipher_suite_7, uint8_t maximum_privilege_for_cipher_suite_8, uint8_t maximum_privilege_for_cipher_suite_9, uint8_t maximum_privilege_for_cipher_suite_10, uint8_t maximum_privilege_for_cipher_suite_11, uint8_t maximum_privilege_for_cipher_suite_12, uint8_t maximum_privilege_for_cipher_suite_13, uint8_t maximum_privilege_for_cipher_suite_14, uint8_t maximum_privilege_for_cipher_suite_15, uint8_t maximum_privilege_for_cipher_suite_16, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (channel_number, maximum_privilege_for_cipher_suite_1, maximum_privilege_for_cipher_suite_2, maximum_privilege_for_cipher_suite_3, maximum_privilege_for_cipher_suite_4, maximum_privilege_for_cipher_suite_5, maximum_privilege_for_cipher_suite_6, maximum_privilege_for_cipher_suite_7, maximum_privilege_for_cipher_suite_8, maximum_privilege_for_cipher_suite_9, maximum_privilege_for_cipher_suite_10, maximum_privilege_for_cipher_suite_11, maximum_privilege_for_cipher_suite_12, maximum_privilege_for_cipher_suite_13, maximum_privilege_for_cipher_suite_14, maximum_privilege_for_cipher_suite_15, maximum_privilege_for_cipher_suite_16, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_disabled_event_message, uint8_t bad_password_threshold_number, uint16_t attempt_count_reset_interval, uint16_t user_lockout_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_bad_password_threshold (channel_number, user_disabled_event_message, bad_password_threshold_number, attempt_count_reset_interval, user_lockout_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t enables, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (channel_number, enables, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t traffic_class, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class (channel_number, traffic_class, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t static_hop_limit, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit (channel_number, static_hop_limit, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_header_flow_label (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t flow_label, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_header_flow_label (channel_number, flow_label, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t set_selector, uint8_t source, uint8_t enable, uint8_t address[IPMI_IPV6_BYTES], uint8_t address_prefix_length, uint8_t address_status, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_addresses_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_addresses (channel_number, set_selector, source, enable, address, address_prefix_length, address_status, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t enable_static_router_address, uint8_t enable_dynamic_router_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (channel_number, enable_static_router_address, enable_dynamic_router_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (channel_number, router_ip_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (channel_number, router_mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (channel_number, prefix_length, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (channel_number, prefix_value, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (channel_number, router_ip_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (channel_number, router_mac_address, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (channel_number, prefix_length, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_lan_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (channel_number, prefix_value, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_get_lan_configuration_parameters_common (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rs_expected); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_lan_configuration_parameters (channel_number, get_parameter, parameter_selector, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_lan_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_set_in_progress_rs, IPMI_LAN_CONFIGURATION_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_authentication_type_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs, IPMI_LAN_CONFIGURATION_PARAMETER_AUTHENTICATION_TYPE_SUPPORT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_authentication_type_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs, IPMI_LAN_CONFIGURATION_PARAMETER_AUTHENTICATION_TYPE_ENABLES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ip_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ip_address_source (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS_SOURCE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_subnet_mask (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs, IPMI_LAN_CONFIGURATION_PARAMETER_SUBNET_MASK) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv4_header_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv4_header_parameters_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV4_HEADER_PARAMETERS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_primary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_primary_rmcp_port_number_rs, IPMI_LAN_CONFIGURATION_PARAMETER_PRIMARY_RMCP_PORT_NUMBER) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number_rs, IPMI_LAN_CONFIGURATION_PARAMETER_SECONDARY_RMCP_PORT_NUMBER) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_bmc_generated_arp_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs, IPMI_LAN_CONFIGURATION_PARAMETER_BMC_GENERATED_ARP_CONTROL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_gratuitous_arp_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs, IPMI_LAN_CONFIGURATION_PARAMETER_GRATUITOUS_ARP_INTERVAL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_default_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_default_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_backup_gateway_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_community_string (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_community_string_rs, IPMI_LAN_CONFIGURATION_PARAMETER_COMMUNITY_STRING) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_number_of_destinations (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs, IPMI_LAN_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_destination_type (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_destination_type_rs, IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_TYPE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_destination_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs, IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_ADDRESSES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_vlan_id (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs, IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_ID) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_vlan_priority (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs, IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_PRIORITY) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs, IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_ENTRY_SUPPORT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs, IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_ENTRIES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs, IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_PRIVILEGE_LEVELS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_bad_password_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs, IPMI_LAN_CONFIGURATION_PARAMETER_BAD_PASSWORD_THRESHOLD) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_support_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_IPV4_SUPPORT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_IPV4_ADDRESSING_ENABLES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_TRAFFIC_CLASS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_HOP_LIMIT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_header_flow_label (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_header_flow_label_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_FLOW_LABEL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_status (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_status_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATUS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_addresses (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_addresses_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ADDRESSES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_STATIC_DUID_STORAGE_LENGTH) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_STATIC_DUIDS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_DYNAMIC_DUID_STORAGE_LENGTH) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_DYNAMIC_DUIDS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_TIMING_CONFIGURATION_SUPPORT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DHCPV6_TIMING_AND_CONFIGURATION) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_ROUTER_ADDRESS_CONFIGURATION_CONTROL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_IP_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_LENGTH) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_VALUE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_IP_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_LENGTH) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_VALUE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets_rs, IPMI_LAN_CONFIGURATION_PARAMETER_NUMBER_OF_DYNAMIC_ROUTER_INFO_SETS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_IP_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_MAC_ADDRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_PREFIX_LENGTH) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_INFO_PREFIX_VALUE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_DYNAMIC_ROUTER_RECEIVED_HOP_LIMIT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_NEIGHBOR_DISCOVERY_SLAAC_TIMING_CONFIGURATION_SUPPORT) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_lan_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_rs, IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_NEIGHBOR_DISCOVERY_SLAAC_TIMING_CONFIGURATION) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_suspend_bmc_arps (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t gratuitous_arp_suspend, uint8_t arp_response_suspend, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_suspend_bmc_arps_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_suspend_bmc_arps_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_suspend_bmc_arps (channel_number, gratuitous_arp_suspend, arp_response_suspend, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_ip_udp_rmcp_statistics (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t clear_all_statistics, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_ip_udp_rmcp_statistics_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_ip_udp_rmcp_statistics_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_ip_udp_rmcp_statistics (channel_number, clear_all_statistics, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-lan-interface-api.c0000644002055400205540000003055413527331636022711 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-lan-session-common.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" fiid_template_t tmpl_lan_raw = { { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int api_lan_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { uint8_t authentication_type; unsigned int internal_workaround_flags = 0; int ret; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); api_lan_cmd_get_session_parameters (ctx, &authentication_type, &internal_workaround_flags); if (ctx->flags & IPMI_FLAGS_NOSESSION) ret = api_lan_cmd_wrapper (ctx, internal_workaround_flags, ctx->target.lun, ctx->target.net_fn, IPMI_AUTHENTICATION_TYPE_NONE, 0, NULL, 0, &(ctx->io.outofband.rq_seq), NULL, 0, obj_cmd_rq, obj_cmd_rs); else /* if auth type NONE, still pass password. Needed for * check_unexpected_authcode workaround */ ret = api_lan_cmd_wrapper (ctx, internal_workaround_flags, ctx->target.lun, ctx->target.net_fn, authentication_type, 1, &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.session_id, &(ctx->io.outofband.rq_seq), ctx->io.outofband.password, IPMI_1_5_MAX_PASSWORD_LENGTH, obj_cmd_rq, obj_cmd_rs); return (ret); } int api_lan_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); /* if auth type NONE, still pass password. Needed for * check_unexpected_authcode workaround */ return (api_lan_cmd_wrapper_ipmb (ctx, obj_cmd_rq, obj_cmd_rs)); } int api_lan_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && ctx->io.outofband.sockfd && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_lan_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_lan_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && ctx->io.outofband.sockfd && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_lan_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_lan_2_0_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { uint8_t payload_authenticated; uint8_t payload_encrypted; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); api_lan_2_0_cmd_get_session_parameters (ctx, &payload_authenticated, &payload_encrypted); return (api_lan_2_0_cmd_wrapper (ctx, 0, ctx->target.lun, ctx->target.net_fn, IPMI_PAYLOAD_TYPE_IPMI, payload_authenticated, payload_encrypted, NULL, &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.managed_system_session_id, &(ctx->io.outofband.rq_seq), ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, ctx->io.outofband.confidentiality_key_ptr, ctx->io.outofband.confidentiality_key_len, strlen (ctx->io.outofband.password) ? ctx->io.outofband.password : NULL, strlen (ctx->io.outofband.password), obj_cmd_rq, obj_cmd_rs)); } int api_lan_2_0_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); return (api_lan_2_0_cmd_wrapper_ipmb (ctx, obj_cmd_rq, obj_cmd_rs)); } int api_lan_2_0_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_lan_2_0_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_lan_2_0_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_lan_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_lan_2_0_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-lan-interface-api.h0000644002055400205540000000443313527331636022713 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_INTERFACE_API_H #define IPMI_LAN_INTERFACE_API_H #include #include #include int api_lan_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_lan_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_lan_2_0_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_2_0_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_2_0_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_lan_2_0_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_LAN_INTERFACE_API_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-lan-session-common.c0000644002055400205540000046537313527331636023166 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-rmcpplus-status-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-cipher-suite-util.h" #include "freeipmi/util/ipmi-lan-util.h" #include "freeipmi/util/ipmi-outofband-util.h" #include "freeipmi/util/ipmi-rmcpplus-util.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-lan-session-common.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" #define IPMI_LAN_BACKOFF_COUNT 2 struct socket_to_close { int fd; struct socket_to_close *next; }; #define IPMI_PKT_PAD 1024 void api_lan_cmd_get_session_parameters (ipmi_ctx_t ctx, uint8_t *authentication_type, unsigned int *internal_workaround_flags) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && authentication_type && internal_workaround_flags); (*authentication_type) = IPMI_AUTHENTICATION_TYPE_NONE; (*internal_workaround_flags) = 0; if (ctx->io.outofband.per_msg_auth_disabled) { (*authentication_type) = IPMI_AUTHENTICATION_TYPE_NONE; if (ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE) (*internal_workaround_flags) |= IPMI_INTERNAL_WORKAROUND_FLAGS_CHECK_UNEXPECTED_AUTHCODE; } else (*authentication_type) = ctx->io.outofband.authentication_type; } void api_lan_2_0_cmd_get_session_parameters (ipmi_ctx_t ctx, uint8_t *payload_authenticated, uint8_t *payload_encrypted) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && payload_authenticated && payload_encrypted); if (ctx->io.outofband.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) (*payload_authenticated) = IPMI_PAYLOAD_FLAG_UNAUTHENTICATED; else (*payload_authenticated) = IPMI_PAYLOAD_FLAG_AUTHENTICATED; if (ctx->io.outofband.confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) (*payload_encrypted) = IPMI_PAYLOAD_FLAG_UNENCRYPTED; else (*payload_encrypted) = IPMI_PAYLOAD_FLAG_ENCRYPTED; } static int _session_timed_out (ipmi_ctx_t ctx) { struct timeval current; struct timeval session_timeout; struct timeval session_timeout_len; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0)); session_timeout_len.tv_sec = ctx->io.outofband.session_timeout / 1000; session_timeout_len.tv_usec = (ctx->io.outofband.session_timeout - (session_timeout_len.tv_sec * 1000)) * 1000; timeradd (&(ctx->io.outofband.last_received), &session_timeout_len, &session_timeout); if (gettimeofday (¤t, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } return (timercmp (¤t, &session_timeout, >)); } /* return 1 on continue, 0 if timeout already happened, -1 on error */ static int _calculate_timeout (ipmi_ctx_t ctx, unsigned int retransmission_count, struct timeval *recv_starttime, struct timeval *timeout) { struct timeval current; struct timeval session_timeout; struct timeval session_timeout_len; struct timeval session_timeout_val; struct timeval retransmission_timeout; struct timeval retransmission_timeout_len; struct timeval retransmission_timeout_val; struct timeval already_timedout_check; unsigned int retransmission_timeout_multiplier; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && recv_starttime && timeout); if (gettimeofday (¤t, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } session_timeout_len.tv_sec = ctx->io.outofband.session_timeout / 1000; session_timeout_len.tv_usec = (ctx->io.outofband.session_timeout - (session_timeout_len.tv_sec * 1000)) * 1000; timeradd (recv_starttime, &session_timeout_len, &session_timeout); timersub (&session_timeout, recv_starttime, &session_timeout_val); retransmission_timeout_multiplier = (retransmission_count / IPMI_LAN_BACKOFF_COUNT) + 1; retransmission_timeout_len.tv_sec = (retransmission_timeout_multiplier * ctx->io.outofband.retransmission_timeout) / 1000; retransmission_timeout_len.tv_usec = ((retransmission_timeout_multiplier * ctx->io.outofband.retransmission_timeout) - (retransmission_timeout_len.tv_sec * 1000)) * 1000; timeradd (&ctx->io.outofband.last_send, &retransmission_timeout_len, &retransmission_timeout); timersub (&retransmission_timeout, recv_starttime, &retransmission_timeout_val); if (timercmp (&retransmission_timeout_val, &session_timeout_val, <)) { timeout->tv_sec = retransmission_timeout_val.tv_sec; timeout->tv_usec = retransmission_timeout_val.tv_usec; } else { timeout->tv_sec = session_timeout_val.tv_sec; timeout->tv_usec = session_timeout_val.tv_usec; } /* See portability issue below regarding ECONNRESET and ECONNREFUSED * to see why there could be two calls to this in a row, and thus * this check is necessary */ timersub (¤t, recv_starttime, &already_timedout_check); if (timercmp (timeout, &already_timedout_check, <)) return (0); return (1); } static int _api_lan_recvfrom (ipmi_ctx_t ctx, void *pkt, unsigned int pkt_len, unsigned int retransmission_count, struct timeval *recv_starttime) { int status = 0; int recv_len; int ret; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && pkt && pkt_len && recv_starttime); if (ctx->io.outofband.retransmission_timeout) { struct timeval timeout; struct pollfd pfd_read; int timeoutms; if ((ret = _calculate_timeout (ctx, retransmission_count, recv_starttime, &timeout)) < 0) return (-1); if (!ret) return (0); pfd_read.fd = ctx->io.outofband.sockfd; pfd_read.events = POLLIN; pfd_read.revents = 0; /* XXX: potential overflow scenarios? */ timeoutms = (timeout.tv_sec * 1000) + (timeout.tv_usec / 1000); if ((status = poll (&pfd_read, 1, timeoutms)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!status) return (0); /* resend the request */ } do { /* For receive side, ipmi_lan_recvfrom and * ipmi_rmcpplus_recvfrom are identical. So we just use * ipmi_lan_recvfrom for both. * * In event of future change, should use util functions * ipmi_is_ipmi_1_5_packet or ipmi_is_ipmi_2_0_packet * appropriately. */ recv_len = ipmi_lan_recvfrom (ctx->io.outofband.sockfd, pkt, pkt_len, 0, NULL, NULL); } while (recv_len < 0 && errno == EINTR); return (recv_len); } static void _api_lan_dump_rq (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { fiid_field_t *tmpl_cmd = NULL; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && pkt && pkt_len && fiid_obj_valid (obj_cmd_rq)); /* Don't cleanup/return an error here. It's just debug code. */ if ((tmpl_cmd = fiid_obj_template (obj_cmd_rq))) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; debug_hdr_cmd (DEBUG_UTIL_TYPE_IPMI_1_5, DEBUG_UTIL_DIRECTION_REQUEST, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ctx->tmpl_ipmb_cmd_rq) ipmi_dump_lan_packet_ipmb (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, pkt, pkt_len, tmpl_lan_msg_hdr_rq, tmpl_cmd, tmpl_ipmb_msg_hdr_rq, ctx->tmpl_ipmb_cmd_rq); else ipmi_dump_lan_packet (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, pkt, pkt_len, tmpl_lan_msg_hdr_rq, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static void _api_lan_dump_rs (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { fiid_field_t *tmpl_cmd = NULL; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && pkt && pkt_len && fiid_obj_valid (obj_cmd_rs)); /* Don't cleanup/return an error here. It's just debug code. */ if ((tmpl_cmd = fiid_obj_template (obj_cmd_rs))) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; debug_hdr_cmd (DEBUG_UTIL_TYPE_IPMI_1_5, DEBUG_UTIL_DIRECTION_RESPONSE, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); ipmi_dump_lan_packet (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, pkt, pkt_len, tmpl_lan_msg_hdr_rs, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static int _ipmi_check_session_sequence_number (ipmi_ctx_t ctx, uint32_t session_sequence_number) { int rv = 0; /* achu: This algorithm is more or less from Appendix A of the IPMI * spec. It may not be entirely necessary, since the requester * sequence number puts packets into lock-step mode. Oh well. * * I know that technically I could remove a lot of code here if I * just let unsigned ints be unsigned ints (i.e. 0x00 - 0xff = 1). * I dunno, I like to see all of the code actually written out b/c * it makes more sense to the casual code reviewer. Maybe I'll * change it later. */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0)); /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The session sequence numbers for IPMI 1.5 are the wrong endian. * So we have to flip the bits to workaround it. */ if (ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER) { uint32_t tmp_session_sequence_number = session_sequence_number; session_sequence_number = ((tmp_session_sequence_number & 0xFF000000) >> 24) | ((tmp_session_sequence_number & 0x00FF0000) >> 8) | ((tmp_session_sequence_number & 0x0000FF00) << 8) | ((tmp_session_sequence_number & 0x000000FF) << 24); } if (ctx->type == IPMI_DEVICE_LAN) { if ((rv = ipmi_check_session_sequence_number_1_5 (session_sequence_number, &(ctx->io.outofband.highest_received_sequence_number), &(ctx->io.outofband.previously_received_list), 0)) < 0) { { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } } else { if ((rv = ipmi_check_session_sequence_number_2_0 (session_sequence_number, &(ctx->io.outofband.highest_received_sequence_number), &(ctx->io.outofband.previously_received_list), 0)) < 0) { { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } } cleanup: return (rv); } static int _api_lan_cmd_send (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, uint8_t authentication_type, uint32_t session_sequence_number, uint32_t session_id, uint8_t rq_seq, const char *password, unsigned int password_len, uint8_t cmd, /* for debug dumping */ uint8_t group_extension, /* for debug dumping */ fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len = 0; int cmd_len = 0; int send_len = 0; int ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && IPMI_BMC_LUN_VALID (lun) && IPMI_NET_FN_VALID (net_fn) && IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) && !(password && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1); if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } /* variable based on authentication, etc. 1024 extra is enough */ pkt_len = cmd_len + IPMI_PKT_PAD; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_rmcp_hdr_ipmi (ctx->io.outofband.rq.obj_rmcp_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, lun, rq_seq, ctx->io.outofband.rq.obj_lan_msg_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_lan_session_hdr (authentication_type, session_sequence_number, session_id, ctx->io.outofband.rq.obj_lan_session_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((send_len = assemble_ipmi_lan_pkt (ctx->io.outofband.rq.obj_rmcp_hdr, ctx->io.outofband.rq.obj_lan_session_hdr, ctx->io.outofband.rq.obj_lan_msg_hdr, obj_cmd_rq, password, password_len, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && send_len) _api_lan_dump_rq (ctx, pkt, send_len, cmd, net_fn, group_extension, obj_cmd_rq); do { ret = ipmi_lan_sendto (ctx->io.outofband.sockfd, pkt, send_len, 0, ctx->io.outofband.remote_host, ctx->io.outofband.remote_host_len); } while (ret < 0 && errno == EINTR); if (ret < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (gettimeofday (&ctx->io.outofband.last_send, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } rv = 0; cleanup: free (pkt); return (rv); } /* return receive length on success, 0 on no packet, -1 on error */ static int _api_lan_cmd_recv (ipmi_ctx_t ctx, void *pkt, unsigned int pkt_len, unsigned int retransmission_count) { struct timeval recv_starttime; int recv_len = 0; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && pkt && pkt_len); if (gettimeofday (&recv_starttime, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } recv_len = _api_lan_recvfrom (ctx, pkt, pkt_len, retransmission_count, &recv_starttime); if (!recv_len) return (0); /* resend the request */ /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * port denied errors up to the client for UDP responses (i.e. you * need to timeout). But on some OSes (it seems Windows), the * behavior is to return port denied errors up to the user for UDP * responses via ECONNRESET or ECONNREFUSED. * * If this were just the case, we could return or handle errors * properly and move on. However, it's not the case. * * According to Ipmitool, on some motherboards, both the OS and the * BMC are capable of responding to an IPMI request. That means you * can get an ECONNRESET or ECONNREFUSED, then later on, get your * real IPMI response. * * Our solution is copied from Ipmitool, we'll ignore some specific * errors and try to read again. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, the recvfrom later on gets the packet we * want. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC (or IPMI disabled, etc.), just do the recvfrom again to * eventually get a timeout, which is the behavior we'd like. */ if (recv_len < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) { recv_len = _api_lan_recvfrom (ctx, pkt, pkt_len, retransmission_count, &recv_starttime); if (!recv_len) return (0); /* resend the request */ } if (recv_len < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } return (recv_len); } /* < 0 - error * == 1 good packet * == 0 bad packet */ static int _api_lan_cmd_wrapper_verify_packet (ipmi_ctx_t ctx, unsigned int internal_workaround_flags, uint8_t authentication_type, int check_authentication_code, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rs) { uint32_t rs_session_id; uint32_t rs_session_sequence_number; uint64_t val; int rv = -1; int ret; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) && !(password && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rs)); if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_lan_session_hdr, "session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_lan_session_hdr); goto cleanup; } rs_session_id = val; if (session_id != rs_session_id) { /* IPMI Workaround (achu) * * Discovered on Tyan S2882 w/ m3289 BMC * * The remote BMC returns zeroes for the session id instead of the * actual session id. To work around this problem, we'll assume the * session id is correct if it is equal to zero. */ if ((ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO) && !rs_session_id) /* you get a second chance - continue on checking */ ; else { /* * IPMI Workaround * * Discovered on Xyratex HB-F8-SRAY * * The session ID is zero if there is an error. So if there * is a bad completion code, we'd rather fall through and * continue. So return "bad packet" if the completion code * is < 0 or 1. */ ret = ipmi_check_completion_code_success (obj_cmd_rs); if (ret) { rv = 0; goto cleanup; } } } /* IPMI Workaround (achu) * * Discovered on Supermicro X9SCM-iiF, Supermicro X9DRi-F * * Checksums are computed incorrectly. */ if (!(ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK)) { if ((ret = ipmi_lan_check_checksum (ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } } /* IPMI Workaround (achu) * * Discovered on Xyratex HB-F8-SRAY * * For some reason, the authentication code is always blank when * using "Straight Password Key". * * Discovered on Intel Windmill/Quanta Winterfell/Wiwynn Windmill * * Hash is incorrect, unknown why calculation is incorrect. */ if (check_authentication_code && !(ctx->flags & IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE) && !(ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK)) { if ((ret = ipmi_lan_check_session_authentication_code (ctx->io.outofband.rs.obj_lan_session_hdr, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, authentication_type, password, password_len)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* IPMI Workaround (achu) * * Discovered on Dell PowerEdge 2850 * * When per-message authentication is disabled, and we send a * message to a remote machine with auth-type none, the Dell * motherboard will respond with a message with the auth-type used * in the activate session stage and the appropriate authcode. So * here is our second session-authcode check attempt under these * circumstances. */ if ((internal_workaround_flags & IPMI_INTERNAL_WORKAROUND_FLAGS_CHECK_UNEXPECTED_AUTHCODE) && !ret) { if ((ret = ipmi_lan_check_session_authentication_code (ctx->io.outofband.rs.obj_lan_session_hdr, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, authentication_type, password, password_len)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } if (!ret) { rv = 0; goto cleanup; } } if (session_sequence_number) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_lan_session_hdr, "session_sequence_number", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_lan_session_hdr); goto cleanup; } rs_session_sequence_number = val; if ((ret = _ipmi_check_session_sequence_number (ctx, rs_session_sequence_number)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } } if ((ret = ipmi_lan_check_rq_seq (ctx->io.outofband.rs.obj_lan_msg_hdr, (rq_seq) ? *rq_seq : 0)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } rv = 1; cleanup: return (rv); } int api_lan_cmd_wrapper (ipmi_ctx_t ctx, unsigned int internal_workaround_flags, uint8_t lun, uint8_t net_fn, uint8_t authentication_type, int check_authentication_code, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int recv_len, ret, rv = -1; unsigned int retransmission_count = 0; uint8_t pkt[IPMI_MAX_PKT_LEN]; struct socket_to_close *sockets = NULL; uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint64_t val; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && IPMI_BMC_LUN_VALID (lun) && IPMI_NET_FN_VALID (net_fn) && IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) && !(password && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (!ctx->io.outofband.last_received.tv_sec && !ctx->io.outofband.last_received.tv_usec) { if (gettimeofday (&ctx->io.outofband.last_received, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } if (_api_lan_cmd_send (ctx, lun, net_fn, authentication_type, (session_sequence_number) ? *session_sequence_number : 0, session_id, (rq_seq) ? *rq_seq : 0, password, password_len, cmd, /* for debug dumping */ group_extension, /* for debug dumping */ obj_cmd_rq) < 0) goto cleanup; while (1) { if ((ret = _session_timed_out (ctx)) < 0) break; if (ret) { if (ctx->flags & IPMI_FLAGS_NOSESSION) API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); else API_SET_ERRNUM (ctx, IPMI_ERR_SESSION_TIMEOUT); break; } if ((recv_len = _api_lan_cmd_recv (ctx, pkt, IPMI_MAX_PKT_LEN, retransmission_count)) < 0) break; if (!recv_len) { /* ignore timeout, just cleanly close session */ if (internal_workaround_flags & IPMI_INTERNAL_WORKAROUND_FLAGS_CLOSE_SESSION_SKIP_RETRANSMIT) { rv = 0; break; } if (session_sequence_number) (*session_sequence_number)++; if (rq_seq) *rq_seq = ((*rq_seq) + 1) % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); retransmission_count++; /* IPMI Workaround (achu) * * Discovered on Intel Tiger4 (SR870BN4) * * If the reply from a previous Get Session Challenge request is * lost on the network, the following retransmission will make * the BMC confused and it will not respond to future packets. * * The problem seems to exist only when the retransmitted packet * is transmitted from the same source port. Therefore, the fix * is to send the retransmission from a different source port. * So we'll create a new socket, re-bind to an ephemereal port * (guaranteeing us a brand new port), and store this new * socket. * * In the event we need to resend this packet multiple times, we * do not want the chance that old ports will be used again. We * store the old file descriptrs (which are bound to the old * ports) on a list, and close all of them after we have gotten * past the Get Session Challenge phase of the protocol. */ if (internal_workaround_flags & IPMI_INTERNAL_WORKAROUND_FLAGS_GET_SESSION_CHALLENGE) { struct socket_to_close *s; if (!(s = (struct socket_to_close *)malloc (sizeof (struct socket_to_close)))) { API_SET_ERRNUM (ctx, IPMI_ERR_OUT_OF_MEMORY); goto cleanup; } s->fd = ctx->io.outofband.sockfd; s->next = sockets; sockets = s; if ((ctx->io.outofband.sockfd = socket (ctx->io.outofband.srcaddr->sa_family, SOCK_DGRAM, 0)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (bind (ctx->io.outofband.sockfd, ctx->io.outofband.srcaddr, ctx->io.outofband.srcaddr_len) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } if (_api_lan_cmd_send (ctx, lun, net_fn, authentication_type, (session_sequence_number) ? *session_sequence_number : 0, session_id, (rq_seq) ? *rq_seq : 0, password, password_len, cmd, /* for debug dumping */ group_extension, /* for debug dumping */ obj_cmd_rq) < 0) goto cleanup; continue; } /* else received a packet */ /* its ok to use the "request" net_fn, dump code doesn't care */ if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) _api_lan_dump_rs (ctx, pkt, recv_len, cmd, net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_lan_pkt (pkt, recv_len, ctx->io.outofband.rs.obj_rmcp_hdr, ctx->io.outofband.rs.obj_lan_session_hdr, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!ret) continue; if ((ret = _api_lan_cmd_wrapper_verify_packet (ctx, internal_workaround_flags, authentication_type, check_authentication_code, session_sequence_number, session_id, rq_seq, password, password_len, obj_cmd_rs)) < 0) goto cleanup; if (!ret) continue; if (gettimeofday (&(ctx->io.outofband.last_received), NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } rv = 0; break; } cleanup: if (session_sequence_number) (*session_sequence_number)++; if (rq_seq) *rq_seq = ((*rq_seq) + 1) % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); while (sockets) { /* ignore potential error, cleanup path */ close (sockets->fd); sockets = sockets->next; } return (rv); } /* see workaround _ipmi_check_ipmb_out_of_order() regarding obj_rs & obj_rs_errnum pointer */ static int _ipmi_cmd_send_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t *obj_rs, ipmi_errnum_type_t *obj_rs_errnum) { struct ipmi_ctx_target target_save; uint8_t tbuf[IPMI_MAX_PKT_LEN]; fiid_obj_t obj_ipmb_msg_hdr_rq = NULL; fiid_obj_t obj_ipmb_msg_rq = NULL; fiid_obj_t obj_send_cmd_rs = NULL; int len, ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1); (*obj_rs_errnum) = IPMI_ERR_SUCCESS; if (!(obj_ipmb_msg_hdr_rq = fiid_obj_create (tmpl_ipmb_msg_hdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_ipmb_msg_rq = fiid_obj_create (tmpl_ipmb_msg))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_send_cmd_rs = fiid_obj_create (tmpl_cmd_send_message_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_ipmb_msg_hdr (ctx->target.rs_addr, ctx->target.net_fn, ctx->target.lun, IPMI_SLAVE_ADDRESS_BMC, IPMI_BMC_IPMB_LUN_BMC, ctx->io.outofband.rq_seq, obj_ipmb_msg_hdr_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (assemble_ipmi_ipmb_msg (obj_ipmb_msg_hdr_rq, obj_cmd_rq, obj_ipmb_msg_rq, IPMI_INTERFACE_FLAGS_DEFAULT) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((len = fiid_obj_get_all (obj_ipmb_msg_rq, tbuf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_ipmb_msg_rq); goto cleanup; } /* send_message will send to the BMC, so clear out target information */ memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; ret = ipmi_cmd_send_message (ctx, target_save.channel_number, IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED, IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED, IPMI_SEND_MESSAGE_TRACKING_OPERATION_TRACKING_REQUEST, tbuf, len, obj_send_cmd_rs); /* restore target info */ memcpy (&ctx->target, &target_save, sizeof (target_save)); if (ret < 0) { uint64_t cmd; /* Check for potential out of order condition. See * _ipmi_check_ipmb_out_of_order() for more details. * * Basically, we will return success if the completion code is * one in which we would expect another message to arrive. */ if (FIID_OBJ_GET (obj_send_cmd_rs, "cmd", &cmd) == 1) { if (cmd != IPMI_CMD_SEND_MESSAGE && ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_COMMAND_SUCCESS) == 0) { TRACE_MSG_OUT ("accept out-of-order with bad completion code", 0); (*obj_rs_errnum) = ctx->errnum; ctx->errnum = IPMI_ERR_SUCCESS; goto out_of_order_workaround; } } goto cleanup; } out_of_order_workaround: /* "pretend" a request was just sent */ if (gettimeofday (&ctx->io.outofband.last_send, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (obj_rs) { (*obj_rs) = obj_send_cmd_rs; obj_send_cmd_rs = NULL; } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_hdr_rq); fiid_obj_destroy (obj_ipmb_msg_rq); fiid_obj_destroy (obj_send_cmd_rs); return (rv); } static int _ipmi_check_ipmb_out_of_order (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs, fiid_obj_t obj_send_cmd_rs, ipmi_errnum_type_t obj_rs_errnum) { uint8_t buf[IPMI_MAX_PKT_LEN]; uint64_t val; uint8_t cmd_rq; uint8_t cmd_rs; uint8_t send_cmd_rs; int len; /* There is always a small chance that the network response to * the initial ipmb send message could be out-of-ordered with * the "real" response that we want. * * XXX: Add a mechanism to re-dump the full packet? */ if ((len = fiid_obj_get_all (obj_cmd_rs, buf, IPMI_MAX_PKT_LEN)) < 0) return (0); if (!len) return (0); /* get "cmd" for the response. Don't use fiid_obj_get(), b/c this could be a raw packet */ cmd_rs = buf[0]; /* if cmd_rs isn't send message, assume things weren't out of order * and all is good */ if (cmd_rs != IPMI_CMD_SEND_MESSAGE) return (0); /* else, we've probably got an out of order */ if ((len = fiid_obj_get_all (obj_cmd_rq, buf, IPMI_MAX_PKT_LEN)) < 0) return (0); if (!len) return (0); cmd_rq = buf[0]; if ((len = fiid_obj_get_all (obj_send_cmd_rs, buf, IPMI_MAX_PKT_LEN)) < 0) return (0); if (!len) return (0); send_cmd_rs = buf[0]; /* if the command sent in the request is the same as the command * returned in the send message response, assume we've got an out of * order */ if (cmd_rq != send_cmd_rs) return (0); /* this is the one function we can't fail */ if (fiid_obj_set_all (obj_cmd_rs, buf, len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } TRACE_MSG_OUT ("reversed obj_cmd responses", 0); if (obj_rs_errnum != IPMI_ERR_SUCCESS) { API_SET_ERRNUM (ctx, obj_rs_errnum); return (-1); } return (0); } int api_lan_cmd_wrapper_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int recv_len, ret, rv = -1; unsigned int retransmission_count = 0; uint8_t pkt[IPMI_MAX_PKT_LEN]; uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint8_t rq_seq_orig; uint64_t val; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; fiid_obj_t obj_send_rs = NULL; ipmi_errnum_type_t obj_rs_errnum; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } /* for debugging */ ctx->tmpl_ipmb_cmd_rq = fiid_obj_template (obj_cmd_rq); ctx->tmpl_ipmb_cmd_rs = fiid_obj_template (obj_cmd_rs); /* ipmb response packet will use the request sequence number from * the earlier packet. Save it for verification. */ rq_seq_orig = ctx->io.outofband.rq_seq; if (_ipmi_cmd_send_ipmb (ctx, obj_cmd_rq, &obj_send_rs, &obj_rs_errnum) < 0) goto cleanup; while (1) { uint8_t authentication_type; unsigned int internal_workaround_flags = 0; if ((ret = _session_timed_out (ctx)) < 0) break; if (ret) { API_SET_ERRNUM (ctx, IPMI_ERR_SESSION_TIMEOUT); break; } if ((recv_len = _api_lan_cmd_recv (ctx, pkt, IPMI_MAX_PKT_LEN, retransmission_count)) < 0) break; if (!recv_len) { retransmission_count++; /* don't increment sequence numbers, will be done in _ipmi_cmd_send_ipmb */ /* ipmb response packet will use the request sequence number from * the earlier packet. Save it for verification. */ rq_seq_orig = ctx->io.outofband.rq_seq; if (obj_send_rs) { fiid_obj_destroy (obj_send_rs); obj_send_rs = NULL; } if (_ipmi_cmd_send_ipmb (ctx, obj_cmd_rq, &obj_send_rs, &obj_rs_errnum) < 0) goto cleanup; continue; } /* else received a packet */ /* its ok to use the "request" net_fn, dump code doesn't care */ if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) _api_lan_dump_rs (ctx, pkt, recv_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_lan_pkt (pkt, recv_len, ctx->io.outofband.rs.obj_rmcp_hdr, ctx->io.outofband.rs.obj_lan_session_hdr, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!ret) continue; api_lan_cmd_get_session_parameters (ctx, &authentication_type, &internal_workaround_flags); if ((ret = _api_lan_cmd_wrapper_verify_packet (ctx, internal_workaround_flags, authentication_type, 1, /* always check auth code at this point */ &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.session_id, &rq_seq_orig, ctx->io.outofband.password, IPMI_1_5_MAX_PASSWORD_LENGTH, obj_cmd_rs)) < 0) goto cleanup; if (!ret) continue; if (gettimeofday (&(ctx->io.outofband.last_received), NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_check_ipmb_out_of_order (ctx, obj_cmd_rq, obj_cmd_rs, obj_send_rs, obj_rs_errnum) < 0) goto cleanup; rv = 0; break; } cleanup: ctx->io.outofband.session_sequence_number++; /* rq_seq already incremented via _ipmi_cmd_send_ipmb call */ fiid_template_free (ctx->tmpl_ipmb_cmd_rq); ctx->tmpl_ipmb_cmd_rq = NULL; fiid_template_free (ctx->tmpl_ipmb_cmd_rs); ctx->tmpl_ipmb_cmd_rs = NULL; fiid_obj_destroy (obj_send_rs); return (rv); } static int _api_lan_rq_seq_init (ipmi_ctx_t ctx) { unsigned int seedp; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->io.outofband.sockfd && (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0)); /* Random number generation */ seedp = (unsigned int) clock () + (unsigned int) time (NULL); srand (seedp); ctx->io.outofband.rq_seq = (uint8_t)((double)(IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX) * (rand ()/(RAND_MAX + 1.0))); return (0); } int api_lan_open_session (ipmi_ctx_t ctx) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t authentication_type; uint32_t temp_session_id = 0; uint8_t challenge_string[IPMI_CHALLENGE_STRING_LENGTH]; int challenge_string_len; uint32_t initial_outbound_sequence_number = 0; char *tmp_username_ptr = NULL; char *tmp_password_ptr = NULL; int ret, rv = -1; uint64_t val; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->io.outofband.sockfd && ctx->type == IPMI_DEVICE_LAN && strlen (ctx->io.outofband.username) <= IPMI_MAX_USER_NAME_LENGTH && strlen (ctx->io.outofband.password) <= IPMI_1_5_MAX_PASSWORD_LENGTH && IPMI_1_5_AUTHENTICATION_TYPE_VALID (ctx->io.outofband.authentication_type) && IPMI_PRIVILEGE_LEVEL_VALID (ctx->io.outofband.privilege_level)); if (_api_lan_rq_seq_init (ctx) < 0) goto cleanup; if (ctx->flags & IPMI_FLAGS_NOSESSION) { ctx->io.outofband.authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; goto out; } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, ctx->io.outofband.privilege_level, IPMI_GET_IPMI_V15_DATA, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, IPMI_AUTHENTICATION_TYPE_NONE, 0, NULL, 0, &(ctx->io.outofband.rq_seq), NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) { /* at this point in the protocol, we set a connection timeout */ if (ctx->errnum == IPMI_ERR_SESSION_TIMEOUT) API_SET_ERRNUM (ctx, IPMI_ERR_CONNECTION_TIMEOUT); goto cleanup; } /* IPMI Workaround (achu) * * Discovered on an ASUS P5M2 motherboard. * * Also seen on Intel X38ML motherboard. * * The ASUS motherboard reports incorrect settings of anonymous * vs. null vs non-null username capabilities. The workaround is to * skip these checks. */ if (!(ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES)) { if (strlen (ctx->io.outofband.username)) tmp_username_ptr = ctx->io.outofband.username; if (strlen (ctx->io.outofband.password)) tmp_password_ptr = ctx->io.outofband.password; if ((ret = ipmi_check_authentication_capabilities_username (tmp_username_ptr, tmp_password_ptr, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { ctx->errnum = IPMI_ERR_USERNAME_INVALID; goto cleanup; } } /* IPMI Workaround (achu) * * Discovered on IBM eServer 325 * * The remote BMC ignores if permsg authentiction is enabled * or disabled. So we need to force it no matter what. */ if (!(ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION)) { if (FIID_OBJ_GET (obj_cmd_rs, "authentication_status.per_message_authentication", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } ctx->io.outofband.per_msg_auth_disabled = val; } else ctx->io.outofband.per_msg_auth_disabled = 0; /* IPMI Workaround (achu) * * Not discovered yet, assume some motherboard will have it some * day. * * Authentication capabilities flags are not listed properly in the * response. The workaround is to skip these checks. */ if (!(ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES)) { if ((ret = ipmi_check_authentication_capabilities_authentication_type (ctx->io.outofband.authentication_type, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE); goto cleanup; } } fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_session_challenge_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_session_challenge_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_session_challenge (ctx->io.outofband.authentication_type, ctx->io.outofband.username, IPMI_MAX_USER_NAME_LENGTH, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_cmd_wrapper (ctx, IPMI_INTERNAL_WORKAROUND_FLAGS_GET_SESSION_CHALLENGE, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, IPMI_AUTHENTICATION_TYPE_NONE, 0, NULL, 0, &(ctx->io.outofband.rq_seq), NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((ret = ipmi_check_completion_code_success (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_USERNAME_INVALID); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "temp_session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } temp_session_id = val; if ((challenge_string_len = fiid_obj_get_data (obj_cmd_rs, "challenge_string", challenge_string, IPMI_CHALLENGE_STRING_LENGTH)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_activate_session_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_activate_session_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } initial_outbound_sequence_number = rand (); if (fill_cmd_activate_session (ctx->io.outofband.authentication_type, ctx->io.outofband.privilege_level, challenge_string, challenge_string_len, initial_outbound_sequence_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, ctx->io.outofband.authentication_type, 1, NULL, temp_session_id, &(ctx->io.outofband.rq_seq), ctx->io.outofband.password, IPMI_1_5_MAX_PASSWORD_LENGTH, obj_cmd_rq, obj_cmd_rs) < 0) { if (ctx->errnum == IPMI_ERR_SESSION_TIMEOUT) API_SET_ERRNUM (ctx, IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT); goto cleanup; } if ((ret = ipmi_check_completion_code_success (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_TO_SUPPORT_USER) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_BMC_BUSY); else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); #if 0 /* achu: noticed this on an Inventec 5441/Dell Xanadu II under * some scenarios. Password Invalid doesn't seem right, b/c on * other motherboards it may be a legitimate bad input. I think * it best to comment this out and let the vendor fix their * firmware. */ else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_PASSWORD_INVALID); #endif /* * IPMI Workaround * * Discovered on Xyratex HB-F8-SRAY * * For some reason on this system, if you do not specify a * privilege level of Admin, this completion code will always be * returned. Reason unknown. This isn't the best/right error * to return, but it will atleast point the user to a way to * work around the problem. */ else if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } ctx->io.outofband.session_id = val; /* achu: On some buggy BMCs the initial outbound sequence number on * the activate session response is off by one. So we just accept * whatever sequence number they give us even if it isn't the * initial outbound sequence number. */ if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_lan_session_hdr, "session_sequence_number", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_lan_session_hdr); goto cleanup; } ctx->io.outofband.highest_received_sequence_number = val; /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The session sequence numbers for IPMI 1.5 are the wrong endian. * So we have to flip the bits to workaround it. */ if (ctx->workaround_flags_outofband & IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER) { uint32_t tmp_session_sequence_number = ctx->io.outofband.highest_received_sequence_number; ctx->io.outofband.highest_received_sequence_number = ((tmp_session_sequence_number & 0xFF000000) >> 24) | ((tmp_session_sequence_number & 0x00FF0000) >> 8) | ((tmp_session_sequence_number & 0x0000FF00) << 8) | ((tmp_session_sequence_number & 0x000000FF) << 24); } if (FIID_OBJ_GET (obj_cmd_rs, "initial_inbound_sequence_number", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } ctx->io.outofband.session_sequence_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "authentication_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } authentication_type = val; /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * (Note: This could work for "IBM eServer 325" per msg auth * problem. But I don't have hardware to test it :-() * * The remote BMC ignores if permsg authentiction is disabled. * Handle it appropriately by just not doing permsg authentication. */ if (ctx->io.outofband.per_msg_auth_disabled && authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) ctx->io.outofband.per_msg_auth_disabled = 0; fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; /* if privilege_level == IPMI_PRIVILEGE_LEVEL_USER we shouldn't have * to call this, b/c it should be USER by default. But I don't * trust IPMI implementations. Do it anyways. */ /* achu: At this point in time, the session is actually setup * legitimately, so we can use the actual set session privilege * level API function. */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_set_session_privilege_level (ctx, ctx->io.outofband.privilege_level, obj_cmd_rs) < 0) { if (ctx->errnum == IPMI_ERR_BAD_COMPLETION_CODE) { if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); } ERR_TRACE (ipmi_ctx_strerror (ctx->errnum), ctx->errnum); goto cleanup; } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_lan_close_session (ipmi_ctx_t ctx) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t authentication_type; unsigned int internal_workaround_flags = 0; int ret, rv = -1; /* Do not use ipmi_cmd_close_session(), we use a close session retransmit workaround */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN && ctx->io.outofband.sockfd); if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_close_session_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_close_session_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (fill_cmd_close_session (ctx->io.outofband.session_id, NULL, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } api_lan_cmd_get_session_parameters (ctx, &authentication_type, &internal_workaround_flags); internal_workaround_flags |= IPMI_INTERNAL_WORKAROUND_FLAGS_CLOSE_SESSION_SKIP_RETRANSMIT; if (api_lan_cmd_wrapper (ctx, internal_workaround_flags, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, authentication_type, 1, &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.session_id, &(ctx->io.outofband.rq_seq), ctx->io.outofband.password, IPMI_1_5_MAX_PASSWORD_LENGTH, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; /* Check completion code just for tracing, but don't return error */ if ((ret = ipmi_check_completion_code_success (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto out; } if (!ret) { API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_cmd_rs); goto out; } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _api_lan_2_0_dump_rq (ipmi_ctx_t ctx, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { fiid_field_t *tmpl_cmd = NULL; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && pkt && pkt_len && fiid_obj_valid (obj_cmd_rq)); /* Don't cleanup/return an error here. It's just debug code. */ if ((tmpl_cmd = fiid_obj_template (obj_cmd_rq))) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; const char *cmd_str = NULL; /* Handle a few IPMI 2.0 special cases */ if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_request) == 1) cmd_str = DEBUG_UTIL_OPEN_SESSION_STR; else if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_1) == 1) cmd_str = DEBUG_UTIL_RAKP_1_STR; else if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_3) == 1) cmd_str = DEBUG_UTIL_RAKP_3_STR; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); if (cmd_str) debug_hdr_str (DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_REQUEST, DEBUG_UTIL_FLAGS_DEFAULT, cmd_str, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); else debug_hdr_cmd (DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_REQUEST, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ctx->tmpl_ipmb_cmd_rq) ipmi_dump_rmcpplus_packet_ipmb (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, pkt_len, tmpl_lan_msg_hdr_rs, tmpl_cmd, tmpl_ipmb_msg_hdr_rq, ctx->tmpl_ipmb_cmd_rq); else ipmi_dump_rmcpplus_packet (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, pkt_len, tmpl_lan_msg_hdr_rq, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static void _api_lan_2_0_dump_rs (ipmi_ctx_t ctx, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { fiid_field_t *tmpl_cmd = NULL; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && pkt && pkt_len && fiid_obj_valid (obj_cmd_rs)); /* Don't cleanup/return an error here. It's just debug code. */ if ((tmpl_cmd = fiid_obj_template (obj_cmd_rs))) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; const char *cmd_str = NULL; /* Handle a few IPMI 2.0 special cases */ if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_response) == 1) cmd_str = DEBUG_UTIL_OPEN_SESSION_STR; else if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_2) == 1) cmd_str = DEBUG_UTIL_RAKP_2_STR; else if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_4) == 1) cmd_str = DEBUG_UTIL_RAKP_4_STR; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); if (cmd_str) debug_hdr_str (DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_RESPONSE, DEBUG_UTIL_FLAGS_DEFAULT, cmd_str, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); else debug_hdr_cmd (DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_RESPONSE, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); ipmi_dump_rmcpplus_packet (STDERR_FILENO, ctx->io.outofband.hostname, hdrbuf, NULL, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, pkt_len, tmpl_lan_msg_hdr_rs, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static int _api_lan_2_0_cmd_send (ipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint32_t session_sequence_number, uint32_t session_id, uint8_t rq_seq, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const char *password, unsigned int password_len, uint8_t cmd, /* for debug dumping */ uint8_t group_extension, /* for debug dumping */ fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len = 0; int cmd_len = 0; int send_len = 0; int ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->io.outofband.sockfd && IPMI_BMC_LUN_VALID (lun) && IPMI_NET_FN_VALID (net_fn) && (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) && IPMI_PAYLOAD_AUTHENTICATED_FLAG_VALID (payload_authenticated) && IPMI_PAYLOAD_ENCRYPTED_FLAG_VALID (payload_encrypted) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && !(password && password_len > IPMI_2_0_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1); if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } /* variable based on authentication, etc. 1024 extra is enough */ pkt_len = cmd_len + IPMI_PKT_PAD; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_rmcp_hdr_ipmi (ctx->io.outofband.rq.obj_rmcp_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_rmcpplus_session_hdr (payload_type, payload_authenticated, payload_encrypted, 0, /* oem_iana */ 0, /* oem_payload_id */ session_id, session_sequence_number, ctx->io.outofband.rq.obj_rmcpplus_session_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, lun, rq_seq, ctx->io.outofband.rq.obj_lan_msg_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_rmcpplus_session_trlr (ctx->io.outofband.rq.obj_rmcpplus_session_trlr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((send_len = assemble_ipmi_rmcpplus_pkt (authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, password, password_len, ctx->io.outofband.rq.obj_rmcp_hdr, ctx->io.outofband.rq.obj_rmcpplus_session_hdr, ctx->io.outofband.rq.obj_lan_msg_hdr, obj_cmd_rq, ctx->io.outofband.rq.obj_rmcpplus_session_trlr, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && send_len) _api_lan_2_0_dump_rq (ctx, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, send_len, cmd, net_fn, group_extension, obj_cmd_rq); do { ret = ipmi_rmcpplus_sendto (ctx->io.outofband.sockfd, pkt, send_len, 0, ctx->io.outofband.remote_host, ctx->io.outofband.remote_host_len); } while (ret < 0 && errno == EINTR); if (ret < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (gettimeofday (&ctx->io.outofband.last_send, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } rv = 0; cleanup: free (pkt); return (rv); } /* return receive length on success, 0 on no packet, -1 on error */ static int _api_lan_2_0_cmd_recv (ipmi_ctx_t ctx, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, void *pkt, unsigned int pkt_len, unsigned int retransmission_count) { struct timeval recv_starttime; int recv_len = 0; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->io.outofband.sockfd && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && pkt && pkt_len); if (gettimeofday (&recv_starttime, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } recv_len = _api_lan_recvfrom (ctx, pkt, pkt_len, retransmission_count, &recv_starttime); if (!recv_len) return (0); /* resend the request */ /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * errors up to the client for UDP responses (i.e. you need to * timeout). But on some OSes (it seems Windows), the behavior is * to return port denied errors up to the user for UDP responses. * * In addition (according to Ipmitool), a read may return * ECONNREFUSED or ECONNRESET if both the OS and BMC respond to an * IPMI request. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, we just do the recvfrom again to get the * packet we expect. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC, just do the recvfrom again to give us the eventually * timeout. */ if (recv_len < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) { recv_len = _api_lan_recvfrom (ctx, pkt, pkt_len, retransmission_count, &recv_starttime); if (!recv_len) return (0); /* resend the request */ } if (recv_len < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } return (recv_len); } /* < 0 - error * == 1 good packet * == 0 bad packet */ static int _api_lan_2_0_cmd_wrapper_verify_packet (ipmi_ctx_t ctx, uint8_t payload_type, uint8_t *message_tag, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, uint8_t integrity_algorithm, const void *integrity_key, unsigned int integrity_key_len, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rs, const void *pkt, unsigned int pkt_len) { uint8_t l_payload_type; uint32_t l_session_id; uint8_t l_message_tag; uint32_t rs_session_sequence_number; uint8_t rmcpplus_status_code; uint64_t val; int ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && !(password && password_len > IPMI_2_0_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rs) && pkt && pkt_len); if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } l_payload_type = val; if (l_payload_type != IPMI_PAYLOAD_TYPE_IPMI) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } l_session_id = val; if (l_session_id != ctx->io.outofband.remote_console_session_id) { rv = 0; goto cleanup; } /* IPMI Workaround (achu) * * Discovered on Supermicro X9SCM-iiF, Supermicro X9DRi-F * * Checksums are computed incorrectly. */ if (!(ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK)) { if ((ret = ipmi_lan_check_checksum (ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } } if ((ret = ipmi_rmcpplus_check_packet_session_authentication_code (integrity_algorithm, pkt, pkt_len, integrity_key, integrity_key_len, password, password_len, ctx->io.outofband.rs.obj_rmcpplus_session_trlr)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } if (session_sequence_number) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "session_sequence_number", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } rs_session_sequence_number = val; if ((ret = _ipmi_check_session_sequence_number (ctx, rs_session_sequence_number)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } } if ((ret = ipmi_lan_check_rq_seq (ctx->io.outofband.rs.obj_lan_msg_hdr, (rq_seq) ? *rq_seq : 0)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { rv = 0; goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } l_payload_type = val; if (l_payload_type != IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE) { rv = 0; goto cleanup; } if (message_tag) { if (FIID_OBJ_GET (obj_cmd_rs, "message_tag", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_message_tag = val; if (l_message_tag != *message_tag) { rv = 0; goto cleanup; } } /* There is no guarantee that other data (authentication keys, * session id's, etc.) in the RAKP response will be valid if * there is a status code error. So we check this status code * along with this stuff. */ if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (FIID_OBJ_GET (obj_cmd_rs, "remote_console_session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_session_id = val; if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS && l_session_id != ctx->io.outofband.remote_console_session_id) { rv = 0; goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } l_payload_type = val; if (l_payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2) { rv = 0; goto cleanup; } if (message_tag) { if (FIID_OBJ_GET (obj_cmd_rs, "message_tag", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_message_tag = val; if (l_message_tag != *message_tag) { rv = 0; goto cleanup; } } /* There is no guarantee that other data (authentication keys, * session id's, etc.) in the RAKP response will be valid if * there is a status code error. So we check this status code * along with this stuff. */ if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (FIID_OBJ_GET (obj_cmd_rs, "remote_console_session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_session_id = val; if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS && l_session_id != ctx->io.outofband.remote_console_session_id) { rv = 0; goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) { if (FIID_OBJ_GET (ctx->io.outofband.rs.obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, ctx->io.outofband.rs.obj_rmcpplus_session_hdr); goto cleanup; } l_payload_type = val; if (l_payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) { rv = 0; goto cleanup; } if (message_tag) { if (FIID_OBJ_GET (obj_cmd_rs, "message_tag", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_message_tag = val; if (l_message_tag != *message_tag) { rv = 0; goto cleanup; } } /* There is no guarantee that other data (e.g. authentication * keys, session id's, etc.) in the RAKP response will be valid * if there is a status code error. So we check this status * code along with this stuff. */ if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (FIID_OBJ_GET (obj_cmd_rs, "remote_console_session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } l_session_id = val; if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS && l_session_id != ctx->io.outofband.remote_console_session_id) { rv = 0; goto cleanup; } } rv = 1; cleanup: return (rv); } int api_lan_2_0_cmd_wrapper (ipmi_ctx_t ctx, unsigned int internal_workaround_flags, uint8_t lun, uint8_t net_fn, uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint8_t *message_tag, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int recv_len, ret, rv = -1; unsigned int retransmission_count = 0; uint8_t pkt[IPMI_MAX_PKT_LEN]; uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint64_t val; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && IPMI_BMC_LUN_VALID (lun) && IPMI_NET_FN_VALID (net_fn) && (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) && IPMI_PAYLOAD_AUTHENTICATED_FLAG_VALID (payload_authenticated) && IPMI_PAYLOAD_ENCRYPTED_FLAG_VALID (payload_encrypted) && (!message_tag || (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3)) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && !(password && password_len > IPMI_2_0_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (!ctx->io.outofband.last_received.tv_sec && !ctx->io.outofband.last_received.tv_usec) { if (gettimeofday (&ctx->io.outofband.last_received, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } if (_api_lan_2_0_cmd_send (ctx, lun, net_fn, payload_type, payload_authenticated, payload_encrypted, (session_sequence_number) ? *session_sequence_number : 0, session_id, (rq_seq) ? *rq_seq : 0, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, password, password_len, cmd, /* for debug dumping */ group_extension, /* for debug dumping */ obj_cmd_rq) < 0) goto cleanup; while (1) { if ((ret = _session_timed_out (ctx)) < 0) break; if (ret) { API_SET_ERRNUM (ctx, IPMI_ERR_SESSION_TIMEOUT); break; } /* its ok to use the "request" net_fn, dump code doesn't care */ if ((recv_len = _api_lan_2_0_cmd_recv (ctx, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, IPMI_MAX_PKT_LEN, retransmission_count)) < 0) break; if (!recv_len) { /* ignore timeout, just cleanly close session */ if (internal_workaround_flags & IPMI_INTERNAL_WORKAROUND_FLAGS_CLOSE_SESSION_SKIP_RETRANSMIT) { rv = 0; break; } if (message_tag) (*message_tag)++; /* In IPMI 2.0, session sequence numbers of 0 are special */ if (session_sequence_number) { (*session_sequence_number)++; if (!(*session_sequence_number)) (*session_sequence_number)++; } if (rq_seq) *rq_seq = ((*rq_seq) + 1) % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); retransmission_count++; if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) { /* Unlike most packets, the open session request, rakp 1 * and rakp 3 messages have the message tags in a * non-header field. So this is a special case. */ if (fiid_obj_set (obj_cmd_rq, "message_tag", (*message_tag)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } } if (_api_lan_2_0_cmd_send (ctx, lun, net_fn, payload_type, payload_authenticated, payload_encrypted, (session_sequence_number) ? *session_sequence_number : 0, session_id, (rq_seq) ? *rq_seq : 0, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, password, password_len, cmd, /* for debug dumping */ group_extension, /* for debug dumping */ obj_cmd_rq) < 0) goto cleanup; continue; } /* else received a packet */ if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) _api_lan_2_0_dump_rs (ctx, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, recv_len, cmd, net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_rmcpplus_pkt (authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, recv_len, ctx->io.outofband.rs.obj_rmcp_hdr, ctx->io.outofband.rs.obj_rmcpplus_session_hdr, ctx->io.outofband.rs.obj_rmcpplus_payload, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, ctx->io.outofband.rs.obj_rmcpplus_session_trlr, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!ret) continue; if ((ret = _api_lan_2_0_cmd_wrapper_verify_packet (ctx, payload_type, message_tag, session_sequence_number, session_id, rq_seq, integrity_algorithm, integrity_key, integrity_key_len, password, password_len, obj_cmd_rs, pkt, recv_len)) < 0) goto cleanup; if (!ret) continue; if (gettimeofday (&ctx->io.outofband.last_received, NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } rv = 0; break; } cleanup: if (message_tag) (*message_tag)++; /* In IPMI 2.0, session sequence numbers of 0 are special */ if (session_sequence_number) { (*session_sequence_number)++; if (!(*session_sequence_number)) (*session_sequence_number)++; } if (rq_seq) *rq_seq = ((*rq_seq) + 1) % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); return (rv); } int api_lan_2_0_cmd_wrapper_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int recv_len, ret, rv = -1; unsigned int retransmission_count = 0; uint8_t pkt[IPMI_MAX_PKT_LEN]; uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint8_t rq_seq_orig; uint64_t val; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; fiid_obj_t obj_send_rs = NULL; ipmi_errnum_type_t obj_rs_errnum; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } /* for debugging */ ctx->tmpl_ipmb_cmd_rq = fiid_obj_template (obj_cmd_rq); ctx->tmpl_ipmb_cmd_rs = fiid_obj_template (obj_cmd_rs); /* ipmb response packet will use the request sequence number from * the earlier packet. Save it for verification. */ rq_seq_orig = ctx->io.outofband.rq_seq; if (_ipmi_cmd_send_ipmb (ctx, obj_cmd_rq, &obj_send_rs, &obj_rs_errnum) < 0) goto cleanup; while (1) { uint8_t payload_authenticated; uint8_t payload_encrypted; if ((ret = _session_timed_out (ctx)) < 0) break; if (ret) { API_SET_ERRNUM (ctx, IPMI_ERR_SESSION_TIMEOUT); break; } /* its ok to use the "request" net_fn, dump code doesn't care */ if ((recv_len = _api_lan_2_0_cmd_recv (ctx, ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, ctx->io.outofband.confidentiality_key_ptr, ctx->io.outofband.confidentiality_key_len, pkt, IPMI_MAX_PKT_LEN, retransmission_count)) < 0) { rv = -1; break; } if (!recv_len) { retransmission_count++; /* don't increment sequence numbers, will be done in _ipmi_cmd_send_ipmb */ /* ipmb response packet will use the request sequence number from * the earlier packet. Save it for verification. */ rq_seq_orig = ctx->io.outofband.rq_seq; if (obj_send_rs) { fiid_obj_destroy (obj_send_rs); obj_send_rs = NULL; } if (_ipmi_cmd_send_ipmb (ctx, obj_cmd_rq, &obj_send_rs, &obj_rs_errnum) < 0) goto cleanup; continue; } /* else received a packet */ if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) _api_lan_2_0_dump_rs (ctx, ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, ctx->io.outofband.confidentiality_key_ptr, ctx->io.outofband.confidentiality_key_len, pkt, recv_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_rmcpplus_pkt (ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, ctx->io.outofband.confidentiality_key_ptr, ctx->io.outofband.confidentiality_key_len, pkt, recv_len, ctx->io.outofband.rs.obj_rmcp_hdr, ctx->io.outofband.rs.obj_rmcpplus_session_hdr, ctx->io.outofband.rs.obj_rmcpplus_payload, ctx->io.outofband.rs.obj_lan_msg_hdr, obj_cmd_rs, ctx->io.outofband.rs.obj_lan_msg_trlr, ctx->io.outofband.rs.obj_rmcpplus_session_trlr, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!ret) continue; api_lan_2_0_cmd_get_session_parameters (ctx, &payload_authenticated, &payload_encrypted); if ((ret = _api_lan_2_0_cmd_wrapper_verify_packet (ctx, IPMI_PAYLOAD_TYPE_IPMI, NULL, &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.managed_system_session_id, &rq_seq_orig, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, strlen (ctx->io.outofband.password) ? ctx->io.outofband.password : NULL, strlen (ctx->io.outofband.password), obj_cmd_rs, pkt, recv_len)) < 0) goto cleanup; if (!ret) continue; if (gettimeofday (&(ctx->io.outofband.last_received), NULL) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_check_ipmb_out_of_order (ctx, obj_cmd_rq, obj_cmd_rs, obj_send_rs, obj_rs_errnum) < 0) goto cleanup; rv = 0; break; } cleanup: ctx->io.outofband.session_sequence_number++; /* rq_seq already incremented via _ipmi_cmd_send_ipmb call */ fiid_template_free (ctx->tmpl_ipmb_cmd_rq); ctx->tmpl_ipmb_cmd_rq = NULL; fiid_template_free (ctx->tmpl_ipmb_cmd_rs); ctx->tmpl_ipmb_cmd_rs = NULL; fiid_obj_destroy (obj_send_rs); return (rv); } int api_lan_2_0_open_session (ipmi_ctx_t ctx) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t rmcpplus_status_code; uint8_t remote_console_random_number[IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH]; uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; uint8_t managed_system_guid[IPMI_MANAGED_SYSTEM_GUID_LENGTH]; int managed_system_guid_len; uint8_t key_exchange_authentication_code[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int key_exchange_authentication_code_len; uint8_t message_tag; char *username; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; unsigned int username_len; char *password; unsigned int password_len; uint8_t authentication_algorithm = 0; /* init to 0 to remove gcc warning */ uint8_t requested_maximum_privilege; uint8_t name_only_lookup; char *tmp_username_ptr = NULL; char *tmp_password_ptr = NULL; void *tmp_k_g_ptr = NULL; int ret, rv = -1; uint64_t val; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->io.outofband.sockfd && ctx->type == IPMI_DEVICE_LAN_2_0 && strlen (ctx->io.outofband.username) <= IPMI_MAX_USER_NAME_LENGTH && strlen (ctx->io.outofband.password) <= IPMI_2_0_MAX_PASSWORD_LENGTH && IPMI_PRIVILEGE_LEVEL_VALID (ctx->io.outofband.privilege_level) && IPMI_CIPHER_SUITE_ID_SUPPORTED (ctx->io.outofband.cipher_suite_id) && ctx->io.outofband.sik_key_ptr == ctx->io.outofband.sik_key && ctx->io.outofband.sik_key_len == IPMI_MAX_SIK_KEY_LENGTH && ctx->io.outofband.integrity_key_ptr == ctx->io.outofband.integrity_key && ctx->io.outofband.integrity_key_len == IPMI_MAX_INTEGRITY_KEY_LENGTH && ctx->io.outofband.confidentiality_key_ptr == ctx->io.outofband.confidentiality_key && ctx->io.outofband.confidentiality_key_len == IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH); if (_api_lan_rq_seq_init (ctx) < 0) goto cleanup; /* Unlike IPMI 1.5, there is no initial sequence number negotiation, so we don't * start at a random sequence number. */ ctx->io.outofband.session_sequence_number = 1; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, ctx->io.outofband.privilege_level, IPMI_GET_IPMI_V20_EXTENDED_DATA, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* This portion of the protocol is sent via IPMI 1.5 */ if (api_lan_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, IPMI_AUTHENTICATION_TYPE_NONE, 0, NULL, 0, &(ctx->io.outofband.rq_seq), NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) { /* at this point in the protocol, we set a connection timeout */ if (ctx->errnum == IPMI_ERR_SESSION_TIMEOUT) API_SET_ERRNUM (ctx, IPMI_ERR_CONNECTION_TIMEOUT); goto cleanup; } if ((ret = ipmi_check_authentication_capabilities_ipmi_2_0 (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { ctx->errnum = IPMI_ERR_IPMI_2_0_UNAVAILABLE; goto cleanup; } /* IPMI Workaround * * Discovered on an ASUS P5M2 motherboard. * * The ASUS motherboard reports incorrect settings of anonymous * vs. null vs non-null username capabilities. The workaround is to * skip all these checks. * * Discovered on an ASUS P5MT-R motherboard * * K_g status is reported incorrectly too. Again, skip the checks. */ if (!(ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES)) { if (strlen (ctx->io.outofband.username)) tmp_username_ptr = ctx->io.outofband.username; if (strlen (ctx->io.outofband.password)) tmp_password_ptr = ctx->io.outofband.password; if ((ret = ipmi_check_authentication_capabilities_username (tmp_username_ptr, tmp_password_ptr, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { ctx->errnum = IPMI_ERR_USERNAME_INVALID; goto cleanup; } if (ctx->io.outofband.k_g_configured) tmp_k_g_ptr = ctx->io.outofband.k_g; if ((ret = ipmi_check_authentication_capabilities_k_g (tmp_k_g_ptr, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_K_G_INVALID); goto cleanup; } } fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; if (!(obj_cmd_rq = fiid_obj_create (tmpl_rmcpplus_open_session_request))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_rmcpplus_open_session_response))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } message_tag = (uint8_t)rand (); /* In IPMI 2.0, session_ids of 0 are special */ do { if (ipmi_get_random (&(ctx->io.outofband.remote_console_session_id), sizeof (ctx->io.outofband.remote_console_session_id)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } while (!ctx->io.outofband.remote_console_session_id); if (ipmi_cipher_suite_id_to_algorithms (ctx->io.outofband.cipher_suite_id, &(ctx->io.outofband.authentication_algorithm), &(ctx->io.outofband.integrity_algorithm), &(ctx->io.outofband.confidentiality_algorithm)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* * IPMI Workaround (achu) * * Forgotten Motherboard * * Cipher suite IDs are attached to specific privilege levels * rather than a maximum privilege level limit. So you can only * authenticate at the configured privilege level rather than a * privilege level <= to it. * * To deal with this situation. We send the "request highest * privilege" flag in the open session request. This should be * enough to work around this issue but still work with other * motherboards. */ /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The Intel's return IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL instead * of an actual privilege, so have to pass the actual privilege * we want to use. */ /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100, Inventec 5441/Dell Xanadu II, * Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * The remote BMC incorrectly calculates keys using the privilege * specified in the open session stage rather than the privilege * used during the RAKP1 stage. This can be problematic if you * specify IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL during that stage * instead of a real privilege level. So we must pass the actual * privilege we want to use. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION || ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION || ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE) requested_maximum_privilege = ctx->io.outofband.privilege_level; else requested_maximum_privilege = IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL; if (fill_rmcpplus_open_session (message_tag, requested_maximum_privilege, ctx->io.outofband.remote_console_session_id, ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_2_0_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, /* doesn't actually matter here */ IPMI_NET_FN_APP_RQ, /* doesn't actually matter here */ IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST, IPMI_PAYLOAD_FLAG_UNAUTHENTICATED, IPMI_PAYLOAD_FLAG_UNENCRYPTED, &message_tag, NULL, 0, NULL, IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (rmcpplus_status_code != RMCPPLUS_STATUS_NO_ERRORS) { if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS) API_SET_ERRNUM (ctx, IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE); else if (rmcpplus_status_code == RMCPPLUS_STATUS_INVALID_ROLE) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else if (rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION || rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME) API_SET_ERRNUM (ctx, IPMI_ERR_BMC_BUSY); else API_SET_ERRNUM (ctx, IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE); goto cleanup; } /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The Intel's return IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL instead * of an actual privilege, so have to pass the actual privilege * we want to use. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { uint8_t maximum_privilege_level; if (FIID_OBJ_GET (obj_cmd_rs, "maximum_privilege_level", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } maximum_privilege_level = val; ret = (maximum_privilege_level == requested_maximum_privilege) ? 1 : 0; } else { if ((ret = ipmi_check_open_session_maximum_privilege (ctx->io.outofband.privilege_level, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "managed_system_session_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } ctx->io.outofband.managed_system_session_id = val; fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; if (!(obj_cmd_rq = fiid_obj_create (tmpl_rmcpplus_rakp_message_1))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_rmcpplus_rakp_message_2))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_get_random (remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The username must be padded despite explicitly not being * allowed. "No Null characters (00h) are allowed in the name". * Table 13-11 in the IPMI 2.0 spec. * * achu: This should only be done for RAKP 1 message, RAKP 2 check, * and session key creation. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (strlen (ctx->io.outofband.username)) strcpy (username_buf, ctx->io.outofband.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { if (strlen (ctx->io.outofband.username)) username = ctx->io.outofband.username; else username = NULL; username_len = (username) ? strlen (username) : 0; } /* achu: Unlike IPMI 1.5, the length of the username must be actual * length, it can't be the maximum length. */ if (fill_rmcpplus_rakp_message_1 (message_tag, ctx->io.outofband.managed_system_session_id, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, ctx->io.outofband.privilege_level, IPMI_NAME_ONLY_LOOKUP, username, username_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_2_0_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, /* doesn't actually matter here */ IPMI_NET_FN_APP_RQ, /* doesn't actually matter here */ IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1, IPMI_PAYLOAD_FLAG_UNAUTHENTICATED, IPMI_PAYLOAD_FLAG_UNENCRYPTED, &message_tag, NULL, 0, NULL, IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (rmcpplus_status_code != RMCPPLUS_STATUS_NO_ERRORS) { if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_NAME) API_SET_ERRNUM (ctx, IPMI_ERR_USERNAME_INVALID); else if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else if (rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION || rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME) API_SET_ERRNUM (ctx, IPMI_ERR_BMC_BUSY); else API_SET_ERRNUM (ctx, IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE); goto cleanup; } if ((managed_system_random_number_len = fiid_obj_get_data (obj_cmd_rs, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if ((managed_system_guid_len = fiid_obj_get_data (obj_cmd_rs, "managed_system_guid", managed_system_guid, IPMI_MANAGED_SYSTEM_GUID_LENGTH)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (managed_system_random_number_len != IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH || managed_system_guid_len != IPMI_MANAGED_SYSTEM_GUID_LENGTH) { API_SET_ERRNUM (ctx, IPMI_ERR_IPMI_ERROR); goto cleanup; } if (strlen (ctx->io.outofband.password)) password = ctx->io.outofband.password; else password = NULL; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * When the authentication algorithm is HMAC-MD5-128 and the * password is greater than 16 bytes, the Intel BMC truncates the * password to 16 bytes when generating keys, hashes, etc. So we * have to do the same when generating keys, hashes, etc. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION && ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION) { uint8_t keybuf[IPMI_MAX_PKT_LEN]; int keybuf_len; /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * The IPMI 2.0 packet responses for RAKP 2 have payload lengths * that are off by 1 (i.e. if the payload length should be X, * the payload length returned in the packet is X + 1) * * We fix/adjust for the situation here. */ if ((keybuf_len = fiid_obj_get_data (obj_cmd_rs, "key_exchange_authentication_code", keybuf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && keybuf_len == 1) { if (fiid_obj_clear_field (obj_cmd_rs, "key_exchange_authentication_code") < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } else if (ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && keybuf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (obj_cmd_rs, "key_exchange_authentication_code", keybuf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } else if (ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && keybuf_len == (IPMI_HMAC_MD5_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (obj_cmd_rs, "key_exchange_authentication_code", keybuf, IPMI_HMAC_MD5_DIGEST_LENGTH) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } else if (ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 && keybuf_len == (IPMI_HMAC_SHA256_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (obj_cmd_rs, "key_exchange_authentication_code", keybuf, IPMI_HMAC_SHA256_DIGEST_LENGTH) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } } /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The key exchange authentication code is the wrong length. We * need to shorten it. * * Notes: Cipher suite 1,2,3 are the ones that use HMAC-SHA1 and * have the problem. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION && (ctx->io.outofband.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1)) { uint8_t buf[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int buf_len; if ((buf_len = fiid_obj_get_data (obj_cmd_rs, "key_exchange_authentication_code", buf, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (buf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { if (fiid_obj_clear_field (obj_cmd_rs, "key_exchange_authentication_code") < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (fiid_obj_set_data (obj_cmd_rs, "key_exchange_authentication_code", buf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } } if ((ret = ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code (ctx->io.outofband.authentication_algorithm, password, password_len, ctx->io.outofband.remote_console_session_id, ctx->io.outofband.managed_system_session_id, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, managed_system_random_number_len, managed_system_guid, managed_system_guid_len, IPMI_NAME_ONLY_LOOKUP, ctx->io.outofband.privilege_level, username, username_len, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { /* IPMI Compliance Issue * * On some systems, password could be correct, but privilege is * too high. The error is b/c the privilege error is not * handled properly in the open session stage (i.e. they tell me * I can authenticate at a high privilege level, that in reality * is not allowed). Dunno how to deal with this. */ API_SET_ERRNUM (ctx, IPMI_ERR_PASSWORD_INVALID); goto cleanup; } /* achu: note, for INTEL_2_0 workaround, this must have the username/password adjustments */ if (ipmi_calculate_rmcpplus_session_keys (ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, password, password_len, (ctx->io.outofband.k_g_configured) ? ctx->io.outofband.k_g : NULL, (ctx->io.outofband.k_g_configured) ? IPMI_MAX_K_G_LENGTH : 0, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH, IPMI_NAME_ONLY_LOOKUP, ctx->io.outofband.privilege_level, username, username_len, &(ctx->io.outofband.sik_key_ptr), &(ctx->io.outofband.sik_key_len), &(ctx->io.outofband.integrity_key_ptr), &(ctx->io.outofband.integrity_key_len), &(ctx->io.outofband.confidentiality_key_ptr), &(ctx->io.outofband.confidentiality_key_len)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* achu: If INTEL_2_0 workaround is set, get back to original username & * username_len, because that isn't needed for the RAKP3/4 part. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { if (strlen (ctx->io.outofband.username)) username = ctx->io.outofband.username; else username = NULL; username_len = (username) ? strlen (username) : 0; } /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * For some reason we have to create this key with the name only * lookup turned off. I was skeptical about this actually being * a bug until I saw that the ipmitool folks implemented the * same workaround. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) name_only_lookup = IPMI_USER_NAME_PRIVILEGE_LOOKUP; else name_only_lookup = IPMI_NAME_ONLY_LOOKUP; if ((key_exchange_authentication_code_len = ipmi_calculate_rakp_3_key_exchange_authentication_code (ctx->io.outofband.authentication_algorithm, password, password_len, managed_system_random_number, managed_system_random_number_len, ctx->io.outofband.remote_console_session_id, name_only_lookup, ctx->io.outofband.privilege_level, username, username_len, key_exchange_authentication_code, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; if (!(obj_cmd_rq = fiid_obj_create (tmpl_rmcpplus_rakp_message_3))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_rmcpplus_rakp_message_4))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_rmcpplus_rakp_message_3 (message_tag, RMCPPLUS_STATUS_NO_ERRORS, ctx->io.outofband.managed_system_session_id, key_exchange_authentication_code, key_exchange_authentication_code_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_lan_2_0_cmd_wrapper (ctx, 0, IPMI_BMC_IPMB_LUN_BMC, /* doesn't actually matter here */ IPMI_NET_FN_APP_RQ, /* doesn't actually matter here */ IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3, IPMI_PAYLOAD_FLAG_UNAUTHENTICATED, IPMI_PAYLOAD_FLAG_UNENCRYPTED, &message_tag, NULL, 0, NULL, IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, NULL, 0, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if (FIID_OBJ_GET (obj_cmd_rs, "rmcpplus_status_code", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rmcpplus_status_code = val; if (rmcpplus_status_code != RMCPPLUS_STATUS_NO_ERRORS) { if (rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION || rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME) API_SET_ERRNUM (ctx, IPMI_ERR_BMC_BUSY); else if (rmcpplus_status_code == RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE) /* XXX: achu: some systems, password could be correct, but * privilege used in hashing is incorrect on the BMC side * (OPEN_SESSION_PRIVILEGE workaround). */ API_SET_ERRNUM (ctx, IPMI_ERR_PASSWORD_INVALID); else API_SET_ERRNUM (ctx, IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE); goto cleanup; } /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * For some reason, the intel ipmi 2.0 responds with the integrity * check value based on the integrity algorithm instead of the * authentication algorithm. * * Thanks to the ipmitool folks (ipmitool.sourceforge.net) for this * one. Would have taken me awhile to figure this one out :-) */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { if (ctx->io.outofband.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; else if (ctx->io.outofband.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1; else if (ctx->io.outofband.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5; else if (ctx->io.outofband.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { /* achu: I have thus far been unable to reverse engineer this * corner case. Since we cannot provide a reasonable two * part authentication, we're going to error out. */ API_SET_ERRNUM (ctx, IPMI_ERR_IPMI_ERROR); goto cleanup; } } else authentication_algorithm = ctx->io.outofband.authentication_algorithm; /* IPMI Workaround (achu) * * Discovered on Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * For whatever reason, with cipher suite 0, the RAKP 4 response * returns with an Integrity Check Value when it should be empty. */ if (ctx->workaround_flags_outofband_2_0 & IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE && !ctx->io.outofband.cipher_suite_id) { if (fiid_obj_clear_field (obj_cmd_rs, "integrity_check_value") < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } } if ((ret = ipmi_rmcpplus_check_rakp_4_integrity_check_value (authentication_algorithm, ctx->io.outofband.sik_key_ptr, ctx->io.outofband.sik_key_len, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, ctx->io.outofband.managed_system_session_id, managed_system_guid, managed_system_guid_len, obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_K_G_INVALID); goto cleanup; } fiid_obj_destroy (obj_cmd_rq); obj_cmd_rq = NULL; fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; /* if privilege_level == IPMI_PRIVILEGE_LEVEL_USER we shouldn't have * to call this, b/c it should be USER by default. But I don't * trust IPMI implementations. Do it anyways. */ /* achu: At this point in time, the session is actually setup * legitimately, so we can use the actual set session privilege * level API function. */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_set_session_privilege_level (ctx, ctx->io.outofband.privilege_level, obj_cmd_rs) < 0) { if (ctx->errnum == IPMI_ERR_BAD_COMPLETION_CODE) { if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); } ERR_TRACE (ipmi_ctx_strerror (ctx->errnum), ctx->errnum); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_lan_2_0_close_session (ipmi_ctx_t ctx) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t payload_authenticated; uint8_t payload_encrypted; unsigned int internal_workaround_flags = 0; int ret, rv = -1; /* Do not use ipmi_cmd_close_session(), we use a close session retransmit workaround */ assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_LAN_2_0 && ctx->io.outofband.sockfd); if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_close_session_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_close_session_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); return (-1); } if (fill_cmd_close_session (ctx->io.outofband.managed_system_session_id, NULL, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } api_lan_2_0_cmd_get_session_parameters (ctx, &payload_authenticated, &payload_encrypted); internal_workaround_flags |= IPMI_INTERNAL_WORKAROUND_FLAGS_CLOSE_SESSION_SKIP_RETRANSMIT; if (api_lan_2_0_cmd_wrapper (ctx, internal_workaround_flags, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, IPMI_PAYLOAD_TYPE_IPMI, payload_authenticated, payload_encrypted, NULL, &(ctx->io.outofband.session_sequence_number), ctx->io.outofband.managed_system_session_id, &(ctx->io.outofband.rq_seq), ctx->io.outofband.authentication_algorithm, ctx->io.outofband.integrity_algorithm, ctx->io.outofband.confidentiality_algorithm, ctx->io.outofband.integrity_key_ptr, ctx->io.outofband.integrity_key_len, ctx->io.outofband.confidentiality_key_ptr, ctx->io.outofband.confidentiality_key_len, strlen (ctx->io.outofband.password) ? ctx->io.outofband.password : NULL, strlen (ctx->io.outofband.password), obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; /* Check completion code just for tracing, but don't return error */ if ((ret = ipmi_check_completion_code_success (obj_cmd_rs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto out; } if (!ret) { API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_cmd_rs); goto out; } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-lan-session-common.h0000644002055400205540000000754113527331636023160 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LAN_SESSION_COMMON_H #define IPMI_LAN_SESSION_COMMON_H #include #include #include #define IPMI_INTERNAL_WORKAROUND_FLAGS_GET_SESSION_CHALLENGE 0x00000001 #define IPMI_INTERNAL_WORKAROUND_FLAGS_CHECK_UNEXPECTED_AUTHCODE 0x00000002 #define IPMI_INTERNAL_WORKAROUND_FLAGS_CLOSE_SESSION_SKIP_RETRANSMIT 0x00000004 void api_lan_cmd_get_session_parameters (ipmi_ctx_t ctx, uint8_t *authentication_type, unsigned int *internal_workaround_flags); void api_lan_2_0_cmd_get_session_parameters (ipmi_ctx_t ctx, uint8_t *payload_authenticated, uint8_t *payload_encrypted); int api_lan_cmd_wrapper (ipmi_ctx_t ctx, unsigned int internal_workaround_flags, uint8_t lun, uint8_t net_fn, uint8_t authentication_type, int check_authentication_code, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_cmd_wrapper_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_open_session (ipmi_ctx_t ctx); int api_lan_close_session (ipmi_ctx_t ctx); int api_lan_2_0_cmd_wrapper (ipmi_ctx_t ctx, unsigned int internal_workaround_flags, uint8_t lun, uint8_t net_fn, uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint8_t *message_tag, uint32_t *session_sequence_number, uint32_t session_id, uint8_t *rq_seq, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_2_0_cmd_wrapper_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_lan_2_0_open_session (ipmi_ctx_t ctx); int api_lan_2_0_close_session (ipmi_ctx_t ctx); #endif /* IPMI_LAN_SESSION_COMMON_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-messaging-support-cmds-api.c0000644002055400205540000026577013527331636024626 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/api/ipmi-device-global-cmds-api.h" #include "freeipmi/cmds/ipmi-device-global-cmds.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-system-info-parameters-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_bmc_global_enables (ipmi_ctx_t ctx, uint8_t receive_message_queue_interrupt, uint8_t event_message_buffer_full_interrupt, uint8_t event_message_buffer, uint8_t system_event_logging, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_bmc_global_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_bmc_global_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_bmc_global_enables (receive_message_queue_interrupt, event_message_buffer_full_interrupt, event_message_buffer, system_event_logging, oem_0, oem_1, oem_2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_bmc_global_enables (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_bmc_global_enables_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_bmc_global_enables_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_bmc_global_enables (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_clear_message_flags (ipmi_ctx_t ctx, uint8_t receive_message_queue, uint8_t event_message_buffer, uint8_t watchdog_pre_timeout_interrupt_flag, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_clear_message_flags_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_clear_message_flags_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_clear_message_flags (receive_message_queue, event_message_buffer, watchdog_pre_timeout_interrupt_flag, oem_0, oem_1, oem_2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_message_flags (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_message_flags_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_message_flags_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_message_flags (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_enable_message_channel_receive (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t channel_operation, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_enable_message_channel_receive_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_enable_message_channel_receive_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_enable_message_channel_receive (channel_number, channel_operation, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_message (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_message_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_message_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_message (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_send_message (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t message_authentication, uint8_t message_encryption, uint8_t tracking_operation, const void *message_data, unsigned int message_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_send_message_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_send_message_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_send_message (channel_number, message_authentication, message_encryption, tracking_operation, message_data, message_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_read_event_message_buffer (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (ctx->type == IPMI_DEVICE_LAN || ctx->type == IPMI_DEVICE_LAN_2_0) { API_SET_ERRNUM (ctx, IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_read_event_message_buffer_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_read_event_message_buffer_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_read_event_message_buffer (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_interface_capabilities (ipmi_ctx_t ctx, uint8_t system_interface, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_system_interface_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_interface_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_interface_capabilities (system_interface, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_interface_capabilities_ssif (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_system_interface_capabilities_ssif_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_interface_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_interface_capabilities (IPMI_SYSTEM_INTERFACE_SSIF, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_interface_capabilities_kcs (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_system_interface_capabilities_kcs_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_interface_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_interface_capabilities (IPMI_SYSTEM_INTERFACE_KCS, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_bt_interface_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_bt_interface_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_bt_interface_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_bt_interface_capabilities (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_master_write_read (ipmi_ctx_t ctx, uint8_t bus_type, uint8_t bus_id, uint8_t channel_number, uint8_t slave_address, uint8_t read_count, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_master_write_read_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_master_write_read_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_master_write_read (bus_type, bus_id, channel_number, slave_address, read_count, data, data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_channel_authentication_capabilities (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t maximum_privilege_level, uint8_t get_ipmi_v20_extended_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_channel_authentication_capabilities (channel_number, maximum_privilege_level, get_ipmi_v20_extended_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_guid (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_system_guid_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_guid_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_guid (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_info_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_info_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_info_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_info_parameters (parameter_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_info_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_info_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_system_info_parameters_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_system_info_parameters_set_in_progress (state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_set_system_info_parameters_string_first_set_common (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rq, int (*fill_func)(uint8_t, uint8_t, uint8_t, const void *, unsigned int, fiid_obj_t)) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rq); assert (fill_func); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_info_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_func (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_set_system_info_parameters_string_set_common (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rq, int (*fill_func)(uint8_t, const void *, unsigned int, fiid_obj_t)) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_system_info_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_func (set_selector, string_block, string_block_length, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq, fill_cmd_set_system_info_parameters_system_firmware_version_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_system_firmware_version_rq, fill_cmd_set_system_info_parameters_system_firmware_version) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_system_name_first_set_rq, fill_cmd_set_system_info_parameters_system_name_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_system_name_rq, fill_cmd_set_system_info_parameters_system_name) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq, fill_cmd_set_system_info_parameters_primary_operating_system_name_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq, fill_cmd_set_system_info_parameters_primary_operating_system_name) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq, fill_cmd_set_system_info_parameters_operating_system_name_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_operating_system_name (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_operating_system_name_rq, fill_cmd_set_system_info_parameters_operating_system_name) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq, fill_cmd_set_system_info_parameters_present_os_version_number_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_present_os_version_number_rq, fill_cmd_set_system_info_parameters_present_os_version_number) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq, fill_cmd_set_system_info_parameters_bmc_url_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_bmc_url (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_bmc_url_rq, fill_cmd_set_system_info_parameters_bmc_url) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_first_set_common (ctx, set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq, fill_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_set_system_info_parameters_string_set_common (ctx, set_selector, string_block, string_block_length, obj_cmd_rs, tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq, fill_cmd_set_system_info_parameters_base_os_hypervisor_url) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } static int _ipmi_cmd_get_system_info_parameters_common (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_system_info_parameters (get_parameter, parameter_selector, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_system_info_parameters (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_set_in_progress_rs, IPMI_SYSTEM_INFO_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_system_firmware_version_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_system_firmware_version (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_system_firmware_version_rs, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_system_name_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_system_name_rs, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_primary_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_PRIMARY_OPERATING_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_primary_operating_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs, IPMI_SYSTEM_INFO_PARAMETER_PRIMARY_OPERATING_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_operating_system_name_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_OPERATING_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_operating_system_name (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_operating_system_name_rs, IPMI_SYSTEM_INFO_PARAMETER_OPERATING_SYSTEM_NAME) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_present_os_version_number_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_present_os_version_number_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_PRESENT_OS_VERSION_NUMBER) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_present_os_version_number (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_present_os_version_number_rs, IPMI_SYSTEM_INFO_PARAMETER_PRESENT_OS_VERSION_NUMBER) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_bmc_url_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_bmc_url_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_BMC_URL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_bmc_url (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_bmc_url_rs, IPMI_SYSTEM_INFO_PARAMETER_BMC_URL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set_rs, IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_system_info_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_rs, IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_session_challenge (ipmi_ctx_t ctx, uint8_t authentication_type, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_session_challenge_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_session_challenge_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_session_challenge (authentication_type, user_name, user_name_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_activate_session (ipmi_ctx_t ctx, uint8_t authentication_type, uint8_t maximum_privilege_level, const void *challenge_string, unsigned int challenge_string_len, uint32_t initial_outbound_sequence_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_activate_session_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_activate_session_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_activate_session (authentication_type, maximum_privilege_level, challenge_string, challenge_string_len, initial_outbound_sequence_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_session_privilege_level (ipmi_ctx_t ctx, uint8_t privilege_level, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_session_privilege_level_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_session_privilege_level (privilege_level, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_close_session (ipmi_ctx_t ctx, uint32_t session_id, uint8_t *session_handle, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs) || (session_handle && session_id)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_close_session_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_close_session_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_close_session (session_id, session_handle, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_channel_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t ipmi_messaging_access_mode, uint8_t user_level_authentication, uint8_t per_message_authentication, uint8_t pef_alerting, uint8_t channel_access_set, uint8_t channel_privilege_level_limit, uint8_t channel_privilege_level_limit_set, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_channel_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_channel_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_channel_access (channel_number, ipmi_messaging_access_mode, user_level_authentication, per_message_authentication, pef_alerting, channel_access_set, channel_privilege_level_limit, channel_privilege_level_limit_set, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_channel_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t channel_access_get, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_channel_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_channel_access (channel_number, channel_access_get, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_channel_info (ipmi_ctx_t ctx, uint8_t channel_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_channel_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_channel_info (channel_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_channel_security_keys (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t operation, uint8_t key_id, const void *key_value, unsigned int key_value_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_channel_security_keys_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_channel_security_keys_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_channel_security_keys (channel_number, operation, key_id, key_value, key_value_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_user_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_ipmi_messaging, uint8_t user_link_authentication, uint8_t user_restricted_to_callback, uint8_t change_bits_in_byte, uint8_t user_id, uint8_t user_privilege_level_limit, uint8_t user_session_number_limit, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_user_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_user_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_user_access (channel_number, user_ipmi_messaging, user_link_authentication, user_restricted_to_callback, change_bits_in_byte, user_id, user_privilege_level_limit, user_session_number_limit, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_user_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_user_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_user_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_user_access (channel_number, user_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_user_name (ipmi_ctx_t ctx, uint8_t user_id, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_user_name_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_user_name_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_user_name (user_id, user_name, user_name_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_user_name (ipmi_ctx_t ctx, uint8_t user_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_user_name_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_user_name_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_user_name (user_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_user_password (ipmi_ctx_t ctx, uint8_t user_id, uint8_t password_size, uint8_t operation, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_PASSWORD_OPERATION_VALID (operation) && !IPMI_PASSWORD_SIZE_VALID (password_size) && (password && password_size == IPMI_PASSWORD_SIZE_16_BYTES && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) && (password && password_size == IPMI_PASSWORD_SIZE_20_BYTES && password_len > IPMI_2_0_MAX_PASSWORD_LENGTH) && !fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_user_password_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_user_password_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_user_password (user_id, password_size, operation, password, password_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-oem-intel-node-manager-cmds-api.c0000644002055400205540000022400213527331636025342 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h" #include "freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t policy_enable_disable, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (policy_enable_disable, domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint16_t policy_target_limit, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_policy (domain_id, policy_enabled, policy_id, policy_trigger_type, policy_configuration_action, aggressive_cpu_power_correction, policy_storage_option, policy_exception_actions_send_alert, policy_exception_actions_shutdown_system, policy_power_domain, policy_target_limit, correction_time_limit, policy_trigger_limit, statistics_reporting_period, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint8_t platform_booting_mode, uint8_t cores_disabled, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (domain_id, policy_enabled, policy_id, policy_trigger_type, policy_configuration_action, aggressive_cpu_power_correction, policy_storage_option, policy_exception_actions_send_alert, policy_exception_actions_shutdown_system, policy_power_domain, platform_booting_mode, cores_disabled, correction_time_limit, policy_trigger_limit, statistics_reporting_period, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_policy (domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, uint16_t *alert_threshold1, uint16_t *alert_threshold2, uint16_t *alert_threshold3, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (domain_id, policy_id, alert_threshold1, alert_threshold2, alert_threshold3, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, uint8_t *policy1_suspend_start_time, uint8_t *policy1_suspend_stop_time, uint8_t *policy1_suspend_period_recurrence_monday, uint8_t *policy1_suspend_period_recurrence_tuesday, uint8_t *policy1_suspend_period_recurrence_wednesday, uint8_t *policy1_suspend_period_recurrence_thursday, uint8_t *policy1_suspend_period_recurrence_friday, uint8_t *policy1_suspend_period_recurrence_saturday, uint8_t *policy1_suspend_period_recurrence_sunday, uint8_t *policy2_suspend_start_time, uint8_t *policy2_suspend_stop_time, uint8_t *policy2_suspend_period_recurrence_monday, uint8_t *policy2_suspend_period_recurrence_tuesday, uint8_t *policy2_suspend_period_recurrence_wednesday, uint8_t *policy2_suspend_period_recurrence_thursday, uint8_t *policy2_suspend_period_recurrence_friday, uint8_t *policy2_suspend_period_recurrence_saturday, uint8_t *policy2_suspend_period_recurrence_sunday, uint8_t *policy3_suspend_start_time, uint8_t *policy3_suspend_stop_time, uint8_t *policy3_suspend_period_recurrence_monday, uint8_t *policy3_suspend_period_recurrence_tuesday, uint8_t *policy3_suspend_period_recurrence_wednesday, uint8_t *policy3_suspend_period_recurrence_thursday, uint8_t *policy3_suspend_period_recurrence_friday, uint8_t *policy3_suspend_period_recurrence_saturday, uint8_t *policy3_suspend_period_recurrence_sunday, uint8_t *policy4_suspend_start_time, uint8_t *policy4_suspend_stop_time, uint8_t *policy4_suspend_period_recurrence_monday, uint8_t *policy4_suspend_period_recurrence_tuesday, uint8_t *policy4_suspend_period_recurrence_wednesday, uint8_t *policy4_suspend_period_recurrence_thursday, uint8_t *policy4_suspend_period_recurrence_friday, uint8_t *policy4_suspend_period_recurrence_saturday, uint8_t *policy4_suspend_period_recurrence_sunday, uint8_t *policy5_suspend_start_time, uint8_t *policy5_suspend_stop_time, uint8_t *policy5_suspend_period_recurrence_monday, uint8_t *policy5_suspend_period_recurrence_tuesday, uint8_t *policy5_suspend_period_recurrence_wednesday, uint8_t *policy5_suspend_period_recurrence_thursday, uint8_t *policy5_suspend_period_recurrence_friday, uint8_t *policy5_suspend_period_recurrence_saturday, uint8_t *policy5_suspend_period_recurrence_sunday, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (domain_id, policy_id, policy1_suspend_start_time, policy1_suspend_stop_time, policy1_suspend_period_recurrence_monday, policy1_suspend_period_recurrence_tuesday, policy1_suspend_period_recurrence_wednesday, policy1_suspend_period_recurrence_thursday, policy1_suspend_period_recurrence_friday, policy1_suspend_period_recurrence_saturday, policy1_suspend_period_recurrence_sunday, policy2_suspend_start_time, policy2_suspend_stop_time, policy2_suspend_period_recurrence_monday, policy2_suspend_period_recurrence_tuesday, policy2_suspend_period_recurrence_wednesday, policy2_suspend_period_recurrence_thursday, policy2_suspend_period_recurrence_friday, policy2_suspend_period_recurrence_saturday, policy2_suspend_period_recurrence_sunday, policy3_suspend_start_time, policy3_suspend_stop_time, policy3_suspend_period_recurrence_monday, policy3_suspend_period_recurrence_tuesday, policy3_suspend_period_recurrence_wednesday, policy3_suspend_period_recurrence_thursday, policy3_suspend_period_recurrence_friday, policy3_suspend_period_recurrence_saturday, policy3_suspend_period_recurrence_sunday, policy4_suspend_start_time, policy4_suspend_stop_time, policy4_suspend_period_recurrence_monday, policy4_suspend_period_recurrence_tuesday, policy4_suspend_period_recurrence_wednesday, policy4_suspend_period_recurrence_thursday, policy4_suspend_period_recurrence_friday, policy4_suspend_period_recurrence_saturday, policy4_suspend_period_recurrence_sunday, policy5_suspend_start_time, policy5_suspend_stop_time, policy5_suspend_period_recurrence_monday, policy5_suspend_period_recurrence_tuesday, policy5_suspend_period_recurrence_wednesday, policy5_suspend_period_recurrence_thursday, policy5_suspend_period_recurrence_friday, policy5_suspend_period_recurrence_saturday, policy5_suspend_period_recurrence_sunday, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_reset_node_manager_statistics (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_reset_node_manager_statistics (mode, domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_statistics (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_statistics (mode, domain_id, policy_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_capabilities (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_capabilities (domain_id, policy_trigger_type, policy_type, policy_power_domain, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_version (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_version (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint16_t minimum_power_draw, uint16_t maximum_power_draw, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (domain_id, minimum_power_draw, maximum_power_draw, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_information, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination (channel_number, alert_receiver_deactivation, destination_information, alert_string_selector, send_alert_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t slave_address, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (channel_number, alert_receiver_deactivation, slave_address, alert_string_selector, send_alert_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_selector, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (channel_number, alert_receiver_deactivation, destination_selector, alert_string_selector, send_alert_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_node_manager_alert_destination (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_node_manager_alert_destination (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t cpu_socket_number, uint8_t active_cores_configuration, uint8_t turbo_ratio_limit, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (cpu_socket_number, active_cores_configuration, turbo_ratio_limit, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t cpu_socket_number, uint8_t active_cores_configuration, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (cpu_socket_number, active_cores_configuration, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_oem_intel_node_manager_get_limiting_policy_id (ipmi_ctx_t ctx, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_oem_intel_node_manager_get_limiting_policy_id (domain_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (target_channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB && target_slave_address == IPMI_SLAVE_ADDRESS_BMC && target_lun == IPMI_BMC_IPMB_LUN_BMC) { if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } else { if (api_ipmi_cmd_ipmb (ctx, target_channel_number, target_slave_address, target_lun, IPMI_NET_FN_OEM_GROUP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-openipmi-driver-api.c0000644002055400205540000001342313527331636023306 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/driver/ipmi-openipmi-driver.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-openipmi-driver-api.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" fiid_template_t tmpl_openipmi_raw = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int api_openipmi_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_OPENIPMI && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ipmi_openipmi_cmd (ctx->io.inband.openipmi_ctx, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_OPENIPMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_openipmi_ctx_errnum (ctx->io.inband.openipmi_ctx)); return (-1); } return (0); } int api_openipmi_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_OPENIPMI && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ipmi_openipmi_cmd_ipmb (ctx->io.inband.openipmi_ctx, ctx->target.channel_number, ctx->target.rs_addr, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_OPENIPMI_ERRNUM_TO_API_ERRNUM (ctx, ipmi_openipmi_ctx_errnum (ctx->io.inband.openipmi_ctx)); return (-1); } return (0); } int api_openipmi_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_OPENIPMI && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_openipmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_openipmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_openipmi_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_openipmi_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_OPENIPMI && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_openipmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_openipmi_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_openipmi_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-openipmi-driver-api.h0000644002055400205540000000320513527331636023310 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OPENIPMI_DRIVER_API_H #define IPMI_OPENIPMI_DRIVER_API_H #include #include #include int api_openipmi_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_openipmi_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_openipmi_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_openipmi_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_OPENIPMI_DRIVER_API_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-pef-and-alerting-cmds-api.c0000644002055400205540000015401513527331636024241 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-pef-and-alerting-cmds-api.h" #include "freeipmi/cmds/ipmi-pef-and-alerting-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-pef-configuration-parameters-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_pef_capabilities (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_pef_capabilities_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_pef_capabilities_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_pef_capabilities (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_arm_pef_postpone_timer (ipmi_ctx_t ctx, uint8_t pef_postpone_timeout, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_arm_pef_postpone_timer_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_arm_pef_postpone_timer_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_arm_pef_postpone_timer (pef_postpone_timeout, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters (parameter_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_set_in_progress (state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx, uint8_t pef, uint8_t pef_event_messages, uint8_t pef_startup_delay, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_pef_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_pef_control (pef, pef_event_messages, pef_startup_delay, pef_alert_startup_delay, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx, uint8_t alert_action, uint8_t power_down_action, uint8_t reset_action, uint8_t power_cycle_action, uint8_t oem_action, uint8_t diagnostic_interrupt, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_pef_action_global_control (alert_action, power_down_action, reset_action, power_cycle_action, oem_action, diagnostic_interrupt, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx, uint8_t pef_startup_delay, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_pef_startup_delay (pef_startup_delay, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (pef_alert_startup_delay, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx, uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, uint8_t event_filter_action_alert, uint8_t event_filter_action_power_off, uint8_t event_filter_action_reset, uint8_t event_filter_action_power_cycle, uint8_t event_filter_action_oem, uint8_t event_filter_action_diagnostic_interrupt, uint8_t event_filter_action_group_control_operation, uint8_t alert_policy_number_policy_number, uint8_t alert_policy_number_group_control_selector, uint8_t event_severity, uint8_t generator_id_byte1, uint8_t generator_id_byte2, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_trigger, uint16_t event_data1_offset_mask, uint8_t event_data1_AND_mask, uint8_t event_data1_compare1, uint8_t event_data1_compare2, uint8_t event_data2_AND_mask, uint8_t event_data2_compare1, uint8_t event_data2_compare2, uint8_t event_data3_AND_mask, uint8_t event_data3_compare1, uint8_t event_data3_compare2, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_event_filter_table (filter_number, filter_configuration_type, filter_configuration_filter, event_filter_action_alert, event_filter_action_power_off, event_filter_action_reset, event_filter_action_power_cycle, event_filter_action_oem, event_filter_action_diagnostic_interrupt, event_filter_action_group_control_operation, alert_policy_number_policy_number, alert_policy_number_group_control_selector, event_severity, generator_id_byte1, generator_id_byte2, sensor_type, sensor_number, event_trigger, event_data1_offset_mask, event_data1_AND_mask, event_data1_compare1, event_data1_compare2, event_data2_AND_mask, event_data2_compare1, event_data2_compare2, event_data3_AND_mask, event_data3_compare1, event_data3_compare2, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx, uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_event_filter_table_data1 (filter_number, filter_configuration_type, filter_configuration_filter, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx, uint8_t alert_policy_entry_number, uint8_t policy_type, uint8_t policy_enabled, uint8_t policy_number, uint8_t destination_selector, uint8_t channel_number, uint8_t alert_string_set_selector, uint8_t event_specific_alert_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_alert_policy_table (alert_policy_entry_number, policy_type, policy_enabled, policy_number, destination_selector, channel_number, alert_string_set_selector, event_specific_alert_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx, uint8_t string_selector, uint8_t filter_number, uint8_t set_number_for_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_alert_string_keys (string_selector, filter_number, set_number_for_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_pef_configuration_parameters_alert_strings (ipmi_ctx_t ctx, uint8_t string_selector, uint8_t block_selector, const uint8_t *string_data, unsigned int string_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_pef_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_pef_configuration_parameters_alert_strings (string_selector, block_selector, string_data, string_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_get_pef_configuration_parameters_common (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rs_expected); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_pef_configuration_parameters (parameter_selector, get_parameter, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_pef_configuration_parameters (ipmi_ctx_t ctx, uint8_t parameter_selector, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_set_in_progress_rs, IPMI_PEF_CONFIGURATION_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_pef_control (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_pef_control_rs, IPMI_PEF_CONFIGURATION_PARAMETER_PEF_CONTROL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_pef_action_global_control (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs, IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ACTION_GLOBAL_CONTROL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_pef_startup_delay (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs, IPMI_PEF_CONFIGURATION_PARAMETER_PEF_STARTUP_DELAY) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_pef_alert_startup_delay (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs, IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ALERT_STARTUP_DELAY) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs, IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_EVENT_FILTERS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_event_filter_table (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs, IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_event_filter_table_data1_ (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_event_filter_table_data1_rs, IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE_DATA_1) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs, IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_ALERT_POLICY_ENTRIES) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs, IPMI_PEF_CONFIGURATION_PARAMETER_NUMBER_OF_ALERT_STRINGS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_alert_string_keys (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs, IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRING_KEYS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_alert_string (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs, IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRINGS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_pef_configuration_parameters_alert_policy_table (ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_pef_configuration_parameters_common (ctx, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs, IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_POLICY_TABLE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_set_last_processed_event_id (ipmi_ctx_t ctx, uint8_t set_record_id_for_last_record, uint16_t record_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_last_processed_event_id_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_last_processed_event_id_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_last_processed_event_id (set_record_id_for_last_record, record_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_last_processed_event_id (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_last_processed_event_id_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_last_processed_event_id_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_last_processed_event_id (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_alert_immediate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t destination_selector, uint8_t operation, uint8_t string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_alert_immediate_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_alert_immediate_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_alert_immediate (channel_number, destination_selector, operation, string_selector, send_alert_string, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_pet_acknowledge (ipmi_ctx_t ctx, uint16_t sequence_number, uint32_t local_timestamp, uint8_t event_source_type, uint8_t sensor_device, uint8_t sensor_number, uint32_t event_data, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_pet_acknowledge_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_pet_acknowledge_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_pet_acknowledge (sequence_number, local_timestamp, event_source_type, sensor_device, sensor_number, event_data, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.c0000644002055400205540000001407313527331636026671 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-rmcpplus-support-and-payload-cmds-api.h" #include "freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_user_payload_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, uint8_t operation, uint8_t standard_payload_1, uint8_t standard_payload_2, uint8_t standard_payload_3, uint8_t standard_payload_4, uint8_t standard_payload_5, uint8_t standard_payload_6, uint8_t standard_payload_7, uint8_t oem_payload_0, uint8_t oem_payload_1, uint8_t oem_payload_2, uint8_t oem_payload_3, uint8_t oem_payload_4, uint8_t oem_payload_5, uint8_t oem_payload_6, uint8_t oem_payload_7, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_user_payload_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_user_payload_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_user_payload_access (channel_number, user_id, operation, standard_payload_1, standard_payload_2, standard_payload_3, standard_payload_4, standard_payload_5, standard_payload_6, standard_payload_7, oem_payload_0, oem_payload_1, oem_payload_2, oem_payload_3, oem_payload_4, oem_payload_5, oem_payload_6, oem_payload_7, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_user_payload_access (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_user_payload_access_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_user_payload_access_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_user_payload_access (channel_number, user_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-sel-cmds-api.c0000644002055400205540000004225113527331636021705 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-sel-cmds-api.h" #include "freeipmi/cmds/ipmi-sel-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_sel_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sel_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sel_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sel_info (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sel_allocation_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sel_allocation_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sel_allocation_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sel_allocation_info (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_reserve_sel (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_reserve_sel_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_reserve_sel_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_reserve_sel (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sel_entry (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sel_entry_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sel_entry_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sel_entry (reservation_id, record_id, offset_into_record, bytes_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_delete_sel_entry (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_delete_sel_entry_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_delete_sel_entry_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_delete_sel_entry (reservation_id, record_id, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_clear_sel (ipmi_ctx_t ctx, uint16_t reservation_id, uint8_t operation, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_clear_sel_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_clear_sel_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_clear_sel (reservation_id, operation, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sel_time (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sel_time_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sel_time_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sel_time (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sel_time (ipmi_ctx_t ctx, uint32_t time, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sel_time_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sel_time_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sel_time (time, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sel_time_utc_offset (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sel_time_utc_offset_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sel_time_utc_offset_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sel_time_utc_offset (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sel_time_utc_offset (ipmi_ctx_t ctx, int16_t offset, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sel_time_utc_offset_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sel_time_utc_offset_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sel_time_utc_offset (offset, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_auxiliary_log_status (ipmi_ctx_t ctx, uint8_t log_type, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_auxiliary_log_status_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_auxiliary_log_status_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_auxiliary_log_status (log_type, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_auxiliary_log_status (ipmi_ctx_t ctx, uint8_t log_type, const void *log_data, unsigned int log_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_auxiliary_log_status_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_auxiliary_log_status_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_auxiliary_log_status (log_type, log_data, log_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-sdr-repository-cmds-api.c0000644002055400205540000002205413527331636024126 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-sdr-repository-cmds-api.h" #include "freeipmi/cmds/ipmi-sdr-repository-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_sdr_repository_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sdr_repository_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sdr_repository_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_repository_info (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sdr_repository_allocation_info (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sdr_repository_allocation_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sdr_repository_allocation_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_repository_allocation_info (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_reserve_sdr_repository (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_reserve_sdr_repository_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_reserve_sdr_repository_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_reserve_sdr_repository (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sdr (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sdr_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sdr (reservation_id, record_id, offset_into_record, bytes_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sdr_repository_time (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sdr_repository_time_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sdr_repository_time_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sdr_repository_time (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sdr_repository_time (ipmi_ctx_t ctx, uint32_t time, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sdr_repository_time_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sdr_repository_time_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sdr_repository_time (time, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_STORAGE_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-sensor-cmds-api.c0000644002055400205540000012777013527331636022445 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-sensor-cmds-api.h" #include "freeipmi/cmds/ipmi-sensor-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_get_device_sdr_info (ipmi_ctx_t ctx, uint8_t operation, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_device_sdr_info_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_sdr_info_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_device_sdr_info (operation, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_device_sdr (ipmi_ctx_t ctx, uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_device_sdr_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_sdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_device_sdr (reservation_id, record_id, offset_into_record, bytes_to_read, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_reserve_device_sdr_repository (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_reserve_device_sdr_repository_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_reserve_device_sdr_repository_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_reserve_device_sdr_repository (obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int ipmi_cmd_set_sensor_hysteresis (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t hysteresis_mask, uint8_t positive_going_threshold_hysteresis_value, uint8_t negative_going_threshold_hysteresis_value, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_hysteresis_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_hysteresis_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_hysteresis (sensor_number, hysteresis_mask, positive_going_threshold_hysteresis_value, negative_going_threshold_hysteresis_value, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int ipmi_cmd_get_sensor_hysteresis (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t hysteresis_mask, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_hysteresis_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_hysteresis_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_hysteresis (sensor_number, hysteresis_mask, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sensor_thresholds (ipmi_ctx_t ctx, uint8_t sensor_number, const uint8_t *lower_non_critical_threshold, const uint8_t *lower_critical_threshold, const uint8_t *lower_non_recoverable_threshold, const uint8_t *upper_non_critical_threshold, const uint8_t *upper_critical_threshold, const uint8_t *upper_non_recoverable_threshold, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_thresholds_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_thresholds_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_thresholds (sensor_number, lower_non_critical_threshold, lower_critical_threshold, lower_non_recoverable_threshold, upper_non_critical_threshold, upper_critical_threshold, upper_non_recoverable_threshold, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_thresholds (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_thresholds_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_thresholds_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_thresholds (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sensor_event_enable (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_event_enable_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_event_enable_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_event_enable (sensor_number, event_message_action, scanning_on_this_sensor, all_event_messages, assertion_event_bitmask, deassertion_event_bitmask, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sensor_event_enable_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_lower_non_critical_going_low, uint8_t assertion_event_lower_non_critical_going_high, uint8_t assertion_event_lower_critical_going_low, uint8_t assertion_event_lower_critical_going_high, uint8_t assertion_event_lower_non_recoverable_going_low, uint8_t assertion_event_lower_non_recoverable_going_high, uint8_t assertion_event_upper_non_critical_going_low, uint8_t assertion_event_upper_non_critical_going_high, uint8_t assertion_event_upper_critical_going_low, uint8_t assertion_event_upper_critical_going_high, uint8_t assertion_event_upper_non_recoverable_going_low, uint8_t assertion_event_upper_non_recoverable_going_high, uint8_t deassertion_event_lower_non_critical_going_low, uint8_t deassertion_event_lower_non_critical_going_high, uint8_t deassertion_event_lower_critical_going_low, uint8_t deassertion_event_lower_critical_going_high, uint8_t deassertion_event_lower_non_recoverable_going_low, uint8_t deassertion_event_lower_non_recoverable_going_high, uint8_t deassertion_event_upper_non_critical_going_low, uint8_t deassertion_event_upper_non_critical_going_high, uint8_t deassertion_event_upper_critical_going_low, uint8_t deassertion_event_upper_critical_going_high, uint8_t deassertion_event_upper_non_recoverable_going_low, uint8_t deassertion_event_upper_non_recoverable_going_high, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_event_enable_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_event_enable_threshold_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_event_enable_threshold (sensor_number, event_message_action, scanning_on_this_sensor, all_event_messages, assertion_event_lower_non_critical_going_low, assertion_event_lower_non_critical_going_high, assertion_event_lower_critical_going_low, assertion_event_lower_critical_going_high, assertion_event_lower_non_recoverable_going_low, assertion_event_lower_non_recoverable_going_high, assertion_event_upper_non_critical_going_low, assertion_event_upper_non_critical_going_high, assertion_event_upper_critical_going_low, assertion_event_upper_critical_going_high, assertion_event_upper_non_recoverable_going_low, assertion_event_upper_non_recoverable_going_high, deassertion_event_lower_non_critical_going_low, deassertion_event_lower_non_critical_going_high, deassertion_event_lower_critical_going_low, deassertion_event_lower_critical_going_high, deassertion_event_lower_non_recoverable_going_low, deassertion_event_lower_non_recoverable_going_high, deassertion_event_upper_non_critical_going_low, deassertion_event_upper_non_critical_going_high, deassertion_event_upper_critical_going_low, deassertion_event_upper_critical_going_high, deassertion_event_upper_non_recoverable_going_low, deassertion_event_upper_non_recoverable_going_high, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sensor_event_enable_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_state_bit_0, uint8_t assertion_event_state_bit_1, uint8_t assertion_event_state_bit_2, uint8_t assertion_event_state_bit_3, uint8_t assertion_event_state_bit_4, uint8_t assertion_event_state_bit_5, uint8_t assertion_event_state_bit_6, uint8_t assertion_event_state_bit_7, uint8_t assertion_event_state_bit_8, uint8_t assertion_event_state_bit_9, uint8_t assertion_event_state_bit_10, uint8_t assertion_event_state_bit_11, uint8_t assertion_event_state_bit_12, uint8_t assertion_event_state_bit_13, uint8_t assertion_event_state_bit_14, uint8_t deassertion_event_state_bit_0, uint8_t deassertion_event_state_bit_1, uint8_t deassertion_event_state_bit_2, uint8_t deassertion_event_state_bit_3, uint8_t deassertion_event_state_bit_4, uint8_t deassertion_event_state_bit_5, uint8_t deassertion_event_state_bit_6, uint8_t deassertion_event_state_bit_7, uint8_t deassertion_event_state_bit_8, uint8_t deassertion_event_state_bit_9, uint8_t deassertion_event_state_bit_10, uint8_t deassertion_event_state_bit_11, uint8_t deassertion_event_state_bit_12, uint8_t deassertion_event_state_bit_13, uint8_t deassertion_event_state_bit_14, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_event_enable_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_event_enable_discrete_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_event_enable_discrete (sensor_number, event_message_action, scanning_on_this_sensor, all_event_messages, assertion_event_state_bit_0, assertion_event_state_bit_1, assertion_event_state_bit_2, assertion_event_state_bit_3, assertion_event_state_bit_4, assertion_event_state_bit_5, assertion_event_state_bit_6, assertion_event_state_bit_7, assertion_event_state_bit_8, assertion_event_state_bit_9, assertion_event_state_bit_10, assertion_event_state_bit_11, assertion_event_state_bit_12, assertion_event_state_bit_13, assertion_event_state_bit_14, deassertion_event_state_bit_0, deassertion_event_state_bit_1, deassertion_event_state_bit_2, deassertion_event_state_bit_3, deassertion_event_state_bit_4, deassertion_event_state_bit_5, deassertion_event_state_bit_6, deassertion_event_state_bit_7, deassertion_event_state_bit_8, deassertion_event_state_bit_9, deassertion_event_state_bit_10, deassertion_event_state_bit_11, deassertion_event_state_bit_12, deassertion_event_state_bit_13, deassertion_event_state_bit_14, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_event_enable (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_event_enable_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_event_enable_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_event_enable (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_event_enable_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_event_enable_threshold_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_event_enable_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_event_enable (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_event_enable_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_event_enable_discrete_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_event_enable_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_event_enable (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_re_arm_sensor_events (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_re_arm_sensor_events_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_re_arm_sensor_events_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_re_arm_sensor_events (sensor_number, re_arm_all_event_status_from_this_sensor, re_arm_assertion_event, re_arm_deassertion_event, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_re_arm_sensor_events_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t lun, uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_re_arm_sensor_events_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_re_arm_sensor_events_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_re_arm_sensor_events (sensor_number, re_arm_all_event_status_from_this_sensor, re_arm_assertion_event, re_arm_deassertion_event, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd_ipmb (ctx, channel_number, slave_address, lun, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_reading (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_reading_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_reading (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_reading_ipmb (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t slave_address, uint8_t lun, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_reading_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_reading (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd_ipmb (ctx, channel_number, slave_address, lun, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_reading_threshold (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_reading_threshold_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_reading (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sensor_reading_discrete (ipmi_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_get_sensor_reading_discrete_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sensor_reading_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sensor_reading (sensor_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sensor_reading_and_event_status (ipmi_ctx_t ctx, uint8_t sensor_number, uint8_t sensor_reading_operation, uint8_t deassertion_bits_operation, uint8_t assertion_bits_operation, uint8_t event_data_bytes_operation, uint8_t sensor_reading, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sensor_reading_and_event_status_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sensor_reading_and_event_status_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sensor_reading_and_event_status (sensor_number, sensor_reading_operation, deassertion_bits_operation, assertion_bits_operation, event_data_bytes_operation, sensor_reading, assertion_event_bitmask, deassertion_event_bitmask, event_data1, event_data2, event_data3, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_SENSOR_EVENT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-serial-modem-cmds-api.c0000644002055400205540000005545013527331636023505 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-serial-modem-cmds-api.h" #include "freeipmi/cmds/ipmi-serial-modem-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-serial-modem-configuration-parameters-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_serial_modem_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration (channel_number, parameter_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration_set_in_progress (channel_number, state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t basic_mode, uint8_t ppp_mode, uint8_t terminal_mode, uint8_t connect_mode, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_connection_mode_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration_connection_mode (channel_number, basic_mode, ppp_mode, terminal_mode, connect_mode, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t dtr_hangup, uint8_t flow_control, uint8_t bit_rate, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (channel_number, dtr_hangup, flow_control, bit_rate, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t page_blackout_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration_page_blackout_interval (channel_number, page_blackout_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t call_retry_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_serial_modem_configuration_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_serial_modem_configuration_call_retry_interval (channel_number, call_retry_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_get_serial_modem_configuration_parameters_common (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rs_expected); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_serial_modem_configuration_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_serial_modem_configuration (channel_number, get_parameter, parameter_selector, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_serial_modem_configuration (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_serial_modem_configuration_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_set_in_progress_rs, IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_serial_modem_configuration_connection_mode (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_connection_mode_rs, IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CONNECTION_MODE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs, IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_IPMI_MESSAGING_COMM_SETTINGS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_serial_modem_configuration_call_retry_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs, IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CALL_RETRY_INTERVAL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_serial_modem_configuration_page_blackout_interval (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_serial_modem_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs, IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PAGE_BLACKOUT_INTERVAL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } freeipmi-1.6.4/libfreeipmi/api/ipmi-sol-cmds-api.c0000644002055400205540000010164713527331636021724 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/api/ipmi-sol-cmds-api.h" #include "freeipmi/cmds/ipmi-sol-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-sol-configuration-parameters-spec.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int ipmi_cmd_set_sol_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters (channel_number, parameter_selector, configuration_parameter_data, configuration_parameter_data_len, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_set_in_progress (channel_number, state, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t sol_enable, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_enable (channel_number, sol_enable, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t sol_privilege_level, uint8_t force_sol_payload_authentication, uint8_t force_sol_payload_encryption, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_authentication (channel_number, sol_privilege_level, force_sol_payload_authentication, force_sol_payload_encryption, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t character_accumulate_interval, uint8_t character_send_threshold, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (channel_number, character_accumulate_interval, character_send_threshold, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t retry_count, uint8_t retry_interval, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_retry (channel_number, retry_count, retry_interval, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (channel_number, bit_rate, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (channel_number, bit_rate, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_set_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint16_t port_number, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_set_sol_configuration_parameters_rs) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_set_sol_configuration_parameters_sol_payload_port_number (channel_number, port_number, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } static int _ipmi_cmd_get_sol_configuration_parameters_common (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs, fiid_field_t *tmpl_cmd_rs_expected, uint8_t parameter_selector) { fiid_obj_t obj_cmd_rq = NULL; int rv = -1; assert (tmpl_cmd_rs_expected); if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } /* remaining parameter checks in fill function */ if (!fiid_obj_valid (obj_cmd_rs)) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rs, tmpl_cmd_rs_expected) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_cmd_get_sol_configuration_parameters (channel_number, get_parameter, parameter_selector, set_selector, block_selector, obj_cmd_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (api_ipmi_cmd (ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_TRANSPORT_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); return (rv); } int ipmi_cmd_get_sol_configuration_parameters (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_rs, parameter_selector) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_set_in_progress (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_set_in_progress_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_enable (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_authentication (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs, IPMI_SOL_CONFIGURATION_PARAMETER_CHARACTER_ACCUMULATE_INTERVAL_AND_SEND_THRESHOLD) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_retry (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NON_VOLATILE_BIT_RATE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_payload_channel (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_CHANNEL) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } int ipmi_cmd_get_sol_configuration_parameters_sol_payload_port_number (ipmi_ctx_t ctx, uint8_t channel_number, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs) { if (_ipmi_cmd_get_sol_configuration_parameters_common (ctx, channel_number, get_parameter, set_selector, block_selector, obj_cmd_rs, tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs, IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT_NUMBER) < 0) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } return (0); } freeipmi-1.6.4/libfreeipmi/api/ipmi-ssif-driver-api.c0000644002055400205540000005631313527331636022437 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/util/ipmi-ipmb-util.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-ssif-driver-api.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" /* Values based on experiences */ #define IPMI_SSIF_IPMB_RETRANSMISSION_COUNT 32 #define IPMI_SSIF_IPMB_REREAD_COUNT 32 #define IPMI_SSIF_IPMB_REREAD_WAIT 10000 fiid_template_t tmpl_ssif_raw = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; static void _api_ssif_dump (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, unsigned int debug_direction, fiid_template_t tmpl_cmd) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) && pkt && pkt_len && (debug_direction == DEBUG_UTIL_DIRECTION_REQUEST || debug_direction == DEBUG_UTIL_DIRECTION_RESPONSE)); /* Don't cleanup/return an error here. It's just debug code. */ debug_hdr_cmd (DEBUG_UTIL_TYPE_INBAND, debug_direction, net_fn, cmd, group_extension, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); ipmi_dump_ssif_packet (STDERR_FILENO, NULL, hdrbuf, NULL, pkt, pkt_len, tmpl_cmd); } static void _api_ssif_dump_rq (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { fiid_field_t *tmpl_cmd = NULL; if ((tmpl_cmd = fiid_obj_template (obj_cmd_rq))) { _api_ssif_dump (ctx, pkt, pkt_len, cmd, net_fn, group_extension, DEBUG_UTIL_DIRECTION_REQUEST, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static void _api_ssif_dump_rs (ipmi_ctx_t ctx, const void *pkt, unsigned int pkt_len, uint8_t cmd, uint8_t net_fn, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { fiid_field_t *tmpl_cmd = NULL; if ((tmpl_cmd = fiid_obj_template (obj_cmd_rs))) { _api_ssif_dump (ctx, pkt, pkt_len, cmd, net_fn, group_extension, DEBUG_UTIL_DIRECTION_RESPONSE, tmpl_cmd); fiid_template_free (tmpl_cmd); } } static int _ssif_cmd_write (ipmi_ctx_t ctx, uint8_t cmd, uint8_t group_extension, fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, send_len; int rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && fiid_obj_valid (obj_cmd_rq)); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_hdr_ipmi_kcs (ctx->target.lun, ctx->target.net_fn, ctx->io.inband.rq.obj_hdr) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((send_len = assemble_ipmi_kcs_pkt (ctx->io.inband.rq.obj_hdr, obj_cmd_rq, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && send_len) _api_ssif_dump_rq (ctx, pkt, send_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rq); if (ipmi_ssif_write (ctx->io.inband.ssif_ctx, pkt, send_len) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } rv = 0; cleanup: free (pkt); return (rv); } static int _ssif_cmd_read (ipmi_ctx_t ctx, uint8_t cmd, uint8_t group_extension, fiid_obj_t obj_cmd_rs) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, read_len; fiid_field_t *tmpl = NULL; int ret, rv = -1; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(tmpl = fiid_obj_template (obj_cmd_rs))) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if ((cmd_len = fiid_template_len_bytes (tmpl)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = malloc (pkt_len))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((read_len = ipmi_ssif_read (ctx->io.inband.ssif_ctx, pkt, pkt_len)) < 0) { API_SSIF_ERRNUM_TO_API_ERRNUM (ctx, ipmi_ssif_ctx_errnum (ctx->io.inband.ssif_ctx)); goto cleanup; } if (!read_len) { API_SET_ERRNUM (ctx, IPMI_ERR_SYSTEM_ERROR); goto cleanup; } if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP && read_len) _api_ssif_dump_rs (ctx, pkt, read_len, cmd, ctx->target.net_fn, group_extension, obj_cmd_rs); if ((ret = unassemble_ipmi_kcs_pkt (pkt, read_len, ctx->io.inband.rs.obj_hdr, obj_cmd_rs, intf_flags)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* IPMI didn't return enough data back to you */ if (!ret) { API_SET_ERRNUM (ctx, IPMI_ERR_IPMI_ERROR); goto cleanup; } rv = 0; cleanup: free (pkt); fiid_template_free (tmpl); return (rv); } int api_ssif_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { uint8_t cmd = 0; /* used for debugging */ uint8_t group_extension = 0; /* used for debugging */ uint64_t val; struct timespec request, remain; uint8_t retry = IPMI_SSIF_RETRY_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_DEBUG_DUMP) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "cmd", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else cmd = val; if (IPMI_NET_FN_GROUP_EXTENSION (ctx->target.net_fn)) { /* ignore error, continue on */ if (FIID_OBJ_GET (obj_cmd_rq, "group_extension_identification", &val) < 0) API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); else group_extension = val; } } if (_ssif_cmd_write (ctx, cmd, group_extension, obj_cmd_rq) < 0) return (-1); /****************************************************************************** 12.9 SMBus NACKs and Error Recovery: ==================================== The BMC can NACK the SMBus host controller if it is not ready to accept a new transaction. Typically, this will be exhibited by the BMC NACK'ing its slave address. If the BMC NACKs a single part transaction, software can simply retry it. If a 'middle' or 'end' transaction is NACK'd, software should not retry the particular but should restart the multi-part read or write from the beginning Start transaction for the transfer. *******************************************************************************/ if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0) { while (1) { request.tv_sec = 0; request.tv_nsec = IPMI_SSIF_TIMEOUT_DEFAULT; if (nanosleep (&request, &remain) < 0 ) return (-1); if (_ssif_cmd_read (ctx, cmd, group_extension, obj_cmd_rs) < 0) { if (retry == 0) return (-1); retry--; } else break; } } return (0); } static int _api_ssif_ipmb_send (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq) { struct ipmi_ctx_target target_save; uint8_t buf[IPMI_MAX_PKT_LEN]; fiid_obj_t obj_ipmb_msg_hdr_rq = NULL; fiid_obj_t obj_ipmb_msg_rq = NULL; fiid_obj_t obj_send_cmd_rs = NULL; int len, ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1); if (!(obj_ipmb_msg_hdr_rq = fiid_obj_create (tmpl_ipmb_msg_hdr_rq))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_ipmb_msg_rq = fiid_obj_create (tmpl_ipmb_msg))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_send_cmd_rs = fiid_obj_create (tmpl_cmd_send_message_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fill_ipmb_msg_hdr (ctx->target.rs_addr, ctx->target.net_fn, ctx->target.lun, IPMI_SLAVE_ADDRESS_BMC, IPMI_BMC_IPMB_LUN_BMC, ctx->io.inband.rq_seq, obj_ipmb_msg_hdr_rq) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (assemble_ipmi_ipmb_msg (obj_ipmb_msg_hdr_rq, obj_cmd_rq, obj_ipmb_msg_rq, IPMI_INTERFACE_FLAGS_DEFAULT) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if ((len = fiid_obj_get_all (obj_ipmb_msg_rq, buf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_ipmb_msg_rq); goto cleanup; } /* send_message will send to the BMC, so clear out target information */ memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; ret = ipmi_cmd_send_message (ctx, target_save.channel_number, IPMI_SEND_MESSAGE_AUTHENTICATION_NOT_REQUIRED, IPMI_SEND_MESSAGE_ENCRYPTION_NOT_REQUIRED, IPMI_SEND_MESSAGE_TRACKING_OPERATION_NO_TRACKING, buf, len, obj_send_cmd_rs); /* restore target info */ memcpy (&ctx->target, &target_save, sizeof (target_save)); if (ret < 0) { /* assume these mean can't send message, bad slave address, etc. */ if (ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION) == 1 || ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR) == 1 || ipmi_check_completion_code (obj_send_cmd_rs, IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_send_cmd_rs); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_hdr_rq); fiid_obj_destroy (obj_ipmb_msg_rq); fiid_obj_destroy (obj_send_cmd_rs); return (rv); } static int _api_ssif_ipmb_recv (ipmi_ctx_t ctx, fiid_obj_t obj_ipmb_msg_hdr_rs, fiid_obj_t obj_ipmb_msg_trlr, fiid_obj_t obj_cmd_rs) { struct ipmi_ctx_target target_save; uint8_t buf[IPMI_MAX_PKT_LEN]; fiid_obj_t obj_ipmb_msg_rs = NULL; fiid_obj_t obj_get_cmd_rs = NULL; int len, ret, rv = -1; unsigned int intf_flags = IPMI_INTERFACE_FLAGS_DEFAULT; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && fiid_obj_valid (obj_ipmb_msg_hdr_rs) && fiid_obj_valid (obj_ipmb_msg_trlr) && fiid_obj_valid (obj_cmd_rs)); if (ctx->flags & IPMI_FLAGS_NO_LEGAL_CHECK) intf_flags |= IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK; if (!(obj_ipmb_msg_rs = fiid_obj_create (tmpl_ipmb_msg))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_get_cmd_rs = fiid_obj_create (tmpl_cmd_get_message_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* get_message will send to the BMC, so clear out target information */ memcpy (&target_save, &ctx->target, sizeof (target_save)); ctx->target.channel_number_is_set = 0; ctx->target.rs_addr_is_set = 0; ret = ipmi_cmd_get_message (ctx, obj_get_cmd_rs); /* restore target info */ memcpy (&ctx->target, &target_save, sizeof (target_save)); if (ret < 0) { if (ipmi_check_completion_code (obj_get_cmd_rs, IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE) == 1) API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); else API_BAD_RESPONSE_TO_API_ERRNUM (ctx, obj_get_cmd_rs); goto cleanup; } if ((len = fiid_obj_get_data (obj_get_cmd_rs, "message_data", buf, IPMI_MAX_PKT_LEN)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_get_cmd_rs); goto cleanup; } if (fiid_obj_set_all (obj_ipmb_msg_rs, buf, len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_ipmb_msg_rs); goto cleanup; } if (unassemble_ipmi_ipmb_msg (obj_ipmb_msg_rs, obj_ipmb_msg_hdr_rs, obj_cmd_rs, obj_ipmb_msg_trlr, intf_flags) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_rs); fiid_obj_destroy (obj_get_cmd_rs); return (rv); } int api_ssif_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { fiid_obj_t obj_ipmb_msg_hdr_rs = NULL; fiid_obj_t obj_ipmb_msg_trlr = NULL; unsigned retransmission_count = 0; unsigned reread_count = 0; int ret, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (!(obj_ipmb_msg_hdr_rs = fiid_obj_create (tmpl_ipmb_msg_hdr_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_ipmb_msg_trlr = fiid_obj_create (tmpl_ipmb_msg_trlr))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* for debugging */ ctx->tmpl_ipmb_cmd_rq = fiid_obj_template (obj_cmd_rq); ctx->tmpl_ipmb_cmd_rs = fiid_obj_template (obj_cmd_rs); if (_api_ssif_ipmb_send (ctx, obj_cmd_rq) < 0) goto cleanup; while (1) { if (_api_ssif_ipmb_recv (ctx, obj_ipmb_msg_hdr_rs, obj_ipmb_msg_trlr, obj_cmd_rs) < 0) { if (ctx->errnum == IPMI_ERR_MESSAGE_TIMEOUT) { reread_count++; if (reread_count > IPMI_SSIF_IPMB_REREAD_COUNT) { API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); goto cleanup; } /* Wait a little bit to avoid spinning */ usleep (IPMI_SSIF_IPMB_REREAD_WAIT); continue; } goto cleanup; } if ((ret = ipmi_ipmb_check_rq_seq (obj_ipmb_msg_hdr_rs, ctx->io.inband.rq_seq)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* if it's the wrong rq_seq, get another packet */ if (!ret) continue; if ((ret = ipmi_ipmb_check_checksum (IPMI_SLAVE_ADDRESS_BMC, obj_ipmb_msg_hdr_rs, obj_cmd_rs, obj_ipmb_msg_trlr)) < 0) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* if the checksum is wrong, assume an error and resend */ if (!ret) { retransmission_count++; if (retransmission_count > IPMI_SSIF_IPMB_RETRANSMISSION_COUNT) { API_SET_ERRNUM (ctx, IPMI_ERR_MESSAGE_TIMEOUT); goto cleanup; } ctx->io.inband.rq_seq = ((ctx->io.inband.rq_seq) + 1) % (IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX + 1); if (_api_ssif_ipmb_send (ctx, obj_cmd_rq) < 0) goto cleanup; continue; } break; } rv = 0; cleanup: ctx->io.inband.rq_seq = ((ctx->io.inband.rq_seq) + 1) % (IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX + 1); fiid_obj_destroy (obj_ipmb_msg_hdr_rs); fiid_obj_destroy (obj_ipmb_msg_trlr); fiid_template_free (ctx->tmpl_ipmb_cmd_rq); ctx->tmpl_ipmb_cmd_rq = NULL; fiid_template_free (ctx->tmpl_ipmb_cmd_rs); ctx->tmpl_ipmb_cmd_rs = NULL; return (rv); } int api_ssif_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_ssif_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_ssif_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_ssif_cmd (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } int api_ssif_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SSIF && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_ssif_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_ssif_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (api_ssif_cmd_ipmb (ctx, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-ssif-driver-api.h0000644002055400205540000000323513527331636022437 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SSIF_DRIVER_API_H #define IPMI_SSIF_DRIVER_API_H #include #include #include #define IPMI_SSIF_RETRY_DEFAULT 5 #define IPMI_SSIF_TIMEOUT_DEFAULT 20000000 /* 20 ms */ int api_ssif_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_ssif_cmd_ipmb (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_ssif_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); int api_ssif_cmd_raw_ipmb (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_SSIF_DRIVER_API_H */ freeipmi-1.6.4/libfreeipmi/api/ipmi-sunbmc-driver-api.c0000644002055400205540000000716713527331636022765 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/driver/ipmi-sunbmc-driver.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-api-defs.h" #include "ipmi-api-trace.h" #include "ipmi-api-util.h" #include "ipmi-sunbmc-driver-api.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" fiid_template_t tmpl_sunbmc_raw = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8192, "raw_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int api_sunbmc_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SUNBMC && fiid_obj_valid (obj_cmd_rq) && fiid_obj_packet_valid (obj_cmd_rq) == 1 && fiid_obj_valid (obj_cmd_rs)); if (ipmi_sunbmc_cmd (ctx->io.inband.sunbmc_ctx, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_SUNBMC_ERRNUM_TO_API_ERRNUM (ctx, ipmi_sunbmc_ctx_errnum (ctx->io.inband.sunbmc_ctx)); return (-1); } return (0); } int api_sunbmc_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int len, rv = -1; assert (ctx && ctx->magic == IPMI_CTX_MAGIC && ctx->type == IPMI_DEVICE_SUNBMC && buf_rq && buf_rq_len && buf_rs && buf_rs_len); if (!(obj_cmd_rq = fiid_obj_create (tmpl_sunbmc_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_sunbmc_raw))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_cmd_rq, buf_rq, buf_rq_len) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (ipmi_sunbmc_cmd (ctx->io.inband.sunbmc_ctx, ctx->target.lun, ctx->target.net_fn, obj_cmd_rq, obj_cmd_rs) < 0) { API_SUNBMC_ERRNUM_TO_API_ERRNUM (ctx, ipmi_sunbmc_ctx_errnum (ctx->io.inband.sunbmc_ctx)); goto cleanup; } if ((len = fiid_obj_get_all (obj_cmd_rs, buf_rs, buf_rs_len)) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/libfreeipmi/api/ipmi-sunbmc-driver-api.h0000644002055400205540000000233513527331636022762 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SUNBMC_DRIVER_API_H #define IPMI_SUNBMC_DRIVER_API_H #include #include #include int api_sunbmc_cmd (ipmi_ctx_t ctx, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs); int api_sunbmc_cmd_raw (ipmi_ctx_t ctx, const void *buf_rq, unsigned int buf_rq_len, void *buf_rs, unsigned int buf_rs_len); #endif /* IPMI_SUNBMC_DRIVER_API_H */ freeipmi-1.6.4/libfreeipmi/cmds/0000755002055400205540000000000013527342542016476 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.c0000644002055400205540000002240413527331636024203 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_reset_watchdog_timer_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reset_watchdog_timer_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_watchdog_timer_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "timer_use", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "stop_timer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "log", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "timeout_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "pre_timeout_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pre_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.bios_frb2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.bios_post", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.os_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.sms_os", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "initial_countdown_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_watchdog_timer_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_watchdog_timer_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_watchdog_timer_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 3, "timer_use", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "log", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "timeout_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "pre_timeout_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pre_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.bios_frb2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.bios_post", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.os_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.sms_os", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "timer_use_expiration_flag.oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "initial_countdown_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "present_countdown_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; int fill_cmd_reset_watchdog_timer (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_reset_watchdog_timer_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_RESET_WATCHDOG_TIMER); return (0); } int fill_cmd_set_watchdog_timer (uint8_t timer_use, uint8_t stop_timer, uint8_t log, uint8_t timeout_action, uint8_t pre_timeout_interrupt, uint8_t pre_timeout_interval, uint8_t timer_use_expiration_flag_bios_frb2, uint8_t timer_use_expiration_flag_bios_post, uint8_t timer_use_expiration_flag_os_load, uint8_t timer_use_expiration_flag_sms_os, uint8_t timer_use_expiration_flag_oem, uint16_t initial_countdown_value, fiid_obj_t obj_cmd_rq) { if (!IPMI_BMC_WATCHDOG_TIMER_LOG_VALID (log) || !IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_VALID (stop_timer) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_VALID (timer_use) || !IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_VALID (pre_timeout_interrupt) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID (timer_use_expiration_flag_bios_frb2) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID (timer_use_expiration_flag_bios_post) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID (timer_use_expiration_flag_os_load) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID (timer_use_expiration_flag_sms_os) || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_EXPIRATION_VALID (timer_use_expiration_flag_oem) || !IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_VALID (timeout_action) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_watchdog_timer_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_WATCHDOG_TIMER); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use", timer_use); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "stop_timer", stop_timer); FILL_FIID_OBJ_SET (obj_cmd_rq, "log", log); FILL_FIID_OBJ_SET (obj_cmd_rq, "timeout_action", timeout_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "pre_timeout_interrupt", pre_timeout_interrupt); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "pre_timeout_interval", pre_timeout_interval); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use_expiration_flag.bios_frb2", timer_use_expiration_flag_bios_frb2); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use_expiration_flag.bios_post", timer_use_expiration_flag_bios_post); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use_expiration_flag.os_load", timer_use_expiration_flag_os_load); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use_expiration_flag.sms_os", timer_use_expiration_flag_sms_os); FILL_FIID_OBJ_SET (obj_cmd_rq, "timer_use_expiration_flag.oem", timer_use_expiration_flag_oem); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved5", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved6", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "initial_countdown_value", initial_countdown_value); return (0); } int fill_cmd_get_watchdog_timer (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_watchdog_timer_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_WATCHDOG_TIMER); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-chassis-cmds.c0000644002055400205540000015450013527331636022166 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-chassis-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-system-boot-option-parameters-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_chassis_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_chassis_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "capabilities_flags.provides_intrusion_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "capabilities_flags.provides_front_panel_lockout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "capabilities_flags.provides_diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "capabilities_flags.provides_power_interlock", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "capabilities_flags.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_info_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sdr_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sel_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "system_management_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bridge_device_address", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_chassis_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_chassis_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "current_power_state.power_is_on", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_power_state.power_overload", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_power_state.interlock", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_power_state.power_fault", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_power_state.power_control_fault", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "current_power_state.power_restore_policy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_power_state.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "last_power_event.ac_failed", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "last_power_event.power_down_caused_by_power_overload", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "last_power_event.power_down_caused_by_power_interlock_being_activated", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "last_power_event.power_down_caused_by_power_fault", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "last_power_event.power_on_entered_via_ipmi", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "last_power_event.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.chassis_intrusion_active", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.front_panel_lockout_active", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.drive_fault", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.cooling_fan_fault_detected", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "misc_chassis_state.chassis_identify_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.chassis_identify_command_and_state_info_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "misc_chassis_state.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.power_off_button_disabled", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.reset_button_disabled", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.diagnostic_interrupt_button_disabled", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.standby_button_disabled", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.power_off_button_disable_allowed", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.reset_button_disable_allowed", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.diagnostic_interrupt_button_disable_allowed", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "front_panel.standby_button_disable_allowed", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_chassis_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "chassis_control", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* NOTE: The implementation is allowed to return the completion code prior to performing the selected control action if necessary. */ fiid_template_t tmpl_cmd_chassis_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_chassis_identify_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "identify_interval", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "force_identify", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_chassis_identify_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_front_panel_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "disable_power_off_button_for_power_off_only", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "disable_reset_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "disable_diagnostic_interrupt_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "disable_standby_button_for_entering_standby", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_front_panel_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_power_restore_policy_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "power_restore_policy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_power_restore_policy_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "powered_off_after_ac_mains_returns", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "restoring_power_to_state_when_ac_mains_was_lost", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "always_powering_up_after_ac_mains_returns", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_power_cycle_interval_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_set_power_cycle_interval_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_restart_cause_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_restart_cause_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "restart_cause", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 296, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE }, { 0, "", 0}, }; fiid_template_t tmpl_cmd_set_system_boot_options_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_set_system_boot_options_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_selector_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "service_partition_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_service_partition_scan_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "service_partition_discovered", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "service_partition_scan", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_or_post_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "os_loader_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "os_or_service_partition_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sms_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_boot_flags_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_boot_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "boot_flags_persistent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "boot_flags_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_reset_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "screen_blank", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_keyboard", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cmos_clear", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "console_redirection", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_sleep_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_password_bypass", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_progress_event_traps", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "firmware_bios_verbosity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_via_power_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "bios_mux_control_override", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_shared_mode_override", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "device_instance_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_source.channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_source.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "boot_info_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: 16 bytes per block, 16*8 = 128 bits */ fiid_template_t tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "block_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_get_system_boot_options_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 296, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_get_system_boot_options_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_selector_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "service_partition_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_service_partition_scan_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "service_partition_discovered", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "service_partition_scan", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_boot_info_acknowledge_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_write_bit_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_or_post_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "os_loader_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "os_or_service_partition_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sms_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_handled_boot_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_boot_options_boot_flags_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_boot_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "boot_flags_persistent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "boot_flags_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_reset_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "screen_blank", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_keyboard", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cmos_clear", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "console_redirection", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_sleep_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_password_bypass", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_progress_event_traps", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "firmware_bios_verbosity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lock_out_via_power_button", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "bios_mux_control_override", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bios_shared_mode_override", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "device_instance_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_source.channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "boot_source.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "boot_info_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; /* achu: 16 bytes per block, 16*8 = 128 bits */ fiid_template_t tmpl_cmd_get_system_boot_options_boot_initiator_mailbox_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "parameter_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "parameter_valid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "block_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0}, }; fiid_template_t tmpl_cmd_get_power_on_hours_counter_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_power_on_hours_counter_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "minutes_per_counter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "counter_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0}, }; int fill_cmd_get_chassis_capabilities (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_chassis_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHASSIS_CAPABILITIES); return (0); } int fill_cmd_get_chassis_status (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_chassis_status_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHASSIS_STATUS); return (0); } int fill_cmd_chassis_control (uint8_t chassis_control, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHASSIS_CONTROL_VALID (chassis_control) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_chassis_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CHASSIS_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "chassis_control", chassis_control); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_chassis_identify (const uint8_t *identify_interval, const uint8_t *force_identify, fiid_obj_t obj_cmd_rq) { if ((force_identify && !IPMI_CHASSIS_FORCE_IDENTIFY_VALID (*force_identify)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_chassis_identify_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CHASSIS_IDENTIFY); if (identify_interval) { FILL_FIID_OBJ_SET (obj_cmd_rq, "identify_interval", *identify_interval); if (force_identify) { FILL_FIID_OBJ_SET (obj_cmd_rq, "force_identify", *force_identify); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); } } return (0); } int fill_cmd_set_front_panel_enables (uint8_t disable_power_off_button_for_power_off_only, uint8_t disable_reset_button, uint8_t disable_diagnostic_interrupt_button, uint8_t disable_standby_button_for_entering_standby, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHASSIS_BUTTON_VALID (disable_power_off_button_for_power_off_only) || !IPMI_CHASSIS_BUTTON_VALID (disable_reset_button) || !IPMI_CHASSIS_BUTTON_VALID (disable_diagnostic_interrupt_button) || !IPMI_CHASSIS_BUTTON_VALID (disable_standby_button_for_entering_standby) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_front_panel_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_FRONT_PANEL_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "disable_power_off_button_for_power_off_only", disable_power_off_button_for_power_off_only); FILL_FIID_OBJ_SET (obj_cmd_rq, "disable_reset_button", disable_reset_button); FILL_FIID_OBJ_SET (obj_cmd_rq, "disable_diagnostic_interrupt_button", disable_diagnostic_interrupt_button); FILL_FIID_OBJ_SET (obj_cmd_rq, "disable_standby_button_for_entering_standby", disable_standby_button_for_entering_standby); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_power_restore_policy (uint8_t power_restore_policy, fiid_obj_t obj_cmd_rq) { if (!IPMI_POWER_RESTORE_POLICY_VALID (power_restore_policy) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_power_restore_policy_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_POWER_RESTORE_POLICY); FILL_FIID_OBJ_SET (obj_cmd_rq, "power_restore_policy", power_restore_policy); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_power_cycle_interval (uint8_t interval, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_power_cycle_interval_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_POWER_CYCLE_INTERVAL); FILL_FIID_OBJ_SET (obj_cmd_rq, "interval", interval); return (0); } int fill_cmd_get_system_restart_cause (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_system_restart_cause_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SYSTEM_RESTART_CAUSE); return (0); } int fill_cmd_set_system_boot_options (uint8_t parameter_selector, uint8_t parameter_valid, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if ((!IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_system_boot_options_set_in_progress (uint8_t parameter_valid, uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !IPMI_SYSTEM_BOOT_OPTION_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SET_IN_PROGRESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_system_boot_options_service_partition_selector (uint8_t parameter_valid, uint8_t service_partition_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_service_partition_selector_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SELECTOR); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "service_partition_selector", service_partition_selector); return (0); } int fill_cmd_set_system_boot_options_service_partition_scan (uint8_t parameter_valid, uint8_t service_partition_discovered, uint8_t service_partition_scan, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_DISCOVERED_VALID (service_partition_discovered) || !IPMI_SYSTEM_BOOT_OPTION_SERVICE_PARTITION_SCAN_VALID (service_partition_scan) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_service_partition_scan_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SERVICE_PARTITION_SCAN); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "service_partition_discovered", service_partition_discovered); FILL_FIID_OBJ_SET (obj_cmd_rq, "service_partition_scan", service_partition_scan); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (uint8_t parameter_valid, uint8_t dont_clear_on_power_up, uint8_t dont_clear_on_pushbutton_reset_soft_reset, uint8_t dont_clear_on_watchdog_timeout, uint8_t dont_clear_on_chassis_control, uint8_t dont_clear_on_PEF, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID (dont_clear_on_power_up) || !IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID (dont_clear_on_pushbutton_reset_soft_reset) || !IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID (dont_clear_on_watchdog_timeout) || !IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID (dont_clear_on_chassis_control) || !IPMI_SYSTEM_BOOT_OPTION_CLEAR_VALID_BIT_VALID (dont_clear_on_PEF) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BMC_BOOT_FLAG_VALID_BIT_CLEARING); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_power_up_via_power_pushbutton_or_wake_event", dont_clear_on_power_up); FILL_FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_pushbutton_reset_soft_reset", dont_clear_on_pushbutton_reset_soft_reset); FILL_FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_watchdog_timeout", dont_clear_on_watchdog_timeout); FILL_FIID_OBJ_SET (obj_cmd_rq, "dont_automatically_clear_boot_flag_valid_bit_if_chassis_control_command_not_received_within_60_second_timeout", dont_clear_on_chassis_control); FILL_FIID_OBJ_SET (obj_cmd_rq, "dont_clear_valid_bit_on_reset_power_cycle_caused_by_PEF", dont_clear_on_PEF); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_system_boot_options_boot_info_acknowledge (uint8_t parameter_valid, const uint8_t *bios_or_post_handled_boot_info, const uint8_t *os_loader_handled_boot_info, const uint8_t *os_or_service_partition_handled_boot_info, const uint8_t *sms_handled_boot_info, const uint8_t *oem_handled_boot_info, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || (bios_or_post_handled_boot_info && !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (*bios_or_post_handled_boot_info)) || (os_loader_handled_boot_info && !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (*os_loader_handled_boot_info)) || (os_or_service_partition_handled_boot_info && !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (*os_or_service_partition_handled_boot_info)) || (sms_handled_boot_info && !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (*sms_handled_boot_info)) || (oem_handled_boot_info && !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (*oem_handled_boot_info)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_boot_info_acknowledge_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INFO_ACKNOWLEDGE); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); if (bios_or_post_handled_boot_info) { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_0", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "bios_or_post_handled_boot_info", *bios_or_post_handled_boot_info); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_0", IPMI_SYSTEM_BOOT_OPTION_DISABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "bios_or_post_handled_boot_info", IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE); } if (os_loader_handled_boot_info) { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_1", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "os_loader_handled_boot_info", *os_loader_handled_boot_info); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_1", IPMI_SYSTEM_BOOT_OPTION_DISABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "os_loader_handled_boot_info", IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE); } if (os_or_service_partition_handled_boot_info) { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_2", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "os_or_service_partition_handled_boot_info", *os_or_service_partition_handled_boot_info); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_2", IPMI_SYSTEM_BOOT_OPTION_DISABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "os_or_service_partition_handled_boot_info", IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE); } if (sms_handled_boot_info) { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_3", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sms_handled_boot_info", *sms_handled_boot_info); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_3", IPMI_SYSTEM_BOOT_OPTION_DISABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sms_handled_boot_info", IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE); } if (oem_handled_boot_info) { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_4", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_handled_boot_info", *oem_handled_boot_info); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_4", IPMI_SYSTEM_BOOT_OPTION_DISABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_handled_boot_info", IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE); } FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_5", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_6", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_write_bit_7", IPMI_SYSTEM_BOOT_OPTION_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0x7); return (0); } int fill_cmd_set_system_boot_options_boot_flags (uint8_t parameter_valid, uint8_t bios_boot_type, uint8_t boot_flags_persistent, uint8_t boot_flags_valid, uint8_t lock_out_reset_button, uint8_t screen_blank, uint8_t boot_device, uint8_t lock_keyboard, uint8_t cmos_clear, uint8_t console_redirection, uint8_t lock_out_sleep_button, uint8_t user_password_bypass, uint8_t force_progress_event_traps, uint8_t firmware_bios_verbosity, uint8_t lock_out_via_power_button, uint8_t bios_mux_control_override, uint8_t bios_shared_mode_override, uint8_t device_instance_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (boot_flags_valid) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (boot_flags_persistent) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (cmos_clear) || !IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BIOS_BOOT_TYPE_VALID (bios_boot_type) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (lock_keyboard) || !IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_VALID (boot_device) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (screen_blank) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (lock_out_reset_button) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (lock_out_via_power_button) || !IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VALID (firmware_bios_verbosity) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (force_progress_event_traps) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (user_password_bypass) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (lock_out_sleep_button) || !IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_VALID (console_redirection) || !IPMI_SYSTEM_BOOT_OPTION_ENABLE_VALID (bios_shared_mode_override) || !IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAGS_BIOS_MUX_CONTROL_OVERRIDE_VALID (bios_mux_control_override) || !IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_VALID (device_instance_selector) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_boot_flags_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_FLAGS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "bios_boot_type", bios_boot_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_flags_persistent", boot_flags_persistent); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_flags_valid", boot_flags_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "lock_out_reset_button", lock_out_reset_button); FILL_FIID_OBJ_SET (obj_cmd_rq, "screen_blank", screen_blank); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_device", boot_device); FILL_FIID_OBJ_SET (obj_cmd_rq, "lock_keyboard", lock_keyboard); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmos_clear", cmos_clear); FILL_FIID_OBJ_SET (obj_cmd_rq, "console_redirection", console_redirection); FILL_FIID_OBJ_SET (obj_cmd_rq, "lock_out_sleep_button", lock_out_sleep_button); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_password_bypass", user_password_bypass); FILL_FIID_OBJ_SET (obj_cmd_rq, "force_progress_event_traps", force_progress_event_traps); FILL_FIID_OBJ_SET (obj_cmd_rq, "firmware_bios_verbosity", firmware_bios_verbosity); FILL_FIID_OBJ_SET (obj_cmd_rq, "lock_out_via_power_button", lock_out_via_power_button); FILL_FIID_OBJ_SET (obj_cmd_rq, "bios_mux_control_override", bios_mux_control_override); FILL_FIID_OBJ_SET (obj_cmd_rq, "bios_shared_mode_override", bios_shared_mode_override); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "device_instance_selector", device_instance_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_set_system_boot_options_boot_initiator_info (uint8_t parameter_valid, uint8_t boot_source_channel_number, uint32_t session_id, uint32_t boot_info_timestamp, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || !IPMI_CHANNEL_NUMBER_VALID (boot_source_channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_boot_initiator_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_source.channel_number", boot_source_channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_source.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "session_id", session_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "boot_info_timestamp", boot_info_timestamp); return (0); } int fill_cmd_set_system_boot_options_boot_initiator_mailbox (uint8_t parameter_valid, uint8_t set_selector, const void *block_data, unsigned int block_data_length, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_VALID (parameter_valid) || block_data_length > IPMI_SYSTEM_BOOT_OPTION_BLOCK_DATA_LEN_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_boot_options_boot_initiator_mailbox_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_BOOT_OPTION_PARAMETER_BOOT_INITIATOR_MAILBOX); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_valid", parameter_valid); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); if (block_data && block_data_length) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "block_data", block_data, block_data_length); return (0); } int fill_cmd_get_system_boot_options (uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if ((!IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SYSTEM_BOOT_OPTION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_system_boot_options_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } int fill_cmd_get_power_on_hours_counter (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_power_on_hours_counter_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_POWER_ON_HOURS_COUNTER); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-dcmi-cmds.c0000644002055400205540000016202113527331636021442 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-dcmi-cmds.c,v 1.7 2010-07-28 21:19:56 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-dcmi-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-dcmi-spec.h" #include "freeipmi/spec/ipmi-entity-ids-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_dcmi_rolling_average_time_period = { { 6, "time_duration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "time_duration_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "mandatory_platform_capabilities.identification_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "mandatory_platform_capabilities.sel_logging", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "mandatory_platform_capabilities.chassis_power", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "mandatory_platform_capabilities.temperature_monitor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "mandatory_platform_capabilities.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "optional_platform_capabilities.power_management_monitoring_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "optional_platform_capabilities.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "manageability_access_capabilities.in_band_system_interface_channel_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "manageability_access_capabilities.serial_tmode_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "manageability_access_capabilities.out_of_band_secondary_lan_channel_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "manageability_access_capabilities.out_of_band_primary_lan_channel_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "manageability_access_capabilities.sol_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "manageability_access_capabilities.vlan_capable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "manageability_access_capabilities.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 12, "sel_attributes.number_of_sel_entries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sel_attributes.record_level_sel_flush_upon_rollover", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sel_attributes.entire_sel_flush_upon_rollover", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sel_attributes.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sel_attributes.sel_automatic_rollover_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "identification_attributes.guid_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "identification_attributes.dhcp_host_name_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "identification_attributes.asset_tag_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "identification_attributes.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "temperature_monitoring.inlet_temperature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "temperature_monitoring.processors_temperature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h, reserved */ { 1, "temperature_monitoring.baseboard_temperature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "temperature_monitoring.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in parameter revision >= 02h */ { 8, "temperature_monitoring.sampling_period", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_management_device_slave_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "power_management_device_slave_address.slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "power_management_controller_channel_number.device_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "power_management_controller_channel_number.channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: for consistency, renamed "oob" to "out_of_band" */ fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "mandatory_primary_lan_out_of_band_support_channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "optional_secondary_lan_out_of_band_support_channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "optional_serial_out_of_band_tmode_capability_channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* 256 * 8 = 2048 */ fiid_template_t tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_supported_rolling_average_time_periods", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2048, "rolling_average_time_periods", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "activate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "option_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "option_60_with_option_43", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "random_back_off", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "initial_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "server_contact_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "server_contact_retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_discovery_configuration_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "option_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "option_60_with_option_43", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "random_back_off", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_1_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "initial_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_2_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "server_contact_timeout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_configuration_parameters_dhcp_timing_3_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.major_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dcmi_specification_conformance.minor_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "server_contact_retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "offset_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_bytes_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: number_of_bytes_to_read is max 16, so presumably data can * only be max 16, but asset tag max is 64 bytes. We'll use 64 bytes * (512 bits) as the max then. */ fiid_template_t tmpl_cmd_dcmi_get_asset_tag_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_asset_tag_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* achu: number_of_bytes_to_read is max 16, so presumably data can * only be max 16, but asset tag max is 64 bytes. We'll use 64 bytes * (512 bits) as the max then. */ fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "offset_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_bytes_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_asset_tag_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_asset_tag_length_written", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "offset_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_bytes_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: number_of_bytes_to_read is max 16, so presumably data can * only be max 16, but identifier max is 64 bytes. We'll use 64 bytes * (512 bits) as the max then. */ fiid_template_t tmpl_cmd_dcmi_get_management_controller_identifier_string_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* achu: number_of_bytes_to_read is max 16, so presumably data can * only be max 16, but identifier max is 64 bytes. We'll use 64 bytes * (512 bits) as the max then. */ fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "offset_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_bytes_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_management_controller_identifier_string_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_length_written", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_start", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* presumably a max of 256 entity_instances (b/c 1 byte field), so * assume max record ids of 256. record_id = 16 bits, so 256 * 16 = 4096 */ fiid_template_t tmpl_cmd_dcmi_get_dcmi_sensor_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_number_of_available_instances", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_record_ids_in_this_response", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4096, "sdr_record_ids", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, /* 16 bit fields of record ids, LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_power_reading_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "mode_attributes", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_power_reading_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "current_power", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_power_over_sampling_duration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_power_over_sampling_duration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "average_power_over_sampling_duration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "time_stamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "statistics_reporting_time_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "power_reading_state.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_reading_state.power_measurement", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_reading_state.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_power_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_power_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "exception_actions", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "power_limit_requested", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "correction_time_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "management_application_statistics_sampling_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_power_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "exception_actions", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "power_limit_requested", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "correction_time_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "management_application_statistics_sampling_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_power_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "power_limit_activation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_activate_deactivate_power_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_thermal_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "temperature_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "exception_actions.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.log_event_to_sel_only", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.hard_power_off_system_and_log_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "exception_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "temperature_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "exception_actions.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.log_event_to_sel_only", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.hard_power_off_system_and_log_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "exception_actions.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "exception_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_set_thermal_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_start", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_dcmi_get_temperature_reading_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "group_extension_identification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "total_number_of_available_instances", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_sets_of_temperature_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "temperature1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 8, "temperature8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, /* signed 8 bit int */ { 0, "", 0} }; /* * Fill Functions */ int fill_cmd_dcmi_get_dcmi_capability_info (uint8_t parameter_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_CAPABILITIES_INFO_PARAMETER_SELECTOR_VALID (parameter_selector) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_dcmi_capability_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_DCMI_CAPABILITY_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters (uint8_t parameter_selector, uint8_t set_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp (uint8_t set_selector, uint8_t activate, fiid_obj_t obj_cmd_rq) { /* technically, user can input anything for activate, but only 0x01 will do anything */ if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_activate_dhcp_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_DCMI_CONFIGURATION_PARAMETER_ACTIVATE_DHCP); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "activate", activate); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration (uint8_t set_selector, uint8_t option_12, uint8_t option_60_with_option_43, uint8_t random_back_off, fiid_obj_t obj_cmd_rq) { if (IPMI_DCMI_DHCP_INCLUDE_OPTION_VALID (option_12) || IPMI_DCMI_DHCP_INCLUDE_OPTION_VALID (option_60_with_option_43) || !IPMI_DCMI_DHCP_RANDOM_BACK_OFF_VALID (random_back_off) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_discovery_configuration_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_DCMI_CONFIGURATION_PARAMETER_DISCOVERY_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "option_12", option_12); FILL_FIID_OBJ_SET (obj_cmd_rq, "option_60_with_option_43", option_60_with_option_43); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "random_back_off", random_back_off); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1 (uint8_t set_selector, uint8_t initial_timeout_interval, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_1_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "initial_timeout_interval", initial_timeout_interval); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2 (uint8_t set_selector, uint16_t server_contact_timeout_interval, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_2_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "server_contact_timeout_interval", server_contact_timeout_interval); return (0); } int fill_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3 (uint8_t set_selector, uint16_t server_contact_retry_interval, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_dcmi_configuration_parameters_dhcp_timing_3_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_DCMI_CONFIGURATION_PARAMETER_DHCP_TIMING_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "server_contact_retry_interval", server_contact_retry_interval); return (0); } int fill_cmd_dcmi_get_dcmi_configuration_parameters (uint8_t parameter_selector, uint8_t set_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_dcmi_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_DCMI_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); return (0); } int fill_cmd_dcmi_get_asset_tag (uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rq) { if (number_of_bytes_to_read > IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_asset_tag_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_ASSET_TAG); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_to_read", offset_to_read); FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_bytes_to_read", number_of_bytes_to_read); return (0); } int fill_cmd_dcmi_set_asset_tag (uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq) { if (number_of_bytes_to_write > IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX || !data || !data_len || number_of_bytes_to_write > data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_asset_tag_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_ASSET_TAG); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_to_write", offset_to_write); FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_bytes_to_write", number_of_bytes_to_write); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "data", data, number_of_bytes_to_write); return (0); } int fill_cmd_dcmi_get_management_controller_identifier_string (uint8_t offset_to_read, uint8_t number_of_bytes_to_read, fiid_obj_t obj_cmd_rq) { if (number_of_bytes_to_read > IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_management_controller_identifier_string_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_to_read", offset_to_read); FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_bytes_to_read", number_of_bytes_to_read); return (0); } int fill_cmd_dcmi_set_management_controller_identifier_string (uint8_t offset_to_write, uint8_t number_of_bytes_to_write, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq) { if (number_of_bytes_to_write > IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX || !data || !data_len || number_of_bytes_to_write > data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_management_controller_identifier_string_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_to_write", offset_to_write); FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_bytes_to_write", number_of_bytes_to_write); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "data", data, number_of_bytes_to_write); return (0); } int fill_cmd_dcmi_get_dcmi_sensor_info (uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rq) { if (sensor_type != IPMI_SENSOR_TYPE_TEMPERATURE || (!IPMI_DCMI_ENTITY_ID_VALID(entity_id) && entity_id != IPMI_ENTITY_ID_PROCESSOR && entity_id != IPMI_ENTITY_ID_SYSTEM_BOARD && entity_id != IPMI_ENTITY_ID_AIR_INLET_B) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_dcmi_sensor_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_DCMI_SENSOR_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_type", sensor_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_id", entity_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance", entity_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance_start", entity_instance_start); return (0); } int fill_cmd_dcmi_get_power_reading (uint8_t mode, uint8_t mode_attributes, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_POWER_READING_MODE_VALID (mode) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_power_reading_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_POWER_READING); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "mode", mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "mode_attributes", mode_attributes); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_dcmi_get_power_limit (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_power_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_POWER_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_dcmi_set_power_limit (uint8_t exception_actions, uint16_t power_limit_requested, uint32_t correction_time_limit, uint16_t management_application_statistics_sampling_period, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_EXCEPTION_ACTION_VALID (exception_actions) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_power_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_POWER_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_actions", exception_actions); FILL_FIID_OBJ_SET (obj_cmd_rq, "power_limit_requested", power_limit_requested); FILL_FIID_OBJ_SET (obj_cmd_rq, "correction_time_limit", correction_time_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "management_application_statistics_sampling_period", management_application_statistics_sampling_period); return (0); } int fill_cmd_dcmi_activate_deactivate_power_limit (uint8_t power_limit_activation, fiid_obj_t obj_cmd_rq) { if (!IPMI_DCMI_POWER_LIMIT_ACTIVATION_VALID (power_limit_activation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_activate_deactivate_power_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_ACTIVATE_DEACTIVATE_POWER_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "power_limit_activation", power_limit_activation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_dcmi_get_thermal_limit (uint8_t entity_id, uint8_t entity_instance, fiid_obj_t obj_cmd_rq) { if ((entity_id != IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE && entity_id != IPMI_ENTITY_ID_AIR_INLET_B) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_thermal_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_THERMAL_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_id", entity_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance", entity_instance); return (0); } int fill_cmd_dcmi_set_thermal_limit (uint8_t entity_id, uint8_t entity_instance, uint8_t temperature_limit, uint8_t exception_actions_log_event_to_sel_only, uint8_t exception_actions_hard_power_off_system_and_log_event, uint16_t exception_time, fiid_obj_t obj_cmd_rq) { if ((entity_id != IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE && entity_id != IPMI_ENTITY_ID_AIR_INLET_B) || !IPMI_DCMI_EXCEPTION_ACTION_BIT_VALID (exception_actions_log_event_to_sel_only) || !IPMI_DCMI_EXCEPTION_ACTION_BIT_VALID (exception_actions_hard_power_off_system_and_log_event) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_set_thermal_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_SET_THERMAL_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_id", entity_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance", entity_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "temperature_limit", temperature_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_actions.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_actions.log_event_to_sel_only", exception_actions_log_event_to_sel_only); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_actions.hard_power_off_system_and_log_event", exception_actions_hard_power_off_system_and_log_event); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_actions.reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "exception_time", exception_time); return (0); } int fill_cmd_dcmi_get_temperature_reading (uint8_t sensor_type, uint8_t entity_id, uint8_t entity_instance, uint8_t entity_instance_start, fiid_obj_t obj_cmd_rq) { if (sensor_type != IPMI_SENSOR_TYPE_TEMPERATURE || (!IPMI_DCMI_ENTITY_ID_VALID(entity_id) && entity_id != IPMI_ENTITY_ID_PROCESSOR && entity_id != IPMI_ENTITY_ID_SYSTEM_BOARD && entity_id != IPMI_ENTITY_ID_AIR_INLET_B) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_dcmi_get_temperature_reading_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DCMI_GET_TEMPERATURE_READING); FILL_FIID_OBJ_SET (obj_cmd_rq, "group_extension_identification", IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_type", sensor_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_id", entity_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance", entity_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "entity_instance_start", entity_instance_start); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-device-global-cmds.c0000644002055400205540000003132613527331636023226 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-device-global-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_device_id_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_id_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "device_revision.revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* binary encoded */ { 3, "device_revision.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_revision.sdr_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "firmware_revision1.major_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "firmware_revision1.device_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "firmware_revision2.minor_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ { 4, "ipmi_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "ipmi_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sensor_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sdr_repository_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sel_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.fru_inventory_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.ipmb_event_receiver", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.ipmb_event_generator", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.bridge", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.chassis_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 20, "manufacturer_id.id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "manufacturer_id.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "product_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "auxiliary_firmware_revision_information", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_cold_reset_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_cold_reset_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_warm_reset_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_warm_reset_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_acpi_power_state_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "system_power_state_enumeration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_system_power_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_power_state_enumeration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_device_power_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_acpi_power_state_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_acpi_power_state_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_acpi_power_state_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 7, "system_power_state_enumeration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_power_state_enumeration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_self_test_results_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* note: bitfield results only if self_test_results == 0x57. See * specification for more information */ fiid_template_t tmpl_cmd_get_self_test_results_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "self_test_result", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "controller_operation_firmware_corrupted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "controller_update_boot_block_firmware_corrupted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "internal_use_area_of_bmc_fru_corrupted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sdr_repository_empty", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "ipmb_signal_lines_do_not_respond", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cannot_access_bmc_fru_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cannot_access_sdr_repository", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cannot_access_sel_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_guid_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_guid_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "guid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: format in IPMI spec differs from the format in the "Wired for Management Baseline" 2.0 document. In the IPMI spec there is a 2 byte field called "clock_seq_and_reserved", and in "Wired for Management Baseline" there is a 1 byte field called "clock_seq_hi_and_reserved" and a 1 byte field called "clock_seq_low". I am going with the "Wired for Management Baseline" format under the assumption the IPMI spec has a typo. */ fiid_template_t tmpl_cmd_get_device_guid_format_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 48, "node", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 8, "clock_seq_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "clock_seq_hi_and_reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "time_high_and_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "time_mid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "time_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; int fill_cmd_get_device_id (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_device_id_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_DEVICE_ID); return (0); } int fill_cmd_cold_reset (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_cold_reset_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_COLD_RESET); return (0); } int fill_cmd_warm_reset (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_warm_reset_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_WARM_RESET); return (0); } int fill_cmd_set_acpi_power_state (uint8_t system_power_state_enumeration, uint8_t set_system_power_state, uint8_t device_power_state_enumeration, uint8_t set_device_power_state, fiid_obj_t obj_cmd_rq) { if (!IPMI_ACPI_SET_SYSTEM_POWER_STATE_VALID (set_system_power_state) || (set_system_power_state == IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE && !IPMI_ACPI_SYSTEM_POWER_STATE_VALID (system_power_state_enumeration)) || !IPMI_ACPI_SET_DEVICE_POWER_STATE_VALID (set_device_power_state) || (set_device_power_state == IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE && !IPMI_ACPI_DEVICE_POWER_STATE_VALID (device_power_state_enumeration)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_acpi_power_state_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_ACPI_POWER_STATE); FILL_FIID_OBJ_SET (obj_cmd_rq, "system_power_state_enumeration", system_power_state_enumeration); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_system_power_state", set_system_power_state); FILL_FIID_OBJ_SET (obj_cmd_rq, "device_power_state_enumeration", device_power_state_enumeration); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_device_power_state", set_device_power_state); return (0); } int fill_cmd_get_acpi_power_state (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_acpi_power_state_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_ACPI_POWER_STATE); return (0); } int fill_cmd_get_self_test_results (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_self_test_results_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SELF_TEST_RESULTS); return (0); } int fill_cmd_get_device_guid (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_device_guid_rq) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_device_guid_format_rs) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_DEVICE_GUID); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-event-cmds.c0000644002055400205540000001514513527331636021653 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-event-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* event_receiver_slave_address is presumably always a slave address, not a * software id, so no "id type" field. */ fiid_template_t tmpl_cmd_set_event_receiver_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_receiver_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_receiver_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_event_receiver_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; /* event_receiver_slave_address is presumably always a slave address, not a * software id, so no "id type" field. */ fiid_template_t tmpl_cmd_get_event_receiver_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_event_receiver_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "event_receiver_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_receiver_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_platform_event_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "generator_id", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "event_message_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* EvMRev in spec */ { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_dir", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_platform_event_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_set_event_receiver (uint8_t event_receiver_slave_address, uint8_t event_receiver_lun, fiid_obj_t obj_cmd_rq) { if (!IPMI_BMC_LUN_VALID (event_receiver_lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_event_receiver_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_EVENT_RECEIVER); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_receiver_slave_address", event_receiver_slave_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_receiver_lun", event_receiver_lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_get_event_receiver (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_event_receiver_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_EVENT_RECEIVER); return (0); } int fill_cmd_platform_event (uint8_t *generator_id, uint8_t event_message_format_version, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_type_code, uint8_t event_dir, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rq) { /* b/c OEM codes are allowed here, don't really need to check for * a lot of correct input. Anything is allowed in many cases. */ if (!IPMI_SEL_RECORD_EVENT_DIRECTION_VALID (event_dir) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_platform_event_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_PLATFORM_EVENT); if (generator_id) FILL_FIID_OBJ_SET (obj_cmd_rq, "generator_id", (*generator_id)); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_format_version", event_message_format_version); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_type", sensor_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_type_code", event_type_code); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_dir", event_dir); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1", event_data1); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data2", event_data2); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data3", event_data3); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.c0000644002055400205540000010421513527331636027567 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/cmds/ipmi-firmware-firewall-command-discovery-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_netfn_support_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_netfn_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 2, "lun0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "lun0_netfn_support_bitmask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "lun1_netfn_support_bitmask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "lun2_netfn_support_bitmask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "lun3_netfn_support_bitmask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_support_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "command_support_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_sub_function_support_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_sub_function_support_specification_errata_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "errata_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "specification_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_support_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_sub_function_support_extension_errata_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "oem_group_defining_body_errata", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_support_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_configurable_commands_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_configurable_commands_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "command_support_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_configurable_command_sub_functions_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "sub_function_enables1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_command_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "enable_disable_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_command_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "enable_disable_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: * * For set_command_sub_function_enables, we cannot do net_fn_data like * other templates. Having an optional/variable length field in the * middle of a payload is problematic. There's no way to know if * packet data is meant for which optional/variable length field * without flat out length checks. We have to deal with it with three * different templates. */ fiid_template_t tmpl_cmd_set_command_sub_function_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_command_sub_function_enables_defining_body_code_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "defining_body_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_command_sub_function_enables_oem_iana_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_iana", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_command_sub_function_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_sub_function_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For defining body code or group IANA depending on net_fn */ { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_command_sub_function_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "sub_function_enables1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sub_function_enables2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "list_index", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_oem_netfn_iana_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 7, "last_iana", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "net_fn_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int fill_cmd_get_netfn_support (uint8_t channel_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_netfn_support_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_NETFN_SUPPORT); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_get_command_support (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID (operation) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_command_support_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_COMMAND_SUPPORT); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_get_command_sub_function_support (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_command_sub_function_support_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_COMMAND_SUB_FUNCTION_SUPPORT); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_get_configurable_commands (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID (operation) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_configurable_commands_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CONFIGURABLE_COMMANDS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_get_configurable_command_sub_functions (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_configurable_command_sub_functions_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CONFIGURABLE_COMMAND_SUB_FUNCTIONS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_set_command_enables (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint8_t *enable_disable_bitmask, unsigned int enable_disable_bitmask_len, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID (operation) || !IPMI_BMC_LUN_VALID (lun) || !enable_disable_bitmask || enable_disable_bitmask_len < IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_ENABLE_DISABLE_BITMASK_LEN || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_command_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_COMMAND_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "enable_disable_mask", enable_disable_bitmask, IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_ENABLE_DISABLE_BITMASK_LEN); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_get_command_enables (uint8_t channel_number, uint8_t net_fn, uint8_t operation, uint8_t lun, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_FIRMWARE_FIREWALL_COMMAND_DISCOVERY_OPERATION_VALID (operation) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_command_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_COMMAND_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_set_command_sub_function_enables (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS || net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_command_sub_function_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables1", sub_function_enables1); if (sub_function_enables2) FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables2", *sub_function_enables2); return (0); } int fill_cmd_set_command_sub_function_enables_defining_body_code (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint8_t defining_body_code, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (net_fn != IPMI_NET_FN_GROUP_EXTENSION_RQ && net_fn != IPMI_NET_FN_GROUP_EXTENSION_RS) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_command_sub_function_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); FILL_FIID_OBJ_SET (obj_cmd_rq, "defining_body_code", defining_body_code); FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables1", sub_function_enables1); if (sub_function_enables2) FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables2", *sub_function_enables2); return (0); } int fill_cmd_set_command_sub_function_enables_oem_iana (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t oem_iana, uint32_t sub_function_enables1, uint32_t *sub_function_enables2, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (net_fn != IPMI_NET_FN_OEM_GROUP_RQ && net_fn != IPMI_NET_FN_OEM_GROUP_RS) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_command_sub_function_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_iana", oem_iana); FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables1", sub_function_enables1); if (sub_function_enables2) FILL_FIID_OBJ_SET (obj_cmd_rq, "sub_function_enables2", *sub_function_enables2); return (0); } int fill_cmd_get_command_sub_function_enables (uint8_t channel_number, uint8_t net_fn, uint8_t lun, uint8_t command, uint32_t net_fn_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_NET_FN_VALID (net_fn) || !IPMI_BMC_LUN_VALID (lun) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_command_sub_function_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "lun", lun); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "command", command); if (net_fn == IPMI_NET_FN_GROUP_EXTENSION_RQ || net_fn == IPMI_NET_FN_GROUP_EXTENSION_RS) { uint8_t tmp = net_fn_data; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "net_fn_data", &tmp, 1); } else if (net_fn == IPMI_NET_FN_OEM_GROUP_RQ || net_fn == IPMI_NET_FN_OEM_GROUP_RS) FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn_data", net_fn_data); return (0); } int fill_cmd_get_oem_netfn_iana_support (uint8_t channel_number, uint8_t net_fn, uint8_t list_index, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (net_fn != IPMI_NET_FN_GROUP_EXTENSION_RQ && net_fn != IPMI_NET_FN_OEM_GROUP_RQ) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_oem_netfn_iana_support_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_OEM_NETFN_IANA_SUPPORT); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "list_index", list_index); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-fru-inventory-device-cmds.c0000644002055400205540000001501513527331636024612 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-inventory-device-cmds.c,v 1.22 2010-07-28 21:19:56 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-fru-inventory-device-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_fru_inventory_area_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_fru_inventory_area_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "fru_inventory_area_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_is_accessed", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_read_fru_data_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "fru_inventory_offset_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "count_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* 2040 = 255 * 8, 255 b/c count_returned field in request is 1 byte long */ fiid_template_t tmpl_cmd_read_fru_data_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "count_returned", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2040, "requested_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* 2040 = 255 * 8, 255 b/c bytes_to_write field in request is 1 byte long */ fiid_template_t tmpl_cmd_write_fru_data_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "fru_inventory_offset_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2040, "data_to_write", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_write_fru_data_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "count_written", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_get_fru_inventory_area_info (uint8_t fru_device_id, fiid_obj_t obj_cmd_rq) { if (fru_device_id == IPMI_FRU_DEVICE_ID_RESERVED || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_fru_inventory_area_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_FRU_INVENTORY_AREA_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_device_id", fru_device_id); return (0); } int fill_cmd_read_fru_data (uint8_t fru_device_id, uint16_t fru_inventory_offset_to_read, uint8_t count_to_read, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_read_fru_data_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_READ_FRU_DATA); FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_device_id", fru_device_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_inventory_offset_to_read", fru_inventory_offset_to_read); FILL_FIID_OBJ_SET (obj_cmd_rq, "count_to_read", count_to_read); return (0); } int fill_cmd_write_fru_data (uint8_t fru_device_id, uint16_t fru_inventory_offset_to_write, const void *data_to_write, unsigned int data_to_write_len, fiid_obj_t obj_cmd_rq) { if ((data_to_write && data_to_write_len > IPMI_FRU_DATA_MAX) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_write_fru_data_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_WRITE_FRU_DATA); FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_device_id", fru_device_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "fru_inventory_offset_to_write", fru_inventory_offset_to_write); if (data_to_write && data_to_write_len) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "data_to_write", data_to_write, data_to_write_len); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-lan-cmds.c0000644002055400205540000042024413527331636021304 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "freeipmi/cmds/ipmi-lan-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-lan-configuration-parameters-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* byte 1 */ { 1, "callback_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "callback_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* byte 2 */ { 1, "user_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "user_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* byte 3 */ { 1, "operator_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operator_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* byte 4 */ { 1, "admin_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "admin_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* byte 5 */ { 1, "oem_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "oem_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "ip_address_source", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_mac_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "subnet_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv4_header_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "time_to_live", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "flags", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "type_of_service", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "precedence", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_primary_rmcp_port_number_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "primary_rmcp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "secondary_rmcp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bmc_generated_gratuitous_arps", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bmc_generated_arp_responses", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "gratuitous_arp_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_community_string_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 144, "community_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_type_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "destination_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_acknowledge", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "alert_acknowledge_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "retries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "address_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "gateway_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "alerting_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "alerting_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 12, "vlan_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "vlan_id_enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "vlan_priority", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bits 3:4 in the IPMI spec do not exist. */ { 2, "unspecified", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_15", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_16", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_disabled_event_message", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bad_password_threshold_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "attempt_count_reset_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "user_lockout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "enables", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "traffic_class", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "static_hop_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 20, "flow_label", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_addresses_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "source", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_static_router_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_dynamic_router_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "ipv6_router_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "router_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "prefix_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "ipv6_router_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "router_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "prefix_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "callback_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "callback_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "user_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operator_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operator_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "admin_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "admin_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.straight_password", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_level.oem_proprietary", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "oem_level.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "ip_address_source", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "subnet_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv4_header_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "time_to_live", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "flags", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "type_of_service", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "precedence", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_primary_rmcp_port_number_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "primary_rmcp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "secondary_rmcp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bmc_generated_gratuitous_arps", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bmc_generated_arp_responses", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "gratuitous_arp_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_community_string_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 144, "community_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "number_of_lan_destinations", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_type_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "destination_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_acknowledge", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "alert_acknowledge_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "retries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "address_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "gateway_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "alerting_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "alerting_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 12, "vlan_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "vlan_id_enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "vlan_priority", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bits 3:4 in the IPMI spec do not exist. */ { 2, "unspecified", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "cipher_suite_entry_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_A", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_B", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_C", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_D", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_E", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_F", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_G", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_H", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_I", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_J", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_K", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_L", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_M", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_N", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_O", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id_entry_P", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_15", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_for_cipher_suite_16", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_disabled_event_message", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bad_password_threshold_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "attempt_count_reset_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "user_lockout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "supports_ipv6_only", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "supports_ipv6_and_ipv4_simultaneously", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "supports_ipv6_destination_address_for_lan_alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "enables", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_traffic_class_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "traffic_class", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_static_hop_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "static_hop_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_header_flow_label_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 20, "flow_label", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "static_address_max", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "dynamic_address_max", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dhcpv6_addressing_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "slaac_addressing_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_addresses_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "source", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duid_storage_length_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "maximum_blocks", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_static_duids_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "duid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "source_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "address_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duid_storage_length_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "maximum_blocks", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_dynamic_duids_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "duid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_configuration_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "timing_configuration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dhcpv6_timing_and_configuration_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_static_router_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "enable_dynamic_router_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "ipv6_router_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "router_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "prefix_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "ipv6_router_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "router_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "prefix_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* MS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_number_of_dynamic_router_info_sets_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_dynamic_router_address_information_entries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_ip_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "router_ip_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_mac_address_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "router_mac_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_length_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "prefix_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_info_prefix_value_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "prefix_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_router_received_hop_limit_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "hop_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "timing_configuration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_lan_configuration_parameters_ipv6_neighbor_discovery_slaac_timing_configuration_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_suspend_bmc_arps_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "gratuitous_arp_suspend", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "arp_response_suspend", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_suspend_bmc_arps_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "gratuitous_arp_response_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "arp_response_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_all_statistics", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_ip_udp_rmcp_statistics_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "ip_packets_received", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "received_ip_header_errors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "received_ip_address_errors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "fragmented_ip_packets_received", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "ip_packets_transmitted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "udp_packets_received", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "valid_rmcp_packets_received", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "udp_proxy_packets_received", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "udp_proxy_packets_dropped", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_set_lan_configuration_parameters (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (!IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_lan_configuration_parameters_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_LAN_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_SET_IN_PROGRESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_lan_configuration_parameters_authentication_type_enables (uint8_t channel_number, uint8_t callback_level_none, uint8_t callback_level_md2, uint8_t callback_level_md5, uint8_t callback_level_straight_password, uint8_t callback_level_oem_proprietary, uint8_t user_level_none, uint8_t user_level_md2, uint8_t user_level_md5, uint8_t user_level_straight_password, uint8_t user_level_oem_proprietary, uint8_t operator_level_none, uint8_t operator_level_md2, uint8_t operator_level_md5, uint8_t operator_level_straight_password, uint8_t operator_level_oem_proprietary, uint8_t admin_level_none, uint8_t admin_level_md2, uint8_t admin_level_md5, uint8_t admin_level_straight_password, uint8_t admin_level_oem_proprietary, uint8_t oem_level_none, uint8_t oem_level_md2, uint8_t oem_level_md5, uint8_t oem_level_straight_password, uint8_t oem_level_oem_proprietary, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (callback_level_none) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (callback_level_md2) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (callback_level_md5) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (callback_level_straight_password) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (callback_level_oem_proprietary) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (user_level_none) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (user_level_md2) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (user_level_md5) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (user_level_straight_password) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (user_level_oem_proprietary) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (operator_level_none) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (operator_level_md2) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (operator_level_md5) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (operator_level_straight_password) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (operator_level_oem_proprietary) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (admin_level_none) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (admin_level_md2) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (admin_level_md5) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (admin_level_straight_password) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (admin_level_oem_proprietary) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (oem_level_none) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (oem_level_md2) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (oem_level_md5) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (oem_level_straight_password) || !IPMI_AUTHENTICATION_TYPE_ENABLE_VALID (oem_level_oem_proprietary) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_authentication_type_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_AUTHENTICATION_TYPE_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.none", callback_level_none); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.md2", callback_level_md2); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.md5", callback_level_md5); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.straight_password", callback_level_straight_password); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.oem_proprietary", callback_level_oem_proprietary); FILL_FIID_OBJ_SET (obj_cmd_rq, "callback_level.reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.none", user_level_none); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.md2", user_level_md2); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.md5", user_level_md5); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.straight_password", user_level_straight_password); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.oem_proprietary", user_level_oem_proprietary); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level.reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.none", operator_level_none); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.md2", operator_level_md2); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.md5", operator_level_md5); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.straight_password", operator_level_straight_password); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.oem_proprietary", operator_level_oem_proprietary); FILL_FIID_OBJ_SET (obj_cmd_rq, "operator_level.reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.none", admin_level_none); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.md2", admin_level_md2); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.md5", admin_level_md5); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.straight_password", admin_level_straight_password); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.oem_proprietary", admin_level_oem_proprietary); FILL_FIID_OBJ_SET (obj_cmd_rq, "admin_level.reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.none", oem_level_none); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.md2", oem_level_md2); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.md5", oem_level_md5); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.straight_password", oem_level_straight_password); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.oem_proprietary", oem_level_oem_proprietary); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_level.reserved2", 0); return (0); } static int _fill_lan_ip (uint8_t parameter_selector, uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_ADDRESS) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "ip_address", ip_address); return (0); } int fill_cmd_set_lan_configuration_parameters_ip_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ip_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_ip (IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS, channel_number, ip_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_ip_address_source (uint8_t channel_number, uint8_t ip_address_source, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_IP_ADDRESS_SOURCE_VALID (ip_address_source) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ip_address_source_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IP_ADDRESS_SOURCE); FILL_FIID_OBJ_SET (obj_cmd_rq, "ip_address_source", ip_address_source); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } static int _fill_lan_mac_address (uint8_t parameter_selector, uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_MAC_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_MAC_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_MAC_ADDRESS) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "mac_address", mac_address); return (0); } int fill_cmd_set_lan_configuration_parameters_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_mac_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_mac_address (IPMI_LAN_CONFIGURATION_PARAMETER_MAC_ADDRESS, channel_number, mac_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_subnet_mask (uint8_t channel_number, uint32_t subnet_mask, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_subnet_mask_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_SUBNET_MASK); FILL_FIID_OBJ_SET (obj_cmd_rq, "subnet_mask", subnet_mask); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv4_header_parameters (uint8_t channel_number, uint8_t time_to_live, uint8_t flags, uint8_t type_of_service, uint8_t precedence, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv4_header_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV4_HEADER_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "time_to_live", time_to_live); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "flags", flags); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "type_of_service", type_of_service); FILL_FIID_OBJ_SET (obj_cmd_rq, "precedence", precedence); return (0); } int fill_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (uint8_t channel_number, uint16_t primary_rmcp_port_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_primary_rmcp_port_number_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_PRIMARY_RMCP_PORT_NUMBER); FILL_FIID_OBJ_SET (obj_cmd_rq, "primary_rmcp_port_number", primary_rmcp_port_number); return (0); } int fill_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (uint8_t channel_number, uint16_t secondary_rmcp_port_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_SECONDARY_RMCP_PORT_NUMBER); FILL_FIID_OBJ_SET (obj_cmd_rq, "secondary_rmcp_port_number", secondary_rmcp_port_number); return (0); } int fill_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (uint8_t channel_number, uint8_t bmc_generated_gratuitous_arps, uint8_t bmc_generated_arp_responses, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID (bmc_generated_gratuitous_arps) || !IPMI_BMC_GENERATED_ARP_RESPONSE_VALID (bmc_generated_arp_responses) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_bmc_generated_arp_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_BMC_GENERATED_ARP_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "bmc_generated_gratuitous_arps", bmc_generated_gratuitous_arps); FILL_FIID_OBJ_SET (obj_cmd_rq, "bmc_generated_arp_responses", bmc_generated_arp_responses); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (uint8_t channel_number, uint8_t gratuitous_arp_interval, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_gratuitous_arp_interval_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_GRATUITOUS_ARP_INTERVAL); FILL_FIID_OBJ_SET (obj_cmd_rq, "gratuitous_arp_interval", gratuitous_arp_interval); return (0); } int fill_cmd_set_lan_configuration_parameters_default_gateway_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_default_gateway_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_ip (IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_ADDRESS, channel_number, ip_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_default_gateway_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_default_gateway_mac_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_mac_address (IPMI_LAN_CONFIGURATION_PARAMETER_DEFAULT_GATEWAY_MAC_ADDRESS, channel_number, mac_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_backup_gateway_address (uint8_t channel_number, uint32_t ip_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_backup_gateway_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_ip (IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_ADDRESS, channel_number, ip_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (uint8_t channel_number, uint64_t mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_backup_gateway_mac_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_lan_mac_address (IPMI_LAN_CONFIGURATION_PARAMETER_BACKUP_GATEWAY_MAC_ADDRESS, channel_number, mac_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_community_string (uint8_t channel_number, const char *community_string, unsigned int community_string_len, fiid_obj_t obj_cmd_rq) { char buf[IPMI_MAX_COMMUNITY_STRING_LENGTH]; /* achu: community_string can be the max length. Null termination in IPMI * packet not required. */ if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (community_string && community_string_len > IPMI_MAX_COMMUNITY_STRING_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_community_string_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_COMMUNITY_STRING); /* achu: community_string should be zero extended */ memset (buf, '\0', IPMI_MAX_COMMUNITY_STRING_LENGTH); if (community_string) strncpy (buf, community_string, IPMI_MAX_COMMUNITY_STRING_LENGTH); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "community_string", buf, IPMI_MAX_COMMUNITY_STRING_LENGTH); return (0); } int fill_cmd_set_lan_configuration_parameters_destination_type (uint8_t channel_number, uint8_t destination_selector, uint8_t destination_type, uint8_t alert_acknowledge, uint8_t alert_acknowledge_timeout, uint8_t retries, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_DESTINATION_SELECTOR_VALID (destination_selector) || !IPMI_DESTINATION_TYPE_VALID (destination_type) || !IPMI_ALERT_VALID (alert_acknowledge) || (retries > IPMI_ALERT_RETRIES_MAX) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_destination_type_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_TYPE); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_selector", destination_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_type", destination_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_acknowledge", alert_acknowledge); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_acknowledge_timeout", alert_acknowledge_timeout); FILL_FIID_OBJ_SET (obj_cmd_rq, "retries", retries); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved5", 0); return (0); } int fill_cmd_set_lan_configuration_parameters_destination_addresses (uint8_t channel_number, uint8_t destination_selector, uint8_t gateway_selector, uint32_t alerting_ip_address, uint64_t alerting_mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_DESTINATION_SELECTOR_VALID (destination_selector) || !IPMI_GATEWAY_SELECTOR_VALID (gateway_selector) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_DESTINATION_ADDRESSES); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_selector", destination_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "address_format", IPMI_ADDRESS_FORMAT_IPV4); FILL_FIID_OBJ_SET (obj_cmd_rq, "gateway_selector", gateway_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alerting_ip_address", alerting_ip_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "alerting_mac_address", alerting_mac_address); return (0); } int fill_cmd_set_lan_configuration_parameters_vlan_id (uint8_t channel_number, uint16_t vlan_id, uint8_t vlan_id_enable, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_VLAN_ID_ENABLE_VALID (vlan_id_enable) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_vlan_id_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_ID); FILL_FIID_OBJ_SET (obj_cmd_rq, "vlan_id", vlan_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "vlan_id_enable", vlan_id_enable); return (0); } int fill_cmd_set_lan_configuration_parameters_vlan_priority (uint8_t channel_number, uint8_t vlan_priority, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_vlan_priority_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_VLAN_PRIORITY); FILL_FIID_OBJ_SET (obj_cmd_rq, "vlan_priority", vlan_priority); FILL_FIID_OBJ_SET (obj_cmd_rq, "unspecified", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (uint8_t channel_number, uint8_t maximum_privilege_for_cipher_suite_1, uint8_t maximum_privilege_for_cipher_suite_2, uint8_t maximum_privilege_for_cipher_suite_3, uint8_t maximum_privilege_for_cipher_suite_4, uint8_t maximum_privilege_for_cipher_suite_5, uint8_t maximum_privilege_for_cipher_suite_6, uint8_t maximum_privilege_for_cipher_suite_7, uint8_t maximum_privilege_for_cipher_suite_8, uint8_t maximum_privilege_for_cipher_suite_9, uint8_t maximum_privilege_for_cipher_suite_10, uint8_t maximum_privilege_for_cipher_suite_11, uint8_t maximum_privilege_for_cipher_suite_12, uint8_t maximum_privilege_for_cipher_suite_13, uint8_t maximum_privilege_for_cipher_suite_14, uint8_t maximum_privilege_for_cipher_suite_15, uint8_t maximum_privilege_for_cipher_suite_16, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_1) || !maximum_privilege_for_cipher_suite_1) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_2) || !maximum_privilege_for_cipher_suite_2) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_3) || !maximum_privilege_for_cipher_suite_3) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_4) || !maximum_privilege_for_cipher_suite_4) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_5) || !maximum_privilege_for_cipher_suite_5) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_6) || !maximum_privilege_for_cipher_suite_6) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_7) || !maximum_privilege_for_cipher_suite_7) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_8) || !maximum_privilege_for_cipher_suite_8) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_9) || !maximum_privilege_for_cipher_suite_9) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_10) || !maximum_privilege_for_cipher_suite_10) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_11) || !maximum_privilege_for_cipher_suite_11) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_12) || !maximum_privilege_for_cipher_suite_12) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_13) || !maximum_privilege_for_cipher_suite_13) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_14) || !maximum_privilege_for_cipher_suite_14) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_15) || !maximum_privilege_for_cipher_suite_15) || !(IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_for_cipher_suite_16) || !maximum_privilege_for_cipher_suite_16) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_RMCPPLUS_MESSAGING_CIPHER_SUITE_PRIVILEGE_LEVELS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_1", maximum_privilege_for_cipher_suite_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_2", maximum_privilege_for_cipher_suite_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_3", maximum_privilege_for_cipher_suite_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_4", maximum_privilege_for_cipher_suite_4); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_5", maximum_privilege_for_cipher_suite_5); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_6", maximum_privilege_for_cipher_suite_6); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_7", maximum_privilege_for_cipher_suite_7); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_8", maximum_privilege_for_cipher_suite_8); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_9", maximum_privilege_for_cipher_suite_9); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_10", maximum_privilege_for_cipher_suite_10); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_11", maximum_privilege_for_cipher_suite_11); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_12", maximum_privilege_for_cipher_suite_12); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_13", maximum_privilege_for_cipher_suite_13); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_14", maximum_privilege_for_cipher_suite_14); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_15", maximum_privilege_for_cipher_suite_15); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_for_cipher_suite_16", maximum_privilege_for_cipher_suite_16); return (0); } int fill_cmd_set_lan_configuration_parameters_bad_password_threshold (uint8_t channel_number, uint8_t user_disabled_event_message, uint8_t bad_password_threshold_number, uint16_t attempt_count_reset_interval, uint16_t user_lockout_interval, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_USER_DISABLED_EVENT_MESSAGE_VALID (user_disabled_event_message) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_bad_password_threshold_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_BAD_PASSWORD_THRESHOLD); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_disabled_event_message", user_disabled_event_message); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "bad_password_threshold_number", bad_password_threshold_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "attempt_count_reset_interval", attempt_count_reset_interval); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_lockout_interval", user_lockout_interval); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (uint8_t channel_number, uint8_t enables, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_IPV6_IPV4_ADDRESSING_ENABLES_VALID (enables) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_IPV4_ADDRESSING_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "enables", enables); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class (uint8_t channel_number, uint8_t traffic_class, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_traffic_class_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_TRAFFIC_CLASS); FILL_FIID_OBJ_SET (obj_cmd_rq, "traffic_class", traffic_class); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit (uint8_t channel_number, uint8_t static_hop_limit, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_header_static_hop_limit_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_STATIC_HOP_LIMIT); FILL_FIID_OBJ_SET (obj_cmd_rq, "static_hop_limit", static_hop_limit); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_header_flow_label (uint8_t channel_number, uint64_t flow_label, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_HEADER_FLOW_LABEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "flow_label", flow_label); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_addresses (uint8_t channel_number, uint8_t set_selector, uint8_t source, uint8_t enable, uint8_t address[IPMI_IPV6_BYTES], uint8_t address_prefix_length, uint8_t address_status, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_IPV6_STATIC_ADDRESS_SOURCE_VALID (source) || !IPMI_IPV6_ADDRESS_SOURCE_ENABLE_VALID (enable) || address_prefix_length > IPMI_IPV6_PREFIX_LENGTH_MAX || !IPMI_IPV6_ADDRESS_STATUS_VALID (address_status) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_header_flow_label_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ADDRESSES); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "source", source); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "enable", enable); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "address", address, IPMI_IPV6_BYTES); FILL_FIID_OBJ_SET (obj_cmd_rq, "address_prefix_length", address_prefix_length); FILL_FIID_OBJ_SET (obj_cmd_rq, "address_status", address_status); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (uint8_t channel_number, uint8_t enable_static_router_address, uint8_t enable_dynamic_router_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_IPV6_STATIC_ROUTER_ADDRESS_ENABLE_VALID (enable_static_router_address) || !IPMI_IPV6_DYNAMIC_ROUTER_ADDRESS_ENABLE_VALID (enable_dynamic_router_address) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_ROUTER_ADDRESS_CONFIGURATION_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_static_router_address", enable_static_router_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "enable_dynamic_router_address", enable_dynamic_router_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } static int _fill_router_ip_address (uint8_t parameter_selector, uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_IP_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_IP_ADDRESS) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "ipv6_router_ip_address", router_ip_address, IPMI_IPV6_BYTES); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_ip_address (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_IP_ADDRESS, channel_number, router_ip_address, obj_cmd_rq)); } static int _fill_router_mac_address (uint8_t parameter_selector, uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_MAC_ADDRESS || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_MAC_ADDRESS) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "router_mac_address", router_mac_address); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_mac_address (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_MAC_ADDRESS, channel_number, router_mac_address, obj_cmd_rq)); } static int _fill_router_prefix_length (uint8_t parameter_selector, uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_LENGTH || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_LENGTH) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "prefix_length", prefix_length); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || prefix_length > IPMI_IPV6_PREFIX_LENGTH_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_prefix_length (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_LENGTH, channel_number, prefix_length, obj_cmd_rq)); } static int _fill_router_prefix_value (uint8_t parameter_selector, uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { assert ((parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_VALUE || parameter_selector == IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_VALUE) && IPMI_CHANNEL_NUMBER_VALID (channel_number) && fiid_obj_valid (obj_cmd_rq)); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "prefix_value", prefix_value, IPMI_IPV6_BYTES); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_prefix_value (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_1_PREFIX_VALUE, channel_number, prefix_value, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (uint8_t channel_number, uint8_t router_ip_address[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_ip_address (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_IP_ADDRESS, channel_number, router_ip_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (uint8_t channel_number, uint64_t router_mac_address, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_mac_address (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_MAC_ADDRESS, channel_number, router_mac_address, obj_cmd_rq)); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (uint8_t channel_number, uint8_t prefix_length, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || prefix_length > IPMI_IPV6_PREFIX_LENGTH_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_prefix_length (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_LENGTH, channel_number, prefix_length, obj_cmd_rq)); return (0); } int fill_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (uint8_t channel_number, uint8_t prefix_value[IPMI_IPV6_BYTES], fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rq) < 0) { ERRNO_TRACE (errno); return (-1); } return (_fill_router_prefix_value (IPMI_LAN_CONFIGURATION_PARAMETER_IPV6_STATIC_ROUTER_2_PREFIX_VALUE, channel_number, prefix_value, obj_cmd_rq)); } int fill_cmd_get_lan_configuration_parameters (uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_GET_LAN_PARAMETER_VALID (get_parameter) || (!IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_LAN_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_lan_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_parameter", get_parameter); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } int fill_cmd_suspend_bmc_arps (uint8_t channel_number, uint8_t gratuitous_arp_suspend, uint8_t arp_response_suspend, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID (gratuitous_arp_suspend) || !IPMI_BMC_GENERATED_ARP_RESPONSE_VALID (arp_response_suspend) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_suspend_bmc_arps_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SUSPEND_BMC_ARPS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "gratuitous_arp_suspend", gratuitous_arp_suspend); FILL_FIID_OBJ_SET (obj_cmd_rq, "arp_response_suspend", arp_response_suspend); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_get_ip_udp_rmcp_statistics (uint8_t channel_number, uint8_t clear_all_statistics, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_CLEAR_ALL_STATISTICS_VALID (clear_all_statistics) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_ip_udp_rmcp_statistics_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_IP_UDP_RMCP_STATISTICS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_all_statistics", clear_all_statistics); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-messaging-support-cmds.c0000644002055400205540000031246413527331636024225 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-system-info-parameters-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_MAX_K_LENGTH 64 fiid_template_t tmpl_cmd_set_bmc_global_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "receive_message_queue_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_message_buffer_full_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_message_buffer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "system_event_logging", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_bmc_global_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_bmc_global_enables_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_bmc_global_enables_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "receive_message_queue_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_message_buffer_full_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_message_buffer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "system_event_logging", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_clear_message_flags_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_receive_message_queue", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_event_message_buffer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_watchdog_pre_timeout_interrupt_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_oem_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_oem_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "clear_oem_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_clear_message_flags_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_message_flags_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_message_flags_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "receive_message_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_message_buffer_full", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "watchdog_pre_timeout_interrupt_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_0_data_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_1_data_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_2_data_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_enable_message_channel_receive_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "channel_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_enable_message_channel_receive_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_message_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_message_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "inferred_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "message_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_send_message_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_message_with_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_message_with_encryption", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "tracking_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "message_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_send_message_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1024, "response_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_read_event_message_buffer_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_read_event_message_buffer_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "message_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_interface_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "system_interface", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_interface_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_interface_capabilities_ssif_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "ssif_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pec_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "transaction_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "input_message_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "output_message_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_interface_capabilities_kcs_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "system_interface_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "input_maximum_message_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_bt_interface_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "number_of_outstanding_requests_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "input_buffer_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in bytes */ { 8, "output_buffer_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in bytes */ { 8, "bmc_request_to_response_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in seconds */ { 8, "recommended_retries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_master_write_read_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "bus_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "bus_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "read_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2040, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_master_write_read_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 2040, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_ipmi_v2.0_extended_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.straight_password_key", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.oem_prop", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.ipmi_v2.0_extended_capabilities_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.anonymous_login", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.null_username", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.non_null_username", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.user_level_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.per_message_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.k_g", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "authentication_status.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_supports_ipmi_v1.5_connections", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_supports_ipmi_v2.0_connections", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem_auxiliary_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_guid_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_guid_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "guid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: format in IPMI spec differs from the format in the "Wired for Management Baseline" 2.0 document. In the IPMI spec there is a 2 byte field called "clock_seq_and_reserved", and in "Wired for Management Baseline" there is a 1 byte field called "clock_seq_hi_and_reserved" and a 1 byte field called "clock_seq_low". I am going with the "Wired for Management Baseline" format under the assumption the IPMI spec has a typo. */ fiid_template_t tmpl_cmd_get_system_guid_format_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 48, "node", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 8, "clock_seq_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "clock_seq_hi_and_reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "time_high_and_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "time_mid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "time_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_system_firmware_version_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_system_name_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_operating_system_name_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_present_os_version_number_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_bmc_url_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_system_firmware_version_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_system_name_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_operating_system_name_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_present_os_version_number_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_bmc_url_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "string_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 112, "string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "parameter_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_cipher_suites_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "list_index", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "list_algorithm_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_cipher_suites_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "cipher_suite_record_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_session_challenge_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "authentication_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "user_name", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_session_challenge_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "temp_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 128, "challenge_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_activate_session_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "authentication_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "challenge_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "initial_outbound_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_activate_session_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "authentication_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "initial_inbound_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_session_privilege_level_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_session_privilege_level_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_close_session_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "session_handle", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_close_session_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_channel_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "ipmi_messaging_access_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "per_message_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_alerting", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "channel_access_set", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_privilege_level_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "channel_privilege_level_limit_set", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_channel_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "channel_access_get", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 3, "ipmi_messaging_access_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_level_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "per_message_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_alerting", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_privilege_level_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "actual_channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "actual_channel_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "channel_medium_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_medium_type.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "channel_protocol_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_protocol_type.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "active_session_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "session_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "vendor_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "auxiliary_channel_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_channel_security_keys_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "key_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 160, "key_value", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_channel_security_keys_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 2, "lock_status", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 160, "key_value", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_ipmi_messaging", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_link_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_restricted_to_callback", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "change_bits_in_byte", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "user_privilege_level_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "user_session_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 6, "max_channel_user_ids", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "current_channel_user_ids", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "user_id_enable_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "current_channel_fixed_names", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "user_privilege_level_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_ipmi_messaging", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_link_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_restricted_to_callback", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_name_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "user_id.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "user_name", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_name_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_name_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "user_id.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_name_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 128, "user_name", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: Note that the password is variable length, but it must be * fixed to 0, 16, or 20 bytes. We may try and amend this situation * in fiid at a later time. */ fiid_template_t tmpl_cmd_set_user_password_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "user_id.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "password_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "operation.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 160, "password", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_password_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_set_bmc_global_enables (uint8_t receive_message_queue_interrupt, uint8_t event_message_buffer_full_interrupt, uint8_t event_message_buffer, uint8_t system_event_logging, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rq) { if (!IPMI_BMC_GLOBAL_ENABLES_VALID (receive_message_queue_interrupt) || !IPMI_BMC_GLOBAL_ENABLES_VALID (event_message_buffer_full_interrupt) || !IPMI_BMC_GLOBAL_ENABLES_VALID (event_message_buffer) || !IPMI_BMC_GLOBAL_ENABLES_VALID (system_event_logging) || !IPMI_BMC_GLOBAL_ENABLES_VALID (oem_0) || !IPMI_BMC_GLOBAL_ENABLES_VALID (oem_1) || !IPMI_BMC_GLOBAL_ENABLES_VALID (oem_2) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_bmc_global_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_BMC_GLOBAL_ENABLES); FILL_FIID_OBJ_SET (obj_cmd_rq, "receive_message_queue_interrupt", receive_message_queue_interrupt); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_buffer_full_interrupt", event_message_buffer_full_interrupt); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_buffer", event_message_buffer); FILL_FIID_OBJ_SET (obj_cmd_rq, "system_event_logging", system_event_logging); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_0", oem_0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_1", oem_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_2", oem_2); return (0); } int fill_cmd_get_bmc_global_enables (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_bmc_global_enables_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_BMC_GLOBAL_ENABLES); return (0); } int fill_cmd_clear_message_flags (uint8_t receive_message_queue, uint8_t event_message_buffer, uint8_t watchdog_pre_timeout_interrupt_flag, uint8_t oem_0, uint8_t oem_1, uint8_t oem_2, fiid_obj_t obj_cmd_rq) { if (!IPMI_MESSAGE_FLAGS_VALID (receive_message_queue) || !IPMI_MESSAGE_FLAGS_VALID (event_message_buffer) || !IPMI_MESSAGE_FLAGS_VALID (watchdog_pre_timeout_interrupt_flag) || !IPMI_MESSAGE_FLAGS_VALID (oem_0) || !IPMI_MESSAGE_FLAGS_VALID (oem_1) || !IPMI_MESSAGE_FLAGS_VALID (oem_2) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_clear_message_flags_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CLEAR_MESSAGE_FLAGS); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_receive_message_queue", receive_message_queue); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_event_message_buffer", event_message_buffer); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_watchdog_pre_timeout_interrupt_flag", watchdog_pre_timeout_interrupt_flag); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_oem_0", oem_0); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_oem_1", oem_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "clear_oem_2", oem_2); return (0); } int fill_cmd_get_message_flags (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_message_flags_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_MESSAGE_FLAGS); return (0); } int fill_cmd_enable_message_channel_receive (uint8_t channel_number, uint8_t channel_operation, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_CHANNEL_OPERATION_VALID (channel_operation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_enable_message_channel_receive_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ENABLE_MESSAGE_CHANNEL_RECEIVE); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_operation", channel_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_get_message (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_message_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_MESSAGE); return (0); } int fill_cmd_send_message (uint8_t channel_number, uint8_t message_authentication, uint8_t message_encryption, uint8_t tracking_operation, const void *message_data, unsigned int message_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SEND_MESSAGE_AUTHENTICATION_VALID (message_authentication) || !IPMI_SEND_MESSAGE_ENCRYPTION_VALID (message_encryption) || !IPMI_SEND_MESSAGE_TRACKING_VALID (tracking_operation) || !message_data || !message_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_send_message_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SEND_MESSAGE); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_message_with_authentication", message_authentication); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_message_with_encryption", message_encryption); FILL_FIID_OBJ_SET (obj_cmd_rq, "tracking_operation", tracking_operation); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "message_data", message_data, message_data_len); return (0); } int fill_cmd_read_event_message_buffer (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_read_event_message_buffer_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_READ_EVENT_MESSAGE_BUFFER); return (0); } int fill_cmd_get_system_interface_capabilities (uint8_t system_interface, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_INTERFACE_VALID (system_interface) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_system_interface_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SYSTEM_INTERFACE_CAPABILITIES); FILL_FIID_OBJ_SET (obj_cmd_rq, "system_interface", system_interface); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_get_bt_interface_capabilities (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_bt_interface_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_BT_INTERFACE_CAPABILITIES); return (0); } int fill_cmd_master_write_read (uint8_t bus_type, uint8_t bus_id, uint8_t channel_number, uint8_t slave_address, uint8_t read_count, const void *data, unsigned int data_len, fiid_obj_t obj_cmd_rq) { /* note, don't check channel number, since this is a master write-read command */ if (!IPMI_BUS_TYPE_VALID (bus_type) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_master_write_read_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_MASTER_WRITE_READ); FILL_FIID_OBJ_SET (obj_cmd_rq, "bus_type", bus_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "bus_id", bus_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "slave_address", slave_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "read_count", read_count); if (data && data_len) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "data", data, data_len); return (0); } int fill_cmd_get_channel_authentication_capabilities (uint8_t channel_number, uint8_t maximum_privilege_level, uint8_t get_ipmi_v20_extended_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_level) || !IPMI_GET_IPMI_DATA_VALID (get_ipmi_v20_extended_data) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_authentication_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_ipmi_v2.0_extended_data", get_ipmi_v20_extended_data); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_level", maximum_privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_get_system_guid (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_system_guid_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SYSTEM_GUID); return (0); } int fill_cmd_set_system_info_parameters (uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if ((!IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_info_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_system_info_parameters_set_in_progress (uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_SYSTEM_INFO_PARAMETERS_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_system_info_parameters_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } static int _fill_cmd_set_system_info_parameters_string_first_set_common (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq, fiid_field_t *tmpl_cmd_rq_expected, uint8_t parameter_selector) { uint8_t stringbuf[IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX]; assert (tmpl_cmd_rq_expected); if (!IPMI_SYSTEM_INFO_ENCODING_VALID (encoding) || string_block_length > IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_rq_expected) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "encoding", encoding); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "string_length", string_length); /* achu: spec is not clear if this data should be 0 extended, we * will do it to be on the safe side */ memset (stringbuf, '\0', IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX); if (string_block && string_block_length) memcpy (stringbuf, string_block, string_block_length); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "string", stringbuf, IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX); return (0); } static int _fill_cmd_set_system_info_parameters_string_set_common (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq, fiid_field_t *tmpl_cmd_rq_expected, uint8_t parameter_selector) { uint8_t stringbuf[IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX]; assert (tmpl_cmd_rq_expected); if (string_block_length > IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_rq_expected) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); /* achu: spec is not clear if this data should be 0 extended, we * will do it to be on the safe side */ memset (stringbuf, '\0', IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX); if (string_block && string_block_length) memcpy (stringbuf, string_block, string_block_length); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "string", stringbuf, IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX); return (0); } int fill_cmd_set_system_info_parameters_system_firmware_version_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_system_firmware_version_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_system_firmware_version (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_system_firmware_version_rq, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_FIRMWARE_VERSION) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_system_name_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_system_name_rq, IPMI_SYSTEM_INFO_PARAMETER_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_primary_operating_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_primary_operating_system_name_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_PRIMARY_OPERATING_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_primary_operating_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_primary_operating_system_name_rq, IPMI_SYSTEM_INFO_PARAMETER_PRIMARY_OPERATING_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_operating_system_name_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_operating_system_name_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_OPERATING_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_operating_system_name (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_operating_system_name_rq, IPMI_SYSTEM_INFO_PARAMETER_OPERATING_SYSTEM_NAME) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_present_os_version_number_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_present_os_version_number_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_PRESENT_OS_VERSION_NUMBER) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_present_os_version_number (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_present_os_version_number_rq, IPMI_SYSTEM_INFO_PARAMETER_PRESENT_OS_VERSION_NUMBER) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_bmc_url_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_bmc_url_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_BMC_URL) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_bmc_url (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_bmc_url_rq, IPMI_SYSTEM_INFO_PARAMETER_BMC_URL) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set (uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_first_set_common (set_selector, encoding, string_length, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set_rq, IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_set_system_info_parameters_base_os_hypervisor_url (uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rq) { if (_fill_cmd_set_system_info_parameters_string_set_common (set_selector, string_block, string_block_length, obj_cmd_rq, tmpl_cmd_set_system_info_parameters_base_os_hypervisor_url_rq, IPMI_SYSTEM_INFO_PARAMETER_BASE_OS_HYPERVISOR_URL) < 0) { ERRNO_TRACE (errno); return (-1); } return (0); } int fill_cmd_get_system_info_parameters (uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_GET_SYSTEM_INFO_PARAMETER_VALID (get_parameter) || (!IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SYSTEM_INFO_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_system_info_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_parameter", get_parameter); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } int fill_cmd_get_channel_cipher_suites (uint8_t channel_number, uint8_t payload_type, uint8_t list_index, uint8_t list_algorithm_type, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_LIST_ALGORITHM_TYPE_VALID (list_algorithm_type) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_cipher_suites_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_CIPHER_SUITES); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "list_index", list_index); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "list_algorithm_type", list_algorithm_type); return (0); } int fill_cmd_get_session_challenge (uint8_t authentication_type, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rq) { char buf[IPMI_MAX_USER_NAME_LENGTH]; /* achu: user_name can be IPMI_MAX_USER_NAME_LENGTH length. Null * termination in IPMI packet not required */ if (!IPMI_AUTHENTICATION_TYPE_VALID (authentication_type) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_session_challenge_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SESSION_CHALLENGE); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_type", authentication_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); /* achu: user_name must be zero extended */ memset (buf, '\0', IPMI_MAX_USER_NAME_LENGTH); if (user_name) strncpy (buf, user_name, IPMI_MAX_USER_NAME_LENGTH); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "user_name", buf, IPMI_MAX_USER_NAME_LENGTH); return (0); } int fill_cmd_activate_session (uint8_t authentication_type, uint8_t maximum_privilege_level, const void *challenge_string, unsigned int challenge_string_len, uint32_t initial_outbound_sequence_number, fiid_obj_t obj_cmd_rq) { uint8_t buf[IPMI_CHALLENGE_STRING_LENGTH]; if (!IPMI_AUTHENTICATION_TYPE_VALID (authentication_type) || !IPMI_PRIVILEGE_LEVEL_VALID (maximum_privilege_level) || !challenge_string || (challenge_string_len > IPMI_CHALLENGE_STRING_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_activate_session_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ACTIVATE_SESSION); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_type", authentication_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_privilege_level", maximum_privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); /* achu: challenge string must be zero extended */ memset (buf, '\0', IPMI_CHALLENGE_STRING_LENGTH); memcpy (buf, challenge_string, challenge_string_len); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "challenge_string", buf, IPMI_CHALLENGE_STRING_LENGTH); FILL_FIID_OBJ_SET (obj_cmd_rq, "initial_outbound_sequence_number", initial_outbound_sequence_number); return (0); } int fill_cmd_set_session_privilege_level (uint8_t privilege_level, fiid_obj_t obj_cmd_rq) { if (!IPMI_PRIVILEGE_LEVEL_VALID (privilege_level) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_session_privilege_level_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "privilege_level", privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); return (0); } int fill_cmd_close_session (uint32_t session_id, uint8_t *session_handle, fiid_obj_t obj_cmd_rq) { /* if session_handle, session_id must be 0, see spec */ if (!fiid_obj_valid (obj_cmd_rq) || (session_handle && session_id)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_close_session_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CLOSE_SESSION); FILL_FIID_OBJ_SET (obj_cmd_rq, "session_id", session_id); if (session_handle) FILL_FIID_OBJ_SET (obj_cmd_rq, "session_handle", (*session_handle)); return (0); } int fill_cmd_set_channel_access (uint8_t channel_number, uint8_t ipmi_messaging_access_mode, uint8_t user_level_authentication, uint8_t per_message_authentication, uint8_t pef_alerting, uint8_t channel_access_set, uint8_t channel_privilege_level_limit, uint8_t channel_privilege_level_limit_set, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_MESSAGING_ACCESS_MODE_VALID (ipmi_messaging_access_mode) || !IPMI_USER_LEVEL_AUTHENTICATION_VALID (user_level_authentication) || !IPMI_PER_MESSAGE_AUTHENTICATION_VALID (per_message_authentication) || !IPMI_PEF_ALERTING_VALID (pef_alerting) || !IPMI_CHANNEL_ACCESS_VALID (channel_access_set) || !IPMI_PRIVILEGE_LEVEL_LIMIT_VALID (channel_privilege_level_limit) || !IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VALID (channel_privilege_level_limit_set) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_channel_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_CHANNEL_ACCESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "ipmi_messaging_access_mode", ipmi_messaging_access_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_level_authentication", user_level_authentication); FILL_FIID_OBJ_SET (obj_cmd_rq, "per_message_authentication", per_message_authentication); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_alerting", pef_alerting); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_access_set", channel_access_set); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_privilege_level_limit", channel_privilege_level_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_privilege_level_limit_set", channel_privilege_level_limit_set); return (0); } int fill_cmd_get_channel_access (uint8_t channel_number, uint8_t channel_access_get, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_CHANNEL_ACCESS_GET_VALID (channel_access_get) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_ACCESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_access_get", channel_access_get); return (0); } int fill_cmd_get_channel_info (uint8_t channel_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_INFO_COMMAND); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_channel_security_keys (uint8_t channel_number, uint8_t operation, uint8_t key_id, const void *key_value, unsigned int key_value_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_CHANNEL_SECURITY_KEYS_OPERATION_VALID (operation) || !IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_VALID (key_id) || ((key_id == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R && key_value) && key_value_len > IPMI_MAX_K_R_LENGTH) || ((key_id == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G && key_value) && key_value_len > IPMI_MAX_K_G_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_channel_security_keys_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_CHANNEL_SECURITY_KEYS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "key_id", key_id); if (operation == IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY) { uint8_t buf[IPMI_MAX_K_LENGTH]; unsigned int buf_len; memset (buf, '\0', IPMI_MAX_K_LENGTH); if (key_value && key_value_len) memcpy (buf, key_value, key_value_len); if (key_id == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R) buf_len = IPMI_MAX_K_R_LENGTH; else buf_len = IPMI_MAX_K_G_LENGTH; FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "key_value", buf, buf_len); } return (0); } int fill_cmd_set_user_access (uint8_t channel_number, uint8_t user_ipmi_messaging, uint8_t user_link_authentication, uint8_t user_restricted_to_callback, uint8_t change_bits_in_byte, uint8_t user_id, uint8_t user_privilege_level_limit, uint8_t user_session_limit, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_USER_IPMI_MESSAGING_VALID (user_ipmi_messaging) || !IPMI_USER_LINK_AUTHENTICATION_VALID (user_link_authentication) || !IPMI_USER_RESTRICTED_TO_CALLBACK_VALID (user_restricted_to_callback) || !IPMI_CHANGE_BITS_VALID (change_bits_in_byte) || !IPMI_PRIVILEGE_LEVEL_LIMIT_VALID (user_privilege_level_limit) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_user_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_USER_ACCESS_COMMAND); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_ipmi_messaging", user_ipmi_messaging); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_link_authentication", user_link_authentication); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_restricted_to_callback", user_restricted_to_callback); FILL_FIID_OBJ_SET (obj_cmd_rq, "change_bits_in_byte", change_bits_in_byte); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_privilege_level_limit", user_privilege_level_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_session_limit", user_session_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_get_user_access (uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_user_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_USER_ACCESS_COMMAND); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_user_name (uint8_t user_id, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rq) { char buf[IPMI_MAX_USER_NAME_LENGTH]; /* achu: user_name can be IPMI_MAX_USER_NAME_LENGTH length. Null * termination in IPMI packet not required */ if ((user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_user_name_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_USER_NAME); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id.reserved", 0); /* achu: user_name must be zero extended */ memset (buf, '\0', IPMI_MAX_USER_NAME_LENGTH); if (user_name) strncpy (buf, user_name, IPMI_MAX_USER_NAME_LENGTH); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "user_name", buf, IPMI_MAX_USER_NAME_LENGTH); return (0); } int fill_cmd_get_user_name (uint8_t user_id, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_user_name_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_USER_NAME_COMMAND); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id.reserved", 0); return (0); } int fill_cmd_set_user_password (uint8_t user_id, uint8_t password_size, uint8_t operation, const char *password, unsigned int password_len, fiid_obj_t obj_cmd_rq) { /* achu: password can be the max length. Null termination in IPMI * packet not required. * * Note that for IPMI 1.5 only machines, > 16 byte passwords will * simply fail and return an error. */ if (!IPMI_PASSWORD_OPERATION_VALID (operation) || !IPMI_PASSWORD_SIZE_VALID (password_size) || (password && password_size == IPMI_PASSWORD_SIZE_16_BYTES && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) || (password && password_size == IPMI_PASSWORD_SIZE_20_BYTES && password_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_user_password_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_USER_PASSWORD_COMMAND); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "password_size", password_size); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation.reserved", 0); if (operation == IPMI_PASSWORD_OPERATION_SET_PASSWORD || operation == IPMI_PASSWORD_OPERATION_TEST_PASSWORD) { char buf[IPMI_2_0_MAX_PASSWORD_LENGTH]; unsigned int buf_max_len; if (password_size == IPMI_PASSWORD_SIZE_16_BYTES) buf_max_len = IPMI_1_5_MAX_PASSWORD_LENGTH; else buf_max_len = IPMI_2_0_MAX_PASSWORD_LENGTH; /* achu: password must be zero extended */ memset (buf, '\0', buf_max_len); if (password) strncpy (buf, password, buf_max_len); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "password", buf, buf_max_len); } return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-oem-intel-node-manager-cmds.c0000644002055400205540000026243513527331636024764 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/oem/ipmi-cmd-oem-intel-node-manager-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/oem/ipmi-cmd-oem-intel-node-manager-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /******************************************* * Intel * *******************************************/ fiid_template_t tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_enable_disable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_trigger_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_configuration_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "aggressive_cpu_power_correction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_storage_option", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.send_alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.shutdown_system", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "policy_exception_actions.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_power_domain", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "policy_target_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "correction_time_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "policy_trigger_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_trigger_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_configuration_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "aggressive_cpu_power_correction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_storage_option", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.send_alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.shutdown_system", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "policy_exception_actions.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_power_domain", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_target_limit.platform_booting_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "policy_target_limit.cores_disabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_target_limit.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "policy_target_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "correction_time_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "policy_trigger_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "per_domain_node_manager_policy_control_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "global_node_manager_policy_control_enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_created_and_managed_by_other_management", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_trigger_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "aggressive_cpu_power_correction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_storage_option", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.send_alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_exception_actions.shutdown_system", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "policy_exception_actions.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_power_domain", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* listed as "power limit" in 2.0 spec but "policy target limit" * in set version. changing to 'policy target limit' to be * consistent */ { 16, "policy_target_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "correction_time_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "policy_trigger_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: spec lists "alert threshold array", however each alert * threshold is 2 bytes and there is a max of 3, so I list as the * entries and make them optional */ fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_alert_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: spec lists "alert threshold array", however each alert * threshold is 2 bytes and there is a max of 3, so I list the * entries and make them optional */ fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_alert_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "alert_threshold3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* achu: spec lists "array of policy suspend periods", however each * alert threshold is 3 bytes and there is a max of 5, so I list the * entries and make them optional */ fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_policy_suspend_periods", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy1.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy1.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy2.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy2.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy3.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy3.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy4.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy4.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy5.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy5.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_policy_suspend_periods", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy1.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy1.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy1.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy2.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy2.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy2.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy3.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy3.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy3.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy4.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy4.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy4.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy5.suspend_start_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "policy5.suspend_stop_time", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.monday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.tuesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.wednesday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.thursday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.friday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.saturday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.sunday", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "policy5.suspend_period_recurrence.reserved", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "current", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "average", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_global_administrative_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_operational_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "measurements_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_activation_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_trigger_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "policy_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_power_domain", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "max_concurrent_settings", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "max_power_thermal_time_after_reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "min_power_thermal_time_after_reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "min_correction_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "max_correction_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "min_statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "max_statistics_reporting_period", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_limiting_scope.domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "domain_limiting_scope.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "domain_limiting_scope.limiting_based_on", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "node_manager_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "ipmi_interface_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "patch_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "major_firmware_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "minor_firmware_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_power_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_power_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_receiver_deactivation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "destination_information", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_receiver_deactivation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_receiver_deactivation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_receiver_deactivation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "cpu_socket_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "active_cores_configuration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "turbo_ratio_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "cpu_socket_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "active_cores_configuration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "current_turbo_ratio_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "default_turbo_ratio_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "maximum_turbo_ratio_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "minimum_turbo_ratio_limit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "domain_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "policy_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (uint8_t policy_enable_disable, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_VALID (policy_enable_disable) || !IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_ENABLE_DISABLE_NODE_MANAGER_POLICY_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_enable_disable", policy_enable_disable); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_policy (uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint16_t policy_target_limit, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED_VALID (policy_enabled) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID (policy_trigger_type) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_VALID (policy_configuration_action) || !IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_VALID (aggressive_cpu_power_correction) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VALID (policy_storage_option) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID (policy_exception_actions_send_alert) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID (policy_exception_actions_shutdown_system) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID (policy_power_domain) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_enabled", policy_enabled); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_trigger_type", policy_trigger_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_configuration_action", policy_configuration_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "aggressive_cpu_power_correction", aggressive_cpu_power_correction); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_storage_option", policy_storage_option); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.send_alert", policy_exception_actions_send_alert); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.shutdown_system", policy_exception_actions_shutdown_system); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_power_domain", policy_power_domain); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_target_limit", policy_target_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "correction_time_limit", correction_time_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_trigger_limit", policy_trigger_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "statistics_reporting_period", statistics_reporting_period); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (uint8_t domain_id, uint8_t policy_enabled, uint8_t policy_id, uint8_t policy_trigger_type, uint8_t policy_configuration_action, uint8_t aggressive_cpu_power_correction, uint8_t policy_storage_option, uint8_t policy_exception_actions_send_alert, uint8_t policy_exception_actions_shutdown_system, uint8_t policy_power_domain, uint8_t platform_booting_mode, uint8_t cores_disabled, uint32_t correction_time_limit, uint16_t policy_trigger_limit, uint16_t statistics_reporting_period, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED_VALID (policy_enabled) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID (policy_trigger_type) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_VALID (policy_configuration_action) || !IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_VALID (aggressive_cpu_power_correction) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VALID (policy_storage_option) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID (policy_exception_actions_send_alert) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_VALID (policy_exception_actions_shutdown_system) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID (policy_power_domain) || !IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_VALID (platform_booting_mode) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_enabled", policy_enabled); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_trigger_type", policy_trigger_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_configuration_action", policy_configuration_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "aggressive_cpu_power_correction", aggressive_cpu_power_correction); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_storage_option", policy_storage_option); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.send_alert", policy_exception_actions_send_alert); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.shutdown_system", policy_exception_actions_shutdown_system); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_exception_actions.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_power_domain", policy_power_domain); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_target_limit.platform_booting_mode", platform_booting_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_target_limit.cores_disabled", cores_disabled); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_target_limit.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "correction_time_limit", correction_time_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_trigger_limit", policy_trigger_limit); FILL_FIID_OBJ_SET (obj_cmd_rq, "statistics_reporting_period", statistics_reporting_period); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_policy (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (uint8_t domain_id, uint8_t policy_id, uint16_t *alert_threshold1, uint16_t *alert_threshold2, uint16_t *alert_threshold3, fiid_obj_t obj_cmd_rq) { uint8_t number_of_alert_thresholds = 0; if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); /* Note: Do not need to "order" these, these fields are optional, and thus * the fiid library can "pack" them accordingly. */ if (alert_threshold1) { FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_threshold1", *alert_threshold1); number_of_alert_thresholds++; } if (alert_threshold2) { FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_threshold2", *alert_threshold2); number_of_alert_thresholds++; } if (alert_threshold3) { FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_threshold3", *alert_threshold3); number_of_alert_thresholds++; } FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_alert_thresholds", number_of_alert_thresholds); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (uint8_t domain_id, uint8_t policy_id, uint8_t *policy1_suspend_start_time, uint8_t *policy1_suspend_stop_time, uint8_t *policy1_suspend_period_recurrence_monday, uint8_t *policy1_suspend_period_recurrence_tuesday, uint8_t *policy1_suspend_period_recurrence_wednesday, uint8_t *policy1_suspend_period_recurrence_thursday, uint8_t *policy1_suspend_period_recurrence_friday, uint8_t *policy1_suspend_period_recurrence_saturday, uint8_t *policy1_suspend_period_recurrence_sunday, uint8_t *policy2_suspend_start_time, uint8_t *policy2_suspend_stop_time, uint8_t *policy2_suspend_period_recurrence_monday, uint8_t *policy2_suspend_period_recurrence_tuesday, uint8_t *policy2_suspend_period_recurrence_wednesday, uint8_t *policy2_suspend_period_recurrence_thursday, uint8_t *policy2_suspend_period_recurrence_friday, uint8_t *policy2_suspend_period_recurrence_saturday, uint8_t *policy2_suspend_period_recurrence_sunday, uint8_t *policy3_suspend_start_time, uint8_t *policy3_suspend_stop_time, uint8_t *policy3_suspend_period_recurrence_monday, uint8_t *policy3_suspend_period_recurrence_tuesday, uint8_t *policy3_suspend_period_recurrence_wednesday, uint8_t *policy3_suspend_period_recurrence_thursday, uint8_t *policy3_suspend_period_recurrence_friday, uint8_t *policy3_suspend_period_recurrence_saturday, uint8_t *policy3_suspend_period_recurrence_sunday, uint8_t *policy4_suspend_start_time, uint8_t *policy4_suspend_stop_time, uint8_t *policy4_suspend_period_recurrence_monday, uint8_t *policy4_suspend_period_recurrence_tuesday, uint8_t *policy4_suspend_period_recurrence_wednesday, uint8_t *policy4_suspend_period_recurrence_thursday, uint8_t *policy4_suspend_period_recurrence_friday, uint8_t *policy4_suspend_period_recurrence_saturday, uint8_t *policy4_suspend_period_recurrence_sunday, uint8_t *policy5_suspend_start_time, uint8_t *policy5_suspend_stop_time, uint8_t *policy5_suspend_period_recurrence_monday, uint8_t *policy5_suspend_period_recurrence_tuesday, uint8_t *policy5_suspend_period_recurrence_wednesday, uint8_t *policy5_suspend_period_recurrence_thursday, uint8_t *policy5_suspend_period_recurrence_friday, uint8_t *policy5_suspend_period_recurrence_saturday, uint8_t *policy5_suspend_period_recurrence_sunday, fiid_obj_t obj_cmd_rq) { uint8_t number_of_policy_suspend_periods = 0; if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !((!policy1_suspend_start_time && !policy1_suspend_stop_time && !policy1_suspend_period_recurrence_monday && !policy1_suspend_period_recurrence_tuesday && !policy1_suspend_period_recurrence_wednesday && !policy1_suspend_period_recurrence_thursday && !policy1_suspend_period_recurrence_friday && !policy1_suspend_period_recurrence_saturday && !policy1_suspend_period_recurrence_sunday) || (policy1_suspend_start_time && policy1_suspend_stop_time && policy1_suspend_period_recurrence_monday && policy1_suspend_period_recurrence_tuesday && policy1_suspend_period_recurrence_wednesday && policy1_suspend_period_recurrence_thursday && policy1_suspend_period_recurrence_friday && policy1_suspend_period_recurrence_saturday && policy1_suspend_period_recurrence_sunday && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (*policy1_suspend_start_time) && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (*policy1_suspend_stop_time) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_monday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_tuesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_wednesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_thursday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_friday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_saturday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy1_suspend_period_recurrence_sunday))) || !((!policy2_suspend_start_time && !policy2_suspend_stop_time && !policy2_suspend_period_recurrence_monday && !policy2_suspend_period_recurrence_tuesday && !policy2_suspend_period_recurrence_wednesday && !policy2_suspend_period_recurrence_thursday && !policy2_suspend_period_recurrence_friday && !policy2_suspend_period_recurrence_saturday && !policy2_suspend_period_recurrence_sunday) || (policy2_suspend_start_time && policy2_suspend_stop_time && policy2_suspend_period_recurrence_monday && policy2_suspend_period_recurrence_tuesday && policy2_suspend_period_recurrence_wednesday && policy2_suspend_period_recurrence_thursday && policy2_suspend_period_recurrence_friday && policy2_suspend_period_recurrence_saturday && policy2_suspend_period_recurrence_sunday && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (*policy2_suspend_start_time) && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (*policy2_suspend_stop_time) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_monday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_tuesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_wednesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_thursday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_friday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_saturday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy2_suspend_period_recurrence_sunday))) || !((!policy3_suspend_start_time && !policy3_suspend_stop_time && !policy3_suspend_period_recurrence_monday && !policy3_suspend_period_recurrence_tuesday && !policy3_suspend_period_recurrence_wednesday && !policy3_suspend_period_recurrence_thursday && !policy3_suspend_period_recurrence_friday && !policy3_suspend_period_recurrence_saturday && !policy3_suspend_period_recurrence_sunday) || (policy3_suspend_start_time && policy3_suspend_stop_time && policy3_suspend_period_recurrence_monday && policy3_suspend_period_recurrence_tuesday && policy3_suspend_period_recurrence_wednesday && policy3_suspend_period_recurrence_thursday && policy3_suspend_period_recurrence_friday && policy3_suspend_period_recurrence_saturday && policy3_suspend_period_recurrence_sunday && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (*policy3_suspend_start_time) && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (*policy3_suspend_stop_time) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_monday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_tuesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_wednesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_thursday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_friday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_saturday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy3_suspend_period_recurrence_sunday))) || !((!policy4_suspend_start_time && !policy4_suspend_stop_time && !policy4_suspend_period_recurrence_monday && !policy4_suspend_period_recurrence_tuesday && !policy4_suspend_period_recurrence_wednesday && !policy4_suspend_period_recurrence_thursday && !policy4_suspend_period_recurrence_friday && !policy4_suspend_period_recurrence_saturday && !policy4_suspend_period_recurrence_sunday) || (policy4_suspend_start_time && policy4_suspend_stop_time && policy4_suspend_period_recurrence_monday && policy4_suspend_period_recurrence_tuesday && policy4_suspend_period_recurrence_wednesday && policy4_suspend_period_recurrence_thursday && policy4_suspend_period_recurrence_friday && policy4_suspend_period_recurrence_saturday && policy4_suspend_period_recurrence_sunday && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (*policy4_suspend_start_time) && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (*policy4_suspend_stop_time) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_monday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_tuesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_wednesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_thursday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_friday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_saturday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy4_suspend_period_recurrence_sunday))) || !((!policy5_suspend_start_time && !policy5_suspend_stop_time && !policy5_suspend_period_recurrence_monday && !policy5_suspend_period_recurrence_tuesday && !policy5_suspend_period_recurrence_wednesday && !policy5_suspend_period_recurrence_thursday && !policy5_suspend_period_recurrence_friday && !policy5_suspend_period_recurrence_saturday && !policy5_suspend_period_recurrence_sunday) || (policy5_suspend_start_time && policy5_suspend_stop_time && policy5_suspend_period_recurrence_monday && policy5_suspend_period_recurrence_tuesday && policy5_suspend_period_recurrence_wednesday && policy5_suspend_period_recurrence_thursday && policy5_suspend_period_recurrence_friday && policy5_suspend_period_recurrence_saturday && policy5_suspend_period_recurrence_sunday && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (*policy5_suspend_start_time) && IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (*policy5_suspend_stop_time) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_monday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_tuesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_wednesday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_thursday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_friday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_saturday) && IPMI_OEM_INTEL_NODE_MANAGER_SUSPEND_PERIOD_VALID (*policy5_suspend_period_recurrence_sunday))) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); /* Note: Do not need to "order" these, these fields are optional, and thus * the fiid library can "pack" them accordingly. */ /* single pointer check sufficient given earlier checks */ if (policy1_suspend_start_time) { FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_start_time", *policy1_suspend_start_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_stop_time", *policy1_suspend_stop_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.monday", *policy1_suspend_period_recurrence_monday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.tuesday", *policy1_suspend_period_recurrence_tuesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.wednesday", *policy1_suspend_period_recurrence_wednesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.thursday", *policy1_suspend_period_recurrence_thursday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.friday", *policy1_suspend_period_recurrence_friday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.saturday", *policy1_suspend_period_recurrence_saturday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.sunday", *policy1_suspend_period_recurrence_sunday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy1.suspend_period_recurrence.reserved", 0); number_of_policy_suspend_periods++; } /* single pointer check sufficient given earlier checks */ if (policy2_suspend_start_time) { FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_start_time", *policy2_suspend_start_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_stop_time", *policy2_suspend_stop_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.monday", *policy2_suspend_period_recurrence_monday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.tuesday", *policy2_suspend_period_recurrence_tuesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.wednesday", *policy2_suspend_period_recurrence_wednesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.thursday", *policy2_suspend_period_recurrence_thursday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.friday", *policy2_suspend_period_recurrence_friday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.saturday", *policy2_suspend_period_recurrence_saturday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.sunday", *policy2_suspend_period_recurrence_sunday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy2.suspend_period_recurrence.reserved", 0); number_of_policy_suspend_periods++; } /* single pointer check sufficient given earlier checks */ if (policy3_suspend_start_time) { FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_start_time", *policy3_suspend_start_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_stop_time", *policy3_suspend_stop_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.monday", *policy3_suspend_period_recurrence_monday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.tuesday", *policy3_suspend_period_recurrence_tuesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.wednesday", *policy3_suspend_period_recurrence_wednesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.thursday", *policy3_suspend_period_recurrence_thursday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.friday", *policy3_suspend_period_recurrence_friday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.saturday", *policy3_suspend_period_recurrence_saturday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.sunday", *policy3_suspend_period_recurrence_sunday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy3.suspend_period_recurrence.reserved", 0); number_of_policy_suspend_periods++; } /* single pointer check sufficient given earlier checks */ if (policy4_suspend_start_time) { FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_start_time", *policy4_suspend_start_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_stop_time", *policy4_suspend_stop_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.monday", *policy4_suspend_period_recurrence_monday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.tuesday", *policy4_suspend_period_recurrence_tuesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.wednesday", *policy4_suspend_period_recurrence_wednesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.thursday", *policy4_suspend_period_recurrence_thursday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.friday", *policy4_suspend_period_recurrence_friday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.saturday", *policy4_suspend_period_recurrence_saturday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.sunday", *policy4_suspend_period_recurrence_sunday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy4.suspend_period_recurrence.reserved", 0); number_of_policy_suspend_periods++; } /* single pointer check sufficient given earlier checks */ if (policy5_suspend_start_time) { FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_start_time", *policy5_suspend_start_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_stop_time", *policy5_suspend_stop_time); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.monday", *policy5_suspend_period_recurrence_monday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.tuesday", *policy5_suspend_period_recurrence_tuesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.wednesday", *policy5_suspend_period_recurrence_wednesday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.thursday", *policy5_suspend_period_recurrence_thursday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.friday", *policy5_suspend_period_recurrence_friday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.saturday", *policy5_suspend_period_recurrence_saturday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.sunday", *policy5_suspend_period_recurrence_sunday); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy5.suspend_period_recurrence.reserved", 0); number_of_policy_suspend_periods++; } FILL_FIID_OBJ_SET (obj_cmd_rq, "number_of_policy_suspend_periods", number_of_policy_suspend_periods); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_SUSPEND_PERIODS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_reset_node_manager_statistics (uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_VALID (mode) || !IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_RESET_NODE_MANAGER_STATISTICS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "mode", mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_statistics (uint8_t mode, uint8_t domain_id, uint8_t policy_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_VALID (mode) || !IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_STATISTICS); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "mode", mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_id", policy_id); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_capabilities (uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID (policy_trigger_type) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_VALID (policy_type) || !IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID (policy_power_domain) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_CAPABILITIES); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_trigger_type", policy_trigger_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_type", policy_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_power_domain", policy_power_domain); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_version (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_VERSION); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (uint8_t domain_id, uint16_t minimum_power_draw, uint16_t maximum_power_draw, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POWER_DRAW_RANGE); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "minimum_power_draw", minimum_power_draw); FILL_FIID_OBJ_SET (obj_cmd_rq, "maximum_power_draw", maximum_power_draw); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_information, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID (alert_receiver_deactivation) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_VALID (alert_string_selector) || !IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_VALID (send_alert_string) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_receiver_deactivation", alert_receiver_deactivation); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_information", destination_information); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_string_selector", alert_string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_alert_string", send_alert_string); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t slave_address, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID (alert_receiver_deactivation) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_VALID (alert_string_selector) || !IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_VALID (send_alert_string) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_receiver_deactivation", alert_receiver_deactivation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "slave_address", slave_address); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_string_selector", alert_string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_alert_string", send_alert_string); return (0); } int fill_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan (uint8_t channel_number, uint8_t alert_receiver_deactivation, uint8_t destination_selector, uint8_t alert_string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_VALID (alert_receiver_deactivation) || !IPMI_OEM_INTEL_NODE_MANAGER_ALERT_STRING_SELECTOR_VALID (alert_string_selector) || !IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_VALID (send_alert_string) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_lan_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_receiver_deactivation", alert_receiver_deactivation); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_selector", destination_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_string_selector", alert_string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_alert_string", send_alert_string); return (0); } int fill_cmd_oem_intel_node_manager_get_node_manager_alert_destination (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_ALERT_DESTINATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); return (0); } int fill_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (uint8_t cpu_socket_number, uint8_t active_cores_configuration, uint8_t turbo_ratio_limit, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID (cpu_socket_number) || !IPMI_OEM_INTEL_NODE_MANAGER_SET_ACTIVE_CORES_CONFIGURATION_VALID (active_cores_configuration) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_TURBO_SYNCHRONIZATION_RATIO); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "cpu_socket_number", cpu_socket_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "active_cores_configuration", active_cores_configuration); FILL_FIID_OBJ_SET (obj_cmd_rq, "turbo_ratio_limit", turbo_ratio_limit); return (0); } int fill_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (uint8_t cpu_socket_number, uint8_t active_cores_configuration, fiid_obj_t obj_cmd_rq) { if (!IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID (cpu_socket_number) || !IPMI_OEM_INTEL_NODE_MANAGER_GET_ACTIVE_CORES_CONFIGURATION_VALID (active_cores_configuration) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_TURBO_SYNCHRONIZATION_RATIO); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "cpu_socket_number", cpu_socket_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "active_cores_configuration", active_cores_configuration); return (0); } int fill_cmd_oem_intel_node_manager_get_limiting_policy_id (uint8_t domain_id, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_LIMITING_POLICY_ID); FILL_FIID_OBJ_SET (obj_cmd_rq, "manufacturer_id", IPMI_IANA_ENTERPRISE_ID_INTEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "domain_id", domain_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-pef-and-alerting-cmds.c0000644002055400205540000015600613527331636023651 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-pef-and-alerting-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-pef-configuration-parameters-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_pef_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "pef_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "pef_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.power_down", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.power_cycle", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.oem_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "action_support.diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_event_record_filtering_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_event_filter_table_entries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pef_postpone_timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_arm_pef_postpone_timer_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "present_timer_countdown_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_alert_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_down_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reset_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_cycle_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pef_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pef_alert_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "filter_configuration.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "filter_configuration.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "filter_configuration.filter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.power_off", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.power_cycle", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.group_control_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "alert_policy_number.policy_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "alert_policy_number.group_control_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_policy_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_severity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "generator_id_byte1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "generator_id_byte2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_trigger", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "event_data1_offset_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "filter_configuration.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "filter_configuration.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "filter_configuration.filter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Not indicated as 8 bits in E451, but all other filter number fields adjusted to 8 bits */ { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "set_number_for_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_policy_entry_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "policy_number.policy_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_number.enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_number.policy_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_destination.destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_destination.channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_key.alert_string_set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_string_key.event_specific_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "pef_alert_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_down_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reset_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_cycle_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pef_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pef_alert_startup_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "number_of_event_filters", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "filter_configuration.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "filter_configuration.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "filter_configuration.filter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.power_off", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.power_cycle", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.diagnostic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.group_control_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_filter_action.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "alert_policy_number.policy_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "alert_policy_number.group_control_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_policy_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_severity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "generator_id_byte1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "generator_id_byte2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_trigger", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "event_data1_offset_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_AND_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_compare1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3_compare2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_event_filter_table_data1_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "filter_configuration.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "filter_configuration.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "filter_configuration.filter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "number_of_alert_policy_entries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "number_of_alert_strings", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Not indicated as 8 bits in E451, but all other filter number fields adjusted to 8 bits */ { 8, "filter_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "set_number_for_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "string_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_policy_entry_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_policy_entry_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "policy_number.policy_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "policy_number.enabled", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "policy_number.policy_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_destination.destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_destination.channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "alert_string_key.alert_string_set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "alert_string_key.event_specific_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_last_processed_event_id_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_record_id_for_last_record", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_last_processed_event_id_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_last_processed_event_id_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_last_processed_event_id_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "most_recent_addition_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "record_id_for_last_record_in_sel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "last_sw_processed_event_record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "last_bmc_processed_event_record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_alert_immediate_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "destination_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "string_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "send_alert_string", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_alert_immediate_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_pet_acknowledge_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "local_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_source_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "event_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_pet_acknowledge_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_get_pef_capabilities (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_pef_capabilities_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_PEF_CAPABILITIES); return (0); } int fill_cmd_arm_pef_postpone_timer (uint8_t pef_postpone_timeout, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_arm_pef_postpone_timer_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ARM_PEF_POSTPONE_TIMER); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_postpone_timeout", pef_postpone_timeout); return (0); } int fill_cmd_set_pef_configuration_parameters (uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if ((!IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_pef_configuration_parameters_set_in_progress (uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_PEF_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_SET_IN_PROGRESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_pef_configuration_parameters_pef_control (uint8_t pef, uint8_t pef_event_messages, uint8_t pef_startup_delay, uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rq) { if (!IPMI_PEF_VALID (pef) || !IPMI_PEF_EVENT_MESSAGES_VALID (pef_event_messages) || !IPMI_PEF_STARTUP_DELAY_VALID (pef_startup_delay) || !IPMI_PEF_ALERT_STARTUP_DELAY_VALID (pef_alert_startup_delay) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_pef_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_PEF_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef", pef); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_event_messages", pef_event_messages); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_startup_delay", pef_startup_delay); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_alert_startup_delay", pef_alert_startup_delay); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_pef_configuration_parameters_pef_action_global_control (uint8_t alert_action, uint8_t power_down_action, uint8_t reset_action, uint8_t power_cycle_action, uint8_t oem_action, uint8_t diagnostic_interrupt, fiid_obj_t obj_cmd_rq) { if (!IPMI_PEF_ALERT_ACTION_VALID (alert_action) || !IPMI_PEF_POWER_DOWN_ACTION_VALID (power_down_action) || !IPMI_PEF_RESET_ACTION_VALID (reset_action) || !IPMI_PEF_POWER_CYCLE_ACTION_VALID (power_cycle_action) || !IPMI_PEF_OEM_ACTION_VALID (oem_action) || !IPMI_PEF_DIAGNOSTIC_INTERRUPT_VALID (diagnostic_interrupt) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_pef_action_global_control_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ACTION_GLOBAL_CONTROL); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_action", alert_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "power_down_action", power_down_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "reset_action", reset_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "power_cycle_action", power_cycle_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_action", oem_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "diagnostic_interrupt", diagnostic_interrupt); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_pef_configuration_parameters_pef_startup_delay (uint8_t pef_startup_delay, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_PEF_STARTUP_DELAY); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_startup_delay", pef_startup_delay); return (0); } int fill_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (uint8_t pef_alert_startup_delay, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_pef_alert_startup_delay_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_PEF_ALERT_STARTUP_DELAY); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "pef_alert_startup_delay", pef_alert_startup_delay); return (0); } int fill_cmd_set_pef_configuration_parameters_event_filter_table (uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, uint8_t event_filter_action_alert, uint8_t event_filter_action_power_off, uint8_t event_filter_action_reset, uint8_t event_filter_action_power_cycle, uint8_t event_filter_action_oem, uint8_t event_filter_action_diagnostic_interrupt, uint8_t event_filter_action_group_control_operation, uint8_t alert_policy_number_policy_number, uint8_t alert_policy_number_group_control_selector, uint8_t event_severity, uint8_t generator_id_byte1, uint8_t generator_id_byte2, uint8_t sensor_type, uint8_t sensor_number, uint8_t event_trigger, uint16_t event_data1_offset_mask, uint8_t event_data1_AND_mask, uint8_t event_data1_compare1, uint8_t event_data1_compare2, uint8_t event_data2_AND_mask, uint8_t event_data2_compare1, uint8_t event_data2_compare2, uint8_t event_data3_AND_mask, uint8_t event_data3_compare1, uint8_t event_data3_compare2, fiid_obj_t obj_cmd_rq) { if (!IPMI_FILTER_CONFIGURATION_FILTER_TYPE_VALID (filter_configuration_type) || !IPMI_FILTER_CONFIGURATION_FILTER_VALID (filter_configuration_filter) || !IPMI_EVENT_FILTER_ACTION_ALERT_VALID (event_filter_action_alert) || !IPMI_EVENT_FILTER_ACTION_POWER_OFF_VALID (event_filter_action_power_off) || !IPMI_EVENT_FILTER_ACTION_RESET_VALID (event_filter_action_reset) || !IPMI_EVENT_FILTER_ACTION_POWER_CYCLE_VALID (event_filter_action_power_cycle) || !IPMI_EVENT_FILTER_ACTION_OEM_VALID (event_filter_action_oem) || !IPMI_EVENT_FILTER_ACTION_DIAGNOSTIC_INTERRUPT_VALID (event_filter_action_diagnostic_interrupt) || !IPMI_EVENT_FILTER_ACTION_GROUP_CONTROL_OPERATION_VALID (event_filter_action_group_control_operation) || !IPMI_EVENT_SEVERITY_VALID (event_severity) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_event_filter_table_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_number", filter_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.type", filter_configuration_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.filter", filter_configuration_filter); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.alert", event_filter_action_alert); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.power_off", event_filter_action_power_off); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.reset", event_filter_action_reset); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.power_cycle", event_filter_action_power_cycle); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.oem", event_filter_action_oem); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.diagnostic_interrupt", event_filter_action_diagnostic_interrupt); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.group_control_operation", event_filter_action_group_control_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_filter_action.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_policy_number.policy_number", alert_policy_number_policy_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_policy_number.group_control_selector", alert_policy_number_group_control_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_policy_number.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_severity", event_severity); FILL_FIID_OBJ_SET (obj_cmd_rq, "generator_id_byte1", generator_id_byte1); FILL_FIID_OBJ_SET (obj_cmd_rq, "generator_id_byte2",generator_id_byte2); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_type", sensor_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_trigger", event_trigger); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1_offset_mask", event_data1_offset_mask); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1_AND_mask", event_data1_AND_mask); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1_compare1", event_data1_compare1); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1_compare2", event_data1_compare2); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data2_AND_mask", event_data2_AND_mask); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data2_compare1", event_data2_compare1); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data2_compare2", event_data2_compare2); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data3_AND_mask", event_data3_AND_mask); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data3_compare1", event_data3_compare1); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data3_compare2", event_data3_compare2); return (0); } int fill_cmd_set_pef_configuration_parameters_event_filter_table_data1 (uint8_t filter_number, uint8_t filter_configuration_type, uint8_t filter_configuration_filter, fiid_obj_t obj_cmd_rq) { if (!IPMI_FILTER_CONFIGURATION_FILTER_TYPE_VALID (filter_configuration_type) || !IPMI_FILTER_CONFIGURATION_FILTER_VALID (filter_configuration_filter) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_event_filter_table_data1_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq,"cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_EVENT_FILTER_TABLE_DATA_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_number", filter_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.type", filter_configuration_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_configuration.filter", filter_configuration_filter); return (0); } int fill_cmd_set_pef_configuration_parameters_alert_string_keys (uint8_t string_selector, uint8_t filter_number, uint8_t set_number_for_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_STRING_SELECTOR_VALID (string_selector) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_alert_string_keys_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRING_KEYS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "string_selector", string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "filter_number", filter_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_number_for_string", set_number_for_string); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); return (0); } int fill_cmd_set_pef_configuration_parameters_alert_strings (uint8_t string_selector, uint8_t block_selector, const uint8_t *string_data, unsigned int string_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_STRING_SELECTOR_VALID (string_selector) || !string_data || !string_data_len || !IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE_VALID (string_data_len) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_alert_strings_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_STRINGS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "string_selector", string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "string_data", string_data, string_data_len); return (0); } int fill_cmd_set_pef_configuration_parameters_alert_policy_table (uint8_t alert_policy_entry_number, uint8_t policy_type, uint8_t policy_enabled, uint8_t policy_number, uint8_t destination_selector, uint8_t channel_number, uint8_t alert_string_set_selector, uint8_t event_specific_alert_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_ALERT_POLICY_TABLE_POLICY_TYPE_VALID (policy_type) || !IPMI_ALERT_POLICY_ENABLED_DISABLED_VALID (policy_enabled) || !IPMI_EVENT_SPECIFIC_ALERT_STRING_VALID (event_specific_alert_string) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_PEF_CONFIGURATION_PARAMETER_ALERT_POLICY_TABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_policy_entry_number", alert_policy_entry_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_number.policy_type", policy_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_number.enabled", policy_enabled); FILL_FIID_OBJ_SET (obj_cmd_rq, "policy_number.policy_number", policy_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_destination.destination_selector", destination_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_destination.channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_string_key.alert_string_set_selector", alert_string_set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "alert_string_key.event_specific_alert_string", event_specific_alert_string); return (0); } int fill_cmd_get_pef_configuration_parameters (uint8_t parameter_selector, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if ((!IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_PEF_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !IPMI_GET_PEF_PARAMETER_VALID (get_parameter) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_pef_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_parameter", get_parameter); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } int fill_cmd_set_last_processed_event_id (uint8_t set_record_id_for_last_record, uint16_t record_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_SET_RECORD_ID_FOR_LAST_RECORD_PROCESSED_VALID (set_record_id_for_last_record) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_last_processed_event_id_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_record_id_for_last_record,", set_record_id_for_last_record); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id); return (0); } int fill_cmd_get_last_processed_event_id (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_last_processed_event_id_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID); return (0); } int fill_cmd_alert_immediate (uint8_t channel_number, uint8_t destination_selector, uint8_t operation, uint8_t string_selector, uint8_t send_alert_string, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_ALERT_IMMEDIATE_OPERATION_VALID (operation) || !IPMI_STRING_SELECTOR_VALID (string_selector) || !IPMI_SEND_ALERT_STRING_VALID (send_alert_string) || !IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_alert_immediate_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ALERT_IMMEDIATE); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "destination_selector", destination_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "string_selector", string_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "send_alert_string", send_alert_string); return (0); } int fill_cmd_pet_acknowledge (uint16_t sequence_number, uint32_t local_timestamp, uint8_t event_source_type, uint8_t sensor_device, uint8_t sensor_number, uint32_t event_data, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_pet_acknowledge_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_PET_ACKNOWLEDGE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sequence_number", sequence_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "local_timestamp", local_timestamp); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_source_type", event_source_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_device", sensor_device); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data", event_data); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.c0000644002055400205540000010320013527331636026266 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_activate_payload_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "payload_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "auxiliary_request_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_activate_payload_sol_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "payload_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sol_startup_handshake", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "shared_serial_alert_behavior", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "test_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_activation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "encryption_activation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_activate_payload_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "auxiliary_response_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "inbound_payload_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "outbound_payload_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "payload_udp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "payload_vlan_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_activate_payload_sol_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "test_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 31, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "inbound_payload_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "outbound_payload_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "payload_udp_port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "payload_vlan_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_deactivate_payload_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "payload_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "payload_auxiliary_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_deactivate_payload_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "payload_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* achu: The IPMI spec says [4:0] for Operation and [7:2] for reserved3. Needless to say, one is wrong. Since there are only three operations, we'll assume they meant for operation to be a 2 bit field */ { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_suspend_resume_payload_encryption_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_payload_activation_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_payload_activation_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "instance_capacity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_15", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "instance_16", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_payload_instance_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_payload_instance_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 56, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_payload_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_user_payload_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_payload_access_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_user_payload_access_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_payload_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_payload_support_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_payload_support_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "standard_payload_type_0_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_1_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_2_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_3_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_4_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_5_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_6_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_7_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_8_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_9_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_10_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_11_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_12_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_13_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_14_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standard_payload_type_15_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_0_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_1_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_2_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_3_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_4_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_5_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_6_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_7_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_8_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_9_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_10_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_11_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_12_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_13_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_14_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "session_setup_payload_15_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_20h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_21h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_22h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_23h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_24h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_25h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_26h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_27h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_28h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_29h_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Ah_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Bh_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Ch_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Dh_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Eh_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type_2Fh_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_payload_version_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_payload_version_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "minor_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "major_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_iana", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "oem_payload_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_oem_payload_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_iana", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "oem_payload_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "minor_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "major_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_activate_payload (uint8_t payload_type, uint8_t payload_instance, const void *auxiliary_request_data, unsigned int auxiliary_request_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_INSTANCE_VALID (payload_instance) || !auxiliary_request_data || !auxiliary_request_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_activate_payload_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ACTIVATE_PAYLOAD); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_instance", payload_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "auxiliary_request_data", auxiliary_request_data, auxiliary_request_data_len); return (0); } int fill_cmd_activate_payload_sol (uint8_t payload_type, uint8_t payload_instance, uint8_t sol_startup_handshake, uint8_t shared_serial_alert_behavior, uint8_t test_mode, uint8_t authentication_activation, uint8_t encryption_activation, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_INSTANCE_VALID (payload_instance) || !IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_VALID (sol_startup_handshake) || !IPMI_SERIAL_MODEM_ALERTS_VALID (shared_serial_alert_behavior) || !IPMI_TEST_MODE_VALID (test_mode) || !IPMI_AUTHENTICATION_ACTIVATION_VALID (authentication_activation) || !IPMI_ENCRYPTION_ACTIVATION_VALID (encryption_activation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_activate_payload_sol_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_ACTIVATE_PAYLOAD); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_instance", payload_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "sol_startup_handshake", sol_startup_handshake); FILL_FIID_OBJ_SET (obj_cmd_rq, "shared_serial_alert_behavior", shared_serial_alert_behavior); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "test_mode", test_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_activation", authentication_activation); FILL_FIID_OBJ_SET (obj_cmd_rq, "encryption_activation", encryption_activation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved5", 0); return (0); } int fill_cmd_deactivate_payload (uint8_t payload_type, uint8_t payload_instance, uint32_t payload_auxiliary_data, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_INSTANCE_VALID (payload_instance) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_deactivate_payload_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DEACTIVATE_PAYLOAD); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_instance", payload_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_auxiliary_data", payload_auxiliary_data); return (0); } int fill_cmd_suspend_resume_payload_encryption (uint8_t payload_type, uint8_t payload_instance, uint8_t operation, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_INSTANCE_VALID (payload_instance) || !IPMI_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_VALID (operation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_suspend_resume_payload_encryption_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_instance", payload_instance); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_get_payload_activation_status (uint8_t payload_type, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_payload_activation_status_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); return (0); } int fill_cmd_get_payload_instance_info (uint8_t payload_type, uint8_t payload_instance, fiid_obj_t obj_cmd_rq) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_INSTANCE_VALID (payload_instance) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_payload_instance_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_PAYLOAD_INSTANCE_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_instance", payload_instance); return (0); } int fill_cmd_set_user_payload_access (uint8_t channel_number, uint8_t user_id, uint8_t operation, uint8_t standard_payload_1, uint8_t standard_payload_2, uint8_t standard_payload_3, uint8_t standard_payload_4, uint8_t standard_payload_5, uint8_t standard_payload_6, uint8_t standard_payload_7, uint8_t oem_payload_0, uint8_t oem_payload_1, uint8_t oem_payload_2, uint8_t oem_payload_3, uint8_t oem_payload_4, uint8_t oem_payload_5, uint8_t oem_payload_6, uint8_t oem_payload_7, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SET_USER_PAYLOAD_OPERATION_VALID (operation) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_1) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_2) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_3) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_4) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_5) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_6) || !IPMI_PAYLOAD_ACCESS_VALID (standard_payload_7) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_0) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_1) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_2) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_3) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_4) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_5) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_6) || !IPMI_PAYLOAD_ACCESS_VALID (oem_payload_7) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_user_payload_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_USER_PAYLOAD_ACCESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_1", standard_payload_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_2", standard_payload_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_3", standard_payload_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_4", standard_payload_4); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_5", standard_payload_5); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_6", standard_payload_6); FILL_FIID_OBJ_SET (obj_cmd_rq, "standard_payload_7", standard_payload_7); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_0", oem_payload_0); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_1", oem_payload_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_2", oem_payload_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_3", oem_payload_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_4", oem_payload_4); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_5", oem_payload_5); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_6", oem_payload_6); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_7", oem_payload_7); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); return (0); } int fill_cmd_get_user_payload_access (uint8_t channel_number, uint8_t user_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_user_payload_access_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_USER_PAYLOAD_ACCESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_id", user_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_get_channel_payload_support (uint8_t channel_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_payload_support_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_get_channel_payload_version (uint8_t channel_number, uint8_t payload_type, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_PAYLOAD_TYPE_VALID (payload_type) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_payload_version_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); return (0); } int fill_cmd_get_channel_oem_payload_info (uint8_t channel_number, uint8_t payload_type, uint32_t oem_iana, uint16_t oem_payload_id, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_PAYLOAD_TYPE_VALID (payload_type) || (payload_type == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT && (!oem_iana || !oem_payload_id)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_channel_oem_payload_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_iana", oem_iana); FILL_FIID_OBJ_SET (obj_cmd_rq, "oem_payload_id", oem_payload_id); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-sdr-repository-cmds.c0000644002055400205540000002204213527331636023531 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-sdr-repository-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_sdr_repository_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_repository_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "record_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "free_space", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "most_recent_addition_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "most_recent_erase_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_sdr_repository_allocation_info_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserve_sdr_repository_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "partial_add_sdr_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "delete_sdr_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "modal_non_modal_sdr_repository_update_operation_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "overflow_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_repository_allocation_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "number_of_possible_allocation_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "allocation_unit_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "number_of_free_allocation_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "largest_free_block", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "maximum_record_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_sdr_repository_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_sdr_repository_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 8, "offset_into_record", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bytes_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "next_record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ /* 2040 = 255 * 8, 255 b/c bytes_to_read field in request is 1 byte long */ { 2040, "record_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_repository_time_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sdr_repository_time_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sdr_repository_time_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sdr_repository_time_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_get_repository_info (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sdr_repository_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SDR_REPOSITORY_INFO); return (0); } int fill_cmd_get_repository_allocation_info (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sdr_repository_allocation_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SDR_REPOSITORY_ALLOCATION_INFO); return (0); } int fill_cmd_reserve_sdr_repository (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_reserve_sdr_repository_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_RESERVE_SDR_REPOSITORY); return (0); } int fill_cmd_get_sdr (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SDR); FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_into_record", offset_into_record); FILL_FIID_OBJ_SET (obj_cmd_rq, "bytes_to_read", bytes_to_read); return (0); } int fill_cmd_get_sdr_repository_time (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sdr_repository_time_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SDR_REPOSITORY_TIME); return (0); } int fill_cmd_set_sdr_repository_time (uint32_t time, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sdr_repository_time_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SDR_REPOSITORY_TIME); FILL_FIID_OBJ_SET (obj_cmd_rq, "time", time); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-sel-cmds.c0000644002055400205540000004272413527331636021320 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-sel-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_sel_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "sel_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sel_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "entries", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "free_space", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "most_recent_addition_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 32, "most_recent_erase_timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_sel_allocation_info_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserve_sel_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "partial_add_sel_entry_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "delete_sel_command_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "overflow_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_allocation_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_allocation_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "number_of_possible_allocation_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "allocation_unit_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "number_of_free_allocation_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "largest_free_block", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "maximum_record_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_sel_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_sel_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_entry_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 8, "offset_into_record", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bytes_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_entry_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "next_record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 128, "record_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_delete_sel_entry_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_delete_sel_entry_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_clear_sel_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 8, "C", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "L", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "R", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_clear_sel_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "erasure_progress", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_time_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_time_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sel_time_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sel_time_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sel_time_utc_offset_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sel_time_utc_offset_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_auxiliary_log_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "log_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_auxiliary_log_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 120, "log_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_auxiliary_log_status_mca_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "mca_log_entry_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 56, "log_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_auxiliary_log_status_oem_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 64, "log_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_auxiliary_log_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "log_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 120, "log_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_auxiliary_log_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_get_sel_info (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_INFO); return (0); } int fill_cmd_get_sel_allocation_info (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_allocation_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_ALLOCATION_INFO); return (0); } int fill_cmd_reserve_sel (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_reserve_sel_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_RESERVE_SEL); return (0); } int fill_cmd_get_sel_entry (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_entry_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_ENTRY); FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_into_record", offset_into_record); FILL_FIID_OBJ_SET (obj_cmd_rq, "bytes_to_read", bytes_to_read); return (0); } int fill_cmd_delete_sel_entry (uint16_t reservation_id, uint16_t record_id, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_delete_sel_entry_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_DELETE_SEL_ENTRY); FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id); return (0); } int fill_cmd_clear_sel (uint16_t reservation_id, uint8_t operation, fiid_obj_t obj_cmd_rq) { if (!IPMI_SEL_CLEAR_OPERATION_VALID (operation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_clear_sel_rq) < 0) { ERRNO_TRACE (errno); return (-1); } /* achu: the "CLR" is exactly from the spec. I know it looks dumb */ FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_CLEAR_SEL); FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "C", 'C'); FILL_FIID_OBJ_SET (obj_cmd_rq, "L", 'L'); FILL_FIID_OBJ_SET (obj_cmd_rq, "R", 'R'); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); return (0); } int fill_cmd_get_sel_time (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_time_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_TIME); return (0); } int fill_cmd_set_sel_time (uint32_t time, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sel_time_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SEL_TIME); FILL_FIID_OBJ_SET (obj_cmd_rq, "time", time); return (0); } int fill_cmd_get_sel_time_utc_offset (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sel_time_utc_offset_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SEL_TIME_UTC_OFFSET); return (0); } int fill_cmd_set_sel_time_utc_offset (int16_t offset, fiid_obj_t obj_cmd_rq) { if (!IPMI_SEL_TIME_UTC_OFFSET_VALID (offset) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sel_time_utc_offset_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SEL_TIME_UTC_OFFSET); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset", (uint64_t)offset); return (0); } int fill_cmd_get_auxiliary_log_status (uint8_t log_type, fiid_obj_t obj_cmd_rq) { if (!IPMI_AUXILIARY_LOG_TYPE_VALID (log_type) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_auxiliary_log_status_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_AUXILIARY_LOG_STATUS); FILL_FIID_OBJ_SET (obj_cmd_rq, "log_type", log_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_set_auxiliary_log_status (uint8_t log_type, const void *log_data, unsigned int log_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_AUXILIARY_LOG_TYPE_VALID (log_type) || !log_data || !log_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_auxiliary_log_status_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_AUXILIARY_LOG_STATUS); FILL_FIID_OBJ_SET (obj_cmd_rq, "log_type", log_type); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "log_data", log_data, log_data_len); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-sensor-cmds.c0000644002055400205540000030034313527331636022040 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-sensor-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_get_device_sdr_info_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_sdr_info_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.device_lun_0_has_sensors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.device_lun_1_has_sensors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.device_lun_2_has_sensors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.device_lun_3_has_sensors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "flags.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.sensor_population", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "sensor_population_change_indicator", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_sdr_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "offset_into_record", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "bytes_to_read", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_device_sdr_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "next_record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 2040 = 255 * 8, 255 b/c bytes_to_read field in request is 1 byte long */ { 2040, "record_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_reserve_device_sdr_repository_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "reservation_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* LS byte first */ { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_factors_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reading_byte", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_factors_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "next_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "m_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "tolerance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "m_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "b_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "accuracy_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "b_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "accuracy_exp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "accuracy_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "b_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "r_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_hysteresis_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "hysteresis_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_hysteresis_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_hysteresis_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "hysteresis_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_hysteresis_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "positive_going_threshold_hysteresis_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_thresholds_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "set_upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_thresholds_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_thresholds_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_thresholds_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 1, "readable_thresholds.lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_thresholds.lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_thresholds.lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_thresholds.upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_thresholds.upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_thresholds.upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_event_enable_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_message_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "assertion_event_bitmask", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "deassertion_event_bitmask", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_event_enable_threshold_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_message_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_event_enable_discrete_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_message_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_event_enable_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_enable_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_enable_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "assertion_event_bitmask", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "deassertion_event_bitmask", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_enable_threshold_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 6, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_for_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_for_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_enable_discrete_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 6, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "scanning_on_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_message_for_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_message_for_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_re_arm_sensor_events_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_all_event_status_from_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "re_arm_assertion_event", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "re_arm_deassertion_event", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_re_arm_sensor_events_threshold_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_all_event_status_from_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_lower_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_non_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_non_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_critical_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_critical_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_non_recoverable_going_low", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_upper_non_recoverable_going_high", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_re_arm_sensor_events_discrete_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_all_event_status_from_this_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_assertion_event_for_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_0", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_1", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_4", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_5", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_6", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_7", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_8", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_9", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_10", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_11", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_12", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_13", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "re_arm_deassertion_event_for_state_bit_14", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_re_arm_sensor_events_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_status_threshold_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_non_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_non_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_non_recoverable_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_lower_non_recoverable_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_non_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_non_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_non_recoverable_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_condition_for_upper_non_recoverable_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_non_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_non_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_non_recoverable_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_lower_non_recoverable_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_non_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_non_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_critical_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_critical_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_non_recoverable_going_low", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_condition_for_upper_non_recoverable_going_high", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_event_status_discrete_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_assertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_event_bitmask1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_event_bitmask2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_threshold_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_below_lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_below_lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_below_lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_above_upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_above_upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "at_or_above_upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved3", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_reading_discrete_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reading_state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "all_event_messages", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_asserted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_asserted", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_type_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_type_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_type_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sensor_type_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "assertion_event_bitmask1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "assertion_event_bitmask2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "deassertion_event_bitmask1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "deassertion_event_bitmask2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_event_fields_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "assertion_event_bitmask1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "assertion_event_bitmask2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "deassertion_event_bitmask1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "deassertion_event_bitmask2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data3_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data2_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_threshold_event_fields_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_lower_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_upper_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_lower_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_critical_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_low_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_upper_non_recoverable_going_high_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data3_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data2_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_discrete_event_fields_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_reading_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deassertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "assertion_bits_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data_bytes_operation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_assertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_0_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_1_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_2_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_3_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_4_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_5_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_6_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_7_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_8_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_9_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_10_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_11_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_12_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_13_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "state_14_deassertion_event_occurred", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data3_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data2_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sensor_reading_and_event_status_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; int fill_cmd_get_device_sdr_info (uint8_t operation, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_GET_SDR_INFO_OPERATION_VALID (operation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_device_sdr_info_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_DEVICE_SDR_INFO); FILL_FIID_OBJ_SET (obj_cmd_rq, "operation", operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); return (0); } int fill_cmd_get_device_sdr (uint16_t reservation_id, uint16_t record_id, uint8_t offset_into_record, uint8_t bytes_to_read, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_device_sdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_DEVICE_SDR); FILL_FIID_OBJ_SET (obj_cmd_rq, "reservation_id", reservation_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "record_id", record_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "offset_into_record", offset_into_record); FILL_FIID_OBJ_SET (obj_cmd_rq, "bytes_to_read", bytes_to_read); return (0); } int fill_cmd_reserve_device_sdr_repository (fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_reserve_device_sdr_repository_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_RESERVE_DEVICE_SDR_REPOSITORY); return (0); } /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int fill_cmd_set_sensor_hysteresis (uint8_t sensor_number, uint8_t hysteresis_mask, uint8_t positive_going_threshold_hysteresis_value, uint8_t negative_going_threshold_hysteresis_value, fiid_obj_t obj_cmd_rq) { if (hysteresis_mask != IPMI_SENSOR_HYSTERESIS_MASK || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_hysteresis_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_HYSTERESIS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "hysteresis_mask", hysteresis_mask); FILL_FIID_OBJ_SET (obj_cmd_rq, "positive_going_threshold_hysteresis_value", positive_going_threshold_hysteresis_value); FILL_FIID_OBJ_SET (obj_cmd_rq, "negative_going_threshold_hysteresis_value", negative_going_threshold_hysteresis_value); return (0); } /* achu: as of IPMI 2.0 hysteresis_mask reserved for future - write as 0xFF */ int fill_cmd_get_sensor_hysteresis (uint8_t sensor_number, uint8_t hysteresis_mask, fiid_obj_t obj_cmd_rq) { if (hysteresis_mask != IPMI_SENSOR_HYSTERESIS_MASK || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sensor_hysteresis_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SENSOR_HYSTERESIS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "hysteresis_mask", hysteresis_mask); return (0); } int fill_cmd_set_sensor_thresholds (uint8_t sensor_number, const uint8_t *lower_non_critical_threshold, const uint8_t *lower_critical_threshold, const uint8_t *lower_non_recoverable_threshold, const uint8_t *upper_non_critical_threshold, const uint8_t *upper_critical_threshold, const uint8_t *upper_non_recoverable_threshold, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_thresholds_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_THRESHOLDS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); if (lower_non_critical_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_non_critical_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_non_critical_threshold", *lower_non_critical_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_non_critical_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_non_critical_threshold", 0); } if (lower_critical_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_critical_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_critical_threshold", *lower_critical_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_critical_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_critical_threshold", 0); } if (lower_non_recoverable_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_non_recoverable_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_non_recoverable_threshold", *lower_non_recoverable_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_lower_non_recoverable_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "lower_non_recoverable_threshold", 0); } if (upper_non_critical_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_non_critical_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_non_critical_threshold", *upper_non_critical_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_non_critical_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_non_critical_threshold", 0); } if (upper_critical_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_critical_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_critical_threshold", *upper_critical_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_critical_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_critical_threshold", 0); } if (upper_non_recoverable_threshold) { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_non_recoverable_threshold", IPMI_SENSOR_THRESHOLD_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_non_recoverable_threshold", *upper_non_recoverable_threshold); } else { FILL_FIID_OBJ_SET (obj_cmd_rq, "set_upper_non_recoverable_threshold", IPMI_SENSOR_THRESHOLD_NOT_SET); FILL_FIID_OBJ_SET (obj_cmd_rq, "upper_non_recoverable_threshold", 0); } return (0); } int fill_cmd_get_sensor_thresholds (uint8_t sensor_number, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sensor_thresholds_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SENSOR_THRESHOLDS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); return (0); } int fill_cmd_set_sensor_event_enable (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_EVENT_MESSAGE_ACTION_VALID (event_message_action) || !IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_VALID (scanning_on_this_sensor) || !IPMI_SENSOR_ALL_EVENT_MESSAGES_VALID (all_event_messages) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_event_enable_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_EVENT_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_action", event_message_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "scanning_on_this_sensor", scanning_on_this_sensor); FILL_FIID_OBJ_SET (obj_cmd_rq, "all_event_messages", all_event_messages); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_bitmask", assertion_event_bitmask); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_bitmask", deassertion_event_bitmask); return (0); } int fill_cmd_set_sensor_event_enable_threshold (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_lower_non_critical_going_low, uint8_t assertion_event_lower_non_critical_going_high, uint8_t assertion_event_lower_critical_going_low, uint8_t assertion_event_lower_critical_going_high, uint8_t assertion_event_lower_non_recoverable_going_low, uint8_t assertion_event_lower_non_recoverable_going_high, uint8_t assertion_event_upper_non_critical_going_low, uint8_t assertion_event_upper_non_critical_going_high, uint8_t assertion_event_upper_critical_going_low, uint8_t assertion_event_upper_critical_going_high, uint8_t assertion_event_upper_non_recoverable_going_low, uint8_t assertion_event_upper_non_recoverable_going_high, uint8_t deassertion_event_lower_non_critical_going_low, uint8_t deassertion_event_lower_non_critical_going_high, uint8_t deassertion_event_lower_critical_going_low, uint8_t deassertion_event_lower_critical_going_high, uint8_t deassertion_event_lower_non_recoverable_going_low, uint8_t deassertion_event_lower_non_recoverable_going_high, uint8_t deassertion_event_upper_non_critical_going_low, uint8_t deassertion_event_upper_non_critical_going_high, uint8_t deassertion_event_upper_critical_going_low, uint8_t deassertion_event_upper_critical_going_high, uint8_t deassertion_event_upper_non_recoverable_going_low, uint8_t deassertion_event_upper_non_recoverable_going_high, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_EVENT_MESSAGE_ACTION_VALID (event_message_action) || !IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_VALID (scanning_on_this_sensor) || !IPMI_SENSOR_ALL_EVENT_MESSAGES_VALID (all_event_messages) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_non_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_non_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_non_recoverable_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_lower_non_recoverable_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_non_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_non_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_non_recoverable_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_upper_non_recoverable_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_non_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_non_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_non_recoverable_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_lower_non_recoverable_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_non_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_non_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_critical_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_critical_going_high) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_non_recoverable_going_low) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_upper_non_recoverable_going_high) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_event_enable_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_EVENT_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_action", event_message_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "scanning_on_this_sensor", scanning_on_this_sensor); FILL_FIID_OBJ_SET (obj_cmd_rq, "all_event_messages", all_event_messages); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_non_critical_going_low", assertion_event_lower_non_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_non_critical_going_high", assertion_event_lower_non_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_critical_going_low", assertion_event_lower_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_critical_going_high", assertion_event_lower_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_non_recoverable_going_low", assertion_event_lower_non_recoverable_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_lower_non_recoverable_going_high", assertion_event_lower_non_recoverable_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_non_critical_going_low", assertion_event_upper_non_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_non_critical_going_high", assertion_event_upper_non_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_critical_going_low", assertion_event_upper_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_critical_going_high", assertion_event_upper_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_non_recoverable_going_low", assertion_event_upper_non_recoverable_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_upper_non_recoverable_going_high", assertion_event_upper_non_recoverable_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_non_critical_going_low", deassertion_event_lower_non_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_non_critical_going_high", deassertion_event_lower_non_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_critical_going_low", deassertion_event_lower_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_critical_going_high", deassertion_event_lower_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_non_recoverable_going_low", deassertion_event_lower_non_recoverable_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_lower_non_recoverable_going_high", deassertion_event_lower_non_recoverable_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_non_critical_going_low", deassertion_event_upper_non_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_non_critical_going_high", deassertion_event_upper_non_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_critical_going_low", deassertion_event_upper_critical_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_critical_going_high", deassertion_event_upper_critical_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_non_recoverable_going_low", deassertion_event_upper_non_recoverable_going_low); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_upper_non_recoverable_going_high", deassertion_event_upper_non_recoverable_going_high); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_set_sensor_event_enable_discrete (uint8_t sensor_number, uint8_t event_message_action, uint8_t scanning_on_this_sensor, uint8_t all_event_messages, uint8_t assertion_event_state_bit_0, uint8_t assertion_event_state_bit_1, uint8_t assertion_event_state_bit_2, uint8_t assertion_event_state_bit_3, uint8_t assertion_event_state_bit_4, uint8_t assertion_event_state_bit_5, uint8_t assertion_event_state_bit_6, uint8_t assertion_event_state_bit_7, uint8_t assertion_event_state_bit_8, uint8_t assertion_event_state_bit_9, uint8_t assertion_event_state_bit_10, uint8_t assertion_event_state_bit_11, uint8_t assertion_event_state_bit_12, uint8_t assertion_event_state_bit_13, uint8_t assertion_event_state_bit_14, uint8_t deassertion_event_state_bit_0, uint8_t deassertion_event_state_bit_1, uint8_t deassertion_event_state_bit_2, uint8_t deassertion_event_state_bit_3, uint8_t deassertion_event_state_bit_4, uint8_t deassertion_event_state_bit_5, uint8_t deassertion_event_state_bit_6, uint8_t deassertion_event_state_bit_7, uint8_t deassertion_event_state_bit_8, uint8_t deassertion_event_state_bit_9, uint8_t deassertion_event_state_bit_10, uint8_t deassertion_event_state_bit_11, uint8_t deassertion_event_state_bit_12, uint8_t deassertion_event_state_bit_13, uint8_t deassertion_event_state_bit_14, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_EVENT_MESSAGE_ACTION_VALID (event_message_action) || !IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_VALID (scanning_on_this_sensor) || !IPMI_SENSOR_ALL_EVENT_MESSAGES_VALID (all_event_messages) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_0) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_1) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_2) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_3) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_4) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_5) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_6) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_7) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_8) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_9) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_10) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_11) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_12) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_13) || !IPMI_SENSOR_EVENT_FLAG_VALID (assertion_event_state_bit_14) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_0) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_1) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_2) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_3) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_4) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_5) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_6) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_7) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_8) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_9) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_10) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_11) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_12) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_13) || !IPMI_SENSOR_EVENT_FLAG_VALID (deassertion_event_state_bit_14) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_event_enable_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_EVENT_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_message_action", event_message_action); FILL_FIID_OBJ_SET (obj_cmd_rq, "scanning_on_this_sensor", scanning_on_this_sensor); FILL_FIID_OBJ_SET (obj_cmd_rq, "all_event_messages", all_event_messages); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_0", assertion_event_state_bit_0); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_1", assertion_event_state_bit_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_2", assertion_event_state_bit_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_3", assertion_event_state_bit_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_4", assertion_event_state_bit_4); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_5", assertion_event_state_bit_5); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_6", assertion_event_state_bit_6); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_7", assertion_event_state_bit_7); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_8", assertion_event_state_bit_8); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_9", assertion_event_state_bit_9); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_10", assertion_event_state_bit_10); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_11", assertion_event_state_bit_11); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_12", assertion_event_state_bit_12); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_13", assertion_event_state_bit_13); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_state_bit_14", assertion_event_state_bit_14); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_0", deassertion_event_state_bit_0); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_1", deassertion_event_state_bit_1); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_2", deassertion_event_state_bit_2); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_3", deassertion_event_state_bit_3); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_4", deassertion_event_state_bit_4); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_5", deassertion_event_state_bit_5); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_6", deassertion_event_state_bit_6); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_7", deassertion_event_state_bit_7); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_8", deassertion_event_state_bit_8); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_9", deassertion_event_state_bit_9); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_10", deassertion_event_state_bit_10); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_11", deassertion_event_state_bit_11); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_12", deassertion_event_state_bit_12); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_13", deassertion_event_state_bit_13); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_state_bit_14", deassertion_event_state_bit_14); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_get_sensor_event_enable (uint8_t sensor_number, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sensor_event_enable_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SENSOR_EVENT_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); return (0); } int fill_cmd_re_arm_sensor_events (uint8_t sensor_number, uint8_t re_arm_all_event_status_from_this_sensor, uint16_t *re_arm_assertion_event, uint16_t *re_arm_deassertion_event, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_VALID (re_arm_all_event_status_from_this_sensor) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_re_arm_sensor_events_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_RE_ARM_SENSOR_EVENTS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "re_arm_all_event_status_from_this_sensor", re_arm_all_event_status_from_this_sensor); if (re_arm_assertion_event) FILL_FIID_OBJ_SET (obj_cmd_rq, "re_arm_assertion_event", *re_arm_assertion_event); if (re_arm_deassertion_event) FILL_FIID_OBJ_SET (obj_cmd_rq, "re_arm_deassertion_event", *re_arm_deassertion_event); return (0); } int fill_cmd_get_sensor_reading (uint8_t sensor_number, fiid_obj_t obj_cmd_rq) { if (!fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sensor_reading_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SENSOR_READING); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); return (0); } int fill_cmd_set_sensor_reading_and_event_status (uint8_t sensor_number, uint8_t sensor_reading_operation, uint8_t deassertion_bits_operation, uint8_t assertion_bits_operation, uint8_t event_data_bytes_operation, uint8_t sensor_reading, uint16_t assertion_event_bitmask, uint16_t deassertion_event_bitmask, uint8_t event_data1, uint8_t event_data2, uint8_t event_data3, fiid_obj_t obj_cmd_rq) { if (!IPMI_SENSOR_READING_OPERATION_VALID (sensor_reading_operation) || !IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_VALID (deassertion_bits_operation) || !IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_VALID (assertion_bits_operation) || !IPMI_EVENT_DATA_BYTES_OPERATION_VALID (event_data_bytes_operation) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sensor_reading_and_event_status_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_number", sensor_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_reading_operation", sensor_reading_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_bits_operation", deassertion_bits_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_bits_operation", assertion_bits_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data_bytes_operation", event_data_bytes_operation); FILL_FIID_OBJ_SET (obj_cmd_rq, "sensor_reading", sensor_reading); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_bitmask1", assertion_event_bitmask & 0x00FF); FILL_FIID_OBJ_SET (obj_cmd_rq, "assertion_event_bitmask2", (assertion_event_bitmask & 0xFF00) >> 8); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_bitmask1", deassertion_event_bitmask & 0x00FF); FILL_FIID_OBJ_SET (obj_cmd_rq, "deassertion_event_bitmask2", (deassertion_event_bitmask & 0xFF00) >> 8); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data1", event_data1); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data2", event_data2); FILL_FIID_OBJ_SET (obj_cmd_rq, "event_data3", event_data3); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-serial-modem-cmds.c0000644002055400205540000004461613527331636023115 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-serial-modem-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-serial-modem-configuration-parameters-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_set_serial_modem_configuration_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_connection_mode_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "basic_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "ppp_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "terminal_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "connect_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dtr_hangup", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "flow_control", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "page_blackout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "call_retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_connection_mode_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "basic_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "ppp_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "terminal_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "connect_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dtr_hangup", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "flow_control", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "page_blackout_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "call_retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_set_serial_modem_configuration (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (!IPMI_SERIAL_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SERIAL_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_serial_modem_configuration_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_SET_IN_PROGRESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_serial_modem_configuration_connection_mode (uint8_t channel_number, uint8_t basic_mode, uint8_t ppp_mode, uint8_t terminal_mode, uint8_t connect_mode, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_BASIC_MODE_VALID (basic_mode) || !IPMI_PPP_MODE_VALID (ppp_mode) || !IPMI_TERMINAL_MODE_VALID (terminal_mode) || !IPMI_CONNECT_MODE_VALID (connect_mode) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_connection_mode_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CONNECTION_MODE); FILL_FIID_OBJ_SET (obj_cmd_rq, "basic_mode", basic_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "ppp_mode", ppp_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "terminal_mode", terminal_mode); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "connect_mode", connect_mode); return (0); } int fill_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (uint8_t channel_number, uint8_t dtr_hangup, uint8_t flow_control, uint8_t bit_rate, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_DTR_HANGUP_VALID (dtr_hangup) || !IPMI_FLOW_CONTROL_VALID (flow_control) || !IPMI_BIT_RATE_VALID (bit_rate) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_IPMI_MESSAGING_COMM_SETTINGS); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "dtr_hangup", dtr_hangup); FILL_FIID_OBJ_SET (obj_cmd_rq, "flow_control", flow_control); FILL_FIID_OBJ_SET (obj_cmd_rq, "bit_rate", bit_rate); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); return (0); } int fill_cmd_set_serial_modem_configuration_page_blackout_interval (uint8_t channel_number, uint8_t page_blackout_interval, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_page_blackout_interval_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_PAGE_BLACKOUT_INTERVAL); FILL_FIID_OBJ_SET (obj_cmd_rq, "page_blackout_interval", page_blackout_interval); return (0); } int fill_cmd_set_serial_modem_configuration_call_retry_interval (uint8_t channel_number, uint8_t call_retry_interval, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_serial_modem_configuration_call_retry_interval_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SERIAL_MODEM_CONFIGURATION_PARAMETER_CALL_RETRY_INTERVAL); FILL_FIID_OBJ_SET (obj_cmd_rq, "call_retry_interval", call_retry_interval); return (0); } int fill_cmd_get_serial_modem_configuration (uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_GET_SERIAL_MODEM_PARAMETER_VALID (get_parameter) || (!IPMI_SERIAL_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SERIAL_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_serial_modem_configuration_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_parameter", get_parameter); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/ipmi-sol-cmds.c0000644002055400205540000006314313527331636021330 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/cmds/ipmi-sol-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-sol-configuration-parameters-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_set_sol_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sol_enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sol_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_sol_payload_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_sol_payload_encryption", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "character_accumulate_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "character_send_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "retry_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "parameter_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "set_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "block_selector", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1024, "configuration_parameter_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_set_in_progress_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "state", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sol_enable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sol_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_sol_payload_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "force_sol_payload_encryption", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "character_accumulate_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "character_send_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "retry_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "retry_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "bit_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: Read-Only field, no 'set' equivalent */ fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "payload_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "present_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "oldest_revision_parameter", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "port_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_set_sol_configuration_parameters (uint8_t channel_number, uint8_t parameter_selector, const void *configuration_parameter_data, unsigned int configuration_parameter_data_len, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || (!IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !configuration_parameter_data || !configuration_parameter_data_len || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len); return (0); } int fill_cmd_set_sol_configuration_parameters_set_in_progress (uint8_t channel_number, uint8_t state, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SOL_CONFIGURATION_PARAMETERS_SET_IN_PROGRESS_VALID (state) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_set_in_progress_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SET_IN_PROGRESS); FILL_FIID_OBJ_SET (obj_cmd_rq, "state", state); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_enable (uint8_t channel_number, uint8_t sol_enable, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SOL_SOL_ENABLE_VALID (sol_enable) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_enable_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_ENABLE); FILL_FIID_OBJ_SET (obj_cmd_rq, "sol_enable", sol_enable); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_authentication (uint8_t channel_number, uint8_t sol_privilege_level, uint8_t force_sol_payload_authentication, uint8_t force_sol_payload_encryption, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_PRIVILEGE_LEVEL_VALID (sol_privilege_level) || !IPMI_SOL_FORCE_SOL_PAYLOAD_AUTHENTICATION_VALID (force_sol_payload_authentication) || !IPMI_SOL_FORCE_SOL_PAYLOAD_ENCRYPTION_VALID (force_sol_payload_encryption) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_authentication_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_AUTHENTICATION); FILL_FIID_OBJ_SET (obj_cmd_rq, "sol_privilege_level", sol_privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "force_sol_payload_authentication", force_sol_payload_authentication); FILL_FIID_OBJ_SET (obj_cmd_rq, "force_sol_payload_encryption", force_sol_payload_encryption); return (0); } int fill_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (uint8_t channel_number, uint8_t character_accumulate_interval, uint8_t character_send_threshold, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_CHARACTER_ACCUMULATE_INTERVAL_AND_SEND_THRESHOLD); FILL_FIID_OBJ_SET (obj_cmd_rq, "character_accumulate_interval", character_accumulate_interval); FILL_FIID_OBJ_SET (obj_cmd_rq, "character_send_threshold", character_send_threshold); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_retry (uint8_t channel_number, uint8_t retry_count, uint8_t retry_interval, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_retry_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_RETRY); FILL_FIID_OBJ_SET (obj_cmd_rq, "retry_count", retry_count); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "retry_interval", retry_interval); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SOL_BIT_RATE_VALID (bit_rate) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_NON_VOLATILE_BIT_RATE); FILL_FIID_OBJ_SET (obj_cmd_rq, "bit_rate", bit_rate); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (uint8_t channel_number, uint8_t bit_rate, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_SOL_BIT_RATE_VALID (bit_rate) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_VOLATILE_BIT_RATE); FILL_FIID_OBJ_SET (obj_cmd_rq, "bit_rate", bit_rate); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); return (0); } int fill_cmd_set_sol_configuration_parameters_sol_payload_port_number (uint8_t channel_number, uint16_t port_number, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_set_sol_configuration_parameters_sol_payload_port_number_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", IPMI_SOL_CONFIGURATION_PARAMETER_SOL_PAYLOAD_PORT_NUMBER); FILL_FIID_OBJ_SET (obj_cmd_rq, "port_number", port_number); return (0); } int fill_cmd_get_sol_configuration_parameters (uint8_t channel_number, uint8_t get_parameter, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rq) { if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_GET_SOL_PARAMETER_VALID (get_parameter) || (!IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_VALID (parameter_selector) && !IPMI_SOL_CONFIGURATION_PARAMETER_SELECTOR_IS_OEM (parameter_selector)) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_cmd_get_sol_configuration_parameters_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "cmd", IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS); FILL_FIID_OBJ_SET (obj_cmd_rq, "channel_number", channel_number); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "get_parameter", get_parameter); FILL_FIID_OBJ_SET (obj_cmd_rq, "parameter_selector", parameter_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "set_selector", set_selector); FILL_FIID_OBJ_SET (obj_cmd_rq, "block_selector", block_selector); return (0); } freeipmi-1.6.4/libfreeipmi/cmds/rmcp-cmds.c0000644002055400205540000000657213527331636020543 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/cmds/rmcp-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/rmcp-interface.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cmd_asf_presence_ping = { { 32, "iana_enterprise_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "message_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "data_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_asf_presence_pong = { { 32, "iana_enterprise_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "message_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "data_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "oem_iana_enterprise_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "oem_defined", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "supported_entities.version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "supported_entities.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "supported_entities.ipmi_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "supported_interactions.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "supported_interactions.security_extensions", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_cmd_asf_presence_ping (uint8_t message_tag, fiid_obj_t obj_cmd) { if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_cmd_asf_presence_ping) < 0) { SET_ERRNO (EINVAL); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd); FILL_FIID_OBJ_SET (obj_cmd, "iana_enterprise_number", htonl (RMCP_ASF_IANA_ENTERPRISE_NUM)); FILL_FIID_OBJ_SET (obj_cmd, "message_type", RMCP_ASF_MESSAGE_TYPE_PRESENCE_PING); FILL_FIID_OBJ_SET (obj_cmd, "message_tag", message_tag); FILL_FIID_OBJ_SET (obj_cmd, "reserved", 0); FILL_FIID_OBJ_SET (obj_cmd, "data_length", 0x00); return (0); } freeipmi-1.6.4/libfreeipmi/debug/0000755002055400205540000000000013527342542016636 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug.c0000644002055400205540000002072613527331636021035 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_INTTYPES_H #include #endif /* HAVE_INTTYPES_H */ #include #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "libcommon/ipmi-bit-ops.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "ipmi-debug-common.h" #include "freeipmi-portability.h" #define IPMI_DEBUG_MAX_BUF_LEN 65536 #define IPMI_DEBUG_MAX_PKT_LEN 65536 #define IPMI_DEBUG_CHAR_PER_LINE 8 #define IPMI_DEBUG_DEFAULT_FD STDERR_FILENO #define IPMI_DEBUG_MAX_UNEXPECTED_BYTES 65536 #define IPMI_DEBUG_MAX_UNEXPECTED_BITS (IPMI_DEBUG_MAX_UNEXPECTED_BYTES*8) fiid_template_t tmpl_unexpected_data = { { IPMI_DEBUG_MAX_UNEXPECTED_BITS, "unexpected_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int ipmi_obj_dump (int fd, const char *prefix, const char *hdr, const char *trlr, fiid_obj_t obj) { #if 0 char *default_hdr = "================================================================\n" "[ VALUE TAG NAME:LENGTH ]\n" "================================================================"; char *default_trlr = "================================================================"; #endif char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; fiid_iterator_t iter = NULL; int rv = -1; if (!fiid_obj_valid (obj)) { SET_ERRNO (EINVAL); return (-1); } if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (!(iter = fiid_iterator_create (obj))) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } while (!fiid_iterator_end (iter)) { int field_len; char *key = NULL; if (!(key = fiid_iterator_key (iter))) { FIID_ITERATOR_ERROR_TO_ERRNO (iter); goto cleanup; } if ((field_len = fiid_iterator_field_len (iter)) < 0) { FIID_ITERATOR_ERROR_TO_ERRNO (iter); goto cleanup; } if (!field_len) { fiid_iterator_next (iter); continue; } if (prefix) { if (debug_dprintf (fd, "%s", prefix_buf) < 0) { ERRNO_TRACE (errno); goto cleanup; } } /* special case, always dump some fields in byte array format */ if (field_len <= 64 && strcasecmp (key, "raw_data") && strcasecmp (key, "user_name") && strcasecmp (key, "payload_data") && strcasecmp (key, "record_data")) { uint64_t val = 0; if (fiid_iterator_get (iter, &val) < 0) { FIID_ITERATOR_ERROR_TO_ERRNO (iter); goto cleanup; } if (debug_dprintf (fd, "[%16" PRIX64 "h] = %s[%2ub]\n", (uint64_t) val, key, field_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } } else { uint8_t buf[IPMI_DEBUG_MAX_BUF_LEN]; int len; if (debug_dprintf (fd, "[ BYTE ARRAY ... ] = %s[%2uB]\n", key, BITS_ROUND_BYTES (field_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_iterator_get_data (iter, buf, IPMI_DEBUG_MAX_BUF_LEN)) < 0) { FIID_ITERATOR_ERROR_TO_ERRNO (iter); goto cleanup; } if (debug_output_byte_array (fd, prefix_buf, buf, len) < 0) { ERRNO_TRACE (errno); goto cleanup; } } fiid_iterator_next (iter); } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 0; cleanup: fiid_iterator_destroy (iter); return (rv); } int ipmi_obj_dump_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, fiid_obj_t obj, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { char *cmd_hdr = "IPMI Command Data:\n" "------------------"; char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; uint8_t ipmb_buf[IPMI_DEBUG_MAX_PKT_LEN]; int ipmb_buf_len; fiid_obj_t obj_cmd = NULL; int rv = -1; if (!fiid_obj_valid (obj) || !tmpl_ipmb_msg_hdr || !tmpl_ipmb_cmd) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj, tmpl_cmd_send_message_rq) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj, tmpl_cmd_get_message_rs) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); return (-1); } if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (!(obj_cmd = fiid_obj_dup (obj))) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if ((ipmb_buf_len = fiid_obj_get_data (obj_cmd, "message_data", ipmb_buf, IPMI_DEBUG_MAX_PKT_LEN)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (fiid_obj_clear_field (obj_cmd, "message_data") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (ipmb_buf_len) { if (debug_dump_ipmb (fd, prefix, ipmb_buf, ipmb_buf_len, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd) < 0) goto cleanup; } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd); return (rv); } int ipmi_dump_hex (int fd, const char *prefix, const char *hdr, const char *trlr, const void *buf, unsigned int buf_len) { char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; int rv = -1; if (!buf || !buf_len) { SET_ERRNO (EINVAL); return (-1); } if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (prefix) { if (debug_dprintf (fd, "%s", prefix_buf) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if (debug_dprintf (fd, "[ HEX DUMP ..... ] = %s[%2uB]\n", "HEX", buf_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (debug_output_byte_array (fd, prefix_buf, buf, buf_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 0; cleanup: return (rv); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-common.c0000644002055400205540000002203713527331636022320 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_DEBUG_MAX_BUF_LEN 65536 #define IPMI_DEBUG_MAX_PKT_LEN 65536 #define IPMI_DEBUG_CHAR_PER_LINE 8 #define IPMI_DEBUG_DEFAULT_FD STDERR_FILENO static int _write (int fd, const void *buf, size_t n) { /* chu: by Chris Dunlap */ size_t nleft; ssize_t nwritten; unsigned char *p; p = (unsigned char *)buf; nleft = n; while (nleft > 0) { if ((nwritten = write (fd, p, nleft)) < 0) { if (errno == EINTR) continue; else return (-1); } nleft -= nwritten; p += nwritten; } return (n); } int debug_dprintf (int fd, const char *fmt, ...) { va_list ap; int len, rv; char buf[IPMI_DEBUG_MAX_BUF_LEN]; va_start (ap, fmt); len = vsnprintf (buf, IPMI_DEBUG_MAX_BUF_LEN, fmt, ap); rv = _write (fd, buf, len); va_end (ap); return (rv); } int debug_set_prefix (char *buf, unsigned int buflen, const char *prefix) { assert (buf && buflen > 3); /* clear buffer, empty prefix allowed */ memset (buf, '\0', buflen); if (prefix) { strncpy (buf, prefix, buflen); buf[buflen - 1] = '\0'; /* strncpy may not null terminate */ buf[buflen - 2] = '\0'; /* guaranteed space for ' ' */ buf[buflen - 3] = '\0'; /* guaranteed space for ':' */ strcat (buf, ": "); } return (0); } int debug_output_str (int fd, const char *prefix, const char *str) { /* achu: Yeah, I know this is slow. Figure out something better * later. */ if (str) { char *ptr = (char *)str; if (prefix) { if (debug_dprintf (fd, "%s", prefix) < 0) { ERRNO_TRACE (errno); return (-1); } } while (*ptr != '\0') { if (*ptr == '\n') { if (debug_dprintf (fd, "%c", *ptr++) < 0) { ERRNO_TRACE (errno); return (-1); } if (prefix) { if (debug_dprintf (fd, "%s", prefix) < 0) { ERRNO_TRACE (errno); return (-1); } } } else { if (debug_dprintf (fd, "%c", *ptr++) < 0) { ERRNO_TRACE (errno); return (-1); } } } if (debug_dprintf (fd, "\n") < 0) { ERRNO_TRACE (errno); return (-1); } } return (0); } int debug_output_byte_array (int fd, const char *prefix, const uint8_t *buf, unsigned int buf_len) { unsigned int count = 0; assert (buf); while (count < buf_len) { int i = 0; if (prefix) { if (debug_dprintf (fd, "%s", prefix) < 0) { ERRNO_TRACE (errno); return (-1); } } if (debug_dprintf (fd, "[ ") < 0) { ERRNO_TRACE (errno); return (-1); } while (count < buf_len && i < IPMI_DEBUG_CHAR_PER_LINE) { if (debug_dprintf (fd, "%02Xh ", buf[count++]) < 0) { ERRNO_TRACE (errno); return (-1); } i++; } if (debug_dprintf (fd, "]\n") < 0) { ERRNO_TRACE (errno); return (-1); } } return (0); } int debug_dump_ipmb (int fd, const char *prefix, const uint8_t *ipmb_buf, unsigned int ipmb_buf_len, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { char *ipmb_msg_hdr = "IPMB Message Header:\n" "--------------------"; char *ipmb_cmd_hdr = "IPMB Message Data:\n" "------------------"; char *ipmb_msg_trlr_hdr = "IPMB Message Trailer:\n" "---------------------"; char *ipmb_unexpected_hdr = "IPMB Unexpected Data:\n" "---------------------"; fiid_obj_t obj_ipmb_msg_hdr = NULL; fiid_obj_t obj_ipmb_cmd = NULL; fiid_obj_t obj_ipmb_msg_trlr = NULL; fiid_obj_t obj_ipmb_unexpected_data = NULL; int obj_ipmb_msg_trlr_len = 0; unsigned int obj_ipmb_cmd_len = 0; int ipmb_hdr_len = 0; int ipmb_cmd_len = 0; int ipmb_trlr_len = 0; int len; unsigned int ipmb_indx = 0; int rv = -1; assert (ipmb_buf); assert (ipmb_buf_len); assert (tmpl_ipmb_msg_hdr); assert (tmpl_ipmb_cmd); if (!(obj_ipmb_msg_hdr = fiid_obj_create (tmpl_ipmb_msg_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if (!(obj_ipmb_cmd = fiid_obj_create (tmpl_ipmb_cmd))) { ERRNO_TRACE (errno); goto cleanup; } if (!(obj_ipmb_msg_trlr = fiid_obj_create (tmpl_ipmb_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_ipmb_msg_trlr_len = fiid_template_len_bytes (tmpl_ipmb_msg_trlr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((ipmb_hdr_len = fiid_obj_set_all (obj_ipmb_msg_hdr, ipmb_buf, ipmb_buf_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } ipmb_indx += ipmb_hdr_len; if (ipmi_obj_dump (fd, prefix, ipmb_msg_hdr, NULL, obj_ipmb_msg_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (ipmb_buf_len <= ipmb_indx) { rv = 0; goto cleanup; } if ((ipmb_buf_len - ipmb_hdr_len) <= obj_ipmb_msg_trlr_len) goto dump_ipmb_extra; obj_ipmb_cmd_len = (ipmb_buf_len - ipmb_hdr_len) - obj_ipmb_msg_trlr_len; if ((ipmb_cmd_len = fiid_obj_set_all (obj_ipmb_cmd, ipmb_buf + ipmb_hdr_len, obj_ipmb_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_cmd); goto cleanup; } ipmb_indx += ipmb_cmd_len; if (ipmi_obj_dump (fd, prefix, ipmb_cmd_hdr, NULL, obj_ipmb_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (ipmb_buf_len <= ipmb_indx) { rv = 0; goto cleanup; } if ((ipmb_trlr_len = fiid_obj_set_all (obj_ipmb_msg_trlr, ipmb_buf + ipmb_hdr_len + ipmb_cmd_len, (ipmb_buf_len - ipmb_hdr_len - ipmb_cmd_len))) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); goto cleanup; } ipmb_indx += ipmb_trlr_len; if (ipmi_obj_dump (fd, prefix, ipmb_msg_trlr_hdr, NULL, obj_ipmb_msg_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* Dump IPMB unexpected stuff */ dump_ipmb_extra: if ((ipmb_buf_len - ipmb_indx) > 0) { if (!(obj_ipmb_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_ipmb_unexpected_data, ipmb_buf + ipmb_indx, ipmb_buf_len - ipmb_indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_unexpected_data); goto cleanup; } ipmb_indx += len; if (ipmi_obj_dump (fd, prefix, ipmb_unexpected_hdr, NULL, obj_ipmb_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_ipmb_msg_hdr); fiid_obj_destroy (obj_ipmb_cmd); fiid_obj_destroy (obj_ipmb_msg_trlr); fiid_obj_destroy (obj_ipmb_unexpected_data); return (rv); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-common.h0000644002055400205540000000310113527331636022314 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DEBUG_COMMON_H #define IPMI_DEBUG_COMMON_H #include #include "libcommon/ipmi-trace.h" #define IPMI_DEBUG_MAX_PREFIX_LEN 32 #define IPMI_DEBUG_MAX_HDR_LEN 1024 #define IPMI_DEBUG_MAX_PKT_LEN 65536 /* Portable version of the extremely unportable Linux dprintf() */ int debug_dprintf (int fd, const char *fmt, ...); int debug_set_prefix (char *buf, unsigned int buflen, const char *prefix); int debug_output_str (int fd, const char *prefix, const char *str); int debug_output_byte_array (int fd, const char *prefix, const uint8_t *buf, unsigned int buf_len); int debug_dump_ipmb (int fd, const char *prefix, const uint8_t *ipmb_buf, unsigned int ipmb_buf_len, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd); #endif /* IPMI_DEBUG_COMMON_H */ freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-inband.c0000644002055400205540000002260513527331636022264 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_USE_KCS_HEADER 0 #define IPMI_USE_SSIF_HEADER 1 static int _ipmi_dump_inband_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd, int which_header) { unsigned int indx = 0; unsigned int obj_cmd_len; char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; char *kcs_hdr = "KCS Header:\n" "------------"; char *ssif_hdr = "SSIF Header:\n" "------------"; char *cmd_hdr = "IPMI Command Data:\n" "------------------"; char *unexpected_hdr = "Unexpected Data:\n" "----------------"; fiid_obj_t obj_kcs_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_unexpected_data = NULL; uint8_t ipmb_buf[IPMI_DEBUG_MAX_PKT_LEN]; int ipmb_buf_len = 0; int len; int rv = -1; assert (pkt); assert (tmpl_cmd); assert ((!tmpl_ipmb_msg_hdr && !tmpl_ipmb_cmd) || (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd)); assert (which_header == IPMI_USE_KCS_HEADER || which_header == IPMI_USE_SSIF_HEADER); if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } /* Dump kcs header */ if (!(obj_kcs_hdr = fiid_obj_create (tmpl_hdr_kcs))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_kcs_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, (which_header == IPMI_USE_KCS_HEADER) ? kcs_hdr : ssif_hdr, NULL, obj_kcs_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) { rv = 0; goto cleanup; } /* Dump command data */ if (!(obj_cmd = fiid_obj_create (tmpl_cmd))) { ERRNO_TRACE (errno); goto cleanup; } obj_cmd_len = (pkt_len - indx); if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd) { if ((ipmb_buf_len = fiid_obj_get_data (obj_cmd, "message_data", ipmb_buf, IPMI_DEBUG_MAX_PKT_LEN)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (fiid_obj_clear_field (obj_cmd, "message_data") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } } if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd && ipmb_buf_len) { if (debug_dump_ipmb (fd, prefix, ipmb_buf, ipmb_buf_len, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd) < 0) goto cleanup; } /* Dump unexpected stuff */ if ((pkt_len - indx) > 0) { if (!(obj_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_unexpected_data, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_unexpected_data); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, unexpected_hdr, NULL, obj_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (fd, prefix, hdr, trlr, pkt, pkt_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } #endif rv = 0; cleanup: fiid_obj_destroy (obj_kcs_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_unexpected_data); return (rv); } int ipmi_dump_kcs_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd) { if (!pkt || !tmpl_cmd) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_inband_packet (fd, prefix, hdr, trlr, pkt, pkt_len, tmpl_cmd, NULL, NULL, IPMI_USE_KCS_HEADER)); } int ipmi_dump_kcs_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { int ret1, ret2; if (!pkt || !tmpl_cmd || !tmpl_ipmb_msg_hdr || !tmpl_ipmb_cmd) { SET_ERRNO (EINVAL); return (-1); } if ((ret1 = fiid_template_compare (tmpl_cmd, tmpl_cmd_send_message_rq)) < 0) return (-1); if ((ret2 = fiid_template_compare (tmpl_cmd, tmpl_cmd_get_message_rs)) < 0) return (-1); if (!ret1 && !ret2) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_inband_packet (fd, prefix, hdr, trlr, pkt, pkt_len, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, IPMI_USE_KCS_HEADER)); } int ipmi_dump_ssif_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd) { if (!pkt || !tmpl_cmd) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_inband_packet (fd, prefix, hdr, trlr, pkt, pkt_len, tmpl_cmd, NULL, NULL, IPMI_USE_SSIF_HEADER)); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-lan.c0000644002055400205540000003215413527331636021603 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" static int _ipmi_dump_lan_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { unsigned int indx = 0; int obj_lan_msg_trlr_len; unsigned int obj_cmd_len; char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; char *rmcp_hdr = "RMCP Header:\n" "------------"; char *session_hdr = "IPMI Session Header:\n" "--------------------"; char *msg_hdr = "IPMI Message Header:\n" "--------------------"; char *cmd_hdr = "IPMI Command Data:\n" "------------------"; char *trlr_hdr = "IPMI Trailer:\n" "--------------"; char *unexpected_hdr = "Unexpected Data:\n" "----------------"; fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_lan_msg_trlr = NULL; fiid_obj_t obj_unexpected_data = NULL; uint8_t ipmb_buf[IPMI_DEBUG_MAX_PKT_LEN]; int ipmb_buf_len = 0; int len, rv = -1; uint8_t authentication_type; uint64_t val; assert (pkt); assert (tmpl_lan_msg_hdr); assert (tmpl_cmd); assert ((!tmpl_ipmb_msg_hdr && !tmpl_ipmb_cmd) || (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd)); if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } /* Dump rmcp header */ if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, rmcp_hdr, NULL, obj_rmcp_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) goto out; /* Dump session header */ /* Output of session header depends on the auth code */ if (!(obj_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_block (obj_session_hdr, "authentication_type", "session_id", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr); goto cleanup; } indx += len; if (pkt_len <= indx) { if (ipmi_obj_dump (fd, prefix, session_hdr, NULL, obj_session_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } goto out; } if (FIID_OBJ_GET (obj_session_hdr, "authentication_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr); goto cleanup; } authentication_type = val; /* don't know how to parse, just output in raw form */ if (!IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type)) goto dump_extra; if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) { if ((len = fiid_obj_set_data (obj_session_hdr, "authentication_code", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr); goto cleanup; } indx += len; } if (pkt_len <= indx) { if (ipmi_obj_dump (fd, prefix, session_hdr, NULL, obj_session_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } goto out; } if ((len = fiid_obj_set_data (obj_session_hdr, "ipmi_msg_len", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, session_hdr, NULL, obj_session_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* Clear out data */ if (fiid_obj_clear (obj_session_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr); goto cleanup; } if (pkt_len <= indx) goto out; /* Dump message header */ if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_lan_msg_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, msg_hdr, NULL, obj_lan_msg_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) goto out; /* Dump command data */ if (!(obj_cmd = fiid_obj_create (tmpl_cmd))) { ERRNO_TRACE (errno); goto cleanup; } if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_lan_msg_trlr_len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((pkt_len - indx) <= obj_lan_msg_trlr_len) goto dump_extra; obj_cmd_len = (pkt_len - indx) - obj_lan_msg_trlr_len; if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd) { if ((ipmb_buf_len = fiid_obj_get_data (obj_cmd, "message_data", ipmb_buf, IPMI_DEBUG_MAX_PKT_LEN)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (fiid_obj_clear_field (obj_cmd, "message_data") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } } if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd && ipmb_buf_len) { if (debug_dump_ipmb (fd, prefix, ipmb_buf, ipmb_buf_len, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd) < 0) goto cleanup; } if (pkt_len <= indx) goto out; /* Dump trailer */ if ((len = fiid_obj_set_all (obj_lan_msg_trlr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, trlr_hdr, NULL, obj_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) goto out; /* Dump unexpected stuff */ dump_extra: if ((pkt_len - indx) > 0) { if (!(obj_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_unexpected_data, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_unexpected_data); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, unexpected_hdr, NULL, obj_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } out: #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (fd, prefix, hdr, trlr, pkt, pkt_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } #endif rv = 0; cleanup: fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_lan_msg_trlr); fiid_obj_destroy (obj_unexpected_data); return (rv); } int ipmi_dump_lan_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd) { if (!pkt || !tmpl_lan_msg_hdr || !tmpl_cmd) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_lan_packet (fd, prefix, hdr, trlr, pkt, pkt_len, tmpl_lan_msg_hdr, tmpl_cmd, NULL, NULL)); } int ipmi_dump_lan_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { int ret1, ret2; if (!pkt || !tmpl_lan_msg_hdr || !tmpl_cmd || !tmpl_ipmb_msg_hdr || !tmpl_ipmb_cmd) { SET_ERRNO (EINVAL); return (-1); } if ((ret1 = fiid_template_compare (tmpl_cmd, tmpl_cmd_send_message_rq)) < 0) return (-1); if ((ret2 = fiid_template_compare (tmpl_cmd, tmpl_cmd_get_message_rs)) < 0) return (-1); if (!ret1 && !ret2) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_lan_packet (fd, prefix, hdr, trlr, pkt, pkt_len, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd)); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-rmcp.c0000644002055400205540000001050513527331636021766 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/rmcp-interface.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" int ipmi_dump_rmcp_packet (int fd, const char *prefix, const char *hdr, const char *trlr, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_cmd) { unsigned int indx = 0; char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; char *rmcp_hdr = "RMCP Header:\n" "------------"; char *rmcp_cmd = "RMCP Command Data:\n" "------------------"; char *unexpected_hdr = "Unexpected Data:\n" "----------------"; fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_unexpected_data = NULL; int len, rv = -1; if (!pkt || !tmpl_cmd) { SET_ERRNO (EINVAL); return (-1); } if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } /* Dump rmcp header */ if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, rmcp_hdr, NULL, obj_rmcp_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) { rv = 0; goto cleanup; } /* Dump command data */ if (!(obj_cmd = fiid_obj_create (tmpl_cmd))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, rmcp_cmd, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* Dump unexpected stuff */ if ((pkt_len - indx) > 0) { if (!(obj_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_unexpected_data, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_unexpected_data); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, unexpected_hdr, NULL, obj_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (fd, prefix, hdr, trlr, pkt, pkt_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } #endif rv = 0; cleanup: fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_unexpected_data); return (rv); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-rmcpplus.c0000644002055400205540000015517013527331636022702 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/cmds/ipmi-sol-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/payload/ipmi-sol-payload.h" #include "freeipmi/util/ipmi-rmcpplus-util.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-crypt.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* return data parsed on success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_session_hdr (int fd, const char *prefix, const char *session_hdr, const void *pkt, unsigned int pkt_len, uint8_t *payload_type, uint8_t *payload_authenticated, uint8_t *payload_encrypted, uint32_t *session_id, uint16_t *ipmi_payload_len) { fiid_obj_t obj_rmcpplus_session_hdr = NULL; unsigned int indx = 0; int obj_len, rv = -1; uint64_t val; assert (pkt && pkt_len && payload_type && payload_authenticated && payload_encrypted && session_id && ipmi_payload_len); /* * Extract auth_type and payload information */ if (!(obj_rmcpplus_session_hdr = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "authentication_type", "payload_type.encrypted", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } indx += obj_len; if (pkt_len <= indx) goto output; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } (*payload_type) = val; /* * Extract OEM IANA and OEM Payload ID */ if (*payload_type == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT) { if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "oem_iana", "oem_payload_id", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } indx += obj_len; if (pkt_len <= indx) goto output; } /* * Extract Session ID, Session Sequence Number, and Payload Length */ if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "session_id", "ipmi_payload_len", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } indx += obj_len; if (pkt_len <= indx) goto output; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.authenticated", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } (*payload_authenticated) = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.encrypted", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } (*payload_encrypted) = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } (*session_id) = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "ipmi_payload_len", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); goto cleanup; } (*ipmi_payload_len) = val; output: if (ipmi_obj_dump (fd, prefix, session_hdr, NULL, obj_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = indx; cleanup: fiid_obj_destroy (obj_rmcpplus_session_hdr); return (rv); } /* return 1 on parse success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_payload_data (int fd, const char *prefix, const char *msg_hdr, const char *cmd_hdr, const char *ipmb_msg_hdr, const char *ipmb_cmd_hdr, const char *ipmb_msg_trlr_hdr, const char *trailer_hdr, uint8_t payload_type, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd, const void *pkt, uint16_t ipmi_payload_len) { char *payload_unexpected_hdr = "Payload Unexpected Data:\n" "------------------------"; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_lan_msg_trlr = NULL; fiid_obj_t obj_payload_unexpected_data = NULL; int obj_lan_msg_trlr_len, len, rv = -1; unsigned int obj_cmd_len; unsigned int indx = 0; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(tmpl_lan_msg_hdr && (fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 || fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1))) && tmpl_cmd && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && pkt && ipmi_payload_len); /* Dump message header */ if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { uint8_t ipmb_buf[IPMI_DEBUG_MAX_PKT_LEN]; int ipmb_buf_len = 0; if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_lan_msg_hdr, pkt + indx, ipmi_payload_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, msg_hdr, NULL, obj_lan_msg_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (ipmi_payload_len <= indx) { rv = 0; goto cleanup; } if ((obj_lan_msg_trlr_len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((ipmi_payload_len - indx) <= obj_lan_msg_trlr_len) goto dump_payload_extra; obj_cmd_len = (ipmi_payload_len - indx) - obj_lan_msg_trlr_len; if (!(obj_cmd = fiid_obj_create (tmpl_cmd))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd) { if ((ipmb_buf_len = fiid_obj_get_data (obj_cmd, "message_data", ipmb_buf, IPMI_DEBUG_MAX_PKT_LEN)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (fiid_obj_clear_field (obj_cmd, "message_data") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } } if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (tmpl_ipmb_msg_hdr && tmpl_ipmb_cmd && ipmb_buf_len) { if (debug_dump_ipmb (fd, prefix, ipmb_buf, ipmb_buf_len, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd) < 0) goto cleanup; } if (ipmi_payload_len <= indx) { rv = 0; goto cleanup; } /* Dump trailer */ if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_lan_msg_trlr, pkt + indx, ipmi_payload_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, trailer_hdr, NULL, obj_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } } else /* payload_type == IPMI_PAYLOAD_TYPE_SOL */ { obj_cmd_len = ipmi_payload_len; if (!(obj_cmd = fiid_obj_create (tmpl_cmd))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } } /* Dump payload unexpected stuff */ dump_payload_extra: if ((ipmi_payload_len - indx) > 0) { if (!(obj_payload_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_set_all (obj_payload_unexpected_data, pkt + indx, ipmi_payload_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_payload_unexpected_data); goto cleanup; } indx += len; if (ipmi_obj_dump (fd, prefix, payload_unexpected_hdr, NULL, obj_payload_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } rv = 1; cleanup: fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_lan_msg_trlr); fiid_obj_destroy (obj_payload_unexpected_data); return (rv); } /* return 1 on parse success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_payload_confidentiality_none (int fd, const char *prefix, const char *payload_hdr, const char *msg_hdr, const char *cmd_hdr, const char *ipmb_msg_hdr, const char *ipmb_cmd_hdr, const char *ipmb_msg_trlr_hdr, const char *trailer_hdr, uint8_t payload_type, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd, const void *pkt, uint16_t ipmi_payload_len) { fiid_obj_t obj_rmcpplus_payload = NULL; int ret, rv = -1; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(tmpl_lan_msg_hdr && (fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 || fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1))) && tmpl_cmd && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && pkt && ipmi_payload_len); if (!(obj_rmcpplus_payload = fiid_obj_create (tmpl_rmcpplus_payload))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if (ipmi_obj_dump (fd, prefix, payload_hdr, NULL, obj_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((ret = _dump_rmcpplus_payload_data (fd, prefix, msg_hdr, cmd_hdr, ipmb_msg_hdr, ipmb_cmd_hdr, ipmb_msg_trlr_hdr, trailer_hdr, payload_type, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, pkt, ipmi_payload_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = ret; cleanup: fiid_obj_destroy (obj_rmcpplus_payload); return (rv); } /* return 1 on parse success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_payload_confidentiality_aes_cbc_128 (int fd, const char *prefix, const char *payload_hdr, const char *msg_hdr, const char *cmd_hdr, const char *ipmb_msg_hdr, const char *ipmb_cmd_hdr, const char *ipmb_msg_trlr_hdr, const char *trailer_hdr, uint8_t payload_type, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, uint16_t ipmi_payload_len) { uint8_t iv[IPMI_CRYPT_AES_CBC_128_IV_LENGTH]; uint8_t payload_buf[IPMI_MAX_PAYLOAD_LENGTH]; uint8_t pad_len; int cipher_keylen, cipher_blocklen, decrypt_len, ret, rv = -1; unsigned int payload_data_len, cmd_data_len; fiid_obj_t obj_rmcpplus_payload = NULL; unsigned int indx = 0; /* Note: Confidentiality Key for AES_CBS_128 is K2 */ assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(tmpl_lan_msg_hdr && (fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 || fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1))) && tmpl_cmd && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && confidentiality_key && confidentiality_key_len && pkt && ipmi_payload_len); if ((cipher_keylen = crypt_cipher_key_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); goto cleanup; } assert (!(cipher_keylen < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH)); if (confidentiality_key_len < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH) { SET_ERRNO (EINVAL); goto cleanup; } confidentiality_key_len = IPMI_CRYPT_AES_CBC_128_KEY_LENGTH; if ((cipher_blocklen = crypt_cipher_block_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); goto cleanup; } assert (cipher_blocklen == IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); if (ipmi_payload_len < IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) { rv = 0; goto cleanup; } payload_data_len = ipmi_payload_len - IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH; if (!payload_data_len) { rv = 0; goto cleanup; } memcpy (iv, pkt, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); indx += IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH; memcpy (payload_buf, pkt + indx, payload_data_len); if (!(obj_rmcpplus_payload = fiid_obj_create (tmpl_rmcpplus_payload))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_header", iv, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if ((decrypt_len = crypt_cipher_decrypt (IPMI_CRYPT_CIPHER_AES, IPMI_CRYPT_CIPHER_MODE_CBC, confidentiality_key, confidentiality_key_len, iv, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH, payload_buf, payload_data_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (decrypt_len != payload_data_len) { SET_ERRNO (EINVAL); goto cleanup; } pad_len = payload_buf[payload_data_len - 1]; if (pad_len > IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) { rv = 0; goto cleanup; } if ((pad_len + 1) > payload_data_len) { rv = 0; goto cleanup; } cmd_data_len = payload_data_len - pad_len - 1; if (cmd_data_len <= 0) { rv = 0; goto cleanup; } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", payload_buf, cmd_data_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_trailer", payload_buf + cmd_data_len, pad_len + 1) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if (ipmi_obj_dump (fd, prefix, payload_hdr, NULL, obj_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((ret = _dump_rmcpplus_payload_data (fd, prefix, msg_hdr, cmd_hdr, ipmb_msg_hdr, ipmb_cmd_hdr, ipmb_msg_trlr_hdr, trailer_hdr, payload_type, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, payload_buf, cmd_data_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = ret; cleanup: fiid_obj_destroy (obj_rmcpplus_payload); return (rv); } /* return 1 on parse success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_payload_rakp (int fd, const char *prefix, const char *payload_hdr, const char *cmd_hdr, uint8_t payload_type, fiid_template_t tmpl_cmd, const void *pkt, uint16_t ipmi_payload_len) { fiid_obj_t obj_rmcpplus_payload = NULL; fiid_obj_t obj_cmd = NULL; int rv = -1; assert ((payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) && tmpl_cmd && !(payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_request) != 1)) && !(payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_response) != 1)) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_1) != 1)) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_2) != 1)) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_3) != 1)) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4 && (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_4) != 1)) && pkt && ipmi_payload_len); if (!(obj_rmcpplus_payload = fiid_obj_create (tmpl_rmcpplus_payload))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if (ipmi_obj_dump (fd, prefix, payload_hdr, NULL, obj_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST) { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_open_session_request))) { ERRNO_TRACE (errno); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE) { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_open_session_response))) { ERRNO_TRACE (errno); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1) { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_rakp_message_1))) { ERRNO_TRACE (errno); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2) { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_rakp_message_2))) { ERRNO_TRACE (errno); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_rakp_message_3))) { ERRNO_TRACE (errno); goto cleanup; } } else /* IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4 */ { if (!(obj_cmd = fiid_obj_create (tmpl_rmcpplus_rakp_message_4))) { ERRNO_TRACE (errno); goto cleanup; } } if (fiid_obj_set_all (obj_cmd, pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (ipmi_obj_dump (fd, prefix, cmd_hdr, NULL, obj_cmd) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 1; cleanup: fiid_obj_destroy (obj_rmcpplus_payload); fiid_obj_destroy (obj_cmd); return (rv); } /* return 1 on parse success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_payload (int fd, const char *prefix, const char *payload_hdr, const char *msg_hdr, const char *cmd_hdr, const char *ipmb_msg_hdr, const char *ipmb_cmd_hdr, const char *ipmb_msg_trlr_hdr, const char *trailer_hdr, uint8_t payload_type, uint8_t authentication_algorithm, uint8_t confidentiality_algorithm, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, uint16_t ipmi_payload_len) { assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && !(confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && !(confidentiality_key && confidentiality_key_len)) && ipmi_payload_len && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(tmpl_lan_msg_hdr && (fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 || fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1))) && tmpl_cmd && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1 || fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && pkt && ipmi_payload_len); if (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) return (_dump_rmcpplus_payload_confidentiality_none (fd, prefix, payload_hdr, msg_hdr, cmd_hdr, ipmb_msg_hdr, ipmb_cmd_hdr, ipmb_msg_trlr_hdr, trailer_hdr, payload_type, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, pkt, ipmi_payload_len)); else /* IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 */ return (_dump_rmcpplus_payload_confidentiality_aes_cbc_128 (fd, prefix, payload_hdr, msg_hdr, cmd_hdr, ipmb_msg_hdr, ipmb_cmd_hdr, ipmb_msg_trlr_hdr, trailer_hdr, payload_type, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, confidentiality_key, confidentiality_key_len, pkt, ipmi_payload_len)); } else return (_dump_rmcpplus_payload_rakp (fd, prefix, payload_hdr, cmd_hdr, payload_type, tmpl_cmd, pkt, ipmi_payload_len)); } /* return data parsed on success, 0 if can't parse anymore, -1 on error */ static int _dump_rmcpplus_session_trlr (int fd, const char *prefix, const char *session_trailer_hdr, uint32_t session_id, uint8_t payload_authenticated, uint8_t integrity_algorithm, const void *pkt, unsigned int pkt_len) { int pad_length_field_len, next_header_field_len, rv = -1; unsigned int pad_length, authentication_code_len = 0; fiid_obj_t obj_rmcpplus_session_trlr = NULL; unsigned int indx = 0; assert (IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm)); if (!session_id || payload_authenticated == IPMI_PAYLOAD_FLAG_UNAUTHENTICATED) return (1); /* payload should be authenticated */ if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_code_len = 0; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_code_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_code_len = IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) authentication_code_len = IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) authentication_code_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; else authentication_code_len = 0; /* just in case IPMI implementation is bogus */ if (!(obj_rmcpplus_session_trlr = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { ERRNO_TRACE (errno); goto cleanup; } if ((pad_length_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "pad_length")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((next_header_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "next_header")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len < (pad_length_field_len)) { next_header_field_len = 0; authentication_code_len = 0; } else if (pkt_len < (pad_length_field_len + next_header_field_len)) authentication_code_len = 0; else if (authentication_code_len && pkt_len < (authentication_code_len + pad_length_field_len + next_header_field_len)) authentication_code_len = pkt_len - pad_length_field_len - next_header_field_len; pad_length = pkt_len - pad_length_field_len - next_header_field_len - authentication_code_len; if (pad_length) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "integrity_pad", pkt + indx, pad_length) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } indx += pad_length; } if (pad_length_field_len) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "pad_length", pkt + indx, pad_length_field_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } indx += pad_length_field_len; } if (next_header_field_len) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "next_header", pkt + indx, next_header_field_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } indx += next_header_field_len; } if (authentication_code_len) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "authentication_code", pkt + indx, authentication_code_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } indx += authentication_code_len; } if (ipmi_obj_dump (fd, prefix, session_trailer_hdr, NULL, obj_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = indx; cleanup: fiid_obj_destroy (obj_rmcpplus_session_trlr); return (rv); } static int _ipmi_dump_rmcpplus_packet (int fd, const char *prefix, const char *hdr, const char *trlr, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { int obj_rmcp_hdr_len, obj_len, ret, rv = -1; uint8_t payload_type = 0, payload_authenticated = 0, payload_encrypted = 0; uint32_t session_id = 0; uint16_t ipmi_payload_len = 0; char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_unexpected_data = NULL; char *rmcp_hdr = "RMCP Header:\n" "------------"; char *session_hdr = "IPMI RMCPPLUS Session Header:\n" "-----------------------------"; char *payload_hdr = "IPMI RMCPPLUS Payload:\n" "----------------------"; char *msg_hdr = "IPMI Message Header:\n" "--------------------"; char *cmd_hdr = "IPMI Command Data:\n" "------------------"; char *ipmb_msg_hdr = "IPMB Message Header:\n" "--------------------"; char *ipmb_cmd_hdr = "IPMB Message Data:\n" "------------------"; char *ipmb_msg_trlr_hdr = "IPMB Message Trailer:\n" "---------------------"; char *trailer_hdr = "IPMI Trailer:\n" "-------------"; char *session_trailer_hdr = "IPMI RMCPPLUS Session Trailer:\n" "------------------------------"; char *extra_hdr = "Unexpected Data:\n" "----------------"; unsigned int indx = 0; assert (pkt); assert (IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm)); assert (IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm)); assert (IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm)); assert (!(confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && !(confidentiality_key && confidentiality_key_len))); assert (tmpl_cmd); if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* Dump rmcp header */ if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_rmcp_hdr_len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); goto cleanup; } indx += obj_rmcp_hdr_len; if (ipmi_obj_dump (fd, prefix, rmcp_hdr, NULL, obj_rmcp_hdr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (pkt_len <= indx) goto out; /* Dump rmcpplus session header */ if ((obj_len = _dump_rmcpplus_session_hdr (fd, prefix, session_hdr, pkt + indx, pkt_len - indx, &payload_type, &payload_authenticated, &payload_encrypted, &session_id, &ipmi_payload_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* don't know how to parse, dump as just big blob of hex */ if (!obj_len) goto dump_extra; indx += obj_len; if (pkt_len <= indx) goto out; /* achu: If the packet is really messed up, dump the packet in raw form */ if ((payload_type != IPMI_PAYLOAD_TYPE_IPMI && payload_type != IPMI_PAYLOAD_TYPE_SOL && payload_type != IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST && payload_type != IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) || !IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || !ipmi_payload_len) goto dump_extra; if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (!tmpl_lan_msg_hdr || (fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rq) != 1 && fiid_template_compare (tmpl_lan_msg_hdr, tmpl_lan_msg_hdr_rs) != 1)) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data) != 1 && fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_remote_console_to_bmc) != 1 && fiid_template_compare (tmpl_cmd, tmpl_sol_payload_data_bmc_to_remote_console) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_request) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_open_session_response) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_1) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_2) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_3) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) { if (fiid_template_compare (tmpl_cmd, tmpl_rmcpplus_rakp_message_4) != 1) { SET_ERRNO (EINVAL); goto cleanup; } } /* Dump Payload */ if ((ret = _dump_rmcpplus_payload (fd, prefix, payload_hdr, msg_hdr, cmd_hdr, ipmb_msg_hdr, ipmb_cmd_hdr, ipmb_msg_trlr_hdr, trailer_hdr, payload_type, authentication_algorithm, confidentiality_algorithm, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd, confidentiality_key, confidentiality_key_len, pkt + indx, ipmi_payload_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* don't know how to parse, dump as just big blob of hex */ if (!ret) goto dump_extra; indx += ipmi_payload_len; if (pkt_len <= indx) goto out; /* Dump trailer */ if ((obj_len = _dump_rmcpplus_session_trlr (fd, prefix, session_trailer_hdr, session_id, payload_authenticated, integrity_algorithm, pkt + indx, pkt_len - indx)) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* don't know how to parse, dump as just big blob of hex */ if (!obj_len) goto dump_extra; indx += obj_len; /* Dump extra stuff if packet is longer than expected */ dump_extra: if ((pkt_len - indx) > 0) { if (!(obj_unexpected_data = fiid_obj_create (tmpl_unexpected_data))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_set_all (obj_unexpected_data, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_unexpected_data); goto cleanup; } indx += obj_len; if (ipmi_obj_dump (fd, prefix, extra_hdr, NULL, obj_unexpected_data) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } out: #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (fd, prefix, hdr, trlr, pkt, pkt_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } #endif rv = 0; cleanup: fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_unexpected_data); return (rv); } int ipmi_dump_rmcpplus_packet (int fd, const char *prefix, const char *hdr, const char *trlr, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd) { if (!pkt || !IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && (!confidentiality_key || !confidentiality_key_len)) || !tmpl_cmd) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_rmcpplus_packet (fd, prefix, hdr, trlr, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, pkt_len, tmpl_lan_msg_hdr, tmpl_cmd, NULL, NULL)); } int ipmi_dump_rmcpplus_packet_ipmb (int fd, const char *prefix, const char *hdr, const char *trlr, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_template_t tmpl_lan_msg_hdr, fiid_template_t tmpl_cmd, fiid_template_t tmpl_ipmb_msg_hdr, fiid_template_t tmpl_ipmb_cmd) { int ret1, ret2; if (!pkt || !IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && (!confidentiality_key || !confidentiality_key_len)) || !tmpl_cmd || !tmpl_ipmb_msg_hdr || !tmpl_ipmb_cmd) { SET_ERRNO (EINVAL); return (-1); } if ((ret1 = fiid_template_compare (tmpl_cmd, tmpl_cmd_send_message_rq)) < 0) return (-1); if ((ret2 = fiid_template_compare (tmpl_cmd, tmpl_cmd_get_message_rs)) < 0) return (-1); if (!ret1 && !ret2) { SET_ERRNO (EINVAL); return (-1); } return (_ipmi_dump_rmcpplus_packet (fd, prefix, hdr, trlr, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, pkt, pkt_len, tmpl_lan_msg_hdr, tmpl_cmd, tmpl_ipmb_msg_hdr, tmpl_ipmb_cmd)); } freeipmi-1.6.4/libfreeipmi/debug/ipmi-debug-sdr.c0000644002055400205540000002341213527331636021616 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "ipmi-debug-common.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" int ipmi_dump_sdr_record (int fd, const char *prefix, const char *hdr, const char *trlr, const void *sdr_record, unsigned int sdr_record_len) { char prefix_buf[IPMI_DEBUG_MAX_PREFIX_LEN]; fiid_obj_t obj_sdr_record_header = NULL; fiid_obj_t obj_sdr_record = NULL; uint64_t val; uint8_t record_type; int sdr_record_header_len; int rv = -1; if (!sdr_record) { SET_ERRNO (EINVAL); return (-1); } if (debug_set_prefix (prefix_buf, IPMI_DEBUG_MAX_PREFIX_LEN, prefix) < 0) { ERRNO_TRACE (errno); return (-1); } if (debug_output_str (fd, prefix_buf, hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if ((sdr_record_header_len = fiid_template_len_bytes (tmpl_sdr_record_header)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (!(obj_sdr_record_header = fiid_obj_create (tmpl_sdr_record_header))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj_sdr_record_header, sdr_record, sdr_record_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record_header); goto cleanup; } /* Not enough for a real SDR record, just dump whatever we have */ if (sdr_record_len <= sdr_record_header_len) { if (ipmi_obj_dump (fd, prefix, hdr, trlr, obj_sdr_record_header) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record_header, "record_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record_header); goto cleanup; } record_type = val; if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_full_sensor_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_compact_sensor_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_event_only_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_entity_association_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_device_relative_entity_association_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_generic_device_locator_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_fru_device_locator_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_management_controller_device_locator_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_management_controller_confirmation_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_bmc_message_channel_info_record))) { ERRNO_TRACE (errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_OEM_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_oem_record))) { ERRNO_TRACE (errno); goto cleanup; } } else { /* I don't know this record_type, maybe its in a newer spec?? */ if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_record_header))) { ERRNO_TRACE (errno); goto cleanup; } } if (fiid_obj_set_all (obj_sdr_record, sdr_record, sdr_record_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { uint8_t event_reading_type_code; fiid_obj_t obj_temp = NULL; if (FIID_OBJ_GET (obj_sdr_record, "event_reading_type_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } event_reading_type_code = val; if ((IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code))) { if (!(obj_temp = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } } else if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code) || IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { if (!(obj_temp = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_non_threshold_based_sensors))) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } } if (obj_temp) { fiid_obj_destroy (obj_sdr_record); obj_sdr_record = obj_temp; } } else if (record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { uint8_t event_reading_type_code; fiid_obj_t obj_temp = NULL; if (FIID_OBJ_GET (obj_sdr_record, "event_reading_type_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } event_reading_type_code = val; /* achu: shouldn't be possible for this to be a threshold based * sensor, but we'll allow it just in case. */ if ((IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code))) { if (!(obj_temp = fiid_obj_copy (obj_sdr_record, tmpl_sdr_compact_sensor_record_threshold_based_sensors))) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } } else if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code) || IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { if (!(obj_temp = fiid_obj_copy (obj_sdr_record, tmpl_sdr_compact_sensor_record_non_threshold_based_sensors))) { FIID_OBJECT_ERROR_TO_ERRNO (obj_sdr_record); goto cleanup; } } if (obj_temp) { fiid_obj_destroy (obj_sdr_record); obj_sdr_record = obj_temp; } } if (ipmi_obj_dump (fd, prefix, NULL, NULL, obj_sdr_record) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (debug_output_str (fd, prefix_buf, trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (fd, prefix, hdr, trlr, sdr_record, sdr_record_len) < 0) { ERRNO_TRACE (errno); goto cleanup; } #endif rv = 0; cleanup: fiid_obj_destroy (obj_sdr_record_header); fiid_obj_destroy (obj_sdr_record); return (rv); } freeipmi-1.6.4/libfreeipmi/driver/0000755002055400205540000000000013527342542017043 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/driver/freeipmi_bmc_intf.h0000644002055400205540000002066313527331636022666 0ustar00achuachu00000000000000/* * Copyright (c) 2004 Sun Microsystems, 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: * * Redistribution of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * Redistribution 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 Sun Microsystems, Inc. or the names of * contributors may be used to endorse or promote products derived * from this software without specific prior written permission. * * This software is provided "AS IS," without a warranty of any kind. * ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, * INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. * SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE * FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING * OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL * SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, * OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR * PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF * LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, * EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. */ #ifndef FREEIPMI_BMC_INTF_H #define FREEIPMI_BMC_INTF_H /* achu: removing pragma for FreeIPMI */ #if 0 #pragma ident "@(#)bmc_intf.h 1.2 05/03/07 SMI" #endif #ifdef __cplusplus extern "C" { #endif #define BMC_SUCCESS 0x0 #define BMC_FAILURE 0x1 #define BMC_NETFN_CHASSIS 0x0 #define BMC_NETFN_BRIDGE 0x2 #define BMC_NETFN_SE 0x4 #define BMC_NETFN_APP 0x6 #define BMC_NETFN_FIRMWARE 0x8 #define BMC_NETFN_STORAGE 0xa #define BMC_NETFN_TRANSPORT 0xc #define SEND_MAX_PAYLOAD_SIZE 34 /* MAX payload */ #define RECV_MAX_PAYLOAD_SIZE 33 /* MAX payload */ #define BMC_MIN_RESPONSE_SIZE 3 #define BMC_MIN_REQUEST_SIZE 2 #define BMC_MAX_RESPONSE_SIZE (BMC_MIN_RESPONSE_SIZE + RECV_MAX_PAYLOAD_SIZE) #define BMC_MAX_REQUEST_SIZE (BMC_MIN_REQUEST_SIZE + BMC_MAX_RESPONSE_SIZE) #define BUF_SIZE 256 #define MAX_BUF_SIZE 256 /* * Useful macros */ #define FORM_NETFNLUN(net, lun) ((((net) << 2) | ((lun) & 0x3))) #define GET_NETFN(netfn) (((netfn) >> 2) & 0x3f) #define GET_LUN(netfn) (netfn & 0x3) #define RESP_NETFN(nflun) ((nflun) | 1) #define ISREQUEST(nl) (((nl) & 1) == 0) /* test for request */ #define ISRESPONSE(nl) (((nl) & 1) == 1) /* test for response */ /* for checking BMC specific stuff */ #define BMC_GET_DEVICE_ID 0x1 /* GET DEVICE ID COMMAND */ #define BMC_IPMI_15_VER 0x51 /* IPMI 1.5 definion */ /* BMC Completion Code and OEM Completion Code */ #define BMC_IPMI_UNSPECIFIC_ERROR 0xFF /* Unspecific Error */ #define BMC_IPMI_INVALID_COMMAND 0xC1 /* Invalid Command */ #define BMC_IPMI_COMMAND_TIMEOUT 0xC3 /* Command Timeout */ #define BMC_IPMI_DATA_LENGTH_EXCEED 0xC8 /* DataLength exceeded limit */ #define BMC_IPMI_OEM_FAILURE_SENDBMC 0x7E /* Cannot send BMC req */ #define IOCTL_IPMI_KCS_ACTION 0x01 #define IOCTL_IPMI_INTERFACE_METHOD 0x02 /* Interface methods returned from IOCTL_IPMI_INTERFACE_METHOD ioctl: */ #define BMC_IOCTL_METHOD 0 /* Not returned from ioctl, */ /* but can be used by */ /* applications that want to */ /* compare against an */ /* alternative method. */ #define BMC_PUTMSG_METHOD 1 /* * bmc_req_t is the data structure to send * request packet from applications to the driver * module. * * the request pkt is mainly for KCS-interface-BMC * messages. Since the system interface is session-less * connections, the packet won't have any session * information. * * the data payload will be 2 bytes less than max * BMC supported packet size. * the address of the responder is always BMC and so * rsSa field is not required. */ typedef struct bmc_req { uint8_t fn; /* netFn for command */ uint8_t lun; /* logical unit on responder */ uint8_t cmd; /* command */ uint8_t datalength; /* length of following data */ uint8_t data[SEND_MAX_PAYLOAD_SIZE]; /* request data */ } bmc_req_t; /* * bmc_rsp_t is the data structure to send * respond packet from applications to the driver * module. * * the respond pkt is mainly for KCS-interface-BMC * messages. Since the system interface is session-less * connections, the packet won't have any session * information. * * the data payload will be 2 bytes less than max * BMC supported packet size. */ typedef struct bmc_rsp { uint8_t fn; /* netFn for command */ uint8_t lun; /* logical unit on responder */ uint8_t cmd; /* command */ uint8_t ccode; /* completion code */ uint8_t datalength; /* Length */ uint8_t data[RECV_MAX_PAYLOAD_SIZE]; /* response */ } bmc_rsp_t; /* * the data structure for synchronous operation via ioctl (DEPRECATED) */ typedef struct bmc_reqrsp { bmc_req_t req; /* request half */ bmc_rsp_t rsp; /* response half */ } bmc_reqrsp_t; /* * The new way of communicating with the bmc driver is to use putmsg() to * send a message of a particular type. Replies from the driver also have this * form, and will require the user to process the type field before examining * the rest of the reply. * * The only change that must be observed when using the request and response * structures defined above is as follows: * when sending messages to the bmc driver, the data portion is now variable * (the caller must allocate enough space to store the all structure members, * plus enough space to cover the amount of data in the request), e.g.: * * bmc_msg_t *msg = malloc(offsetof(bmc_msg_t, msg) + sizeof(bmc_req_t) + 10); * * The amount allocated for the message is (# of bytes before the msg field) + * the size of a bmc_req_t (which includes SEND_MAX_PAYLOAD_SIZE * bytes in the data field), plus an additional 10 bytes for the data * field (so the data field would occupy (SEND_MAX_PAYLOAD_SIZE + 10) * bytes). The datalength member must reflect the amount of data in the * request's data field (as was required when using the ioctl interface). */ typedef struct bmc_msg { uint8_t m_type; /* Message type (see below) */ uint32_t m_id; /* Message ID */ uint8_t reserved[32]; uint8_t msg[1]; /* Variable length message data */ } bmc_msg_t; /* * An error response passed back from the bmc driver will have its m_id * field set to BMC_UNKNOWN_MSG_ID if a message is sent to it that is not * at least as large as a bmc_msg_t. */ #define BMC_UNKNOWN_MSG_ID ~((uint32_t)0) /* * Possible values for the m_type field in bmc_msg_t: */ #define BMC_MSG_REQUEST 1 /* BMC request (as above, sent to the */ /* driver by the user), bmc_msg.msg */ /* begins with the bmc_req_t */ /* structure. */ #define BMC_MSG_RESPONSE 2 /* BMC response (sent by the driver) */ /* bmc_msg.msg begins with the */ /* bmc_rsp_t structure. */ #define BMC_MSG_ERROR 3 /* Error while processing a user msg */ /* msg[0] is the error code */ /* (interpret as an errno value) */ #ifdef __cplusplus } #endif #endif /* FREEIPMI_BMC_INTF_H */ freeipmi-1.6.4/libfreeipmi/driver/ipmi-driver-trace.h0000644002055400205540000001175113527331636022546 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_DRIVER_TRACE_H #define IPMI_DRIVER_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/util/ipmi-error-util.h" #include "freeipmi/util/ipmi-util.h" #include "libcommon/ipmi-trace.h" #define KCS_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_kcs_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define KCS_ERRNO_TO_KCS_ERRNUM(__ctx, __errno) \ do { \ _set_kcs_ctx_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT (__errno); \ } while (0) #define KCS_FIID_OBJECT_ERROR_TO_KCS_ERRNUM(__ctx, __obj) \ do { \ _set_kcs_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #define SSIF_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_ssif_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define SSIF_ERRNO_TO_SSIF_ERRNUM(__ctx, __errno) \ do { \ _set_ssif_ctx_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT (__errno); \ } while (0) #define SSIF_FIID_OBJECT_ERROR_TO_SSIF_ERRNUM(__ctx, __obj) \ do { \ _set_ssif_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #define OPENIPMI_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_openipmi_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM(__ctx, __errno) \ do { \ _set_openipmi_ctx_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT (__errno); \ } while (0) #define SUNBMC_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_sunbmc_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define SUNBMC_ERRNO_TO_SUNBMC_ERRNUM(__ctx, __errno) \ do { \ _set_sunbmc_ctx_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT (__errno); \ } while (0) #define INTELDCMI_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_inteldcmi_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define INTELDCMI_ERRNO_TO_INTELDCMI_ERRNUM(__ctx, __errno) \ do { \ _set_inteldcmi_ctx_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT (__errno); \ } while (0) #endif /* IPMI_DRIVER_TRACE_H */ freeipmi-1.6.4/libfreeipmi/driver/ipmi-semaphores.c0000644002055400205540000000740513527331636022321 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "ipmi-semaphores.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" struct sembuf mutex_lock_buf_interruptible = { 0, -1, IPC_NOWAIT|SEM_UNDO}; struct sembuf mutex_unlock_buf_interruptible = { 0, 1, IPC_NOWAIT|SEM_UNDO}; struct sembuf mutex_lock_buf = { 0, -1, SEM_UNDO}; struct sembuf mutex_unlock_buf = { 0, 1, SEM_UNDO}; #define IPMI_INBAND_PROJ_ID 0x02 #define IPMI_INBAND_DEBUG_PROJ_ID 0x03 int driver_mutex_init (void) { int semid = -1; key_t key; /* Allocate Mutex */ #ifndef NDEBUG if ((key = ftok (IPMI_IPCKEY, IPMI_INBAND_PROJ_ID)) == ((key_t)-1)) /* When doing development out of the source code tree, the * IPCKEY file may not yet exist, so we do a hack to get it to * work. This is only when we work in debug mode. */ key = ftok (IPMI_DEBUG_IPCKEY, IPMI_INBAND_DEBUG_PROJ_ID); #else /* !NDEBUG */ if ((key = ftok (IPMI_IPCKEY, IPMI_INBAND_PROJ_ID)) == ((key_t)-1)) { ERRNO_TRACE (errno); return (-1); } #endif /* NDEBUG */ if ((semid = semget (key, 1, IPC_CREAT | IPC_EXCL | 0600)) < 0) { if (errno == EEXIST) /* You are not the first one */ { /* Get the orignial semid */ if ((semid = semget (key, 1, IPC_CREAT | 0600)) < 0) { ERRNO_TRACE (errno); return (-1); } /* achu: errno may not get reset, so put it back to 0 */ errno = 0; return (semid); } ERRNO_TRACE (errno); return (-1); } /* You are the first one. Initialize the mutex now */ { union semun mutex_init; unsigned short values[1]; values[0] = 1; mutex_init.array = values; if (semctl (semid, 0, SETALL, mutex_init) < 0) { ERRNO_TRACE (errno); return (-1); } } return (semid); } int driver_mutex_lock (int semid) { /* achu: don't check for valid semid - responsibility of calling libs */ do { if (semop (semid, &mutex_lock_buf, 1) < 0) { /* While blocked in this system call, the process caught a signal */ if (errno == EINTR) continue; ERRNO_TRACE (errno); return (-1); } break; } while (1); return (0); } int driver_mutex_lock_interruptible (int semid) { /* achu: don't check for valid semid - responsibility of calling libs */ return (semop (semid, &mutex_lock_buf_interruptible, 1)); } int driver_mutex_unlock (int semid) { /* achu: don't check for valid semid - responsibility of calling libs */ if (semop (semid, &mutex_unlock_buf, 1) < 0) { ERRNO_TRACE (errno); return (-1); } /* If you are in a loop to go grab LOCK again, Other tasks will never get a chance until you break. Give fair chance to other tasks as well. This is probably because of scheduler optimizations in Linux kernel. --Anand Babu */ usleep (1); return (0); } freeipmi-1.6.4/libfreeipmi/driver/ipmi-semaphores.h0000644002055400205540000000325513527331636022325 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* A semaphore is basically a counter indicating the number of resources available. If this number is 1 (the most common case), the semaphore is often called a `mutex'. You can grab the mutex and release it. --Anand Babu */ #ifndef IPMI_SEMAPHORES_H #define IPMI_SEMAPHORES_H #include #include #include #if defined(__FreeBSD__) || defined(__APPLE__) /* union semun is defined by including */ #else /* according to X/OPEN we have to define it ourselves */ union semun { int val; /* value for SETVAL */ struct semid_ds *buf; /* buffer for IPC_STAT & IPC_SET */ unsigned short *array; /* array for GETALL & SETALL */ struct seminfo *__buf; /* buffer for IPC_INFO */ void *__pad; }; #endif int driver_mutex_init (void); int driver_mutex_lock (int semid); int driver_mutex_lock_interruptible (int semid); int driver_mutex_unlock (int semid); #endif /* IPMI_SEMAPHORES_H */ freeipmi-1.6.4/libfreeipmi/driver/ipmi-inteldcmi-driver.c0000644002055400205540000005643013527331636023416 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*----------------------------------------------------------------------* The BSD License Copyright (c) 2002, Intel Corporation All rights reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: a.. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. b.. 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. c.. Neither the name of Intel Corporation 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 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. *----------------------------------------------------------------------*/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_IOCCOM_H #include /* solaris _IOR, etc. */ #endif /* !HAVE_SYS_IOCCOM_H */ #include #ifdef __CYGWIN__ #define __USE_LINUX_IOCTL_DEFS #endif /* !__CYGWIN__ */ #include #include #include #include "freeipmi/driver/ipmi-inteldcmi-driver.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "ipmi-driver-trace.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_INTELDCMI_BUFLEN 1024 #define IPMI_INTELDCMI_TIMEOUT (60 * 1000 * 1000) #define IPMI_INTELDCMI_MIN_RQ_BUFLEN 41 /* XXX need to autoconf for inteldcmi headers*/ #if HAVE_LINUX_IPMI_H #include #elif HAVE_SYS_IPMI_H #include #else /* !HAVE_LINUX_IPMI_H && !HAVE_SYS_IPMI_H */ #endif /* !HAVE_LINUX_IPMI_H && !HAVE_SYS_IPMI_H */ static char * ipmi_inteldcmi_ctx_errmsg[] = { "success", "inteldcmi context null", "inteldcmi context invalid", "invalid parameter", "permission denied", "device not found", "io not initialized", "out of memory", "driver timeout", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL, }; #define IPMI_INTELDCMI_CTX_MAGIC 0xe00fe00f #define IPMI_INTELDCMI_FLAGS_MASK IPMI_INTELDCMI_FLAGS_DEFAULT struct ipmi_inteldcmi_ctx { uint32_t magic; int errnum; unsigned int flags; char *driver_device; int device_fd; int io_init; }; fiid_template_t tmpl_inteldcmi_request = { { 32, "flags", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timeout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* in u-sec */ { 8, "rs_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rs_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "data_len", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Max bytes = 256, 256 * 8 = 2048 */ { 2048, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_inteldcmi_response = { { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Max bytes = 256, 256 * 8 = 2048 */ { 2048, "data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* * Begin code from Intel Code */ struct inteldcmi_smi { unsigned int smi_VersionNo; unsigned int smi_Reserved1; unsigned int smi_Reserved2; void *ntstatus; /* address of NT status block*/ void *lpvInBuffer; /* address of buffer for input data*/ unsigned int cbInBuffer; /* size of input buffer*/ void *lpvOutBuffer; /* address of output buffer*/ unsigned int cbOutBuffer; /* size of output buffer*/ unsigned int *lpcbBytesReturned; /* address of actual bytes of output */ void *lpoOverlapped; /* address of overlapped structure - set to NULL for Linux */ }; struct io_status_block { unsigned long status; unsigned long information; }; /* * Linux drivers expect ioctls defined using macros defined in ioctl.h. * So, instead of using the CTL_CODE defined for NT and UW, I define CTL_CODE * using these macros. That way imb_if.h, where the ioctls are defined get * to use the correct ioctl command we expect. * Notes: I am using the generic _IO macro instead of the more specific * ones. The macros expect 8bit entities, so I am cleaning what is sent to * us from imb_if.h - Mahendra */ #define IPMI_INTELDCMI_CTL_CODE(DeviceType, Function, Method, Access) \ _IO(DeviceType & 0x00FF, Function & 0x00FF) /* Define the method codes for how buffers are passed for I/O and FS controls */ #define IPMI_INTELDCMI_METHOD_BUFFERED 0 /* Define the access check value for any access The FILE_READ_ACCESS and FILE_WRITE_ACCESS constants are also defined in ntioapi.h as FILE_READ_DATA and FILE_WRITE_DATA. The values for these constants *MUST* always be in sync. */ #define IPMI_INTELDCMI_FILE_ANY_ACCESS 0 #define IPMI_INTELDCMI_FILE_DEVICE_IMB 0x00008010 #define IPMI_INTELDCMI_IOCTL_IMB_BASE 0x00000880 #define IPMI_INTELDCMI_IOCTL_IMB_SEND_MESSAGE IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 2), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_GET_ASYNC_MSG IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 8), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_MAP_MEMORY IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 14), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_UNMAP_MEMORY IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 16), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_SHUTDOWN_CODE IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 18), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_REGISTER_ASYNC_OBJ IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 24), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_DEREGISTER_ASYNC_OBJ IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 26), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_CHECK_EVENT IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 28), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) #define IPMI_INTELDCMI_IOCTL_IMB_POLL_ASYNC IPMI_INTELDCMI_CTL_CODE(IPMI_INTELDCMI_FILE_DEVICE_IMB, (IPMI_INTELDCMI_IOCTL_IMB_BASE + 20), IPMI_INTELDCMI_METHOD_BUFFERED, IPMI_INTELDCMI_FILE_ANY_ACCESS) /* * I2C ioctl's return NTStatus codes */ #define IPMI_INTELDCMI_STATUS_SUCCESS (0x00000000U) #define IPMI_INTELDCMI_STATUS_UNSUCCESSFUL (0xC0000001U) #define IPMI_INTELDCMI_STATUS_DEVICE_BUSY (0x80000011U) #define IPMI_INTELDCMI_STATUS_PENDING (0x00000103U) #define IPMI_INTELDCMI_STATUS_INVALID_PARAMETER (0xC000000DU) #define IPMI_INTELDCMI_STATUS_INVALID_DEVICE_REQUEST (0xC0000010U) #define IPMI_INTELDCMI_STATUS_BUFFER_TOO_SMALL (0xC0000023U) #define IPMI_INTELDCMI_STATUS_FILE_CLOSED (0xC0000128U) #define IPMI_INTELDCMI_STATUS_INSUFFICIENT_RESOURCES (0xC000009AU) #define IPMI_INTELDCMI_STATUS_NO_DATA_DETECTED (0x80000022U) #define IPMI_INTELDCMI_STATUS_NO_SUCH_DEVICE (0xC000000EU) #define IPMI_INTELDCMI_STATUS_ALLOTTED_EXCEEDED (0xC000000FU) #define IPMI_INTELDCMI_STATUS_IO_DEVICE_ERROR (0xC0000185U) #define IPMI_INTELDCMI_STATUS_TOO_MANY_OPEN_FILES (0xC000011FU) #define IPMI_INTELDCMI_STATUS_ACCESS_DENIED (0xC0000022U) #define IPMI_INTELDCMI_STATUS_BUFFER_OVERFLOW (0x80000005U) #define IPMI_INTELDCMI_STATUS_CANCELLED (0xC0000120U) /* * End code from Intel Code */ static void _set_inteldcmi_ctx_errnum_by_errno (ipmi_inteldcmi_ctx_t ctx, int _errno) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) return; if (_errno == 0) ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; else if (_errno == EPERM) ctx->errnum = IPMI_INTELDCMI_ERR_PERMISSION; else if (_errno == EACCES) ctx->errnum = IPMI_INTELDCMI_ERR_PERMISSION; else if (_errno == ENOENT) ctx->errnum = IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOTDIR) ctx->errnum = IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENAMETOOLONG) ctx->errnum = IPMI_INTELDCMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOMEM) ctx->errnum = IPMI_INTELDCMI_ERR_OUT_OF_MEMORY; else if (_errno == EINVAL) ctx->errnum = IPMI_INTELDCMI_ERR_INTERNAL_ERROR; else if (_errno == ETIMEDOUT) ctx->errnum = IPMI_INTELDCMI_ERR_DRIVER_TIMEOUT; else ctx->errnum = IPMI_INTELDCMI_ERR_SYSTEM_ERROR; } ipmi_inteldcmi_ctx_t ipmi_inteldcmi_ctx_create (void) { ipmi_inteldcmi_ctx_t ctx = NULL; if (!(ctx = (ipmi_inteldcmi_ctx_t)malloc (sizeof (struct ipmi_inteldcmi_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_INTELDCMI_CTX_MAGIC; ctx->flags = IPMI_INTELDCMI_FLAGS_DEFAULT; ctx->driver_device = NULL; ctx->device_fd = -1; ctx->io_init = 0; ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (ctx); } void ipmi_inteldcmi_ctx_destroy (ipmi_inteldcmi_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) return; ctx->magic = ~IPMI_INTELDCMI_CTX_MAGIC; ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; free (ctx->driver_device); /* ignore potential error, destroy path */ close (ctx->device_fd); free (ctx); } int ipmi_inteldcmi_ctx_errnum (ipmi_inteldcmi_ctx_t ctx) { if (!ctx) return (IPMI_INTELDCMI_ERR_NULL); else if (ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) return (IPMI_INTELDCMI_ERR_INVALID); else return (ctx->errnum); } char * ipmi_inteldcmi_ctx_strerror (int errnum) { if (errnum >= IPMI_INTELDCMI_ERR_SUCCESS && errnum <= IPMI_INTELDCMI_ERR_ERRNUMRANGE) return (ipmi_inteldcmi_ctx_errmsg[errnum]); else return (ipmi_inteldcmi_ctx_errmsg[IPMI_INTELDCMI_ERR_ERRNUMRANGE]); } char * ipmi_inteldcmi_ctx_errormsg (ipmi_inteldcmi_ctx_t ctx) { return (ipmi_inteldcmi_ctx_strerror (ipmi_inteldcmi_ctx_errnum (ctx))); } int ipmi_inteldcmi_ctx_get_driver_device (ipmi_inteldcmi_ctx_t ctx, char **driver_device) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (!driver_device) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } *driver_device = ctx->driver_device; ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (0); } int ipmi_inteldcmi_ctx_get_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (!flags) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (0); } int ipmi_inteldcmi_ctx_set_driver_device (ipmi_inteldcmi_ctx_t ctx, const char *driver_device) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (!driver_device) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } free (ctx->driver_device); ctx->driver_device = NULL; if (!(ctx->driver_device = strdup (driver_device))) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_OUT_OF_MEMORY); return (-1); } ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (0); } int ipmi_inteldcmi_ctx_set_flags (ipmi_inteldcmi_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_INTELDCMI_FLAGS_MASK) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (0); } int ipmi_inteldcmi_ctx_io_init (ipmi_inteldcmi_ctx_t ctx) { char *driver_device; int flags; if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (ctx->io_init) goto out; if (ctx->driver_device) driver_device = ctx->driver_device; else driver_device = IPMI_INTELDCMI_DRIVER_DEVICE_DEFAULT; if ((ctx->device_fd = open (driver_device, O_RDWR)) < 0) { INTELDCMI_ERRNO_TO_INTELDCMI_ERRNUM (ctx, errno); goto cleanup; } flags = fcntl(ctx->device_fd, F_GETFD); if (flags < 0) { INTELDCMI_ERRNO_TO_INTELDCMI_ERRNUM (ctx, errno); goto cleanup; } flags |= FD_CLOEXEC; if (fcntl(ctx->device_fd, F_SETFD, flags) < 0) { INTELDCMI_ERRNO_TO_INTELDCMI_ERRNUM (ctx, errno); goto cleanup; } ctx->io_init = 1; out: ctx->errnum = IPMI_INTELDCMI_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, error path */ close (ctx->device_fd); ctx->device_fd = -1; return (-1); } static int _inteldcmi_write_read (ipmi_inteldcmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { uint8_t rq_temp[IPMI_INTELDCMI_BUFLEN]; uint8_t *rq_data = NULL; uint8_t rq_buf[IPMI_INTELDCMI_BUFLEN]; uint8_t rs_buf[IPMI_INTELDCMI_BUFLEN]; uint8_t rs_data[IPMI_INTELDCMI_BUFLEN]; uint8_t rq_cmd; unsigned int rq_data_len = 0; int len; unsigned int rs_len; fiid_obj_t obj_inteldcmi_rq = NULL; struct inteldcmi_smi smi_msg; struct io_status_block ntstatusdummy; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_INTELDCMI_CTX_MAGIC); assert (IPMI_CHANNEL_NUMBER_VALID (channel_number)); assert (IPMI_BMC_LUN_VALID (lun)); assert (IPMI_NET_FN_RQ_VALID (net_fn)); assert (fiid_obj_valid (obj_cmd_rq)); assert (fiid_obj_packet_valid (obj_cmd_rq) == 1); assert (fiid_obj_valid (obj_cmd_rs)); if (!(obj_inteldcmi_rq = fiid_obj_create (tmpl_inteldcmi_request))) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } memset (&ntstatusdummy, '\0', sizeof (struct io_status_block)); /* Due to API differences, we need to extract the cmd out of the * request. */ if ((len = fiid_obj_get_all (obj_cmd_rq, rq_temp, IPMI_INTELDCMI_BUFLEN)) <= 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } rq_cmd = rq_temp[0]; if (len > 1) { /* -1 b/c of cmd */ memcpy (rq_buf, &rq_temp[1], len - 1); rq_data = &rq_temp[1]; rq_data_len = len - 1; } if (fiid_obj_set (obj_inteldcmi_rq, "flags", 0) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "timeout", IPMI_INTELDCMI_TIMEOUT) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "rs_addr", rs_addr) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "cmd", rq_cmd) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "net_fn", net_fn) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "rs_lun", lun) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (fiid_obj_set (obj_inteldcmi_rq, "data_len", rq_data_len) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } if (rq_data && rq_data_len) { if (fiid_obj_set_data (obj_inteldcmi_rq, "data", rq_data, rq_data_len) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } } if ((len = fiid_obj_get_all (obj_inteldcmi_rq, rq_buf, IPMI_INTELDCMI_BUFLEN)) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); goto cleanup; } /* achu: * * In Intel example code, buffer is always 41. I can't understand * why, but unless I do this, it won't work. */ assert (IPMI_INTELDCMI_MIN_RQ_BUFLEN <= IPMI_INTELDCMI_BUFLEN); if (len != IPMI_INTELDCMI_MIN_RQ_BUFLEN) len = IPMI_INTELDCMI_MIN_RQ_BUFLEN; memset (&smi_msg, '\0', sizeof (struct inteldcmi_smi)); smi_msg.ntstatus = &ntstatusdummy; smi_msg.lpvInBuffer = rq_buf; smi_msg.cbInBuffer = len; smi_msg.lpvOutBuffer = rs_buf; smi_msg.cbOutBuffer = IPMI_INTELDCMI_BUFLEN; smi_msg.lpcbBytesReturned = (void *)&rs_len; smi_msg.lpoOverlapped = NULL; if ((ret = ioctl (ctx->device_fd, IPMI_INTELDCMI_IOCTL_IMB_SEND_MESSAGE, &smi_msg)) < 0) { INTELDCMI_ERRNO_TO_INTELDCMI_ERRNUM (ctx, errno); goto cleanup; } if (ret != IPMI_INTELDCMI_STATUS_SUCCESS) { TRACE_MSG_OUT ("Intel DCMI ioctl status", ret); if (ret == IPMI_INTELDCMI_STATUS_DEVICE_BUSY) INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_DRIVER_TIMEOUT); else INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_SYSTEM_ERROR); goto cleanup; } /* achu: atleast the completion code should be returned */ if (!rs_len) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_SYSTEM_ERROR); return (-1); } rs_data[0] = rq_cmd; /* -1 b/c of cmd */ if (rs_len >= (IPMI_INTELDCMI_BUFLEN - 1)) rs_len = IPMI_INTELDCMI_BUFLEN - 1; memcpy (rs_data + 1, rs_buf, rs_len); if (fiid_obj_set_all (obj_cmd_rs, rs_data, rs_len + 1) < 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_INTERNAL_ERROR); return (-1); } rv = 0; cleanup: fiid_obj_destroy (obj_inteldcmi_rq); return (rv); } int ipmi_inteldcmi_cmd (ipmi_inteldcmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_IO_NOT_INITIALIZED); return (-1); } if (_inteldcmi_write_read (ctx, IPMI_CHANNEL_NUMBER_PRIMARY_IPMB, IPMI_SLAVE_ADDRESS_BMC, lun, net_fn, obj_cmd_rq, obj_cmd_rs) < 0) return (-1); return (0); } int ipmi_inteldcmi_cmd_ipmb (ipmi_inteldcmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_INTELDCMI_CTX_MAGIC) { ERR_TRACE (ipmi_inteldcmi_ctx_errormsg (ctx), ipmi_inteldcmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { INTELDCMI_SET_ERRNUM (ctx, IPMI_INTELDCMI_ERR_IO_NOT_INITIALIZED); return (-1); } if (_inteldcmi_write_read (ctx, channel_number, rs_addr, lun, net_fn, obj_cmd_rq, obj_cmd_rs) < 0) return (-1); return (0); } freeipmi-1.6.4/libfreeipmi/driver/ipmi-kcs-driver.c0000644002055400205540000006760113527331636022230 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-driver-trace.h" #include "ipmi-semaphores.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_KCS_SLEEP_USECS 0x01 /* timeout after 60 seconds */ #define IPMI_KCS_TIMEOUT_USECS 60000000 #define IPMI_KCS_SMS_REGISTER_SPACING_DEFAULT 1 /* KCS Interface Status Register Bits */ /* Scheme BIT Calculator Example To BIN: (format #f "[~8,'0b]" #x80) => "[10000000]" To HEX: (format #f "[0x~2,'0x]" #b10000000) => "[0x80]" */ #define IPMI_KCS_STATUS_REG_S1 0x80 #define IPMI_KCS_STATUS_REG_S0 0x40 #define IPMI_KCS_STATUS_REG_STATE (IPMI_KCS_STATUS_REG_S0 | IPMI_KCS_STATUS_REG_S1) #define IPMI_KCS_STATUS_REG_OEM2 0x20 #define IPMI_KCS_STATUS_REG_OEM1 0x10 #define IPMI_KCS_STATUS_REG_CD 0x08 /* last-written (command or data) */ #define IPMI_KCS_STATUS_REG_SMS_ATN 0x04 #define IPMI_KCS_STATUS_REG_IBF 0x02 #define IPMI_KCS_STATUS_REG_OBF 0x01 /* IPMI KCS Interface State Bits */ #define IPMI_KCS_STATE_IDLE 0x00 #define IPMI_KCS_STATE_READ IPMI_KCS_STATUS_REG_S0 #define IPMI_KCS_STATE_WRITE IPMI_KCS_STATUS_REG_S1 #define IPMI_KCS_STATE_ERROR (IPMI_KCS_STATUS_REG_S0 & IPMI_KCS_STATUS_REG_S1) /* IPMI KCS Interface Status Codes */ #define IPMI_KCS_STATUS_NO_ERROR 0x00 #define IPMI_KCS_STATUS_SUCCESS IPMI_KCS_STATUS_NO_ERR #define IPMI_KCS_STATUS_OK IPMI_KCS_STATUS_NO_ERR #define IPMI_KCS_STATUS_NO_ERROR_STR \ "No error" #define IPMI_KCS_STATUS_ABORTED_BY_CMD 0x01 #define IPMI_KCS_STATUS_ABORTED_BY_CMD_STR \ "Aborted by command (Transfer in progress was " \ "aborted by SMS issuing the Abort/Status control code)" #define IPMI_KCS_STATUS_ILLEGAL_CTRL_CODE 0x02 #define IPMI_KCS_STATUS_ILLEGAL_CTRL_CODE_STR \ "Illegal control code" #define IPMI_KCS_STATUS_LEN_ERROR 0x06 #define IPMI_KCS_STATUS_LEN_ERROR_STR \ "Length error (e.g.overrun)" #define IPMI_KCS_STATUS_OEM_ERROR_BEGIN 0xC0 #define IPMI_KCS_STATUS_OEM_ERROR_END 0xFE #define IPMI_KCS_STATUS_UNSPECIFIED_ERROR 0xFF #define IPMI_KCS_STATUS_UNSPECIFIED_ERROR_STR \ "Unspecified error" /* Reserved - all others */ /* IPMI KCS SMS Interface Registers */ #define IPMI_KCS_REG_DATAIN(sms_io_base) (sms_io_base) #define IPMI_KCS_REG_DATAOUT(sms_io_base) (sms_io_base) #define IPMI_KCS_REG_CMD(sms_io_base, register_spacing) \ (sms_io_base + register_spacing) #define IPMI_KCS_REG_STATUS(sms_io_base, register_spacing) \ (sms_io_base + register_spacing) /* IPMI KCS Control Codes */ #define IPMI_KCS_CTRL_GET_STATUS 0x60 /* Request Interface Status / Abort Current operation */ #define IPMI_KCS_CTRL_GET_ABORT IPMI_KCS_CTRL_GET_STATUS #define IPMI_KCS_CTRL_WRITE_START 0x61 /* Write the First byte of an Write Transfer */ #define IPMI_KCS_CTRL_WRITE_END 0x62 /* Write the Last byte of an Write Transfer */ /* reserved 0x63 - 0x67 */ #define IPMI_KCS_CTRL_READ 0x68 /* Request the next data byte */ /* reserved 0x69 - 0x6F */ #define IPMI_KCS_CTX_MAGIC 0xabbaadda #define IPMI_KCS_FLAGS_MASK \ (IPMI_KCS_FLAGS_NONBLOCKING \ | IPMI_KCS_FLAGS_SPIN_POLL) #define IPMI_KCS_MICROSECONDS_IN_SECOND 1000000 #if defined(__FreeBSD__) # include # include #elif defined(__NetBSD__) || defined(__OpenBSD__) # include /* inb/outb */ # include /* sysarch call */ #elif defined(HAVE_SYS_IO_H) /* Linux, _AXP_ */ # include #elif defined(HAVE_ASM_IO_H) /* PPC */ # include #endif #if defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) # define _INB(port) inb (port) # define _OUTB(data, port) outb (port, data) #elif defined(HAVE_IOPL) # define _INB(port) inb (port) # define _OUTB(data, port) outb (data, port) #else # define _INB(port) 0 # define _OUTB(data, port) #endif static char * ipmi_kcs_ctx_errmsg[] = { "success", "kcs context null", "kcs context invalid", "invalid parameter", "permission denied", "io not initialized", "buffer too small to hold result", "BMC busy", "out of memory", "device not found", "driver timeout", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL, }; struct ipmi_kcs_ctx { uint32_t magic; int errnum; uint16_t driver_address; uint8_t register_spacing; unsigned int flags; unsigned int poll_interval; #ifdef __FreeBSD__ #ifndef USE_IOPERM int dev_fd; #endif #endif /* __FreeBSD__ */ int io_init; int semid; }; static void _set_kcs_ctx_errnum_by_errno (ipmi_kcs_ctx_t ctx, int _errno) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) return; if (_errno == 0) ctx->errnum = IPMI_KCS_ERR_SUCCESS; else if (_errno == EINTR) ctx->errnum = IPMI_KCS_ERR_BUSY; else if (_errno == EAGAIN) ctx->errnum = IPMI_KCS_ERR_BUSY; else if (_errno == EPERM) ctx->errnum = IPMI_KCS_ERR_PERMISSION; else if (_errno == EACCES) ctx->errnum = IPMI_KCS_ERR_PERMISSION; else if (_errno == ENOENT) ctx->errnum = IPMI_KCS_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOMEM) ctx->errnum = IPMI_KCS_ERR_OUT_OF_MEMORY; else if (_errno == EINVAL) ctx->errnum = IPMI_KCS_ERR_INTERNAL_ERROR; else if (_errno == ETIMEDOUT) ctx->errnum = IPMI_KCS_ERR_DRIVER_TIMEOUT; else ctx->errnum = IPMI_KCS_ERR_SYSTEM_ERROR; } static void _set_kcs_errnum_by_fiid_object (ipmi_kcs_ctx_t ctx, fiid_obj_t obj) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) return; if (!fiid_obj_valid (obj)) { KCS_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); return; } if (fiid_obj_errnum (obj) == FIID_ERR_SUCCESS) ctx->errnum = IPMI_KCS_ERR_SUCCESS; else if (fiid_obj_errnum (obj) == FIID_ERR_OUT_OF_MEMORY) ctx->errnum = IPMI_KCS_ERR_OUT_OF_MEMORY; else if (fiid_obj_errnum (obj) == FIID_ERR_DATA_NOT_AVAILABLE) ctx->errnum = IPMI_KCS_ERR_SYSTEM_ERROR; else if (fiid_obj_errnum (obj) == FIID_ERR_NOT_IDENTICAL || fiid_obj_errnum (obj) == FIID_ERR_FIELD_NOT_FOUND) ctx->errnum = IPMI_KCS_ERR_PARAMETERS; else ctx->errnum = IPMI_KCS_ERR_INTERNAL_ERROR; } ipmi_kcs_ctx_t ipmi_kcs_ctx_create (void) { ipmi_kcs_ctx_t ctx = NULL; if (!(ctx = (ipmi_kcs_ctx_t)malloc (sizeof (struct ipmi_kcs_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_KCS_CTX_MAGIC; ctx->driver_address = IPMI_KCS_SMS_IO_BASE_DEFAULT; ctx->register_spacing = IPMI_KCS_SMS_REGISTER_SPACING_DEFAULT; ctx->flags = IPMI_KCS_FLAGS_DEFAULT; ctx->poll_interval = IPMI_KCS_SLEEP_USECS; #ifdef __FreeBSD__ #ifndef USE_IOPERM ctx->dev_fd = -1; #endif #endif /* __FreeBSD__ */ ctx->io_init = 0; if ((ctx->semid = driver_mutex_init ()) < 0) { ERRNO_TRACE (errno); goto cleanup; } ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (ctx); cleanup: free (ctx); return (NULL); } void ipmi_kcs_ctx_destroy (ipmi_kcs_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) return; ctx->magic = ~IPMI_KCS_CTX_MAGIC; ctx->errnum = IPMI_KCS_ERR_SUCCESS; #ifdef __FreeBSD__ #ifndef USE_IOPERM /* ignore potential error, destroy path */ close (ctx->dev_fd); #endif #endif /* __FreeBSD__ */ free (ctx); } int ipmi_kcs_ctx_errnum (ipmi_kcs_ctx_t ctx) { if (!ctx) return (IPMI_KCS_ERR_NULL); else if (ctx->magic != IPMI_KCS_CTX_MAGIC) return (IPMI_KCS_ERR_INVALID); else return (ctx->errnum); } char * ipmi_kcs_ctx_strerror (int errnum) { if (errnum >= IPMI_KCS_ERR_SUCCESS && errnum <= IPMI_KCS_ERR_ERRNUMRANGE) return (ipmi_kcs_ctx_errmsg[errnum]); else return (ipmi_kcs_ctx_errmsg[IPMI_KCS_ERR_ERRNUMRANGE]); } char * ipmi_kcs_ctx_errormsg (ipmi_kcs_ctx_t ctx) { return (ipmi_kcs_ctx_strerror (ipmi_kcs_ctx_errnum (ctx))); } int ipmi_kcs_ctx_get_driver_address (ipmi_kcs_ctx_t ctx, uint16_t *driver_address) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!driver_address) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } *driver_address = ctx->driver_address; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_get_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t *register_spacing) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!register_spacing) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } *register_spacing = ctx->register_spacing; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_get_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t *poll_interval) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!poll_interval) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } *poll_interval = ctx->poll_interval; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_get_flags (ipmi_kcs_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!flags) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_set_driver_address (ipmi_kcs_ctx_t ctx, uint16_t driver_address) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } ctx->driver_address = driver_address; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_set_register_spacing (ipmi_kcs_ctx_t ctx, uint8_t register_spacing) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } ctx->register_spacing = register_spacing; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_set_poll_interval (ipmi_kcs_ctx_t ctx, uint8_t poll_interval) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } ctx->poll_interval = poll_interval; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_set_flags (ipmi_kcs_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_KCS_FLAGS_MASK) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } int ipmi_kcs_ctx_io_init (ipmi_kcs_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (ctx->io_init) goto out; #ifdef __FreeBSD__ #ifdef USE_IOPERM /* i386_set_ioperm has known problems on FBSD 5.x (bus errors). */ if (i386_set_ioperm (ctx->driver_address, 0x02, 0x01)) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); return (-1); } #else /* !USE_IOPERM */ /* Opening /dev/io raises IOPL bits for current process. */ if ((ctx->dev_fd = open ("/dev/io", O_RDONLY)) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); return (-1); } #endif /* !USE_IOPERM */ #else /* !__FreeBSD__ */ #if HAVE_IOPL if (iopl (3) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); return (-1); } #else /* !HAVE_IOPL */ /* otherwise, we always return a system error */ KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); #endif /* !HAVE_IOPL */ #endif /* !__FreeBSD__ */ ctx->io_init = 1; out: ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (0); } static int8_t _ipmi_kcs_get_status (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); return (_INB (IPMI_KCS_REG_STATUS (ctx->driver_address, ctx->register_spacing))); } static unsigned long _ipmi_kcs_timeval_diff (struct timeval *start, struct timeval *end) { unsigned long t; assert (start); assert (end); if (end->tv_sec == start->tv_sec) t = end->tv_usec - start->tv_usec; else { t = (end->tv_sec - start->tv_sec - 1) * IPMI_KCS_MICROSECONDS_IN_SECOND; t += (IPMI_KCS_MICROSECONDS_IN_SECOND - start->tv_usec); t += end->tv_usec; } return (t); } static int _ipmi_kcs_spin_sleep (ipmi_kcs_ctx_t ctx) { struct timeval spinstart; struct timeval spinend; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); /* achu: There is probably something better than this, but * this is cheap and simple and I can't find any research * that there is something substantially superior to this. */ if (gettimeofday (&spinstart, NULL) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); } while (1) { unsigned long t; if (gettimeofday (&spinend, NULL) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); } t = _ipmi_kcs_timeval_diff (&spinstart, &spinend); if (t > ctx->poll_interval) break; } return (0); } static int _ipmi_kcs_sleep (ipmi_kcs_ctx_t ctx, struct timeval *start) { struct timeval end; unsigned long t; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); assert (start); /* achu: Why calculate a timeout this way? Why not via * timeout/poll_interval, and count the loops? OS timer * granularity is the issue. Another way is via posix realtime * timers, but handling signals in this part of the code is sort * of sketchy. This is perhaps not the most efficient, but is * safe and portable. */ if (gettimeofday (&end, NULL) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); } t = _ipmi_kcs_timeval_diff (start, &end); if (t > IPMI_KCS_TIMEOUT_USECS) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_DRIVER_TIMEOUT); return (-1); } if (!(ctx->flags & IPMI_KCS_FLAGS_SPIN_POLL)) usleep (ctx->poll_interval); else { if (_ipmi_kcs_spin_sleep (ctx) < 0) return (-1); } return (0); } /* * Wait for IBF (In-Bound Flag) to clear, signalling BMC has * read the command. */ static int _ipmi_kcs_wait_for_ibf_clear (ipmi_kcs_ctx_t ctx) { struct timeval start; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); if (gettimeofday (&start, NULL) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); } while (_ipmi_kcs_get_status (ctx) & IPMI_KCS_STATUS_REG_IBF) { if (_ipmi_kcs_sleep (ctx, &start) < 0) return (-1); } return (0); } /* * Wait for OBF to raise, signalling data is pending to read * or no command is pending. */ static int _ipmi_kcs_wait_for_obf_set (ipmi_kcs_ctx_t ctx) { struct timeval start; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); if (gettimeofday (&start, NULL) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); return (-1); } while (!(_ipmi_kcs_get_status (ctx) & IPMI_KCS_STATUS_REG_OBF)) { if (_ipmi_kcs_sleep (ctx, &start) < 0) return (-1); } return (0); } /* * Read byte from outbound data port. */ static int8_t _ipmi_kcs_read_byte (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); return (_INB (IPMI_KCS_REG_DATAOUT (ctx->driver_address))); } /* * Bump channel into sending next byte. */ static void _ipmi_kcs_read_next (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); _OUTB (IPMI_KCS_CTRL_READ, IPMI_KCS_REG_DATAIN (ctx->driver_address)); } /* * Set up channel for writing. */ static void _ipmi_kcs_start_write (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); _OUTB (IPMI_KCS_CTRL_WRITE_START, IPMI_KCS_REG_CMD (ctx->driver_address, ctx->register_spacing)); } /* * Write byte to inound data port. */ static void _ipmi_kcs_write_byte (ipmi_kcs_ctx_t ctx, uint8_t byte) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); _OUTB (byte, IPMI_KCS_REG_DATAIN (ctx->driver_address)); } /* * Set up channel to end write. */ static void _ipmi_kcs_end_write (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); _OUTB (IPMI_KCS_CTRL_WRITE_END, IPMI_KCS_REG_CMD (ctx->driver_address, ctx->register_spacing)); } #if 0 /* Not used at all right now */ /* * Send Abort current processing command. */ static void _ipmi_kcs_get_abort (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); _OUTB (IPMI_KCS_CTRL_GET_ABORT, IPMI_KCS_REG_CMD (ctx->driver_address, ctx->register_spacing)); } #endif static int _ipmi_kcs_test_if_state (ipmi_kcs_ctx_t ctx, uint8_t status) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); if ((_ipmi_kcs_get_status (ctx) & IPMI_KCS_STATUS_REG_STATE) == (status & IPMI_KCS_STATUS_REG_STATE)) return (1); else return (0); } /* * Read dummy byte to clear OBF if set. */ static void _ipmi_kcs_clear_obf (ipmi_kcs_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); if (_ipmi_kcs_get_status (ctx) & IPMI_KCS_STATUS_REG_OBF) _ipmi_kcs_read_byte (ctx); } int ipmi_kcs_write (ipmi_kcs_ctx_t ctx, const void *buf, unsigned int buf_len) { const uint8_t *p = buf; unsigned int count = 0; int lock_flag = 0; if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!buf || !buf_len) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_IO_NOT_INITIALIZED); return (-1); } if (!(ctx->flags & IPMI_KCS_FLAGS_NONBLOCKING)) { if (driver_mutex_lock (ctx->semid) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } } else { if (driver_mutex_lock_interruptible (ctx->semid) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } } lock_flag++; if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; _ipmi_kcs_clear_obf (ctx); _ipmi_kcs_start_write (ctx); if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; if (!_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_WRITE)) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_BUSY); goto cleanup; } _ipmi_kcs_clear_obf (ctx); /* note we have to save last byte. */ /* for (buf=data; data+len-1 < buf; buf++) */ for (; buf_len > 1; buf_len--) { _ipmi_kcs_write_byte (ctx, *p); if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; if (!_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_WRITE)) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_BUSY); goto cleanup; } _ipmi_kcs_clear_obf (ctx); p++; count++; } _ipmi_kcs_end_write (ctx); if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; if (!_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_WRITE)) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_BUSY); goto cleanup; } _ipmi_kcs_clear_obf (ctx); _ipmi_kcs_write_byte (ctx, *p); count++; #if 0 if (!_ipmi_kcs_test_if_state (IPMI_KCS_STATE_READ)) { printf ("Not in READ state after writing last byte?\n"); ipmi_kcs_print_state (ipmi_kcs_get_state ()); exit (EXIT_FAILURE); } #endif if (count > INT_MAX) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_OVERFLOW); goto cleanup; } ctx->errnum = IPMI_KCS_ERR_SUCCESS; return (count); cleanup: if (lock_flag) driver_mutex_unlock (ctx->semid); return (-1); } /* * Main read loop. */ int ipmi_kcs_read (ipmi_kcs_ctx_t ctx, void *buf, unsigned int buf_len) { uint8_t *p = buf; unsigned int count = 0; int rv = -1; if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); goto cleanup; } if (!buf || !buf_len) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); goto cleanup; } if (!ctx->io_init) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_IO_NOT_INITIALIZED); goto cleanup; } if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; if (!_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_READ)) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_BUSY); goto cleanup; } while (_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_READ)) { char c; if (_ipmi_kcs_wait_for_obf_set (ctx) < 0) goto cleanup; c = _ipmi_kcs_read_byte (ctx); if (count < buf_len) { *(p++) = c; count++; } _ipmi_kcs_read_next (ctx); if (_ipmi_kcs_wait_for_ibf_clear (ctx) < 0) goto cleanup; } if (_ipmi_kcs_test_if_state (ctx, IPMI_KCS_STATE_IDLE)) { /* Clean up */ if (_ipmi_kcs_wait_for_obf_set (ctx) < 0) goto cleanup; _ipmi_kcs_read_byte (ctx); /* toss it, ACK */ } else { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_DRIVER_TIMEOUT); goto cleanup; } if (count > buf_len) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_OVERFLOW); goto cleanup; } if (count > INT_MAX) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_OVERFLOW); goto cleanup; } ctx->errnum = IPMI_KCS_ERR_SUCCESS; rv = count; cleanup: if (ctx && ctx->magic == IPMI_KCS_CTX_MAGIC) driver_mutex_unlock (ctx->semid); return (rv); } static int _ipmi_kcs_cmd_write (ipmi_kcs_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, rv = -1; fiid_obj_t obj_hdr = NULL; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); assert (IPMI_BMC_LUN_VALID (lun)); assert (IPMI_NET_FN_RQ_VALID (net_fn)); assert (fiid_obj_valid (obj_cmd_rq)); assert (fiid_obj_packet_valid (obj_cmd_rq) == 1); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { KCS_FIID_OBJECT_ERROR_TO_KCS_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (!(obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = (uint8_t *)malloc (pkt_len))) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_OUT_OF_MEMORY); goto cleanup; } if (fill_hdr_ipmi_kcs (lun, net_fn, obj_hdr) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_INTERNAL_ERROR); goto cleanup; } if (assemble_ipmi_kcs_pkt (obj_hdr, obj_cmd_rq, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_kcs_write (ctx, pkt, pkt_len) < 0) goto cleanup; rv = 0; cleanup: fiid_obj_destroy (obj_hdr); free (pkt); return (rv); } static int _ipmi_kcs_cmd_read (ipmi_kcs_ctx_t ctx, fiid_obj_t obj_cmd_rs) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, read_len, ret, rv = -1; fiid_obj_t obj_hdr = NULL; fiid_field_t *tmpl = NULL; assert (ctx); assert (ctx->magic == IPMI_KCS_CTX_MAGIC); assert (fiid_obj_valid (obj_cmd_rs)); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } if (!(tmpl = fiid_obj_template (obj_cmd_rs))) { KCS_FIID_OBJECT_ERROR_TO_KCS_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if ((cmd_len = fiid_template_len_bytes (tmpl)) < 0) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { KCS_ERRNO_TO_KCS_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = (uint8_t *)malloc (pkt_len))) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_OUT_OF_MEMORY); goto cleanup; } if ((read_len = ipmi_kcs_read (ctx, pkt, pkt_len)) < 0) goto cleanup; if (!read_len) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_SYSTEM_ERROR); goto cleanup; } if ((ret = unassemble_ipmi_kcs_pkt (pkt, read_len, obj_hdr, obj_cmd_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_INTERNAL_ERROR); goto cleanup; } /* IPMI didn't return enough data back to you */ if (!ret) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_IPMI_ERROR); goto cleanup; } rv = 0; cleanup: fiid_template_free (tmpl); fiid_obj_destroy (obj_hdr); free (pkt); return (rv); } int ipmi_kcs_cmd (ipmi_kcs_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_KCS_CTX_MAGIC) { ERR_TRACE (ipmi_kcs_ctx_errormsg (ctx), ipmi_kcs_ctx_errnum (ctx)); return (-1); } if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { KCS_SET_ERRNUM (ctx, IPMI_KCS_ERR_IO_NOT_INITIALIZED); return (-1); } if (_ipmi_kcs_cmd_write (ctx, lun, net_fn, obj_cmd_rq) < 0) return (-1); if (_ipmi_kcs_cmd_read (ctx, obj_cmd_rs) < 0) return (-1); return (0); } freeipmi-1.6.4/libfreeipmi/driver/ipmi-openipmi-driver.c0000644002055400205540000004203413527331636023261 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_IOCCOM_H #include /* solaris _IOR, etc. */ #endif /* !HAVE_SYS_IOCCOM_H */ #include #ifdef __CYGWIN__ #define __USE_LINUX_IOCTL_DEFS #endif /* !__CYGWIN__ */ #include #include #include #include "freeipmi/driver/ipmi-openipmi-driver.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "ipmi-driver-trace.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_OPENIPMI_BUFLEN 1024 #define IPMI_OPENIPMI_TIMEOUT 60 #if HAVE_LINUX_IPMI_H #include #elif HAVE_SYS_IPMI_H #include #else /* !HAVE_LINUX_IPMI_H && !HAVE_SYS_IPMI_H */ /* * achu: Most of the definitions below are taken from linux/ipmi.h. * * Thanks to the ipmitool folks, who's code made it easier for me to * figure out the OpenIPMI interface more quickly. */ #define IPMI_SYSTEM_INTERFACE_ADDR_TYPE 0x0c #define IPMI_IPMB_ADDR_TYPE 0x01 struct ipmi_system_interface_addr { int addr_type; short channel; unsigned char lun; }; struct ipmi_ipmb_addr { int addr_type; short channel; unsigned char slave_addr; unsigned char lun; }; struct ipmi_msg { unsigned char netfn; unsigned char cmd; unsigned short data_len; unsigned char *data; }; struct ipmi_req { unsigned char *addr; unsigned int addr_len; long msgid; struct ipmi_msg msg; }; struct ipmi_recv { int recv_type; unsigned char *addr; unsigned int addr_len; long msgid; struct ipmi_msg msg; }; #define IPMI_IOC_MAGIC 'i' #define IPMICTL_RECEIVE_MSG_TRUNC _IOWR (IPMI_IOC_MAGIC, 11, struct ipmi_recv) #define IPMICTL_RECEIVE_MSG _IOWR (IPMI_IOC_MAGIC, 12, struct ipmi_recv) #if defined(__FreeBSD__) #define IPMICTL_SEND_COMMAND _IOW (IPMI_IOC_MAGIC, 13, struct ipmi_req) #define IPMICTL_SET_MY_ADDRESS_CMD _IOW (IPMI_IOC_MAGIC, 17, unsigned int) #else #define IPMICTL_SEND_COMMAND _IOR (IPMI_IOC_MAGIC, 13, struct ipmi_req) #define IPMICTL_SET_MY_ADDRESS_CMD _IOR (IPMI_IOC_MAGIC, 17, unsigned int) #endif #define IPMICTL_GET_MY_ADDRESS_CMD _IOR (IPMI_IOC_MAGIC, 18, unsigned int) #endif /* !HAVE_LINUX_IPMI_H && !HAVE_SYS_IPMI_H */ static char * ipmi_openipmi_ctx_errmsg[] = { "success", "openipmi context null", "openipmi context invalid", "invalid parameter", "permission denied", "device not found", "io not initialized", "out of memory", "driver timeout", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL, }; #define IPMI_OPENIPMI_CTX_MAGIC 0xd00fd00f #define IPMI_OPENIPMI_FLAGS_MASK IPMI_OPENIPMI_FLAGS_DEFAULT struct ipmi_openipmi_ctx { uint32_t magic; int errnum; unsigned int flags; char *driver_device; int device_fd; int io_init; }; static void _set_openipmi_ctx_errnum_by_errno (ipmi_openipmi_ctx_t ctx, int _errno) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) return; if (_errno == 0) ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; else if (_errno == EPERM) ctx->errnum = IPMI_OPENIPMI_ERR_PERMISSION; else if (_errno == EACCES) ctx->errnum = IPMI_OPENIPMI_ERR_PERMISSION; else if (_errno == ENOENT) ctx->errnum = IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOTDIR) ctx->errnum = IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENAMETOOLONG) ctx->errnum = IPMI_OPENIPMI_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOMEM) ctx->errnum = IPMI_OPENIPMI_ERR_OUT_OF_MEMORY; else if (_errno == EINVAL) ctx->errnum = IPMI_OPENIPMI_ERR_INTERNAL_ERROR; else if (_errno == ETIMEDOUT) ctx->errnum = IPMI_OPENIPMI_ERR_DRIVER_TIMEOUT; else ctx->errnum = IPMI_OPENIPMI_ERR_SYSTEM_ERROR; } ipmi_openipmi_ctx_t ipmi_openipmi_ctx_create (void) { ipmi_openipmi_ctx_t ctx = NULL; if (!(ctx = (ipmi_openipmi_ctx_t)malloc (sizeof (struct ipmi_openipmi_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_OPENIPMI_CTX_MAGIC; ctx->flags = IPMI_OPENIPMI_FLAGS_DEFAULT; ctx->driver_device = NULL; ctx->device_fd = -1; ctx->io_init = 0; ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (ctx); } void ipmi_openipmi_ctx_destroy (ipmi_openipmi_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) return; ctx->magic = ~IPMI_OPENIPMI_CTX_MAGIC; ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; free (ctx->driver_device); /* ignore potential error, destroy path */ close (ctx->device_fd); free (ctx); } int ipmi_openipmi_ctx_errnum (ipmi_openipmi_ctx_t ctx) { if (!ctx) return (IPMI_OPENIPMI_ERR_NULL); else if (ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) return (IPMI_OPENIPMI_ERR_INVALID); else return (ctx->errnum); } char * ipmi_openipmi_ctx_strerror (int errnum) { if (errnum >= IPMI_OPENIPMI_ERR_SUCCESS && errnum <= IPMI_OPENIPMI_ERR_ERRNUMRANGE) return (ipmi_openipmi_ctx_errmsg[errnum]); else return (ipmi_openipmi_ctx_errmsg[IPMI_OPENIPMI_ERR_ERRNUMRANGE]); } char * ipmi_openipmi_ctx_errormsg (ipmi_openipmi_ctx_t ctx) { return (ipmi_openipmi_ctx_strerror (ipmi_openipmi_ctx_errnum (ctx))); } int ipmi_openipmi_ctx_get_driver_device (ipmi_openipmi_ctx_t ctx, char **driver_device) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (!driver_device) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } *driver_device = ctx->driver_device; ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (0); } int ipmi_openipmi_ctx_get_flags (ipmi_openipmi_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (!flags) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (0); } int ipmi_openipmi_ctx_set_driver_device (ipmi_openipmi_ctx_t ctx, const char *driver_device) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (!driver_device) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } free (ctx->driver_device); ctx->driver_device = NULL; if (!(ctx->driver_device = strdup (driver_device))) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_OUT_OF_MEMORY); return (-1); } ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (0); } int ipmi_openipmi_ctx_set_flags (ipmi_openipmi_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_OPENIPMI_FLAGS_MASK) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (0); } int ipmi_openipmi_ctx_io_init (ipmi_openipmi_ctx_t ctx) { unsigned int addr = IPMI_SLAVE_ADDRESS_BMC; char *driver_device; int flags; if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (ctx->io_init) goto out; if (ctx->driver_device) driver_device = ctx->driver_device; else driver_device = IPMI_OPENIPMI_DRIVER_DEVICE_DEFAULT; if ((ctx->device_fd = open (driver_device, O_RDWR)) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); goto cleanup; } flags = fcntl(ctx->device_fd, F_GETFD); if (flags < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); goto cleanup; } flags |= FD_CLOEXEC; if (fcntl(ctx->device_fd, F_SETFD, flags) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); goto cleanup; } if (ioctl (ctx->device_fd, IPMICTL_SET_MY_ADDRESS_CMD, &addr) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); goto cleanup; } ctx->io_init = 1; out: ctx->errnum = IPMI_OPENIPMI_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, error path */ close (ctx->device_fd); ctx->device_fd = -1; return (-1); } static int _openipmi_write (ipmi_openipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, unsigned int is_ipmb) { uint8_t rq_buf_temp[IPMI_OPENIPMI_BUFLEN]; uint8_t rq_buf[IPMI_OPENIPMI_BUFLEN]; uint8_t rq_cmd; unsigned int rq_buf_len; int len; struct ipmi_system_interface_addr system_interface_addr; struct ipmi_ipmb_addr ipmb_addr; struct ipmi_req rq_packet; assert (ctx); assert (ctx->magic == IPMI_OPENIPMI_CTX_MAGIC); assert (IPMI_CHANNEL_NUMBER_VALID (channel_number)); assert (IPMI_BMC_LUN_VALID (lun)); assert (IPMI_NET_FN_RQ_VALID (net_fn)); assert (fiid_obj_valid (obj_cmd_rq)); assert (fiid_obj_packet_valid (obj_cmd_rq) == 1); /* Due to API differences, we need to extract the cmd out of the * request. */ if ((len = fiid_obj_get_all (obj_cmd_rq, rq_buf_temp, IPMI_OPENIPMI_BUFLEN)) <= 0) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_INTERNAL_ERROR); return (-1); } rq_cmd = rq_buf_temp[0]; if (len > 1) { /* -1 b/c of cmd */ memcpy (rq_buf, &rq_buf_temp[1], len - 1); rq_buf_len = len - 1; } else rq_buf_len = 0; if (!is_ipmb) { system_interface_addr.addr_type = IPMI_SYSTEM_INTERFACE_ADDR_TYPE; /* openipmi macro */ system_interface_addr.channel = IPMI_CHANNEL_NUMBER_SYSTEM_INTERFACE; /* freeipmi macro */ system_interface_addr.lun = lun; rq_packet.addr = (unsigned char *)&system_interface_addr; rq_packet.addr_len = sizeof (struct ipmi_system_interface_addr); } else { ipmb_addr.addr_type = IPMI_IPMB_ADDR_TYPE; /* openipmi macro */ ipmb_addr.channel = channel_number; ipmb_addr.slave_addr = rs_addr; ipmb_addr.lun = lun; rq_packet.addr = (unsigned char *)&ipmb_addr; rq_packet.addr_len = sizeof (struct ipmi_ipmb_addr); } rq_packet.msgid = 0; rq_packet.msg.netfn = net_fn; rq_packet.msg.cmd = rq_cmd; rq_packet.msg.data_len = rq_buf_len; rq_packet.msg.data = rq_buf; if (ioctl (ctx->device_fd, IPMICTL_SEND_COMMAND, &rq_packet) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); return (-1); } return (0); } static int _openipmi_read (ipmi_openipmi_ctx_t ctx, fiid_obj_t obj_cmd_rs) { uint8_t rs_buf_temp[IPMI_OPENIPMI_BUFLEN]; uint8_t rs_buf[IPMI_OPENIPMI_BUFLEN]; struct ipmi_system_interface_addr rs_addr; struct ipmi_recv rs_packet; fd_set read_fds; struct timeval tv, tv_orig, start, end, delta; int n; assert (ctx); assert (ctx->magic == IPMI_OPENIPMI_CTX_MAGIC); assert (fiid_obj_valid (obj_cmd_rs)); rs_packet.addr = (unsigned char *)&rs_addr; rs_packet.addr_len = sizeof (struct ipmi_system_interface_addr); rs_packet.msg.data = rs_buf_temp; rs_packet.msg.data_len = IPMI_OPENIPMI_BUFLEN; FD_ZERO (&read_fds); FD_SET (ctx->device_fd, &read_fds); tv.tv_sec = IPMI_OPENIPMI_TIMEOUT; tv.tv_usec = 0; tv_orig.tv_sec = tv.tv_sec; tv_orig.tv_usec = tv.tv_usec; if (gettimeofday (&start, NULL) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); return (-1); } do { if ((n = select (ctx->device_fd + 1, &read_fds, NULL, NULL, &tv)) < 0) { if (errno != EINTR) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); return (-1); } if (gettimeofday (&end, NULL) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); return (-1); } /* delta = end - start */ timersub (&end, &start, &delta); /* tv = tv_orig - delta */ timersub (&tv_orig, &delta, &tv); } } while (n < 0); if (!n) { /* Could be due to a different error, but we assume a timeout */ OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_DRIVER_TIMEOUT); return (-1); } if (ioctl (ctx->device_fd, IPMICTL_RECEIVE_MSG_TRUNC, &rs_packet) < 0) { OPENIPMI_ERRNO_TO_OPENIPMI_ERRNUM (ctx, errno); return (-1); } /* achu: atleast the completion code should be returned */ if (!rs_packet.msg.data_len) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_SYSTEM_ERROR); return (-1); } rs_buf[0] = rs_packet.msg.cmd; /* -1 b/c of cmd */ if (rs_packet.msg.data_len >= (IPMI_OPENIPMI_BUFLEN - 1)) rs_packet.msg.data_len = IPMI_OPENIPMI_BUFLEN - 1; memcpy (rs_buf + 1, rs_buf_temp, rs_packet.msg.data_len); if (fiid_obj_set_all (obj_cmd_rs, rs_buf, rs_packet.msg.data_len + 1) < 0) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_INTERNAL_ERROR); return (-1); } return (0); } int ipmi_openipmi_cmd (ipmi_openipmi_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_IO_NOT_INITIALIZED); return (-1); } if (_openipmi_write (ctx, 0, 0, lun, net_fn, obj_cmd_rq, 0) < 0) return (-1); if (_openipmi_read (ctx, obj_cmd_rs) < 0) return (-1); return (0); } int ipmi_openipmi_cmd_ipmb (ipmi_openipmi_ctx_t ctx, uint8_t channel_number, uint8_t rs_addr, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_OPENIPMI_CTX_MAGIC) { ERR_TRACE (ipmi_openipmi_ctx_errormsg (ctx), ipmi_openipmi_ctx_errnum (ctx)); return (-1); } if (!IPMI_CHANNEL_NUMBER_VALID (channel_number) || !IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { OPENIPMI_SET_ERRNUM (ctx, IPMI_OPENIPMI_ERR_IO_NOT_INITIALIZED); return (-1); } if (_openipmi_write (ctx, channel_number, rs_addr, lun, net_fn, obj_cmd_rq, 1) < 0) return (-1); if (_openipmi_read (ctx, obj_cmd_rs) < 0) return (-1); return (0); } freeipmi-1.6.4/libfreeipmi/driver/ipmi-sunbmc-driver.c0000644002055400205540000004523713527331636022740 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_STROPTS_H #include /* putmsg, getmsg on Solaris */ #endif /* HAVE_STROPTS_H */ #if HAVE_SYS_STROPTS_H #include /* for I_STR */ #endif /* !HAVE_SYS_STROPTS_H */ #if HAVE_SYS_INT_TYPES_H #include /* for uint8_t on Solaris?? */ #endif /* !HAVE_SYS_INT_TYPES_H */ #if HAVE_BMC_INTF_H #include #else /* !HAVE_BMC_INTF_H */ #include "freeipmi_bmc_intf.h" /* from ipmitool - is BSD license, not CDDL */ #endif /* !HAVE_BMC_INTF_H */ #include #include #include #include #include "freeipmi/driver/ipmi-sunbmc-driver.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "ipmi-driver-trace.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_SUNBMC_BUFLEN 1024 #define IPMI_SUNBMC_TIMEOUT 60 /* Thanks to the ipmitool folks, who's code made it easier for me to * figure out the Solaris /dev/bmc interface more quickly. */ static char * ipmi_sunbmc_ctx_errmsg[] = { "success", "sunbmc context null", "sunbmc context invalid", "invalid parameter", "permission denied", "device not found", "device not supported", "io not initialized", "out of memory", "driver timeout", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL, }; #define IPMI_SUNBMC_CTX_MAGIC 0xd0bbd0bb #define IPMI_SUNBMC_FLAGS_MASK IPMI_SUNBMC_FLAGS_DEFAULT struct ipmi_sunbmc_ctx { uint32_t magic; int errnum; unsigned int flags; char *driver_device; int device_fd; int io_init; int putmsg_intf; uint8_t putmsg_intf_msg_id; }; static void _set_sunbmc_ctx_errnum_by_errno (ipmi_sunbmc_ctx_t ctx, int _errno) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) return; if (_errno == 0) ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; else if (_errno == EPERM) ctx->errnum = IPMI_SUNBMC_ERR_PERMISSION; else if (_errno == EACCES) ctx->errnum = IPMI_SUNBMC_ERR_PERMISSION; else if (_errno == ENOENT) ctx->errnum = IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOTDIR) ctx->errnum = IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND; else if (_errno == ENAMETOOLONG) ctx->errnum = IPMI_SUNBMC_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOMEM) ctx->errnum = IPMI_SUNBMC_ERR_OUT_OF_MEMORY; else if (_errno == ETIMEDOUT) ctx->errnum = IPMI_SUNBMC_ERR_DRIVER_TIMEOUT; else ctx->errnum = IPMI_SUNBMC_ERR_SYSTEM_ERROR; } ipmi_sunbmc_ctx_t ipmi_sunbmc_ctx_create (void) { ipmi_sunbmc_ctx_t ctx = NULL; if (!(ctx = (ipmi_sunbmc_ctx_t)malloc (sizeof (struct ipmi_sunbmc_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_SUNBMC_CTX_MAGIC; ctx->flags = IPMI_SUNBMC_FLAGS_DEFAULT; ctx->driver_device = NULL; ctx->device_fd = -1; ctx->io_init = 0; ctx->putmsg_intf = 0; ctx->putmsg_intf_msg_id = 0; /* XXX: randomize? */ ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (ctx); } void ipmi_sunbmc_ctx_destroy (ipmi_sunbmc_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) return; ctx->magic = ~IPMI_SUNBMC_CTX_MAGIC; ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; free (ctx->driver_device); /* ignore potential error, destroy path */ close (ctx->device_fd); free (ctx); } int ipmi_sunbmc_ctx_errnum (ipmi_sunbmc_ctx_t ctx) { if (!ctx) return (IPMI_SUNBMC_ERR_NULL); else if (ctx->magic != IPMI_SUNBMC_CTX_MAGIC) return (IPMI_SUNBMC_ERR_INVALID); else return (ctx->errnum); } char * ipmi_sunbmc_ctx_strerror (int errnum) { if (errnum >= IPMI_SUNBMC_ERR_SUCCESS && errnum <= IPMI_SUNBMC_ERR_ERRNUMRANGE) return (ipmi_sunbmc_ctx_errmsg[errnum]); else return (ipmi_sunbmc_ctx_errmsg[IPMI_SUNBMC_ERR_ERRNUMRANGE]); } char * ipmi_sunbmc_ctx_errormsg (ipmi_sunbmc_ctx_t ctx) { return (ipmi_sunbmc_ctx_strerror (ipmi_sunbmc_ctx_errnum (ctx))); } int ipmi_sunbmc_ctx_get_driver_device (ipmi_sunbmc_ctx_t ctx, char **driver_device) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (!driver_device) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_PARAMETERS); return (-1); } *driver_device = ctx->driver_device; ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (0); } int ipmi_sunbmc_ctx_get_flags (ipmi_sunbmc_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (!flags) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (0); } int ipmi_sunbmc_ctx_set_driver_device (ipmi_sunbmc_ctx_t ctx, const char *driver_device) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (!driver_device) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_PARAMETERS); return (-1); } free (ctx->driver_device); ctx->driver_device = NULL; if (!(ctx->driver_device = strdup (driver_device))) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_OUT_OF_MEMORY); return (-1); } ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (0); } int ipmi_sunbmc_ctx_set_flags (ipmi_sunbmc_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_SUNBMC_FLAGS_MASK) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (0); } int ipmi_sunbmc_ctx_io_init (ipmi_sunbmc_ctx_t ctx) { #if defined(HAVE_SYS_STROPTS_H) && defined(IOCTL_IPMI_INTERFACE_METHOD) struct strioctl istr; uint8_t method; #endif /* !(defined(HAVE_SYS_STROPTS_H) && defined(IOCTL_IPMI_INTERFACE_METHOD)) */ char *driver_device; int flags; if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (ctx->io_init) goto out; if (ctx->driver_device) driver_device = ctx->driver_device; else driver_device = IPMI_SUNBMC_DRIVER_DEVICE_DEFAULT; if ((ctx->device_fd = open (driver_device, O_RDWR)) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); goto cleanup; } flags = fcntl(ctx->device_fd, F_GETFD); if (flags < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); goto cleanup; } flags |= FD_CLOEXEC; if (fcntl(ctx->device_fd, F_SETFD, flags) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); goto cleanup; } #if defined(HAVE_SYS_STROPTS_H) #ifdef IOCTL_IPMI_INTERFACE_METHOD #ifdef BMC_PUTMSG_METHOD method = BMC_PUTMSG_METHOD; #else method = 1; #endif istr.ic_cmd = IOCTL_IPMI_INTERFACE_METHOD; istr.ic_timout = 0; /* spelled 'timout', not a typo */ istr.ic_len = 1; istr.ic_dp = (char *)&method; if (ioctl (ctx->device_fd, I_STR, &istr) < 0) { if (errno != EINVAL) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); goto cleanup; } /* achu: assume ioctl method */ ctx->putmsg_intf = 0; goto out_io_init; } ctx->putmsg_intf = method; #else /* !IOCTL_IPMI_INTERFACE_METHOD */ /* achu: assume ioctl method */ ctx->putmsg_intf = 0; #endif /* !IOCTL_IPMI_INTERFACE_METHOD */ #else /* !defined(HAVE_SYS_STROPTS_H) */ /* otherwise, device is not supported */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED); return (-1); #endif /* !defined(HAVE_SYS_STROPTS_H) */ out_io_init: ctx->io_init = 1; out: ctx->errnum = IPMI_SUNBMC_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, error path */ close (ctx->device_fd); ctx->device_fd = -1; return (-1); } static int _sunbmc_write (ipmi_sunbmc_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq) { #if defined(HAVE_SYS_STROPTS_H) struct strbuf sbuf; bmc_msg_t *msg = NULL; bmc_req_t *req = NULL; unsigned int msg_len; uint8_t rq_buf_temp[IPMI_SUNBMC_BUFLEN]; uint8_t rq_buf[IPMI_SUNBMC_BUFLEN]; uint8_t rq_cmd; unsigned int rq_buf_len; int len; #endif /* !defined(HAVE_SYS_STROPTS_H) */ int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SUNBMC_CTX_MAGIC); assert (IPMI_BMC_LUN_VALID (lun)); assert (IPMI_NET_FN_RQ_VALID (net_fn)); assert (fiid_obj_valid (obj_cmd_rq)); assert (fiid_obj_packet_valid (obj_cmd_rq) == 1); assert (ctx->io_init); assert (ctx->putmsg_intf); #if defined(HAVE_SYS_STROPTS_H) memset (&sbuf, '\0', sizeof (struct strbuf)); /* Due to API differences, we need to extract the cmd out of the * request. */ if ((len = fiid_obj_get_all (obj_cmd_rq, rq_buf_temp, IPMI_SUNBMC_BUFLEN)) <= 0) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_INTERNAL_ERROR); goto cleanup; } rq_cmd = rq_buf_temp[0]; if (len > 1) { memcpy (rq_buf, &rq_buf_temp[1], len - 1); rq_buf_len = len - 1; } else rq_buf_len = 0; /* achu: see header for for how this is calculated */ msg_len = offsetof (bmc_msg_t, msg); msg_len += sizeof (bmc_req_t); msg_len += (rq_buf_len > SEND_MAX_PAYLOAD_SIZE) ? (rq_buf_len - SEND_MAX_PAYLOAD_SIZE) : 0; if (!(msg = (bmc_msg_t *)malloc (msg_len))) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_OUT_OF_MEMORY); goto cleanup; } msg->m_type = BMC_MSG_REQUEST; msg->m_id = ctx->putmsg_intf_msg_id; req = (bmc_req_t *)&(msg->msg[0]); req->fn = net_fn; req->lun = lun; req->cmd = rq_cmd; req->datalength = rq_buf_len; memcpy (req->data, rq_buf, rq_buf_len); sbuf.len = msg_len; sbuf.buf = (char *)msg; if (putmsg (ctx->device_fd, NULL, &sbuf, 0) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); goto cleanup; } #else /* !defined(HAVE_SYS_STROPTS_H) */ /* otherwise, device is not supported */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED); goto cleanup; #endif /* !(defined(HAVE_BMC_INTF_H) && defined(HAVE_SYS_STROPTS_H)) */ rv = 0; cleanup: #if defined(HAVE_SYS_STROPTS_H) free (msg); #endif /* !defined(HAVE_SYS_STROPTS_H) */ return (rv); } static int _sunbmc_read (ipmi_sunbmc_ctx_t ctx, fiid_obj_t obj_cmd_rs) { #if defined(HAVE_SYS_STROPTS_H) struct strbuf sbuf; bmc_msg_t *msg = NULL; bmc_rsp_t *rsp = NULL; int flags = 0; uint8_t rs_buf_temp[IPMI_SUNBMC_BUFLEN]; uint8_t rs_buf[IPMI_SUNBMC_BUFLEN]; unsigned int rs_buf_len = 0; #endif /* !defined(HAVE_SYS_STROPTS_H) */ fd_set read_fds; struct timeval tv, tv_orig, start, end, delta; int n; assert (ctx); assert (ctx->magic == IPMI_SUNBMC_CTX_MAGIC); assert (ctx->io_init); assert (ctx->putmsg_intf); assert (fiid_obj_valid (obj_cmd_rs)); #if defined(HAVE_SYS_STROPTS_H) memset (&sbuf, '\0', sizeof (struct strbuf)); sbuf.maxlen = IPMI_SUNBMC_BUFLEN; sbuf.buf = (char *)rs_buf_temp; #else /* !defined(HAVE_SYS_STROPTS_H) */ /* otherwise, device is not supported */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED); return (-1); #endif /* !defined(HAVE_SYS_STROPTS_H) */ FD_ZERO (&read_fds); FD_SET (ctx->device_fd, &read_fds); tv.tv_sec = IPMI_SUNBMC_TIMEOUT; tv.tv_usec = 0; tv_orig.tv_sec = tv.tv_sec; tv_orig.tv_usec = tv.tv_usec; if (gettimeofday (&start, NULL) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } do { if ((n = select (ctx->device_fd + 1, &read_fds, NULL, NULL, &tv)) < 0) { if (errno != EINTR) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } if (gettimeofday (&end, NULL) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } /* delta = end - start */ timersub (&end, &start, &delta); /* tv = tv_orig - delta */ timersub (&tv_orig, &delta, &tv); } } while (n < 0); if (!n) { /* Could be due to a different error, but we assume a timeout */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DRIVER_TIMEOUT); return (-1); } #if defined(HAVE_SYS_STROPTS_H) if (getmsg (ctx->device_fd, NULL, &sbuf, &flags) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } msg = (bmc_msg_t *)&(sbuf.buf[0]); if (msg->m_type == BMC_MSG_ERROR) { errno = msg->msg[0]; SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } if (msg->m_type != BMC_MSG_RESPONSE) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_SYSTEM_ERROR); return (-1); } if (msg->m_id != ctx->putmsg_intf_msg_id) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_SYSTEM_ERROR); return (-1); } rsp = (bmc_rsp_t *)&(msg->msg[0]); /* Due to API differences, we need to put the cmd/ccode back into * the buffer. */ rs_buf[0] = rsp->cmd; rs_buf_len++; rs_buf[1] = rsp->ccode; rs_buf_len++; memcpy (&(rs_buf[2]), rsp->data, rsp->datalength); rs_buf_len += rsp->datalength; if (fiid_obj_set_all (obj_cmd_rs, rs_buf, rs_buf_len) < 0) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_INTERNAL_ERROR); return (-1); } #else /* !defined(HAVE_SYS_STROPTS_H) */ /* otherwise, device is not supported */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED); return (-1); #endif /* !defined(HAVE_SYS_STROPTS_H) */ return (0); } int ipmi_sunbmc_cmd (ipmi_sunbmc_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_SUNBMC_CTX_MAGIC) { ERR_TRACE (ipmi_sunbmc_ctx_errormsg (ctx), ipmi_sunbmc_ctx_errnum (ctx)); return (-1); } if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_IO_NOT_INITIALIZED); return (-1); } if (ctx->putmsg_intf) { if (_sunbmc_write (ctx, lun, net_fn, obj_cmd_rq) < 0) return (-1); if (_sunbmc_read (ctx, obj_cmd_rs) < 0) return (-1); } else { #if defined(HAVE_SYS_STROPTS_H) struct strioctl istr; bmc_reqrsp_t reqrsp; uint8_t rq_buf_temp[IPMI_SUNBMC_BUFLEN]; uint8_t rq_buf[IPMI_SUNBMC_BUFLEN]; uint8_t rq_cmd; unsigned int rq_buf_len; uint8_t rs_buf[IPMI_SUNBMC_BUFLEN]; int len; memset (&istr, '\0', sizeof (struct strioctl)); memset (&reqrsp, '\0', sizeof (bmc_reqrsp_t)); /* Due to API differences, we need to extract the cmd out of the * request. */ if ((len = fiid_obj_get_all (obj_cmd_rq, rq_buf_temp, IPMI_SUNBMC_BUFLEN)) <= 0) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_INTERNAL_ERROR); return (-1); } rq_cmd = rq_buf_temp[0]; if (len > 1) { /* -1 b/c of cmd */ memcpy (rq_buf, &rq_buf_temp[1], len - 1); rq_buf_len = len - 1; } else rq_buf_len = 0; reqrsp.req.fn = net_fn; reqrsp.req.lun = lun; reqrsp.req.cmd = rq_cmd; istr.ic_cmd = IOCTL_IPMI_KCS_ACTION; istr.ic_timout = 0; /* spelled 'timout', not a typo */ istr.ic_len = sizeof (struct bmc_reqrsp); istr.ic_dp = (char *)&reqrsp; if (ioctl (ctx->device_fd, I_STR, &istr) < 0) { SUNBMC_ERRNO_TO_SUNBMC_ERRNUM (ctx, errno); return (-1); } rs_buf[0] = reqrsp.rsp.cmd; rs_buf[1] = reqrsp.rsp.ccode; /* -2 b/c of cmd and ccode */ #if 0 /* achu: to remove warnings, IPMI_SUNBMC_BUFLEN > amount uint8_t can hold */ if (reqrsp.rsp.datalength >= (IPMI_SUNBMC_BUFLEN - 2)) reqrsp.rsp.datalength = IPMI_SUNBMC_BUFLEN - 2; #endif /* remove header data stuff in front we don't care about */ if (reqrsp.rsp.datalength > 3) reqrsp.rsp.datalength -= 3; else reqrsp.rsp.datalength = 0; memcpy (rs_buf + 2, reqrsp.rsp.data, reqrsp.rsp.datalength); if (fiid_obj_set_all (obj_cmd_rs, rs_buf, reqrsp.rsp.datalength + 2) < 0) { SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_INTERNAL_ERROR); return (-1); } #else /* !defined(HAVE_SYS_STROPTS_H) */ /* otherwise, device is not supported */ SUNBMC_SET_ERRNUM (ctx, IPMI_SUNBMC_ERR_DEVICE_NOT_SUPPORTED); return (-1); #endif /* !defined(HAVE_SYS_STROPTS_H) */ } return (0); } freeipmi-1.6.4/libfreeipmi/driver/ipmi-ssif-driver.c0000644002055400205540000006360513527331636022414 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "ipmi-driver-trace.h" #include "ipmi-semaphores.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" /* function error codes */ #define IPMI_SSIF_SUCCESS 0x00 #define IPMI_SSIF_UNDEF_ERROR 0xFFFF #define IPMI_SSIF_UNKNOWN_INTERFACE 0x1000 #define IPMI_SSIF_ISA_MESSAGE_OVERFLOW 0x1100 #define IPMI_SSIF_BAD_ISA_STATE 0x1200 #define IPMI_SSIF_BMC_WRITE_STATE_FAIL 0x1300 #define IPMI_SSIF_BMC_READ_STATE_FAIL 0x1400 #define IPMI_SSIF_SMS_READY_TIMEOUT 0x1500 #define IPMI_SSIF_ERROR_READING_SMS 0x1600 #define IPMI_SSIF_PACKET_NUMBER_MISMATCH 0x1700 #define IPMI_SSIF_PACKET_SIZE_MISMATCH 0x1800 #define IPMI_SSIF_I2C_RETRY_ERROR 0x1900 #define IPMI_SSIF_SMS_SEND_ERROR_ON_FLUSH 0x2000 #define IPMI_SSIF_ISA_TIMEOUT_IN_IBF 0x2100 #define IPMI_SSIF_ISA_TIMEOUT_IN_OBF 0x2200 /* Response Packet Offsets */ #define IPMI_SSIF_RSP_OFFSET_COMPCODE 0x03 #define IPMI_SSIF_SINGLE_PART_WRITE_SMBUS_CMD 0x02 #define IPMI_SSIF_MULTI_PART_WRITE_START_SMBUS_CMD 0x06 #define IPMI_SSIF_MULTI_PART_WRITE_MIDDLE_SMBUS_CMD 0x07 #define IPMI_SSIF_MULTI_PART_WRITE_END_SMBUS_CMD 0x08 #define IPMI_SSIF_SINGLE_PART_READ_SMBUS_CMD 0x03 #define IPMI_SSIF_MULTI_PART_READ_START_SMBUS_CMD 0x03 #define IPMI_SSIF_MULTI_PART_READ_MIDDLE_SMBUS_CMD 0x09 #define IPMI_SSIF_MULTI_PART_READ_END_SMBUS_CMD 0x09 #define IPMI_SSIF_MULTI_PART_READ_RETRY_SMBUS_CMD 0x0A #define IPMI_SSIF_MULTI_PART_READ_START_SIZE 30 #define IPMI_SSIF_MULTI_PART_READ_START_PATTERN1 0x0 #define IPMI_SSIF_MULTI_PART_READ_START_PATTERN2 0x1 #define IPMI_SSIF_MULTI_PART_READ_END_PATTERN 0xFF /* START: copied from and , */ /* and prefixed IPMI. */ #define IPMI_I2C_SLAVE 0x0703 #define IPMI_I2C_SMBUS 0x0720 #define IPMI_I2C_SMBUS_BLOCK_DATA 5 #define IPMI_I2C_SMBUS_BLOCK_MAX 32 #define IPMI_I2C_SMBUS_READ 1 #define IPMI_I2C_SMBUS_WRITE 0 #define IPMI_SSIF_TIMEOUT 60 #define IPMI_SSIF_FLAGS_MASK IPMI_SSIF_FLAGS_NONBLOCKING #define IPMI_SSIF_CTX_MAGIC 0xaddaabba static char * ipmi_ssif_ctx_errmsg[] = { "success", "ssif context null", "ssif context invalid", "invalid parameter", "permission denied", "io not initialized", "buffer too small to hold result", "BMC busy", "out of memory", "device not found", "driver timeout", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL, }; struct ipmi_ssif_ctx { uint32_t magic; int errnum; char *driver_device; uint8_t driver_address; unsigned int flags; int device_fd; int io_init; int semid; }; static void _set_ssif_ctx_errnum_by_errno (ipmi_ssif_ctx_t ctx, int _errno) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) return; if (_errno == 0) ctx->errnum = IPMI_SSIF_ERR_SUCCESS; else if (_errno == EINTR) ctx->errnum = IPMI_SSIF_ERR_BUSY; else if (_errno == EAGAIN) ctx->errnum = IPMI_SSIF_ERR_BUSY; else if (_errno == EPERM) ctx->errnum = IPMI_SSIF_ERR_PERMISSION; else if (_errno == EACCES) ctx->errnum = IPMI_SSIF_ERR_PERMISSION; else if (_errno == ENOENT) ctx->errnum = IPMI_SSIF_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOTDIR) ctx->errnum = IPMI_SSIF_ERR_DEVICE_NOT_FOUND; else if (_errno == ENAMETOOLONG) ctx->errnum = IPMI_SSIF_ERR_DEVICE_NOT_FOUND; else if (_errno == ENOMEM) ctx->errnum = IPMI_SSIF_ERR_OUT_OF_MEMORY; else if (_errno == EINVAL) ctx->errnum = IPMI_SSIF_ERR_INTERNAL_ERROR; else if (_errno == ETIMEDOUT) ctx->errnum = IPMI_SSIF_ERR_DRIVER_TIMEOUT; else ctx->errnum = IPMI_SSIF_ERR_SYSTEM_ERROR; } static void _set_ssif_errnum_by_fiid_object (ipmi_ssif_ctx_t ctx, fiid_obj_t obj) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) return; if (!fiid_obj_valid (obj)) { SSIF_SET_ERRNUM (ctx, IPMI_ERR_INTERNAL_ERROR); return; } if (fiid_obj_errnum (obj) == FIID_ERR_SUCCESS) ctx->errnum = IPMI_SSIF_ERR_SUCCESS; else if (fiid_obj_errnum (obj) == FIID_ERR_OUT_OF_MEMORY) ctx->errnum = IPMI_SSIF_ERR_OUT_OF_MEMORY; else if (fiid_obj_errnum (obj) == FIID_ERR_DATA_NOT_AVAILABLE) ctx->errnum = IPMI_SSIF_ERR_SYSTEM_ERROR; else if (fiid_obj_errnum (obj) == FIID_ERR_NOT_IDENTICAL || fiid_obj_errnum (obj) == FIID_ERR_FIELD_NOT_FOUND) ctx->errnum = IPMI_SSIF_ERR_PARAMETERS; else ctx->errnum = IPMI_SSIF_ERR_INTERNAL_ERROR; } union ipmi_i2c_smbus_data { uint8_t byte; uint16_t word; uint8_t block[IPMI_I2C_SMBUS_BLOCK_MAX + 3]; }; struct ipmi_i2c_smbus_ioctl_data { uint8_t read_write; uint8_t command; uint32_t size; union ipmi_i2c_smbus_data *data; }; /* END: copied from and , */ /* and prefixed IPMI. */ static int _ipmi_i2c_smbus_access (ipmi_ssif_ctx_t ctx, int dev_fd, char read_write, uint8_t command, union ipmi_i2c_smbus_data *data) { struct ipmi_i2c_smbus_ioctl_data args; fd_set read_fds; struct timeval tv, tv_orig, start, end, delta; int n, rv; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); if (read_write == IPMI_I2C_SMBUS_READ) { FD_ZERO (&read_fds); FD_SET (dev_fd, &read_fds); tv.tv_sec = IPMI_SSIF_TIMEOUT; tv.tv_usec = 0; tv_orig.tv_sec = tv.tv_sec; tv_orig.tv_usec = tv.tv_usec; if (gettimeofday (&start, NULL) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); return (-1); } do { if ((n = select (dev_fd + 1, &read_fds, NULL, NULL, &tv)) < 0) { if (errno != EINTR) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); return (-1); } if (gettimeofday (&end, NULL) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); return (-1); } /* delta = end - start */ timersub (&end, &start, &delta); /* tv = tv_orig - delta */ timersub (&tv_orig, &delta, &tv); } } while (n < 0); if (!n) { /* Could be due to a different error, but we assume a timeout */ SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_DRIVER_TIMEOUT); return (-1); } } args.read_write = read_write; args.command = command; args.size = IPMI_I2C_SMBUS_BLOCK_DATA; args.data = data; if ((rv = ioctl (dev_fd, IPMI_I2C_SMBUS, &args)) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); return (-1); } return (rv); } static int _ipmi_ssif_single_part_write (ipmi_ssif_ctx_t ctx, int dev_fd, const uint8_t *buf, size_t buf_len) { union ipmi_i2c_smbus_data data; size_t i; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); data.block[0] = buf_len; for (i = 0; i < buf_len; i++) data.block[i + 1] = buf[i]; return (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_WRITE, IPMI_SSIF_SINGLE_PART_WRITE_SMBUS_CMD, &data)); } static int _ipmi_ssif_multi_part_write (ipmi_ssif_ctx_t ctx, int dev_fd, const uint8_t *buf, size_t buf_len) { union ipmi_i2c_smbus_data data; size_t i, middle_parts, mpart, index; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); if (buf_len % IPMI_I2C_SMBUS_BLOCK_MAX == 0) { #if 0 fprintf (stderr, "%s:%s(): " "PECULIAR IPMI COMMAND: As of this writing, " "there are no standard IPMI messages to the " "BMC that are exact multiples of %d. This " "command can be OEM/group network functions " "(network function codes 2Ch:3Fh) in your " "BMC implementation. Please report to " "FreeIPMI mailing list \n", __FILE__, __FUNCTION__, IPMI_I2C_SMBUS_BLOCK_MAX); #endif errno = EINVAL; return (-1); } middle_parts = (buf_len / IPMI_I2C_SMBUS_BLOCK_MAX) - 1; data.block[0] = IPMI_I2C_SMBUS_BLOCK_MAX; for (i = 0; i < IPMI_I2C_SMBUS_BLOCK_MAX; i++) data.block[i + 1] = buf[i]; if (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_WRITE, IPMI_SSIF_MULTI_PART_WRITE_START_SMBUS_CMD, &data) < 0) return (-1); for (mpart = 1; mpart <= middle_parts; mpart++) { index = mpart * IPMI_I2C_SMBUS_BLOCK_MAX; data.block[0] = IPMI_I2C_SMBUS_BLOCK_MAX; for (i = 0; i < IPMI_I2C_SMBUS_BLOCK_MAX; i++) data.block[i + 1] = buf[index + i]; if (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_WRITE, IPMI_SSIF_MULTI_PART_WRITE_MIDDLE_SMBUS_CMD, &data) < 0) return (-1); } index = (middle_parts + 1) * IPMI_I2C_SMBUS_BLOCK_MAX; data.block[0] = buf_len % IPMI_I2C_SMBUS_BLOCK_MAX; for (i = 0; i < data.block[0]; i++) data.block[i + 1] = buf[index + i]; return (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_WRITE, IPMI_SSIF_MULTI_PART_WRITE_END_SMBUS_CMD, &data)); } static int _ipmi_ssif_read (ipmi_ssif_ctx_t ctx, int dev_fd, uint8_t *buf, size_t buf_len) { union ipmi_i2c_smbus_data data; size_t bytes_read = 0; size_t bytes_copied = 0; size_t length = 0; unsigned int block_number = 0; unsigned int sindex = 0; unsigned int multi_read_start = 0; size_t i; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); assert (buf); assert (buf_len); if (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_READ, IPMI_SSIF_SINGLE_PART_READ_SMBUS_CMD, &data) < 0) return (-1); if (data.block[0] == IPMI_SSIF_MULTI_PART_READ_START_SIZE && data.block[1] == IPMI_SSIF_MULTI_PART_READ_START_PATTERN1 && data.block[2] == IPMI_SSIF_MULTI_PART_READ_START_PATTERN2) { sindex = 3; multi_read_start = 1; } else sindex = 1; length = data.block[0]; bytes_read = length; if (bytes_read > buf_len) length = buf_len; for (i = 0; i < length; i++) buf[i] = data.block[sindex + i]; bytes_copied = length; while (multi_read_start) { if (_ipmi_i2c_smbus_access (ctx, dev_fd, IPMI_I2C_SMBUS_READ, IPMI_SSIF_MULTI_PART_READ_MIDDLE_SMBUS_CMD, &data) < 0) return (-1); length = data.block[0]; block_number = data.block[1]; bytes_read += length; if ((bytes_copied + length) > buf_len) length = buf_len - bytes_copied; for (i = 0; i < length; i++) buf[bytes_copied + i] = data.block[i + 2]; bytes_copied += length; if (block_number == IPMI_SSIF_MULTI_PART_READ_END_PATTERN) break; } if (bytes_read > INT_MAX) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_OVERFLOW); return (-1); } return (bytes_read); } ipmi_ssif_ctx_t ipmi_ssif_ctx_create (void) { ipmi_ssif_ctx_t ctx = NULL; if (!(ctx = (ipmi_ssif_ctx_t)malloc (sizeof (struct ipmi_ssif_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_SSIF_CTX_MAGIC; ctx->driver_device = NULL; ctx->driver_address = IPMI_DEFAULT_SSIF_IPMB_ADDR; ctx->flags = IPMI_SSIF_FLAGS_DEFAULT; ctx->device_fd = -1; ctx->io_init = 0; ctx->semid = -1; if (!(ctx->driver_device = strdup (IPMI_DEFAULT_I2C_DEVICE))) { ERRNO_TRACE (errno); goto cleanup; } if ((ctx->semid = driver_mutex_init ()) < 0) { ERRNO_TRACE (errno); goto cleanup; } ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (ctx); cleanup: if (ctx) { free (ctx->driver_device); free (ctx); } return (NULL); } void ipmi_ssif_ctx_destroy (ipmi_ssif_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) return; ctx->magic = ~IPMI_SSIF_CTX_MAGIC; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; free (ctx->driver_device); /* ignore potential error, destroy path */ close (ctx->device_fd); free (ctx); } int ipmi_ssif_ctx_errnum (ipmi_ssif_ctx_t ctx) { if (!ctx) return (IPMI_SSIF_ERR_NULL); else if (ctx->magic != IPMI_SSIF_CTX_MAGIC) return (IPMI_SSIF_ERR_INVALID); else return (ctx->errnum); } char * ipmi_ssif_ctx_strerror (int errnum) { if (errnum >= IPMI_SSIF_ERR_SUCCESS && errnum <= IPMI_SSIF_ERR_ERRNUMRANGE) return (ipmi_ssif_ctx_errmsg[errnum]); else return (ipmi_ssif_ctx_errmsg[IPMI_SSIF_ERR_ERRNUMRANGE]); } char * ipmi_ssif_ctx_errormsg (ipmi_ssif_ctx_t ctx) { return (ipmi_ssif_ctx_strerror (ipmi_ssif_ctx_errnum (ctx))); } int ipmi_ssif_ctx_get_driver_device (ipmi_ssif_ctx_t ctx, char **driver_device) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!driver_device) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } *driver_device = ctx->driver_device; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_get_driver_address (ipmi_ssif_ctx_t ctx, uint8_t *driver_address) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!driver_address) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } *driver_address = ctx->driver_address; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_get_flags (ipmi_ssif_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!flags) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_set_driver_device (ipmi_ssif_ctx_t ctx, const char *driver_device) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!driver_device) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } free (ctx->driver_device); ctx->driver_device = NULL; if (!(ctx->driver_device = strdup (driver_device))) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_OUT_OF_MEMORY); return (-1); } ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_set_driver_address (ipmi_ssif_ctx_t ctx, uint8_t driver_address) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } ctx->driver_address = driver_address; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_set_flags (ipmi_ssif_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_SSIF_FLAGS_MASK) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); } int ipmi_ssif_ctx_io_init (ipmi_ssif_ctx_t ctx) { int flags; if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!ctx->driver_device) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } if (ctx->io_init) goto out; if ((ctx->device_fd = open (ctx->driver_device, O_RDWR)) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } flags = fcntl(ctx->device_fd, F_GETFD); if (flags < 0) { SSIF_SET_ERRNUM (ctx, errno); goto cleanup; } flags |= FD_CLOEXEC; if (fcntl(ctx->device_fd, F_SETFD, flags) < 0) { SSIF_SET_ERRNUM (ctx, errno); goto cleanup; } if (ioctl (ctx->device_fd, IPMI_I2C_SLAVE, ctx->driver_address) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } ctx->io_init = 1; out: ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, error path */ close (ctx->device_fd); ctx->device_fd = -1; return (-1); } int ipmi_ssif_write (ipmi_ssif_ctx_t ctx, const void *buf, unsigned int buf_len) { int count, lock_flag = 0; if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!buf || !buf_len) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_IO_NOT_INITIALIZED); return (-1); } if (!(ctx->flags & IPMI_SSIF_FLAGS_NONBLOCKING)) { if (driver_mutex_lock (ctx->semid) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } } else { if (driver_mutex_lock_interruptible (ctx->semid) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } } lock_flag++; if (buf_len <= IPMI_I2C_SMBUS_BLOCK_MAX) { if ((count = _ipmi_ssif_single_part_write (ctx, ctx->device_fd, buf, buf_len)) < 0) goto cleanup; } else { if ((count = _ipmi_ssif_multi_part_write (ctx, ctx->device_fd, buf, buf_len)) < 0) goto cleanup; } ctx->errnum = IPMI_SSIF_ERR_SUCCESS; return (count); cleanup: if (lock_flag) driver_mutex_unlock (ctx->semid); return (-1); } int ipmi_ssif_read (ipmi_ssif_ctx_t ctx, void *buf, unsigned int buf_len) { int count, rv = -1; if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); goto cleanup; } if (!buf || !buf_len) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); goto cleanup; } if (!ctx->io_init) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_IO_NOT_INITIALIZED); goto cleanup; } if (buf_len > IPMI_I2C_SMBUS_BLOCK_MAX) buf_len = IPMI_I2C_SMBUS_BLOCK_MAX; if ((count = _ipmi_ssif_read (ctx, ctx->device_fd, buf, buf_len)) < 0) goto cleanup; rv = count; ctx->errnum = IPMI_SSIF_ERR_SUCCESS; cleanup: if (ctx && ctx->magic == IPMI_SSIF_CTX_MAGIC) driver_mutex_unlock (ctx->semid); return (rv); } static int _ipmi_ssif_cmd_write (ipmi_ssif_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, rv = -1; fiid_obj_t obj_hdr = NULL; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); assert (IPMI_BMC_LUN_VALID (lun)); assert (IPMI_NET_FN_RQ_VALID (net_fn)); assert (fiid_obj_valid (obj_cmd_rq)); assert (fiid_obj_packet_valid (obj_cmd_rq) == 1); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } if ((cmd_len = fiid_obj_len_bytes (obj_cmd_rq)) < 0) { SSIF_FIID_OBJECT_ERROR_TO_SSIF_ERRNUM (ctx, obj_cmd_rq); goto cleanup; } if (!(obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = (uint8_t *)malloc (pkt_len))) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_OUT_OF_MEMORY); goto cleanup; } if (fill_hdr_ipmi_kcs (lun, net_fn, obj_hdr) < 0) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_INTERNAL_ERROR); goto cleanup; } if (assemble_ipmi_kcs_pkt (obj_hdr, obj_cmd_rq, pkt, pkt_len, IPMI_INTERFACE_FLAGS_DEFAULT) < 0) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_ssif_write (ctx, pkt, pkt_len) < 0) goto cleanup; rv = 0; cleanup: fiid_obj_destroy (obj_hdr); free (pkt); return (rv); } static int _ipmi_ssif_cmd_read (ipmi_ssif_ctx_t ctx, fiid_obj_t obj_cmd_rs) { uint8_t *pkt = NULL; unsigned int pkt_len; int hdr_len, cmd_len, read_len, ret, rv = -1; fiid_obj_t obj_hdr = NULL; fiid_field_t *tmpl = NULL; assert (ctx); assert (ctx->magic == IPMI_SSIF_CTX_MAGIC); assert (fiid_obj_valid (obj_cmd_rs)); if ((hdr_len = fiid_template_len_bytes (tmpl_hdr_kcs)) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } if (!(tmpl = fiid_obj_template (obj_cmd_rs))) { SSIF_FIID_OBJECT_ERROR_TO_SSIF_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if ((cmd_len = fiid_template_len_bytes (tmpl)) < 0) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_hdr = fiid_obj_create (tmpl_hdr_kcs))) { SSIF_ERRNO_TO_SSIF_ERRNUM (ctx, errno); goto cleanup; } pkt_len = hdr_len + cmd_len; if (!(pkt = (uint8_t *)malloc (pkt_len))) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_OUT_OF_MEMORY); goto cleanup; } if ((read_len = ipmi_ssif_read (ctx, pkt, pkt_len)) < 0) goto cleanup; if (!read_len) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_SYSTEM_ERROR); goto cleanup; } if ((ret = unassemble_ipmi_kcs_pkt (pkt, read_len, obj_hdr, obj_cmd_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_INTERNAL_ERROR); goto cleanup; } /* IPMI didn't return enough data back to you */ if (!ret) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_IPMI_ERROR); goto cleanup; } rv = 0; cleanup: fiid_template_free (tmpl); fiid_obj_destroy (obj_hdr); free (pkt); return (rv); } int ipmi_ssif_cmd (ipmi_ssif_ctx_t ctx, uint8_t lun, uint8_t net_fn, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { if (!ctx || ctx->magic != IPMI_SSIF_CTX_MAGIC) { ERR_TRACE (ipmi_ssif_ctx_errormsg (ctx), ipmi_ssif_ctx_errnum (ctx)); return (-1); } if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_RQ_VALID (net_fn) || !fiid_obj_valid (obj_cmd_rq) || !fiid_obj_valid (obj_cmd_rs) || fiid_obj_packet_valid (obj_cmd_rq) <= 0) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_PARAMETERS); return (-1); } if (!ctx->io_init) { SSIF_SET_ERRNUM (ctx, IPMI_SSIF_ERR_IO_NOT_INITIALIZED); return (-1); } if (_ipmi_ssif_cmd_write (ctx, lun, net_fn, obj_cmd_rq) < 0) return (-1); if (_ipmi_ssif_cmd_read (ctx, obj_cmd_rs) < 0) return (-1); return (0); } freeipmi-1.6.4/libfreeipmi/fiid/0000755002055400205540000000000013527342542016463 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/fiid/fiid.c0000644002055400205540000020361213527331636017550 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-bit-ops.h" #include "freeipmi-portability.h" #include "hash.h" #include "secure.h" #define FIID_OBJ_MAGIC 0xf00fd00d #define FIID_ITERATOR_MAGIC 0xd00df00f struct fiid_field_data { unsigned int max_field_len; char key[FIID_FIELD_MAX_KEY_LEN + 1]; unsigned int set_field_len; unsigned int flags; unsigned int index; /* for lookup */ unsigned int start; /* for lookup */ unsigned int end; /* for lookup */ }; struct fiid_obj { uint32_t magic; fiid_err_t errnum; uint8_t *data; unsigned int data_len; struct fiid_field_data *field_data; unsigned int field_data_len; hash_t lookup; int makes_packet_sufficient; /* flag for internal use */ int secure_memset_on_clear; /* flag for internal use */ }; struct fiid_iterator { uint32_t magic; fiid_err_t errnum; unsigned int current_index; unsigned int last_index; struct fiid_obj *obj; }; static char * fiid_errmsg[] = { "success", "fiid object null", "fiid object invalid", "fiid iterator null", "fiid iterator invalid", "invalid parameter", "invalid template specified", "field not found", "template key invalid", "template flags invalid", "template not byte aligned", "field not byte aligned", "block not byte aligned", "buffer too small to hold result", "template max field length mismatch", "template key mismatch", "template flags mismatch", "template length mismatch", "data not byte aligned", "required field missing", "fixed length field invalid", "data not available", "not identical", "out of memory", "internal error", "errnum out of range", }; #ifndef NDEBUG static int _fiid_template_check_valid_keys (fiid_template_t tmpl) { unsigned int i; assert (tmpl); for (i = 0; tmpl[i].max_field_len; i++) { unsigned int len; len = strlen (tmpl[i].key); if (!len || len > FIID_FIELD_MAX_KEY_LEN) return (-1); } return (0); } #endif /* NDEBUG */ static int _fiid_template_check_valid_flags (fiid_template_t tmpl) { unsigned int i; assert (tmpl); for (i = 0; tmpl[i].max_field_len; i++) { if (!FIID_FIELD_REQUIRED_FLAG_VALID (tmpl[i].flags) || !FIID_FIELD_LENGTH_FLAG_VALID (tmpl[i].flags)) return (-1); } return (0); } static int _fiid_template_len (fiid_template_t tmpl, unsigned int *tmpl_field_count) { unsigned int i, len = 0; assert (tmpl); assert (tmpl_field_count); for (i = 0; tmpl[i].max_field_len; i++) { if (tmpl[i].max_field_len > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } len += tmpl[i].max_field_len; /* check for integer overflow */ if (len < tmpl[i].max_field_len) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } } if (len > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } if (len % 8) { /* FIID_ERR_TEMPLATE_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } *tmpl_field_count = (i + 1); return (len); } static int _fiid_template_len_bytes (fiid_template_t tmpl, unsigned int *tmpl_field_count) { int len; assert (tmpl); assert (tmpl_field_count); if ((len = _fiid_template_len (tmpl, tmpl_field_count)) < 0) return (-1); return (BITS_ROUND_BYTES (len)); } int fiid_template_field_lookup (fiid_template_t tmpl, const char *field) { unsigned int i; if (!(tmpl && field)) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ for (i = 0; tmpl[i].max_field_len; i++) { if (!strcmp (tmpl[i].key, field)) return (1); } return (0); } int FIID_TEMPLATE_FIELD_LOOKUP (fiid_template_t tmpl, const char *field) { int ret; if ((ret = fiid_template_field_lookup (tmpl, field)) < 0) return (ret); if (!ret) { errno = EINVAL; return (-1); } return (ret); } int fiid_template_len (fiid_template_t tmpl) { unsigned int temp; int len = 0; if (!tmpl) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } if ((len = _fiid_template_len (tmpl, &temp)) < 0) return (-1); return (len); } int fiid_template_len_bytes (fiid_template_t tmpl) { int len; if (!tmpl) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } if ((len = fiid_template_len (tmpl)) < 0) return (-1); if (len % 8) { /* FIID_ERR_TEMPLATE_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } return (BITS_ROUND_BYTES (len)); } static int _fiid_template_field_start_end (fiid_template_t tmpl, const char *field, unsigned int *start, unsigned int *end) { unsigned int i = 0; unsigned int _start = 0; unsigned int _end = 0; assert (tmpl); assert (field); assert (start); assert (end); for (i = 0; tmpl[i].max_field_len; i++) { if (strcmp (tmpl[i].key, field) == 0) { if (tmpl[i].max_field_len > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } _end = _start + tmpl[i].max_field_len; /* check for integer overflow */ if (_end < tmpl[i].max_field_len) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } *start = _start; *end = _end; return (tmpl[i].max_field_len); } _start += tmpl[i].max_field_len; /* check for integer overflow */ if (_start < tmpl[i].max_field_len) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } } /* FIID_ERR_FIELD_NOT_FOUND */ errno = EINVAL; return (-1); } static int _fiid_template_field_start (fiid_template_t tmpl, const char *field) { unsigned int start = 0; unsigned int end = 0; assert (tmpl); assert (field); if (_fiid_template_field_start_end (tmpl, field, &start, &end) < 0) return (-1); if (start > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } return (start); } int fiid_template_field_start (fiid_template_t tmpl, const char *field) { if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ return (_fiid_template_field_start (tmpl, field)); } int fiid_template_field_start_bytes (fiid_template_t tmpl, const char *field) { int start = 0; if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ if ((start = _fiid_template_field_start (tmpl, field)) < 0) return (-1); if (start % 8) { /* FIID_ERR_FIELD_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } return (BITS_ROUND_BYTES (start)); } static int _fiid_template_field_end (fiid_template_t tmpl, const char *field) { unsigned int start = 0; unsigned int end = 0; assert (tmpl); assert (field); if (_fiid_template_field_start_end (tmpl, field, &start, &end) < 0) return (-1); if (end > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } return (end); } int fiid_template_field_end (fiid_template_t tmpl, const char *field) { if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ return (_fiid_template_field_end (tmpl, field)); } int fiid_template_field_end_bytes (fiid_template_t tmpl, const char *field) { int end = 0; if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ if ((end = _fiid_template_field_end (tmpl, field)) < 0) return (-1); if (end % 8) { /* FIID_ERR_FIELD_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } return (BITS_ROUND_BYTES (end)); } static int _fiid_template_field_len (fiid_template_t tmpl, const char *field) { unsigned int i; assert (tmpl); assert (field); for (i = 0; tmpl[i].max_field_len; i++) { if (!strcmp (tmpl[i].key, field)) { if (tmpl[i].max_field_len > INT_MAX) { /* FIID_ERR_OVERFLOW */ errno = EINVAL; return (-1); } return (tmpl[i].max_field_len); } } /* FIID_ERR_FIELD_NOT_FOUND */ errno = EINVAL; return (-1); } int fiid_template_field_len (fiid_template_t tmpl, const char *field) { if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ return (_fiid_template_field_len (tmpl, field)); } int fiid_template_field_len_bytes (fiid_template_t tmpl, const char *field) { int len; if (!tmpl || !field) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ if ((len = _fiid_template_field_len (tmpl, field)) < 0) return (-1); if (len % 8) { /* FIID_ERR_FIELD_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } return (BITS_ROUND_BYTES (len)); } static int _fiid_template_block_len (fiid_template_t tmpl, const char *field_start, const char *field_end) { int start; int end; assert (tmpl); assert (field_start); assert (field_end); if ((end = _fiid_template_field_end (tmpl, field_end)) < 0) return (-1); if ((start = _fiid_template_field_start (tmpl, field_start)) < 0) return (-1); if (start > end) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } return (end - start); } int fiid_template_block_len (fiid_template_t tmpl, const char *field_start, const char *field_end) { if (!tmpl || !field_start || !field_end) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ return (_fiid_template_block_len (tmpl, field_start, field_end)); } int fiid_template_block_len_bytes (fiid_template_t tmpl, const char *field_start, const char *field_end) { int len; if (!tmpl || !field_start || !field_end) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ if ((len = _fiid_template_block_len (tmpl, field_start, field_end)) < 0) return (-1); if (len % 8) { /* FIID_ERR_BLOCK_NOT_BYTE_ALIGNED */ errno = EINVAL; return (-1); } return (BITS_ROUND_BYTES (len)); } int fiid_template_compare (fiid_template_t tmpl1, fiid_template_t tmpl2) { unsigned int i; if (!tmpl1 || !tmpl2) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl1) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl2) < 0) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; return (-1); } #endif /* NDEBUG */ for (i = 0; tmpl1[i].max_field_len; i++) { if (tmpl1[i].max_field_len != tmpl2[i].max_field_len) return (0); if (strcmp (tmpl1[i].key, tmpl2[i].key)) return (0); if (tmpl1[i].flags != tmpl2[i].flags) return (0); } if (tmpl2[i].max_field_len) return (0); return (1); } int FIID_TEMPLATE_COMPARE (fiid_template_t tmpl1, fiid_template_t tmpl2) { int ret; if ((ret = fiid_template_compare (tmpl1, tmpl2)) < 0) return (ret); if (!ret) { errno = EINVAL; return (-1); } return (ret); } void fiid_template_free (fiid_field_t *tmpl_dynamic) { free (tmpl_dynamic); } static int _fiid_obj_field_start_end (fiid_obj_t obj, const char *field, unsigned int *start, unsigned int *end) { struct fiid_field_data *ffdptr; unsigned int i; assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field); assert (start); assert (end); if ((ffdptr = hash_find (obj->lookup, field))) { *start = ffdptr->start; *end = ffdptr->end; return (ffdptr->max_field_len); } /* integer overflow conditions checked during object creation */ for (i = 0; obj->field_data[i].max_field_len; i++) { if (!strcmp (obj->field_data[i].key, field)) { if (!hash_insert (obj->lookup, obj->field_data[i].key, &(obj->field_data[i]))) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } *start = obj->field_data[i].start; *end = obj->field_data[i].end; return (obj->field_data[i].max_field_len); } } obj->errnum = FIID_ERR_FIELD_NOT_FOUND; return (-1); } static int _fiid_obj_field_start (fiid_obj_t obj, const char *field) { unsigned int start = 0; unsigned int end = 0; /* excluded always */ assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field); if (_fiid_obj_field_start_end (obj, field, &start, &end) < 0) return (-1); return (start); } static int _fiid_obj_field_end (fiid_obj_t obj, const char *field) { unsigned int start = 0; unsigned int end = 0; /* excluded always */ assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field); if (_fiid_obj_field_start_end (obj, field, &start, &end) < 0) return (-1); return (end); } static int _fiid_obj_field_len (fiid_obj_t obj, const char *field) { struct fiid_field_data *ffdptr; unsigned int i; assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field); if ((ffdptr = hash_find (obj->lookup, field))) return (ffdptr->max_field_len); for (i = 0; obj->field_data[i].max_field_len; i++) { if (!strcmp (obj->field_data[i].key, field)) { if (!hash_insert (obj->lookup, obj->field_data[i].key, &(obj->field_data[i]))) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } return (obj->field_data[i].max_field_len); } } obj->errnum = FIID_ERR_FIELD_NOT_FOUND; return (-1); } char * fiid_strerror (fiid_err_t errnum) { if (errnum >= FIID_ERR_SUCCESS && errnum <= FIID_ERR_ERRNUMRANGE) return (fiid_errmsg[errnum]); else return (fiid_errmsg[FIID_ERR_ERRNUMRANGE]); } fiid_obj_t fiid_obj_create (fiid_template_t tmpl) { fiid_obj_t obj = NULL; unsigned int max_pkt_len = 0; unsigned int i; unsigned int start = 0; int data_len; if (!tmpl) { /* FIID_ERR_PARAMETERS */ errno = EINVAL; goto cleanup; } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { /* FIID_ERR_TEMPLATE_INVALID */ errno = EINVAL; goto cleanup; } #endif /* NDEBUG */ if (_fiid_template_check_valid_flags (tmpl) < 0) { /* FIID_ERR_TEMPLATE_INVALID */ errno = EINVAL; goto cleanup; } if (!(obj = (fiid_obj_t)malloc (sizeof (struct fiid_obj)))) { /* FIID_ERR_OUT_OF_MEMORY */ errno = ENOMEM; goto cleanup; } memset (obj, '\0', sizeof (struct fiid_obj)); obj->magic = FIID_OBJ_MAGIC; /* after call to _fiid_template_len_bytes, we know each field length * and total field length won't overflow an int. */ if ((data_len = _fiid_template_len_bytes (tmpl, &obj->field_data_len)) < 0) goto cleanup; obj->data_len = data_len; if (!obj->field_data_len) { /* FIID_ERR_TEMPLATE_INVALID */ errno = EINVAL; goto cleanup; } if (!(obj->data = malloc (obj->data_len))) { /* FIID_ERR_OUT_OF_MEMORY */ errno = ENOMEM; goto cleanup; } memset (obj->data, '\0', obj->data_len); if (!(obj->field_data = malloc (obj->field_data_len * sizeof (struct fiid_field_data)))) { /* FIID_ERR_OUT_OF_MEMORY */ errno = ENOMEM; goto cleanup; } memset (obj->field_data, '\0', obj->field_data_len * sizeof (struct fiid_field_data)); if (!(obj->lookup = hash_create (obj->field_data_len, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, NULL))) { errno = ENOMEM; goto cleanup; } for (i = 0; i < obj->field_data_len; i++) { #ifndef NDEBUG if (tmpl[i].max_field_len) { unsigned int j; for (j = 0; j < i; j++) { if (!strncmp (obj->field_data[j].key, tmpl[i].key, FIID_FIELD_MAX_KEY_LEN)) { /* FIID_ERR_TEMPLATE_INVALID */ errno = EINVAL; goto cleanup; } } } #endif /* !NDEBUG */ obj->field_data[i].max_field_len = tmpl[i].max_field_len; memset (obj->field_data[i].key, '\0', FIID_FIELD_MAX_KEY_LEN + 1); strncpy (obj->field_data[i].key, tmpl[i].key, FIID_FIELD_MAX_KEY_LEN); obj->field_data[i].set_field_len = 0; obj->field_data[i].flags = tmpl[i].flags; obj->field_data[i].index = i; obj->field_data[i].start = start; obj->field_data[i].end = start + obj->field_data[i].max_field_len; max_pkt_len += tmpl[i].max_field_len; if (obj->field_data[i].flags & FIID_FIELD_MAKES_PACKET_SUFFICIENT) obj->makes_packet_sufficient = 1; if (obj->field_data[i].flags & FIID_FIELD_SECURE_MEMSET_ON_CLEAR) obj->secure_memset_on_clear = 1; start += obj->field_data[i].max_field_len; } if (max_pkt_len % 8) { /* FIID_ERR_TEMPLATE_NOT_BYTE_ALIGNED */ errno = EINVAL; goto cleanup; } obj->errnum = FIID_ERR_SUCCESS; return (obj); cleanup: if (obj) { free (obj->data); free (obj->field_data); hash_destroy (obj->lookup); free (obj); } return (NULL); } void fiid_obj_destroy (fiid_obj_t obj) { if (!(obj && obj->magic == FIID_OBJ_MAGIC)) return; obj->magic = ~FIID_OBJ_MAGIC; obj->errnum = FIID_ERR_SUCCESS; free (obj->data); free (obj->field_data); hash_destroy (obj->lookup); free (obj); } fiid_obj_t fiid_obj_dup (fiid_obj_t src_obj) { fiid_obj_t dest_obj = NULL; if (!src_obj || src_obj->magic != FIID_OBJ_MAGIC) goto cleanup; if (!(dest_obj = malloc (sizeof (struct fiid_obj)))) { src_obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } memset (dest_obj, '\0', sizeof (struct fiid_obj)); dest_obj->magic = src_obj->magic; dest_obj->data_len = src_obj->data_len; dest_obj->field_data_len = src_obj->field_data_len; if (!(dest_obj->data = malloc (src_obj->data_len))) { src_obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } memcpy (dest_obj->data, src_obj->data, src_obj->data_len); if (!(dest_obj->field_data = malloc (dest_obj->field_data_len * sizeof (struct fiid_field_data)))) { src_obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } memcpy (dest_obj->field_data, src_obj->field_data, src_obj->field_data_len * sizeof (struct fiid_field_data)); if (!(dest_obj->lookup = hash_create (dest_obj->field_data_len, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, NULL))) { src_obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } src_obj->errnum = FIID_ERR_SUCCESS; dest_obj->errnum = FIID_ERR_SUCCESS; return (dest_obj); cleanup: if (dest_obj) { free (dest_obj->data); free (dest_obj->field_data); hash_destroy (dest_obj->lookup); free (dest_obj); } return (NULL); } fiid_obj_t fiid_obj_copy (fiid_obj_t src_obj, fiid_template_t alt_tmpl) { fiid_obj_t dest_obj = NULL; int data_len; unsigned int field_data_len = 0; uint8_t *databuf = NULL; if (!src_obj || src_obj->magic != FIID_OBJ_MAGIC) goto cleanup; if ((data_len = _fiid_template_len_bytes (alt_tmpl, &field_data_len)) < 0) goto cleanup; if (src_obj->data_len != data_len) { src_obj->errnum = FIID_ERR_PARAMETERS; goto cleanup; } if (!(dest_obj = fiid_obj_create (alt_tmpl))) goto cleanup; if (!(databuf = (uint8_t *)malloc (src_obj->data_len))) { src_obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } if ((data_len = fiid_obj_get_all (src_obj, databuf, src_obj->data_len)) < 0) goto cleanup; if (fiid_obj_set_all (dest_obj, databuf, data_len) < 0) { src_obj->errnum = dest_obj->errnum; goto cleanup; } free (databuf); return (dest_obj); cleanup: if (dest_obj) fiid_obj_destroy (dest_obj); free (databuf); return (NULL); } int fiid_obj_valid (fiid_obj_t obj) { if (!obj || obj->magic != FIID_OBJ_MAGIC) return (0); return (1); } static int _fiid_obj_packet_valid (fiid_obj_t obj, int makes_packet_sufficient_checks) { unsigned int total_set_bits_counter = 0, max_bits_counter = 0, set_bits_counter = 0, optional_bits_counter = 0; unsigned int i; assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (!makes_packet_sufficient_checks || obj->makes_packet_sufficient); for (i = 0; i < obj->field_data_len; i++) { unsigned int required_flag = FIID_FIELD_REQUIRED_FLAG (obj->field_data[i].flags); unsigned int length_flag = FIID_FIELD_LENGTH_FLAG (obj->field_data[i].flags); unsigned int max_field_len = obj->field_data[i].max_field_len; unsigned int set_field_len = obj->field_data[i].set_field_len; unsigned int makes_packet_sufficient_flag = obj->field_data[i].flags & FIID_FIELD_MAKES_PACKET_SUFFICIENT; if (makes_packet_sufficient_checks) { /* Each field w/ MAKES_PACKET_SUFFICIENT must have the field set. */ if (makes_packet_sufficient_flag) { if (!set_field_len) return (0); if (length_flag == FIID_FIELD_LENGTH_FIXED && max_field_len != set_field_len) return (0); } } else { if (required_flag == FIID_FIELD_REQUIRED && !set_field_len) { obj->errnum = FIID_ERR_REQUIRED_FIELD_MISSING; return (0); } if ((length_flag == FIID_FIELD_LENGTH_FIXED && max_field_len != set_field_len) && (required_flag == FIID_FIELD_REQUIRED || (required_flag == FIID_FIELD_OPTIONAL && set_field_len))) { obj->errnum = FIID_ERR_FIXED_LENGTH_FIELD_INVALID; return (0); } } max_bits_counter += max_field_len; total_set_bits_counter += set_field_len; if (set_field_len) { if (optional_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } if (set_field_len != max_field_len) { /* If there is an optional or variable length * field, it cannot have only partial data. */ if ((set_bits_counter + set_field_len) % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } } set_bits_counter += set_field_len; if (!(set_bits_counter % 8)) { set_bits_counter = 0; max_bits_counter = 0; } } else { /* All information must be collected in byte sized * chunks */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } /* Likewise, optional data should be aligned across * bytes */ optional_bits_counter += max_field_len; if (optional_bits_counter && !(optional_bits_counter % 8)) { /* an "assert" */ if (optional_bits_counter != max_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } optional_bits_counter = 0; max_bits_counter = 0; } } } /* There shouldn't be anything left over */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } /* And the bits set should align across a byte */ if (total_set_bits_counter % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (0); } obj->errnum = FIID_ERR_SUCCESS; return (1); } int fiid_obj_packet_valid (fiid_obj_t obj) { if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); return _fiid_obj_packet_valid (obj, 0); } int FIID_OBJ_PACKET_VALID (fiid_obj_t obj) { int ret; if ((ret = fiid_obj_packet_valid (obj)) < 0) return (ret); /* errnum set in fiid_obj_packet_valid() */ if (!ret) return (-1); return (ret); } int fiid_obj_packet_sufficient (fiid_obj_t obj) { int ret; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!obj->makes_packet_sufficient) return _fiid_obj_packet_valid (obj, 0); if (!(ret = _fiid_obj_packet_valid (obj, 0))) { fiid_err_t save_errnum = obj->errnum; if (_fiid_obj_packet_valid (obj, 1) == 1) return (1); obj->errnum = save_errnum; } return (ret); } int FIID_OBJ_PACKET_SUFFICIENT (fiid_obj_t obj) { int ret; if ((ret = fiid_obj_packet_sufficient (obj)) < 0) return (ret); /* errnum set in fiid_obj_packet_sufficient() */ if (!ret) return (-1); return (ret); } fiid_field_t * fiid_obj_template (fiid_obj_t obj) { fiid_field_t *tmpl; unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (NULL); if (!(tmpl = (fiid_field_t *)malloc (sizeof (fiid_field_t) * obj->field_data_len))) { obj->errnum = FIID_ERR_OUT_OF_MEMORY; return (NULL); } memset (tmpl, '\0', sizeof (fiid_field_t) * obj->field_data_len); for (i = 0; i < obj->field_data_len; i++) { tmpl[i].max_field_len = obj->field_data[i].max_field_len; /* not FIID_FIELD_MAX_KEY_LEN + 1, template does not have + 1 */ memcpy (tmpl[i].key, obj->field_data[i].key, FIID_FIELD_MAX_KEY_LEN); tmpl[i].flags = obj->field_data[i].flags; } obj->errnum = FIID_ERR_SUCCESS; return (tmpl); } int fiid_obj_template_compare (fiid_obj_t obj, fiid_template_t tmpl) { unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!tmpl) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } #ifndef NDEBUG if (_fiid_template_check_valid_keys (tmpl) < 0) { obj->errnum = FIID_ERR_TEMPLATE_INVALID; return (-1); } #endif /* NDEBUG */ for (i = 0; obj->field_data[i].max_field_len; i++) { if (obj->field_data[i].max_field_len != tmpl[i].max_field_len) { obj->errnum = FIID_ERR_MAX_FIELD_LEN_MISMATCH; return (0); } if (strcmp (obj->field_data[i].key, tmpl[i].key)) { obj->errnum = FIID_ERR_KEY_FIELD_MISMATCH; return (0); } if (obj->field_data[i].flags != tmpl[i].flags) { obj->errnum = FIID_ERR_FLAGS_FIELD_MISMATCH; return (0); } } if (tmpl[i].max_field_len) { obj->errnum = FIID_ERR_TEMPLATE_LENGTH_MISMATCH; return (0); } obj->errnum = FIID_ERR_SUCCESS; return (1); } int FIID_OBJ_TEMPLATE_COMPARE (fiid_obj_t obj, fiid_template_t tmpl) { int ret; if ((ret = fiid_obj_template_compare (obj, tmpl)) < 0) return (ret); if (!ret) { obj->errnum = FIID_ERR_NOT_IDENTICAL; return (-1); } return (ret); } fiid_err_t fiid_obj_errnum (fiid_obj_t obj) { if (!obj) return (FIID_ERR_OBJ_NULL); else if (obj->magic != FIID_OBJ_MAGIC) return (FIID_ERR_OBJ_INVALID); else return (obj->errnum); } char * fiid_obj_errormsg (fiid_obj_t obj) { return (fiid_strerror (fiid_obj_errnum (obj))); } static int _fiid_obj_lookup_field_index (fiid_obj_t obj, const char *field, unsigned int *index) { struct fiid_field_data *ffdptr; unsigned int i; assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field); assert (index); if ((ffdptr = hash_find (obj->lookup, field))) { (*index) = ffdptr->index; return (0); } for (i = 0; obj->field_data[i].max_field_len; i++) { if (!strcmp (obj->field_data[i].key, field)) { if (!hash_insert (obj->lookup, obj->field_data[i].key, &(obj->field_data[i]))) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } (*index) = obj->field_data[i].index; return (0); } } obj->errnum = FIID_ERR_FIELD_NOT_FOUND; return (-1); } int fiid_obj_len (fiid_obj_t obj) { unsigned int counter = 0; unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); /* integer overflow conditions checked during object creation */ for (i = 0; obj->field_data[i].max_field_len; i++) counter += obj->field_data[i].set_field_len; obj->errnum = FIID_ERR_SUCCESS; return (counter); } int fiid_obj_len_bytes (fiid_obj_t obj) { int len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if ((len = fiid_obj_len (obj)) < 0) return (-1); if (len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } obj->errnum = FIID_ERR_SUCCESS; return (BITS_ROUND_BYTES (len)); } int fiid_obj_field_len (fiid_obj_t obj, const char *field) { unsigned int key_index; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); obj->errnum = FIID_ERR_SUCCESS; return (obj->field_data[key_index].set_field_len); } int fiid_obj_field_len_bytes (fiid_obj_t obj, const char *field) { int len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if ((len = fiid_obj_field_len (obj, field)) < 0) return (-1); if (len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } obj->errnum = FIID_ERR_SUCCESS; return (BITS_ROUND_BYTES (len)); } int fiid_obj_block_len (fiid_obj_t obj, const char *field_start, const char *field_end) { unsigned int key_index_start, key_index_end; unsigned int counter = 0; unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field_start || !field_end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field_start, &key_index_start) < 0) return (-1); if (_fiid_obj_lookup_field_index (obj, field_end, &key_index_end) < 0) return (-1); if (key_index_start > key_index_end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } /* integer overflow conditions checked during object creation */ for (i = key_index_start; i <= key_index_end; i++) counter += obj->field_data[i].set_field_len; obj->errnum = FIID_ERR_SUCCESS; return (counter); } int fiid_obj_block_len_bytes (fiid_obj_t obj, const char *field_start, const char *field_end) { int len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field_start || !field_end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if ((len = fiid_obj_block_len (obj, field_start, field_end)) < 0) return (-1); if (len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } obj->errnum = FIID_ERR_SUCCESS; return (BITS_ROUND_BYTES (len)); } int fiid_obj_clear (fiid_obj_t obj) { unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (obj->secure_memset_on_clear) secure_memset (obj->data, '\0', obj->data_len); else memset (obj->data, '\0', obj->data_len); for (i =0; i < obj->field_data_len; i++) obj->field_data[i].set_field_len = 0; obj->errnum = FIID_ERR_SUCCESS; return (0); } int fiid_obj_clear_field (fiid_obj_t obj, const char *field) { unsigned int key_index; int bits_len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); if (!obj->field_data[key_index].set_field_len) return (0); if ((bits_len = _fiid_obj_field_len (obj, field)) < 0) return (-1); if (bits_len <= 64) { uint64_t val = 0; if (fiid_obj_set (obj, field, val) < 0) return (-1); } else { int field_start; unsigned int field_offset, bytes_len; /* achu: We assume the field must start on a byte boundary and end * on a byte boundary. */ if (bits_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } bytes_len = BITS_ROUND_BYTES (bits_len); if ((field_start = _fiid_obj_field_start (obj, field)) < 0) return (-1); if (field_start % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } field_offset = BITS_ROUND_BYTES (field_start); if (obj->field_data[key_index].flags & FIID_FIELD_SECURE_MEMSET_ON_CLEAR) secure_memset (obj->data + field_offset, '\0', bytes_len); else memset (obj->data + field_offset, '\0', bytes_len); } obj->field_data[key_index].set_field_len = 0; obj->errnum = FIID_ERR_SUCCESS; return (0); } int fiid_obj_field_lookup (fiid_obj_t obj, const char *field) { unsigned int start = 0; unsigned int end = 0; /* excluded always */ if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_field_start_end (obj, field, &start, &end) != -1) { obj->errnum = FIID_ERR_SUCCESS; return (1); } obj->errnum = FIID_ERR_FIELD_NOT_FOUND; return (0); } int FIID_OBJ_FIELD_LOOKUP (fiid_obj_t obj, const char *field) { int ret; if ((ret = fiid_obj_field_lookup (obj, field)) < 0) return (ret); if (!ret) { obj->errnum = FIID_ERR_FIELD_NOT_FOUND; return (-1); } return (ret); } int fiid_obj_set (fiid_obj_t obj, const char *field, uint64_t val) { unsigned int start_bit_pos = 0; unsigned int end_bit_pos = 0; /* excluded always */ int byte_pos = 0; int start_bit_in_byte_pos = 0; int end_bit_in_byte_pos = 0; int field_len = 0; int bytes_used = 0; unsigned int key_index; uint64_t merged_val = 0; uint8_t *temp_data = NULL; if (!obj || obj->magic != FIID_OBJ_MAGIC) goto cleanup; if (!field) { obj->errnum = FIID_ERR_PARAMETERS; goto cleanup; } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); if ((field_len = _fiid_obj_field_start_end (obj, field, &start_bit_pos, &end_bit_pos)) < 0) return (-1); if (field_len > 64) field_len = 64; byte_pos = start_bit_pos / 8; /* in byte_pos, start_bit_pos is */ start_bit_in_byte_pos = start_bit_pos - (byte_pos * 8); /* and it spans into... */ if (start_bit_in_byte_pos + field_len > 8) { int field_len_temp = field_len; if (start_bit_in_byte_pos) bytes_used++; field_len_temp -= start_bit_in_byte_pos; bytes_used += (field_len_temp / 8); field_len_temp -= (bytes_used * 8); if (field_len_temp) bytes_used++; } else { end_bit_in_byte_pos = start_bit_in_byte_pos + field_len; bytes_used++; } if (bytes_used > 1) { int start_val_pos = 0; int end_val_pos = 0; uint64_t extracted_val = 0; int field_len_left = field_len; unsigned int i; if (!(temp_data = malloc (obj->data_len))) { obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } memcpy (temp_data, obj->data, obj->data_len); for (i = 0; i < bytes_used; i++) { if (i == 0) { end_val_pos = 8 - start_bit_in_byte_pos; field_len_left -= end_val_pos; } else if (i != (bytes_used - 1)) { end_val_pos += 8; field_len_left -= 8; } else end_val_pos += field_len_left; if (i != (bytes_used - 1)) end_bit_in_byte_pos = 8; else end_bit_in_byte_pos = field_len_left; if (bits_extract (val, start_val_pos, end_val_pos, &extracted_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; goto cleanup; } if (bits_merge (temp_data[byte_pos + i], start_bit_in_byte_pos, end_bit_in_byte_pos, extracted_val, &merged_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; goto cleanup; } temp_data[byte_pos + i] = merged_val; start_bit_in_byte_pos = 0; start_val_pos = end_val_pos; } memcpy (obj->data, temp_data, obj->data_len); obj->field_data[key_index].set_field_len = field_len; } else { if (bits_merge (obj->data[byte_pos], start_bit_in_byte_pos, end_bit_in_byte_pos, val, &merged_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; goto cleanup; } obj->data[byte_pos] = merged_val; obj->field_data[key_index].set_field_len = field_len; } free (temp_data); obj->errnum = FIID_ERR_SUCCESS; return (0); cleanup: free (temp_data); return (-1); } int fiid_obj_get (fiid_obj_t obj, const char *field, uint64_t *val) { unsigned int start_bit_pos = 0; unsigned int end_bit_pos = 0; /* excluded always */ int byte_pos = 0; int start_bit_in_byte_pos = 0; int end_bit_in_byte_pos = 0; int field_len = 0; int bytes_used = 0; unsigned int key_index; uint64_t merged_val = 0; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field || !val) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); if (!obj->field_data[key_index].set_field_len) { obj->errnum = FIID_ERR_SUCCESS; return (0); } if ((field_len = _fiid_obj_field_start_end (obj, field, &start_bit_pos, &end_bit_pos)) < 0) return (-1); if (field_len > 64) field_len = 64; if (field_len > obj->field_data[key_index].set_field_len) field_len = obj->field_data[key_index].set_field_len; byte_pos = start_bit_pos / 8; /* in byte_pos, start_bit_pos is */ start_bit_in_byte_pos = start_bit_pos - (byte_pos * 8); /* and it spans into... */ if (start_bit_in_byte_pos + field_len > 8) { int field_len_temp = field_len; if (start_bit_in_byte_pos) bytes_used++; field_len_temp -= start_bit_in_byte_pos; bytes_used += (field_len_temp / 8); field_len_temp -= (bytes_used * 8); if (field_len_temp) bytes_used++; } else { end_bit_in_byte_pos = start_bit_in_byte_pos + field_len; bytes_used++; } if (bytes_used > 1) { int start_val_pos = 0; int end_val_pos = 0; uint64_t extracted_val = 0; uint64_t final_val = 0x0; int field_len_left = field_len; unsigned int i; for (i = 0; i < bytes_used; i++) { if (i == 0) { end_val_pos = 8 - start_bit_in_byte_pos; field_len_left -= end_val_pos; } else if (i != (bytes_used - 1)) { end_val_pos += 8; field_len_left -= 8; } else end_val_pos += field_len_left; if (i != (bytes_used - 1)) end_bit_in_byte_pos = 8; else end_bit_in_byte_pos = field_len_left; if (bits_extract (obj->data[byte_pos + i], start_bit_in_byte_pos, end_bit_in_byte_pos, &extracted_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } if (bits_merge (final_val, start_val_pos, end_val_pos, extracted_val, &merged_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } final_val = merged_val; start_bit_in_byte_pos = 0; start_val_pos = end_val_pos; } *val = 0; *val = final_val; } else { if (bits_extract (obj->data[byte_pos], start_bit_in_byte_pos, end_bit_in_byte_pos, &merged_val) < 0) { obj->errnum = FIID_ERR_INTERNAL_ERROR; return (-1); } *val = 0; *val = merged_val; } obj->errnum = FIID_ERR_SUCCESS; return (1); } int FIID_OBJ_GET (fiid_obj_t obj, const char *field, uint64_t *val) { uint64_t lval; int ret; if ((ret = fiid_obj_get (obj, field, &lval)) < 0) return (ret); if (!ret) { obj->errnum = FIID_ERR_DATA_NOT_AVAILABLE; return (-1); } *val = lval; return (ret); } int fiid_obj_set_data (fiid_obj_t obj, const char *field, const void *data, unsigned int data_len) { unsigned int field_offset, bytes_len, key_index; int bits_len, field_start; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field || !data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); /* achu: We assume the field must start on a byte boundary and end * on a byte boundary. */ if ((field_start = _fiid_obj_field_start (obj, field)) < 0) return (-1); if (field_start % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } if ((bits_len = _fiid_obj_field_len (obj, field)) < 0) return (-1); if (bits_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } bytes_len = BITS_ROUND_BYTES (bits_len); if (data_len > bytes_len) data_len = bytes_len; field_offset = BITS_ROUND_BYTES (field_start); memcpy ((obj->data + field_offset), data, data_len); obj->field_data[key_index].set_field_len = (data_len * 8); obj->errnum = FIID_ERR_SUCCESS; return (data_len); } int fiid_obj_get_data (fiid_obj_t obj, const char *field, void *data, unsigned int data_len) { unsigned int field_offset, bytes_len, key_index; int bits_len, field_start; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field || !data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field, &key_index) < 0) return (-1); if (!obj->field_data[key_index].set_field_len) return (0); /* achu: We assume the field must start on a byte boundary and end * on a byte boundary. */ if ((field_start = _fiid_obj_field_start (obj, field)) < 0) return (-1); if (field_start % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } if ((bits_len = _fiid_obj_field_len (obj, field)) < 0) return (-1); if (obj->field_data[key_index].set_field_len < bits_len) bits_len = obj->field_data[key_index].set_field_len; if (bits_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } bytes_len = BITS_ROUND_BYTES (bits_len); if (bytes_len > data_len) { obj->errnum = FIID_ERR_OVERFLOW; return (-1); } field_offset = BITS_ROUND_BYTES (field_start); memcpy (data, (obj->data + field_offset), bytes_len); obj->errnum = FIID_ERR_SUCCESS; return (bytes_len); } int fiid_obj_set_all (fiid_obj_t obj, const void *data, unsigned int data_len) { unsigned int bits_counter, data_bits_len; unsigned int key_index_end; unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (data_len > obj->data_len) data_len = obj->data_len; /* achu: Find index of last field */ data_bits_len = data_len * 8; if (data_len < obj->data_len) { /* integer overflow conditions checked during object creation */ bits_counter = 0; for (i = 0; obj->field_data[i].max_field_len; i++) { bits_counter += obj->field_data[i].max_field_len; if (bits_counter >= data_bits_len) { /* achu: We assume the data must end on a byte boundary. */ if (bits_counter % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } else break; } } key_index_end = i; } else key_index_end = (obj->field_data_len - 1); memcpy (obj->data, data, data_len); /* integer overflow conditions checked during object creation */ bits_counter = 0; for (i = 0; i < key_index_end; i++) { obj->field_data[i].set_field_len = obj->field_data[i].max_field_len; bits_counter += obj->field_data[i].set_field_len; } if (data_bits_len < bits_counter + obj->field_data[key_index_end].max_field_len) { int data_bits_left = data_bits_len - bits_counter; obj->field_data[i].set_field_len = data_bits_left; } else obj->field_data[i].set_field_len = obj->field_data[i].max_field_len; obj->errnum = FIID_ERR_SUCCESS; return (data_len); } int fiid_obj_get_all (fiid_obj_t obj, void *data, unsigned int data_len) { unsigned int bytes_len; int bits_len; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if ((bits_len = fiid_obj_len (obj)) < 0) return (-1); if (bits_len == (obj->data_len * 8)) bytes_len = obj->data_len; else bytes_len = BITS_ROUND_BYTES (bits_len); if (data_len < bytes_len) { obj->errnum = FIID_ERR_OVERFLOW; return (-1); } if (bytes_len == obj->data_len) memcpy (data, obj->data, bytes_len); else { unsigned int bytes_written = 0, max_bits_counter = 0, set_bits_counter = 0, optional_bits_counter = 0, data_index = 0, obj_data_index = 0; unsigned int i; /* integer overflow conditions checked during object creation */ for (i = 0; i < obj->field_data_len; i++) { unsigned int max_field_len = obj->field_data[i].max_field_len; unsigned int set_field_len = obj->field_data[i].set_field_len; max_bits_counter += max_field_len; if (set_field_len) { if (optional_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } if (set_field_len != max_field_len) { /* If there is an optional or variable length * field, it cannot have only partial data. */ if ((set_bits_counter + set_field_len) % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } } set_bits_counter += set_field_len; if (!(set_bits_counter % 8)) { unsigned int max_bytes_count = BITS_ROUND_BYTES (max_bits_counter); unsigned int set_bytes_count = BITS_ROUND_BYTES (set_bits_counter); memcpy (data + data_index, obj->data + obj_data_index, set_bytes_count); bytes_written += set_bytes_count; data_index += set_bytes_count; obj_data_index += max_bytes_count; set_bits_counter = 0; max_bits_counter = 0; } } else { /* All information must be collected in byte sized * chunks */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } /* Likewise, optional data should be aligned across * bytes */ optional_bits_counter += max_field_len; if (optional_bits_counter && !(optional_bits_counter % 8)) { /* an "assert" */ if (optional_bits_counter != max_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } obj_data_index += BITS_ROUND_BYTES (optional_bits_counter); optional_bits_counter = 0; max_bits_counter = 0; } } } /* There shouldn't be anything left over */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } if (bytes_written != bytes_len) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } } obj->errnum = FIID_ERR_SUCCESS; return (bytes_len); cleanup: return (-1); } static int _fiid_obj_max_block_len (fiid_obj_t obj, const char *field_start, const char *field_end) { int end; int start; assert (obj); assert (obj->magic == FIID_OBJ_MAGIC); assert (field_start); assert (field_end); if ((start = _fiid_obj_field_start (obj, field_start)) < 0) return (-1); if ((end = _fiid_obj_field_end (obj, field_end)) < 0) return (-1); if (start > end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } return (end - start); } int fiid_obj_set_block (fiid_obj_t obj, const char *field_start, const char *field_end, const void *data, unsigned int data_len) { int block_bits_start, block_bits_len; unsigned int key_index_start, key_index_end; unsigned int block_bytes_len, bits_counter, data_bits_len, field_offset; unsigned int i; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field_start || !field_end || !data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field_start, &key_index_start) < 0) return (-1); if (_fiid_obj_lookup_field_index (obj, field_end, &key_index_end) < 0) return (-1); if (key_index_start > key_index_end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } /* achu: We assume the field must start on a byte boundary and end * on a byte boundary. */ if ((block_bits_start = _fiid_obj_field_start (obj, field_start)) < 0) return (-1); if (block_bits_start % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } if ((block_bits_len = _fiid_obj_max_block_len (obj, field_start, field_end)) < 0) return (-1); if (block_bits_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } block_bytes_len = BITS_ROUND_BYTES (block_bits_len); if (data_len > block_bytes_len) data_len = block_bytes_len; /* achu: Potentially adjust index of last field */ /* integer overflow conditions checked during object creation */ data_bits_len = data_len * 8; if (data_len < block_bits_len) { bits_counter = 0; for (i = key_index_start; i <= key_index_end; i++) { bits_counter += obj->field_data[i].max_field_len; if (bits_counter >= data_bits_len) { /* achu: We assume the data must end on a byte boundary. */ if (bits_counter % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } else break; } } key_index_end = i; } field_offset = BITS_ROUND_BYTES (block_bits_start); memcpy ((obj->data + field_offset), data, data_len); /* integer overflow conditions checked during object creation */ bits_counter = 0; for (i = key_index_start; i < key_index_end; i++) { obj->field_data[i].set_field_len = obj->field_data[i].max_field_len; bits_counter += obj->field_data[i].set_field_len; } if (data_bits_len < bits_counter + obj->field_data[key_index_end].max_field_len) { int data_bits_left = data_bits_len - bits_counter; obj->field_data[i].set_field_len = data_bits_left; } else obj->field_data[i].set_field_len = obj->field_data[i].max_field_len; obj->errnum = FIID_ERR_SUCCESS; return (data_len); } int fiid_obj_get_block (fiid_obj_t obj, const char *field_start, const char *field_end, void *data, unsigned int data_len) { int block_bits_start, block_bits_max_len, block_bits_set_len; unsigned int block_bytes_max_len, block_bytes_set_len, field_offset; unsigned int key_index_start, key_index_end; if (!obj || obj->magic != FIID_OBJ_MAGIC) return (-1); if (!field_start || !field_end || !data) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } if (_fiid_obj_lookup_field_index (obj, field_start, &key_index_start) < 0) return (-1); if (_fiid_obj_lookup_field_index (obj, field_end, &key_index_end) < 0) return (-1); if (key_index_start > key_index_end) { obj->errnum = FIID_ERR_PARAMETERS; return (-1); } /* achu: We assume the field must start on a byte boundary and ends * on a byte boundary. */ if ((block_bits_start = _fiid_obj_field_start (obj, field_start)) < 0) return (-1); if (block_bits_start % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } if ((block_bits_max_len = _fiid_obj_max_block_len (obj, field_start, field_end)) < 0) return (-1); if (block_bits_max_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } if ((block_bits_set_len = fiid_obj_block_len (obj, field_start, field_end)) < 0) return (-1); if (block_bits_set_len % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; return (-1); } block_bytes_max_len = BITS_ROUND_BYTES (block_bits_max_len); block_bytes_set_len = BITS_ROUND_BYTES (block_bits_set_len); if (data_len < block_bytes_set_len) { obj->errnum = FIID_ERR_OVERFLOW; return (-1); } field_offset = BITS_ROUND_BYTES (block_bits_start); memset (data, '\0', data_len); if (block_bytes_set_len == block_bytes_max_len) memcpy (data, (obj->data + field_offset), block_bytes_set_len); else { unsigned int bytes_written = 0, max_bits_counter = 0, set_bits_counter = 0, optional_bits_counter = 0, data_index = 0, obj_data_index = field_offset; unsigned int i; /* integer overflow conditions checked during object creation */ for (i = key_index_start; i <= key_index_end; i++) { unsigned int max_field_len = obj->field_data[i].max_field_len; unsigned int set_field_len = obj->field_data[i].set_field_len; max_bits_counter += max_field_len; if (set_field_len) { if (optional_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } if (set_field_len != max_field_len) { /* If there is an optional or variable length * field, it cannot have only partial data. */ if ((set_bits_counter + set_field_len) % 8) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } } set_bits_counter += set_field_len; if (!(set_bits_counter % 8)) { unsigned int max_bytes_count = BITS_ROUND_BYTES (max_bits_counter); unsigned int set_bytes_count = BITS_ROUND_BYTES (set_bits_counter); memcpy (data + data_index, obj->data + obj_data_index, set_bytes_count); bytes_written += set_bytes_count; data_index += set_bytes_count; obj_data_index += max_bytes_count; set_bits_counter = 0; max_bits_counter = 0; } } else { /* All information must be collected in byte sized * chunks */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } /* Likewise, optional data should be aligned across * bytes */ optional_bits_counter += max_field_len; if (optional_bits_counter && !(optional_bits_counter % 8)) { /* an "assert" */ if (optional_bits_counter != max_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } obj_data_index += BITS_ROUND_BYTES (optional_bits_counter); optional_bits_counter = 0; max_bits_counter = 0; } } } /* There shouldn't be anything left over */ if (set_bits_counter) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } if (bytes_written != block_bytes_set_len) { obj->errnum = FIID_ERR_DATA_NOT_BYTE_ALIGNED; goto cleanup; } } obj->errnum = FIID_ERR_SUCCESS; return (block_bytes_set_len); cleanup: if (data) memset (data, '\0', data_len); return (-1); } fiid_iterator_t fiid_iterator_create (fiid_obj_t obj) { fiid_iterator_t iter = NULL; if (!obj || obj->magic != FIID_OBJ_MAGIC) goto cleanup; if (!(iter = (fiid_iterator_t)malloc (sizeof (struct fiid_iterator)))) { obj->errnum = FIID_ERR_OUT_OF_MEMORY; goto cleanup; } memset (iter, '\0', sizeof (struct fiid_iterator)); iter->magic = FIID_ITERATOR_MAGIC; iter->current_index = 0; /* The - 1 below is because field_data_len is length of the array. * The iterator is concerned about array indexes. */ iter->last_index = obj->field_data_len - 1; if (!(iter->obj = fiid_obj_dup (obj))) goto cleanup; obj->errnum = FIID_ERR_SUCCESS; return (iter); cleanup: if (iter) { if (iter->obj) fiid_obj_destroy (iter->obj); free (iter); } return (NULL); } void fiid_iterator_destroy (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return; iter->magic = ~FIID_ITERATOR_MAGIC; iter->errnum = FIID_ERR_SUCCESS; fiid_obj_destroy (iter->obj); free (iter); } fiid_err_t fiid_iterator_errnum (fiid_iterator_t iter) { if (!iter) return (FIID_ERR_ITERATOR_NULL); else if (iter->magic != FIID_ITERATOR_MAGIC) return (FIID_ERR_ITERATOR_INVALID); else return (iter->errnum); } char * fiid_iterator_errormsg (fiid_iterator_t iter) { return (fiid_strerror (fiid_iterator_errnum (iter))); } int fiid_iterator_reset (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); iter->current_index = 0; iter->errnum = FIID_ERR_SUCCESS; return (0); } int fiid_iterator_next (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); if (iter->current_index != iter->last_index) iter->current_index++; iter->errnum = FIID_ERR_SUCCESS; return (0); } int fiid_iterator_end (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); iter->errnum = FIID_ERR_SUCCESS; return ((iter->current_index == iter->last_index) ? 1 : 0); } int fiid_iterator_field_len (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); iter->errnum = FIID_ERR_SUCCESS; /* integer overflow conditions checked during object creation */ return (iter->obj->field_data[iter->current_index].set_field_len); } char * fiid_iterator_key (fiid_iterator_t iter) { if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (NULL); iter->errnum = FIID_ERR_SUCCESS; return (iter->obj->field_data[iter->current_index].key); } int fiid_iterator_get (fiid_iterator_t iter, uint64_t *val) { char *key; int rv; if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); key = iter->obj->field_data[iter->current_index].key; rv = fiid_obj_get (iter->obj, key, val); iter->errnum = (iter->obj->errnum); return (rv); } int fiid_iterator_get_data (fiid_iterator_t iter, void *data, unsigned int data_len) { char *key; int rv; if (!(iter && iter->magic == FIID_ITERATOR_MAGIC)) return (-1); key = iter->obj->field_data[iter->current_index].key; rv = fiid_obj_get_data (iter->obj, key, data, data_len); iter->errnum = (iter->obj->errnum); return (rv); } freeipmi-1.6.4/libfreeipmi/fru/0000755002055400205540000000000013527342542016344 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru.c0000644002055400205540000015245113527331636020252 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-fru.c,v 1.17 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/fru/ipmi-fru.h" #include "freeipmi/api/ipmi-fru-inventory-device-cmds-api.h" #include "freeipmi/cmds/ipmi-fru-inventory-device-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-fru-information-record-format.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-fru-language-codes-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-fru-common.h" #include "ipmi-fru-defs.h" #include "ipmi-fru-trace.h" #include "ipmi-fru-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" #define IPMI_FRU_COUNT_TO_READ_BLOCK_SIZE 16 static char *ipmi_fru_errmsgs[] = { "success", /* 0 */ "context null", /* 1 */ "context invalid", /* 2 */ "invalid parameters", /* 3 */ "device id not open", /* 4 */ "device id already open", /* 5 */ "no FRU information", /* 6 */ "FRU area length invalid", /* 7 */ "common header checksum invalid", /* 8 */ "chassis info area checksum invalid", /* 9 */ "board info area checksum invalid", /* 10 */ "product info area checksum invalid", /* 11 */ "multirecord area checksum invalid", /* 12 */ "common header format invalid", /* 13 */ "chassis info area format invalid", /* 14 */ "board info area format invalid", /* 15 */ "product info area format invalid", /* 16 */ "multirecord area format invalid", /* 17 */ "FRU information inconsistent", /* 18 */ "FRU language code not supported", /* 19 */ "FRU invalid BCD encoding", /* 20 */ "FRU sentinel value not found", /* 21 */ "not available for this record", /* 22 */ "buffer too small to hold result", /* 23 */ "out of memory", /* 24 */ "device busy", /* 25 */ "internal IPMI error", /* 26 */ "internal system error", /* 27 */ "internal error", /* 28 */ "errnum out of range", /* 29*/ NULL }; static void _init_fru_parsing_iterator_data (ipmi_fru_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); ctx->chassis_info_area_parsed = 0; ctx->board_info_area_parsed = 0; ctx->product_info_area_parsed = 0; ctx->multirecord_area_parsed = 0; ctx->multirecord_area_offset_in_bytes = 0; } static void _init_fru_parsing_data (ipmi_fru_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); ctx->fru_device_id = 0; ctx->fru_inventory_area_size = 0; ctx->chassis_info_area_starting_offset = 0; ctx->board_info_area_starting_offset = 0; ctx->product_info_area_starting_offset = 0; ctx->multirecord_area_starting_offset = 0; ctx->device_opened = 0; ctx->device_opened_with_buffer = 0; _init_fru_parsing_iterator_data (ctx); } ipmi_fru_ctx_t ipmi_fru_ctx_create (ipmi_ctx_t ipmi_ctx) { struct ipmi_fru_ctx *ctx = NULL; /* check that ipmi_ctx is open for use if supplied */ if (ipmi_ctx) { if (ipmi_ctx_get_target (ipmi_ctx, NULL, NULL) < 0) { SET_ERRNO (EINVAL); return (NULL); } } if (!(ctx = (ipmi_fru_ctx_t)malloc (sizeof (struct ipmi_fru_ctx)))) { ERRNO_TRACE (errno); return (NULL); } memset (ctx, '\0', sizeof (struct ipmi_fru_ctx)); ctx->magic = IPMI_FRU_CTX_MAGIC; ctx->flags = IPMI_FRU_FLAGS_DEFAULT; ctx->manufacturer_id = 0; ctx->product_id = 0; ctx->debug_prefix = NULL; ctx->ipmi_ctx = ipmi_ctx; _init_fru_parsing_data (ctx); return (ctx); } void ipmi_fru_ctx_destroy (ipmi_fru_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return; } free (ctx->debug_prefix); ctx->magic = ~IPMI_FRU_CTX_MAGIC; free (ctx); } int ipmi_fru_ctx_errnum (ipmi_fru_ctx_t ctx) { if (!ctx) return (IPMI_FRU_ERR_CONTEXT_NULL); else if (ctx->magic != IPMI_FRU_CTX_MAGIC) return (IPMI_FRU_ERR_CONTEXT_INVALID); else return (ctx->errnum); } char * ipmi_fru_ctx_strerror (int errnum) { if (errnum >= IPMI_FRU_ERR_SUCCESS && errnum <= IPMI_FRU_ERR_ERRNUMRANGE) return (ipmi_fru_errmsgs[errnum]); else return (ipmi_fru_errmsgs[IPMI_FRU_ERR_ERRNUMRANGE]); } char * ipmi_fru_ctx_errormsg (ipmi_fru_ctx_t ctx) { return (ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (ctx))); } int ipmi_fru_ctx_get_flags (ipmi_fru_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!flags) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_ctx_set_flags (ipmi_fru_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_FRU_FLAGS_MASK) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_ctx_get_manufacturer_id (ipmi_fru_ctx_t ctx, uint32_t *manufacturer_id) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!manufacturer_id) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } *manufacturer_id = ctx->manufacturer_id; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_ctx_set_manufacturer_id (ipmi_fru_ctx_t ctx, uint32_t manufacturer_id) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } ctx->manufacturer_id = manufacturer_id; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_ctx_get_product_id (ipmi_fru_ctx_t ctx, uint16_t *product_id) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!product_id) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } *product_id = ctx->product_id; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_ctx_set_product_id (ipmi_fru_ctx_t ctx, uint16_t product_id) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } ctx->product_id = product_id; ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } char * ipmi_fru_ctx_get_debug_prefix (ipmi_fru_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (NULL); } ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (ctx)->debug_prefix; } int ipmi_fru_ctx_set_debug_prefix (ipmi_fru_ctx_t ctx, const char *debug_prefix) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } free (ctx->debug_prefix); ctx->debug_prefix = NULL; if (debug_prefix) { if (!(ctx->debug_prefix = strdup (debug_prefix))) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OUT_OF_MEMORY); return (-1); } } ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } static int _read_fru_data (ipmi_fru_ctx_t ctx, void *frubuf, unsigned int frubuflen, unsigned int offset_in_bytes, unsigned int fru_read_bytes) { fiid_obj_t fru_read_data_rs = NULL; unsigned int num_bytes_read = 0; int len = 0; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (frubuf); assert (frubuflen); assert (fru_read_bytes <= frubuflen); if ((offset_in_bytes + fru_read_bytes) > ctx->fru_inventory_area_size) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); goto cleanup; } if (ctx->device_opened_with_buffer) { memcpy (frubuf, ctx->frudata + offset_in_bytes, fru_read_bytes); goto out; } if (!(fru_read_data_rs = fiid_obj_create (tmpl_cmd_read_fru_data_rs))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } while (num_bytes_read < fru_read_bytes) { uint8_t buf[IPMI_FRU_BUF_LEN]; uint8_t count_to_read; uint8_t count_returned; uint64_t val; if ((fru_read_bytes - num_bytes_read) < IPMI_FRU_COUNT_TO_READ_BLOCK_SIZE) count_to_read = fru_read_bytes - num_bytes_read; else count_to_read = IPMI_FRU_COUNT_TO_READ_BLOCK_SIZE; /* XXX: achu: Implement retry mechanism? - see spec on * completion code 0x81 */ if (ipmi_cmd_read_fru_data (ctx->ipmi_ctx, ctx->fru_device_id, offset_in_bytes + num_bytes_read, count_to_read, fru_read_data_rs) < 0) { /* if first time we've read from this device id, assume the * below completion codes mean that there is no data on this * device. */ if (!num_bytes_read && ((ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (fru_read_data_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1) || (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_MESSAGE_TIMEOUT && ipmi_check_completion_code (fru_read_data_rs, IPMI_COMP_CODE_COMMAND_TIMEOUT) == 1))) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_NO_FRU_INFORMATION); goto cleanup; } if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (fru_read_data_rs, IPMI_COMP_CODE_READ_FRU_DATA_FRU_DEVICE_BUSY) == 1) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_DEVICE_BUSY); goto cleanup; } FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); goto cleanup; } if (FIID_OBJ_GET (fru_read_data_rs, "count_returned", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_read_data_rs); goto cleanup; } count_returned = val; if (!count_returned) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); goto cleanup; } if ((len = fiid_obj_get_data (fru_read_data_rs, "requested_data", buf, IPMI_FRU_BUF_LEN)) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_read_data_rs); goto cleanup; } if (count_returned != len) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); goto cleanup; } memcpy (frubuf + num_bytes_read, buf, count_returned); num_bytes_read += count_returned; } out: rv = 0; cleanup: fiid_obj_destroy (fru_read_data_rs); return (rv); } static int _check_checksum (ipmi_fru_ctx_t ctx, uint8_t *frubuf, unsigned int length_in_bytes, uint8_t checksum_init) { assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (frubuf); assert (length_in_bytes); if (!(ctx->flags & IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS)) { uint8_t checksum = checksum_init; unsigned int i; for (i = 0; i < length_in_bytes; i++) checksum += frubuf[i]; if (checksum) return (0); } return (1); } static int _ipmi_fru_open_device_id_common (ipmi_fru_ctx_t ctx, uint8_t fru_device_id, const void *areabuf, unsigned int areabuflen) { uint8_t frubuf[IPMI_FRU_INVENTORY_AREA_SIZE_MAX+1]; fiid_obj_t fru_get_inventory_rs = NULL; fiid_obj_t fru_common_header = NULL; int common_header_len; uint8_t format_version; uint64_t val; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (fru_device_id != IPMI_FRU_DEVICE_ID_RESERVED || (areabuf && areabuflen)); if (!ctx->ipmi_ctx) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); return (-1); } if (ctx->device_opened) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_DEVICE_ID_ALREADY_OPEN); return (-1); } ctx->fru_device_id = fru_device_id; if (areabuf && areabuflen) { memcpy (ctx->frudata, areabuf, areabuflen > IPMI_FRU_AREA_SIZE_MAX ? IPMI_FRU_AREA_SIZE_MAX : areabuflen); ctx->fru_inventory_area_size = areabuflen; ctx->device_opened_with_buffer = 1; } else { if (!(fru_get_inventory_rs = fiid_obj_create (tmpl_cmd_get_fru_inventory_area_info_rs))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_get_fru_inventory_area_info (ctx->ipmi_ctx, ctx->fru_device_id, fru_get_inventory_rs) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { /* achu: Assume this completion code means we got a FRU SDR * entry pointed to a device that doesn't exist on this * particular mother board (b/c manufacturers may use the same * SDR for multiple motherboards). */ if (ipmi_check_completion_code (fru_get_inventory_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_NO_FRU_INFORMATION); goto cleanup; } } if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_MESSAGE_TIMEOUT) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_DEVICE_BUSY); goto cleanup; } FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); goto cleanup; } if (FIID_OBJ_GET (fru_get_inventory_rs, "fru_inventory_area_size", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_get_inventory_rs); goto cleanup; } ctx->fru_inventory_area_size = val; if (!ctx->fru_inventory_area_size) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_NO_FRU_INFORMATION); goto cleanup; } } if (!(ctx->flags & IPMI_FRU_FLAGS_READ_RAW)) { if ((common_header_len = fiid_template_len_bytes (tmpl_fru_common_header)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, 0, common_header_len) < 0) goto cleanup; if (fru_dump_hex (ctx, frubuf, common_header_len, "Common Header") < 0) goto cleanup; if ((ret = _check_checksum (ctx, frubuf, common_header_len, 0)) < 0) goto cleanup; if (!ret) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_COMMON_HEADER_CHECKSUM_INVALID); goto cleanup; } if (!(fru_common_header = fiid_obj_create (tmpl_fru_common_header))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (fru_common_header, frubuf, common_header_len) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } if (fru_dump_obj (ctx, fru_common_header, "Common Header") < 0) goto cleanup; if (FIID_OBJ_GET (fru_common_header, "format_version", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } format_version = val; if (FIID_OBJ_GET (fru_common_header, "chassis_info_area_starting_offset", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } ctx->chassis_info_area_starting_offset = val; if (FIID_OBJ_GET (fru_common_header, "board_info_area_starting_offset", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } ctx->board_info_area_starting_offset = val; if (FIID_OBJ_GET (fru_common_header, "product_info_area_starting_offset", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } ctx->product_info_area_starting_offset = val; if (FIID_OBJ_GET (fru_common_header, "multirecord_area_starting_offset", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_common_header); goto cleanup; } ctx->multirecord_area_starting_offset = val; /* Special corner case, found on Dell Poweredge R710 */ if (!ctx->chassis_info_area_starting_offset && !ctx->board_info_area_starting_offset && !ctx->product_info_area_starting_offset && !ctx->multirecord_area_starting_offset) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_NO_FRU_INFORMATION); goto cleanup; } if (format_version != IPMI_FRU_COMMON_HEADER_FORMAT_VERSION) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_COMMON_HEADER_FORMAT_INVALID); goto cleanup; } } rv = 0; ctx->device_opened = 1; ctx->errnum = IPMI_FRU_ERR_SUCCESS; cleanup: if (rv < 0) _init_fru_parsing_data (ctx); fiid_obj_destroy (fru_get_inventory_rs); fiid_obj_destroy (fru_common_header); return (rv); } int ipmi_fru_open_device_id (ipmi_fru_ctx_t ctx, uint8_t fru_device_id) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (fru_device_id == IPMI_FRU_DEVICE_ID_RESERVED) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } return (_ipmi_fru_open_device_id_common (ctx, fru_device_id, NULL, 0)); } int ipmi_fru_open_device_id_with_buffer (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } return (_ipmi_fru_open_device_id_common (ctx, 0, areabuf, areabuflen)); } int ipmi_fru_close_device_id (ipmi_fru_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!ctx->device_opened) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_DEVICE_ID_NOT_OPEN); return (-1); } _init_fru_parsing_data (ctx); ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } int ipmi_fru_first (ipmi_fru_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } _init_fru_parsing_iterator_data (ctx); ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (0); } static int _parse_multirecord_header (ipmi_fru_ctx_t ctx, unsigned int *__multirecord_header_length, unsigned int *record_type_id, unsigned int *record_format_version, unsigned int *end_of_list, unsigned int *record_length, unsigned int *record_checksum) { uint8_t frubuf[IPMI_FRU_INVENTORY_AREA_SIZE_MAX+1]; fiid_obj_t fru_multirecord_header = NULL; int multirecord_header_length; uint64_t val; int ret; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (record_type_id || record_format_version || end_of_list || record_length || record_checksum); if ((multirecord_header_length = fiid_template_len_bytes (tmpl_fru_multirecord_area_header)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (__multirecord_header_length) (*__multirecord_header_length) = multirecord_header_length; if ((ctx->multirecord_area_offset_in_bytes + multirecord_header_length) > ctx->fru_inventory_area_size) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); goto cleanup; } if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, ctx->multirecord_area_offset_in_bytes, multirecord_header_length) < 0) goto cleanup; if (fru_dump_hex (ctx, frubuf, multirecord_header_length, "MultiRecord Header") < 0) goto cleanup; if ((ret = _check_checksum (ctx, frubuf, multirecord_header_length, 0)) < 0) goto cleanup; if (!ret) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_MULTIRECORD_AREA_CHECKSUM_INVALID); goto cleanup; } if (!(fru_multirecord_header = fiid_obj_create (tmpl_fru_multirecord_area_header))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (fru_multirecord_header, frubuf, multirecord_header_length) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } if (fru_dump_obj (ctx, fru_multirecord_header, "MultiRecord Header") < 0) goto cleanup; if (record_type_id) { if (FIID_OBJ_GET (fru_multirecord_header, "record_type_id", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } (*record_type_id) = val; } if (record_format_version) { if (FIID_OBJ_GET (fru_multirecord_header, "record_format_version", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } (*record_format_version) = val; } if (end_of_list) { if (FIID_OBJ_GET (fru_multirecord_header, "end_of_list", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } (*end_of_list) = val; } if (record_length) { if (FIID_OBJ_GET (fru_multirecord_header, "record_length", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } (*record_length) = val; } if (record_checksum) { if (FIID_OBJ_GET (fru_multirecord_header, "record_checksum", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_multirecord_header); goto cleanup; } (*record_checksum) = val; } rv = 0; cleanup: fiid_obj_destroy (fru_multirecord_header); return (rv); } int ipmi_fru_next (ipmi_fru_ctx_t ctx) { int rv = 0; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) { ctx->chassis_info_area_parsed++; rv = 1; goto out; } if (ctx->board_info_area_starting_offset && !ctx->board_info_area_parsed) { ctx->board_info_area_parsed++; rv = 1; goto out; } if (ctx->product_info_area_starting_offset && !ctx->product_info_area_parsed) { ctx->product_info_area_parsed++; rv = 1; goto out; } if (ctx->multirecord_area_starting_offset && !ctx->multirecord_area_parsed) { unsigned int multirecord_header_length; unsigned int record_length; unsigned int end_of_list; /* Special case, user is iterator-ing and wants to skip the first multirecord_area */ if (!ctx->multirecord_area_offset_in_bytes) ctx->multirecord_area_offset_in_bytes = ctx->multirecord_area_starting_offset * 8; if (_parse_multirecord_header (ctx, &multirecord_header_length, NULL, NULL, &end_of_list, &record_length, NULL) < 0) return (-1); if (end_of_list) { /* achu: end_of_list means this is the last record, possibly * with FRU data, and there are no more *after* this record. * So we should return 1. */ ctx->multirecord_area_parsed++; } ctx->multirecord_area_offset_in_bytes += multirecord_header_length; /* if record_length is 0, that's ok still */ ctx->multirecord_area_offset_in_bytes += record_length; rv = 1; goto out; } out: ctx->errnum = IPMI_FRU_ERR_SUCCESS; return (rv); } static int _read_info_area_data (ipmi_fru_ctx_t ctx, unsigned int *area_type, unsigned int *area_length, void *areabuf, unsigned int areabuflen) { uint8_t frubuf[IPMI_FRU_INVENTORY_AREA_SIZE_MAX+1]; fiid_obj_t fru_info_area_header = NULL; int info_area_header_length; unsigned int info_area_length; unsigned int info_area_length_bytes; uint8_t expected_format_version; unsigned int err_code_format_invalid; unsigned int err_code_checksum_invalid; unsigned int info_area_starting_offset; char *headerhdrstr; char *areahdrstr; unsigned int info_area_type; unsigned int offset_in_bytes; uint8_t format_version; uint64_t val; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (area_type); assert (area_length); assert (areabuf); assert (areabuflen); assert ((ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) || (ctx->board_info_area_starting_offset && !ctx->board_info_area_parsed) || (ctx->product_info_area_starting_offset && !ctx->product_info_area_parsed)); if (ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) { expected_format_version = IPMI_FRU_CHASSIS_INFO_AREA_FORMAT_VERSION; err_code_format_invalid = IPMI_FRU_ERR_CHASSIS_INFO_AREA_FORMAT_INVALID; err_code_checksum_invalid = IPMI_FRU_ERR_CHASSIS_INFO_AREA_CHECKSUM_INVALID; info_area_starting_offset = ctx->chassis_info_area_starting_offset; headerhdrstr = "Chassis Info Header"; areahdrstr = "Chassis Info Area"; info_area_type = IPMI_FRU_AREA_TYPE_CHASSIS_INFO_AREA; } else if (ctx->board_info_area_starting_offset && !ctx->board_info_area_parsed) { expected_format_version = IPMI_FRU_BOARD_INFO_AREA_FORMAT_VERSION; err_code_format_invalid = IPMI_FRU_ERR_BOARD_INFO_AREA_FORMAT_INVALID; err_code_checksum_invalid = IPMI_FRU_ERR_BOARD_INFO_AREA_CHECKSUM_INVALID; info_area_starting_offset = ctx->board_info_area_starting_offset; headerhdrstr = "Board Info Header"; areahdrstr = "Board Info Area"; info_area_type = IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA; } else /* (ctx->product_info_area_starting_offset && !ctx->product_info_area_parsed) */ { expected_format_version = IPMI_FRU_PRODUCT_INFO_AREA_FORMAT_VERSION; err_code_format_invalid = IPMI_FRU_ERR_PRODUCT_INFO_AREA_FORMAT_INVALID; err_code_checksum_invalid = IPMI_FRU_ERR_PRODUCT_INFO_AREA_CHECKSUM_INVALID; info_area_starting_offset = ctx->product_info_area_starting_offset; headerhdrstr = "Product Info Header"; areahdrstr = "Product Info Area"; info_area_type = IPMI_FRU_AREA_TYPE_PRODUCT_INFO_AREA; } offset_in_bytes = info_area_starting_offset * 8; if ((info_area_header_length = fiid_template_len_bytes (tmpl_fru_info_area_header)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if ((offset_in_bytes + info_area_header_length) > ctx->fru_inventory_area_size) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); goto cleanup; } if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, offset_in_bytes, info_area_header_length) < 0) goto cleanup; if (!(fru_info_area_header = fiid_obj_create (tmpl_fru_info_area_header))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (fru_info_area_header, frubuf, info_area_header_length) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_info_area_header); goto cleanup; } if (fru_dump_obj (ctx, fru_info_area_header, headerhdrstr) < 0) goto cleanup; if (FIID_OBJ_GET (fru_info_area_header, "format_version", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_info_area_header); goto cleanup; } format_version = val; if (format_version != expected_format_version) { FRU_SET_ERRNUM (ctx, err_code_format_invalid); goto cleanup; } if (FIID_OBJ_GET (fru_info_area_header, "info_area_length", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, fru_info_area_header); goto cleanup; } info_area_length = val; info_area_length_bytes = info_area_length * 8; if (!info_area_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID); goto cleanup; } if (ctx->fru_inventory_area_size < (offset_in_bytes + info_area_length_bytes)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID); goto cleanup; } if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, info_area_starting_offset * 8, info_area_length_bytes) < 0) goto cleanup; if (fru_dump_hex (ctx, frubuf, info_area_length_bytes, areahdrstr) < 0) goto cleanup; if ((ret = _check_checksum (ctx, frubuf, info_area_length_bytes, 0)) < 0) goto cleanup; if (!ret) { FRU_SET_ERRNUM (ctx, err_code_checksum_invalid); goto cleanup; } if (areabuflen < info_area_length_bytes) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } if (info_area_header_length > info_area_length_bytes) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_INTERNAL_ERROR); goto cleanup; } (*area_type) = info_area_type; (*area_length) = (info_area_length_bytes - info_area_header_length); memcpy (areabuf, (frubuf + info_area_header_length), (*area_length)); rv = 0; cleanup: fiid_obj_destroy (fru_info_area_header); return (rv); } static int _read_multirecord_area_data (ipmi_fru_ctx_t ctx, unsigned int *area_type, unsigned int *area_length, void *areabuf, unsigned int areabuflen) { uint8_t frubuf[IPMI_FRU_INVENTORY_AREA_SIZE_MAX+1]; unsigned int multirecord_header_length = 0; unsigned int record_type_id = 0; unsigned int record_format_version = 0; unsigned int record_length = 0; unsigned int record_checksum = 0; int ret; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (area_type); assert (area_length); assert (areabuf); assert (areabuflen); assert (ctx->multirecord_area_starting_offset && !ctx->multirecord_area_parsed); if (!ctx->multirecord_area_offset_in_bytes) ctx->multirecord_area_offset_in_bytes = ctx->multirecord_area_starting_offset * 8; if (_parse_multirecord_header (ctx, &multirecord_header_length, &record_type_id, &record_format_version, NULL, &record_length, &record_checksum) < 0) goto cleanup; if (record_format_version != IPMI_FRU_MULTIRECORD_AREA_FORMAT_VERSION) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_MULTIRECORD_AREA_FORMAT_INVALID); goto cleanup; } if (!record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID); goto cleanup; } /* Note: Unlike Info Areas, record_length is in bytes */ if (ctx->fru_inventory_area_size < (ctx->multirecord_area_offset_in_bytes + multirecord_header_length + record_length)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID); goto cleanup; } if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, ctx->multirecord_area_offset_in_bytes + multirecord_header_length, record_length) < 0) goto cleanup; if (fru_dump_hex (ctx, frubuf, record_length, "MultiRecord") < 0) goto cleanup; if ((ret = _check_checksum (ctx, frubuf, record_length, record_checksum)) < 0) goto cleanup; if (!ret) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_MULTIRECORD_AREA_CHECKSUM_INVALID); goto cleanup; } if (areabuflen < record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } switch (record_type_id) { case IPMI_FRU_MULTIRECORD_AREA_TYPE_POWER_SUPPLY_INFORMATION: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_DC_OUTPUT: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_OUTPUT; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_DC_LOAD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_LOAD; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_MANAGEMENT_ACCESS_RECORD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_MANAGEMENT_ACCESS_RECORD; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_BASE_COMPATIBILITY_RECORD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_BASE_COMPATABILITY_RECORD; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_COMPATIBILITY_RECORD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_COMPATABILITY_RECORD; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_FIXED_SMBUS_DEVICE_RECORD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_FIXED_SMBUS_DEVICE_RECORD; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_LEGACY_DEVICE_ALERTS: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_LEGACY_DEVICE_ALERTS; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_ASF_REMOTE_CONTROL: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_ASF_REMOTE_CONTROL; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_DC_OUTPUT: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_OUTPUT; break; case IPMI_FRU_MULTIRECORD_AREA_TYPE_EXTENDED_DC_LOAD: (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_LOAD; break; default: if (IPMI_FRU_MULTIRECORD_AREA_TYPE_IS_NVM_EXPRESS (record_type_id)) (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_NVM_EXPRESS; else if (IPMI_FRU_MULTIRECORD_AREA_TYPE_IS_OEM (record_type_id)) (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_OEM; else (*area_type) = IPMI_FRU_AREA_TYPE_MULTIRECORD_UNKNOWN; } (*area_length) = record_length; memcpy (areabuf, frubuf, record_length); rv = 0; cleanup: return (rv); } static int _read_raw_data (ipmi_fru_ctx_t ctx, unsigned int *area_type, unsigned int *area_length, void *areabuf, unsigned int areabuflen) { uint8_t frubuf[IPMI_FRU_INVENTORY_AREA_SIZE_MAX+1]; unsigned int len = 0; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (area_type); assert (area_length); assert (areabuf); assert (areabuflen); assert (ctx->flags & IPMI_FRU_FLAGS_READ_RAW); if (areabuflen < ctx->fru_inventory_area_size) len = areabuflen; else len = ctx->fru_inventory_area_size; if (_read_fru_data (ctx, frubuf, IPMI_FRU_INVENTORY_AREA_SIZE_MAX, 0, len) < 0) goto cleanup; if (fru_dump_hex (ctx, frubuf, len, "Raw") < 0) goto cleanup; (*area_type) = IPMI_FRU_AREA_TYPE_RAW_DATA; (*area_length) = ctx->fru_inventory_area_size; memcpy (areabuf, frubuf, len); rv = 0; cleanup: return (rv); } int ipmi_fru_read_data_area (ipmi_fru_ctx_t ctx, unsigned int *area_type, unsigned int *area_length, void *areabuf, unsigned int areabuflen) { int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!ctx->ipmi_ctx) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); return (-1); } if (!area_type || !area_length || !areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if (!(ctx->flags & IPMI_FRU_FLAGS_READ_RAW)) { if ((ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) || (ctx->board_info_area_starting_offset && !ctx->board_info_area_parsed) || (ctx->product_info_area_starting_offset && !ctx->product_info_area_parsed)) { if (_read_info_area_data (ctx, area_type, area_length, areabuf, areabuflen) < 0) goto cleanup; goto out; } if (ctx->multirecord_area_starting_offset && !ctx->multirecord_area_parsed) { if (_read_multirecord_area_data (ctx, area_type, area_length, areabuf, areabuflen) < 0) goto cleanup; goto out; } } else { if (_read_raw_data (ctx, area_type, area_length, areabuf, areabuflen) < 0) goto cleanup; goto out; } out: rv = 0; cleanup: return (rv); } int ipmi_fru_read_multirecord_record_type_id (ipmi_fru_ctx_t ctx, uint8_t *record_type_id) { int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!ctx->ipmi_ctx) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_IPMI_ERROR); return (-1); } if (!record_type_id) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((ctx->chassis_info_area_starting_offset && !ctx->chassis_info_area_parsed) || (ctx->board_info_area_starting_offset && !ctx->board_info_area_parsed) || (ctx->product_info_area_starting_offset && !ctx->product_info_area_parsed)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_NOT_AVAILABLE_FOR_THIS_RECORD); goto cleanup; } if (ctx->multirecord_area_starting_offset && !ctx->multirecord_area_parsed) { unsigned int record_type_id_tmp; if (!ctx->multirecord_area_offset_in_bytes) ctx->multirecord_area_offset_in_bytes = ctx->multirecord_area_starting_offset * 8; if (_parse_multirecord_header (ctx, NULL, &record_type_id_tmp, NULL, NULL, NULL, NULL) < 0) goto cleanup; (*record_type_id) = record_type_id_tmp; goto out; } out: rv = 0; cleanup: return (rv); } static int _get_type_length_bytes (ipmi_fru_ctx_t ctx, const uint8_t *type_length_buf, unsigned int type_length_buflen, uint8_t type_code, uint8_t number_of_data_bytes, uint8_t *databuf, unsigned int databuflen) { unsigned int start_offset = 0; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (type_length_buf); assert (type_length_buflen); assert (databuf); assert (databuflen); if (!number_of_data_bytes) goto out; /* move past type_length field */ start_offset = 1; /* Special Case: This shouldn't be a length of 0x01 (see type/length * byte format in FRU Information Storage Definition). */ if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_LANGUAGE_CODE && number_of_data_bytes == 0x01) { #if 0 unsigned int bytes_offset = 0; /* I don't know what to do. I guess we'll just copy data until * we hit the sentinel value and pray for the best. */ while (bytes_offset < databuflen && (start_offset + bytes_offset) < type_length_buflen && databuf[start_offset] != IPMI_FRU_SENTINEL_VALUE) { databuf[bytes_offset] = type_length_buf[start_offset + bytes_offset]; bytes_offset++; } if (bytes_offset >= databuflen) { fprintf (stderr, " FRU Size too small\n"); goto cleanup; } if ((start_offset + bytes_offset) >= type_length_buflen) { fprintf (stderr, " FRU Missing Sentinel Value\n"); goto cleanup; } #endif FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); goto cleanup; } else { if (type_length_buflen < (start_offset + number_of_data_bytes)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); goto cleanup; } if (databuflen < number_of_data_bytes) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_INTERNAL_ERROR); goto cleanup; } memcpy (databuf, &type_length_buf[start_offset], number_of_data_bytes); } out: rv = 0; cleanup: return (rv); } static int _sixbitascii_to_ascii (ipmi_fru_ctx_t ctx, uint8_t *databuf, unsigned int databuf_bytes, char *typestr, unsigned int typestrlen, unsigned int *bytes_written) { int rv = -1; unsigned int i; uint32_t c = 0; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (databuf); assert (databuf_bytes); assert (typestr); assert (typestrlen); assert (bytes_written); /* six bit ascii packs 4 chars in 3 bytes - see FRU Information Storage Definition */ if (typestrlen < ((databuf_bytes/3 + 1))*4) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_INTERNAL_ERROR); goto cleanup; } /* six bit ascii "begins" at ' '. see FRU Information Storage Definition */ for (i = 0; i < databuf_bytes; i+=3) { typestr[c] = (databuf[i] & 0x3F) + ' '; c++; if (databuf_bytes > (i+1)) { typestr[c] = (((databuf[i+1] & 0x0F) << 2) | ((databuf[i] & 0xC0) >> 6)) + ' '; c++; } if (databuf_bytes > (i+2)) { typestr[c] = (((databuf[i+1] & 0xF0) >> 4) | ((databuf[i+2] & 0x03) << 4)) + ' '; typestr[c+1] = ((databuf[i+2] & 0xFC) >> 2) + ' '; c+=2; } } (*bytes_written) = c; rv = 0; cleanup: return (rv); } static int _bcd_to_ascii (ipmi_fru_ctx_t ctx, uint8_t *databuf, unsigned int databuf_bytes, char *typestr, unsigned int typestrlen, unsigned int *bytes_written) { int rv = -1; unsigned int i; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (databuf); assert (databuf_bytes); assert (typestr); assert (typestrlen); assert (bytes_written); if (typestrlen < databuf_bytes) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_INTERNAL_ERROR); goto cleanup; } for (i = 0; i < databuf_bytes; i++) { /* +1/-1 hackery to get around warnings */ if ((databuf[i] + 1) > IPMI_FRU_BCD_DIGIT_MIN && (databuf[i] - 1) < IPMI_FRU_BCD_DIGIT_MAX) typestr[i] = '0' + databuf[i]; else if (databuf[i] == IPMI_FRU_BCD_SPACE) typestr[i] = ' '; else if (databuf[i] == IPMI_FRU_BCD_DASH) typestr[i] = '-'; else if (databuf[i] == IPMI_FRU_BCD_PERIOD) typestr[i] = '.'; else { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INVALID_BCD_ENCODING); goto cleanup; } } (*bytes_written) = databuf_bytes; rv = 0; cleanup: return (rv); } int ipmi_fru_type_length_field_to_string (ipmi_fru_ctx_t ctx, const uint8_t *type_length_buf, unsigned int type_length_buflen, uint8_t language_code, char *strbuf, unsigned int *strbuflen) { uint8_t type_length; uint8_t databuf[IPMI_FRU_BUF_LEN]; char strtmpbuf[IPMI_FRU_AREA_STRING_MAX+1]; unsigned int strtmpbuflen = 0; uint8_t type_code; uint8_t number_of_data_bytes; int rv = -1; int ret; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!type_length_buf || !type_length_buflen || !strbuf || !strbuflen || !(*strbuflen)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } memset (strtmpbuf, '\0', IPMI_FRU_AREA_STRING_MAX+1); if (fru_dump_hex (ctx, type_length_buf, 1, "Type/Length Field Header") < 0) goto cleanup; type_length = type_length_buf[0]; type_code = (type_length & IPMI_FRU_TYPE_LENGTH_TYPE_CODE_MASK) >> IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SHIFT; number_of_data_bytes = type_length & IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK; if (!number_of_data_bytes) { memset (strbuf, '\0', (*strbuflen)); (*strbuflen) = 0; goto out; } if (_get_type_length_bytes (ctx, type_length_buf, type_length_buflen, type_code, number_of_data_bytes, databuf, IPMI_FRU_BUF_LEN) < 0) goto cleanup; if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_BINARY) { /* Ummm - it's binary or unspecified. I guess we'll output hex */ unsigned int i; /* must be atleast length of 1, b/c we check for number_of_data_bytes above */ ret = snprintf (strtmpbuf + strtmpbuflen, IPMI_FRU_AREA_STRING_MAX - strtmpbuflen, "%02Xh", databuf[0]); strtmpbuflen += ret; for (i = 1; i < number_of_data_bytes; i++) { ret = snprintf (strtmpbuf + strtmpbuflen, IPMI_FRU_AREA_STRING_MAX - strtmpbuflen, " %02Xh", databuf[i]); strtmpbuflen += ret; } } else if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_BCD) { if (_bcd_to_ascii (ctx, databuf, number_of_data_bytes, strtmpbuf, IPMI_FRU_AREA_STRING_MAX, &strtmpbuflen) < 0) goto cleanup; } else if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SIXBIT_ASCII) { if (_sixbitascii_to_ascii (ctx, databuf, number_of_data_bytes, strtmpbuf, IPMI_FRU_AREA_STRING_MAX, &strtmpbuflen) < 0) goto cleanup; } else { if (language_code != IPMI_FRU_LANGUAGE_CODE_ENGLISH_LEGACY && language_code != IPMI_FRU_LANGUAGE_CODE_ENGLISH) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_LANGUAGE_CODE_NOT_SUPPORTED); goto cleanup; } if (IPMI_FRU_AREA_STRING_MAX < (number_of_data_bytes + 1)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_INTERNAL_ERROR); goto cleanup; } memcpy (strtmpbuf, databuf, number_of_data_bytes); strtmpbuflen += number_of_data_bytes; } if ((*strbuflen) < (strtmpbuflen + 1)) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } memset (strbuf, '\0', (*strbuflen)); memcpy (strbuf, strtmpbuf, strtmpbuflen); (*strbuflen) = strtmpbuflen; out: rv = 0; cleanup: return (rv); } freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-common.c0000644002055400205540000001076613527331636021542 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-fru-parse-common.c,v 1.10 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/fru/ipmi-fru.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-fru-common.h" #include "ipmi-fru-defs.h" #include "ipmi-fru-trace.h" #include "ipmi-fru-util.h" #include "freeipmi-portability.h" #include "debug-util.h" int fru_dump_hex (ipmi_fru_ctx_t ctx, const void *frubuf, unsigned int length_in_bytes, const char *debug_hdr) { assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (frubuf); assert (length_in_bytes); assert (debug_hdr); if (ctx->flags & IPMI_FRU_FLAGS_DEBUG_DUMP) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, debug_hdr, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_hex (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, frubuf, length_in_bytes) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); return (-1); } } return (0); } int fru_dump_obj (ipmi_fru_ctx_t ctx, fiid_obj_t obj, const char *debug_hdr) { assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (obj); assert (debug_hdr); if (ctx->flags & IPMI_FRU_FLAGS_DEBUG_DUMP) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, debug_hdr, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_obj_dump (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, obj) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); return (-1); } } return (0); } freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-common.h0000644002055400205540000000465513527331636021547 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-fru-parse-common.h,v 1.8 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_COMMON_H #define IPMI_FRU_COMMON_H int fru_dump_hex (ipmi_fru_ctx_t ctx, const void *frubuf, unsigned int length_in_bytes, const char *debug_hdr); int fru_dump_obj (ipmi_fru_ctx_t ctx, fiid_obj_t obj, const char *debug_hdr); #endif /* IPMI_FRU_COMMON_H */ freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-data.c0000644002055400205540000017251513527331636021164 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-fru-data.c,v 1.14 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "freeipmi/fru/ipmi-fru.h" #include "freeipmi/api/ipmi-fru-inventory-device-cmds-api.h" #include "freeipmi/cmds/ipmi-fru-inventory-device-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-fru-information-record-format.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-fru-common.h" #include "ipmi-fru-defs.h" #include "ipmi-fru-trace.h" #include "ipmi-fru-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" static int _parse_type_length (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int current_area_offset, uint8_t *number_of_data_bytes, ipmi_fru_field_t *field) { const uint8_t *areabufptr = areabuf; uint8_t type_length; uint8_t type_code; assert (ctx); assert (ctx->magic == IPMI_FRU_CTX_MAGIC); assert (areabuf); assert (areabuflen); assert (number_of_data_bytes); type_length = areabufptr[current_area_offset]; /* IPMI Workaround * * Dell Poweredge R610 * * My reading of the FRU Spec is that all non-custom fields are * required to be listed by the vendor. However, on this * motherboard, some areas list this, indicating that there is * no more data to be parsed. So now, for "required" fields, I * check to see if the type-length field is a sentinel before * calling this function. */ assert (type_length != IPMI_FRU_SENTINEL_VALUE); type_code = (type_length & IPMI_FRU_TYPE_LENGTH_TYPE_CODE_MASK) >> IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SHIFT; (*number_of_data_bytes) = type_length & IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK; /* Special Case: This shouldn't be a length of 0x01 (see type/length * byte format in FRU Information Storage Definition). */ if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_LANGUAGE_CODE && (*number_of_data_bytes) == 0x01) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); return (-1); } if ((current_area_offset + 1 + (*number_of_data_bytes)) > areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT); return (-1); } if (field) { memcpy (field->type_length_field, &areabufptr[current_area_offset], 1 + (*number_of_data_bytes)); field->type_length_field_length = 1 + (*number_of_data_bytes); } return (0); } int ipmi_fru_chassis_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *chassis_type, ipmi_fru_field_t *chassis_part_number, ipmi_fru_field_t *chassis_serial_number, ipmi_fru_field_t *chassis_custom_fields, unsigned int chassis_custom_fields_len) { const uint8_t *areabufptr = areabuf; unsigned int area_offset = 0; unsigned int custom_fields_index = 0; uint8_t number_of_data_bytes; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if (chassis_part_number) memset (chassis_part_number, '\0', sizeof (ipmi_fru_field_t)); if (chassis_serial_number) memset (chassis_serial_number, '\0', sizeof (ipmi_fru_field_t)); if (chassis_custom_fields && chassis_custom_fields_len) memset (chassis_custom_fields, '\0', sizeof (ipmi_fru_field_t) * chassis_custom_fields_len); if (chassis_type) (*chassis_type) = areabufptr[area_offset]; area_offset++; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, chassis_part_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, chassis_serial_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; while (area_offset < areabuflen && areabufptr[area_offset] != IPMI_FRU_SENTINEL_VALUE) { ipmi_fru_field_t *field_ptr = NULL; if (chassis_custom_fields && chassis_custom_fields_len) { if (custom_fields_index < chassis_custom_fields_len) field_ptr = &chassis_custom_fields[custom_fields_index]; else { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } } if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, field_ptr) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; custom_fields_index++; } #if 0 if (area_offset > areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_SENTINEL_VALUE_NOT_FOUND); goto cleanup; } #endif out: rv = 0; cleanup: return (rv); } int ipmi_fru_board_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *language_code, uint32_t *mfg_date_time, ipmi_fru_field_t *board_manufacturer, ipmi_fru_field_t *board_product_name, ipmi_fru_field_t *board_serial_number, ipmi_fru_field_t *board_part_number, ipmi_fru_field_t *board_fru_file_id, ipmi_fru_field_t *board_custom_fields, unsigned int board_custom_fields_len) { const uint8_t *areabufptr = areabuf; uint32_t mfg_date_time_tmp = 0; unsigned int area_offset = 0; unsigned int custom_fields_index = 0; uint8_t number_of_data_bytes; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if (board_manufacturer) memset (board_manufacturer, '\0', sizeof (ipmi_fru_field_t)); if (board_product_name) memset (board_product_name, '\0', sizeof (ipmi_fru_field_t)); if (board_serial_number) memset (board_serial_number, '\0', sizeof (ipmi_fru_field_t)); if (board_part_number) memset (board_part_number, '\0', sizeof (ipmi_fru_field_t)); if (board_fru_file_id) memset (board_fru_file_id, '\0', sizeof (ipmi_fru_field_t)); if (board_custom_fields && board_custom_fields_len) memset (board_custom_fields, '\0', sizeof (ipmi_fru_field_t) * board_custom_fields_len); if (language_code) (*language_code) = areabufptr[area_offset]; area_offset++; if (mfg_date_time) { struct tm tm; time_t t; /* mfg_date_time is little endian - see spec */ mfg_date_time_tmp |= areabufptr[area_offset]; area_offset++; mfg_date_time_tmp |= (areabufptr[area_offset] << 8); area_offset++; mfg_date_time_tmp |= (areabufptr[area_offset] << 16); area_offset++; /* mfg_date_time is in minutes, so multiple by 60 to get seconds */ mfg_date_time_tmp *= 60; /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof(struct tm)); /* In FRU, epoch is 0:00 hrs 1/1/96 * * So convert into ansi epoch */ tm.tm_year = 96; /* years since 1900 */ tm.tm_mon = 0; /* months since January */ tm.tm_mday = 1; /* 1-31 */ tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_SYSTEM_ERROR); goto cleanup; } mfg_date_time_tmp += (uint32_t)t; (*mfg_date_time) = mfg_date_time_tmp; } else area_offset += 3; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, board_manufacturer) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, board_product_name) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, board_serial_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, board_part_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, board_fru_file_id) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; while (area_offset < areabuflen && areabufptr[area_offset] != IPMI_FRU_SENTINEL_VALUE) { ipmi_fru_field_t *field_ptr = NULL; if (board_custom_fields && board_custom_fields_len) { if (custom_fields_index < board_custom_fields_len) field_ptr = &board_custom_fields[custom_fields_index]; else { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } } if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, field_ptr) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; custom_fields_index++; } #if 0 if (area_offset > areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_SENTINEL_VALUE_NOT_FOUND); goto cleanup; } #endif out: rv = 0; cleanup: return (rv); } int ipmi_fru_product_info_area (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *language_code, ipmi_fru_field_t *product_manufacturer_name, ipmi_fru_field_t *product_name, ipmi_fru_field_t *product_part_model_number, ipmi_fru_field_t *product_version, ipmi_fru_field_t *product_serial_number, ipmi_fru_field_t *product_asset_tag, ipmi_fru_field_t *product_fru_file_id, ipmi_fru_field_t *product_custom_fields, unsigned int product_custom_fields_len) { const uint8_t *areabufptr = areabuf; unsigned int area_offset = 0; unsigned int custom_fields_index = 0; uint8_t number_of_data_bytes; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if (product_manufacturer_name) memset (product_manufacturer_name, '\0', sizeof (ipmi_fru_field_t)); if (product_name) memset (product_name, '\0', sizeof (ipmi_fru_field_t)); if (product_part_model_number) memset (product_part_model_number, '\0', sizeof (ipmi_fru_field_t)); if (product_version) memset (product_version, '\0', sizeof (ipmi_fru_field_t)); if (product_serial_number) memset (product_serial_number, '\0', sizeof (ipmi_fru_field_t)); if (product_asset_tag) memset (product_asset_tag, '\0', sizeof (ipmi_fru_field_t)); if (product_fru_file_id) memset (product_fru_file_id, '\0', sizeof (ipmi_fru_field_t)); if (product_custom_fields && product_custom_fields_len) memset (product_custom_fields, '\0', sizeof (ipmi_fru_field_t) * product_custom_fields_len); if (language_code) (*language_code) = areabufptr[area_offset]; area_offset++; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_manufacturer_name) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_name) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_part_model_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_version) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_serial_number) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_asset_tag) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; if (areabufptr[area_offset] == IPMI_FRU_SENTINEL_VALUE) goto out; if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, product_fru_file_id) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; while (area_offset < areabuflen && areabufptr[area_offset] != IPMI_FRU_SENTINEL_VALUE) { ipmi_fru_field_t *field_ptr = NULL; if (product_custom_fields && product_custom_fields_len) { if (custom_fields_index < product_custom_fields_len) field_ptr = &product_custom_fields[custom_fields_index]; else { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_OVERFLOW); goto cleanup; } } if (_parse_type_length (ctx, areabufptr, areabuflen, area_offset, &number_of_data_bytes, field_ptr) < 0) goto cleanup; area_offset += 1; /* type/length byte */ area_offset += number_of_data_bytes; custom_fields_index++; } #if 0 if (area_offset > areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_FRU_SENTINEL_VALUE_NOT_FOUND); goto cleanup; } #endif out: rv = 0; cleanup: return (rv); } int ipmi_fru_multirecord_power_supply_information (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *overall_capacity, unsigned int *peak_va, unsigned int *inrush_current, unsigned int *inrush_interval, int *low_end_input_voltage_range_1, int *high_end_input_voltage_range_1, int *low_end_input_voltage_range_2, int *high_end_input_voltage_range_2, unsigned int *low_end_input_frequency_range, unsigned int *high_end_input_frequency_range, unsigned int *ac_dropout_tolerance, unsigned int *predictive_fail_support, unsigned int *power_factor_correction, unsigned int *autoswitch, unsigned int *hot_swap_support, unsigned int *tachometer_pulses_per_rotation_predictive_fail_polarity, unsigned int *peak_capacity, unsigned int *hold_up_time, unsigned int *voltage_1, unsigned int *voltage_2, unsigned int *total_combined_wattage, unsigned int *predictive_fail_tachometer_lower_threshold) { fiid_obj_t obj_record = NULL; int tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((tmpl_record_length = fiid_template_len_bytes (tmpl_fru_power_supply_information)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (tmpl_record_length != areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_power_supply_information))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Power Supply Information") < 0) goto cleanup; if (overall_capacity) { if (FIID_OBJ_GET (obj_record, "overall_capacity", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*overall_capacity) = val; } if (peak_va) { if (FIID_OBJ_GET (obj_record, "peak_va", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*peak_va) = val; } if (inrush_current) { if (FIID_OBJ_GET (obj_record, "inrush_current", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*inrush_current) = val; } if (inrush_interval) { if (FIID_OBJ_GET (obj_record, "inrush_interval", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*inrush_interval) = val; } if (low_end_input_voltage_range_1) { if (FIID_OBJ_GET (obj_record, "low_end_input_voltage_range_1", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*low_end_input_voltage_range_1) = ((int16_t)val * 10); } if (high_end_input_voltage_range_1) { if (FIID_OBJ_GET (obj_record, "high_end_input_voltage_range_1", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*high_end_input_voltage_range_1) = ((int16_t)val * 10); } if (low_end_input_voltage_range_2) { if (FIID_OBJ_GET (obj_record, "low_end_input_voltage_range_2", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*low_end_input_voltage_range_2) = ((int16_t)val * 10); } if (high_end_input_voltage_range_2) { if (FIID_OBJ_GET (obj_record, "high_end_input_voltage_range_2", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*high_end_input_voltage_range_2) = ((int16_t)val * 10); } if (low_end_input_frequency_range) { if (FIID_OBJ_GET (obj_record, "low_end_input_frequency_range", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*low_end_input_frequency_range) = val; } if (high_end_input_frequency_range) { if (FIID_OBJ_GET (obj_record, "high_end_input_frequency_range", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*high_end_input_frequency_range) = val; } if (ac_dropout_tolerance) { if (FIID_OBJ_GET (obj_record, "ac_dropout_tolerance", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*ac_dropout_tolerance) = val; } if (predictive_fail_support) { if (FIID_OBJ_GET (obj_record, "predictive_fail_support", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*predictive_fail_support) = val; } if (power_factor_correction) { if (FIID_OBJ_GET (obj_record, "power_factor_correction", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*power_factor_correction) = val; } if (autoswitch) { if (FIID_OBJ_GET (obj_record, "autoswitch", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*autoswitch) = val; } if (hot_swap_support) { if (FIID_OBJ_GET (obj_record, "hot_swap_support", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*hot_swap_support) = val; } if (tachometer_pulses_per_rotation_predictive_fail_polarity) { if (FIID_OBJ_GET (obj_record, "tachometer_pulses_per_rotation_predictive_fail_polarity", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*tachometer_pulses_per_rotation_predictive_fail_polarity) = val; } if (peak_capacity) { if (FIID_OBJ_GET (obj_record, "peak_capacity", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*peak_capacity) = val; } if (hold_up_time) { if (FIID_OBJ_GET (obj_record, "hold_up_time", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*hold_up_time) = val; } if (voltage_1) { if (FIID_OBJ_GET (obj_record, "voltage_1", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*voltage_1) = val; } if (voltage_2) { if (FIID_OBJ_GET (obj_record, "voltage_2", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*voltage_2) = val; } if (total_combined_wattage) { if (FIID_OBJ_GET (obj_record, "total_combined_wattage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*total_combined_wattage) = val; } if (predictive_fail_tachometer_lower_threshold) { if (FIID_OBJ_GET (obj_record, "predictive_fail_tachometer_lower_threshold", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*predictive_fail_tachometer_lower_threshold) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_dc_output (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *standby, int *nominal_voltage, int *maximum_negative_voltage_deviation, int *maximum_positive_voltage_deviation, unsigned int *ripple_and_noise_pk_pk, unsigned int *minimum_current_draw, unsigned int *maximum_current_draw) { fiid_obj_t obj_record = NULL; int tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((tmpl_record_length = fiid_template_len_bytes (tmpl_fru_dc_output)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (tmpl_record_length != areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_dc_output))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU DC Output") < 0) goto cleanup; if (output_number) { if (FIID_OBJ_GET (obj_record, "output_number", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*output_number) = val; } if (standby) { if (FIID_OBJ_GET (obj_record, "standby", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*standby) = val; } if (nominal_voltage) { if (FIID_OBJ_GET (obj_record, "nominal_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*nominal_voltage) = ((int16_t)val * 10); } if (maximum_negative_voltage_deviation) { if (FIID_OBJ_GET (obj_record, "maximum_negative_voltage_deviation", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_negative_voltage_deviation) = ((int16_t)val * 10); } if (maximum_positive_voltage_deviation) { if (FIID_OBJ_GET (obj_record, "maximum_positive_voltage_deviation", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_positive_voltage_deviation) = ((int16_t)val * 10); } if (ripple_and_noise_pk_pk) { if (FIID_OBJ_GET (obj_record, "ripple_and_noise_pk_pk", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*ripple_and_noise_pk_pk) = val; } if (minimum_current_draw) { if (FIID_OBJ_GET (obj_record, "minimum_current_draw", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*minimum_current_draw) = val; } if (maximum_current_draw) { if (FIID_OBJ_GET (obj_record, "maximum_current_draw", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_current_draw) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_dc_load (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *standby, int *nominal_voltage, int *specd_minimum_voltage, int *specd_maximum_voltage, unsigned int *specd_ripple_and_noise_pk_pk, unsigned int *minimum_current_load, unsigned int *maximum_current_load) { fiid_obj_t obj_record = NULL; int tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((tmpl_record_length = fiid_template_len_bytes (tmpl_fru_dc_load)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (tmpl_record_length != areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_dc_load))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU DC Load") < 0) goto cleanup; if (output_number) { if (FIID_OBJ_GET (obj_record, "output_number", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*output_number) = val; } if (standby) { if (FIID_OBJ_GET (obj_record, "standby", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*standby) = val; } if (nominal_voltage) { if (FIID_OBJ_GET (obj_record, "nominal_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*nominal_voltage) = ((int16_t)val * 10); } if (specd_minimum_voltage) { if (FIID_OBJ_GET (obj_record, "specd_minimum_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_minimum_voltage) = ((int16_t)val * 10); } if (specd_maximum_voltage) { if (FIID_OBJ_GET (obj_record, "specd_maximum_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_maximum_voltage) = ((int16_t)val * 10); } if (specd_ripple_and_noise_pk_pk) { if (FIID_OBJ_GET (obj_record, "specd_ripple_and_noise_pk_pk", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_ripple_and_noise_pk_pk) = val; } if (minimum_current_load) { if (FIID_OBJ_GET (obj_record, "minimum_current_load", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*minimum_current_load) = val; } if (maximum_current_load) { if (FIID_OBJ_GET (obj_record, "maximum_current_load", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_current_load) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_management_access_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint8_t *sub_record_type, void *sub_record_data, unsigned int *sub_record_data_len) { fiid_obj_t obj_record = NULL; int min_tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((min_tmpl_record_length = fiid_template_field_start_bytes (tmpl_fru_management_access_record, "record")) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (areabuflen < min_tmpl_record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_management_access_record))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Management Access Record") < 0) goto cleanup; if (sub_record_type) { if (FIID_OBJ_GET (obj_record, "sub_record_type", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*sub_record_type) = val; } if (sub_record_data && sub_record_data_len && (*sub_record_data_len)) { int len; if ((len = fiid_obj_get_data (obj_record, "record", sub_record_data, (*sub_record_data_len))) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*sub_record_data_len) = len; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_base_compatibility_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, unsigned int *entity_id_code, unsigned int *compatibility_base, unsigned int *compatibility_code_start_value, uint8_t *code_range_mask, unsigned int *code_range_mask_len) { fiid_obj_t obj_record = NULL; int min_tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((min_tmpl_record_length = fiid_template_field_start_bytes (tmpl_fru_base_compatibility_record, "code_range_mask")) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (areabuflen < min_tmpl_record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_base_compatibility_record))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Base Compatibility Record") < 0) goto cleanup; if (manufacturer_id) { if (FIID_OBJ_GET (obj_record, "manufacturer_id", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*manufacturer_id) = val; } if (entity_id_code) { if (FIID_OBJ_GET (obj_record, "entity_id_code", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*entity_id_code) = val; } if (compatibility_base) { if (FIID_OBJ_GET (obj_record, "compatibility_base", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*compatibility_base) = val; } if (compatibility_code_start_value) { if (FIID_OBJ_GET (obj_record, "compatibility_code_start_value", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*compatibility_code_start_value) = val; } if (code_range_mask && code_range_mask_len && (*code_range_mask_len)) { int len; if ((len = fiid_obj_get_data (obj_record, "code_range_mask", code_range_mask, (*code_range_mask_len))) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*code_range_mask_len) = len; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_extended_compatibility_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, unsigned int *entity_id_code, unsigned int *compatibility_base, unsigned int *compatibility_code_start_value, uint8_t *code_range_mask, unsigned int *code_range_mask_len) { fiid_obj_t obj_record = NULL; int min_tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((min_tmpl_record_length = fiid_template_field_start_bytes (tmpl_fru_extended_compatibility_record, "code_range_mask")) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (areabuflen < min_tmpl_record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_extended_compatibility_record))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Extended Compatibility Record") < 0) goto cleanup; if (manufacturer_id) { if (FIID_OBJ_GET (obj_record, "manufacturer_id", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*manufacturer_id) = val; } if (entity_id_code) { if (FIID_OBJ_GET (obj_record, "entity_id_code", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*entity_id_code) = val; } if (compatibility_base) { if (FIID_OBJ_GET (obj_record, "compatibility_base", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*compatibility_base) = val; } if (compatibility_code_start_value) { if (FIID_OBJ_GET (obj_record, "compatibility_code_start_value", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*compatibility_code_start_value) = val; } if (code_range_mask && code_range_mask_len && (*code_range_mask_len)) { int len; if ((len = fiid_obj_get_data (obj_record, "code_range_mask", code_range_mask, (*code_range_mask_len))) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*code_range_mask_len) = len; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_extended_dc_output (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *current_units, unsigned int *standby, int *nominal_voltage, int *maximum_negative_voltage_deviation, int *maximum_positive_voltage_deviation, unsigned int *ripple_and_noise_pk_pk, unsigned int *minimum_current_draw, unsigned int *maximum_current_draw) { fiid_obj_t obj_record = NULL; int tmpl_record_length; uint64_t local_current_units = 0; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((tmpl_record_length = fiid_template_len_bytes (tmpl_fru_extended_dc_output)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (tmpl_record_length != areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_extended_dc_output))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Extended DC Output") < 0) goto cleanup; if (output_number) { if (FIID_OBJ_GET (obj_record, "output_number", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*output_number) = val; } if (current_units || minimum_current_draw || maximum_current_draw) { if (FIID_OBJ_GET (obj_record, "current_units", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (current_units) (*current_units) = val; local_current_units = val; } if (standby) { if (FIID_OBJ_GET (obj_record, "standby", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*standby) = val; } if (nominal_voltage) { if (FIID_OBJ_GET (obj_record, "nominal_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*nominal_voltage) = ((int16_t)val * 10); } if (maximum_negative_voltage_deviation) { if (FIID_OBJ_GET (obj_record, "maximum_negative_voltage_deviation", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_negative_voltage_deviation) = ((int16_t)val * 10); } if (maximum_positive_voltage_deviation) { if (FIID_OBJ_GET (obj_record, "maximum_positive_voltage_deviation", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*maximum_positive_voltage_deviation) = ((int16_t)val * 10); } if (ripple_and_noise_pk_pk) { if (FIID_OBJ_GET (obj_record, "ripple_and_noise_pk_pk", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*ripple_and_noise_pk_pk) = val; } if (minimum_current_draw) { if (FIID_OBJ_GET (obj_record, "minimum_current_draw", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (local_current_units == IPMI_FRU_CURRENT_UNITS_10MA) (*minimum_current_draw) = (val * 10); else (*minimum_current_draw) = (val * 100); } if (maximum_current_draw) { if (FIID_OBJ_GET (obj_record, "maximum_current_draw", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (local_current_units == IPMI_FRU_CURRENT_UNITS_10MA) (*maximum_current_draw) = (val * 10); else (*maximum_current_draw) = (val * 100); } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_extended_dc_load (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, unsigned int *output_number, unsigned int *current_units, unsigned int *standby, int *nominal_voltage, int *specd_minimum_voltage, int *specd_maximum_voltage, unsigned int *specd_ripple_and_noise_pk_pk, unsigned int *minimum_current_load, unsigned int *maximum_current_load) { fiid_obj_t obj_record = NULL; int tmpl_record_length; uint64_t local_current_units = 0; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((tmpl_record_length = fiid_template_len_bytes (tmpl_fru_extended_dc_load)) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (tmpl_record_length != areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_extended_dc_load))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU Extended DC Load") < 0) goto cleanup; if (output_number) { if (FIID_OBJ_GET (obj_record, "output_number", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*output_number) = val; } if (current_units || minimum_current_load || maximum_current_load) { if (FIID_OBJ_GET (obj_record, "current_units", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (current_units) (*current_units) = val; local_current_units = val; } if (standby) { if (FIID_OBJ_GET (obj_record, "standby", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*standby) = val; } if (nominal_voltage) { if (FIID_OBJ_GET (obj_record, "nominal_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*nominal_voltage) = ((int16_t)val * 10); } if (specd_minimum_voltage) { if (FIID_OBJ_GET (obj_record, "specd_minimum_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_minimum_voltage) = ((int16_t)val * 10); } if (specd_maximum_voltage) { if (FIID_OBJ_GET (obj_record, "specd_maximum_voltage", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_maximum_voltage) = ((int16_t)val * 10); } if (specd_ripple_and_noise_pk_pk) { if (FIID_OBJ_GET (obj_record, "specd_ripple_and_noise_pk_pk", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*specd_ripple_and_noise_pk_pk) = val; } if (minimum_current_load) { if (FIID_OBJ_GET (obj_record, "minimum_current_load", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (local_current_units == IPMI_FRU_CURRENT_UNITS_10MA) (*minimum_current_load) = (val * 10); else (*minimum_current_load) = (val * 100); } if (maximum_current_load) { if (FIID_OBJ_GET (obj_record, "maximum_current_load", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (local_current_units == IPMI_FRU_CURRENT_UNITS_10MA) (*maximum_current_load) = (val * 10); else (*maximum_current_load) = (val * 100); } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_multirecord_oem_record (ipmi_fru_ctx_t ctx, const void *areabuf, unsigned int areabuflen, uint32_t *manufacturer_id, void *oem_data, unsigned int *oem_data_len) { fiid_obj_t obj_record = NULL; int min_tmpl_record_length; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_FRU_CTX_MAGIC) { ERR_TRACE (ipmi_fru_ctx_errormsg (ctx), ipmi_fru_ctx_errnum (ctx)); return (-1); } if (!areabuf || !areabuflen) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); return (-1); } if ((min_tmpl_record_length = fiid_template_field_start_bytes (tmpl_fru_oem_record, "oem_data")) < 0) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (areabuflen < min_tmpl_record_length) { FRU_SET_ERRNUM (ctx, IPMI_FRU_ERR_PARAMETERS); goto cleanup; } if (!(obj_record = fiid_obj_create (tmpl_fru_oem_record))) { FRU_ERRNO_TO_FRU_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, areabuflen) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } if (fru_dump_obj (ctx, obj_record, "FRU OEM Record") < 0) goto cleanup; if (manufacturer_id) { if (FIID_OBJ_GET (obj_record, "manufacturer_id", &val) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*manufacturer_id) = val; } if (oem_data && oem_data_len && (*oem_data_len)) { int len; if ((len = fiid_obj_get_data (obj_record, "oem_data", oem_data, (*oem_data_len))) < 0) { FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM (ctx, obj_record); goto cleanup; } (*oem_data_len) = len; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-defs.h0000644002055400205540000000353313527331636021172 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_DEFS_H #define IPMI_FRU_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/fru/ipmi-fru.h" #define IPMI_FRU_CTX_MAGIC 0x12CD1DBF #define IPMI_FRU_FLAGS_MASK \ (IPMI_FRU_FLAGS_DEBUG_DUMP \ | IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS \ | IPMI_FRU_FLAGS_INTERPRET_OEM_DATA \ | IPMI_FRU_FLAGS_READ_RAW) #define IPMI_FRU_BUF_LEN 2048 struct ipmi_fru_ctx { uint32_t magic; int errnum; unsigned int flags; uint32_t manufacturer_id; uint16_t product_id; char *debug_prefix; ipmi_ctx_t ipmi_ctx; uint8_t fru_device_id; unsigned int fru_inventory_area_size; unsigned int chassis_info_area_starting_offset; unsigned int board_info_area_starting_offset; unsigned int product_info_area_starting_offset; unsigned int multirecord_area_starting_offset; unsigned int device_opened; int device_opened_with_buffer; uint8_t frudata[IPMI_FRU_AREA_SIZE_MAX]; int chassis_info_area_parsed; int board_info_area_parsed; int product_info_area_parsed; int multirecord_area_parsed; unsigned int multirecord_area_offset_in_bytes; }; #endif /* IPMI_FRU_PARSE_DEFS_H */ freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-trace.h0000644002055400205540000000371513527331636021351 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_TRACE_H #define IPMI_FRU_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #define FRU_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_fru_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define FRU_ERRNO_TO_FRU_ERRNUM(__ctx, __errno) \ do { \ fru_set_fru_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define FRU_FIID_OBJECT_ERROR_TO_FRU_ERRNUM(__ctx, __obj) \ do { \ fru_set_fru_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #endif /* IPMI_FRU_TRACE_H */ freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-util.c0000644002055400205540000000427613527331636021226 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/fru/ipmi-fru.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-fru-defs.h" #include "ipmi-fru-trace.h" #include "ipmi-fru-util.h" #include "freeipmi-portability.h" void fru_set_fru_errnum_by_errno (ipmi_fru_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_FRU_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_FRU_ERR_SUCCESS; break; case ENOMEM: ctx->errnum = IPMI_FRU_ERR_OUT_OF_MEMORY; break; default: ctx->errnum = IPMI_FRU_ERR_INTERNAL_ERROR; } } void fru_set_fru_errnum_by_fiid_object (ipmi_fru_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_FRU_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_FRU_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_FRU_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_FRU_ERR_SYSTEM_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_FRU_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_FRU_ERR_INTERNAL_ERROR; } } freeipmi-1.6.4/libfreeipmi/fru/ipmi-fru-util.h0000644002055400205540000000235013527331636021222 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FRU_UTIL_H #define IPMI_FRU_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/fru/ipmi-fru.h" #include "ipmi-fru-defs.h" void fru_set_fru_errnum_by_errno (ipmi_fru_ctx_t ctx, int __errno); void fru_set_fru_errnum_by_fiid_object (ipmi_fru_ctx_t ctx, fiid_obj_t obj); #endif /* IPMI_FRU_UTIL_H */ freeipmi-1.6.4/libfreeipmi/interface/0000755002055400205540000000000013527342542017510 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/interface/ipmi-ipmb-interface.c0000644002055400205540000002514213527331637023504 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ALLOCA_H #include #endif /* HAVE_ALLOCA_H */ #include #include #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-util.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #include "secure.h" fiid_template_t tmpl_ipmb_msg_hdr_rq = { { 8, "rs_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rs_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "checksum1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rq_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rq_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "rq_seq", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_ipmb_msg_hdr_rs = { { 2, "rq_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "checksum1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rs_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rs_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "rq_seq", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_ipmb_msg_trlr = { { 8, "checksum2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_ipmb_msg = { { 2040, "data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; #define IPMB_MAX_LEN 65536 /* udp max size */ int fill_ipmb_msg_hdr (uint8_t rs_addr, uint8_t net_fn, uint8_t rs_lun, uint8_t rq_addr, uint8_t rq_lun, uint8_t rq_seq, fiid_obj_t obj_ipmb_msg_hdr) { uint8_t checksum_buf[1024]; int checksum_len; uint8_t checksum; if (!IPMI_NET_FN_VALID (net_fn) || !IPMI_BMC_LUN_VALID (rs_lun) || !IPMI_BMC_LUN_VALID (rq_lun) || (rq_seq > IPMI_IPMB_REQUESTER_SEQUENCE_NUMBER_MAX) || !fiid_obj_valid (obj_ipmb_msg_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_hdr, tmpl_ipmb_msg_hdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_ipmb_msg_hdr); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "rs_addr", rs_addr); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "rs_lun", rs_lun); if ((checksum_len = fiid_obj_get_block (obj_ipmb_msg_hdr, "rs_addr", "net_fn", checksum_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } checksum = ipmi_checksum (checksum_buf, checksum_len); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "checksum1", checksum); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "rq_addr", rq_addr); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "rq_lun", rq_lun); FILL_FIID_OBJ_SET (obj_ipmb_msg_hdr, "rq_seq", rq_seq); return (0); } int assemble_ipmi_ipmb_msg (fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg, unsigned int flags) { uint8_t buf[IPMB_MAX_LEN+1]; unsigned int indx = 0; uint8_t *checksum_data_ptr = NULL; unsigned int checksum_data_count = 0; unsigned int required_len = 0; fiid_obj_t obj_ipmb_msg_trlr = NULL; uint8_t checksum; int len, rv = -1; unsigned int flags_mask = 0; if (!fiid_obj_valid (obj_ipmb_msg_hdr) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_ipmb_msg) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_hdr, tmpl_ipmb_msg_hdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg, tmpl_ipmb_msg) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_ipmb_msg_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if ((len = fiid_template_len_bytes (tmpl_ipmb_msg_hdr_rq)) < 0) { ERRNO_TRACE (errno); return (-1); } required_len += len; if ((len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } required_len += len; if ((len = fiid_template_len_bytes (tmpl_ipmb_msg_trlr)) < 0) { ERRNO_TRACE (errno); return (-1); } required_len += len; if (IPMB_MAX_LEN < required_len) { SET_ERRNO (EMSGSIZE); return (-1); } if ((len = fiid_obj_get_block (obj_ipmb_msg_hdr, "rs_addr", "checksum1", buf + indx, IPMB_MAX_LEN - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } indx += len; checksum_data_ptr = (buf + indx); if ((len = fiid_obj_get_block (obj_ipmb_msg_hdr, "rq_addr", "rq_seq", buf + indx, IPMB_MAX_LEN - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } indx += len; checksum_data_count += len; if ((len = fiid_obj_get_all (obj_cmd, buf + indx, IPMB_MAX_LEN - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; checksum_data_count += len; if (!(obj_ipmb_msg_trlr = fiid_obj_create (tmpl_ipmb_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } checksum = ipmi_checksum (checksum_data_ptr, checksum_data_count); if (fiid_obj_set_all (obj_ipmb_msg_trlr, &checksum, sizeof (checksum)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); goto cleanup; } if ((len = fiid_obj_get_all (obj_ipmb_msg_trlr, buf + indx, IPMB_MAX_LEN - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); goto cleanup; } indx += len; if ((len = fiid_obj_set_all (obj_ipmb_msg, buf, indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_ipmb_msg_trlr); return (rv); } int unassemble_ipmi_ipmb_msg (fiid_obj_t obj_ipmb_msg, fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg_trlr, unsigned int flags) { uint8_t buf[IPMB_MAX_LEN+1]; int buf_len, obj_ipmb_msg_trlr_len, len; unsigned int indx = 0; unsigned int ipmb_msg_len; unsigned int flags_mask = (IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK); if (!fiid_obj_valid (obj_ipmb_msg) || !fiid_obj_valid (obj_ipmb_msg_hdr) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_ipmb_msg_trlr) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_hdr, tmpl_ipmb_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_trlr, tmpl_ipmb_msg_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if ((buf_len = fiid_obj_get_all (obj_ipmb_msg, buf, IPMB_MAX_LEN)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg); return (-1); } if (fiid_obj_clear (obj_ipmb_msg_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } if (fiid_obj_clear (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (fiid_obj_clear (obj_ipmb_msg_trlr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); return (-1); } if ((len = fiid_obj_set_all (obj_ipmb_msg_hdr, buf + indx, buf_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } indx += len; if (buf_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((obj_ipmb_msg_trlr_len = fiid_template_len_bytes (tmpl_ipmb_msg_trlr)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((buf_len - indx) <= obj_ipmb_msg_trlr_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } ipmb_msg_len = (buf_len - indx) - obj_ipmb_msg_trlr_len; if ((len = fiid_obj_set_all (obj_cmd, buf + indx, ipmb_msg_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } indx += len; if (buf_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_ipmb_msg_trlr, buf + indx, buf_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); return (-1); } indx += len; if (FIID_OBJ_PACKET_VALID (obj_ipmb_msg_hdr) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1) && FIID_OBJ_PACKET_VALID (obj_ipmb_msg_trlr) == 1) return (1); return (0); } freeipmi-1.6.4/libfreeipmi/interface/ipmi-kcs-interface.c0000644002055400205540000001255613527331637023342 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/interface/ipmi-kcs-interface.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_hdr_kcs = { { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_hdr_ipmi_kcs (uint8_t lun, uint8_t fn, fiid_obj_t obj_kcs_hdr) { if (!IPMI_BMC_LUN_VALID (lun) || !IPMI_NET_FN_VALID (fn) || !fiid_obj_valid (obj_kcs_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_kcs_hdr, tmpl_hdr_kcs) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_kcs_hdr); FILL_FIID_OBJ_SET (obj_kcs_hdr, "lun", lun); FILL_FIID_OBJ_SET (obj_kcs_hdr, "net_fn", fn); return (0); } int assemble_ipmi_kcs_pkt (fiid_obj_t obj_kcs_hdr, fiid_obj_t obj_cmd, void *pkt, unsigned int pkt_len, unsigned int flags) { int obj_cmd_len, obj_kcs_hdr_len; unsigned int utmp; unsigned int flags_mask = 0; if (!fiid_obj_valid (obj_kcs_hdr) || !fiid_obj_valid (obj_cmd) || !pkt || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_kcs_hdr, tmpl_hdr_kcs) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_kcs_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if ((obj_kcs_hdr_len = fiid_obj_len_bytes (obj_kcs_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); return (-1); } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } /* int overflow not possible here */ if (pkt_len < (obj_kcs_hdr_len + obj_cmd_len)) { SET_ERRNO (EMSGSIZE); return (-1); } if ((obj_kcs_hdr_len = fiid_obj_get_all (obj_kcs_hdr, pkt, pkt_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); return (-1); } if ((obj_cmd_len = fiid_obj_get_all (obj_cmd, pkt + obj_kcs_hdr_len, pkt_len - obj_kcs_hdr_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } utmp = obj_kcs_hdr_len + obj_cmd_len; if (utmp > INT_MAX) { SET_ERRNO (EMSGSIZE); return (-1); } return (obj_kcs_hdr_len + obj_cmd_len); } int unassemble_ipmi_kcs_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_kcs_hdr, fiid_obj_t obj_cmd, unsigned int flags) { unsigned int indx = 0; int len; unsigned int flags_mask = (IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK); if (!pkt || !fiid_obj_valid (obj_kcs_hdr) || !fiid_obj_valid (obj_cmd) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_kcs_hdr, tmpl_hdr_kcs) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_clear (obj_kcs_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); return (-1); } if (fiid_obj_clear (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if ((len = fiid_obj_set_all (obj_kcs_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_kcs_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } indx += len; if (FIID_OBJ_PACKET_VALID (obj_kcs_hdr) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1)) return (1); return (0); } freeipmi-1.6.4/libfreeipmi/interface/ipmi-lan-interface.c0000644002055400205540000006257413527331637023341 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-ipmb-lun-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-network.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-md2.h" #include "libcommon/ipmi-md5.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #include "secure.h" #define IPMI_LAN_PKT_PAD_SIZE 1 /* authentication code may contain plain password, always securely clear it */ fiid_template_t tmpl_lan_session_hdr = { { 8, "authentication_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "authentication_code", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_SECURE_MEMSET_ON_CLEAR}, { 8, "ipmi_msg_len", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* IPMI LAN Message Request Header */ fiid_template_t tmpl_lan_msg_hdr_rq = { { 8, "rs_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rs_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "checksum1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rq_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rq_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "rq_seq", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* IPMI LAN Message Response Header */ fiid_template_t tmpl_lan_msg_hdr_rs = { { 8, "rq_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rq_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "net_fn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "checksum1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rs_addr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "rs_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "rq_seq", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* IPMI LAN Message Trailer */ fiid_template_t tmpl_lan_msg_trlr = { { 8, "checksum2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_lan_session_hdr (uint8_t authentication_type, uint32_t session_sequence_number, uint32_t session_id, fiid_obj_t obj_lan_session_hdr) { if (!IPMI_AUTHENTICATION_TYPE_VALID (authentication_type) || !fiid_obj_valid (obj_lan_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_session_hdr, tmpl_lan_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_lan_session_hdr); FILL_FIID_OBJ_SET (obj_lan_session_hdr, "authentication_type", authentication_type); FILL_FIID_OBJ_SET (obj_lan_session_hdr, "session_sequence_number", session_sequence_number); FILL_FIID_OBJ_SET (obj_lan_session_hdr, "session_id", session_id); /* authentication_code_data calculated in assemble_ipmi_lan_pkt */ /* ipmi_msg_len calculated in assemble_ipmi_lan_pkt */ return (0); } int fill_lan_msg_hdr (uint8_t rs_addr, uint8_t net_fn, uint8_t rs_lun, uint8_t rq_seq, fiid_obj_t obj_lan_msg_hdr) { uint8_t checksum_buf[1024]; int checksum_len; uint8_t checksum; if (!IPMI_NET_FN_VALID (net_fn) || !IPMI_BMC_LUN_VALID (rs_lun) || (rq_seq > IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX) || !fiid_obj_valid (obj_lan_msg_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_lan_msg_hdr); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "rs_addr", rs_addr); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "net_fn", net_fn); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "rs_lun", rs_lun); if ((checksum_len = fiid_obj_get_block (obj_lan_msg_hdr, "rs_addr", "net_fn", checksum_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } checksum = ipmi_checksum (checksum_buf, checksum_len); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "checksum1", checksum); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "rq_addr", IPMI_LAN_SOFTWARE_ID_REMOTE_CONSOLE_SOFTWARE); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "rq_lun", IPMI_BMC_IPMB_LUN_BMC); FILL_FIID_OBJ_SET (obj_lan_msg_hdr, "rq_seq", rq_seq); return (0); } static int _ipmi_lan_pkt_rq_min_size (uint8_t authentication_type, fiid_obj_t obj_cmd) { unsigned int msg_len = 0; int len; assert (IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) && fiid_obj_valid (obj_cmd)); if ((len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } msg_len += len; if ((len = fiid_template_len_bytes (tmpl_lan_msg_hdr_rq)) < 0) { ERRNO_TRACE (errno); return (-1); } msg_len += len; if ((len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); return (-1); } msg_len += len; if ((len = fiid_template_block_len_bytes (tmpl_lan_session_hdr, "authentication_type", "session_id")) < 0) { ERRNO_TRACE (errno); return (-1); } msg_len += len; if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2 || authentication_type == IPMI_AUTHENTICATION_TYPE_MD5 || authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY || authentication_type == IPMI_AUTHENTICATION_TYPE_OEM_PROP) msg_len += IPMI_1_5_MAX_PASSWORD_LENGTH; if ((len = fiid_template_field_len_bytes (tmpl_lan_session_hdr, "ipmi_msg_len")) < 0) { ERRNO_TRACE (errno); return (-1); } msg_len += len; if ((len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } msg_len += len; return (msg_len); } /* Complete IPMI LAN Request Packet +----------------------+ | RMCP | | Session | | Message | | Command | | Data | | Checksum | +----------------------+ */ int assemble_ipmi_lan_pkt (fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_lan_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, const void *authentication_code_data, unsigned int authentication_code_data_len, void *pkt, unsigned int pkt_len, unsigned int flags) { uint8_t authentication_type; uint64_t val; unsigned int indx = 0; int required_len; void *authentication_code_field_ptr = NULL; void *checksum_data_ptr = NULL; void *msg_data_ptr = NULL; void *ipmi_msg_len_ptr = NULL; unsigned int msg_data_count = 0; unsigned int checksum_data_count = 0; uint8_t ipmi_msg_len; fiid_obj_t obj_lan_msg_trlr = NULL; uint8_t pwbuf[IPMI_1_5_MAX_PASSWORD_LENGTH]; uint8_t checksum; int len, rv = -1; unsigned int flags_mask = 0; if (!fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_lan_session_hdr) || !fiid_obj_valid (obj_lan_msg_hdr) || !fiid_obj_valid (obj_cmd) || (authentication_code_data && authentication_code_data_len > IPMI_1_5_MAX_PASSWORD_LENGTH) || !pkt || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_session_hdr, tmpl_lan_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } /* * ipmi_msg_len is calculated in this function, so we can't use * fiid_obj_packet_valid() on obj_lan_session_hdr b/c ipmi_msg_len * is probably not set yet. */ if (FIID_OBJ_PACKET_VALID (obj_lan_msg_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_GET (obj_lan_session_hdr, "authentication_type", &val) < 0) { ERRNO_TRACE (errno); return (-1); } authentication_type = val; if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE && authentication_type != IPMI_AUTHENTICATION_TYPE_MD2 && authentication_type != IPMI_AUTHENTICATION_TYPE_MD5 && authentication_type != IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) { SET_ERRNO (EINVAL); return (-1); } /* no need for overflow checks, handled w/ _ipmi_lan_pkt_rq_min_size check */ required_len = _ipmi_lan_pkt_rq_min_size (authentication_type, obj_cmd); if (pkt_len < required_len) { SET_ERRNO (EMSGSIZE); return (-1); } if ((len = fiid_obj_get_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); goto cleanup; } indx += len; if ((len = fiid_obj_get_block (obj_lan_session_hdr, "authentication_type", "session_id", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); goto cleanup; } indx += len; /* authentication_code generated last. Save pointers for later calculation */ if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) { authentication_code_field_ptr = (pkt + indx); indx += IPMI_1_5_MAX_PASSWORD_LENGTH; } ipmi_msg_len_ptr = (pkt + indx); if ((len = fiid_template_field_len_bytes (tmpl_lan_session_hdr, "ipmi_msg_len")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (len != 1) { SET_ERRNO (EINVAL); goto cleanup; } indx += len; msg_data_ptr = (pkt + indx); if ((len = fiid_obj_get_block (obj_lan_msg_hdr, "rs_addr", "checksum1", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } indx += len; msg_data_count += len; checksum_data_ptr = (pkt + indx); if ((len = fiid_obj_get_block (obj_lan_msg_hdr, "rq_addr", "rq_seq", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } indx += len; msg_data_count += len; checksum_data_count += len; if ((len = fiid_obj_get_all (obj_cmd, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; msg_data_count += len; checksum_data_count += len; if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } checksum = ipmi_checksum (checksum_data_ptr, checksum_data_count); if (fiid_obj_set_all (obj_lan_msg_trlr, &checksum, sizeof (checksum)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } if ((len = fiid_obj_get_all (obj_lan_msg_trlr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } indx += len; msg_data_count += len; /* ipmi_msg_len done after message length is computed */ ipmi_msg_len = msg_data_count; memcpy (ipmi_msg_len_ptr, &ipmi_msg_len, sizeof (ipmi_msg_len)); /* Auth code must be done last, some authentication like md2 and md5 * require all fields, including checksums, to be calculated * beforehand */ if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) { int authentication_len; /* clear out, might need empty buf */ memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); if ((authentication_len = fiid_obj_field_len_bytes (obj_lan_session_hdr, "authentication_code")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); goto cleanup; } if (authentication_len) { if (fiid_obj_get_data (obj_lan_session_hdr, "authentication_code", pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); goto cleanup; } memcpy (authentication_code_field_ptr, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); } else { if (authentication_code_data) memcpy (pwbuf, authentication_code_data, authentication_code_data_len); if (authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) { memcpy (authentication_code_field_ptr, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); } else /* IPMI_AUTHENTICATION_TYPE_MD2 || IPMI_AUTHENTICATION_TYPE_MD5 */ { uint8_t session_id_buf[1024]; uint8_t session_sequence_number_buf[1024]; int session_id_len, session_sequence_number_len; if ((session_id_len = fiid_obj_get_data (obj_lan_session_hdr, "session_id", session_id_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); goto cleanup; } if ((session_sequence_number_len = fiid_obj_get_data (obj_lan_session_hdr, "session_sequence_number", session_sequence_number_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); goto cleanup; } if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2) { md2_t ctx; uint8_t digest[MD2_DIGEST_LENGTH]; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD2_DIGEST_LENGTH); md2_init (&ctx); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_update_data (&ctx, session_id_buf, session_id_len); md2_update_data (&ctx, msg_data_ptr, msg_data_count); md2_update_data (&ctx, session_sequence_number_buf, session_sequence_number_len); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_finish (&ctx, digest, MD2_DIGEST_LENGTH); md2_init (&ctx); memcpy (authentication_code_field_ptr, digest, IPMI_1_5_MAX_PASSWORD_LENGTH); } else if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) { md5_t ctx; uint8_t digest[MD5_DIGEST_LENGTH]; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD5_DIGEST_LENGTH); md5_init (&ctx); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_update_data (&ctx, session_id_buf, session_id_len); md5_update_data (&ctx, msg_data_ptr, msg_data_count); md5_update_data (&ctx, session_sequence_number_buf, session_sequence_number_len); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_finish (&ctx, digest, MD5_DIGEST_LENGTH); md5_init (&ctx); memcpy (authentication_code_field_ptr, digest, IPMI_1_5_MAX_PASSWORD_LENGTH); } } } } if (indx > INT_MAX) { SET_ERRNO (EMSGSIZE); goto cleanup; } rv = indx; cleanup: if (rv < 0) { /* If plain password, pkt may contain it */ if (authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) secure_memset (pkt, '\0', pkt_len); } fiid_obj_destroy (obj_lan_msg_trlr); /* secure_memset because can contain password */ secure_memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); return (rv); } /* Complete IPMI LAN Response Packet +----------------------+ | Session | | RMCP | | Message | | Command | | Completion Code | | Data | | Checksum | +----------------------+ Optional Arguments : (pass NULL to ignore) rmcp_hdr, session, msg, cmd and checksum */ int unassemble_ipmi_lan_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_lan_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, unsigned int flags) { uint8_t authentication_type; unsigned int indx = 0; unsigned int obj_cmd_len; int obj_lan_msg_trlr_len, len; uint64_t val; unsigned int flags_mask = (IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK); if (!pkt || !fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_lan_session_hdr) || !fiid_obj_valid (obj_lan_msg_hdr) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_lan_msg_trlr) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_session_hdr, tmpl_lan_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_trlr, tmpl_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } indx = 0; if (fiid_obj_clear (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (fiid_obj_clear (obj_lan_session_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } if (fiid_obj_clear (obj_lan_msg_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } if (fiid_obj_clear (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (fiid_obj_clear (obj_lan_msg_trlr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); return (-1); } if ((len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_block (obj_lan_session_hdr, "authentication_type", "session_id", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } indx += len; if (FIID_OBJ_GET (obj_lan_session_hdr, "authentication_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } authentication_type = val; if (!IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type)) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) { if ((len = fiid_obj_set_data (obj_lan_session_hdr, "authentication_code", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } } if ((len = fiid_obj_set_data (obj_lan_session_hdr, "ipmi_msg_len", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_lan_msg_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((obj_lan_msg_trlr_len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((pkt_len - indx) <= obj_lan_msg_trlr_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } obj_cmd_len = (pkt_len - indx) - obj_lan_msg_trlr_len; if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } indx += len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_lan_msg_trlr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); return (-1); } indx += len; if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_lan_session_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_lan_msg_hdr) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1) && FIID_OBJ_PACKET_VALID (obj_lan_msg_trlr) == 1) return (1); return (0); } ssize_t ipmi_lan_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { /* achu: Specification table 13-8, indicates legacy padding for IPMI 1.5, but * it appears it is specific to Ethernet 10/100 lan chips. * * It is so legacy at this point it is probably not worth providing. * In addition, it is difficult to calculate if a pad is necessary * b/c it appears the pad should be for the ethernet frame, not the * IP packet. * * Why not just remove this function? Leave just in case a legacy * pad situation pops up and we gotta implement something. */ return (ipmi_network_sendto (s, buf, len, flags, to, tolen)); } ssize_t ipmi_lan_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { return (ipmi_network_recvfrom (s, buf, len, flags, from, fromlen)); } freeipmi-1.6.4/libfreeipmi/interface/ipmi-network.c0000644002055400205540000000360713527331637022312 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-network.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" ssize_t ipmi_network_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { ssize_t rv; if (!buf || !len) { SET_ERRNO (EINVAL); return (-1); } if ((rv = sendto (s, buf, len, flags, to, tolen)) < 0) { ERRNO_TRACE (errno); return (-1); } return (rv); } ssize_t ipmi_network_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { ssize_t rv; if (!buf || !len) { SET_ERRNO (EINVAL); return (-1); } if ((rv = recvfrom (s, buf, len, flags, from, fromlen)) < 0) { ERRNO_TRACE (errno); return (-1); } return (rv); } freeipmi-1.6.4/libfreeipmi/interface/ipmi-network.h0000644002055400205540000000253013527331637022311 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_NETWORK_H #define IPMI_NETWORK_H #include #include ssize_t ipmi_network_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen); ssize_t ipmi_network_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen); #endif /* IPMI_NETWORK_H */ freeipmi-1.6.4/libfreeipmi/interface/ipmi-rmcpplus-interface.c0000644002055400205540000027521713527331637024434 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/cmds/ipmi-sol-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/payload/ipmi-sol-payload.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-rmcpplus-status-spec.h" #include "freeipmi/util/ipmi-rmcpplus-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-network.h" #include "libcommon/ipmi-crypt.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-md5.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #include "secure.h" #define IPMI_MAX_RMCPPLUS_AUTHENTICATION_CODE_LENGTH 64 #define IPMI_MAX_CONFIDENTIALITY_HEADER_LENGTH 64 #define IPMI_MAX_CONFIDENTIALITY_TRAILER_LENGTH 64 #define IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH 64 #define IPMI_MAX_INTEGRITY_DATA_LENGTH 32 fiid_template_t tmpl_rmcpplus_session_hdr = { { 4, "authentication_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type.authenticated", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "payload_type.encrypted", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_iana", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved2", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 16, "oem_payload_id", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_FIXED}, { 32, "session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 0h outside of a session, seperate #'s if authenticated or unauthenticated session */ { 32, "session_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* length of just the payload */ { 16, "ipmi_payload_len", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* doesn't exist if session_id = 0h */ fiid_template_t tmpl_rmcpplus_session_trlr = { { 32, "integrity_pad", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 8, "pad_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "next_header", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 256, "authentication_code", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* note: the ipmi spec wording is terrible. The integrity pad is to * ensure that the data passed to the HMAC is a multiple of 4, not * just the integrity field. Sigh ... */ fiid_template_t tmpl_rmcpplus_payload = { { 512, "confidentiality_header", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, /* 524288 = 65536 * 8 = 2^16 * 8, b/c ipmi_payload_len is 2 bytes */ { 524288, "payload_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 512, "confidentiality_trailer", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_rmcpplus_open_session_request = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "requested_maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "remote_console_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "authentication_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "authentication_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "authentication_payload.authentication_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "integrity_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "integrity_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "integrity_payload.integrity_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "confidentiality_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "confidentiality_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "confidentiality_payload.confidentiality_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_rmcpplus_open_session_response = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "rmcpplus_status_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 4, "maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "remote_console_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 0h not valid */ { 32, "managed_system_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "authentication_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "authentication_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "authentication_payload.authentication_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "integrity_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "integrity_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "integrity_payload.integrity_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "confidentiality_payload.payload_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "confidentiality_payload.payload_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "confidentiality_payload.confidentiality_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_rmcpplus_rakp_message_1 = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "managed_system_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "remote_console_random_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "requested_maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "name_only_lookup", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "user_name_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "user_name", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_rmcpplus_rakp_message_2 = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "rmcpplus_status_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "remote_console_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "managed_system_random_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "managed_system_guid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "key_exchange_authentication_code", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_rmcpplus_rakp_message_3 = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "rmcpplus_status_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "managed_system_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "key_exchange_authentication_code", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; /* achu: The IPMI 2.0 Spec version 1.0 lists the 4th field as * "management_console_session_id", not "managed_system_session_id" * or "remote_console_session_id". I'm assuming this is a typo and * that "remote_console_session_id" is what is really meant. */ fiid_template_t tmpl_rmcpplus_rakp_message_4 = { { 8, "message_tag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "rmcpplus_status_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 16, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "remote_console_session_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 512, "integrity_check_value", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int ipmi_rmcpplus_init (void) { if (crypt_init ()) return (-1); return (0); } int fill_rmcpplus_session_hdr (uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint32_t oem_iana, uint16_t oem_payload_id, uint32_t session_id, uint32_t session_sequence_number, fiid_obj_t obj_rmcpplus_session_hdr) { if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !IPMI_PAYLOAD_AUTHENTICATED_FLAG_VALID (payload_authenticated) || !IPMI_PAYLOAD_ENCRYPTED_FLAG_VALID (payload_encrypted) || (IPMI_PAYLOAD_TYPE_SESSION_SETUP (payload_type) && (payload_authenticated || payload_encrypted || session_id || session_sequence_number)) || !fiid_obj_valid (obj_rmcpplus_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_hdr, tmpl_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_rmcpplus_session_hdr); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "authentication_type", IPMI_AUTHENTICATION_TYPE_RMCPPLUS); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "reserved1", 0); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "payload_type", payload_type); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "payload_type.authenticated", payload_authenticated); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "payload_type.encrypted", payload_encrypted); if (payload_type == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT) { FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "oem_iana", oem_iana); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "reserved2", 0); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "oem_payload_id", oem_payload_id); } FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "session_id", session_id); FILL_FIID_OBJ_SET (obj_rmcpplus_session_hdr, "session_sequence_number", session_sequence_number); /* ipmi_payload_len will be calculated during packet assembly */ return (0); } int fill_rmcpplus_session_trlr (fiid_obj_t obj_rmcpplus_session_trlr) { if (!fiid_obj_valid (obj_rmcpplus_session_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_rmcpplus_session_trlr); /* Computing hashes and checking for correct input is done during * the packet assembly. Padding calculations will also be done * during packet assembly. */ FILL_FIID_OBJ_SET (obj_rmcpplus_session_trlr, "next_header", IPMI_NEXT_HEADER); return (0); } int fill_rmcpplus_payload (const void *confidentiality_header, unsigned int confidentiality_header_len, const void *payload_data, unsigned int payload_data_len, const void *confidentiality_trailer, unsigned int confidentiality_trailer_len, fiid_obj_t obj_cmd_rq) { if ((confidentiality_header && confidentiality_header_len > IPMI_MAX_CONFIDENTIALITY_HEADER_LENGTH) || (payload_data && payload_data_len > IPMI_MAX_PAYLOAD_LENGTH) || (confidentiality_trailer && confidentiality_trailer_len > IPMI_MAX_CONFIDENTIALITY_TRAILER_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); if (confidentiality_header) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "confidentiality_header", confidentiality_header, confidentiality_header_len); if (payload_data) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "payload_data", payload_data, payload_data_len); if (confidentiality_trailer) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "confidentiality_trailer", confidentiality_trailer, confidentiality_trailer_len); return (0); } int fill_rmcpplus_open_session (uint8_t message_tag, uint8_t requested_maximum_privilege_level, uint32_t remote_console_session_id, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, fiid_obj_t obj_cmd_rq) { if (!IPMI_2_0_PRIVILEGE_LEVEL_VALID (requested_maximum_privilege_level) || !IPMI_AUTHENTICATION_ALGORITHM_VALID (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_VALID (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_VALID (confidentiality_algorithm) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_rmcpplus_open_session_request) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "message_tag", message_tag); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "requested_maximum_privilege_level", requested_maximum_privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "remote_console_session_id", remote_console_session_id); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_payload.payload_type", IPMI_AUTHENTICATION_PAYLOAD_TYPE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_payload.payload_length", IPMI_AUTHENTICATION_PAYLOAD_LENGTH); FILL_FIID_OBJ_SET (obj_cmd_rq, "authentication_payload.authentication_algorithm", authentication_algorithm); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved4", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved5", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "integrity_payload.payload_type", IPMI_INTEGRITY_PAYLOAD_TYPE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved6", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "integrity_payload.payload_length", IPMI_INTEGRITY_PAYLOAD_LENGTH); FILL_FIID_OBJ_SET (obj_cmd_rq, "integrity_payload.integrity_algorithm", integrity_algorithm); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved7", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved8", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "confidentiality_payload.payload_type", IPMI_CONFIDENTIALITY_PAYLOAD_TYPE); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved9", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "confidentiality_payload.payload_length", IPMI_CONFIDENTIALITY_PAYLOAD_LENGTH); FILL_FIID_OBJ_SET (obj_cmd_rq, "confidentiality_payload.confidentiality_algorithm", confidentiality_algorithm); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved10", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved11", 0); return (0); } int fill_rmcpplus_rakp_message_1 (uint8_t message_tag, uint32_t managed_system_session_id, const void *remote_console_random_number, unsigned int remote_console_random_number_len, uint8_t requested_maximum_privilege_level, uint8_t name_only_lookup_flag, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd_rq) { if (!remote_console_random_number || (remote_console_random_number_len < IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) || !IPMI_PRIVILEGE_LEVEL_VALID (requested_maximum_privilege_level) || !IPMI_USER_NAME_LOOKUP_VALID (name_only_lookup_flag) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_rmcpplus_rakp_message_1) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "message_tag", message_tag); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "managed_system_session_id", managed_system_session_id); FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "remote_console_random_number", remote_console_random_number, remote_console_random_number_len); FILL_FIID_OBJ_SET (obj_cmd_rq, "requested_maximum_privilege_level", requested_maximum_privilege_level); FILL_FIID_OBJ_SET (obj_cmd_rq, "name_only_lookup", name_only_lookup_flag); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved2", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved3", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "user_name_length", user_name_len); if (user_name && user_name_len) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "user_name", user_name, user_name_len); return (0); } int fill_rmcpplus_rakp_message_3 (uint8_t message_tag, uint8_t rmcpplus_status_code, uint32_t managed_system_session_id, const void *key_exchange_authentication_code, unsigned int key_exchange_authentication_code_len, fiid_obj_t obj_cmd_rq) { if ((key_exchange_authentication_code && key_exchange_authentication_code_len > IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH) || !RMCPPLUS_STATUS_VALID (rmcpplus_status_code) || !fiid_obj_valid (obj_cmd_rq)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd_rq, tmpl_rmcpplus_rakp_message_3) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_cmd_rq); FILL_FIID_OBJ_SET (obj_cmd_rq, "message_tag", message_tag); FILL_FIID_OBJ_SET (obj_cmd_rq, "reserved1", 0); FILL_FIID_OBJ_SET (obj_cmd_rq, "rmcpplus_status_code", rmcpplus_status_code); FILL_FIID_OBJ_SET (obj_cmd_rq, "managed_system_session_id", managed_system_session_id); if (key_exchange_authentication_code && key_exchange_authentication_code_len > 0) FILL_FIID_OBJ_SET_DATA (obj_cmd_rq, "key_exchange_authentication_code", key_exchange_authentication_code, key_exchange_authentication_code_len); return (0); } static int _construct_payload_buf (uint8_t payload_type, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, void *payload_buf, unsigned int payload_buf_len) { int obj_lan_msg_hdr_len = 0; int obj_cmd_len = 0; int obj_lan_msg_trlr_len = 0; int checksum_start_offset, len, rv = -1; unsigned int payload_len; uint8_t checksum; unsigned int indx = 0; fiid_obj_t obj_lan_msg_trlr = NULL; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(fiid_obj_valid (obj_lan_msg_hdr) && fiid_obj_template_compare (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 && fiid_obj_packet_valid (obj_lan_msg_hdr) == 1)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1)) && payload_buf && payload_buf_len); if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if ((obj_lan_msg_hdr_len = fiid_obj_len_bytes (obj_lan_msg_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } if ((obj_lan_msg_trlr_len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } payload_len = obj_lan_msg_hdr_len + obj_cmd_len + obj_lan_msg_trlr_len; if (payload_len > IPMI_MAX_PAYLOAD_LENGTH) { SET_ERRNO (EINVAL); goto cleanup; } if (payload_len > payload_buf_len) { SET_ERRNO (ENOSPC); goto cleanup; } if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if ((len = fiid_obj_get_all (obj_lan_msg_hdr, payload_buf + indx, payload_buf_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } indx += len; } if ((len = fiid_obj_get_all (obj_cmd, payload_buf + indx, payload_buf_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } indx += len; if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { ERRNO_TRACE (errno); goto cleanup; } if ((checksum_start_offset = fiid_template_field_end_bytes (tmpl_lan_msg_hdr_rq, "checksum1")) < 0) { ERRNO_TRACE (errno); goto cleanup; } checksum = ipmi_checksum (payload_buf + checksum_start_offset, indx - checksum_start_offset); if (fiid_obj_set_all (obj_lan_msg_trlr, &checksum, sizeof (checksum)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } if ((len = fiid_obj_get_all (obj_lan_msg_trlr, payload_buf + indx, payload_buf_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } indx += len; } rv = indx; cleanup: fiid_obj_destroy (obj_lan_msg_trlr); return (rv); } static int _construct_payload_confidentiality_none (uint8_t payload_type, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_rmcpplus_payload) { uint8_t payload_buf[IPMI_MAX_PAYLOAD_LENGTH]; int payload_len; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !fiid_obj_valid (obj_lan_msg_hdr)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1)) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1); if ((payload_len = _construct_payload_buf (payload_type, obj_lan_msg_hdr, obj_cmd, payload_buf, IPMI_MAX_PAYLOAD_LENGTH)) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", payload_buf, payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } return (payload_len); } static int _construct_payload_confidentiality_aes_cbc_128 (uint8_t payload_type, uint8_t payload_encrypted, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, const void *confidentiality_key, unsigned int confidentiality_key_len, fiid_obj_t obj_rmcpplus_payload) { uint8_t iv[IPMI_CRYPT_AES_CBC_128_IV_LENGTH]; int iv_len; uint8_t payload_buf[IPMI_MAX_PAYLOAD_LENGTH]; uint8_t pad_len, pad_tmp; int payload_len, cipher_keylen, cipher_blocklen, encrypt_len; /* Note: Confidentiality Key for AES_CBS_128 is K2 */ assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && payload_encrypted && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !fiid_obj_valid (obj_lan_msg_hdr)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_remote_console_to_bmc) == 1)) && fiid_obj_packet_valid (obj_cmd) == 1 && confidentiality_key && confidentiality_key_len && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1); if ((cipher_keylen = crypt_cipher_key_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); return (-1); } assert (!(cipher_keylen < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH)); if (confidentiality_key_len < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH) { SET_ERRNO (EINVAL); return (-1); } confidentiality_key_len = IPMI_CRYPT_AES_CBC_128_KEY_LENGTH; if ((cipher_blocklen = crypt_cipher_block_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); return (-1); } assert (cipher_blocklen == IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); if ((iv_len = ipmi_get_random (iv, IPMI_CRYPT_AES_CBC_128_IV_LENGTH)) < 0) { ERRNO_TRACE (errno); return (-1); } if (iv_len != IPMI_CRYPT_AES_CBC_128_IV_LENGTH) { ERRNO_TRACE (errno); return (-1); } if ((payload_len = _construct_payload_buf (payload_type, obj_lan_msg_hdr, obj_cmd, payload_buf, IPMI_MAX_PAYLOAD_LENGTH)) < 0) { ERRNO_TRACE (errno); return (-1); } /* Pad the data appropriately */ /* +1 is for the pad length field */ pad_tmp = ((payload_len + 1) % IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); if (pad_tmp) pad_len = IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH - pad_tmp; else pad_len = 0; if ((payload_len + pad_len + 1) > IPMI_MAX_PAYLOAD_LENGTH) { SET_ERRNO (ENOSPC); return (-1); } if (pad_len) { unsigned int i; for (i = 0; i < pad_len; i++) payload_buf[payload_len + i] = i + 1; } payload_buf[payload_len + pad_len] = pad_len; /* +1 for pad length field */ if ((encrypt_len = crypt_cipher_encrypt (IPMI_CRYPT_CIPHER_AES, IPMI_CRYPT_CIPHER_MODE_CBC, confidentiality_key, confidentiality_key_len, iv, iv_len, payload_buf, payload_len + pad_len + 1)) < 0) { ERRNO_TRACE (errno); return (-1); } if (encrypt_len != (payload_len + pad_len + 1)) { SET_ERRNO (EINVAL); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_header", iv, IPMI_CRYPT_AES_CBC_128_IV_LENGTH) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", payload_buf, payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_trailer", payload_buf + payload_len, pad_len + 1) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } return (iv_len + payload_len + pad_len + 1); } static int _construct_payload_rakp (uint8_t payload_type, fiid_obj_t obj_cmd, fiid_obj_t obj_rmcpplus_payload) { uint8_t obj_cmd_buf[IPMI_MAX_PAYLOAD_LENGTH]; int obj_cmd_len = 0; assert ((payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_open_session_request) < 0) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_rakp_message_1) < 0) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3 && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_rakp_message_3) < 0) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1 && fiid_obj_packet_valid (obj_cmd) == 1); if ((obj_cmd_len = fiid_obj_get_all (obj_cmd, obj_cmd_buf, IPMI_MAX_PAYLOAD_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", obj_cmd_buf, obj_cmd_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } return (obj_cmd_len); } static int _construct_payload (uint8_t payload_type, uint8_t payload_encrypted, uint8_t authentication_algorithm, uint8_t confidentiality_algorithm, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, const void *confidentiality_key, unsigned int confidentiality_key_len, fiid_obj_t obj_rmcpplus_payload) { assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !fiid_obj_valid (obj_lan_msg_hdr)) && fiid_obj_valid (obj_cmd) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rq) == 1 && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1); if (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) return (_construct_payload_confidentiality_none (payload_type, obj_lan_msg_hdr, obj_cmd, obj_rmcpplus_payload)); else /* IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 */ return (_construct_payload_confidentiality_aes_cbc_128 (payload_type, payload_encrypted, obj_lan_msg_hdr, obj_cmd, confidentiality_key, confidentiality_key_len, obj_rmcpplus_payload)); } else return (_construct_payload_rakp (payload_type, obj_cmd, obj_rmcpplus_payload)); } static int _construct_session_trlr_pad (uint8_t integrity_algorithm, unsigned int ipmi_msg_len, fiid_obj_t obj_rmcpplus_session_trlr) { int pad_length_field_len, next_header_field_len; unsigned int pad_length = 0; uint8_t pad_bytes[IPMI_INTEGRITY_PAD_MULTIPLE] = { IPMI_INTEGRITY_PAD_DATA, IPMI_INTEGRITY_PAD_DATA, IPMI_INTEGRITY_PAD_DATA, IPMI_INTEGRITY_PAD_DATA}; assert (IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) && fiid_obj_valid (obj_rmcpplus_session_trlr) && fiid_obj_template_compare (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) == 1); if ((pad_length_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "pad_length")) < 0) { ERRNO_TRACE (errno); return (-1); } if ((next_header_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "next_header")) < 0) { ERRNO_TRACE (errno); return (-1); } ipmi_msg_len += pad_length_field_len; ipmi_msg_len += next_header_field_len; if (ipmi_msg_len % IPMI_INTEGRITY_PAD_MULTIPLE) pad_length = IPMI_INTEGRITY_PAD_MULTIPLE - (ipmi_msg_len % IPMI_INTEGRITY_PAD_MULTIPLE); if (pad_length) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "integrity_pad", pad_bytes, pad_length) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } } if (fiid_obj_set (obj_rmcpplus_session_trlr, "pad_length", pad_length) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } return (0); } static int _calculate_authentication_code_len (uint8_t integrity_algorithm) { int authentication_code_len; assert ((integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128)); if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_code_len = 0; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_code_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_code_len = IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) authentication_code_len = IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH; else /* IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 */ authentication_code_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; return (authentication_code_len); } static int _construct_session_trlr_authentication_code (uint8_t integrity_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *authentication_code_data, unsigned int authentication_code_data_len, fiid_obj_t obj_rmcpplus_session_trlr, void *pkt_data, unsigned int pkt_data_len, void *authentication_code_buf, unsigned int authentication_code_buf_len) { int crypt_digest_len, authentication_code_len, integrity_digest_len, len, rv = -1; unsigned int hash_algorithm, hash_flags, expected_digest_len, copy_digest_len, hash_data_len; uint8_t hash_data[IPMI_MAX_PAYLOAD_LENGTH]; uint8_t integrity_digest[IPMI_MAX_INTEGRITY_DATA_LENGTH]; uint8_t pwbuf[IPMI_2_0_MAX_PASSWORD_LENGTH]; assert ((integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) && !(integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 && authentication_code_data && authentication_code_data_len > IPMI_2_0_MAX_PASSWORD_LENGTH) && fiid_obj_valid (obj_rmcpplus_session_trlr) && pkt_data && pkt_data_len && authentication_code_buf && authentication_code_buf_len); if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } /* Check if the user provided an authentication code, if so, use it */ if ((len = fiid_obj_field_len_bytes (obj_rmcpplus_session_trlr, "authentication_code")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } if (len) { if ((len = fiid_obj_get_data (obj_rmcpplus_session_trlr, "authentication_code", authentication_code_buf, authentication_code_buf_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } return (len); } if ((authentication_code_len = _calculate_authentication_code_len (integrity_algorithm)) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* Note: Integrity Key for HMAC_SHA1_96 and HMAC_MD5_128 is K1 */ if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) { hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA1_DIGEST_LENGTH; copy_digest_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; } else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) { hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_MD5_DIGEST_LENGTH; copy_digest_len = IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH; } else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = 0; expected_digest_len = MD5_DIGEST_LENGTH; copy_digest_len = IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH; } else /* IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 */ { hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA256_DIGEST_LENGTH; copy_digest_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; } if ((crypt_digest_len = crypt_hash_digest_len (hash_algorithm)) < 0) { ERRNO_TRACE (errno); goto cleanup; } assert (crypt_digest_len == expected_digest_len); hash_data_len = 0; if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { /* achu: Password must be zero padded */ memset (pwbuf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); if (authentication_code_data && authentication_code_data_len) memcpy (pwbuf, authentication_code_data, authentication_code_data_len); memcpy (hash_data + hash_data_len, pwbuf, IPMI_2_0_MAX_PASSWORD_LENGTH); hash_data_len += IPMI_2_0_MAX_PASSWORD_LENGTH; } memcpy (hash_data + hash_data_len, pkt_data, pkt_data_len); hash_data_len += pkt_data_len; if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { memcpy (hash_data + hash_data_len, pwbuf, IPMI_2_0_MAX_PASSWORD_LENGTH); hash_data_len += IPMI_2_0_MAX_PASSWORD_LENGTH; } if ((integrity_digest_len = crypt_hash (hash_algorithm, hash_flags, integrity_key, integrity_key_len, hash_data, hash_data_len, integrity_digest, IPMI_MAX_INTEGRITY_DATA_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (integrity_digest_len != crypt_digest_len) { SET_ERRNO (EINVAL); goto cleanup; } if (integrity_digest_len > authentication_code_buf_len) { SET_ERRNO (ENOSPC); goto cleanup; } memcpy (authentication_code_buf, integrity_digest, copy_digest_len); rv = copy_digest_len; cleanup: /* secure_memset b/c contains password */ secure_memset (pwbuf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); return (rv); } int assemble_ipmi_rmcpplus_pkt (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *authentication_code_data, unsigned int authentication_code_data_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_rmcpplus_session_hdr, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_rmcpplus_session_trlr, void *pkt, unsigned int pkt_len, unsigned int flags) { unsigned int indx = 0; int obj_rmcp_hdr_len, obj_len, oem_iana_len, oem_payload_id_len, payload_len, len, rv = -1; uint8_t payload_type, payload_authenticated, payload_encrypted; uint32_t session_id, session_sequence_number; uint64_t val; fiid_obj_t obj_rmcpplus_payload = NULL; fiid_obj_t obj_session_hdr_temp = NULL; fiid_obj_t obj_rmcpplus_session_trlr_temp = NULL; unsigned int flags_mask = 0; /* achu: obj_lan_msg_hdr only needed for payload type IPMI * * If integrity_algorithm != NONE, technically the key can be NULL */ if (!IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 && authentication_code_data && authentication_code_data_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && !(confidentiality_key && confidentiality_key_len)) || !fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_rmcpplus_session_hdr) || !fiid_obj_valid (obj_cmd) || !pkt || !pkt_len || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_hdr, tmpl_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } /* * Can't use fiid_obj_packet_valid() on obj_rmcpplus_session_hdr b/c * a ipmi_payload_len is required but may not be set yet. */ if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_type = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.authenticated", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_authenticated = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.encrypted", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_encrypted = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } session_id = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_sequence_number", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } session_sequence_number = val; /* Note: We don't check consider OPEN_SESSION_RESPONSE, RAKP2 or * RAKP4 payload types b/c they are responses, not requests. */ if ((payload_type != IPMI_PAYLOAD_TYPE_IPMI && payload_type != IPMI_PAYLOAD_TYPE_SOL && payload_type != IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1 && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) || (IPMI_PAYLOAD_TYPE_SESSION_SETUP (payload_type) && (payload_authenticated || payload_encrypted || session_id || session_sequence_number)) || (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_UNAUTHENTICATED && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_NONE) || (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED && !(integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128)) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE && payload_encrypted != IPMI_PAYLOAD_FLAG_UNENCRYPTED)) { SET_ERRNO (EINVAL); return (-1); } if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (!fiid_obj_valid (obj_lan_msg_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rq) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_lan_msg_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_sol_payload_data) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_sol_payload_data_remote_console_to_bmc) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_request) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_1) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_3) < 0) { ERRNO_TRACE (errno); return (-1); } } if (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED) { /* * Can't use fiid_obj_packet_valid() on obj_rmcpplus_session_trlr b/c * integrity pad, pad length, and authentication code may not be set. */ if (!fiid_obj_valid (obj_rmcpplus_session_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } } if ((oem_iana_len = fiid_obj_field_len (obj_rmcpplus_session_hdr, "oem_iana")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } if ((oem_payload_id_len = fiid_obj_field_len (obj_rmcpplus_session_hdr, "oem_payload_id")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } /* achu: The OEM payload type isn't supported, but I'll leave this * code for the sake of potential future support */ if (payload_type == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT) { SET_ERRNO (EINVAL); return (-1); } else { if (oem_iana_len || oem_payload_id_len) { SET_ERRNO (EINVAL); return (-1); } } /* * Copy RMCP header into packet */ indx = 0; if ((obj_rmcp_hdr_len = fiid_obj_len_bytes (obj_rmcp_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (obj_rmcp_hdr_len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); return (-1); } if ((obj_rmcp_hdr_len = fiid_obj_get_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } indx += obj_rmcp_hdr_len; /* * Copy Session Header into packet */ if ((len = fiid_obj_block_len_bytes (obj_rmcpplus_session_hdr, "authentication_type", "session_sequence_number")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } if (len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); return (-1); } if ((len = fiid_obj_get_block (obj_rmcpplus_session_hdr, "authentication_type", "session_sequence_number", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } indx += len; /* * Construct/Encrypt Payload and copy into packet */ if (!(obj_rmcpplus_payload = fiid_obj_create (tmpl_rmcpplus_payload))) { ERRNO_TRACE (errno); goto cleanup; } if ((payload_len = _construct_payload (payload_type, payload_encrypted, authentication_algorithm, confidentiality_algorithm, obj_lan_msg_hdr, obj_cmd, confidentiality_key, confidentiality_key_len, obj_rmcpplus_payload)) < 0) { ERRNO_TRACE (errno); goto cleanup; } /* * Copy IPMI Payload Length into packet */ if (!(obj_session_hdr_temp = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set (obj_session_hdr_temp, "ipmi_payload_len", payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr_temp); goto cleanup; } if ((obj_len = fiid_obj_len_bytes (obj_session_hdr_temp)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr_temp); goto cleanup; } if (obj_len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); goto cleanup; } if ((obj_len = fiid_obj_get_all (obj_session_hdr_temp, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_session_hdr_temp); goto cleanup; } indx += obj_len; /* * Copy IPMI Payload into packet */ if ((obj_len = fiid_obj_len_bytes (obj_rmcpplus_payload)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } if (obj_len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); goto cleanup; } if ((obj_len = fiid_obj_get_all (obj_rmcpplus_payload, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); goto cleanup; } indx += obj_len; if (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED) { uint8_t authentication_code_buf[IPMI_MAX_PAYLOAD_LENGTH]; int authentication_code_len; if (!(obj_rmcpplus_session_trlr_temp = fiid_obj_dup (obj_rmcpplus_session_trlr))) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } if (_construct_session_trlr_pad (integrity_algorithm, (indx - obj_rmcp_hdr_len), obj_rmcpplus_session_trlr_temp) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((len = fiid_obj_block_len_bytes (obj_rmcpplus_session_trlr_temp, "integrity_pad", "next_header")) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr_temp); goto cleanup; } if (len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); goto cleanup; } if ((len = fiid_obj_get_block (obj_rmcpplus_session_trlr_temp, "integrity_pad", "next_header", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr_temp); goto cleanup; } indx += len; /* achu: Note that the integrity code is all data prior to the authentication_code, so this * call must be done after the pad, pad length, and next header are copied into * the pkt buffer. */ if ((authentication_code_len = _construct_session_trlr_authentication_code (integrity_algorithm, integrity_key, integrity_key_len, authentication_code_data, authentication_code_data_len, obj_rmcpplus_session_trlr_temp, pkt + obj_rmcp_hdr_len, indx - obj_rmcp_hdr_len, authentication_code_buf, IPMI_MAX_PAYLOAD_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (authentication_code_len) { if (authentication_code_len > (pkt_len - indx)) { SET_ERRNO (ENOSPC); goto cleanup; } memcpy (pkt + indx, authentication_code_buf, authentication_code_len); indx += authentication_code_len; } } if (indx > INT_MAX) { SET_ERRNO (EMSGSIZE); goto cleanup; } rv = indx; cleanup: fiid_obj_destroy (obj_rmcpplus_payload); fiid_obj_destroy (obj_session_hdr_temp); fiid_obj_destroy (obj_rmcpplus_session_trlr_temp); return (rv); } /* return 1 on full parse, 0 if not, -1 on error */ static int _deconstruct_payload_buf (uint8_t payload_type, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, const void *pkt, unsigned int lan_msg_len) { int obj_lan_msg_trlr_len, len; unsigned int obj_cmd_len, indx = 0; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(fiid_obj_valid (obj_lan_msg_hdr) && fiid_obj_template_compare (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1 && fiid_obj_valid (obj_lan_msg_trlr) && fiid_obj_template_compare (obj_lan_msg_trlr, tmpl_lan_msg_trlr) == 1)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && pkt && lan_msg_len); if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if ((obj_lan_msg_trlr_len = fiid_template_len_bytes (tmpl_lan_msg_trlr)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((len = fiid_obj_set_all (obj_lan_msg_hdr, pkt + indx, lan_msg_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } indx += len; if (indx >= lan_msg_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } /* achu: For payload_type == IPMI Whatever is in between the * header and the trailer is the command data */ if ((lan_msg_len - indx) <= obj_lan_msg_trlr_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } obj_cmd_len = (lan_msg_len - indx) - obj_lan_msg_trlr_len; } else /* payload_type == IPMI_PAYLOAD_TYPE_SOL */ obj_cmd_len = lan_msg_len; if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, obj_cmd_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } indx += len; if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (indx >= lan_msg_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_lan_msg_trlr, pkt + indx, lan_msg_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); return (-1); } } return (1); } /* return 1 on full parse, 0 if not, -1 on error */ static int _deconstruct_payload_confidentiality_none (uint8_t payload_type, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, const void *pkt, uint16_t ipmi_payload_len) { int ret; assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1 && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(fiid_obj_valid (obj_lan_msg_hdr) && fiid_obj_template_compare (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1 && fiid_obj_valid (obj_lan_msg_trlr) && fiid_obj_template_compare (obj_lan_msg_trlr, tmpl_lan_msg_trlr) == 1)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && pkt && ipmi_payload_len); /* achu: No encryption, so ipmi_payload_len is the length of * the msg_hdr, cmd, and msg_trlr. */ if ((ret = _deconstruct_payload_buf (payload_type, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, pkt, ipmi_payload_len)) < 0) { ERRNO_TRACE (errno); return (-1); } if (!ret) return (0); if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } return (1); } /* return 1 on full parse, 0 if not, -1 on error */ static int _deconstruct_payload_confidentiality_aes_cbc_128 (uint8_t payload_type, uint8_t payload_encrypted, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, uint16_t ipmi_payload_len) { uint8_t iv[IPMI_CRYPT_AES_CBC_128_IV_LENGTH]; uint8_t payload_buf[IPMI_MAX_PAYLOAD_LENGTH]; uint8_t pad_length; int cipher_keylen, cipher_blocklen, decrypt_len; unsigned int payload_data_len, cmd_data_len, indx = 0; /* Note: Confidentiality Key for AES_CBS_128 is K2 */ assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) && payload_encrypted == IPMI_PAYLOAD_FLAG_ENCRYPTED && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1 && !(payload_type == IPMI_PAYLOAD_TYPE_IPMI && !(fiid_obj_valid (obj_lan_msg_hdr) && fiid_obj_template_compare (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) == 1 && fiid_obj_valid (obj_lan_msg_trlr) && fiid_obj_template_compare (obj_lan_msg_trlr, tmpl_lan_msg_trlr) == 1)) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_SOL && !(fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data) == 1 || fiid_obj_template_compare (obj_cmd, tmpl_sol_payload_data_bmc_to_remote_console) == 1)) && confidentiality_key && pkt && ipmi_payload_len); if ((cipher_keylen = crypt_cipher_key_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); return (-1); } assert (!(cipher_keylen < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH)); if (confidentiality_key_len < IPMI_CRYPT_AES_CBC_128_KEY_LENGTH) { SET_ERRNO (EINVAL); return (-1); } confidentiality_key_len = IPMI_CRYPT_AES_CBC_128_KEY_LENGTH; if ((cipher_blocklen = crypt_cipher_block_len (IPMI_CRYPT_CIPHER_AES)) < 0) { ERRNO_TRACE (errno); return (-1); } assert (cipher_blocklen == IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); if (ipmi_payload_len < IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } payload_data_len = ipmi_payload_len - IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH; if (!payload_data_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } memcpy (iv, pkt, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH); indx += IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH; memcpy (payload_buf, pkt + indx, payload_data_len); if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_header", iv, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if ((decrypt_len = crypt_cipher_decrypt (IPMI_CRYPT_CIPHER_AES, IPMI_CRYPT_CIPHER_MODE_CBC, confidentiality_key, confidentiality_key_len, iv, IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH, payload_buf, payload_data_len)) < 0) { ERRNO_TRACE (errno); return (-1); } if (decrypt_len != payload_data_len) { SET_ERRNO (EINVAL); return (-1); } pad_length = payload_buf[payload_data_len - 1]; if (pad_length > IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((pad_length + 1) > payload_data_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } cmd_data_len = payload_data_len - pad_length - 1; if (!cmd_data_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", payload_buf, cmd_data_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_payload, "confidentiality_trailer", payload_buf + cmd_data_len, pad_length + 1), 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } /* achu: User is responsible for checking if padding is not corrupt */ return _deconstruct_payload_buf (payload_type, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, payload_buf, cmd_data_len); } /* return 1 on full parse, 0 if not, -1 on error */ static int _deconstruct_payload_rakp (uint8_t payload_type, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_cmd, const void *pkt, uint16_t ipmi_payload_len) { assert ((payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) && fiid_obj_valid (obj_cmd) && !(payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_open_session_response) < 0) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0) && !(payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4 && fiid_obj_template_compare (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1 && pkt && ipmi_payload_len); if (fiid_obj_set_data (obj_rmcpplus_payload, "payload_data", pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (fiid_obj_set_all (obj_cmd, pkt, ipmi_payload_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } return (1); } /* return 1 on full parse, 0 if not, -1 on error */ static int _deconstruct_payload (uint8_t payload_type, uint8_t payload_encrypted, uint8_t authentication_algorithm, uint8_t confidentiality_algorithm, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, uint16_t ipmi_payload_len) { assert ((payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL || payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) && IPMI_PAYLOAD_ENCRYPTED_FLAG_VALID (payload_encrypted) && IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) && IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) && fiid_obj_valid (obj_rmcpplus_payload) && fiid_obj_template_compare (obj_rmcpplus_payload, tmpl_rmcpplus_payload) == 1 && fiid_obj_valid (obj_cmd) && pkt && ipmi_payload_len); /* Note: We don't check consider OPEN_SESSION_REQUEST, RAKP1 or * RAKP3 special b/c they are requests, not responses */ if (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) return (_deconstruct_payload_confidentiality_none (payload_type, obj_rmcpplus_payload, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, pkt, ipmi_payload_len)); else /* IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 */ return (_deconstruct_payload_confidentiality_aes_cbc_128 (payload_type, payload_encrypted, obj_rmcpplus_payload, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, confidentiality_key, confidentiality_key_len, pkt, ipmi_payload_len)); } else return (_deconstruct_payload_rakp (payload_type, obj_rmcpplus_payload, obj_cmd, pkt, ipmi_payload_len)); } int unassemble_ipmi_rmcpplus_pkt (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *integrity_key, unsigned int integrity_key_len, const void *confidentiality_key, unsigned int confidentiality_key_len, const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_rmcpplus_session_hdr, fiid_obj_t obj_rmcpplus_payload, fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr, fiid_obj_t obj_rmcpplus_session_trlr, unsigned int flags) { unsigned int indx = 0; int obj_rmcp_hdr_len, obj_len; uint8_t payload_type, payload_authenticated, payload_encrypted; uint32_t session_id, session_sequence_number; uint16_t ipmi_payload_len; int ret, check_session_trlr_valid = 0; uint64_t val; unsigned int flags_mask = (IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK); /* achu: obj_lan_msg_hdr & trlr only needed for payload type IPMI * * If integrity_algorithm != NONE, technically the key can be NULL */ if (!IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 && !(confidentiality_key && confidentiality_key_len)) || !pkt || !fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_rmcpplus_session_hdr) || !fiid_obj_valid (obj_rmcpplus_payload) || !fiid_obj_valid (obj_cmd) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_hdr, tmpl_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_payload, tmpl_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_clear (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (fiid_obj_clear (obj_rmcpplus_session_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } if (fiid_obj_clear (obj_rmcpplus_payload) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (fiid_obj_clear (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } /* * Extract RMCP header */ if ((obj_rmcp_hdr_len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } indx += obj_rmcp_hdr_len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } /* * Extract auth_type and payload information */ if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "authentication_type", "payload_type.encrypted", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } indx += obj_len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_type = val; if (payload_type != IPMI_PAYLOAD_TYPE_IPMI && payload_type != IPMI_PAYLOAD_TYPE_SOL && payload_type != IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 && payload_type != IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } #if 0 /* * Extract OEM IANA and OEM Payload ID */ /* achu: The OEM payload type isn't supported, but I'll leave this * code for the sake of potential future support */ if (payload_type == IPMI_PAYLOAD_TYPE_OEM_EXPLICIT) { if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "oem_iana", "oem_payload_id", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } indx += obj_len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } } #endif /* * Extract Session ID, Session Sequence Number, and Payload Length */ if ((obj_len = fiid_obj_set_block (obj_rmcpplus_session_hdr, "session_id", "ipmi_payload_len", pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } indx += obj_len; if (pkt_len <= indx) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.authenticated", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_authenticated = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type.encrypted", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } payload_encrypted = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } session_id = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_sequence_number", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } session_sequence_number = val; if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "ipmi_payload_len", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } ipmi_payload_len = val; if ((IPMI_PAYLOAD_TYPE_SESSION_SETUP (payload_type) && (payload_authenticated || payload_encrypted || session_id || session_sequence_number)) || (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_UNAUTHENTICATED && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_NONE) || (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED && !(integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128)) || (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE && payload_encrypted != IPMI_PAYLOAD_FLAG_UNENCRYPTED) || !ipmi_payload_len) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (!fiid_obj_valid (obj_lan_msg_hdr) || !fiid_obj_valid (obj_lan_msg_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_trlr, tmpl_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_clear (obj_lan_msg_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } if (fiid_obj_clear (obj_lan_msg_trlr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_sol_payload_data) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_sol_payload_data_bmc_to_remote_console) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_response) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0) { ERRNO_TRACE (errno); return (-1); } } else if (payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) { if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0) { ERRNO_TRACE (errno); return (-1); } } if (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED) { if (!fiid_obj_valid (obj_rmcpplus_session_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_clear (obj_rmcpplus_session_trlr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } check_session_trlr_valid++; } if ((pkt_len - indx) < ipmi_payload_len) { ERR_TRACE ("shorten ipmi_payload_len", EINVAL); ipmi_payload_len = pkt_len - indx; } /* * Deconstruct/Decrypt Payload */ if ((ret = _deconstruct_payload (payload_type, payload_encrypted, authentication_algorithm, confidentiality_algorithm, obj_rmcpplus_payload, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, confidentiality_key, confidentiality_key_len, pkt + indx, ipmi_payload_len)) < 0) { ERRNO_TRACE (errno); return (-1); } if (!ret) return (0); indx += ipmi_payload_len; if (session_id && payload_authenticated == IPMI_PAYLOAD_FLAG_AUTHENTICATED) { int pad_length_field_len, next_header_field_len; unsigned int authentication_code_len; uint8_t pad_length; if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_code_len = 0; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_code_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_code_len = IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) authentication_code_len = IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH; else /* IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 */ authentication_code_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; if ((pad_length_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "pad_length")) < 0) { ERRNO_TRACE (errno); return (-1); } if ((next_header_field_len = fiid_template_field_len_bytes (tmpl_rmcpplus_session_trlr, "next_header")) < 0) { ERRNO_TRACE (errno); return (-1); } /* achu: There needs to be atleast the next_header and pad_length fields */ if ((pkt_len - indx) < (authentication_code_len + pad_length_field_len + next_header_field_len)) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (authentication_code_len) { if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "authentication_code", pkt + indx + ((pkt_len - indx) - authentication_code_len), authentication_code_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } } if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "next_header", pkt + indx + ((pkt_len - indx) - authentication_code_len - next_header_field_len), next_header_field_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "pad_length", pkt + indx + ((pkt_len - indx) - authentication_code_len - next_header_field_len - pad_length_field_len), pad_length_field_len) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } if (FIID_OBJ_GET (obj_rmcpplus_session_trlr, "pad_length", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } pad_length = val; if (pad_length > IPMI_INTEGRITY_PAD_MULTIPLE) { /* cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if (pad_length > (pkt_len - indx - authentication_code_len - pad_length_field_len - next_header_field_len)) { ERR_TRACE ("shorten pad_length", EINVAL); pad_length = (pkt_len - indx - authentication_code_len - pad_length_field_len - next_header_field_len); } if (fiid_obj_set_data (obj_rmcpplus_session_trlr, "integrity_pad", pkt + indx, pad_length) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } } if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_rmcpplus_session_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_rmcpplus_payload) == 1 && FIID_OBJ_PACKET_VALID (obj_lan_msg_hdr) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1) && FIID_OBJ_PACKET_VALID (obj_lan_msg_trlr) == 1 && (!check_session_trlr_valid || FIID_OBJ_PACKET_VALID (obj_rmcpplus_session_trlr) == 1)) return (1); } else { if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_rmcpplus_session_hdr) == 1 && FIID_OBJ_PACKET_VALID (obj_rmcpplus_payload) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1) && (!check_session_trlr_valid || FIID_OBJ_PACKET_VALID (obj_rmcpplus_session_trlr) == 1)) return (1); } return (0); } ssize_t ipmi_rmcpplus_sendto (int s, const void *buf, size_t len, int flags, const struct sockaddr *to, socklen_t tolen) { /* achu: Per specification table 13-8, no legacy padding for IPMI * 2.0 packets, so call common sendto. */ return (ipmi_network_sendto (s, buf, len, flags, to, tolen)); } ssize_t ipmi_rmcpplus_recvfrom (int s, void *buf, size_t len, int flags, struct sockaddr *from, socklen_t *fromlen) { return (ipmi_network_recvfrom (s, buf, len, flags, from, fromlen)); } freeipmi-1.6.4/libfreeipmi/interface/rmcp-interface.c0000644002055400205540000001363513527331637022566 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/interface/ipmi-interface.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_rmcp_hdr = { { 8, "version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "message_class.class", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "message_class.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "message_class.ack", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; int fill_rmcp_hdr (uint8_t message_class, fiid_obj_t obj_rmcp_hdr) { if (!RMCP_HDR_MESSAGE_CLASS_VALID (message_class) || !fiid_obj_valid (obj_rmcp_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_rmcp_hdr); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "version", RMCP_VERSION_1_0); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "reserved", 0); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "sequence_number", RMCP_HDR_SEQ_NUM_NO_RMCP_ACK); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.class", message_class); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.reserved", 0); FILL_FIID_OBJ_SET (obj_rmcp_hdr, "message_class.ack", RMCP_HDR_MESSAGE_CLASS_BIT_RMCP_NORMAL); return (0); } int fill_rmcp_hdr_ipmi (fiid_obj_t obj_rmcp_hdr) { return (fill_rmcp_hdr (RMCP_HDR_MESSAGE_CLASS_IPMI, obj_rmcp_hdr)); } int fill_rmcp_hdr_asf (fiid_obj_t obj_rmcp_hdr) { return (fill_rmcp_hdr (RMCP_HDR_MESSAGE_CLASS_ASF, obj_rmcp_hdr)); } int assemble_rmcp_pkt (fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_cmd, void *pkt, unsigned int pkt_len, unsigned int flags) { int obj_cmd_len, obj_rmcp_hdr_len; unsigned int flags_mask = 0; if (!fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_cmd) || !pkt || !pkt_len || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if ((obj_rmcp_hdr_len = fiid_obj_len_bytes (obj_rmcp_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (pkt_len < (obj_rmcp_hdr_len + obj_cmd_len)) { SET_ERRNO (EMSGSIZE); return (-1); } if ((obj_rmcp_hdr_len = fiid_obj_get_all (obj_rmcp_hdr, pkt, pkt_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if ((obj_cmd_len = fiid_obj_get_all (obj_cmd, pkt + obj_rmcp_hdr_len, pkt_len - obj_rmcp_hdr_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } return (obj_rmcp_hdr_len + obj_cmd_len); } int unassemble_rmcp_pkt (const void *pkt, unsigned int pkt_len, fiid_obj_t obj_rmcp_hdr, fiid_obj_t obj_cmd, unsigned int flags) { unsigned int indx = 0; int len; unsigned int flags_mask = (IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK); if (!pkt || !fiid_obj_valid (obj_rmcp_hdr) || !fiid_obj_valid (obj_cmd) || (flags & ~flags_mask)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcp_hdr, tmpl_rmcp_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (fiid_obj_clear (obj_rmcp_hdr) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } if (fiid_obj_clear (obj_cmd) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if ((len = fiid_obj_set_all (obj_rmcp_hdr, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcp_hdr); return (-1); } indx += len; if (pkt_len <= indx) { /* trace, but don't error out, cannot parse packet */ ERR_TRACE ("malformed packet", EINVAL); return (0); } if ((len = fiid_obj_set_all (obj_cmd, pkt + indx, pkt_len - indx)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } indx += len; if (FIID_OBJ_PACKET_VALID (obj_rmcp_hdr) == 1 && ((flags & IPMI_INTERFACE_FLAGS_NO_LEGAL_CHECK) || FIID_OBJ_PACKET_SUFFICIENT (obj_cmd) == 1)) return (1); return (0); } freeipmi-1.6.4/libfreeipmi/interpret/0000755002055400205540000000000013527342542017564 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret.c0000644002055400205540000020420613527331637022707 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "ipmi-interpret-defs.h" #include "ipmi-interpret-trace.h" #include "ipmi-interpret-config-sel.h" #include "ipmi-interpret-config-sensor.h" #include "ipmi-interpret-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" static char *ipmi_interpret_errmsgs[] = { "success", "context null", "context invalid", "invalid parameters", "out of memory", "permission denied", "sel config file does not exist", "sel config file parse error", "sensor config file does not exist", "sensor config file parse error", "invalid sel record", "internal system error", "buffer overflow", "internal error", "errnum out of range", NULL }; /* 16th bit reserved, see Get Sensor Reading command in spec */ #define IPMI_INTERPRET_MAX_SENSOR_AND_EVENT_OFFSET 15 /* upper bits of threshold based sensor can be 1b, may need to ignore them */ #define IPMI_INTERPRET_THRESHOLD_SENSOR_EVENT_BITMASK_MASK 0x3F ipmi_interpret_ctx_t ipmi_interpret_ctx_create (void) { struct ipmi_interpret_ctx *ctx = NULL; if (!(ctx = (ipmi_interpret_ctx_t)malloc (sizeof (struct ipmi_interpret_ctx)))) { ERRNO_TRACE (errno); return (NULL); } memset (ctx, '\0', sizeof (struct ipmi_interpret_ctx)); ctx->magic = IPMI_INTERPRET_CTX_MAGIC; ctx->flags = IPMI_INTERPRET_FLAGS_DEFAULT; if (!(ctx->sel_ctx = ipmi_sel_ctx_create (NULL, NULL))) { ERRNO_TRACE (errno); goto cleanup; } if (interpret_sel_init (ctx) < 0) goto cleanup; if (interpret_sensor_init (ctx) < 0) goto cleanup; return (ctx); cleanup: if (ctx) { ipmi_sel_ctx_destroy (ctx->sel_ctx); interpret_sel_destroy (ctx); interpret_sensor_destroy (ctx); free (ctx); } return (NULL); } void ipmi_interpret_ctx_destroy (ipmi_interpret_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) return; ipmi_sel_ctx_destroy (ctx->sel_ctx); interpret_sel_destroy (ctx); interpret_sensor_destroy (ctx); ctx->magic = ~IPMI_INTERPRET_CTX_MAGIC; free (ctx); } int ipmi_interpret_ctx_errnum (ipmi_interpret_ctx_t ctx) { if (!ctx) return (IPMI_INTERPRET_ERR_CONTEXT_NULL); else if (ctx->magic != IPMI_INTERPRET_CTX_MAGIC) return (IPMI_INTERPRET_ERR_CONTEXT_INVALID); else return (ctx->errnum); } char * ipmi_interpret_ctx_strerror (int errnum) { if (errnum >= IPMI_INTERPRET_ERR_SUCCESS && errnum <= IPMI_INTERPRET_ERR_ERRNUMRANGE) return (ipmi_interpret_errmsgs[errnum]); else return (ipmi_interpret_errmsgs[IPMI_INTERPRET_ERR_ERRNUMRANGE]); } char * ipmi_interpret_ctx_errormsg (ipmi_interpret_ctx_t ctx) { return (ipmi_interpret_ctx_strerror (ipmi_interpret_ctx_errnum (ctx))); } int ipmi_interpret_ctx_get_flags (ipmi_interpret_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (!flags) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_ctx_set_flags (ipmi_interpret_ctx_t ctx, unsigned int flags) { unsigned int tmpflags = 0; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_INTERPRET_FLAGS_MASK) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } if (flags & IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS) tmpflags |= IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS; if (ipmi_sel_ctx_set_flags (ctx->sel_ctx, tmpflags) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_ctx_get_manufacturer_id (ipmi_interpret_ctx_t ctx, uint32_t *manufacturer_id) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (!manufacturer_id) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } *manufacturer_id = ctx->manufacturer_id; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_ctx_set_manufacturer_id (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } ctx->manufacturer_id = manufacturer_id; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_ctx_get_product_id (ipmi_interpret_ctx_t ctx, uint16_t *product_id) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (!product_id) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } *product_id = ctx->product_id; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_ctx_set_product_id (ipmi_interpret_ctx_t ctx, uint16_t product_id) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } ctx->product_id = product_id; ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; return (0); } int ipmi_interpret_load_sel_config (ipmi_interpret_ctx_t ctx, const char *sel_config_file) { struct stat buf; int rv = -1; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (sel_config_file) { if (stat (sel_config_file, &buf) < 0) { if (errno == EACCES || errno == EPERM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PERMISSION); else if (errno == ENOENT) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); goto cleanup; } } else { if (stat (INTERPRET_SEL_CONFIG_FILE_DEFAULT, &buf) < 0) { /* Its not an error if the default configuration file doesn't exist */ if (errno == ENOENT) goto out; else if (errno == EACCES || errno == EPERM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PERMISSION); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); goto cleanup; } } if (interpret_sel_config_parse (ctx, sel_config_file) < 0) goto cleanup; out: rv = 0; cleanup: return (rv); } int ipmi_interpret_load_sensor_config (ipmi_interpret_ctx_t ctx, const char *sensor_config_file) { struct stat buf; int rv = -1; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (sensor_config_file) { if (stat (sensor_config_file, &buf) < 0) { if (errno == EACCES || errno == EPERM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PERMISSION); else if (errno == ENOENT) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); goto cleanup; } } else { if (stat (INTERPRET_SENSOR_CONFIG_FILE_DEFAULT, &buf) < 0) { /* Its not an error if the default configuration file doesn't exist */ if (errno == ENOENT) goto out; else if (errno == EACCES || errno == EPERM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PERMISSION); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); goto cleanup; } } if (interpret_sensor_config_parse (ctx, sensor_config_file) < 0) goto cleanup; out: rv = 0; cleanup: return (rv); } static int _get_sel_oem_sensor_state (ipmi_interpret_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t event_reading_type_code, uint8_t sensor_type, unsigned int *sel_state) { char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_sel_oem_sensor_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sel_record); assert (sel_record_len); assert (sel_state); memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", ctx->manufacturer_id, ctx->product_id, event_reading_type_code, sensor_type); if ((oem_conf = hash_find (ctx->interpret_sel.sel_oem_sensor_config, keybuf))) { unsigned int i; uint8_t event_direction; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; int found = 0; (*sel_state) = IPMI_INTERPRET_STATE_NOMINAL; if (ipmi_sel_parse_read_sensor_type (ctx->sel_ctx, sel_record, sel_record_len, &sensor_type) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } if (ipmi_sel_parse_read_event_direction (ctx->sel_ctx, sel_record, sel_record_len, &event_direction) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } if (ipmi_sel_parse_read_event_data1 (ctx->sel_ctx, sel_record, sel_record_len, &event_data1) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } if (ipmi_sel_parse_read_event_data2 (ctx->sel_ctx, sel_record, sel_record_len, &event_data2) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } if (ipmi_sel_parse_read_event_data3 (ctx->sel_ctx, sel_record, sel_record_len, &event_data3) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } for (i = 0; i < oem_conf->oem_sensor_data_count; i++) { if ((oem_conf->oem_sensor_data[i].event_direction_any_flag || oem_conf->oem_sensor_data[i].event_direction == event_direction) && (oem_conf->oem_sensor_data[i].event_data1_any_flag || oem_conf->oem_sensor_data[i].event_data1 == event_data1) && (oem_conf->oem_sensor_data[i].event_data2_any_flag || oem_conf->oem_sensor_data[i].event_data2 == event_data2) && (oem_conf->oem_sensor_data[i].event_data3_any_flag || oem_conf->oem_sensor_data[i].event_data3 == event_data3)) { if (oem_conf->oem_sensor_data[i].sel_state > (*sel_state)) (*sel_state) = oem_conf->oem_sensor_data[i].sel_state; found++; } } if (!found) (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; } else (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; return (0); } static int _get_sel_state (ipmi_interpret_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t event_reading_type_code, uint8_t sensor_type, uint8_t event_direction, uint8_t offset_from_event_reading_type_code, unsigned int *sel_state, struct ipmi_interpret_sel_config **sel_config) { int i = 0; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sel_record); assert (sel_record_len); assert (sel_state); assert (sel_config); (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; i = 0; while (i < offset_from_event_reading_type_code && i < IPMI_INTERPRET_MAX_SENSOR_AND_EVENT_OFFSET && sel_config[i]) i++; if (sel_config[i]) { if (event_direction == IPMI_SEL_RECORD_ASSERTION_EVENT) (*sel_state) = sel_config[i]->assertion_state; else (*sel_state) = sel_config[i]->deassertion_state; } else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA) return (_get_sel_oem_sensor_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, sel_state)); return (0); } static int _get_sel_oem_record_state (ipmi_interpret_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t record_type, unsigned int *sel_state) { char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_sel_oem_record_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sel_record); assert (sel_record_len); assert (sel_state); memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u", ctx->manufacturer_id, ctx->product_id, record_type); if ((oem_conf = hash_find (ctx->interpret_sel.sel_oem_record_config, keybuf))) { unsigned int i, j; uint8_t oem_data[IPMI_SEL_OEM_DATA_MAX]; int oem_data_len; int found = 0; (*sel_state) = IPMI_INTERPRET_STATE_NOMINAL; if ((oem_data_len = ipmi_sel_parse_read_oem (ctx->sel_ctx, sel_record, sel_record_len, oem_data, IPMI_SEL_OEM_DATA_MAX)) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } for (i = 0; i < oem_conf->oem_record_count; i++) { int match = 1; if (oem_data_len != oem_conf->oem_record[i].oem_bytes_count) continue; for (j = 0; j < oem_conf->oem_record[i].oem_bytes_count; j++) { if (!oem_conf->oem_record[i].oem_bytes[j].any_flag && oem_conf->oem_record[i].oem_bytes[j].oem_data_byte != oem_data[j]) { match = 0; break; } } if (match) { if (oem_conf->oem_record[i].sel_state > (*sel_state)) (*sel_state) = oem_conf->oem_record[i].sel_state; found++; } } if (!found) (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; } else (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; return (0); } int ipmi_interpret_sel (ipmi_interpret_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, unsigned int *sel_state) { struct ipmi_interpret_sel_config **sel_config = NULL; uint8_t record_type; int rv = -1; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (!sel_state) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } if (ipmi_sel_parse_read_record_type (ctx->sel_ctx, sel_record, sel_record_len, &record_type) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); return (-1); } /* IPMI Workaround * * HP DL 380 G5 * * Motherboard is reporting SEL Records of record type 0x00, which * is not a valid record type. */ if (ctx->flags & IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS && !IPMI_SEL_RECORD_TYPE_VALID (record_type)) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; if (record_type == IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD) { uint8_t event_direction; uint8_t event_reading_type_code; uint8_t sensor_type; uint8_t offset_from_event_reading_type_code; if (ipmi_sel_parse_read_sensor_type (ctx->sel_ctx, sel_record, sel_record_len, &sensor_type) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); goto cleanup; } if (ipmi_sel_parse_read_event_direction (ctx->sel_ctx, sel_record, sel_record_len, &event_direction) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); goto cleanup; } if (ipmi_sel_parse_read_event_type_code (ctx->sel_ctx, sel_record, sel_record_len, &event_reading_type_code) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); goto cleanup; } if (ipmi_sel_parse_read_event_data1_offset_from_event_reading_type_code (ctx->sel_ctx, sel_record, sel_record_len, &offset_from_event_reading_type_code) < 0) { INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM (ctx, ctx->sel_ctx); goto cleanup; } if (IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { if (_get_sel_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, event_direction, offset_from_event_reading_type_code, sel_state, ctx->interpret_sel.ipmi_interpret_sel_threshold_config) < 0) goto cleanup; } else if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code)) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_temperature_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_temperature_limit_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_temperature_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_voltage_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_voltage_limit_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_voltage_performance_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_voltage_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CURRENT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_current_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_FAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fan_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_FAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fan_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_FAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fan_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY && sensor_type == IPMI_SENSOR_TYPE_FAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fan_transition_availability_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_FAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fan_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_processor_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_supply_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_supply_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_supply_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_unit_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_unit_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_unit_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_unit_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_COOLING_DEVICE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_cooling_device_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_memory_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_memory_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_memory_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_drive_slot_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_drive_slot_predictive_failure_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_drive_slot_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_drive_slot_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_post_memory_resize_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_event_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_button_switch_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_button_switch_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) sel_config = ctx->interpret_sel.ipmi_interpret_sel_module_board_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) sel_config = ctx->interpret_sel.ipmi_interpret_sel_module_board_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CHASSIS) sel_config = ctx->interpret_sel.ipmi_interpret_sel_chassis_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CHIP_SET) sel_config = ctx->interpret_sel.ipmi_interpret_sel_chip_set_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_boot_error_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_boot_error_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP) sel_config = ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_slot_connector_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_PLATFORM_ALERT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_platform_alert_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_entity_presence_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_device_present_config; else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if (_get_sel_oem_sensor_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, sel_state) < 0) goto cleanup; rv = 0; goto cleanup; } else { (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } if (_get_sel_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, event_direction, offset_from_event_reading_type_code, sel_state, sel_config) < 0) goto cleanup; } else if (IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { if (sensor_type == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_physical_security_config; else if (sensor_type == IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_platform_security_violation_attempt_config; else if (sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_processor_config; else if (sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_supply_config; else if (sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_power_unit_config; else if (sensor_type == IPMI_SENSOR_TYPE_MEMORY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_memory_config; else if (sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_drive_slot_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_config; else if (sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED) sel_config = ctx->interpret_sel.ipmi_interpret_sel_event_logging_disabled_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_event_config; else if (sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_critical_interrupt_config; else if (sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_button_switch_config; else if (sensor_type == IPMI_SENSOR_TYPE_CHIP_SET) sel_config = ctx->interpret_sel.ipmi_interpret_sel_chip_set_config; else if (sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_boot_initiated_config; else if (sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_boot_error_config; else if (sensor_type == IPMI_SENSOR_TYPE_OS_BOOT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_os_boot_config; else if (sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP) sel_config = ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_config; else if (sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) sel_config = ctx->interpret_sel.ipmi_interpret_sel_slot_connector_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_system_acpi_power_state_config; else if (sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) sel_config = ctx->interpret_sel.ipmi_interpret_sel_watchdog2_config; else if (sensor_type == IPMI_SENSOR_TYPE_PLATFORM_ALERT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_platform_alert_config; else if (sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_entity_presence_config; else if (sensor_type == IPMI_SENSOR_TYPE_LAN) sel_config = ctx->interpret_sel.ipmi_interpret_sel_lan_config; else if (sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sel_config = ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_config; else if (sensor_type == IPMI_SENSOR_TYPE_BATTERY) sel_config = ctx->interpret_sel.ipmi_interpret_sel_battery_config; else if (sensor_type == IPMI_SENSOR_TYPE_SESSION_AUDIT) sel_config = ctx->interpret_sel.ipmi_interpret_sel_session_audit_config; else if (sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_version_change_config; else if (sensor_type == IPMI_SENSOR_TYPE_FRU_STATE) sel_config = ctx->interpret_sel.ipmi_interpret_sel_fru_state_config; else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if (_get_sel_oem_sensor_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, sel_state) < 0) goto cleanup; rv = 0; goto cleanup; } else { (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } if (_get_sel_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, event_direction, offset_from_event_reading_type_code, sel_state, sel_config) < 0) goto cleanup; } else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_EVENT_READING_TYPE_CODE_IS_OEM (event_reading_type_code)) { if (_get_sel_oem_sensor_state (ctx, sel_record, sel_record_len, event_reading_type_code, sensor_type, sel_state) < 0) goto cleanup; } else { (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } } else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA) { if (_get_sel_oem_record_state (ctx, sel_record, sel_record_len, record_type, sel_state) < 0) goto cleanup; } else { (*sel_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } rv = 0; cleanup: return (rv); } static int _get_threshold_sensor_state (ipmi_interpret_ctx_t ctx, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask, unsigned int *sensor_state) { struct ipmi_interpret_sensor_config **sensor_config; int i = 0; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sensor_state); sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_threshold_config; (*sensor_state) = IPMI_INTERPRET_STATE_NOMINAL; /* upper bits may be set to 1b as defined by IPMI spec, ignore them */ sensor_event_bitmask &= IPMI_INTERPRET_THRESHOLD_SENSOR_EVENT_BITMASK_MASK; i = 0; while (i < IPMI_INTERPRET_MAX_SENSOR_AND_EVENT_OFFSET && sensor_config[i]) { if ((!i && !sensor_event_bitmask) || (sensor_event_bitmask & (0x1 << (i - 1)))) { if (sensor_config[i]->state > (*sensor_state)) (*sensor_state) = sensor_config[i]->state; } if (i) sensor_event_bitmask &= ~(0x1 << (i - 1)); i++; } return (0); } static int _get_sensor_oem_state (ipmi_interpret_ctx_t ctx, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask, unsigned int *sensor_state) { char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sensor_state); memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", ctx->manufacturer_id, ctx->product_id, event_reading_type_code, sensor_type); if ((oem_conf = hash_find (ctx->interpret_sensor.sensor_oem_config, keybuf))) { unsigned int i; int found = 0; (*sensor_state) = IPMI_INTERPRET_STATE_NOMINAL; for (i = 0; i < oem_conf->oem_state_count; i++) { if (oem_conf->oem_state[i].oem_state_type == IPMI_OEM_STATE_TYPE_BITMASK) { if ((oem_conf->oem_state[i].sensor_event_bitmask & sensor_event_bitmask) || (!oem_conf->oem_state[i].sensor_event_bitmask && !sensor_event_bitmask)) { if (oem_conf->oem_state[i].sensor_state > (*sensor_state)) (*sensor_state) = oem_conf->oem_state[i].sensor_state; found++; } } else { if (oem_conf->oem_state[i].sensor_event_bitmask == sensor_event_bitmask) { if (oem_conf->oem_state[i].sensor_state > (*sensor_state)) (*sensor_state) = oem_conf->oem_state[i].sensor_state; found++; } } } if (!found) (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; } else (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; return (0); } static int _get_sensor_state (ipmi_interpret_ctx_t ctx, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask, unsigned int *sensor_state, struct ipmi_interpret_sensor_config **sensor_config) { uint16_t sensor_event_bitmask_tmp = sensor_event_bitmask; int i = 0; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (sensor_state); assert (sensor_config); (*sensor_state) = IPMI_INTERPRET_STATE_NOMINAL; /* ignore 16th bit, as specified in IPMI spec */ sensor_event_bitmask_tmp &= ~(0x1 << IPMI_INTERPRET_MAX_SENSOR_AND_EVENT_OFFSET); i = 0; while (i < IPMI_INTERPRET_MAX_SENSOR_AND_EVENT_OFFSET && sensor_config[i]) { if ((!i && !sensor_event_bitmask_tmp) || (sensor_event_bitmask_tmp & (0x1 << (i - 1)))) { if (sensor_config[i]->state > (*sensor_state)) (*sensor_state) = sensor_config[i]->state; } if (i) sensor_event_bitmask_tmp &= ~(0x1 << (i - 1)); i++; } /* if any bits still set, they are outside of specification range */ if (sensor_event_bitmask_tmp) { if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA) { unsigned int sensor_state_tmp = IPMI_INTERPRET_STATE_NOMINAL; if (_get_sensor_oem_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, &sensor_state_tmp) < 0) return (-1); if (ctx->flags & IPMI_INTERPRET_FLAGS_IGNORE_UNRECOGNIZED_EVENTS) { if (sensor_state_tmp != IPMI_INTERPRET_STATE_UNKNOWN) (*sensor_state) = sensor_state_tmp; } else (*sensor_state) = sensor_state_tmp; } else if (!(ctx->flags & IPMI_INTERPRET_FLAGS_IGNORE_UNRECOGNIZED_EVENTS)) (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; } return (0); } int ipmi_interpret_sensor (ipmi_interpret_ctx_t ctx, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask, unsigned int *sensor_state) { struct ipmi_interpret_sensor_config **sensor_config = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) { ERR_TRACE (ipmi_interpret_ctx_errormsg (ctx), ipmi_interpret_ctx_errnum (ctx)); return (-1); } if (!sensor_state) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_PARAMETERS); return (-1); } if (IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { if (_get_threshold_sensor_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state) < 0) goto cleanup; } else if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code)) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_temperature_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_temperature_limit_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_temperature_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_voltage_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_voltage_limit_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_voltage_performance_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_VOLTAGE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_voltage_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CURRENT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_current_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_FAN) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fan_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_FAN) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_FAN) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fan_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY && sensor_type == IPMI_SENSOR_TYPE_FAN) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_availability_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_FAN) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fan_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_processor_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_COOLING_DEVICE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_cooling_device_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_memory_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_memory_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && sensor_type == IPMI_SENSOR_TYPE_MEMORY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_memory_redundancy_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_predictive_failure_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_post_memory_resize_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_event_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_module_board_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_module_board_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CHASSIS) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_chassis_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CHIP_SET) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_chip_set_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_os_critical_stop_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && sensor_type == IPMI_SENSOR_TYPE_PLATFORM_ALERT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_platform_alert_state_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_device_present_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_transition_severity_config; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT && sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_device_present_config; else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if (_get_sensor_oem_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state) < 0) goto cleanup; rv = 0; goto cleanup; } else { (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } if (_get_sensor_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state, sensor_config) < 0) goto cleanup; } else if (IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { if (sensor_type == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_physical_security_config; else if (sensor_type == IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_platform_security_violation_attempt_config; else if (sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_processor_config; else if (sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_config; else if (sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_config; else if (sensor_type == IPMI_SENSOR_TYPE_MEMORY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_memory_config; else if (sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_config; else if (sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_event_logging_disabled_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_event_config; else if (sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_critical_interrupt_config; else if (sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_config; else if (sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_config; else if (sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_config; else if (sensor_type == IPMI_SENSOR_TYPE_OS_BOOT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_os_boot_config; else if (sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_config; else if (sensor_type == IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_system_acpi_power_state_config; else if (sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_watchdog2_config; else if (sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_config; else if (sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_config; else if (sensor_type == IPMI_SENSOR_TYPE_BATTERY) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_battery_config; else if (sensor_type == IPMI_SENSOR_TYPE_SESSION_AUDIT) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_session_audit_config; else if (sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_version_change_config; else if (sensor_type == IPMI_SENSOR_TYPE_FRU_STATE) sensor_config = ctx->interpret_sensor.ipmi_interpret_sensor_fru_state_config; else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if (_get_sensor_oem_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state) < 0) goto cleanup; rv = 0; goto cleanup; } else { (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } if (_get_sensor_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state, sensor_config) < 0) goto cleanup; } else if (ctx->flags & IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA && IPMI_EVENT_READING_TYPE_CODE_IS_OEM (event_reading_type_code)) { if (_get_sensor_oem_state (ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, sensor_state) < 0) goto cleanup; } else { (*sensor_state) = IPMI_INTERPRET_STATE_UNKNOWN; rv = 0; goto cleanup; } rv = 0; cleanup: return (rv); } freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-common.c0000644002055400205540000001755313527331637025447 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/interpret/ipmi-interpret.h" #include "ipmi-interpret-config-common.h" #include "freeipmi-portability.h" #include "conffile.h" int interpret_config_parse_state (conffile_t cf, char *option_string) { assert (cf); assert (option_string); if (!strcasecmp (option_string, "Nominal")) return (IPMI_INTERPRET_STATE_NOMINAL); else if (!strcasecmp (option_string, "Warning")) return (IPMI_INTERPRET_STATE_WARNING); else if (!strcasecmp (option_string, "Critical")) return (IPMI_INTERPRET_STATE_CRITICAL); conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } int interpret_config_parse_strtoul (conffile_t cf, const char *str, uint32_t max, uint32_t *value) { char *endptr = NULL; assert (cf); assert (str); assert (value); errno = 0; (*value) = strtoul (str, &endptr, 0); if (errno || endptr[0] != '\0' || (*value) > max) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } return (0); } int interpret_config_parse_manufactuer_id_product_id (conffile_t cf, const char *str, struct ipmi_interpret_config_file_ids ids[IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX], unsigned int *ids_count) { char *tmpstr = NULL; char *manufacturer_id_ptr; char *manufacturer_id_lasts; unsigned int i; int rv = -1; assert (cf); assert (str); assert (ids_count); (*ids_count) = 0; if (!(tmpstr = strdup (str))) { conffile_seterrnum (cf, CONFFILE_ERR_OUTMEM); goto cleanup; } manufacturer_id_ptr = strtok_r (tmpstr, ",", &manufacturer_id_lasts); while (manufacturer_id_ptr && (*ids_count) < IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX) { char *product_ids_ptr; char *ptr; uint32_t tmp; if (!(ptr = strchr (manufacturer_id_ptr, ':'))) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); goto cleanup; } (*ptr) = '\0'; product_ids_ptr = ptr + 1; if (interpret_config_parse_strtoul (cf, manufacturer_id_ptr, 0x00FFFFFF, /* 24 bit manufacturer ID */ &tmp) < 0) goto cleanup; ids[(*ids_count)].manufacturer_id = tmp; if ((ptr = strchr (product_ids_ptr, '-'))) { char *product_id1_ptr; char *product_id2_ptr; uint16_t product_id1; uint16_t product_id2; product_id1_ptr = product_ids_ptr; (*ptr) = '\0'; product_id2_ptr = ptr + 1; if (interpret_config_parse_strtoul (cf, product_id1_ptr, USHRT_MAX, &tmp) < 0) goto cleanup; product_id1 = tmp; if (interpret_config_parse_strtoul (cf, product_id2_ptr, USHRT_MAX, &tmp) < 0) goto cleanup; product_id2 = tmp; if (product_id1 > product_id2) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } if ((product_id2 - product_id1 + 1) > IPMI_INTERPRET_CONFIG_FILE_PRODUCT_ID_MAX) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } for (i = 0; i < (product_id2 - product_id1 + 1) ; i++) ids[(*ids_count)].product_ids[i] = product_id1 + i; ids[(*ids_count)].product_ids_count = product_id2 - product_id1 + 1; } else if ((ptr = strchr (product_ids_ptr, '+'))) { unsigned int index = 0; uint16_t product_id; while ((ptr = strchr (product_ids_ptr, '+')) && index < IPMI_INTERPRET_CONFIG_FILE_PRODUCT_ID_MAX) { char *product_id_ptr; product_id_ptr = product_ids_ptr; (*ptr) = '\0'; product_ids_ptr = ptr + 1; if (interpret_config_parse_strtoul (cf, product_id_ptr, USHRT_MAX, &tmp) < 0) goto cleanup; product_id = tmp; ids[(*ids_count)].product_ids[index] = product_id; index++; } if (interpret_config_parse_strtoul (cf, product_ids_ptr, USHRT_MAX, &tmp) < 0) goto cleanup; product_id = tmp; ids[(*ids_count)].product_ids[index] = product_id; index++; ids[(*ids_count)].product_ids_count = index; } else { if (interpret_config_parse_strtoul (cf, product_ids_ptr, USHRT_MAX, &tmp) < 0) goto cleanup; ids[(*ids_count)].product_ids[0] = tmp; ids[(*ids_count)].product_ids_count = 1; } (*ids_count)++; manufacturer_id_ptr = strtok_r (NULL, ",", &manufacturer_id_lasts); } rv = 0; cleanup: free (tmpstr); return (rv); } freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-common.h0000644002055400205540000000364513527331637025451 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_CONFIG_COMMON_H #define IPMI_INTERPRET_CONFIG_COMMON_H #include "freeipmi/interpret/ipmi-interpret.h" #include "ipmi-interpret-defs.h" #include "conffile.h" #define IPMI_INTERPRET_CONFIG_FILE_OPTIONS_MAX 1024 #define IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX 64 #define IPMI_INTERPRET_CONFIG_FILE_PRODUCT_ID_MAX 1024 struct ipmi_interpret_config_file_ids { uint32_t manufacturer_id; uint16_t product_ids[IPMI_INTERPRET_CONFIG_FILE_PRODUCT_ID_MAX]; unsigned product_ids_count; }; int interpret_config_parse_state (conffile_t cf, char *option_string); int interpret_config_parse_strtoul (conffile_t cf, const char *str, uint32_t max, uint32_t *value); int interpret_config_parse_manufactuer_id_product_id (conffile_t cf, const char *str, struct ipmi_interpret_config_file_ids ids[IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX], unsigned int *ids_count); #endif /* IPMI_INTERPRET_CONFIG_COMMON_H */ freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-sel.c0000644002055400205540000062437613527331637024751 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-types-oem-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-node-manager-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-node-manager-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h" #include "ipmi-interpret-defs.h" #include "ipmi-interpret-trace.h" #include "ipmi-interpret-config-common.h" #include "ipmi-interpret-config-sel.h" #include "ipmi-interpret-util.h" #include "freeipmi-portability.h" #include "conffile.h" #include "hash.h" /* * Standard Sensors */ static struct ipmi_interpret_sel_config ipmi_interpret_sel_threshold_config[] = { { "IPMI_Threshold_Sensor_Lower_Non_Critical_Going_Low", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_Lower_Non_Critical_Going_High", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_Lower_Critical_Going_Low", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Threshold_Sensor_Lower_Critical_Going_High", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_Low", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_High", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_Upper_Non_Critical_Going_Low", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_Upper_Non_Critical_Going_High", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_Upper_Critical_Going_Low", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Threshold_Sensor_Upper_Critical_Going_High", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_Low", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_High", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_threshold_config_len = 12; static struct ipmi_interpret_sel_config ipmi_interpret_sel_temperature_state_config[] = { { "IPMI_Temperature_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_temperature_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_temperature_limit_config[] = { { "IPMI_Temperature_Limit_Not_Exceeded", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Limit_Exceeded", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_temperature_limit_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_temperature_transition_severity_config[] = { { "IPMI_Temperature_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_temperature_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_voltage_state_config[] = { { "IPMI_Voltage_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_voltage_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_voltage_limit_config[] = { { "IPMI_Voltage_Limit_Not_Exceeded", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Limit_Exceeded", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_voltage_limit_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_voltage_performance_config[] = { { "IPMI_Voltage_Performance_Met", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Performance_Lags", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_voltage_performance_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_voltage_transition_severity_config[] = { { "IPMI_Voltage_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_voltage_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_current_transition_severity_config[] = { { "IPMI_Current_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_current_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fan_state_config[] = { { "IPMI_Fan_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_fan_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fan_transition_severity_config[] = { { "IPMI_Fan_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_fan_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fan_device_present_config[] = { { "IPMI_Fan_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_fan_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fan_transition_availability_config[] = { { "IPMI_Fan_Transition_Availability_To_Running", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Availability_To_In_Test", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Power_Off", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_On_Line", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Off_Line", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Off_Duty", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Degraded", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Power_Save", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_Install_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_fan_transition_availability_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fan_redundancy_config[] = { { "IPMI_Fan_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_fan_redundancy_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_physical_security_config[] = { { "IPMI_Physical_Security_General_Chassis_Intrusion", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Drive_Bay_Intrusion", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_IO_Card_Intrusion", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Processor_Area_Intrusion", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_LAN_Leash_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Unauthorized_Dock_Undock", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_FAN_Area_Intrusion", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_physical_security_config_len = 7; static struct ipmi_interpret_sel_config ipmi_interpret_sel_platform_security_violation_attempt_config[] = { { "IPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_platform_security_violation_attempt_config_len = 6; static struct ipmi_interpret_sel_config ipmi_interpret_sel_processor_config[] = { { "IPMI_Processor_IERR", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Thermal_Trip", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB1_BIST_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB2_Hang_In_POST_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB3_Processor_Startup_Initialization_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Processor_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_Processor_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Terminator_Presence_Detected", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Processor_Automatically_Throttled", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Processor_Machine_Check_Exception", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Correctable_Machine_Check_Error", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_processor_config_len = 13; static struct ipmi_interpret_sel_config ipmi_interpret_sel_processor_state_config[] = { { "IPMI_Processor_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_processor_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_supply_config[] = { { "IPMI_Power_Supply_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Power_Supply_Failure_Detected", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Inactive", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_power_supply_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_supply_state_config[] = { { "IPMI_Power_Supply_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_power_supply_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_supply_transition_severity_config[] = { { "IPMI_Power_Supply_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_power_supply_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_supply_redundancy_config[] = { { "IPMI_Power_Supply_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_power_supply_redundancy_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_unit_config[] = { { "IPMI_Power_Unit_Power_Off_Power_Down", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Power_Cycle", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_240VA_Power_Down", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Interlock_Power_Down", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_AC_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Soft_Power_Control_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Power_Unit_Failure_Detected", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_power_unit_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_unit_state_config[] = { { "IPMI_Power_Unit_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_power_unit_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_unit_transition_severity_config[] = { { "IPMI_Power_Unit_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_power_unit_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_unit_device_present_config[] = { { "IPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_power_unit_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_power_unit_redundancy_config[] = { { "IPMI_Power_Unit_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_power_unit_redundancy_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_cooling_device_redundancy_config[] = { { "IPMI_Cooling_Device_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_cooling_device_redundancy_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_memory_config[] = { { "IPMI_Memory_Correctable_Memory_Error", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Uncorrectable_Memory_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Parity", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Memory_Scrub_Failed", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Memory_Device_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Spare", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Memory_Automatically_Throttled", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Critical_Overtemperature", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_memory_config_len = 11; static struct ipmi_interpret_sel_config ipmi_interpret_sel_memory_state_config[] = { { "IPMI_Memory_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_memory_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_memory_transition_severity_config[] = { { "IPMI_Memory_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_memory_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_memory_redundancy_config[] = { { "IPMI_Memory_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_memory_redundancy_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_drive_slot_config[] = { { "IPMI_Drive_Slot_Drive_Presence", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Drive_Fault", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Hot_Spare", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_In_Critical_Array", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_In_Failed_Array", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Rebuild_Remap_In_Progress", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Rebuild_Remap_Aborted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_drive_slot_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_drive_slot_state_config[] = { { "IPMI_Drive_Slot_State_Deasserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_State_Asserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_drive_slot_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_drive_slot_predictive_failure_config[] = { { "IPMI_Drive_Slot_Predictive_Failure_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Predictive_Failure_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_drive_slot_predictive_failure_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_drive_slot_transition_severity_config[] = { { "IPMI_Drive_Slot_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_drive_slot_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_drive_slot_device_present_config[] = { { "IPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_drive_slot_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_post_memory_resize_state_config[] = { { "IPMI_Post_Memory_Resize_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Post_Memory_Resize_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_post_memory_resize_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_firmware_progress_config[] = { { "IPMI_System_Firmware_Progress_System_Firmware_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_System_Firmware_Hang", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_System_Firmware_Progress", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_firmware_progress_config_len = 3; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_firmware_progress_state_config[] = { { "IPMI_System_Firmware_Progress_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_system_firmware_progress_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_firmware_progress_device_present_config[] = { { "IPMI_System_Firmware_Progress_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_firmware_progress_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_firmware_progress_transition_severity_config[] = { { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_firmware_progress_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_event_logging_disabled_config[] = { { "IPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Event_Logging_Disabled_All_Event_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_SEL_Full", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_SEL_Almost_Full", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_event_logging_disabled_config_len = 7; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_event_config[] = { { "IPMI_System_Event_System_Reconfigured", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_OEM_System_Boot_Event", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Undetermined_System_Hardware_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Entry_Added_To_Auxiliary_Log", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_PEF_Action", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Timestamp_Clock_Sync", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_system_event_config_len = 6; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_event_transition_state_config[] = { { "IPMI_System_Event_Transition_State_Idle", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_State_Active", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_State_Busy", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_event_transition_state_config_len = 3; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_event_state_config[] = { { "IPMI_System_Event_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_State_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_system_event_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_event_transition_severity_config[] = { { "IPMI_System_Event_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_event_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_critical_interrupt_config[] = { { "IPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Timeout", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_IO_Channel_Check_NMI", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Software_NMI", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Critical_Interrupt_PCI_PERR", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_PCI_SERR", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Correctable_Error", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Critical_Interrupt_Bus_Uncorrectable_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Fatal_NMI", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Fatal_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Degraded", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_critical_interrupt_config_len = 12; static struct ipmi_interpret_sel_config ipmi_interpret_sel_button_switch_config[] = { { "IPMI_Button_Switch_Power_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Sleep_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Reset_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_FRU_Latch_Open", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_FRU_Service_Request_Button", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_button_switch_config_len = 5; /* achu: for a button/switch states, I don't think users really care. * So report Nominal for all states. */ static struct ipmi_interpret_sel_config ipmi_interpret_sel_button_switch_state_config[] = { { "IPMI_Button_Switch_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_State_Asserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_button_switch_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_button_switch_transition_severity_config[] = { { "IPMI_Button_Switch_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_button_switch_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_module_board_state_config[] = { { "IPMI_Module_Board_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Module_Board_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_module_board_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_module_board_device_present_config[] = { { "IPMI_Module_Board_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Module_Board_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_module_board_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_chassis_transition_severity_config[] = { { "IPMI_Chassis_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_chassis_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_chip_set_config[] = { { "IPMI_Chip_Set_Soft_Power_Control_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Thermal_Trip", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_chip_set_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_chip_set_transition_severity_config[] = { { "IPMI_Chip_Set_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_chip_set_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_cable_interconnect_config[] = { { "IPMI_Cable_Interconnect_Is_Connected", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_cable_interconnect_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_cable_interconnect_transition_severity_config[] = { { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_cable_interconnect_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_boot_initiated_config[] = { { "IPMI_System_Boot_Initiated_Initiated_By_Power_Up", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Boot_Initiated_Initiated_By_Hard_Reset", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Boot_Initiated_Initiated_By_Warm_Reset", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Boot_Initiated_User_Requested_PXE_Boot", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Boot_Initiated_Automatic_Boot_To_Diagnostic", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Hard_Reset", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Warm_Reset", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Boot_Initiated_System_Restart", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_system_boot_initiated_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_boot_error_config[] = { { "IPMI_Boot_Error_No_Bootable_Media", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_PXE_Server_Not_Found", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Invalid_Boot_Sector", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_boot_error_config_len = 5; static struct ipmi_interpret_sel_config ipmi_interpret_sel_boot_error_state_config[] = { { "IPMI_Boot_Error_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_boot_error_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_boot_error_transition_severity_config[] = { { "IPMI_Boot_Error_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_boot_error_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_os_boot_config[] = { { "IPMI_OS_Boot_A_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_C_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_PXE_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Diagnostic_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_CD_ROM_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_ROM_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_os_boot_config_len = 11; static struct ipmi_interpret_sel_config ipmi_interpret_sel_os_critical_stop_config[] = { { "IPMI_OS_Critical_Stop_Critical_Stop_During_OS_Load", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_OS_Critical_Stop_Run_Time_Critical_Stop", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_OS_Critical_Stop_OS_Graceful_Stop", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Critical_Stop_OS_Graceful_Shutdown", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Critical_Stop_Soft_Shutdown_Initiated_By_PEF", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Critical_Stop_Agent_Not_Responding", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_os_critical_stop_config_len = 6; static struct ipmi_interpret_sel_config ipmi_interpret_sel_os_critical_stop_state_config[] = { { "IPMI_OS_Critical_Stop_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Critical_Stop_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_os_critical_stop_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_slot_connector_config[] = { { "IPMI_Slot_Connector_Fault_Status_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Identify_Status_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Power_Is_Off", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Device_Removal_Request", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Interlock_Asserted", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Is_Disabled", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Holds_Spare_Device", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_slot_connector_config_len = 10; static struct ipmi_interpret_sel_config ipmi_interpret_sel_slot_connector_transition_severity_config[] = { { "IPMI_Slot_Connector_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_slot_connector_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_system_acpi_power_state_config[] = { { "IPMI_System_ACPI_Power_State_S0_G0", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S1", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S2", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S3", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S4", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S5_G2", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S4_S5_Soft_Off", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_G3_Mechanical_Off", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_G1_Sleeping", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S5_Entered_By_Override", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Legacy_ON_State", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Legacy_OFF_State", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Unspecified", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_ACPI_Power_State_Unknown", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_system_acpi_power_state_config_len = 15; static struct ipmi_interpret_sel_config ipmi_interpret_sel_watchdog2_config[] = { { "IPMI_Watchdog2_Timer_Expired", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Watchdog2_Hard_Reset", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Power_Down", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Power_Cycle", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Reserved1", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved2", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved3", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved4", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Timer_Interrupt", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_watchdog2_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_platform_alert_config[] = { { "IPMI_Platform_Alert_Platform_Generated_Page", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_Platform_Generated_LAN_Alert", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_Platform_Event_Trap_Generated", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_Platform_Generated_SNMP_Trap", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_platform_alert_config_len = 4; static struct ipmi_interpret_sel_config ipmi_interpret_sel_platform_alert_state_config[] = { { "IPMI_Platform_Alert_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_platform_alert_state_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_entity_presence_config[] = { { "IPMI_Entity_Presence_Entity_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Entity_Presence_Entity_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Entity_Presence_Entity_Disabled", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_entity_presence_config_len = 3; static struct ipmi_interpret_sel_config ipmi_interpret_sel_entity_presence_device_present_config[] = { { "IPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_entity_presence_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_lan_config[] = { { "IPMI_LAN_Heartbeat", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_LAN_Heartbeat_Lost", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sel_lan_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_management_subsystem_health_config[] = { { "IPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Management_Controller_Off_Line", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Management_Controller_Unavailable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Sensor_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_FRU_Failure", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_management_subsystem_health_config_len = 6; static struct ipmi_interpret_sel_config ipmi_interpret_sel_management_subsystem_health_transition_severity_config[] = { { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_management_subsystem_health_transition_severity_config_len = 9; static struct ipmi_interpret_sel_config ipmi_interpret_sel_management_subsystem_health_device_present_config[] = { { "IPMI_Management_Subsystem_Health_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_management_subsystem_health_device_present_config_len = 2; static struct ipmi_interpret_sel_config ipmi_interpret_sel_battery_config[] = { { "IPMI_Battery_Battery_Low", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Battery_Battery_Failed", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Battery_Battery_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_battery_config_len = 3; static struct ipmi_interpret_sel_config ipmi_interpret_sel_session_audit_config[] = { { "IPMI_Session_Audit_Session_Activated", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Session_Audit_Session_Deactivated", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Session_Audit_Invalid_Username_Or_Password", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Session_Audit_Invalid_Password_Disable", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_session_audit_config_len = 4; static struct ipmi_interpret_sel_config ipmi_interpret_sel_version_change_config[] = { { "IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sel_version_change_config_len = 8; static struct ipmi_interpret_sel_config ipmi_interpret_sel_fru_state_config[] = { { "IPMI_FRU_State_FRU_Not_Installed", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_FRU_State_FRU_Inactive", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_FRU_State_FRU_Activation_Requested", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Activation_In_Progress", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Active", IPMI_INTERPRET_STATE_NOMINAL, IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_FRU_State_FRU_Deactivation_Requested", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Deactivation_In_Progress", IPMI_INTERPRET_STATE_WARNING, IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Communication_Lost", IPMI_INTERPRET_STATE_CRITICAL, IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sel_fru_state_config_len = 8; static int _interpret_config_sel_init (ipmi_interpret_ctx_t ctx, struct ipmi_interpret_sel_config ***config_dest, struct ipmi_interpret_sel_config *config_src, unsigned int config_len) { unsigned int mlen; unsigned int i; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (config_dest); assert (config_src); assert (config_len); /* +1 for storing NULL pointer sentinel value */ mlen = sizeof (struct ipmi_interpret_sel_config *) * (config_len + 1); if (!((*config_dest) = (struct ipmi_interpret_sel_config **) malloc (mlen))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } memset ((*config_dest), '\0', mlen); mlen = sizeof (struct ipmi_interpret_sel_config); for (i = 0; i < config_len; i++) { if (!((*config_dest)[i] = (struct ipmi_interpret_sel_config *) malloc (mlen))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } (*config_dest)[i]->option_str = config_src[i].option_str; (*config_dest)[i]->assertion_state = config_src[i].assertion_state; (*config_dest)[i]->deassertion_state = config_src[i].deassertion_state; } (*config_dest)[i] = NULL; rv = 0; cleanup: return (rv); } static int _interpret_sel_oem_sensor_config_create (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, struct ipmi_interpret_sel_oem_sensor_config **oem_conf) { struct ipmi_interpret_sel_oem_sensor_config *tmp_oem_conf = NULL; char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (oem_conf); memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", manufacturer_id, product_id, event_reading_type_code, sensor_type); if (!(tmp_oem_conf = (struct ipmi_interpret_sel_oem_sensor_config *)malloc (sizeof (struct ipmi_interpret_sel_oem_sensor_config)))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } memset (tmp_oem_conf, '\0', sizeof (struct ipmi_interpret_sel_oem_sensor_config)); memcpy (tmp_oem_conf->key, keybuf, IPMI_OEM_HASH_KEY_BUFLEN); tmp_oem_conf->manufacturer_id = manufacturer_id; tmp_oem_conf->product_id = product_id; tmp_oem_conf->event_reading_type_code = event_reading_type_code; tmp_oem_conf->sensor_type = sensor_type; if (!hash_insert (ctx->interpret_sel.sel_oem_sensor_config, tmp_oem_conf->key, tmp_oem_conf)) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_INTERNAL_ERROR); goto cleanup; } (*oem_conf) = tmp_oem_conf; rv = 0; cleanup: if (rv < 0) free (tmp_oem_conf); return (rv); } static int _interpret_sel_oem_intel_node_manager_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sel_oem_sensor_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); /* Intel Node Manager Exception Event / Alert Threshold Exceeded * * Event/Reading Type Code = 72h (Node Manager Exception Event / Alert Threshold Exceeded) * Sensor Type = DCh (Node Manager) */ if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT, IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = (IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data[1].event_direction_any_flag = 1; oem_conf->oem_sensor_data[1].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data1_any_flag = 0; oem_conf->oem_sensor_data[1].event_data1 = (0 /* threshold index, so just a number */ | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[1].event_data2_any_flag = 1; oem_conf->oem_sensor_data[1].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data3_any_flag = 1; oem_conf->oem_sensor_data[1].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data[2].event_direction_any_flag = 1; oem_conf->oem_sensor_data[2].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[2].event_data1_any_flag = 0; oem_conf->oem_sensor_data[2].event_data1 = (1 /* threshold index, so just a number */ | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[2].event_data2_any_flag = 1; oem_conf->oem_sensor_data[2].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[2].event_data3_any_flag = 1; oem_conf->oem_sensor_data[2].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[2].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data[3].event_direction_any_flag = 1; oem_conf->oem_sensor_data[3].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[3].event_data1_any_flag = 0; oem_conf->oem_sensor_data[3].event_data1 = (2 /* threshold index, so just a number */ | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[3].event_data2_any_flag = 1; oem_conf->oem_sensor_data[3].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[3].event_data3_any_flag = 1; oem_conf->oem_sensor_data[3].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[3].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data_count = 4; /* Intel Node Manager Health Event * * Event/Reading Type Code = 73h (Node Manager Health Event) * Sensor Type = DCh (Node Manager) */ if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT, IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = (IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR_NODE_MANAGER | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data_count = 1; /* Intel Node Manager Operational Capabilities Change Event * * Event/Reading Type Code = 73h (Node Manager Operational Capabilities Change Event) * Sensor Type = DCh (Node Manager) */ if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT, IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 1; oem_conf->oem_sensor_data[0].event_data1 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data_count = 1; /* Intel Server Platform Services Firmware Health * * Event/Reading Type Code = 75h (Server Platform Services Firmware Health) * Sensor Type = DCh (Node Manager) */ if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH, IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = (IPMI_OEM_INTEL_NODE_MANAGER_SERVER_PLATFORM_SERVICES_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS | IPMI_SEL_EVENT_DATA_OEM_CODE << 4 | IPMI_SEL_EVENT_DATA_OEM_CODE << 6); oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_sensor_data_count = 1; return (0); } static int _interpret_sel_oem_intel_node_manager (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); /* Intel S5500WB/Penguin Computing Relion 700 * * Manufacturer ID = 343 (Intel) * Product ID = 62 (S5500WB) */ if (_interpret_sel_oem_intel_node_manager_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_S5500WB) < 0) return (-1); /* Inventec 5441/Dell Xanadu II * * Manufacturer ID = 20569 (Inventec) * Product ID = 51 (5441) */ if (_interpret_sel_oem_intel_node_manager_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INVENTEC, IPMI_INVENTEC_PRODUCT_ID_5441) < 0) return (-1); /* Inventec 5442/Dell Xanadu III * * Manufacturer ID = 20569 (Inventec) * Product ID = 52 (5442) */ if (_interpret_sel_oem_intel_node_manager_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INVENTEC, IPMI_INVENTEC_PRODUCT_ID_5442) < 0) return (-1); /* Quanta S99Q/Dell FS12-TY * * Manufacturer ID = 7244 (Quanta) * Product ID = 21401 (S99Q) */ if (_interpret_sel_oem_intel_node_manager_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_QUANTA, IPMI_QUANTA_PRODUCT_ID_S99Q) < 0) return (-1); /* Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard contains Intel manufacturer ID) * * Manufacturer ID = 343 (Intel) * Product ID = 64 (Quanta QSSC-S4R) */ if (_interpret_sel_oem_intel_node_manager_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) < 0) return (-1); return (0); } static int _interpret_sel_oem_intel_smi_timeout_power_throttled_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sel_oem_sensor_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_STATE, IPMI_SENSOR_TYPE_OEM_INTEL_SMI_TIMEOUT, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_DEASSERTED; oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_sensor_data[1].event_direction_any_flag = 1; oem_conf->oem_sensor_data[1].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data1_any_flag = 0; oem_conf->oem_sensor_data[1].event_data1 = IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED; oem_conf->oem_sensor_data[1].event_data2_any_flag = 1; oem_conf->oem_sensor_data[1].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data3_any_flag = 1; oem_conf->oem_sensor_data[1].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].sel_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_sensor_data_count = 2; return (0); } static int _interpret_sel_oem_intel_smi_timeout_power_throttled (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); /* Intel SMI Timeout * Intel SR1625 * Intel S5500WB/Penguin Computing Relion 700 * Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard contains Intel manufacturer ID) * Intel S5000PAL * * and * * Intel Power Throttled * Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard contains Intel manufacturer ID) * * Manufacturer ID = 343 (Intel) * Product ID = 62 (Intel SR1625, S5500WB), 64 (Quanta QSSC-S4R), 40 (Intel S5000PAL) * Event/Reading Type Code = 3h (State Asserted/Deasserted) * Sensor Type = F3h (OEM) * EventData1 0x00 = "State Deasserted" * EventData1 0x01 = "State Asserted" */ /* From Intel * * The BMC supports an SMI timeout sensor (sensor type OEM (F3h), * event type Discrete (03h)) that asserts if the SMI signal has * been asserted for more than 90 seconds. A continuously asserted * SMI signal is an indication that the BIOS cannot service the * condition that caused the SMI. This is usually because that * condition prevents the BIOS from running. When an SMI timeout * occurs, the BMC asserts the SMI timeout sensor and logs a SEL * event for that sensor. The BMC will also reset the system. */ /* Intel SR1625 * Intel S5500WB/Penguin Computing Relion 700 */ if (_interpret_sel_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_SR1625) < 0) return (-1); /* Quanta QSSC-S4R/Appro GB812X-CN */ if (_interpret_sel_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) < 0) return (-1); /* Intel S5000PAL */ if (_interpret_sel_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_S5000PAL) < 0) return (-1); return (0); } static int _interpret_sel_oem_intel_nmi_state_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sel_oem_sensor_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_STATE, IPMI_SENSOR_TYPE_OEM_INTEL_NMI_STATE, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_DEASSERTED; oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_sensor_data[1].event_direction_any_flag = 1; oem_conf->oem_sensor_data[1].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data1_any_flag = 0; oem_conf->oem_sensor_data[1].event_data1 = IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED; oem_conf->oem_sensor_data[1].event_data2_any_flag = 1; oem_conf->oem_sensor_data[1].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].event_data3_any_flag = 1; oem_conf->oem_sensor_data[1].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[1].sel_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_sensor_data_count = 2; return (0); } static int _interpret_sel_oem_intel_nmi_state (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); /* Intel NMI State * Intel S5000PAL * * Manufacturer ID = 343 (Intel) * Product ID = 40 (Intel S5000PAL) * Event/Reading Type Code = 3h (State Asserted/Deasserted) * Sensor Type = F3h (OEM) * EventData1 0x00 = "State Deasserted" * EventData1 0x01 = "State Asserted" */ /* Intel S5000PAL */ if (_interpret_sel_oem_intel_nmi_state_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_S5000PAL) < 0) return (-1); return (0); } int _interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sel_oem_sensor_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_sensor_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC, IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP, &oem_conf) < 0) return (-1); oem_conf->oem_sensor_data[0].event_direction_any_flag = 1; oem_conf->oem_sensor_data[0].event_direction = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data1_any_flag = 0; oem_conf->oem_sensor_data[0].event_data1 = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_SEL_OVERHEAT; oem_conf->oem_sensor_data[0].event_data2_any_flag = 1; oem_conf->oem_sensor_data[0].event_data2 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].event_data3_any_flag = 1; oem_conf->oem_sensor_data[0].event_data3 = 0; /* doesn't matter */ oem_conf->oem_sensor_data[0].sel_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_sensor_data_count = 1; return (0); } static int _interpret_sel_oem_supermicro_discrete_cpu_temp (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); /* Supermicro CPU Temperature Overheat * X7DBR-3/X7DB8/X8DTN/X7SBI-LN4/X8DTH/X8DTG/X8DTU/X8DT3-LN4F/X8DTU-6+/X8DTL/X8DTL-3F * X8SIL-F/X9SCL/X9SCM/X8DTN+-F/X8SIE/X9SCA-F-O/H8DGU-F/X9DRi-F/X9DRI-LN4F+/X9SPU-F-O/X9SCM-iiF/H8SGL-F * * Manufacturer ID = 10876 (Supermicro), 10437 (Peppercon, IPMI card manufacturer), * 47488 (Supermicro, not IANA number, special case) * 5593 (Magnum Technologies, rebranded Supermicro board) * Product ID = 4 (X7DBR-3 / X7DBR_3, X7DB8, X8DTN, X7SBI-LN4 / X7SBI_LN4), 43707 (X8DTH, X8DTG, X8DTU, X8DT3-LN4F / X8DT3_LN4F), * 1549 (X8DTU-6+ / X8DTU_6PLUS), 6 (X8DTL, X8DTL-3F / X8DTL_3F), 1541 (X8SIL-F / X8SIL_F), 1572 (X9SCL, X9SCM), * 1551 (X8DTN+-F / X8DTNPLUS_F), 1037 (X8SIE), 1585 (X9SCA-F-O / X9SCA_F_O), 43025 (H8DGU-F / H8DGU_F), * 1576 (X9DRi-F, X9DRI_F), 1574 (X9DRI-LN4F+ / X9DRI_LN4F_PLUS), 1603 (X9SPU-F-O / X9SPU_F_O), * 1600 (X9SCM-iiF / X9SCM_IIF), 42769 (H8SGL-F / H8SGL_F) * Event/Reading Type Code = 70h (OEM) * Sensor Type = C0h (OEM) * EventData1 0x02 = "Overheat" */ if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_PEPPERCON, IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8SIE) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DGU) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DG6) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F) < 0) return (-1); if (_interpret_sel_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES, IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE) < 0) return (-1); return (0); } static int _interpret_sel_oem_supermicro (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_supermicro_discrete_cpu_temp (ctx) < 0) return (-1); return (0); } static int _interpret_sel_oem_intel (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_intel_node_manager (ctx) < 0) return (-1); if (_interpret_sel_oem_intel_smi_timeout_power_throttled (ctx) < 0) return (-1); if (_interpret_sel_oem_intel_nmi_state (ctx) < 0) return (-1); return (0); } static int _interpret_sel_oem_config_init (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sel.sel_oem_sensor_config); assert (ctx->interpret_sel.sel_oem_record_config); if (_interpret_sel_oem_intel (ctx) < 0) return (-1); if (_interpret_sel_oem_supermicro (ctx) < 0) return (-1); return (0); } int interpret_sel_init (ipmi_interpret_ctx_t ctx) { int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_threshold_config, ipmi_interpret_sel_threshold_config, ipmi_interpret_sel_threshold_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_temperature_state_config, ipmi_interpret_sel_temperature_state_config, ipmi_interpret_sel_temperature_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_temperature_limit_config, ipmi_interpret_sel_temperature_limit_config, ipmi_interpret_sel_temperature_limit_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_temperature_transition_severity_config, ipmi_interpret_sel_temperature_transition_severity_config, ipmi_interpret_sel_temperature_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_voltage_state_config, ipmi_interpret_sel_voltage_state_config, ipmi_interpret_sel_voltage_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_voltage_limit_config, ipmi_interpret_sel_voltage_limit_config, ipmi_interpret_sel_voltage_limit_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_voltage_performance_config, ipmi_interpret_sel_voltage_performance_config, ipmi_interpret_sel_voltage_performance_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_voltage_transition_severity_config, ipmi_interpret_sel_voltage_transition_severity_config, ipmi_interpret_sel_voltage_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_current_transition_severity_config, ipmi_interpret_sel_current_transition_severity_config, ipmi_interpret_sel_current_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fan_state_config, ipmi_interpret_sel_fan_state_config, ipmi_interpret_sel_fan_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fan_transition_severity_config, ipmi_interpret_sel_fan_transition_severity_config, ipmi_interpret_sel_fan_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fan_device_present_config, ipmi_interpret_sel_fan_device_present_config, ipmi_interpret_sel_fan_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fan_transition_availability_config, ipmi_interpret_sel_fan_transition_availability_config, ipmi_interpret_sel_fan_transition_availability_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fan_redundancy_config, ipmi_interpret_sel_fan_redundancy_config, ipmi_interpret_sel_fan_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_physical_security_config, ipmi_interpret_sel_physical_security_config, ipmi_interpret_sel_physical_security_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_platform_security_violation_attempt_config, ipmi_interpret_sel_platform_security_violation_attempt_config, ipmi_interpret_sel_platform_security_violation_attempt_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_processor_config, ipmi_interpret_sel_processor_config, ipmi_interpret_sel_processor_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_processor_state_config, ipmi_interpret_sel_processor_state_config, ipmi_interpret_sel_processor_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_supply_config, ipmi_interpret_sel_power_supply_config, ipmi_interpret_sel_power_supply_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_supply_state_config, ipmi_interpret_sel_power_supply_state_config, ipmi_interpret_sel_power_supply_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_supply_transition_severity_config, ipmi_interpret_sel_power_supply_transition_severity_config, ipmi_interpret_sel_power_supply_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_supply_redundancy_config, ipmi_interpret_sel_power_supply_redundancy_config, ipmi_interpret_sel_power_supply_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_unit_config, ipmi_interpret_sel_power_unit_config, ipmi_interpret_sel_power_unit_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_unit_state_config, ipmi_interpret_sel_power_unit_state_config, ipmi_interpret_sel_power_unit_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_unit_transition_severity_config, ipmi_interpret_sel_power_unit_transition_severity_config, ipmi_interpret_sel_power_unit_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_unit_device_present_config, ipmi_interpret_sel_power_unit_device_present_config, ipmi_interpret_sel_power_unit_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_power_unit_redundancy_config, ipmi_interpret_sel_power_unit_redundancy_config, ipmi_interpret_sel_power_unit_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_cooling_device_redundancy_config, ipmi_interpret_sel_cooling_device_redundancy_config, ipmi_interpret_sel_cooling_device_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_memory_config, ipmi_interpret_sel_memory_config, ipmi_interpret_sel_memory_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_memory_state_config, ipmi_interpret_sel_memory_state_config, ipmi_interpret_sel_memory_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_memory_transition_severity_config, ipmi_interpret_sel_memory_transition_severity_config, ipmi_interpret_sel_memory_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_memory_redundancy_config, ipmi_interpret_sel_memory_redundancy_config, ipmi_interpret_sel_memory_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_drive_slot_config, ipmi_interpret_sel_drive_slot_config, ipmi_interpret_sel_drive_slot_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_drive_slot_state_config, ipmi_interpret_sel_drive_slot_state_config, ipmi_interpret_sel_drive_slot_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_drive_slot_predictive_failure_config, ipmi_interpret_sel_drive_slot_predictive_failure_config, ipmi_interpret_sel_drive_slot_predictive_failure_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_drive_slot_transition_severity_config, ipmi_interpret_sel_drive_slot_transition_severity_config, ipmi_interpret_sel_drive_slot_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_drive_slot_device_present_config, ipmi_interpret_sel_drive_slot_device_present_config, ipmi_interpret_sel_drive_slot_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_post_memory_resize_state_config, ipmi_interpret_sel_post_memory_resize_state_config, ipmi_interpret_sel_post_memory_resize_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_config, ipmi_interpret_sel_system_firmware_progress_config, ipmi_interpret_sel_system_firmware_progress_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_state_config, ipmi_interpret_sel_system_firmware_progress_state_config, ipmi_interpret_sel_system_firmware_progress_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_device_present_config, ipmi_interpret_sel_system_firmware_progress_device_present_config, ipmi_interpret_sel_system_firmware_progress_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_transition_severity_config, ipmi_interpret_sel_system_firmware_progress_transition_severity_config, ipmi_interpret_sel_system_firmware_progress_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_event_logging_disabled_config, ipmi_interpret_sel_event_logging_disabled_config, ipmi_interpret_sel_event_logging_disabled_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_event_config, ipmi_interpret_sel_system_event_config, ipmi_interpret_sel_system_event_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_state_config, ipmi_interpret_sel_system_event_transition_state_config, ipmi_interpret_sel_system_event_transition_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_event_state_config, ipmi_interpret_sel_system_event_state_config, ipmi_interpret_sel_system_event_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_severity_config, ipmi_interpret_sel_system_event_transition_severity_config, ipmi_interpret_sel_system_event_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_critical_interrupt_config, ipmi_interpret_sel_critical_interrupt_config, ipmi_interpret_sel_critical_interrupt_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_button_switch_config, ipmi_interpret_sel_button_switch_config, ipmi_interpret_sel_button_switch_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_button_switch_state_config, ipmi_interpret_sel_button_switch_state_config, ipmi_interpret_sel_button_switch_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_button_switch_transition_severity_config, ipmi_interpret_sel_button_switch_transition_severity_config, ipmi_interpret_sel_button_switch_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_module_board_state_config, ipmi_interpret_sel_module_board_state_config, ipmi_interpret_sel_module_board_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_module_board_device_present_config, ipmi_interpret_sel_module_board_device_present_config, ipmi_interpret_sel_module_board_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_chassis_transition_severity_config, ipmi_interpret_sel_chassis_transition_severity_config, ipmi_interpret_sel_chassis_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_chip_set_config, ipmi_interpret_sel_chip_set_config, ipmi_interpret_sel_chip_set_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_chip_set_transition_severity_config, ipmi_interpret_sel_chip_set_transition_severity_config, ipmi_interpret_sel_chip_set_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_config, ipmi_interpret_sel_cable_interconnect_config, ipmi_interpret_sel_cable_interconnect_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_transition_severity_config, ipmi_interpret_sel_cable_interconnect_transition_severity_config, ipmi_interpret_sel_cable_interconnect_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_boot_initiated_config, ipmi_interpret_sel_system_boot_initiated_config, ipmi_interpret_sel_system_boot_initiated_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_boot_error_config, ipmi_interpret_sel_boot_error_config, ipmi_interpret_sel_boot_error_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_boot_error_state_config, ipmi_interpret_sel_boot_error_state_config, ipmi_interpret_sel_boot_error_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_boot_error_transition_severity_config, ipmi_interpret_sel_boot_error_transition_severity_config, ipmi_interpret_sel_boot_error_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_os_boot_config, ipmi_interpret_sel_os_boot_config, ipmi_interpret_sel_os_boot_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_config, ipmi_interpret_sel_os_critical_stop_config, ipmi_interpret_sel_os_critical_stop_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_state_config, ipmi_interpret_sel_os_critical_stop_state_config, ipmi_interpret_sel_os_critical_stop_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_slot_connector_config, ipmi_interpret_sel_slot_connector_config, ipmi_interpret_sel_slot_connector_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_slot_connector_transition_severity_config, ipmi_interpret_sel_slot_connector_transition_severity_config, ipmi_interpret_sel_slot_connector_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_system_acpi_power_state_config, ipmi_interpret_sel_system_acpi_power_state_config, ipmi_interpret_sel_system_acpi_power_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_watchdog2_config, ipmi_interpret_sel_watchdog2_config, ipmi_interpret_sel_watchdog2_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_platform_alert_config, ipmi_interpret_sel_platform_alert_config, ipmi_interpret_sel_platform_alert_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_platform_alert_state_config, ipmi_interpret_sel_platform_alert_state_config, ipmi_interpret_sel_platform_alert_state_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_entity_presence_config, ipmi_interpret_sel_entity_presence_config, ipmi_interpret_sel_entity_presence_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_entity_presence_device_present_config, ipmi_interpret_sel_entity_presence_device_present_config, ipmi_interpret_sel_entity_presence_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_lan_config, ipmi_interpret_sel_lan_config, ipmi_interpret_sel_lan_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_config, ipmi_interpret_sel_management_subsystem_health_config, ipmi_interpret_sel_management_subsystem_health_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_transition_severity_config, ipmi_interpret_sel_management_subsystem_health_transition_severity_config, ipmi_interpret_sel_management_subsystem_health_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_device_present_config, ipmi_interpret_sel_management_subsystem_health_device_present_config, ipmi_interpret_sel_management_subsystem_health_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_battery_config, ipmi_interpret_sel_battery_config, ipmi_interpret_sel_battery_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_session_audit_config, ipmi_interpret_sel_session_audit_config, ipmi_interpret_sel_session_audit_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_version_change_config, ipmi_interpret_sel_version_change_config, ipmi_interpret_sel_version_change_config_len) < 0) goto cleanup; if (_interpret_config_sel_init (ctx, &ctx->interpret_sel.ipmi_interpret_sel_fru_state_config, ipmi_interpret_sel_fru_state_config, ipmi_interpret_sel_fru_state_config_len) < 0) goto cleanup; if (!(ctx->interpret_sel.sel_oem_sensor_config = hash_create (IPMI_INTERPRET_SEL_HASH_SIZE, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, (hash_del_f)free))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(ctx->interpret_sel.sel_oem_record_config = hash_create (IPMI_INTERPRET_SEL_HASH_SIZE, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, (hash_del_f)free))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } if (_interpret_sel_oem_config_init (ctx) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static void _interpret_config_sel_destroy (ipmi_interpret_ctx_t ctx, struct ipmi_interpret_sel_config **config) { unsigned int i = 0; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (config) { while (config[i]) { free (config[i]); i++; } free (config); } } void interpret_sel_destroy (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_threshold_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_temperature_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_temperature_limit_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_temperature_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_voltage_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_voltage_limit_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_voltage_performance_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_voltage_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_current_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fan_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fan_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fan_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fan_transition_availability_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fan_redundancy_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_physical_security_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_platform_security_violation_attempt_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_processor_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_processor_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_supply_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_supply_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_supply_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_supply_redundancy_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_unit_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_unit_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_unit_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_unit_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_power_unit_redundancy_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_cooling_device_redundancy_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_memory_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_memory_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_memory_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_memory_redundancy_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_predictive_failure_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_post_memory_resize_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_event_logging_disabled_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_event_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_event_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_critical_interrupt_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_button_switch_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_button_switch_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_button_switch_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_module_board_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_module_board_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_chassis_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_chip_set_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_chip_set_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_boot_initiated_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_boot_error_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_boot_error_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_boot_error_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_os_boot_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_slot_connector_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_slot_connector_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_system_acpi_power_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_watchdog2_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_platform_alert_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_platform_alert_state_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_entity_presence_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_entity_presence_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_lan_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_transition_severity_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_device_present_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_battery_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_session_audit_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_version_change_config); _interpret_config_sel_destroy (ctx, ctx->interpret_sel.ipmi_interpret_sel_fru_state_config); if (ctx->interpret_sel.sel_oem_sensor_config) hash_destroy (ctx->interpret_sel.sel_oem_sensor_config); if (ctx->interpret_sel.sel_oem_record_config) hash_destroy (ctx->interpret_sel.sel_oem_record_config); } static int _cb_sel_parse (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct ipmi_interpret_sel_config **config; int assertion_state; int deassertion_state; int i; assert (cf); assert (data); assert (option_type == CONFFILE_OPTION_LIST_STRING); assert (optionname); assert (option_ptr); if (data->stringlist_len < 1) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_MISSING); return (-1); } if (data->stringlist_len > 2) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } if ((assertion_state = interpret_config_parse_state (cf, data->stringlist[0])) < 0) return (-1); if (data->stringlist_len > 1) { if ((deassertion_state = interpret_config_parse_state (cf, data->stringlist[1])) < 0) return (-1); } else deassertion_state = assertion_state; i = 0; config = (struct ipmi_interpret_sel_config **)option_ptr; while (config[i]) { if (!strcasecmp (optionname, config[i]->option_str)) { config[i]->assertion_state = assertion_state; config[i]->deassertion_state = deassertion_state; return (0); } i++; } conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); return (-1); } static int _cb_sel_oem_sensor_parse (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { hash_t *h = NULL; char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_config_file_ids ids[IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX]; unsigned int ids_count = 0; uint8_t event_reading_type_code; uint8_t sensor_type; unsigned int event_direction_any_flag = 0; uint8_t event_direction = 0; unsigned int event_data1_any_flag = 0; uint8_t event_data1 = 0; unsigned int event_data2_any_flag = 0; uint8_t event_data2 = 0; unsigned int event_data3_any_flag = 0; uint8_t event_data3 = 0; int sel_state; uint32_t tmp; struct ipmi_interpret_sel_oem_sensor_config *oem_conf; int found = 0; unsigned int i, j, k; assert (cf); assert (data); assert (optionname); assert (option_ptr); h = (hash_t *)option_ptr; memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); memset (ids, '\0', sizeof (struct ipmi_interpret_config_file_ids) * IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX); if (data->stringlist_len != 8) { if (data->stringlist_len < 8) conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_MISSING); else conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } if (interpret_config_parse_manufactuer_id_product_id (cf, data->stringlist[0], ids, &ids_count) < 0) return (-1); if (interpret_config_parse_strtoul (cf, data->stringlist[1], UCHAR_MAX, &tmp) < 0) return (-1); event_reading_type_code = tmp; if (interpret_config_parse_strtoul (cf, data->stringlist[2], UCHAR_MAX, &tmp) < 0) return (-1); sensor_type = tmp; if (!strcasecmp (data->stringlist[3], IPMI_SEL_OEM_DATA_HEX_BYTE_ANY)) event_direction_any_flag = 1; else if (!strcasecmp (data->stringlist[3], "assertion")) event_direction = IPMI_SEL_RECORD_ASSERTION_EVENT; else if (!strcasecmp (data->stringlist[3], "deassertion")) event_direction = IPMI_SEL_RECORD_DEASSERTION_EVENT; else { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } if (!strcasecmp (data->stringlist[4], IPMI_SEL_OEM_DATA_HEX_BYTE_ANY)) event_data1_any_flag = 1; else { if (interpret_config_parse_strtoul (cf, data->stringlist[4], UCHAR_MAX, &tmp) < 0) return (-1); event_data1 = tmp; } if (!strcasecmp (data->stringlist[5], IPMI_SEL_OEM_DATA_HEX_BYTE_ANY)) event_data2_any_flag = 1; else { if (interpret_config_parse_strtoul (cf, data->stringlist[5], UCHAR_MAX, &tmp) < 0) return (-1); event_data2 = tmp; } if (!strcasecmp (data->stringlist[6], IPMI_SEL_OEM_DATA_HEX_BYTE_ANY)) event_data3_any_flag = 1; else { if (interpret_config_parse_strtoul (cf, data->stringlist[6], UCHAR_MAX, &tmp) < 0) return (-1); event_data3 = tmp; } if ((sel_state = interpret_config_parse_state (cf, data->stringlist[7])) < 0) return (-1); for (i = 0; i < ids_count; i++) { for (j = 0; j < ids[i].product_ids_count; j++) { snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", ids[i].manufacturer_id, ids[i].product_ids[j], event_reading_type_code, sensor_type); if (!(oem_conf = hash_find ((*h), keybuf))) { if (!(oem_conf = (struct ipmi_interpret_sel_oem_sensor_config *)malloc (sizeof (struct ipmi_interpret_sel_oem_sensor_config)))) { conffile_seterrnum (cf, CONFFILE_ERR_OUTMEM); return (-1); } memset (oem_conf, '\0', sizeof (struct ipmi_interpret_sel_oem_sensor_config)); memcpy (oem_conf->key, keybuf, IPMI_OEM_HASH_KEY_BUFLEN); oem_conf->manufacturer_id = ids[i].manufacturer_id; oem_conf->product_id = ids[i].product_ids[j]; oem_conf->event_reading_type_code = event_reading_type_code; oem_conf->sensor_type = sensor_type; if (!hash_insert ((*h), oem_conf->key, oem_conf)) { conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); free (oem_conf); return (-1); } } if (oem_conf->oem_sensor_data_count >= IPMI_SEL_OEM_SENSOR_MAX) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } /* check for duplicates */ for (k = 0; k < oem_conf->oem_sensor_data_count; k++) { if (oem_conf->oem_sensor_data[k].event_direction_any_flag == event_direction_any_flag && oem_conf->oem_sensor_data[k].event_direction == event_direction && oem_conf->oem_sensor_data[k].event_data1_any_flag == event_data1_any_flag && oem_conf->oem_sensor_data[k].event_data1 == event_data1 && oem_conf->oem_sensor_data[k].event_data2_any_flag == event_data2_any_flag && oem_conf->oem_sensor_data[k].event_data2 == event_data2 && oem_conf->oem_sensor_data[k].event_data3_any_flag == event_data3_any_flag && oem_conf->oem_sensor_data[k].event_data3 == event_data3) { oem_conf->oem_sensor_data[k].sel_state = sel_state; found++; break; } } if (!found) { oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_direction_any_flag = event_direction_any_flag; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_direction = event_direction; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data1_any_flag = event_data1_any_flag; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data1 = event_data1; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data2_any_flag = event_data2_any_flag; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data2 = event_data2; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data3_any_flag = event_data3_any_flag; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].event_data3 = event_data3; oem_conf->oem_sensor_data[oem_conf->oem_sensor_data_count].sel_state = sel_state; oem_conf->oem_sensor_data_count++; } } } return (0); } static int _cb_sel_oem_record_parse (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { hash_t *h = NULL; char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_config_file_ids ids[IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX]; unsigned int ids_count = 0; uint8_t record_type; int sel_state; uint32_t tmp; struct ipmi_interpret_sel_oem_record_config *oem_conf; struct ipmi_interpret_sel_oem_data_byte oem_bytes[IPMI_SEL_OEM_DATA_MAX]; unsigned int oem_data_count = 0; int found = 0; unsigned int i, j, k; assert (cf); assert (data); assert (optionname); assert (option_ptr); h = (hash_t *)option_ptr; memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); memset (ids, '\0', sizeof (struct ipmi_interpret_config_file_ids) * IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX); memset (oem_bytes, '\0', sizeof (struct ipmi_interpret_sel_oem_data_byte) * IPMI_SEL_OEM_DATA_MAX); if (!strcasecmp (optionname, "IPMI_OEM_Timestamped_Record")) { if (data->stringlist_len != 9) { if (data->stringlist_len < 9) conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_MISSING); else conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } oem_data_count = IPMI_SEL_OEM_DATA_TIMESTAMPED_BYTES; } else { if (data->stringlist_len != 16) { if (data->stringlist_len < 16) conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_MISSING); else conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } oem_data_count = IPMI_SEL_OEM_DATA_NON_TIMESTAMPED_BYTES; } if (interpret_config_parse_manufactuer_id_product_id (cf, data->stringlist[0], ids, &ids_count) < 0) return (-1); if (interpret_config_parse_strtoul (cf, data->stringlist[1], UCHAR_MAX, &tmp) < 0) return (-1); record_type = tmp; if (oem_data_count == IPMI_SEL_OEM_DATA_TIMESTAMPED_BYTES) { if (!IPMI_SEL_RECORD_TYPE_IS_TIMESTAMPED_OEM (record_type)) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } } else { if (!IPMI_SEL_RECORD_TYPE_IS_NON_TIMESTAMPED_OEM (record_type)) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_INVALID); return (-1); } } for (i = 0; i < oem_data_count; i++) { if (!strcasecmp (data->stringlist[2 + i], IPMI_SEL_OEM_DATA_HEX_BYTE_ANY)) { oem_bytes[i].any_flag = 1; oem_bytes[i].oem_data_byte = 0; } else { if (interpret_config_parse_strtoul (cf, data->stringlist[2 + i], UCHAR_MAX, &tmp) < 0) return (-1); oem_bytes[i].any_flag = 0; oem_bytes[i].oem_data_byte = tmp; } } if ((sel_state = interpret_config_parse_state (cf, data->stringlist[2 + oem_data_count])) < 0) return (-1); for (i = 0; i < ids_count; i++) { for (j = 0; j < ids[i].product_ids_count; j++) { snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u", ids[i].manufacturer_id, ids[i].product_ids[j], record_type); if (!(oem_conf = hash_find ((*h), keybuf))) { if (!(oem_conf = (struct ipmi_interpret_sel_oem_record_config *)malloc (sizeof (struct ipmi_interpret_sel_oem_record_config)))) { conffile_seterrnum (cf, CONFFILE_ERR_OUTMEM); return (-1); } memset (oem_conf, '\0', sizeof (struct ipmi_interpret_sel_oem_record_config)); memcpy (oem_conf->key, keybuf, IPMI_OEM_HASH_KEY_BUFLEN); oem_conf->manufacturer_id = ids[i].manufacturer_id; oem_conf->product_id = ids[i].product_ids[j]; oem_conf->record_type = record_type; if (!hash_insert ((*h), oem_conf->key, oem_conf)) { conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); free (oem_conf); return (-1); } } if (oem_conf->oem_record_count >= IPMI_SEL_OEM_RECORD_MAX) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } /* check for duplicates */ for (k = 0; k < oem_conf->oem_record_count; k++) { if (!memcmp (oem_bytes, oem_conf->oem_record[k].oem_bytes, sizeof (struct ipmi_interpret_sel_oem_data_byte) * IPMI_SEL_OEM_DATA_MAX)) { oem_conf->oem_record[k].sel_state = sel_state; found++; break; } } if (!found) { memcpy (oem_conf->oem_record[oem_conf->oem_record_count].oem_bytes, oem_bytes, sizeof (struct ipmi_interpret_sel_oem_data_byte) * IPMI_SEL_OEM_DATA_MAX); oem_conf->oem_record[oem_conf->oem_record_count].oem_bytes_count = oem_data_count; oem_conf->oem_record[oem_conf->oem_record_count].sel_state = sel_state; oem_conf->oem_record_count++; } } } return (0); } static void _fill_sel_config_options (struct conffile_option *to_options, unsigned int *to_options_len, struct ipmi_interpret_sel_config **from_config, int *from_config_flags, unsigned int from_config_len) { unsigned int i; assert (to_options && to_options_len && from_config && from_config_len); memset (from_config_flags, '\0', sizeof (int) * from_config_len); /* note: can't memcpy .. sigh .. wish I did this in C++ w/ a copy constructor */ for (i = 0; i < from_config_len; i++) { to_options[(*to_options_len) + i].optionname = from_config[i]->option_str; to_options[(*to_options_len) + i].option_type = CONFFILE_OPTION_LIST_STRING; to_options[(*to_options_len) + i].option_type_arg = -1; to_options[(*to_options_len) + i].callback_func = _cb_sel_parse; to_options[(*to_options_len) + i].max_count = 1; to_options[(*to_options_len) + i].required_count = 0; to_options[(*to_options_len) + i].count_ptr = &from_config_flags[i]; to_options[(*to_options_len) + i].option_ptr = from_config; to_options[(*to_options_len) + i].option_data = 0; } (*to_options_len) += from_config_len; } int interpret_sel_config_parse (ipmi_interpret_ctx_t ctx, const char *sel_config_file) { int ipmi_interpret_sel_threshold_flags[ipmi_interpret_sel_threshold_config_len]; int ipmi_interpret_sel_temperature_state_flags[ipmi_interpret_sel_temperature_state_config_len]; int ipmi_interpret_sel_temperature_limit_flags[ipmi_interpret_sel_temperature_limit_config_len]; int ipmi_interpret_sel_temperature_transition_severity_flags[ipmi_interpret_sel_temperature_transition_severity_config_len]; int ipmi_interpret_sel_voltage_state_flags[ipmi_interpret_sel_voltage_state_config_len]; int ipmi_interpret_sel_voltage_limit_flags[ipmi_interpret_sel_voltage_limit_config_len]; int ipmi_interpret_sel_voltage_performance_flags[ipmi_interpret_sel_voltage_performance_config_len]; int ipmi_interpret_sel_voltage_transition_severity_flags[ipmi_interpret_sel_voltage_transition_severity_config_len]; int ipmi_interpret_sel_current_transition_severity_flags[ipmi_interpret_sel_current_transition_severity_config_len]; int ipmi_interpret_sel_fan_state_flags[ipmi_interpret_sel_fan_state_config_len]; int ipmi_interpret_sel_fan_transition_severity_flags[ipmi_interpret_sel_fan_transition_severity_config_len]; int ipmi_interpret_sel_fan_device_present_flags[ipmi_interpret_sel_fan_device_present_config_len]; int ipmi_interpret_sel_fan_transition_availability_flags[ipmi_interpret_sel_fan_transition_availability_config_len]; int ipmi_interpret_sel_fan_redundancy_flags[ipmi_interpret_sel_fan_redundancy_config_len]; int ipmi_interpret_sel_physical_security_flags[ipmi_interpret_sel_physical_security_config_len]; int ipmi_interpret_sel_platform_security_violation_attempt_flags[ipmi_interpret_sel_platform_security_violation_attempt_config_len]; int ipmi_interpret_sel_processor_flags[ipmi_interpret_sel_processor_config_len]; int ipmi_interpret_sel_processor_state_flags[ipmi_interpret_sel_processor_state_config_len]; int ipmi_interpret_sel_power_supply_flags[ipmi_interpret_sel_power_supply_config_len]; int ipmi_interpret_sel_power_supply_state_flags[ipmi_interpret_sel_power_supply_state_config_len]; int ipmi_interpret_sel_power_supply_transition_severity_flags[ipmi_interpret_sel_power_supply_transition_severity_config_len]; int ipmi_interpret_sel_power_supply_redundancy_flags[ipmi_interpret_sel_power_supply_redundancy_config_len]; int ipmi_interpret_sel_power_unit_flags[ipmi_interpret_sel_power_unit_config_len]; int ipmi_interpret_sel_power_unit_state_flags[ipmi_interpret_sel_power_unit_state_config_len]; int ipmi_interpret_sel_power_unit_transition_severity_flags[ipmi_interpret_sel_power_unit_transition_severity_config_len]; int ipmi_interpret_sel_power_unit_device_present_flags[ipmi_interpret_sel_power_unit_device_present_config_len]; int ipmi_interpret_sel_power_unit_redundancy_flags[ipmi_interpret_sel_power_unit_redundancy_config_len]; int ipmi_interpret_sel_cooling_device_redundancy_flags[ipmi_interpret_sel_cooling_device_redundancy_config_len]; int ipmi_interpret_sel_memory_flags[ipmi_interpret_sel_memory_config_len]; int ipmi_interpret_sel_memory_state_flags[ipmi_interpret_sel_memory_state_config_len]; int ipmi_interpret_sel_memory_transition_severity_flags[ipmi_interpret_sel_memory_transition_severity_config_len]; int ipmi_interpret_sel_memory_redundancy_flags[ipmi_interpret_sel_memory_redundancy_config_len]; int ipmi_interpret_sel_drive_slot_flags[ipmi_interpret_sel_drive_slot_config_len]; int ipmi_interpret_sel_drive_slot_state_flags[ipmi_interpret_sel_drive_slot_state_config_len]; int ipmi_interpret_sel_drive_slot_predictive_failure_flags[ipmi_interpret_sel_drive_slot_predictive_failure_config_len]; int ipmi_interpret_sel_drive_slot_transition_severity_flags[ipmi_interpret_sel_drive_slot_transition_severity_config_len]; int ipmi_interpret_sel_drive_slot_device_present_flags[ipmi_interpret_sel_drive_slot_device_present_config_len]; int ipmi_interpret_sel_post_memory_resize_state_flags[ipmi_interpret_sel_post_memory_resize_state_config_len]; int ipmi_interpret_sel_system_firmware_progress_flags[ipmi_interpret_sel_system_firmware_progress_config_len]; int ipmi_interpret_sel_system_firmware_progress_state_flags[ipmi_interpret_sel_system_firmware_progress_state_config_len]; int ipmi_interpret_sel_system_firmware_progress_device_present_flags[ipmi_interpret_sel_system_firmware_progress_device_present_config_len]; int ipmi_interpret_sel_system_firmware_progress_transition_severity_flags[ipmi_interpret_sel_system_firmware_progress_transition_severity_config_len]; int ipmi_interpret_sel_event_logging_disabled_flags[ipmi_interpret_sel_event_logging_disabled_config_len]; int ipmi_interpret_sel_system_event_flags[ipmi_interpret_sel_system_event_config_len]; int ipmi_interpret_sel_system_event_transition_state_flags[ipmi_interpret_sel_system_event_transition_state_config_len]; int ipmi_interpret_sel_system_event_state_flags[ipmi_interpret_sel_system_event_state_config_len]; int ipmi_interpret_sel_system_event_transition_severity_flags[ipmi_interpret_sel_system_event_transition_severity_config_len]; int ipmi_interpret_sel_critical_interrupt_flags[ipmi_interpret_sel_critical_interrupt_config_len]; int ipmi_interpret_sel_button_switch_flags[ipmi_interpret_sel_button_switch_config_len]; int ipmi_interpret_sel_button_switch_state_flags[ipmi_interpret_sel_button_switch_state_config_len]; int ipmi_interpret_sel_button_switch_transition_severity_flags[ipmi_interpret_sel_button_switch_transition_severity_config_len]; int ipmi_interpret_sel_module_board_state_flags[ipmi_interpret_sel_module_board_state_config_len]; int ipmi_interpret_sel_module_board_device_present_flags[ipmi_interpret_sel_module_board_device_present_config_len]; int ipmi_interpret_sel_chassis_transition_severity_flags[ipmi_interpret_sel_chassis_transition_severity_config_len]; int ipmi_interpret_sel_chip_set_flags[ipmi_interpret_sel_chip_set_config_len]; int ipmi_interpret_sel_chip_set_transition_severity_flags[ipmi_interpret_sel_chip_set_transition_severity_config_len]; int ipmi_interpret_sel_cable_interconnect_flags[ipmi_interpret_sel_cable_interconnect_config_len]; int ipmi_interpret_sel_cable_interconnect_transition_severity_flags[ipmi_interpret_sel_cable_interconnect_transition_severity_config_len]; int ipmi_interpret_sel_system_boot_initiated_flags[ipmi_interpret_sel_system_boot_initiated_config_len]; int ipmi_interpret_sel_boot_error_flags[ipmi_interpret_sel_boot_error_config_len]; int ipmi_interpret_sel_boot_error_state_flags[ipmi_interpret_sel_boot_error_state_config_len]; int ipmi_interpret_sel_boot_error_transition_severity_flags[ipmi_interpret_sel_boot_error_transition_severity_config_len]; int ipmi_interpret_sel_os_boot_flags[ipmi_interpret_sel_os_boot_config_len]; int ipmi_interpret_sel_os_critical_stop_flags[ipmi_interpret_sel_os_critical_stop_config_len]; int ipmi_interpret_sel_os_critical_stop_state_flags[ipmi_interpret_sel_os_critical_stop_state_config_len]; int ipmi_interpret_sel_slot_connector_flags[ipmi_interpret_sel_slot_connector_config_len]; int ipmi_interpret_sel_slot_connector_transition_severity_flags[ipmi_interpret_sel_slot_connector_transition_severity_config_len]; int ipmi_interpret_sel_system_acpi_power_state_flags[ipmi_interpret_sel_system_acpi_power_state_config_len]; int ipmi_interpret_sel_watchdog2_flags[ipmi_interpret_sel_watchdog2_config_len]; int ipmi_interpret_sel_platform_alert_flags[ipmi_interpret_sel_platform_alert_config_len]; int ipmi_interpret_sel_platform_alert_state_flags[ipmi_interpret_sel_platform_alert_state_config_len]; int ipmi_interpret_sel_entity_presence_flags[ipmi_interpret_sel_entity_presence_config_len]; int ipmi_interpret_sel_entity_presence_device_present_flags[ipmi_interpret_sel_entity_presence_device_present_config_len]; int ipmi_interpret_sel_lan_flags[ipmi_interpret_sel_lan_config_len]; int ipmi_interpret_sel_management_subsystem_health_flags[ipmi_interpret_sel_management_subsystem_health_config_len]; int ipmi_interpret_sel_management_subsystem_health_transition_severity_flags[ipmi_interpret_sel_management_subsystem_health_transition_severity_config_len]; int ipmi_interpret_sel_management_subsystem_health_device_present_flags[ipmi_interpret_sel_management_subsystem_health_device_present_config_len]; int ipmi_interpret_sel_battery_flags[ipmi_interpret_sel_battery_config_len]; int ipmi_interpret_sel_session_audit_flags[ipmi_interpret_sel_session_audit_config_len]; int ipmi_interpret_sel_version_change_flags[ipmi_interpret_sel_version_change_config_len]; int ipmi_interpret_sel_fru_state_flags[ipmi_interpret_sel_fru_state_config_len]; int sel_oem_sensor_flag; int sel_oem_timestamped_flag; int sel_oem_non_timestamped_flag; struct conffile_option config_file_options[IPMI_INTERPRET_CONFIG_FILE_OPTIONS_MAX]; char *config_file = NULL; unsigned int config_file_options_len = 0; conffile_t cf = NULL; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (!sel_config_file) config_file = INTERPRET_SEL_CONFIG_FILE_DEFAULT; else config_file = (char *)sel_config_file; _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_threshold_config, ipmi_interpret_sel_threshold_flags, ipmi_interpret_sel_threshold_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_temperature_state_config, ipmi_interpret_sel_temperature_state_flags, ipmi_interpret_sel_temperature_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_temperature_limit_config, ipmi_interpret_sel_temperature_limit_flags, ipmi_interpret_sel_temperature_limit_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_temperature_transition_severity_config, ipmi_interpret_sel_temperature_transition_severity_flags, ipmi_interpret_sel_temperature_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_voltage_state_config, ipmi_interpret_sel_voltage_state_flags, ipmi_interpret_sel_voltage_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_voltage_limit_config, ipmi_interpret_sel_voltage_limit_flags, ipmi_interpret_sel_voltage_limit_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_voltage_performance_config, ipmi_interpret_sel_voltage_performance_flags, ipmi_interpret_sel_voltage_performance_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_voltage_transition_severity_config, ipmi_interpret_sel_voltage_transition_severity_flags, ipmi_interpret_sel_voltage_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_current_transition_severity_config, ipmi_interpret_sel_current_transition_severity_flags, ipmi_interpret_sel_current_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fan_state_config, ipmi_interpret_sel_fan_state_flags, ipmi_interpret_sel_fan_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fan_transition_severity_config, ipmi_interpret_sel_fan_transition_severity_flags, ipmi_interpret_sel_fan_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fan_device_present_config, ipmi_interpret_sel_fan_device_present_flags, ipmi_interpret_sel_fan_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fan_transition_availability_config, ipmi_interpret_sel_fan_transition_availability_flags, ipmi_interpret_sel_fan_transition_availability_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fan_redundancy_config, ipmi_interpret_sel_fan_redundancy_flags, ipmi_interpret_sel_fan_redundancy_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_physical_security_config, ipmi_interpret_sel_physical_security_flags, ipmi_interpret_sel_physical_security_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_platform_security_violation_attempt_config, ipmi_interpret_sel_platform_security_violation_attempt_flags, ipmi_interpret_sel_platform_security_violation_attempt_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_processor_config, ipmi_interpret_sel_processor_flags, ipmi_interpret_sel_processor_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_processor_state_config, ipmi_interpret_sel_processor_state_flags, ipmi_interpret_sel_processor_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_supply_config, ipmi_interpret_sel_power_supply_flags, ipmi_interpret_sel_power_supply_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_supply_state_config, ipmi_interpret_sel_power_supply_state_flags, ipmi_interpret_sel_power_supply_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_supply_transition_severity_config, ipmi_interpret_sel_power_supply_transition_severity_flags, ipmi_interpret_sel_power_supply_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_supply_redundancy_config, ipmi_interpret_sel_power_supply_redundancy_flags, ipmi_interpret_sel_power_supply_redundancy_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_unit_config, ipmi_interpret_sel_power_unit_flags, ipmi_interpret_sel_power_unit_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_unit_state_config, ipmi_interpret_sel_power_unit_state_flags, ipmi_interpret_sel_power_unit_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_unit_transition_severity_config, ipmi_interpret_sel_power_unit_transition_severity_flags, ipmi_interpret_sel_power_unit_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_unit_device_present_config, ipmi_interpret_sel_power_unit_device_present_flags, ipmi_interpret_sel_power_unit_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_power_unit_redundancy_config, ipmi_interpret_sel_power_unit_redundancy_flags, ipmi_interpret_sel_power_unit_redundancy_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_cooling_device_redundancy_config, ipmi_interpret_sel_cooling_device_redundancy_flags, ipmi_interpret_sel_cooling_device_redundancy_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_memory_config, ipmi_interpret_sel_memory_flags, ipmi_interpret_sel_memory_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_memory_state_config, ipmi_interpret_sel_memory_state_flags, ipmi_interpret_sel_memory_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_memory_transition_severity_config, ipmi_interpret_sel_memory_transition_severity_flags, ipmi_interpret_sel_memory_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_memory_redundancy_config, ipmi_interpret_sel_memory_redundancy_flags, ipmi_interpret_sel_memory_redundancy_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_config, ipmi_interpret_sel_drive_slot_flags, ipmi_interpret_sel_drive_slot_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_state_config, ipmi_interpret_sel_drive_slot_state_flags, ipmi_interpret_sel_drive_slot_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_predictive_failure_config, ipmi_interpret_sel_drive_slot_predictive_failure_flags, ipmi_interpret_sel_drive_slot_predictive_failure_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_transition_severity_config, ipmi_interpret_sel_drive_slot_transition_severity_flags, ipmi_interpret_sel_drive_slot_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_drive_slot_device_present_config, ipmi_interpret_sel_drive_slot_device_present_flags, ipmi_interpret_sel_drive_slot_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_post_memory_resize_state_config, ipmi_interpret_sel_post_memory_resize_state_flags, ipmi_interpret_sel_post_memory_resize_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_config, ipmi_interpret_sel_system_firmware_progress_flags, ipmi_interpret_sel_system_firmware_progress_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_state_config, ipmi_interpret_sel_system_firmware_progress_state_flags, ipmi_interpret_sel_system_firmware_progress_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_device_present_config, ipmi_interpret_sel_system_firmware_progress_device_present_flags, ipmi_interpret_sel_system_firmware_progress_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_firmware_progress_transition_severity_config, ipmi_interpret_sel_system_firmware_progress_transition_severity_flags, ipmi_interpret_sel_system_firmware_progress_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_event_logging_disabled_config, ipmi_interpret_sel_event_logging_disabled_flags, ipmi_interpret_sel_event_logging_disabled_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_event_config, ipmi_interpret_sel_system_event_flags, ipmi_interpret_sel_system_event_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_state_config, ipmi_interpret_sel_system_event_transition_state_flags, ipmi_interpret_sel_system_event_transition_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_event_state_config, ipmi_interpret_sel_system_event_state_flags, ipmi_interpret_sel_system_event_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_event_transition_severity_config, ipmi_interpret_sel_system_event_transition_severity_flags, ipmi_interpret_sel_system_event_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_critical_interrupt_config, ipmi_interpret_sel_critical_interrupt_flags, ipmi_interpret_sel_critical_interrupt_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_button_switch_config, ipmi_interpret_sel_button_switch_flags, ipmi_interpret_sel_button_switch_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_button_switch_state_config, ipmi_interpret_sel_button_switch_state_flags, ipmi_interpret_sel_button_switch_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_button_switch_transition_severity_config, ipmi_interpret_sel_button_switch_transition_severity_flags, ipmi_interpret_sel_button_switch_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_module_board_state_config, ipmi_interpret_sel_module_board_state_flags, ipmi_interpret_sel_module_board_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_module_board_device_present_config, ipmi_interpret_sel_module_board_device_present_flags, ipmi_interpret_sel_module_board_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_chassis_transition_severity_config, ipmi_interpret_sel_chassis_transition_severity_flags, ipmi_interpret_sel_chassis_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_chip_set_config, ipmi_interpret_sel_chip_set_flags, ipmi_interpret_sel_chip_set_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_chip_set_transition_severity_config, ipmi_interpret_sel_chip_set_transition_severity_flags, ipmi_interpret_sel_chip_set_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_config, ipmi_interpret_sel_cable_interconnect_flags, ipmi_interpret_sel_cable_interconnect_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_cable_interconnect_transition_severity_config, ipmi_interpret_sel_cable_interconnect_transition_severity_flags, ipmi_interpret_sel_cable_interconnect_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_boot_initiated_config, ipmi_interpret_sel_system_boot_initiated_flags, ipmi_interpret_sel_system_boot_initiated_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_boot_error_config, ipmi_interpret_sel_boot_error_flags, ipmi_interpret_sel_boot_error_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_boot_error_state_config, ipmi_interpret_sel_boot_error_state_flags, ipmi_interpret_sel_boot_error_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_boot_error_transition_severity_config, ipmi_interpret_sel_boot_error_transition_severity_flags, ipmi_interpret_sel_boot_error_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_os_boot_config, ipmi_interpret_sel_os_boot_flags, ipmi_interpret_sel_os_boot_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_config, ipmi_interpret_sel_os_critical_stop_flags, ipmi_interpret_sel_os_critical_stop_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_os_critical_stop_state_config, ipmi_interpret_sel_os_critical_stop_state_flags, ipmi_interpret_sel_os_critical_stop_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_slot_connector_config, ipmi_interpret_sel_slot_connector_flags, ipmi_interpret_sel_slot_connector_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_slot_connector_transition_severity_config, ipmi_interpret_sel_slot_connector_transition_severity_flags, ipmi_interpret_sel_slot_connector_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_system_acpi_power_state_config, ipmi_interpret_sel_system_acpi_power_state_flags, ipmi_interpret_sel_system_acpi_power_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_watchdog2_config, ipmi_interpret_sel_watchdog2_flags, ipmi_interpret_sel_watchdog2_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_platform_alert_config, ipmi_interpret_sel_platform_alert_flags, ipmi_interpret_sel_platform_alert_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_platform_alert_state_config, ipmi_interpret_sel_platform_alert_state_flags, ipmi_interpret_sel_platform_alert_state_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_entity_presence_config, ipmi_interpret_sel_entity_presence_flags, ipmi_interpret_sel_entity_presence_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_entity_presence_device_present_config, ipmi_interpret_sel_entity_presence_device_present_flags, ipmi_interpret_sel_entity_presence_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_lan_config, ipmi_interpret_sel_lan_flags, ipmi_interpret_sel_lan_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_config, ipmi_interpret_sel_management_subsystem_health_flags, ipmi_interpret_sel_management_subsystem_health_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_transition_severity_config, ipmi_interpret_sel_management_subsystem_health_transition_severity_flags, ipmi_interpret_sel_management_subsystem_health_transition_severity_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_management_subsystem_health_device_present_config, ipmi_interpret_sel_management_subsystem_health_device_present_flags, ipmi_interpret_sel_management_subsystem_health_device_present_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_battery_config, ipmi_interpret_sel_battery_flags, ipmi_interpret_sel_battery_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_session_audit_config, ipmi_interpret_sel_session_audit_flags, ipmi_interpret_sel_session_audit_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_version_change_config, ipmi_interpret_sel_version_change_flags, ipmi_interpret_sel_version_change_config_len); _fill_sel_config_options (config_file_options, &config_file_options_len, ctx->interpret_sel.ipmi_interpret_sel_fru_state_config, ipmi_interpret_sel_fru_state_flags, ipmi_interpret_sel_fru_state_config_len); config_file_options[config_file_options_len].optionname = "IPMI_OEM_Sensor_System_Event_Record"; config_file_options[config_file_options_len].option_type = CONFFILE_OPTION_LIST_STRING; config_file_options[config_file_options_len].option_type_arg = 8; config_file_options[config_file_options_len].callback_func = _cb_sel_oem_sensor_parse; config_file_options[config_file_options_len].max_count = -1; config_file_options[config_file_options_len].required_count = 0; config_file_options[config_file_options_len].count_ptr = &sel_oem_sensor_flag; config_file_options[config_file_options_len].option_ptr = &ctx->interpret_sel.sel_oem_sensor_config; config_file_options[config_file_options_len].option_data = 0; config_file_options_len++; config_file_options[config_file_options_len].optionname = "IPMI_OEM_Timestamped_Record"; config_file_options[config_file_options_len].option_type = CONFFILE_OPTION_LIST_STRING; config_file_options[config_file_options_len].option_type_arg = 9; config_file_options[config_file_options_len].callback_func = _cb_sel_oem_record_parse; config_file_options[config_file_options_len].max_count = -1; config_file_options[config_file_options_len].required_count = 0; config_file_options[config_file_options_len].count_ptr = &sel_oem_timestamped_flag; config_file_options[config_file_options_len].option_ptr = &ctx->interpret_sel.sel_oem_record_config; config_file_options[config_file_options_len].option_data = 0; config_file_options_len++; config_file_options[config_file_options_len].optionname = "IPMI_OEM_Non_Timestamped_Record"; config_file_options[config_file_options_len].option_type = CONFFILE_OPTION_LIST_STRING; config_file_options[config_file_options_len].option_type_arg = 16; config_file_options[config_file_options_len].callback_func = _cb_sel_oem_record_parse; config_file_options[config_file_options_len].max_count = -1; config_file_options[config_file_options_len].required_count = 0; config_file_options[config_file_options_len].count_ptr = &sel_oem_non_timestamped_flag; config_file_options[config_file_options_len].option_ptr = &ctx->interpret_sel.sel_oem_record_config; config_file_options[config_file_options_len].option_data = 0; config_file_options_len++; if (!(cf = conffile_handle_create ())) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } if (conffile_parse (cf, config_file, config_file_options, config_file_options_len, NULL, 0, 0) < 0) { if (conffile_errnum (cf) == CONFFILE_ERR_EXIST) { /* Its not an error if the default configuration file doesn't exist */ if (!config_file) { rv = 0; goto cleanup; } else { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST); goto cleanup; } } if (CONFFILE_IS_PARSE_ERR (conffile_errnum (cf))) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_PARSE); else if (conffile_errnum (cf) == CONFFILE_ERR_OUTMEM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_INTERNAL_ERROR); goto cleanup; } rv = 0; cleanup: conffile_handle_destroy (cf); return (rv); } freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-sel.h0000644002055400205540000000215313527331637024735 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_CONFIG_SEL_H #define IPMI_INTERPRET_CONFIG_SEL_H #include "freeipmi/interpret/ipmi-interpret.h" #include "ipmi-interpret-defs.h" int interpret_sel_init (ipmi_interpret_ctx_t ctx); void interpret_sel_destroy (ipmi_interpret_ctx_t ctx); int interpret_sel_config_parse (ipmi_interpret_ctx_t ctx, const char *sel_config_file); #endif /* IPMI_INTERPRET_CONFIG_SEL_H */ freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-sensor.c0000644002055400205540000054556413527331637025500 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-sensor-types-oem-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h" #include "ipmi-interpret-defs.h" #include "ipmi-interpret-trace.h" #include "ipmi-interpret-config-common.h" #include "ipmi-interpret-config-sensor.h" #include "ipmi-interpret-util.h" #include "freeipmi-portability.h" #include "conffile.h" #include "hash.h" /* * Standard Sensors */ static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_threshold_config[] = { { "IPMI_Threshold_Sensor_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Critical_Threshold", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_At_Or_Below_Lower_Critical_Threshold", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Recoverable_Threshold", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Critical_Threshold", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Threshold_Sensor_At_Or_Above_Upper_Critical_Threshold", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Recoverable_Threshold", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_threshold_config_len = 7; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_temperature_state_config[] = { { "IPMI_Temperature_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_temperature_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_temperature_limit_config[] = { { "IPMI_Temperature_Limit_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Limit_Not_Exceeded", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Limit_Exceeded", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_temperature_limit_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_temperature_transition_severity_config[] = { { "IPMI_Temperature_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Temperature_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Temperature_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_temperature_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_voltage_state_config[] = { { "IPMI_Voltage_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_voltage_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_voltage_limit_config[] = { { "IPMI_Voltage_Limit_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Limit_Not_Exceeded", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Limit_Exceeded", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_voltage_limit_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_voltage_performance_config[] = { { "IPMI_Voltage_Performance_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Performance_Met", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Performance_Lags", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_voltage_performance_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_voltage_transition_severity_config[] = { { "IPMI_Voltage_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Voltage_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Voltage_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_voltage_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_current_transition_severity_config[] = { { "IPMI_Current_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Current_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Current_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Current_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_current_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fan_state_config[] = { { "IPMI_Fan_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_fan_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fan_transition_severity_config[] = { { "IPMI_Fan_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_fan_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fan_device_present_config[] = { { "IPMI_Fan_Device_Present_Device_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_fan_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fan_transition_availability_config[] = { { "IPMI_Fan_Transition_Availability_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Availability_To_Running", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Transition_Availability_To_In_Test", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Power_Off", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_On_Line", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Off_Line", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Off_Duty", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_To_Degraded", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Transition_Availability_To_Power_Save", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Transition_Availability_Install_Error", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_fan_transition_availability_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fan_redundancy_config[] = { { "IPMI_Fan_Redundancy_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Fan_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_fan_redundancy_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_physical_security_config[] = { { "IPMI_Physical_Security_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Physical_Security_General_Chassis_Intrusion", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Drive_Bay_Intrusion", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_IO_Card_Intrusion", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Processor_Area_Intrusion", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_LAN_Leash_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_Unauthorized_Dock_Undock", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Physical_Security_FAN_Area_Intrusion", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_physical_security_config_len = 8; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_platform_security_violation_attempt_config[] = { { "IPMI_Platform_Security_Violation_Attempt_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_platform_security_violation_attempt_config_len = 7; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_processor_config[] = { { "IPMI_Processor_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_IERR", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Thermal_Trip", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB1_BIST_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB2_Hang_In_POST_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_FRB3_Processor_Startup_Initialization_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Processor_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_Processor_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Terminator_Presence_Detected", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Processor_Automatically_Throttled", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Processor_Machine_Check_Exception", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Processor_Correctable_Machine_Check_Error", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_processor_config_len = 14; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_processor_state_config[] = { { "IPMI_Processor_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Processor_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_processor_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_supply_config[] = { { "IPMI_Power_Supply_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Power_Supply_Failure_Detected", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Power_Supply_Inactive", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_power_supply_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_supply_state_config[] = { { "IPMI_Power_Supply_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_power_supply_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_supply_transition_severity_config[] = { { "IPMI_Power_Supply_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_power_supply_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_supply_redundancy_config[] = { { "IPMI_Power_Supply_Redundancy_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Supply_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_power_supply_redundancy_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_unit_config[] = { { "IPMI_Power_Unit_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Power_Off_Power_Down", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Power_Cycle", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_240VA_Power_Down", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Interlock_Power_Down", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_AC_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Soft_Power_Control_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Power_Unit_Failure_Detected", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_power_unit_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_unit_state_config[] = { { "IPMI_Power_Unit_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_power_unit_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_unit_transition_severity_config[] = { { "IPMI_Power_Unit_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_power_unit_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_unit_device_present_config[] = { { "IPMI_Power_Unit_Device_Present_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_power_unit_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_power_unit_redundancy_config[] = { { "IPMI_Power_Unit_Redundancy_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Power_Unit_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_power_unit_redundancy_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_cooling_device_redundancy_config[] = { { "IPMI_Cooling_Device_Redundancy_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cooling_Device_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_cooling_device_redundancy_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_memory_config[] = { { "IPMI_Memory_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Correctable_Memory_Error", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Uncorrectable_Memory_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Parity", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Memory_Scrub_Failed", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Memory_Device_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Spare", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Memory_Automatically_Throttled", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Critical_Overtemperature", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_memory_config_len = 12; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_memory_state_config[] = { { "IPMI_Memory_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_memory_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_memory_transition_severity_config[] = { { "IPMI_Memory_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_memory_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_memory_redundancy_config[] = { { "IPMI_Memory_Redundancy_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Redundancy_Fully_Redundant", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Memory_Redundancy_Redundancy_Lost", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Redundancy_Redundancy_Degraded", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_memory_redundancy_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_drive_slot_config[] = { { "IPMI_Drive_Slot_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Drive_Presence", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Drive_Fault", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Predictive_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Hot_Spare", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_In_Critical_Array", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_In_Failed_Array", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Rebuild_Remap_In_Progress", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Rebuild_Remap_Aborted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_drive_slot_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_drive_slot_state_config[] = { { "IPMI_Drive_Slot_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_State_Deasserted", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_State_Asserted", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_drive_slot_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_drive_slot_predictive_failure_config[] = { { "IPMI_Drive_Slot_Predictive_Failure_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Predictive_Failure_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Predictive_Failure_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_drive_slot_predictive_failure_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_drive_slot_transition_severity_config[] = { { "IPMI_Drive_Slot_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Drive_Slot_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_drive_slot_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_drive_slot_device_present_config[] = { { "IPMI_Drive_Slot_Device_Present_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_drive_slot_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_post_memory_resize_state_config[] = { { "IPMI_Post_Memory_Resize_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Post_Memory_Resize_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Post_Memory_Resize_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_post_memory_resize_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_firmware_progress_config[] = { { "IPMI_System_Firmware_Progress_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_System_Firmware_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_System_Firmware_Hang", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_System_Firmware_Progress", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_system_firmware_progress_config_len = 4; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_firmware_progress_state_config[] = { { "IPMI_System_Firmware_Progress_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_system_firmware_progress_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_firmware_progress_device_present_config[] = { { "IPMI_System_Firmware_Progress_Device_Present_Device_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_system_firmware_progress_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_firmware_progress_transition_severity_config[] = { { "IPMI_System_Firmware_Progress_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Firmware_Progress_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Firmware_Progress_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_system_firmware_progress_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_event_logging_disabled_config[] = { { "IPMI_Event_Logging_Disabled_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Event_Logging_Disabled_All_Event_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_SEL_Full", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Event_Logging_Disabled_SEL_Almost_Full", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_event_logging_disabled_config_len = 8; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_event_config[] = { { "IPMI_System_Event_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_System_Reconfigured", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_OEM_System_Boot_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Undetermined_System_Hardware_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Entry_Added_To_Auxiliary_Log", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_PEF_Action", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Timestamp_Clock_Sync", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_system_event_config_len = 7; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_event_transition_state_config[] = { { "IPMI_System_Event_Transition_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_State_Idle", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_State_Active", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_State_Busy", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_system_event_transition_state_config_len = 4; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_event_state_config[] = { { "IPMI_System_Event_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_State_Asserted", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_system_event_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_event_transition_severity_config[] = { { "IPMI_System_Event_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_Event_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_System_Event_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_system_event_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_critical_interrupt_config[] = { { "IPMI_Critical_Interrupt_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Timeout", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_IO_Channel_Check_NMI", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Software_NMI", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Critical_Interrupt_PCI_PERR", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_PCI_SERR", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Correctable_Error", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Critical_Interrupt_Bus_Uncorrectable_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Fatal_NMI", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Fatal_Error", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Critical_Interrupt_Bus_Degraded", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_critical_interrupt_config_len = 13; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_button_switch_config[] = { { "IPMI_Button_Switch_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Power_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Sleep_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Reset_Button_Pressed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_FRU_Latch_Open", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_FRU_Service_Request_Button", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_button_switch_config_len = 6; /* achu: for a button/switch states, I don't think users really care. * So report Nominal for all states. */ static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_button_switch_state_config[] = { { "IPMI_Button_Switch_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_State_Asserted", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_button_switch_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_button_switch_transition_severity_config[] = { { "IPMI_Button_Switch_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Button_Switch_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Button_Switch_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_button_switch_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_module_board_state_config[] = { { "IPMI_Module_Board_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Module_Board_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Module_Board_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_module_board_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_module_board_device_present_config[] = { { "IPMI_Module_Board_Device_Present_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Module_Board_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Module_Board_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_module_board_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_chassis_transition_severity_config[] = { { "IPMI_Chassis_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chassis_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chassis_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_chassis_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_chip_set_transition_severity_config[] = { { "IPMI_Chip_Set_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Chip_Set_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Chip_Set_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_chip_set_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_cable_interconnect_config[] = { { "IPMI_Cable_Interconnect_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Is_Connected", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Configuration_Error", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_cable_interconnect_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_cable_interconnect_transition_severity_config[] = { { "IPMI_Cable_Interconnect_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Cable_Interconnect_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Cable_Interconnect_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_cable_interconnect_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_boot_error_config[] = { { "IPMI_Boot_Error_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_No_Bootable_Media", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_PXE_Server_Not_Found", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Invalid_Boot_Sector", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_boot_error_config_len = 6; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_boot_error_state_config[] = { { "IPMI_Boot_Error_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_boot_error_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_boot_error_transition_severity_config[] = { { "IPMI_Boot_Error_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Boot_Error_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Boot_Error_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_boot_error_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_os_boot_config[] = { { "IPMI_OS_Boot_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_A_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_C_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_PXE_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Diagnostic_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_CD_ROM_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_ROM_Boot_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_os_boot_config_len = 12; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_os_critical_stop_state_config[] = { { "IPMI_OS_Critical_Stop_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Critical_Stop_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_OS_Critical_Stop_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_os_critical_stop_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_slot_connector_config[] = { { "IPMI_Slot_Connector_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Fault_Status_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Identify_Status_Asserted", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Power_Is_Off", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Slot_Connector_Device_Removal_Request", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Interlock_Asserted", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Is_Disabled", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Slot_Holds_Spare_Device", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_slot_connector_config_len = 11; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_slot_connector_transition_severity_config[] = { { "IPMI_Slot_Connector_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Slot_Connector_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Slot_Connector_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_slot_connector_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_system_acpi_power_state_config[] = { { "IPMI_System_ACPI_Power_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S0_G0", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S1", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S2", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S3", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S4", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S5_G2", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S4_S5_Soft_Off", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_G3_Mechanical_Off", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_G1_Sleeping", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_S5_Entered_By_Override", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Legacy_ON_State", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Legacy_OFF_State", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_System_ACPI_Power_State_Unspecified", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_System_ACPI_Power_State_Unknown", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_system_acpi_power_state_config_len = 16; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_watchdog2_config[] = { { "IPMI_Watchdog2_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Timer_Expired", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Watchdog2_Hard_Reset", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Power_Down", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Power_Cycle", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Watchdog2_Reserved1", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved2", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved3", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Reserved4", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Watchdog2_Timer_Interrupt", IPMI_INTERPRET_STATE_WARNING}, }; static unsigned int ipmi_interpret_sensor_watchdog2_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_platform_alert_state_config[] = { { "IPMI_Platform_Alert_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_State_Deasserted", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Platform_Alert_State_Asserted", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_platform_alert_state_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_entity_presence_config[] = { { "IPMI_Entity_Presence_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Entity_Presence_Entity_Present", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Entity_Presence_Entity_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Entity_Presence_Entity_Disabled", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_entity_presence_config_len = 4; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_entity_presence_device_present_config[] = { { "IPMI_Entity_Presence_Device_Present_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_entity_presence_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_management_subsystem_health_config[] = { { "IPMI_Management_Subsystem_Health_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Management_Controller_Off_Line", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Management_Controller_Unavailable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Sensor_Failure", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_FRU_Failure", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_management_subsystem_health_config_len = 7; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_management_subsystem_health_transition_severity_config[] = { { "IPMI_Management_Subsystem_Health_Transition_Severity_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_OK", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_OK", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_More_Severe", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Monitor", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Management_Subsystem_Health_Transition_Severity_Informational", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_management_subsystem_health_transition_severity_config_len = 10; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_management_subsystem_health_device_present_config[] = { { "IPMI_Management_Subsystem_Health_Device_Present_Device_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Management_Subsystem_Health_Device_Present_Device_Removed_Device_Absent", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Management_Subsystem_Health_Device_Present_Device_Inserted_Device_Present", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_management_subsystem_health_device_present_config_len = 3; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_battery_config[] = { { "IPMI_Battery_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Battery_Battery_Low", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Battery_Battery_Failed", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Battery_Battery_Presence_Detected", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_battery_config_len = 4; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_session_audit_config[] = { { "IPMI_Session_Audit_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Session_Audit_Session_Activated", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Session_Audit_Session_Deactivated", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Session_Audit_Invalid_Username_Or_Password", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Session_Audit_Invalid_Password_Disable", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_session_audit_config_len = 5; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_version_change_config[] = { { "IPMI_Version_Change_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful", IPMI_INTERPRET_STATE_NOMINAL}, }; static unsigned int ipmi_interpret_sensor_version_change_config_len = 9; static struct ipmi_interpret_sensor_config ipmi_interpret_sensor_fru_state_config[] = { { "IPMI_FRU_State_No_Event", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_FRU_State_FRU_Not_Installed", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_FRU_State_FRU_Inactive", IPMI_INTERPRET_STATE_CRITICAL}, { "IPMI_FRU_State_FRU_Activation_Requested", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Activation_In_Progress", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Active", IPMI_INTERPRET_STATE_NOMINAL}, { "IPMI_FRU_State_FRU_Deactivation_Requested", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Deactivation_In_Progress", IPMI_INTERPRET_STATE_WARNING}, { "IPMI_FRU_State_FRU_Communication_Lost", IPMI_INTERPRET_STATE_CRITICAL}, }; static unsigned int ipmi_interpret_sensor_fru_state_config_len = 9; static int _interpret_config_sensor_init (ipmi_interpret_ctx_t ctx, struct ipmi_interpret_sensor_config ***config_dest, struct ipmi_interpret_sensor_config *config_src, unsigned int config_len) { unsigned int mlen; unsigned int i; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (config_dest); assert (config_src); assert (config_len); /* +1 for storing NULL pointer sentinel value */ mlen = sizeof (struct ipmi_interpret_sensor_config *) * (config_len + 1); if (!((*config_dest) = (struct ipmi_interpret_sensor_config **) malloc (mlen))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } memset ((*config_dest), '\0', mlen); mlen = sizeof (struct ipmi_interpret_sensor_config); for (i = 0; i < config_len; i++) { if (!((*config_dest)[i] = (struct ipmi_interpret_sensor_config *) malloc (mlen))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } (*config_dest)[i]->option_str = config_src[i].option_str; (*config_dest)[i]->state = config_src[i].state; } (*config_dest)[i] = NULL; rv = 0; cleanup: return (rv); } static int _interpret_sensor_oem_config_create (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, struct ipmi_interpret_sensor_oem_config **oem_conf) { struct ipmi_interpret_sensor_oem_config *tmp_oem_conf = NULL; char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); assert (oem_conf); memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", manufacturer_id, product_id, event_reading_type_code, sensor_type); if (!(tmp_oem_conf = (struct ipmi_interpret_sensor_oem_config *)malloc (sizeof (struct ipmi_interpret_sensor_oem_config)))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } memset (tmp_oem_conf, '\0', sizeof (struct ipmi_interpret_sensor_oem_config)); memcpy (tmp_oem_conf->key, keybuf, IPMI_OEM_HASH_KEY_BUFLEN); tmp_oem_conf->manufacturer_id = manufacturer_id; tmp_oem_conf->product_id = product_id; tmp_oem_conf->event_reading_type_code = event_reading_type_code; tmp_oem_conf->sensor_type = sensor_type; if (!hash_insert (ctx->interpret_sensor.sensor_oem_config, tmp_oem_conf->key, tmp_oem_conf)) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_INTERNAL_ERROR); goto cleanup; } (*oem_conf) = tmp_oem_conf; rv = 0; cleanup: if (rv < 0) free (tmp_oem_conf); return (rv); } static int _interpret_sensor_oem_dell_power_optimized (ipmi_interpret_ctx_t ctx) { struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); /* Dell Poweredge R610/R710 Power Optimized * * Manufacturer ID = 674 (Dell) * Product ID = 256 (Poweredge) * Event/Reading Type Code = 6Fh (Sensor Specific) * Sensor Type = C0h (OEM) * Bitmask 0x0001 = "Good" * Bitmask 0x0002 = "Degraded, other" * Bitmask 0x0004 = "Degraded, thermal protection" * Bitmask 0x0008 = "Degraded, cooling capacity change" * Bitmask 0x0010 = "Degraded, power capacity change" * Bitmask 0x0020 = "Degraded, user defined power capacity" * Bitmask 0x0040 = "Halted, system power exceeds capacity" * Bitmask 0x0080 = "Degraded, system power exceeds capacity" */ if (_interpret_sensor_oem_config_create (ctx, IPMI_IANA_ENTERPRISE_ID_DELL, IPMI_DELL_PRODUCT_ID_POWEREDGE_R610, IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC, IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS, &oem_conf) < 0) return (-1); oem_conf->oem_state[0].sensor_event_bitmask = 0; oem_conf->oem_state[0].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[0].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[1].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_GOOD); oem_conf->oem_state[1].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[1].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[2].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_OTHER); oem_conf->oem_state[2].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[2].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[3].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_THERMAL_PROTECTION); oem_conf->oem_state[3].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[3].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[4].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_COOLING_CAPACITY_CHANGE); oem_conf->oem_state[4].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[4].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[5].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_POWER_CAPACITY_CHANGE); oem_conf->oem_state[5].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[5].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[6].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_USER_DEFINED_POWER_CAPACITY); oem_conf->oem_state[6].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[6].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[7].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_HALTED_SYSTEM_POWER_EXCEEDS_CAPACITY); oem_conf->oem_state[7].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[7].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[8].sensor_event_bitmask = (0x1 << IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS_DEGRADED_SYSTEM_POWER_EXCEEDS_CAPACITY); oem_conf->oem_state[8].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[8].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state_count = 9; return (0); } static int _interpret_sensor_oem_dell_module_board_status (ipmi_interpret_ctx_t ctx) { struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); /* Dell Poweredge R210 Module/Board OEM * * Manufacturer ID = 674 (Dell) * Product ID = 256 (Poweredge) * Event/Reading Type Code = 70h (OEM) * Sensor Type = 15h (Module/Board) * Bitmask 0x0001 = "Absent" * Bitmask 0x0002 = "Standby" * Bitmask 0x0004 = "IPMI Function ready" * Bitmask 0x0008 = "Fully ready" * Bitmask 0x0010 = "Offline" * Bitmask 0x0020 = "Failed" * Bitmask 0x0040 = "Active" * Bitmask 0x0080 = "Booting" * Bitmask 0x0100 = "Write protected" */ if (_interpret_sensor_oem_config_create (ctx, IPMI_IANA_ENTERPRISE_ID_DELL, IPMI_DELL_PRODUCT_ID_POWEREDGE_R610, IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS, IPMI_SENSOR_TYPE_MODULE_BOARD, &oem_conf) < 0) return (-1); oem_conf->oem_state[0].sensor_event_bitmask = 0; oem_conf->oem_state[0].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[0].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[1].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_ABSENT); oem_conf->oem_state[1].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[1].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[2].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_STANDBY); oem_conf->oem_state[2].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[2].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[3].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_IPMI_FUNCTION_READY); oem_conf->oem_state[3].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[3].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[4].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_FULLY_READY); oem_conf->oem_state[4].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[4].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[5].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_OFFLINE); oem_conf->oem_state[5].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[5].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[6].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_FAILED); oem_conf->oem_state[6].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[6].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[7].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_ACTIVE); oem_conf->oem_state[7].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[7].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[8].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_BOOTING); oem_conf->oem_state[8].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[8].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[9].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS_WRITE_PROTECTED); oem_conf->oem_state[9].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[9].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state_count = 10; return (0); } static int _interpret_sensor_oem_dell (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_dell_power_optimized (ctx) < 0) return (-1); if (_interpret_sensor_oem_dell_module_board_status (ctx) < 0) return (-1); return (0); } static int _interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC, IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP, &oem_conf) < 0) return (-1); oem_conf->oem_state[0].sensor_event_bitmask = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_LOW; oem_conf->oem_state[0].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[0].oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; oem_conf->oem_state[1].sensor_event_bitmask = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_MEDIUM; oem_conf->oem_state[1].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[1].oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; oem_conf->oem_state[2].sensor_event_bitmask = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_HIGH; oem_conf->oem_state[2].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[2].oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; oem_conf->oem_state[3].sensor_event_bitmask = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_OVERHEAT; oem_conf->oem_state[3].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[3].oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; oem_conf->oem_state[4].sensor_event_bitmask = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_NOT_INSTALLED; oem_conf->oem_state[4].sensor_state = IPMI_INTERPRET_STATE_WARNING; oem_conf->oem_state[4].oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; oem_conf->oem_state_count = 5; return (0); } static int _interpret_sensor_oem_supermicro_discrete_cpu_temp (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); /* Supermicro CPU Temperature Sensor * X7DBR-3/X7DB8/X8DTN/X7SBI-LN4/X8DTH/X8DTG/X8DTU/X8DT3-LN4F/X8DTU-6+/X8DTL/X8DTL-3F * X8SIL-F/X9SCL/X9SCM/X8DTN+-F/X8SIE/X9SCA-F-O/H8DGU-F/X9DRi-F/X9DRI-LN4F+/X9SPU-F-O/X9SCM-iiF/H8SGL-F * * Manufacturer ID = 10876 (Supermicro), 10437 (Peppercon, IPMI card manufacturer), * 47488 (Supermicro, not IANA number, special case) * 5593 (Magnum Technologies, rebranded Supermicro board) * Product ID = 4 (X7DBR-3 / X7DBR_3, X7DB8, X8DTN, X7SBI-LN4 / X7SBI_LN4), 43707 (X8DTH, X8DTG, X8DTU, X8DT3-LN4F / X8DT3_LN4F), * 1549 (X8DTU-6+ / X8DTU_6PLUS), 6 (X8DTL, X8DTL-3F / X8DTL_3F), 1541 (X8SIL-F / X8SIL_F), 1572 (X9SCL, X9SCM), * 1551 (X8DTN+-F / X8DTNPLUS_F), 1037 (X8SIE), 1585 (X9SCA-F-O / X9SCA_F_O), 43025 (H8DGU-F / H8DGU_F), * 1576 (X9DRi-F, X9DRI_F), 1574 (X9DRI-LN4F+ / X9DRI_LN4F_PLUS), 1603 (X9SPU-F-O / X9SPU_F_O), * 1600 (X9SCM-iiF / X9SCM_IIF), 42769 (H8SGL-F / H8SGL_F) * Event/Reading Type Code = 70h (OEM) * Sensor Type = C0h (OEM) * Value 0x0000 = "Low" * Value 0x0001 = "Medium" * Value 0x0002 = "High" * Value 0x0004 = "Overheat" * Value 0x0007 = "Not Installed" */ if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO, IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_PEPPERCON, IPMI_SUPERMICRO_PRODUCT_ID_FOUR_BASE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DT_BASE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X9SC_BASE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X8SIE) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DGU) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8DG6) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND, IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F) < 0) return (-1); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES, IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_BASE) < 0) return (-1); return (0); } static int _interpret_sensor_oem_supermicro (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_supermicro_discrete_cpu_temp (ctx) < 0) return (-1); return (0); } static int _interpret_sensor_oem_intel_smi_timeout_power_throttled_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_STATE, IPMI_SENSOR_TYPE_OEM_INTEL_SMI_TIMEOUT, &oem_conf) < 0) return (-1); oem_conf->oem_state[0].sensor_event_bitmask = 0; oem_conf->oem_state[0].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[0].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[1].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_DEASSERTED); oem_conf->oem_state[1].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[1].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[2].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED); oem_conf->oem_state[2].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[2].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state_count = 3; return (0); } static int _interpret_sensor_oem_intel_smi_timeout_power_throttled (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); /* Intel SMI Timeout * Intel SR1625 * Intel S5500WB/Penguin Computing Relion 700 * Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard contains Intel manufacturer ID) * Intel S5000PAL * * and * * Intel Power Throttled * Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard contains Intel manufacturer ID) * * Manufacturer ID = 343 (Intel) * Product ID = 62 (Intel SR1625, S5500WB), 64 (Quanta QSSC-S4R), 40 (Intel S5000PAL) * Event/Reading Type Code = 3h (State Asserted/Deasserted) * Sensor Type = F3h (OEM) * Bitmask 0x0001 = "State Deasserted" * Bitmask 0x0002 = "State Asserted" */ /* From Intel * * The BMC supports an SMI timeout sensor (sensor type OEM (F3h), * event type Discrete (03h)) that asserts if the SMI signal has * been asserted for more than 90 seconds. A continuously asserted * SMI signal is an indication that the BIOS cannot service the * condition that caused the SMI. This is usually because that * condition prevents the BIOS from running. When an SMI timeout * occurs, the BMC asserts the SMI timeout sensor and logs a SEL * event for that sensor. The BMC will also reset the system. */ /* Intel SR1625 * Intel S5500WB/Penguin Computing Relion 700 */ if (_interpret_sensor_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_SR1625) < 0) return (-1); /* Quanta QSSC-S4R/Appro GB812X-CN */ if (_interpret_sensor_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) < 0) return (-1); /* Intel S5000PAL */ if (_interpret_sensor_oem_intel_smi_timeout_power_throttled_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_S5000PAL) < 0) return (-1); return (0); } static int _interpret_sensor_oem_intel_nmi_state_wrapper (ipmi_interpret_ctx_t ctx, uint32_t manufacturer_id, uint16_t product_id) { struct ipmi_interpret_sensor_oem_config *oem_conf; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_config_create (ctx, manufacturer_id, product_id, IPMI_EVENT_READING_TYPE_CODE_STATE, IPMI_SENSOR_TYPE_OEM_INTEL_NMI_STATE, &oem_conf) < 0) return (-1); oem_conf->oem_state[0].sensor_event_bitmask = 0; oem_conf->oem_state[0].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[0].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[1].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_DEASSERTED); oem_conf->oem_state[1].sensor_state = IPMI_INTERPRET_STATE_NOMINAL; oem_conf->oem_state[1].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state[2].sensor_event_bitmask = (0x1 << IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED); oem_conf->oem_state[2].sensor_state = IPMI_INTERPRET_STATE_CRITICAL; oem_conf->oem_state[2].oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; oem_conf->oem_state_count = 3; return (0); } static int _interpret_sensor_oem_intel_nmi_state (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); /* Intel NMI State * Intel S5000PAL * * Manufacturer ID = 343 (Intel) * Product ID = 40 (Intel S5000PAL) * Event/Reading Type Code = 3h (State Asserted/Deasserted) * Sensor Type = C0h (OEM) * Bitmask 0x0001 = "State Deasserted" * Bitmask 0x0002 = "State Asserted" */ /* Intel S5000PAL */ if (_interpret_sensor_oem_intel_nmi_state_wrapper (ctx, IPMI_IANA_ENTERPRISE_ID_INTEL, IPMI_INTEL_PRODUCT_ID_S5000PAL) < 0) return (-1); return (0); } static int _interpret_sensor_oem_intel (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_intel_smi_timeout_power_throttled (ctx) < 0) return (-1); if (_interpret_sensor_oem_intel_nmi_state (ctx) < 0) return (-1); return (0); } static int _interpret_sensor_oem_config_init (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); assert (ctx->interpret_sensor.sensor_oem_config); if (_interpret_sensor_oem_dell (ctx) < 0) return (-1); if (_interpret_sensor_oem_supermicro (ctx) < 0) return (-1); if (_interpret_sensor_oem_intel (ctx) < 0) return (-1); return (0); } int interpret_sensor_init (ipmi_interpret_ctx_t ctx) { int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_threshold_config, ipmi_interpret_sensor_threshold_config, ipmi_interpret_sensor_threshold_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_temperature_state_config, ipmi_interpret_sensor_temperature_state_config, ipmi_interpret_sensor_temperature_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_temperature_limit_config, ipmi_interpret_sensor_temperature_limit_config, ipmi_interpret_sensor_temperature_limit_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_temperature_transition_severity_config, ipmi_interpret_sensor_temperature_transition_severity_config, ipmi_interpret_sensor_temperature_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_voltage_state_config, ipmi_interpret_sensor_voltage_state_config, ipmi_interpret_sensor_voltage_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_voltage_limit_config, ipmi_interpret_sensor_voltage_limit_config, ipmi_interpret_sensor_voltage_limit_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_voltage_performance_config, ipmi_interpret_sensor_voltage_performance_config, ipmi_interpret_sensor_voltage_performance_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_voltage_transition_severity_config, ipmi_interpret_sensor_voltage_transition_severity_config, ipmi_interpret_sensor_voltage_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_current_transition_severity_config, ipmi_interpret_sensor_current_transition_severity_config, ipmi_interpret_sensor_current_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fan_state_config, ipmi_interpret_sensor_fan_state_config, ipmi_interpret_sensor_fan_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_severity_config, ipmi_interpret_sensor_fan_transition_severity_config, ipmi_interpret_sensor_fan_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fan_device_present_config, ipmi_interpret_sensor_fan_device_present_config, ipmi_interpret_sensor_fan_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_availability_config, ipmi_interpret_sensor_fan_transition_availability_config, ipmi_interpret_sensor_fan_transition_availability_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fan_redundancy_config, ipmi_interpret_sensor_fan_redundancy_config, ipmi_interpret_sensor_fan_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_physical_security_config, ipmi_interpret_sensor_physical_security_config, ipmi_interpret_sensor_physical_security_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_platform_security_violation_attempt_config, ipmi_interpret_sensor_platform_security_violation_attempt_config, ipmi_interpret_sensor_platform_security_violation_attempt_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_processor_config, ipmi_interpret_sensor_processor_config, ipmi_interpret_sensor_processor_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_processor_state_config, ipmi_interpret_sensor_processor_state_config, ipmi_interpret_sensor_processor_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_config, ipmi_interpret_sensor_power_supply_config, ipmi_interpret_sensor_power_supply_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_state_config, ipmi_interpret_sensor_power_supply_state_config, ipmi_interpret_sensor_power_supply_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_transition_severity_config, ipmi_interpret_sensor_power_supply_transition_severity_config, ipmi_interpret_sensor_power_supply_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_redundancy_config, ipmi_interpret_sensor_power_supply_redundancy_config, ipmi_interpret_sensor_power_supply_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_config, ipmi_interpret_sensor_power_unit_config, ipmi_interpret_sensor_power_unit_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_state_config, ipmi_interpret_sensor_power_unit_state_config, ipmi_interpret_sensor_power_unit_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_transition_severity_config, ipmi_interpret_sensor_power_unit_transition_severity_config, ipmi_interpret_sensor_power_unit_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_device_present_config, ipmi_interpret_sensor_power_unit_device_present_config, ipmi_interpret_sensor_power_unit_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_redundancy_config, ipmi_interpret_sensor_power_unit_redundancy_config, ipmi_interpret_sensor_power_unit_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_cooling_device_redundancy_config, ipmi_interpret_sensor_cooling_device_redundancy_config, ipmi_interpret_sensor_cooling_device_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_memory_config, ipmi_interpret_sensor_memory_config, ipmi_interpret_sensor_memory_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_memory_state_config, ipmi_interpret_sensor_memory_state_config, ipmi_interpret_sensor_memory_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_memory_transition_severity_config, ipmi_interpret_sensor_memory_transition_severity_config, ipmi_interpret_sensor_memory_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_memory_redundancy_config, ipmi_interpret_sensor_memory_redundancy_config, ipmi_interpret_sensor_memory_redundancy_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_config, ipmi_interpret_sensor_drive_slot_config, ipmi_interpret_sensor_drive_slot_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_state_config, ipmi_interpret_sensor_drive_slot_state_config, ipmi_interpret_sensor_drive_slot_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_predictive_failure_config, ipmi_interpret_sensor_drive_slot_predictive_failure_config, ipmi_interpret_sensor_drive_slot_predictive_failure_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_transition_severity_config, ipmi_interpret_sensor_drive_slot_transition_severity_config, ipmi_interpret_sensor_drive_slot_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_device_present_config, ipmi_interpret_sensor_drive_slot_device_present_config, ipmi_interpret_sensor_drive_slot_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_post_memory_resize_state_config, ipmi_interpret_sensor_post_memory_resize_state_config, ipmi_interpret_sensor_post_memory_resize_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_config, ipmi_interpret_sensor_system_firmware_progress_config, ipmi_interpret_sensor_system_firmware_progress_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_state_config, ipmi_interpret_sensor_system_firmware_progress_state_config, ipmi_interpret_sensor_system_firmware_progress_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_device_present_config, ipmi_interpret_sensor_system_firmware_progress_device_present_config, ipmi_interpret_sensor_system_firmware_progress_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_transition_severity_config, ipmi_interpret_sensor_system_firmware_progress_transition_severity_config, ipmi_interpret_sensor_system_firmware_progress_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_event_logging_disabled_config, ipmi_interpret_sensor_event_logging_disabled_config, ipmi_interpret_sensor_event_logging_disabled_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_event_config, ipmi_interpret_sensor_system_event_config, ipmi_interpret_sensor_system_event_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_state_config, ipmi_interpret_sensor_system_event_transition_state_config, ipmi_interpret_sensor_system_event_transition_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_event_state_config, ipmi_interpret_sensor_system_event_state_config, ipmi_interpret_sensor_system_event_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_severity_config, ipmi_interpret_sensor_system_event_transition_severity_config, ipmi_interpret_sensor_system_event_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_critical_interrupt_config, ipmi_interpret_sensor_critical_interrupt_config, ipmi_interpret_sensor_critical_interrupt_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_config, ipmi_interpret_sensor_button_switch_config, ipmi_interpret_sensor_button_switch_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_state_config, ipmi_interpret_sensor_button_switch_state_config, ipmi_interpret_sensor_button_switch_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_transition_severity_config, ipmi_interpret_sensor_button_switch_transition_severity_config, ipmi_interpret_sensor_button_switch_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_module_board_state_config, ipmi_interpret_sensor_module_board_state_config, ipmi_interpret_sensor_module_board_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_module_board_device_present_config, ipmi_interpret_sensor_module_board_device_present_config, ipmi_interpret_sensor_module_board_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_chassis_transition_severity_config, ipmi_interpret_sensor_chassis_transition_severity_config, ipmi_interpret_sensor_chassis_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_chip_set_transition_severity_config, ipmi_interpret_sensor_chip_set_transition_severity_config, ipmi_interpret_sensor_chip_set_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_config, ipmi_interpret_sensor_cable_interconnect_config, ipmi_interpret_sensor_cable_interconnect_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_transition_severity_config, ipmi_interpret_sensor_cable_interconnect_transition_severity_config, ipmi_interpret_sensor_cable_interconnect_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_config, ipmi_interpret_sensor_boot_error_config, ipmi_interpret_sensor_boot_error_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_state_config, ipmi_interpret_sensor_boot_error_state_config, ipmi_interpret_sensor_boot_error_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_transition_severity_config, ipmi_interpret_sensor_boot_error_transition_severity_config, ipmi_interpret_sensor_boot_error_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_os_boot_config, ipmi_interpret_sensor_os_boot_config, ipmi_interpret_sensor_os_boot_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_os_critical_stop_state_config, ipmi_interpret_sensor_os_critical_stop_state_config, ipmi_interpret_sensor_os_critical_stop_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_config, ipmi_interpret_sensor_slot_connector_config, ipmi_interpret_sensor_slot_connector_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_transition_severity_config, ipmi_interpret_sensor_slot_connector_transition_severity_config, ipmi_interpret_sensor_slot_connector_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_system_acpi_power_state_config, ipmi_interpret_sensor_system_acpi_power_state_config, ipmi_interpret_sensor_system_acpi_power_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_watchdog2_config, ipmi_interpret_sensor_watchdog2_config, ipmi_interpret_sensor_watchdog2_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_platform_alert_state_config, ipmi_interpret_sensor_platform_alert_state_config, ipmi_interpret_sensor_platform_alert_state_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_config, ipmi_interpret_sensor_entity_presence_config, ipmi_interpret_sensor_entity_presence_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_device_present_config, ipmi_interpret_sensor_entity_presence_device_present_config, ipmi_interpret_sensor_entity_presence_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_config, ipmi_interpret_sensor_management_subsystem_health_config, ipmi_interpret_sensor_management_subsystem_health_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_transition_severity_config, ipmi_interpret_sensor_management_subsystem_health_transition_severity_config, ipmi_interpret_sensor_management_subsystem_health_transition_severity_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_device_present_config, ipmi_interpret_sensor_management_subsystem_health_device_present_config, ipmi_interpret_sensor_management_subsystem_health_device_present_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_battery_config, ipmi_interpret_sensor_battery_config, ipmi_interpret_sensor_battery_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_session_audit_config, ipmi_interpret_sensor_session_audit_config, ipmi_interpret_sensor_session_audit_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_version_change_config, ipmi_interpret_sensor_version_change_config, ipmi_interpret_sensor_version_change_config_len) < 0) goto cleanup; if (_interpret_config_sensor_init (ctx, &ctx->interpret_sensor.ipmi_interpret_sensor_fru_state_config, ipmi_interpret_sensor_fru_state_config, ipmi_interpret_sensor_fru_state_config_len) < 0) goto cleanup; if (!(ctx->interpret_sensor.sensor_oem_config = hash_create (IPMI_INTERPRET_SENSOR_HASH_SIZE, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, (hash_del_f)free))) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } if (_interpret_sensor_oem_config_init (ctx) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static void _interpret_config_sensor_destroy (ipmi_interpret_ctx_t ctx, struct ipmi_interpret_sensor_config **config) { unsigned int i = 0; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (config) { while (config[i]) { free (config[i]); i++; } free (config); } } void interpret_sensor_destroy (ipmi_interpret_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_threshold_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_limit_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_limit_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_performance_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_current_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fan_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fan_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_availability_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fan_redundancy_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_physical_security_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_platform_security_violation_attempt_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_processor_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_processor_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_redundancy_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_redundancy_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_cooling_device_redundancy_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_memory_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_memory_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_memory_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_memory_redundancy_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_predictive_failure_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_post_memory_resize_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_event_logging_disabled_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_critical_interrupt_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_module_board_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_module_board_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_chassis_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_chip_set_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_os_boot_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_os_critical_stop_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_system_acpi_power_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_watchdog2_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_platform_alert_state_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_transition_severity_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_device_present_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_battery_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_session_audit_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_version_change_config); _interpret_config_sensor_destroy (ctx, ctx->interpret_sensor.ipmi_interpret_sensor_fru_state_config); if (ctx->interpret_sensor.sensor_oem_config) hash_destroy (ctx->interpret_sensor.sensor_oem_config); } static int _cb_sensor_parse (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct ipmi_interpret_sensor_config **config; int state; int i; assert (cf); assert (data); assert (option_type == CONFFILE_OPTION_STRING); assert (optionname); assert (option_ptr); if ((state = interpret_config_parse_state (cf, data->string)) < 0) return (-1); i = 0; config = (struct ipmi_interpret_sensor_config **)option_ptr; while (config[i]) { if (!strcasecmp (optionname, config[i]->option_str)) { config[i]->state = state; return (0); } i++; } conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); return (-1); } static int _cb_sensor_oem_parse (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { hash_t *h = NULL; char keybuf[IPMI_OEM_HASH_KEY_BUFLEN + 1]; struct ipmi_interpret_config_file_ids ids[IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX]; unsigned int ids_count = 0; uint8_t event_reading_type_code; uint8_t sensor_type; uint16_t sensor_event_bitmask; int sensor_state; int oem_state_type; uint32_t tmp; struct ipmi_interpret_sensor_oem_config *oem_conf; int found = 0; unsigned int i, j, k; assert (cf); assert (data); assert (optionname); assert (option_ptr); h = (hash_t *)option_ptr; memset (keybuf, '\0', IPMI_OEM_HASH_KEY_BUFLEN + 1); memset (ids, '\0', sizeof (struct ipmi_interpret_config_file_ids) * IPMI_INTERPRET_CONFIG_FILE_MANUFACTURER_ID_MAX); if (data->stringlist_len != 5) { if (data->stringlist_len < 5) conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_MISSING); else conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } if (interpret_config_parse_manufactuer_id_product_id (cf, data->stringlist[0], ids, &ids_count) < 0) return (-1); if (interpret_config_parse_strtoul (cf, data->stringlist[1], UCHAR_MAX, &tmp) < 0) return (-1); event_reading_type_code = tmp; if (interpret_config_parse_strtoul (cf, data->stringlist[2], UCHAR_MAX, &tmp) < 0) return (-1); sensor_type = tmp; /* achu: sensor event bitmask bit 16 not legal, but we will allow it * b/c perhaps some OEM sensors will break legality of events, or * perhaps there is a bug and some vendors need to have the 16th bit * matched. */ if (interpret_config_parse_strtoul (cf, data->stringlist[3], USHRT_MAX, &tmp) < 0) return (-1); sensor_event_bitmask = tmp; if ((sensor_state = interpret_config_parse_state (cf, data->stringlist[4])) < 0) return (-1); if (!strcasecmp (optionname, "IPMI_OEM_Bitmask")) oem_state_type = IPMI_OEM_STATE_TYPE_BITMASK; else if (!strcasecmp (optionname, "IPMI_OEM_Value")) oem_state_type = IPMI_OEM_STATE_TYPE_VALUE; else { conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); return (-1); } for (i = 0; i < ids_count; i++) { for (j = 0; j < ids[i].product_ids_count; j++) { snprintf (keybuf, IPMI_OEM_HASH_KEY_BUFLEN, "%u:%u:%u:%u", ids[i].manufacturer_id, ids[i].product_ids[j], event_reading_type_code, sensor_type); if (!(oem_conf = hash_find ((*h), keybuf))) { if (!(oem_conf = (struct ipmi_interpret_sensor_oem_config *)malloc (sizeof (struct ipmi_interpret_sensor_oem_config)))) { conffile_seterrnum (cf, CONFFILE_ERR_OUTMEM); return (-1); } memset (oem_conf, '\0', sizeof (struct ipmi_interpret_sensor_oem_config)); memcpy (oem_conf->key, keybuf, IPMI_OEM_HASH_KEY_BUFLEN); oem_conf->manufacturer_id = ids[i].manufacturer_id; oem_conf->product_id = ids[i].product_ids[j]; oem_conf->event_reading_type_code = event_reading_type_code; oem_conf->sensor_type = sensor_type; if (!hash_insert ((*h), oem_conf->key, oem_conf)) { conffile_seterrnum (cf, CONFFILE_ERR_INTERNAL); free (oem_conf); return (-1); } } if (oem_conf->oem_state_count >= IPMI_INTERPRET_MAX_BITMASKS) { conffile_seterrnum (cf, CONFFILE_ERR_PARSE_ARG_TOOMANY); return (-1); } /* check for duplicates */ for (k = 0; k < oem_conf->oem_state_count; k++) { if (oem_conf->oem_state[k].oem_state_type == oem_state_type && oem_conf->oem_state[k].sensor_event_bitmask == sensor_event_bitmask) { oem_conf->oem_state[k].sensor_state = sensor_state; found++; break; } } if (!found) { oem_conf->oem_state[oem_conf->oem_state_count].sensor_event_bitmask = sensor_event_bitmask; oem_conf->oem_state[oem_conf->oem_state_count].sensor_state = sensor_state; oem_conf->oem_state[oem_conf->oem_state_count].oem_state_type = oem_state_type; oem_conf->oem_state_count++; } } } return (0); } static void _fill_sensor_config_options (struct conffile_option *to_options, unsigned int *to_options_len, struct ipmi_interpret_sensor_config **from_config, int *from_config_flags, unsigned int from_config_len) { unsigned int i; assert (to_options && to_options_len && from_config && from_config_len); memset (from_config_flags, '\0', sizeof (int) * from_config_len); /* note: can't memcpy .. sigh .. wish I did this in C++ w/ a copy constructor */ for (i = 0; i < from_config_len; i++) { to_options[(*to_options_len) + i].optionname = from_config[i]->option_str; to_options[(*to_options_len) + i].option_type = CONFFILE_OPTION_STRING; to_options[(*to_options_len) + i].option_type_arg = -1; to_options[(*to_options_len) + i].callback_func = _cb_sensor_parse; to_options[(*to_options_len) + i].max_count = 1; to_options[(*to_options_len) + i].required_count = 0; to_options[(*to_options_len) + i].count_ptr = &from_config_flags[i]; to_options[(*to_options_len) + i].option_ptr = from_config; to_options[(*to_options_len) + i].option_data = 0; } (*to_options_len) += from_config_len; } int interpret_sensor_config_parse (ipmi_interpret_ctx_t ctx, const char *sensor_config_file) { int ipmi_interpret_sensor_threshold_flags[ipmi_interpret_sensor_threshold_config_len]; int ipmi_interpret_sensor_temperature_state_flags[ipmi_interpret_sensor_temperature_state_config_len]; int ipmi_interpret_sensor_temperature_limit_flags[ipmi_interpret_sensor_temperature_limit_config_len]; int ipmi_interpret_sensor_temperature_transition_severity_flags[ipmi_interpret_sensor_temperature_transition_severity_config_len]; int ipmi_interpret_sensor_voltage_state_flags[ipmi_interpret_sensor_voltage_state_config_len]; int ipmi_interpret_sensor_voltage_limit_flags[ipmi_interpret_sensor_voltage_limit_config_len]; int ipmi_interpret_sensor_voltage_performance_flags[ipmi_interpret_sensor_voltage_performance_config_len]; int ipmi_interpret_sensor_voltage_transition_severity_flags[ipmi_interpret_sensor_voltage_transition_severity_config_len]; int ipmi_interpret_sensor_current_transition_severity_flags[ipmi_interpret_sensor_current_transition_severity_config_len]; int ipmi_interpret_sensor_fan_state_flags[ipmi_interpret_sensor_fan_state_config_len]; int ipmi_interpret_sensor_fan_transition_severity_flags[ipmi_interpret_sensor_fan_transition_severity_config_len]; int ipmi_interpret_sensor_fan_device_present_flags[ipmi_interpret_sensor_fan_device_present_config_len]; int ipmi_interpret_sensor_fan_transition_availability_flags[ipmi_interpret_sensor_fan_transition_availability_config_len]; int ipmi_interpret_sensor_fan_redundancy_flags[ipmi_interpret_sensor_fan_redundancy_config_len]; int ipmi_interpret_sensor_physical_security_flags[ipmi_interpret_sensor_physical_security_config_len]; int ipmi_interpret_sensor_platform_security_violation_attempt_flags[ipmi_interpret_sensor_platform_security_violation_attempt_config_len]; int ipmi_interpret_sensor_processor_flags[ipmi_interpret_sensor_processor_config_len]; int ipmi_interpret_sensor_processor_state_flags[ipmi_interpret_sensor_processor_state_config_len]; int ipmi_interpret_sensor_power_supply_flags[ipmi_interpret_sensor_power_supply_config_len]; int ipmi_interpret_sensor_power_supply_state_flags[ipmi_interpret_sensor_power_supply_state_config_len]; int ipmi_interpret_sensor_power_supply_transition_severity_flags[ipmi_interpret_sensor_power_supply_transition_severity_config_len]; int ipmi_interpret_sensor_power_supply_redundancy_flags[ipmi_interpret_sensor_power_supply_redundancy_config_len]; int ipmi_interpret_sensor_power_unit_flags[ipmi_interpret_sensor_power_unit_config_len]; int ipmi_interpret_sensor_power_unit_state_flags[ipmi_interpret_sensor_power_unit_state_config_len]; int ipmi_interpret_sensor_power_unit_transition_severity_flags[ipmi_interpret_sensor_power_unit_transition_severity_config_len]; int ipmi_interpret_sensor_power_unit_device_present_flags[ipmi_interpret_sensor_power_unit_device_present_config_len]; int ipmi_interpret_sensor_power_unit_redundancy_flags[ipmi_interpret_sensor_power_unit_redundancy_config_len]; int ipmi_interpret_sensor_cooling_device_redundancy_flags[ipmi_interpret_sensor_cooling_device_redundancy_config_len]; int ipmi_interpret_sensor_memory_flags[ipmi_interpret_sensor_memory_config_len]; int ipmi_interpret_sensor_memory_state_flags[ipmi_interpret_sensor_memory_state_config_len]; int ipmi_interpret_sensor_memory_transition_severity_flags[ipmi_interpret_sensor_memory_transition_severity_config_len]; int ipmi_interpret_sensor_memory_redundancy_flags[ipmi_interpret_sensor_memory_redundancy_config_len]; int ipmi_interpret_sensor_drive_slot_flags[ipmi_interpret_sensor_drive_slot_config_len]; int ipmi_interpret_sensor_drive_slot_state_flags[ipmi_interpret_sensor_drive_slot_state_config_len]; int ipmi_interpret_sensor_drive_slot_predictive_failure_flags[ipmi_interpret_sensor_drive_slot_predictive_failure_config_len]; int ipmi_interpret_sensor_drive_slot_transition_severity_flags[ipmi_interpret_sensor_drive_slot_transition_severity_config_len]; int ipmi_interpret_sensor_drive_slot_device_present_flags[ipmi_interpret_sensor_drive_slot_device_present_config_len]; int ipmi_interpret_sensor_post_memory_resize_state_flags[ipmi_interpret_sensor_post_memory_resize_state_config_len]; int ipmi_interpret_sensor_system_firmware_progress_flags[ipmi_interpret_sensor_system_firmware_progress_config_len]; int ipmi_interpret_sensor_system_firmware_progress_state_flags[ipmi_interpret_sensor_system_firmware_progress_state_config_len]; int ipmi_interpret_sensor_system_firmware_progress_device_present_flags[ipmi_interpret_sensor_system_firmware_progress_device_present_config_len]; int ipmi_interpret_sensor_system_firmware_progress_transition_severity_flags[ipmi_interpret_sensor_system_firmware_progress_transition_severity_config_len]; int ipmi_interpret_sensor_event_logging_disabled_flags[ipmi_interpret_sensor_event_logging_disabled_config_len]; int ipmi_interpret_sensor_system_event_flags[ipmi_interpret_sensor_system_event_config_len]; int ipmi_interpret_sensor_system_event_transition_state_flags[ipmi_interpret_sensor_system_event_transition_state_config_len]; int ipmi_interpret_sensor_system_event_state_flags[ipmi_interpret_sensor_system_event_state_config_len]; int ipmi_interpret_sensor_system_event_transition_severity_flags[ipmi_interpret_sensor_system_event_transition_severity_config_len]; int ipmi_interpret_sensor_critical_interrupt_flags[ipmi_interpret_sensor_critical_interrupt_config_len]; int ipmi_interpret_sensor_button_switch_flags[ipmi_interpret_sensor_button_switch_config_len]; int ipmi_interpret_sensor_button_switch_state_flags[ipmi_interpret_sensor_button_switch_state_config_len]; int ipmi_interpret_sensor_button_switch_transition_severity_flags[ipmi_interpret_sensor_button_switch_transition_severity_config_len]; int ipmi_interpret_sensor_module_board_state_flags[ipmi_interpret_sensor_module_board_state_config_len]; int ipmi_interpret_sensor_module_board_device_present_flags[ipmi_interpret_sensor_module_board_device_present_config_len]; int ipmi_interpret_sensor_chassis_transition_severity_flags[ipmi_interpret_sensor_chassis_transition_severity_config_len]; int ipmi_interpret_sensor_chip_set_transition_severity_flags[ipmi_interpret_sensor_chip_set_transition_severity_config_len]; int ipmi_interpret_sensor_cable_interconnect_flags[ipmi_interpret_sensor_cable_interconnect_config_len]; int ipmi_interpret_sensor_cable_interconnect_transition_severity_flags[ipmi_interpret_sensor_cable_interconnect_transition_severity_config_len]; int ipmi_interpret_sensor_boot_error_flags[ipmi_interpret_sensor_boot_error_config_len]; int ipmi_interpret_sensor_boot_error_state_flags[ipmi_interpret_sensor_boot_error_state_config_len]; int ipmi_interpret_sensor_boot_error_transition_severity_flags[ipmi_interpret_sensor_boot_error_transition_severity_config_len]; int ipmi_interpret_sensor_os_boot_flags[ipmi_interpret_sensor_os_boot_config_len]; int ipmi_interpret_sensor_os_critical_stop_state_flags[ipmi_interpret_sensor_os_critical_stop_state_config_len]; int ipmi_interpret_sensor_slot_connector_flags[ipmi_interpret_sensor_slot_connector_config_len]; int ipmi_interpret_sensor_slot_connector_transition_severity_flags[ipmi_interpret_sensor_slot_connector_transition_severity_config_len]; int ipmi_interpret_sensor_system_acpi_power_state_flags[ipmi_interpret_sensor_system_acpi_power_state_config_len]; int ipmi_interpret_sensor_watchdog2_flags[ipmi_interpret_sensor_watchdog2_config_len]; int ipmi_interpret_sensor_platform_alert_state_flags[ipmi_interpret_sensor_platform_alert_state_config_len]; int ipmi_interpret_sensor_entity_presence_flags[ipmi_interpret_sensor_entity_presence_config_len]; int ipmi_interpret_sensor_entity_presence_device_present_flags[ipmi_interpret_sensor_entity_presence_device_present_config_len]; int ipmi_interpret_sensor_management_subsystem_health_flags[ipmi_interpret_sensor_management_subsystem_health_config_len]; int ipmi_interpret_sensor_management_subsystem_health_transition_severity_flags[ipmi_interpret_sensor_management_subsystem_health_transition_severity_config_len]; int ipmi_interpret_sensor_management_subsystem_health_device_present_flags[ipmi_interpret_sensor_management_subsystem_health_device_present_config_len]; int ipmi_interpret_sensor_battery_flags[ipmi_interpret_sensor_battery_config_len]; int ipmi_interpret_sensor_session_audit_flags[ipmi_interpret_sensor_session_audit_config_len]; int ipmi_interpret_sensor_version_change_flags[ipmi_interpret_sensor_version_change_config_len]; int ipmi_interpret_sensor_fru_state_flags[ipmi_interpret_sensor_fru_state_config_len]; int sensor_oem_bitmask_flag; int sensor_oem_value_flag; struct conffile_option config_file_options[IPMI_INTERPRET_CONFIG_FILE_OPTIONS_MAX]; char *config_file = NULL; unsigned int config_file_options_len = 0; conffile_t cf = NULL; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_INTERPRET_CTX_MAGIC); if (!sensor_config_file) config_file = INTERPRET_SENSOR_CONFIG_FILE_DEFAULT; else config_file = (char *)sensor_config_file; _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_threshold_config, ipmi_interpret_sensor_threshold_flags, ipmi_interpret_sensor_threshold_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_state_config, ipmi_interpret_sensor_temperature_state_flags, ipmi_interpret_sensor_temperature_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_limit_config, ipmi_interpret_sensor_temperature_limit_flags, ipmi_interpret_sensor_temperature_limit_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_temperature_transition_severity_config, ipmi_interpret_sensor_temperature_transition_severity_flags, ipmi_interpret_sensor_temperature_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_state_config, ipmi_interpret_sensor_voltage_state_flags, ipmi_interpret_sensor_voltage_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_limit_config, ipmi_interpret_sensor_voltage_limit_flags, ipmi_interpret_sensor_voltage_limit_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_performance_config, ipmi_interpret_sensor_voltage_performance_flags, ipmi_interpret_sensor_voltage_performance_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_voltage_transition_severity_config, ipmi_interpret_sensor_voltage_transition_severity_flags, ipmi_interpret_sensor_voltage_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_current_transition_severity_config, ipmi_interpret_sensor_current_transition_severity_flags, ipmi_interpret_sensor_current_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fan_state_config, ipmi_interpret_sensor_fan_state_flags, ipmi_interpret_sensor_fan_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_severity_config, ipmi_interpret_sensor_fan_transition_severity_flags, ipmi_interpret_sensor_fan_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fan_device_present_config, ipmi_interpret_sensor_fan_device_present_flags, ipmi_interpret_sensor_fan_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fan_transition_availability_config, ipmi_interpret_sensor_fan_transition_availability_flags, ipmi_interpret_sensor_fan_transition_availability_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fan_redundancy_config, ipmi_interpret_sensor_fan_redundancy_flags, ipmi_interpret_sensor_fan_redundancy_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_physical_security_config, ipmi_interpret_sensor_physical_security_flags, ipmi_interpret_sensor_physical_security_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_platform_security_violation_attempt_config, ipmi_interpret_sensor_platform_security_violation_attempt_flags, ipmi_interpret_sensor_platform_security_violation_attempt_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_processor_config, ipmi_interpret_sensor_processor_flags, ipmi_interpret_sensor_processor_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_processor_state_config, ipmi_interpret_sensor_processor_state_flags, ipmi_interpret_sensor_processor_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_config, ipmi_interpret_sensor_power_supply_flags, ipmi_interpret_sensor_power_supply_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_state_config, ipmi_interpret_sensor_power_supply_state_flags, ipmi_interpret_sensor_power_supply_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_transition_severity_config, ipmi_interpret_sensor_power_supply_transition_severity_flags, ipmi_interpret_sensor_power_supply_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_supply_redundancy_config, ipmi_interpret_sensor_power_supply_redundancy_flags, ipmi_interpret_sensor_power_supply_redundancy_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_config, ipmi_interpret_sensor_power_unit_flags, ipmi_interpret_sensor_power_unit_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_state_config, ipmi_interpret_sensor_power_unit_state_flags, ipmi_interpret_sensor_power_unit_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_transition_severity_config, ipmi_interpret_sensor_power_unit_transition_severity_flags, ipmi_interpret_sensor_power_unit_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_device_present_config, ipmi_interpret_sensor_power_unit_device_present_flags, ipmi_interpret_sensor_power_unit_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_power_unit_redundancy_config, ipmi_interpret_sensor_power_unit_redundancy_flags, ipmi_interpret_sensor_power_unit_redundancy_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_cooling_device_redundancy_config, ipmi_interpret_sensor_cooling_device_redundancy_flags, ipmi_interpret_sensor_cooling_device_redundancy_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_memory_config, ipmi_interpret_sensor_memory_flags, ipmi_interpret_sensor_memory_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_memory_state_config, ipmi_interpret_sensor_memory_state_flags, ipmi_interpret_sensor_memory_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_memory_transition_severity_config, ipmi_interpret_sensor_memory_transition_severity_flags, ipmi_interpret_sensor_memory_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_memory_redundancy_config, ipmi_interpret_sensor_memory_redundancy_flags, ipmi_interpret_sensor_memory_redundancy_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_config, ipmi_interpret_sensor_drive_slot_flags, ipmi_interpret_sensor_drive_slot_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_state_config, ipmi_interpret_sensor_drive_slot_state_flags, ipmi_interpret_sensor_drive_slot_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_predictive_failure_config, ipmi_interpret_sensor_drive_slot_predictive_failure_flags, ipmi_interpret_sensor_drive_slot_predictive_failure_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_transition_severity_config, ipmi_interpret_sensor_drive_slot_transition_severity_flags, ipmi_interpret_sensor_drive_slot_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_drive_slot_device_present_config, ipmi_interpret_sensor_drive_slot_device_present_flags, ipmi_interpret_sensor_drive_slot_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_post_memory_resize_state_config, ipmi_interpret_sensor_post_memory_resize_state_flags, ipmi_interpret_sensor_post_memory_resize_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_config, ipmi_interpret_sensor_system_firmware_progress_flags, ipmi_interpret_sensor_system_firmware_progress_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_state_config, ipmi_interpret_sensor_system_firmware_progress_state_flags, ipmi_interpret_sensor_system_firmware_progress_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_device_present_config, ipmi_interpret_sensor_system_firmware_progress_device_present_flags, ipmi_interpret_sensor_system_firmware_progress_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_firmware_progress_transition_severity_config, ipmi_interpret_sensor_system_firmware_progress_transition_severity_flags, ipmi_interpret_sensor_system_firmware_progress_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_event_logging_disabled_config, ipmi_interpret_sensor_event_logging_disabled_flags, ipmi_interpret_sensor_event_logging_disabled_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_config, ipmi_interpret_sensor_system_event_flags, ipmi_interpret_sensor_system_event_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_state_config, ipmi_interpret_sensor_system_event_transition_state_flags, ipmi_interpret_sensor_system_event_transition_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_state_config, ipmi_interpret_sensor_system_event_state_flags, ipmi_interpret_sensor_system_event_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_event_transition_severity_config, ipmi_interpret_sensor_system_event_transition_severity_flags, ipmi_interpret_sensor_system_event_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_critical_interrupt_config, ipmi_interpret_sensor_critical_interrupt_flags, ipmi_interpret_sensor_critical_interrupt_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_config, ipmi_interpret_sensor_button_switch_flags, ipmi_interpret_sensor_button_switch_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_state_config, ipmi_interpret_sensor_button_switch_state_flags, ipmi_interpret_sensor_button_switch_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_button_switch_transition_severity_config, ipmi_interpret_sensor_button_switch_transition_severity_flags, ipmi_interpret_sensor_button_switch_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_module_board_state_config, ipmi_interpret_sensor_module_board_state_flags, ipmi_interpret_sensor_module_board_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_module_board_device_present_config, ipmi_interpret_sensor_module_board_device_present_flags, ipmi_interpret_sensor_module_board_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_chassis_transition_severity_config, ipmi_interpret_sensor_chassis_transition_severity_flags, ipmi_interpret_sensor_chassis_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_chip_set_transition_severity_config, ipmi_interpret_sensor_chip_set_transition_severity_flags, ipmi_interpret_sensor_chip_set_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_config, ipmi_interpret_sensor_cable_interconnect_flags, ipmi_interpret_sensor_cable_interconnect_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_cable_interconnect_transition_severity_config, ipmi_interpret_sensor_cable_interconnect_transition_severity_flags, ipmi_interpret_sensor_cable_interconnect_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_config, ipmi_interpret_sensor_boot_error_flags, ipmi_interpret_sensor_boot_error_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_state_config, ipmi_interpret_sensor_boot_error_state_flags, ipmi_interpret_sensor_boot_error_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_boot_error_transition_severity_config, ipmi_interpret_sensor_boot_error_transition_severity_flags, ipmi_interpret_sensor_boot_error_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_os_boot_config, ipmi_interpret_sensor_os_boot_flags, ipmi_interpret_sensor_os_boot_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_os_critical_stop_state_config, ipmi_interpret_sensor_os_critical_stop_state_flags, ipmi_interpret_sensor_os_critical_stop_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_config, ipmi_interpret_sensor_slot_connector_flags, ipmi_interpret_sensor_slot_connector_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_slot_connector_transition_severity_config, ipmi_interpret_sensor_slot_connector_transition_severity_flags, ipmi_interpret_sensor_slot_connector_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_system_acpi_power_state_config, ipmi_interpret_sensor_system_acpi_power_state_flags, ipmi_interpret_sensor_system_acpi_power_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_watchdog2_config, ipmi_interpret_sensor_watchdog2_flags, ipmi_interpret_sensor_watchdog2_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_platform_alert_state_config, ipmi_interpret_sensor_platform_alert_state_flags, ipmi_interpret_sensor_platform_alert_state_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_config, ipmi_interpret_sensor_entity_presence_flags, ipmi_interpret_sensor_entity_presence_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_entity_presence_device_present_config, ipmi_interpret_sensor_entity_presence_device_present_flags, ipmi_interpret_sensor_entity_presence_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_config, ipmi_interpret_sensor_management_subsystem_health_flags, ipmi_interpret_sensor_management_subsystem_health_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_transition_severity_config, ipmi_interpret_sensor_management_subsystem_health_transition_severity_flags, ipmi_interpret_sensor_management_subsystem_health_transition_severity_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_management_subsystem_health_device_present_config, ipmi_interpret_sensor_management_subsystem_health_device_present_flags, ipmi_interpret_sensor_management_subsystem_health_device_present_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_battery_config, ipmi_interpret_sensor_battery_flags, ipmi_interpret_sensor_battery_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_session_audit_config, ipmi_interpret_sensor_session_audit_flags, ipmi_interpret_sensor_session_audit_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_version_change_config, ipmi_interpret_sensor_version_change_flags, ipmi_interpret_sensor_version_change_config_len); _fill_sensor_config_options (config_file_options, &config_file_options_len, ctx->interpret_sensor.ipmi_interpret_sensor_fru_state_config, ipmi_interpret_sensor_fru_state_flags, ipmi_interpret_sensor_fru_state_config_len); config_file_options[config_file_options_len].optionname = "IPMI_OEM_Bitmask"; config_file_options[config_file_options_len].option_type = CONFFILE_OPTION_LIST_STRING; config_file_options[config_file_options_len].option_type_arg = 5; config_file_options[config_file_options_len].callback_func = _cb_sensor_oem_parse; config_file_options[config_file_options_len].max_count = -1; config_file_options[config_file_options_len].required_count = 0; config_file_options[config_file_options_len].count_ptr = &sensor_oem_bitmask_flag; config_file_options[config_file_options_len].option_ptr = &ctx->interpret_sensor.sensor_oem_config; config_file_options[config_file_options_len].option_data = 0; config_file_options_len++; config_file_options[config_file_options_len].optionname = "IPMI_OEM_Value"; config_file_options[config_file_options_len].option_type = CONFFILE_OPTION_LIST_STRING; config_file_options[config_file_options_len].option_type_arg = 5; config_file_options[config_file_options_len].callback_func = _cb_sensor_oem_parse; config_file_options[config_file_options_len].max_count = -1; config_file_options[config_file_options_len].required_count = 0; config_file_options[config_file_options_len].count_ptr = &sensor_oem_value_flag; config_file_options[config_file_options_len].option_ptr = &ctx->interpret_sensor.sensor_oem_config; config_file_options[config_file_options_len].option_data = 0; config_file_options_len++; if (!(cf = conffile_handle_create ())) { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); goto cleanup; } if (conffile_parse (cf, config_file, config_file_options, config_file_options_len, NULL, 0, 0) < 0) { if (conffile_errnum (cf) == CONFFILE_ERR_EXIST) { /* Its not an error if the default configuration file doesn't exist */ if (!config_file) { rv = 0; goto cleanup; } else { INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST); goto cleanup; } } if (CONFFILE_IS_PARSE_ERR (conffile_errnum (cf))) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_PARSE); else if (conffile_errnum (cf) == CONFFILE_ERR_OUTMEM) INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_OUT_OF_MEMORY); else INTERPRET_SET_ERRNUM (ctx, IPMI_INTERPRET_ERR_INTERNAL_ERROR); goto cleanup; } rv = 0; cleanup: conffile_handle_destroy (cf); return (rv); } freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-config-sensor.h0000644002055400205540000000220313527331637025457 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_CONFIG_SENSOR_H #define IPMI_INTERPRET_CONFIG_SENSOR_H #include "freeipmi/interpret/ipmi-interpret.h" #include "ipmi-interpret-defs.h" int interpret_sensor_init (ipmi_interpret_ctx_t ctx); void interpret_sensor_destroy (ipmi_interpret_ctx_t ctx); int interpret_sensor_config_parse (ipmi_interpret_ctx_t ctx, const char *sensor_config_file); #endif /* IPMI_INTERPRET_CONFIG_SENSOR_H */ freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-defs.h0000644002055400205540000004406013527331637023633 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_DEFS_H #define IPMI_INTERPRET_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/sel/ipmi-sel.h" #include "hash.h" #define IPMI_INTERPRET_CTX_MAGIC 0xACFF3289 #define IPMI_INTERPRET_FLAGS_MASK \ (IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA \ | IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS \ | IPMI_INTERPRET_FLAGS_IGNORE_UNRECOGNIZED_EVENTS) #define IPMI_INTERPRET_MAX_BITMASKS 16 #define IPMI_INTERPRET_SEL_HASH_SIZE 32 #define IPMI_INTERPRET_SENSOR_HASH_SIZE 32 #define IPMI_OEM_STATE_TYPE_BITMASK 0 #define IPMI_OEM_STATE_TYPE_VALUE 1 /* manufacturing_id:product_id:event_type_code:sensor_type * * Based on value limits, can't be more than 22 bytes */ #define IPMI_OEM_HASH_KEY_BUFLEN 32 #define IPMI_SEL_OEM_DATA_MAX 13 #define IPMI_SEL_OEM_DATA_TIMESTAMPED_BYTES 6 #define IPMI_SEL_OEM_DATA_NON_TIMESTAMPED_BYTES 13 #define IPMI_SEL_OEM_SENSOR_MAX 16 #define IPMI_SEL_OEM_RECORD_MAX 16 #define IPMI_SEL_OEM_DATA_HEX_BYTE_ANY "ANY" /* achu: * * Storing each interpretation rule for every * manufacturer_id:product_id:event_reading_type_code:sensor_type * combination in the hash is memory costly. The trade off is that it * gives users the ability to adjust the configuration file * specifically for their needs and only for a particular motherboard * they care about. */ struct ipmi_interpret_sensor_config { char *option_str; int state; }; struct ipmi_interpret_sel_config { char *option_str; int assertion_state; int deassertion_state; }; struct ipmi_interpret_sel_oem_sensor_data { unsigned int event_direction_any_flag; uint8_t event_direction; unsigned int event_data1_any_flag; uint8_t event_data1; unsigned int event_data2_any_flag; uint8_t event_data2; unsigned int event_data3_any_flag; uint8_t event_data3; unsigned int sel_state; }; struct ipmi_interpret_sel_oem_sensor_config { char key[IPMI_OEM_HASH_KEY_BUFLEN + 1]; uint32_t manufacturer_id; uint16_t product_id; uint8_t event_reading_type_code; uint8_t sensor_type; struct ipmi_interpret_sel_oem_sensor_data oem_sensor_data[IPMI_SEL_OEM_SENSOR_MAX]; unsigned int oem_sensor_data_count; }; struct ipmi_interpret_sel_oem_data_byte { unsigned int any_flag; uint8_t oem_data_byte; }; struct ipmi_interpret_sel_oem_record { struct ipmi_interpret_sel_oem_data_byte oem_bytes[IPMI_SEL_OEM_DATA_MAX]; unsigned int oem_bytes_count; unsigned int sel_state; }; struct ipmi_interpret_sel_oem_record_config { char key[IPMI_OEM_HASH_KEY_BUFLEN + 1]; uint32_t manufacturer_id; uint16_t product_id; uint8_t record_type; struct ipmi_interpret_sel_oem_record oem_record[IPMI_SEL_OEM_RECORD_MAX]; unsigned int oem_record_count; }; struct ipmi_interpret_sel { struct ipmi_interpret_sel_config **ipmi_interpret_sel_threshold_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_temperature_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_temperature_limit_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_temperature_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_voltage_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_voltage_limit_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_voltage_performance_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_voltage_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_current_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fan_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fan_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fan_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fan_transition_availability_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fan_redundancy_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_physical_security_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_platform_security_violation_attempt_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_processor_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_processor_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_supply_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_supply_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_supply_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_supply_redundancy_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_unit_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_unit_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_unit_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_unit_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_power_unit_redundancy_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_cooling_device_redundancy_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_memory_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_memory_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_memory_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_memory_redundancy_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_drive_slot_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_drive_slot_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_drive_slot_predictive_failure_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_drive_slot_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_drive_slot_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_post_memory_resize_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_firmware_progress_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_firmware_progress_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_firmware_progress_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_firmware_progress_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_event_logging_disabled_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_event_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_event_transition_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_event_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_event_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_critical_interrupt_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_button_switch_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_button_switch_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_button_switch_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_module_board_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_module_board_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_chassis_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_chip_set_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_chip_set_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_cable_interconnect_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_cable_interconnect_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_boot_initiated_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_boot_error_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_boot_error_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_boot_error_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_os_boot_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_os_critical_stop_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_os_critical_stop_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_slot_connector_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_slot_connector_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_system_acpi_power_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_watchdog2_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_platform_alert_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_platform_alert_state_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_entity_presence_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_entity_presence_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_lan_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_management_subsystem_health_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_management_subsystem_health_transition_severity_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_management_subsystem_health_device_present_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_battery_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_session_audit_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_version_change_config; struct ipmi_interpret_sel_config **ipmi_interpret_sel_fru_state_config; hash_t sel_oem_sensor_config; hash_t sel_oem_record_config; }; struct ipmi_interpret_sensor_oem_state { uint16_t sensor_event_bitmask; unsigned int sensor_state; int oem_state_type; }; struct ipmi_interpret_sensor_oem_config { char key[IPMI_OEM_HASH_KEY_BUFLEN + 1]; uint32_t manufacturer_id; uint16_t product_id; uint8_t event_reading_type_code; uint8_t sensor_type; struct ipmi_interpret_sensor_oem_state oem_state[IPMI_INTERPRET_MAX_BITMASKS]; unsigned int oem_state_count; }; struct ipmi_interpret_sensor { struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_threshold_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_temperature_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_temperature_limit_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_temperature_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_voltage_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_voltage_limit_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_voltage_performance_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_voltage_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_current_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fan_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fan_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fan_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fan_transition_availability_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fan_redundancy_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_physical_security_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_platform_security_violation_attempt_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_processor_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_processor_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_supply_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_supply_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_supply_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_supply_redundancy_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_unit_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_unit_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_unit_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_unit_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_power_unit_redundancy_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_cooling_device_redundancy_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_memory_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_memory_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_memory_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_memory_redundancy_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_drive_slot_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_drive_slot_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_drive_slot_predictive_failure_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_drive_slot_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_drive_slot_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_post_memory_resize_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_firmware_progress_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_firmware_progress_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_firmware_progress_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_firmware_progress_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_event_logging_disabled_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_event_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_event_transition_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_event_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_event_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_critical_interrupt_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_button_switch_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_button_switch_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_button_switch_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_module_board_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_module_board_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_chassis_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_chip_set_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_cable_interconnect_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_cable_interconnect_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_boot_error_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_boot_error_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_boot_error_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_os_boot_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_os_critical_stop_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_slot_connector_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_slot_connector_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_system_acpi_power_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_watchdog2_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_platform_alert_state_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_entity_presence_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_entity_presence_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_management_subsystem_health_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_management_subsystem_health_transition_severity_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_management_subsystem_health_device_present_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_battery_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_session_audit_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_version_change_config; struct ipmi_interpret_sensor_config **ipmi_interpret_sensor_fru_state_config; hash_t sensor_oem_config; }; struct ipmi_interpret_ctx { uint32_t magic; int errnum; unsigned int flags; uint32_t manufacturer_id; uint16_t product_id; ipmi_sel_ctx_t sel_ctx; struct ipmi_interpret_sel interpret_sel; struct ipmi_interpret_sensor interpret_sensor; }; #endif /* IPMI_INTERPRET_DEFS_H */ freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-util.c0000644002055400205540000000400413527331637023654 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/interpret/ipmi-interpret.h" #include "ipmi-interpret-defs.h" #include "ipmi-interpret-trace.h" #include "ipmi-interpret-util.h" #include "freeipmi-portability.h" void interpret_set_interpret_errnum_by_errno (ipmi_interpret_ctx_t ctx, int __errno) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) return; if (__errno == 0) ctx->errnum = IPMI_INTERPRET_ERR_SUCCESS; else if (__errno == ENOMEM) ctx->errnum = IPMI_INTERPRET_ERR_OUT_OF_MEMORY; else ctx->errnum = IPMI_INTERPRET_ERR_INTERNAL_ERROR; } void interpret_set_interpret_errnum_by_sel_ctx (ipmi_interpret_ctx_t ctx, ipmi_sel_ctx_t sel_ctx) { if (!ctx || ctx->magic != IPMI_INTERPRET_CTX_MAGIC) return; if (ipmi_sel_ctx_errnum (sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) ctx->errnum = IPMI_INTERPRET_ERR_INVALID_SEL_RECORD; else if (ipmi_sel_ctx_errnum (sel_ctx) == IPMI_SEL_ERR_OUT_OF_MEMORY) ctx->errnum = IPMI_INTERPRET_ERR_OUT_OF_MEMORY; else if (ipmi_sel_ctx_errnum (sel_ctx) == IPMI_SEL_ERR_SYSTEM_ERROR) ctx->errnum = IPMI_INTERPRET_ERR_SYSTEM_ERROR; else ctx->errnum = IPMI_INTERPRET_ERR_INTERNAL_ERROR; } freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-util.h0000644002055400205540000000242413527331637023665 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_UTIL_H #define IPMI_INTERPRET_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-interpret-defs.h" void interpret_set_interpret_errnum_by_errno (ipmi_interpret_ctx_t ctx, int __errno); void interpret_set_interpret_errnum_by_sel_ctx (ipmi_interpret_ctx_t ctx, ipmi_sel_ctx_t sel_ctx); #endif /* IPMI_INTERPRET_UTIL_H */ freeipmi-1.6.4/libfreeipmi/interpret/ipmi-interpret-trace.h0000644002055400205540000000423713527331637024012 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_INTERPRET_TRACE_H #define IPMI_INTERPRET_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #define INTERPRET_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_interpret_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define INTERPRET_ERRNO_TO_INTERPRET_ERRNUM(__ctx, __errno) \ do { \ interpret_set_interpret_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define INTERPRET_SEL_CTX_ERROR_TO_INTERPRET_ERRNUM(__ctx, __sel_ctx) \ do { \ interpret_set_interpret_errnum_by_sel_ctx ((__ctx), (__sel_ctx)); \ TRACE_MSG_OUT (ipmi_sel_ctx_errormsg ((__sel_ctx)), ipmi_sel_ctx_errnum ((__sel_ctx))); \ } while (0) #endif /* IPMI_INTERPRET_TRACE_H */ freeipmi-1.6.4/libfreeipmi/libcommon/0000755002055400205540000000000013527342542017527 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-bit-ops.c0000644002055400205540000000441413527331637022212 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include #include "ipmi-bit-ops.h" #include "freeipmi-portability.h" /* Return the integer composed of the START (inclusive) through END (exclusive) bits of N. The STARTth bit becomes the 0-th bit in the result. (number->string (bit-extract #b1101101010 0 4) 2) => "1010" (number->string (bit-extract #b1101101010 4 9) 2) => "10110" */ int bits_extract (uint64_t bits, uint8_t start, uint8_t end, uint64_t *result) { if (start > end || start > 64 || end > 64 || !result) { errno = EINVAL; return (-1); } bits >>= start; bits <<= ((63 - (end - 1)) + start); bits >>= ((63 - (end - 1)) + start); *result = bits; return (0); } /* Merges the val composed of the START (inclusive) through END (exclusive) bits of N. The STARTth bit becomes the 0-th bit in the result. */ int bits_merge (uint64_t bits, uint8_t start, uint8_t end, uint64_t val, uint64_t *result) { uint64_t lsb_ones = 0xFFFFFFFFFFFFFFFFULL; uint64_t msb_ones = 0xFFFFFFFFFFFFFFFFULL; if (start > end || start > 64 || end > 64 || !result) { errno = EINVAL; return (-1); } if (start) { lsb_ones <<= (64 - start); lsb_ones >>= (64 - start); } else lsb_ones = 0x0; msb_ones >>= (end - start); msb_ones <<= (end - start); msb_ones <<= start; msb_ones |= lsb_ones; bits |= ~msb_ones; msb_ones |= (val << start); *result = (bits & msb_ones); return (0); } freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-bit-ops.h0000644002055400205540000001555513527331637022227 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_BIT_OPS_H #define IPMI_BIT_OPS_H #define BIT_0 0x01 #define BIT_1 0x02 #define BIT_2 0x04 #define BIT_3 0x08 #define BIT_4 0x10 #define BIT_5 0x20 #define BIT_6 0x40 #define BIT_7 0x80 #define BIT(n) ((uint64_t) powl (2, n)) #define TOBOOL(arg) (!(!(arg))) #define BIT_SET(arg, posn) (arg | (1L << posn)) #define BIT_CLR(arg, posn) (arg & ~(1L << posn)) #define BIT_FLP(arg, posn) (arg ^ (1L << posn)) #define BIT_TST(arg, posn) TOBOOL ((arg) & (1L << posn)) #define BITS_ZERO(arg) (arg ^ arg) #define BITS_0(arg) (bits_extract (arg, 0, 8)) #define BITS_1(arg) (bits_extract (arg, 8, 16)) #define BITS_2(arg) (bits_extract (arg, 16, 24)) #define BITS_3(arg) (bits_extract (arg, 24, 32)) #define BITS_4(arg) (bits_extract (arg, 32, 40)) #define BITS_5(arg) (bits_extract (arg, 40, 48)) #define BITS_6(arg) (bits_extract (arg, 48, 56)) #define BITS_7(arg) (bits_extract (arg, 56, 64)) #define BITS_SET(arg, bits) (arg | (bits)) #define BITS_CLR(arg, bits) (arg & ~(bits)) #define BITS_ROUND_BYTES(bits_count) ((bits_count / 8) + ((bits_count % 8) ? 1 : 0)) typedef uint8_t bitstr_t; /* internal macros */ /* byte of the bitstring bit is in */ #define BITSTR_BYTE(bit) \ ((bit) >> 3) /* mask for the bit within its byte */ #define BITSTR_MASK(bit) \ (1 << ((bit)&0x7)) /* external macros */ /* bytes in a bitstring of nbits bits */ #define BITSTR_SIZE(nbits) \ ((((nbits) - 1) >> 3) + 1) /* allocate a bitstring */ #define BITSTR_ALLOC(nbits) \ (bitstr_t *)calloc (1, \ (size_t)bitstr_size (nbits) * sizeof (bitstr_t)) /* allocate a bitstring on the stack */ #define BITSTR_DECL(name, nbits) \ (name)[bitstr_size (nbits)] /* is bit N of bitstring name set? */ #define BITSTR_TEST(name, bit) \ ((name)[BITSTR_BYTE (bit)] & BITSTR_MASK (bit)) /* set bit N of bitstring name */ #define BITSTR_SET(name, bit) \ (name)[BITSTR_BYTE (bit)] |= BITSTR_MASK (bit) /* clear bit N of bitstring name */ #define BITSTR_CLEAR(name, bit) \ (name)[BITSTR_BYTE (bit)] &= ~BITSTR_MASK(bit) /* clear bits start ... stop in bitstring */ #define BITSTR_NCLEAR(name, start, stop) { \ register bitstr_t *_name = name; \ register int _start = start, _stop = stop; \ register int _startbyte = BITSTR_BYTE (_start); \ register int _stopbyte = BITSTR_BYTE (_stop); \ if (_startbyte == _stopbyte) { \ _name[_startbyte] &= ((0xff >> (8 - (_start&0x7))) | \ (0xff << ((_stop&0x7) + 1))); \ } else { \ _name[_startbyte] &= 0xff >> (8 - (_start&0x7)); \ while (++_startbyte < _stopbyte) \ _name[_startbyte] = 0; \ _name[_stopbyte] &= 0xff << ((_stop&0x7) + 1); \ } \ } /* set bits start ... stop in bitstring */ #define BITSTR_NSET(name, start, stop) { \ register bitstr_t *_name = name; \ register int _start = start, _stop = stop; \ register int _startbyte = BITSTR_BYTE (_start); \ register int _stopbyte = BITSTR_BYTE (_stop); \ if (_startbyte == _stopbyte) { \ _name[_startbyte] |= ((0xff << (_start&0x7)) & \ (0xff >> (7 - (_stop&0x7)))); \ } else { \ _name[_startbyte] |= 0xff << ((_start)&0x7); \ while (++_startbyte < _stopbyte) \ _name[_startbyte] = 0xff; \ _name[_stopbyte] |= 0xff >> (7 - (_stop&0x7)); \ } \ } /* find first bit clear in name */ #define BITSTR_FFC(name, nbits, value) { \ register bitstr_t *_name = name; \ register int _byte, _nbits = nbits; \ register int _stopbyte = BITSTR_BYTE (_nbits), _value = -1; \ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ if (_name[_byte] != 0xff) { \ _value = _byte << 3; \ for (_stopbyte = _name[_byte]; (_stopbyte&0x1); \ ++_value, _stopbyte >>= 1) ; \ break; \ } \ *(value) = _value; \ } /* find first bit set in name */ #define BITSTR_FFS(name, nbits, value) { \ register bitstr_t *_name = name; \ register int _byte, _nbits = nbits; \ register int _stopbyte = BITSTR_BYTE (_nbits), _value = -1; \ for (_byte = 0; _byte <= _stopbyte; ++_byte) \ if (_name[_byte]) { \ _value = _byte << 3; \ for (_stopbyte = _name[_byte]; !(_stopbyte&0x1); \ ++_value, _stopbyte >>= 1) ; \ break; \ } \ *(value) = _value; \ } int bits_extract (uint64_t bits, uint8_t start, uint8_t end, uint64_t *result); int bits_merge (uint64_t bits, uint8_t start, uint8_t end, uint64_t val, uint64_t *result); #endif /* IPMI_BIT_OPS_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-crypt.c0000644002055400205540000003262413527331637022002 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include #if HAVE_GCRYPT_H #include GCRY_THREAD_OPTION_PTHREAD_IMPL; #endif /* HAVE_GCRYPT_H */ #include "ipmi-crypt.h" #include "ipmi-trace.h" #include "freeipmi-portability.h" static int crypt_initialized = 0; #ifdef WITH_ENCRYPTION static pthread_mutex_t gcrypt_thread_initialized_mutex = PTHREAD_MUTEX_INITIALIZER; static int gcrypt_thread_initialized = 0; #endif /* !WITH_ENCRYPTION */ #ifdef WITH_ENCRYPTION static int _gpg_error_to_errno (gcry_error_t e) { /* be lazy right now */ if (e == GPG_ERR_NO_ERROR) return (0); else return (EINVAL); } #endif /* !WITH_ENCRYPTION */ int crypt_init (void) { #ifdef WITH_ENCRYPTION gcry_error_t e; int perr; /* achu: * * Documentation is not clear on whether only GCRYCTL_SET_THREAD_CBS * needs to be set before threads are created or if all * initialization (including gcry_check_version, * CRYCTL_DISABLE_SECMEM, and GCRYCTL_INITIALIZATION_FINISHED need * to be. Only putting GCRYCTL_SET_THREAD_CBS in mutex section for * time being and it appears to work. * * For reasons that are unclear to me, gcry_control and * GCRYCTL_SET_THREAD_CBS are no longer reentrant starting with * libgcrypt 1.6.0. Calling it simultaneously leads to segfaults. * */ if ((perr = pthread_mutex_lock (&gcrypt_thread_initialized_mutex))) { errno = perr; return (-1); } if (!gcrypt_thread_initialized) { if ((e = gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } gcrypt_thread_initialized++; } if ((perr = pthread_mutex_unlock (&gcrypt_thread_initialized_mutex))) { errno = perr; return (-1); } if (!gcry_check_version (GCRYPT_VERSION)) { ERR_TRACE ("invalid gcrypt library version", EPERM); SET_ERRNO (EPERM); return (-1); } if ((e = gcry_control (GCRYCTL_DISABLE_SECMEM, 0)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } if ((e = gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } crypt_initialized++; return (0); #else /* !WITH_ENCRYPTION */ /* Can run this init, but the actual encryption functions will fail */ return (0); #endif /* !WITH_ENCRYPTION */ } int crypt_hash (unsigned int hash_algorithm, unsigned int hash_flags, const void *key, unsigned int key_len, const void *hash_data, unsigned int hash_data_len, void *digest, unsigned int digest_len) { #ifdef WITH_ENCRYPTION gcry_md_hd_t h = NULL; gcry_error_t e; int gcry_md_algorithm, gcry_md_flags = 0; unsigned int gcry_md_digest_len; void *digestPtr; int rv = -1; if (!IPMI_CRYPT_HASH_ALGORITHM_VALID (hash_algorithm) || (hash_data && !hash_data_len) || !digest || !digest_len) { SET_ERRNO (EINVAL); return (-1); } if (!crypt_initialized) { SET_ERRNO (EINVAL); return (-1); } if (hash_algorithm == IPMI_CRYPT_HASH_SHA1) gcry_md_algorithm = GCRY_MD_SHA1; else if (hash_algorithm == IPMI_CRYPT_HASH_SHA256) gcry_md_algorithm = GCRY_MD_SHA256; else gcry_md_algorithm = GCRY_MD_MD5; if (hash_flags & IPMI_CRYPT_HASH_FLAGS_HMAC) gcry_md_flags |= GCRY_MD_FLAG_HMAC; if ((gcry_md_digest_len = gcry_md_get_algo_dlen (gcry_md_algorithm)) > digest_len) { SET_ERRNO (EINVAL); return (-1); } if ((e = gcry_md_open (&h, gcry_md_algorithm, gcry_md_flags)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } if (!h) { SET_ERRNO (EINVAL); return (-1); } /* achu: Technically any key length can be supplied. We'll assume * callers have checked if the key is of a length they care about. */ /* SPEC: There is no indication that if a NULL password/key is used, * that a zero padded password of some length should be the key. */ if ((hash_flags & IPMI_CRYPT_HASH_FLAGS_HMAC) && key && key_len) { if ((e = gcry_md_setkey (h, key, key_len)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); goto cleanup; } } if (hash_data && hash_data_len) gcry_md_write (h, (void *)hash_data, hash_data_len); gcry_md_final (h); if (!(digestPtr = gcry_md_read (h, gcry_md_algorithm))) { SET_ERRNO (EINVAL); goto cleanup; } if (gcry_md_digest_len > INT_MAX) { SET_ERRNO (EMSGSIZE); goto cleanup; } memcpy (digest, digestPtr, gcry_md_digest_len); rv = gcry_md_digest_len; cleanup: if (h) gcry_md_close (h); return (rv); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } int crypt_hash_digest_len (unsigned int hash_algorithm) { #ifdef WITH_ENCRYPTION int gcry_md_algorithm; if (!IPMI_CRYPT_HASH_ALGORITHM_VALID (hash_algorithm)) { SET_ERRNO (EINVAL); return (-1); } if (!crypt_initialized) { SET_ERRNO (EINVAL); return (-1); } if (hash_algorithm == IPMI_CRYPT_HASH_SHA1) gcry_md_algorithm = GCRY_MD_SHA1; else if (hash_algorithm == IPMI_CRYPT_HASH_SHA256) gcry_md_algorithm = GCRY_MD_SHA256; else gcry_md_algorithm = GCRY_MD_MD5; return (gcry_md_get_algo_dlen (gcry_md_algorithm)); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } #ifdef WITH_ENCRYPTION static int _cipher_crypt (unsigned int cipher_algorithm, unsigned int cipher_mode, const void *key, unsigned int key_len, const void *iv, unsigned int iv_len, void *data, unsigned int data_len, int encrypt_flag) { int gcry_cipher_algorithm, gcry_cipher_mode = 0; int cipher_keylen, cipher_blocklen; int expected_cipher_key_len, expected_cipher_block_len; gcry_cipher_hd_t h = NULL; gcry_error_t e; int rv = -1; if (cipher_algorithm != IPMI_CRYPT_CIPHER_AES || !IPMI_CRYPT_CIPHER_MODE_VALID (cipher_mode) || !iv || !iv_len || !data || !data_len) { SET_ERRNO (EINVAL); return (-1); } gcry_cipher_algorithm = GCRY_CIPHER_AES; expected_cipher_key_len = IPMI_CRYPT_AES_CBC_128_KEY_LENGTH; expected_cipher_block_len = IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH; if (cipher_mode == IPMI_CRYPT_CIPHER_MODE_NONE) gcry_cipher_mode = GCRY_CIPHER_MODE_NONE; else gcry_cipher_mode = GCRY_CIPHER_MODE_CBC; if ((cipher_keylen = crypt_cipher_key_len (cipher_algorithm)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((cipher_blocklen = crypt_cipher_block_len (cipher_algorithm)) < 0) { ERRNO_TRACE (errno); return (-1); } if (cipher_keylen < expected_cipher_key_len || cipher_blocklen != expected_cipher_block_len) { SET_ERRNO (EINVAL); return (-1); } if (iv_len < cipher_blocklen) { SET_ERRNO (EINVAL); return (-1); } if (data_len % cipher_blocklen) { SET_ERRNO (EINVAL); return (-1); } if (iv_len > cipher_blocklen) iv_len = cipher_blocklen; if (key && key_len > expected_cipher_key_len) key_len = expected_cipher_key_len; if (!crypt_initialized) { SET_ERRNO (EINVAL); return (-1); } if ((e = gcry_cipher_open (&h, gcry_cipher_algorithm, gcry_cipher_mode, 0) != GPG_ERR_NO_ERROR)) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } if (key && key_len) { if ((e = gcry_cipher_setkey (h, (void *)key, key_len)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); goto cleanup; } } if (iv && iv_len) { if ((e = gcry_cipher_setiv (h, (void *)iv, iv_len)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); goto cleanup; } } if (encrypt_flag) { if ((e = gcry_cipher_encrypt (h, (void *)data, data_len, NULL, 0)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); goto cleanup; } } else { if ((e = gcry_cipher_decrypt (h, (void *)data, data_len, NULL, 0)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); goto cleanup; } } if (data_len > INT_MAX) { SET_ERRNO (EMSGSIZE); goto cleanup; } rv = data_len; cleanup: if (h) gcry_cipher_close (h); return (rv); } #endif /* !WITH_ENCRYPTION */ int crypt_cipher_encrypt (unsigned int cipher_algorithm, unsigned int cipher_mode, const void *key, unsigned int key_len, const void *iv, unsigned int iv_len, void *data, unsigned int data_len) { #ifdef WITH_ENCRYPTION return (_cipher_crypt (cipher_algorithm, cipher_mode, key, key_len, iv, iv_len, data, data_len, 1)); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } int crypt_cipher_decrypt (unsigned int cipher_algorithm, unsigned int cipher_mode, const void *key, unsigned int key_len, const void *iv, unsigned int iv_len, void *data, unsigned int data_len) { #ifdef WITH_ENCRYPTION return (_cipher_crypt (cipher_algorithm, cipher_mode, key, key_len, iv, iv_len, data, data_len, 0)); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } #ifdef WITH_ENCRYPTION static int _crypt_cipher_info (unsigned int cipher_algorithm, unsigned int cipher_info) { int gcry_cipher_algorithm, gcry_crypt_cipher_info_what; gcry_error_t e; size_t len; if (cipher_algorithm != IPMI_CRYPT_CIPHER_AES || !IPMI_CRYPT_CIPHER_INFO_VALID (cipher_info)) { SET_ERRNO (EINVAL); return (-1); } gcry_cipher_algorithm = GCRY_CIPHER_AES; if (cipher_info == IPMI_CRYPT_CIPHER_INFO_KEY_LENGTH) gcry_crypt_cipher_info_what = GCRYCTL_GET_KEYLEN; else gcry_crypt_cipher_info_what = GCRYCTL_GET_BLKLEN; if (!crypt_initialized) { SET_ERRNO (EINVAL); return (-1); } if ((e = gcry_cipher_algo_info (gcry_cipher_algorithm, gcry_crypt_cipher_info_what, NULL, &len)) != GPG_ERR_NO_ERROR) { ERR_GCRYPT_TRACE (e); SET_ERRNO (_gpg_error_to_errno (e)); return (-1); } if (len > INT_MAX) { SET_ERRNO (EMSGSIZE); return (-1); } return (len); } #endif /* !WITH_ENCRYPTION */ int crypt_cipher_key_len (unsigned int cipher_algorithm) { #ifdef WITH_ENCRYPTION return (_crypt_cipher_info (cipher_algorithm, IPMI_CRYPT_CIPHER_INFO_KEY_LENGTH)); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } int crypt_cipher_block_len (unsigned int cipher_algorithm) { #ifdef WITH_ENCRYPTION return (_crypt_cipher_info (cipher_algorithm, IPMI_CRYPT_CIPHER_INFO_BLOCK_LENGTH)); #else /* !WITH_ENCRYPTION */ SET_ERRNO (EPERM); return (-1); #endif /* !WITH_ENCRYPTION */ } freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-crypt.h0000644002055400205540000000762013527331637022005 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CRYPT_H #define IPMI_CRYPT_H #include #define IPMI_CRYPT_HASH_SHA1 0x00 #define IPMI_CRYPT_HASH_MD5 0x01 #define IPMI_CRYPT_HASH_SHA256 0x02 #define IPMI_CRYPT_HASH_ALGORITHM_VALID(__hash_algorithm) \ (((__hash_algorithm) == IPMI_CRYPT_HASH_SHA1 \ || (__hash_algorithm) == IPMI_CRYPT_HASH_MD5 \ || (__hash_algorithm) == IPMI_CRYPT_HASH_SHA256) ? 1 : 0) #define IPMI_CRYPT_HASH_FLAGS_HMAC 0x01 #define IPMI_CRYPT_CIPHER_AES 0x00 #define IPMI_CRYPT_CIPHER_ALGORITHM_VALID(__cipher_algorithm) \ (((__cipher_algorithm) == IPMI_CRYPT_CIPHER_AES) ? 1 : 0) #define IPMI_CRYPT_CIPHER_MODE_NONE 0x00 #define IPMI_CRYPT_CIPHER_MODE_CBC 0x01 #define IPMI_CRYPT_CIPHER_MODE_VALID(__cipher_mode) \ (((__cipher_mode) == IPMI_CRYPT_CIPHER_MODE_NONE \ || (__cipher_mode) == IPMI_CRYPT_CIPHER_MODE_CBC) ? 1 : 0) #define IPMI_CRYPT_CIPHER_INFO_KEY_LENGTH 0x00 #define IPMI_CRYPT_CIPHER_INFO_BLOCK_LENGTH 0x01 #define IPMI_CRYPT_CIPHER_INFO_VALID(__cipher_info) \ (((__cipher_info) == IPMI_CRYPT_CIPHER_INFO_KEY_LENGTH \ || (__cipher_info) == IPMI_CRYPT_CIPHER_INFO_BLOCK_LENGTH) ? 1 : 0) #define IPMI_CRYPT_AES_CBC_128_IV_LENGTH 16 #define IPMI_CRYPT_AES_CBC_128_KEY_LENGTH 16 #define IPMI_CRYPT_AES_CBC_128_BLOCK_LENGTH 16 /* crypt_init * * Must be called first before anything else that may use crypt * functions. In threaded programs, must be called before threads are * created. * * Returns 0 on success, -1 on error. */ int crypt_init (void); /* return length of data written into buffer on success, -1 on error */ int crypt_hash (unsigned int hash_algorithm, unsigned int hash_flags, const void *key, unsigned int key_len, const void *hash_data, unsigned int hash_data_len, void *digest, unsigned int digest_len); int crypt_hash_digest_len (unsigned int hash_algorithm); /* return length of data written into buffer on success, -1 on error */ int crypt_cipher_encrypt (unsigned int cipher_algorithm, unsigned int cipher_mode, const void *key, unsigned int key_len, const void *iv, unsigned int iv_len, void *data, unsigned int data_len); /* return length of data written into buffer on success, -1 on error */ int crypt_cipher_decrypt (unsigned int cipher_algorithm, unsigned int cipher_mode, const void *key, unsigned int key_len, const void *iv, unsigned int iv_len, void *data, unsigned int data_len); int crypt_cipher_key_len (unsigned int cipher_algorithm); int crypt_cipher_block_len (unsigned int cipher_algorithm); #endif /* IPMI_CRYPT_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-fiid-util.c0000644002055400205540000000416713527331637022530 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/fiid/fiid.h" #include "ipmi-fiid-util.h" #include "ipmi-trace.h" #include "freeipmi-portability.h" void set_errno_by_fiid_object (fiid_obj_t obj) { if (fiid_obj_errnum (obj) == FIID_ERR_SUCCESS) errno = 0; else if (fiid_obj_errnum (obj) == FIID_ERR_OUT_OF_MEMORY) errno = ENOMEM; else if (fiid_obj_errnum (obj) == FIID_ERR_OVERFLOW) errno = ENOSPC; #if 0 else if (fiid_obj_errnum (obj) == FIID_ERR_DATA_NOT_AVAILABLE) errno = EINVAL; else if (fiid_obj_errnum (obj) == FIID_ERR_FIELD_NOT_FOUND || fiid_obj_errnum (obj) == FIID_ERR_DATA_NOT_BYTE_ALIGNED || fiid_obj_errnum (obj) == FIID_ERR_REQUIRED_FIELD_MISSING || fiid_obj_errnum (obj) == FIID_ERR_FIXED_LENGTH_FIELD_INVALID || fiid_obj_errnum (obj) == FIID_ERR_DATA_NOT_AVAILABLE || fiid_obj_errnum (obj) == FIID_ERR_NOT_IDENTICAL) errno = EINVAL; #endif else errno = EINVAL; } void set_errno_by_fiid_iterator (fiid_iterator_t iter) { if (fiid_iterator_errnum (iter) == FIID_ERR_SUCCESS) errno = 0; else if (fiid_iterator_errnum (iter) == FIID_ERR_OUT_OF_MEMORY) errno = ENOMEM; else if (fiid_iterator_errnum (iter) == FIID_ERR_OVERFLOW) errno = ENOSPC; else errno = EINVAL; } freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-fiid-util.h0000644002055400205540000000214013527331637022522 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FIID_UTIL_H #define IPMI_FIID_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/fiid/fiid.h" void set_errno_by_fiid_object (fiid_obj_t obj); void set_errno_by_fiid_iterator (fiid_iterator_t iter); #endif /* IPMI_FIID_UTIL_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-fill-util.h0000644002055400205540000000442313527331637022543 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_FILL_UTIL_H #define IPMI_FILL_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-trace.h" #define FILL_FIID_OBJ_CLEAR(__obj) \ do { \ if (fiid_obj_clear ((__obj)) < 0) \ { \ FIID_OBJECT_ERROR_TO_ERRNO ((__obj)); \ return (-1); \ } \ } while (0) #define FILL_FIID_OBJ_SET(__obj, __field, __val) \ do { \ if (fiid_obj_set ((__obj), (__field), (__val)) < 0) \ { \ FIID_OBJECT_ERROR_TO_ERRNO ((__obj)); \ return (-1); \ } \ } while (0) #define FILL_FIID_OBJ_SET_DATA(__obj, __field, __data, __data_len) \ do { \ if (fiid_obj_set_data ((__obj), (__field), (__data), (__data_len)) < 0) \ { \ FIID_OBJECT_ERROR_TO_ERRNO ((__obj)); \ return (-1); \ } \ } while (0) #endif /* IPMI_FILL_UTIL_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-md2.c0000644002055400205540000001570013527331637021317 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-md2.c,v 1.16 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* achu: Concern/question over license of openssl. Other * implementations found online questionable. End result was * re-implementation from scratch. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-md2.h" #include "freeipmi-portability.h" static char padding[16][16] = { { 0x01}, { 0x02,0x02}, { 0x03,0x03,0x03}, { 0x04,0x04,0x04,0x04}, { 0x05,0x05,0x05,0x05,0x05}, { 0x06,0x06,0x06,0x06,0x06,0x06}, { 0x07,0x07,0x07,0x07,0x07,0x07,0x07}, { 0x08,0x08,0x08,0x08,0x08,0x08,0x08,0x08}, { 0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09,0x09}, { 0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A,0x0A}, { 0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B,0x0B}, { 0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C}, { 0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D,0x0D}, { 0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E,0x0E}, { 0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F,0x0F}, { 0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10,0x10} }; static unsigned char S[256] = { 0x29, 0x2E, 0x43, 0xC9, 0xA2, 0xD8, 0x7C, 0x01, 0x3D, 0x36, 0x54, 0xA1, 0xEC, 0xF0, 0x06, 0x13, 0x62, 0xA7, 0x05, 0xF3, 0xC0, 0xC7, 0x73, 0x8C, 0x98, 0x93, 0x2B, 0xD9, 0xBC, 0x4C, 0x82, 0xCA, 0x1E, 0x9B, 0x57, 0x3C, 0xFD, 0xD4, 0xE0, 0x16, 0x67, 0x42, 0x6F, 0x18, 0x8A, 0x17, 0xE5, 0x12, 0xBE, 0x4E, 0xC4, 0xD6, 0xDA, 0x9E, 0xDE, 0x49, 0xA0, 0xFB, 0xF5, 0x8E, 0xBB, 0x2F, 0xEE, 0x7A, 0xA9, 0x68, 0x79, 0x91, 0x15, 0xB2, 0x07, 0x3F, 0x94, 0xC2, 0x10, 0x89, 0x0B, 0x22, 0x5F, 0x21, 0x80, 0x7F, 0x5D, 0x9A, 0x5A, 0x90, 0x32, 0x27, 0x35, 0x3E, 0xCC, 0xE7, 0xBF, 0xF7, 0x97, 0x03, 0xFF, 0x19, 0x30, 0xB3, 0x48, 0xA5, 0xB5, 0xD1, 0xD7, 0x5E, 0x92, 0x2A, 0xAC, 0x56, 0xAA, 0xC6, 0x4F, 0xB8, 0x38, 0xD2, 0x96, 0xA4, 0x7D, 0xB6, 0x76, 0xFC, 0x6B, 0xE2, 0x9C, 0x74, 0x04, 0xF1, 0x45, 0x9D, 0x70, 0x59, 0x64, 0x71, 0x87, 0x20, 0x86, 0x5B, 0xCF, 0x65, 0xE6, 0x2D, 0xA8, 0x02, 0x1B, 0x60, 0x25, 0xAD, 0xAE, 0xB0, 0xB9, 0xF6, 0x1C, 0x46, 0x61, 0x69, 0x34, 0x40, 0x7E, 0x0F, 0x55, 0x47, 0xA3, 0x23, 0xDD, 0x51, 0xAF, 0x3A, 0xC3, 0x5C, 0xF9, 0xCE, 0xBA, 0xC5, 0xEA, 0x26, 0x2C, 0x53, 0x0D, 0x6E, 0x85, 0x28, 0x84, 0x09, 0xD3, 0xDF, 0xCD, 0xF4, 0x41, 0x81, 0x4D, 0x52, 0x6A, 0xDC, 0x37, 0xC8, 0x6C, 0xC1, 0xAB, 0xFA, 0x24, 0xE1, 0x7B, 0x08, 0x0C, 0xBD, 0xB1, 0x4A, 0x78, 0x88, 0x95, 0x8B, 0xE3, 0x63, 0xE8, 0x6D, 0xE9, 0xCB, 0xD5, 0xFE, 0x3B, 0x00, 0x1D, 0x39, 0xF2, 0xEF, 0xB7, 0x0E, 0x66, 0x58, 0xD0, 0xE4, 0xA6, 0x77, 0x72, 0xF8, 0xEB, 0x75, 0x4B, 0x0A, 0x31, 0x44, 0x50, 0xB4, 0x8F, 0xED, 0x1F, 0x1A, 0xDB, 0x99, 0x8D, 0x33, 0x9F, 0x11, 0x83, 0x14 }; #define L ctx->l #define X ctx->x #define C ctx->c #define M ctx->m #define Mlen ctx->mlen #define MD2_MAGIC 0xf00fd00d int md2_init (md2_t *ctx) { if (ctx == NULL) { errno = EINVAL; return (-1); } ctx->magic = MD2_MAGIC; L = 0; Mlen = 0; memset (X, '\0', MD2_BUFFER_LENGTH); memset (C, '\0', MD2_CHKSUM_LENGTH); memset (M, '\0', MD2_BLOCK_LENGTH); return (0); } static void _md2_update_digest_and_checksum (md2_t *ctx) { unsigned int j, k; uint8_t c, t; /* Update X */ for (j = 0; j < MD2_BLOCK_LENGTH; j++) { X[16+j] = M[j]; X[32+j] = (X[16+j] ^ X[j]); } t = 0; for (j = 0; j < MD2_ROUNDS_LENGTH; j++) { for (k = 0; k < MD2_BUFFER_LENGTH; k++) { t = X[k] = (X[k] ^ S[t]); } t = (t + j) % 256; } /* Update C and L */ /* achu: Note that there is a typo in the RFC 1319 specification. * In section 3.2, the line: * * Set C[j] to S[c xor L] * * should read: * * Set C[j] to C[j] xor S[c xor L]. */ for (j = 0; j < MD2_BLOCK_LENGTH; j++) { c = M[j]; C[j] = C[j] ^ S[c ^ L]; L = C[j]; } } int md2_update_data (md2_t *ctx, const void *buf, unsigned int buflen) { if (ctx == NULL || ctx->magic != MD2_MAGIC || buf == NULL) { errno = EINVAL; return (-1); } if (buflen == 0) return (0); if ((Mlen + buflen) >= MD2_BLOCK_LENGTH) { unsigned int bufcount; bufcount = (MD2_BLOCK_LENGTH - Mlen); memcpy (M + Mlen, buf, bufcount); _md2_update_digest_and_checksum (ctx); while ((buflen - bufcount) >= MD2_BLOCK_LENGTH) { memcpy (M, buf + bufcount, MD2_BLOCK_LENGTH); bufcount += MD2_BLOCK_LENGTH; _md2_update_digest_and_checksum (ctx); } Mlen = buflen - bufcount; if (Mlen > 0) memcpy (M, buf + bufcount, Mlen); } else { /* Not enough data to update X and C, just copy in data */ memcpy (M + Mlen, buf, buflen); Mlen += buflen; } return (buflen); } static void _md2_append_padding_and_checksum (md2_t *ctx) { unsigned int padlen; int padindex; padlen = MD2_PADDING_LENGTH - Mlen; padindex = padlen - 1; md2_update_data (ctx, padding[padindex], padlen); md2_update_data (ctx, C, MD2_CHKSUM_LENGTH); } int md2_finish (md2_t *ctx, void *digest, unsigned int digestlen) { if (ctx == NULL || ctx->magic != MD2_MAGIC || digest == NULL || digestlen < MD2_DIGEST_LENGTH) { errno = EINVAL; return (-1); } _md2_append_padding_and_checksum (ctx); memcpy (digest, X, MD2_DIGEST_LENGTH); ctx->magic = ~MD2_MAGIC; return (MD2_DIGEST_LENGTH); } freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-md2.h0000644002055400205540000000411313527331637021320 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-md2.h,v 1.9 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* achu: Concern/question over license of openssl. Other * implementations found online questionable. End result was * re-implementation from scratch. */ #ifndef IPMI_MD2_H #define IPMI_MD2_H #include #define MD2_BLOCK_LENGTH 16 #define MD2_BUFFER_LENGTH 48 #define MD2_CHKSUM_LENGTH 16 #define MD2_DIGEST_LENGTH 16 #define MD2_PADDING_LENGTH 16 #define MD2_ROUNDS_LENGTH 18 typedef struct __md2 { uint32_t magic; uint8_t l; unsigned int mlen; uint8_t x[MD2_BUFFER_LENGTH]; uint8_t c[MD2_CHKSUM_LENGTH]; uint8_t m[MD2_BLOCK_LENGTH]; } md2_t; int md2_init (md2_t *ctx); int md2_update_data (md2_t *ctx, const void *buf, unsigned int buflen); int md2_finish (md2_t *ctx, void *digest, unsigned int digestlen); #endif /* IPMI_MD2_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-md5.c0000644002055400205540000002661413527331637021330 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-md5.c,v 1.17 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* achu: Concern/question over license of openssl. Other * implementations found online questionable. End result was * re-implementation from scratch. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-md5.h" #include "freeipmi-portability.h" static uint8_t padding[64] = { 0x80, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; /* achu: You can generate this table using the following code snippet. for (i = 1; i <= 64; i++) { double n = 4294967296 * ((sin(i) > 0) ? sin(i) : (sin(i) * -1)); printf("0x%08X\n", (uint32_t)n); } */ static uint32_t T[64] = { 0xD76AA478, 0xE8C7B756, 0x242070DB, 0xC1BDCEEE, 0xF57C0FAF, 0x4787C62A, 0xA8304613, 0xFD469501, 0x698098D8, 0x8B44F7AF, 0xFFFF5BB1, 0x895CD7BE, 0x6B901122, 0xFD987193, 0xA679438E, 0x49B40821, 0xF61E2562, 0xC040B340, 0x265E5A51, 0xE9B6C7AA, 0xD62F105D, 0x02441453, 0xD8A1E681, 0xE7D3FBC8, 0x21E1CDE6, 0xC33707D6, 0xF4D50D87, 0x455A14ED, 0xA9E3E905, 0xFCEFA3F8, 0x676F02D9, 0x8D2A4C8A, 0xFFFA3942, 0x8771F681, 0x6D9D6122, 0xFDE5380C, 0xA4BEEA44, 0x4BDECFA9, 0xF6BB4B60, 0xBEBFBC70, 0x289B7EC6, 0xEAA127FA, 0xD4EF3085, 0x04881D05, 0xD9D4D039, 0xE6DB99E5, 0x1FA27CF8, 0xC4AC5665, 0xF4292244, 0x432AFF97, 0xAB9423A7, 0xFC93A039, 0x655B59C3, 0x8F0CCC92, 0xFFEFF47D, 0x85845DD1, 0x6FA87E4F, 0xFE2CE6E0, 0xA3014314, 0x4E0811A1, 0xF7537E82, 0xBD3AF235, 0x2AD7D2BB, 0xEB86D391 }; #define A ctx->a #define B ctx->b #define C ctx->c #define D ctx->d #define M ctx->m #define Mlen ctx->mlen #define MD5_MAGIC 0xfb0fdb0d #define F(x,y,z) (((x) & (y)) | ((~(x)) & (z))) #define G(x,y,z) (((x) & (z)) | ((y) & (~(z)))) #define H(x,y,z) ((x) ^ (y) ^ (z)) #define I(x,y,z) ((y) ^ ((x) | (~(z)))) #define CSHIFTL(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) /* achu: The RFC specification accesses elements of T from 1 to 64, * but we index from 0 to 63. So we need to subtract 1 from the T * array index. */ #define R1(a, b, c, d, k, s, i) \ do { \ (a) = ((b) + CSHIFTL (((a) + F ((b),(c),(d)) + X[(k)] + T[(i-1)]),(s))); \ } while (0) #define R2(a, b, c, d, k, s, i) \ do { \ (a) = ((b) + CSHIFTL (((a) + G ((b),(c),(d)) + X[(k)] + T[(i-1)]),(s))); \ } while (0) #define R3(a, b, c, d, k, s, i) \ do { \ (a) = ((b) + CSHIFTL (((a) + H ((b),(c),(d)) + X[(k)] + T[(i-1)]),(s))); \ } while (0) #define R4(a, b, c, d, k, s, i) \ do { \ (a) = ((b) + CSHIFTL (((a) + I ((b),(c),(d)) + X[(k)] + T[(i-1)]),(s))); \ } while (0) int md5_init (md5_t *ctx) { if (ctx == NULL) { errno = EINVAL; return (-1); } ctx->magic = MD5_MAGIC; Mlen = 0; ctx->bytes_mod_64 = 0; ctx->bit_count[0] = 0; ctx->bit_count[1] = 0; memset (M, '\0', MD5_BLOCK_LENGTH); /* initial values are listed low-order byte first */ A = 0x67452301; B = 0xEFCDAB89; C = 0x98BADCFE; D = 0x10325476; return (0); } static void _md5_update_digest (md5_t *ctx) { uint32_t AA, BB, CC, DD; uint32_t X[MD5_BLOCK_WORDS_LENGTH]; unsigned int j; /* Note there are no endian issues here, compiler is required to * handle shifts correctly */ for (j = 0; j < MD5_BLOCK_WORDS_LENGTH; j++) X[j] = ((uint32_t)M[j*4] | ((uint32_t)M[j*4+1] << 8) | ((uint32_t)M[j*4+2] << 16) | ((uint32_t)M[j*4+3] << 24)); AA = A; BB = B; CC = C; DD = D; /* Round 1 */ R1 (A, B, C, D, 0, 7, 1); R1 (D, A, B, C, 1, 12, 2); R1 (C, D, A, B, 2, 17, 3); R1 (B, C, D, A, 3, 22, 4); R1 (A, B, C, D, 4, 7, 5); R1 (D, A, B, C, 5, 12, 6); R1 (C, D, A, B, 6, 17, 7); R1 (B, C, D, A, 7, 22, 8); R1 (A, B, C, D, 8, 7, 9); R1 (D, A, B, C, 9, 12, 10); R1 (C, D, A, B, 10, 17, 11); R1 (B, C, D, A, 11, 22, 12); R1 (A, B, C, D, 12, 7, 13); R1 (D, A, B, C, 13, 12, 14); R1 (C, D, A, B, 14, 17, 15); R1 (B, C, D, A, 15, 22, 16); /* Round 2 */ R2 (A, B, C, D, 1, 5, 17); R2 (D, A, B, C, 6, 9, 18); R2 (C, D, A, B, 11, 14, 19); R2 (B, C, D, A, 0, 20, 20); R2 (A, B, C, D, 5, 5, 21); R2 (D, A, B, C, 10, 9, 22); R2 (C, D, A, B, 15, 14, 23); R2 (B, C, D, A, 4, 20, 24); R2 (A, B, C, D, 9, 5, 25); R2 (D, A, B, C, 14, 9, 26); R2 (C, D, A, B, 3, 14, 27); R2 (B, C, D, A, 8, 20, 28); R2 (A, B, C, D, 13, 5, 29); R2 (D, A, B, C, 2, 9, 30); R2 (C, D, A, B, 7, 14, 31); R2 (B, C, D, A, 12, 20, 32); /* Round 3 */ R3 (A, B, C, D, 5, 4, 33); R3 (D, A, B, C, 8, 11, 34); R3 (C, D, A, B, 11, 16, 35); R3 (B, C, D, A, 14, 23, 36); R3 (A, B, C, D, 1, 4, 37); R3 (D, A, B, C, 4, 11, 38); R3 (C, D, A, B, 7, 16, 39); R3 (B, C, D, A, 10, 23, 40); R3 (A, B, C, D, 13, 4, 41); R3 (D, A, B, C, 0, 11, 42); R3 (C, D, A, B, 3, 16, 43); R3 (B, C, D, A, 6, 23, 44); R3 (A, B, C, D, 9, 4, 45); R3 (D, A, B, C, 12, 11, 46); R3 (C, D, A, B, 15, 16, 47); R3 (B, C, D, A, 2, 23, 48); /* Round 4 */ R4 (A, B, C, D, 0, 6, 49); R4 (D, A, B, C, 7, 10, 50); R4 (C, D, A, B, 14, 15, 51); R4 (B, C, D, A, 5, 21, 52); R4 (A, B, C, D, 12, 6, 53); R4 (D, A, B, C, 3, 10, 54); R4 (C, D, A, B, 10, 15, 55); R4 (B, C, D, A, 1, 21, 56); R4 (A, B, C, D, 8, 6, 57); R4 (D, A, B, C, 15, 10, 58); R4 (C, D, A, B, 6, 15, 59); R4 (B, C, D, A, 13, 21, 60); R4 (A, B, C, D, 4, 6, 61); R4 (D, A, B, C, 11, 10, 62); R4 (C, D, A, B, 2, 15, 63); R4 (B, C, D, A, 9, 21, 64); A = A + AA; B = B + BB; C = C + CC; D = D + DD; } static void _md5_update_count (md5_t *ctx, unsigned int buflen) { /* Use two uint32_t integers to hold our 64 bit count. * bit_count[1] holds the 4 lower order bytes. bit_count[0] holds * the 4 higher order bytes. */ ctx->bit_count[1] += buflen * 8; /* Account for bit overflow */ if (ctx->bit_count[1] < (buflen * 8)) ctx->bit_count[0]++; /* Account for overflow due to multiplication by 8 */ ctx->bit_count[0] += (buflen >> 29); ctx->bytes_mod_64 = ((buflen % 64) + ctx->bytes_mod_64) % 64; } int md5_update_data (md5_t *ctx, const void *buf, unsigned int buflen) { if (ctx == NULL || ctx->magic != MD5_MAGIC || buf == NULL) { errno = EINVAL; return (-1); } if (buflen == 0) return (0); if ((Mlen + buflen) >= MD5_BLOCK_LENGTH) { unsigned int bufcount; bufcount = (MD5_BLOCK_LENGTH - Mlen); memcpy (M + Mlen, buf, bufcount); _md5_update_digest (ctx); _md5_update_count (ctx, bufcount); while ((buflen - bufcount) >= MD5_BLOCK_LENGTH) { memcpy (M, buf + bufcount, MD5_BLOCK_LENGTH); bufcount += MD5_BLOCK_LENGTH; _md5_update_digest (ctx); _md5_update_count (ctx, MD5_BLOCK_LENGTH); } Mlen = buflen - bufcount; if (Mlen > 0) { memcpy (M, buf + bufcount, Mlen); _md5_update_count (ctx, Mlen); } } else { /* Not enough data to update digest, just copy in data */ memcpy (M + Mlen, buf, buflen); Mlen += buflen; _md5_update_count (ctx, buflen); } return (buflen); } static void _md5_append_padding_and_length (md5_t *ctx) { unsigned int padlen; char length[8]; if (ctx->bytes_mod_64 == 56) padlen = 64; else if (ctx->bytes_mod_64 < 56) padlen = 56 - ctx->bytes_mod_64; else padlen = 56 + (64 - ctx->bytes_mod_64); /* Must grab length buffer before update with pad data, we don't * want to update length with pad data. Length is appended low * order byte first. Note there are no endian issues here, * compiler is required to handle bitmasks and shifts correctly. */ length[0] = (ctx->bit_count[1] & 0x000000ff); length[1] = (ctx->bit_count[1] & 0x0000ff00) >> 8; length[2] = (ctx->bit_count[1] & 0x00ff0000) >> 16; length[3] = (ctx->bit_count[1] & 0xff000000) >> 24; length[4] = (ctx->bit_count[0] & 0x000000ff); length[5] = (ctx->bit_count[0] & 0x0000ff00) >> 8; length[6] = (ctx->bit_count[0] & 0x00ff0000) >> 16; length[7] = (ctx->bit_count[0] & 0xff000000) >> 24; md5_update_data (ctx, padding, padlen); md5_update_data (ctx, length, 8); } int md5_finish (md5_t *ctx, void *digest, unsigned int digestlen) { uint8_t buf[MD5_DIGEST_LENGTH]; if (ctx == NULL || ctx->magic != MD5_MAGIC || digest == NULL || digestlen < MD5_DIGEST_LENGTH) { errno = EINVAL; return (-1); } _md5_append_padding_and_length (ctx); /* Note there are no endian issues here, compiler is required to * handle bitmasks and shifts correctly */ buf[0] = (A & 0x000000ff); buf[1] = (A & 0x0000ff00) >> 8; buf[2] = (A & 0x00ff0000) >> 16; buf[3] = (A & 0xff000000) >> 24; buf[4] = (B & 0x000000ff); buf[5] = (B & 0x0000ff00) >> 8; buf[6] = (B & 0x00ff0000) >> 16; buf[7] = (B & 0xff000000) >> 24; buf[8] = (C & 0x000000ff); buf[9] = (C & 0x0000ff00) >> 8; buf[10] = (C & 0x00ff0000) >> 16; buf[11] = (C & 0xff000000) >> 24; buf[12] = (D & 0x000000ff); buf[13] = (D & 0x0000ff00) >> 8; buf[14] = (D & 0x00ff0000) >> 16; buf[15] = (D & 0xff000000) >> 24; memcpy (digest, buf, MD5_DIGEST_LENGTH); ctx->magic = ~MD5_MAGIC; return (MD5_DIGEST_LENGTH); } freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-md5.h0000644002055400205540000000406013527331637021324 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-md5.h,v 1.9 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* achu: Concern/question over license of openssl. Other * implementations found online questionable. End result was * re-implementation from scratch. */ #ifndef IPMI_MD5_H #define IPMI_MD5_H #include #define MD5_BLOCK_LENGTH 64 #define MD5_BLOCK_WORDS_LENGTH (MD5_BLOCK_LENGTH/4) #define MD5_DIGEST_LENGTH 16 typedef struct __md5 { uint32_t magic; unsigned int mlen; unsigned int bytes_mod_64; uint32_t bit_count[2]; uint32_t a; uint32_t b; uint32_t c; uint32_t d; uint8_t m[MD5_BLOCK_LENGTH]; } md5_t; int md5_init (md5_t *ctx); int md5_update_data (md5_t *ctx, const void *buf, unsigned int buflen); int md5_finish (md5_t *ctx, void *digest, unsigned int digestlen); #endif /* IPMI_MD5_H */ freeipmi-1.6.4/libfreeipmi/libcommon/ipmi-trace.h0000644002055400205540000001160113527331637021734 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_TRACE_H #define IPMI_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #ifdef WITH_ENCRYPTION #include #endif /* !WITH_ENCRYPTION */ #include "freeipmi/fiid/fiid.h" #include "ipmi-fiid-util.h" #define ERR_WRAPPER_STR_MAX_LEN 4096 #if defined (IPMI_TRACE) #define TRACE_MSG_OUT(__msgtracestr, __msgtracenum) \ do { \ fprintf (stderr, \ "%s: %d: %s: error '%s' (%d)\n", \ __FILE__, __LINE__, __FUNCTION__, \ __msgtracestr, __msgtracenum); \ fflush (stderr); \ } while (0) #define TRACE_ERRNO_OUT(__errno_orig) \ do { \ extern int errno; \ int __save_errno = __errno_orig; \ char __errnostr[ERR_WRAPPER_STR_MAX_LEN + 1]; \ memset (__errnostr, '\0', ERR_WRAPPER_STR_MAX_LEN + 1); \ strerror_r (__save_errno, __errnostr, ERR_WRAPPER_STR_MAX_LEN); \ fprintf (stderr, \ "%s: %d: %s: errno '%s' (%d)\n", \ __FILE__, __LINE__, __FUNCTION__, \ __errnostr, __save_errno); \ fflush (stderr); \ __errno_orig = __save_errno; \ } while (0) #ifdef WITH_ENCRYPTION #define TRACE_GCRYPT_OUT(__error_orig) \ do { \ char __errorstr[ERR_WRAPPER_STR_MAX_LEN + 1]; \ memset (__errorstr, '\0', ERR_WRAPPER_STR_MAX_LEN + 1); \ gpg_strerror_r (__error_orig, __errorstr, ERR_WRAPPER_STR_MAX_LEN); \ fprintf (stderr, \ "%s: %d: %s: gcrypt error '%s' (%d)\n", \ __FILE__, __LINE__, __FUNCTION__, \ __errorstr, __error_orig); \ fflush (stderr); \ } while (0) #else /* !WITH_ENCRYPTION */ #define TRACE_GCRYPT_OUT(__error_orig) #endif /* !WITH_ENCRYPTION */ #else /* !IPMI_TRACE */ #define TRACE_MSG_OUT(__msgtracestr, __msgtracenum) #define TRACE_ERRNO_OUT(__errno_orig) #define TRACE_GCRYPT_OUT(__error_orig) #endif /* !IPMI_TRACE */ #define ERR_TRACE(__str, __num) \ do { \ TRACE_MSG_OUT (__str, __num); \ } while (0) #define SET_ERRNO(__errno) \ do { \ errno = (__errno); \ TRACE_ERRNO_OUT (errno); \ } while (0) #define ERRNO_TRACE(__errno) \ do { \ TRACE_ERRNO_OUT (__errno); \ } while (0) #define FIID_OBJECT_ERROR_TO_ERRNO(__obj) \ do { \ set_errno_by_fiid_object ((__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #define FIID_ITERATOR_ERROR_TO_ERRNO(__iter) \ do { \ set_errno_by_fiid_iterator ((__iter)); \ TRACE_MSG_OUT (fiid_iterator_errormsg ((__iter)), fiid_iterator_errnum ((__iter))); \ } while (0) #define ERR_GCRYPT_TRACE(__error) \ do { \ TRACE_GCRYPT_OUT (__error); \ } while (0) #endif /* IPMI_TRACE_H */ freeipmi-1.6.4/libfreeipmi/locate/0000755002055400205540000000000013527342542017017 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate.c0000644002055400205540000001101013527331637021362 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-util.h" #include "ipmi-locate-trace.h" #include "freeipmi-portability.h" typedef int ((*ipmi_locate_func)(ipmi_locate_ctx_t ctx, ipmi_interface_type_t, struct ipmi_locate_info *)); static char * ipmi_locate_ctx_errmsg[] = { "success", "locate context null", "locate context invalid", "invalid parameter", "permission denied", "out of memory", "internal system error", "internal error", "errnum out of range", NULL, }; ipmi_locate_ctx_t ipmi_locate_ctx_create (void) { ipmi_locate_ctx_t ctx = NULL; if (!(ctx = (ipmi_locate_ctx_t)malloc (sizeof (struct ipmi_locate_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_LOCATE_CTX_MAGIC; ctx->errnum = IPMI_LOCATE_ERR_SUCCESS; return (ctx); } void ipmi_locate_ctx_destroy (ipmi_locate_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) return; ctx->magic = ~IPMI_LOCATE_CTX_MAGIC; ctx->errnum = IPMI_LOCATE_ERR_SUCCESS; free (ctx); } int ipmi_locate_ctx_errnum (ipmi_locate_ctx_t ctx) { if (!ctx) return (IPMI_LOCATE_ERR_NULL); else if (ctx->magic != IPMI_LOCATE_CTX_MAGIC) return (IPMI_LOCATE_ERR_INVALID); else return (ctx->errnum); } char * ipmi_locate_ctx_strerror (int errnum) { if (errnum >= IPMI_LOCATE_ERR_SUCCESS && errnum <= IPMI_LOCATE_ERR_ERRNUMRANGE) return (ipmi_locate_ctx_errmsg[errnum]); else return (ipmi_locate_ctx_errmsg[IPMI_LOCATE_ERR_ERRNUMRANGE]); } char * ipmi_locate_ctx_errormsg (ipmi_locate_ctx_t ctx) { return (ipmi_locate_ctx_strerror (ipmi_locate_ctx_errnum (ctx))); } static int _ipmi_locate_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info, int try_defaults) { static ipmi_locate_func things_to_try[] = { ipmi_locate_dmidecode_get_device_info, ipmi_locate_smbios_get_device_info, ipmi_locate_acpi_spmi_get_device_info, ipmi_locate_pci_get_device_info, ipmi_locate_defaults_get_device_info, NULL }; unsigned int i, things_to_try_len; struct ipmi_locate_info linfo; int rv; if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } if (try_defaults) things_to_try_len = 5; else things_to_try_len = 4; for (i = 0; i < things_to_try_len; i++) { memset (&linfo, 0, sizeof (struct ipmi_locate_info)); rv = (*things_to_try[i])(ctx, type, &linfo); if (!rv) { memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); /* reset errnum if set previously */ ctx->errnum = IPMI_LOCATE_ERR_SUCCESS; return (0); } } LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); return (-1); } int ipmi_locate_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { return (_ipmi_locate_get_device_info (ctx, type, info, 1)); } int ipmi_locate_discover_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { return (_ipmi_locate_get_device_info (ctx, type, info, 0)); } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-acpi-spmi.c0000644002055400205540000020125513527331637023256 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_ACPI_ADDRESS_SPACE_ID_SYSTEM_MEMORY IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY #define IPMI_ACPI_ADDRESS_SPACE_ID_SYSTEM_IO IPMI_ADDRESS_SPACE_ID_SYSTEM_IO #define IPMI_ACPI_ADDRESS_SPACE_ID_SMBUS IPMI_ADDRESS_SPACE_ID_SMBUS /* Certain ACPI table field widths are architecture specific */ #define IPMI_ACPI_MACHINE_WIDTH (sizeof (void *) * 8) /* Constants used in searching for the RSDP (Root System Description Pointer) in low memory */ #define IPMI_ACPI_LO_RSDP_WINDOW_BASE 0 /* Physical Address */ #define IPMI_ACPI_HI_RSDP_WINDOW_BASE 0xE0000 /* Physical Address */ #define IPMI_ACPI_LO_RSDP_WINDOW_SIZE 0x400 #define IPMI_ACPI_HI_RSDP_WINDOW_SIZE 0x20000 #define IPMI_ACPI_RSDP_SCAN_STEP 16 /* * Values for description table header signatures */ #define IPMI_ACPI_RSDP_NAME "RSDP" #define IPMI_ACPI_RSDP_SIG "RSD PTR " /* RSDT Pointer signature */ #define IPMI_ACPI_APIC_SIG "APIC" /* Multiple APIC Description Table */ #define IPMI_ACPI_DSDT_SIG "DSDT" /* Differentiated System Description Table */ #define IPMI_ACPI_FADT_SIG "FACP" /* Fixed ACPI Description Table */ #define IPMI_ACPI_FACS_SIG "FACS" /* Firmware ACPI Control Structure */ #define IPMI_ACPI_PSDT_SIG "PSDT" /* Persistent System Description Table */ #define IPMI_ACPI_RSDT_SIG "RSDT" /* Root System Description Table */ #define IPMI_ACPI_XSDT_SIG "XSDT" /* Extended System Description Table */ #define IPMI_ACPI_SSDT_SIG "SSDT" /* Secondary System Description Table */ #define IPMI_ACPI_SBST_SIG "SBST" /* Smart Battery Specification Table */ #define IPMI_ACPI_SPIC_SIG "SPIC" /* IOSAPIC table */ #define IPMI_ACPI_BOOT_SIG "BOOT" /* Boot table */ #define IPMI_ACPI_SPMI_SIG "SPMI" /* Service Processor Management Interface */ /* RSDP checksums */ #define IPMI_ACPI_RSDP_CHECKSUM_LENGTH 20 #define IPMI_ACPI_RSDP_XCHECKSUM_LENGTH 36 fiid_template_t tmpl_acpi_rsdp_descriptor = /* Root System Descriptor Pointer */ { /* ACPI signature, contains "RSD PTR " */ { 64, "signature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* To make sum of struct == 0 */ { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM identification */ { 48, "oem_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Must be 0 for 1.0, 2 for 2.0 */ { 8, "revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 32-bit physical address of RSDT */ { 32, "rsdt_physical_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* XSDT Length in bytes including hdr */ { 32, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 64-bit physical address of XSDT */ { 64, "xsdt_physical_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Checksum of entire table */ { 8, "extended_checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Reserved field must be 0 */ { 24, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_acpi_table_hdr = { /* ACPI signature (4 ASCII characters) */ { 32, "signature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Length of table, in bytes, including header */ { 32, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* ACPI Specification minor version # */ { 8, "revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* To make sum of entire table == 0 */ { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM identification */ { 48, "oem_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM table identification */ { 64, "oem_table_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM revision number */ { 32, "oem_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* ASL compiler vendor ID */ { 32, "asl_compiler_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* ASL compiler revision number */ { 32, "asl_compiler_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_acpi_spmi_table_descriptor = { /* `SPMI'. Signature for the Service Processor Management Interface Table. */ { 32, "signature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Length, in bytes, of the entire Service Processor Management Interface Table. */ { 32, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 5 */ { 8, "revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Entire table must sum to zero. */ { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM ID. Per ACPI specification. An OEM-supplied string that identifies the OEM. */ { 48, "oemid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For the Service Processor Management Interface Table, the table ID is the manufacturer model ID (assigned by the OEM identified by "OEM ID"). */ { 64, "oem_table_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM revision of Service Processor Management Interface Table for supplied the given OEM Table ID. Per ACPI, this is "An OEM-supplied revision number. Larger numbers are assumed to be newer revisions." */ { 32, "oem_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Vendor ID of utility that created the table. For the tables containing Definition Blocks, this is the ID for the ASL Compiler. */ { 32, "creator_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Revision of utility that created the table. For the tables containing Definition Blocks, this is the revision for the ASL Compiler. */ { 32, "creator_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Indicates the type of IPMI interface: 0 Reserved 1 Keyboard Controller Style (KCS) 2 Server Management Interface Chip (SMIC) 3 Block Transfer (BT) 4 SMBus System Interface (SSIF) 5-255 Reserved */ { 8, "interface_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be 01h to be compatible with any software that implements previous versions of this spec. */ { 8, "ipmi_legacy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Identifies the IPMI specification revision, in BCD format, to which the interface was designed. The first byte holds the most significant digits, while second byte holds the least significant digits of the revision, e.g. a value of 0x0150 indicates the interface is compatible with IPMI version v1.5. */ /* {16, "specification_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, */ { 8, "specification_revision.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_revision.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Interrupt type(s) used by the interface: [0] - SCI triggered through GPE (use 0b for SSIF) 0 = not supported 1 = supported */ { 1, "interrupt_type.sci_triggered_thru_gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [1] - I/O APIC/SAPIC interrupt (Global System Interrupt) */ { 1, "interrupt_type.io_apic_sapic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:2] - Reserved (must be 0) */ { 6, "interrupt_type.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The bit assignment of the SCI interrupt within the GPEx_STS register of a GPE described if the FADT that the interface triggers. (Note: This field is valid only if Bit[0] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 8, "gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 00h */ { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [0] - PCI Device Flag. For PCI IPMI devices, this bit is set. For non-PCI devices, this bit is cleared. When this bit is cleared, the PCI Segment Group, Bus, Device and Function Number fields combined corresponds to the ACPI _UID value of the device whose _HID or _CID contains IPI0001 plug and play ID. _UID must be an integer. Byte 60 contains the least significant byte of the _UID value. Set to 0b for SSIF. */ { 1, "pci_device_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:1] - Reserved */ { 7, "pci_device_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The I/O APIC or I/O SAPIC Global System Interrupt used by the interface. (Note: This field is valid only if Bit[1] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 32, "global_system_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The base address of the interface register set described using the Generic Address Structure (GAS, See [ACPI 2.0] for the definition). The Address_Space_ID field in the GAS can only be of the value of 0 (System Memory), 1 (System IO), and 4 (SMBus). All other values are not permitted. For SSIF: The Address_Space_ID = 4 and the address field of the GAS holds the 7-bit slave address of the BMC on the host SMBus in the least significant byte. Note that the slave address is stored with the 7-bit slave address in the least significant 7- bits of the byte, and the most significant bit of the byte set to 0b. Register_Bit_Width = 0 Register_Bit_Offset = 0 Address_Size field = 1 (Byte access) Address = 7-bit SMBus address of BMC SSIF */ /* {96, "base_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, */ /* Address space where struct or register exists. */ { 8, "base_address.address_space_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Size in bits of given register */ { 8, "base_address.register_bit_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bit offset within the register */ { 8, "base_address.register_bit_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Must be 0 */ { 8, "base_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 64-bit address of struct or register */ { 64, "base_address.address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* for IPMI cards not located on PCI */ { 32, "uid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be null (0x00) to be compatible with any software that implements previous versions of this spec. This field is a deprecated "SPMI ID Field". Implementations based on pre-IPMI v2.0 versions of SPMI may contain a null- terminated string here. */ { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_acpi_spmi_table_descriptor_ssif = { /* `SPMI'. Signature for the Service Processor Management Interface Table. */ { 32, "signature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Length, in bytes, of the entire Service Processor Management Interface Table. */ { 32, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 5 */ { 8, "revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Entire table must sum to zero. */ { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM ID. Per ACPI specification. An OEM-supplied string that identifies the OEM. */ { 48, "oemid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For the Service Processor Management Interface Table, the table ID is the manufacturer model ID (assigned by the OEM identified by "OEM ID"). */ { 64, "oem_table_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM revision of Service Processor Management Interface Table for supplied the given OEM Table ID. Per ACPI, this is "An OEM-supplied revision number. Larger numbers are assumed to be newer revisions." */ { 32, "oem_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Vendor ID of utility that created the table. For the tables containing Definition Blocks, this is the ID for the ASL Compiler. */ { 32, "creator_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Revision of utility that created the table. For the tables containing Definition Blocks, this is the revision for the ASL Compiler. */ { 32, "creator_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Indicates the type of IPMI interface: 0 Reserved 1 Keyboard Controller Style (KCS) 2 Server Management Interface Chip (SMIC) 3 Block Transfer (BT) 4 SMBus System Interface (SSIF) 5-255 Reserved */ { 8, "interface_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be 01h to be compatible with any software that implements previous versions of this spec. */ { 8, "ipmi_legacy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Identifies the IPMI specification revision, in BCD format, to which the interface was designed. The first byte holds the most significant digits, while second byte holds the least significant digits of the revision, e.g. a value of 0x0150 indicates the interface is compatible with IPMI version v1.5. */ /* {16, "specification_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, */ { 8, "specification_revision.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_revision.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Interrupt type(s) used by the interface: [0] - SCI triggered through GPE (use 0b for SSIF) 0 = not supported 1 = supported */ { 1, "interrupt_type.sci_triggered_thru_gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [1] - I/O APIC/SAPIC interrupt (Global System Interrupt) */ { 1, "interrupt_type.io_apic_sapic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:2] - Reserved (must be 0) */ { 6, "interrupt_type.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The bit assignment of the SCI interrupt within the GPEx_STS register of a GPE described if the FADT that the interface triggers. (Note: This field is valid only if Bit[0] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 8, "gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 00h */ { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [0] - PCI Device Flag. For PCI IPMI devices, this bit is set. For non-PCI devices, this bit is cleared. When this bit is cleared, the PCI Segment Group, Bus, Device and Function Number fields combined corresponds to the ACPI _UID value of the device whose _HID or _CID contains IPI0001 plug and play ID. _UID must be an integer. Byte 60 contains the least significant byte of the _UID value. Set to 0b for SSIF. */ { 1, "pci_device_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:1] - Reserved */ { 7, "pci_device_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The I/O APIC or I/O SAPIC Global System Interrupt used by the interface. (Note: This field is valid only if Bit[1] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 32, "global_system_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The base address of the interface register set described using the Generic Address Structure (GAS, See [ACPI 2.0] for the definition). The Address_Space_ID field in the GAS can only be of the value of 0 (System Memory), 1 (System IO), and 4 (SMBus). All other values are not permitted. For SSIF: The Address_Space_ID = 4 and the address field of the GAS holds the 7-bit slave address of the BMC on the host SMBus in the least significant byte. Note that the slave address is stored with the 7-bit slave address in the least significant 7- bits of the byte, and the most significant bit of the byte set to 0b. Register_Bit_Width = 0 Register_Bit_Offset = 0 Address_Size field = 1 (Byte access) Address = 7-bit SMBus address of BMC SSIF */ /* {96, "base_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, */ /* Address space where struct or register exists. */ { 8, "base_address.address_space_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Size in bits of given register */ { 8, "base_address.register_bit_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bit offset within the register */ { 8, "base_address.register_bit_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* field = 1 (byte access) */ { 8, "base_address.address_size", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* SMBus address of BMC SSIF */ { 7, "base_address.address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Reserved */ { 57, "base_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* for IPMI cards not located on PCI */ { 32, "uid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be null (0x00) to be compatible with any software that implements previous versions of this spec. This field is a deprecated "SPMI ID Field". Implementations based on pre-IPMI v2.0 versions of SPMI may contain a null- terminated string here. */ { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_acpi_spmi_table_descriptor_pci_ipmi = { /* `SPMI'. Signature for the Service Processor Management Interface Table. */ { 32, "signature", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Length, in bytes, of the entire Service Processor Management Interface Table. */ { 32, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 5 */ { 8, "revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Entire table must sum to zero. */ { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM ID. Per ACPI specification. An OEM-supplied string that identifies the OEM. */ { 48, "oemid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* For the Service Processor Management Interface Table, the table ID is the manufacturer model ID (assigned by the OEM identified by "OEM ID"). */ { 64, "oem_table_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* OEM revision of Service Processor Management Interface Table for supplied the given OEM Table ID. Per ACPI, this is "An OEM-supplied revision number. Larger numbers are assumed to be newer revisions." */ { 32, "oem_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Vendor ID of utility that created the table. For the tables containing Definition Blocks, this is the ID for the ASL Compiler. */ { 32, "creator_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Revision of utility that created the table. For the tables containing Definition Blocks, this is the revision for the ASL Compiler. */ { 32, "creator_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Indicates the type of IPMI interface: 0 Reserved 1 Keyboard Controller Style (KCS) 2 Server Management Interface Chip (SMIC) 3 Block Transfer (BT) 4 SMBus System Interface (SSIF) 5-255 Reserved */ { 8, "interface_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be 01h to be compatible with any software that implements previous versions of this spec. */ { 8, "ipmi_legacy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Identifies the IPMI specification revision, in BCD format, to which the interface was designed. The first byte holds the most significant digits, while second byte holds the least significant digits of the revision, e.g. a value of 0x0150 indicates the interface is compatible with IPMI version v1.5. */ /* {16, "specification_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, */ { 8, "specification_revision.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "specification_revision.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Interrupt type(s) used by the interface: [0] - SCI triggered through GPE (use 0b for SSIF) 0 = not supported 1 = supported */ { 1, "interrupt_type.sci_triggered_thru_gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [1] - I/O APIC/SAPIC interrupt (Global System Interrupt) */ { 1, "interrupt_type.io_apic_sapic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:2] - Reserved (must be 0) */ { 6, "interrupt_type.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The bit assignment of the SCI interrupt within the GPEx_STS register of a GPE described if the FADT that the interface triggers. (Note: This field is valid only if Bit[0] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 8, "gpe", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 00h */ { 8, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [0] - PCI Device Flag. For PCI IPMI devices, this bit is set. For non-PCI devices, this bit is cleared. When this bit is cleared, the PCI Segment Group, Bus, Device and Function Number fields combined corresponds to the ACPI _UID value of the device whose _HID or _CID contains IPI0001 plug and play ID. _UID must be an integer. Byte 60 contains the least significant byte of the _UID value. Set to 0b for SSIF. */ { 1, "pci_device_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:1] - Reserved */ { 7, "pci_device_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The I/O APIC or I/O SAPIC Global System Interrupt used by the interface. (Note: This field is valid only if Bit[1] of the Interrupt Type field is set. Otherwise set to 00h.) */ { 32, "global_system_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The base address of the interface register set described using the Generic Address Structure (GAS, See [ACPI 2.0] for the definition). The Address_Space_ID field in the GAS can only be of the value of 0 (System Memory), 1 (System IO), and 4 (SMBus). All other values are not permitted. For SSIF: The Address_Space_ID = 4 and the address field of the GAS holds the 7-bit slave address of the BMC on the host SMBus in the least significant byte. Note that the slave address is stored with the 7-bit slave address in the least significant 7- bits of the byte, and the most significant bit of the byte set to 0b. Register_Bit_Width = 0 Register_Bit_Offset = 0 Address_Size field = 1 (Byte access) Address = 7-bit SMBus address of BMC SSIF */ /* {96, "base_address"} */ /* Address space where struct or register exists. */ { 8, "base_address.address_space_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Size in bits of given register */ { 8, "base_address.register_bit_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bit offset within the register */ { 8, "base_address.register_bit_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Must be 0 */ { 8, "base_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 64-bit address of struct or register */ { 64, "base_address.address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* PCI Segment Group Number, if the IPMI device is a PCI device. Otherwise, this field is byte 1 of a UID. See description for PCI Device Flag, above. */ { 8, "pci_segment_group_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* PCI Bus Number, if the IPMI device is a PCI device. Otherwise, this field is byte 2 of a UID. See description for PCI Device Flag, above. */ { 8, "pci_bus_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* PCI Device fields or byte 3 of a UID. Per PCI Device Flag, above. For PCI Device Flag = 1b: [4:0] - PCI Device Number: The PCI device number if the IPMI device is a PCI device. For PCI Device Flag = 0b: [7:0] - byte 3 of UID */ { 4, "pci_device_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7:5] - Reserved */ { 4, "pci_device_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* PCI Device fields or byte 4 of a UID. Per PCI Device Flag, above. For PCI Device Flag = 1b: [2:0] - PCI Function Number: The PCI function number if the IPMI device is a PCI device. */ { 3, "pci_function_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [5:3] - Reserved */ { 3, "pci_function_number.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [6] - Interrupt Flag: 0b = interrupt not supported 1b = interrupt supported */ { 1, "pci_function_number.interrupt_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* [7] - Reserved For PCI Device Flag = 0b: [7:0] - byte 4 of UID */ { 1, "pci_function_number.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* This field must always be null (0x00) to be compatible with any software that implements previous versions of this spec. This field is a deprecated "SPMI ID Field". Implementations based on pre-IPMI v2.0 versions of SPMI may contain a null- terminated string here. */ { 8, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; static uint8_t _ipmi_acpi_table_checksum (ipmi_locate_ctx_t ctx, uint8_t *buffer, size_t len); static int _ipmi_acpi_get_rsdp (ipmi_locate_ctx_t ctx, uint64_t rsdp_window_base_address, size_t rsdp_window_size, fiid_obj_t obj_acpi_rsdp_descriptor); static int _ipmi_acpi_get_table (ipmi_locate_ctx_t ctx, uint64_t table_address, char *signature, uint8_t **acpi_table, uint32_t *acpi_table_length); static int _ipmi_acpi_get_table_dev_mem (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **acpi_table, uint32_t *acpi_table_length); static int _ipmi_acpi_get_table_sysfs (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **acpi_table, uint32_t *acpi_table_length); static int _ipmi_acpi_get_firmware_table (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **sign_table_data, uint32_t *sign_table_data_length); static int _ipmi_acpi_get_spmi_table (ipmi_locate_ctx_t ctx, uint8_t interface_type, fiid_obj_t obj_acpi_spmi_table_descriptor); #define IPMI_INTERFACE_COUNT 5 static uint64_t physical_memory_size = 0; static int _ipmi_physical_address_valid (ipmi_locate_ctx_t ctx, uint64_t physical_address, size_t length) { assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); /* achu: Some buggy kernels will crash the system if the physical * address is bad. Yes, I know it's the kernel's fault, but we have * to do our best to get around it. We do so by making sure the * physical address is legit. */ #if defined(_SC_PAGESIZE) && defined(_SC_PHYS_PAGES) if (!physical_memory_size) { long pagesize, physical_pages; if ((pagesize = sysconf (_SC_PAGESIZE)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); return (-1); } if ((physical_pages = sysconf (_SC_PHYS_PAGES)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); return (-1); } physical_memory_size = pagesize * physical_pages; } if (physical_address < physical_memory_size && (physical_address + length) > physical_address && (physical_address + length) < physical_memory_size) return (1); else return (0); #else /* !(_SC_PAGESIZE && _SC_PHYS_PAGES) */ /* achu: For now we return 1. Later we can maybe read /dev/meminfo * or something. */ return (1); #endif /* !(_SC_PAGESIZE && _SC_PHYS_PAGES) */ } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_table_checksum * * PARAMETERS: * buffer - Buffer to checksum * length - Size of the buffer * * RETURNS: * 8 bit checksum of buffer. NON-ZERO = checksum failed. * * DESCRIPTION: * Computes an 8 bit checksum of the buffer(length) and returns it. * ******************************************************************************/ static uint8_t _ipmi_acpi_table_checksum (ipmi_locate_ctx_t ctx, uint8_t *buffer, size_t len) { size_t i = 0; uint8_t sum = 0; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (buffer); for (i = 0; i < len; i++) sum += buffer[i]; return (sum); } static int _ipmi_ioremap (ipmi_locate_ctx_t ctx, uint64_t physical_address, size_t physical_address_len, void **virtual_address, void **mapped_address, size_t *mapped_address_len) { uint64_t startaddress; uint32_t pad; int mem_fd = -1; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (physical_address_len); assert (virtual_address); assert (mapped_address); assert (mapped_address_len); if (!_ipmi_physical_address_valid (ctx, physical_address, physical_address_len)) return (-1); if ((mem_fd = open ("/dev/mem", O_RDONLY|O_SYNC)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } /* XXX: what is the error return for getpagesize??? */ pad = physical_address % getpagesize (); startaddress = physical_address - pad; *mapped_address_len = physical_address_len + pad; if ((*mapped_address = mmap (NULL, *mapped_address_len, PROT_READ, MAP_PRIVATE, mem_fd, startaddress)) == MAP_FAILED) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } *virtual_address = (*mapped_address) + pad; rv = 0; cleanup: /* ignore potential error, cleanup path */ close (mem_fd); return (rv); } static void _ipmi_iounmap (ipmi_locate_ctx_t ctx, void *mapped_address, size_t mapped_address_len) { assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); /* ignore potential error, void return func */ munmap (mapped_address, mapped_address_len); } static int _ipmi_get_physical_mem_data (ipmi_locate_ctx_t ctx, uint64_t physical_address, size_t length, uint8_t *data) { void *virtual_address = NULL; void *mapped_address = NULL; size_t mapped_address_len = 0; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (data); if (_ipmi_ioremap (ctx, physical_address, length, &virtual_address, &mapped_address, &mapped_address_len) < 0) return (-1); memcpy (data, virtual_address, length); _ipmi_iounmap (ctx, mapped_address, mapped_address_len); return (0); } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_rsdp * * PARAMETERS: * rsdp_window_base_address - Starting pointer for search * rsdp_window_wize - Maximum length to search * obj_acpi_rsdp_descriptor - Initialized rsdp descriptor object * * RETURN: * A return value of 0 means success. RSDP descriptor is returned * through obj_acpi_rsdp_descriptor parameter. * * DESCRIPTION: * Search a block of memory for the RSDP signature. * * NOTE: * The RSDP must be either in the first 1_k of the Extended BIOS * Data Area or between E0000 and FFFFF (ACPI 1.0 section 5.2.2; * assertion #421). * ******************************************************************************/ static int _ipmi_acpi_get_rsdp (ipmi_locate_ctx_t ctx, uint64_t rsdp_window_base_address, size_t rsdp_window_size, fiid_obj_t obj_acpi_rsdp_descriptor) { uint8_t *memdata = NULL; int acpi_rsdp_descriptor_len; size_t i; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (fiid_obj_valid (obj_acpi_rsdp_descriptor)); assert (fiid_obj_template_compare (obj_acpi_rsdp_descriptor, tmpl_acpi_rsdp_descriptor) == 1); if (!(memdata = malloc (rsdp_window_size))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if ((acpi_rsdp_descriptor_len = fiid_template_len_bytes (tmpl_acpi_rsdp_descriptor)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_get_physical_mem_data (ctx, rsdp_window_base_address, rsdp_window_size, memdata) < 0) goto cleanup; /* Search from given start address for the requested length */ for (i = 0; i < rsdp_window_size; i += IPMI_ACPI_RSDP_SCAN_STEP) { /* check RSDP signature */ if (strncmp ((char *)&memdata[i], IPMI_ACPI_RSDP_SIG, strlen (IPMI_ACPI_RSDP_SIG)) != 0) continue; /* now check the checksum */ if (!_ipmi_acpi_table_checksum (ctx, &memdata[i], IPMI_ACPI_RSDP_CHECKSUM_LENGTH)) { if (fiid_obj_set_all (obj_acpi_rsdp_descriptor, &memdata[i], acpi_rsdp_descriptor_len) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } /* check this RSDP has RSDT/XSDT */ { uint64_t val; uint8_t revision; uint64_t rsdt_xsdt_address; char *rsdt_xsdt_signature; uint8_t *rsdt_xsdt_table = NULL; uint32_t rsdt_xsdt_table_length; if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "revision", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } revision = val; if (revision < 2) { if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "rsdt_physical_address", &rsdt_xsdt_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } rsdt_xsdt_signature = IPMI_ACPI_RSDT_SIG; } else { if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "xsdt_physical_address", &rsdt_xsdt_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } rsdt_xsdt_signature = IPMI_ACPI_XSDT_SIG; } /* achu: logic of code indicates should check for == 0, not < 0 */ if (_ipmi_acpi_get_table (ctx, rsdt_xsdt_address, rsdt_xsdt_signature, &rsdt_xsdt_table, &rsdt_xsdt_table_length) == 0) { /* we found RSDT/XSDT */ free (rsdt_xsdt_table); rv = 0; goto cleanup; } free (rsdt_xsdt_table); /* This is special case because of EFI */ if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "rsdt_physical_address", &rsdt_xsdt_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } free (memdata); if (!(memdata = malloc (acpi_rsdp_descriptor_len))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } if (_ipmi_get_physical_mem_data (ctx, rsdt_xsdt_address, acpi_rsdp_descriptor_len, memdata) < 0) goto cleanup; /* check RSDP signature */ if (strncmp ((char *)memdata, IPMI_ACPI_RSDP_SIG, strlen (IPMI_ACPI_RSDP_SIG))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } /* now check the checksum */ if (_ipmi_acpi_table_checksum (ctx, memdata, IPMI_ACPI_RSDP_CHECKSUM_LENGTH) != 0) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } /* we found another RSDP */ memcpy (obj_acpi_rsdp_descriptor, memdata, acpi_rsdp_descriptor_len); } rv = 0; goto cleanup; } } cleanup: free (memdata); return (rv); } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_table * * PARAMETERS: * table_address - ACPI table physical address * signature - signature of the table * acpi_table - ACPI table in malloc'ed memory * acpi_table_length - ACPI table length * * RETURN: * A return value of 0 means success. ACPI table (including header) is * returned through acpi_table parameter. * * DESCRIPTION: * Retrieve any ACPI table (including header) pointed by table address. * ******************************************************************************/ static int _ipmi_acpi_get_table (ipmi_locate_ctx_t ctx, uint64_t table_address, char *signature, uint8_t **acpi_table, uint32_t *acpi_table_length) { uint64_t val; uint8_t table_signature_length; char *table_signature = NULL; fiid_obj_t obj_acpi_table_hdr = NULL; uint8_t *acpi_table_buf = NULL; uint32_t table_length = 0; int acpi_table_hdr_length; uint8_t *table = NULL; int len; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (signature); assert (acpi_table); assert (acpi_table_length); *acpi_table = NULL; if ((len = fiid_template_field_len_bytes (tmpl_acpi_table_hdr, "signature")) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } table_signature_length = len; if (!(table_signature = malloc (table_signature_length + 1))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } memset (table_signature, '\0', table_signature_length + 1); if ((acpi_table_hdr_length = fiid_template_len_bytes (tmpl_acpi_table_hdr)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_acpi_table_hdr = fiid_obj_create (tmpl_acpi_table_hdr))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (!(acpi_table_buf = malloc (acpi_table_hdr_length))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_get_physical_mem_data (ctx, table_address, acpi_table_hdr_length, acpi_table_buf) < 0) goto cleanup; if (fiid_obj_set_all (obj_acpi_table_hdr, acpi_table_buf, acpi_table_hdr_length) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_table_hdr); goto cleanup; } if (fiid_obj_get_data (obj_acpi_table_hdr, "signature", table_signature, table_signature_length) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_table_hdr); goto cleanup; } if (strcmp (table_signature, signature)) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_acpi_table_hdr, "length", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_table_hdr); goto cleanup; } table_length = val; if (!(table = malloc (table_length))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } memset (table, '\0', table_length); if (_ipmi_get_physical_mem_data (ctx, table_address, table_length, table) < 0) goto cleanup; if (_ipmi_acpi_table_checksum (ctx, table, table_length) != 0) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if (!(*acpi_table = malloc (table_length))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } memcpy (*acpi_table, table, table_length); *acpi_table_length = table_length; rv = 0; cleanup: free (table_signature); free (acpi_table_buf); free (table); fiid_obj_destroy (obj_acpi_table_hdr); return (rv); } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_table_sysfs * * PARAMETERS: * signature - signature of the table * table_instance - Which instance of the firmware table * acpi_table - ACPI table in malloc'ed memory * acpi_table_length - ACPI table length * * RETURN: * A return value of 0 means success. ACPI table (including header) is * returned through acpi_table parameter. * * DESCRIPTION: * Retrieve any ACPI table (including header) from sysfs. * ******************************************************************************/ static int _ipmi_acpi_get_table_sysfs (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **acpi_table, uint32_t *acpi_table_length) { int sysfs_acpi_fd = -1; int rv = -1; static char const sysfs_fw_acpi_tables[] = "/sys/firmware/acpi/tables"; char *sysfs_path; int instance_length; int sysfs_path_length; uint8_t *acpi_table_buf = NULL; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (signature); assert (table_instance >= 0); assert (acpi_table); assert (acpi_table_length); *acpi_table = NULL; instance_length = (table_instance + 1) / 10 + 1; sysfs_path_length = strlen (sysfs_fw_acpi_tables) + strlen(signature) + \ instance_length + 2; if (!(sysfs_path = malloc (sysfs_path_length))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); return (-1); } snprintf (sysfs_path, sysfs_path_length, "%s/%s%d", sysfs_fw_acpi_tables, signature, table_instance + 1); if ((sysfs_acpi_fd = open (sysfs_path, O_RDONLY)) < 0) { if (table_instance > 0) goto cleanup; /* If there is only 1 instance of a table on the system, the sysfs file will be the same as the signature, (e.g. /sys/firmware/acpi/tables/SPMI). If there are multiple instances of the same table, they will have the instance # as a suffix (e.g.: /sys/firmware/acpi/tables/SPMI1 & /sys/firmware/acpi/tables/SPMI2). So, for table_instance == 0, we need to try both */ snprintf (sysfs_path, sysfs_path_length, "%s/%s", sysfs_fw_acpi_tables, signature); if ((sysfs_acpi_fd = open (sysfs_path, O_RDONLY)) < 0) goto cleanup; } if ((*acpi_table_length = lseek (sysfs_acpi_fd, 0, SEEK_END)) == -1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if ((lseek (sysfs_acpi_fd, 0, SEEK_SET)) == -1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if (!(acpi_table_buf = malloc (*acpi_table_length))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } if ((read (sysfs_acpi_fd, acpi_table_buf, *acpi_table_length)) != *acpi_table_length) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } *acpi_table = acpi_table_buf; rv = 0; cleanup: close (sysfs_acpi_fd); return rv; } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_firmware_table_dev_mem * * PARAMETERS: * signature - ACPI signature for firmware table header * table_instance - Which instance of the firmware table * acpi_table - Initialized with malloc'ed ACPI firmware table data * acpi_table_length - ACPI table DATA length * * RETURN: * return (0) for success. ACPI table (including header) is * returned through the signed_table_data parameter. * * DESCRIPTION: * Top level call for any ACPI firmware table by table signature string. * It gets table header and data from RSDT/XSDT. * ******************************************************************************/ static int _ipmi_acpi_get_table_dev_mem (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **acpi_table, uint32_t *acpi_table_length) { uint64_t val; int acpi_table_hdr_length; int acpi_rsdp_descriptor_length; fiid_obj_t obj_acpi_rsdp_descriptor = NULL; uint64_t rsdt_xsdt_address; char *rsdt_xsdt_signature; uint8_t revision; uint8_t *rsdt_xsdt_table = NULL; uint32_t rsdt_xsdt_table_length; uint8_t *rsdt_xsdt_table_data; uint32_t rsdt_xsdt_table_data_length; unsigned int acpi_table_count; fiid_obj_t obj_table = NULL; uint64_t table_address; unsigned int signature_table_count; unsigned int i; int rv = -1; fiid_template_t tmpl_table_address_32 = { { 32, "table_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_table_address_64 = { { 64, "table_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; #if defined(__arm__) || defined (__aarch64__) return (-1); #endif assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (signature); assert (acpi_table); assert (acpi_table_length); *acpi_table = NULL; if ((acpi_table_hdr_length = fiid_template_len_bytes (tmpl_acpi_table_hdr)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_acpi_rsdp_descriptor = fiid_obj_create (tmpl_acpi_rsdp_descriptor))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if ((acpi_rsdp_descriptor_length = fiid_template_len_bytes (tmpl_acpi_rsdp_descriptor)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_acpi_get_rsdp (ctx, IPMI_ACPI_LO_RSDP_WINDOW_BASE, IPMI_ACPI_LO_RSDP_WINDOW_SIZE, obj_acpi_rsdp_descriptor) < 0) { if (_ipmi_acpi_get_rsdp (ctx, IPMI_ACPI_HI_RSDP_WINDOW_BASE, IPMI_ACPI_HI_RSDP_WINDOW_SIZE, obj_acpi_rsdp_descriptor) < 0) goto cleanup; } if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "revision", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } revision = val; if (revision < 2) { if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "rsdt_physical_address", &rsdt_xsdt_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } rsdt_xsdt_signature = IPMI_ACPI_RSDT_SIG; } else { if (FIID_OBJ_GET (obj_acpi_rsdp_descriptor, "xsdt_physical_address", &rsdt_xsdt_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_rsdp_descriptor); goto cleanup; } rsdt_xsdt_signature = IPMI_ACPI_XSDT_SIG; } if (_ipmi_acpi_get_table (ctx, rsdt_xsdt_address, rsdt_xsdt_signature, &rsdt_xsdt_table, &rsdt_xsdt_table_length) < 0) goto cleanup; rsdt_xsdt_table_data_length = rsdt_xsdt_table_length - acpi_table_hdr_length; rsdt_xsdt_table_data = (rsdt_xsdt_table + acpi_table_hdr_length); if (revision < 2) acpi_table_count = rsdt_xsdt_table_data_length / 4; else acpi_table_count = rsdt_xsdt_table_data_length / 8; acpi_table = NULL; acpi_table_length = 0; for (i = 0, signature_table_count = 0; i < acpi_table_count; i++) { fiid_field_t *tmpl_table_address = NULL; int len_table; if (revision < 2) tmpl_table_address = &tmpl_table_address_32[0]; else tmpl_table_address = &tmpl_table_address_64[0]; if (!(obj_table = fiid_obj_create (tmpl_table_address))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if ((len_table = fiid_template_len_bytes (tmpl_table_address)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_table, (rsdt_xsdt_table_data + (i * 4)), len_table) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_table); goto cleanup; } if (FIID_OBJ_GET (obj_table, "table_address", &table_address) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_table); goto cleanup; } fiid_obj_destroy (obj_table); if (_ipmi_acpi_get_table (ctx, table_address, signature, acpi_table, acpi_table_length) < 0) continue; signature_table_count++; if (signature_table_count == table_instance) break; free (acpi_table); acpi_table = NULL; acpi_table_length = 0; } if (!acpi_table) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } rv = 0; cleanup: free (rsdt_xsdt_table); fiid_obj_destroy (obj_table); fiid_obj_destroy (obj_acpi_rsdp_descriptor); return (rv); } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_firmware_table * * PARAMETERS: * signature - ACPI signature for firmware table header * table_instance - Which instance of the firmware table * sign_table_data - Initialized with malloc'ed ACPI firmware table data * sign_table_data_length - ACPI table DATA length * * RETURN: * return (0) for success. ACPI table (including header) is returned * through the signed_table_data parameter. * * DESCRIPTION: * Top level call for any ACPI firmware table by table signature string. * ******************************************************************************/ static int _ipmi_acpi_get_firmware_table (ipmi_locate_ctx_t ctx, char *signature, unsigned int table_instance, uint8_t **sign_table_data, uint32_t *sign_table_data_length) { uint8_t *acpi_table = NULL; uint32_t acpi_table_length; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (signature); assert (sign_table_data); assert (sign_table_data_length); *sign_table_data = NULL; if ((_ipmi_acpi_get_table_sysfs (ctx, signature, table_instance, &acpi_table, &acpi_table_length) != 0)) { if ((_ipmi_acpi_get_table_dev_mem (ctx, signature, table_instance, &acpi_table, &acpi_table_length) != 0)) LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if (!acpi_table) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } *sign_table_data_length = acpi_table_length; if (!(*sign_table_data = malloc (*sign_table_data_length))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } memcpy (*sign_table_data, acpi_table, *sign_table_data_length); rv = 0; cleanup: free (acpi_table); return (rv); } /******************************************************************************* * * FUNCTION: * _ipmi_acpi_get_spmi_table * * PARAMETERS: * interface_type - Type of interface to look for (KCS, SSIF, SMIC, BT) * acpi_table_firmware - Initialized ACPI firmware table * * RETURN: * return (0) for success. ACPI SPMI table (including header) is * returned through the obj_acpi_spmi_table_descriptor parameter. * * DESCRIPTION: * Get SPMI table for the given interface type. * ******************************************************************************/ static int _ipmi_acpi_get_spmi_table (ipmi_locate_ctx_t ctx, uint8_t interface_type, fiid_obj_t obj_acpi_spmi_table_descriptor) { uint64_t val; uint8_t table_interface_type; uint8_t *table_data = NULL; uint32_t table_data_length = 0; uint32_t copy_length; unsigned int instance; int acpi_spmi_table_descriptor_len; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (fiid_obj_valid (obj_acpi_spmi_table_descriptor)); assert (fiid_obj_template_compare (obj_acpi_spmi_table_descriptor, tmpl_acpi_spmi_table_descriptor) == 1); for (instance = 0; instance < IPMI_INTERFACE_COUNT; instance++) { if (_ipmi_acpi_get_firmware_table (ctx, IPMI_ACPI_SPMI_SIG, instance, &table_data, &table_data_length) < 0) continue; #if 0 printf ("__DEBUG__ instance = %d, signature = [%s] found\n", instance, IPMI_ACPI_SPMI_SIG); #endif if ((acpi_spmi_table_descriptor_len = fiid_template_len_bytes (tmpl_acpi_spmi_table_descriptor)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (acpi_spmi_table_descriptor_len < table_data_length) copy_length = acpi_spmi_table_descriptor_len; else copy_length = table_data_length; #if 0 if (copy_length != table_data_length) printf ("_DEBUG_ table_data_length=%d, template_length=%d," " tmpl_acpi_spmi_table_descriptor length is too short\n", table_data_length, acpi_spmi_table_descriptor_len); #endif if (fiid_obj_set_all (obj_acpi_spmi_table_descriptor, table_data, copy_length) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } free (table_data); table_data = NULL; table_data_length = 0; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "interface_type", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } table_interface_type = val; if (table_interface_type == interface_type) { rv = 0; break; } } cleanup: free (table_data); return (rv); } int ipmi_locate_acpi_spmi_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { fiid_obj_t obj_acpi_spmi_table_descriptor = NULL; struct ipmi_locate_info linfo; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } memset (&linfo, '\0', sizeof (struct ipmi_locate_info)); linfo.interface_type = type; if (type == IPMI_INTERFACE_SSIF) { strncpy (linfo.driver_device, IPMI_DEFAULT_I2C_DEVICE, IPMI_LOCATE_PATH_MAX); linfo.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } linfo.locate_driver_type = IPMI_LOCATE_DRIVER_ACPI; if (!(obj_acpi_spmi_table_descriptor = fiid_obj_create (tmpl_acpi_spmi_table_descriptor))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (_ipmi_acpi_get_spmi_table (ctx, type, obj_acpi_spmi_table_descriptor) < 0) goto cleanup; /* I don't see any reason to perform this check now -- Anand Babu */ /* This field must always be 01h to be compatible with any software that implements previous versions of this spec. */ #if 0 { uint8_t ipmi_legacy; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, tmpl_acpi_spmi_table_descriptor, "ipmi_legacy", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } ipmi_legacy = val; if (ipmi_legacy != 1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } } #endif /* IPMI version */ { uint8_t ipmi_version_major, ipmi_version_minor; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "specification_revision.major", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } ipmi_version_major = val; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "specification_revision.minor", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } ipmi_version_minor = val; linfo.ipmi_version_major = ipmi_version_major; linfo.ipmi_version_minor = ipmi_version_minor; } /* Interface type - KCS, SMIC, SSIF, BT */ { uint8_t interface_type; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "interface_type", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } interface_type = val; if (!IPMI_INTERFACE_TYPE_VALID (interface_type)) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } linfo.interface_type = interface_type; } /* Address space id (memory mapped, IO mapped, SMBus) and IO base address */ { uint8_t address_space_id; uint64_t base_address; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "base_address.address_space_id", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } address_space_id = val; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "base_address.address", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } base_address = val; switch (address_space_id) { case IPMI_ACPI_ADDRESS_SPACE_ID_SYSTEM_MEMORY: { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY; linfo.driver_address = base_address; break; } case IPMI_ACPI_ADDRESS_SPACE_ID_SYSTEM_IO: { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; linfo.driver_address = base_address; break; } case IPMI_ACPI_ADDRESS_SPACE_ID_SMBUS: { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SMBUS; linfo.driver_address = base_address; break; } default: LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } } /* Register spacing */ { uint8_t register_bit_width; if (FIID_OBJ_GET (obj_acpi_spmi_table_descriptor, "base_address.register_bit_width", &val) < 0) { LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM (ctx, obj_acpi_spmi_table_descriptor); goto cleanup; } register_bit_width = val; linfo.register_spacing = (register_bit_width / 8); } memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); rv = 0; cleanup: fiid_obj_destroy (obj_acpi_spmi_table_descriptor); return (rv); } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-defaults.c0000644002055400205540000000654613527331637023211 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/driver/ipmi-kcs-driver.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "freeipmi-portability.h" /* achu: Used to be in ipmi-smic-api.h, but that is now removed. */ #define IPMI_SMIC_SMS_IO_BASE_DEFAULT 0x0CA9 int ipmi_locate_defaults_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { struct ipmi_locate_info linfo; if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if ((type != IPMI_INTERFACE_KCS && type != IPMI_INTERFACE_SMIC && type != IPMI_INTERFACE_SSIF) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } memset (&linfo, '\0', sizeof (struct ipmi_locate_info)); linfo.interface_type = type; if (type == IPMI_INTERFACE_SSIF) { strncpy (linfo.driver_device, IPMI_DEFAULT_I2C_DEVICE, IPMI_LOCATE_PATH_MAX); linfo.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } linfo.locate_driver_type = IPMI_LOCATE_DRIVER_DEFAULTS; switch (type) { case IPMI_INTERFACE_KCS: linfo.ipmi_version_major = 1; linfo.ipmi_version_minor = 5; linfo.interface_type = IPMI_INTERFACE_KCS; linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; linfo.driver_address = IPMI_KCS_SMS_IO_BASE_DEFAULT; linfo.register_spacing = 1; break; case IPMI_INTERFACE_SMIC: linfo.ipmi_version_major = 1; linfo.ipmi_version_minor = 5; linfo.interface_type = IPMI_INTERFACE_SMIC; linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; linfo.driver_address = IPMI_SMIC_SMS_IO_BASE_DEFAULT; linfo.register_spacing = 1; break; case IPMI_INTERFACE_SSIF: linfo.ipmi_version_major = 1; linfo.ipmi_version_minor = 5; linfo.interface_type = IPMI_INTERFACE_SSIF; linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SMBUS; linfo.driver_address = IPMI_SSIF_SMBUS_SLAVE_ADDRESS; linfo.register_spacing = 1; break; default: /* Should not reach */ assert (0); } memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); return (0); } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-defs.h0000644002055400205540000000176113527331637022322 0ustar00achuachu00000000000000 #ifndef IPMI_LOCATE_DEFS_H #define IPMI_LOCATE_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include #include "freeipmi/locate/ipmi-locate.h" #define IPMI_LOCATE_CTX_MAGIC 0xF1CD9376 struct ipmi_locate_ctx { uint32_t magic; int errnum; }; #endif /* IPMI_LOCATE_DEFS_H */ freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-dmidecode.c0000644002055400205540000003637613527331637023323 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "freeipmi-portability.h" #define DEFAULT_MEM_DEV "/dev/mem" typedef uint8_t fipmiu8; typedef uint16_t fipmiu16; typedef uint32_t fipmiu32; /* * These macros help us solve problems on systems that don't support * non-aligned memory access. This isn't a big issue IMHO, since the tools * in this package are intended mainly for Intel and compatible systems, * which are little-endian and support non-aligned memory access. Anyway, * you may use the following defines to control the way it works: * - Define BIGENDIAN on big-endian systems. * - Define ALIGNMENT_WORKAROUND if your system doesn't support * non-aligned memory access. In this case, we use a slower, but safer, * memory access method. * You most probably will have to define none or the two of them. */ #ifdef BIGENDIAN typedef struct { fipmiu32 h; fipmiu32 l; } fipmiu64; #else typedef struct { fipmiu32 l; fipmiu32 h; } fipmiu64; #endif #ifdef ALIGNMENT_WORKAROUND static fipmiu64 U64 (fipmiu32 low, fipmiu32 high) { fipmiu64 self; self.l=low; self.h=high; return (self); } #endif #ifdef ALIGNMENT_WORKAROUND # ifdef BIGENDIAN # define WORD(x) (fipmiu16)((x)[1]+((x)[0]<<8)) # define DWORD(x) (fipmiu32)((x)[3]+((x)[2]<<8)+((x)[1]<<16)+((x)[0]<<24)) # define QWORD(x) (U64 (DWORD (x+4), DWORD (x))) # else /* BIGENDIAN */ # define WORD(x) (fipmiu16)((x)[0]+((x)[1]<<8)) # define DWORD(x) (fipmiu32)((x)[0]+((x)[1]<<8)+((x)[2]<<16)+((x)[3]<<24)) # define QWORD(x) (U64 (DWORD (x), DWORD (x+4))) # endif /* BIGENDIAN */ #else /* ALIGNMENT_WORKAROUND */ #define WORD(x) (fipmiu16)(*(const fipmiu16 *)(x)) #define DWORD(x) (fipmiu32)(*(const fipmiu32 *)(x)) #define QWORD(x) (*(const fipmiu64 *)(x)) #endif /* ALIGNMENT_WORKAROUND */ struct dmi_header { fipmiu8 type; fipmiu8 length; fipmiu16 handle; }; static int _myread (ipmi_locate_ctx_t ctx, int fd, fipmiu8 *buf, size_t count) { ssize_t r = 1; size_t r2 = 0; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (buf); while (r2 != count && r != 0) { if ((r = read (fd, buf + r2, count - r2)) < 0) { if (errno != EINTR) { /* ignore potential error, error path */ close (fd); LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); return (-1); } } else r2 += r; } if (r2 != count) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); /* ignore potential error, error path */ close (fd); return (-1); } return (0); } static int _checksum (const fipmiu8 *buf, size_t len) { fipmiu8 sum = 0; size_t a; assert (buf); for (a = 0; a < len; a++) sum += buf[a]; return (sum == 0); } /* * Copy a physical memory chunk into a memory buffer. * This function allocates memory. */ static void * _mem_chunk (ipmi_locate_ctx_t ctx, size_t base, size_t len, const char *devmem) { void *p = NULL; void *rv = NULL; int fd = -1; #ifdef HAVE_MMAP size_t mmoffset; void *mmp; #ifdef _SC_PAGESIZE long pagesize; #endif #endif assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (devmem); if ((fd = open (devmem, O_RDONLY)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (!(p = malloc (len))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } #ifdef HAVE_MMAP #ifdef _SC_PAGESIZE { if ((pagesize = sysconf (_SC_PAGESIZE)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } mmoffset = base % pagesize; } #else mmoffset = base % getpagesize (); #endif /* _SC_PAGESIZE */ /* * Please note that we don't use mmap() for performance reasons here, * but to workaround problems many people encountered when trying * to read from /dev/mem using regular read() calls. */ if ((mmp = mmap (0, mmoffset + len, PROT_READ, MAP_SHARED, fd, base - mmoffset)) == MAP_FAILED) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto try_read; } memcpy (p, (fipmiu8 *) mmp + mmoffset, len); rv = p; /* ignore potential error, just return result */ munmap (mmp, mmoffset + len); goto cleanup; try_read: #endif /* HAVE_MMAP */ if (lseek (fd, base, SEEK_SET) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (_myread (ctx, fd, p, len) < 0) goto cleanup; rv = p; cleanup: /* ignore potential error, cleanup path */ close (fd); if (!rv) free (p); return (rv); } static int _dmi_table (ipmi_locate_ctx_t ctx, fipmiu32 base, fipmiu16 len, fipmiu16 num, fipmiu16 ver, const char *devmem, ipmi_interface_type_t type, struct ipmi_locate_info *locate_info) { fipmiu8 *buf = NULL; fipmiu8 *data; int i = 0; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); if (!(buf = _mem_chunk (ctx, base, len, devmem))) return (-1); data = buf; while ((i < num) && ((data + sizeof (struct dmi_header)) <= (buf + len))) { fipmiu8 *next; struct dmi_header *h = (struct dmi_header *) data; /* look for the next handle */ next = data + h->length; while ((next - buf + 1 < len) && (next[0] != 0 || next[1] != 0)) next++; next += 2; if ((next - buf <= len) && (h->type == 38) && (h->length >= 0x10)) { locate_info->locate_driver_type = IPMI_LOCATE_DRIVER_DMIDECODE; locate_info->interface_type = data[0x04]; locate_info->ipmi_version_major = data[0x05] >> 4; locate_info->ipmi_version_minor = data[0x05] & 0x0F; if (locate_info->interface_type == IPMI_INTERFACE_SSIF) { locate_info->driver_address = data[0x06] >> 1; locate_info->address_space_id = IPMI_ADDRESS_SPACE_ID_SMBUS; locate_info->register_spacing = 0x01; strncpy (locate_info->driver_device, IPMI_DEFAULT_I2C_DEVICE, IPMI_LOCATE_PATH_MAX); locate_info->driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } else { fipmiu8 *ptr = NULL; fipmiu8 lsb; uint64_t base_addr; fipmiu64 address; ptr = data + 0x08; if (h->length < 0x12) lsb = 0; else lsb = (data[0x10] >> 5) & 1; address = QWORD (ptr); base_addr = address.h; base_addr = (base_addr << 32) | ((address.l & ~1) | lsb); if (address.l & 1) { locate_info->address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; locate_info->driver_address = base_addr; } else { locate_info->address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY; locate_info->driver_address = base_addr; } switch (data[0x10] >> 6) { case 0x0: locate_info->register_spacing = 0x01; break; case 0x1: locate_info->register_spacing = 0x04; break; case 0x2: locate_info->register_spacing = 0x10; break; } } #if 0 printf ("ipmi_locate_info.ipmi_version_major = [%d]\n", locate_info->ipmi_version_major); printf ("ipmi_locate_info.ipmi_version_minor = [%d]\n", locate_info->ipmi_version_minor); printf ("ipmi_locate_info.locate_driver_type = [%d]\n", locate_info->locate_driver_type); printf ("ipmi_locate_info.interface_type = [%d]\n", locate_info->interface_type); printf ("ipmi_locate_info.driver_device = [%s]\n", locate_info->driver_device); printf ("ipmi_locate_info.address_space_id = [%X]\n", locate_info->address_space_id); printf ("ipmi_locate_info.driver_address = [%X]\n", locate_info->driver_address); printf ("ipmi_locate_info.register_spacing = [%X]\n", locate_info->register_spacing); #endif if (locate_info->interface_type == type) { rv = 0; goto cleanup; } } data = next; i++; } cleanup: free (buf); return (rv); } static int _smbios_decode (ipmi_locate_ctx_t ctx, fipmiu8 *buf, const char *devmem, ipmi_interface_type_t type, struct ipmi_locate_info *locate_info) { assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (devmem); assert (IPMI_INTERFACE_TYPE_VALID (type)); assert (locate_info); if (_checksum (buf, buf[0x05]) && (memcmp (buf + 0x10, "_DMI_", 5) == 0) && _checksum (buf + 0x10, 0x0F)) return (_dmi_table (ctx, DWORD (buf + 0x18), WORD (buf + 0x16), WORD (buf + 0x1C), (buf[0x06] << 8) + buf[0x07], devmem, type, locate_info)); return (-1); } static int _legacy_decode (ipmi_locate_ctx_t ctx, fipmiu8 *buf, const char *devmem, ipmi_interface_type_t type, struct ipmi_locate_info *locate_info) { assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (devmem); assert (IPMI_INTERFACE_TYPE_VALID (type)); assert (locate_info); if (_checksum (buf, 0x0F)) return (_dmi_table (ctx, DWORD (buf + 0x08), WORD (buf + 0x06), WORD (buf + 0x0C), ((buf[0x0E] & 0xF0) << 4) + (buf[0x0E] & 0x0F), devmem, type, locate_info)); return (-1); } int ipmi_locate_dmidecode_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { struct ipmi_locate_info locate_info; int found = 0; size_t fp; FILE *efi_systab; const char *filename; char linebuf[64]; fipmiu8 *buf = NULL; int rv = -1; static char const sys_fw_dmi_tables[] = "/sys/firmware/dmi/tables/DMI"; struct stat st; if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } memset (&locate_info, '\0', sizeof (struct ipmi_locate_info)); /* if DMI firmware exist, use it and do not dig into /dev/mem */ if (!(stat (sys_fw_dmi_tables, &st))) { rv = _dmi_table (ctx, 0, st.st_size, st.st_size / 4, 0, sys_fw_dmi_tables, type, &locate_info); if (!(rv)) memcpy (info, &locate_info, sizeof (struct ipmi_locate_info)); return (rv); } /* * Linux up to 2.6.6-rc2: /proc/efi/systab * Linux 2.6.6-rc3 and up: /sys/firmware/efi/systab */ if (((efi_systab = fopen (filename = "/proc/efi/systab", "r"))) || ((efi_systab = fopen (filename = "/sys/firmware/efi/systab", "r")))) { fp = 0; while ((fgets (linebuf, sizeof (linebuf) - 1, efi_systab))) { char *addr = memchr (linebuf, '=', strlen (linebuf)); *(addr++) = '\0'; if (!strcmp (linebuf, "SMBIOS")) { char *endptr; errno = 0; fp = strtoul (addr, &endptr, 0); if (errno || ((endptr[0] != '\0') && (endptr[0] != 0x0a))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); return (-1); } } } fclose (efi_systab); if (!fp) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); return (-1); } if (!(buf = _mem_chunk (ctx, fp, 0x20, DEFAULT_MEM_DEV))) return (-1); if (!(_smbios_decode (ctx, buf, DEFAULT_MEM_DEV, type, &locate_info) < 0)) found++; free (buf); } #if !defined(__arm__) && !defined(__aarch64__) else { if (!(buf = _mem_chunk (ctx, 0xF0000, 0x10000, DEFAULT_MEM_DEV))) return (-1); for (fp = 0; fp <= 0xFFF0; fp += 16) { if ((memcmp (buf + fp, "_SM_", 4) == 0) && (fp <= 0xFFE0)) { if (!(_smbios_decode (ctx, buf + fp, DEFAULT_MEM_DEV, type, &locate_info) < 0)) { found++; break; } fp += 16; } else if (memcmp (buf + fp, "_DMI_", 5) == 0) { if (!(_legacy_decode (ctx, buf + fp, DEFAULT_MEM_DEV, type, &locate_info) < 0)) { found++; break; } } } free (buf); } #endif if (found) { memcpy (info, &locate_info, sizeof (struct ipmi_locate_info)); rv = 0; } else LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); return (rv); } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-pci.c0000644002055400205540000002075213527331637022150 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "freeipmi-portability.h" #ifdef UNTESTED /* __linux */ /* this code uses the /proc filesystem */ #define PCI_CLASS_REVISION 0x08 /* High 24 bits are class, low 8 revision */ #define PCI_REVISION_ID 0x08 /* Revision ID */ #define PCI_CLASS_PROG 0x09 /* Reg. Level Programming Interface */ #define PCI_CLASS_DEVICE 0x0a /* Device class */ #define PCI_BASE_ADDRESS_SPACE 0x01 /* 0 = memory, 1 = I/O */ #define PCI_BASE_ADDRESS_SPACE_IO 0x01 #define PCI_BASE_ADDRESS_SPACE_MEMORY 0x00 #define PCI_BASE_ADDRESS_MEM_TYPE_MASK 0x06 #define PCI_BASE_ADDRESS_MEM_TYPE_32 0x00 /* 32 bit address */ #define PCI_BASE_ADDRESS_MEM_TYPE_1M 0x02 /* Below 1M [obsolete] */ #define PCI_BASE_ADDRESS_MEM_TYPE_64 0x04 /* 64 bit address */ #define PCI_BASE_ADDRESS_MEM_PREFETCH 0x08 /* prefetchable? */ #define PCI_BASE_ADDRESS_MEM_MASK (~0x0fUL) #define PCI_BASE_ADDRESS_IO_MASK (~0x03UL) #define IPMI_CLASS 0xc #define IPMI_SUBCLASS 0x7 #define PCI_SLOT(devfn) (((devfn) >> 3) & 0x1f) #define PCI_FUNC(devfn) ((devfn) & 0x07) enum pci_address_space_type { past_io = PCI_BASE_ADDRESS_SPACE_IO, past_memory = PCI_BASE_ADDRESS_SPACE_MEMORY, }; typedef enum pci_address_space_type pci_address_space_type_t; enum pci_address_mem_type { pamt_32 = PCI_BASE_ADDRESS_MEM_TYPE_32, pamt_1M = PCI_BASE_ADDRESS_MEM_TYPE_1M, pamt_64 = PCI_BASE_ADDRESS_MEM_TYPE_64, }; typedef enum pci_address_mem_type pci_address_mem_type_t; struct pci_class_regs { uint8_t pci_class; uint8_t pci_subclass; uint8_t pci_prog_interface; uint8_t pci_rev; }; typedef struct pci_class_regs pci_class_regs_t; /* pci_get_regs - read the file under /proc that is the image of a device's PCI registers */ /* bus = bus number from devices file */ /* dev = device number from devices file */ /* func = function number from devices file */ /* pregs = pointer to structure where to store the important registers */ /* return : pregs if successful, otherwise NULL */ static int _pci_get_regs (ipmi_locate_ctx_t ctx, uint8_t bus, uint8_t dev, uint16_t func, pci_class_regs_t* pregs) { FILE* fp = NULL; size_t n; char fname[128]; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (pregs); snprintf (fname, sizeof (fname), "/proc/bus/pci/%02x/%02x.%d", bus, dev, func); if (!(fp = fopen (fname, "r"))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (fseek (fp, PCI_CLASS_REVISION, SEEK_SET) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if ((n = fread (&(pregs->pci_rev), 1, 1, fp)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (n != 1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if ((n = fread (&(pregs->pci_prog_interface), 1, 1, fp)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (n != 1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if ((n = fread (&(pregs->pci_subclass), 1, 1, fp)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (n != 1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } if ((n = fread (&(pregs->pci_class), 1, 1, fp)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } if (n != 1) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } rv = 0; cleanup: fclose (fp); return (rv); } #if (__WORDSIZE == 32) #define FORMAT_X64 "%Lx" #elif (__WORDSIZE == 64) #define FORMAT_X64 "%lx" #endif /* pci_get_dev_info - probe PCI for IPMI interrupt number and register base */ /* type = which interface (KCS, SMIC, BT) */ /* pinfo = pointer to information structure filled in by this function */ int ipmi_locate_pci_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { unsigned dfn; unsigned vendor; unsigned bus; unsigned dev; unsigned func; unsigned irq; uint64_t base_address[6]; char buf[512]; FILE* fp_devices; int items; unsigned int i; struct ipmi_locate_info linfo; int rv = -1; if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } memset (&linfo, '\0', sizeof (struct ipmi_locate_info)); linfo.interface_type = type; if (type == IPMI_INTERFACE_SSIF) { strncpy (linfo.driver_device, IPMI_DEFAULT_I2C_DEVICE, IPMI_LOCATE_PATH_MAX); linfo.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } if (!(fp_devices = fopen ("/proc/bus/pci/devices", "r"))) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } while (fgets (buf, sizeof (buf), fp_devices) != NULL) { pci_class_regs_t regs; items = sscanf (buf, "%x %x %x " FORMAT_X64 " " FORMAT_X64 " " FORMAT_X64 " " FORMAT_X64 " " FORMAT_X64 " " FORMAT_X64, &dfn, &vendor, &irq, &base_address[0], &base_address[1], &base_address[2], &base_address[3], &base_address[4], &base_address[5]); linfo.intr_num = (uint16_t)irq; if (items != 9) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } bus = dfn >> 8U; dev = PCI_SLOT (dfn & 0xff); func = PCI_FUNC (dfn & 0xff); if (_pci_get_regs (ctx, bus, dev, func, ®s) < 0) goto cleanup; if (regs.pci_class != IPMI_CLASS || regs.pci_subclass != IPMI_SUBCLASS || regs.pci_prog_interface + 1 != type) continue; for (i = 0; i < 6; i++) { if (base_address[i] == 0 || base_address[i] == ~0) continue; switch (base_address[i] & PCI_BASE_ADDRESS_SPACE) { case past_io: linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY; linfo.driver_address = base_address[i] & ~PCI_BASE_ADDRESS_IO_MASK; memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); rv = 0; goto cleanup; case past_memory: linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; linfo.driver_address = base_address[i] & ~PCI_BASE_ADDRESS_MEM_MASK; memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); rv = 0; goto cleanup; } } } cleanup: if (fp_devices) fclose (fp_devices); return (rv); } #else /* __linux */ int ipmi_locate_pci_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); return (-1); } #endif /* !__linux */ freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-smbios.c0000644002055400205540000004273713527331637022700 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* SMBIOS Reference Specification: map area between 000f0000 and 000fffff. The IPMI Entry Structure begins on a 16-byte boundary, with a 4 byte "_SM_" signature. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "freeipmi/fiid/fiid.h" #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/driver/ipmi-ssif-driver.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "freeipmi-portability.h" /* SMBIOS Reference Specification: map area between 000f0000 and 000fffff. The IPMI Entry Structure begins on a 16-byte boundary, with a 4 byte "_SM_" signature. */ #define IPMI_SMBIOS_ENTRY_CSUM_OFFSET 0x4 #define IPMI_SMBIOS_ENTRY_LEN_OFFSET 0x5 #define IPMI_SMBIOS_ENTRY_ANCHOR_OFFSET 0x10 #define IPMI_SMBIOS_ENTRY_ANCHOR_CSUM_OFFSET 0x15 #define IPMI_SMBIOS_IPMI_DEV_INFO_SIG 38 #define IPMI_SMBIOS_IPMI_DEV_INFO_TYPE_OFFSET 0x4 #define IPMI_SMBIOS_AREA_START 0x000f0000 #define IPMI_SMBIOS_AREA_END 0x000fffff #define IPMI_SMBIOS_AREA_LEN ((IPMI_SMBIOS_AREA_END - IPMI_SMBIOS_AREA_START) + 1) #define IPMI_SMBIOS_AREA_ALIGN 16 #define IPMI_SMBIOS_ENTRY_TLEN_OFFSET 0x16 #define IPMI_SMBIOS_ENTRY_PTR_OFFSET 0x18 #define IPMI_SMBIOS_DEV_INFO_LEN_OFFSET 0x1 #define IPMI_SMBIOS_IPMI_DEV_INFO_VER_OFFSET 0x5 #define IPMI_SMBIOS_IPMI_DEV_INFO_I2C_OFFSET 0x6 #define IPMI_SMBIOS_IPMI_DEV_INFO_NVSTOR_OFFSET 0x7 #define IPMI_SMBIOS_IPMI_DEV_INFO_ADDRESS_OFFSET 0x8 #define IPMI_SMBIOS_IPMI_DEV_INFO_MODIFIER_OFFSET 0x10 #define IPMI_SMBIOS_LSB_BIT 4 #define IPMI_SMBIOS_REGSPACING_SHIFT 6 #define IPMI_SMBIOS_REGSPACING_MASK 0x3 #define IPMI_SMBIOS_INTINFO_PRESENT_BIT 3 #define IPMI_SMBIOS_INTINFO_POLARITY_BIT 1 #define IPMI_SMBIOS_INTINFO_TRIGGER_BIT 0 #define IPMI_SMBIOS_DEV_INFO_INTNUM_OFFSET 0x11 #define IPMI_SMBIOS_REGISTER_SPACING_1BYTE_BOUND 0x00 #define IPMI_SMBIOS_REGISTER_SPACING_4BYTE_BOUND 0x01 #define IPMI_SMBIOS_REGISTER_SPACING_16BYTE_BOUND 0x02 #define IPMI_SMBIOS_REGISTER_SPACING_RESERVED 0x03 fiid_template_t tmpl_smbios_ipmi_device_info_record = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, /* IPMI Device Information structure indicator. value = 38 (Note this number is given in decimal) */ { 8, "type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Length of the structure, a minimum of 10h (for full IPMI address description, this is a minimum of 12h) */ { 8, "length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "handle", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Baseboard Management Controller (BMC) interface type, see Table C1-2, Interface Type field values. */ { 8, "interface_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Somewhat mis-named. Actually identifies the IPMI Specification Version, in BCD format, to which the BMC was designed. Bits 7:4 hold the most significant digit of the version, while bits 3:0 hold the least significant bits, e.g. a value of 15h indicates version 1.5. */ { 4, "ipmi_spec_revision.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "ipmi_spec_revision.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* The slave address on the I2C bus of this BMC. */ { 8, "i2c_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bus id of the NV storage device. If no storage device exists for this BMC, the field is set to 0FFh. */ { 8, "nv_storage_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "base_address.io_mapped_or_mem_mapped", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Identifies the base address (either memory- mapped or I/O) of the BMC. If the least- significant bit of the field is a 1, the address is in I/O space; otherwise, the address is memory-mapped. Refer to the IPMI Interface Specification for usage details. */ { 15, "base_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 0 - Interrupt Trigger Mode. 1b = level, 0b = edge. */ { 1, "interrupt_trigger_mode", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 1 - Interrupt Polarity. 1b = active high, 0b = active low. */ { 1, "interrupt_polarity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 2 - reserved. Return as 0b. */ { 1, "base_address_modifier_interrupt_info.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Interrupt Info Identifies the type and polarity of the interrupt associated with the IPMI system interface, if any. bit 3 - 1b = interrupt info specified 0b = interrupt info not specified */ { 1, "interrupt_info", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 4 - LS-bit for addresses 0b = Address bit 0 = 0b 1b = Address bit 0 = 1b */ { 1, "ls_bit_for_addresses", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 5 - reserved. Return as 0b. */ { 1, "base_address_modifier_interrupt_info.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* bit 7:6 - Register spacing 00b = interface registers are on successive byte boundaries 01b = interface registers are on 32- bit boundaries 10b = interface registers are on 16- byte boundaries 11b = reserved */ { 2, "register_spacing", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Interrupt number for IPMI System Interface. 00h = unspecified / unsupported */ { 8, "interrupt_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; static int _ipmi_smbios_register_spacing (uint8_t register_spacing_boundary, uint8_t *register_spacing) { assert (register_spacing); assert (register_spacing_boundary == IPMI_SMBIOS_REGISTER_SPACING_1BYTE_BOUND || register_spacing_boundary == IPMI_SMBIOS_REGISTER_SPACING_4BYTE_BOUND || register_spacing_boundary == IPMI_SMBIOS_REGISTER_SPACING_16BYTE_BOUND || register_spacing_boundary == IPMI_SMBIOS_REGISTER_SPACING_RESERVED); switch (register_spacing_boundary) { case IPMI_SMBIOS_REGISTER_SPACING_1BYTE_BOUND: *register_spacing = 0x01; return (0); case IPMI_SMBIOS_REGISTER_SPACING_4BYTE_BOUND: *register_spacing = 0x04; return (0); case IPMI_SMBIOS_REGISTER_SPACING_16BYTE_BOUND: *register_spacing = 0x10; return (0); case IPMI_SMBIOS_REGISTER_SPACING_RESERVED: default: *register_spacing = 0; /* Should not reach */ SET_ERRNO (EINVAL); return (-1); } } /* SMBIOS Reference Specification: map area between 000f0000 and 000fffff. The IPMI Entry Structure begins on a 16-byte boundary, with a 4 byte "_SM_" signature. */ /* _is_ipmi_entry ARGUMENTS: sigp = points to start of purported SMBIOS entry structure RETURNS: 0 = not really a SMBIOS entry structure 1 = yes, a real SMBIOS entry structure */ static int _is_ipmi_entry (ipmi_locate_ctx_t ctx, uint8_t* sigp) { static const char smbios_entry_sig[4] = { '_', 'S', 'M', '_' }; static const char smbios_entry_anchor[5] = { '_', 'D', 'M', 'I', '_' }; uint32_t csum_computed; #if 0 /* remove compiler warning, unsure how used */ uint8_t csum_given; #endif uint8_t entry_len; uint8_t* bp; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (sigp); if (memcmp (sigp, smbios_entry_sig, sizeof (smbios_entry_sig)) != 0) return (0); entry_len = sigp[IPMI_SMBIOS_ENTRY_LEN_OFFSET]; #if 0 /* remove compiler warning, unsure how used */ csum_given = sigp[IPMI_SMBIOS_ENTRY_CSUM_OFFSET]; #endif csum_computed = 0; for (bp = sigp; bp < sigp + entry_len; bp++) csum_computed = (csum_computed + (*bp)) % (1 << CHAR_BIT); if (memcmp (sigp + IPMI_SMBIOS_ENTRY_ANCHOR_OFFSET, smbios_entry_anchor, sizeof (smbios_entry_anchor)) != 0) return (0); #if 0 /* remove compiler warning, unsure how used */ csum_given = sigp[IPMI_SMBIOS_ENTRY_ANCHOR_CSUM_OFFSET]; #endif csum_computed = 0; for (bp = sigp + IPMI_SMBIOS_ENTRY_ANCHOR_CSUM_OFFSET; bp < sigp + entry_len; bp++) csum_computed = (csum_computed + (*bp)) % (1 << CHAR_BIT); return (1); } /* _is_ipmi_dev_info ARGUMENTS: type = which interface (KCS, SMIC, BT) dev_info_p = points to start of purported IPMI device info structure RETURNS: 0 = not a IPMI device info structure for TYPE 1 = yes, IPMI device info structure for TYPE */ static int _is_ipmi_dev_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, uint8_t* dev_info_p) { assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (IPMI_INTERFACE_TYPE_VALID (type)); assert (dev_info_p); if (*dev_info_p != IPMI_SMBIOS_IPMI_DEV_INFO_SIG) return (0); if (dev_info_p[IPMI_SMBIOS_IPMI_DEV_INFO_TYPE_OFFSET] != type) return (0); return (1); } /* _map_physmem ARGUMENTS: physaddress = physical address to access len = length of area to access startp = place to store pointer to unmap (caller responsible for unmapping) totallen = length of area to unmap RETURNS: pointer to area of physical memory at physmem */ static uint8_t* _map_physmem (ipmi_locate_ctx_t ctx, uint32_t physaddress, size_t len, void** startp, size_t* totallen) { uint32_t startaddress; uint32_t pad; int mem_fd = -1; uint8_t *rv = NULL; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (startp); assert (totallen); if ((mem_fd = open ("/dev/mem", O_RDONLY|O_SYNC)) < 0) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } pad = physaddress % sysconf (_SC_PAGESIZE); startaddress = physaddress - pad; *totallen = len + pad; if ((*startp = mmap (NULL, *totallen, PROT_READ, MAP_PRIVATE, mem_fd, startaddress)) == MAP_FAILED) { LOCATE_ERRNO_TO_LOCATE_ERRNUM (ctx, errno); goto cleanup; } rv = (uint8_t*)(*startp) + pad; cleanup: /* ignore potential error, cleanup path */ close (mem_fd); return (rv); } /* _copy_ipmi_dev_info ARGUMENTS: type = which interface (KCS, SMIC, BT) RETURNS: pointer to the device info structure in heap (caller responsible for freeing */ static uint8_t* _copy_ipmi_dev_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type) { uint8_t* result = NULL; void* map_entry = NULL; size_t map_entry_len; uint8_t* pmem_entry; uint8_t* rv = NULL; uint8_t* sigp; int flag; assert (ctx); assert (ctx->magic == IPMI_LOCATE_CTX_MAGIC); assert (IPMI_INTERFACE_TYPE_VALID (type)); if (!(pmem_entry = _map_physmem (ctx, IPMI_SMBIOS_AREA_START, IPMI_SMBIOS_AREA_LEN, &map_entry, &map_entry_len))) goto cleanup; for (sigp = pmem_entry; sigp - pmem_entry < IPMI_SMBIOS_AREA_LEN; sigp += IPMI_SMBIOS_AREA_ALIGN) { if ((flag = _is_ipmi_entry (ctx, sigp)) < 0) goto cleanup; if (flag) { uint16_t s_table_len; uint8_t* pmem_table; void* map_table; size_t map_table_len; uint8_t* dev_info_p; size_t size; uint8_t* var_info_p; s_table_len = *(uint16_t*)(sigp + IPMI_SMBIOS_ENTRY_TLEN_OFFSET); if (!(pmem_table = _map_physmem (ctx, *(uint32_t*)(sigp + IPMI_SMBIOS_ENTRY_PTR_OFFSET), s_table_len, &map_table, &map_table_len))) goto cleanup; dev_info_p = pmem_table; size = dev_info_p[IPMI_SMBIOS_DEV_INFO_LEN_OFFSET]; while (dev_info_p - pmem_table < s_table_len) { if ((flag = _is_ipmi_dev_info (ctx, type, dev_info_p)) < 0) goto cleanup; if (flag) { if (!(result = malloc (size))) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_OUT_OF_MEMORY); goto cleanup; } memcpy (result, dev_info_p, size); rv = result; break; } var_info_p = dev_info_p + size; while (var_info_p[0] != 0 || var_info_p[1] != 0) var_info_p++; dev_info_p = var_info_p + 2; size = dev_info_p[IPMI_SMBIOS_DEV_INFO_LEN_OFFSET]; } /* ignore potential error, just return result */ munmap (map_table, map_table_len); } if (rv) break; } LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); cleanup: /* ignore potential error, just return result */ if (map_entry) munmap (map_entry, map_entry_len); return (rv); } /* ipmi_locate_smbios_get_device_info ARGUMENTS: ctx = ipmi locate context type = which interface (KCS, SMIC, BT) pinfo = pointer to information structure filled in by this function RETURNS: 0 on success, -1 on error */ int ipmi_locate_smbios_get_device_info (ipmi_locate_ctx_t ctx, ipmi_interface_type_t type, struct ipmi_locate_info *info) { uint8_t* bufp = NULL; uint8_t version; uint64_t address; uint64_t strobed; struct ipmi_locate_info linfo; #if defined(__arm__) || defined(__aarch64__) return (-1); #else if (!ctx || ctx->magic != IPMI_LOCATE_CTX_MAGIC) { ERR_TRACE (ipmi_locate_ctx_errormsg (ctx), ipmi_locate_ctx_errnum (ctx)); return (-1); } if (!IPMI_INTERFACE_TYPE_VALID (type) || !info) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_PARAMETERS); return (-1); } memset (&linfo, '\0', sizeof (struct ipmi_locate_info)); linfo.interface_type = type; if (type == IPMI_INTERFACE_SSIF) { strncpy (linfo.driver_device, IPMI_DEFAULT_I2C_DEVICE, IPMI_LOCATE_PATH_MAX); linfo.driver_device[IPMI_LOCATE_PATH_MAX - 1] = '\0'; } if (!(bufp = _copy_ipmi_dev_info (ctx, type))) goto cleanup; linfo.locate_driver_type = IPMI_LOCATE_DRIVER_SMBIOS; version = bufp[IPMI_SMBIOS_IPMI_DEV_INFO_VER_OFFSET]; linfo.ipmi_version_major = (version >> 4) & 0xf; linfo.ipmi_version_minor = version & 0xf; linfo.interface_type = bufp[IPMI_SMBIOS_IPMI_DEV_INFO_TYPE_OFFSET]; if (linfo.interface_type != type) { LOCATE_SET_ERRNUM (ctx, IPMI_LOCATE_ERR_SYSTEM_ERROR); goto cleanup; } strobed = address = *(uint64_t*)(bufp+IPMI_SMBIOS_IPMI_DEV_INFO_ADDRESS_OFFSET); if (bufp[IPMI_SMBIOS_DEV_INFO_LEN_OFFSET] >= IPMI_SMBIOS_IPMI_DEV_INFO_MODIFIER_OFFSET) { uint8_t modifier; uint8_t lsb; int register_spacing_boundary; modifier = bufp[IPMI_SMBIOS_IPMI_DEV_INFO_MODIFIER_OFFSET]; lsb = (modifier >> IPMI_SMBIOS_LSB_BIT) & 1; strobed = (strobed & ~1) | lsb; register_spacing_boundary = (modifier >> IPMI_SMBIOS_REGSPACING_SHIFT) & IPMI_SMBIOS_REGSPACING_MASK; if (_ipmi_smbios_register_spacing (register_spacing_boundary, &linfo.register_spacing) < 0) goto cleanup; } if (linfo.interface_type == IPMI_INTERFACE_SSIF) { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SMBUS; linfo.driver_address = bufp[IPMI_SMBIOS_IPMI_DEV_INFO_I2C_OFFSET]; } else { if ((address & 1) != 0) { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_IO; linfo.driver_address = strobed; } else { linfo.address_space_id = IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY; linfo.driver_address = strobed; } } free (bufp); memcpy (info, &linfo, sizeof (struct ipmi_locate_info)); return (0); cleanup: free (bufp); return (-1); #endif } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-trace.h0000644002055400205540000000376513527331637022505 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LOCATE_TRACE_H #define IPMI_LOCATE_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #include "ipmi-locate-util.h" #define LOCATE_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_locate_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define LOCATE_ERRNO_TO_LOCATE_ERRNUM(__ctx, __errno) \ do { \ locate_set_locate_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define LOCATE_FIID_OBJECT_ERROR_TO_LOCATE_ERRNUM(__ctx, __obj) \ do { \ locate_set_locate_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #endif /* IPMI_LOCATE_TRACE_H */ freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-util.c0000644002055400205540000000475013527331637022352 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/locate/ipmi-locate.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-locate-defs.h" #include "ipmi-locate-trace.h" #include "ipmi-locate-util.h" #include "freeipmi-portability.h" void locate_set_locate_errnum_by_errno (ipmi_locate_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_LOCATE_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_LOCATE_ERR_SUCCESS; break; case EPERM: ctx->errnum = IPMI_LOCATE_ERR_PERMISSION; break; case EACCES: ctx->errnum = IPMI_LOCATE_ERR_PERMISSION; break; case ENOMEM: ctx->errnum = IPMI_LOCATE_ERR_OUT_OF_MEMORY; break; case EINVAL: ctx->errnum = IPMI_LOCATE_ERR_INTERNAL_ERROR; break; default: ctx->errnum = IPMI_LOCATE_ERR_SYSTEM_ERROR; } } void locate_set_locate_errnum_by_fiid_object (ipmi_locate_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_LOCATE_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_LOCATE_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_LOCATE_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_LOCATE_ERR_SYSTEM_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_LOCATE_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_LOCATE_ERR_INTERNAL_ERROR; } } freeipmi-1.6.4/libfreeipmi/locate/ipmi-locate-util.h0000644002055400205540000000235413527331637022355 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LOCATE_UTIL_H #define IPMI_LOCATE_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/locate/ipmi-locate.h" #include "ipmi-locate-defs.h" void locate_set_locate_errnum_by_errno (ipmi_locate_ctx_t ctx, int __errno); void locate_set_locate_errnum_by_fiid_object (ipmi_locate_ctx_t ctx, fiid_obj_t obj); #endif /* IPMI_LOCATE_UTIL_H */ freeipmi-1.6.4/libfreeipmi/payload/0000755002055400205540000000000013527342542017201 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/payload/ipmi-sol-payload.c0000644002055400205540000002061413527331637022533 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/payload/ipmi-sol-payload.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-fill-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" fiid_template_t tmpl_sol_payload_data = { /* 0h ack only packet */ { 4, "packet_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 0h information pakcet. No request packet being ack'd or nack'd */ { 4, "packet_ack_nack_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "accepted_character_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "operation_status", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 524288 = 65536 * 8 = 2^16 * 8, b/c ipmi_payload_len is 2 bytes */ { 524288, "character_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sol_payload_data_remote_console_to_bmc = { /* 0h ack only packet */ { 4, "packet_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 0h information pakcet. No request packet being ack'd or nack'd */ { 4, "packet_ack_nack_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "accepted_character_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flush_outbound", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flush_inbound", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "drop_dcd_dsr", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "cts_pause", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "generate_break", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "ring_wor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "nack", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 524288 = 65536 * 8 = 2^16 * 8, b/c ipmi_payload_len is 2 bytes */ { 524288, "character_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sol_payload_data_bmc_to_remote_console = { /* 0h ack only packet */ { 4, "packet_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 0h information pakcet. No request packet being ack'd or nack'd */ { 4, "packet_ack_nack_sequence_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "accepted_character_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "break_condition", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "transmit_overrun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sol_deactivating", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "character_transfer_unavailable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "nack", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* 524288 = 65536 * 8 = 2^16 * 8, b/c ipmi_payload_len is 2 bytes */ { 524288, "character_data", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; int fill_sol_payload_data (uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t operation_status, const void *character_data, unsigned int character_data_len, fiid_obj_t obj_sol_payload) { if (!fiid_obj_valid (obj_sol_payload)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_sol_payload, tmpl_sol_payload_data) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_sol_payload); FILL_FIID_OBJ_SET (obj_sol_payload, "packet_sequence_number", packet_sequence_number); FILL_FIID_OBJ_SET (obj_sol_payload, "reserved1", 0); FILL_FIID_OBJ_SET (obj_sol_payload, "packet_ack_nack_sequence_number", packet_ack_nack_sequence_number); FILL_FIID_OBJ_SET (obj_sol_payload, "reserved2", 0); FILL_FIID_OBJ_SET (obj_sol_payload, "accepted_character_count", accepted_character_count); FILL_FIID_OBJ_SET (obj_sol_payload, "operation_status", operation_status); if (character_data && character_data_len) FILL_FIID_OBJ_SET_DATA (obj_sol_payload, "character_data", character_data, character_data_len); return (0); } int fill_sol_payload_data_remote_console_to_bmc (uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t flush_outbound, uint8_t flush_inbound, uint8_t drop_dcd_dsr, uint8_t cts_pause, uint8_t generate_break, uint8_t ring_wor, uint8_t nack, const void *character_data, unsigned int character_data_len, fiid_obj_t obj_sol_payload) { if (!IPMI_SOL_FLUSH_OUTBOUND_VALID (flush_outbound) || !IPMI_SOL_FLUSH_INBOUND_VALID (flush_inbound) || !IPMI_SOL_ASSERT_DCD_DSR_VALID (drop_dcd_dsr) || !IPMI_SOL_ASSERT_CTS_VALID (cts_pause) || !IPMI_SOL_GENERATE_BREAK_VALID (generate_break) || !IPMI_SOL_ASSERT_RI_VALID (ring_wor) || !IPMI_SOL_NACK_VALID (nack) || !fiid_obj_valid (obj_sol_payload)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_sol_payload, tmpl_sol_payload_data_remote_console_to_bmc) < 0) { ERRNO_TRACE (errno); return (-1); } FILL_FIID_OBJ_CLEAR (obj_sol_payload); FILL_FIID_OBJ_SET (obj_sol_payload, "packet_sequence_number", packet_sequence_number); FILL_FIID_OBJ_SET (obj_sol_payload, "reserved1", 0); FILL_FIID_OBJ_SET (obj_sol_payload, "packet_ack_nack_sequence_number", packet_ack_nack_sequence_number); FILL_FIID_OBJ_SET (obj_sol_payload, "reserved2", 0); FILL_FIID_OBJ_SET (obj_sol_payload, "accepted_character_count", accepted_character_count); FILL_FIID_OBJ_SET (obj_sol_payload, "flush_outbound", flush_outbound); FILL_FIID_OBJ_SET (obj_sol_payload, "flush_inbound", flush_inbound); FILL_FIID_OBJ_SET (obj_sol_payload, "drop_dcd_dsr", drop_dcd_dsr); FILL_FIID_OBJ_SET (obj_sol_payload, "cts_pause", cts_pause); FILL_FIID_OBJ_SET (obj_sol_payload, "generate_break", generate_break); FILL_FIID_OBJ_SET (obj_sol_payload, "ring_wor", ring_wor); FILL_FIID_OBJ_SET (obj_sol_payload, "nack", nack); FILL_FIID_OBJ_SET (obj_sol_payload, "reserved3", 0); if (character_data && character_data_len) FILL_FIID_OBJ_SET_DATA (obj_sol_payload, "character_data", character_data, character_data_len); return (0); } freeipmi-1.6.4/libfreeipmi/record-format/0000755002055400205540000000000013527342542020314 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/record-format/ipmi-cipher-suite-record-format.c0000644002055400205540000000550113527331637026563 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/record-format/ipmi-cipher-suite-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" fiid_template_t tmpl_cipher_suite_record_header = { { 6, "record_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cipher_suite_record = { { 6, "record_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "cipher_suite_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "authentication_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "authentication_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "integrity_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "integrity_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "confidentiality_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "confidentiality_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_oem_cipher_suite_record = { { 6, "record_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem_cipher_suite_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_iana", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "authentication_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "authentication_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "integrity_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "integrity_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "confidentiality_algorithm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "confidentiality_algorithm_tag_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/record-format/ipmi-fru-dimmspd-record-format.c0000644002055400205540000010752013527331637026415 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-information-record-format.c,v 1.13 2010-07-28 21:31:25 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/record-format/ipmi-fru-dimmspd-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" /* From "Annex K: Serial Presence Detect (SPD) for DDR3 SDRAM Modules" * and * "Annex L: Serial Presence Detect (SPD) for DDR4 SDRAM Modules" * * Released by JEDEC */ fiid_template_t tmpl_fru_dimm_spd_ddr_header = { /* Byte 0: Number of Bytes Used/ Number of Bytes in SPD Device / CRC Coverage */ { 4, "spd_bytes_used", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "spd_bytes_total", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "crc_coverage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 1: SPD Revision (X.Y = encoding_level.additions_level) */ { 4, "additions_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 3: Key Byte / Module Type */ { 4, "module_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dimm_spd_ddr3_record = { /* Byte 0: Number of Bytes Used/ Number of Bytes in SPD Device / CRC Coverage */ { 4, "spd_bytes_used", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "spd_bytes_total", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "crc_coverage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 1: SPD Revision (X.Y = encoding_level.additions_level) */ { 4, "additions_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 3: Key Byte / Module Type */ { 4, "module_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 4: SDRAM Density and Banks */ /* in megabits */ { 4, "total_sdram_capacity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "bank_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 5: SDRAM Addressing */ { 3, "column_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "row_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 6: Module Nominal Voltage, VDD */ { 1, "module_minimum_nominal_voltage.1_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_minimum_nominal_voltage.1_35", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_minimum_nominal_voltage.1_25", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 7: Module Organization */ { 3, "sdram_device_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "number_of_ranks", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 8: Module Memory Bus Width */ { 3, "primary_bus_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "bus_width_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserve6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 9: Fine Timebase (FTB) Dividend / Divisor */ { 4, "fine_timebase_divisor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "fine_timebase_dividend", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 10: Medium Timebase (MTB) Dividend */ { 8, "medium_timebase_dividend", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 11: Medium Timebase (MTB) Divisor */ { 8, "medium_timebase_divisor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 12: SDRAM Minimum Cycle Time (t_ck min) (MTB Units) */ { 8, "minimum_sdram_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 14-15: CAS Latencies Supported */ { 16, "cas_latencies_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 16: Minimum CAS Latency Time (t_aa min) (MTB Units) */ { 8, "minimum_sdram_cas_latency_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 17: Minimum Write Recovery Time (t_wr min) (MTB Units) */ { 8, "minimum_write_recovery_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 18: Minimum RAS# to CAS# Delay Time (t_rcd min) */ { 8, "minimum_ras_to_cas_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 19: Minimum Row Active to Row Active Delay Time (t_rrd min) (MTB Units) */ { 8, "minimum_row_active_to_row_active_delay", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 20: Minimum Row Precharge Delay Time (t_rp min) (MTB Units) */ { 8, "minimum_row_precharge_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 21: Upper Nibbles for t_ras and t_rc */ { 4, "t_ras_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "t_rc_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 22: Minimum Active to Precharge Delay Time (t_ras min), LSB (MTB Units) */ { 8, "minimum_active_to_precharge_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 23: Minimum Active to Active/Refresh Delay Time (t_rc min), LSB (MTB Units) */ { 8, "minimum_active_to_active_refresh_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 24-25: Minimum Refresh Recovery Delay Time (t_rfc min) (MTB Units) */ { 16, "minimum_refresh_recovery_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 26: Minimum Internal Write to Read Command Delay Time (t_wtr min) (MTB Units) */ { 8, "internal_write_to_read_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 27: Minimum Internal Read to Precharge Command Delay Time (t_rtp min) (MTB Units) */ { 8, "internal_read_to_precharge_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 28: Upper Nibble for t_faw */ { 4, "t_faw_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 29: Minimum Four Active Window Delay Time (t_faw min), LSB (MTB Units) */ { 8, "minimum_four_active_window_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 30: SDRAM Optional Features */ { 1, "rzq_6_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "rzq_7_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "reserved9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "dll_off_mode_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 31: SDRAM Thermal and Refresh Options */ { 1, "extended_temperature_range", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "extended_temperature_refresh_rate", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "auto_self_refresh", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "on_die_thermal_sensor_readout", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "partial_array_self_refresh", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 32: Module Thermal Sensor */ { 7, "thermal_sensor_accuracy", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "thermal_sensor_incorporated", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 33: SDRAM Device Type */ { 2, "signal_loading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "die_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sdram_device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 34: Fine Offset for SDRAM Minimum Cycle Time (tCKmin) */ { 8, "fine_offset_for_sdram_minimum_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 35: Fine Offset for Minimum CAS Latency Time (tAAmin) */ { 8, "fine_offset_for_minimum_cas_latency_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 36: Fine Offset for Minimum RAS# to CAS# Delay Time (tRCDmin) */ { 8, "fine_offset_for_minimum_ras_to_cas_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 37: Minimum Row Precharge Delay Time (tRPmin) */ { 8, "minimum_row_precharge_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 38: Fine Offset for Minimum Active to Active/Refresh Delay Time (tRCmin) */ { 8, "fine_offset_for_minimum_active_to_active_refresh_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 39-59: Reserved */ { 168, "reserved12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 60-116: Module-Specific Section */ { 456, "module_specific_section", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 117-125: Unique Module ID */ { 7, "number_of_continuation_codes_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "module_manufacturing_location", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "module_manufacturing_date.year", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ { 8, "module_manufacturing_date.week", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ { 32, "module_serial_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 126-127: SPD Cyclical Redundancy Code (CRC) */ { 16, "crc", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 128-145: Module Part Number */ { 144, "module_part_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* ASCII */ /* Bytes 146-147: Module Revision Code */ { 16, "module_revision_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 148-149: DRAM Manufacturer ID Code */ { 7, "number_of_continuation_codes_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 150-175: Manufacturer's Specific Data */ { 208, "manufacturer_specific_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 176-255: Manufacturer's Specific Data */ { 640, "open_for_customer_use", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dimm_spd_ddr4_record = { /* Byte 0: Number of Serial PD Bytes Written / SPD Device Size / CRC Coverage */ { 4, "spd_bytes_used", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "spd_bytes_total", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 1: SPD Revision */ { 4, "additions_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "encoding_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 2: Key Byte / DRAM Device Type */ { 8, "dram_device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 3: Key Byte / Module Type */ { 4, "module_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 4: SDRAM Density and Banks */ /* in megabits */ { 4, "total_sdram_capacity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "bank_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "bank_group_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 5: SDRAM Addressing */ { 3, "column_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "row_address_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 6: SDRAM Package Type */ { 2, "signal_loading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "die_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sdram_package_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 7: SDRAM Optional Features */ { 4, "maximum_activate_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "maximum_activate_window", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 8: SDRAM Thermal and Refresh Options */ { 8, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 9: Other SDRAM Optional Features */ { 6, "reserved7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "post_package_repair", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 10: Reserved */ { 8, "reserved8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 11: Module Nominal Voltage, VDD */ { 1, "module_nominal_voltage.dram_vdd.1_2_operable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_nominal_voltage.dram_vdd.1_2_endurant", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_nominal_voltage.dram_vdd.TBD1_operable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_nominal_voltage.dram_vdd.TBD1_endurant", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_nominal_voltage.dram_vdd.TBD2_operable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "module_nominal_voltage.dram_vdd.TBD2_endurant", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 12: Module Organization */ { 3, "sdram_device_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "number_of_package_ranks_per_dimm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 13: Module Memory Bus Width */ { 3, "primary_bus_width", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "bus_width_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserve11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 14: Module Thermal Sensor */ { 7, "reserved12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "thermal_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 15: Extended module type */ { 4, "extended_base_module_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 16: Reserved */ { 8, "reserved14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 17: Timebases */ { 2, "fine_timebase", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "medium_timebase", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved15", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 18: SDRAM Minimum Cycle Time (t_ckavg min) */ { 8, "minimum_sdram_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 19: SDRAM Maximum Cycle Time (t_ckavg max) */ { 8, "maximum_sdram_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 20-23: CAS Latencies Supported */ { 32, "cas_latencies_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 24: Minimum CAS Latency Time (t_aa min) */ { 8, "minimum_sdram_cas_latency_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 25: Minimum RAS to CAS Delay Time (t_rcd min) */ { 8, "minimum_sdram_ras_to_cas_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 26: Minimum Row Precharge Delay Time (t_rp min) */ { 8, "minimum_row_precharge_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 27: Upper Nibbles for t_ras min and t_rc min */ { 4, "t_ras_min_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "t_rc_min_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 28: Minimum Active to Precharge Delay Time (t_ras min), LSB */ { 8, "minimum_active_to_precharge_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 29: Minimum Active to Active/Refresh Delay Time (t_rc min), LSB */ { 8, "minimum_active_to_active_refresh_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 30-31: Minimum Refresh Recovery Delay Time (t_RFC1 min) */ { 16, "minimum_refresh_recovery_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 32-33: Minimum Refresh Recovery Delay Time (t_RFC2 min) */ { 16, "minimum_refresh_recovery_delay_time1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 34-35: Minimum Refresh Recovery Delay Time (t_RFC4 min) */ { 16, "minimum_refrsh_recovery_delay_time4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 36: Minimum Four Activate Window Time (t_FAW min), Most Significant Nibble */ { 4, "tfaw_msn", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved16", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 37: Minimum Four Activate Window Time (t_FAW min), Least Significant Byte */ { 8, "minimum_four_activate_window_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 38: Minimum Activate to Activate Delay Time (t_RRD_S min), different bank group */ { 8, "minimum_active_to_active_refresh_time_different_bank_group", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 39: Minimum Activate to Activate Delay Time (t_RRD_S min), same bank group */ { 8, "minimum_active_to_active_refresh_time_same_bank_group", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 40: Minimum CAS to CAS Delay Time (t_CCD_L min), same bank group */ { 8, "minimum_cas_to_cas_time_same_bank_group", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 41-59: Reserved */ { 152, "reserved17", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 60-77: Connector to SDRAM Bit Mapping */ { 144, "connector_to_sdram_bit_mapping", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 78-116: Reserved */ { 312, "reserved18", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 117: Fine Offset for Minimum CAS to CAS Delay Time (t_CCD_L min), same bank group */ { 8, "fine_offset_for_minimum_cas_to_cas_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 118: Fine Offset for Minimum Activate to Activate Delay Time (t_RRD_L min), same bank group */ { 8, "fine_offset_for_minimum_activate_to_activate_delay_time_same_bank_group", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 119: Fine Offset for Minimum Activate to Activate Delay Time (t_RRD_S min), different bank group */ { 8, "fine_offset_for_minimum_activate_to_activate_delay_time_different_bank_group", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 120: Fine Offset for Minimum Activate to Activate/Refresh Delay Time (t_RC min) */ { 8, "fine_offset_for_minimum_activate_to_activate_refresh_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 121: Fine Offset for Minimum Row Precharge Delay Time (t_RP min) */ { 8, "fine_offset_for_minimum_row_precharge_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 122: Fine Offset for Minimum RAS to CAS Delay Time (t_RCD min) */ { 8, "fine_offset_for_minimum_ras_to_cas_delay_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 123: Fine Offset for Minimum CAS Latency Time (t_AA min) */ { 8, "fine_offset_for_minimum_cas_latency_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 124: Fine Offset for SDRAM Maximum Cycle Time (t_CKAVG max) */ { 8, "fine_offset_for_sdram_maximum_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 125: Fine Offset for SDRAM Minimum Cycle Time (t_CKAVG min) */ { 8, "fine_offset_for_sdram_minimum_cycle_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 126-127: CRC for Base Configuration Section */ { 16, "crc", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 128-255: Module Specific Parameters */ { 1024, "module_specific_sections", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 256-319: Reserved */ { 512, "reserved19", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 320-383: Manufacturing Information */ /* Bytes 320-321: Module Manufacturer's ID Code */ { 7, "number_of_continuation_codes_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_module_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 322: Module Manufacturing Location */ { 8, "module_manufacturing_location", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 323-324: Module Manufacturing Date */ { 8, "module_manufacturing_date.year", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ { 8, "module_manufacturing_date.week", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ /* Bytes 325-328: Module Serial Number */ { 32, "module_serial_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 329-348: Module Part Number */ { 160, "module_part_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* ASCII */ /* Byte 349: Module Revision Code */ { 16, "module_revision_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 350-351: DRAM Manufacturer's ID Code */ { 7, "number_of_continuation_codes_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_dram_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 352: DRAM Stepping */ { 8, "dram_stepping", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 353-381: Module Manufacturer's Specific Data */ { 232, "module_manufacturer_specific_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 382-383: Reserved */ { 16, "reserved20", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 384-511: End User Programmable */ { 1024, "end_user_programmable", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_unbuffered_memory_module = { /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "module_maximum_thickness_back", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reference_raw_card_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reference_raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 131: Address Mapping from Edge Connector to DRAM */ { 1, "rank_1_mapping", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 132-253: Reserved */ { 976, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 254-255: CRC */ { 16, "crc", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_registered_memory_module = { /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "module_maximum_thickness_back", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reference_raw_card_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reference_raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 131: DIMM Module Attributes */ { 2, "number_of_registers_used_on_rdimm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "number_of_rows_of_drams_on_rdimm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 132: RDIMM Thermal Heat Spreader Solution */ { 7, "heat_spreader_thermal_characteristics", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "heat_spreader_solution", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 133-134: Register Manufacturer ID Code */ { 7, "number_of_continuation_codes_register_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_register_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_register_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 135: Register Revision Number */ { 8, "register_revision_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 136: Address Mapping from Register to DRAM */ { 1, "rank_1_mapping", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 137: Register Output Drive Strength for Control */ { 2, "cke", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "odt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "command_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "chip_select", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 138: Register Output Drive Strength for CK */ { 2, "y0_y2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "y1_y3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 139-253: Reserved */ { 920, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 254-255: CRC */ { 16, "crc", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dimm_spd_ddr4_module_specific_load_reduction_memory_module = { /* Byte 128: Raw Card Extension, Module Nominal Height */ { 5, "module_nominal_height", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 129: Module Maximum Thickness */ { 4, "module_maximum_thickness_front", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "module_maximum_thickness_back", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 130: Reference Raw Card Used */ { 5, "reference_raw_card", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reference_raw_card_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reference_raw_card_extension", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 131: DIMM Module Attributes */ { 2, "number_of_registers_used_on_lrdimm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "number_of_rows_of_drams_on_lrdimm", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 132: LRDIMM Thermal Heat Spreader Solution */ { 7, "heat_spreader_thermal_characteristics", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "heat_spreader_solution", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 133-134: Register and Data Buffer Manufacturer ID Code */ { 7, "number_of_continuation_codes_memory_buffer_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "odd_parity_byte_memory_buffer_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "last_non_zero_memory_buffer_manufacturer", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 135: Register Revision Number */ { 8, "register_revision_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 136: Address Mapping from Register to DRAM */ { 1, "odd_rank_mapping", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 137: Register Output Drive Strength for Control and Command/Address */ { 2, "cke", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "odt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "command_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "chip_select", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 138: Register Output Drive Strength for CK */ { 2, "y0_y2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "y1_y3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 139: Drive Buffer Revision Number */ { 8, "drive_buffer_revision_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 140: DRAM VrefDQ for Package Rank 0 */ { 6, "dram_vrefq_for_package_rank0_drams", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 141: DRAM VrefDQ for Package Rank 1 */ { 6, "dram_vrefq_for_package_rank1_drams", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 142: DRAM VrefDQ for Package Rank 2 */ { 6, "dram_vrefq_for_package_rank2_drams", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 143: DRAM VrefDQ for Package Rank 3 */ { 6, "dram_vrefq_for_package_rank3_drams", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 144: Data Buffer VrefDQ for DRAM Interface */ { 8, "data_buffer_vrefq_for_dram", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 145: Data Buffer MDQ Drive Strength and RTT for data rate <= 1866 */ { 3, "dram_interface_mdq_read_termination_strength_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_interface_mdq_drive_strength_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 146: Data Buffer MDQ Drive Strength and RTT for 1866 < data rate <= 2400 */ { 3, "dram_interface_mdq_read_termination_strength_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_interface_mdq_drive_strength_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 147: Data Buffer MDQ Drive Strength and RTT for 2400 < data rate <= 3200 */ { 3, "dram_interface_mdq_read_termination_strength_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_interface_mdq_drive_strength_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 148: DRAM Drive Strength (for data rates <= 1866, 1866 < data rate < 2400, and 2400 < data rate <= 3200) */ { 2, "dram_drive_strength_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "dram_drive_strength_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "dram_drive_strength_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 149: DRAM ODT (RTT_WR, RTT_NOM) for data rate <= 1866 */ { 3, "dram_odt_strength_rtt_nom_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_wr_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved15", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 150: DRAM ODT (RTT_WR, RTT_NOM) for 1866 < data rate <= 2400 */ { 3, "dram_odt_strength_rtt_nom_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_wr_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved16", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 151: DRAM ODT (RTT_WR, RTT_NOM) for 2400 < data rat e<= 3200 */ { 3, "dram_odt_strength_rtt_nom_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_wr_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved17", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 152: DRAM ODT (RTT_PARK) for data rate <= 1866 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_1866", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved18", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 153: DRAM ODT (RTT_PARK) for 1866 < data rate <= 2400 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_2400", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved19", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Byte 153: DRAM ODT (RTT_PARK) for 2400 < data rate <= 3200 */ { 3, "dram_odt_strength_rtt_park_ranks_0_1_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "dram_odt_strength_rtt_park_ranks_2_3_lt_3200", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved20", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 139-253: Reserved */ { 792, "reserved4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Bytes 254-255: CRC */ { 16, "crc", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/record-format/ipmi-fru-information-record-format.c0000644002055400205540000002461413527331637027307 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-information-record-format.c,v 1.13 2010-07-28 21:31:25 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/record-format/ipmi-fru-information-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" fiid_template_t tmpl_fru_common_header = { { 4, "format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "internal_use_area_starting_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "chassis_info_area_starting_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* named "board area" in spec, assuming that's a typo */ { 8, "board_info_area_starting_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "product_info_area_starting_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "multirecord_area_starting_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "pad", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_info_area_header = { { 4, "format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "info_area_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_multirecord_area_header = { { 8, "record_type_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "record_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "end_of_list", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "header_checksum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_power_supply_information = { { 12, "overall_capacity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "peak_va", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "inrush_current", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "inrush_interval", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "low_end_input_voltage_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "high_end_input_voltage_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "low_end_input_voltage_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "high_end_input_voltage_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "low_end_input_frequency_range", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "high_end_input_frequency_range", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* FRU Revision 1.2 renames this "Input dropout tolerance in ms", keep legacy name */ { 8, "ac_dropout_tolerance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "predictive_fail_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_factor_correction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "autoswitch", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "hot_swap_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "tachometer_pulses_per_rotation_predictive_fail_polarity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 12, "peak_capacity", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "hold_up_time", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "voltage_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "voltage_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "total_combined_wattage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "predictive_fail_tachometer_lower_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dc_output = { { 4, "output_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standby", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "nominal_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* FRU Revision 1.2 renames this "Maximum negative voltage", keep legacy name */ { 16, "maximum_negative_voltage_deviation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* FRU Revision 1.2 renames this "Maximum positive voltage", keep legacy name */ { 16, "maximum_positive_voltage_deviation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "ripple_and_noise_pk_pk", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_current_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_current_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_dc_load = { { 4, "output_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "nominal_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Spec abbreviates specified to 'spec'd', so we keep it */ { 16, "specd_minimum_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "specd_maximum_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "specd_ripple_and_noise_pk_pk", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_current_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_current_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; /* Note: At most 256*8 bits according to max sub-record types */ fiid_template_t tmpl_fru_management_access_record = { { 8, "sub_record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2048, "record", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_fru_base_compatibility_record = { { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "compatibility_base", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "compatibility_code_start_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4096, "code_range_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_fru_extended_compatibility_record = { { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "compatibility_base", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "compatibility_code_start_value", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4096, "code_range_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_fru_extended_dc_output = { { 4, "output_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "standby", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "nominal_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_negative_voltage_deviation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_positive_voltage_deviation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "ripple_and_noise_pk_pk", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_current_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_current_draw", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_extended_dc_load = { { 4, "output_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "current_units", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "nominal_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Spec abbreviates specified to 'spec'd', so we keep it */ { 16, "specd_minimum_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "specd_maximum_voltage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "specd_ripple_and_noise_pk_pk", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "minimum_current_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "maximum_current_load", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_fru_oem_record = { { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4096, "oem_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/record-format/ipmi-sdr-record-format.c0000644002055400205540000022774413527331637024771 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" fiid_template_t tmpl_sdr_record_header = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sdr_full_sensor_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.settable_sensor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "assertion_event_lower_threshold_reading_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "deassertion_event_upper_threshold_reading_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "discrete_reading_settable_threshold_readable_threshold_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "linearization", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "linearization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "m_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "tolerance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "m_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "b_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "accuracy_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "b_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "accuracy_exp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "accuracy_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "b_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "r_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_max", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_min", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "analog_characteristics_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_maximum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_minimum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_maximum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_minimum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_full_sensor_record_non_threshold_based_sensors = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "linearization", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "linearization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "m_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "tolerance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "m_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "b_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "accuracy_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "b_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "accuracy_exp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "accuracy_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "b_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "r_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_max", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_min", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "analog_characteristics_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_maximum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_minimum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_maximum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_minimum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_full_sensor_record_threshold_based_sensors = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_non_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_non_recoverable_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_non_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_non_recoverable_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_non_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_non_recoverable_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_non_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_non_recoverable_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_non_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_non_recoverable_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_non_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_non_recoverable_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "linearization", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "linearization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "m_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "tolerance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "m_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "b_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "accuracy_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "b_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "accuracy_exp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "accuracy_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "b_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "r_exponent", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_max", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "analog_characteristics_flag.normal_min", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "analog_characteristics_flag.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nominal_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_maximum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "normal_minimum", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_maximum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_minimum_reading", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "upper_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_recoverable_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "lower_non_critical_threshold", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_compact_sensor_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Sensor Initialization */ { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* Sensor Capabilities */ { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "assertion_event_lower_threshold_reading_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "deassertion_event_upper_threshold_reading_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "discrete_reading_settable_threshold_readable_threshold_mask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "share_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "id_string_instance_modifier_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "id_string_instance_modifier_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance_sharing", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_compact_sensor_record_non_threshold_based_sensors = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.event_offset_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_event_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.event_offset_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "deassertion_event_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_0", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_6", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_7", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_8", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_9", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_10", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_11", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_12", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_13", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.state_bit_14", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "discrete_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "share_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "id_string_instance_modifier_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "id_string_instance_modifier_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance_sharing", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_compact_sensor_record_threshold_based_sensors = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.sensor_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.event_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_thresholds", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.init_scanning", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_initialization.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.event_message_control_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.threshold_access_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_capabilities.hysteresis_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.auto_re_arm_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_capabilities.entity_ignore_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.lower_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_assertion_event_mask.upper_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_non_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.lower_non_recoverable_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "lower_threshold_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.lower_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_critical_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_critical_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_low_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "threshold_deassertion_event_mask.upper_non_recoverable_going_high_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_non_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_critical_threshold_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.upper_non_recoverable_is_comparison", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "upper_threshold_reading_mask.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_non_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.lower_non_recoverable_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_non_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_critical_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.upper_non_recoverable_threshold_is_readable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "readable_threshold_mask.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_non_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.lower_non_recoverable_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_non_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_critical_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.upper_non_recoverable_threshold_is_settable", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "settable_threshold_mask.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "sensor_unit1.percentage", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "sensor_unit1.rate_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_unit1.analog_data_format", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit2.base_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_unit3.modifier_unit", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "share_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "id_string_instance_modifier_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "id_string_instance_modifier_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance_sharing", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "positive_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "negative_going_threshold_hysteresis", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_event_only_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "sensor_owner_id.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "sensor_owner_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "fru_inventory_device_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************************************* * Sensor Record Sharing, Sensor Direction * *******************************************/ { 4, "share_count", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "id_string_instance_modifier_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_direction", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "id_string_instance_modifier_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance_sharing", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "id_string_type_length_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_entity_association_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 8, "container_entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "container_entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "flags.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.sensor_presence", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.record_link", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.contained_entities", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "instance_id_contained_entity_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "entity_id_contained_entity_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "instance_id_contained_entity_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "instance_id_contained_entity_range_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "instance_id_contained_entity_range_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sdr_device_relative_entity_association_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 8, "container_entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "container_entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "container_entity_device_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "container_entity_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "container_entity_device_channel.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "container_entity_device_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "flags.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.sensor_presence", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.record_link", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "flags.contained_entities", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "contained_entity_1_device_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "contained_entity_1_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_1_device_channel.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_1_device_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_contained_entity_range_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "contained_entity_2_device_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "contained_entity_2_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_2_device_channel.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_2_device_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_contained_entity_range_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "contained_entity_3_device_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "contained_entity_3_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_3_device_channel.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_3_device_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_contained_entity_range_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "contained_entity_4_device_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "contained_entity_4_device_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_4_device_channel.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "contained_entity_4_device_channel", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id_contained_entity_range_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_instance_contained_entity_range_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sdr_generic_device_locator_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "device_access_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_access_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_number_ms", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "private_bus_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun_for_master_write_read_command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_number_ls", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "address_span", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 5, "address_span.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type_modifier", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id_string_type_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "device_id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_fru_device_locator_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "device_access_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_access_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "logical_fru_device_device_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "private_bus_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun_for_master_write_read_fru_command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "logical_physical_access_lun_bus_id.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "logical_physical_fru_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type_modifier", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id_string_type_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* achu: spec says "device_string", but I rename for consistency to other * records. I assume it's a typo in the spec. */ { 128, "device_id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_fru_device_locator_record_non_intelligent = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "device_access_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_access_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "non_intelligent_fru_device.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "non_intelligent_fru_device.slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "private_bus_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun_for_master_write_read_fru_command", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "logical_physical_access_lun_bus_id.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "logical_physical_fru_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 8, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_type_modifier", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "fru_entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id_string_type_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* achu: spec says "device_string", but I rename for consistency to other * records. I assume it's a typo in the spec. */ { 128, "device_id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_management_controller_device_locator_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 1, "device_slave_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 2, "global_initialization.event_message_generation", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "global_initialization.log_initialization_agent_errors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "global_initialization.controller_logs_initialization_agent_errors", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_state_notification.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_state_notification.controller", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_state_notification.acpi_device_power_state_notification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_state_notification.acpi_system_power_state_notification", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.sensor_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.sdr_repository_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.sel_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.fru_inventory_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.ipmb_event_receiver", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.ipmb_event_generator", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.bridge", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_capabilities.chassis_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "entity_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "entity_instance", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "entity_instance.type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id_string_type_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "device_id_string", FIID_FIELD_OPTIONAL | FIID_FIELD_LENGTH_VARIABLE}, { 0, "", 0} }; fiid_template_t tmpl_sdr_management_controller_confirmation_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ /* Device Slave Address */ { 1, "device_slave_address.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "device_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "device_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /********************* * Record Body Bytes * *********************/ { 7, "major_firmware_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "major_firmware_revision.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "minor_firmware_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "ipmi_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "product_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 128, "device_guid", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sdr_bmc_message_channel_info_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 4, "channel_0_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_0_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_0_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_1_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_1_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_1_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_2_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_2_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_2_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_3_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_3_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_3_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_4_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_4_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_4_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_5_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_5_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_5_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_6_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_6_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_6_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_7_protocol", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "channel_7_message_receive_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_7_transmit_supported", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sdr_oem_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 448, "oem_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/record-format/ipmi-sdr-oem-intel-node-manager-record-format.c0000644002055400205540000000513313527331637031175 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" fiid_template_t tmpl_sdr_oem_intel_node_manager_record = { /********************* * SDR Record Header * *********************/ { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "sdr_version_minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_length", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /******************** * Record Key Bytes * ********************/ { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_subtype", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "version_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "nm_device_slave_address", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "sensor_owner_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nm_health_event_sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nm_exception_event_sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nm_operational_capabilities_sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "nm_alert_threshold_exceeded_sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/record-format/ipmi-sel-record-format.c0000644002055400205540000001415613527331637024753 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi-portability.h" fiid_template_t tmpl_sel_record_header = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sel_system_event_record = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "generator_id.id_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "generator_id.id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "ipmb_device_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_message_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_dir", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sel_system_event_record_event_fields = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "generator_id.id_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "generator_id.id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "ipmb_device_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_message_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_dir", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data3_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data2_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sel_system_event_record_discrete_previous_state_severity = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "generator_id.id_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "generator_id.id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "ipmb_device_lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_message_format_version", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "sensor_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "event_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "event_dir", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data3_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "event_data2_flag", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "previous_offset_from_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "offset_from_severity_event_reading_type_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "event_data3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sel_timestamped_oem_record = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 32, "timestamp", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "manufacturer_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 48, "oem_defined", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_sel_non_timestamped_oem_record = { { 16, "record_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "record_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 104, "oem_defined", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; freeipmi-1.6.4/libfreeipmi/sdr/0000755002055400205540000000000013527342542016340 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr.c0000644002055400205540000001422013527331637020232 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr.c,v 1.20 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" static char *ipmi_sdr_cache_errmsgs[] = { "success", "context null", "context invalid", "invalid parameters", "out of memory", "filename invalid", "file system error", "filename path permission error", "context performing other operation", "SDR cache exists", "SDR record with an identical record id already written", "SDR record length invalid", "SDR record count invalid", "SDR cache reading initialization already called", "cache reading not initialized", "SDR cache does not exist", "SDR cache invalid", "SDR cache out of date", "stats not compiled", "invalid sdr record", "incomplete sdr record", "cannot parse or calculate", "error returned in callback", "not found", "internal IPMI error", "internal system error", "buffer overflow", "internal error", "errnum out of range", NULL }; ipmi_sdr_ctx_t ipmi_sdr_ctx_create (void) { struct ipmi_sdr_ctx *ctx = NULL; if (!(ctx = (ipmi_sdr_ctx_t)malloc (sizeof (struct ipmi_sdr_ctx)))) { ERRNO_TRACE (errno); return (NULL); } memset (ctx, '\0', sizeof (struct ipmi_sdr_ctx)); ctx->magic = IPMI_SDR_CTX_MAGIC; ctx->flags = IPMI_SDR_FLAGS_DEFAULT; ctx->debug_prefix = NULL; if (!(ctx->saved_offsets = list_create ((ListDelF)free))) { ERRNO_TRACE (errno); goto cleanup; } sdr_init_ctx (ctx); return (ctx); cleanup: if (ctx) { if (ctx->saved_offsets) list_destroy (ctx->saved_offsets); free (ctx); } return (NULL); } void ipmi_sdr_ctx_destroy (ipmi_sdr_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) return; if (ctx->callback_lock) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CONTEXT_PERFORMING_OTHER_OPERATION); return; } /* ignore potential error, destroy path */ if (ctx->fd >= 0) close (ctx->fd); /* ignore potential error, void return func */ if (ctx->sdr_cache) munmap (ctx->sdr_cache, ctx->file_size); list_destroy (ctx->saved_offsets); ctx->magic = ~IPMI_SDR_CTX_MAGIC; ctx->operation = IPMI_SDR_OPERATION_UNINITIALIZED; free (ctx->debug_prefix); free (ctx); } int ipmi_sdr_ctx_errnum (ipmi_sdr_ctx_t ctx) { if (!ctx) return (IPMI_SDR_ERR_CONTEXT_NULL); else if (ctx->magic != IPMI_SDR_CTX_MAGIC) return (IPMI_SDR_ERR_CONTEXT_INVALID); else return (ctx->errnum); } char * ipmi_sdr_ctx_strerror (int errnum) { if (errnum >= IPMI_SDR_ERR_SUCCESS && errnum <= IPMI_SDR_ERR_ERRNUMRANGE) return (ipmi_sdr_cache_errmsgs[errnum]); else return (ipmi_sdr_cache_errmsgs[IPMI_SDR_ERR_ERRNUMRANGE]); } char * ipmi_sdr_ctx_errormsg (ipmi_sdr_ctx_t ctx) { return (ipmi_sdr_ctx_strerror (ipmi_sdr_ctx_errnum (ctx))); } int ipmi_sdr_ctx_get_flags (ipmi_sdr_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!flags) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_ctx_set_flags (ipmi_sdr_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_SDR_FLAGS_DEBUG_DUMP) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } char * ipmi_sdr_ctx_get_debug_prefix (ipmi_sdr_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (NULL); } ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (ctx)->debug_prefix; } int ipmi_sdr_ctx_set_debug_prefix (ipmi_sdr_ctx_t ctx, const char *debug_prefix) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } free (ctx->debug_prefix); ctx->debug_prefix = NULL; if (debug_prefix) { if (!(ctx->debug_prefix = strdup (debug_prefix))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); return (-1); } } ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-common.c0000644002055400205540000002154513527331637021530 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-common.c,v 1.20 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/api/ipmi-sdr-repository-cmds-api.h" #include "freeipmi/cmds/ipmi-sdr-repository-cmds.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" void sdr_init_ctx (ipmi_sdr_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); ctx->operation = IPMI_SDR_OPERATION_UNINITIALIZED; ctx->sdr_version = 0; ctx->record_count = 0; ctx->most_recent_addition_timestamp = 0; ctx->most_recent_erase_timestamp = 0; ctx->fd = -1; ctx->file_size = 0; ctx->records_start_offset = 0; ctx->records_end_offset = 0; ctx->sdr_cache = NULL; ctx->current_offset.offset = 0; ctx->current_offset.offset_dumped = 0; ctx->callback_lock = 0; ctx->stats_compiled = 0; memset (ctx->entity_counts, '\0', sizeof (struct ipmi_sdr_entity_count) * IPMI_MAX_ENTITY_IDS); } int sdr_info (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, uint8_t *sdr_version, uint16_t *record_count, uint32_t *most_recent_addition_timestamp, uint32_t *most_recent_erase_timestamp) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (ipmi_ctx); assert (sdr_version); assert (record_count); assert (most_recent_addition_timestamp); assert (most_recent_erase_timestamp); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sdr_repository_info_rs))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_get_sdr_repository_info (ipmi_ctx, obj_cmd_rs) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } *sdr_version = 0; if (FIID_OBJ_GET (obj_cmd_rs, "sdr_version_minor", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *sdr_version = val; if (FIID_OBJ_GET (obj_cmd_rs, "sdr_version_major", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *sdr_version |= ((uint8_t)val << 4); *record_count = 0; if (FIID_OBJ_GET (obj_cmd_rs, "record_count", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *record_count = val; *most_recent_addition_timestamp = 0; if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_addition_timestamp", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *most_recent_addition_timestamp = val; *most_recent_erase_timestamp = 0; if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_erase_timestamp", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *most_recent_erase_timestamp = val; rv = 0; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } const char * sdr_record_type_str (ipmi_sdr_ctx_t ctx, uint8_t *sdr_record, unsigned int sdr_record_len) { fiid_obj_t obj_sdr_record_header = NULL; uint8_t record_type; uint64_t val; int sdr_record_header_len; char *rv = NULL; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (sdr_record); assert (sdr_record_len); if ((sdr_record_header_len = fiid_template_len_bytes (tmpl_sdr_record_header)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (sdr_record_len < sdr_record_header_len) goto cleanup; if (!(obj_sdr_record_header = fiid_obj_create (tmpl_sdr_record_header))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sdr_record_header, sdr_record, sdr_record_header_len) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record_header, "record_type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } record_type = val; switch (record_type) { case IPMI_SDR_FORMAT_FULL_SENSOR_RECORD: rv = "SDR Full Sensor Record"; break; case IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD: rv = "SDR Compact Sensor Record"; break; case IPMI_SDR_FORMAT_EVENT_ONLY_RECORD: rv = "SDR Event Only Record"; break; case IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD: rv = "SDR Entity Association Record"; break; case IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD: rv = "SDR Device Relative Entity Association Record"; break; case IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD: rv = "SDR Generic Device Locator Record"; break; case IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD: rv = "SDR FRU Device Locator Record"; break; case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD: rv = "SDR Management Controller Device Locator Record"; break; case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD: rv = "SDR Management Controller Confirmation Record"; break; case IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD: rv = "SDR Message Channel Info Record"; break; case IPMI_SDR_FORMAT_OEM_RECORD: rv = "SDR OEM Record"; break; default: rv = "SDR Unknown Record"; } cleanup: fiid_obj_destroy (obj_sdr_record_header); return (rv); } void sdr_check_read_status (ipmi_sdr_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) return; if (ctx->flags & IPMI_SDR_FLAGS_DEBUG_DUMP && !ctx->current_offset.offset_dumped) { unsigned int record_length; const char *record_str; record_length = (uint8_t)((ctx->sdr_cache + ctx->current_offset.offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if ((record_str = sdr_record_type_str (ctx, ctx->sdr_cache + ctx->current_offset.offset, record_length + IPMI_SDR_RECORD_HEADER_LENGTH))) { char hdrbuf[IPMI_SDR_CACHE_DEBUG_BUFLEN + 1]; memset (hdrbuf, '\0', IPMI_SDR_CACHE_DEBUG_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, record_str, hdrbuf, IPMI_SDR_CACHE_DEBUG_BUFLEN); ipmi_dump_sdr_record (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, ctx->sdr_cache + ctx->current_offset.offset, record_length + IPMI_SDR_RECORD_HEADER_LENGTH); } ctx->current_offset.offset_dumped = 1; } } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-common.h0000644002055400205540000000407213527331637021531 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-common.h,v 1.8 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_SDR_COMMON_H #define IPMI_SDR_COMMON_H #include #include "freeipmi/sdr/ipmi-sdr.h" #include "ipmi-sdr-defs.h" #define IPMI_SDR_CACHE_DEBUG_BUFLEN 256 void sdr_init_ctx (ipmi_sdr_ctx_t ctx); int sdr_info (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, uint8_t *sdr_version, uint16_t *record_count, uint32_t *most_recent_addition_timestamp, uint32_t *most_recent_erase_timestamp); const char *sdr_record_type_str (ipmi_sdr_ctx_t ctx, uint8_t *sdr_record, unsigned int sdr_record_len); void sdr_check_read_status (ipmi_sdr_ctx_t ctx); #endif /* IPMI_SDR_COMMON_H */ freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-cache-create.c0000644002055400205540000010437313527331637022545 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-cache-create.c,v 1.42 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/api/ipmi-sdr-repository-cmds-api.h" #include "freeipmi/cmds/ipmi-sdr-repository-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" #include "fd.h" #define IPMI_SDR_CACHE_MAX_RESERVATION_ID_RETRY 4 /* achu: bytes to read start = 16 specifically chosen to 16 because it * appears most motherboards can handle 16. Many cannot handle larger * numbers like 32. */ #define IPMI_SDR_CACHE_BYTES_TO_READ_START 16 #define IPMI_SDR_CACHE_BYTES_TO_READ_DECREMENT 4 static int _sdr_cache_header_write (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, int fd, unsigned int *total_bytes_written, uint8_t sdr_version, uint16_t record_count, uint32_t most_recent_addition_timestamp, uint32_t most_recent_erase_timestamp) { char sdr_cache_magic_buf[4]; char sdr_cache_version_buf[4]; char record_count_buf[2]; char most_recent_addition_timestamp_buf[4]; char most_recent_erase_timestamp_buf[4]; uint8_t header_checksum_buf[512]; unsigned int header_checksum_buf_len = 0; uint8_t header_checksum; ssize_t n; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (ipmi_ctx); assert (fd); assert (total_bytes_written); sdr_cache_magic_buf[0] = IPMI_SDR_CACHE_FILE_MAGIC_0; sdr_cache_magic_buf[1] = IPMI_SDR_CACHE_FILE_MAGIC_1; sdr_cache_magic_buf[2] = IPMI_SDR_CACHE_FILE_MAGIC_2; sdr_cache_magic_buf[3] = IPMI_SDR_CACHE_FILE_MAGIC_3; if ((n = fd_write_n (fd, sdr_cache_magic_buf, 4)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 4) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], sdr_cache_magic_buf, 4); header_checksum_buf_len += 4; sdr_cache_version_buf[0] = IPMI_SDR_CACHE_FILE_VERSION_1_2_0; sdr_cache_version_buf[1] = IPMI_SDR_CACHE_FILE_VERSION_1_2_1; sdr_cache_version_buf[2] = IPMI_SDR_CACHE_FILE_VERSION_1_2_2; sdr_cache_version_buf[3] = IPMI_SDR_CACHE_FILE_VERSION_1_2_3; if ((n = fd_write_n (fd, sdr_cache_version_buf, 4)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 4) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], sdr_cache_version_buf, 4); header_checksum_buf_len += 4; if ((n = fd_write_n (fd, (char *)&sdr_version, 1)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 1) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 1; memcpy(&header_checksum_buf[header_checksum_buf_len], &sdr_version, 1); header_checksum_buf_len += 1; /* Store record count little-endian */ record_count_buf[0] = (record_count & 0x00FF); record_count_buf[1] = (record_count & 0xFF00) >> 8; if ((n = fd_write_n (fd, record_count_buf, 2)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 2) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 2; memcpy(&header_checksum_buf[header_checksum_buf_len], record_count_buf, 2); header_checksum_buf_len += 2; /* Store most recent addition timestamp little-endian */ most_recent_addition_timestamp_buf[0] = (most_recent_addition_timestamp & 0x000000FF); most_recent_addition_timestamp_buf[1] = (most_recent_addition_timestamp & 0x0000FF00) >> 8; most_recent_addition_timestamp_buf[2] = (most_recent_addition_timestamp & 0x00FF0000) >> 16; most_recent_addition_timestamp_buf[3] = (most_recent_addition_timestamp & 0xFF000000) >> 24; if ((n = fd_write_n (fd, most_recent_addition_timestamp_buf, 4)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 4) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], most_recent_addition_timestamp_buf, 4); header_checksum_buf_len += 4; /* Store most recent erase timestamp little-endian */ most_recent_erase_timestamp_buf[0] = (most_recent_erase_timestamp & 0x000000FF); most_recent_erase_timestamp_buf[1] = (most_recent_erase_timestamp & 0x0000FF00) >> 8; most_recent_erase_timestamp_buf[2] = (most_recent_erase_timestamp & 0x00FF0000) >> 16; most_recent_erase_timestamp_buf[3] = (most_recent_erase_timestamp & 0xFF000000) >> 24; if ((n = fd_write_n (fd, most_recent_erase_timestamp_buf, 4)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 4) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], most_recent_erase_timestamp_buf, 4); header_checksum_buf_len += 4; header_checksum = ipmi_checksum (header_checksum_buf, header_checksum_buf_len); if ((n = fd_write_n (fd, (char *)&header_checksum, 1)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 1) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += 1; return (0); } static int _sdr_cache_trailer_write (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, int fd, unsigned int total_bytes_written, uint8_t trailer_checksum) { char total_bytes_written_buf[4]; ssize_t n; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (ipmi_ctx); assert (fd); /* + 4 for this value, + 1 for checksum at end */ total_bytes_written += 4; total_bytes_written += 1; total_bytes_written_buf[0] = (total_bytes_written & 0x000000FF); total_bytes_written_buf[1] = (total_bytes_written & 0x0000FF00) >> 8; total_bytes_written_buf[2] = (total_bytes_written & 0x00FF0000) >> 16; total_bytes_written_buf[3] = (total_bytes_written & 0xFF000000) >> 24; if ((n = fd_write_n (fd, total_bytes_written_buf, 4)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 4) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } trailer_checksum = ipmi_checksum_final (total_bytes_written_buf, 4, trailer_checksum); if ((n = fd_write_n (fd, (char *)&trailer_checksum, 1)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != 1) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } return (0); } static int _sdr_cache_reservation_id (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, uint16_t *reservation_id) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (ipmi_ctx); assert (reservation_id); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_reserve_sdr_repository_rs))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_reserve_sdr_repository (ipmi_ctx, obj_cmd_rs) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } *reservation_id = 0; if (FIID_OBJ_GET (obj_cmd_rs, "reservation_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *reservation_id = val; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _sdr_cache_get_record (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, uint16_t record_id, void *record_buf, unsigned int record_buf_len, uint16_t *reservation_id, uint16_t *next_record_id) { fiid_obj_t obj_cmd_rs = NULL; fiid_obj_t obj_sdr_record_header = NULL; int sdr_record_header_length = 0; int sdr_record_len = 0; unsigned int record_length = 0; int rv = -1; unsigned int bytes_to_read = IPMI_SDR_CACHE_BYTES_TO_READ_START; unsigned int offset_into_record = 0; unsigned int reservation_id_retry_count = 0; uint8_t temp_record_buf[IPMI_SDR_MAX_RECORD_LENGTH]; uint64_t val; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (ipmi_ctx); assert (record_buf); assert (record_buf_len); assert (reservation_id); assert (next_record_id); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sdr_rs))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_sdr_record_header = fiid_obj_create (tmpl_sdr_record_header))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if ((sdr_record_header_length = fiid_template_len_bytes (tmpl_sdr_record_header)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } /* achu: * * Many motherboards now allow you to read the full SDR record, try * that first. If it fails for any reason, bail and try to read via * partial reads. */ reservation_id_retry_count = 0; while (!offset_into_record) { if (ipmi_cmd_get_sdr (ipmi_ctx, *reservation_id, record_id, 0, IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { uint8_t comp_code; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_RESERVATION_CANCELLED && (reservation_id_retry_count < IPMI_SDR_CACHE_MAX_RESERVATION_ID_RETRY)) { if (_sdr_cache_reservation_id (ctx, ipmi_ctx, reservation_id) < 0) goto cleanup; reservation_id_retry_count++; continue; } } goto partial_read; } if ((sdr_record_len = fiid_obj_get_data (obj_cmd_rs, "record_data", temp_record_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } /* Assume this is an "IPMI Error", fall through to partial reads */ if (sdr_record_len < sdr_record_header_length) goto partial_read; /* * IPMI Workaround (achu) * * Discovered on Xyratex HB-F8-SRAY * * For some reason reading the entire SDR record (with * IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ) the response * returns fewer bytes than the actual length of the record. * However, when reading with partial reads things ultimately * succeed. If we notice the length is off, we fall out and do * a partial read. */ if ((((uint8_t)temp_record_buf[IPMI_SDR_RECORD_LENGTH_INDEX]) + IPMI_SDR_RECORD_HEADER_LENGTH) > sdr_record_len) goto partial_read; if (sdr_record_len > record_buf_len) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "next_record_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *next_record_id = val; memcpy (record_buf, temp_record_buf, sdr_record_len); offset_into_record += sdr_record_len; goto out; } partial_read: reservation_id_retry_count = 0; while (!record_length) { uint8_t record_header_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_header_len; if (ipmi_cmd_get_sdr (ipmi_ctx, *reservation_id, record_id, 0, sdr_record_header_length, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_BAD_COMPLETION_CODE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } else { uint8_t comp_code; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_RESERVATION_CANCELLED && (reservation_id_retry_count < IPMI_SDR_CACHE_MAX_RESERVATION_ID_RETRY)) { if (_sdr_cache_reservation_id (ctx, ipmi_ctx, reservation_id) < 0) goto cleanup; reservation_id_retry_count++; continue; } SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } } if ((sdr_record_header_len = fiid_obj_get_data (obj_cmd_rs, "record_data", record_header_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } if (sdr_record_header_len < sdr_record_header_length) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } if (fiid_obj_set_all (obj_sdr_record_header, record_header_buf, sdr_record_header_len) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record_header, "record_length", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } if (sdr_record_header_len > record_buf_len) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } /* copy header into buf */ memcpy (record_buf, record_header_buf, sdr_record_header_len); offset_into_record += sdr_record_header_len; record_length = val + sdr_record_header_length; } if (record_length > record_buf_len) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "next_record_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *next_record_id = val; reservation_id_retry_count = 0; while (offset_into_record < record_length) { int record_data_len; if ((record_length - offset_into_record) < bytes_to_read) bytes_to_read = record_length - offset_into_record; if (ipmi_cmd_get_sdr (ipmi_ctx, *reservation_id, record_id, offset_into_record, bytes_to_read, obj_cmd_rs) < 0) { /* Workaround * * Dell Poweredge FC830 * * Last SDR record can't be read, it always returns * 0xC3. If this is the last record, just don't return * a record back to the caller. */ if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_MESSAGE_TIMEOUT) { uint8_t comp_code; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_COMMAND_TIMEOUT && (*next_record_id) == IPMI_SDR_RECORD_ID_LAST) { offset_into_record = 0; goto out; } } if (ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_BAD_COMPLETION_CODE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } else { uint8_t comp_code; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_RESERVATION_CANCELLED && (reservation_id_retry_count < IPMI_SDR_CACHE_MAX_RESERVATION_ID_RETRY)) { if (_sdr_cache_reservation_id (ctx, ipmi_ctx, reservation_id) < 0) goto cleanup; reservation_id_retry_count++; continue; } else if ((comp_code == IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES || comp_code == IPMI_COMP_CODE_UNSPECIFIED_ERROR) && bytes_to_read > sdr_record_header_length) { bytes_to_read -= IPMI_SDR_CACHE_BYTES_TO_READ_DECREMENT; if (bytes_to_read < sdr_record_header_length) bytes_to_read = sdr_record_header_length; continue; } SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_IPMI_ERROR); goto cleanup; } } if ((record_data_len = fiid_obj_get_data (obj_cmd_rs, "record_data", record_buf + offset_into_record, record_buf_len - offset_into_record)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } offset_into_record += record_data_len; } out: rv = offset_into_record; cleanup: fiid_obj_destroy (obj_cmd_rs); fiid_obj_destroy (obj_sdr_record_header); return (rv); } static int _sdr_cache_record_write (ipmi_sdr_ctx_t ctx, int fd, unsigned int *total_bytes_written, uint16_t *record_ids, unsigned int *record_ids_count, uint8_t *buf, unsigned int buflen, uint8_t *trailer_checksum) { ssize_t n; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (fd); assert (total_bytes_written); assert (!record_ids || (record_ids && record_ids_count)); assert (buf); assert (buflen); assert (trailer_checksum); /* Record header bytes are 5 bytes */ if (buflen < IPMI_SDR_RECORD_HEADER_LENGTH) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_LENGTH); return (-1); } /* Record Length plus the header bytes should match buflen. */ if ((((uint8_t)buf[IPMI_SDR_RECORD_LENGTH_INDEX]) + IPMI_SDR_RECORD_HEADER_LENGTH) != buflen) { /* * IPMI Workaround (achu) * * Discovered on HP Proliant DL585G7 * * When reading an entire SDR record (using * IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ), sometimes records * are returned with an excess of bytes. The following * truncates the buffer length to the correct size. */ if ((((uint8_t)buf[IPMI_SDR_RECORD_LENGTH_INDEX]) + IPMI_SDR_RECORD_HEADER_LENGTH) <= buflen) buflen = ((uint8_t)buf[IPMI_SDR_RECORD_LENGTH_INDEX]) + IPMI_SDR_RECORD_HEADER_LENGTH; else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_LENGTH); return (-1); } } if (record_ids) { uint16_t record_id; unsigned int i; /* Record ID stored little endian */ record_id = ((uint16_t)buf[IPMI_SDR_RECORD_ID_INDEX_LS] & 0xFF); record_id |= ((uint16_t)buf[IPMI_SDR_RECORD_ID_INDEX_MS] & 0xFF) << 8; for (i = 0; i < *record_ids_count; i++) { if (record_ids[i] == record_id) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_DUPLICATE_RECORD_ID); return (-1); } } record_ids[*record_ids_count] = record_id; (*record_ids_count)++; } if ((n = fd_write_n (fd, buf, buflen)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); return (-1); } if (n != buflen) { /* Try to lseek back to our original spot */ lseek (fd, SEEK_SET, *total_bytes_written); SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); return (-1); } (*total_bytes_written) += buflen; (*trailer_checksum) = ipmi_checksum_incremental (buf, buflen, (*trailer_checksum)); return (0); } int ipmi_sdr_cache_create (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, const char *filename, int cache_create_flags, Ipmi_Sdr_Cache_Create_Callback create_callback, void *create_callback_data) { int open_flags; uint8_t sdr_version; uint16_t record_count, reservation_id, record_id, next_record_id; uint32_t most_recent_addition_timestamp, most_recent_erase_timestamp; unsigned int record_count_written = 0; unsigned int total_bytes_written = 0; uint16_t *record_ids = NULL; unsigned int record_ids_count = 0; unsigned int cache_create_flags_mask = (IPMI_SDR_CACHE_CREATE_FLAGS_OVERWRITE | IPMI_SDR_CACHE_CREATE_FLAGS_DUPLICATE_RECORD_ID | IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT); uint8_t trailer_checksum = 0; int fd = -1; int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } /* Version cannot be 0h according to the IPMI spec */ if (!ipmi_ctx || !filename || (strlen (filename) > MAXPATHLEN) || (cache_create_flags & ~cache_create_flags_mask)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_UNINITIALIZED) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CONTEXT_PERFORMING_OTHER_OPERATION); else SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); return (-1); } ctx->operation = IPMI_SDR_OPERATION_CREATE_CACHE; if (cache_create_flags & IPMI_SDR_CACHE_CREATE_FLAGS_OVERWRITE) open_flags = O_CREAT | O_TRUNC | O_WRONLY; else open_flags = O_CREAT | O_EXCL | O_WRONLY; if ((fd = open (filename, open_flags, 0644)) < 0) { if (!(cache_create_flags & IPMI_SDR_CACHE_CREATE_FLAGS_OVERWRITE) && errno == EEXIST) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_CACHE_EXISTS); else if (errno == EPERM || errno == EACCES || errno == EISDIR || errno == EROFS) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PERMISSION); else if (errno == ENAMETOOLONG || errno == ENOENT || errno == ELOOP) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_FILENAME_INVALID); else if (errno == ENOSPC || errno == EMFILE || errno == ENFILE) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_FILESYSTEM); else SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); goto cleanup; } if (sdr_info (ctx, ipmi_ctx, &sdr_version, &record_count, &most_recent_addition_timestamp, &most_recent_erase_timestamp) < 0) goto cleanup; if (!record_count) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_COUNT); goto cleanup; } if (_sdr_cache_header_write (ctx, ipmi_ctx, fd, &total_bytes_written, sdr_version, record_count, most_recent_addition_timestamp, most_recent_erase_timestamp) < 0) goto cleanup; /* Version cannot be 0h according to the IPMI spec, but we accept it regardless */ ctx->sdr_version = sdr_version; ctx->record_count = record_count; ctx->most_recent_addition_timestamp = most_recent_addition_timestamp; ctx->most_recent_erase_timestamp = most_recent_erase_timestamp; if (cache_create_flags & IPMI_SDR_CACHE_CREATE_FLAGS_DUPLICATE_RECORD_ID) { if (!(record_ids = (uint16_t *)malloc (ctx->record_count * sizeof (uint16_t)))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); goto cleanup; } record_ids_count = 0; } if (_sdr_cache_reservation_id (ctx, ipmi_ctx, &reservation_id) < 0) goto cleanup; next_record_id = IPMI_SDR_RECORD_ID_FIRST; while (next_record_id != IPMI_SDR_RECORD_ID_LAST) { uint8_t record_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int record_len; if (record_count_written >= ctx->record_count) { /* IPMI Workaround * * Discovered on unspecified Inspur motherboard * * SDR record reading is broken, the IPMI_SDR_RECORD_ID_LAST * record id never occurs. So this workaround allows the * user to not error out and avoids this loop from looping * infinitely. * */ if (cache_create_flags & IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) break; SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_COUNT); goto cleanup; } record_id = next_record_id; if ((record_len = _sdr_cache_get_record (ctx, ipmi_ctx, record_id, record_buf, IPMI_SDR_MAX_RECORD_LENGTH, &reservation_id, &next_record_id)) < 0) goto cleanup; if (record_len) { if (ctx->flags & IPMI_SDR_FLAGS_DEBUG_DUMP) { const char *record_str; if ((record_str = sdr_record_type_str (ctx, record_buf, record_len))) { char hdrbuf[IPMI_SDR_CACHE_DEBUG_BUFLEN + 1]; memset (hdrbuf, '\0', IPMI_SDR_CACHE_DEBUG_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, record_str, hdrbuf, IPMI_SDR_CACHE_DEBUG_BUFLEN); ipmi_dump_sdr_record (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, record_buf, record_len); } } if (_sdr_cache_record_write (ctx, fd, &total_bytes_written, record_ids, &record_ids_count, record_buf, record_len, &trailer_checksum) < 0) goto cleanup; record_count_written++; if (create_callback) (*create_callback)(ctx->sdr_version, ctx->record_count, ctx->most_recent_addition_timestamp, ctx->most_recent_erase_timestamp, record_id, create_callback_data); } } if (record_count_written != ctx->record_count) { /* * IPMI Workaround (achu) * * Discovered on Fujitsu RX 100 * Discovered on Fujitsu RX300/200-S8 * * The record_count listed from the Get SDR Repository Info command * is not consistent with the length of SDR records stored. * * We will assume that if we reached the end of the SDR record * list (i.e. next_record_id == 0xFFFF), a non-zero number of * records were written, it's ok and we can continue on. */ /* Note Dell Poweredge FC830 workaround above, this code is used * as a consequence of that workaround */ if (next_record_id == IPMI_SDR_RECORD_ID_LAST && record_count_written) { unsigned int total_bytes_written_temp = 0; ctx->record_count = record_count_written; /* need to seek back to the beginning of the file and * re-write the header info with the correct number of * records */ if (lseek (fd, 0, SEEK_SET) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); goto cleanup; } if (_sdr_cache_header_write (ctx, ipmi_ctx, fd, &total_bytes_written_temp, ctx->sdr_version, ctx->record_count, ctx->most_recent_addition_timestamp, ctx->most_recent_erase_timestamp) < 0) goto cleanup; /* need to seek back to the end of the file to write the * trailer below */ if (lseek (fd, 0, SEEK_END) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); goto cleanup; } } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_CREATE_INVALID_RECORD_COUNT); goto cleanup; } } if (_sdr_cache_trailer_write (ctx, ipmi_ctx, fd, total_bytes_written, trailer_checksum) < 0) goto cleanup; if (fsync (fd) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (close (fd) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } fd = -1; rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: ctx->operation = IPMI_SDR_OPERATION_UNINITIALIZED; if (fd >= 0) { /* If the cache create never completed, try to remove the file */ /* ignore potential error, cleanup path */ unlink (filename); /* ignore potential error, cleanup path */ close (fd); } free (record_ids); sdr_init_ctx (ctx); return (rv); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-defs.h0000644002055400205540000001206213527331637021160 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-defs.h,v 1.13 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_SDR_DEFS_H #define IPMI_SDR_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include /* off_t */ #include #if HAVE_UNISTD_H #include /* off_t */ #endif /* HAVE_UNISTD_H */ #include "freeipmi/sdr/ipmi-sdr.h" #include "list.h" #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ #define IPMI_SDR_CTX_MAGIC 0xABCD9876 #define IPMI_SDR_OPERATION_UNINITIALIZED 0 #define IPMI_SDR_OPERATION_CREATE_CACHE 1 #define IPMI_SDR_OPERATION_READ_CACHE 2 #define IPMI_SDR_OPERATION_DELETE_CACHE 3 /* Why use indexes instead of fiid templates? B/c that's how it was * written before libipmimonitoring's libipmisdrcache was written before * it was included in freeipmi. */ #define IPMI_SDR_RECORD_HEADER_LENGTH 5 #define IPMI_SDR_RECORD_LENGTH_INDEX 4 #define IPMI_SDR_RECORD_ID_INDEX_LS 0 #define IPMI_SDR_RECORD_ID_INDEX_MS 1 #define IPMI_SDR_RECORD_TYPE_INDEX 3 #define IPMI_SDR_RECORD_SENSOR_OWNER_ID_INDEX 5 #define IPMI_SDR_RECORD_SENSOR_NUMBER_INDEX 7 #define IPMI_SDR_RECORD_COMPACT_SHARE_COUNT 23 #define IPMI_SDR_RECORD_COMPACT_SHARE_COUNT_BITMASK 0x0F #define IPMI_SDR_RECORD_COMPACT_SHARE_COUNT_SHIFT 0 #define IPMI_SDR_RECORD_EVENT_SHARE_COUNT 12 #define IPMI_SDR_RECORD_EVENT_SHARE_COUNT_BITMASK 0x0F #define IPMI_SDR_RECORD_EVENT_SHARE_COUNT_SHIFT 0 #if 0 /* Original - sdr cache version 1.0 - keep for documentation history */ #define IPMI_SDR_CACHE_FILE_MAGIC_0 0xEF #define IPMI_SDR_CACHE_FILE_MAGIC_1 0xE7 #define IPMI_SDR_CACHE_FILE_MAGIC_2 0x35 #define IPMI_SDR_CACHE_FILE_MAGIC_3 0x7C #endif #define IPMI_SDR_CACHE_FILE_MAGIC_0 0x72 #define IPMI_SDR_CACHE_FILE_MAGIC_1 0x8C #define IPMI_SDR_CACHE_FILE_MAGIC_2 0x9D #define IPMI_SDR_CACHE_FILE_MAGIC_3 0x1F /* Cache Version 0.1 format * * magic bytes (4 bytes) * version bytes (4) * sdr version (1) * record count (2) * most recent addition timestamp (4) * most recent erase timestamp (4) * records (variable) */ #define IPMI_SDR_CACHE_FILE_VERSION_1_0 0x00 #define IPMI_SDR_CACHE_FILE_VERSION_1_1 0x00 #define IPMI_SDR_CACHE_FILE_VERSION_1_2 0x00 #define IPMI_SDR_CACHE_FILE_VERSION_1_3 0x01 /* Cache Version 1.2 format * * magic bytes (4 bytes) * version bytes (4) * sdr version (1) * record count (2) * most recent addition timestamp (4) * most recent erase timestamp (4) * header checksum (1) [all bytes above] * records (variable) * total bytes of file (4) * trailer checksum (1) [records + total bytes of file] */ #define IPMI_SDR_CACHE_FILE_VERSION_1_2_0 0x00 #define IPMI_SDR_CACHE_FILE_VERSION_1_2_1 0x01 #define IPMI_SDR_CACHE_FILE_VERSION_1_2_2 0x00 #define IPMI_SDR_CACHE_FILE_VERSION_1_2_3 0x02 #define IPMI_MAX_ENTITY_IDS 256 #define IPMI_MAX_ENTITY_ID_INSTANCES 256 struct ipmi_sdr_offset { off_t offset; int offset_dumped; }; struct ipmi_sdr_entity_count { uint8_t entity_instances[IPMI_MAX_ENTITY_ID_INSTANCES]; unsigned int entity_instances_count; }; struct ipmi_sdr_ctx { uint32_t magic; int errnum; unsigned int operation; unsigned int flags; char *debug_prefix; uint8_t sdr_version; uint16_t record_count; uint32_t most_recent_addition_timestamp; uint32_t most_recent_erase_timestamp; /* Cache Reading Vars */ int fd; off_t file_size; off_t records_start_offset; off_t records_end_offset; uint8_t *sdr_cache; struct ipmi_sdr_offset current_offset; int callback_lock; /* for saving/reset */ List saved_offsets; /* Stats */ int stats_compiled; struct ipmi_sdr_entity_count entity_counts[IPMI_MAX_ENTITY_IDS]; }; #endif /* IPMI_SDR_DEFS_H */ freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-cache-delete.c0000644002055400205540000000541513527331637022541 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-cache-delete.c,v 1.11 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "freeipmi/sdr/ipmi-sdr.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" int ipmi_sdr_cache_delete (ipmi_sdr_ctx_t ctx, const char *filename) { int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!filename) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_UNINITIALIZED) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CONTEXT_PERFORMING_OTHER_OPERATION); else SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); return (-1); } ctx->operation = IPMI_SDR_OPERATION_DELETE_CACHE; if (unlink (filename) < 0) { /* If there is no file (ENOENT), its ok */ if (errno != ENOENT) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: ctx->operation = IPMI_SDR_OPERATION_UNINITIALIZED; return (rv); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-cache-read.c0000644002055400205540000006501213527331637022211 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-cache-read.c,v 1.33 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" static void _sdr_set_current_offset (ipmi_sdr_ctx_t ctx, off_t new_offset) { assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); ctx->current_offset.offset = new_offset; ctx->current_offset.offset_dumped = 0; } int ipmi_sdr_cache_open (ipmi_sdr_ctx_t ctx, ipmi_ctx_t ipmi_ctx, const char *filename) { uint8_t sdr_version; uint16_t record_count; uint32_t most_recent_addition_timestamp, most_recent_erase_timestamp; char sdr_version_buf; char sdr_cache_magic_buf[4]; char sdr_cache_version_buf[4]; char record_count_buf[2]; char most_recent_addition_timestamp_buf[4]; char most_recent_erase_timestamp_buf[4]; struct stat stat_buf; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!filename) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_UNINITIALIZED) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE) SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_ALREADY_INITIALIZED); else SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); return (-1); } if (stat (filename, &stat_buf) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } /* File Size must be atleast magic_buf + file_version_buf + * sdr_version_buf + record_count_buf + * most_recent_addition_timestamp_buf + * most_recent_erase_timestamp-buf in size. */ ctx->file_size = stat_buf.st_size; if (ctx->file_size < (4 + 4 + 1 + 2 + 4 + 4)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } if ((ctx->fd = open (filename, O_RDONLY)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } ctx->sdr_cache = (uint8_t *)mmap (NULL, ctx->file_size, PROT_READ, MAP_PRIVATE, ctx->fd, 0); if (!ctx->sdr_cache || ctx->sdr_cache == ((void *) -1)) { ERRNO_TRACE (errno); SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_SYSTEM_ERROR); goto cleanup; } memcpy (sdr_cache_magic_buf, ctx->sdr_cache + ctx->records_start_offset, 4); ctx->records_start_offset += 4; memcpy (sdr_cache_version_buf, ctx->sdr_cache + ctx->records_start_offset, 4); ctx->records_start_offset += 4; memcpy (&sdr_version_buf, ctx->sdr_cache + ctx->records_start_offset, 1); ctx->records_start_offset += 1; memcpy (record_count_buf, ctx->sdr_cache + ctx->records_start_offset, 2); ctx->records_start_offset += 2; memcpy (most_recent_addition_timestamp_buf, ctx->sdr_cache + ctx->records_start_offset, 4); ctx->records_start_offset += 4; memcpy (most_recent_erase_timestamp_buf, ctx->sdr_cache + ctx->records_start_offset, 4); ctx->records_start_offset += 4; if ((uint8_t)sdr_cache_magic_buf[0] != IPMI_SDR_CACHE_FILE_MAGIC_0 || (uint8_t)sdr_cache_magic_buf[1] != IPMI_SDR_CACHE_FILE_MAGIC_1 || (uint8_t)sdr_cache_magic_buf[2] != IPMI_SDR_CACHE_FILE_MAGIC_2 || (uint8_t)sdr_cache_magic_buf[3] != IPMI_SDR_CACHE_FILE_MAGIC_3) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } if (((uint8_t)sdr_cache_version_buf[0] != IPMI_SDR_CACHE_FILE_VERSION_1_0 || (uint8_t)sdr_cache_version_buf[1] != IPMI_SDR_CACHE_FILE_VERSION_1_1 || (uint8_t)sdr_cache_version_buf[2] != IPMI_SDR_CACHE_FILE_VERSION_1_2 || (uint8_t)sdr_cache_version_buf[3] != IPMI_SDR_CACHE_FILE_VERSION_1_3) && ((uint8_t)sdr_cache_version_buf[0] != IPMI_SDR_CACHE_FILE_VERSION_1_2_0 || (uint8_t)sdr_cache_version_buf[1] != IPMI_SDR_CACHE_FILE_VERSION_1_2_1 || (uint8_t)sdr_cache_version_buf[2] != IPMI_SDR_CACHE_FILE_VERSION_1_2_2 || (uint8_t)sdr_cache_version_buf[3] != IPMI_SDR_CACHE_FILE_VERSION_1_2_3)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } ctx->sdr_version = (uint8_t)sdr_version_buf; ctx->record_count = ((uint16_t)record_count_buf[0] & 0xFF); ctx->record_count |= ((uint16_t)record_count_buf[1] & 0xFF) << 8; ctx->most_recent_addition_timestamp = ((uint32_t)most_recent_addition_timestamp_buf[0] & 0xFF); ctx->most_recent_addition_timestamp |= ((uint32_t)most_recent_addition_timestamp_buf[1] & 0xFF) << 8; ctx->most_recent_addition_timestamp |= ((uint32_t)most_recent_addition_timestamp_buf[2] & 0xFF) << 16; ctx->most_recent_addition_timestamp |= ((uint32_t)most_recent_addition_timestamp_buf[3] & 0xFF) << 24; ctx->most_recent_erase_timestamp = ((uint32_t)most_recent_erase_timestamp_buf[0] & 0xFF); ctx->most_recent_erase_timestamp |= ((uint32_t)most_recent_erase_timestamp_buf[1] & 0xFF) << 8; ctx->most_recent_erase_timestamp |= ((uint32_t)most_recent_erase_timestamp_buf[2] & 0xFF) << 16; ctx->most_recent_erase_timestamp |= ((uint32_t)most_recent_erase_timestamp_buf[3] & 0xFF) << 24; if (ipmi_ctx) { if (sdr_info (ctx, ipmi_ctx, &sdr_version, &record_count, &most_recent_addition_timestamp, &most_recent_erase_timestamp) < 0) goto cleanup; if (ctx->sdr_version != sdr_version || ctx->most_recent_addition_timestamp != most_recent_addition_timestamp || ctx->most_recent_erase_timestamp != most_recent_erase_timestamp) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_OUT_OF_DATE); goto cleanup; } } if ((uint8_t)sdr_cache_version_buf[0] == IPMI_SDR_CACHE_FILE_VERSION_1_2_0 && (uint8_t)sdr_cache_version_buf[1] == IPMI_SDR_CACHE_FILE_VERSION_1_2_1 && (uint8_t)sdr_cache_version_buf[2] == IPMI_SDR_CACHE_FILE_VERSION_1_2_2 && (uint8_t)sdr_cache_version_buf[3] == IPMI_SDR_CACHE_FILE_VERSION_1_2_3) { uint8_t header_checksum_buf[512]; unsigned int header_checksum_buf_len = 0; uint8_t header_checksum, header_checksum_cache; uint8_t trailer_checksum, trailer_checksum_cache; char total_bytes_written_buf[4]; unsigned int total_bytes_written; unsigned int header_bytes_len; unsigned int trailer_bytes_len; /* File Size must be atleast magic_buf + file_version_buf + * sdr_version_buf + record_count_buf + * most_recent_addition_timestamp_buf + * most_recent_erase_timestamp-buf + header_checksum + trailer * bytes written + trailer records checksum. */ header_bytes_len = 4 + 4 + 1 + 2 + 4 + 4 + 1; trailer_bytes_len = 4 + 1; if (ctx->file_size < (header_bytes_len + trailer_bytes_len)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } memcpy (&header_checksum_cache, ctx->sdr_cache + ctx->records_start_offset, 1); ctx->records_start_offset += 1; memcpy(&header_checksum_buf[header_checksum_buf_len], sdr_cache_magic_buf, 4); header_checksum_buf_len += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], sdr_cache_version_buf, 4); header_checksum_buf_len += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], &sdr_version_buf, 1); header_checksum_buf_len += 1; memcpy(&header_checksum_buf[header_checksum_buf_len], record_count_buf, 2); header_checksum_buf_len += 2; memcpy(&header_checksum_buf[header_checksum_buf_len], most_recent_addition_timestamp_buf, 4); header_checksum_buf_len += 4; memcpy(&header_checksum_buf[header_checksum_buf_len], most_recent_erase_timestamp_buf, 4); header_checksum_buf_len += 4; header_checksum = ipmi_checksum (header_checksum_buf, header_checksum_buf_len); if (header_checksum != header_checksum_cache) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } /* total_bytes_written is written before checksum */ /* checksum of records is last byte written */ memcpy (total_bytes_written_buf, ctx->sdr_cache + ctx->file_size - 5, 4); memcpy (&trailer_checksum_cache, ctx->sdr_cache + ctx->file_size - 1, 1); total_bytes_written = ((uint32_t)total_bytes_written_buf[0] & 0xFF); total_bytes_written |= ((uint32_t)total_bytes_written_buf[1] & 0xFF) << 8; total_bytes_written |= ((uint32_t)total_bytes_written_buf[2] & 0xFF) << 16; total_bytes_written |= ((uint32_t)total_bytes_written_buf[3] & 0xFF) << 24; if (total_bytes_written != ctx->file_size) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } /* -1 for checksum */ trailer_checksum = ipmi_checksum (ctx->sdr_cache + ctx->records_start_offset, total_bytes_written - ctx->records_start_offset - 1); if (trailer_checksum != trailer_checksum_cache) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_INVALID); goto cleanup; } ctx->records_end_offset = ctx->file_size - trailer_bytes_len; } else /* (uint8_t)sdr_cache_version_buf[0] == IPMI_SDR_CACHE_FILE_VERSION_1_0 && (uint8_t)sdr_cache_version_buf[1] == IPMI_SDR_CACHE_FILE_VERSION_1_1 && (uint8_t)sdr_cache_version_buf[2] == IPMI_SDR_CACHE_FILE_VERSION_1_2 && (uint8_t)sdr_cache_version_buf[3] == IPMI_SDR_CACHE_FILE_VERSION_1_3 */ ctx->records_end_offset = ctx->file_size; _sdr_set_current_offset (ctx, ctx->records_start_offset); ctx->operation = IPMI_SDR_OPERATION_READ_CACHE; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); cleanup: /* ignore potential error, cleanup path */ if (ctx->fd >= 0) close (ctx->fd); /* ignore potential error, cleanup path */ if (ctx->sdr_cache) munmap ((void *)ctx->sdr_cache, ctx->file_size); sdr_init_ctx (ctx); return (-1); } int ipmi_sdr_cache_sdr_version (ipmi_sdr_ctx_t ctx, uint8_t *sdr_version) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!sdr_version) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } *sdr_version = ctx->sdr_version; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_record_count (ipmi_sdr_ctx_t ctx, uint16_t *record_count) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!record_count) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } *record_count = ctx->record_count; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_most_recent_addition_timestamp (ipmi_sdr_ctx_t ctx, uint32_t *most_recent_addition_timestamp) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!most_recent_addition_timestamp) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } *most_recent_addition_timestamp = ctx->most_recent_addition_timestamp; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_most_recent_erase_timestamp (ipmi_sdr_ctx_t ctx, uint32_t *most_recent_erase_timestamp) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!most_recent_erase_timestamp) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } *most_recent_erase_timestamp = ctx->most_recent_erase_timestamp; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_first (ipmi_sdr_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } _sdr_set_current_offset (ctx, ctx->records_start_offset); ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_next (ipmi_sdr_ctx_t ctx) { unsigned int record_length; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } record_length = (uint8_t)((ctx->sdr_cache + ctx->current_offset.offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if ((ctx->current_offset.offset + record_length + IPMI_SDR_RECORD_HEADER_LENGTH) >= ctx->records_end_offset) return (0); _sdr_set_current_offset (ctx, ctx->current_offset.offset + IPMI_SDR_RECORD_HEADER_LENGTH + record_length); ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (1); } int ipmi_sdr_cache_seek (ipmi_sdr_ctx_t ctx, unsigned int index) { off_t offset; unsigned int i; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (index >= ctx->record_count) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } offset = ctx->records_start_offset; for (i = 0; i < index; i++) { unsigned int record_length; record_length = (uint8_t)((ctx->sdr_cache + offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if ((offset + record_length + IPMI_SDR_RECORD_HEADER_LENGTH) >= ctx->records_end_offset) break; offset += IPMI_SDR_RECORD_HEADER_LENGTH; offset += record_length; } _sdr_set_current_offset (ctx, offset); ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_search_record_id (ipmi_sdr_ctx_t ctx, uint16_t record_id) { off_t offset; int found = 0; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } offset = ctx->records_start_offset; while (offset < ctx->records_end_offset) { uint8_t *ptr = ctx->sdr_cache + offset; uint16_t record_id_current; unsigned int record_length; /* Record ID stored little-endian */ record_id_current = (uint16_t)ptr[IPMI_SDR_RECORD_ID_INDEX_LS] & 0xFF; record_id_current |= ((uint16_t)ptr[IPMI_SDR_RECORD_ID_INDEX_MS] & 0xFF) << 8; if (record_id == record_id_current) { found++; _sdr_set_current_offset (ctx, offset); break; } record_length = (uint8_t)((ctx->sdr_cache + offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if ((offset + record_length + IPMI_SDR_RECORD_HEADER_LENGTH) >= ctx->records_end_offset) break; offset += IPMI_SDR_RECORD_HEADER_LENGTH; offset += record_length; } if (!found) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_NOT_FOUND); return (-1); } ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_search_sensor (ipmi_sdr_ctx_t ctx, uint8_t sensor_number, uint8_t sensor_owner_id) { off_t offset; int found = 0; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } offset = ctx->records_start_offset; while (offset < ctx->records_end_offset) { uint8_t *ptr = ctx->sdr_cache + offset; uint8_t record_type_current; unsigned int record_length; record_type_current = ptr[IPMI_SDR_RECORD_TYPE_INDEX]; if (record_type_current == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD || record_type_current == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type_current == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { uint8_t sensor_number_current; uint8_t sensor_owner_id_current; sensor_owner_id_current = ptr[IPMI_SDR_RECORD_SENSOR_OWNER_ID_INDEX]; sensor_number_current = ptr[IPMI_SDR_RECORD_SENSOR_NUMBER_INDEX]; if (sensor_owner_id_current == sensor_owner_id && sensor_number_current == sensor_number) { found++; _sdr_set_current_offset (ctx, offset); break; } /* Compact sensor records can do record sharing, so check * for this case if the sensor_owner_id matches up. */ if (sensor_owner_id_current == sensor_owner_id && (record_type_current == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type_current == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD)) { uint8_t share_count; if (record_type_current == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { share_count = ptr[IPMI_SDR_RECORD_COMPACT_SHARE_COUNT]; share_count &= IPMI_SDR_RECORD_COMPACT_SHARE_COUNT_BITMASK; share_count >>= IPMI_SDR_RECORD_COMPACT_SHARE_COUNT_SHIFT; } else { share_count = ptr[IPMI_SDR_RECORD_EVENT_SHARE_COUNT]; share_count &= IPMI_SDR_RECORD_EVENT_SHARE_COUNT_BITMASK; share_count >>= IPMI_SDR_RECORD_EVENT_SHARE_COUNT_SHIFT; } /* IPMI spec gives the following example: * * "If the starting sensor number was 10, and the share * count was 3, then sensors 10, 11, and 12 would share * the record" */ if (share_count > 1 && (sensor_number > sensor_number_current && sensor_number <= (sensor_number_current + (share_count - 1)))) { found++; _sdr_set_current_offset (ctx, offset); break; } } } record_length = (uint8_t)((ctx->sdr_cache + offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if ((offset + record_length + IPMI_SDR_RECORD_HEADER_LENGTH) >= ctx->records_end_offset) break; offset += IPMI_SDR_RECORD_HEADER_LENGTH; offset += record_length; } if (!found) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_NOT_FOUND); return (-1); } ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } int ipmi_sdr_cache_record_read (ipmi_sdr_ctx_t ctx, void *buf, unsigned int buflen) { unsigned int record_length; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!buf || !buflen) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } record_length = (uint8_t)((ctx->sdr_cache + ctx->current_offset.offset)[IPMI_SDR_RECORD_LENGTH_INDEX]); if (buflen < (record_length + IPMI_SDR_RECORD_HEADER_LENGTH)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OVERFLOW); return (-1); } sdr_check_read_status (ctx); memcpy (buf, ctx->sdr_cache + ctx->current_offset.offset, record_length + IPMI_SDR_RECORD_HEADER_LENGTH); ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (record_length + IPMI_SDR_RECORD_HEADER_LENGTH); } static int _sdr_save_current_offset (ipmi_sdr_ctx_t ctx) { struct ipmi_sdr_offset *saved_offset = NULL; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); if (!(saved_offset = (struct ipmi_sdr_offset *)malloc (sizeof (struct ipmi_sdr_offset)))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); return (-1); } memcpy (saved_offset, &ctx->current_offset, sizeof (struct ipmi_sdr_offset)); if (!list_push (ctx->saved_offsets, saved_offset)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } return (0); cleanup: free (saved_offset); return (-1); } static int _sdr_reset_current_offset (ipmi_sdr_ctx_t ctx) { struct ipmi_sdr_offset *saved_offset = NULL; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (list_count (ctx->saved_offsets) > 0); if (!(saved_offset = list_pop (ctx->saved_offsets))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); return (-1); } memcpy (&ctx->current_offset, saved_offset, sizeof (struct ipmi_sdr_offset)); free (saved_offset); return (0); } int ipmi_sdr_cache_iterate (ipmi_sdr_ctx_t ctx, Ipmi_Sdr_Cache_Iterate_Callback iterate_callback, void *iterate_callback_data) { uint16_t record_count; unsigned int i; int tmpret; int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!iterate_callback) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (_sdr_save_current_offset (ctx) < 0) return (-1); if (ipmi_sdr_cache_record_count (ctx, &record_count) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); goto cleanup; } if (ipmi_sdr_cache_first (ctx) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); goto cleanup; } for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (ctx)) { uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_len; uint8_t record_type; int ret; memset (sdr_record, '\0', IPMI_SDR_MAX_RECORD_LENGTH); if ((sdr_record_len = ipmi_sdr_cache_record_read (ctx, sdr_record, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); goto cleanup; } record_type = sdr_record[IPMI_SDR_RECORD_TYPE_INDEX]; ctx->callback_lock = 1; ret = iterate_callback (ctx, record_type, sdr_record, (unsigned int)sdr_record_len, iterate_callback_data); ctx->callback_lock = 0; if (ret < 0) { rv = ret; SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_ERROR_RETURNED_IN_CALLBACK); goto cleanup; } if (ret > 0) { rv = ret; goto out; } } rv = 0; out: ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: tmpret = _sdr_reset_current_offset (ctx); if (rv) return (rv); return (tmpret); } int ipmi_sdr_cache_close (ipmi_sdr_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (ctx->callback_lock) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CONTEXT_PERFORMING_OTHER_OPERATION); return (-1); } /* ignore potential error, cleanup path */ if (ctx->fd >= 0) close (ctx->fd); /* ignore potential error, cleanup path */ if (ctx->sdr_cache) munmap ((void *)ctx->sdr_cache, ctx->file_size); sdr_init_ctx (ctx); ctx->operation = IPMI_SDR_OPERATION_UNINITIALIZED; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (0); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-oem-intel-node-manager.c0000644002055400205540000001657513527331637024473 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/record-format/oem/ipmi-sdr-oem-intel-node-manager-record-format.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" /* return (1) - is oem intel node manager, fully parsed * return (0) - is not oem intel node manager * return (-1) - error */ int ipmi_sdr_oem_parse_intel_node_manager (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *nm_device_slave_address, uint8_t *sensor_owner_lun, uint8_t *channel_number, uint8_t *nm_health_event_sensor_number, uint8_t *nm_exception_event_sensor_number, uint8_t *nm_operational_capabilities_sensor_number, uint8_t *nm_alert_threshold_exceeded_sensor_number) { uint8_t sdr_record_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_buf_len; fiid_obj_t obj_oem_record = NULL; int expected_record_len; void *sdr_record_to_use; unsigned int sdr_record_len_to_use; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!sdr_record || !sdr_record_len) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE && !sdr_record && !sdr_record_len) { if ((sdr_record_buf_len = ipmi_sdr_cache_record_read (ctx, sdr_record_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); return (-1); } sdr_record_to_use = sdr_record_buf; sdr_record_len_to_use = sdr_record_buf_len; } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } } else { sdr_record_to_use = (void *)sdr_record; sdr_record_len_to_use = sdr_record_len; } if ((expected_record_len = fiid_template_len_bytes (tmpl_sdr_oem_intel_node_manager_record)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (sdr_record_len_to_use < expected_record_len) { rv = 0; goto cleanup; } if (!(obj_oem_record = fiid_obj_create (tmpl_sdr_oem_intel_node_manager_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_oem_record, sdr_record_to_use, expected_record_len) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } /* achu: Node Manager documentation states that OEM ID in the * SDR record should be Intel's, but I've seen motherboards w/o * it, so don't bother checking. */ if (FIID_OBJ_GET (obj_oem_record, "record_subtype", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } if (val != IPMI_SDR_OEM_INTEL_NODE_MANAGER_RECORD_SUBTYPE_NM_DISCOVERY) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_oem_record, "version_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } if (val != IPMI_SDR_OEM_INTEL_NODE_MANAGER_DISCOVERY_VERSION) { rv = 0; goto cleanup; } if (nm_device_slave_address) { if (FIID_OBJ_GET (obj_oem_record, "nm_device_slave_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*nm_device_slave_address) = val; } if (sensor_owner_lun) { if (FIID_OBJ_GET (obj_oem_record, "sensor_owner_lun", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*sensor_owner_lun) = val; } if (channel_number) { if (FIID_OBJ_GET (obj_oem_record, "channel_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*channel_number) = val; } if (nm_health_event_sensor_number) { if (FIID_OBJ_GET (obj_oem_record, "nm_health_event_sensor_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*nm_health_event_sensor_number) = val; } if (nm_exception_event_sensor_number) { if (FIID_OBJ_GET (obj_oem_record, "nm_exception_event_sensor_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*nm_exception_event_sensor_number) = val; } if (nm_operational_capabilities_sensor_number) { if (FIID_OBJ_GET (obj_oem_record, "nm_operational_capabilities_sensor_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*nm_operational_capabilities_sensor_number) = val; } if (nm_alert_threshold_exceeded_sensor_number) { if (FIID_OBJ_GET (obj_oem_record, "nm_alert_threshold_exceeded_sensor_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_oem_record); goto cleanup; } (*nm_alert_threshold_exceeded_sensor_number) = val; } sdr_check_read_status (ctx); rv = 1; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_oem_record); return (rv); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-parse.c0000644002055400205540000040467213527331637021360 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-sensor-units-spec.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/util/ipmi-sensor-util.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #define IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD 0x0001 #define IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD 0x0002 #define IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD 0x0004 #define IPMI_SDR_PARSE_RECORD_TYPE_ENTITY_ASSOCIATION_RECORD 0x0008 #define IPMI_SDR_PARSE_RECORD_TYPE_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD 0x0010 #define IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD 0x0020 #define IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD 0x0040 #define IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD 0x0080 #define IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD 0x0100 #define IPMI_SDR_PARSE_RECORD_TYPE_BMC_MESSAGE_CHANNEL_INFO_RECORD 0x0200 #define IPMI_SDR_PARSE_RECORD_TYPE_OEM_RECORD 0x0400 int ipmi_sdr_parse_record_id_and_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint16_t *record_id, uint8_t *record_type) { uint8_t sdr_record_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_buf_len; fiid_obj_t obj_sdr_record_header = NULL; int sdr_record_header_len; void *sdr_record_to_use; unsigned int sdr_record_len_to_use; uint64_t val; int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (!sdr_record || !sdr_record_len) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE && !sdr_record && !sdr_record_len) { if ((sdr_record_buf_len = ipmi_sdr_cache_record_read (ctx, sdr_record_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); return (-1); } sdr_record_to_use = sdr_record_buf; sdr_record_len_to_use = sdr_record_buf_len; } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } } else { sdr_record_to_use = (void *)sdr_record; sdr_record_len_to_use = sdr_record_len; } if ((sdr_record_header_len = fiid_template_len_bytes (tmpl_sdr_record_header)) < 0) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (sdr_record_len_to_use < sdr_record_header_len) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_header = fiid_obj_create (tmpl_sdr_record_header))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sdr_record_header, sdr_record_to_use, sdr_record_header_len) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } if (record_id) { if (FIID_OBJ_GET (obj_sdr_record_header, "record_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } *record_id = val; } if (record_type) { if (FIID_OBJ_GET (obj_sdr_record_header, "record_type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_header); goto cleanup; } *record_type = val; } sdr_check_read_status (ctx); rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record_header); return (rv); } static fiid_obj_t _sdr_record_get_common (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint32_t acceptable_record_types) { uint8_t sdr_record_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_buf_len; void *sdr_record_to_use; unsigned int sdr_record_len_to_use; fiid_obj_t obj_sdr_record = NULL; uint8_t record_type; assert (acceptable_record_types); if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); goto cleanup; } if (!sdr_record || !sdr_record_len) { if (ctx->operation == IPMI_SDR_OPERATION_READ_CACHE && !sdr_record && !sdr_record_len) { if ((sdr_record_buf_len = ipmi_sdr_cache_record_read (ctx, sdr_record_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); goto cleanup; } sdr_record_to_use = sdr_record_buf; sdr_record_len_to_use = sdr_record_buf_len; } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); goto cleanup; } } else { sdr_record_to_use = (void *)sdr_record; sdr_record_len_to_use = sdr_record_len; } if (ipmi_sdr_parse_record_id_and_type (ctx, sdr_record_to_use, sdr_record_len_to_use, NULL, &record_type) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); goto cleanup; } if (!(((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD) && record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD) && record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD) && record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_ENTITY_ASSOCIATION_RECORD) && record_type == IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD) && record_type == IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD) && record_type == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD) && record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) && record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD) && record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_BMC_MESSAGE_CHANNEL_INFO_RECORD) && record_type == IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD) || ((acceptable_record_types & IPMI_SDR_PARSE_RECORD_TYPE_OEM_RECORD) && record_type == IPMI_SDR_FORMAT_OEM_RECORD) )) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_full_sensor_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_compact_sensor_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_event_only_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_entity_association_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_device_relative_entity_association_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_generic_device_locator_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_fru_device_locator_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_management_controller_device_locator_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_management_controller_confirmation_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_bmc_message_channel_info_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type == IPMI_SDR_FORMAT_OEM_RECORD) { if (!(obj_sdr_record = fiid_obj_create (tmpl_sdr_oem_record))) { SDR_ERRNO_TO_SDR_ERRNUM (ctx, errno); goto cleanup; } } if (fiid_obj_set_all (obj_sdr_record, sdr_record_to_use, sdr_record_len_to_use) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } sdr_check_read_status (ctx); return (obj_sdr_record); cleanup: fiid_obj_destroy (obj_sdr_record); return (NULL); } int ipmi_sdr_parse_sensor_owner_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_owner_id_type, uint8_t *sensor_owner_id) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_owner_id_type) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_owner_id.type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_owner_id_type = val; } if (sensor_owner_id) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_owner_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_owner_id = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_owner_lun (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_owner_lun, uint8_t *channel_number) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_owner_lun) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_owner_lun", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_owner_lun = val; } if (channel_number) { if (FIID_OBJ_GET (obj_sdr_record, "channel_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *channel_number = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_number (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_number) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_number) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_number = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_entity_id_instance_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *entity_id, uint8_t *entity_instance, uint8_t *entity_instance_type) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (entity_id) { if (FIID_OBJ_GET (obj_sdr_record, "entity_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *entity_id = val; } if (entity_instance) { if (FIID_OBJ_GET (obj_sdr_record, "entity_instance", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *entity_instance = val; } if (entity_instance_type) { if (FIID_OBJ_GET (obj_sdr_record, "entity_instance.type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *entity_instance_type = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_type) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_type) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_type = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_event_reading_type_code (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_reading_type_code) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (event_reading_type_code) { if (FIID_OBJ_GET (obj_sdr_record, "event_reading_type_code", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *event_reading_type_code = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_id_string (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, char *id_string, unsigned int id_string_len) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int len = 0; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (id_string && id_string_len) { if ((len = fiid_obj_get_data (obj_sdr_record, "id_string", id_string, id_string_len)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } rv = len; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_units (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_units_percentage, uint8_t *sensor_units_modifier, uint8_t *sensor_units_rate, uint8_t *sensor_base_unit_type, uint8_t *sensor_modifier_unit_type) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_units_percentage) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit1.percentage", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_units_percentage = val; } if (sensor_units_modifier) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit1.modifier_unit", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_units_modifier = val; } if (sensor_units_rate) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit1.rate_unit", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_units_rate = val; } if (sensor_base_unit_type) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit2.base_unit", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_base_unit_type = val; if (!IPMI_SENSOR_UNIT_VALID (*sensor_base_unit_type)) *sensor_base_unit_type = IPMI_SENSOR_UNIT_UNSPECIFIED; } if (sensor_modifier_unit_type) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit3.modifier_unit", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_modifier_unit_type = val; if (!IPMI_SENSOR_UNIT_VALID (*sensor_modifier_unit_type)) *sensor_modifier_unit_type = IPMI_SENSOR_UNIT_UNSPECIFIED; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_capabilities (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_message_control_support, uint8_t *threshold_access_support, uint8_t *hysteresis_support, uint8_t *auto_re_arm_support, uint8_t *entity_ignore_support) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (event_message_control_support) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_capabilities.event_message_control_support", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *event_message_control_support = val; } if (threshold_access_support) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_capabilities.threshold_access_support", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *threshold_access_support = val; } if (hysteresis_support) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_capabilities.hysteresis_support", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *hysteresis_support = val; } if (auto_re_arm_support) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_capabilities.auto_re_arm_support", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *auto_re_arm_support = val; } if (entity_ignore_support) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_capabilities.entity_ignore_support", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *entity_ignore_support = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_direction (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *sensor_direction) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (sensor_direction) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_direction", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *sensor_direction = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_assertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_state_0, uint8_t *event_state_1, uint8_t *event_state_2, uint8_t *event_state_3, uint8_t *event_state_4, uint8_t *event_state_5, uint8_t *event_state_6, uint8_t *event_state_7, uint8_t *event_state_8, uint8_t *event_state_9, uint8_t *event_state_10, uint8_t *event_state_11, uint8_t *event_state_12, uint8_t *event_state_13, uint8_t *event_state_14) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_discrete = NULL; uint32_t acceptable_record_types; uint8_t record_type; uint8_t event_reading_type_code; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code) && !IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } /* convert obj_sdr_record to appropriate format we care about */ if (ipmi_sdr_parse_record_id_and_type (ctx, sdr_record, sdr_record_len, NULL, &record_type) < 0) goto cleanup; if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { if (!(obj_sdr_record_discrete = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_non_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } else { if (!(obj_sdr_record_discrete = fiid_obj_copy (obj_sdr_record, tmpl_sdr_compact_sensor_record_non_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } if (event_state_0) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_0", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_0 = val; } if (event_state_1) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_1", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_1 = val; } if (event_state_2) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_2", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_2 = val; } if (event_state_3) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_3", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_3 = val; } if (event_state_4) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_4", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_4 = val; } if (event_state_5) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_5", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_5 = val; } if (event_state_6) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_6", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_6 = val; } if (event_state_7) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_7", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_7 = val; } if (event_state_8) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_8", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_8 = val; } if (event_state_9) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_9", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_9 = val; } if (event_state_10) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_10", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_10 = val; } if (event_state_11) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_11", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_11 = val; } if (event_state_12) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_12", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_12 = val; } if (event_state_13) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_13", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_13 = val; } if (event_state_14) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "assertion_event_mask.event_offset_14", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_14 = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_discrete); return (rv); } int ipmi_sdr_parse_deassertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_state_0, uint8_t *event_state_1, uint8_t *event_state_2, uint8_t *event_state_3, uint8_t *event_state_4, uint8_t *event_state_5, uint8_t *event_state_6, uint8_t *event_state_7, uint8_t *event_state_8, uint8_t *event_state_9, uint8_t *event_state_10, uint8_t *event_state_11, uint8_t *event_state_12, uint8_t *event_state_13, uint8_t *event_state_14) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_discrete = NULL; uint32_t acceptable_record_types; uint8_t record_type; uint8_t event_reading_type_code; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code) && !IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } /* convert obj_sdr_record to appropriate format we care about */ if (ipmi_sdr_parse_record_id_and_type (ctx, sdr_record, sdr_record_len, NULL, &record_type) < 0) goto cleanup; if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { if (!(obj_sdr_record_discrete = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_non_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } else { if (!(obj_sdr_record_discrete = fiid_obj_copy (obj_sdr_record, tmpl_sdr_compact_sensor_record_non_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } if (event_state_0) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_0", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_0 = val; } if (event_state_1) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_1", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_1 = val; } if (event_state_2) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_2", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_2 = val; } if (event_state_3) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_3", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_3 = val; } if (event_state_4) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_4", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_4 = val; } if (event_state_5) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_5", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_5 = val; } if (event_state_6) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_6", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_6 = val; } if (event_state_7) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_7", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_7 = val; } if (event_state_8) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_8", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_8 = val; } if (event_state_9) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_9", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_9 = val; } if (event_state_10) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_10", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_10 = val; } if (event_state_11) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_11", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_11 = val; } if (event_state_12) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_12", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_12 = val; } if (event_state_13) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_13", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_13 = val; } if (event_state_14) { if (FIID_OBJ_GET (obj_sdr_record_discrete, "deassertion_event_mask.event_offset_14", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_discrete); goto cleanup; } *event_state_14 = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_discrete); return (rv); } int ipmi_sdr_parse_threshold_assertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_going_low, uint8_t *lower_non_critical_going_high, uint8_t *lower_critical_going_low, uint8_t *lower_critical_going_high, uint8_t *lower_non_recoverable_going_low, uint8_t *lower_non_recoverable_going_high, uint8_t *upper_non_critical_going_low, uint8_t *upper_non_critical_going_high, uint8_t *upper_critical_going_low, uint8_t *upper_critical_going_high, uint8_t *upper_non_recoverable_going_low, uint8_t *upper_non_recoverable_going_high) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_threshold = NULL; uint32_t acceptable_record_types; uint8_t event_reading_type_code; uint64_t val; int rv = -1; /* achu: * * Technically, the IPMI spec lists that compact record formats also * support settable thresholds. However, since compact records * don't contain any information for interpreting threshold sensors * (e.g. R exponent) I don't know how they could be of any use. No * vendor that I know of supports threshold sensors via a compact * record (excluding possible OEM ones). * * There's a part of me that believes the readable/setting * threshold masks for compact sensor records is a cut and paste * typo. It shouldn't be there. */ acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; /* We don't want the generic sdr full record, we need the special * threshold one. */ if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_threshold = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (lower_non_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_non_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_going_low = val; } if (lower_non_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_non_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_going_high = val; } if (lower_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_going_low = val; } if (lower_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_going_high = val; } if (lower_non_recoverable_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_non_recoverable_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_going_low = val; } if (lower_non_recoverable_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.lower_non_recoverable_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_going_high = val; } if (upper_non_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_non_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_going_low = val; } if (upper_non_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_non_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_going_high = val; } if (upper_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_going_low = val; } if (upper_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_going_high = val; } if (upper_non_recoverable_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_non_recoverable_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_going_low = val; } if (upper_non_recoverable_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_assertion_event_mask.upper_non_recoverable_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_going_high = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_threshold); return (rv); } int ipmi_sdr_parse_threshold_deassertion_supported (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_going_low, uint8_t *lower_non_critical_going_high, uint8_t *lower_critical_going_low, uint8_t *lower_critical_going_high, uint8_t *lower_non_recoverable_going_low, uint8_t *lower_non_recoverable_going_high, uint8_t *upper_non_critical_going_low, uint8_t *upper_non_critical_going_high, uint8_t *upper_critical_going_low, uint8_t *upper_critical_going_high, uint8_t *upper_non_recoverable_going_low, uint8_t *upper_non_recoverable_going_high) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_threshold = NULL; uint32_t acceptable_record_types; uint8_t event_reading_type_code; uint64_t val; int rv = -1; /* achu: * * Technically, the IPMI spec lists that compact record formats also * support settable thresholds. However, since compact records * don't contain any information for interpreting threshold sensors * (e.g. R exponent) I don't know how they could be of any use. No * vendor that I know of supports threshold sensors via a compact * record (excluding possible OEM ones). * * There's a part of me that believes the readable/setting * threshold masks for compact sensor records is a cut and paste * typo. It shouldn't be there. */ acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; /* We don't want the generic sdr full record, we need the special * threshold one. */ if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_threshold = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (lower_non_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_non_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_going_low = val; } if (lower_non_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_non_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_going_high = val; } if (lower_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_going_low = val; } if (lower_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_going_high = val; } if (lower_non_recoverable_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_non_recoverable_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_going_low = val; } if (lower_non_recoverable_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.lower_non_recoverable_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_going_high = val; } if (upper_non_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_non_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_going_low = val; } if (upper_non_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_non_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_going_high = val; } if (upper_critical_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_critical_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_going_low = val; } if (upper_critical_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_critical_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_going_high = val; } if (upper_non_recoverable_going_low) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_non_recoverable_going_low_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_going_low = val; } if (upper_non_recoverable_going_high) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "threshold_deassertion_event_mask.upper_non_recoverable_going_high_supported", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_going_high = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_threshold); return (rv); } int ipmi_sdr_parse_threshold_readable (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_threshold = NULL; uint32_t acceptable_record_types; uint8_t event_reading_type_code; uint64_t val; int rv = -1; /* achu: * * Technically, the IPMI spec lists that compact record formats also * support settable thresholds. However, since compact records * don't contain any information for interpreting threshold sensors * (e.g. R exponent) I don't know how they could be of any use. No * vendor that I know of supports threshold sensors via a compact * record (excluding possible OEM ones). * * There's a part of me that believes the readable/setting * threshold masks for compact sensor records is a cut and paste * typo. It shouldn't be there. */ acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; /* We don't want the generic sdr full record, we need the special * threshold one. */ if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_threshold = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (lower_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.lower_non_critical_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_threshold = val; } if (lower_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.lower_critical_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_threshold = val; } if (lower_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.lower_non_recoverable_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_threshold = val; } if (upper_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.upper_non_critical_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_threshold = val; } if (upper_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.upper_critical_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_threshold = val; } if (upper_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "readable_threshold_mask.upper_non_recoverable_threshold_is_readable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_threshold = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_threshold); return (rv); } int ipmi_sdr_parse_threshold_settable (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_threshold = NULL; uint32_t acceptable_record_types; uint8_t event_reading_type_code; uint64_t val; int rv = -1; /* achu: * * Technically, the IPMI spec lists that compact record formats also * support settable thresholds. However, since compact records * don't contain any information for interpreting threshold sensors * (e.g. R exponent) I don't know how they could be of any use. No * vendor that I know of supports threshold sensors via a compact * record (excluding possible OEM ones). * * There's a part of me that believes the readable/setting * threshold masks for compact sensor records is a cut and paste * typo. It shouldn't be there. */ acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; /* We don't want the generic sdr full record, we need the special * threshold one. */ if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_threshold = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (lower_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.lower_non_critical_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_threshold = val; } if (lower_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.lower_critical_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_threshold = val; } if (lower_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.lower_non_recoverable_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_threshold = val; } if (upper_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.upper_non_critical_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_threshold = val; } if (upper_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.upper_critical_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_threshold = val; } if (upper_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "settable_threshold_mask.upper_non_recoverable_threshold_is_settable", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_threshold = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_threshold); return (rv); } int ipmi_sdr_parse_sensor_decoding_data (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, int8_t *r_exponent, int8_t *b_exponent, int16_t *m, int16_t *b, uint8_t *linearization, uint8_t *analog_data_format) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val, val1, val2; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (r_exponent) { if (FIID_OBJ_GET (obj_sdr_record, "r_exponent", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *r_exponent = val; if (*r_exponent & 0x08) *r_exponent |= 0xF0; } if (b_exponent) { if (FIID_OBJ_GET (obj_sdr_record, "b_exponent", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *b_exponent = val; if (*b_exponent & 0x08) *b_exponent |= 0xF0; } if (m) { if (FIID_OBJ_GET (obj_sdr_record, "m_ls", &val1) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record, "m_ms", &val2) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *m = val1; *m |= (((int16_t)val2 & 0x3) << 8); if (*m & 0x200) *m |= 0xFE00; } if (b) { if (FIID_OBJ_GET (obj_sdr_record, "b_ls", &val1) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record, "b_ms", &val2) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *b = val1; *b |= (((int16_t)val2 & 0x3) << 8); if (*b & 0x200) *b |= 0xFE00; } if (linearization) { if (FIID_OBJ_GET (obj_sdr_record, "linearization", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } (*linearization) = val; } if (analog_data_format) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_unit1.analog_data_format", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } (*analog_data_format) = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } static int _sensor_decode_value (ipmi_sdr_ctx_t ctx, int8_t r_exponent, int8_t b_exponent, int16_t m, int16_t b, uint8_t linearization, uint8_t analog_data_format, uint8_t raw_data, double **value_ptr) { double reading; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (value_ptr); *value_ptr = NULL; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, raw_data, &reading) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } if (!((*value_ptr) = (double *)malloc (sizeof (double)))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); goto cleanup; } (**value_ptr) = reading; rv = 0; cleanup: return (rv); } int ipmi_sdr_parse_sensor_reading_ranges_specified (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *nominal_reading_specified, uint8_t *normal_maximum_specified, uint8_t *normal_minimum_specified) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (nominal_reading_specified) { if (FIID_OBJ_GET (obj_sdr_record, "analog_characteristics_flag.nominal_reading", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *nominal_reading_specified = val; } if (normal_maximum_specified) { if (FIID_OBJ_GET (obj_sdr_record, "analog_characteristics_flag.normal_max", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *normal_maximum_specified = val; } if (normal_minimum_specified) { if (FIID_OBJ_GET (obj_sdr_record, "analog_characteristics_flag.normal_min", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *normal_minimum_specified = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_reading_ranges (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **nominal_reading, double **normal_maximum, double **normal_minimum, double **sensor_maximum_reading, double **sensor_minimum_reading) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int8_t r_exponent, b_exponent; int16_t m, b; uint8_t reading_raw, linearization, analog_data_format; double *tmp_nominal_reading = NULL; double *tmp_normal_maximum = NULL; double *tmp_normal_minimum = NULL; double *tmp_sensor_maximum_reading = NULL; double *tmp_sensor_minimum_reading = NULL; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (nominal_reading) *nominal_reading = NULL; if (normal_maximum) *normal_maximum = NULL; if (normal_minimum) *normal_minimum = NULL; if (sensor_maximum_reading) *sensor_maximum_reading = NULL; if (sensor_minimum_reading) *sensor_minimum_reading = NULL; if (ipmi_sdr_parse_sensor_decoding_data (ctx, sdr_record, sdr_record_len, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) goto cleanup; if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE); goto cleanup; } if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE); goto cleanup; } if (nominal_reading) { if (FIID_OBJ_GET (obj_sdr_record, "nominal_reading", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } reading_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, reading_raw, &tmp_nominal_reading) < 0) goto cleanup; } if (normal_maximum) { if (FIID_OBJ_GET (obj_sdr_record, "normal_maximum", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } reading_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, reading_raw, &tmp_normal_maximum) < 0) goto cleanup; } if (normal_minimum) { if (FIID_OBJ_GET (obj_sdr_record, "normal_minimum", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } reading_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, reading_raw, &tmp_normal_minimum) < 0) goto cleanup; } if (sensor_maximum_reading) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_maximum_reading", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } reading_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, reading_raw, &tmp_sensor_maximum_reading) < 0) goto cleanup; } if (sensor_minimum_reading) { if (FIID_OBJ_GET (obj_sdr_record, "sensor_minimum_reading", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } reading_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, reading_raw, &tmp_sensor_minimum_reading) < 0) goto cleanup; } if (nominal_reading) *nominal_reading = tmp_nominal_reading; if (normal_maximum) *normal_maximum = tmp_normal_maximum; if (normal_minimum) *normal_minimum = tmp_normal_minimum; if (sensor_maximum_reading) *sensor_maximum_reading = tmp_sensor_maximum_reading; if (sensor_minimum_reading) *sensor_minimum_reading = tmp_sensor_minimum_reading; rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); if (rv < 0) { free (tmp_nominal_reading); free (tmp_normal_maximum); free (tmp_normal_minimum); free (tmp_sensor_maximum_reading); free (tmp_sensor_minimum_reading); } return (rv); } int ipmi_sdr_parse_thresholds (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **lower_non_critical_threshold, double **lower_critical_threshold, double **lower_non_recoverable_threshold, double **upper_non_critical_threshold, double **upper_critical_threshold, double **upper_non_recoverable_threshold) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int8_t r_exponent, b_exponent; int16_t m, b; uint8_t threshold_raw, linearization, analog_data_format; double *tmp_lower_non_critical_threshold = NULL; double *tmp_lower_critical_threshold = NULL; double *tmp_lower_non_recoverable_threshold = NULL; double *tmp_upper_non_critical_threshold = NULL; double *tmp_upper_critical_threshold = NULL; double *tmp_upper_non_recoverable_threshold = NULL; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (lower_non_critical_threshold) *lower_non_critical_threshold = NULL; if (lower_critical_threshold) *lower_critical_threshold = NULL; if (lower_non_recoverable_threshold) *lower_non_recoverable_threshold = NULL; if (upper_non_critical_threshold) *upper_non_critical_threshold = NULL; if (upper_critical_threshold) *upper_critical_threshold = NULL; if (upper_non_recoverable_threshold) *upper_non_recoverable_threshold = NULL; if (ipmi_sdr_parse_sensor_decoding_data (ctx, sdr_record, sdr_record_len, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) goto cleanup; if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE); goto cleanup; } if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE); goto cleanup; } if (lower_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "lower_non_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_lower_non_critical_threshold) < 0) goto cleanup; } if (lower_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "lower_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_lower_critical_threshold) < 0) goto cleanup; } if (lower_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "lower_non_recoverable_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_lower_non_recoverable_threshold) < 0) goto cleanup; } if (upper_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "upper_non_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_upper_non_critical_threshold) < 0) goto cleanup; } if (upper_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "upper_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_upper_critical_threshold) < 0) goto cleanup; } if (upper_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record, "upper_non_recoverable_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } threshold_raw = val; if (_sensor_decode_value (ctx, r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &tmp_upper_non_recoverable_threshold) < 0) goto cleanup; } if (lower_non_critical_threshold) *lower_non_critical_threshold = tmp_lower_non_critical_threshold; if (lower_critical_threshold) *lower_critical_threshold = tmp_lower_critical_threshold; if (lower_non_recoverable_threshold) *lower_non_recoverable_threshold = tmp_lower_non_recoverable_threshold; if (upper_non_critical_threshold) *upper_non_critical_threshold = tmp_upper_non_critical_threshold; if (upper_critical_threshold) *upper_critical_threshold = tmp_upper_critical_threshold; if (upper_non_recoverable_threshold) *upper_non_recoverable_threshold = tmp_upper_non_recoverable_threshold; rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); if (rv < 0) { free (tmp_lower_non_critical_threshold); free (tmp_lower_critical_threshold); free (tmp_lower_non_recoverable_threshold); free (tmp_upper_non_critical_threshold); free (tmp_upper_critical_threshold); free (tmp_upper_non_recoverable_threshold); } return (rv); } int ipmi_sdr_parse_thresholds_raw (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_threshold, uint8_t *lower_critical_threshold, uint8_t *lower_non_recoverable_threshold, uint8_t *upper_non_critical_threshold, uint8_t *upper_critical_threshold, uint8_t *upper_non_recoverable_threshold) { fiid_obj_t obj_sdr_record = NULL; fiid_obj_t obj_sdr_record_threshold = NULL; uint32_t acceptable_record_types; uint8_t event_reading_type_code; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; /* We don't want the generic sdr full record, we need the special * threshold one. */ if (ipmi_sdr_parse_event_reading_type_code (ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) goto cleanup; if (!IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); goto cleanup; } if (!(obj_sdr_record_threshold = fiid_obj_copy (obj_sdr_record, tmpl_sdr_full_sensor_record_threshold_based_sensors))) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (lower_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "lower_non_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_critical_threshold = val; } if (lower_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "lower_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_critical_threshold = val; } if (lower_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "lower_non_recoverable_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *lower_non_recoverable_threshold = val; } if (upper_non_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "upper_non_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_critical_threshold = val; } if (upper_critical_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "upper_critical_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_critical_threshold = val; } if (upper_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_sdr_record_threshold, "upper_non_recoverable_threshold", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record_threshold); goto cleanup; } *upper_non_recoverable_threshold = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); fiid_obj_destroy (obj_sdr_record_threshold); return (rv); } int ipmi_sdr_parse_tolerance (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **tolerance) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int8_t r_exponent; int16_t m; uint8_t tolerance_raw, linearization; double *tmp_tolerance = NULL; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (tolerance) *tolerance = NULL; if (ipmi_sdr_parse_sensor_decoding_data (ctx, sdr_record, sdr_record_len, &r_exponent, NULL, &m, NULL, &linearization, NULL) < 0) goto cleanup; if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE); goto cleanup; } if (tolerance) { double reading; if (FIID_OBJ_GET (obj_sdr_record, "tolerance", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } tolerance_raw = val; if (ipmi_sensor_decode_tolerance (r_exponent, m, linearization, tolerance_raw, &reading) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } if (!(tmp_tolerance = (double *)malloc (sizeof (double)))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); goto cleanup; } (*tmp_tolerance) = reading; } if (tolerance) *tolerance = tmp_tolerance; rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); if (rv < 0) free (tmp_tolerance); return (rv); } int ipmi_sdr_parse_accuracy (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, double **accuracy) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint16_t accuracy_raw; uint8_t accuracy_ls, accuracy_ms, accuracy_exp; double *tmp_accuracy = NULL; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (accuracy) *accuracy = NULL; if (accuracy) { double reading; if (FIID_OBJ_GET (obj_sdr_record, "accuracy_ls", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } accuracy_ls = val; if (FIID_OBJ_GET (obj_sdr_record, "accuracy_ms", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } accuracy_ms = val; /* accuracy is unsigned, no need to sign extend */ accuracy_raw = accuracy_ls | (((uint16_t)accuracy_ms) << 6); if (FIID_OBJ_GET (obj_sdr_record, "accuracy_exp", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } accuracy_exp = val; if (ipmi_sensor_decode_accuracy (accuracy_raw, accuracy_exp, &reading) < 0) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_INTERNAL_ERROR); goto cleanup; } if (!(tmp_accuracy = (double *)malloc (sizeof (double)))) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_OUT_OF_MEMORY); goto cleanup; } (*tmp_accuracy) = reading; } if (accuracy) *accuracy = tmp_accuracy; rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); if (rv < 0) free (tmp_accuracy); return (rv); } int ipmi_sdr_parse_hysteresis (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *positive_going_threshold_hysteresis, uint8_t *negative_going_threshold_hysteresis) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FULL_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (positive_going_threshold_hysteresis) { if (FIID_OBJ_GET (obj_sdr_record, "positive_going_threshold_hysteresis", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *positive_going_threshold_hysteresis = val; } if (negative_going_threshold_hysteresis) { if (FIID_OBJ_GET (obj_sdr_record, "negative_going_threshold_hysteresis", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *negative_going_threshold_hysteresis = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_sensor_record_sharing (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *share_count, uint8_t *id_string_instance_modifier_type, uint8_t *id_string_instance_modifier_offset, uint8_t *entity_instance_sharing) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_COMPACT_SENSOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_EVENT_ONLY_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (share_count) { if (FIID_OBJ_GET (obj_sdr_record, "share_count", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *share_count = val; } if (id_string_instance_modifier_type) { if (FIID_OBJ_GET (obj_sdr_record, "id_string_instance_modifier_type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *id_string_instance_modifier_type = val; } if (id_string_instance_modifier_offset) { if (FIID_OBJ_GET (obj_sdr_record, "id_string_instance_modifier_offset", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *id_string_instance_modifier_offset = val; } if (entity_instance_sharing) { if (FIID_OBJ_GET (obj_sdr_record, "entity_instance_sharing", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *entity_instance_sharing = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_container_entity (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *container_entity_id, uint8_t *container_entity_instance) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_ENTITY_ASSOCIATION_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (container_entity_id) { if (FIID_OBJ_GET (obj_sdr_record, "container_entity_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *container_entity_id = val; } if (container_entity_instance) { if (FIID_OBJ_GET (obj_sdr_record, "container_entity_instance", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *container_entity_instance = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_device_id_string (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, char *device_id_string, unsigned int device_id_string_len) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int len = 0; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (device_id_string && device_id_string_len) { if ((len = fiid_obj_get_data (obj_sdr_record, "device_id_string", device_id_string, device_id_string_len)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } rv = len; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_device_type (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_type, uint8_t *device_type_modifier) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (device_type) { if (FIID_OBJ_GET (obj_sdr_record, "device_type", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_type = val; } if (device_type_modifier) { if (FIID_OBJ_GET (obj_sdr_record, "device_type_modifier", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_type_modifier = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_generic_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_access_address, uint8_t *channel_number, uint8_t *device_slave_address, uint8_t *private_bus_id, uint8_t *lun_for_master_write_read_command, uint8_t *address_span, uint8_t *oem) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val1, val2; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_GENERIC_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (device_access_address) { if (FIID_OBJ_GET (obj_sdr_record, "device_access_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_access_address = val; } if (channel_number) { if (FIID_OBJ_GET (obj_sdr_record, "channel_number_ls", &val1) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } if (FIID_OBJ_GET (obj_sdr_record, "channel_number_ms", &val2) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *channel_number = ((uint8_t)val1 << 3) | (uint8_t)val2; } if (device_slave_address) { if (FIID_OBJ_GET (obj_sdr_record, "device_slave_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_slave_address = val; } if (private_bus_id) { if (FIID_OBJ_GET (obj_sdr_record, "private_bus_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *private_bus_id = val; } if (lun_for_master_write_read_command) { if (FIID_OBJ_GET (obj_sdr_record, "lun_for_master_write_read_command", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *lun_for_master_write_read_command = val; } if (address_span) { if (FIID_OBJ_GET (obj_sdr_record, "address_span", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *address_span = val; } if (oem) { if (FIID_OBJ_GET (obj_sdr_record, "oem", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *oem = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_fru_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_access_address, uint8_t *logical_fru_device_device_slave_address, uint8_t *private_bus_id, uint8_t *lun_for_master_write_read_fru_command, uint8_t *logical_physical_fru_device, uint8_t *channel_number) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (device_access_address) { if (FIID_OBJ_GET (obj_sdr_record, "device_access_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_access_address = val; } if (logical_fru_device_device_slave_address) { if (FIID_OBJ_GET (obj_sdr_record, "logical_fru_device_device_slave_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *logical_fru_device_device_slave_address = val; } if (private_bus_id) { if (FIID_OBJ_GET (obj_sdr_record, "private_bus_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *private_bus_id = val; } if (lun_for_master_write_read_fru_command) { if (FIID_OBJ_GET (obj_sdr_record, "lun_for_master_write_read_fru_command", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *lun_for_master_write_read_fru_command = val; } if (logical_physical_fru_device) { if (FIID_OBJ_GET (obj_sdr_record, "logical_physical_fru_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *logical_physical_fru_device = val; } if (channel_number) { if (FIID_OBJ_GET (obj_sdr_record, "channel_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *channel_number = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_fru_entity_id_and_instance (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *fru_entity_id, uint8_t *fru_entity_instance) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_FRU_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (fru_entity_id) { if (FIID_OBJ_GET (obj_sdr_record, "fru_entity_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *fru_entity_id = val; } if (fru_entity_instance) { if (FIID_OBJ_GET (obj_sdr_record, "fru_entity_instance", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *fru_entity_instance = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_management_controller_device_locator_parameters (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *device_slave_address, uint8_t *channel_number, uint8_t *global_initialization_event_message_generation, uint8_t *global_initialization_log_initialization_agent_errors, uint8_t *global_initialization_controller_logs_initialization_agent_errors, uint8_t *power_state_notification_controller, uint8_t *power_state_notification_acpi_device_power_state_notification, uint8_t *power_state_notification_acpi_system_power_state_notification, uint8_t *device_capabilities_sensor_device, uint8_t *device_capabilities_sdr_repository_device, uint8_t *device_capabilities_sel_device, uint8_t *device_capabilities_fru_inventory_device, uint8_t *device_capabilities_ipmb_event_receiver, uint8_t *device_capabilities_ipmb_event_generator, uint8_t *device_capabilities_bridge, uint8_t *device_capabilities_chassis_device) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (device_slave_address) { if (FIID_OBJ_GET (obj_sdr_record, "device_slave_address", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_slave_address = val; } if (channel_number) { if (FIID_OBJ_GET (obj_sdr_record, "channel_number", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *channel_number = val; } if (global_initialization_event_message_generation) { if (FIID_OBJ_GET (obj_sdr_record, "global_initialization.event_message_generation", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *global_initialization_event_message_generation = val; } if (global_initialization_log_initialization_agent_errors) { if (FIID_OBJ_GET (obj_sdr_record, "global_initialization.log_initialization_agent_errors", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *global_initialization_log_initialization_agent_errors = val; } if (global_initialization_controller_logs_initialization_agent_errors) { if (FIID_OBJ_GET (obj_sdr_record, "global_initialization.controller_logs_initialization_agent_errors", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *global_initialization_controller_logs_initialization_agent_errors = val; } if (power_state_notification_controller) { if (FIID_OBJ_GET (obj_sdr_record, "power_state_notification.controller", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *power_state_notification_controller = val; } if (power_state_notification_acpi_device_power_state_notification) { if (FIID_OBJ_GET (obj_sdr_record, "power_state_notification.acpi_device_power_state_notification", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *power_state_notification_acpi_device_power_state_notification = val; } if (power_state_notification_acpi_system_power_state_notification) { if (FIID_OBJ_GET (obj_sdr_record, "power_state_notification.acpi_system_power_state_notification", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *power_state_notification_acpi_system_power_state_notification = val; } if (device_capabilities_sensor_device) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.sensor_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_sensor_device = val; } if (device_capabilities_sdr_repository_device) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.sdr_repository_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_sdr_repository_device = val; } if (device_capabilities_sel_device) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.sel_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_sel_device = val; } if (device_capabilities_fru_inventory_device) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.fru_inventory_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_fru_inventory_device = val; } if (device_capabilities_ipmb_event_receiver) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.ipmb_event_receiver", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_ipmb_event_receiver = val; } if (device_capabilities_ipmb_event_generator) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.ipmb_event_generator", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_ipmb_event_generator = val; } if (device_capabilities_bridge) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.bridge", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_bridge = val; } if (device_capabilities_chassis_device) { if (FIID_OBJ_GET (obj_sdr_record, "device_capabilities.chassis_device", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *device_capabilities_chassis_device = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_manufacturer_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint32_t *manufacturer_id) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD; acceptable_record_types |= IPMI_SDR_PARSE_RECORD_TYPE_OEM_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (manufacturer_id) { if (FIID_OBJ_GET (obj_sdr_record, "manufacturer_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *manufacturer_id = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_product_id (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint16_t *product_id) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; uint64_t val; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (product_id) { if (FIID_OBJ_GET (obj_sdr_record, "product_id", &val) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } *product_id = val; } rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } int ipmi_sdr_parse_oem_data (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, void *oem_data, unsigned int oem_data_len) { fiid_obj_t obj_sdr_record = NULL; uint32_t acceptable_record_types; int len = 0; int rv = -1; acceptable_record_types = IPMI_SDR_PARSE_RECORD_TYPE_OEM_RECORD; if (!(obj_sdr_record = _sdr_record_get_common (ctx, sdr_record, sdr_record_len, acceptable_record_types))) goto cleanup; if (oem_data && oem_data_len) { if ((len = fiid_obj_get_data (obj_sdr_record, "oem_data", oem_data, oem_data_len)) < 0) { SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM (ctx, obj_sdr_record); goto cleanup; } } rv = len; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_sdr_record); return (rv); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-parse-util.c0000644002055400205540000004372413527331637022330 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-entity-ids-spec.h" #include "freeipmi/util/ipmi-entity-ids-util.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" #define IPMI_SDR_MODIFIER_BUFLEN 1024 #define IPMI_SDR_CHARS_IN_ALPHABET 26 #define IPMI_SDR_ENTITY_NAME_BUFLEN 1024 static int _get_shared_sensor_name (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t sensor_number, const char *id_string, char *buf, unsigned int buflen) { uint8_t share_count; uint8_t id_string_instance_modifier_type; uint8_t id_string_instance_modifier_offset; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (id_string); if (ipmi_sdr_parse_sensor_record_sharing (ctx, sdr_record, sdr_record_len, &share_count, &id_string_instance_modifier_type, &id_string_instance_modifier_offset, NULL) < 0) return (-1); if (share_count > 1) { uint8_t sensor_number_base; uint8_t sensor_number_offset; if (ipmi_sdr_parse_sensor_number (ctx, sdr_record, sdr_record_len, &sensor_number_base) < 0) return (-1); /* I guess it's a bug if the sensor number passed in is bad */ if (sensor_number >= sensor_number_base) sensor_number_offset = sensor_number - sensor_number_base; else goto fallthrough; if (id_string_instance_modifier_type == IPMI_SDR_ID_STRING_INSTANCE_MODIFIER_TYPE_ALPHA) { /* IPMI spec example is: * * "If the modifier = alpha, offset=0 * corresponds to 'A', offset=25 corresponses to * 'Z', and offset = 26 corresponds to 'AA', for * offset=26 the sensors could be identified as: * Temp AA, Temp AB, Temp AC." * * achu note: id_string_instance_modifier_type * is a 7 bit field, so we cannot reach a * situation of 'AAA' or 'AAB'. The max is * 'EX': * * 'A' + (127/26) = 4 => 'E' * 'A' + (127 % 26) = 23 => 'X' */ if ((id_string_instance_modifier_type + sensor_number_offset) < IPMI_SDR_CHARS_IN_ALPHABET) snprintf (buf, buflen, "%s %c", id_string, 'A' + ((id_string_instance_modifier_type + sensor_number_offset)/IPMI_SDR_CHARS_IN_ALPHABET)); else snprintf (buf, buflen, "%s %c%c", id_string, 'A' + ((id_string_instance_modifier_type + sensor_number_offset)/IPMI_SDR_CHARS_IN_ALPHABET), 'A' + (id_string_instance_modifier_type % IPMI_SDR_CHARS_IN_ALPHABET)); } else { /* IPMI spec example is: * * "Suppose sensor ID is 'Temp' for 'Temperature * Sensor', share count = 3, ID string instance * modifier = numeric, instance modifier offset * = 5 - then the sensors oculd be identified * as: Temp 5, Temp 6, Temp 7" */ snprintf (buf, buflen, "%s %u", id_string, id_string_instance_modifier_offset + sensor_number_offset); } return (0); } fallthrough: snprintf (buf, buflen, "%s", id_string); return (0); } int ipmi_sdr_parse_sensor_name (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t sensor_number, unsigned int flags, char *buf, unsigned int buflen) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1]; char *id_string_ptr = NULL; uint8_t record_type; unsigned int flags_mask = (IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS); if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (((sdr_record_len && !sdr_record_len) || (!sdr_record && sdr_record_len)) || (flags & ~flags_mask) || !buf || !buflen) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } if (ipmi_sdr_parse_record_id_and_type (ctx, sdr_record, sdr_record_len, NULL, &record_type) < 0) return (-1); if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_id_string (ctx, sdr_record, sdr_record_len, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) return (-1); id_string_ptr = id_string; } else if (record_type == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD || record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD || record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) { memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_device_id_string (ctx, sdr_record, sdr_record_len, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) return (-1); id_string_ptr = device_id_string; } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); return (-1); } /* special case if sensor sharing is involved */ if ((record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) && !(flags & IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS)) { if (_get_shared_sensor_name (ctx, sdr_record, sdr_record_len, sensor_number, id_string_ptr, buf, buflen) < 0) return (-1); } else snprintf (buf, buflen, "%s", id_string_ptr); return (0); } int ipmi_sdr_parse_entity_sensor_name (ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t sensor_number, unsigned int flags, char *buf, unsigned int buflen) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1]; char entity_name_buf[IPMI_SDR_ENTITY_NAME_BUFLEN + 1]; char *id_string_ptr = NULL; uint8_t entity_id, entity_instance, entity_instance_type; const char *entity_id_str; uint8_t record_type; unsigned int flags_mask = (IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS | IPMI_SDR_SENSOR_NAME_FLAGS_ALWAYS_OUTPUT_INSTANCE_NUMBER); if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (((sdr_record_len && !sdr_record_len) || (!sdr_record && sdr_record_len)) || (flags & ~flags_mask) || !buf || !buflen) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARAMETERS); return (-1); } memset (entity_name_buf, '\0', IPMI_SDR_ENTITY_NAME_BUFLEN + 1); if (ipmi_sdr_parse_record_id_and_type (ctx, sdr_record, sdr_record_len, NULL, &record_type) < 0) return (-1); if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_id_string (ctx, sdr_record, sdr_record_len, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) return (-1); id_string_ptr = id_string; } else if (record_type == IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD || record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) { memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_device_id_string (ctx, sdr_record, sdr_record_len, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) return (-1); id_string_ptr = device_id_string; } else { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD); return (-1); } if (ipmi_sdr_parse_entity_id_instance_type (ctx, sdr_record, sdr_record_len, &entity_id, &entity_instance, &entity_instance_type) < 0) return (-1); /* Table 39-1 * * "It is recommended that console software subtract 60h when * presenting device-relative Entity Instance values, and present * the Entity Instance number along with an ID for the device * providing the interface to the entity." * * achu: For the time being we do not output the device providing * the interface, only the right instance number. Adjust later if * necessary. */ if (IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE (entity_instance)) entity_instance -= IPMI_ENTITY_INSTANCE_DEVICE_RELATIVE_MIN; entity_id_str = ipmi_get_entity_id_string (entity_id); /* a few special cases, for entity_ids are special, the vendor has * specifically stated there is no "entity" associated with this sdr * record */ if (entity_id == IPMI_ENTITY_ID_UNSPECIFIED || entity_id == IPMI_ENTITY_ID_OTHER || entity_id == IPMI_ENTITY_ID_UNKNOWN) snprintf (buf, buflen, "%s", id_string_ptr); else { if (ipmi_sdr_stats_compile (ctx) < 0) return (-1); if (ipmi_sdr_stats_entity_instance_unique (ctx, entity_id) > 1) { /* special case if sensor sharing is involved */ if ((record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) && !(flags & IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS)) { uint8_t share_count; uint8_t entity_instance_sharing; char sensor_name_buf[IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1]; if (ipmi_sdr_parse_sensor_record_sharing (ctx, sdr_record, sdr_record_len, &share_count, NULL, NULL, &entity_instance_sharing) < 0) return (-1); if (share_count > 1 && entity_instance_sharing == IPMI_SDR_ENTITY_INSTANCE_INCREMENTS_FOR_EACH_SHARED_RECORD) { uint8_t sensor_number_base; if (ipmi_sdr_parse_sensor_number (ctx, sdr_record, sdr_record_len, &sensor_number_base) < 0) return (-1); /* I guess it's a bug if the sensor number passed in is bad */ if (sensor_number >= sensor_number_base) entity_instance += (sensor_number - sensor_number_base); else goto fallthrough; } memset (sensor_name_buf, '\0', IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1); if (_get_shared_sensor_name (ctx, sdr_record, sdr_record_len, sensor_number, id_string_ptr, sensor_name_buf, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) return (-1); snprintf (entity_name_buf, IPMI_SDR_ENTITY_NAME_BUFLEN, "%s %u", entity_id_str, entity_instance); /* In odd chance the strings end up identical */ if (!strcasecmp (entity_name_buf, sensor_name_buf)) snprintf (buf, buflen, "%s", sensor_name_buf); else snprintf (buf, buflen, "%s %s", entity_name_buf, sensor_name_buf); } else { fallthrough: snprintf (entity_name_buf, IPMI_SDR_ENTITY_NAME_BUFLEN, "%s %u", entity_id_str, entity_instance); /* In odd chance the strings end up identical */ if (!strcasecmp (entity_name_buf, id_string_ptr)) snprintf (buf, buflen, "%s", id_string_ptr); else snprintf (buf, buflen, "%s %s", entity_name_buf, id_string_ptr); } } else { if (flags & IPMI_SDR_SENSOR_NAME_FLAGS_ALWAYS_OUTPUT_INSTANCE_NUMBER) { snprintf (entity_name_buf, IPMI_SDR_ENTITY_NAME_BUFLEN, "%s %u", entity_id_str, entity_instance); /* In odd chance the strings end up identical */ if (!strcasecmp (entity_name_buf, id_string_ptr)) snprintf (buf, buflen, "%s", id_string_ptr); else snprintf (buf, buflen, "%s %s", entity_name_buf, id_string_ptr); } else { /* In odd chance the strings end up identical */ if (!strcasecmp (entity_id_str, id_string_ptr)) snprintf (buf, buflen, "%s", id_string_ptr); else snprintf (buf, buflen, "%s %s", entity_id_str, id_string_ptr); } } } return (0); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-stats.c0000644002055400205540000001576413527331637021404 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-sdr-cache-read.c,v 1.33 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "ipmi-sdr-common.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" static int _entity_id_add_instance (ipmi_sdr_ctx_t ctx, uint8_t entity_id, uint8_t entity_instance) { struct ipmi_sdr_entity_count *entity; unsigned int i; int found = 0; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); entity = &(ctx->entity_counts[entity_id]); for (i = 0; i < entity->entity_instances_count; i++) { if (entity->entity_instances[i] == entity_instance) { found++; break; } } if (!found) { entity->entity_instances[entity->entity_instances_count] = entity_instance; entity->entity_instances_count++; } return (0); } static int _entity_id_instances_count (ipmi_sdr_ctx_t ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len) { uint8_t entity_id, entity_instance, entity_instance_type; assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (sdr_record); assert (sdr_record_len); if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD && record_type != IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD && record_type != IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) return (0); if (ipmi_sdr_parse_entity_id_instance_type (ctx, sdr_record, sdr_record_len, &entity_id, &entity_instance, &entity_instance_type) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); return (-1); } /* if it's a container entity, not part of our calculations */ if (entity_instance_type == IPMI_SDR_LOGICAL_CONTAINER_ENTITY) return (0); if (_entity_id_add_instance (ctx, entity_id, entity_instance) < 0) return (-1); /* special case if sensor sharing is involved */ if (record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { uint8_t share_count; uint8_t entity_instance_sharing; if (ipmi_sdr_parse_sensor_record_sharing (ctx, sdr_record, sdr_record_len, &share_count, NULL, NULL, &entity_instance_sharing) < 0) { SDR_SET_INTERNAL_ERRNUM (ctx); return (-1); } if (share_count > 1 && entity_instance_sharing == IPMI_SDR_ENTITY_INSTANCE_INCREMENTS_FOR_EACH_SHARED_RECORD) { unsigned int i; for (i = 1; i < share_count; i++) { if (_entity_id_add_instance (ctx, entity_id, entity_instance + i) < 0) return (-1); } } } return (0); } static int _sdr_stat_callback (ipmi_sdr_ctx_t ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *data) { assert (ctx); assert (ctx->magic == IPMI_SDR_CTX_MAGIC); assert (sdr_record); assert (sdr_record_len); if (_entity_id_instances_count (ctx, record_type, sdr_record, sdr_record_len) < 0) return (-1); return (0); } int ipmi_sdr_stats_compile (ipmi_sdr_ctx_t ctx) { int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (ctx->stats_compiled) goto out; if (ipmi_sdr_cache_iterate (ctx, _sdr_stat_callback, NULL) < 0) goto cleanup; ctx->stats_compiled = 1; out: rv = 0; ctx->errnum = IPMI_SDR_ERR_SUCCESS; cleanup: return (rv); } int ipmi_sdr_stats_entity_instance_unique (ipmi_sdr_ctx_t ctx, uint8_t entity_id) { int rv = -1; if (!ctx || ctx->magic != IPMI_SDR_CTX_MAGIC) { ERR_TRACE (ipmi_sdr_ctx_errormsg (ctx), ipmi_sdr_ctx_errnum (ctx)); return (-1); } if (ctx->operation != IPMI_SDR_OPERATION_READ_CACHE) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_CACHE_READ_INITIALIZATION); return (-1); } if (!ctx->stats_compiled) { SDR_SET_ERRNUM (ctx, IPMI_SDR_ERR_STATS_NOT_COMPILED); return (-1); } rv = ctx->entity_counts[entity_id].entity_instances_count; ctx->errnum = IPMI_SDR_ERR_SUCCESS; return (rv); } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-trace.h0000644002055400205540000000466013527331637021342 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_TRACE_H #define IPMI_SDR_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #include "ipmi-sdr-util.h" #define SDR_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_sdr_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define SDR_ERRNO_TO_SDR_ERRNUM(__ctx, __errno) \ do { \ sdr_set_sdr_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define SDR_FIID_OBJECT_ERROR_TO_SDR_ERRNUM(__ctx, __obj) \ do { \ sdr_set_sdr_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #define SDR_SET_INTERNAL_ERRNUM(__ctx) \ do { \ sdr_set_internal_errnum ((__ctx)); \ TRACE_MSG_OUT (ipmi_sdr_ctx_errormsg ((__ctx)), ipmi_sdr_ctx_errnum ((__ctx))); \ } while (0) #endif /* IPMI_SDR_TRACE_H */ freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-util.c0000644002055400205540000000576413527331637021222 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-sdr-defs.h" #include "ipmi-sdr-trace.h" #include "ipmi-sdr-util.h" #include "freeipmi-portability.h" void sdr_set_sdr_errnum_by_errno (ipmi_sdr_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_SDR_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_SDR_ERR_SUCCESS; break; case ENOSPC: case EMFILE: case ENFILE: ctx->errnum = IPMI_SDR_ERR_FILESYSTEM; break; case EPERM: case EACCES: case EISDIR: case EROFS: ctx->errnum = IPMI_SDR_ERR_PERMISSION; break; case ENOENT: case ENOTDIR: ctx->errnum = IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST; break; case ENAMETOOLONG: case ELOOP: ctx->errnum = IPMI_SDR_ERR_FILENAME_INVALID; break; case ENOMEM: ctx->errnum = IPMI_SDR_ERR_OUT_OF_MEMORY; break; case EINVAL: ctx->errnum = IPMI_SDR_ERR_INTERNAL_ERROR; break; default: ctx->errnum = IPMI_SDR_ERR_SYSTEM_ERROR; } } void sdr_set_sdr_errnum_by_fiid_object (ipmi_sdr_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_SDR_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_SDR_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_SDR_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_SDR_ERR_IPMI_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_SDR_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_SDR_ERR_INTERNAL_ERROR; } } void sdr_set_internal_errnum (ipmi_sdr_ctx_t ctx) { if (ctx->errnum == IPMI_SDR_ERR_CONTEXT_NULL || ctx->errnum == IPMI_SDR_ERR_CONTEXT_INVALID || ctx->errnum == IPMI_SDR_ERR_PARAMETERS || ctx->errnum == IPMI_SDR_ERR_OVERFLOW) ctx->errnum = IPMI_SDR_ERR_INTERNAL_ERROR; } freeipmi-1.6.4/libfreeipmi/sdr/ipmi-sdr-util.h0000644002055400205540000000237413527331637021221 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SDR_UTIL_H #define IPMI_SDR_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/sdr/ipmi-sdr.h" #include "ipmi-sdr-defs.h" void sdr_set_sdr_errnum_by_errno (ipmi_sdr_ctx_t ctx, int __errno); void sdr_set_sdr_errnum_by_fiid_object (ipmi_sdr_ctx_t ctx, fiid_obj_t obj); void sdr_set_internal_errnum (ipmi_sdr_ctx_t ctx); #endif /* IPMI_SDR_UTIL_H */ freeipmi-1.6.4/libfreeipmi/sel/0000755002055400205540000000000013527342542016333 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel.c0000644002055400205540000017574513527331637020244 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/api/ipmi-sel-cmds-api.h" #include "freeipmi/cmds/ipmi-sel-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "freeipmi/util/ipmi-timestamp-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" static char *ipmi_sel_errmsgs[] = { "success", "context null", "context invalid", "invalid parameters", "out of memory", "sdr cache error", "no sel entries loaded", "no sel entries available", "invalid sel entry", "end of sel entries list reached", "not found", "reservation canceled", "interpret error", "callback error", "internal IPMI error", "internal system error", "buffer overflow", "internal error", "errnum out of range", NULL }; ipmi_sel_ctx_t ipmi_sel_ctx_create (ipmi_ctx_t ipmi_ctx, ipmi_sdr_ctx_t sdr_ctx) { struct ipmi_sel_ctx *ctx = NULL; /* check that ipmi_ctx is open for use if supplied */ if (ipmi_ctx) { if (ipmi_ctx_get_target (ipmi_ctx, NULL, NULL) < 0) { SET_ERRNO (EINVAL); return (NULL); } } /* check that sdr_ctx is open for reading if supplied */ if (sdr_ctx) { uint8_t tmp; if (ipmi_sdr_cache_sdr_version (sdr_ctx, &tmp) < 0) { SET_ERRNO (EINVAL); return (NULL); } } if (!(ctx = (ipmi_sel_ctx_t)malloc (sizeof (struct ipmi_sel_ctx)))) { ERRNO_TRACE (errno); return (NULL); } memset (ctx, '\0', sizeof (struct ipmi_sel_ctx)); ctx->magic = IPMI_SEL_CTX_MAGIC; ctx->flags = IPMI_SEL_FLAGS_DEFAULT; ctx->manufacturer_id = 0; ctx->product_id = 0; ctx->ipmi_version_major = 0; ctx->ipmi_version_minor = 0; ctx->debug_prefix = NULL; ctx->separator = NULL; ctx->reservation_id = 0; ctx->reservation_id_registered = 0; ctx->ipmi_ctx = ipmi_ctx; ctx->sdr_ctx = sdr_ctx; ctx->interpret_ctx = NULL; ctx->utc_offset = 0; ctx->sel_entries_loaded = 0; if (!(ctx->sel_entries = list_create ((ListDelF)free))) { ERRNO_TRACE (errno); goto cleanup; } return (ctx); cleanup: if (ctx) { if (ctx->sel_entries) list_destroy (ctx->sel_entries); free (ctx); } return (NULL); } static int _sel_entries_delete_all (void *x, void *y) { return (1); } static void _sel_entries_clear (ipmi_sel_ctx_t ctx) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); list_delete_all (ctx->sel_entries, _sel_entries_delete_all, "dummyvalue"); if (ctx->sel_entries_itr) { list_iterator_destroy (ctx->sel_entries_itr); ctx->sel_entries_itr = NULL; } ctx->sel_entries_loaded = 0; ctx->current_sel_entry = NULL; ctx->callback_sel_entry = NULL; } void ipmi_sel_ctx_destroy (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return; } free (ctx->debug_prefix); free (ctx->separator); _sel_entries_clear (ctx); list_destroy (ctx->sel_entries); ctx->magic = ~IPMI_SEL_CTX_MAGIC; free (ctx); } int ipmi_sel_ctx_errnum (ipmi_sel_ctx_t ctx) { if (!ctx) return (IPMI_SEL_ERR_CONTEXT_NULL); else if (ctx->magic != IPMI_SEL_CTX_MAGIC) return (IPMI_SEL_ERR_CONTEXT_INVALID); else return (ctx->errnum); } char * ipmi_sel_ctx_strerror (int errnum) { if (errnum >= IPMI_SEL_ERR_SUCCESS && errnum <= IPMI_SEL_ERR_ERRNUMRANGE) return (ipmi_sel_errmsgs[errnum]); else return (ipmi_sel_errmsgs[IPMI_SEL_ERR_ERRNUMRANGE]); } char * ipmi_sel_ctx_errormsg (ipmi_sel_ctx_t ctx) { return (ipmi_sel_ctx_strerror (ipmi_sel_ctx_errnum (ctx))); } int ipmi_sel_ctx_get_flags (ipmi_sel_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!flags) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_set_flags (ipmi_sel_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_SEL_FLAGS_MASK) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } ctx->flags = flags; if (ctx->interpret_ctx) { unsigned int interpret_flags; if (ipmi_interpret_ctx_get_flags (ctx->interpret_ctx, &interpret_flags) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } if (flags & IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS) interpret_flags |= IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS; else interpret_flags &= ~IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS; if (ipmi_interpret_ctx_set_flags (ctx->interpret_ctx, interpret_flags) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_get_manufacturer_id (ipmi_sel_ctx_t ctx, uint32_t *manufacturer_id) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!manufacturer_id) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } *manufacturer_id = ctx->manufacturer_id; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_set_manufacturer_id (ipmi_sel_ctx_t ctx, uint32_t manufacturer_id) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } ctx->manufacturer_id = manufacturer_id; if (ctx->interpret_ctx) { if (ipmi_interpret_ctx_set_manufacturer_id (ctx->interpret_ctx, ctx->manufacturer_id) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_get_product_id (ipmi_sel_ctx_t ctx, uint16_t *product_id) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!product_id) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } *product_id = ctx->product_id; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_set_product_id (ipmi_sel_ctx_t ctx, uint16_t product_id) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } ctx->product_id = product_id; if (ctx->interpret_ctx) { if (ipmi_interpret_ctx_set_product_id (ctx->interpret_ctx, ctx->product_id) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_get_ipmi_version (ipmi_sel_ctx_t ctx, uint8_t *ipmi_version_major, uint8_t *ipmi_version_minor) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ipmi_version_major || !ipmi_version_minor) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } *ipmi_version_major = ctx->ipmi_version_major; *ipmi_version_minor = ctx->ipmi_version_minor; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_set_ipmi_version (ipmi_sel_ctx_t ctx, uint8_t ipmi_version_major, uint8_t ipmi_version_minor) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } ctx->ipmi_version_major = ipmi_version_major; ctx->ipmi_version_minor = ipmi_version_minor; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_get_parameter (ipmi_sel_ctx_t ctx, unsigned int parameter, void *ptr) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ptr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } switch (parameter) { case IPMI_SEL_PARAMETER_INTERPRET_CONTEXT: (*(ipmi_interpret_ctx_t *)ptr) = ctx->interpret_ctx; break; case IPMI_SEL_PARAMETER_UTC_OFFSET: (*(int *)ptr) = ctx->utc_offset; break; default: SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_set_parameter (ipmi_sel_ctx_t ctx, unsigned int parameter, const void *ptr) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } switch (parameter) { case IPMI_SEL_PARAMETER_INTERPRET_CONTEXT: if (ptr) { ipmi_interpret_ctx_t interpret_ctx; uint16_t tmp; interpret_ctx = *((ipmi_interpret_ctx_t *)ptr); /* test to make sure interpret_ctx legit */ if (ipmi_interpret_ctx_get_product_id (interpret_ctx, &tmp) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } ctx->interpret_ctx = interpret_ctx; } else ctx->interpret_ctx = NULL; break; case IPMI_SEL_PARAMETER_UTC_OFFSET: if (ptr) { int tmp = *((int *)ptr); if (!IPMI_UTC_OFFSET_VALID (tmp)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } ctx->utc_offset = tmp; } else ctx->utc_offset = 0; break; default: SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } char * ipmi_sel_ctx_get_debug_prefix (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (NULL); } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (ctx)->debug_prefix; } int ipmi_sel_ctx_set_debug_prefix (ipmi_sel_ctx_t ctx, const char *debug_prefix) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } free (ctx->debug_prefix); ctx->debug_prefix = NULL; if (debug_prefix) { if (!(ctx->debug_prefix = strdup (debug_prefix))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OUT_OF_MEMORY); return (-1); } } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } char * ipmi_sel_ctx_get_separator (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (NULL); } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (ctx)->separator; } int ipmi_sel_ctx_set_separator (ipmi_sel_ctx_t ctx, const char *separator) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } free (ctx->separator); ctx->separator = NULL; if (separator) { if (!(ctx->separator = strdup (separator))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OUT_OF_MEMORY); return (-1); } if (ipmi_event_message_separator (ctx->separator) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } } ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_register_reservation_id (ipmi_sel_ctx_t ctx, uint16_t *reservation_id) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->ipmi_ctx) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); return (-1); } if (sel_get_reservation_id (ctx, &ctx->reservation_id, NULL) < 0) return (-1); /* Possible reservation ID not supported */ if (!ctx->reservation_id) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); return (-1); } if (reservation_id) *reservation_id = ctx->reservation_id; ctx->reservation_id_registered = 1; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_ctx_clear_reservation_id (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } ctx->reservation_id = 0; ctx->reservation_id_registered = 0; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } static void _sel_entry_dump (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry) { fiid_obj_t obj_sel_record = NULL; char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; uint8_t record_type; int record_type_class; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); if (!(ctx->flags & IPMI_SEL_FLAGS_DEBUG_DUMP)) return; if (sel_get_record_header_info (ctx, sel_entry, NULL, &record_type) < 0) goto cleanup; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { struct ipmi_sel_system_event_record_data system_event_record_data; int event_type_code_class; if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) { if (ctx->errnum == IPMI_SEL_ERR_INVALID_SEL_ENTRY) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } goto output; } goto cleanup; } event_type_code_class = ipmi_event_reading_type_code_class (system_event_record_data.event_type_code); if (event_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record_event_fields))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else if (event_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || event_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (system_event_record_data.event_data2_flag == IPMI_SEL_EVENT_DATA_PREVIOUS_STATE_OR_SEVERITY) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record_discrete_previous_state_severity))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record_event_fields))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } } else { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_non_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else /* record_type_class == SEL_RECORD_TYPE_UNKNOWN */ { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } if (fiid_obj_set_all (obj_sel_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } output: memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, "SEL Event Record", hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_obj_dump (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, obj_sel_record) < 0) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } #if WITH_RAWDUMPS /* For those vendors that get confused when they see the nice output * and want the hex output */ if (ipmi_dump_hex (STDERR_FILENO, ctx->debug_prefix, hdrbuf, NULL, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } #endif cleanup: fiid_obj_destroy (obj_sel_record); } static int _get_sel_entry (ipmi_sel_ctx_t ctx, fiid_obj_t obj_cmd_rs, uint16_t *reservation_id, int *reservation_id_initialized, uint16_t record_id) { unsigned int reservation_id_retry_count = 0; unsigned int reservation_canceled = 0; unsigned int is_insufficient_privilege_level = 0; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->ipmi_ctx); assert (fiid_obj_valid (obj_cmd_rs) == 1); assert (fiid_obj_template_compare (obj_cmd_rs, tmpl_cmd_get_sel_entry_rs) == 1); assert (reservation_id); /* * IPMI spec states in section 31.4.1: * * "A Requester must issue a 'Reserve SEL' command prior to issuing * any of the following SEL commands. Note that the 'Reserve SEL' * command only needs to be reissued if the reservation is * canceled. ... Get SEL Entry command (if 'get' is from an offset * other than 00h)". * * Since we always use an offset of 00h, presumably we should never * need reserve the SEL before the get_sel_entry call. * * However, some machines may need it due to compliance issues. * I don't think using a reservation ID all of the time hurts * anything, so we'll just use it all of the time. */ while (1) { if (!(*reservation_id_initialized) || reservation_canceled) { if (ctx->reservation_id_registered) (*reservation_id) = ctx->reservation_id; else { if (sel_get_reservation_id (ctx, reservation_id, &is_insufficient_privilege_level) < 0) { /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * For some reason motherboard requires Operator * privilege instead of User privilege. If * IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL was * received, just use reservation ID 0. For the reasons * listed above, it shouldn't matter. */ if (is_insufficient_privilege_level) (*reservation_id) = 0; else goto cleanup; } } (*reservation_id_initialized)++; } if (ipmi_cmd_get_sel_entry (ctx->ipmi_ctx, (*reservation_id), record_id, 0, IPMI_SEL_READ_ENTIRE_RECORD_BYTES_TO_READ, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_RESERVATION_CANCELLED) == 1) { if (ctx->reservation_id_registered) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_RESERVATION_CANCELED); goto cleanup; } else { reservation_id_retry_count++; reservation_canceled++; (*reservation_id_initialized) = 0; if (reservation_id_retry_count > IPMI_SEL_RESERVATION_ID_RETRY) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } continue; } } else { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } } break; } rv = 0; cleanup: return (rv); } int ipmi_sel_parse (ipmi_sel_ctx_t ctx, uint16_t record_id_start, uint16_t record_id_last, Ipmi_Sel_Parse_Callback callback, void *callback_data) { struct ipmi_sel_entry *sel_entry = NULL; uint16_t reservation_id = 0; int reservation_id_initialized = 0; uint16_t record_id = 0; uint16_t next_record_id = 0; int parsed_atleast_one_entry = 0; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int len; int rv = -1; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->ipmi_ctx) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); return (-1); } if (record_id_start > record_id_last) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } _sel_entries_clear (ctx); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_entry_rs))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } /* if caller requests a range, get last record_id and check against * input so we don't spin */ if (record_id_last != IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { struct ipmi_sel_entry tmp_sel_entry; uint16_t tmp_record_id_last = 0; if (_get_sel_entry (ctx, obj_cmd_rs, &reservation_id, &reservation_id_initialized, IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { /* If the sel is empty it's not really an error */ goto out; } goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "record_data", tmp_sel_entry.sel_event_record, IPMI_SEL_RECORD_LENGTH)) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } tmp_sel_entry.sel_event_record_len = len; if (sel_get_record_header_info (ctx, &tmp_sel_entry, &tmp_record_id_last, NULL) < 0) goto cleanup; if (record_id_last > tmp_record_id_last) record_id_last = tmp_record_id_last; } /* special case, need only get the last record */ if (record_id_start == IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { if (_get_sel_entry (ctx, obj_cmd_rs, &reservation_id, &reservation_id_initialized, record_id_start) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { /* If the sel is empty it's not really an error */ goto out; } goto cleanup; } if (!(sel_entry = (struct ipmi_sel_entry *)malloc (sizeof (struct ipmi_sel_entry)))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OUT_OF_MEMORY); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "record_data", sel_entry->sel_event_record, IPMI_SEL_RECORD_LENGTH)) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sel_entry->sel_event_record_len = len; _sel_entry_dump (ctx, sel_entry); /* achu: should come before list_append to avoid having a freed entry on the list */ if (callback) { ctx->callback_sel_entry = sel_entry; if ((*callback)(ctx, callback_data) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_CALLBACK_ERROR); goto cleanup; } } if (!list_append (ctx->sel_entries, sel_entry)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } sel_entry = NULL; goto out; } for (record_id = record_id_start; record_id <= record_id_last && record_id != IPMI_SEL_GET_RECORD_ID_LAST_ENTRY; record_id = next_record_id) { if (_get_sel_entry (ctx, obj_cmd_rs, &reservation_id, &reservation_id_initialized, record_id) < 0) { if (record_id == IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY && ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { /* If the sel is empty it's not really an error */ goto out; } else if (record_id_start != IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY && !parsed_atleast_one_entry && ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { /* user input a starting record id, we didn't find something yet, so iterate until we do */ next_record_id = record_id + 1; continue; } /* else */ goto cleanup; } if (!parsed_atleast_one_entry) parsed_atleast_one_entry++; if (FIID_OBJ_GET (obj_cmd_rs, "next_record_id", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } next_record_id = val; if (!(sel_entry = (struct ipmi_sel_entry *)malloc (sizeof (struct ipmi_sel_entry)))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OUT_OF_MEMORY); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "record_data", sel_entry->sel_event_record, IPMI_SEL_RECORD_LENGTH)) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sel_entry->sel_event_record_len = len; _sel_entry_dump (ctx, sel_entry); /* achu: should come before list_append to avoid having a freed entry on the list */ if (callback) { ctx->callback_sel_entry = sel_entry; if ((*callback)(ctx, callback_data) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_CALLBACK_ERROR); goto cleanup; } } if (!list_append (ctx->sel_entries, sel_entry)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } sel_entry = NULL; } out: if ((rv = list_count (ctx->sel_entries)) > 0) { if (!(ctx->sel_entries_itr = list_iterator_create (ctx->sel_entries))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } ctx->current_sel_entry = list_next (ctx->sel_entries_itr); } ctx->sel_entries_loaded = 1; ctx->errnum = IPMI_SEL_ERR_SUCCESS; cleanup: ctx->callback_sel_entry = NULL; free (sel_entry); fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_sel_parse_record_ids (ipmi_sel_ctx_t ctx, uint16_t *record_ids, unsigned int record_ids_len, Ipmi_Sel_Parse_Callback callback, void *callback_data) { struct ipmi_sel_entry *sel_entry = NULL; uint16_t reservation_id = 0; int reservation_id_initialized = 0; unsigned int i; fiid_obj_t obj_cmd_rs = NULL; int len; int rv = -1; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->ipmi_ctx) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); return (-1); } if (!record_ids || !record_ids_len) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } _sel_entries_clear (ctx); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_entry_rs))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } for (i = 0; i < record_ids_len; i++) { if (_get_sel_entry (ctx, obj_cmd_rs, &reservation_id, &reservation_id_initialized, record_ids[i]) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) { /* record not available, ok continue on */ continue; } /* else */ goto cleanup; } if (!(sel_entry = (struct ipmi_sel_entry *)malloc (sizeof (struct ipmi_sel_entry)))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OUT_OF_MEMORY); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "record_data", sel_entry->sel_event_record, IPMI_SEL_RECORD_LENGTH)) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sel_entry->sel_event_record_len = len; _sel_entry_dump (ctx, sel_entry); /* achu: should come before list_append to avoid having a freed entry on the list */ if (callback) { ctx->callback_sel_entry = sel_entry; if ((*callback)(ctx, callback_data) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_CALLBACK_ERROR); goto cleanup; } } if (!list_append (ctx->sel_entries, sel_entry)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } sel_entry = NULL; } if ((rv = list_count (ctx->sel_entries)) > 0) { if (!(ctx->sel_entries_itr = list_iterator_create (ctx->sel_entries))) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } ctx->current_sel_entry = list_next (ctx->sel_entries_itr); } ctx->sel_entries_loaded = 1; ctx->errnum = IPMI_SEL_ERR_SUCCESS; cleanup: ctx->callback_sel_entry = NULL; free (sel_entry); fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_sel_parse_first (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->sel_entries_loaded) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED); return (-1); } if (!ctx->sel_entries_itr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NO_SEL_ENTRIES); return (-1); } list_iterator_reset (ctx->sel_entries_itr); ctx->current_sel_entry = list_next (ctx->sel_entries_itr); return (0); } int ipmi_sel_parse_next (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->sel_entries_loaded) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED); return (-1); } if (!ctx->sel_entries_itr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NO_SEL_ENTRIES); return (-1); } ctx->current_sel_entry = list_next (ctx->sel_entries_itr); return ((ctx->current_sel_entry) ? 1 : 0); } int ipmi_sel_parse_sel_entry_count (ipmi_sel_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->sel_entries_loaded) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED); return (-1); } if (!ctx->sel_entries_itr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NO_SEL_ENTRIES); return (-1); } return (list_count (ctx->sel_entries)); } static int _ipmi_sel_parse_find_record_id (ipmi_sel_ctx_t ctx, uint16_t record_id, unsigned int exact_match_flag) { struct ipmi_sel_entry *sel_entry; int rv = -1; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!ctx->sel_entries_loaded) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED); return (-1); } if (!ctx->sel_entries_itr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NO_SEL_ENTRIES); return (-1); } list_iterator_reset (ctx->sel_entries_itr); while ((sel_entry = list_next (ctx->sel_entries_itr))) { uint16_t current_record_id; if (sel_get_record_header_info (ctx, sel_entry, ¤t_record_id, NULL) < 0) { /* if it was an invalid SEL entry, continue on */ if (ctx->errnum == IPMI_SEL_ERR_INVALID_SEL_ENTRY) continue; goto cleanup; } if ((exact_match_flag && current_record_id == record_id) || (!exact_match_flag && current_record_id >= record_id)) { rv = 0; ctx->errnum = IPMI_SEL_ERR_SUCCESS; ctx->current_sel_entry = sel_entry; goto cleanup; } } SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NOT_FOUND); list_iterator_reset (ctx->sel_entries_itr); cleanup: return (rv); } int ipmi_sel_parse_seek_record_id (ipmi_sel_ctx_t ctx, uint16_t record_id) { return (_ipmi_sel_parse_find_record_id (ctx, record_id, 0)); } int ipmi_sel_parse_search_record_id (ipmi_sel_ctx_t ctx, uint16_t record_id) { return (_ipmi_sel_parse_find_record_id (ctx, record_id, 1)); } int _get_parse_sel_entry_common (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry **sel_entry) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); if (ctx->callback_sel_entry) *sel_entry = ctx->callback_sel_entry; else { if (!ctx->sel_entries_loaded) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_NOT_LOADED); return (-1); } if (!ctx->sel_entries_itr) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NO_SEL_ENTRIES); return (-1); } *sel_entry = ctx->current_sel_entry; } if (!(*sel_entry)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SEL_ENTRIES_LIST_END); return (-1); } return (0); } int ipmi_sel_parse_read_record (ipmi_sel_ctx_t ctx, void *buf, unsigned int buflen) { struct ipmi_sel_entry *sel_entry = NULL; int rv = 0; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!buf || !buflen) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } if (_get_parse_sel_entry_common (ctx, &sel_entry) < 0) return (-1); if (buflen < sel_entry->sel_event_record_len) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_OVERFLOW); return (-1); } memcpy (buf, sel_entry->sel_event_record, sel_entry->sel_event_record_len); rv = sel_entry->sel_event_record_len; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (rv); } static int _sel_parse_read_common (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, struct ipmi_sel_entry **sel_entry_ptr, struct ipmi_sel_entry *sel_entry_buf) { if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!sel_record && !sel_record_len) { if (_get_parse_sel_entry_common (ctx, sel_entry_ptr) < 0) return (-1); } else { if (!sel_record || !sel_record_len) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } sel_entry_buf->sel_event_record_len = sel_record_len > IPMI_SEL_RECORD_LENGTH ? IPMI_SEL_RECORD_LENGTH : sel_record_len; memcpy (sel_entry_buf->sel_event_record, sel_record, sel_entry_buf->sel_event_record_len); *sel_entry_ptr = sel_entry_buf; } return (0); } int ipmi_sel_parse_read_record_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint16_t *record_id) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry; if (_sel_parse_read_common (ctx, sel_record, sel_record_len, &sel_entry_ptr, &sel_entry) < 0) return (-1); if (sel_get_record_header_info (ctx, sel_entry_ptr, record_id, NULL) < 0) return (-1); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_record_type (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *record_type) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry; if (_sel_parse_read_common (ctx, sel_record, sel_record_len, &sel_entry_ptr, &sel_entry) < 0) return (-1); if (sel_get_record_header_info (ctx, sel_entry_ptr, NULL, record_type) < 0) return (-1); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_timestamp (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint32_t *timestamp) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry; if (_sel_parse_read_common (ctx, sel_record, sel_record_len, &sel_entry_ptr, &sel_entry) < 0) return (-1); if (sel_get_timestamp (ctx, sel_entry_ptr, timestamp) < 0) return (-1); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int _sel_parse_system_event_common (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, struct ipmi_sel_system_event_record_data *system_event_record_data) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry_buf; assert (system_event_record_data); if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!sel_record && !sel_record_len) { if (_get_parse_sel_entry_common (ctx, &sel_entry_ptr) < 0) return (-1); } else { if (!sel_record || !sel_record_len) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } sel_entry_buf.sel_event_record_len = sel_record_len > IPMI_SEL_RECORD_LENGTH ? IPMI_SEL_RECORD_LENGTH : sel_record_len; memcpy (sel_entry_buf.sel_event_record, sel_record, sel_entry_buf.sel_event_record_len); sel_entry_ptr = &sel_entry_buf; } if (sel_get_system_event_record (ctx, sel_entry_ptr, system_event_record_data) < 0) return (-1); return (0); } int ipmi_sel_parse_read_generator_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *generator_id) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (generator_id) *generator_id = system_event_record_data.generator_id; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_ipmb_device_lun (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *ipmb_device_lun) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (ipmb_device_lun) *ipmb_device_lun = system_event_record_data.ipmb_device_lun; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_channel_number (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *channel_number) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); /* special case */ if (system_event_record_data.event_message_format_version == IPMI_V1_0_EVENT_MESSAGE_FORMAT) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); return (-1); } if (channel_number) *channel_number = system_event_record_data.channel_number; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_message_format_version (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_message_format_version) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_message_format_version) *event_message_format_version = system_event_record_data.event_message_format_version; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_sensor_type (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *sensor_type) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (sensor_type) *sensor_type = system_event_record_data.sensor_type; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_sensor_number (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *sensor_number) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (sensor_number) *sensor_number = system_event_record_data.sensor_number; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_direction (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_direction) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_direction) *event_direction = system_event_record_data.event_direction; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_type_code (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_type_code) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_type_code) *event_type_code = system_event_record_data.event_type_code; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data1 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data1) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); /* note: not a mistake, event_data3 is << 4 and event_data2 is << 6, see spec */ if (event_data1) *event_data1 = (system_event_record_data.offset_from_event_reading_type_code | system_event_record_data.event_data3_flag << 4 | system_event_record_data.event_data2_flag << 6); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data1_offset_from_event_reading_type_code (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data1_offset) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_data1_offset) *event_data1_offset = system_event_record_data.offset_from_event_reading_type_code; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data1_event_data2_flag (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data2_flag) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_data2_flag) *event_data2_flag = system_event_record_data.event_data2_flag; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data1_event_data3_flag (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data3_flag) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_data3_flag) *event_data3_flag = system_event_record_data.event_data3_flag; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data2 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data2) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_data2) *event_data2 = system_event_record_data.event_data2; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_event_data3 (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint8_t *event_data3) { struct ipmi_sel_system_event_record_data system_event_record_data; if (_sel_parse_system_event_common (ctx, sel_record, sel_record_len, &system_event_record_data) < 0) return (-1); if (event_data3) *event_data3 = system_event_record_data.event_data3; ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_manufacturer_id (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, uint32_t *manufacturer_id) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry; if (_sel_parse_read_common (ctx, sel_record, sel_record_len, &sel_entry_ptr, &sel_entry) < 0) return (-1); if (sel_get_manufacturer_id (ctx, sel_entry_ptr, manufacturer_id) < 0) return (-1); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (0); } int ipmi_sel_parse_read_oem (ipmi_sel_ctx_t ctx, const void *sel_record, unsigned int sel_record_len, void *buf, unsigned int buflen) { struct ipmi_sel_entry *sel_entry_ptr = NULL; struct ipmi_sel_entry sel_entry; int rv = 0; if (_sel_parse_read_common (ctx, sel_record, sel_record_len, &sel_entry_ptr, &sel_entry) < 0) return (-1); if (!buf || !buflen) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } if ((rv = sel_get_oem (ctx, sel_entry_ptr, buf, buflen)) < 0) return (-1); ctx->errnum = IPMI_SEL_ERR_SUCCESS; return (rv); } int ipmi_sel_parse_read_record_string (ipmi_sel_ctx_t ctx, const char *fmt, const void *sel_record, unsigned int sel_record_len, char *buf, unsigned int buflen, unsigned int flags) { struct ipmi_sel_entry *sel_entry = NULL; void *sel_record_to_use; unsigned int sel_record_len_to_use; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!fmt || !buf || !buflen || (flags & ~IPMI_SEL_STRING_FLAGS_MASK)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } if (!sel_record && !sel_record_len) { if (_get_parse_sel_entry_common (ctx, &sel_entry) < 0) return (-1); sel_record_to_use = sel_entry->sel_event_record; sel_record_len_to_use = sel_entry->sel_event_record_len; } else { if (!sel_record || !sel_record_len) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } sel_record_to_use = (void *)sel_record; sel_record_len_to_use = sel_record_len; } if (sel_record_len_to_use < IPMI_SEL_RECORD_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); return (-1); } return (sel_format_record_string (ctx, fmt, sel_record_to_use, sel_record_len_to_use, buf, buflen, flags)); } int ipmi_sel_clear_sel (ipmi_sel_ctx_t ctx) { unsigned int reservation_id_retry_count = 0; uint16_t reservation_id; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_clear_sel_rs))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } while (1) { if (ctx->reservation_id_registered) reservation_id = ctx->reservation_id; else { if (sel_get_reservation_id (ctx, &reservation_id, NULL) < 0) goto cleanup; } if (ipmi_cmd_clear_sel (ctx->ipmi_ctx, reservation_id, IPMI_SEL_CLEAR_OPERATION_INITIATE_ERASE, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_RESERVATION_CANCELLED) == 1) { if (ctx->reservation_id_registered) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_RESERVATION_CANCELED); goto cleanup; } else { reservation_id_retry_count++; if (reservation_id_retry_count > IPMI_SEL_RESERVATION_ID_RETRY) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } if (sel_get_reservation_id (ctx, &reservation_id, NULL) < 0) goto cleanup; continue; } } else { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } } break; } rv = 0; ctx->errnum = IPMI_SEL_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_sel_delete_sel_entry (ipmi_sel_ctx_t ctx, uint16_t record_id) { unsigned int reservation_id_retry_count = 0; uint16_t reservation_id; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; if (!ctx || ctx->magic != IPMI_SEL_CTX_MAGIC) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); return (-1); } if (!(record_id > IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY && record_id < IPMI_SEL_GET_RECORD_ID_LAST_ENTRY)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_PARAMETERS); return (-1); } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_delete_sel_entry_rs))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } while (1) { if (ctx->reservation_id_registered) reservation_id = ctx->reservation_id; else { if (sel_get_reservation_id (ctx, &reservation_id, NULL) < 0) goto cleanup; } if (ipmi_cmd_delete_sel_entry (ctx->ipmi_ctx, reservation_id, record_id, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1) || (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1)) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_NOT_FOUND); goto cleanup; } else if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_RESERVATION_CANCELLED) == 1) { if (ctx->reservation_id_registered) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_RESERVATION_CANCELED); goto cleanup; } else { reservation_id_retry_count++; if (reservation_id_retry_count > IPMI_SEL_RESERVATION_ID_RETRY) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } if (sel_get_reservation_id (ctx, &reservation_id, NULL) < 0) goto cleanup; continue; } } else { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } } break; } rv = 0; ctx->errnum = IPMI_SEL_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_sel_record_type_class (uint8_t record_type) { if (IPMI_SEL_RECORD_TYPE_IS_EVENT (record_type)) return (IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD); if (IPMI_SEL_RECORD_TYPE_IS_TIMESTAMPED_OEM (record_type)) return (IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD); if (IPMI_SEL_RECORD_TYPE_IS_NON_TIMESTAMPED_OEM (record_type)) return (IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD); return (IPMI_SEL_RECORD_TYPE_CLASS_UNKNOWN); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-common.c0000644002055400205540000004355513527331637021523 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/api/ipmi-sel-cmds-api.h" #include "freeipmi/cmds/ipmi-sel-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" int sel_get_reservation_id (ipmi_sel_ctx_t ctx, uint16_t *reservation_id, unsigned int *is_insufficient_privilege_level) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (reservation_id); if (is_insufficient_privilege_level) (*is_insufficient_privilege_level) = 0; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_reserve_sel_rs))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_reserve_sel (ctx->ipmi_ctx, obj_cmd_rs) < 0) { /* achu: * * IPMI spec states reservation ID 0000h should be used if Reserve SEL * is not supported. */ if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1) { *reservation_id = 0; goto out; } /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * For some reason motherboard requires Operator privilege * instead of User privilege. If we get * IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL, let caller know * and decide if it's ok to ignore it. Some operations may be * able to live without a reservation ID. */ if (is_insufficient_privilege_level && ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) == 1) (*is_insufficient_privilege_level) = 1; SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "reservation_id", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } *reservation_id = val; out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int sel_get_record_header_info (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint16_t *record_id, uint8_t *record_type) { fiid_obj_t obj_sel_record_header = NULL; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); if (sel_entry->sel_event_record_len < IPMI_SEL_RECORD_HEADER_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (!(obj_sel_record_header = fiid_obj_create (tmpl_sel_record_header))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sel_record_header, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record_header); goto cleanup; } if (record_id) { if (FIID_OBJ_GET (obj_sel_record_header, "record_id", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record_header); goto cleanup; } (*record_id) = val; } if (record_type) { if (FIID_OBJ_GET (obj_sel_record_header, "record_type", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record_header); goto cleanup; } (*record_type) = val; if (ctx->flags & IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS && !IPMI_SEL_RECORD_TYPE_VALID ((*record_type))) (*record_type) = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; } rv = 0; cleanup: fiid_obj_destroy (obj_sel_record_header); return (rv); } int sel_get_timestamp (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint32_t *timestamp) { fiid_obj_t obj_sel_record = NULL; uint8_t record_type; int record_type_class; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); if (sel_entry->sel_event_record_len < IPMI_SEL_RECORD_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (sel_get_record_header_info (ctx, sel_entry, NULL, &record_type) < 0) goto cleanup; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_system_event_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } if (fiid_obj_set_all (obj_sel_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } if (timestamp) { if (FIID_OBJ_GET (obj_sel_record, "timestamp", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } (*timestamp) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_sel_record); return (rv); } int sel_get_manufacturer_id (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint32_t *manufacturer_id) { fiid_obj_t obj_sel_record = NULL; uint8_t record_type; int record_type_class; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); if (sel_entry->sel_event_record_len < IPMI_SEL_RECORD_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (sel_get_record_header_info (ctx, sel_entry, NULL, &record_type) < 0) goto cleanup; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (!(obj_sel_record = fiid_obj_create (tmpl_sel_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sel_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } if (manufacturer_id) { if (FIID_OBJ_GET (obj_sel_record, "manufacturer_id", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } (*manufacturer_id) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_sel_record); return (rv); } int sel_get_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t *buf, unsigned int buflen) { fiid_obj_t obj_sel_record = NULL; uint8_t record_type; int record_type_class; int len; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); if (sel_entry->sel_event_record_len < IPMI_SEL_RECORD_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (sel_get_record_header_info (ctx, sel_entry, NULL, &record_type) < 0) goto cleanup; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } else { if (!(obj_sel_record = fiid_obj_create (tmpl_sel_non_timestamped_oem_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } } if (fiid_obj_set_all (obj_sel_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_record); goto cleanup; } if ((len = fiid_obj_get_data (obj_sel_record, "oem_defined", buf, buflen)) < 0) { ERR_TRACE (ipmi_sel_ctx_errormsg (ctx), ipmi_sel_ctx_errnum (ctx)); goto cleanup; } rv = len; cleanup: fiid_obj_destroy (obj_sel_record); return (rv); } int sel_get_system_event_record (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, struct ipmi_sel_system_event_record_data *system_event_record_data) { fiid_obj_t obj_sel_system_event_record = NULL; fiid_obj_t obj_sel_system_event_record_event_fields = NULL; int record_type_class; uint8_t record_type; uint8_t generator_id_type; uint8_t generator_id_address; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (system_event_record_data); if (sel_entry->sel_event_record_len < IPMI_SEL_RECORD_LENGTH) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (sel_get_record_header_info (ctx, sel_entry, NULL, &record_type) < 0) goto cleanup; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INVALID_SEL_ENTRY); goto cleanup; } if (!(obj_sel_system_event_record = fiid_obj_create (tmpl_sel_system_event_record))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (!(obj_sel_system_event_record_event_fields = fiid_obj_create (tmpl_sel_system_event_record_event_fields))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sel_system_event_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } if (fiid_obj_set_all (obj_sel_system_event_record_event_fields, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record_event_fields); goto cleanup; } if (FIID_OBJ_GET (obj_sel_system_event_record, "timestamp", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->timestamp = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "generator_id.id_type", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } generator_id_type = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "generator_id.id", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } generator_id_address = val; system_event_record_data->generator_id = ((generator_id_address << 1) | generator_id_type); if (FIID_OBJ_GET (obj_sel_system_event_record, "ipmb_device_lun", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->ipmb_device_lun = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "channel_number", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->channel_number = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_message_format_version", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_message_format_version = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "sensor_type", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->sensor_type = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "sensor_number", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->sensor_number = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_type_code", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_type_code = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_dir", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_direction = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_data1", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_data1 = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_data2", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_data2 = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "event_data3", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } system_event_record_data->event_data3 = val; if (FIID_OBJ_GET (obj_sel_system_event_record_event_fields, "offset_from_event_reading_type_code", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record_event_fields); goto cleanup; } system_event_record_data->offset_from_event_reading_type_code = val; if (FIID_OBJ_GET (obj_sel_system_event_record_event_fields, "event_data2_flag", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record_event_fields); goto cleanup; } system_event_record_data->event_data2_flag = val; if (FIID_OBJ_GET (obj_sel_system_event_record_event_fields, "event_data3_flag", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record_event_fields); goto cleanup; } system_event_record_data->event_data3_flag = val; rv = 0; cleanup: fiid_obj_destroy (obj_sel_system_event_record); fiid_obj_destroy (obj_sel_system_event_record_event_fields); return (rv); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-common.h0000644002055400205540000000474513527331637021526 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_COMMON_H #define IPMI_SEL_COMMON_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" /* convenience struct */ struct ipmi_sel_system_event_record_data { uint32_t timestamp; uint8_t generator_id; uint8_t ipmb_device_lun; uint8_t channel_number; uint8_t event_message_format_version; uint8_t sensor_type; uint8_t sensor_number; uint8_t event_type_code; uint8_t event_direction; uint8_t offset_from_event_reading_type_code; uint8_t event_data2_flag; uint8_t event_data3_flag; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; }; int sel_get_reservation_id (ipmi_sel_ctx_t ctx, uint16_t *reservation_id, unsigned int *is_insufficient_privilege_level); int sel_get_record_header_info (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint16_t *record_id, uint8_t *record_type); int sel_get_timestamp (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint32_t *timestamp); int sel_get_manufacturer_id (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint32_t *manufacturer_id); int sel_get_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t *buf, unsigned int buflen); int sel_get_system_event_record (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, struct ipmi_sel_system_event_record_data *system_event_record_data); #endif /* IPMI_SEL_COMMON_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-defs.h0000644002055400205540000000627613527331637021160 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_DEFS_H #define IPMI_SEL_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/sel/ipmi-sel.h" #include "list.h" #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ #define IPMI_SEL_CTX_MAGIC 0xAECD1846 /* Table 21-1 */ #define IPMI_SEL_RECORD_LENGTH 16 #define IPMI_SEL_RECORD_HEADER_LENGTH 3 #define IPMI_SEL_RESERVATION_ID_RETRY 4 #define IPMI_SEL_FLAGS_MASK \ (IPMI_SEL_FLAGS_DEBUG_DUMP \ | IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS) #define IPMI_SEL_SEPARATOR_STRING " | " #define IPMI_SEL_STRING_FLAGS_MASK \ (IPMI_SEL_STRING_FLAGS_VERBOSE \ | IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD \ | IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE \ | IPMI_SEL_STRING_FLAGS_DATE_USE_SLASH \ | IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING \ | IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS \ | IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES \ | IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA \ | IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME \ | IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC \ | IPMI_SEL_STRING_FLAGS_LEGACY) struct ipmi_sel_entry { uint8_t sel_event_record[IPMI_SEL_RECORD_LENGTH]; unsigned int sel_event_record_len; /* should always be 16, but just in case */ }; struct ipmi_sel_oem_intel_node_manager { int node_manager_data_parsed; int node_manager_data_found; uint8_t nm_health_event_sensor_number; uint8_t nm_exception_event_sensor_number; uint8_t nm_operational_capabilities_sensor_number; uint8_t nm_alert_threshold_exceeded_sensor_number; }; struct ipmi_sel_ctx { uint32_t magic; int errnum; unsigned int flags; uint32_t manufacturer_id; uint16_t product_id; uint8_t ipmi_version_major; uint8_t ipmi_version_minor; char *debug_prefix; char *separator; uint16_t reservation_id; int reservation_id_registered; ipmi_ctx_t ipmi_ctx; ipmi_sdr_ctx_t sdr_ctx; ipmi_interpret_ctx_t interpret_ctx; int utc_offset; int sel_entries_loaded; List sel_entries; ListIterator sel_entries_itr; struct ipmi_sel_entry *current_sel_entry; struct ipmi_sel_entry *callback_sel_entry; struct ipmi_sel_oem_intel_node_manager intel_node_manager; }; #endif /* IPMI_SEL_DEFS_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string.c0000644002055400205540000033542313527331637021537 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/cmds/ipmi-sel-cmds.h" #include "freeipmi/interpret/ipmi-interpret.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/record-format/oem/ipmi-sel-oem-linux-kernel-record-format.h" #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-sensor-units-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h" #include "freeipmi/util/ipmi-iana-enterprise-numbers-util.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "freeipmi/util/ipmi-sensor-util.h" #include "freeipmi/util/ipmi-timestamp-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-linux-kernel.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define NA_STRING "N/A" #define ASSERTION_EVENT "Assertion Event" #define DEASSERTION_EVENT "Deassertion Event" #define EVENT_BUFFER_LENGTH 4096 #define SEL_BUFFER_LENGTH 256 #define SENSOR_NAME_LENGTH 256 #define IANA_LENGTH 1024 #define UNITS_BUFFER_LENGTH 1024 extern struct sel_string_oem sel_string_oem_dell_poweredge; extern struct sel_string_oem sel_string_oem_fujitsu_irmc_common; extern struct sel_string_oem sel_string_oem_gigabyte_md90fs0zb; extern struct sel_string_oem sel_string_oem_gigabyte_mg20op0zb; extern struct sel_string_oem sel_string_oem_intel_quanta_qssc_s4r; extern struct sel_string_oem sel_string_oem_intel_s2600jf; extern struct sel_string_oem sel_string_oem_intel_s2600wp; extern struct sel_string_oem sel_string_oem_intel_s2600kp; extern struct sel_string_oem sel_string_oem_intel_s2600gz; extern struct sel_string_oem sel_string_oem_intel_s2600wt_common; extern struct sel_string_oem sel_string_oem_intel_s5500wb; extern struct sel_string_oem sel_string_oem_intel_windmill; extern struct sel_string_oem sel_string_oem_inventec_5441; extern struct sel_string_oem sel_string_oem_inventec_5442; extern struct sel_string_oem sel_string_oem_linux_kernel; extern struct sel_string_oem sel_string_oem_quanta_s99q; extern struct sel_string_oem sel_string_oem_sun_x4140; extern struct sel_string_oem sel_string_oem_supermicro_overheat_common; extern struct sel_string_oem sel_string_oem_supermicro_magnum_technologies_x8dtl; extern struct sel_string_oem sel_string_oem_supermicro_peppercon_common; extern struct sel_string_oem sel_string_oem_supermicro_x10dimm; extern struct sel_string_oem sel_string_oem_wistron_c6220; /* returns 0 on success, 1 on success but w/ truncation */ int sel_string_snprintf (char *buf, unsigned int buflen, unsigned int *wlen, const char *fmt, ...) { va_list ap; int ret; assert (buf); assert (buflen); assert (wlen); assert (fmt); va_start (ap, fmt); ret = vsnprintf (buf + *wlen, buflen - *wlen, fmt, ap); va_end (ap); if (ret >= (buflen - *wlen)) { (*wlen) = buflen; return (1); } (*wlen) += ret; return (0); } int sel_string_strcat_comma_separate (char *buf, unsigned int buflen, unsigned int *wlen, const char *str) { assert (buf); assert (buflen); assert (wlen); assert (str); if (strlen (buf) > 0) { if (sel_string_snprintf (buf, buflen, wlen, ", ")) return (1); } return (sel_string_snprintf (buf, buflen, wlen, "%s", str)); } static int _find_motherboard_oem_support (ipmi_sel_ctx_t ctx, unsigned int flags, struct sel_string_oem **sel_string_oem) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (sel_string_oem); if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL) { assert (IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950); assert (IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610); assert (IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710); assert (IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); if (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720) (*sel_string_oem) = &sel_string_oem_dell_poweredge; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU) { if (ctx->product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && ctx->product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX) (*sel_string_oem) = &sel_string_oem_fujitsu_irmc_common; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE) { if (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB) (*sel_string_oem) = &sel_string_oem_gigabyte_md90fs0zb; else if (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB) (*sel_string_oem) = &sel_string_oem_gigabyte_mg20op0zb; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL) { /* achu: * * ARGH! Intel gave the S2600KPR an identical product ID number as the * S2600WT2 and S2600WTT. * * That's why IPMI_INTEL_PRODUCT_ID_S2600KPR returns * sel_string_oem_intel_s2600wt_common, even though it seemingly * should return sel_string_oem_intel_s2600kp. */ assert (IPMI_INTEL_PRODUCT_ID_S2600WT2 == IPMI_INTEL_PRODUCT_ID_S2600WTT); assert (IPMI_INTEL_PRODUCT_ID_S2600WT2 == IPMI_INTEL_PRODUCT_ID_S2600KPR); if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) (*sel_string_oem) = &sel_string_oem_intel_quanta_qssc_s4r; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF) (*sel_string_oem) = &sel_string_oem_intel_s2600jf; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP) (*sel_string_oem) = &sel_string_oem_intel_s2600wp; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP) (*sel_string_oem) = &sel_string_oem_intel_s2600kp; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ) (*sel_string_oem) = &sel_string_oem_intel_s2600gz; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KPR) (*sel_string_oem) = &sel_string_oem_intel_s2600wt_common; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB) (*sel_string_oem) = &sel_string_oem_intel_s5500wb; else if (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL) (*sel_string_oem) = &sel_string_oem_intel_windmill; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC) { if (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441) (*sel_string_oem) = &sel_string_oem_inventec_5441; else if (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442) (*sel_string_oem) = &sel_string_oem_inventec_5442; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA) { if (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q) (*sel_string_oem) = &sel_string_oem_quanta_s99q; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS) { if (ctx->product_id == IPMI_SUN_MICROSYSTEMS_PRODUCT_ID_X4140) (*sel_string_oem) = &sel_string_oem_sun_x4140; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_PEPPERCON) /* Supermicro variant */ { assert (IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DB8); assert (IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X8DTN); assert (IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7SBI_LN4); if (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DB8 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X8DTN || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7SBI_LN4) (*sel_string_oem) = &sel_string_oem_supermicro_peppercon_common; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO || ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND) { assert (IPMI_SUPERMICRO_PRODUCT_ID_X8DTH == IPMI_SUPERMICRO_PRODUCT_ID_X8DTG); assert (IPMI_SUPERMICRO_PRODUCT_ID_X8DTH == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU); assert (IPMI_SUPERMICRO_PRODUCT_ID_X8DTH == IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F); assert (IPMI_SUPERMICRO_PRODUCT_ID_X8DTL == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F); assert (IPMI_SUPERMICRO_PRODUCT_ID_X9SCL == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM); if (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTH || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTG || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCL || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DG6 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F) (*sel_string_oem) = &sel_string_oem_supermicro_overheat_common; else if (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SL_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SLL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRL_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SLM_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRW_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRI_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DDW_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRG_HT) (*sel_string_oem) = &sel_string_oem_supermicro_x10dimm; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES) /* Supermicro variant */ { if (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_MAGNUM_TECHNOLOGIES_X8DTL) (*sel_string_oem) = &sel_string_oem_supermicro_magnum_technologies_x8dtl; } else if (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON) { if (ctx->product_id == IPMI_WISTRON_PRODUCT_ID_C6220) (*sel_string_oem) = &sel_string_oem_wistron_c6220; } return (0); } static int _invalid_sel_entry_common (ipmi_sel_ctx_t ctx, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (flags & IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD) { if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); return (0); } return (0); } ctx->errnum = IPMI_SEL_ERR_INVALID_SEL_ENTRY; return (-1); } /* * return (1) - found record * return (0) - can't find record * return (-1) - error */ static int _find_and_seek_record (ipmi_sel_ctx_t ctx, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->sdr_ctx); /* must be checked earlier */ assert (system_event_record_data); if (ipmi_sdr_cache_search_sensor (ctx->sdr_ctx, system_event_record_data->sensor_number, system_event_record_data->generator_id) < 0) { /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * The slave address is reportedly incorrectly by having the * generator_id be shifted over by one. This is a special * "try again" corner case. */ if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_NOT_FOUND && (system_event_record_data->generator_id == (IPMI_SLAVE_ADDRESS_BMC << 1))) { if (!ipmi_sdr_cache_search_sensor (ctx->sdr_ctx, system_event_record_data->sensor_number, (system_event_record_data->generator_id >> 1))) return (1); /* else fall through to normal error path */ } if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) != IPMI_SDR_ERR_NOT_FOUND) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_SDR_CACHE_ERROR); return (-1); } /* else can't find it */ return (0); } return (1); } /* * return (1) - parsed fine * return (0) - can't parse info/non-decodable * return (-1) - error */ static int _get_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_system_event_record_data *system_event_record_data, unsigned int flags, char *sensor_name, unsigned int sensor_name_len) { int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (system_event_record_data); assert (sensor_name); assert (sensor_name_len); if (!ctx->sdr_ctx) return (0); if ((ret = _find_and_seek_record (ctx, system_event_record_data)) < 0) return (-1); if (!ret) { rv = 0; goto cleanup; } if (flags & IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES) { if (ipmi_sdr_parse_entity_sensor_name (ctx->sdr_ctx, NULL, 0, system_event_record_data->sensor_number, 0, /* flags */ sensor_name, sensor_name_len) < 0) { if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD || ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD) rv = 0; else SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } } else { if (ipmi_sdr_parse_sensor_name (ctx->sdr_ctx, NULL, 0, system_event_record_data->sensor_number, 0, /* flags */ sensor_name, sensor_name_len) < 0) { if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD || ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD) rv = 0; else SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } } rv = 1; cleanup: return (rv); } /* * return (1) - parsed fine * return (0) - can't parse info/non-decodable * return (-1) - error */ static int _get_sensor_reading (ipmi_sel_ctx_t ctx, struct ipmi_sel_system_event_record_data *system_event_record_data, unsigned int flags, uint8_t raw_data, double *reading, char *sensor_units_buf, unsigned int sensor_units_buflen) { uint8_t sdr_event_reading_type_code; int8_t r_exponent; int8_t b_exponent; int16_t m; int16_t b; uint8_t linearization; uint8_t analog_data_format; uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; int abbreviated_units; int sensor_units_ret; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (system_event_record_data); assert (ipmi_event_reading_type_code_class (system_event_record_data->event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD); assert (reading); assert (sensor_units_buf); assert (sensor_units_buflen); if (!ctx->sdr_ctx) return (0); if ((ret = _find_and_seek_record (ctx, system_event_record_data)) < 0) return (-1); if (!ret) { rv = 0; goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (ctx->sdr_ctx, NULL, 0, &sdr_event_reading_type_code) < 0) { if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD || ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD) rv = 0; else SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_event_reading_type_code_class (sdr_event_reading_type_code) != IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { rv = 0; goto cleanup; } if (ipmi_sdr_parse_sensor_decoding_data (ctx->sdr_ctx, NULL, 0, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD || ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD) rv = 0; else SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_sdr_parse_sensor_units (ctx->sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) { if (ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD || ipmi_sdr_ctx_errnum (ctx->sdr_ctx) == IPMI_SDR_ERR_PARSE_INCOMPLETE_SDR_RECORD) rv = 0; else SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } if (flags & IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS) abbreviated_units = 0; else abbreviated_units = 1; sensor_units_ret = ipmi_sensor_units_string (sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type, sensor_units_buf, sensor_units_buflen, abbreviated_units); if (sensor_units_ret <= 0) snprintf (sensor_units_buf, sensor_units_buflen, "%s", ipmi_sensor_units[IPMI_SENSOR_UNIT_UNSPECIFIED]); /* if the sensor is not analog, this is most likely a bug in the * SDR */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { rv = 0; goto cleanup; } /* We don't currently handle non-linear sensors */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { rv = 0; goto cleanup; } if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, raw_data, reading) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } rv = 1; cleanup: return (rv); } static int _get_previous_state_or_severity (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t *previous_offset_from_event_reading_type_code, uint8_t *offset_from_severity_event_reading_type_code) { fiid_obj_t obj_sel_system_event_record = NULL; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (previous_offset_from_event_reading_type_code); assert (offset_from_severity_event_reading_type_code); if (!(obj_sel_system_event_record = fiid_obj_create (tmpl_sel_system_event_record_discrete_previous_state_severity))) { SEL_ERRNO_TO_SEL_ERRNUM (ctx, errno); goto cleanup; } if (fiid_obj_set_all (obj_sel_system_event_record, sel_entry->sel_event_record, sel_entry->sel_event_record_len) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } if (FIID_OBJ_GET (obj_sel_system_event_record, "previous_offset_from_event_reading_type_code", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } *previous_offset_from_event_reading_type_code = val; if (FIID_OBJ_GET (obj_sel_system_event_record, "offset_from_severity_event_reading_type_code", &val) < 0) { SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM (ctx, obj_sel_system_event_record); goto cleanup; } *offset_from_severity_event_reading_type_code = val; rv = 0; cleanup: fiid_obj_destroy (obj_sel_system_event_record); return (rv); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_interpretation (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { unsigned int interpret_flags_save; unsigned int interpret_flags; unsigned int sel_state; char *sel_state_str = NULL; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (!ctx->interpret_ctx) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } if (ipmi_interpret_ctx_get_flags (ctx->interpret_ctx, &interpret_flags_save) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } interpret_flags = interpret_flags_save; if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) interpret_flags |= IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA; if (ipmi_interpret_ctx_set_flags (ctx->interpret_ctx, interpret_flags) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } if (ipmi_interpret_sel (ctx->interpret_ctx, sel_entry->sel_event_record, sel_entry->sel_event_record_len, &sel_state) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } if (ipmi_interpret_ctx_set_flags (ctx->interpret_ctx, interpret_flags_save) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERPRET_ERROR); return (-1); } /* achu * * NOT_AVAILABLE and IGNORE_UNAVAILABLE_FIELD not applicable here. * This output is always possible, the N/A indicates that there is * no interpretation available for the current event. */ if (sel_state == IPMI_INTERPRET_STATE_NOMINAL) sel_state_str = "Nominal"; else if (sel_state == IPMI_INTERPRET_STATE_WARNING) sel_state_str = "Warning"; else if (sel_state == IPMI_INTERPRET_STATE_CRITICAL) sel_state_str = "Critical"; else sel_state_str = NA_STRING; if (sel_string_snprintf (buf, buflen, wlen, "%s", sel_state_str)) return (1); return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_time (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { char tmpbuf[SEL_BUFFER_LENGTH + 1]; unsigned int timestamp_flags; uint32_t timestamp; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_timestamp (ctx, sel_entry, ×tamp) < 0) return (-1); memset (tmpbuf, '\0', SEL_BUFFER_LENGTH + 1); timestamp_flags = IPMI_TIMESTAMP_FLAG_ABBREVIATE; if (flags & IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME) timestamp_flags |= IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME; if (flags & IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC) timestamp_flags |= IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC; if (ipmi_timestamp_string (timestamp, ctx->utc_offset, timestamp_flags, "%H:%M:%S", tmpbuf, SEL_BUFFER_LENGTH) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_date (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { char tmpbuf[SEL_BUFFER_LENGTH + 1]; unsigned int timestamp_flags; uint32_t timestamp; char *date_format = NULL; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_timestamp (ctx, sel_entry, ×tamp) < 0) return (-1); if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) date_format = "%d-%b-%Y"; else { if (flags & IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING) { if (flags & IPMI_SEL_STRING_FLAGS_DATE_USE_SLASH) date_format = "%b/%d/%Y"; else date_format = "%b-%d-%Y"; } else { if (flags & IPMI_SEL_STRING_FLAGS_DATE_USE_SLASH) date_format = "%m/%d/%Y"; else date_format = "%m-%d-%Y"; } } memset (tmpbuf, '\0', SEL_BUFFER_LENGTH + 1); timestamp_flags = IPMI_TIMESTAMP_FLAG_ABBREVIATE; if (flags & IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME) timestamp_flags |= IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME; if (flags & IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC) timestamp_flags |= IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC; if (ipmi_timestamp_string (timestamp, ctx->utc_offset, timestamp_flags, date_format, tmpbuf, SEL_BUFFER_LENGTH) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_sensor_type (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { struct ipmi_sel_system_event_record_data system_event_record_data; const char *sensor_type_str = NULL; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) sensor_type_str = ipmi_get_oem_sensor_type_string (system_event_record_data.sensor_type, (system_event_record_data.event_type_code & 0x7F), ctx->manufacturer_id, ctx->product_id); else sensor_type_str = ipmi_get_sensor_type_string (system_event_record_data.sensor_type); if (sensor_type_str) { if (sel_string_snprintf (buf, buflen, wlen, "%s", sensor_type_str)) return (1); } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char sensor_name_buf[SENSOR_NAME_LENGTH + 1]; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (sensor_name_buf, '\0', SENSOR_NAME_LENGTH + 1); if ((ret = _get_sensor_name (ctx, &system_event_record_data, flags, sensor_name_buf, SENSOR_NAME_LENGTH)) < 0) return (-1); if (ret) { if (sel_string_snprintf (buf, buflen, wlen, "%s", sensor_name_buf)) return (1); return (0); } /* else fall through */ if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { int oem_rv = 0; if (sel_string_oem && sel_string_oem->output_sensor_name) { if ((ret = sel_string_oem->output_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &system_event_record_data, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } } if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "Sensor #%d (Generator ID %02Xh)", system_event_record_data.sensor_number, system_event_record_data.generator_id)) return (1); } else { if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) { if (sel_string_snprintf (buf, buflen, wlen, "#%d", system_event_record_data.sensor_number)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Sensor #%d", system_event_record_data.sensor_number)) return (1); } } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data1 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char tmpbuf[EVENT_BUFFER_LENGTH + 1]; int output_flag = 0; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (tmpbuf, '\0', EVENT_BUFFER_LENGTH + 1); switch (ipmi_event_reading_type_code_class (system_event_record_data.event_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: /* Don't use ipmi_get_threshold_message, b/c we didn't call * get_sensor_reading. Fall through to below. */ case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: ret = ipmi_get_generic_event_message_short (system_event_record_data.event_type_code, system_event_record_data.offset_from_event_reading_type_code, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data1_class_sensor_specific_discrete) { if ((ret = sel_string_oem->output_event_data1_class_sensor_specific_discrete (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } /* * From Dell Spec and Dell Code * * Dell Poweredge R610 * Dell Poweredge R710 * * achu: This is a special case, event reading type code and * sensor type are non-OEM, Dell added an additional offset not * defined by the IPMI spec. */ if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA && ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710) && system_event_record_data.sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data.offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_DELL_POST_FATAL_ERROR) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "POST Fatal Error"); output_flag++; break; } ret = ipmi_get_sensor_type_message_short (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data1_class_oem) { if ((ret = sel_string_oem->output_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Event Type Code = %02Xh", system_event_record_data.event_type_code); else { if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Offset = %02Xh (Event Type Code = %02Xh)", system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_type_code); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Offset = %02Xh", system_event_record_data.offset_from_event_reading_type_code); } output_flag++; break; default: /* fall through to output default output */ break; } if (output_flag) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); } else { if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "Event Offset = %02Xh (Event Type Code = %02Xh)", system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_type_code)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Event Offset = %02Xh", system_event_record_data.offset_from_event_reading_type_code)) return (1); } } return (0); } static double _round_double2 (double d) { double r = 0.0; r = (d - (long) d) * 100.0; if ((r - (long) r) > 0.5) return ((long) d + (((long) r + 1) / 100.0)); return ((long) d + ((long) r / 100.0)); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data2 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char tmpbuf[EVENT_BUFFER_LENGTH + 1]; int no_output_flag = 0; int output_flag = 0; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (tmpbuf, '\0', EVENT_BUFFER_LENGTH + 1); switch (ipmi_event_reading_type_code_class (system_event_record_data.event_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: switch (system_event_record_data.event_data2_flag) { case IPMI_SEL_EVENT_DATA_TRIGGER_READING: { double reading; char sensor_units_buf[UNITS_BUFFER_LENGTH+1]; memset (sensor_units_buf, '\0', UNITS_BUFFER_LENGTH+1); if ((ret = _get_sensor_reading (ctx, &system_event_record_data, flags, system_event_record_data.event_data2, &reading, sensor_units_buf, UNITS_BUFFER_LENGTH)) < 0) return (-1); if (ret) { if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Reading = %.2f %s", _round_double2 (reading), sensor_units_buf); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Sensor Reading = %.2f %s", _round_double2 (reading), sensor_units_buf); } else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Sensor Reading = %02Xh", system_event_record_data.event_data2); output_flag++; } break; case IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE: if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } ret = ipmi_get_event_data2_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_data2, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_SEL_EVENT_DATA_OEM_CODE: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data2_threshold_oem) { if ((ret = sel_string_oem->output_event_data2_threshold_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM code = %02Xh", system_event_record_data.event_data2); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data2 code = %02Xh", system_event_record_data.event_data2); output_flag++; break; default: if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "%s", NA_STRING); output_flag++; } else /* nothing to output */ return (0); break; } break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: switch (system_event_record_data.event_data2_flag) { case IPMI_SEL_EVENT_DATA_PREVIOUS_STATE_OR_SEVERITY: { uint8_t previous_offset_from_event_reading_type_code; uint8_t offset_from_severity_event_reading_type_code; char tmppreviousbuf[EVENT_BUFFER_LENGTH]; char tmpseveritybuf[EVENT_BUFFER_LENGTH]; int previous_output_flag = 0; int severity_output_flag = 0; if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } if (_get_previous_state_or_severity (ctx, sel_entry, &previous_offset_from_event_reading_type_code, &offset_from_severity_event_reading_type_code) < 0) return (-1); if (previous_offset_from_event_reading_type_code != IPMI_SEL_RECORD_UNSPECIFIED_OFFSET) { ret = ipmi_get_event_data2_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, previous_offset_from_event_reading_type_code, tmppreviousbuf, EVENT_BUFFER_LENGTH); if (ret > 0) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Previous State = %s", tmppreviousbuf); previous_output_flag++; } } if (offset_from_severity_event_reading_type_code != IPMI_SEL_RECORD_UNSPECIFIED_OFFSET) { ret = ipmi_get_generic_event_message_short (IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY, offset_from_severity_event_reading_type_code, tmpseveritybuf, EVENT_BUFFER_LENGTH); if (ret > 0) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Severity State = %s", tmpseveritybuf); severity_output_flag++; } } /* achu: special case, we need to combine the outputs into one */ if (previous_output_flag && severity_output_flag) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Previous State = %s%sSeverity State = %s", tmppreviousbuf, ctx->separator ? ctx->separator : IPMI_SEL_SEPARATOR_STRING, tmpseveritybuf); if (previous_output_flag || severity_output_flag) output_flag++; } break; case IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE: if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } ret = ipmi_get_event_data2_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_data2, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_SEL_EVENT_DATA_OEM_CODE: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data2_discrete_oem) { if ((ret = sel_string_oem->output_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM code = %02Xh", system_event_record_data.event_data2); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data2 code = %02Xh", system_event_record_data.event_data2); output_flag++; break; default: if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "%s", NA_STRING); output_flag++; } else /* nothing to output */ return (0); break; } break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data2_class_oem) { if ((ret = sel_string_oem->output_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT || system_event_record_data.event_data2_flag == IPMI_SEL_EVENT_DATA_UNSPECIFIED_BYTE) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Event data2 = %02Xh", system_event_record_data.event_data2); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data2 code = %02Xh", system_event_record_data.event_data2); output_flag++; break; default: /* fall through to output default output */ break; } if (output_flag) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); } else { if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) return (0); if (no_output_flag) { if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "Event Data2 = %02Xh (Event Type Code = %02Xh)", system_event_record_data.event_data2, system_event_record_data.event_type_code)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Event Data2 = %02Xh", system_event_record_data.event_data2)) return (1); } } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char tmpbuf[EVENT_BUFFER_LENGTH + 1]; int no_output_flag = 0; int output_flag = 0; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (tmpbuf, '\0', EVENT_BUFFER_LENGTH + 1); switch (ipmi_event_reading_type_code_class (system_event_record_data.event_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: switch (system_event_record_data.event_data3_flag) { case IPMI_SEL_EVENT_DATA_TRIGGER_THRESHOLD_VALUE: { double reading; char sensor_units_buf[UNITS_BUFFER_LENGTH+1]; memset (sensor_units_buf, '\0', UNITS_BUFFER_LENGTH+1); if ((ret = _get_sensor_reading (ctx, &system_event_record_data, flags, system_event_record_data.event_data3, &reading, sensor_units_buf, UNITS_BUFFER_LENGTH)) < 0) return (-1); if (ret) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Threshold = %.2f %s", _round_double2 (reading), sensor_units_buf); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Threshold = %02Xh", system_event_record_data.event_data3); output_flag++; } break; case IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE: if (system_event_record_data.event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } ret = ipmi_get_event_data3_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_data2, system_event_record_data.event_data3, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_SEL_EVENT_DATA_OEM_CODE: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data3_threshold_oem) { if ((ret = sel_string_oem->output_event_data3_threshold_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM code = %02Xh", system_event_record_data.event_data3); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data3 code = %02Xh", system_event_record_data.event_data3); output_flag++; break; default: if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "%s", NA_STRING); output_flag++; } else /* nothing to output */ return (0); break; } break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: switch (system_event_record_data.event_data3_flag) { case IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE: if (system_event_record_data.event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } ret = ipmi_get_event_data3_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, system_event_record_data.event_data2, system_event_record_data.event_data3, tmpbuf, EVENT_BUFFER_LENGTH); if (ret > 0) output_flag++; break; case IPMI_SEL_EVENT_DATA_OEM_CODE: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data3_discrete_oem) { if ((ret = sel_string_oem->output_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM code = %02Xh", system_event_record_data.event_data3); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data3 code = %02Xh", system_event_record_data.event_data3); output_flag++; break; default: if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "%s", NA_STRING); output_flag++; } else /* nothing to output */ return (0); break; } break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (sel_string_oem && sel_string_oem->output_event_data3_class_oem) { if ((ret = sel_string_oem->output_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, EVENT_BUFFER_LENGTH, flags, wlen, &system_event_record_data)) < 0) return (-1); if (ret) { output_flag++; break; } } } if (system_event_record_data.event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT || system_event_record_data.event_data3_flag == IPMI_SEL_EVENT_DATA_UNSPECIFIED_BYTE) { no_output_flag++; break; } if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Event data3 = %02Xh", system_event_record_data.event_data3); else snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "OEM Event Data3 code = %02Xh", system_event_record_data.event_data3); output_flag++; break; default: /* fall through to output default output */ break; } if (output_flag) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); } else { if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) return (0); if (no_output_flag) { if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "Event Data3 = %02Xh (Event Type Code = %02Xh)", system_event_record_data.event_data3, system_event_record_data.event_type_code)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Event Data3 = %02Xh", system_event_record_data.event_data3)) return (1); } } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char tmpbufdata2[EVENT_BUFFER_LENGTH + 1]; char tmpbufdata3[EVENT_BUFFER_LENGTH + 1]; unsigned int tmpbufdata2_wlen = 0; unsigned int tmpbufdata3_wlen = 0; int data2_ret; int data3_ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (tmpbufdata2, '\0', EVENT_BUFFER_LENGTH+1); memset (tmpbufdata3, '\0', EVENT_BUFFER_LENGTH+1); /* Special case * * The event_data3 indicates what "type" event_data2 is, and * subsequently what should be output. So we only need to output * event_data3. */ if (ipmi_event_reading_type_code_class (system_event_record_data.event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE && system_event_record_data.sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED && system_event_record_data.offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED && system_event_record_data.event_data2_flag == IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE && system_event_record_data.event_data3_flag == IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE) { if ((data3_ret = _output_event_data3 (ctx, sel_entry, sel_record_type, tmpbufdata3, EVENT_BUFFER_LENGTH, flags, &tmpbufdata3_wlen, sel_string_oem)) < 0) return (-1); if (data3_ret) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbufdata3)) return (1); return (0); } if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { int ret; int oem_rv = 0; /* Linux kernel case is special, not vendor specific */ if (system_event_record_data.generator_id == IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL && system_event_record_data.event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data.sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP && system_event_record_data.event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data.event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { if ((ret = sel_string_output_linux_kernel_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &system_event_record_data, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } if (sel_string_oem && sel_string_oem->output_event_data2_event_data3) { if ((ret = sel_string_oem->output_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &system_event_record_data, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } } if ((data2_ret = _output_event_data2 (ctx, sel_entry, sel_record_type, tmpbufdata2, EVENT_BUFFER_LENGTH, flags, &tmpbufdata2_wlen, sel_string_oem)) < 0) return (-1); if ((data3_ret = _output_event_data3 (ctx, sel_entry, sel_record_type, tmpbufdata3, EVENT_BUFFER_LENGTH, flags, &tmpbufdata3_wlen, sel_string_oem)) < 0) return (-1); if (data2_ret || data3_ret) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } if ((strlen (tmpbufdata2) && strcasecmp (tmpbufdata2, NA_STRING)) && (strlen (tmpbufdata3) && strcasecmp (tmpbufdata3, NA_STRING))) { if (sel_string_snprintf (buf, buflen, wlen, "%s%s%s", tmpbufdata2, ctx->separator ? ctx->separator : IPMI_SEL_SEPARATOR_STRING, tmpbufdata3)) return (1); } else if (strlen (tmpbufdata2) && strcasecmp (tmpbufdata2, NA_STRING)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbufdata2)) return (1); } else if (strlen (tmpbufdata3) && strcasecmp (tmpbufdata3, NA_STRING)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbufdata3)) return (1); } else if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data2_previous_state_or_severity (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int previous_state_flag) { struct ipmi_sel_system_event_record_data system_event_record_data; uint8_t previous_offset_from_event_reading_type_code; uint8_t offset_from_severity_event_reading_type_code; char tmpbuf[EVENT_BUFFER_LENGTH + 1]; char tmpstatebuf[EVENT_BUFFER_LENGTH]; int no_output_flag = 0; int output_flag = 0; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); if (_get_previous_state_or_severity (ctx, sel_entry, &previous_offset_from_event_reading_type_code, &offset_from_severity_event_reading_type_code) < 0) return (-1); memset (tmpbuf, '\0', EVENT_BUFFER_LENGTH + 1); if ((ipmi_event_reading_type_code_class (system_event_record_data.event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || ipmi_event_reading_type_code_class (system_event_record_data.event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) && system_event_record_data.event_data2_flag == IPMI_SEL_EVENT_DATA_PREVIOUS_STATE_OR_SEVERITY && ((previous_state_flag && previous_offset_from_event_reading_type_code != IPMI_SEL_RECORD_UNSPECIFIED_OFFSET) || (!previous_state_flag && offset_from_severity_event_reading_type_code != IPMI_SEL_RECORD_UNSPECIFIED_OFFSET))) { if (system_event_record_data.event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { no_output_flag++; goto out; } if (previous_state_flag) { ret = ipmi_get_event_data2_message (system_event_record_data.sensor_type, system_event_record_data.offset_from_event_reading_type_code, previous_offset_from_event_reading_type_code, tmpstatebuf, EVENT_BUFFER_LENGTH); if (ret > 0) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Previous State = %s", tmpstatebuf); output_flag++; } } else { ret = ipmi_get_generic_event_message_short (IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY, offset_from_severity_event_reading_type_code, tmpstatebuf, EVENT_BUFFER_LENGTH); if (ret > 0) { snprintf (tmpbuf, EVENT_BUFFER_LENGTH, "Severity State = %s", tmpstatebuf); output_flag++; } } } else { if (flags & IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD) { if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); return (0); } return (0); } ctx->errnum = IPMI_SEL_ERR_INVALID_SEL_ENTRY; return (-1); } out: if (output_flag) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbuf)) return (1); } else { if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) return (0); if (no_output_flag) { if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "Event Data2 = %02Xh (Event Type Code = %02Xh)", system_event_record_data.event_data2, system_event_record_data.event_type_code)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Event Data2 = %02Xh", system_event_record_data.event_data2)) return (1); } } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data2_previous_state (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { return (_output_event_data2_previous_state_or_severity (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, 1)); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data2_severity (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { return (_output_event_data2_previous_state_or_severity (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, 0)); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_data1_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { struct ipmi_sel_system_event_record_data system_event_record_data; char tmpbufeventdata1[EVENT_BUFFER_LENGTH + 1]; char tmpbufeventdata23[EVENT_BUFFER_LENGTH + 1]; unsigned int tmpbufeventdata1_wlen = 0; unsigned int tmpbufeventdata23_wlen = 0; int data1_ret; int data23_ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); memset (tmpbufeventdata1, '\0', EVENT_BUFFER_LENGTH+1); memset (tmpbufeventdata23, '\0', EVENT_BUFFER_LENGTH+1); if ((data1_ret = _output_event_data1 (ctx, sel_entry, sel_record_type, tmpbufeventdata1, EVENT_BUFFER_LENGTH, flags, &tmpbufeventdata1_wlen, sel_string_oem)) < 0) return (-1); if ((data23_ret = _output_event_data2_event_data3 (ctx, sel_entry, sel_record_type, tmpbufeventdata23, EVENT_BUFFER_LENGTH, flags, &tmpbufeventdata23_wlen, sel_string_oem)) < 0) return (-1); if (data1_ret || data23_ret) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); return (-1); } if ((strlen (tmpbufeventdata1) && strcasecmp (tmpbufeventdata1, NA_STRING)) && (strlen (tmpbufeventdata23) && strcasecmp (tmpbufeventdata23, NA_STRING))) { if (sel_string_snprintf (buf, buflen, wlen, "%s%s%s", tmpbufeventdata1, ctx->separator ? ctx->separator : IPMI_SEL_SEPARATOR_STRING, tmpbufeventdata23)) return (1); } else if (strlen (tmpbufeventdata1) && strcasecmp (tmpbufeventdata1, NA_STRING)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbufeventdata1)) return (1); } else if (strlen (tmpbufeventdata23) && strcasecmp (tmpbufeventdata23, NA_STRING)) { /* Having event_data1 as N/A and event data 2+3 not N/A is * probably impossible, but handle it anyway. */ if (sel_string_snprintf (buf, buflen, wlen, "%s", tmpbufeventdata23)) return (1); } else if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_event_direction (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { struct ipmi_sel_system_event_record_data system_event_record_data; char *str = NULL; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_system_event_record (ctx, sel_entry, &system_event_record_data) < 0) return (-1); if (system_event_record_data.event_direction) str = DEASSERTION_EVENT; else str = ASSERTION_EVENT; if (sel_string_snprintf (buf, buflen, wlen, "%s", str)) return (1); return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_manufacturer_id (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen) { uint32_t manufacturer_id; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (sel_get_manufacturer_id (ctx, sel_entry, &manufacturer_id) < 0) return (-1); if (flags & IPMI_SEL_STRING_FLAGS_LEGACY) { if (sel_string_snprintf (buf, buflen, wlen, "Manufacturer ID = %02Xh", manufacturer_id)) return (1); } else { char iana_buf[IANA_LENGTH + 1]; int ret; memset (iana_buf, '\0', IANA_LENGTH + 1); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, IANA_LENGTH); if (ret > 0) { if (sel_string_snprintf (buf, buflen, wlen, "Manufacturer ID = %s (%02Xh)", iana_buf, manufacturer_id)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "Manufacturer ID = %02Xh", manufacturer_id)) return (1); } } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_oem_record_data (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { uint8_t oem_data[SEL_BUFFER_LENGTH]; int oem_len; int oem_index; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && ipmi_sel_record_type_class (sel_record_type) != IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) return (_invalid_sel_entry_common (ctx, buf, buflen, flags, wlen)); if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { int ret; int oem_rv = 0; /* Linux kernel case is special, not vendor specific * * achu: hoping no vendor violates this */ if (sel_record_type == IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_LINUX_KERNEL_PANIC) { if ((ret = sel_string_output_linux_kernel_oem_record_data (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } if (sel_string_oem && sel_string_oem->output_oem_record_data) { if ((ret = sel_string_oem->output_oem_record_data (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } } if ((oem_len = sel_get_oem (ctx, sel_entry, oem_data, SEL_BUFFER_LENGTH)) < 0) return (-1); if (flags & IPMI_SEL_STRING_FLAGS_VERBOSE) { if (sel_string_snprintf (buf, buflen, wlen, "OEM defined (Record Type = %02Xh) = ", sel_record_type)) return (1); } else { if (sel_string_snprintf (buf, buflen, wlen, "OEM defined = ")) return (1); } for (oem_index = 0; oem_index < oem_len; oem_index++) { if (oem_index) { if (sel_string_snprintf (buf, buflen, wlen, " ")) return (1); } if (sel_string_snprintf (buf, buflen, wlen, "%02Xh", oem_data[oem_index])) return (1); } return (0); } /* return (0) - continue on * return (1) - buffer full, return full buffer to user * return (-1) - error, cleanup and return error */ static int _output_oem_string (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct sel_string_oem *sel_string_oem) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); if (sel_string_oem && sel_string_oem->output_oem_string) { int oem_rv = 0; if ((ret = sel_string_oem->output_oem_string (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, &oem_rv)) < 0) return (-1); if (ret) return (oem_rv); } if (flags & IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE) { if (sel_string_snprintf (buf, buflen, wlen, "%s", NA_STRING)) return (1); } return (0); } int sel_format_record_string (ipmi_sel_ctx_t ctx, const char *fmt, const void *sel_record, unsigned int sel_record_len, char *buf, unsigned int buflen, unsigned int flags) { struct ipmi_sel_entry sel_entry; uint16_t record_id; uint8_t sel_record_type; int percent_flag = 0; unsigned int wlen = 0; struct sel_string_oem *sel_string_oem = NULL; int rv = -1; int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (fmt); assert (sel_record); assert (sel_record_len >= IPMI_SEL_RECORD_LENGTH); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); memcpy (sel_entry.sel_event_record, sel_record, IPMI_SEL_RECORD_LENGTH); sel_entry.sel_event_record_len = IPMI_SEL_RECORD_LENGTH; if (sel_get_record_header_info (ctx, &sel_entry, &record_id, &sel_record_type) < 0) goto cleanup; if (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA) { if (_find_motherboard_oem_support (ctx, flags, &sel_string_oem) < 0) goto cleanup; } while (*fmt) { if (*fmt == '%') { if (percent_flag) { if (sel_string_snprintf (buf, buflen, &wlen, "%%")) goto out; percent_flag = 0; } else percent_flag = 1; goto end_loop; } else if (percent_flag && *fmt == 'i') /* record id */ { if (sel_string_snprintf (buf, buflen, &wlen, "%u", record_id)) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'I') /* event interpretation */ { if ((ret = _output_event_interpretation (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 't') /* time */ { if ((ret = _output_time (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'd') /* date */ { if ((ret = _output_date (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'T') /* sensor type */ { if ((ret = _output_sensor_type (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 's') /* sensor name */ { if ((ret = _output_sensor_name (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'e') /* event data1 */ { if ((ret = _output_event_data1 (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'f') /* event data2 */ { if ((ret = _output_event_data2 (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'h') /* event data3 */ { if ((ret = _output_event_data3 (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'c') /* combined event data 2 and event data 3 string */ { if ((ret = _output_event_data2_event_data3 (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; } else if (percent_flag && *fmt == 'p') /* event data2 previous state */ { if ((ret = _output_event_data2_previous_state (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'S') /* event data3 severity */ { if ((ret = _output_event_data2_severity (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'E') /* combined event data 1, 2, and 3 string */ { if ((ret = _output_event_data1_event_data2_event_data3 (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'k') /* event direction */ { if ((ret = _output_event_direction (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'm') /* manufacturer id */ { if ((ret = _output_manufacturer_id (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'o') /* oem data */ { if ((ret = _output_oem_record_data (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else if (percent_flag && *fmt == 'O') /* OEM string */ { if ((ret = _output_oem_string (ctx, &sel_entry, sel_record_type, buf, buflen, flags, &wlen, sel_string_oem)) < 0) goto cleanup; if (ret) goto out; percent_flag = 0; } else { if (percent_flag) { if (sel_string_snprintf (buf, buflen, &wlen, "%%%c", *fmt)) goto out; percent_flag = 0; } else { if (sel_string_snprintf (buf, buflen, &wlen, "%c", *fmt)) goto out; } } end_loop: fmt++; } out: rv = wlen; ctx->errnum = IPMI_SEL_ERR_SUCCESS; cleanup: return (rv); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string.h0000644002055400205540000002551213527331637021537 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_H #define IPMI_SEL_STRING_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" typedef int (*Sel_string_output_sensor_name) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); typedef int (*Sel_string_output_event_data1_class_sensor_specific_discrete) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data1_class_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data2_threshold_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data2_discrete_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data2_class_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data3_threshold_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data3_discrete_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data3_class_oem) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); typedef int (*Sel_string_output_event_data2_event_data3) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); typedef int (*Sel_string_output_oem_record_data) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv); typedef int (*Sel_string_output_oem_string) (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv); struct sel_string_oem { Sel_string_output_sensor_name output_sensor_name; Sel_string_output_event_data1_class_sensor_specific_discrete output_event_data1_class_sensor_specific_discrete; Sel_string_output_event_data1_class_oem output_event_data1_class_oem; Sel_string_output_event_data2_threshold_oem output_event_data2_threshold_oem; Sel_string_output_event_data2_discrete_oem output_event_data2_discrete_oem; Sel_string_output_event_data2_class_oem output_event_data2_class_oem; Sel_string_output_event_data3_threshold_oem output_event_data3_threshold_oem; Sel_string_output_event_data3_discrete_oem output_event_data3_discrete_oem; Sel_string_output_event_data3_class_oem output_event_data3_class_oem; Sel_string_output_event_data2_event_data3 output_event_data2_event_data3; Sel_string_output_oem_record_data output_oem_record_data; Sel_string_output_oem_string output_oem_string; }; /* returns 0 on success, 1 on success but w/ truncation */ int sel_string_snprintf (char *buf, unsigned int buflen, unsigned int *wlen, const char *fmt, ...); /* returns 0 on success, 1 on success but w/ truncation * * Just like sel_string_snprintf, but just appends and does non-zero check beforehand */ int sel_string_strcat_comma_separate (char *buf, unsigned int buflen, unsigned int *wlen, const char *str); int sel_format_record_string (ipmi_sel_ctx_t ctx, const char *fmt, const void *sel_record, unsigned int sel_record_len, char *buf, unsigned int buflen, unsigned int flags); #endif /* IPMI_SEL_STRING_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-dell-poweredge.c0000644002055400205540000032444013527331637024431 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2014 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/cmds/ipmi-device-global-cmds.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-dell-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define DELL_EVENT_BUFFER_LENGTH 4096 /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data1_class_sensor_specific_discrete (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * From Dell Code * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE) { int ret; ret = ipmi_get_oem_sensor_type_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->sensor_type, system_event_record_data->sensor_number, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * From Dell Code * * Dell Poweredge R610 * Dell Poweredge R710 */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS) { int ret; ret = ipmi_get_oem_generic_event_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } /* OEM Interpretation * * From Dell Code * * Dell Poweredge R720 */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE) { int ret; ret = ipmi_get_oem_generic_event_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } /* OEM Interpretation * * From Dell Spec and Dell Code * * Dell Poweredge 2900 * Dell Poweredge 2950 * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_OEM_DIAGNOSTIC_EVENT_DATA && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING) { snprintf (tmpbuf, tmpbuflen, "OEM Diagnostic Data Event"); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* From Dell Engineer and Dell code */ /* Not in R720 Specification - assumed carry over from R610/R710. Was not in R610/R710 documentation either */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY) { if (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_INTRUSION_WHILE_SYSTEM_ON) { snprintf (tmpbuf, tmpbuflen, "Intrusion while system On"); return (1); } else if (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_INTRUSION_WHILE_SYSTEM_OFF) { snprintf (tmpbuf, tmpbuflen, "Intrusion while system Off"); return (1); } } /* From Dell Spec */ if ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_RECOVERABLE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_CPU_MACHINE_CHECK_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_IERR)) { unsigned int num = 0; int found = 0; int i; for (i = 0; i < 8; i++) { if (system_event_record_data->event_data2 & (0x1 << i)) { num = i + 1; found++; break; } } if (found) { snprintf (tmpbuf, tmpbuflen, "CPU %u", num); return (1); } } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_RECOVERABLE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_CPU_PROTOCOL_ERROR) { unsigned int num = 0; int found = 0; int i; for (i = 0; i < 8; i++) { if (system_event_record_data->event_data2 & (0x1 << i)) { num = i + 1; found++; break; } } if (found) { snprintf (tmpbuf, tmpbuflen, "Front Side Bus %u", num); return (1); } } /* From Dell Engineer and Dell Code */ /* Not in R720 Specification - assumed carry over from R610/R710. Was not in R610/R710 documentation either */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED && (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_PSU_COMMUNICATION_ERROR || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_WARNING || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_FAULT || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_UNDER_VOLTAGE_FAULT || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_VOLTAGE_FAULT || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_CURRENT_FAULT || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_FAN_FAULT)) { char *str; switch (system_event_record_data->event_data2) { case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_PSU_COMMUNICATION_ERROR: str = "PSU Communication Error"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_WARNING: str = "Over Temperature Warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_TEMPERATURE_FAULT: str = "Over Temperature Fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_UNDER_VOLTAGE_FAULT: str = "Under Voltage Fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_VOLTAGE_FAULT: str = "Over Voltage Fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OVER_CURRENT_FAULT: str = "Over Current Fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_FAN_FAULT: str = "Fan Fault"; break; default: str = "Internal Logic Error"; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT) { char *str = NULL; if (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_SPARE_MODE_BITMASK) str = "Memory is in Spare mode"; else if (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_RAID_MODE_BITMASK) str = "Memory is in RAID mode"; else /* system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MIRROR_MODE_BITMASK */ str = "Memory is in Mirror mode"; snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_DELL_POST_FATAL_ERROR) { char *error_code_str = NULL; /* achu: I am assuming only fatal error codes are possible, not progress codes */ switch (system_event_record_data->event_data2) { case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_NO_MEMORY_DETECTED: error_code_str = "No memory detected"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_MEMORY_DETECTED_BUT_IS_NOT_CONFIGURABLE: error_code_str = "Memory detected but is not configurable"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_MEMORY_CONFIGURED_BUT_NOT_USABLE: error_code_str = "Memory configured but not usable"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SYSTEM_BIOS_SHADOW_FAILURE: error_code_str = "System BIOS shadow failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_CMOS_FAILURE: error_code_str = "CMOS failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_DMA_CONTROLLER_FAILURE: error_code_str = "DMA controller failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_INTERRUPT_CONTROLLER_FAILURE: error_code_str = "Interrupt controller failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_TIMER_REFRESH_FAILURE: error_code_str = "Timer refresh failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_PROGRAMMABLE_INTERVAL_TIMER_ERROR: error_code_str = "Programmable interval timer error"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_PARITY_ERROR: error_code_str = "Parity error"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SIO_FAILURE: error_code_str = "SIO failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_KEYBOARD_CONTROLLER_FAILURE: error_code_str = "Keyboard controller failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SMI_INITIALIZATION_FAILURE: error_code_str = "SMI initialization failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_SHUTDOWN_TEST_FAILURE: error_code_str = "Shutdown test failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_POST_MEMORY_TEST_FAILURE: error_code_str = "POST Memory test failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_RAC_CONFIGURATION_FAILURE: error_code_str = "RAC configuration failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_CPU_CONFIGURATION_FAILURE: error_code_str = "CPU configuration failure"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_INCORRECT_MEMORY_CONFIGURATION: error_code_str = "Incorrect memory configuration"; break; case IPMI_OEM_DELL_BIOS_FATAL_ERROR_CODE_GENERAL_FAILURE_AFTER_VIDEO: error_code_str = "General failure after video"; break; default: snprintf (tmpbuf, tmpbuflen, "BIOS Fatal Error code: %02Xh", system_event_record_data->event_data2); } if (error_code_str) snprintf (tmpbuf, tmpbuflen, "%s", error_code_str); return (1); } /* From Dell Spec and Dell Code */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && ((system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_FAILED_TO_PROGRAM_VIRTUAL_MAC_ADDRESS) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_CHIPSET_ERROR))) { uint8_t device, function; device = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); return (1); } /* OEM Interpretation * * Dell Poweredge R720 */ /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR_QPI_LINK_DEGRADE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_QPI_LINK_ERROR_SENSOR) { uint8_t reporting_agent_id; uint8_t reporting_agent_link_id; uint8_t partner_agent_id; uint8_t partner_link_id; reporting_agent_id = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_ID_BITMASK); reporting_agent_id >>= IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_ID_SHIFT; reporting_agent_link_id = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_LINK_ID_BITMASK); reporting_agent_link_id >>= IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_REPORTING_AGENT_LINK_ID_SHIFT; partner_agent_id = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_AGENT_ID_BITMASK); partner_agent_id >>= IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_AGENT_ID_SHIFT; partner_link_id = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_LINK_ID_BITMASK); partner_link_id >>= IPMI_OEM_DELL_EVENT_DATA2_QPI_LINK_ERROR_PARTNER_LINK_ID_SHIFT; snprintf (tmpbuf, tmpbuflen, "Reporting Agent ID %u, Reporting Agent Link ID %u, Partner Agent ID %u, Partner Link ID %u", reporting_agent_id, reporting_agent_link_id, partner_agent_id, partner_link_id); return (1); } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_CRITICAL_STOP_DURING_OS_LOAD && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_TXT_SX_SENTER_COMMAND_ERROR) { uint8_t error_code; char *error_code_str; error_code = system_event_record_data->event_data2; switch (error_code) { case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_VT_CONFIGURATION_INVALID: error_code_str = "VT Configuration Invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_TPM_CONFIGURATION_INVALID: error_code_str = "TPM Configuration Invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_FIT_CRTM_ERROR: error_code_str = "FIT/CRTM Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_BIOS_ACM_ERROR: error_code_str = "BIOS ACM Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_SINIT_ACM_ERROR: error_code_str = "SINIT ACM Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ERROR_STATUS_TPM_PROVISIONING_ERROR: error_code_str = "TPM Provisioning Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_LEGACY_SHUTDOWN: error_code_str = "Legacy Shutdown"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_ACM_TYPE: error_code_str = "Bad ACM type"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNSUPPORTED_ACM: error_code_str = "Unsupported ACM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_AUTHENTICATE_FAIL: error_code_str = "Authenticate Fail"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_ACM_FORMAT: error_code_str = "BAD ACM Format"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNEXPECTED_HITM: error_code_str = "Unexpected HITM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ILLEGAL_EVENT: error_code_str = "Illegal Event"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_BAD_JOIN_FORMAT: error_code_str = "Bad JOIN Format"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_UNRECOVERABLE_MC_ERROR: error_code_str = "Unrecoverable MC Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_VMX_ABORT: error_code_str = "VMX Abort"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ACM_CORRUPT: error_code_str = "ACM Corrupt"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_PROCESSOR_ERROR_STATUS_ILLEGAL_VID_RATIO: error_code_str = "Illegal VID Ratio"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_ACM_ENTRY_POINT: error_code_str = "BIOS ACM Entry Point"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_HEAP_UNINITIALIZED: error_code_str = "HEAP Uninitialized"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DPR_UNINITIALIZED: error_code_str = "DPR Uninitialized"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_HEAP_ABOVE_TOP_OF_LOWER_MEMORY: error_code_str = "Heap above top of lower memory"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_PCIEXBAR_SET_TO_INVALID_VALUE: error_code_str = "PCIEXBAR set to invalid value"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_HEAP_IS_ABOVE_4GB: error_code_str = "LT heap is above 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_HEAP_IS_NOT_IN_DPR_REGION: error_code_str = "LT heap is not in DPR region"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TXT_DISABLED_BY_MEANS_OF_TXT_POLICY_BIT: error_code_str = "TXT disabled by means of TXT policy bit"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_EITHER_STARTUP_ACM_WAS_CALLED_FROM_BIOS_OR_CPU_OFFSET_IN_PCIEXBAR_IS_TOO_LARGE: error_code_str = "Either startup ACM was called from BIOS or CPU offset in PCIEXBAR is too large"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_NON_SUPPORTED_DEVICE_ID: error_code_str = "Non-supported Device.ID"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_IS_NOT_LOCKED: error_code_str = "Memory is not locked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_SENTER_USED_TO_LAUNCH_AC_MODULE: error_code_str = "SENTER used to launch AC module"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_START_MTRR_CHECK: error_code_str = "Start MTRR Check"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_1_ERROR: error_code_str = "MTRR Rule 1 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_2_ERROR: error_code_str = "MTRR Rule 2 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_3_ERROR: error_code_str = "MTRR Rule 3 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_4_ERROR: error_code_str = "MTRR Rule 4 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_5_ERROR: error_code_str = "MTRR Rule 5 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_RULE_6_ERROR: error_code_str = "MTRR Rule 6 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_PCIEXBAR_SET_TO_INVALID_SIZE: error_code_str = "PCIEXBAR set to invalid size"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_EXTEND_ATTEMPT: error_code_str = "TPM_Extend attempt"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_ACCESS_REGISTER_CONTENTS_INVALID: error_code_str = "TPM access register contents invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_UNABLE_TO_GET_ACCESS_TO_THE_LOCALITY: error_code_str = "Unable to get access to the locality"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_OUTPUT_BUFFER_FOR_THE_TPM_RESPONSE_TOO_SHORT: error_code_str = "Output buffer for the TPM response too short"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INPUT_PARAMETER_FOR_THE_FUNCTION_INVALID: error_code_str = "Input parameter for the function invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INVALID_RESPONSE_FOR_THE_TPM: error_code_str = "Invalid response for the TPM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TIME_OUT_FOR_TPM_RESPONSE: error_code_str = "Time out for TPM response"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_RETURNED_AN_ERROR: error_code_str = "TPM returned an error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_NV_RAM_NOT_LOCKED: error_code_str = "TPM NV RAM not locked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_IS_DISABLED: error_code_str = "TPM is disabled"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_IS_DEACTIVATED: error_code_str = "TPM is deactivated"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TPM_NV_INDICES_INCORRECTLY_DEFINED: error_code_str = "TPM NV indices incorrectly defined"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LCP_NO_PO_POLICY_DATA_DEFINED: error_code_str = "LCP No PO Policy Data defined"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_MLE_MISMATC: error_code_str = "LPC MLE Mismatc"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PLATFORM_CONFIG_MISMATC: error_code_str = "LPC Platform Config Mismatc"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_SINIT_REVOKED: error_code_str = "LPC SINIT Revoked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_NPW_NOT_ALLOWED: error_code_str = "LPC NPW Not Allowed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PO_POLICY_INTEGRITY_FAILED: error_code_str = "LPC PO Policy Integrity Failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LPC_PS_POLICY_INTEGRITY_FAILED: error_code_str = "LPC PS Policy Integrity Failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_INTERRUPT_OCCURED: error_code_str = "Interrupt Occured"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_CPU_NOT_SUPPORTED_BY_THIS_ACM: error_code_str = "CPU not supported by this ACM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_ONE_OF_THE_FIT_TABLE_CHECKS_FAILED: error_code_str = "One of the FIT table checks failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_VERIFY_BIOS_FAILED: error_code_str = "Verify BIOS failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_POLICY_FAILURE: error_code_str = "BIOS policy failure"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_LOCKED_WHEN_CLEARSECRETS_IS_CALLED: error_code_str = "Memory locked when ClearSecrets is called"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BIOS_UNTRUSTED_WHEN_CLEARSECRETS_IS_CALLED: error_code_str = "BIOS untrusted when ClearSecrets is called"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MEMORY_LOCKED_WHEN_CLEARSECRETS_IS_CALLED2: error_code_str = "Memory locked when ClearSecrets is called"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FIT_POLICY_TPM_OR_TXT_POLICY_DATA_BAD: error_code_str = "FIT policy (TPM or TXT policy) data bad"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FIT_TABLE_END_NOT_BELOW_4GB: error_code_str = "FIT table end not below 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DIDNT_FIND_BIOS_STARTUP_RECORD_THAT_INCLUDES_RESET_VECTOR: error_code_str = "Didn't find BIOS startup record that includes reset vector"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_DIDNT_FIND_BIOS_STARTUP_RECORD_THAT_INCLUDES_FIT_POINTER: error_code_str = "Didn't find BIOS startup record that includes FIT pointer"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FOUND_OVERLAP_BETWEEN_BIOS_STARTUP_REGIONS: error_code_str = "Found overlap between BIOS startup regions"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_FOUND_OVERLAP_BETWEEN_A_BIOS_STARTUP_REGION_AND_THE_STARTUP_ACM: error_code_str = "found overlap between a BIOS startup region and the startup ACM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_SCHECK_CALL: error_code_str = "LT SPAD Error Condition found in SCHECK call"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_CLEAR_SECRETS_CALL: error_code_str = "LT SPAD Error Condition found in CLEAR SECRETS call"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_UNLOCK_CONFIG_CALL: error_code_str = "LT SPAD Error Condition found in UNLOCK CONFIG call"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_LT_SPAD_ERROR_CONDITION_FOUND_IN_RESET_AUX_CALL: error_code_str = "LT SPAD Error Condition Found in RESET AUX call"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_MASK_ERROR_EX_ONLY: error_code_str = "MTRR mask error (-EX only)"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_MTRR_MAP_ERROR_EX_ONLY: error_code_str = "MTRR MAP error (-EX only)"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_TIMEOUT_WHILE_ACQUIRING_SHARED_RESOURCE_EX_ONLY: error_code_str = "Timeout while acquiring shared resource (-EX only)"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_BAD_RESOURCE_NUMBER_SPECIFIED_WHEN_ACQUIRING_SHARED: error_code_str = "Bad resource number specified when acquiring shared"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_BIOS_ACM_ERROR_STATUS_CPU_REV_IS_NOT_SUPPORTED_BY_THIS_ACM: error_code_str = "CPU rev is not supported by this ACM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_SINIT_EXIT_ADDRESS: error_code_str = "Invalid SINIT Exit Address"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LOCK_CONFIG_CALL_TO_BIOS_ACM_NOT_DONE_BY_ALL_SOCKETS: error_code_str = "Lock config call to BIOS ACM not done by all sockets"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MLE_JOIN_ABOVE_4GB: error_code_str = "MLE Join Above 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_UNINITIALIZED: error_code_str = "Heap Uninitialized"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_UNINITIALIZED: error_code_str = "DPR Uninitialized"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_REGION_DEFINED_ABOVE_4GB: error_code_str = "Heap region defined above 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TXT_MEMORY_REGION_DISABLED: error_code_str = "TXT Memory Region Disabled"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_NON_SUPPORTED_DEVICE_ID: error_code_str = "Non-supported Device.ID"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MEMORY_IS_NOT_LOCKED: error_code_str = "Memory is not locked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SENTER_USED_TO_LAUNCH_THE_AC_MODULE: error_code_str = "SENTER used to launch the AC module"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_START_MTRR_CHECK: error_code_str = "Start MTRR Check"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_1_ERROR: error_code_str = "MTRR Rule 1 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_2_ERROR: error_code_str = "MTRR Rule 2 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_3_ERROR: error_code_str = "MTRR Rule 3 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_4_ERROR: error_code_str = "MTRR Rule 4 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_5_ERROR: error_code_str = "MTRR Rule 5 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MTRR_RULE_6_ERROR: error_code_str = "MTRR Rule 6 Error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_MTRR_MASK_VALUE: error_code_str = "Invalid MTRR mask value"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_MTRR_MAPPING: error_code_str = "Invalid MTRR mapping"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_SIZE_ERROR: error_code_str = "DPR Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_BASE_ERROR: error_code_str = "Heap Base error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_HEAP_SIZE_ERROR: error_code_str = "Heap Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_BASE_ERROR: error_code_str = "Sinit Base error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_SIZE_ERROR: error_code_str = "Sinit Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_BAR_OVERLAP: error_code_str = "BAR overlap"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_NOT_LOCKED: error_code_str = "DPR not Locked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_BAR_SIZE_ERROR: error_code_str = "BAR Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_PMR_NOT_PROGRAMMED: error_code_str = "PMR Not programmed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_LOC_ERROR: error_code_str = "SINIT Loc error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MCHBAR_LOCATED_ABOVE_4GB: error_code_str = "MCHBAR located above 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SINIT_MEMORY_SPACE_LOCATED_ABOVE_4GB: error_code_str = "SINIT memory space located above 4GB"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_VERSION_ERROR: error_code_str = "OS Data Version error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_ERROR: error_code_str = "OS Data PMR Low error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_BASE_ERROR: error_code_str = "OS Data PMR Low Base error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_LOW_SIZE_ERROR: error_code_str = "OS Data PMR Low Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_HIGH_ERROR: error_code_str = "OS Data PMR High error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_PMR_OVERLAP: error_code_str = "OS Data PMR Overlap"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_ABOVE_PHYSICAL_MEMORY: error_code_str = "OS Data Above Physical Memory"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_SIZE_ERROR: error_code_str = "OS Data Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OS_DATA_REQ_CAPABILITIES_ERROR: error_code_str = "OS Data Req Capabilities error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_POLICY_NOT_IN_DMA_PROTECTED_REGION: error_code_str = "LCP Policy Not in DMA Protected Region"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDP_NOT_FOUND: error_code_str = "RSDP not found"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDP_CHECKSUM_ERROR: error_code_str = "RSDP checksum error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RSDT_CHECKSUM_ERROR: error_code_str = "RSDT checksum error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_NOT_FOUND: error_code_str = "DMAR not found"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_CHECKSUM_ERROR: error_code_str = "DMAR checksum error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DRHD_BAR_NOT_FOUND: error_code_str = "DRHD BAR not found"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMAR_LENGTH_ERROR: error_code_str = "DMAR Length error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DRHD_DEV_SCOPE_ERROR: error_code_str = "DRHD Dev Scope error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_RMRR_NOT_FOUND: error_code_str = "RMRR not found"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DPR_DMAR_OVERLAP: error_code_str = "DPR DMAR Overlap"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_SIZE_ERROR: error_code_str = "MSEG Size error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_BASE_ERROR: error_code_str = "MSEG Base error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_MSEG_DIFF_BASE_ERROR: error_code_str = "MSEG Diff Base error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_EXTEND_ATTEMPT: error_code_str = "TPM_Extend attempt"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_ACCESS_REGISTER_CONTENTS_INVALID: error_code_str = "TPM access register contents invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_UNABLE_TO_GET_ACCESS_TO_THE_LOCALITY: error_code_str = "Unable to get access to the locality"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_OUTPUT_BUFFER_FOR_THE_TPM_RESPONSE_TOO_SHORT: error_code_str = "Output buffer for the TPM response too short"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INPUT_PARAMETER_FOR_THE_FUNCTION_INVALID: error_code_str = "Input parameter for the function invalid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INVALID_RESPONSE_FOR_THE_TPM: error_code_str = "Invalid response for the TPM"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TIME_OUT_FOR_TPM_RESPONSE: error_code_str = "Time out for TPM response"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_RETURNED_AN_ERROR: error_code_str = "TPM returned an error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_NV_RAM_NOT_LOCKED: error_code_str = "TPM NV RAM not locked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_IS_DISABLED: error_code_str = "TPM is disabled"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_IS_DEACTIVATED: error_code_str = "TPM is deactivated"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_NV_INDICES_INCORRECTLY_DEFINED: error_code_str = "TPM NV indices incorrectly defined"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_PCR17_NOT_VALID: error_code_str = "PCR17 not valid"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VALUE_IN_PCR17_DOES_NOT_MATCH_EXPECTED_RESULT: error_code_str = "Value in PCR17 does not match expected result"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VALUE_IN_PCR18_DOES_NOT_MATCH_EXPECTED_RESULT: error_code_str = "Value in PCR18 does not match expected result"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_TPM_STARTUP_HAS_ALREADY_BEEN_RUN: error_code_str = "TPM startup has already been run"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TOLM_ERROR: error_code_str = "SCHECK Tolm error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_ALIAS_ERROR: error_code_str = "SCHECK Alias error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TOHM_ERROR: error_code_str = "SCHECK Tohm error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SAD_RULES_ERROR: error_code_str = "SCHECK SAD Rules error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TSEG_ERROR: error_code_str = "SCHECK TSEG error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_PCIEX_BAR_ERROR: error_code_str = "SCHECK PCIEX Bar error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_MAD_OVERLAP: error_code_str = "SCHECK MAD Overlap"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_UNCORE_IIO_SAD_ERROR: error_code_str = "SCHECK Uncore IIO SAD error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_TAD_RULES_ERROR: error_code_str = "SCHECK TAD Rules error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SAG_ERROR: error_code_str = "SCHECK SAG error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_RIR_ERROR: error_code_str = "SCHECK RIR error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_SMRR_ERROR: error_code_str = "SCHECK SMRR error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_SCHECK_CHANNEL_MAPPER_ERROR: error_code_str = "SCHECK Channel Mapper error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_DMA_REMAP_ERROR: error_code_str = "DMA Remap error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_ME_VT_POLICY_ERROR: error_code_str = "ME VT Policy error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_NO_PO_POLICY_DATA_DEFINE: error_code_str = "LCP NO PO Policy Data define"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_MLE_MISMATCH: error_code_str = "LCP MLE mismatch"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PLATFORM_CONFIG_MISMATCH: error_code_str = "LCP Platform Config Mismatch"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_SINIT_REVOKED: error_code_str = "LCP Sinit Revoked"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_NPW_NOT_ALLOWED: error_code_str = "LCP NPW Not Allowed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PO_POLICY_INTEGRITY_FAILED: error_code_str = "LCP PO Policy Integrity Failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_LCP_PS_POLICY_INTEGRITY_FAILED: error_code_str = "LCP PS Policy Integrity Failed"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_INTERRUPT_ERROR: error_code_str = "Interrupt error"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_VTD_TABLE_LARGER_THAN_HEAP_SIZE: error_code_str = "VTd table larger than heap size"; break; case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_OEM_DELL_TXT_ERROR_CODE_SINIT_ACM_ERROR_STATUS_CPU_NOT_SUPPORTED_BY_THIS_ACM: error_code_str = "CPU not supported by this ACM"; break; default: error_code_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "TXT Error Code = %s", error_code_str); return (1); } /* achu: I don't know what motherboards this applies to, probably very old ones */ #if 0 /* OEM Interpretation * * From Dell Spec and Dell Code */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PRESENCE_DETECTED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR) && ctx->ipmi_version_major == IPMI_1_5_MAJOR_VERSION && ctx->ipmi_version_minor == IPMI_1_5_MINOR_VERSION) { uint8_t memory_card; uint8_t bank_number; memory_card = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_BITMASK); memory_card >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_SHIFT; bank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_BITMASK); bank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_SHIFT; if (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_VALID (memory_card) && IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_VALID (bank_number)) { snprintf (tmpbuf, tmpbuflen, "Memory Card %c, Bank %u", 'A' + memory_card, bank_number); return (1); } else if (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_VALID (memory_card)) { snprintf (tmpbuf, tmpbuflen, "Memory Card %c", 'A' + memory_card); return (1); } else if (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_BANK_NUMBER_VALID (bank_number)) { snprintf (tmpbuf, tmpbuflen, "Bank %u", bank_number); return (1); } } #endif return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * From Dell Spec * * Dell Poweredge 2900 * Dell Poweredge 2950 * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 * * offset_from_event_reading_type_code = register offset 11:8 * data2 = register offset 0:7 */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_OEM_DIAGNOSTIC_EVENT_DATA && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING) { uint16_t register_offset; register_offset = system_event_record_data->event_data2; register_offset |= (system_event_record_data->offset_from_event_reading_type_code) << 8; snprintf (tmpbuf, tmpbuflen, "Register Offset = %Xh", register_offset); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* From Dell Spec */ if ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_IERR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_RECOVERABLE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_CPU_MACHINE_CHECK_ERROR)) { snprintf (tmpbuf, tmpbuflen, "APIC ID %u", system_event_record_data->event_data3); return (1); } /* From Dell Spec and Dell Code * * [7] - 0 = device with option ROM is embedded, 1 = device with option ROM is in a slot * [6:0] - slot number where option ROM is located * * Note: deassertion means unsuccessful */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL && system_event_record_data->event_direction == IPMI_SEL_RECORD_DEASSERTION_EVENT) { uint8_t option_rom; option_rom = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_BITMASK); option_rom >>= IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SHIFT; if (option_rom == IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT) { uint8_t slot; slot = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT_BITMASK); slot >>= IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device Slot %u", slot); } else snprintf (tmpbuf, tmpbuflen, "Device Embedded"); return (1); } /* From Dell Spec and Dell Code */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && ((system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_FAILED_TO_PROGRAM_VIRTUAL_MAC_ADDRESS) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_CHIPSET_ERROR))) { snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data3); return (1); } /* OEM Interpretation * * Dell Poweredge R720 */ /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR_QPI_LINK_DEGRADE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_QPI_LINK_ERROR_SENSOR) { uint8_t reporting_agent_type; uint8_t partner_agent_type; uint8_t error_type; char *reporting_agent_type_str; char *partner_agent_type_str; char *error_type_str; reporting_agent_type = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_REPORTING_AGENT_TYPE_BITMASK); reporting_agent_type >>= IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_REPORTING_AGENT_TYPE_SHIFT; partner_agent_type = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_PARTNER_AGENT_TYPE_BITMASK); partner_agent_type >>= IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_PARTNER_AGENT_TYPE_SHIFT; error_type = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_BITMASK); error_type >>= IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_SHIFT; switch (reporting_agent_type) { case IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_CPU: reporting_agent_type_str = "CPU"; break; case IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_IOH: reporting_agent_type_str = "IOH"; break; default: reporting_agent_type_str = "Unknown"; break; } switch (partner_agent_type) { case IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_CPU: partner_agent_type_str = "CPU"; break; case IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_AGENT_TYPE_IOH: partner_agent_type_str = "IOH"; break; default: partner_agent_type_str = "Unknown"; break; } switch (error_type) { case IPMI_OEM_DELL_EVENT_DATA3_QPI_LINK_ERROR_ERROR_TYPE_LINK_WIDTH_DEGRADED: error_type_str = "Link Width Degraded"; break; default: error_type_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Reporting Agent Type = %s, Partner Agent Type = %s, Error Type = %s", reporting_agent_type_str, partner_agent_type_str, error_type_str); return (1); } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP_CRITICAL_STOP_DURING_OS_LOAD && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_TXT_SX_SENTER_COMMAND_ERROR) { uint8_t error_type; char *error_type_str; error_type = system_event_record_data->event_data3; switch (error_type) { case IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_BIOS_TXT_ERROR: error_type_str = "BIOS TXT Error"; break; case IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_PROCESSOR_FIT_TXT_ERROR: error_type_str = "Processor/FIT TXT Error"; break; case IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_BIOS_ACM_TXT_ERROR: error_type_str = "BIOS ACM TXT Error"; break; case IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_SINIT_ACM_TXT_ERROR: error_type_str = "SINI ACM TXT Error"; break; case IPMI_OEM_DELL_EVENT_DATA3_TXT_ERROR_TYPE_UNRECOGNIZED_TXT_ERROR: error_type_str = "Unrecognized TXT Error"; break; default: error_type_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "TXT Error Type = %s", error_type_str); return (1); } /* achu: I don't know what motherboards this applies to */ #if 0 /* OEM Interpretation * * From Dell Spec and Dell Code */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PRESENCE_DETECTED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR) && ctx->ipmi_version_major == IPMI_1_5_MAJOR_VERSION && ctx->ipmi_version_minor == IPMI_1_5_MINOR_VERSION) { if (IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_NUMBER_VALID (system_event_record_data->event_data3)) { snprintf (tmpbuf, tmpbuflen, "DIMM %c", 'A' + system_event_record_data->event_data3); return (1); } } #endif return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_dell_poweredge_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * From Dell Spec * * Dell Poweredge 2900 * Dell Poweredge 2950 * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_OEM_DIAGNOSTIC_EVENT_DATA && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING) { snprintf (tmpbuf, tmpbuflen, "Register Value = %02Xh", system_event_record_data->event_data3); return (1); } return (0); } #if 0 static char * _dell_version_change_entity_string (uint8_t data_entity) { if (data_entity == 0) return "BIOS"; else if (data_entity == 1) return "BMC"; else if (data_entity == 2) return "iDRAC"; else if (data_entity == 3) return "CMC"; else if (data_entity == 4) return "NIC"; else return "Unrecognized Entity"; } #endif static int _dell_calculate_dimm_location (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv, uint8_t dimms_per_node) { char dimmstr[DELL_EVENT_BUFFER_LENGTH + 1]; uint8_t dimm_counter = 0; unsigned int offset = 0; int found = 0; int len; int i; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (dimms_per_node); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* achu: * * DIMM locations can be thought of in this mapping, lets * say dimms per node is 4. * * Dimm # = Location * 1 = A1 * 2 = A2 * 3 = A3 * 4 = A4 * 5 = B1 * 6 = B2 * ... * * lets say dimms per node is 9 * * Dimm # = Location * 1 = A1 * ... * 8 = A8 * 9 = A9 * 10 = B1 * ... */ memset (dimmstr, '\0', DELL_EVENT_BUFFER_LENGTH + 1); dimm_counter = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_BITMASK); dimm_counter >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_SHIFT; dimm_counter *= 8; for (i = 0; i < 8; i++) { if (system_event_record_data->event_data3 & (0x1 << i)) { uint8_t node; uint8_t dimmnum; node = (dimm_counter + i) / dimms_per_node; dimmnum = ((dimm_counter + i) % dimms_per_node) + 1; if (!found) len = snprintf (dimmstr + offset, DELL_EVENT_BUFFER_LENGTH - offset, "DIMM %c%u", 'A' + node, dimmnum); else len = snprintf (dimmstr + offset, DELL_EVENT_BUFFER_LENGTH - offset, ", DIMM %c%u", 'A' + node, dimmnum); offset += len; found++; if (offset >= DELL_EVENT_BUFFER_LENGTH) break; break; } } if (found) { if (sel_string_snprintf (buf, buflen, wlen, "%s", dimmstr)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_dell_poweredge_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2900 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_2950 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || ctx->product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720); /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ /* From Dell Engineer and Dell Code */ /* Note that the normal event_data3 event still occurs here, so need to output that too */ /* Not in R720 Specification - assumed carry over from R610/R710. Was not in R610/R710 documentation either */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t event_data3_error_type; event_data3_error_type = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_BITMASK); event_data3_error_type >>= IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_SHIFT; if (event_data3_error_type == IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OFFSET_CONFIGURATION_ERROR_ERROR_TYPE_POWER_SUPPLY_RATING_MISMATCH) { unsigned int watts2; unsigned int watts3; unsigned int watts; /* achu: that's not a typo, it's '+=' not a '|=', I'm just * copying Dell source at this point in time, don't know why * this is */ watts2 = system_event_record_data->event_data2 << IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA2_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_SHIFT; watts3 = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_BITMASK); watts3 >>= IPMI_SENSOR_TYPE_POWER_SUPPLY_EVENT_DATA3_OEM_DELL_OFFSET_CONFIGURATION_ERROR_WATTS_SHIFT; watts = watts2 + watts3; if (sel_string_snprintf (buf, buflen, wlen, "Power Supply rating mismatch ; Power Supply %u Watts", watts)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } } /* From Dell Spec and Dell Code * * Data2 * [7:4] - 00h - 07h - Memory Card Number * - 08h = 4 Dimms per Node * - 09h = 6 Dimms per Node * - 0Ah = 8 Dimms per Node * - 0Bh = 9 Dimms per Node * - 0Ch = 12 Dimms per Node * - 0Dh = 24 Dimms per Node * - 0Eh = Use upper Nibble of Data1 (see below for workaround to handle this case) * - 0Fh = No Card * [3:0] - 0h - 0Fh = Bitmask Increment in Data3 * * Data3 * [7:0] - 00h - FFh = DIMM bitmap * * e.g. Increment = 0 * DIMM bitmap = 00000001b = DIMM 1 * e.g. Increment = 1 * DIMM bitmap = 00000001b = DIMM 9 */ if (((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && ((system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PRESENCE_DETECTED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CRITICAL_OVERTEMPERATURE)) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED))) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_CRITICAL_FROM_OK || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_CRITICAL_FROM_LESS_SEVERE)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE_MEMORY_FAILED_TO_TRANSITION_TO_ONLINE)) && ctx->ipmi_version_major == IPMI_2_0_MAJOR_VERSION && ctx->ipmi_version_minor == IPMI_2_0_MINOR_VERSION && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t memory_card; memory_card = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_BITMASK); memory_card >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_SHIFT; if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_4_DIMMS_PER_NODE || memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_6_DIMMS_PER_NODE || memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_8_DIMMS_PER_NODE || memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_9_DIMMS_PER_NODE || memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_12_DIMMS_PER_NODE || memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_24_DIMMS_PER_NODE) { uint8_t dimms_per_node; if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_4_DIMMS_PER_NODE) dimms_per_node = 4; else if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_6_DIMMS_PER_NODE) dimms_per_node = 6; else if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_8_DIMMS_PER_NODE) dimms_per_node = 8; else if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_9_DIMMS_PER_NODE) dimms_per_node = 9; else if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_12_DIMMS_PER_NODE) dimms_per_node = 12; else /* memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_24_DIMMS_PER_NODE */ dimms_per_node = 24; if (_dell_calculate_dimm_location (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv, dimms_per_node) > 0) return (1); } else { char dimmstr[DELL_EVENT_BUFFER_LENGTH + 1]; unsigned int offset = 0; uint8_t dimm_counter = 0; int found = 0; int len; int i; memset (dimmstr, '\0', DELL_EVENT_BUFFER_LENGTH + 1); dimm_counter = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_BITMASK); dimm_counter >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_DIMM_COUNTER_SHIFT; dimm_counter *= 8; for (i = 0; i < 8; i++) { if (system_event_record_data->event_data3 & (0x1 << i)) { if (!found) len = snprintf (dimmstr + offset, DELL_EVENT_BUFFER_LENGTH - offset, "DIMM %u", (dimm_counter + i + 1)); else len = snprintf (dimmstr + offset, DELL_EVENT_BUFFER_LENGTH - offset, ", DIMM %u", (dimm_counter + i + 1)); offset += len; found++; if (offset >= DELL_EVENT_BUFFER_LENGTH) break; break; } } if (found) { if (memory_card != IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_NO_CARD) { if (sel_string_snprintf (buf, buflen, wlen, "Memory Card %u, %s", memory_card, dimmstr)) (*oem_rv) = 1; else (*oem_rv) = 0; } else { if (sel_string_snprintf (buf, buflen, wlen, "DIMM %s", dimmstr)) (*oem_rv) = 1; else (*oem_rv) = 0; } return (1); } } } /* From Dell Spec and Dell Code * * Data2 * [7:3] = Device Number * [2:0] = Function Number * * Data3 * [7] = 0 = [6:0] contain a bus number * 1 = [6:0] contain a slot number * [6:0] = bus or slot number */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && ((system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_DELL_PCI_PARITY_ERROR) || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR_PCIE_ERROR) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR_FATAL_IO_ERROR)) && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t slot_flag; uint8_t bus_slot_number; /* Dell documentation says to watch out for this specific case */ if (system_event_record_data->event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT && system_event_record_data->event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) return (0); slot_flag = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_FLAG_BITMASK); slot_flag >>= IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_FLAG_SHIFT; bus_slot_number = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_BITMASK); bus_slot_number >>= IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_SHIFT; if (slot_flag) { if (sel_string_snprintf (buf, buflen, wlen, "Slot %u", bus_slot_number)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } else { uint8_t device, function; device = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_DELL_EVENT_DATA2_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data2 & IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_DELL_EVENT_DATA2_FUNCTION_NUMBER_SHIFT; if (sel_string_snprintf (buf, buflen, wlen, "Bus %u, Device %u, Function %u", bus_slot_number, device, function)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } } /* From Dell Spec */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_VERSION_CHANGE_HARDWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { if (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA2_OEM_DELL_MANAGEMENT_CONTROLLER_FIRMWARE_REVISION) { if (system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA3_OEM_DELL_OTHER) { if (sel_string_snprintf (buf, buflen, wlen, "Hardware Type = Other")) (*oem_rv) = 1; else (*oem_rv) = 0; } else if (system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_VERSION_CHANGE_EVENT_DATA3_OEM_DELL_CPU) { if (sel_string_snprintf (buf, buflen, wlen, "Hardware Type = CPU")) (*oem_rv) = 1; else (*oem_rv) = 0; } else { if (sel_string_snprintf (buf, buflen, wlen, "Hardware Type = %02Xh", system_event_record_data->event_data3)) (*oem_rv) = 1; else (*oem_rv) = 0; } return (1); } } /* From Dell Spec and Dell Code * * Data2 * [7:6] - blade format * 0 - single height (e.g. Mezz B, Mezz C) * 1 - double height (e.g. Mezz B1, Mezz B2, Mezz C1, Mezz C2) * 2 - double height, double width (e.g. Mezz B1, Mezz B2, Mezz C1, Mezz C2) * [5:0] - reserved * * Data3 * [7] - 0 = device with option ROM is embedded, 1 = device with option ROM is in a slot * [6:0] - slot number where option ROM is located */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_DEVICE_OPTION_ROM_FAILED_TO_SUPPORT_LINK_TUNING_OR_FLEX_ADDRESS && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t option_rom; option_rom = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_BITMASK); option_rom >>= IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SHIFT; if (option_rom == IPMI_OEM_DELL_EVENT_DATA3_OPTION_ROM_SLOT) { uint8_t blade_format; uint8_t slots_per_node; uint8_t slot_number; char mezzanine; blade_format = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_BITMASK); blade_format >>= IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_SHIFT; if (blade_format == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_SINGLE_HEIGHT) slots_per_node = 1; else if (blade_format == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_DOUBLE_HEIGHT) slots_per_node = 2; else if (blade_format == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING_EVENT_DATA2_BLADE_FORMAT_DOUBLE_HEIGHT_DOUBLE_WEIGHT) slots_per_node = 4; else return (0); slot_number = (system_event_record_data->event_data3 & IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_BITMASK); slot_number >>= IPMI_OEM_DELL_EVENT_DATA3_BUS_SLOT_SHIFT; /* Comments in Dell code refer to * * "Odd number is B" * "Even number is C" */ if (slot_number % 2) mezzanine = 'B'; else mezzanine = 'C'; if (slots_per_node >= 2) { uint8_t slot_position; /* need slot number zero based for determining position */ slot_position = ((slot_number - 1)/ slots_per_node) + 1; if (sel_string_snprintf (buf, buflen, wlen, "Mezzanine %c%c", mezzanine, '0' + slot_position)) (*oem_rv) = 1; else (*oem_rv) = 0; } else { if (sel_string_snprintf (buf, buflen, wlen, "Mezzanine %c", mezzanine)) (*oem_rv) = 1; else (*oem_rv) = 0; } } else { if (sel_string_snprintf (buf, buflen, wlen, "Device Embedded")) (*oem_rv) = 1; else (*oem_rv) = 0; } return (1); } /* OEM Interpretation * * Dell Poweredge R720 */ /* From Dell Spec and Dell Code * * Data2 * [7:4] - 0Eh = Use upper Nibble of Data1 * [3:0] - 0h - 0Fh = Bitmask Increment in Data3 * * Data3 * [7:0] - 00h - FFh = DIMM bitmap * * e.g. Increment = 0 * DIMM bitmap = 00000001b = DIMM 1 * e.g. Increment = 1 * DIMM bitmap = 00000001b = DIMM 9 */ if (((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && ((system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PRESENCE_DETECTED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CRITICAL_OVERTEMPERATURE)) || (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED))) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_NON_CRITICAL_FROM_OK || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY_TRANSITION_TO_CRITICAL_FROM_LESS_SEVERE)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE_MEMORY_FAILED_TO_TRANSITION_TO_ONLINE)) && (((system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_BITMASK) >> IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_MEMORY_CARD_SHIFT) == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_DELL_USE_DATA1_UPPER_NIBBLE) && ctx->ipmi_version_major == IPMI_2_0_MAJOR_VERSION && ctx->ipmi_version_minor == IPMI_2_0_MINOR_VERSION) { uint8_t memory_card; memory_card = (system_event_record_data->event_data2_flag << 2) | system_event_record_data->event_data3_flag; if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA1_OEM_DELL_DIMMS_PER_PACKAGE_3) { uint8_t dimms_per_node; /* For future expansion, I know it looks silly right now */ if (memory_card == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA1_OEM_DELL_DIMMS_PER_PACKAGE_3) dimms_per_node = 3; if (_dell_calculate_dimm_location (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv, dimms_per_node) > 0) return (1); } } /* achu: I don't know what motherboards this applies to */ #if 0 /* OEM Interpretation * * From Dell Provided Source Code * * Specifically for Version Change Sensors with an event offset * IPMI_SENSOR_TYPE_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY * * achu: XXX: dataX & 0x1F != 1F ??? The bitmasks below have never * been verified by Dell. */ #define IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_BITMASK 0xE0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_SHIFT 5 #define IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_BITMASK 0x1F #define IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_SHIFT 0 #define IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_INVALID 0x1F if (ctx->ipmi_version_major == IPMI_2_0_MAJOR_VERSION && ctx->ipmi_version_minor == IPMI_2_0_MINOR_VERSION && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t data2_entity, data3_entity; uint8_t data2_number, data3_number; char *data2_entity_str = NULL; char *data3_entity_str = NULL; char data2_number_str[DELL_EVENT_BUFFER_LENGTH + 1]; char data3_number_str[DELL_EVENT_BUFFER_LENGTH + 1]; data2_entity = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_BITMASK); data2_entity >>= IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_SHIFT; data2_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_BITMASK); data2_number >>= IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_SHIFT; data3_entity = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_BITMASK); data3_entity >>= IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_ENTITY_SHIFT; data3_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_BITMASK); data3_number >>= IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_SHIFT; data2_entity_str = _dell_version_change_entity_string (data2_entity); data3_entity_str = _dell_version_change_entity_string (data3_entity); memset (data2_number_str, '\0', DELL_EVENT_BUFFER_LENGTH + 1); memset (data3_number_str, '\0', DELL_EVENT_BUFFER_LENGTH + 1); if (data2_number != IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_INVALID) snprintf (data2_number_str, DELL_EVENT_BUFFER_LENGTH, "%u", data2_number); if (data3_number != IPMI_SENSOR_TYPE_MEMORY_OEM_DELL_VERSION_CHANGE_NUMBER_INVALID) snprintf (data3_number_str, DELL_EVENT_BUFFER_LENGTH, "%u", data3_number); if (sel_string_snprintf (buf, buflen, wlen, "%s%s%s with %s%s%s", data2_entity_str, strlen (data2_number_str) ? " " : "", data2_number_str, data3_entity_str, strlen (data3_number_str) ? " " : "", data3_number_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } #endif return (0); } struct sel_string_oem sel_string_oem_dell_poweredge = { NULL, sel_string_output_dell_poweredge_event_data1_class_sensor_specific_discrete, sel_string_output_dell_poweredge_event_data1_class_oem, NULL, sel_string_output_dell_poweredge_event_data2_discrete_oem, sel_string_output_dell_poweredge_event_data2_class_oem, NULL, sel_string_output_dell_poweredge_event_data3_discrete_oem, sel_string_output_dell_poweredge_event_data3_class_oem, sel_string_output_dell_poweredge_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-fujitsu-irmc-common.c0000644002055400205540000005124513527331637025441 0ustar00achuachu00000000000000/* Copyright (C) 2003-2015 FreeIPMI Core Team This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/oem/ipmi-cmd-oem-fujitsu-spec.h" #include "freeipmi/spec/oem/ipmi-oem-fujitsu-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* Fully decoded english version of decoded SEL */ #define IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH 255 /* (very) Short text to display on 1 line of the optional LCD Panel, 20 characters */ #define IPMI_OEM_FUJITSU_SEL_ENTRY_TEXT_MAX_STRING_LENGTH 20 #define IPMI_OEM_FUJITSU_MAX_BYTES 256 /* * HLiebig: This is a stripped down version of ipmi_oem_fujitsu_get_sel_entry_long_text() * in ipmi-oem/src/ipmi-oem-fujitsu.c * tested against * TX200S3 (iRMC S1) * TX120S2/TX300S6 (iRMC S2) */ static int _ipmi_sel_oem_fujitsu_get_sel_entry_long_text (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, char *buf, unsigned int buflen, int include_severity) { uint8_t bytes_rq[IPMI_OEM_FUJITSU_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_FUJITSU_MAX_BYTES]; int rs_len; uint16_t sel_record_id = 0xFFFF; uint8_t css = 0; uint8_t severity = 0; char data_buf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH + 1]; char string_buf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1]; uint8_t data_length; uint8_t max_read_length; uint8_t offset = 0; uint8_t component_length = 0; const char *css_str = NULL; const char *severity_str = NULL; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU); assert (sel_entry); assert (buf); assert (buflen); /* Get current SEL record ID we are working on */ if (sel_get_record_header_info (ctx, sel_entry, &sel_record_id, NULL) < 0) goto cleanup; memset (data_buf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH + 1); memset (string_buf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1); /* Note: Referenced documentation is for iRMC S2 version */ if (IPMI_FUJITSU_PRODUCT_ID_IS_IRMC_S1 (ctx->product_id)) { /* iRMC S1 has limits */ max_read_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_READ_LENGTH; data_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_DATA_LENGTH; } else { max_read_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_READ_LENGTH; data_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_DATA_LENGTH; } /* Fujitsu OEM Command * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-ug-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x80 - Fujitsu IANA (LSB first) * 0x28 - Fujitsu IANA * 0x00 - Fujitsu IANA * 0x43 - Command Specifier * 0x?? - Record ID (LSB first) * 0x?? - Record ID ; 0x0000 = "first record", 0xFFFF = "last record" * 0x?? - Offset (in response SEL text) * 0x?? - MaxResponseDataSize (size of converted SEL data 16:n in response, maximum is 100) * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x80 - Fujitsu IANA (LSB first) * 0x28 - Fujitsu IANA * 0x00 - Fujitsu IANA * 0x?? - Next Record ID (LSB) * 0x?? - Next Record ID (MSB) * 0x?? - Actual Record ID (LSB) * 0x?? - Actual Record ID (MSB) * 0x?? - Record type * 0x?? - timestamp (LSB first) * 0x?? - timestamp * 0x?? - timestamp * 0x?? - timestamp * 0x?? - severity * bit 7 - CSS component * - 0 - No CSS component * - 1 - CSS component * bit 6-4 - 000 = INFORMATIONAL * 001 = MINOR * 010 = MAJOR * 011 = CRITICAL * 1xx = unknown * bit 3-0 - reserved * 0x?? - data length (of the whole text) * 0x?? - converted SEL data * - requested number of bytes starting at requested offset (MaxResponseDataSize-1 bytes of data) * 0x00 - trailing '\0' character */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SEL_ENTRY_LONG_TEXT; bytes_rq[5] = (sel_record_id & 0x00FF); bytes_rq[6] = (sel_record_id & 0xFF00) >> 8; /* Request partial or complete string, depending on product */ bytes_rq[8] = max_read_length; while (offset < data_length) { bytes_rq[7] = offset; /* BMC checks for boundaries, offset + len has to be <= 80 (iRMC S1) <= 100 (iRMC S2) */ if (offset + bytes_rq[8] > data_length) bytes_rq[8] = data_length - offset; if ((rs_len = ipmi_cmd_raw (ctx->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 9, /* num bytes */ bytes_rs, IPMI_OEM_FUJITSU_MAX_BYTES)) < 0) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_IPMI_ERROR); goto cleanup; } if (rs_len < 17) { if (rs_len >= 2 && bytes_rs[1] != IPMI_COMP_CODE_COMMAND_SUCCESS) { if (bytes_rs[1] == IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) { snprintf (string_buf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, "[Fujitsu OEM decoding requires administrator privilege]"); goto out; } goto cleanup; } } /* Get severity and CSS flag only once */ if (!offset) { css = (bytes_rs[14] & IPMI_OEM_FUJITSU_CSS_BITMASK); css >>= IPMI_OEM_FUJITSU_CSS_SHIFT; severity = (bytes_rs[14] & IPMI_OEM_FUJITSU_SEVERITY_BITMASK); severity >>= IPMI_OEM_FUJITSU_SEVERITY_SHIFT; } data_length = bytes_rs[15]; bytes_rs[rs_len-1] = '\0'; /* just to be sure it's terminated */ component_length = strlen ((char *)bytes_rs + 16); /* achu: truncate if there is overflow */ if (offset + component_length > data_length) { memcpy (data_buf + offset, &bytes_rs[16], IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH - offset); offset = data_length; } else { memcpy (data_buf + offset, &bytes_rs[16], component_length); offset += component_length; } } if (css == IPMI_OEM_FUJITSU_CSS_COMPONENT) css_str = "CSS Component"; if (include_severity) { switch (severity) { case IPMI_OEM_FUJITSU_SEVERITY_INFORMATIONAL: severity_str = "INFORMATIONAL"; break; case IPMI_OEM_FUJITSU_SEVERITY_MINOR: severity_str = "MINOR"; break; case IPMI_OEM_FUJITSU_SEVERITY_MAJOR: severity_str = "MAJOR"; break; case IPMI_OEM_FUJITSU_SEVERITY_CRITICAL: severity_str = "CRITICAL"; break; default: severity_str = "Unknown Severity"; } if (css_str) snprintf (string_buf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, "%s: %s (%s)", severity_str, data_buf, css_str); else snprintf (string_buf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, "%s: %s", severity_str, data_buf); } else { if (css_str) snprintf (string_buf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, "%s (%s)", data_buf, css_str); else snprintf (string_buf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, "%s", data_buf); } out: if (strlen (string_buf) > buflen) { SEL_SET_ERRNUM (ctx, IPMI_SEL_ERR_INTERNAL_ERROR); goto cleanup; } memcpy (buf, string_buf, strlen (string_buf)); rv = 0; cleanup: return (rv); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_fujitsu_irmc_common_event_data1_class_sensor_specific_discrete (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC); assert (ctx->product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && ctx->product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX); /* * Fujitsu iRMC / iRMC S2 */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_HW_ERROR || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_SYS_ERROR || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH || system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP) { int ret; ret = ipmi_get_oem_sensor_type_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->sensor_type, system_event_record_data->sensor_number, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_fujitsu_irmc_common_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && ctx->product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX); /* * Fujitsu iRMC / iRMC S2 */ if (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { char selbuf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1]; memset (selbuf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1); /* don't output severity since this is not event data 1 */ if (_ipmi_sel_oem_fujitsu_get_sel_entry_long_text (ctx, sel_entry, selbuf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, 0) < 0) return (-1); if (strlen (selbuf)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", selbuf)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_fujitsu_irmc_common_oem_record_data (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv) { char selbuf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1]; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU); assert (ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD || ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (oem_rv); assert (ctx->product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && ctx->product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX); /* * Fujitsu iRMC / iRMC S2 */ memset (selbuf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1); if (_ipmi_sel_oem_fujitsu_get_sel_entry_long_text (ctx, sel_entry, selbuf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, 1) < 0) return (-1); if (strlen (selbuf)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", selbuf)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_fujitsu_irmc_common_oem_string (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv) { char selbuf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1]; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (wlen); assert (oem_rv); assert (ctx->product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && ctx->product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX); /* * Fujitsu iRMC / iRMC S2 */ memset (selbuf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH + 1); if (_ipmi_sel_oem_fujitsu_get_sel_entry_long_text (ctx, sel_entry, selbuf, IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_STRING_LENGTH, 1) < 0) return (-1); if (strlen (selbuf)) { if (sel_string_snprintf (buf, buflen, wlen, "%s", selbuf)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_fujitsu_irmc_common = { NULL, sel_string_output_fujitsu_irmc_common_event_data1_class_sensor_specific_discrete, NULL, NULL, NULL, NULL, NULL, NULL, NULL, sel_string_output_fujitsu_irmc_common_event_data2_event_data3, sel_string_output_fujitsu_irmc_common_oem_record_data, sel_string_output_fujitsu_irmc_common_oem_string, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-gigabyte-common.c0000644002055400205540000002225213527331637024607 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_common_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB || ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB); /* * Gigabyte MD90-FS0-ZB * Gigabyte MG20-OP0-ZB */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data2); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_common_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB || ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB); /* * Gigabyte MD90-FS0-ZB * Gigabyte MG20-OP0-ZB */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { uint8_t device, function; device = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_DEVICE_NUMBER_BITMASK); device >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_FUNCTION_NUMBER_BITMASK); function >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_GIGABYTE_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED)) { uint8_t channel, dimm; char *channel_str, *dimm_str; if (system_event_record_data->event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT) { snprintf (tmpbuf, tmpbuflen, "Cannot determine which DIMM error occurred on"); return (1); } channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_SHIFT; switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_D: channel_str = "D"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_E: channel_str = "E"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_F: channel_str = "F"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_G: channel_str = "G"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_CHANNEL_H: channel_str = "H"; break; default: channel_str = "Unknown"; break; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_0: dimm_str = "0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_GIGABYTE_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Channel %s, DIMM %s", channel_str, dimm_str); return (1); } return (0); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-gigabyte-common.h0000644002055400205540000000470413527331637024616 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_GIGABYTE_COMMON_H #define IPMI_SEL_STRING_GIGABYTE_COMMON_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_gigabyte_common_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_gigabyte_common_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); #endif /* IPMI_SEL_STRING_GIGABYTE_COMMON_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-gigabyte-md90fs0zb.c0000644002055400205540000001412713527331637025037 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-gigabyte-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_md90fs0zb_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB); /* * Gigabyte MD90-FS0-ZB */ if ((ret = sel_string_output_gigabyte_common_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_md90fs0zb_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MD90_FS0_ZB); /* * Gigabyte MD90-FS0-ZB */ if ((ret = sel_string_output_gigabyte_common_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } struct sel_string_oem sel_string_oem_gigabyte_md90fs0zb = { NULL, NULL, NULL, NULL, sel_string_output_gigabyte_md90fs0zb_event_data2_discrete_oem, NULL, NULL, sel_string_output_gigabyte_md90fs0zb_event_data3_discrete_oem, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-gigabyte-mg20op0zb.c0000644002055400205540000001412713527331637025041 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-gigabyte-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-gigabyte-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_mg20op0zb_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB); /* * Gigabyte MG20-OP0-ZB */ if ((ret = sel_string_output_gigabyte_common_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_gigabyte_mg20op0zb_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_GIGABYTE); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_GIGABYTE_PRODUCT_ID_MG20_OP0_ZB); /* * Gigabyte MG20-OP0-ZB */ if ((ret = sel_string_output_gigabyte_common_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } struct sel_string_oem sel_string_oem_gigabyte_mg20op0zb = { NULL, NULL, NULL, NULL, sel_string_output_gigabyte_mg20op0zb_event_data2_discrete_oem, NULL, NULL, sel_string_output_gigabyte_mg20op0zb_event_data3_discrete_oem, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-node-manager.c0000644002055400205540000017132113527331637025176 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h" #include "freeipmi/sdr/oem/ipmi-sdr-oem-intel-node-manager.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-node-manager-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-node-manager-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-node-manager-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-intel-node-manager-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN * * Should be called from ipmi-sel-string-VENDOR.c files, not * from ipmi-sel-string.c. */ struct intel_node_manager_sdr_callback { ipmi_sel_ctx_t ctx; int found; }; #define INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH 4096 /* achu: * * In Intel NM 2.0 specification, sensor numbers are now fixed and you * don't have to search the SDR for them. We could check version of * NM on motherboard to determine if we need to search SDR or not, but * for time being we'll stick to the search SDR method b/c it will * always work. */ static int _intel_node_manager_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct intel_node_manager_sdr_callback *sdr_callback_arg; ipmi_sel_ctx_t ctx; int ret; int rv = -1; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct intel_node_manager_sdr_callback *)arg; ctx = sdr_callback_arg->ctx; if (record_type != IPMI_SDR_FORMAT_OEM_RECORD) { rv = 0; goto cleanup; } if ((ret = ipmi_sdr_oem_parse_intel_node_manager (sdr_ctx, sdr_record, sdr_record_len, NULL, NULL, NULL, &ctx->intel_node_manager.nm_health_event_sensor_number, &ctx->intel_node_manager.nm_exception_event_sensor_number, &ctx->intel_node_manager.nm_operational_capabilities_sensor_number, &ctx->intel_node_manager.nm_alert_threshold_exceeded_sensor_number)) < 0) goto cleanup; if (ret) { ctx->intel_node_manager.node_manager_data_parsed = 1; ctx->intel_node_manager.node_manager_data_found = 1; sdr_callback_arg->found = 1; } rv = ret; cleanup: return (rv); } /* return (1) - Node Manager SDR entry found * return (0) - No Node Manager SDR entry found * return (-1) - error, cleanup and return error */ static int _intel_node_manager_init (ipmi_sel_ctx_t ctx) { struct intel_node_manager_sdr_callback sdr_callback_arg; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); if (!ctx->sdr_ctx) return (0); if (ctx->intel_node_manager.node_manager_data_parsed) return (ctx->intel_node_manager.node_manager_data_found); sdr_callback_arg.ctx = ctx; sdr_callback_arg.found = 0; if (ipmi_sdr_cache_iterate (ctx->sdr_ctx, _intel_node_manager_sdr_callback, &sdr_callback_arg) < 0) goto cleanup; if (!sdr_callback_arg.found) { ctx->intel_node_manager.node_manager_data_parsed = 1; ctx->intel_node_manager.node_manager_data_found = 0; } rv = sdr_callback_arg.found; cleanup: return (rv); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_node_manager_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); /* achu: As far as I can tell, SDR is required to have Node Manager * OEM SDR, but is not required to have "Event Only" records for the * individual event types. It appears most motherboards do have SDR * entries for these events, but it's best to cover all cases if * necessary. In upper level calls, if an SDR entry is available, * it will be found before reaching this point. */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER) { int nm_found; if ((nm_found = _intel_node_manager_init (ctx)) < 0) return (-1); if (!nm_found) goto out; /* achu: On the first motherboards I found w/ NM support, these are the sensor names I've seen. * * NM Capabilities * NM Exception * NM Health * NM Threshold * * So we'll copy them. I've found no common name for the * IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT * event, so we'll call it "NM Firmware". */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_health_event_sensor_number) { if (sel_string_snprintf (buf, buflen, wlen, "NM Health")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } else if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_exception_event_sensor_number) { if (sel_string_snprintf (buf, buflen, wlen, "NM Exception")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } else if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_operational_capabilities_sensor_number) { if (sel_string_snprintf (buf, buflen, wlen, "NM Capabilities")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } else if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_alert_threshold_exceeded_sensor_number) { if (sel_string_snprintf (buf, buflen, wlen, "NM Threshold")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } else if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT) { if (sel_string_snprintf (buf, buflen, wlen, "NM Firmware")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } } out: return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_node_manager_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_SMBUS_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_THERMAL_SENSOR_ON_DIMM) { uint8_t cpu0_mc0; int cpu0_mc0_available; uint8_t cpu0_mc1; int cpu0_mc1_available; uint8_t cpu1_mc0; int cpu1_mc0_available; uint8_t cpu1_mc1; int cpu1_mc1_available; uint8_t cpu2_mc0; int cpu2_mc0_available; uint8_t cpu2_mc1; int cpu2_mc1_available; uint8_t cpu3_mc0; int cpu3_mc0_available; uint8_t cpu3_mc1; int cpu3_mc1_available; cpu0_mc0 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_0_BITMASK; cpu0_mc0 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_0_SHIFT; cpu0_mc0_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu0_mc1 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_1_BITMASK; cpu0_mc1 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_0_MEMORY_CONTROLLER_1_SHIFT; cpu0_mc1_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu1_mc0 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_0_BITMASK; cpu1_mc0 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_0_SHIFT; cpu1_mc0_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu1_mc1 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_1_BITMASK; cpu1_mc1 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_1_MEMORY_CONTROLLER_1_SHIFT; cpu1_mc1_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu2_mc0 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_0_BITMASK; cpu2_mc0 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_0_SHIFT; cpu2_mc0_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu2_mc1 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_1_BITMASK; cpu2_mc1 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_2_MEMORY_CONTROLLER_1_SHIFT; cpu2_mc1_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu3_mc0 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_0_BITMASK; cpu3_mc0 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_0_SHIFT; cpu3_mc0_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; cpu3_mc1 = system_event_record_data->event_data1 & IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_1_BITMASK; cpu3_mc1 >>= IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_CPU_3_MEMORY_CONTROLLER_1_SHIFT; cpu3_mc1_available = (cpu0_mc0 == IPMI_OEM_INTEL_NODE_MANAGER_THERMAL_SENSOR_ON_DIMM_AVAILABLE) ? 1 : 0; snprintf (tmpbuf, tmpbuflen, "CPU0/MC0 = %s, CPU0/MC1 = %s, CPU1/MC0 = %s, CPU1/MC1 = %s, CPU2/MC0 = %s, CPU2/MC1 = %s, CPU3/MC0 = %s, CPU3/MC1 = %s", cpu0_mc0_available ? "Available" : "Not Available", cpu0_mc1_available ? "Available" : "Not Available", cpu1_mc0_available ? "Available" : "Not Available", cpu1_mc1_available ? "Available" : "Not Available", cpu2_mc0_available ? "Available" : "Not Available", cpu2_mc1_available ? "Available" : "Not Available", cpu3_mc0_available ? "Available" : "Not Available", cpu3_mc1_available ? "Available" : "Not Available"); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER) { int nm_found; uint8_t node_manager_policy_event; if ((nm_found = _intel_node_manager_init (ctx)) < 0) return (-1); if (!nm_found) goto out; node_manager_policy_event = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK; node_manager_policy_event >>= IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT; if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_exception_event_sensor_number && node_manager_policy_event == IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED) { snprintf (tmpbuf, tmpbuflen, "Policy Correction Time Exceeded"); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_health_event_sensor_number && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR_NODE_MANAGER) { snprintf (tmpbuf, tmpbuflen, "Sensor Node Manager"); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_operational_capabilities_sensor_number) { uint8_t policy_interface_capability; uint8_t monitoring_capability; uint8_t power_limiting_capability; policy_interface_capability = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_BITMASK; policy_interface_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_SHIFT; monitoring_capability = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_BITMASK; monitoring_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_SHIFT; power_limiting_capability = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_BITMASK; power_limiting_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_SHIFT; snprintf (tmpbuf, tmpbuflen, "Policy Interface = %s, Monitoring = %s, Power Limiting = %s", policy_interface_capability ? "Available" : "Not Available", monitoring_capability ? "Available" : "Not Available", power_limiting_capability ? "Available" : "Not Available"); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_alert_threshold_exceeded_sensor_number) { node_manager_policy_event = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK; node_manager_policy_event >>= IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT; if (node_manager_policy_event == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_THRESHOLD_EXCEEDED) { uint8_t threshold_number; threshold_number = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_THRESHOLD_NUMBER_BITMASK; threshold_number >>= IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_THRESHOLD_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Threshold Exceeded, Threshold Number = %u", threshold_number); return (1); } else /* node_manager_policy_event == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED */ { snprintf (tmpbuf, tmpbuflen, "Policy Correction Time Exceeded"); return (1); } } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS) { snprintf (tmpbuf, tmpbuflen, "Firmware Status"); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_CUPS_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_SENSOR) { uint8_t cups_event; cups_event = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_POLICY_EVENT_BITMASK; cups_event >>= IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_POLICY_EVENT_SHIFT; if (cups_event == IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_CUPS_EVENT_EVENT_THRESHOLD_EXCEEDED) { uint8_t threshold_number; threshold_number = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_THRESHOLD_NUMBER_BITMASK; threshold_number >>= IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA1_THRESHOLD_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Threshold Exceeded, Threshold Number = %u", threshold_number); return (1); } } } out: return (0); } static void _sel_string_output_intel_node_manager_domain_id (ipmi_sel_ctx_t ctx, char *domain_id_str, unsigned int domain_id_str_len, uint8_t domain_id) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (domain_id_str); assert (domain_id_str_len); if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) snprintf (domain_id_str, domain_id_str_len, "Entire platform (%u)", domain_id); else if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM) snprintf (domain_id_str, domain_id_str_len, "CPU subsystem (%u)", domain_id); else if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM) snprintf (domain_id_str, domain_id_str_len, "Memory subsystem (%u)", domain_id); else if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM) snprintf (domain_id_str, domain_id_str_len, "High Power I/O subsystem (%u)", domain_id); else snprintf (domain_id_str, domain_id_str_len, "%u", domain_id); return; } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_node_manager_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER) { int nm_found; uint8_t node_manager_policy_event; if ((nm_found = _intel_node_manager_init (ctx)) < 0) return (-1); if (!nm_found) goto out; node_manager_policy_event = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK; node_manager_policy_event >>= IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT; if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_exception_event_sensor_number && node_manager_policy_event == IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED) { uint8_t domain_id; char domain_id_str[INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1]; domain_id = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK); domain_id >>= IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT; memset (domain_id_str, '\0', INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_node_manager_domain_id (ctx, domain_id_str, INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH, domain_id); snprintf (tmpbuf, tmpbuflen, "Domain ID = %s", domain_id_str); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_health_event_sensor_number && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR_NODE_MANAGER) { uint8_t domain_id; uint8_t error_type; char domain_id_str[INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1]; char *error_type_str; domain_id = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK); domain_id >>= IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_BITMASK); error_type >>= IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_SHIFT; switch (error_type) { case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_OUTLET_TEMPERATURE_READING_FAILURE: error_type_str = "Outlet Temperature Reading Failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_VOLUMETRIC_AIRFLOW_READING_FAILURE: error_type_str = "Volumetric Airflow Reading Failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POLICY_MISCONFIGURATION: error_type_str = "Policy Misconfiguration"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POWER_SENSOR_READING_FAILURE: error_type_str = "Power Sensor Reading Failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_INLET_TEMPERATURE_READING_FAILURE: error_type_str = "Inlet Temperature Reading Failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_HOST_COMMUNICATION_ERROR: error_type_str = "Host Communication error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_REAL_TIME_CLOCK_SYNCHRONIZATION_FAILURE: error_type_str = "Real-time clock synchronization failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_PLATFORM_SHUTDOWN_INITIATED_BY_INTEL_NM_POLICY: error_type_str = "Platform shutdown initiated by Intel NM policy"; break; default: error_type_str = "Unknown"; } memset (domain_id_str, '\0', INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_node_manager_domain_id (ctx, domain_id_str, INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH, domain_id); snprintf (tmpbuf, tmpbuflen, "Domain ID = %s, Error Type = %s", domain_id_str, error_type_str); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_alert_threshold_exceeded_sensor_number) { uint8_t domain_id; char domain_id_str[INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1]; domain_id = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA2_DOMAIN_ID_BITMASK); domain_id >>= IPMI_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED_EVENT_DATA2_DOMAIN_ID_SHIFT; memset (domain_id_str, '\0', INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_node_manager_domain_id (ctx, domain_id_str, INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH, domain_id); snprintf (tmpbuf, tmpbuflen, "Domain ID = %s", domain_id_str); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS) { uint8_t health_event; char *health_event_str; health_event = system_event_record_data->event_data2; switch (health_event) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_RECOVERY_GPIO_FORCED: health_event_str = "Recovery GPIO forced"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED: health_event_str = "Image execution failed"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR: health_event_str = "Flash erase error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION: health_event_str = "Flash state information"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR: health_event_str = "Internal error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_BMC_COLD_RESET_ERROR: health_event_str = "BMC did not respond to cold reset"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_DIRECT_FLASH_UPDATE: health_event_str = "Direct flash update requested by the BIOS"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MANUFACTURING_ERROR: health_event_str = "Manufacturing error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PERSISTENT_STORAGE_INTEGRITY_ERROR: health_event_str = "Persistent storage integrity error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FIRMWARE_EXCEPTION: health_event_str = "Firmware Exception"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_WEAR_OUT_PROTECTION_WARNING: health_event_str = "Flash Wear-Out Protection Warning"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PECI_OVER_DMI_INTERFACE_ERROR: health_event_str = "PECI over DMI interface error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MCTP_INTERFACE_ERROR: health_event_str = "MCTP interface error"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_AUTO_CONFIGURATION_FINISHED: health_event_str = "Auto-configuration finished"; break; default: health_event_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Health Event = %s", health_event_str); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_CUPS_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_SENSOR) { uint8_t domain_id; char domain_id_str[INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1]; domain_id = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA2_DOMAIN_ID_BITMASK); domain_id >>= IPMI_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_EVENT_DATA2_DOMAIN_ID_SHIFT; memset (domain_id_str, '\0', INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_node_manager_domain_id (ctx, domain_id_str, INTEL_NODE_MANAGER_EVENT_BUFFER_LENGTH, domain_id); snprintf (tmpbuf, tmpbuflen, "Domain ID = %s", domain_id_str); return (1); } } out: return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_node_manager_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_NM_SMART_CLST_SENSOR_EVENT_DATA3_EXTERNAL) snprintf (tmpbuf, tmpbuflen, "Source of assertion is external"); else snprintf (tmpbuf, tmpbuflen, "Power Supply Status Number = %u", system_event_record_data->event_data3); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_node_manager_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER) { int nm_found; uint8_t node_manager_policy_event; if ((nm_found = _intel_node_manager_init (ctx)) < 0) return (-1); if (!nm_found) goto out; node_manager_policy_event = system_event_record_data->offset_from_event_reading_type_code & IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_BITMASK; node_manager_policy_event >>= IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_SHIFT; if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_exception_event_sensor_number && node_manager_policy_event == IPMI_OEM_INTEL_NODE_MANAGER_EXCEPTION_EVENT_EVENT_DATA1_NODE_MANAGER_POLICY_EVENT_POLICY_CORRECTION_TIME_EXCEEDED) { snprintf (tmpbuf, tmpbuflen, "Policy ID = %u", system_event_record_data->event_data3); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_health_event_sensor_number && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_SENSOR_NODE_MANAGER && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t error_type; error_type = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_BITMASK); error_type >>= IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_SHIFT; if (error_type == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POLICY_MISCONFIGURATION || error_type == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_PLATFORM_SHUTDOWN_INITIATED_BY_INTEL_NM_POLICY) { snprintf (tmpbuf, tmpbuflen, "Policy ID = %u", system_event_record_data->event_data3); return (1); } else if (error_type == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_POWER_SENSOR_READING_FAILURE) { snprintf (tmpbuf, tmpbuflen, "Power Sensor Address = %02Xh", system_event_record_data->event_data3); return (1); } else if (error_type == IPMI_OEM_INTEL_NODE_MANAGER_HEALTH_EVENT_EVENT_DATA2_ERROR_TYPE_INLET_TEMPERATURE_READING_FAILURE) { snprintf (tmpbuf, tmpbuflen, "Inlet Sensor Address = %02Xh", system_event_record_data->event_data3); return (1); } } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_ALERT_THRESHOLD_EXCEEDED && system_event_record_data->sensor_number == ctx->intel_node_manager.nm_alert_threshold_exceeded_sensor_number) { snprintf (tmpbuf, tmpbuflen, "Policy ID = %u", system_event_record_data->event_data3); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_ME_FIRMWARE_HEALTH_EVENT && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS) { if (system_event_record_data->event_data2 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION) { if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_IMAGE_CORRUPTED) { snprintf (tmpbuf, tmpbuflen, "flash partition table, recovery image or factory presets image corrupted"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_FLASH_ERASE_LIMIT_REACHED) { snprintf (tmpbuf, tmpbuflen, "flash erase limit has been reached"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_FLASH_WRITE_LIMIT_REACHED) { snprintf (tmpbuf, tmpbuflen, "flash write limit has been reached ; writing to flash has been disabled"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_FLASH_STATE_INFORMATION_WRITING_TO_FLASH_ENABLED) { snprintf (tmpbuf, tmpbuflen, "writing to the flash has been enabled"); return (1); } } else if (system_event_record_data->event_data2 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR) { if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_FW_WATCHDOG_TIMEOUT) { snprintf (tmpbuf, tmpbuflen, "FW Watchdog Timeout"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_LOADER_MANIFEST_VALIDATION_FAILURE) { snprintf (tmpbuf, tmpbuflen, "Loader manifest validation failure"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_UNKNOWN_POWER_MANAGEMENT_EVENT) { snprintf (tmpbuf, tmpbuflen, "Unknown power management event"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_NON_GRACEFUL_PMC_RESET_EVENT) { snprintf (tmpbuf, tmpbuflen, "Non graceful PMC reset event detected i.e. after Dynamic Fusing"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_INTERNAL_ERROR_FLASH_WEAROUT_PROTECTION) { snprintf (tmpbuf, tmpbuflen, "Flash wearout protection (EFFS wearout violation)"); return (1); } } else if (system_event_record_data->event_data2 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MANUFACTURING_ERROR) { if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_GENERIC_ERROR) { snprintf (tmpbuf, tmpbuflen, "Generic error"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_OR_MISSING_VSCC_TABLE) { snprintf (tmpbuf, tmpbuflen, "Wrong or missing VSCC table"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_SENSOR_SCANNING_PERIOD_IN_PIA) { snprintf (tmpbuf, tmpbuflen, "Wrong sensor scanning period in PIA"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_DEVICE_DEFINITION_IN_PIA) { snprintf (tmpbuf, tmpbuflen, "Wrong device definition in PIA"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_WRONG_SMART_CLST_CONFIGURATION) { snprintf (tmpbuf, tmpbuflen, "Wrong SMART/CLST configuration"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_INTEL_ME_FW_CONFIGURATION_IS_INCONSISTENT_OR_OUT_OF_RANGE) { snprintf (tmpbuf, tmpbuflen, "Intel ME FW configuration is inconsistent or out of range"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MANUFACTURING_ERROR_PERCENTAGE_OF_FLASH_WRITE_OPERATIONS_WHICH_HAVE_BEEN_CONDUCTED) { snprintf (tmpbuf, tmpbuflen, "percentage of flash write operations which have been conducted"); return (1); } } else if (system_event_record_data->event_data2 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PECI_OVER_DMI_INTERFACE_ERROR) { if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_DRAM_INIT_DONE_EVENT_NOT_RECEIVED) { snprintf (tmpbuf, tmpbuflen, "DRAM Init Done event not received"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_MCTP_SAD_REGISTER_NOT_CORRECTLY_CONFIGURED_BY_BIOS) { snprintf (tmpbuf, tmpbuflen, "MCTP SAD Register not correctly configured by BIOS"); return (1); } else if (system_event_record_data->event_data3 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_DMI_TIMEOUT_OF_PECI_REQUEST) { snprintf (tmpbuf, tmpbuflen, "DMI timeout of PECI request"); return (1); } } else if (system_event_record_data->event_data2 == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_AUTO_CONFIGURATION_FINISHED) { uint8_t auto_configuration_finished_result; auto_configuration_finished_result = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_BITMASK); auto_configuration_finished_result >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SHIFT; if (auto_configuration_finished_result == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS) { uint8_t dc_power_source, chassis_power_input_source, psu_efficiency_source, unmanaged_power_source; char *dc_power_source_str, *chassis_power_input_source_str, *psu_efficiency_source_str, *unmanaged_power_source_str; dc_power_source = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_BITMASK); dc_power_source >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_SHIFT; switch (dc_power_source) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_BMC: dc_power_source_str = "BMC"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_PSU: dc_power_source_str = "PSU"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_DC_POWER_SOURCE_ON_BOARD_POWER_SENSOR: dc_power_source_str = "On-board power sensor"; break; default: dc_power_source_str = "Unknown"; } chassis_power_input_source = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_BITMASK); chassis_power_input_source >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_SHIFT; switch (chassis_power_input_source) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_BMC: chassis_power_input_source_str = "BMC"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_PSU: chassis_power_input_source_str = "PSU"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_ON_BOARD_POWER_SENSOR_PSU_EFFICIENCY: chassis_power_input_source_str = "On-board power sensor / PSU efficiency"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_CHASSIS_POWER_INPUT_SOURCE_NOT_SUPPORTED: chassis_power_input_source_str = "not supported"; break; default: chassis_power_input_source_str = "Unknown"; } psu_efficiency_source = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_BITMASK); psu_efficiency_source >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_SHIFT; switch (psu_efficiency_source) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_BMC: psu_efficiency_source_str = "BMC"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_PSU: psu_efficiency_source_str = "PSU"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_PSU_EFFICIENCY_SOURCE_NOT_SUPPORTED: psu_efficiency_source_str = "not supported"; break; default: psu_efficiency_source_str = "Unknown"; } unmanaged_power_source = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_BITMASK); unmanaged_power_source >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_SHIFT; switch (unmanaged_power_source) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_BMC: unmanaged_power_source_str = "BMC"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_SUCCESS_UNMANAGED_POWER_SOURCE_ESTIMATED: unmanaged_power_source_str = "estimated"; break; default: unmanaged_power_source_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Auto Configuration Success - DC Power Source = %s, Chassis Power input source = %s, PSU efficiency source = %s, Unmanaged power source = %s", dc_power_source_str, chassis_power_input_source_str, psu_efficiency_source_str, unmanaged_power_source_str); return (1); } else /* auto_configuration_finished_result == IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE */ { uint8_t failure; char *failure_str; failure = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_BITMASK); failure >>= IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_SHIFT; switch (failure) { case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_BMC_DISCOVERY_FAILURE: failure_str = "BMC discovery failure"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_INSUFFICIENT_FACTORY_CONFIGURATION: failure_str = "Insufficient factory configuration"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_UNKNOWN_SENSOR_TYPE: failure_str = "Unknown sensor type"; break; case IPMI_OEM_INTEL_NODE_MANAGER_INTEL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA3_AUTO_CONFIGURATION_FINISHED_RESULT_FAILURE_FAILURE_OTHER_ERROR_ENCOUNTERED: failure_str = "Other error encountered"; break; default: failure_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Auto Configuration Failure - %s", failure_str); return (1); } } snprintf (tmpbuf, tmpbuflen, "Extended error info = %02Xh", system_event_record_data->event_data3); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_CUPS_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_NODE_MANAGER_CUPS_EVENT_SENSOR) { snprintf (tmpbuf, tmpbuflen, "Policy ID = %u", system_event_record_data->event_data3); return (1); } } out: return (0); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-node-manager.h0000644002055400205540000001117213527331637025200 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_INTEL_NODE_MANAGER_H #define IPMI_SEL_STRING_INTEL_NODE_MANAGER_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_intel_node_manager_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); int sel_string_output_intel_node_manager_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_node_manager_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_node_manager_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_node_manager_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); #endif /* IPMI_SEL_STRING_INTEL_NODE_MANAGER_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s5500wb.c0000644002055400205540000021020113527331637023735 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 int sel_string_output_intel_s5500wb_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if ((ret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s5500wb_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if ((ret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR))) { ret = ipmi_get_oem_specific_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->sensor_type, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_CORRECTABLE_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Correctable Sensor Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_NON_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_NON_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Non-Fatal Sensor Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_A && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Fatal Sensor A Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_B && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Fatal Sensor B Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } return (0); } static void _sel_string_output_intel_s5500wb_bus (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data2); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s5500wb_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s5500wb_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t logical_rank; logical_rank = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOGICAL_RANK_BITMASK); logical_rank >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOGICAL_RANK_SHIFT; snprintf (tmpbuf, tmpbuflen, "Logical Rank %u", logical_rank); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s5500wb_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if ((ret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR))) { _sel_string_output_intel_s5500wb_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_CORRECTABLE_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_NON_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_NON_FATAL_SENSOR) || ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_A || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QPI_FATAL_SENSOR_B) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QPI_FATAL_SENSOR))) { snprintf (tmpbuf, tmpbuflen, "Socket %u", system_event_record_data->event_data2); return (1); } return (0); } static void _sel_string_output_intel_s5500wb_device_function (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t device, function; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* From Bill Hannon @ Intel * * [7:3] = Device Number * [2:0] = Function Number */ device = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s5500wb_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCI_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s5500wb_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t processor_socket; uint8_t channel_number; uint8_t dimm_slot_id; char *processor_socket_str; char channel_number_str[INTEL_EVENT_BUFFER_LENGTH + 1]; char channel_number_char = 0; char *dimm_slot_id_str; int processor_socket_valid = 0; int channel_number_valid = 0; int dimm_slot_id_valid = 0; processor_socket = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_BITMASK); processor_socket >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_SHIFT; channel_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_BITMASK); channel_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_SHIFT; dimm_slot_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_BITMASK); dimm_slot_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_SHIFT; if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_1) { processor_socket_str = "1"; processor_socket_valid++; } else if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_2) { processor_socket_str = "2"; processor_socket_valid++; } else processor_socket_str = "Unknown"; if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_A) { channel_number_char = 'A'; channel_number_valid++; } else if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_B) { channel_number_char = 'B'; channel_number_valid++; } else if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_C) { channel_number_char = 'C'; channel_number_valid++; } if (processor_socket_valid && channel_number_valid) { /* If we're on socket #2, the DIMMs jump from A-C, to D-F */ if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_2) channel_number_char += 3; } memset (channel_number_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); if (channel_number_valid && channel_number_char) snprintf(channel_number_str, INTEL_EVENT_BUFFER_LENGTH, "%c", channel_number_char); else snprintf(channel_number_str, INTEL_EVENT_BUFFER_LENGTH, "Unknown"); if (dimm_slot_id == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_1) { dimm_slot_id_str = "1"; dimm_slot_id_valid++; } else if (dimm_slot_id == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_2) { dimm_slot_id_str = "2"; dimm_slot_id_valid++; } else dimm_slot_id_str = "Unknown"; if (processor_socket_valid && channel_number_valid && dimm_slot_id_valid) { snprintf (tmpbuf, tmpbuflen, "DIMM = %s%s", channel_number_str, dimm_slot_id_str); } else snprintf (tmpbuf, tmpbuflen, "Processor Socket = %s, Channel Number = %s, Dimm Slot = %s", processor_socket_str, channel_number_str, dimm_slot_id_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s5500wb_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if ((ret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR))) { _sel_string_output_intel_s5500wb_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s5500wb_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET: error_code_str = "CMOS date / time not set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORD_CHECK_FAILED: error_code_str = "Password check failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_LOCKED_ERROR: error_code_str = "Keyboard component encountered a locked error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_STUCK_KEY_ERROR: error_code_str = "Keyboard component encountered a stuck key error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_FIXED_MEDIA_THE_SAS_RAID_FIRMWARE_CAN_NOT_RUN_PROPERLY: error_code_str = "Fixed Media The SAS RAID firmware can not run properly. The user should attempt to reflash the firmware"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT: error_code_str = "PCI resource conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR: error_code_str = "PCI out of resources error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_CACHE_SIZE_MISMATCH_DETECTED: error_code_str = "Processor 0x cache size mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_STEPPING_MISMATCH: error_code_str = "Processor 0x stepping mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_MISMATCH_DETECTED: error_code_str = "Processor 0x family mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_INTEL_QPI_SPEED_MISMATCH: error_code_str = "Processor 0x Intel(R) QPI speed mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_MODEL_MISMATCH: error_code_str = "Processor 0x model mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_SPEEDS_MISMATCHED: error_code_str = "Processor 0x speeds mismatched"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_IS_NOT_SUPPORTED: error_code_str = "Processor 0x family is not supported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED: error_code_str = "Processor and chipset stepping configuration is unsupported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED: error_code_str = "CMOS/NVRAM Configuration Cleared"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER: error_code_str = "Passwords cleared by jumper"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET: error_code_str = "Password clear jumper is set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 01 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 02 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_0X_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 0x microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT: error_code_str = "Watchdog timer failed on last boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE: error_code_str = "OS boot watchdog timer failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST: error_code_str = "Baseboard management controller failed self-test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND: error_code_str = "Baseboard management controller failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE: error_code_str = "Baseboard management controller in update mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY: error_code_str = "Sensor data record empty"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL: error_code_str = "System event log full"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE: error_code_str = "Memory component could not be configured in the selected RAS mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_POPULATION_ERROR: error_code_str = "DIMM Population Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CLTT_CONFIGURATION_FAILURE_ERROR: error_code_str = "CLTT Configuration Failure Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_A1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_A2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_B1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_B2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_C1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_C2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_D1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_D2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_E1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_E2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_F1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_F2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_DISABLED: error_code_str = "DIMM_A1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_DISABLED: error_code_str = "DIMM_A2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_DISABLED: error_code_str = "DIMM_B1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_DISABLED: error_code_str = "DIMM_B2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_DISABLED: error_code_str = "DIMM_C1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_DISABLED: error_code_str = "DIMM_C2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_DISABLED: error_code_str = "DIMM_D1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_DISABLED: error_code_str = "DIMM_D2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_DISABLED: error_code_str = "DIMM_E1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_DISABLED: error_code_str = "DIMM_E2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_DISABLED: error_code_str = "DIMM_F1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_DISABLED: error_code_str = "DIMM_F2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_A1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_A2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_B1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_B2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_C1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_C2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_D1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_D2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_E1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_E2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_F1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_F2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_A1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_A2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_A2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_B1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_B2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_B2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_C1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_C2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_C2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_D1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_D2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_D2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_E1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_E2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_E2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_F1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DIMM_F2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_F2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE: error_code_str = "Chipset Reclaim of non critical variables complete"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_UNSPECIFIED_PROCESSOR_COMPONENT_HAS_ENCOUNTERED_A_NON_SPECIFIC_ERROR: error_code_str = "Unspecified processor component has encountered a non specific error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Keyboard component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Keyboard component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MOUSE_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Mouse component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_MOUSE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Mouse component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Local Console component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Local Console component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Local Console component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Remote Console component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR: error_code_str = "Remote Console component encountered an input error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Remote Console component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Serial port component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Serial port component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR: error_code_str = "Serial Port controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR: error_code_str = "Serial Port component encountered an input error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Serial Port component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "LPC component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "LPC component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "ATA/ATPI component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "PCI component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_READ_ERROR: error_code_str = "PCI component encountered a read error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_WRITE_ERROR: error_code_str = "PCI component encountered a write error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_UNSPECIFIED_SOFTWARE_COMPONENT_ENCOUNTERED_A_START_ERROR: error_code_str = "Unspecified software component encountered a start error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PEI_CORE_COMPONENT_ENCOUNTERED_A_LOAD_ERROR: error_code_str = "PEI Core component encountered a load error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PEI_MODULE_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "PEI module component encountered a illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_CORE_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "DXE core component encountered a illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "DXE boot services driver component encountered a illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_INVALID_CONFIGURATION: error_code_str = "DXE boot services driver component encountered invalid configuration"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_SMM_DRIVER_COMPONENT_ENCOUNTERED_A_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "SMM driver component encountered a illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED: error_code_str = "TPM device not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING: error_code_str = "TPM device missing or not responding"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_FAILURE: error_code_str = "TPM device failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST: error_code_str = "TPM device failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_MISMATCH_ERROR: error_code_str = "Processor component encountered a mismatch error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_LOW_VOLTAGE_ERROR: error_code_str = "Processor component encountered a low voltage error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_HIGH_VOLTAGE_ERROR: error_code_str = "Processor component encountered a high voltage error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_ATA_BUS_SMART_NOT_SUPPORTED: error_code_str = "ATA/ATPI ATA bus SMART not supported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_ATA_ATPI_ATA_SMART_IS_DISABLED: error_code_str = "ATA/ATPI ATA SMART is disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI Express component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI Express component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_PCI_EXPRESS_IBIST_ERROR: error_code_str = "PCI Express IBIST error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM: error_code_str = "DXE boot services driver Not enough memory available to shadow a legacy option ROM"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_UNRECOGNIZED: error_code_str = "DXE boot services driver Unrecognized"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_MEMORY_PARITY_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t channel_information_validity; uint8_t dimm_information_validity; uint8_t error_type; uint8_t processor_socket; uint8_t channel_number; uint8_t dimm_slot_id; char *error_type_str; char *processor_socket_str; char channel_number_str[INTEL_EVENT_BUFFER_LENGTH + 1]; char channel_number_char = 0; char *dimm_slot_id_str; int processor_socket_valid = 0; int channel_number_valid = 0; int dimm_slot_id_valid = 0; channel_information_validity = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALIDITY_BITMASK); channel_information_validity >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALIDITY_SHIFT; dimm_information_validity = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALIDITY_BITMASK); dimm_information_validity >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALIDITY_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_BITMASK); error_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_SHIFT; processor_socket = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_BITMASK); processor_socket >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_SHIFT; channel_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_BITMASK); channel_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_NUMBER_SHIFT; dimm_slot_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_BITMASK); dimm_slot_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SLOT_ID_SHIFT; if (error_type == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_DATA_PARITY_ERROR) error_type_str = "Data Parity Error"; else if (error_type == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_ERROR_TYPE_ADDRESS_PARITY_ERROR) error_type_str = "Address Parity Error"; else error_type_str = "Unknown"; if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_1) { processor_socket_str = "1"; processor_socket_valid++; } else if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_2) { processor_socket_str = "2"; processor_socket_valid++; } else processor_socket_str = "Unknown"; if (channel_information_validity == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_CHANNEL_INFORMATION_VALID) { if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_A) { channel_number_char = 'A'; channel_number_valid++; } else if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_B) { channel_number_char = 'B'; channel_number_valid++; } else if (channel_number == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_CHANNEL_C) { channel_number_char = 'C'; channel_number_valid++; } } if (processor_socket_valid && channel_number_valid) { /* If we're on socket #2, the DIMMs jump from A-C, to D-F */ if (processor_socket == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_PROCESSOR_SOCKET_2) channel_number_char += 3; } memset (channel_number_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); if (channel_number_valid && channel_number_char) snprintf(channel_number_str, INTEL_EVENT_BUFFER_LENGTH, "%c", channel_number_char); else snprintf(channel_number_str, INTEL_EVENT_BUFFER_LENGTH, "Unknown"); if (dimm_information_validity == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_DIMM_INFORMATION_VALID) { if (dimm_slot_id == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_1) { dimm_slot_id_str = "1"; dimm_slot_id_valid++; } else if (dimm_slot_id == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DIMM_SOCKET_2) { dimm_slot_id_str = "2"; dimm_slot_id_valid++; } else dimm_slot_id_str = "Unknown"; } else dimm_slot_id_str = "Unknown"; if (processor_socket_valid && channel_number_valid && dimm_slot_id_valid) { if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, DIMM = %s%s", error_type_str, channel_number_str, dimm_slot_id_str)) (*oem_rv) = 1; else (*oem_rv) = 0; } else { if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, Processor Socket = %s, Channel Number = %s, Dimm Slot = %s", error_type_str, processor_socket_str, channel_number_str, dimm_slot_id_str)) (*oem_rv) = 1; else (*oem_rv) = 0; } return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_RAS_STATUS_INFORMATION_FOR_MEMORY_MIRRORING_MIRRORING_MODE || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_RAS_STATUS_INFORMATION_FOR_MEMORY_MIRRORING_SPARING_MODE) && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST) && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t domain_instance_type; uint8_t instance_id; domain_instance_type = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_BITMASK); domain_instance_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_SHIFT; instance_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_INSTANCE_ID_BITMASK); instance_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_INSTANCE_ID_SHIFT; if (domain_instance_type == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_DOMAIN_INSTANCE_TYPE_LOCAL) { uint8_t mirroring_domain_local_subinstance; uint8_t socket_id; char mirroring_domain_local_subinstance_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; char socket_id_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (mirroring_domain_local_subinstance_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (socket_id_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); mirroring_domain_local_subinstance = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_BITMASK); mirroring_domain_local_subinstance >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_SHIFT; socket_id = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_SHIFT; if (mirroring_domain_local_subinstance != IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_UNUSED_FIELD) { char *mirroring_domain_local_subinstance_str = NULL; switch (mirroring_domain_local_subinstance) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_0_1: mirroring_domain_local_subinstance_str = "{Ch0, Ch1}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_0_2: mirroring_domain_local_subinstance_str = "{Ch0, Ch2}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_MIRRORING_DOMAIN_LOCAL_SUBINSTANCE_CHANNEL_1_2: mirroring_domain_local_subinstance_str = "{Ch1, Ch2}"; break; default: mirroring_domain_local_subinstance_str = "Unknown"; } snprintf (mirroring_domain_local_subinstance_buf, INTEL_EVENT_BUFFER_LENGTH, ", Subinstance = %s", mirroring_domain_local_subinstance_str); } if (socket_id != IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_UNUSED_FIELD) { if (socket_id == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_LOCAL_SOCKET_ID_APPLIES_TO_ALL_SOCKETS) snprintf (socket_id_buf, INTEL_EVENT_BUFFER_LENGTH, ", Applies to all sockets"); else snprintf (socket_id_buf, INTEL_EVENT_BUFFER_LENGTH, ", Applies to Socket ID = %u", socket_id); } if (sel_string_snprintf (buf, buflen, wlen, "Memory Mirroring Domain Instance Id = %u%s%s", instance_id, mirroring_domain_local_subinstance_buf, socket_id_buf)) (*oem_rv) = 1; else (*oem_rv) = 0; } else { uint8_t first_socket_id; uint8_t second_socket_id; char first_socket_id_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; char second_socket_id_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (first_socket_id_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (second_socket_id_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); first_socket_id = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_FIRST_SOCKET_ID_BITMASK); first_socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_FIRST_SOCKET_ID_SHIFT; second_socket_id = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_SECOND_SOCKET_ID_BITMASK); second_socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_GLOBAL_SECOND_SOCKET_ID_SHIFT; if (first_socket_id != IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_UNUSED_FIELD) snprintf (first_socket_id_buf, INTEL_EVENT_BUFFER_LENGTH, ", First Socket ID = %u", first_socket_id); if (second_socket_id != IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_UNUSED_FIELD) snprintf (second_socket_id_buf, INTEL_EVENT_BUFFER_LENGTH, ", Second Socket ID = %u", second_socket_id); if (sel_string_snprintf (buf, buflen, wlen, "Memory Mirroring Domain Instance Id = %u%s%s", instance_id, first_socket_id_buf, second_socket_id_buf)) (*oem_rv) = 1; else (*oem_rv) = 0; } return (1); } return (0); } struct sel_string_oem sel_string_oem_intel_s5500wb = { sel_string_output_intel_s5500wb_sensor_name, NULL, sel_string_output_intel_s5500wb_event_data1_class_oem, NULL, sel_string_output_intel_s5500wb_event_data2_discrete_oem, sel_string_output_intel_s5500wb_event_data2_class_oem, NULL, sel_string_output_intel_s5500wb_event_data3_discrete_oem, sel_string_output_intel_s5500wb_event_data3_class_oem, sel_string_output_intel_s5500wb_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-quanta-qssc-s4r.c0000644002055400205540000022256513527331637025616 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 int sel_string_output_intel_quanta_qssc_s4r_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); if ((ret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_quanta_qssc_s4r_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if ((ret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR))) { ret = ipmi_get_oem_specific_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->sensor_type, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_PERSISTENT) { char *event_msg_str = NULL; switch (system_event_record_data->offset_from_event_reading_type_code) { case IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_RECOVERABLE_ERROR: event_msg_str = "Persistent Recoverable Error"; break; case IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_ALERT: event_msg_str = "Persistent Parity Alert"; break; case IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_STATUS: event_msg_str = "Persistent Parity Status"; break; case IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_SMI_LINK_LANE_FAIL_OVER_EVENT: event_msg_str = "SMI Link Lane Fail Over (LFO) Event"; break; } if (event_msg_str) { snprintf (tmpbuf, tmpbuflen, "%s", event_msg_str); return (1); } } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_UNCORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_UNCORRECTABLE) { char *event_msg_str = NULL; if (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_CRC_ERROR) event_msg_str = "Uncorrectable CRC Error"; else if (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ALERT_FRAME) event_msg_str = "Uncorrectable Alert Frame"; if (event_msg_str) { snprintf (tmpbuf, tmpbuflen, "%s", event_msg_str); return (1); } } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PATROL_SCRUB_ERROR) { char *event_msg_str = NULL; if (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_CORRECTABLE_RROR) event_msg_str = "Correctable Error"; else if (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ERROR) event_msg_str = "Uncorrectable Error"; if (event_msg_str) { snprintf (tmpbuf, tmpbuflen, "%s", event_msg_str); return (1); } } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Correctable Sensor Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Non-Fatal Sensor Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_A && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Fatal Sensor A Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_B && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR) { snprintf (tmpbuf, tmpbuflen, "QPI Fatal Sensor B Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } return (0); } static void _sel_string_output_intel_quanta_qssc_s4r_bus (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data2); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_quanta_qssc_s4r_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCI_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_quanta_qssc_s4r_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_ECC_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR) { uint8_t count_of_correctable_ecc_error; count_of_correctable_ecc_error = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_COUNT_OF_CORRECTABLE_ECC_ERROR_BITMASK); count_of_correctable_ecc_error >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_COUNT_OF_CORRECTABLE_ECC_ERROR_SHIFT; snprintf (tmpbuf, tmpbuflen, "Correctable ECC Error Count = %u", count_of_correctable_ecc_error); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SLOT_CONNECTOR_FAULT_STATUS_ASSERTED) { uint8_t event_special_code; char *event_special_code_str; uint8_t error_sub_code; char *error_sub_code_str = NULL; event_special_code = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_BITMASK); event_special_code >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_SHIFT; error_sub_code = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_BITMASK); error_sub_code >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_SHIFT; switch (event_special_code) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_INVALID_INFORMATION: event_special_code_str = "Invalid Information"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_BOARD_HOT_REPLACED_WITH_MISMATCHED_OR_FAULTY_MEMORY: event_special_code_str = "Memory Board hot-replaced with mismatched or faulty memory"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_GENERIC_INITIALIZATION_ERROR: event_special_code_str = "Memory Hot-plug generic initialization error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_TIMEOUT: event_special_code_str = "Memory Hot-plug Timeout"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_USER_INITIATED_CANCELATION: event_special_code_str = "User-initiated cancellation"; break; default: event_special_code_str = "Unknown"; } if (event_special_code == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_EVENT_SPECIAL_CODE_MEMORY_HOT_PLUG_GENERIC_INITIALIZATION_ERROR) { switch (error_sub_code) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_MEMORY_BIST_ERROR: error_sub_code_str = "Memory BIST Error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_SPD_ERROR: error_sub_code_str = "SPD Error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_CLTT_CONFIGURATION_ERROR: error_sub_code_str = "CLTT Configuration Error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_POPULATION_RULE_ERROR: error_sub_code_str = "Population Rule Error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_MISMATCHED_DIMM_ERROR: error_sub_code_str = "Mismatched DIMM Error"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_SUB_CODE_OTHER_MEMORY_INITIALIZATION_ERRORS: error_sub_code_str = "Other Memory Initialization Errors"; break; } } snprintf (tmpbuf, tmpbuflen, "Event Special Code = %s%s%s", event_special_code_str, error_sub_code_str ? ", Error Sub Code = " : "", error_sub_code_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_quanta_qssc_s4r_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if ((ret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR))) { _sel_string_output_intel_quanta_qssc_s4r_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_CORRECTABLE_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_NON_FATAL_SENSOR) || ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_A || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR_B) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_QPI_FATAL_SENSOR))) { snprintf (tmpbuf, tmpbuflen, "Socket %u", system_event_record_data->event_data2); return (1); } return (0); } static void _sel_string_output_intel_quanta_qssc_s4r_device_function (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t device, function; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* From Bill Hannon @ Intel * * [7:3] = Device Number * [2:0] = Function Number */ device = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); } static void _sel_string_output_intel_quanta_qssc_s4r_memory_board (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t memory_board; char *memory_board_str; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); memory_board = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_BITMASK); memory_board >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_SHIFT; switch (memory_board) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM1_SLOT: memory_board_str = "MEM1_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM2_SLOT: memory_board_str = "MEM2_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM3_SLOT: memory_board_str = "MEM3_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM4_SLOT: memory_board_str = "MEM4_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM5_SLOT: memory_board_str = "MEM5_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM6_SLOT: memory_board_str = "MEM6_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM7_SLOT: memory_board_str = "MEM7_SLOT"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_MEM8_SLOT: memory_board_str = "MEM8_SLOT"; break; default: memory_board_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "%s", memory_board_str); } static char * _sel_string_output_intel_quanta_qssc_s4r_dimm_slot_str (uint8_t dimm_slot) { switch (dimm_slot) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1B: return ("DIMM_1/B"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1A: return ("DIMM_1/A"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2B: return ("DIMM_2/B"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2A: return ("DIMM_2/A"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1D: return ("DIMM_1/D"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_1C: return ("DIMM_1/C"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2D: return ("DIMM_2/D"); case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_2C: return ("DIMM_2/C"); default: return ("Unknown"); } return (NULL); /* NOT REACHED */ } static void _sel_string_output_intel_quanta_qssc_s4r_dimm_slot (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t dimm_slot; char *dimm_slot_str; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); dimm_slot = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_BITMASK); dimm_slot >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_SHIFT; dimm_slot_str = _sel_string_output_intel_quanta_qssc_s4r_dimm_slot_str (dimm_slot); snprintf (tmpbuf, tmpbuflen, "%s", dimm_slot_str); } static void _sel_string_output_intel_quanta_qssc_s4r_smi_link (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t smi_link; char *smi_link_str; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); smi_link = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_BITMASK); smi_link >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_SHIFT; switch (smi_link) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_0: smi_link_str = "SMI_LINK0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_1: smi_link_str = "SMI_LINK1"; break; default: smi_link_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "%s", smi_link_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_quanta_qssc_s4r_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCI_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_quanta_qssc_s4r_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_RAS_STATE_INFORMATION_FOR_MEMORY_MIRRORING_MIRRORING_MODE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST)) { uint8_t domain_instance_type; uint8_t instance_id; char *domain_instance_str; char *instance_id_str; domain_instance_type = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_BITMASK); domain_instance_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_SHIFT; instance_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_BITMASK); instance_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_SHIFT; switch (domain_instance_type) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_MIRRORING_INTRA_SOCKET: domain_instance_str = "Local memory mirroring"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_DOMAIN_INSTANCE_TYPE_GLOBAL_MEMORY_MIRRORING_INTER_SOCKET: domain_instance_str = "Global memory mirroring"; break; default: domain_instance_str = "Unknown"; } switch (instance_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_2: instance_id_str = "{MEM1_SLOT, MEM2_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_3_4: instance_id_str = "{MEM3_SLOT, MEM4_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_6: instance_id_str = "{MEM5_SLOT, MEM6_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_7_8: instance_id_str = "{MEM7_SLOT, MEM8_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_4: instance_id_str = "{MEM1_SLOT, MEM4_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_3_2: instance_id_str = "{MEM3_SLOT, MEM2_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_8: instance_id_str = "{MEM5_SLOT, MEM8_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_7_6: instance_id_str = "{MEM7_SLOT, MEM6_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_1_3: instance_id_str = "{MEM1_SLOT, MEM3_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_2_4: instance_id_str = "{MEM2_SLOT, MEM4_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_5_7: instance_id_str = "{MEM5_SLOT, MEM7_SLOT}"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_MIRRORING_INSTANCE_ID_6_8: instance_id_str = "{MEM6_SLOT, MEM8_SLOT}"; break; default: instance_id_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Domain Instance = %s, Instance = %s", domain_instance_str, instance_id_str); return (1); } if ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PATROL_SCRUB_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_CORRECTABLE_RROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ERROR))) { char memory_board_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; char dimm_slot_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (memory_board_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (dimm_slot_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_quanta_qssc_s4r_memory_board (ctx, memory_board_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); _sel_string_output_intel_quanta_qssc_s4r_dimm_slot (ctx, dimm_slot_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); snprintf (tmpbuf, tmpbuflen, "Memory Board = %s, DIMM Slot = %s", memory_board_buf, dimm_slot_buf); return (1); } if ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_CORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_PERSISTENT && (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_RECOVERABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_ALERT || system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_PERSISTENT_PARITY_STATUS || system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_CORRECTABLE_MEMORY_ERROR_SMI_LINK_LANE_FAIL_OVER_EVENT)) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_UNCORRECTABLE_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_CRC_ERROR_UNCORRECTABLE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_CRC_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_QUANTA_QSSC_S4R_SPECIFIC_UNCORRECTABLE_MEMORY_ERROR_UNCORRECTABLE_ALERT_FRAME))) { char memory_board_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; char smi_link_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (memory_board_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (smi_link_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_quanta_qssc_s4r_memory_board (ctx, memory_board_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); _sel_string_output_intel_quanta_qssc_s4r_smi_link (ctx, smi_link_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); snprintf (tmpbuf, tmpbuflen, "Memory Board = %s, SMI Link = %s", memory_board_buf, smi_link_buf); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_BOARD_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SLOT_CONNECTOR_FAULT_STATUS_ASSERTED) { char memory_board_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (memory_board_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); _sel_string_output_intel_quanta_qssc_s4r_memory_board (ctx, memory_board_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); snprintf (tmpbuf, tmpbuflen, "Memory Board = %s", memory_board_buf); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_quanta_qssc_s4r_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if ((ret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR) || (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR))) { _sel_string_output_intel_quanta_qssc_s4r_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_quanta_qssc_s4r_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_RAS_STATE_INFORMATION_FOR_MEMORY_MIRRORING_SPARING_MODE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_LOST) && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t domain_instance_type; uint8_t sparing_type; char *domain_instance_str; char *sparing_type_str; char sparing_type_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; uint8_t index_of_spared_memory_board; char index_of_spared_memory_board_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; uint8_t spared_dimm_information; char *spared_dimm_information_str; char spared_dimm_information_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (sparing_type_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (index_of_spared_memory_board_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (spared_dimm_information_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); domain_instance_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_BITMASK); domain_instance_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_SHIFT; sparing_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_TYPE_BITMASK); sparing_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_TYPE_SHIFT; index_of_spared_memory_board = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_INDEX_OF_SPARED_MEMORY_BOARD_BITMASK); index_of_spared_memory_board >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_INDEX_OF_SPARED_MEMORY_BOARD_SHIFT; spared_dimm_information = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_BITMASK); spared_dimm_information >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_SHIFT; if (domain_instance_type == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING) { domain_instance_str = "Local memory sparing"; switch (sparing_type) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING_SPARING_TYPE_DIMM_SPARING: sparing_type_str = "DIMM Sparing"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_LOCAL_MEMORY_SPARING_SPARING_TYPE_RANK_SPARING: sparing_type_str = "Rank Sparing"; break; default: sparing_type_str = "Unknown"; } snprintf (sparing_type_buf, INTEL_EVENT_BUFFER_LENGTH, ", Sparing Type = %s", sparing_type_str); switch (spared_dimm_information) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_1B_LOCKSTEP_DIMM_1D: spared_dimm_information_str = "DIMM_1B lock steep with DIMM 1D"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_1A_LOCKSTEP_DIMM_1C: spared_dimm_information_str = "DIMM_1B lock steep with DIMM 1D"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_2B_LOCKSTEP_DIMM_2D: spared_dimm_information_str = "DIMM_1B lock steep with DIMM 1D"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_QUANTA_QSSC_S4R_SPARED_DIMM_INFORMATION_LOCAL_SPARING_DIMM_2A_LOCKSTEP_DIMM_2C: spared_dimm_information_str = "DIMM_1B lock steep with DIMM 1D"; break; default: spared_dimm_information_str = "Unknown"; } snprintf (spared_dimm_information_buf, INTEL_EVENT_BUFFER_LENGTH, ", Spared DIMM Information = %s", spared_dimm_information_str); } else if (domain_instance_type == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SPARING_DOMAIN_INSTANCE_TYPE_GLOBAL_MEMORY_SPARING) domain_instance_str = "Global memory sparing"; else domain_instance_str = "Unknown"; snprintf (index_of_spared_memory_board_buf, INTEL_EVENT_BUFFER_LENGTH, ", Spared Memory Board = %u", index_of_spared_memory_board); if (sel_string_snprintf (buf, buflen, wlen, "Domain Instance = %s%s%s%s", domain_instance_str, sparing_type_buf, index_of_spared_memory_board_buf, spared_dimm_information_buf)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_MEMORY_MISMATCH_CONFIGURATION_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CONFIGURATION_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { /* achu: I have no idea what SMI Link# Valid is for, there is no SMI link data in this SEL event * Is it a typo. Do they mean memory board? It's mostly here for documentation. */ uint8_t smi_link_valid; uint8_t dimm_slot_valid; uint8_t error_type; char *error_type_str; char memory_board_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; char dimm_slot_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (memory_board_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memset (dimm_slot_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); smi_link_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_VALID_BITMASK); smi_link_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_SMI_LINK_VALID_SHIFT; dimm_slot_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_VALID_BITMASK); dimm_slot_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_DIMM_SLOT_VALID_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_BITMASK); error_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_SHIFT; switch (error_type) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_MIRROR: error_type_str = "Mirror"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_SPARE: error_type_str = "Spare"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_INTERLEAVE: error_type_str = "Interleave"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_HEMISPHERE: error_type_str = "Hemisphere"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_POPULATION: error_type_str = "Population"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_QUANTA_QSSC_S4R_ERROR_TYPE_DEVICE_MISMATCH: error_type_str = "Device Mismatch"; break; default: error_type_str = "Unknown"; } _sel_string_output_intel_quanta_qssc_s4r_memory_board (ctx, memory_board_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); /* Technically Intel docs do not say 0 vs. 1 for true vs. false. Gotta guess */ if (dimm_slot_valid) _sel_string_output_intel_quanta_qssc_s4r_dimm_slot (ctx, dimm_slot_buf, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data); if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, Memory Board = %s%s%s", error_type_str, memory_board_buf, dimm_slot_valid ? ", DIMM Slot = " : "", dimm_slot_buf)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_QUANTA_QSSC_S4R_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_QUANTA_QSSC_S4R_BIOS_POST_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; char error_code_buf[INTEL_EVENT_BUFFER_LENGTH + 1]; uint16_t error_code_type; memset (error_code_buf, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); error_code_type = (error_code & IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_BITMASK); error_code_type >>= IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_SHIFT; switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET: error_code_str = "CMOS Date/Time not set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORD_CHECK_FAILED: error_code_str = "Password check failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_KEYBOARD_LOCKED_ERROR: error_code_str = "Keyboard locked error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_KEYBOARD_STUCK_KEY_ERROR: error_code_str = "Keyboard stuck key error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_THE_SAS_RAID_FIRMWARE_CANNOT_RUN_PROPERLY: error_code_str = "The SAS RAID firmware can not run properly. The user should attempt to reflash the firmware"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_PARITY_ERROR: error_code_str = "PCI Parity Error (PERR)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT_ERROR: error_code_str = "PCI resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR: error_code_str = "PCI out of resources error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED: error_code_str = "Processor cache size mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_STEPPING_MISMATCH: error_code_str = "Processor stepping mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED: error_code_str = "Processor family mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_SPEED_MISMATCH: error_code_str = "Processor Intel(R) QPI speed mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED: error_code_str = "Processor and chipset stepping configuration is unsupported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED: error_code_str = "CMOS/NVRAM configuration cleared"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER: error_code_str = "Passwords cleared by jumper"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET: error_code_str = "Password clear jumper is set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_DISABLED: error_code_str = "Processor Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_FRB_3_TIMEOUT: error_code_str = "Processor FRB-3 timeout"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 01 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 02 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 03 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 04 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_BUILD_IN_SELF_TEST_FAILURE: error_code_str = "Processor Build-In Self Test (BIST) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_PROCESSOR_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT: error_code_str = "Watchdog timer failed on last boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE: error_code_str = "OS boot watchdog timer failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST: error_code_str = "Baseboard Management Controller failed self-test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND: error_code_str = "Baseboard Management Controller failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE: error_code_str = "Baseboard Management Controller in update mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_SENSOR_DATA_RECORD_EMPTY: error_code_str = "Baseboard Management Controller Sensor Data Record empty"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_SYSTEM_EVENT_LOG_FULL: error_code_str = "Baseboard Management Controller System event log full"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE: error_code_str = "Chipset Reclaim of non critical variables complete"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED: error_code_str = "TPM device not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING: error_code_str = "TPM device missing or not responding"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_FAILURE: error_code_str = "TPM device failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST: error_code_str = "TPM device failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_MEMORY_WAS_NOT_CONFIGURED_FOR_THE_SELECTED_MEMORY_RAS_CONFIGURATION: error_code_str = "Memory was not configured for the selected Memory RAS configuration"; break; default: if (error_code_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY) { uint16_t memory_error_code; uint16_t cpu_socket; uint16_t dimm_slot; char *memory_error_code_str; char *cpu_socket_str; char *dimm_slot_str; memory_error_code = (error_code & IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_BITMASK); memory_error_code >>= IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_SHIFT; cpu_socket = (error_code & IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_BITMASK); cpu_socket >>= IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_SHIFT; dimm_slot = (error_code & IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_DIMM_SLOT_BITMASK); dimm_slot >>= IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_DIMM_SLOT_SHIFT; switch (memory_error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_INVALID_TYPE_ERROR: memory_error_code_str = "Memory invalid type error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_DISABLED: memory_error_code_str = "Memory disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_MISMATCH_ERROR: memory_error_code_str = "Memory mismatch error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_TRAINING_ERROR: memory_error_code_str = "Memory Training Failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_TOO_MANY_DIMM_TYPES: memory_error_code_str = "Too many DIMM Types"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_MEMORY_BIST_FAILED: memory_error_code_str = "Memory BIST Failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_ERROR_CODE_SPD_FAILED: memory_error_code_str = "SPD Failed"; break; default: memory_error_code_str = "Unknown Memory Failure"; } switch (cpu_socket) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_1: cpu_socket_str = "CPU_1"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_2: cpu_socket_str = "CPU_2"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_3: cpu_socket_str = "CPU_3"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_QUANTA_QSSC_S4R_POST_ERROR_CODE_TYPE_MEMORY_CPU_SOCKET_4: cpu_socket_str = "CPU_4"; break; default: cpu_socket_str = "Unknown CPU Socket"; } dimm_slot_str = _sel_string_output_intel_quanta_qssc_s4r_dimm_slot_str (dimm_slot); snprintf (error_code_buf, INTEL_EVENT_BUFFER_LENGTH, "%s, CPU Socket = %s, DIMM Slot = %s", memory_error_code_str, cpu_socket_str, dimm_slot_str); error_code_str = error_code_buf; } else error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_intel_quanta_qssc_s4r = { sel_string_output_intel_quanta_qssc_s4r_sensor_name, NULL, sel_string_output_intel_quanta_qssc_s4r_event_data1_class_oem, NULL, sel_string_output_intel_quanta_qssc_s4r_event_data2_discrete_oem, sel_string_output_intel_quanta_qssc_s4r_event_data2_class_oem, NULL, sel_string_output_intel_quanta_qssc_s4r_event_data3_discrete_oem, sel_string_output_intel_quanta_qssc_s4r_event_data3_class_oem, sel_string_output_intel_quanta_qssc_s4r_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s2600jf.c0000644002055400205540000022311213527331637023727 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 int sel_string_output_intel_s2600jf_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); if ((ret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600jf_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if ((ret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2))) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED))) { ret = ipmi_get_oem_specific_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->sensor_type, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_QPI_CORRECTABLE_ERRORS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_CORRECTABLE_ERRORS) { snprintf (tmpbuf, tmpbuflen, "QPI Correctable Errors Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_CHIPSET_PROPRIETARY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_CHIPSET_PROPRIETARY) { snprintf (tmpbuf, tmpbuflen, "Chipset Proprietary Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_ERROR_EXTENSION && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_MEMORY_ERROR_EXTENSION) { snprintf (tmpbuf, tmpbuflen, "Memory Error Extension Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } return (0); } static void _sel_string_output_intel_s2600jf_bus (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data2); } static const char * _sel_string_output_intel_s2600jf_ras_mode (uint8_t event_data) { uint8_t ras_mode; char *ras_mode_str; ras_mode = (event_data & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_BITMASK); ras_mode >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_SHIFT; switch (ras_mode) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_NONE: ras_mode_str = "None"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_MIRRORING: ras_mode_str = "Mirroring"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_LOCKSTEP: ras_mode_str = "Lockstep"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600JF_RAS_MODE_RANK_SPARING: ras_mode_str = "Rank Sparing"; break; default: ras_mode_str = "Unknown"; } return (ras_mode_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600jf_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MIRRORING_REDUNDANCY_STATE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t mirroring_domain_channel; uint8_t dimm_rank_number; mirroring_domain_channel = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_MIRRORING_DOMAIN_CHANNEL_BITMASK); mirroring_domain_channel >>= IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_MIRRORING_DOMAIN_CHANNEL_SHIFT; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Mirroring Domain Channel Pair for Socket = %u, DIMM Rank Number = %u", mirroring_domain_channel, dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_CONFIGURATION_STATUS && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { uint8_t config_error; char *config_error_str; config_error = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_BITMASK); config_error >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_SHIFT; switch (config_error) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_NONE: config_error_str = "None"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600JF_CONFIG_ERROR_INVALID_DIMM_CONFIG_FOR_RAS_MODE: config_error_str = "Invalid"; break; default: config_error_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Config Error = %s", config_error_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t dimm_rank_number; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "DIMM Rank Number = %u", dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_LEGACY_PCI_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s2600jf_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_SPARING_REDUNDANCY_STATE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t sparing_domain_channel; uint8_t dimm_rank_number; char *sparing_domain_channel_str; sparing_domain_channel = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_BITMASK); sparing_domain_channel >>= IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_SHIFT; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_DIMM_RANK_NUMBER_SHIFT; switch (sparing_domain_channel) { case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_A: sparing_domain_channel_str = "A"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_B: sparing_domain_channel_str = "B"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_C: sparing_domain_channel_str = "C"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600JF_SPARING_DOMAIN_CHANNEL_D: sparing_domain_channel_str = "D"; break; default: sparing_domain_channel_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Sparing Domain Channel Pair for Socket = %s, DIMM Rank Number = %u", sparing_domain_channel_str, dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_MODE_SELECT && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600jf_ras_mode (system_event_record_data->event_data2); snprintf (tmpbuf, tmpbuflen, "Previous RAS Mode = %s", ras_mode_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600jf_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if ((ret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR))) { _sel_string_output_intel_s2600jf_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2))) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED))) { uint8_t node_id; char *node_id_str; node_id = system_event_record_data->event_data2; switch (node_id) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_1: node_id_str = "1"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_2: node_id_str = "2"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_3: node_id_str = "3"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600JF_NODE_ID_CPU_4: node_id_str = "4"; break; default: node_id_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "CPU = %s", node_id_str); return (1); } return (0); } static void _sel_string_output_intel_s2600jf_device_function (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t device, function; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* From Bill Hannon @ Intel * * [7:3] = Device Number * [2:0] = Function Number */ device = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600jf_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MIRRORING_REDUNDANCY_STATE || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_SPARING_REDUNDANCY_STATE) && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR))) { uint8_t socket_id; uint8_t channel; uint8_t dimm; char *socket_id_str; char *channel_str; char *dimm_str; socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_SHIFT; switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_1: socket_id_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_2: socket_id_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_3: socket_id_str = "3"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_4: socket_id_str = "4"; break; default: socket_id_str = "Unknown"; } switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_D: channel_str = "D"; break; default: channel_str = "Unknown"; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "CPU = %s, Channel = %s, DIMM = %s", socket_id_str, channel_str, dimm_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_CONFIGURATION_STATUS && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600jf_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_RAS_MODE_SELECT && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600jf_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "Selected RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_LEGACY_PCI_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s2600jf_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600jf_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if ((ret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR))) { _sel_string_output_intel_s2600jf_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s2600jf_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_BIOS_POST_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CMOS_DATE_TIME_NOT_SET: error_code_str = "CMOS date / time not set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORD_CHECK_FAILED: error_code_str = "Password check failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_LOCKED_ERROR: error_code_str = "Keyboard component encountered a locked error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_STUCK_KEY_ERROR: error_code_str = "Keyboard component encountered a stuck key error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_FIXED_MEDIA_THE_SAS_RAID_FIRMWARE_CANNOT_RUN_PROPERLY: error_code_str = "Fixed Media The SAS RAID firmware cannot run properly. The user should attempt to reflash the firmware"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT: error_code_str = "PCI resource conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR: error_code_str = "PCI out of resources error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_CACHE_SIZE_MISMATCH_DETECTED: error_code_str = "Processor 0x cache size mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_STEPPING_MISMATCH: error_code_str = "Processor 0x stepping mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_MISMATCH_DETECTED: error_code_str = "Processor 0x family mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_INTEL_QPI_SPEED_MISMATCH: error_code_str = "Processor 0x Intel(R) QPI speed mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_MODEL_MISMATCH: error_code_str = "Processor 0x model mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_SPEEDS_MISMATCHED: error_code_str = "Processor 0x speeds mismatched"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_FAMILY_IS_NOT_SUPPORTED: error_code_str = "Processor 0x family is not supported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_AND_CHIPSET_STEPPING_CONFIGURATION_IS_UNSUPPORTED: error_code_str = "Processor and chipset stepping configuration is unsupported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CMOS_NVRAM_CONFIGURATION_CLEARED: error_code_str = "CMOS/NVRAM Configuration Cleared"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER: error_code_str = "Passwords cleared by jumper"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET: error_code_str = "Password clear jumper is set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 01 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 02 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_0X_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 0x microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT: error_code_str = "Watchdog timer failed on last boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE: error_code_str = "OS boot watchdog timer failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST: error_code_str = "Baseboard management controller failed self-test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND: error_code_str = "Baseboard management controller failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE: error_code_str = "Baseboard management controller in update mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY: error_code_str = "Sensor data record empty"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL: error_code_str = "System event log full"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE: error_code_str = "Memory component could not be configured in the selected RAS mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_POPULATION_ERROR: error_code_str = "DIMM Population Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CLTT_CONFIGURATION_FAILURE_ERROR: error_code_str = "CLTT Configuration Failure Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_A1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_A2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_B1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_B2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_C1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_C2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_D1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_D2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_E1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_E2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_F1 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_BIST: error_code_str = "DIMM_F2 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_DISABLED: error_code_str = "DIMM_A1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_DISABLED: error_code_str = "DIMM_A2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_DISABLED: error_code_str = "DIMM_B1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_DISABLED: error_code_str = "DIMM_B2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_DISABLED: error_code_str = "DIMM_C1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_DISABLED: error_code_str = "DIMM_C2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_DISABLED: error_code_str = "DIMM_D1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_DISABLED: error_code_str = "DIMM_D2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_DISABLED: error_code_str = "DIMM_E1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_DISABLED: error_code_str = "DIMM_E2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_DISABLED: error_code_str = "DIMM_F1 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_DISABLED: error_code_str = "DIMM_F2 Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_A1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_A2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_B1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_B2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_C1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_C2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_D1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_D2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_E1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_E2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_F1 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_COMPONENT_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM_F2 Component encountered a Serial Presence Detection (SPD) fail error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_A1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_A2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_A2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_B1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_B2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_B2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_C1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_C2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_C2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_D1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_D2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_D2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_E1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_E2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_E2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F1_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_F1 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DIMM_F2_UNCORRECTABLE_ECC_ERROR_ENCOUNTERED: error_code_str = "DIMM_F2 Uncorrectable ECC error encountered"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_CHIPSET_RECLAIM_OF_NON_CRITICAL_VARIABLES_COMPLETE: error_code_str = "Chipset Reclaim of non critical variables complete"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_UNSPECIFIED_PROCESSOR_COMPONENT_HAS_ENCOUNTERED_A_NONSPECIFIC_ERROR: error_code_str = "Unspecified processor component has encountered a nonspecific error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Keyboard component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_KEYBOARD_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Keyboard component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MOUSE_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Mouse component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_MOUSE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Mouse component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Local Console component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Local Console component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LOCAL_CONSOLE_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Local Console component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "Remote Console component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR: error_code_str = "Remote Console component encountered an input error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_REMOTE_CONSOLE_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Remote Console component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Serial port component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Serial port component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR: error_code_str = "Serial Port controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_INPUT_ERROR: error_code_str = "Serial Port component encountered an input error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_AN_OUTPUT_ERROR: error_code_str = "Serial Port component encountered an output error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "LPC component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_LPC_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "LPC component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "ATA/ATPI component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_CONTROLLER_ERROR: error_code_str = "PCI component encountered a controller error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_READ_ERROR: error_code_str = "PCI component encountered a read error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_WRITE_ERROR: error_code_str = "PCI component encountered a write error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_UNSPECIFIED_SOFTWARE_COMPONENT_ENCOUNTERED_A_START_ERROR: error_code_str = "Unspecified software component encountered a start error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PEI_CORE_COMPONENT_ENCOUNTERED_A_LOAD_ERROR: error_code_str = "PEI Core component encountered a load error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PEI_MODULE_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "PEI module component encountered an illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_CORE_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "DXE core component encountered an illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "DXE boot services driver component encountered an illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_COMPONENT_ENCOUNTERED_AN_INVALID_CONFIGURATION: error_code_str = "DXE boot services driver component encountered an invalid configuration"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_SMM_DRIVER_COMPONENT_ENCOUNTERED_AN_ILLEGAL_SOFTWARE_STATE_ERROR: error_code_str = "SMM driver component encountered an illegal software state error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED: error_code_str = "TPM device not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING: error_code_str = "TPM device missing or not responding"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_FAILURE: error_code_str = "TPM device failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST: error_code_str = "TPM device failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_MISMATCH_ERROR: error_code_str = "Processor component encountered a mismatch error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_LOW_VOLTAGE_ERROR: error_code_str = "Processor component encountered a low voltage error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PROCESSOR_COMPONENT_ENCOUNTERED_A_HIGH_VOLTAGE_ERROR: error_code_str = "Processor component encountered a high voltage error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_ATA_BUS_SMART_NOT_SUPPORTED: error_code_str = "ATA/ATPI ATA bus SMART not supported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_ATA_ATPI_ATA_SMART_IS_DISABLED: error_code_str = "ATA/ATPI ATA SMART is disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI Express component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI Express component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_PCI_EXPRESS_IBIST_ERROR: error_code_str = "PCI Express IBIST error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM: error_code_str = "DXE boot services driver Not enough memory available to shadow a legacy option ROM"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600JF_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_UNRECOGNIZED: error_code_str = "DXE boot services driver Unrecognized"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600JF_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600JF_MEMORY_PARITY_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t channel_valid; uint8_t dimm_valid; uint8_t error_type; uint8_t socket_id; uint8_t channel; uint8_t dimm; char *error_type_str; char *socket_id_str; char *channel_str; char *dimm_str; channel_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_VALID_BITMASK); channel_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_CHANNEL_VALID_SHIFT; dimm_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_VALID_BITMASK); dimm_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_EVENT_DATA3_DIMM_VALID_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_BITMASK); error_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_SHIFT; socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_SHIFT; switch (error_type) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_NOT_KNOWN: error_type_str = "Not Known"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600JF_ERROR_TYPE_ADDRESS_PARITY_ERROR: error_type_str = "Address Parity Error"; break; default: error_type_str = "Unknown"; } switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_1: socket_id_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_2: socket_id_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_3: socket_id_str = "3"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_SOCKET_ID_CPU_4: socket_id_str = "4"; break; default: socket_id_str = "Unknown"; } switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_CHANNEL_D: channel_str = "D"; break; default: channel_str = "Unknown"; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600JF_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; } if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, CPU = %s%s%s%s%s", error_type_str, socket_id_str, channel_valid ? ", Channel = " : "", channel_valid ? channel_str : "", dimm_valid ? ", DIMM = " : "", dimm_valid ? dimm_str : "")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_intel_s2600jf = { sel_string_output_intel_s2600jf_sensor_name, NULL, sel_string_output_intel_s2600jf_event_data1_class_oem, NULL, sel_string_output_intel_s2600jf_event_data2_discrete_oem, sel_string_output_intel_s2600jf_event_data2_class_oem, NULL, sel_string_output_intel_s2600jf_event_data3_discrete_oem, sel_string_output_intel_s2600jf_event_data3_class_oem, sel_string_output_intel_s2600jf_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s2600wp.c0000644002055400205540000026014213527331637023762 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 int sel_string_output_intel_s2600wp_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); if ((ret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wp_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if ((ret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2))) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED))) { ret = ipmi_get_oem_specific_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->sensor_type, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_CORRECTABLE_ERRORS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_CORRECTABLE_ERRORS) { snprintf (tmpbuf, tmpbuflen, "QPI Correctable Errors Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_CHIPSET_PROPRIETARY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_CHIPSET_PROPRIETARY) { snprintf (tmpbuf, tmpbuflen, "Chipset Proprietary Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_ERROR_EXTENSION && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_MEMORY_ERROR_EXTENSION) { snprintf (tmpbuf, tmpbuflen, "Memory Error Extension Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } return (0); } static void _sel_string_output_intel_s2600wp_bus (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data2); } static const char * _sel_string_output_intel_s2600wp_ras_mode (uint8_t event_data) { uint8_t ras_mode; char *ras_mode_str; ras_mode = (event_data & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_BITMASK); ras_mode >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_SHIFT; switch (ras_mode) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_NONE: ras_mode_str = "None"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_MIRRORING: ras_mode_str = "Mirroring"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_LOCKSTEP: ras_mode_str = "Lockstep"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_S2600WP_RAS_MODE_RANK_SPARING: ras_mode_str = "Rank Sparing"; break; default: ras_mode_str = "Unknown"; } return (ras_mode_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wp_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MIRRORING_REDUNDANCY_STATE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t mirroring_domain_channel; uint8_t dimm_rank_number; mirroring_domain_channel = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_MIRRORING_DOMAIN_CHANNEL_BITMASK); mirroring_domain_channel >>= IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_MIRRORING_DOMAIN_CHANNEL_SHIFT; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Mirroring Domain Channel Pair for Socket = %u, DIMM Rank Number = %u", mirroring_domain_channel, dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_CONFIGURATION_STATUS && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { uint8_t config_error; char *config_error_str; config_error = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_BITMASK); config_error >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_SHIFT; switch (config_error) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_NONE: config_error_str = "None"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_S2600WP_CONFIG_ERROR_INVALID_DIMM_CONFIG_FOR_RAS_MODE: config_error_str = "Invalid"; break; default: config_error_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Config Error = %s", config_error_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t dimm_rank_number; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "DIMM Rank Number = %u", dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_LEGACY_PCI_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s2600wp_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_SPARING_REDUNDANCY_STATE && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t sparing_domain_channel; uint8_t dimm_rank_number; char *sparing_domain_channel_str; sparing_domain_channel = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_BITMASK); sparing_domain_channel >>= IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_SHIFT; dimm_rank_number = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_BITMASK); dimm_rank_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_DIMM_RANK_NUMBER_SHIFT; switch (sparing_domain_channel) { case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_A: sparing_domain_channel_str = "A"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_B: sparing_domain_channel_str = "B"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_C: sparing_domain_channel_str = "C"; break; case IPMI_SENSOR_MEMORY_REDUNDANCY_EVENT_DATA2_OEM_INTEL_S2600WP_SPARING_DOMAIN_CHANNEL_D: sparing_domain_channel_str = "D"; break; default: sparing_domain_channel_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Sparing Domain Channel Pair for Socket = %s, DIMM Rank Number = %u", sparing_domain_channel_str, dimm_rank_number); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_MODE_SELECT && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600wp_ras_mode (system_event_record_data->event_data2); snprintf (tmpbuf, tmpbuflen, "Previous RAS Mode = %s", ras_mode_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wp_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if ((ret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR))) { _sel_string_output_intel_s2600wp_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2))) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED))) { uint8_t node_id; char *node_id_str; node_id = system_event_record_data->event_data2; switch (node_id) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_1: node_id_str = "1"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_2: node_id_str = "2"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_3: node_id_str = "3"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_S2600WP_NODE_ID_CPU_4: node_id_str = "4"; break; default: node_id_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "CPU = %s", node_id_str); return (1); } return (0); } static void _sel_string_output_intel_s2600wp_device_function (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t device, function; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* From Bill Hannon @ Intel * * [7:3] = Device Number * [2:0] = Function Number */ device = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_BITMASK); device >>= IPMI_OEM_INTEL_EVENT_DATA3_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_BITMASK); function >>= IPMI_OEM_INTEL_EVENT_DATA3_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wp_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MIRRORING_REDUNDANCY_STATE || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_SPARING_REDUNDANCY_STATE) && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR))) { uint8_t socket_id; uint8_t channel; uint8_t dimm; char *socket_id_str; char *channel_str; char *dimm_str; socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_SHIFT; switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_1: socket_id_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_2: socket_id_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_3: socket_id_str = "3"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_4: socket_id_str = "4"; break; default: socket_id_str = "Unknown"; } switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_D: channel_str = "D"; break; default: channel_str = "Unknown"; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "CPU = %s, Channel = %s, DIMM = %s", socket_id_str, channel_str, dimm_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_CONFIGURATION_STATUS && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600wp_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_RAS_MODE_SELECT && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_s2600wp_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "Selected RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_LEGACY_PCI_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_s2600wp_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wp_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if ((ret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && ((system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2) || (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR))) { _sel_string_output_intel_s2600wp_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s2600wp_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_POST && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_BIOS_POST_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SYSTEM_RTC_DATE_TIME_NOT_SET: error_code_str = "System RTC date/time not set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORD_CHECK_FAILED: error_code_str = "Password check failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_FIXED_MEDIA_NOT_DETECTED: error_code_str = "Fixed media not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT: error_code_str = "PCI resource conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR: error_code_str = "PCI out of resources error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_CORE_THREAD_COUNT_MISMATCH_DETECTED: error_code_str = "Processor core/thread count mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED: error_code_str = "Processor cache size mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED: error_code_str = "Processor family mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_LINK_FREQUENCIES_UNABLE_TO_SYNCHRONIZE: error_code_str = "Processor Intel(R) QPI link frequencies unable to synchronize"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_MODEL_MISMATCH_DETECTED: error_code_str = "Processor model mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_FREQUENCIES_UNABLE_TO_SYNCHRONIZE: error_code_str = "Processor frequencies unable to synchronize"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_SETTINGS_RESET_TO_DEFAULT_SETTINGS: error_code_str = "BIOS settings reset to default settings"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER: error_code_str = "Passwords cleared by jumper"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET: error_code_str = "Password clear jumper is set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_DISABLED: error_code_str = "Processor 01 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_DISABLED: error_code_str = "Processor 02 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_DISABLED: error_code_str = "Processor 03 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_DISABLED: error_code_str = "Processor 04 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 01 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 02 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 03 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 04 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_FAILED_SELF_TEST_BIST: error_code_str = "Processor 01 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_FAILED_SELF_TEST_BIST: error_code_str = "Processor 02 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_FAILED_SELF_TEST_BIST: error_code_str = "Processor 03 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_FAILED_SELF_TEST_BIST: error_code_str = "Processor 04 failed Self Test (BIST)"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_01_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 01 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_02_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 02 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_03_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 03 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PROCESSOR_04_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 04 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT: error_code_str = "Watchdog timer failed on last boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE: error_code_str = "OS boot watchdog timer failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST: error_code_str = "Baseboard management controller failed self-test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_HOT_SWAP_CONTROLLER_FAILURE: error_code_str = "Hot Swap Controller failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MANAGEMENT_ENGINE_FAILED_SELF_TEST: error_code_str = "Management Engine (ME) failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MANAGEMENT_ENGINE_FAILED_TO_RESPOND: error_code_str = "Management Engine (ME) Failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND: error_code_str = "Baseboard management controller failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE: error_code_str = "Baseboard management controller in update mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY: error_code_str = "Sensor data record empty"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL: error_code_str = "System event log full"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE: error_code_str = "Memory component could not be configured in the selected RAS mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_POPULATION_ERROR: error_code_str = "DIMM Population Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM A1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM A2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM A3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM B1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM B2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM B3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM C1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM C2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM C3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM D1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM D2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM D3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM E1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM E2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM E3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM F1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM F2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM F3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM G1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM G2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM G3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM H1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM H2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM H3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM J1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM J2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM J3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM K1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM K2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM K3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM L1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM L2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM L3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM M1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM M2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM M3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM N1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM N2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM N3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM P1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM P2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM P3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM R1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM R2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM R3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM T1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM T2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_FAILED_TEST_INITIALIZATION: error_code_str = "DIMM T3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_DISABLED: error_code_str = "DIMM A1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_DISABLED: error_code_str = "DIMM A2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_DISABLED: error_code_str = "DIMM A3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_DISABLED: error_code_str = "DIMM B1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_DISABLED: error_code_str = "DIMM B2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_DISABLED: error_code_str = "DIMM B3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_DISABLED: error_code_str = "DIMM C1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_DISABLED: error_code_str = "DIMM C2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_DISABLED: error_code_str = "DIMM C3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_DISABLED: error_code_str = "DIMM D1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_DISABLED: error_code_str = "DIMM D2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_DISABLED: error_code_str = "DIMM D3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_DISABLED: error_code_str = "DIMM E1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_DISABLED: error_code_str = "DIMM E2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_DISABLED: error_code_str = "DIMM E3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_DISABLED: error_code_str = "DIMM F1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_DISABLED: error_code_str = "DIMM F2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_DISABLED: error_code_str = "DIMM F3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_DISABLED: error_code_str = "DIMM G1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_DISABLED: error_code_str = "DIMM G2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_DISABLED: error_code_str = "DIMM G3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_DISABLED: error_code_str = "DIMM H1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_DISABLED: error_code_str = "DIMM H2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_DISABLED: error_code_str = "DIMM H3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_DISABLED: error_code_str = "DIMM J1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_DISABLED: error_code_str = "DIMM J2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_DISABLED: error_code_str = "DIMM J3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_DISABLED: error_code_str = "DIMM K1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_DISABLED: error_code_str = "DIMM K2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_DISABLED: error_code_str = "DIMM K3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_DISABLED: error_code_str = "DIMM L1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_DISABLED: error_code_str = "DIMM L2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_DISABLED: error_code_str = "DIMM L3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_DISABLED: error_code_str = "DIMM M1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_DISABLED: error_code_str = "DIMM M2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_DISABLED: error_code_str = "DIMM M3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_DISABLED: error_code_str = "DIMM N1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_DISABLED: error_code_str = "DIMM N2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_DISABLED: error_code_str = "DIMM N3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_DISABLED: error_code_str = "DIMM P1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_DISABLED: error_code_str = "DIMM P2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_DISABLED: error_code_str = "DIMM P3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_DISABLED: error_code_str = "DIMM R1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_DISABLED: error_code_str = "DIMM R2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_DISABLED: error_code_str = "DIMM R3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_DISABLED: error_code_str = "DIMM T1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_DISABLED: error_code_str = "DIMM T2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_DISABLED: error_code_str = "DIMM T3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM A1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM A2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_A3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM A3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM B1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM B2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_B3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM B3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM C1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM C2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_C3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM C3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM D1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM D2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_D3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM D3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM E1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM E2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_E3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM E3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM F1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM F2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_F3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM F3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM G1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM G2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_G3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM G3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM H1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM H2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_H3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM H3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM J1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM J2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_J3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM J3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM K1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM K2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_K3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM K3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM L1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM L2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_L3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM L3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM M1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM M2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_M3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM M3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM N1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM N2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_N3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM N3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM P1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM P2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_P3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM P3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM R1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM R2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_R3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM R3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM T1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM T2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DIMM_T3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAIL_ERROR: error_code_str = "DIMM T3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_POST_RECLAIM_OF_NON_CRITICAL_NVRAM_VARIABLES: error_code_str = "POST Reclaim of non-critical NVRAM variables"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_SETTINGS_ARE_CORRUPTED: error_code_str = "BIOS Settings are corrupted"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_NVRAM_VARIABLE_SPACE_WAS_CORRUPTED_AND_HAS_BEEN_REINITIALIZED: error_code_str = "NVRAM variable space was corrupted and has been reinitialized"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Serial port component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Serial port component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_ATA_ATPI_INTERFACE_ERROR: error_code_str = "ATA/ATPI interface error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED: error_code_str = "TPM device not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING: error_code_str = "TPM device missing or not responding"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_FAILURE: error_code_str = "TPM device failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST: error_code_str = "TPM device failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_BIOS_ACM_ERROR: error_code_str = "BIOS ACM Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI Express component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI Express component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_S2600WP_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM: error_code_str = "DXE boot services driver Not enough memory available to shadow a legacy option ROM"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_S2600WP_BIOS_SMI_HANDLER && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_S2600WP_MEMORY_PARITY_ERROR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t channel_valid; uint8_t dimm_valid; uint8_t error_type; uint8_t socket_id; uint8_t channel; uint8_t dimm; char *error_type_str; char *socket_id_str; char *channel_str; char *dimm_str; channel_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_VALID_BITMASK); channel_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_CHANNEL_VALID_SHIFT; dimm_valid = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_VALID_BITMASK); dimm_valid >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_EVENT_DATA3_DIMM_VALID_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_BITMASK); error_type >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_SHIFT; socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_SHIFT; switch (error_type) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_NOT_KNOWN: error_type_str = "Not Known"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_S2600WP_ERROR_TYPE_ADDRESS_PARITY_ERROR: error_type_str = "Address Parity Error"; break; default: error_type_str = "Unknown"; } switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_1: socket_id_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_2: socket_id_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_3: socket_id_str = "3"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_SOCKET_ID_CPU_4: socket_id_str = "4"; break; default: socket_id_str = "Unknown"; } switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_CHANNEL_D: channel_str = "D"; break; default: channel_str = "Unknown"; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_S2600WP_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; } if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, CPU = %s%s%s%s%s", error_type_str, socket_id_str, channel_valid ? ", Channel = " : "", channel_valid ? channel_str : "", dimm_valid ? ", DIMM = " : "", dimm_valid ? dimm_str : "")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_intel_s2600wp = { sel_string_output_intel_s2600wp_sensor_name, NULL, sel_string_output_intel_s2600wp_event_data1_class_oem, NULL, sel_string_output_intel_s2600wp_event_data2_discrete_oem, sel_string_output_intel_s2600wp_event_data2_class_oem, NULL, sel_string_output_intel_s2600wp_event_data3_discrete_oem, sel_string_output_intel_s2600wp_event_data3_class_oem, sel_string_output_intel_s2600wp_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-windmill.c0000644002055400205540000014761213527331637024466 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/record-format/oem/ipmi-sel-oem-intel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_windmill_event_data1_class_sensor_specific_discrete (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CPU_SEL_STATUS) { uint8_t sel_clear; uint8_t sel_rollover; sel_clear = (system_event_record_data->event_data1 & IPMI_SENSOR_TYPE_OEM_INTEL_SEL_CLEAR_BITMASK); sel_clear >>= IPMI_SENSOR_TYPE_OEM_INTEL_SEL_CLEAR_SHIFT; sel_rollover = (system_event_record_data->event_data1 & IPMI_SENSOR_TYPE_OEM_INTEL_SEL_ROLLOVER_BITMASK); sel_rollover >>= IPMI_SENSOR_TYPE_OEM_INTEL_SEL_ROLLOVER_SHIFT; if (sel_clear) { snprintf (tmpbuf, tmpbuflen, "SEL Clear"); return (1); } if (sel_rollover) { snprintf (tmpbuf, tmpbuflen, "SEL Rollover"); return (1); } } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS) { char *chassis_power_status_str; switch (system_event_record_data->event_data1) { case IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_DOWN: chassis_power_status_str = "Power Down"; break; case IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_CYCLE_RESET: chassis_power_status_str = "Power Cycle/Reset"; break; case IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_ON: chassis_power_status_str = "Power On"; break; case IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_AC_LOST: chassis_power_status_str = "AC Lost"; break; default: chassis_power_status_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Power Status = %s", chassis_power_status_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_LOW) { char *hsc_str; switch (system_event_record_data->event_data1) { case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_NONE_OF_THE_ABOVE: hsc_str = "Active status bits are waiting to be read by one or more status commands."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_CML_ERROR: hsc_str = "An error was detected on the I2C/PMBus interface."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_VIN_UV_FAULT: hsc_str = "An undervoltage input fault was detected on the UV pin."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_IOUT_OC_FAULT: hsc_str = "The hot swap controller detected an overcurrent condition."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_HOTSWAP_OFF: hsc_str = "The hot swap gate driver output is disabled."; break; default: hsc_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Status = %s", hsc_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH) { char *hsc_str; switch (system_event_record_data->event_data1) { case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_POWER_GOOD: hsc_str = "The voltage on the FLB pin is below the required threshold."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_MFR_STATUS: hsc_str = "There are one or more active status bits to be read by STATUS_MFR_SPECIFIC."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_INPUT_STATUS: hsc_str = "There are one or more active status bits to be read by STATUS_INPUT."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_IOUT_STATUS: hsc_str = "There are one or more active status bits to be read by STATUS_IOUT."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_VOUT_STATUS: hsc_str = "There are one or more active status bits to be read by STATUS_VOUT."; break; default: hsc_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Status = %s", hsc_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC) { char *hsc_str; switch (system_event_record_data->event_data1) { case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_IOUT_WARN2: hsc_str = "An undercurrent or overcurrent condition on the output supply detected."; break; /* achu: HS_SHUTDOWN_CAUSE1 & HS_SHUTDOWN_CAUSE2 list 4 error messages * with <00>, <01>, <10>, & <11> listed next to them. I have no idea * where these other bits come from. * * So all user gets is a generic "hotswap shutdown" */ case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE1: hsc_str = "Hotswap shutdown"; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE2: hsc_str = "Hotswap shutdown"; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_INLIM: hsc_str = "The ADM1276 has actively limited current into the load."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_OV_CMP_OUT: hsc_str = "Input Voltage to OV pin is above threshold."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_UV_CMP_OUT: hsc_str = "Input voltage to UV pin is below threshold."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_FET_HEALTH_BAD: hsc_str = "FET behavior suggests that the FET may be shorted."; break; default: hsc_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Status = %s", hsc_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT) { char *hsc_str; switch (system_event_record_data->event_data1) { case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_PIN_OP_WARN: hsc_str = "An overpower condition on the input supply was detected by power monitor."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_FAULT: hsc_str = "An undervoltage was detected on the UV pin."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_WARN: hsc_str = "An undervoltage condition on the input supply was detected by the power monitor."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_WARN: hsc_str = "An overvoltage condition on the input supply was detected by hte power monitor."; break; case IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_FAULT: hsc_str = "An overvoltage was detected on the OV pin."; break; default: hsc_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Status = %s", hsc_str); return (1); } return (0); } static const char * _sel_string_output_intel_windmill_native_vs_external_throttling (uint8_t event_data) { uint8_t noe; char *noe_str; noe = (event_data & IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_THROTTLING_BITMASK); noe >>= IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_THROTTLING_SHIFT; switch (noe) { case IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_NATIVE_THROTTLING: noe_str = "Native"; break; case IPMI_OEM_INTEL_WINDMILL_EVENT_DATA2_EXTERNAL_THROTTLING: noe_str = "External"; break; default: noe_str = "Unknown"; break; } return (noe_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_windmill_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PROC_HOT_EXTENDED_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED) { const char *noe_str; noe_str = _sel_string_output_intel_windmill_native_vs_external_throttling (system_event_record_data->event_data2); snprintf (tmpbuf, tmpbuflen, "Throttling = %s", noe_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEM_HOT_EXTENDED_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_MEMORY_AUTOMATICALLY_THROTTLED) { const char *noe_str; noe_str = _sel_string_output_intel_windmill_native_vs_external_throttling (system_event_record_data->event_data2); snprintf (tmpbuf, tmpbuflen, "Throttling = %s", noe_str); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SENSOR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_MACHINE_CHECK_EXCEPTION || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_CORRECTABLE_MACHINE_CHECK_ERROR)) { snprintf (tmpbuf, tmpbuflen, "Error Code Number = %u", system_event_record_data->event_data2); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PCIE_ERROR_SENSOR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { uint8_t device; uint8_t function; device = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_DEVICE_NUMBER_BITMASK); device >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_FUNCTION_NUMBER_BITMASK); function >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t logical_rank; logical_rank = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_WINDMILL_LOGICAL_RANK_BITMASK); logical_rank >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INTEL_WINDMILL_LOGICAL_RANK_SHIFT; snprintf (tmpbuf, tmpbuflen, "Logical Rank = %u", logical_rank); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_windmill_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS) { uint8_t health_event; char *health_event_str; health_event = system_event_record_data->event_data2; switch (health_event) { case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_RECOVERY_GPIO_FORCED: health_event_str = "Recovery GPIO forced"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_IMAGE_EXECUTION_FAILED: health_event_str = "Image execution failed"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_ERASE_ERROR: health_event_str = "Flash erase error"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_FLASH_STATE_INFORMATION: health_event_str = "Flash state information"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_INTERNAL_ERROR: health_event_str = "Internal error"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_BMC_COLD_RESET_ERROR: health_event_str = "BMC did not respond to cold reset"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_DIRECT_FLASH_UPDATE: health_event_str = "Direct flash update requested by the BIOS"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_MANUFACTURING_ERROR: health_event_str = "Manufacturing error"; break; case IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_EVENT_DATA2_PERSISTENT_STORAGE_INTEGRITY_ERROR: health_event_str = "Persistent storage integrity error"; break; default: health_event_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Health Event = %s", health_event_str); return (1); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_FRONT_PANEL_NMI_DIAGNOSTIC_INTERRUPT) { snprintf (tmpbuf, tmpbuflen, "Error ID = 0x%02X", system_event_record_data->event_data2); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_windmill_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PROC_HOT_EXTENDED_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED) { uint8_t cpu_vr; cpu_vr = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_BITMASK); cpu_vr >>= IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_SHIFT; snprintf (tmpbuf, tmpbuflen, "CPU/VR = %u", cpu_vr); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEM_HOT_EXTENDED_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_MEMORY_AUTOMATICALLY_THROTTLED) { uint8_t cpu_vr; uint8_t channel_number; uint8_t dimm; cpu_vr = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_BITMASK); cpu_vr >>= IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CPU_VR_SHIFT; channel_number = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CHANNEL_NUMBER_BITMASK); channel_number >>= IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_CHANNEL_NUMBER_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_DIMM_BITMASK); dimm >>= IPMI_OEM_INTEL_WINDMILL_EVENT_DATA3_THROTTLING_DIMM_SHIFT; snprintf (tmpbuf, tmpbuflen, "CPU/VR = %u, Channel Number = %u, Dimm = %u", cpu_vr, channel_number, dimm); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SENSOR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_MACHINE_CHECK_EXCEPTION || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_CORRECTABLE_MACHINE_CHECK_ERROR)) { uint8_t cpu_number; uint8_t source; uint8_t source_extra; cpu_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_CPU_NUMBER_BITMASK); cpu_number >>= IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_CPU_NUMBER_SHIFT; source = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_BITMASK); source >>= IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_SHIFT; source_extra = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_BITMASK); source_extra >>= IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_SHIFT; if (source == IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_QPI) { char *qpi_str; switch (source_extra) { case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_QPI0: qpi_str = "QPI0"; break; case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_EXTRA_QPI1: qpi_str = "QPI1"; break; default: qpi_str = "Unknown QPI"; break; } snprintf (tmpbuf, tmpbuflen, "CPU = %u, Source = %s", cpu_number, qpi_str); } else if (source == IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_INTEL_WINDMILL_MACHINE_CHECK_ERROR_SOURCE_LLC) { snprintf (tmpbuf, tmpbuflen, "CPU = %u, Core = %u", cpu_number, source_extra); } else { snprintf (tmpbuf, tmpbuflen, "CPU = %u, Source = %s", cpu_number, "Unknown"); } return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_PCIE_ERROR_SENSOR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { snprintf (tmpbuf, tmpbuflen, "Bus Number = %u", system_event_record_data->event_data3); return (1); } if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_MEMORY_ECC_ERROR && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t cpu_number; uint8_t channel_number; uint8_t dimm; cpu_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_BITMASK); cpu_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_SHIFT; channel_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CHANNEL_NUMBER_BITMASK); channel_number >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_CHANNEL_NUMBER_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_WINDMILL_DIMM_SHIFT; snprintf (tmpbuf, tmpbuflen, "CPU Number = %u, Channel Number = %u, Dimm = %u", cpu_number, channel_number, dimm); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_windmill_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_ME_FW_HEALTH_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_WINDMILL_ME_FIRMWARE_HEALTH_EVENT_FIRMWARE_STATUS) { snprintf (tmpbuf, tmpbuflen, "Extended Error Info = %02X", system_event_record_data->event_data3); } if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_OTHER_IIO_ERROR_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_FRONT_PANEL_NMI_DIAGNOSTIC_INTERRUPT) { uint8_t cpu_number; uint8_t source; char *source_str; cpu_number = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_BITMASK); cpu_number >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_CPU_NUMBER_SHIFT; source = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_BITMASK); source >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_SHIFT; switch (source) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IRP0: source_str = "IRP0"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IRP1: source_str = "IRP1"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_IIO_CORE: source_str = "IIO-Core"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_WINDMILL_SOURCE_VT_D: source_str = "VT-d"; break; default: source_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "CPU Number = %u, Source = %s", cpu_number, source_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_windmill_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_POST_ERROR_SENSOR && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { /* These are from WiWynn doc */ case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_MISMATCH: error_code_str = "PEI CPU Mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_SELF_TEST_FAILED: error_code_str = "PEI CPU Self Test Failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_CACHE_ERROR: error_code_str = "PEI CPU Cache Error "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_MICROCODE_UPDATE_FAILED: error_code_str = "PEI CPU Microcode Update Failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_NO_MICROCODE: error_code_str = "PEI CPU No Microcode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_CPU_INTERNAL_ERROR: error_code_str = "PEI CPU Internal Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RESET_NOT_AVAILABLE1: error_code_str = "PEI Reset Not Available"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RESET_NOT_AVAILABLE2: error_code_str = "PEI Reset Not Available"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_RECOVERY_NO_CAPSULE: error_code_str = "PEI Recovery No Capsule"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_SB_PWR_FLR: error_code_str = "PEI SB PWR FLR"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_PEI_SB_SYSPWR_FLR: error_code_str = "PEI SB SYSPWR FLR"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_CLEAR_CMOS: error_code_str = "DXE Clear CMOS "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NB_ERROR: error_code_str = "DXE NB Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_ARCH_PROTOCOL_NOT_AVAILABLE: error_code_str = "DXE Arch Protocol Not Available"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_PCI_BUS_OUT_OF_RESOURCES: error_code_str = "DXE PCI Bus Out of Resources"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_LEGACY_OPROM_NO_SPACE: error_code_str = "DXE Legacy OPROM No Space"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NO_CON_OUT: error_code_str = "DXE No Con Out"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_NO_CON_IN: error_code_str = "DXE No Con In"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_FLASH_UPDATE_FAILED: error_code_str = "DXE Flash Update Failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_DXE_RESET_NOT_AVAILABLE: error_code_str = "DXE Reset Not Available"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_ME_RECOVERED_VIA_GR: error_code_str = "ME Recovered via GR"; break; /* These are from a Quanta doc */ case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_CMOS_CLEAR: error_code_str = "CMOS Clear"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_THERMAL_TRIP: error_code_str = "Thermal Trip"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_SYS_PWROK_DROPS_UNEXPECTEDLY: error_code_str = "SYS_PWROK Drops Unexpectedly"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_AC_LOST: error_code_str = "AC Lost"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_RECOVER_ME_FROM_ABNORMAL_MODE: error_code_str = "Recover ME from Abnormal Mode Successfully"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_BACKUP_IMAGE_LOADED_DIRECT_FW_UPDATE_NEEDED: error_code_str = "Backup Image Loaded and a direct FW updated is needed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_WINDMILL_POST_ERROR_CODE_ROCVER_HECI_FROM_ABNORMAL_MODE: error_code_str = "Recover HECI from Abnormal Mode Successfully"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_windmill_oem_record_data (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD || ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL); /* Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ if (ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { /* Bytes 11-12 - Device ID * Bytes 13-14 - Device Identification Number * Bytes 15-16 - Error Code * * I'm assuming little endian, hopefully I'm right. */ uint16_t device_id; uint16_t device_identification_number; char *device_identification_number_str; uint16_t error_code; char *error_code_str; device_id = sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_LSB_INDEX]; device_id |= (sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_MSB_INDEX] << 8); device_identification_number = sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_LSB_INDEX]; device_identification_number |= (sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_INDEX_MSB_INDEX] << 8); error_code = sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_INDEX_LSB_INDEX]; error_code |= (sel_entry->sel_event_record[IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_INDEX_MSB_INDEX] << 8); switch (device_identification_number) { case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_DEVICE_0_IN_DMI_MODE: device_identification_number_str = "Device 0 in DMI Mode "; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_DMI_PORT_IN_PCIE_MODE: device_identification_number_str = "DMI Port in PCIe Mode "; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_1A: device_identification_number_str = "Port 1A"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_1B: device_identification_number_str = "Port 1B"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2A: device_identification_number_str = "Port 2A"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2B: device_identification_number_str = "Port 2B"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2C: device_identification_number_str = "Port 2C"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_2D: device_identification_number_str = "Port 2D"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3A_IN_PCIE_MODE: device_identification_number_str = "Port 3A in PCIe Mode"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3B: device_identification_number_str = "Port 3B"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3C: device_identification_number_str = "Port 3C"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_PORT_3D: device_identification_number_str = "Port 3D"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_DEVICE_IDENTIFICATION_NUMBER_IIO_NTB_SECONDARY_ENDPOINT: device_identification_number_str = "IIO NTB Secondary Endpoint"; break; default: device_identification_number_str = "Unknown"; break; } switch (error_code) { case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVER_ERROR: error_code_str = "Receiver Error"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_BAD_TLP: error_code_str = "Bad TLP"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_BAD_DLLP: error_code_str = "Bad DLPP"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_REPLAY_TIMEOUT: error_code_str = "Replay Time-out"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_REPLAY_NUMBER_ROLLOVER: error_code_str = "Replay Number Rollover"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_ADVISORY_NON_FATAL_ERROR: error_code_str = "Advisory Non-fatal Error"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_COR_MESSAGE_FROM_DOWNSTREAM_DEVICE: error_code_str = "Received ERR_COR message from downstream device"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_LINK_BANDWIDTH_CHANGED: error_code_str = "PCI Express Link Bandwidth changed"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_UNSUPPORTED_REQUEST_COMPLETION_STATUS_FROM_DOWNSTREAM_DEVICE: error_code_str = "Received \"Unsupported Request\" completion status from downstream device."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SENT_A_PCI_EXPRESS_UNSUPPORTED_REQUEST_RESPOND_ON_INBOUND_REQUEST: error_code_str = "Sent a PCI Express \"Unsupported Request\" respond on inbound request for address decode, request type, or other reason."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_COMPLETER_ABORT_COMPLETION_STATUS_FROM_DOWNSTREAM_DEVICE: error_code_str = "Received \"Completer Abort\" completion status from downstream device."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SENT_A_PCI_EXPRESS_COMPLETER_ABORT_CONDITION_ON_INBOUND_REQUEST: error_code_str = "Sent a PCI Express \"Completer Abort\" condition on inbound request for address decode, request type, or other reason."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_COMPLETION_TIMEOUT_ON_NP_TRANSACTION_OUTSTANDING_ON_PCI_EXPRESS_DMI: error_code_str = "Completion timeout on NP transaction outstanding on PCI Express/DMI."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_PCI_EXPRESS_POISONED_TLP: error_code_str = "Received PCI Express Poisoned TLP."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_PCI_EXPRESS_UNEXPECTED_COMPLETION: error_code_str = "Received PCI Express unexpected Completion."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_FLOW_CONTROL_PROTOCOL_ERROR: error_code_str = "PCI Express Flow Control Protocol Error."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_NONFATAL_MESSAGE_FROM_DOWNSTREAM_DEVICE: error_code_str = "Received ERR_NONFATAL Message from downstream device."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_A_REQUEST_FROM_A_DOWNSTREAM_COMPONENT_THAT_IS_UNSUPPORTED: error_code_str = "Received a Request from a downstream component that is unsupported."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_A_REQUEST_FROM_A_DOWNSTREAM_COMPONENT_THAT_IS_TO_BE_COMPLETER_ABORTED: error_code_str = "Received a Request from a downstream component that is to be completer aborted."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_ACS_VIOLATION: error_code_str = "ACS Violation"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_MALFORMED_TLP: error_code_str = "PCI Express Malformed TLP"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_DATA_LINK_PROTOCOL_ERROR: error_code_str = "PCI Express Data Link Protocol Error"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_PCI_EXPRESS_RECEIVER_OVERFLOW: error_code_str = "PCI Express Receiver Overflow"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_SURPRISE_DOWN: error_code_str = "Surprise Down"; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_RECEIVED_ERR_FATAL_MESSAGE_FROM_DOWNSTREAM_DEVICE: error_code_str = "Received ERR_FATAL message from downstream device."; break; case IPMI_SEL_OEM_INTEL_WINDMILL_ERROR_CODE_OUTBOUND_SWITCH_HEADER_QUEUE_PARITY_ERROR: error_code_str = "Outbound switch header queue partiy error"; break; default: error_code_str = "Unknown"; break; } if (sel_string_snprintf (buf, buflen, wlen, "Devie ID = %u, Device Identification Number = %s, Error = %s", device_id, device_identification_number_str, error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_intel_windmill = { NULL, sel_string_output_intel_windmill_event_data1_class_sensor_specific_discrete, NULL, NULL, sel_string_output_intel_windmill_event_data2_discrete_oem, sel_string_output_intel_windmill_event_data2_class_oem, NULL, sel_string_output_intel_windmill_event_data3_discrete_oem, sel_string_output_intel_windmill_event_data3_class_oem, sel_string_output_intel_windmill_event_data2_event_data3, sel_string_output_intel_windmill_oem_record_data, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-e52600v3-common.c0000644002055400205540000037062213527331637025226 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-intel-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-intel-e52600v3-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define INTEL_EVENT_BUFFER_LENGTH 4096 int sel_string_output_intel_e52600v3_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((nmret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_e52600v3_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((nmret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_INTEL_QUICK_PATH_INTERFACE_LINK_WIDTH_REDUCED && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_LINK_WIDTH_REDUCED) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_FATAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICKPATH_INTERFACE_FATAL_ERROR2 && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR_2) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_BIOS_RECOVERY && (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_START || system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_FINISH)) || (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_FIRMWARE_UPDATE_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_FIRMWARE_UPDATE_STATUS_SENSOR) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR2 && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_CORRECTABLE_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS) || (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_IERR_RECOVERY_DUMP_INFO && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO)) { int ret; ret = ipmi_get_oem_specific_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->event_type_code, system_event_record_data->sensor_type, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_CORRECTABLE_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_CORRECTABLE_ERROR) { snprintf (tmpbuf, tmpbuflen, "QPI Correctable Error Event = %02Xh", system_event_record_data->offset_from_event_reading_type_code); return (1); } return (0); } static void _sel_string_output_intel_e52600v3_pci_bus (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); snprintf (tmpbuf, tmpbuflen, "PCI Bus Number %u", system_event_record_data->event_data2); } static const char * _sel_string_output_intel_e52600v3_ras_mode (uint8_t event_data) { uint8_t ras_mode; char *ras_mode_str; ras_mode = (event_data & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_BITMASK); ras_mode >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_SHIFT; switch (ras_mode) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_NONE: ras_mode_str = "None (Independent Channel Mode)"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_MIRRORING: ras_mode_str = "Mirroring Mode"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_LOCKSTEP: ras_mode_str = "Lockstep Mode"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OR_EVENT_DATA3_OEM_INTEL_E52600V3_RAS_MODE_RANK_SPARING: ras_mode_str = "Rank Sparing Mode"; break; default: ras_mode_str = "Unknown"; } return (ras_mode_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_e52600v3_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY1_STATUS || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_POWER_SUPPLY2_STATUS) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC) { if (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED) { char *power_supply_status_str; switch (system_event_record_data->event_data2) { case IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_VOLTAGE_FAULT: power_supply_status_str = "Output voltage fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_POWER_FAULT: power_supply_status_str = "Output power fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_OVER_CURRENT_FAULT: power_supply_status_str = "Output over-current fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_OVER_TEMPERATURE_FAULT: power_supply_status_str = "Over-temperature fault"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED_EVENT_DATA2_OEM_INTEL_E52600V3_FAN_FAULT: power_supply_status_str = "Fan fault"; break; default: power_supply_status_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "%s", power_supply_status_str); return (1); } if (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE) { char *power_supply_status_str; switch (system_event_record_data->event_data2) { case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_VOLTAGE_WARNING: power_supply_status_str = "Output voltage warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_POWER_WARNING: power_supply_status_str = "Output power warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OUTPUT_OVER_CURRENT_WARNING: power_supply_status_str = "Output over-current warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_OVER_TEMPERATURE_WARNING: power_supply_status_str = "Over-temperature warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_FAN_WARNING: power_supply_status_str = "Fan warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_UNDER_VOLTAGE_WARNING: power_supply_status_str = "Input under-voltage warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_OVER_CURRENT_WARNING: power_supply_status_str = "Input over-current warning"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_PREDICTIVE_FAILURE_EVENT_DATA2_OEM_INTEL_E52600V3_INPUT_OVER_POWER_WARNING: power_supply_status_str = "Input over-power warning"; break; default: power_supply_status_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "%s", power_supply_status_str); return (1); } if (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR) { char *power_supply_status_str; switch (system_event_record_data->event_data2) { case IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_BMC_CANNOT_ACCESS_PMBUS: power_supply_status_str = "The BMC cannot access the PMBus device on the PSU but its FRU device is responding"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PMBUS_REVISION_NOT_SUPPORTED: power_supply_status_str = "The PMBUS_REVISION command returns a version number that is not supported"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PMBUS_REVISION_ERROR: power_supply_status_str = "The PMBus device does not successfully respond to the PMBUS_REVISION command"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PSU_INCOMPATIBLE: power_supply_status_str = "ThE PSU is incompatible with one or more PSUs that are present in the system"; break; case IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR_EVENT_DATA2_OEM_INTEL_E52600V3_PSU_FW_DEGRADED: power_supply_status_str = "The PSU FW is operating in a degraded mode (likely due to a failed firmware update)"; break; default: power_supply_status_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "%s", power_supply_status_str); return (1); } } /* Document "System Event Log Troubleshooting Guide for PCSD Platforms Based on Intel Xeon Processor E5 2600 V3 Product Families" * * says 90h = SSB Thermal Trip * * But SSB Thermal Trip is 0x0D while 0x90 is VRD Over Temperature * * Given context, I believe it is VRD Over Temperature */ if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_VRD_OVER_TEMPERATURE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_LIMIT_EXCEEDED) { char cpu_bitmask_str[INTEL_EVENT_BUFFER_LENGTH + 1]; uint8_t cpu_bitmask; unsigned int wlen = 0; memset (cpu_bitmask_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); cpu_bitmask = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_BITMASK); cpu_bitmask >>= IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_SHIFT; if (cpu_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU1) { if (sel_string_strcat_comma_separate (cpu_bitmask_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU1")) return (1); } if (cpu_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU2) { if (sel_string_strcat_comma_separate (cpu_bitmask_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU2")) return (1); } if (cpu_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU3) { if (sel_string_strcat_comma_separate (cpu_bitmask_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU3")) return (1); } if (cpu_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA2_OEM_INTEL_E52600V3_PROCESSOR_VRD_HOT_BITMAP_CPU4) { if (sel_string_strcat_comma_separate (cpu_bitmask_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU4")) return (1); } snprintf (tmpbuf, tmpbuflen, "CPU = %s", cpu_bitmask_str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_STATUS || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_STATUS || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_STATUS || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_STATUS) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_THERMAL_TRIP) { char *str; switch (system_event_record_data->event_data2) { case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_THERMAL_TRIP_OEM_INTEL_E52600V3_CPU_NON_RECOVERABLE_OVER_TEMP_CONDITION: str = "CPU non-recoverable over-temp condition"; break; case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_THERMAL_TRIP_OEM_INTEL_E52600V3_CPU_BOOT_FIVR_FAULT: str = "CPU boot FIVR fault"; break; default: str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_INTERNAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED) { char *str; switch (system_event_record_data->event_data2) { case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_UNKNOWN: str = "Unknown"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CATERR: str = "CATERR"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_CORE_ERROR: str = "CPU Core Error"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_MSID_MISMATCH: str = "MSID Mismatch"; break; default: str = "Unknown OEM code"; /* to differentiate from above */ break; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR_ERR2_TIMEOUT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED) { uint8_t cpu_bitmask; char *str; cpu_bitmask = (system_event_record_data->event_data2 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_BITMASK); cpu_bitmask >>= IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_SHIFT; switch (cpu_bitmask) { case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU1: str = "CPU1"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU2: str = "CPU2"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU3: str = "CPU3"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU4: str = "CPU4"; break; default: str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_CONFIGURATION_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { uint8_t config_error; char *config_error_str; config_error = (system_event_record_data->event_data2 & IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_BITMASK); config_error >>= IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_SHIFT; switch (config_error) { case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_NONE: config_error_str = "None"; break; case IPMI_SENSOR_MEMORY_DEVICE_ENABLED_EVENT_DATA2_OEM_INTEL_E52600V3_CONFIG_ERROR_INVALID_DIMM_CONFIGURATION_FOR_RAS_MODE: config_error_str = "Invalid DIMM Configuration for RAS Mode"; break; default: config_error_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Config Error = %s", config_error_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_MODE_SELECT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_e52600v3_ras_mode (system_event_record_data->event_data2); snprintf (tmpbuf, tmpbuflen, "Prior RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_LEGACY_PCI_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_e52600v3_pci_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MIRRORING_REDUNDANCY_STATE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t mirroring_domain, rank_on_dimm; char *mirroring_domain_str; mirroring_domain = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_BITMASK); mirroring_domain >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_SHIFT; rank_on_dimm = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_BITMASK); rank_on_dimm >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_SHIFT; switch (mirroring_domain) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_0: mirroring_domain_str = "0"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_MIRRORING_DOMAIN_1: mirroring_domain_str = "1"; break; default: mirroring_domain_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Mirroring Domain = %s, Rank on DIMM = %u", mirroring_domain_str, rank_on_dimm); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_SPARING_REDUNDANCY_STATE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { uint8_t sparing_domain, rank_on_dimm; char *sparing_domain_str; sparing_domain = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_BITMASK); sparing_domain >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_SHIFT; rank_on_dimm = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_BITMASK); rank_on_dimm >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_SHIFT; switch (sparing_domain) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_A: sparing_domain_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_B: sparing_domain_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_C: sparing_domain_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_SPARING_DOMAIN_D: sparing_domain_str = "D"; break; default: sparing_domain_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Sparing Domain = %s, Rank on DIMM = %u", sparing_domain_str, rank_on_dimm); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MEMORY_ECC_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { uint8_t rank_on_dimm; rank_on_dimm = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_BITMASK); rank_on_dimm >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_RANK_ON_DIMM_SHIFT; snprintf (tmpbuf, tmpbuflen, "Rank on DIMM = %u", rank_on_dimm); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_e52600v3_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((nmret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_INTEL_QUICK_PATH_INTERFACE_LINK_WIDTH_REDUCED && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_LINK_WIDTH_REDUCED) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_CORRECTABLE_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_CORRECTABLE_ERROR) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICK_PATH_INTERFACE_FATAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_INTEL_QUICKPATH_INTERFACE_FATAL_ERROR2 && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR_2)) { uint8_t cpu; char *cpu_str; cpu = system_event_record_data->event_data2; switch (cpu) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_1: cpu_str = "1"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_2: cpu_str = "2"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_3: cpu_str = "3"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_INTEL_E52600V3_CPU_4: cpu_str = "4"; break; default: cpu_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "CPU = %s", cpu_str); return (1); } /* achu: In document technically unclear if this */ if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_FIRMWARE_UPDATE_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_FIRMWARE_UPDATE_STATUS_SENSOR) { uint8_t target_of_update; uint8_t target_instance; char *target_of_update_str; target_of_update = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BITMASK); target_of_update >>= IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_SHIFT; target_instance = (system_event_record_data->event_data2 & IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_INSTANCE_BITMASK); target_instance >>= IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_INSTANCE_SHIFT; switch (target_of_update) { case IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BMC: target_of_update_str = "BMC"; break; case IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_BIOS: target_of_update_str = "BIOS"; break; case IPMI_OEM_INTEL_E52600V3_SPECIFIC_FIRMWARE_UPDATE_STATUS_SENSOR_EVENT_DATA2_TARGET_OF_UPDATE_ME: target_of_update_str = "ME"; break; default: target_of_update_str = "Unknown"; } snprintf (tmpbuf, tmpbuflen, "Target of update = %s, Instance = %u", target_of_update_str, target_instance); return (1); } if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR2 && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_CORRECTABLE_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS)) { _sel_string_output_intel_e52600v3_pci_bus (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_IERR_RECOVERY_DUMP_INFO && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO && system_event_record_data->offset_from_event_reading_type_code == IPMI_OEM_INTEL_E52600V3_SPECIFIC_IERR_RECOVERY_DUMP_INFO_DUMP_FAILED) { char failed_register_type_str[INTEL_EVENT_BUFFER_LENGTH + 1]; uint8_t failed_register_type; unsigned int wlen = 0; memset (failed_register_type_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); failed_register_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_BITMASK); failed_register_type >>= IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_SHIFT; if (failed_register_type & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_UNCORE_MSR_REGISTER) { if (sel_string_strcat_comma_separate (failed_register_type_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "Uncore MSR register")) return (1); } if (failed_register_type & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_CORE_MSR_REGISTERS) { if (sel_string_strcat_comma_separate (failed_register_type_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "Core MSR registers")) return (1); } if (failed_register_type & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_IIO_REGISTER) { if (sel_string_strcat_comma_separate (failed_register_type_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "IIO register")) return (1); } if (failed_register_type & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_PCI_CONFIG_SPACE) { if (sel_string_strcat_comma_separate (failed_register_type_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "PCI config space")) return (1); } if (failed_register_type & IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO_EVENT_DATA2_FAILED_REGISTER_TYPE_MCA_ERROR_SOURCE_REGISTER) { if (sel_string_strcat_comma_separate (failed_register_type_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "MCA error source register")) return (1); } snprintf (tmpbuf, tmpbuflen, "Failed register = %s", failed_register_type_str); return (1); } return (0); } static void _sel_string_output_intel_e52600v3_pci_device_function (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data) { uint8_t pci_device, pci_function; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); pci_device = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_DEVICE_NUMBER_BITMASK); pci_device >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_DEVICE_NUMBER_SHIFT; pci_function = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_FUNCTION_NUMBER_BITMASK); pci_function >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA3_OEM_INTEL_E52600V3_PCI_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "PCI_Device number %u, PCI Function number %u", pci_device, pci_function); } static void _sel_string_output_intel_e52600v3_memory_dimm (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, struct ipmi_sel_system_event_record_data *system_event_record_data, int channel_valid, int dimm_valid) { uint8_t socket_id, channel, dimm; char *socket_id_str, *channel_str, *dimm_str; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_SHIFT; switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU1: socket_id_str = "1"; if (channel_valid) { switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_A: channel_str = "A"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_B: channel_str = "B"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_C: channel_str = "C"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_D: channel_str = "D"; break; default: channel_str = "Unknown"; } } else channel_str = "Indeterminate"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU2: socket_id_str = "2"; if (channel_valid) { switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_E: channel_str = "E"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_F: channel_str = "F"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_G: channel_str = "G"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_H: channel_str = "H"; break; default: channel_str = "Unknown"; } } else channel_str = "Indeterminate"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU3: socket_id_str = "3"; if (channel_valid) { switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_J: channel_str = "J"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_K: channel_str = "K"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_L: channel_str = "L"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_M: channel_str = "M"; break; default: channel_str = "Unknown"; } } else channel_str = "Indeterminate"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_SOCKET_ID_CPU4: socket_id_str = "4"; if (channel_valid) { switch (channel) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_N: channel_str = "N"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_P: channel_str = "P"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_R: channel_str = "R"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_CHANNEL_T: channel_str = "T"; break; default: channel_str = "Unknown"; } } else channel_str = "Indeterminate"; break; default: socket_id_str = "Unknown"; channel_str = "Unknown"; } if (dimm_valid) { switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_1: dimm_str = "1"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_2: dimm_str = "2"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA3_DIMM_3: dimm_str = "3"; break; default: dimm_str = "Unknown"; } } else dimm_str = "Indeterminate"; snprintf (tmpbuf, tmpbuflen, "Socket CPU %s, Channel %s, DIMM %s", socket_id_str, channel_str, dimm_str); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_e52600v3_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((nmret = sel_string_output_intel_node_manager_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); /* Document "System Event Log Troubleshooting Guide for PCSD Platforms Based on Intel Xeon Processor E5 2600 V3 Product Families" * * says 90h = SSB Thermal Trip * * But SSB Thermal Trip is 0x0D while 0x90 is VRD Over Temperature * * Given context, I believe it is VRD Over Temperature */ if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_TEMPERATURE && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_VRD_OVER_TEMPERATURE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_LIMIT_EXCEEDED) { char memory_str[INTEL_EVENT_BUFFER_LENGTH + 1]; uint8_t memory_bitmask; unsigned int wlen = 0; memset (memory_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); memory_bitmask = system_event_record_data->event_data3; if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU1_DIMM_CHANNEL_1_2) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU1 - DIMM Channel 1/2")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU1_DIMM_CHANNEL_3_4) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU1 - DIMM Channel 3/4")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU2_DIMM_CHANNEL_1_2) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU2 - DIMM Channel 1/2")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU2_DIMM_CHANNEL_3_4) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU2 - DIMM Channel 3/4")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU3_DIMM_CHANNEL_1_2) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU3 - DIMM Channel 1/2")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU3_DIMM_CHANNEL_3_4) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU3 - DIMM Channel 3/4")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU4_DIMM_CHANNEL_1_2) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU4 - DIMM Channel 1/2")) return (1); } if (memory_bitmask & IPMI_SENSOR_TYPE_TEMPERATURE_EVENT_DATA3_OEM_INTEL_E52600V3_MEMORY_VRD_HOT_BITMAP_CPU4_DIMM_CHANNEL_3_4) { if (sel_string_strcat_comma_separate (memory_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU4 - DIMM Channel 3/4")) return (1); } snprintf (tmpbuf, tmpbuflen, "Memory = %s", memory_str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR1_THERMAL_TRIP || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR2_THERMAL_TRIP || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR3_THERMAL_TRIP || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_PROCESSOR4_THERMAL_TRIP) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CRITICAL_OVERTEMPERATURE) { uint8_t socket_id; uint8_t channel; uint8_t dimm; char *cpu_str; char channel_char; char *dimm_str; socket_id = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_BITMASK); socket_id >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_SHIFT; channel = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_CHANNEL_BITMASK); channel >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_CHANNEL_SHIFT; dimm = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_SHIFT; switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU1: cpu_str = "CPU1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU2: cpu_str = "CPU2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU3: cpu_str = "CPU3"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU4: cpu_str = "CPU4"; break; default: cpu_str = "Unknown"; break; } /* channel 0-3 maps to A-D for CPU1, E-H for CPU2, J-M for CPU3, N, P, R, T for CPU4 */ switch (socket_id) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU1: channel_char = 'A' + channel; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU2: channel_char = 'E' + channel; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU3: channel_char = 'J' + channel; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_SOCKET_ID_CPU4: /* For some reason it skips chars around here */ channel_char = 'N' + channel * 2; break; default: channel_char = '?'; break; } switch (dimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_1: dimm_str = "Dimm 1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_2: dimm_str = "Dimm 2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INTEL_E52600V3_DIMM_3: dimm_str = "Dimm 3"; break; default: dimm_str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "CPU = %s, Channel = %c, Dimm = %s", cpu_str, channel_char, dimm_str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_INTERNAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED && system_event_record_data->event_data2 == IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CATERR) { char cpu_str[INTEL_EVENT_BUFFER_LENGTH + 1]; unsigned int wlen = 0; memset (cpu_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); if (system_event_record_data->event_data3 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU1) { if (sel_string_strcat_comma_separate (cpu_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU1")) return (1); } if (system_event_record_data->event_data3 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU2) { if (sel_string_strcat_comma_separate (cpu_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU2")) return (1); } if (system_event_record_data->event_data3 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU3) { if (sel_string_strcat_comma_separate (cpu_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU3")) return (1); } if (system_event_record_data->event_data3 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_PROCESSOR_EVENT_DATA2_OEM_INTEL_E52600V3_CPU4) { if (sel_string_strcat_comma_separate (cpu_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "CPU4")) return (1); } if (!strlen (cpu_str)) { if (sel_string_strcat_comma_separate (cpu_str, INTEL_EVENT_BUFFER_LENGTH, &wlen, "Unknown CPU")) return (1); } snprintf (tmpbuf, tmpbuflen, "%s caused CATERR", cpu_str); return (1); } if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_AUTO_CONFIG_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE && system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED) { uint8_t auto_config_error_bitmask; char *str; auto_config_error_bitmask = (system_event_record_data->event_data3 & IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_BITMASK); auto_config_error_bitmask >>= IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SHIFT; switch (auto_config_error_bitmask) { case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_CFG_SYNTAX_ERROR: str = "CFG syntax error"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_CHASSIS_AUTO_DETECT_ERROR: str = "Chassis auto-detect error"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_CFG_FILE_MISMATCH: str = "SDR/CFG file mismatch"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_OR_CFG_FILE_CORRUPTED: str = "SDR or CFG file corrupted"; break; case IPMI_GENERIC_EVENT_READING_TYPE_CODE_STATE_ASSERTED_MANAGEMENT_HEALTH_AUTO_CONFIG_ERROR_EVENT_DATA3_OEM_INTEL_E52600V3_SDR_SYNTAX_ERROR: str = "SDR syntax error"; break; default: str = "Unknown"; break; } snprintf (tmpbuf, tmpbuflen, "Auto Config Error = %s", str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_CONFIGURATION_STATUS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_e52600v3_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "RAS Mode Configured = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_MEMORY_RAS_MODE_SELECT && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_DEVICE_ENABLED_DEVICE_ENABLED)) { const char *ras_mode_str; ras_mode_str = _sel_string_output_intel_e52600v3_ras_mode (system_event_record_data->event_data3); snprintf (tmpbuf, tmpbuflen, "Selected RAS Mode = %s", ras_mode_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_LEGACY_PCI_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR)) { _sel_string_output_intel_e52600v3_pci_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MIRRORING_REDUNDANCY_STATE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { _sel_string_output_intel_e52600v3_memory_dimm (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data, 1, 1); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_SPARING_REDUNDANCY_STATE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_FULLY_REDUNDANT || system_event_record_data->offset_from_event_reading_type_code == IPMI_GENERIC_EVENT_READING_TYPE_CODE_REDUNDANCY_REDUNDANCY_DEGRADED)) { _sel_string_output_intel_e52600v3_memory_dimm (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data, 1, 1); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MEMORY_ECC_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR)) { _sel_string_output_intel_e52600v3_memory_dimm (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data, 1, 1); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_e52600v3_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((nmret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); if ((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_FATAL_ERROR2 && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_PCI_EXPRESS_CORRECTABLE_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS)) { _sel_string_output_intel_e52600v3_pci_device_function (ctx, tmpbuf, tmpbuflen, flags, system_event_record_data); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_e52600v3_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_POST && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_POST_POST_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SYSTEM_RTC_DATE_TIME_NOT_SET: error_code_str = "System RTC date/time not set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORD_CHECK_FAILED: error_code_str = "Password check failed"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_RESOURCE_CONFLICT: error_code_str = "PCI resource conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_OUT_OF_RESOURCES_ERROR: error_code_str = "PCI out of resources error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_CORE_THREAD_COUNT_MISMATCH_DETECTED: error_code_str = "Processor core/thread count mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_CACHE_SIZE_MISMATCH_DETECTED: error_code_str = "Processor cache size mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_FAMILY_MISMATCH_DETECTED: error_code_str = "Processor family mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_INTEL_QPI_LINK_FREQUENCIES_UNABLE_TO_SYNCHRONIZE: error_code_str = "Processor Intel(R) QPI link frequencies unable to synchronize"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_MODEL_MISMATCH_DETECTED: error_code_str = "Processor model mismatch detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_FREQUENCIES_UNABLE_TO_SYNCHRONIZE: error_code_str = "Processor frequencies unable to synchronize"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_SETTINGS_RESET_TO_DEFAULT_SETTINGS: error_code_str = "BIOS Settings reset to default settings"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORDS_CLEARED_BY_JUMPER: error_code_str = "Passwords cleared by jumper"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PASSWORD_CLEAR_JUMPER_IS_SET: error_code_str = "Password clear jumper is set"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_DISABLED: error_code_str = "Processor 01 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_DISABLED: error_code_str = "Processor 02 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_DISABLED: error_code_str = "Processor 03 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_DISABLED: error_code_str = "Processor 04 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 01 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 02 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 03 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_UNABLE_TO_APPLY_MICROCODE_UPDATE: error_code_str = "Processor 04 unable to apply microcode update"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_FAILED_SELF_TEST_BIST: error_code_str = "Processor 01 failed Self Test (BIST) "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_FAILED_SELF_TEST_BIST: error_code_str = "Processor 02 failed Self Test (BIST) "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_FAILED_SELF_TEST_BIST: error_code_str = "Processor 03 failed Self Test (BIST) "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_FAILED_SELF_TEST_BIST: error_code_str = "Processor 04 failed Self Test (BIST) "; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_01_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 01 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_02_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 02 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_03_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 03 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PROCESSOR_04_MICROCODE_UPDATE_NOT_FOUND: error_code_str = "Processor 04 microcode update not found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_WATCHDOG_TIMER_FAILED_ON_LAST_BOOT: error_code_str = "Watchdog timer failed on last boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_OS_BOOT_WATCHDOG_TIMER_FAILURE: error_code_str = "OS boot watchdog timer failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_SELF_TEST: error_code_str = "Baseboard management controller failed self-test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_HOT_SWAP_CONTROLLER_FAILURE: error_code_str = "Hot-Swap Controller failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MANAGEMENT_ENGINE_ME_FAILED_SELF_TEST: error_code_str = "Management Engine (ME) failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MANAGEMENT_ME_FAILED_TO_RESPOND: error_code_str = "Management Engine (ME) Failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_FAILED_TO_RESPOND: error_code_str = "Baseboard management controller failed to respond"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BASEBOARD_MANAGEMENT_CONTROLLER_IN_UPDATE_MODE: error_code_str = "Baseboard management controller in update mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SENSOR_DATA_RECORD_EMPTY: error_code_str = "Sensor data record empty"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SYSTEM_EVENT_LOG_FULL: error_code_str = "System event log full"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_MEMORY_COMPONENT_COULD_NOT_BE_CONFIGURED_IN_THE_SELECTED_RAS_MODE: error_code_str = "Memory component could not be configured in the selected RAS mode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_POPULATION_ERROR: error_code_str = "DIMM Population Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_A1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_A2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_A3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_B1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_B2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_B3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_C1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_C2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_C3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_D1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_D2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_D3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_E1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_E2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_E3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_F1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_F2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_F3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_G1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_G2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_G3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_H1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_H2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_H3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_J1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_J2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_J3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_K1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_K2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_K3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_L1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_L2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_L3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_M1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_M2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_M3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_N1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_N2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_N3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_P1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_P2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_P3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_R1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_R2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_R3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_T1 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_T2 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_FAILED_SELF_TEST_INITIALIZATION: error_code_str = "DIMM_T3 failed test/initialization"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_DISABLED: error_code_str = "DIMM_A1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_DISABLED: error_code_str = "DIMM_A2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_DISABLED: error_code_str = "DIMM_A3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_DISABLED: error_code_str = "DIMM_B1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_DISABLED: error_code_str = "DIMM_B2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_DISABLED: error_code_str = "DIMM_B3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_DISABLED: error_code_str = "DIMM_C1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_DISABLED: error_code_str = "DIMM_C2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_DISABLED: error_code_str = "DIMM_C3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_DISABLED: error_code_str = "DIMM_D1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_DISABLED: error_code_str = "DIMM_D2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_DISABLED: error_code_str = "DIMM_D3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_DISABLED: error_code_str = "DIMM_E1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_DISABLED: error_code_str = "DIMM_E2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_DISABLED: error_code_str = "DIMM_E3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_DISABLED: error_code_str = "DIMM_F1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_DISABLED: error_code_str = "DIMM_F2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_DISABLED: error_code_str = "DIMM_F3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_DISABLED: error_code_str = "DIMM_G1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_DISABLED: error_code_str = "DIMM_G2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_DISABLED: error_code_str = "DIMM_G3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_DISABLED: error_code_str = "DIMM_H1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_DISABLED: error_code_str = "DIMM_H2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_DISABLED: error_code_str = "DIMM_H3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_DISABLED: error_code_str = "DIMM_J1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_DISABLED: error_code_str = "DIMM_J2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_DISABLED: error_code_str = "DIMM_J3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_DISABLED: error_code_str = "DIMM_K1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_DISABLED: error_code_str = "DIMM_K2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_DISABLED: error_code_str = "DIMM_K3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_DISABLED: error_code_str = "DIMM_L1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_DISABLED: error_code_str = "DIMM_L2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_DISABLED: error_code_str = "DIMM_L3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_DISABLED: error_code_str = "DIMM_M1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_DISABLED: error_code_str = "DIMM_M2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_DISABLED: error_code_str = "DIMM_M3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_DISABLED: error_code_str = "DIMM_N1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_DISABLED: error_code_str = "DIMM_N2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_DISABLED: error_code_str = "DIMM_N3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_DISABLED: error_code_str = "DIMM_P1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_DISABLED: error_code_str = "DIMM_P2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_DISABLED: error_code_str = "DIMM_P3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_DISABLED: error_code_str = "DIMM_R1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_DISABLED: error_code_str = "DIMM_R2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_DISABLED: error_code_str = "DIMM_R3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_DISABLED: error_code_str = "DIMM_T1 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_DISABLED: error_code_str = "DIMM_T2 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_DISABLED: error_code_str = "DIMM_T3 disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_A1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_A2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_A3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_A3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_B1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_B2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_B3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_B3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_C1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_C2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_C3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_C3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_D1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_D2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_D3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_D3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_E1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_E2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_E3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_E3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_F1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_F2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_F3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_F3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_G1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_G2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_G3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_G3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_H1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_H2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_H3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_H3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_J1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_J2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_J3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_J3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_K1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_K2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_K3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_K3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_L1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_L2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_L3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_L3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_M1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_M2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_M3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_M3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_N1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_N2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_N3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_N3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_P1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_P2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_P3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_P3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_R1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_R2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_R3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_R3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T1_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_T1 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T2_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_T2 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DIMM_T3_ENCOUNTERED_A_SERIAL_PRESENCE_DETECTION_FAILURED: error_code_str = "DIMM_T3 encountered a Serial Presence Detection (SPD) failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_POST_RECLAIM_OF_NON_CRITICAL_VARIABLES: error_code_str = "POST Reclaim of non-critical variables"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_SETTINGS_ARE_CORRUPTED: error_code_str = "BIOS Settings are corrupted"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_NVRAM_VARIABLE_SPACE_WAS_CORRUPTED_AND_HAS_BEEN_REINITIALIZED: error_code_str = "NVRAM variable space was corrupted and has been reinitialized"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_WAS_NOT_DETECTED: error_code_str = "Serial port component was not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_SERIAL_PORT_COMPONENT_ENCOUNTERED_A_RESOURCE_CONFLICT_ERROR: error_code_str = "Serial port component encountered a resource conflict error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_NOT_DETECTED: error_code_str = "TPM device not detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_MISSING_OR_NOT_RESPONDING: error_code_str = "TPM device missing or not responding"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_FAILURE: error_code_str = "TPM device failure"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_TPM_DEVICE_FAILED_SELF_TEST: error_code_str = "TPM device failed self test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_BIOS_ACM_ERROR: error_code_str = "BIOS ACM Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_PERR_ERROR: error_code_str = "PCI Express component encountered a PERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_PCI_EXPRESS_COMPONENT_ENCOUNTERED_A_SERR_ERROR: error_code_str = "PCI Express component encountered a SERR error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INTEL_E52600V3_POST_ERROR_CODE_DXE_BOOT_SERVICES_DRIVER_NOT_ENOUGH_MEMORY_AVAILABLE_TO_SHADOW_A_LEGACY_OPTION_ROM: error_code_str = "DXE boot services driver Not enough memory available to shadow a legacy option ROM"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } /* achu: Documentation states only * IPMI_SENSOR_TYPE_MEMORY_MEMORY_SCRUB_FAILED, but I think * that's a typo. It should be IPMI_SENSOR_TYPE_MEMORY_PARITY. * Gonna check for both */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INTEL_E52600V3_BIOS_SMI_HANDLER && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_BIOS_SMI_MEMORY_PARITY_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_MEMORY_SCRUB_FAILED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY) && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint8_t channel_information_validity_check, dimm_information_validity_check, error_type; char *error_type_str; char dimm_str[INTEL_EVENT_BUFFER_LENGTH + 1]; memset (dimm_str, '\0', INTEL_EVENT_BUFFER_LENGTH + 1); channel_information_validity_check = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_BITMASK); channel_information_validity_check >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_CHANNEL_INFORMATON_VALIDITY_CHECK_SHIFT; dimm_information_validity_check = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_BITMASK); dimm_information_validity_check >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_DIMM_INFORMATON_VALIDITY_CHECK_SHIFT; error_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_BITMASK); error_type >>= IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_SHIFT; switch (error_type) { case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_PARITY_ERROR_TYPE_NOT_KNOWN: error_type_str = "Parity Error Type not known"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_DATA_PARITY_ERROR: error_type_str = "Data Parity Error"; break; case IPMI_SENSOR_TYPE_MEMORY_OEM_INTEL_E52600V3_EVENT_DATA2_ERROR_TYPE_COMMAND_AND_ADDRESS_PARITY_ERROR: error_type_str = "Command and Address Parity Error"; break; default: error_type_str = "Unknown"; } _sel_string_output_intel_e52600v3_memory_dimm (ctx, dimm_str, INTEL_EVENT_BUFFER_LENGTH, flags, system_event_record_data, channel_information_validity_check, dimm_information_validity_check); if (sel_string_snprintf (buf, buflen, wlen, "Error Type = %s, %s", error_type_str, dimm_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-e52600v3-common.h0000644002055400205540000001545013527331637025226 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_INTEL_E52600V3_H #define IPMI_SEL_STRING_INTEL_E52600V3_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_intel_e52600v3_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); int sel_string_output_intel_e52600v3_event_data1_class_sensor_specific_discrete (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_intel_e52600v3_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); #endif /* IPMI_SEL_STRING_INTEL_E52600V3_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s2600kp.c0000644002055400205540000003665313527331637023756 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-intel-e52600v3-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" int sel_string_output_intel_s2600kp_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600kp_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600kp_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600kp_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600kp_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600kp_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s2600kp_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600KP); if ((ret = sel_string_output_intel_e52600v3_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_intel_s2600kp = { sel_string_output_intel_s2600kp_sensor_name, NULL, sel_string_output_intel_s2600kp_event_data1_class_oem, NULL, sel_string_output_intel_s2600kp_event_data2_discrete_oem, sel_string_output_intel_s2600kp_event_data2_class_oem, NULL, sel_string_output_intel_s2600kp_event_data3_discrete_oem, sel_string_output_intel_s2600kp_event_data3_class_oem, sel_string_output_intel_s2600kp_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s2600gz.c0000644002055400205540000003665313527331637023764 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-intel-e52600v3-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" int sel_string_output_intel_s2600gz_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600gz_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600gz_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600gz_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600gz_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600gz_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s2600gz_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ); if ((ret = sel_string_output_intel_e52600v3_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_intel_s2600gz = { sel_string_output_intel_s2600gz_sensor_name, NULL, sel_string_output_intel_s2600gz_event_data1_class_oem, NULL, sel_string_output_intel_s2600gz_event_data2_discrete_oem, sel_string_output_intel_s2600gz_event_data2_class_oem, NULL, sel_string_output_intel_s2600gz_event_data3_discrete_oem, sel_string_output_intel_s2600gz_event_data3_class_oem, sel_string_output_intel_s2600gz_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-intel-s2600wt-common.c0000644002055400205540000004047113527331637025255 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-intel-e52600v3-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" int sel_string_output_intel_s2600wt_common_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wt_common_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wt_common_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wt_common_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wt_common_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_intel_s2600wt_common_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_intel_s2600wt_common_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || ctx->product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT); if ((ret = sel_string_output_intel_e52600v3_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_intel_s2600wt_common = { sel_string_output_intel_s2600wt_common_sensor_name, NULL, sel_string_output_intel_s2600wt_common_event_data1_class_oem, NULL, sel_string_output_intel_s2600wt_common_event_data2_discrete_oem, sel_string_output_intel_s2600wt_common_event_data2_class_oem, NULL, sel_string_output_intel_s2600wt_common_event_data3_discrete_oem, sel_string_output_intel_s2600wt_common_event_data3_class_oem, sel_string_output_intel_s2600wt_common_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-inventec-common.c0000644002055400205540000011220513527331637024625 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-inventec-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5441_5442_common_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ if (((system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_OK) || (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_POST_ERROR_CODE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_ERROR_CODE) || (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_PORT80_CODE_EVENT))) { if (sel_string_snprintf (buf, buflen, wlen, "BIOS")) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if ((nmret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_5442_common_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * * achu note: There is no official "string" defining the event * from the vendor. "BMC enabled by BIOS" is simply what * occurs, so that's what I'm going to say. */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS && !system_event_record_data->offset_from_event_reading_type_code /* no event */ && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { snprintf (tmpbuf, tmpbuflen, "BMC enabled by BIOS"); return (1); } if ((nmret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_5442_common_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * * Note: Dell engineer commented the SBE Warning threshold is 15h SBE * events in a 4 hour window. SBE Critical Warning threshold is an * additional 15h SBE events in the 4 hour window. After another 15h * SBE events in the 4 hour window, event logging is diabled. It is * a rolling window. Once the logging limit is reached, a system * reboot is necessary to reset the counter. */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_SMI && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_MEMORY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED) && (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_WARNING_THRESHOLD || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_CRITICAL_THRESHOLD || system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_OTHER)) { /* achu: I'm assuming no output for this one */ if (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_OTHER) return (0); if (system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_WARNING_THRESHOLD) snprintf (tmpbuf, tmpbuflen, "SBE warning threshold"); else /* system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_INVENTEC_SBE_CRITICAL_THRESHOLD */ snprintf (tmpbuf, tmpbuflen, "SBE critical threshold"); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_5442_common_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS && !system_event_record_data->offset_from_event_reading_type_code /* no event */ && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { snprintf (tmpbuf, tmpbuflen, "BIOS Major Version %X", system_event_record_data->event_data2); return (1); } if ((nmret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_5442_common_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ if (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_BMC && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_PORT80_CODE_EVENT) { char *str = NULL; switch (system_event_record_data->event_data3) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_EXTENDED_MEMORY_TEST: str = "PORT80 Code Event = Extended Memory Test"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_SETUP_MENU: str = "PORT80 Code Event = Setup Menu"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_EVENT_DATA3_OEM_INVENTEC_PORT80_CODE_OPTION_ROM_SCAN: str = "PORT80 Code Event = Option ROM Scan"; break; default: snprintf (tmpbuf, tmpbuflen, "PORT80 Code Event = %02Xh", system_event_record_data->event_data3); } if (str) snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_5442_common_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START && !system_event_record_data->offset_from_event_reading_type_code /* no event */ && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { snprintf (tmpbuf, tmpbuflen, "BIOS Minor Version %02X", system_event_record_data->event_data3); return (1); } if ((nmret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5441_5442_common_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_POST_ERROR_CODE && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_ERROR_CODE && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_TIMER_COUNT_READ_WRITE_ERROR: error_code_str = "Timer Count Read/Write Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_MASTER_PIC_ERROR: error_code_str = "Master PIC Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_SLAVE_PIC_ERROR: error_code_str = "Slave PIC Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_BATTERY_ERROR: error_code_str = "CMOS Battery Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_DIAGNOSTIC_STATUS_ERROR: error_code_str = "CMOS Diagnostic Status Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_CHECKSUM_ERROR: error_code_str = "CMOS Checksum Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_CONFIG_ERROR: error_code_str = "CMOS Config Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KEYBOARD_LOCK_ERROR: error_code_str = "Keyboard Lock Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NO_KEYBOARD_ERROR: error_code_str = "No Keyboard Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KBC_BAT_TEST_ERROR: error_code_str = "KBC Bat Test Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_MEMORY_SIZE_ERROR: error_code_str = "CMOS Memory Size Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_RAM_READ_WRITE_TEST_ERROR: error_code_str = "RAM Read/Write Test Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FDD_0_ERROR: error_code_str = "FDD 0 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FLOPPY_CONTROLLER_ERROR: error_code_str = "Floppy Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CMOS_DATE_TIME_ERROR: error_code_str = "CMOS Date Time Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NO_PS2_MOUSE_ERROR: error_code_str = "No PS2 Mouse Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_REFRESH_TIMER_ERROR: error_code_str = "Refresh Timer Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DISPLAY_MEMORY_ERROR: error_code_str = "Display Memory Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_POST_THE_INS_KEY_ERROR: error_code_str = "Post the key Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC_PAGE_REGISTER_ERROR: error_code_str = "DMAC Page Register Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC1_CHANNEL_REGISTER_ERROR: error_code_str = "DMAC1 Channel Register Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DMAC2_CHANNEL_REGISTER_ERROR: error_code_str = "DMAC2 Channel Register Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PMM_MEMORY_ALLOCATION_ERROR: error_code_str = "PMM Memory Allocation Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PASSWORD_CHECK_ERROR: error_code_str = "Password Check Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ADM_MODULE_ERROR: error_code_str = "ADM Module Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_LANGUAGE_MODULE_ERROR: error_code_str = "Language Module Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_KBC_INTERFACE_ERROR: error_code_str = "KBC Interface Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_0_ERROR: error_code_str = "HDD 0 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_1_ERROR: error_code_str = "HDD 1 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_2_ERROR: error_code_str = "HDD 2 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_3_ERROR: error_code_str = "HDD 3 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_4_ERROR: error_code_str = "HDD 4 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_5_ERROR: error_code_str = "HDD 5 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_6_ERROR: error_code_str = "HDD 6 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_HDD_7_ERROR: error_code_str = "HDD 7 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_0_ERROR: error_code_str = "ATAPI 0 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_1_ERROR: error_code_str = "ATAPI 1 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_2_ERROR: error_code_str = "ATAPI 2 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_3_ERROR: error_code_str = "ATAPI 3 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_4_ERROR: error_code_str = "ATAPI 4 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_5_ERROR: error_code_str = "ATAPI 5 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_6_ERROR: error_code_str = "ATAPI 6 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATAPI_7_ERROR: error_code_str = "ATAPI 7 Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_ATA_SMART_FEATURE_ERROR: error_code_str = "ATA SMART Feature Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_NON_CRITICAL_PASSWORD_CHECK_ERROR: error_code_str = "Non-Critical Password Check Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_DUMMY_BIOS_ERROR: error_code_str = "Dummy BIOS Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_HC_NOT_FOUND: error_code_str = "USB HC Not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_DEVICE_INIT_ERROR: error_code_str = "USB Device Init Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_DEVICE_DISABLED: error_code_str = "USB Device Disabled"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_OHCI_EMUL_NOT_SUPPORTED: error_code_str = "USB OHCI EMUL Not Supported"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_USB_EHCI_64BIT_DATA_STRUCTURE_ERROR: error_code_str = "USB EHCI 64bit Data Structure Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_SMBIOS_NOT_ENOUGH_SPACE_IN_F000: error_code_str = "SMBIOS Not Enough Space In F000"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_AP_APPLICATION_PROCESSOR_FAILED_BIST: error_code_str = "AP (Application Processor) failed BIST"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU1_THERMAL_FAILURE_DUE_TO_PROCHOT: error_code_str = "CPU1 Thermal Failure due to PROCHOT#"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU2_THERMAL_FAILURE_DUE_TO_PROCHOT: error_code_str = "CPU2 Thermal Failure due to PROCHOT#"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU3_THERMAL_FAILURE_DUE_TO_PROCHOT: error_code_str = "CPU3 Thermal Failure due to PROCHOT#"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU4_THERMAL_FAILURE_DUE_TO_PROCHOT: error_code_str = "CPU4 Thermal Failure due to PROCHOT#"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PROCESSOR_FAILED_BIST_BSP: error_code_str = "Processor failed BIST (BSP)"; /* BSP = Baseboard Service Processor */ break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU1_PROCESSOR_MISSING_MICROCODE: error_code_str = "CPU1 Processor missing microcode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU2_PROCESSOR_MISSING_MICROCODE: error_code_str = "CPU2 Processor missing microcode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU3_PROCESSOR_MISSING_MICROCODE: error_code_str = "CPU3 Processor missing microcode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPU4_PROCESSOR_MISSING_MICROCODE: error_code_str = "CPU4 Processor missing microcode"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_L2_CACHE_SIZE_MISMATCH: error_code_str = "L2 cache size mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_STEPPING_ARE_DIFFERENT: error_code_str = "CPUID, Processor stepping are different"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_FAMILY_ARE_DIFFERENT: error_code_str = "CPUID, Processor family are different"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_FRONT_SIDE_BUS_MISMATCH: error_code_str = "Front side bus mismatch"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_CPUID_PROCESSOR_MODEL_ARE_DIFFERENT: error_code_str = "CPUID, Processor Model are different"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_PROCESSOR_SPEEDS_MISMATCHED: error_code_str = "Processor speeds mismatched"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_INVENTEC_POST_ERROR_CODE_QPI_MISMATCHED: error_code_str = "QPI mismatched"; /* QPI = Quickpath Interconnect */ break; default: error_code_str = "Undefined BIOS Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_BIOS && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_INVENTEC_BIOS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_POST_START && !system_event_record_data->offset_from_event_reading_type_code /* no event */ && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { if (sel_string_snprintf (buf, buflen, wlen, "BIOS Version %X.%02X", system_event_record_data->event_data2, system_event_record_data->event_data3)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-inventec-common.h0000644002055400205540000001507613527331637024642 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_INVENTEC_COMMON_H #define IPMI_SEL_STRING_INVENTEC_COMMON_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_inventec_5441_5442_common_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); int sel_string_output_inventec_5441_5442_common_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_inventec_5441_5442_common_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_inventec_5441_5442_common_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_inventec_5441_5442_common_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_inventec_5441_5442_common_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); int sel_string_output_inventec_5441_5442_common_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); #endif /* IPMI_SEL_STRING_INVENTEC_COMMON_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-inventec-5441.c0000644002055400205540000005176213527331637023744 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-inventec-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5441_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441) { /* achu: Note that the Dimm locations are not in a pattern, * this is what the doc says. * * If an invalid dimm location is indicated, fall through * and output normal stuff. */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_SMI && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED) && (system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH0_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH1_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH2_DIM0)) { char *str; switch (system_event_record_data->event_data3) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM1: str = "Dimm Number - CPU0/Ch0/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH0_DIM0: str = "Dimm Number - CPU0/Ch0/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM1: str = "Dimm Number - CPU0/Ch1/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH1_DIM0: str = "Dimm Number - CPU0/Ch1/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM1: str = "Dimm Number - CPU0/Ch2/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU0_CH2_DIM0: str = "Dimm Number - CPU0/Ch2/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH0_DIM0: str = "Dimm Number - CPU1/Ch0/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH1_DIM0: str = "Dimm Number - CPU1/Ch1/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5441_DIMM_CPU1_CH2_DIM0: str = "Dimm Number - CPU1/Ch2/DIM0"; break; default: str = "Internal Logic Error"; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } } /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5441_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5441_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_inventec_5441 = { sel_string_output_inventec_5441_sensor_name, NULL, sel_string_output_inventec_5441_event_data1_class_oem, NULL, sel_string_output_inventec_5441_event_data2_discrete_oem, sel_string_output_inventec_5441_event_data2_class_oem, NULL, sel_string_output_inventec_5441_event_data3_discrete_oem, sel_string_output_inventec_5441_event_data3_class_oem, sel_string_output_inventec_5441_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-inventec-5442.c0000644002055400205540000005362313527331637023743 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-inventec-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-inventec-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-string-inventec-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5442_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5442_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5442_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (ret); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5442_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5442_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442) { if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_INVENTEC_SMI && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_INVENTEC_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_PARITY || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED) && (system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM0 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM1 || system_event_record_data->event_data3 == IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM0)) { char *str; /* achu: technically there is a pattern here for this * motherboard and I could make some of this code shorter * w/ some bitmasking. But I'll just brute force it out for * readability. I'll revisit as more motherboards are added * later. */ switch (system_event_record_data->event_data3) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM1: str = "Dimm Number - CPU0/Ch0/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH0_DIM0: str = "Dimm Number - CPU0/Ch0/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM1: str = "Dimm Number - CPU0/Ch1/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH1_DIM0: str = "Dimm Number - CPU0/Ch1/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM1: str = "Dimm Number - CPU0/Ch2/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU0_CH2_DIM0: str = "Dimm Number - CPU0/Ch2/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM1: str = "Dimm Number - CPU1/Ch0/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH0_DIM0: str = "Dimm Number - CPU1/Ch0/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM1: str = "Dimm Number - CPU1/Ch1/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH1_DIM0: str = "Dimm Number - CPU1/Ch1/DIM0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM1: str = "Dimm Number - CPU1/Ch2/DIM1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_INVENTEC_5442_DIMM_CPU1_CH2_DIM0: str = "Dimm Number - CPU1/Ch2/DIM0"; break; default: str = "Internal Logic Error"; } snprintf (tmpbuf, tmpbuflen, "%s", str); return (1); } } /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data3_discrete_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_inventec_5442_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_inventec_5442_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = sel_string_output_inventec_5441_5442_common_event_data2_event_data3 (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_inventec_5442 = { sel_string_output_inventec_5442_sensor_name, NULL, sel_string_output_inventec_5442_event_data1_class_oem, NULL, sel_string_output_inventec_5442_event_data2_discrete_oem, sel_string_output_inventec_5442_event_data2_class_oem, NULL, sel_string_output_inventec_5442_event_data3_discrete_oem, sel_string_output_inventec_5442_event_data3_class_oem, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-linux-kernel.c0000644002055400205540000001352613527331637024147 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/record-format/oem/ipmi-sel-oem-linux-kernel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-linux-kernel.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* achu * * Needless to say, this is not for a specific OEM, but for generic panics from the Linux kernel. Any vendor applies. */ #define LINUX_KERNEL_EVENT_BUFFER_LENGTH 4096 /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_linux_kernel_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { char panic_str[LINUX_KERNEL_EVENT_BUFFER_LENGTH]; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (system_event_record_data->generator_id == IPMI_SLAVE_ADDRESS_OEM_LINUX_KERNEL); assert (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC); assert (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* Format of Linux kernel panic is * * Sensor Number = First byte of panic * Event Data2 = Second byte of panic string * Event Data3 = Third byte of panic string */ memset (panic_str, '\0', LINUX_KERNEL_EVENT_BUFFER_LENGTH); panic_str[0] = system_event_record_data->sensor_number; panic_str[1] = system_event_record_data->event_data2; panic_str[2] = system_event_record_data->event_data3; if (sel_string_snprintf (buf, buflen, wlen, "%s", panic_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_linux_kernel_oem_record_data (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv) { char panic_str[LINUX_KERNEL_EVENT_BUFFER_LENGTH]; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD || ipmi_sel_record_type_class (sel_record_type) == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (oem_rv); assert (sel_record_type == IPMI_SEL_RECORD_TYPE_NON_TIMESTAMPED_OEM_LINUX_KERNEL_PANIC); /* Format of Linux kernel panic is * * Byte 4 - Slave Address * Byte 5 - Sequence Number * Byte 6-16 - kernel panic string data */ memset (panic_str, '\0', LINUX_KERNEL_EVENT_BUFFER_LENGTH); memcpy (panic_str, &sel_entry->sel_event_record[5], 11); if (sel_string_snprintf (buf, buflen, wlen, "%s", panic_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-linux-kernel.h0000644002055400205540000000450013527331637024144 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_LINUX_KERNEL_H #define IPMI_SEL_STRING_LINUX_KERNEL_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_linux_kernel_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv); int sel_string_output_linux_kernel_oem_record_data (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, int *oem_rv); #endif /* IPMI_SEL_STRING_LINUX_KERNEL_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-quanta-s99q.c0000644002055400205540000005321413527331637023624 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-quanta-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-quanta-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-quanta-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-intel-node-manager.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" #define QUANTA_EVENT_BUFFER_LENGTH 4096 int sel_string_output_quanta_s99q_sensor_name (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if ((nmret = sel_string_output_intel_node_manager_sensor_name (ctx, sel_entry, sel_record_type, buf, buflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_quanta_s99q_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if ((nmret = sel_string_output_intel_node_manager_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_quanta_s99q_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_QUANTA_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_PCI_SENSORID && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { uint8_t device, function; device = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_DEVICE_NUMBER_BITMASK); device >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_FUNCTION_NUMBER_BITMASK); function >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA2_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_QUANTA_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_QPI_SENSORID || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_INT_SENSORID) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { snprintf (tmpbuf, tmpbuflen, "Local Error Bit %u", system_event_record_data->event_data2); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_quanta_s99q_event_data2_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if ((nmret = sel_string_output_intel_node_manager_event_data2_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_quanta_s99q_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_QUANTA_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_MEMORY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_SPARE)) { char dimmbuf[QUANTA_EVENT_BUFFER_LENGTH]; char *dimm_str = NULL; switch (system_event_record_data->event_data3) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A0: dimm_str = "DIMM A0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A1: dimm_str = "DIMM A1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_A2: dimm_str = "DIMM A2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B0: dimm_str = "DIMM B0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B1: dimm_str = "DIMM B1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_B2: dimm_str = "DIMM B2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C0: dimm_str = "DIMM C0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C1: dimm_str = "DIMM C1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_C2: dimm_str = "DIMM C2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D0: dimm_str = "DIMM D0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D1: dimm_str = "DIMM D1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_D2: dimm_str = "DIMM D2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E0: dimm_str = "DIMM E0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E1: dimm_str = "DIMM E1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_E2: dimm_str = "DIMM E2"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F0: dimm_str = "DIMM F0"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F1: dimm_str = "DIMM F1"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_QUANTA_S99Q_DIMM_F2: dimm_str = "DIMM F2"; break; default: snprintf (dimmbuf, QUANTA_EVENT_BUFFER_LENGTH, "Error DIMM %u", system_event_record_data->event_data3); dimm_str = dimmbuf; } snprintf (tmpbuf, tmpbuflen, "%s", dimm_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_QUANTA_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_PCI_SENSORID && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { snprintf (tmpbuf, tmpbuflen, "Bus Number %u", system_event_record_data->event_data3); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_QUANTA_ERROR && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_QPI_SENSORID || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_QUANTA_INT_SENSORID) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { char *errstr = NULL; switch (system_event_record_data->event_data3) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI0_ERROR: errstr = "QPI[0] Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI1_ERROR: errstr = "QPI[1] Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI2_ERROR: errstr = "QPI[2] Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_QPI3_ERROR: errstr = "QPI[3] Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_MISCELLANEOUS_ERROR: errstr = "Miscellaneous Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_QUANTA_EVENT_DATA3_IOH_CORE_ERROR: errstr = "IOH Core Error"; break; default: errstr = "Unknown Error"; } snprintf (tmpbuf, tmpbuflen, "%s", errstr); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_quanta_s99q_event_data3_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int nmret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if ((nmret = sel_string_output_intel_node_manager_event_data3_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (nmret) return (1); return (0); } struct sel_string_oem sel_string_oem_quanta_s99q = { sel_string_output_quanta_s99q_sensor_name, NULL, sel_string_output_quanta_s99q_event_data1_class_oem, NULL, sel_string_output_quanta_s99q_event_data2_discrete_oem, sel_string_output_quanta_s99q_event_data2_class_oem, NULL, sel_string_output_quanta_s99q_event_data3_discrete_oem, sel_string_output_quanta_s99q_event_data3_class_oem, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-sun-x4140.c0000644002055400205540000001457513527331637023122 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" int _sel_string_output_sun_x4140_event_data3_fru_position_number (ipmi_sel_ctx_t ctx, char *tmpbuf, unsigned int tmpbuflen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS); assert (tmpbuf); assert (tmpbuflen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); /* From Sun: * * "In general, the data stored in SEL EvtData3 (OEM) field for our * platforms is the "FRU Position Number". The position number is used * internally and consumed by our diagnostic routines. * * The position number is context sensitive to the name. * * e.g. For example, Sensor "/SYS/PS0/FAN_FAULT" and * "/SYS/PS0/PRSNT" for /SYS/PS0/PRSNT, EvtData3 field would contain * the sensor logical number while /SYS/PS0/FAN_FAULT, the upper 5 * bits of EvtData3 is the Fan Module and the lower 3 bits the Fan * Number." */ snprintf (tmpbuf, tmpbuflen, "FRU Position Number = %02Xh", system_event_record_data->event_data3); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_sun_x4140_event_data3_threshold_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_SUN_MICROSYSTEMS_PRODUCT_ID_X4140); /* * Sun X4140 */ if ((ret = _sel_string_output_sun_x4140_event_data3_fru_position_number (ctx, tmpbuf, tmpbuflen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_sun_x4140_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUN_MICROSYSTEMS); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_SUN_MICROSYSTEMS_PRODUCT_ID_X4140); /* * Sun X4140 */ if ((ret = _sel_string_output_sun_x4140_event_data3_fru_position_number (ctx, tmpbuf, tmpbuflen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_sun_x4140 = { NULL, NULL, NULL, NULL, NULL, NULL, sel_string_output_sun_x4140_event_data3_threshold_oem, sel_string_output_sun_x4140_event_data3_discrete_oem, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-common.c0000644002055400205540000002247313527331637025211 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-supermicro-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-supermicro-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_supermicro_overheat_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO || ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND || ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_PEPPERCON || ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); /* * Supermicro X7DBR-3 (X7DBR_3) * Supermicro X7DB8 * Supermicro X8DTN * Supermicro X7SBI-LN4 (X7SBI_LN4) * Supermicro X8DTH * Supermicro X8DTG * Supermicro X8DTU * Supermicro X8DT3-LN4F (X8DT3_LN4F) * Supermicro X8DTU-6+ (X8DTU_6PLUS) * Supermicro X8DTL * Supermicro X8DTL-3F (X8DTL_3F) * Supermicro X8SIL-F (X8SIL_F) * Supermicro X9SCL * Supermicro X9SCM * Supermicro X8DTN+-F (X8DTNPLUS_F) * Supermicro X8SIE * Supermicro X9SCA-F-O (X9SCA_F_O) * Supermicro H8DGU-F (H8DGU_F) * Supermicro X9DRi-F (X9DRI_F) * Supermicro X9DRI-LN4F+ (X9DRI_LN4F_PLUS) * Supermicro X9SPU-F-O (X9SPU_F_O) * Supermicro X9SCM-iiF (X9SCM_IIF) * * Note: Early Supermicro motherboards used the "Peppercon" Manufacturer ID * Note: Some Supermicro motherboards are rebranded with random manufacturer IDs */ /* achu: Via reverse engineering, see * * "Supermicro X8DTG-QF System Event Log" thread in late * January/early February 2012. */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_SEL_OVERHEAT) { snprintf (tmpbuf, tmpbuflen, "Overheat"); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_supermicro_dimm_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SLMPLUS_F); /* OEM Interpretation * * Supermicro X10DRH * Supermicro X10DRH-LN4 * Supermicro X10DRW-E * Supermicro X10DRW-N * Supermicro X10DRI * Supermicro X10DRI-T * Supermicro X10SLH_F * Supermicro X10SLM+-F * Supermicro X10SLL-F * Supermicro X10DRL-I * Supermicro X10SLM-F * Supermicro X10SRW-F * Supermicro X10SRI-F * Supermicro X10DRW-I * Supermicro X10SRL-F * Supermicro X10DDW-I * Supermicro X10DRG-HT */ /* Decoding information provided by ipmiutil * * http://ipmiutil.sourceforge.net/ * * Code in ipmiutil was as follows */ #if 0 #define NPAIRS 26 char rgpair[NPAIRS] = "ABCDEFGHIJKLMNOPQRSTUVWXYZ"; ... /* ver 2 method: 2A 80 = P1_DIMMB1 */ /* SuperMicro says: * pair: %c (data2 >> 4) + 0x40 + (data3 & 0x3) * 3, (='B') * dimm: %c (data2 & 0xf) + 0x27, * cpu: %x (data3 & 0x03) + 1); */ cpu = (b3 & 0x0F) + 1; /*0x80=CPU1, 0x81=CPU2*/ pair = ((bdata & 0xF0) >> 4) - 1; /*0x10=pairA, 0x20=pairB*/ if (pair < 0) pair = 0; if (pair > NPAIRS) pair = NPAIRS - 1; dimm = (bdata & 0x0F) - 9; /*0x0A=dimmX1, 0x0B=dimmX2*/ if (dimm < 0) n = sprintf(desc,DIMM_UNKNOWN); /* invalid */ else n = sprintf(desc,"P%d_DIMM%c%d",cpu,rgpair[pair],dimm); #endif /* * Note that code does not necessarily follow comments, I believe * that is b/c multiple ways to do this (i.e. create char or create * integer for output). I'm going to follow comments. * * Data2 * [7:4] - Pair character, add 0x40 to get ascii char for it and add CPU multiple as needed. * [3:0] - Dimm number base 0, add 0x27 to get ascii char for it * * Data3 * [2:0] - CPU number base 0 (i.e. normally add 1 for output) */ if (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR) && system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE && system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE) { char pair, dimm; uint8_t cpu; pair = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_PAIR_BITMASK); pair >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_PAIR_SHIFT; dimm = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_DIMM_BITMASK); dimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_SUPERMICRO_DIMM_SHIFT; cpu = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_SUPERMICRO_CPU_BITMASK); cpu >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_SUPERMICRO_CPU_SHIFT; pair += 0x40; pair += (cpu * 3); /* multiplier for other CPUs */ dimm += 0x27; cpu += 1; if (sel_string_snprintf (buf, buflen, wlen, "DIMM%c%c(CPU%d)", pair, dimm, cpu)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-common.h0000644002055400205540000000335613527331637025215 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_STRING_SUPERMICRO_COMMON_H #define IPMI_SEL_STRING_SUPERMICRO_COMMON_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-common.h" int sel_string_output_supermicro_overheat_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data); #endif /* IPMI_SEL_STRING_SUPERMICRO_COMMON_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-overheat-common.c0000644002055400205540000001167413527331637027025 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-supermicro-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_supermicro_overheat_mobo_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO || ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTH || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTG || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCL || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DG6 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F); if ((ret = sel_string_output_supermicro_overheat_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_supermicro_overheat_common = { NULL, NULL, &sel_string_output_supermicro_overheat_mobo_event_data1_class_oem, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c0000644002055400205540000000750713527331637030730 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-supermicro-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_supermicro_magnum_technologies_x8dtl_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_MAGNUM_TECHNOLOGIES_X8DTL); /* achu: Via reverse engineering, see * * "Supermicro X8DTG-QF System Event Log" thread in late * January/early February 2012. */ if ((ret = sel_string_output_supermicro_overheat_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_supermicro_magnum_technologies_x8dtl = { NULL, NULL, &sel_string_output_supermicro_magnum_technologies_x8dtl_event_data1_class_oem, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-peppercon-common.c0000644002055400205540000000771613527331637027205 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-supermicro-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_supermicro_peppercon_common_event_data1_class_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_PEPPERCON); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DBR_3 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7DB8 || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X8DTN || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_PEPPERCON_X7SBI_LN4); /* achu: Via reverse engineering, see * * "Supermicro X8DTG-QF System Event Log" thread in late * January/early February 2012. */ if ((ret = sel_string_output_supermicro_overheat_event_data1_class_oem (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_supermicro_peppercon_common = { NULL, NULL, &sel_string_output_supermicro_peppercon_common_event_data1_class_oem, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-supermicro-x10dimm-common.c0000644002055400205540000001075113527331637026462 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-string-supermicro-common.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_supermicro_x10dimm_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { int ret; assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRH_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRI_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SL_BASE || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SLL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRL_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SLM_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRW_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRI_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRW_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10SRL_F || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DDW_I || ctx->product_id == IPMI_SUPERMICRO_PRODUCT_ID_X10DRG_HT); if ((ret = sel_string_output_supermicro_dimm_event_data2_event_data3 (ctx, sel_entry, sel_record_type, tmpbuf, tmpbuflen, flags, wlen, system_event_record_data, oem_rv)) < 0) return (-1); if (ret) return (1); return (0); } struct sel_string_oem sel_string_oem_supermicro_x10dimm = { NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &sel_string_output_supermicro_x10dimm_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-string-wistron-c6220.c0000644002055400205540000011531613527331637023771 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/record-format/ipmi-sel-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-wistron-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-wistron-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-wistron-spec.h" #include "freeipmi/spec/oem/ipmi-slave-address-oem-wistron-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "ipmi-sel-common.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-string.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_wistron_c6220_event_data1_class_sensor_specific_discrete (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC); assert (ctx->product_id == IPMI_WISTRON_PRODUCT_ID_C6220); /* * Wistron / Dell Poweredge C6220 */ if (system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_WISTRON_IOH_CORE_ERROR) { int ret; ret = ipmi_get_oem_sensor_type_message (ctx->manufacturer_id, ctx->product_id, system_event_record_data->sensor_type, system_event_record_data->sensor_number, system_event_record_data->offset_from_event_reading_type_code, tmpbuf, tmpbuflen); if (ret > 0) return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_wistron_c6220_event_data2_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data2_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_WISTRON_PRODUCT_ID_C6220); /* * Wistron / Dell Poweredge C6220 */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_PROCESSOR && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_PROCESSOR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_IERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_THERMAL_TRIP || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_FRB1_BIST_FAILURE || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_FRB2_HANG_IN_POST_FAILURE || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_FRB3_PROCESSOR_STARTUP_INITIALIZATION_FAILURE || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED)) { uint8_t processor; char *processor_str = NULL; processor = system_event_record_data->event_data2; switch (processor) { case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_1: processor_str = "Processor 1"; break; case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_2: processor_str = "Processor 2"; break; case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_3: processor_str = "Processor 3"; break; case IPMI_SENSOR_TYPE_PROCESSOR_EVENT_DATA2_OEM_WISTRON_PROCESSOR_4: processor_str = "Processor 4"; break; default: processor_str = "Unspecified Processor"; } snprintf (tmpbuf, tmpbuflen, "%s", processor_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_PCI_SENSOR_ID && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { uint8_t device, function; device = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_DEVICE_NUMBER_BITMASK); device >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_DEVICE_NUMBER_SHIFT; function = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_FUNCTION_NUMBER_BITMASK); function >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_OEM_WISTRON_EVENT_DATA2_FUNCTION_NUMBER_SHIFT; snprintf (tmpbuf, tmpbuflen, "Device %u, Function %u", device, function); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_WISTRON_IOH_CORE_ERROR && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_QPI_SENSOR_ID || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_INT_SENSOR_ID) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_CORE || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_NON_FATAL || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_FATAL)) { snprintf (tmpbuf, tmpbuflen, "Local Error Bit = %02Xh", system_event_record_data->event_data2); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_SB_SENSOR_ID && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR)) { uint8_t local_error_bit; char *local_error_bit_str = NULL; local_error_bit = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_BITMASK); local_error_bit >>= IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_SHIFT; switch (local_error_bit) { case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PERIODIC_CRC_ERROR: local_error_bit_str = "HT Periodic CRC Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PROTOCOL_ERROR: local_error_bit_str = "HT Protocol Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_FLOW_CONTROL_BUFFER_OVERFLOW: local_error_bit_str = "HT Flow-Control Buffer Overflow"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_RESPONSE_ERROR: local_error_bit_str = "HT Response Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_PER_PACKET_CRC_ERROR: local_error_bit_str = "HT Per-Packet CRC"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_RETRY_COUNTER_ERROR: local_error_bit_str = "HT Retry Counter Error"; break; case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_EVENT_DATA2_OEM_WISTRON_LOCAL_ERROR_BIT_HT_MCU_PARITY_ERROR: local_error_bit_str = "MCU Parity Error"; break; default: local_error_bit_str = "Unspecified Local Error"; } snprintf (tmpbuf, tmpbuflen, "%s", local_error_bit_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_END && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT) { uint8_t boot_type; char *boot_type_str = NULL; uint8_t boot_device; char *boot_device_str = NULL; boot_type = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_BITMASK); boot_type >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_SHIFT; boot_device = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_BITMASK); boot_device >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_SHIFT; if (boot_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_TYPE_PC_COMPATIBLE_BOOT) boot_type_str = "PC Compatible Boot"; else boot_type_str = "uEFI Boot"; switch (boot_device) { case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_FORCE_PXE_BOOT: boot_device_str = "Force PXE Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_NIC_PXE_BOOT: boot_device_str = "NIC PXE Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_HARD_DISK_BOOT: boot_device_str = "Hard Disk Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_RAID_HDD_BOOT: boot_device_str = "RAID HDD Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_USB_STORAGE_BOOT: boot_device_str = "USB Storage Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_CD_DVD_ROM_BOOT: boot_device_str = "CD/DVD ROM Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_ISCSI_BOOT: boot_device_str = "iSCSI Boot"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_UEFI_SHELL: boot_device_str = "uEFI Shell"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BOOT_DEVICE_EPSA_DIAGNOSTIC_BOOT: boot_device_str = "ePSA Diagnostic"; break; default: boot_device_str = "Unspecified"; } snprintf (tmpbuf, tmpbuflen, "Boot Type = %s, Boot Device = %s", boot_type_str, boot_device_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_BIOS_RECOVERY_FAIL && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT) { uint8_t bios_recover_event; char *bios_recover_event_str = NULL; bios_recover_event = system_event_record_data->event_data2; switch (bios_recover_event) { case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_START_RECOVERY: bios_recover_event_str = "Start Recovery"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_RECOVERY_SUCCESS: bios_recover_event_str = "Recovery Status"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_LOAD_IMAGE_FAIL: bios_recover_event_str = "Load Image Fail"; break; case IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_RECOVERY_SIGNED_FAIL: bios_recover_event_str = "Signed Fail"; break; default: bios_recover_event_str = "Unspecified"; } snprintf (tmpbuf, tmpbuflen, "BIOS Recovery Event = %s", bios_recover_event_str); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_ME_FAIL && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT && system_event_record_data->event_data2 == IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_ME_FAIL) { snprintf (tmpbuf, tmpbuflen, "ME Fail"); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int sel_string_output_wistron_c6220_event_data3_discrete_oem (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *tmpbuf, unsigned int tmpbuflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (sel_entry); assert (tmpbuf); assert (tmpbuflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (system_event_record_data->event_data3_flag == IPMI_SEL_EVENT_DATA_OEM_CODE); assert (ctx->product_id == IPMI_WISTRON_PRODUCT_ID_C6220); /* * Wistron / Dell Poweredge C6220 */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_PCI_SENSOR_ID && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_PERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_PCI_SERR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT_BUS_FATAL_ERROR)) { snprintf (tmpbuf, tmpbuflen, "Bus %u", system_event_record_data->event_data3); return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_OEM_WISTRON_IOH_CORE_ERROR && (system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_QPI_SENSOR_ID || system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_INT_SENSOR_ID) && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_CORE || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_NON_FATAL || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_IOH_CORE_ERROR_OEM_WISTRON_FATAL)) { uint8_t error; char *error_str = NULL; error = system_event_record_data->event_data3; switch (error) { case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI0_ERROR: error_str = "QPI[0] Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI1_ERROR: error_str = "QPI[1] Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI2_ERROR: error_str = "QPI[2] Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI3_ERROR: error_str = "QPI[3] Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI0_PROTOCOL_ERROR: error_str = "QPI[0] Protocol Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI1_PROTOCOL_ERROR: error_str = "QPI[1] Protocol Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI2_PROTOCOL_ERROR: error_str = "QPI[2] Protocol Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_QPI3_PROTOCOL_ERROR: error_str = "QPI[3] Protocol Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_MISCELLANEOUS_ERROR: error_str = "Miscellaneous Error"; break; case IPMI_SENSOR_TYPE_IOH_CORE_ERROR_EVENT_DATA3_OEM_WISTRON_IOH_CORE_ERROR: error_str = "IOH Core Error"; break; default: error_str = "Unspecified Error"; } snprintf (tmpbuf, tmpbuflen, "%s", error_str); return (1); } return (0); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error * * in oem_rv, return * 0 - continue on * 1 - buffer full, return full buffer to user */ int sel_string_output_wistron_c6220_event_data2_event_data3 (ipmi_sel_ctx_t ctx, struct ipmi_sel_entry *sel_entry, uint8_t sel_record_type, char *buf, unsigned int buflen, unsigned int flags, unsigned int *wlen, struct ipmi_sel_system_event_record_data *system_event_record_data, int *oem_rv) { assert (ctx); assert (ctx->magic == IPMI_SEL_CTX_MAGIC); assert (ctx->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (sel_entry); assert (buf); assert (buflen); assert (!(flags & ~IPMI_SEL_STRING_FLAGS_MASK)); assert (flags & IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA); assert (wlen); assert (system_event_record_data); assert (oem_rv); assert (ctx->product_id == IPMI_WISTRON_PRODUCT_ID_C6220); /* * Wistron / Dell Poweredge C6220 */ if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_MEMORY && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_MEMORY && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && (system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_CORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_UNCORRECTABLE_MEMORY_ERROR || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_MEMORY_SCRUB_FAILED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_MEMORY_DEVICE_DISABLED || system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_MEMORY_SPARE)) { uint8_t threshold; char *threshold_str = NULL; uint8_t cpudimm; char *cpudimm_str = NULL; uint8_t dimmnumber; char *dimmnumber_str = NULL; threshold = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_THRESHOLD_BITMASK); threshold >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_THRESHOLD_SHIFT; cpudimm = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU_DIMM_BITMASK); cpudimm >>= IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU_DIMM_SHIFT; dimmnumber = system_event_record_data->event_data3; switch (threshold) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_SBE_WARNING_THRESHOLD: threshold_str = "SBE warning threshold"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_SBE_CRITICAL_THRESHOLD: threshold_str = "SBE critical threshold"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_UNSPECIFIED: threshold_str = "Unspecified"; break; default: threshold_str = "Unknown"; } switch (cpudimm) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU1_DIMM_A: cpudimm_str = "CPU1 DIMM A"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU2_DIMM_B: cpudimm_str = "CPU2 DIMM B"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU3_DIMM_C: cpudimm_str = "CPU3 DIMM C"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA2_OEM_WISTRON_CPU4_DIMM_D: cpudimm_str = "CPU4 DIMM D"; break; default: cpudimm_str = "Uknown CPU DIMM "; } switch (dimmnumber) { case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_1_BITMASK: dimmnumber_str = "1 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_2_BITMASK: dimmnumber_str = "2 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_3_BITMASK: dimmnumber_str = "3 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_4_BITMASK: dimmnumber_str = "4 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_5_BITMASK: dimmnumber_str = "5 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_6_BITMASK: dimmnumber_str = "6 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_7_BITMASK: dimmnumber_str = "7 error event"; break; case IPMI_SENSOR_TYPE_MEMORY_EVENT_DATA3_OEM_WISTRON_DIMM_8_BITMASK: dimmnumber_str = "8 error event"; break; } if (sel_string_snprintf (buf, buflen, wlen, "Threshold = %s, %s%s", threshold_str, cpudimm_str, dimmnumber_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_START && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT) { uint8_t first_field; uint8_t second_field; uint8_t third_field; uint8_t tmp; first_field = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_FIRST_FIELD_BITMASK); first_field >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_FIRST_FIELD_SHIFT; second_field = (system_event_record_data->event_data2 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_BITMASK); second_field >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_SHIFT; second_field <<= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA2_OEM_WISTRON_BIOS_SECOND_FIELD_HIGH_BITS_LEFT_SHIFT; tmp = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_SECOND_FIELD_LOW_BITS_BITMASK); tmp >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_SECOND_FIELD_LOW_BITS_SHIFT; second_field |= tmp; third_field = (system_event_record_data->event_data3 & IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_THIRD_FIELD_BITMASK); third_field >>= IPMI_SENSOR_TYPE_SYSTEM_EVENT_EVENT_DATA3_OEM_WISTRON_BIOS_THIRD_FIELD_SHIFT; if (sel_string_snprintf (buf, buflen, wlen, "BIOS Version = %u.%u.%u", first_field, second_field, third_field)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } if (system_event_record_data->generator_id == IPMI_GENERATOR_ID_OEM_WISTRON_BIOS && system_event_record_data->sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS && system_event_record_data->sensor_number == IPMI_SENSOR_NUMBER_OEM_WISTRON_POST_ERROR && system_event_record_data->event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC && system_event_record_data->offset_from_event_reading_type_code == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR) { uint16_t error_code; char *error_code_str = NULL; error_code = system_event_record_data->event_data2; error_code |= (system_event_record_data->event_data3 << 8); switch (error_code) { case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_RESOURCE_CONFLICT: error_code_str = "Local Console Resource Conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_CONTROLLER_ERROR: error_code_str = "Local Console Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_LOCAL_CONSOLE_OUTPUT_ERROR: error_code_str = "Local Console Output Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_CONTROLLER_ERROR: error_code_str = "ISA IO Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_RESOURCE_CONFLICT: error_code_str = "ISA IO Resource Conflict"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_IO_CONTROLLER_ERROR2: error_code_str = "ISA IO Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_CONTROLLER_ERROR: error_code_str = "ISA Floppy Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_INPUT_ERROR: error_code_str = "ISA Floppy Input Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_ISA_FLOPPY_OUTPUT_ERROR: error_code_str = "ISA Floppy Output Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_READ_ERROR: error_code_str = "USB Read Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_WRITE_ERROR: error_code_str = "USB Write Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_USB_INTERFACE_ERROR: error_code_str = "USB Interface Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MOUSE_INTERFACE_ERROR: error_code_str = "Mouse Interface Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_NOT_DETECTED: error_code_str = "Keyboard not Detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_CONTROLLER_ERROR: error_code_str = "Keyboard Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_STUCK_KEY_ERROR: error_code_str = "Keyboard Stuck Key Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_KEYBOARD_LOCKED_ERROR: error_code_str = "Keyboard Locked Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_CORRECTABLE_ERROR: error_code_str = "Memory Correctable Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_UNCORRECTABLE_ERROR: error_code_str = "Memory Uncorrectable Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MEMORY_NON_SPECIFIC_ERROR: error_code_str = "Memory Non-Specific Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MP_SERVICE_SELF_TEST_ERROR: error_code_str = "MP Service Self Test Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_CONTROLLER_ERROR: error_code_str = "PCI IO Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_READ_ERROR: error_code_str = "PCI IO Read Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_PCI_IO_WRITE_ERROR: error_code_str = "PCI IO Write Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_NOT_DETECTED: error_code_str = "Serial Port not Detected"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_CONTROLLER_ERROR: error_code_str = "Serial Port Controller Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_INPUT_ERROR: error_code_str = "Serial Port Input Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SERIAL_PORT_OUTPUT_ERROR: error_code_str = "Serial Port Output Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MICROCODE_UPDATE_ERROR: error_code_str = "Microcode Update Error"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_NO_MICROCODE_UPDATED: error_code_str = "No Microcode Updated"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_0_DEVICE_NOT_FOUND: error_code_str = "SATA 0 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_1_DEVICE_NOT_FOUND: error_code_str = "SATA 1 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_2_DEVICE_NOT_FOUND: error_code_str = "SATA 2 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_3_DEVICE_NOT_FOUND: error_code_str = "SATA 3 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_4_DEVICE_NOT_FOUND: error_code_str = "SATA 4 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SATA_5_DEVICE_NOT_FOUND: error_code_str = "SATA 5 Device not Found"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SPARING_MODE_IS_NOT_CONFIGURED: error_code_str = "Sparing Mode is not Configured"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_MIRROR_MODE_IS_NOT_CONFIGURED: error_code_str = "Mirror Mode is not Configured"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_SUPERVISER_AND_USER_PASSWORDS_CLEARED: error_code_str = "Superviser and User passwords have been cleared"; break; case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_OEM_WISTRON_POST_ERROR_CODE_CMOS_BATTERY_FAULT: error_code_str = "CMOS Battery Fault"; break; default: error_code_str = "Undefined Post Error"; } if (sel_string_snprintf (buf, buflen, wlen, "%s", error_code_str)) (*oem_rv) = 1; else (*oem_rv) = 0; return (1); } return (0); } struct sel_string_oem sel_string_oem_wistron_c6220 = { NULL, sel_string_output_wistron_c6220_event_data1_class_sensor_specific_discrete, NULL, NULL, sel_string_output_wistron_c6220_event_data2_discrete_oem, NULL, NULL, sel_string_output_wistron_c6220_event_data3_discrete_oem, NULL, sel_string_output_wistron_c6220_event_data2_event_data3, NULL, NULL, }; freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-trace.h0000644002055400205540000000354113527331637021325 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_TRACE_H #define IPMI_SEL_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #define SEL_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_sel_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define SEL_ERRNO_TO_SEL_ERRNUM(__ctx, __errno) \ do { \ sel_set_sel_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define SEL_FIID_OBJECT_ERROR_TO_SEL_ERRNUM(__ctx, __obj) \ do { \ sel_set_sel_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #endif /* IPMI_SEL_TRACE_H */ freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-util.c0000644002055400205540000000427613527331637021205 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sel/ipmi-sel.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-sel-defs.h" #include "ipmi-sel-trace.h" #include "ipmi-sel-util.h" #include "freeipmi-portability.h" void sel_set_sel_errnum_by_errno (ipmi_sel_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_SEL_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_SEL_ERR_SUCCESS; break; case ENOMEM: ctx->errnum = IPMI_SEL_ERR_OUT_OF_MEMORY; break; default: ctx->errnum = IPMI_SEL_ERR_INTERNAL_ERROR; } } void sel_set_sel_errnum_by_fiid_object (ipmi_sel_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_SEL_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_SEL_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_SEL_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_SEL_ERR_SYSTEM_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_SEL_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_SEL_ERR_INTERNAL_ERROR; } } freeipmi-1.6.4/libfreeipmi/sel/ipmi-sel-util.h0000644002055400205540000000235013527331637021201 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_UTIL_H #define IPMI_SEL_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/sel/ipmi-sel.h" #include "ipmi-sel-defs.h" void sel_set_sel_errnum_by_errno (ipmi_sel_ctx_t ctx, int __errno); void sel_set_sel_errnum_by_fiid_object (ipmi_sel_ctx_t ctx, fiid_obj_t obj); #endif /* IPMI_SEL_UTIL_H */ freeipmi-1.6.4/libfreeipmi/sensor-read/0000755002055400205540000000000013527342542017772 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/sensor-read/ipmi-sensor-read.c0000644002055400205540000007175113527342002023316 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "freeipmi/sensor-read/ipmi-sensor-read.h" #include "freeipmi/api/ipmi-sensor-cmds-api.h" #include "freeipmi/cmds/ipmi-sensor-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-slave-address-spec.h" #include "freeipmi/spec/ipmi-sensor-units-spec.h" #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "freeipmi/util/ipmi-sensor-util.h" #include "freeipmi/util/ipmi-util.h" #include "ipmi-sensor-read-defs.h" #include "ipmi-sensor-read-trace.h" #include "ipmi-sensor-read-util.h" #include "libcommon/ipmi-fiid-util.h" #include "freeipmi-portability.h" #include "debug-util.h" static char *ipmi_sensor_read_errmsgs[] = { "success", "context null", "context invalid", "invalid parameters", "out of memory", "sensor reading unavailable", "sensor scanning disabled", "sensor non-analog", "sensor non-linear", "sensor not owned by BMC", "sensor is system software sensor", "sensor cannot be bridged", "sensor reading cannot be obtained", "node busy", "invalid sdr record type", "sdr entry error", "internal IPMI error", "internal system error", "buffer overflow", "internal error", "errnum out of range", NULL }; ipmi_sensor_read_ctx_t ipmi_sensor_read_ctx_create (ipmi_ctx_t ipmi_ctx) { struct ipmi_sensor_read_ctx *ctx = NULL; if (!ipmi_ctx) { SET_ERRNO (EINVAL); return (NULL); } /* check that ipmi_ctx is open for use */ if (ipmi_ctx_get_target (ipmi_ctx, NULL, NULL) < 0) { SET_ERRNO (EINVAL); return (NULL); } if (!(ctx = (ipmi_sensor_read_ctx_t)malloc (sizeof (struct ipmi_sensor_read_ctx)))) { ERRNO_TRACE (errno); return (NULL); } ctx->magic = IPMI_SENSOR_READ_CTX_MAGIC; ctx->flags = IPMI_SENSOR_READ_FLAGS_DEFAULT; ctx->ipmi_ctx = ipmi_ctx; ctx->sdr_ctx = NULL; if (!(ctx->sdr_ctx = ipmi_sdr_ctx_create ())) { ERRNO_TRACE (errno); goto cleanup; } return (ctx); cleanup: if (ctx) { ipmi_sdr_ctx_destroy (ctx->sdr_ctx); free (ctx); } return (NULL); } void ipmi_sensor_read_ctx_destroy (ipmi_sensor_read_ctx_t ctx) { if (!ctx || ctx->magic != IPMI_SENSOR_READ_CTX_MAGIC) return; ctx->magic = ~IPMI_SENSOR_READ_CTX_MAGIC; ipmi_sdr_ctx_destroy (ctx->sdr_ctx); free (ctx); } int ipmi_sensor_read_ctx_errnum (ipmi_sensor_read_ctx_t ctx) { if (!ctx) return (IPMI_SENSOR_READ_ERR_CONTEXT_NULL); else if (ctx->magic != IPMI_SENSOR_READ_CTX_MAGIC) return (IPMI_SENSOR_READ_ERR_CONTEXT_INVALID); else return (ctx->errnum); } char * ipmi_sensor_read_ctx_strerror (int errnum) { if (errnum >= IPMI_SENSOR_READ_ERR_SUCCESS && errnum <= IPMI_SENSOR_READ_ERR_ERRNUMRANGE) return (ipmi_sensor_read_errmsgs[errnum]); else return (ipmi_sensor_read_errmsgs[IPMI_SENSOR_READ_ERR_ERRNUMRANGE]); } char * ipmi_sensor_read_ctx_errormsg (ipmi_sensor_read_ctx_t ctx) { return (ipmi_sensor_read_ctx_strerror (ipmi_sensor_read_ctx_errnum (ctx))); } int ipmi_sensor_read_ctx_get_flags (ipmi_sensor_read_ctx_t ctx, unsigned int *flags) { if (!ctx || ctx->magic != IPMI_SENSOR_READ_CTX_MAGIC) { ERR_TRACE (ipmi_sensor_read_ctx_errormsg (ctx), ipmi_sensor_read_ctx_errnum (ctx)); return (-1); } if (!flags) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_PARAMETERS); return (-1); } *flags = ctx->flags; ctx->errnum = IPMI_SENSOR_READ_ERR_SUCCESS; return (0); } int ipmi_sensor_read_ctx_set_flags (ipmi_sensor_read_ctx_t ctx, unsigned int flags) { if (!ctx || ctx->magic != IPMI_SENSOR_READ_CTX_MAGIC) { ERR_TRACE (ipmi_sensor_read_ctx_errormsg (ctx), ipmi_sensor_read_ctx_errnum (ctx)); return (-1); } if (flags & ~IPMI_SENSOR_READ_FLAGS_MASK) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_PARAMETERS); return (-1); } ctx->flags = flags; ctx->errnum = IPMI_SENSOR_READ_ERR_SUCCESS; return (0); } int _sensor_reading_corner_case_checks (ipmi_sensor_read_ctx_t ctx, fiid_obj_t obj_cmd_rs) { assert (ctx); assert (ctx->magic == IPMI_SENSOR_READ_CTX_MAGIC); assert (obj_cmd_rs); if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_NODE_BUSY) == 1) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_NODE_BUSY); return (-1); } /* IPMI Workaround * * achu: Error codes found on motherboards that strongly suggest * "sensor not available". See comments in * freeipmi-bugs-issues-and-workarounds.txt for why I think this is * a workaround and not an "ok" set of errors. */ else if ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DESTINATION_UNAVAILABLE) == 1)) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE); return (-1); } else if ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_UNSPECIFIED_ERROR) == 1)) { uint64_t val; int flag; /* IPMI Workaround * * Discovered on Sun Blade x6250 * * For some reason, some sensors can return this error code * (0xFF). However, it appears to be an invalid error response * b/c the sensor properly reports that the sensor reading is * not available or that scanning is diabled. So if the sensor * reports that it is unavailable, we'll report an error code * slightly more appropriate. * * Note, I do not handle this identically to the corner case * checks above. Those completion codes strongly suggest that a * sensor is not available. The error code "Unspecified Error" * could mean anything. */ if ((flag = fiid_obj_get (obj_cmd_rs, "reading_state", &val)) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (flag && val == IPMI_SENSOR_READING_STATE_UNAVAILABLE) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE); return (-1); } if (!(ctx->flags & IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED)) { if ((flag = fiid_obj_get (obj_cmd_rs, "sensor_scanning", &val)) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); return (-1); } if (flag && val == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_SCANNING_DISABLED); return (-1); } } /* else fall through like normal */ } return (0); } int _get_sensor_reading (ipmi_sensor_read_ctx_t ctx, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SENSOR_READ_CTX_MAGIC); assert (obj_cmd_rs); if (ipmi_cmd_get_sensor_reading (ctx->ipmi_ctx, sensor_number, obj_cmd_rs) < 0) { if (_sensor_reading_corner_case_checks (ctx, obj_cmd_rs) < 0) goto cleanup; SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_IPMI_ERROR); goto cleanup; } rv = 0; cleanup: return (rv); } int _get_sensor_reading_ipmb (ipmi_sensor_read_ctx_t ctx, uint8_t slave_address, uint8_t lun, uint8_t channel_number, uint8_t sensor_number, fiid_obj_t obj_cmd_rs) { int rv = -1; assert (ctx); assert (ctx->magic == IPMI_SENSOR_READ_CTX_MAGIC); assert (obj_cmd_rs); if (ctx->flags & IPMI_SENSOR_READ_FLAGS_BRIDGE_SENSORS) { if (ipmi_cmd_get_sensor_reading_ipmb (ctx->ipmi_ctx, channel_number, slave_address, lun, sensor_number, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_CANNOT_BE_BRIDGED); goto cleanup; } else if (ipmi_ctx_errnum (ctx->ipmi_ctx) == IPMI_ERR_MESSAGE_TIMEOUT) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_READING_CANNOT_BE_OBTAINED); goto cleanup; } else if (_sensor_reading_corner_case_checks (ctx, obj_cmd_rs) < 0) goto cleanup; else SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_IPMI_ERROR); goto cleanup; } } else { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_NOT_OWNED_BY_BMC); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_sensor_read (ipmi_sensor_read_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t shared_sensor_number_offset, uint8_t *sensor_reading_raw, double **sensor_reading, uint16_t *sensor_event_bitmask) { double *tmp_sensor_reading = NULL; uint64_t val; int rv = -1; fiid_obj_t obj_cmd_rs = NULL; uint8_t sensor_event_bitmask1 = 0; uint8_t sensor_event_bitmask2 = 0; int sensor_event_bitmask1_flag = 0; int sensor_event_bitmask2_flag = 0; uint16_t record_id = 0; uint8_t record_type = 0; uint8_t sensor_number = 0; uint8_t event_reading_type_code = 0; uint8_t sensor_owner_id_type = 0; uint8_t sensor_owner_id = 0; uint8_t sensor_owner_lun = 0; uint8_t channel_number = 0; uint8_t slave_address = 0; uint8_t reading_state, sensor_scanning; uint8_t local_sensor_reading_raw; unsigned int ctx_flags_orig; int event_reading_type_code_class = 0; if (!ctx || ctx->magic != IPMI_SENSOR_READ_CTX_MAGIC) { ERR_TRACE (ipmi_sensor_read_ctx_errormsg (ctx), ipmi_sensor_read_ctx_errnum (ctx)); return (-1); } if (!sdr_record || !sdr_record_len || !sensor_reading || !sensor_event_bitmask) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_PARAMETERS); return (-1); } *sensor_reading = NULL; *sensor_event_bitmask = 0; if (ipmi_sdr_parse_record_id_and_type (ctx->sdr_ctx, sdr_record, sdr_record_len, &record_id, &record_type) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INVALID_SDR_RECORD_TYPE); goto cleanup; } if (ipmi_sdr_parse_sensor_owner_id (ctx->sdr_ctx, sdr_record, sdr_record_len, &sensor_owner_id_type, &sensor_owner_id) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (ipmi_sdr_parse_sensor_owner_lun (ctx->sdr_ctx, sdr_record, sdr_record_len, &sensor_owner_lun, &channel_number) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (ipmi_sdr_parse_sensor_number (ctx->sdr_ctx, sdr_record, sdr_record_len, &sensor_number) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (shared_sensor_number_offset) { uint8_t share_count; if (record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INVALID_SDR_RECORD_TYPE); goto cleanup; } if (ipmi_sdr_parse_sensor_record_sharing (ctx->sdr_ctx, sdr_record, sdr_record_len, &share_count, NULL, NULL, NULL) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (share_count <= 1) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INVALID_SDR_RECORD_TYPE); goto cleanup; } if ((sensor_number + share_count) < (sensor_number + shared_sensor_number_offset)) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_PARAMETERS); goto cleanup; } sensor_number += shared_sensor_number_offset; } if (ipmi_sdr_parse_event_reading_type_code (ctx->sdr_ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (sensor_owner_id_type == IPMI_SDR_SENSOR_OWNER_ID_TYPE_SYSTEM_SOFTWARE_ID) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_IS_SYSTEM_SOFTWARE); goto cleanup; } slave_address = (sensor_owner_id << 1) | sensor_owner_id_type; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_reading_rs))) { SENSOR_READ_ERRNO_TO_SENSOR_READ_ERRNUM (ctx, errno); goto cleanup; } /* * IPMI Workaround (achu) * * See comments below concerning sensor_event_bitmask. */ if (ipmi_ctx_get_flags (ctx->ipmi_ctx, &ctx_flags_orig) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_ctx_set_flags (ctx->ipmi_ctx, ctx_flags_orig | IPMI_FLAGS_NO_VALID_CHECK) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INTERNAL_ERROR); goto cleanup; } /* IPMI Workaround * * Discovered on Fujitsu RX300 * Discovered on Fujitsu RX300S2 * * On some motherboards, the sensor owner is invalid. The sensor * owner as atually the BMC. */ if (!(ctx->flags & IPMI_SENSOR_READ_FLAGS_ASSUME_BMC_OWNER)) { if (slave_address == IPMI_SLAVE_ADDRESS_BMC) { if (_get_sensor_reading (ctx, sensor_number, obj_cmd_rs) < 0) goto cleanup; } else { if (_get_sensor_reading_ipmb (ctx, slave_address, sensor_owner_lun, channel_number, sensor_number, obj_cmd_rs) < 0) goto cleanup; } } else { if (_get_sensor_reading (ctx, sensor_number, obj_cmd_rs) < 0) goto cleanup; } /* * IPMI Workaround (achu) * * See comments below concerning sensor_event_bitmask. */ if (ipmi_ctx_set_flags (ctx->ipmi_ctx, ctx_flags_orig) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INTERNAL_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "reading_state", &val) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } reading_state = val; if (reading_state == IPMI_SENSOR_READING_STATE_UNAVAILABLE) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE); goto cleanup; } /* IPMI Workaround * * Discovered on Dell Poweredge 2900 * Discovered on Dell Poweredge 2950 * Discovered on Dell Poweredge R410 * Discovered on Dell Poweredge R610 * * On some motherboards, the sensor scanning bit is invalid for sensors. */ if (!(ctx->flags & IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED)) { if (FIID_OBJ_GET (obj_cmd_rs, "sensor_scanning", &val) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sensor_scanning = val; if (sensor_scanning == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_SCANNING_DISABLED); goto cleanup; } } /* achu: * * Note: I don't bother checking the "all_event_messages" flag from * the get_sensor_reading response. If that stuff is turned off, * the bitmasks should be zeroed out. * * Hopefully this doesn't bite me later on. * * Call the normal fiid_obj_get instead of the wrapper, if the field * isn't set, we want to know and not error out. */ if ((sensor_event_bitmask1_flag = fiid_obj_get (obj_cmd_rs, "sensor_event_bitmask1", &val)) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sensor_event_bitmask1 = val; if ((sensor_event_bitmask2_flag = fiid_obj_get (obj_cmd_rs, "sensor_event_bitmask2", &val)) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } sensor_event_bitmask2 = val; /* * IPMI Workaround (achu) * * Discovered on Dell 2950. * * It seems the sensor_event_bitmask (16 bits) may not be returned * by the server at all for some sensors, despite a minimum of 8 * bits being required. Under this situation, there's not much that * can be done. Since there is no sensor_event_bitmask, we just * assume that no states have been asserted and the * sensor_event_bitmask = 0; */ if (!sensor_event_bitmask1_flag && !sensor_event_bitmask2_flag) (*sensor_event_bitmask) = 0; else if (sensor_event_bitmask1_flag && sensor_event_bitmask2_flag) (*sensor_event_bitmask) = sensor_event_bitmask1 | (sensor_event_bitmask2 << 8); else if (sensor_event_bitmask1_flag && !sensor_event_bitmask2_flag) (*sensor_event_bitmask) = sensor_event_bitmask1; else { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_IPMI_ERROR); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sensor_reading", &val) < 0) { SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } local_sensor_reading_raw = val; if (sensor_reading_raw) (*sensor_reading_raw) = local_sensor_reading_raw; event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; if (ipmi_sdr_parse_sensor_decoding_data (ctx->sdr_ctx, sdr_record, sdr_record_len, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } /* if the sensor is not analog, this is most likely a bug in the * SDR, since we shouldn't be decoding a non-threshold sensor. */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG); rv = 0; goto cleanup; } /* if the sensor is non-linear, I just don't know what to do, * let the tool figure out what to output. */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR); rv = 0; goto cleanup; } if (!(tmp_sensor_reading = (double *)malloc (sizeof (double)))) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY); goto cleanup; } if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, local_sensor_reading_raw, tmp_sensor_reading) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INTERNAL_ERROR); goto cleanup; } *sensor_reading = tmp_sensor_reading; } rv = 1; } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { /* * IPMI Workaround (achu) * * Discovered on HP Proliant DL380 G7 * Discovered on HP ProLiant ML310 G5 * * SDR records for some sensors give conflicting information. A * threshold based sensor lists an event/reading type code for a * discrete sensor. The analog data format indicates an * analog/threshold based sensor, however no threshold limits * for the sensor are listed in the SDR. * * To deal with this, if the analog data format and units * strongly suggest that a reading should occur with this * sensor, get the reading and return it. * * Note that this can only occur for full records, since * decoding data does not exist in compact records. */ if (ctx->flags & IPMI_SENSOR_READ_FLAGS_DISCRETE_READING && record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; if (ipmi_sdr_parse_sensor_decoding_data (ctx->sdr_ctx, sdr_record, sdr_record_len, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } if (ipmi_sdr_parse_sensor_units (ctx->sdr_ctx, sdr_record, sdr_record_len, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SDR_ENTRY_ERROR); goto cleanup; } /* if the sensor is not analog, this is normal expected * case, fallthrough to normal expectations */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { rv = 1; goto cleanup; } /* if the sensor units are not specified, this is the normal expected * case, fallthrough to normal expectations */ if (sensor_units_percentage != IPMI_SDR_PERCENTAGE_YES && sensor_base_unit_type == IPMI_SENSOR_UNIT_UNSPECIFIED) { rv = 1; goto cleanup; } /* if the sensor is non-linear, I just don't know what to do, * let the tool figure out what to output. */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR); rv = 0; goto cleanup; } if (!(tmp_sensor_reading = (double *)malloc (sizeof (double)))) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY); goto cleanup; } if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, local_sensor_reading_raw, tmp_sensor_reading) < 0) { SENSOR_READ_SET_ERRNUM (ctx, IPMI_SENSOR_READ_ERR_INTERNAL_ERROR); goto cleanup; } *sensor_reading = tmp_sensor_reading; } rv = 1; } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM) /* nothing to do, sensor_event_bitmask already set */ rv = 1; else rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); if (rv <= 0) free (tmp_sensor_reading); return (rv); } freeipmi-1.6.4/libfreeipmi/sensor-read/ipmi-sensor-read-defs.h0000644002055400205540000000301313527331637024240 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_READ_DEFS_H #define IPMI_SENSOR_READ_DEFS_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/sdr/ipmi-sdr.h" #include "freeipmi/sensor-read/ipmi-sensor-read.h" #include "list.h" #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ #define IPMI_SENSOR_READ_CTX_MAGIC 0xABCD1246 #define IPMI_SENSOR_READ_FLAGS_MASK \ (IPMI_SENSOR_READ_FLAGS_BRIDGE_SENSORS \ | IPMI_SENSOR_READ_FLAGS_DISCRETE_READING \ | IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED \ | IPMI_SENSOR_READ_FLAGS_ASSUME_BMC_OWNER) struct ipmi_sensor_read_ctx { uint32_t magic; int errnum; unsigned int flags; ipmi_ctx_t ipmi_ctx; ipmi_sdr_ctx_t sdr_ctx; }; #endif /* IPMI_SENSOR_READ_DEFS_H */ freeipmi-1.6.4/libfreeipmi/sensor-read/ipmi-sensor-read-trace.h0000644002055400205540000000374513527331637024431 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_READ_TRACE_H #define IPMI_SENSOR_READ_TRACE_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "libcommon/ipmi-trace.h" #define SENSOR_READ_SET_ERRNUM(__ctx, __errnum) \ do { \ (__ctx)->errnum = (__errnum); \ TRACE_MSG_OUT (ipmi_sensor_read_ctx_errormsg ((__ctx)), (__errnum)); \ } while (0) #define SENSOR_READ_ERRNO_TO_SENSOR_READ_ERRNUM(__ctx, __errno) \ do { \ sensor_read_set_sensor_read_errnum_by_errno ((__ctx), (__errno)); \ TRACE_ERRNO_OUT ((__errno)); \ } while (0) #define SENSOR_READ_FIID_OBJECT_ERROR_TO_SENSOR_READ_ERRNUM(__ctx, __obj) \ do { \ sensor_read_set_sensor_read_errnum_by_fiid_object ((__ctx), (__obj)); \ TRACE_MSG_OUT (fiid_obj_errormsg ((__obj)), fiid_obj_errnum ((__obj))); \ } while (0) #endif /* IPMI_SENSOR_READ_TRACE_H */ freeipmi-1.6.4/libfreeipmi/sensor-read/ipmi-sensor-read-util.c0000644002055400205540000000454613527331637024303 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/sensor-read/ipmi-sensor-read.h" #include "freeipmi/fiid/fiid.h" #include "ipmi-sensor-read-defs.h" #include "ipmi-sensor-read-trace.h" #include "ipmi-sensor-read-util.h" #include "freeipmi-portability.h" void sensor_read_set_sensor_read_errnum_by_errno (ipmi_sensor_read_ctx_t ctx, int __errno) { assert (ctx && ctx->magic == IPMI_SENSOR_READ_CTX_MAGIC); switch (__errno) { case 0: ctx->errnum = IPMI_SENSOR_READ_ERR_SUCCESS; break; case ENOMEM: ctx->errnum = IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY; break; default: ctx->errnum = IPMI_SENSOR_READ_ERR_INTERNAL_ERROR; } } void sensor_read_set_sensor_read_errnum_by_fiid_object (ipmi_sensor_read_ctx_t ctx, fiid_obj_t obj) { assert (ctx && ctx->magic == IPMI_SENSOR_READ_CTX_MAGIC); switch (fiid_obj_errnum (obj)) { case FIID_ERR_SUCCESS: ctx->errnum = IPMI_SENSOR_READ_ERR_SUCCESS; break; case FIID_ERR_OUT_OF_MEMORY: ctx->errnum = IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY; break; case FIID_ERR_DATA_NOT_AVAILABLE: ctx->errnum = IPMI_SENSOR_READ_ERR_SYSTEM_ERROR; break; case FIID_ERR_FIELD_NOT_FOUND: case FIID_ERR_DATA_NOT_BYTE_ALIGNED: case FIID_ERR_REQUIRED_FIELD_MISSING: case FIID_ERR_FIXED_LENGTH_FIELD_INVALID: case FIID_ERR_NOT_IDENTICAL: ctx->errnum = IPMI_SENSOR_READ_ERR_PARAMETERS; break; default: ctx->errnum = IPMI_SENSOR_READ_ERR_INTERNAL_ERROR; } } freeipmi-1.6.4/libfreeipmi/sensor-read/ipmi-sensor-read-util.h0000644002055400205540000000251013527331637024275 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSOR_READ_UTIL_H #define IPMI_SENSOR_READ_UTIL_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/api/ipmi-api.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/sensor-read/ipmi-sensor-read.h" #include "ipmi-sensor-read-defs.h" void sensor_read_set_sensor_read_errnum_by_errno (ipmi_sensor_read_ctx_t ctx, int __errno); void sensor_read_set_sensor_read_errnum_by_fiid_object (ipmi_sensor_read_ctx_t ctx, fiid_obj_t obj); #endif /* IPMI_SENSOR_READ_UTIL_H */ freeipmi-1.6.4/libfreeipmi/spec/0000755002055400205540000000000013527342542016502 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/spec/ipmi-device-types-spec.c0000644002055400205540000005755513527331637023157 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-device-types-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* achu: * * I acknowledge, this was a borderline call. Do I want a * "ipmi_device_type_to_string" function, or do I fill in empty spots * with NULLs. It's not a huge array (compared to to the IANA list), * but it's not tiny either. */ const char *const ipmi_device_types[] = { "reserved", /* 0x00 */ "reserved", /* 0x01 */ "DS1624 temperature sensor / EEPROM or equivalent", /* 0x02 */ "DS1621 temperature sensor or equivalent", /* 0x03 */ "LM75 Temperature Sensor or equivalent", /* 0x04 */ "'Heceta' ASIC or similar", /* 0x05 */ "reserved", /* 0x06 */ "reserved", /* 0x07 */ "EEPROM, 24C01 or equivalent", /* 0x08 */ "EEPROM, 24C02 or equivalent", /* 0x09 */ "EEPROM, 24C04 or equivalent", /* 0x0A */ "EEPROM, 24C08 or equivalent", /* 0x0B */ "EEPROM, 24C16 or equivalent", /* 0x0C */ "EEPROM, 24C17 or equivalent", /* 0x0D */ "EEPROM, 24C32 or equivalent", /* 0x0E */ "EEPROM, 24C64 or equivalent", /* 0x0F */ "FRU Inventory Device behind management controller", /* 0x10 */ "reserved", /* 0x11 */ "reserved", /* 0x12 */ "reserved", /* 0x13 */ "PCF 8570 256 byte RAM or equivalent", /* 0x14 */ "PCF 8573 clock/calendar or equivalent", /* 0x15 */ "PCF 8574a 'i/o port' or equivalent", /* 0x16 */ "PCF 8583 clock/calendar or equivalent", /* 0x17 */ "PCF 8593 clock/calendar or equivalent", /* 0x18 */ "Clock calendar, type not specified", /* 0x19 */ "PCF 8591 AD, D/A Converter or equivalent", /* 0x1A */ "i/o port, specific device not specified", /* 0x1B */ "A/D Converter, specific device not specified", /* 0x1C */ "D/A Converter, specific device not specified", /* 0x1D */ "A/D, D/A Converter, specific device not specified", /* 0x1E */ "LCD controller / Driver, specific device not specified", /* 0x1F */ "Core Logic (chip set) Device, specific device not specified", /* 0x20 */ "LMC6874 Intelligent Battery controller, or equivalent", /* 0x21 */ "Intelligent Battery controller, specific device not specified",/* 0x22 */ "Combo Management ASIC, specific device not specified", /* 0x23 */ "Maxim 1617 Temperature Sensor", /* 0x24 */ "reserved", /* 0x25 */ "reserved", /* 0x26 */ "reserved", /* 0x27 */ "reserved", /* 0x28 */ "reserved", /* 0x29 */ "reserved", /* 0x2A */ "reserved", /* 0x2B */ "reserved", /* 0x2C */ "reserved", /* 0x2D */ "reserved", /* 0x2E */ "reserved", /* 0x2F */ "reserved", /* 0x30 */ "reserved", /* 0x31 */ "reserved", /* 0x32 */ "reserved", /* 0x33 */ "reserved", /* 0x34 */ "reserved", /* 0x35 */ "reserved", /* 0x36 */ "reserved", /* 0x37 */ "reserved", /* 0x38 */ "reserved", /* 0x39 */ "reserved", /* 0x3A */ "reserved", /* 0x3B */ "reserved", /* 0x3C */ "reserved", /* 0x3D */ "reserved", /* 0x3E */ "reserved", /* 0x3F */ "reserved", /* 0x40 */ "reserved", /* 0x41 */ "reserved", /* 0x42 */ "reserved", /* 0x43 */ "reserved", /* 0x44 */ "reserved", /* 0x45 */ "reserved", /* 0x46 */ "reserved", /* 0x47 */ "reserved", /* 0x48 */ "reserved", /* 0x49 */ "reserved", /* 0x4A */ "reserved", /* 0x4B */ "reserved", /* 0x4C */ "reserved", /* 0x4D */ "reserved", /* 0x4E */ "reserved", /* 0x4F */ "reserved", /* 0x50 */ "reserved", /* 0x51 */ "reserved", /* 0x52 */ "reserved", /* 0x53 */ "reserved", /* 0x54 */ "reserved", /* 0x55 */ "reserved", /* 0x56 */ "reserved", /* 0x57 */ "reserved", /* 0x58 */ "reserved", /* 0x59 */ "reserved", /* 0x5A */ "reserved", /* 0x5B */ "reserved", /* 0x5C */ "reserved", /* 0x5D */ "reserved", /* 0x5E */ "reserved", /* 0x5F */ "reserved", /* 0x60 */ "reserved", /* 0x61 */ "reserved", /* 0x62 */ "reserved", /* 0x63 */ "reserved", /* 0x64 */ "reserved", /* 0x65 */ "reserved", /* 0x66 */ "reserved", /* 0x67 */ "reserved", /* 0x68 */ "reserved", /* 0x69 */ "reserved", /* 0x6A */ "reserved", /* 0x6B */ "reserved", /* 0x6C */ "reserved", /* 0x6D */ "reserved", /* 0x6E */ "reserved", /* 0x6F */ "reserved", /* 0x70 */ "reserved", /* 0x71 */ "reserved", /* 0x72 */ "reserved", /* 0x73 */ "reserved", /* 0x74 */ "reserved", /* 0x75 */ "reserved", /* 0x76 */ "reserved", /* 0x77 */ "reserved", /* 0x78 */ "reserved", /* 0x79 */ "reserved", /* 0x7A */ "reserved", /* 0x7B */ "reserved", /* 0x7C */ "reserved", /* 0x7D */ "reserved", /* 0x7E */ "reserved", /* 0x7F */ "reserved", /* 0x80 */ "reserved", /* 0x81 */ "reserved", /* 0x82 */ "reserved", /* 0x83 */ "reserved", /* 0x84 */ "reserved", /* 0x85 */ "reserved", /* 0x86 */ "reserved", /* 0x87 */ "reserved", /* 0x88 */ "reserved", /* 0x89 */ "reserved", /* 0x8A */ "reserved", /* 0x8B */ "reserved", /* 0x8C */ "reserved", /* 0x8D */ "reserved", /* 0x8E */ "reserved", /* 0x8F */ "reserved", /* 0x90 */ "reserved", /* 0x91 */ "reserved", /* 0x92 */ "reserved", /* 0x93 */ "reserved", /* 0x94 */ "reserved", /* 0x95 */ "reserved", /* 0x96 */ "reserved", /* 0x97 */ "reserved", /* 0x98 */ "reserved", /* 0x99 */ "reserved", /* 0x9A */ "reserved", /* 0x9B */ "reserved", /* 0x9C */ "reserved", /* 0x9D */ "reserved", /* 0x9E */ "reserved", /* 0x9F */ "reserved", /* 0xA0 */ "reserved", /* 0xA1 */ "reserved", /* 0xA2 */ "reserved", /* 0xA3 */ "reserved", /* 0xA4 */ "reserved", /* 0xA5 */ "reserved", /* 0xA6 */ "reserved", /* 0xA7 */ "reserved", /* 0xA8 */ "reserved", /* 0xA9 */ "reserved", /* 0xAA */ "reserved", /* 0xAB */ "reserved", /* 0xAC */ "reserved", /* 0xAD */ "reserved", /* 0xAE */ "reserved", /* 0xAF */ "reserved", /* 0xB0 */ "reserved", /* 0xB1 */ "reserved", /* 0xB2 */ "reserved", /* 0xB3 */ "reserved", /* 0xB4 */ "reserved", /* 0xB5 */ "reserved", /* 0xB6 */ "reserved", /* 0xB7 */ "reserved", /* 0xB8 */ "reserved", /* 0xB9 */ "reserved", /* 0xBA */ "reserved", /* 0xBB */ "reserved", /* 0xBC */ "reserved", /* 0xBD */ "reserved", /* 0xBE */ "Other / unspecified device", /* 0xBF */ NULL }; const char *const ipmi_oem_device_type = "OEM specified device"; const char * const ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_heceta_asic_or_similar[] = { "Heceta 1 e.g. LM78", "Heceta 2 e.g. LM79", "LM80", "Heceta 3 e.g. LM81/ DM9240 / DS1760", "Heceta 4", "Heceta 5", NULL }; unsigned int ipmi_device_type_modifier_heceta_asic_or_similar_max_index = 0x05; const char * const ipmi_device_type_modifier_eeprom_24c01_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c01_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c02_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c02_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c04_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c04_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c08_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c08_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c16_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c16_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c17_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c17_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c32_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c32_or_equivalent_max_index = 0x03; const char * const ipmi_device_type_modifier_eeprom_24c64_or_equivalent[] = { "unspecified", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_eeprom_24c64_or_equivalent_max_index = 0x03; /* achu: not a typo, 00h and 0x02 are same. 00h for backwards compatability, see spec */ const char * const ipmi_device_type_modifier_fru_inventory_device_behind_management_controller[] = { "IPMI FRU Inventory", "DIMM Memory ID", "IPMI FRU Inventory", "System Processor Cartridge FRU / PIROM", NULL }; unsigned int ipmi_device_type_modifier_fru_inventory_device_behind_management_controller_max_index = 0x03; const char * const ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_clock_calendar_type_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_clock_calendar_type_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_io_port_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_io_port_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_ad_converter_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_ad_converter_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_da_converter_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_da_converter_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_core_logic_device_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_core_logic_device_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent_max_index = 0x00; const char * const ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified_max_index = 0x00; const char * const ipmi_device_type_modifier_maxim_1617_temperature_sensor[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_maxim_1617_temperature_sensor_max_index = 0x00; const char * const ipmi_device_type_modifier_other_unspecified_device[] = { "unspecified", NULL }; unsigned int ipmi_device_type_modifier_other_unspecified_device_max_index = 0x00; freeipmi-1.6.4/libfreeipmi/spec/ipmi-entity-ids-spec.c0000644002055400205540000001127713527331637022636 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-entity-ids-spec.h" #include "freeipmi-portability.h" /* achu: case preserved from spec. space before and after slashes removed */ const char *const ipmi_entity_ids[] = { "unspecified", "other", "unknown", "processor", "disk or disk bay", "peripheral bay", "system management module", "system board", "memory module", "processor module", "power supply", "add-in card", "front panel board", "back panel board", "power system board", "drive backplane", "system internal expansion board", "other system board", "processor board", "power unit/power domain", "power module/DC-to-DC converter", "power management/power distribution board", "chassis back panel board", "system chassis", "sub-chassis", "Other chassis board", "Disk Drive Bay", "Peripheral Bay", "Device Bay", "fan/cooling device", "cooling unit/cooling domain", "cable/interconnect", "memory device", "System Management Software", "System Firmware", "Operating System", "system bus", "Group", "Remote Management Communication Device", "External Environment", "battery", "Processing blade", "Connectivity switch", "Processor/memory module", "I/O module", "Processor/IO module", /* no slash between IO in spec */ "Management Controller Firmware", "IPMI Channel", "PCI Bus", "PCI Express Bus", "SCSI Bus", "SATA/SAS bus", "Processor/front-side bus", "Real Time Clock", "reserved", "reserved", /* listed as air-inlet, assume is typo */ "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "air inlet", "processor/CPU", "baseboard/main system board", NULL }; const char *const ipmi_entity_ids_pretty[] = { "Unspecified", "Other", "Unknown", "Processor", "Disk", "Peripheral Bay", "System Management Module", "System Board", "Memory Module", "Processor Module", "Power Supply", "Add-in Card", "Front Panel Board", "Back Panel Board", "Power System Board", "Drive Backplane", "System Internal Expansion Board", "Other System Board", "Processor Board", "Power Unit", "Power Module", "Power Management", "Chassis Back Panel Board", "System Chassis", "Sub-chassis", "Other Chassis Board", "Disk Drive Bay", "Peripheral Bay", "Device Bay", "Fan", "Cooling Unit", "Cable/Interconnect", /* keep '/', this is like sensor group naming */ "Memory Device", "System Management Software", "System Firmware", "Operating System", "System Bus", "Group", "Remote Management Communication Device", "External Environment", "Battery", "Processing Blade", "Connectivity Switch", "Processor/Memory Module", /* keep '/', this is Processor + Memory Module unit */ "I/O Module", "Processor/IO module", /* keep '/' this is a Processor + IO Module unit, no slash between IO in spec */ "Management Controller Firmware", "IPMI Channel", "PCI Bus", "PCI Express Bus", "SCSI Bus", "SATA/SAS bus", "Processor/front-side bus", "Real Time Clock", "reserved", "reserved", /* listed as air-inlet, assume is typo */ "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Air Inlet", "Processor", /* equivalent to 0x03, see errata */ "System Board", /* equivalent to 0x07, see errata */ NULL }; const char *const ipmi_entity_id_chassis_specific = "Chassis Specific"; const char *const ipmi_entity_id_board_set_specific = "Board-Set Specific"; const char *const ipmi_entity_id_oem_system_integrator = "OEM System Integrator"; freeipmi-1.6.4/libfreeipmi/spec/ipmi-fru-chassis-types-spec.c0000644002055400205540000000433213527331637024130 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-chassis-types-spec.c,v 1.10 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-fru-chassis-types-spec.h" #include "freeipmi-portability.h" const char *const ipmi_fru_chassis_types[] = { "Invalid", "Other", "Unknown", "Desktop", "Low Profile Desktop", "Pizza Box", "Mini Tower", "Tower", "Portable", "LapTop", "Notebook", "Hand Held", "Docking Station", "All in One", "Sub Notebook", "Space-saving", "Lunch Box", "Main Server Chassis", "Expansion Chassis", "SubChassis", "Bus Expansion Chassis", "Peripheral Chassis", "RAID Chassis", "Rack Mount Chassis", "Sealed-case PC", "Multi-system chassis", "Compact PCI", "Advanced TCA", "Blade", "Blade Enclosure", NULL }; freeipmi-1.6.4/libfreeipmi/spec/ipmi-fru-language-codes-spec.c0000644002055400205540000000737113527331637024215 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-language-codes-spec.c,v 1.10 2010-02-08 22:09:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-fru-language-codes-spec.h" #include "freeipmi-portability.h" const char *const ipmi_fru_language_codes[] = { "English", "Afar", "Abkhazian", "Afrikaans", "Amharic", "Arabic", "Assamese", "Aymara", "Azerbaijani", "Bashkir", "Byelorussian", "Bulgarian", "Bihari", "Bislama", "Bengali; Bangla", "Tibetan", "Breton", "Catalan", "Corsican", "Czech", "Welsh", "Danish", "German", "Bhutani", "Greek", "English", "Esperanto", "Spanish", "Estonian", "Basque", "Persian", "Finnish", "Fiji", "Faeroese", "French", "Frisian", "Irish", "Scots Gaelic", "Galician", "Guarani", "Gujarati", "Hausa", "Hindi", "Croatian", "Hungarian", "Armenian", "Interlingua", "Interlingue", "Inupiak", "Indonesian", "Icelandic", "Italian", "Hebrew", "Japanese", "Yiddish", "Javanese", "Georgian", "Kazakh", "Greenlandic", "Cambodian", "Kannada", "Korean", "Kashmiri", "Kurdish", "Kirghiz", "Latin", "Lingala", "Laothian", "Lithuanian", "Latvian, Lettish", "Malagasy", "Maori", "Macedonian", "Malayalam", "Mongolian", "Moldavian", "Marathi", "Malay", "Maltese", "burmese", "Nauru", "Nepali", "Dutch", "Norwegian", "Occitan", "(Afan) Oromo", "Oriya", "Punjabi", "Polish", "Pashto, Pushto", "Portuguese", "Quechua", "Rhaeto-Romance", "Kirundi", "Romanian", "Russian", "Kinyarwanda", "Sanskrit", "Sindhi", "Sangro", "Serbo-Croation", "Singhalese", "Slovak", "Slovenian", "Samoan", "Shona", "Somali", "Albanian", "Serbian", "Siswati", "Sesotho", "Sudanese", "Swedish", "Swahili", "Tamil", /* Spec has "Tegulu", likely a typo */ "Telugu", "Tajik", "Thai", "Tigrinya", "Turkmen", "Tagalog", "Setswana", "Tonga", "Turkish", "Tsonga", "Tatar", "Twi", "Ukranian", "Urdu", "Uzbek", "Vietnamese", "Volapuk", "Wolof", "Xhosa", "Yoruba", "Chinese", "Zulu", NULL }; freeipmi-1.6.4/libfreeipmi/spec/ipmi-iana-enterprise-numbers-spec.c0000644002055400205540000722023113527331637025303 0ustar00achuachu00000000000000 /* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi-portability.h" const char *const ipmi_iana_enterprise_numbers[] = { "Reserved", /* 0 */ "NxNetworks", /* 1 */ "IBM", /* 2 */ "Carnegie Mellon", /* 3 */ "Unix", /* 4 */ "ACC", /* 5 */ "TWG", /* 6 */ "CAYMAN", /* 7 */ "PSI", /* 8 */ "ciscoSystems", /* 9 */ "NSC", /* 10 */ "Hewlett-Packard", /* 11 */ "Epilogue", /* 12 */ "U of Tennessee", /* 13 */ "BBN Technologies", /* 14 */ "Xylogics, Inc.", /* 15 */ "Timeplex", /* 16 */ "Canstar", /* 17 */ "Wellfleet", /* 18 */ "TRW", /* 19 */ "MIT", /* 20 */ "EON", /* 21 */ "Fibronics", /* 22 */ "Novell", /* 23 */ "Spider Systems", /* 24 */ "NSFNET", /* 25 */ "Hughes LAN Systems", /* 26 */ "Intergraph", /* 27 */ "Interlan", /* 28 */ "Vitalink Communications", /* 29 */ "Ulana", /* 30 */ "NSWC", /* 31 */ "Santa Cruz Operation", /* 32 */ "MRV Communications, In-Reach Product Division", /* 33 */ "Cray", /* 34 */ "Nortel Networks", /* 35 */ "DEC", /* 36 */ "Touch", /* 37 */ "Network Research Corp.", /* 38 */ "Baylor College of Medicine", /* 39 */ "NMFECC-LLNL", /* 40 */ "SRI", /* 41 */ "Sun Microsystems", /* 42 */ "3Com", /* 43 */ "CMC", /* 44 */ "SynOptics", /* 45 */ "Cheyenne Software", /* 46 */ "Prime Computer", /* 47 */ "MCNC/North Carolina", /* 48 */ "Chippcom", /* 49 */ "Optical Data Systems", /* 50 */ "gated", /* 51 */ "Enterasys Networks Inc.", /* 52 */ "Apollo Computers", /* 53 */ "DeskTalk Systems, Inc.", /* 54 */ "SSDS", /* 55 */ "Castle Rock Computing", /* 56 */ "MIPS Computer Systems", /* 57 */ "TGV, Inc.", /* 58 */ "Silicon Graphics, Inc.", /* 59 */ "University of British Columbia", /* 60 */ "Merit", /* 61 */ "NetEdge", /* 62 */ "Apple Computer, Inc.", /* 63 */ "Gandalf", /* 64 */ "Dartmouth College", /* 65 */ "David Systems", /* 66 */ "Reuter", /* 67 */ "Cornell", /* 68 */ "Michael Sabo", /* 69 */ "Locus Computing Corp.", /* 70 */ "NASA", /* 71 */ "Retix", /* 72 */ "Boeing", /* 73 */ "AT&T", /* 74 */ "Ungermann-Bass", /* 75 */ "Digital Analysis Corporation", /* 76 */ "LAN Manager", /* 77 */ "LogMatrix Inc", /* 78 */ "Fujitsu Services", /* 79 */ "Auspex Systems, Inc", /* 80 */ "Lannet Company", /* 81 */ "Network Computing Devices", /* 82 */ "Raycom Systems", /* 83 */ "Pirelli Focom Ltd.", /* 84 */ "Datability Software Systems", /* 85 */ "Network Application Technology", /* 86 */ "Institute of Telematics, Karlsruhe Institute of Technology (KIT)", /* 87 */ "New York University", /* 88 */ "RND", /* 89 */ "InterCon Systems Corporation", /* 90 */ "Coral Network Corporation", /* 91 */ "Webster Computer Corporation", /* 92 */ "Frontier Technologies Corporation", /* 93 */ "Nokia", /* 94 */ "Allen-Bradely Company", /* 95 */ "CERN", /* 96 */ "Sigma Network Systems, Inc.", /* 97 */ "Emerging Technologies, Inc.", /* 98 */ "SNMP Research", /* 99 */ "Ohio State University", /* 100 */ "Ultra Network Technologies Julie", /* 101 */ "Microcom", /* 102 */ "Lockheed Martin", /* 103 */ "Micro Technology", /* 104 */ "Process Software Corporation", /* 105 */ "EMC Data General Division", /* 106 */ "Bull Company", /* 107 */ "Emulex Corporation", /* 108 */ "Warwick University Computing Services", /* 109 */ "NetScout Systems, Inc.", /* 110 */ "Oracle", /* 111 */ "Control Data Corporation", /* 112 */ "Hughes Aircraft Company", /* 113 */ "Synernetics, Inc.", /* 114 */ "Mitre", /* 115 */ "Hitachi, Ltd.", /* 116 */ "Telebit", /* 117 */ "Salomon Technology Services", /* 118 */ "NEC Corporation", /* 119 */ "Fibermux", /* 120 */ "FTP Software Inc.", /* 121 */ "Sony", /* 122 */ "Newbridge Networks Corporation", /* 123 */ "Racal-Datacom", /* 124 */ "CR SYSTEMS", /* 125 */ "DSET Corporation", /* 126 */ "Computone", /* 127 */ "Tektronix, Inc.", /* 128 */ "Interactive Systems Corporation", /* 129 */ "Banyan Systems Inc.", /* 130 */ "Sintrom Datanet Limited", /* 131 */ "Bell Canada", /* 132 */ "Olicom Enterprise Products Inc.", /* 133 */ "Rice University", /* 134 */ "OnStream Networks", /* 135 */ "Concurrent Computer Corporation", /* 136 */ "Basser", /* 137 */ "Luxcom", /* 138 */ "Artel", /* 139 */ "Independence Technologies, Inc.(ITI)", /* 140 */ "NetScout Systems, Inc.", /* 141 */ "Digital Computer Limited", /* 142 */ "Eyring, Inc.", /* 143 */ "Case Communications", /* 144 */ "Penril DataComm, Inc.", /* 145 */ "American Airlines, Inc.", /* 146 */ "Sequent Computer Systems", /* 147 */ "Bellcore", /* 148 */ "Concord Communications", /* 149 */ "University of Washington", /* 150 */ "Develcon", /* 151 */ "Solarix Systems", /* 152 */ "Unifi Communications Corp.", /* 153 */ "Roadnet", /* 154 */ "Network Systems Corp.", /* 155 */ "ENE (European Network Engineering)", /* 156 */ "Dansk Data Elektronik A/S", /* 157 */ "Morningstar, Inc.", /* 158 */ "Dupont EOP", /* 159 */ "Legato Systems, Inc.", /* 160 */ "Motorola", /* 161 */ "European Space Agency (ESA)", /* 162 */ "Aethis sa/nv", /* 163 */ "Rad Data Communications Ltd.", /* 164 */ "OfficeNet, Inc.", /* 165 */ "Shiva Corporation", /* 166 */ "Fujikura America", /* 167 */ "Xlnt Designs INC (XDI)", /* 168 */ "Tandem Computers", /* 169 */ "BICC", /* 170 */ "D-Link Systems, Inc.", /* 171 */ "AMP, Inc.", /* 172 */ "Netlink", /* 173 */ "C. Itoh Electronics", /* 174 */ "Sumitomo Electric Industries (SEI)", /* 175 */ "DHL Systems, Inc.", /* 176 */ "Network Equipment Technologies", /* 177 */ "APTEC Computer Systems", /* 178 */ "Schneider & Koch & Co, Datensysteme GmbH", /* 179 */ "Hill Air Force Base", /* 180 */ "Kentrox", /* 181 */ "Japan Radio Co.", /* 182 */ "Versitron", /* 183 */ "Telecommunication Systems", /* 184 */ "Interphase", /* 185 */ "Toshiba Corporation", /* 186 */ "Clearpoint Research Corp.", /* 187 */ "Ascom", /* 188 */ "Fujitsu America", /* 189 */ "NovaQuest InfoSystems", /* 190 */ "NCR", /* 191 */ "Dr. Materna GmbH", /* 192 */ "Ericsson AB", /* 193 */ "Metaphor Computer Systems", /* 194 */ "Patriot Partners", /* 195 */ "The Software Group Limited (TSG)", /* 196 */ "Kalpana, Inc.", /* 197 */ "University of Waterloo", /* 198 */ "CCL/ITRI", /* 199 */ "Coeur Postel", /* 200 */ "Mitsubish Cable Industries, Ltd.", /* 201 */ "SMC", /* 202 */ "Crescendo Communication, Inc.", /* 203 */ "Goodall Software Engineering", /* 204 */ "Intecom", /* 205 */ "Victoria University of Wellington", /* 206 */ "Allied Telesis, Inc.", /* 207 */ "Cray Communications A/S", /* 208 */ "Protools", /* 209 */ "NIPPON TELEGRAPH AND TELEPHONE CORPORATION", /* 210 */ "Fujitsu Limited", /* 211 */ "Network Peripherals Inc.", /* 212 */ "Netronix, Inc.", /* 213 */ "University of Wisconsin Madison", /* 214 */ "NetWorth, Inc.", /* 215 */ "Tandberg Data A/S", /* 216 */ "Technically Elite Concepts, Inc.", /* 217 */ "Labtam Australia Pty. Ltd.", /* 218 */ "Republic Telcom Systems, Inc.", /* 219 */ "ADI Systems, Inc.", /* 220 */ "Microwave Bypass Systems, Inc.", /* 221 */ "Pyramid Technology Corp.", /* 222 */ "Unisys_Corp", /* 223 */ "LANOPTICS LTD., Israel", /* 224 */ "NKK Corporation", /* 225 */ "CODIMA Technologies Ltd", /* 226 */ "Acals", /* 227 */ "ASTEC, Inc.", /* 228 */ "Delmarva Power", /* 229 */ "Telematics International, Inc.", /* 230 */ "Fujitsu Technology Solutions GmbH", /* 231 */ "Compaq", /* 232 */ "NetManage, Inc.", /* 233 */ "NC State University", /* 234 */ "Empirical Tools and Technologies", /* 235 */ "Samsung Electronics Co., LTD.", /* 236 */ "Takaoka Electric Mfg. Co., Ltd.", /* 237 */ "NxNetworks", /* 238 */ "WINDATA", /* 239 */ "RC International A/S", /* 240 */ "Netexp Research", /* 241 */ "Internode Systems Pty Ltd", /* 242 */ "netCS Informationstechnik GmbH", /* 243 */ "Lantronix", /* 244 */ "Avatar Consultants", /* 245 */ "Furukawa Electoric Co. Ltd.", /* 246 */ "ND SatCom - Gesellschaft für SatellitenkommunikationssystemembH", /* 247 */ "Richard Hirschmann GmbH & Co.", /* 248 */ "G2R Inc.", /* 249 */ "University of Michigan", /* 250 */ "Netcomm, Ltd.", /* 251 */ "Sable Technology Corporation", /* 252 */ "Xerox", /* 253 */ "Conware Computer Consulting GmbH", /* 254 */ "Compatible Systems Corp.", /* 255 */ "Scitec Communications Systems Ltd.", /* 256 */ "Transarc Corporation", /* 257 */ "Matsushita Electric Industrial Co., Ltd.", /* 258 */ "ACCTON Technology", /* 259 */ "Star-Tek, Inc.", /* 260 */ "ADC Codenoll Technology Corporation", /* 261 */ "Formation, Inc.", /* 262 */ "Seiko Instruments, Inc.", /* 263 */ "RCE (Reseaux de Communication d'Entreprise S.A.)", /* 264 */ "Xenocom, Inc.", /* 265 */ "Nexans Deutschland Industries", /* 266 */ "Systech Computer Corporation", /* 267 */ "Visual", /* 268 */ "CSC Airline Solutions Denmark A/S", /* 269 */ "Zenith Electronics Corporation", /* 270 */ "TELECOM FINLAND", /* 271 */ "BinTec Communications GmbH", /* 272 */ "EUnet Germany", /* 273 */ "PictureTel Corporation", /* 274 */ "Michigan State University", /* 275 */ "GTE Government Systems - Network Management Organization", /* 276 */ "Cascade Communications Corp.", /* 277 */ "Hitachi Cable, Ltd.", /* 278 */ "Olivetti", /* 279 */ "Vitacom Corporation", /* 280 */ "INMOS", /* 281 */ "AIC Systems Laboratories Ltd.", /* 282 */ "Cameo Communications, Inc.", /* 283 */ "Diab Data AB", /* 284 */ "Olicom A/S", /* 285 */ "Digital-Kienzle Computersystems", /* 286 */ "CSELT(Centro Studi E Laboratori Telecomunicazioni)", /* 287 */ "Electronic Data Systems", /* 288 */ "Brocade Communications Systems, Inc.", /* 289 */ "Harris Corporation", /* 290 */ "Technology Dynamics, Inc.", /* 291 */ "DATAHOUSE Information Systems Ltd.", /* 292 */ "Teltrend (NZ) Limited", /* 293 */ "Texas Instruments", /* 294 */ "PlainTree Systems Inc.", /* 295 */ "Hedemann Software Development", /* 296 */ "Fuji Xerox Co., Ltd.", /* 297 */ "Asante Technology", /* 298 */ "Stanford University", /* 299 */ "Digital Link", /* 300 */ "Raylan Corporation", /* 301 */ "Commscraft", /* 302 */ "Hughes Communications, Inc.", /* 303 */ "Farallon Computing, Inc.", /* 304 */ "GE Information Services", /* 305 */ "Gambit Computer Communications", /* 306 */ "Livingston Enterprises, Inc.", /* 307 */ "Star Technologies", /* 308 */ "Micronics Computers Inc.", /* 309 */ "Basis, Inc.", /* 310 */ "Microsoft", /* 311 */ "US West Advance Technologies", /* 312 */ "University College London", /* 313 */ "Eastman Kodak Company", /* 314 */ "Network Resources Corporation", /* 315 */ "Atlas Telecom", /* 316 */ "Bridgeway", /* 317 */ "American Power Conversion Corp.", /* 318 */ "DOE Atmospheric Radiation Measurement Project", /* 319 */ "VerSteeg CodeWorks", /* 320 */ "Verilink Corp", /* 321 */ "Sybus Corportation", /* 322 */ "Tekelec", /* 323 */ "NASA Ames Research Center", /* 324 */ "Simon Fraser University", /* 325 */ "Fore Systems, Inc.", /* 326 */ "Centrum Communications, Inc.", /* 327 */ "NeXT Computer, Inc.", /* 328 */ "Netcore, Inc.", /* 329 */ "Northwest Digital Systems", /* 330 */ "Andrew Corporation", /* 331 */ "Digi International", /* 332 */ "Computer Network Technology", /* 333 */ "Lotus Development Corp.", /* 334 */ "MICOM Communication Corporation", /* 335 */ "ASCII Corporation", /* 336 */ "PUREDATA Research", /* 337 */ "NTT DATA", /* 338 */ "Siemens Industry Inc.", /* 339 */ "Kendall Square Research (KSR)", /* 340 */ "ORNL", /* 341 */ "Network Innovations, Inc.", /* 342 */ "Intel Corporation", /* 343 */ "Compuware Corporation", /* 344 */ "Epson Research Center", /* 345 */ "Fibernet", /* 346 */ "Dot Hill Systems", /* 347 */ "American Express Company", /* 348 */ "Compu-Shack", /* 349 */ "Parallan Computer, Inc.", /* 350 */ "Stratacom", /* 351 */ "Open Networks Engineering, Inc.", /* 352 */ "ATM Forum", /* 353 */ "SSD Management, Inc.", /* 354 */ "Automated Network Management, Inc.", /* 355 */ "Magnalink Communications Corporation", /* 356 */ "Kasten Chase Applied Research", /* 357 */ "Skyline Technology, Inc.", /* 358 */ "Nu-Mega Technologies, Inc.", /* 359 */ "Morgan Stanley & Co. International PLC", /* 360 */ "Integrated Business Network", /* 361 */ "L & N Technologies, Ltd.", /* 362 */ "Cincinnati Bell Information Systems, Inc.", /* 363 */ "RAMA Technologies", /* 364 */ "MICROGNOSIS", /* 365 */ "Datapoint Corporation", /* 366 */ "RICOH Co. Ltd.", /* 367 */ "Axis Communications AB", /* 368 */ "Pacer Software", /* 369 */ "3COM/Axon", /* 370 */ "Alebra Technologies, Inc.", /* 371 */ "GSI", /* 372 */ "Tatung Co., Ltd.", /* 373 */ "DIS Research Ltd.", /* 374 */ "Quotron Systems, Inc.", /* 375 */ "Dassault Electronique", /* 376 */ "Corollary, Inc.", /* 377 */ "SEEL, Ltd.", /* 378 */ "Lexcel", /* 379 */ "pier64", /* 380 */ "OST", /* 381 */ "Megadata Pty Ltd.", /* 382 */ "LLNL Livermore Computer Center", /* 383 */ "Dynatech Communications", /* 384 */ "Symplex Communications Corp.", /* 385 */ "Tribe Computer Works", /* 386 */ "Taligent, Inc.", /* 387 */ "Symbol Technologies, Inc.", /* 388 */ "Lancert", /* 389 */ "Alantec", /* 390 */ "Ridgeback Solutions", /* 391 */ "Metrix, Inc.", /* 392 */ "Symantec Corporation", /* 393 */ "NRL Communication Systems Branch", /* 394 */ "I.D.E. Corporation", /* 395 */ "Panasonic Electric Works Co., Ltd.", /* 396 */ "MegaPAC", /* 397 */ "Tyco Electronics", /* 398 */ "Hitachi Computer Products (America), Inc.", /* 399 */ "METEO FRANCE", /* 400 */ "PRC Inc.", /* 401 */ "Wal-Mart Stores, Inc.", /* 402 */ "Nissin Electric Company, Ltd.", /* 403 */ "Distributed Support Information Standard", /* 404 */ "SMDS Interest Group (SIG)", /* 405 */ "SolCom Systems Ltd.", /* 406 */ "Bell Atlantic", /* 407 */ "Advanced Multiuser Technologies Corporation", /* 408 */ "Mitsubishi Electric Corporation", /* 409 */ "C.O.L. Systems, Inc.", /* 410 */ "University of Auckland", /* 411 */ "Distributed Management Task Force (DMTF)", /* 412 */ "Klever Computers, Inc.Tom Su", /* 413 */ "Amdahl Corporation", /* 414 */ "JTEC Pty, Ltd.", /* 415 */ "Matra Communcation", /* 416 */ "HAL Computer Systems", /* 417 */ "Lawrence Berkeley Laboratory", /* 418 */ "Dale Computer Corporation", /* 419 */ "University of Tuebingen", /* 420 */ "Bytex Corporation", /* 421 */ "Cogwheel, Inc.", /* 422 */ "Lanwan Technologies", /* 423 */ "Thomas-Conrad Corporation", /* 424 */ "TxPort", /* 425 */ "Compex, Inc.", /* 426 */ "Evergreen Systems, Inc.", /* 427 */ "HNV, Inc.", /* 428 */ "UTStarcom Incorporated", /* 429 */ "Canada Post Corporation", /* 430 */ "Open Systems Solutions, Inc.", /* 431 */ "Toronto Stock Exchange", /* 432 */ "Mamakos\\TransSys Consulting", /* 433 */ "EICON", /* 434 */ "Jupiter Systems", /* 435 */ "SSTI", /* 436 */ "Grand Junction Networks", /* 437 */ "Pegasus Solutions, Inc.", /* 438 */ "Edward D. Jones and Company", /* 439 */ "Amnet, Inc.", /* 440 */ "Chase Research", /* 441 */ "BMC Software", /* 442 */ "Gateway Communications, Inc.", /* 443 */ "Peregrine Systems", /* 444 */ "Daewoo Telecom", /* 445 */ "Norwegian Telecom Research", /* 446 */ "WilTel", /* 447 */ "Ericsson-Camtec", /* 448 */ "Codex", /* 449 */ "Basis", /* 450 */ "AGE Logic", /* 451 */ "INDE Electronics", /* 452 */ "Isode Limited", /* 453 */ "J.I. Case", /* 454 */ "Trillium", /* 455 */ "Bacchus Inc.", /* 456 */ "MCC", /* 457 */ "Stratus Computer", /* 458 */ "Quotron", /* 459 */ "Beame & Whiteside", /* 460 */ "Cellular Technical Services", /* 461 */ "Shore Microsystems, Inc.", /* 462 */ "Telecommunications Techniques Corp.", /* 463 */ "DNPAP (Technical University Delft)", /* 464 */ "Plexcom, Inc.", /* 465 */ "Tylink", /* 466 */ "Brookhaven Laboratory", /* 467 */ "Computer Communication Systems", /* 468 */ "Norand Corporation", /* 469 */ "MUX-LAP", /* 470 */ "Premisys Communications, Inc", /* 471 */ "Bell South Telecommunications", /* 472 */ "J. Stainsbury PLC", /* 473 */ "Manage Operations", /* 474 */ "Wandel and Goltermann Technologies", /* 475 */ "Emerson Computer Power", /* 476 */ "Network Software Associates", /* 477 */ "Procter and Gamble", /* 478 */ "Meridian Technology Corporation", /* 479 */ "QMS, Inc.", /* 480 */ "Network ExpressTom Jarema", /* 481 */ "LANcity Corporation", /* 482 */ "Dayna Communications, Inc.", /* 483 */ "kn-X Ltd.", /* 484 */ "Sync Research, Inc.", /* 485 */ "PremNet", /* 486 */ "SIAC", /* 487 */ "New York Stock Exchange", /* 488 */ "American Stock Exchange", /* 489 */ "FCR Software, Inc.", /* 490 */ "National Medical Care, Inc.", /* 491 */ "DCS Dialog Communication Systems Aktiengesellschaft Berlin", /* 492 */ "NorTele", /* 493 */ "Madge Networks, Inc.", /* 494 */ "Memotec Communications", /* 495 */ "ON", /* 496 */ "Leap Technology, Inc.", /* 497 */ "General DataComm, Inc.", /* 498 */ "ACE Communications, Ltd.", /* 499 */ "ADP", /* 500 */ "Programa SPRITEL", /* 501 */ "Adacom", /* 502 */ "Metrodata Ltd", /* 503 */ "Ellemtel Telecommunication Systems Laboratories", /* 504 */ "Arizona Public Service", /* 505 */ "NETWIZ, Ltd.,", /* 506 */ "Science and Engineering Research Council (SERC)", /* 507 */ "508 Credit Suisse First Boston - Watcher", /* 508 */ "Hadax Electronics Inc.", /* 509 */ "VTKK", /* 510 */ "North Hills Israel Ltd.", /* 511 */ "TECSIEL", /* 512 */ "Bayerische Motoren Werke (BMW) AG", /* 513 */ "CNET Technologies", /* 514 */ "MCI", /* 515 */ "Human Engineering AG (HEAG)", /* 516 */ "FileNet Corporation", /* 517 */ "Kongsberg Gruppen ASA", /* 518 */ "Dun & Bradstreet", /* 519 */ "Intercomputer Communications", /* 520 */ "Defense Intelligence Agency", /* 521 */ "Telesystems SLW Inc.", /* 522 */ "APT Communications", /* 523 */ "Delta Airlines", /* 524 */ "California Microwave", /* 525 */ "Avid Technology Inc", /* 526 */ "Integro Advanced Computer Systems", /* 527 */ "RPTI", /* 528 */ "Ascend Communications Inc.", /* 529 */ "Eden Computer Systems Inc.", /* 530 */ "Kawasaki-Steel Corp", /* 531 */ "Systems Management Infrasture, Barclays Bank PLC", /* 532 */ "B.U.G., Inc.", /* 533 */ "Eaton Corporation", /* 534 */ "Superconducting Supercollider Lab.", /* 535 */ "Triticom", /* 536 */ "Universal Instruments Corp.", /* 537 */ "Information Resources, Inc.", /* 538 */ "Kentrox", /* 539 */ "Crypto AG", /* 540 */ "Infinite Networks, Ltd.", /* 541 */ "Tangram Enterprise Solutions, Inc.", /* 542 */ "Alebra Technologies, Inc.", /* 543 */ "Equinox Systems, Inc.", /* 544 */ "Hayes Microcomputer Products", /* 545 */ "Empire Technologies Inc.", /* 546 */ "Glaxochem, Ltd.", /* 547 */ "Software Professionals, Inc", /* 548 */ "Agent Technology, Inc.", /* 549 */ "Dornier GMBH", /* 550 */ "Telxon Corporation", /* 551 */ "Entergy Corporation", /* 552 */ "GarrettCom, Inc", /* 553 */ "Agile Networks, Inc.", /* 554 */ "Larscom", /* 555 */ "Stock Equipment", /* 556 */ "ITT Corporation", /* 557 */ "Universal Data Systems, Inc.", /* 558 */ "Sonix Communications, Ltd.", /* 559 */ "Paul Freeman Associates, Inc.", /* 560 */ "John S. Barnes, Corp.", /* 561 */ "Northern Telecom, Ltd.", /* 562 */ "CAP Debris", /* 563 */ "Telco Systems NAC", /* 564 */ "Tosco Refining Co", /* 565 */ "Russell Info Sys", /* 566 */ "University of Salford", /* 567 */ "NetQuest Corp.", /* 568 */ "Armon Networking Ltd.", /* 569 */ "IA Corporation", /* 570 */ "AU-System Communicaton AB", /* 571 */ "GoldStar Information & Communications, Ltd.", /* 572 */ "SECTRA AB", /* 573 */ "ONEAC Corporation", /* 574 */ "Tree Technologies", /* 575 */ "General Dynamics C4 Systems", /* 576 */ "Geneva Software, Inc.", /* 577 */ "Interlink Computer Sciences, Inc.", /* 578 */ "Bridge Information Systems, Inc.", /* 579 */ "Leeds and Northrup Australia (LNA) Nigel Cook", /* 580 */ "CSG Systems International", /* 581 */ "Newport Systems Solutions, Inc.", /* 582 */ "azel Corporation", /* 583 */ "ROBOTIKER", /* 584 */ "PeerLogic Inc.", /* 585 */ "Digital Transmittion Systems", /* 586 */ "Far Point Communications", /* 587 */ "Xircom", /* 588 */ "Mead Data Central", /* 589 */ "Royal Bank of Canada", /* 590 */ "Advantis, Inc.", /* 591 */ "Chemical Banking Corp.", /* 592 */ "Eagle Technology", /* 593 */ "BT", /* 594 */ "Radix BV", /* 595 */ "TAINET Communication System Corp.", /* 596 */ "Comtek Services Inc.", /* 597 */ "Fair Isaac Corporation", /* 598 */ "AST Research Inc.", /* 599 */ "Soft*Star s.r.l. Ing. Enrico Badella", /* 600 */ "Bancomm", /* 601 */ "Trusted Information Systems, Inc.", /* 602 */ "Harris & Jeffries, Inc.", /* 603 */ "Axel Technology Corp.", /* 604 */ "NetTest Inc.", /* 605 */ "CAP debis", /* 606 */ "Lachman Technology, Inc.", /* 607 */ "Galcom Networking Ltd.", /* 608 */ "BAZIS", /* 609 */ "SYNAPTEL", /* 610 */ "Investment Management Services, Inc.", /* 611 */ "Taiwan Telecommunication Lab", /* 612 */ "Anagram Corporation", /* 613 */ "Univel", /* 614 */ "University of California, San Diego", /* 615 */ "CompuServe", /* 616 */ "Telstra - OTC Australia", /* 617 */ "Westinghouse Electric Corp.", /* 618 */ "DGA Ltd.", /* 619 */ "Elegant Communications Inc.", /* 620 */ "Experdata", /* 621 */ "Unisource Business Networks Sweden AB", /* 622 */ "Molex, Inc.", /* 623 */ "Quay Financial Software", /* 624 */ "VMX Inc.", /* 625 */ "Hypercom, Inc.", /* 626 */ "University of Guelph", /* 627 */ "DIaLOGIKa", /* 628 */ "NBASE Switch Communication", /* 629 */ "Anchor Datacomm B.V.", /* 630 */ "PACDATA", /* 631 */ "University of Colorado", /* 632 */ "Tricom Communications Limited", /* 633 */ "Santix Software GmbH", /* 634 */ "Encore Networks, Inc.", /* 635 */ "Georgia Institute of Technology", /* 636 */ "Alcatel-Lucent", /* 637 */ "GTECH", /* 638 */ "UNOCAL Corporation", /* 639 */ "First Pacific Network", /* 640 */ "Lexmark International", /* 641 */ "Qnix Computer", /* 642 */ "Jigsaw Software Concepts (Pty) Ltd.", /* 643 */ "Eastern Research Inc.", /* 644 */ "nsgdata.com Inc", /* 645 */ "SEIKO Communication Systems, Inc.", /* 646 */ "Unified Management", /* 647 */ "RADLINX Ltd.", /* 648 */ "Microplex Systems Ltd.", /* 649 */ "Trio Information Systems AB", /* 650 */ "Phoenix Microsystems", /* 651 */ "Distributed Systems International, Inc.", /* 652 */ "Evolving Systems, Inc.", /* 653 */ "SAT GmbH", /* 654 */ "CeLAN Technology, Inc.", /* 655 */ "Landmark Systems Corp.", /* 656 */ "Netone Systems Co., Ltd.", /* 657 */ "Loral Data Systems", /* 658 */ "Cellware Broadband Technology", /* 659 */ "MuSys Corporation", /* 660 */ "IMC Networks Corp.", /* 661 */ "Octel Communications Corp.", /* 662 */ "RIT Technologies Ltd.", /* 663 */ "Adtran", /* 664 */ "Netvion, Inc.", /* 665 */ "Oki Electric Industry Co., Ltd.", /* 666 */ "Specialix International", /* 667 */ "INESC (Instituto de Engenharia de Sistemas e Computadores)", /* 668 */ "Globalnet Communications", /* 669 */ "Product Line Engineer SVEC Computer Corp.", /* 670 */ "Printer Systems Corp.", /* 671 */ "Contec Micro Electronics USA", /* 672 */ "Unix Integration Services", /* 673 */ "Dell Inc.", /* 674 */ "Whittaker Electronic Systems", /* 675 */ "QPSX Communications", /* 676 */ "Loral WDl", /* 677 */ "Federal Express Corp.", /* 678 */ "E-COMMS Inc.", /* 679 */ "Software Clearing House", /* 680 */ "Antlow Computers Ltd.", /* 681 */ "Emcom Corp.", /* 682 */ "Extended Systems, Inc.", /* 683 */ "Sola Electric", /* 684 */ "Esix Systems, Inc.", /* 685 */ "3M/MMM", /* 686 */ "Cylink Corp.", /* 687 */ "Znyx Advanced Systems Division, Inc.", /* 688 */ "Texaco, Inc.", /* 689 */ "McCaw Cellular Communication Corp.", /* 690 */ "ASP Computer Product Inc.", /* 691 */ "HiPerformance Systems", /* 692 */ "Regionales Rechenzentrum Erlangen", /* 693 */ "SAP AG", /* 694 */ "ElectroSpace System Inc.", /* 695 */ "( Unassigned )", /* 696 */ "MultiPort Corporation", /* 697 */ "Combinet, Inc.", /* 698 */ "TSCC", /* 699 */ "Teleos Communications Inc.", /* 700 */ "Alta Research", /* 701 */ "Independence Blue Cross", /* 702 */ "ADACOM Station Interconnectivity Ltd.", /* 703 */ "MIROR Systems", /* 704 */ "Merlin Gerin", /* 705 */ "Owen-Corning Fiberglas", /* 706 */ "Talking Networks Inc.", /* 707 */ "Cubix Corporation", /* 708 */ "Formation Inc.", /* 709 */ "Lannair Ltd.", /* 710 */ "LightStream Corp.", /* 711 */ "LANart Corp.", /* 712 */ "University of Stellenbosch", /* 713 */ "Wyse Technology", /* 714 */ "DSC Communications Corp.", /* 715 */ "NetEc", /* 716 */ "Breltenbach Software Engineering GmbH", /* 717 */ "Victor Company of Japan,Limited", /* 718 */ "Japan Direx Corporation", /* 719 */ "NECSY Network Control Systems S.p.A. Piero Fiozzo", /* 720 */ "ISDN Systems Corp.", /* 721 */ "Zero-One Technologies, Ltd.", /* 722 */ "Radix Technologies, Inc.", /* 723 */ "National Institute of Standards and Technology", /* 724 */ "Digital Technology Inc.", /* 725 */ "Castelle Corp.", /* 726 */ "Memotec Inc.", /* 727 */ "Showa Electric Wire & Cable Co., Ltd.", /* 728 */ "SpectraGraphics", /* 729 */ "Connectware Inc.", /* 730 */ "Wind River Systems", /* 731 */ "RADWAY International Ltd.", /* 732 */ "System Management ARTS, Inc.", /* 733 */ "Persoft, Inc.", /* 734 */ "Xnet Technology Inc.", /* 735 */ "Unison-Tymlabs", /* 736 */ "Micro-Matic Research", /* 737 */ "B.A.T.M. Advance Technologies", /* 738 */ "University of Copenhagen", /* 739 */ "Network Security Systems, Inc.", /* 740 */ "JNA Telecommunications", /* 741 */ "Encore Computer Corporation", /* 742 */ "Central Intelligence Agency", /* 743 */ "ISC (GB) Limited", /* 744 */ "Digital Communication Associates", /* 745 */ "CyberMedia Inc.", /* 746 */ "Distributed Systems International, Inc.", /* 747 */ "Peter Radig EDP-Consulting", /* 748 */ "Vicorp Interactive Systems", /* 749 */ "Inet Inc.", /* 750 */ "Argonne National Lab", /* 751 */ "Teklogix", /* 752 */ "North Western University", /* 753 */ "Astarte Fiber Networks", /* 754 */ "Diederich & Associates, Inc.", /* 755 */ "Florida Power Corporation", /* 756 */ "Ingres Corporation", /* 757 */ "Open Network Enterprise", /* 758 */ "The Home Depot", /* 759 */ "Pan Dacom Telekommunikations", /* 760 */ "NetTek", /* 761 */ "Karlnet Corp.", /* 762 */ "Efficient Networks, Inc.", /* 763 */ "Fiberdata", /* 764 */ "Lanser", /* 765 */ "Ericsson Denmark A/S, Telebit Division", /* 766 */ "QoSCom", /* 767 */ "Network Computing Inc.", /* 768 */ "Walgreens Company", /* 769 */ "Internet Initiative Japan Inc.", /* 770 */ "GP van Niekerk Ondernemings", /* 771 */ "Queen's University Belfast", /* 772 */ "Securities Industry Automation Corporation", /* 773 */ "SYNaPTICS", /* 774 */ "Data Switch Corporation", /* 775 */ "Telindus Distribution", /* 776 */ "MAXM Systems Corporation", /* 777 */ "Fraunhofer Gesellschaft", /* 778 */ "EQS Business Services", /* 779 */ "CNet Technology Inc.", /* 780 */ "Datentechnik GmbH", /* 781 */ "Network Solutions, LLC", /* 782 */ "Viaman Software", /* 783 */ "Schweizerische Bankgesellschaft Zuerich", /* 784 */ "University of Twente - TIOS", /* 785 */ "Simplesoft Inc.", /* 786 */ "Stony Brook, Inc.", /* 787 */ "Unified Systems Solutions, Inc.", /* 788 */ "Network Appliance Corporation", /* 789 */ "Ornet Data Communication Technologies Ltd.", /* 790 */ "Computer Associates International", /* 791 */ "Wireless Incorporated", /* 792 */ "NYNEX Science & Technology", /* 793 */ "Commercial Link Systems", /* 794 */ "Adaptec Inc.", /* 795 */ "Softswitch", /* 796 */ "Link Technologies, Inc.", /* 797 */ "IIS", /* 798 */ "Mobile Solutions Inc.", /* 799 */ "Xylan Corp.", /* 800 */ "Airtech Software Forge Limited", /* 801 */ "National Semiconductor", /* 802 */ "Video Lottery Technologies", /* 803 */ "National Semiconductor Corp", /* 804 */ "Applications Management Corp", /* 805 */ "Travelers Insurance Company", /* 806 */ "Taiwan International Standard Electronics Ltd.", /* 807 */ "US Patent and Trademark Office Rick", /* 808 */ "Hynet, Ltd.", /* 809 */ "Aydin, Corp.", /* 810 */ "ADDTRON Technology Co., Ltd.", /* 811 */ "Fannie Mae", /* 812 */ "MultiNET Services", /* 813 */ "GECKO mbH", /* 814 */ "Memorex Telex", /* 815 */ "Advanced Communications Networks (ACN) SA", /* 816 */ "Telekurs AG", /* 817 */ "IMV Victron bv", /* 818 */ "CF6 Company", /* 819 */ "Walker Richer and Quinn Inc.", /* 820 */ "Saturn Systems", /* 821 */ "Mitsui Marine and Fire Insurance Co. Ltd.", /* 822 */ "Loop Telecommunication International, Inc.", /* 823 */ "Telenex Corporation", /* 824 */ "Bus-Tech, Inc.", /* 825 */ "ATRIE", /* 826 */ "Gallagher & Robertson A/S", /* 827 */ "Networks Northwest, Inc.", /* 828 */ "Conner Peripherials", /* 829 */ "Elf Antar France", /* 830 */ "Lloyd Internetworking", /* 831 */ "Datatec Industries, Inc.", /* 832 */ "TAICOM", /* 833 */ "Brown's Operating System Services Ltd.", /* 834 */ "MiLAN Technology Corp.", /* 835 */ "NetEdge Systems, Inc.", /* 836 */ "NetFrame Systems", /* 837 */ "Xedia Corporation", /* 838 */ "Pepsi", /* 839 */ "Tricord Systems, Inc.", /* 840 */ "Proxim Wireless, Inc", /* 841 */ "Applications Plus, Inc.", /* 842 */ "Pacific Bell", /* 843 */ "Scorpio Communications", /* 844 */ "TPS-Teleprocessing Systems", /* 845 */ "Technology Solutions Company", /* 846 */ "Computer Site Technologies", /* 847 */ "NetPort Software", /* 848 */ "Alon Systems", /* 849 */ "Tripp Lite", /* 850 */ "NetComm Limited", /* 851 */ "Precision Systems, Inc.(PSI)", /* 852 */ "Objective Systems Integrators", /* 853 */ "Simpact, Inc.", /* 854 */ "Systems Enhancement Corporation", /* 855 */ "Information Integration, Inc.", /* 856 */ "CETREL S.C.", /* 857 */ "Platinum Technology, Inc.", /* 858 */ "Olivetti North America", /* 859 */ "WILMA", /* 860 */ "Thomson Financial", /* 861 */ "Total Peripherals Inc.", /* 862 */ "SunNetworks Consultant", /* 863 */ "Arkhon Technologies, Inc.", /* 864 */ "Computer Sciences Corporation", /* 865 */ "Philips Communication d'Entreprise Claude Lubin", /* 866 */ "Katron Technologies Inc.", /* 867 */ "Transition Engineering Inc.", /* 868 */ "Altos Engineering Applications, Inc.", /* 869 */ "Nicecom Ltd.", /* 870 */ "Fiskars/Deltec", /* 871 */ "AVM GmbH", /* 872 */ "Comm Vision", /* 873 */ "Institute for Information Industry", /* 874 */ "Legent Corporation", /* 875 */ "Network Automation", /* 876 */ "EView Technology", /* 877 */ "Coman Data Communications Ltd.", /* 878 */ "Skattedirektoratet", /* 879 */ "Client-Server Technologies", /* 880 */ "Societe Internationale de Telecommunications Aeronautiques", /* 881 */ "Maximum Strategy Inc.", /* 882 */ "Integrated Systems, Inc.", /* 883 */ "E-Systems", /* 884 */ "RELTEC Corporation", /* 885 */ "Summa Four Inc.", /* 886 */ "J & L Information Systems", /* 887 */ "Forest Computer Inc.", /* 888 */ "Palindrome Corp.", /* 889 */ "ZyXEL Communications Corp.", /* 890 */ "Network Managers (UK) Ltd,", /* 891 */ "Sensible Office Systems Inc.", /* 892 */ "Informix Software", /* 893 */ "Dynatek Communications", /* 894 */ "Versalynx Corp.", /* 895 */ "Potomac Scheduling Communications Company", /* 896 */ "Sybase, Inc", /* 897 */ "DiviCom Inc.", /* 898 */ "Datus elektronische Informationssysteme GmbH", /* 899 */ "Matrox Electronic Systems Limited", /* 900 */ "Digital Products, Inc.", /* 901 */ "Scitex Corp.Ltd.", /* 902 */ "RAD Vision", /* 903 */ "Tran Network Systems", /* 904 */ "Scorpion Logic", /* 905 */ "Inotech Inc.Eric Jacobs", /* 906 */ "Controlled Power Co.", /* 907 */ "ABB Inc.", /* 908 */ "J.P. Morgan", /* 909 */ "Clear Communications Corp.", /* 910 */ "General Technology Inc.", /* 911 */ "Adax Inc.", /* 912 */ "Mtel Technologies, Inc.", /* 913 */ "Underscore, Inc.", /* 914 */ "SerComm Corp.", /* 915 */ "Allegiance Corporation", /* 916 */ "Tellus Technology", /* 917 */ "Continuous Electron Beam Accelerator Facility", /* 918 */ "Canoga Perkins", /* 919 */ "R.I.S Technologies", /* 920 */ "INFONEX Corp.", /* 921 */ "WordPerfect Corp.", /* 922 */ "NRaD", /* 923 */ "Hong Kong Telecommunications Ltd.", /* 924 */ "Signature Systems", /* 925 */ "Alpha Technologies, Inc.", /* 926 */ "PairGain Technologies, Inc.", /* 927 */ "Sonic Systems", /* 928 */ "Steinbrecher Corp.", /* 929 */ "Centillion Networks, Inc.", /* 930 */ "Network Communication Corp.", /* 931 */ "Sysnet A.S.", /* 932 */ "Telecommunication Systems Lab", /* 933 */ "QMI", /* 934 */ "Phoenixtec Power Co., Ltd.", /* 935 */ "Hirakawa Hewtech Corp.", /* 936 */ "No Wires Needed B.V.", /* 937 */ "Primary Access", /* 938 */ "FD Software AS", /* 939 */ "g.a.m.s. edv-dienstleistungen", /* 940 */ "Nemesys Research Ltd.", /* 941 */ "Pacific Communication Sciences, Inc.", /* 942 */ "Level One Communications, Inc.", /* 943 */ "Intellimon Software, LLC.", /* 944 */ "Accenture", /* 945 */ "Bay Technologies Pty Ltd.", /* 946 */ "Integrated Network Corp.", /* 947 */ "CyberPro International", /* 948 */ "Wang Laboratories Inc.", /* 949 */ "Polaroid Corp.", /* 950 */ "Sunrise Sierra", /* 951 */ "Silcon Group", /* 952 */ "Coastcom", /* 953 */ "4th DIMENSION SOFTWARE Ltd.", /* 954 */ "SEIKO SYSTEMS Inc.", /* 955 */ "PERFORM", /* 956 */ "TV/COM International", /* 957 */ "Network Integration, Inc.", /* 958 */ "Sola Electric, A Unit of General Signal", /* 959 */ "Gradient Technologies, Inc.", /* 960 */ "Tokyo Electric Co., Ltd.", /* 961 */ "Codonics, Inc.", /* 962 */ "Delft Technical University", /* 963 */ "Carrier Access Corp.", /* 964 */ "eoncorp", /* 965 */ "Naval Undersea Warfare Center", /* 966 */ "AWA Limited", /* 967 */ "Distinct Corp.", /* 968 */ "National Technical University of Athens", /* 969 */ "BGS Systems, Inc.", /* 970 */ "AT&T Wireless (McCaw Wireless Data)", /* 971 */ "Bekaert", /* 972 */ "Epic Data Inc.", /* 973 */ "Prodigy Services Co.", /* 974 */ "First Pacific Networks (FPN)", /* 975 */ "Xylink Ltd.", /* 976 */ "Relia Technologies Corp.", /* 977 */ "Legacy Storage Systems Inc.", /* 978 */ "Digicom, SPA", /* 979 */ "Ark Telecom", /* 980 */ "National Security Agency (NSA)", /* 981 */ "Southwestern Bell Corporation (AT&T)", /* 982 */ "Virtual Design Group, Inc.", /* 983 */ "Rhone Poulenc", /* 984 */ "Swiss Bank Corporation", /* 985 */ "ATEA N.V.", /* 986 */ "Computer Communications Specialists, Inc.", /* 987 */ "Object Quest, Inc.", /* 988 */ "DCL System International, Ltd.", /* 989 */ "SOLITON SYSTEMS K.K.", /* 990 */ "U S Software", /* 991 */ "Systems Research and Applications Corporation", /* 992 */ "University of Florida", /* 993 */ "Dantel, Inc.", /* 994 */ "Multi-Tech Systems, Inc.", /* 995 */ "Softlink Ltd.", /* 996 */ "ProSum", /* 997 */ "March Systems Consultancy, Ltd.", /* 998 */ "Hong Technology, Inc.", /* 999 */ "Internet Assigned Numbers Authority", /* 1000 */ "PECO Energy Co.", /* 1001 */ "United Parcel Service", /* 1002 */ "Storage Dimensions, Inc.", /* 1003 */ "ITV Technologies, Inc.", /* 1004 */ "TCPSI", /* 1005 */ "Promptus Communications, Inc.", /* 1006 */ "Norman Data Defense Systems", /* 1007 */ "Pilot Network Services, Inc.", /* 1008 */ "Integrated Systems Solutions Corporation", /* 1009 */ "SISRO", /* 1010 */ "NetVantage", /* 1011 */ "Marconi", /* 1012 */ "SURECOM", /* 1013 */ "Royal Hong Kong Jockey Club", /* 1014 */ "Gupta", /* 1015 */ "Tone Software Corporation", /* 1016 */ "Opus Telecom", /* 1017 */ "Cogsys Ltd.", /* 1018 */ "Komatsu, Ltd.", /* 1019 */ "ROI Systems, Inc", /* 1020 */ "Lightning Instrumentation SA", /* 1021 */ "TimeStep Corp.", /* 1022 */ "INTELSAT", /* 1023 */ "Network Research Corporation Japan, Ltd.", /* 1024 */ "Relational Development, Inc.", /* 1025 */ "Emerald Systems, Corp.", /* 1026 */ "Mitel, Corp.", /* 1027 */ "Software AG", /* 1028 */ "MillenNet, Inc.", /* 1029 */ "NK-EXA Corp.", /* 1030 */ "BMC Software", /* 1031 */ "StarFire Enterprises, Inc.", /* 1032 */ "Hybrid Networks, Inc.", /* 1033 */ "Quantum Software GmbH", /* 1034 */ "Openvision Technologies Limited", /* 1035 */ "Healthcare Communications, Inc.(HCI)", /* 1036 */ "SAIT Systems", /* 1037 */ "SAGEMCOM SAS", /* 1038 */ "CompuSci Inc.", /* 1039 */ "Aim Technology", /* 1040 */ "CIESIN", /* 1041 */ "Systems & Technologies International", /* 1042 */ "Israeli Electric Company (IEC) Yoram Harlev", /* 1043 */ "Phoenix Wireless Group, Inc.", /* 1044 */ "SWL", /* 1045 */ "nCUBE", /* 1046 */ "Cerner, Corp.", /* 1047 */ "Andersen Consulting", /* 1048 */ "Windstream Communications", /* 1049 */ "Acer", /* 1050 */ "Cedros", /* 1051 */ "AirAccess", /* 1052 */ "Expersoft Corporation", /* 1053 */ "Eskom", /* 1054 */ "SBE, Inc.", /* 1055 */ "SS8", /* 1056 */ "American Computer and Electronics, Corp.", /* 1057 */ "Syndesis Limited", /* 1058 */ "Isis Distributed Systems, Inc.", /* 1059 */ "Priority Call Management", /* 1060 */ "Koelsch & Altmann GmbH", /* 1061 */ "WIPRO INFOTECH Ltd.", /* 1062 */ "Controlware", /* 1063 */ "Mosaic Software", /* 1064 */ "Canon Information Systems", /* 1065 */ "AOL Inc.", /* 1066 */ "Whitetree Network Technologies, Inc.", /* 1067 */ "Northrop Grumman / Xetron", /* 1068 */ "Target Concepts, Inc.", /* 1069 */ "DMH Software", /* 1070 */ "Innosoft International, Inc.", /* 1071 */ "Controlware GmbH", /* 1072 */ "Telecommunications Industry Association (TIA) Mike", /* 1073 */ "Boole & Babbage", /* 1074 */ "System Engineering Support, Ltd.", /* 1075 */ "SURFnet", /* 1076 */ "OpenConnect Systems, Inc.", /* 1077 */ "PDTS (Process Data Technology and Systems)", /* 1078 */ "Cornet, Inc.", /* 1079 */ "NetStar, Inc.", /* 1080 */ "Semaphore Communications, Corp.", /* 1081 */ "Casio Computer Co., Ltd.", /* 1082 */ "CSIR", /* 1083 */ "APOGEE Communications", /* 1084 */ "Information Management Company", /* 1085 */ "Wordlink, Inc.", /* 1086 */ "PEER", /* 1087 */ "Telstra Corp", /* 1088 */ "Net X, Inc.", /* 1089 */ "PNC PLC", /* 1090 */ "DanaSoft, Inc.", /* 1091 */ "Yokogawa-Hewlett-Packard", /* 1092 */ "Citem", /* 1093 */ "Link Telecom, Ltd.", /* 1094 */ "Xirion bv", /* 1095 */ "Centigram Communications, Corp.", /* 1096 */ "Gensym Corp.", /* 1097 */ "Apricot Computers, Ltd.", /* 1098 */ "CANAL+", /* 1099 */ "Cambridge Technology Partners", /* 1100 */ "MoNet Systems, Inc.", /* 1101 */ "Metricom, Inc.", /* 1102 */ "Xact, Inc", /* 1103 */ "Brave Software, Inc.", /* 1104 */ "NetCell Systems, Inc.", /* 1105 */ "Uni-QLennart Norlanderlennart.norlander&uniq.se", /* 1106 */ "DISA Space Systems Development Division", /* 1107 */ "INTERSOLV", /* 1108 */ "Vela Research, Inc.", /* 1109 */ "Tetherless Access, Inc.", /* 1110 */ "Magistrat Wien, AT", /* 1111 */ "Franklin Telecom, Inc.", /* 1112 */ "EDA Instruments, Inc.", /* 1113 */ "EFI Electronics, Corporation", /* 1114 */ "GMD", /* 1115 */ "Voicetek, Corp", /* 1116 */ "Avanti Technology, Inc.", /* 1117 */ "ATLan LTD", /* 1118 */ "Lehman Brothers", /* 1119 */ "LAN-hopper Systems, Inc.", /* 1120 */ "Web-Systems", /* 1121 */ "Piller GmbH", /* 1122 */ "Engenio Information Technologies, Inc.", /* 1123 */ "NetSpan, Corp.", /* 1124 */ "Nielsen Media Research", /* 1125 */ "Sterling Software", /* 1126 */ "Applied Network Technology, Inc.", /* 1127 */ "Union Pacific Railroad", /* 1128 */ "Tec Corporation", /* 1129 */ "Datametrics Systems, Corporation Karl S.", /* 1130 */ "Intersection Development Corporation Michael", /* 1131 */ "BACS Limited, GB", /* 1132 */ "Engage Communication", /* 1133 */ "Fastware, S.A.", /* 1134 */ "LONGSHINE Electronics Corp.", /* 1135 */ "BOW Networks, Inc.", /* 1136 */ "emotion, Inc.", /* 1137 */ "Rautaruukki steel factory, Information systems", /* 1138 */ "EMC Corp", /* 1139 */ "University of West England", /* 1140 */ "Com21", /* 1141 */ "Compression Tehnologies Inc.", /* 1142 */ "Buslogic Inc.", /* 1143 */ "Firefox Corporation", /* 1144 */ "Mercury Communications Ltd", /* 1145 */ "COMPUTER PROTOCOL MALAYSIA SDN. BHD.", /* 1146 */ "Institute for Information Industry", /* 1147 */ "Pacific Electric Wire & Cable Co. Ltd.", /* 1148 */ "MPR Teltech Ltd", /* 1149 */ "P-COM, Inc", /* 1150 */ "Anritsu Corporation", /* 1151 */ "SPYRUS", /* 1152 */ "NeTpower, Inc.", /* 1153 */ "Diehl ISDN GmbH", /* 1154 */ "CARNet", /* 1155 */ "AS-TECH", /* 1156 */ "SG2 Innovation et Produits", /* 1157 */ "CellAccess Technology, Inc.", /* 1158 */ "Bureau of Meteorology", /* 1159 */ "ELTRAX", /* 1160 */ "Thames Water Utilities Limited", /* 1161 */ "Micropolis, Corp.", /* 1162 */ "Integrated Systems Technology", /* 1163 */ "Brite Voice Systems, Inc.", /* 1164 */ "Associated Grocer", /* 1165 */ "General Instrument", /* 1166 */ "Stanford Telecom", /* 1167 */ "ICOM Informatique", /* 1168 */ "MPX Data Systems Inc.", /* 1169 */ "Syntellect", /* 1170 */ "Polyhedra Ltd", /* 1171 */ "Shoppers Drug Mart", /* 1172 */ "Apollo Travel Services Judith Williams-Murphy", /* 1173 */ "Time Warner Cable, Inc.", /* 1174 */ "American Technology Labs Inc.", /* 1175 */ "Dow Jones & Company, Inc.", /* 1176 */ "FRA", /* 1177 */ "Equitable Life Assurance Society", /* 1178 */ "Smith Barney Inc.", /* 1179 */ "Compact Data Ltd", /* 1180 */ "I.Net Communications", /* 1181 */ "Yamaha Corporation", /* 1182 */ "Illinois State University", /* 1183 */ "RADGuard Ltd.", /* 1184 */ "Calypso Software Systems, Inc.", /* 1185 */ "ACT Networks Inc.", /* 1186 */ "Kingston Communications", /* 1187 */ "Incite", /* 1188 */ "VVNET, Inc.", /* 1189 */ "Ontario Hydro", /* 1190 */ "CS-Telecom", /* 1191 */ "ICTV", /* 1192 */ "CORE International Inc.", /* 1193 */ "Mibs4You", /* 1194 */ "ITK", /* 1195 */ "Network Integrity, Inc.", /* 1196 */ "BlueLine Software, Inc.", /* 1197 */ "Migrant Computing Services,Inc.", /* 1198 */ "Linklaters & Paines", /* 1199 */ "EJV Partners, L.P.", /* 1200 */ "Guardeonic Solutions Ltd.", /* 1201 */ "VARCOM Corporation", /* 1202 */ "Equitel", /* 1203 */ "The Southern Company", /* 1204 */ "Dataproducts Corporation", /* 1205 */ "National Electrical Manufacturers Association (NEMA)", /* 1206 */ "RISCmanagement, Inc.", /* 1207 */ "GVC Corporation", /* 1208 */ "timonWare Inc.", /* 1209 */ "Capital Resources Computer Corporation", /* 1210 */ "Storage Technology Corporation", /* 1211 */ "Tadiran Telecom TTL.", /* 1212 */ "NCP", /* 1213 */ "Operations Control Systems (OCS)", /* 1214 */ "The NASDAQ Stock Market Inc.", /* 1215 */ "Tiernan Communications, Inc.", /* 1216 */ "Goldman, Sachs Company", /* 1217 */ "Advanced Telecommunications Modules Ltd", /* 1218 */ "Phoenix Data Communications", /* 1219 */ "Quality Consulting Services", /* 1220 */ "MILAN", /* 1221 */ "Instrumental Inc.", /* 1222 */ "Yellow Technology Services Inc.", /* 1223 */ "Mier Communications Inc.", /* 1224 */ "Cable Services Group Inc.", /* 1225 */ "Forte Networks Inc.", /* 1226 */ "American Management Systems, Inc.", /* 1227 */ "Choice Hotels Intl.", /* 1228 */ "SEH Computertechnik Gm Rainer Ellerbrake", /* 1229 */ "McAFee Associates Inc.", /* 1230 */ "Network Intelligent Inc.", /* 1231 */ "Luxcom Technologies, Inc.", /* 1232 */ "ITRON Inc.", /* 1233 */ "Linkage Software Inc.", /* 1234 */ "Spardat AG", /* 1235 */ "VeriFone Inc.", /* 1236 */ "Revco D.S., Inc.", /* 1237 */ "HRB Systems, Inc.", /* 1238 */ "Litton Fibercom", /* 1239 */ "Silex Technology America, Inc.", /* 1240 */ "ProsjektLeveranser AS", /* 1241 */ "Halcyon Inc.", /* 1242 */ "SBB", /* 1243 */ "LeuTek", /* 1244 */ "Zeitnet, Inc", /* 1245 */ "Visual Networks, Inc.", /* 1246 */ "Coronet Systems", /* 1247 */ "SEIKO EPSON CORPORATION", /* 1248 */ "DnH Technologies", /* 1249 */ "Deluxe Data", /* 1250 */ "Michael A. Okulski Inc.", /* 1251 */ "Saber Software Corporation", /* 1252 */ "Mission Systems, Inc.", /* 1253 */ "Siemens Plessey Electronics Systems", /* 1254 */ "Applied Communications Inc,", /* 1255 */ "Transaction Technology, Inc.", /* 1256 */ "HST Ltd", /* 1257 */ "Michigan Technological University Onwuka", /* 1258 */ "Next Level Communications", /* 1259 */ "Instinet Corp.", /* 1260 */ "Analog & Digital Systems Ltd.", /* 1261 */ "Ansaldo Trasporti SpA", /* 1262 */ "ECCI", /* 1263 */ "Imatek Corporation", /* 1264 */ "PTT Telecom bv", /* 1265 */ "Data Race, Inc.", /* 1266 */ "Network Safety Group, Inc.", /* 1267 */ "Application des Techniques Nouvelles en Electronique", /* 1268 */ "MFS Communications Company", /* 1269 */ "Information Services Division", /* 1270 */ "Ciena Corporation", /* 1271 */ "Fujitsu Nexion", /* 1272 */ "Standard Networks, Inc", /* 1273 */ "Scientific Research Corporation", /* 1274 */ "micado SoftwareConsult GmbH", /* 1275 */ "Concert Management Services, Inc.", /* 1276 */ "University of Delaware", /* 1277 */ "Bias Consultancy Ltd.", /* 1278 */ "Micromuse Inc.", /* 1279 */ "Translink Systems", /* 1280 */ "PI-NET", /* 1281 */ "Amber Wave Systems", /* 1282 */ "Superior Electronics Group Inc.", /* 1283 */ "Network Telemetrics Inc", /* 1284 */ "BSW-Data", /* 1285 */ "ECI Telecom Ltd.", /* 1286 */ "BroadVision", /* 1287 */ "ALFA, Inc.", /* 1288 */ "TELEFONICA SISTEMAS, S.A.", /* 1289 */ "Image Sciences, Inc.", /* 1290 */ "MITSUBISHI ELECTRIC INFORMATION NETWORK CORPORATION (MIND)", /* 1291 */ "Central Flow Management Unit", /* 1292 */ "Woods Hole Oceanographic Institution", /* 1293 */ "Raptor Systems, Inc.", /* 1294 */ "TeleLink Technologies Inc.", /* 1295 */ "First Virtual Corporation", /* 1296 */ "Network Services Group", /* 1297 */ "SilCom Manufacturing Technology Inc.", /* 1298 */ "NETSOFT Inc.", /* 1299 */ "Fidelity Investments", /* 1300 */ "Telrad Telecommunications", /* 1301 */ "VERITAS Software Corp.", /* 1302 */ "LeeMah DataCom Security Corporation", /* 1303 */ "Racemi, Inc.", /* 1304 */ "USAir, Inc", /* 1305 */ "Jet Propulsion Laboratory", /* 1306 */ "ABIT Co", /* 1307 */ "Dataplex Pty. Ltd.", /* 1308 */ "Creative Interaction Technologies, Inc.", /* 1309 */ "AimNet Solutions", /* 1310 */ "Unassigned", /* 1311 */ "Klos Technologies, Inc.", /* 1312 */ "ACOTEC", /* 1313 */ "Datacomm Management Sciences Inc.", /* 1314 */ "MG-SOFT d.o.o.", /* 1315 */ "Plessey Tellumat SA", /* 1316 */ "PaineWebber, Inc.", /* 1317 */ "DATASYS Ltd.", /* 1318 */ "QVC Inc.", /* 1319 */ "IPL Systems", /* 1320 */ "Pacific Micro Data, Inc.", /* 1321 */ "DeskNet Systems, Inc", /* 1322 */ "TC Technologies", /* 1323 */ "Racotek, Inc.", /* 1324 */ "CelsiusTech AB", /* 1325 */ "Xing Technology Corp.", /* 1326 */ "dZine n.v.", /* 1327 */ "Electronic merchant Services, Inc.", /* 1328 */ "Linmor Information Systems Management, Inc.", /* 1329 */ "ABL Canada Inc.", /* 1330 */ "University of Coimbra", /* 1331 */ "Iskratel, Ltd., Telecommunications Systems", /* 1332 */ "ISA Co.,Ltd.", /* 1333 */ "CONNECT, Inc.", /* 1334 */ "Digital Video", /* 1335 */ "InterVoice, Inc.", /* 1336 */ "Liveware Tecnologia a Servico a Ltda", /* 1337 */ "Precept Software, Inc.", /* 1338 */ "Heroix Corporation", /* 1339 */ "Holland House B.V.", /* 1340 */ "Dedalus Engenharia S/C Ltda", /* 1341 */ "GEC ALSTHOM I.T.", /* 1342 */ "Deutsches Elektronen-Synchrotron", /* 1343 */ "Avotus Corporation", /* 1344 */ "Dacoll Ltd", /* 1345 */ "NetCorp Inc.", /* 1346 */ "KYOCERA Corporation", /* 1347 */ "The Longaberger Company", /* 1348 */ "ILEX", /* 1349 */ "Conservation Through Innovation, Limited", /* 1350 */ "SeeBeyond Technology Corporation", /* 1351 */ "Multex Systems, Inc.", /* 1352 */ "Gambit Communications, Inc.", /* 1353 */ "Central Data Corporation", /* 1354 */ "CompuCom Systems, Inc.", /* 1355 */ "Generex Systems GMBH", /* 1356 */ "Periphonics Corporation", /* 1357 */ "Freddie Mac", /* 1358 */ "Digital Equipment bv", /* 1359 */ "PhoneLink plc", /* 1360 */ "Voice-Tel Enterprises, Inc.", /* 1361 */ "AUDILOG", /* 1362 */ "SanRex Corporation", /* 1363 */ "Chloride", /* 1364 */ "GA Systems Ltd", /* 1365 */ "Microdyne Corporation", /* 1366 */ "Boston College", /* 1367 */ "France Telecom", /* 1368 */ "Stonesoft Corp", /* 1369 */ "A. G. Edwards & Sons, Inc.", /* 1370 */ "Attachmate Corp.", /* 1371 */ "LSI Logic", /* 1372 */ "interWAVE Communications, Inc.", /* 1373 */ "mdl-Consult", /* 1374 */ "Frobbit AB", /* 1375 */ "Nashoba Networks Inc", /* 1376 */ "Comedia Information AB", /* 1377 */ "Harvey Mudd College", /* 1378 */ "First National Bank of Chicago", /* 1379 */ "Department of National Defence (Canada)", /* 1380 */ "CBM Technologies, Inc.", /* 1381 */ "InterProc Inc.", /* 1382 */ "Glenayre R&D Inc.", /* 1383 */ "Telenet GmbH Kommunikationssysteme", /* 1384 */ "Softlab GmbH", /* 1385 */ "Storage Computer Corporation", /* 1386 */ "CellStack Systems Ltd", /* 1387 */ "Viewgate Networks", /* 1388 */ "Simple Network Magic Corporation", /* 1389 */ "Stallion Technologies Pty Ltd", /* 1390 */ "Loan System", /* 1391 */ "DLR - Deutsche Forschungsanstalt fuer Luft- und Raumfahrt e.V.", /* 1392 */ "ICRA, Inc.", /* 1393 */ "Probita", /* 1394 */ "NEXOR Ltd", /* 1395 */ "American Internation Facsimile Products", /* 1396 */ "Tellabs", /* 1397 */ "DATAX", /* 1398 */ "IntelliSys Corporation", /* 1399 */ "Sandia National Laboratories", /* 1400 */ "Synerdyne Corp.", /* 1401 */ "UNICOM Electric, Inc.", /* 1402 */ "Central Design Systems Inc.", /* 1403 */ "The Silk Road Group, Ltd.", /* 1404 */ "Positive Computing Concepts", /* 1405 */ "First Data Resources", /* 1406 */ "INETCO Systems Limited", /* 1407 */ "NTT Mobile Communications Network Inc.", /* 1408 */ "Target Stores", /* 1409 */ "Advanced Peripherals Technologies, Inc.", /* 1410 */ "Juniper Networks/Funk Software", /* 1411 */ "DunsGate, a Dun and Bradstreet Company", /* 1412 */ "AFP", /* 1413 */ "VertexRSI, Controls and Structures", /* 1414 */ "The Williams Companies, Inc.", /* 1415 */ "ASP Technologies, Inc.", /* 1416 */ "Philips Communication Systems", /* 1417 */ "Dataprobe Inc.", /* 1418 */ "ASTROCOM Corp.", /* 1419 */ "CSTI(Communication Systems Technology, Inc.)", /* 1420 */ "Sprint", /* 1421 */ "Syntax", /* 1422 */ "LIGHT-INFOCON", /* 1423 */ "Performance Technology, Inc.", /* 1424 */ "CXR", /* 1425 */ "Amir Technology Labs", /* 1426 */ "ISOCOR", /* 1427 */ "Array Technology Corportion", /* 1428 */ "Scientific-Atlanta, Inc.", /* 1429 */ "GammaTech, Inc.", /* 1430 */ "Telkom SA Limited", /* 1431 */ "CIREL SYSTEMES", /* 1432 */ "Redflex Limited Australia", /* 1433 */ "Hermes - Enterprise Messaging LTD", /* 1434 */ "Acacia Networks Inc.", /* 1435 */ "NATIONAL AUSTRALIA BANK Ltd.", /* 1436 */ "SineTec Technology Co.,Ltd.", /* 1437 */ "Applied Innovation Inc.", /* 1438 */ "Arizona State University", /* 1439 */ "Xionics Document Technologies, Inc.", /* 1440 */ "Southern Information System Inc.", /* 1441 */ "Nebula Consultants Inc.", /* 1442 */ "SITRE, SA", /* 1443 */ "Paradigm Technology Ltd", /* 1444 */ "Telub AB", /* 1445 */ "Virginia Polytechnic Institute and State University", /* 1446 */ "Martis Oy", /* 1447 */ "ISKRA TRANSMISSION", /* 1448 */ "QUALCOMM Incorporated", /* 1449 */ "AOL / Netscape Communications Corp.", /* 1450 */ "BellSouth Wireless, Inc.", /* 1451 */ "NUKO Information Systems, Inc.", /* 1452 */ "IPC Information Systems, Inc.", /* 1453 */ "Estudios y Proyectos de Telecomunicacion, S.A.", /* 1454 */ "Winstar Wireless", /* 1455 */ "Terayon Corp.", /* 1456 */ "CyberGuard CorporationDavid Rhein", /* 1457 */ "AMCC", /* 1458 */ "Jupiter Technology, Inc.", /* 1459 */ "Delphi Internet Services", /* 1460 */ "Kesmai Corporation", /* 1461 */ "Compact Devices, Inc.", /* 1462 */ "OPTIQUEST", /* 1463 */ "Loral Defense Systems-Eagan", /* 1464 */ "OnRamp Technologies", /* 1465 */ "Mark Wahl", /* 1466 */ "Loran International Technologies, Inc.", /* 1467 */ "S & S International PLC", /* 1468 */ "Atlantech Technologies Ltd.", /* 1469 */ "IN-SNEC", /* 1470 */ "Melita International Corporation", /* 1471 */ "Sharp Laboratories of America", /* 1472 */ "Groupe Decan", /* 1473 */ "Spectronics Micro Systems Limited", /* 1474 */ "varetis COMMUNICATIONS GmbH", /* 1475 */ "ION Networks, Inc.", /* 1476 */ "Telegate GlobalAccess Technology Ltd.", /* 1477 */ "Merrill Lynch & Co., Inc.", /* 1478 */ "JCPenney Co., Inc.", /* 1479 */ "The Torrington Company", /* 1480 */ "GS-ProActive", /* 1481 */ "BarcoNet", /* 1482 */ "vortex Computersysteme GmbH", /* 1483 */ "DataFusion Systems (Pty) Ltd", /* 1484 */ "Allen & Overy", /* 1485 */ "Atlantic Systems Group", /* 1486 */ "Kongsberg Informasjonskontroll AS", /* 1487 */ "ELTECO a.s.", /* 1488 */ "Schlumberger Limited", /* 1489 */ "CNI Communications Network International GmbH", /* 1490 */ "M&C Systems, Inc.", /* 1491 */ "OM Systems International (OMSI) Mats", /* 1492 */ "DAVIC (Digital Audio-Visual Council) Richard", /* 1493 */ "ISM GmbH", /* 1494 */ "E.F. Johnson Co.", /* 1495 */ "Baranof Software, Inc.", /* 1496 */ "University of Texas Houston", /* 1497 */ "Ukiah Software Solutions/EDS/HDS", /* 1498 */ "STERIA", /* 1499 */ "ATI Australia Pty Limited", /* 1500 */ "The Aerospace Corporation Michael", /* 1501 */ "Orckit Communications Ltd.", /* 1502 */ "Tertio Limited", /* 1503 */ "Comsoft Solutions GmbH", /* 1504 */ "Power Center Software LLC", /* 1505 */ "Technologic, Inc.", /* 1506 */ "Vertex Data Science Limited", /* 1507 */ "ESIGETEL", /* 1508 */ "Illinois Business Training Center Weixiong", /* 1509 */ "Arris Networks, Inc.", /* 1510 */ "TeamQuest Corporation", /* 1511 */ "Sentient Networks", /* 1512 */ "Skyrr hf.", /* 1513 */ "Tecnologia y Gestion de la Innovacion", /* 1514 */ "Connector GmbH", /* 1515 */ "Kaspia Systems, Inc.", /* 1516 */ "SmithKline Beecham", /* 1517 */ "NetCentric Corp.", /* 1518 */ "ATecoM GmbH", /* 1519 */ "Citibank Canada", /* 1520 */ "MMS (Matra Marconi Space)", /* 1521 */ "Intermedia Communications, Inc.", /* 1522 */ "School of Computer Science, University Science of Malaysia", /* 1523 */ "University of Limerick", /* 1524 */ "ACTANE", /* 1525 */ "Collaborative Information Technology Research Institute(CITRI)", /* 1526 */ "Intermedium A/S", /* 1527 */ "ANS CO+RE Systems, Inc.", /* 1528 */ "UUNET Technologies, Inc.", /* 1529 */ "Telesciences, Inc.", /* 1530 */ "QSC Audio Products", /* 1531 */ "Australian Department of Employment, Education and Training", /* 1532 */ "Network Media Communications Ltd.", /* 1533 */ "Sodalia", /* 1534 */ "Innovative Concepts, Inc.", /* 1535 */ "Japan Computer Industry Inc.", /* 1536 */ "Telogy Networks, Inc.", /* 1537 */ "Merck & Company, Inc.", /* 1538 */ "GeoTel Communications Corporation", /* 1539 */ "Sun Alliance (UK)", /* 1540 */ "AG Communication Systems", /* 1541 */ "Pivotal Networking, Inc.", /* 1542 */ "TSI TelSys Inc.", /* 1543 */ "Harmonic Systems Incorporated", /* 1544 */ "ASTRONET Corporation", /* 1545 */ "Frontec", /* 1546 */ "NetVision", /* 1547 */ "FlowPoint Corporation", /* 1548 */ "Allied Data Technologies", /* 1549 */ "Nuera Communication Inc.", /* 1550 */ "Radnet Ltd.", /* 1551 */ "Océ Technologies BV", /* 1552 */ "Air France", /* 1553 */ "Communications & Power Engineering, Inc.", /* 1554 */ "Charter Systems", /* 1555 */ "Performance Technologies, Inc.", /* 1556 */ "Paragon Networks International", /* 1557 */ "Skog-Data AS", /* 1558 */ "mitec a/s", /* 1559 */ "THOMSON-CSF / Departement Reseaux d'Entreprise", /* 1560 */ "Ipsilon Networks, Inc.", /* 1561 */ "Kingston Technology Company", /* 1562 */ "Harmonic Lightwaves", /* 1563 */ "InterActive Digital Solutions", /* 1564 */ "Coactive Aesthetics, Inc.", /* 1565 */ "Tech Data Corporation", /* 1566 */ "Z-Com", /* 1567 */ "COTEP", /* 1568 */ "Raytheon Company", /* 1569 */ "Telesend Inc.", /* 1570 */ "NCC", /* 1571 */ "Forte Software, Inc.", /* 1572 */ "McAfee", /* 1573 */ "BEZEQ", /* 1574 */ "TU Braunschweig", /* 1575 */ "Stac Inc.", /* 1576 */ "StarNet Communications", /* 1577 */ "Universidade do Minho", /* 1578 */ "Department of Computer Science, University of Liverpool", /* 1579 */ "Tekram Technology, Ltd.", /* 1580 */ "RATP", /* 1581 */ "Rainbow Diamond Limited", /* 1582 */ "Magellan Communications, Inc", /* 1583 */ "Bay Networks Incorporated", /* 1584 */ "Quantitative Data Systems (QDS)", /* 1585 */ "ESYS Limited", /* 1586 */ "Switched Network Technologies (SNT)", /* 1587 */ "Brocade Communications Systems, Inc.", /* 1588 */ "Computer Resources International A/S (CRI)", /* 1589 */ "Luchtverkeersleiding Nederland", /* 1590 */ "GTIL", /* 1591 */ "XactLabs Corporation", /* 1592 */ "Quest Software, Inc.", /* 1593 */ "TELESYNC", /* 1594 */ "ewt breitbandnetze gmbh", /* 1595 */ "INS GmbH", /* 1596 */ "Distributed Processing Technology", /* 1597 */ "Tivoli Systems Inc.", /* 1598 */ "Network Management Technologies", /* 1599 */ "SIRTI", /* 1600 */ "TASKE Technology Inc.", /* 1601 */ "CANON Inc.", /* 1602 */ "Systems and Synchronous, Inc.", /* 1603 */ "XFER International", /* 1604 */ "Scandpower A/S", /* 1605 */ "Consultancy & Projects Group srl", /* 1606 */ "STS Technologies, Inc.", /* 1607 */ "Mylex Corporation", /* 1608 */ "CRYPTOCard Corporation", /* 1609 */ "LXE, Inc.", /* 1610 */ "BDM International, Inc.", /* 1611 */ "Spacenet Inc.", /* 1612 */ "Datanet GmbH", /* 1613 */ "Opcom, Inc.", /* 1614 */ "Mlink Internet Inc.", /* 1615 */ "SR-Telecom Inc.", /* 1616 */ "Net Partners Inc.", /* 1617 */ "Peek Traffic - Transyt Corp.", /* 1618 */ "Comverse Information Systems", /* 1619 */ "Data Comm for Business, Inc.", /* 1620 */ "CYBEC Pty. Ltd.", /* 1621 */ "Mitsui Knowledge Industry Co.,Ltd.", /* 1622 */ "Tech Laboratories, Inc.", /* 1623 */ "Blockade Systems Corp.", /* 1624 */ "Nixu Oy", /* 1625 */ "Australian Software Innovations (Services) Pty. Ltd.", /* 1626 */ "Omicron Telesystems Inc.", /* 1627 */ "DEMON Internet Ltd.", /* 1628 */ "PB Farradyne, Inc.", /* 1629 */ "Telos Corporation Sharon", /* 1630 */ "Manage Information Technologies", /* 1631 */ "Harlow Butler Broking Services Ltd.", /* 1632 */ "Eurologic Systems Ltd", /* 1633 */ "Telco Research Corporation", /* 1634 */ "Mercedes-Benz AG", /* 1635 */ "HOB GmbH & Co. KG - HOB Germany", /* 1636 */ "NOAA", /* 1637 */ "Cornerstone Software", /* 1638 */ "Wink Communications", /* 1639 */ "Thomson Electronic Information Resources (TEIR)", /* 1640 */ "HITT Holland Institute of Traffic Technology B.V.", /* 1641 */ "KPMG", /* 1642 */ "Loral Federal Systems", /* 1643 */ "S.I.A.- Societa Interbancaria per l'Automazione", /* 1644 */ "United States Cellular Corp.", /* 1645 */ "AMPER DATOS S.A.", /* 1646 */ "Carelcomp Forest Oy", /* 1647 */ "Open Environment Australia", /* 1648 */ "Integrated Telecom Technology, Inc.", /* 1649 */ "Langner Gesellschaft fuer Datentechnik mbH", /* 1650 */ "Wayne State University", /* 1651 */ "SICC (SsangYong Information & Communications Corp.)", /* 1652 */ "THOMSON - CSF", /* 1653 */ "Teleconnect Dresden GmbH", /* 1654 */ "Panorama Software Inc.", /* 1655 */ "CompuNet Systemhaus GmbH", /* 1656 */ "JAPAN TELECOM CO.,LTD.", /* 1657 */ "TechForce Corporation", /* 1658 */ "Granite Systems Inc.", /* 1659 */ "Bit Incorporated", /* 1660 */ "Companhia de Informatica do Parana - Celepar", /* 1661 */ "Rockwell International Corporation", /* 1662 */ "Ancor Communications", /* 1663 */ "Royal Institute of Technology, Sweden (KTH)", /* 1664 */ "SUNET, Swedish University Network", /* 1665 */ "Sage Instruments, Inc.", /* 1666 */ "Candle Corporation", /* 1667 */ "CSO GmbH", /* 1668 */ "M3i Systems Inc.", /* 1669 */ "CREDINTRANS", /* 1670 */ "ADVA Optical Networking Ltd.", /* 1671 */ "Pierce & Associates", /* 1672 */ "RTS Wireless", /* 1673 */ "R.I.C. Electronics", /* 1674 */ "Amoco Corporation", /* 1675 */ "Qualix Group, Inc.", /* 1676 */ "Sahara Networks, Inc.", /* 1677 */ "Hyundai Electronics Industries Co.,Ltd.", /* 1678 */ "RICH, Inc.", /* 1679 */ "Amati Communications Corp.", /* 1680 */ "P.H.U. RysTECH", /* 1681 */ "Data Labs Inc.", /* 1682 */ "Occidental Petroleum Corporation", /* 1683 */ "Rijnhaave Internet Services", /* 1684 */ "Lynx Real-Time Systems, Inc.", /* 1685 */ "QA IT Services Ltd", /* 1686 */ "SofTouch Systems, Inc.", /* 1687 */ "Sonda S.A.", /* 1688 */ "McCormick Nunes Company", /* 1689 */ "Ume E5 Universitet", /* 1690 */ "NetiQ Corporation", /* 1691 */ "Starlight Networks", /* 1692 */ "Informacion Selectiva S.A. de C.V. ( Infosel )", /* 1693 */ "HCL Technologies Limited", /* 1694 */ "Maryville Data Systems, Inc", /* 1695 */ "EtherCom Corp", /* 1696 */ "MultiCom Software", /* 1697 */ "BEA Systems Ltd.", /* 1698 */ "Advanced Technology Ltd.", /* 1699 */ "Mobil Oil", /* 1700 */ "Arena Consulting Limited", /* 1701 */ "Netsys International (Pty) Ltd", /* 1702 */ "Titan Information Systems Corp.", /* 1703 */ "Cogent Data Technologies", /* 1704 */ "Reliasoft Corporation", /* 1705 */ "Midland Business Systems, Inc.", /* 1706 */ "Optimal Networks", /* 1707 */ "Gresham Computing plc", /* 1708 */ "Leidos, Inc.", /* 1709 */ "Acclaim Communications", /* 1710 */ "BISS Limited", /* 1711 */ "Caravelle Inc.", /* 1712 */ "Diamond Lane Communications Corporation", /* 1713 */ "Infortrend Technology, Inc.", /* 1714 */ "Ardatis N.V", /* 1715 */ "Ariel Corporation", /* 1716 */ "Datalex Communications Ltd.", /* 1717 */ "Server Technology Inc.", /* 1718 */ "Unimax Systems Corporation", /* 1719 */ "DeTeMobil GmbH", /* 1720 */ "INFONOVA GmbH", /* 1721 */ "Kudelski SA", /* 1722 */ "Pronet GmbH", /* 1723 */ "Westell, Inc.", /* 1724 */ "Nupon Computing, Inc.", /* 1725 */ "Cianet Ind e Com Ltda (Cianet Networking)", /* 1726 */ "Aumtech of Virginia (amteva)", /* 1727 */ "CheongJo data communication, Inc.", /* 1728 */ "Genesys Telecommunications Laboratories Inc.(Genesys Labs.)", /* 1729 */ "Progress SoftwareAndrew Neumann", /* 1730 */ "ERICSSON FIBER ACCESS", /* 1731 */ "Open Access Pty Ltd", /* 1732 */ "Sterling Commerce", /* 1733 */ "Predictive Systems Inc.", /* 1734 */ "Architel Systems Corporation", /* 1735 */ "QWEST NMS", /* 1736 */ "Eclipse Technologies Inc.", /* 1737 */ "Navy", /* 1738 */ "Bindi Technologies, Pty Ltd", /* 1739 */ "Hallmark Cards Inc.", /* 1740 */ "Object Design, Inc.", /* 1741 */ "Unassigned", /* 1742 */ "Zenith Data Systems (ZDS)", /* 1743 */ "Gobi Corp.", /* 1744 */ "Universitat de Barcelona", /* 1745 */ "Institute for Simulation and Training (IST)", /* 1746 */ "US Agency for International Development", /* 1747 */ "Tut Systems, Inc.", /* 1748 */ "AnswerZ Pty Ltd (Australia)", /* 1749 */ "H.Bollmann Manufacturers Ltd (HBM)", /* 1750 */ "Lucent Technologies", /* 1751 */ "phase2 networks Inc.", /* 1752 */ "Unify Corporation", /* 1753 */ "Gadzoox Microsystems Inc.", /* 1754 */ "Network One, Inc.", /* 1755 */ "MuLogic b.v.", /* 1756 */ "Optical Microwave Networks, Inc.", /* 1757 */ "SITEL, Ltd.", /* 1758 */ "Cerg Finance", /* 1759 */ "American Internet Corporation", /* 1760 */ "PLUSKOM GmbH", /* 1761 */ "Dept. of Communications, Graz University of Technology", /* 1762 */ "EarthLink Inc.", /* 1763 */ "Real Soft, Inc", /* 1764 */ "Apex Voice Communications, Inc.", /* 1765 */ "National DataComm Corporation", /* 1766 */ "Telenor Conax AS", /* 1767 */ "Patton Electronics Company", /* 1768 */ "Digital Fairway Corporation", /* 1769 */ "BroadBand Technologies, Inc.", /* 1770 */ "Myricom, Inc.", /* 1771 */ "DecisionOne", /* 1772 */ "Tandberg Television", /* 1773 */ "AUDITEC SA", /* 1774 */ "PC Magic", /* 1775 */ "Koninklijke Philips Electronics NV", /* 1776 */ "ORIGIN", /* 1777 */ "CSG Systems", /* 1778 */ "Alphameric Technologies Ltd", /* 1779 */ "NCR Austria Michael Ostendorf", /* 1780 */ "ChuckK, Inc.", /* 1781 */ "PowerTV, Inc.", /* 1782 */ "webMethods", /* 1783 */ "Enron Capitol & Trade Resources", /* 1784 */ "ORBCOMM", /* 1785 */ "Jw direct shop", /* 1786 */ "B.E.T.A.", /* 1787 */ "Healtheon", /* 1788 */ "Integralis Ltd.", /* 1789 */ "Folio Corporation", /* 1790 */ "ECTF", /* 1791 */ "WebPlanet", /* 1792 */ "nStor Corporation", /* 1793 */ "Deutsche Bahn AG", /* 1794 */ "Paradyne", /* 1795 */ "Nastel Technologies, Inc.", /* 1796 */ "Metaphase Technology, Inc.", /* 1797 */ "Zweigart & Sawitzki", /* 1798 */ "PIXEL", /* 1799 */ "WaveAccess Inc.", /* 1800 */ "The SABRE Group", /* 1801 */ "Redland Technology Corp.", /* 1802 */ "PBS", /* 1803 */ "Consensus Development Corporation", /* 1804 */ "SAGEM SA", /* 1805 */ "I-Cube Inc.", /* 1806 */ "INTRACOM S.A HELLENIC TELECOMMUNICATION AND ELECTRONICS INDUSTRY)", /* 1807 */ "Aetna, Inc.", /* 1808 */ "Dow Jones Markets, Inc.", /* 1809 */ "Czech Railways s.o. CITJaroslav Militky", /* 1810 */ "Scan-Matic A/S", /* 1811 */ "DECISION Europe Joel CHOTARD", /* 1812 */ "VTEL Corporation", /* 1813 */ "Bloomberg, L.P.", /* 1814 */ "Witness Systems, Inc", /* 1815 */ "Rose-Hulman Institute of Technology", /* 1816 */ "Aether Technologies", /* 1817 */ "Infonet Software SolutionsDavid Hauck", /* 1818 */ "CSTI (Compagnie des Signaux / Technologies Informatiques)Mr Camille Breeus", /* 1819 */ "LEROY MERLINRIGAULT Alain", /* 1820 */ "Total Entertainment Network", /* 1821 */ "Open Port Technology", /* 1822 */ "Mikroelektronik Anwendungszentrum Hamburg GmbHZ", /* 1823 */ "International Management Consulting, Inc.", /* 1824 */ "Fore Systems, Inc.", /* 1825 */ "MTech Systems", /* 1826 */ "RxSoft Ltd.Timothy Madden", /* 1827 */ "Dept. Computer Studies, Loughborough University", /* 1828 */ "Beta80 S.p.A.", /* 1829 */ "Galiso Incorporated", /* 1830 */ "S2 Systems, Inc.", /* 1831 */ "Optivision, Inc.", /* 1832 */ "Countrywide Home Loans", /* 1833 */ "OA Laboratory Co., Ltd.", /* 1834 */ "SDX Business Systems Ltd", /* 1835 */ "West End Systems Corp.", /* 1836 */ "DK Digital Media", /* 1837 */ "Westel", /* 1838 */ "Fujitsu Telecommuncations Europe Limited", /* 1839 */ "Inmarsat", /* 1840 */ "TIMS Technology Ltd", /* 1841 */ "CallWare Technologies", /* 1842 */ "NextLink, L.L.C.", /* 1843 */ "TurnQuay Solutions Limited", /* 1844 */ "Accusort Systems Inc", /* 1845 */ "Deutscher Bundestag", /* 1846 */ "Joint Research Centre", /* 1847 */ "FaxSav", /* 1848 */ "Chevy Chase Applications Design", /* 1849 */ "Bank Brussel Lambert (BBL)", /* 1850 */ "OutBack Resource Group, Inc.", /* 1851 */ "Screen Subtitling Systems Ltd", /* 1852 */ "Cambridge Parallel Processing Ltd", /* 1853 */ "Boston University", /* 1854 */ "News Digital Systems Ltd", /* 1855 */ "NuTek 2000, Inc.", /* 1856 */ "Overland Mobile Communication AB", /* 1857 */ "Axon IT AB", /* 1858 */ "Gradient Medical Systems", /* 1859 */ "WaveSpan Corporation", /* 1860 */ "Net Research, Inc.", /* 1861 */ "Browncroft Community Church", /* 1862 */ "Net2Net Corporation", /* 1863 */ "US Internet", /* 1864 */ "Absolute Time", /* 1865 */ "VPNet", /* 1866 */ "NTech", /* 1867 */ "Nippon Unisoft Corporation", /* 1868 */ "Optical Transmission Labs, Inc.", /* 1869 */ "CyberCash, Inc.", /* 1870 */ "NetSpeed, Inc.", /* 1871 */ "Alteon Networks, Inc.", /* 1872 */ "Internet Middleware Corporation", /* 1873 */ "ISOnova GmbH", /* 1874 */ "Amiga IOPS Project", /* 1875 */ "Softbank Services Group", /* 1876 */ "Sourcecom Corporation", /* 1877 */ "Telia Promotor AB", /* 1878 */ "HeliOss Communications, Inc.", /* 1879 */ "Optical Access International, Inc.", /* 1880 */ "MMC Networks, Inc.", /* 1881 */ "Lanyon Ltd.", /* 1882 */ "Rubico", /* 1883 */ "Quantum Telecom Solutions, Inc.", /* 1884 */ "Archinet", /* 1885 */ "i-cubed Ltd.", /* 1886 */ "Albis Technologies Ltd.", /* 1887 */ "GigaLabs, Inc.", /* 1888 */ "MET Matra-Ericsson", /* 1889 */ "Red Lion Controls (JBM Electronics)", /* 1890 */ "OPTIM Systems, Inc.", /* 1891 */ "Software Brewery", /* 1892 */ "WaveLinQ", /* 1893 */ "Siemens ICN", /* 1894 */ "IEX Corporation", /* 1895 */ "TrueTime", /* 1896 */ "HT Communications Inc.", /* 1897 */ "Avantcomp Oy", /* 1898 */ "InfoVista", /* 1899 */ "Openwave Systems, Inc.", /* 1900 */ "Sea Wonders", /* 1901 */ "HeadStart Enterprise", /* 1902 */ "B-SMART Inc.", /* 1903 */ "ISMA Ltd", /* 1904 */ "3DV Technology, Inc.", /* 1905 */ "StarCom Technologies Inc.", /* 1906 */ "L.L.Bean", /* 1907 */ "NetIcs Inc.", /* 1908 */ "Infratec plus GmbH", /* 1909 */ "3edges", /* 1910 */ "GISE mbHVolkmar Brisse / Hans-Jurgen Laub", /* 1911 */ "lan & pc services", /* 1912 */ "RedPoint Software Corporation", /* 1913 */ "Atempo Inc", /* 1914 */ "I-95-CC", /* 1915 */ "Extreme Networks", /* 1916 */ "Village of Rockville Centre", /* 1917 */ "Swichtec Power Systems", /* 1918 */ "Deutscher Wetterdienst", /* 1919 */ "Bluebird Software", /* 1920 */ "Svaha Interactive Media, Inc.", /* 1921 */ "Sully Solutions", /* 1922 */ "Blue Line", /* 1923 */ "Castleton Network Systems Corp Glen Tracey tracey&castleton.com", /* 1924 */ "Visual Edge Software Ltd.", /* 1925 */ "NetGuard Technologies, Inc.", /* 1926 */ "SoftSell, Inc.", /* 1927 */ "MARNE SOFTWARE", /* 1928 */ "Cadia Networks, Inc.", /* 1929 */ "Milton", /* 1930 */ "Del Mar Solutions, Inc.", /* 1931 */ "KUMARAN SYSTEMS", /* 1932 */ "Equivalence", /* 1933 */ "Homewatch International, Inc.", /* 1934 */ "John Rivers", /* 1935 */ "Remark Services, Inc.", /* 1936 */ "Deloitte & Touche Consulting Group", /* 1937 */ "Flying Penguin Productions", /* 1938 */ "The Matrix", /* 1939 */ "Eastern Computers, Inc.", /* 1940 */ "Princeton BioMedica Inc.", /* 1941 */ "SanCom Technology, Inc.", /* 1942 */ "National Computing Centre Ltd.", /* 1943 */ "Aval Communications", /* 1944 */ "WORTEC SearchNet CO.", /* 1945 */ "Dogwood Media", /* 1946 */ "Allied Domecq", /* 1947 */ "Telesoft Russia", /* 1948 */ "UTStarcom, Inc.", /* 1949 */ "comunit", /* 1950 */ "Traffic Sofware Ltd", /* 1951 */ "Qualop Systems Corp", /* 1952 */ "Vinca Corporation", /* 1953 */ "AMTEC spa", /* 1954 */ "GRETACODER Data Systems AG", /* 1955 */ "KMSystems, Inc.", /* 1956 */ "GEVA", /* 1957 */ "Red Creek Communications, Inc.", /* 1958 */ "BORG Technology Inc.", /* 1959 */ "Concord Electronics", /* 1960 */ "Richard Ricci DDS", /* 1961 */ "Link International Corp.", /* 1962 */ "Intermec Technologies Corp.", /* 1963 */ "OPTIMUM Data AG", /* 1964 */ "DMCNW", /* 1965 */ "Perle Systems Limited", /* 1966 */ "inktomi corporation", /* 1967 */ "TELE-TV Systems, L.P.", /* 1968 */ "Fritz-Haber-Institut", /* 1969 */ "mediaone.net", /* 1970 */ "SeaChange International Peter H.", /* 1971 */ "CASTON Corporation", /* 1972 */ "Local Net", /* 1973 */ "JapanNet", /* 1974 */ "NabiscoKen ChristChristK&nabisco.com", /* 1975 */ "micrologica GmbH", /* 1976 */ "Network Harmoni, Inc.", /* 1977 */ "SITA ADS", /* 1978 */ "Global Maintech Corporation", /* 1979 */ "Tele2 AB", /* 1980 */ "EMC CLARiiON Advanced Storage Solutions", /* 1981 */ "ITS Corporation", /* 1982 */ "CleverSoft, Inc.", /* 1983 */ "The Perseus Group, Inc.", /* 1984 */ "Joe's WWW Pages", /* 1985 */ "Everything Internet Store", /* 1986 */ "Numara Software, Inc", /* 1987 */ "Lycoming County PA", /* 1988 */ "Statens Institutions styrelse SiS", /* 1989 */ "INware Solutions Inc.", /* 1990 */ "Brocade Communication Systems, Inc.", /* 1991 */ "Deutsche Bank", /* 1992 */ "Xyratex", /* 1993 */ "Bausch Datacom B.V.", /* 1994 */ "Advanced Radio Telecom (ART)", /* 1995 */ "Copper Mountain Communications Inc.", /* 1996 */ "PlaNet Software Inc.", /* 1997 */ "Carltan Computer Corporation", /* 1998 */ "Littva Mitchell, Inc.", /* 1999 */ "TIBCO Inc.", /* 2000 */ "Oki Data Corporation", /* 2001 */ "GoTel", /* 2002 */ "Adobe Systems Incorporated", /* 2003 */ "Sentricity", /* 2004 */ "Aeroports De Paris", /* 2005 */ "ECONZ Ltd", /* 2006 */ "TELDAT, S.A.", /* 2007 */ "Offset Info Service srl", /* 2008 */ "A. J. Boggs & Company", /* 2009 */ "Stale Odegaard AS", /* 2010 */ "HUAWEI Technology Co.,Ltd", /* 2011 */ "Schroff GmbH", /* 2012 */ "Rehabilitation Institute of Chicago Angie", /* 2013 */ "ADC Telecommunications, Inc.", /* 2014 */ "SYSTOR AG", /* 2015 */ "GraIyMage, Inc.", /* 2016 */ "Symicron Computer Communications Ltd.", /* 2017 */ "Scandorama AB", /* 2018 */ "I-NET", /* 2019 */ "Xland, Ltd.", /* 2020 */ "U.C. Davis, ECE Dept. Tom", /* 2021 */ "CANARY COMMUNICATIONS, Inc.", /* 2022 */ "NetGain", /* 2023 */ "West Information Publishing Group", /* 2024 */ "Deutsche Bundesbank", /* 2025 */ "Broadxent, Inc", /* 2026 */ "Gauss Interprise AG", /* 2027 */ "Aldiscon", /* 2028 */ "Vivid Image", /* 2029 */ "AfriQ*Access, Inc.", /* 2030 */ "Reliant Networks Corporation Steven", /* 2031 */ "Mavenir Systems", /* 2032 */ "McKinney Lighting & Sound", /* 2033 */ "Whole Systems Design, Inc.", /* 2034 */ "O'Reilly & Associates, Inc.", /* 2035 */ "Quantum Corporation", /* 2036 */ "Ernst and Young LLP", /* 2037 */ "Teleware Oy", /* 2038 */ "Fiducia Informationszentrale AG Ian", /* 2039 */ "Kinetics, Inc.", /* 2040 */ "EMCEE Broadcast Products", /* 2041 */ "Clariant Corporation", /* 2042 */ "IEEE 802.5", /* 2043 */ "Open Development Corporation", /* 2044 */ "RFG SystemsRamon Ferreris", /* 2045 */ "Aspect Telecommunications", /* 2046 */ "Leo & Associates", /* 2047 */ "SoftLinx, Inc.", /* 2048 */ "Generale Bank", /* 2049 */ "Windward Technologies Inc.", /* 2050 */ "NetSolve, Inc.", /* 2051 */ "Xantel", /* 2052 */ "arago, Institut fuer komplexes Datenmanagement GmbH", /* 2053 */ "Kokusai Denshin Denwa Co., Ltd", /* 2054 */ "GILLAM-SATEL", /* 2055 */ "MOEBIUS SYSTEMS", /* 2056 */ "Financial Internet Technology", /* 2057 */ "MARC Systems", /* 2058 */ "Bova Gallery", /* 2059 */ "OSx Telecomunicacoes", /* 2060 */ "Telecom Solutions", /* 2061 */ "CyberIQ Systems", /* 2062 */ "Ardent Communications Corporation", /* 2063 */ "Aware, Inc.", /* 2064 */ "Racal Radio Limited", /* 2065 */ "Control Resources Corporation", /* 2066 */ "Advanced Fibre Communications (AFC)", /* 2067 */ "Elproma Electronica B.V.", /* 2068 */ "MTA SZTAKI", /* 2069 */ "Consensys Computers Inc", /* 2070 */ "Jade Digital Research Co.", /* 2071 */ "Byte This Interactive Pty.Ltd. Mike", /* 2072 */ "Financial Network Technologies Inc.", /* 2073 */ "BROKAT Informationssysteme GmbH", /* 2074 */ "MediaWise Networks", /* 2075 */ "Future Software", /* 2076 */ "Commit Information Systems", /* 2077 */ "Virtual Access Ltd", /* 2078 */ "JDS FITEL Inc.", /* 2079 */ "IPM DATACOM", /* 2080 */ "StarBurst Communications Corporation Kevin", /* 2081 */ "Tollgrade Communications, Inc.", /* 2082 */ "Orange Services US", /* 2083 */ "Sanken Electric Co., Ltd.", /* 2084 */ "Isolation Systems Limited", /* 2085 */ "AVIDIA Systems, Inc.", /* 2086 */ "Cidera-Mainstream Services", /* 2087 */ "Radstone Technology Plc", /* 2088 */ "Philips Business Communications", /* 2089 */ "FMS Services", /* 2090 */ "Supernova Communications", /* 2091 */ "Murphy & Murphy Real Estate", /* 2092 */ "Multi-Platform Information Systems", /* 2093 */ "Allegro Consultants, Inc.", /* 2094 */ "AIAB", /* 2095 */ "Preview Multimedia Services", /* 2096 */ "Access Beyond", /* 2097 */ "SunBurst Technology, Inc.", /* 2098 */ "sotas", /* 2099 */ "CyberSouls Eternal Life Systems Inc.", /* 2100 */ "HANWHA CORP./TELECOM", /* 2101 */ "COMET TELECOMMUNICATIONS INC", /* 2102 */ "CARY SYSTEMS, Inc.", /* 2103 */ "Peerless Systems Corp Frank", /* 2104 */ "Adicom Wireless, Inc", /* 2105 */ "High Technology Software Corp", /* 2106 */ "Lynk", /* 2107 */ "Robin's Limousine", /* 2108 */ "Secant Network Tech", /* 2109 */ "Orion Pictures Corporation", /* 2110 */ "Global Village Communication, Inc.", /* 2111 */ "ioWave, Inc.", /* 2112 */ "Signals and Semaphores", /* 2113 */ "Mayo Foundation", /* 2114 */ "KRONE AG", /* 2115 */ "Computer Networking Resources, Inc", /* 2116 */ "Telenetworks", /* 2117 */ "Staffordshire University", /* 2118 */ "Broadband Networks Inc.", /* 2119 */ "Federal Aviation Administration", /* 2120 */ "Technical Communications Corporation", /* 2121 */ "REZO+", /* 2122 */ "GrafxLab, Inc.", /* 2123 */ "Savant Corp", /* 2124 */ "COMTEC SYSTEMS CO.,LTD. DEOK-HYOENG", /* 2125 */ "Satcom Media", /* 2126 */ "UconX Corporation", /* 2127 */ "TPG Network", /* 2128 */ "CNJ Incorporated", /* 2129 */ "Greenbrier & Russel", /* 2130 */ "mainnet", /* 2131 */ "Comnet DatensystemeHolger Zimmermanhzimmermann&cnd.de", /* 2132 */ "Novadigm, Inc.", /* 2133 */ "Alfatech, Inc.", /* 2134 */ "Financial Sciences Corporation Gary", /* 2135 */ "Electronics For Imaging, Inc.", /* 2136 */ "Casabyte", /* 2137 */ "AssureNet Pathways, Inc.", /* 2138 */ "Alexander LAN, Inc.", /* 2139 */ "Gill-Simpson", /* 2140 */ "MCNS, L.P.", /* 2141 */ "Future Systems, Inc.", /* 2142 */ "IMGIS", /* 2143 */ "Skywire Corporation", /* 2144 */ "Irdeto Access B. V.", /* 2145 */ "Peasantworks", /* 2146 */ "Onion Peel Software", /* 2147 */ "PS Partnership", /* 2148 */ "IRdg, Inc.", /* 2149 */ "SDS Ltd.", /* 2150 */ "Promus Hotel Corporation Oscar Pearce", /* 2151 */ "Cavid Lawrence Center", /* 2152 */ "Insider Technologies Ltd Paul Hancock", /* 2153 */ "Berkeley Networks", /* 2154 */ "Infonautics Corporation", /* 2155 */ "Easy Software", /* 2156 */ "CESG", /* 2157 */ "SALIX Technologies, Inc.", /* 2158 */ "Essential Communications", /* 2159 */ "University of Hawaii", /* 2160 */ "Foxtel Management Pty", /* 2161 */ "ZOHO Corporation", /* 2162 */ "Vayris, S.A.", /* 2163 */ "Telecom Multimedia Systems, Inc.", /* 2164 */ "Guardall Ltd.", /* 2165 */ "WKK SYSTEMS, Inc.", /* 2166 */ "Prominet Corporation", /* 2167 */ "LMC Lan Management Consulting GmbH", /* 2168 */ "Lewis Enterprise", /* 2169 */ "Teles AG", /* 2170 */ "PCSI (Phoenix Control) Wayne Edward", /* 2171 */ "Fourth Wave Designs, Inc.", /* 2172 */ "MediaGate, Inc.", /* 2173 */ "Interactive Online Services, Inc.", /* 2174 */ "Mutek Transcom Ltd.", /* 2175 */ "University of Dortmund, IRB", /* 2176 */ "Network Diagnostic Clinic", /* 2177 */ "TSI - Telecom Systems Ltd.", /* 2178 */ "WireSpeed Comm. Corp.", /* 2179 */ "Versanet Communications, Inc.", /* 2180 */ "EUnet Communications Services BV", /* 2181 */ "pow communications", /* 2182 */ "AMCommunications Inc.", /* 2183 */ "Open Architecture Systems Integration Solutions (OASIS),Inc.", /* 2184 */ "NetPartner s.r.o.", /* 2185 */ "Vina Technologies", /* 2186 */ NULL, /* 2187 */ NULL, /* 2188 */ "Deutsches Klimarechenzentrum GmbH", /* 2189 */ "ABSYSSClaude-Aime MOTONGANEmotongane&absyss.fr", /* 2190 */ "Quadrophonics, Inc.", /* 2191 */ "Hypercore Technology Inc.", /* 2192 */ "OBTK, Inc., dba Network Designs Corporation", /* 2193 */ "VOIS Corporation", /* 2194 */ "IXO S.A.", /* 2195 */ "Macro4 Open Systems Ltd.", /* 2196 */ "RSA Security", /* 2197 */ "NextWave Wireless Inc.", /* 2198 */ "Pisces Consultancy", /* 2199 */ "TPS Call Sciences, Inc (TPS) Paul L.", /* 2200 */ "ICONSULT", /* 2201 */ "Third Point Systems", /* 2202 */ "MAS Technology Ltd.", /* 2203 */ "Advanced Logic Research, Inc.(ALR)", /* 2204 */ "Documentum, Inc.", /* 2205 */ "Siemens Business Communication Systems, Inc.", /* 2206 */ "Telmax Communications Corp.", /* 2207 */ "Zypcom, Inc.", /* 2208 */ "Remote Sense", /* 2209 */ "OOTek Corporation", /* 2210 */ "eSoft, Inc.", /* 2211 */ "anydata limited", /* 2212 */ "Data Fellows Ltd.", /* 2213 */ "Productions Medialog Inc.", /* 2214 */ "Inovamerci, Lda", /* 2215 */ "OKITEC", /* 2216 */ "Vertex Networks Inc.", /* 2217 */ "Pulse Communications", /* 2218 */ "CXA Communications Ltd.", /* 2219 */ "IDD Information Service", /* 2220 */ "Atlas Computer Equipment, Inc.", /* 2221 */ "Syntegra", /* 2222 */ "CCC Information Services", /* 2223 */ "W. Quinn Associates", /* 2224 */ "Broadcom Eireann Research Ltd.", /* 2225 */ "Risk Management Services llc", /* 2226 */ "Watkins-Johnson Company", /* 2227 */ "Eric E. Westbrook", /* 2228 */ "Martinho-Davis Systems Inc.", /* 2229 */ "XYPOINT Corporation", /* 2230 */ "Innovat Communications, Inc.", /* 2231 */ "Charleswood & Co.", /* 2232 */ "ID Software AS", /* 2233 */ "Telia AB", /* 2234 */ "Exploration Enterprises, Inc.", /* 2235 */ "Daimler-Benz Aerospace AG", /* 2236 */ "Xara Networks Ltd.", /* 2237 */ "The FreeBSD Project", /* 2238 */ "World Merchandise Exchange (WOMEX) Ltd.", /* 2239 */ "lysis", /* 2240 */ "CFL Research", /* 2241 */ "NET-TEL Computer Systems Limited", /* 2242 */ "Sattel Communications", /* 2243 */ "Promatory Communications Inc.", /* 2244 */ "Catalogic Software Inc.", /* 2245 */ "LloydsTSB Group Plc", /* 2246 */ "IT Consultancy Engineering Management Group Ltd.", /* 2247 */ "LITE-ON COMMUNICATIONS Corp.", /* 2248 */ "The New Millennium", /* 2249 */ "Quatraco Yugoslavia", /* 2250 */ "BR Business Systems", /* 2251 */ "WheelGroup Corporation Jonathan", /* 2252 */ "Ultimate Technology, Inc.", /* 2253 */ "Delta Electronics, Inc.", /* 2254 */ "Waffle Productions", /* 2255 */ "Korea Internet", /* 2256 */ "Selex Communications Limited", /* 2257 */ "THOMSON BROADCAST SYSTEMS", /* 2258 */ "Workflow Automation Company Ltd.", /* 2259 */ "Associated RT, Inc.", /* 2260 */ "DRS Codem Systems", /* 2261 */ "RIGHT TIME WATCH CENTER FELIX", /* 2262 */ "Advanced-Vision Technologies, Inc.", /* 2263 */ "Applied Intelligence Group Dana", /* 2264 */ "Acorn Computers Ltd.", /* 2265 */ "Tempest Consulting Inc.", /* 2266 */ "Digital Sound Corporation", /* 2267 */ "Fastlan Solutions, Inc.", /* 2268 */ "Ordinox Network, Inc.", /* 2269 */ "Telinc Corporation", /* 2270 */ "DRS Consulting Group", /* 2271 */ "Rapid City Communication", /* 2272 */ "Invisible Fence Sales Company", /* 2273 */ "Troika Management Services", /* 2274 */ "VXtreme Inc.", /* 2275 */ "CryptSoft Pty Ltd", /* 2276 */ "Brooktrout Technology", /* 2277 */ "GRASS mbH", /* 2278 */ "EPiCon Inc.", /* 2279 */ "SAD Trasporto Locale S.p.a", /* 2280 */ "Giganet Ltd", /* 2281 */ "INCAA Informatica Italia srl", /* 2282 */ "Vermont Firmware Corporation", /* 2283 */ "Automated Concepts", /* 2284 */ "Flash Networks Ltd", /* 2285 */ "Oracom Inc.", /* 2286 */ "Shell Services Company", /* 2287 */ "Black Pigs of Death", /* 2288 */ "N3ERZ", /* 2289 */ "Technology Rendezvous Inc.", /* 2290 */ "ZapNet! Inc.", /* 2291 */ "Premier Technologies", /* 2292 */ "Tennyson Technologies", /* 2293 */ "Dot Hill Systems", /* 2294 */ "DH Technology, Inc.", /* 2295 */ "DAGAZ Technologies, Inc.", /* 2296 */ "Ganymede Software Inc.", /* 2297 */ "Tele-Communications Inc.", /* 2298 */ "FreeGate Corportation", /* 2299 */ "MainControl Inc.", /* 2300 */ "Luminate Software Corp.", /* 2301 */ "K2Net", /* 2302 */ "Aurora Communciations Pty. Ltd.", /* 2303 */ "LANscape Limited", /* 2304 */ "Gateway Technologies Inc.", /* 2305 */ "Zergo Limited", /* 2306 */ "C4U Solutions", /* 2307 */ "BOLL Engineering AG", /* 2308 */ "Internet Mail Consortium", /* 2309 */ "College of Mathematics and Science - Univ. of Central Oklahoma", /* 2310 */ "Institute for Applied Supercomputing - CSUSB", /* 2311 */ "Red Hat Software", /* 2312 */ "Legal & General Assurance Society Ltd.", /* 2313 */ "Fire Networks Inc.", /* 2314 */ "icti", /* 2315 */ "Internet Communication Security", /* 2316 */ "TALX Corporation", /* 2317 */ "Repeater Technologies Inc.", /* 2318 */ "Aumtech Inc.", /* 2319 */ "EuroSInet", /* 2320 */ "ke Kommunikations-Elektronik", /* 2321 */ "Starvision Multimedia Corp.", /* 2322 */ "Alcatel Telecom ASD", /* 2323 */ "AVAL DATA Coporation", /* 2324 */ "Pacific Northwest National Laboratory", /* 2325 */ "Tortoise Software Systems", /* 2326 */ "Verio, Inc.", /* 2327 */ "ArrayComm, Inc.", /* 2328 */ "DST Systems Inc.", /* 2329 */ "Vision Service Plan", /* 2330 */ "Best Buy", /* 2331 */ "Shared Network Services (SNS)", /* 2332 */ "BBC", /* 2333 */ "Packeteer Inc.", /* 2334 */ "Applied Digital Access", /* 2335 */ "HIS Technologies", /* 2336 */ "DNE Technologies, Inc.", /* 2337 */ "Vertical Networks, Inc.", /* 2338 */ "CSoft Ltd.", /* 2339 */ "National Grocers", /* 2340 */ "Reliance Computer Corp.", /* 2341 */ "AK-NORD EDV Vertriebsges mbH", /* 2342 */ "Financial Technologies International", /* 2343 */ "SpaceWorks, Inc.", /* 2344 */ "Torrent Networking Technologies Corp.", /* 2345 */ "CTI", /* 2346 */ "Datastream International Abbas Foroughi", /* 2347 */ "Killion Inc.", /* 2348 */ "Mission Critical Software, Inc.", /* 2349 */ "Data Research and Applications, Inc.", /* 2350 */ "Resonate Inc.", /* 2351 */ "Ericsson, Inc.", /* 2352 */ "Nexware Corporation", /* 2353 */ "ADC Wireless Systems", /* 2354 */ "ITIS", /* 2355 */ "LANCOM Systems", /* 2356 */ "PSIMED Corporation", /* 2357 */ "Transfer Data Test GmbH", /* 2358 */ "T.I.P. Group S.A.", /* 2359 */ "Redlink", /* 2360 */ "Japan Information Engineering Co, Ltd.", /* 2361 */ "Richter Systems Development, Inc.", /* 2362 */ "Eurocontrol MAS UAC", /* 2363 */ "Konica Corporation", /* 2364 */ "Viacom", /* 2365 */ "XIOtech Corporation", /* 2366 */ "IMS Gesellschaft fuer Informations- und Managementsysteme mbH", /* 2367 */ "Softworks", /* 2368 */ "MobileWare Corporation", /* 2369 */ "Memco Software Ltd.", /* 2370 */ "Advanced TechCom, Inc.", /* 2371 */ "Bedford Associates, Inc.", /* 2372 */ "CyberWizard, Inc.", /* 2373 */ "SMART Technologies, Inc.", /* 2374 */ "Concentric Network Corporation", /* 2375 */ "The SNMP WorkShop", /* 2376 */ "Reltec Corp", /* 2377 */ "Nera", /* 2378 */ "Nations Bank", /* 2379 */ "Integrated Design Techniques Limited", /* 2380 */ "OpenLink Software, Inc.", /* 2381 */ "NetReality, Inc.", /* 2382 */ "Imation Corp.", /* 2383 */ "SIBIS Ltd.", /* 2384 */ "SHARP Corporation", /* 2385 */ "Desktop Data, Inc.", /* 2386 */ "Telecom Device K.K.", /* 2387 */ "Captech Communication Inc.", /* 2388 */ "Performance Telecom Corp.", /* 2389 */ "Com'X", /* 2390 */ "Karim", /* 2391 */ "Systems Integration Group", /* 2392 */ "Witcom Innovative Radio Systems", /* 2393 */ "S.F. Software", /* 2394 */ "MARBEN Italia S.p.A.", /* 2395 */ "ActivCard, Inc.", /* 2396 */ "Cognos, Inc.", /* 2397 */ "Eagle Traffic Control Systems W.L.(Bud)", /* 2398 */ "Netwave", /* 2399 */ "Hemet.net", /* 2400 */ "NBX Corporation", /* 2401 */ "Al-Bader Shipping & Gen. Cont. Co. Domnic Faia", /* 2402 */ "@Home Network", /* 2403 */ "Primeur", /* 2404 */ "ILTS Inc.", /* 2405 */ "Computer Generation, Inc.", /* 2406 */ "Mouton Noir Enterprises Inc.", /* 2407 */ "Baystate Sound & Recording", /* 2408 */ "Metapath Corporation", /* 2409 */ "Tajeet Gourmet Food Manufacturing", /* 2410 */ "Telcel", /* 2411 */ "Intertrader Ltd", /* 2412 */ "Maxtronics", /* 2413 */ "Spiderplant", /* 2414 */ "Software.com, Inc.", /* 2415 */ "Adherent Systems Ltd", /* 2416 */ "Korfmacher", /* 2417 */ "Svenska EDIT AB", /* 2418 */ "MLM5000", /* 2419 */ "INIT", /* 2420 */ "Teltone Corporation", /* 2421 */ "Faircross Computers", /* 2422 */ "Carycom (H.K.) LTD", /* 2423 */ "Dominio Publico Internet, S.L.", /* 2424 */ "bkr - Network Systems", /* 2425 */ "Mariposa Technology, Inc.", /* 2426 */ "Brocade Communications Systems, Inc.", /* 2427 */ "Uninett", /* 2428 */ "A.C.E.", /* 2429 */ "Oy Comptel Ab", /* 2430 */ "mms Communication GmbH", /* 2431 */ "Sortova Consulting Group, Inc.", /* 2432 */ "ENVOY Corporation", /* 2433 */ "Metron Technology Limited", /* 2434 */ "Brother Industries, Ltd.", /* 2435 */ "NetCom Systems, Inc.", /* 2436 */ "Kapsch AG.", /* 2437 */ "Shomiti Systems", /* 2438 */ "Computerm Corporation", /* 2439 */ "Efficient IP", /* 2440 */ "CertiSoft Tecnologia Ltda.", /* 2441 */ "EDI Enterprises, Inc.", /* 2442 */ "CCII Systems (Pty) Ltd", /* 2443 */ "Connetix, Inc.", /* 2444 */ "TUNIX Open System Consultants", /* 2445 */ "GNP Computers", /* 2446 */ "Intercope International", /* 2447 */ "NXT", /* 2448 */ "Pan Dacom Forcom Telekommunikationssysteme GmbH", /* 2449 */ "Auco, Inc.", /* 2450 */ "Tecnotree", /* 2451 */ "Helax AB", /* 2452 */ "Omtool Ltd.", /* 2453 */ "G-connect", /* 2454 */ "Dynamic Mutual Funds", /* 2455 */ "Antec Network Technologies", /* 2456 */ "Premiere Promotions", /* 2457 */ "LANQuest", /* 2458 */ "Guardian Bank p. Zagreb", /* 2459 */ "ihlas net", /* 2460 */ "WAVTrace", /* 2461 */ "VIGGEN Corporation", /* 2462 */ "SAIF ALI CO., Ltd.", /* 2463 */ "CARYNET Information Center", /* 2464 */ "Application Telematiques, Numeriques et Reseaux (ATNR)", /* 2465 */ "Channelmatic-LIMT, Inc.", /* 2466 */ "ArrowPoint Communications Inc.", /* 2467 */ "Ingrasys", /* 2468 */ "Netbuilding", /* 2469 */ "Personal & Confidential Klaus", /* 2470 */ "Comsys International B.V.", /* 2471 */ "Advance Telecommunication Krisada Arjinpattara", /* 2472 */ "GateKey Solutions, Inc.", /* 2473 */ "Avici Systems, Inc.", /* 2474 */ "Sierra Technology, Inc.John Fischerjfischer&stisierra.com", /* 2475 */ "Encanto Networks Inc.", /* 2476 */ "Mount Olive College", /* 2477 */ "FUJITSU ACCESS LIMITED", /* 2478 */ "EDS GmbH", /* 2479 */ "Jyra Research Inc.", /* 2480 */ "Summit Communications", /* 2481 */ "Ministry of Transport, Public Works and Water Management", /* 2482 */ "WinNet MCS Inc.", /* 2483 */ "ICG Communications", /* 2484 */ "CrossLink Internet Services", /* 2485 */ "Cygnus Computer Associates, Ltd.", /* 2486 */ "Phoenix Technologies Ltd.", /* 2487 */ "Internetclub", /* 2488 */ "CV. MITRA ADI PRANATA Ir. Fx Wahyu Hartono", /* 2489 */ "Vixel Corporation", /* 2490 */ "Atmosphere Networks Inc.", /* 2491 */ "Montana Tel-Net", /* 2492 */ "JCP Computer Services Ltd.", /* 2493 */ "Inter Clear Service Ltd.", /* 2494 */ "Internet Systems Consortium, Inc.", /* 2495 */ "LightSpeed International, Inc.", /* 2496 */ "GammaGraphX, Inc.", /* 2497 */ "iManage Inc.", /* 2498 */ "Internet Security Systems", /* 2499 */ "Vienna Systems Corporation", /* 2500 */ "Yago Systems, Inc.", /* 2501 */ "LunarWave Communications", /* 2502 */ "Bangkok Pattaya Hospital", /* 2503 */ "Roke Manor Research Limited Keith", /* 2504 */ "New Oak Communications, Inc.", /* 2505 */ "Bug Free Development", /* 2506 */ "ARC Technologies Group, Inc.", /* 2507 */ "Internet Dynamics, Inc.", /* 2508 */ "Digital Microwave Corp.", /* 2509 */ "Bear Mountain Software", /* 2510 */ "AccessLAN Communications,Inc.", /* 2511 */ "Crossroads Systems, Inc.", /* 2512 */ "CR2A-DI", /* 2513 */ "Mantra Communications Inc.", /* 2514 */ "DiscoverNet", /* 2515 */ "VocalTec Communications Ltd.", /* 2516 */ "Riversoft Limited", /* 2517 */ "Phaos Technology Corp.", /* 2518 */ "POWEREDCOM, Inc.", /* 2519 */ "Internet Systems Inc.", /* 2520 */ "ComConsult", /* 2521 */ "Osicom Technologies", /* 2522 */ "Hitron Technology Inc.", /* 2523 */ "Rabenstein Enterprises", /* 2524 */ "AT Sistemas, C.A.", /* 2525 */ "iPass Inc.", /* 2526 */ "InterLinear Technology Inc", /* 2527 */ "World One Telecom Ltd", /* 2528 */ "Quadritek Systems, Inc.", /* 2529 */ "Syseca", /* 2530 */ "NetSpeak Corporation", /* 2531 */ "OpNet Inc.", /* 2532 */ "MRM Consulting", /* 2533 */ "TNSys-Trading Net System", /* 2534 */ "JCMT", /* 2535 */ "Endeavour Hills Computer Services", /* 2536 */ "Diversified Technology, Inc.", /* 2537 */ "Lateral Management Limited", /* 2538 */ "Proxy Software Systems Ltd.", /* 2539 */ "Combox Ltd.", /* 2540 */ "Spectrix Corporation", /* 2541 */ "Electronics and Telecommunications Research Institute", /* 2542 */ "Arlotto Comnet, Inc.", /* 2543 */ "ADVA AG Optical Networking", /* 2544 */ "NewTec GmbH Systementwicklung und Beratung Harald", /* 2545 */ "PVT a.s. - pvt.net", /* 2546 */ "Catholic University of Pelotas", /* 2547 */ "Cryptonym Corporation", /* 2548 */ "Aker Consultoria e Informatica Rodrigo Ormonde", /* 2549 */ "ELVIS-PLUS", /* 2550 */ "Telegyr Systems", /* 2551 */ "Netegrity, Inc.", /* 2552 */ "Cardinal Network, New Zealand Ltd", /* 2553 */ "Micro Integrated Innnovations Paul", /* 2554 */ "JayaTek Sdn. Bhd.", /* 2555 */ "Central Electronic Industry", /* 2556 */ "Transcend Access Systems, Inc.", /* 2557 */ "Outreach Communications Corp.", /* 2558 */ "BocaTel", /* 2559 */ "AT&T GNMC Amsterdam", /* 2560 */ "Teamphone.com Ltd,", /* 2561 */ "SBB Software Beratung GmbH", /* 2562 */ "Comstat DataComm Corporation", /* 2563 */ "The Network Technology Group", /* 2564 */ "Avery Dennison", /* 2565 */ "ROHDE & SCHWARZ GmbH & Co.KG", /* 2566 */ "Datamedia SA", /* 2567 */ "Integrix, Inc.", /* 2568 */ "Telenor Novit AS", /* 2569 */ "Prefered Communications", /* 2570 */ "Mu'Tah University", /* 2571 */ "Network TeleSystems, Inc.", /* 2572 */ "Decision-Science Applications,Inc. Simeon Fitch", /* 2573 */ "Concentricity, LLC", /* 2574 */ "Artiza Networks Inc.", /* 2575 */ "ComputerShare Systems Limited", /* 2576 */ "EDR Technologies", /* 2577 */ "AbirNet", /* 2578 */ "Trikota, Inc.", /* 2579 */ "Diebold Company of Canada Limited Rajan Raman", /* 2580 */ "Precise Connectivity Solutions", /* 2581 */ "ANS Communications", /* 2582 */ "Hydro-Quebec TransEnergie", /* 2583 */ "RadioLAN, Inc.", /* 2584 */ "Youth Opportunities Upheld, Inc.", /* 2585 */ "Teracom AB", /* 2586 */ "Freemont Avenue Software, Inc.", /* 2587 */ "Positron Fiber Systems", /* 2588 */ "Chuo Electronics, Co., Ltd.", /* 2589 */ "Minolta Co., Ltd.", /* 2590 */ "Radyne Corporation", /* 2591 */ "NSI Software", /* 2592 */ "Exstream PC", /* 2593 */ "Simulation Laboritories Inc.", /* 2594 */ "WebTV Networks, Inc.", /* 2595 */ "Credit Management Solutions, Inc.", /* 2596 */ "Chisholm Technologies Inc.", /* 2597 */ "WonderNet International Corp", /* 2598 */ "Percpetics Corporation", /* 2599 */ "Distributed Systems Logic, Inc.", /* 2600 */ "US West !nterprise Networking Services", /* 2601 */ "Intrasoft Corporation", /* 2602 */ "Allot Communications", /* 2603 */ "Sophos Plc", /* 2604 */ "TaylorMade-Math", /* 2605 */ "Rittal-Werk Rudolf Loh GmbH & Co.KG", /* 2606 */ "LAN International, Inc.", /* 2607 */ "Precise Software Solutions", /* 2608 */ "New Prime Inc.", /* 2609 */ "DataHaven Project, Inc.", /* 2610 */ "Interspeed", /* 2611 */ "MPI Tech a/s", /* 2612 */ "Accelerated Networks, Inc.", /* 2613 */ "Forschungszentrum Karlsruhe GmbH", /* 2614 */ "ixMicro", /* 2615 */ "CAO Diffusion", /* 2616 */ "Computer Communications Consulting, Inc.", /* 2617 */ "Tracewell Systems, Inc.", /* 2618 */ "Advanced Internet Management, Inc.", /* 2619 */ "Check Point Software Technologies Ltd", /* 2620 */ "Martin Zwernemann", /* 2621 */ "Amarex Technology, Inc.", /* 2622 */ "ASUSTek Computer Inc.", /* 2623 */ "Wave Wireless Networking", /* 2624 */ "FCI Telecommunications Corporation", /* 2625 */ "Entuity Limited", /* 2626 */ "TCAM Systems (UK) Ltd", /* 2627 */ "Natural MicroSystems", /* 2628 */ "City of Wauwatosa", /* 2629 */ "The Esys Corporation", /* 2630 */ "Altvater Airdata Systems GmbH Peter Haaf", /* 2631 */ "PT Wiryamas Sinar Palapa", /* 2632 */ "Compucentre", /* 2633 */ "Western Telematic, Inc.", /* 2634 */ "ADTX", /* 2635 */ "Juniper Networks, Inc.", /* 2636 */ "Aptis Communications, Inc.", /* 2637 */ "Bstpromark", /* 2638 */ "EdgePoint Networks, Inc.", /* 2639 */ "AIMetrix Incorporated", /* 2640 */ "Arctunn Consulting", /* 2641 */ "Computel Electronica S.A.Jose", /* 2642 */ "FlowWise Networks Inc.", /* 2643 */ "Synaptyx Corporation", /* 2644 */ "First Union National Bank", /* 2645 */ "Kommunikator GmbH", /* 2646 */ "C2S (Communication Systeme Service)", /* 2647 */ "Siligom", /* 2648 */ "Radcom Ltd.", /* 2649 */ "Go Ahead Software, Inc.", /* 2650 */ "Space Connection NV", /* 2651 */ "Merck-Medco Managed Care LLC", /* 2652 */ "City Com BV", /* 2653 */ "R&S BICK Mobilfunk GmbH Andreas", /* 2654 */ "Kepler Software, Ltd.", /* 2655 */ "Banque Paribas", /* 2656 */ "Zitech Net", /* 2657 */ "Century Analysis Inc.", /* 2658 */ "Talent Development GmbH Hans-Georg", /* 2659 */ "CopperCom Inc.", /* 2660 */ "Yutaka Electric Mfg. Co. Ltd.", /* 2661 */ "SBF-Bourse De Paris", /* 2662 */ "Economatica", /* 2663 */ "GVN Technologies", /* 2664 */ "Olsy UK", /* 2665 */ "Room 42 Software, LLC", /* 2666 */ "Cirilium", /* 2667 */ "Tavve Software Co.", /* 2668 */ "Solari di Udine", /* 2669 */ "NetVenture, Inc.", /* 2670 */ "Connected Systems Group", /* 2671 */ "Corporate Software & Technologies, INT, Inc.", /* 2672 */ "Fibex Systems", /* 2673 */ "Claude Jardine Design", /* 2674 */ "Net Marketing, Inc.", /* 2675 */ "IBP, Inc.", /* 2676 */ "RD6 Inc.", /* 2677 */ "MassMedia Communications Inc.", /* 2678 */ "Nexans Suisse SA.", /* 2679 */ "Peak Audio, Inc.", /* 2680 */ "Sia Yiu", /* 2681 */ "DPS Inc.", /* 2682 */ "Callisto Software", /* 2683 */ "ViaVideo Communications, Inc.", /* 2684 */ "Sequel Technology Corporation", /* 2685 */ "Wi-LAN Inc.", /* 2686 */ "Network System Technologies, Inc.", /* 2687 */ "Center Technology", /* 2688 */ "Coby Roberts", /* 2689 */ "Netronix Inc.", /* 2690 */ "Network Computer, Incorporated", /* 2691 */ "WebWeaving", /* 2692 */ "Institut Jozef Stefan", /* 2693 */ "Eldat Communication Ltd.", /* 2694 */ "MetaCommunications. Inc.", /* 2695 */ "Digital Video Broadcasting (DVB)", /* 2696 */ "Bayly Communications Inc.", /* 2697 */ "Poznan Supercomputing and Networking Center - POZMAN", /* 2698 */ "Printer Working Group", /* 2699 */ "DIRECTV", /* 2700 */ "Argon Networks Inc.", /* 2701 */ "WACOS Inc.", /* 2702 */ "Object Zone AB", /* 2703 */ "ICCC A/S", /* 2704 */ "SECUDE IT Security GmbH", /* 2705 */ "Institute for Applied Information Processing and Communications,Graz University of Technology", /* 2706 */ "International Network Services", /* 2707 */ "JNR Systems", /* 2708 */ "Congreve Computing Ltd.", /* 2709 */ "Northrop Grumman - Surveillance and Battle Management Systems", /* 2710 */ "Littlewoods Stores, Ltd.", /* 2711 */ "ICE-TEL TLCA", /* 2712 */ "Mauswerks, Inc.", /* 2713 */ "Dep. of Signal Theory and Communications - UPC", /* 2714 */ "Zapex Technologiesn Inc.", /* 2715 */ "Glueck & Kanja Technology AG", /* 2716 */ "Alcatel Telspace", /* 2717 */ "Intercall", /* 2718 */ "Townsend Analytics Ltd.", /* 2719 */ "NorCom Informationstechnologie und Unternehmensberatung GmbH", /* 2720 */ "News Internet Services", /* 2721 */ "Georgia Tech Research Institute", /* 2722 */ "Guerrilla Mail, Inc.", /* 2723 */ "EasyStreet Online Services, Inc.", /* 2724 */ "Art Technology Group, Inc.", /* 2725 */ "Capital One Financial Corp.", /* 2726 */ "SFA, Inc.", /* 2727 */ "Packard Bell NEC, Inc.", /* 2728 */ "Empire Net", /* 2729 */ "Ottosen", /* 2730 */ "Dialogdesign", /* 2731 */ "Innovative Data Technology", /* 2732 */ "Group 2000 Nederland b.v.", /* 2733 */ "Digital Lightwave, Inc.", /* 2734 */ "MIBS-R-US", /* 2735 */ "EtherWAN Systems, Inc.", /* 2736 */ "Cordless Technology A/S", /* 2737 */ "Punjab Communications Ltd.(PunCom)", /* 2738 */ "Tanstaafl! Consulting", /* 2739 */ "Artevea", /* 2740 */ "Calirnet Systems, Inc.", /* 2741 */ "Manage.com", /* 2742 */ "RFL Electronics, Inc.", /* 2743 */ "Sarnoff Real Time Corporation", /* 2744 */ "LANCAST, Inc.", /* 2745 */ "Martin Communications", /* 2746 */ "Dirig Software, Inc.", /* 2747 */ "ICL Retail Systems Europe", /* 2748 */ "Aptia, Inc.", /* 2749 */ "WaveCom Electronics Inc.", /* 2750 */ "Globalcast Communications Inc.", /* 2751 */ "McComm International bv", /* 2752 */ "ARGO Data Resource Corporation Thomas", /* 2753 */ "Excel Switching Corporation", /* 2754 */ "Palomar Communications, Inc.", /* 2755 */ "NetStart, Inc.", /* 2756 */ "SmartCommerce Solutions", /* 2757 */ "Universal Micro Applications, Inc.", /* 2758 */ "SNS Consultants", /* 2759 */ "Enhanced Messaging System, Inc.", /* 2760 */ "Informatica S.p.A.", /* 2761 */ "Netgame Ltd.", /* 2762 */ "IntelliNet Technologies, Inc.", /* 2763 */ "Acxiom Corporation", /* 2764 */ "Dafur GmbH", /* 2765 */ "Platform Computing Corporation", /* 2766 */ "Automotive Products plc", /* 2767 */ "RandD Computer Services Razvan", /* 2768 */ "Knuerr AG", /* 2769 */ "Eurotel Praha s.r.o.", /* 2770 */ "Inlab Software GmbH", /* 2771 */ "Intersolve Technologies", /* 2772 */ "Redstone Communications, Inc.", /* 2773 */ "Algorithmic Research Ltd.", /* 2774 */ "AGT International, Inc.", /* 2775 */ "Fourthtrack Systems", /* 2776 */ "Flextel S.p.a.", /* 2777 */ "WarpSpeed Computers", /* 2778 */ "21C3", /* 2779 */ "Neo Networks Inc.", /* 2780 */ "Technical University of Madrid (UPM)", /* 2781 */ "BOM Computer Services Ltd.", /* 2782 */ "Control Systems International", /* 2783 */ "bbcom Broadband Communications GmbH & Co. KG", /* 2784 */ "Tecnopro SA", /* 2785 */ "Politecnico di Torino", /* 2786 */ "ING Group", /* 2787 */ "Wytec Incorporated Dave", /* 2788 */ "Mauro Enterprise", /* 2789 */ "RoadRunner", /* 2790 */ "Deterministic Networks, Inc.", /* 2791 */ "Sprint PCS", /* 2792 */ "Interactive Intelligence", /* 2793 */ "JAYCOR", /* 2794 */ "Edify Corporation", /* 2795 */ "Fox IT Ltd", /* 2796 */ "University of Pennsylvania", /* 2797 */ "Metawave Communications Corp.", /* 2798 */ "Enterprise Solutions Ltd", /* 2799 */ "CBL GmbH", /* 2800 */ "ADP Dealer Services", /* 2801 */ "EFKON", /* 2802 */ "SICAN GmbH", /* 2803 */ "KeyTrend Inc.", /* 2804 */ "ACC TelEnterprises", /* 2805 */ "EBA", /* 2806 */ "Teleware Co., Ltd.", /* 2807 */ "eFusion, Inc.", /* 2808 */ "Participants Trust Company", /* 2809 */ "PeopleSoft, Inc.", /* 2810 */ "Entrata Communication", /* 2811 */ "Musics.com", /* 2812 */ "First Telecom plc.", /* 2813 */ "Telesnap GmbH", /* 2814 */ "Newpoint Technologies, Inc.", /* 2815 */ "T&E", /* 2816 */ "Disney Regional Entertainment, Inc.", /* 2817 */ "Ramp Networks, Inc.", /* 2818 */ "Open Software Associates", /* 2819 */ "Procom Technology", /* 2820 */ "University of Notre Dame (Office of Information Technology)", /* 2821 */ "Arquitectura Animada", /* 2822 */ "Sumbha Holograms & Packaging Systems Ltd.", /* 2823 */ "The A Consulting Team, Inc.", /* 2824 */ "WorldGate Communications, Inc.", /* 2825 */ "TOA Electronics Ltd.", /* 2826 */ "Sytex Systems Corp.", /* 2827 */ "Zell Distributors", /* 2828 */ "YRless Internet Corporation", /* 2829 */ "HALO Technologies", /* 2830 */ "Beijing Univ. of Posts & Telecom., Training Center", /* 2831 */ "Virtual Data Systems, Inc.", /* 2832 */ "NetDox, Inc.", /* 2833 */ "Expert Computer Service Jim Mac", /* 2834 */ "Dictaphone", /* 2835 */ "Unex Technology Corporation", /* 2836 */ "Global Mobility Systems, Inc.", /* 2837 */ "TFM Associates", /* 2838 */ "Teleran Technologies, L.P. Carmen Randazzo", /* 2839 */ "Digital Telecommunications, Inc.", /* 2840 */ "KB Internet Ltd.", /* 2841 */ "Agri Datalog", /* 2842 */ "Braid Systems Limited", /* 2843 */ "Newsnet ITN", /* 2844 */ "JTCS", /* 2845 */ "KEYCORP Pty. Ltd.", /* 2846 */ "GTE Internetworking", /* 2847 */ "Royalblue Technologies plc Trevor Goff", /* 2848 */ "U&R Consultores Argentina", /* 2849 */ "Tevycom Fapeco S.A.", /* 2850 */ "Polaris Communications", /* 2851 */ "Competitive Automation, Inc.", /* 2852 */ "IDEXX Laboratories, Inc.", /* 2853 */ "Network Computing Technologies, Inc.", /* 2854 */ "Axxcelera Broadband Wireless", /* 2855 */ "Cableware Electronics", /* 2856 */ "Network Power and Light", /* 2857 */ "Clarent Corporation", /* 2858 */ "Kingston - SCL", /* 2859 */ "netVest", /* 2860 */ "VSN systemen BV", /* 2861 */ "Northwest Consulting Services Randy", /* 2862 */ "Thomson Inc.", /* 2863 */ "Digitel S/A Industria Eletronica", /* 2864 */ "Nortel Networks - Optical Metro", /* 2865 */ "Technical Insights", /* 2866 */ "NKF Electronics", /* 2867 */ "Glasshouse Business Networks B.V.", /* 2868 */ "VSI Enterprises", /* 2869 */ "E-TECH, Inc.", /* 2870 */ "UltraDNS", /* 2871 */ "Unisource Business Networks Nederland bv", /* 2872 */ "AGENTics", /* 2873 */ "OTC Telecom Inc.", /* 2874 */ "G.U.I.Dev. International Inc.", /* 2875 */ "Cothern Computer Systems", /* 2876 */ "Arbinet Communications Inc.", /* 2877 */ "FaxForward Canada, Ltd.", /* 2878 */ "Sonus Networks, Inc.", /* 2879 */ "IPHighway Ltd.", /* 2880 */ "Clarion", /* 2881 */ "Comtrol Corporation", /* 2882 */ "Coherent Communications Systems Inc", /* 2883 */ "ADS Networks", /* 2884 */ "Chicago-Soft Ltd.", /* 2885 */ "Netbalance", /* 2886 */ "AS Proekspert", /* 2887 */ "Adfm Multimedia Internet", /* 2888 */ "Praxis International Inc.", /* 2889 */ "Solectek Corporation", /* 2890 */ "NanoSpace, Inc.", /* 2891 */ "KAPS, Inc.", /* 2892 */ "Computer Associates, Italy", /* 2893 */ "Mainsail Networks, Inc.", /* 2894 */ "EDS, SSMC-Tools Support and Development", /* 2895 */ "Breece Hill Technologies Inc.", /* 2896 */ "AT&T Capital Corp Ernest", /* 2897 */ "HighGround Systems, Inc Thomas Bakerman", /* 2898 */ "Omnia Communications, Inc.", /* 2899 */ "Mer Telemanagement Solutions", /* 2900 */ "Replicase, Inc.", /* 2901 */ "Microlog Corporation", /* 2902 */ "Smartways Technology Limited", /* 2903 */ "Computer Services", /* 2904 */ "Trumpet Software International Pty Ltd", /* 2905 */ "Rsi Solutions Ltd.", /* 2906 */ "C-Cor Electronics", /* 2907 */ "Castle Networks, Inc.", /* 2908 */ "Nexabit Networks, LLC", /* 2909 */ "General Electric Company", /* 2910 */ "Objective Software Services, Inc.", /* 2911 */ "Ameristar Technologies Corp.", /* 2912 */ "Hycor Biomedical, Inc.", /* 2913 */ "Fellesdata AS", /* 2914 */ "Network Engines, Inc.", /* 2915 */ "Daimler-Benz AG", /* 2916 */ "Data Interface Systems Corp", /* 2917 */ "Symmetry Communications Systems, Inc.", /* 2918 */ "Rambus Corp.", /* 2919 */ "Will-Do Information Services", /* 2920 */ "Swiss Pharma Contract Ltd.", /* 2921 */ "I-O Corporation", /* 2922 */ "Formula Consultants Inc.", /* 2923 */ "Star TV (Satellite Television Asia Region Ltd)", /* 2924 */ "Cyclades Corporation", /* 2925 */ "Sonoma Systems, Inc.", /* 2926 */ "Jacksonville Electric Authority", /* 2927 */ "Net Insight AB", /* 2928 */ "Quallaby", /* 2929 */ "ValiCert, Inc.", /* 2930 */ "GADC Networks", /* 2931 */ "TERMA Elektronik AS", /* 2932 */ "Floware System Solutions Ltd.", /* 2933 */ "Citicorp", /* 2934 */ "Quantum Corp.", /* 2935 */ "Prominence Dot Com, Inc.", /* 2936 */ "Deutsche Telekom AG", /* 2937 */ "Proginet Corporation", /* 2938 */ "InfoExpress, Inc.", /* 2939 */ "Argent Software", /* 2940 */ "ReadyCom Inc.", /* 2941 */ "COCOM A/S", /* 2942 */ "ObjTech Software", /* 2943 */ "Top Layer Networks, Inc.", /* 2944 */ "TdSoft Communications Software Ltd.", /* 2945 */ "SWITCH", /* 2946 */ "Best Power - A Division of General Signal Power Systems", /* 2947 */ "TeleSuite Corporation", /* 2948 */ "Global Quest Consaltance", /* 2949 */ "Ampersand, Inc.", /* 2950 */ "Nentec", /* 2951 */ "T&E Soft", /* 2952 */ "Imedia", /* 2953 */ "Universitaet Bielefeld, Technische Fakultaet", /* 2954 */ "PSINet UK Ltd.", /* 2955 */ "InfoLibria, Inc.", /* 2956 */ "Ericsson Communications Ltd.", /* 2957 */ "Secure Network Solutions Ltd.Brendan Simon", /* 2958 */ "Workstation Solutions, Inc.", /* 2959 */ "National Landscape Assn. Inc.", /* 2960 */ "DIALOGS Software GmbH", /* 2961 */ "Netwise AB", /* 2962 */ "Security Dynamics Technology, Inc.", /* 2963 */ "Zeta Communications Ltd.", /* 2964 */ "Syscom Ltd.", /* 2965 */ "Digital ChoreoGraphics", /* 2966 */ "CableData Inc.", /* 2967 */ "Allen Telecom Systems", /* 2968 */ "Charles Craft", /* 2969 */ "Sunstone Enterprises", /* 2970 */ "Corecess Inc.", /* 2971 */ "Network Alchemy, Inc.", /* 2972 */ "Integral Access, Inc.", /* 2973 */ "IP Metrics Software, Inc.", /* 2974 */ "Notarius T.S.I.N. Inc.", /* 2975 */ "Sphairon Technologies GmbH", /* 2976 */ "Teubner and Associates, Inc.", /* 2977 */ "ImageCom Ltd.", /* 2978 */ "Waverider Communications Inc.", /* 2979 */ "ENT - Empresa Nacional de Telecomunicacoes, S.A.", /* 2980 */ "Duke Energy", /* 2981 */ "Deutsches Patentamt", /* 2982 */ "SEMA Group GmbH, TS-V", /* 2983 */ "Keycode Style Ltd.", /* 2984 */ "Bay Systems Consulting, Inc.", /* 2985 */ "Qiangjin Corp.Ltd.", /* 2986 */ "IPivot", /* 2987 */ "Consultronics Development Ltd.", /* 2988 */ "University of North London", /* 2989 */ "Illuminata, Inc.", /* 2990 */ "Enterprise IT, Inc.", /* 2991 */ "CyberTel, Inc.Jonathan Chu", /* 2992 */ "ConvergeNet Technologies, Inc.", /* 2993 */ "Teligent", /* 2994 */ "AcuComm, Inc.", /* 2995 */ "SpectraWorks Inc.", /* 2996 */ "RedTitan", /* 2997 */ "Anderson Consulting", /* 2998 */ "American Family Insurance", /* 2999 */ "IDB Systems, a Division of WorldCom Inc.", /* 3000 */ "BAILO", /* 3001 */ "ADAXIS Group", /* 3002 */ "Packet Engines Inc.", /* 3003 */ "Softwire Corporation", /* 3004 */ "TDS (Telecoms Data Systems)", /* 3005 */ "HCI Technologies", /* 3006 */ "TOPCALL International", /* 3007 */ "LogMatrix Inc", /* 3008 */ "SYNCLAYER Inc.", /* 3009 */ "university of aizu", /* 3010 */ "VideoServer, Inc.", /* 3011 */ "Space & Telecommunications Systems Pte. Ltd.", /* 3012 */ "Bicol Infonet System,Inc.", /* 3013 */ "MediaSoft Telecom", /* 3014 */ "Netpro Computing, Inc.", /* 3015 */ "OzEmail Pty Ltd", /* 3016 */ "Arcxel Technologies, Inc.", /* 3017 */ "EnterNet Corporation", /* 3018 */ "Jones Waldo Holbrook McDonough", /* 3019 */ "University Access", /* 3020 */ "Sendit AB", /* 3021 */ "Telecom Sciences Corporation Limited", /* 3022 */ "Quality Quorm, Inc.", /* 3023 */ "Grapevine Systems Inc", /* 3024 */ "The Panda Project, Inc.", /* 3025 */ "Mission Control Development", /* 3026 */ "IONA Technologies Ltd", /* 3027 */ "Dialogic Corporation", /* 3028 */ "Digital Data Security", /* 3029 */ "ISCNI", /* 3030 */ "dao Consulting, LLC", /* 3031 */ "Beaufort Memorial Hospital", /* 3032 */ "Informationstechnik Dr. Hansmeyer", /* 3033 */ "URMET SUD s.p.a.", /* 3034 */ "Avesta Technologies Inc", /* 3035 */ "Hyundai Electronics America", /* 3036 */ "DMV Ltd", /* 3037 */ "Fax International, Inc.", /* 3038 */ "MidAmerican Energy Company (MEC)", /* 3039 */ "Bellsouth.net", /* 3040 */ "Assured Access Technology, Inc.", /* 3041 */ "Logicon - Eagle Technology", /* 3042 */ "Frequentis GmbH", /* 3043 */ "ISIS 2000", /* 3044 */ "james e. gray, atty", /* 3045 */ "Jamaica Cable T.V. & Internet Services", /* 3046 */ "Information Technology Consultants Pty. Ltd.", /* 3047 */ "LinickGrp.com", /* 3048 */ "Yankee Know-How", /* 3049 */ "SeAH group", /* 3050 */ "Cinco Networks, Inc.", /* 3051 */ "Asentria Corporation", /* 3052 */ "Genie Telecommunication Inc.", /* 3053 */ "Ixia Communications", /* 3054 */ "Transmeta Corporation", /* 3055 */ "Systemsoft Corp.", /* 3056 */ "Jaspal Miracles Ltd.", /* 3057 */ "T-Systems", /* 3058 */ "Sisler Promotions, Inc.", /* 3059 */ "ice-man refrigeration", /* 3060 */ "Listing Service Solutions, Inc.", /* 3061 */ "Jovian Networks", /* 3062 */ "Elebra Com. Dados", /* 3063 */ "Safetran Systems", /* 3064 */ "Video Network Communications, Inc.", /* 3065 */ "Phasecom Ltd.", /* 3066 */ "Eurocontrol", /* 3067 */ "SilverStream Software Inc.", /* 3068 */ "Cownet", /* 3069 */ "World Access, Inc.", /* 3070 */ "Virtual Line L.L.P.", /* 3071 */ "Integrated Concepts L.L.P.", /* 3072 */ "Exabyte Corporation", /* 3073 */ "Interactive Media Corporation", /* 3074 */ "NetCore Systems, Inc.", /* 3075 */ "Altiga Networks, Inc.", /* 3076 */ "National Center for Supercomputing Applications", /* 3077 */ "EMASS Inc.", /* 3078 */ "PRIMA Telematic", /* 3079 */ "BackWeb Technologies", /* 3080 */ "NTP Software", /* 3081 */ "PBS A/S", /* 3082 */ "W.Quinn Associates, Inc.", /* 3083 */ "QUZA (Racal-Integralis)", /* 3084 */ "Cosine Communications", /* 3085 */ "PipeLinks Inc.", /* 3086 */ "WaiLAN Communications, Inc.", /* 3087 */ "Axent Technologies", /* 3088 */ "SPAWAR", /* 3089 */ "Airsys ATM S.A.", /* 3090 */ "Whiter Morn Software, Inc.", /* 3091 */ "ENTV", /* 3092 */ "CyberTAN Technology, Inc.", /* 3093 */ "Frilot, Patridge, Kohnke & Clements, L.C.", /* 3094 */ "FirstSense Software, Inc.", /* 3095 */ "StarVox, Inc.", /* 3096 */ "WatchGuard Technologies Inc.", /* 3097 */ "MTI Technology Corporation", /* 3098 */ "Lumbrera", /* 3099 */ "CELOGIC", /* 3100 */ "Experian Information Solutions Inc.", /* 3101 */ "Kansai Electric Co., Ltd.", /* 3102 */ "Innet", /* 3103 */ "Thales Communications GmbH", /* 3104 */ "Vodafone Sweden", /* 3105 */ "LCI International, Inc.", /* 3106 */ "City of Los Angeles", /* 3107 */ "G2 Networks", /* 3108 */ "TradeWeb LLC.", /* 3109 */ "Rafael", /* 3110 */ "Crystal Group Inc.", /* 3111 */ "C-bridge Internet Solutions", /* 3112 */ "Phase Forward", /* 3113 */ "WONOA", /* 3114 */ "Dialog", /* 3115 */ "NICE CTI Systems UK Ltd.", /* 3116 */ "E*TRADE Group Inc.", /* 3117 */ "Juno Online Services, Inc.", /* 3118 */ "DnB ASA", /* 3119 */ "Cintel Technologies, Inc.", /* 3120 */ "Tele1024 Denmark", /* 3121 */ "Interlink Network Group, Inc.", /* 3122 */ "L. Richards' Enterprises, Inc.", /* 3123 */ "Media Communications Eur AB", /* 3124 */ "Rocx Software Corp.", /* 3125 */ "Ardax Systems, Inc.", /* 3126 */ "Pluris, Inc.", /* 3127 */ "OAZ Communications", /* 3128 */ "Advanced Switching Communications, Inc.", /* 3129 */ "GreatLink Networks, Inc.", /* 3130 */ "Aydin Telecom", /* 3131 */ "NetKit Inc.", /* 3132 */ "IDP", /* 3133 */ "TTM Nederland", /* 3134 */ "Labouchere", /* 3135 */ "Comtrend Corporation", /* 3136 */ "Berbee Information Networks Corp.", /* 3137 */ "Wireless Online, Inc.", /* 3138 */ "LIFFE", /* 3139 */ "Celo Communications AB", /* 3140 */ "Mark IV Industries Ltd.(F-P Electronics Division)", /* 3141 */ "Leitch Technology International Incorporated", /* 3142 */ "Chalcroft International", /* 3143 */ "Clarity Wireless Inc.", /* 3144 */ "C-C-C Technology Ltd", /* 3145 */ "FREQUENTIS Network Systems GmbH", /* 3146 */ "Daewoo Electronics", /* 3147 */ "France Caraibe Mobiles", /* 3148 */ "Winchester Systems Inc.", /* 3149 */ "SWD", /* 3150 */ "Automotive Industry Action Group (AIAG)", /* 3151 */ "Orion Technologies Inc.", /* 3152 */ "DirectoryNET, Inc.", /* 3153 */ "Kisan Telecom Co., LTD", /* 3154 */ "Concord-Eracom", /* 3155 */ "Secant", /* 3156 */ "NetraCorp, LLC", /* 3157 */ "MASPRO DENKOH Corp.", /* 3158 */ "Utimaco Safeware AG", /* 3159 */ "Financial Information System Center (FISC)", /* 3160 */ "Xybx Inc.", /* 3161 */ "Relational Data Systems", /* 3162 */ "M&T Clear Solutions Inc.", /* 3163 */ "ARBED S.A.", /* 3164 */ "Cap Gemini Telecom", /* 3165 */ "Westek Technology Ltd John Tucker", /* 3166 */ "NICE Systems Ltd.", /* 3167 */ "INC S.A.", /* 3168 */ "Silis Sarl", /* 3169 */ "InterWorking Labs, Inc.", /* 3170 */ "Ikon Systems, Inc.", /* 3171 */ "GTE Intelligent Network Services", /* 3172 */ "Turnstone Systems, Inc.", /* 3173 */ "Tasman Networks, Inc.", /* 3174 */ "WebTrends Corporation", /* 3175 */ "Werner Training and Consulting, Inc.", /* 3176 */ "IVC, Inc.", /* 3177 */ "Blue Cross and Blue Shield of Florida", /* 3178 */ "Level8 Systems", /* 3179 */ "RESCOM A/S", /* 3180 */ "MICROSENS GmbH & Co. KG", /* 3181 */ "Unihold Technologies", /* 3182 */ "Wired for Management", /* 3183 */ "Raymond and Lae Engineering, Inc.", /* 3184 */ "Parapsco Designs Ltd.", /* 3185 */ "TouchNet Information Systems, Inc.", /* 3186 */ "FUZZY! Informatik GmbH", /* 3187 */ "Sunny Comm. Inc.", /* 3188 */ "DSD Computing", /* 3189 */ "Caja de Ahorros del Mediterraneo", /* 3190 */ "Dynetcom Guernsey Ltd.", /* 3191 */ "Tachyon, Inc.", /* 3192 */ "Silent Communications", /* 3193 */ "EFFNET AB", /* 3194 */ "AUDI AG", /* 3195 */ "Side by Side GmbH", /* 3196 */ "Vodacom South Africa", /* 3197 */ "Volamp LtdW.G. Saich+44(0) 1252 724055", /* 3198 */ "Shasta Networks", /* 3199 */ "Applied Resources, Inc.", /* 3200 */ "LANCOME", /* 3201 */ "Spar Aerospace Limited", /* 3202 */ "GlaxoWellcome Inc.", /* 3203 */ "A.T.I. System Co., Ltd.", /* 3204 */ "EXODUS Communications Inc.", /* 3205 */ "Assured Digital, Inc.", /* 3206 */ "Web@venture", /* 3207 */ "Athens University of Economics and Business", /* 3208 */ "Dynarc AB", /* 3209 */ "VOLKSWAGEN AG", /* 3210 */ "Allgon AB", /* 3211 */ "Crestron Electronics, Inc.", /* 3212 */ "TRANSICIEL", /* 3213 */ "SAN People (Pty) Ltd.", /* 3214 */ "Network Instruments, LLC", /* 3215 */ "Texas Networking, Inc.", /* 3216 */ "Pini Computer Trading", /* 3217 */ "XLN-t", /* 3218 */ "Silicomp", /* 3219 */ "Signet Systems Pty Ltd", /* 3220 */ "Ohkura Electric Co., Ltd.", /* 3221 */ "New Elite Technologies, Inc.", /* 3222 */ "TXCOM", /* 3223 */ "NetScreen Technologies, Inc.", /* 3224 */ "Sycamore Networks", /* 3225 */ "France Connexion Ingenierie", /* 3226 */ "NetLeader, Inc.", /* 3227 */ "Tekmar Sistemi s.r.l.", /* 3228 */ "DSTC", /* 3229 */ "Runtop Inc.", /* 3230 */ "L-3 Communications", /* 3231 */ "Eumetsat", /* 3232 */ "TongGong High New Technology Development Company", /* 3233 */ "Trifolium, Inc.", /* 3234 */ "Zenon N.S.P.", /* 3235 */ "ERCOM", /* 3236 */ "SDC", /* 3237 */ "Los Angeles Web", /* 3238 */ "Florence on Line s.r.l.", /* 3239 */ "Escalate Networks", /* 3240 */ "TranNexus", /* 3241 */ "Brigham Young University", /* 3242 */ "ConNova Systems AB", /* 3243 */ "Voxtron Flanders NV", /* 3244 */ "Yomi Software Ltd.", /* 3245 */ "Mirapoint, Inc.", /* 3246 */ "Colorbus", /* 3247 */ "DPB S.A.", /* 3248 */ "StarGuide Digital Networks, Inc.", /* 3249 */ "Telinet Technologies, LLC. Donald", /* 3250 */ "Authentica Security Technologies, Inc.", /* 3251 */ "Hologram Systems Ltd.", /* 3252 */ "TranSystem, Inc.", /* 3253 */ "R.R.C. Exports", /* 3254 */ "Lakeside Software, Inc.", /* 3255 */ "Channel 100", /* 3256 */ "MAGMA, Inc.", /* 3257 */ "LANSource Technologies Inc.", /* 3258 */ "INCAA Datacom BV", /* 3259 */ "GlobeSet, Inc.", /* 3260 */ "Martin Pestana", /* 3261 */ "Acuson Corporation", /* 3262 */ "Drake Automation Limited", /* 3263 */ "Kerr Vayne Systems Ltd.", /* 3264 */ "KSquared Consulting", /* 3265 */ "HSBC Group", /* 3266 */ "IronBridge Networks, Inc.", /* 3267 */ "Real Time Logic Inc.", /* 3268 */ "TelServe", /* 3269 */ "UNIQUEST-Korea", /* 3270 */ "StockPower, Inc.", /* 3271 */ "Yontem Computer & Electronics", /* 3272 */ "nwe GmbH", /* 3273 */ "The Information Systems Manager Inc.", /* 3274 */ "Kosmos Image S.r.l.", /* 3275 */ "Taihan Electric Wire Co., Ltd.", /* 3276 */ "Telspec", /* 3277 */ "C-COM Corporation", /* 3278 */ "Adlex Corp.", /* 3279 */ "CCI Europe", /* 3280 */ "SMS Enterprises", /* 3281 */ "Vicom Systems, Inc.", /* 3282 */ "International Software Solutions", /* 3283 */ "OASIS Consortium", /* 3284 */ "NOVA Telecommunications, Inc.", /* 3285 */ "Nera Satcom AS", /* 3286 */ "Proactive Networks, Inc.", /* 3287 */ "Jacobs Rimell Limited", /* 3288 */ "Cryptomathic A/S", /* 3289 */ "AppliScope", /* 3290 */ "Simac Techniek NV", /* 3291 */ "Earthmen Technology", /* 3292 */ "Biffsters International", /* 3293 */ "Digitronic", /* 3294 */ "Internet Multifeed Co.", /* 3295 */ "Argosy Research Inc.", /* 3296 */ "NxNetworks", /* 3297 */ "MQSoftware, Inc.", /* 3298 */ "Altair Data System", /* 3299 */ "Telsis Limited", /* 3300 */ "IMPACT", /* 3301 */ "SMI Computersysteme GmbH Nicole", /* 3302 */ "IDM, Ltd.", /* 3303 */ "WinVista Corp.", /* 3304 */ "Splitrock Services, Inc.", /* 3305 */ "Vail Systems Incorporated", /* 3306 */ "SANE.net", /* 3307 */ "Ensemble Solutions, Inc.", /* 3308 */ "Nomadix", /* 3309 */ "Jett International Inc.", /* 3310 */ "Crocodial Communications Entwicklungsgesellschaft mbH", /* 3311 */ "Consulting Informatico de Cantabria S.L.", /* 3312 */ "Broadcast Services", /* 3313 */ "Bergstresser Associates", /* 3314 */ "KingStar Computer Ltd.", /* 3315 */ "Micro Logic Systems", /* 3316 */ "Port Community Rotterdam", /* 3317 */ "Computer & Competence GmbH", /* 3318 */ "GNOME project", /* 3319 */ "Shanghai Baud Data Communication Development Corp.", /* 3320 */ "Teledata Communication Ltd.", /* 3321 */ "Ipswitch, Inc.", /* 3322 */ "Tadiran Microwave Networks", /* 3323 */ "Call Technologies, Inc.", /* 3324 */ "Vocalis Ltd.", /* 3325 */ "Bergen Data Consulting", /* 3326 */ "CA Technologies, Inc.", /* 3327 */ "Indus River Networks, Inc.", /* 3328 */ "NewCom Technologies, Inc.", /* 3329 */ "PartnerGroup", /* 3330 */ "DeTeWe - Deutsche Telephonwerke Aktiengesellschaft & Co.", /* 3331 */ "RCX System", /* 3332 */ "Auburn University", /* 3333 */ "Cap'Mediatel", /* 3334 */ "HAHT Software", /* 3335 */ "UTBF", /* 3336 */ "Chicago Police Department - Data Systems Division", /* 3337 */ "MORA Technological Services", /* 3338 */ "JHC", /* 3339 */ "OpenTV Inc.", /* 3340 */ "SwitchSoft Systems, Inc.", /* 3341 */ "MachOne Communications Inc.", /* 3342 */ "Philips Digital Video Systems Harry", /* 3343 */ "Helsinki Televisio Oy", /* 3344 */ "Nemetschek AG", /* 3345 */ "Vocom", /* 3346 */ "Hitachi Kokusai Electric Inc.", /* 3347 */ "Reliable Network Solutions", /* 3348 */ "Vogo Networks", /* 3349 */ "beusen", /* 3350 */ "Overland Data, Inc.", /* 3351 */ "Go2 Technologies, Inc.", /* 3352 */ "TransMedia Communications, Inc.", /* 3353 */ "InnoMedia, Inc.", /* 3354 */ "Orkit FI", /* 3355 */ "WebMaster, Incorporated", /* 3356 */ "Software & Management Associates, Inc.", /* 3357 */ "Researcher", /* 3358 */ "Cygnus Global Consulting", /* 3359 */ "Columbine JDS Systems Inc.", /* 3360 */ "Intraplex", /* 3361 */ "Selta S.p.A.", /* 3362 */ "Southern New England Telecommunications", /* 3363 */ "Baltic Oil Ltd.", /* 3364 */ "MailWizard Incorporated", /* 3365 */ "Da Vinci Systems cc", /* 3366 */ "NMS Research", /* 3367 */ "KimSungEun Co., Ltd.", /* 3368 */ "Genicom Corporation", /* 3369 */ "Trango Software Corporation", /* 3370 */ "SungEun Systems", /* 3371 */ "COVE Sistemas, S.L.", /* 3372 */ "SIAE Microelettronica S.p.A.", /* 3373 */ "Cybertek Corp.", /* 3374 */ "F5 Labs, Inc.", /* 3375 */ "Valencia Systems", /* 3376 */ "HKC Communications, Inc.", /* 3377 */ "Plant Equipment Inc.", /* 3378 */ "HT Industrial Co.", /* 3379 */ "Fuelling & Partner", /* 3380 */ "Atreve Software, Inc.", /* 3381 */ "Venturi Wireless", /* 3382 */ "South East Water Limited", /* 3383 */ "WAM!NET", /* 3384 */ "University of Leicester", /* 3385 */ "21st Century Net", /* 3386 */ "Intellivoice, Inc", /* 3387 */ "Integral Partners", /* 3388 */ "Novotec Computers GmbH", /* 3389 */ "Marathon Technologies Corporation", /* 3390 */ "Software Technologies Group, Inc.", /* 3391 */ "Quvintheumn Foundation", /* 3392 */ "SandS International", /* 3393 */ "NeTrue Communications", /* 3394 */ "Certicom Corp.", /* 3395 */ "DICOS GmbH Kommunikationssysteme Stephan", /* 3396 */ "Border Blues Productions", /* 3397 */ "Fieldbus Foundation", /* 3398 */ "Olencom Electronics Ltd.", /* 3399 */ "Alacrity Communications Inc.", /* 3400 */ "McAfee Inc.", /* 3401 */ "Magicom Integrated Solutions", /* 3402 */ "Marimba, Inc.", /* 3403 */ "Adicom", /* 3404 */ "Expand Networks Inc.", /* 3405 */ "EIS Corporation", /* 3406 */ "compu-DAWN, Inc.", /* 3407 */ "Nylcare Health Plans", /* 3408 */ "Z-Tel Communications, Inc.", /* 3409 */ "Land-5 Corporation", /* 3410 */ "J. Slivko's Web Design Consulting", /* 3411 */ "SanCastle Technologies Inc.", /* 3412 */ "Radiotel", /* 3413 */ "VoiceStream Wireless, Inc.", /* 3414 */ "Mobile Telephone Networks", /* 3415 */ "Neto Corporation", /* 3416 */ "CacheFlow Inc.", /* 3417 */ "Interactive Channel Technologies, Inc.", /* 3418 */ "DERA", /* 3419 */ "Rossiyskiy Kredit Bank", /* 3420 */ "Performance Reporting Services Ltd", /* 3421 */ "Network Aware, Inc.", /* 3422 */ "Project 25", /* 3423 */ "Evident Software, Inc.", /* 3424 */ "Amsdell Inc.", /* 3425 */ "Tokyo Denshi Sekei K.K.", /* 3426 */ "MicroJuris, Inc.", /* 3427 */ "Computer Associates TCG Software", /* 3428 */ "GenNet Technology Co., Ltd.", /* 3429 */ "Microtronix Datacom Ltd.", /* 3430 */ "Western DataCom Co., Inc.", /* 3431 */ "Tellium, Inc.", /* 3432 */ "Goldencom Technologies, Inc.", /* 3433 */ "Leightronix, Inc.", /* 3434 */ "Porta Systems Ltd", /* 3435 */ "Brivida, Inc.", /* 3436 */ "PitchonPe", /* 3437 */ "Missouri FreeNet", /* 3438 */ "Braintree Communications Pty Ltd", /* 3439 */ "Borealis Technology", /* 3440 */ "South Carolina State Ports Authority (SCSPA)", /* 3441 */ "Advantech Inc.", /* 3442 */ "United Healthcare", /* 3443 */ "egnite Software GmbH", /* 3444 */ "Radiant Communications Corp.", /* 3445 */ "Ridge Technologies Dave", /* 3446 */ "JGI, Inc.", /* 3447 */ "Rivkin Science & Technology, Inc.", /* 3448 */ "Fisher Berkeley Corp.", /* 3449 */ "Ardence, Inc.", /* 3450 */ "Vita Nuova Limited", /* 3451 */ "MDSI Mobile Data Solutions Inc.", /* 3452 */ "AAE Systems, Inc.", /* 3453 */ "ELVIS-PLUS", /* 3454 */ "Internet Freaks Luxembourg a.s.b.l.Department Technique", /* 3455 */ "Adtech, Inc.", /* 3456 */ "Advanced Intelligent Networks Corp.", /* 3457 */ "Transaction Network Services, Inc.", /* 3458 */ "COM:ON Communication Systems GmbH", /* 3459 */ "Telecommunications Specialists Pte Ltd", /* 3460 */ "Inferentia SPA", /* 3461 */ "Makonin Consulting Corp.", /* 3462 */ "Toucan Technology Ltd.", /* 3463 */ "Gimlet Management Consultants Ltd", /* 3464 */ "Sanyo Denki Co., Ltd.", /* 3465 */ "Optical Networks, Inc.", /* 3466 */ "NORCOM Networks Corporation", /* 3467 */ "GTE Interactive", /* 3468 */ "Schumann Unternehmensberatung AG", /* 3469 */ "ATM R&D Center of BUPT", /* 3470 */ "Bear Stearns & Company, Inc.", /* 3471 */ "Telamon, Inc.", /* 3472 */ "Microgate Corporation", /* 3473 */ "Fujitu ICL Espana S.A.", /* 3474 */ "Network Concepts", /* 3475 */ "Arepa Inc.", /* 3476 */ "Dorado Software", /* 3477 */ "Spectra Logic", /* 3478 */ "ViewTouch, Inc.", /* 3479 */ "VIEWS Net, Inc.", /* 3480 */ "Himel Technology", /* 3481 */ "Ton & Lichttechnik", /* 3482 */ "Mariner Networks", /* 3483 */ "Alaska Textiles, Inc.", /* 3484 */ "Alaska Cleaners, Inc.", /* 3485 */ "Wellsprings Holdings, LLC", /* 3486 */ "Allure of Alaska", /* 3487 */ "SevenX", /* 3488 */ "Denali Sites, Inc.", /* 3489 */ "United Systems Base", /* 3490 */ "CDConsultants Inc.", /* 3491 */ "Comdisco, Inc.", /* 3492 */ "Broadband Access Systems, Inc.", /* 3493 */ "Convergent Networks, Inc.", /* 3494 */ "National Laboratory for Applied Network Research", /* 3495 */ "Web-Resumes", /* 3496 */ "Virtual Vendor Inc.", /* 3497 */ "BusinessBuilder Technologies Inc.", /* 3498 */ "Cyber Server Park Inc.", /* 3499 */ "COMSAT Laboratories", /* 3500 */ "Vodafone Value Added Services Ltd", /* 3501 */ "J & A Services", /* 3502 */ "Blue Lance, Inc.", /* 3503 */ "Sandvik Coromant", /* 3504 */ "Virtual Virgin Islands, Inc.", /* 3505 */ "PageTek", /* 3506 */ "e-Net, Inc.", /* 3507 */ "NEST", /* 3508 */ "Capital Holdings Ltd", /* 3509 */ "TWO-WAY LAUNDRY", /* 3510 */ "SkyStream, Inc.", /* 3511 */ "Portal Software, Inc.", /* 3512 */ NULL, /* 3513 */ "VStream Incorporated", /* 3514 */ "Joanneum Research GesmbH", /* 3515 */ "Cybernetica", /* 3516 */ "Tieto Technology A/S, Denmark", /* 3517 */ "Pressler Inc.", /* 3518 */ "amplify.net, Inc.", /* 3519 */ "TPS (La Television Par Satellite) Denis", /* 3520 */ "Atlas Technologies, Inc.", /* 3521 */ "Biodata GmbH", /* 3522 */ "Netco GmbH", /* 3523 */ "Continium", /* 3524 */ "SilverBack Technologies", /* 3525 */ "ITC GmbH", /* 3526 */ "IntraSoft, Inc.", /* 3527 */ "ESP, LLC", /* 3528 */ "AVT Corporation", /* 3529 */ "Research In Motion Ltd.", /* 3530 */ "Orange DK", /* 3531 */ "Meisei System Service Company", /* 3532 */ "Acies Sistemas S/C Ltda.", /* 3533 */ "CTAM Pty. Ltd.", /* 3534 */ "Hutchison Avenue Software Corp.", /* 3535 */ "Globus", /* 3536 */ "AirFiber, Inc.", /* 3537 */ "Europe Connection Ltd", /* 3538 */ "Unassigned", /* 3539 */ "Conelly International, Inc.", /* 3540 */ "Bindview Development Corp.", /* 3541 */ "Galea Network Security", /* 3542 */ "Abilis gmbh", /* 3543 */ "Baycorp ID Services Ltd.", /* 3544 */ "Maddox Broadcast Ltd.", /* 3545 */ "Acute Communications Corporation", /* 3546 */ "Tollbridge Technologies", /* 3547 */ "Oresis Communications", /* 3548 */ "MLI Enterprises", /* 3549 */ "Allstor Software Limited", /* 3550 */ "Spring Tide Networks, Inc.", /* 3551 */ "EES Technology Ltd.", /* 3552 */ "CSP AG", /* 3553 */ "SAS Institue Inc", /* 3554 */ "NetLock Ltd.", /* 3555 */ "GENO-RZ GmbH", /* 3556 */ "MS3.net", /* 3557 */ "BGS Systemplanung AG", /* 3558 */ "The Digital Schoolhouse", /* 3559 */ "Sphere Logic Corporation", /* 3560 */ "The Broadband Forum", /* 3561 */ "Selway Moore Limited", /* 3562 */ "National Network Data Services", /* 3563 */ "Ciphernet", /* 3564 */ "Grolier Interactive Europe On Line Groupe", /* 3565 */ "Midnight Technologies", /* 3566 */ "Scott Supply Service, Inc.", /* 3567 */ "Service Co LLC", /* 3568 */ "Electronic Payment Services, Inc.", /* 3569 */ "Tait Limited", /* 3570 */ "Gift-Trek Malaysia Sdn. Bhd.", /* 3571 */ "HanA Systems, Inc.", /* 3572 */ "South African Networking People (Pty) Ltd", /* 3573 */ "ORSYP SA", /* 3574 */ "RKB Onsite Computer Service", /* 3575 */ "MCI", /* 3576 */ "Himachal Futuristic Communications Limited", /* 3577 */ "PixStream Incorporated", /* 3578 */ "Hurley", /* 3579 */ "Bell Emergis", /* 3580 */ "Seagate Technology", /* 3581 */ "LSI Logic", /* 3582 */ "JetCell, Inc.", /* 3583 */ "Pacific Fiberoptics, Inc.", /* 3584 */ "Omnisec AG", /* 3585 */ "Diebold, Incorporated", /* 3586 */ "TIW Systems, Inc.", /* 3587 */ "NovoGroup Oyj", /* 3588 */ "SoGot", /* 3589 */ "IA Information Systems AG", /* 3590 */ "The Cameron Cybernetics Corp.", /* 3591 */ "Draeger Medizintechnik GmbH", /* 3592 */ "Alcatel Sistemas de Informacion", /* 3593 */ "LJL Enterprises, Inc.", /* 3594 */ "BC TEL Advanced Communications", /* 3595 */ "CMLTechnologies Inc.", /* 3596 */ "WildThings", /* 3597 */ "Dixie Cake", /* 3598 */ "Type & Graphics Pty Limited", /* 3599 */ "Teltronics, Inc.", /* 3600 */ "C.R. McGuffin Consulting Services", /* 3601 */ "International Datacasting Corporation", /* 3602 */ "Westpac Banking Corporation", /* 3603 */ "XYPI MEDIANET PVT. Ltd.", /* 3604 */ "Nesser & Nesser Consulting", /* 3605 */ "Incognito Software Systems Inc.", /* 3606 */ "Cerent Corporation", /* 3607 */ "The Tillerman Group", /* 3608 */ "Cequs Inc.", /* 3609 */ "Ryan Net Works", /* 3610 */ "Foo Chicken, Ltd", /* 3611 */ "Marcel Enterprises", /* 3612 */ "Rubicon Technologies, Inc.", /* 3613 */ "Altor plc", /* 3614 */ "SoftWell Performance AB", /* 3615 */ "United Resource Economic & Trading Center C.,", /* 3616 */ "SurfControl plc", /* 3617 */ "Flying Crocodile, Inc", /* 3618 */ "ProxyMed, Inc.", /* 3619 */ "Transact Systems, Inc.", /* 3620 */ "Nuance Communications", /* 3621 */ "GEFM", /* 3622 */ "Systemintegrering AB", /* 3623 */ "Enator Communications AB", /* 3624 */ "iHighway.net, Inc.", /* 3625 */ "Dipl.-Ing. (FH) Markus Drechsler", /* 3626 */ "Criptolab", /* 3627 */ "Tietokesko Ltd", /* 3628 */ "Atos Origin", /* 3629 */ "DeltaKabel Telecom cv", /* 3630 */ "Bridgewater Systems Corp.", /* 3631 */ "MaxComm Technologies Inc.", /* 3632 */ "iD2 Technologies AB", /* 3633 */ "Allied Riser Communications Inc.", /* 3634 */ "Wavesat Telecom, Inc.", /* 3635 */ "dpa Deutsche Presse-Agentur GmbH", /* 3636 */ "Power & Data Technology, Inc.", /* 3637 */ "IntelliReach Corporation", /* 3638 */ "WM-data", /* 3639 */ "DataPath, Inc.", /* 3640 */ "Netaphor Software, Inc.", /* 3641 */ "CryptoConsult", /* 3642 */ "DIRTSA", /* 3643 */ "Carden Enterprise Ltd", /* 3644 */ "SONZ Ltd", /* 3645 */ "ASKEY Computer Corp.", /* 3646 */ "RaidTec, Inc.", /* 3647 */ "Harcourt Brace & Company", /* 3648 */ "Rollins Technology Inc.", /* 3649 */ "NetOps Corp", /* 3650 */ "Know IT AB", /* 3651 */ "Pan Dacom Direkt GmbH", /* 3652 */ "Cirque Networks, Inc.", /* 3653 */ "NaviNet", /* 3654 */ "Germanischer Lloyd AG", /* 3655 */ "FORCE Computers GmbH", /* 3656 */ "Ericsson Wireless LAN Systems", /* 3657 */ "Dalian F.T.Z. TianYang Int'l Trade Co., Ltd.", /* 3658 */ "Ethercity Designs and Hosting Solutions", /* 3659 */ "G3M Corporation", /* 3660 */ "Secure Data Access Inc.", /* 3661 */ "QWES.com Incorporated", /* 3662 */ "Megaxess", /* 3663 */ "Polygon", /* 3664 */ "Netoids Inc.", /* 3665 */ "Acriter Software B.V.", /* 3666 */ "InteleNet Communications", /* 3667 */ "Control Module Inc.(CMI)", /* 3668 */ "Aveo Inc.", /* 3669 */ "MD PREI", /* 3670 */ "Picazo Communication Inc.", /* 3671 */ "Scottsdale Securities, Inc.", /* 3672 */ "WebManage Technologies, Inc.", /* 3673 */ "Infoclubindia", /* 3674 */ "Connor Plumbing & Heating", /* 3675 */ "Sentryl Software, Inc.", /* 3676 */ "Engetron - Engenharia Eletronica Ind. e Com. Ltda.", /* 3677 */ "Icaro", /* 3678 */ "Unity Health", /* 3679 */ "Parity Software Dev. Corp.", /* 3680 */ "David D. Hartman, CPA", /* 3681 */ "ComGates Communications Ltd.", /* 3682 */ "Honeywell Oy, Varkaus", /* 3683 */ "InterWorld Corp.", /* 3684 */ "Sento Pty Ltd", /* 3685 */ "Wicks By Julie", /* 3686 */ "HSD - Hardware Software Development GmbH", /* 3687 */ "Morpho e-documents", /* 3688 */ "New Technology Development, Inc.", /* 3689 */ "TIAA-CREF", /* 3690 */ "Team2it-CopyLeft S.r.l.", /* 3691 */ "Intuit", /* 3692 */ "Hakusan Corporation", /* 3693 */ "Thyssen Informatik GmbH", /* 3694 */ "Chromatis Networks Inc.", /* 3695 */ "MicroProdigy", /* 3696 */ "Quantum Corporation", /* 3697 */ "Saraide", /* 3698 */ "Network Technologies Inc", /* 3699 */ "Stellar One Corporation", /* 3700 */ "TurboNet Communications", /* 3701 */ "Printrak International Inc.", /* 3702 */ "CyberFax Inc.", /* 3703 */ "AMD", /* 3704 */ "ICET SpA", /* 3705 */ "ADiTel Telekommunikation Network GmbH", /* 3706 */ "ADiT Holding GmbH", /* 3707 */ "ADLER DATA Software GmbH", /* 3708 */ "Teracom Telematica Ltda.", /* 3709 */ "LANmetrix Pty Ltd", /* 3710 */ "SINETICA", /* 3711 */ "GigaNet Incorporated", /* 3712 */ "Voxent Systems Ltd", /* 3713 */ "BellSouth Wireless Data, L.P.", /* 3714 */ "Teleste Corporation", /* 3715 */ "Brand Communications Limited", /* 3716 */ "GeNUA mbH", /* 3717 */ "Philips Broadband Networks", /* 3718 */ "Exmicro", /* 3719 */ "Visiqn", /* 3720 */ "OTONET s.a.r.l.", /* 3721 */ "Vulkan-Com Ltd.", /* 3722 */ "Ankey", /* 3723 */ "Interactive Communications Systems", /* 3724 */ "AC&E Ltd", /* 3725 */ "enCommerce, Incorporated", /* 3726 */ "Western Multiplex", /* 3727 */ "REALM Information Technoligies, Inc.", /* 3728 */ "Nokia", /* 3729 */ "Westport Technologies", /* 3730 */ "The SABRE Group", /* 3731 */ "Calamp Wireless Networks Inc", /* 3732 */ "Datakom Austria DI Erich", /* 3733 */ "Security-7 Ltd.", /* 3734 */ "Telesafe AS", /* 3735 */ "Goodfield Corp.", /* 3736 */ "Pleiades Communications, Inc.", /* 3737 */ "StreamSoft, Inc.", /* 3738 */ "The Eighteenth Software Co.,Ltd.", /* 3739 */ "Aquila Technologies Group, Inc", /* 3740 */ "Foliage Software Systems", /* 3741 */ "VIATechnologies,Inc", /* 3742 */ "P.D. Systems International Ltd", /* 3743 */ "DATEV eG", /* 3744 */ "ClustRa AS", /* 3745 */ "Swisscom AG", /* 3746 */ "AS Yegen", /* 3747 */ "Bank of America", /* 3748 */ "TeleHub Communication Corp", /* 3749 */ "Iscape Software", /* 3750 */ "Dragon Industries", /* 3751 */ "Thales Norway AS", /* 3752 */ "Aitek S.r.L.", /* 3753 */ "Crag Technologies", /* 3754 */ "ATOP Technologies, Inc.", /* 3755 */ "Julien Daniel", /* 3756 */ "PT. Usaha Mediantara Intranet", /* 3757 */ "Core Networks, Inc", /* 3758 */ "OMEGA Micro Systems", /* 3759 */ "Content Technologies Ltd", /* 3760 */ "HAGER-ELECTRONICS GmbH", /* 3761 */ "Kwangwoon University", /* 3762 */ "Veramark", /* 3763 */ "Quantum Corporation", /* 3764 */ "StrategicLink Consulting", /* 3765 */ "Hannibal Teknologies", /* 3766 */ "Pan-International Industrial Corp.", /* 3767 */ "Department of Veterans Affairs", /* 3768 */ "Banyan Networks Pvt. Ltd.", /* 3769 */ "MCK Communications", /* 3770 */ "ko6yd", /* 3771 */ "POS Resources Inc.", /* 3772 */ "Siara Systems", /* 3773 */ "Wavelink", /* 3774 */ "AGFA Corporation", /* 3775 */ "Millenium Solutions", /* 3776 */ "HydraWEB Technologies", /* 3777 */ "CP Eletronica Industrial S/A", /* 3778 */ "Kingmax Technology Inc.", /* 3779 */ "Level 3 Communications, Inc.", /* 3780 */ "WXN, Inc.", /* 3781 */ "University of North Texas", /* 3782 */ "EMR Corporation", /* 3783 */ "Speakerbus Ltd.", /* 3784 */ "Cirrus Logic", /* 3785 */ "Highland Technology Group, Inc.", /* 3786 */ "Russel Lane & Associates, Inc.", /* 3787 */ "Talktyme Technologies Inc", /* 3788 */ "Wire Terminator (WT)", /* 3789 */ "Hamamatsu Photonics K.K. Kazuhiko", /* 3790 */ "TeleComp, Inc.", /* 3791 */ "LOGEC Systems", /* 3792 */ "Lanier Worldwide, Inc.", /* 3793 */ "Midas Communication Technologies Private Limited", /* 3794 */ "Enact Inc.", /* 3795 */ "imt Information Management Technology AG", /* 3796 */ "BENQ Corporation", /* 3797 */ "Jinny Paging", /* 3798 */ "Live Networking Inc.", /* 3799 */ "Unisource Italia S.p.A.", /* 3800 */ "Agranat Systems, Inc.", /* 3801 */ "Softamed", /* 3802 */ "Praxon", /* 3803 */ "Standard Chartered Bank (Treasury)", /* 3804 */ "Longhai Yongchuan Foods Co., Ltd.", /* 3805 */ "Shiron Satellite Communications(1996) Ltd.", /* 3806 */ "Wuhan Research Institute of Posts and Telecommunications", /* 3807 */ "Cyber Power System Inc.", /* 3808 */ "Cyras Systems Inc", /* 3809 */ "NetLine", /* 3810 */ "SpectraSoft Inc.", /* 3811 */ "Anda Networks, Inc.", /* 3812 */ "Ellacoya Networks, Inc.", /* 3813 */ "CallNet Communications, Inc.", /* 3814 */ "Control Solutions, Inc.", /* 3815 */ "Nominet UK", /* 3816 */ "Monfox, Inc.", /* 3817 */ "MetraTech Corp.", /* 3818 */ "OptiSystems Solutions Ltd.", /* 3819 */ "Ziga Corporation", /* 3820 */ "Indian Valley Enterpriseses Inc.", /* 3821 */ "Edimax Technology Co., Ltd.", /* 3822 */ "Touchbase Communications", /* 3823 */ "Attune Networks", /* 3824 */ "Advanced Network & Services, Inc.", /* 3825 */ "Nextpoint Networks, Inc.", /* 3826 */ "Moscow Central Depository", /* 3827 */ "STG Inc.", /* 3828 */ "Imaging Technologies Corporation", /* 3829 */ "Acision", /* 3830 */ "Oblix Inc.", /* 3831 */ "Taylored Solutions", /* 3832 */ "Schneider Electric", /* 3833 */ "Novartis Pharma AG", /* 3834 */ "ALPS Electric", /* 3835 */ "Terese Brown Real Estate", /* 3836 */ "HBOC Imaging Solutions Group", /* 3837 */ "Gasper Corporation", /* 3838 */ "NeoWave Inc.", /* 3839 */ "Globe Institute of Technology", /* 3840 */ "Flycast Communications Corp.", /* 3841 */ "lkis", /* 3842 */ "Pyderion Contact Technologies Inc.", /* 3843 */ "Graham Technology plc", /* 3844 */ "Citrix Systems Inc.", /* 3845 */ "QMaster Software Solutions, Inc.", /* 3846 */ "Ensemble Communications Incorporated", /* 3847 */ "Northchurch Communications, Inc.", /* 3848 */ "Object Integration, Inc.", /* 3849 */ "Xnet Communications GmbH", /* 3850 */ "Optika Inc.", /* 3851 */ "Soft-Inter Technologies", /* 3852 */ "ViaGate Technologies", /* 3853 */ "KCP, Inc.", /* 3854 */ "Elastic Networks", /* 3855 */ "Siebel Systems", /* 3856 */ "Sage Research Facility", /* 3857 */ "Capricon Engineers", /* 3858 */ "VXL Instruments Ltd", /* 3859 */ "First International Computer, Inc.", /* 3860 */ "Fujitsu Network Communications, Inc.", /* 3861 */ "Royal Bank of Scotland", /* 3862 */ "Canadian Marconi Company", /* 3863 */ "InTalk, Inc.", /* 3864 */ "Thorne, West", /* 3865 */ "Global Net Center", /* 3866 */ "Presence Technology GmbH+Co.KGMichael", /* 3867 */ "Convergys Information Management Group", /* 3868 */ "IntelliLogic Networks, Inc.", /* 3869 */ "Internet Business Emporium", /* 3870 */ "Ditech Corporation", /* 3871 */ "Miranda Technologies Inc.", /* 3872 */ "QLogic", /* 3873 */ "InfoValue Computing, Inc.", /* 3874 */ "Metro Computing Consultants, Inc.", /* 3875 */ "ARINC Incorporated", /* 3876 */ "First American National Bank", /* 3877 */ "Real Software Company", /* 3878 */ "Taiwan Telecommunication Industry Co., Ltd.", /* 3879 */ "Wireless Information Transfer Systems", /* 3880 */ "Telefonaktiebolaget LM Ericsson", /* 3881 */ "Pacom Systems Pty Ltd", /* 3882 */ "Next plc", /* 3883 */ "Phobos Corporation", /* 3884 */ "Lifeline Systems Inc.", /* 3885 */ "MiMax Information", /* 3886 */ "Elder Enterprises", /* 3887 */ "Iapetus Software", /* 3888 */ "CE Infosys GmbH", /* 3889 */ "Across Wireless AB", /* 3890 */ "Chicago Board of Trade", /* 3891 */ "ATEB", /* 3892 */ "Parks Comunicacoes Digitais", /* 3893 */ "Pitney Bowes", /* 3894 */ "Advent Communications Ltd", /* 3895 */ "Automated Integrated Solutions, Inc.", /* 3896 */ "Edison Technology Solutions", /* 3897 */ "Mitsubishi Telecommunications Network Division", /* 3898 */ "South China Morning Post Publishers Ltd", /* 3899 */ "Raster Solutions Pty. Ltd.", /* 3900 */ "Managed Messaging, LLC", /* 3901 */ "Zhongxing Telecom Co.,ltd. (abbr. ZTE)", /* 3902 */ "Tornado Development, Inc.", /* 3903 */ "Xlink Internet Service GmbH", /* 3904 */ "Telenordia Internet", /* 3905 */ "Data Communication Technology Research Institute", /* 3906 */ "California Independent System Operator", /* 3907 */ "GSP", /* 3908 */ "Nodes, Inc.", /* 3909 */ "Railtrack PLC", /* 3910 */ "Glasner Consulting", /* 3911 */ "GWcom, Inc.", /* 3912 */ "Array Telecom Corp.", /* 3913 */ "TCOSoft, Inc.", /* 3914 */ "Teknis Electronics", /* 3915 */ "Neo-Core, Inc.", /* 3916 */ "V-Bits, Inc.", /* 3917 */ "Watson Wyatt Worldwide", /* 3918 */ "Monterey Networks, Inc.", /* 3919 */ "CSNet Consulting, Inc.", /* 3920 */ "Aplion Networks, Inc.", /* 3921 */ "Operational Research Consultants", /* 3922 */ "Intrak, Inc.", /* 3923 */ "Policy Management Systems Corp.", /* 3924 */ "Encompass Enterprise Management Consultants", /* 3925 */ "NewSouth Communications Corp.", /* 3926 */ "WarpSpeed Communications", /* 3927 */ "Sandwich Wireless Communications, Inc.", /* 3928 */ "NEITH Creative Beauty", /* 3929 */ "NTT Electronics Corporation", /* 3930 */ "EasyAccess", /* 3931 */ "Lara Technology, Inc.", /* 3932 */ "NEXO", /* 3933 */ "Net-Wise Communications Ltd", /* 3934 */ "Centro Cantonale d'Informatica", /* 3935 */ "SINTECA", /* 3936 */ "EMS Technologies Canada Ltd.", /* 3937 */ "Deccan Technologies, Inc.Vijay Burgula/Vik Jang", /* 3938 */ "Internet Devices, Inc.", /* 3939 */ "Ninety.De", /* 3940 */ "Santak Electronics Co. Ltd.", /* 3941 */ "Aqua Project Group", /* 3942 */ "Deva.net", /* 3943 */ "Data Solutions Group", /* 3944 */ "Sylantro Systems", /* 3945 */ "Conklin Corporation", /* 3946 */ "Inverse Network Technology", /* 3947 */ "MicroLegend Telecom Systems Inc.", /* 3948 */ "Intrinsix Corporation", /* 3949 */ "TierTwo Systems", /* 3950 */ "Visionik A/S", /* 3951 */ "Caly Corporation", /* 3952 */ "Albert Ackermann GmbH + Co KG", /* 3953 */ "Mitra Imaging Inc.", /* 3954 */ "Linksys", /* 3955 */ "Envox", /* 3956 */ "Globalarchitect", /* 3957 */ "Solution Associates", /* 3958 */ "InterCall Communications & Consulting", /* 3959 */ "Government Technology Solutions", /* 3960 */ "Corona Networks", /* 3961 */ "MGL Groupe AUBAY", /* 3962 */ "R.C. Wright & Associates", /* 3963 */ "Danet GmbH", /* 3964 */ "Spacebridge Networks Corporation", /* 3965 */ "Allianz Elementar Versicherungs-Aktiengesellschaften", /* 3966 */ "Bosch Sicherheitssysteme Engineering GmbH", /* 3967 */ "Webline Communications Corp.", /* 3968 */ "RealNetworks, Inc.", /* 3969 */ "FragRage Network", /* 3970 */ "IMECOM", /* 3971 */ "Apsion", /* 3972 */ "Aelita Software Group", /* 3973 */ "Custom Internetworking Inc.", /* 3974 */ "Boston Communications Group, Inc.", /* 3975 */ "LinkData Solutions (Pty) Limited", /* 3976 */ "Broadband Networks, Inc.", /* 3977 */ "Ingenieurbuero fuer Telekommunikations- undSoftware-Systemloesungen", /* 3978 */ "AsGa Microeletronica S.A.", /* 3979 */ "Home Account Network, Inc.", /* 3980 */ "Troika Networks, Inc.", /* 3981 */ "FaxNET Corporation", /* 3982 */ "Video Networks, Inc", /* 3983 */ "EBSCO Publishing", /* 3984 */ "Avery Computer Systems", /* 3985 */ "HighwayMaster", /* 3986 */ "Concept Webcd Services Pvt. Ltd.", /* 3987 */ "Finecom Co., Ltd.", /* 3988 */ "DigiComm Corporation", /* 3989 */ "Innovative Technology Software Systems Ltd", /* 3990 */ "Reticom", /* 3991 */ "Ohmega Electronic Products Ltd.", /* 3992 */ "Perfect Order", /* 3993 */ "Virtual Resources Communications Inc.", /* 3994 */ "VASCO Data Security International, Inc.", /* 3995 */ "Open Systems AG", /* 3996 */ "ImproWare AG", /* 3997 */ "Cherus", /* 3998 */ "dydx", /* 3999 */ "Hi-net Research Group", /* 4000 */ "KADAK Products Ltd.", /* 4001 */ "Banco del Buen Ayre", /* 4002 */ "George Mason University", /* 4003 */ "Aloha Networks Inc.", /* 4004 */ "Tundo Corporation", /* 4005 */ "Tundo Communication and Telephony Ltd.", /* 4006 */ "Cable & Wireless Communications plc", /* 4007 */ "Ardebil Pty Ltd", /* 4008 */ "Telephonics Corporation", /* 4009 */ "Dorsai Technology", /* 4010 */ "CNUT Archetype Ltd", /* 4011 */ "Selectica, Inc.", /* 4012 */ "KPMG LLP ICE Telecom-SVO", /* 4013 */ "StarBurst Software", /* 4014 */ "Computer Configurations Holdings", /* 4015 */ "Iperia, Incorporated", /* 4016 */ "Logisistem Srl", /* 4017 */ "Security First Technologies, Inc.", /* 4018 */ "APIS Software GmbH", /* 4019 */ "Coop Switzerland", /* 4020 */ "Ensim Corporation", /* 4021 */ "AEC Ltd.", /* 4022 */ "Imran", /* 4023 */ "Avantel S.A.", /* 4024 */ "Lexitech, Inc.", /* 4025 */ "Internet Access AG", /* 4026 */ "GTE Laboratories Incorporated", /* 4027 */ "Decision Networks", /* 4028 */ "NSI Communications Systems Inc.", /* 4029 */ "Mitsubishi Electric Automation, Inc.- UPS division", /* 4030 */ "Orillion USA, Inc.", /* 4031 */ "DataKinetics Ltd", /* 4032 */ "Signal Core", /* 4033 */ "IntraNet, Inc.", /* 4034 */ "Ignitus Communications", /* 4035 */ "Enator Telub AB", /* 4036 */ "Presbyterian Church (USA)", /* 4037 */ "Softov Advanced Systems Ltd.", /* 4038 */ "Mayan Networks Corporation", /* 4039 */ "MicroSignals Group", /* 4040 */ "Nomura International Plc", /* 4041 */ "DigiCommerce Ltd.", /* 4042 */ "QNX Software Systems Ltd.", /* 4043 */ "Eloquence Limited", /* 4044 */ "Thomson-CSF Communications", /* 4045 */ "SCORT", /* 4046 */ "Hunan Computer CO., Ltd.", /* 4047 */ "Kinko's, Inc.", /* 4048 */ "Opus Comunicacao de Dados", /* 4049 */ "Infuntainment Limited", /* 4050 */ "SowsEar Solution Design Group", /* 4051 */ "Vanguard Security Technologies Ltd Raviv Karnieli", /* 4052 */ "Switchcore", /* 4053 */ "Abatis Systems Corporation", /* 4054 */ "Nimbus Software AS", /* 4055 */ "StreamCORE", /* 4056 */ "ControlNet, Inc.", /* 4057 */ "Generali IT-Solutions GmbH", /* 4058 */ "Broadlogic", /* 4059 */ "JFAX.COM", /* 4060 */ "Technology Control Services", /* 4061 */ "Astral Point Communications, Inc.", /* 4062 */ "ASC Technologies AG", /* 4063 */ "Elma Oy Electronic Trading", /* 4064 */ "InfraServ GmbH & Co Gendorf KG", /* 4065 */ "Carioli Consulting Inc.", /* 4066 */ "Fivemere Ltd.", /* 4067 */ "Pathway Inc.", /* 4068 */ "Ellison Software Consulting, Inc.", /* 4069 */ "US West Internet Services", /* 4070 */ "PRAIM S.p.A.", /* 4071 */ "Qeyton Systems AB", /* 4072 */ "TeleDiffusion de France", /* 4073 */ "Krutulis Enterprises", /* 4074 */ "Sedona Networks", /* 4075 */ "Novera Software, Inc.", /* 4076 */ "The Limited, Inc.", /* 4077 */ "Symon Communications", /* 4078 */ "24/7 Media, Inc.", /* 4079 */ "Archangels Realty, Inc.", /* 4080 */ "Zelea", /* 4081 */ "Timko Enterprises", /* 4082 */ "Spark New Zealand", /* 4083 */ "Trilogy Development Group", /* 4084 */ "D.I.B. Ges. fuer Standortbetreiberdienste mbH", /* 4085 */ "Ericsson Research Montreal (LMC)", /* 4086 */ "USWeb/CKS", /* 4087 */ "aku awekku & co.", /* 4088 */ "SALUtel", /* 4089 */ "Consorte Tele AS", /* 4090 */ "Infitel Italia srl", /* 4091 */ "Computel Standby BV", /* 4092 */ "Merlot Communications, Inc.", /* 4093 */ "Quality Tank & Construction Co. Inc.", /* 4094 */ "Axent Technologies", /* 4095 */ "Thales e-Security", /* 4096 */ "Elan Text to Speech", /* 4097 */ "Signaal Communications", /* 4098 */ "Tristrata Inc.", /* 4099 */ "Wavetek Wandel Goltermann", /* 4100 */ "John Hancock Financial Services", /* 4101 */ "SHYM Technology Inc.", /* 4102 */ "CNN", /* 4103 */ "Redwood Technology B.V.", /* 4104 */ "Stargus, Inc.", /* 4105 */ "Astrophysikalisches Institut Potsdam", /* 4106 */ "Beijing Telecom Administration, China", /* 4107 */ "Serendip", /* 4108 */ "Durango Security Group", /* 4109 */ "Softstart Services Inc.", /* 4110 */ "Westell (UK) Ltd", /* 4111 */ "Tunitas Group", /* 4112 */ "Tenor Networks, Inc.", /* 4113 */ "T10.net", /* 4114 */ "Arris Interactive LLC", /* 4115 */ "InfoInterActive Inc.", /* 4116 */ "Entertainment Systems Technology", /* 4117 */ "Tesla Liptovsky Hradok a.s.", /* 4118 */ "Remote Management Systems Pty Ltd", /* 4119 */ "Sonik Technologies Corp.", /* 4120 */ "Digital Chicago.net", /* 4121 */ "The University of Texas Health Science Center at Houston", /* 4122 */ "Hitachi America Ltd", /* 4123 */ "Unify Consulting Group, Inc.", /* 4124 */ "Siemens AG ICP Kornelius", /* 4125 */ "LogMatrix Inc", /* 4126 */ "Mercury Computer Systems, Inc.", /* 4127 */ "ARM Ltd.", /* 4128 */ "Mnaccari@consulting", /* 4129 */ "Microwave Data Systems", /* 4130 */ "Tridium", /* 4131 */ "Connecticut Hospital Association", /* 4132 */ "philipjeddycpas", /* 4133 */ "Philip J. Eddy & Partners Pty Ltd", /* 4134 */ "NiceTec GmbH", /* 4135 */ "UQAM | Université du Québec à Montréal", /* 4136 */ "GAURI Info-Comm.Inc.", /* 4137 */ "Sychron Ltd", /* 4138 */ "WapIT Ltd.", /* 4139 */ "Computer & Telephony Systems AB", /* 4140 */ "IMR Worldwide Pty Ltd", /* 4141 */ "FDS Networks Limited", /* 4142 */ "M&I Data Services Alexander", /* 4143 */ "PricewaterhouseCoopers-FP5", /* 4144 */ "Cristie Data Products Limited", /* 4145 */ "GlobalSign NV/SA", /* 4146 */ "Zuercher Kantonalbank", /* 4147 */ "DeWitt, Ross &Stevens, S.C.", /* 4148 */ "Accrue Software, Inc.", /* 4149 */ "Northwestern Mutual Life Insurance Company", /* 4150 */ "iMPath Networks Inc.", /* 4151 */ "Two Way TV", /* 4152 */ "Simple Networks", /* 4153 */ "Versa Technology, Inc.", /* 4154 */ "Cemoc Ltd", /* 4155 */ "New Access Communications, Inc.", /* 4156 */ "BCE Emergis", /* 4157 */ "Milman Consulting", /* 4158 */ "Electronic Theatre Controls, Inc.", /* 4159 */ "VIVE Synergies Inc.", /* 4160 */ "Qtera Corporation", /* 4161 */ "Input Output Inc.", /* 4162 */ "Quarry Technologies", /* 4163 */ NULL, /* 4164 */ "SE Electronics", /* 4165 */ "The Mercy Foundation", /* 4166 */ "Markus Lauer IT Consulting", /* 4167 */ "Systems Management Specialists", /* 4168 */ "Syzygy Solutions", /* 4169 */ "University of Wisconsin-Milwaukee", /* 4170 */ "BOSUNG Data Communication Co.", /* 4171 */ "Narae Information & Communication Enterprise", /* 4172 */ "VIERLING Communication S.A.S.", /* 4173 */ "Critical Devices, Inc.", /* 4174 */ "Tessler's Nifty Tools", /* 4175 */ "Newton Solutions", /* 4176 */ "Redding Enterprises", /* 4177 */ "Aspect Software", /* 4178 */ "Commercial Technologies Corp", /* 4179 */ "Talkstar.Com Inc.", /* 4180 */ "Generic Telecom Ltd.", /* 4181 */ "Leningrad Nuclear Power Plant", /* 4182 */ "Hammer Technologies", /* 4183 */ "SMS - Shared Medical Systems, Inc.", /* 4184 */ "Boostworks", /* 4185 */ "AKA Consulting, Inc.", /* 4186 */ "Storage Area Networks Ltd", /* 4187 */ "Realize Communications", /* 4188 */ "EGIS K.K.", /* 4189 */ "ETRADE Securities", /* 4190 */ "SIGOS Systemintegration GmbH", /* 4191 */ "Tennessee Valley Authority", /* 4192 */ "VUT BRNO, faculty of EE and CS", /* 4193 */ "Leonia plc", /* 4194 */ "TeleSoft Inc.", /* 4195 */ "Siemens AG Automation & Drives", /* 4196 */ "Cap Gemini Denmark A/S", /* 4197 */ "VPN Consortium", /* 4198 */ "Cellnet Technology, Inc.", /* 4199 */ "Fast Search & Transfer", /* 4200 */ "Tonna Electronique", /* 4201 */ "Samwoo Telecommunications Co., Ltd.", /* 4202 */ "The OpenLDAP Foundation", /* 4203 */ "Adtec Co., Ltd.", /* 4204 */ "Durak Unlimited", /* 4205 */ "MITA Industrial Co., Ltd.", /* 4206 */ "Daydream Promotions", /* 4207 */ "Tantivy Communications, Inc.", /* 4208 */ "CDVS Inc.", /* 4209 */ "Assumption University", /* 4210 */ "Corillian", /* 4211 */ "SPM - Systementwicklung und Projektmanagement GmbH", /* 4212 */ "Infrax Inc.", /* 4213 */ "Sunquest Information Systems, Inc.", /* 4214 */ "SilkRoad, Inc.", /* 4215 */ "Triton Network Systems", /* 4216 */ "Opalis", /* 4217 */ "Gecko Software Limited", /* 4218 */ "regioconnect GmbH", /* 4219 */ "ARCANVS", /* 4220 */ "Soundscaipe", /* 4221 */ "OnDisplay Incorporated", /* 4222 */ "Milgo Solutions, Inc.", /* 4223 */ "John H. Harland Company", /* 4224 */ "Peach Networks", /* 4225 */ "Composit Communications", /* 4226 */ "Sixtra Chile S.A.", /* 4227 */ "DASCOM, Inc.", /* 4228 */ "Westfair Foods Ltd.", /* 4229 */ "Pirouette, Inc.", /* 4230 */ "OB Telematics", /* 4231 */ "CTX Opto-Electronics Corp.", /* 4232 */ "Dalian Daxian Network System Co.ltd", /* 4233 */ "Pragma Ltda.", /* 4234 */ "CultureShock Multimedia", /* 4235 */ "Spectel Ltd.", /* 4236 */ "Busby Software", /* 4237 */ "Media Station Inc.", /* 4238 */ "Kommunedata A/S", /* 4239 */ "Vodafone Information Systems GmbH", /* 4240 */ "Peakstone Corporation", /* 4241 */ "The Clorox Company", /* 4242 */ "NPO Infoservice", /* 4243 */ "Cinnabar Networks Inc.", /* 4244 */ "Posten SDS AS", /* 4245 */ "Comverse Network Systems (CNS)", /* 4246 */ "The University of Edinburgh", /* 4247 */ "Interconexion Electrica S.A.", /* 4248 */ "NATEKS Ltd.", /* 4249 */ "H.I.T. Industries Sales Ltd", /* 4250 */ "System Design Repair", /* 4251 */ "High Speed Access", /* 4252 */ "LuxN, Inc.", /* 4253 */ "arvato systems GmbH", /* 4254 */ "Perfecto Technologies", /* 4255 */ "Kipling Information Technology AB", /* 4256 */ "Cyberstation, Inc.", /* 4257 */ "Open4Rent", /* 4258 */ "FDP", /* 4259 */ "3rd Millennium Consulting", /* 4260 */ "Globol Solutions", /* 4261 */ "Jean=Claude Metal Craft", /* 4262 */ "Dr. Andreas Muller, Beratung und Entwicklung", /* 4263 */ "World Ramp, Inc.", /* 4264 */ "Tachion Network Technologies Inc.", /* 4265 */ "FernUniversitaet Hagen", /* 4266 */ "Transcend, Inc.", /* 4267 */ "BancTec Computer and Network Services", /* 4268 */ "WorldPort Communications, Inc.", /* 4269 */ "EDV-Beratung Blechschmidt", /* 4270 */ "Nevex Software Technologies Inc.", /* 4271 */ "Exact Solutions, Inc.", /* 4272 */ "LEROY AUTOMATIQUE INDUSTRIELLE", /* 4273 */ "Pangolin UK Ltd", /* 4274 */ "Duke University", /* 4275 */ "PCS Innovations Inc.", /* 4276 */ "Telocity Communications, Inc.", /* 4277 */ "Yahoo!", /* 4278 */ "Sirocco Systems", /* 4279 */ "ARtem GmbHMichael Marsanu/Catrinel Catrinescu", /* 4280 */ "Assumption", /* 4281 */ "KenCast Inc.", /* 4282 */ "Dual-Zentrumn GmbH", /* 4283 */ "Norweb Internett Tjenester", /* 4284 */ "Ruslan CommunicationsDmitry Shibayev, Alexandr Gorbachev", /* 4285 */ "e-Security, Inc.", /* 4286 */ "Philips Consumer Electronics", /* 4287 */ "Forge Research Pty Ltd", /* 4288 */ "VBrick Systems, Inc.", /* 4289 */ "Logic Innovations, Inc.", /* 4290 */ "Chordiant Software Inc.", /* 4291 */ "Entera, Inc.", /* 4292 */ "Bensons", /* 4293 */ "Salbu (Pty) Ltd", /* 4294 */ "Kalki Communication Technologies Pvt Ltd", /* 4295 */ "Cenfor S.L.", /* 4296 */ "Finisar Corporation", /* 4297 */ "ETC (Excellence in Technology Consulting)", /* 4298 */ "Open Solution Providers", /* 4299 */ "Inmon Corp.", /* 4300 */ "UniServe Consulting Limited", /* 4301 */ "Cybex Computer Products Corporation", /* 4302 */ "CamART", /* 4303 */ "CSIRO - Div. of Animal Health", /* 4304 */ "University of Maryland", /* 4305 */ "JMDEL Systems", /* 4306 */ "Office Connect, Inc.", /* 4307 */ "Consejo Superior de Camaras", /* 4308 */ "IP Technologies", /* 4309 */ "Unique Computer Services, Inc.", /* 4310 */ "Equinix", /* 4311 */ "VITA Systems, Inc.", /* 4312 */ "Allayer Technologies", /* 4313 */ "Xilinx, Inc.", /* 4314 */ "XACCT Technologies, Ltd.", /* 4315 */ "Brandeis University", /* 4316 */ "Javelin Technology Corp.", /* 4317 */ "Edixia", /* 4318 */ "Ennovate Networks, Inc", /* 4319 */ "Freshwater Software, Inc.", /* 4320 */ "Riverbed Technologies", /* 4321 */ "Murata Machinery, Ltd.", /* 4322 */ "Quantum Bridge", /* 4323 */ "SAEJIN T&M Co., Ltd.", /* 4324 */ "Aperto Networks", /* 4325 */ "Crown International", /* 4326 */ "Trading WorldCom", /* 4327 */ "M.I. Systems, K.K.", /* 4328 */ "Siemens AG", /* 4329 */ "PMC-Sierra Inc.", /* 4330 */ "Aventail Corporation", /* 4331 */ "Institute of Systems & information Technologies/KYUSHU", /* 4332 */ "Insight Technology, Inc.", /* 4333 */ "Ampersand Chantilly Communications", /* 4334 */ "TechWorld Incorporated", /* 4335 */ "Expertech Pty Ltd", /* 4336 */ "RadiSys Corp.", /* 4337 */ "Case Corporation", /* 4338 */ "Rhode Island Economic Development Corporation", /* 4339 */ "Bacteriophage Lambda", /* 4340 */ "Spider Internet Services", /* 4341 */ "USHealth Real Estate", /* 4342 */ "Boundless Technologies", /* 4343 */ "Post-Industrial Training Institute", /* 4344 */ "Thomas & Betts", /* 4345 */ "Phoenix Contact GmbH & Co.", /* 4346 */ "MessageWise Inc.", /* 4347 */ "Domino Computers Nigeria Ltd", /* 4348 */ "LXCO Technologies AG", /* 4349 */ "Maxpert AG", /* 4350 */ "Network Systems Group", /* 4351 */ "Urgle", /* 4352 */ "Builders Network Ltd", /* 4353 */ "NetDragon Ltd", /* 4354 */ "RapidStream, Inc.", /* 4355 */ "Inform GmbH & Co. KG", /* 4356 */ "Coteng", /* 4357 */ "Ziatech Corporation", /* 4358 */ "TelGen Corporation", /* 4359 */ "Tumbleweed Communications", /* 4360 */ "Amgen, Inc.", /* 4361 */ "Nylorac Software, Inc.", /* 4362 */ "University of Bristol Julius", /* 4363 */ "BV Solutions Group", /* 4364 */ "Myowngig", /* 4365 */ "Locus Corp.", /* 4366 */ "Electronic Laboratory Services CC", /* 4367 */ "H.A.N.D. GmbH", /* 4368 */ "Brocade Communications Systems, Inc.", /* 4369 */ "Tokyo DisneySea", /* 4370 */ "Digital United Inc.", /* 4371 */ "Softlink s.r.o.", /* 4372 */ "Rivere Corporation", /* 4373 */ "Motive Communications, Inc.", /* 4374 */ "DT Research, Inc", /* 4375 */ "Nettech Systems, Inc.", /* 4376 */ "X-Point Communications", /* 4377 */ NULL, /* 4378 */ "Alien Internet Services", /* 4379 */ "Elipse Software", /* 4380 */ "Astracon Inc.", /* 4381 */ "Aladdin Knowledge Systems Ltd.", /* 4382 */ "Glassey.com", /* 4383 */ "Meridianus", /* 4384 */ "Stime.org WG", /* 4385 */ "TDC A/S", /* 4386 */ "Ubique Ltd.", /* 4387 */ "Alcatel Altech Telecoms", /* 4388 */ "Sys-Dis", /* 4389 */ "Kemper Insurance", /* 4390 */ "Texas A&M University", /* 4391 */ "Northbrook Services, Inc.", /* 4392 */ "Pentacom Ltd.", /* 4393 */ "SoftFx", /* 4394 */ "Unified Technologies Sverige HB", /* 4395 */ "The Open Group", /* 4396 */ "OPT Technologies Limited", /* 4397 */ "B&L Associates, Inc.", /* 4398 */ "Johnson Controls, Inc.", /* 4399 */ "Cypress Corporation", /* 4400 */ "MoonVine", /* 4401 */ "NetPredict, Inc", /* 4402 */ "Visual Brain Ltd S.a.r.l.", /* 4403 */ "Tekelec", /* 4404 */ "Ansid Inc.", /* 4405 */ "Toyo Information Systems Co., Ltd.", /* 4406 */ "Dracom Ltd.", /* 4407 */ "EDSL", /* 4408 */ "Campus Pipeline, Inc.", /* 4409 */ "Earth Star Group", /* 4410 */ "Swinburne.com", /* 4411 */ "Wrox Press", /* 4412 */ "Broadcom Corporation", /* 4413 */ "Scandinavian Softline Technology Oy", /* 4414 */ "Florida Department of Law Enforcement", /* 4415 */ "Starfire Experts Ltd", /* 4416 */ "Alidian Networks, Inc.", /* 4417 */ "MegaSys Computer Technologies", /* 4418 */ "Sony Online Entertainment", /* 4419 */ "Westica Limited", /* 4420 */ "Santera Systems Inc.", /* 4421 */ "GTE I.T.", /* 4422 */ "Garnet Systems Co., Ltd.", /* 4423 */ "Rapid Logic", /* 4424 */ "Meta Gymnastics, Inc.", /* 4425 */ "Fujitsu Australia Software Technology Pty Ltd", /* 4426 */ "Pironet Intranet AG", /* 4427 */ "Supercomputing Systems AG", /* 4428 */ "MegaChips Corporation", /* 4429 */ "Silicon Automation Systems (India) Ltd", /* 4430 */ "Netia", /* 4431 */ "Apani Networks", /* 4432 */ "Strategic Financial Planning", /* 4433 */ "Bluestone Software Inc.", /* 4434 */ "Suedtiroler Informatik AG", /* 4435 */ "Mission Critical", /* 4436 */ "Canadian Imperial Bank of Commerce", /* 4437 */ "Göteborg Energi AB", /* 4438 */ "EnZane Enterprise", /* 4439 */ "Purdue University", /* 4440 */ "GE Capital Fleet Services", /* 4441 */ "KARA", /* 4442 */ "Ned Boddie & Assoc.", /* 4443 */ "SAINCO", /* 4444 */ "INTER s.a.r.l.", /* 4445 */ "Prairie Development, Inc.", /* 4446 */ "Rochester Institute of Technology", /* 4447 */ "E-Lock Technologies, Inc.", /* 4448 */ "SSH Communications Security, Inc.", /* 4449 */ "iC-Consult", /* 4450 */ "MORION", /* 4451 */ "Telenor 4tel", /* 4452 */ "Infonet Services Corp.", /* 4453 */ "Gottfried Web and Computer Consulting", /* 4454 */ "I-Bus Corporation", /* 4455 */ "Qualimetrics", /* 4456 */ "Alpha & Omega Storehouse, LLC", /* 4457 */ "Radwin Ltd.", /* 4458 */ "Industree B.V.", /* 4459 */ "FirstWorld Communications", /* 4460 */ "OpenNetwork Technologies", /* 4461 */ "SVM Microwaves, s.r.o.", /* 4462 */ "TaoNet", /* 4463 */ "MPB Communications Inc.", /* 4464 */ "ViewCast.com", /* 4465 */ "Harmonic Video Network", /* 4466 */ "FibroLan", /* 4467 */ "Telkoor-QPS", /* 4468 */ "Diversinet Corp.", /* 4469 */ "TeleDream Inc.", /* 4470 */ "Network Security Wizards", /* 4471 */ "MONTAGE IT Services Inc.", /* 4472 */ "Opto 22", /* 4473 */ "PaxComm", /* 4474 */ "Rainbow Software Solutions, Inc.", /* 4475 */ "Lightrealm", /* 4476 */ "Infocom Systems Services", /* 4477 */ "Alacritech", /* 4478 */ "SpectraPoint Wireless LLC", /* 4479 */ "FastForward Networks, Inc.", /* 4480 */ "CIA Europe", /* 4481 */ "RWE AG", /* 4482 */ "IBI Co., Ltd.", /* 4483 */ "Pacific Softworks, Inc.", /* 4484 */ "Dataport Communications", /* 4485 */ "Verio Web Hosting", /* 4486 */ "Johnson & Johnson NCS", /* 4487 */ "MediaHouse Software Inc", /* 4488 */ "Sierra Networks, Inc.", /* 4489 */ "POLYGON Consultants in Informatics Ltd.", /* 4490 */ "Cable Television Laboratories, Inc.", /* 4491 */ "SolutionSoft Systems, Inc.", /* 4492 */ "UniRel Sistemi srl Mauro", /* 4493 */ "Novartis AG", /* 4494 */ "Taima Corp.", /* 4495 */ "Siemens Canada Ltd.", /* 4496 */ "Avail Networks, Inc.", /* 4497 */ "NetQoS, Inc.", /* 4498 */ "Safefunds.com", /* 4499 */ "Jordan Tech", /* 4500 */ "EforNet Corporation", /* 4501 */ "playbeing.org", /* 4502 */ "Corporate Information Technologies", /* 4503 */ "Seamless Kludge Internetworking Labs Ltd", /* 4504 */ "Caltex Australia Petroleum Pty Ltd", /* 4505 */ "Channels Measurement Services", /* 4506 */ "The Miami Herald", /* 4507 */ "Geeks Like Us", /* 4508 */ "Nakayo Telecommunications, Inc.", /* 4509 */ "Dracom", /* 4510 */ "Concord-Eracom Computer Security GmbH", /* 4511 */ "Sofreavia", /* 4512 */ "Terawave Communications, Inc.", /* 4513 */ "Bank America", /* 4514 */ "PacketLight Networks Ltd.", /* 4515 */ "SIAS", /* 4516 */ "Helius, Inc.", /* 4517 */ "KMZ Consulting Group, Inc.", /* 4518 */ "VERO Electronics Ltd.", /* 4519 */ "Joohong Information and Communications", /* 4520 */ "Global ADSI Soltuions, Inc.", /* 4521 */ "Ontario Power Generation", /* 4522 */ "eXaLink Ltd.", /* 4523 */ "StorageSoft, Inc.", /* 4524 */ "Micron Technology, Inc.", /* 4525 */ "Netgear", /* 4526 */ "zeitgeist y2k01 Ltd.", /* 4527 */ "8x8 Incorporated", /* 4528 */ "Internet Service Dept, WorldTelecom Plc", /* 4529 */ "Tunbridge Wells Equitable Friendly Society Ltd", /* 4530 */ "ON Technology Corporation Robert Smokey Montgomery", /* 4531 */ "GVCTW Corporation", /* 4532 */ "Atcomm Corporation", /* 4533 */ "onebox.com", /* 4534 */ "Javelinx Corporation", /* 4535 */ "Digitech", /* 4536 */ "Planex Communications Inc.", /* 4537 */ "Easybuy", /* 4538 */ "RemarQ Communities, Inc.", /* 4539 */ "Intelect Network Technologies Inc.", /* 4540 */ "OutReach Technologies, Inc.", /* 4541 */ "Alerting Specifications Forum", /* 4542 */ "Digitellum, Inc.", /* 4543 */ "Gjensidige Forsikring", /* 4544 */ "Atlantis Software Inc", /* 4545 */ "AST Engineering Services, Inc.", /* 4546 */ "ATTO Technology, Inc.", /* 4547 */ "QuickStart Consulting Inc.", /* 4548 */ "WebGear, Inc.", /* 4549 */ "The Japan Electrical Manufacturers' Association", /* 4550 */ "Empirix, Inc", /* 4551 */ "Wayport, Inc.", /* 4552 */ "NextCom K.K.", /* 4553 */ "Trisol Technologies", /* 4554 */ "Socomec Sicon Ups", /* 4555 */ "Scali", /* 4556 */ "Qwest", /* 4557 */ "Euromove s.r.o.", /* 4558 */ "NVision", /* 4559 */ "Shebang Networking", /* 4560 */ "OpenDOF Project, Inc.", /* 4561 */ "Centermark Engineering LC", /* 4562 */ "Syllogi, Inc.", /* 4563 */ "Diverse Networks, Inc.", /* 4564 */ NULL, /* 4565 */ "Cedelbank", /* 4566 */ "Cedel Global Services", /* 4567 */ "Cedel International", /* 4568 */ "Ensigma Ltd", /* 4569 */ "NetEnterprise, Inc.", /* 4570 */ "JMCS, Inc.", /* 4571 */ "Daedalus Corporation", /* 4572 */ "SecureSoft Inc.", /* 4573 */ "Compu-Alvarado", /* 4574 */ "MANi Network Co., Ltd.", /* 4575 */ "Corporacion ZIGOR S.A.", /* 4576 */ "Internet Research", /* 4577 */ "SSE Telecom", /* 4578 */ "Vest Internett", /* 4579 */ "Diversified Business Group", /* 4580 */ "Seeburger GmbH", /* 4581 */ "World Telecom plc", /* 4582 */ "NetStar", /* 4583 */ "Headhunters London Limited", /* 4584 */ "Eel Valley Internet", /* 4585 */ "Enterprise Consulting Group", /* 4586 */ "Diamond Multimedia Systems, Inc.", /* 4587 */ "Critical Path, Inc.", /* 4588 */ "DATAP Division of TCEnet Inc.", /* 4589 */ "Zoom Telephonics, Inc.", /* 4590 */ "SpaceCom Systems, Inc.", /* 4591 */ "Frontier Communications", /* 4592 */ "SAET I.S. S.p.A.", /* 4593 */ "Saritel S.p.A.", /* 4594 */ "IS Production", /* 4595 */ "Videoframe Systems", /* 4596 */ "Fiberview Technologies Inc.", /* 4597 */ "JCampus", /* 4598 */ "MIMSOFT", /* 4599 */ NULL, /* 4600 */ "Cybertime Informatik GmbH", /* 4601 */ "BEA Systems", /* 4602 */ "TERS Ltd.", /* 4603 */ "Beca Carter Hollings & Ferner Ltd Mike Beamish", /* 4604 */ "Toronto School of Business", /* 4605 */ "Information Security Agency Ltd.", /* 4606 */ "Software Shelf Technologies", /* 4607 */ "Harco Technology Ltd", /* 4608 */ "Seamless Technologies, Inc.", /* 4609 */ "Strategic Technologies", /* 4610 */ "Digital Wireless Corporation", /* 4611 */ "Baker Street Technologies Inc.", /* 4612 */ "Sphere Communications Inc", /* 4613 */ "Luminous Networks, Inc", /* 4614 */ "I-O Data Device, Inc.", /* 4615 */ "ComputerJobs.com", /* 4616 */ "MARCOMPUTER", /* 4617 */ "ARMILLAIRE TECHNOLOGIES", /* 4618 */ "e!reminder.com", /* 4619 */ "Progressive Systems, Inc.", /* 4620 */ "NSTOP Technologies Inc.", /* 4621 */ "Legian Consultancy & Network Services", /* 4622 */ "Lifix Systems Oy", /* 4623 */ "Training for Tomorrow", /* 4624 */ "Mazone Systems", /* 4625 */ "WestLB", /* 4626 */ "SAET IS s.r.l.", /* 4627 */ "Xtra On-Line", /* 4628 */ "Veraz Networks Inc.", /* 4629 */ "FileTek, Inc.", /* 4630 */ "homeloandotcom", /* 4631 */ "FreeMarkets", /* 4632 */ "CQOS, Inc.", /* 4633 */ "VCON Telecommunications Ltd.", /* 4634 */ "The VE Group", /* 4635 */ "Intrust Software", /* 4636 */ "RGE, Inc.", /* 4637 */ "SGI Soluciones Globales Internet", /* 4638 */ "TETRAGONE S.A.", /* 4639 */ "Eckerd College", /* 4640 */ "Tellabs Inc (ADP)", /* 4641 */ "Bel. Studio H. Sager", /* 4642 */ "nworks", /* 4643 */ "Wincom Technology Inc.", /* 4644 */ "Data Ductus AB", /* 4645 */ "NetConvergence, Inc.", /* 4646 */ "Internet Chess Club", /* 4647 */ "The Grateful Net", /* 4648 */ "CPlane, Inc.", /* 4649 */ "Marc August International", /* 4650 */ "Aztec Radiomedia", /* 4651 */ "Technical University of Ilmenau", /* 4652 */ "Precise Software Technologies Inc.", /* 4653 */ "OCLC Online Computer Library Center, Inc.", /* 4654 */ "TeleCheck International Inc.", /* 4655 */ "Banco de Galicia y Buenos Aires", /* 4656 */ "Goodall Secure Services", /* 4657 */ "Entertainment International, Inc.", /* 4658 */ "Teco Image Systems Co., Ltd.", /* 4659 */ "RCMS Ltd", /* 4660 */ "Spazio R&D", /* 4661 */ "Frank Matthiess", /* 4662 */ "decor metall GmbH + CO. KG", /* 4663 */ "Ark Research Corporation", /* 4664 */ "Performance Design Limited", /* 4665 */ "Itchigo Communications GmbH", /* 4666 */ "Telperion Network Systems", /* 4667 */ "Turning Point Technologies", /* 4668 */ "Muro Enterprises, Inc.", /* 4669 */ "National Computational Science Alliance", /* 4670 */ "Advanced Telecom Systems, Inc.", /* 4671 */ "US Healthcare PKI", /* 4672 */ "Wave Research N.V.", /* 4673 */ "Crunch Technologies BV", /* 4674 */ "WK Audiosystems BV", /* 4675 */ "Healthaxis.com Inc.", /* 4676 */ "Concert Technologies", /* 4677 */ "Information Developers Unlimited", /* 4678 */ "OPICOM", /* 4679 */ "Telecommunications Systems Group - UCL", /* 4680 */ "dvg Hannover Datenverarbeitungsgesellschaft mbH", /* 4681 */ "Linux-HA Project", /* 4682 */ "Trading Technologies International, Inc.", /* 4683 */ "Ambit Microsystems Corporation", /* 4684 */ "TONTRU Information Industry Group Co. Ltd.", /* 4685 */ "VegaStream", /* 4686 */ "Digitro Tecnologia Ltda", /* 4687 */ "Luimes Computer Consulting", /* 4688 */ "Urbis.Net Ltd", /* 4689 */ "MBC Europe, B.V.", /* 4690 */ "VAW Aluminum Technologie GmbH", /* 4691 */ "Digital Technics, LP", /* 4692 */ "Maxtor Corp.,", /* 4693 */ "Willamette University", /* 4694 */ "Extricity Software", /* 4695 */ "WEBB Studios", /* 4696 */ "ATLANTEL", /* 4697 */ "Connectivity Software Systems", /* 4698 */ "Burning Door", /* 4699 */ "InternetPirate.com", /* 4700 */ "Syskoplan GmbH", /* 4701 */ "SpeechWorks International, Inc.", /* 4702 */ "Sanford C. Bernstein & Co. Inc.", /* 4703 */ "Visual Media Technologies, Inc.", /* 4704 */ "Gabriel Communications", /* 4705 */ "Zero7.com", /* 4706 */ "Aldea Internet, S.A. de C.V. Javier", /* 4707 */ "iMedium Inc", /* 4708 */ "Oxydian S.A.", /* 4709 */ "Safelayer S.A.", /* 4710 */ "Mail.com", /* 4711 */ "Entropic Ltd", /* 4712 */ "WhereNet, Inc.", /* 4713 */ "Centerpoint Broadband Technologies", /* 4714 */ "Advice Netbusiness Ltda", /* 4715 */ "Arbortext", /* 4716 */ "Media Management Consulting", /* 4717 */ "MDL Information Systems", /* 4718 */ "Montagnaleader s.c.a.r.l.", /* 4719 */ "Lunatech Research", /* 4720 */ "Cositel Inc.", /* 4721 */ "Jacksonville University", /* 4722 */ "Mockingbird Networks", /* 4723 */ "TechnoSoft", /* 4724 */ "Bestnet Internet Inc", /* 4725 */ "Capital Computer Services, Inc.", /* 4726 */ "Langtang JV Company", /* 4727 */ "NSI Technology", /* 4728 */ "Crannog Software", /* 4729 */ "epita", /* 4730 */ "Socketware, Inc.", /* 4731 */ "CVF", /* 4732 */ "Middlesex University", /* 4733 */ "Zarak Systems Corporation", /* 4734 */ "SOMA Networks, Inc.", /* 4735 */ "Appliant, Inc.", /* 4736 */ "Crosswalk.com, Inc.", /* 4737 */ "Shanghai E-way Computer Network Technology Ltd.", /* 4738 */ "OLDE Discount Corporation", /* 4739 */ "VoteHere", /* 4740 */ "Amber Networks, Inc", /* 4741 */ "Operational Technologies Services, Inc.", /* 4742 */ "NextNet", /* 4743 */ "Internalnetwork", /* 4744 */ "DigiSAFE Pte Ltd", /* 4745 */ "PT Inovacao", /* 4746 */ "Service Technique de la Navigation Aerienne", /* 4747 */ "DoBiT nv", /* 4748 */ "e-Plaza", /* 4749 */ "Lykon Consulting", /* 4750 */ "SARL K1", /* 4751 */ "Crescent Networks", /* 4752 */ "MontaVista Software, Inc.", /* 4753 */ "Symas Corp.", /* 4754 */ "Directory Works", /* 4755 */ "CTC Union Technologies Co., Ltd.", /* 4756 */ "IBS", /* 4757 */ "AnIX Group Ltd", /* 4758 */ "Peco II, Inc.", /* 4759 */ "Viditec, Inc.", /* 4760 */ "NuDesign Technologies Inc.", /* 4761 */ "GRIC Communication Inc", /* 4762 */ "Teddybear Computer Services", /* 4763 */ "Global Crossing", /* 4764 */ "Tomorrow Factory", /* 4765 */ "Hochschule Heilbronn", /* 4766 */ "TrafficMaster PLC", /* 4767 */ "E.ON SE", /* 4768 */ "IBM Corporation", /* 4769 */ "Ol'e Communications, Inc.", /* 4770 */ "Narus Inc", /* 4771 */ "CyberSource Corporation", /* 4772 */ "RealNames Corporation", /* 4773 */ "Netpliance.net", /* 4774 */ "Network ICE", /* 4775 */ "Knight Fisk Ltd", /* 4776 */ "Cuperus Consultants", /* 4777 */ "Biscom, Inc.", /* 4778 */ "Bay Technical Associates", /* 4779 */ "VADEM", /* 4780 */ "E.piphany, Inc.", /* 4781 */ "3Cube, Inc.", /* 4782 */ "CrosStor Software", /* 4783 */ "March Networks", /* 4784 */ "Appian Communications, Inc.", /* 4785 */ "Sierra PartnersStephen Ells", /* 4786 */ "Shanghai Holdfast Online Information", /* 4787 */ "D-Trust GmbH", /* 4788 */ "Telica, Inc.", /* 4789 */ "SecureLogix Corporation", /* 4790 */ "Dresdner Bank AG", /* 4791 */ "Wavefront", /* 4792 */ "Levi, Ray & Shoup, Inc.", /* 4793 */ "eCoin, Inc.", /* 4794 */ "Unified Productions, Inc.", /* 4795 */ "Joe Chapa", /* 4796 */ "City Group Inc.", /* 4797 */ "Vigil Technologies Ltd.", /* 4798 */ "Leaselogix, Inc.", /* 4799 */ "Jensley Pty Ltd", /* 4800 */ "Compass Corporate Systems, Inc.", /* 4801 */ "Systematic Software Engineering A/S", /* 4802 */ "POWWOW", /* 4803 */ "Castello Cities Internet Network", /* 4804 */ "INOVA Corporation", /* 4805 */ "Rosslea Associates LLC", /* 4806 */ "Control Z Corporation", /* 4807 */ "Net-star Technology Corporation", /* 4808 */ "BSW Telecoms", /* 4809 */ "Bloemenveiling Holland", /* 4810 */ "Network Flight Recorder, Inc.", /* 4811 */ "shanghai radio communication equipment manufacture company(srcem)", /* 4812 */ "GlenEvin", /* 4813 */ "Alex Temex Multimedia S.A.", /* 4814 */ "H.B. Fuller Company", /* 4815 */ "Pacific Gas & Electric Company", /* 4816 */ "Innovative Technologies & Consulting, Inc.", /* 4817 */ "Sinclair Internetworking Services", /* 4818 */ "RMS Technology Integration, Inc.", /* 4819 */ "Quicknet Technologies, Inc.", /* 4820 */ "SN2AI", /* 4821 */ "Fial Computer Inc.", /* 4822 */ "Shanghai HuaLong Information Technology Development Center", /* 4823 */ "DSL Communications", /* 4824 */ "Golden Screens Interactive Technologies, Inc.", /* 4825 */ "The European Clearing House", /* 4826 */ "Interoute Telecommunications Inc", /* 4827 */ "Intelidata Technologies Corp.", /* 4828 */ "A to Z Pest Control", /* 4829 */ "Gloabl Media Corp.", /* 4830 */ "BANCHILE", /* 4831 */ "Network Phenomena, LLC.", /* 4832 */ "SDNI Inc.", /* 4833 */ "Factum Electronics AB", /* 4834 */ "OPNET Technologies Co., Ltd.", /* 4835 */ "LHS Telekom GmbH & Co. KG", /* 4836 */ "trrrippleRRRdesigns", /* 4837 */ "New Image Company", /* 4838 */ "2Wire, Inc.", /* 4839 */ "Bedet Information Technologies", /* 4840 */ "iFace.com", /* 4841 */ "SecureAgent", /* 4842 */ "Amazon.com Inc.", /* 4843 */ "NeoPoint, Inc.", /* 4844 */ "Miralink Corp", /* 4845 */ "Lucent INS", /* 4846 */ "Vikram Kulkarni", /* 4847 */ "Interphiz Ltd", /* 4848 */ "Dipl. Phys. Peer Stritzinger Peer", /* 4849 */ "Eddie George Limited", /* 4850 */ "KRONE Telecell GmbH", /* 4851 */ "CMA Small Systems AB", /* 4852 */ "Syndeo Corporation", /* 4853 */ "Mk1 Design", /* 4854 */ "AddPac Technology Co., Ltd.", /* 4855 */ "Veraluz International Corporation", /* 4856 */ "Cisco's Etc.", /* 4857 */ "Fortech", /* 4858 */ "GEMS", /* 4859 */ "boo.com Group LTD", /* 4860 */ "PowerCom Technologies Inc Katta Veeraiah", /* 4861 */ "Redwood Marketing", /* 4862 */ "Parion", /* 4863 */ "JOH-DATA A/S", /* 4864 */ "ERG Group", /* 4865 */ "Moseley Associate Inc.", /* 4866 */ "Viet Marketing", /* 4867 */ "Nextra (Schweiz) AG", /* 4868 */ "SIT Europe", /* 4869 */ "Fritz Egger GmbH & Co", /* 4870 */ "DiscoveryCom", /* 4871 */ "Bouygues Telecom", /* 4872 */ "Seay Systems, Inc.", /* 4873 */ "Juniper Networks/Unisphere", /* 4874 */ "DoubleClick Inc.", /* 4875 */ "Eyestreet Software", /* 4876 */ "Salon Press", /* 4877 */ "Village Networks, Inc.", /* 4878 */ "SecureMethods, Inc.", /* 4879 */ "Standard & Poors Compustat", /* 4880 */ "Ruijie Networks Co., Ltd.", /* 4881 */ "Root, Inc.", /* 4882 */ "Saatch & Saatchi", /* 4883 */ "Protek Ltd", /* 4884 */ "Photon Technology Co., Ltd.", /* 4885 */ "Westwave Communications", /* 4886 */ "IQ Wireless GmbH", /* 4887 */ "Multidata GmbH", /* 4888 */ "Inflow", /* 4889 */ "Skinners Computer Center", /* 4890 */ "Network Address Solutions", /* 4891 */ "The Chinese University of Hong Kong", /* 4892 */ "ATSHAW Technologies", /* 4893 */ "Kleinwort Benson Ltd.", /* 4894 */ "Woodwind Communications Systems Inc.", /* 4895 */ "TeleSoft International, Inc.", /* 4896 */ "DoBusinessOnline Services", /* 4897 */ "Time Inc.", /* 4898 */ "Walker Systems Corporation", /* 4899 */ "Conexant Systems", /* 4900 */ "USAA", /* 4901 */ "Beijing Huaguang Electronics Co., Ltd.", /* 4902 */ "GCC Technologies Inc.", /* 4903 */ "SDF", /* 4904 */ "WebDialogs, Inc", /* 4905 */ "Edgix Corporation", /* 4906 */ "AppWorx Corporation", /* 4907 */ "ATS, Advanced Technology Solutions S.A.", /* 4908 */ "Experts Exchange", /* 4909 */ "Ubizen", /* 4910 */ "pcOrder.com, Inc.", /* 4911 */ "One World Information System", /* 4912 */ NULL, /* 4913 */ "hole-in-the.net", /* 4914 */ "Sipher Internet Technology Ltd.+44 1494 765335", /* 4915 */ "Blacksound SA", /* 4916 */ "Sociedad Estatal de Loterias y Apuestas de Estado", /* 4917 */ "Taurusent Technologies", /* 4918 */ "Luminate Software Corporation", /* 4919 */ "Boston Globe", /* 4920 */ "Network Solutions", /* 4921 */ "Telcordia Technologies, Inc.", /* 4922 */ "AudioCodes", /* 4923 */ "SAN Valley Systems, Inc.", /* 4924 */ "Zuma Networks", /* 4925 */ "TouchTunes Digital Jukebox", /* 4926 */ "time4you GmbH", /* 4927 */ "Xrosstech, Inc.", /* 4928 */ "LAN Crypto", /* 4929 */ "Concord Technologies", /* 4930 */ "Standard & Poor's Corp.", /* 4931 */ "Foglight Software", /* 4932 */ "Shunra Software Ltd.", /* 4933 */ "WebDialogs, Inc", /* 4934 */ "Mediatrix Telecom Inc.", /* 4935 */ "First American Financial Corporation John", /* 4936 */ "Stormbreaker Network Services", /* 4937 */ "Daeyoung Electronic Ind.CO., Ltd.", /* 4938 */ "Procter & Gamble", /* 4939 */ "Convergent Communications Services, Inc.", /* 4940 */ "Echelon Corporation", /* 4941 */ "Liberty Press & Letter Service Joseph De Silvis", /* 4942 */ "Novell GmbH", /* 4943 */ "Future Networks, Inc.", /* 4944 */ "Logicon, Inc.", /* 4945 */ "Psychedelic Illuminations Magazine", /* 4946 */ "Grass Valley USA, LLC", /* 4947 */ "MIGROS", /* 4948 */ "Fortress Technologies", /* 4949 */ "Luxor Software Inc.", /* 4950 */ "State Farm Insurance", /* 4951 */ "Thinking Objects GmbH", /* 4952 */ "Tecnet Teleinformatica Ltda.", /* 4953 */ "Wrox Press Itd", /* 4954 */ "Asgard Technologies, Inc", /* 4955 */ "GRAPHICS FIVE", /* 4956 */ "CNet Computer Systeme Netzwerk GmbH", /* 4957 */ "TerraLink Technologies, LLC", /* 4958 */ "U Force, Inc.", /* 4959 */ "Chromisys", /* 4960 */ "Ardent Technologies", /* 4961 */ "Artel Video Systems, Inc.", /* 4962 */ "@manage", /* 4963 */ "W.B. Love Enterprises Inc.", /* 4964 */ "Greenwich Mean Time", /* 4965 */ "AACom", /* 4966 */ "Starwood Hotels & Resorts", /* 4967 */ "Universtiy of North Texas (unofficial)", /* 4968 */ "Park Air Systems Ltd.", /* 4969 */ "National Grid for Learning", /* 4970 */ "Anglers Club", /* 4971 */ "Los Alamos National LaboratoryGiri", /* 4972 */ "SetNet Corporation", /* 4973 */ "eATM", /* 4974 */ "INTERVU Inc.", /* 4975 */ "AGENT++", /* 4976 */ "Tiesse S.p.A", /* 4977 */ "Direkcija RS za poslovno informacijsko sredisce", /* 4978 */ "Licer Solutions", /* 4979 */ "Oxymium", /* 4980 */ "RiverDelta Networks", /* 4981 */ "Persistence Software Inc.", /* 4982 */ "InnoMediaLogic Inc.", /* 4983 */ "Pinnacle Systems", /* 4984 */ "Vigilant Networks", /* 4985 */ "KB/Tel", /* 4986 */ "Simpler Networks Inc.", /* 4987 */ "Ronningen Consulting", /* 4988 */ "Connect Austria GmbH", /* 4989 */ "TTI Telecom", /* 4990 */ "Stonebridge Technologies, Inc.S.E.", /* 4991 */ "Thyssen Krupp Information Systems GmbHHaynes", /* 4992 */ "CTU Prague", /* 4993 */ "CUT-THROAT TRAVEL OUTLET", /* 4994 */ "Universtiy of California, Berkeley", /* 4995 */ "Forest Networks LLC", /* 4996 */ "Inetd.Com Consulting", /* 4997 */ "Cadant Inc.", /* 4998 */ NULL, /* 4999 */ "Personal Business", /* 5000 */ "LogicMedia", /* 5001 */ "RC Networks", /* 5002 */ "AudioCodes LTD", /* 5003 */ "Predictive Networks", /* 5004 */ "NCvision", /* 5005 */ "Vishwnet India", /* 5006 */ "Effective Computer Solutions, Inc.", /* 5007 */ "drugstore.com", /* 5008 */ "Schiano", /* 5009 */ "Splash Technology, Inc.", /* 5010 */ "Scaldis", /* 5011 */ "Lottomatica spa", /* 5012 */ "Maverick Internet Technology", /* 5013 */ "Viacast", /* 5014 */ "Verbind, Inc.", /* 5015 */ "Oregon State University", /* 5016 */ "University of Akron", /* 5017 */ "Ameritrade Technology Group", /* 5018 */ "eBusiness Interactive", /* 5019 */ "sekwang eng. co.", /* 5020 */ "Television Internacional S.A. de C.V.", /* 5021 */ "Equipe Communications Corporation", /* 5022 */ "Bit by Bit Solutions, Inc.", /* 5023 */ "3Domes, Inc.", /* 5024 */ "OPUS 2 Revenue Technologies", /* 5025 */ "Aspiro AB", /* 5026 */ "Orebro Kommun", /* 5027 */ "Lightbridge", /* 5028 */ "Comma Soft AG", /* 5029 */ "University of Ulm", /* 5030 */ "Recovery", /* 5031 */ "Norscan Instruments Ltd", /* 5032 */ "eCharge Corporation", /* 5033 */ "LogicalSolutions.net", /* 5034 */ "Inter-National Research Institute", /* 5035 */ "Input Software", /* 5036 */ "Bri-link Technologies Inc.", /* 5037 */ "T&S Software Associates Inc.", /* 5038 */ "Xstreamis plc", /* 5039 */ "Wiesemann & Theis GmbH", /* 5040 */ "Menicx International Co. Ltd.", /* 5041 */ "Broadwing Inc.", /* 5042 */ "Micro Focus International Ltd", /* 5043 */ "Velocity Software Systems Ltd.", /* 5044 */ "Bithop Systems, Inc.", /* 5045 */ "CS SI", /* 5046 */ "Kimley-Horn and Associates", /* 5047 */ "Kudale Inc.", /* 5048 */ "Equifax Inc.", /* 5049 */ "Nordmark NorLan Consult", /* 5050 */ "Brix Networks", /* 5051 */ "Intermine Pty Ltd", /* 5052 */ "Agilent Technologies", /* 5053 */ "will", /* 5054 */ "Eolring", /* 5055 */ "Frank Lima", /* 5056 */ "Gifford Hesketh", /* 5057 */ "Avistar Systems", /* 5058 */ "Carmona Engineering Services", /* 5059 */ "Singapore Press Holdings Ltd", /* 5060 */ "Swisskey Ltd", /* 5061 */ "DFN Directory Services", /* 5062 */ "Telesta", /* 5063 */ "Deutsche Post AG", /* 5064 */ "PrivateExpress.com", /* 5065 */ "NetVision, Inc.", /* 5066 */ "Open Society Fund - BH", /* 5067 */ "Jewsih Community of Bosnia and Herzegovina", /* 5068 */ "Call Connect", /* 5069 */ "Ganna Construction, Inc.", /* 5070 */ "HIQ Networks", /* 5071 */ "Ditech Communications Corporation", /* 5072 */ "knOwhere, Inc.", /* 5073 */ "Miva Corporation", /* 5074 */ "CNL CentralNet GmbH", /* 5075 */ "LongView International, Inc.", /* 5076 */ "Clicknet Software", /* 5077 */ "Media Vision Computer Technologies", /* 5078 */ "Crosskeys Systems Corporation", /* 5079 */ "Power Systems", /* 5080 */ "Empowerment Group, Inc", /* 5081 */ "More Magic Software MMS Oy", /* 5082 */ "Daktronics", /* 5083 */ "SierraCom", /* 5084 */ "SmartMove", /* 5085 */ "ICS Advent", /* 5086 */ "Great Dragon Telecom(Group)", /* 5087 */ "Digital Burro, INC", /* 5088 */ "Clavister AB", /* 5089 */ "Carumba", /* 5090 */ "Norske Troll AS", /* 5091 */ "INFORMATIONSTECHNOLOGIE AUSTRIA GES. M.B.H.", /* 5092 */ "SDF Enterprise", /* 5093 */ "The University of Tulsa", /* 5094 */ "Credit Suisse Group", /* 5095 */ "Computer Science and Engineering, CUHK", /* 5096 */ "Rock Marketing", /* 5097 */ "OPUSWAVE Networks, Inc.", /* 5098 */ NULL, /* 5099 */ "Tricast Multimedia", /* 5100 */ "Novalabs", /* 5101 */ "Integro A.C.S.", /* 5102 */ "Foxcom Ltd.", /* 5103 */ "SarangNet", /* 5104 */ "Datang Telecom Technology CO., LTD", /* 5105 */ "elephant project", /* 5106 */ "Pinkl Consulting Services", /* 5107 */ "Modius Inc.", /* 5108 */ "CHINA GREAT DRAGON TELECOMMUNICATION(GROUP) CO., LTD", /* 5109 */ "Health Business Systems, Inc.", /* 5110 */ "Medea Corporation", /* 5111 */ "Corvia Networks, Inc.", /* 5112 */ "gridware", /* 5113 */ "Future fibre Technologies", /* 5114 */ "PowerCom Technology Co., Ltd.", /* 5115 */ "IBM, NUMA-Q Division", /* 5116 */ "Kaelin Colclasure", /* 5117 */ "Dantel,Inc.", /* 5118 */ "SYCOR AG", /* 5119 */ "EMF Home Inspection Inc.", /* 5120 */ "League Scoring", /* 5121 */ "Everest eCommerce, Inc.", /* 5122 */ "Lucent Tech. Taiwan Telco.", /* 5123 */ "Phonetic Systems Ltd.", /* 5124 */ "Celestica Power", /* 5125 */ "Symtrex Inc.", /* 5126 */ "Western Digital Corporation", /* 5127 */ "Saitama University Far Laboratory", /* 5128 */ "Macquarie University", /* 5129 */ "Omron Canada Inc.", /* 5130 */ "lotz.de", /* 5131 */ "Mammut Net", /* 5132 */ "Halfdome Systems, Inc.", /* 5133 */ "IP Unity", /* 5134 */ "CyberSafe Corporation", /* 5135 */ "Gruner + Jahr AG & Co KG", /* 5136 */ "DFC, Inc.", /* 5137 */ "Easynet Group Plc", /* 5138 */ "ARESCOM, Inc.", /* 5139 */ "Compudisk Systems Ltd.", /* 5140 */ "Hart Edwards Corporation, Inc.", /* 5141 */ "IVANS", /* 5142 */ "Cereva Networks Inc.", /* 5143 */ NULL, /* 5144 */ "ICT electronics SA", /* 5145 */ "Eclipsys Corporation", /* 5146 */ "MICEX", /* 5147 */ "cTc Computer Technik Czakay GmbH", /* 5148 */ "Managed Object Solutions, Inc.", /* 5149 */ "Opsware", /* 5150 */ "NetGain, LLC", /* 5151 */ "Cable AML, Inc.", /* 5152 */ "The University of Akron", /* 5153 */ "Incyte Genomics", /* 5154 */ "CS & S GH computer System Tech. Co., Ltd.", /* 5155 */ "newproductshowroom.com", /* 5156 */ "The University of Queensland", /* 5157 */ "CompuTECH Services", /* 5158 */ "Ultra d.o.o.", /* 5159 */ "DAIN Telecom Co., Ltd", /* 5160 */ "Morehead State University", /* 5161 */ "Societe Europeenne des Satellites", /* 5162 */ "Digital Marketplace, Inc.", /* 5163 */ "Cygnet Technologies, Inc.", /* 5164 */ "Sassafras Software Inc.", /* 5165 */ "Mercom Systems, Inc.", /* 5166 */ "Orchestream Ltd.", /* 5167 */ "Levitte Programming", /* 5168 */ "NET CONSULTING S.R.L.", /* 5169 */ "Aegis Data Systems, Inc.", /* 5170 */ "WhizBang! Labs", /* 5171 */ "Protocom Development Systems", /* 5172 */ "Taqua Systems Inc.", /* 5173 */ "PrivateExpress .com", /* 5174 */ "Lindsay Electronics", /* 5175 */ "2Win Information Systems, Inc.", /* 5176 */ "Private Express Technologies Pte, Ltd.", /* 5177 */ "Telephony Experts, Inc.", /* 5178 */ "Arima Computer Corp.", /* 5179 */ "The DocSpace Company Inc.", /* 5180 */ "Firat Universites", /* 5181 */ "I Theta Corp.", /* 5182 */ NULL, /* 5183 */ "C&N Touristic AG", /* 5184 */ "Sungmi Telecom Electronics Co., Ltd.", /* 5185 */ NULL, /* 5186 */ "Bytware, Inc.", /* 5187 */ "BITHOP SYSTEMS, Inc.", /* 5188 */ "TELEFONICA I+D", /* 5189 */ "Organic", /* 5190 */ "DEKRA AG", /* 5191 */ "Gotham Networks", /* 5192 */ "Chemical Abstracts Service", /* 5193 */ "Okanagan Spring Brewery", /* 5194 */ "AdRem Software", /* 5195 */ "E-Tech, Inc.", /* 5196 */ "Startup .com", /* 5197 */ "\"Universita`\" degli Studi di Roma \"Tor Vergata\"", /* 5198 */ "Odetics ITS", /* 5199 */ "EnFlex Corp.", /* 5200 */ NULL, /* 5201 */ "Aalto University", /* 5202 */ "The Naqvi Group", /* 5203 */ "ClickNet Software Corporation", /* 5204 */ "Ruby Tech Corp.", /* 5205 */ "Voltaire", /* 5206 */ "USA-NET CORPORATIONS", /* 5207 */ "UPMACS Communications Inc.", /* 5208 */ "Profound Rational Organization(PRO), Internatioal", /* 5209 */ "Linkline/Freegates", /* 5210 */ "NCvision Ltd.", /* 5211 */ "Placeware, Inc.", /* 5212 */ "Greylink, Inc.", /* 5213 */ "Athens Chamber", /* 5214 */ "United Connections", /* 5215 */ "Senior Informatica Ltda.", /* 5216 */ "SOFHA GmbH", /* 5217 */ "Networks Experts, Inc.", /* 5218 */ "BeVocal Inc.", /* 5219 */ "World Telecom Labs", /* 5220 */ "Wireless Systems International", /* 5221 */ "Dantel Inc.", /* 5222 */ "Korea Electronics Technology Institute", /* 5223 */ "Hitachi Data Systems (Europe) Ltd.", /* 5224 */ "Universidad de Cantabria- ATC", /* 5225 */ "Harmonix Limited", /* 5226 */ "MELCO Inc.", /* 5227 */ "Littlefeet Inc.", /* 5228 */ "Big Fish Communications", /* 5229 */ "ComRoesGroup", /* 5230 */ "Oswego State University", /* 5231 */ "Counterpane Internet Security", /* 5232 */ "Mercury Interactive Corp.", /* 5233 */ "Shenzhen SED Info. Tech. Corp.", /* 5234 */ "Persistent Systems Private Limited", /* 5235 */ "Great Dragon Telecom(Group)", /* 5236 */ "Trustis Limited", /* 5237 */ "SOcieta GEnerale di Informatica (SOGEI SPA)", /* 5238 */ "FESTE", /* 5239 */ "RAND", /* 5240 */ "TECHMATH AG", /* 5241 */ "Envilogg AB", /* 5242 */ "ICIS, School of EEE,Nayang Technological University", /* 5243 */ "Casey's Baja Tours", /* 5244 */ "Quarterstone Communications Inc.(QCI)", /* 5245 */ "SS8 Networks Inc.", /* 5246 */ "Zinnia Design", /* 5247 */ "Michael Brehm", /* 5248 */ "Warner-Lambert", /* 5249 */ "Center7", /* 5250 */ "Donald E. Bynum", /* 5251 */ "CIS Technology", /* 5252 */ "Aldebaran", /* 5253 */ "Datang Telecom Technology CO., LTD", /* 5254 */ "EuroPKI", /* 5255 */ "Freeonline .com. au Pty Ltd", /* 5256 */ "AXUS Microsystems Inc.", /* 5257 */ "Zeta Technologies Co. Ltd", /* 5258 */ "MATRA SYSTEMES & INFORMATION", /* 5259 */ "Digital Engineering", /* 5260 */ "LUTHER DANIEL", /* 5261 */ "QWIKWIRE. NET", /* 5262 */ "CAIS INTERNET", /* 5263 */ "Varian Medical Systems", /* 5264 */ "TeleDanmark Erhverv, CTIUdvikling", /* 5265 */ "Johannes Gutenberg-Universitaet Mainz", /* 5266 */ "Hong Kong University of Science and Technology", /* 5267 */ "IKEA IT CENTER AB", /* 5268 */ "The Fantastic Corporation", /* 5269 */ "da6d Technologies", /* 5270 */ "Comverse Network Systems", /* 5271 */ "w-Trade Technologies", /* 5272 */ "Unistra Technologies", /* 5273 */ "UNIF/X", /* 5274 */ "Malibu Networks", /* 5275 */ "Hearme.com", /* 5276 */ "SarangNET", /* 5277 */ "Swisscom. AG", /* 5278 */ "2Support Directory Solutions", /* 5279 */ "Citi", /* 5280 */ "Graeffet Communications", /* 5281 */ "Connected Systems", /* 5282 */ "CheckFree Corporation", /* 5283 */ "Filanet Corporation", /* 5284 */ "Network Experts, Inc.", /* 5285 */ "CALENCE, Inc.", /* 5286 */ "Persistent Systems Private Limited", /* 5287 */ "A-Plus Networks, Inc.", /* 5288 */ "VidyaWeb. com, Inc.", /* 5289 */ "Guide", /* 5290 */ "Bloemenveiling Aalsmeer", /* 5291 */ "Pirus Networks", /* 5292 */ "HYOSUNG CORPORATION", /* 5293 */ "Infinity Trade Inc", /* 5294 */ "\"DigitalThink Inc.\"", /* 5295 */ "IPCell Technologies, Inc.", /* 5296 */ "Baxworks, Inc.", /* 5297 */ "xputer.com", /* 5298 */ "AUDEMAT", /* 5299 */ "Jetstream Communications", /* 5300 */ "PentaSafe, Inc.", /* 5301 */ "Advanced Health Technologies", /* 5302 */ "IPmobile Inc.", /* 5303 */ "Airslide Systems Inc.", /* 5304 */ "IIT KANPUR", /* 5305 */ "XESystems, Inc.", /* 5306 */ "Ciprico, Inc.", /* 5307 */ "SiemensS.A.(Portugal)", /* 5308 */ "EdelWeb SA", /* 5309 */ "Depository Trust & Clearing Corporation", /* 5310 */ "F&F Inc.", /* 5311 */ "DIGICERT SDN", /* 5312 */ "Revlis, Inc.", /* 5313 */ "Baunwall A/S", /* 5314 */ "CCIT(Beijing Creative Century Information Technology)Co. Ltd.", /* 5315 */ "Guide Unusual", /* 5316 */ "Adaptive Computer Development Corp.", /* 5317 */ "Robert Bosch GmbH", /* 5318 */ "EarthWatch Inc.", /* 5319 */ "Surety Technologies Inc.", /* 5320 */ "Burrito.org", /* 5321 */ "PADL Software Pty Ltd", /* 5322 */ "Telrad", /* 5323 */ "Delta Networks Inc.", /* 5324 */ "Cmgi", /* 5325 */ "LightChip, Inc.", /* 5326 */ "KIM Computing", /* 5327 */ "North Communications Inc.", /* 5328 */ "Shoreline Teleworks", /* 5329 */ "Spacelink Systems", /* 5330 */ "OI ELECTRIC CO., Ltd.", /* 5331 */ "Information Freeway", /* 5332 */ "Celera Genomics", /* 5333 */ "START", /* 5334 */ "Multifunction Products Association", /* 5335 */ "BlueKite.com", /* 5336 */ "Ciprico, Inc.", /* 5337 */ "ELDEC Corporation", /* 5338 */ "VisioWave", /* 5339 */ "CITI, S.A. de C.V.", /* 5340 */ "PC Network Design", /* 5341 */ "Sensormatic", /* 5342 */ "Lone Wolf ComputingGeorge", /* 5343 */ "Originative Solutions Ltd.", /* 5344 */ "SUNGMI TELECOM ELECTRONICS CO., Ltd.", /* 5345 */ "SSM Health Care", /* 5346 */ "GE Harris Aviation Information Solutions, LLC", /* 5347 */ "TimeSpace Radio AB", /* 5348 */ "Inalp Networks Inc.", /* 5349 */ "Infotron System Corp", /* 5350 */ "ATM S.A.", /* 5351 */ "Maelstrom", /* 5352 */ "EVS Broadcast Equipment", /* 5353 */ "Simplement Ltd", /* 5354 */ "Eland Technologies", /* 5355 */ "Object Oriented Pty Ltd.", /* 5356 */ "Evans Computer Consulting", /* 5357 */ "enhanced Global Convergence Services (eGCS)", /* 5358 */ "InnoVentry", /* 5359 */ "Haedong", /* 5360 */ "Westbridge Design Ltd.", /* 5361 */ "QASYS CORP", /* 5362 */ "R. Smith Engineering Co.", /* 5363 */ "Certall Finland OY", /* 5364 */ "Neartek, Inc.", /* 5365 */ "Charlotte's Web Networks Ltd.", /* 5366 */ "Telena S.p.A.", /* 5367 */ "CoreExpress", /* 5368 */ "APD Communications Limited", /* 5369 */ "BANCO ZARAGOZANO S.A.", /* 5370 */ "NetSubject Canada, Inc.", /* 5371 */ "myCFO, Inc.", /* 5372 */ "Open Telecommunications Limited", /* 5373 */ "Dirigo Incorporated", /* 5374 */ "BAE SYSTEMS, Tactical Comms (Filton)", /* 5375 */ "Oleane", /* 5376 */ "TriNexus", /* 5377 */ "PrairieFyre Software Inc.", /* 5378 */ "Colonial State Bank", /* 5379 */ "CDOT", /* 5380 */ "SuperNova", /* 5381 */ "IRIS Technologies, Inc.", /* 5382 */ "iFleet Inc.", /* 5383 */ "Tsuruki Promotions", /* 5384 */ "City-NET CZ, s.r.o.", /* 5385 */ "M-S Technology Consultants", /* 5386 */ "HyperFeed", /* 5387 */ "Network Alchemy Ltd.", /* 5388 */ "Inter-Tel", /* 5389 */ "OPNET Technologies Co., Ltd.", /* 5390 */ "Tyco Submarine Systems Ltd.", /* 5391 */ "\"Online Creations\", Inc.", /* 5392 */ "Renault", /* 5393 */ "Gateway Inc.", /* 5394 */ "Laurel Networks, Inc.", /* 5395 */ "BigChalk.com", /* 5396 */ "Standard and Poor's Fund Services", /* 5397 */ "ElephantX", /* 5398 */ "Extremis", /* 5399 */ "Evercom systems International Inc.", /* 5400 */ "Master Soft", /* 5401 */ "IDF", /* 5402 */ "Vircom", /* 5403 */ "eConvergence Pty Ltd.", /* 5404 */ "Start Printer equipment co. Ltd.", /* 5405 */ "Nick Conte, Inc.", /* 5406 */ "NetSupport GmbH", /* 5407 */ "Intellitel Communications", /* 5408 */ "East West Consulting K.K.", /* 5409 */ "Les Howard", /* 5410 */ "SignalSoft Corporation", /* 5411 */ "Zantaz.com, Inc.", /* 5412 */ "PeopleWeb CommunicationsInc.", /* 5413 */ "John & Associate", /* 5414 */ "Fujitsu Asia Pte Ltd", /* 5415 */ "Nesral", /* 5416 */ "ABSA Group Ltd.", /* 5417 */ "Fortis, Inc.", /* 5418 */ "Cambridge Broadband Ltd.", /* 5419 */ "Spider Technologies", /* 5420 */ "Marietta Dodge Inc.", /* 5421 */ "RHC Enterprises Inc.", /* 5422 */ "McLeodUSA", /* 5423 */ "Columbia Diversified Services", /* 5424 */ "NetSpace Online Systems", /* 5425 */ "GadLine Ltd.", /* 5426 */ "stroeder.com", /* 5427 */ "ENDFORCE, Inc.", /* 5428 */ "Propack Data Soft- und Hardware Entwicklungs GmbH", /* 5429 */ "Masterguard GmbH", /* 5430 */ "LM Digital", /* 5431 */ "SightPath", /* 5432 */ "Netonomy", /* 5433 */ "Advanced Hi-Tech Corporation", /* 5434 */ "OvisLink Corp", /* 5435 */ "OPEN", /* 5436 */ "Pensar Corporation", /* 5437 */ "Utrecht School of Arts", /* 5438 */ "Parallel Ltd.", /* 5439 */ "Primeon, Ltd.", /* 5440 */ "The Timken Company", /* 5441 */ "New Zealand Post Limited", /* 5442 */ "Nekema.com", /* 5443 */ "Joe Minineri", /* 5444 */ "Metrostat Technologies, Inc.", /* 5445 */ "Skygate Technology Ltd", /* 5446 */ "Aeolon Research", /* 5447 */ "Kykink Communications Corp", /* 5448 */ "OneNetPlus.com", /* 5449 */ "I-Link Inc.", /* 5450 */ "SEGAINTERSETTLE AG", /* 5451 */ "Business Layers", /* 5452 */ "Intelis, Inc", /* 5453 */ "Trango Systems, Inc.", /* 5454 */ "Artemis Management Systems", /* 5455 */ "FOCUS Online GmbH", /* 5456 */ "CastleNet Technology Inc.", /* 5457 */ "Gupta", /* 5458 */ "SANtools, Inc", /* 5459 */ "BroadLink Communications, Inc.", /* 5460 */ "KSI Inc", /* 5461 */ "Resume.Com", /* 5462 */ "Eduardo Fermin", /* 5463 */ "Manukau Institute of Technology", /* 5464 */ "eBusiness Technologies", /* 5465 */ "International Biometric Society, IBS", /* 5466 */ "TELEFONICA INVESTIGACION Y DESARROLLO", /* 5467 */ "Actelis Networks", /* 5468 */ "Codebase", /* 5469 */ "Transparity Limited", /* 5470 */ "Switzerland", /* 5471 */ "timeproof", /* 5472 */ "AlgaCom", /* 5473 */ "Ericsson Ahead Communications Systems GmbH", /* 5474 */ "Thysys Engineering", /* 5475 */ "Apex Inc.", /* 5476 */ "Netattach, Inc", /* 5477 */ "Critical Path Berlin/LEM", /* 5478 */ "Pinnacle Data Systems Inc (PDSi)", /* 5479 */ "T. Sqware Incorporated", /* 5480 */ "Agencia de Certificion Electronica", /* 5481 */ "Murakami Electro-Communication Laboratories, Inc.", /* 5482 */ "Netensity, Inc.", /* 5483 */ "University of the Aegean", /* 5484 */ "The OPEN Group Ltd", /* 5485 */ "China Merchants Bank", /* 5486 */ "Multitrade Spa", /* 5487 */ "Temblast", /* 5488 */ "ALS International Ltd.", /* 5489 */ "CommNav, Inc.", /* 5490 */ "UPS Manufacturing", /* 5491 */ "Telephia", /* 5492 */ "Palm Computing", /* 5493 */ "Marathon Innovations, Inc.", /* 5494 */ "Convergence Equipment Company", /* 5495 */ "GEMPLUS", /* 5496 */ "Trondent Development Corp.", /* 5497 */ "Kardinia Software", /* 5498 */ "YhKim Co. Ltd.", /* 5499 */ "Gemeentelijk Havenbedrijf Rotterdam", /* 5500 */ "NTT PC Communications, Inc.", /* 5501 */ "Canon Aptex Inc.", /* 5502 */ "Orinda Technology Group", /* 5503 */ "Zhone Technologies, Inc.", /* 5504 */ "Metrostat Technologies, Inc.", /* 5505 */ "Digital-X, Inc.", /* 5506 */ "Tight Informatics", /* 5507 */ "SWOD Org.", /* 5508 */ "B&E Construction Co. Dennis", /* 5509 */ "PrismTech", /* 5510 */ "syscall() Network Solutions GbR", /* 5511 */ "GMD FIRST", /* 5512 */ "iXL", /* 5513 */ "Timeline Technology Inc.", /* 5514 */ "Directory Tools and Application Services, Inc.", /* 5515 */ "SecureWorks, Inc.", /* 5516 */ "Rapid5 Networks", /* 5517 */ "TDS Telecom", /* 5518 */ "LSITEC", /* 5519 */ "Alfred Wegener Institute for Polar and Marine Research", /* 5520 */ "St. John Health System", /* 5521 */ "Cybernet Corporation", /* 5522 */ "GRCP", /* 5523 */ "Emory University", /* 5524 */ "SSF", /* 5525 */ "Adero, Inc.", /* 5526 */ "Context Systems Group", /* 5527 */ "NetBotz", /* 5528 */ "Neoforma.com", /* 5529 */ "Cescom Inc.", /* 5530 */ "Mien Information Solutions", /* 5531 */ "Q-Telecell GmbH", /* 5532 */ "WideAwake Ltd", /* 5533 */ "Vogon AB", /* 5534 */ "3rd Generation Partnership Project 2 (3GPP2)", /* 5535 */ "Quintus Corporation", /* 5536 */ "Comdial Corporation", /* 5537 */ "Micron Tech. Information co. kr", /* 5538 */ "Cybertek Holdings", /* 5539 */ "RWTH Aachen University", /* 5540 */ "Paragea Communications, Inc", /* 5541 */ "eOn Communications Corporation", /* 5542 */ "INIEMP HOLDINGS CORPORATION S.L.", /* 5543 */ "Thomson-CSF Systems Canada", /* 5544 */ "TANTAU Software Inc.", /* 5545 */ "MailVision Inc.", /* 5546 */ "BSQUARE Corporation", /* 5547 */ "Cobalt Networks", /* 5548 */ "TimesTen Performance Software", /* 5549 */ "Monggo, Inc.", /* 5550 */ "Oscilloquartz, S.A.", /* 5551 */ "Air Atlanta Icelandic", /* 5552 */ "Macromedia eBusiness Solutions", /* 5553 */ "SpotCast Communications", /* 5554 */ "Authentic8 pty Ltd", /* 5555 */ "Service Factory", /* 5556 */ "OneMain.com", /* 5557 */ "S-Link Corporation", /* 5558 */ "Vitria Technology, Inc.", /* 5559 */ "The Color Registry", /* 5560 */ "2nd Wave, Inc.", /* 5561 */ "Redknee Inc.", /* 5562 */ "Ola Internet", /* 5563 */ "Omega Enterprise", /* 5564 */ "Syswave Co., Ltd", /* 5565 */ "VisionGlobal Network Corporation", /* 5566 */ "Riverstone Networks", /* 5567 */ "Southview Technologies, Inc.", /* 5568 */ "Soluzioni Tecnologiche Bancarie s.r.l.", /* 5569 */ "Sony Pictures Entertainment", /* 5570 */ "GetThere.Com", /* 5571 */ "HoTek TechnologyCo., Ltd.", /* 5572 */ "Tong", /* 5573 */ "BankEngine Inc.", /* 5574 */ "CertEngine Inc.", /* 5575 */ "T.I.L.L. Photonics GmbHAnselm Kruis", /* 5576 */ "Persimmon Development", /* 5577 */ "New Mexico State University", /* 5578 */ "Mercata, Inc.", /* 5579 */ "EXEJone", /* 5580 */ "Communications Networks of Africa (GH) Ltd (NETAFRICA)", /* 5581 */ "iTRUST Solutions AG", /* 5582 */ "MD Information Systems", /* 5583 */ "General Bandwidth", /* 5584 */ "Very Clever Software Ltd.", /* 5585 */ "IPWireless Inc.", /* 5586 */ "Flughafen Muenchen GmbH", /* 5587 */ "Thomcast Communication, Inc.Comwave Division (\"Comwave\")", /* 5588 */ "Synopsys, Inc.", /* 5589 */ "Marimba Inc.", /* 5590 */ "SCTE", /* 5591 */ "Wilson & Sanders, Inc.", /* 5592 */ "Magnum Technologies Inc.", /* 5593 */ "Koankeiso Co., Ltd.", /* 5594 */ "Ingrian Systems, Inc", /* 5595 */ "Tandberg ASA", /* 5596 */ "Meinberg Funkuhren", /* 5597 */ "Submarine Warfare Systems Centre", /* 5598 */ "Comp Sci & Eng, 'De Montfort University'", /* 5599 */ "Clearstream Services", /* 5600 */ "Clearstream Banking", /* 5601 */ "T/R Systems, Inc.", /* 5602 */ "Capital One Financial Services", /* 5603 */ "digit-safe", /* 5604 */ "William Data Systems Ltd.", /* 5605 */ "Cerplus SAPierre", /* 5606 */ "Erwann ABALEA", /* 5607 */ "Red Planet Technologies", /* 5608 */ "Smartleaf, Inc.", /* 5609 */ "Exbit TechnologyA/S", /* 5610 */ "vmunix.org", /* 5611 */ "Korea Data Communications", /* 5612 */ "tdressler.net", /* 5613 */ "SonyBPE", /* 5614 */ "Inherit S AB", /* 5615 */ "TEKOPS", /* 5616 */ "Trio Communications 2000 Pty. Ltd", /* 5617 */ "WareNet Inc.", /* 5618 */ "Amaranth Networks Inc.", /* 5619 */ "CFX Communications", /* 5620 */ "Heriot-Watt University", /* 5621 */ "DreGIS GmbH", /* 5622 */ "KPMG", /* 5623 */ "Enterasys Networks", /* 5624 */ "A. Gell, CxA", /* 5625 */ "Internet Barter Inc.aka Bartertrust.com", /* 5626 */ "Hitachi Process Computer Engineering, Inc.", /* 5627 */ "X.O. Soft, Ltd", /* 5628 */ "Continuus Software Corporation", /* 5629 */ "ExiO Communications Inc.", /* 5630 */ "Alliance Systems, Inc.", /* 5631 */ "TelePassport Hellas S.A.", /* 5632 */ "BASF Computer Services GmbH", /* 5633 */ "Universiteit van Amsterdam", /* 5634 */ "Dale W. Liu", /* 5635 */ "Dignos EDV GmbH", /* 5636 */ "IDN Technology Inc.", /* 5637 */ "PK Electronics", /* 5638 */ "Dept. Of Biology Western KY University", /* 5639 */ "Lama Law Firm", /* 5640 */ "Anthem Inc.", /* 5641 */ "MicroCast, Inc.", /* 5642 */ "University of Arizona", /* 5643 */ "PassEdge", /* 5644 */ "BowStreet Software", /* 5645 */ "Onyx Networks", /* 5646 */ "Emperative, Inc.", /* 5647 */ "L-3 Communications (PrimeWave Communications)", /* 5648 */ "Webswap Inc.", /* 5649 */ "Merck & Co., Inc.", /* 5650 */ "Maipu Electric Industrial Co., Ltd", /* 5651 */ "Kraig Sigman", /* 5652 */ "CSP", /* 5653 */ "Ando Electric Corporation", /* 5654 */ "P-Cube Ltd.", /* 5655 */ "Monmouth University", /* 5656 */ "Universidad de La Coruna", /* 5657 */ "ISL, Institute of Shipping Economics and Logistics", /* 5658 */ "CoProSys Inc.", /* 5659 */ "XI'AN DATANG TELEPHONE Corp.", /* 5660 */ "T-Mobile", /* 5661 */ "Nordic Global Inc.", /* 5662 */ "TecnoLogica Informatica", /* 5663 */ "Monastery of the Glorious Ascension, Inc.", /* 5664 */ "Vertical One, Inc.", /* 5665 */ "Servevcast", /* 5666 */ "Teldata Computer Industries, Inc.", /* 5667 */ "Mycroft Inc.", /* 5668 */ "Digital Island", /* 5669 */ "Redwood Technologies Ltd.", /* 5670 */ "Horus IT GmbH", /* 5671 */ "CIENA Corporation", /* 5672 */ "eConvergent, Inc.", /* 5673 */ "Texcel Technology Plc.", /* 5674 */ "Genosys Technology Management Inc.", /* 5675 */ "DataFlow/Alaska, Inc.", /* 5676 */ "Clunix, Inc.", /* 5677 */ "Stalker Software, Inc", /* 5678 */ "EWE & EVE's Gourds & Things", /* 5679 */ "Windsor Group", /* 5680 */ "fruittm", /* 5681 */ "Synergon Ltd.", /* 5682 */ NULL, /* 5683 */ "Metro Optix, Inc.", /* 5684 */ "DataLink SNMP Solution", /* 5685 */ "A H Computer Company", /* 5686 */ "Icon Laboratories, Inc.", /* 5687 */ "StrataSource, Inc.", /* 5688 */ "Net & Sys Co., Ltd", /* 5689 */ "Agri-Com Holdings", /* 5690 */ "SilverPlatter Information", /* 5691 */ "Kilfoil Information Technologies, Inc.", /* 5692 */ "Accordion Networks", /* 5693 */ "Integrated Digital Solutions Limited", /* 5694 */ "bbq.com", /* 5695 */ "Walter Graphtek GmbH", /* 5696 */ "HanseNetTelefongesellschaft mbH", /* 5697 */ "Digitrans", /* 5698 */ "Cornerstone Solutions Corporation", /* 5699 */ "University of the West Indies", /* 5700 */ "Maple Networks, Inc.", /* 5701 */ "Touch Technology International", /* 5702 */ "NVIDIA Corporation", /* 5703 */ "CITGO Petroleum Corporation", /* 5704 */ "DTA", /* 5705 */ "LGS Group Inc.", /* 5706 */ "Fiberspace Unlimited, LLC", /* 5707 */ "CTS Network Services", /* 5708 */ "EDS/CFSM", /* 5709 */ "Wellknit", /* 5710 */ "ECCS, Inc.", /* 5711 */ "System Integrators, Incorporated", /* 5712 */ "Niksun Inc.", /* 5713 */ "Insh_Allah", /* 5714 */ "Enigma Enterprises", /* 5715 */ "WebSpectrum Software Pvt. Ltd.", /* 5716 */ "UUcom", /* 5717 */ "Cellit, Inc.", /* 5718 */ "PNC Financial Services Group", /* 5719 */ "iMimic Networking, Inc.", /* 5720 */ "IntellOps", /* 5721 */ "OPNET Technologies, Inc", /* 5722 */ "SAMAC Software GmbH", /* 5723 */ "Cicero Communications, Inc.", /* 5724 */ "Xel Communications", /* 5725 */ "Lyondell Chemical Company", /* 5726 */ "Smart Card Applications Pty Limited", /* 5727 */ "K Ring Technologies", /* 5728 */ "SQLI", /* 5729 */ "Simpson Professional Services", /* 5730 */ "DJM Enterprises", /* 5731 */ "One, Inc - Plano", /* 5732 */ "Dept.3,ISCAS(Institute of Software, the Chinese Academyof Sciences", /* 5733 */ "FABRICA NACIONAL DE MONEDA Y TIMBRE - REAL CASA DE LA MONEDA", /* 5734 */ "EBSnet Inc.", /* 5735 */ "Power Conversion Products, LLC", /* 5736 */ "E-Commerce Enterprises, LLC", /* 5737 */ "Vovida Networks", /* 5738 */ "Xpeed, Inc.", /* 5739 */ "Birionic Pvt Ltd", /* 5740 */ "a2zcom", /* 5741 */ "S.S.C. 'HENGELO'", /* 5742 */ "GT Group Telecom Services Corp.", /* 5743 */ "TARSEC Inc.", /* 5744 */ "Ericsson Nikola Tesla d.d.", /* 5745 */ "Lanex Sp. z o.o.", /* 5746 */ "Bluetail AB", /* 5747 */ "Applied Expert Systems", /* 5748 */ "TGS-NOPEC Geophysical Company", /* 5749 */ "General Mills", /* 5750 */ "Illumination Enterprises, Inc.", /* 5751 */ "HyperSoft, Inc.", /* 5752 */ "University of Maribor", /* 5753 */ "Clearstream International", /* 5754 */ "ITS (UK) Ltd.", /* 5755 */ "Supertel , JSC", /* 5756 */ "Trilithic", /* 5757 */ "Stins Coman", /* 5758 */ "bridges.com", /* 5759 */ "Bell Atlantic Mobile", /* 5760 */ "Hannetware Inc.", /* 5761 */ "Interland", /* 5762 */ "DB POWER ELECTRONICS (P) Ltd.", /* 5763 */ "Jazzey GmbH", /* 5764 */ "aXess-pro networks GmbH", /* 5765 */ "IBM Global Services", /* 5766 */ "Quark, Inc.", /* 5767 */ "Polish-Japanese Institute of Information Technology", /* 5768 */ "HealthMagic, Inc.", /* 5769 */ "Medepass.com, Inc.", /* 5770 */ "Cisco Systems, Inc.", /* 5771 */ "C-it", /* 5772 */ "Equiinet Ltd.", /* 5773 */ "Beijing Telecable Network System Ltd.", /* 5774 */ "Advanced Technology Solutions International", /* 5775 */ "Express Scripts, Inc.", /* 5776 */ NULL, /* 5777 */ "Universidad Autonoma de Madrid", /* 5778 */ "Data-GUYS Inc.", /* 5779 */ "PDA Verticals Corp.", /* 5780 */ "Jordan Network Engineering", /* 5781 */ "University of Wisconsin System", /* 5782 */ "BROADPAC Communications", /* 5783 */ "Cogita Ltd", /* 5784 */ "Intershop Communications AG", /* 5785 */ "Mc Coy Marine Consultants", /* 5786 */ "Adventist Health", /* 5787 */ "Softdev Corp.", /* 5788 */ "MobileQ.com Inc.", /* 5789 */ "Shawn Starr", /* 5790 */ "Compu-Mentor, Inc.", /* 5791 */ "Dean Gakis", /* 5792 */ "The Edge Consultants", /* 5793 */ "OBR CTM", /* 5794 */ "BPT TELBANK SA", /* 5795 */ "STC Informatik", /* 5796 */ "Western Power Distribution", /* 5797 */ "VIACCESS S.A.", /* 5798 */ "Nyherji", /* 5799 */ "Cruise Controls Pvt. Ltd.- FRESNEL", /* 5800 */ "Second Opinion Software", /* 5801 */ "Electroline Equipment Inc.", /* 5802 */ "2AB, Inc.", /* 5803 */ "Lantern Communications", /* 5804 */ "Televideo, Inc.", /* 5805 */ "SK Telecom", /* 5806 */ "Flora van Kesteren Tuinadviezen", /* 5807 */ "INRANGE Technologies Corporation", /* 5808 */ "Nieden-Nsm", /* 5809 */ "Global Crossing", /* 5810 */ "The GoldParrot Corporation", /* 5811 */ "Coriolis Networks", /* 5812 */ "The OpenNMS Group, Inc.", /* 5813 */ "General Communications Inc.", /* 5814 */ "Optima Tele.com, Inc.", /* 5815 */ "Lockstep Systems", /* 5816 */ "High Precision Record Company Limited", /* 5817 */ "Cherry Cyber Net", /* 5818 */ "X.Net Ltda", /* 5819 */ "Flyforms", /* 5820 */ "Orangesoft, Inc.", /* 5821 */ "Reynolds and Reynolds Pty Ltd", /* 5822 */ "nRose", /* 5823 */ "Nikkai Electronic, Inc.", /* 5824 */ "Native Networks", /* 5825 */ "MIND CTI Ltd.", /* 5826 */ "HERMES SoftLab", /* 5827 */ "SpaceNet Communication AB", /* 5828 */ "AMCC Switching Corp.", /* 5829 */ "XcelleNet", /* 5830 */ "Cleondris GmbH", /* 5831 */ "Horgan.net", /* 5832 */ "Tailyn Communication Company", /* 5833 */ "Identikey ltd", /* 5834 */ "Newtec Cy", /* 5835 */ "TOYO COMMUNICATION EQUIPMENT CO., LTD", /* 5836 */ "Nedcor Limited", /* 5837 */ "Cabletime Ltd", /* 5838 */ "Bioplasma Andaluza S.L.", /* 5839 */ "Aravox Technologies, Inc.", /* 5840 */ "Netfish Technologies", /* 5841 */ "Cisco Systems", /* 5842 */ "FiberLogic Communications", /* 5843 */ "LG Space Engineering Corp", /* 5844 */ "Cyberus Online Inc.", /* 5845 */ "NetCentrex", /* 5846 */ "Knowledge Design", /* 5847 */ "Rissa Solutions Corp.", /* 5848 */ "Signal-COM", /* 5849 */ "H.S. Leader Srl", /* 5850 */ "eWindowShop.com", /* 5851 */ "Oscar Jacobsson", /* 5852 */ "Bell Technology", /* 5853 */ "Bell Network Solutions", /* 5854 */ "John Deere (dba Deere & Company)", /* 5855 */ "Vianet Technologies, Inc.", /* 5856 */ "VirtualWorkout", /* 5857 */ "Cyclone Commerce, Inc.", /* 5858 */ "EFA Software Services Ltd.", /* 5859 */ "TeleNet Inc.", /* 5860 */ "Mitsubishi Heavy Industries, Ltd", /* 5861 */ "CEYCO Internet Applications", /* 5862 */ "D'ALASKA CO.", /* 5863 */ "REITC, LLC", /* 5864 */ "Parallel Networks", /* 5865 */ "London School of Economics Computer Security Research Centre", /* 5866 */ "San Joaquin Delta Community College District", /* 5867 */ "CRONOS Research Centre Sdn Bhd", /* 5868 */ "Deutsche Post eBusiness", /* 5869 */ "BioFone Inc.", /* 5870 */ "HyperXS", /* 5871 */ "TDC Systems", /* 5872 */ "Software Dynamics Inc.", /* 5873 */ "Tellabs MNG", /* 5874 */ "China Advanced Info-Optical Network (CAINONET)", /* 5875 */ "A2B s.r.o.", /* 5876 */ "Ruhr-Universitaet Bochum", /* 5877 */ "NICE GmbH", /* 5878 */ "Unassigned", /* 5879 */ "Opteway", /* 5880 */ "ARZ Allgemeiness Rechenzentrum GmbH", /* 5881 */ "Inopoly Inc.", /* 5882 */ "Zaffire, Inc.", /* 5883 */ "University of Utah", /* 5884 */ "McGough Enterprises L.L.C.", /* 5885 */ "NuSpeed Internet Systems", /* 5886 */ "Falconnect, Inc.", /* 5887 */ "Agiliti, Inc.", /* 5888 */ "Universidad Iberoamericana GC", /* 5889 */ "Lantop Systems LTD", /* 5890 */ "Autotote Systems, Inc.", /* 5891 */ "Legacy Computer Services Limited", /* 5892 */ "PinPoint Corporation", /* 5893 */ "Dreamchal Inc.", /* 5894 */ "At Fut AS", /* 5895 */ "csseEvens St. Hilaire", /* 5896 */ "BP Amoco PLC", /* 5897 */ "RITLABS S.R.L.", /* 5898 */ "Microm Electronics", /* 5899 */ "Schrader-Bridgeport International", /* 5900 */ "Nominum Inc.", /* 5901 */ "Maharajah Infosys", /* 5902 */ "Pace Micro Technology plc", /* 5903 */ "Walgreens", /* 5904 */ "StorageNetworks", /* 5905 */ "Travsys BV", /* 5906 */ "Lokasoft", /* 5907 */ "Otelnet, Inc.", /* 5908 */ "Skybitz Inc.", /* 5909 */ "Availant", /* 5910 */ "cbrook", /* 5911 */ "Yuasa Corporation", /* 5912 */ "Oliver Fehr", /* 5913 */ "Balsa Software", /* 5914 */ "Trilogic Systems", /* 5915 */ "i-Nebula.com", /* 5916 */ "Gigalink", /* 5917 */ "BBL", /* 5918 */ "Departamento de Informatica da Fac. Ciencias da Univ. Lisboa", /* 5919 */ "Zurich Financial Services Group", /* 5920 */ "Sema Group AB", /* 5921 */ "Real Time Monitors, Inc.", /* 5922 */ "Internet2", /* 5923 */ "Xevo Corp.", /* 5924 */ "Interactive People Unplugged AB", /* 5925 */ "interlink", /* 5926 */ "NexComm Systems, Inc.", /* 5927 */ "Zydacron, Inc.", /* 5928 */ "Amer.com", /* 5929 */ "ImagicTV Inc.", /* 5930 */ "PRESIDEO, Inc.", /* 5931 */ "OpenSystems.com, Inc.", /* 5932 */ "Software Services", /* 5933 */ "University of Louisiana at Lafayette", /* 5934 */ "ACADEMIA Sinica Computing Centre", /* 5935 */ "Ahhaaa AB", /* 5936 */ "HypoVereinsbank", /* 5937 */ "Macfarlane TeleSystems Ltd.", /* 5938 */ "HALCOM Informatika, d.o.o.", /* 5939 */ "Red Lion Controls (JBM Electronics Co., Inc.)", /* 5940 */ "Cosmocom Inc.", /* 5941 */ "ThoughtShare Communications", /* 5942 */ "MatchCraft, Inc.", /* 5943 */ "nROSE", /* 5944 */ "AtBusiness Communications Oyj", /* 5945 */ "MULTITEL Inc.", /* 5946 */ "WebForce LLC", /* 5947 */ "3NO Systems", /* 5948 */ "IBM, AIX Tools Team", /* 5949 */ "Imagineering Inc.", /* 5950 */ "Netscaler", /* 5951 */ "Breakaway Solutions, Inc.", /* 5952 */ "EleTel Inc.", /* 5953 */ "Aaron Telecommunication Technology", /* 5954 */ "ASCONA", /* 5955 */ "Travelport", /* 5956 */ "Essematica S.r.l.", /* 5957 */ "KCell", /* 5958 */ "Eastern Communications Co. Ltd.", /* 5959 */ "CEFRIEL", /* 5960 */ "Powec AS", /* 5961 */ "David Clunie", /* 5962 */ "RadioScape Ltd.", /* 5963 */ "Fenestrae B.V.", /* 5964 */ "Cenosis", /* 5965 */ "Hummingbird Ltd.", /* 5966 */ "Jane Ellen Shatz, Ph. D.", /* 5967 */ "VAMS", /* 5968 */ "Lightspeed Systems", /* 5969 */ "CSIRO", /* 5970 */ "LEAD Technologies, Inc.", /* 5971 */ "AirNet Communications Corporation", /* 5972 */ "Rainbow Technologies, Inc.", /* 5973 */ "Telecom Technologies, Inc.", /* 5974 */ "Telchemy", /* 5975 */ "Red Hill Networks", /* 5976 */ "University of Texas at Dallas (UTD)", /* 5977 */ "California State University Northridge", /* 5978 */ "CSCare Inc.", /* 5979 */ "CSSoftware Inc.", /* 5980 */ "media transfer AG", /* 5981 */ "Infor", /* 5982 */ "Descartes Systems Group Inc.", /* 5983 */ "Cedere Corporation", /* 5984 */ "BioCor, L.L.C.", /* 5985 */ "Vpacket Communications, Inc.", /* 5986 */ "Pacific Broadband Communications", /* 5987 */ "esutel", /* 5988 */ "Go.com", /* 5989 */ "INFORMZASCHITA", /* 5990 */ "Ntown Communications, Inc.", /* 5991 */ "ePower Solutions, Inc.", /* 5992 */ "Terabeam Networks", /* 5993 */ "Arcom Control Systems", /* 5994 */ "Everypath Inc.", /* 5995 */ "Communication Weaver Co., Ltd.", /* 5996 */ "TeamTronic p.s.c.r.l.", /* 5997 */ "CITI-DIC IT CO., LTD", /* 5998 */ "SCITEL Industrieberatungs-GmbH", /* 5999 */ "CES Computer Solutions Inc.", /* 6000 */ "Memorial Sloan-Kettering Cancer Center", /* 6001 */ "Impresse Corporation", /* 6002 */ "Jasmine Networks, Inc.", /* 6003 */ "SYSMATE Co., Ltd.", /* 6004 */ "City of Sydney", /* 6005 */ "The Schleutker Sites", /* 6006 */ "Redux Communications Ltd.", /* 6007 */ "Lynxus, Inc.", /* 6008 */ "gcs Global Communication & Services GmbH", /* 6009 */ "SERVICECO", /* 6010 */ "Cinta Corporation", /* 6011 */ "PiNGPoNG.CoM", /* 6012 */ "Tieturi", /* 6013 */ "National Library of Medicine", /* 6014 */ "Chicago Board Options Exchange", /* 6015 */ "Technauts", /* 6016 */ "G2X Software", /* 6017 */ "Excel Medical Electronics Inc.", /* 6018 */ "Simplified Telesys, Inc.", /* 6019 */ "Lutris Technologies", /* 6020 */ "Arcadian Wireless", /* 6021 */ "DFKI GmbH", /* 6022 */ "Steele Raymond Solicitors", /* 6023 */ "Scannex Electronics Ltd.", /* 6024 */ "Advanced Network Solutions S.p.A.", /* 6025 */ "U.S. Army STRICOM", /* 6026 */ "Force10 Networks, Inc.", /* 6027 */ "ODSI Coalition", /* 6028 */ "Exactis.com", /* 6029 */ "Fluke Electronics", /* 6030 */ "Computer Problem Solving", /* 6031 */ "Stainless Steel Networks", /* 6032 */ "e-talk Corporation", /* 6033 */ "BroadJump", /* 6034 */ "Sensis Corporation", /* 6035 */ "Bose Corporation", /* 6036 */ "Edge Networks Corp.", /* 6037 */ "Netwhistle.com", /* 6038 */ "Resscom Computers and Communications", /* 6039 */ "University of Kalmar", /* 6040 */ "Kokua Communications", /* 6041 */ "Southeastern Aluminum Products, Inc.", /* 6042 */ "AstroTerra Corporation", /* 6043 */ "Poyntz, Inc.", /* 6044 */ "Synaptique Information & Technologie", /* 6045 */ "Near2 Communications, Inc.", /* 6046 */ "Florida Teaching Profession - NEA", /* 6047 */ "Exyst", /* 6048 */ "Hitachi Information Systems, Ltd.", /* 6049 */ "GAMATRONIC ELECTRONIC INDUSTRIES LTD", /* 6050 */ "Ameritrade", /* 6051 */ "Novasonics", /* 6052 */ "Eredyne Corporation", /* 6053 */ "Access360", /* 6054 */ "Lees Communication", /* 6055 */ "Rensselaer Polytechnic Institute", /* 6056 */ "AppNet", /* 6057 */ "Havas Interactive", /* 6058 */ "AdNovum Informatik AG", /* 6059 */ "ISP Systems Pty. Ltd.", /* 6060 */ "Netuitive, Inc.", /* 6061 */ "TEKELEC TEMEX", /* 6062 */ "Axent Technologies, Inc.(Utah)", /* 6063 */ "JK microsystems", /* 6064 */ "ZUniversity.com", /* 6065 */ "Occam Networks, Inc.", /* 6066 */ "Adapcom, Inc.", /* 6067 */ "kc. marching", /* 6068 */ "BlocWare, Inc.", /* 6069 */ "AVIV INFOCOM CO.,", /* 6070 */ "SIGMA Informatique", /* 6071 */ "Plan Software GmbH", /* 6072 */ "Business Global Systems", /* 6073 */ "Cenosis, Inc.", /* 6074 */ "Siemens AG", /* 6075 */ "TrelliSoft, Inc.", /* 6076 */ "Call-Net Technology Services Inc.", /* 6077 */ "CyberIntelligent Technologies", /* 6078 */ "appoconnect.com", /* 6079 */ "BridgeWave Communications", /* 6080 */ "Nexsi", /* 6081 */ "AReS", /* 6082 */ "AATR", /* 6083 */ "PRISMedia Networks, Inc.", /* 6084 */ "Hypergene AB", /* 6085 */ "New York Life Insurance Co.", /* 6086 */ "Mentat Inc.", /* 6087 */ "opNIX, Inc.", /* 6088 */ "LastMile", /* 6089 */ "DespatchBox", /* 6090 */ "epki", /* 6091 */ "Agillion Corporation", /* 6092 */ "TESSAG AG", /* 6093 */ "Wapcom", /* 6094 */ "KHALED FAHMI", /* 6095 */ "Netsecure Software", /* 6096 */ "State of Michigan", /* 6097 */ "AvantGo", /* 6098 */ "INTELLIDEN, Incorporated", /* 6099 */ "Covalent Technologies, Inc.", /* 6100 */ "Trend Micro Inc.", /* 6101 */ "Integrated Research Ltd.", /* 6102 */ "Al Rasheed", /* 6103 */ "Cosmobridge Co., Ltd.", /* 6104 */ "Center Vlade za Informatiko", /* 6105 */ "Maharaja Infosys Limited", /* 6106 */ "IDN Telecom, Inc.", /* 6107 */ "Insurance Auto Auctions", /* 6108 */ "ADIC", /* 6109 */ "Atrica", /* 6110 */ "Worldsport Networks Ltd.", /* 6111 */ "XINETRON CO., LTD", /* 6112 */ "Datek Telecom S.A.", /* 6113 */ "ProSyst Software AG", /* 6114 */ "Open Interactive Limited", /* 6115 */ "Medtegrity, Inc.", /* 6116 */ "Fiber Network Engineering", /* 6117 */ "Quintiles", /* 6118 */ "IPWorks, Inc.", /* 6119 */ "NXTV", /* 6120 */ "Excite@Home E-Business Services", /* 6121 */ "Mover S.p.A.", /* 6122 */ "National Institute of Telecommunications", /* 6123 */ "Sane Solutions, LLC", /* 6124 */ "ACERFI-MICRONICSFrancois Regis K.", /* 6125 */ "epicRealm", /* 6126 */ "LapLink.com", /* 6127 */ "Wireless Planet", /* 6128 */ "Bromax Communication Inc.,", /* 6129 */ "CVI", /* 6130 */ "Starmedia Mobile", /* 6131 */ "LVL7 Systems, Inc.", /* 6132 */ "Dead Fish Technologies", /* 6133 */ "Trioniq", /* 6134 */ "Chubu Telecommunications Co., Inc.", /* 6135 */ "idealhost.com", /* 6136 */ "University of Canterbury", /* 6137 */ "Trasys", /* 6138 */ "Healthcare Specialists, Inc.", /* 6139 */ "Enikia Incorporated", /* 6140 */ "World Wide Packets", /* 6141 */ "TF1", /* 6142 */ "Eventlogic", /* 6143 */ "SUNTECH Sp. zo.o", /* 6144 */ "Cendio Systems AB", /* 6145 */ "Whirlpool Corporation", /* 6146 */ "Alliegiance Telecom", /* 6147 */ "Cidera, Inc.", /* 6148 */ "London School of Economics", /* 6149 */ "Open Networks Engineering Ltd.", /* 6150 */ "Copyprint S.L.", /* 6151 */ "Sendmail, Inc.", /* 6152 */ "JOLT Ltd.", /* 6153 */ "Soneris Engineering", /* 6154 */ "FIREBIT Ltd.", /* 6155 */ "TTC TESLA TELEKOMUNIKACE, Ltd.", /* 6156 */ "ICCRI BANCA FEDERALE EUROPEA SPA", /* 6157 */ "NAGUS", /* 6158 */ "University of Iowa", /* 6159 */ "Affinity Technology Group", /* 6160 */ "OnFiber Communications, Inc.", /* 6161 */ "Solid Data Systems", /* 6162 */ "Inara Networks, Inc.", /* 6163 */ "Kinva Network System Ltd.", /* 6164 */ "Portwell Inc.", /* 6165 */ "Interactive Enterprise", /* 6166 */ "SPHINX", /* 6167 */ "Banco do Brasil S/A", /* 6168 */ "Serendipity Simplex", /* 6169 */ "PartMiner, Inc.", /* 6170 */ "Kidata AG", /* 6171 */ "Worldwide Entrepreneuric Enterprises, Inc.", /* 6172 */ "Fisher & Paykel Industries Limited", /* 6173 */ "Fusionx", /* 6174 */ "Pines of Woodedge", /* 6175 */ "VIPCom", /* 6176 */ "Blitz Information Technologies Berhad", /* 6177 */ "NTT Advanced Technology Corporation", /* 6178 */ "R.M. EDIZIONI SRL", /* 6179 */ "CanDo.com", /* 6180 */ "Creative Logic Corporation", /* 6181 */ "Encore Electronics Inc.", /* 6182 */ "Sharemedia", /* 6183 */ "Mitsui & Co., Ltd.", /* 6184 */ "Ghent University", /* 6185 */ "Space CyberLink Inc.", /* 6186 */ "Dartmouth-Hitchcock Medical Center", /* 6187 */ "University of Massachusetts Lowell", /* 6188 */ "Atos Information Technology GmbH - Trustcenter", /* 6189 */ "Network365 Ltd", /* 6190 */ "Plasmon, Inc.", /* 6191 */ "Environmental Monitoring Solutions", /* 6192 */ "CPL Systems Ltd.", /* 6193 */ "NetCalibrate Inc.", /* 6194 */ "Advanced Communication Research", /* 6195 */ "Atlantec Enterprise Solutions GmbH", /* 6196 */ "Arcordia/JP Morgan Chase", /* 6197 */ "Eastern Nazarene College", /* 6198 */ "Nyherji hf", /* 6199 */ "DNPG", /* 6200 */ "Asenti, Inc.", /* 6201 */ "Nimble, Inc.", /* 6202 */ "Topspin Networks", /* 6203 */ "SIBS - Sociedade Interbancaria de Servicos, S.A.", /* 6204 */ "LKC-Technology", /* 6205 */ "eCritical Inc.", /* 6206 */ "The Polished Group SA", /* 6207 */ "Enterprise Internet Services Limited", /* 6208 */ "The Open University", /* 6209 */ "Mayah Communications GmbH", /* 6210 */ "Murex", /* 6211 */ "XM Satellite Radio, Inc.", /* 6212 */ "Redline Networks, Inc.", /* 6213 */ "SureFire Commerce Inc.", /* 6214 */ "Streaming21, Inc.", /* 6215 */ "Ci Technologies", /* 6216 */ "ngkindsoftltd", /* 6217 */ "SCAN COIN", /* 6218 */ "Iskra SYSEN d.d.", /* 6219 */ "Cyber Internet Services", /* 6220 */ "BAE Systems, CNIR", /* 6221 */ "STSN, Inc.", /* 6222 */ "CDS Technologies", /* 6223 */ "Roxy.com", /* 6224 */ "Broadcast Towers", /* 6225 */ "BARIELD'S INTERNET PROVIDER SERVICE", /* 6226 */ "Resolve Engineering Pty Ltd", /* 6227 */ "Engineering Center for Information Security,Chinese Acadamy of Sciences", /* 6228 */ "Tango/04 Computing Group", /* 6229 */ "SITE Skunkworks", /* 6230 */ "Fiduciary Automation", /* 6231 */ "Corinex Global Corp.", /* 6232 */ "UUNET EMEA", /* 6233 */ "Paul Abrahams, Sc.D.", /* 6234 */ "nawilson.com", /* 6235 */ "Crayfish Co.,Ltd.", /* 6236 */ "NetAge Solutions GmbH Netzwerklösungen", /* 6237 */ "Queen Mary, University of London", /* 6238 */ "TechnoTrend AG", /* 6239 */ "Bryttan, Ltd.", /* 6240 */ "Calvin College", /* 6241 */ "Possm Technologies", /* 6242 */ "Weber Enterprise", /* 6243 */ "PDR/SAGN Publishing", /* 6244 */ "CiRCLEX Limited", /* 6245 */ "Mythological Solutions", /* 6246 */ "Comtech EFData Corporation", /* 6247 */ "Atecs Dematic", /* 6248 */ "HCL Technologies Ltd", /* 6249 */ "PepsiCo Business Solutions Group (PBSG)", /* 6250 */ "Atoga Systems, Inc.", /* 6251 */ "SrvLoc.Org", /* 6252 */ "ipSEAL, Inc", /* 6253 */ "TimeVision Inc.", /* 6254 */ "Commerce Onc, Inc.", /* 6255 */ "Southwest Communications Institute", /* 6256 */ "Disappearing, Inc.", /* 6257 */ "Iwatsu Electric Co., Ltd.", /* 6258 */ "Sohonet Limited", /* 6259 */ NULL, /* 6260 */ "MAKU Informationstechnik GmbH", /* 6261 */ "IMC Communications", /* 6262 */ "Avstar Systems, LLC", /* 6263 */ "OpenNetwork Technologies", /* 6264 */ "gocek.com", /* 6265 */ "Everest eCommerce Inc.", /* 6266 */ "MUSHTAQ SONS", /* 6267 */ "Evistel", /* 6268 */ "DiGiMATiON", /* 6269 */ "iAsiaWorks", /* 6270 */ "N.S.C.", /* 6271 */ "KPNQwest Finland", /* 6272 */ "Weir Consulting Ltd", /* 6273 */ "Drael Computer Corporation", /* 6274 */ "HOB GmbH & Co. KG - HOB Germany", /* 6275 */ "Mahindra British Telecom Limited", /* 6276 */ "Federación de Organizaciones Privadas de Desarrollo - FOPRIDEH", /* 6277 */ "Invision.com, Inc", /* 6278 */ "Visible Markets, Inc.", /* 6279 */ "Coreon, Inc.", /* 6280 */ "Jingle Cats Music", /* 6281 */ "SDC Communications Ltd", /* 6282 */ "City-Net Technology Inc.", /* 6283 */ "Wireless Networks, Inc.", /* 6284 */ "Crossport Systems", /* 6285 */ "One Tech Telecom Co.,Ltd.", /* 6286 */ "Nextenso", /* 6287 */ "Euskaltel S.A.", /* 6288 */ "Adapcom Inc.", /* 6289 */ "LightSand Communications, Inc.", /* 6290 */ "Bates College", /* 6291 */ "Leadership Technologies, Inc.", /* 6292 */ "Kasenna, Inc.", /* 6293 */ "Active Telco", /* 6294 */ "Wilhoyt Industries", /* 6295 */ "DASAN Co.,LTD.", /* 6296 */ "Enel.it", /* 6297 */ "MP3.com", /* 6298 */ "SUNY Cortland", /* 6299 */ "Karl Miller", /* 6300 */ "Packet Dynamics Ltd", /* 6301 */ "Emerson Energy Systems", /* 6302 */ "Cityspace Ltd", /* 6303 */ "fogcity", /* 6304 */ "Flextronics International", /* 6305 */ "Dartware, LLC", /* 6306 */ "Ipanema Technologies", /* 6307 */ "cholul", /* 6308 */ "Dan Nielsen Consulting", /* 6309 */ "KaanBaan Technologies", /* 6310 */ "Gomez Advisors, Inc.", /* 6311 */ "Pelican Security, Inc.", /* 6312 */ "InnovaCom, Inc.", /* 6313 */ "VillaMontage Systems", /* 6314 */ "Comissão para Coordenação do Projeto SIVAM", /* 6315 */ "Bill Fenner", /* 6316 */ "Netfox", /* 6317 */ "lesswire AG", /* 6318 */ "Caldera Systems, Inc.", /* 6319 */ "simonstl.com", /* 6320 */ "Calix Networks", /* 6321 */ "Entone Technologies Ltd.", /* 6322 */ "NewCross Technologies, Inc", /* 6323 */ "CoolAlerts, Inc.", /* 6324 */ "Harmonix Corporation", /* 6325 */ "LongBoard, Inc.", /* 6326 */ "Drews TC", /* 6327 */ "WizWise Technology", /* 6328 */ "Internet Business Factory", /* 6329 */ "Microdot Computing Services", /* 6330 */ "Optimation New Zealand Limited", /* 6331 */ "Four Seasons Produce, Inc.", /* 6332 */ "Accord Networks Ltd.", /* 6333 */ "beTRUSTed", /* 6334 */ "Adroit Controls", /* 6335 */ "Digital Fountain", /* 6336 */ "Crytaliz, Inc.", /* 6337 */ "Sportshuddle.Com", /* 6338 */ "Digital China (Shanghai) Networks Ltd.", /* 6339 */ "Otto Kind", /* 6340 */ "Harvard University", /* 6341 */ "Hyperchip, Inc.", /* 6342 */ "YMCA England", /* 6343 */ "Hunter Technology Inc.", /* 6344 */ "Compuprint S.P.A", /* 6345 */ "DIMAT, S.A.", /* 6346 */ "Sierra Monitor Corporation", /* 6347 */ "Liquid Digital Information Systems", /* 6348 */ "Treeblossom Technologies", /* 6349 */ "Blue Cross Blue Shield of Michigan", /* 6350 */ "Shawn Systems, Inc.", /* 6351 */ "Ciena Corporation", /* 6352 */ "Avisto SA", /* 6353 */ "Telways Communication Co.,Ltd.", /* 6354 */ "Sipher Internet Tachnology", /* 6355 */ "Innovative Software AG", /* 6356 */ "B2 Systems, Inc.", /* 6357 */ "Unimark, Inc.", /* 6358 */ "Cyveillance Inc.", /* 6359 */ "LiveVault Corporation", /* 6360 */ "Siemens Building Technologies Ltd", /* 6361 */ "Baumann Technologie", /* 6362 */ "CyberSolutions GmbH", /* 6363 */ "Andréa Informatique", /* 6364 */ "Novamedia Sistemas S.L.", /* 6365 */ "KOREA LINK", /* 6366 */ "Linkabit - A Titan Systems Company", /* 6367 */ "Schmid Telecom AG", /* 6368 */ "Lexi-Comp, Inc.", /* 6369 */ "First USA Bank", /* 6370 */ "Minerva Networks Inc", /* 6371 */ "Kresa Ranch", /* 6372 */ "4DL Inc.", /* 6373 */ "CECI", /* 6374 */ "CHINA ENGINEERING CONSULTANTS,INC.", /* 6375 */ "PDVSA", /* 6376 */ "OpenPages, Inc.", /* 6377 */ "Lanit", /* 6378 */ "Servgate Technologies Canada Inc.", /* 6379 */ "Isdnet", /* 6380 */ "burst.com", /* 6381 */ "SAGA Software, Incorporated", /* 6382 */ "OC", /* 6383 */ "V&S Multimedia S.A.", /* 6384 */ "Pfizer", /* 6385 */ "Saturn Technologies", /* 6386 */ "Big Band Networks, Ltd", /* 6387 */ "TeleRelay", /* 6388 */ "COM DEV International", /* 6389 */ "DBCORP Information Systems Inc.", /* 6390 */ "Xtremesoft Inc.", /* 6391 */ "Chiaro Networks Ltd.", /* 6392 */ "Haliplex Pty Ltd", /* 6393 */ "Skelton Consulting GmbH", /* 6394 */ "ProSaldo Software B.V.", /* 6395 */ "Absolute Website Solutions", /* 6396 */ "Nayna Networks, Inc.", /* 6397 */ "Lindner & Pelc Consult GmbH", /* 6398 */ "Intelligent Maintenance Systems Ltd", /* 6399 */ "Millenux GmbH", /* 6400 */ "JTI OF GEORGIA", /* 6401 */ "OPTEL Ges. für Lasertechnik und Elektronik mbH", /* 6402 */ "Universidad Blas Pascal", /* 6403 */ "ECRESO", /* 6404 */ "Activ Australia", /* 6405 */ "Neomar", /* 6406 */ "bit-Services GmbH", /* 6407 */ "Mikom GmbH", /* 6408 */ "Mondial Assistance Limited", /* 6409 */ "Zoneworx, Inc.", /* 6410 */ "Overland Storage, Inc.", /* 6411 */ "HiddenMind Technology", /* 6412 */ "I.S. Associates, Inc.", /* 6413 */ "Embry-Riddle University", /* 6414 */ "Caspian Networks, Inc.", /* 6415 */ "SolutionZ Pty Ltd (Australia)", /* 6416 */ "Victorian Automobile Chamber of Commerce", /* 6417 */ "The Templar Corporation", /* 6418 */ "Pro-bel Ltd", /* 6419 */ "IN-MX", /* 6420 */ "H M Customs & Excise", /* 6421 */ "BT", /* 6422 */ "ObjectSpace, Inc.", /* 6423 */ "Viawest Internet Services", /* 6424 */ "Branch Systems", /* 6425 */ "e-Appliance Corporation", /* 6426 */ "Locus Dialogue", /* 6427 */ "T-Online International AG", /* 6428 */ "ALTO", /* 6429 */ "Ericsson Consulting GmbH", /* 6430 */ "BroadSoft, Inc.", /* 6431 */ "Orblynx, Inc.", /* 6432 */ "Excel.Net, Inc.", /* 6433 */ "WebMD", /* 6434 */ "Holistix, Inc.", /* 6435 */ "Wapme Systems AG", /* 6436 */ "Kathrein Werke K.G.", /* 6437 */ "MKNET ADVIES", /* 6438 */ "NexTReT s.l.", /* 6439 */ "TradeCast, Ltd.", /* 6440 */ "i2 Technologies, Inc.", /* 6441 */ "TWCT dba Daughters and Dad", /* 6442 */ "Out of our minds.", /* 6443 */ "Gearhead Group", /* 6444 */ "Sportsplanet2000", /* 6445 */ "Gaton Technologies LTD", /* 6446 */ "Synaxia Networks", /* 6447 */ "DigiVision Tech.", /* 6448 */ "Comodo CA Ltd", /* 6449 */ "Idsec Limited", /* 6450 */ "Mystical Creations", /* 6451 */ "Advanced Network Solutions, Inc", /* 6452 */ "CORE COMMUNICATIONS CO., Ltd.", /* 6453 */ "Postel Services", /* 6454 */ "Technology Thesaurus Corp.", /* 6455 */ "NETdefence Co. Limited", /* 6456 */ "Eureka Soft", /* 6457 */ "GPr Sistemas Ltda", /* 6458 */ "Linfield College", /* 6459 */ "uclick", /* 6460 */ "Center for Internet Research", /* 6461 */ "freiheit.com", /* 6462 */ "VocalData, Inc", /* 6463 */ "Stevens Institute of Technology OIT", /* 6464 */ "Cacheon, Inc.", /* 6465 */ "The Devil You Say", /* 6466 */ "Land Of Linking", /* 6467 */ "Patent Off", /* 6468 */ "Karma Kahn", /* 6469 */ "We're no dummies", /* 6470 */ "Con Temporaries", /* 6471 */ "Antiballistic", /* 6472 */ "Halls Of Ivy", /* 6473 */ "Wiffenpoof", /* 6474 */ "Home Is The Hunter", /* 6475 */ "The Craft of Elves", /* 6476 */ "I Was Misinformed", /* 6477 */ "Shot To Shingles", /* 6478 */ "Right-hand Twist", /* 6479 */ "Solomon Tech. Corp.", /* 6480 */ "MAGISTRAL, Ltd.", /* 6481 */ "ICSynergy", /* 6482 */ "Captus Networks", /* 6483 */ "Campus Crusade for Christ, Inc.", /* 6484 */ "Spatial Technologies", /* 6485 */ "Alcatel-Lucent Enterprise", /* 6486 */ "YouSync", /* 6487 */ "TalentStorm Enterprises", /* 6488 */ "Siemens Cerberus", /* 6489 */ "DeTeMobil Deutsche Telekom MobilNet GmbH", /* 6490 */ "Cytek Media Systems, Inc.", /* 6491 */ "Phyve", /* 6492 */ "COMTRUST", /* 6493 */ "Kraft und Partner GmbH", /* 6494 */ "SeeDragon Software", /* 6495 */ "Cottons Car Superstore", /* 6496 */ "NetEye Solutions", /* 6497 */ "Maintenance One", /* 6498 */ "ekit.com Pty Ltd", /* 6499 */ "VA Linux Systems", /* 6500 */ "Macro 4", /* 6501 */ "refat", /* 6502 */ "NETGEM", /* 6503 */ "Navini Networks", /* 6504 */ "TARGUSinfo", /* 6505 */ "LiveWire Communications, Inc.", /* 6506 */ "OptiMight Communications Inc.", /* 6507 */ "Shanghai DigiVision Technology Co.,Ltd", /* 6508 */ "Antrim Studios and Software Cellar", /* 6509 */ "Pioneer Corporation", /* 6510 */ "TelCom Technology", /* 6511 */ "FamTek Professional Services, Inc.", /* 6512 */ "Whale Communications", /* 6513 */ "Innovative Systems, L.L.C.", /* 6514 */ "Zvolve Systems, Inc.", /* 6515 */ "Comprehensive Test Ban Treaty Organization", /* 6516 */ "FlowServer", /* 6517 */ "Systems Solutions of the Southern Tier, Inc.", /* 6518 */ "Sabre Inc./ Sabre BTS", /* 6519 */ "Dot Hill Systems", /* 6520 */ "ChainLink Technologies", /* 6521 */ "cv cryptovision GmbH", /* 6522 */ "Bilboko Trading", /* 6523 */ "Greenbytes GmbH", /* 6524 */ "Jasmine Networks, Inc.", /* 6525 */ "Windward Consulting Group", /* 6526 */ "Alcatel-Lucent", /* 6527 */ "Source One", /* 6528 */ "Bundesamt für Sicherheit in der Informationstechnik", /* 6529 */ "2N spol. s r.o.", /* 6530 */ "TeamWork Consulting", /* 6531 */ "Niobrara R&D Corp.", /* 6532 */ "FaceTime Communications", /* 6533 */ "hp", /* 6534 */ "TECORE, Inc.", /* 6535 */ "NetForensics.com", /* 6536 */ "Brown University", /* 6537 */ "Winford Engineering", /* 6538 */ "EdgeOn Systems, Inc.", /* 6539 */ "Alamo Personal Computers, Inc.", /* 6540 */ "Transindigo, Inc", /* 6541 */ "Slamdunk Networks", /* 6542 */ "AmBell", /* 6543 */ "Fivesight Technologies", /* 6544 */ "THINK iT", /* 6545 */ "ITOCHU Techno-Solutions Corporation", /* 6546 */ "Network Management Solutions, Inc.", /* 6547 */ "Wavelength Digital Limited", /* 6548 */ "Axxcelera Broadband Wireless", /* 6549 */ "weblicon technologies AG", /* 6550 */ "Hotline Communications Ltd.", /* 6551 */ "Virbus AG", /* 6552 */ "GHAKO FISHERIES COMPANY LIMITED", /* 6553 */ "Optima Technologies, Inc.", /* 6554 */ "DataFoundry.net, Inc.", /* 6555 */ "Sigma Networks", /* 6556 */ "dotRocket, Inc", /* 6557 */ "Security Technologies Inc.", /* 6558 */ "Usha Communications Technology", /* 6559 */ "TelEnergy H. GmbH", /* 6560 */ "P.S.K. AG", /* 6561 */ "Nexland Inc.", /* 6562 */ "TimeBridge Technologies", /* 6563 */ "Gradient Solutions", /* 6564 */ "Johns Hopkins Institutions", /* 6565 */ "Metropolitan Life Insurance", /* 6566 */ "Klimke Industry Consulting", /* 6567 */ "Promptu Systems Corporation", /* 6568 */ "INVENTEC CORPORATION", /* 6569 */ "ACOMZ NETWORKS Corp.", /* 6570 */ "Fusion In Tech co.,Ltd.", /* 6571 */ "NETLINKS CO.,LTD.", /* 6572 */ "PerVigil, Inc.", /* 6573 */ "Synology Inc.", /* 6574 */ "Marriott International, Inc.", /* 6575 */ "Privada, Inc.", /* 6576 */ "Indura Corporation", /* 6577 */ "RedWave Networks", /* 6578 */ "Maru Networks, Inc.", /* 6579 */ "OSS Systems", /* 6580 */ "Exército Brasileiro", /* 6581 */ "Sigma Services Sénégal", /* 6582 */ "Barone, Budge and Dominick", /* 6583 */ "Bundesrechenzentrum GmbH", /* 6584 */ "W-Phone Inc.", /* 6585 */ "GeoworksAdam", /* 6586 */ "Airvana Inc.", /* 6587 */ "tietoenator", /* 6588 */ "IFA Meß-, Regel- und Elektrotechnik GmbH & Co.", /* 6589 */ "Keipher Solutions", /* 6590 */ "Haansoft Inc.", /* 6591 */ "Darin Vision Co", /* 6592 */ "neoConsulting, LLC", /* 6593 */ "Shijin & Co", /* 6594 */ "SA Mart.com", /* 6595 */ "Julie Julie", /* 6596 */ "MessageHero, Inc.", /* 6597 */ "Cybertron Network Solutions", /* 6598 */ "Silver Bow Co.Ltd", /* 6599 */ "International Charities Dep. of Taihe Travel Agency,China", /* 6600 */ "IP Dynamics Inc.", /* 6601 */ "Sunrise Telecom Inc.", /* 6602 */ "Vitesse Semiconductors", /* 6603 */ "Tosky Management Consulting Co.ltd", /* 6604 */ "Euroclear Operations Centre", /* 6605 */ "Platypus Technology", /* 6606 */ "Radiant Networks Plc", /* 6607 */ "circuLAB", /* 6608 */ "Western New England College", /* 6609 */ "Aditya Systems", /* 6610 */ "SIGMA SERVICES SENEGAL", /* 6611 */ "Juniper Financial Corp.", /* 6612 */ "Millimetrix Broadband NetworksLtd.", /* 6613 */ "Telecom Technologies Inc.", /* 6614 */ "Clairvoyant Software", /* 6615 */ "Lexica, LLC", /* 6616 */ "MicroStrategy", /* 6617 */ "Quintum Technologies, Inc.", /* 6618 */ NULL, /* 6619 */ "Global Telemann System Inc.", /* 6620 */ "Department of Foreign Affairs and Trade (Australia)", /* 6621 */ "secondomillennio", /* 6622 */ "servizi2000", /* 6623 */ "Sauro Prosperi", /* 6624 */ "PVT, a.s.", /* 6625 */ "Tekotelecom S.p.A.", /* 6626 */ "Telematica International B.V.", /* 6627 */ "Juaben", /* 6628 */ "ulticom", /* 6629 */ "Accuris Ltd", /* 6630 */ "Bowling Green State University", /* 6631 */ "DST Controls", /* 6632 */ "Personal Genie, Inc.", /* 6633 */ "UUNET", /* 6634 */ "Cenus Technologies, Inc.", /* 6635 */ "Indiana District - LCMS", /* 6636 */ "Rainbow Computer Warehouse", /* 6637 */ "3Ware Inc", /* 6638 */ "hhl", /* 6639 */ "GMV Network, LLC", /* 6640 */ "Netco Systems Inc.", /* 6641 */ "scommtech", /* 6642 */ "IPR Systems Pty Ltd", /* 6643 */ "OzAuthors Pty Ltd", /* 6644 */ "gForce Systems", /* 6645 */ "Chevron", /* 6646 */ "Planet", /* 6647 */ "Intramon Ltd", /* 6648 */ "NewGrid Technology Inc.", /* 6649 */ "The Distribution Systems Research Institute", /* 6650 */ "FIREBONE", /* 6651 */ "ID-Karta", /* 6652 */ "Tyan Computer Corporation", /* 6653 */ "Chic Technology Corp.", /* 6654 */ "Agenetics Inc", /* 6655 */ "Cauris", /* 6656 */ "Courion Corporation", /* 6657 */ "Koshy's Computer Academy, Edathua", /* 6658 */ "Alisa", /* 6659 */ "keraladotcom", /* 6660 */ "Spike Broadband Systems, Inc.", /* 6661 */ "S.E.S.A. AG", /* 6662 */ "Janeva Interactive", /* 6663 */ "Precidia Technologies", /* 6664 */ "Atreus Systems Corp.", /* 6665 */ "innovaphone GmbH", /* 6666 */ "mediumrareJulian", /* 6667 */ "To Be Or Not", /* 6668 */ "Videotron ltee", /* 6669 */ "Intelligent Instrumentation", /* 6670 */ "Versonix", /* 6671 */ "Proscend Communications Inc.,", /* 6672 */ "Align Systems Pty Ltd", /* 6673 */ "Mercator", /* 6674 */ "News Interactive", /* 6675 */ "Science Dynamics Corporation", /* 6676 */ "ONELINE AG", /* 6677 */ "Hyperknowledge (Europe)", /* 6678 */ "Surgient Networks, Inc.", /* 6679 */ "SOUTHPAW", /* 6680 */ "Altea Communications Inc.", /* 6681 */ "CommsHouse Ltd", /* 6682 */ "AlphaTrust Corporation", /* 6683 */ "eOriginal Inc.", /* 6684 */ "INOVA Diagnostics, Inc.", /* 6685 */ "VeCommerce (NZ) Ltd.", /* 6686 */ "pAsia Inc.", /* 6687 */ "National Center for Software Technology,Ministry of InformationTechnology,Government of India", /* 6688 */ "Zolera Systems, Inc", /* 6689 */ "OmniCluster Technologies, Inc.", /* 6690 */ "UTEL", /* 6691 */ "Telenisus Corporation", /* 6692 */ "NetCertainty", /* 6693 */ "P.G.P. s.a.", /* 6694 */ "SAMS, Inc.", /* 6695 */ "Niagara Mohawk Power Corporation", /* 6696 */ "DOTCOM", /* 6697 */ "Micronet srl", /* 6698 */ "Vulcan Networks", /* 6699 */ "FinGO", /* 6700 */ "Creativ Network Technologies", /* 6701 */ "Entrust CygnaCom", /* 6702 */ "Cognitronics Corporation", /* 6703 */ "Vancouver Language Institute Ltd.", /* 6704 */ "Zygox, Inc.", /* 6705 */ "NOAA/PMEL/EPIC", /* 6706 */ "Rolf Buurke", /* 6707 */ "Handuru Telecom", /* 6708 */ "Scarlet Telecom BV", /* 6709 */ "South Birmingham College", /* 6710 */ "Connect One", /* 6711 */ "VOXTRONIC Technology", /* 6712 */ "EIZO", /* 6713 */ "Banco Santander Central Hispano", /* 6714 */ "HTT Consulting", /* 6715 */ "AMS Systems", /* 6716 */ "GiantLoop Network, Inc.", /* 6717 */ "Exfo Fiber Optic Test Equipment", /* 6718 */ "TransComm Technology System, Inc", /* 6719 */ "PT. Hariff DTE", /* 6720 */ "Lodbroker Pty Ltd", /* 6721 */ "comMATCH Ltd.", /* 6722 */ "Internet Names UK", /* 6723 */ "Cap Gemini Telecom France IPNS", /* 6724 */ "Data Interchange Plc", /* 6725 */ "CellPoint Systems", /* 6726 */ "WINIT s.a.", /* 6727 */ "Interlink Networks, Inc.", /* 6728 */ "Dolby Laboratories, Inc.", /* 6729 */ "Nextel Partners Inc.", /* 6730 */ "WIT Soundview", /* 6731 */ "Intercim Inc.", /* 6732 */ "CMD Technology", /* 6733 */ "WEGO, Inc", /* 6734 */ "Tenebrous", /* 6735 */ "Jinny Software Ltd", /* 6736 */ "New Era of Networks, Inc", /* 6737 */ "Riversman", /* 6738 */ "Spring Yellow", /* 6739 */ "Cal Poly State University", /* 6740 */ "Nulli Secundus Inc", /* 6741 */ "priceline.com Incorporated", /* 6742 */ "Sophicomm", /* 6743 */ "Dantron", /* 6744 */ "LASAT Networks A/S", /* 6745 */ "Aftek Infosys Ltd.", /* 6746 */ "TeraBurst Networks", /* 6747 */ "Up4grab. Inc", /* 6748 */ "Bosung Hi-Net Co., Ltd", /* 6749 */ "Gascom", /* 6750 */ "Dolphin Interconnect Solutions AS", /* 6751 */ "Axtronics Inc.", /* 6752 */ "SysControl AG", /* 6753 */ "EzGov", /* 6754 */ "Rush Presbyterian St. Lukes Medical Center", /* 6755 */ "Unixguy.org", /* 6756 */ "Grid", /* 6757 */ "SimplySay Inc.", /* 6758 */ "Allcharge", /* 6759 */ "Virginia Tech", /* 6760 */ "Axonn Wireless Solutions", /* 6761 */ "Cambridge Positioning Systems Limit", /* 6762 */ "Metakernel Network Laboratories", /* 6763 */ "Imagine Solutions", /* 6764 */ "ML Hightower, Inc.", /* 6765 */ "CPNI", /* 6766 */ "RLX Technologies, Inc.", /* 6767 */ "Pixelmetrix Corporation Pte", /* 6768 */ "Dynamic Imaging Corporation", /* 6769 */ "OpenCon Communication Systems", /* 6770 */ "CyberPath Inc.", /* 6771 */ "eBSure Inc.", /* 6772 */ "Engineering International Corporation", /* 6773 */ "University of Virginia", /* 6774 */ "Cablevision", /* 6775 */ "bmypc", /* 6776 */ "TriGem InfoComm", /* 6777 */ "AboCom Systems, Inc.", /* 6778 */ "CHL NETHERLANDS B.V.", /* 6779 */ "Linux Communications AS", /* 6780 */ "Vast", /* 6781 */ "Ciena", /* 6782 */ "Tidepoint", /* 6783 */ "JP Systems", /* 6784 */ "Delta Electronics Inc.", /* 6785 */ "Dreamworks SKG", /* 6786 */ "NetConnect", /* 6787 */ "Whitebird", /* 6788 */ "OCTOGON Software Development GmbH", /* 6789 */ "Finjan Software", /* 6790 */ "EXE Technologies, Inc.", /* 6791 */ "Active+ Software", /* 6792 */ "UTIasi", /* 6793 */ "Adhesive Software Incorporated", /* 6794 */ "Pocono Pet Sitters", /* 6795 */ "TekVision Communications", /* 6796 */ "ConfigureSoft, Inc.", /* 6797 */ "Marvell Hispania S.L.", /* 6798 */ "GlueCode, Inc.", /* 6799 */ "Express Rail Link sdn Bhd", /* 6800 */ "Gamma Technologies", /* 6801 */ "M Design Communications", /* 6802 */ "BCI (Basic Commerce and Industries, Inc.)", /* 6803 */ "Weinschel Corp", /* 6804 */ "PSA WORLD NET Inc.", /* 6805 */ "The Pennsylvania State University", /* 6806 */ "Eotvos Lorand University", /* 6807 */ "Buyers Laboratory Inc.", /* 6808 */ "Ontika Computersystems", /* 6809 */ "MUXCOM Inc.", /* 6810 */ "Nameflow", /* 6811 */ "Yoda Communications, Inc.", /* 6812 */ "Olympia College", /* 6813 */ "ItchyFeet Networks", /* 6814 */ "CyberSpacia Pty Ltd", /* 6815 */ "b4", /* 6816 */ "Metanate Ltd", /* 6817 */ "Tripwire, Inc.", /* 6818 */ "Musicfans, Inc.", /* 6819 */ "Menta Software", /* 6820 */ "TELECOM Lille1", /* 6821 */ "University of Cambridge, Card Office", /* 6822 */ "Distributed Object Technologies, Inc.", /* 6823 */ "List & Niemann", /* 6824 */ "iCue Systems, Inc.", /* 6825 */ "Dark Matter Network Technologies, Inc.", /* 6826 */ "Evertz Microsystems Ltd", /* 6827 */ "Caviness Software", /* 6828 */ "RAMiX Inc.", /* 6829 */ "onehottmin Inc.", /* 6830 */ "DSS Digital Security Service GmbH", /* 6831 */ "VCHEQ.com Pte Ltd", /* 6832 */ "Scarptor Network ABThomas Berghemmer or Martin Moreythomas.berghemmer&scarptor.se", /* 6833 */ "sbuck networks", /* 6834 */ "chello broadband austria", /* 6835 */ "Felleskjøpet Agri BA", /* 6836 */ "Solcom", /* 6837 */ "i.g.c.", /* 6838 */ "Accelight Networks", /* 6839 */ "Deutsches Elektronen-Synchrotron", /* 6840 */ "VYX", /* 6841 */ "Telect, Inc.", /* 6842 */ "Global Solution", /* 6843 */ "SAT Consulting ApS", /* 6844 */ "Micro Energetics Corp.", /* 6845 */ "Paulosoft", /* 6846 */ "Teleias, Inc", /* 6847 */ "Crossbeam Systems, Inc.", /* 6848 */ "Reddo Networks AB", /* 6849 */ "MCCT Inc.", /* 6850 */ "XOR Inc.", /* 6851 */ "University of Colorado at Boulder", /* 6852 */ "Television Systems Ltd", /* 6853 */ "Régie Des Transports De Marseille", /* 6854 */ "WNF Consulting, Inc.", /* 6855 */ "LiquidLight", /* 6856 */ "DigitalConvergence", /* 6857 */ "Fantasma Networks", /* 6858 */ "Actzero Inc", /* 6859 */ "ÔøÐÛÎÄ", /* 6860 */ "Druma Inc", /* 6861 */ "Wapinspain.com", /* 6862 */ "ZyTrax Communications, Inc.", /* 6863 */ "Harmania Multimedia Inc", /* 6864 */ "Elron Telesoft", /* 6865 */ "Lyonnaise Communication", /* 6866 */ "IPOptical, Inc.", /* 6867 */ "Georgetown University", /* 6868 */ "Steve Burton", /* 6869 */ "Core Software Technology", /* 6870 */ "CERT Coordination Center", /* 6871 */ "Help/Systems, Inc.", /* 6872 */ "bholdcompany", /* 6873 */ "Woodwind Communications Systems, Inc", /* 6874 */ "NewEarth Swedenborgian BBS", /* 6875 */ "VMware Inc.", /* 6876 */ "Evergreen Internet", /* 6877 */ "Black Box Corp.", /* 6878 */ "digiMine.com", /* 6879 */ NULL, /* 6880 */ "Kal", /* 6881 */ "Micro Electronics Inc", /* 6882 */ "Linux NetworX, Inc.", /* 6883 */ "boco", /* 6884 */ "Intelligent Telecommunications Inc.", /* 6885 */ "KPN", /* 6886 */ "IT-Conference", /* 6887 */ "Millenium Installer", /* 6888 */ "Avaya Communication", /* 6889 */ "Shell Services International", /* 6890 */ "Acepta.com", /* 6891 */ "Cnation", /* 6892 */ "TurboLinux, Inc.", /* 6893 */ "DataDirect Networks", /* 6894 */ "Ereo, Inc.", /* 6895 */ "Mahi Networks", /* 6896 */ "JDV", /* 6897 */ "Verance Corporation", /* 6898 */ "Nanyang Technological University", /* 6899 */ "Baltic Institute of Economics and Finance", /* 6900 */ "AETA.COM", /* 6901 */ "Plisch Gmbh & Co KG", /* 6902 */ "Visoft (Pty) Ltd", /* 6903 */ "IBM, Infrastructure Support Group", /* 6904 */ "Brocade Communication Systems, Inc.", /* 6905 */ "Asiana Communications", /* 6906 */ "Broad Telecom, S.A. (Btesa)", /* 6907 */ "Movaz Networks", /* 6908 */ "Network Security Technologies, Inc.", /* 6909 */ "Inquent Technologies", /* 6910 */ "AUCS Communications Services", /* 6911 */ "Morgan Stanley Dean Witter Online", /* 6912 */ "Bona Technology", /* 6913 */ "Timing Solutions Corporation", /* 6914 */ "Computable Functions Limited", /* 6915 */ "Norbert Klasen", /* 6916 */ "Alternative Advice", /* 6917 */ "Belle Systems A/S", /* 6918 */ "Cubenet s.r.l", /* 6919 */ "Think & Do Software, Inc.", /* 6920 */ "Morrison Industries", /* 6921 */ "Amino Communications Ltd", /* 6922 */ "Shutterfly", /* 6923 */ "Capital Internet, LLC", /* 6924 */ "IT Communications, Kennedy Space Center (KSC)", /* 6925 */ "Optical Access Inc.", /* 6926 */ "MAIL.COM", /* 6927 */ "Mobility Next Generation", /* 6928 */ "The Root Group", /* 6929 */ "Lycee Leonard de Vinci", /* 6930 */ "Interessengemeinschaft Software-Engineering", /* 6931 */ "Internet Content Register", /* 6932 */ "Reputy", /* 6933 */ "Corporation One of America, Inc.", /* 6934 */ "Arachne", /* 6935 */ "VICORSOFT CORPORATION", /* 6936 */ "NetReliance, Inc.", /* 6937 */ "Enigma Inc.", /* 6938 */ "Hemp.org", /* 6939 */ "Tufts University", /* 6940 */ "proflash cross-media AG", /* 6941 */ "James Cook University", /* 6942 */ "R-Alpha Ltd.", /* 6943 */ "REDSYS", /* 6944 */ "LAKE Communications", /* 6945 */ "Fouche Enterprises, LLC.", /* 6946 */ "Central Bank of Russia, Arkhangelsk", /* 6947 */ "Tumsan Oy", /* 6948 */ "Nextra BW CSP GmbH", /* 6949 */ "Aztec", /* 6950 */ "Freeler BV.", /* 6951 */ "iBiomatics LLC", /* 6952 */ "Air2Net AB", /* 6953 */ "Sema Group", /* 6954 */ "ComSol Kommunikationssysteme GmbH", /* 6955 */ "eTopware Labs", /* 6956 */ "Rapi10.net", /* 6957 */ "Kent State University", /* 6958 */ "bluestreak", /* 6959 */ "FELIX DANZIGER INTERNATIONAL KUNSTHANDEL", /* 6960 */ "tele.ring Telekom Service Gmbh", /* 6961 */ "The University of Sydney", /* 6962 */ "Andrews IT Engineering Ltd", /* 6963 */ "Soft Teleware Inc.", /* 6964 */ "RSBX", /* 6965 */ "The Bright Oceans Corporation", /* 6966 */ "Digismart", /* 6967 */ "Systek AS", /* 6968 */ "Copernicus Global Billing Services", /* 6969 */ "VCON Ltd.", /* 6970 */ "Ferimex IT spol. s r.o.", /* 6971 */ "Canbox", /* 6972 */ "Savatech Inc.", /* 6973 */ "EarthLink Inc.", /* 6974 */ "WaterCove Networks, Inc.", /* 6975 */ "HowStuffWorks.com, Inc", /* 6976 */ "Resilience Corporation", /* 6977 */ "JBruce.net", /* 6978 */ "KereniX", /* 6979 */ "MRC Project", /* 6980 */ "interQ, Inc.", /* 6981 */ "Erba Holding", /* 6982 */ "Sofaware Technologies", /* 6983 */ "Fovea, Inc.", /* 6984 */ "Jumpy Cat Systems, Inc.", /* 6985 */ "Kiodex, Inc.", /* 6986 */ "WRonline GbR", /* 6987 */ "University of Northern British Columbia", /* 6988 */ "Extel Communications Pty Ltd", /* 6989 */ "Redfern Broadband Networks", /* 6990 */ "N-Space Pty Ltd", /* 6991 */ "KnowNow, Inc", /* 6992 */ "VirtualNet", /* 6993 */ "The Midgard Project (Open Source)", /* 6994 */ "c-base e.V.", /* 6995 */ "WhatEverNet Computing", /* 6996 */ "Yale University", /* 6997 */ "Channelogics Incorporated", /* 6998 */ "University of Indianapolis", /* 6999 */ "NET-volution srl", /* 7000 */ "Big Net, Inc.", /* 7001 */ "Sebastian Crespo", /* 7002 */ "CISCO-MASBU", /* 7003 */ "Metodo Srl", /* 7004 */ "Kagoor Networks", /* 7005 */ "eyeo.com", /* 7006 */ "Guangzhou Thinker Communications Technology Co., Ltd.\"", /* 7007 */ "Discordian Alliance For Teaching", /* 7008 */ "Chemtex Engineering of India Ltd", /* 7009 */ "Oranje Consulting, Inc.", /* 7010 */ "Prism Microsystems, Inc.", /* 7011 */ "Edisontel S.p.A.", /* 7012 */ "ByteSphere LLC", /* 7013 */ "Adexa Inc.", /* 7014 */ "Vignette Corporation", /* 7015 */ "Seneca Networks", /* 7016 */ "Adari TeleComp Inc", /* 7017 */ "PT Multimedia", /* 7018 */ "Polaris Networks, Inc.", /* 7019 */ "Saecos Corporation", /* 7020 */ "SysNet S.n.c.", /* 7021 */ "MRZ AG", /* 7022 */ "The Direct Connection Ltd", /* 7023 */ "VHB Technologies, Inc.", /* 7024 */ "Double D Investments", /* 7025 */ "Sonera SmartTrust", /* 7026 */ "Onix Microsystems Inc", /* 7027 */ "Alloptic, Inc.", /* 7028 */ "CUBIweb, LLC", /* 7029 */ "Ethernet, Solucoes Informaticas, lda", /* 7030 */ "McAfee, Inc.", /* 7031 */ "Chartered Semiconductor Manufacturing", /* 7032 */ "Matías Software Group", /* 7033 */ "inyourwake", /* 7034 */ "VTT Electronics", /* 7035 */ "MBDyn", /* 7036 */ "Ubris", /* 7037 */ "Tron Network Solutions", /* 7038 */ "bison GmbH", /* 7039 */ "DataLinx Inc", /* 7040 */ "Integra", /* 7041 */ "Permanent Vacations", /* 7042 */ "Apt Computer Systems Limited", /* 7043 */ "Primal", /* 7044 */ "TBA Communications", /* 7045 */ "Tom's NET", /* 7046 */ "Flux Productions", /* 7047 */ "Pico Communications, Inc.", /* 7048 */ "DataNet Development Group, Inc.", /* 7049 */ "Kazan State University", /* 7050 */ "Epicom S.A.", /* 7051 */ "IKOM - Ingenieurbüro", /* 7052 */ "Videon CableSystems Alberta Inc.", /* 7053 */ "Mazu Networks, Inc.", /* 7054 */ "Cox Communications, Inc.", /* 7055 */ "Senterprise Inc.", /* 7056 */ "SuSE Linux AG", /* 7057 */ "BB4 Technologies Inc", /* 7058 */ "Complete Business Solutions - Global Health", /* 7059 */ "Naikel Software", /* 7060 */ "Automated Logic Corporation", /* 7061 */ "Oasis Telecommunications, Inc.", /* 7062 */ "Australian Defence Force Academy", /* 7063 */ "UTStarcom (China) Co., Ltd Shenzhen Branch", /* 7064 */ "Shimin Denshi Jouhou Mou", /* 7065 */ "Dr. Srinivas", /* 7066 */ "TELCO TECH GmbH", /* 7067 */ "CryptoPRO", /* 7068 */ "SFI Open Source Services", /* 7069 */ "Narad Networks", /* 7070 */ "Tele-Info-System", /* 7071 */ "Ehrhart Jewelers", /* 7072 */ "r00tkit.com", /* 7073 */ "TheMagicProgrammer", /* 7074 */ "Lothar Maronn", /* 7075 */ "Australian Online Solutions", /* 7076 */ "Desarrollos Digitales", /* 7077 */ "True North Communications", /* 7078 */ "Megisto Systems, Inc.", /* 7079 */ "xeli.net", /* 7080 */ "Maaslandse Unix & Linux Laboratorium (MULL)", /* 7081 */ "DAIDEN CO., Ltd.", /* 7082 */ "Applied Generics Ltd", /* 7083 */ "Friends Provident", /* 7084 */ "Cybercomm BV", /* 7085 */ "GTONG Shenzhen Ltd.", /* 7086 */ "Selis Networks Inc.", /* 7087 */ "Network Systems", /* 7088 */ "Centrum Arbeidsverhoudingen", /* 7089 */ "El Bit Salvaje", /* 7090 */ "CREN", /* 7091 */ "ScienceXchange", /* 7092 */ "Ericsson - Geobility", /* 7093 */ "Wachovia Trust", /* 7094 */ "Pert", /* 7095 */ "JSEIC", /* 7096 */ "LeatherXchange, S.A.", /* 7097 */ "Edison Mission Energy", /* 7098 */ "Ripeco Ltd", /* 7099 */ "Killik & Co.", /* 7100 */ "CO3i", /* 7101 */ "IDEALX", /* 7102 */ "SaltFire, Inc", /* 7103 */ "Supervertical Sistemas", /* 7104 */ "CANTV", /* 7105 */ "Teleport Corp", /* 7106 */ "Geocast Network Systems", /* 7107 */ "Urscheler Software", /* 7108 */ "City University of Hongkong", /* 7109 */ "Kaashyap Radiant System ltd", /* 7110 */ "Sunamerican Communication Technology Inc.", /* 7111 */ "U.S. Department of Commerce", /* 7112 */ "YottaYotta", /* 7113 */ "Universidad de Navarra", /* 7114 */ "book2eat.com limited", /* 7115 */ "TechTrade International Management AB", /* 7116 */ "Invertix, Inc", /* 7117 */ "NetContinuum, Inc", /* 7118 */ "OPNET Technologies, Inc.", /* 7119 */ "Sentry Telecom Systems Inc.", /* 7120 */ "Comunicaciones Netglobalis", /* 7121 */ "Lusars.net", /* 7122 */ "nSOF Parallel Software Ltd.", /* 7123 */ "Stand-by", /* 7124 */ "Digital Creations", /* 7125 */ "Positron Public Safety Systems Inc.", /* 7126 */ "Nadeem Hasan", /* 7127 */ "Worcester Polytechnic Institute", /* 7128 */ "Lancaster University", /* 7129 */ "KiddiePot.com", /* 7130 */ "Orient Telecom", /* 7131 */ "ELANsat TECHNOLOGIES Inc.", /* 7132 */ "Corenix System Inc.", /* 7133 */ "Prosolve", /* 7134 */ "Comité Réseau des Universités", /* 7135 */ "SysNet", /* 7136 */ "Tunisie Telecom", /* 7137 */ "Allaire Corporation", /* 7138 */ "EchoStar Data Networks", /* 7139 */ "INPG, Institut National Polytechnique de Grenoble", /* 7140 */ "Freesoft", /* 7141 */ "Pingtel Corp.", /* 7142 */ "Entrust Technologies, Inc.", /* 7143 */ "FaceTime Communications, Inc.", /* 7144 */ "eve.com", /* 7145 */ "Zeus Technology Ltd", /* 7146 */ "Imperial Technology, Inc.", /* 7147 */ "Unitree Software", /* 7148 */ "Arcot Systems, Inc.", /* 7149 */ "INITECH, Co.,Ltd.", /* 7150 */ "r pdeshpande", /* 7151 */ "CAPE Technologies Ltd.,", /* 7152 */ "Foertsch EDV Beratung", /* 7153 */ "Intelligent Platform Management Interface forum", /* 7154 */ "neohaven.net", /* 7155 */ "Princeton Networks", /* 7156 */ "SC Dart IMPEX SRL", /* 7157 */ "1 Global City.com, Inc.", /* 7158 */ "Allianz AG", /* 7159 */ "Granada Learning", /* 7160 */ "Network Solutions, Inc.", /* 7161 */ "Delancey Management and Consulting", /* 7162 */ "Fiorano Software, Inc.", /* 7163 */ "SchiZo Information Network", /* 7164 */ "SAMBA Team", /* 7165 */ "Peters Securities Co, L.P.", /* 7166 */ "WinterTek, LLC", /* 7167 */ "Eurosoft Sas", /* 7168 */ "Engage, Inc.", /* 7169 */ "Centell Telecommunication Company", /* 7170 */ "Europesave S.A.", /* 7171 */ "SPARKnet S.A.", /* 7172 */ "Jiangsu University of Science and Technology", /* 7173 */ "Tonic Software, Inc.", /* 7174 */ "TSP Lab(Telecommunication and Signal Processing Lab.) Peter", /* 7175 */ "orangefood.com", /* 7176 */ "IPITEK", /* 7177 */ "SANJOSEDEOCOA.COM.DO", /* 7178 */ "ARIO Data Networks", /* 7179 */ "Talarian Corporation", /* 7180 */ "Trendium, Inc.", /* 7181 */ "ypass.net", /* 7182 */ "Springfield Public Schools", /* 7183 */ NULL, /* 7184 */ "Latitude Communications", /* 7185 */ "BayPackets Inc", /* 7186 */ "Netsystems, Inc.", /* 7187 */ "Curtin University of Technology", /* 7188 */ "EMS-Global", /* 7189 */ "Legato Systems India", /* 7190 */ "Gebrueder Weiss GmbH", /* 7191 */ "ID-PRO Aktiengesellschaft", /* 7192 */ "Bourse Connect", /* 7193 */ "Stevens Gagnon Services Info-Techniques", /* 7194 */ "Iquilibrium, Inc.", /* 7195 */ "Imagine Software", /* 7196 */ "Intertech", /* 7197 */ "CeLight", /* 7198 */ "2Bridge Software", /* 7199 */ "Forebrick International", /* 7200 */ "Druker Consulting", /* 7201 */ "Seastem", /* 7202 */ "Technology Builders, Inc.", /* 7203 */ "PerformanceIT, Inc.", /* 7204 */ "CoreTech Consulting Group, Inc.", /* 7205 */ "Real Media, Inc", /* 7206 */ "DENON DENTAL", /* 7207 */ "AFCON Software and Electronics Ltd.", /* 7208 */ "Societe Bryarde de Travaux Publics", /* 7209 */ "WorkSpot Inc", /* 7210 */ "Raiffeisen Schweiz", /* 7211 */ "Raiffeisen Schweiz", /* 7212 */ "Datria Systems", /* 7213 */ "Virginia-Meryland Regional College of Veterinary Medicine", /* 7214 */ "ABN AMRO", /* 7215 */ "Institut National de la Recherche Agronomique", /* 7216 */ "The University of Memphis", /* 7217 */ "HBESoftware Inc.", /* 7218 */ "Firedrop Inc", /* 7219 */ "Shanghai Optical Networking Technology Co. Ltd.", /* 7220 */ "Handlink Technologies Inc.", /* 7221 */ "TIScover", /* 7222 */ "ofehr.net", /* 7223 */ "Netarchitects SA", /* 7224 */ "Spacechecker nv", /* 7225 */ "Micro F/X", /* 7226 */ "Centre Informatique National de l'Enseignement Superieur", /* 7227 */ "The Web Foundry Limited", /* 7228 */ "Vogeler Enterprise Architectures", /* 7229 */ "Eastern Michigan University", /* 7230 */ "MidStream Technologies", /* 7231 */ "VR1 Entertainment", /* 7232 */ "SierraCities.com", /* 7233 */ "KORE", /* 7234 */ "eRadlink", /* 7235 */ "SIMM-Comm", /* 7236 */ "Aaronsen Group, Ltd.", /* 7237 */ "OM Technology", /* 7238 */ "LEGRAND", /* 7239 */ "Princeton Networks Inc", /* 7240 */ "Inter.net", /* 7241 */ "QwicNet, Inc.", /* 7242 */ "ZIVO Wellington", /* 7243 */ "Quanta Computer Inc.", /* 7244 */ "Northern Districts In-Line Hockey Club", /* 7245 */ "Project X Consulting Ltd", /* 7246 */ "Nexsan Technologies, Ltd.", /* 7247 */ "HyperTrust", /* 7248 */ "Manage-IT", /* 7249 */ "Viewgraphics", /* 7250 */ "SPC solutions s.r.o.", /* 7251 */ "Institut Mondor de Médecine Moléculaire", /* 7252 */ "StreamCache", /* 7253 */ "Intronix Corporation", /* 7254 */ "PointOne Telecommunications, Inc.", /* 7255 */ "Geyser Networks, Inc.", /* 7256 */ "Mar-Net Ltd.", /* 7257 */ "Centre national de Documentation Pedagogique", /* 7258 */ "OULLIM Information Technology, Inc.", /* 7259 */ "Opthos Inc.", /* 7260 */ "InfoSpace", /* 7261 */ "DragonWave", /* 7262 */ "Litt Productions Ltd.", /* 7263 */ NULL, /* 7264 */ "Interactive Portal, Inc.", /* 7265 */ "Softfront", /* 7266 */ "BroadLink Technologies, Inc.", /* 7267 */ "Axiavoice Software", /* 7268 */ "University of Klagenfurt", /* 7269 */ "Supanet Limited", /* 7270 */ "TuxWarp", /* 7271 */ "RedSiren Technologies Inc.", /* 7272 */ "When Pigs Fly Club", /* 7273 */ "CITY OF WILLCOX", /* 7274 */ "Amsterdamse Hogeschool voor de Kunsten", /* 7275 */ "Parabon Computation, Inc.", /* 7276 */ "PolyServe,Inc.", /* 7277 */ "Digital Archway", /* 7278 */ "Zembu Labs", /* 7279 */ "Vodafone Network Pty Ltd Australia", /* 7280 */ "Socix Business Internet Software Co., Ltd", /* 7281 */ "Superchannel ApS", /* 7282 */ "Defence Science & Technology Agency", /* 7283 */ "Asita Technologies", /* 7284 */ "Hutchison Ports UK Limited", /* 7285 */ "betanet", /* 7286 */ "Premier Programming Ltd", /* 7287 */ "ActiveSky Inc.", /* 7288 */ "Visual Analysis AG", /* 7289 */ "Samjung Data Service LTD.,CO.", /* 7290 */ "Lecointe Ludovic", /* 7291 */ "Krone Multimedia Ges.m.b.H Co KG", /* 7292 */ "POWERCOM CO., Ltd.", /* 7293 */ "Société Générale de Téléinformatique", /* 7294 */ "plan b. solutions GmbH", /* 7295 */ "eFORCE, Inc.- New York", /* 7296 */ "Adventist Care Centers", /* 7297 */ "Yuma Educational Consortium", /* 7298 */ "Valence Semiconductor, Inc.", /* 7299 */ "Bangladesh Consultants Ltd.", /* 7300 */ "Kinzebach", /* 7301 */ "Medsys", /* 7302 */ "Byg Informatique", /* 7303 */ "WWW. DEPARTMENTSTORE", /* 7304 */ "esurvey", /* 7305 */ "Boku, Inc.", /* 7306 */ "PonyExpress.net", /* 7307 */ "Zaantek, LLC", /* 7308 */ "Argus Technologies", /* 7309 */ "EnStor", /* 7310 */ "T-Systems Enterprise Services GmbH", /* 7311 */ "BARCO Control Rooms", /* 7312 */ "1stWAVE", /* 7313 */ "CodeWeavers, Inc", /* 7314 */ "CAB Software", /* 7315 */ "Bridge Solutions AG", /* 7316 */ "Mobile Reach Technologies, Inc.", /* 7317 */ "Sinia Corporation", /* 7318 */ "Universite de Toulon et du Var", /* 7319 */ "Ivron Systems Ltd", /* 7320 */ "connext", /* 7321 */ "Tiburon Networks, Inc", /* 7322 */ "Voicecom", /* 7323 */ "Chambre Syndicale des Banques Populaires", /* 7324 */ "Redeye Telecommunications", /* 7325 */ "MCI", /* 7326 */ "WaveSmith Networks", /* 7327 */ "MatrixOne, Inc.", /* 7328 */ "Virtual Learn Inc", /* 7329 */ "Bundesanstalt fuer Wasserbau", /* 7330 */ "DDS Projects BV", /* 7331 */ "DiviTech A/S", /* 7332 */ "E-Cottage Industries", /* 7333 */ "The San Joaquin Valley Science Collective", /* 7334 */ "eXperts-MD", /* 7335 */ "6WIND", /* 7336 */ "Lipro AG", /* 7337 */ "Paramhamsa Tech", /* 7338 */ "GeneralSearch.com", /* 7339 */ "Northwestern University", /* 7340 */ "University of Alabama at Birmingham", /* 7341 */ "Omnitron Systems Technology", /* 7342 */ "BroadConnex Networks, Inc.", /* 7343 */ "Jedai Broadband Networks", /* 7344 */ "Learnsoft Corporation", /* 7345 */ "Uni-C", /* 7346 */ "Point Reyes Networks, Inc.", /* 7347 */ "Torren Software Company", /* 7348 */ "Hangzhou Torren Software Company", /* 7349 */ "Belkamneft", /* 7350 */ "TeleDanmark Development", /* 7351 */ "Gilat Satellite Networks", /* 7352 */ "Datel Defence Limited", /* 7353 */ "Vesper S.A.", /* 7354 */ "Hass Asscoiates", /* 7355 */ "Gateway to the Web", /* 7356 */ "scroner.com", /* 7357 */ "POV Corp.", /* 7358 */ "SteelEye Technology", /* 7359 */ "Telecom Personal", /* 7360 */ "Certificado Digital S.A.", /* 7361 */ "Department Land, Air and Water Resources,University of California,Davis", /* 7362 */ "Prominence Networks Inc.", /* 7363 */ "IMS Health", /* 7364 */ "Easily Ltd", /* 7365 */ "MarketTouch", /* 7366 */ "DrayTek Corporation", /* 7367 */ "FalconStor, Inc.", /* 7368 */ "Suncom Communications", /* 7369 */ "Cbeyond Communications", /* 7370 */ "INSERM", /* 7371 */ "Cratos Networks, Inc", /* 7372 */ "Narad Networks Inc.", /* 7373 */ "C&D Micro Solutions", /* 7374 */ "iSOFT Plc", /* 7375 */ "Magenta Sites", /* 7376 */ "Ubiquity Software Corporation", /* 7377 */ "FireSummit", /* 7378 */ "Soliton Technologies CO.,", /* 7379 */ "Shore Corporation", /* 7380 */ "OWL-Online GmbH & Co. KG", /* 7381 */ "JustIT Sdn. Bhd.", /* 7382 */ "LIBERTECH", /* 7383 */ "CryptoTech", /* 7384 */ "Celox Networks Inc.", /* 7385 */ "Cake Farm", /* 7386 */ "Canon Information Systems Research Australia", /* 7387 */ "Lune Networks", /* 7388 */ "VDSL Systems Oy", /* 7389 */ "Grisoft", /* 7390 */ "Institut National des Telecommunications (INT)", /* 7391 */ "Telispark", /* 7392 */ "Oasys Telecom, Inc.", /* 7393 */ "CosmoCom, Inc.", /* 7394 */ "Beeline Networks, Inc.", /* 7395 */ "OLYMPO controls Ltd.", /* 7396 */ "OnePage, inc", /* 7397 */ "Corporation 124", /* 7398 */ "Data Systems West", /* 7399 */ "EHI-INSM", /* 7400 */ "EkotaCentral", /* 7401 */ "Vigor Soft Private Limited", /* 7402 */ "Biomed Translations Ltd.", /* 7403 */ "D.J. Williams Editorial Ltd.David", /* 7404 */ "IPS d.o.o.", /* 7405 */ "EFS : Etablisssement Francais du Sang", /* 7406 */ "Observatoire de Besancon", /* 7407 */ "Kunskapstv i Sverige AB", /* 7408 */ "Jan Niehusmann", /* 7409 */ "Telekurs Financial", /* 7410 */ "Finix", /* 7411 */ "Angstrom Microsystems", /* 7412 */ "Computer Service Depot", /* 7413 */ "Muffett & Co", /* 7414 */ "Berlin-Brandenburgische Akademie der Wissenschaften", /* 7415 */ "Software Advanced Technology Lab", /* 7416 */ "Cornell University", /* 7417 */ "Procket Networks", /* 7418 */ "Dai hoc su pham ky thuat", /* 7419 */ "Taylor Company", /* 7420 */ "Milcom Systems Corporation", /* 7421 */ "Currenex", /* 7422 */ "MedPlus, Inc.", /* 7423 */ "Infosec Technologies Co., Ltd.", /* 7424 */ "Company of the Far Countries, Ltd.", /* 7425 */ "NeST Information Technologies", /* 7426 */ "Yokogawa Electric Corporation", /* 7427 */ "PowerDsine", /* 7428 */ "BroadWeb Corporation", /* 7429 */ "mediascape communications AG", /* 7430 */ "Altiva Solutions", /* 7431 */ "Excentis", /* 7432 */ "SITTI spa", /* 7433 */ "Planetasia Ltd", /* 7434 */ "T.K COMPANY", /* 7435 */ "Oxir Internet Solutions", /* 7436 */ "Siemens ICN Italy", /* 7437 */ "SAFE. Inc", /* 7438 */ "AppStream, Inc.", /* 7439 */ "Omnitech Computer Corp", /* 7440 */ "CipherTrust, Inc.", /* 7441 */ "Idaho National Engineering and Environmental Laboratory", /* 7442 */ "EVEREX COMMUNICATION", /* 7443 */ "Imagine Networks", /* 7444 */ "Javelina Software", /* 7445 */ "Institute of Leadership and Management", /* 7446 */ "Signal Technology INC", /* 7447 */ "Advanced Training & Consulting Services, Inc.", /* 7448 */ "WHAM COMPUTER", /* 7449 */ "Framfab", /* 7450 */ "nSYS Technologies Co., Ltd", /* 7451 */ "Guangzhou Gaoke Communication Equipment Co., Ltd", /* 7452 */ "Turtlefoot International", /* 7453 */ "OKsystem Ltd.", /* 7454 */ "dev/consulting GmbH", /* 7455 */ "Virtual Net", /* 7456 */ "ZAO EMAX", /* 7457 */ "Clemens Benden", /* 7458 */ "memIQ", /* 7459 */ "XS4ALL Internet B.V.", /* 7460 */ "Page One AG", /* 7461 */ "Nordnorsk helsenett", /* 7462 */ "white.cell,inc", /* 7463 */ "ECMWF (European Centre for Medium-Range Weather Forecast)", /* 7464 */ "WISI", /* 7465 */ "CLI GmbH", /* 7466 */ "TTi Systems", /* 7467 */ "Mixbaal", /* 7468 */ "VoiceGenie Technologies", /* 7469 */ "Princeton Financial Systems", /* 7470 */ "Discreet Communications Group", /* 7471 */ "MShow.com", /* 7472 */ "easyplanet Corp.", /* 7473 */ "Inabled Online", /* 7474 */ "Shanghai Bell Company Ltd.", /* 7475 */ "Departamento General de Irrigacion", /* 7476 */ "Unk SA - Argentina", /* 7477 */ "NetCraft Sdn Bhd", /* 7478 */ "Triad Development Group NA, LLC", /* 7479 */ "@MySpend.Com", /* 7480 */ "Talon", /* 7481 */ "Widax Corporation", /* 7482 */ "Alcatel-Lucent", /* 7483 */ "Teleias Inc.", /* 7484 */ "SPS, Inc.", /* 7485 */ "Embassy Systems, Ltda.", /* 7486 */ "MEISolutions.com, Inc.", /* 7487 */ "Infinitec Networks", /* 7488 */ "e-HealthSign", /* 7489 */ "TotalWisdom Inc.", /* 7490 */ "gnumonks.org", /* 7491 */ "Kommunikationsnetz Franken e.V.", /* 7492 */ "ldap-abook", /* 7493 */ "Rovor Technologies", /* 7494 */ "Advanced Web Solutions, Inc", /* 7495 */ "JB-Holding b.v.", /* 7496 */ "Magnolia Broadband", /* 7497 */ "Gorski.net", /* 7498 */ "Pacific Century CyberWorks - Hongkong Telecom", /* 7499 */ "IICS", /* 7500 */ "BKtel communications GmbH (Systems)", /* 7501 */ "African Medical Imaging", /* 7502 */ "Henkels and McCoy", /* 7503 */ "AerSoft Ltd", /* 7504 */ "Calista Ltd.", /* 7505 */ "Scoreline Technologies", /* 7506 */ "WayneWare", /* 7507 */ "Fuji Electric Co.,Ltd.", /* 7508 */ "Storability, Inc.", /* 7509 */ "Luxxon Corporation", /* 7510 */ "wdt", /* 7511 */ "NetEnS Corporation", /* 7512 */ "Elimpex - Medizintechnik GesmbH.", /* 7513 */ "St Helens And Knowsley Hospitals NHS Trust", /* 7514 */ "P. Lancier", /* 7515 */ "Andy Stubbs", /* 7516 */ "Acxsys Corporation", /* 7517 */ "Chicago Mercantile Exchange", /* 7518 */ "RateIntegration, Inc.", /* 7519 */ "Harris Corporation", /* 7520 */ "Logicalis Australia Pty Ltd", /* 7521 */ "Brains Corp", /* 7522 */ "AccessNet", /* 7523 */ "RapidSolution Software GmbH", /* 7524 */ "eCal Corporation", /* 7525 */ "snom technology AG", /* 7526 */ "Quest Software", /* 7527 */ "Metabox Inc", /* 7528 */ "Netarx, Inc.", /* 7529 */ "OptXCon Inc.", /* 7530 */ "RapidWAN", /* 7531 */ "Munat, Inc.", /* 7532 */ "HONDA ELECTRON CO.,LTD", /* 7533 */ "Universita' degli Studi di Genova", /* 7534 */ "CapCLEAR Limited", /* 7535 */ "H+H Zentrum f. Rechnerkommunikation GmbH", /* 7536 */ "e2 Communications", /* 7537 */ "Veriprise Wireless Company", /* 7538 */ "QUACK.COM", /* 7539 */ "ISPsoft", /* 7540 */ "iBuilding.com", /* 7541 */ "Mount Allison University", /* 7542 */ "VisionShop", /* 7543 */ "Wirelink Co., Ltd.", /* 7544 */ "QoSBA Systems Co., Ltd.", /* 7545 */ "AXXESSIT ASA", /* 7546 */ "CSIC/RedIRIS", /* 7547 */ "Netcentric Systems Ltd.", /* 7548 */ "DataCenterDirect.com, Inc.", /* 7549 */ "Delta Data Software", /* 7550 */ "Enatel", /* 7551 */ "Infra Valley", /* 7552 */ "Tampere University of Technology", /* 7553 */ "Zlooper Media Perkasa", /* 7554 */ "Institution Saint-Joseph", /* 7555 */ "Movilogic S.A.", /* 7556 */ "Echomine", /* 7557 */ "National Air Traffic Services Ltd", /* 7558 */ "Egenera, Inc", /* 7559 */ "Daisy Group", /* 7560 */ "Askoo SA", /* 7561 */ "ICPSR (Inter-university Consortium for Political & Social Research)", /* 7562 */ "OneSpot, Inc.", /* 7563 */ "Clickarrray Networks, Inc.", /* 7564 */ "USGS South Florida Information Access Project", /* 7565 */ "CodeStream Technologies Corporation", /* 7566 */ "Portera Systems", /* 7567 */ "Ircam", /* 7568 */ "Convedia Corporation", /* 7569 */ "Brience, Inc.", /* 7570 */ "SAF tehnika", /* 7571 */ "Quest Software", /* 7572 */ "NBC Internet", /* 7573 */ "Torque Systems, Inc", /* 7574 */ "Maharashtra Institute of Technology, Pune", /* 7575 */ "GEA IT Services GmbH", /* 7576 */ "University Of Strathclyde", /* 7577 */ "Energis Deutschland", /* 7578 */ "University of Freiburg", /* 7579 */ "AnIX Group Limited", /* 7580 */ "Advent Networks, Inc.", /* 7581 */ "E-Z Data, Inc.", /* 7582 */ "The Eleven", /* 7583 */ "Intertrust Technologies Corporation", /* 7584 */ "Genius Software Ltda", /* 7585 */ "Parametric Technology Corporation", /* 7586 */ "World Digitel Corporation", /* 7587 */ "WIS COMMUNICATION CO. LTD", /* 7588 */ "MemlinkEyal", /* 7589 */ "bodachina", /* 7590 */ "Divisa Informática y Telecomunicaciones S.A.", /* 7591 */ "Swedish Institute of Space Physics", /* 7592 */ "University of Cambridge, Clinical and Biomedical Computing Unit", /* 7593 */ "Citadel Investment Group", /* 7594 */ "RATIO Entwicklungen GmbH", /* 7595 */ "Trellis Photonics", /* 7596 */ "NOVA LJUBLJANSKA BANKA", /* 7597 */ "KTSI", /* 7598 */ "Rebel.com, Inc.", /* 7599 */ "eazel", /* 7600 */ "Trinity College", /* 7601 */ "Covers.de", /* 7602 */ "Kingfisher ICT-Services", /* 7603 */ "MSE-iT", /* 7604 */ "e-point S.A", /* 7605 */ "The University of Alabama in Huntsville", /* 7606 */ "AppGate, Inc.", /* 7607 */ "Celion Networks, Inc.", /* 7608 */ "SpinState", /* 7609 */ "Something 4 Ltd", /* 7610 */ "Federal Reserve System", /* 7611 */ "Digi-Data Corp", /* 7612 */ "Panther Software, Inc.", /* 7613 */ "Isovia", /* 7614 */ "Universitat de Girona", /* 7615 */ "STMICROELECTRONICS", /* 7616 */ "Stendahls.net AB", /* 7617 */ "Adomo, Inc.", /* 7618 */ "Amon Technologies", /* 7619 */ "France Teaser", /* 7620 */ "DISH Network L.L.C.", /* 7621 */ "Mesa Systems International", /* 7622 */ "DXO Telecom Co., Ltd.", /* 7623 */ "akal systems", /* 7624 */ "ComCon GmbH", /* 7625 */ "University of Osnabrueck", /* 7626 */ "TeleBroad Networks", /* 7627 */ "Reed-Matthews, Inc.", /* 7628 */ "4unet", /* 7629 */ "Tioga Technologies", /* 7630 */ "INTERFACE CONCEPT", /* 7631 */ "GNS", /* 7632 */ "City University", /* 7633 */ "Bungee Communications", /* 7634 */ "THOMSON multimedia R&D France", /* 7635 */ "Laponia Veiculos", /* 7636 */ "JPM Consulting", /* 7637 */ "Carrier1", /* 7638 */ "Netverk S.A.", /* 7639 */ "Quantum Corp.", /* 7640 */ "Astronomical Society of Edinburgh", /* 7641 */ "SpiderTech Software Pvt. Ltd", /* 7642 */ "National Chung Cheng University", /* 7643 */ "EK Großeinkauf eG", /* 7644 */ "NetXL", /* 7645 */ "Exemus Ltd", /* 7646 */ "Oregan Networks Ltd", /* 7647 */ "Nationwide Mutual Insurance Company", /* 7648 */ "EverFile, Inc.", /* 7649 */ "Leibniz-Rechenzentrum", /* 7650 */ "UniSecurity", /* 7651 */ "DataCore Software Corporation", /* 7652 */ "Dashbit Incorporated", /* 7653 */ "SnoNet", /* 7654 */ "Sean Kelly, Independent Consultant", /* 7655 */ "Bertrandt AG", /* 7656 */ "DISAT SISTEMAS TELECOMUNICACIÓN", /* 7657 */ "Webonomics GmbH", /* 7658 */ "UESTC", /* 7659 */ "Okiok Data", /* 7660 */ "HumanScan GmbH", /* 7661 */ "SOGETEK", /* 7662 */ "Taral Networks Inc.", /* 7663 */ "mezzoNET Easy Technologie S.L.", /* 7664 */ "INTRIA-HP Corp", /* 7665 */ "Provenco Group Ltd", /* 7666 */ "Banque Nationale du Canada", /* 7667 */ "Praeter Technologies, Inc.", /* 7668 */ "Network Photonics, Inc.", /* 7669 */ "Viator Incorporated", /* 7670 */ "Invertix Corporation", /* 7671 */ "Fujitsu NNC Ltd./ PBN", /* 7672 */ "Fusion Communications Corp.", /* 7673 */ "Northern Principle Limited", /* 7674 */ "SPAR Handels AG", /* 7675 */ "Strawberry Software Limited", /* 7676 */ "Lynx Photonic Networks Inc.", /* 7677 */ "XYRIUS", /* 7678 */ "WiNag.com", /* 7679 */ "Corrigent Systems Inc.", /* 7680 */ "Trakonic", /* 7681 */ "nCipher PLC", /* 7682 */ "Air Liquide Electronics", /* 7683 */ "NexTone Communications", /* 7684 */ "KPMG Consulting, LLC", /* 7685 */ "Pêches et Océans Canada - Garde côtière", /* 7686 */ "UFSC/LabSEC", /* 7687 */ "Social Change Online", /* 7688 */ "rasimusi", /* 7689 */ "ThruPoint, Inc.", /* 7690 */ "Warp Solutions, Inc.", /* 7691 */ "The Stoddard Group, Inc.", /* 7692 */ "International Life Sciences Institute (ILSI)", /* 7693 */ "Summit Technologies", /* 7694 */ "Media Cloud, Inc.", /* 7695 */ "Bach Systems, Inc.", /* 7696 */ "Athabasca University", /* 7697 */ "Context Media, Inc.", /* 7698 */ "Syncwave Networks, Inc.", /* 7699 */ "Endeavors Technology, Inc.", /* 7700 */ "GemStone Systems Inc.", /* 7701 */ "Keicho,Ltd.", /* 7702 */ "Ecrio Inc.", /* 7703 */ "Der Polizeipraesident in Berlin", /* 7704 */ "Centre For Wireless Communications", /* 7705 */ "JonCol.com", /* 7706 */ "Proactive Technology Ltd.", /* 7707 */ "WydeBand", /* 7708 */ "Aristotle University of Thessaloniki", /* 7709 */ "Agrilis (pty) Ltd", /* 7710 */ "GNKC", /* 7711 */ "SECARTIS AG", /* 7712 */ "Tomorrow Technologies Marcus", /* 7713 */ "EVIDIAN", /* 7714 */ "EYE Communications AG", /* 7715 */ "ART S.p.A.", /* 7716 */ "Flying J Inc.", /* 7717 */ "INA", /* 7718 */ "Avilinks", /* 7719 */ "W.I. Simonson Inc.", /* 7720 */ "caatoosee schweiz ag", /* 7721 */ "net-linx-ps-sii", /* 7722 */ "Benham.net", /* 7723 */ "Unassigned", /* 7724 */ "Hark Tower Systems", /* 7725 */ "Pointgain Corporation", /* 7726 */ "CIN-NIC", /* 7727 */ "3R Inc.", /* 7728 */ "Telson", /* 7729 */ "Voxpath Networks", /* 7730 */ "HomeStore.com", /* 7731 */ "philiplo", /* 7732 */ "Pulsar Technologies, Inc.", /* 7733 */ "ProQuent Systems Corporation", /* 7734 */ "Airbiquity Inc", /* 7735 */ "Jarna", /* 7736 */ "Internet Photonics Inc.", /* 7737 */ "Encendra Communications", /* 7738 */ "DigEncP", /* 7739 */ "NetMonger Communications Christopher", /* 7740 */ "SNMP Technologies", /* 7741 */ "Aptira Pty Ltd", /* 7742 */ "Salomon Smith Barney, Autralia", /* 7743 */ "SPE Systemhaus GmbH", /* 7744 */ "AETHRA", /* 7745 */ "Watershed Consultants Ltd", /* 7746 */ "Federation", /* 7747 */ "GlobeCom Interactive", /* 7748 */ "HICOM GmbH", /* 7749 */ "Helicon Networks", /* 7750 */ "mDiversity, Inc.", /* 7751 */ "Bravara Communications, Inc.", /* 7752 */ "ZELPOS", /* 7753 */ "Infosquare Corp.", /* 7754 */ "Disney Technology Solutions and Services", /* 7755 */ "Netarena Communications", /* 7756 */ "Tonbu Inc", /* 7757 */ "E-BUSINESSNETWORK.COM", /* 7758 */ "EENADU.COM", /* 7759 */ "ANYSCAPE.COM", /* 7760 */ "POINTGO.COM", /* 7761 */ "EBIZXML.COM", /* 7762 */ "POINTGAIN.NET", /* 7763 */ "EBUSINESSXCHANGE.COM", /* 7764 */ "SYSDYNAMICS.COM", /* 7765 */ "BUSINESSACROSS.COM", /* 7766 */ "EBUSINESSOPENWORLD.COM", /* 7767 */ "E-BUSINESSOPENWORLD.COM", /* 7768 */ "E-BUSINESSOPENWORLD.NET", /* 7769 */ "EBUSINESSOPENWORLD.NET", /* 7770 */ "EBUSINESSACROSS.COM", /* 7771 */ "EBIZDYNAMICS.COM", /* 7772 */ "E-BUSINESSDYNAMICS.COM", /* 7773 */ "EBUSINESSX.COM", /* 7774 */ "E-DYNAMICS.COM", /* 7775 */ "E-DYNAMICS.NET", /* 7776 */ "E-DYNAMICS.ORG", /* 7777 */ "Excess Trade Zone, Inc.", /* 7778 */ "InfoBlox Inc.", /* 7779 */ "Mirametric", /* 7780 */ "Conservatoire National des Arts et Metiers", /* 7781 */ "Greek School Network", /* 7782 */ "Riello S.p.A.", /* 7783 */ "Lattis Enterprise Management Ltd", /* 7784 */ "Rivne Communication Technologies Ltd.", /* 7785 */ "IBCnet Ltd.", /* 7786 */ "frontsite AG", /* 7787 */ "Liebregts", /* 7788 */ "LPM Online", /* 7789 */ "LISIT - Lombardia Integrata Servizi Infotelematici per ilTerritorio", /* 7790 */ "Conseil General de la Loire", /* 7791 */ "incshopkorea", /* 7792 */ "HMS", /* 7793 */ "Infinity Tel-Data Inc", /* 7794 */ "Custom Software Solutions", /* 7795 */ "BowdenGS Technoloiges, LLC", /* 7796 */ "Aculeus, Inc.", /* 7797 */ "Toko Electric Co., Ltd.", /* 7798 */ "The PacificRoot", /* 7799 */ "Premier Network Co., Ltd", /* 7800 */ "Radionet Oy", /* 7801 */ "110 Limited", /* 7802 */ "Terra Networks Brasil S/A", /* 7803 */ "elcan Corp.", /* 7804 */ "NetNation Communications Inc.", /* 7805 */ "Techsar", /* 7806 */ "Stoneware, Inc.", /* 7807 */ "Rearden Steel Technologies, Inc.", /* 7808 */ "Phil Pearl", /* 7809 */ "Seek Systems", /* 7810 */ "40 Street Records", /* 7811 */ "Pfadi Limmattal", /* 7812 */ "Cogetec HSI", /* 7813 */ "Infinity Tel-Data Inc.", /* 7814 */ "Gilmore House Associates Ltd", /* 7815 */ "Wissenschaftladen Dortmund e.V.", /* 7816 */ "Chiphead Consulting, Inc.", /* 7817 */ "Rohit Communications Pte. Ltd.", /* 7818 */ "Opensource Consult", /* 7819 */ "Configate Inc.", /* 7820 */ "University of Silesia", /* 7821 */ "Athena Security", /* 7822 */ "Clickaction", /* 7823 */ "LG Electronics Inc.", /* 7824 */ "Cognizant Technology Solutions", /* 7825 */ "KPNQwest Austria GmbH.", /* 7826 */ "Sofadex-Puratos", /* 7827 */ "Commsbloke.com", /* 7828 */ "Axon Digital Design B.V.", /* 7829 */ "Service Info-Techno Inc.", /* 7830 */ "Dataflex Design Communications Limited", /* 7831 */ "ICSA Labs", /* 7832 */ "daveb.net", /* 7833 */ "Wissenschaftsladen Dortmund e.V.", /* 7834 */ "Hope Tranportation", /* 7835 */ "Nuark Co., Ltd.", /* 7836 */ "Sumtel Communications, Inc.", /* 7837 */ "UTOMI AG", /* 7838 */ "Telia UK Limited", /* 7839 */ "Zelax", /* 7840 */ "Skynet Ltd.", /* 7841 */ "Université Paris 12 - Val de Marne", /* 7842 */ "Callera Ltd", /* 7843 */ "KGB Entertainment", /* 7844 */ "Cipher", /* 7845 */ "ETRALI", /* 7846 */ "The Evangelical Lutheran Good Samaritan Society", /* 7847 */ "Sächsische Staatskanzlei", /* 7848 */ "CommeceOne Auction Services", /* 7849 */ "Penford Corporation", /* 7850 */ "Software Munitions", /* 7851 */ "CyberElves", /* 7852 */ "Teknoids", /* 7853 */ "nazit", /* 7854 */ "ISI-CNR", /* 7855 */ "REALTRONIC", /* 7856 */ "XenoSite", /* 7857 */ "Outcome Technology Associates, Inc.", /* 7858 */ "NetMount", /* 7859 */ "Datatone Ltd", /* 7860 */ "U4EA Technologies Ltd.", /* 7861 */ "Herrns PC", /* 7862 */ "FreeW3, Inc.", /* 7863 */ "Megadot Pty Ltd", /* 7864 */ "Litnet NOC", /* 7865 */ "Corinthian Engineering Pty Ltd", /* 7866 */ "Mailvision", /* 7867 */ "Universite de Sherbrooke", /* 7868 */ "Byzantium Solutions Ltd", /* 7869 */ "Polska Platforma Internetowa", /* 7870 */ "NICsys GbR", /* 7871 */ "Arrista Technologies", /* 7872 */ "Info-Onscreen Software Systems Pty. Ltd.", /* 7873 */ "Highland Injection Molding Inc.", /* 7874 */ "Shibaura Institute of Technology , Science Information Center", /* 7875 */ "Statens vegvesen", /* 7876 */ "Basefarm AS", /* 7877 */ "The University of the South Pacific", /* 7878 */ "T-TeleSec", /* 7879 */ "Peco II Inc.", /* 7880 */ "Cognitas Technologies, Inc.", /* 7881 */ "City of Prescott IT Department", /* 7882 */ "amirk.com", /* 7883 */ "Francis W. Parker School", /* 7884 */ "Arek Dreyer", /* 7885 */ "K Application", /* 7886 */ "nCUBE, Corp.", /* 7887 */ "Iamba Technologies Ltd.", /* 7888 */ "Lingnan University", /* 7889 */ "Arrow Electronics, Inc.", /* 7890 */ "Confederation of Norwegian Business and Industry", /* 7891 */ "Lannert.de", /* 7892 */ "Yacom Internet Factory S.A", /* 7893 */ "VanCo.net s.r.o.", /* 7894 */ "Amethon Solutions", /* 7895 */ "Rietumu Banka", /* 7896 */ "Knowledge Base BV", /* 7897 */ "Openet Telecom Ltd.", /* 7898 */ "Cap Gemini, portugal", /* 7899 */ "Neuberger & Hughes GmbH", /* 7900 */ "Capiro", /* 7901 */ "alberta wellnet", /* 7902 */ "EcoProg Ltd.", /* 7903 */ "Greenwich Capital Markets", /* 7904 */ "National Training Institute, Inc.", /* 7905 */ "Brainworkers Srl", /* 7906 */ "Alliance Race Car Builders", /* 7907 */ "TelSoft Solutions, Inc", /* 7908 */ "American Communication Technologies International, Inc.", /* 7909 */ "CSTS, Inc.", /* 7910 */ "Dreamintek Co.,Ltd", /* 7911 */ "Staffware PLC", /* 7912 */ "Space Hellas S.A.", /* 7913 */ "qmail-ldap project", /* 7914 */ "Cetevo AB", /* 7915 */ "PAGE", /* 7916 */ "Area de Ciencias de la Computación e Inteligencia Artificial", /* 7917 */ "Electrosonic Ltd", /* 7918 */ "Spyn Inc.", /* 7919 */ "National Education Association of the United States", /* 7920 */ "AethyrNet Soluitions", /* 7921 */ "Spiro Kommunikation", /* 7922 */ "OrgaNet GmbH", /* 7923 */ "Bundesamt fuer Sicherheit in der Informationstechnik", /* 7924 */ "SPECS GmbH Surface Analysis and Computer Technology", /* 7925 */ "University of Antwerp", /* 7926 */ "Splendid Internet GmbH", /* 7927 */ "Wysdom Inc.", /* 7928 */ "HBOS plc", /* 7929 */ "Telecom Argentina", /* 7930 */ "SMCC", /* 7931 */ "AmeriNet, Incorporated", /* 7932 */ "Promise Technology Inc.", /* 7933 */ "Shanghai JiaoTong University", /* 7934 */ "IVT", /* 7935 */ "YANGJAE MICRO", /* 7936 */ "inPACT technologies", /* 7937 */ "IEE", /* 7938 */ "Liscon GmbH", /* 7939 */ "Celeritas", /* 7940 */ "Tecnica 6000 S.L.", /* 7941 */ "Xtempus", /* 7942 */ "Home Wireless Networks, Inc.", /* 7943 */ "PennyLan", /* 7944 */ "UMB Bank, n.a.", /* 7945 */ "FlashPoint Technology, Inc.", /* 7946 */ "MSP Technolgies", /* 7947 */ "DASIR ENTERPRISES", /* 7948 */ "Broadcloud Communications, Inc.", /* 7949 */ "Overture Networks", /* 7950 */ "CNCTC", /* 7951 */ "Too Corporation", /* 7952 */ "Majitek", /* 7953 */ "Siemens Business Services AS", /* 7954 */ "Alfaskop AB", /* 7955 */ "Initio IT-løsninger AS", /* 7956 */ "Lares Technology", /* 7957 */ "Efficient Channel Coding, Inc.", /* 7958 */ "Gabriel Roman", /* 7959 */ "FreeRein", /* 7960 */ "Harry L. Styron, Attorney at Law", /* 7961 */ "Not Another Corporation, Inc.", /* 7962 */ "Tebie", /* 7963 */ "Master Comunicacao e Marketing Ltda. Cass", /* 7964 */ "Ingenieurbuero Tartsch", /* 7965 */ "SPY internetworking", /* 7966 */ "Tekbabble", /* 7967 */ "Spearhead Technologies Ltd.", /* 7968 */ "BeComm", /* 7969 */ "Athelon Corporation", /* 7970 */ "Tølveguten Lars Bahner", /* 7971 */ "XingTang Communication Technology Co.,Ltd.", /* 7972 */ "TELEFONICA DE ESPAÑA", /* 7973 */ "TURBOMECA", /* 7974 */ "Ark e-Management Ltd.", /* 7975 */ "Brotsman & Dreger, Inc.", /* 7976 */ "VidSoft GmbH", /* 7977 */ "France Telecom Hosting", /* 7978 */ "Storigen Systems", /* 7979 */ "Sistemas y Aplicaciones de Telecomunicaciones S.A.Jose Luis", /* 7980 */ "Interbind", /* 7981 */ "The Simon Shapiro Foundation", /* 7982 */ "HPEB (Health technology Planning & Evaluation Board)", /* 7983 */ "Ticket Master/CitySearch Corp.", /* 7984 */ "University of Catania", /* 7985 */ "ip.access", /* 7986 */ "Universite de Pau et des Pays de l'Adour", /* 7987 */ "Université Nancy 2", /* 7988 */ "IMAG", /* 7989 */ "EOI Technologies, Inc.", /* 7990 */ "eLaw.com Inc", /* 7991 */ "PRFD", /* 7992 */ "Factorit S.p.A", /* 7993 */ "Continuous Computing Corp.", /* 7994 */ "Snell & Wilcox Ltd", /* 7995 */ "Electric Power Research Institute(EPRI)", /* 7996 */ "Ball Corporation", /* 7997 */ "MailFriday", /* 7998 */ "TP Internet", /* 7999 */ "Ipace Inc.", /* 8000 */ "Qitek", /* 8001 */ "Metamerge AS", /* 8002 */ "Swisscom IP-Plus", /* 8003 */ "MID GmbH", /* 8004 */ "Physics Department, Queen Mary, University of London", /* 8005 */ "EINSTEINet GmbH", /* 8006 */ "threllis GmbH", /* 8007 */ "Pactolus Communication Software, Inc.", /* 8008 */ "iSecuritas", /* 8009 */ "ExaNet", /* 8010 */ "McKee Foods Corporation", /* 8011 */ "Hyperdrive Sistemas Ltda", /* 8012 */ "Nextlevel.com Internet Productions Inc.", /* 8013 */ "Stonefly Networks, Inc.", /* 8014 */ "Airocon", /* 8015 */ "Ravensbourne College of Design & Communication", /* 8016 */ "Primus Canada", /* 8017 */ "Hogeschool van Arnhem en Nijmegen", /* 8018 */ "The Stellar Ice Company", /* 8019 */ "Ecole Normale Supérieure de Lyon", /* 8020 */ "G. A. Enterprises", /* 8021 */ "Senets Broadband, Inc.", /* 8022 */ "InfoCruiser Inc.", /* 8023 */ "QuoVadis Limited", /* 8024 */ "Friendlyworks", /* 8025 */ "Rockbrook Systems Group", /* 8026 */ "binHOST.com, Inc.", /* 8027 */ "cast", /* 8028 */ "DCTC", /* 8029 */ "Prakash Cotton Mills Ltd.", /* 8030 */ "University Library of Kassel, Germany", /* 8031 */ "Agenda d.o.o.", /* 8032 */ "Almende", /* 8033 */ "Rohill Technologies B.V.", /* 8034 */ "RY Enterprises", /* 8035 */ "USA.NET", /* 8036 */ "COLOMAR Group, Inc", /* 8037 */ "HomeBase Work Solutions", /* 8038 */ "silly-ants", /* 8039 */ "Thunder Systems, Inc.", /* 8040 */ "Hostway Corporation", /* 8041 */ "eCELL Technologies, Inc.", /* 8042 */ "ProActiveMonitoring, Inc.", /* 8043 */ "M.J. DuChene & Associates", /* 8044 */ "Glen Lewis", /* 8045 */ "Utah Java User Group", /* 8046 */ "OSEDU", /* 8047 */ "Avatar Internet Services", /* 8048 */ "NetAccess, Inc.", /* 8049 */ "RISS-Telecom", /* 8050 */ "Michael McCafferty", /* 8051 */ "TesserNet Systems Inc.", /* 8052 */ "Islington ave.", /* 8053 */ "The Scan Shop Pty. Ltd.", /* 8054 */ "Optilink Technologies Company Limited", /* 8055 */ "SHENYANG NEU-ALPINE SOFTWARE CO.,LTD.", /* 8056 */ "CESNET", /* 8057 */ "MessageVine", /* 8058 */ "Net To Net Technologies", /* 8059 */ "Armstrong Atlantic State University", /* 8060 */ "Multipoint Communications Ltd", /* 8061 */ "ColorMax Interactive", /* 8062 */ "M@innet Communication Ltd.", /* 8063 */ "Global Technology Solutions", /* 8064 */ "Uni-Ter Underwriting Management Corporation", /* 8065 */ "WatchMark Corporation", /* 8066 */ "MCI", /* 8067 */ "Buffalo Rock Company", /* 8068 */ "Rozz Enterprises", /* 8069 */ "ZeroHype Technologies, Inc.", /* 8070 */ "Sandstorm Enterprises, Inc.", /* 8071 */ "net-snmp", /* 8072 */ "Lumos Technologies Inc", /* 8073 */ "Box Solutions Corporation", /* 8074 */ "Lateral Concepts and Designs", /* 8075 */ "Siemens PSE Austria", /* 8076 */ "ChamberSign France", /* 8077 */ "INU Consultancy", /* 8078 */ "ensoport.com", /* 8079 */ "Fastweb S.p.A.", /* 8080 */ "Magnum Solutions Ltd", /* 8081 */ "SEPATON, Inc.", /* 8082 */ "Packet Design", /* 8083 */ "tangali.eu.org", /* 8084 */ "IronStream Inc", /* 8085 */ "NUASIS Corporation", /* 8086 */ "TierNext", /* 8087 */ "DCSI", /* 8088 */ "Covad Communications", /* 8089 */ "Enterprise Computing Services", /* 8090 */ "IP Soft, Inc.", /* 8091 */ "Elgo Maribor d.o.o.", /* 8092 */ "Aliroo Ltd.", /* 8093 */ "DreamArts Corp.", /* 8094 */ "INELCOM Ingeniería Electrónica Comercial S.A", /* 8095 */ "The Voice Technology Forum", /* 8096 */ "Servicom 2000, S. L.", /* 8097 */ "Morat Games Ltd", /* 8098 */ "Alex Wilson Coldstream Ltd", /* 8099 */ "Softricity, Inc.", /* 8100 */ "Zambeel, Inc.", /* 8101 */ "Mark Morgan Enterprises", /* 8102 */ "Winstechnet Co.,Ltd", /* 8103 */ "Sun Microsystems Professional Services", /* 8104 */ "Appilog", /* 8105 */ "LUXMATE Controls GmbH", /* 8106 */ "Kabira", /* 8107 */ "VHI", /* 8108 */ "Price Express", /* 8109 */ "Message Central plc.", /* 8110 */ "Pacific Trade & Technology", /* 8111 */ "Green Shield Canada", /* 8112 */ "Bellanet International Secretariat", /* 8113 */ "Naval Operational Logisitics Support Center", /* 8114 */ "Birch Telecom", /* 8115 */ "Danware Data A/S", /* 8116 */ "NAFEM (North American Association of Food Equipment Manufacturers)", /* 8117 */ "Capitol Systems Corporation", /* 8118 */ "Mission Valley Regional Occupational Program David", /* 8119 */ "Transvirtual Technologies, Inc.", /* 8120 */ "Ridgeway Systems & Software Ltd.", /* 8121 */ "KB Impuls Service GmbH", /* 8122 */ "Kompetenznetz Maligne Lymphome", /* 8123 */ "Carrefour", /* 8124 */ "Internet Services", /* 8125 */ "My Docs Online, Inc", /* 8126 */ "Effinity Labs", /* 8127 */ "Boco", /* 8128 */ "JadeBird HuaGuang Ltd Co.", /* 8129 */ "Heimann Biometric Systems GmbH", /* 8130 */ "Glory Telecom. Co.,Ltd.", /* 8131 */ "Nasik Welding Products Pvt.Ltd", /* 8132 */ "FSSC-London", /* 8133 */ "Insitel", /* 8134 */ "Andong National University", /* 8135 */ "Centrul de Pregatire in Informatica", /* 8136 */ "Palisade Systems", /* 8137 */ "De Roeck Software Engineering BVBA", /* 8138 */ "Aaxion Software Corporation", /* 8139 */ "C2 Technologies, Inc.", /* 8140 */ "Kashpureff Boling Laboratories, Inc.", /* 8141 */ "HCA The Healthcare Company", /* 8142 */ "ICTV", /* 8143 */ "Fiberxon (China) Corp., Ltd", /* 8144 */ "University of Salzburg", /* 8145 */ "Snakegully", /* 8146 */ "Mercury Telecommunications", /* 8147 */ "Niragongo Technologies Ltd.", /* 8148 */ "Generalitat Valenciana", /* 8149 */ "SECARON AG", /* 8150 */ "Worldweb.net", /* 8151 */ "Visto Corporation", /* 8152 */ "jGuild Internation ltd", /* 8153 */ "Riser Management Systems", /* 8154 */ "Transcept, Inc.", /* 8155 */ "AgencyWorks", /* 8156 */ "SynCom Network, Inc.", /* 8157 */ "MSP-LUB", /* 8158 */ "SHIN SATELLITE PUBLIC COMPANY LIMITED. Pho", /* 8159 */ "Digital Platform Support Services", /* 8160 */ "Star Home GMBH", /* 8161 */ "DEXIA", /* 8162 */ "Double D Electronics Ltd", /* 8163 */ "Starent Networks", /* 8164 */ "boutemy.com", /* 8165 */ "Viag Interkom", /* 8166 */ "Transversal", /* 8167 */ "Nectar.com", /* 8168 */ "Carroll Lutheran Village", /* 8169 */ "Monitor Group", /* 8170 */ "Oni Solutions", /* 8171 */ "Johns Hopkins University, MSEL-LCS", /* 8172 */ "INDRA Sistemas", /* 8173 */ "Netburner", /* 8174 */ "Carrier9 Networks", /* 8175 */ "AstroDesign,Inc.", /* 8176 */ "HCL Communications", /* 8177 */ "Just Innovative Software GmbH", /* 8178 */ "Communications Laboratories Telekommunikations Dienstleistungs-Ges.m.b.H.", /* 8179 */ "Spirea", /* 8180 */ "Commarco GmbH", /* 8181 */ "The Boston Bit Co", /* 8182 */ "NetSource America Inc.", /* 8183 */ "Inspira S.L.", /* 8184 */ "Online Creation, Inc.", /* 8185 */ "California Institute of Technology", /* 8186 */ "Sharinga Networks Inc.", /* 8187 */ "AXA Technology Services Switzerland AG", /* 8188 */ "Gerichhausen, Adomeit & Terstappen GmbH", /* 8189 */ "3M Deutschland GmbH", /* 8190 */ "glutam.at", /* 8191 */ "Symbiont Networks, Inc.", /* 8192 */ "Telemetry Technologies", /* 8193 */ "Targetnet.com Inc.", /* 8194 */ "Effinity Net, LC", /* 8195 */ "Teldar Corporation", /* 8196 */ "LearningSoft Corp.", /* 8197 */ "eBuilt, Inc.", /* 8198 */ "Instituto Tecnológico Autónomo de México", /* 8199 */ "UNNATI COMPUTERS", /* 8200 */ "XCelaron Pty Ltd", /* 8201 */ "Toro Assicurazioni S.p.A.", /* 8202 */ "LPG Innovations", /* 8203 */ "Cymtec Systems, Inc.", /* 8204 */ "Unassigned", /* 8205 */ "Centro Regional de Investigaciones Basicas y Aplicadas de Bahia-Blanca", /* 8206 */ "Integratus, Inc.", /* 8207 */ "Best Western International", /* 8208 */ "Informio", /* 8209 */ "Centegy", /* 8210 */ "ShenZhen TCL Communication Technology Co.,Ltd.", /* 8211 */ "Harbour Networks Co.", /* 8212 */ "Faculty of Medicine, University of Sydney", /* 8213 */ "Atomica", /* 8214 */ "Authentified", /* 8215 */ "Cyzen Tech.,Co.LTD", /* 8216 */ "SLAonline.com Ltd", /* 8217 */ "EC - Erdoelchemie GmbH", /* 8218 */ "Ecomda", /* 8219 */ "TCL Holdings Co., Ltd.", /* 8220 */ "BAE SYSTEMS, Integrated Defense Solutions", /* 8221 */ "Matthew White", /* 8222 */ "Atlas Commerce", /* 8223 */ "LeasedMinds", /* 8224 */ "Open Connect AG", /* 8225 */ "GigaNews.com, Inc.", /* 8226 */ "CyberObject Corp", /* 8227 */ "Jalan Network Services, Inc.", /* 8228 */ "Phil Systems", /* 8229 */ "RING! ROSA Products Bv", /* 8230 */ "Lineo", /* 8231 */ "Fachhochschule Giessen-Friedberg", /* 8232 */ "iBasis, Inc.", /* 8233 */ "ECET International", /* 8234 */ "CENIT AG Systemhaus", /* 8235 */ "White Horse Interactive", /* 8236 */ "NCC GmbH", /* 8237 */ "Lutheran Brotherhood", /* 8238 */ "Peribit Networks", /* 8239 */ "Path 1", /* 8240 */ "Securant Technologies", /* 8241 */ "Security Portal, Inc", /* 8242 */ "iPass, Inc.", /* 8243 */ "Brocade Communications Systems, Inc.", /* 8244 */ "Vsovt Ltd.", /* 8245 */ "Cistron Internet Services", /* 8246 */ "University of Rostock", /* 8247 */ "Turin Networks Inc", /* 8248 */ "Verein für Computergenealogie e.V.", /* 8249 */ "Shire.Net LLC", /* 8250 */ "IIGA Co.,Ltd.", /* 8251 */ "Digital Strategies, Inc.", /* 8252 */ "AWOLart.com", /* 8253 */ "Aleph-Null, Inc.", /* 8254 */ "Tejas Networks", /* 8255 */ "Solution - The Computer People eK", /* 8256 */ "Southern Ural State University", /* 8257 */ "kuk-Systemprogrammierung", /* 8258 */ "Banco de Sabadell, S.A.", /* 8259 */ "Intrexa Corp", /* 8260 */ "MediaCast", /* 8261 */ "Wavion", /* 8262 */ "Jamby BV", /* 8263 */ "Recreativos Franco, S.A.", /* 8264 */ "Entrada Networks, Inc.", /* 8265 */ "Intelnet S.A.", /* 8266 */ "Arula Systems", /* 8267 */ "Mark Tippetts", /* 8268 */ "CJSC Malva", /* 8269 */ "MJL Technology", /* 8270 */ "Fachhochschule Vorarlberg", /* 8271 */ "Nameplanet Ltd.", /* 8272 */ "Standard Communications", /* 8273 */ "Interadnet", /* 8274 */ "INSA Toulouse", /* 8275 */ "Mpathix", /* 8276 */ "PSC-ITSolutions.NET", /* 8277 */ "St. Elisabeth GmbH", /* 8278 */ "f3pu5.net", /* 8279 */ "Fiver LightCom Co., Ltd.", /* 8280 */ "Movelife", /* 8281 */ "BAE Systems Defence Pty Ltd", /* 8282 */ "TSMT - Magic Touch Ltd", /* 8283 */ "ACTL", /* 8284 */ "FlexLight", /* 8285 */ "Incirco", /* 8286 */ "Klinikum der Johannes Gutenberg-Universität Mainz", /* 8287 */ "Jung von Matt Werbeagentur GmbH", /* 8288 */ "Universita' degli Studi di Napoli \"Federico II\"", /* 8289 */ "Certus Technology, Inc.", /* 8290 */ "DigiStamp, Inc.", /* 8291 */ "Mt. Holyoke College", /* 8292 */ "Bang Networks, Inc.", /* 8293 */ "infoman", /* 8294 */ "BWA", /* 8295 */ "Dialogos3 s.r.l.", /* 8296 */ "IrisOnLine.com BV", /* 8297 */ "v/h Nictoglobe", /* 8298 */ "secunet Security Networks AG", /* 8299 */ "State of Wisconsin - Security and Directory Services", /* 8300 */ "Technische Universitaet Darmstadt", /* 8301 */ "EdeNET Communications, Inc.", /* 8302 */ "Gelco Information Network", /* 8303 */ "Atomic Blue Bear", /* 8304 */ "OARnet", /* 8305 */ "Go Local Consulting, Inc.", /* 8306 */ "tecnetdev", /* 8307 */ "GTran Inc.", /* 8308 */ "Virtela Communications", /* 8309 */ "Trak Systems", /* 8310 */ "Police Information Technology Organization", /* 8311 */ "OskolNET JSC", /* 8312 */ "JARDiX AG", /* 8313 */ "AVL Emission Test Systems GmbH", /* 8314 */ "Minacom Labs Inc.", /* 8315 */ "Staffwell", /* 8316 */ "FiberCycle Networks", /* 8317 */ "Twisted Pair Solutions, Inc.", /* 8318 */ "Blue Wave Systems", /* 8319 */ "Vonova Corporation", /* 8320 */ "Entidad Acreditadora Ley 19.799 - Gobierno de Chile", /* 8321 */ "Education Networks of America", /* 8322 */ "Gemteq Software", /* 8323 */ "The University of Western Australia", /* 8324 */ "Wanadoo Spain", /* 8325 */ "Unreal Technology spol. s r.o.", /* 8326 */ "IUFM Reims", /* 8327 */ "GyD Iberica", /* 8328 */ "iPromoGroup Ltd.", /* 8329 */ "Omnexus N.V., Amsterdam, Wädenswil Branch", /* 8330 */ "Matti Valtuustoon", /* 8331 */ "université d'Evry Val d'Essonne", /* 8332 */ "GROW.co,.Ltd", /* 8333 */ "dynamicsoft Inc.", /* 8334 */ "Université des Sciences Sociales de Toulouse", /* 8335 */ "Superior Consultant Holdings Corporation", /* 8336 */ "Hybricon Corp.", /* 8337 */ "Phonetics, Inc.", /* 8338 */ "Young & Laramore", /* 8339 */ "Image Computing Incorporated", /* 8340 */ "Utility Data Systems, Inc.", /* 8341 */ "NTRU Cryptosystems", /* 8342 */ "NEXTRA Czech Republic s.r.o.", /* 8343 */ "Apparate Networks", /* 8344 */ "Health Net, Inc.", /* 8345 */ "Université de Limoges - S.C.I. - Laine Jean", /* 8346 */ "TechnoCage, Inc", /* 8347 */ "Data Avenue, Inc.", /* 8348 */ "ConnectScape, Inc.", /* 8349 */ "T-Systems Hungary Kft.", /* 8350 */ "I-Land Internet Services", /* 8351 */ "Pronym S.A.R.L.", /* 8352 */ "Excelsior Systems Limited", /* 8353 */ "GIB", /* 8354 */ "sarfata's net", /* 8355 */ "Visual Revolutions", /* 8356 */ "Mangosoft Corporation", /* 8357 */ "TELOS Technology Inc.", /* 8358 */ "IP blue", /* 8359 */ "Mirant Corporation", /* 8360 */ "Portail des IUFM", /* 8361 */ "mSAFE", /* 8362 */ "Store-O-Matic, Inc.", /* 8363 */ "Lichen Hosting", /* 8364 */ "Advanced Information Management Solutions Pty Ltd", /* 8365 */ "Fiberlink Communications Corp", /* 8366 */ "NationNet.Com", /* 8367 */ "ServerWerks Inc", /* 8368 */ "NTIkorea", /* 8369 */ "NextSet", /* 8370 */ "AGENDA", /* 8371 */ "University of Sussex", /* 8372 */ "SEAL Systems AG & Co. KG", /* 8373 */ "DVZ Datenverarbeitungszentrum Mecklenburg-Vorpommern", /* 8374 */ "Outercurve Technologies", /* 8375 */ "Université de Bourgogne", /* 8376 */ "ReefEdge, Inc.", /* 8377 */ "Texas Memory Systems", /* 8378 */ "BroadRiver Communications", /* 8379 */ "Mentum Group", /* 8380 */ "Certainty Solutions, Inc.", /* 8381 */ "C&C Engineering, Inc.", /* 8382 */ "SigmaSoft, Inc.", /* 8383 */ "eBay, Inc.", /* 8384 */ "ENSAM CER de Metz", /* 8385 */ "LION bioscience AG", /* 8386 */ "Globe Internet s.r.o.", /* 8387 */ "Techniker Krankenkasse", /* 8388 */ "Ergon Informatik", /* 8389 */ "Mettler Toledo", /* 8390 */ "Bicman Netologies", /* 8391 */ "XMission", /* 8392 */ "GIMAS mbH", /* 8393 */ "Privador AS", /* 8394 */ "Tulane University", /* 8395 */ "virtual earth Gesellschaft für Wissens re/prä sentation mbH", /* 8396 */ "Vecerina", /* 8397 */ "University of West Florida", /* 8398 */ "iVEA Technologies", /* 8399 */ "Evercom Systems, Inc.", /* 8400 */ "FoxTravel", /* 8401 */ "ePlus, Inc.", /* 8402 */ "ARA Network Technologies, Co, Ltd.", /* 8403 */ "Akamba Corporation", /* 8404 */ "Tohono Consulting", /* 8405 */ "Morningstar Systems, Inc.", /* 8406 */ "MyBau.Com", /* 8407 */ "InterComponentWare AG", /* 8408 */ "ztevision", /* 8409 */ "Landis & Gyr Communications SAS", /* 8410 */ "e-Qual", /* 8411 */ "Satyam Computer Services ltd", /* 8412 */ "GlobalNaps", /* 8413 */ "Cedacri S.p.A.", /* 8414 */ "CyberElan LLC", /* 8415 */ "Shaw Cablesystems, G.P.", /* 8416 */ "StorageApps, Inc.", /* 8417 */ "listless ennui", /* 8418 */ "Rockwell Collins", /* 8419 */ "Digi-Sign Certification Services Limited", /* 8420 */ "VODTEL COMMUNICATIONS Inc.", /* 8421 */ "Libritas, Inc", /* 8422 */ "twisd AG", /* 8423 */ "ICUBE SRL", /* 8424 */ "AP Engines, Inc.", /* 8425 */ "Watlow", /* 8426 */ "Worldgate Networks Private Limited", /* 8427 */ "Turtle Entertainment GmbH", /* 8428 */ "2NETFX (Media Now, Inc.DBA 2NETFX)", /* 8429 */ "TranSwitch Corporation", /* 8430 */ "Broadcasting Interest Enterprise, Inc.Christopher", /* 8431 */ "TeraGlobal Communications", /* 8432 */ "3e Technologies International Inc.", /* 8433 */ "Fox Chase Cancer Center", /* 8434 */ "HyperEdge Inc.", /* 8435 */ "Requisite Technology", /* 8436 */ "Bolder Internet Group, Inc.", /* 8437 */ "ReFlex Communications, Inc.", /* 8438 */ "CADRE Design", /* 8439 */ "Tsuda College", /* 8440 */ "ShangHai WaiGaoQiao Free Trade Zone network development Co.,Ltd", /* 8441 */ "Sendtek Corporation", /* 8442 */ "Telisma", /* 8443 */ "IIE (Institut d'Informatique d'Entreprise)", /* 8444 */ "Bilstone Ltd", /* 8445 */ "Barclaycard", /* 8446 */ "Riverglade Consultants Ltd", /* 8447 */ "Avantis GmbH", /* 8448 */ "ePUREDATA Inc.", /* 8449 */ "Cetacean Networks", /* 8450 */ "Petri Laitinen", /* 8451 */ "Guernsey.Net Ltd.", /* 8452 */ "npw.net", /* 8453 */ "Donald E Reynolds", /* 8454 */ "Old Donkey Enterprises", /* 8455 */ "OPTIBASE", /* 8456 */ "Deepend Prague", /* 8457 */ "ZOOM Networks Inc.", /* 8458 */ "Shandong WeiFang Beida JadeBird Inc.", /* 8459 */ "University of Illinois at Chicago", /* 8460 */ "UFO Solutions Limited", /* 8461 */ "Sonic.Net, Inc.", /* 8462 */ "PEM Electronics", /* 8463 */ "University of Wollongong IEEE Student Branch", /* 8464 */ "LodeSoft Corp.", /* 8465 */ "RAWK Systems, Inc.", /* 8466 */ "La Page Trad", /* 8467 */ "American Medical Association", /* 8468 */ "Domestic WANs", /* 8469 */ "Learning Machines, Inc.", /* 8470 */ "Universidad Del Bio-Bio", /* 8471 */ "Lynk a division of BOS Ltd", /* 8472 */ "University of Massachusetts Amherst", /* 8473 */ "Saltec Powerlink", /* 8474 */ "Veilex", /* 8475 */ "Kyuden Infocom Company, Inc.", /* 8476 */ "CyberTron Software GmbH", /* 8477 */ "TongTech CO., Ltd,", /* 8478 */ "now.com", /* 8479 */ "Fairleigh Dickinson University", /* 8480 */ "HiGHKU", /* 8481 */ "Colorado State University", /* 8482 */ "Trenza, Corp", /* 8483 */ "Allegheny Energy", /* 8484 */ "Virtual Software, S.L.", /* 8485 */ "City-Net Tech. Inc.", /* 8486 */ "MightyView, Inc.", /* 8487 */ "University of Alabama", /* 8488 */ "Pico Technology Ltd", /* 8489 */ "Direct Commerce", /* 8490 */ "drzyzgula.org", /* 8491 */ "Iscanet Internet Services", /* 8492 */ "Web Office China", /* 8493 */ "MOSAIC SOFTWARE AG", /* 8494 */ "MILESYS", /* 8495 */ "Facilitair bedrijf, Hogeschool van Utrecht", /* 8496 */ "Deluxe Video Services Ltd", /* 8497 */ "Akumiitti Ltd", /* 8498 */ "Eduserv", /* 8499 */ "Dr. Nagler & Cie. Consult GmbH", /* 8500 */ "ANTEL - Operations", /* 8501 */ "Internet Park, Inc.", /* 8502 */ "Unicess Networks", /* 8503 */ "Sparzo Enterprises", /* 8504 */ "SKYTEC AG", /* 8505 */ "Ximian, Inc.", /* 8506 */ "CyberTrails, LLC", /* 8507 */ "Final Piece", /* 8508 */ "ViNAWARA Co.,Ltd.", /* 8509 */ "Yunbj Co.,Ltd.", /* 8510 */ "ThoughtWorks, Inc.", /* 8511 */ "Capgemini Telecom Media & Networks Sweden AB", /* 8512 */ "Katelco", /* 8513 */ "Sonocomp GmbH", /* 8514 */ "Deonet Co., Ltd.", /* 8515 */ "Proxion Org", /* 8516 */ "APL/Software", /* 8517 */ "JGiovatto", /* 8518 */ "Trevalon, Inc.", /* 8519 */ "Winterlink Inc", /* 8520 */ "Bytemobile, Inc.", /* 8521 */ "Machinebuilt Software, Inc.", /* 8522 */ "Petrasoft Inc", /* 8523 */ "Cybercafe", /* 8524 */ "Paula's Home Creations", /* 8525 */ "Consiglio Nazionale del Notariato", /* 8526 */ "Harvard MIT Data Center", /* 8527 */ "HeyAnita Inc.", /* 8528 */ "Salira Optical Network Systems, Inc.", /* 8529 */ "MomsDesk Commerce Corporation", /* 8530 */ "SyncWorks", /* 8531 */ "NANYA Technology Corp.", /* 8532 */ "Snapshield", /* 8533 */ "HiHat Enterprise Solutions", /* 8534 */ "Nekhem Technologies", /* 8535 */ "Datachorus", /* 8536 */ "Turbo NetWorks Co., Ltd.", /* 8537 */ "Saxonia Systems AG", /* 8538 */ "Institute \"Norilskproject\"", /* 8539 */ "LCPC", /* 8540 */ "Interactive Media S.r.l.", /* 8541 */ "Sandial Systems, Inc.", /* 8542 */ "Global TeleLink Services, Inc.", /* 8543 */ "SmallBuddha.org", /* 8544 */ "HTL Steyr", /* 8545 */ "Coleebris", /* 8546 */ "Mississippi State University", /* 8547 */ "South Suburban College", /* 8548 */ "Cylant Technology", /* 8549 */ "Hatteras Networks", /* 8550 */ "Yotta Networks, Inc", /* 8551 */ "TechTracker.com", /* 8552 */ "Subtheory", /* 8553 */ "Departement Elektrotechnik, ETH Zuerich", /* 8554 */ "Digitalwave, Inc", /* 8555 */ "Bank MENATEP SPb, Samara", /* 8556 */ "Globaloop Ltd.", /* 8557 */ "Gimnazija Bezigrad Ljubljana", /* 8558 */ "Coconut", /* 8559 */ "Cleverlance s.r.o.", /* 8560 */ "Hotsip", /* 8561 */ "Platinet Communications", /* 8562 */ "SSE", /* 8563 */ "CTI2", /* 8564 */ "Medical Research Laboratories", /* 8565 */ "Lasse Hillerøe Petersen", /* 8566 */ "Active Power, Inc.", /* 8567 */ "VirtualTek Corporation", /* 8568 */ "iXON", /* 8569 */ "Enonic", /* 8570 */ "ConnectSuite", /* 8571 */ "TDS Informationstechnologie AG", /* 8572 */ "S4i", /* 8573 */ "SEAS LLC", /* 8574 */ "ManageIT Company", /* 8575 */ "Flowstone, Inc.", /* 8576 */ "Axiowave Networks", /* 8577 */ "People.Com, Inc,", /* 8578 */ "Operadora Protel, SA de CV", /* 8579 */ "Tellme Networks, Inc.", /* 8580 */ "Oy Comsel System Ab Kristian", /* 8581 */ "Netgene Tech. Inc.", /* 8582 */ "Kabelfoon BV", /* 8583 */ "Sorbonne", /* 8584 */ "MEDAV Digitale Signalverarbeitung GmbH", /* 8585 */ "MODCOMP GmbH", /* 8586 */ "WiredMinds Informationssysteme GmbH", /* 8587 */ "Munich Re Insurance AG", /* 8588 */ "Framesoft AG Software Applications", /* 8589 */ "Okena, Inc.", /* 8590 */ "ManSoft", /* 8591 */ "CGI", /* 8592 */ "WebTone Technologies", /* 8593 */ "Telia eTelia A/S", /* 8594 */ "HITRON Technology, Inc.", /* 8595 */ "NEUSOFT CO.,LTD", /* 8596 */ "Access Solutions International Corporation", /* 8597 */ "Digital Diagnostic Imaging", /* 8598 */ "Velankani Information Systems Ltd.", /* 8599 */ "Linux Generation B.V.", /* 8600 */ "BellSouth Customer Technologies", /* 8601 */ "Qarana Solutions", /* 8602 */ "Flarion Technologies", /* 8603 */ "Leapfrog Technologies LLC", /* 8604 */ "Wireless Knowledge", /* 8605 */ "Vancouver School District # 37", /* 8606 */ "Portland Internetworks", /* 8607 */ "Cini Systems", /* 8608 */ "Newsradar Deutschland", /* 8609 */ "Snmp Everywhere", /* 8610 */ "VSoft", /* 8611 */ "Toe Technology Company Limited", /* 8612 */ "HealthNetwork Systems", /* 8613 */ "Roxen Internet Software", /* 8614 */ "BioWare Corp.", /* 8615 */ "Witt Family", /* 8616 */ "ATYF", /* 8617 */ "iProperty.com", /* 8618 */ "David Hopwood Network Security", /* 8619 */ "AKO", /* 8620 */ "Excido Pty Ltd", /* 8621 */ "Satyam Infoway Limited", /* 8622 */ "RadioMobil a.s.", /* 8623 */ "Denis Neuhart Computing", /* 8624 */ "The Lifetime Healthcare Companies", /* 8625 */ "Club Internet", /* 8626 */ "Ailis", /* 8627 */ "Arkoon Network Security", /* 8628 */ "Fireclick", /* 8629 */ "MPI tech", /* 8630 */ "MeshNetworks, Inc.", /* 8631 */ "Winphoria Networks", /* 8632 */ "Atmos Energy Corporation", /* 8633 */ "The ZaneRay Group, Inc.", /* 8634 */ "Rob Semenoff Enterprises", /* 8635 */ "Planet Pratt", /* 8636 */ "Amphus, Inc.", /* 8637 */ "RouteScience Technologies, Inc.", /* 8638 */ "Polytrust AB", /* 8639 */ "Santam Limited", /* 8640 */ "7441.com", /* 8641 */ "EnderUNIX", /* 8642 */ "The Math Forum", /* 8643 */ "Anoto", /* 8644 */ "InfiniSwitch Corporation", /* 8645 */ "Scottish Qualifications Authority", /* 8646 */ "Winbox.com", /* 8647 */ "Renaissance Technologies Corp.", /* 8648 */ "Pinnacle Technology, Inc.", /* 8649 */ "Apriva, Inc.", /* 8650 */ "Heart Institute (InCor), University of São Paulo Medical School", /* 8651 */ "Uppsala University", /* 8652 */ "unassigned", /* 8653 */ "INTRINsec", /* 8654 */ "Apcentric Limited", /* 8655 */ "DCM Online Limited", /* 8656 */ "Hochschulrechenzentrum, Fachhochschule fuer Wirtschaft und Technik(FHTW) Berlin", /* 8657 */ "Empresa Nacional de Certificacion Electronica", /* 8658 */ "Asia e-publications Ltd.", /* 8659 */ "Telaid", /* 8660 */ "University of Utah College of Engineering CADE Lab", /* 8661 */ "University of Louisville", /* 8662 */ "Bermuda Triangle Services Ltd", /* 8663 */ "Akeena, Inc.", /* 8664 */ "Bruce Technical Services", /* 8665 */ "FirstPeer", /* 8666 */ "Textme.org Ltd", /* 8667 */ "Eli Lilly and Company", /* 8668 */ "Teracom Telecomunicações Ltda", /* 8669 */ "Polyester Media", /* 8670 */ "ETI", /* 8671 */ "Farmers Insurance", /* 8672 */ "Borderware Technologies Inc.", /* 8673 */ "Java Secure", /* 8674 */ "Autodesk, Inc.", /* 8675 */ "Transparent", /* 8676 */ "ISDN-Net, Inc.", /* 8677 */ "Intrusion.com", /* 8678 */ "Atlas Copco Airpower", /* 8679 */ "Open Roads Consulting Inc.", /* 8680 */ "Free Speech Media LLC", /* 8681 */ "UltraSecure.com", /* 8682 */ "Integrity Systems Ltd.", /* 8683 */ "frd.net", /* 8684 */ "Habeebee", /* 8685 */ "Personal Evaluation", /* 8686 */ "Milestone R/D Labs", /* 8687 */ "Shepherd-Express", /* 8688 */ "Miller Simon McGinn and Clark", /* 8689 */ "IPAGEON Co.Ltd", /* 8690 */ "Moxa Technologies Co., Ltd.", /* 8691 */ "Network Programs", /* 8692 */ "A-xell Wireless AB", /* 8693 */ "University of Wolverhampton", /* 8694 */ "Mission Data", /* 8695 */ "myCustoms", /* 8696 */ "Raiffeisen Informatik GmbH", /* 8697 */ "Viasat, Inc.", /* 8698 */ "iWay Software", /* 8699 */ "World Savings", /* 8700 */ "Intelligent Information Systems", /* 8701 */ "Noncyclic Networks", /* 8702 */ "Voyus Canada Inc.", /* 8703 */ "Sakhalinsvyaz JSC", /* 8704 */ "Israel Local Authorities Data Processing Center LTD", /* 8705 */ "Unassigned", /* 8706 */ "SpiderNet Services Ltd", /* 8707 */ "Lumentis AB", /* 8708 */ "Landesamt für Besoldung und Versorgung NRW", /* 8709 */ "Envoy Networks", /* 8710 */ "THALES Broadcast & Multimedia", /* 8711 */ "LANcope, Inc.", /* 8712 */ "Abako Media Oy", /* 8713 */ "iNOC, Inc.", /* 8714 */ "Health Sciences Centre", /* 8715 */ "Triveni Digital, Inc.", /* 8716 */ "David Mistretta", /* 8717 */ "Gwent Consultancy", /* 8718 */ "Raviant Networks, Inc.", /* 8719 */ "Zack Systems, Inc.", /* 8720 */ "Ingram Technology Limited", /* 8721 */ "etoolbelt.net", /* 8722 */ "Integrated Data Pty Ltd", /* 8723 */ "Human Technology", /* 8724 */ "Canberra Institute of Technology", /* 8725 */ "Incisive Designs", /* 8726 */ "Torry Harris Business Solutions Thirunavukarasu", /* 8727 */ "Computer Network Information Center, Chinese Academy of Sciences", /* 8728 */ "LETEK Communications, Inc.", /* 8729 */ "Serck Controls Ltd.", /* 8730 */ "Pantor Engineering AB", /* 8731 */ "Tokyo Institute of Technology", /* 8732 */ "Ambient Computing, Inc.", /* 8733 */ "Matthias Wimmer", /* 8734 */ "Quark Inc.", /* 8735 */ "MetaVector Technologies", /* 8736 */ "SecureNet GmbH - Intranet & Internet Solutions", /* 8737 */ "Pirelli Informatica S.p.A.", /* 8738 */ "KAPTECH", /* 8739 */ "KOM Networks", /* 8740 */ "SonicWALL, Inc.", /* 8741 */ "Alphion", /* 8742 */ "RadioFrame Networks", /* 8743 */ "Colubris Networks Inc.", /* 8744 */ "Informática para todos, SA de CV", /* 8745 */ "Queensland University of Technology", /* 8746 */ "Libelle AG", /* 8747 */ "LOQUENDO SpA", /* 8748 */ "TELCOM ITALIA LAB", /* 8749 */ "Bucknell University", /* 8750 */ "Geodesic Systems", /* 8751 */ "Kernel", /* 8752 */ "Dataflow Alaska, Inc.", /* 8753 */ "XouL", /* 8754 */ "Hebrew University Computation Center", /* 8755 */ "Celltick", /* 8756 */ "Feather Mobile Systems", /* 8757 */ "Walnut Concepts", /* 8758 */ "LG Innotek Co., Ltd.", /* 8759 */ "NEITech", /* 8760 */ "Zavod za varnostne tehnologije informacijske druzbe in elektronsko", /* 8761 */ "SI-CA", /* 8762 */ "eIQnetworks", /* 8763 */ "KB Electronics Ltd", /* 8764 */ "Telesoft Technologies Ltd", /* 8765 */ "Elsag S.p.A.", /* 8766 */ "Bayour.COM", /* 8767 */ "Nevion", /* 8768 */ "TeraOptic Networks, Inc.", /* 8769 */ "The Emerginggroup Group", /* 8770 */ "ARCANVS, Inc.", /* 8771 */ "e-Manufacturing Networks Inc.", /* 8772 */ "CHINA TEXTILE NETWORK CO.,LTD.", /* 8773 */ "Universal Scientific Industrial Co., Ltd.", /* 8774 */ "BeST (Business Execution-Solutions & Technology) Dave", /* 8775 */ "Zman Tikshuv", /* 8776 */ "aQute", /* 8777 */ "SYAC", /* 8778 */ "Telespazio", /* 8779 */ "ip-connect GmbH", /* 8780 */ "ChamberSign", /* 8781 */ "Keutel", /* 8782 */ "akella.org", /* 8783 */ "BroadQuay Consultancy Ltd.", /* 8784 */ "Guay Internet", /* 8785 */ "SecureOps Inc.", /* 8786 */ "Ivrnet Inc.", /* 8787 */ "CyberGate Internet Services", /* 8788 */ "PreNet Corporation", /* 8789 */ "Prisa Networks", /* 8790 */ "ivv GmbH", /* 8791 */ "Axes India Ltd", /* 8792 */ "Realize IT GmbH", /* 8793 */ "eYak Inc.", /* 8794 */ "Inteliguard", /* 8795 */ "Gestion del Conocimiento S.A. Miquel", /* 8796 */ "Mannesmann Arcor AG & Co", /* 8797 */ "IT-Management & Solution GmbH", /* 8798 */ "cypherOptics", /* 8799 */ "YH Consulting", /* 8800 */ "SenaReider", /* 8801 */ "Yehti, Inc.", /* 8802 */ "Thuridion", /* 8803 */ "Kirana Networks", /* 8804 */ "Kessler-Huron Computer Systems", /* 8805 */ "Gluon Networks", /* 8806 */ "Finestra Software", /* 8807 */ "Xi'an Xinli Network System Technology Co.,Ltd", /* 8808 */ "Tomorrow Software", /* 8809 */ "Artigas Computer", /* 8810 */ "Prompt2U", /* 8811 */ "ITBS OnLine", /* 8812 */ "Skyline Communications", /* 8813 */ "Funcom NV", /* 8814 */ "Collectively Sharper", /* 8815 */ "getyourcar AG", /* 8816 */ "Websemantix", /* 8817 */ "SandCherry Networks, Inc.", /* 8818 */ "Raytion", /* 8819 */ "sysTime-solutions AG", /* 8820 */ "Phi Kappa Theta Fraternity - Gamma Tau Chapter", /* 8821 */ "Linuxcare, Inc.", /* 8822 */ "I.NET S.p.A.", /* 8823 */ "Wizzy", /* 8824 */ "DNX Communications", /* 8825 */ "ComNet Software Specialists,Inc", /* 8826 */ "Nu-kote International", /* 8827 */ "General Dynamics Advanced Information Systems", /* 8828 */ "Axell Wireless Limited", /* 8829 */ "Xyphius Solutions Inc.", /* 8830 */ "Agora Systems Ltd", /* 8831 */ "Ecominds Ltd", /* 8832 */ "ISPMan", /* 8833 */ "Cognet Corp.", /* 8834 */ "Wizard Productions", /* 8835 */ "AUUG Incorporated", /* 8836 */ "AscenVision", /* 8837 */ "ACS Internet, Inc.", /* 8838 */ "Microtest", /* 8839 */ "MBridge Systems Inc.", /* 8840 */ "InterCom International Communications Ltd.", /* 8841 */ "Clockwork Web", /* 8842 */ "INACCESS NETWORKS SA", /* 8843 */ "Diveo Broadband Networks", /* 8844 */ "Enablence USA FTTX Networks Inc", /* 8845 */ "Caramail", /* 8846 */ "Pivotech Systems, Inc", /* 8847 */ "Rootroute Research", /* 8848 */ "LPMD.ORG", /* 8849 */ "Cyradis Technology Group Inc.", /* 8850 */ "Ultra Enterprises", /* 8851 */ "AARNet Pty Ltd", /* 8852 */ "A-Trust", /* 8853 */ "INTENS IT", /* 8854 */ "Intelsis Sistemas Inteligentes S.A. Cesar", /* 8855 */ "IdecNet SA", /* 8856 */ "Nauticus Networks Inc.", /* 8857 */ "destef.com Software", /* 8858 */ "Private Business Inc.", /* 8859 */ "Holcim Group Support Ltd.", /* 8860 */ "Secorvo Security Consulting GmbH", /* 8861 */ "AppWired, Inc.", /* 8862 */ "Etiers International Inc", /* 8863 */ "Dystopium.com", /* 8864 */ "FAST Search and Transfer", /* 8865 */ "GeoTEC Internet", /* 8866 */ "StoreAge Networking Technologies", /* 8867 */ "Velos, Inc.", /* 8868 */ "Coscend Corporation", /* 8869 */ "KINS(Knowlege and Information Net for Sharing) Lab.", /* 8870 */ "Porthole Interactive Technologies", /* 8871 */ "Saintjo", /* 8872 */ "JAL INFORMATION TECHNOLOGY CO.,LTD.", /* 8873 */ "Utt Technologies", /* 8874 */ "Columbitech AB", /* 8875 */ "willeke.com", /* 8876 */ "Suntail", /* 8877 */ "Firmenich SA", /* 8878 */ "Zetac Limited", /* 8879 */ "IDENTEC Solutions AG", /* 8880 */ "Trust Italia S.p.a.", /* 8881 */ "Empower Interactive Group Limited", /* 8882 */ "Moonlight Systems", /* 8883 */ "Versant Corporation", /* 8884 */ "Internet Security One Ltd.", /* 8885 */ "Beijing Raisecom Scientific & Technology Development Co., Ltd.", /* 8886 */ "VASoft (Pty) Ltd.", /* 8887 */ "WEBGSM", /* 8888 */ "virtual solution AG", /* 8889 */ "Broadcast Technology Limited", /* 8890 */ "sforce.org", /* 8891 */ "Chaman Productions", /* 8892 */ "Mobilitec", /* 8893 */ "Rivermen AB", /* 8894 */ "Information Systems Consulting (Insyc)", /* 8895 */ "Sistematica", /* 8896 */ "Alltel Information Services", /* 8897 */ "Weavers Network Consulting", /* 8898 */ "The McGraw-Hill Companies", /* 8899 */ "Intellitactics", /* 8900 */ "Monkeybagel Hardware Solutions", /* 8901 */ "GeoTEC Internet", /* 8902 */ "NetNearU CorporateTAM", /* 8903 */ "Cooper Industries", /* 8904 */ "HuntCorp Enterprises", /* 8905 */ "Solnet Pty Ltd", /* 8906 */ "GE CompuNet Computer AG & Co. oHG", /* 8907 */ "Belgacom NV of public Law", /* 8908 */ "DICA Technologies AG", /* 8909 */ "Meitner - Soluções Internet e Sistemas de Informação, Lda", /* 8910 */ "Appelsiini Finland Oy", /* 8911 */ "Alice's Registry, Inc.", /* 8912 */ "Federal Linux Systems", /* 8913 */ "Galderma Laboratories L.P.", /* 8914 */ "Ralf Bensmann", /* 8915 */ "Infogate Online", /* 8916 */ "Strelitzia Be", /* 8917 */ "J-PHONE EAST CO.,LTD.", /* 8918 */ "Huysmans en Kuypers Automatiseringsburo", /* 8919 */ "Bamboo MediaCasting", /* 8920 */ "Nice Work Textile Corp.Ltd", /* 8921 */ "RESI Informatica S.r.l.", /* 8922 */ "Keyware", /* 8923 */ "Inforad - Com. Serv Ltda.", /* 8924 */ "Transora", /* 8925 */ "VIP Switch Inc.", /* 8926 */ "Paceline Systems Corporation", /* 8927 */ "Asta Networks", /* 8928 */ "Dominion Electronics Pty Ltd", /* 8929 */ "Pelago Networks", /* 8930 */ "Cordell, Inc", /* 8931 */ "WaterWare Internet Services, Inc.", /* 8932 */ "Wokup", /* 8933 */ "b-process", /* 8934 */ "Wisdom Assen BV", /* 8935 */ "WebToGrid", /* 8936 */ "Thirdspace Living Ltd", /* 8937 */ "Cyberell Oy", /* 8938 */ "Frontec netSolution AB", /* 8939 */ "SAVVIS Communications", /* 8940 */ "JC Enterprises", /* 8941 */ "AMX Corp", /* 8942 */ "Analog Design Autoamtion Inc.", /* 8943 */ "Obfuscated Networking", /* 8944 */ "In-Q-Tel Inc.", /* 8945 */ "ThinAirApps", /* 8946 */ "Viacore, Inc.", /* 8947 */ "A S Promotions LTD", /* 8948 */ "OuterSpace Consultants", /* 8949 */ "webBASIS, Inc.", /* 8950 */ "Platys Communications", /* 8951 */ "JSC Belsvyaz", /* 8952 */ "MightySun LLC", /* 8953 */ "VTEX Typesetting Services", /* 8954 */ "GORGY TIMING", /* 8955 */ "ZICOM Electronic Security Systems Ltd.", /* 8956 */ "Railinfrabeheer BV", /* 8957 */ "James A. Mahlen & Associates", /* 8958 */ "IER Incorporated", /* 8959 */ "Coree Networks Inc.", /* 8960 */ "Paradigm Secure Communications", /* 8961 */ "IntruVert Networks, Inc.", /* 8962 */ "Advanced Web Communication, division of Xecom, Incorporated", /* 8963 */ "Bezirksregierung Duesseldorf", /* 8964 */ "Dff Internet & Medien", /* 8965 */ "PurOptix", /* 8966 */ "NASA JSC", /* 8967 */ "Juha Saarinen IT Writer", /* 8968 */ "Rio Tinto", /* 8969 */ "Argogroup Interactive Ltd", /* 8970 */ "Speed to Market Engines", /* 8971 */ "IP Powerhouse Ltd.", /* 8972 */ "Grupo Eurociber S.A.", /* 8973 */ "Universitaet Marburg", /* 8974 */ "Soluzione Script GmbH", /* 8975 */ "Airia, Inc.", /* 8976 */ "Synamics Inc.", /* 8977 */ "Sears Holdings Corp", /* 8978 */ "The Real Asset Company Limited", /* 8979 */ "Collective Technologies", /* 8980 */ "Joeunsecurity", /* 8981 */ "Ipertrade s.r.l.", /* 8982 */ "Bivio Networks", /* 8983 */ "C J SPAANS", /* 8984 */ "The Synaptic Group, Inc.", /* 8985 */ "Arcotect Limited", /* 8986 */ "State Infocommunication Foundation of Estonia", /* 8987 */ "Pingworks", /* 8988 */ "Naino Corporation", /* 8989 */ "Redpill Linpro AS", /* 8990 */ "MARPOSS S.p.A.", /* 8991 */ "Unisoft Consultants", /* 8992 */ "Asera Inc.", /* 8993 */ "Avantas Networks", /* 8994 */ "Lo-Wang.org", /* 8995 */ "TransactPlus, Inc.", /* 8996 */ "ProArp Inc.", /* 8997 */ "Cottay", /* 8998 */ "TVS eTechnology Limited", /* 8999 */ "Personal Path Systems, Inc.", /* 9000 */ "Goltier Media Group (Sitepak)", /* 9001 */ "LXPRO.COM", /* 9002 */ "slimjones.", /* 9003 */ "SuSE Linux Venezuela, C.A.", /* 9004 */ "Video Networks Limited", /* 9005 */ "Apache Consulting Ltd.", /* 9006 */ "FineGround Networks", /* 9007 */ "Digital Route", /* 9008 */ "Agni Systems Limited", /* 9009 */ "Liebenzell Mission", /* 9010 */ "Laminar Software, Inc.", /* 9011 */ "MailVision Ltd.", /* 9012 */ "SpiritSoft Inc", /* 9013 */ "Belenos, Inc.", /* 9014 */ "World Streaming Network, Inc.", /* 9015 */ "FreeRein Corporation", /* 9016 */ "Cogent Systems, Inc.", /* 9017 */ "CQR Data Ltd.", /* 9018 */ "Cap Gemini Telecom Media & Networks Deutschland GmbH", /* 9019 */ "Computer Adaptive Technologies, Inc.", /* 9020 */ "WideOpenWest LLC", /* 9021 */ "TrueSAN Networks", /* 9022 */ "Netsanity Inc.", /* 9023 */ "Telia Internet, Inc.", /* 9024 */ "NetCologne", /* 9025 */ "adisoft systems GmbH & Co. KG", /* 9026 */ "SoftNerd", /* 9027 */ "Lendx", /* 9028 */ "BSD Users Group Italia", /* 9029 */ "iVMG Incorporated", /* 9030 */ "Nexter Information Technology", /* 9031 */ "IVSTel", /* 9032 */ "Elion Enterprises Ltd", /* 9033 */ "Jabber.com", /* 9034 */ "Carlisle FoodService Products", /* 9035 */ "Jim Dutton", /* 9036 */ "Everyday Office Inc.", /* 9037 */ "Well Diagnostics", /* 9038 */ "Chengdu Ideal Telecom Technology,Inc.", /* 9039 */ "Chengdu Ideal Information Industry Co,Ltd.", /* 9040 */ "Cambridge University Engineering Department", /* 9041 */ "Teinos", /* 9042 */ "Execulink", /* 9043 */ "NEC Eluminant Technologies, Inc.", /* 9044 */ "eNetSecure, Inc", /* 9045 */ "Amecisco", /* 9046 */ "Blue Cross Blue Shield of Florida", /* 9047 */ "Open System Consultants", /* 9048 */ "Integrity Online", /* 9049 */ "Telenor Link AS", /* 9050 */ "Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa", /* 9051 */ "Sunbay Software AG", /* 9052 */ "Tovaris IP LC", /* 9053 */ "Tokheim", /* 9054 */ "9Rivers.com", /* 9055 */ "TelStrat Int'l", /* 9056 */ "Millennium Communication Network", /* 9057 */ "Jamcracker", /* 9058 */ "Vectrad Networks Corporation", /* 9059 */ "RuleSpace, Inc.", /* 9060 */ "Deutscher Go-Bund", /* 9061 */ "SRS Microsystems", /* 9062 */ "iHive Technology Pte Ltd", /* 9063 */ "ATM ComputerSysteme GmbH", /* 9064 */ "Nettasking Technology (Singapore) Pte Ltd.", /* 9065 */ "Global Security Technologies, Inc.", /* 9066 */ "Cambia Networks", /* 9067 */ "Delphi Associates, Ltd.", /* 9068 */ "Phillip's Technical Services", /* 9069 */ "Symmetricom", /* 9070 */ "Spirian Technologies, Inc.", /* 9071 */ "AckleyNet", /* 9072 */ "Sunnyvale Community Players", /* 9073 */ "John M. Sutherland, Inc.Insurance", /* 9074 */ "Novex Solutions", /* 9075 */ "Tokyo Metallic Commuynications Corp.", /* 9076 */ "Dekart", /* 9077 */ "Be Connected Ltd", /* 9078 */ "The Sanjyot Bharathan Design Association", /* 9079 */ "Babel Com Australia", /* 9080 */ "eachnet", /* 9081 */ "eXtremail", /* 9082 */ "eteamconsulting.com", /* 9083 */ "Keynote Systems, Inc.", /* 9084 */ "Optical Switch Corporation", /* 9085 */ "US Robotics", /* 9086 */ "Brightmail, Inc.", /* 9087 */ "Oso Grande Technologies, Inc.", /* 9088 */ "New Mexico Technet, Inc.", /* 9089 */ "Datagrove", /* 9090 */ "MICRO-STAR INT'L CO., Ltd.", /* 9091 */ "Veenstra Graphic Solutions", /* 9092 */ "Innovate I.T. Logistics BV", /* 9093 */ "Amber Archer Consulting Co., Inc.", /* 9094 */ "NIPPON MITSUBISHI OIL CORPORATION", /* 9095 */ "Zentrum für Produkt Entwicklung, ETH Zürich", /* 9096 */ "CDFtel", /* 9097 */ "DW Systems", /* 9098 */ "Central Systems International, Inc.", /* 9099 */ "Mstel", /* 9100 */ "Optum Computing Solutions, Inc.", /* 9101 */ "Telecash Kommunikations-Service GmbH", /* 9102 */ "Yu-Shei Real Estate Co.", /* 9103 */ "Chu-Shen Co. Ltd", /* 9104 */ "MIST", /* 9105 */ "ELIOS Informatique", /* 9106 */ "Ferguson Enterprises, Inc.", /* 9107 */ "Random Walk Computing, Inc.", /* 9108 */ "infogear", /* 9109 */ "Net Asia Angeles CIty", /* 9110 */ "Newway Tech. Inc.", /* 9111 */ "Palamedes GmbH", /* 9112 */ "Wiral Ltd", /* 9113 */ "YLine Web Access Services", /* 9114 */ "Archon Technologies, Inc.", /* 9115 */ "Ubicom, Inc", /* 9116 */ "LeWiz Communications Inc.", /* 9117 */ "1Ci GmbH", /* 9118 */ "Advanced Rotorcraft Technology, Inc.", /* 9119 */ "Narada Networks Inc.", /* 9120 */ "Eduquip Limited", /* 9121 */ "UPCtv Interactive", /* 9122 */ "Université Pierre Mendès France", /* 9123 */ "Intellitactics Inc.", /* 9124 */ "Inspiration Technology Pty Ltd", /* 9125 */ "Aetian Networks", /* 9126 */ "ADVANCED PERIPHERALS TECH. Inc.", /* 9127 */ "Centre de traduction des organes de l'Union européenne", /* 9128 */ "Linkvest SA", /* 9129 */ "Hemisphere Technologies", /* 9130 */ "Roland Felnhofer", /* 9131 */ "Hutchison OPTEL Telecom Technology CO.,Ltd", /* 9132 */ "Microraab Electronics", /* 9133 */ "Telenet NV", /* 9134 */ "Heyde AG", /* 9135 */ "ISDN Communications Ltd", /* 9136 */ "Anatel Communications", /* 9137 */ "AnteFacto", /* 9138 */ "Petroleum Business Institute", /* 9139 */ "Media General, Inc.", /* 9140 */ "Riptech", /* 9141 */ "Infopaq International A/S", /* 9142 */ "Edmunds.com", /* 9143 */ "Trader Electronic Media", /* 9144 */ "AccessPt. Inc.", /* 9145 */ "Reporter-Times, Inc.", /* 9146 */ "TeaLeaf Technology, Inc.", /* 9147 */ "Acme Packet", /* 9148 */ "LOCUS Corporation", /* 9149 */ "Metromedia Fiber Network", /* 9150 */ "Wiral Ltd.", /* 9151 */ "Dit Company Limited", /* 9152 */ "Sodielec Telecom", /* 9153 */ "Figment Technologies Inc.", /* 9154 */ "BlueNetworkX", /* 9155 */ "eGurkha Pvt Ltd.", /* 9156 */ "CoreComm", /* 9157 */ "The Internet Group", /* 9158 */ "SHad0ws.net", /* 9159 */ "DGT Sp. z o.o.", /* 9160 */ "Universidad del Pais Vasco", /* 9161 */ "Pädagogische Hochschule Freiburg", /* 9162 */ "GNU Radius Project", /* 9163 */ "Xware AB", /* 9164 */ "Cabinet Remouit", /* 9165 */ "Universidad Galileo", /* 9166 */ "ANXeBusiness Corp", /* 9167 */ "Transaccess", /* 9168 */ "Novis Telecom, SA", /* 9169 */ "Exaecon Inc.", /* 9170 */ "NetTone", /* 9171 */ "HVC Technologies", /* 9172 */ "Kohl's", /* 9173 */ "A2V ict", /* 9174 */ "Stream Theory, Inc", /* 9175 */ "Open-IT", /* 9176 */ "ThinkFree.Com, Inc", /* 9177 */ "DaeSung Corp.", /* 9178 */ "INTESABCI SISTEMI E SERVIZI", /* 9179 */ "Maranti Networks, Inc", /* 9180 */ "Air Technology Systems", /* 9181 */ "FileFish, Inc.", /* 9182 */ "Samba TNG", /* 9183 */ "Alterbox", /* 9184 */ "MS Integration Services Inc.", /* 9185 */ "Logipolis Pte Ltd", /* 9186 */ "Eastman Chemical Company", /* 9187 */ "Force Computers", /* 9188 */ "Promedico Gmbh", /* 9189 */ "Katanoo Technologies", /* 9190 */ "Burgiesoft", /* 9191 */ "Pirkan Tietokone Oy", /* 9192 */ "CIRPACK", /* 9193 */ "AustLII", /* 9194 */ "AutocontControl Systems, spol. s r. o.", /* 9195 */ "Algotronics", /* 9196 */ "Lyndon State College", /* 9197 */ "Teletron Ltd.", /* 9198 */ "Daum Datentechnik", /* 9199 */ "Obermeier Software", /* 9200 */ "Fasturn Inc.", /* 9201 */ "EnsureLink", /* 9202 */ "SeguriDATA Privada, S.A. de C.V.", /* 9203 */ "Aurora Networks, Inc.", /* 9204 */ "Moj. Net d.o.o.", /* 9205 */ "DigitalSpark", /* 9206 */ "segNET Technology, Inc.", /* 9207 */ "Hamilcar Development", /* 9208 */ "Peace Technology, Inc.", /* 9209 */ "Merlin I.T. Services Ltd", /* 9210 */ "Rabobank ICT", /* 9211 */ "Wavium AB", /* 9212 */ "NetSeal Technologies", /* 9213 */ "Kemuri Systems", /* 9214 */ "ERIDAN Informatique", /* 9215 */ "Universidade de Évora, Departamento de Informática", /* 9216 */ "BIOBASE Biological Databases/ Biologische Datenbanken GmbH", /* 9217 */ "Skysoft Portugal", /* 9218 */ "Juliao.com", /* 9219 */ "OPENJCC", /* 9220 */ "Shaw Communications", /* 9221 */ "Phillips Petroleum Company", /* 9222 */ "Roskilde University", /* 9223 */ "Lawrence University", /* 9224 */ "FJA", /* 9225 */ "Microtest", /* 9226 */ "Entrisphere, Inc.", /* 9227 */ "Globetech", /* 9228 */ "Totilities", /* 9229 */ "#B4mad Research Lab Organization", /* 9230 */ "Adir Technologies", /* 9231 */ "Norwegian Mapping Authority", /* 9232 */ "IER SA", /* 9233 */ "Snowshore Networks Inc", /* 9234 */ "FCB Direct Montreal", /* 9235 */ "Fundtech Corporation", /* 9236 */ "Newisys", /* 9237 */ "Imagine Broadband Limited", /* 9238 */ "JonesKnowledge.com", /* 9239 */ "International MRI Accreditation Resources, LLC", /* 9240 */ "uni-X Software AG", /* 9241 */ "Instituto de Matemática e Estatística da Universidade de São Paulo", /* 9242 */ "Air'Prod", /* 9243 */ "PureCarbon, Inc.", /* 9244 */ "Neuromics, Inc.", /* 9245 */ "Automated Handling Systems, Inc.", /* 9246 */ "Federal-Mogul Corporation", /* 9247 */ "Paktronix Systems LLC", /* 9248 */ "Musambi Corporation", /* 9249 */ "Strix Systems", /* 9250 */ "TR Associates", /* 9251 */ "Hôtel-Dieu De Saint-Jérôme", /* 9252 */ "Buildscape, LLC", /* 9253 */ "Pajunas Interactive, Inc.", /* 9254 */ "Vicinity Corporation", /* 9255 */ "LightPointe Communications", /* 9256 */ "Volera", /* 9257 */ "XMLStrategies.net", /* 9258 */ "SYSPOL Co., Ltd.", /* 9259 */ "ADTEC Corporation", /* 9260 */ "Delphi Automotive Systems Investment (China) Holding Co.,Ltd", /* 9261 */ "EAST.NET Co. Ltd.", /* 9262 */ "Cybernetics Technology Co., Ltd.", /* 9263 */ "Caerdroia", /* 9264 */ "TDISIE", /* 9265 */ "Parsoft Systems Pvt. Ltd.", /* 9266 */ "in-systemeGmbH", /* 9267 */ "Ruhrverband", /* 9268 */ "MediaBroadcast GmbH", /* 9269 */ "Callsys Ltd.", /* 9270 */ "Siemens NGNI", /* 9271 */ "Elektrobit Ltd.", /* 9272 */ "Neuro Telecom", /* 9273 */ "access:Seven Communications GmbH", /* 9274 */ "GENESYS", /* 9275 */ "Sema Spain NEG", /* 9276 */ "LOGICO Smart Card Solutions AG", /* 9277 */ "econia.com", /* 9278 */ "Arqana Technologies Inc.", /* 9279 */ "AccessLine Communications Corporation", /* 9280 */ "Standard Insurance Company", /* 9281 */ "NOCpulse", /* 9282 */ "Costa Rica Institute of Technology", /* 9283 */ "Western Illinois University", /* 9284 */ "InternetCDS", /* 9285 */ "Maximum Throughput Inc.", /* 9286 */ "Zeus Communications", /* 9287 */ "HostPro", /* 9288 */ "Unirez, Inc.", /* 9289 */ "Firinn.org", /* 9290 */ "Rainfinity", /* 9291 */ "Webley System", /* 9292 */ "Staturn Computer", /* 9293 */ "W4y do Brasil Ltda", /* 9294 */ "Workers Compensation Fund", /* 9295 */ "Xlight Photonics Ltd", /* 9296 */ "Ayeca Inc.", /* 9297 */ "University of Compiègne", /* 9298 */ "Hellas On Line", /* 9299 */ "Hypostasis", /* 9300 */ "Spider Software", /* 9301 */ "ESI s.r.l.", /* 9302 */ "Waystream AB", /* 9303 */ "Connection Technology Systems", /* 9304 */ "Western Michigan University", /* 9305 */ "Octave Communications", /* 9306 */ "RCL Enterprises", /* 9307 */ "Oasis Technology Ltd.", /* 9308 */ "Urzad Miasta Pabianic", /* 9309 */ "ABITAB S.A.", /* 9310 */ "DI Trute", /* 9311 */ "Truth Consulting & Technology", /* 9312 */ "DaKoMa", /* 9313 */ "Curtis Family", /* 9314 */ "CARTEL SECURITE", /* 9315 */ "NetVoyager", /* 9316 */ "Tech2Work, Inc.", /* 9317 */ "DEBEKA Versicherung", /* 9318 */ "NetAktiv", /* 9319 */ "Nanning Telecom", /* 9320 */ "Screenpeaks Ltd.", /* 9321 */ "NetTech S.A.", /* 9322 */ "PC Away", /* 9323 */ "Division fo Cancer Studies, Birmingham UK", /* 9324 */ "University of California, Riverside", /* 9325 */ "Lewis and Clark College", /* 9326 */ "Hygeia Corporation", /* 9327 */ "National Institutes of Health (NIH)", /* 9328 */ "Crusoe Communications, Inc.", /* 9329 */ "Selesta S.p.A.", /* 9330 */ "MaXware International AS", /* 9331 */ "Applied SNMP", /* 9332 */ "Lincom Wireless", /* 9333 */ "IPDR.org", /* 9334 */ "PowerSoft", /* 9335 */ "Publix Super Markets, Inc.", /* 9336 */ "Minter Corp.", /* 9337 */ "Petersen Ventures LLC", /* 9338 */ "Left Coast Systems Corp.", /* 9339 */ "Network Infinity", /* 9340 */ "Cyberfuse Technologies, LLC", /* 9341 */ "Penguin Computing", /* 9342 */ "Comcel S.A.", /* 9343 */ "Powerwave Technologies Inc.", /* 9344 */ "infinetivity, Inc.", /* 9345 */ "iGeek, Inc.", /* 9346 */ "Avaz Networks", /* 9347 */ "Golden Telecom Ukraine", /* 9348 */ "WizLAN Ltd.", /* 9349 */ "Netmagic Solutions Pvt. Ltd.", /* 9350 */ "FORTHnet S.A.", /* 9351 */ "Conundrum Communications", /* 9352 */ "Universite de Metz", /* 9353 */ "Grey Interactive France", /* 9354 */ "Krivorozhskiy Hlebokombinat N1", /* 9355 */ "nPassage, Inc.", /* 9356 */ "IT-Beratung Schaffert", /* 9357 */ "Wicom Communications Ltd", /* 9358 */ "Symeko Datasystems bv", /* 9359 */ "Green Light Inc.", /* 9360 */ "Océ Software Laboratories Namur", /* 9361 */ "ENSEIRB", /* 9362 */ "Spelio", /* 9363 */ "InterPark Incorporated", /* 9364 */ "Mindsurf Networks Inc.", /* 9365 */ "Cifra", /* 9366 */ "FASTSIGNS International, Inc", /* 9367 */ "Storage Xstreams", /* 9368 */ "Micah J. Schehl", /* 9369 */ "Space Telescope Science Institute", /* 9370 */ "Okolona Christian Church", /* 9371 */ "Ikadega, Inc.", /* 9372 */ "Clear Ink", /* 9373 */ "Hermaion.org", /* 9374 */ "Basler Kantonalbank", /* 9375 */ "CVS / PharmacyRussell", /* 9376 */ "Voyager Computer Corporation", /* 9377 */ "Ilex Systems", /* 9378 */ "Eumitcom Technology Inc.", /* 9379 */ "Octogon Gesellschaft für Computer-Dienstleistungen mbH", /* 9380 */ "Walter Biering GmbH - Mediahaus und Grafischer Betrieb", /* 9381 */ "WORAH.NET", /* 9382 */ "Angeles Design Systems", /* 9383 */ "D2K, Inc.", /* 9384 */ "Jason Wood", /* 9385 */ "Clayton College & State University", /* 9386 */ "Compania Mea", /* 9387 */ "AsiaInfo", /* 9388 */ "Magical Fruit", /* 9389 */ "W.T. Services, Inc.", /* 9390 */ "Audientia", /* 9391 */ "Cannon Hill Anglican College", /* 9392 */ "Intecs Information Ltd.", /* 9393 */ "Visana Services AG", /* 9394 */ "UEC Technologies", /* 9395 */ "Walt Disney International", /* 9396 */ "Vartech Solutions Inc.", /* 9397 */ "Tokyo Metallic Communications Corp", /* 9398 */ "CONSUL Risk ManagementDirk Wisse, Koos Lodewijkx", /* 9399 */ "Fachhochschule Konstanz", /* 9400 */ "AML Wireless Systems", /* 9401 */ "dCrypt Ltd", /* 9402 */ "Allinstant", /* 9403 */ "Dewpoint Inc.", /* 9404 */ "Kingland Systems Corporation", /* 9405 */ "Synchrologic", /* 9406 */ "Broadata Communications Inc.", /* 9407 */ "Chester Enterprises", /* 9408 */ "ClickServices", /* 9409 */ "Axe Online Pty. Limited", /* 9410 */ "Hitwise Pty Ltd", /* 9411 */ "Contela", /* 9412 */ "Operax AB", /* 9413 */ "Digital Globe, Inc.", /* 9414 */ "Archimed", /* 9415 */ "Unassigned", /* 9416 */ "egg:|", /* 9417 */ "Ivistar AG", /* 9418 */ "Siemens SiNiA", /* 9419 */ "Baltimore Technologies", /* 9420 */ "Vodafone D2", /* 9421 */ "Atanion GmbH", /* 9422 */ "Msa-Infor Sistemas e Automacao", /* 9423 */ "A&C Automacao e Controle", /* 9424 */ "Rotterdam School of Management", /* 9425 */ "Adigida Solutions", /* 9426 */ "Categoric Software", /* 9427 */ "Orgenic Software", /* 9428 */ "Mariinsky Theatre", /* 9429 */ "Progress Telecom", /* 9430 */ "Push, Inc.", /* 9431 */ "Vingage Corporation", /* 9432 */ "Vaticor Inc.", /* 9433 */ "Telergy Network Services", /* 9434 */ "Boletin Oficial del Estado", /* 9435 */ "Crysberg A/S", /* 9436 */ "Lancer Insurance Company", /* 9437 */ "YellowShirt Inc.", /* 9438 */ "Green Point Pty Ltd", /* 9439 */ "eko system Inc.", /* 9440 */ "Wall Street Systems, Inc.", /* 9441 */ "Atheros communications, Inc.", /* 9442 */ "Virage, Inc.", /* 9443 */ "FireMon", /* 9444 */ "TJB", /* 9445 */ "Indiana University", /* 9446 */ "Red Fern Software", /* 9447 */ "Zyfer", /* 9448 */ "Florida State University", /* 9449 */ "Zyoptics Inc.", /* 9450 */ "digeo", /* 9451 */ "NetLabs SRL", /* 9452 */ "Barnardos New Zealand", /* 9453 */ "future gate software GmbH", /* 9454 */ "Intelliclaim, Inc.", /* 9455 */ "Allegro Networks", /* 9456 */ "Broadband Storage, Inc.", /* 9457 */ "TCSI, Inc", /* 9458 */ "NileSOFT Ltd.", /* 9459 */ "Salta Monte Solutions, Inc.", /* 9460 */ "y2FUN.com", /* 9461 */ "MMLAB KTU", /* 9462 */ "Geyer und Weinig GmbH", /* 9463 */ "SIEL S.p.A.", /* 9464 */ "Oldenburgische Landesbank AG", /* 9465 */ "CILEA", /* 9466 */ "iBanx B.V.", /* 9467 */ "Universite de la Mediterranee (Aix Marseille 2)", /* 9468 */ "Starlab nv/sa", /* 9469 */ "Alfa.con Team S.p.A.", /* 9470 */ "PortWise AB", /* 9471 */ "Jeje.org", /* 9472 */ "SafeStone Technologies PLC", /* 9473 */ "SIRT", /* 9474 */ "365 Corporation", /* 9475 */ "ESRF", /* 9476 */ "Market Central, Inc.", /* 9477 */ "MyLuckyWorld", /* 9478 */ "WebCollage", /* 9479 */ "Notus Key Limited", /* 9480 */ "Backer Software Research", /* 9481 */ "ENS-Lyon", /* 9482 */ "PSI AG", /* 9483 */ "ision france", /* 9484 */ "FUTUROCOM", /* 9485 */ "Powwow Germany GmbH", /* 9486 */ "saardata GmbH", /* 9487 */ "Circuit City Stores", /* 9488 */ "SAXA, Inc.", /* 9489 */ "Scorecon International", /* 9490 */ "VECTAN", /* 9491 */ "The Cobalt Group", /* 9492 */ "iOpen Technologies Ltd.", /* 9493 */ "IFILM", /* 9494 */ "etee2k.net", /* 9495 */ "AT&T Enhanced Network Services", /* 9496 */ "IDini Corporation", /* 9497 */ "Telekommunikation Mittleres Ruhrgebiet GmbH", /* 9498 */ "Exacube System Inc.", /* 9499 */ "Byte Alliance", /* 9500 */ "SVA-INTRUSION.COM Co. LTD", /* 9501 */ "Ross Technology Group, Inc.", /* 9502 */ "Telemovil El Salvador", /* 9503 */ "tops.net GmbH & Co Online Publishing Services KG", /* 9504 */ "bone labs GmbH", /* 9505 */ "Real Solutions Ltd.", /* 9506 */ "Wharton Electronics", /* 9507 */ "MobileSpear Inc.", /* 9508 */ "Enkash Payment Network", /* 9509 */ "KONSYS", /* 9510 */ "Vulkan Technic GmbH", /* 9511 */ "Online Consulting, Ltd.", /* 9512 */ "Exacomm Systems", /* 9513 */ "Konica Business Technologies, Inc.", /* 9514 */ "Sugar Creek Packing Co.", /* 9515 */ "Digital World Services", /* 9516 */ "Sanrise Inc", /* 9517 */ "Pratt & Whitney", /* 9518 */ "Soward Network Solutions", /* 9519 */ "Phase2 Software Corp", /* 9520 */ "PED Computers", /* 9521 */ "Personeta", /* 9522 */ "ST E15", /* 9523 */ "Andiamo Systems, Inc", /* 9524 */ "BBC Monitoring", /* 9525 */ "Shawmut Design & Construction", /* 9526 */ "Inkras Networks Corporation", /* 9527 */ "Iyago", /* 9528 */ "Global Relay Inc.", /* 9529 */ "CQUR . COM", /* 9530 */ "Integra Telecom", /* 9531 */ "Group 1 Software", /* 9532 */ "TrueDisk", /* 9533 */ "Handrew", /* 9534 */ "Zurita Solutions", /* 9535 */ "Massey University", /* 9536 */ "Navox Corporation", /* 9537 */ "StorageWay Inc.", /* 9538 */ "STSN", /* 9539 */ "Altentia", /* 9540 */ "Lokaal Netwerk Gravenstraat", /* 9541 */ "College of Engineering and Computer Science", /* 9542 */ "Schwoo, Inc.", /* 9543 */ "Electrical and Computer Engineering Dept., UBC", /* 9544 */ "State Street Corp.", /* 9545 */ "Dominet Systems", /* 9546 */ "foo Corporation", /* 9547 */ "Datachron Inc.", /* 9548 */ "Southern Network Services, Inc.", /* 9549 */ "vox2vox Communications, Inc.", /* 9550 */ "Kompu-Art Studiu Komputerowe", /* 9551 */ "Financial IQ Pty Ltd", /* 9552 */ "Automaton Ltd", /* 9553 */ "Clear River Technologies, LLC", /* 9554 */ "AsiaInfo Technologies(China), Inc.", /* 9555 */ "Great Wall Broadbank Network Service Co.Lt", /* 9556 */ "Synso Inc.", /* 9557 */ "Kent Ridge Digital Labs", /* 9558 */ "National Security Research Institute", /* 9559 */ "SECUi.COM Corporation", /* 9560 */ "Netia Telekom S.A.", /* 9561 */ "Magnum Imperium Limited", /* 9562 */ "Suffolk College", /* 9563 */ "mediaWays GmbH Internet-Services", /* 9564 */ "Xerox Mobile Solutions", /* 9565 */ "HBO-CE", /* 9566 */ "Skilldeal AG", /* 9567 */ "DataGrid", /* 9568 */ "MGF Logistique", /* 9569 */ "University of Leoben/Austria", /* 9570 */ "Erskine Systems Ltd", /* 9571 */ "AlienThing.com", /* 9572 */ "MB-NET", /* 9573 */ "NCIC Clinical Trials", /* 9574 */ "Grupo de Programação na Web(WPG)", /* 9575 */ "Crédit Mutuel de Bretagne", /* 9576 */ "Xtelligent IT Consulting GmbH", /* 9577 */ "Mission Critical Linux, Inc.", /* 9578 */ "Followap", /* 9579 */ "New Hemisphere Computer Services", /* 9580 */ "Quad One Technologies Pvt. Ltd.", /* 9581 */ "CCS Communications Pty. Ltd.", /* 9582 */ "BBC Technology Supply Ltd", /* 9583 */ "Lucent Technologies NADP", /* 9584 */ "National Enhance Technology Corp.", /* 9585 */ "Debian", /* 9586 */ "Global Trust Authority", /* 9587 */ "IT Insourcing", /* 9588 */ "Currenex, Inc.", /* 9589 */ "The MathWorks Inc.", /* 9590 */ "Thinking Cat Enterprises", /* 9591 */ "Luke Crawford Enterprises", /* 9592 */ "SysNet Informática Ltda", /* 9593 */ "Tape Products Company", /* 9594 */ "Zephion Networks", /* 9595 */ "PimpCode", /* 9596 */ "Blue Silicon", /* 9597 */ "MBNA America", /* 9598 */ "LDAPGURU.COM LLC", /* 9599 */ "Williams Technology Consulting Services", /* 9600 */ "Keewaytinook Okimakanak", /* 9601 */ "Zoftech Inc.", /* 9602 */ "AF Enterprises", /* 9603 */ "afuu", /* 9604 */ "Xyterra Computing Inc", /* 9605 */ "Linvision B.V.", /* 9606 */ "MSTC", /* 9607 */ "ntelsOh", /* 9608 */ "Impaster Co. Ltd", /* 9609 */ "Milosch.net", /* 9610 */ "Infosim", /* 9611 */ "Kobe Steel, Ltd.", /* 9612 */ "nlsde", /* 9613 */ "GoCruiseDirect.com", /* 9614 */ "Danfoss A/S", /* 9615 */ "Kreatel Communications AB", /* 9616 */ "GSX Groupware Solutions", /* 9617 */ "Utrechtse Werkbedrijven", /* 9618 */ "Nextra Austria", /* 9619 */ "National Land Survey of Finland", /* 9620 */ "MOLO AFRIKA SPEECH TECHNOLOGIES", /* 9621 */ "QuesCom", /* 9622 */ "Copenhagen Airports", /* 9623 */ "Radianz", /* 9624 */ "Utesch", /* 9625 */ "Alessandro Triglia", /* 9626 */ "S J Shipinski Services", /* 9627 */ "Groupe CASINO", /* 9628 */ "Mastermind Technologies", /* 9629 */ "e-moveum", /* 9630 */ "eSniff, Inc.", /* 9631 */ "Individual", /* 9632 */ "SED Systems", /* 9633 */ "API Networks, Inc", /* 9634 */ "Tropico Sistemas e Telecomunica=E7=F5es SA", /* 9635 */ "netFORMAT GmbH", /* 9636 */ "Alliance & Leicester PLC", /* 9637 */ "AlphaGraphics, Inc.", /* 9638 */ "Appium AB", /* 9639 */ "Astrolink International LLC", /* 9640 */ "Azusa Pacific University", /* 9641 */ "Bibop Research, int. S.p.A. Gianugo", /* 9642 */ "CEULP/ULBRA", /* 9643 */ "Cornwall Internet Limited", /* 9644 */ "courtade.net", /* 9645 */ "Cybectec", /* 9646 */ "EWIP", /* 9647 */ "GeekBone Co. LTD", /* 9648 */ "Hochschule Bremen", /* 9649 */ "Infoclan", /* 9650 */ "Kele", /* 9651 */ "LNS SA", /* 9652 */ "Mosotech Limited", /* 9653 */ "NIC France", /* 9654 */ "Optidev AB", /* 9655 */ "Routit BV", /* 9656 */ "S://Scape Communications Inc.", /* 9657 */ "Solers", /* 9658 */ "Synapsys Ltd", /* 9659 */ "Telecel Comunicações pessoais S.A", /* 9660 */ "Teletron INC", /* 9661 */ "TUEV-AT-TRUST Center GmbH", /* 9662 */ "UNIVERSITE LUMIERE LYON2", /* 9663 */ "Widgital", /* 9664 */ "ZyGATE Communications Inc.", /* 9665 */ "Alcatel Optronics", /* 9666 */ "Austar United", /* 9667 */ "Talent Network Security Technology Co., Ltd.", /* 9668 */ "University of London", /* 9669 */ "BROADi", /* 9670 */ "Time Warner", /* 9671 */ "Apropos Technology, Inc.", /* 9672 */ "Denison University", /* 9673 */ "Fingerhut", /* 9674 */ "Grupo Financiero Uno", /* 9675 */ "hottis.de", /* 9676 */ "Hydriads", /* 9677 */ "K.U. Leuven", /* 9678 */ "mBalance", /* 9679 */ "SelectMetrics, Inc.", /* 9680 */ "Mortgage Systems International", /* 9681 */ "Novadeck", /* 9682 */ "Plattsburgh State University", /* 9683 */ "PoweriseNet", /* 9684 */ "Ranch Networks, Inc.", /* 9685 */ "Ruby Networks, Inc.", /* 9686 */ "SAProperty.com", /* 9687 */ "Tahoe Networks, Inc.", /* 9688 */ "TBD Networks", /* 9689 */ "Terralab", /* 9690 */ "Children's Hospital Colorado", /* 9691 */ "Tool Object", /* 9692 */ "UND School of Medicine and Health Sciences", /* 9693 */ "Arbor Networks", /* 9694 */ "Encotone Ltd.", /* 9695 */ "Uffizio India Software Consultants Pvt. Ltd.", /* 9696 */ "Accelance", /* 9697 */ "AIA Australia", /* 9698 */ "Axis Consulting", /* 9699 */ "Boehringer-Ingelheim GmbH", /* 9700 */ "Commerce NTI", /* 9701 */ "Comtech Belgium", /* 9702 */ "Datafoundation Inc.Valerii", /* 9703 */ "Diversified Resourceful Solutions Inc.", /* 9704 */ "ecos gmbh", /* 9705 */ "HackersLab", /* 9706 */ "Institut National Polytechnique de Lorraine", /* 9707 */ "Jack Morton Worldwide", /* 9708 */ "Micro Connect Pty Ltd", /* 9709 */ "Monzoon Networks AG", /* 9710 */ "Novedia", /* 9711 */ "obzen Inc.", /* 9712 */ "Opera Software AS", /* 9713 */ "Ruhrsoft", /* 9714 */ "Sigma AB", /* 9715 */ "State of North Dakota", /* 9716 */ "Teleca AB", /* 9717 */ "TransACT Communications", /* 9718 */ "Tronicplanet Online Datendienst GmbH", /* 9719 */ "Tryx", /* 9720 */ "VWR International", /* 9721 */ "Workhorse Computing", /* 9722 */ "Coradiant", /* 9723 */ "Datacast Inc.", /* 9724 */ "INFOservice", /* 9725 */ "Nitroba", /* 9726 */ "Tryllian", /* 9727 */ "WWF Wort + Ton GmbH e-media", /* 9728 */ "EVERelite, Co., Ltd.", /* 9729 */ "Solutus Pty Limited", /* 9730 */ "5down", /* 9731 */ "Adrenaline Ingenierie Multimedia", /* 9732 */ "Aral Systems GmbH", /* 9733 */ "Astrum Software Corporation", /* 9734 */ "Coredump Ky", /* 9735 */ "Dublin City University", /* 9736 */ "Fourtheye", /* 9737 */ "Gedoplan GmbH", /* 9738 */ "Hobnobbers.net", /* 9739 */ "iBEAM Broadcasting Corporation", /* 9740 */ "Keiren", /* 9741 */ "DESCOM CONSULTING, S.L.", /* 9742 */ "NCHICA", /* 9743 */ "peoplecall.com", /* 9744 */ "Radix Controls Inc.", /* 9745 */ "RFNet Technologies Pte Ltd", /* 9746 */ "RoamingTest Ltd", /* 9747 */ "ROW Software and Web Design", /* 9748 */ "SpectraLink Corporation", /* 9749 */ "The Pillars", /* 9750 */ "Trevilon Corp.", /* 9751 */ "University of Missouri", /* 9752 */ "Vernier Networks, Inc.", /* 9753 */ "Vertis DSG Chicago", /* 9754 */ "Webasto Informationssysteme GmbH", /* 9755 */ "woerd Erdmenger & Wolter GbR", /* 9756 */ "Aral Aktiengesellschaft & Co. KG", /* 9757 */ "Metadigm Ltd", /* 9758 */ "Aplicaciones y Consultoria, S.A. de C.V.", /* 9759 */ "Cellcast", /* 9760 */ "Corporate Express", /* 9761 */ "Datacom Systems Inc.", /* 9762 */ "Eonite, Inc.", /* 9763 */ "Forschungszentrum Rossendorf e.V.", /* 9764 */ "ILRYUNG TELESYS", /* 9765 */ "Joseph S Dovgan DDS MS", /* 9766 */ "Lectron CO., LTD", /* 9767 */ "Lynchburg College", /* 9768 */ "Nuance Communications", /* 9769 */ "OpenOffice.org", /* 9770 */ "PAION Co. Ltd.,", /* 9771 */ "pentasecurity", /* 9772 */ "SpunHead Industries", /* 9773 */ "Streets Online Ltd.", /* 9774 */ "TNT Software, Inc.", /* 9775 */ "Wireless Network Services", /* 9776 */ "Arelnet Ltd.", /* 9777 */ "AxONLink", /* 9778 */ "Empire State College", /* 9779 */ "Entreprise des Postes et Telecommunications", /* 9780 */ "Jerntorget Sverige AB", /* 9781 */ "JM Family Enterprises, Inc.", /* 9782 */ "Vayusphere, Inc.", /* 9783 */ "icoserve information technologies", /* 9784 */ "Praxis Technical Group, Inc.", /* 9785 */ "A.I.S. AngewandteInformations-Systeme GmbH", /* 9786 */ "ActiveState Corp.", /* 9787 */ "Advisor Technologies Limited", /* 9788 */ "Astaro AG", /* 9789 */ "Australia On Line", /* 9790 */ "Centre de Telecomunicacions i Tecnologies de la Informacio", /* 9791 */ "Clayhill KG", /* 9792 */ "CloudShield Technologies, Inc.", /* 9793 */ "CYTBeN", /* 9794 */ "EBS Dealing Resources, Inc", /* 9795 */ "ENX Association", /* 9796 */ "EVER Sp. z o.o.", /* 9797 */ "Griff-IT Ltd.", /* 9798 */ "Holos Software, Inc.", /* 9799 */ "iNIT-8", /* 9800 */ "ISIS Frontier Communications", /* 9801 */ "IUFM de Rouen", /* 9802 */ "L-3 Communication Systems - East", /* 9803 */ "Lefthand Networks", /* 9804 */ "Neveda City School District", /* 9805 */ "PRIDE Industries", /* 9806 */ "Prism Holding Limited", /* 9807 */ "Rocklea Spinning Mills Pty Ltd", /* 9808 */ "Root, Int.", /* 9809 */ "Sagent", /* 9810 */ "Secure Appliance Systems", /* 9811 */ "SolNet", /* 9812 */ "TAB Queensland Limited", /* 9813 */ "Telia IT-Service AB", /* 9814 */ "VSpace, Inc.", /* 9815 */ "WANWALL", /* 9816 */ "WaveNET International (Pvt) Ltd.", /* 9817 */ "Xwave GmbH", /* 9818 */ "yLez Technologies Pte Ltd", /* 9819 */ "ZOX-IT", /* 9820 */ "Zoznam s.r.o.", /* 9821 */ "Accella Technologies Co., Ltd", /* 9822 */ "Diageo", /* 9823 */ "GenTek", /* 9824 */ "Geospiza Inc.", /* 9825 */ "ImagiCode Studios", /* 9826 */ "Neocles", /* 9827 */ "pgamAPD", /* 9828 */ "SAIT Ltd", /* 9829 */ "Thunderbird, the American Graduate School of International Management", /* 9830 */ "Vivre Inc", /* 9831 */ "solobird", /* 9832 */ "Legend Holdings Ltd.", /* 9833 */ "Agencja Uslug InformatycznychARTCOMP", /* 9834 */ "Alien Network", /* 9835 */ "AOK Bayern", /* 9836 */ "Ball State University", /* 9837 */ "Broadview Networks, Inc.", /* 9838 */ "CAREL", /* 9839 */ "carreregroup", /* 9840 */ "Christian Dusek EDV-Dienstleistungen", /* 9841 */ "ET Networks", /* 9842 */ "Kai Industries", /* 9843 */ "Kansas State University", /* 9844 */ "LANBIRD Technology Co., Ltd.", /* 9845 */ "LIP - Laboratório de Instrumentação e Física Experimental de Partículas", /* 9846 */ "Listen.com", /* 9847 */ "Lou Johnson", /* 9848 */ "M-Web Indonesia", /* 9849 */ "NextGig", /* 9850 */ "NTT SOFT", /* 9851 */ "Odigo Inc", /* 9852 */ "Payment Technologies", /* 9853 */ "Red Box Recorders Limited", /* 9854 */ "Shawsoft GmbH", /* 9855 */ "UCLA Communications Technology Services", /* 9856 */ "Unicom an e-security company", /* 9857 */ "University of Maryland, Baltimore County", /* 9858 */ "University of Medicine and Dentistry of New Jersey", /* 9859 */ "Vizional Technologies, Inc.", /* 9860 */ "Webdesign Internet Service GmbH", /* 9861 */ "Claredi Corporation", /* 9862 */ "DataRojahn A/S", /* 9863 */ "J Walter Thomposon Company", /* 9864 */ "Karmanos Cancer Institute", /* 9865 */ "Outokumpu Oyj", /* 9866 */ "Third Rail Americas", /* 9867 */ "Millinet Co., Ltd", /* 9868 */ "Network Laboratory of Nankai University", /* 9869 */ "graviton, Inc.", /* 9870 */ "Findlater Wine Merchants", /* 9871 */ "GEZ", /* 9872 */ "Viterra AG", /* 9873 */ "Åbo Akademi University", /* 9874 */ "AVAILABLE SUPPLY Inc.", /* 9875 */ "B2I Toulouse", /* 9876 */ "California State University, East Bay", /* 9877 */ "CareGroup HealthCare System", /* 9878 */ "Cox Communications, Las Vegas", /* 9879 */ "Data Junction Corporation", /* 9880 */ "Eita Technologies, Inc.", /* 9881 */ "Flash Technology", /* 9882 */ "Free Trade Online", /* 9883 */ "Frost-EDV", /* 9884 */ "Green Packet, Inc.", /* 9885 */ "Incendiary Networks", /* 9886 */ "Kristina Internet Business Solutions", /* 9887 */ "Linux Terminal Server Project (LTSP)", /* 9888 */ "Winpresa Building Automation Technologies GmbH", /* 9889 */ "Media General Inc", /* 9890 */ "Mensatec", /* 9891 */ "Oregon Graduate Institute of Science and Technology", /* 9892 */ "Paranormal Sweden", /* 9893 */ "Polestar Corp.", /* 9894 */ "Project49 AG", /* 9895 */ "R&R Associés", /* 9896 */ "Seranoa Networks", /* 9897 */ "Shindengen Electric Mfg. Co., Ltd.", /* 9898 */ "Stinnes AG", /* 9899 */ "Telekom Applied Business Sdn. Bhd.", /* 9900 */ "The College of William and Mary", /* 9901 */ "The University of Chicago", /* 9902 */ "TI SQUARE Technology", /* 9903 */ "University of Nebraska", /* 9904 */ "Volubill", /* 9905 */ "Xtera Communications Inc.", /* 9906 */ "Akkaya Consulting GmbH", /* 9907 */ "HiTRUST.COM (HK) Incorporated Limited", /* 9908 */ "Pacific Technology Services", /* 9909 */ "Absolute Software Corp.", /* 9910 */ "Bantu, Inc.", /* 9911 */ "Baraga Telephone Company", /* 9912 */ "Cerebra Intergrated Technologies Ltd.", /* 9913 */ "Charter Communications", /* 9914 */ "Commtouch Software Ltd", /* 9915 */ "Datek Online Holdings Corp.", /* 9916 */ "Delos Payment Systems", /* 9917 */ "National Oceanic and Atmospheric Administration (NOAA)", /* 9918 */ "earth9.com Pte Ltd", /* 9919 */ "ENETCO GmbH", /* 9920 */ "ERGO Versicherungsgruppe AG", /* 9921 */ "eSign Australia Limited", /* 9922 */ "European Southern Observatory", /* 9923 */ "Excite UK Ltd", /* 9924 */ "Finest Webs", /* 9925 */ "Genie Network Resource Management", /* 9926 */ "Icehouse Net Services", /* 9927 */ "Inetrify", /* 9928 */ "Integral Concepts, Inc.", /* 9929 */ "InterNexus Plc", /* 9930 */ "Inti", /* 9931 */ "IPFilter", /* 9932 */ "JAARS, Inc", /* 9933 */ "JANUS Research Group", /* 9934 */ "Louisiana Tech University", /* 9935 */ "massconfusion.com", /* 9936 */ "MaXXan Systems, Inc.", /* 9937 */ "Mercury Corporation", /* 9938 */ "merNet Security", /* 9939 */ "Nine Tiles Networks Ltd", /* 9940 */ "Objective Reality Computer LLC", /* 9941 */ "Optimation Software Engineering", /* 9942 */ "Prometheon, Inc.", /* 9943 */ "SIAS Ltd", /* 9944 */ "Siemens Business Services AB", /* 9945 */ "SoftSol India Limitedn", /* 9946 */ "Swales Aerospace, Inc.", /* 9947 */ "Telekurier GesmbH & Co KG", /* 9948 */ "Ubiquitous Corp.", /* 9949 */ "Visionary Communications Inc.", /* 9950 */ "Wireless M2M, LLC", /* 9951 */ "WuhanTIT", /* 9952 */ "Bertelsmann Gamechannel", /* 9953 */ "craigbuchek.com", /* 9954 */ "Crisp Hughes Evans L.L.P.", /* 9955 */ "NDS Surgical Imaging", /* 9956 */ "Dynamic Equilibrium Pty Ltd", /* 9957 */ "Formula/400", /* 9958 */ "NODS", /* 9959 */ "nuisys.com", /* 9960 */ "FundsXpress Financial Network", /* 9961 */ "VirCIO, LLP", /* 9962 */ "Advanced Computer Technologies (ACT) Inc.", /* 9963 */ "50km Inc.", /* 9964 */ "Amministrazione Provinciale di Grosseto", /* 9965 */ "Beijing Huahuan Electronics Ltd.", /* 9966 */ "Bluesocket, Inc.", /* 9967 */ "British Antarctic Survey", /* 9968 */ "Condat AG", /* 9969 */ "Custodix NV", /* 9970 */ "CyberTel, Inc.", /* 9971 */ "Emulive Imaging Corporation Inc.", /* 9972 */ "Flexsys (UK) Ltd", /* 9973 */ "Internet Transaction Services, Inc.(iTrans)", /* 9974 */ "J.W. Jensen, Inc.", /* 9975 */ "Flexsys Inc", /* 9976 */ "jobpilot AG", /* 9977 */ "Linuxkorea, Inc.", /* 9978 */ "Mabuse.De", /* 9979 */ "M-Web South Africa", /* 9980 */ "NeT&Trade GmbH", /* 9981 */ "netEngine", /* 9982 */ "Netstech, Inc.", /* 9983 */ "Osmosislatina", /* 9984 */ "RIC", /* 9985 */ "Sencore", /* 9986 */ "Signet", /* 9987 */ "Smart Technology Enablers, Inc.", /* 9988 */ "Stochastix", /* 9989 */ "Stonebranch, Incorporated", /* 9990 */ "synchrone", /* 9991 */ "Terion", /* 9992 */ "Terumo Medical Corporation", /* 9993 */ "The Linux Box Corporation", /* 9994 */ "ThinkEngine Networks, Inc.", /* 9995 */ "Villanova University", /* 9996 */ "Virtual e-learning group (VEG)", /* 9997 */ "Wynd Communications", /* 9998 */ "Zerna, Koepper & Partner", /* 9999 */ "MapInfo Corporation", /* 10000 */ "blio Corporation", /* 10001 */ "Frogfoot Networks", /* 10002 */ "IP ONE Inc.", /* 10003 */ "johnchildress.com", /* 10004 */ "Pure NetworX GmbH", /* 10005 */ "SANTON", /* 10006 */ "RF Innovations Pty Ltd", /* 10007 */ "Groupe ESIEE Paris", /* 10008 */ "KrystalBox Technologies, Inc.", /* 10009 */ "Network Storage Solutions, Inc.", /* 10010 */ "Advanced Simulation Technology Inc", /* 10011 */ "Alternium SA", /* 10012 */ "caledo GmbH", /* 10013 */ "CERIAS", /* 10014 */ "Certification Centre Ltd", /* 10015 */ "Computer & Communications Innovations", /* 10016 */ "CREWAVE Co., Ltd.", /* 10017 */ "Double Precision, Inc.", /* 10018 */ "Fen Systems Ltd.", /* 10019 */ "Globe", /* 10020 */ "Good Technology, Inc.", /* 10021 */ "Iconnect", /* 10022 */ "IMA L.t.d.", /* 10023 */ "Integrated Technology Express, Inc", /* 10024 */ "Interland, Inc.", /* 10025 */ "Interloci,Inc.", /* 10026 */ "Internet Data Systems S.A.", /* 10027 */ "level 42 networks", /* 10028 */ "Men & Mice", /* 10029 */ "Mudiaga Obada", /* 10030 */ "NIIEFA CTC CYCLONE", /* 10031 */ "ONEMEDIA Inc.", /* 10032 */ "OpenSOS S/B", /* 10033 */ "OSIX AB", /* 10034 */ "SAY Technologies, Inc.", /* 10035 */ "Times N Systems", /* 10036 */ "Ultimate People Company Ltd", /* 10037 */ "University of Texas Health Science Center at San Antonio", /* 10038 */ "Videotek, Inc.", /* 10039 */ "Yonsei University", /* 10040 */ "ZONE. PL s.c.", /* 10041 */ "comma Flex", /* 10042 */ "eTime Capital, Inc.", /* 10043 */ "FRB-Par", /* 10044 */ "NetFormFive Informationstechnologie GmbH", /* 10045 */ "Protek, S.C.", /* 10046 */ "Servocomp Ltd.", /* 10047 */ "VXL eTech (P) Limited", /* 10048 */ "WebRelay, Inc.", /* 10049 */ "Dana Corporation", /* 10050 */ "Eftia OSS Solutions Inc", /* 10051 */ "Electronic Commerce Link, Inc.", /* 10052 */ "keys", /* 10053 */ "NetValue S.A.", /* 10054 */ "Roaring Penguin Software Inc.", /* 10055 */ "AppDancer Networks", /* 10056 */ "EMTE Sistemas", /* 10057 */ "HAURI Inc.", /* 10058 */ "SANRAD", /* 10059 */ "SELTA Telematica", /* 10060 */ "Pacific Info Tech Corp.", /* 10061 */ "Comsquared Systems, Inc.", /* 10062 */ "Aaron Grosky & Associates Inc", /* 10063 */ "ASH", /* 10064 */ "Ironoak Software", /* 10065 */ "Digital Multimedia Technologies", /* 10066 */ "DVTEL Inc.", /* 10067 */ "E-OfficeServices Ltd.", /* 10068 */ "Epsilon AB", /* 10069 */ "Flashwave Ltd", /* 10070 */ "GINKO AG", /* 10071 */ "GW Technologies Co., Ltd.", /* 10072 */ "HanseNet Telekommunikation GmbH", /* 10073 */ "Ikimbo", /* 10074 */ "Infodyne Corporation", /* 10075 */ "Institutions of the European Union", /* 10076 */ "MbyN Inc.", /* 10077 */ "Medienprojektverein Steiermark", /* 10078 */ "Metrosource, Inc.", /* 10079 */ "Microcell I5 Inc.", /* 10080 */ "NrjCorporation", /* 10081 */ "Oculus Technologies Corporation", /* 10082 */ "Panda Vista", /* 10083 */ "Priority Telecom N.V. Roger", /* 10084 */ "Prove IT", /* 10085 */ "Segue Software, Inc.", /* 10086 */ "SilentOne Limited", /* 10087 */ "Techno Valley Co.", /* 10088 */ "Tek Tools, Inc.", /* 10089 */ "The ClueNet Project", /* 10090 */ "Transfar", /* 10091 */ "Unassigned", /* 10092 */ "unamite GmbH", /* 10093 */ "University of Novi Sad", /* 10094 */ "Wickander & Associates", /* 10095 */ "Baxter Healthcare Corporation", /* 10096 */ "ECI-IP Inc.", /* 10097 */ "Gonicus GmbH", /* 10098 */ "humanIT", /* 10099 */ "onDevice Corporation", /* 10100 */ "Mirai Espana, S.L.", /* 10101 */ "Alt-N Technologies", /* 10102 */ "Lewis Curtis Consulting", /* 10103 */ "eBOA", /* 10104 */ "Lawson Software", /* 10105 */ "Albalá Ingenieros, S.A", /* 10106 */ "1stCom Technologies Corp.", /* 10107 */ "7 Global Ltd", /* 10108 */ "Active Telecom", /* 10109 */ "Agile Storage, Inc.", /* 10110 */ "Get Connected", /* 10111 */ "APLcomp Oy", /* 10112 */ "ApplianceWare Inc.", /* 10113 */ "Artesia Technologies", /* 10114 */ "ARTFUL", /* 10115 */ "Auga ApS", /* 10116 */ "Axerra Networks, Inc.", /* 10117 */ "BenefitsXML, Inc.", /* 10118 */ "BigBangwidth", /* 10119 */ "BRTech", /* 10120 */ "CLEAR Communications Ltd", /* 10121 */ "Creatia Corporation", /* 10122 */ "Crimco Consulting", /* 10123 */ "CUST - Université Blaise Pascal (Clermont II)", /* 10124 */ "cyberPIXIE, Inc.", /* 10125 */ "DAASI International GmbH", /* 10126 */ "Desana Systems Incorporated", /* 10127 */ "DISA", /* 10128 */ "DiscoverNet, Inc.", /* 10129 */ "Ecole Centrale de Lyon", /* 10130 */ "EINK", /* 10131 */ "EM Solutions Pty Ltd", /* 10132 */ "FedEx", /* 10133 */ "FerraraLUG", /* 10134 */ "Front Porch Inc.", /* 10135 */ "godot communication technologies gmbh", /* 10136 */ "GTMP Foundation", /* 10137 */ "i2pi", /* 10138 */ "i3sp", /* 10139 */ "INCO Systems, Inc.", /* 10140 */ "Infinisys Pty Ltd", /* 10141 */ "Interdimensions", /* 10142 */ "Introut Consulting", /* 10143 */ "iORMYX", /* 10144 */ "Just In Time Consulting", /* 10145 */ "Kern Automatiseringsdiensten BV", /* 10146 */ "Lancaster-Lebanon Intermediate Unit 13", /* 10147 */ "Lightel Systems Corporation", /* 10148 */ "LineOne", /* 10149 */ "Logic One Incorporated", /* 10150 */ "Multimedia University", /* 10151 */ "Muspellsheim", /* 10152 */ "Net2Phone", /* 10153 */ "NetPlay, Inc.", /* 10154 */ "Northern Parklife Inc", /* 10155 */ "Novoforum", /* 10156 */ "Onnet Technologies Co.", /* 10157 */ "PanAmSat", /* 10158 */ "Panasas Inc.", /* 10159 */ "Penn State Outreach Information Systems", /* 10160 */ "PictureIQ", /* 10161 */ "poland.com SA", /* 10162 */ "Remedy Corporation", /* 10163 */ "Roads and Traffic Authority (RTA)", /* 10164 */ "Robert Williams Consulting", /* 10165 */ "Secure Software Services ltd", /* 10166 */ "Siemens Communications Limited", /* 10167 */ "Space Biomedical Center", /* 10168 */ "Suayan Design", /* 10169 */ "Telemig Celular S.A.", /* 10170 */ "Telsey", /* 10171 */ "Territory Business Solutions Pty. Ltd.", /* 10172 */ "Texil", /* 10173 */ "The Chubb Group of Insurance Companies", /* 10174 */ "Traffion Technologies", /* 10175 */ "Univention", /* 10176 */ "University of Northern Iowa", /* 10177 */ "Western Kentucky University", /* 10178 */ "Wireless Solutions", /* 10179 */ "Am-utils Organization", /* 10180 */ "Cardinal Health Inc.", /* 10181 */ "futureLAB AG", /* 10182 */ "Master Quality snc", /* 10183 */ "QCOM TV, Inc.", /* 10184 */ "SMP", /* 10185 */ "Weinbrenner Media Consult", /* 10186 */ "Teleview", /* 10187 */ "Piolink, Inc", /* 10188 */ "Congruency, Inc.", /* 10189 */ "AEGMIS GmbH", /* 10190 */ "DivergeNet, Inc.", /* 10191 */ "E.ON Energie AG", /* 10192 */ "erkle", /* 10193 */ "is:energy", /* 10194 */ "SH Soft", /* 10195 */ "www.thinkingmachines.com", /* 10196 */ "Vovtel Networks, Inc.", /* 10197 */ "Carroll-Net, Inc.", /* 10198 */ "projecthome limited", /* 10199 */ "i-mail-box project", /* 10200 */ "Eftel", /* 10201 */ "GFT Solutions", /* 10202 */ "Winter AG", /* 10203 */ "Shanghai SCOP Photonics Technology Co. ltd", /* 10204 */ "Apama", /* 10205 */ "ePIK'us Software", /* 10206 */ "Hilgraeve Inc.", /* 10207 */ "Valnet Sado S.A.", /* 10208 */ "Andes Networks, Inc.", /* 10209 */ "AXS-One", /* 10210 */ "BENAU A/S", /* 10211 */ "Cutler & Company", /* 10212 */ "Meriton Networks", /* 10213 */ "ENIGMA SOI SP. Z O.O.", /* 10214 */ "FORWARD Technical Co.Ltd", /* 10215 */ "Frantic Films", /* 10216 */ "HotDiary Inc", /* 10217 */ "Hsufarm", /* 10218 */ "I.D.E.A.L. Technology Corporation", /* 10219 */ "IFW Dresden", /* 10220 */ "IMPACT TECHNOLOGIES", /* 10221 */ "InfiniCon Systems", /* 10222 */ "Leo A Daly Company", /* 10223 */ "Lufthansa Systems Infratec GmbH", /* 10224 */ "Marrakech Ltd.", /* 10225 */ "MyDN", /* 10226 */ "Neesus Datacom", /* 10227 */ "Net & Publication Consultance GmbH", /* 10228 */ "Netgate s.c.", /* 10229 */ "Oriole Corporation", /* 10230 */ "Proficient Networks, Inc.", /* 10231 */ "Signiant Corporation", /* 10232 */ "Silicon Goblin Technologies", /* 10233 */ "Snort.org", /* 10234 */ "Startrack Communications (Australia)Pty Ltd", /* 10235 */ "Studio komputerowe AWA", /* 10236 */ "Sullins, Inc.", /* 10237 */ "Technische Universitaet Berlin (TU-Berlin)", /* 10238 */ "Tess SA", /* 10239 */ "TransNational Computer Technology", /* 10240 */ "TRPG Association", /* 10241 */ "University of Brighton", /* 10242 */ "Uplogix.com", /* 10243 */ "VALIDATA", /* 10244 */ "Valiosys SA", /* 10245 */ "Virtual Education Space", /* 10246 */ "CollegeUnits.com, Inc.", /* 10247 */ "E.Central, Inc", /* 10248 */ "CINtel Intelligent Telecom System Co.,Ltd.", /* 10249 */ "NegativeTwenty", /* 10250 */ "Warlock", /* 10251 */ "Diagnostic Laboratory Services, Inc.", /* 10252 */ "Napster, Inc.", /* 10253 */ "Texuna Technologies Moscow", /* 10254 */ "Infoquenz IT-Dienstleistungen GmbH", /* 10255 */ "ScioByte GmbH", /* 10256 */ "Hadithi Inc", /* 10257 */ "Aracnet Internet Services", /* 10258 */ "Avtec Systems, Inc.", /* 10259 */ "BeamReach Networks", /* 10260 */ "Cedar Point Communications", /* 10261 */ "CNC Systems, Inc.", /* 10262 */ "Custom Linux Solutions", /* 10263 */ "DATA & INFORMATION TECHNOLOGY LTD", /* 10264 */ "Deltathree, Inc", /* 10265 */ "DIZ Rheinland-Pfalz", /* 10266 */ "Electro Optic Systems", /* 10267 */ "Enterprise Commerce", /* 10268 */ "ePropose", /* 10269 */ "ES-Netze", /* 10270 */ "Forgent", /* 10271 */ "Future Instrument AB", /* 10272 */ "Giant Step Productions LLC", /* 10273 */ "HEXAFLUX-SMS", /* 10274 */ "Master a Distancia", /* 10275 */ "MSI Network Services, Ltd.", /* 10276 */ "Multnomah Education Service District", /* 10277 */ "NetAcquire Corporation", /* 10278 */ "Object Valley (Asia Pacific) Limited", /* 10279 */ "Quixotech Systems", /* 10280 */ "SELECT Technology", /* 10281 */ "SpeedKom GmbH", /* 10282 */ "TABCORP", /* 10283 */ "Thomas Jefferson University", /* 10284 */ "Trenitalia S.p.A.", /* 10285 */ "Trintech Inc.", /* 10286 */ "University At Albany", /* 10287 */ "Vox Mobili", /* 10288 */ "Yukyung Telecom Co., Ltd.", /* 10289 */ "Internet Business Constellation S.A.", /* 10290 */ "j-m-f.demon.co.uk", /* 10291 */ "Laissez Faire City", /* 10292 */ "LINKAGE SYSTEM INTEGERATION CO.,LTD", /* 10293 */ "DATA SERVICE SRL", /* 10294 */ "iSOLUTION", /* 10295 */ "ITI Ltd.", /* 10296 */ "Advantech Co., Ltd.", /* 10297 */ "Arbeitsgemeinschaft fuer total abgehobene Technologie", /* 10298 */ "Avantia, Inc", /* 10299 */ "Avantron Technologies Inc.", /* 10300 */ "Bluesocket Ltd", /* 10301 */ "Galaxy Systems, Incorporated", /* 10302 */ "ist isdn support technik GmbH", /* 10303 */ "LGT Financial Services", /* 10304 */ "Magnifix Sdn Bhd", /* 10305 */ "MSO Technologies", /* 10306 */ "Optical Solutions Inc", /* 10307 */ "OSGi", /* 10308 */ "SOHO Skyway", /* 10309 */ "tang-IT Consulting GmbH", /* 10310 */ "Kerio Technologies", /* 10311 */ "Translogic Systems, Inc.", /* 10312 */ "Autinform GmbH", /* 10313 */ "Provenir", /* 10314 */ "Prima e.V.", /* 10315 */ "Rafael Ltd.", /* 10316 */ "Nanum Technology", /* 10317 */ "SaskTel International Ltd.", /* 10318 */ "Semantics AG", /* 10319 */ "Amherst College", /* 10320 */ "AUNet", /* 10321 */ "Centre For Advanced Technology", /* 10322 */ "Convergence Network Research Ltd.", /* 10323 */ "CrabusLDAP", /* 10324 */ "EarthConnect Corporation", /* 10325 */ "Ecole Nationale Superieure des Mines de Paris", /* 10326 */ "FiberCity Networks", /* 10327 */ "Globeflow SA", /* 10328 */ "Integra Micro Systems (P) Ltd.", /* 10329 */ "KaVaDo Inc.", /* 10330 */ "Lightning Data Networks", /* 10331 */ "MaxHosting GBR", /* 10332 */ "MetaNet", /* 10333 */ "Mischief Networking", /* 10334 */ "RLM Systems Pty. Ltd.", /* 10335 */ "Summit Tech Communications", /* 10336 */ "Valis LTD", /* 10337 */ "Locale Systems", /* 10338 */ "StarRemote Wireless, Inc.", /* 10339 */ "Indiana State University", /* 10340 */ "Klinik Loewenstein gGmbH", /* 10341 */ "Miami University", /* 10342 */ "NetExcell", /* 10343 */ "Netregistry Pty Ltd", /* 10344 */ "Newport Networks Limitd", /* 10345 */ "OmegaBand, Inc.", /* 10346 */ "Plustream, Inc.", /* 10347 */ "SOFTPRO GmbH & Co. KG", /* 10348 */ "Sysgem AG", /* 10349 */ "System Software Solutions", /* 10350 */ "Oblivion", /* 10351 */ "Retevisión Móvil, S.A.", /* 10352 */ "InnoCom", /* 10353 */ "Brewster Academy", /* 10354 */ "ITAction", /* 10355 */ "Target Revocable E-Mail Corporation", /* 10356 */ "Roy S. Rapoport", /* 10357 */ "Accelio Corporation", /* 10358 */ "Adtel Software", /* 10359 */ "AgesMUD Technology, Co., Ltd.", /* 10360 */ "Bharat Heavy Electricals Limited", /* 10361 */ "BluWare, Inc", /* 10362 */ "Catbird Networks", /* 10363 */ "Central Manchester City Learning Center", /* 10364 */ "Davox Corp.", /* 10365 */ "Dialpad Communications", /* 10366 */ "donnie21", /* 10367 */ "Fujitsu Technology Solutions GmbH", /* 10368 */ "Fujitsu Prime Software Technologies Ltd.", /* 10369 */ "Impulsesoft", /* 10370 */ "Inabyte Inc.", /* 10371 */ "Intelligent Appliance Lab", /* 10372 */ "Le Reseau", /* 10373 */ "Lifeline Systems Inc", /* 10374 */ "Makina Corpus", /* 10375 */ "NETFRONT", /* 10376 */ "OnMobile System Inc", /* 10377 */ "PacketVideo", /* 10378 */ "Princeton Solutions Group", /* 10379 */ "TeleSys Software, Inc.", /* 10380 */ "TrendPoint Systems", /* 10381 */ "UCNET", /* 10382 */ "Universite de Liege", /* 10383 */ "Virginia Commonwealth University", /* 10384 */ "Westronic Systems, Inc.", /* 10385 */ "YoungWoo Telecom Co., LTD", /* 10386 */ "Dongah Elecomm", /* 10387 */ "Supportcomm Teleinformatica SA", /* 10388 */ "Intabo", /* 10389 */ "DELTA, Danish Electronics, Light & Acoustics", /* 10390 */ "Bharat Sanchar Nigam Limited", /* 10391 */ "Abeona Networks", /* 10392 */ "APEH", /* 10393 */ "Banamex, S.A.", /* 10394 */ "Belo Corporation", /* 10395 */ "California State University, Office of the Chancellor", /* 10396 */ "CK Software GmbH", /* 10397 */ "Covasoft, Inc.", /* 10398 */ "Datakey", /* 10399 */ "Electric Lightwave, Inc.", /* 10400 */ "Ideo Concepts Co. Ltd.", /* 10401 */ "interdev", /* 10402 */ "Istituto Nazionale di Fisica Nucleare", /* 10403 */ "LivingLogic AG", /* 10404 */ "Mental Health Cooperative, Inc.", /* 10405 */ "Neural Audio, Inc.", /* 10406 */ "North Coast Software", /* 10407 */ "Percula Consulting GmbH", /* 10408 */ "Tellurian Pty Ltd", /* 10409 */ "The Falcon's Nest", /* 10410 */ "University of North Carolina at Chapel Hill", /* 10411 */ "aTelo, Inc.", /* 10412 */ "System Innovations, Inc.", /* 10413 */ "Brauerei C. & A. Veltins GmbH & Co.", /* 10414 */ "3GPP", /* 10415 */ "ABC Virtual Communications", /* 10416 */ "Amerion, LLC", /* 10417 */ "Avocent Corporation", /* 10418 */ "Bactol Technical Limited", /* 10419 */ "Bayerisches Landeskriminalamt Abt. IuK", /* 10420 */ "C-CURE cvba", /* 10421 */ "China PTIC Information Industry Corporation", /* 10422 */ "CityXpress Corp.", /* 10423 */ "Cricket Communications", /* 10424 */ "Electricity Generating Authority of Thailand", /* 10425 */ "Elex NV", /* 10426 */ "Embrace Networks", /* 10427 */ "Furukawa Industrial S.A. - Curitiba", /* 10428 */ "Gelwarg.Net", /* 10429 */ "globalremote.com AG", /* 10430 */ "Ingenieurbuero Kittelberger GmbH", /* 10431 */ "Mott Community College", /* 10432 */ "MuTek Solution Inc.", /* 10433 */ "NIKHEF", /* 10434 */ "Omnitel", /* 10435 */ "Oxford university", /* 10436 */ "Peppercon AG", /* 10437 */ "Portima SC", /* 10438 */ "Power Measurement Ltd", /* 10439 */ "Rose I.T. Solutions", /* 10440 */ "Silas Technologies, Inc.", /* 10441 */ "Spider Networks", /* 10442 */ "Three Pillars", /* 10443 */ "tichen.net", /* 10444 */ "Trillium Photonics", /* 10445 */ "Trinity Expert Systems plc", /* 10446 */ "University of Mississippi", /* 10447 */ "University of Puget Sound", /* 10448 */ "Xceedium, Inc.", /* 10449 */ "Altamar Networks", /* 10450 */ "Boston Market Corporation", /* 10451 */ "Egton Medical Information Systems Ltd", /* 10452 */ "IL JIN TELECOM ELEC.CO., Ltd.", /* 10453 */ "Optical Crossing Inc", /* 10454 */ "Paradigm", /* 10455 */ "PLANET Technology Corp.", /* 10456 */ "DB Informatik Dienste GmbH", /* 10457 */ "2000-X Technologies, Inc.", /* 10458 */ "Hexin Software", /* 10459 */ "HiSolutions AG", /* 10460 */ "Tixo Consulting", /* 10461 */ "Atek Ltd.", /* 10462 */ "DEVK Versicherungen", /* 10463 */ "elata plc", /* 10464 */ "Flypaper", /* 10465 */ "Holim Technology", /* 10466 */ "Ingenieurbüro Jörg Geistmann", /* 10467 */ "IRTNOG.ORG", /* 10468 */ "Lidcam Technology Pty Ltd", /* 10469 */ "Media Brokers International", /* 10470 */ "OpenFortress", /* 10471 */ "Recourse Technologies, Inc.", /* 10472 */ "SEB AB", /* 10473 */ "Servlets.Net Corporation", /* 10474 */ "Slovak University of Agriculture", /* 10475 */ "Summit Media Partners, LLC", /* 10476 */ "Telephony@Work Inc.", /* 10477 */ "Transeonic Systems, Inc.", /* 10478 */ "Web Services, Inc.", /* 10479 */ "Wily Technology", /* 10480 */ "AlJISR Information Services", /* 10481 */ "Nortel", /* 10482 */ "Winalysis Software", /* 10483 */ "TF1 sa", /* 10484 */ "About Web Services", /* 10485 */ "Aspelle Ltd", /* 10486 */ "Business Information Publications", /* 10487 */ "Chelsio Communications", /* 10488 */ "Design Combus Ltd", /* 10489 */ "GNF", /* 10490 */ "Hampshire College", /* 10491 */ "HST High Soft Tech GmbH", /* 10492 */ "Innovance Networks Inc.", /* 10493 */ "InphoMatch Inc.", /* 10494 */ "Interlink, Inc", /* 10495 */ "Link Simulation & Training", /* 10496 */ "Maly's of California", /* 10497 */ "michaeljcrawford.com", /* 10498 */ "Ministerium des Innern Sachsen-Anhalt", /* 10499 */ "Music Choice", /* 10500 */ "Netman Company", /* 10501 */ "North Dakota University System", /* 10502 */ "Power Innovations International", /* 10503 */ "Printronix, Inc.", /* 10504 */ "Quorus Medical Systems", /* 10505 */ "RadioShack Corporation", /* 10506 */ "Reciproca", /* 10507 */ "Res Mod Man", /* 10508 */ "Rightvision", /* 10509 */ "ScreamingMedia", /* 10510 */ "SimpleDevices, Inc.", /* 10511 */ "Spectrum Image", /* 10512 */ "Steltor", /* 10513 */ "StrongAuth, Inc.", /* 10514 */ "Terry Nazon Inc", /* 10515 */ "T-Nova GmbH, Deutsche Telekom", /* 10516 */ "Toronto POlice Service", /* 10517 */ "TrunkNet", /* 10518 */ "Tsinghua Unisplendour Co., ltd", /* 10519 */ "Tyco Electronics Power Systems", /* 10520 */ "VoicePlanet, Inc.", /* 10521 */ "Voigt & Haeffner GmbH", /* 10522 */ "Wanadoo Data", /* 10523 */ "Widevine Technologies", /* 10524 */ "Evangelisch Lutherische Kirche Bayern", /* 10525 */ "Facultad de Ingenieria", /* 10526 */ "METRObility Optical Systems, Inc.", /* 10527 */ "Solid Information Technology Corp", /* 10528 */ "Gemtek Systems Holding BV", /* 10529 */ "NordicEdge", /* 10530 */ "C.T.Com", /* 10531 */ "RifeTech Inc.", /* 10532 */ "SEITENBAU online agentur GbmH", /* 10533 */ "SECOM Co., Ltd.", /* 10534 */ "London Internet Exchange", /* 10535 */ "Simon's Rock College of Bard", /* 10536 */ "AB Trav och Galopp", /* 10537 */ "Abstrakt Design", /* 10538 */ "AlwaysOn Ltd", /* 10539 */ "AXL Software", /* 10540 */ "Caymasa El Sendero, SA", /* 10541 */ "ChongQing GRC Telecom Co., Ltd", /* 10542 */ "DeJarnette Research Systems, Inc.", /* 10543 */ "Factual Data", /* 10544 */ "gentics net.solutions", /* 10545 */ "Inturio Property Rights Holdings Limited", /* 10546 */ "Matrix Applied Computing Ltd", /* 10547 */ "Netzwert AG", /* 10548 */ "NewVation", /* 10549 */ "n-tv GmbH & Co. KG", /* 10550 */ "parergy", /* 10551 */ "Passlogix Inc.", /* 10552 */ "Q-Networks", /* 10553 */ "Qwest Wireless, L.L.C", /* 10554 */ "Ramcar Group of Companies", /* 10555 */ "recomp GmbH Netzwerke & Systemberatung", /* 10556 */ "Sherwood International Limited", /* 10557 */ "Silogix", /* 10558 */ "Softeck", /* 10559 */ "South Florida Water Management District", /* 10560 */ "Star Valley Solutions Inc.", /* 10561 */ "Werkleitz Gesellschaft e.V.", /* 10562 */ "Portland Public Schools", /* 10563 */ "T.I.A. Scandinavia", /* 10564 */ "Universite de Savoie", /* 10565 */ "Universiti Pendidikan Sultan Idris", /* 10566 */ "eyou.net Corp.", /* 10567 */ "China Sunbo Corp.", /* 10568 */ "Coker Net", /* 10569 */ "Manly Man Club", /* 10570 */ "Merck KGaA", /* 10571 */ "100world.com AG", /* 10572 */ "Aitech Space Systems Inc.", /* 10573 */ "Carbon Based Pty Ltd.", /* 10574 */ "Cumulus IT AS", /* 10575 */ "Cygsoft Limited", /* 10576 */ "Eilat On-Line Ltd.", /* 10577 */ "Electric Insurance Company", /* 10578 */ "Eswoosh", /* 10579 */ "Handspring, Inc", /* 10580 */ "Icomera", /* 10581 */ "Linear Systems Ltd.", /* 10582 */ "Netizen S.A.", /* 10583 */ "Hopcount Limited", /* 10584 */ "Paris-alesia", /* 10585 */ "PennWell Corp", /* 10586 */ "PharmaPartners B.V.", /* 10587 */ "Pixelboxx GmbH", /* 10588 */ "Rocketrader.com", /* 10589 */ "Sage Information Consultants , Inc.", /* 10590 */ "Salix Training Limited", /* 10591 */ "SolutionInc", /* 10592 */ "SYBCOM GmbH", /* 10593 */ "Transynergy", /* 10594 */ "Tyrell Software Corporation", /* 10595 */ "Vignon Informatique France", /* 10596 */ "Alliance Capital", /* 10597 */ "Applied System Design", /* 10598 */ "Department of Families", /* 10599 */ "Innovative Computing Laboratory", /* 10600 */ "Jataayu Software Pvt Ltd.", /* 10601 */ "JIERA", /* 10602 */ "Kafre", /* 10603 */ "Zarlink Semiconductor", /* 10604 */ "Infodesk S. A.", /* 10605 */ "IntraCom Australia Pty Ltd", /* 10606 */ "ACG Solutions, LLC", /* 10607 */ "alpha-lab", /* 10608 */ "Applied Science Fiction", /* 10609 */ "Aubergiste Inc.", /* 10610 */ "BLU SPA", /* 10611 */ "Centralny Osrodek Informatyki Gornictwa S.A.", /* 10612 */ "Envivio", /* 10613 */ "Equity Technology Group, Inc.", /* 10614 */ "GartonWorks, Inc.", /* 10615 */ "GeDInfo s.c.r.l.", /* 10616 */ "INFO Consulting GmbH", /* 10617 */ "InfoStream ASP", /* 10618 */ "innuworks", /* 10619 */ "iSoftel Ltd", /* 10620 */ "bvba Med. Kab. dr. Sebrechts E.", /* 10621 */ "Karma Designs", /* 10622 */ "KnowledgeCube", /* 10623 */ "Richard Lucassen Electronics", /* 10624 */ "Maincube Inc.", /* 10625 */ "Mulvey Family", /* 10626 */ "N-SOFT", /* 10627 */ "Project 49 AG", /* 10628 */ "Questus Group, Inc.", /* 10629 */ "Scintec AG", /* 10630 */ "SeRIQA Networks", /* 10631 */ "Telecomet International", /* 10632 */ "TICOM, Inc.", /* 10633 */ "Trio Networks", /* 10634 */ "Tucows Inc.", /* 10635 */ "University of Applied Sciences Cologne", /* 10636 */ "Vanderbilt University Medical Center", /* 10637 */ "Venation", /* 10638 */ "Unassigned", /* 10639 */ "West Interactive Corporation", /* 10640 */ "White Eagle Informatics", /* 10641 */ "Zebra Technologies Corporation", /* 10642 */ "NC Soft", /* 10643 */ "Interactive Software Design", /* 10644 */ "Pandanus Ltd", /* 10645 */ "ADI Computer Solutions", /* 10646 */ "Advanced Science & Technology Institute", /* 10647 */ "BlazeNet Ltd.", /* 10648 */ "DST Innovis", /* 10649 */ "Easter-eggs", /* 10650 */ "ENAC", /* 10651 */ "Ezitrust Limited", /* 10652 */ "Fotre & Associates", /* 10653 */ "Future Space, S.A.", /* 10654 */ "Global Office Software Pty Ltd", /* 10655 */ "Hardy and Associates", /* 10656 */ "InfoCyclone Ltd.", /* 10657 */ "IP Services", /* 10658 */ "ISR Global Telecom, Inc.", /* 10659 */ "KeyTrend Technology (S) Pte Ltd", /* 10660 */ "MainBrain", /* 10661 */ "Mid-Hudson Communications", /* 10662 */ "MQS", /* 10663 */ "Netropolis", /* 10664 */ "Ocyrus", /* 10665 */ "Organization of Residence Students", /* 10666 */ "Proxima Technology Pty Ltd", /* 10667 */ "riodata GmbH", /* 10668 */ "San Miguel Industrial S.A.", /* 10669 */ "Solutions E.T.C. GmbH", /* 10670 */ "studio Alpha", /* 10671 */ "Swarthmore College", /* 10672 */ "TELEM GmbH", /* 10673 */ "TOP-keskus", /* 10674 */ "UNESCO", /* 10675 */ "UniData Communication Systems, Inc", /* 10676 */ "University of Debrecen", /* 10677 */ "WorldWideWatson", /* 10678 */ "Zzyzx Technologies Inc.", /* 10679 */ "CAPCom AG", /* 10680 */ "KASYS Incorporated", /* 10681 */ "UDcast", /* 10682 */ "Heaman System co.,ltd.", /* 10683 */ "Terabolic", /* 10684 */ "Object Tools Limited", /* 10685 */ "Thruport Technologies", /* 10686 */ "Townsend Communications, Inc.", /* 10687 */ "Unassigned", /* 10688 */ "Ahaza Systems", /* 10689 */ "Celltrex LTD", /* 10690 */ "Chataigner", /* 10691 */ "freenet.de AG", /* 10692 */ "iTopia Inc.", /* 10693 */ "Measurable Solutions, Inc.", /* 10694 */ "NIXC, Inc.", /* 10695 */ "Nuxeo", /* 10696 */ "Optio Software, Inc.", /* 10697 */ "Sanitätsbetrieb Meran", /* 10698 */ "SpellCaster Telecommunications Inc.", /* 10699 */ "Bulldog Technologies", /* 10700 */ "Telefonica DataCorp, S.A.", /* 10701 */ "Solvare", /* 10702 */ "ATnet", /* 10703 */ "Barracuda Networks AG", /* 10704 */ "VOGT electronic AG", /* 10705 */ "Accelerated Encryption Processing Ltd", /* 10706 */ "Adhersis", /* 10707 */ "Advanced System Architectures Ltd", /* 10708 */ "ATUX", /* 10709 */ "Avanade Inc", /* 10710 */ "BAWI", /* 10711 */ "Belkamneft", /* 10712 */ "Chevin Ltd", /* 10713 */ "Dimension Data", /* 10714 */ "ForwardPath", /* 10715 */ "Freedomland ITN SpA", /* 10716 */ "Genie Telecom", /* 10717 */ "Harris Wilder Pty Ltd", /* 10718 */ "Atos Origin Nederland B.V. (aonl)", /* 10719 */ "LIMSI", /* 10720 */ "Britestream Networks, Inc.", /* 10721 */ "Marque d'Or", /* 10722 */ "Mercury PS", /* 10723 */ "Morpheus Net", /* 10724 */ "Pacific Internet Ltd", /* 10725 */ "Quantiva, Inc", /* 10726 */ "Red Cientifica Peruana", /* 10727 */ "Redline Communications Inc.", /* 10728 */ "Red-M Communications Ltd", /* 10729 */ "SEE Telecom", /* 10730 */ "Silicon Energy", /* 10731 */ "Symbidia Limited", /* 10732 */ "The Mercury File System", /* 10733 */ "TippingPoint Technologies", /* 10734 */ "Unicorn Holding a.s.", /* 10735 */ "University of Denver", /* 10736 */ "Web Simulation", /* 10737 */ "Comuniq Inc.", /* 10738 */ "DELPHIC Medical Systems", /* 10739 */ "Neodev", /* 10740 */ "Vertical Inversion Systems, Inc.", /* 10741 */ "Nozema N.V.", /* 10742 */ "Riksförsäkringsverket (RFV)", /* 10743 */ "Kvarnbäcken Konsult AB", /* 10744 */ "CSO Lanifex GmbH", /* 10745 */ "Rechenzentrum der Bundesfinanzverwaltung Frankfurt am Main", /* 10746 */ "Rowan University", /* 10747 */ "Software Factory GmbH", /* 10748 */ "/dev/secure Pty Ltd", /* 10749 */ "3G-Scene Plc", /* 10750 */ "3Plex", /* 10751 */ "Artiman Oy", /* 10752 */ "Billing for Enterprises", /* 10753 */ "CAS Tecnologia S/A", /* 10754 */ "ChipData, Inc.", /* 10755 */ "Chongho Information & Communications co., LTD", /* 10756 */ "Diogenes, Inc.", /* 10757 */ "Elyzium Limited", /* 10758 */ "Energos asa", /* 10759 */ "Gravity Hill Technologies, Inc.", /* 10760 */ "Greenheck Fan", /* 10761 */ "Horizon Web Graphics", /* 10762 */ "HanSung Teliann, Inc", /* 10763 */ "Infotrek", /* 10764 */ "INZEN Co., Ltd.", /* 10765 */ "ISG Systems AB", /* 10766 */ "James Madison University", /* 10767 */ "L'Envol Limited", /* 10768 */ "ITDZ Berlin", /* 10769 */ "Make-Ing.com.ar", /* 10770 */ "Morrison Academy", /* 10771 */ "novalis media", /* 10772 */ "Pacific Northwest Networks, Inc.", /* 10773 */ "Perforations Ltd", /* 10774 */ "PERI Formwork Systems, Inc.", /* 10775 */ "Reactive Network Solutions Inc", /* 10776 */ "Revicon Srl", /* 10777 */ "RTCL Lab, University of Michigan", /* 10778 */ "Sparkassenversicherung Wiesbaden", /* 10779 */ "SWAN, s.r.o.", /* 10780 */ "Schneider Electric Buildings AB", /* 10781 */ "TAZZ Networks", /* 10782 */ "The Church of Jesus Christ of Latter-Day Saints", /* 10783 */ "Time & Frequency Solutions Ltd", /* 10784 */ "Transtech Networks", /* 10785 */ "UNSW Physics APT", /* 10786 */ "Verity, Inc.", /* 10787 */ "Volt Information Sciences", /* 10788 */ "WebAgents GmbH", /* 10789 */ "Websilicon", /* 10790 */ "WestOne", /* 10791 */ "Xeline Co., Ltd.", /* 10792 */ "YourASP Pty Ltd", /* 10793 */ "ZTR Control System", /* 10794 */ "Bizz Technologies SAS", /* 10795 */ "C.R.F. Consulting Ltd", /* 10796 */ "Commercial Data Systems", /* 10797 */ "Commtel", /* 10798 */ "Jungo Software Technologies Ltd.", /* 10799 */ "Kinor", /* 10800 */ "Rapid 7, Inc.", /* 10801 */ "RBG", /* 10802 */ "Staudinger Wels", /* 10803 */ "Union Bank of California", /* 10804 */ "Wedgetail Communications", /* 10805 */ "Xebeo Communications, Inc.", /* 10806 */ "Centrale Financien Instellingen", /* 10807 */ "China Greatwall Computer Shenzhen Co., LTD", /* 10808 */ "Disha Technologies", /* 10809 */ "Nobelmann", /* 10810 */ "XiaMen Good First Optics Electricity Integration CO.,LTD", /* 10811 */ "InfoTeCs", /* 10812 */ "Centre National de la Recherche Scientifique", /* 10813 */ "UNIFIED Technologies, Inc.", /* 10814 */ "CyberTrader, Inc.", /* 10815 */ "Datang Radio Communication Branch", /* 10816 */ "Heraeus Holding GmbH", /* 10817 */ ".windh AB", /* 10818 */ "[IIX-NAP] MAHATEL, PT", /* 10819 */ "LM Sistemas", /* 10820 */ "Absolight", /* 10821 */ "ADTEC", /* 10822 */ "Advanced Research & Technology Ltd", /* 10823 */ "AGAVA Software Ltd.", /* 10824 */ "Alectta", /* 10825 */ "Alice-Salomon-Fachhochschule für Sozialarbeit und Sozialpädagogik Berlin", /* 10826 */ "ALVE Technology Corporation", /* 10827 */ "American Data Technology, Inc.", /* 10828 */ "Andover Controls Corporation", /* 10829 */ "APCON, Inc.", /* 10830 */ "At Oliver.com", /* 10831 */ "B2C2, Inc.", /* 10832 */ "binarycore networks", /* 10833 */ "CargoBay", /* 10834 */ "cartoonviolence.net", /* 10835 */ "Command-e Technology Co., Ltd.", /* 10836 */ "CompHealth", /* 10837 */ "Contec C.V.", /* 10838 */ "DISTRIBUTEL", /* 10839 */ "Dragon Computer Consultants Inc.", /* 10840 */ "Ejasent Inc.", /* 10841 */ "EnBW Systeme Infrastruktur Support GmbH", /* 10842 */ "Ferret", /* 10843 */ "Fidelia, Inc.", /* 10844 */ "grandmas, inc", /* 10845 */ "Impact Technologies, Inc.", /* 10846 */ "Insystek Inc.", /* 10847 */ "IPfonix, Inc.", /* 10848 */ "Ithiriel Software", /* 10849 */ "KEFTA Inc.", /* 10850 */ "Knowledge Intelligence AG", /* 10851 */ "Kuulalaakeri Oy", /* 10852 */ "LTC Sp z o.o.", /* 10853 */ "Lviv National Polytechnical University", /* 10854 */ "Mascon Communication Technologies", /* 10855 */ "Menlo Park Technologies", /* 10856 */ "Mindframe Software & Services Pvt. Ltd.", /* 10857 */ "Mycon Networks", /* 10858 */ "myinternet Ltd", /* 10859 */ "Naumann EDV", /* 10860 */ "Niels Bohr Institute", /* 10861 */ "NOAH Industries, Inc.", /* 10862 */ "Odyssey Technologies Limited", /* 10863 */ "Pacific University", /* 10864 */ "Pete Wilson, consulting software engineer", /* 10865 */ "Philip M Lembo", /* 10866 */ "playdead networks", /* 10867 */ "PremiTech A/S", /* 10868 */ "Datalogic Mobile, Inc.", /* 10869 */ "Safewww r&d Ltd", /* 10870 */ "Shanghai Teraband Phtonics Co., Ltd.", /* 10871 */ "SkyFlow Inc", /* 10872 */ "Soros Foundation Kazakhstan", /* 10873 */ "Spectrum Astro Inc", /* 10874 */ "SSH Communications Security Corp.", /* 10875 */ "Super Micro Computer Inc.", /* 10876 */ "System Services Sp. z o. o.", /* 10877 */ "Techlink Desenvolvimentos Tecnologicos Ltda", /* 10878 */ "Tenebras, LLC", /* 10879 */ "Togabi Technologies, Inc.", /* 10880 */ "Uffizio Software Consultants Pvt. Ltd.", /* 10881 */ "Université Paris 5", /* 10882 */ "Unassigned", /* 10883 */ "Vinzant, Inc.", /* 10884 */ "Virtual Monet Technologies", /* 10885 */ "Westland Helicopters Ltd", /* 10886 */ "WizCom Ltd", /* 10887 */ "Xelus Inc", /* 10888 */ "AL Digital Ltd.", /* 10889 */ "CommWorks", /* 10890 */ "Dave's Network Services", /* 10891 */ "Doctors.net.uk", /* 10892 */ "Iomedex Corporation", /* 10893 */ "Novra Technologies Inc.", /* 10894 */ "Raonet Systems Inc.", /* 10895 */ "The Career and Education Network, Inc.", /* 10896 */ "RECOMBINANTWEB", /* 10897 */ "OOZOOD", /* 10898 */ "Consors Discount-Broker AG", /* 10899 */ "Serco", /* 10900 */ "Spinnaker Networks, Inc.", /* 10901 */ "3IC Inc.", /* 10902 */ "Activate", /* 10903 */ "Alpine-Mayreder BauGmbH", /* 10904 */ "Arsenal Digital Solutions", /* 10905 */ "A-SK Computers", /* 10906 */ "Ateb Limited", /* 10907 */ "Bigsur Communications", /* 10908 */ "BroadTel Communications", /* 10909 */ "Chateau Systems, Inc", /* 10910 */ "Appello, a.s.", /* 10911 */ "Cincom Systems, Inc.", /* 10912 */ "Client Software International", /* 10913 */ "COLT Telecommunications", /* 10914 */ "ConAgra Foods, Inc.", /* 10915 */ "Cyneta Networks", /* 10916 */ "Datamax Coporation", /* 10917 */ "Datamission", /* 10918 */ "dbap GmbH", /* 10919 */ "Dir Solutions bv", /* 10920 */ "Drumgrange Limited", /* 10921 */ "ELSIS", /* 10922 */ "Ericsson AB - Packet Core Networks", /* 10923 */ "ESTOS GmbH", /* 10924 */ "Firmseek", /* 10925 */ "Food Brokers Limited", /* 10926 */ "Fullsix", /* 10927 */ "Fybubblan.com Consulting", /* 10928 */ "GCD Printlayout", /* 10929 */ "Georg-August Univeristy Goettingen (Internet-AG)", /* 10930 */ "GIGA STREAM - UMTS Technologies GmbH", /* 10931 */ "Gunadarma University", /* 10932 */ "H.A. Technical Solutions", /* 10933 */ "Hamsch", /* 10934 */ "Horizon Digital Enterprise, Inc.", /* 10935 */ "Ijichi Research", /* 10936 */ "INFALSYS", /* 10937 */ "International Messaging Associates Corporation", /* 10938 */ "internet news", /* 10939 */ "JD Thomlinson, Ltd.", /* 10940 */ "Kandalaya", /* 10941 */ "LifeLine Networks bv", /* 10942 */ "Linagora", /* 10943 */ "Maikis - EDV Dienstleistungen", /* 10944 */ "Midway Games West, Inc.", /* 10945 */ "Mouselink Ltd", /* 10946 */ "Multi-Druck GmbH", /* 10947 */ "MynaNET", /* 10948 */ "Netflix.com", /* 10949 */ "Netrake Corporation", /* 10950 */ "NetUSE AG", /* 10951 */ "NetZero Inc.", /* 10952 */ "Nightlife.se", /* 10953 */ "nikolici.com", /* 10954 */ "Wescan Limited", /* 10955 */ "Noviforum, Ltd.", /* 10956 */ "noze", /* 10957 */ "OLICORP Technologies", /* 10958 */ "Politechnika Warszawska", /* 10959 */ "Qualicontrol", /* 10960 */ "Ricciardi Technologies, Inc", /* 10961 */ "Rutgers, the State University of New Jersey", /* 10962 */ "SENA Systems", /* 10963 */ "SMT Data A/S", /* 10964 */ "SolidStreaming, Inc.", /* 10965 */ "Sollie codeWorks", /* 10966 */ "Surftool Systems", /* 10967 */ "Systematic Software Engineering A/S", /* 10968 */ "Thales Communications", /* 10969 */ "Threshold Networks", /* 10970 */ "VPN Dynamics, Inc.", /* 10971 */ "WIT-Software", /* 10972 */ "XMS", /* 10973 */ "Youngstown State University", /* 10974 */ "Zion Software, LLC", /* 10975 */ "Zoomtown.com", /* 10976 */ "Grid-Ireland", /* 10977 */ "Kumamoto Industrial Research Institute", /* 10978 */ "Capitel Group", /* 10979 */ "IQStor Networks", /* 10980 */ "RouterD Networks Limited", /* 10981 */ "UBS Warburg", /* 10982 */ "BTG, Inc.", /* 10983 */ "bvba Woodstone", /* 10984 */ "Jive Software", /* 10985 */ "Beijing Polytechnic University", /* 10986 */ "Eircell 2000", /* 10987 */ "SoloMio Corporation", /* 10988 */ "Alibre Incorporated", /* 10989 */ "Astrum Consulting", /* 10990 */ "Axis Integrated", /* 10991 */ "Babel Professional Services srl", /* 10992 */ "BabelTech A/S", /* 10993 */ "BISS GmbH", /* 10994 */ "Blue Mug", /* 10995 */ "CCSS (Europe) Ltd", /* 10996 */ "Connection Software", /* 10997 */ "Conversant Systems, LLC", /* 10998 */ "COS AG / Austria", /* 10999 */ "Creative Networking Solutions", /* 11000 */ "Dreyer Consulting", /* 11001 */ "Du Maurier Ltd", /* 11002 */ "e^deltacom", /* 11003 */ "EarthTrax, Inc.", /* 11004 */ "E-Certify", /* 11005 */ "FlashNet Computers Ltd", /* 11006 */ "FMV, Swedish Defence Materiel Administration", /* 11007 */ "Fujiwara Soft Office, Co., Ltd.", /* 11008 */ "Hadmut Danisch", /* 11009 */ "Harrison Family Organization", /* 11010 */ "HiWAAY Information Services", /* 11011 */ "ImagineAsia, Inc.", /* 11012 */ "LEC Information Systems", /* 11013 */ "Liberty University", /* 11014 */ "Lokomo Systems AB", /* 11015 */ "ManageStar.com, Inc.", /* 11016 */ "MARA Systems AB", /* 11017 */ "Massillon Cable Communications", /* 11018 */ "MENTA", /* 11019 */ "MVP Systems, Inc.", /* 11020 */ "N2 Broadband, Inc.", /* 11021 */ "Omnisci Software, Inc.", /* 11022 */ "Oxford University Computing Services", /* 11023 */ "P&S DataCom Corporation", /* 11024 */ "Pagoo", /* 11025 */ "Perfectway Corporation", /* 11026 */ "Physics Department, University of Kassel", /* 11027 */ "Reliable Networks, Inc.", /* 11028 */ "Reziprozitaet Consulting", /* 11029 */ "RouteFree Inc", /* 11030 */ "SATEC SA", /* 11031 */ "Semandex Networks, Inc.", /* 11032 */ "SentitO Networks", /* 11033 */ "Sentor Monitoring Systems Pty Ltd", /* 11034 */ "Sheer Genius Software", /* 11035 */ "Softax", /* 11036 */ "Stratyc L.L.C.", /* 11037 */ "TECO SOFT España, S.A.", /* 11038 */ "Tivo, Inc.", /* 11039 */ "Tool Banking Solutions", /* 11040 */ "UFSM", /* 11041 */ "ViaCLIX, Inc.", /* 11042 */ "VIDA Software S.L.", /* 11043 */ "Vodafone, Egypt", /* 11044 */ "Windborne Productions, Inc.", /* 11045 */ "Zero Computing S.r.l.", /* 11046 */ "AK-Industrieinformatik GmbH", /* 11047 */ "billiton internetservices", /* 11048 */ "CP Corporate Planning AG", /* 11049 */ "IDX Systems Corporations", /* 11050 */ "Point Systems", /* 11051 */ "Achmea Holding N.V.", /* 11052 */ "Direct Internet, Inc.", /* 11053 */ "Roman Seidl", /* 11054 */ "InnoAce CO., Ltd.", /* 11055 */ "Allmycrap.com", /* 11056 */ "Eyefinity, Inc", /* 11057 */ "Hitachi Information & Communication Engineering, Ltd.", /* 11058 */ "IMPRESS SOFTWARE AG", /* 11059 */ "Intervoice-Brite", /* 11060 */ "Longitude, Inc.", /* 11061 */ "Nurnberg Scientific", /* 11062 */ "PingMagic Limited", /* 11063 */ "RHB Securities", /* 11064 */ "Telcoware", /* 11065 */ "Teniad Technologies", /* 11066 */ "University of Belgrade", /* 11067 */ "Webscreen Technology Ltd.", /* 11068 */ "Yandex", /* 11069 */ "uReach Technologies, Inc.", /* 11070 */ "Motus Technologies", /* 11071 */ "IOTEC AB", /* 11072 */ "7th-Angel", /* 11073 */ "ALTER", /* 11074 */ "Antarix e Applications Limited", /* 11075 */ "Banesto S.A.", /* 11076 */ "C.net d.o.o.", /* 11077 */ "Centralworks LLC", /* 11078 */ "EIT Ltd", /* 11079 */ "Airwide Solutions", /* 11080 */ "Hydrogen Line, Inc.", /* 11081 */ "Illinois Central College", /* 11082 */ "Intersix Technologies S.A.", /* 11083 */ "ITDevices, Inc.", /* 11084 */ "Manojam", /* 11085 */ "MindTree Consulting Pvt Ltd", /* 11086 */ "Netforest Inc.", /* 11087 */ "Netus Technologies Co., Ltd.", /* 11088 */ "Preferred Systems", /* 11089 */ "Propero Limited", /* 11090 */ "Raze Technologies", /* 11091 */ "St. Boniface General Hospital", /* 11092 */ "Telamon Systems", /* 11093 */ "xpedite systems inc", /* 11094 */ "Loea Communications", /* 11095 */ "BlueArc, part of Hitachi Data Systems", /* 11096 */ "HEXAL AG", /* 11097 */ "ComTelco (North America), Inc.", /* 11098 */ "Dickerson Enginering", /* 11099 */ "Linux NetworX", /* 11100 */ "NRI SecureTechnologies, Ltd.", /* 11101 */ "OSA Technologies Inc.", /* 11102 */ "Opus International Consultants Ltd", /* 11103 */ "Passback IT Consultancy", /* 11104 */ "Pivot Consulting Ltd", /* 11105 */ "Scene7, Inc", /* 11106 */ "Ucentric Systems", /* 11107 */ "WaveMarket, Inc.", /* 11108 */ "XDV - Verein für experimentelle Datenverarbeitung", /* 11109 */ "Arkivio", /* 11110 */ "Bell Ontario Service Assurance", /* 11111 */ "Stephen Gould Paper co", /* 11112 */ "BJC HealthCare", /* 11113 */ "Citrus communications GmbH", /* 11114 */ "George Fox University", /* 11115 */ "Marco Hentschel", /* 11116 */ "Vereniging Open DomeinZenon", /* 11117 */ "Alpha1 Communications", /* 11118 */ "123india.com", /* 11119 */ "Advanced Software Resources, Inc.", /* 11120 */ "C3 Ltd", /* 11121 */ "Cencosud S.A.", /* 11122 */ "Colruyt", /* 11123 */ "Contenture Ltd", /* 11124 */ "Domani Software Services", /* 11125 */ "ESCP-EAP", /* 11126 */ "Fst s.r.l.", /* 11127 */ "Gadbois Consulting", /* 11128 */ "Google, Inc.", /* 11129 */ "Hülsmann Services e.K.", /* 11130 */ "INSIDERS Information Management GmbH", /* 11131 */ "Integral Solutions Corporation", /* 11132 */ "Jemmac Software Limited", /* 11133 */ "Lentronics", /* 11134 */ "Marian Eichhloz", /* 11135 */ "Meitetsu System Dev Co.Ltd", /* 11136 */ "Metaparadigm Pte Ltd", /* 11137 */ "mFormation Technologies Inc.", /* 11138 */ "NeoWiz Corporation", /* 11139 */ "Network Center, Shanghai Jiaotong University", /* 11140 */ "Omneon Video Networks", /* 11141 */ "OÖ Online", /* 11142 */ "PCSNC", /* 11143 */ "RadPharm", /* 11144 */ "Siemens Financial Services GmbH", /* 11145 */ "Siemens Informations Systems Limited", /* 11146 */ "SVTO Hewlett-Packard", /* 11147 */ "Swan Systems", /* 11148 */ "TI, d.o.o.", /* 11149 */ "Roamware Inc.", /* 11150 */ "Urschel Laboratories Incorporated", /* 11151 */ "Vocalcom", /* 11152 */ "WebWear", /* 11153 */ "WireX Communications, Inc.", /* 11154 */ "WVS-groep", /* 11155 */ "CDMEDIC", /* 11156 */ "MultiTech Solutions Inc.", /* 11157 */ "Panservice", /* 11158 */ "PC Dialogs Inc.", /* 11159 */ "TDK Corporation", /* 11160 */ "Wistron Corporation", /* 11161 */ "Advanced Campus Services", /* 11162 */ "HAL Computer Systems Ltd", /* 11163 */ "PBH Planungsbuero Hammer", /* 11164 */ "Acer Mobile Networks Inc.", /* 11165 */ "ALLEWA GmbH", /* 11166 */ "Azurtec, Inc.", /* 11167 */ "Banca del Gottardo", /* 11168 */ "Beacon Bioscience, Inc.", /* 11169 */ "Commsology", /* 11170 */ "CRoL", /* 11171 */ "Die Informatik-Werkstatt GmbH", /* 11172 */ "Directory Solutions", /* 11173 */ "DX Antenna Co., Ltd.", /* 11174 */ "Epic Group plc", /* 11175 */ "Objective Pathology Services Limited", /* 11176 */ "Grapevine Interactive (Pty) Ltd", /* 11177 */ "Guardian Controls International", /* 11178 */ "hereUare Communications, Inc.", /* 11179 */ "Invisible Hand Networks", /* 11180 */ "Jan Schmidt DV-Beratung", /* 11181 */ "Kretz Industries", /* 11182 */ "Mitac International Corp.", /* 11183 */ "Naray Information & Communication Enterprise", /* 11184 */ "POSSIO AB", /* 11185 */ "Rattan Information", /* 11186 */ "SNV Netherlands Development Organisation", /* 11187 */ "Universitat Rovira i Virgili", /* 11188 */ "University of Applied Sciences Schmalkalden", /* 11189 */ "Viox Services Inc.", /* 11190 */ "Xiam", /* 11191 */ "Xiph.org Foundation", /* 11192 */ "Salica Ltd", /* 11193 */ "Wireless Maingate", /* 11194 */ "VECTOR sp. z o.o.", /* 11195 */ "Marcant Internet Services GmbH", /* 11196 */ "A l Jazeera Satellite Channel", /* 11197 */ "Atrid Systemes", /* 11198 */ "Auspice, Inc.", /* 11199 */ "BellSouth", /* 11200 */ "Benefit Systems, Inc", /* 11201 */ "Blue Sky Studios", /* 11202 */ "Cybermation Inc.", /* 11203 */ "Entercept Security Technologies", /* 11204 */ "Environmental Systems Research Institute (ESRI)", /* 11205 */ "EPLS Enterprise Computing Pte Ltd", /* 11206 */ "Falk eSolutions AG", /* 11207 */ "Global Media Systems", /* 11208 */ "Gold Wire Technology", /* 11209 */ "Iain Stevenson", /* 11210 */ "MobiTV Inc.", /* 11211 */ "IDM", /* 11212 */ "Information Services Extended Inc.", /* 11213 */ "Meridis Corporation", /* 11214 */ "Navitaire, Inc.", /* 11215 */ "Neoware Systems", /* 11216 */ "Oceanet Technology", /* 11217 */ "Oculan Corp", /* 11218 */ "OpVista", /* 11219 */ "Pirelli Cavi e Sistemi S.p.A.", /* 11220 */ "PROCON GmbH", /* 11221 */ "Rochester General Hospital", /* 11222 */ "RWT Telefony Polskie S.A.", /* 11223 */ "SAEBEX (Pty) Ltd", /* 11224 */ "SCMB", /* 11225 */ "Skandinaviska Magasin1 AB", /* 11226 */ "StartCorp", /* 11227 */ "SystemBase Co,.Ltd.", /* 11228 */ "Systemware", /* 11229 */ "Voice Access Technologies", /* 11230 */ "Wincom Systems, Inc.", /* 11231 */ "Apocalypse Computing Services", /* 11232 */ "Harald Gliebe", /* 11233 */ "Hotcircles", /* 11234 */ "WhichMall.com", /* 11235 */ "Mosakin International Corporation", /* 11236 */ "ITEK spf", /* 11237 */ "APS Systeme", /* 11238 */ "Bennett, Coleman & Co. Ltd.", /* 11239 */ "Caixa d'Estalvis i Pensions de Barcelona", /* 11240 */ "Carmel Secondary School", /* 11241 */ "Custom Electronics", /* 11242 */ "DCWG", /* 11243 */ "NET Control", /* 11244 */ "E2open", /* 11245 */ "GHZ Inc.", /* 11246 */ "GlaxoSmithKline", /* 11247 */ "Greenwich Technology Partners, Inc.", /* 11248 */ "i-DNS.net International Inc", /* 11249 */ "Indiana Purdue University Ft. Wayne", /* 11250 */ "Intrado Inc.", /* 11251 */ "iTouch Labs", /* 11252 */ "J.P. Stephenson Co.", /* 11253 */ "Jydsk Consulting", /* 11254 */ "LocatioNet Systems LTD", /* 11255 */ "Stormshield", /* 11256 */ "Net-ES", /* 11257 */ "Nogui AB", /* 11258 */ "Sepulveda Systems", /* 11259 */ "Single Source oy", /* 11260 */ "Tschaeche Services", /* 11261 */ "Wire Card AG", /* 11262 */ "WRnetworks", /* 11263 */ "MobileArts AB", /* 11264 */ "SET Software, Inc.", /* 11265 */ "JiangSu Fujitsu Telecommunications Technology CO.,LTD.", /* 11266 */ "DISSC - Presidencia del Gobierno", /* 11267 */ "Aastra", /* 11268 */ "Aculab plc", /* 11269 */ "Adelphia Business Solutions", /* 11270 */ "Aria Technology Pte Ltd", /* 11271 */ "Birdstep Technology", /* 11272 */ "BJB Software, Inc.", /* 11273 */ "Centric Telecom Ltd", /* 11274 */ "ChangingWorlds", /* 11275 */ "Commil Ltd", /* 11276 */ "convergence integrated media gmbh", /* 11277 */ "CS Engineering b.v.", /* 11278 */ "Datalab Technologia S.A.", /* 11279 */ "Digimob Ltd", /* 11280 */ "digital bus", /* 11281 */ "DKSIN", /* 11282 */ "Dobsonics Laboratories", /* 11283 */ "ESW - EXTEL SYSTEMS WEDEL", /* 11284 */ "FlipDog.com", /* 11285 */ "H1", /* 11286 */ "High-Availability.com", /* 11287 */ "iCreate Software, Inc.", /* 11288 */ "imagine LAN Inc.", /* 11289 */ "Information Services Plc.", /* 11290 */ "IONA Technologies", /* 11291 */ "La Factoría de Comunicaciones Aplicadas,S.L.", /* 11292 */ "LocaNet", /* 11293 */ "Mobinor AS", /* 11294 */ "Cybercity", /* 11295 */ "Neon Software, Inc.", /* 11296 */ "NetNet, Inc", /* 11297 */ "NLweb.com", /* 11298 */ "On Time Systems", /* 11299 */ "Passageways Travel", /* 11300 */ "Pearson Education", /* 11301 */ "Perimeter Technology", /* 11302 */ "PhotoniXnet Corporation", /* 11303 */ "PrinterOn Corporation", /* 11304 */ "Research Institute for Particle and Nuclear Physics, Department of Biophysics", /* 11305 */ "Robarts Research Institute", /* 11306 */ "Solarwinds.net", /* 11307 */ "SWAPCOM", /* 11308 */ "TallGrass Communications, Inc.", /* 11309 */ "Technique Consultants Pty Ltd", /* 11310 */ "Tubitak - UEKAE", /* 11311 */ "Università di Salerno - D.I.A.", /* 11312 */ "University of Calgary", /* 11313 */ "University of Kansas", /* 11314 */ "USAconnect", /* 11315 */ "ware solutions", /* 11316 */ "Wieland Electric GmbH", /* 11317 */ "Xerox Research", /* 11318 */ "Alcatel (Alcatel Bell Space)", /* 11319 */ "Communal CC GmbH", /* 11320 */ "ECI IP Inc.", /* 11321 */ "Integrated Support Systems, Inc.", /* 11322 */ "Manpower, Inc.", /* 11323 */ "netsols.de", /* 11324 */ "OpenDesign, Inc.", /* 11325 */ "Blue Scooter, Inc.", /* 11326 */ "Xi'an Jiaotong University Jump network Technology Co.,Ltd", /* 11327 */ "Rana", /* 11328 */ "LLNL-NIF", /* 11329 */ "Inpronetwork corporation", /* 11330 */ "BetaSoft, Wojciech Kruk", /* 11331 */ "Broadstorm Telecommunications, Inc.", /* 11332 */ "Media Data Systems Pte Ltd", /* 11333 */ "OLES polymedia AG", /* 11334 */ "Quris, Inc.", /* 11335 */ "R-Squared Technologies", /* 11336 */ "Software Workhouse of Hite Lee", /* 11337 */ "Success Information System Co., Ltd.", /* 11338 */ "Danam Communications Inc.", /* 11339 */ "DREGIS Dresdner Global IT-Services Gesellschaft mbH", /* 11340 */ "NoWalls", /* 11341 */ "Finnet Networks Ltd.", /* 11342 */ "Terra, Sol 3", /* 11343 */ "The FreeRADIUS Server Project", /* 11344 */ "[microstage] Ingenieurbuero Raphael Dierkes", /* 11345 */ "Provinzial Versicherung", /* 11346 */ "Academ Consulting Services", /* 11347 */ "Airbus", /* 11348 */ "at rete ag", /* 11349 */ "Bondcar.com", /* 11350 */ "Bouwens", /* 11351 */ "Cognigen Corporation", /* 11352 */ "Das Buero am Draht GmbH", /* 11353 */ "Data Design Systems Incorporated", /* 11354 */ "DataVault", /* 11355 */ "DTV - Technical Knowledge Center of Denmark", /* 11356 */ "edeal Schroeder Maihoefer GbR", /* 11357 */ "Elcommtech Corp.", /* 11358 */ "EML Ltd", /* 11359 */ "Excenon", /* 11360 */ "FASTER CZ", /* 11361 */ "FCS Partners", /* 11362 */ "Federation of Norwegian Agricultural Cooperatives", /* 11363 */ "Gaeasoft Corp.", /* 11364 */ "Orange Slovakia", /* 11365 */ "Goanna Graphics", /* 11366 */ "Helix GmbH", /* 11367 */ "IAVista, Inc.", /* 11368 */ "LenovoEMC Ltd", /* 11369 */ "ITT CO., Ltd.", /* 11370 */ "jung myung telecom. co., Ltd.", /* 11371 */ "Meret Optical Communications", /* 11372 */ "NetVision Sp. z o.o.", /* 11373 */ "OKO Bank Group", /* 11374 */ "Pacific Geoscience Center", /* 11375 */ "Pedestal Software", /* 11376 */ "Product Technology Partners Ltd", /* 11377 */ "Quartz Electronics Ltd.", /* 11378 */ "Radiant Rt.", /* 11379 */ "Retek Inc", /* 11380 */ "Rogers Communications Inc", /* 11381 */ "RR Enterprises", /* 11382 */ "SaudiNet", /* 11383 */ "SevenLayer Services", /* 11384 */ "Spanlink Communications", /* 11385 */ "Studer", /* 11386 */ "T4 Consulting Group", /* 11387 */ "Tarantola Labs", /* 11388 */ "TECFA (Technologie de Formation et Apprentissage)", /* 11389 */ "Texas Department of Housing and Community Affairs", /* 11390 */ "The Texas GigaPOP", /* 11391 */ "Tools4ever bv", /* 11392 */ "Tymlabs Management Inc", /* 11393 */ "UD Technology", /* 11394 */ "Vancouver Public Library", /* 11395 */ "Webex China", /* 11396 */ "Xpedio AB", /* 11397 */ "Pyx Engineering AG", /* 11398 */ "Washington State University Vancouver", /* 11399 */ "Dept. of Information and Communications Technology, HK Institute ofVocational Education (Tsing Yi)", /* 11400 */ "CONCATEL, S.L.", /* 11401 */ "MRO Software Inc.", /* 11402 */ "Corente, Inc.", /* 11403 */ "Seanet Corporation", /* 11404 */ "shanghaionline Inc.", /* 11405 */ "SANDY Group", /* 11406 */ "obsceneskills.com", /* 11407 */ "Fiberhome Telecommunication Technologies Co.,LTD", /* 11408 */ "adequate systems GmbH", /* 11409 */ "Advanced Communication Devices Corp.", /* 11410 */ "AOL Australia", /* 11411 */ "BKtel communications GmbH", /* 11412 */ "Cape Clear Software Ltd.", /* 11413 */ "Carnation Technology Ltd.", /* 11414 */ "CLCsoft", /* 11415 */ "Allgera Corp.", /* 11416 */ "Cynops GmbH", /* 11417 */ "DFN-CERT Services GmbH", /* 11418 */ "FOTEL Corp.", /* 11419 */ "GHS Data Management", /* 11420 */ "Industrial Networking Solution", /* 11421 */ "Larmouth T&PDS Ltd", /* 11422 */ "Lucid Vision, Inc.", /* 11423 */ "MITSUBISHI GAS CHEMICAL COMPANY, Inc.", /* 11424 */ "MobileWebSurf", /* 11425 */ "Netfusions s.r.l.", /* 11426 */ "Particle Physics Group", /* 11427 */ "Redes de Computadoras", /* 11428 */ "Schumacher", /* 11429 */ "Simtek Corporation", /* 11430 */ "Southern Polytechnic State University", /* 11431 */ "TOWER Group Network", /* 11432 */ "University of West Bohemia", /* 11433 */ "Utah Scientific, Inc.", /* 11434 */ "WebEx Communications, Inc.", /* 11435 */ "XML Global Technologies, Inc.", /* 11436 */ "Xymbol", /* 11437 */ "Canadian Center for Remote Sensing (GeoAccess Division)", /* 11438 */ "CCLRC", /* 11439 */ "Sapros", /* 11440 */ "Goshen College", /* 11441 */ "InsertAds Inc.", /* 11442 */ "Morder Devices", /* 11443 */ "Frederick Engineering", /* 11444 */ "ANOREG-BR", /* 11445 */ "Adduce Networks", /* 11446 */ "XiLogic, L.L.C.", /* 11447 */ "ITology Co., Ltd", /* 11448 */ "Tethernet, Inc.", /* 11449 */ "xitec.de", /* 11450 */ "SINBON ELECTRONIC CO., LTD", /* 11451 */ "Allegient Systems", /* 11452 */ "Altadis", /* 11453 */ "Avencis SA", /* 11454 */ "Aviation Management Technologies GmbH", /* 11455 */ "CalvaEDI S.A.", /* 11456 */ "Cimcor, Inc.", /* 11457 */ "Computing Services Department, University of Liverpool", /* 11458 */ "Data Track Technology PLC", /* 11459 */ "datafront", /* 11460 */ "Deloitte & Touche", /* 11461 */ "DroneDAP", /* 11462 */ "EC-Founder", /* 11463 */ "Electronic Arts", /* 11464 */ "Envoy Technologies", /* 11465 */ "e-Pollination Enterprise, Inc.", /* 11466 */ "IntermediaSP", /* 11467 */ "Jackson County School District 6", /* 11468 */ "Kokong", /* 11469 */ "LX networking", /* 11470 */ "mineit software ltd", /* 11471 */ "MoeTi Corp.", /* 11472 */ "Nordic Messaging Technologies AB", /* 11473 */ "NTT DATA COPORATION", /* 11474 */ "Pro-Active", /* 11475 */ "Quest Controls, Inc.", /* 11476 */ "Rasvia Systems Incorporation", /* 11477 */ "Scorpion Controls Inc", /* 11478 */ "Selso", /* 11479 */ "SunnyInd Corp", /* 11480 */ "TEIMA Audiotex", /* 11481 */ "Universal Traffic Management Society of Japan(UTMS)", /* 11482 */ "University of Illinois at Urbana-Champaign", /* 11483 */ "viastore systems GmbH", /* 11484 */ "Vida Network Technologies, Inc.", /* 11485 */ "Vizzavi NL", /* 11486 */ "VoxSurf Ltd.", /* 11487 */ "AB Computers", /* 11488 */ "Alacritus", /* 11489 */ "BetweenMarkets, Inc.", /* 11490 */ "University of Jyvaskyla", /* 11491 */ "Micro Research Laboratory, Inc.", /* 11492 */ "Obourg Origny Informatique", /* 11493 */ "Nebulon Pty. Ltd.", /* 11494 */ "cubic.ch", /* 11495 */ "foo.cz", /* 11496 */ "Gamerz.NET Enterprises", /* 11497 */ "HCCnet B.V.", /* 11498 */ "Hollmann Consulting Services", /* 11499 */ "Infrant Technology Inc.", /* 11500 */ "IngmarNet", /* 11501 */ "ITU-T ASN.1 Project", /* 11502 */ "METRAWARE", /* 11503 */ "NDSL, Inc.", /* 11504 */ "Network-1 Security Solutions, Inc.", /* 11505 */ NULL, /* 11506 */ "ProBusiness", /* 11507 */ "School of Banking and Management in Cracow", /* 11508 */ "Schweizer Electronic AG", /* 11509 */ "Service Intelligence", /* 11510 */ "Southern Illinois University School of Medicine", /* 11511 */ "St. Joseph's College", /* 11512 */ "Strele Informatik", /* 11513 */ "Chris Abernethy", /* 11514 */ "SUB1 S.A.", /* 11515 */ "The Academy of Sciences of the Czech Republic", /* 11516 */ "Trivadis AG", /* 11517 */ "T-Soft Ltd.", /* 11518 */ "VET", /* 11519 */ "Visilinx, Inc.", /* 11520 */ "Broadcast Music Incorporated", /* 11521 */ "LINXTEK", /* 11522 */ "Fujitsu Laboratories of America, Inc.", /* 11523 */ "Ch5 Finland Oy", /* 11524 */ "brain://on AG", /* 11525 */ "GIRO LTD", /* 11526 */ "Bromax Communications, Inc.", /* 11527 */ "DVBern AG", /* 11528 */ "KOGA ELECTRONICS CO.", /* 11529 */ "3G - NetWorks", /* 11530 */ "aha-systems", /* 11531 */ "Bond University", /* 11532 */ "Chiba Industries", /* 11533 */ "coaXmedia", /* 11534 */ "COGITIS", /* 11535 */ "Cyber-Ark", /* 11536 */ "Dirección General de la Policía", /* 11537 */ "Elata Ltd.", /* 11538 */ "Essent Kabelcom", /* 11539 */ "ETIT", /* 11540 */ "Fugu Angst Productions", /* 11541 */ "GuangZhou GaoKe Communication Equipment Co., Ltd.", /* 11542 */ "Internet Northwest", /* 11543 */ "Kunsthochschule Fuer Medien", /* 11544 */ "Kurtev Intergalactic", /* 11545 */ "METRAWARE", /* 11546 */ "Mpower Communications Corporation", /* 11547 */ "NABLA2 s.r.l.", /* 11548 */ "NETOUS TECHNOLOGIES Ltd.", /* 11549 */ "NETPIA SYSTEMS Co.,LTD", /* 11550 */ "Orca Orcinus, Inc.", /* 11551 */ "page87", /* 11552 */ "Planet Technologies NV", /* 11553 */ "Pomcor", /* 11554 */ "Rider University", /* 11555 */ "Robert Burrell Donkin", /* 11556 */ "S&CI", /* 11557 */ "SOFICE", /* 11558 */ "SoftGame International Pty. Ltd.", /* 11559 */ "Tantia Technologies Inc.", /* 11560 */ "Topcon Positioning Systems, Inc.", /* 11561 */ "VE2UG", /* 11562 */ "Ahnlab, Inc", /* 11563 */ "CiteItWrite", /* 11564 */ "Instituto Nacional de Estatística - PORTUGAL", /* 11565 */ "Prologue Software", /* 11566 */ "DeltaLoyd Deutschland", /* 11567 */ "bmbwk", /* 11568 */ "handy.de Vertriebs GmbH", /* 11569 */ "Mages Touch", /* 11570 */ "NTI Studio's", /* 11571 */ "Rasvia Systems, Inc.", /* 11572 */ "rockus.at", /* 11573 */ "Seven-Winds", /* 11574 */ "Solution Design Laboratory", /* 11575 */ "Sunnycal Inc.", /* 11576 */ "Global System Services", /* 11577 */ "AirZip, Inc.", /* 11578 */ "Amadeus Data Processing GmbH", /* 11579 */ "Amdocs", /* 11580 */ "bylinux.net", /* 11581 */ "C&I Technologies", /* 11582 */ "Cayenta, Inc.", /* 11583 */ "CLASS AG", /* 11584 */ "ColoradoBiz.net", /* 11585 */ "DLR e.V.", /* 11586 */ "epictet AG", /* 11587 */ "ERA a.s.", /* 11588 */ "Exsior Data & Information Tech. Inc.", /* 11589 */ "Fortech Ltd.", /* 11590 */ "Free Software Foundation", /* 11591 */ "HANGZHOUSUNYARD INFORMATION ENGINEERING CO.,LTD", /* 11592 */ "IMISE", /* 11593 */ "LDCOM Networks", /* 11594 */ "Lightmaze AG", /* 11595 */ "Mediakabel", /* 11596 */ "MFB-Multa spol. s r.o.", /* 11597 */ "MGIC - Mortgage Guaranty Insurance Corp", /* 11598 */ "mille21", /* 11599 */ "Neogration Inc.", /* 11600 */ "Netaxs Internet Services", /* 11601 */ "New York State Office of the State Comptroller", /* 11602 */ "Nexxient Communications", /* 11603 */ "NorduGrid", /* 11604 */ "Optical Wireless Link Inc.", /* 11605 */ "Pacific Broadbank Networks", /* 11606 */ "Plumtree Software", /* 11607 */ "Pracom Pty Ltd", /* 11608 */ "PUSANWEB Ltd", /* 11609 */ "Sandvine Incorporated", /* 11610 */ "Secretaria da Fazenda do Estado de Sp", /* 11611 */ "STT s.r.l.", /* 11612 */ "Vortex Ltd", /* 11613 */ "vrwg", /* 11614 */ "Webaronet Technology", /* 11615 */ "WebPerform Group Ltd", /* 11616 */ "Cablevision Systems Holdings", /* 11617 */ "SOLTECH CO., Ltd.", /* 11618 */ "PTC Solutions Ltd", /* 11619 */ "PACE Anti-Piracy", /* 11620 */ "Agrotecnica Arpa scrl", /* 11621 */ "3PARData", /* 11622 */ "Aegis Software", /* 11623 */ "Bit-Lab PTY LTD", /* 11624 */ "Black Bear Software, LLC", /* 11625 */ "Combol GmbH", /* 11626 */ "David Pitts", /* 11627 */ "EDIPORT Telecommunication Ltd.", /* 11628 */ "Educational Service Unit #2", /* 11629 */ "eircomnet", /* 11630 */ "EnablingTrust LLC", /* 11631 */ "e-Sec Tecnologia em Seguranca de Dados LTDA", /* 11632 */ "Europop AG", /* 11633 */ "Exempla", /* 11634 */ "Fiorano Software Inc.", /* 11635 */ "Focal Point Software, Inc.", /* 11636 */ "Generatio GmbH", /* 11637 */ "Grapes Network Services", /* 11638 */ "Intersys Uruguay Ltda", /* 11639 */ "Miritek, Inc.", /* 11640 */ "NETOVA", /* 11641 */ "Nextra Ensure (UK)", /* 11642 */ "One Stop Consulting, Inc.", /* 11643 */ "Orbism Consulting", /* 11644 */ "Pentalog Inet", /* 11645 */ "PentaMedia Co., Ltd.", /* 11646 */ "Planetasia Ltd.,", /* 11647 */ "RemoteSite Technologies Inc.", /* 11648 */ "Ross Stores, Inc.", /* 11649 */ "Schnedermann Software-Consulting GmbH", /* 11650 */ "SideSpace", /* 11651 */ "Sonoma State University", /* 11652 */ "Stack Computer Solutions", /* 11653 */ "Strott Network Solutions", /* 11654 */ "SY.O. srl", /* 11655 */ "Synapse Systems AB", /* 11656 */ "Taiwan Telecommunication Network Services Co., Ltd.", /* 11657 */ "Universite Blaise PASCAL", /* 11658 */ "Virtual Security Research", /* 11659 */ "VMS Limited", /* 11660 */ "Wahoo International Enterprise Co., Ltd.", /* 11661 */ "Marcel Ruff", /* 11662 */ "+X Altaïr Toulouse", /* 11663 */ "base2", /* 11664 */ "dacom", /* 11665 */ "Institute of Communications Engineering - University of Hanover", /* 11666 */ "New York State Education Department", /* 11667 */ "WRLucas", /* 11668 */ "Milhouse Technologies USA", /* 11669 */ NULL, /* 11670 */ NULL, /* 11671 */ NULL, /* 11672 */ NULL, /* 11673 */ NULL, /* 11674 */ NULL, /* 11675 */ NULL, /* 11676 */ NULL, /* 11677 */ NULL, /* 11678 */ NULL, /* 11679 */ NULL, /* 11680 */ NULL, /* 11681 */ NULL, /* 11682 */ NULL, /* 11683 */ NULL, /* 11684 */ NULL, /* 11685 */ NULL, /* 11686 */ NULL, /* 11687 */ NULL, /* 11688 */ NULL, /* 11689 */ NULL, /* 11690 */ NULL, /* 11691 */ NULL, /* 11692 */ NULL, /* 11693 */ NULL, /* 11694 */ NULL, /* 11695 */ NULL, /* 11696 */ NULL, /* 11697 */ NULL, /* 11698 */ NULL, /* 11699 */ NULL, /* 11700 */ NULL, /* 11701 */ NULL, /* 11702 */ NULL, /* 11703 */ NULL, /* 11704 */ NULL, /* 11705 */ NULL, /* 11706 */ NULL, /* 11707 */ NULL, /* 11708 */ NULL, /* 11709 */ NULL, /* 11710 */ NULL, /* 11711 */ NULL, /* 11712 */ NULL, /* 11713 */ NULL, /* 11714 */ NULL, /* 11715 */ NULL, /* 11716 */ NULL, /* 11717 */ NULL, /* 11718 */ NULL, /* 11719 */ NULL, /* 11720 */ NULL, /* 11721 */ NULL, /* 11722 */ NULL, /* 11723 */ NULL, /* 11724 */ NULL, /* 11725 */ NULL, /* 11726 */ NULL, /* 11727 */ NULL, /* 11728 */ NULL, /* 11729 */ NULL, /* 11730 */ NULL, /* 11731 */ NULL, /* 11732 */ NULL, /* 11733 */ NULL, /* 11734 */ NULL, /* 11735 */ NULL, /* 11736 */ NULL, /* 11737 */ NULL, /* 11738 */ NULL, /* 11739 */ NULL, /* 11740 */ NULL, /* 11741 */ NULL, /* 11742 */ NULL, /* 11743 */ NULL, /* 11744 */ NULL, /* 11745 */ NULL, /* 11746 */ NULL, /* 11747 */ NULL, /* 11748 */ NULL, /* 11749 */ NULL, /* 11750 */ NULL, /* 11751 */ NULL, /* 11752 */ NULL, /* 11753 */ NULL, /* 11754 */ NULL, /* 11755 */ NULL, /* 11756 */ NULL, /* 11757 */ NULL, /* 11758 */ NULL, /* 11759 */ NULL, /* 11760 */ NULL, /* 11761 */ NULL, /* 11762 */ NULL, /* 11763 */ NULL, /* 11764 */ NULL, /* 11765 */ NULL, /* 11766 */ NULL, /* 11767 */ NULL, /* 11768 */ NULL, /* 11769 */ "China Sanjiang Space Group", /* 11770 */ "81 Broad Street", /* 11771 */ "Adrock Software", /* 11772 */ "AGMODEL, NARC, JAPAN", /* 11773 */ "ASYK S.A.", /* 11774 */ "Atchik", /* 11775 */ "AviBit data processing GmbH", /* 11776 */ "Ayman LLC.", /* 11777 */ "BlueBridge Technologies AG", /* 11778 */ "Casedev Active Oy", /* 11779 */ "CBIM", /* 11780 */ "celtro", /* 11781 */ "Charles Industries, LTD", /* 11782 */ "Canon Software Information Systems Inc.", /* 11783 */ "Credant Technologies", /* 11784 */ "Critical Integration Ltd", /* 11785 */ "Daisy Software", /* 11786 */ "Datagate d.o.o.", /* 11787 */ "fluxx.com e-commerce GmbH", /* 11788 */ "ForeScout Technologies, Inc.", /* 11789 */ "GateWay Community College", /* 11790 */ "Giesecke and Devrient", /* 11791 */ "Grant County PUD", /* 11792 */ "IBM Slovakia (test)", /* 11793 */ "Incentive Technologies, Inc.", /* 11794 */ "Infoglobe", /* 11795 */ "InnoviData GmbH", /* 11796 */ "Kaboom Enterprises", /* 11797 */ "Lateral Sands Pty Ltd", /* 11798 */ "Latis Networks, Inc", /* 11799 */ "Logosoft", /* 11800 */ "MPSV", /* 11801 */ "Northwest Airlines, Inc.", /* 11802 */ "Ohlone Community College", /* 11803 */ "PCS", /* 11804 */ "Plexus", /* 11805 */ "Antonveneta ABN AMRO Bank", /* 11806 */ "SamuelBalle.com", /* 11807 */ "Sifry Consulting", /* 11808 */ "Skobeltsyn Institute of Nuclesr Physics, Moscow State University", /* 11809 */ "Solesys SA", /* 11810 */ "Spaces, Inc.", /* 11811 */ "TDC Internet A/S", /* 11812 */ "TMT Ltd.", /* 11813 */ "University of Nantes", /* 11814 */ "Yellow Online Inc.", /* 11815 */ "yuantong technology", /* 11816 */ "Zentrum Informatikdienste, Universitaet Zuerich", /* 11817 */ "Z-Star Microelectronics Corporation", /* 11818 */ "ZX Factory", /* 11819 */ "Fonterra Co-operative Group", /* 11820 */ "Jet Infosystems", /* 11821 */ "SPSU Selinux-LDAP Team", /* 11822 */ "WSMicroSystems Inc.", /* 11823 */ "Computer & Technologies International Ltd", /* 11824 */ "Daji Workshop", /* 11825 */ "Sistemas Tecnicos de Enseñanza Consultores", /* 11826 */ "ACUMEN ADVANCED TECHNOLOGIES Inc.", /* 11827 */ "Coast Mountains School District", /* 11828 */ "Corvil Networks", /* 11829 */ "F'Arty Crafts Pty Ltd", /* 11830 */ "Interactive Transaction Services, Inc.", /* 11831 */ "Joerg Preuss", /* 11832 */ "nCircle Network Security", /* 11833 */ "PLIVA d.d", /* 11834 */ "StreamServe, Inc.", /* 11835 */ "Swiss National Bank", /* 11836 */ "Telenor Mobile Communications", /* 11837 */ "Vistaar", /* 11838 */ "WebWayOne Ltd", /* 11839 */ "YR CONSEIL", /* 11840 */ "Aaltonen & Vuorela", /* 11841 */ "Anchora", /* 11842 */ "Argus Systems Group, Inc", /* 11843 */ "Beijing Super Channel Network Limited", /* 11844 */ "Blueair Networks", /* 11845 */ "CITAP", /* 11846 */ "Himnebaugh Consulting, Inc.", /* 11847 */ "INLINE Corporation", /* 11848 */ "Janus Technologies", /* 11849 */ "Native Names Corporation", /* 11850 */ "NetEconomist", /* 11851 */ "New Productivity Initiative Inc", /* 11852 */ "Public Service Company of New Mexico", /* 11853 */ "Healthvision", /* 11854 */ "Retirement By Design", /* 11855 */ "TNT Logistics North America", /* 11856 */ "Transmode Systems AB", /* 11857 */ "UANGEL", /* 11858 */ "WorldChain Inc.", /* 11859 */ "wossname.org.uk", /* 11860 */ "Codenet", /* 11861 */ "Columbia University in the City of New York", /* 11862 */ "TP-Link Technology Co.,Ltd", /* 11863 */ "Böke and Walterfang Electronic Systems Ltd", /* 11864 */ "Explo-IT Research", /* 11865 */ "GDTTI", /* 11866 */ "Loop Treinamento em Inform", /* 11867 */ "Placenet", /* 11868 */ "Roman Zielinski Metod och systemutveckling", /* 11869 */ "Sandhills Community College", /* 11870 */ "SpaceNet AG", /* 11871 */ "Systemy Mikroprocesorowe", /* 11872 */ "Yolke Corporation", /* 11873 */ "Scopus Tecnologia S. A.", /* 11874 */ "Biomet Merck BV", /* 11875 */ "Siteseers Inc.", /* 11876 */ "3UP Systems", /* 11877 */ "Achilles Guard, Inc d.b.a Critical Watch", /* 11878 */ "Castel et Fromaget", /* 11879 */ "Custom Business Link, Inc.", /* 11880 */ "FiberSpans Corporation", /* 11881 */ "geschke internet consulting", /* 11882 */ "Ignite Communications", /* 11883 */ "Indeed - Visual Concepts GmbH", /* 11884 */ "MMC Technology", /* 11885 */ "Nextcard, Inc.", /* 11886 */ "PSS Systems Inc", /* 11887 */ "Teamlog External", /* 11888 */ "The Answer Group, L.L.C.", /* 11889 */ "The Nog Network", /* 11890 */ "Unified Communications Pte Ltd", /* 11891 */ "Vodafone Global Platform & Internet Services", /* 11892 */ "The Pep Boys - Manny, Moe & Jack", /* 11893 */ "Integrity Solutions, Inc", /* 11894 */ "Globalnet", /* 11895 */ "3G Lab", /* 11896 */ "Acantho", /* 11897 */ "Agere Systems, Inc.", /* 11898 */ "Bitfone Corporation", /* 11899 */ "BlueSoft", /* 11900 */ "Bonndata GmbH", /* 11901 */ "Cartel Communication Systems Inc", /* 11902 */ "Case Western Reserve University", /* 11903 */ "CirqueDigital, LLC", /* 11904 */ "Icom Inc", /* 11905 */ "IF DRAUDIMAS", /* 11906 */ "ImaginaryRealities", /* 11907 */ "Instituto Cubano de Radio y Television", /* 11908 */ "Log On America, Inc.", /* 11909 */ "Michael Roettig Consulting", /* 11910 */ "Unassigned", /* 11911 */ "NetMotion Wireless Inc.", /* 11912 */ "netsys.com", /* 11913 */ "National Information Infrastructure Development Institute", /* 11914 */ "Oldring & Associates, Inc.", /* 11915 */ "Pablix", /* 11916 */ "PAR3 Communications", /* 11917 */ "PRAJA inc", /* 11918 */ "QCOM, Inc.", /* 11919 */ "quantumBEAM Ltd.", /* 11920 */ "Ruprecht & Partner OEG", /* 11921 */ "SD Inc.", /* 11922 */ "Spectrum Control, Inc.", /* 11923 */ "Techsystem Technologies", /* 11924 */ "The IQ Group, Inc.", /* 11925 */ "The United World Colleges (international)", /* 11926 */ "Tytrast Systems Inc.", /* 11927 */ "Indievisible", /* 11928 */ "Veridicom", /* 11929 */ "Vseobecná úverová banka, a.s.", /* 11930 */ "Staten Island University Hospital", /* 11931 */ "The Wolf Group", /* 11932 */ "University of Alberta", /* 11933 */ "Stadtsparkasse Köln", /* 11934 */ "Josuya Technology Corporation", /* 11935 */ "Amadeus NMC Holding, Inc.", /* 11936 */ "ArcSight, Inc.", /* 11937 */ "Cominet", /* 11938 */ "Electronic Direct, Inc.", /* 11939 */ "Medical Coding and Compliance Solutions, L.L.C.", /* 11940 */ "Mssu", /* 11941 */ "Muhen Software", /* 11942 */ "Net Partnets Sp. z o.o.", /* 11943 */ "Paulmichl NetWork's", /* 11944 */ "q-station.net", /* 11945 */ "Quanta Network Systems Inc.", /* 11946 */ "Stowarzyszenie FREEZE NET ASK", /* 11947 */ "Syracuse University", /* 11948 */ "Ukrsotsbank", /* 11949 */ "VivoCom Inc.", /* 11950 */ "VTechnologies Sàrl", /* 11951 */ "Zeta Broadband Inc", /* 11952 */ "ZUMtOBEL AG", /* 11953 */ "Elegant solutions consulting Inc.", /* 11954 */ "BeiJing NetPower TECHNOLOGIES Inc.", /* 11955 */ "Mobigen Co., Ltd.", /* 11956 */ "ITC", /* 11957 */ "Premonitia, Inc", /* 11958 */ "Coyote Rock", /* 11959 */ "Downlode Media", /* 11960 */ "LARC-USP", /* 11961 */ "Nevala", /* 11962 */ "Propel", /* 11963 */ "Technical Chamber of Greece", /* 11964 */ "Thomas Monitor Systems", /* 11965 */ "Alstom Power Sweden AB", /* 11966 */ "MLP AG", /* 11967 */ "SymLABS", /* 11968 */ "Systech Retail Systems Inc.", /* 11969 */ "Watch4Net Solutions", /* 11970 */ "Peter-Service Ltd.", /* 11971 */ "TAIS, Inc.", /* 11972 */ "North Central Collge", /* 11973 */ "Uffizio Internet Services GmbH", /* 11974 */ "ALPHA SYSTEMS", /* 11975 */ "AT&T Labs Intelligent Network Analysis", /* 11976 */ "Backwoods Communications, LLC", /* 11977 */ "Boxcar Media", /* 11978 */ "BrainStorm Business Resources, Inc.", /* 11979 */ "Bravenet Web Services, Inc", /* 11980 */ "CAC Ltd", /* 11981 */ "chiz.net", /* 11982 */ "CollectiveBid Systems Inc.", /* 11983 */ "Content Management AG", /* 11984 */ "Conysis S.A.", /* 11985 */ "CreekPath Systems", /* 11986 */ "Dakos data & communication co., Ltd.", /* 11987 */ "diCarta Inc.", /* 11988 */ "DME Corporation", /* 11989 */ "gadgeteer.org", /* 11990 */ "Greenpeace", /* 11991 */ "HeliXense Pte Ltd", /* 11992 */ "Hilbert Computing, Inc.", /* 11993 */ "Hubert Krause", /* 11994 */ "Hybrid Solutions, Inc.", /* 11995 */ "IBSN", /* 11996 */ "iKnowTheAnswer.com", /* 11997 */ "JSC Desarrollos y Aplicaciones", /* 11998 */ "KFKI Systems", /* 11999 */ "Ki Consulting & Solutions AB", /* 12000 */ "Lakefield Telecom, Inc.", /* 12001 */ "Lemur Networks, Inc.", /* 12002 */ "luna8 Ltd.", /* 12003 */ "MCK Advance Technologies", /* 12004 */ "MediaGS, Ltd.", /* 12005 */ "N.C.H. spa Network Computer House", /* 12006 */ "NAMS", /* 12007 */ "Pacher", /* 12008 */ "Regenstrief Institute for Health Care", /* 12009 */ "Schnackelchen", /* 12010 */ "SEAGULL", /* 12011 */ "Seoul National University of Technology", /* 12012 */ "Softworks Group Inc.", /* 12013 */ "Studio of Arts And Sciences", /* 12014 */ "TGA Technologies, Inc.", /* 12015 */ "Universite de Cergy-Pontoise", /* 12016 */ "VeratNET", /* 12017 */ "Vivanet Inc.", /* 12018 */ "waterford.org", /* 12019 */ "Webware Technologies Pvt. Ltd.", /* 12020 */ "Wesley WorldWide Solutions, Inc", /* 12021 */ "BRECIS Communications", /* 12022 */ "Unassigned", /* 12023 */ "Miraesys Co., Ltd", /* 12024 */ "C-EISA", /* 12025 */ "Proactive Java Consultancy LLP", /* 12026 */ "AccelaNET", /* 12027 */ "AirWave Wireless, Inc.", /* 12028 */ "Altawave Inc.", /* 12029 */ "ANAM Wireless Internet Solutions", /* 12030 */ "BitStream Logic, Inc", /* 12031 */ "Booz Allen Hamilton", /* 12032 */ "Checkmate Management", /* 12033 */ "Czech Certification Authority s.r.o.", /* 12034 */ "EBJ Consulting", /* 12035 */ "École normale supérieure - Paris", /* 12036 */ "Euronet Worldwide, Inc.", /* 12037 */ "everyhost.com", /* 12038 */ "Exalead S.A.", /* 12039 */ "gull house", /* 12040 */ "HTL Braunau", /* 12041 */ "Infosys Corporation", /* 12042 */ "Jasmap Inc.", /* 12043 */ "Lakesoft Consulting & ISP", /* 12044 */ "Medfusion, Inc", /* 12045 */ "Metro Information Concepts as", /* 12046 */ "Meylan Consulting", /* 12047 */ "Millennium Microwave Corporation", /* 12048 */ "NetPlanetEarth", /* 12049 */ "Ohman IT Consult", /* 12050 */ "Onix Electronic Systems, LLC", /* 12051 */ "RCN Telecom", /* 12052 */ "Skjaerlund Software", /* 12053 */ "Special Applied Intelligence Corporation", /* 12054 */ "SUDAC", /* 12055 */ "Tadiran Communications", /* 12056 */ "TE Data", /* 12057 */ "The YAK Corporation", /* 12058 */ "Digital Appliance Corp.", /* 12059 */ "TruePosition, Inc.", /* 12060 */ "University of Western Ontario", /* 12061 */ "User Interface Technologies Ltd.", /* 12062 */ "VeriCell, Inc.", /* 12063 */ "Zurich Scudder Investments, Inc", /* 12064 */ "APATON", /* 12065 */ "Daedalus Networks", /* 12066 */ "Pajo Networks", /* 12067 */ "Wroc³aw Centre of Networking and Supercomputing", /* 12068 */ "Corpex Internet GmbH", /* 12069 */ "WARCO", /* 12070 */ "@Home Japan Co., Ltd.", /* 12071 */ "Acrowave Systems Co., Ltd", /* 12072 */ "Aer Novo", /* 12073 */ "Alison Associates", /* 12074 */ "beckhaus consulting", /* 12075 */ "Bonware", /* 12076 */ "Broadmind Research Corporation", /* 12077 */ "Circle24 Technologies", /* 12078 */ "dotmaudot", /* 12079 */ "e-peopleserve", /* 12080 */ "Estic & Partners bv", /* 12081 */ "European Computer Telecoms AG", /* 12082 */ "Getronics Solutions Italia S.p.A.", /* 12083 */ "HighDeal", /* 12084 */ "KR Consulting", /* 12085 */ "MKAPIUM", /* 12086 */ "netdirectory.org", /* 12087 */ "Newdreamnet Co. Ltd.", /* 12088 */ "o3sis Infomation Technology AG", /* 12089 */ "Prophet Systems", /* 12090 */ "Real FS Inc.", /* 12091 */ "Rotech Healthcare Inc.", /* 12092 */ "Severoceska energetika, a.s.", /* 12093 */ "Supélec Campus de Metz", /* 12094 */ "Telenor Satellite Broadcasting", /* 12095 */ "Telic Communications, Inc.", /* 12096 */ "UZA - Universitair Ziekenhuis Antwerpen", /* 12097 */ "VooDoo X Solutions", /* 12098 */ "Woollen Services", /* 12099 */ "XecureNexus", /* 12100 */ "YCOM SA", /* 12101 */ "Airport Authority Hong Kong", /* 12102 */ "4Tier Software", /* 12103 */ "Asis Ltd.", /* 12104 */ "BISC", /* 12105 */ "BIPOP-CARIRE spa", /* 12106 */ "Caw Networks", /* 12107 */ "Concordant", /* 12108 */ "IT Service Omikron GmbH", /* 12109 */ "Lifeway Christian resources", /* 12110 */ "Mark Schnur Consulting", /* 12111 */ "NORSYS", /* 12112 */ "Zox, Inc.", /* 12113 */ "noris network AG", /* 12114 */ "Philips MP4Net", /* 12115 */ "Advanced Reality", /* 12116 */ "Atmel Nantes", /* 12117 */ "Centrata Inc.", /* 12118 */ "City of Mesquite Texas", /* 12119 */ "Defense Supply center Richmond (DSCR)", /* 12120 */ "Fastnet Communications", /* 12121 */ "Henny Penny Corp.", /* 12122 */ "iProcess Solutions", /* 12123 */ "Isilon Ststems", /* 12124 */ "Mediavirtuel", /* 12125 */ "Mirafor Associates Oy", /* 12126 */ "Rambold", /* 12127 */ "RoDoGu Consulting", /* 12128 */ "Safeweb Ltda", /* 12129 */ "SciQuest, Inc", /* 12130 */ "Siegfried Holding AG", /* 12131 */ "Simutronics Corporation", /* 12132 */ "Talking Blocks, Inc.", /* 12133 */ "Tradetrans Inc", /* 12134 */ "Unique Broadbank Systems", /* 12135 */ "Universidad Nacional de San Luis", /* 12136 */ "Universite de Paris-Sorbonne Paris IV", /* 12137 */ "Laboratório de Sistemas Distribuídos /CEFET-PR", /* 12138 */ "Iowa Outdoors", /* 12139 */ "ALCOMA, Ltd", /* 12140 */ "Aloes", /* 12141 */ "bob corbett networks", /* 12142 */ "Chrono-Logic", /* 12143 */ "Consumer Contact", /* 12144 */ "Core Integrated Tecnologies, Ltd.", /* 12145 */ "Dialog.SFT-Service", /* 12146 */ "Die Weltregierung", /* 12147 */ "ELTEK Energy AS", /* 12148 */ "Enalur S.A.", /* 12149 */ "Finmatica S.p.A.", /* 12150 */ "Fyrplus AB", /* 12151 */ "Guru Labs, L.C.", /* 12152 */ "HPCinteractive", /* 12153 */ "IKEA IT AB", /* 12154 */ "Innovay Inc.", /* 12155 */ "JOINT-STOCK COMPANY\"STC CONTACT\"", /* 12156 */ "KC Micro Specialists, Inc.", /* 12157 */ "Mikros Kosmos", /* 12158 */ "M-TEC N.V.", /* 12159 */ "NetCommplete Pty Lyd", /* 12160 */ "New World Telephone Ltd", /* 12161 */ "Orsus Solutions", /* 12162 */ "Quebeber.com", /* 12163 */ "Ringling School of Art and Design", /* 12164 */ "SANTIN E ASSOCIATI SRL", /* 12165 */ "ScanPlus GmbH", /* 12166 */ "Sequitur Systems", /* 12167 */ "server2000 internet technology gmbh", /* 12168 */ "SHENZHEN MODERN COMPUTER MANUFACTER Co.,Ltd", /* 12169 */ "SZCOM Broadband Network Technology Co.,Ltd", /* 12170 */ "Tony Bibbs", /* 12171 */ "Transparent Systems", /* 12172 */ "UNICC", /* 12173 */ "Consolidated Freightways", /* 12174 */ "Frontier Internet, Inc.", /* 12175 */ "Canon IT Solutions Inc.", /* 12176 */ "Henkel KGaA", /* 12177 */ "3va.net", /* 12178 */ "Alacris Inc.", /* 12179 */ "ALI Technologies Inc", /* 12180 */ "Allegheny Energy Global Markets", /* 12181 */ "Astrium (UK)", /* 12182 */ "Baldwin Hackett & Meeks, Inc.", /* 12183 */ "Bamsco", /* 12184 */ "Ben Nederland BV", /* 12185 */ "Compagnon AG", /* 12186 */ "Direct Solutions", /* 12187 */ "GBase Communications", /* 12188 */ "Holoplex Technologies, Inc.", /* 12189 */ "in medias res", /* 12190 */ "Ins-sure Services Limited", /* 12191 */ "Iron Hill Technology", /* 12192 */ "Leapstone Systems, Inc", /* 12193 */ "MSS Communications Design GmbH", /* 12194 */ "Noicom S.p.A.", /* 12195 */ "one4net GmbH", /* 12196 */ "ProvisionSoft", /* 12197 */ "RINET", /* 12198 */ "SAGE SRL", /* 12199 */ "Seneca Groep B.V.", /* 12200 */ "University Health Network", /* 12201 */ "UP3I", /* 12202 */ "VTT Information Technology", /* 12203 */ "DevonIT", /* 12204 */ "Allianz Ireland PLC", /* 12205 */ "QinetiQ Ltd", /* 12206 */ "Acme Solutions", /* 12207 */ "actina AG", /* 12208 */ "ASTOR-PROMOCJA Poland", /* 12209 */ "Bauer Verlagsgruppe", /* 12210 */ "Biogem", /* 12211 */ "BlueHaven Services Ltd", /* 12212 */ "CAMIS Inc.", /* 12213 */ "Covenant Retirement Communities", /* 12214 */ "CUETS", /* 12215 */ "DGT-LAB", /* 12216 */ "Ecole Polytechnique de Montreal", /* 12217 */ "Glückert, Machelett & Partner", /* 12218 */ "Hamilton and Sullivan, Ltd.", /* 12219 */ "Institute of Environment and Development", /* 12220 */ "ITWM", /* 12221 */ "Kawatetsu Systems, Inc.", /* 12222 */ "Kinetics Fluid Systems", /* 12223 */ "Knightnet", /* 12224 */ "Korea Embedded Linux Laboratory", /* 12225 */ "Max-Planck-Institut fuer Festkoerperforschung", /* 12226 */ "Naumen", /* 12227 */ "Niedermayer Systems", /* 12228 */ "Nirvana Research", /* 12229 */ "odahoda.de", /* 12230 */ "OpenAdvice IT Services GmbH", /* 12231 */ "Order N Ltd.", /* 12232 */ "OZ Communications, Inc.", /* 12233 */ "ProGuy.dk", /* 12234 */ "Roanoke College", /* 12235 */ "Sena Technologies, Inc.", /* 12236 */ "SILOGIX", /* 12237 */ "Spumoni", /* 12238 */ "Symsoft AB", /* 12239 */ "System Solutions", /* 12240 */ "Szkola Glowna Handlowa", /* 12241 */ "teamnet GmbH", /* 12242 */ "Vislink PLC", /* 12243 */ "Celestica Corporation", /* 12244 */ "Elvin", /* 12245 */ "Scottish Qualifications Authority", /* 12246 */ "IDP", /* 12247 */ "Availix SA", /* 12248 */ "Escola Universitaria Politècnica de Manresa", /* 12249 */ "Alosys SpA", /* 12250 */ "Avalon Net Ltd", /* 12251 */ "BAKU Construction office", /* 12252 */ "CN Solutions, LLC", /* 12253 */ "Compubahn, Inc", /* 12254 */ "Connecticut Telephone", /* 12255 */ "Covere", /* 12256 */ "Escosoft Technologies", /* 12257 */ "European Technology Consultants", /* 12258 */ "Forum des Images", /* 12259 */ "Global Telecom, Inc.", /* 12260 */ "GlobalCenter", /* 12261 */ "Gnosys S.A.R.L", /* 12262 */ "HDFCBANK", /* 12263 */ "Imagine-IT", /* 12264 */ "Indraweb", /* 12265 */ "ircd", /* 12266 */ "Johns Hopkins Applied Physics Laboratory", /* 12267 */ "Liberty Communication Services, Inc.", /* 12268 */ "Maybaum", /* 12269 */ "Novar", /* 12270 */ "Pruthvi Soft", /* 12271 */ "Sacred Bytes", /* 12272 */ "State of Minnesota", /* 12273 */ "Universite Joseph Fourier - Grenoble 1", /* 12274 */ "University of Southampton", /* 12275 */ "F5 Networks Inc", /* 12276 */ "VarySys Technologies GmbH & Co. KG", /* 12277 */ "VTX Technologie", /* 12278 */ "Warp Link GmbH", /* 12279 */ "Western Institute of technology at Taranaki", /* 12280 */ "Yumemi, Inc.", /* 12281 */ "Crew Co.,Ltd", /* 12282 */ "PLANET internet commerce GmbH", /* 12283 */ "IMAX NETWORKS (SHENZHEN) Ltd.", /* 12284 */ "Acclamation Systems, Inc", /* 12285 */ "Issaqua", /* 12286 */ "Globecomm Systems, Inc.", /* 12287 */ "Andern Research Labs", /* 12288 */ "Beeweeb Srl", /* 12289 */ "Celestica International Inc.", /* 12290 */ "Cellular Specialties, Inc.", /* 12291 */ "cindercat", /* 12292 */ "Digital Insight", /* 12293 */ "Emblaze Systems", /* 12294 */ "ERCIST", /* 12295 */ "IDDEX Corp", /* 12296 */ "Independent Storage Corporation", /* 12297 */ "kinge & Co limited", /* 12298 */ "KTG, Inc.", /* 12299 */ "Mennonite.net", /* 12300 */ "Mountain Visions P/L", /* 12301 */ "netikos spa", /* 12302 */ "New Bridges", /* 12303 */ "Next Advisors", /* 12304 */ "PetraSync Inc.", /* 12305 */ "PreWorkX (Pty) Ltd.", /* 12306 */ "Red Wagon Solutions Incorporated", /* 12307 */ "SecLab", /* 12308 */ "self-indulgence.org", /* 12309 */ "Simple Access Inc.", /* 12310 */ "Strategic Service Alliance", /* 12311 */ "Taika Technologies, Ltd", /* 12312 */ "Tattersalls", /* 12313 */ "Universidade Federal de Campina Grande", /* 12314 */ "WorldWithoutWire.com", /* 12315 */ "Chuo Electroplaters' Cooperative Asscosiation", /* 12316 */ "GL-Trade", /* 12317 */ "Loomis Chaffee School", /* 12318 */ "HEIWAKOGYO", /* 12319 */ "Aspen Systems, Inc.", /* 12320 */ "Bure Equity", /* 12321 */ "Delta Information & Communication", /* 12322 */ "Department of Computer Science, Indiana University", /* 12323 */ "Deutsche Lebens-Rettungs-Gesellschaft e.V.", /* 12324 */ "Fraunhofer FOKUS", /* 12325 */ "Hermes Precisa Australia", /* 12326 */ "kjsanders professional consulting engineers", /* 12327 */ "LawsIT Pty Ltd", /* 12328 */ "Panasonic OWL", /* 12329 */ "plan42 gmbh", /* 12330 */ "Presto Pty Ltd", /* 12331 */ "Primus Telecommunications Group, Inc.", /* 12332 */ "TE / TM-tiimi", /* 12333 */ "universal communication platform gmbh", /* 12334 */ "University of York", /* 12335 */ "BuyWays", /* 12336 */ "Broad band network center of Tsinghua University", /* 12337 */ "Netcore Network Technology", /* 12338 */ "Empowered Networks", /* 12339 */ "Net Facilities Group", /* 12340 */ "NOVOMODO Inc.", /* 12341 */ "Pivia, Inc.", /* 12342 */ "SK Access Devices", /* 12343 */ "Teros", /* 12344 */ "VWB Group", /* 12345 */ "Hagero", /* 12346 */ "Amalgamated Systems, LLC", /* 12347 */ "American Radio Relay League", /* 12348 */ "AT Consultancy", /* 12349 */ "ATMEL Hellas, S.A.n", /* 12350 */ "Barking Cow", /* 12351 */ "Central Data Services", /* 12352 */ "Clariden Bank", /* 12353 */ "Colbourn Associates Ltd", /* 12354 */ "CTI PET Systems, Inc", /* 12355 */ "Fortinet, Inc.", /* 12356 */ "Generic Media, Inc.", /* 12357 */ "Imagemedical", /* 12358 */ "Indigo Tango Ltd.", /* 12359 */ "Instituto Español de Informática y Derecho", /* 12360 */ "KGEx.com Co., Ltd", /* 12361 */ "Lombard Odier & Cie", /* 12362 */ "net-labs Systemhaus GmbH", /* 12363 */ "Newbreak LLC", /* 12364 */ "NTT COMWARE CORPORATION", /* 12365 */ "Pharmacia Corporation", /* 12366 */ "QUICK Corp.", /* 12367 */ "Raesemann Enterprises, Inc.", /* 12368 */ "Röhrs Stahl- und Metallbau GmbH & Co.KG", /* 12369 */ "SARD Communications Ltd.", /* 12370 */ "Scrutiny, Inc.", /* 12371 */ "TeraCloud Corporation", /* 12372 */ "Tetrapod Communications, Inc.", /* 12373 */ "Texas State Credit Company", /* 12374 */ "Universal Access, Inc.", /* 12375 */ "University of Technology Dresden, Department of Computer Science", /* 12376 */ "Vivendi Telecom Hungary", /* 12377 */ "WellThot Inc.", /* 12378 */ "Wingra Technologies", /* 12379 */ "WiWo Support", /* 12380 */ "Worldcom Asia Pacific", /* 12381 */ "UNIHUB GLOBAL NETWORK", /* 12382 */ "Chrysalis-ITS", /* 12383 */ "Commissariat a l'Energie Atomique", /* 12384 */ "Common Voices", /* 12385 */ "InteQ Corporation", /* 12386 */ "IPDirections", /* 12387 */ "JustThe.net LLC", /* 12388 */ "MacsDesign Studio", /* 12389 */ "Microcell Telecommunications Inc.", /* 12390 */ "Universiteit Utrecht", /* 12391 */ "Welcat Inc.", /* 12392 */ "Active Hotels", /* 12393 */ "Alvarion Ltd.", /* 12394 */ "Centro de Informatica da Universidade de Coimbra", /* 12395 */ "Cintech Solutions", /* 12396 */ "Gesellschaft fuer Raumbildsysteme mbH", /* 12397 */ "E. O. Ospedali Galliera", /* 12398 */ "FIX Express Corp.", /* 12399 */ "Gatea Ltd.", /* 12400 */ "Germinus Solutions", /* 12401 */ "IDLSPM", /* 12402 */ "Imedia Semiconductor Corp.", /* 12403 */ "Indianguide.com", /* 12404 */ "Matrics Inc.", /* 12405 */ "Medinet IDG S.A.", /* 12406 */ "NiceShipping Technology Corporation", /* 12407 */ "Noordelijke Hogeschool Leeuwarden", /* 12408 */ "Objectivity, Inc.", /* 12409 */ "OPS", /* 12410 */ "Plasmedia", /* 12411 */ "Portbridge Internet", /* 12412 */ "Radio Frequency Systems", /* 12413 */ "SCRYPTO Systems", /* 12414 */ "SinnerSchrader AG", /* 12415 */ "Summit Place Ales", /* 12416 */ "Tata Infotech Limited", /* 12417 */ "THALES", /* 12418 */ "YAMAHA CORPORATION", /* 12419 */ "Yokogawa Blue Star india Ltd", /* 12420 */ "JWAY GROUP, Inc.", /* 12421 */ "The Co-operators", /* 12422 */ "Concord Telephone Company", /* 12423 */ "Congregation of the Sacred Hearts", /* 12424 */ "ConLingual", /* 12425 */ "E-Control Systems", /* 12426 */ "Equinox Engineering Ltd.", /* 12427 */ "Genie Information Co.", /* 12428 */ "Interact, Inc.Software Systems", /* 12429 */ "I-Silver", /* 12430 */ "iXus Technologiedienstleistungen GmbH", /* 12431 */ "Jippi Group Oyj", /* 12432 */ "John Sheahan & co.", /* 12433 */ "Knox College", /* 12434 */ "M2 Systems Corporation", /* 12435 */ "Navosha, Inc.", /* 12436 */ "Next Level Design, Inc.", /* 12437 */ "Paradigm.One Pty Ltd", /* 12438 */ "Ritzlmayr Consulting", /* 12439 */ "Securenet Ltd", /* 12440 */ "SELECTED HOSTING", /* 12441 */ "TechGemini Inc", /* 12442 */ "www.TrafficShaper.com", /* 12443 */ "Mangolution, Inc.", /* 12444 */ "Teradyne", /* 12445 */ "UNPHU", /* 12446 */ "yc consultant", /* 12447 */ "7TH VISION BILLING COMPANY", /* 12448 */ "Audiofon Chat & Play GmbH", /* 12449 */ "Australian Department of Employment and Workplace Relations", /* 12450 */ "Communication Concept GmbH", /* 12451 */ "IntraConnect GmbH", /* 12452 */ "Alaska Power & Telephone", /* 12453 */ "Aria Solutions Inc", /* 12454 */ "CaCo", /* 12455 */ "CertiSur S.A.", /* 12456 */ "Chunghwa Telecom Laboratories", /* 12457 */ "GranIT Solutions, LLC", /* 12458 */ "Global Name Registry Limited", /* 12459 */ "ISG Consultoria e Informatica", /* 12460 */ "Jamm", /* 12461 */ "Linuxfabrik GmbH", /* 12462 */ "Mendosus", /* 12463 */ "MicroDowell SpA", /* 12464 */ "MyKitchenTable.net", /* 12465 */ "Netfective Technology", /* 12466 */ "OneSecure, Inc.", /* 12467 */ "Pixion Inc", /* 12468 */ "QAC - Quality Assurance Consult Ltda", /* 12469 */ "Rechberger", /* 12470 */ "Rocket Software, Inc", /* 12471 */ "ScapeVision AG", /* 12472 */ "UNILANG", /* 12473 */ "WAC", /* 12474 */ "Webmotion Inc.", /* 12475 */ "Carmody Consulting, Inc.", /* 12476 */ "Christian Michelsen Research AS", /* 12477 */ "Maryland Department of Transportation", /* 12478 */ "OpenDNS Corp", /* 12479 */ "Allied Worldwide", /* 12480 */ "Altrick", /* 12481 */ "Departmento Técnico", /* 12482 */ "Ebel", /* 12483 */ "Binary Solutions", /* 12484 */ "WUMAG GmbH Werk Ebersbach", /* 12485 */ "Access Grid", /* 12486 */ "Adam Communication Systems International", /* 12487 */ "Ankor Systems", /* 12488 */ "Arizona Mail Order Co., Inc", /* 12489 */ "B.Eckstein Systems", /* 12490 */ "BondDesk", /* 12491 */ "Cameron Net", /* 12492 */ "eList eXpress LLC", /* 12493 */ "enigmatec GmbH", /* 12494 */ "Eskata Systems, Inc.", /* 12495 */ "goSBC", /* 12496 */ "Holborn Colleg", /* 12497 */ "Infofiend", /* 12498 */ "IPB", /* 12499 */ "ISRO Satellite Centre", /* 12500 */ "KeysoftEnterllect", /* 12501 */ "METZEMIX", /* 12502 */ "MYUGLYFACE COMPUTING", /* 12503 */ "Onlight", /* 12504 */ "Photonic Bridges Inc.", /* 12505 */ "Pinpoint Networks, Inc.", /* 12506 */ "PROFIS SA", /* 12507 */ "Scardine & Lopes Ltda", /* 12508 */ "SecureONE", /* 12509 */ "Slackworks", /* 12510 */ "Telesudeste Celular", /* 12511 */ "University of Utah College of Mines & Earth Sciences", /* 12512 */ "XiteMedia I.S. V.O.F.", /* 12513 */ "Abbott Laboratories", /* 12514 */ "ORGA Kartensysteme GmbH", /* 12515 */ "ARL HomeCommunications Sdn Bhd", /* 12516 */ "MAN Nutzfahrzeuge AG", /* 12517 */ "University of Mainz", /* 12518 */ "Activa3", /* 12519 */ "ASYRES", /* 12520 */ "Avacue Ltd", /* 12521 */ "California State University, San Bernardino", /* 12522 */ "Credit Union Central of Manitoba", /* 12523 */ "D.I.B.", /* 12524 */ "Echostar Solutions", /* 12525 */ "Groupe Eyrolles", /* 12526 */ "HOPF Elektronik GmbH", /* 12527 */ "PureSight Ltd", /* 12528 */ "IDG Communications Ltd", /* 12529 */ "Informatikdienste, ETH Zuerich", /* 12530 */ "James K. Fegan Consulting", /* 12531 */ "Neoteris, Inc.", /* 12532 */ "NOX CO.,LTD", /* 12533 */ "NZPhone S/A", /* 12534 */ "Schmidt & Co. (HK) Ltd.", /* 12535 */ "SIMSAM Consulting Limited", /* 12536 */ "Spider Eye Studios", /* 12537 */ "Telkom", /* 12538 */ "The Palantir Corporation", /* 12539 */ "T-Systems International", /* 12540 */ "Universidad de Carabobo", /* 12541 */ "UNIZETO Sp. z o.o.", /* 12542 */ "Virgil BV", /* 12543 */ "AEGON Nederland N.V.", /* 12544 */ "is Industrial Services AG", /* 12545 */ "VerySmartPeople Inc", /* 12546 */ "Principle Inc.", /* 12547 */ "HSH Nordbank AG", /* 12548 */ "Air Navigation Services (ANS) of the Czech Republic", /* 12549 */ "Association for Multidiscipline Education in the Health Sciences", /* 12550 */ "CE+T", /* 12551 */ "Corporation of Balcultha", /* 12552 */ "Dispuut Meteoor", /* 12553 */ "Ecclesias.net", /* 12554 */ "Eduro Technologies, Inc.", /* 12555 */ "EmSol LLC", /* 12556 */ "GuruMeditations.org", /* 12557 */ "icoserve information technologies GmbH.", /* 12558 */ "INRIA", /* 12559 */ "InterEpoch Technology, Inc.", /* 12560 */ "Khonraad Systems Engineering BV", /* 12561 */ "Marcom Department Shanghai Mitac Research Co. Ltd.", /* 12562 */ "megatel GmbH", /* 12563 */ "Natverket", /* 12564 */ "Navaho Networks Inc", /* 12565 */ "NIKoil Investment Banking Group (joint stock bank)", /* 12566 */ "One5 Corporation", /* 12567 */ "Ranger Computers", /* 12568 */ "Rigel Corporation", /* 12569 */ "S.I.C.E. s.r.l.", /* 12570 */ "Symnetics Holdings", /* 12571 */ "TCD Enterprise, Inc.", /* 12572 */ "Telonor Business Solutions", /* 12573 */ "TMH The Marilyn House srl", /* 12574 */ "UIC", /* 12575 */ "Unidirect", /* 12576 */ "Unique Interactive", /* 12577 */ "Viola Systems", /* 12578 */ "ZIGZAG Internet Service Provider", /* 12579 */ "ZIRION NETWORKS, Inc.", /* 12580 */ "Naruhodo Solutions", /* 12581 */ "Primerica Financial Services", /* 12582 */ "University of California, Irvine Information and Computer Science Department", /* 12583 */ "Butler", /* 12584 */ "Alstom Holdings", /* 12585 */ "Manono Software, Inc.", /* 12586 */ "430am", /* 12587 */ "Blueice Research AB", /* 12588 */ "Celestial Software LLC", /* 12589 */ "Changi International Airport Services Pte Ltd", /* 12590 */ "Corus group plc.", /* 12591 */ "Dycec", /* 12592 */ "EKL Solutions LLC", /* 12593 */ "Elma Ingenierie Informatique", /* 12594 */ "EMS Enterprise Messaging Solutions GmbH", /* 12595 */ "JOUVE S.A.", /* 12596 */ "Lightwave Communications", /* 12597 */ "Net Vista", /* 12598 */ "Ordyn Electronic Systems Private Limited", /* 12599 */ "Peramon Technology Ltd", /* 12600 */ "Reed College", /* 12601 */ "RooNetworks Inc.", /* 12602 */ "ShadowSupport, Inc.", /* 12603 */ "Spatial Wireless", /* 12604 */ "SHOM", /* 12605 */ "MBB Gelma GmbH", /* 12606 */ "Advance Fiber Optics Inc", /* 12607 */ "Ahapala", /* 12608 */ "Ascella Technologies", /* 12609 */ "Aspen Business Logic Computing", /* 12610 */ "Atlantique Software", /* 12611 */ "Barco BCI", /* 12612 */ "BroadJump", /* 12613 */ "CiRBA Inc.", /* 12614 */ "Craig F. Donlan", /* 12615 */ "DataCorp", /* 12616 */ "Espedair Systems", /* 12617 */ "EZHi Technologies, Inc.", /* 12618 */ "UFRGS", /* 12619 */ "Future System Consulting Corp.", /* 12620 */ "GE Medical System Information Technologies SW GmbH & Co.KG", /* 12621 */ "Devicescape Software, Inc.", /* 12622 */ "IRCI S.A.", /* 12623 */ "Kennesaw State University", /* 12624 */ "LabBook, Inc", /* 12625 */ "Ministry of Education, Singapore", /* 12626 */ "Morgan Stanley S.V.S.A", /* 12627 */ "Movielink", /* 12628 */ "MSE", /* 12629 */ "m-solutions Ltd.", /* 12630 */ "Nets AG", /* 12631 */ "Objekt Management", /* 12632 */ "Oceanbay Internet Services", /* 12633 */ "PICMG", /* 12634 */ "Redsonic, Inc.", /* 12635 */ "Scripps College", /* 12636 */ "Shazam Entertainments ltd", /* 12637 */ "Siennax", /* 12638 */ "Supercable", /* 12639 */ "The Houston-Harris County Immunization Registry", /* 12640 */ "TRIBUNAL REGIONAL DO TRABALHO da 10ª REGIÃO", /* 12641 */ "University of Southern Mississippi", /* 12642 */ "UTI Systems S.A.", /* 12643 */ "VISAA", /* 12644 */ "Vodafone Information Technology and Technology Management", /* 12645 */ "WideBand Corporation", /* 12646 */ "Lulea University of Technology", /* 12647 */ "Systek Information Technology Ltd.", /* 12648 */ "Utfors AB", /* 12649 */ "Administrative Management Group, Inc.", /* 12650 */ "Alaska Department of Labor", /* 12651 */ "Aminor", /* 12652 */ "Armitel", /* 12653 */ "ATH system", /* 12654 */ "exceet Secure Solutions AG", /* 12655 */ "Avest Plc.", /* 12656 */ "Birmé Consulting", /* 12657 */ "Blue Star Sustainable Technologies Inc.", /* 12658 */ "Brazier & Welch", /* 12659 */ "CacheWare, Inc.", /* 12660 */ "Caroline Chisholm Catholic College", /* 12661 */ "CHM Inc.", /* 12662 */ "DocFi", /* 12663 */ "DotCall", /* 12664 */ "Enfotec, Inc.", /* 12665 */ "Etagon", /* 12666 */ "ETERE", /* 12667 */ "Garuda Networks", /* 12668 */ "Hanenkamp.com", /* 12669 */ "Indigo Development Corp.", /* 12670 */ "Institut fuer System-Management", /* 12671 */ "isMobile AB", /* 12672 */ "iTelco Communications, Inc.", /* 12673 */ "Kaon Interactive Inc", /* 12674 */ "Linux Unlimited, LLC", /* 12675 */ "Logical", /* 12676 */ "Mackeeg, Inc.", /* 12677 */ "Nankai University Chuangyuan Information Technologies Co., Ltd.", /* 12678 */ "NextFuture", /* 12679 */ "Objective Dynamics Ltd", /* 12680 */ "Parker Abex NWL", /* 12681 */ "PC Info Solutions", /* 12682 */ "PreCache Inc.", /* 12683 */ "Quantum Solutions", /* 12684 */ "SCS Engineers", /* 12685 */ "SDS GmbH", /* 12686 */ "SiliconLogic Ltd.", /* 12687 */ "Sohu.com Inc", /* 12688 */ "SUPERONLINE INTERNATIONAL ONLINE INFORMATION AND COMMUNICATION SERVICES Inc.", /* 12689 */ "Technology Leaders, LLC", /* 12690 */ "Terilogy Co., Ltd.", /* 12691 */ "Think4You IT Services GmbH", /* 12692 */ "Ti.KOM Tirol Kommunikation", /* 12693 */ "UNIVERSITÉ DE MARNE-LA-VALLÉE", /* 12694 */ "VS Vision Systems", /* 12695 */ "Xavier College", /* 12696 */ "YoungHome.Com, Inc", /* 12697 */ "AFRANET Co. Ltd,.", /* 12698 */ "Moy Corporation", /* 12699 */ "UNC Health Care", /* 12700 */ "Tuxnology", /* 12701 */ "724 Solutions Inc", /* 12702 */ "Acelet", /* 12703 */ "ALLTEL Corporation", /* 12704 */ "BAX Global", /* 12705 */ "BYTERAGE, INC", /* 12706 */ "Connect Systems Inc", /* 12707 */ "CyberLancet Corporation", /* 12708 */ "Davies, Inc.", /* 12709 */ "Dedicated Hosting Services", /* 12710 */ "Experian Limited", /* 12711 */ "Four Corners Telecommunications Corp", /* 12712 */ "HighSpeed Surfing", /* 12713 */ "Ikosaeder", /* 12714 */ "Indian Institute of Technology, Bombay", /* 12715 */ "Infologigruppen Norr AB", /* 12716 */ "InterSAN, Inc", /* 12717 */ "Rheinische Friedrich -Wilhelms-Universitaet Bonn", /* 12718 */ "Open Software Services, LLC", /* 12719 */ "Reliant Resources", /* 12720 */ "Rendition Networks Incorporated", /* 12721 */ "Rite Aid Corporation", /* 12722 */ "Seisint Inc.", /* 12723 */ "Sensinova AB", /* 12724 */ "Santa Clara County", /* 12725 */ "Sudoeste Serviços de Telemática Ltda", /* 12726 */ "Supervise Network", /* 12727 */ "SYSWILL", /* 12728 */ "targit GmbH", /* 12729 */ "TECSys Development, LP", /* 12730 */ "UTI Systems S.A.", /* 12731 */ "VoIP Group Inc.", /* 12732 */ "WildPackets, Inc.", /* 12733 */ "Northrop Grumman Information Systems", /* 12734 */ "VFSPIH", /* 12735 */ "Elo & Mahout & Co", /* 12736 */ "Algenib Software, Inc.", /* 12737 */ "BMW of North America", /* 12738 */ "dgstar co., Ltd.", /* 12739 */ "EqualLogic", /* 12740 */ "ErgoIntegration AS", /* 12741 */ "HomeConcept", /* 12742 */ "Integrated Service Lab", /* 12743 */ "Nakisa Inc.", /* 12744 */ "Nordisk Språkteknologi AS", /* 12745 */ "Spinoza Technology Inc.", /* 12746 */ "Teamsoft Inc.", /* 12747 */ "Telenor ASA", /* 12748 */ "UTA Telekom AG", /* 12749 */ "xi'an huahai medical info-tech co.,ltd.", /* 12750 */ "e-chiceros", /* 12751 */ "Acta Technology, Inc.", /* 12752 */ "Biomedical Informatics Laboratory", /* 12753 */ "bTurtle", /* 12754 */ "Cup 2000 spa", /* 12755 */ "Delta Networks, Inc.", /* 12756 */ "eCubeNet.com", /* 12757 */ "ExPet Technologies, Inc.", /* 12758 */ "Garban Intercapital", /* 12759 */ "h00.org", /* 12760 */ "Hipbone, Inc.", /* 12761 */ "iMpacct Technology Corp.", /* 12762 */ "ISK Systems Ltd", /* 12763 */ "MEDIAOCEAN", /* 12764 */ "Mintera Corp.", /* 12765 */ "Mobixell Networks Inc.", /* 12766 */ "National Computer Helpdesk", /* 12767 */ "NaviSite Inc", /* 12768 */ "netvigator.com", /* 12769 */ "Nyttab Ab / SurfNet", /* 12770 */ "Palfrader", /* 12771 */ "PZU Zycie SA", /* 12772 */ "Resource Center", /* 12773 */ "Sengent, Inc.", /* 12774 */ "Shiron Satellite Communications Ltd.", /* 12775 */ "The Box IT", /* 12776 */ "TNG - the net generation GmbH", /* 12777 */ "TranTech, Inc.", /* 12778 */ "University of Vermont", /* 12779 */ "VOLKTEK Corporation", /* 12780 */ "Progeny Linux Systems", /* 12781 */ "Rost+Oberndoerfer Consulting GbR", /* 12782 */ "University of Maine System", /* 12783 */ "Teamware Group AB", /* 12784 */ "Amacis Ltd", /* 12785 */ "Automatos, Inc.", /* 12786 */ "AxxessAnywhere", /* 12787 */ "BladeLogic Inc", /* 12788 */ "Centre for Integrated Computer Systems Research", /* 12789 */ "CESKY TELECOM a.s. - Imaginet o.z.", /* 12790 */ "Data & Control Systems Ltd", /* 12791 */ "Embarcadero Technologies, Inc.", /* 12792 */ "EUREM GmbH", /* 12793 */ "Frank", /* 12794 */ "HCC Hobbynet", /* 12795 */ "I/O Software", /* 12796 */ "Interactive Payer Network", /* 12797 */ "Internet Kayttajat Ikuisesti - IKI ry", /* 12798 */ "IPv6 Research and Development", /* 12799 */ "iqdoq", /* 12800 */ "Linuxmagic", /* 12801 */ "Mathcom Solutions Inc", /* 12802 */ "Multitask Consultoria Ltda", /* 12803 */ "National Library of Australia", /* 12804 */ "Notnet Webhosting", /* 12805 */ "Peter Stamfest", /* 12806 */ "Rabbit Semiconductor", /* 12807 */ "S2IO Technologies Corp.", /* 12808 */ "San Diego Unified School District", /* 12809 */ "Saratov State University", /* 12810 */ "SatService GmbH", /* 12811 */ "Trustwave Holdings, Inc.", /* 12812 */ "Speedwise Technologies", /* 12813 */ "Staatliche Studienakademie Leipzig", /* 12814 */ "Terraspring, Inc.", /* 12815 */ "Universität Trier", /* 12816 */ "Z-World Incorporated", /* 12817 */ "The Key Centre for Human Factors and Applied Cognitive Psychology", /* 12818 */ "Banque Generale du Luxembourg", /* 12819 */ "Electrum Information Technology Co.Ltd", /* 12820 */ "e-Pie Entertainment & Technology Corporation(Beijing)", /* 12821 */ "icu", /* 12822 */ "AMIT, Inc.", /* 12823 */ "AndTeK GmbH", /* 12824 */ "ATC Information Services", /* 12825 */ "AXL Performance Solutions Ltd", /* 12826 */ "Barco, Inc.", /* 12827 */ "Blue Heron Biotechnology Inc", /* 12828 */ "Brady Motor Sports", /* 12829 */ "Central Florida Main", /* 12830 */ "Codemark", /* 12831 */ "COUNCIL OF EUROPE", /* 12832 */ "Covansys", /* 12833 */ "CPE", /* 12834 */ "Digitrust - Certificadora Notarial SA", /* 12835 */ "E-Advies", /* 12836 */ "Polytech'Lille", /* 12837 */ "Exis Srl", /* 12838 */ "German Gutierrez", /* 12839 */ "Griffin Plaza Partners, LLC", /* 12840 */ "Interactive TKO Inc.", /* 12841 */ "Mediso Ltd.", /* 12842 */ "MIPTelecom", /* 12843 */ "Northern Michigan University", /* 12844 */ "Oak Lawn School District 229", /* 12845 */ "ObjectCode", /* 12846 */ "Orincon Corporation", /* 12847 */ "Saddleback College", /* 12848 */ "SKYRIX Software AG", /* 12849 */ "Smart Tech Consulting", /* 12850 */ "Syncope Communication Systems GmbH", /* 12851 */ "SYSPAK", /* 12852 */ "Technical Toys Limited", /* 12853 */ "tellion", /* 12854 */ "Vastweb Technology Ltd.", /* 12855 */ "Verge Networks", /* 12856 */ "Williams College", /* 12857 */ "eNetrex Inc.", /* 12858 */ "HIGHWAY.RU", /* 12859 */ "Zaryba Ltd", /* 12860 */ "Bayerische Beamten Versicherungen", /* 12861 */ "NEEF LAPPCOM GmbH", /* 12862 */ "AirLink Technology, Inc.", /* 12863 */ "INCOGEN, Inc", /* 12864 */ "Amin Group", /* 12865 */ "CardEngine Inc.", /* 12866 */ "Cedar Point Communications", /* 12867 */ "CET Technologies Pte Ltd", /* 12868 */ "Codent Networks", /* 12869 */ "Danlab Electronics A/S", /* 12870 */ "die netzwerker GmbH", /* 12871 */ "DTE Energy", /* 12872 */ "E.C.C. sa", /* 12873 */ "EFM networks Inc.", /* 12874 */ "ExperShare", /* 12875 */ "Fokker Space", /* 12876 */ "FORTIS", /* 12877 */ "Griffin Network Consulting", /* 12878 */ "IDNT Integrated Digital Network Technologies", /* 12879 */ "kiwi interaktive medien gmbh", /* 12880 */ "KnowGeeks", /* 12881 */ "LGC Wireless", /* 12882 */ "Martinsson informationssystem", /* 12883 */ "Moody Bible Institute", /* 12884 */ "MyArtic Communities", /* 12885 */ "National Technical Systems", /* 12886 */ "Netplex AB", /* 12887 */ "Prokom Bilgisayar ve Danismanlik Hizmetleri San. ve Tic. Ltd.Sti.", /* 12888 */ "PTC", /* 12889 */ "Shorty", /* 12890 */ "Syndicat Interhospitalier Limousin", /* 12891 */ "University of Patras", /* 12892 */ "VisioWave S.A.", /* 12893 */ "Wmode Inc", /* 12894 */ "Xsetup", /* 12895 */ "Xtria Healthcare", /* 12896 */ "ZiLOG Inc.", /* 12897 */ "Sinter Consulting", /* 12898 */ "Visogent Technologies", /* 12899 */ "ITEC", /* 12900 */ "Institute of Software,Chinese Academy of Sciences", /* 12901 */ "Advanced Network Technology Laboratories Pte Ltd", /* 12902 */ "Bayshore Networks, Inc.", /* 12903 */ "EVault, Inc.", /* 12904 */ "Indian Institute of Technology Guwahati", /* 12905 */ "japc", /* 12906 */ "Kansai Broadband Planning Corp.", /* 12907 */ "Litech Systems Design", /* 12908 */ "Machine Vision Products, Inc.", /* 12909 */ "Next Element", /* 12910 */ "Oce NV", /* 12911 */ "PeerPro", /* 12912 */ "Procera Networks, Inc.", /* 12913 */ "Production Robots Engineering Ltd", /* 12914 */ "Radio Free Europe/Radio Liberty, Inc.", /* 12915 */ "Rockland Community College", /* 12916 */ "Saber e Lazer, SA", /* 12917 */ "TDI- Transistor Devices, Inc", /* 12918 */ "XAVi Technologies Corporation", /* 12919 */ "Xteam Software Co, ltd", /* 12920 */ "Yeaman Associates", /* 12921 */ "Your Voice S.p.A.", /* 12922 */ "Kigyo Zanmai Corp.", /* 12923 */ "Klon/Jawor Association", /* 12924 */ "3PAR Data", /* 12925 */ "Anheuser-Busch", /* 12926 */ "Axiom (Cambridge) Ltd", /* 12927 */ "Clarus Systems", /* 12928 */ "Cliff Berg", /* 12929 */ "CVS Travelhost International Pty Ltd", /* 12930 */ "Dreefs GmbH Schaltgeräte & Systeme", /* 12931 */ "FESD GmbH", /* 12932 */ "Global Orchestra", /* 12933 */ "Hunkeler AG", /* 12934 */ "i3 micro technology ab", /* 12935 */ "InCert Software Corporation", /* 12936 */ "Infradig Systems", /* 12937 */ "Innovative Technology Solutions, Inc.", /* 12938 */ "Modus (Scotland) Ltd", /* 12939 */ "Pedestal Networks", /* 12940 */ "Press-Data", /* 12941 */ "SANSHA ELECTRIC MFG.CO.,LTD", /* 12942 */ "Sengena", /* 12943 */ "Sockeye Networks, Inc.", /* 12944 */ "SoftProject GmbH", /* 12945 */ "State Services Commission", /* 12946 */ "SyntheSys Secure Technologies Inc.", /* 12947 */ "Syred data systems", /* 12948 */ "T-Online France", /* 12949 */ "Venngo Inc.", /* 12950 */ "VerizonWireless", /* 12951 */ "warpFactor Inc.", /* 12952 */ "Xandros Corporation", /* 12953 */ "WM-data SDC a/s", /* 12954 */ "Metarete s.r.l.", /* 12955 */ "Aarhus Universitet", /* 12956 */ "BLUE MARS GmbH", /* 12957 */ "Questerra", /* 12958 */ "am professional services", /* 12959 */ "Andelina Corporation", /* 12960 */ "Andrew Hewett Consulting", /* 12961 */ "Decru, Inc.", /* 12962 */ "DIMONsoft", /* 12963 */ "ftlight.net", /* 12964 */ "New Media Data Marketing, Inc.", /* 12965 */ "Next Generation Systems, Inc.", /* 12966 */ "Petrobras - Petroleo Brasileiro S.A.", /* 12967 */ "Menno Pieters", /* 12968 */ "The Rockefeller University", /* 12969 */ "Urban Development Co.", /* 12970 */ "bigdom.com", /* 12971 */ "Callion Electronics Co., Ltd.", /* 12972 */ "Wuhan Public Information Co.Ltd.", /* 12973 */ "barrigon.com", /* 12974 */ "brainaid", /* 12975 */ "coWlan", /* 12976 */ "Level II Inc.", /* 12977 */ "Michael Fromme EDV-Beratung", /* 12978 */ "Optimacy Corporation", /* 12979 */ "Person co., Ltd.", /* 12980 */ "Rotterdam CS", /* 12981 */ "Synergy International Ltd", /* 12982 */ "TBS INTERNET", /* 12983 */ "Terraplay Systems AB", /* 12984 */ "University of St Andrews", /* 12985 */ "Verlagsgruppe Straubinger Tagblatt / Landshuter Zeitung", /* 12986 */ "Vineyard.NET, Inc.", /* 12987 */ "Vistorm Limited", /* 12988 */ "XIP", /* 12989 */ "Star Communication Network Technology Co., Ltd.", /* 12990 */ "California College of Arts & Crafts", /* 12991 */ "T&A SYSTEME GmbH", /* 12992 */ "weitlandt. Communication", /* 12993 */ "Abisoft Ltd.", /* 12994 */ "Accet Network Inc", /* 12995 */ "adconsys AG", /* 12996 */ "Advanced Biometrics, Inc.", /* 12997 */ "Agile Software", /* 12998 */ "Altiris", /* 12999 */ "Anglia Polytechnic University", /* 13000 */ "Anuvio Technologies", /* 13001 */ "Augsburg College", /* 13002 */ "Banca I.M.I.", /* 13003 */ "beamNet", /* 13004 */ "Bitrage, Inc.", /* 13005 */ "CAE-Technik Schmitt", /* 13006 */ "California Regional Intranet, Inc.", /* 13007 */ "CanPrint Communications Pty. Ltd.", /* 13008 */ "Coma", /* 13009 */ "Computer Business Sciences Ltd.", /* 13010 */ "Consejo General del Notariado", /* 13011 */ "Cramer Systems Limited", /* 13012 */ "Denisowski Consulting", /* 13013 */ "Dreamcode Software Inc.", /* 13014 */ "Eastern Electronics Co., Ltd", /* 13015 */ "eMagic.com", /* 13016 */ "e-Solutionist Inc.", /* 13017 */ "ETH Zurich, Department of Computer Science", /* 13018 */ "ETSI", /* 13019 */ "Florida International University", /* 13020 */ "Halifax Cetelem Credit Ltd", /* 13021 */ "handhelds.org", /* 13022 */ "Hub2b", /* 13023 */ "Imagistics International Inc.", /* 13024 */ "Inferno Labs", /* 13025 */ "IT Intergroup ApS", /* 13026 */ "IXOS Software AG", /* 13027 */ "Kuokoa Networks, Inc.", /* 13028 */ "Managed Service Partners International", /* 13029 */ "Monitor724 Services Limited", /* 13030 */ "neix,Inc.", /* 13031 */ "Reach Technologies", /* 13032 */ "shockunit productions", /* 13033 */ "SoftNet Systems, Inc.", /* 13034 */ "Sonangol", /* 13035 */ "Stradient, Inc.", /* 13036 */ "Subnetworx Corporation", /* 13037 */ "TELE Greenland Inc.", /* 13038 */ "Tennessee Technological University", /* 13039 */ "The Horde Project", /* 13040 */ "Think Dynamics", /* 13041 */ "Trust Company of America", /* 13042 */ "University of Wisconsin - River Falls", /* 13043 */ "Unternehmensberatung Rahn", /* 13044 */ "Uptime Devices, Inc.", /* 13045 */ "VisionShare Inc", /* 13046 */ "Welliver Enterprises", /* 13047 */ "Xorba, Inc.", /* 13048 */ "Yacc Labs Ltd.", /* 13049 */ "Ydilo Advanced Voice Solutions S.A.", /* 13050 */ "MetaSolv Software, Inc.", /* 13051 */ "Telefonbau Arthur Schwabe GmbH & Co KG", /* 13052 */ "TIS System Service Inc.", /* 13053 */ "Ram Corp", /* 13054 */ "ShangHai JingLun Technologies CO.,LTD.", /* 13055 */ "Tai Ping Life Insurance Co, Ltd.", /* 13056 */ "Hays DSIA France", /* 13057 */ "National Hockey League", /* 13058 */ "Ahold Supermercados", /* 13059 */ "Airpath Wireless, Inc.", /* 13060 */ "AlphaC srl", /* 13061 */ "Ascom", /* 13062 */ "Cambian", /* 13063 */ "Claymountain Solutions Oy", /* 13064 */ "Colomsat S.A.", /* 13065 */ "Connaught Air Services", /* 13066 */ "CSH", /* 13067 */ "CzajSOFT", /* 13068 */ "Diveo do Brasil Telecom. LTDA", /* 13069 */ "Drutt Corporation", /* 13070 */ "ESDS", /* 13071 */ "Gallery IP Telephony Ltd.", /* 13072 */ "gate5 AG", /* 13073 */ "Labyrinth Connections", /* 13074 */ "My Linux ISP", /* 13075 */ "MyCompany", /* 13076 */ "NetWolves Technologies Corporation", /* 13077 */ "NSSoft, Inc", /* 13078 */ "Persay LTD", /* 13079 */ "Persona Inc.", /* 13080 */ "Pretax Systems Oy ltd", /* 13081 */ "Shanghai Sunrise Electronic Technology Co. Ltd.", /* 13082 */ "Signal Technology Corporation", /* 13083 */ "Sonae Distribuição Brasil S.A.", /* 13084 */ "StreamSec", /* 13085 */ "Yamagata Prefectural Government", /* 13086 */ "Vaelit Group.", /* 13087 */ "Adquira España", /* 13088 */ "Aristotle University of Thessaloniki, Department of Physics", /* 13089 */ "Artifact Entertainment", /* 13090 */ "Bethel College and Seminary", /* 13091 */ "Cellcloud Technologies Pvt Ltd", /* 13092 */ "College of Education", /* 13093 */ "Contego Solutions LLC", /* 13094 */ "Dalhousie University", /* 13095 */ "Dan of Steel", /* 13096 */ "Dascom Technology Co.Ltd", /* 13097 */ "dpa AFX Wirtschaftsnachrichten GmbH", /* 13098 */ "Drybridge Consulting", /* 13099 */ "fun communications GmbH", /* 13100 */ "GETEDES", /* 13101 */ "Hauni Maschinenbau AG", /* 13102 */ "Ilevo AB", /* 13103 */ "Infraservices Corporation", /* 13104 */ "Ingenium Technology Srl", /* 13105 */ "JLF Network", /* 13106 */ "JMatica Srl", /* 13107 */ "Linuxlab", /* 13108 */ "Liontech Co., Ltd.", /* 13109 */ "Manageable Inc.", /* 13110 */ "mcgu.net Consulting", /* 13111 */ "MDS Proteomics Inc.", /* 13112 */ "MindTribe", /* 13113 */ "Nextra Investment Management SGR S.p.A.", /* 13114 */ "Open Connections", /* 13115 */ "P & J Systems Support Station", /* 13116 */ "Plat'Home Co.,Ltd.", /* 13117 */ "PointDx, Inc.", /* 13118 */ "RAmEx Ars Medica, Inc.", /* 13119 */ "RASilient Systems, Inc.", /* 13120 */ "Signatron Technology Corporation", /* 13121 */ "Software Research Associates, Inc.", /* 13122 */ "Starbak Communications Inc.", /* 13123 */ "Terra Marketing", /* 13124 */ "TEYTEL, S.A.", /* 13125 */ "themountain", /* 13126 */ "Thomas Jefferson University Hospital", /* 13127 */ "Universe Software", /* 13128 */ "UPMC", /* 13129 */ "Video Products Group", /* 13130 */ "de Passievruchten", /* 13131 */ "Softing Europe S.A.", /* 13132 */ "Michelin", /* 13133 */ "Founder Broadband Network Technology Co.,Ltd", /* 13134 */ "SJTeK", /* 13135 */ "AlexS.DE Private Network", /* 13136 */ "Biocare sarl", /* 13137 */ "Boiled Frog Trading Co-operative", /* 13138 */ "caribNav Holdings, LLC", /* 13139 */ "Cluster File Systems, Inc.", /* 13140 */ "FDK CO.LTD", /* 13141 */ "I M Consultancy Pty Ltd", /* 13142 */ "I&SI S.p.A.", /* 13143 */ "Jakob Hatteland Computer AS", /* 13144 */ "Klik Systems Inc.", /* 13145 */ "Klomp", /* 13146 */ "Leadfly Technologies Co., Ltd.", /* 13147 */ "LeanLogistics", /* 13148 */ "Lee Printing, Inc.", /* 13149 */ "m&m consulting intl", /* 13150 */ "MB Consultants", /* 13151 */ "Octalis S.A.", /* 13152 */ "RFSAW", /* 13153 */ "RPost, Inc.", /* 13154 */ "Shimanek", /* 13155 */ "SwitchPoint Networks, Inc", /* 13156 */ "Tsinghua Unisplendour Bitway Networking Technology Co.,Ltd.", /* 13157 */ "Universitaet Muenster", /* 13158 */ "ZF Friedrichshafen AG", /* 13159 */ "Cerca.com S.r.l.", /* 13160 */ "Quattro Software Limited", /* 13161 */ "Software Quality Engineering", /* 13162 */ "Ministry of Justice, Finland", /* 13163 */ "CyberSuperStore, Inc.", /* 13164 */ "9105 - 1938 Québec Inc.", /* 13165 */ "Acamar Systems", /* 13166 */ "Oeko.neT Mueller & Brandt", /* 13167 */ "Aries e-Publishing", /* 13168 */ "UNIPOWER, LLC. - IPS", /* 13169 */ "caresys GmbH", /* 13170 */ "Cilys", /* 13171 */ "Dark Side of the Moon Software", /* 13172 */ "Dilax Intelcom GmbH", /* 13173 */ "Eglin Air Force Base", /* 13174 */ "Eurofer", /* 13175 */ "European Bank for Reconstruction and Development", /* 13176 */ "Firmaprofesional, SA", /* 13177 */ "Fremont Computer Corporation", /* 13178 */ "Internet Information Group", /* 13179 */ "JR Software", /* 13180 */ "Junot Systems Inc.", /* 13181 */ "kapsch TrafficCom AG", /* 13182 */ "Kevab Thebasestationcompany", /* 13183 */ "Lanscape Netzwerkdienste GmbH", /* 13184 */ "Laqtib, Inc.", /* 13185 */ "Light Computing Services Ltd", /* 13186 */ "MDlink GmbH", /* 13187 */ "Miami University Libraries", /* 13188 */ "MITAKE", /* 13189 */ "Northrop/Grumman- INRI division,NTCSS Support System", /* 13190 */ "OneAccess", /* 13191 */ "PCLinX snc", /* 13192 */ "Portelco (Asia) Limited", /* 13193 */ "PORTSITE GmbH", /* 13194 */ "Proditec", /* 13195 */ "SBS GmbH & Co OHG CWS 41", /* 13196 */ "Security Crossing", /* 13197 */ "Signtrust", /* 13198 */ "SiMind Inc", /* 13199 */ "BPK Penabur", /* 13200 */ "TJH Internet SP", /* 13201 */ "United States Advanced Network, Inc.", /* 13202 */ "University of Pretoria", /* 13203 */ "VIA NET.WORKS Deutschland GmbH", /* 13204 */ "WebSwimmer LLC", /* 13205 */ "BSM Consulting", /* 13206 */ "NTNU", /* 13207 */ "ARGSOFT", /* 13208 */ "Aptilo Networks AB", /* 13209 */ "Armstrong Group of Companies", /* 13210 */ "AT4.NET INTERNET Y COMUNICACION", /* 13211 */ "bTrade, Inc.", /* 13212 */ "Centre Tecnologic de Manresa", /* 13213 */ "Comunitel Global S.A.", /* 13214 */ "Cougaar", /* 13215 */ "Digital Age Design", /* 13216 */ "FH Furtwangen", /* 13217 */ "Flowring Technology", /* 13218 */ "Gliwickie Stowarzyszenie Internautów", /* 13219 */ "Interconnected Generation", /* 13220 */ "Kubota Systems Inc.", /* 13221 */ "Millicom Peru", /* 13222 */ "mwain Corp", /* 13223 */ "Net Integration Technologies", /* 13224 */ "Network Services Group, LLC", /* 13225 */ "Network Technology Solutions", /* 13226 */ "Officescape", /* 13227 */ "Redline Telecommunications SA (pty) Ltd", /* 13228 */ "Samad Pty Ltd", /* 13229 */ "San Diego Supercomputer Center", /* 13230 */ "SchlumbergerSema Japan", /* 13231 */ "SpottedOwlRecipes.com", /* 13232 */ "Vimia GmbH", /* 13233 */ "TELPRO Ltd.", /* 13234 */ "Teralink Communications", /* 13235 */ "The Brick Warehouse Corporation", /* 13236 */ "US Process, Inc", /* 13237 */ "Vienna University of Economics and Business Administration", /* 13238 */ "Vodatel", /* 13239 */ "VoIP Pty Ltd", /* 13240 */ "Wieland Gmeiner", /* 13241 */ "InfoCrypt", /* 13242 */ "Chip PC", /* 13243 */ "Duniya Technologies, Inc.", /* 13244 */ "HST", /* 13245 */ "Alliente, Inc.", /* 13246 */ "City of Naantali", /* 13247 */ "General Electric Power Management", /* 13248 */ "ICEM Technologies GmbH", /* 13249 */ "INECO", /* 13250 */ "Ingenix", /* 13251 */ "Kodansha Ltd.", /* 13252 */ "ky-on", /* 13253 */ "London Stock Exchange", /* 13254 */ "net mobile AG", /* 13255 */ "Rabid Badgers", /* 13256 */ "Registradores de la Propiedad y Mercantil de España", /* 13257 */ "Secretaria de Educación del Distrito (Bogota D.C Colombia)", /* 13258 */ "solution-x Software GmbH", /* 13259 */ "Study Area Training Center", /* 13260 */ "T-Systems ITS GmbH - DMS/PP", /* 13261 */ "ZbW - Zentrum fuer berufliche Weiterbildung", /* 13262 */ "Professional Systems Integration", /* 13263 */ "Atmel Germany GmbH", /* 13264 */ "Atofina", /* 13265 */ "C2 Creation", /* 13266 */ "City of York Council", /* 13267 */ "Clark Hill PLC", /* 13268 */ "Complete Network Solutions, Inc.", /* 13269 */ "Computing Center of Northeastern Univ.", /* 13270 */ "Current Technologies", /* 13271 */ "DaniloMassa", /* 13272 */ "Design IT Solutions Ltd", /* 13273 */ "Digital Media Lab Corporation", /* 13274 */ "Golden Square Post Production", /* 13275 */ "gsta", /* 13276 */ "IEEE 802.11", /* 13277 */ "iNabling Technologies", /* 13278 */ "Intergate Browser Systems, Inc.", /* 13279 */ "Internet Express, Inc.", /* 13280 */ "IPSYN", /* 13281 */ "Kaparel Corporation", /* 13282 */ "Laitilan Puhelinosuuskunta", /* 13283 */ "London Stock Exchange", /* 13284 */ "LYCOS FRANCE", /* 13285 */ "MDM I&C", /* 13286 */ "Membrain Technologies", /* 13287 */ "MIS@MHIT", /* 13288 */ "Neoscale Systems", /* 13289 */ "nextSource, Inc.", /* 13290 */ "Ogangi Corporation", /* 13291 */ "feel3 UG (haftungsbeschraenkt)", /* 13292 */ "OTTO International (Hong Kong) Ltd.", /* 13293 */ "ph03n1x.net - Development", /* 13294 */ "Portugalmail", /* 13295 */ "SOFTINTEGRO", /* 13296 */ "Soliton Associates Limited", /* 13297 */ "SYNER S.A.", /* 13298 */ "Syntlogo GmbH", /* 13299 */ "Syrén Software AB", /* 13300 */ "Teksouth Corporation", /* 13301 */ "The Advantage Media Group", /* 13302 */ "The Gillette Company", /* 13303 */ "T-Systems Solutions for Research GmbH", /* 13304 */ "BFH Berne University of Applied Sciences", /* 13305 */ "University of Montana", /* 13306 */ "V.R.A.M. Rt.", /* 13307 */ "Városmajori Gimnázium", /* 13308 */ "Visanti A/S", /* 13309 */ "wwwolf", /* 13310 */ "Joys Online, Inc", /* 13311 */ "Factor-TS Ltd.", /* 13312 */ "Analog Devices, Inc", /* 13313 */ "Blank", /* 13314 */ "BlueCat Networks", /* 13315 */ "Byteworks", /* 13316 */ "Celite Systems Inc.", /* 13317 */ "Clarity AG", /* 13318 */ "Dipartimento di Biochimica e Biotecnologie Mediche", /* 13319 */ "Griffin Development", /* 13320 */ "Incard spa", /* 13321 */ "Peel Teaching Assistants Association", /* 13322 */ "SoftLogic Solutions", /* 13323 */ "Web-Addr LLC", /* 13324 */ "Associated Press", /* 13325 */ "Bermai", /* 13326 */ "htds", /* 13327 */ "Apoapsis Ltd", /* 13328 */ "Area51", /* 13329 */ "Ceyoniq Incorporated", /* 13330 */ "CICAIA - Universita` di Modena e Reggio Emilia", /* 13331 */ "Credit Union Central Alberta Limited", /* 13332 */ "ClearSky Technologies, Inc.", /* 13333 */ "Hewett Inc.", /* 13334 */ "Internet Information Services", /* 13335 */ "IronHide Corp", /* 13336 */ "Kochan und Partner", /* 13337 */ "Krocus Communications Oy", /* 13338 */ "Lange Software GmbH", /* 13339 */ "Lee Bradshaw", /* 13340 */ "Live Systems Integration", /* 13341 */ "Unassigned", /* 13342 */ "Networking Laboratory of DMIS, BUTE", /* 13343 */ "Ningbo Success Information Industry CO.,LTD.", /* 13344 */ "Pacificorp", /* 13345 */ "Pace France", /* 13346 */ "Qbranch", /* 13347 */ "Randall Kunkee", /* 13348 */ "RMP & Associates", /* 13349 */ "SDN Online, Inc.", /* 13350 */ "Shanghai Mining Computer Software Co., Ltd.", /* 13351 */ "SNS Solutions", /* 13352 */ "Sonofon", /* 13353 */ "SpaceTime Co., Ltd.", /* 13354 */ "Stodge.org", /* 13355 */ "Summit Imaging, Inc.", /* 13356 */ "SunGard Bi-Tech", /* 13357 */ "Tim O Callaghan", /* 13358 */ "TM Ryder Insurance Agency, Inc.", /* 13359 */ "Trinity Convergence", /* 13360 */ "Université François Rabelais", /* 13361 */ "University of Applied Sciences Stralsund", /* 13362 */ "University of Southern California", /* 13363 */ "ViaBridge", /* 13364 */ "ViewBridge Technologies, Inc", /* 13365 */ "W*H Interactive Ltd", /* 13366 */ "Whale Queens Org", /* 13367 */ "Zand Elektronic", /* 13368 */ "Zeta Associates Incorporated", /* 13369 */ "7+ Computer Networks Ltd.", /* 13370 */ "Qualityware Informática Ltda.", /* 13371 */ "UGC", /* 13372 */ "Apt Minds, LLC", /* 13373 */ "Axitus", /* 13374 */ "Brainzsquare Inc.", /* 13375 */ "Carambole", /* 13376 */ "Conceptis Technologies Inc", /* 13377 */ "Concretio India Private Limited", /* 13378 */ "Crysec GmbH", /* 13379 */ "DOTSTAR Technology", /* 13380 */ "DRP Data", /* 13381 */ "INTEC International GmbH", /* 13382 */ "iNTELEGO", /* 13383 */ "Letins Corporation", /* 13384 */ "Mount Saint Mary College", /* 13385 */ "Nagar", /* 13386 */ "NeuroStar Solutions", /* 13387 */ "Ticoon Technology Inc.", /* 13388 */ "Wraith Computer Systems", /* 13389 */ "AV Automotive Group", /* 13390 */ "Callaway Golf", /* 13391 */ "Cavena Image Products AB", /* 13392 */ "Cite-SI", /* 13393 */ "Colligo Networks", /* 13394 */ "CommerceQuest, Inc.", /* 13395 */ "DANVILLE ASSOCIATES", /* 13396 */ "DemandTec Inc.", /* 13397 */ "SicherByte GmbH Dr. Ralf Schwedler", /* 13398 */ "Dune Semiconductor", /* 13399 */ "Emerson Network Power Co.,Ltd.", /* 13400 */ "ETE Software", /* 13401 */ "Exent Technologies Ltd.", /* 13402 */ "Foton-2000 Kft.", /* 13403 */ "fSONA Communications", /* 13404 */ "Inside Products", /* 13405 */ "Institute of Medical and Veterinary Science", /* 13406 */ "Link2it Corp.", /* 13407 */ "Macrobyte Resources", /* 13408 */ "Mega System Technologies, Inc.", /* 13409 */ "National Public Radio", /* 13410 */ "ms Neumann-Elektronik GmbH", /* 13411 */ "Ophios GmbH", /* 13412 */ "Olabisi.com", /* 13413 */ "Pairlink", /* 13414 */ "Schlag&rahm GmbH", /* 13415 */ "SecurityMatrix, Inc.", /* 13416 */ "silicon broadcasts, Inc.", /* 13417 */ "SKKU Information and comunication lab", /* 13418 */ "SRS SAKURA Internet Inc.", /* 13419 */ "Surgitec Pte Ltd", /* 13420 */ "Tango Telecom Limited", /* 13421 */ "Uniscope", /* 13422 */ "universite de valenciennesJean-Luc Petit, Jean-Guy Avelin", /* 13423 */ "UPC Netherlands", /* 13424 */ "Virtual Space Research", /* 13425 */ "WZab Software", /* 13426 */ "Artesyn Embedded Technologies", /* 13427 */ "JAPAN STORAGE BATTERY CO., Ltd.", /* 13428 */ "Queen Elizabeth School Old Students' Association", /* 13429 */ "Shanghai Online Bussiness Co.,Ltd.", /* 13430 */ "A2E Ltd", /* 13431 */ "CampusEdge Apartments", /* 13432 */ "CodeZombie.com", /* 13433 */ "DYSER S.R.L.", /* 13434 */ "General Magic, Inc.", /* 13435 */ "iControls, Inc.", /* 13436 */ "libits", /* 13437 */ "Logic Eastern(I) Pvt Ltd", /* 13438 */ "Melle Service GmbH", /* 13439 */ "Network Telephone", /* 13440 */ "Norfolk Southern Corp", /* 13441 */ "OpenVES", /* 13442 */ "OZIS", /* 13443 */ "Robert Bird and Partners", /* 13444 */ "Silicon Cocoon Pty.Ltd.", /* 13445 */ "Singapore Cable Vision Limited", /* 13446 */ "The Training Mann", /* 13447 */ "Transat Technologies, Inc.", /* 13448 */ "trusdata.com", /* 13449 */ "TT&S Tecnologia e Sistemas Ltda.", /* 13450 */ "Network Information Center, univ.of buaa", /* 13451 */ "My Lan Guys", /* 13452 */ "Lanmix Technology Co.", /* 13453 */ "Hays Supply Chain", /* 13454 */ "Deutsche Rentenversicherung Rechenzentrum Leipzig", /* 13455 */ "A.E.T. Europe B.V.", /* 13456 */ "ARM Holdings plc", /* 13457 */ "ATMedia GmbH", /* 13458 */ "CAIS", /* 13459 */ "COMELIS", /* 13460 */ "eBsuccess Solutions Inc.", /* 13461 */ "estei", /* 13462 */ "Fort Wayne Community Schools", /* 13463 */ "GREENNET TECHNOLOGY CO.,LTD.", /* 13464 */ "Ingate Systems AB", /* 13465 */ "Jabber, Inc.", /* 13466 */ "Medasys", /* 13467 */ "Montclair State University", /* 13468 */ "netLibrary, Inc.", /* 13469 */ "SecureGUARD GmbH", /* 13470 */ "PowerWAN, Inc", /* 13471 */ "RTS Realtimes Systems (Deutschland) AG", /* 13472 */ "SafeWeb, Inc.", /* 13473 */ "Sierra Systems Group Inc.", /* 13474 */ "SnapTrack, Inc.", /* 13475 */ "Telemant Corp.", /* 13476 */ "Shanghai HAORUN Technologies Ltd.", /* 13477 */ "Clear2Talk Ltd", /* 13478 */ "dstl", /* 13479 */ "Anyware Technology, Inc.", /* 13480 */ "Appload Nordic AB", /* 13481 */ "ATL Telecom", /* 13482 */ "Aviri", /* 13483 */ "Choice One Communications", /* 13484 */ "Comindico", /* 13485 */ "Princeton University", /* 13486 */ "CorVu Corporation", /* 13487 */ "DNCP, LLC", /* 13488 */ "Eastern Goldfields Senior High School", /* 13489 */ "Eplication", /* 13490 */ "EuroMACC Ltd.", /* 13491 */ "First Data Merchant Services", /* 13492 */ "Global Science & Technology, Inc.", /* 13493 */ "Illinois Mathematics and Science Academy", /* 13494 */ "INAT GmbH", /* 13495 */ "Institute of Informatics, Slovak Academy of Sciences", /* 13496 */ "IT3 Consultants", /* 13497 */ "KKE, Inc", /* 13498 */ "Metoda S.p.A.", /* 13499 */ "MPL AG", /* 13500 */ "Nexstar Financial Corporation", /* 13501 */ "OneSquared", /* 13502 */ "Orchestria Limited", /* 13503 */ "Polkomtel S.A.", /* 13504 */ "PROCOS AG", /* 13505 */ "Psionic Software, Inc.", /* 13506 */ "Radcom Software Romania", /* 13507 */ "SIGDCI", /* 13508 */ "SKY Computers", /* 13509 */ "Somoma County Water Agency", /* 13510 */ "SpaceIP", /* 13511 */ "TeamWarrior Ltd", /* 13512 */ "The Technology Partner", /* 13513 */ "Unassigned", /* 13514 */ "Unitech Networks .Ltd", /* 13515 */ "Viloke Oy", /* 13516 */ "Xi'an Jiaotong University", /* 13517 */ "ABN AMRO NL/CCC", /* 13518 */ "Amsoft Systems India Inc", /* 13519 */ "BizWebApps", /* 13520 */ "Sysnight", /* 13521 */ "Account Synchronization Project", /* 13522 */ "Australian Industry Group", /* 13523 */ "Barham House Publishing, Inc.", /* 13524 */ "Blarg! Online Services, Inc.", /* 13525 */ "Clickmarks Inc.", /* 13526 */ "Digitasaru", /* 13527 */ "DLESE", /* 13528 */ "DreamLAN Network Consulting Ltd.", /* 13529 */ "Fahnestock & Co.", /* 13530 */ "Mier Comunicaciones, S.A.", /* 13531 */ "Pennant Systems", /* 13532 */ "Petr Zahradnik Computer Laboratory", /* 13533 */ "Proteus Mobile, Inc", /* 13534 */ "IonPipe. Inc.", /* 13535 */ "Serome Technology, Inc.", /* 13536 */ "Shine Global", /* 13537 */ "VideoBureau, Inc.", /* 13538 */ "Voorhout Data Connection BV", /* 13539 */ "Shenzhen Keybridge Communications Co.,Ltd.", /* 13540 */ "DBV-Winterthur Versicherungen", /* 13541 */ "Datapac s.r.o.", /* 13542 */ "100 Percent IT Ltd", /* 13543 */ "Acopia Networks, Inc.", /* 13544 */ "Adverb Software", /* 13545 */ "Alta A/S", /* 13546 */ "Axiom Systems Limited", /* 13547 */ "BakBone Software Inc", /* 13548 */ "Banque de France", /* 13549 */ "Celstream Technologies", /* 13550 */ "Cofunds LTD", /* 13551 */ "CQG, Inc", /* 13552 */ "Cyber Space Systems, Inc.", /* 13553 */ "DTN SpeedNet Services, LLC", /* 13554 */ "Enterprise Business Solutions", /* 13555 */ "Filtronic plc", /* 13556 */ "FLOORgraphics, Inc.", /* 13557 */ "Gary Reynolds", /* 13558 */ "Global Technology Associates, Inc.", /* 13559 */ "Grant County PUD #2", /* 13560 */ "Griffith University", /* 13561 */ "Information Sciences Institute, USC", /* 13562 */ "Integrated Software Technologies Inc.", /* 13563 */ "Logistik World GmbH", /* 13564 */ "Lucent Technologies India Ltd", /* 13565 */ "Neolytica", /* 13566 */ "UBIqube Solutions", /* 13567 */ "Neustar, Inc.", /* 13568 */ "OIZ", /* 13569 */ "Security Integration, Inc.", /* 13570 */ "TESIS SYSware GmbH", /* 13571 */ "TJEdwards", /* 13572 */ "Tran Empire Industries", /* 13573 */ "TVG Technologies Ltd.", /* 13574 */ "University of Windsor", /* 13575 */ "WAGO Kontakttechnik GmbH", /* 13576 */ "Youjin", /* 13577 */ "apogee solutions", /* 13578 */ "LMN Associates", /* 13579 */ "Europ Assistance France", /* 13580 */ "TAMAGAWA UNIV.", /* 13581 */ "Nordija A/S", /* 13582 */ "UCBIRL", /* 13583 */ "Schering AG", /* 13584 */ "Mangalore Refinery And Petrochemicals Limited", /* 13585 */ "Woodside Networks, Inc.", /* 13586 */ "Universite de Franche-Comte", /* 13587 */ "Acegi Technology Pty Limited", /* 13588 */ "Air Traffic Control & Business Systems GmbH", /* 13589 */ "Americredit Corp", /* 13590 */ "BE Intelligent Systems", /* 13591 */ "Blunk Microsystems", /* 13592 */ "CommerceFlow, Inc.", /* 13593 */ "Company Watch Limited", /* 13594 */ "EMKA electronic AG", /* 13595 */ "Fachhochschule Bingen", /* 13596 */ "FEIS, University of Hertfordshire", /* 13597 */ "General Dynamics Canada", /* 13598 */ "Golden Triangle Online", /* 13599 */ "greenmokey.net", /* 13600 */ "Hwa Chong Junior College", /* 13601 */ "IS4-O", /* 13602 */ "KPNQwest Czechia s.r.o.", /* 13603 */ "Liberate Technologies", /* 13604 */ "Maverick workgroup", /* 13605 */ "Nicomaque", /* 13606 */ "Unassigned", /* 13607 */ "OpenHandHome Inc", /* 13608 */ "Palladium Consulting Inc.", /* 13609 */ "Q Solutions", /* 13610 */ "RBC Data", /* 13611 */ "Schlund + Partner AG", /* 13612 */ "StrataVerio", /* 13613 */ "Tartu Kõrgem Kunstikool", /* 13614 */ "TH", /* 13615 */ "THALES SYSTEM INTEGRATION GmbH", /* 13616 */ "Those Interactive Guys", /* 13617 */ "Transim Technology Corp.", /* 13618 */ "UnderCoverWear Collection", /* 13619 */ "University of Wisconsin - Eau Claire", /* 13620 */ "Wind Telecom", /* 13621 */ "Yaina", /* 13622 */ "point it GmbH", /* 13623 */ "EASTCOM-BUPT INFORMATION TECHNOLOGY CO.,LTD.", /* 13624 */ "pohlcity.de", /* 13625 */ "Rastel", /* 13626 */ "Netfor, Inc.", /* 13627 */ "SerCon GmbH", /* 13628 */ "A.G.Tech Network Service", /* 13629 */ "AFX News Ltd", /* 13630 */ "Arax Communications", /* 13631 */ "ATOMiX DESiGN", /* 13632 */ "AVA Afzar Co.", /* 13633 */ "B&B Computersysteme GbR", /* 13634 */ "BSWS", /* 13635 */ "Corestreet, Ltd.", /* 13636 */ "Cresent Software Products (PVT) Ltd.", /* 13637 */ "Expert Systems IVR (Asia) Co., Ltd.", /* 13638 */ "FibroTEC", /* 13639 */ "Jon Wood", /* 13640 */ "Kremlin Computing Limited", /* 13641 */ "LITAS, s.r.o.", /* 13642 */ "MIMOS Berhad", /* 13643 */ "Netgate", /* 13644 */ "OKB MEI", /* 13645 */ "Oninit Ltd", /* 13646 */ "Ostsee-Zeitung GmbH & Co. KG", /* 13647 */ "Pointred Technologies, Inc", /* 13648 */ "Polizei Rheinland-Pfalz", /* 13649 */ "Relativity", /* 13650 */ "RexKramer", /* 13651 */ NULL, /* 13652 */ "Seoul Mobile Telecom, Inc.", /* 13653 */ "SHENZHEN XIFENG NETWORK TECHNOLOGIES CO.,LTD", /* 13654 */ "SpaceMonster Gaming Network", /* 13655 */ "SUNNYbell Technology", /* 13656 */ "Tango SA", /* 13657 */ "Teddy's Network", /* 13658 */ "The Worley Companies", /* 13659 */ "U.S. Army CECOM", /* 13660 */ "UMIST", /* 13661 */ "Universidad de Palermo", /* 13662 */ "VRGroup.com", /* 13663 */ "VSS KB, a.s.", /* 13664 */ "Webs-are.us", /* 13665 */ "Wolf Hill, s.r.o.", /* 13666 */ "Wozzle Internet Solutions", /* 13667 */ "Yes Technology", /* 13668 */ "Cubic Transportation Systems, Inc.", /* 13669 */ "San Diego Data Processing Corporation", /* 13670 */ "TechTV", /* 13671 */ "General Dynamics - Decision Systems/Secure Products", /* 13672 */ "Internet Czêstochowa", /* 13673 */ "PESA Switching Systems, Inc.", /* 13674 */ "bandwave internet", /* 13675 */ "French Data Network", /* 13676 */ "Kb/TEL Telecomunicaciones SA de CV", /* 13677 */ "acter AG", /* 13678 */ "AltiGen Communications Inc.", /* 13679 */ "Aviva Solutions Inc.", /* 13680 */ "CHILDLOCK solutions", /* 13681 */ "Ecole des Mines de Nantes", /* 13682 */ "EFTechnologies, Inc.", /* 13683 */ "ELPROMA Elektronika", /* 13684 */ "Faculty of Mathematics and Computer Science, Nicholas Copernicus University of Torun", /* 13685 */ "go win", /* 13686 */ "Humboldt-Universitaet zu Berlin", /* 13687 */ "Icequake Networks", /* 13688 */ "In Town Consulting LLC", /* 13689 */ "Madras Computer Vertriebsges.m.b.H.", /* 13690 */ "Maison d'en France", /* 13691 */ "mediface", /* 13692 */ "Mirage Networks, Inc", /* 13693 */ "Nervus Systems Ltd", /* 13694 */ "Neurosphere Consulting", /* 13695 */ "Ohio Wesleyan University", /* 13696 */ "Paul Dlug", /* 13697 */ "RunCircle Ltd", /* 13698 */ "Sarvega Inc.", /* 13699 */ "Scale Eight", /* 13700 */ "Sonic Software", /* 13701 */ "Store Media Engineering", /* 13702 */ "SunDataCom pvt.Ltd.,", /* 13703 */ "TNO", /* 13704 */ "Universitas Indonesia", /* 13705 */ "Volvo Event Management", /* 13706 */ "wasiliana solutions", /* 13707 */ "AIC NETWORK", /* 13708 */ "The Bank of New York", /* 13709 */ "LVM Versicherungen", /* 13710 */ "Primus Telecommunications Australia Pty Ltd", /* 13711 */ "ARINC (Aeronautical Radio, Inc.) Roy L. Courtney", /* 13712 */ "Gateweaver", /* 13713 */ "Reea", /* 13714 */ "Alescere", /* 13715 */ "Caja Madrid", /* 13716 */ "Carreker Corporation", /* 13717 */ "CCITRIAD", /* 13718 */ "CEGETEL SI", /* 13719 */ "CoreMedia AG", /* 13720 */ "Corning Cable Systems", /* 13721 */ "deot.net", /* 13722 */ "Division of BITL", /* 13723 */ "Erasmus University Rotterdam", /* 13724 */ "EuroNetics", /* 13725 */ "FH Bonn-Rhein-Sieg", /* 13726 */ "Fundação CPqD - Centro de Pesquisa e Desenvolvimento em Telecomunicações", /* 13727 */ "Fundació> Aplicació", /* 13728 */ "Funktional Solutions Group", /* 13729 */ "Geobot, Inc", /* 13730 */ "Huth Engineering Inc", /* 13731 */ "iDirect", /* 13732 */ "IMServ Europe Ltd", /* 13733 */ "Institut fuer Theorie der Elektrotechnik, Universitaet Stuttgart", /* 13734 */ "Integra5 Ltd.", /* 13735 */ "Manufacture des Montres Rolex SA", /* 13736 */ "Mark Wilcox & Associates", /* 13737 */ "MindMatics AG", /* 13738 */ "Pacesetter Electronics", /* 13739 */ "Popwire Technology AB", /* 13740 */ "Proinos, INC", /* 13741 */ "Raritan Computer, Inc.", /* 13742 */ "SGTE-IES", /* 13743 */ "SkyTel, Inc.", /* 13744 */ "Plixer International, Inc.", /* 13745 */ "UNIversity of Detroit Mercy", /* 13746 */ "Virtual Health Networks, Inc.", /* 13747 */ "Wizzbit", /* 13748 */ "Madison Consulting Inc.", /* 13749 */ "Juergen Weber Unternehmensberatung", /* 13750 */ "AGY Therapeutics Incorporated", /* 13751 */ "Amarna Software Productions", /* 13752 */ "Ascent Computing Group Inc", /* 13753 */ "Banco Zaragozano", /* 13754 */ "Carleton College", /* 13755 */ "C-LOG International", /* 13756 */ "COXnet", /* 13757 */ "cr-team.de", /* 13758 */ "Examen, Inc", /* 13759 */ "Fourth House Security Inc", /* 13760 */ "Glencore International AG", /* 13761 */ "Innovery", /* 13762 */ "Johannes Passing Softwareentwicklung", /* 13763 */ "Khodayss Systems Limited", /* 13764 */ "Life Time Fitness, Inc.", /* 13765 */ "LOEWE Opta GmbH", /* 13766 */ "Metalogue Communications", /* 13767 */ "Movaris", /* 13768 */ "mozilla.org", /* 13769 */ "MTA Solutions", /* 13770 */ "Navic Systems, Inc., d/b/a Navic Networks, Inc.", /* 13771 */ "NPULSE Software, Inc.", /* 13772 */ "NTELOS Inc.", /* 13773 */ "Onetta, Inc.", /* 13774 */ "Pomona College", /* 13775 */ "Potlatch Corporation", /* 13776 */ "Rakuten Inc.", /* 13777 */ "Sociedade Diginet, LdaJacques", /* 13778 */ "SUMIX Corporation", /* 13779 */ "ubernul projekt", /* 13780 */ "Universite d'AUVERGNE", /* 13781 */ "University of Dortmund, Department of Mathematics", /* 13782 */ "Viking Society of SA", /* 13783 */ "WhidbeyNet", /* 13784 */ "YH", /* 13785 */ "ZP system", /* 13786 */ "PageMail Inc.", /* 13787 */ "Dev-Labs Ltd.", /* 13788 */ "Innovations GmbH", /* 13789 */ "U-King Communications Corp.", /* 13790 */ "Associação dos Estudantes da Faculdade de Ciências e Tecnologia da Universidade Nova de Lisboa", /* 13791 */ "Active Telecom", /* 13792 */ "Acumen Sciences, LLC.", /* 13793 */ "Beijing Educational Information Network", /* 13794 */ "Blue Edge Bulgaria", /* 13795 */ "Caliari Research S.p.A. Nicola", /* 13796 */ "CIRAD", /* 13797 */ "Globenet", /* 13798 */ "Internet 78", /* 13799 */ "IS Services", /* 13800 */ "IUFM des Pays de la Loire", /* 13801 */ "Mundee Internet Services", /* 13802 */ "Navajo Law Enforcement Training Academy", /* 13803 */ "Pontifical College Josephinum", /* 13804 */ "Southland Christian Church", /* 13805 */ "SysOpen Plc", /* 13806 */ "Tpack", /* 13807 */ "ubernul projekt", /* 13808 */ "Université Jean Monnet Saint Etienne", /* 13809 */ "University of Alaska", /* 13810 */ "Israel Discount Bank", /* 13811 */ "SmartPrice SA", /* 13812 */ "Evalesco Systems ApS", /* 13813 */ "alfa Media Partner GmbH", /* 13814 */ "Angel Iglesias, S.A.", /* 13815 */ "AppSense Technologies", /* 13816 */ "Auswärtiges Amt", /* 13817 */ "BHI", /* 13818 */ "BTI Communications Co.", /* 13819 */ "CESKY TELECOM, a.s.", /* 13820 */ "CNI/Prairienet", /* 13821 */ "Command Software Systems, Inc", /* 13822 */ "Comtarsia IT Services", /* 13823 */ "Consus Ltd", /* 13824 */ "Crisp Hughes Evans LLP", /* 13825 */ "Dept of Veterans Affairs", /* 13826 */ "EndRun Technologies LLC", /* 13827 */ "ETM International / Austria", /* 13828 */ "Flecha de Lima Associados", /* 13829 */ "GED-SOFTWARE", /* 13830 */ "Geo-Marine, Inc.", /* 13831 */ "The Go Daddy Group, Inc.", /* 13832 */ "Gobierno de Canarias", /* 13833 */ "iMach, Ltd.", /* 13834 */ "inet-logistics GmbH", /* 13835 */ "Information and Logistics Consultancy", /* 13836 */ "IntroTec", /* 13837 */ "KadeL Data Servis s.r.o.", /* 13838 */ "MarkitServFX", /* 13839 */ "Media Driver, LLC", /* 13840 */ "MetiLinx", /* 13841 */ "Moser-Baer AG", /* 13842 */ "Ned Davis Research Group", /* 13843 */ "North East Worcestershire College", /* 13844 */ "Ohio Northern University", /* 13845 */ "PatientKeeper, Inc.", /* 13846 */ "Pearco Services", /* 13847 */ "rnix.com", /* 13848 */ "Sepro Telecom", /* 13849 */ "Static", /* 13850 */ "Swisscom IT SErvices AG", /* 13851 */ "TopoLogica", /* 13852 */ "Tularik", /* 13853 */ "Universitaet Mannheim, Rechenzentrum", /* 13854 */ "Universitaet Oldenburg", /* 13855 */ "University of Michigan Health System", /* 13856 */ "Ursys Pty Ltd", /* 13857 */ "Eltek Valere Inc.", /* 13858 */ "Voxpilot", /* 13859 */ "WASKO", /* 13860 */ "Wolf IT Concepts", /* 13861 */ "XTec, Incorporated", /* 13862 */ "Airwolf Systems, Inc.", /* 13863 */ "MAMINOS, Inc.", /* 13864 */ "Université Charles de Gaulle - Lille 3", /* 13865 */ "ACE TIMING", /* 13866 */ "Adfinis SyGroup AG", /* 13867 */ "Bahrain Credit", /* 13868 */ "Blum Capital Partners, LP", /* 13869 */ "Corporate Oxygen", /* 13870 */ "Falcon Software NV", /* 13871 */ "Federal University of Sao Paulo", /* 13872 */ "FMC", /* 13873 */ "goepp.net", /* 13874 */ "Interact", /* 13875 */ "Ionic Productions LLC", /* 13876 */ "Kanda Tsushin Kogyo Co., Ltd.", /* 13877 */ "Kariboo Technologies SA", /* 13878 */ "Natural Soft S.A.", /* 13879 */ "ADS Networks Pvt. Ltd", /* 13880 */ "neobee.net", /* 13881 */ "Netilla Networks", /* 13882 */ "New Morning Windows", /* 13883 */ "Pepco AS", /* 13884 */ "Polycom, Inc.", /* 13885 */ "Prosodic Communications Inc.", /* 13886 */ "Red Roby Software, Inc.", /* 13887 */ "South Texas Lighthouse for the Blind", /* 13888 */ "Spriral Designs Inc.", /* 13889 */ "Teltier Technologies Inc.", /* 13890 */ "The Advantage Group", /* 13891 */ "University of New Hampshire", /* 13892 */ "International Truck and Engine Corporation", /* 13893 */ "LGNsys", /* 13894 */ "LaGrange School District 102", /* 13895 */ "Atos Origin CMS / TSP", /* 13896 */ "Advanced Technologies Lab", /* 13897 */ "Alexander Horsch und Thomas Balbach IT Solutions", /* 13898 */ "Anka Systems, Inc", /* 13899 */ "Blue Gargoyle Consulting, LLC", /* 13900 */ "Broadwave Inc.", /* 13901 */ "Business Internet Trends", /* 13902 */ "CAMH PET Centre", /* 13903 */ "Caymas Systems", /* 13904 */ "Cemagref", /* 13905 */ "Chantry Networks Inc.", /* 13906 */ "Compera", /* 13907 */ "Croatian Physical Society, Student Section", /* 13908 */ "CTTC - Centre Tecnològic de Telecomunicacions de Catalunya", /* 13909 */ "Das Büro am Draht", /* 13910 */ "Epsilon d.o.o.", /* 13911 */ "Everest Connections", /* 13912 */ "EVoto Team", /* 13913 */ "FreakySoft", /* 13914 */ "Harry Rüter Software Solutions", /* 13915 */ "Heimat di Andrea Rota", /* 13916 */ "Hostcentric", /* 13917 */ "Inkasbank", /* 13918 */ "Instinct Internet Solutions", /* 13919 */ "Magic Hosting", /* 13920 */ "NEBS", /* 13921 */ "nologin", /* 13922 */ "Peter Verhas", /* 13923 */ "Powell's Bookstores", /* 13924 */ "Real Time Productions", /* 13925 */ "Road Tech Compter Systems Ltd", /* 13926 */ "SCCNET SOHO Consulting", /* 13927 */ "TC Communications", /* 13928 */ "Teragen Pty Ltd", /* 13929 */ "The Aquarius Network", /* 13930 */ "uberLAN Technologies", /* 13931 */ "Vogon.Net", /* 13932 */ "Alstom Transport", /* 13933 */ "Micchi", /* 13934 */ "100comm", /* 13935 */ "AEGIS Mortgage Corp", /* 13936 */ "Art Global Limited", /* 13937 */ "Ashton Raggatt McDougall", /* 13938 */ "automatX", /* 13939 */ "COE Ltd", /* 13940 */ "Communicator Inc.", /* 13941 */ "Candera Inc", /* 13942 */ "Datanet", /* 13943 */ "Denali SA", /* 13944 */ "Deutsche Forschungsgemeinschaft", /* 13945 */ "Educational Systems Ltd", /* 13946 */ "EEMA", /* 13947 */ "Exostar LLC", /* 13948 */ "FRANK-EDV-SERVICE Gesellschaft m.b.H.", /* 13949 */ "Galileo, Inc.", /* 13950 */ "Gentek Marketing Inc.", /* 13951 */ "GLOBAL SUN TECHNOLOGY", /* 13952 */ "HelioGraph Limited", /* 13953 */ "IT Guardian Ltd", /* 13954 */ "JPConsulting", /* 13955 */ "KATCH Network Inc", /* 13956 */ "Liquidsite, Inc.", /* 13957 */ "M.N. Ramos Ferreira, Electricidade e Mecânica, Lda", /* 13958 */ "MLA Power Systems", /* 13959 */ "NESTAR", /* 13960 */ "NLIP - Dutch ISP Association", /* 13961 */ "QoS Labs", /* 13962 */ "R.V.R. Elettronica SpA", /* 13963 */ "SWCS Chan Pak Sha School", /* 13964 */ "tpgpost", /* 13965 */ "University of Bath", /* 13966 */ "Vaporware", /* 13967 */ "Verlag Fur Neue Medien", /* 13968 */ "VOXSIS Informática", /* 13969 */ "Aerostrong Science & Technology Co., Ltd.", /* 13970 */ "ChinaBizone Infomation Technology Co., Ltd.", /* 13971 */ "Varga Limited", /* 13972 */ "investir publications", /* 13973 */ "Epigenomics AG", /* 13974 */ "Naval Global Directory Service", /* 13975 */ "Interaktivna Consulting", /* 13976 */ "SHAYNE ENTERPRISES", /* 13977 */ "GuardedNet, Inc.", /* 13978 */ "Mintact Software Inc", /* 13979 */ "Platinum Web Pages", /* 13980 */ "INGCHEM", /* 13981 */ "FibreSpeed Ltd.", /* 13982 */ "WWR Development, Inc.", /* 13983 */ "Cybrick Information Systems", /* 13984 */ "TAE KWANG INDUSTRIAL CO., Ltd.", /* 13985 */ "Larry Drummond,Consulting Engineer", /* 13986 */ "C. Plath GmbH", /* 13987 */ "tele-akademie der Fachhochschule Furtwangen", /* 13988 */ "Markus Heiden SAP / EC Consulting", /* 13989 */ "Coloma Community Schools", /* 13990 */ "Accellence Technologies GmbH", /* 13991 */ "M-Net Sys", /* 13992 */ "ITWorx", /* 13993 */ "STN ATLAS Elektronik GmbH", /* 13994 */ "Amperion, Incorporated", /* 13995 */ "kbox", /* 13996 */ "Invisible Industries", /* 13997 */ "Conceptual MindWorks, Inc.", /* 13998 */ "ItsNotA.com", /* 13999 */ "Michail Kamprianis", /* 14000 */ "DRS Technologies Canada Ltd.", /* 14001 */ "University of Wisconsin - Whitewater", /* 14002 */ "Saint Mary's College", /* 14003 */ "Gap Inc.", /* 14004 */ "Kelly", /* 14005 */ "Thomas Melzer Softwareentwicklung", /* 14006 */ "IMPACT Science & Technology, Inc.", /* 14007 */ "KT", /* 14008 */ "onSynergy Solutions", /* 14009 */ "Cirrus Real Time Processing", /* 14010 */ "Cyber-Project", /* 14011 */ "net-safe Co., Ltd.", /* 14012 */ "Tata Consultancy Services", /* 14013 */ "TP EmiTel Sp. z o.o.", /* 14014 */ "Unet Ltd.", /* 14015 */ "HG-France", /* 14016 */ "Fachhochschule Technikum Wien", /* 14017 */ "Bryan Bellamy", /* 14018 */ "Betronic Design BV", /* 14019 */ "Zencod", /* 14020 */ "Shapers", /* 14021 */ "Arachne (Poland)", /* 14022 */ "KCOM Service Provider Network", /* 14023 */ "fiscus GmbH", /* 14024 */ "Landesversicherungsanstalt", /* 14025 */ "Slapd.Net", /* 14026 */ "RiverNorth Systems, Inc.", /* 14027 */ "Real Time Engineering", /* 14028 */ "Netzwerk-Lehmann", /* 14029 */ "Smartology vof", /* 14030 */ "STATO MAGGIORE DIFESA - COMANDO C4", /* 14031 */ "SUNY Geneseo", /* 14032 */ "Samart Info Media Co.,Ltd.", /* 14033 */ "OU Artaxis", /* 14034 */ "CyberStar", /* 14035 */ "LineCom Ltd", /* 14036 */ "DasW:Lab", /* 14037 */ "Karns Technology", /* 14038 */ "Gagliano & Cia", /* 14039 */ "Branda Tech.", /* 14040 */ "Railway Information Systems Co.,Ltd", /* 14041 */ "Freudenberg Haushaltsprodukte KF", /* 14042 */ "Sociedad Andaluza para el Desarrollo de la Sociedad de laInformacion, S.A.U.", /* 14043 */ "Kernfysisch Versneller Instituut", /* 14044 */ "iServe (Pty) Ltd.", /* 14045 */ "Statens Bostadsfinansierings AB", /* 14046 */ "ISET", /* 14047 */ "Lyse Energi", /* 14048 */ "ProactiveThought Technologies Ltd.Inc.", /* 14049 */ "Desert Academy at Sante Fe", /* 14050 */ "NetMaster Digital Security", /* 14051 */ "Profluent systems Australia", /* 14052 */ "Prosum Solutions, LLC", /* 14053 */ "Fibercom", /* 14054 */ "IP Mobile Net, Inc.", /* 14055 */ "CEGELEC", /* 14056 */ "Longhill High School", /* 14057 */ "Excogita S.r.l.", /* 14058 */ "Oberoesterreichische Versicherung AG", /* 14059 */ "ENS GmbH", /* 14060 */ "Conectiva S.A.", /* 14061 */ "Escritorio Juridico Alcala Rhode & Asociados", /* 14062 */ "SeaFire Networks Inc.", /* 14063 */ "UC Berkeley Residential Computing", /* 14064 */ "Shanghai FOCI Fiber Optic Communication Equipments Inc.", /* 14065 */ "pit.at", /* 14066 */ "allied networks GmbH", /* 14067 */ "Thueringer Netkom GmbH", /* 14068 */ "Syngenio AG", /* 14069 */ "C3T", /* 14070 */ "Bohr- und Rohrtechnik GmbH", /* 14071 */ "Mistral Software Private Ltd.", /* 14072 */ "SMART Technology", /* 14073 */ "Shorcan Brokers Ltd.", /* 14074 */ "Rational Software Corporation", /* 14075 */ "Marsh Inc.", /* 14076 */ "Esial", /* 14077 */ "ANECT a. s.", /* 14078 */ "Active Tools", /* 14079 */ "Brivo Systems, Inc.", /* 14080 */ "Armstrong World Industries", /* 14081 */ "uplink coherent solutions", /* 14082 */ "Thomas Enterprises", /* 14083 */ "Cochran Consulting, Inc.", /* 14084 */ "ADVFN.com PLC", /* 14085 */ "ESHA Research", /* 14086 */ "Zultys Technologies", /* 14087 */ "Navis LLc", /* 14088 */ "City of Ontario, Oregon", /* 14089 */ "Powerview Systems", /* 14090 */ "Hawker College", /* 14091 */ "University of Rhode Island", /* 14092 */ "Medibase Technologies Co., Ltd.", /* 14093 */ "Snow B.V.", /* 14094 */ "TechDirection", /* 14095 */ "Forlink Software Corporation Inc.", /* 14096 */ "ITW-Informationstechnik GmbH", /* 14097 */ "Hotelequip Ltd.", /* 14098 */ "Butchwax Software", /* 14099 */ "WLAN Alliance AB", /* 14100 */ "D.A.Tsenov EA", /* 14101 */ "dacore Datenbanksysteme AG", /* 14102 */ "ICE Systems", /* 14103 */ "tetronik GmbH AEN", /* 14104 */ "Business interactif", /* 14105 */ "Syndicat Interhospitalier de Bretagne", /* 14106 */ "WIENSTROM", /* 14107 */ "Odense Kommune", /* 14108 */ "Jaguar Cars Limited", /* 14109 */ "ORIMOS", /* 14110 */ "Oxspring Network Solutions Ltd.", /* 14111 */ "hzw design", /* 14112 */ "MagneTek", /* 14113 */ "Aepona England", /* 14114 */ "Platespin", /* 14115 */ "Telecore, Inc.", /* 14116 */ "aostar", /* 14117 */ "Hanover College", /* 14118 */ "Netlife AG", /* 14119 */ "Letifer.org", /* 14120 */ "Stone-IT", /* 14121 */ "Wireless Broadband Alliance Ltd", /* 14122 */ "Expertcity Inc.", /* 14123 */ "UK/CA/JN Joint Astronomy Centre", /* 14124 */ "SENAO INTERNATIONAL CO., Ltd.", /* 14125 */ "New World PCS Limited", /* 14126 */ "OneChannel", /* 14127 */ "Programming Arts, Inc.", /* 14128 */ "Sevan Networks, Inc.", /* 14129 */ "Bifco", /* 14130 */ "Ifoundry Systems", /* 14131 */ "CS Systemes d'Information", /* 14132 */ "Buergernetz Weihenstephan e.V.", /* 14133 */ "University of Szeged", /* 14134 */ "SysDM", /* 14135 */ "Ponton Consulting GmbH", /* 14136 */ "Karis", /* 14137 */ "TGM", /* 14138 */ "City of Nottingham Council", /* 14139 */ "Fachhochschule Lippe und Hoexter", /* 14140 */ "ERECA", /* 14141 */ "ALPWARE", /* 14142 */ "FimOSSchober & Hartl OEG", /* 14143 */ "Malkom S.J.", /* 14144 */ "Society for Humanity and International Trancendentalism", /* 14145 */ "Blackbox Consulting Corporation", /* 14146 */ "Fermi National Accelerator Laboratory", /* 14147 */ "Officina di idee", /* 14148 */ "Waddell & Reed Services", /* 14149 */ "Transaction Auditing Group", /* 14150 */ "Splentec Ltd.", /* 14151 */ "Dyncorp Systems and Solutions", /* 14152 */ "Sigma SaA", /* 14153 */ "NTKO Network Co., Ltd.", /* 14154 */ "TIL TECHNOLOGIES", /* 14155 */ "University of Reading", /* 14156 */ "FHLBank Topeka", /* 14157 */ "Consultoria y estrategia electrónica para internet, S.L.(TestaNet)", /* 14158 */ "Fluent Inc.", /* 14159 */ "Tribune Interactive", /* 14160 */ "EPCNet GmbH", /* 14161 */ "IT Solution GmbH", /* 14162 */ "SAGA D.C. GmbH", /* 14163 */ "SANavigator, Inc.", /* 14164 */ "iReady", /* 14165 */ "Saviso Consulting Ltd.", /* 14166 */ "Seattle University", /* 14167 */ "Owl River Company", /* 14168 */ "INFORMEDIA", /* 14169 */ "Australian Research Centre for Medical Engineering", /* 14170 */ "Memorial University of Newfoundland", /* 14171 */ "Boca Software, Inc.", /* 14172 */ "ETRI", /* 14173 */ "Softforum Co., Ltd.", /* 14174 */ "Hospital La Fe", /* 14175 */ "Katholieke Hogeschool Leuven", /* 14176 */ "implementa GmbH", /* 14177 */ "JNI Corporation", /* 14178 */ "Airespace, Inc", /* 14179 */ "DS Consulting", /* 14180 */ "Cygnus Technologies", /* 14181 */ "GlobalLocate", /* 14182 */ "Arezzo Telecomunicazioni Srl", /* 14183 */ "Getabigger Network", /* 14184 */ "CYBER SERVICE", /* 14185 */ "Gallant Technologies, Inc.", /* 14186 */ "China Netcom Corporation Ltd.", /* 14187 */ "Thomas K. Williams, Ltd.", /* 14188 */ "probusiness AG", /* 14189 */ "Western Outdoor Interactive", /* 14190 */ "MNOFBB", /* 14191 */ "Granite Technologies", /* 14192 */ "Strabon", /* 14193 */ "Ministry of Social Development", /* 14194 */ "Now Software", /* 14195 */ "California State University, Monterey Bay", /* 14196 */ "SISNEMA Informatica Ltda.", /* 14197 */ "PANNAWAY Technologies Incorporated", /* 14198 */ "Accelrys Inc.", /* 14199 */ "HCL Comnet Ltd.", /* 14200 */ "Daxworld", /* 14201 */ "Dottech International Inc.Ltd.", /* 14202 */ "AQL", /* 14203 */ "Reksoft Ltd.", /* 14204 */ "MAI Insurance Brokers Ltd.", /* 14205 */ "Informatie Beheer Groep", /* 14206 */ "Leroy Somer", /* 14207 */ "OpenWide", /* 14208 */ "Accellent", /* 14209 */ "The Storyteller's Place", /* 14210 */ "Tiffany and Company", /* 14211 */ "Universitaet Muenchen", /* 14212 */ "Scitech it solutions GmbH", /* 14213 */ "Tyco Services", /* 14214 */ "Interactive Visuals, Inc.", /* 14215 */ "Sendfar Technology Co., Ltd.", /* 14216 */ "Wuestenrot Datenservice GmbH", /* 14217 */ "Facultes Universitaires Notre-Dame de la Paix", /* 14218 */ "Hapag-Lloyd Container Linie AG", /* 14219 */ "Akaflieg Munchen e.V.", /* 14220 */ "Prodigy Labs", /* 14221 */ "Electric Reliability Council of Texas, Inc.", /* 14222 */ "Sourcefire, Inc.", /* 14223 */ "Software Machine", /* 14224 */ "SPL / ACT Wireless", /* 14225 */ "Vizafone", /* 14226 */ "Tampere Polytechnic", /* 14227 */ "Flanders Electric", /* 14228 */ "University of Arkansas-Fayetteville", /* 14229 */ "Engine GmbH & Co. KG", /* 14230 */ "The Shmoo Group", /* 14231 */ "Exelon Corporation", /* 14232 */ "Sonag Company", /* 14233 */ "Isotomic Technologies", /* 14234 */ "SpinCircuit Inc.", /* 14235 */ "Banco de la Republica", /* 14236 */ "Sarawak Information Systems Sdn. Bhd.", /* 14237 */ "Dilithium Networks", /* 14238 */ "SPRITEInc.", /* 14239 */ "Top Global Technology Ltd", /* 14240 */ "Mentorgen, LLC", /* 14241 */ "AOSA Telekom GmbH & Co.", /* 14242 */ "RTS Real Time Computersoftware Ges.mbH.", /* 14243 */ "Bjerkeset Consulting", /* 14244 */ "The Caudium Group", /* 14245 */ "Natural Convergence", /* 14246 */ "signaflex Inc.", /* 14247 */ "Gemini Security Solutions, Inc.", /* 14248 */ "Vienne Informatique", /* 14249 */ "Conseil General de la Vienne", /* 14250 */ "Stellar Craft Inc.", /* 14251 */ "Prime Solutions Ltd.", /* 14252 */ "GridXpert", /* 14253 */ "enhansiv", /* 14254 */ "brvenik.com", /* 14255 */ "Arlys S. A.", /* 14256 */ "Link Margin, Inc.", /* 14257 */ "Northern Trust Company", /* 14258 */ "Groupe ECE Paris", /* 14259 */ "Linux Systemberatung", /* 14260 */ "Bank Leumi LeIsrael Ltd.", /* 14261 */ "Dipl. Ing. Felix Beer", /* 14262 */ "Sven Meinhardt EDV-Service", /* 14263 */ "OutPost Sentinel", /* 14264 */ "itouch", /* 14265 */ "Bulletproff Networks", /* 14266 */ "WrjTec", /* 14267 */ "Projekt Avalon", /* 14268 */ "Beijing Vanlink Communication Co. P.R.China Yu", /* 14269 */ "Technology Hackworks, Inc.", /* 14270 */ "Iliad", /* 14271 */ "AWO Kreisverband Essen e.V.", /* 14272 */ "IFEN", /* 14273 */ "BDILukasz Tylski", /* 14274 */ "Deutsche Bundeswehr", /* 14275 */ "Osystem AB", /* 14276 */ "tylerfam.net", /* 14277 */ "DINX GmbH", /* 14278 */ "NetHere Internet Services, Inc.", /* 14279 */ "All Optical Networks, Inc.", /* 14280 */ "RCAT.net", /* 14281 */ "Vertrian", /* 14282 */ "Webraska", /* 14283 */ "Technische Universitat Chemnitz", /* 14284 */ "Cegetel SI", /* 14285 */ "nVISIA", /* 14286 */ "Aegis:Net", /* 14287 */ "Lucterra Informatica Ltda", /* 14288 */ "A3 Design", /* 14289 */ "Infocorp Computer Solutions, Inc.", /* 14290 */ "Stefan Lefnaer", /* 14291 */ "The Document Academy", /* 14292 */ "Aditel nv", /* 14293 */ "Collax GmbH", /* 14294 */ "DOP Systems Ltd.", /* 14295 */ "Confmon Corp", /* 14296 */ "One.Tel.UK", /* 14297 */ "Control Products, Inc.", /* 14298 */ "SiteSuite Australasia", /* 14299 */ "Cyber Switching Inc.", /* 14300 */ "Pro Medicus Ltd.", /* 14301 */ "papiNet.org", /* 14302 */ "Nextgen, Inc.", /* 14303 */ "ScenPro Inc.", /* 14304 */ "Kora Institute of Science and Technology Information (KISTI)", /* 14305 */ "FOCI Fiber Optic Communications, Inc.", /* 14306 */ "Kawamura Electric Inc.", /* 14307 */ "REP", /* 14308 */ "Technische Universitaet Clausthal, Rechenzentrum", /* 14309 */ "Adjoin Solutions, Inc.", /* 14310 */ "Technion Communications Corporation", /* 14311 */ "Skypath Networks, Inc.", /* 14312 */ "Proceda Tecnologia e Informatica SA", /* 14313 */ "Imaginet", /* 14314 */ "UBServices", /* 14315 */ "Shanghai Huateng Software System Co., Ltd.", /* 14316 */ "Ratwater", /* 14317 */ "Alstom T&D P&D", /* 14318 */ "DDD Design GmbH", /* 14319 */ "Credit Lyonnais DSTI/DSAT/PLANET", /* 14320 */ "Techelp Ky", /* 14321 */ "Arnold Design & Informatica Ltda.", /* 14322 */ "Dennis IT", /* 14323 */ "The Written Word, Inc.", /* 14324 */ "PuceBaboon", /* 14325 */ "Sirius Satellite Radio", /* 14326 */ "VA Linux Systems Japan K.K.", /* 14327 */ "JAG Productions, Inc.", /* 14328 */ "TimeCertain, LLC", /* 14329 */ "Shanghai Ewaytek Co., Ltd.", /* 14330 */ "Beijing Topsec Network Security Technology Co., Ltd.", /* 14331 */ "DeadSquid Communications", /* 14332 */ "Phonologies (India) Pvt. Ltd.", /* 14333 */ "Milton Keynes Council", /* 14334 */ "Econnect", /* 14335 */ "The Chesapeake Computer Group, Incorporated", /* 14336 */ "Superintendencia de Servicios de Salud", /* 14337 */ "ImpSat S.A.-Colombia", /* 14338 */ "Hioptel", /* 14339 */ "LinuxTek, Inc.", /* 14340 */ "Ministry of Pacific Island Affairs", /* 14341 */ "Netway Networks Pty. Ltd.", /* 14342 */ "Osprey Network Technologies, Inc.", /* 14343 */ "Electronic Commerce Technologies", /* 14344 */ "ETG", /* 14345 */ "Erich Jaeger GmbH", /* 14346 */ "RealNet Kft.", /* 14347 */ "Swist Group Technologies (Pty.) Ltd.", /* 14348 */ "Dyband Corporation", /* 14349 */ "Storbit", /* 14350 */ "Applied Engineering, Inc.", /* 14351 */ "Penn State University", /* 14352 */ "Alessandro Bertela", /* 14353 */ "Menlo Park Presbyterian Church", /* 14354 */ "Chapman University", /* 14355 */ "Bank of Bermuda", /* 14356 */ "WORLDPAC", /* 14357 */ "SnapGear Pty Ltd", /* 14358 */ "Abacus", /* 14359 */ "Routrek Networks, Inc.", /* 14360 */ "Foresearch", /* 14361 */ "Telekom Slovenije d.d.", /* 14362 */ "Blue Oak Wireless (Pty) Ltd.", /* 14363 */ "CLG", /* 14364 */ "IgH Essen GmbH", /* 14365 */ "Energy Research Foundation", /* 14366 */ "Ironic Design, Inc.", /* 14367 */ "PUBLIC.AT Internet", /* 14368 */ "TSI", /* 14369 */ "GeoTrust Inc.", /* 14370 */ "IOTAC", /* 14371 */ "Universidad Simon Bolivar", /* 14372 */ "MystroTV", /* 14373 */ "International Software Solutions", /* 14374 */ "Wireless Services Corp.", /* 14375 */ "Applied Signal Technology, Inc.", /* 14376 */ "CORE SECURITY TECHNOLOGIES", /* 14377 */ "lmjn.com", /* 14378 */ "VarioSecure Networks, Inc.", /* 14379 */ "KT ICOM", /* 14380 */ "TeleCIS, Inc.", /* 14381 */ "Superlong IT Ltd.", /* 14382 */ "Openexpertise Pty. Ltd.", /* 14383 */ "Romsym Data", /* 14384 */ "RTE Software", /* 14385 */ "soLNet, s.r.o", /* 14386 */ "Absolute Systems (PTY) Ltd", /* 14387 */ "Toll Collect", /* 14388 */ "Spider Internet Technologies, Inc.", /* 14389 */ "QRS Healthcare Solutions", /* 14390 */ "Ace Suares", /* 14391 */ "SI-Solucoes de Informatica", /* 14392 */ "PRODASAL Companhia de Processamento de Dados de Salvador", /* 14393 */ "New Mass Media, Inc.", /* 14394 */ "University of Oregon", /* 14395 */ "c4net", /* 14396 */ "ICSS", /* 14397 */ "Behavioral Informatics Inc.", /* 14398 */ "NEC Infrontia Corp.", /* 14399 */ "VentureTechs Corp.", /* 14400 */ "Joint Stock Company Volgatelecom, Penza region", /* 14401 */ "University of Geneva", /* 14402 */ "Gymnasium Hermann-Boese-Str.", /* 14403 */ "Spediant Systems Ltd.", /* 14404 */ "Charon Systems Inc.", /* 14405 */ "United Land Services, Inc.", /* 14406 */ "Xidus.Net", /* 14407 */ "nDosa Technologies, Inc.", /* 14408 */ "DCANet", /* 14409 */ "TSSX", /* 14410 */ "Beijing QXCOMM Technology CO., Ltd.", /* 14411 */ "European Transaction Bank AG", /* 14412 */ "Comfone AG", /* 14413 */ "Regio Ltd.", /* 14414 */ "e-mobilizer", /* 14415 */ "ntl", /* 14416 */ "Continentale Krankenversicherung A.G.", /* 14417 */ "Centro de Tecnologia da Informação \"Luiz de Queiroz\"", /* 14418 */ "EMIGRATUS Communications Inc.", /* 14419 */ "ltinetworks.com", /* 14420 */ "Mocana Corporation", /* 14421 */ "Tazmen Technologies", /* 14422 */ "Rondosoft, Inc.", /* 14423 */ "humatix", /* 14424 */ "Telkonet Inc.", /* 14425 */ "Enterprise Innovations Corporation", /* 14426 */ "NACT Telecommunications Inc.", /* 14427 */ "Welstand", /* 14428 */ "McLuckie and Associates", /* 14429 */ "PoliVec Inc.", /* 14430 */ "Universitas Kristen Krida Wacana", /* 14431 */ "Reserved", /* 14432 */ "China Financial Certification Authority", /* 14433 */ "Network Systems and Technologies", /* 14434 */ "Vrije Universiteit Amsterdam", /* 14435 */ "Quiconnect.com", /* 14436 */ "baltz.org", /* 14437 */ "PolarLake", /* 14438 */ "Hit Internet Technologies S.p.A", /* 14439 */ "Longship Scout Group", /* 14440 */ "Miller Zell", /* 14441 */ "XYBASE (Malaysia) Sdn Bhd", /* 14442 */ "July Systems", /* 14443 */ "Redback IT Pty Ltd", /* 14444 */ "Elecs Industry Co., Ltd.", /* 14445 */ "INDEO GmbH", /* 14446 */ "Spektra Group Ltd", /* 14447 */ "Iatrogenix.com", /* 14448 */ "HitNet e.V.", /* 14449 */ "Twicom", /* 14450 */ "Industrial Computing Ltd", /* 14451 */ "Everyone.net", /* 14452 */ "ISIS Networks", /* 14453 */ "Tel-Aviv University", /* 14454 */ "IntercontinentalExchange", /* 14455 */ "Lemuria Asesores Informaticos C.A.", /* 14456 */ "Lorex Industries, Inc.", /* 14457 */ "ILIENT", /* 14458 */ "Hennessy Digital", /* 14459 */ "B Digital", /* 14460 */ "Keyware Solutions Inc.", /* 14461 */ "Psgue Corporation", /* 14462 */ "Tour2000 co., LTD", /* 14463 */ "ValueCommerce", /* 14464 */ "NOC Grove", /* 14465 */ "Heinrich-Heine-Universitaet Duesseldorf", /* 14466 */ "STIME", /* 14467 */ "Marconi Integrated Systems", /* 14468 */ "Cyclone Computer Consultants Ltd", /* 14469 */ "Plahl Karl Consult", /* 14470 */ "Wasabi Systems", /* 14471 */ "VIA NET.WORKS Services AG", /* 14472 */ "Queen's University", /* 14473 */ "NextAxiom Technology, Inc.", /* 14474 */ "Ralph DeHart", /* 14475 */ "Network Executive Software, Inc.", /* 14476 */ "RELIX", /* 14477 */ "University of Melbourne", /* 14478 */ "Korea National Defence University", /* 14479 */ "norisbank AG", /* 14480 */ "KOBIL Systems GmbH", /* 14481 */ "System 5", /* 14482 */ "UNIC Internet Consulting", /* 14483 */ "Digital V6 Corp.", /* 14484 */ "Sanmina-SCI Inc", /* 14485 */ "Marlboro College", /* 14486 */ "Erkkila Consulting", /* 14487 */ "Darkmist", /* 14488 */ "mcgrew.net Inc.", /* 14489 */ "Ariadne Internet Services, Inc.", /* 14490 */ "Standard School District", /* 14491 */ "Dialogue Technology Corporation", /* 14492 */ "Aurigo Software Technologies", /* 14493 */ "ASPedi GmbH", /* 14494 */ "Hans Lie", /* 14495 */ "SwedishAmerican Health System Corporation", /* 14496 */ "Gist Communications, Inc.", /* 14497 */ "Style Networks, Inc.", /* 14498 */ "e-Bank", /* 14499 */ "Warsaw University", /* 14500 */ "Blue Coat Systems", /* 14501 */ "Sam Asher Computing Services, Inc.", /* 14502 */ "Asylum Visual Effects", /* 14503 */ "Packet Signal Corporation", /* 14504 */ "Spiral Designs Inc.", /* 14505 */ "Ministerul Apararii Nationale", /* 14506 */ "Russian American Glass Company - RASKO Ltd", /* 14507 */ "Teknovus", /* 14508 */ "Mercateo AG", /* 14509 */ "Astra Datentechnik GmbH", /* 14510 */ "London Metropolitan University", /* 14511 */ "Aspivia (Pty) Ltd.", /* 14512 */ "Webflex", /* 14513 */ "DAVE s.r.l.", /* 14514 */ "GenoGRID", /* 14515 */ "Sanoma Budapest Publishing Ltd.", /* 14516 */ "Tactel AB", /* 14517 */ "Pihana Pacific, Inc.", /* 14518 */ "Washington University", /* 14519 */ "Wolfram Research Inc.", /* 14520 */ "H K Moore Limited", /* 14521 */ "GVI Medical Devices", /* 14522 */ "hermit.org", /* 14523 */ "Pharos Systems", /* 14524 */ "Trapeze Networks, Inc", /* 14525 */ "Safenet Informatica Ltda", /* 14526 */ "iWiring", /* 14527 */ "Newlands College", /* 14528 */ "FHPWireless", /* 14529 */ "Robert Baptista", /* 14530 */ "Blackwell Consulting Services", /* 14531 */ "The Asylum", /* 14532 */ "Apoteket AB", /* 14533 */ "SCHIFFKO GmbH", /* 14534 */ "Europoint Networking", /* 14535 */ "Inceritus", /* 14536 */ "TMP Consultoria de Informatica S/C Ltda", /* 14537 */ "Beijing SinceTimes Communication Co., Ltd.", /* 14538 */ "realprogrammers.com", /* 14539 */ "Leszek Pisarek", /* 14540 */ "DeanO", /* 14541 */ "Verizon ESG", /* 14542 */ "N30D", /* 14543 */ "Shanghai Posts&Telecommunications Equipment CO., Ltd.", /* 14544 */ "ICT, Academy of Science, CHINA", /* 14545 */ "NTO \"IRE-POLUS\"", /* 14546 */ "Neue Zurcher Zeitung", /* 14547 */ "Autovalley", /* 14548 */ "Awanim", /* 14549 */ "Metaware S.p.A", /* 14550 */ "GSI mbH", /* 14551 */ "Rison Craft", /* 14552 */ "DaimlerChrysler Corp.", /* 14553 */ "VU MIF", /* 14554 */ "CMGCC", /* 14555 */ "Graven Software", /* 14556 */ "Infowave Software Inc.", /* 14557 */ "SunGard BSR, Inc.", /* 14558 */ "Mondru AB", /* 14559 */ "TSCNet, Inc.", /* 14560 */ "Vocent Solutions", /* 14561 */ "e-Project Solutions Pte Ltd", /* 14562 */ "National Information and Communication Technology Australia", /* 14563 */ "elbers.com", /* 14564 */ "Z-Force, Inc.", /* 14565 */ "BMF", /* 14566 */ "Coventry University Enterprises Ltd", /* 14567 */ "Weiser", /* 14568 */ "Heidelberger Druckmaschinen AG", /* 14569 */ "Majentis Technologies Inc.", /* 14570 */ "Atomz Corporation", /* 14571 */ "EDIWISE", /* 14572 */ "Abest Research Corp.", /* 14573 */ "Cellicium SA", /* 14574 */ "Attention Software, Inc.", /* 14575 */ "Total Network", /* 14576 */ "ForestExpress, LLC", /* 14577 */ "Geac Library Solutions", /* 14578 */ "Q Linux Solutions, Inc.", /* 14579 */ "The Manticore Group", /* 14580 */ "ManaSoft", /* 14581 */ "LUZ Engenharia Financeira", /* 14582 */ "TruTeq Wireless", /* 14583 */ "Celestix Networks", /* 14584 */ "Compass Internet", /* 14585 */ "Tmax soft", /* 14586 */ "Technological Centre \"Tushino\" CB RF", /* 14587 */ "Neosymmetria", /* 14588 */ "Sicap Ltd", /* 14589 */ "Passave Inc.", /* 14590 */ "ncc network consulting GmbH", /* 14591 */ "iOrange - Internet Software and Service GmbH", /* 14592 */ "Dyode", /* 14593 */ "Rudolf Bahr", /* 14594 */ "BillReilly", /* 14595 */ "Martin Wismans GmbH", /* 14596 */ "DolphinSearch, Inc.", /* 14597 */ "USDS", /* 14598 */ "Corman", /* 14599 */ "CryptAll Limited", /* 14600 */ "Baazee.com", /* 14601 */ "Interval Media", /* 14602 */ "Cyberport.de GmbH", /* 14603 */ "Commvault Systems", /* 14604 */ "Wesleyan University", /* 14605 */ "Hewlett-Ward Inc.", /* 14606 */ "Futuro Technologies Inc", /* 14607 */ "Transfinity Corp", /* 14608 */ "Todito.com S.A. de C.V.", /* 14609 */ "Solutions First", /* 14610 */ "Web-Alm GmbH", /* 14611 */ "Linköping University", /* 14612 */ "Ecora", /* 14613 */ "AvantCom Corporation", /* 14614 */ "Vivato Inc.", /* 14615 */ "University of Arkansas at Little Rock", /* 14616 */ "Diseños Electronicos", /* 14617 */ "Mennen Medical", /* 14618 */ "Quadrox Inc.", /* 14619 */ "Saint-Gobain", /* 14620 */ "Wendy's International", /* 14621 */ "VTLS Inc", /* 14622 */ "Riverstyx Internet", /* 14623 */ "vergerus", /* 14624 */ "Servecomm", /* 14625 */ "Reuters", /* 14626 */ "Idt Corp", /* 14627 */ "ResEl", /* 14628 */ "SourceTech AB", /* 14629 */ "Binary Systems Inc", /* 14630 */ "American Institute of Physics", /* 14631 */ "Via Internaathional", /* 14632 */ "Nuberry Ltd", /* 14633 */ "Itool Systems", /* 14634 */ "daviesco", /* 14635 */ "Ontain Corporation", /* 14636 */ "Solectron", /* 14637 */ "Concurrent Reality Pty Ltd", /* 14638 */ "HXTP", /* 14639 */ "Wurley Solutions", /* 14640 */ "Raymond James Financial", /* 14641 */ "104.com", /* 14642 */ "Future Beacon, Inc.", /* 14643 */ "HiFlyCom Corp.", /* 14644 */ "W-ibeda High Tech. Develop. Co. Ltd.", /* 14645 */ "buptNKL", /* 14646 */ "Rossberry Consulting", /* 14647 */ "SurfNShop E-Commerce Inc.", /* 14648 */ "holleyism.com", /* 14649 */ "Lead Up Software", /* 14650 */ "T-Systems International GmbH SL NWS", /* 14651 */ "University of St. Thomas", /* 14652 */ "Metaways Infosystems GmbH", /* 14653 */ "MUZO, a.s.", /* 14654 */ "Gatespace", /* 14655 */ "4IT S.A.", /* 14656 */ "Universita' degli Studi di Parma", /* 14657 */ "Dieter Kluenter System Beratung", /* 14658 */ "Vividlink Detlef Ingendorf", /* 14659 */ "Fachhochschule Wiesbaden", /* 14660 */ "KAV-EMB", /* 14661 */ "Bid-Owl Bildung im Dialog Ostwestfalen-Lippe", /* 14662 */ "IXIF Limited", /* 14663 */ "Init Systems", /* 14664 */ "Comlab Telecommunications inc", /* 14665 */ "McLeod Lake Indian Band", /* 14666 */ "NextiraOne LLC", /* 14667 */ "ViaSat, Inc., Acceleration Research and Technology", /* 14668 */ "Systemhaus x-Team", /* 14669 */ "MTX Networks Inc.", /* 14670 */ "GenFour Communications, LLC", /* 14671 */ "Datamaxx Applied Technologies Inc", /* 14672 */ "Prefeitura Municipal de Alegrete", /* 14673 */ "InfoQuality Consultoria em Informática", /* 14674 */ "Centell Kingdom Technologies Corporation Shanghai Branch", /* 14675 */ "Obsidian Systems", /* 14676 */ "geekhosting", /* 14677 */ "BFW Informationssysteme GmbH", /* 14678 */ "Hansard International Ltd", /* 14679 */ "Bright Grey", /* 14680 */ "Tixoronet Vertriebsgesellschaft mbH", /* 14681 */ "Asopos de Vliet", /* 14682 */ "Centell Kingdom Technologies Corporation Shanghai", /* 14683 */ "System Management Network", /* 14684 */ "DataPower Technology, Inc.", /* 14685 */ "Megasoft Limited", /* 14686 */ "Halion Systems", /* 14687 */ "Systems Experience", /* 14688 */ "Urbancode Software Development, Inc.", /* 14689 */ "Greymoose", /* 14690 */ "Fingerlos", /* 14691 */ "Integrators AG", /* 14692 */ "CISL Systems Ltd.", /* 14693 */ "bmd wireless AG", /* 14694 */ "Herrmannsdoerfer Software Entwicklung", /* 14695 */ "Absolut OK", /* 14696 */ "RRDtool", /* 14697 */ "CSRI \"Elektropribor\"", /* 14698 */ "Hagen Software Inc.", /* 14699 */ "frontiertech", /* 14700 */ "Persist Technologies", /* 14701 */ "Neusoft Digital Medical System CO., LTD.", /* 14702 */ "MIYAKAWA ELECTRIC WORKS LTD.", /* 14703 */ "PingoS e.V.", /* 14704 */ "Province of British Columbia", /* 14705 */ "sFlow.org", /* 14706 */ "Tatara Systems, Inc.", /* 14707 */ "Graceland University", /* 14708 */ "Reactivity, Inc.", /* 14709 */ "Taua Biomatica", /* 14710 */ "Vaka Technology Limited", /* 14711 */ "Sascha Growe", /* 14712 */ "Blacksburg Electronic Village", /* 14713 */ "Questra Corporation", /* 14714 */ "ManyStreams Inc.", /* 14715 */ "British Columbia Institute of Technology", /* 14716 */ "sunHosting company", /* 14717 */ "BKit Gruppen AB", /* 14718 */ "Harmony Gold Operations", /* 14719 */ "HD-info", /* 14720 */ "Techem AG", /* 14721 */ "Peter Shillan", /* 14722 */ "canal systems GmbH", /* 14723 */ "Business Objects", /* 14724 */ "SaM Solutions", /* 14725 */ "Server Side S.A", /* 14726 */ "Henrik Edlund", /* 14727 */ "Pronet sp. j.", /* 14728 */ "Innerwall", /* 14729 */ "Telecom Italia Lab", /* 14730 */ "Christian Kuelker", /* 14731 */ "Nodots Development, Inc.", /* 14732 */ "YASKAWA INFORMATION SYSTEMS Corporation", /* 14733 */ "FLOW Communications", /* 14734 */ "ESOO", /* 14735 */ "ghip systems GmbH", /* 14736 */ "Global Grid Forum", /* 14737 */ "Henderson & Co", /* 14738 */ "rleague.com", /* 14739 */ "TechAngle Inc.", /* 14740 */ "Catalyst International, Inc.", /* 14741 */ "Digital Multitools Inc.", /* 14742 */ "Wachovia Bank", /* 14743 */ "TeleNova Research and Development Centre", /* 14744 */ "Pumpkin Networks", /* 14745 */ "Interstorm, Inc.", /* 14746 */ "Vision Internet Services", /* 14747 */ "Computer Support Systems Pty. Ltd.", /* 14748 */ "University of Rochester", /* 14749 */ "Aware Servers, Inc.", /* 14750 */ "SkyWare Communications Limited", /* 14751 */ "Proware Technology Corp.", /* 14752 */ "ppyworld", /* 14753 */ "Koch Mikrosysteme AG", /* 14754 */ "LYNX Technik AG", /* 14755 */ "ProgTec GmbH", /* 14756 */ "Groiss Informatics GmbH", /* 14757 */ "BPS Co. Ltd.", /* 14758 */ "Adesium Réseaux et Services", /* 14759 */ "Wincor Nixdorf International GmbH", /* 14760 */ "Ubisecure Solutions", /* 14761 */ "intarsys consulting GmbH", /* 14762 */ "Video-Net Systems", /* 14763 */ "MisrNet, S.A.E.", /* 14764 */ "Grafix Profesional S.R.L.", /* 14765 */ "AVICONSULT", /* 14766 */ "BWXT-PANTEX", /* 14767 */ "AGMarine, Inc.", /* 14768 */ "Sybari Software, Inc.", /* 14769 */ "Teleport Consulting and Systemmangement", /* 14770 */ "Computer Sciences Corporation", /* 14771 */ "Neptune Project", /* 14772 */ "Engitech Ltd.", /* 14773 */ "GNU Internet", /* 14774 */ "Peak Internet", /* 14775 */ "Mystic Coders", /* 14776 */ "izenpe s.a.", /* 14777 */ "GEV - Ecole des Mines", /* 14778 */ "e2 Technology Inc.", /* 14779 */ "KAEVEE", /* 14780 */ "ThoughtPort Authority of Chicacgo", /* 14781 */ "Cole Innovations, Inc.", /* 14782 */ "Asociacion para la Promocion del Arte a traves de Internet", /* 14783 */ "AltaTrust", /* 14784 */ "Five4321", /* 14785 */ "Open Network Solutions Ltd", /* 14786 */ "ZYM Linux", /* 14787 */ "William D. Petitt", /* 14788 */ "Principal Financial Group", /* 14789 */ "Statsbiblioteket", /* 14790 */ "Nakua Technologies", /* 14791 */ "Data Conseil", /* 14792 */ "System-Entwicklung Dietrich Schulten", /* 14793 */ "Banco Herrero", /* 14794 */ "Intellocity", /* 14795 */ "AUCOS elektronische Geraete GmbH", /* 14796 */ "DynaStar Communications", /* 14797 */ "NETdelivery Corporation", /* 14798 */ "StarNET Services", /* 14799 */ "Legra Systems", /* 14800 */ "tangro software components gmbh", /* 14801 */ "Inder.Net", /* 14802 */ "Schubert Informationssysteme", /* 14803 */ "Innotrac Diagnostics Oy", /* 14804 */ "AFP7", /* 14805 */ "Tadiran Electronic Systems", /* 14806 */ "FrIc-Net", /* 14807 */ "The Sage Colleges", /* 14808 */ "Datasul MED S.A.", /* 14809 */ "Advanced Digital Broadcast Ltd.", /* 14810 */ "Xilith LLC", /* 14811 */ "Cedars-Sinai Health Systems", /* 14812 */ "Fujitsu Transaction Solutions Inc.", /* 14813 */ "CaroTechnology BV", /* 14814 */ "Datasul S.A.", /* 14815 */ "Thomas Polnik", /* 14816 */ "4RF Communications Ltd.", /* 14817 */ "Voice Mobility, Inc.", /* 14818 */ "University of Cyprus", /* 14819 */ "net outremer caledonie", /* 14820 */ "Stibo", /* 14821 */ "FaJo.de", /* 14822 */ "Aruba Networks Inc", /* 14823 */ "Centaur Technology Inc", /* 14824 */ "Aldata Solutions S.A.", /* 14825 */ "Adage Networks", /* 14826 */ NULL, /* 14827 */ "Sonorys Technology GmbH", /* 14828 */ "Centra Software", /* 14829 */ "UPtime Systemlösungen", /* 14830 */ "voetter.at", /* 14831 */ "ESO Consortium", /* 14832 */ "Portal Solutions Technology, Inc.", /* 14833 */ "Konsec GmbH", /* 14834 */ "INFOTEC", /* 14835 */ "VARTA Microbattery GmbH", /* 14836 */ "Trenchant Consulting, LLC", /* 14837 */ "National Management & Organization SA", /* 14838 */ "Newtech-BT Ltd", /* 14839 */ "Smartwave SA", /* 14840 */ "LEA (Laboratoire Europeen ADSL)", /* 14841 */ "LANergy", /* 14842 */ "Satnet SARL", /* 14843 */ "Upfront Systems", /* 14844 */ "Engineering Ingegneria Informatica S.p.A.", /* 14845 */ "Padtec Optical Components and Systems", /* 14846 */ "Order of Preachers", /* 14847 */ "better networks", /* 14848 */ "Corporate Computer Services, Inc.", /* 14849 */ "Arc Solutions Limited", /* 14850 */ "Storage Networking Industry Association", /* 14851 */ "Kinpo Electronics, Inc.", /* 14852 */ "CipherQuest Ltd.", /* 14853 */ "Beijing Hisense Digi_Tech Co.,Ltd.", /* 14854 */ "CERAMISTA Recom Serviex", /* 14855 */ "Trinitel Corporation", /* 14856 */ "XCAT Co.,Ltd.", /* 14857 */ "Azundris Consulting", /* 14858 */ "Lawo AG", /* 14859 */ "GWS mbH", /* 14860 */ "Britannia Building Society", /* 14861 */ "Ministerio de Administraciones Públicas", /* 14862 */ "ATMAVA Ltd", /* 14863 */ "TNCE", /* 14864 */ "Interplex Telecom", /* 14865 */ "Cottonwood Technology Group, Inc.", /* 14866 */ "Halcyon Software Limited", /* 14867 */ "MAV INFORMATIKA Ltd.", /* 14868 */ "Saudi Telecom", /* 14869 */ "AVAYA", /* 14870 */ "Inter-Land.Net", /* 14871 */ "AVK-AdherSIS Inc.", /* 14872 */ "Broadband services", /* 14873 */ "Rockstorm Technology AB", /* 14874 */ "Leadglobe", /* 14875 */ "Open Text Corporation", /* 14876 */ "Plexus Technology Ltd.", /* 14877 */ "vcrDev", /* 14878 */ "woko", /* 14879 */ "Systemhaus Kalkhoff", /* 14880 */ "QunaTech", /* 14881 */ "smartBridges", /* 14882 */ "antek networks INC.", /* 14883 */ "Exelmon Technologies", /* 14884 */ "Polygon-Group", /* 14885 */ "AIR Co., Ltd.", /* 14886 */ "Nomura Research Institute, Ltd.", /* 14887 */ "Das Werk", /* 14888 */ "openforum.us", /* 14889 */ "Team-Konzept Informationstechnologien GmbH & Co KG", /* 14890 */ "Lawseal", /* 14891 */ "Netsynt S.p.A.", /* 14892 */ "NOXA", /* 14893 */ "Teatica", /* 14894 */ "Propel Software Corporation", /* 14895 */ "Attingo", /* 14896 */ "York Consulting", /* 14897 */ "Access Communications", /* 14898 */ "Town of Suffield", /* 14899 */ "Integrated Concepts International", /* 14900 */ "Vodafone Libertel NV", /* 14901 */ "DATAmark", /* 14902 */ "Digirose Technology Co., Ltd.", /* 14903 */ "TwTec", /* 14904 */ "DEVAU Lemppenau GmbH", /* 14905 */ "NVISION, INC.", /* 14906 */ "NOC-CCE-USP", /* 14907 */ "Upcast Inc", /* 14908 */ "Igenda Software", /* 14909 */ "IP Solutions, Inc.", /* 14910 */ "RFP Depot, LLC.", /* 14911 */ "Smiths Aerospace", /* 14912 */ "Retriever Communications", /* 14913 */ "Vexus Consulting Group", /* 14914 */ "ASPire Technologies(Shenzhen) Ltd", /* 14915 */ "Utah Interactive, Inc.", /* 14916 */ "SimpleTech", /* 14917 */ "Algar Telecom Leste", /* 14918 */ "Singlestep Technologies", /* 14919 */ "Mineco", /* 14920 */ "CTW Computer", /* 14921 */ "Realnode Ltd", /* 14922 */ "Abilene Christian University", /* 14923 */ "The NewSof Group, Inc.", /* 14924 */ "Wavecentral, L.L.C.", /* 14925 */ "atraia.com", /* 14926 */ "DISC, Universidad Católica del Norte", /* 14927 */ "Unipulse", /* 14928 */ "Onscom Co., Ltd.", /* 14929 */ "Solar Telecom. Technology Inc.", /* 14930 */ "Victoria University of Technology", /* 14931 */ "GuangZhou TopTeam Software Technology Co., Ltd.", /* 14932 */ "Chung Yuan Christian University", /* 14933 */ "Vodafone IT (Turkey)", /* 14934 */ "FS Walker Hughes Limited", /* 14935 */ "Eurotux Informática, SA", /* 14936 */ "Itech", /* 14937 */ "Exacom, Inc.", /* 14938 */ "StyleeB LLC", /* 14939 */ "BlueCross and BlueShield of North Carolina", /* 14940 */ "Inflection Systems", /* 14941 */ "Avvio Networks", /* 14942 */ "INNOVATION Data Processing", /* 14943 */ "Primal Technologies", /* 14944 */ "JBX Designs Inc", /* 14945 */ "Gothenburg University", /* 14946 */ "Kyrgyz-Russian Slavic University", /* 14947 */ "Hungarian Foreign Trade Bank", /* 14948 */ "North Building Technologies Ltd.", /* 14949 */ "Servicios Digitales de Certificacion, S.L.", /* 14950 */ "EFACEC SISTEMAS DE ELECTRÓNICA, S.A.", /* 14951 */ "Eyeheight Ltd.", /* 14952 */ "Serio Ltd", /* 14953 */ "Cingular Wireless", /* 14954 */ "CANAM", /* 14955 */ "NetGate SL", /* 14956 */ "Nissan North America", /* 14957 */ "PSC technology GmbH", /* 14958 */ "CBR Yazýlým danýþmanlýk A.Þ", /* 14959 */ "Undernet", /* 14960 */ "Millennium Technology Limited", /* 14961 */ "Ingosstrakh Ltd.", /* 14962 */ "Telemetry & Communications Systems, Inc.", /* 14963 */ "Cogenit", /* 14964 */ "Wideinfo Corporation", /* 14965 */ "Linos Photonics GmbH & Co KG", /* 14966 */ "horsfall.org", /* 14967 */ "WYNIWYG", /* 14968 */ "Columbia Ultimate", /* 14969 */ "CAM Internet", /* 14970 */ "dlh services", /* 14971 */ "Jeb", /* 14972 */ "Deeming.net", /* 14973 */ "Data Telecom OÜ", /* 14974 */ "BRy Tecnologia S.A.", /* 14975 */ "softmillennium", /* 14976 */ "Wuerth Elektronik", /* 14977 */ "Commerzbank AG", /* 14978 */ "Core Tec Communications, LLC", /* 14979 */ "Guidant Corporation", /* 14980 */ "Cogent Logic Corporation", /* 14981 */ "iKu Systemhaus AG", /* 14982 */ "Woaf Tech Ltd", /* 14983 */ "PoCo", /* 14984 */ "Hsi Hu Serion High School", /* 14985 */ "Nextreaming Corporation", /* 14986 */ "E3Networks,LTD", /* 14987 */ "MikroTik", /* 14988 */ "Cinesite Europe Ltd", /* 14989 */ "inm magic", /* 14990 */ "RESA Airport Data Systems", /* 14991 */ "Stagira", /* 14992 */ "IGD", /* 14993 */ "MITEQ, Inc.", /* 14994 */ "Netinary", /* 14995 */ "Stille Design", /* 14996 */ "SOHOware, Inc.", /* 14997 */ "Transportation Security Administration", /* 14998 */ "Codesic", /* 14999 */ "Kontron Canada Inc", /* 15000 */ "Seward Designs, Inc.", /* 15001 */ "Intentional Software Corporation", /* 15002 */ "IPonWEB Ltd", /* 15003 */ "RuggedCom Inc.", /* 15004 */ "Fiba Software srl", /* 15005 */ "P.W.P.T. Wasko sp. z o.o.", /* 15006 */ "Metro Ethernet Forum", /* 15007 */ "Tilaria Inc.", /* 15008 */ "Gplicity", /* 15009 */ "LogiTEL Ltd", /* 15010 */ "Revivio Incorporated", /* 15011 */ "Bernard Madoff Investment Securities", /* 15012 */ "Quantec, LLC", /* 15013 */ "8004 Limited", /* 15014 */ "Integrated Modular Systems, Inc.", /* 15015 */ "Nettiportti OY", /* 15016 */ "Johns Hopkins Singapore", /* 15017 */ "DayDay Software LTD.", /* 15018 */ "Bazy i Systemy Bankowe Sp. z o.o.", /* 15019 */ "Productos Profesionales de Telecomunicacion", /* 15020 */ "mobidot", /* 15021 */ "Golden Gate University", /* 15022 */ "tremium", /* 15023 */ "Tougas.NET", /* 15024 */ "Studentersamfundet i Trondhjem", /* 15025 */ "centre hospitalier de roanne", /* 15026 */ "SecCommerce Technologies AG", /* 15027 */ "James Collings", /* 15028 */ "Jareva Technologies, Inc", /* 15029 */ "Guangzhou RCOM Communication Co., Ltd", /* 15030 */ "University of Melbourne, Computer Science/Grid Computing", /* 15031 */ "INQGEN Technology Co., Ltd.", /* 15032 */ "Realtime Embedded AB", /* 15033 */ "KSolutions S.p.A.", /* 15034 */ "Partner Voxtream", /* 15035 */ "Logical", /* 15036 */ "Shands Healthcare and Teaching Clinics, Inc.", /* 15037 */ "Charles Stark Draper Laboratory, Inc", /* 15038 */ "Armedia", /* 15039 */ "Global Aeon Pty.Ltd.", /* 15040 */ "Poznan University of Technology", /* 15041 */ "vsecure", /* 15042 */ "Jeng-Ye Tech. Enterprise Co.,LTD.", /* 15043 */ "Transatel", /* 15044 */ "MoneyAM Ltd", /* 15045 */ "ClickFox, LLC", /* 15046 */ "Java Software Foundry", /* 15047 */ "Startek Engineering, Inc.", /* 15048 */ "Seattle Central Community College", /* 15049 */ "Waycom International", /* 15050 */ "Finkle Enterprises", /* 15051 */ "Gemini Technologies Inc.", /* 15052 */ "MeriTek Systems, Inc.", /* 15053 */ "PASS-K", /* 15054 */ "Ikegami Tsushinki Co., Ltd.", /* 15055 */ "anthonyhan.org", /* 15056 */ "MORAVIAPRESS a.s.", /* 15057 */ "CEISEC", /* 15058 */ "Baptiste Malguy", /* 15059 */ "Zentic", /* 15060 */ "ServuS A.S", /* 15061 */ "Million Corporation", /* 15062 */ "eko systems inc", /* 15063 */ "MANY sa", /* 15064 */ "Mantas, Inc.", /* 15065 */ "James Richardson Enterprises", /* 15066 */ "SMTMS", /* 15067 */ "Beijing CAPE Computer Software Engineering Corp.", /* 15068 */ "Elasto Centro", /* 15069 */ "YESComm", /* 15070 */ "Frontier Solution Co., Ltd.", /* 15071 */ "HSB Bank AB", /* 15072 */ "Synad Technologies Ltd.", /* 15073 */ "Thus Plc.", /* 15074 */ "Icom", /* 15075 */ "Fresenius AG", /* 15076 */ "Thermeon Corporation", /* 15077 */ "Sysnet Telematica srl", /* 15078 */ "Remark! Internet Limited", /* 15079 */ "XAIDAT", /* 15080 */ "Screwage, Inc.", /* 15081 */ "Carey International, Inc.", /* 15082 */ "RentPayment.com", /* 15083 */ "Mobile Radius USA, Inc.", /* 15084 */ "AFPA DSIS", /* 15085 */ "Omega-Trin Ltd.", /* 15086 */ "projekt13", /* 15087 */ "AdvizeX Technologies LLC", /* 15088 */ "Scientific Systems Company, Inc.", /* 15089 */ "teamix GmbH", /* 15090 */ "Boyd Consulting Services, LLC", /* 15091 */ "Perfcap Corpoation", /* 15092 */ "Novartis International AG", /* 15093 */ "Linetec Gmbh", /* 15094 */ "TDC Services A/S", /* 15095 */ "Agència Catalana de Certificació", /* 15096 */ "SevenSpace", /* 15097 */ "Smithsonian Institution", /* 15098 */ "Loma Linda University", /* 15099 */ "Grupo de Arquitectura y Concurrencia (GAC)", /* 15100 */ "Volt Delta Resources Inc.", /* 15101 */ "US LEC", /* 15102 */ "EIVD", /* 15103 */ "ModLink Networks", /* 15104 */ "503 Integrated Systems", /* 15105 */ "Wificom Technologies Ltd", /* 15106 */ "Siraya Inc.", /* 15107 */ "Macao Post eSignTrust Certification Authority", /* 15108 */ "Psytechnics", /* 15109 */ "Savantis Systems, Inc.", /* 15110 */ "Dennis Eriksson", /* 15111 */ "Whack Productions", /* 15112 */ "MagTek", /* 15113 */ "Stabilizer AB", /* 15114 */ "Obvius LLc", /* 15115 */ "Liberty IT Solutions", /* 15116 */ "Protection One Inc.", /* 15117 */ "Westar Energy", /* 15118 */ "Fidelity National Information Solutions", /* 15119 */ "CRCnet Wireless Network", /* 15120 */ "Mentata Systems", /* 15121 */ "Interface Web Hosting", /* 15122 */ "Fachhochschule Oldenburg/Ostfriesland/Wilhelmshaven", /* 15123 */ "Rodan Systems S.A.", /* 15124 */ "Vectura", /* 15125 */ NULL, /* 15126 */ "CUNY/CIS", /* 15127 */ "Vergata EDV-Beratung", /* 15128 */ "E-CARD Ltd.", /* 15129 */ "Gens Software Ltd.", /* 15130 */ "EDGEACCESS", /* 15131 */ "Six Continents Hotels", /* 15132 */ "Illinois Institute of Technology", /* 15133 */ "Christian Boesch", /* 15134 */ "omatis", /* 15135 */ "Sukumar Patel", /* 15136 */ "ENOVIA", /* 15137 */ "Sim Freaks", /* 15138 */ "LandTime, Inc", /* 15139 */ "YoYoWeb", /* 15140 */ "Infotropic AB", /* 15141 */ "comunicando società per azioni", /* 15142 */ "Synergy Business Solutions, Inc.", /* 15143 */ "Binary Wave Technologies Inc.", /* 15144 */ "iReasoning Networks", /* 15145 */ "M444 Systems, Inc.", /* 15146 */ "Hrvatske Autoceste d.o.o (HAC)", /* 15147 */ "Witteveen+Bos", /* 15148 */ "xantury.com", /* 15149 */ "EXOSEC", /* 15150 */ "Spyderworks Ltd", /* 15151 */ "Scholl Engineering", /* 15152 */ "DMSfactory GmbH", /* 15153 */ "ActiVia Networks", /* 15154 */ "IPSQUARE Inc.", /* 15155 */ "Accusys", /* 15156 */ "dL_s", /* 15157 */ "SCA", /* 15158 */ "ultraDyne", /* 15159 */ "Interactive Northwest, Inc.", /* 15160 */ "Idealab", /* 15161 */ "Movilok Interactividad Movil S.L.", /* 15162 */ "NetKingCall Co., LTD.", /* 15163 */ "Open Point Networks", /* 15164 */ "NT-SYSTEMS", /* 15165 */ "Brian Bunnell", /* 15166 */ "Chapcom", /* 15167 */ "Vossloh Information Technologies Karlsfeld GmbH", /* 15168 */ "IIZUKA Software Technologies", /* 15169 */ "Crinis Networks", /* 15170 */ "Landmark Graphics Corporation", /* 15171 */ "Supcik.net", /* 15172 */ "Hammerhead Systems", /* 15173 */ "Safescrypt Limited", /* 15174 */ "Lonny Software", /* 15175 */ "Advanced Info Service PLC.", /* 15176 */ "ADMtek Incorporated", /* 15177 */ "Axtion Systems Corporation", /* 15178 */ "Seance Software Inc.", /* 15179 */ "City of Bloomington, IN", /* 15180 */ "IneoQuest Technologies Inc.", /* 15181 */ "ads-tec GmbH", /* 15182 */ "objectlab, llc", /* 15183 */ "ITXC", /* 15184 */ "Phantasia Broadcast Ltd.", /* 15185 */ "SolumSTAR", /* 15186 */ "NYS Department of Civil Service", /* 15187 */ "Gemfor s.r.o.", /* 15188 */ "objectlab, llc", /* 15189 */ "incNETWORKS, Inc.", /* 15190 */ "Voice Print International, Inc.", /* 15191 */ "Evergreen Assurance, Inc.", /* 15192 */ "Tacit Networks", /* 15193 */ "Alan Flett", /* 15194 */ "privat", /* 15195 */ "Liqwid Networks", /* 15196 */ "HOW CO.,LTD", /* 15197 */ "FNET Co., Ltd", /* 15198 */ "Infologic Nederland B.V.", /* 15199 */ "Flexibix Inc.", /* 15200 */ "UpSync Software India Private ltd.", /* 15201 */ "Oe-Consult Software GmbH", /* 15202 */ "TDC Mobile A/S", /* 15203 */ "Mobilethink A/S", /* 15204 */ "Nordsan Technology Co., Ltd.", /* 15205 */ "Visualpix SA", /* 15206 */ "Modul 1", /* 15207 */ "Ombre et Pixel", /* 15208 */ "Precision Therapy International", /* 15209 */ "Shinkuro Inc.", /* 15210 */ "North Country Internet Access", /* 15211 */ "ITAU", /* 15212 */ "ITAUSA", /* 15213 */ "Global Network Operations Ltd.", /* 15214 */ "Agilejava.com", /* 15215 */ "White Rabbit", /* 15216 */ "AltaVista", /* 15217 */ "KSC Commercial Internet Co.,Ltd.", /* 15218 */ "SEVOI Co. Ltd", /* 15219 */ "n.v. QWENTES s.a.", /* 15220 */ "Lorus Inc.", /* 15221 */ "Rastar Digital Marketing", /* 15222 */ "Andago", /* 15223 */ "OZTECH", /* 15224 */ "NightStar Corporation", /* 15225 */ "Etronics", /* 15226 */ "Venus Info Tech Inc.", /* 15227 */ "Damm Cellular Systems A/S", /* 15228 */ "T-Systems Schweiz AG", /* 15229 */ "SecurIT BV", /* 15230 */ "schulz engineering", /* 15231 */ "COM.BOX Fotofinder GmbH", /* 15232 */ "Regenative Inc.", /* 15233 */ "SoftSwitching Technologies", /* 15234 */ "Xpoint Technologies, Inc.", /* 15235 */ "R & K Global Business Services, Inc.", /* 15236 */ "Intellinger Software Corporation", /* 15237 */ "Collins Enterprises LLC.", /* 15238 */ "Applico Security, Inc.", /* 15239 */ "AHB Internet Solutions", /* 15240 */ "nimel", /* 15241 */ "ToolCASE LLC", /* 15242 */ "gav-lv", /* 15243 */ "Essential Systems, Inc.", /* 15244 */ "INFNIS", /* 15245 */ "EDV Beratung & Netzwerktechnik Dipl.-Ing. Matthias Kahle", /* 15246 */ "Rocksoft Limited", /* 15247 */ "Quantel Ltd", /* 15248 */ "x-cellent technologies GmbH", /* 15249 */ "Morse Group Ltd", /* 15250 */ "Deutsche Telekom T-Com", /* 15251 */ "SB&C, Ltd.", /* 15252 */ "Ceyba", /* 15253 */ "Kaseya Sweden AB", /* 15254 */ "Reliable Controls Corporation", /* 15255 */ "United Nations", /* 15256 */ "City Computing Limited", /* 15257 */ "Exers Technologies, Inc.", /* 15258 */ "Saarländischer Rundfunk", /* 15259 */ "Université Cahtolique de l'Ouest", /* 15260 */ "UniCon Software GmbH", /* 15261 */ "Data Display Limited.", /* 15262 */ "DLRG Landesverband Rheinland-Pfalz", /* 15263 */ "Anonymizer Inc.", /* 15264 */ "Telelogic AB", /* 15265 */ "Omnibus Systems Ltd", /* 15266 */ "Damage Prevention Systems", /* 15267 */ "Oy NetItBe Ltd", /* 15268 */ "Craniac Entertainment", /* 15269 */ "Printcafe Software, Inc.", /* 15270 */ "Oberfinanzdirektion Koblenz", /* 15271 */ "MaaTec", /* 15272 */ "The Paloma Group, Inc.", /* 15273 */ "Paul Scherrer Institut", /* 15274 */ "AAE Systems", /* 15275 */ "BearASP", /* 15276 */ "SoftTree Technologies, Inc.", /* 15277 */ "Oblicore Inc.", /* 15278 */ "WFI", /* 15279 */ "Relapixity, LLC", /* 15280 */ "ZeOmega Infotect", /* 15281 */ "GCom", /* 15282 */ "Mikroliitti Oy", /* 15283 */ "POSTA SLOVENIJE", /* 15284 */ "iSolv Technologies cc", /* 15285 */ "ADPM", /* 15286 */ "FOB Team", /* 15287 */ "REGISTER.IT S.p.a.", /* 15288 */ "Advanced Broadband Communications Center (CCABA-UPC)", /* 15289 */ "Ordway Center for the Performing Arts", /* 15290 */ "Mach Technology, Inc.", /* 15291 */ "American City Business Journals", /* 15292 */ "Coderanger inc.", /* 15293 */ "EP Imaging Concepts, Inc.", /* 15294 */ "Metrima", /* 15295 */ "Plum Financial Service Pty Ltd", /* 15296 */ "Sonera Solutions Oy", /* 15297 */ "Volkswagen Bank GmbH", /* 15298 */ "Elcoteq Network Corporation", /* 15299 */ "Wireless Independent Provider AB", /* 15300 */ "KFKI RMKI SzHK", /* 15301 */ "GalaxE.Solutions, Inc", /* 15302 */ "accelerate IT services", /* 15303 */ "TakeIT", /* 15304 */ "MBUF", /* 15305 */ "Mount Royal College", /* 15306 */ "Esphion Ltd", /* 15307 */ "Peace Software", /* 15308 */ "e-Dynasty Limited", /* 15309 */ "Exodus Communicaitons", /* 15310 */ "misTrust Certification Authority", /* 15311 */ "Jozef Stefan Institute", /* 15312 */ "REDLINK Mediendienste GmbH", /* 15313 */ "IT+ A/S", /* 15314 */ "Internet Business News", /* 15315 */ "Hub Hill Software", /* 15316 */ "Wells Fargo", /* 15317 */ "Edu4 France S.A.", /* 15318 */ "SkyPilot Network, Inc.", /* 15319 */ "Custom7", /* 15320 */ "Transcor, Inc", /* 15321 */ "Echopass Corporation", /* 15322 */ "INP-net", /* 15323 */ "Walter E. Helmke Library", /* 15324 */ "STVA", /* 15325 */ "Mobicus Oy", /* 15326 */ "Halden Dataservice AS", /* 15327 */ "Svanberg Consulting", /* 15328 */ "Dalian University of Technology", /* 15329 */ "KLEEGROUP", /* 15330 */ "Indagon Oy", /* 15331 */ "Logica UK Ltd", /* 15332 */ "Global Communication Technologies,Inc.", /* 15333 */ "MWVCAA", /* 15334 */ "ITXC", /* 15335 */ "Telemet America, Inc", /* 15336 */ "Photronics, Inc.", /* 15337 */ "PalmSource, Inc", /* 15338 */ "ilse media groep b.v.", /* 15339 */ "George Furniture", /* 15340 */ "Wuhan Yangtze Communications Industry Group Co.,Ltd.,China.", /* 15341 */ "Vitalect Technologies India Pvt. Ltd.", /* 15342 */ "FUNDACION INASMET", /* 15343 */ "Yomi PLC.", /* 15344 */ "Dansk Røde Kors", /* 15345 */ "Viking Systems", /* 15346 */ "IGH Ingenieurgesellschaft Höpfner mbH", /* 15347 */ "Precision Interop, LLC", /* 15348 */ "Andreas Bartsch IT Solutions", /* 15349 */ "Jatosoft LLC", /* 15350 */ "ForeverLiving.com", /* 15351 */ "University of Arkansas at Fort Smith", /* 15352 */ "Integrated Digital Solutions Inc.", /* 15353 */ "Number 1 Customer, LLC", /* 15354 */ "Integan", /* 15355 */ "BartNET", /* 15356 */ "Diversified Systems Resources, LTD", /* 15357 */ "Cygnetron, Inc.", /* 15358 */ "Multidas Technologies, Inc.", /* 15359 */ "CENTRE DE SANTE MENTALE", /* 15360 */ "RPA Research Co., Ltd.", /* 15361 */ "Digital on net Co., Ltd.", /* 15362 */ "Hotel Interski ****", /* 15363 */ "Sibsnet Technologies", /* 15364 */ "INFOSTEP", /* 15365 */ "Dunhuang Academy", /* 15366 */ "ZlanTec", /* 15367 */ "UnixAG Siegen", /* 15368 */ "Cititech Australia", /* 15369 */ "GIGA-BYTE TECHNOLOGY CO., LTD", /* 15370 */ "Horry Telephone Cooperative", /* 15371 */ "Max-Planck-Institute for evolutionary Anthropology", /* 15372 */ "NASK", /* 15373 */ "Enfo Oy", /* 15374 */ "HSB Systemhaus GmbH", /* 15375 */ "De Nayer", /* 15376 */ "ChiliMoon Foundation", /* 15377 */ "CSI Piemonte", /* 15378 */ "Allocity", /* 15379 */ "AlterPoint, Inc.", /* 15380 */ "Wilkes University", /* 15381 */ "Bit Hosting", /* 15382 */ "BlueJavelin, Inc.", /* 15383 */ "NCARP.COM", /* 15384 */ "Genasys II Spain", /* 15385 */ "Ibis Tecnologia e Informacao", /* 15386 */ "Industri Telekomunikasi Indonesia (INTI)", /* 15387 */ "MagiNet Company, Ltd.", /* 15388 */ "Bestway Telecom", /* 15389 */ "Silu co.", /* 15390 */ "iei", /* 15391 */ "OLVIKO", /* 15392 */ "AvestaPolarit AB", /* 15393 */ "P.T Sigma Cipta Caraka", /* 15394 */ "CrossML", /* 15395 */ "Alfa & Ariss b.v.", /* 15396 */ "Netintact AB", /* 15397 */ "IC3S AG", /* 15398 */ "Universite de Poitiers", /* 15399 */ "Post Consult International", /* 15400 */ "EUnet EDV und Internet Dienstleistungs AG", /* 15401 */ "Proximity Corp", /* 15402 */ "T-Systems CDS GmbH", /* 15403 */ "PenTeleData Inc", /* 15404 */ "Comunicaciones NetPeople C.A.", /* 15405 */ "Axiom Integration, Inc.", /* 15406 */ "Ambicom, Inc.", /* 15407 */ "TrueContext Inc.", /* 15408 */ "Customized Database Systems", /* 15409 */ "Seaway Networks", /* 15410 */ "Lasipalatsin Mediakeskus Oy", /* 15411 */ "Cotagesoft Inc.", /* 15412 */ "Oden Oden Wireless Networks Technology (Shanghai) Ltd", /* 15413 */ "BillHusler.com", /* 15414 */ "Openet Information Technology (Shenzhen) Co.,Ltd", /* 15415 */ "Saft Power Systems", /* 15416 */ "IMA - Informatica de Municipios Associados", /* 15417 */ "Forum Systems Inc.", /* 15418 */ "Forest Siding Supply", /* 15419 */ "Lightsurf Technologies", /* 15420 */ "Chiemgau Gymnasium Traunstein", /* 15421 */ "ARTIFintelligence, LLC", /* 15422 */ "NetSpace - Soluções Informáticas", /* 15423 */ "Storeimage Programs Inc.", /* 15424 */ "ImageStream Internet Solutions", /* 15425 */ "Korea Internet Data Center", /* 15426 */ "Hwa-jin Seo", /* 15427 */ "Cybertec Pty Ltd", /* 15428 */ "Future Computing Solutions India Pvt. Ltd.", /* 15429 */ "JIN Information Systems", /* 15430 */ "Xion IT Systems AG", /* 15431 */ "Cybcon Industries", /* 15432 */ "Landespolizei Mecklenburg- Vorpommern", /* 15433 */ "Chebucto Community Net", /* 15434 */ "worldnet21", /* 15435 */ "OsiTools", /* 15436 */ "SSO", /* 15437 */ "RTL Television", /* 15438 */ "PASS Technologie", /* 15439 */ "ZPH Litex", /* 15440 */ "Karell", /* 15441 */ "Orchestel Systems", /* 15442 */ "JP Sync", /* 15443 */ "Saffron Solutions, Inc", /* 15444 */ "SBS", /* 15445 */ "CyberPower Systems, Inc.", /* 15446 */ "SEM Ltd", /* 15447 */ "DAMOVO Ceska Republika", /* 15448 */ "Foursys, Inc.", /* 15449 */ "Innominate Security Technologies AG", /* 15450 */ "Realitatea TV", /* 15451 */ "Geovariances", /* 15452 */ "ABZ Nederland", /* 15453 */ "Arbor AudioCommunications", /* 15454 */ "Unassigned", /* 15455 */ "La cocina", /* 15456 */ "Ackernet", /* 15457 */ "Mark McKenzie", /* 15458 */ "M-Systems", /* 15459 */ "Orchestel Systems", /* 15460 */ "Corybant", /* 15461 */ "Rupprecht & Patashnick Co., Inc.", /* 15462 */ "Huron Superior Catholic District School Board", /* 15463 */ "Muskoka.com", /* 15464 */ "University of Toronto", /* 15465 */ "Peacefulhaven", /* 15466 */ "Digibel", /* 15467 */ "Siege.org", /* 15468 */ "Internet Connection", /* 15469 */ "Digital System Resources", /* 15470 */ "Nucleo de Pesquisa em Redes e Sistemas Abertos", /* 15471 */ "SOA Software, Inc.", /* 15472 */ "Spring Worth Inc.", /* 15473 */ "Lighthouse Software Group", /* 15474 */ "Zhongguang Telecommunications", /* 15475 */ "Fareastone telecommunication Corp.", /* 15476 */ "Bank for foreign trade", /* 15477 */ "Höft & Wessel AG", /* 15478 */ "dudley.org", /* 15479 */ "Trillion Digital Communications", /* 15480 */ "Capital Channel Information Co. Ltd.", /* 15481 */ "Tian En", /* 15482 */ "O.C.A. S.A.", /* 15483 */ "Lux Technologies", /* 15484 */ "University of Otago", /* 15485 */ "keyon", /* 15486 */ "Daisy Technologies Inc.", /* 15487 */ "Pure Matrix, Inc.", /* 15488 */ "Home SE AB", /* 15489 */ "Prasanna Technologies", /* 15490 */ "Protegrity Inc.", /* 15491 */ "Sichuan Changhong Electric Group Co,Ltd.", /* 15492 */ "Goll Enterprises", /* 15493 */ "Helium LLC", /* 15494 */ "eHouse", /* 15495 */ "LaScoala", /* 15496 */ "IronPort Systems, Inc.", /* 15497 */ "TESI S.p.A", /* 15498 */ "The King's University College", /* 15499 */ "eWings Technologies, Inc.", /* 15500 */ "M&C Laboratory Inc.", /* 15501 */ "Animezone", /* 15502 */ "University of Berne", /* 15503 */ "Ministère de l'équipement, des transports, du logement, du tourisme et de la mer", /* 15504 */ "Echoworx Corporation", /* 15505 */ "Akiratech Limited", /* 15506 */ "TierOne OSS Technologies, Inc.", /* 15507 */ "PacketIQ Corp.", /* 15508 */ "direto.org.br", /* 15509 */ "Rhetorical Systems, Ltd.", /* 15510 */ "Groupe ERMEWA S.A.", /* 15511 */ "COMAX INC.", /* 15512 */ "Gendac", /* 15513 */ "Financijska agencija", /* 15514 */ "DGET", /* 15515 */ "SoftWorks Australia Pty Ltd", /* 15516 */ "Entri ltd", /* 15517 */ "Vocalocity, Inc.", /* 15518 */ "Results Computing Corporation", /* 15519 */ "actiSwitch, Inc.", /* 15520 */ "signalkontor GmbH", /* 15521 */ "Whitman College", /* 15522 */ "Equine.com", /* 15523 */ "Access Point Inc", /* 15524 */ "Braum's Ice Cream", /* 15525 */ "Mixmobile", /* 15526 */ "ANIENIB", /* 15527 */ "Naviair", /* 15528 */ "Universidad del Valle", /* 15529 */ "Integrated Technology S.C.", /* 15530 */ "VPNChina Tech-Development Corp.", /* 15531 */ "hollomey consultants gmbh", /* 15532 */ "Mobile Tornado", /* 15533 */ "Linup Front GmbH", /* 15534 */ "Vereniging Milieudefensie", /* 15535 */ "PTM.com", /* 15536 */ "EMK Design", /* 15537 */ "ASIGRA Inc.", /* 15538 */ "Media 4 Sp. z o.o.", /* 15539 */ "AM Corporation", /* 15540 */ "RH Ministarstvo gospodarstva", /* 15541 */ "EMK Design", /* 15542 */ "Illinois Power Company", /* 15543 */ "American Mensa, Ltd.", /* 15544 */ "Probix", /* 15545 */ "eleven.am", /* 15546 */ "Onaras AG", /* 15547 */ "Pillar Data Systems", /* 15548 */ "XCache Technologies, Inc.", /* 15549 */ "La Sierra University", /* 15550 */ "Object Engineering GmbH", /* 15551 */ "Statmon Technologies Corp.", /* 15552 */ "SnarlSNMP Dynamic Web Application Monitor Developers Group", /* 15553 */ "Democratic National Committee", /* 15554 */ "Gold Coast City Council", /* 15555 */ "Chuq Yang", /* 15556 */ "Inflection Technologies", /* 15557 */ "Institute of Chemical Process Fundamentals", /* 15558 */ "Orionet", /* 15559 */ "Yanfa", /* 15560 */ "Coleman Family Camps", /* 15561 */ "mbrace.org", /* 15562 */ "Adtron", /* 15563 */ "Aselia Technologies, Inc.", /* 15564 */ "Great Plains Mall.net", /* 15565 */ "Experian Japan Co., Ltd", /* 15566 */ "Neople Ltd.", /* 15567 */ "Center for Development of Information Technology - CDIT", /* 15568 */ "Krasnoyarsk ICC subdivision of MCC, JSC \"Russian Railways\"", /* 15569 */ "Bayerische Landesbank", /* 15570 */ "Schuler Electronics", /* 15571 */ "Tcom&dtvro", /* 15572 */ "Apertio Ltd", /* 15573 */ "E-milio Internet Services, S.L.", /* 15574 */ "Chimes, Inc.", /* 15575 */ "Pompoen B.V", /* 15576 */ "AirPrism", /* 15577 */ "DeepRoot Linux", /* 15578 */ "Saeson Telecom co., ltd", /* 15579 */ "VNIINS", /* 15580 */ "Telemed Communications Services GmbH", /* 15581 */ "Xtradyne Technologies AG", /* 15582 */ "EUREG", /* 15583 */ "de Werknaam", /* 15584 */ "Northern Light Technology", /* 15585 */ "Response Mechanics, Inc.", /* 15586 */ "Humboldt State University", /* 15587 */ "WetWebMedia", /* 15588 */ "IntiGate Inc.", /* 15589 */ "Catboy Technologies", /* 15590 */ "Alex Shepard", /* 15591 */ "Viking Telecom", /* 15592 */ "Kore Systems GmbH", /* 15593 */ "Causeway Technologies", /* 15594 */ "MEAG MUNICH ERGO AssetManagement GmbH", /* 15595 */ "SONORK S.R.L.", /* 15596 */ "Avamar", /* 15597 */ "Compro Technologies, Inc.", /* 15598 */ "Groom Lake Laboratories", /* 15599 */ "Xeta Technologies", /* 15600 */ "Velocity Software", /* 15601 */ "lottasophie.de", /* 15602 */ "Sunhillo Corporation", /* 15603 */ "Kuopio Telephone PLC", /* 15604 */ "Gray Laboratories, Inc.", /* 15605 */ "TopPioneer Technologies Limited", /* 15606 */ "Encentuate, Inc.", /* 15607 */ "Anders & Rodewyk", /* 15608 */ "Iskon Internet d.d.", /* 15609 */ "Herbert Retail Ltd.", /* 15610 */ "MIC Electronics Limited", /* 15611 */ "SoftWare Services", /* 15612 */ "gen-i limited", /* 15613 */ "Rick Bauman Consulting", /* 15614 */ "kma, inc.", /* 15615 */ "Dullroar Enterprises", /* 15616 */ "newlimits", /* 15617 */ "Adrenalize, Inc.", /* 15618 */ "Delean Vision", /* 15619 */ "Ceiva Logic", /* 15620 */ "ZP Technologies", /* 15621 */ "APTARE", /* 15622 */ "Bachblue Pty Ltd t/a AFOYI", /* 15623 */ "Skopeo LLC", /* 15624 */ "Excedent Technologies", /* 15625 */ "Campus Crusade Asia Ltd", /* 15626 */ "Spezifikum", /* 15627 */ "LAMARC GmbH", /* 15628 */ "IQSoft Rt", /* 15629 */ "InfoGuard HB", /* 15630 */ "Vivista Limited", /* 15631 */ "prime factory Gmbh & Co KG", /* 15632 */ "Tonisoft", /* 15633 */ "d3.net internet - technologien gmbh", /* 15634 */ "China PKI", /* 15635 */ "Althea Technical", /* 15636 */ "Spinlock Network LLC", /* 15637 */ "commissaire.net", /* 15638 */ "e-solutions, lda", /* 15639 */ "Clear Technology, Inc.", /* 15640 */ "Masobit SRL", /* 15641 */ "Transplace, Inc.", /* 15642 */ "Hallway Software Design Corp.", /* 15643 */ "Brenda Bell", /* 15644 */ "pixell daten & design GmbH", /* 15645 */ "Pjusarafelag Islands", /* 15646 */ "thesysadmin", /* 15647 */ "Atlantis Services", /* 15648 */ "VOSGAMES", /* 15649 */ "Citrenesys Corporation", /* 15650 */ "Seventh Moon Co., Ltd.", /* 15651 */ "SHE Informationssysteme AG", /* 15652 */ "Intesys", /* 15653 */ "Max Momentum", /* 15654 */ "SITADELLE", /* 15655 */ "Computer Park Ltd", /* 15656 */ "Macrocall", /* 15657 */ "Fillmore Labs", /* 15658 */ "Alaska Airlines", /* 15659 */ "TLM Software", /* 15660 */ "0x2.net", /* 15661 */ "fumph.com", /* 15662 */ "Aswan Co. Ltd.", /* 15663 */ "Aractel Networks Ltd", /* 15664 */ "Eastern Communication Technology Development CO.LTD", /* 15665 */ "orgatech Ulrich Tiemann GmbH", /* 15666 */ "Lechner-Rau Haustechnik", /* 15667 */ "ZHONGFANG Information Co.,Ltd", /* 15668 */ "Lifecycle Software", /* 15669 */ "The Internet Marketing Center", /* 15670 */ "Wardega Consulting", /* 15671 */ "Javno preduzece \"Posta Srbije\"", /* 15672 */ "Codeangels Solutions", /* 15673 */ "Valente CC", /* 15674 */ "StoneDonut, LLC", /* 15675 */ "baede", /* 15676 */ "Thomson-Thomson", /* 15677 */ "Software Projects Pty Ltd", /* 15678 */ "Cape Com Inc", /* 15679 */ "Digirati", /* 15680 */ "ROSCO Associates Technology Staffing Ltd.", /* 15681 */ "pkiclue.com, Inc.", /* 15682 */ "Acrosonic Corporation", /* 15683 */ "Macro Technology", /* 15684 */ "agala.net", /* 15685 */ "Mei Communication Co.", /* 15686 */ "Magic Software Enterprises Ltd.", /* 15687 */ "Practical Labs", /* 15688 */ "Heinz Family Germany", /* 15689 */ "LIISP", /* 15690 */ "NetPower Solutions", /* 15691 */ "Minnigerode", /* 15692 */ "IonIdea", /* 15693 */ "Silicom", /* 15694 */ "A. Pomerantz & Company", /* 15695 */ "Bayer AG", /* 15696 */ "Cellon Inc", /* 15697 */ "NLoci", /* 15698 */ "Renesys Corporation", /* 15699 */ "Henrici IT-Consulting", /* 15700 */ "Schmut", /* 15701 */ "Computer Image Technology", /* 15702 */ "Software Diversified Services", /* 15703 */ "Cyan Worlds, Inc.", /* 15704 */ "Multitalents", /* 15705 */ "IGLOO SECURITY, Inc.", /* 15706 */ "silve.net", /* 15707 */ "Beijing Westman Automation Ltd. Co.", /* 15708 */ "CBOSS", /* 15709 */ "Megasoft", /* 15710 */ "Euro DB", /* 15711 */ "Taringold Ltd.", /* 15712 */ "Drinsama GmbH", /* 15713 */ "Lenel Systems International, Inc.", /* 15714 */ "Blue Tree Systems", /* 15715 */ "gogo6", /* 15716 */ "Cegetel Net", /* 15717 */ "Loyalty Management Group Canada, Inc.", /* 15718 */ "Mass College of Liberal Arts", /* 15719 */ "binaryMedia", /* 15720 */ "7COMm", /* 15721 */ "Concare", /* 15722 */ "Holoscenes.com", /* 15723 */ "VisionBank Corp.", /* 15724 */ "ZyFLEX Technologies, Inc.", /* 15725 */ "Klug GmbH integrierte Systeme", /* 15726 */ "hofen.org", /* 15727 */ "Sentry Information and Alert Systems Corp", /* 15728 */ "SyTrust GmbH", /* 15729 */ "Lulu Enterprises, Inc.", /* 15730 */ "EasyPax Inc.", /* 15731 */ "ZIV Aplicaciones y Tecnología S.A.", /* 15732 */ "Washington State University", /* 15733 */ "AION Systems", /* 15734 */ "Secure Technology Hawaii", /* 15735 */ "Emergepoint", /* 15736 */ "Zozoa Inc", /* 15737 */ "Business Network Communications", /* 15738 */ "Ruzz Technology Pty Ltd", /* 15739 */ "Digital Vision Technology Ltd", /* 15740 */ "Softerra, LLC", /* 15741 */ "DiskSites Ltd.", /* 15742 */ "VTL (UK) Ltd", /* 15743 */ "NetRatings, Inc.", /* 15744 */ "Schoren NMS Solutions", /* 15745 */ "ZONER software, s.r.o.", /* 15746 */ "Locus Portal Corporation", /* 15747 */ "NetGhost Communications", /* 15748 */ "Ingersoll-Rand Co Inc", /* 15749 */ "University of Tromsø", /* 15750 */ "TRC Fiord, JSC", /* 15751 */ "slamb.org", /* 15752 */ "APPServer", /* 15753 */ "Vancouver Community Network", /* 15754 */ "PIVoD Technologies", /* 15755 */ "Wistron NeWeb Corporation", /* 15756 */ "MITSUBISHI ELECTRIC INFORMATION TECHNOLOGY CORPORATION(MDIT)", /* 15757 */ "suntek beijingyanjiuyuan", /* 15758 */ "Greener Pastures Innovations", /* 15759 */ "NMSWorks Software Limited", /* 15760 */ "ATS Elektronik GmbH", /* 15761 */ "Khety", /* 15762 */ "Lagan", /* 15763 */ "REPSOL YPF, S.A.", /* 15764 */ "JX Solutions Ltd.", /* 15765 */ "Matrix Mailing, LLC", /* 15766 */ "Triblen", /* 15767 */ "Ericsson Inc.", /* 15768 */ "Argecy Computer Corporation", /* 15769 */ "Zeera Networks, Inc.", /* 15770 */ "JF Possibilities", /* 15771 */ "Fachhochschule Landshut", /* 15772 */ "e-BS, a.s.", /* 15773 */ "DesigNET, INC.", /* 15774 */ "HEIDENHAIN", /* 15775 */ "Advanced Data Integration", /* 15776 */ "Openin", /* 15777 */ "DaxNetwork", /* 15778 */ "Novel TongFang", /* 15779 */ "Kiloutou", /* 15780 */ "TRANSFLOW Informationslogistik GmbH", /* 15781 */ "VIA MAT MANAGEMENT AG", /* 15782 */ "HRsmart, Inc", /* 15783 */ "ELB Consulting", /* 15784 */ "Montrusco Bolton Investments Inc.", /* 15785 */ "NetLedger, Inc.", /* 15786 */ "DGN Service GmbH", /* 15787 */ "The Elders of the Universe", /* 15788 */ "Infineon Technologies AG", /* 15789 */ "Wideray Corporation", /* 15790 */ "La Canada Wireless Association", /* 15791 */ "Interlink Group Incorporated", /* 15792 */ "Pittig Software & Internet Services", /* 15793 */ "DeGeorge Family", /* 15794 */ "Vandelay Internet Services, Inc.", /* 15795 */ "ImageONE Co., Ltd.", /* 15796 */ "Infosys Technologies Limited", /* 15797 */ "Rato International Communication Co", /* 15798 */ "Cesky Mobil a.s.", /* 15799 */ "JN Data A/S", /* 15800 */ "Huitsing Embedded Systems", /* 15801 */ "Farlep", /* 15802 */ "mercatis information systems gmbh", /* 15803 */ "DLR SISTEC", /* 15804 */ "Sweetheart Cup Company, Inc.", /* 15805 */ "ConnecTalk Inc.", /* 15806 */ "DGN Service GmbH", /* 15807 */ "DGN Service GmbH", /* 15808 */ "WNET ISP", /* 15809 */ "Bank Severnaya Kazna OAO", /* 15810 */ "Digital Control, LLC", /* 15811 */ "Radical Corporation", /* 15812 */ "AIS.PL", /* 15813 */ "Applied Concepts", /* 15814 */ "NetQA", /* 15815 */ "Infra 911, Inc.", /* 15816 */ "Falcon System Consulting, Inc.", /* 15817 */ "Stadt Braunschweig", /* 15818 */ "Cryptolog International", /* 15819 */ "CASTOR Informatique", /* 15820 */ "FreeBSD-CN Project", /* 15821 */ "I-ST.net GmbH", /* 15822 */ "LinuxWithin.com", /* 15823 */ "InaSoft", /* 15824 */ "ClearMetrix, Inc.", /* 15825 */ "Cryptek, Incorporated", /* 15826 */ "Crocker Communications, Inc.", /* 15827 */ "H3G Italia S.p.A. - Enterprise C.A.", /* 15828 */ "DIGITAL PRODUCTION SARL", /* 15829 */ "Robinlea", /* 15830 */ "DENSO IT LABORATORY, INC.", /* 15831 */ "BT Ignite solutions", /* 15832 */ "SIGEC", /* 15833 */ "Tigard-Tualatin School District", /* 15834 */ "M&S Systems", /* 15835 */ "Marcor Associates, Ltd.", /* 15836 */ "Investment Technology Group", /* 15837 */ "AKA", /* 15838 */ "The E.W. Scripps Company", /* 15839 */ "GEIDAX", /* 15840 */ "Daniel Ritter", /* 15841 */ "Blasberg-Computer-Systeme GmbH", /* 15842 */ "Massenbach", /* 15843 */ "SELEX Communications S.p.A.", /* 15844 */ "DixPER Systems", /* 15845 */ "IP Fabrics", /* 15846 */ "Harvard Law School", /* 15847 */ "Sensorsoft Corporation", /* 15848 */ "Evans Companies", /* 15849 */ "ReShape", /* 15850 */ "Computerized Medical Systems", /* 15851 */ "Legion Interactive", /* 15852 */ "Computer Center, Hitotsubashi university", /* 15853 */ "RIPE NCC", /* 15854 */ "Luleå Segelsällskap", /* 15855 */ "Open Power Network, R.Schär", /* 15856 */ "Administracion del Principado de Asturias", /* 15857 */ "all-in-green.com GmbH", /* 15858 */ "City of Tampere", /* 15859 */ "ParTec", /* 15860 */ "KiNETiK GmbH", /* 15861 */ "BankService Plc.", /* 15862 */ "Innovative Navigation", /* 15863 */ "Unicity Pty. Ltd.", /* 15864 */ "cab Produkttechnik GmbH & Co KG", /* 15865 */ "Joe Rhodes Consulting LLC", /* 15866 */ "IXI Mobile (R&D) Ltd.", /* 15867 */ "Cybris Network Information Systems", /* 15868 */ "Tijd Beursmedia", /* 15869 */ "Egon Technologies", /* 15870 */ "Omnilux", /* 15871 */ "IT Merge Inc.", /* 15872 */ "Guardian Life Insurance Inc", /* 15873 */ "MDS Proteomics A/S", /* 15874 */ "M-PLIFY S.A.", /* 15875 */ "Microprogram Information LD. CO.", /* 15876 */ "API Technologies, LLC", /* 15877 */ "AZTECH SYSTEMS LTD", /* 15878 */ "WaveIP Ltd.", /* 15879 */ "MONEYLINE BANKING SYSTEMS", /* 15880 */ "Thomas Fahle", /* 15881 */ "smart ip", /* 15882 */ "Getronics France", /* 15883 */ "Noble Turkey Software", /* 15884 */ "ESAG Energieversorgung Sachsen Ost AG", /* 15885 */ "Manhattan Associates", /* 15886 */ "Cosini Networks, Inc", /* 15887 */ "TAI S.r.l.", /* 15888 */ "Q-Free ASA", /* 15889 */ "Prairie Grove Telephone Co.", /* 15890 */ "Panda Restaurant Group, Inc.", /* 15891 */ "Openmodes Technology Group Inc.", /* 15892 */ "Emerson Climate Technologies Retail Solutions, Inc.", /* 15893 */ "AstroStage Inc.", /* 15894 */ "4Linux", /* 15895 */ "Southern Federal University", /* 15896 */ "Guangzhou GaoU S & T Development Co. Ltd.", /* 15897 */ "Polizei Brandenburg", /* 15898 */ "inubit", /* 15899 */ "OpenWeb", /* 15900 */ "Valsimmon Technology Group", /* 15901 */ "MEN@NET", /* 15902 */ "Seebek Ingeniería S.R.L.", /* 15903 */ "Peter Eckel, System and Network Management", /* 15904 */ "Defero Systems AB", /* 15905 */ "WLAN AG", /* 15906 */ "Canyon Networks", /* 15907 */ "Business Technology Associates, Inc.", /* 15908 */ "MRX Solutions", /* 15909 */ "AutoTrader.com", /* 15910 */ "he chuan", /* 15911 */ "BlueCom AS", /* 15912 */ "Networking Support Services", /* 15913 */ "Netreo Incorporated", /* 15914 */ "High Tower Software", /* 15915 */ "LANDesk Software", /* 15916 */ "Expedient Communications", /* 15917 */ "the MORROW group", /* 15918 */ "Hitachi Storage Software Incorporated", /* 15919 */ "Switch Management", /* 15920 */ "MobileAccess", /* 15921 */ "YISHANG INNOVATION TECHNOLOGY CO.,LTD", /* 15922 */ "ICS GmbH", /* 15923 */ "Kuwait Linux Company", /* 15924 */ "Cadence Design Systems", /* 15925 */ "Cartier Partners Financial Group Inc.", /* 15926 */ "Point Loma Nazarene University", /* 15927 */ "SNB", /* 15928 */ "Cambodia Samart Communication", /* 15929 */ "Lucasfilm Ltd.", /* 15930 */ "Center for International Rehabilitation", /* 15931 */ "Wuertele", /* 15932 */ "Cyanea Systems Corp.", /* 15933 */ "Multip Kft.", /* 15934 */ "Centerplex", /* 15935 */ "Koreadotcom", /* 15936 */ "Svyazinform of Republic Mordovia Joint Stock Company", /* 15937 */ "JOINT-STOCK COMPANY IMPORT-EXPORT BANK \"IMPEXBANK\" , Moscow", /* 15938 */ "Coral Telecom Ltd", /* 15939 */ "Factoria de iniciativas internet fi2, s.a", /* 15940 */ "Galena Park ISD", /* 15941 */ "Cabildo de Gran Canaria", /* 15942 */ "CONEXUS Credit Union", /* 15943 */ "Agence de la Francophonie", /* 15944 */ "Ascertia", /* 15945 */ "Calypso Networks", /* 15946 */ "New Jersey Institute of Technology", /* 15947 */ "TREVSPLACE.COM", /* 15948 */ "Fábrica de Idéias", /* 15949 */ "4am Media, Inc.", /* 15950 */ "Axent Global", /* 15951 */ "Advanced Computer Resources", /* 15952 */ "Aaron Spangler", /* 15953 */ "Filesure Pte Ltd", /* 15954 */ "OmniComp Technology Services", /* 15955 */ "InCore Technology Ltd", /* 15956 */ "Muonics, Inc.", /* 15957 */ "TREVSPLACE.COM", /* 15958 */ "Sue's Sound cc", /* 15959 */ "eAirports", /* 15960 */ "Cocking and Co. Ltd.", /* 15961 */ "ASML", /* 15962 */ "INFORMA COLOMBIA", /* 15963 */ "Instituto Nacional de Astrofísica, Optica y Electrónica", /* 15964 */ "Public Resources Management Group, Inc.", /* 15965 */ "Visa, International.", /* 15966 */ "NCast Corporation", /* 15967 */ "Emico Vero", /* 15968 */ "Vindigo, Inc.", /* 15969 */ "Aspen Networks Inc", /* 15970 */ "Advanced Biometric Controls, LLC", /* 15971 */ "Disaster Kleenup International, Inc", /* 15972 */ "JCorporate Ltd", /* 15973 */ "Skywave Corporation", /* 15974 */ "MEIKYO ELECTRIC CO.,LTD.", /* 15975 */ "Adacom S.A.", /* 15976 */ "ComPol II", /* 15977 */ "IT=it", /* 15978 */ "Tomsoft", /* 15979 */ "TrackWell Software hf", /* 15980 */ "Anillo Networks, Inc.", /* 15981 */ "Hubbub IT Services", /* 15982 */ "Meru Networks", /* 15983 */ "Authenex, Inc.", /* 15984 */ "The University of Lethbridge", /* 15985 */ "Binara, Inc.", /* 15986 */ "Topoz Pty Ltd", /* 15987 */ "Cymes GmbH", /* 15988 */ "Torsten Schneider", /* 15989 */ "x9", /* 15990 */ "Raso", /* 15991 */ "Tracerdigital, LLC", /* 15992 */ "Net-Scale Technologies, Inc.", /* 15993 */ "XCOM Comunicacao Segura", /* 15994 */ "it consultant Henning Follmann", /* 15995 */ "RNP Rede Nacional de Ensino e Pesquisa", /* 15996 */ "Wave Systems Corp.", /* 15997 */ "University of Glamorgan", /* 15998 */ "CPS Technology Group", /* 15999 */ "Syrea s.r.l.", /* 16000 */ "Ministry of Finance, Czech Republic", /* 16001 */ "Glyphix", /* 16002 */ "Zschimmer GmbH", /* 16003 */ "Intrusec, Inc.", /* 16004 */ "Durham University", /* 16005 */ "CodeFab Inc", /* 16006 */ "Native Instruments", /* 16007 */ "Consolidated Communications Inc", /* 16008 */ "TelemaxX Telekommunikation GmbH", /* 16009 */ "Kapsch BusinessCom AG", /* 16010 */ "State of Utah DAS/ITS", /* 16011 */ "MEMSCAP", /* 16012 */ "byteCentric", /* 16013 */ "Applied Materials Inc.", /* 16014 */ "Primary Objective, LLC", /* 16015 */ "Simmey Limited", /* 16016 */ "CEW Co Ltd", /* 16017 */ "punker.org", /* 16018 */ "Reitek", /* 16019 */ "Wasadata System AB", /* 16020 */ "cassava Enterprises", /* 16021 */ "Minicom Advanced Systems Ltd.", /* 16022 */ "inetadmin", /* 16023 */ "Netzwert Aktiengesellschaft", /* 16024 */ "CIBLIS Engenharia S/C", /* 16025 */ "SoftAplic S/C Ltda.", /* 16026 */ "Shah-USA", /* 16027 */ "XAOS Systems", /* 16028 */ "Westleader International Inc.", /* 16029 */ "Hongkong Post", /* 16030 */ "Atmark Techno, Inc.", /* 16031 */ "Uraltransbank", /* 16032 */ "Telemic Oy", /* 16033 */ "Opus Hadsel", /* 16034 */ "Icom Mobile", /* 16035 */ "InfoCentre Ltd.", /* 16036 */ "em|Motion GmbH", /* 16037 */ "ORAYLIS GmbH", /* 16038 */ "Automated Systems Engineering, Inc.", /* 16039 */ "dataparty.net", /* 16040 */ "Hogeschool Brabant", /* 16041 */ "JMP SYSTEMS", /* 16042 */ "Viasec, s.r.o.", /* 16043 */ "todo Gesellschaft fuer Informationstechnik mbH", /* 16044 */ "Ocaco Finland Oy", /* 16045 */ "DSD S.A.", /* 16046 */ "IT Practice", /* 16047 */ "BOFRIIS", /* 16048 */ "Flamenco Networks, Inc.", /* 16049 */ "Krupczak Org", /* 16050 */ "CORETEAM AB", /* 16051 */ "Chris Rauschuber", /* 16052 */ "Burger King Corporation", /* 16053 */ "Resource Data Management Ltd", /* 16054 */ "Blandsite", /* 16055 */ "okazaki city office", /* 16056 */ "EventGnosis, Inc.", /* 16057 */ "GENKEY", /* 16058 */ "Tsinghua TongFang Software Co. Ltd.", /* 16059 */ "Lighthouse Information Systems, Inc.", /* 16060 */ "Adhersis North America", /* 16061 */ "ZINCNetworks", /* 16062 */ "DC Technologies", /* 16063 */ "Perspectix AG", /* 16064 */ "softArk Solutions", /* 16065 */ "NEC Telenetworx,Ltd", /* 16066 */ "BarcoIntelligentDisplays", /* 16067 */ "Repeatit AB", /* 16068 */ "MINEFI/SP", /* 16069 */ "Bundesamt für Finanzen", /* 16070 */ "Pictet & Cie, Banquiers", /* 16071 */ "Linkeo.com", /* 16072 */ "Edith Cowan University", /* 16073 */ "VBL Karlsruhe", /* 16074 */ "Uninet, S.A.", /* 16075 */ "Dominion Diagnostics", /* 16076 */ "Witbe", /* 16077 */ "Mouvement Républicain et Citoyen", /* 16078 */ "bitMaster", /* 16079 */ "Software Logistics, LLC", /* 16080 */ "KTALAND", /* 16081 */ "Bechtel Corporation", /* 16082 */ "MaineBase", /* 16083 */ "House of Noise", /* 16084 */ "Telexpertise de Mexico S.A. de C.V.", /* 16085 */ "MITSUMI ELECTRIC CO.,LTD", /* 16086 */ "Zayed University", /* 16087 */ "Groats Laboratories", /* 16088 */ "eXwavecom Co.,Ltd.", /* 16089 */ "Estweb Ltd.", /* 16090 */ "ECR", /* 16091 */ "AirWalk Communications, Inc.", /* 16092 */ "AW Software", /* 16093 */ "Stacken", /* 16094 */ "Fluency Voice Technology Ltd.", /* 16095 */ "RCS-TECHNOLOGY", /* 16096 */ "voice robots GmbH", /* 16097 */ "SCA Graphic Sundsvall AB", /* 16098 */ "Pinion Group, LLC", /* 16099 */ "Iron Mountain", /* 16100 */ "Cadero, Inc.", /* 16101 */ "Miharu Communications Inc.", /* 16102 */ "Nilgiri Networks", /* 16103 */ "KeyCOM Information Technology CO.,Ltd", /* 16104 */ "Standard Information Data Centre of Ministry of Education P.R.C", /* 16105 */ "ICCS", /* 16106 */ "Enea Data AB", /* 16107 */ "Garderos Software Innovations GmbH", /* 16108 */ "Pfannenberg", /* 16109 */ "InfoCentre Ltd.", /* 16110 */ "Beaumont Hospital", /* 16111 */ "Valentine KOUTCHERBAEV", /* 16112 */ "Network Dweebs Corporation", /* 16113 */ "Qualstar Corporation", /* 16114 */ "CyberSarge, Inc.", /* 16115 */ "Enforcer Group, Inc.", /* 16116 */ "Rev D Networks", /* 16117 */ "3gfp", /* 16118 */ "Catalog.com", /* 16119 */ "SIMCON", /* 16120 */ "Caliber Technoloigies & Consultancy", /* 16121 */ "Netguild", /* 16122 */ "University of Florence", /* 16123 */ "X32 Pty Ltd", /* 16124 */ "NET SPACE", /* 16125 */ "Parliament of Finland", /* 16126 */ "Fathom Technology KFT", /* 16127 */ "A LAWRENCE RIEDEL", /* 16128 */ "LightHouse Training and Consulting srl", /* 16129 */ "NEC Australia P/L", /* 16130 */ "Humax Co., Ltd.", /* 16131 */ "Pham Kim Binh Nguyen", /* 16132 */ "Artur Sabik", /* 16133 */ "CIRTI de Nantes", /* 16134 */ "Coherent Light", /* 16135 */ "FT Interactive Data", /* 16136 */ "Dr. Huggle & Partner GmbH", /* 16137 */ "E*Trade Financial Inc.", /* 16138 */ "Compellent Technologies", /* 16139 */ "MozApps.org", /* 16140 */ "A-NeT Internet Services bv", /* 16141 */ "Network Technology and Engineering Institute of Xi'an Jiaotong University", /* 16142 */ "Gina & Jonathan Oberg", /* 16143 */ "KERBEROS", /* 16144 */ "DResearch Digital Media Systems GmbH", /* 16145 */ "United Bulgarian Bank", /* 16146 */ "intY Ltd", /* 16147 */ "JavaRealm Software Development Team", /* 16148 */ "Del Mar Analytical", /* 16149 */ "White Wolf Camarilla", /* 16150 */ "Pima Community College", /* 16151 */ "The Cincinnati Insurance Companies", /* 16152 */ "Snert", /* 16153 */ "Network Resource Technologies Corp", /* 16154 */ "HalcyonFlame", /* 16155 */ "Feral Nerds Enterprises", /* 16156 */ "RDI", /* 16157 */ "CiTR Pty Ltd", /* 16158 */ "UQ Business School", /* 16159 */ "Sphere Systems", /* 16160 */ "CSC - Scientific Computing Ltd", /* 16161 */ "RM-System Holding, a.s.", /* 16162 */ "Elettronika S.r.l.", /* 16163 */ "zylk", /* 16164 */ "Crescendo Networks", /* 16165 */ "University of Sheffield", /* 16166 */ "Repsol Quimica", /* 16167 */ "MediSync Midwest Limited", /* 16168 */ "Teleredes", /* 16169 */ "totaleasy", /* 16170 */ "Zucchetti.com srl", /* 16171 */ "Danger Incorporated", /* 16172 */ "Arizona Western College", /* 16173 */ "Sensatronics LLC", /* 16174 */ "TRIADE Beratungsgesellschaft für Informationstechnologie mbH", /* 16175 */ "Zephra Corp.", /* 16176 */ "Westermo Teleindustri AB", /* 16177 */ "WellPoint Health Networks", /* 16178 */ "WAN Norway", /* 16179 */ "Blue Data Networks Ltd", /* 16180 */ "E3Switch LLC", /* 16181 */ "Whitesmiths Australia Pty Ltd", /* 16182 */ "Hanaro Telecom", /* 16183 */ "PT. Indorama Synthetics Tbk", /* 16184 */ "NM Systems Co.,Ltd.", /* 16185 */ "Peter Schneider EDV", /* 16186 */ "Aedilis UAB", /* 16187 */ "Materials Science and Technology Dept. - Univ. of Crete GREECE", /* 16188 */ "Assured Communications Group Limited", /* 16189 */ "Colegio Oficial de Arquitectos de Madrid", /* 16190 */ "NightFire Software, Inc.", /* 16191 */ "BCN Associates, Inc.", /* 16192 */ "Eagle Mountain International Church Inc.", /* 16193 */ "Rancho Morado", /* 16194 */ "Thomson Corp Switzerland AG", /* 16195 */ "Washington Mutual", /* 16196 */ "Scoobtec", /* 16197 */ "Investment Company Institute", /* 16198 */ "openForce Information Technology GesmbH", /* 16199 */ "Casero Inc.", /* 16200 */ "TI Telecomunicazioni & Informatica", /* 16201 */ "Oakland University", /* 16202 */ "Sysdata Kft.", /* 16203 */ "Westinghouse Electric Company", /* 16204 */ "T-Systems GCF MSY", /* 16205 */ "Mobile TeleSystems Limited libility company", /* 16206 */ "Splicecom Ltd", /* 16207 */ "Universidade Lusiada", /* 16208 */ "Collaborative Network Technologies Inc.", /* 16209 */ "Delta Piktori Oy", /* 16210 */ "Certified Security Solutions", /* 16211 */ "wang", /* 16212 */ "CEN/ISSS XFS Workshop", /* 16213 */ "Pehkonen Family", /* 16214 */ "Elbit Systems Ltd.", /* 16215 */ "Trinity CC Consulting, Inc.", /* 16216 */ "KDDI Media Will Corporation", /* 16217 */ "Talkline GmbH", /* 16218 */ "DB Telematik GmbH", /* 16219 */ "LANDMAT", /* 16220 */ "Strodl", /* 16221 */ "DONOBi, Inc.", /* 16222 */ "Global Messaging Solutions, Inc.", /* 16223 */ "HTBLuVA Wiener Neustadt", /* 16224 */ "PaeTec Communications", /* 16225 */ "Public Service Enterprise Group", /* 16226 */ "VitalStream, Inc.", /* 16227 */ "AuriQ Systems, Inc.", /* 16228 */ "NU Informationssysteme GmbH", /* 16229 */ "eCornell", /* 16230 */ "Introspect Consulting, Inc.", /* 16231 */ "netMANj Project", /* 16232 */ "Tukcedo Services", /* 16233 */ "Dogico", /* 16234 */ "insignia financial group, inc.", /* 16235 */ "Andrew Maldonado Consulting", /* 16236 */ "Mantis Technology LLC", /* 16237 */ "TheCartCompany.com", /* 16238 */ "Corbett Systems Development, Inc.", /* 16239 */ "skinoske tech", /* 16240 */ "butlerNetworks AS", /* 16241 */ "Thames Valley University", /* 16242 */ "AVS Consulting", /* 16243 */ "Ecole des Mines d'Alès", /* 16244 */ "Humanor", /* 16245 */ "Hertz Comunicaciones", /* 16246 */ "eServGlobal", /* 16247 */ "litus.at", /* 16248 */ "Italtel S.p.A.", /* 16249 */ "NetPrecept Ltd.", /* 16250 */ "Bonuso Industries", /* 16251 */ "Mätäsahon suku", /* 16252 */ "Mätäsahon suku", /* 16253 */ "Holmen Paper AB", /* 16254 */ "Action Engine Corp.", /* 16255 */ "Develtech", /* 16256 */ "The Hong Kong Polytechnic University", /* 16257 */ "FeelingK", /* 16258 */ "KOWA COMPANY,LTD. RESEARCH CENTER FOR ADVANCED TECHNOLOGY", /* 16259 */ "The FreeBSD China Community", /* 16260 */ "Kopint-Datorg Rt.", /* 16261 */ "Repsol Petroleo", /* 16262 */ "swisswebgroup gmbh", /* 16263 */ "Itheon", /* 16264 */ "Open Methods", /* 16265 */ "The Optym Group", /* 16266 */ "American Network Communications, Inc", /* 16267 */ "US Linux Networks, LLC", /* 16268 */ "iomart ltd", /* 16269 */ "GravityRock.com", /* 16270 */ "New South Wales Fire Brigades", /* 16271 */ "Legend (Beijing) Limited", /* 16272 */ "Nexge technology p ltd", /* 16273 */ "TELMAT Industrie", /* 16274 */ "University of Kuopio", /* 16275 */ "Communications Regulation Commission", /* 16276 */ "Mobile Internet Limited", /* 16277 */ "sLAB Informationssysteme", /* 16278 */ "St. Francis Borgia RHS", /* 16279 */ "OLTPCorp", /* 16280 */ "SYSLOG Gmbh", /* 16281 */ "H5 Technologies", /* 16282 */ "OM", /* 16283 */ "QuadFore Corporation", /* 16284 */ "ibpsearch", /* 16285 */ "Hungarocom Ltd", /* 16286 */ "Swiss Federal Institute of Technology", /* 16287 */ "EDV-Beratung", /* 16288 */ "Mediva Inc.", /* 16289 */ "SIAT", /* 16290 */ "Meeting Maker, Inc.", /* 16291 */ "Susurro", /* 16292 */ "BRVL Technology Ltd.", /* 16293 */ "Applied Instruments Inc", /* 16294 */ "Ormond college", /* 16295 */ "Vindicia", /* 16296 */ "Semnode", /* 16297 */ "hanbang-soft technology co.,Ltd", /* 16298 */ "corega K.K.", /* 16299 */ "Penguin Infotech Pvt. Ltd.", /* 16300 */ "Silesian University in Opava", /* 16301 */ "intrae", /* 16302 */ "Sans Serif", /* 16303 */ "EADS", /* 16304 */ "KIBS AD Skopje", /* 16305 */ "Repsol Distribucion", /* 16306 */ "StreamScale", /* 16307 */ "RHOEN-KLINIKUM AG", /* 16308 */ "NTT Software Corporation", /* 16309 */ "Marketline Rt.", /* 16310 */ "Alatec, S.A.", /* 16311 */ "Register.com", /* 16312 */ "Valemount Networks Corp", /* 16313 */ "Bureautique Services Developpement", /* 16314 */ "X|support", /* 16315 */ "HSBC Bank North America", /* 16316 */ "Quebecor World North America", /* 16317 */ "empuron", /* 16318 */ "ViaVis Mobile Solutions Inc.", /* 16319 */ "The Brain Room Ltd", /* 16320 */ "ZOOM INTERNATIONAL s.r.o.", /* 16321 */ "Leading Edge Telemetry, LLC", /* 16322 */ "Trax Holdings", /* 16323 */ "Itelsys", /* 16324 */ "NESCO CO., LTD.", /* 16325 */ "iyaburo.com", /* 16326 */ "Mark Chesney", /* 16327 */ "NARI Corp. (Nanjing Automation Research Institute)", /* 16328 */ "AdiSyS Oy", /* 16329 */ "Reutech Radar System", /* 16330 */ "cosmocode GmbH", /* 16331 */ "Longshine Technologie Europe GmbH", /* 16332 */ "bitmine AB", /* 16333 */ "Northrop Grumman", /* 16334 */ "Seoul Electric Power System co.,ltd", /* 16335 */ "Alatec, S.A.", /* 16336 */ "Canadian National Railway Company", /* 16337 */ "IPOne", /* 16338 */ "GlobeOp Financial Services, LLC", /* 16339 */ "White Rock Networks", /* 16340 */ "Biomedical Informatics Research Network (BIRN)", /* 16341 */ "Menta Group", /* 16342 */ "UTTC United Tri-Tech Corporation", /* 16343 */ "Perfigo", /* 16344 */ "The Anvil Organisation Ltd.", /* 16345 */ "Farabi Technology", /* 16346 */ "IPCAST", /* 16347 */ "Shanghai Transfiber Science&Technology Co.,Ltd.", /* 16348 */ "ComGear", /* 16349 */ "TOT Corporation Public Company Limited", /* 16350 */ "Caixa Bank S. A.", /* 16351 */ "Newman College of HE", /* 16352 */ "Howaldtswerke - Deutsche Werft AG", /* 16353 */ "Gruppennest", /* 16354 */ "MIDRAY GmbH", /* 16355 */ "Transfer Limited", /* 16356 */ "Hain Celestial Group", /* 16357 */ "United Carrier Networks", /* 16358 */ "Miller Samuel, Inc.", /* 16359 */ "Contraloría General de la República", /* 16360 */ "Progressive Linux Consultants LLC", /* 16361 */ "Waters Network Systems", /* 16362 */ "SCHOLZ & VOLKMER Intermediales Design, GmbH", /* 16363 */ "SMARTDATA", /* 16364 */ "Dion Global Solutions GmbH", /* 16365 */ "INFORMA DEL PERU, INFORMACION ECONOMICA SA", /* 16366 */ "saarstahl", /* 16367 */ "Sysapex Communications Inc.", /* 16368 */ "Clark University", /* 16369 */ "DASS Consulting Group Inc.", /* 16370 */ "tygrysek.com", /* 16371 */ "T-Mobile Czech Republic a.s.", /* 16372 */ "Federal Public service Transport & Mobility", /* 16373 */ "NV Multikabel", /* 16374 */ "University Of Athens", /* 16375 */ "ACOSS", /* 16376 */ "IMCTech", /* 16377 */ "Sarian Systems Limited", /* 16378 */ "River Cities Reader", /* 16379 */ "NEXVU Technologies", /* 16380 */ "Verifiber, LLC", /* 16381 */ "InterBox Internet", /* 16382 */ "HP GSE Security", /* 16383 */ "California State Polytechnic University, Pomona", /* 16384 */ "Hudli", /* 16385 */ "Daxiongmao", /* 16386 */ "OEone Corporation", /* 16387 */ "Jörg Eichhorn", /* 16388 */ "Pegasus EDV-Betreuungs-GmbH", /* 16389 */ "VineSys Technology", /* 16390 */ "RouteOne", /* 16391 */ "Cortland Communications", /* 16392 */ "Sean Champ Enterprises", /* 16393 */ "Pentair Technical Products", /* 16394 */ "William R Sowerbutts", /* 16395 */ "justinknash.com", /* 16396 */ "U.S. Army ALTESS", /* 16397 */ "Metallect Corp.", /* 16398 */ "Greyhavens", /* 16399 */ "Singapore Telecommunication Limited", /* 16400 */ "Hewlett-Packard Slovakia", /* 16401 */ "Teleformix, LLC", /* 16402 */ "Brobus International, Inc.", /* 16403 */ "NeuralWorx", /* 16404 */ "CPEG.Net", /* 16405 */ "ADWIN", /* 16406 */ "Lanux Limited", /* 16407 */ "Leo Consulting", /* 16408 */ "Futuri Ltd", /* 16409 */ "NEC COMPUTERS INTERNATIONAL B.V.", /* 16410 */ "Indicia Nederland bv", /* 16411 */ "Home Health Corporation of America", /* 16412 */ "rahbany.com", /* 16413 */ "itsanaddiction.org", /* 16414 */ "B.Bradenahl & H.Eggers", /* 16415 */ "REAL DATA S.C.", /* 16416 */ "TMC HealthCare", /* 16417 */ "ULYSSIS", /* 16418 */ "PINBOARD", /* 16419 */ "SRA International", /* 16420 */ "Christian Albrechts Universitaet", /* 16421 */ "MUMPK limited partnership", /* 16422 */ "ABACUS Research AG", /* 16423 */ "Alanta", /* 16424 */ "City Utilities of Springfield MO", /* 16425 */ "Lawrence Technological University", /* 16426 */ "Internet Access Facilities BV", /* 16427 */ "Dial Assurance, Inc.", /* 16428 */ "Lindorff Holding AS", /* 16429 */ "Mutiny Limited", /* 16430 */ "Engineering.MO S.p.A.", /* 16431 */ "PKI Innovations Inc.", /* 16432 */ "Moorehead Communications", /* 16433 */ "Jenzabar, Inc", /* 16434 */ "Clearswift Corporation", /* 16435 */ "Bookham Inc.", /* 16436 */ "Bart", /* 16437 */ "Kansas Information Consortium", /* 16438 */ "PNX Pty Ltd", /* 16439 */ "netINS, Inc.", /* 16440 */ "ENST", /* 16441 */ "ProActive A/S", /* 16442 */ "P&O Nedlloyd Limited", /* 16443 */ "UPTI", /* 16444 */ "Kineto Wireless", /* 16445 */ "Adlink", /* 16446 */ "epix Internet Services", /* 16447 */ "Neogate Co., Ltd", /* 16448 */ "Charcoal Generation Limited", /* 16449 */ "IT-Concepts GmbH", /* 16450 */ "SMC Pneumatics (N.Z.) Limited", /* 16451 */ "Infocomp Pty Ltd", /* 16452 */ "Beijing Municipal Local Taxation Bureau", /* 16453 */ "AXWAY", /* 16454 */ "DFS Deutsche Flugsicherung GmbH", /* 16455 */ "GPL Eletro Eletronica S/A", /* 16456 */ "Opera Logic, Inc.", /* 16457 */ "Gemini Mobile Technologies, Inc.", /* 16458 */ "Epygi Technologies Ltd.", /* 16459 */ "Convertronic GmbH", /* 16460 */ "Eurofluxo-Suporte a Novas Tecnologias, Lda.", /* 16461 */ "JAVCO Consulting", /* 16462 */ "Metavante Corporation", /* 16463 */ "Pangolin Software Industries Ltd", /* 16464 */ "State College Area School District", /* 16465 */ "Sonartech Atlas Pty Ltd", /* 16466 */ "Gigaworks", /* 16467 */ "Deriva GmbH", /* 16468 */ "Coastal Wave Internet", /* 16469 */ "KEBA AG", /* 16470 */ "SCAN ASSOCIATES SDN BHD", /* 16471 */ "QMedit", /* 16472 */ "Terranet Ltd.", /* 16473 */ "mencial", /* 16474 */ "Hays IMS", /* 16475 */ "awsys gmbh", /* 16476 */ "SYSLINE S.p.A.", /* 16477 */ "eiwei Training & Consulting", /* 16478 */ "P4 Tecnologia Ltda.", /* 16479 */ "Ministry of Transportation of Ontario", /* 16480 */ "JOutfitters LLC", /* 16481 */ "Old Dominion University", /* 16482 */ "Pure Networks", /* 16483 */ "Gavin Newman", /* 16484 */ "Advanced Multifake Systems", /* 16485 */ "Dauphin MultiMedia", /* 16486 */ "THALES NL", /* 16487 */ "Electralink Ltd", /* 16488 */ "The Hanover Company", /* 16489 */ "Sentryware", /* 16490 */ "INMETRICS LTDA - EPP", /* 16491 */ "Scitor Corporation", /* 16492 */ "AutoCell Laboratories, Inc.", /* 16493 */ "MassMutual", /* 16494 */ "iafrica.com", /* 16495 */ "ACU-RITE COMPANIES INC.", /* 16496 */ "Repsol Exploracion", /* 16497 */ "MEDIUM SOFT a.s.", /* 16498 */ "Graburn Technology", /* 16499 */ "S.W.A.C. GmbH", /* 16500 */ "S&H Greenpoints", /* 16501 */ "LGB PhOeNiX", /* 16502 */ "Prairie Fire Internet Technologies", /* 16503 */ "SindhSoft", /* 16504 */ "TeamStaff Inc", /* 16505 */ "NeXtorage, Inc.", /* 16506 */ "Evanz Enterprises", /* 16507 */ "Progel srl", /* 16508 */ "Association des Medecins de Saint-Hilaire", /* 16509 */ "The Pepsi Bottling Group", /* 16510 */ "Sentor Managed Security Services AB", /* 16511 */ "Medienzentrum Osnabrueck", /* 16512 */ "Monaco Interactive", /* 16513 */ "UUNET SA", /* 16514 */ "GRNET S.A.", /* 16515 */ "elipsan", /* 16516 */ "Partners HealthCare System Inc.", /* 16517 */ "New Particles Corporation", /* 16518 */ "Microdasys Inc.", /* 16519 */ "pg-cs", /* 16520 */ "Pronto Networks", /* 16521 */ "Telefonica Publicidad e Informacion S.A.", /* 16522 */ "Eric Yeo", /* 16523 */ "Morty Abzug", /* 16524 */ "Unicorn", /* 16525 */ "KYA group", /* 16526 */ "Internet Pictures Corporation", /* 16527 */ "Leadtek Research Inc.", /* 16528 */ "HCL Infosystems Limited", /* 16529 */ "Exalt Technologies", /* 16530 */ "brico dépot", /* 16531 */ "Sparda-Datenverarbeitung eG", /* 16532 */ "Consejo General de la Abogacia Española", /* 16533 */ "Mycom International", /* 16534 */ "BitBand Technologies Ltd.", /* 16535 */ "Tiscali UK", /* 16536 */ "Wireless Data Services", /* 16537 */ "Progressive Electrical Services, Inc.", /* 16538 */ "Graber Enterprises, Inc.", /* 16539 */ "E.D.S. Pubblica Amministrazione S.p.A.", /* 16540 */ "Wapiti Regional Library", /* 16541 */ "Harley Systems", /* 16542 */ "Standard Bank of South Africa", /* 16543 */ "LEASFINANZ AG", /* 16544 */ "Cardservice International", /* 16545 */ "BBHK", /* 16546 */ "Alixen", /* 16547 */ "Fachschaft Elektrotechnik und Informationstechnik", /* 16548 */ "Giddens Industries Inc", /* 16549 */ "Masters of Branding", /* 16550 */ "ComQuest Tecnologia", /* 16551 */ "Clear Communications Corporation", /* 16552 */ "MediaWorlds", /* 16553 */ "MDS Reprocessing", /* 16554 */ "Vassar College", /* 16555 */ "www.schenkman.com", /* 16556 */ "IRT Electronics Pty Ltd", /* 16557 */ "Jiangsu Yitong High-tech Co.,Ltd.", /* 16558 */ "ALOC Bonnier A/S", /* 16559 */ "Dr. Töpper Datentechnik", /* 16560 */ "Sandar TeleCast AS", /* 16561 */ "DePaul University", /* 16562 */ "InterSystems", /* 16563 */ "EVERSTREAM, INC.", /* 16564 */ "Pine Digital Security", /* 16565 */ "R.T. Shin and Associates", /* 16566 */ "University of Belize", /* 16567 */ "FUKKEN CO.,LTD.", /* 16568 */ "RealVision Inc.", /* 16569 */ "linux-at-work.de", /* 16570 */ "Hungarian Telekom Plc.", /* 16571 */ "Centro Tecnico per la Rete Unitaria della Pubblica Amministrazione", /* 16572 */ "ICP Europe PLC", /* 16573 */ "Ontario Systems", /* 16574 */ "Oops Org", /* 16575 */ "Novso", /* 16576 */ "Virtual Targets Center", /* 16577 */ "geos", /* 16578 */ "meurisse", /* 16579 */ "Swiftel Communications", /* 16580 */ "SIIG", /* 16581 */ "BOC ONCOLOGY CENTER", /* 16582 */ "NET6a", /* 16583 */ "EVPU a.s.", /* 16584 */ "ISOLUTION S.C.", /* 16585 */ "Pallas Athena B.V.", /* 16586 */ "Global Locate, Inc", /* 16587 */ "SSI Micro, Ltd.", /* 16588 */ "CNMP Networks, Inc.", /* 16589 */ "Scytl Online World Security SA", /* 16590 */ "Avtec, Inc.", /* 16591 */ "Laboratory Automation Inc.", /* 16592 */ "STIXO", /* 16593 */ "EmbTek", /* 16594 */ "RE-Design", /* 16595 */ "TrendDiscovery Corporation", /* 16596 */ "Landala Nät AB", /* 16597 */ "Ton- und Studiotechnik GmbH", /* 16598 */ "VasSol, Inc.", /* 16599 */ "Marketing Resources, Inc.", /* 16600 */ "Intrex", /* 16601 */ "IT-Vision AG", /* 16602 */ "AirMagnet, Inc.", /* 16603 */ "The OpenSSL group", /* 16604 */ "Radiance BBS", /* 16605 */ "DELFI", /* 16606 */ "Distra Pty Ltd", /* 16607 */ "Tottori SANYO Electric Co.,Ltd.", /* 16608 */ "Phalanyx", /* 16609 */ "Telemedia Software Corp.", /* 16610 */ "QNET", /* 16611 */ "Zenon GmbH", /* 16612 */ "Cross", /* 16613 */ "Genome Sequencing Center", /* 16614 */ "Entrada Software, Inc.", /* 16615 */ "DiscipleMakers, Inc.", /* 16616 */ "Merlin Aviation Systems Ltd.", /* 16617 */ "SAITC", /* 16618 */ "Bandspeed, Inc.", /* 16619 */ "Bugalux Denmark A/S", /* 16620 */ "Computer Care, Inc.", /* 16621 */ "IntelligentAgents", /* 16622 */ "Mobile Broadcasting Corporation", /* 16623 */ "Planetactive GmbH", /* 16624 */ "Ocado Limited", /* 16625 */ "Norkom Technologies Ltd.", /* 16626 */ "Chang Industry, Inc.", /* 16627 */ "pdxcolo.net", /* 16628 */ "Certeon Inc", /* 16629 */ "IntellAgent GmbH", /* 16630 */ "Bermuda Holding", /* 16631 */ "Seton Hall University", /* 16632 */ "Danamis Associates", /* 16633 */ "VoxAge Teleinformatica Ltda", /* 16634 */ "S-FRiENdS", /* 16635 */ "KTROAD, Ltd.", /* 16636 */ "SANYCOM Technology Co.,Ltd", /* 16637 */ "AVL List GmbH", /* 16638 */ "SoftSolutions!", /* 16639 */ "X.net 2000 GmbH", /* 16640 */ "International Solar Energy Society", /* 16641 */ "The Amulet Group", /* 16642 */ "EXAGO", /* 16643 */ "Xtensive", /* 16644 */ "San Joaquin Valley College, Inc.", /* 16645 */ "R. F. Systems, Inc.", /* 16646 */ "Regal CineMedia", /* 16647 */ "Centos Prime", /* 16648 */ "Softel Systems Pty Ltd", /* 16649 */ "JSC Dalcombank", /* 16650 */ "Gift of the Givers Foundation", /* 16651 */ "ThunderGeek", /* 16652 */ "Eltron", /* 16653 */ "Electralink Ltd", /* 16654 */ "Lunar Gravity Networks", /* 16655 */ "m3production", /* 16656 */ "ING Direct", /* 16657 */ "ITA Software", /* 16658 */ "Computer Science House", /* 16659 */ "DMX Technologies", /* 16660 */ "TACteam GmbH", /* 16661 */ "CFS Global Services", /* 16662 */ "Westec Holding Company Ltd", /* 16663 */ "ACI Europe Ltd", /* 16664 */ "Estonian Business School Group", /* 16665 */ "PEC Products", /* 16666 */ "Freax Sistemas", /* 16667 */ "PCI Technologies Inc", /* 16668 */ "Freeland Haynes Limited", /* 16669 */ "Action Technologies, Inc", /* 16670 */ "American Physical Society", /* 16671 */ "AirFlow Networks", /* 16672 */ "Chris Mitchell", /* 16673 */ "Voyage Data, Inc.", /* 16674 */ "Chace Community School", /* 16675 */ "Servibanca- Grupo BCP", /* 16676 */ "Centre of Medical Technology", /* 16677 */ "inX Services", /* 16678 */ "Sta Track Enterprise Limited", /* 16679 */ "Axia SuperNet Ltd", /* 16680 */ "Valid Solutions", /* 16681 */ "Xtrac Ltd", /* 16682 */ "IIT GmbH", /* 16683 */ "European Humanities University", /* 16684 */ "Optinel Systems", /* 16685 */ "Protego Networks, Inc.", /* 16686 */ "Cyantel", /* 16687 */ "InfraSec Sweden AB", /* 16688 */ "Retalix", /* 16689 */ "Small Electric Motors Ltd", /* 16690 */ "Tekron Communication Systems Inc.", /* 16691 */ "Optimal Technologies", /* 16692 */ "LongReach Telecommunications Pty Ltd", /* 16693 */ "Purple Sun", /* 16694 */ "CYGNUS MICROSYSTEMS PRIVATE LIMITED", /* 16695 */ "Decisiv Inc.", /* 16696 */ "The Free Software Initiative of Japan", /* 16697 */ "SCS Entriprise Systems", /* 16698 */ "GYL", /* 16699 */ "Southwest Airlines Co.", /* 16700 */ "Carlson Hospitality Worldwide", /* 16701 */ "Naval Research Laboratory", /* 16702 */ "University of Westminster", /* 16703 */ "Yaga, Inc.", /* 16704 */ "Loyola Marymount University", /* 16705 */ "NavinMail Services (India) pvt ltd", /* 16706 */ "Exelixis Deutschland GmbH", /* 16707 */ "Wuhan Wearnes Technology CO,.Ltd(China)", /* 16708 */ "same", /* 16709 */ "Screaming Genius Meta Labs", /* 16710 */ "basis0.net", /* 16711 */ "ILB", /* 16712 */ "FH-Rosenheim", /* 16713 */ "Gossamer Group, LLC", /* 16714 */ "TRLabs Regina", /* 16715 */ "Unisyn Software, LLC", /* 16716 */ "University of Victoria", /* 16717 */ "GMV S.A.", /* 16718 */ "SAS IRIS Technologies", /* 16719 */ "OSS Service", /* 16720 */ "Chronos Technology Ltd", /* 16721 */ "Methics Oy", /* 16722 */ "LawBase Technologies", /* 16723 */ "Fitzgerald Associates", /* 16724 */ "Itech Inc.", /* 16725 */ "Dowslake Microsystems Corporation", /* 16726 */ "THALES AVIONICS", /* 16727 */ "Wolcott Systems Group, LLC", /* 16728 */ "Midling and Associates", /* 16729 */ "Higher Ground Networks LLC", /* 16730 */ "Industrial Medium", /* 16731 */ "Guardent, Inc.", /* 16732 */ "ActiveLife Ltd.", /* 16733 */ "Orbital Data Corporation", /* 16734 */ "TechnoCom Corporation", /* 16735 */ "JavaLi Ltd.", /* 16736 */ "NeoTool Development, LLC", /* 16737 */ "InterVideo Inc.", /* 16738 */ "CompanyName", /* 16739 */ "3C Limited", /* 16740 */ "Alexander Müller Informatik", /* 16741 */ "topteam Services GmbH", /* 16742 */ "Hessische Zentrale fuer Datenverarbeitung", /* 16743 */ "BLANKOM", /* 16744 */ "Alfa-Bank OJSC", /* 16745 */ "springtimesoft LTD", /* 16746 */ "InterCommIT b.v.", /* 16747 */ "Studentska Unie CVUT", /* 16748 */ "Extensible Systems Ltd.", /* 16749 */ "Gee Broadcast Systems Ltd", /* 16750 */ "INSA, S.A.", /* 16751 */ "4G Consulting Ltd.", /* 16752 */ "dbNet Pty Ltd", /* 16753 */ "MERLIN, spol. s r.o.", /* 16754 */ "DanuSys, Ltd.", /* 16755 */ "Juasun.net", /* 16756 */ "IT SOFTWARE", /* 16757 */ "Lakeridge Health Corporation", /* 16758 */ "Central Missouri State University", /* 16759 */ "Internet Direct Inc.", /* 16760 */ "New Mexico Tech", /* 16761 */ "Olson Technology, Inc.", /* 16762 */ "EZ Web-Tech, Inc.", /* 16763 */ "IDD Works Inc.", /* 16764 */ "Schmitz-IT", /* 16765 */ "SV Systems", /* 16766 */ "Wonderline Rt.", /* 16767 */ "Marine Interface Inc", /* 16768 */ "SV Systems", /* 16769 */ "Dave Dodge", /* 16770 */ "7seas Solutions Ltd.", /* 16771 */ "University of California, Santa Barbara", /* 16772 */ "Sourwood Research", /* 16773 */ "4U S.r.l.", /* 16774 */ "GIP-MDS", /* 16775 */ "mmit of ECNU", /* 16776 */ "Oxance", /* 16777 */ "Uniteam Init", /* 16778 */ "More-Secure B.V.", /* 16779 */ "Pathway Computing, Inc", /* 16780 */ "WASP Systems Inc.", /* 16781 */ "ClickCadence, LLC.", /* 16782 */ "Abacus Technical Services", /* 16783 */ "Olson Technology, Inc.", /* 16784 */ "Medizinische Universität Wien", /* 16785 */ "Eosys srl", /* 16786 */ "T-Systems Nova International GmbH", /* 16787 */ "Information Technology Center (KYTP), Aristotle Univ. of Thessaloniki GREECE", /* 16788 */ "Berklee College of Music", /* 16789 */ "Myrio Corporation", /* 16790 */ "BRASCON", /* 16791 */ "Zapata Engineering, P.A.", /* 16792 */ "University of New England", /* 16793 */ "Savant Technologies Private Ltd", /* 16794 */ "MRO - TEK LIMITED", /* 16795 */ "Institute of High Energy Physics ,Beijing,China", /* 16796 */ "InfoThuis Nieuwe Media BV", /* 16797 */ "Digital Technical Ltd., National Libaray of China", /* 16798 */ "XL Global Services Ltd.", /* 16799 */ "IDYLIC", /* 16800 */ "Open Pricer", /* 16801 */ "i2Q Ltd", /* 16802 */ "Tetra Pak Information Management AB", /* 16803 */ "netcadabra", /* 16804 */ "Validus Medical Systems, Inc", /* 16805 */ "Dot New Media Ltd", /* 16806 */ "Millennium Digital Media", /* 16807 */ "hambrecht.org", /* 16808 */ "Payless Shoesource, Inc", /* 16809 */ "Along Software Developer WorkShop", /* 16810 */ "BlueTie, Inc.", /* 16811 */ "UnixIron", /* 16812 */ "Micronet Communications,INC.", /* 16813 */ "Quinsy B.V.", /* 16814 */ "GlidePath BV", /* 16815 */ "Computer Plus GmbH", /* 16816 */ "De La Rue International Ltd", /* 16817 */ "United Media Company GmbH", /* 16818 */ "Priocom Corp.", /* 16819 */ "SOC", /* 16820 */ "Institute for Advanced Study", /* 16821 */ "Scott L. H. Yuan", /* 16822 */ "Abeling-IT-Design", /* 16823 */ "OTAGAKI", /* 16824 */ "Network Technology", /* 16825 */ "Innomedia Technologies Private Limited", /* 16826 */ "Secure Systems Ltd.", /* 16827 */ "IntelSoft Ltd.", /* 16828 */ "DuckCorp", /* 16829 */ "Fidelity Information Services", /* 16830 */ "benhall.ca", /* 16831 */ "Auchan", /* 16832 */ "Logicworks Inc.", /* 16833 */ "Hospital Billing Collection Service, Ltd. (HBCS)", /* 16834 */ "Dahle Consulting", /* 16835 */ "M2Studio Ltd.", /* 16836 */ "Washington County", /* 16837 */ "Omron Corporation", /* 16838 */ "Rodion Software", /* 16839 */ "Shanghai E-Rom Communication Technology Co.,Ltd", /* 16840 */ "Ifeelnet", /* 16841 */ "In Phase Consulting", /* 16842 */ "BarcoVision", /* 16843 */ "CreaCare GmbH", /* 16844 */ "Electricité de France - Gaz de France", /* 16845 */ "MPEC Wroclaw S.A.", /* 16846 */ "Sakura Network Japan", /* 16847 */ "Independent Consulting Solutions Ltd.", /* 16848 */ "BeyondData.net ITS", /* 16849 */ "13 Colonies Software", /* 16850 */ "rheingold Institut für qualitative Markt- und Medienanalysen Gesellschaft bürgerlichen Rechts", /* 16851 */ "Telinfos", /* 16852 */ "barracuda digitale agentur GmbH", /* 16853 */ "STI Healthcare, Inc.", /* 16854 */ "Metromorph Softworks Ruhri/List GbR", /* 16855 */ "Bradford Software Inc.", /* 16856 */ "3 Bean", /* 16857 */ "Tall Maple Systems, Inc.", /* 16858 */ "Multimedia Games, Inc.", /* 16859 */ "Thomas Endo", /* 16860 */ "Wefi.Net IT Consulting", /* 16861 */ "ICONZ Ltd", /* 16862 */ "JSR.COM", /* 16863 */ "{M:U} Consulting", /* 16864 */ "ZIM Technologies International Inc.", /* 16865 */ "Software North, Inc.", /* 16866 */ "TIBCO Software, Inc. DSPG", /* 16867 */ "Conseil Internet & Logiciels Libres, Jérôme Alet", /* 16868 */ "ROMmon Ltd", /* 16869 */ "Banco do Estado do Rio Grande do Sul,S.A.", /* 16870 */ "Tchibo Frisch-Röst-Kaffee GmbH", /* 16871 */ "Collaborative Commerce Engines", /* 16872 */ "future gate group", /* 16873 */ "HiTRUST Incorporated", /* 16874 */ "Computer Plus GmbH", /* 16875 */ "KungFoo Coders", /* 16876 */ "All Media Banking BV", /* 16877 */ "Oldham Metropolitan Borough Council", /* 16878 */ "SCA Transforest AB", /* 16879 */ "zehome.com", /* 16880 */ "emni GmbH", /* 16881 */ "OpenEAI Software Foundation", /* 16882 */ "GKB Technology Co., Ltd", /* 16883 */ "(IPL) Instituto Politécnico de Lisboa", /* 16884 */ "Nortel Networks", /* 16885 */ "Revelstone Technology", /* 16886 */ "IPLocks Inc.", /* 16887 */ "Neutelligent.com", /* 16888 */ "MYIT.BIZ, Inc.", /* 16889 */ "Technisys", /* 16890 */ "Meta GmbH", /* 16891 */ "Signalisation Ver-Mac, Inc.", /* 16892 */ "Enterprise Rent-A-Car", /* 16893 */ "Cotelligent, Inc", /* 16894 */ "J.P. Evans, Inc.", /* 16895 */ "SUNGARD Front Office Solutions", /* 16896 */ "sdata - C. Splittgerber Datentechnik", /* 16897 */ "Venture Industry International Corp.", /* 16898 */ "Corvigo, Inc.", /* 16899 */ "a metareal material", /* 16900 */ "Mojo Networks, Inc.", /* 16901 */ "APPLETZ CO., LTD.", /* 16902 */ "TeleCats BV", /* 16903 */ "Aylesford Newsprint Limited", /* 16904 */ "Ginger Alliance Ltd.", /* 16905 */ "Enertron LLC", /* 16906 */ "Truman State University", /* 16907 */ "Binary Ape", /* 16908 */ "Newberg Public Schools", /* 16909 */ "chinaunionpay", /* 16910 */ "General Wireless Scandinavia AB", /* 16911 */ "Bundesanstalt Statistik Oesterreich", /* 16912 */ "Open Network Solutions, Inc", /* 16913 */ "nuit.ca", /* 16914 */ "The Hal Lewis Group, Inc.", /* 16915 */ "ma-planete", /* 16916 */ "Seecago", /* 16917 */ "AEIIE - ARISE", /* 16918 */ "Augsburger Computer Forum e.V.", /* 16919 */ "ARTE G.E.I.E", /* 16920 */ "HWACOM SYSTEMS INC.", /* 16921 */ "ville d'Echirolles", /* 16922 */ "RTV Slovenija, Javni zavod", /* 16923 */ "British Sky Broadcasting Ltd", /* 16924 */ "IGA-PEGASE", /* 16925 */ "Systemberatung Axel Dunkel GmbH", /* 16926 */ "MLB Associates", /* 16927 */ "Mark South West", /* 16928 */ "University of California, Merced", /* 16929 */ "CAM Security and Connections B.V.", /* 16930 */ "Sandwell Technologies, Inc.", /* 16931 */ "DICOM Group", /* 16932 */ "ALC Computertechnik GmbH", /* 16933 */ "Marian Bracinik", /* 16934 */ "Espoo-Vantaa Institute of Technology", /* 16935 */ "Databay AG", /* 16936 */ "e-Wriedt", /* 16937 */ "Sensational AG", /* 16938 */ "Addix Internet Services GmbH", /* 16939 */ "CryptoGram SA", /* 16940 */ "Oakley, Inc.", /* 16941 */ "TRX", /* 16942 */ "Overture Networks, Inc.", /* 16943 */ "Seven Blades", /* 16944 */ "Grupo de Usuarios de Linux de Canarias", /* 16945 */ "Litchfield Communications, Inc.", /* 16946 */ "Program Line", /* 16947 */ "RHODITECH", /* 16948 */ "Mobifon S.A.", /* 16949 */ "AOM Active Online Marketing GmbH", /* 16950 */ "COGEMA LA HAGUE", /* 16951 */ "Eisodus Networks Pvt. Ltd", /* 16952 */ "TECCO Software Entwicklung AG", /* 16953 */ "Software Poetry, Inc.", /* 16954 */ "modulus-systems GmbH & Co. KG", /* 16955 */ "InboxCop, Inc.", /* 16956 */ "FioNet Internet Services", /* 16957 */ "Instituto Tecnológico y de Energías Renovables, S.A.", /* 16958 */ "Cipher Security Services, Inc.", /* 16959 */ "Darron Nesbitt", /* 16960 */ "Vaisala", /* 16961 */ "Seven Levels Consultants AB", /* 16962 */ "Intuwave Ltd.", /* 16963 */ "nonap", /* 16964 */ "AUNA TLC", /* 16965 */ "Kiff Analytical, LLC", /* 16966 */ "University Texas Medical Branch Galveston", /* 16967 */ "Magnifire", /* 16968 */ "eyebits studios", /* 16969 */ "Coublis Ltd", /* 16970 */ "Lemche Net", /* 16971 */ "DSL Terminal Remote Management Alliance", /* 16972 */ "CITS Group Inc.", /* 16973 */ "WORLDMINGO", /* 16974 */ "Horst Thiele - Maschinenbau - Hydraulische Geraete GmbH", /* 16975 */ "S.I.D.E. Resources & Development", /* 16976 */ "Zwi1zek Bankow Polskich", /* 16977 */ "Medical Insight A/S", /* 16978 */ "M2 Ingenierie et Conseil SARL", /* 16979 */ "Jacob & Sundstrom, Inc.", /* 16980 */ "ITG Inc.", /* 16981 */ "Masaryk University", /* 16982 */ "CINECA", /* 16983 */ "Exacore Consolidated Systems", /* 16984 */ "Global Technology Co.,Ltd.", /* 16985 */ "FACTOR SPE", /* 16986 */ "Esker SA", /* 16987 */ "The Manufacturers Life Insurance Company", /* 16988 */ "KiSP, Inc.", /* 16989 */ "Print Inc.", /* 16990 */ "Starsoft", /* 16991 */ "The Halifax Herald Limited", /* 16992 */ "Norsec", /* 16993 */ "Key Circle", /* 16994 */ "elego Software Solutions GmbH", /* 16995 */ "Aboriginal Sports and Recreation Association of BC", /* 16996 */ "Innovative Consultants, LLC", /* 16997 */ "Intoto Inc.", /* 16998 */ "Cortinovis S.A.", /* 16999 */ "Centre de Telecomunicacions i TI de la Generalitat de Catalunya", /* 17000 */ "Act Technology Co.,Ltd.", /* 17001 */ "Copsey Communications Projects", /* 17002 */ "University Of Dundee", /* 17003 */ "Israel InterUniversity Computation Center", /* 17004 */ "Mangrove Systems, Inc.", /* 17005 */ "Spherion", /* 17006 */ "Cool IT", /* 17007 */ "Clever Age SARL", /* 17008 */ "imove", /* 17009 */ "hopecom optic communication Ltd.", /* 17010 */ "Metadata Systems, Inc.", /* 17011 */ "eCareme Technologies, Inc.", /* 17012 */ "Guaranty Technology Corp.", /* 17013 */ "Izumi Cyber Networks Inc.", /* 17014 */ "manage.it GmbH & Co. KG", /* 17015 */ "Info Jure Knowledge Ltd.", /* 17016 */ "CyberTech de Colombia Ltd.", /* 17017 */ "Silikone.com", /* 17018 */ "Heinrich Berndes Haushaltstechnik GmbH&Co. KG", /* 17019 */ "IRSN", /* 17020 */ "University of Central Florida", /* 17021 */ "Avista Labs Inc.", /* 17022 */ "Apptera", /* 17023 */ "Jackson Local School District", /* 17024 */ "Rether Networks Inc.", /* 17025 */ "dotNSF, Inc.", /* 17026 */ "YAAO", /* 17027 */ "MarketXS.com BV", /* 17028 */ "baumer it-services", /* 17029 */ "Velveo", /* 17030 */ "Cluster Labs GmbH", /* 17031 */ "City of Helsinki", /* 17032 */ "Medical University of South Carolina", /* 17033 */ "NHN Corp.", /* 17034 */ "Cerberian Inc", /* 17035 */ "Alisys Software S.L.", /* 17036 */ "Brannstroms Elektronik AB", /* 17037 */ "Federal State Unitary Enterprise \"Production Company 'Start'\"", /* 17038 */ "Vontu, Inc", /* 17039 */ "Integrits Corporation", /* 17040 */ "TeleDomani, Inc.", /* 17041 */ "Consultores Globales Online S.L.", /* 17042 */ "PC-Repair Aalestrup", /* 17043 */ "Red Fig Ltd", /* 17044 */ "Network Technologies Group", /* 17045 */ "ErrorNet", /* 17046 */ "Eurofresh.inc", /* 17047 */ "Ashland Inc.", /* 17048 */ "Eurospider Information Technology A.G.", /* 17049 */ "MediaSonic", /* 17050 */ "Last Minute Network Limited", /* 17051 */ "A Plus Marketing", /* 17052 */ "www.slavel.ru", /* 17053 */ "Severoceska plynarenska, a.s.", /* 17054 */ "MoshJahan Ltd", /* 17055 */ "Fusion Network Services Corp.", /* 17056 */ "Victor-Sierra", /* 17057 */ "National Radio Astronomy Observatory", /* 17058 */ "Cookingwise", /* 17059 */ "zetein.net", /* 17060 */ "Shanghai 4U Network Tech.Co.,Ltd.", /* 17061 */ "ArielServices", /* 17062 */ "Lightship Telecom, LLC", /* 17063 */ "CSX Technologies", /* 17064 */ "Zions Bancorporation", /* 17065 */ "Collaboratech, Inc.", /* 17066 */ "Padimax Limited", /* 17067 */ "Jcast Networks Corp.", /* 17068 */ "Leucotron Equipamentos Ltda.", /* 17069 */ "Hi De Ho", /* 17070 */ "Prime Electronics & Satellitics Inc.", /* 17071 */ "Transgate", /* 17072 */ "Universitaetsklinikum Freiburg", /* 17073 */ "Senatsverwaltung fuer Gesundheit, Soziales und Verbraucherschutz Berlin", /* 17074 */ "Edwin L. Cox School of Business", /* 17075 */ "EXCELLENCE High Tech - Georgia LTD.", /* 17076 */ "Girit Projects Inc.", /* 17077 */ "Innovation Software Group, LLC", /* 17078 */ "AppIQ, Inc.", /* 17079 */ "BeTrained, Baumgartner KEG", /* 17080 */ "M.F. van Loon", /* 17081 */ "Oregon University System", /* 17082 */ "COMPART MEDICAL SYSTEMS", /* 17083 */ "HON HAI PRECISION IND. CO., LTD.", /* 17084 */ "Beijing BU Telecom Tech co.,Ltd", /* 17085 */ "BIK Aschpurwis + Behrens GmbH", /* 17086 */ "GrECo International AG", /* 17087 */ "sichuan wisesoft Ltd.", /* 17088 */ "Universität Paderborn, Zentrum IT-Dienste", /* 17089 */ "Packetizer, Inc.", /* 17090 */ "Ciphire Labs", /* 17091 */ "MediaRing Limited", /* 17092 */ "Ellemedia Technologies Ltd.", /* 17093 */ "Blueslice Networks Inc.", /* 17094 */ "Microchip Technology Inc.", /* 17095 */ "Invesco Institutional, Fixed Income Group", /* 17096 */ "Weltek Technologies Co., Ltd.", /* 17097 */ "Innomenta GmbH & Co. KG", /* 17098 */ "TellusTech Ltd.", /* 17099 */ "Fabasoft R&D Software GmbH & Co KG", /* 17100 */ "InternetNu", /* 17101 */ "Bororos", /* 17102 */ "Biznet Information Systems and Consultancy", /* 17103 */ "1-800 Communications, Inc.", /* 17104 */ "Insignia Solutions", /* 17105 */ "GlobNIX", /* 17106 */ "The Konopka Corporation", /* 17107 */ "Vinci Systems, Inc.", /* 17108 */ "Chotaro Co.", /* 17109 */ "Institut de Recherche pour le Développement (IRD)", /* 17110 */ "JMSE", /* 17111 */ "Axstone Co., Ltd.", /* 17112 */ "EvoNet Computer Network Evolution GmbH", /* 17113 */ "Keyrus S.A.", /* 17114 */ "D-APP-X Corporation", /* 17115 */ "GMA COMMUNICATION MANUFACTURING & MARKETING 1991 LTD.", /* 17116 */ "Advantage Sales & Marketing", /* 17117 */ "Byram Healthcare Centers, Inc.", /* 17118 */ "OctetString, Inc", /* 17119 */ "Team Cool Networks", /* 17120 */ "Geronimo Group Inc.", /* 17121 */ "Apogent Technologies Inc.", /* 17122 */ "Tavata Software Corporation", /* 17123 */ "Psycat Group", /* 17124 */ "Eze Castle Integration, Inc.", /* 17125 */ "Nova Engineering, Inc.", /* 17126 */ "Kilowatt Networking, Inc.", /* 17127 */ "mg2.org", /* 17128 */ "Zaclick Co.,Ltd", /* 17129 */ "antiquity books", /* 17130 */ "Rectifier Technologies Pacific Pty Ltd", /* 17131 */ "Shanghai Dare Opto-electronic Communication Co.,Ltd", /* 17132 */ "ILWOO DATA & TECHNOLOGY Co.,LTD", /* 17133 */ "Good Health Network, Inc", /* 17134 */ "Raaijmakers", /* 17135 */ "PLG AG", /* 17136 */ "GradSoft Ltd.", /* 17137 */ "INHOLLAND Universities", /* 17138 */ "Internet Gold", /* 17139 */ "Versatel Nederland B.V.", /* 17140 */ "Incenti S.A.", /* 17141 */ "Static Bytes", /* 17142 */ "Georg-Hewegh-Oberschule", /* 17143 */ "State University of New York at Stony Brook", /* 17144 */ "Rusch Consultancy B.V.", /* 17145 */ "UVHC", /* 17146 */ "Eastern Illinois University", /* 17147 */ "iBurst Forum", /* 17148 */ "Lodestar Technology Ltd", /* 17149 */ "simatika", /* 17150 */ "COGNICA Ltd", /* 17151 */ "creamen", /* 17152 */ "University of Connecticut", /* 17153 */ "Kittredge Archery Co. Inc.", /* 17154 */ "VoiceAge Corporation", /* 17155 */ "Zone Labs, Inc", /* 17156 */ "Chengdu Runwang Tchnology Co. LTD", /* 17157 */ "Laurasia Computing", /* 17158 */ "Henri Maire SA", /* 17159 */ "Lund University Hospital", /* 17160 */ "Covisint LLC", /* 17161 */ "Airversal Technology Inc", /* 17162 */ "Riverbed Technology, Inc.", /* 17163 */ "Callcast, Inc.", /* 17164 */ "Advantest R&D Center, Inc.", /* 17165 */ "Louisiana State University and A&M College", /* 17166 */ "Daotec Ltd.", /* 17167 */ "Century 21 Mike Bowman, Inc.", /* 17168 */ "Diablotin", /* 17169 */ "Université Henri Poincaré - Nancy 1 -", /* 17170 */ "Qindel", /* 17171 */ "Melco International Development Ltd.", /* 17172 */ "Squeeky Clean", /* 17173 */ "Iridium Systems (Hangzhou) Limited", /* 17174 */ "shanghai letel communications Co., Ltd", /* 17175 */ "Perm State Pedagogical University", /* 17176 */ "TIS Inc.", /* 17177 */ "VERA Autonoom Provinciebedrijf", /* 17178 */ "Diaz", /* 17179 */ "Altibase", /* 17180 */ "Dantek Computer Systems, Inc.", /* 17181 */ "CCC Data Oy", /* 17182 */ "Yang Mei Technology Co., LTD.", /* 17183 */ "ProLAN", /* 17184 */ "Richemont Group", /* 17185 */ "MEDIA LINKS Co.,LTD.", /* 17186 */ "Onaro Inc.", /* 17187 */ "GigaClue", /* 17188 */ "Ingrafted Software Inc.", /* 17189 */ "Fulcrum Microsystems, Inc.", /* 17190 */ "Universidad de La Laguna", /* 17191 */ "Emprisa Networks", /* 17192 */ "dbc Digital Broadcast Consulting GmbH", /* 17193 */ "Whoopy Engineering Ltd.", /* 17194 */ "Securesoft Systems, Inc.", /* 17195 */ "CacheLogic Ltd.", /* 17196 */ "Relicore, Inc.", /* 17197 */ "martinskafte.dk", /* 17198 */ "Ministry of Fisheries - NZ", /* 17199 */ "Optus Internet Engineering", /* 17200 */ "Digital Item", /* 17201 */ "NEC informatec systems,ltd.", /* 17202 */ "Pekarek Handelsges.m.b.H", /* 17203 */ "IIM CORPORATION", /* 17204 */ "ARPENT ENTERPRISES", /* 17205 */ "Open Stock Company «Oskol Electrometallurgical Kombinat»", /* 17206 */ "Cloverleaf Communications Inc.", /* 17207 */ "Fa Nea Sjöholm", /* 17208 */ "Strategic Systems Consultants Ltd.", /* 17209 */ "GZS Gesellschaft fuer Zahlungssysteme mbH", /* 17210 */ "Potronics sp. z o.o.", /* 17211 */ "AWETA b.v.", /* 17212 */ "DAY-S.COM", /* 17213 */ "Network Designers Ltd.", /* 17214 */ "Institute of Linguistic Studies", /* 17215 */ "Triplanet Partners LLC", /* 17216 */ "University of Richmond", /* 17217 */ "Union Internationale des Chemins de Fer", /* 17218 */ "NsTEL Inc.", /* 17219 */ "eBenX, Inc.", /* 17220 */ "CHBE UBC", /* 17221 */ "Sierhuis Digitale Diensten", /* 17222 */ "Cena Salvatore", /* 17223 */ "Newbury Networks", /* 17224 */ "ispi of Lincoln, Inc", /* 17225 */ "BC5 Technologies Inc.", /* 17226 */ "DMP Initiatives", /* 17227 */ "Kommando", /* 17228 */ "Miracle Group, Ltd.", /* 17229 */ "UniqMinds Ltd.", /* 17230 */ "Otto UK", /* 17231 */ "PANNOCOM Ltd.", /* 17232 */ "ICODEX Software AG", /* 17233 */ "ET Enterprise Technologies srl", /* 17234 */ "2e Systems GmbH", /* 17235 */ "Shout Telecoms Limited", /* 17236 */ "S.P.E.Sistemi e Progetti Elettronici s.a.s. di P.Prandini & C", /* 17237 */ "NsTEL Inc.", /* 17238 */ "Plan B Email Services, LLC", /* 17239 */ "Spread Teleinformática Ltda", /* 17240 */ "Federal Trade Commission", /* 17241 */ "Mission Vi", /* 17242 */ "World Access Canada Inc.", /* 17243 */ "Briteace Enterprise Pte Ltd", /* 17244 */ "Genentech, Inc.", /* 17245 */ "FreeSNMP", /* 17246 */ "SBC Internet Services", /* 17247 */ "Gemstone Communications, Inc", /* 17248 */ "VAN Company Ltd.", /* 17249 */ "Yore Elektronik Yayimcilik A.S.", /* 17250 */ "WeRMSPoWKe", /* 17251 */ "MS Global Consulting GmbH", /* 17252 */ "Arcada Polytechnic", /* 17253 */ "Goad.US", /* 17254 */ "Vidyatel Ltd.", /* 17255 */ "CL-NET s.r.o.", /* 17256 */ "Initial Security Limited", /* 17257 */ "DRQ Sp. z o.o.", /* 17258 */ "Manex", /* 17259 */ "Numinatek Co.", /* 17260 */ "RJWare, Inc", /* 17261 */ "Devonshire Group, Inc", /* 17262 */ "Alpes Team", /* 17263 */ "Mount Clemens General Hospital", /* 17264 */ "Escape OE", /* 17265 */ "California Internet Inc", /* 17266 */ "Hitachi Computer Products (Europe) S.A.S", /* 17267 */ "ABB Process Analytics", /* 17268 */ "Hansa JSC", /* 17269 */ "Comcast Corporation", /* 17270 */ "Sunshine Village Ski & Snowboard Resort", /* 17271 */ "akashic Inc.", /* 17272 */ "The Rabbithole Org.", /* 17273 */ "Nevis Networks Inc.", /* 17274 */ "MicroBit", /* 17275 */ "Colegio de Registradores de la Propiedad y Mercantiles de España", /* 17276 */ "TUI Nederland N.V.", /* 17277 */ "IZB-Soft", /* 17278 */ "Stowe Holdings (Pty) Ltd", /* 17279 */ "Fadesa Inmobiliaria", /* 17280 */ "Luther College", /* 17281 */ "Abhai Inc.", /* 17282 */ "YACME S.r.l.", /* 17283 */ "UNICOM UNIversal computer COMmunication, spol. s r.o.", /* 17284 */ "DOBS", /* 17285 */ "Steuerungs- & Netzwerktechnik", /* 17286 */ "Pacific Life", /* 17287 */ "VicSuper", /* 17288 */ "LinuxHQ", /* 17289 */ "Key Digital Solutions Ltd.", /* 17290 */ "Mithra Biodindustry Co., Ltd", /* 17291 */ "NXN Software AG", /* 17292 */ "DavidRLee", /* 17293 */ "Agile Teamwork, Inc.", /* 17294 */ "WestNoble", /* 17295 */ "Fourth Corner Systems", /* 17296 */ "Sine Nomine Associates", /* 17297 */ "BlueWater Technologies Inc", /* 17298 */ "vMoksha Technologies Private Limited", /* 17299 */ "Axxius b.v.", /* 17300 */ "AllServe Automatisering B.V.", /* 17301 */ "Iconology Ltd", /* 17302 */ "Paramount Pictures", /* 17303 */ "Layer 7 Technologies Inc.", /* 17304 */ "Aeras Networks", /* 17305 */ "Armenian e-Science Foundation (ArmeSFo)", /* 17306 */ "Tribunal Regional do Trabalho da 15ª Região", /* 17307 */ "Digimedworx", /* 17308 */ "Saudi Arabian Monetary Agency (SAMA)", /* 17309 */ "Vanquish International Ltd.", /* 17310 */ "Myllykoski Corp.", /* 17311 */ "Shizuoka System Technology", /* 17312 */ "Ratiodata GmbH", /* 17313 */ "Soltim", /* 17314 */ "EtherAddress.com", /* 17315 */ "Peoria Christian School", /* 17316 */ "MassiveEgo", /* 17317 */ "Media5 Corporation", /* 17318 */ "JC Computing", /* 17319 */ "J&M Crowther Ltd.", /* 17320 */ "Calpine", /* 17321 */ "SOFTLAND", /* 17322 */ "Datatekniska Byrån", /* 17323 */ "YDI Wireless Inc.", /* 17324 */ "Babastik", /* 17325 */ "AC Camerfirma, S.A.", /* 17326 */ "City of Northglenn", /* 17327 */ "Imenta Sweden AB", /* 17328 */ "School of Information Technology, Universiti Utara Malaysia", /* 17329 */ "Zetta Systems, Inc.", /* 17330 */ "30San Information System Co.,Ltd.", /* 17331 */ "Pete Attkins Engineering Ltd", /* 17332 */ "Critical Networks, Inc.", /* 17333 */ "DN-Solutions", /* 17334 */ "UPM-Kymmene Corporation", /* 17335 */ "Bank of Russia", /* 17336 */ "Solace Systems, Inc.", /* 17337 */ "IBS Technology & Services", /* 17338 */ "SAFA GALENICA, S.A.", /* 17339 */ "Microtest Ltd", /* 17340 */ "Fonner Consulting", /* 17341 */ "Danske Gymnasieelevers Sammenslutning", /* 17342 */ "Edula", /* 17343 */ "OFSET", /* 17344 */ "fusionOne, Inc.", /* 17345 */ "AlienForceIT", /* 17346 */ "Hilti Corporation", /* 17347 */ "USTC E-Business Technology Company", /* 17348 */ "DELTA N.V.", /* 17349 */ "OnRelay Ltd", /* 17350 */ "Simmons College", /* 17351 */ "FrancisScott Communications LLC", /* 17352 */ "VisSim AS", /* 17353 */ "Zone Trading Partners", /* 17354 */ "Cirrus Multimedia Limited", /* 17355 */ "RiskMetrics Group Inc.", /* 17356 */ "Derks.IT", /* 17357 */ "Fulford Consulting Ltd", /* 17358 */ "net9", /* 17359 */ "T&J Computer Systems", /* 17360 */ "Infoscience Corporation", /* 17361 */ "Asia Pacific Bioinformatics Network (APBioNet)", /* 17362 */ "SANYO DDP-BU", /* 17363 */ "SITELI", /* 17364 */ "SISSA - ISAS Scuola Internazionale Superiore di Studi Avanzati", /* 17365 */ "Torbay Council", /* 17366 */ "Grep AS", /* 17367 */ "PIFAUT", /* 17368 */ "sustainable development networking programme", /* 17369 */ "OnRelay Ltd", /* 17370 */ "4DotNet oHG", /* 17371 */ "iFoni Cellular Services", /* 17372 */ "IT Watchdogs, Inc.", /* 17373 */ "Clearfield Knowledge Solutions Ltd.", /* 17374 */ "Image Analysis,Inc.", /* 17375 */ "Intelcom San Marino S.p.A.", /* 17376 */ "aesys spa", /* 17377 */ "Interlink Software Services Ltd", /* 17378 */ "University of Applied Sciences Wolfenbuettel", /* 17379 */ "Spazio ZeroUno SpA", /* 17380 */ "The Kinkaid School", /* 17381 */ "VAI bv", /* 17382 */ "EASY SOFTWARE", /* 17383 */ "Contemporary Control Systems, Inc.", /* 17384 */ "Appriss, Inc", /* 17385 */ "iCanSP, inc", /* 17386 */ "Frontier Financial", /* 17387 */ "Allen Systems Group INC", /* 17388 */ "Core NAP, L.P.", /* 17389 */ "Family Video", /* 17390 */ "NOSE Applied Intelligence AG", /* 17391 */ "Abucco Technologies Inc.", /* 17392 */ "Allen Systems Group INC", /* 17393 */ "BRAINBOW EDV-Beratung GmbH", /* 17394 */ "Beijing Founder Electronic Co.,Ltd.", /* 17395 */ "Sapura Advance Systems Sdn Bhd", /* 17396 */ "BVE des Kantons Bern", /* 17397 */ "HBhard, spol. s.r.o.", /* 17398 */ "AKiT Ltd.", /* 17399 */ "tourisline AG", /* 17400 */ "Lands' End, Inc.", /* 17401 */ "Sevis Systems, Inc.", /* 17402 */ "Oklahoma Department of Career and Technology Education", /* 17403 */ "WebundCo GmbH & CoKG", /* 17404 */ "Telecommunications Industry Association TR8dot5", /* 17405 */ "HITS", /* 17406 */ "OmegaWare Systems Ltd.", /* 17407 */ "HICOM COMUNICAÇÃO INTEGRADA LTDA.", /* 17408 */ "National Standardization Committee of Radio & Television", /* 17409 */ "SOPRA GROUP", /* 17410 */ "newsky software", /* 17411 */ "GateConnect Technologies GmbH", /* 17412 */ "Ministerio del Interior - España", /* 17413 */ "vzw CDS", /* 17414 */ "PUCRS", /* 17415 */ "Root IT", /* 17416 */ "Portiva Corporation", /* 17417 */ "Mahanaxar Networks", /* 17418 */ "Lincoln Investment Planning, Inc", /* 17419 */ "DigiPower Manufacturing Inc.", /* 17420 */ "Hôpital de la ville d'Esch-sur-Alzette", /* 17421 */ "Real Enterprise Solutions Development B.V.", /* 17422 */ "Multidata Gesellschaft für Datentechnik und Informatik mbH", /* 17423 */ "Chart Pilot Ltd.", /* 17424 */ "ilink Kommunikationssysteme GmbH", /* 17425 */ "Sega.com, Inc.", /* 17426 */ "ABYZ Informática LTDA", /* 17427 */ "WebDesign BK", /* 17428 */ "Michael Telecom AG", /* 17429 */ "TCL NETWORK EQUIPMENT (SHENZEHN) CO., LTD.", /* 17430 */ "shenzhen SDG Information Co.,Ltd. STEC Telecom Branch", /* 17431 */ "Georgia Perimeter College", /* 17432 */ "pieas educational institute", /* 17433 */ "THERALYS", /* 17434 */ "BEAC", /* 17435 */ "Worlight International", /* 17436 */ "Insurance Corporation of British Columbia", /* 17437 */ "Novannet, LLC", /* 17438 */ "Panasonic Avionics Corporation", /* 17439 */ "Omnipod, Inc.", /* 17440 */ "Unholy.org", /* 17441 */ "Iter8 Inc.", /* 17442 */ "Gerd Koslowski", /* 17443 */ "wrevak.net", /* 17444 */ "FEAS v.o.f.", /* 17445 */ "Stefan Drees", /* 17446 */ "STATE MACHINE", /* 17447 */ "Fabrice Co.", /* 17448 */ "KLS Air Express Inc.", /* 17449 */ "WFW.org", /* 17450 */ "Unassigned", /* 17451 */ "Visy Industries Holdings Pty Ltd", /* 17452 */ "Billion Electric Co., Ltd.", /* 17453 */ "Integuru Inc.", /* 17454 */ "K-BEST TECHNOLOGY INC.", /* 17455 */ "Jigsaw Systems", /* 17456 */ "UTi Worldwide", /* 17457 */ "Connect Internet Solutions PTY LTD", /* 17458 */ "Mibtree Ltd", /* 17459 */ "Revelant Technologies", /* 17460 */ "Pryde Systems and Software", /* 17461 */ "Akamai Technologies, Inc.", /* 17462 */ "Demarc Security, Inc.", /* 17463 */ "O1 Communications", /* 17464 */ "TruSystems, Inc", /* 17465 */ "Wooju Communications CO.,LTD.", /* 17466 */ "Gamer's Valhalla Pty. Ltd.", /* 17467 */ "ICONAG AG", /* 17468 */ "BioWisdom Ltd.", /* 17469 */ "Strålfors AB", /* 17470 */ "Actona Technologies, Inc", /* 17471 */ "Tetraplex Ltd.", /* 17472 */ "Telluce Corporation", /* 17473 */ "CRM-Informatik GmbH", /* 17474 */ "Genetec Information Systems", /* 17475 */ "V-ONE Corporation", /* 17476 */ "Trailblazer Systems Inc.", /* 17477 */ "Nexadesic, Inc.", /* 17478 */ "One Unified", /* 17479 */ "Choice Communications", /* 17480 */ "Logic Fusion", /* 17481 */ "Ogmios.ca", /* 17482 */ "Hong Kong School Net Ltd.", /* 17483 */ "Adyoron Intelligent Systems Ltd.", /* 17484 */ "HierWeb", /* 17485 */ "EDS Deutschland GmbH", /* 17486 */ "Manchester Airport", /* 17487 */ "GENERAL TOUCH TECHNOLOGY CO.,LTD", /* 17488 */ "Curtis Consulting LLC", /* 17489 */ "DM Trucking", /* 17490 */ "Barix AG", /* 17491 */ "Northco.net", /* 17492 */ "Halliburton Company", /* 17493 */ "Matthias Rath, Inc.", /* 17494 */ "Gardel Software", /* 17495 */ "Canadian Broadcasting Corporation", /* 17496 */ "Tallinn School No. 21", /* 17497 */ "Kommunale Datenverarbeitung Oldenburg", /* 17498 */ "Packetsurge", /* 17499 */ "Georgia Gwinnett College", /* 17500 */ "Drake University", /* 17501 */ "Newfield Automation", /* 17502 */ "TechForge Software", /* 17503 */ "Security Wizard", /* 17504 */ "Wamin Optocomm Mfg.corporation", /* 17505 */ "Eulerian Technologies, Sarl", /* 17506 */ "omnidata", /* 17507 */ "Sotrange Transportes Rodoviários Ltda.", /* 17508 */ "Versatel Networks Inc.", /* 17509 */ "GoldenHope", /* 17510 */ "XtremeX Corporation", /* 17511 */ "Flinders University", /* 17512 */ "RVA", /* 17513 */ "FDF, Frivilligt Drenge- og Pige-Forbund", /* 17514 */ "BNSF Railway Inc.", /* 17515 */ "Nighthawk Radiology Services", /* 17516 */ "Clementi Software", /* 17517 */ "Comba Telecom System(Guang Zhou) Ltd.", /* 17518 */ "InteliTrac, Inc.", /* 17519 */ "Easton Technologies Inc.", /* 17520 */ "RealEast Networks", /* 17521 */ "Ozitem", /* 17522 */ "FiberLan GmbH", /* 17523 */ "Ferrari electroni AG", /* 17524 */ "Amsterdam Internet Exchange B.V.", /* 17525 */ "symentis GmbH", /* 17526 */ "FORMWARE GmbH", /* 17527 */ "KMS Internet Solution Providers Ltd", /* 17528 */ "FeldTech", /* 17529 */ "Chernigov State Technological University", /* 17530 */ "Henrico County Public Schools", /* 17531 */ "BSI Informatica Ltda", /* 17532 */ "Association KAZAR", /* 17533 */ "Optelecom Inc.", /* 17534 */ "EGT Inc.", /* 17535 */ "Telenity, Inc.", /* 17536 */ "Florence Public School District One", /* 17537 */ "Village Grille Family Diner", /* 17538 */ "MXC Software", /* 17539 */ "TB-Solutions Advanced Technologies S.L.", /* 17540 */ "Lamda Inc.", /* 17541 */ "TFS Technology Inc", /* 17542 */ "ADUNEO", /* 17543 */ "BSP Partners GmbH", /* 17544 */ "Wirefree Innovision pvt ltd", /* 17545 */ "Magno Comunicacoes Ltda.", /* 17546 */ "Centre for Good Governance", /* 17547 */ "Air2Web, Inc.", /* 17548 */ "LogicLibrary Inc.", /* 17549 */ "True Blade Systems, Inc.", /* 17550 */ "Kmart Corporation", /* 17551 */ "NKI/AvL", /* 17552 */ "Telefonica Data Colombia S.A.", /* 17553 */ "PODi - the Digital Printing initiative", /* 17554 */ "Webster University", /* 17555 */ "MAXINA GmbH", /* 17556 */ "Tokyo Woman's Christian University", /* 17557 */ "Moveo Systemy Teleinformatyczne", /* 17558 */ "The Art Institute of Chicago", /* 17559 */ "NETFORYOU CO.,LTD.", /* 17560 */ "CLink", /* 17561 */ "Expect Technology", /* 17562 */ "ENCODE SA", /* 17563 */ "www.portocervo.cc", /* 17564 */ "Rural Servicios Informáticos S. C.", /* 17565 */ "EFG EUROBANK ERGASIAS A.E.", /* 17566 */ "Certimail SA", /* 17567 */ "SLAT SA", /* 17568 */ "Schranzhofer DIAS", /* 17569 */ "IFS audiovisuals", /* 17570 */ "Glensound Electronics Ltd.", /* 17571 */ "Mainframe Oy", /* 17572 */ "Secretaria das Finanças do Estado da Paraíba", /* 17573 */ "Oxford Microsystems", /* 17574 */ "Lebenshilfe Niederoesterreich", /* 17575 */ "mahalingam & co.", /* 17576 */ "Ralf Bisges Informationstechnik", /* 17577 */ "Berlitz International, Inc.", /* 17578 */ "Groove Media", /* 17579 */ "Telefonica Data Colombia S.A.", /* 17580 */ "Hofmann Software Engineering International", /* 17581 */ "Loran Technologie", /* 17582 */ "Information Technologies Australia Pty Ltd", /* 17583 */ "United Network Communication Corp.", /* 17584 */ "Compusys", /* 17585 */ "BANDAI NETWORKS CO., LTD.", /* 17586 */ "Laserbit Communications Corporation", /* 17587 */ "GLOBAL ELECTRICITY CO., LTD.", /* 17588 */ "AMEC SPIE Communications", /* 17589 */ "Orbis Terrarum Networks", /* 17590 */ "The Defender Association", /* 17591 */ "Javacise Software", /* 17592 */ "eath Co.,Ltd.", /* 17593 */ "Simitel S. de R.L. de C.V.", /* 17594 */ "SEU", /* 17595 */ "DigiOnline GmbH", /* 17596 */ "IntraData BV", /* 17597 */ "Jouve SI", /* 17598 */ "Northern Alberta Institute of Technology", /* 17599 */ "CHUQ", /* 17600 */ "Group One Trading, LP", /* 17601 */ "Midnight Linux", /* 17602 */ "surespeed", /* 17603 */ "ScySoft Multimedia", /* 17604 */ "Jens Bräuer", /* 17605 */ "helloWorld Inc.", /* 17606 */ "RETIA, Inc", /* 17607 */ "GIE AGORA", /* 17608 */ "AZ Mercury Ltd.", /* 17609 */ "Sadhu Software Services Pvt. Ltd.", /* 17610 */ "eXc Software, LLC", /* 17611 */ "Groupe Caisse d'Epargne", /* 17612 */ "S-Access GMBH", /* 17613 */ "Queensland Parallel Supercomputing Foundation (QPSF)", /* 17614 */ "Ashway Software", /* 17615 */ "Exclusive Flor Sales Ltd.", /* 17616 */ "MessageGate, Inc.", /* 17617 */ "Ziniti.Net", /* 17618 */ "J Enterprise BV", /* 17619 */ "Mould Industria de Matrizes Ltda", /* 17620 */ "Lightwave Access, LLC", /* 17621 */ "OpenServe", /* 17622 */ "Millersville University", /* 17623 */ "Scouting Nederland", /* 17624 */ "Brightline Technology, Inc.", /* 17625 */ "Phoenix Business Technologies Group, Inc.", /* 17626 */ "Will Systems", /* 17627 */ "Mount Hay Technology", /* 17628 */ "NISHIMU ELECTRONICS INDUSTRIES CO., LTD.", /* 17629 */ "Anana Ltd", /* 17630 */ "Oral Diagnostic Systems", /* 17631 */ "TPISACOM", /* 17632 */ "Phoenix Color Corporation", /* 17633 */ "AGB UK Limited", /* 17634 */ "DragonTail Online Security", /* 17635 */ "Novahead, Inc.", /* 17636 */ "fudo.org", /* 17637 */ "JAJOK Ltd.", /* 17638 */ "Abbeynet Srl", /* 17639 */ "Reifenberger", /* 17640 */ "Web Publications Pty Ltd", /* 17641 */ "PrintSoft Czech Republic", /* 17642 */ "Shanghai Neotune Information Technology Co.,Ltd.", /* 17643 */ "Next Generation Broadband, LLC", /* 17644 */ "CBCA, Inc.", /* 17645 */ "Contact Energy Ltd", /* 17646 */ "NTT Multimedia Communications Laboratories, Inc.", /* 17647 */ "Amat-SC, Service & Consulting", /* 17648 */ "PUMA AG", /* 17649 */ "ITSOFT", /* 17650 */ "necron-X", /* 17651 */ "McKesson IS France", /* 17652 */ "Moot Hall Holdings Limited", /* 17653 */ "Sheer Networks, Ltd.", /* 17654 */ "Epsys", /* 17655 */ "Tohoku Ricoh Co., Ltd.", /* 17656 */ "@tp-net e. K.", /* 17657 */ "Thinklogical, Inc", /* 17658 */ "The Lutheran University Association, Inc (d/b/a Valparaiso University)", /* 17659 */ "AStA Universitaet Potsdam", /* 17660 */ "Lincoln National Corporation", /* 17661 */ "Lucent EBS", /* 17662 */ "I.C.S. Industrielle Automatisierungssysteme GmbH", /* 17663 */ "Watkins Contracting", /* 17664 */ "IMAKE Software & Services", /* 17665 */ "New Jersey Hgiher Education Student Assistance Authority", /* 17666 */ "PCT-International, Inc.", /* 17667 */ "American Medical Security", /* 17668 */ "VSL Catena", /* 17669 */ "Celliance Sarl.", /* 17670 */ "PT. Mugi Rekso Abadi (Holding)", /* 17671 */ "MACH Software, Inc.", /* 17672 */ "CERT-ONERA", /* 17673 */ "VT100", /* 17674 */ "Hill McGlynn & Associates Ltd", /* 17675 */ "nextevolution AG", /* 17676 */ "Tradition Financial Services Ltd", /* 17677 */ "Open X Tecnologia da Informacao Ltda", /* 17678 */ "Chapter Eight Ltd", /* 17679 */ "Dialup USA, Inc.", /* 17680 */ "Johns Hopkins Bloomberg School of Public Health Center for Communication Programs", /* 17681 */ "BNX Systems Corporation", /* 17682 */ "Davis Polk & Wardwell", /* 17683 */ "Xi Software Ltd", /* 17684 */ "Dunes Technologies SA", /* 17685 */ "BF&M Insurance Group", /* 17686 */ "Teamwork Solutions, Inc.", /* 17687 */ "O'Farrell Community School", /* 17688 */ "TJM Computing", /* 17689 */ "The University Of Newcastle", /* 17690 */ "i-Net Device Co.Ltd.", /* 17691 */ "Torkild Lømo", /* 17692 */ "Insitut de Recherche en Communication et Cybernétique de Nantes (IRCCyN)", /* 17693 */ "Elekta", /* 17694 */ "COM.BOX WINET GmbH & Co. KG", /* 17695 */ "GAD IT fuer Banken eG", /* 17696 */ "Sanderson Townend & Gilbert Ltd", /* 17697 */ "John Lewis PLC", /* 17698 */ "Japan Control Engineering, Co., Ltd.", /* 17699 */ "PowerWallz Network Security Inc.", /* 17700 */ "BAE Systems, CNIR", /* 17701 */ "SmartPants Media, Inc.", /* 17702 */ "Rudjer Boskovic Institute", /* 17703 */ "Critical Telecom Corp.", /* 17704 */ "Sovelto Oy", /* 17705 */ "Kidery", /* 17706 */ "The Meme Factory, Inc", /* 17707 */ "sysmango.com", /* 17708 */ "Shanghai Telecommnunications Technological Research Institute", /* 17709 */ "michael j van ham", /* 17710 */ "Aisai communication technology CO.,LTD", /* 17711 */ "TB-Solutions Technologies Software S.L.", /* 17712 */ "Cambium Networks Limited", /* 17713 */ "ASM Enterprises", /* 17714 */ "Mitsukoshi Infomation Service Co.,Ltd.", /* 17715 */ "Georgia Tech Foundation", /* 17716 */ "Escription, Inc.", /* 17717 */ "Vanu, Inc.", /* 17718 */ "Noldata Ltd.", /* 17719 */ "Prompt", /* 17720 */ "AGL Resources Inc.", /* 17721 */ "STEAG GmbH", /* 17722 */ "Softel SA de CV", /* 17723 */ "SinoCDN Ltd.", /* 17724 */ "HW Termination Union", /* 17725 */ "Adva Technologies Ltd.", /* 17726 */ "Wiplug", /* 17727 */ "AboveCable, Inc.", /* 17728 */ "SPUeNTRUP Software", /* 17729 */ "RedDot Solutions AG", /* 17730 */ "CQS Technology Holdings (Pty) Ltd", /* 17731 */ "SNA lab,National Dong-Hwa university ,Hualien,Taiwan", /* 17732 */ "Delaware State University", /* 17733 */ "OC Systems, Inc.", /* 17734 */ "Quark Communications, Inc.", /* 17735 */ "Trading Metrics, Inc.", /* 17736 */ "Tablus, Inc.", /* 17737 */ "Tracey Bernath", /* 17738 */ "Embedded Technologies s.r.o.", /* 17739 */ "iSecurity Technology Limited", /* 17740 */ "Open Enterprise Systems, Ltd.", /* 17741 */ "Rootsr", /* 17742 */ "M-Web Business Solutions", /* 17743 */ "Dubex A/S", /* 17744 */ "Huntek Co., Ltd.", /* 17745 */ "By Intertrade", /* 17746 */ "Nexagent Ltd.", /* 17747 */ "Card Systems Consulting SRL", /* 17748 */ "TGC Ltd", /* 17749 */ "iTechnology GmbH", /* 17750 */ "Radio Systems Ltd.", /* 17751 */ "Instituto Atlântico", /* 17752 */ "MetroHealth Medical Center", /* 17753 */ "Alexander Pilger Consulting", /* 17754 */ "Lane Department of Computer Science and Electrical Engineering, West Virginia University", /* 17755 */ "science + computing ag", /* 17756 */ "Orthopedic Healthcare Northwest, P.C.", /* 17757 */ "Trematon UK Ltd", /* 17758 */ "Synctomi, Inc.", /* 17759 */ "Identify", /* 17760 */ "WiredPlace", /* 17761 */ "Covert Security Services Ltd", /* 17762 */ "Teske Netzwerkberatung", /* 17763 */ "Ditelco, LLC", /* 17764 */ "Tessna Private Limited", /* 17765 */ "PGP Corporation", /* 17766 */ "Schruth, LLC", /* 17767 */ "Ecobyte Limited", /* 17768 */ "Werft22 AG", /* 17769 */ "Cia Metropolitano de São Paulo - Metrô", /* 17770 */ "Lingard Knowledge Software Engineering", /* 17771 */ "Ironico Pty Ltd", /* 17772 */ "NEXCOM International Co.,LTD", /* 17773 */ "Smart Computer Systems Ltd", /* 17774 */ "INTOREL", /* 17775 */ "SIN solution", /* 17776 */ "JaserNet", /* 17777 */ "nic.at Internet Verwaltungs- und Betriebsgesellschaft m. b. H.", /* 17778 */ "Econtec GmbH", /* 17779 */ "Truman Medical Centers, Inc.", /* 17780 */ "University of Vale do Itajai - CES Sao Jose", /* 17781 */ "Michael Parker", /* 17782 */ "SeTel S.p.a.", /* 17783 */ "Mitsubishi Electric Business Systems Co.,Ltd.", /* 17784 */ "BONNA SABLA SA", /* 17785 */ "Frankendata GmbH & Co.KG", /* 17786 */ "tschaufrei", /* 17787 */ "EDAG GmbH & Co. KGaA", /* 17788 */ "sitharus.com internet services", /* 17789 */ "IPAD Owners Association", /* 17790 */ "Turoks.Net", /* 17791 */ "Billing Concepts, Inc.", /* 17792 */ "Hong Kong Broadband Network Ltd.", /* 17793 */ "EXARTECH International Corp.", /* 17794 */ "Echo Communications", /* 17795 */ "EK Technology, Ltd.", /* 17796 */ "PrimeScale AG", /* 17797 */ "Beijing Lingtu Software Co., LTD", /* 17798 */ "Eurovast Ltd.", /* 17799 */ "Telephone Company Chereda", /* 17800 */ "tarent GmbH", /* 17801 */ "Egyptian Telephone Company", /* 17802 */ "iTechnology GmbH", /* 17803 */ "Towers Perrin", /* 17804 */ "Radio UNiCC e.V.", /* 17805 */ "isw", /* 17806 */ "WELLX TELECOM S.A.", /* 17807 */ "ACTCOM - Active Communication Ltd.", /* 17808 */ "civil information security organisation", /* 17809 */ "GIE GETIMA", /* 17810 */ "Anixe Systems GmbH", /* 17811 */ "TLS-Technologie sp. z o.o.", /* 17812 */ "iVAST Inc.", /* 17813 */ "Boolean Systems, Inc.", /* 17814 */ "Pollard Banknote Ltd.", /* 17815 */ "Federated Systems Group", /* 17816 */ "Fuji Research Institute Corporation", /* 17817 */ "SAPPORO BREWERIES LTD.", /* 17818 */ "GIP RENATER", /* 17819 */ "Foresttek Networks Limited", /* 17820 */ "Tempest spol. s r.o.", /* 17821 */ "Easytouch Robert Redl KG", /* 17822 */ "Arnes - Academic and Research Network of Slovenia", /* 17823 */ "Hisense Information Technology Ltd.", /* 17824 */ "BEconnectIT GmbH", /* 17825 */ "ZerBit S.L.", /* 17826 */ "Infostar Technology", /* 17827 */ "MetaTV Inc.", /* 17828 */ "IDN Communication System Co.,Ltd", /* 17829 */ "SYRUS SYSTEMS", /* 17830 */ "TwinCats Production sprl", /* 17831 */ "Alphyra Nordic AB", /* 17832 */ "All for One Systemhaus AG", /* 17833 */ "C.N.S. Systems AB", /* 17834 */ "MATÁV Rt.", /* 17835 */ "Norbert Zänker & Kollegen", /* 17836 */ "Experimental Factory of Scientific Engineering", /* 17837 */ "JunCon", /* 17838 */ "Secureseal Systems Ltd.", /* 17839 */ "KOITO INDUSTRIES, LIMITED", /* 17840 */ "bombini.net", /* 17841 */ "Ipsum Networks, Inc.", /* 17842 */ "Concerto Software", /* 17843 */ "Orion Associates", /* 17844 */ "GeniServer Corporation", /* 17845 */ "Ocamar Technologies,Inc.", /* 17846 */ "Mermit Business Applications Oy", /* 17847 */ "Qamcom Technology AB", /* 17848 */ "Neuroimage Nord", /* 17849 */ "Groupe Danone", /* 17850 */ "SPRINGWAVE,Inc.", /* 17851 */ "The ProFTPD Project", /* 17852 */ "Heilpraktikerschule Luzern Ltd.", /* 17853 */ "Twenty First Century Communications (TFCC)", /* 17854 */ "zipRealty, Inc.", /* 17855 */ "NetNumber, Inc.", /* 17856 */ "Tiscali France", /* 17857 */ "sonik.org", /* 17858 */ "Septier Communications Ltd.", /* 17859 */ "Alembic, Inc.", /* 17860 */ "Twise Labo Inc.", /* 17861 */ "Kelly Martin", /* 17862 */ "dotOpen Pty Ltd", /* 17863 */ "Fudan GrandHorizon Information Technology, Inc.", /* 17864 */ "eValley.VS", /* 17865 */ "GPS Applications, Inc.", /* 17866 */ "C&M Fine Pack, Inc.", /* 17867 */ "Codersnetwork.co.uk", /* 17868 */ "etherstack.com", /* 17869 */ "Bradford Technology Limited", /* 17870 */ "NexGen City", /* 17871 */ "iDOC K.K.", /* 17872 */ "Gcom, Inc", /* 17873 */ "Michael F. Doyle", /* 17874 */ "Macromedia, Inc.", /* 17875 */ "Factline Webservices GmbH.", /* 17876 */ "Unassigned", /* 17877 */ "Journalistic, Inc.", /* 17878 */ "Ask Software Corporation", /* 17879 */ "Robert Kurtys", /* 17880 */ "Profil Kft", /* 17881 */ "Costco Wholesale Corp.", /* 17882 */ "CSS Versicherung", /* 17883 */ "Rocketseed", /* 17884 */ "Agarwal Associates Ltd", /* 17885 */ "bross ag", /* 17886 */ "Realtime Systems Limited", /* 17887 */ "Xor-Technologies", /* 17888 */ "Porsche Informatik GmbH", /* 17889 */ "JSC \"OSS Corporation\"", /* 17890 */ "MidAmerica Nazarene University", /* 17891 */ "Lumenaré Networks, Inc", /* 17892 */ "Cellent AG", /* 17893 */ "Airtria", /* 17894 */ "Keopsys", /* 17895 */ "TelePro C.S", /* 17896 */ "QUANTUM RADIONICS CORPORATION", /* 17897 */ "RISS (Regional Information Sharing Systems)", /* 17898 */ "mIstA Technologies", /* 17899 */ "Pivetal Ltd", /* 17900 */ "Koolspan, Inc.", /* 17901 */ "Copeland Corporation", /* 17902 */ "Grouse Media", /* 17903 */ "boros consulting gmbh", /* 17904 */ "Aktion Kritischer SchülerInnen Salzburg", /* 17905 */ "Folleville", /* 17906 */ "Kumashiro System Frontier Co., Ltd.", /* 17907 */ "Tobias Punke", /* 17908 */ "Zandar Technologies", /* 17909 */ "Meridian VAT Processing (International) Ltd", /* 17910 */ "Mountain Area Information Network", /* 17911 */ "Jugendzentrum Kirchheim", /* 17912 */ "MacShed", /* 17913 */ "Escribanía de la Fuente", /* 17914 */ "Iris Media Ltd.", /* 17915 */ "Istituto Tecnico Commerciale Cesare Battisti", /* 17916 */ "Computer-Essence", /* 17917 */ "Smart Systems Pty. Ltd.", /* 17918 */ "Light Socket, Ltd.", /* 17919 */ "C-Borne Co.,Ltd.", /* 17920 */ "HALLE-DOT-COM Germany", /* 17921 */ "PinPoint Israel Ltd.", /* 17922 */ "Tinext SA", /* 17923 */ "RatNet", /* 17924 */ "Dresdner Kleinwort Wasserstein", /* 17925 */ "Banco Nacional de Costa Rica", /* 17926 */ "Sana Security, Inc.", /* 17927 */ "siikuls incorporated", /* 17928 */ "Synthetic Networks Inc", /* 17929 */ "SAGA University", /* 17930 */ "Diligent Technologies Corporation", /* 17931 */ "ZeCo GmbH", /* 17932 */ "Compulogic Limited", /* 17933 */ "Association of Teachers and Lecturers", /* 17934 */ "Videolarm, Inc.", /* 17935 */ "Penn State Hershey Medical Center", /* 17936 */ "Lollipop Learning Ltd.", /* 17937 */ "Unassigned", /* 17938 */ "Guangdong Province Electronic Technology Research Institute", /* 17939 */ "The University of Texas at Austin", /* 17940 */ "Web Fabric LLC", /* 17941 */ "ISN, Inc. D/B/A inSolutions", /* 17942 */ "Progressix", /* 17943 */ "Subrenat Expansion S.A.", /* 17944 */ "Alpha Telecom Inc. USA", /* 17945 */ "Sinema Instruction", /* 17946 */ "Card Access Services Pty Ltd", /* 17947 */ "LV Power (2003) Ltd", /* 17948 */ "i-neda Ltd", /* 17949 */ "Endian", /* 17950 */ "Barnim.Net", /* 17951 */ "Scalent, Inc", /* 17952 */ "Advanced Clustering Technologies, Inc.", /* 17953 */ "Voicenet Cyber Cafe", /* 17954 */ "Polytron Corporation", /* 17955 */ "NetCare", /* 17956 */ "Uniwide Technologies inc.", /* 17957 */ "KAIYO DENSHI KOGYO Co., Ltd.", /* 17958 */ "Accense Technology Inc.", /* 17959 */ "ETRI", /* 17960 */ "Luottokunta", /* 17961 */ "Zandan", /* 17962 */ "CONI Servizi S.p.A.", /* 17963 */ "Mairie de Pierrefitte-sur-Seine", /* 17964 */ "mediaskill OHG", /* 17965 */ "space2go GmbH", /* 17966 */ "Qovia, Inc", /* 17967 */ "Fortress Systems, Ltd.", /* 17968 */ "OC4, LLC.", /* 17969 */ "jSNMP Enterprises", /* 17970 */ "Authenti-Corp", /* 17971 */ "IntraMeta Corporation", /* 17972 */ "Terravox Technologie Inc", /* 17973 */ "JWM3, Inc.", /* 17974 */ "World Radio Missionary Fellowship Inc.", /* 17975 */ "ISI-ESM", /* 17976 */ "Rokeby Technologies Ltd.", /* 17977 */ "Elfwerks", /* 17978 */ "HyperMedia Systems Ltd.", /* 17979 */ "Oliver Huf", /* 17980 */ "Interacct Solutions(Australia)", /* 17981 */ "Clickerty-Click Ltd", /* 17982 */ "OutPostal Corporation", /* 17983 */ "SHENZHEN COSHIP SOFTWARE CO.,LTD.", /* 17984 */ "kingsoft", /* 17985 */ "Systems Union (Shanghai) Ltd.", /* 17986 */ "Vodafone Group Services Limited", /* 17987 */ "PYLON R.I.S.C. GmbH", /* 17988 */ "petujek.net", /* 17989 */ "NEC Electronics Corporation", /* 17990 */ "Weldun, s.r.o.", /* 17991 */ "Net Direct Inc.", /* 17992 */ "Aware-Networks Ltda", /* 17993 */ "Mathematical Institute", /* 17994 */ "Asociación de Escribanos del Uruguay", /* 17995 */ "Alien Technology Corporation", /* 17996 */ "Artis Inc.", /* 17997 */ "Vordel Ltd.", /* 17998 */ "Rapsodie", /* 17999 */ "AGRICULTURAL BANK OF GREECE SA", /* 18000 */ "University of Cape Town", /* 18001 */ "Talisen Technologies", /* 18002 */ "Stichting Wireless Leiden (Foundation under Dutch Law)", /* 18003 */ "Micro Forté Pty Ltd", /* 18004 */ "K.K. Alice", /* 18005 */ "cognitas GmbH", /* 18006 */ "Phonalyse BVBA", /* 18007 */ "Fachhochschule Mannheim HS f. Technik u. Gestaltung", /* 18008 */ "Outram Research Ltd", /* 18009 */ "Eastern Washington University", /* 18010 */ "Apollo Communications, International", /* 18011 */ "connectLOGIC", /* 18012 */ "DBL Technologies, Ltd.", /* 18013 */ "Department of Electrical & Electronics Engineering", /* 18014 */ "Futarque A/S", /* 18015 */ "JBoss Group, LLC", /* 18016 */ "PUBLIC VOICE Lab - International Media Co-op", /* 18017 */ "Northwoods Catholic School", /* 18018 */ "On Q Holdings Pty Ltd", /* 18019 */ "Pacific Retail Group", /* 18020 */ "Construction Electronique et Telecommunication Internationnal", /* 18021 */ "Covaro Networks, Inc.", /* 18022 */ "Tatung Science & Technology, Inc.", /* 18023 */ "Cinergy Communications Company", /* 18024 */ "siWan GmbH & Co. KG", /* 18025 */ "Extron Electronics", /* 18026 */ "Battleaxe Technologies, Inc.", /* 18027 */ "Battleaxe Technologies, Inc.", /* 18028 */ "Sonic Foundry, Inc.", /* 18029 */ "Molecular Therapeutics, Inc.", /* 18030 */ "ATM Telecom", /* 18031 */ "matieux.net", /* 18032 */ "Viviale Ltd", /* 18033 */ "FrogNet, Inc.", /* 18034 */ "Netsolus.com Inc.", /* 18035 */ "United Telecoms Ltd", /* 18036 */ "Pramati Technologies Pvt Ltd", /* 18037 */ "Schotten & Marchart OEG", /* 18038 */ "Toyo Radiator Co., Ltd.", /* 18039 */ "H.T.T.P. Planitis Communications Ltd.", /* 18040 */ "pdv.com Beratungs-GmbH", /* 18041 */ "Meteksan Net", /* 18042 */ "FinanzIT GmbH", /* 18043 */ "Synelec Telecom Multimedia", /* 18044 */ "IMFORM GmbH", /* 18045 */ "Skellefteå kommun", /* 18046 */ "NeoLogica s.r.l.", /* 18047 */ "SunGard Futures Systems", /* 18048 */ "Pixel Power Ltd", /* 18049 */ "Enterprise Products Integration Pte Ltd", /* 18050 */ "RF Systems Nachrichtentechnik GmbH", /* 18051 */ "FachschaftsvertreterInnenversammlung", /* 18052 */ "citecs GmbH", /* 18053 */ "Tenovis GmbH & Co. KG", /* 18054 */ "Unassigned", /* 18055 */ "Pioneer Digital Technologies, Inc.", /* 18056 */ "Procondo GmbH", /* 18057 */ "Optimus Inc.", /* 18058 */ "B2SCorp", /* 18059 */ "The Apache Software Foundation", /* 18060 */ "OCEAN DEVELOPMENT", /* 18061 */ "Jo Tankers AS", /* 18062 */ "Technetix BV", /* 18063 */ "Marek Walther", /* 18064 */ "XOU Solutions Limited", /* 18065 */ "Planet Lauritsen", /* 18066 */ "PowerTech Information Systems AS", /* 18067 */ "hansmi.ch", /* 18068 */ "Fulfillment Plus", /* 18069 */ "BTI Photonic Systems", /* 18070 */ "Cendura Corporation", /* 18071 */ "R-MEDIA", /* 18072 */ "hinegardner.org", /* 18073 */ "Kass Enterprises LLC", /* 18074 */ "Combridge Medical Information Corporation", /* 18075 */ "b1n", /* 18076 */ "Acasim Technologies, Inc.", /* 18077 */ "Unassigned", /* 18078 */ "City I.T. (UK) Ltd", /* 18079 */ "BlueBoard Ltd.", /* 18080 */ "Numa Technology Inc.", /* 18081 */ "Midwest Independent Media Foundation", /* 18082 */ "European Society of Cardiology", /* 18083 */ "PharmXplorer", /* 18084 */ "Ciaolab Technologies Spa", /* 18085 */ "ProTelevision Technologies A/S", /* 18086 */ "Optare Solutions S.L.", /* 18087 */ "Jackson", /* 18088 */ "Inovis Inc.", /* 18089 */ "FrogNet, Inc.", /* 18090 */ "CaboVerde", /* 18091 */ "Ssji Networks", /* 18092 */ "K-Opticom Corporation", /* 18093 */ "Kingdom LAN Network", /* 18094 */ "Beijing Neutron TeleCOM Co. Ltd.", /* 18095 */ "Advanced Ceramics Research, Inc.", /* 18096 */ "Sevilla Project", /* 18097 */ "alexander stensrud", /* 18098 */ "Amoke Networks Pvt. Ltd.", /* 18099 */ "Descom Consulting Ltd.", /* 18100 */ "Adaptive Mobile Security Ltd.", /* 18101 */ "Leostream Corp", /* 18102 */ "Shanghai Helitech Telecommunication Co.,Ltd Neijing Technical Branch", /* 18103 */ "net-worked.co.uk", /* 18104 */ "Calyptix Security Corporation", /* 18105 */ "University of Iceland Computing Services", /* 18106 */ "EEG Enterprises, Inc.", /* 18107 */ "PingID Network, Inc.", /* 18108 */ "NeoSpire, inc.", /* 18109 */ "Speakeasy, Inc.", /* 18110 */ "A.I.C. Communications, Inc.", /* 18111 */ "oDesk Corp.", /* 18112 */ "Wanspot.com Inc.", /* 18113 */ "Twotrees Technologies, LLC", /* 18114 */ "ICRISAT", /* 18115 */ "Node Computing Solutions", /* 18116 */ "HTK NetCommunication Oy (PHNet)", /* 18117 */ "New Voice International AG", /* 18118 */ "MONOPRIX", /* 18119 */ "Hyder Consulting PLC", /* 18120 */ "ObjectSource Software GmbH", /* 18121 */ "Universidade de Sao Paulo", /* 18122 */ "Pleasant Ridge Waldorf School", /* 18123 */ "Verticon, Inc.", /* 18124 */ "End To End", /* 18125 */ "Quantum Internet Services, Inc.", /* 18126 */ "Net Consequence GbR", /* 18127 */ "Komos", /* 18128 */ "Yorkshire Building Society", /* 18129 */ "CdC-Sagax", /* 18130 */ "Echoraith", /* 18131 */ "Fundación Universidad del Norte", /* 18132 */ "Genesis Networks and Communications, Inc.", /* 18133 */ "CEPRI", /* 18134 */ "Nortel Networks Netas", /* 18135 */ "Delsyne Software srl", /* 18136 */ "Wegener Communications, Inc.", /* 18137 */ "Adwise Ltd.", /* 18138 */ "NTT FACILITIES,INC.", /* 18139 */ "PetT Luxembourg", /* 18140 */ "RRZN, Leibniz Universitaet Hannover", /* 18141 */ "Gruender-AV", /* 18142 */ "Lindenaar", /* 18143 */ "Michael Vistein", /* 18144 */ "Agricultural Mineral Prospectors Inc.", /* 18145 */ "PS Solutions Ltd.", /* 18146 */ "TerraLuna", /* 18147 */ "cool.de", /* 18148 */ "B.I. Tecnologia Ltda", /* 18149 */ "Webage", /* 18150 */ "Pflug Datentechnik", /* 18151 */ "ezGet.net", /* 18152 */ "Software Engineering GmbH", /* 18153 */ "Telnet Media Ltd", /* 18154 */ "Stilpo Laboratories", /* 18155 */ "Great Pacific Industries Inc.", /* 18156 */ "Willowglen MSC Berhad", /* 18157 */ "GATSWAY DATA COMMUNICATION TECHNOLOGY CO.,LTD.", /* 18158 */ "Accordance Systems Inc.", /* 18159 */ "SHENZHEN GBIT ELECTRONIC TECHNICAL LTD.", /* 18160 */ "iPoint Ltd.", /* 18161 */ "EYME Technologies Pvt. Ltd.", /* 18162 */ "Commit; Oy", /* 18163 */ "Office of the Prime Minister", /* 18164 */ "VB Pros Oy / RS-Solutions", /* 18165 */ "Chalmege", /* 18166 */ "Integro Networks", /* 18167 */ "Infogate-Online Ltd", /* 18168 */ "DOTFLUX", /* 18169 */ "Inno.com", /* 18170 */ "Torchbox Ltd", /* 18171 */ "AP-WDSL GbR", /* 18172 */ "Ramanam Software Distributors Private Limited", /* 18173 */ "Wisconsin Department of Justice", /* 18174 */ "Araknos Srl", /* 18175 */ "Pikeville Methodist Hospital", /* 18176 */ "INPE", /* 18177 */ "Front Range Internet, Inc.", /* 18178 */ "Quest Software, Inc.", /* 18179 */ "UNIT Ltd.", /* 18180 */ "Western Union Financial Services, Inc", /* 18181 */ "Ahold Information Services", /* 18182 */ "Systems Atlanta, Inc.", /* 18183 */ "ackrium", /* 18184 */ "Rene van Rooyen", /* 18185 */ "Awacs ltd", /* 18186 */ "Linkwise Software(Shanghai) Co.,Ltd", /* 18187 */ "Torinet", /* 18188 */ "Direction Générale des Impôts", /* 18189 */ "dabs.com PLC", /* 18190 */ "Audiovision", /* 18191 */ "eSchoolOnline", /* 18192 */ "Ruban Consulting", /* 18193 */ "Bewer-Enterprises", /* 18194 */ "Xsec Srl", /* 18195 */ "Landeszahnärztekammer Sachsen", /* 18196 */ "Sony Communication Network Corporation", /* 18197 */ "Zemilogix, LLc", /* 18198 */ "Objective Data Storage", /* 18199 */ "Software Expedition", /* 18200 */ "Bestseller A/S", /* 18201 */ "Belatronix Kommunikation & EDV", /* 18202 */ "TC Electronic A/S", /* 18203 */ "HPD Software, LLC", /* 18204 */ "Pioneer Industries, Inc.", /* 18205 */ "iVolve Pty Ltd", /* 18206 */ "ANTs software inc.", /* 18207 */ "TeleSym", /* 18208 */ "Midwest Radiology of Kentucky", /* 18209 */ "Agilis Communication Technologies Pte Ltd", /* 18210 */ "Catalina Computers & Discount", /* 18211 */ "A && L soft, s.r.o.", /* 18212 */ "Voxsant Resources, Inc.", /* 18213 */ "Olgierd Ziolko", /* 18214 */ "Metro Packet Systems, Inc.", /* 18215 */ "AnyWeb AG", /* 18216 */ "Profium OY", /* 18217 */ "DIGORA", /* 18218 */ "Salten Bredband AS", /* 18219 */ "W en J", /* 18220 */ "SY Electronics Ltd", /* 18221 */ "Hopitaux Universitaires de Strasbourg", /* 18222 */ "W-OneSys S.L.", /* 18223 */ "Dipl.-Inf. Carsten Dumke", /* 18224 */ "guenever.net", /* 18225 */ "imap4all B.V.", /* 18226 */ "OpenCA", /* 18227 */ "University Of Stuttgart", /* 18228 */ "Sonitrol Security Systems of Hartford, Inc.", /* 18229 */ "Conectium Limited", /* 18230 */ "Clear Reach Networks, Inc.", /* 18231 */ "Equipos Telemo E.T. S.A.", /* 18232 */ "HEC Montreal", /* 18233 */ "NetSrv Consulting Ltd", /* 18234 */ "Andreas Schulze", /* 18235 */ "McGill University", /* 18236 */ "IntelliVid Corporation", /* 18237 */ "SkyLink Design", /* 18238 */ "DTS, Inc.", /* 18239 */ "berger.de", /* 18240 */ "w3design", /* 18241 */ "Wyyzzk, Inc.", /* 18242 */ "G&J FOSTER TECHNOLOGIES, INC.", /* 18243 */ "Matisse Networks Inc", /* 18244 */ "Dishnet DSL Ltd.", /* 18245 */ "Degussa AG", /* 18246 */ "IT&T s.r.l.", /* 18247 */ "PaPouch elektronika", /* 18248 */ "Arcane Project", /* 18249 */ "TECHNOLOGIES RESEAUX & SOLUTIONS", /* 18250 */ "Beijing ACT Technology Co., Ltd.", /* 18251 */ "Symmetrus Systems Ltd.", /* 18252 */ "mVerify Corporation", /* 18253 */ "Mimezine", /* 18254 */ "Taller de Ideas (de C. Daniel Mojoli B.)", /* 18255 */ "Babcock & Wilcox Company (McDermott)", /* 18256 */ "KHAMSIN Security GmbH", /* 18257 */ "Binken.com", /* 18258 */ "CBTCBT Inc.", /* 18259 */ "Bandapart.Net", /* 18260 */ "TigerByte", /* 18261 */ "Technicolor Media Asset Management", /* 18262 */ "Sanders Technology & Design", /* 18263 */ "ICT Group HHW", /* 18264 */ "Kestrel Technologies, Inc.", /* 18265 */ "Dallas Genealogical Society", /* 18266 */ "NEOJAPAN, Inc.", /* 18267 */ "SkyNet Network Security System Integration co.,Ltd.", /* 18268 */ "Mapfre", /* 18269 */ "BANKSYS", /* 18270 */ "CIFOM-ESNIG", /* 18271 */ "Alerta Comunicaciones SAL", /* 18272 */ "French Senate", /* 18273 */ "Shenzhen Experiment School", /* 18274 */ "CIBERNET Corporation", /* 18275 */ "Lurcher Link", /* 18276 */ NULL, /* 18277 */ "Columbus Metropolitan Library", /* 18278 */ "Rainer Fischer, EDV-Service", /* 18279 */ "NetTempo, Inc.", /* 18280 */ "Bodacion Technologies, LLC.", /* 18281 */ "Muttsoft, Inc", /* 18282 */ "Paraxip Technologies", /* 18283 */ "EXEMYS SRL", /* 18284 */ "Vidiator Technology Inc.", /* 18285 */ "Assurent Software Inc.", /* 18286 */ "InnoPath Software", /* 18287 */ "RABA Technologies LLC", /* 18288 */ "Router Management Solutions, Inc.", /* 18289 */ "szeles tibor", /* 18290 */ "Ligfy", /* 18291 */ "Metis Oy", /* 18292 */ "Blackhawk Internet Communications Inc.", /* 18293 */ "Cambridge University Press", /* 18294 */ "Applied Software Solutions, LLC", /* 18295 */ "Emigrant Savings Bank", /* 18296 */ "Symbium Corporation", /* 18297 */ "drugref.org", /* 18298 */ "Institute for International Ecomonic and Political Studies, Russian Academy of Sciences", /* 18299 */ "Xoba Inc.", /* 18300 */ "Datacard Corporation", /* 18301 */ "Metroplex Webs", /* 18302 */ "Sollae Systems Co.,Ltd.", /* 18303 */ "Douglas Needham", /* 18304 */ "North American Astrophysical Observatory", /* 18305 */ "Sichuan e-link Co., Ltd.", /* 18306 */ "Eadiefleet Corporation", /* 18307 */ "aphona Kommunikationssysteme Entwicklungs- und VertriebsgmbH", /* 18308 */ "Einsle", /* 18309 */ "Heitec AG", /* 18310 */ "Linzies' computers", /* 18311 */ "Data Flow Systems", /* 18312 */ "Bodacion Technologies, LLC.", /* 18313 */ "Canberra Industries", /* 18314 */ "McCormick & Company, Inc.", /* 18315 */ "Ordination Med.-Rat Dr. Roesler", /* 18316 */ "Muttsoft, Inc", /* 18317 */ "Copel Telecomunicações S/A", /* 18318 */ "Asociación Nacional Ecuménica de Desarrollo", /* 18319 */ "Hydrologic Consultants, Inc of Colorado", /* 18320 */ "Universidad del Sagrado Corazon", /* 18321 */ "ITaCS GmbH", /* 18322 */ "Mindways Software, Inc.", /* 18323 */ "Press Communications P/L", /* 18324 */ "Advanced Relay Corporation", /* 18325 */ "InfoGin Ltd.", /* 18326 */ "42networks AB", /* 18327 */ "OpenMIND Networks Limited", /* 18328 */ "AMC Ltd.", /* 18329 */ "Electrobusiness Connections Inc.", /* 18330 */ "Huber S-Consulting GmbH", /* 18331 */ "ANF Autoridad de Certificación", /* 18332 */ "ANF Autoridad de Certificación", /* 18333 */ "KONICA MINOLTA HOLDINGS, INC.", /* 18334 */ "Melloul-Blamey Construction Inc.", /* 18335 */ "Computer Logix", /* 18336 */ "creedon engineering", /* 18337 */ "Centrum voor Wiskunde en Informatica", /* 18338 */ "ANF Autoridad de Certificación", /* 18339 */ "Proquest Information and Learning", /* 18340 */ "The Institute for Open Systems Technologies Pty Ltd", /* 18341 */ "CEYONIQ Technology GmbH", /* 18342 */ "Performance Solutions Limited", /* 18343 */ "Intmain.Com", /* 18344 */ "Messagesoft Inc.", /* 18345 */ "Sebastian Denef Computer Service", /* 18346 */ "MAUSER-Werke GmbH & Co. KG", /* 18347 */ "Avitech International Corp.", /* 18348 */ "Luther Seminary", /* 18349 */ "Polva Central Library", /* 18350 */ "Velare Technologies Inc.", /* 18351 */ "Sony Pictures Imageworks", /* 18352 */ "MAUSER-Werke GmbH & Co. KG", /* 18353 */ "Calyptech Pty Ltd", /* 18354 */ "Avitech International Corp.", /* 18355 */ "kevinstevens.info", /* 18356 */ "Full Frontal Ingenuity LLC", /* 18357 */ "EPITECH", /* 18358 */ "Intransa, Inc.", /* 18359 */ "INTEC Web and Genome Informatics Corporation", /* 18360 */ "A3 Security Consulting Co., Ltd.", /* 18361 */ "Hong Kong CSL Limited", /* 18362 */ "Epok, Inc.", /* 18363 */ "Nezabudka", /* 18364 */ "Konzumbank Rt.", /* 18365 */ "Applicata", /* 18366 */ "Nanoteq PTY LTD", /* 18367 */ "ComUnics Informatik GmbH", /* 18368 */ "Phoenix Zeppelin spol. s r.o.", /* 18369 */ "Internet Consult SARL", /* 18370 */ "Pickering Interfaces Ltd", /* 18371 */ "BalaBit IT Ltd.", /* 18372 */ "CSAS - Computer Systeme Arno Seidel", /* 18373 */ "Andri Saar", /* 18374 */ "Ruprecht-Karls-Universitaet Heidelberg", /* 18375 */ "ORGA Systems GmbH", /* 18376 */ "Universita` degli Studi di Trieste", /* 18377 */ "Eastern Kentucky University", /* 18378 */ "ExtraQuest, Corporation", /* 18379 */ "NEXTFOR S.A.", /* 18380 */ "Suramericana de Seguros S.A.", /* 18381 */ "Bank of Valletta plc", /* 18382 */ "Enterux Solutions", /* 18383 */ "Reflective Solutions Ltd.", /* 18384 */ "Ecki Patang Org", /* 18385 */ "oshiire", /* 18386 */ "Litrius Group", /* 18387 */ "AstraZeneca", /* 18388 */ "Old Genie Hottabych Company", /* 18389 */ "MTS S.p.A.", /* 18390 */ "Learning Objects Network Inc.", /* 18391 */ "Applied Personal Computing, Inc.", /* 18392 */ "Goblin", /* 18393 */ "Fred Chef Inc.", /* 18394 */ "vivaxis SAS", /* 18395 */ "Dassault Aviation", /* 18396 */ "InfoSys", /* 18397 */ "jMind Consulting Ltd.", /* 18398 */ "K/P Corporation", /* 18399 */ "Kommandoraden", /* 18400 */ "Xiqa Networks", /* 18401 */ "SecurityMetrics, Inc.", /* 18402 */ "City of Chicago - Office of Budget Management", /* 18403 */ "United Nations Development Programme", /* 18404 */ "Redbird Informatics, Inc.", /* 18405 */ "Internetworking Ltd.", /* 18406 */ "Transcendence.net", /* 18407 */ "Association Ohana", /* 18408 */ "Planet A.S.", /* 18409 */ "Häme Polytechnic", /* 18410 */ "DataCenterTechnologies", /* 18411 */ "Epoch Design Ltd", /* 18412 */ "EGIM", /* 18413 */ "Imaginative IT Limited", /* 18414 */ "ELM Computer Technologies Ltd.", /* 18415 */ "Victron bva", /* 18416 */ "Argon Technologies Inc.", /* 18417 */ "Endace Technology", /* 18418 */ "glaven.org", /* 18419 */ "cerebrasoft", /* 18420 */ "tetera.org", /* 18421 */ "AetherStorm.com", /* 18422 */ "NetHarmonix, Inc.", /* 18423 */ "MooreWare", /* 18424 */ "COMCO AG", /* 18425 */ NULL, /* 18426 */ "Patrick Näf", /* 18427 */ "American Registry for Internet Numbers", /* 18428 */ "IT Consulting & Education Ltd.", /* 18429 */ "GenerationE Technologies LLC", /* 18430 */ "Stmk. Krankenanstalten GesmbH", /* 18431 */ NULL, /* 18432 */ "deny all", /* 18433 */ "University of Leipzig", /* 18434 */ "Advanced Computer Systems, ACS S.P.A.", /* 18435 */ "Bell Mobility", /* 18436 */ "W.I.S.V. Christiaan Huygens", /* 18437 */ NULL, /* 18438 */ "Composite Software, Inc.", /* 18439 */ "peerix", /* 18440 */ "National Football League", /* 18441 */ "Vimatix", /* 18442 */ "Netsys.IT GbR", /* 18443 */ "Sandwich.Net Internet Services", /* 18444 */ "Datacard Corporation", /* 18445 */ "Ascendant Technologies, Inc.", /* 18446 */ "Willis Consulting", /* 18447 */ "Vanquish, Inc.", /* 18448 */ "Alexander Gretha", /* 18449 */ "SevenL Networks Inc.", /* 18450 */ "PC-Pool Physik, TU-Berlin", /* 18451 */ "Tempod", /* 18452 */ "The City Of Calgary", /* 18453 */ "OATSystems, Inc", /* 18454 */ "MEDICAL INFOMATION CO., LTD.", /* 18455 */ "NetKlass Technology Inc.", /* 18456 */ "European Directorate for the Quality of Medicines & HealthCare, Council of Europe (EDQM)", /* 18457 */ "Image Processing Techniques Ltd", /* 18458 */ "Semafor Informatik & Energie AG", /* 18459 */ "Powell Companies", /* 18460 */ "Osix Inc.", /* 18461 */ "Lifetree Convergence Ltd", /* 18462 */ "Spektar JSC", /* 18463 */ "ROMATSA R.A.", /* 18464 */ "TradeLink L.L.C.", /* 18465 */ "Aviva Communications Inc.", /* 18466 */ "AdvancePCS", /* 18467 */ "hughes network systems", /* 18468 */ "UNIS LUMIN INC.", /* 18469 */ "Ingenieurbuero Michael Kappler", /* 18470 */ "e-Scripps", /* 18471 */ "Crystal Computer Corporation (Georgia)", /* 18472 */ "Form-IT", /* 18473 */ "Etype Co.", /* 18474 */ "Research Institute of America", /* 18475 */ "Actinium Network Sdn Bhd", /* 18476 */ "Bundesministerium des Innern", /* 18477 */ "Wehay AB", /* 18478 */ "FS-VDSL", /* 18479 */ "RF-DESIGN", /* 18480 */ "Trustworx GmbH", /* 18481 */ "ARCWave Inc.", /* 18482 */ "ROMATSA R.A.", /* 18483 */ "ProcoliX", /* 18484 */ "Marietta College", /* 18485 */ "Quickshift, Inc.", /* 18486 */ "Everbank", /* 18487 */ "Interbaun Communications, Inc.", /* 18488 */ "CarrierComm, Inc.", /* 18489 */ "Bolsa Nacional de Valores", /* 18490 */ "NII Voskhod", /* 18491 */ "Tacoma, spol.s r.o.", /* 18492 */ "ProcoliX", /* 18493 */ "S.W.I.F.T. SCRL", /* 18494 */ "GRAU DATA AG", /* 18495 */ "Rolotec AG", /* 18496 */ "gec UOC Group", /* 18497 */ "A&M Consulting Co", /* 18498 */ "PD3 Tecnologia em Redes e Sistemas Digitais", /* 18499 */ "Oddpost.com", /* 18500 */ "Code Fusion cc.", /* 18501 */ "Mendel University of Agriculture and Forestry", /* 18502 */ "Intelli7 Inc.", /* 18503 */ "Brainstorm Internet", /* 18504 */ "Tele-Consulting GmbH", /* 18505 */ "CAcert Inc.", /* 18506 */ "Precise Time and Frequency, Inc.", /* 18507 */ "MURASHITA CONSTRUCTION INDUSTRY CO., LTD.", /* 18508 */ "IVK Smart Software Solutions LLC", /* 18509 */ "Reid Enterprises", /* 18510 */ "Centre Informatique Region Bruxelloise", /* 18511 */ "Schaake", /* 18512 */ "pete23.com", /* 18513 */ "BekArts International", /* 18514 */ "Nortech Management Ltd.", /* 18515 */ "Eclipse Networking Limited", /* 18516 */ "Orbit Research Ltd", /* 18517 */ "Crea d.o.o.", /* 18518 */ "Jahi Networks Inc.", /* 18519 */ "APSI Inc.", /* 18520 */ "TakeNET", /* 18521 */ "Unassigned", /* 18522 */ "Liverton Limited", /* 18523 */ "Empresa Metalúrgica Central de Acero \"José Valdes Reyes\"", /* 18524 */ "robinbowes.com", /* 18525 */ "Fisk Labs, Inc.", /* 18526 */ "Maersk Data Organisator A/S", /* 18527 */ "Cetelem", /* 18528 */ "Swisscom-Eurospot", /* 18529 */ "NightCity.net", /* 18530 */ "DecisionPoint Applications, Inc.", /* 18531 */ "The University of New Brunswick", /* 18532 */ "NTH A.G.", /* 18533 */ "MCI", /* 18534 */ "Echostar Data Services", /* 18535 */ "Oolong project", /* 18536 */ "TAM Internet service Ltd.", /* 18537 */ "R.L. Phillips, Inc.", /* 18538 */ "flagwireless.com", /* 18539 */ "Webmeesters", /* 18540 */ "Roland Baum System Consult", /* 18541 */ "Sphinx Information Technologies Inc.", /* 18542 */ "Innove Communications", /* 18543 */ "ecofinance", /* 18544 */ "Joint-stock company \"Trading System Administrator of Wholesale Electricity Market Transactions\"", /* 18545 */ "FAST Video Security AG", /* 18546 */ "Amanda Emily", /* 18547 */ "Relationalware", /* 18548 */ "Kealia Inc.", /* 18549 */ "Gemplus do Brasil", /* 18550 */ "Anders Bystrup IT", /* 18551 */ "Firevue Security Systems", /* 18552 */ "Arachne Prime Inc.", /* 18553 */ "Xenotropic Systems", /* 18554 */ "youneek organisation limited", /* 18555 */ "Zaurum ECP project", /* 18556 */ "Hurray!Solution Ltd.", /* 18557 */ "WUSHIGONG Ltd.", /* 18558 */ "Softpak International", /* 18559 */ "Makedonski Telekomunikacii, MTnet", /* 18560 */ "StarNIC", /* 18561 */ "Jazz Telecom, S.A.", /* 18562 */ "DarkPhuture Technologies, Research & Development", /* 18563 */ "BFI-Burgenland", /* 18564 */ "SCHUH-TV", /* 18565 */ "Hogeschool Gent", /* 18566 */ "Epic Systems Corporation", /* 18567 */ "Service Availability Forum", /* 18568 */ "Ensequence, Inc.", /* 18569 */ "GreenPulse Limited", /* 18570 */ "Mindhut Limited", /* 18571 */ "ORC", /* 18572 */ "Educate Inc.", /* 18573 */ "Hush Communications Canada Inc.", /* 18574 */ "Sagem Morpho, Inc.", /* 18575 */ "Typosign AG", /* 18576 */ "Contemporary Cybernetics Group, Inc.", /* 18577 */ "Eardown", /* 18578 */ "Clear Edge Networks LLC", /* 18579 */ "Whetstone Software", /* 18580 */ "SPD-Bundestagsfraktion", /* 18581 */ "Slack Ltd.", /* 18582 */ "Bit 9 Inc.", /* 18583 */ "Avanex Co.", /* 18584 */ "GuangDong Poson Company.Ltd", /* 18585 */ "bbassett.net", /* 18586 */ "Fortess Ltd.", /* 18587 */ "Mekhanika-Service, Ltd.", /* 18588 */ "GlobeTOM (Pty) Ltd", /* 18589 */ "Sterci SA", /* 18590 */ "HORUS HARDWARE S.A.", /* 18591 */ "Universita' degli Studi di Milano-Bicocca", /* 18592 */ "Ministry of Finance, Tax Administration of the Republic of Slovenia", /* 18593 */ "Globalvision Media", /* 18594 */ "Berufsbildende Schulen I - Uelzen", /* 18595 */ "Professional Computers Services Organization", /* 18596 */ "HELIOS Software GmbH", /* 18597 */ "Firebox Internet Technologies", /* 18598 */ "Fachhochschule Hagenberg", /* 18599 */ "Marzek Etiketten GmbH", /* 18600 */ "Blue Mountains Grammer School", /* 18601 */ "MediaZen Corp.", /* 18602 */ "Powercn", /* 18603 */ "Delta E.S., a.s.", /* 18604 */ "RiS Gmbh", /* 18605 */ "Orbitel, Inc.", /* 18606 */ "KLM Royal Dutch Airlines", /* 18607 */ "Synlogic AG", /* 18608 */ "JP.DIAS SERVIÇOS DE INFORMATICA LTD.", /* 18609 */ "University at Buffalo", /* 18610 */ "Alenia Spazio S.p.A.", /* 18611 */ "smspundit.com", /* 18612 */ "CGL Consulting", /* 18613 */ "Albert White Technologies", /* 18614 */ "North American Networks Corporation", /* 18615 */ "nextWLAN Corporation", /* 18616 */ "Timestock, Inc.", /* 18617 */ "Publi Van Dyck N.V.", /* 18618 */ "web-m GbR", /* 18619 */ "Jaw Networks", /* 18620 */ "Hinson and Associates", /* 18621 */ "K-n-A Ltd.", /* 18622 */ "micro systems", /* 18623 */ "Lehrstuhl fuer Technische Dienstleistungen", /* 18624 */ "UniVision (Canada) Ltd.", /* 18625 */ "UNET BV", /* 18626 */ "Bakasquared", /* 18627 */ "Microelectronics Technology Inc.", /* 18628 */ "Iclass Co. Ltd.", /* 18629 */ "Reeuenta Design Service Taiwan Ltd.", /* 18630 */ "DARG", /* 18631 */ "SA SST Informatique", /* 18632 */ "STATER", /* 18633 */ "Advanced Software Production Line, S.L.", /* 18634 */ "m-otion GmbH", /* 18635 */ "UVT s.r.o.", /* 18636 */ "JNS Inc.", /* 18637 */ "Avedya", /* 18638 */ "Kinnikinnick Foods Inc.", /* 18639 */ "Digital Envoy, Inc", /* 18640 */ "Royal Military College of Canada", /* 18641 */ "C&C Power, Inc.", /* 18642 */ "Montgomery County Government", /* 18643 */ "Daniel Skadlubowicz", /* 18644 */ "Cesart Creation inc.", /* 18645 */ "Electric Mail Co.", /* 18646 */ "DEXTER COMMUNICATIONS, INC.", /* 18647 */ "HTU Graz", /* 18648 */ "Magnet.ch AG", /* 18649 */ "Projectiondesign AS", /* 18650 */ "GLANCE AG", /* 18651 */ "Zentrum für Bioinformatik, Hamburg", /* 18652 */ "Eraia srl", /* 18653 */ "Scottish Police Authority", /* 18654 */ "IUNDS AG", /* 18655 */ "AirRunner Technologies", /* 18656 */ "GoldenGate Software, Inc.", /* 18657 */ "Xcitel Ltd.", /* 18658 */ "Chung Hua University", /* 18659 */ "WebKMS", /* 18660 */ "Elitech Information Technology Co.,Ltd.", /* 18661 */ "Mathias Kettner", /* 18662 */ "Laakirchen Papier AG", /* 18663 */ "IPnP", /* 18664 */ "Axelero Internet Szolgáltató Rt.", /* 18665 */ "Payroll Sweden AB", /* 18666 */ "HBware", /* 18667 */ "freshmeat.net, part of OSDN, Inc.", /* 18668 */ "Memorial Hermann healthcare System", /* 18669 */ "General Atomics", /* 18670 */ "Knovative, Inc.", /* 18671 */ "Secured Computer Concepts", /* 18672 */ "Webjorn Data & Natverkskonsult", /* 18673 */ "telecomSoftware", /* 18674 */ "Strategy & Technology ltd", /* 18675 */ "LEOFOO DEVELOPMENT CO., LTD", /* 18676 */ "Datenzentrale Baden-Wuerttemberg", /* 18677 */ "Winston Industries", /* 18678 */ "Behr Internet Solutions, Inc.", /* 18679 */ "Con Edison Communications", /* 18680 */ "Travelping GmbH", /* 18681 */ "Dr. Brunthaler IITech GmbH", /* 18682 */ "CJ Ltd.", /* 18683 */ "Davey Control Systems", /* 18684 */ "Portal München GmbH & Co. KG", /* 18685 */ "InControl Technology Inc", /* 18686 */ "Information Flow", /* 18687 */ "IU.TV Ltd", /* 18688 */ "Neonetix, LLC.", /* 18689 */ "Healthlink Limited", /* 18690 */ "Bussi", /* 18691 */ "Katana Technology, Inc.", /* 18692 */ "NDS Media Solutions", /* 18693 */ "isometry.net", /* 18694 */ "Soluciones Telematicas Avanzadas S.L.", /* 18695 */ "Idiom Communications LLC", /* 18696 */ "IVRS (International) Limited", /* 18697 */ "Tonghua Wanghang Information & Technology Co.,Ltd.", /* 18698 */ "DAPYXIS NETWORK LIMITED", /* 18699 */ "ACOM CO.,LTD", /* 18700 */ "Minplan", /* 18701 */ "REUTERS S.A.", /* 18702 */ "Siix d.o.o.", /* 18703 */ "Institute of Mathematics of the Romanian Academy", /* 18704 */ "Dynamix Promotions Limited", /* 18705 */ "Corporacion Aceros Arequipa S.A.", /* 18706 */ "Muskingum College", /* 18707 */ "Guardium Inc.", /* 18708 */ "INOTESKA s.r.o.", /* 18709 */ "Kaytec Ltd.", /* 18710 */ "Burger Knowledge Consultancy", /* 18711 */ "Ajin Techline co., Ltd", /* 18712 */ "FH JOANNEUM Gesellschaft mbH", /* 18713 */ "Lanzhou University of Technology", /* 18714 */ "Grand Electronic Co.,Ltd.", /* 18715 */ "Grand Electronic Co.,Ltd.", /* 18716 */ "UCB SA/NV", /* 18717 */ "Association of Hellenic Internet Users", /* 18718 */ "O2 Ltd", /* 18719 */ "FarSite Communications Limited", /* 18720 */ "EMICT Ltd.", /* 18721 */ "Universidade Federal do Parana", /* 18722 */ "Digicast Networks Inc", /* 18723 */ "EDJ Enterprises, Inc.", /* 18724 */ "Paycom Billing Services, Inc.", /* 18725 */ "Isala Klinieken", /* 18726 */ "Apollo Group, Inc.", /* 18727 */ "Unassigned", /* 18728 */ "RB Holdings", /* 18729 */ "C&A srl", /* 18730 */ "INGENIERIA DE SISTEMAS MULTIAGENTE, S.L.", /* 18731 */ "Horner Brothers Print Group", /* 18732 */ "Magnifire Networks", /* 18733 */ "Wildher ICT Solutions", /* 18734 */ "Hayes Lemmerz International", /* 18735 */ "Ertius Consulting", /* 18736 */ "Northrop Grumman", /* 18737 */ "DjE", /* 18738 */ "CraftAnalogy, Inc.", /* 18739 */ "J. S. Thrower and Associates Ltd.", /* 18740 */ "Leurck Software", /* 18741 */ "SACEM", /* 18742 */ "Entrada Internet Systems, Inc.", /* 18743 */ "Idea Tec Sahar (ITS) Ltd", /* 18744 */ "ERANET srl", /* 18745 */ "Matsushita Electric Europe", /* 18746 */ "American Fibertek, Inc.", /* 18747 */ "Engelschall", /* 18748 */ "The OpenPKG Project", /* 18749 */ "solar", /* 18750 */ "IPDeliver Inc.", /* 18751 */ "Financial Engines, Inc.", /* 18752 */ "Adelphia Communications", /* 18753 */ "University of Wisconsin - Parkside", /* 18754 */ "MavriQ Technologies, LLC", /* 18755 */ "Michal Charvat", /* 18756 */ "United Systems Access Inc.", /* 18757 */ "Stordyne Corporation", /* 18758 */ "Netlink Technology Ltd.", /* 18759 */ "Guangdong Electronic Certification Authority", /* 18760 */ "Regal Cyber Limited", /* 18761 */ "Sumtech Inc", /* 18762 */ "TheNetWerk", /* 18763 */ NULL, /* 18764 */ "Comtel Electronics GmbH", /* 18765 */ "Procitec GmbH", /* 18766 */ "Kaba Management + Consulting AG", /* 18767 */ "Virtual Royal Danish Air Force", /* 18768 */ "University Computer Center (URC) Banja Luka", /* 18769 */ "SUNCOM Systems", /* 18770 */ "The Salvage Association", /* 18771 */ "Microbus plc", /* 18772 */ "Internet Creation Co.,Ltd.", /* 18773 */ "Banca Monte dei Paschi di Siena S.p.A.", /* 18774 */ "Neuronenwerk", /* 18775 */ "eAcceleration Corp", /* 18776 */ "Thomas Luzat IT-Services", /* 18777 */ "ARCANE NETWORKS", /* 18778 */ "Synergy Information Services, Inc.", /* 18779 */ "ANSES", /* 18780 */ "Zagamma Labs", /* 18781 */ "Rozhled.cz", /* 18782 */ "Interwoven, Inc.", /* 18783 */ "Great Clips, Inc.", /* 18784 */ "Collation Inc.", /* 18785 */ "Global-Arts", /* 18786 */ "Clubhaus PLC", /* 18787 */ "MyNym", /* 18788 */ "Pro QC International Ltd", /* 18789 */ "EcGuard Technology Co. Ltd.", /* 18790 */ "Chatchalerm Namwongprom", /* 18791 */ "HORIBA Europe Automation Division GmbH", /* 18792 */ "Norske Skogindustrier ASA", /* 18793 */ "Uni Regensburg", /* 18794 */ "ASPLinux", /* 18795 */ "Horizon.Net S.A", /* 18796 */ "Lunics GmbH", /* 18797 */ "digital design GmbH", /* 18798 */ "Layer14", /* 18799 */ "WRK Computer Systems", /* 18800 */ "Forrest Aldrich", /* 18801 */ "AUCONET GmbH", /* 18802 */ "MEDCOM sp. z o.o.", /* 18803 */ "Advisec AB", /* 18804 */ "Struktuur Meedia", /* 18805 */ "Calm Computer Corp.", /* 18806 */ "MAPLE NETWORKS Co.,Ltd", /* 18807 */ "Graduate Institute of International and Development Studies", /* 18808 */ "NetLink Consulting LLC", /* 18809 */ "Inotera Memories Inc.", /* 18810 */ "Colgate-Palmolive Company", /* 18811 */ "Sageway Computer Solutions Pte Ltd", /* 18812 */ "DEMARINA SDN. BHD.", /* 18813 */ "RoCNet Linux-Services", /* 18814 */ "ConD GmbH", /* 18815 */ "Andrea Fino", /* 18816 */ "Ethernet Powerlink Standardisation Group (EPSG)", /* 18817 */ "Dinsa Soluciones", /* 18818 */ "Pardes Group SA", /* 18819 */ "RAMCS", /* 18820 */ "m-Wise UK Ltd.", /* 18821 */ "FOTEK ,Ltd.", /* 18822 */ "COM-PAN s.c.", /* 18823 */ "av", /* 18824 */ "Topio, Inc.", /* 18825 */ "PSA Corporation Limited", /* 18826 */ "LOBOK - projects", /* 18827 */ "danet GmbH", /* 18828 */ "COM.BOX Internet Service GmbH", /* 18829 */ "Jingo Digital", /* 18830 */ "InFormaL", /* 18831 */ "Universität Potsdam", /* 18832 */ "MICROTROL SRL", /* 18833 */ "Competitionhill", /* 18834 */ "Government of the District of Columbia", /* 18835 */ "Flathead Valley Community College", /* 18836 */ "Spectracom Corporation", /* 18837 */ "AEAT", /* 18838 */ "Data Consulting Group, Inc.", /* 18839 */ "Milwaukee Public Schools", /* 18840 */ "Acorn Packet Solutions", /* 18841 */ "Linuxlösungen Michael Rößler", /* 18842 */ "CPR Software LLC", /* 18843 */ "Triacta Power Technologies, Inc.", /* 18844 */ "eCartsoft.com", /* 18845 */ "State of Tennessee", /* 18846 */ "Objectpark Software GbR", /* 18847 */ "UIS Abler Electronics Corp. Ltd.", /* 18848 */ "OneDataCentral", /* 18849 */ "CoSystems, Inc.", /* 18850 */ "Association DSPNet", /* 18851 */ "Gerdes Aktiengesellschaft", /* 18852 */ "EURILOGIC Technologies", /* 18853 */ "Axiliance", /* 18854 */ "Beijing Fibridge Co., Ltd.", /* 18855 */ "Monitor Electronics Ltd", /* 18856 */ "dh computersysteme", /* 18857 */ "RDR Technologies LLC", /* 18858 */ "PaX AG", /* 18859 */ "Friends of the Earth International", /* 18860 */ "Educational Standards and Certifictations Inc.", /* 18861 */ "WillMedia Corp.", /* 18862 */ "Sisters of Charity Health Service", /* 18863 */ "Touring Club Suisse (TCS)", /* 18864 */ "Turunch Technologies", /* 18865 */ "White & Stover Innovations, LLC", /* 18866 */ "Meetinghouse Data Communications", /* 18867 */ "InterNiche Technologies Inc", /* 18868 */ "University of Helsinki", /* 18869 */ "OpsPoint", /* 18870 */ "FirstAttribute AG", /* 18871 */ "The Groovy Corporation", /* 18872 */ "Works Operating Company", /* 18873 */ "S & S Professionals, Inc.", /* 18874 */ "Scorpion Software Corp.", /* 18875 */ "TEVRON, LLC", /* 18876 */ "Darwin Solutions LLC", /* 18877 */ "Asschem", /* 18878 */ "LinuxHeaven", /* 18879 */ "American Museum of Natural History", /* 18880 */ "Prometeia Srl", /* 18881 */ "Adventist International Institute of Advanced Studies (AIIAS)", /* 18882 */ "Projektgroup LDAP University of Siegen", /* 18883 */ "Shanghai Sansi Technology Co., Ltd.", /* 18884 */ "geeks.pl", /* 18885 */ "PFU LIMITED", /* 18886 */ "University of Massachusetts Boston CPCS", /* 18887 */ "Guoxin Telecom System Ltd", /* 18888 */ "\"Arhangelsk Television Company\" Ltd.", /* 18889 */ "Integrated Communication Technologies", /* 18890 */ "The Closed Joint-Stock Company ?DeltaBank¦", /* 18891 */ "GEMMA Systems, spol. s r.o.", /* 18892 */ "SMS Siemag AG", /* 18893 */ "Technische Fachhochschule Wildau", /* 18894 */ "Moravska zemska knihovna", /* 18895 */ "Esilog Consulting, S.L.", /* 18896 */ "Cellopoint International Corporation", /* 18897 */ "Freie Universitaet Berlin (FU-Berlin)", /* 18898 */ "Isvara", /* 18899 */ "evosoft GmbH", /* 18900 */ "Capital Lease GmbH", /* 18901 */ "Aetat", /* 18902 */ "MANDOZZI ELETTRONICA S.A.", /* 18903 */ "Propylon", /* 18904 */ "Total Card, Inc.", /* 18905 */ "stefi", /* 18906 */ "Pironet NDH AG", /* 18907 */ "Inpriva, Inc.", /* 18908 */ "Service Management Software", /* 18909 */ "Bombardier Transportation Inc.", /* 18910 */ "Professional Data Management Again Inc.", /* 18911 */ "N-able Technologies Inc.", /* 18912 */ "Statna pokladnica", /* 18913 */ "Empneusis Internet Services", /* 18914 */ "Nautronix Ltd", /* 18915 */ "Shanghai TransEngines Technologies Co.,Ltd", /* 18916 */ "Shanghai Futures Exchange", /* 18917 */ "Bringe Informationstechnik GmbH", /* 18918 */ "Alfa21 Outsourcing, S.L.", /* 18919 */ "Agencia Notarial de Certificacion", /* 18920 */ "NextiraOne Deutschland GmbH", /* 18921 */ "Trellis Tecnologia Ltda.", /* 18922 */ "Yamaguchi University", /* 18923 */ "Relston Consulting Limited", /* 18924 */ "Prior", /* 18925 */ "JTT \"Novel-IL\"", /* 18926 */ "tandav enterprises", /* 18927 */ "Areca Technology Corporation", /* 18928 */ "Interwise, Inc.", /* 18929 */ "Skyx.Org", /* 18930 */ "DaveLinux", /* 18931 */ "Naeilnet Inc.", /* 18932 */ "ActivNetworks", /* 18933 */ "Vivex GmbH", /* 18934 */ "Essex Electronics, Inc.", /* 18935 */ "National Institute of Advanced Industrial Science and Technology", /* 18936 */ "Lynk", /* 18937 */ "Rubix Information Technologies, Inc.", /* 18938 */ "Retail Decisions Inc.", /* 18939 */ "Kristopher Johnson Consulting", /* 18940 */ "Vermont State Colleges", /* 18941 */ "Liquid Computing Corporation", /* 18942 */ "HealthPartners", /* 18943 */ "nethype GmbH", /* 18944 */ "Dynamic Infosystems Ltd.", /* 18945 */ "Digital Species Ltd", /* 18946 */ "CANOPEE SECURITY", /* 18947 */ "Sonatel Multimédia", /* 18948 */ "Golden Eagle Enterprises Ltd", /* 18949 */ "LAN Force Inc.", /* 18950 */ "Fast Lane Institute for Knowledge Transfer GmbH", /* 18951 */ "Prudential Finanical", /* 18952 */ "Altkom Akademia S.A.", /* 18953 */ "Brandywine Communciations", /* 18954 */ "Digital Identity Ltd.", /* 18955 */ "Trusted Network Technologies, Inc.", /* 18956 */ "Robert's Computer & Electrical Service", /* 18957 */ "EZNETSOFT", /* 18958 */ "sichuan normal university", /* 18959 */ "Larsen & Toubro Infotech Ltd", /* 18960 */ "Auditor revizijska druzba d.o.o., Ptuj", /* 18961 */ "LRP", /* 18962 */ "EDN Sovintel", /* 18963 */ "ELEKTRONIK HENGARTNER AG", /* 18964 */ "Netyantra Inc.", /* 18965 */ "Unassigned", /* 18966 */ "Oxford County Telephone and Telegraph Company", /* 18967 */ "012 goldenlines Ltd", /* 18968 */ "University of Maryland Baltimore", /* 18969 */ "Expert SA", /* 18970 */ "G&S Sistemas de Información, S.L.", /* 18971 */ "Panama Canal Authority", /* 18972 */ "TuXic.nl", /* 18973 */ "Universal Business Matrix, LLC", /* 18974 */ "BRG16", /* 18975 */ "Badger Alarm and Control, LLC", /* 18976 */ "NIC-IQ Ltd", /* 18977 */ "CXO Systems Inc.", /* 18978 */ "EVERYWHERECOMMUNICATIONS.NET", /* 18979 */ "Cypak AB", /* 18980 */ "Reserved", /* 18981 */ "Link-Yug Ltd.", /* 18982 */ "AOK Sachsen", /* 18983 */ "Magos Consulting, Ltd.", /* 18984 */ "Insinova AG", /* 18985 */ "FleetBoston Financial Corporation", /* 18986 */ "Ralf Meister", /* 18987 */ "Shanghai Eastimage Equipments Co.,LTD", /* 18988 */ "Day Dreams And Information Technologies", /* 18989 */ "CNC a.s.", /* 18990 */ "IOP Publishing Ltd", /* 18991 */ "WEBForce GmbH", /* 18992 */ "ObjectFusion, L.L.C.", /* 18993 */ "Olix", /* 18994 */ "CommSpeed, LLC", /* 18995 */ "Globix Corporation", /* 18996 */ "Ibrix Corp.", /* 18997 */ "Redstone Consulting, LLC", /* 18998 */ "Health Management Corporation", /* 18999 */ "Dongyang Telecom Ltd.", /* 19000 */ "Research Center of Computational Mechanics, Inc.", /* 19001 */ "Sun Yat-sen (Zhongshan) University", /* 19002 */ "SENAS.NET", /* 19003 */ "CreationPoint Systems, Inc.", /* 19004 */ "AdytumSolutions, Inc.", /* 19005 */ "Polish Professional Publishers Ltd.", /* 19006 */ "3C Systems Oy", /* 19007 */ "GateHouse", /* 19008 */ "Clever IT di Ivan Raimondi", /* 19009 */ "Bluetop Technology Co., Ltd.", /* 19010 */ "Jacarta Ltd.", /* 19011 */ "Net Evidence (SLM) Ltd", /* 19012 */ "Sonario", /* 19013 */ "Magix s.r.o.", /* 19014 */ "oulman.org", /* 19015 */ "Scholl Consulting", /* 19016 */ "XTEND Consulting, LLC", /* 19017 */ "Dandre", /* 19018 */ "Coastal Carolina University", /* 19019 */ "ryanscool", /* 19020 */ "Ensemble Designs, Inc.", /* 19021 */ "Invocom Ltd.", /* 19022 */ "LMU", /* 19023 */ "Bixby Telephone Company", /* 19024 */ "OSLiNK Spolka z o.o.", /* 19025 */ "Dirk Gorny Unternehmensberatung", /* 19026 */ "TriAWorks, Inc.", /* 19027 */ "Sputnik, Inc.", /* 19028 */ "Nittotsushinki Co.,Ltd.", /* 19029 */ "Suva", /* 19030 */ "LogIn S&C GmbH", /* 19031 */ "Apollis AG", /* 19032 */ "Moniforce B.V.", /* 19033 */ "3SP, Investigação e Desenvolvimento de Tecnologias, Lda.", /* 19034 */ "Omnirei s.r.l.", /* 19035 */ "Etherboot Project", /* 19036 */ "Bolsa Nacional de Valores", /* 19037 */ "WebNet, Ltd", /* 19038 */ "National Research Center for High Performace Computers", /* 19039 */ "Trusted Computer Solutions, Inc.", /* 19040 */ "Apparent Networks Inc.", /* 19041 */ "ACBR Computadores Ltda.", /* 19042 */ "XiTrust Secure Technologies GmbH", /* 19043 */ "JSC \"Kredyt Bank (Ukrajina)\"", /* 19044 */ "MyNetwork System Co.,Ltd", /* 19045 */ "Lenovo Enterprise Business Group", /* 19046 */ "Magerealm Enterprises", /* 19047 */ "Fambus", /* 19048 */ "Scalix Corporation", /* 19049 */ "Conchis, LLC", /* 19050 */ "Martin Thorpe", /* 19051 */ "Seekamp Enterprises", /* 19052 */ "KUBOTEK Corporation", /* 19053 */ "Intraperson", /* 19054 */ "Naviscan PET Systems, Inc.", /* 19055 */ "Access Computech Pvt Ltd.", /* 19056 */ "Exavio, Inc.", /* 19057 */ "BISON Systems AG", /* 19058 */ "moreCom A/S", /* 19059 */ "UXComm", /* 19060 */ "Werner Wiethege", /* 19061 */ "Tuxee Network", /* 19062 */ "Alterlane", /* 19063 */ "Bureau Ingénierie Richard Domon SA", /* 19064 */ "PETIT-FR", /* 19065 */ "Macnetix OHG", /* 19066 */ "Universidade Católica Portuguesa", /* 19067 */ "Travel Only", /* 19068 */ "xenocastle", /* 19069 */ "Kevcom Microsolutions", /* 19070 */ "I-Assure", /* 19071 */ "Magnasync", /* 19072 */ "Sundowner Trailers Inc", /* 19073 */ "Fidelis Security Systems, Inc", /* 19074 */ "Poštna banka Slovenije, d. d.", /* 19075 */ "xenocastle", /* 19076 */ "Xing-Lab", /* 19077 */ "Fujitsu Component Limited", /* 19078 */ "Silicon Data International Co., Ltd.", /* 19079 */ "Tsukasa Enterprise", /* 19080 */ "Wuhan Jetway Information Security Industry Co.,Ltd", /* 19081 */ "Voelcker Informatik AG", /* 19082 */ "Albanet Ltd", /* 19083 */ "Mimic Productions", /* 19084 */ "The Davidge Group", /* 19085 */ "Maytech Publishing Ltd", /* 19086 */ "NTx BackOffice Consulting Group GmbH", /* 19087 */ "Maersk Data SPECTIVE", /* 19088 */ "Infor.org Inc. Taiwan", /* 19089 */ "Bernhard-Riemann-Gymnasium Scharnebeck", /* 19090 */ "NuGenesis Technologies, Inc", /* 19091 */ "Exa Networks Ltd", /* 19092 */ "Hofsvang", /* 19093 */ "peerVue LLC", /* 19094 */ "TiL Solutions inc.", /* 19095 */ "info2cell.com FZ-LLC", /* 19096 */ "DefaultCity", /* 19097 */ "PAL Communications", /* 19098 */ "Whitewater Mobile LLC", /* 19099 */ "OHANA WIRELESS INCORPORATED", /* 19100 */ "Vouch Integrated Technologies (P) Ltd.", /* 19101 */ "Karlsruher Lebensversicherung AG", /* 19102 */ "CHMS, Inc.", /* 19103 */ "BOUYGUES, SA", /* 19104 */ "Fabian Fagerholm Consulting", /* 19105 */ "Deep Eddy Internet Consulting", /* 19106 */ "boojum mobile, inc", /* 19107 */ "I&TC Solutions Pty. Ltd.", /* 19108 */ "PacketMotion, Inc.", /* 19109 */ "Conduit Networks, Inc", /* 19110 */ "eBdesk Ltd", /* 19111 */ "RJL Computer Consulting, LLC", /* 19112 */ "Server Place LTDA", /* 19113 */ "Proximion Fiber Systems AB", /* 19114 */ "Bernhard-Riemann-Gymnasium Scharnebeck", /* 19115 */ "Antidot", /* 19116 */ "MAMM d.o.o.", /* 19117 */ "Europlex Technologies Ltd.", /* 19118 */ "Blue Chip Technology Ltd", /* 19119 */ "800onemail Inc.", /* 19120 */ "Augmentix Corporation", /* 19121 */ "Yang Arts", /* 19122 */ "Virtual Charting", /* 19123 */ "Pexim d.o.o.", /* 19124 */ "Planar Systems, Inc.", /* 19125 */ "AECODI", /* 19126 */ "SpamPet", /* 19127 */ "KomKom Electronics", /* 19128 */ "Sanek Systems", /* 19129 */ "MenuSiS Technologies (Pty) Ltd.", /* 19130 */ "Stiftung Synanon", /* 19131 */ "The Cheshire Web Mill", /* 19132 */ "Baycom Opoto-Electronics Technology Co., Ltd.", /* 19133 */ "Texocom Inc", /* 19134 */ "Darkerhosting.net", /* 19135 */ "Trichord, Inc.", /* 19136 */ "Sebastian Staiger Computer Services", /* 19137 */ "Bright Prospects LLC", /* 19138 */ "Edgewater Networks, Inc.", /* 19139 */ "Matthew R. Wilson", /* 19140 */ "Quest Serviced Apartments", /* 19141 */ "Carlo Strozzi", /* 19142 */ "SecureAge Technology", /* 19143 */ "Arjuna", /* 19144 */ "Xonix", /* 19145 */ "Jubatus Corporation", /* 19146 */ "Università degli Studi di Milano", /* 19147 */ "acticall", /* 19148 */ "Innovaciones Microelectrónicas S.L.", /* 19149 */ "Ville d'Aulnay-sous-bois", /* 19150 */ "WRX Slovakia s.r.o.", /* 19151 */ "Camargo e Souza SC/LTDA", /* 19152 */ "Instituto Politécnico Do Porto", /* 19153 */ "Corporacion Nacional de Angioplastia", /* 19154 */ "AirManage Networks Ltd.", /* 19155 */ "Cutting Edge", /* 19156 */ "Chongqing Changsong Network Information Co.LTD", /* 19157 */ "PlumStreet, LLC", /* 19158 */ "Shelton School District", /* 19159 */ "ICAT Managers, LLC", /* 19160 */ "POSnet Services, LLC", /* 19161 */ "Evolving Media Network, LLC", /* 19162 */ "insen", /* 19163 */ "Initial City Link Limited", /* 19164 */ "Kanton Solothurn", /* 19165 */ "Alswille Gloabal Services", /* 19166 */ "CapMon A/S", /* 19167 */ "Fruno S.A.", /* 19168 */ "Volantis Systems Ltd", /* 19169 */ "X-Taskforce s.r.l.", /* 19170 */ "Checkcare Enterprises, LLC", /* 19171 */ "PFM.Net, Inc.", /* 19172 */ "Rex Consulting, Inc.", /* 19173 */ "Gestalt, LLC", /* 19174 */ "oraise GmbH", /* 19175 */ "SCOMCENTER", /* 19176 */ "Tandem Systems, Ltd.", /* 19177 */ "Skill Corporation", /* 19178 */ "Raysis Co.,Ltd", /* 19179 */ "Guidewire Software, Inc.", /* 19180 */ "Optimum Holding Inc.", /* 19181 */ "JDA Software", /* 19182 */ "Herdt Domain Service", /* 19183 */ "Widerthan.com", /* 19184 */ "LinuxCare Ltd.", /* 19185 */ "Xtramus Technologies", /* 19186 */ "MEK", /* 19187 */ "satunol mikrosistem", /* 19188 */ "Senshu University", /* 19189 */ "Bildanalyssystem AB", /* 19190 */ "woofertom media", /* 19191 */ "Iglooz Technologies", /* 19192 */ "b-next GmbH", /* 19193 */ "Interbyte bvba", /* 19194 */ "TRANSRADIO SenderSysteme Berlin AG", /* 19195 */ "Agarik", /* 19196 */ "Eastlink GmbH", /* 19197 */ "activ-net GmbH & Co. KG", /* 19198 */ "SHC Netzwerktechnik GmbH", /* 19199 */ "MMG", /* 19200 */ "Oyster Partners Ltd", /* 19201 */ "meto-logic", /* 19202 */ "DAI-Labor", /* 19203 */ "Milano Medien GmbH", /* 19204 */ "Secardeo GmbH", /* 19205 */ "Hollins University", /* 19206 */ "Graphic Management Partners Inc.", /* 19207 */ "analytiq consulting gmbh", /* 19208 */ "Caterpillar Inc.", /* 19209 */ "Cassatt Corporation", /* 19210 */ "TEZ Georgsberg GmbH", /* 19211 */ "University System of Maryland", /* 19212 */ "Raining Data Corporation", /* 19213 */ "Ogilvy & Mather Deutschland GmbH", /* 19214 */ "European Organisation for Research and Treatment of Cancer AISBL / IVZW", /* 19215 */ "Heringa", /* 19216 */ "iiNet Pty Ltd", /* 19217 */ "Fortress Networks (Aust) Pty Ltd", /* 19218 */ "Pi Kappa Alpha - Gamma Tau", /* 19219 */ "Local-Web AG", /* 19220 */ "Metropolis AG", /* 19221 */ "Eurotek srl", /* 19222 */ "Internap Network Services Corporation", /* 19223 */ "OSSBroadNet K.K", /* 19224 */ "Tumel", /* 19225 */ "Titanium", /* 19226 */ "Blackwood Medical Inc", /* 19227 */ "Finish Line, Inc.", /* 19228 */ "CFOknows, LLC", /* 19229 */ "Graphix Prose, LLC", /* 19230 */ "Lumenware, LLC", /* 19231 */ "LSC Linux Support Center Kft.", /* 19232 */ "Blue Lane Technologies Inc.", /* 19233 */ "M2", /* 19234 */ "Silver Diamond Services, LLP", /* 19235 */ "CPM SA", /* 19236 */ "becom Informationssysteme GmbH", /* 19237 */ "Moore Systems, Inc.", /* 19238 */ "cfSOFTWARE, Inc.", /* 19239 */ "Nanshu Densetsu", /* 19240 */ "Cemaphore Systems Inc.", /* 19241 */ "Tellusoft", /* 19242 */ "Titus", /* 19243 */ "SafeNet Media", /* 19244 */ "CBPM Software", /* 19245 */ "XWDL", /* 19246 */ "Romat Telecom Ltd.", /* 19247 */ "MANIA Research Group", /* 19248 */ "FabianSoft di Fabiano Copeta", /* 19249 */ "Image Systems Corporation", /* 19250 */ "KIP Information Network", /* 19251 */ "NuPi Solutions", /* 19252 */ "Jaspert", /* 19253 */ "Dark Blue Sea", /* 19254 */ "Vaccius ITsec Pte LTd", /* 19255 */ "iCADA GmbH", /* 19256 */ "ProSyntic Ingenieurs b.v.", /* 19257 */ "La Joliverie", /* 19258 */ "Ansync Inc.", /* 19259 */ "MagiQ Technologies, Inc.", /* 19260 */ "Minneapolis College of Art and Design", /* 19261 */ "Dedicado", /* 19262 */ "ET VOILA !!", /* 19263 */ "Magnus Weis", /* 19264 */ "Momentum Computer, Inc.", /* 19265 */ "Bayerisches Landesamt für Statistik und Datenverarbeitung", /* 19266 */ "Ajuntament de Palma", /* 19267 */ "Intercomp Ltd.", /* 19268 */ "Hybrigenics SA", /* 19269 */ "Stora Enso Oyj", /* 19270 */ "Ministère de l'économie, des finances et de l'industrie (Minefi)", /* 19271 */ "praksys", /* 19272 */ "TMBNET", /* 19273 */ "Services Industriels de Geneve", /* 19274 */ "Constant Data, Inc.", /* 19275 */ "Paedagogische Hochschule Ludwigsburg", /* 19276 */ "Shenandoah Solutions, Inc.", /* 19277 */ "INOV - INESC Inovação", /* 19278 */ "TMBNET", /* 19279 */ "China Daily", /* 19280 */ "Intrasync, LLC", /* 19281 */ "Institute of Continuous Media Mechanics", /* 19282 */ "Sibelius Academy", /* 19283 */ "TGS Telonic GmbH", /* 19284 */ "BRAZILMALL NETWORK LTDA", /* 19285 */ "Universidad de Los Andes", /* 19286 */ "META Industriesoftware GmbH", /* 19287 */ "ECOPETROL S.A.", /* 19288 */ "3Sharp", /* 19289 */ "Just Aaron", /* 19290 */ "Macrad", /* 19291 */ "Pirel inc.", /* 19292 */ "Danriver Technologies Corporation", /* 19293 */ "LeapComm Communication Technologies Inc.", /* 19294 */ "Kolle, IT-Ingeniørfirma ApS", /* 19295 */ "Filterlogix, LLC", /* 19296 */ "DSpace Pty Ltd", /* 19297 */ "Media Cruise Solutions k.k.", /* 19298 */ "Turkcell Iletisim Hizmetleri A.S.", /* 19299 */ "Deutscher Sparkassen Verlag GmbH", /* 19300 */ "Pulse Software & Consulting Inc.", /* 19301 */ "CryptCOM Securities, Inc.", /* 19302 */ "Zhejiang Telecom Equipment Factory", /* 19303 */ "BNP Paribas Arbitrage", /* 19304 */ "Indio Technologies", /* 19305 */ "FatPipe Networks", /* 19306 */ "MDS INC.", /* 19307 */ "Genesee Freenet", /* 19308 */ "chandan", /* 19309 */ "D.H.S. - Data, Hardware, Software spol s r.o.", /* 19310 */ "Sterling Crane", /* 19311 */ "Archivas, Inc.", /* 19312 */ "beu.ch", /* 19313 */ "Hein Roehrig IT Consulting GbR", /* 19314 */ "Andrew Johnson", /* 19315 */ "Mitsubishi Motors Corporation", /* 19316 */ "1310369 Ontario Ltd.", /* 19317 */ "SPAN International", /* 19318 */ "CLSA Ltd", /* 19319 */ "Tomsktelecom, a branch of Sibirtelecom OJSC", /* 19320 */ "VSnet", /* 19321 */ "netiq s.r.o.", /* 19322 */ "National Centre for Physics", /* 19323 */ "Rover Laboratories S.p.A.", /* 19324 */ "Eroski S. Coop.", /* 19325 */ "Tancsics Mihaly SzSzK", /* 19326 */ "Deutscher Skiverband", /* 19327 */ "TRANSGENE SA", /* 19328 */ "Telcotec Ltd.", /* 19329 */ "R&K Engineering, Inc.", /* 19330 */ "TECNET GMBH", /* 19331 */ "Paperlinx NZ Ltd", /* 19332 */ "Electro Industries/GaugeTech", /* 19333 */ "Cerzan, Inc.", /* 19334 */ "Intermax BV", /* 19335 */ "Signull Technologies", /* 19336 */ "Dynamx Internet Services", /* 19337 */ "Bharti Telesoft International Pvt. Ltd.", /* 19338 */ "Fachhochschule Bochum", /* 19339 */ "Provincia di Reggio Emilia", /* 19340 */ "Foreningssparbanken", /* 19341 */ "Pinuts media+science Multimedia-Agentur GmbH", /* 19342 */ "Medictyon", /* 19343 */ "United SSL Deutschland GmbH", /* 19344 */ "Odd Element Inc.", /* 19345 */ "SMComputer EDV Service & Consulting Schmid Manfred", /* 19346 */ "Pyzzo Software Corporation", /* 19347 */ "Synacor, Inc.", /* 19348 */ "Lightshore", /* 19349 */ "eyevis", /* 19350 */ "Ivega Corporation Pvt. Ltd.", /* 19351 */ "IP Labs GmbH", /* 19352 */ "ScottRickman", /* 19353 */ "E-Force S.r.l.", /* 19354 */ "Sebastian Dietzold", /* 19355 */ "Agroportal B.V.", /* 19356 */ "University Medical Centre Nijmegen", /* 19357 */ "Wildner AG", /* 19358 */ "TOPPAN FORMS CO.,LTD.", /* 19359 */ "Q&R B.V.", /* 19360 */ "Knowledge Media Research Center", /* 19361 */ "Virtuous, Inc.", /* 19362 */ "Net Island Networks", /* 19363 */ "4thpass Inc.", /* 19364 */ "Nike Inc.", /* 19365 */ "Westel Systems", /* 19366 */ "Ecolab, Inc", /* 19367 */ "Azul Systems, Inc.", /* 19368 */ "Laboratorio Imagen Radiologica", /* 19369 */ "Telecast Fiber Systems, Inc.", /* 19370 */ "Lanvise", /* 19371 */ "Miami County ESC", /* 19372 */ "PowerTel Limited", /* 19373 */ "Orc Software", /* 19374 */ "Max-SI", /* 19375 */ "Integrating the Healthcare Enterprise", /* 19376 */ "Nekotec Telecom", /* 19377 */ "MagicCastle Cummunication", /* 19378 */ "Imperva, Inc.", /* 19379 */ "TAMURA Corporation", /* 19380 */ "Bundesanstalt fuer Finanzdienstleistungsaufsicht", /* 19381 */ "Manzara Electronics LTD.", /* 19382 */ "Mikromarketingas UAB", /* 19383 */ "VIC TOKAI CORPORATION", /* 19384 */ "Infinity Comunicaciones", /* 19385 */ "Martech Systems (Weymouth) Ltd.", /* 19386 */ "Laboratori Guglielmo Marconi", /* 19387 */ "DB Systems GmbH", /* 19388 */ "ComSign Ltd.", /* 19389 */ "Trend Software LLC", /* 19390 */ "SASH Management, LLC", /* 19391 */ "City of Union City, Georgia", /* 19392 */ "Trident Systems Incorporated", /* 19393 */ "I.T. By Design, Inc.", /* 19394 */ "NewLink Genetics", /* 19395 */ "CITI - Center for Information Technology Integration", /* 19396 */ "TrafficSim Co., Ltd.", /* 19397 */ "JSC Institute of Informational Technologies", /* 19398 */ "Xylon Computersystems", /* 19399 */ "TriggerPlus Software Ltd.", /* 19400 */ "Fachhochschule Kaiserslautern Standort Zweibruecken", /* 19401 */ "Robert W. Baird & Co", /* 19402 */ "Westbridge Technology, Inc.", /* 19403 */ "NIC Inc.", /* 19404 */ "Advanced Systems Concepts, Inc.", /* 19405 */ "Adiscon GmbH", /* 19406 */ "Atomic9.NET", /* 19407 */ "Zweicom Ltd.", /* 19408 */ "Smittskyddsinstitutet", /* 19409 */ "Ministerio de Economia y Hacienda", /* 19410 */ "Andreas Falk", /* 19411 */ "TeliaSonera Mobile Networks AB", /* 19412 */ "SBIM-FMUP", /* 19413 */ "Kolab Project", /* 19414 */ "Docucorp International", /* 19415 */ "Edison Schools", /* 19416 */ "Envoy International, LLC", /* 19417 */ "Stampede Technologies, Inc.", /* 19418 */ "Internet-Team GmbH", /* 19419 */ "NodeMinder", /* 19420 */ "Futago LLC", /* 19421 */ "LDAP Technologies", /* 19422 */ "Global Dial Pty Ltd", /* 19423 */ "ECoCoMS Ltd.", /* 19424 */ "Hinttech BV", /* 19425 */ "ESDG Konsult AB", /* 19426 */ "The Excel Ortho Group", /* 19427 */ "NovAG-Services Ltd.", /* 19428 */ "Alphawave Ltd", /* 19429 */ "NET-2COM Ltd.", /* 19430 */ "JSC Kordon", /* 19431 */ "Virulent Software", /* 19432 */ "Austin Independent School District", /* 19433 */ "Concepts et contenus", /* 19434 */ "Hectec GmbH", /* 19435 */ "Concordia University", /* 19436 */ "European School of Management and Technology GmbH", /* 19437 */ "Broadweave Networks", /* 19438 */ "Kingstar&winning Medical Info-Tech Co.,Ltd.", /* 19439 */ "IAD GENERAL CO.,LTD", /* 19440 */ "Toroki, Inc.", /* 19441 */ "PHANTOM", /* 19442 */ "EGATEL S.L.", /* 19443 */ "Metaswitch Networks Ltd", /* 19444 */ "Calltech Sp. z o.o.", /* 19445 */ "Cable One", /* 19446 */ "Swift and Company", /* 19447 */ "zending", /* 19448 */ "Systinet Corp.", /* 19449 */ "NetShift Software Ltd", /* 19450 */ "NextG Networks, Inc.", /* 19451 */ "BeiJing NuQX Technology CO.,LTD", /* 19452 */ "Ufinity Pte. Ltd.", /* 19453 */ "Airspan Networks Inc.", /* 19454 */ "Marks & Spencer PLC", /* 19455 */ "Prediwave, Inc", /* 19456 */ "Platinum Equity, LLC", /* 19457 */ "Application Security, Inc.", /* 19458 */ "RF Applications, Inc.", /* 19459 */ "Sycamore.US", /* 19460 */ "Cendant Mortgage Corporation", /* 19461 */ "Roberto Capancioni", /* 19462 */ "Division of Johns Hopkins in Singapore Limited", /* 19463 */ "Hitachi Communication Technologies, Ltd.", /* 19464 */ "Franziska Buendgens", /* 19465 */ "PND1", /* 19466 */ "GeekBone.org", /* 19467 */ "Ishihata industry", /* 19468 */ "Highnet Systems Ltd.", /* 19469 */ "Highnet Systems Ltd.", /* 19470 */ "Secgo Group Oy", /* 19471 */ "Staer Sistemi s.r.l.", /* 19472 */ "North American Electric Reliabiity Corporation", /* 19473 */ "CRL", /* 19474 */ "Confederação Interestadual das Cooperativas Ligadas ao Sicredi - Sicredi Servicos", /* 19475 */ "Highwall Technologies, LLC", /* 19476 */ "Infocaja, S.L.", /* 19477 */ "Rapidpacket", /* 19478 */ "KeyOn Communications, LLC", /* 19479 */ "litica.de - Hermann & Matejek GbR", /* 19480 */ "BluePig", /* 19481 */ "Waldmann", /* 19482 */ "Aqua Systems, Inc.", /* 19483 */ "BANCO DE ESPAÑA", /* 19484 */ "art of object GmbH", /* 19485 */ "Venali Inc", /* 19486 */ "Lucent Technologies, Mobility IN", /* 19487 */ "Toadico, Inc", /* 19488 */ "IP3 Networks, Inc.", /* 19489 */ "Hiper S.A.", /* 19490 */ "Epeople Soluções S/C LTDA", /* 19491 */ "ADDC Infotech GmbH", /* 19492 */ "iMEDIC GmbH", /* 19493 */ "Richard Schilling, MBA", /* 19494 */ "National Informatics Company", /* 19495 */ "Cognition Group, Inc.", /* 19496 */ "OSS Application Consulting Centre, Taiwan", /* 19497 */ "HMJ - Projets Délocalisés", /* 19498 */ "Association Inforoots", /* 19499 */ "Government Information Technology Services", /* 19500 */ "Trust Investment Bank, JSB", /* 19501 */ "QORVUS Systems, Inc.", /* 19502 */ "Lockdown Networks, Inc.", /* 19503 */ "Mullen", /* 19504 */ "verzeichnisdienst", /* 19505 */ "Christian Jahn", /* 19506 */ "haroldbeumer.com", /* 19507 */ "The Software Guild, Inc.", /* 19508 */ "Trident Microsystem INC", /* 19509 */ "Center for Excellence in Telecommunications and Space", /* 19510 */ "Larry Burton", /* 19511 */ "SAHM Technologies LLC", /* 19512 */ "C3 Desenvolvimento de Sistemas Computacionais Ltd.", /* 19513 */ "On Demand Systems Limited Partnership", /* 19514 */ "TREND Service GmbH", /* 19515 */ "Universitaet Erfurt", /* 19516 */ "Colibria AS", /* 19517 */ "Technische Universität München", /* 19518 */ "E.Novation Portal Technology B.V.", /* 19519 */ "Samartha Information Systems Pty. Ltd.", /* 19520 */ "dataschalt e+a GmbH", /* 19521 */ "Aineas.net", /* 19522 */ "Sequence Solutions", /* 19523 */ "Rational Innovations", /* 19524 */ "Tippecanoe County Public Library", /* 19525 */ "BlueBoxStudio.net", /* 19526 */ "Global Technology Ltd", /* 19527 */ "Meson Fiber Optics", /* 19528 */ "NetStrong Information Ltd.", /* 19529 */ "NetMaster Ltd.", /* 19530 */ "INSA de Rennes", /* 19531 */ "businessMart AG", /* 19532 */ "TeleMessage Ltd.", /* 19533 */ "Gorenjska banka d.d. Kranj", /* 19534 */ "ACNMS", /* 19535 */ "Panduit Corp.", /* 19536 */ "M5 Networks, Inc.", /* 19537 */ "Add2Net, Inc.", /* 19538 */ "Country Haven Academy", /* 19539 */ "NCS Consulting Inc.", /* 19540 */ "Belgorodenergo", /* 19541 */ "Aalborg University Library", /* 19542 */ "Wellcome Trust Sanger Institute", /* 19543 */ "Weather Strategies", /* 19544 */ "Sony CISC", /* 19545 */ "MELENTANE", /* 19546 */ "Oplink Communications, Inc.", /* 19547 */ "FROX communication", /* 19548 */ "Uni-Q Systems", /* 19549 */ "an Academic Network at Sao Paulo (ANSP)", /* 19550 */ "Thales Naval France", /* 19551 */ "Alexander Kowalski", /* 19552 */ "Beijing Gtt Telecom Technologies Co.Ltd", /* 19553 */ "PIPPKRO", /* 19554 */ "Engim Inc", /* 19555 */ "NextJet Technologies", /* 19556 */ "Frank Holtz", /* 19557 */ "StoneHole", /* 19558 */ "Zones Inc", /* 19559 */ "Informationssicherheit Christian Scheucher", /* 19560 */ "Maxim Integrated Products, Inc.", /* 19561 */ "Telena Communication", /* 19562 */ "Center for Imaging Research", /* 19563 */ "GOLUM", /* 19564 */ "Escape Communications, Inc.", /* 19565 */ "C-Scape Consulting Corp.", /* 19566 */ "ScienceLogic LLC", /* 19567 */ "Global Gate Systems LLC.", /* 19568 */ "Grid Research Lab", /* 19569 */ "frottage.org", /* 19570 */ "Micromatic Tecnologia e Sistemas Ltda", /* 19571 */ "ecnuee", /* 19572 */ "Adeptiva", /* 19573 */ "Network Gulf Information Technology", /* 19574 */ "Sansay Inc.", /* 19575 */ "Slovanet a.s.", /* 19576 */ "ACE electronics N.V.", /* 19577 */ "IPConsulting AG", /* 19578 */ "Info Point", /* 19579 */ "RZF Rechenzentrum der Finanzverwaltung des Landes NRW", /* 19580 */ "TTC Telecom Ltd.", /* 19581 */ "Pixelpark AG", /* 19582 */ "Wayfarer Transit Systems Ltd.", /* 19583 */ "headissue GmbH", /* 19584 */ "Laboranowitsch", /* 19585 */ "ICAN (International Communications and Navigation Ltd.)", /* 19586 */ "Adtec Digital, Inc.", /* 19587 */ "Tecnologia Bancaria SA", /* 19588 */ "Business Link Kent Ltd", /* 19589 */ "Systems Solution, Inc.", /* 19590 */ "Oral Roberts University", /* 19591 */ "Prince Law Offices, P.C.", /* 19592 */ "Nerim", /* 19593 */ "MediaCell, Inc.", /* 19594 */ "Alcatel Shanghai Bell Co. Ltd.", /* 19595 */ "nhnghia", /* 19596 */ "Capnova Oy", /* 19597 */ "ianet", /* 19598 */ "GeniusBytes Software Solutions GmbH", /* 19599 */ "CTA Systemsource Inc.", /* 19600 */ "RGB Networks, Inc.", /* 19601 */ "Custom IdM Solutions", /* 19602 */ "dezcom", /* 19603 */ "Secure Network Systems, LLC", /* 19604 */ "Starview Technology Inc", /* 19605 */ "Nienschanz Ltd.", /* 19606 */ "Argelcom Limited", /* 19607 */ "Astea International Inc.", /* 19608 */ "Zytec", /* 19609 */ "BaseN Oy", /* 19610 */ "trustsec IT solutions GmbH", /* 19611 */ "Wyncote.net", /* 19612 */ "Willing Minds LLC", /* 19613 */ "Business Port Systems Inc.", /* 19614 */ "FCS India (Pvt) Ltd.", /* 19615 */ "InterCard AG", /* 19616 */ "Taglicht.Com Sàrl", /* 19617 */ "Return Data", /* 19618 */ "Go Net", /* 19619 */ "NETDEVICES INC.", /* 19620 */ "alibaba", /* 19621 */ "Shenzhen Union Broadband Communication Co., Ltd.", /* 19622 */ "is:energy czech a.s.", /* 19623 */ "MANDA", /* 19624 */ "Unilever PLC", /* 19625 */ "Permabit, Inc.", /* 19626 */ "NTPL", /* 19627 */ "webslingerZ, Inc.", /* 19628 */ "University of Cincinnati", /* 19629 */ "Alopa Networks Inc.", /* 19630 */ "eDial Inc.", /* 19631 */ "Rygo Technical Enterprises", /* 19632 */ "BOFH Networks Oy", /* 19633 */ "THALIX", /* 19634 */ "Prager, Sealy & Co. LLC", /* 19635 */ "SolNet Data Service", /* 19636 */ "Oakmoon Consulting, Inc.", /* 19637 */ "University of Texas at Arlington", /* 19638 */ "Teztech, Inc.", /* 19639 */ "Automated Marketing Solutions Inc.", /* 19640 */ "Holley Communications Group", /* 19641 */ "East Alabama Medical Center", /* 19642 */ "Yipes Enterprise Services Inc.", /* 19643 */ "Polaris Wireless Inc.", /* 19644 */ "Sioux Medical Systems B.V.", /* 19645 */ "Computing Edge, Inc.", /* 19646 */ "Frederiksborg Amt", /* 19647 */ "TransCore", /* 19648 */ "ERP-HQ Inc.", /* 19649 */ "etilize Inc.", /* 19650 */ "Seven-Star Inc.", /* 19651 */ "National Chi Nan University, Taiwan", /* 19652 */ "Integral Technology Solutions Pty Ltd", /* 19653 */ "Infoteria Corporation", /* 19654 */ "University of Zululand", /* 19655 */ "dreamtel", /* 19656 */ "PlewsNet", /* 19657 */ "Macro-System", /* 19658 */ "Paradigit Computers B.V.", /* 19659 */ "CRO24 GmbH", /* 19660 */ "Gleiss Lutz", /* 19661 */ "Telenor AB", /* 19662 */ "Secure-Group AS", /* 19663 */ "gr3 a/s", /* 19664 */ "Grazer Wechselseitige Versicherung AG", /* 19665 */ "Alcatel Suomi Oy", /* 19666 */ "Dr. Ing. h.c. F. Porsche AG", /* 19667 */ "A.S. Reiiseveranstaltungs GmbH", /* 19668 */ "aserva GmbH", /* 19669 */ "IT University of Copenhagen", /* 19670 */ "DMDsecure.com BV", /* 19671 */ "Gratisavisa Stimuli", /* 19672 */ "ByteHoard", /* 19673 */ "Catalis Health, Inc.", /* 19674 */ "Lixto Software GmbH", /* 19675 */ "University of Houston", /* 19676 */ "Unassigned", /* 19677 */ "Relinace Infocomm", /* 19678 */ "Prusch", /* 19679 */ "Dembach Goo Informatik GmbH", /* 19680 */ "vitadurum ag", /* 19681 */ "Balo n Co", /* 19682 */ "WelLink.,Ltd", /* 19683 */ "Town & Country Credit Corp.", /* 19684 */ "Virginia Dept. of Social Services", /* 19685 */ "net-concept", /* 19686 */ "Indicative Software, Inc", /* 19687 */ "Cargo IT AG", /* 19688 */ "Evolta B.V.", /* 19689 */ "Line4, Inc.", /* 19690 */ "eProcess Burkina", /* 19691 */ "Hoppe Dialog GmbH", /* 19692 */ "University of California Santa Cruz (UCSC)", /* 19693 */ "Enterprise Management Shareware", /* 19694 */ "projektfarm GmbH", /* 19695 */ "Cherrypicks", /* 19696 */ "May10 Technology Inc.", /* 19697 */ "Information Technology Services Department", /* 19698 */ "System Detection, Inc.", /* 19699 */ "Traqueur SA", /* 19700 */ "Mars Computer Systems Sp. J.", /* 19701 */ "BSZ Leonberg", /* 19702 */ "Agence de l'Eau Seine Normandie", /* 19703 */ "NetFocus S.R.L", /* 19704 */ "Citto Tecnologia LTDA", /* 19705 */ "BBned NV", /* 19706 */ "Micran Ltd.", /* 19707 */ "Brain BroadCast sas", /* 19708 */ "TexRamp, Inc.", /* 19709 */ "Bitbuzz Ltd", /* 19710 */ "scaryclowns.org", /* 19711 */ "WebSolve, Inc.", /* 19712 */ "Elfiq Inc.", /* 19713 */ "Logic Development", /* 19714 */ "LinkAir Communications, Inc.", /* 19715 */ "Ars Lumina, Inc.", /* 19716 */ "Greatmark", /* 19717 */ "Motorola Israel Ltd. - NSA", /* 19718 */ "QuaQuaNet", /* 19719 */ "Westmarsh Consulting Ltd", /* 19720 */ "BlazeArts Ltd. services.hu network", /* 19721 */ "CONYSER Consulting y Servicios S.L.", /* 19722 */ "Broadbus Technologies, Inc.", /* 19723 */ "DigiDyne Inc.", /* 19724 */ "D. Trust Certifikacna Autorita, a.s.", /* 19725 */ "Clinical Reference Laboratory, Inc.", /* 19726 */ "Shylex Telecomunicaciones, S.L.", /* 19727 */ "Techno-Toolsmiths", /* 19728 */ "SOFTREK CORPORATION", /* 19729 */ "Logic Etc, Inc.", /* 19730 */ "Sinaptica Networks", /* 19731 */ "dragonsdawn.net", /* 19732 */ "HUB Consulting, Inc.", /* 19733 */ "RAYCOM Co.,LTD.", /* 19734 */ "OGA SynCom Co..,LTD", /* 19735 */ "i-RAID", /* 19736 */ "Kyneste S.p.A.", /* 19737 */ "Campana", /* 19738 */ "UZorg B.V.", /* 19739 */ "Institut de Mathématiques et de Sciences Physiques/Université d'Abomey-Calavi", /* 19740 */ "Residential Technology, Incorporated", /* 19741 */ "Kazeon Systems, Inc", /* 19742 */ "jpwebworks Pty Ltd", /* 19743 */ "Novacoast, Inc.", /* 19744 */ "Dataflake Weblications", /* 19745 */ "Data Domain, Inc", /* 19746 */ "The Open and Free Technology Community", /* 19747 */ "Affiliated Computer Services, Inc. TripPak SERVICES", /* 19748 */ "CISNS", /* 19749 */ "Beijing YTT Telecom Technologies Co.,Ltd", /* 19750 */ "NOTE Torsby AB", /* 19751 */ "AIS, Aplicaciones de Inteligencia Artificial, S.A.", /* 19752 */ "Inexbee", /* 19753 */ "ESG Elektroniksystem- und Logistik-GmbH", /* 19754 */ "Pera International Ltd", /* 19755 */ "Schwabing Software", /* 19756 */ "Iontas", /* 19757 */ "Hafsjold Data ApS", /* 19758 */ "Compunetix, Inc", /* 19759 */ "Leon County Schools", /* 19760 */ "Gordon Aluminum Industries, Inc.", /* 19761 */ "Caminos y Canales Ltd.", /* 19762 */ "Branch Banking and Trust Corporation", /* 19763 */ "Vandenberg Systems Inc.", /* 19764 */ "Systems Engineering Associates, Inc.", /* 19765 */ "Wuhan University of Technology", /* 19766 */ "Cooperativa Novanta s.c.r.l.", /* 19767 */ "Skybox Security Ltd.", /* 19768 */ "JLCX Inc", /* 19769 */ "SelfSigned.com", /* 19770 */ "IBM, Tivoli Provisioning and Orchestration", /* 19771 */ "Mobile Wisdom, Inc.", /* 19772 */ "New-Global Corporation", /* 19773 */ "mBlox, Inc.", /* 19774 */ "IPG Photonics Corporation", /* 19775 */ "TI Paperco Inc.", /* 19776 */ "Taylor University", /* 19777 */ "LinguaNet", /* 19778 */ "BOBEK", /* 19779 */ "Claridion Inc.", /* 19780 */ "Odys-solutions", /* 19781 */ "AEGEE-Utrecht", /* 19782 */ "NorthLANs Alliance, LLC", /* 19783 */ "Little Box Solutions Inc.", /* 19784 */ "Grand Central Communications", /* 19785 */ "Esteban Pizzini", /* 19786 */ "Ayub Yaqub", /* 19787 */ "LDT Communication Technology CO. LTD", /* 19788 */ "Sheard and Company Pty Limited", /* 19789 */ "INSE7120 conU", /* 19790 */ "MW EDV-Beratung", /* 19791 */ "Forte IT", /* 19792 */ "firstServed NV", /* 19793 */ "IP Security Consulting", /* 19794 */ "AssetHouse Technology Ltd", /* 19795 */ "Jostens Inc", /* 19796 */ "Stefan Fiedler KEG", /* 19797 */ "FBIS", /* 19798 */ "Jeremy McMillan", /* 19799 */ "Derek Balling", /* 19800 */ "PineApp Ltd.", /* 19801 */ "Atlanta Business Software, Inc.", /* 19802 */ "EC Telecom", /* 19803 */ "The Norns Laboratories", /* 19804 */ "idiotwind.org", /* 19805 */ "SportOdds Systems Pty Limited", /* 19806 */ "AlarmsPro Inc.", /* 19807 */ "Open Cloud Ltd.", /* 19808 */ "GOUDRON S.A.R.L.", /* 19809 */ "R Brooks Associates, Inc.", /* 19810 */ "WildOne Information Systems", /* 19811 */ "Hsiuping Institute of Technology", /* 19812 */ "Systems International", /* 19813 */ "Duosoft Inc", /* 19814 */ "Getronics Solutions Malaysia", /* 19815 */ "Philips Medizin Systeme Boeblingen GmbH", /* 19816 */ "Soluzioni Informatiche s.r.l.", /* 19817 */ "KIABI", /* 19818 */ "Informatik Club der Universität Zürich - ICU", /* 19819 */ "Prival ODC, Inc.", /* 19820 */ "Bridgeport Networks", /* 19821 */ "Bossers & Cnossen BV", /* 19822 */ "Castle Building Centres Group Ltd.", /* 19823 */ "teleganov.net", /* 19824 */ "Kisslinger EDV-Beratung", /* 19825 */ "Institut Teknologi Bandung (ITB)", /* 19826 */ "N2N Consulting Pte Ltd", /* 19827 */ "LBCN Communication Technology Co.,LTD.", /* 19828 */ "BITSTREAM", /* 19829 */ "VDL SA", /* 19830 */ "IRT Institut fuer Rundfunktechnik GmbH", /* 19831 */ "Rostrvm Solutions Ltd", /* 19832 */ "Team17 Software Ltd.", /* 19833 */ "Bulldog Communications Ltd", /* 19834 */ "Excibir Ltd.", /* 19835 */ "Qwest QNMS", /* 19836 */ "USPFO for CA", /* 19837 */ "Univits International AB", /* 19838 */ "Synthean Inc.", /* 19839 */ "Avalon Networks Inc.", /* 19840 */ "Public Communications Services, Inc.", /* 19841 */ "Pantel Service & Holding GmbH", /* 19842 */ "anarcho.com", /* 19843 */ "MOBIGEN Co., Ltd.", /* 19844 */ "Solenovo Oy", /* 19845 */ "DDI POCKET,Inc", /* 19846 */ "KU Communication Technology Co.,LTD", /* 19847 */ "University of Bologna", /* 19848 */ "NSFOCUS Ltd.", /* 19849 */ "Waggener Edstrom", /* 19850 */ "Telnet ISG", /* 19851 */ "Southern Utah University", /* 19852 */ "aapala.com", /* 19853 */ "UCLA EE AINS LAB", /* 19854 */ "AIS Management GmbH", /* 19855 */ "Mobile TeleSystems OJSC, Komi Republic", /* 19856 */ "Kuban-GSM CJSC", /* 19857 */ "IPC Media Limited", /* 19858 */ "CGSS Guyane", /* 19859 */ "CGS Corporate Group Service Ltd", /* 19860 */ "Wake Forest University", /* 19861 */ "Motivity Telecom Inc.", /* 19862 */ "Tippett Studio", /* 19863 */ "Jostens Inc", /* 19864 */ "NEOMONTANA ELECTRONIS", /* 19865 */ "Edouard Boissonneault", /* 19866 */ "digitec GmbH", /* 19867 */ "Krafty Creations, Inc.", /* 19868 */ "Beagle Internet Pty Ltd", /* 19869 */ "The dot.GOD Registry, Limited", /* 19870 */ "AG Consulting, LLP.", /* 19871 */ "TVEngineer.org", /* 19872 */ "MarsolsNet Inc.", /* 19873 */ "Distributel Communications Ltd.", /* 19874 */ "hutuworm.org Inc.", /* 19875 */ "USE", /* 19876 */ "Nuernberger Versicherungsgruppe", /* 19877 */ "ITNet S.p.a.", /* 19878 */ "Makedonski Telekomunikacii, MTnet", /* 19879 */ "Conarcom C.A. Sirena", /* 19880 */ "AEGEE-Europe", /* 19881 */ "Radius., Ltd", /* 19882 */ "Meta4 Spain S.A.", /* 19883 */ "Ontier", /* 19884 */ "Navimedix Inc.", /* 19885 */ "Corio, inc", /* 19886 */ "California School Information Services", /* 19887 */ "The Tarc Group", /* 19888 */ "AppTrigger", /* 19889 */ "Global Interactive Technology Pte Ltd", /* 19890 */ "bay. Innenministerium (Verfassungsschutz)", /* 19891 */ "HONKO MFG.co.,ltd.", /* 19892 */ "Brighton Consulting Inc.", /* 19893 */ "CubeRoot", /* 19894 */ "Heolys France SARL", /* 19895 */ "udayan kumar", /* 19896 */ "IUT FOTSO Victor de Bandjoun, Université de Dschang", /* 19897 */ "LT Systems LLC", /* 19898 */ "Thinking Systems Corporation", /* 19899 */ "Advanced RF Technologies, Inc.", /* 19900 */ "Atkinson, Inglis & Associates", /* 19901 */ "University of Texas Pan American", /* 19902 */ "Jharding", /* 19903 */ "Sage Technology Ltd.", /* 19904 */ "Beijing YTT Telecom Technologies Co.,Ltd", /* 19905 */ "Europacom.net Ltd", /* 19906 */ "Alpha Oil Ltd.", /* 19907 */ "Alcopack Group", /* 19908 */ "PadzNet, Inc.", /* 19909 */ "DirecTrust", /* 19910 */ "Global Velocity Inc.", /* 19911 */ "Phatline", /* 19912 */ "murphx Innovative Solutions Ltd", /* 19913 */ "Optus SingTel Pty Ltd.", /* 19914 */ "BeiJing Gefon Network Technology Ltd.", /* 19915 */ "Fundación ESADE", /* 19916 */ "Sungard Finance", /* 19917 */ "Phoenix IT Services", /* 19918 */ "IPL Information Processing Ltd", /* 19919 */ "PREVX Ltd.", /* 19920 */ "Gross", /* 19921 */ "Iowa State University", /* 19922 */ "ei3 Corporation", /* 19923 */ "Mirror Image Internet", /* 19924 */ "Triadigm Technology", /* 19925 */ "Feith Systems and Software, Inc.", /* 19926 */ "Escherware b.v.", /* 19927 */ "Linuxlab Ltd.", /* 19928 */ "4X Information Technology GmbH", /* 19929 */ "SalesCatalysts.com Ltd.", /* 19930 */ "BluntSoft Ltd.", /* 19931 */ "MITTS Ltd.", /* 19932 */ "University of Tasmania", /* 19933 */ "Key Business Services", /* 19934 */ "Allnet GmbH", /* 19935 */ "Philip Morris International Management SA", /* 19936 */ "Cogent Innovators, LLC", /* 19937 */ "OU College of Continuing Education", /* 19938 */ "AWARM.NET, Ltd.", /* 19939 */ "broadreach systems", /* 19940 */ "Lind-Waldock", /* 19941 */ "Jumbo Corporation", /* 19942 */ "D2D Cars", /* 19943 */ "Sunwest Computers Ltd.", /* 19944 */ "Abilitec Limited", /* 19945 */ "ITS Pub", /* 19946 */ "WIENER Plein & Baus GmbH", /* 19947 */ "OOO Maxidom", /* 19948 */ "Bellmonte", /* 19949 */ "Sveriges Television AB (SVT)", /* 19950 */ "AREA", /* 19951 */ "Message Systems, Inc.", /* 19952 */ "Ironworks Consulting, LLC", /* 19953 */ "CenterBoard Inc", /* 19954 */ "Tenebris Technologies Inc.", /* 19955 */ "Kabissa Inc.", /* 19956 */ "Aurora Network Operations Management Services", /* 19957 */ "nex-G Systems Pte. Ltd.", /* 19958 */ "Lund University", /* 19959 */ "SER Storage Technology GmbH", /* 19960 */ "Central Research Institute for Machine Building", /* 19961 */ "Netservers Ltd.", /* 19962 */ "Enigma Software Corporation", /* 19963 */ "TRIBUNAL REGIONAL DO TRABALHO DA 22A. REGIÃO", /* 19964 */ "Spotwave Wireless, Inc.", /* 19965 */ "Telexy Corp.", /* 19966 */ "Meta Consulting", /* 19967 */ "Network Intelligence Corporation", /* 19968 */ "Klamath Networks Corp.", /* 19969 */ "Clever Machine, Inc.", /* 19970 */ "Tripleplay Services Ltd.", /* 19971 */ "David Nesting", /* 19972 */ "Vader Logic, LLC", /* 19973 */ "Estonian Educational and Research Network", /* 19974 */ "ICTeam S.p.A.", /* 19975 */ "Alberti Holdings Pty. Ltd.", /* 19976 */ "Theta Networks, Inc.", /* 19977 */ "o2 (Germany) GmbH & Co. OHG", /* 19978 */ "INPES", /* 19979 */ NULL, /* 19980 */ "Venetica", /* 19981 */ "Cap Gemini Norway", /* 19982 */ "Cu-nes", /* 19983 */ "Pittsburg State University", /* 19984 */ "Vigoment Software Inc.", /* 19985 */ "void solutions", /* 19986 */ "Anerist", /* 19987 */ "Rezel", /* 19988 */ "Netlanta.com", /* 19989 */ "NetTeem, LLC", /* 19990 */ "Beijing Zhengyou Networks&Communication Technology Co.,Ltd.", /* 19991 */ "Ericsson, Inc.", /* 19992 */ "S2 Systems, Inc.", /* 19993 */ "Shanghai Withub General Technology Co.,Ltd.", /* 19994 */ "SPES S.r.l.", /* 19995 */ "SwissQual AG", /* 19996 */ "4D Technology (llc)", /* 19997 */ "Netspecs B.V.", /* 19998 */ "eEpoch", /* 19999 */ "Ing. Büro Ziegler", /* 20000 */ "Ukraine Trust Network", /* 20001 */ "RZNet AG", /* 20002 */ "PTK Centertel sp z o. o.", /* 20003 */ "HEUFT SYSTEMTECHNIK GMBH", /* 20004 */ "Air Products and Chemicals, Inc.", /* 20005 */ "Nagios", /* 20006 */ "Kenati Technologies Inc.", /* 20007 */ "Toshiba Electronics Europe GmbH", /* 20008 */ "Beaver Creek Cooperative Telephone Company", /* 20009 */ "reuter network consulting", /* 20010 */ "System Business Consulting", /* 20011 */ "QinetiQ Ltd", /* 20012 */ "Vanguard Integity Professionals", /* 20013 */ "Fernandez Industries Incorporated", /* 20014 */ "Ville d'Yverdon", /* 20015 */ "Mountain Top Applied Solutions, Inc.", /* 20016 */ "Dansk Netcenter APS", /* 20017 */ "River City Software Associates, Ltd.", /* 20018 */ "Antarctica Networks Ltd.", /* 20019 */ "Pacific Wave Solutions, Incorporated", /* 20020 */ "Boswell Online B.V.", /* 20021 */ "TETCO TECHNOLOGIES SA", /* 20022 */ "Rezel", /* 20023 */ "Proxyconn, Inc.", /* 20024 */ "Compusaurus Bt.", /* 20025 */ "RedeNetwork.com", /* 20026 */ "TDK-LAMBDA Corporation", /* 20027 */ "Line-tec, Inc.", /* 20028 */ "Mortara Instrument, Inc.", /* 20029 */ "ValidSoft Ltd", /* 20030 */ "Qnamic AG", /* 20031 */ "KISTER", /* 20032 */ "Dicr", /* 20033 */ "rjcdb.com", /* 20034 */ "Alexander Kellmann", /* 20035 */ "Advanced Control Technology, Inc.", /* 20036 */ "HISL Limited", /* 20037 */ "LithiumCorp Pty Ltd", /* 20038 */ "Shanghai Communications Technologies Center", /* 20039 */ "GUMC", /* 20040 */ "INGENION GmbH", /* 20041 */ "Hitel Italia S.p.A.", /* 20042 */ "Grupo 3A Recoletas", /* 20043 */ "Ekinops SAS", /* 20044 */ "Corporate Express Promotional Marketing", /* 20045 */ "Pilgerer e.V", /* 20046 */ "theglobe.com", /* 20047 */ "Internet Broadcasting Systems", /* 20048 */ "GnuArch", /* 20049 */ "Western United Insurance", /* 20050 */ "GlobalSkyVault", /* 20051 */ "Intesa Sanpaolo S.p.A.", /* 20052 */ "I.NET2 S.r.l.", /* 20053 */ "Statistisches Bundesamt", /* 20054 */ "FRANCE2", /* 20055 */ "ASC Program", /* 20056 */ "Lumenos, Inc.", /* 20057 */ "Aramiska", /* 20058 */ "Acsera Corporation", /* 20059 */ "Pacific University", /* 20060 */ "Seacoast Synergy, Inc.", /* 20061 */ "University of Crete - Faculty of Medicine", /* 20062 */ "vandalsWeb.com", /* 20063 */ "Tohoku Intelligent Telecommunication Co.,Inc.", /* 20064 */ "Omega Consult Inc.", /* 20065 */ "Entheos Software", /* 20066 */ "Karlstad University", /* 20067 */ "Artinfor", /* 20068 */ "JDG Trading(Pty Ltd.)", /* 20069 */ "Telecom Italia S.p.A.", /* 20070 */ "Electronic Formations", /* 20071 */ "IWKA InformationsSysteme GmbH", /* 20072 */ "Abundance Networks, LLC", /* 20073 */ "Freerun Technologies Inc.", /* 20074 */ "Werthmoeller IT-Service", /* 20075 */ "Makaera Vir 2000 Inc.", /* 20076 */ "cMarket, Inc.", /* 20077 */ "Escobar Enterprises", /* 20078 */ "SK-TECH.net", /* 20079 */ "MFD", /* 20080 */ "Alanne LLC", /* 20081 */ "ECE Projektmanagement", /* 20082 */ "Techno Group, Inc", /* 20083 */ "OnlineWeb Ltd.", /* 20084 */ "HyperSpace Communications, Inc.", /* 20085 */ "JRC ENGINEERING CO.,LTD.", /* 20086 */ "Consultix GmbH", /* 20087 */ "Renewal Enterprises, LLC", /* 20088 */ "Cornerstone Consulting, LLC", /* 20089 */ "AIS Automations- und Informationssysteme GmbH", /* 20090 */ "SyAM Software, Inc.", /* 20091 */ "Servicios de i-pro para competitividad, S.A. de C.V.", /* 20092 */ "TrekLogic Inc.", /* 20093 */ "Vaonet", /* 20094 */ "Positron Access Solutions Corp", /* 20095 */ "Image Entry, Inc.", /* 20096 */ "Plope Consulting", /* 20097 */ "Dave Hoebe", /* 20098 */ "Impulse Internet Services", /* 20099 */ "Spliced Networks LLC", /* 20100 */ "Cox Enterprises", /* 20101 */ "multi.mediale.net.ltd", /* 20102 */ "allery.org", /* 20103 */ "Digital Evergreen, Inc.", /* 20104 */ "Nàh-ko's world Inc.", /* 20105 */ "Center for Leadership Solutions LLC", /* 20106 */ "ANIXIS", /* 20107 */ "LPC Condor Technologies", /* 20108 */ "Cynap Limited", /* 20109 */ "MediaPlan Inc.", /* 20110 */ "LEADER ELECTRONICS CORP.", /* 20111 */ "SMT Electronic Technology Limited", /* 20112 */ "Vecino", /* 20113 */ "Systems Management Enterprises, Inc.", /* 20114 */ "J'raxis", /* 20115 */ "Janr", /* 20116 */ "Institute of Applied Internet Technology, Inc.", /* 20117 */ "KCN Tech Co., Ltd.", /* 20118 */ "EuroMarknet Internet Technológiai és Tanácsadó Ltd.", /* 20119 */ "VIDEOTRON Corp.", /* 20120 */ "imos GmbH", /* 20121 */ "mind-n", /* 20122 */ "Sébastien Namèche Consulting", /* 20123 */ "Cologne Systems GmbH", /* 20124 */ "Vitel Software, Inc", /* 20125 */ "LP Agent", /* 20126 */ "TTYS0", /* 20127 */ "SKH TKO Kei Tak Primary School", /* 20128 */ "SOURCECORP,Inc.", /* 20129 */ "Advanced Digital Systems, Inc.", /* 20130 */ "Vermeer Manufacturing Company", /* 20131 */ "Azonic Systems, Inc.", /* 20132 */ "izac.org", /* 20133 */ "Surf and Sip Inc.", /* 20134 */ "Elyo Services Ltd", /* 20135 */ "SCHMIEDER it-solutions GmbH", /* 20136 */ "codesupply.com", /* 20137 */ "Avara Technologies Pty Ltd.", /* 20138 */ "Lobos, Inc.", /* 20139 */ "DAVOLINK", /* 20140 */ "Axis Internet", /* 20141 */ "QianWang Networks Co.", /* 20142 */ "Uffaq Technologies Private Ltd.", /* 20143 */ "Optimo Service AG", /* 20144 */ "ELVIS-PLUS", /* 20145 */ "Ecutel", /* 20146 */ "Internet NetOnRamp", /* 20147 */ "runIT AG", /* 20148 */ "Optim Ltd Int Grp", /* 20149 */ "Zon Nederland N.V.", /* 20150 */ "Martin-Luther-Universitaet Halle-Wittenberg", /* 20151 */ "eurofunk Kappacher GmbH", /* 20152 */ "ALCA INFORMATIQUE et TELECOM", /* 20153 */ "Redes de Telefonía Móvil, S.A.", /* 20154 */ "Winterthur Ibérica, AIE", /* 20155 */ "Lowe's Companies, Inc.", /* 20156 */ "High Desert Education Service District", /* 20157 */ "Washburn University", /* 20158 */ "Force, Incorporated", /* 20159 */ "Hilton Hotels Corporation", /* 20160 */ "EWE TEL GmbH", /* 20161 */ "Trinity Capital Corporation", /* 20162 */ "Kerna Communications Ltd.", /* 20163 */ "Subrafta Industries, Inc.", /* 20164 */ "NIE Corporation", /* 20165 */ "DEODEO Co,.Ltd", /* 20166 */ "Sonic Industries Inc.", /* 20167 */ "Gesellschaft fuer wissenschaftliche Datenverarbeitung mbH Goettingen", /* 20168 */ "Urmet TLC S.p.A.", /* 20169 */ "Systemlegionen", /* 20170 */ "Burwood Group, Inc.", /* 20171 */ "CRI Advantage", /* 20172 */ "sd&m AG", /* 20173 */ "Weldata bv", /* 20174 */ "FOR-A Company Ltd.", /* 20175 */ "Mark Rose", /* 20176 */ "Chrome Cyz Co Ltd", /* 20177 */ "NetShield (Pty) Ltd", /* 20178 */ "RNDSoft co.,ltd", /* 20179 */ "SONGHWASOFT", /* 20180 */ "The Reynolds and Reynolds Company", /* 20181 */ "Appmind Software AB", /* 20182 */ "William G Dempsey & Associates", /* 20183 */ "Montreal University", /* 20184 */ "Brake Parts Inc", /* 20185 */ "Panareef Pty Ltd", /* 20186 */ "Gary T. Giesen", /* 20187 */ "PHOENIX SOFT", /* 20188 */ "Nature Care College", /* 20189 */ "iCable System", /* 20190 */ "Throughwave, Inc.", /* 20191 */ "JK Technologies Corp.", /* 20192 */ "ERZIA Technologies, SL", /* 20193 */ "Volexia Ltd.", /* 20194 */ "AL.systems GmbH", /* 20195 */ "Rainbow Triangle, v. o. s.", /* 20196 */ "St. Olaf College", /* 20197 */ "Equinox Information Systems, Inc", /* 20198 */ "SUSCERTE - Gobierno de la Republica Bolivariana de Venezuela", /* 20199 */ "Sioss Ltd", /* 20200 */ "Kinnarps AB", /* 20201 */ "First Canadian Title Company Ltd.", /* 20202 */ "First Canadian Title Company Ltd.", /* 20203 */ "EBC", /* 20204 */ "TIS Grupa d.o.o.", /* 20205 */ "The Unwins Wine Group Ltd", /* 20206 */ "Closed Joint Stock Company \"PIOGLOBAL Services\"", /* 20207 */ "Latitude Technologies, Inc.", /* 20208 */ "Submersion Corporation", /* 20209 */ "Vigilant Privacy Corporation", /* 20210 */ "Information and Telecommunications Technology Center", /* 20211 */ "Q1Labs, Inc.", /* 20212 */ "Rock Island Communications, Inc.", /* 20213 */ "Nordic Institute for Theoretical Physics", /* 20214 */ "Netkey, Inc.", /* 20215 */ "more4u gbr", /* 20216 */ "Polystar Instruments AB", /* 20217 */ "Ajeco Oy", /* 20218 */ "BSH Hausgeraete GmbH", /* 20219 */ "EB Software Enk, John Weholdt", /* 20220 */ "IMAGINEON oHG", /* 20221 */ "PROFSOFT Sp. z o.o.", /* 20222 */ "Ementor Norge AS", /* 20223 */ "Institut Pasteur", /* 20224 */ "Sub Service Ltd.", /* 20225 */ "Cel*Star Guyana Inc.", /* 20226 */ "BitPoint AG", /* 20227 */ "Teleflex Incorporated", /* 20228 */ "Karl Hofmann Schule Berufsbildende Schule", /* 20229 */ "Luis Lewis", /* 20230 */ "LDAP Technology", /* 20231 */ "LocalNet Systems", /* 20232 */ "Pro-G Information Security and Research Ltd.", /* 20233 */ "Superlativ", /* 20234 */ "LinuxForce, Inc.", /* 20235 */ "China Telecom-Guangzhou Research and Development Center", /* 20236 */ "PJ Velzeboer", /* 20237 */ "AMBIZ, Inc.", /* 20238 */ "Sterrewacht Leiden", /* 20239 */ "CICA", /* 20240 */ "Premiere Fernsehen GmbH & Co. KG", /* 20241 */ "Stephan Ruckelshaussen", /* 20242 */ "SNR S.A.", /* 20243 */ "Police IT Management Agency", /* 20244 */ "Deverto Systems Ltd.", /* 20245 */ "Delta Energy Systems (Sweden) AB", /* 20246 */ "Bladiant Technologies, Inc.", /* 20247 */ "Sony Computer Entertainment America, Inc.", /* 20248 */ "Touchstone Systems, Inc.", /* 20249 */ "GlobeRanger Corporation", /* 20250 */ "BN", /* 20251 */ "North American World Trade Group", /* 20252 */ "iologics, Inc.", /* 20253 */ "Mediatria s.r.l.", /* 20254 */ "Xalted Information Systems Pvt. Ltd", /* 20255 */ "Communicate Norge AS", /* 20256 */ "Azienda Ospedaliera Villascassi", /* 20257 */ "Sabanci University", /* 20258 */ "Sandprints", /* 20259 */ "MDTelecom, Inc.", /* 20260 */ "EMS Wireless", /* 20261 */ "Odyssey Software, Inc.", /* 20262 */ "Aurisp", /* 20263 */ "Muiderberg (M.H.C.)", /* 20264 */ "Cambridge University Faculty of Music", /* 20265 */ "OnWeb Technologies, c.a.", /* 20266 */ "Days of Wonder Inc.", /* 20267 */ "Chelsea Technologies Inc.", /* 20268 */ "University of Yamanashi", /* 20269 */ "xtendo technologies Kurt Schwedes", /* 20270 */ "NetEnrich, Inc.", /* 20271 */ "Creative Media GmbH", /* 20272 */ "Kunsthistorisches Museum", /* 20273 */ "Cyber Ware Ltd", /* 20274 */ "Ex Fructu Kft.", /* 20275 */ "Citadec Solutions OY", /* 20276 */ "System-Net", /* 20277 */ "Sakana-home.net", /* 20278 */ "The Polestar Group Ltd", /* 20279 */ "CERNET, China Education and Research Network", /* 20280 */ "3TNet Experimental Network", /* 20281 */ "Cribbins Associates", /* 20282 */ "KnowGate", /* 20283 */ "FAURECIA", /* 20284 */ "E-work S.p.A", /* 20285 */ "VirusBuster Ltd.", /* 20286 */ "Katholieke Theologische Universiteit", /* 20287 */ "TimeLink International GmbH", /* 20288 */ "indatex GmbH", /* 20289 */ "CNA INSURANCE", /* 20290 */ "onTimeTek Inc.", /* 20291 */ "Dept. Network Center, China University of Geosciences", /* 20292 */ "Onirban Networks", /* 20293 */ "Caperio AB", /* 20294 */ "Euler Hermes Poland", /* 20295 */ "Banco Popular", /* 20296 */ "Rodos", /* 20297 */ "If-Tech", /* 20298 */ "Sussex Community Wireless", /* 20299 */ "InsightETE", /* 20300 */ "IBM eServer X", /* 20301 */ "Medica", /* 20302 */ "Banco Industrial e Comercial S.A.", /* 20303 */ "Matrix Bancorp", /* 20304 */ "DIR A/S", /* 20305 */ "Kapsch CarrierCom AG", /* 20306 */ "Lie-Comtel", /* 20307 */ "Regent Group of Companies", /* 20308 */ "CIRIL - Centre Interuniversitaire de Ressources Informatiques de Lorraine, Nancy - FRANCE", /* 20309 */ "Nicotra Sistemi spa", /* 20310 */ "Views On News", /* 20311 */ "Semantico Limited", /* 20312 */ "ix-tech", /* 20313 */ "FabDouglas", /* 20314 */ "OCA \"OpenCallArgentina\"", /* 20315 */ "Qosmetrics, Inc.", /* 20316 */ "Lissi Co. Ltd.", /* 20317 */ "Friedrich + Lochner GmbH", /* 20318 */ "University of California, San Francisco, Information Technology Services", /* 20319 */ "CAE Inc", /* 20320 */ "G+G Comsoft GmbH", /* 20321 */ "Udo Schledorn EDV-Beratung", /* 20322 */ "Success Medical Computer Co., Ltd.", /* 20323 */ "Provinzial Rheinland Versicherung AG", /* 20324 */ "neska Schiffahrts- und Speditionskontor GmbH", /* 20325 */ "Education Nationale", /* 20326 */ "Helsinki Polytechnic Stadia", /* 20327 */ "Whitehead Institute for Biomedical Research", /* 20328 */ "University of Maine at Farmington", /* 20329 */ "WPS Health Insurance", /* 20330 */ "ILTC - Instituto Doris Aragon", /* 20331 */ "Bau- und Wohngenossenschaft Brachvogel", /* 20332 */ "ASC System", /* 20333 */ "IDS GmbH", /* 20334 */ "Teknologisk Institut", /* 20335 */ "N&TS spa", /* 20336 */ "Arquematica", /* 20337 */ "Addamark Technologies, Inc.", /* 20338 */ "Daniel Kelley and Associates", /* 20339 */ "Information Builders, Inc", /* 20340 */ "LifeSize Communications, Inc", /* 20341 */ "Agencia Marítima de Consignaciones, S.A.", /* 20342 */ "Altexia", /* 20343 */ "Portrait Displays, Inc.", /* 20344 */ "Edgewater Computer Systems. Inc.", /* 20345 */ "MetroFi, Inc.", /* 20346 */ "Equinox Converged Solutions Ltd", /* 20347 */ "ARCUS Software Pty Ltd", /* 20348 */ "Aruba S.r.l.", /* 20349 */ "Milos Malik", /* 20350 */ "European Bridge-CA", /* 20351 */ "UNATECH.CO.,LTD", /* 20352 */ "Ebang Telecom Technologies HangZhou Co., Ltd", /* 20353 */ "Plexis Computing Limited", /* 20354 */ "Bundesverband der Deutschen Industrie e.V.", /* 20355 */ "CONTER Control de Energía, S.A.", /* 20356 */ "TINC Associates NV", /* 20357 */ "Concordia College", /* 20358 */ "On Command Corporation", /* 20359 */ "Cronbank AG", /* 20360 */ "Ecole Centrale de Nantes", /* 20361 */ "Alcanet International Deutschland GmbH", /* 20362 */ "Terrecablate", /* 20363 */ "System Engineering International", /* 20364 */ "Malam Communications LTD", /* 20365 */ "DBI Technologies", /* 20366 */ "Univates", /* 20367 */ "Manzanita Systems", /* 20368 */ "MEPHARTEC s.a.r.l", /* 20369 */ "Allware LTDA.", /* 20370 */ "VhaYu Technologies", /* 20371 */ "Michael A Nachbaur", /* 20372 */ "Coast to Coast Hosting", /* 20373 */ "AVAL NAGASAKI CORPORATION", /* 20374 */ "ATT - AudioText Telecom AG", /* 20375 */ "Century Systems Inc.", /* 20376 */ "ITMG GmbH", /* 20377 */ "Sabancy Telekomünikasyon Hizmetleri A.?.", /* 20378 */ "Specstroy-Svyaz", /* 20379 */ "Privacy, Inc.", /* 20380 */ "ShopperTrak", /* 20381 */ "Working Knowledge, Inc", /* 20382 */ "CNCLabs(CHINA NETCOM GROUP LABS)", /* 20383 */ "GAIA e.V.", /* 20384 */ "Frameworx, Inc.", /* 20385 */ "Apple Daily Publication Development Limited,Taiwan Branch", /* 20386 */ "Externet Kft", /* 20387 */ "Streamwide SAS", /* 20388 */ "Cape Clear Software", /* 20389 */ "OT Energy Services a.s.", /* 20390 */ "FAKUS Elektronik GmbH", /* 20391 */ "Oberfinanzdirektion Berlin", /* 20392 */ "Money Services, Inc.", /* 20393 */ "ackrium", /* 20394 */ "Sircom software", /* 20395 */ "Erbach Associates", /* 20396 */ "Telecooperation Office, University of Karlsruhe", /* 20397 */ "Quintech Electronics and Communications Inc.", /* 20398 */ "Educational Consulting Services, Inc.", /* 20399 */ "Raytech Technologies, Ltd.", /* 20400 */ "InterMetro Communications", /* 20401 */ "COSTRON Co., Ltd.", /* 20402 */ "First Communication, Inc.", /* 20403 */ "PT. ELEKTRINDO NUSANTARA", /* 20404 */ "Omkhar, LLC", /* 20405 */ "Naesasoft,Inc.", /* 20406 */ "Fuhrer Engineering AG", /* 20407 */ "pysnmp", /* 20408 */ "Kvinnherad Breiband AS", /* 20409 */ "Janusys Networks, Inc.", /* 20410 */ "lepo", /* 20411 */ "OAO Link", /* 20412 */ "University of Exeter", /* 20413 */ "Fracarro Radioindustrie S.p.A.", /* 20414 */ "Solid AB", /* 20415 */ "Fifth Third Bank", /* 20416 */ "EUROTUNNEL", /* 20417 */ "VectorMAX Corporation", /* 20418 */ "Security Certificates UK ltd", /* 20419 */ "Dyaptive Systems Inc.", /* 20420 */ "RangoSur S.A.", /* 20421 */ "The Log4perl Project", /* 20422 */ "NSS S.A.", /* 20423 */ "LUKA netconsult GmbH", /* 20424 */ "Noea Corporation", /* 20425 */ "Tellus Group Corp.", /* 20426 */ "TKD", /* 20427 */ "ISTIA-AUTO", /* 20428 */ "Kaliop Interactive Media", /* 20429 */ "OPTIMUM SYSTEMES INFORMATION", /* 20430 */ "Inventa Technologies, Inc.", /* 20431 */ "iTRACS Corporation", /* 20432 */ "Phoenix Broadband Technologies, LLC.", /* 20433 */ "Boca Internet Technologies, Inc. dba AlertSite", /* 20434 */ "Seenetix d.o.o.", /* 20435 */ "TransUnion LLC", /* 20436 */ "Func. Internet Integration", /* 20437 */ "CITIZEN WATCH CO.,LTD", /* 20438 */ "Bodgit & Scarper", /* 20439 */ "PATLITE Corporation", /* 20440 */ "REMASYS Pty. Ltd.", /* 20441 */ "Samsung SDS Co, Ltd.", /* 20442 */ "Open Development", /* 20443 */ "MAX SCHMIDT PAPIERLOGISTIK", /* 20444 */ "Noncommercial partnership ", /* 20445 */ "Colegio Ingenieros Caminos Canales Puertos", /* 20446 */ "APX UK Ltd.", /* 20447 */ "Gibr.Net", /* 20448 */ "NetWisdom(Beijing)Technology co,ltd", /* 20449 */ "Indigo Corp.", /* 20450 */ "Identiga Karto", /* 20451 */ "FishNet, Inc.", /* 20452 */ "Nakina Systems", /* 20453 */ "Middlesex Community College", /* 20454 */ "Concorde Microsystems", /* 20455 */ "Omnis Network, LLC", /* 20456 */ "Incipient, Inc.", /* 20457 */ "Schneider National, Inc.", /* 20458 */ "Oki Electric Industry Co., Ltd.", /* 20459 */ "goldenfile ltd", /* 20460 */ "Organika-Kuznetsk", /* 20461 */ "Multimedia Project Srl", /* 20462 */ "Perceval", /* 20463 */ "Mi4e AB", /* 20464 */ "Caja de Ahorros de CASTILLA-LA MANCHA", /* 20465 */ "DS Wilson Consulting", /* 20466 */ "SAPIENS TECHNOLOGIES Ltd", /* 20467 */ "TatraMed Software s.r.o.", /* 20468 */ "Lycos Europe GmbH", /* 20469 */ "WINGcon GmbH", /* 20470 */ "Banca di Roma S.p.A.", /* 20471 */ "Lyra Network", /* 20472 */ "Parlamento de Andalucia", /* 20473 */ "LondonLink Ltd", /* 20474 */ "Avalanche Mobile BV", /* 20475 */ "Fachhochschule Ravensburg-Weingarten", /* 20476 */ "Buongiorno S.p.A.", /* 20477 */ "Noopys Store company", /* 20478 */ "UMC Genomics Lab", /* 20479 */ "StrikeForce Technologies, Inc.", /* 20480 */ "CUBETECH", /* 20481 */ "L B Enterprises", /* 20482 */ "Ministerio de Hacienda", /* 20483 */ "Sukra Helitek, Inc.", /* 20484 */ "Fuchsia Open Source Solutions", /* 20485 */ "ChyronHego Corporation", /* 20486 */ "AXT Systems Pty Limited", /* 20487 */ "DTMC Systems", /* 20488 */ "Geotek Design Services", /* 20489 */ "China Putian Institute of Technology", /* 20490 */ "Teamsun Technology Co.,Ltd", /* 20491 */ "MTT Computer Consulting, Inc", /* 20492 */ "Koblenzer Elektrizitätswerk und Verkehrs-AG", /* 20493 */ "Consejo General del Poder Judicial", /* 20494 */ "Marvell Semiconductor Israel, Ltd", /* 20495 */ "CellVision AS", /* 20496 */ "Universita' Mediterranea di Reggio Calabria", /* 20497 */ "Gnoble Technologies", /* 20498 */ "Azeus Systems Ltd.", /* 20499 */ "Soft Link AG", /* 20500 */ "Padcom", /* 20501 */ "Albertsons Inc.", /* 20502 */ "BearingPoint NZ Ltd", /* 20503 */ "Franz Chladek - EDV Dienstleistungen", /* 20504 */ "Astrogator", /* 20505 */ "Huetron Co.Ltd", /* 20506 */ "Luvantix Co.Ltd", /* 20507 */ "Urbandale Community School District", /* 20508 */ "Dixon Hughes PLLC", /* 20509 */ "National Taiwan University Hospital", /* 20510 */ "Manzanita Systems", /* 20511 */ "Romania Internet Security Systems", /* 20512 */ "SARK Consultants Private Limited", /* 20513 */ "Home Office Life kernel", /* 20514 */ "FJD Information Technologies AG", /* 20515 */ "Battle Eagle Entertainment, Inc.", /* 20516 */ "eBuild.ca Inc.", /* 20517 */ "Flashbit Ruf and Heide GbR", /* 20518 */ "Y Soft, s.r.o.", /* 20519 */ "Cronyx Engineering", /* 20520 */ "PSDA, Inc.", /* 20521 */ "Javalobby.org", /* 20522 */ "Tom Addis Automotive Group", /* 20523 */ "SunStar Systems, Inc.", /* 20524 */ "Anacomp, Inc.", /* 20525 */ "Franciscan Missionaries of Our Lady Health System, Inc.", /* 20526 */ "Sathee Inc", /* 20527 */ "PARANA EM REDE SISTEMAS LTDA.", /* 20528 */ "AMETEK SolidState Controls Inc de Argentina", /* 20529 */ "Johannes Kornfellner", /* 20530 */ "Matrix Networx", /* 20531 */ "DevStream Corporation", /* 20532 */ "2Know-IT GmbH", /* 20533 */ "Uniklinik Ulm", /* 20534 */ "Latvijas Mobilais Telefons SIA", /* 20535 */ "Austrian Parliament", /* 20536 */ "NIPPON EXPRESS CO.,LTD", /* 20537 */ "FIBRENETIX", /* 20538 */ "//////////fur////", /* 20539 */ "Red Lion Controls (SIXNET)", /* 20540 */ "CITTIO, Inc.", /* 20541 */ "AirLink Communications, Inc.", /* 20542 */ "Optovia Corporation", /* 20543 */ "Sungkyunkwan University", /* 20544 */ "BusinessLink Advertising Ltd.", /* 20545 */ "Wissenschaftszentrum Berlin fuer Sozialforschung gGmbH", /* 20546 */ "Matthias Braun EDV", /* 20547 */ "SAP Hosting", /* 20548 */ "Pride S.p.A.", /* 20549 */ "Red Squared plc", /* 20550 */ "DDR Freak, LLC", /* 20551 */ "Swisscom Broadcast SA", /* 20552 */ "Wellington Management Company, LLP", /* 20553 */ "kraai.org", /* 20554 */ "eTelemetry, Inc.", /* 20555 */ "Hastings Entertainment Inc.", /* 20556 */ "NOFware, Ltd.", /* 20557 */ "University College of Oslo. Faculty of Engineering", /* 20558 */ "Engedi Technologies, Inc.", /* 20559 */ "Alexander Janssen Consulting", /* 20560 */ "LiveWave, Inc.", /* 20561 */ "North Electric Company, Inc.", /* 20562 */ "TNC S.A.", /* 20563 */ "Albuquerque Technical Vocational Institute", /* 20564 */ "Oxford Wireless Networks Ltd", /* 20565 */ "Taonix", /* 20566 */ "TELEGRID Technologies, Inc.", /* 20567 */ "Citco Technology Mangement, Inc.", /* 20568 */ "Inventec Enterprise System Corp.", /* 20569 */ "ShenZhen Yinghetong Information & Technology Co.,Ltd.", /* 20570 */ "International Turnkey Systems", /* 20571 */ "virtual-image", /* 20572 */ "Universitaetsklinikum Aachen", /* 20573 */ "OXYAN SOFTWARE", /* 20574 */ "Nucleonet Inc", /* 20575 */ "University of Wales, Bangor", /* 20576 */ "schunk edv systeme gmbh", /* 20577 */ "St Ives Plymouth Ltd", /* 20578 */ "BITSO Build IT Solutions GmbH", /* 20579 */ "Kiwi Enterprises", /* 20580 */ "EVR Ltd.", /* 20581 */ "Ebocom, LLC", /* 20582 */ "Union Switch & Signal", /* 20583 */ "Hunan Talkweb Information System Co. Ltd.", /* 20584 */ "Diamond State Port Corp.", /* 20585 */ "Century Digital Investment & Management Consulting Ltd.", /* 20586 */ "Rose Electronics", /* 20587 */ "MaxTronic International Co., Ltd.", /* 20588 */ "UKeduPerson Pilot", /* 20589 */ "RUBY Inc.", /* 20590 */ "VISTA International Ltd.", /* 20591 */ "People's Telephone Saratov, cjsc", /* 20592 */ "Guangdong Multiplication Communication Ltd Co.", /* 20593 */ "XSif Software", /* 20594 */ "Prefeitura Municipal de Florianopolis", /* 20595 */ "TomWare s.r.l.", /* 20596 */ "SurfCloud Ltd", /* 20597 */ "eReM.Studio", /* 20598 */ "Coventry Health Care, Inc.", /* 20599 */ "Atlab s.r.l.", /* 20600 */ "Thomas Jefferson High School for Science and Technology", /* 20601 */ "Xaraya Development Group", /* 20602 */ "Softhouse Informatica Ltda.", /* 20603 */ "Nexior IT Services", /* 20604 */ "Antepo, Inc.", /* 20605 */ "CLINIQUES UNIVERSITAIRES SAINT-LUC", /* 20606 */ "University of Angers", /* 20607 */ "Radboud University Nijmegen", /* 20608 */ "Scalable Computing Lab", /* 20609 */ "NOAA, OAR, FSL, ITS, DSG", /* 20610 */ "Flarepath Software Limited", /* 20611 */ "Time iCR", /* 20612 */ "Université catholique de Louvain (UCL)", /* 20613 */ "Exeo Technologies Inc.", /* 20614 */ "Netli, Inc.", /* 20615 */ "CGS World Inc.", /* 20616 */ "TeTeSys", /* 20617 */ "Cinetica s.r.l.", /* 20618 */ "UPC Ceska republika, a.s.", /* 20619 */ "Valox Systems Co.Ltd", /* 20620 */ "Crystal Technology Solutions Group Inc", /* 20621 */ "IainG", /* 20622 */ "RSDB Holding b.v.", /* 20623 */ "Nexus Telecom AG", /* 20624 */ "Serviciul de Telecomunicatii Speciale", /* 20625 */ "Software Systems A/S", /* 20626 */ "Institut National d'Histoire de l'Art", /* 20627 */ "Qual-Pro Corporation", /* 20628 */ "STREAMTEL", /* 20629 */ "ODIBOSS NETWORKS", /* 20630 */ "MC110-GRUPO1", /* 20631 */ "Barracuda Networks, Inc.", /* 20632 */ "Security First Networks", /* 20633 */ "Langochat", /* 20634 */ "IberiSign", /* 20635 */ "Bendigo and District Division of General Practice Inc.", /* 20636 */ "University of Texas of the Permian Basin", /* 20637 */ "Capital Markets CRC", /* 20638 */ "Entura, LLC", /* 20639 */ "Inomial Pty Ltd", /* 20640 */ "Vincent Consulting Group Inc.", /* 20641 */ "Nexus Community", /* 20642 */ "Prime MX", /* 20643 */ "Vaasa Polytechnic", /* 20644 */ "Poly Information Ltd.", /* 20645 */ "Convergenz", /* 20646 */ "University of Cambridge Computer Laboratory", /* 20647 */ "PK7", /* 20648 */ "Tyco Safety Products", /* 20649 */ "WG78 Ptb central", /* 20650 */ "Computer Vision Networks, Inc.", /* 20651 */ "Arizona Department of Environmental Quality", /* 20652 */ "Illusions Internet Solutions", /* 20653 */ "Telegence Corporation", /* 20654 */ "Ikoro Digital Inc", /* 20655 */ "Archer", /* 20656 */ "Rascular Technology Ltd", /* 20657 */ "Finobra S.A.", /* 20658 */ "Comodo Japan Inc.", /* 20659 */ "Topone Information technology Co., Ltd", /* 20660 */ "Hitachi ULSI Systems Co., Ltd.", /* 20661 */ "Heiko Jerke", /* 20662 */ "BV Associates", /* 20663 */ "NDE Netzdesign und -entwicklung AG", /* 20664 */ "Enervation GmbH", /* 20665 */ "Synchronoss Technologies Inc", /* 20666 */ "Prosilient Technologies AB", /* 20667 */ "Kaballero.Com LLC", /* 20668 */ "jelte.com", /* 20669 */ "SysCologne, Lutz Mischa Heitmüller", /* 20670 */ "Gee-Wiz Consultancy", /* 20671 */ "MemoryLink Corp", /* 20672 */ "MRO Direct, Inc", /* 20673 */ "Fullerton Elementary School District", /* 20674 */ "Reed Networks", /* 20675 */ "NIS4Grids", /* 20676 */ "Pulizzi Engineering, Inc.", /* 20677 */ "Department of Computer Science, Rensselaer Polytechnic Institute", /* 20678 */ "Helmer & Zimmermann GmbH & Co.KG", /* 20679 */ "Tekmark/CSL International Solutions Inc.", /* 20680 */ "Anta Systems, Inc.", /* 20681 */ "Campusmart Ltd.", /* 20682 */ "DigiDoc AB", /* 20683 */ "Metropolitan Health Corporate (Proprietary) Limited", /* 20684 */ "ADIES", /* 20685 */ "Pohl & Co. GmbH & Co. KG", /* 20686 */ "Roving Planet, Inc.", /* 20687 */ "Seiri Inc.", /* 20688 */ "Alliance Information Systems, LLC", /* 20689 */ "Harald Svab", /* 20690 */ "Techtell, Inc.", /* 20691 */ "Ruffdogs", /* 20692 */ "DYNAWEB IT Services L.P.", /* 20693 */ "Lightspeed Technologies Pte. Ltd.", /* 20694 */ "StratusStation Group Inc.", /* 20695 */ "Caixa Andorrana de Seguretat Social", /* 20696 */ "ThinPrint GmbH", /* 20697 */ "Lipetskenergo JSC", /* 20698 */ "CitiMortgage", /* 20699 */ "Trend Communications Ltd", /* 20700 */ "Peryam & Kroll Research Corporation", /* 20701 */ "Ritchie Capital Management", /* 20702 */ "eBuz Internetdienste GbR", /* 20703 */ "muumilaakso ry", /* 20704 */ "Holguin, Fahan & Associates, Inc.", /* 20705 */ "Vision Web Networks, LLC", /* 20706 */ "InterCerve, Inc.", /* 20707 */ "SYSLAB.COM GmbH", /* 20708 */ "Fremme's SOFTWARE-Utvikling", /* 20709 */ "American Medical Response Inc.", /* 20710 */ "Platform Solutions, Inc.", /* 20711 */ "Paradise Datacom LLC", /* 20712 */ "Noran Tel Communications Limited", /* 20713 */ "limitland development", /* 20714 */ "GiK Gesellschaft fuer innovative Kommunikationssysteme mbH", /* 20715 */ "Corbel Solutions, Inc", /* 20716 */ "FF Network Inc", /* 20717 */ "American School Foundation of Monterrey, A.C.", /* 20718 */ "SHIN.Ltd", /* 20719 */ "MX Logic Inc", /* 20720 */ "Atomicweb, LLC", /* 20721 */ "NetSpira Networks", /* 20722 */ "Indus International, Inc.", /* 20723 */ "Csibra Bt", /* 20724 */ "Etria, LLP", /* 20725 */ "Wilmington College", /* 20726 */ "Net Theatre", /* 20727 */ "Spook Limited", /* 20728 */ "Piotr Matusz", /* 20729 */ "eEye Digital Security", /* 20730 */ "TrueTel Communications Inc", /* 20731 */ "BlueScope Steel Limited", /* 20732 */ "JA Davey", /* 20733 */ "Internet Sheriff Technology Ltd", /* 20734 */ "ANDSCO I.T. Pty Ltd", /* 20735 */ "RS Telematica e Tecnologia da Informacao Ltda", /* 20736 */ "Cynics at Large", /* 20737 */ "TIBBO Technology, Inc.", /* 20738 */ "Cortec Systems Pty Ltd", /* 20739 */ "AXISSOFT Corporation", /* 20740 */ "Qala Singapore Pte Ltd", /* 20741 */ "Hormann Funkwerk Kölleda", /* 20742 */ "ISO (International Organization for Standardization)", /* 20743 */ "ICZ a.s.", /* 20744 */ "WLN Technologies", /* 20745 */ "DIS Data Integration Services GmbH", /* 20746 */ "NORTEK", /* 20747 */ "Frei GmbH", /* 20748 */ "Grintek TCI (Pty) Ltd", /* 20749 */ "Technolution BV", /* 20750 */ "PERAX", /* 20751 */ "SA Polyclinique de Courlancy", /* 20752 */ "Pharos Consulting (Pty) Ltd.", /* 20753 */ "Universitätsklinikum Aachen", /* 20754 */ "WestGlobal Ltd.", /* 20755 */ "het Concertgebouw NV", /* 20756 */ "Prisacom s.a.", /* 20757 */ "netSurity Ltd", /* 20758 */ "Kepler-Rominfo S.A.", /* 20759 */ "Autonomous noncommercial organization \"Scientific and Training Center of Information Security of Pr", /* 20760 */ "Uniklinikum Mannheim", /* 20761 */ "Passage Consortia C/O Sony Electronics (Trustee)", /* 20762 */ "Fastenal Company, Inc.", /* 20763 */ "David Cross Technical Consulting", /* 20764 */ "Rosati Kain", /* 20765 */ "QAI India Ltd", /* 20766 */ "Vereinigte Postversicherung VVaG", /* 20767 */ "St. Mary's High School", /* 20768 */ "Immaculate Conception School", /* 20769 */ "ADSTRA SYSTEMS INC.", /* 20770 */ "Priority Networks, Inc.", /* 20771 */ "Optica Technologies Inc.", /* 20772 */ "Accenture Business Services for Utilities", /* 20773 */ "OMT Systems (Shenzhen) Limited", /* 20774 */ "Aspire Information Services, LLC", /* 20775 */ "INAF - Osservatorio Astronomico di Padova", /* 20776 */ "Flexetech Solutions, Inc.", /* 20777 */ "SmartWare", /* 20778 */ "Inova Venture Pte Ltd", /* 20779 */ "Gemeinsamenes Gebietsrechenzentrum Hagen - SG 2.5", /* 20780 */ "Scientific Research Institute of Applied Information Technologies", /* 20781 */ "soc. coop. bilanciai", /* 20782 */ "ARGELA Yazilim ve Bilisim Teknolojileri A.S.", /* 20783 */ "HiTeKnowledge Limited", /* 20784 */ "Beta Systems Software AG", /* 20785 */ "Techspan System Ltd", /* 20786 */ "Parc Cientific de Barcelona", /* 20787 */ "Unassigned", /* 20788 */ "PowerMeMobile.com", /* 20789 */ "Harrington Group, Inc.", /* 20790 */ "keyX.net Consulting SRL", /* 20791 */ "Erdmann Systemberatung", /* 20792 */ "NetBridge Inc.", /* 20793 */ "IT Schaller GmbH", /* 20794 */ "REALTIMEIMAGE", /* 20795 */ "ShenZhen Roytel Technology Ltd.", /* 20796 */ "Great Dragon Infomation Technology(Group)Co.,Ltd.", /* 20797 */ "TDN GmbH", /* 20798 */ "Universitaet Konstanz", /* 20799 */ "JSC Promsvyaz-Invest", /* 20800 */ "Exxon Mobil Corporation", /* 20801 */ "Sanlam Ltd.", /* 20802 */ "Tyler Retail Systems, Inc.", /* 20803 */ "Open PLC European Research Alliance (Opera)", /* 20804 */ "Beijing Sunniwell BroadBand ditital technology Corp. Ltd.", /* 20805 */ "Segurmatica", /* 20806 */ "Federal Bureau of Investigation", /* 20807 */ "Monaco Telecom", /* 20808 */ "Agami Systems, Inc.", /* 20809 */ "Hamilton Consulting NSW Pty Ltd", /* 20810 */ "International Securities Exchange, LLC", /* 20811 */ "NetMon Information Systems Ltd.", /* 20812 */ "Ipcon Informationssysteme oHG", /* 20813 */ "AMC SA", /* 20814 */ "Zend Technologies Ltd.", /* 20815 */ "Alexandru Ioan Cuza University", /* 20816 */ "Argos Messtechnik GmbH", /* 20817 */ "SUNTEK TECHNOLOGY CO., LTD.", /* 20818 */ "Allenbrook, Inc.", /* 20819 */ "The University of Texas at San Antonio", /* 20820 */ "Information and Display Systems, LLC", /* 20821 */ "Franwell, Inc.", /* 20822 */ "Carefx Corporation", /* 20823 */ "Lions Gate Software, Inc.", /* 20824 */ "Touch22 Software and Consulting", /* 20825 */ "Convera", /* 20826 */ "Banco Central de Costa Rica", /* 20827 */ "Schweizerische Lebensversicherungs- und Rentenanstalt", /* 20828 */ "Stadtverwaltung Dresden", /* 20829 */ "Reflex AS", /* 20830 */ "CZFree.Net", /* 20831 */ "Ryder Systems Ltd.", /* 20832 */ "Terminales de Telecomunicacion Terrestre, S.L.", /* 20833 */ "Alike Group", /* 20834 */ "BD Digital Lab. Co., Ltd", /* 20835 */ "Confer Computing Consultants Company", /* 20836 */ "DFU services", /* 20837 */ "GaVI mbH", /* 20838 */ "Broadcast Tools, Inc.", /* 20839 */ "Thomson Technology Limited", /* 20840 */ "The Community Group Inc", /* 20841 */ "Arena Solutions, Inc.", /* 20842 */ "Philipp Strozyk", /* 20843 */ "L'OREAL", /* 20844 */ "Linux Information Systems AG", /* 20845 */ "SARA", /* 20846 */ "Atlas Development Corporation", /* 20847 */ "Zope Corporation", /* 20848 */ "OMT Systems (Shenzhen) Limited", /* 20849 */ "TechNerdVana", /* 20850 */ "Groupe Bell Nordiq inc.", /* 20851 */ "CrimTrac", /* 20852 */ "Eurorail International", /* 20853 */ "OTC Wireless Inc.", /* 20854 */ "Scientific Technologies Corp", /* 20855 */ "Pattern Matched Technologies", /* 20856 */ "Inspired Technologies Ltd", /* 20857 */ "Casa Systems, Inc.", /* 20858 */ "Citco Technology Mangement, Inc.", /* 20859 */ "Liberty Enterprises Inc.", /* 20860 */ "Dansk System Elektronik A/S", /* 20861 */ "Online Learning Australia Pty. Ltd.", /* 20862 */ "Utiba Pty Ltd", /* 20863 */ "Tower Technologies", /* 20864 */ "Sri Lanka Telecom", /* 20865 */ "Eljakim Information Technology BV", /* 20866 */ "danfferliu Corporation", /* 20867 */ "Helge Gudmundsen", /* 20868 */ "Frank Vercruesse", /* 20869 */ "Pufferbox Pty. Ltd.", /* 20870 */ "Kredietbank S.A. Luxembourg", /* 20871 */ "Sto AG", /* 20872 */ "PROTEI Ltd", /* 20873 */ "Håmsø Patentbyrå ANS", /* 20874 */ "DevExperts LLC", /* 20875 */ "Vorarlberger Telekommunikations GesmbH", /* 20876 */ "Vine Linux", /* 20877 */ "VineCaves, Ltd.", /* 20878 */ "MBIT GmbH", /* 20879 */ "MagnaQuest Technologies", /* 20880 */ "Catenare LLC", /* 20881 */ "PCDEMANO Inc", /* 20882 */ "Evangelische Landeskirche Württemberg", /* 20883 */ "BDT GmbH & Co. KG", /* 20884 */ "Kontron Modular Computers SA", /* 20885 */ "Dr. Glinz COVIS GmbH", /* 20886 */ "SOLSOFT", /* 20887 */ "SIS Spektrum s.r.o.", /* 20888 */ "Comsys B.V.", /* 20889 */ "Sebastian Kueppers Computer-, Medien- und Eventservice", /* 20890 */ "Star Internet Ltd.", /* 20891 */ "CITEL Technologies Inc.", /* 20892 */ "LShift Ltd", /* 20893 */ "Yirdis B.V.", /* 20894 */ "Diplomado", /* 20895 */ "NuVox Communications, Inc.", /* 20896 */ "Determina Inc.", /* 20897 */ "Sungard SBI", /* 20898 */ "Apollo Interactive, Inc.", /* 20899 */ "Quantech Global Services LLC", /* 20900 */ "Virtual Business Communities Inc.", /* 20901 */ "johnstonshome.org", /* 20902 */ "Children's Hospital - Boston", /* 20903 */ "Risolviamo", /* 20904 */ "Unicible S.A.", /* 20905 */ "Cubika S.A.", /* 20906 */ "Regent College", /* 20907 */ "Emergin, Inc.", /* 20908 */ "Exempla Healthcare", /* 20909 */ "PT OneHUB Technology", /* 20910 */ "twilley.org", /* 20911 */ "Publishing firm «Vidrodzhenia» Ltd.", /* 20912 */ "OJSC RTComm.RU", /* 20913 */ "Deutsche Telekom - CSC Wuerzburg", /* 20914 */ "NATIONAL-BANK AG, Essen", /* 20915 */ "AVTECH Software, Inc.", /* 20916 */ "FondsServiceBank", /* 20917 */ "Wicked Studio", /* 20918 */ "Manobi", /* 20919 */ "PKWARE, Inc.", /* 20920 */ "Hillstone Products Ltd", /* 20921 */ "Pro Dimension Ltd.", /* 20922 */ "Myxomop", /* 20923 */ "Proyecto OTF U.de.Chile", /* 20924 */ "Baker & McKenzie", /* 20925 */ "Mase Technologies, LLC", /* 20926 */ "TSI Sports Incorporated", /* 20927 */ "Tangent Systems", /* 20928 */ "SYSGO AG", /* 20929 */ "René Alegría Sáez", /* 20930 */ "Software Builders Exchange", /* 20931 */ "yobe.org", /* 20932 */ "Tomsk State University of Control Systems and Radioelectronics", /* 20933 */ "ITdesign software projects and consulting", /* 20934 */ "Anystream, Inc.", /* 20935 */ "CHINA COMMUNICATIONS STANDARDS ASSOCIATIONS", /* 20936 */ "Nimrod AS", /* 20937 */ "ETL Systems Ltd.", /* 20938 */ "videoNEXT LLC", /* 20939 */ "The eBiz Shop, LLC.", /* 20940 */ "Palo Alto Research Center, Inc.", /* 20941 */ "China Telecom-Guangzhou Research and Development Center", /* 20942 */ "QOSMOS SA", /* 20943 */ "Modular Blade Server", /* 20944 */ "East Online, LLC", /* 20945 */ "BDM Business Data Management GmbH", /* 20946 */ "Cox Communications San Diego", /* 20947 */ "manzanita Inc.", /* 20948 */ "Anadarko Petroleum Inc.", /* 20949 */ "Interhack Corporation", /* 20950 */ "Brevient Technologies, Inc.", /* 20951 */ "Exabridge", /* 20952 */ "Haifa University", /* 20953 */ "Xtendreach Limited", /* 20954 */ "Sunet", /* 20955 */ "Emerson Climate Technologies, Alco Products", /* 20956 */ "E-Government Solutions (UK) Ltd.", /* 20957 */ "I-Nex Corporation Pty. Ltd.", /* 20958 */ "Siemens d.d. Hrvatska", /* 20959 */ "Laboratory of Content Systems(LCS)", /* 20960 */ "Communication Technologies", /* 20961 */ "Multimedia Polska", /* 20962 */ "Kattare Internet Services", /* 20963 */ "Camille Bauer", /* 20964 */ "HVR Consulting Services Ltd", /* 20965 */ "Jesus College, Oxford", /* 20966 */ "Anevia", /* 20967 */ "Genomatix Software GmbH", /* 20968 */ "EUDATA SYSTEMS S.A.", /* 20969 */ "LISA GmbH", /* 20970 */ "Baltnet Ltd.", /* 20971 */ "British Airways Plc", /* 20972 */ "NextiraOne Czech s.r.o.", /* 20973 */ "American Megatrends, Inc", /* 20974 */ "PONTUSYS", /* 20975 */ "Paul Smith Computer Services", /* 20976 */ "Comune di Imola", /* 20977 */ "DC-SatNet Ltd.", /* 20978 */ "WT Finland Ltd", /* 20979 */ "tux LLC", /* 20980 */ "Atrocity MUD", /* 20981 */ "PCDEMANO Inc", /* 20982 */ "IIT Madras", /* 20983 */ "Geonetics", /* 20984 */ "Nethonnun ehf.", /* 20985 */ "Universidad del CEMA", /* 20986 */ "Philadelphia Computer Institute", /* 20987 */ "Rackspace", /* 20988 */ "Systems Research and Development, Inc.", /* 20989 */ "Aspect Loss Prevention LLC", /* 20990 */ "Family-Williams Inc.", /* 20991 */ "CradlePoint, Inc.", /* 20992 */ "Camujo", /* 20993 */ "Europa Communications Pty Ltd", /* 20994 */ "Progress Energy", /* 20995 */ "ACCESS Co. Ltd.", /* 20996 */ "Lotus Technologies SRL", /* 20997 */ "Honeywell International Inc", /* 20998 */ "Willis Group", /* 20999 */ "imetric", /* 21000 */ "Stratizon Inc.", /* 21001 */ "Parallax Networking Limited", /* 21002 */ "Dynamic Network Integration, Inc.", /* 21003 */ "American Technology Integrators Corporation", /* 21004 */ "GERMAN NETWORK GMBH", /* 21005 */ "OpenDAS.org", /* 21006 */ "InoStor", /* 21007 */ "Informed Control Inc.", /* 21008 */ "McGuire & Associates, Inc", /* 21009 */ "eCollege", /* 21010 */ "DotNetShop", /* 21011 */ "iHotel International Inc.", /* 21012 */ "Xirrus, Inc.", /* 21013 */ "Gamerz Hub", /* 21014 */ "Art of Living Foundation", /* 21015 */ "IntruGuard Devices", /* 21016 */ "IPeak Networks Inc.", /* 21017 */ "Paxar Americas, Inc.", /* 21018 */ "River Systems, Inc", /* 21019 */ "Stowarzyszenie Freeze NET Amatorska Siec Komputerowa", /* 21020 */ "Perimeter Technology Center, Inc.", /* 21021 */ "The College Board", /* 21022 */ "Forbrich Computer Consulting Ltd.", /* 21023 */ "Electronics corporation of india. Ltd", /* 21024 */ "ICOMM TELE LTD.", /* 21025 */ "Hauf Electric Co.", /* 21026 */ "MIP", /* 21027 */ "Digital Motorworks, LP.", /* 21028 */ "Giant Steps", /* 21029 */ "PeerApp", /* 21030 */ "Helga Adam und Rocio Manzano Romero GBRmbH", /* 21031 */ "Argent Networks ltd", /* 21032 */ "Taikang Life Insurance Co.,Ltd.", /* 21033 */ "Pratama Sastriawan Systems", /* 21034 */ "DEV Systemtechnik GmbH & Co. KG", /* 21035 */ "Ultrapower Software Co., Ltd. Beijing", /* 21036 */ "CHUNG HUNG STEEL CO., LTD.", /* 21037 */ "Radio IP Software Inc.", /* 21038 */ "YuCa Tech. Corp.", /* 21039 */ "Fiberplex, Inc", /* 21040 */ "Banchile Corredores de Bolsa S.A.", /* 21041 */ "PRT Systems Ltd", /* 21042 */ "AREVA", /* 21043 */ "Mauro Calderara", /* 21044 */ "Intinor AB", /* 21045 */ "University Of Wisconsin Extension", /* 21046 */ "Banco de Credito e Inversiones", /* 21047 */ "Copenhagen Municipal", /* 21048 */ "ROMPETROL SA", /* 21049 */ "Freebits", /* 21050 */ "Init Seven AG", /* 21051 */ "Interact S.A.", /* 21052 */ "Singlefin", /* 21053 */ "Yardi Systems, Inc.", /* 21054 */ "Sri Lanka Telecom Services Ltd.", /* 21055 */ "DeployLinux Consulting", /* 21056 */ "Themis Computer", /* 21057 */ "Tizor Systems", /* 21058 */ "Nyvri", /* 21059 */ "Global Healthcare Exchange", /* 21060 */ "Netaquila Solutions Pvt. Ltd", /* 21061 */ "Chris Forkin Consulting", /* 21062 */ "MaqSys", /* 21063 */ "TSingTec Ltd.", /* 21064 */ "SHENZHEN WLAN Research Center,CCSA", /* 21065 */ "SNCF (Société Nationale des Chemins de fer Français)", /* 21066 */ "Elitecore Technologies Ltd.", /* 21067 */ "University of Southern Denmark", /* 21068 */ "Radford Control Systems", /* 21069 */ "Intentia Research & Development", /* 21070 */ "EFS Inc.", /* 21071 */ "Arnold Magnetics", /* 21072 */ "webcreations.ca", /* 21073 */ "PureWave Networks, Inc.", /* 21074 */ "Old Red Mill", /* 21075 */ "Science Museum of Minnesota", /* 21076 */ "DigiTar", /* 21077 */ "dafa", /* 21078 */ "HAIPE", /* 21079 */ "Frog Navigation Systems B.V.", /* 21080 */ "Persium Inc.", /* 21081 */ "EUN Partnership a.i.s.b.l.", /* 21082 */ "Mairie de Paris", /* 21083 */ "SD Laboratories", /* 21084 */ "Open Alliance Sofware Libre, S.A.", /* 21085 */ "Monolith Productions", /* 21086 */ "Infosia Services", /* 21087 */ "krix.biz Internetdienstleistungen", /* 21088 */ "Flywheel Corporation", /* 21089 */ "Ithaka Harbors, Inc.", /* 21090 */ "Exinda Networks Pty Ltd", /* 21091 */ "Raindance Wireless", /* 21092 */ "Got.Net - The Internet Connection, Inc.", /* 21093 */ "Ricoh Australia Pty Ltd", /* 21094 */ "Commonwealth Bank of Australia", /* 21095 */ "Quantier Inc.", /* 21096 */ "Kerr-McGee Corporation", /* 21097 */ "IECAS(Chin. Acad. of Sci)", /* 21098 */ "Alltrix Sdn Bhd", /* 21099 */ "Linwork Informática S/C Ltda", /* 21100 */ "Verreau Enterprise", /* 21101 */ "ControlTier Software, Inc.", /* 21102 */ "Mandrakesoft", /* 21103 */ "Mofet Instititue", /* 21104 */ "MANGO networks Inc.", /* 21105 */ "Shanghai Ulink Telecom Technologies Co., Ltd.", /* 21106 */ "Novagem Ltd", /* 21107 */ "Harting Electric GmbH & Co KG", /* 21108 */ "Knowledge Zone", /* 21109 */ "SANITOP-WINGENROTH GmbH & Co. KG", /* 21110 */ "Datalogic S.p.A", /* 21111 */ "TNO Telecom", /* 21112 */ "Hashbang Consulting Ltd", /* 21113 */ "Contec s.j.", /* 21114 */ "TFTEN SA", /* 21115 */ "NoVi Pawel Zimnoch", /* 21116 */ "AMG Systems Limited", /* 21117 */ "AB2R", /* 21118 */ "Guru, informacijske tehnologije d.o.o.", /* 21119 */ "Sanofi-Aventis", /* 21120 */ "m0n0", /* 21121 */ "G.I.S. Global Information Services GmbH", /* 21122 */ "Amps llc", /* 21123 */ "Adesium", /* 21124 */ "dico-online", /* 21125 */ "vFortress Network Security Pvt. Ltd.", /* 21126 */ "KCI Technologies, Inc.", /* 21127 */ "Heimetli Software AG", /* 21128 */ "Ideal Solution, LLC", /* 21129 */ "GlassHouse UK Ltd", /* 21130 */ "Phonesync Ltd.", /* 21131 */ "Novum Information Technology BV", /* 21132 */ "University of Iowa Hospitals and Clinics", /* 21133 */ "University of Minnesota", /* 21134 */ "Kimmel.biz", /* 21135 */ "North Central University", /* 21136 */ "Astron Computer Corporation", /* 21137 */ "Electrosys S.r.l.", /* 21138 */ "Proofpoint, Inc.", /* 21139 */ "Xernolan Consulting", /* 21140 */ "Elemental Security, Inc.", /* 21141 */ "ITER", /* 21142 */ "Devis", /* 21143 */ "Maieutica - Cooperativa de Ensino Superior, Crl", /* 21144 */ "Intalio, Inc.", /* 21145 */ "Wiltel Communications LLC", /* 21146 */ "Innotrac Corporation", /* 21147 */ "Soleil Securities Group, Inc.", /* 21148 */ "H Bauer Ediciones", /* 21149 */ "XKL, LLC", /* 21150 */ "Priority Technologies, Inc.", /* 21151 */ "Nucor Steel Indiana", /* 21152 */ "Academy of Fine Arts", /* 21153 */ "Harland Financial Solutions", /* 21154 */ "Chameleon Technology, Inc.", /* 21155 */ "pipp", /* 21156 */ "RAE Internet Inc.", /* 21157 */ "Linux-Online", /* 21158 */ "IPcom S.A.", /* 21159 */ "Emerson Retail Services", /* 21160 */ "Flamingo Internet Navigators", /* 21161 */ "Voxiva Inc.", /* 21162 */ "EXPERTiS Tecnología S.A. de C.V.", /* 21163 */ "Legacy Health System", /* 21164 */ "Tidal Networks", /* 21165 */ "Personal Broadband Australia", /* 21166 */ "The Correspondence School", /* 21167 */ "SCF of Arizona", /* 21168 */ "JTHInc Computing Solutions", /* 21169 */ "Vortice Research Development Pty Ltd", /* 21170 */ "NRG Global, Inc.", /* 21171 */ "Elan Designs", /* 21172 */ "WSCICC", /* 21173 */ "DISC, State of Kansas", /* 21174 */ "Xinupro, LLC", /* 21175 */ "Datalucid limited", /* 21176 */ "St. John School", /* 21177 */ "Anteya Technology Corporation", /* 21178 */ "Beijing E-tech Technology Co., ltd", /* 21179 */ "SwiDyna Technologies,Inc", /* 21180 */ "anweb", /* 21181 */ "Tonediy", /* 21182 */ "lightelli Ltd.", /* 21183 */ "AirMsg, Inc.", /* 21184 */ "Ioneda, Inc.", /* 21185 */ "Corner Stone Technology Inc", /* 21186 */ "SenseStream Limited", /* 21187 */ "eyes-works Corporation", /* 21188 */ "Huon Associates Pty Ltd", /* 21189 */ "MayAZ Software Services", /* 21190 */ "KCodes Corporation", /* 21191 */ "Goldman Sachs JBWere Pty Ltd", /* 21192 */ "Webvision", /* 21193 */ "LLC Inform-mobil", /* 21194 */ "Non-Stop Systems (South Africa) (Pty) Limited", /* 21195 */ "TerraPages Pty. Ltd.", /* 21196 */ "CryptoEx", /* 21197 */ "RTI-Zone", /* 21198 */ "silkway", /* 21199 */ "Dr. Ruff Software GmbH", /* 21200 */ "Linuma Advanced Hosting, Inc.", /* 21201 */ "BT (Germany) GmbH & Co. oHG", /* 21202 */ "ARES Inc.", /* 21203 */ "MHGS", /* 21204 */ "Webdyn", /* 21205 */ "MobileRRD", /* 21206 */ "Technische Universitaet Bergakademie Freiberg", /* 21207 */ "IKS GmbH Jena", /* 21208 */ "Mayr-Melnhof Packaging International GmbH", /* 21209 */ "kairos", /* 21210 */ "Fraunhofer-Institute for Telecommunications Heinrich-Hertz-Institut", /* 21211 */ "Incito Ltd", /* 21212 */ "topolis.lt", /* 21213 */ "Eidetix S.r.L.", /* 21214 */ "MM-Karton", /* 21215 */ "Telepo AB", /* 21216 */ "Lux Servizi di Luigi Iotti", /* 21217 */ "Sette Querce", /* 21218 */ "Solidex S.A.", /* 21219 */ "BASF AG", /* 21220 */ "Nexus Advanced Technologies S.r.l.", /* 21221 */ "Profline BV", /* 21222 */ "Akris BV", /* 21223 */ "4G Systeme GmbH", /* 21224 */ "British Heart Foundation", /* 21225 */ "Linn Products Ltd", /* 21226 */ "ABI - Associazione Bancaria Italiana", /* 21227 */ "Aspex Semiconductor Ltd", /* 21228 */ "Leningrad Research and Development Institute of Telecommunications", /* 21229 */ "Iriga Networks", /* 21230 */ "Kugele Elektronik", /* 21231 */ "Jung Myoung Ltd", /* 21232 */ "Peter Schmaedicke", /* 21233 */ "o-n-s CO.,LTD.", /* 21234 */ "Nehlsen IT Training und Beratung", /* 21235 */ "Laseur Enterprises", /* 21236 */ "Wright Express", /* 21237 */ "BrasilSat Harald S/A", /* 21238 */ "Geist Manufacturing, Inc", /* 21239 */ "PinguSolution Meierhoff/Woltmann GbR", /* 21240 */ "Chezwam", /* 21241 */ "SimDesk Technologies Inc.", /* 21242 */ "LANet Sp. z o.o.", /* 21243 */ "Mt Umunhum Wireless", /* 21244 */ "Macdonald Associates GmbH", /* 21245 */ "Quantitative Imaging", /* 21246 */ "verimatrix", /* 21247 */ "Pixel Software Technologies", /* 21248 */ "Lightwave Solutions, Inc.", /* 21249 */ "Crane River Consulting", /* 21250 */ "Secure Campus Inc", /* 21251 */ "FMS Internetservice Müller und Schaub GbR", /* 21252 */ "TransOptix Inc.", /* 21253 */ "Arxceo Corporation", /* 21254 */ "SanYuHu LLC", /* 21255 */ "Corporate Technologies Incorporated", /* 21256 */ "Transera Communications Inc", /* 21257 */ "Tongel.org", /* 21258 */ "Oregon Department of Human Services", /* 21259 */ "XYPRO Technology Corporation", /* 21260 */ "Aventia SL", /* 21261 */ "Second Shift Inc.", /* 21262 */ "Pacific College of Oriental Medicine", /* 21263 */ "AFC Commercial", /* 21264 */ "Dark Horse Comics, Inc.", /* 21265 */ "Jab Ltd", /* 21266 */ "IT-Service Lehmann", /* 21267 */ "Tecnocity, S.C.", /* 21268 */ "OnSite Systems, Inc.", /* 21269 */ "SWAL", /* 21270 */ "ITT Educational Services, Inc.", /* 21271 */ "Thomas P. Olsen", /* 21272 */ "MediaWeb IT", /* 21273 */ "Camiant Inc", /* 21274 */ "n3k Informatik Ltd", /* 21275 */ "A.C.C.E.S.S. Inc.", /* 21276 */ "City of Ottawa", /* 21277 */ "Intellambda Systems Inc.", /* 21278 */ "State of Kansas", /* 21279 */ "Computer Access Technology Corporation", /* 21280 */ "Empresa Jornalística Caldas Júnior Ltda", /* 21281 */ "SYS/IO", /* 21282 */ "The Forest Industry Online Inc.", /* 21283 */ "Edustructures LLC", /* 21284 */ "Catalyst IT Ltd", /* 21285 */ "Sygate Technologies", /* 21286 */ "Mikrovlny s.r.o.", /* 21287 */ "Cetacea Networks Corporation", /* 21288 */ "grid-zero.net", /* 21289 */ "GBP Software, LLC", /* 21290 */ "Tributes Online Ltd", /* 21291 */ "kaengs reich", /* 21292 */ "Fabric7 Systems, Inc.", /* 21293 */ "KIKA S.A.", /* 21294 */ "Cunningham and Othen", /* 21295 */ "Infinera Corp.", /* 21296 */ "U.Z.KULeuven", /* 21297 */ "Odyssey Pharmaceuticals, Inc.", /* 21298 */ "BigFix, Inc.", /* 21299 */ "Watt 22 Távközléstechnikai Szolgáltató Kft.", /* 21300 */ "Dialmex, L.L.C.", /* 21301 */ "Wright State University", /* 21302 */ "Periscope Ltd.", /* 21303 */ "BC Genome Sciences Centre", /* 21304 */ "Katholischen Hochschulgemeinde Linz", /* 21305 */ "Cyberfamily.dk", /* 21306 */ "Tel.Pacific", /* 21307 */ "NeoMon", /* 21308 */ "Juni Australia Pty Ltd", /* 21309 */ "Center for High Energy Physics", /* 21310 */ "GammaStream Technologies, Inc.", /* 21311 */ "LISAsoft Pty. Ltd.", /* 21312 */ "VRx, Inc.", /* 21313 */ "Sizwe", /* 21314 */ "The State Key Laboratory Of Information Security of China", /* 21315 */ "Octtel Communication Co., Ltd.", /* 21316 */ "ATEN INTERNATIONAL CO., LTD.", /* 21317 */ "Intec NetCore, Inc,", /* 21318 */ "Symbio Group", /* 21319 */ "SourceMachine Develop Ltd.", /* 21320 */ "CITIC Telecom 1616 Limited", /* 21321 */ "Estonian Academy of Arts", /* 21322 */ "Consolidated Contractors International Company S.A.L", /* 21323 */ "Databus Inc.", /* 21324 */ "Siedlung Cuxhaven AG", /* 21325 */ "Heim & Haus GmbH & Co KG", /* 21326 */ "Westsaechsische Hochschule Zwickau", /* 21327 */ "Metos Oy", /* 21328 */ "secXtreme GmbH", /* 21329 */ "JSC \"TransTeleCom Company\"", /* 21330 */ "RESEAUNANCE", /* 21331 */ "Luciad NV", /* 21332 */ "Chongqing Putian Communication Equipment Ltd, Co.", /* 21333 */ "ACCIO GLOBAL", /* 21334 */ "OSRAM OS GmbH", /* 21335 */ "CAEN SpA", /* 21336 */ "PowerSource", /* 21337 */ "NetFX", /* 21338 */ "Fiat Auto S.p.A.", /* 21339 */ "Verax Systems", /* 21340 */ "Corner Banca SA", /* 21341 */ "EpiSoftware Ltd.", /* 21342 */ "n3k Informatik GmbH", /* 21343 */ "Claranet GmbH", /* 21344 */ "Sachs", /* 21345 */ "Forler IT Training & Consulting", /* 21346 */ "ITCnetworks", /* 21347 */ "Song Networks Svenska AB", /* 21348 */ "TTG Europe PLC", /* 21349 */ "SHS Informationssysteme AG", /* 21350 */ "Gyrus Prod SRL", /* 21351 */ "Zhang Ye", /* 21352 */ "Hospital Santa Mônica", /* 21353 */ "Bezirksamt Lichtenberg von Berlin", /* 21354 */ "Ascential Software", /* 21355 */ "Austrian Grid", /* 21356 */ "antislash", /* 21357 */ "China ZLTelecom Telecommunication Equipment Co., LTD", /* 21358 */ "OPNET Technologies, Inc", /* 21359 */ "Chatsworth Products, Inc", /* 21360 */ "Catholic Healthcare West", /* 21361 */ "IFOTEC", /* 21362 */ "Valhalla Media", /* 21363 */ "Revinetix, Inc", /* 21364 */ "Accelerate Consultancy Limited", /* 21365 */ "Open Source Lab", /* 21366 */ "Connectathon.Net", /* 21367 */ "The Cloud Networks Ltd.", /* 21368 */ "Terrasat Communications, Inc.", /* 21369 */ "Thales Navigation", /* 21370 */ "Whited.US", /* 21371 */ "JavaPlus", /* 21372 */ "netfilter/iptables project", /* 21373 */ "Fabbricadigitale srl", /* 21374 */ "Interactive Vision Mind Beacon sp. z o.o.", /* 21375 */ "Gruppenkasper", /* 21376 */ "Zhongyuan Institute of Technology", /* 21377 */ "Honda of America Mfg., Inc.", /* 21378 */ "Shenzhen aike Co.,Ltd.", /* 21379 */ "Guangzhou aike Co.,Ltd.", /* 21380 */ "Viessmann Werke GmbH & Co KG", /* 21381 */ "united bolta nigeria limited", /* 21382 */ "bo-tech GmbH & Co. KG", /* 21383 */ "serie a - digitale medien und systeme GmbH", /* 21384 */ "Escalon Networks, Inc.", /* 21385 */ "Quiettouch Inc.", /* 21386 */ "The John Simon Guggenheim Memorial Foundation", /* 21387 */ "Risetek Inc.", /* 21388 */ "King Fahd University of Petroleum and Minerals", /* 21389 */ "ALAIN BRION SARL", /* 21390 */ "Netalley Networks LLP", /* 21391 */ "Tech Arabia", /* 21392 */ "CareerWeaver.net", /* 21393 */ "aplis.cz, a.s.", /* 21394 */ "Project Logicaldreams", /* 21395 */ "Brand X Software, Inc.", /* 21396 */ "FiberZone Networks LTD.", /* 21397 */ "Cybergate Technologies Corp", /* 21398 */ "Active Circle SA", /* 21399 */ "e-geek", /* 21400 */ "DSNCON GmbH", /* 21401 */ "Epic Energy", /* 21402 */ "A-First Technology CO.,LTD.", /* 21403 */ "DG Telecom Co. Ltd.", /* 21404 */ "COMSATS Internet Services", /* 21405 */ "azh GmbH", /* 21406 */ "Maier", /* 21407 */ "Ernitec A/S", /* 21408 */ "ARTAX, a. s.", /* 21409 */ "Kennisnet", /* 21410 */ "gocept gmbh & co. kg", /* 21411 */ "Andreas Wachter", /* 21412 */ "ScriptLogic Corporation", /* 21413 */ "Batra Consulting, Inc.", /* 21414 */ "Option nv", /* 21415 */ "Centre Hospitalier de la Côte Basque", /* 21416 */ "tdb Software Service GmbH", /* 21417 */ "Unient Communications, a.s.", /* 21418 */ "TEDIAL S.L.", /* 21419 */ "HanseMerkur Krankenversicherung a.G.", /* 21420 */ "Yassine Zairi LTD.", /* 21421 */ "CVW", /* 21422 */ "ConnecTerra, Inc.", /* 21423 */ "Kanagawa Prefectural Board of Education", /* 21424 */ "Institute for Automation and Control Processes (IACP) FEBRAS", /* 21425 */ "Hoekstra Consulting Group", /* 21426 */ "Weisenberger Solarstromerzeugung und Vertrieb", /* 21427 */ "Aepona Ltd", /* 21428 */ "SUNTECH Telecom Solution LTDA", /* 21429 */ "inPUT Softwareentwicklungs GmbH", /* 21430 */ "SAE International", /* 21431 */ "DigiNet Corporation", /* 21432 */ "Interface Software, Inc.", /* 21433 */ "Karolis Dautartas Personal Enterprise", /* 21434 */ "Inner Class Software Engineering Limited", /* 21435 */ "basis06 AG", /* 21436 */ "ATEN Canada Technologies Inc.", /* 21437 */ "Thrunet", /* 21438 */ "Beijing Mission Communication Co., Ltd.", /* 21439 */ "XIUS India Ltd.", /* 21440 */ "KBK e-vallalkozasa", /* 21441 */ "GAPIC (PVT) LTD", /* 21442 */ "Caemar Software", /* 21443 */ "OSS Technologies (Pty) Ltd", /* 21444 */ "eSilicon Corporation", /* 21445 */ "ZIPPtec Systemhaus GmbH", /* 21446 */ "Clinton Group, Inc.", /* 21447 */ "KarstadtQuelle AG", /* 21448 */ "Riversoft Integracao e Desenvolvimento de Software Ltda", /* 21449 */ "Radiantek", /* 21450 */ "Topera Technology Ltd.", /* 21451 */ "AUNA OPERADORES DE TELECOMUNICACIONES, S.A.", /* 21452 */ "GatherWorks, Inc.", /* 21453 */ "data voice technologies GmbH", /* 21454 */ "Sinosoft Co.,LTD", /* 21455 */ "LV1871", /* 21456 */ "Demandware, Inc.", /* 21457 */ "Clovis Solutions, Inc.", /* 21458 */ "CaLviX", /* 21459 */ "Global Infotek, Inc.", /* 21460 */ "Cole National", /* 21461 */ "Toro Co", /* 21462 */ "UZ Gent", /* 21463 */ "Adelior SA", /* 21464 */ "Vipond Inc.", /* 21465 */ "DOMISYS SA", /* 21466 */ "Uber Technologies cc", /* 21467 */ "Vijit Consulting", /* 21468 */ "Blade Fusion", /* 21469 */ "schematech", /* 21470 */ "SimpleRezo", /* 21471 */ "xmled.org", /* 21472 */ "View500", /* 21473 */ "Ardec International Pty. Ltd.", /* 21474 */ "Farsands Corporation Limited", /* 21475 */ "Academia Sinica Grid Computing Centre", /* 21476 */ "TaiwanGrid", /* 21477 */ "AdCoCom GmbH", /* 21478 */ "Icepage AB", /* 21479 */ "Shenzhen Olym-tech Co., Ltd.", /* 21480 */ "TKM Telekommunikation und Elektronik GmbH", /* 21481 */ "SAIPM", /* 21482 */ "Quest Retail Technology Pty Ltd", /* 21483 */ "SIGMETA GmbH", /* 21484 */ "UNIS Ukraine", /* 21485 */ "Secces information technologies ltd.", /* 21486 */ "Japan Cable Laboratories", /* 21487 */ "NC Numericable", /* 21488 */ "die Antwort", /* 21489 */ "Booth & Associates, Inc.", /* 21490 */ "Entelligencia", /* 21491 */ "jMesh Limited", /* 21492 */ "SKODA AUTO a.s.", /* 21493 */ "3CPLUS GmbH", /* 21494 */ "SIG IT GmbH", /* 21495 */ "nSolutions, Inc.", /* 21496 */ "Tuxeo sprl", /* 21497 */ "Daemonspace Inc.", /* 21498 */ "LDCONFIG", /* 21499 */ "SIC LAB S.r.l.", /* 21500 */ "Asdag", /* 21501 */ "Sysload Software", /* 21502 */ "Witt Weiden GmbH", /* 21503 */ "SipStorm, Inc.", /* 21504 */ "Caton Technology(Beijing) Corporation", /* 21505 */ "Infinity Software Development", /* 21506 */ "Strategies & Solutions LLC", /* 21507 */ "LAAS-CNRS", /* 21508 */ "CanWest Global Communications Corp.", /* 21509 */ "heicare GmbH", /* 21510 */ "Institut Laue-Langevin", /* 21511 */ "Instituto Superior Técnico", /* 21512 */ "Vormetric, Inc.", /* 21513 */ "Computer Services and Solutions, Inc.", /* 21514 */ "Hyperion VOF", /* 21515 */ "Secure Data in Motion, Inc.", /* 21516 */ "Ehwa Technologies Information", /* 21517 */ "Queensdale Investment Corp.", /* 21518 */ "Detlef Woltmann IT Consult GmbH", /* 21519 */ "Crossworks Co.,Ltd.", /* 21520 */ "Engage Networks, Inc", /* 21521 */ "Knights of Columbus", /* 21522 */ "SIA European Softwarehouse", /* 21523 */ "Wintegra", /* 21524 */ "sydios-it-solutions GmbH", /* 21525 */ "Equip'Trans", /* 21526 */ "SLIT", /* 21527 */ "MICROSEC Ltd.", /* 21528 */ "2wcom GmbH", /* 21529 */ "Champ Cargosystems S.A.", /* 21530 */ "Adventec", /* 21531 */ "Universidad Técnica Federico Santa María", /* 21532 */ "Administration fiscale", /* 21533 */ "eWayDirect, Inc.", /* 21534 */ "QVS Software Inc.", /* 21535 */ "MeuPC Informática e Comunicações LTDA", /* 21536 */ "KUNet", /* 21537 */ "fqdn.org", /* 21538 */ "Klahn Integration, LLC", /* 21539 */ "Clulicon", /* 21540 */ "DNF CONTROLS", /* 21541 */ "NET-TEK.info", /* 21542 */ "Bartels System GmbH", /* 21543 */ "Ktech Telecom", /* 21544 */ "Universidad Nacional de Salta", /* 21545 */ "Virtual Conexions Inc", /* 21546 */ "Logic Product Development", /* 21547 */ "Qoris, Inc.", /* 21548 */ "Vine Systems Limited", /* 21549 */ "Millennium Pharmaceutical, Inc.", /* 21550 */ "IdleAire Technologies Corp.", /* 21551 */ "XI INTERNET SERVICES", /* 21552 */ "Kineticode, INc.", /* 21553 */ "Intertech Software Ltd", /* 21554 */ "VonWangelin", /* 21555 */ "Botho.Net", /* 21556 */ "Fabio Perini North America, Inc.", /* 21557 */ "East Sea Group", /* 21558 */ "Parallelspace Corporation", /* 21559 */ "Atlanta Help Desk", /* 21560 */ "abk-technology GmbH", /* 21561 */ "Boing.com", /* 21562 */ "Center of the System Administration LLC", /* 21563 */ "MMForces.de", /* 21564 */ "R. E. Smith", /* 21565 */ "WMS Industries Inc.", /* 21566 */ "Network Computing Services, Inc.", /* 21567 */ "nGENn GmbH", /* 21568 */ "COMPSIS", /* 21569 */ "Crimson Microsystems", /* 21570 */ "Cornerstone University", /* 21571 */ "Incompatible Time Sharing Systems", /* 21572 */ "gb EDV Beratung", /* 21573 */ "Active Systems Ltd.", /* 21574 */ "IRIS Télécom & Réseaux", /* 21575 */ "Vestfold Butikkdata AS", /* 21576 */ "Allgemeine Anthroposophische Gesellschaft", /* 21577 */ "Radium Instituto de Oncologia", /* 21578 */ "HarlemLIVE", /* 21579 */ "XDS", /* 21580 */ "Bird Technologies", /* 21581 */ "twam systems", /* 21582 */ "Oy Stinghorn Ltd", /* 21583 */ "BTT Software", /* 21584 */ "Apollo Medical Imaging Technology", /* 21585 */ "ELITECH DATACOM CO.,LTD.", /* 21586 */ "Cemtek Computer Solutions Ltd.", /* 21587 */ "Media Connect GmbH", /* 21588 */ "Infosila", /* 21589 */ "Zeni Corporation SA", /* 21590 */ "Systime Informatik AG", /* 21591 */ "Activis Polska Sp. z o.o.", /* 21592 */ "Agnes Cebulla", /* 21593 */ "Dougs Computers", /* 21594 */ "Kerberos Research", /* 21595 */ "Low Fat Technology, LLC", /* 21596 */ "Paper Coaters Limited", /* 21597 */ "Net Design Studio S.L.", /* 21598 */ "TRAK Microwave Corporation", /* 21599 */ "NETIKUS.NET ltd", /* 21600 */ "Cementhorizon", /* 21601 */ "Turbocomm Tech. Inc.", /* 21602 */ "e-Lock Corporation Sdn. Bhd.", /* 21603 */ "Fiserv", /* 21604 */ "Sollentuna Energi AB", /* 21605 */ "Asclep Communications Private Ltd", /* 21606 */ "SPAR Oesterreichische Warenhandels-AG", /* 21607 */ "John G Russell (Transport) Ltd.,", /* 21608 */ "Syscomp GmbH", /* 21609 */ "Quality Objects S.L.", /* 21610 */ "MDHM COMMUNICATION", /* 21611 */ "ise - Individuelle Software-Entwicklung GmbH", /* 21612 */ "TOYOTA Motor Marketing Europe", /* 21613 */ "Multix Finland Oy", /* 21614 */ "Bolton Sixth Form College", /* 21615 */ "Fraunhofer IIS", /* 21616 */ "TiFiC AB", /* 21617 */ "Navecor, SA", /* 21618 */ "Massey Wilcox Transport Ltd.", /* 21619 */ "Morrow Technologies Corporation", /* 21620 */ "Perez Torres y Cia.", /* 21621 */ "Centerpoint Technologies Inc", /* 21622 */ "Serono International SA", /* 21623 */ "EcoNet.Com, Inc.", /* 21624 */ "Shikoku Instrumentation CO.,LTD", /* 21625 */ "NetMon Information Systems Ltd.", /* 21626 */ "Embrapa Monitoramento por Satélite", /* 21627 */ "Niagara LaSalle Corporation", /* 21628 */ "IKTEK", /* 21629 */ "University of Fukui", /* 21630 */ "Axero AG", /* 21631 */ "Kayak Software Corporation", /* 21632 */ "eCorridor, Inc.", /* 21633 */ "Educational Community Credit Union", /* 21634 */ "ZhongChuangXingCe Beijing,China", /* 21635 */ "Tech-Nous Ltd", /* 21636 */ "PacWan", /* 21637 */ "PROD-EL PRODOTTI ELETTRONICI S.P.A.", /* 21638 */ "CONSIGNACIONES TORO Y BETOLAZA,S.A.", /* 21639 */ "O2 (UK) Ltd", /* 21640 */ "mm Control AG", /* 21641 */ "Le Tual Consulting", /* 21642 */ "Allianz Cia. de Seguros y Reaseguros SA", /* 21643 */ "Hyperworx", /* 21644 */ "PDV-Systeme", /* 21645 */ "Meuleman Technologies bvba", /* 21646 */ "Credence Systems Corporation", /* 21647 */ "Mowa - Mobile Wireless Applications Ltda.", /* 21648 */ "Access Prime", /* 21649 */ "The Integer Group", /* 21650 */ "FastSecure Technologies", /* 21651 */ "programmercafe", /* 21652 */ "Wirtualna Polska S.A.", /* 21653 */ "netnea AG", /* 21654 */ "Deadpixi.com", /* 21655 */ "Iskraemeco d.d.", /* 21656 */ "Abrantix AG", /* 21657 */ "Kashya", /* 21658 */ "IsarNet AG", /* 21659 */ "ADAM SOFTWARE Ingenieurbuero", /* 21660 */ "Verilet Corporation", /* 21661 */ "IIJ Technology Inc.", /* 21662 */ "Pazmany Peter Catholic University", /* 21663 */ "SAPEC (Sociedad Anonima de Productos Electronicos y de Comunicacion)", /* 21664 */ "VSB - Technical University of Ostrava", /* 21665 */ "ToutProgrammer.com", /* 21666 */ "Claymore Systems, Inc.", /* 21667 */ "one11.net", /* 21668 */ "Multiband Inc", /* 21669 */ "MM Invent", /* 21670 */ "VSS monitoring Inc.", /* 21671 */ "Psyche Trading Company", /* 21672 */ "Bei Jing Polypegasus Technology Co., Ltd.", /* 21673 */ "Beijing TeleSystem Technologies Co., Ltd", /* 21674 */ "Compunicate Technologies, Inc.", /* 21675 */ "SparkLAN Communications, Inc.", /* 21676 */ "Shanghai Huama Information Tech.Developmenet Co.,Ltd", /* 21677 */ "SCREEN SERVICE ITALIA S.p.A.", /* 21678 */ "Bundesagentur für Arbeit", /* 21679 */ "MeadWestvaco Intelligent Systems", /* 21680 */ "WholeSecurity, Inc.", /* 21681 */ "ricilake.net", /* 21682 */ "Wyrdwright, Inc.", /* 21683 */ "wayneandersen.com", /* 21684 */ "eFunds Corp.", /* 21685 */ "Kyung Gee Electronics Co., Ltd.", /* 21686 */ "KIP America, Inc.", /* 21687 */ "Serge Co.", /* 21688 */ "easynet", /* 21689 */ "David Bremner", /* 21690 */ "gnuTechnologies", /* 21691 */ "Coradir S.A.", /* 21692 */ "LINET Services GbR", /* 21693 */ "BeiJing Sina Information Technology Co.,Ltd", /* 21694 */ "net-track GmbH", /* 21695 */ "KEYMILE AG", /* 21696 */ "Rivertree Networks Corp.", /* 21697 */ "Field Boxmore Mareen", /* 21698 */ "Belgocontrol", /* 21699 */ "Keller & Partner GmbH", /* 21700 */ "MOBOTIX AG", /* 21701 */ "EAPLV", /* 21702 */ "Microhard Systems Inc.", /* 21703 */ "DPS-Promatic srl", /* 21704 */ "ARG Electrodesign Ltd", /* 21705 */ "Dominion Resources, Inc.", /* 21706 */ "DECATHLON", /* 21707 */ "Netsweeper Inc.", /* 21708 */ "Procios Oy", /* 21709 */ "agentes AG", /* 21710 */ "MediSoft Egypt", /* 21711 */ "Caisse de Prévoyance Sociale", /* 21712 */ "Vectorsite", /* 21713 */ "Cape Byron Imports & Wholesale Pty. Ltd.", /* 21714 */ "UFRJ", /* 21715 */ "hangzhou goldway information technology CO.,Ltd", /* 21716 */ "NIPPON KOEI POWER SYSTEMS Co.,Ltd.", /* 21717 */ "ReestrRN", /* 21718 */ "EmmeciSoft S.n.c.", /* 21719 */ "Microgaming Software Systems Limited", /* 21720 */ "SERVICIO DE CERTIFICACION DE LOS REGISTRADORES", /* 21721 */ "Marine Corps Community Services", /* 21722 */ "NTA CO.LTD.", /* 21723 */ "elementec Software & Consulting", /* 21724 */ "Olaf Huebner", /* 21725 */ "HappyComm", /* 21726 */ "People's Bank of Georgia", /* 21727 */ "Synaccess Networks, Inc.", /* 21728 */ "Somogy Informatika Kft.", /* 21729 */ "stSoft", /* 21730 */ "CryptoSoft, Ltd", /* 21731 */ "Sparkasse Hanauerland", /* 21732 */ "Altar Sp. z o.o.", /* 21733 */ "APO Consortium", /* 21734 */ "Alber Inc.", /* 21735 */ "IntelliTrans Ltd", /* 21736 */ "Gestweb S.p.A.", /* 21737 */ "Hong Kong Education City Ltd", /* 21738 */ "Trusted Solutions s.r.o.", /* 21739 */ "Persystent Technology, Inc", /* 21740 */ "St. Margaret's Anglican Church", /* 21741 */ "uWink Inc.", /* 21742 */ "yasp.at", /* 21743 */ "BlackRock Financial Management", /* 21744 */ "Arnprior KF", /* 21745 */ "Cheyenne Networks Inc.", /* 21746 */ "Aldebaran Systems Ltd", /* 21747 */ "Iggesund Paperboard AB", /* 21748 */ "EtherTek Circuits", /* 21749 */ "Highbridge Capital Management, LLC", /* 21750 */ "St. Thomas University", /* 21751 */ "Societe Cooperative Migros Neuchatel-Fribourg", /* 21752 */ "ZKM - Zentrum f. Kunst und Medientechnologie, Karlsruhe", /* 21753 */ "Media-Com Sp. z o.o.", /* 21754 */ "Collaborative Adaptive Sensing of the Atmosphere (CASA)", /* 21755 */ "SOFTEC sa", /* 21756 */ "Digicadd Computacao Grafica LTDA", /* 21757 */ "Slushpupie", /* 21758 */ "All China Federation Of Industry & Commmerce", /* 21759 */ "E-Access Broadband", /* 21760 */ "Lübecker Hafen-Gesellschaft mbH", /* 21761 */ "Cornwall County Council", /* 21762 */ "Claranet", /* 21763 */ "Hill Systems LLC", /* 21764 */ "The Lyarama Project", /* 21765 */ "Imperial College London", /* 21766 */ "Synarc, Inc.", /* 21767 */ "Inspired Broadcast Networks Ltd", /* 21768 */ "M-Tech Information Technology, Inc.", /* 21769 */ "Wesaidso Software Engineering", /* 21770 */ "Imolko C.A.", /* 21771 */ "SEB Eesti Ühispank AS", /* 21772 */ "Choice Sourcing Pty", /* 21773 */ "ECLASS", /* 21774 */ "Digital Imaging Solutions", /* 21775 */ "TelcoBridges Inc.", /* 21776 */ "Nitido Inc.", /* 21777 */ "VA TECH ELIN EBG GmbH & Co", /* 21778 */ "jade.net", /* 21779 */ "ADURO d.o.o.", /* 21780 */ "Montelnor SCL", /* 21781 */ "Chinasys Technologies Co.,Ltd.", /* 21782 */ "ANTGroup s.r.l", /* 21783 */ "Calrec Audio Ltd", /* 21784 */ "VÖB-Service GmbH", /* 21785 */ "Boston.com", /* 21786 */ "Qualitas, Inc.", /* 21787 */ "Poindexter Systems, Inc.", /* 21788 */ "Cablevision - FiberTel", /* 21789 */ "Obidobi Software", /* 21790 */ "Wave-Tech, Inc.", /* 21791 */ "BearingPoint, Inc.", /* 21792 */ "Kisoku Networking", /* 21793 */ "Panthera Systems", /* 21794 */ "Integrated Decision Systems", /* 21795 */ "HW group s.r.o", /* 21796 */ "Googgun Technologies Inc.", /* 21797 */ "Covergence, Inc.", /* 21798 */ "CONSULTEC", /* 21799 */ "Island Internet Services", /* 21800 */ "California State University Los Angeles", /* 21801 */ "Maternité Régionale A. Pinard", /* 21802 */ "Centrepoint Technologies", /* 21803 */ "360degreeweb, Inc", /* 21804 */ "monkeyjr.com", /* 21805 */ "Vitrado GmbH", /* 21806 */ "TRW Engine Components", /* 21807 */ "Prairie Systems Inc.", /* 21808 */ "Campusware", /* 21809 */ "Yubivaza", /* 21810 */ "Kalion", /* 21811 */ "Kofax Image Products", /* 21812 */ "West Japan Railway Company", /* 21813 */ "Booth Software Consulting", /* 21814 */ "School of Veterinary Medicine Hannover", /* 21815 */ "CDE nove tehnologije d.d.", /* 21816 */ "Gemini Storage Company", /* 21817 */ "CapTech Ventures, Inc.", /* 21818 */ "Guernsey Customs", /* 21819 */ "ChanneLynx LLC", /* 21820 */ "Colibre", /* 21821 */ "Andrew Ducore, Independent Consultant", /* 21822 */ "MDS Caswell", /* 21823 */ "Fortuitous Technologies Inc", /* 21824 */ "asystec | Adolf Systemtechnik", /* 21825 */ "Metropipe Network Services Inc", /* 21826 */ "ArcanaNetworks Inc.", /* 21827 */ "Meta Systems AS", /* 21828 */ "Ian A. Young", /* 21829 */ "CrossTalk Göteborg AB", /* 21830 */ "ClearOne Communications Inc.", /* 21831 */ "LabOne Inc.", /* 21832 */ "Megas Media", /* 21833 */ "Tufin Technologies", /* 21834 */ "SESCAM - Servicio de Salud de Castilla la Mancha", /* 21835 */ "MRF Systems Ltd.", /* 21836 */ "DiGIR", /* 21837 */ "LooseFlow Ltd", /* 21838 */ "ALAXALA Networks Corporation", /* 21839 */ "Hitachi IE Systems Co.,Ltd.", /* 21840 */ "Hochschule fuer Angewandte Wissenschaften Hamburg", /* 21841 */ "Energy Technologies, Inc.", /* 21842 */ "SHENZHEN MQ TECHNOLOGIES INDUSTRIAL CO., LTD.", /* 21843 */ "Durham School Services", /* 21844 */ "Trium Sistemas Informaticos SL", /* 21845 */ "Trium Systems SL", /* 21846 */ "The Scott Lawson Group Ltd.", /* 21847 */ "SLACALEK", /* 21848 */ "Riggs Heinrich Media", /* 21849 */ "Intaero Sdn Bhd", /* 21850 */ "MurrayLisook.com", /* 21851 */ "Norkring AS", /* 21852 */ "Gesellschaft fuer Informations- und Datenverarbeitungs mbH", /* 21853 */ "CollabNet, Inc.", /* 21854 */ "Winterdale Computerdienste GbR", /* 21855 */ "Modulus Systems", /* 21856 */ "Chaucer Press Limited", /* 21857 */ "A.P. Woodham Ltd.", /* 21858 */ "Leightons Paper & Printing Ltd.", /* 21859 */ "Harrah's Entertainment, Inc.", /* 21860 */ "Mobile Cohesion", /* 21861 */ "Alcasat", /* 21862 */ "INFOTEL", /* 21863 */ "ibte", /* 21864 */ "Unitrends Software Corp", /* 21865 */ "FMAudit, LLC.", /* 21866 */ "ESI-HEB", /* 21867 */ "Highmark Inc.", /* 21868 */ "CUI Inc", /* 21869 */ "United Cerebral Palsy of Greater Chicago", /* 21870 */ "Datastream Systems, Inc.", /* 21871 */ "WICEN (NSW) Inc", /* 21872 */ "XFI Corporation", /* 21873 */ "Moore Gallagher ltd.", /* 21874 */ "macfadden.org", /* 21875 */ "metabit", /* 21876 */ "Multi Skilled Resources Australia", /* 21877 */ "MedStar Health", /* 21878 */ "Associazione Culturale Inventati", /* 21879 */ "Australian Experimental High Energy Physics Group", /* 21880 */ "Milom, Inc.", /* 21881 */ "Justsystem Corp.", /* 21882 */ "Brain ltd.", /* 21883 */ "W. Schneider+Co AG", /* 21884 */ "Ericsson Mobile Platforms AB", /* 21885 */ "Newel Informatique", /* 21886 */ "Funkwerk AG, Traffic & Control Communication, Kiel", /* 21887 */ "Content Management License Administrator", /* 21888 */ "Acsis, Inc.", /* 21889 */ "GRIB", /* 21890 */ "Tibco Telecom Reseau", /* 21891 */ "Ringwald Mikroelektronik GmbH", /* 21892 */ "phil cornes", /* 21893 */ "ISABEL S.A.", /* 21894 */ "Delta-Soft Ltd", /* 21895 */ "Niederrhein University of Applied Sciences", /* 21896 */ "i-CABLE Network Limited", /* 21897 */ "SvamberkNET, s.r.o.", /* 21898 */ "Cape City Command, LLC", /* 21899 */ "Danacal Ltd.", /* 21900 */ "Millward Brown UK Limited", /* 21901 */ "BAJM Internet", /* 21902 */ "NetServices LLC", /* 21903 */ "Yoshida's Inc.", /* 21904 */ "Leibniz-Institut fuer Meereswissenschaften", /* 21905 */ "March Hare Software Ltd.", /* 21906 */ "Wohnprojekt Schellingstrasse GmbH", /* 21907 */ "NexaSoft Inc.", /* 21908 */ "Chaos Limited, LLC", /* 21909 */ "Electrocomponentes S.A.", /* 21910 */ "Trusted Computing Group", /* 21911 */ "Priva Technologies, Inc.", /* 21912 */ "dop intelligence", /* 21913 */ "Networx.AT - busta & neumayr oeg", /* 21914 */ "BitPusher, LLC", /* 21915 */ "Tehna", /* 21916 */ "Staatliche Berufsschule I Bayreuth", /* 21917 */ "Ideas to Interconnect B.V.", /* 21918 */ "Clearwire, Inc.", /* 21919 */ "Cipherium Systems Co., Ltd.", /* 21920 */ "Inspiration Matters Ltd", /* 21921 */ "TIE - Tecnologias de Integração Empresarial, Lda.", /* 21922 */ "Bowater, Inc.", /* 21923 */ "Adam Pordzik", /* 21924 */ "RTP Network Services, Inc", /* 21925 */ "MedOrder, Inc.", /* 21926 */ "intralinux", /* 21927 */ "Renaissance Computing Institute", /* 21928 */ "Netikos Finland Oy", /* 21929 */ "Prihateam Networks Finland Ltd", /* 21930 */ "SE46 AB", /* 21931 */ "Tor.AT - Netzwerke-Server-Sicherheit", /* 21932 */ "Jamie Thompson", /* 21933 */ "FIlesX", /* 21934 */ "Sigtec LTD", /* 21935 */ "Senforce Technologies, Inc.", /* 21936 */ "Ezrez Software, Inc.", /* 21937 */ "Radio Muzyka Fakty, Sp. z o.o.", /* 21938 */ "HYTEC GmbH", /* 21939 */ "Enatel Ltd", /* 21940 */ "Data Return, LLC", /* 21941 */ "Rubicon Software Ltd", /* 21942 */ "Uni-Sommerfest e.V.", /* 21943 */ "Blitzen Networks", /* 21944 */ "Kerberos d.o.o.", /* 21945 */ "University of Liverpool, Department of Electrical Engineering", /* 21946 */ "TintaDigital, Soluções em Tecnologias de Informação, Lda.", /* 21947 */ "TW TeamWare s.r.l.", /* 21948 */ "Istituto Nazionale di Geofisica e Vulcanologia", /* 21949 */ "Open Consultants", /* 21950 */ "Katun Corporation", /* 21951 */ "Crescent Business, Inc.", /* 21952 */ "Business Computer Maintenance Limited", /* 21953 */ "Transatlantic Diagnostics LLC", /* 21954 */ "CONTROL SYSTEMS Srl", /* 21955 */ "Megapath Cloud Company LLC", /* 21956 */ "Sealed Air (NZ) ltd", /* 21957 */ "Thermakraft IndustriesNZ Ltd.", /* 21958 */ "P J Papers ltd.", /* 21959 */ "Legend Communications plc", /* 21960 */ "Exeo Systems", /* 21961 */ "Nextel Communications Inc.", /* 21962 */ "Obeco GmbH", /* 21963 */ "Nesym Consulting Srl", /* 21964 */ "LTLab", /* 21965 */ "Cooperativa Obrera Ltda.", /* 21966 */ "Invento Networks, Inc.", /* 21967 */ "Food Services of America", /* 21968 */ "Kernway Technology Co., Ltd", /* 21969 */ "AHTS", /* 21970 */ "Kisters AG", /* 21971 */ "1mage Software Inc.", /* 21972 */ "CaribbeanClub", /* 21973 */ "Boris Kulig EDV und Statistik Beratung", /* 21974 */ "Infraserv Gmbh & Co Hoechst KG", /* 21975 */ "Roberts Wesleyan College", /* 21976 */ "The Sage Group PLC", /* 21977 */ "Fluid, Inc.", /* 21978 */ "fks BVBA", /* 21979 */ "Enran Telecom", /* 21980 */ "Spiderbox P/L", /* 21981 */ "With Mobile Technology Co., Ltd.", /* 21982 */ "Terrace technology, Inc.", /* 21983 */ "Viswis, Inc.", /* 21984 */ "Server-Center, JSC", /* 21985 */ "Shinnyo-en Buddhist Order Co.", /* 21986 */ "Bugs Inc.", /* 21987 */ "ARENAL", /* 21988 */ "Connex.cc DI Hadek GmbH", /* 21989 */ "Universidad Autónoma de Baja California Sur", /* 21990 */ "char", /* 21991 */ "Central Command Inc.", /* 21992 */ "girrulat.de", /* 21993 */ "Norfolk Public Schools", /* 21994 */ "Magyar Elektronikus Aláírás Szövetség / Hungarian Association for Electronic Signature", /* 21995 */ "crocobox.org", /* 21996 */ "PowerStar Ltd.", /* 21997 */ "Tiani-Spirit", /* 21998 */ "PLUM Computer Consulting, Inc.", /* 21999 */ "Pacific Laminations Co. limited", /* 22000 */ "Fachhochschule Esslingen - Hochschule fuer Technik", /* 22001 */ "Michael Breuer", /* 22002 */ "mst", /* 22003 */ "X-MD", /* 22004 */ "GE Healthcare - IT", /* 22005 */ "AREVA T&D", /* 22006 */ "WinWholesale Inc.", /* 22007 */ "pld-sparc64", /* 22008 */ "IP-LABEL", /* 22009 */ "Tranfa Optic Telecommunications Co., Ltd.", /* 22010 */ "CORE MICRO SYSTEMS INC.", /* 22011 */ "silkroadtaiwan,Inc", /* 22012 */ "SGDN", /* 22013 */ "China Beijing Broada Digital Technology Co.,Ltd", /* 22014 */ "BanianTech Co.,Ltd", /* 22015 */ "RackWatch LLC", /* 22016 */ "Claritas, Inc.", /* 22017 */ "RedIce SA", /* 22018 */ "Tutus Data AB", /* 22019 */ "CoreTEC GmbH", /* 22020 */ "WestCall Ltd", /* 22021 */ "DeusXMachina", /* 22022 */ "Schaly", /* 22023 */ "Inoi", /* 22024 */ "ELTI d.o.o.", /* 22025 */ "Texas State Technical College System", /* 22026 */ "Rock Mobile Corporation", /* 22027 */ "Hauser/Flimp Programming", /* 22028 */ "ActiveLive Technologies LLC", /* 22029 */ "Kign Foundation", /* 22030 */ "Lattice Semiconductor Corporation", /* 22031 */ "Actelion Pharmaceuticals Ltd.", /* 22032 */ "Cynical Networks", /* 22033 */ "joztoz net", /* 22034 */ "ECT News Network, Inc.", /* 22035 */ "Tapsell-Ferrier Limited", /* 22036 */ "Elektrownia Be³chatów S.A.", /* 22037 */ "Kommune42", /* 22038 */ "Mathias Wohlfarth EDV-Beratung", /* 22039 */ "STATCON B SCHAEFER", /* 22040 */ "Generalstaatsanwaltschaft Berlin", /* 22041 */ "GITEM", /* 22042 */ "Land-of-uz.net", /* 22043 */ "Moviltek, Inc.", /* 22044 */ "Electrosystems Inc.", /* 22045 */ "Planecom s.r.l.", /* 22046 */ "Qascom S.r.l.", /* 22047 */ "CAJA DE AHORROS EL MONTE", /* 22048 */ "Metro Group Information Technologies", /* 22049 */ "COPA-DATA GmbH", /* 22050 */ "SavageS Net", /* 22051 */ "Rising Technology Co., Ltd.", /* 22052 */ "Neptune Gaming", /* 22053 */ "Three Rings Design, Inc.", /* 22054 */ "HighSpeed America, Inc.", /* 22055 */ "Prefeitura da Cidade do Rio de Janeiro", /* 22056 */ "New Signature", /* 22057 */ "Danaher Power Solutions", /* 22058 */ "Corp. Hostarica", /* 22059 */ "Labcom Sistemas Ltda", /* 22060 */ "Liquid Systems", /* 22061 */ "G2 Switchworks", /* 22062 */ "CIFE - Consorcio de Intermediación de Facturas Electrónicas", /* 22063 */ "Landeskreditbank Baden-Württemberg (L-Bank)", /* 22064 */ "Mobiltel AD", /* 22065 */ "Mobitex Technology AB", /* 22066 */ "ENSEA", /* 22067 */ "Tai Liang Chemical Corporation", /* 22068 */ "Deuromedia Technologies", /* 22069 */ "LMR Robosistic Ltd. Co.", /* 22070 */ "Associazione culturale Investici", /* 22071 */ "EDS", /* 22072 */ "Cerantus Technologies", /* 22073 */ "Vibrant Media Ltd", /* 22074 */ "Global Technical Engineering Solutions Inc.", /* 22075 */ "Televisio de Catalunya, s.a.", /* 22076 */ "Smiling Screens Inc.", /* 22077 */ "Burlington Coat Factory Warehouse", /* 22078 */ "Matterform Media", /* 22079 */ "YACAST", /* 22080 */ "Guyton Networks", /* 22081 */ "IBM WPC Lab", /* 22082 */ "okkernoot.net", /* 22083 */ "Industec Industria Metalurgica Ltda.", /* 22084 */ "CIDE Consorcio para la Interoperabilidad de Documentos Electrónicos", /* 22085 */ "Paul Poeltner", /* 22086 */ "Invelica GmbH", /* 22087 */ "Alpine-Energie Holding AG", /* 22088 */ "Paedagogische Hochschule Zentralschweiz", /* 22089 */ "GCommerce Inc.", /* 22090 */ "MATRICS COMMUNICATIONS", /* 22091 */ "Mazda Motor Europe GmbH", /* 22092 */ "Software Systems", /* 22093 */ "Pulse Entertainment", /* 22094 */ "Baltic Online Computer GmbH", /* 22095 */ "Image Project Inc.", /* 22096 */ "B&W Fahrzeugentwicklung GmbH", /* 22097 */ "CHEN", /* 22098 */ "EKF Elektronik &- Messtechnik GmbH", /* 22099 */ "Swisscom Fixnet AG", /* 22100 */ "Udo Meng GmbH", /* 22101 */ "KIM Systemhaus GmbH", /* 22102 */ "Paynet Ltd", /* 22103 */ "YesTurnkey Technology, Inc.", /* 22104 */ "Central Visayas Information Sharing Network Foundation Inc.", /* 22105 */ "Vodafone SDEC", /* 22106 */ "The Florida Lottery", /* 22107 */ "Application Science and Technology", /* 22108 */ "Beuth Hochschule Berlin / University of Applied Sciences", /* 22109 */ "Airedale International Air Conditioning Ltd", /* 22110 */ "Chilibyte Oy", /* 22111 */ "Vigil Security, LLC", /* 22112 */ "Gigabeam", /* 22113 */ "Battle.net Underground", /* 22114 */ "Netflexity, Ltd", /* 22115 */ "Queryus", /* 22116 */ "Epiq Electronic Assembly Ltd.", /* 22117 */ "Advance America", /* 22118 */ "GBST Holdings", /* 22119 */ "datastacks.com", /* 22120 */ "Krasnoyarsk State Pedagogical University", /* 22121 */ "ESOLUTIONPROVIDERS", /* 22122 */ "Unimas Systems, Corp.", /* 22123 */ "Networks & More! Inc.", /* 22124 */ "Sierra Video Systems Inc.", /* 22125 */ "AVONET, s.r.o.", /* 22126 */ "Delvos", /* 22127 */ "RBC Capital Markets, Sydney", /* 22128 */ "AfterHours Upgrades", /* 22129 */ "Vivatas, Inc", /* 22130 */ "Technical Management System GmbH", /* 22131 */ "Mediasyscom SAS", /* 22132 */ "UWIC", /* 22133 */ "Eminds AB", /* 22134 */ "Sentiva Innovation AB", /* 22135 */ "outsmart Ltd.", /* 22136 */ "Ivosh, s.r.o.", /* 22137 */ "ATS-KONVERS Ltd.", /* 22138 */ "Kurchatov Institute Grid Deployment", /* 22139 */ "Volker Scheuber", /* 22140 */ "ProCom GmbH", /* 22141 */ "Interferenza s.r.l.", /* 22142 */ "Steatite Ltd", /* 22143 */ "InfoNotary Ltd.", /* 22144 */ "ViDiSys GmbH", /* 22145 */ "Dpt. of Philosophy, Utrecht University", /* 22146 */ "Allpoint Security Ltd.", /* 22147 */ "Venda Ltd", /* 22148 */ "Systemhaus Bad Waldsee", /* 22149 */ "Wettern Network Solutions", /* 22150 */ "Neotronic s.r.l.", /* 22151 */ "CipherSec SPRL", /* 22152 */ "Viveon AG", /* 22153 */ "Jotron Electronics a.s.", /* 22154 */ "Pontificia Universita Santa Croce", /* 22155 */ "Dynamit Nobel Kunststoff GmbH", /* 22156 */ "SLU", /* 22157 */ "Resolv SARL", /* 22158 */ "EPIN Technologies (China), Ltd.", /* 22159 */ "RW Comercio e Servicos Ltda.", /* 22160 */ "John Wiggins", /* 22161 */ "Beyond Disability, Inc.", /* 22162 */ "Ricoh Printing Systems, Ltd.", /* 22163 */ "Cambridge Silicon Radio Limited", /* 22164 */ "Web Service Solutions, Inc.", /* 22165 */ "Ocean Broadband Networks", /* 22166 */ "nologic.org", /* 22167 */ "Crown College", /* 22168 */ "NetEngine, Inc.", /* 22169 */ "FXCM", /* 22170 */ "CeSigma - Signals & Systems", /* 22171 */ "HaCon Ingenieurgesellschaft mbH", /* 22172 */ "Flex Engineering", /* 22173 */ "Virtual Trip Ltd.", /* 22174 */ "Mitron Oy", /* 22175 */ "asknet AG", /* 22176 */ "DFN-Verein", /* 22177 */ "Kurs LLC", /* 22178 */ "Otsuka Corporation", /* 22179 */ "INSCAPE DATA CORPORATION", /* 22180 */ "Avision Inc.", /* 22181 */ "Cascadia BHC", /* 22182 */ "Cylant, Inc.", /* 22183 */ "21st Century Software Inc.", /* 22184 */ "eScholar LLC", /* 22185 */ "Marketing Resource Consultants, Inc.", /* 22186 */ "Symphoniq", /* 22187 */ "Correctime ltd", /* 22188 */ "Star Technologies, LLC", /* 22189 */ "NetEffect, Inc.", /* 22190 */ "Bismarck Public Schools", /* 22191 */ "Pictou Regional Development Commission", /* 22192 */ "Computer Information Systems Ltd., Brest", /* 22193 */ "Orion Systems Inc", /* 22194 */ "NeoTIP SA", /* 22195 */ "Vistek Electronics Ltd", /* 22196 */ "SOFTBANK BB Corp.", /* 22197 */ "University of St. Gallen", /* 22198 */ "United Arab Emirates University", /* 22199 */ "Sistemas Techniclite. C.A.", /* 22200 */ "Research Center of NetWork Techology Nanjing University Of Posts And Telecommunication Inc.", /* 22201 */ "Security Tostem co.,Ltd.", /* 22202 */ "Informática El Corte Inglés, S.A.", /* 22203 */ "Bundesversicherungsanstalt für Angestellte", /* 22204 */ "3G Data Soluciones C.A.", /* 22205 */ "M-real Corporation", /* 22206 */ "SureWest", /* 22207 */ "AGES International GmbH & Co KG", /* 22208 */ "LJXN inc.", /* 22209 */ "FLsystem", /* 22210 */ "Legacy Property Investments LLC", /* 22211 */ "Cognio, Inc.", /* 22212 */ "Posda", /* 22213 */ "Explorer Post 227", /* 22214 */ "Pogo Linux, Inc.", /* 22215 */ "sighq networking", /* 22216 */ "Yitran Communications", /* 22217 */ "NAVARRO Y BORONAD, S.L.", /* 22218 */ "BoreNet AB", /* 22219 */ "LACNIC", /* 22220 */ "Wescom GmbH", /* 22221 */ "ProaXial", /* 22222 */ "IntelliCal LLC", /* 22223 */ "Queensland Treasury", /* 22224 */ "Huazhong University of Science and Technology", /* 22225 */ "Acamaya SA", /* 22226 */ "David Mains & Co. Inc.", /* 22227 */ "The University of Manchester Computer Society", /* 22228 */ "Heiks computerdiensten", /* 22229 */ "MyPoints, Inc.", /* 22230 */ "VEL Technologies, LLC", /* 22231 */ "Kyle Hamilton", /* 22232 */ "German Overseas Institute", /* 22233 */ "KEYNECTIS", /* 22234 */ "Beijing WellTelecom Co.,Ltd.", /* 22235 */ "Ultrawaves Design, Inc.", /* 22236 */ "Inventronik GmbH", /* 22237 */ "FOXCONN Technology Group", /* 22238 */ "Response Systems Corporation", /* 22239 */ "DATOR3 a.s.", /* 22240 */ "C&A Computer Consultants Ltd.", /* 22241 */ "GENTOO FOUNDATION, INC.", /* 22242 */ "The Swatch Group Ltd", /* 22243 */ "Ing.-Büro Otte Gmbh", /* 22244 */ "Phalanx", /* 22245 */ "HSBC Bank plc", /* 22246 */ "Port of Tilbury London Ltd", /* 22247 */ "topf-sicret.org", /* 22248 */ "INSIGHT TECHNOLOGIES Co., Ltd", /* 22249 */ "Max-Planck-Institut fuer Radioastronomie", /* 22250 */ "Syderal SA", /* 22251 */ "McAfee Inc.", /* 22252 */ "Lite Speed Technologies, Inc.", /* 22253 */ "Jerome's Furniture Warehouse", /* 22254 */ "StopTheGlaciers.org", /* 22255 */ "Groep T Hogeschool Leuven", /* 22256 */ "Consultation informatique Daniel Savard Inc.", /* 22257 */ "Enlaces Tecnologicos S.A. de C.V.", /* 22258 */ "WebAvis", /* 22259 */ "Scana", /* 22260 */ "California Lutheran University", /* 22261 */ "OpenSides sprl", /* 22262 */ "The Corporation of the County of Brant", /* 22263 */ "Artifact Software Inc.", /* 22264 */ "Stewart Enterprises, Inc.", /* 22265 */ "Evidant Corporation", /* 22266 */ "Integral Technologies Inc", /* 22267 */ "Flammiger Enterprises", /* 22268 */ "Charles A Gura", /* 22269 */ "Quality Comm Comércio e Serviços de Teleinformática Ltda", /* 22270 */ "Nimium d.o.o.", /* 22271 */ "PAREXEL International Corporation", /* 22272 */ "Universita' degli Studi di Ferrara", /* 22273 */ "QSAN Technology, Inc.", /* 22274 */ "PNMS", /* 22275 */ "FHD Ltd.", /* 22276 */ "GIquadrat mbH", /* 22277 */ "Bob-paperi Ky", /* 22278 */ "Shiflett Consulting", /* 22279 */ "Telus Mobility", /* 22280 */ "CODE INGENIERIA INFORMATICA", /* 22281 */ "Qualys, Inc.", /* 22282 */ "Gutemberg Medeiros Ltda", /* 22283 */ "Dimensao Digital Desenvolvimento Ltd.", /* 22284 */ "Teracue", /* 22285 */ "SYSTEMA", /* 22286 */ "TRS SpA", /* 22287 */ "EXTIS GmbH", /* 22288 */ "Contec GmbH", /* 22289 */ "SkandSoft Technologies", /* 22290 */ "FUJITSU ADVANCED SOLUTIONS LIMITED", /* 22291 */ "Network Center of Peking University", /* 22292 */ "Daily Dose Language Systems, Inc.", /* 22293 */ "CAR-FRESHNER Corporation", /* 22294 */ "Ministrstvo za obrambo Republike Slovenije", /* 22295 */ "Fazt! Networks, Ltd.", /* 22296 */ "Allied Bank Corporation", /* 22297 */ "Höjebromölla", /* 22298 */ "Pontifical University of St. Thomas", /* 22299 */ "CableMatrix Technologies, Inc.", /* 22300 */ "COMP Rzeszow S.A.", /* 22301 */ "iC Compas GmbH and Co KG", /* 22302 */ "RSS Solutions Inc", /* 22303 */ "Westinghouse Savannah River Company, LLC", /* 22304 */ "schwaberow.de", /* 22305 */ "McMaster University", /* 22306 */ "Active Reasoning, Inc.", /* 22307 */ "RedSky Technologies Inc.", /* 22308 */ "California State Automobile Association", /* 22309 */ "ComNetMedia AG", /* 22310 */ "A.F. Blakemore and Son Ltd", /* 22311 */ "Université Saint-Louis - Bruxelles (USL-B)", /* 22312 */ "SP Controls, Inc.", /* 22313 */ "TGN-Systeme Krueger + Partner", /* 22314 */ "spot media AG", /* 22315 */ "OnTapSolutions", /* 22316 */ "Applied Identity, Inc.", /* 22317 */ "Anyware Video", /* 22318 */ "Dravske elektrarne Maribor", /* 22319 */ "Guardian Newspapers Limited", /* 22320 */ "ISAC, Inc.", /* 22321 */ "Freecomm Corporation", /* 22322 */ "Capinfo Co, Ltd.", /* 22323 */ "Cooperton LLC", /* 22324 */ "Blick SA", /* 22325 */ "Sago S.p.A", /* 22326 */ "Martos Ltd", /* 22327 */ "id Quantique SA", /* 22328 */ "same", /* 22329 */ "BIAS Inc.", /* 22330 */ "State of Texas, Office of the Attorney General, Child Support Division", /* 22331 */ "ImmediateIT", /* 22332 */ "JPotter", /* 22333 */ "Laws and Wolfe Inc.", /* 22334 */ "Alcorn State University", /* 22335 */ "Hopson Advanced Embedded Engineering", /* 22336 */ "Hitachi Electronics Services Co.,Ltd", /* 22337 */ "Paliot", /* 22338 */ "RHX Studio Snc", /* 22339 */ "Herlein Engineering, Inc.", /* 22340 */ "ESO Technologies", /* 22341 */ "Dyndaco BVBA", /* 22342 */ "Technical Manangment", /* 22343 */ "Telcomanager Technologies", /* 22344 */ "Exalon Delft", /* 22345 */ "dass /IT GmbH", /* 22346 */ "IDS Services, LLC.", /* 22347 */ "Braintower Technologies GmbH", /* 22348 */ "Premier Retail Networks", /* 22349 */ "debitel AG", /* 22350 */ "RedPrompt", /* 22351 */ "Pragmeta Networks", /* 22352 */ "Network Connection", /* 22353 */ "The Lapp Companies", /* 22354 */ "Clariton Networks Ltd.", /* 22355 */ "Web-Cyber & Co", /* 22356 */ "INET-Consulting.com, Inc", /* 22357 */ "Albeo", /* 22358 */ "Jofee Internet Services", /* 22359 */ "Unzet ApS", /* 22360 */ "University of Michigan Radiation Oncology Physics", /* 22361 */ "General Software, Inc.", /* 22362 */ "Ken Bass Consulting", /* 22363 */ "EMARKMONITOR INC.", /* 22364 */ "Gluesys Co. Ltd.", /* 22365 */ "EasySoft", /* 22366 */ "Digital Fallout", /* 22367 */ "Silver Spring Networks", /* 22368 */ "Hong Kong Applied Science and Technology Research Institute Company Limited (ASTRI)", /* 22369 */ "DUPLO CORPORATION", /* 22370 */ "Business Data Solutions", /* 22371 */ "Horst Reiterer", /* 22372 */ "ThunderTechnology Srl", /* 22373 */ "Allegro Wireless Canada Inc.", /* 22374 */ "Crescent Real Estate Equities, LTD.", /* 22375 */ "Masco Corporation", /* 22376 */ "VoicePort, LLC", /* 22377 */ "Spaceship.com, Inc.", /* 22378 */ "InovaWeb", /* 22379 */ "Vincent Defert Consulting", /* 22380 */ "Linux User Group Roma", /* 22381 */ "Drazen Baic", /* 22382 */ "HCCP", /* 22383 */ "Benedikt Heinen", /* 22384 */ "Houston Academy of Medicine-Texas Medical Center Library", /* 22385 */ "ionflux.org", /* 22386 */ "InSync Technology Ltd", /* 22387 */ "SENTELCO", /* 22388 */ "IRIS Corporation Berhad", /* 22389 */ "Parsek Corporation Ltd.", /* 22390 */ "Citadel Security Software, Inc.", /* 22391 */ "Delco S.p.A.", /* 22392 */ "CDL chair - Saarland University", /* 22393 */ "Digital Fuel Ltd.", /* 22394 */ "DyLogic S.r.l.", /* 22395 */ "Power Media sp. z o.o.", /* 22396 */ "IBAMA", /* 22397 */ "Cooperativa de Computação da Unimontes", /* 22398 */ "QBT Systems, Inc.", /* 22399 */ "Inside Higher Ed", /* 22400 */ "VoIP, Inc.", /* 22401 */ "lois.inc", /* 22402 */ "Koch, Neff & Volckmar GmbH", /* 22403 */ "SBS Technologies", /* 22404 */ "Fujitsu Services Finland OY", /* 22405 */ "Adermiis", /* 22406 */ "NeoMeridian Sdn Bhd", /* 22407 */ "PrimeKey Solutions AB", /* 22408 */ "Midland Memorial Hospital", /* 22409 */ "Pixel Technology", /* 22410 */ "Hawkis Consulting", /* 22411 */ "openenterprise.co.uk", /* 22412 */ "TheStreet.com Inc", /* 22413 */ "Pacific Lutheran University", /* 22414 */ "Mole Valley Farmers Ltd.", /* 22415 */ "Shelton Internet Ltd", /* 22416 */ "Information Design Department of Tama Art University", /* 22417 */ "Usina de Imagens Photo+Design Ltda.", /* 22418 */ "Relex, Inc.", /* 22419 */ "accedian, Inc.", /* 22420 */ "TSYS Prepaid, Inc.", /* 22421 */ "Provideo Systems Pty Ltd", /* 22422 */ "Almos Systems Pty Ltd.", /* 22423 */ "INTELSOFT", /* 22424 */ "Audio Processing Technology Ltd", /* 22425 */ "Digital Data Communications Asia Co., Ltd.", /* 22426 */ "Sowood & Co Ltd", /* 22427 */ "RealOps, Inc.", /* 22428 */ "Florical Systems, Inc.", /* 22429 */ "Volke Entwicklungsring GmbH", /* 22430 */ "Phoenix Interactive Design Inc", /* 22431 */ "Gimlitech", /* 22432 */ "Silvermedia Group", /* 22433 */ "NET TIME Corp.", /* 22434 */ "Beep Science AS", /* 22435 */ "Sumaré Consultores Associados Ltda.", /* 22436 */ "ITZ Informationstechnologie GmbH", /* 22437 */ "Groxis, Inc.", /* 22438 */ "CaseNEX", /* 22439 */ "Canadian Bank Note Company, Ltd.", /* 22440 */ "Next Dimension Inc.", /* 22441 */ "CHILE.COM S.A.", /* 22442 */ "EMETEC", /* 22443 */ "GASCARD Partners, L.P.", /* 22444 */ "Simon Holmgaard-IT", /* 22445 */ "Bitdefender SRL", /* 22446 */ "B.Braun Melsungen AG", /* 22447 */ "Cluster-Worxx.net", /* 22448 */ "SOPA", /* 22449 */ "servicenetz.biz", /* 22450 */ "Custom IDEAS", /* 22451 */ "ING-DiBa AG", /* 22452 */ "H:S Hovedstadens Sygehusfællesskab", /* 22453 */ "Helmut Mauell GmbH", /* 22454 */ "Tribunal Regional do Trabalho da 4a. Região", /* 22455 */ "Hebraic Hertiage Christian School of Theology", /* 22456 */ "Deutscher Ring LebensversicherungsAG", /* 22457 */ "Modulus Video, Inc.", /* 22458 */ "QVidia Technologies, Inc.", /* 22459 */ "Tangtop Technology Co.,Ltd", /* 22460 */ "JeeF Software", /* 22461 */ "NixSys BVBA", /* 22462 */ "heidemann.org", /* 22463 */ "01map", /* 22464 */ "G.I.E. AXA Technology Services Belgium", /* 22465 */ "hoehmann.biz", /* 22466 */ "Applied Global Technologies, Inc.", /* 22467 */ "Red-C Optical Networking", /* 22468 */ "Universidad ORT Uruguay", /* 22469 */ "NetDeposit Inc.", /* 22470 */ "Visible School, Inc.", /* 22471 */ "Boingo Wireless Inc.", /* 22472 */ "Teledyne Controls", /* 22473 */ "Asylum Telecom, Ltd.", /* 22474 */ "UK Broadband", /* 22475 */ "Syncor Systems, Inc.", /* 22476 */ "KingHold Technology Co.,LTD", /* 22477 */ "My ERM Application", /* 22478 */ "Crosswalk, Inc.", /* 22479 */ "XipLink Networking", /* 22480 */ "HHS Health Options, Inc.", /* 22481 */ "nc", /* 22482 */ "StreamShield Networks", /* 22483 */ "grand.central.org", /* 22484 */ "SafeNet InfoTech Pvt Ltd", /* 22485 */ "Kyushu Institute of Technology", /* 22486 */ "2X Software Ltd", /* 22487 */ "Teltronic S.A.U.", /* 22488 */ "Telvent Tráfico y Transporte, S.A.", /* 22489 */ "Health Care Service Corporation", /* 22490 */ "Vircom, inc.", /* 22491 */ "Forensic Signature Corp.", /* 22492 */ "MW 2000 S.A.", /* 22493 */ "Animaltracks.net", /* 22494 */ "Chandler Gilbert Community College", /* 22495 */ "Digital Stream, Inc.", /* 22496 */ "shanghai blackstone communication Ltd", /* 22497 */ "Neddco Enterprises", /* 22498 */ "Document Processing Systems, Inc.", /* 22499 */ "OfficeLink Plus Pty. Ltd.", /* 22500 */ "UAB Skaitmeninio sertifikavimo centras", /* 22501 */ "DaVita, Inc.", /* 22502 */ "Klaus Henske", /* 22503 */ "RedDevel.com", /* 22504 */ "Volker Englisch", /* 22505 */ "Incache LLC", /* 22506 */ "Ministerio da Ciencia e Tecnologia", /* 22507 */ "Beijing FiberHome Mobile Technologies Co.,Ltd", /* 22508 */ "The Potter Group Ltd", /* 22509 */ "WhatCounts", /* 22510 */ "thinkorswim group, inc.", /* 22511 */ "Personal Software Developement Company", /* 22512 */ "PT Sapta Sarana Komunika", /* 22513 */ "RVision LLC", /* 22514 */ "Theoretic Solutions", /* 22515 */ "Castalia LLC", /* 22516 */ "Ernster Public Relations", /* 22517 */ "Arel Communications and Software, Ltd.", /* 22518 */ "Akademische Fliegergruppe Karlsruhe", /* 22519 */ "Sandpath", /* 22520 */ "Schwegman, Lundberg, Woessner, & Kluth P.A.", /* 22521 */ "ClearPath Networks", /* 22522 */ "Fontec Information Technology Inc.", /* 22523 */ "Proyecto Fin de Carrera", /* 22524 */ "RMP WebWorks", /* 22525 */ "InstantServers, Inc.", /* 22526 */ "Capella Technologies", /* 22527 */ "iPodion GmbH", /* 22528 */ "Kommunale Datenverarbeitungsgesellschaft mbH", /* 22529 */ "Takeda Pharmaceuticals North America, Inc.", /* 22530 */ "Paloma Partners", /* 22531 */ "Computer Graphics Group", /* 22532 */ "Symetra Financial", /* 22533 */ "Purdue Pharma L.P.", /* 22534 */ "Neiman Marcus Group", /* 22535 */ "COPAN Systems", /* 22536 */ "TreeTop GbR", /* 22537 */ "Reva Systems Corporation", /* 22538 */ "Champion Computer Technologies", /* 22539 */ "Oulun Lyseon lukio", /* 22540 */ "Open Acuity LLC", /* 22541 */ "Lex Persona", /* 22542 */ "GOUNOT", /* 22543 */ "Host Collective Inc.", /* 22544 */ "Daudt Consulting", /* 22545 */ "Qwasartech", /* 22546 */ "Alfred University", /* 22547 */ "Biapo", /* 22548 */ "Broad Net Mux Corporation", /* 22549 */ "NANOTEX CORP.", /* 22550 */ "MOIMSTONE Co.,LTD", /* 22551 */ "Sinco Informatica", /* 22552 */ "IT Saver", /* 22553 */ "Legion of the Bouncy Castle", /* 22554 */ "Safehaus", /* 22555 */ "JAPAN ADVANCED INSTITUTE OF SCIENCE AND TECHNOLOGY", /* 22556 */ "Deutsche Börse Group", /* 22557 */ "one4vision GmbH", /* 22558 */ "Intersys AG", /* 22559 */ "Dynamic Design GmbH", /* 22560 */ "Graphic Image Technologies (Pty) Ltd.", /* 22561 */ "Trivector System AB", /* 22562 */ "ehotel AG", /* 22563 */ "ULX Ltd.", /* 22564 */ "Odyssée Systèmes", /* 22565 */ "Devoteam", /* 22566 */ "Instituto Politécnico de Castelo Branco", /* 22567 */ "Redwave Technology Ltd", /* 22568 */ "Dynameeting spa", /* 22569 */ "Thomas Taeger Datenblatt", /* 22570 */ "AMART Logic", /* 22571 */ "AD.NET solutions Enrico Roga", /* 22572 */ "Infinite Software, Inc.", /* 22573 */ "iseg Spezialelektronik GmbH", /* 22574 */ "Astro-Med, Inc.", /* 22575 */ "The OpenBSD SNMP Project", /* 22576 */ "Thomas Wollner - IT Beratung und Integration", /* 22577 */ "InFarmTech", /* 22578 */ "Christoph Michel IT Management", /* 22579 */ "Martin-Baker Aircraft Company Ltd", /* 22580 */ "epollux.org", /* 22581 */ "Group 4 Technology Ltd", /* 22582 */ "Clarkson University", /* 22583 */ "Zetera Corporation", /* 22584 */ "Forest Laboratories, Inc.", /* 22585 */ "Dotcast, Inc.", /* 22586 */ "Hjelle IT-Bistand", /* 22587 */ "LucaS web studio", /* 22588 */ "P6R, Inc.", /* 22589 */ "BHG Security Consulting", /* 22590 */ "Fachhochschule Muenchen - ZaK", /* 22591 */ "Informatec LTDA", /* 22592 */ "Emily Carr College of Art and Design", /* 22593 */ "GoldKrush", /* 22594 */ "Modulation Sciences Inc.", /* 22595 */ "marrianne.com", /* 22596 */ "eOrg", /* 22597 */ "MissionMode Solutions, Inc.", /* 22598 */ "Informatec Comercial e Serviços Ltda.", /* 22599 */ "Harris CapRock Communications", /* 22600 */ "Tachometry Corporation", /* 22601 */ "TESI Tècnica del So i la Imatge S.L.", /* 22602 */ "skyblue.eu.com", /* 22603 */ "Rentokil Initial plc", /* 22604 */ "Winkowski Sp. z o.o.", /* 22605 */ "Thomas Urban", /* 22606 */ "ChiliTech Internet Solutions, Inc.", /* 22607 */ "Cmed Ltd", /* 22608 */ "CJ Microware and Associates", /* 22609 */ "Raksha Networks Inc.", /* 22610 */ "Tele Lorca", /* 22611 */ "Envirocare of Utah, LLC", /* 22612 */ "City Animal Hospital Ltd.", /* 22613 */ "Shutterbug Productions & Consulting", /* 22614 */ "Luna[e] Project", /* 22615 */ "Companhia de Sistemas - Compsis Consultoria e Comercio de Informatica Ltda", /* 22616 */ "Richland Community College", /* 22617 */ "IBM/NY Hospitals", /* 22618 */ "Universidade de Aveiro", /* 22619 */ "Serveapolis", /* 22620 */ "stepping stone GmbH", /* 22621 */ "Lightel Technologies Inc.", /* 22622 */ "Excellent Rameur", /* 22623 */ "Source Technologies", /* 22624 */ "ProcessClaims", /* 22625 */ "COMET SYSTEM, s.r.o.", /* 22626 */ "MIKRO-KOD Ltd.", /* 22627 */ "Deutsche Angestellten-Krankenkasse", /* 22628 */ "Alpermann+Velte electronic engineering GmbH", /* 22629 */ "Istituto Nazionale per la Ricerca sul Cancro", /* 22630 */ "Fachhochschule Osnabrueck", /* 22631 */ "TOKYO BUSINESS SOLUTION CO.,LTD.", /* 22632 */ "Banco Mercantil do Brasil SA", /* 22633 */ "Objectif Software", /* 22634 */ "SECIT Secure IT Ltd.", /* 22635 */ "bbv AG", /* 22636 */ "Angel's Outpost", /* 22637 */ "Siemens PTD EA", /* 22638 */ "UNICO Computer Systems Pty Ltd", /* 22639 */ "LuXpert", /* 22640 */ "Microsystèmes S.A.", /* 22641 */ "PROXID", /* 22642 */ "Carsales.com.au Ltd", /* 22643 */ "Zettai.net LLC", /* 22644 */ "Lane County", /* 22645 */ "Americom Government Services, Inc.", /* 22646 */ "WRO-COM Maciej Jankowski", /* 22647 */ "TENSQUARE gmbh", /* 22648 */ "Astoria Networks Inc.", /* 22649 */ "ADS Specialists, Inc.", /* 22650 */ "Visual Commands", /* 22651 */ "Raptor Networks Technology Inc.", /* 22652 */ "Stoke Inc", /* 22653 */ "Kodak Dental Systems", /* 22654 */ "Number41Media Corporation", /* 22655 */ "Intelicis Corporation", /* 22656 */ "Exprit s.r.o.", /* 22657 */ "Apria Healthcare Group", /* 22658 */ "HHS International Ltd.", /* 22659 */ "Wyoming.com", /* 22660 */ "Wolfram Schlich, IT Service", /* 22661 */ "UEcomm Ltd.", /* 22662 */ "Banco do Estado de Sergipe S/A", /* 22663 */ "Soost Software Technology", /* 22664 */ "explicate.org", /* 22665 */ "Hautespot Networks", /* 22666 */ "phase5 information technology GbR", /* 22667 */ "Hawaiian Electric Company", /* 22668 */ "North West University", /* 22669 */ "ControlGuard Ltd.", /* 22670 */ "VITRONIC Dr.-Ing. Stein Bildverarbeitungssysteme GmbH", /* 22671 */ "University of Peradeniya", /* 22672 */ "GTS Telecom SRL", /* 22673 */ "Gamersmafia", /* 22674 */ "Prorange Ltd.", /* 22675 */ "manitu", /* 22676 */ "Finsoft Ltd", /* 22677 */ "Latens Systems Ltd", /* 22678 */ "Futura NT S.r.l.", /* 22679 */ "Oxford BioSignals Ltd", /* 22680 */ "ARD Technology", /* 22681 */ "Vesuvius", /* 22682 */ "SIGMA Chemnitz GmbH", /* 22683 */ "ACS Automotive Communication Services GmbH", /* 22684 */ "Fronter AS", /* 22685 */ "Azbooka Publishers Ltd.", /* 22686 */ "Brink's (UK) Limited", /* 22687 */ "jborder.com", /* 22688 */ "Yamagata University", /* 22689 */ "Cleon Solutions s.r.l.", /* 22690 */ "APL Ltd.", /* 22691 */ "Magma Soft", /* 22692 */ "Alpha Venega Corporation", /* 22693 */ "Broadcast Service Danmark A/S", /* 22694 */ "EPCglobal", /* 22695 */ "Netadmin System i Sverige AB", /* 22696 */ "First Point Global Pty Ltd", /* 22697 */ "Match Lab, Inc.", /* 22698 */ "M&T Bank Corporation", /* 22699 */ "LUIS COLORADO SISTEMAS, S.L.", /* 22700 */ "Hospices - CHUV", /* 22701 */ "SC Stonet Computers SRL", /* 22702 */ "Ask IT's Done Ltd", /* 22703 */ "University of Kansas Medical Center", /* 22704 */ "DIGICAST Inc.", /* 22705 */ "DIGITAL FORECAST Corporation", /* 22706 */ "Comtechservice", /* 22707 */ "eSYS Informationssysteme GmbH", /* 22708 */ "Appistry", /* 22709 */ "Lipman Elektronik ve Danismanlik Ltd.Sti", /* 22710 */ "SGS Societe Generale de Surveillance SA", /* 22711 */ "Wielkopolski Oddzial Wojewodzki NFZ w Poznaniu", /* 22712 */ "Università degli Studi di Cassino", /* 22713 */ "Mobilaris AB", /* 22714 */ "CenterPoint - Connective Software Engineering GmbH", /* 22715 */ "Modern World Internet Ltd", /* 22716 */ "VRT", /* 22717 */ "Centre Reseau Communication", /* 22718 */ "Pinellas County Government - IT", /* 22719 */ "Metreos Corporation", /* 22720 */ "SIM International, Inc.", /* 22721 */ "KWPark Hardware", /* 22722 */ "Cyjaya Korea", /* 22723 */ "Store Alcala", /* 22724 */ "Marko Durkovic", /* 22725 */ "InfiniLogic (Private) Limited", /* 22726 */ "Z&Z Services", /* 22727 */ "V-Office", /* 22728 */ "Unleash Computers Ltd", /* 22729 */ "TurnTide Incorporated", /* 22730 */ "Data Aire,Inc.", /* 22731 */ "Brock University", /* 22732 */ "NorBelle, LLC", /* 22733 */ "synetics gmbh", /* 22734 */ "GSC Mobile Solutions", /* 22735 */ "Digium", /* 22736 */ "SmarTone Mobile Communications Limited", /* 22737 */ "WiNetworks", /* 22738 */ "Network Technology Research Group", /* 22739 */ "S&P Computersysteme GmbH", /* 22740 */ "N-Dimension Solutions Inc.", /* 22741 */ "Acbel Polytech Inc.", /* 22742 */ "Linz AG", /* 22743 */ "Purple Labs S.A.", /* 22744 */ "MathAn Praha, s.r.o.", /* 22745 */ "PRIORITY ELECTRONICS LTD.", /* 22746 */ "Travelpack", /* 22747 */ "Dade Behring", /* 22748 */ "Celebrity Resorts, Inc.", /* 22749 */ "Teen Living Programs, Inc.", /* 22750 */ "HealthlineIS", /* 22751 */ "PatchLink Corporation", /* 22752 */ "Convergent Media Network Ltd.", /* 22753 */ "Cyntrum Web-Technologies, Inc.", /* 22754 */ "Terma Software Labs LLC", /* 22755 */ "Revolution Linux inc.", /* 22756 */ "Azonic Technology Ltd.", /* 22757 */ "zrn.ru", /* 22758 */ "PROMAX ELECTRONICA,SA", /* 22759 */ "Sphera Corporation Ltd.", /* 22760 */ "NAVI Sp. z o.o.", /* 22761 */ "GROUPE ATLANTIC", /* 22762 */ "Artis Group GmbH", /* 22763 */ "SPIDCOM Technologies SA", /* 22764 */ "Augur Systems, Inc.", /* 22765 */ "Hoatech Technologies Co., Ltd.", /* 22766 */ "TTC InfoAge Inc.", /* 22767 */ "Technical University of Crete", /* 22768 */ "mur.at - Verein zur Foerderung von Netzwerkkunst", /* 22769 */ "MediaSputnik Ltd.", /* 22770 */ "BlueFinger Ltd.", /* 22771 */ "Oesterreichische Nationalbank", /* 22772 */ "John Fan", /* 22773 */ "Ensuren Corporation", /* 22774 */ "Centromeric inc", /* 22775 */ "Covance Cardiac Safety Services", /* 22776 */ "Ventura24 S.L.", /* 22777 */ "Reclusive Hermit", /* 22778 */ "Carefirst BlueCross BlueShield", /* 22779 */ "Powerline Technologies Ltd", /* 22780 */ "wenzhou telecom", /* 22781 */ "Bridgette, Inc", /* 22782 */ "Rauscher networX", /* 22783 */ "pimp.org.za", /* 22784 */ "ICTeam AG", /* 22785 */ "Lattelekom", /* 22786 */ "internetbureau Websight", /* 22787 */ "PSInd, LLC", /* 22788 */ "martyhill.net", /* 22789 */ "S.K.M. Informatik GmbH", /* 22790 */ "China Council for the Promotion of International Trade (CCPIT)", /* 22791 */ "Voice Technology Ind. and Com. Ltd.", /* 22792 */ "Stratum Communications Pty Ltd", /* 22793 */ "Pagaros Pty Limited", /* 22794 */ "Mississippi Valley State University", /* 22795 */ "LOGSYS Inc.", /* 22796 */ "openconcept gmbh", /* 22797 */ "University of Crete", /* 22798 */ "Endo7 GmbH/Srl", /* 22799 */ "FlexDSL Telecommunications AG", /* 22800 */ "Amedia Networks, Inc.", /* 22801 */ "Telabria Ltd", /* 22802 */ "Psychosys Software Limited", /* 22803 */ "Trivium Technologies Ltd.", /* 22804 */ "Utex Communications", /* 22805 */ "Scientica Life Sciences Pvt. Ltd.", /* 22806 */ "Andreas Julius", /* 22807 */ "Oesterreichische Aerztekammer", /* 22808 */ "VLI Communications CO.,LTD.", /* 22809 */ "Aktia Savings Bank p.l.c.", /* 22810 */ "Pfeiffer & May Grosshandel AG", /* 22811 */ "Allscripts, LLC", /* 22812 */ "Pest Control Data Systems, Inc.", /* 22813 */ "radiowave limted", /* 22814 */ "Axeda Systems Inc.", /* 22815 */ "Rackable Systems, Inc.", /* 22816 */ "BAE SYSTEMS Australia", /* 22817 */ "Naked Dwarf", /* 22818 */ "Chas Philly Steaks and Stix", /* 22819 */ "DATS Co. Ltd.", /* 22820 */ "Saab AB", /* 22821 */ "MobiComp Computação Móvel S.A.", /* 22822 */ "Crodo Technologies Pte Ltd", /* 22823 */ "Verbrugge Terminals BV", /* 22824 */ "Androsoft GmbH", /* 22825 */ "DFDS A/S", /* 22826 */ "Certagon Corporation", /* 22827 */ "Emacolet Networking Services", /* 22828 */ "Core Mobility, Inc.", /* 22829 */ "NUMATA Kazuya", /* 22830 */ "Warpera Corporation", /* 22831 */ "POSDATA Co. Ltd.", /* 22832 */ "TMN TECHNOLOGIES Telecomunicações LTDA", /* 22833 */ "Redfish Group Pty Ltd", /* 22834 */ "Firetide Inc", /* 22835 */ "Tercina Inc.", /* 22836 */ "Rogers Police Department", /* 22837 */ "A1 Enterprise, Inc", /* 22838 */ "ZQInteractive", /* 22839 */ "pbk2 GmbH & Co. KG", /* 22840 */ "external Business Information Services GmbH", /* 22841 */ "Scientific Games International GmbH", /* 22842 */ "ANWB B.V.", /* 22843 */ "Scheede", /* 22844 */ "IntelSight", /* 22845 */ "YR20 GROUP INC.", /* 22846 */ "Vindaloo Communications", /* 22847 */ "IdéiaLivre", /* 22848 */ "T&F Computer und Networksystems GmbH", /* 22849 */ "MSB", /* 22850 */ "Children's Memorial Hospital", /* 22851 */ "ENEM B.V.", /* 22852 */ "GuangZhou Net Control Tech. Ltd.", /* 22853 */ "Wojewódzki O¶rodek Informatyki przy Warminsko - Mazurskim Urzêdzie Wojewódzkim w Olsztynie", /* 22854 */ "Multisuns Corp.", /* 22855 */ "HiStor technologies", /* 22856 */ "Reflex Security, Inc.", /* 22857 */ "financial.com AG", /* 22858 */ "Techaya Inc.", /* 22859 */ "The LDAP Company", /* 22860 */ "MDOUK", /* 22861 */ "Winvision", /* 22862 */ "Softwarehaus Hartter", /* 22863 */ "ALPHA.CH AG", /* 22864 */ "University of Basel", /* 22865 */ "Vattenfall AB", /* 22866 */ "G-International Ltd", /* 22867 */ "Ventana Medical Systems, Inc.", /* 22868 */ "Deutsche Gesellschaft für Technische Zusammenarbeit (GTZ) GmbH", /* 22869 */ "Inter-Governmental Consultations on Asylum, Refugee and Migration Policies", /* 22870 */ "Autocom A/S", /* 22871 */ "Reinhard Moosauer IT Beratung", /* 22872 */ "Indian Institute of Information Technology", /* 22873 */ "Syntermed, Inc.", /* 22874 */ "Fusion Laboratories, Inc", /* 22875 */ "BlueCows Technical Services", /* 22876 */ "Northern Arkansas Telephone Company, Inc.", /* 22877 */ "Allen Corporation of America", /* 22878 */ "Affine DB Ltd.", /* 22879 */ "SonicDuo OSP dep.", /* 22880 */ "Man Investments Ltd", /* 22881 */ "CJSC \"UKRAINIAN MOBILE COMMUNICATIONS\"", /* 22882 */ "OPENLiMiT SignCubes GmbH", /* 22883 */ "Western Gas Resources, Inc.", /* 22884 */ "GIP CPAGE", /* 22885 */ "Astro Strobel Kommunikationssysteme GmbH", /* 22886 */ "PC-Ware Information Technologies AG", /* 22887 */ "Interface Business GmbH", /* 22888 */ "Zenprise, Inc.", /* 22889 */ "Department of Applied Mathematics \"U.Dini\"", /* 22890 */ "Future Connect (Pvt) Ltd", /* 22891 */ "Jan B. Telepski Trading", /* 22892 */ "Ing. Petr Setka", /* 22893 */ "Unipower Corporation", /* 22894 */ "RF Technologies, Inc.", /* 22895 */ "Govern de les Illes Balears", /* 22896 */ "EPRCI", /* 22897 */ "Sericon Technology Inc.", /* 22898 */ "Etherstuff", /* 22899 */ "Statewide Software & Systems", /* 22900 */ "Packet411 Corporation", /* 22901 */ "Discovery Communications Inc.", /* 22902 */ "Preferred Communications, Inc.", /* 22903 */ "R. L. Polk & Co.", /* 22904 */ "OAG Worldwide Ltd", /* 22905 */ "Medical Soft Instruments SLL", /* 22906 */ "Riege Software International GmbH", /* 22907 */ "Magnus Informatik A/S", /* 22908 */ "T-VIPS AS", /* 22909 */ "MaeSoft Group", /* 22910 */ "EPSILON Software Assistance SA", /* 22911 */ "Comrad Medical Systems Limited", /* 22912 */ "TJM Products Pty Ltd", /* 22913 */ "Sonim Technologies", /* 22914 */ "IFX Corp", /* 22915 */ "Pyramide Technologies Corp", /* 22916 */ "UHS Systems Pty Ltd", /* 22917 */ "TeDenium Indústria Eletroeletrônica Ltda.", /* 22918 */ "Herit Corporation", /* 22919 */ "Windows Consulting Group, Inc.", /* 22920 */ "ATI Technologies Incorporated", /* 22921 */ "postlab", /* 22922 */ "moll-illner", /* 22923 */ "wegewerk GmbH", /* 22924 */ "LAB-EL Elektronika Laboratoryjna", /* 22925 */ "Heinrig Impex SRL", /* 22926 */ "Aqsacom SA", /* 22927 */ "Seokyo Telecommunication Co., Ltd.", /* 22928 */ "Schuemperlin Engineering AG", /* 22929 */ "SPI Dynamics, Inc.", /* 22930 */ "Parlano Inc.", /* 22931 */ "Nvia2 Mensajes Interactivos, C.A.", /* 22932 */ "itaas, Inc.", /* 22933 */ "Rudolf Leiner GmbH", /* 22934 */ "Beijing Univ. of Aeronautics & Astrnautics", /* 22935 */ "Tonbrand Software", /* 22936 */ "Message Mobile GmbH", /* 22937 */ "NOS Technology AS", /* 22938 */ "WebInterstate Inc.", /* 22939 */ "Arrowspan Inc.", /* 22940 */ "PDX, Inc.", /* 22941 */ "O2 Micro", /* 22942 */ "CVC Online", /* 22943 */ "Winuel SA", /* 22944 */ "KaiserAir", /* 22945 */ "Chordcom", /* 22946 */ "IT-INFORMATIK", /* 22947 */ "InSerTO", /* 22948 */ "EMAP Plc", /* 22949 */ "OEG Australia", /* 22950 */ "Lucid Security Corporation", /* 22951 */ "On2 Technologies", /* 22952 */ "EOSLINK CO., LTD", /* 22953 */ "UNIVERSAL MICROELECTRONICS CO., LTD.", /* 22954 */ "Azent AB", /* 22955 */ "News International Supply Company Ltd.", /* 22956 */ "ZEN Sistemi Srl", /* 22957 */ "Weston Digital Technologies Ltd.", /* 22958 */ "Tony Chachere's Creole Foods of Opelousas Inc", /* 22959 */ "Sozotek, Inc.", /* 22960 */ "SK Telesys", /* 22961 */ "matrix.mx", /* 22962 */ "Vale Technology LTD", /* 22963 */ "Acceris Communications", /* 22964 */ "Sundance Digital, Inc.", /* 22965 */ "COSA GmbH", /* 22966 */ "ZR InfoTech", /* 22967 */ "ComBrio, Inc", /* 22968 */ "H+BEDV Datentechnik GmbH", /* 22969 */ "Dental-On-Line SARL", /* 22970 */ "A.P. Moller - Maersk A/S", /* 22971 */ "Wilibox", /* 22972 */ "Greenfield Networks, Inc.", /* 22973 */ "Elgi Equipments Ltd", /* 22974 */ "The NGIM Project", /* 22975 */ "AirInfinite, Inc.", /* 22976 */ "MedImpact Healthcare Systems", /* 22977 */ "GridConnect, Inc", /* 22978 */ "Bridgestream Inc.", /* 22979 */ "Confio Software", /* 22980 */ "BPB plc", /* 22981 */ "Tectona SoftSolutions Pvt. Ltd.", /* 22982 */ "SSTIC", /* 22983 */ "ALS&TEC Ltd", /* 22984 */ "Derdack GmbH", /* 22985 */ "Eurofighter Jagdflugzeug GmbH", /* 22986 */ "EVONET Belgium NV", /* 22987 */ "University of Kentucky", /* 22988 */ "Essex Property Trust, Inc", /* 22989 */ "Baltimore County Savings Bank, FSB", /* 22990 */ "Netalfa Ltd.", /* 22991 */ "WIT, Inc.", /* 22992 */ "Belarc, Inc.", /* 22993 */ "SiliconWorks Corporation", /* 22994 */ "Axley.net", /* 22995 */ "City of Peabody", /* 22996 */ "Ab Initio Software Corporation", /* 22997 */ "Allstream Inc", /* 22998 */ "FURUNO SYSTEMS Co.,Ltd.", /* 22999 */ "Nexis s.r.l.", /* 23000 */ "Corporación Supermercados Unidos S.A", /* 23001 */ "Consentry Networks", /* 23002 */ "HyperWerk FHBB", /* 23003 */ "C&C Solution Technology", /* 23004 */ "Fluidsignal Group S.A.", /* 23005 */ "e-Mont d.o.o.", /* 23006 */ "Imatic", /* 23007 */ "WebPaws.com", /* 23008 */ "Asamnet e. V.", /* 23009 */ "Maxima Communications", /* 23010 */ "OCLC PICA", /* 23011 */ "Netprovider S.A.", /* 23012 */ "Salem-Keizer Public Schools", /* 23013 */ "Genie-uk", /* 23014 */ "NewBay Software Ltd.", /* 23015 */ "Metaphor Studio, LLC", /* 23016 */ "Ideal Technologies Inc.", /* 23017 */ "Matrix Networks China", /* 23018 */ "Pentacomp Systemy Informatyczne Sp. z o.o.", /* 23019 */ "FGAN FKIE/KOM", /* 23020 */ "Acstre Support Ltd.", /* 23021 */ "Net Optics Inc.", /* 23022 */ "THX Ltd.", /* 23023 */ "PT. Dinamika Mandiri", /* 23024 */ "meSSSoft", /* 23025 */ "SuedLeasing GmbH", /* 23026 */ "Area Electronic System", /* 23027 */ "Sunrise Technology Co. Ltd.", /* 23028 */ "SQI, Inc.", /* 23029 */ "Shing", /* 23030 */ "NSP Ltd.", /* 23031 */ "MailFrontier, Inc.", /* 23032 */ "Leivio Technologies, Inc.", /* 23033 */ "SETIB", /* 23034 */ "Labware, s.a.", /* 23035 */ "Isomorphic System Research Inc.", /* 23036 */ "CMT Systems Inc.", /* 23037 */ "Emphasys Software", /* 23038 */ "Ambient Corporation", /* 23039 */ "Exobit Networks, Inc.", /* 23040 */ "CQ Inc.", /* 23041 */ "The Real Estate Company, Inc.", /* 23042 */ "CastIS Corp.", /* 23043 */ "SmallBizConcepts BV", /* 23044 */ "Cassee.net", /* 23045 */ "MTD Systems", /* 23046 */ "Xinke (China) Information System Ltd", /* 23047 */ "Sabik OY", /* 23048 */ "Emsys n.v.", /* 23049 */ "JSC Department of System Research", /* 23050 */ "SC TeSIS Logic SRL", /* 23051 */ "APPI Tecnologia S.A.", /* 23052 */ "DOSHED Corp.", /* 23053 */ "Cyris Networks", /* 23054 */ "H Zero Seven", /* 23055 */ "Riedel Communications GmbH", /* 23056 */ "ISD Holland BV", /* 23057 */ "Expertron Group (Pty) Ltd", /* 23058 */ "NetFuel, Inc.", /* 23059 */ "Codebench, Inc.", /* 23060 */ "VirtualBridges Communications Corp", /* 23061 */ "Huize-wel.nl", /* 23062 */ "Dominion Lasercom, Inc", /* 23063 */ "Kronback ApS", /* 23064 */ "TWINCLING Society", /* 23065 */ "Telmap LTD.", /* 23066 */ "Nanomatic Ltd.", /* 23067 */ "AngelGroup", /* 23068 */ "Sodexho", /* 23069 */ "Hubris Communications Inc", /* 23070 */ "Conformiq Software Ltd.", /* 23071 */ "Australian Internet Company Pty Ltd", /* 23072 */ "WiMetrics Corporation", /* 23073 */ "Security Conscious Inc.", /* 23074 */ "Novatel Wireless, Inc.", /* 23075 */ "SP", /* 23076 */ "Keppler IT GmbH", /* 23077 */ "Administration des Douanes et Impôts Indirects", /* 23078 */ "Kiles Consulting", /* 23079 */ "New York State Directory Services", /* 23080 */ "Opus One, Inc.", /* 23081 */ "Riedell MotorSports", /* 23082 */ "University of Bridgeport", /* 23083 */ "SCT Consulting", /* 23084 */ "QQ Technology, INC.", /* 23085 */ "Major & Minor Exims Pvt Ltd", /* 23086 */ "Ross Sampson Consulting", /* 23087 */ "Applied Watch Technologies, LLC", /* 23088 */ "Nanjing Gentech System CO., Ltd.", /* 23089 */ "ncfritz.net", /* 23090 */ "Nilson Group AB", /* 23091 */ "gaztec services", /* 23092 */ "ANAGRAN", /* 23093 */ "Kuehne + Nagel (AG&Co.) KG", /* 23094 */ "ClarioNet, s.r.o.", /* 23095 */ "jminet.com", /* 23096 */ "Municipalidad de Rosario", /* 23097 */ "ServicePilot Technologies", /* 23098 */ "NeTAMS", /* 23099 */ "H&T Greenline GmbH", /* 23100 */ "University Hygienic Laboratory", /* 23101 */ "San Mateo County Public Safety Communications", /* 23102 */ "SRP", /* 23103 */ "Raven Systems Design, Inc.", /* 23104 */ "Action Systems, Inc.", /* 23105 */ "RedPhone Security, Inc.", /* 23106 */ "Women's Center for Radiology", /* 23107 */ "RP Online Verlagsgesellschaft mbH", /* 23108 */ "Netline Internet Service GmbH", /* 23109 */ "UNYICO MIEE", /* 23110 */ "Spun Pty Ltd", /* 23111 */ "University of Turku", /* 23112 */ "LXPT", /* 23113 */ "Comstar Ltd.", /* 23114 */ "Observatoire Midi-Pyrenees", /* 23115 */ "iVOD Inc.", /* 23116 */ "New Zealand Ministry of Health", /* 23117 */ "Telenet Systems Pvt. Ltd.", /* 23118 */ "Shevchenko Didkovskiy & Partners", /* 23119 */ "BFE Studio and Media Systems GmbH", /* 23120 */ "Saint-Petersburg Certification Authority", /* 23121 */ "Swisscom Ltd. - formely Bluewin AG", /* 23122 */ "gedas deutschland GmbH", /* 23123 */ "Dickey Rural Telephone Cooperative", /* 23124 */ "Spring Lake Consulting, LLC", /* 23125 */ "BaneTele AS", /* 23126 */ "GINA-COMPUTING GmbH", /* 23127 */ "NitroSecurity, Inc.", /* 23128 */ "Macrovision Corporation", /* 23129 */ "CPN International Inc.", /* 23130 */ "Mithi Software Technologies private Limited", /* 23131 */ "Canadian Net", /* 23132 */ "IzhInformProject", /* 23133 */ "Skillsunited.co.uk", /* 23134 */ "Articon Integralis AG", /* 23135 */ "Warweus S.r.l", /* 23136 */ "Altinity Limited", /* 23137 */ "Reutlingen University", /* 23138 */ "Software Eginerring Associated Consultants, Inc", /* 23139 */ "Cybernetik.net", /* 23140 */ "HOCHIKI CO.,LTD", /* 23141 */ "Akademia Swietokrzyska", /* 23142 */ "Peterson Packaging Oy", /* 23143 */ "Defenxis Sdn Bhd", /* 23144 */ "ExtendMedia Inc.", /* 23145 */ "HOYA", /* 23146 */ "VIMESA, VIDEO MEDIOS S.A.", /* 23147 */ "Dr. Peter Koch EDV Dienstleistungen", /* 23148 */ "Typodata", /* 23149 */ "MoCoTec Mobile Communication Technologies", /* 23150 */ "SeeTec Communications GmbH & Co. KG", /* 23151 */ "HVB Leasing GmbH", /* 23152 */ "Cloanto Corporation", /* 23153 */ "AIT Austrian Institute of Technology GmbH", /* 23154 */ "SOFTWISE DEVELOPMENT", /* 23155 */ "Vitec Group Communications Limited", /* 23156 */ "Theobit GmbH", /* 23157 */ "CCIS sprl", /* 23158 */ "eventIS Software Solutions B.V.", /* 23159 */ "Geneous Software AG", /* 23160 */ "Aran Technologies", /* 23161 */ "Ecole Supérieure d'Informatique", /* 23162 */ "Defensor del Pueblo", /* 23163 */ "Revieworld Ltd", /* 23164 */ "SAFE-Biopharma Association", /* 23165 */ "Automatyka", /* 23166 */ "Operation Mobilisation", /* 23167 */ "Orchard View Community Network", /* 23168 */ "Sigma Systems Canada Inc.", /* 23169 */ "Verizon Card Operations", /* 23170 */ "Servergraph", /* 23171 */ "Teletronics Technology Corp", /* 23172 */ "SubZeroNet", /* 23173 */ "WildBlue Communications, Inc.", /* 23174 */ "WorkCompCentral.com, Inc.", /* 23175 */ "SpeedPartner GmbH", /* 23176 */ "Cirond Corporation", /* 23177 */ "Helix Ltd.", /* 23178 */ "Bilfrost Incorporated, Inc.", /* 23179 */ "TELEVES S.A.", /* 23180 */ "Weed Instrument Company Inc.", /* 23181 */ "Sussman Automotive", /* 23182 */ "Amnis Limited Company", /* 23183 */ "Applied Microsystems, Inc.", /* 23184 */ "Isensix, Inc.", /* 23185 */ "4A Solutions Ltd.", /* 23186 */ "Rene Thomas Folse Inc.", /* 23187 */ "Maxi Net Services", /* 23188 */ "NETPLEX LLC", /* 23189 */ "Interland, Inc", /* 23190 */ "Nvia Gestion de Datos S.L", /* 23191 */ "Norlight Telecommunications", /* 23192 */ "M-Vision", /* 23193 */ "Northwest University", /* 23194 */ "Afar Communications Inc.", /* 23195 */ "DeveTel S.A.", /* 23196 */ "HAN InfoComm", /* 23197 */ "One Cow Standing", /* 23198 */ "MCGV Stack", /* 23199 */ "NetFocus Technologies, Inc.", /* 23200 */ "ACI Communications, Inc.", /* 23201 */ "zinfo.us", /* 23202 */ "tasmanstudios Ltd.", /* 23203 */ "Stratacache, Inc.", /* 23204 */ "Alcormizar Inc.", /* 23205 */ "Clinical DataFax Systems Inc.", /* 23206 */ "BIA B.V.", /* 23207 */ "Rhodanie Systemes et Reseaux Sarl", /* 23208 */ "Union Compagnonnique", /* 23209 */ "Pyramid Robotics", /* 23210 */ "Queue Global Information Systems Corp.", /* 23211 */ "Cuttriss Consulting", /* 23212 */ "Wilico Wireless Networking Solutions SA", /* 23213 */ "j2anywhere.com", /* 23214 */ "Netensia", /* 23215 */ "Bawue.Net e.V.", /* 23216 */ "Chambre de Commerce et d'Industrie de Brest", /* 23217 */ "Betanetworks Ltd.,ShangHai, China", /* 23218 */ "DriveTime Automotive Group, Inc.", /* 23219 */ "ICO Ltd.", /* 23220 */ "ROCSYS Technologies Pvt.Ltd.", /* 23221 */ "ESI SOFTWARE", /* 23222 */ "StartCom Ltd.", /* 23223 */ "Sutton Group Realty Services Ltd.", /* 23224 */ "Maxitel S/A", /* 23225 */ "Dolphin Software", /* 23226 */ "Kayak Interactive", /* 23227 */ "City of Las Vegas Nevada", /* 23228 */ "oneK Internet Solutions Inc.", /* 23229 */ "Captara Corporation", /* 23230 */ "tekVizion PVS, Inc", /* 23231 */ "TrackAbout, Inc.", /* 23232 */ "Webdoeds", /* 23233 */ "HOPS International Inc", /* 23234 */ "DTI2", /* 23235 */ "Escher Group Ltd", /* 23236 */ "Softier Inc.", /* 23237 */ "FCI Broadband Communications Inc.", /* 23238 */ "Aquest Systems, Incorporated", /* 23239 */ "the Centers", /* 23240 */ "Protection and Guard Service", /* 23241 */ "SDRC Inc.", /* 23242 */ "Algorab SRL", /* 23243 */ "Improbable Universe", /* 23244 */ "Westdeutsche ImmobilienBank", /* 23245 */ "Harmonia Inc.", /* 23246 */ "Wm-Data PARERE", /* 23247 */ "TRE-CE", /* 23248 */ "National Center for Biotechnology Information (NCBI)", /* 23249 */ "fgn GmbH", /* 23250 */ "Servicios Corporativos Gefe S.A. de C.V.", /* 23251 */ "MYDOM", /* 23252 */ "Premier Image Corporation", /* 23253 */ "Leebel Services", /* 23254 */ "1D Solutions", /* 23255 */ "Wit-Sys Consulting Corporation", /* 23256 */ "OSIsoft, Inc.", /* 23257 */ "SdO Information Technology s.r.l.", /* 23258 */ "Stadt Frankfurt am Main", /* 23259 */ "Paradial AS", /* 23260 */ "Structured Information Management (SIM) Project", /* 23261 */ "Obiect Soft SRL", /* 23262 */ "EXCELIANCE", /* 23263 */ "Unicon Solutions NV", /* 23264 */ "Hedgehog Computer Services", /* 23265 */ "Frank Lowe Rubber & Gasket Co., Inc.", /* 23266 */ "Certic·mara S.A.", /* 23267 */ "Sunwayworld Infomation Technology Inc.", /* 23268 */ "NeoNova Network Services Inc.", /* 23269 */ "AW Comp", /* 23270 */ "Protium Technologies, Inc.", /* 23271 */ "Runcom Technologies Ltd.", /* 23272 */ "Eletech S.r.l.", /* 23273 */ "Mindsphere AS", /* 23274 */ "Pro Help", /* 23275 */ "Cooperativa dos Agricultores da Regiao de Orlandia", /* 23276 */ "ClusterVision BV", /* 23277 */ "Computer Royalties", /* 23278 */ "Picis, Inc.", /* 23279 */ "DigitalFreaks.org", /* 23280 */ "Liaoning Mobile Communications CO.LTD", /* 23281 */ "iBright", /* 23282 */ "I/O Concepts, Inc.", /* 23283 */ "Identify Technology Solutions", /* 23284 */ "STRATUM-IP", /* 23285 */ "Gottfried Hamm KommunikationsSysteme", /* 23286 */ "Joint Concepts Development", /* 23287 */ "Hands-On Security, Inc.", /* 23288 */ "Dandy Connections, Inc.", /* 23289 */ "Shaanxi Normal University", /* 23290 */ "SigValue Technologies", /* 23291 */ "Aternity Inc.", /* 23292 */ "Zafin Labs", /* 23293 */ "GeFoekoM e.V.", /* 23294 */ "Ingenium NET SRL", /* 23295 */ "Yawarra Information Appliances Pty Ltd", /* 23296 */ "schlittermann -- internet & unix support", /* 23297 */ "WestLotto GmbH & Co oHG", /* 23298 */ "LRF", /* 23299 */ "ABEM Instrument AB", /* 23300 */ "Datenverarbeitungszentrum Halle GmbH", /* 23301 */ "LINBIT Information Technologies GmbH", /* 23302 */ "Dot Communications", /* 23303 */ "Codan Limited", /* 23304 */ "Woojyun Systec", /* 23305 */ "BeiJing Techstar Ltd.", /* 23306 */ "Machaira Enterprises Pty Ltd", /* 23307 */ "NATIONAL CENTER FOR HIGH-PERFORMANCE COMPUTING", /* 23308 */ "AR Infotek Inc.", /* 23309 */ "OFiR a-s", /* 23310 */ "Macab AB", /* 23311 */ "IntelliCom Innovation AB", /* 23312 */ "Tesla a.s.", /* 23313 */ "Plantron AB", /* 23314 */ "Boldon James Ltd", /* 23315 */ "Niedersaechische Forstliche Versuchsanstalt", /* 23316 */ "Heinrich Bauer Verlag KG", /* 23317 */ "Comune di Bologna", /* 23318 */ "SIRLAN Technologies SAS", /* 23319 */ "Orange Romania SA", /* 23320 */ "Frank Juedes EDV-Service", /* 23321 */ "Aircom International", /* 23322 */ "Cable & Wireless Telecommunication Services GmbH", /* 23323 */ "swarco", /* 23324 */ "KOTIO", /* 23325 */ "Association des diplômés des formations Systèmes de Télécommunications et Réseaux Informatiques", /* 23326 */ "VAD Video-Audio_Design GmbH", /* 23327 */ "quadraginta-duo.de", /* 23328 */ "McDaniel College", /* 23329 */ "CommScope Inc. of North Carolina", /* 23330 */ "Johnson Bible College", /* 23331 */ "ADCC Inc.", /* 23332 */ "Computer Resource Team, Inc.", /* 23333 */ "Gorman Electronics,Inc.", /* 23334 */ "Hampton Roads Maritime Association", /* 23335 */ "VELUX A/S IT Department", /* 23336 */ "Cybertrust", /* 23337 */ "OpenS Tecnologia e Processamento de Dados Ltda.", /* 23338 */ "JUNG Analog- und Digital-Systemtechnik GmbH", /* 23339 */ "Kedah Electronics Engineering", /* 23340 */ "Astute.BIZ, Inc.", /* 23341 */ "Pathfinder Associates LLC", /* 23342 */ "Invensys/Wonderware", /* 23343 */ "AXS-One Inc.", /* 23344 */ "System Control Networks", /* 23345 */ "Voya Financial", /* 23346 */ "Infra Resource, LLC.", /* 23347 */ "PC KNOW HOW CENTER Brachhold GmbH", /* 23348 */ "NTT GIN", /* 23349 */ "Vertasent, LLC", /* 23350 */ "Watertown Public Schools, Watertown, MA, USA", /* 23351 */ "Cognis Corporation", /* 23352 */ "Intelaware", /* 23353 */ "Niska AB", /* 23354 */ "Gosh Enterprises, Inc.", /* 23355 */ "TRYSKEL", /* 23356 */ "TwentyFourNine", /* 23357 */ "Typhon SARL", /* 23358 */ "Hexod", /* 23359 */ "Pacific Union College", /* 23360 */ "TEConcept GmbH", /* 23361 */ "Leviton Mfg Co.", /* 23362 */ "Sumach GB Ltd", /* 23363 */ "Bryn Mawr College", /* 23364 */ "Websense, Inc.", /* 23365 */ "ValueClick, Inc.", /* 23366 */ "Host Europe GmbH", /* 23367 */ "GHK Wireless", /* 23368 */ "Shawn Church, Information Systems Consultant", /* 23369 */ "Joel Davis", /* 23370 */ "BestInfo Cyber Technology Co.,Ltd", /* 23371 */ "Bloombase Technologies Ltd", /* 23372 */ "NEC Kansai, Ltd.", /* 23373 */ "REDtone Telecommunications Sdn. Bhd.", /* 23374 */ "Islandwide Express", /* 23375 */ "Hyundai Network System, Inc.", /* 23376 */ "IT Solution Services Co.,Ltd.", /* 23377 */ "T&C Technology", /* 23378 */ "HUK-COBURG VVaG", /* 23379 */ "Datadec Online, S.A.", /* 23380 */ "Die GRUENEN", /* 23381 */ "Swissphone Telecom AG", /* 23382 */ "Azienda Sanitaria Locale N.4 Chiavarese", /* 23383 */ "Aptus Elektronik AB", /* 23384 */ "GESIS Gesellschaft für Informationssysteme mit beschraenkter Haftung", /* 23385 */ "Pole Universitaire Leonard de Vinci", /* 23386 */ "iXTS Software GmbH", /* 23387 */ "Hypercube Systems Ltd.", /* 23388 */ "IZB München-Frankfurt a. M. GmbH & Co. KG", /* 23389 */ "easyWAN GmbH", /* 23390 */ "Atomwide Ltd.", /* 23391 */ "Insightix Ltd.", /* 23392 */ "LLC CTI - Center of Telephony Integration", /* 23393 */ "Groupe Wesford", /* 23394 */ "Trustedtec", /* 23395 */ "Neighbourhood Link", /* 23396 */ "Fine Point Technologies, Inc", /* 23397 */ "MTS Allstream Inc.", /* 23398 */ "The National Science Foundation", /* 23399 */ "Midcontinent Communications", /* 23400 */ "Sliwa.EU.org Network", /* 23401 */ "Interstar Technologies Inc.", /* 23402 */ "Sharp HealthCare", /* 23403 */ "DAVANTEL", /* 23404 */ "JSC Sahalinmorsvjaz", /* 23405 */ "LDAPtive Pty Ltd", /* 23406 */ "Bryant Unlimited", /* 23407 */ "Rhombus Systems Ltd.", /* 23408 */ "Torque.net inc.", /* 23409 */ "Hackstrike Ltd.", /* 23410 */ "ServInfo", /* 23411 */ "Arcontech Ltd", /* 23412 */ "Melange Corporation", /* 23413 */ "Ilmarinen Mutual Pension Insurance Company", /* 23414 */ "nordsys.com", /* 23415 */ "MIT-xperts GmbH", /* 23416 */ "COPITEC - Consejo Profesional de Ingeniería de Telecomunicaciones, Electrónica y Computación", /* 23417 */ "Gridlogix, Inc.", /* 23418 */ "Talk24", /* 23419 */ "APS systems AG", /* 23420 */ "Altana Pharma AG", /* 23421 */ "Instituto Superior de Contailidade e Administracao de Coimbra", /* 23422 */ "Osmosys S.A.", /* 23423 */ "Maximum Impression, LLC", /* 23424 */ "QS Technologies, Inc.", /* 23425 */ "Louverturenet", /* 23426 */ "The Home Depot Supply MRO", /* 23427 */ "NOC, School of Engineering, Morgan State University", /* 23428 */ "Eurocis", /* 23429 */ "Lumigent Technologies, Inc.", /* 23430 */ "CAMed", /* 23431 */ "Packet Island Inc.", /* 23432 */ "BGComp Inc.", /* 23433 */ "Georgia Technology Authority", /* 23434 */ "Rock Holdings Inc.", /* 23435 */ "Mexicana de Electromecanicos SA de CV", /* 23436 */ "Don Bosco Institute of Technology", /* 23437 */ "Beijing Wandong Medical Equipment Co. Ltd.", /* 23438 */ "HurdFr", /* 23439 */ "Avvenu Inc.", /* 23440 */ "R.A.Systems", /* 23441 */ "RockMon IT-Consulting", /* 23442 */ "miniprobe", /* 23443 */ "LATECOERE", /* 23444 */ "Jordan Curzon", /* 23445 */ "H5-Group", /* 23446 */ "Opsware Inc.", /* 23447 */ "Avitech AG", /* 23448 */ "Tripod Technology Group, Inc.", /* 23449 */ "W. A. Strosberg", /* 23450 */ "Wallenius Wilhelmsen Lines", /* 23451 */ "SunGard Availability Services", /* 23452 */ "KungFoo", /* 23453 */ "Belzebyte Network", /* 23454 */ "Exceptional Software Strategies, Inc.", /* 23455 */ "NetCarrier Inc", /* 23456 */ "AMVESCAP PLC", /* 23457 */ "National Cybernet Security LTD", /* 23458 */ "Chunghwa Telecom Co., Ltd.", /* 23459 */ "Profilium Inc.", /* 23460 */ "In4S, Inc.", /* 23461 */ "Unixconn", /* 23462 */ "Kolporter Info S.A.", /* 23463 */ "Department of IT, University of Defense, Czech Armed Forces", /* 23464 */ "VIVOTEK INC.", /* 23465 */ "Vision Fire and Security", /* 23466 */ "Shanghai INFOPLS Network Technology Co.,Ltd. , China", /* 23467 */ "NGC Systems Sdn Bhd", /* 23468 */ "opensoul.org", /* 23469 */ "LOGATIQUE", /* 23470 */ "Digita Oy", /* 23471 */ "mangoART.AT - Web- und Multimediatechnik, Softwareentwicklung", /* 23472 */ "Panda Software International S.L.", /* 23473 */ "EITB", /* 23474 */ "Softel Group", /* 23475 */ "British Educational Communications and Technology Agency", /* 23476 */ "DABiS AG", /* 23477 */ "Provincia di Firenze", /* 23478 */ "Sulake Corporation Oy", /* 23479 */ "Degussa Bank GmbH", /* 23480 */ "Infoaxis Ltd", /* 23481 */ "Altobridge Ltd.", /* 23482 */ "University of North Carolina Asheville", /* 23483 */ "C .D.H. srl", /* 23484 */ "AusCERT - Australian Computer Emergency Response Team", /* 23485 */ "NetCentrum Ltd.", /* 23486 */ "Daxten Ltd", /* 23487 */ "Technica Corporation", /* 23488 */ "Visplex Association", /* 23489 */ "ENIDAN Technologies GmbH", /* 23490 */ "CyberTech B.V.", /* 23491 */ "LightCore Co., Ltd.", /* 23492 */ "Aminfu Hudima", /* 23493 */ "Mint Systems Ltd.", /* 23494 */ "IT-Pro Peter Lechner", /* 23495 */ "Boursorama", /* 23496 */ "Lswei", /* 23497 */ "Shanghai Asia-Pacific Computer Information System Co, Ltd.", /* 23498 */ "Siemens Programm- und Systementwicklung GmbH & Co. KG", /* 23499 */ "Articy Computer System & Service", /* 23500 */ "SailBum Enterprises, LLC", /* 23501 */ "Renew Data Corp", /* 23502 */ "Arizona Foundation for Medical Care", /* 23503 */ "TWENTIETH CENTURY FOX FILM CORPORATION", /* 23504 */ "Programming/Design", /* 23505 */ "Pleiades Consulting, Inc", /* 23506 */ "salesforce.com", /* 23507 */ "EVI", /* 23508 */ "BVCompuworks", /* 23509 */ "Centro Cultural y Deportivo Tajamar", /* 23510 */ "TELUS", /* 23511 */ "Copi Family", /* 23512 */ "Westline Security Ltd.", /* 23513 */ "Michaels Stores Inc.", /* 23514 */ "TEKMOB, lda", /* 23515 */ "CitiCards", /* 23516 */ "Leviton Voice And Data", /* 23517 */ "Tomas Zoufaly", /* 23518 */ "Regal-Beloit Corporation", /* 23519 */ "Unassigned", /* 23520 */ "Amherst County Public Schools", /* 23521 */ "Volicon, Inc.", /* 23522 */ "MT Consulting S.A.", /* 23523 */ "Weberhofer GmbH", /* 23524 */ "Aleksey Barabanov", /* 23525 */ "Auster Sistemas & Soluções de Informática Ltda.", /* 23526 */ "NewPage Corporation", /* 23527 */ "The Laddie Group", /* 23528 */ "APP!X S.R.L.", /* 23529 */ "State of Alaska, Enterprise Technology Services", /* 23530 */ "Practeo SA", /* 23531 */ "PLAN Australia Pty Ltd", /* 23532 */ "PJR.cc", /* 23533 */ "Supertronic Spa", /* 23534 */ "Holly Australia Pty Ltd", /* 23535 */ "eNClue Co., Ltd.", /* 23536 */ "Shanghai Dreaming Information Technology Co., Ltd.", /* 23537 */ "Jenston Technology Corporation Ltd.", /* 23538 */ "teamdzr", /* 23539 */ "Cordys Holding B.V.", /* 23540 */ "Emcore Corporation", /* 23541 */ "CryptoSign", /* 23542 */ "iCONN", /* 23543 */ "Allen ReSearch", /* 23544 */ "West Ridge Networks, Inc.", /* 23545 */ "Wagner and Associates Groupware Services, Inc", /* 23546 */ "IFSERCON COM s.r.l.", /* 23547 */ "Elber S.r.L.", /* 23548 */ "Toyo Networks & System Integration Co., Ltd.", /* 23549 */ "e-World Developments Ltd", /* 23550 */ "ErgonomiX Software GmbH", /* 23551 */ "JPS Communications", /* 23552 */ "Discover Financial Services, Inc.", /* 23553 */ "PEMI", /* 23554 */ "contentteam GmbH", /* 23555 */ "Centre de Gestion Ocean", /* 23556 */ "EEA communication solutions", /* 23557 */ "IPsoft Inc.", /* 23558 */ "United Information System Service Co., Ltd.", /* 23559 */ "edreams", /* 23560 */ "Anite Deutschland GmbH & CO.KG", /* 23561 */ "Smartware Computing", /* 23562 */ "DUX Inc.", /* 23563 */ "Schmidt GmbH", /* 23564 */ "Panta Computer Systems", /* 23565 */ "Infohit Computers d.o.o.", /* 23566 */ "Georg-Christoph-Lichtenberg-Schule, Kassel", /* 23567 */ "Noel-Plus, s.r.o.", /* 23568 */ "TeamWorx Productions Ltd.", /* 23569 */ "Soliton", /* 23570 */ "IPBS-CNRS", /* 23571 */ "WebMagician Global", /* 23572 */ "Kids & Co g.e.V.", /* 23573 */ "TU Hamburg-Harburg", /* 23574 */ "Wayfinder Systems AB", /* 23575 */ "ADVIS Maciej Matysiak", /* 23576 */ "Enfo Partner Oy", /* 23577 */ "MSC Vertriebs GmbH", /* 23578 */ "Centrica plc", /* 23579 */ "Andritz Oy", /* 23580 */ "Hacousto Holland", /* 23581 */ "ESEO", /* 23582 */ "APOS Systems Inc.", /* 23583 */ "Logical Progression Ltd", /* 23584 */ "Bank Technologies Centre", /* 23585 */ "Ralf Kirchner Systemanalyse", /* 23586 */ "PROFIcomms s.r.o.", /* 23587 */ "FOI, Swedish Defence Research Agency", /* 23588 */ "Max Zinal's Number", /* 23589 */ "F.I.A.S.A.", /* 23590 */ "CCNY", /* 23591 */ "Iowa Counties Information Technology", /* 23592 */ "Dipl.-Ing. Heiko Boesel", /* 23593 */ "EBI L.P.", /* 23594 */ "Virginia Employment Commission", /* 23595 */ "pikkerton GmbH", /* 23596 */ "Esica Terra Inc.", /* 23597 */ "UX", /* 23598 */ "Studio Network Solutions", /* 23599 */ "Transora", /* 23600 */ "Emcom Systems", /* 23601 */ "Fulano.com.br S/A", /* 23602 */ "Optellios", /* 23603 */ "GoldPocket Interactive, Inc.", /* 23604 */ "Applications Plus, Inc.", /* 23605 */ "DigiPen Institute of Technology", /* 23606 */ "Mélix", /* 23607 */ "Paul's Farm", /* 23608 */ "Ix Appliance, Inc.", /* 23609 */ "WDG s.c.", /* 23610 */ "nLight, s.r.o.", /* 23611 */ "Atlassian Software Systems", /* 23612 */ "JAPAN IMAGE & NETWORK INC.", /* 23613 */ "A. Wilton", /* 23614 */ "HiFX IT & MEDIA SERVICES PVT. LTD.", /* 23615 */ "SYNCHROSOFT", /* 23616 */ "Deutsches Literaturarchiv Marbach", /* 23617 */ "Saima Avandero Spa", /* 23618 */ "SERGAS", /* 23619 */ "Teltronix Ltd", /* 23620 */ "Bechtel SAIC Company LLC", /* 23621 */ "European Patent Office", /* 23622 */ "Icon Multimedia", /* 23623 */ "První certifikaèní autorita, a.s.", /* 23624 */ "Intechgral Inc.", /* 23625 */ "Poggs Computer Services", /* 23626 */ "Interlix", /* 23627 */ "California State University Dominguez Hills", /* 23628 */ "SafeNet, Inc.", /* 23629 */ "Computer Aid, Inc.", /* 23630 */ "Azalea Networks, Inc.", /* 23631 */ "Sneha Technologies S.L.", /* 23632 */ "ipsys Communications AG", /* 23633 */ "TC Automatisering", /* 23634 */ "colin.de", /* 23635 */ "Lycee Ader Bernay", /* 23636 */ "Novartis Institutes og BioMedical Research Vienna GmbH & Co KG", /* 23637 */ "Logilec", /* 23638 */ "ParsGroup Informationstechnologie GmbH", /* 23639 */ "Enercon Ltd.", /* 23640 */ "Cascade Ltd", /* 23641 */ "Tmidia Inc.", /* 23642 */ "bsecure.dk", /* 23643 */ "Siemens Ltd., China", /* 23644 */ "DAF Trucks", /* 23645 */ "Cell C (Pty) Ltd", /* 23646 */ "SARL GALLET.info", /* 23647 */ "ESV, LLC", /* 23648 */ "Cornerturn, LLC", /* 23649 */ "Opendicom SRL", /* 23650 */ "Integrated Decisions and system Inc.", /* 23651 */ "Lewes Computer Services", /* 23652 */ "Cirrus Technologies Pty Ltd", /* 23653 */ "AICHI ELECTRIC CO., LTD.", /* 23654 */ "CallDesk S.A.", /* 23655 */ "Cult Hill Innovation Limited", /* 23656 */ "TEDIS, a.s.", /* 23657 */ "TUBITAK ULAKBIM", /* 23658 */ "lars morich Kommunikationstechnik GmbH", /* 23659 */ "DRS Technologies, Inc, C2 Systems", /* 23660 */ "American TeleCare, Inc.", /* 23661 */ "Blue Jungle, Inc", /* 23662 */ "Storied Future Infrastructure", /* 23663 */ "Federal Deposit Insurance Corporation", /* 23664 */ "wiselink", /* 23665 */ "BeaufortWeb", /* 23666 */ "FredNet", /* 23667 */ "Kaspersky Lab ZAO", /* 23668 */ "Kyphon Europe", /* 23669 */ "Nihon Kohden Corporation", /* 23670 */ "CIS Hollywood", /* 23671 */ "nTime Servicos de Informatica e Comercio Ltda", /* 23672 */ "Bluesoft sp z o.o.", /* 23673 */ "Edu Business Solutions", /* 23674 */ "Foray Technologies Inc.", /* 23675 */ "G&K Services inc.", /* 23676 */ "Colonial Fiji", /* 23677 */ "PCTEL, Inc.", /* 23678 */ "Diligence Consulting, L.L.C.", /* 23679 */ "Eclipse SP LLC.", /* 23680 */ "terreActive AG", /* 23681 */ "emuse Technologies Ltd.", /* 23682 */ "EDV-COMPAS GmbH", /* 23683 */ "Sensitech Inc.", /* 23684 */ "Godsk.net", /* 23685 */ "Softential, Inc.", /* 23686 */ "Pobeda JSC", /* 23687 */ "Summit Development, Ltd", /* 23688 */ "Pervenio Ltd", /* 23689 */ "Abstract Ltd.", /* 23690 */ "VIA", /* 23691 */ "IDactis", /* 23692 */ "Networks & Concepts GmbH", /* 23693 */ "PMX NETWORKS, INC", /* 23694 */ "PePLink Ltd.", /* 23695 */ "Nilai International College", /* 23696 */ "hoi-polloi.org", /* 23697 */ "RELDATA Inc.", /* 23698 */ "Zyden Software", /* 23699 */ "Internews 98 Ltd.", /* 23700 */ "Cannon Technologies Ltd", /* 23701 */ "SHD Holding GmbH", /* 23702 */ "Agile Software (NZ) Ltd", /* 23703 */ "Calypso Capital Management", /* 23704 */ "Salient Corporation, Inc", /* 23705 */ "GlobalPOPs", /* 23706 */ "LAFARGE ALUMINATES", /* 23707 */ "HYMATOM SA", /* 23708 */ "Miltope Corporation", /* 23709 */ "Agincourt Computing", /* 23710 */ "Seventh Skill Ltd", /* 23711 */ "Minnesota Office of Enterprise Technology", /* 23712 */ "Keating Inc", /* 23713 */ "Data Systems S.A.E.C.A.", /* 23714 */ "Live Monitoring Pty Ld", /* 23715 */ "United States Council for Automotive Research", /* 23716 */ "Siricomm, Inc.", /* 23717 */ "Esensors, Inc.", /* 23718 */ "Arishi", /* 23719 */ "Netifice Communications, Inc.", /* 23720 */ "The Ideal Computer Group Inc.", /* 23721 */ "CS-Soft, s.r.o", /* 23722 */ "Great Power Electrin Science and Technology stock CO.LTD", /* 23723 */ "Udo Neumann", /* 23724 */ "Theserver Brasil / Multidiagnostica IT Team", /* 23725 */ "VOTORANTIM INVESTIMENTOS INDUSTRIAIS S.A.", /* 23726 */ "Marlin Trust Management Organization L.L.C", /* 23727 */ "Versio SARL", /* 23728 */ "DiVitas Networks", /* 23729 */ "OVEA", /* 23730 */ "Telestar", /* 23731 */ "ShijiaZhuang Railway Institute", /* 23732 */ "JGC Corporation", /* 23733 */ "OEBB", /* 23734 */ "Fondation RESTENA", /* 23735 */ "IceWarp Ltd.", /* 23736 */ "Hochschule Ulm", /* 23737 */ "AWR Solution Network", /* 23738 */ "HUG", /* 23739 */ "SynerGIS Informationssysteme GmbH", /* 23740 */ "Wogri Unlimited", /* 23741 */ "CONNOTECH Experts-conseils inc.", /* 23742 */ "Kerridge Computer Company Ltd", /* 23743 */ "BITMARCK SOFTWARE GMBH", /* 23744 */ "Black Hen Limited", /* 23745 */ "Administration communale de Braine-l'Alleud", /* 23746 */ "Areste Centre Informatique", /* 23747 */ "Edinform S.p.A", /* 23748 */ "Federal State Unitary Enterprise Leningrad Radio Research and Development Institute", /* 23749 */ "new10 GmbH", /* 23750 */ "PT. TRG international", /* 23751 */ "ExcellNet IT Services and Consulting", /* 23752 */ "Infinit Productions", /* 23753 */ "Mairie de Savigny-Sur-Orge", /* 23754 */ "Softrax Corporation", /* 23755 */ "Promotora de Informaciones, S.A.", /* 23756 */ "AR Telecom", /* 23757 */ "Desert Cascade", /* 23758 */ "Szolnok Város Polgármesteri Hivatal", /* 23759 */ "LayerZero Power Systems, Inc.", /* 23760 */ "CMSL", /* 23761 */ "Time-Ware", /* 23762 */ "Rent a PACS GmbH", /* 23763 */ "Atamo Pty Ltd", /* 23764 */ "GetNet Comunicacoes S/C LTDA", /* 23765 */ "TriGeo Network Security, Inc.", /* 23766 */ "Rensselaer Hartford Graduate Center, Inc", /* 23767 */ "Integrated Management Resources, Inc.", /* 23768 */ "Infinity Technology, Inc.", /* 23769 */ "Andreoli Domenico", /* 23770 */ "Marakana, Inc.", /* 23771 */ "RoutePulse Technologies", /* 23772 */ "Starfire Engineering & Technologies, Inc.", /* 23773 */ "jNetX Inc.", /* 23774 */ "Outer TI", /* 23775 */ "RougeNetwork", /* 23776 */ "Elektrarny Opatovice a.s.", /* 23777 */ "BEZ Systems, Inc.", /* 23778 */ "Asklepios Group", /* 23779 */ "Prose Consulting Ltd.", /* 23780 */ "Albertslund Ungdomsboliger", /* 23781 */ "ASN", /* 23782 */ "iTellus Holdings, Inc.", /* 23783 */ "StrataLight Communications", /* 23784 */ "CIC/CAFMICRO", /* 23785 */ "DS DATA SYSTEMS GmbH", /* 23786 */ "gnyrf.net", /* 23787 */ "Matt Wright Consulting", /* 23788 */ "GrammaTech, Inc.", /* 23789 */ "Pearce Bevill Leesburg & Moore, P.C.", /* 23790 */ "Adaptix", /* 23791 */ "Axell Wireless Israel Ltd", /* 23792 */ "Cluster Resources", /* 23793 */ "Significant Bits", /* 23794 */ "Movile", /* 23795 */ "SunWare GmbH & Co KG", /* 23796 */ "KSIGN Co., Ltd.", /* 23797 */ "Australia Post", /* 23798 */ "icon Systemhaus GmbH", /* 23799 */ "Roca Corporación Empresarial, S.A", /* 23800 */ "Metrima Energi AB", /* 23801 */ "Dekabank", /* 23802 */ "Ecole Polytechnique", /* 23803 */ "Rena Electronica B.V.", /* 23804 */ "International Industrial Bank", /* 23805 */ "Touch Clarity Ltd.", /* 23806 */ "UIB Umwelt Informatik Büro GmbH", /* 23807 */ "CCM Software Services Ltd.", /* 23808 */ "Bridicum Security Group A/S", /* 23809 */ "Rothschild Bank AG", /* 23810 */ "Qbizm technologies, a.s.", /* 23811 */ "INL SARL", /* 23812 */ "Cendant TDS", /* 23813 */ "ID-Tech Servicos em Informatica Ltda.", /* 23814 */ "Waterbury Republican American", /* 23815 */ "SlipStream Data Inc.", /* 23816 */ "Ministerio de Economía, República Argentina", /* 23817 */ "FirstEnergy Corp.", /* 23818 */ "Epoch Integration Inc.", /* 23819 */ "Lateral Net Ltd.", /* 23820 */ "Irish Centre for High End Computing", /* 23821 */ "MITSUI HOME CO.,LTD.", /* 23822 */ "Wise Technology Co.,Ltd.", /* 23823 */ "LAC Co., Ltd.", /* 23824 */ "EZconn Corporation", /* 23825 */ "HiSpeed Data, Inc.", /* 23826 */ "GHY International", /* 23827 */ "MKI Systems", /* 23828 */ "W&W Informatik GmbH", /* 23829 */ "Blekinge Studentservice AB", /* 23830 */ "Teneros, Inc.", /* 23831 */ "Aitec do Brasil Ltda", /* 23832 */ "DentaQuest Ventures, Inc.", /* 23833 */ "Fachhochschule Salzburg GmbH", /* 23834 */ "emFAST Inc", /* 23835 */ "DS4 Laser Technology s.r.l.", /* 23836 */ "Jefferson County School District", /* 23837 */ "BIATEL Systemy Komputerowe Sp. z oo.", /* 23838 */ "GROX Networks", /* 23839 */ "School District #57 (Prince George)", /* 23840 */ "RAD-OP", /* 23841 */ "Kuban Pharm Stocks, Ltd.", /* 23842 */ "Departamento de Ciência da Computação/Universidade Federal da Bahia", /* 23843 */ "Constellation Brands, Inc.", /* 23844 */ "Schowalter, GbR", /* 23845 */ "Endress+Hauser InfoServe GmbH+Co. KG", /* 23846 */ "Elogic snc di Antonini Filippo", /* 23847 */ "Middle Kingdom - SCA, Inc.", /* 23848 */ "PACSGEAR, Inc.", /* 23849 */ "Zyberit AB", /* 23850 */ "CCI Consulting Ltd.", /* 23851 */ "Seeing Machines Pty Ltd", /* 23852 */ "eThinkSolutions,Inc.", /* 23853 */ "Shipbuilding SS", /* 23854 */ "Bullant Software", /* 23855 */ "Imtec Imaging, LLC", /* 23856 */ "NextIO, Inc", /* 23857 */ "VadaTech Inc.", /* 23858 */ "Puntoblu Srl", /* 23859 */ "Schubert-Unternehmensgruppe", /* 23860 */ "redweb.cz", /* 23861 */ "AimValley B.V.", /* 23862 */ "Fort Hays State University", /* 23863 */ "Cascadia Information Technologies, Inc.", /* 23864 */ "Synapps", /* 23865 */ "Starnix Care Inc.", /* 23866 */ "Silver Peak Systems, Inc.", /* 23867 */ "sis-tec", /* 23868 */ "HIOKI E.E.Corporation", /* 23869 */ "EMSTONE Co.", /* 23870 */ "Qno Technology Inc.", /* 23871 */ "Rikom d.o.o.", /* 23872 */ "MKC Michels & Kleberhoff Computer GmbH", /* 23873 */ "ACLI Associazioni Cristiane dei Lavoratori Italiani", /* 23874 */ "Gymnasium Münchenstein", /* 23875 */ "PIXID SNC", /* 23876 */ "Grid Operation Center, Aristotle University of Thessaloniki,", /* 23877 */ "Stanton Grove Ltd", /* 23878 */ "SAG Systemhaus GmbH AMS", /* 23879 */ "Motionpath Digital Media Ltd", /* 23880 */ "Avanton Inc.", /* 23881 */ "Investidor Profissional Gestão de Recursos Ltda", /* 23882 */ "Fresenius Medical Care North America", /* 23883 */ "Fotofuxx", /* 23884 */ "Continental City Networks Ltd", /* 23885 */ "Hay Group, Inc.", /* 23886 */ "Kawashima Labo Inc.", /* 23887 */ "Tymar Systems Development", /* 23888 */ "Daco System Elaborazione Dati S.r.l.", /* 23889 */ "HCL Peripherals", /* 23890 */ "ErgoGroup", /* 23891 */ "Milpower Source", /* 23892 */ "Klir Technologies, Inc.", /* 23893 */ "Northshore School District", /* 23894 */ "EvilGenius Networks", /* 23895 */ "Netus Vaizovic k.d.", /* 23896 */ "Trigger Software", /* 23897 */ "Tesseract Corporation", /* 23898 */ "SineRay Consulting Co.,Ltd", /* 23899 */ "Progetti Ambientali Integrati s.a.s.", /* 23900 */ "Digigram", /* 23901 */ "ABB STOTZ-KONTAKT GmbH", /* 23902 */ "Cargol.net Solucions Lliures S.L.L.", /* 23903 */ "Arbitron Inc.", /* 23904 */ "VOCAL Technologies, Ltd.", /* 23905 */ "Axalto Inc.", /* 23906 */ "Advantage Security, S. de R.L. de C.V.", /* 23907 */ "InfoEng Organization", /* 23908 */ "Bel Ami Reisen", /* 23909 */ "iPoint-media LTD.", /* 23910 */ "Aurus", /* 23911 */ "Q-go", /* 23912 */ "Belle Bonfils Memorial Blood Center", /* 23913 */ "pedro armelim unipessoal lda.", /* 23914 */ "SuperGeo Tech. Inc.", /* 23915 */ "Appear TV AS", /* 23916 */ "Under Dusken", /* 23917 */ "JPBerlin", /* 23918 */ "Corporación Tedexis C.A.", /* 23919 */ "Zoic Studios", /* 23920 */ "ISSP Internet-Solutions Szongott & Pertl OEG", /* 23921 */ "Milstein & Asoociates Inc.", /* 23922 */ "Hobnob", /* 23923 */ "readshaw.com", /* 23924 */ "Cacti", /* 23925 */ "Golf-Leagues.com", /* 23926 */ "Ukrainian Catholic University", /* 23927 */ "MVV Energie AG", /* 23928 */ "entire technologies gmbh", /* 23929 */ "Inferno Enterprises", /* 23930 */ "Goodrich Corporation", /* 23931 */ "TLD Solutions Ltd", /* 23932 */ "CaveraSystems", /* 23933 */ "April Nine Inc.", /* 23934 */ "Architects of VoIP GmbH", /* 23935 */ "china group zhejiang telecom corporation", /* 23936 */ "ExtricomLtd", /* 23937 */ "ANEDER BT", /* 23938 */ "Avokia Inc.", /* 23939 */ "Sysco S.p.A.", /* 23940 */ "Opentaskforce", /* 23941 */ "Intelligent Mobile Solutions, Inc.", /* 23942 */ "Cendres & Métaux SA", /* 23943 */ "DENIC eG", /* 23944 */ "Institute of Journalism, University Dortmund", /* 23945 */ "MINISTERO DELL'INTERNO - DIREZIONE CENTRALE POLIZIA CRIMINALE", /* 23946 */ "Innovene LLC", /* 23947 */ "Confernet Produtos e Servicos Ltd.", /* 23948 */ "Swyx Solutions GmbH", /* 23949 */ "Print Associates A/S", /* 23950 */ "ExaProtect Technology", /* 23951 */ "TJ COLLECTION Co Ltd", /* 23952 */ "Australian Partnership for Advanced Computing", /* 23953 */ "TriNix AB", /* 23954 */ "PUCCAMP - Pontificia Universidade Católica de Campinas", /* 23955 */ "PCL Constructors Inc.", /* 23956 */ "Spacelabs Medical Data", /* 23957 */ "310, JSC", /* 23958 */ "micneu", /* 23959 */ "Acquist Incorporated", /* 23960 */ "CertiMail", /* 23961 */ "Saisung Corporation Ltd.", /* 23962 */ "Safe Host", /* 23963 */ "T-Mobile Austria", /* 23964 */ "Detecon International GmbH", /* 23965 */ "Leiner & Wolff GbR", /* 23966 */ "Tallence GmbH", /* 23967 */ "Netvoyager PLC", /* 23968 */ "arvato mobile", /* 23969 */ "Hamburg Südamerikanische Dampfschifffahrts-Gesellschaft KG", /* 23970 */ "Menzebach und Wolff IT-Consulting GbR", /* 23971 */ "Fidelity MLS Systems and Solutions", /* 23972 */ "Still Tripping Productions.", /* 23973 */ "General Dynamics Robotic Systems", /* 23974 */ "et al Innovations Ltd", /* 23975 */ "Zebanon Inc.", /* 23976 */ "My Computer Person", /* 23977 */ "Sadel S.p.a.", /* 23978 */ "Knoways s.r.l.", /* 23979 */ "STS GmbH & Co. OHG", /* 23980 */ "MWS", /* 23981 */ "tty1.net", /* 23982 */ "Hampshire Constabulary", /* 23983 */ "RyCo Electronic Systems Limited", /* 23984 */ "S.O.Ge.S.A. s.a.s. di Ugo Grassi & C.", /* 23985 */ "ENENSYS Technologies SAS", /* 23986 */ "Autoridad Portuaria de Barcelona", /* 23987 */ "Elink GmbH", /* 23988 */ "Cablefree Solutions Limited", /* 23989 */ "Shifa International Hospitals", /* 23990 */ "Planeetta Internet Oy", /* 23991 */ "Social Science Computing Cooperative", /* 23992 */ "Linear Technology Corporation", /* 23993 */ "OpenDarwin Project", /* 23994 */ "Eightball Productions", /* 23995 */ "Fuego Inc.", /* 23996 */ "Florida Department of State", /* 23997 */ "RUF Telematik AG", /* 23998 */ "FTI Consulting, Inc", /* 23999 */ "ABN AMRO Bank Services", /* 24000 */ "Fiege Logistik (Schweiz) AG", /* 24001 */ "Ingenieria Diez Cisneros, S.A.", /* 24002 */ "Cellcom", /* 24003 */ "Onus Petro Services", /* 24004 */ "Alexa Internet, Inc.", /* 24005 */ "Weidlinger Associates Inc.", /* 24006 */ "Globat.com", /* 24007 */ "Great Bay Software", /* 24008 */ "NextHop Technologies, Inc.", /* 24009 */ "ELESIGN", /* 24010 */ "Newtech.Co.,Ltd.", /* 24011 */ "eASPNet Taiwan Inc.", /* 24012 */ "RTX Telecom A/S", /* 24013 */ "Landesversicherungsanstalt Rheinprovinz", /* 24014 */ "CODAFIX SYSTEM", /* 24015 */ "Bionix AB", /* 24016 */ "teegee", /* 24017 */ "Frederikshavn Gymnasium og HF-kursus", /* 24018 */ "CertiPath, LLC", /* 24019 */ "Metagistics", /* 24020 */ "13 Spiders Ltd", /* 24021 */ "Optelian Access Networks Corp.", /* 24022 */ "IEA Software, Inc.", /* 24023 */ "Tecsidel, S.A.", /* 24024 */ "MVP Software, Inc.", /* 24025 */ "Cube Route", /* 24026 */ "Dexa Medica Group", /* 24027 */ "Bayerwald Fenster Haustueren GmbH & Co. KG", /* 24028 */ "HEYFRA electronic GmbH", /* 24029 */ "CenterTools Software GmbH", /* 24030 */ "Nomus Comm-Systems", /* 24031 */ "dmstools AG", /* 24032 */ "Peerex Ltd", /* 24033 */ "The Royal Botanic Gardens, Kew", /* 24034 */ "AFIP", /* 24035 */ "howard.org", /* 24036 */ "Revolt Ltd.", /* 24037 */ "VistaPrint USA Inc.", /* 24038 */ "Lutz Badenheuer", /* 24039 */ "BARREL Investment Company Ltd.", /* 24040 */ "M7 Software BV", /* 24041 */ "AMS 1769 Ltd", /* 24042 */ "Tanel Unt", /* 24043 */ "Cthulhu Inc.", /* 24044 */ "Dwerryhouse IT Consulting", /* 24045 */ "TMSw Corp.", /* 24046 */ "Netfabric Corporation", /* 24047 */ "United Devices", /* 24048 */ "eApps", /* 24049 */ "Orion Systems International", /* 24050 */ "Seneca Software & Solar, Inc.", /* 24051 */ "Wedo Consulting", /* 24052 */ "Xspedius Communications", /* 24053 */ "NextNine Ltd.", /* 24054 */ "Govolution, Inc.", /* 24055 */ "JDI ICT", /* 24056 */ "Robert D. Allen", /* 24057 */ "AltCall Pty Ltd", /* 24058 */ "Zuzax LLC", /* 24059 */ "icube", /* 24060 */ "Amtium Computer Network Communiction Tech. CO,LTD£»", /* 24061 */ "Korenix Technology Co., Ltd.", /* 24062 */ "Call Direct Cellular Solutions Pty. Ltd", /* 24063 */ "Florian Hagedorn IT-Services", /* 24064 */ "TelcoSI", /* 24065 */ "Beijing WaterTek Information Technology Co.,Ltd.", /* 24066 */ "Webraska do Brasil", /* 24067 */ "Tier-3 Pty Ltd.", /* 24068 */ "IP Systems Pty Ltd", /* 24069 */ "AMANO Corporation", /* 24070 */ "Zenitel Radioteknik", /* 24071 */ "Code Mercenaries Hard- und Software GmbH", /* 24072 */ "Abeo AS", /* 24073 */ "ASI Controls", /* 24074 */ "ELIA N.V. / S.A.", /* 24075 */ "National Institute for Public Health and the Environment", /* 24076 */ "Zeus Gesellschaft fuer Integration und Kommunikation GmbH", /* 24077 */ "ISVA-Project Team (EADS-ISR, FHG-IITB, FGAN-FOM, FGAN-FKIE)", /* 24078 */ "Cacanska banka a.d. Cacak", /* 24079 */ "key-stone BV", /* 24080 */ "Paxfire Inc", /* 24081 */ "GTL Limited", /* 24082 */ "Securitect", /* 24083 */ "Managed Network Solutions, Inc.", /* 24084 */ "Fitre S.p.A.", /* 24085 */ "Medizinische Hochschule Hannover", /* 24086 */ "International Grid Trust Federation", /* 24087 */ "Diamelle inc", /* 24088 */ "Lexbox", /* 24089 */ "Central Library, Aristotle University of Thessaloniki", /* 24090 */ "SEW-EURODRIVE GmbH & Co KG", /* 24091 */ "I-Way Computers bvba", /* 24092 */ "JSC Format Link", /* 24093 */ "UniBwM", /* 24094 */ "MioSoft Corporation", /* 24095 */ "University of Douala", /* 24096 */ "Thoralf Linss", /* 24097 */ "Southwest Youth Collaborative", /* 24098 */ "Hosanna Christian Academy", /* 24099 */ "LogiSoft AR Ltd, Inc.", /* 24100 */ "Banyan Tree Hotels & Resorts Pte Ltd", /* 24101 */ "Aeris Enterprises Inc.", /* 24102 */ "DIR Wieslawa Rozynek", /* 24103 */ "Lennar Corporation", /* 24104 */ "di-Cross", /* 24105 */ "Damovo do Brasil S/A", /* 24106 */ "xkoto Inc.", /* 24107 */ "UAB \"Eltera\"", /* 24108 */ "AtcaNet", /* 24109 */ "Vigilix. LLC", /* 24110 */ "Optivus Technology, Inc.", /* 24111 */ "Shorter College", /* 24112 */ "Netzbiotop Dresden e.V.", /* 24113 */ "City of Tulsa", /* 24114 */ "Ginix", /* 24115 */ "68k.se", /* 24116 */ "Idera", /* 24117 */ "artemis-design GbR", /* 24118 */ "eSimone", /* 24119 */ "JSDAAV INTERNET SOLUTIONS CC", /* 24120 */ "Centro Nacional de Infromación y Comunicación Educativa", /* 24121 */ "Brodersen Controls A/S", /* 24122 */ "Sparkasse Haslach-Zell", /* 24123 */ "Aqon Ltd.", /* 24124 */ "OceanLake Asia Pte Ltd.", /* 24125 */ "Junxion, Inc.", /* 24126 */ "UUHosting.Net", /* 24127 */ "Casino Arizona", /* 24128 */ "International Road Dynamics Inc.", /* 24129 */ "Oneformatics", /* 24130 */ "thePlatform for Media, Inc", /* 24131 */ "zyp.org", /* 24132 */ "Calassa Labs Ltd", /* 24133 */ "Torex Retail Solutions GmbH", /* 24134 */ "Smartcom-Bulgaria AD", /* 24135 */ "Schur Pack Danmark a/s", /* 24136 */ "Optimum Computing Solutions", /* 24137 */ "JSC TaxNet", /* 24138 */ "RFK International", /* 24139 */ "VoiceObjects AG", /* 24140 */ "T-2, d.o.o.", /* 24141 */ "Bunya Technology Pty Ltd", /* 24142 */ "MallNet Ltd.", /* 24143 */ "Mobillion BV", /* 24144 */ "ECS GmbH", /* 24145 */ "Zone Systems", /* 24146 */ "Ex Libris Ltd.", /* 24147 */ "DATALAB DO BRASIL LTDA", /* 24148 */ "Milestone Systems A/S", /* 24149 */ "TIM BRASIL", /* 24150 */ "Inforsis Informatica y Formacion, SL", /* 24151 */ "OTA Management LLC", /* 24152 */ "Defense Finance and Accounting Service", /* 24153 */ "Moog Components Group", /* 24154 */ "Mission Hopitals", /* 24155 */ "Intelliant", /* 24156 */ "Spectrum Signal Processing, Inc.", /* 24157 */ "Landstar System Holdings, Inc.", /* 24158 */ "Neureol Technologies Private Limited", /* 24159 */ "Cool IP", /* 24160 */ "MLL Telecom Limited", /* 24161 */ "CareWorks vof", /* 24162 */ "SUPERMEDIA Internet Provider", /* 24163 */ "KBOSS.hu Kft.", /* 24164 */ "Digi-Sign Limited", /* 24165 */ "Centro de Estudos e Sistemas Avançados do Recife", /* 24166 */ "WEYCO, INC", /* 24167 */ "GMAC", /* 24168 */ "Sunsetbrew Inc.", /* 24169 */ "Motricity, Inc.", /* 24170 */ "8e6 Technologies", /* 24171 */ "Tenaska Power Services, Co", /* 24172 */ "Rho, Inc.", /* 24173 */ "Institutional Shareholder Services, Inc.", /* 24174 */ "SILVER SERVER GmbH", /* 24175 */ "Comgate Engineering Ltd.", /* 24176 */ "Tivit S.A.", /* 24177 */ "Stillwater Medical Center Authority", /* 24178 */ "Ministerie van Binnenlandse Zaken en Koninkrijksrelaties", /* 24179 */ "Tgusta.com C.A", /* 24180 */ "Fri-Jado B.V.", /* 24181 */ "SRH", /* 24182 */ "Vimio PLC", /* 24183 */ "MEDNET Service für Ärzte AG", /* 24184 */ "Kvalix Automatika Kft.", /* 24185 */ "Netsol Network Solutions Oy", /* 24186 */ "LambdaStream", /* 24187 */ "Mail Object", /* 24188 */ "Cain Computing", /* 24189 */ "Distributed Systems Services, Inc.", /* 24190 */ "Digital Fugue", /* 24191 */ "trial-n-error", /* 24192 */ "Strandbygaard", /* 24193 */ "Mary Kay Inc.", /* 24194 */ "i5k.net", /* 24195 */ "OSEB NV", /* 24196 */ "Colliers Turley Martin Tucker", /* 24197 */ "Netcordia, Inc.", /* 24198 */ "Primagraphics Ltd", /* 24199 */ "Quality Software Solutions Ltd.", /* 24200 */ "Adrenio GmbH", /* 24201 */ "MIKRONIKA", /* 24202 */ "Wellington Technology, Inc.", /* 24203 */ "Randolph Products Company", /* 24204 */ "JUPITER TECHNOLOGY(WUXI)CO.,LTD", /* 24205 */ "EGROUP Services Ltd.", /* 24206 */ "Deimos-Space S.L.", /* 24207 */ "Cystelcom Sistemas S.A.", /* 24208 */ "MWare CZ, s.r.o.", /* 24209 */ "ComWorth Co.,Ltd.", /* 24210 */ "Solent Technology Ltd.", /* 24211 */ "Conexim Australia Pty Ltd", /* 24212 */ "Oxford Health Plans, Llc. (subsidiary of UnitedHealth Group)", /* 24213 */ "Mount Holyoke College Computer Science Department", /* 24214 */ "Reed Technology and Information Services, Inc.", /* 24215 */ "uptime software inc.", /* 24216 */ "j-buzz, LLC", /* 24217 */ "Metaweb Technologies, Inc.", /* 24218 */ "nuBridges, LLC", /* 24219 */ "Marcelo Rinesi", /* 24220 */ "Donorware LLC", /* 24221 */ "Resolute Networks Ltd.", /* 24222 */ "Fabryka Stron Internetowych Sp. z o.o.", /* 24223 */ "Southern Regional Education Board", /* 24224 */ "Formula Telecom Solutions", /* 24225 */ "Braxcomm Eletrônica Ltda.", /* 24226 */ "Negeso Ukraine Ltd", /* 24227 */ "HOT Technology", /* 24228 */ "arvato technology GmbH", /* 24229 */ "Verint Systems Canada Inc.", /* 24230 */ "GUFI - Gruppo Utenti FreeBSD Italia", /* 24231 */ "6th Sense Software, Inc.", /* 24232 */ "Ikatu", /* 24233 */ "VuCOMP", /* 24234 */ "Hannum Computer Service", /* 24235 */ "NStudioCorp", /* 24236 */ "ResourceChain Inc.", /* 24237 */ "PACLABS Technology and Innovation, Inc.", /* 24238 */ "V-shine Co., Ltd", /* 24239 */ "TongSoft Tech.", /* 24240 */ "Accucast, Inc.", /* 24241 */ "SimWorks International Limited", /* 24242 */ "Amrita Institute of Medical Sciences", /* 24243 */ "IntroMobile CO., Ltd", /* 24244 */ "OSS Corporaton", /* 24245 */ "MGP \"Mosvodokanal\"", /* 24246 */ "Bettge", /* 24247 */ "Stockway Oy", /* 24248 */ "Clinique Saint-Luc (Bouge)", /* 24249 */ "MATRICE SYSTEM S.A.S.", /* 24250 */ "Banca24-7 S.p.A.", /* 24251 */ "ESG GmbH", /* 24252 */ "Systems Trust Co., Ltd.", /* 24253 */ "C4 Solutions Oy", /* 24254 */ "Outpost24 AB", /* 24255 */ "Deutsche WertpapierService Bank AG", /* 24256 */ "Idtect", /* 24257 */ "Ministry of the Flemish Community", /* 24258 */ "Achilles Information Limited", /* 24259 */ "VIELAGE", /* 24260 */ "Mobeon AB", /* 24261 */ "TEAM S.A", /* 24262 */ "up to data professional services GmbH", /* 24263 */ "Neusta GmbH", /* 24264 */ "The British Museum", /* 24265 */ "Infoscope Kft.", /* 24266 */ "Directory Enabled Solutions", /* 24267 */ "Opendium Ltd", /* 24268 */ "CR2 LTD", /* 24269 */ "S3 Srl Servizi Soluzioni Sistemi", /* 24270 */ "Nessus Internet Services Florian Schicker", /* 24271 */ "Università della Svizzera italiana", /* 24272 */ "nihilistic.org.uk", /* 24273 */ "Beyond Security Inc.", /* 24274 */ "IUT Verdun", /* 24275 */ "Universidad de Oriente", /* 24276 */ "Tiaxa do Brasil Ltda.", /* 24277 */ "Università Campus Bio-Medico", /* 24278 */ "LDAP Administration Console (opensource project)", /* 24279 */ "HdL Coren & Cone", /* 24280 */ "Family Health International", /* 24281 */ "StackFrame, LLC", /* 24282 */ "dns Ltd", /* 24283 */ "wesde", /* 24284 */ "Novax Industries Corporation", /* 24285 */ "HumanConcepts", /* 24286 */ "Telex Communication Inc.", /* 24287 */ "BHMS Webhosting", /* 24288 */ "HotFeet GmbH", /* 24289 */ "Datorföreningen vid LU & LTH", /* 24290 */ "E-Planit Systems, Inc.", /* 24291 */ "BRAKKE SCHAFNITZ INS BROKERS INC", /* 24292 */ "Toyota New Zealand Ltd", /* 24293 */ "Air Broadband Communications", /* 24294 */ "Pickwick Consulting", /* 24295 */ "DENSO WAVE INCORPORATED", /* 24296 */ "Sonic Solutions", /* 24297 */ "Freudenberg Dichtungs- & Schwingungstechnik GmbH & CoKG", /* 24298 */ "go4teams GmbH", /* 24299 */ "Wotif", /* 24300 */ "stj company", /* 24301 */ "Network constructor, Core Constructor , Kun Shan University", /* 24302 */ "Pegacat Pty Ltd", /* 24303 */ "ArgusConnect Pty LTD", /* 24304 */ "INBOS Pty LTD", /* 24305 */ "3 Vias Technologies", /* 24306 */ "Activesec S.A.", /* 24307 */ "Media & Telecom Ventures", /* 24308 */ "Terrascale Technologies Inc.", /* 24309 */ "Medical Information Technology, Inc.", /* 24310 */ "SunHELP", /* 24311 */ "Identity Automation, LP", /* 24312 */ "TiendaLinux.com", /* 24313 */ "What Creek", /* 24314 */ "Fatih University", /* 24315 */ "IT bridge.net s.r.o.", /* 24316 */ "torrini.org", /* 24317 */ "InTouch B.V.", /* 24318 */ "VOCONS IT Consulting GmbH", /* 24319 */ "ELCOM GROUP", /* 24320 */ "NetMagic Ltd.", /* 24321 */ "Petastor, Inc.", /* 24322 */ "Deephaven Ltd", /* 24323 */ "Electric-Tronics Incorporated", /* 24324 */ "OGL Computer Services Group Ltd", /* 24325 */ "Exsys", /* 24326 */ "Estacha Proyectos y Servicios", /* 24327 */ "Spirit AeroSystems, Inc.", /* 24328 */ "Lixil", /* 24329 */ "In Reach Technology", /* 24330 */ "Evolix", /* 24331 */ "Hardware Online AS", /* 24332 */ "FH Ingolstadt", /* 24333 */ "EADS DS UK Ltd", /* 24334 */ "Storewiz Inc.", /* 24335 */ "ATM Express, Inc.", /* 24336 */ "Monster Cable Products Inc.", /* 24337 */ "Situs Management Inc.", /* 24338 */ "ADLINK TECHNOLOGY INC.", /* 24339 */ "Macalester College", /* 24340 */ "Pontis Inc.", /* 24341 */ "FIO Labs, LLC", /* 24342 */ "Rokonet Electronics LTD.", /* 24343 */ "eSPECTRUM Internet-Solution GmbH", /* 24344 */ "Xsite GmbH", /* 24345 */ "Adaway Consulting", /* 24346 */ "Magicpot Inc.", /* 24347 */ "GPTech GmbH", /* 24348 */ "Frank Agerholm", /* 24349 */ "Sensoria Corporation", /* 24350 */ "Linux Network Care Inc", /* 24351 */ "Alpha Centauri Software Limited", /* 24352 */ "Media Technology Systems Inc.", /* 24353 */ "secscend LLC", /* 24354 */ "Lemon I.T. Co., Ltd.", /* 24355 */ "Solinus, Inc.", /* 24356 */ "CD-Telematika a. s.", /* 24357 */ "Nomics", /* 24358 */ "Deutsche Rentenversicherung Mitteldeutschland", /* 24359 */ "Transmitton Ltd", /* 24360 */ "InnovaSON", /* 24361 */ "Duquesne University", /* 24362 */ "Super Star enterprises", /* 24363 */ "ON Semiconductor", /* 24364 */ "Constellation Energy", /* 24365 */ "gui.org", /* 24366 */ "Somerdata Ltd", /* 24367 */ "Paat Software", /* 24368 */ "Medem, Inc.", /* 24369 */ "Chang Cheng Information consultant Co., LTD", /* 24370 */ "London Business School", /* 24371 */ "Exiis Corporation", /* 24372 */ "information unlimited", /* 24373 */ "Life Sciences Collaborative Access Team", /* 24374 */ "Aleksandar Milivojevic", /* 24375 */ "Landeshauptstadt Muenchen", /* 24376 */ "Nassauische Sparkasse", /* 24377 */ "Kizoom Ltd", /* 24378 */ "Tracewell Power", /* 24379 */ "certegy", /* 24380 */ "Joachim Uhr", /* 24381 */ "CH2M HILL, Ltd.", /* 24382 */ "Orange Cable Corporation", /* 24383 */ "Caerus, Inc.", /* 24384 */ "CryptGuard", /* 24385 */ "STM Networks, Inc", /* 24386 */ "Software-Engineering Fabiani", /* 24387 */ "Washington State Bar Association", /* 24388 */ "Suzhou Keda Technology Company, Ltd.", /* 24389 */ "IRI Communications, Inc.", /* 24390 */ "DoremiLabs, inc.", /* 24391 */ "Flexagonal Systems Ltd", /* 24392 */ "Office National des Forets", /* 24393 */ "Concurrent Technologies Plc.", /* 24394 */ "Datamat S.p.a.", /* 24395 */ "Xinjiang Sailing Information Technology Co., Ltd", /* 24396 */ "Libertas Solucoes em T.I. LTDA", /* 24397 */ "Espirito Santo Centrais Eletricas S.A", /* 24398 */ "Telsource Corporation", /* 24399 */ "TNS Business Solutions S.A.", /* 24400 */ "Kanton Basel-Stadt", /* 24401 */ "Omgeo LLC", /* 24402 */ "Ministerio da Cultura", /* 24403 */ "DroidOS Project", /* 24404 */ "TC Software, Inc", /* 24405 */ "Dynamic Biometrics Ltd.", /* 24406 */ "OnAir USA, Inc.", /* 24407 */ "Video Technics Inc.", /* 24408 */ "Rising System Inc.", /* 24409 */ "WHEEL Sp. z o.o.", /* 24410 */ "Multi Service Forum", /* 24411 */ "Bundesamt für Verbraucherschutz und Lebensmittelsicherheit", /* 24412 */ "University of Cambridge, Department of Archaeology", /* 24413 */ "CORE CORPORATION", /* 24414 */ "Unimatrix-One", /* 24415 */ "NC Interactive", /* 24416 */ "Infoweapons Corporation", /* 24417 */ "Infinico Corporation", /* 24418 */ "Red Crow Group LLC", /* 24419 */ "European Airlift Centre", /* 24420 */ "Roweb Development", /* 24421 */ "Information Management Services", /* 24422 */ "Xtek Computer", /* 24423 */ "IDSRDL", /* 24424 */ "Monksoft", /* 24425 */ "Metavize, Inc", /* 24426 */ "Coyote Point Systems, Inc", /* 24427 */ "Nusoft System Inc.", /* 24428 */ "Mangold Elektronik", /* 24429 */ "Red Earth Systems AB", /* 24430 */ "ACCEL Instruments GmbH", /* 24431 */ "UIIP NASB", /* 24432 */ "Yunet International D.O.O.", /* 24433 */ "Ohio Bureau of Workers' Compensation", /* 24434 */ "Ubitech Systems Inc", /* 24435 */ "Power Distribution, Inc.", /* 24436 */ "Deightime, LLC", /* 24437 */ "OAO RoEduNet", /* 24438 */ "JBG/Development Group, L.L.C.", /* 24439 */ "Xsigo Systems", /* 24440 */ "oddbit.com", /* 24441 */ "smartx GmbH", /* 24442 */ "Colby Sas", /* 24443 */ "UniBridge AS", /* 24444 */ "Carsten Heinrici", /* 24445 */ "TILIAR Services", /* 24446 */ "St Basil's Homes", /* 24447 */ "WEB.DE GmbH", /* 24448 */ "Ketsujin Studios", /* 24449 */ "AlphaGeek, Inc.", /* 24450 */ "Transitional Data Services, Inc.", /* 24451 */ "AXI", /* 24452 */ "Bank Hapoalim ltd.", /* 24453 */ "Schenker-Joyau", /* 24454 */ "Isotoma Limited", /* 24455 */ "CODA Plc", /* 24456 */ "BWMS Soluções Móveis Ltda", /* 24457 */ "Wise Telecomunicações Ltda.", /* 24458 */ "Saskatchewan Wheat Pool Inc.", /* 24459 */ "Fortean Technologies, Inc.", /* 24460 */ "Advanced Solutions International, Inc.", /* 24461 */ "E-Sauce Limited", /* 24462 */ "Banco de Costa Rica", /* 24463 */ "First Citizens Bank", /* 24464 */ "BELNET", /* 24465 */ "move.L consulting", /* 24466 */ "walkgame", /* 24467 */ "LK PRODUKT CZ a.s.", /* 24468 */ "University of Leeds", /* 24469 */ "Boston Maine Airways Corp.", /* 24470 */ "Omniphasic Institute LLC", /* 24471 */ "University of Virginia's College at Wise", /* 24472 */ "NetMedia, Inc.", /* 24473 */ "Jacobacci", /* 24474 */ "Optena Corporation", /* 24475 */ "Server-side Systems Ltd", /* 24476 */ "eenterphace", /* 24477 */ "megatrade corp.", /* 24478 */ "E.ON Business Services Czech Republic s.r.o.", /* 24479 */ "oncampusuk", /* 24480 */ "Warsaw Data Center Sp. z o.o.", /* 24481 */ "Light Backup Services", /* 24482 */ "ISO New England Inc.", /* 24483 */ "Advanced Broadcast Components Ltd.", /* 24484 */ "webmasters akademie GmbH", /* 24485 */ "Micromedia International", /* 24486 */ "Bulletproof Solutions Inc", /* 24487 */ "United Solutions International", /* 24488 */ "brut", /* 24489 */ "The Phone House Telecom GmbH", /* 24490 */ "Asociación Centro de Cooperación Interbancaria", /* 24491 */ "Consorzio Torino Time", /* 24492 */ "Safend Ltd.", /* 24493 */ "Extra Prof S.R.L.", /* 24494 */ "comundus Unternehmensberatung GmbH", /* 24495 */ "Western Telematic Inc.", /* 24496 */ "KMD.COM.TW", /* 24497 */ "Interprise (Pty) Ltd", /* 24498 */ "European Aviation Safety Agency", /* 24499 */ "MorkoM GmbH", /* 24500 */ "Green Hat Consulting Ltd.", /* 24501 */ "Wandering Barque", /* 24502 */ "ICONICS, Inc.", /* 24503 */ "CENTRÁL Mosodák Szolgáltató Részvénytársaság", /* 24504 */ "Emerging Systems", /* 24505 */ "Osaki Electric co.,ltd.", /* 24506 */ "Peadar Grant", /* 24507 */ "StagniNET", /* 24508 */ "Commonwealth of Massachusetts", /* 24509 */ "SHANGHAI SIMED TECH LTD.", /* 24510 */ "FlowInspect SpA", /* 24511 */ "Beijing Hugeland Technologies co.,Ltd.", /* 24512 */ "Finnish Game and Fisheries Research Institute", /* 24513 */ "Rivulet Communications, Inc.", /* 24514 */ "ROC Software Systems, Inc.", /* 24515 */ "Conair Corporation", /* 24516 */ "LTIA", /* 24517 */ "Great-West Life & Annuity Insurance Company", /* 24518 */ "Trustwave Holdings, Inc.", /* 24519 */ "Tokash Consulting Inc.", /* 24520 */ "SupplyFX, Inc", /* 24521 */ "PT. Excelcomindo Pratama, Tbk.", /* 24522 */ "infeurope S.A.", /* 24523 */ "RheinEnergie AG", /* 24524 */ "Twisted Pair Solutions, Inc.", /* 24525 */ "St James the Great R.C Primary & Nursery School", /* 24526 */ "commax Co.,Ltd.", /* 24527 */ "ProgramDuon AB", /* 24528 */ "Systembetreuung.com", /* 24529 */ "Universidade Federal do Amazonas", /* 24530 */ "Metis Communication Co., Ltd", /* 24531 */ "Intelliguard I.T.", /* 24532 */ "Akvi-Patent Co.", /* 24533 */ "Gordano Ltd", /* 24534 */ "MD Systems", /* 24535 */ "DAS", /* 24536 */ "NNMI", /* 24537 */ "Morning", /* 24538 */ "IST Holdings (Pty) Ltd.", /* 24539 */ "Betty TV Entwicklungs GmbH", /* 24540 */ "Beijing GrandRole Software Co.,Ltd.", /* 24541 */ "Albert-Einstein-Gymnasium", /* 24542 */ "Black Eyed Moon", /* 24543 */ "JSC \"Eltel\"", /* 24544 */ "Ursus Technologies, Inc.", /* 24545 */ "ServerCave, Inc.", /* 24546 */ "Linux Users Group Singapore", /* 24547 */ "OutSys snc", /* 24548 */ "Triple-m Systems AG", /* 24549 */ "edoras GmbH & Co. KG", /* 24550 */ "CPU d.o.o.", /* 24551 */ "Inverse Path Ltd.", /* 24552 */ "Prompttec Product Management GmbH", /* 24553 */ "Church of the Nazarene", /* 24554 */ "RACKMASTER SYSTEMS INC.", /* 24555 */ "Starwave Technologies,Inc.", /* 24556 */ "Obcanske sdruzeni HKfree", /* 24557 */ "Arcade ICT BV", /* 24558 */ "Net Tecnologies", /* 24559 */ "inode GmbH", /* 24560 */ "Celletra Ltd.", /* 24561 */ "Bridge Technologies Co AS", /* 24562 */ "Kerfi AB Avdelning Norge", /* 24563 */ "HOLON Corp.", /* 24564 */ "Yuba Community College District", /* 24565 */ "koreanair", /* 24566 */ "YIT Corporation", /* 24567 */ "DawnSpill Ltd.", /* 24568 */ "directnews AG", /* 24569 */ "OpenWired", /* 24570 */ "uniwan.be", /* 24571 */ "Totaltel Telecommunication Ltd.", /* 24572 */ "Massachusetts Board of Library Commissioners", /* 24573 */ "Opsera Ltd.", /* 24574 */ "Tranzeo Wireless Technologies Inc.", /* 24575 */ "HL7 Lithuania", /* 24576 */ "Tosharecomu LLC", /* 24577 */ "IDSignet", /* 24578 */ "Australian Style Pty Ltd", /* 24579 */ "TietoEnator Broadcasting IT Oy", /* 24580 */ "Zemp Informatik", /* 24581 */ "credativ GmbH", /* 24582 */ "Guerrier", /* 24583 */ "Nagoya University", /* 24584 */ "Cassiano Morgado de Aquino - ME", /* 24585 */ "BA Systems", /* 24586 */ "Judson College", /* 24587 */ "Automatic IT Corporation", /* 24588 */ "Redoc Inc.", /* 24589 */ "Bristol Technology Inc.", /* 24590 */ "Marchex, Inc.", /* 24591 */ "Brazos County, Texas", /* 24592 */ "Think Zone S.C.", /* 24593 */ "MYOB Australia E1 Pty Ltd", /* 24594 */ "safari video networks llc.", /* 24595 */ "Ascent Technology, Inc.", /* 24596 */ "NRW.BANK", /* 24597 */ "NC Cable Pty Ltd t/as Neighbourhood Cable", /* 24598 */ "Downey Savings and Loan Association, F.A.", /* 24599 */ "EDI Branch,Shanghai Telecom Corporation Ltd.", /* 24600 */ "Premicare AB", /* 24601 */ "Siemens Com EN PSY DB", /* 24602 */ "Peavey Electronics Corporation", /* 24603 */ "CosmosKey", /* 24604 */ "Owl Computing Technologies, Inc.", /* 24605 */ "The People's Republic of Ames", /* 24606 */ "Drystone", /* 24607 */ "Centre hospitalier de Lagny Marne la vallée", /* 24608 */ "R. S. Software (India) Ltd.", /* 24609 */ "gemeentebestuur sint-gillis-waas", /* 24610 */ "Baptist Memorial Health Care Corporation", /* 24611 */ "Fujitsu Hong Kong Ltd.", /* 24612 */ "Kingston University", /* 24613 */ "Jakota Design Group GmbH", /* 24614 */ "b.comp GmbH", /* 24615 */ "CROSSPOiNT", /* 24616 */ "NMS Software, Inc.", /* 24617 */ "BOXALINO AG", /* 24618 */ "MOSDAN Technology Co.,Ltd", /* 24619 */ "Tecnosis, S.A.", /* 24620 */ "Tazz Networks Inc.", /* 24621 */ "netCo GmbH Hamburg", /* 24622 */ "Samsung Thales Co., Ltd.", /* 24623 */ "EuroCableLabs", /* 24624 */ "Luxcore Optronics, Inc.", /* 24625 */ "Lime Brokerage LLC", /* 24626 */ "Vitas", /* 24627 */ "CXR Larus Corporation", /* 24628 */ "Telio AS", /* 24629 */ "Skinkers ltd", /* 24630 */ "mediaproxy pty ltd", /* 24631 */ "CorEdge Networks, Inc.", /* 24632 */ "Toyo Radio Systems Co.,Ltd.", /* 24633 */ "Ericpol Telecom sp. z o.o.", /* 24634 */ "ALPS Electric Europa GmbH", /* 24635 */ "XPass Technologies Co., Ltd", /* 24636 */ "NETWAVE CO., LTD.", /* 24637 */ "JotSpot Inc.", /* 24638 */ "Elecom scsi", /* 24639 */ "Nova Technologies", /* 24640 */ "Allodial Solutions, Inc.", /* 24641 */ "University of Sarajevo - Faculty of Electrical Engineering", /* 24642 */ "Cedval Info inc.", /* 24643 */ "Applied Broadband, Inc.", /* 24644 */ "e-DMZ Security, LLC.", /* 24645 */ "Fonner", /* 24646 */ "\"NTC-Atlas\"", /* 24647 */ "SL EDV-Dienstleistungen", /* 24648 */ "MainSkill Technologies GmbH&Co.KG", /* 24649 */ "Control Systems srl", /* 24650 */ "RongJi Network Security Technology Co., Ltd", /* 24651 */ "Everbee Networks", /* 24652 */ "Studec", /* 24653 */ "NPO TrustGear", /* 24654 */ "Applied Broadband, Inc.", /* 24655 */ "Pre-Emptive Limited", /* 24656 */ "TCSYS Limited", /* 24657 */ "intivo", /* 24658 */ "Caringo, Inc.", /* 24659 */ "Rapid Mobile (Pty) Ltd", /* 24660 */ "WM-data Infra Solutions AB", /* 24661 */ "Digital Instruments S.r.l.", /* 24662 */ "Norventure Ltda.", /* 24663 */ "Delaware Technical and Community College", /* 24664 */ "BytePark", /* 24665 */ "Camelcom", /* 24666 */ "Atlanta Technical Consultants, LLC", /* 24667 */ "Quay Security Ltd.", /* 24668 */ "Beijing Mobile Interactive Co. LTD.", /* 24669 */ "Gemini Observatory", /* 24670 */ "Vienna University", /* 24671 */ "Watkins MFG Inc.", /* 24672 */ "ServerEngines LLC", /* 24673 */ "Linzer Technikum - LITEC", /* 24674 */ "Nordh Sistemas de Controle Ltda", /* 24675 */ "Applied Voice & Speech Technologies, Inc.", /* 24676 */ "NexGen Communications, LLC.", /* 24677 */ "Oklahoma City University", /* 24678 */ "China Sports Lottery Printing(Beijing) Co. Ltd.", /* 24679 */ "Bradmark Technologies, Inc.", /* 24680 */ "QNAP SYSTEMS, INC", /* 24681 */ "SAT", /* 24682 */ "Hutchison 3G Austria GmbH", /* 24683 */ "Helsinki Business Polytechnic", /* 24684 */ "Omada A/S", /* 24685 */ "PROFIBUS Nutzerorganisation e.V.", /* 24686 */ "Integrated Broadband Services, LLC", /* 24687 */ "C. & H. Euser Transport B.V.", /* 24688 */ "WAR Ink", /* 24689 */ "Japan Communication Equipment Co.,Ltd.", /* 24690 */ "Beijing GoodMedia Co. LTD.", /* 24691 */ "Ask Jeeves (Hangzhou) Limited", /* 24692 */ "Firebrick Ltd.", /* 24693 */ "Technische Universiteit Eindhoven", /* 24694 */ "Prodemge - Companhia de Tecnologia da Informação do Estado de Minas Gerais", /* 24695 */ "Falkin Systems LLC", /* 24696 */ "Canal de Isabel II", /* 24697 */ "WH Trading, LLC", /* 24698 */ "AGB Nielsen Media Research", /* 24699 */ "Prolon Control Systems", /* 24700 */ "Spitzenverbände der landwirtschaftlichen Sozialversicherung", /* 24701 */ "CLS Services Ltd", /* 24702 */ "Sven Meyer IT-Services", /* 24703 */ "Informatikzentrum Landesverwaltung Baden-Württemberg", /* 24704 */ "Clal Insurance Ltd", /* 24705 */ "RW Consulting", /* 24706 */ "Computation Systemhaus GmbH", /* 24707 */ "University of PISA", /* 24708 */ "North York General Hospital", /* 24709 */ "OPSOFT s.r.o.", /* 24710 */ "MLK - ST informatique", /* 24711 */ "Waterstone Environmental Hydrology and Engineering, Inc.", /* 24712 */ "Grammofonartistenes forening", /* 24713 */ "Intesis Software S.L.", /* 24714 */ "Beijing Langhua Ltd.", /* 24715 */ "Start Stelcom Ltd Corp", /* 24716 */ "Berg-BSP", /* 24717 */ "Pierre Bruyère", /* 24718 */ "Cyberview Technology Ltd", /* 24719 */ "Thales Training & Simulation Ltd", /* 24720 */ "Svisj", /* 24721 */ "Kef Solutions Inc.", /* 24722 */ "SOS GmbH", /* 24723 */ "Aluria Software", /* 24724 */ "Australian Technology Information Pty Ltd", /* 24725 */ "USHER", /* 24726 */ "CleanOffer, Inc.", /* 24727 */ "pythea", /* 24728 */ "AutoGas Systems, Inc.", /* 24729 */ "Audible Magic Corp.", /* 24730 */ "Beijing Kexin Technology Co. Ltd", /* 24731 */ "Universität Bayreuth - RZ", /* 24732 */ "Summit Computer Systems, Inc.", /* 24733 */ "cintech", /* 24734 */ "Gunnebo AB", /* 24735 */ "Narcommunications", /* 24736 */ "ION R-D Elektronika Bt.", /* 24737 */ "Cablecom GmbH", /* 24738 */ "Slaski Urzad Wojewodzki", /* 24739 */ "ARFWorks", /* 24740 */ "MDT Inc.", /* 24741 */ "Danish Ministry of the Environment", /* 24742 */ "Memorex Telex Japan Ltd.", /* 24743 */ "a2 system", /* 24744 */ "TVWorks", /* 24745 */ "Oberto Sausage Company", /* 24746 */ "Capella Education Company", /* 24747 */ "TPSA LTD.", /* 24748 */ "Scrutable Systems, Inc.", /* 24749 */ "Unassigned", /* 24750 */ "Cluster-Works GbR", /* 24751 */ "SyncIO oHG", /* 24752 */ "SSC Publications Inc.", /* 24753 */ "SIRCA Ltd", /* 24754 */ "Satellite Music Australia Pty Limited", /* 24755 */ "PARTAD", /* 24756 */ "WiMAX Forum", /* 24757 */ "Brightwire Media", /* 24758 */ "Panacya Inc", /* 24759 */ "ILS Technology LLC", /* 24760 */ "Euro/IP B.V.", /* 24761 */ "Smart and Final Stores Corporation", /* 24762 */ "rrothos.com", /* 24763 */ "IRIS Corp Bhd", /* 24764 */ "Aylus Networks, Inc.", /* 24765 */ "Spiceberry", /* 24766 */ "NOX SYSTEMS AG", /* 24767 */ "Pott & Körner", /* 24768 */ "Acronis, Inc.", /* 24769 */ "IZALL.COM Ltd.", /* 24770 */ "Intercooperation", /* 24771 */ "SolidX AB", /* 24772 */ "SG GENIKI BANK S.A.", /* 24773 */ "World Health Organization", /* 24774 */ "Aviareto Limited", /* 24775 */ "Brasil Telecom S/A", /* 24776 */ "Ingenious Corporation Ltd.", /* 24777 */ "TenXc Wireless Inc.", /* 24778 */ "SeaNet Technologies, Inc.", /* 24779 */ "SBIN Systems", /* 24780 */ "A.F.P.B.T.P. du Calvados", /* 24781 */ "TetraNed", /* 24782 */ "Wola Info S.A.", /* 24783 */ "Logintas AG", /* 24784 */ "Luganda Group, Inc", /* 24785 */ "AsteriskAD.com", /* 24786 */ "TU Dresden, Chair of Road Design", /* 24787 */ "Itilon Pty Ltd", /* 24788 */ "Teletech d.o.o.", /* 24789 */ "Handmade Mobile Entertainment", /* 24790 */ "InZon Corp", /* 24791 */ "Red Oxygen Pty Ltd", /* 24792 */ "GSTeletech Co.,Ltd.", /* 24793 */ "Federated Department Stores", /* 24794 */ "blue elephant systems GmbH", /* 24795 */ "Bundesärztekammer", /* 24796 */ "IMSEC GmbH", /* 24797 */ "data-complex gmbh", /* 24798 */ "App-Line", /* 24799 */ "Apogee Network Systems & Consulting, LLC", /* 24800 */ "MTI co. LTD", /* 24801 */ "Saratoga Systems, Inc", /* 24802 */ "nu.org", /* 24803 */ "Akorri Networks, Inc.", /* 24804 */ "Bankoa Credit Agricole", /* 24805 */ "Tern Systems Inc.", /* 24806 */ "RISO KAGAKU CORPORATION", /* 24807 */ "EODP Section ( For Testing Only)", /* 24808 */ "Manic Productions", /* 24809 */ "Innerspace Ltd.", /* 24810 */ "Robatech AG", /* 24811 */ "tribaldi GmbH", /* 24812 */ "chellomedia services Ltd", /* 24813 */ "Yinhoo Software Inc.", /* 24814 */ "Golzari IT-Consultancy", /* 24815 */ "Asoka USA Corporation", /* 24816 */ "TuVox Inc", /* 24817 */ "Micro Industries Inc.", /* 24818 */ "CARDIONICS SA", /* 24819 */ "Oskarshamns Konverterings AB", /* 24820 */ "TELEFUNKEN Radio Communication Systems GmbH & Co. KG", /* 24821 */ "Instituto Nacional de Estadistica", /* 24822 */ "Amey Datel", /* 24823 */ "NightStorm Software Systems, Inc.", /* 24824 */ "Creighton University", /* 24825 */ "Weyerhaeuser", /* 24826 */ "Bieles Stano", /* 24827 */ "Speedway Internet Service SC LTDA", /* 24828 */ "Estacado Systems, LLC", /* 24829 */ "THOTT Solutions", /* 24830 */ "Sirit Technologies Inc.", /* 24831 */ "Mi5 Inc.", /* 24832 */ "Eliteitminds Technologies Inc.", /* 24833 */ "KAT Project", /* 24834 */ "University of Ostrava", /* 24835 */ "Johannes Kapune GbR", /* 24836 */ "Sobha Renaissance Information Technology Private Limited", /* 24837 */ "Danbury Health Systems", /* 24838 */ "Universidade Federal Fluminense", /* 24839 */ "David Ross", /* 24840 */ "Red [E] Entertainment Group", /* 24841 */ "Gravitime", /* 24842 */ "Halier", /* 24843 */ "Petroleum Convenience Alliance for Technology Standards, Inc.", /* 24844 */ "JSC institute \"Promstrojniiproject\"", /* 24845 */ "Scivo Technology Co. Ltd.", /* 24846 */ "International Criminal Court - Cour Penale Internationale", /* 24847 */ "bollcons", /* 24848 */ "ELITNET, Ltd.", /* 24849 */ "Mercantile Network Brasil, Ltda.", /* 24850 */ "Hillsborough Community College", /* 24851 */ "Phihong USA", /* 24852 */ "Komerccentrs DATI grupa", /* 24853 */ "Pacific Star Communications", /* 24854 */ "Sensonxi Inc.", /* 24855 */ "MDS Pharma Services", /* 24856 */ "VECTORsgi", /* 24857 */ "Vendetta Performance Limited", /* 24858 */ "Shanghai PONX technology com.,Ltd.", /* 24859 */ "tosker.net", /* 24860 */ "StudyStack", /* 24861 */ "Qualimedic.com AG", /* 24862 */ "MTI Technology GmbH", /* 24863 */ "Link GmbH", /* 24864 */ "Cramer Systems Ltd", /* 24865 */ "Hans Turck GmbH & Co. KG", /* 24866 */ "Goldsmiths College, University of London", /* 24867 */ "Technoface Corporation", /* 24868 */ "KLab Inc.", /* 24869 */ "ZE PAK SA", /* 24870 */ "Webroot Software, Inc.", /* 24871 */ "H-D-H", /* 24872 */ "Procesamiento Digital y Sistemas, S.L.", /* 24873 */ "GO Networks, Inc.", /* 24874 */ "Andxor Soluzioni Informatiche S.r.l.", /* 24875 */ "Atlas Advanced Internet Solutions Ltd.", /* 24876 */ "Informatica y Comunicaciones Avanzadas, S.L.", /* 24877 */ "Mercurio Comunicaciones", /* 24878 */ "Gi Gesundheitsinformatik GmbH", /* 24879 */ "DIRECCION DE IMPUESTOS Y ADUANAS NACIONALES", /* 24880 */ "CERIST", /* 24881 */ "Alcatel Japan Ltd.", /* 24882 */ "Vertigo Media, LLC", /* 24883 */ "Toneware Technology co. Ltd.", /* 24884 */ "Banca Intesa AD Beograd", /* 24885 */ "Eigil Bjørgum", /* 24886 */ "Parlamento de Galicia", /* 24887 */ "Malden Electronics Ltd.", /* 24888 */ "IB Technologies Sdn. Bhd.", /* 24889 */ "Extant Solutions", /* 24890 */ "Instituto Tecnológico y de Estudios Superiores de Occidente A.C.", /* 24891 */ "Great Atlantic and Pacific Tea Company, Inc.", /* 24892 */ "GE Intelligent Platforms, Inc.", /* 24893 */ "PantheraNet", /* 24894 */ "Medifacts International Inc.", /* 24895 */ "Microdental Laboratories", /* 24896 */ "Indel Industria Eletronica Ltda", /* 24897 */ "d&b audiotechnik AG", /* 24898 */ "Agama Technologies AB", /* 24899 */ "Aurora Networks (GoBackTV)", /* 24900 */ "Future Infonet", /* 24901 */ "Astech Corporation", /* 24902 */ "Corporación Politécnica Nacional de Colombia", /* 24903 */ "Skyrecon Systems SA", /* 24904 */ "Nextsense Ltd", /* 24905 */ "Electronic Solutions Ltd.", /* 24906 */ "Infopact Netwerkdiensten B.V.", /* 24907 */ "Stored IQ, Inc.", /* 24908 */ "Secure-24, LLC", /* 24909 */ "OOO \"ElitStudio\"", /* 24910 */ "Foxbyte Ltd", /* 24911 */ "ASELSAN INC.", /* 24912 */ "Cook Group Incorporated", /* 24913 */ "WSOFT, Lda.", /* 24914 */ "iG Internet Group do Brasil Ltda", /* 24915 */ "Essent Corporation", /* 24916 */ "Intermedix Corporation", /* 24917 */ "Radmer", /* 24918 */ "Web Wizard Design", /* 24919 */ "Our Help Desk", /* 24920 */ "MAINDATA, spol. s r.o.", /* 24921 */ "VoX Communications, Inc.", /* 24922 */ "Shodor Education Foundation, Inc", /* 24923 */ "Unicentrix Solutions", /* 24924 */ "Jordet", /* 24925 */ "LAIKA, Inc.", /* 24926 */ "Exegy, Inc.", /* 24927 */ "WaterEd Australia Pty Ltd", /* 24928 */ "vt100 digital solutions", /* 24929 */ "synedra information technologies GmbH", /* 24930 */ "Mixed Signals, Inc.", /* 24931 */ "Mcomms Design", /* 24932 */ "angel bosch", /* 24933 */ "ISCG Ltd.", /* 24934 */ "TetraNed", /* 24935 */ "Snecma Propulsion Solide, Groupe SAFRAN", /* 24936 */ "Universal Display and Fixtures Company", /* 24937 */ "Technolabs S.p.A.", /* 24938 */ "qpass", /* 24939 */ "Department of Computer Science, National Chiao Tung University", /* 24940 */ "EMKA Technologies SA", /* 24941 */ "Kyle Fox DBA DigitalFennec Networks", /* 24942 */ "Rigpa", /* 24943 */ "Kreuzinger IT-Trilogie", /* 24944 */ "ParaSun Technologies Inc.", /* 24945 */ "Corredoira Abogados", /* 24946 */ "Shanalyst Corporation", /* 24947 */ "Mitsubishi Materials Corporation", /* 24948 */ "Sentillion, Inc", /* 24949 */ "Uniform Industrial Corp.", /* 24950 */ "Industrial Video and Control, LLC", /* 24951 */ "Cool Bananas Limited", /* 24952 */ "Numachi", /* 24953 */ "Mobile Complete", /* 24954 */ "SyncCast", /* 24955 */ "Innovative Electronic Designs, Inc.", /* 24956 */ "Onoclea", /* 24957 */ "Ascent Media Group", /* 24958 */ "Pankerl - Media", /* 24959 */ "The Sip-router Project", /* 24960 */ "Tail-f Systems AB", /* 24961 */ "Atlantic Harbour Limited", /* 24962 */ "SiliconVortex", /* 24963 */ "Shanghai Qianjin Electronic Equipment Co.,ltd", /* 24964 */ "Picdar Technology Limited", /* 24965 */ "Greenwich Hospital", /* 24966 */ "EPCON Sp. z o.o.", /* 24967 */ "Beijing SecuWard Information Security Technology Co.,Ltd", /* 24968 */ "Wharfe Electronic Data Ltd", /* 24969 */ "InterWay, s.r.o.", /* 24970 */ "GIDE LOYRETTE NOUEL", /* 24971 */ "Lipman Electronic Engineering Ltd", /* 24972 */ "Guilin Jharden Communication CO., LTD", /* 24973 */ "Lootah", /* 24974 */ "WINGS Ltd.", /* 24975 */ "OmegaSphere Inc.", /* 24976 */ "Sxip Identity", /* 24977 */ "Martin Henschke Geraetebau", /* 24978 */ "madpilot.net", /* 24979 */ "CERVICEM", /* 24980 */ "Amex Information Technologies Ltd.", /* 24981 */ "Fiebig+Team GmbH", /* 24982 */ "Tod Lewin", /* 24983 */ "Kestral Computing Pty Ltd", /* 24984 */ "Xeround Systems", /* 24985 */ "Bjørn Ruberg konsulenttjenester", /* 24986 */ "Ortiva Wireless Inc.", /* 24987 */ "Singh Travels", /* 24988 */ "Synalogic e.K.", /* 24989 */ "Bluestem Ltd.", /* 24990 */ "CardContact Software & System Consulting", /* 24991 */ "Toko University", /* 24992 */ "MySQL, Inc.", /* 24993 */ "nabios GmbH", /* 24994 */ "Integratech S.A.", /* 24995 */ "SAFE Health", /* 24996 */ "Cirrologic Ltd", /* 24997 */ "SBA Technologies, Inc", /* 24998 */ "VATSIM.net", /* 24999 */ "ConSol* Consulting & Solutions Software GmbH", /* 25000 */ "Codra Ingenierie Informatique", /* 25001 */ "VistiC Ltd.", /* 25002 */ "SQUILD", /* 25003 */ "AEGON Magyarorszag Rt.", /* 25004 */ "sevecek", /* 25005 */ "NVision Czech Republic a.s.", /* 25006 */ "Precesamiento Digital y Sistemas S.L.", /* 25007 */ "I.T.E.N.O.S. GmbH - Mobile Solutions", /* 25008 */ "Sysworksoft", /* 25009 */ "Bedag Informatique SA", /* 25010 */ "Cranite Systems Inc.", /* 25011 */ "Minux Bt.", /* 25012 */ "RS Consulting", /* 25013 */ "Visimetrics (UK) Ltd", /* 25014 */ "2PM Technologies Ltd", /* 25015 */ "Vizrt/Ardendo AB", /* 25016 */ "CertSign", /* 25017 */ "Proxyconn Ukraine", /* 25018 */ "ProfiTrade 90 Ltd.", /* 25019 */ "MobilMail Ltd.", /* 25020 */ "Devon County Council", /* 25021 */ "Medox Exchange, Inc.", /* 25022 */ "Cyberspace Technology Corporation Ltd.", /* 25023 */ "Auriga", /* 25024 */ "Concentrum, Inc.", /* 25025 */ "Linear Equipamentos Eletrônicos S.A.", /* 25026 */ "Billerud AB", /* 25027 */ "WebService Sp. z o.o.", /* 25028 */ "Antek Healthware LLC", /* 25029 */ "Ward-Beck Systems", /* 25030 */ "Network Orange Inc", /* 25031 */ "DACI Comércio e Serviços de Equipamentos de Informática Ltda.", /* 25032 */ "Naztec, Inc.", /* 25033 */ "Dima Ltda.", /* 25034 */ "JINAN DEAN COMPUTER TECHNOLOGY CO LTD", /* 25035 */ "Kantonsschule Romanshorn", /* 25036 */ "Novovia", /* 25037 */ "denver health", /* 25038 */ "vitroconnect systems GmbH", /* 25039 */ "Keytronix GmbH.", /* 25040 */ "Microsol Ltd.", /* 25041 */ "JDM Software BV", /* 25042 */ "litts.net", /* 25043 */ "CapWIN", /* 25044 */ "MET/Administration wallonne/Belgique", /* 25045 */ "GlobalTouch Telecom", /* 25046 */ "Fluid4 Studios", /* 25047 */ "Synchronica PLC", /* 25048 */ "Opengear Inc.", /* 25049 */ "IT Knows ApS", /* 25050 */ "Pythagoras Software (UK)", /* 25051 */ "Idya Bt.", /* 25052 */ "Ruckus Wireless, Inc.", /* 25053 */ "Carillon Information Security Inc.", /* 25054 */ "Oxford ArchDigital", /* 25055 */ "Hungarian Television Corporation", /* 25056 */ "Rural Technologies Inc", /* 25057 */ "Bain Capital LLC", /* 25058 */ "Abicom International", /* 25059 */ "pbxnsip Inc.", /* 25060 */ "Domaingruppe Riemann2000.de", /* 25061 */ "MessageOne Inc", /* 25062 */ "American Tribu Corp", /* 25063 */ "Women's Health Services", /* 25064 */ "Identity Engines Inc.", /* 25065 */ "PELCO", /* 25066 */ "G Central", /* 25067 */ "Axistech", /* 25068 */ "LISA! Reisen GmbH", /* 25069 */ "MULTICERT - Servicos de Certificacao Electronica S.A.", /* 25070 */ "Teradici Corporation", /* 25071 */ "LFW ENTERPRISES, INC.", /* 25072 */ "Thinking Phone Networks, Inc.", /* 25073 */ "Presbyterian Healthcare Services", /* 25074 */ "Inventec Multimedia & Telecom(Tianjin) Co.,Ltd.", /* 25075 */ "45RU TRUST", /* 25076 */ "BGC Australia Pty Ltd", /* 25077 */ "MKQ Internetservice", /* 25078 */ "Gyanasoft Inc", /* 25079 */ "Beluga Software, Inc.", /* 25080 */ "Universidad de Chile", /* 25081 */ "FishNet Connect", /* 25082 */ "Sirius Creations", /* 25083 */ "Argent Productions", /* 25084 */ "Metrocast Cablevision LLC", /* 25085 */ "Sydney Missionary and Bible College Ltd.", /* 25086 */ "HWS", /* 25087 */ "Transactional Records Access Clearinghouse", /* 25088 */ "DSK Bank PLC", /* 25089 */ "Ambientia Oy", /* 25090 */ "Piranha Messtechnik GmbH & Co. KG", /* 25091 */ "Aptic AB", /* 25092 */ "GreysonBaines Innovation", /* 25093 */ "Vonage Holdings Corp", /* 25094 */ "XenIT GmbH", /* 25095 */ "Maimonides Medical Center", /* 25096 */ "TJX Companies", /* 25097 */ "Reflectent Software, Inc.", /* 25098 */ "H.E.B. Company Inc.", /* 25099 */ "Hochschule Vechta", /* 25100 */ "Dataarmor Pvt Ltd.", /* 25101 */ "Phyxia Networks", /* 25102 */ "Netsol International Argentina S.A.", /* 25103 */ "Gannett Co., Inc.", /* 25104 */ "Cable & Wireless Jamaica", /* 25105 */ "CSE Sh.p..k.", /* 25106 */ "Stan Winston Studio", /* 25107 */ "iRadeon, Inc.", /* 25108 */ "Wireless Edge Canada Inc.", /* 25109 */ "Vanguard Technology Corp.", /* 25110 */ "VODCA", /* 25111 */ "Top Gun Drywall Supply", /* 25112 */ "Konstructiv Ltd.", /* 25113 */ "SSE INFONET LTD", /* 25114 */ "Delbuilt(Pty)Ltd", /* 25115 */ "EBInteractive", /* 25116 */ "ID Innovative Datenverarbeitung GmbH", /* 25117 */ "StanaPhone LLC", /* 25118 */ "Adder Technology Limited", /* 25119 */ "SAGUAPAC", /* 25120 */ "Temex Sync", /* 25121 */ "Hauk & Sasko GmbH", /* 25122 */ "Barco Orthogon GmbH", /* 25123 */ "Trade-On-Technology Holdings", /* 25124 */ "ALWIL Software", /* 25125 */ "Jackson State University", /* 25126 */ "Radialink Corp", /* 25127 */ "BreastScreen Victoria", /* 25128 */ "SFBC Anapharm Inc.", /* 25129 */ "Scouts of Greece, 10th Group of Akropoli, Thessaloniki", /* 25130 */ "P-tec Co., Ltd.", /* 25131 */ "Redeal Ltd", /* 25132 */ "HKU School of Professional and Continuing Education", /* 25133 */ "ComDesign Inc.", /* 25134 */ "Ministerul pentru Societatea Informațională", /* 25135 */ "Haute Ecole Arc", /* 25136 */ "Voronezh State Pedagogical University", /* 25137 */ "Alyseo", /* 25138 */ "Adept Internet (Pty) Ltd", /* 25139 */ "Institut Catholique de Toulouse", /* 25140 */ "La Poste", /* 25141 */ "IP Control Systems Ltd.", /* 25142 */ "Damovo Deutschland Gmbh & Co. KG", /* 25143 */ "Perpustakaan Institut Pertanian Bogor", /* 25144 */ "Netzwerk für Kinder- & Jugendarbeit e.V.", /* 25145 */ "Cyprus Research and Academic Network", /* 25146 */ "Internet Solutions", /* 25147 */ "Pivot3, Inc.", /* 25148 */ "National Electronics and Computer Technology Center", /* 25149 */ "KK-DENSO.Co.Ltd", /* 25150 */ "Dragontech Corporation Limited", /* 25151 */ "UpTime New Zealand Ltd.", /* 25152 */ "AvanSec", /* 25153 */ "Seeker Wireless Pty Ltd", /* 25154 */ "Unisis Solutions Corporation", /* 25155 */ "GECI GmbH", /* 25156 */ "Beckhoff Automation GmbH", /* 25157 */ "Aros Magic", /* 25158 */ "OJSC Svyazintek", /* 25159 */ "Arackal Digital Solutions Inc", /* 25160 */ "Telavox AB", /* 25161 */ "Industrias I, S.C.", /* 25162 */ "Broadband Power Solutions", /* 25163 */ "Interpay", /* 25164 */ "FMN communications GmbH", /* 25165 */ "Fachhochschule Muenster", /* 25166 */ "Genexis B.V.", /* 25167 */ "Edentity Labs Ltd", /* 25168 */ "Avco Systems Ltd", /* 25169 */ "AFA Systems srl", /* 25170 */ "Armbruster IT", /* 25171 */ "Integra Soluciones Avanzadas, S.L.", /* 25172 */ "MET-Ministère de l'Equipement et des Transports", /* 25173 */ "NetOp as", /* 25174 */ "DCN", /* 25175 */ "Familie Uhlig", /* 25176 */ "VAS \"Latvijas Pasts\"", /* 25177 */ "Trans-European Research and Education Networking Association (TERENA)", /* 25178 */ "GESA Elektronik GmbH", /* 25179 */ "Itonis Ltd.", /* 25180 */ "HEBUS SARL", /* 25181 */ "University of Tampere", /* 25182 */ "SS WorkGroup Solutions", /* 25183 */ "Zinwave Limited", /* 25184 */ "Banco Espírito Santo, S.A.", /* 25185 */ "Uwe Daube", /* 25186 */ "A.Ir.Br. Associations des Ingénieurs sortis de l'Université Libre de Bruxelles, asbl", /* 25187 */ "Bob Jones University", /* 25188 */ "INVIA", /* 25189 */ "ETI A/S", /* 25190 */ "Smart Bear Inc", /* 25191 */ "Positive Networks, Inc.", /* 25192 */ "Wireless Nomad Co-operative Inc.", /* 25193 */ "Bizanga Ltd", /* 25194 */ "Waha Oil Company", /* 25195 */ "TM Software", /* 25196 */ "eLearningRecord", /* 25197 */ "SmartServ Web Hosting & Design", /* 25198 */ "Kobe University", /* 25199 */ "TurkTel Ltd.", /* 25200 */ "Uniwell Electronics Ltd.", /* 25201 */ "Beechler Real Estate Services", /* 25202 */ "Pete Rushmere", /* 25203 */ "Prodato Integration Technology GmbH", /* 25204 */ "Movial Corporation", /* 25205 */ "Axxess Identification Limited", /* 25206 */ "JSC \"ATLAS\"", /* 25207 */ "CSC Scandihealth A/S", /* 25208 */ "CURON Inc.", /* 25209 */ "bizEbox", /* 25210 */ "Edison Electric Corp.", /* 25211 */ "Initworks B.V.", /* 25212 */ "Nexus Web AS", /* 25213 */ "Minnesota Judicial Branch", /* 25214 */ "Novacell Solutions Ltd", /* 25215 */ "ADI Video Technologies", /* 25216 */ "Nautilus Hyosung", /* 25217 */ "httv", /* 25218 */ "RPSoft", /* 25219 */ "sportcentric Systems", /* 25220 */ "Viewpoint Construction Software", /* 25221 */ "Blue Gecko Inc.", /* 25222 */ "Mindbreeze Software GmbH", /* 25223 */ "Grupo Pochteca SA de CV", /* 25224 */ "The Austin Diagnostic Clinic, P.A.", /* 25225 */ "MaxMD", /* 25226 */ "Ohio Department of Transportation", /* 25227 */ "NAV Canada", /* 25228 */ "Swedish Alliance for Middleware", /* 25229 */ "The Ohio Casualty Insurance Company", /* 25230 */ "Riverforge LLC", /* 25231 */ "Linog consulting", /* 25232 */ "ACS", /* 25233 */ "Emdeon Corporation", /* 25234 */ "Windrush Frozen Foods Ltd", /* 25235 */ "Invitrogen Corporation", /* 25236 */ "L-3 Communications/Narda Satellite Networks", /* 25237 */ "GreenLight Networks", /* 25238 */ "Tknika", /* 25239 */ "Peggy A. Pugh, MD, CPC", /* 25240 */ "Proximus Information Technologies", /* 25241 */ "ACTORS CONSULTING", /* 25242 */ "Agglut Technologies, Inc.", /* 25243 */ "BrightNet Oklahoma", /* 25244 */ "Order of St. Charbel", /* 25245 */ "South-Russia State Technical University", /* 25246 */ "DANDELION C.A.", /* 25247 */ "Solidcore Systems Inc", /* 25248 */ "Dispuut Interlink", /* 25249 */ "AnQ Systems, Ltd.", /* 25250 */ "Princeton Alliance Church", /* 25251 */ "vptechnologies srl", /* 25252 */ "MFEC Public Company Limited", /* 25253 */ "Makena Technologies, Inc.", /* 25254 */ "Broadsoft Systems", /* 25255 */ "Nable Communications, Inc.", /* 25256 */ "Sipera Systems Inc", /* 25257 */ "Randombit Consulting", /* 25258 */ "JWR Software Services Ltd", /* 25259 */ "Frauerpower!", /* 25260 */ "Westenberg & Kueppers GbR", /* 25261 */ "Network Automation", /* 25262 */ "mareco gmbh", /* 25263 */ "Propolys", /* 25264 */ "Dave Pusey - IT Services", /* 25265 */ "FUH EOS", /* 25266 */ "Virtual Synthesis", /* 25267 */ "enfon", /* 25268 */ "CFNetTools", /* 25269 */ "MeepZor Consulting", /* 25270 */ "Lotus Interworks, Inc.", /* 25271 */ "GRUPO XMARTS SA DE CV", /* 25272 */ "Konsole Network", /* 25273 */ "IT2Media GmbH", /* 25274 */ "Peter Hall", /* 25275 */ "Gear6", /* 25276 */ "Pekao Inc.", /* 25277 */ "Canon Electronics Inc.", /* 25278 */ "Nasdaq MTS", /* 25279 */ "Market Pulse International", /* 25280 */ "Westerstrand Urfabrik AB", /* 25281 */ "MDK Baden-Württemberg", /* 25282 */ "CONSEIL GENERAL DU CHER", /* 25283 */ "Taylor Made Computer Solutions Ltd", /* 25284 */ "Beheer-Net", /* 25285 */ "Open Logic Solutions Ltd.", /* 25286 */ "Megabit Informationstechnik GmbH", /* 25287 */ "onShore Development", /* 25288 */ "Alabama A&M University", /* 25289 */ "Convert Italia SpA", /* 25290 */ "Zeacom Ltd.", /* 25291 */ "Skagit County Government", /* 25292 */ "MaxMD", /* 25293 */ "EESTEC International", /* 25294 */ "Affiniti", /* 25295 */ "VeriCenter, Inc", /* 25296 */ "Hotxt Ltd", /* 25297 */ "Rohm and Haas Company", /* 25298 */ "Rodic M&B-Co d.o.o.", /* 25299 */ "OfficeNet AS", /* 25300 */ "Netauth Consulting", /* 25301 */ "Deakin University", /* 25302 */ "subnetz.computing GmbH", /* 25303 */ "Demon Netherlands", /* 25304 */ "Vodafone Holding GmbH, FPU-CEC", /* 25305 */ "Sunmine Communications", /* 25306 */ "Mintel International Ltd", /* 25307 */ "MDES", /* 25308 */ "Manchester Airport (MHT)", /* 25309 */ "Internet Society Luxembourg ASBL", /* 25310 */ "RedeDominios.com", /* 25311 */ "NexTag Inc.", /* 25312 */ "Visual Development", /* 25313 */ "New Visual Wave Cable Communications Co., LTD.", /* 25314 */ "E-wang information Systems Inc", /* 25315 */ "Karolinska Institutet", /* 25316 */ "Ixanon AB", /* 25317 */ "NEXCON Telecomunicaciones S.L.", /* 25318 */ "AccessPt Inc.", /* 25319 */ "University of Vaasa", /* 25320 */ "The American Board of Anesthesiology", /* 25321 */ "Alarius Systems LLC", /* 25322 */ "AirPatrol Corporation", /* 25323 */ "Rock Hill Telephone Company", /* 25324 */ "Trustserver S. L.", /* 25325 */ "FurreVille", /* 25326 */ "Visible World Inc.", /* 25327 */ "Deasil Systems INC", /* 25328 */ "Henfield AB", /* 25329 */ "The Nation", /* 25330 */ "NOW! Consulting GmbH", /* 25331 */ "CADLock, Inc.", /* 25332 */ "Packetframe, Inc.", /* 25333 */ "Ashantiplc Limited", /* 25334 */ "SEAMAX MANUFACTURING PTE.LTD", /* 25335 */ "DSO National Laboratories", /* 25336 */ "ChinaCache", /* 25337 */ "RK Systems", /* 25338 */ "EMC TECH CO., LTD.", /* 25339 */ "Tiroler Gebietskrankenkasse", /* 25340 */ "Immosys LLC", /* 25341 */ "IRCCS Policlinico S.Matteo", /* 25342 */ "Fachhochschule Frankfurt am Main - University of Applied Sciences", /* 25343 */ "BlackSpider Technologies Ltd.", /* 25344 */ "Conseil Général du Val d'Oise", /* 25345 */ "SAMCA", /* 25346 */ "Tetra Networking V.O.F.", /* 25347 */ "SJB Communications", /* 25348 */ "CDSw - City Data Software, s.r.o.", /* 25349 */ "Haymarket Publishing Services Limited", /* 25350 */ "AMAG Automobil- und Motoren AG", /* 25351 */ "Kuwait Meteorological Department", /* 25352 */ "Gibson, Dunn & Crutcher LLP", /* 25353 */ "Travel Svcs llc", /* 25354 */ "Shenzhen Haishuo Technologies Co.Ltd", /* 25355 */ "E2E IT Solutions Pty. Ltd.", /* 25356 */ "Dotstream", /* 25357 */ "HUBER+SUHNER AG", /* 25358 */ "Perspektiv Bredband AB", /* 25359 */ "SMACL", /* 25360 */ "Dr. Jan-Hendrik Dörner", /* 25361 */ "Headroom Broadcast GmbH", /* 25362 */ "Medical Imaging Software Amsterdam", /* 25363 */ "Studio Tre s.r.l.", /* 25364 */ "Digitum Ltd.", /* 25365 */ "Iptic Systems", /* 25366 */ "Mobile Streams PLC", /* 25367 */ "Association Crans", /* 25368 */ "Reliact Solutions S.L.", /* 25369 */ "ExtendASP LLC", /* 25370 */ "Arcitecta Pty. Ltd.", /* 25371 */ "Pegasus Consultants (SW) Ltd", /* 25372 */ "Universidade Estadual do Sudoeste da Bahia", /* 25373 */ "Universität Hamburg, Regionales Rechenzentrum / Hamburg University, Computing Center", /* 25374 */ "NextSysSecure, Inc.", /* 25375 */ "Suretec Systems Ltd.", /* 25376 */ "Bauman Moscow State Technical University", /* 25377 */ "Schrodinger, Inc.", /* 25378 */ "American Chartered Bank", /* 25379 */ "Michael D'Errico", /* 25380 */ "Rx Networks Inc.", /* 25381 */ "Nanite Services Limited", /* 25382 */ "TiChou", /* 25383 */ "Alliant Energy", /* 25384 */ "Societe anonyme de la Communication Securisee", /* 25385 */ "ELETEX Co. Ltd.", /* 25386 */ "xcurenet", /* 25387 */ "Gadget Factory Ltd.", /* 25388 */ "Westcoast University of Applied Sciences", /* 25389 */ "Ulrich Flamm", /* 25390 */ "SECURE-IT SA", /* 25391 */ "inabensa", /* 25392 */ "Alliant Technologies", /* 25393 */ "Sunflower Technologies", /* 25394 */ "Aquila, Inc.", /* 25395 */ "Digital Alchemists GmbH", /* 25396 */ "Primetime Medical Software", /* 25397 */ "GeoForschungsZentrum Potsdam", /* 25398 */ "RHnet Inc.", /* 25399 */ "InterSystems USA", /* 25400 */ "MU Net, Inc.", /* 25401 */ "FlanTel Communications", /* 25402 */ "ClearCanvas Inc.", /* 25403 */ "citadel.org (the Citadel groupware project)", /* 25404 */ "Boston Linux & Unix", /* 25405 */ "Iptivia Inc", /* 25406 */ "Engiby sàrl", /* 25407 */ "BarNet", /* 25408 */ "Superclick Networks Inc", /* 25409 */ "Technical Resources International", /* 25410 */ "Training Team Srl", /* 25411 */ "OrcaWare Technologies", /* 25412 */ "FH-Trier, University of Applied Sciences", /* 25413 */ "City of Henderson, Nevada", /* 25414 */ "crosscert", /* 25415 */ "Active Database Team", /* 25416 */ "rootKlub.org", /* 25417 */ "INED - Institut National d'Etudes Demographiques", /* 25418 */ "CompanyName", /* 25419 */ "maf", /* 25420 */ "Postini, Inc.", /* 25421 */ "Vilnius University", /* 25422 */ "Babs Paylink AB", /* 25423 */ "Norcontrol IT (Pty) Ltd", /* 25424 */ "Condor LebensversicherungsAG", /* 25425 */ "LenSoft Ltd.", /* 25426 */ "Avenda Systems, Inc.", /* 25427 */ "AGMEN", /* 25428 */ "Comarch S.A.", /* 25429 */ "Netspecialisten", /* 25430 */ "Ingenico", /* 25431 */ "ServersCheck BVBA", /* 25432 */ "HaiVision Systems Inc.", /* 25433 */ "Engineering School of Geneva EIG", /* 25434 */ "Great Lakes Internet, Inc.", /* 25435 */ "Loren Data Corp.", /* 25436 */ "Chair MMSP of Perm State Technical University", /* 25437 */ "B-one Aps", /* 25438 */ "Digital Genesis Technologies", /* 25439 */ "Radiqal, LLC", /* 25440 */ "lagis Internet Service Provider GmbH", /* 25441 */ "AIRAYA Corp", /* 25442 */ "louismc", /* 25443 */ "Fastwire", /* 25444 */ "AstralBlue", /* 25445 */ "Burn Networks Pty Ltd", /* 25446 */ "Jireh International Inc.", /* 25447 */ "Verari Systems, Inc", /* 25448 */ "Beijing Easy Broadband Technology Co.,Ltd.", /* 25449 */ "eTraintronics.com", /* 25450 */ "UFPS Tymenskoy oblasti - filial FGUP \"Pochta Rossii\"", /* 25451 */ "Sikom Software GmbH", /* 25452 */ "Seaview Support Systems Pvt Ltd", /* 25453 */ "LiComm Co., Ltd.", /* 25454 */ "Trinodal S.L.", /* 25455 */ "Wooribyul Telecom Co., Ltd.", /* 25456 */ "Schweizerische Bibliothek für Blinde und Sehbehinderte", /* 25457 */ "XtraMind Technologies GmbH", /* 25458 */ "BON.net Ltd", /* 25459 */ "ComputerLand S.A.", /* 25460 */ "PALO ALTO NETWORKS", /* 25461 */ "Applied Wireless Identifications Group, Inc", /* 25462 */ "NanShanBridge Co.Ltd", /* 25463 */ "Demarc Technology Group, LLC", /* 25464 */ "First Standards Organisation (FSO)", /* 25465 */ "Asia Bank Card Union (ABCUnion.org)", /* 25466 */ "B-Lex Information Technologies", /* 25467 */ "Fortica Ltd.", /* 25468 */ "Aliasource", /* 25469 */ "North Suburban Access Corp.", /* 25470 */ "Gridpoint Systems", /* 25471 */ "Alltek Technology Corp.", /* 25472 */ "Telelogos", /* 25473 */ "Lisis NV", /* 25474 */ "Innovant Pty Ltd", /* 25475 */ "VideoCells Ltd.", /* 25476 */ "alpha nova BetriebsgesmbH", /* 25477 */ "Local Solutions", /* 25478 */ "X-Tend", /* 25479 */ "Congruentix LLC", /* 25480 */ "Convergin Ltd.", /* 25481 */ "Global Village Data Solutions", /* 25482 */ "iScience Surgical", /* 25483 */ "AKDB", /* 25484 */ "Patentanwaltskanzlei Horns", /* 25485 */ "Asset Archives, Inc.", /* 25486 */ "Bishop Technologies, Inc.", /* 25487 */ "V2 Telecom Ltda.", /* 25488 */ "Henrik Nordstrom Consulting", /* 25489 */ "Wagner Tiefkuehlprodukte GmbH", /* 25490 */ "National Bank of the Republic of Belarus", /* 25491 */ "Ruukki", /* 25492 */ "VNUnet Europe", /* 25493 */ "Ivan Dolezal", /* 25494 */ "Optimacom Sàrl", /* 25495 */ "CEMES-CNRS", /* 25496 */ "Transbit Spolka z o.o.", /* 25497 */ "InSecMa Solutions GmbH", /* 25498 */ "GuideCom GmbH", /* 25499 */ "Interkey, Inc.", /* 25500 */ "VaultLab, Inc", /* 25501 */ "AccuRev, Inc.", /* 25502 */ "Network Integrity Systems Inc.", /* 25503 */ "St. Edward's University Inc", /* 25504 */ "SpaceNetwork", /* 25505 */ "H3C", /* 25506 */ "Japan Maritime Self-Defense Force", /* 25507 */ "narraSoft Philippines, Inc.", /* 25508 */ "C.MER", /* 25509 */ "Symedia S.A.", /* 25510 */ "SPALE NETWORKS", /* 25511 */ "simple-networks", /* 25512 */ "VirtualLink Technologies Pte. Ltd.", /* 25513 */ "yatininc", /* 25514 */ "LKH Villach", /* 25515 */ "Verizonbusiness", /* 25516 */ "Criterium Soluções em Informática Ltda", /* 25517 */ "StorCase Technology, Inc.", /* 25518 */ "Washington County School District", /* 25519 */ "Quadrics Ltd", /* 25520 */ "NextConnect Ltd", /* 25521 */ "Renko Technologies", /* 25522 */ "Homecast Co., Ltd.", /* 25523 */ "Open Source Hardware Engineering Community (OSHEC)", /* 25524 */ "TC&C Telecommunication and Computer Technology Ltd.", /* 25525 */ "IPRocess", /* 25526 */ "Nebraska Public Power District", /* 25527 */ "Laboratório Nacional de Computação Científica", /* 25528 */ "World Links", /* 25529 */ "AirDat LLC", /* 25530 */ "B2E Technologies PTY LTD", /* 25531 */ "BCA Services Ltd.", /* 25532 */ "IdentityForge, LLC.", /* 25533 */ "Lusan Systems", /* 25534 */ "Klas Ltd.", /* 25535 */ "Probaris Technologies, Inc.", /* 25536 */ "Thomas Friedl", /* 25537 */ "GNU Telephony", /* 25538 */ "Osaka University", /* 25539 */ "NetToolWorks, Inc.", /* 25540 */ "JStream Technologies, Inc.", /* 25541 */ "Ortikon Interactive Oy", /* 25542 */ "Microbit 2.0 AB", /* 25543 */ "Iptune Ltd.", /* 25544 */ "EADS-CASA", /* 25545 */ "Boots Group PLC", /* 25546 */ "VION", /* 25547 */ "OpenCraft", /* 25548 */ "STAR Group", /* 25549 */ "zhihao", /* 25550 */ "AMEC", /* 25551 */ "Poxix", /* 25552 */ "Sonas Innovation Ltd", /* 25553 */ "WiderWeb Ltd", /* 25554 */ "Social Science Research Council", /* 25555 */ "Beyond 2000 Ltd", /* 25556 */ "Xerox -ORG", /* 25557 */ "Infoblox, WinConnect", /* 25558 */ "Tivella Inc.", /* 25559 */ "Ministerio Publico do DF e Territorios", /* 25560 */ "Telecom Protection Technologies Limited", /* 25561 */ "Firmix Software GmbH", /* 25562 */ "Stadtverwaltung Duesseldorf", /* 25563 */ "T7 e.V.", /* 25564 */ "pixality GmbH", /* 25565 */ "Staatl. gepr. Inf. Markus KARG", /* 25566 */ "Cingular Wireless LLC", /* 25567 */ "Douglas Fast Net", /* 25568 */ "Points South", /* 25569 */ "Mackelprang Research", /* 25570 */ "nDosa Technologies Inc", /* 25571 */ "Columbia International College", /* 25572 */ "Point Clark Networks Ltd.", /* 25573 */ "FXC Inc.", /* 25574 */ "Bevuta", /* 25575 */ "AXMEDIS Organisation", /* 25576 */ "Norlinx, Inc", /* 25577 */ "Interchange Corporation", /* 25578 */ "Info Tech, Inc.", /* 25579 */ "Universidad de El Salvador", /* 25580 */ "Musmap Team", /* 25581 */ "Employease Inc.", /* 25582 */ "gfk", /* 25583 */ "Axzona Ltd", /* 25584 */ "Infoglobal, S.A.", /* 25585 */ "Unified Group Ltd", /* 25586 */ "Jinitech Inc.", /* 25587 */ "University of Texas Center for Agile Technology", /* 25588 */ "Comune di Cagliari", /* 25589 */ "Tecnoworld Com. Imp. Exp. Ltda.", /* 25590 */ "National Clearinghouse for Rehabilitation Training Materials", /* 25591 */ "Intercorp", /* 25592 */ "Aethernet Ltd", /* 25593 */ "Gollard", /* 25594 */ "CZ.NIC, z.s.p.o.", /* 25595 */ "DigitalSign - Certificadora Digital", /* 25596 */ "FireEye Inc.", /* 25597 */ "Gehlbach Technical Services, Inc.", /* 25598 */ "SecureNet PL", /* 25599 */ "EzValidation Inc.", /* 25600 */ "FSP Computer & Netzwerke", /* 25601 */ "Telekom Austria AG", /* 25602 */ "Locube.com", /* 25603 */ "Agos S.p.A.", /* 25604 */ "Ingenieurbuero T. Scholz", /* 25605 */ "USi", /* 25606 */ "Andritz AG", /* 25607 */ "Iritec", /* 25608 */ "StreamVision", /* 25609 */ "The SEEMIS Group", /* 25610 */ "Lafayette College", /* 25611 */ "Trilliant Networks", /* 25612 */ "CGI Concept", /* 25613 */ "Auroras Entertainment", /* 25614 */ "Computer Savvy", /* 25615 */ "Cardiac Science Corporation", /* 25616 */ "ClearCube Technology", /* 25617 */ "Omnitrol Networks, Inc.", /* 25618 */ "Ultragreen", /* 25619 */ "Ost-West Handelsbank AG", /* 25620 */ "Z Microsystems", /* 25621 */ "JANET(UK)", /* 25622 */ "OpenVAS", /* 25623 */ "Kent School District", /* 25624 */ "ChattenAssociates, Inc.", /* 25625 */ "Crufty", /* 25626 */ "Ohio Department of Public Safety", /* 25627 */ "Perot Systems Corporation", /* 25628 */ "U.S. Environmental Protection Agency", /* 25629 */ "Groupe Mutuel", /* 25630 */ "International Newspaper Network, LLC", /* 25631 */ "Thorold Alarm", /* 25632 */ "lecentre.net", /* 25633 */ "uniqueobject", /* 25634 */ "Carlo Gavazzi Computing Solutions, Inc.", /* 25635 */ "Control Alternative Solutions, Inc.", /* 25636 */ "Police Bruxelles CAPITALE Ixelles - ZP 5339", /* 25637 */ "Uniadex, Ltd.", /* 25638 */ "KMS Systems Inc", /* 25639 */ "Real SoftService", /* 25640 */ "Papeteries Hamelin", /* 25641 */ "CHP Consulting ltd.", /* 25642 */ "Intermediasud", /* 25643 */ "liland open IT solutions GmbH", /* 25644 */ "Community TV GmbH", /* 25645 */ "b.a.b-technologie GmbH", /* 25646 */ "Hungarian Customs Service (VPOP)", /* 25647 */ "Ecole Nationale Veterinaire de Nantes", /* 25648 */ "Technobox, Inc.", /* 25649 */ "SunUp Design Systems, Inc.", /* 25650 */ "Exalt Communications", /* 25651 */ "Tasneem Electronics L.L.C", /* 25652 */ "Oakley Networks, Inc.", /* 25653 */ "Psi Systems, Inc.", /* 25654 */ "MIMS SA", /* 25655 */ "Axoïde EURL", /* 25656 */ "NWCG", /* 25657 */ "Essentia S.p.A.", /* 25658 */ "PolarSat Inc.", /* 25659 */ "Starflight Electronics", /* 25660 */ "DataPro Group Limited", /* 25661 */ "Opway Optical Technology(Wuxi)Co.Ltd", /* 25662 */ "InfowareLab Co,Ltd.", /* 25663 */ "Terascala, Inc.", /* 25664 */ "Essentel Inc.", /* 25665 */ "Telenav, INC", /* 25666 */ "Padjen", /* 25667 */ "Battelle Memorial Institute", /* 25668 */ "Mariner Partners Inc.", /* 25669 */ "California State University, Fullerton", /* 25670 */ "EC Hugbunadur Ehf", /* 25671 */ "Responsys", /* 25672 */ "Grupo IT Deusto, S.L.", /* 25673 */ "jlu.nic.Inc.", /* 25674 */ "Test-O-Mat", /* 25675 */ "procilon Gmbh", /* 25676 */ "Action Soft", /* 25677 */ "EMBL Heidelberg", /* 25678 */ "SecureAxis Software", /* 25679 */ "Pixen Technologies Pvt Ltd", /* 25680 */ "Instituto Municipal de Cultura y Juventud de Burjassot", /* 25681 */ "Donley Consulting", /* 25682 */ "Epstein Becker & Green, P.C.", /* 25683 */ "Perot Systems Government Services", /* 25684 */ "Hurricane Labs LLC", /* 25685 */ "MCTEL Monaco Telematique", /* 25686 */ "Gendreau & Pelchat", /* 25687 */ "Caixanova", /* 25688 */ "alsatis", /* 25689 */ "REM Probe Ltd", /* 25690 */ "Eyes, Japan Co. Ltd.", /* 25691 */ "ANDREAS STIHL AG & Co. KG", /* 25692 */ "InterNetworX Systems Inc.", /* 25693 */ "DRS Surveillance Support Systems, Inc.", /* 25694 */ "Vestergaard IT", /* 25695 */ "Nedap N.V.", /* 25696 */ "BBK", /* 25697 */ "KSB Italia S.p.A.", /* 25698 */ "Generic Variables", /* 25699 */ "Protokon Kft.", /* 25700 */ "GAMIC mbH", /* 25701 */ "PCSofía", /* 25702 */ "CYBERSYS", /* 25703 */ "inter-touch (Malaysia) Sdn. Bhd.", /* 25704 */ "Pixtree Technologies, Inc.", /* 25705 */ "ViaScope Int.", /* 25706 */ "Marksman", /* 25707 */ "Milde Software Solutions (MSS)", /* 25708 */ "Windstream Communications Inc", /* 25709 */ "Phoenix Worldwide Industries, Inc.", /* 25710 */ "Coral8, Inc.", /* 25711 */ "The Higher Gear Group, Inc.", /* 25712 */ "Magyar Telekom", /* 25713 */ "Chengdu Guyue Electronics Co.,Ltd", /* 25714 */ "JumpTV.com Inc.", /* 25715 */ "Manuel Domínguez Hidalgo", /* 25716 */ "Ravn Webveveriet AS", /* 25717 */ "Taction", /* 25718 */ "Polysys Ltd.", /* 25719 */ "Ingenieurbüro Kuhlmann", /* 25720 */ "Linwave Technology", /* 25721 */ "Integrated Financial Arrangements plc", /* 25722 */ "Phoenix-Database Informationstechnologie GmbH", /* 25723 */ "Universiti Sains Malaysia", /* 25724 */ "SOSeth", /* 25725 */ "Cyrix Technologies Limited", /* 25726 */ "Q9 Networks Inc.", /* 25727 */ "ZAO Light Communication", /* 25728 */ "Radiodata GmbH", /* 25729 */ "ASmith Home", /* 25730 */ "Web Xtreme, Inc.", /* 25731 */ "Mirago plc", /* 25732 */ "Cellact Ltd.", /* 25733 */ "Bolignet-Aarhus", /* 25734 */ "Visionee s.r.l.", /* 25735 */ "Duval County Public Schools", /* 25736 */ "Reality Communications", /* 25737 */ "INFOLOG GmbH", /* 25738 */ "INTERMET Ueckermuende", /* 25739 */ "Nakamura Technologies Ltd.", /* 25740 */ "Ariane Ingenierie", /* 25741 */ "ALDI Einkauf GmbH & Co. oHG", /* 25742 */ "Krontek Pty Ltd", /* 25743 */ "Avillon Networks", /* 25744 */ "Smart Communications, Inc", /* 25745 */ "ARCADIA LAB srl", /* 25746 */ "YellowJacket Software, Inc.", /* 25747 */ "Templer Wirtschaftsing.-Buero", /* 25748 */ "CenGen, Inc.", /* 25749 */ "SAM Group, Inc.", /* 25750 */ "Python Technology Limited", /* 25751 */ "Gallery Solo", /* 25752 */ "KPH Computers", /* 25753 */ "Shanghai onLAN Communication Tech.Co.,Ltd.", /* 25754 */ "Liferay, LLC", /* 25755 */ "Mahidol Wittayanusorn (Public Organization)", /* 25756 */ "Minister of Interior of Saudi Arabia", /* 25757 */ "SIF Inc.", /* 25758 */ "Almen Laboratories, Inc.", /* 25759 */ "Doctors Telehealth Network", /* 25760 */ "ABB Automation GmbH", /* 25761 */ "PersonalOffice", /* 25762 */ "Happydoo SAS", /* 25763 */ "Exmos Ltd", /* 25764 */ "Barclays Global Investors Ltd", /* 25765 */ "Christie Digital Systems", /* 25766 */ "Koya Ixis, S. C.", /* 25767 */ "DATAllegro, Inc.", /* 25768 */ "UTRONIX Elektronikutveckling AB", /* 25769 */ "chatelp.org", /* 25770 */ "Mobile 365, Inc.", /* 25771 */ "Astha Technologies Pvt. Ltd.", /* 25772 */ "Wemeus", /* 25773 */ "BCEAO", /* 25774 */ "midPhase Services, Inc", /* 25775 */ "Hangzhou zhongwei electronics Ltd.", /* 25776 */ "technoms", /* 25777 */ "Irkutsk State Transport University (IrGUPS)", /* 25778 */ "MITO-Performance", /* 25779 */ "Sanchin Consulting AB", /* 25780 */ "NetFort Technologies Limited", /* 25781 */ "MSA management solutions GmbH", /* 25782 */ "Bluecom C.A.", /* 25783 */ "Deutsche Provinz der Salesianer Don Boscos KoeR", /* 25784 */ "Universitat Politècnica de Catalunya (UPC)", /* 25785 */ "AgileSoft BVBA", /* 25786 */ "dox.at. Softwareentwicklungs und Dienstleistungs GmbH", /* 25787 */ "DAIMS Ltd.", /* 25788 */ "Digital Work Co.,Ltd.", /* 25789 */ "Sirona Dental Systems GmbH", /* 25790 */ "certSign.eu", /* 25791 */ "Leader.IT", /* 25792 */ "Häfele GmbH & co. KG", /* 25793 */ "XSALTO", /* 25794 */ "Vicarial Technology", /* 25795 */ "Menbit Technology Co., Ltd", /* 25796 */ "Southerland Consulting, Inc.", /* 25797 */ "Elaborated Networks GmbH", /* 25798 */ "West Liberty Telephone Company", /* 25799 */ "Ample Communications Inc.", /* 25800 */ "Identita Technologies Inc.", /* 25801 */ "Aliadis", /* 25802 */ "Total System Services, Inc..", /* 25803 */ "Scala, Inc.", /* 25804 */ "Thomson Learning", /* 25805 */ "Sonnet Technologies, Inc.", /* 25806 */ "heung to middle school (tin shui wai)", /* 25807 */ "eBiz Ltd.", /* 25808 */ "mobileX AG", /* 25809 */ "ABE Software", /* 25810 */ "INLOG SA", /* 25811 */ "Home Gateway Initiative", /* 25812 */ "Sai Furnitures LTD", /* 25813 */ "Subzilla", /* 25814 */ "Wirevox", /* 25815 */ "Roland DG Corporation", /* 25816 */ "Poseidon Networks", /* 25817 */ "The Sakai Foundation", /* 25818 */ "DO|YOU|SOFT", /* 25819 */ "SkyBlue Technologies, Inc.", /* 25820 */ "Consilient Technologies Corp.", /* 25821 */ "S&T Hungary Ltd.", /* 25822 */ "CIO Informatique Industrielle", /* 25823 */ "Dementia 7", /* 25824 */ "Asgard's Realm", /* 25825 */ "Peter J. Leonard Small Business Consulting Services", /* 25826 */ "Big Lots Stores, Inc.", /* 25827 */ "Texas Health and Human Services", /* 25828 */ "Beijing superlink telecommunications Co.Ltd", /* 25829 */ "4Players GmbH", /* 25830 */ "Rhinocorps, Ltd. Co.", /* 25831 */ "GlobalSCAPE, Inc.", /* 25832 */ "Edward W. Sparrow Hospital Association", /* 25833 */ "Interoperabilidad S.A. de C.V.", /* 25834 */ "Patientline UK Ltd", /* 25835 */ "Austrian Academy of Sciences", /* 25836 */ "Electronnyi gorod Lld.", /* 25837 */ "Tagawa Software Engineering", /* 25838 */ "ISTANTE srl", /* 25839 */ "Logcode SARL", /* 25840 */ "Arakelian Software, Inc.", /* 25841 */ "Technica Necesse Est", /* 25842 */ "VoIP.co.uk", /* 25843 */ "Seneca Technology Corporation", /* 25844 */ "MIYATSU CO.,Ltd", /* 25845 */ "AIN Manager & Company, Inc.", /* 25846 */ "M-Networks, LLC.", /* 25847 */ "Bally Technologies, Inc.", /* 25848 */ "deas Deutsche Assekuranz-Makler GmbH", /* 25849 */ "Smart Tech 21, Inc.", /* 25850 */ "5by5 Software Ventures Ltd.", /* 25851 */ "City Computing Ltd London UK 1767817", /* 25852 */ "Rubin Rt.", /* 25853 */ "Multisoft Ltd.", /* 25854 */ "Net24 Limited", /* 25855 */ "Free University of Bozen/Bolzano", /* 25856 */ "FEMTO-ST", /* 25857 */ "The Royal College of Surgeons in Ireland", /* 25858 */ "The aKamali Group, Inc.", /* 25859 */ "A VonderHaar Networks", /* 25860 */ "Tanapro GmbH", /* 25861 */ "Assist WiseTech S.A.", /* 25862 */ "Brenson Pacific Technologies Ltd", /* 25863 */ "VideoPropulsion Interactive Television, Inc", /* 25864 */ "Boise State University", /* 25865 */ "CHU BESANCON", /* 25866 */ "i-qnet", /* 25867 */ "Last Mile Gear", /* 25868 */ "MIRAVID Inc.", /* 25869 */ "FHLBanks Office of Finance", /* 25870 */ "Nextwireless. co. ltd.", /* 25871 */ "EMM s.r.o.", /* 25872 */ "BitlBee Team", /* 25873 */ "GrimIce Inc.", /* 25874 */ "Ondrej Svoboda", /* 25875 */ "Gnome Technologies", /* 25876 */ "Portrait International, Inc.", /* 25877 */ "FineRF", /* 25878 */ "Mess Creative Electronics B.V.", /* 25879 */ "AEB GmbH", /* 25880 */ "Objective Arts", /* 25881 */ "Impinj, Inc.", /* 25882 */ "Elspec-Ltd", /* 25883 */ "JPK Instruments AG", /* 25884 */ "TQI - Total Quality on Information", /* 25885 */ "Nethit", /* 25886 */ "Centro Provinciale di Documentazione Modena", /* 25887 */ "Gestion Professionnelle des Services de l'Assurance", /* 25888 */ "IFETH Ltd., U.K.", /* 25889 */ "MNG Networks GmbH", /* 25890 */ "Sms Systems", /* 25891 */ "Teletronics International, Inc.", /* 25892 */ "Dexterra Inc.", /* 25893 */ "Blue Cross and Blue Shield of Louisiana", /* 25894 */ "PS Webhosting", /* 25895 */ "Sento Corporation", /* 25896 */ "Alligacom Inc.", /* 25897 */ "25th-floor - de Pretis & Helmberger KEG", /* 25898 */ "Kantonsschule Zug", /* 25899 */ "Blue Frog Solutions Inc.", /* 25900 */ "Linterra", /* 25901 */ "M&V Werbeagentur GmbH", /* 25902 */ "Palm Beach County", /* 25903 */ "Fresh Agencja Reklamowa Sp. z o.o.", /* 25904 */ "Charles University in Prague", /* 25905 */ "Topchiev Institute of Petrochemical Synthesis", /* 25906 */ "EMAP France", /* 25907 */ "Haicku, S. Coop. Mad.", /* 25908 */ "IPCMS", /* 25909 */ "Live Software Solutions Ltd.", /* 25910 */ "ELCA Informatique SA", /* 25911 */ "PT Teleakses Solusindo (Tel-Access)", /* 25912 */ "Fi-Mesh Networks Private Ltd.", /* 25913 */ "Solacom Technologies", /* 25914 */ "BCM Bureautique S.A.R.L", /* 25915 */ "progon engineering", /* 25916 */ "convey Information Systems GmbH", /* 25917 */ "IT-SecuConsult Ltd.", /* 25918 */ "NorthSpark AB", /* 25919 */ "Institut de Genetique et Microbiologie ( IGM )", /* 25920 */ "centerra GmbH", /* 25921 */ "teuto.net Netzdienste GmbH", /* 25922 */ "C D P Communications Inc.", /* 25923 */ "CatsMuvva.Net", /* 25924 */ "Ready Business System", /* 25925 */ "Computer and Communication (CaC)", /* 25926 */ "Marketcetera LLC", /* 25927 */ "SecureNet Scientific Solutions S.A. de C.V.", /* 25928 */ "JHU ACM", /* 25929 */ "ZamKor P. Sagnowski i Wspolnicy Sp. J.", /* 25930 */ "Datalan, a.s.", /* 25931 */ "8labs.com", /* 25932 */ "Quantum Technology Marketing Ltd", /* 25933 */ "Intraway Corporation", /* 25934 */ "TNT Express Worldwide (UK) Ltd", /* 25935 */ "echternacht new media ohg", /* 25936 */ "NNIT A/S", /* 25937 */ "Axonpro spol. s r.o.", /* 25938 */ "Mainstream Technologies, s.r.o.", /* 25939 */ "Lycée Technique d'Ettelbruck", /* 25940 */ "WiComm mmc", /* 25941 */ "DigiVox B.V.", /* 25942 */ "pixus.net", /* 25943 */ "Psychotronics", /* 25944 */ "Landwehr EDV Technik", /* 25945 */ "cintrixx technologies", /* 25946 */ "Halloo Communications, Inc.", /* 25947 */ "Yellowbank", /* 25948 */ "China Agricultural University", /* 25949 */ "FlyLady & Company, Inc.", /* 25950 */ "Hutman, Inc", /* 25951 */ "EyeQ Informationstechnik & Multimedia, Reinhard Sucker & Sohn GbR", /* 25952 */ "Getitsafe", /* 25953 */ "XERON", /* 25954 */ "Observit Lda", /* 25955 */ "Talk-A-Phone Co.", /* 25956 */ "ATITEL LTDA", /* 25957 */ "Secure Networks Lda.", /* 25958 */ "Raia & Cia Ltda.", /* 25959 */ "Hour Hand Productions Inc.", /* 25960 */ "Bizfon, Inc.", /* 25961 */ "Larson Technology", /* 25962 */ "California State University Stanislaus", /* 25963 */ "sPearWay Ltd.", /* 25964 */ "Pennsylvania Legislative Data Processing Center", /* 25965 */ "CBS Broadcasting Inc.", /* 25966 */ "Packetware Inc", /* 25967 */ "Rabid Dog Labs", /* 25968 */ "SeMarket, S.A.", /* 25969 */ "Pmovil Ltda.", /* 25970 */ "SGV", /* 25971 */ "SUPERCOM", /* 25972 */ "Nexge Technologies (P) Ltd", /* 25973 */ "Freedom9 Inc.", /* 25974 */ "REUNA", /* 25975 */ "Secours Catholique", /* 25976 */ "Bausparkasse Schwäbisch Hall AG", /* 25977 */ "EGeen", /* 25978 */ "Mavenir Systems, Inc.", /* 25979 */ "Van Shung Chong Holdings Limited", /* 25980 */ "Sapian SA", /* 25981 */ "Hillcrest Laboratories, Inc.", /* 25982 */ "Telecom Design", /* 25983 */ "FAST CORPORATION", /* 25984 */ "JoyTV10 / S-Vox Ltd", /* 25985 */ "InterGen Services, Inc.", /* 25986 */ "Grupo de Investigación en Bioingeniería (GIB) CES - EAFIT", /* 25987 */ "AKH Wien", /* 25988 */ "Automata Software Inc.", /* 25989 */ "Security Compliance Corp", /* 25990 */ "MasarLabs.com", /* 25991 */ "ACEFHAT , A.I.E.", /* 25992 */ "Aspalis SAS", /* 25993 */ "Aspect Capital Ltd", /* 25994 */ "Network-Unlimited", /* 25995 */ "ITRI", /* 25996 */ "Ugly Design, Inc", /* 25997 */ "Assure Programs Pty Ltd", /* 25998 */ "Junger Audio-Studiotechnik GmbH", /* 25999 */ "John Laesch for Congress", /* 26000 */ "Embedded Ventures LLC", /* 26001 */ "Youtility Solutions, Inc.", /* 26002 */ "Adflex Ltd", /* 26003 */ "CONNECT Software AG", /* 26004 */ "Hessisches Landeskriminalamt DV-kriminalistische Beratungs- und Auswertungsstelle", /* 26005 */ "Personal & Informatik AG", /* 26006 */ "Evert Mouw", /* 26007 */ "Neosis", /* 26008 */ "Sebastian Pasch", /* 26009 */ "Hippogriff LLC", /* 26010 */ "CEPEL", /* 26011 */ "Holmboe Consulting", /* 26012 */ "Kongsberg Seatex AS", /* 26013 */ "Legando AG", /* 26014 */ "Multipolar Corporation Tbk, PT", /* 26015 */ "Rederi AB Transatlantic", /* 26016 */ "Raiffeisenbank (Bulgaria) EAD", /* 26017 */ "Westminster College", /* 26018 */ "nantong vocational college", /* 26019 */ "DePratti Consulting LLC", /* 26020 */ "Ligos Corporation", /* 26021 */ "Kamayo", /* 26022 */ "Fachschaft MPI, TU München", /* 26023 */ "subnet - platform for media art and experimental technologies", /* 26024 */ "Ari Voutilainen", /* 26025 */ "arm4.org", /* 26026 */ "OpenDS.org", /* 26027 */ "MetaSoft", /* 26028 */ "DuroSystems Ltd.", /* 26029 */ "Zobel Software GmbH", /* 26030 */ "b-tree GmbH", /* 26031 */ "XINU technologies GmbH", /* 26032 */ "On The Network Co.,Ltd", /* 26033 */ "Adobe Animal Hospital", /* 26034 */ "Alinto SA", /* 26035 */ "Demoniak Network", /* 26036 */ "Dengler Engineering GmbH", /* 26037 */ "Cecom S.A.", /* 26038 */ "CESR", /* 26039 */ "T PARTY", /* 26040 */ "Optical Internetworking Forum (OIF)", /* 26041 */ "Music for Life Institute", /* 26042 */ "LaSer Loyalty", /* 26043 */ "Telemacro Informacoes e Servicos Ltda.", /* 26044 */ "Wright Patman Congressional Federal Credit Union", /* 26045 */ "interActive Systems GmbH", /* 26046 */ "Fritzinger IT-Consult", /* 26047 */ "Mo-Sys Ltd", /* 26048 */ "Open WWWorks", /* 26049 */ "Ecole Centrale de Marseille", /* 26050 */ "Retep Software", /* 26051 */ "HALYS", /* 26052 */ "Gutjahr GmbH", /* 26053 */ "ARASOR TECHNOLOGIES PRIVATE LIMITED", /* 26054 */ "NordicAware AS", /* 26055 */ "Exxim Computing Corporation", /* 26056 */ "Alpheus Communications, L.P.", /* 26057 */ "Codebay Oy", /* 26058 */ "BTECH, Inc.", /* 26059 */ "IZT Innovationszentrum Telekommunikationstechnik GmbH", /* 26060 */ "Artesyn Embedded Technologies", /* 26061 */ "MZL Software Development", /* 26062 */ "Ankhnet Informations Pvt. Ltd.", /* 26063 */ "Braga Moro S.p.A.", /* 26064 */ "GECO, Inc.", /* 26065 */ "MultiService Forum", /* 26066 */ "Kyland", /* 26067 */ "Shaanxi Key Laboratory of Satellite-Terrestrial Network Tech.R&D", /* 26068 */ "IPG Sales Pty Ltd", /* 26069 */ "neutralities.net", /* 26070 */ "Marcin Raciborski", /* 26071 */ "Beijing Huisen Networks technology Inc", /* 26072 */ "VEUSTEC SERVICOS DE INFORMATICA LTDA", /* 26073 */ "TUSC", /* 26074 */ "x2s Limited", /* 26075 */ "Metrinomics GmbH", /* 26076 */ "Espelt.net", /* 26077 */ "S4Software, Inc.", /* 26078 */ "Burk Technology", /* 26079 */ "AR Department of Information Systems", /* 26080 */ "Lars Kornwinkel", /* 26081 */ "CERTIRA", /* 26082 */ "CacheGuard Technologies Ltd.", /* 26083 */ "Enter srl", /* 26084 */ "Kunstuniversitaet Linz", /* 26085 */ "PC - ANWENDUNGEN", /* 26086 */ "Markus Meyer", /* 26087 */ "Aspera OHG", /* 26088 */ "Emanuel Haupt", /* 26089 */ "qiiq communication inc.", /* 26090 */ "Lafarge S.A.", /* 26091 */ "ACEB Electronique", /* 26092 */ "NiBweb", /* 26093 */ "McGibbon IT-services", /* 26094 */ "Canopus Co., Ltd.", /* 26095 */ "Synergy Neworking Ltd", /* 26096 */ "Linux Training NZ", /* 26097 */ "King County", /* 26098 */ "Shanghai Engineering Research Center for Broadband Technologies & Applications(B-STAR) Co., Ltd.", /* 26099 */ "Cypress Integrated Systems, Inc.", /* 26100 */ "NUPPEAD - Núcleo de Pesquisa e Projetos em Educação a Distância", /* 26101 */ "Advance Internet, Inc.", /* 26102 */ "WOBCOM GmbH", /* 26103 */ "bellwin information Co.,LTD", /* 26104 */ "Crummock (Scotland) Ltd", /* 26105 */ "Sentivision Polska sp. z o. o.", /* 26106 */ "Cambridge Display Technology Ltd", /* 26107 */ "HYDRA FUEL CELL CORPORATION", /* 26108 */ "TPS Pakistan Pvt Ltd.", /* 26109 */ "PrintMIB, LLC", /* 26110 */ "Informi GIS A/S", /* 26111 */ "ISGS", /* 26112 */ "keuning Information Systems", /* 26113 */ "AXIOHM SAS", /* 26114 */ "JSC STC \"Rissa\"", /* 26115 */ "Practical Economic Research Limited", /* 26116 */ "Lux Solis, LLC", /* 26117 */ "BFSt", /* 26118 */ "Trafsys", /* 26119 */ "cweiske.de", /* 26120 */ "Rishi Valley School", /* 26121 */ "Zenitel Norway AS", /* 26122 */ "Ministerie van de Vlaamse Gemeenschap, belfla telematica", /* 26123 */ "ComX Networks A/S", /* 26124 */ "Vegacom a.s.", /* 26125 */ "Makko Solutions, S. A. de C. V.", /* 26126 */ "Beijing Vorx Telecommunications Co, Ltd.", /* 26127 */ "CommSeed Corporation", /* 26128 */ "Logitek Electronic Systems, Inc.", /* 26129 */ "Montserrat College of Art", /* 26130 */ "Vendini Tickets", /* 26131 */ "Aegis Semiconductor, Inc.", /* 26132 */ "Center for Remote Sensing Ice Sheets, University of Kansas", /* 26133 */ "Institute for Networked Solutions", /* 26134 */ "Mount Airey Group, Inc.", /* 26135 */ "GENOME express", /* 26136 */ "The University of Texas System", /* 26137 */ "INTELBRAS S/A", /* 26138 */ "Samford University", /* 26139 */ "Reflected Networks, Inc.", /* 26140 */ "EDI-PRO", /* 26141 */ "3Way Networks Ltd", /* 26142 */ "Centre d'Alt Rendiment Esportiu", /* 26143 */ "IRTE S.p.A.", /* 26144 */ "Network Systems", /* 26145 */ "ZAO NPC SPECTRUM", /* 26146 */ "Trivore Corp.", /* 26147 */ "Suburban Medical Laboratory, Inc.", /* 26148 */ "India Mobility Research (IMR)", /* 26149 */ "FDT Manufacturing, LLC", /* 26150 */ "Win32Tools", /* 26151 */ "Helsinki IT Systems Consulting", /* 26152 */ "HighPoint Technologies, Inc.", /* 26153 */ "biaix", /* 26154 */ "Bancolombia S.A", /* 26155 */ "Quicksilva Ltd.", /* 26156 */ "Chupa Chups, S.A.", /* 26157 */ "Bertram Yacht Inc.", /* 26158 */ "Euro Connect", /* 26159 */ "VUMS Control Systems, a.s.", /* 26160 */ "Rocketseed", /* 26161 */ "TELROS", /* 26162 */ "AirCUVE Co., Ltd.", /* 26163 */ "Tri-vision Electronics Inc", /* 26164 */ "US Airways", /* 26165 */ "Nebraska Wesleyan University", /* 26166 */ "Blakemere Technologies Inc.", /* 26167 */ "Idologic Inc.", /* 26168 */ "eLynx Ltd.", /* 26169 */ "Clario Medical Imaging, Inc.", /* 26170 */ "Parallels Holdings Ltd", /* 26171 */ "Keble College", /* 26172 */ "monaghen.com", /* 26173 */ "SignaCert, Inc.", /* 26174 */ "R&S Medizinsysteme", /* 26175 */ "AB Computing Ltd", /* 26176 */ "Black Press Group Ltd.", /* 26177 */ "LandQuest Services Ltd.", /* 26178 */ "Connectiva Systems", /* 26179 */ "Queens Academic Group Ltd", /* 26180 */ "Cohda Wireless Ltd", /* 26181 */ "Entelechy Systems", /* 26182 */ "Northeastern State University", /* 26183 */ "NSP", /* 26184 */ "Interalia Inc.", /* 26185 */ "Yocobox Soluciones Digitales", /* 26186 */ "Scott Logic Ltd.", /* 26187 */ "Switch Media", /* 26188 */ "Qstreams Networks", /* 26189 */ "Crisp Thinking Ltd", /* 26190 */ "Jadebird Inc.", /* 26191 */ "Sony Global Solutions Inc.", /* 26192 */ "Hangzhou Grancom Information & Technology Co.,Ltd.", /* 26193 */ "Rasmus Hahn", /* 26194 */ "Imagic Bildverarbeitung AG", /* 26195 */ "AVT Audio Video Technolgies GmbH", /* 26196 */ "HITT GmbH", /* 26197 */ "Hedmark University College", /* 26198 */ "KEEPIXO", /* 26199 */ "Solid Rock IT", /* 26200 */ "UHU-Linux Kft.", /* 26201 */ "Snipe Networks", /* 26202 */ "I.T. Advance Consulting, Inc.", /* 26203 */ "University of Utah Department of Medical Informatics", /* 26204 */ "Bright Horizons Family Solutions", /* 26205 */ "On Site Network Solutions, Inc.", /* 26206 */ "FT Interactive Data Inc.", /* 26207 */ "PDL BioPharma, Inc.", /* 26208 */ "Louisiana Department of Health and Hospitals", /* 26209 */ "ACM Systems", /* 26210 */ "Universidade Federal de Minas Gerais", /* 26211 */ "Harmonic Technology Group, LLC", /* 26212 */ "Stahlgruber GmbH & Co KG", /* 26213 */ "Afilias Canada", /* 26214 */ "Progensys Ltd", /* 26215 */ "Deck S.r.l.", /* 26216 */ "Systel SA", /* 26217 */ "Nova Scotia Cancer Centre", /* 26218 */ "Enagas S.A.", /* 26219 */ "Gunter, Winston, & O'Neal Corporation", /* 26220 */ "BeTV Belgium", /* 26221 */ "S&S Pamin", /* 26222 */ "Jakobs Family Enterprises", /* 26223 */ "MONITORAPP Co.,Ltd.", /* 26224 */ "Studio DIGITAL ART", /* 26225 */ "Netcom Systems", /* 26226 */ "mindjail consulting Ltd.", /* 26227 */ "Tricipher, Inc.", /* 26228 */ "Data Management S.p.A.", /* 26229 */ "Kirusa Inc.", /* 26230 */ "Punch Telematix", /* 26231 */ "scimmia.net", /* 26232 */ "Stephen Thompson Consulting, LLC", /* 26233 */ "Gate Petroleum Company", /* 26234 */ "Computer Networks Laboratory at Technical University of Kosice", /* 26235 */ "Camara de Comercio y Produccion de Santo Domingo", /* 26236 */ "Elders Limited", /* 26237 */ "Consortium GARR", /* 26238 */ "Bank Solidarnost", /* 26239 */ "Hochschule Darmstadt", /* 26240 */ "ALLCARE ADMINISTRATORS (PTY) LTD", /* 26241 */ "Loy & Hutz Aktiengesellschaft", /* 26242 */ "SIS Schul Internet Service", /* 26243 */ "Ocilion IPTV Technologies GmbH", /* 26244 */ "Australia MultiDrive Development (AMD)", /* 26245 */ "North Seattle Community College", /* 26246 */ "ServiceTrace e.K.", /* 26247 */ "die NetzWerkstatt", /* 26248 */ "Transact Services LLC", /* 26249 */ "Information and Multimedia Center, Gifu University", /* 26250 */ "ZZNODE", /* 26251 */ "Universidad de Sonora", /* 26252 */ "Iduntec", /* 26253 */ "PesaPoint Ltd", /* 26254 */ "Our Lady of the Lake Hospital, INC.", /* 26255 */ "Fluendo S.A.", /* 26256 */ "RT-Tech LLC", /* 26257 */ "Datum International Ltd", /* 26258 */ "GlobalX Technologies, LLC", /* 26259 */ "NIBCO INC.", /* 26260 */ "MAXON CIC Corp.", /* 26261 */ "NMMN New Media Markets & Networks GmbH", /* 26262 */ "Douglas School District", /* 26263 */ "Galeries Lafayette", /* 26264 */ "Flawed Logic Server Management Software", /* 26265 */ "LITE-ON TECHNOLOGY CORP.", /* 26266 */ "Kodiak Networks India Pvt. Ltd", /* 26267 */ "PositiveArt", /* 26268 */ "inSORS Integrated Communications, Inc.", /* 26269 */ "Olivetti S.p.a", /* 26270 */ "acosta.se", /* 26271 */ "SALICRU", /* 26272 */ "Ventia Pty Limited", /* 26273 */ "Digital Ideas Pty Ltd", /* 26274 */ "Indigo Stone International Ltd", /* 26275 */ "Heinrich Nirschl", /* 26276 */ "Voronezh State University", /* 26277 */ "Zarafa", /* 26278 */ "Envision Technology Partners, Inc.", /* 26279 */ "Adara Networks", /* 26280 */ "The EA Group", /* 26281 */ "FYI Corporation", /* 26282 */ "Christoph Anderegg", /* 26283 */ "Ochsner Health System", /* 26284 */ "S. I. Tech, Inc.", /* 26285 */ "Alfree Systems", /* 26286 */ "Exelmind Ltd.", /* 26287 */ "Kavaro Oy", /* 26288 */ "VIMPLICITY Ltd.", /* 26289 */ "Exatel S.A.", /* 26290 */ "The Revolution Group Pty Ltd", /* 26291 */ "TechSyndicate", /* 26292 */ "Interaktivo Risinajumu Grupa, SIA", /* 26293 */ "Endurance International Group", /* 26294 */ "Cyberlog Ltd", /* 26295 */ "Resource SiteSeeing Ltda.", /* 26296 */ "Wireless Broadband Services Pty. Ltd.", /* 26297 */ "Electionmall Technologies Inc.", /* 26298 */ "EasternGraphics GmbH", /* 26299 */ "Genera Oy", /* 26300 */ "Texas Digital Systems, Inc", /* 26301 */ "Blonder Tongue Laboratories, Inc.", /* 26302 */ "CarrierIQ Inc.", /* 26303 */ "SNMPinfo", /* 26304 */ "Sykora Technology Inc.", /* 26305 */ "Opportunity Solutions A/S", /* 26306 */ "Skyguide - swiss air navigation services ltd.", /* 26307 */ "Saab TransponderTech AB", /* 26308 */ "Draksoft Soluzioni Informatiche S.a.s.", /* 26309 */ "Departamento Municipal de Eletricidade de Poços de Caldas", /* 26310 */ "Andreas Kinzler", /* 26311 */ "Genius Company", /* 26312 */ "Mark Roscrow", /* 26313 */ "Xcontrol GmbH", /* 26314 */ "Asian Access Networks Pte Ltd.", /* 26315 */ "Pacific States Marine Fisheries Commission", /* 26316 */ "First Choice Health Network", /* 26317 */ "Condor Networks", /* 26318 */ "HomeCity Net Ltd.", /* 26319 */ "Project Team s.r.l.", /* 26320 */ "Christian Tena", /* 26321 */ "Tokyo University of Marine Science and Technology", /* 26322 */ "Informatica Productiva Conocimiento y Tecnologia, S.L.", /* 26323 */ "Wurm GmbH & Co. KG", /* 26324 */ "GT London Ltd", /* 26325 */ "ADTECH AG", /* 26326 */ "Kassenzahnärztliche Vereinigung Westfalen-Lippe", /* 26327 */ "Blackfoot Telephone Cooperative, Inc.", /* 26328 */ "Simpler-Webb, Inc.", /* 26329 */ "South Shore Hopsital", /* 26330 */ "Trilink,Inc", /* 26331 */ "TechnoKad", /* 26332 */ "Brose Fahrzeugteile", /* 26333 */ "MEGATRON DATA SERVICES GMBH", /* 26334 */ "DiViNetworks Ltd.", /* 26335 */ "Pawel Kraszewski", /* 26336 */ "Paper Management Services Ltd.", /* 26337 */ "IWICS Inc.", /* 26338 */ "Risk Laboratories, LLC", /* 26339 */ "SKBrasil", /* 26340 */ "Madein.hu Bt.", /* 26341 */ "Fujitsu System Solutions Ltd.", /* 26342 */ "Grainmustards Co.,Ltd.", /* 26343 */ "Advanced Institute of Industrial Technology", /* 26344 */ "PAK ELECTRICAL APPLIANCE CO., LTD", /* 26345 */ "All-Powerful Dave", /* 26346 */ "acens technologies S.A.", /* 26347 */ "Maenken Systems", /* 26348 */ "Shyam Telecom Ltd.", /* 26349 */ "Beijing Agree Technology Development Ltd.", /* 26350 */ "NILES Werkzeugmaschinen GmbH", /* 26351 */ "Power Systems LLC", /* 26352 */ "Blue Lake Rancheria", /* 26353 */ "Software Concepts, Inc.", /* 26354 */ "Fiplex Communications Inc.", /* 26355 */ "Vector Technology", /* 26356 */ "Commonwealth Service Delivery Agency (Centrelink Australia)", /* 26357 */ "XM Asia Pacific Pte Ltd", /* 26358 */ "Xpressent, Inc.", /* 26359 */ "Woodward Ventures", /* 26360 */ "Solution Innovators, LLC", /* 26361 */ "Wenzel Elektronik GmbH", /* 26362 */ "Woodhead", /* 26363 */ "EID - Empresa de Investigação e Desenvolvimento de Electrónica, S.A", /* 26364 */ "Critical Links SA", /* 26365 */ "Amano Cincinnati", /* 26366 */ "Nondeterministic Information Systems", /* 26367 */ "Micko Group, Inc.", /* 26368 */ "Mattig-Schauer Ges.m.b.H", /* 26369 */ "Bend Cable Communications, LLC", /* 26370 */ "School of Oriental and African Studies", /* 26371 */ "Stadig Technologies, LLC", /* 26372 */ "GRI e.V", /* 26373 */ "University of Illinois", /* 26374 */ "Ockan", /* 26375 */ "Tribunal Regional Eleitoral de Santa Catarina", /* 26376 */ "ACC Ingenierie et Maintenance", /* 26377 */ "PrettyBit Software Oy", /* 26378 */ "I.E.P.A.L.A.", /* 26379 */ "buaa608", /* 26380 */ "lwIP - A Lightweight TCP/IP stack", /* 26381 */ "Sis'ta Salsa, LLC", /* 26382 */ "Pay By Touch", /* 26383 */ "GANDI", /* 26384 */ "BUFETE CONSULTOR DE MEXICO, S.A. DE C.V.", /* 26385 */ "Koerber Enterprise", /* 26386 */ "John Cantu", /* 26387 */ "Profil GmbH", /* 26388 */ "Factory Mutual Insurance Company", /* 26389 */ "Woven Systems Inc.", /* 26390 */ "Kelyan Lab S.p.A.", /* 26391 */ "NetClarity", /* 26392 */ "CallCopy, Inc.", /* 26393 */ "Emaze Networks S.p.A.", /* 26394 */ "American Telecommunication Inc.", /* 26395 */ "Rising Edge Development LLC", /* 26396 */ "Oklahoma State University", /* 26397 */ "WasaLab Oy", /* 26398 */ "Emencia SARL", /* 26399 */ "Bundesnetzagentur", /* 26400 */ "Alarmtech Polska sp. z o.o.", /* 26401 */ "ELETRONIQUE PLUS SA", /* 26402 */ "IMATech2.net", /* 26403 */ "SupplyScape Corporation", /* 26404 */ "The MetalFish Consultancy Ltd.", /* 26405 */ "CyberDefenses, Inc.", /* 26406 */ "Tiger Communications Plc", /* 26407 */ "WolfVision GmbH", /* 26408 */ "ERecruiters Ltd.", /* 26409 */ "Pakamera", /* 26410 */ "Vocality International Ltd", /* 26411 */ "Alexandr Kara", /* 26412 */ "Golden West Internet Solutions", /* 26413 */ "Fenri", /* 26414 */ "J. & W. Seligman & Co. Incorporated", /* 26415 */ "MetaCarta, Inc.", /* 26416 */ "Transcepta LLC", /* 26417 */ "Netsafe Information Technology Ltd.", /* 26418 */ "transtec AG", /* 26419 */ "clan informatik AG", /* 26420 */ "Daughters of Charity Services of New Orleans", /* 26421 */ "IABG mbH", /* 26422 */ "Tlantic SI", /* 26423 */ "syscare.net", /* 26424 */ "Layered Technologies", /* 26425 */ "Forget About IT Ltd.", /* 26426 */ "Kansas Department of Health and Environment - State of Kansas", /* 26427 */ "Bedford Hospital NHS Trust", /* 26428 */ "Xinwei Telecom Technology,Inc.", /* 26429 */ "E Technologies, Inc", /* 26430 */ "Thai National Grid Center", /* 26431 */ "Center of Information technologies of Tatarstan Republic", /* 26432 */ "Calyx Internet", /* 26433 */ "Touch Sense Inc", /* 26434 */ "Noam Communications", /* 26435 */ "HSH Soft- und Hardware Vertriebs GmbH", /* 26436 */ "Universität zu Köln", /* 26437 */ "S.V. Paradoks", /* 26438 */ "SFERIA SA", /* 26439 */ "BliXem Internet Services B.V.", /* 26440 */ "Technikon Forschungs- und Planungsgesellschaft mbH (Ltd.)", /* 26441 */ "PROLIVAL", /* 26442 */ "Cinetix Srl", /* 26443 */ "Coroware, Inc", /* 26444 */ "Special Systems and Software, Inc.", /* 26445 */ "Ouvi Divulgacao e Marketing em Celulares Ltda.", /* 26446 */ "Compro Computer Services, Inc", /* 26447 */ "Variomedia AG", /* 26448 */ "Okto Tecnologia e Serviços de Informática Ltda.", /* 26449 */ "Hubbell Inc.", /* 26450 */ "Esencis", /* 26451 */ "HiTB", /* 26452 */ "VJ Systems", /* 26453 */ "wealink.com limited Inc.", /* 26454 */ "Secretariat of Information Technology, Government of Haryana", /* 26455 */ "Budapest University of Technology and Economics (BME)", /* 26456 */ "Meditec GmbH", /* 26457 */ "tetrade inc.", /* 26458 */ "wavesyscom co.,Ltd", /* 26459 */ "Alcor Communications", /* 26460 */ "Knorr & Partner Ingenieure", /* 26461 */ "LANCK Telecom (Express TeleService Corp.)", /* 26462 */ "Wyless plc", /* 26463 */ "Dundalk Institute of Technology", /* 26464 */ "i-together Ltd", /* 26465 */ "Leissner Data AB", /* 26466 */ "HANZO S/A", /* 26467 */ "I.T. Management and Consultation Services (ITMACS)", /* 26468 */ "AirClic Inc.", /* 26469 */ "Media Movel Serviços Interativos LTDA", /* 26470 */ "International Teams", /* 26471 */ "Nordic Optical Telescope Scientific Association", /* 26472 */ "Digiplug", /* 26473 */ "Midwest Connections Inc.", /* 26474 */ "GTN77", /* 26475 */ "Advanced Devices S.p.A.", /* 26476 */ "Uwe Perl", /* 26477 */ "SI3SI", /* 26478 */ "Schenck Process GmbH", /* 26479 */ "infler.de", /* 26480 */ "Zane C. Bowers", /* 26481 */ "Rossonet S.r.l.", /* 26482 */ "JW NetSource, LLC", /* 26483 */ "Cisco Systems, Inc.", /* 26484 */ "Cryoserver Ltd", /* 26485 */ "The Stanley Works", /* 26486 */ "WebSpace-Forum", /* 26487 */ "Ender Informatics GmbH", /* 26488 */ "IntelliData Systems Ltd", /* 26489 */ "Beverli.NET", /* 26490 */ "Metzler Tech Ltd", /* 26491 */ "Dongyang Telecom co., LTD", /* 26492 */ "Urzad Marszalkowski Wojewodztwa Malopolskiego", /* 26493 */ "CSJGlobal. Inc.", /* 26494 */ "Scope", /* 26495 */ "ZipLip, Inc.", /* 26496 */ "BitBin LLC", /* 26497 */ "DART Industries Inc", /* 26498 */ "Memo Serviços Interativos S.A.", /* 26499 */ "Carl Zeiss AG", /* 26500 */ "Pari Medical Holding GmbH", /* 26501 */ "Emerging Information Systems Inc.", /* 26502 */ "University of Applied Science Osnabrück", /* 26503 */ "A3IP", /* 26504 */ "Zenexity", /* 26505 */ "IT-Ideas", /* 26506 */ "TJ NET Spa", /* 26507 */ "Electronic Forge", /* 26508 */ "Digital Electronics Corporation", /* 26509 */ "Like Minded People Ltd", /* 26510 */ "TAC Bilgisayar Hizmetleri Ic ve Dis Ticaret A.S.", /* 26511 */ "GEEK Bilgisayar Muhendislik ve Sanayi LTD STI", /* 26512 */ "Hellenic Academic and Research Institutions CertificationAuthority", /* 26513 */ "Suntel Communications", /* 26514 */ "Tepe Teknoloji", /* 26515 */ "Innovation Designs Ltd.", /* 26516 */ "BESECURE", /* 26517 */ "MEG Elektronik Ltd.", /* 26518 */ "GEEK Bilgi Teknolojileri LTD STI", /* 26519 */ "Pierbridge Limited", /* 26520 */ "Pannasoft Technologies", /* 26521 */ "MDG InfoSec", /* 26522 */ "American Qualified Plans, Inc.", /* 26523 */ "lyman & associates", /* 26524 */ "Golden Dynamic Enterprises Ltd.", /* 26525 */ "eTouch Systems Corp", /* 26526 */ "Ircona", /* 26527 */ "Kirche fur Oberberg e.V.", /* 26528 */ "CNRST", /* 26529 */ "Telemetry BTT", /* 26530 */ "Kodak Imaging Network, Inc", /* 26531 */ "eB Technologies (M) Sdn. Bhd.", /* 26532 */ "Nurun inc.", /* 26533 */ "think project! International", /* 26534 */ "OMNEX Control Systems ULC", /* 26535 */ "Ringland Consulting LLC", /* 26536 */ "Riorey Inc.", /* 26537 */ "Duaxes Corporation", /* 26538 */ "Ionoscape Associates", /* 26539 */ "cudeso.be", /* 26540 */ "matrix technology AG", /* 26541 */ "JHC Plc", /* 26542 */ "Blade Network Technologies, Inc.", /* 26543 */ "AVTOVAZ JSC", /* 26544 */ "SalesForce Australia (Salmat)", /* 26545 */ "CP Secure Inc", /* 26546 */ "Nord Data A/S", /* 26547 */ "Prévoir Vie Portugal", /* 26548 */ "Amper", /* 26549 */ "BluePex do Brasil Tecnologia da Informação Ltda - ME", /* 26550 */ "Gordon Kapes, Inc.", /* 26551 */ "Congreso de los Diputados", /* 26552 */ "CTI Networks, Inc.", /* 26553 */ "ThingMagic, Inc.", /* 26554 */ "NTT IT Co., Ltd.", /* 26555 */ "Ethernet Direct Corporation", /* 26556 */ "Stractus", /* 26557 */ "Associated Network Partners, Inc.", /* 26558 */ "nyukid networks", /* 26559 */ "Jünger Audio-Studiotechnik GmbH", /* 26560 */ "Zynetix Ltd", /* 26561 */ "International Telecommunication Union", /* 26562 */ "TRIADO", /* 26563 */ "Emerj Inc", /* 26564 */ "Studio Technologies, Inc.", /* 26565 */ "Global Knowledge", /* 26566 */ "Obsidian Consulting Group Pty. Ltd.", /* 26567 */ "Mega Solution Inc.", /* 26568 */ "Idyria SARL", /* 26569 */ "Cleartone Video Ltd", /* 26570 */ "DATANIN LTD", /* 26571 */ "Optimal IdM Software, LLC", /* 26572 */ "Dawn VME Products", /* 26573 */ "Dynamics Research Corporation", /* 26574 */ "KB Toys, Inc.", /* 26575 */ "Ian Cairns", /* 26576 */ "Kaufcom GmbH", /* 26577 */ "Credito Emiliano S.p.A", /* 26578 */ "J. Craig Venter Institute", /* 26579 */ "Kaiser Permanente", /* 26580 */ "Rustenbach.de", /* 26581 */ "Clerity Solutions, Inc.", /* 26582 */ "Ativa Soluções Tecnológicas Ltda", /* 26583 */ "Brooman.com, LLC", /* 26584 */ "Reactrix Systems, Inc.", /* 26585 */ "Fremnet", /* 26586 */ "computer betting company gmbh", /* 26587 */ "Nexcom Systems", /* 26588 */ "CT Company Ltd.", /* 26589 */ "CLAIM GmbH & Co. KG", /* 26590 */ "Kynetia Networks S.L.", /* 26591 */ "Polatis Ltd", /* 26592 */ "littlemail", /* 26593 */ "ASOIU departament of NTUU \"KPI\"", /* 26594 */ "Connect Tech Inc.", /* 26595 */ "S-INFORMATION TECHNOLOGY CO., LTD.", /* 26596 */ "Comerica Bank", /* 26597 */ "SUMITOMO OSAKA CEMENT CO.,LTD.", /* 26598 */ "University of Glasgow", /* 26599 */ "China Xiamen Truetel Telecommunications Technologies Co.,Ltd.", /* 26600 */ "Dunham-Bush Yantai Co. Ltd.", /* 26601 */ "Raceme", /* 26602 */ "GEDIM AG", /* 26603 */ "IMA GmbH", /* 26604 */ "PKB Integral", /* 26605 */ "Vidactive, S.L.", /* 26606 */ "Isco International", /* 26607 */ "Wavelength Corporation, Inc.", /* 26608 */ "Pentair, Inc", /* 26609 */ "Ultramain Systems Inc.", /* 26610 */ "Exa Corporation", /* 26611 */ "Kyoto Sangyo University", /* 26612 */ "Audiomedia Ltd.", /* 26613 */ "Government of Republic of Srpska", /* 26614 */ "Noviforum Ltd., Software & Media", /* 26615 */ "University Computing Centre - SRCE, University of Zagreb", /* 26616 */ "Mobitel d.d.", /* 26617 */ "HighTech Passport, Ltd.", /* 26618 */ "Private Higher education establishment Autononymous non-commercial organization Regional Finance and Economy Institute", /* 26619 */ "West University of Timisoara", /* 26620 */ "Technical University of Cluj-Napoca", /* 26621 */ "NJERS Communications", /* 26622 */ "Open Sense Solutions LLC", /* 26623 */ "that's software Berlin", /* 26624 */ "Sopris Surfers Inc.", /* 26625 */ "cativa.net", /* 26626 */ "VIGOS AG", /* 26627 */ "BH Telecom dd Sarajevo", /* 26628 */ "Rumati Computers CC", /* 26629 */ "PBMS Solucoes Moveis em Informatica Ltda", /* 26630 */ "Waterman Group plc", /* 26631 */ "Saunders Properties Pty Ltd", /* 26632 */ "Embedded Internet Solutions, Inc.", /* 26633 */ "BigTribe Corporation", /* 26634 */ "Squid Consulting & Integration", /* 26635 */ "Dexon Software Inc.", /* 26636 */ "OMB Sistemas Electrónicos S.A.", /* 26637 */ "Studio Hamburg Media Consult International GmbH", /* 26638 */ "The Schneider Family Tree", /* 26639 */ "InduSoft Inc.", /* 26640 */ "Yellowbrix", /* 26641 */ "Schoelzel - IT Consulting", /* 26642 */ "XL Vision Group", /* 26643 */ "International Working Group on Taxonomic Databases (TDWG)", /* 26644 */ "Inventive Designers n.v.", /* 26645 */ "Institute for Parallel Processing, BAS", /* 26646 */ "Banco Safra S/A", /* 26647 */ "Avago Technologies Limited", /* 26648 */ "Covidien", /* 26649 */ "Pandora Media Inc.", /* 26650 */ "Propus Informatica Ltda", /* 26651 */ "MELCO HOLDINGS INC.", /* 26652 */ "Shanghai Sunstar Telecom Co.ltd", /* 26653 */ "NTT resonant Inc.", /* 26654 */ "Advantech Co., Ltd", /* 26655 */ "Allan Associates", /* 26656 */ "Ouba", /* 26657 */ "Mikro Network Solutions", /* 26658 */ "Zero9 srl", /* 26659 */ "Robot Bt.", /* 26660 */ "OpenPanel V.O.F.", /* 26661 */ "Alpha Company", /* 26662 */ "Solana Networks Inc.", /* 26663 */ "Centralsoft.org", /* 26664 */ "FaceToFace Software Ltd", /* 26665 */ "Assuria Limited", /* 26666 */ "Epper & Kranz GbR", /* 26667 */ "SixFamily.Net", /* 26668 */ "Sirius Corporation plc", /* 26669 */ "NetEase.com, Inc.", /* 26670 */ "NetSpring, Inc.", /* 26671 */ "NANJING ZIJIN-PHOTEL COMMUNICATION EQUIPMENTS CO.,LTD", /* 26672 */ "Wyndeham Heron Ltd", /* 26673 */ "Klerx EDV Beratung", /* 26674 */ "MessageLabs Ltd", /* 26675 */ "GSF SAS", /* 26676 */ "Datactics Ltd.", /* 26677 */ "Canadian Space Agency", /* 26678 */ "EMCom sp. z o.o.", /* 26679 */ "General Dynamics United Kingdom Limited", /* 26680 */ "Phi Theta Kappa International Honor Society", /* 26681 */ "lohnet.org", /* 26682 */ "Vinci Consulting Corp", /* 26683 */ "Comm/net Systems, Inc.", /* 26684 */ "FOSS MIBs", /* 26685 */ "Softjury GmbH", /* 26686 */ "LG Technology Inc.", /* 26687 */ "Sino-i Technology Ltd.", /* 26688 */ "CAT Telecom Public Company Limited", /* 26689 */ "PRETTL Produktions Holding GmbH", /* 26690 */ "Reichert GmbH", /* 26691 */ "MOBITEL SA", /* 26692 */ "AirPoint Co., Ltd.", /* 26693 */ "Digitals India", /* 26694 */ "Openlink Financial, Inc.", /* 26695 */ "Marvell Semiconductor Inc.", /* 26696 */ "Arces Network, LLC", /* 26697 */ "Net Project SRL", /* 26698 */ "Open Switch Software e Consultoria Ltda", /* 26699 */ "Vulcan Materials Company", /* 26700 */ "Ocean Rock Corp.", /* 26701 */ "Wycliffe Bible Translators of Canada Inc", /* 26702 */ "Pittsburgh Supercomputing Center", /* 26703 */ "Voice Provider Sweden AB", /* 26704 */ "Webbertek (Blunicel Consultoria em Informatica Ltda)", /* 26705 */ "4AM Lunch Inc.", /* 26706 */ "Delphi Corp.", /* 26707 */ "Cerbercomm LTD", /* 26708 */ "LogicIQ Ltd", /* 26709 */ "Elasis S.C.p.A.", /* 26710 */ "Crolox B.V.", /* 26711 */ "Cutter Project Ltd", /* 26712 */ "Stella Doradus Ltd.", /* 26713 */ "ERIS4 s.r.l.", /* 26714 */ "Oberlandesgericht München - IT-Stelle d. Justiz", /* 26715 */ "Ganesh TEchnologies Ltd", /* 26716 */ "Stroeer Out-of-Home Media AG", /* 26717 */ "ELMA Kurtalj d.o.o.", /* 26718 */ "Baluna GmbH", /* 26719 */ "Cressida Technology Ltd.", /* 26720 */ "EAB GmbH Rhein/Main", /* 26721 */ "S-Telecom (S-Fone)", /* 26722 */ "KUME electric Co., Ltd.", /* 26723 */ "e-trees.Japan,Inc.", /* 26724 */ "Eiraku Electric Co.,Ltd.", /* 26725 */ "WireCache, Inc.", /* 26726 */ "Yakshavers Incorporated", /* 26727 */ "Transparency Software Inc.", /* 26728 */ "Sagittar Broadband Communication Solutions", /* 26729 */ "SICS AB", /* 26730 */ "Software Libre de Venezuela 777, C.A.", /* 26731 */ "COMNET Computer Netzwerke Gmbh", /* 26732 */ "RRD S.p.a.", /* 26733 */ "CMYK Energy Software Limited", /* 26734 */ "Dipl. Ing. T. Biel", /* 26735 */ "Weyhmueller.net", /* 26736 */ "Infostream Pty ltd", /* 26737 */ "BEA International FZE", /* 26738 */ "Hans Guentner GmbH", /* 26739 */ "Tein Telecom sa", /* 26740 */ "Etin Systems Co.,Ltd.", /* 26741 */ "Astralogic cc", /* 26742 */ "Lean, LLC", /* 26743 */ "National Bankcard Services Inc", /* 26744 */ "obituariesonline.ca", /* 26745 */ "HEBUS", /* 26746 */ "GoRoam Ltd", /* 26747 */ "Print Fulfillment Services", /* 26748 */ "SL Power Electronics Corp", /* 26749 */ "Access Integrated Technologies, Inc.", /* 26750 */ "Visual Sciences, LLC", /* 26751 */ "Jamul Engineering", /* 26752 */ "Mobile Greetings, Inc.", /* 26753 */ "Asian Institute of Technology", /* 26754 */ "EyeLine Communications CIS LLC", /* 26755 */ "MSE Matthies Softwareentwicklung GmbH", /* 26756 */ "Sibinco LLC", /* 26757 */ "CECURITY.COM", /* 26758 */ "SHF Communication Technologies AG", /* 26759 */ "0x3f8.net", /* 26760 */ "Eszterhazy Karoly College", /* 26761 */ "DDinformatica", /* 26762 */ "Cestel S.A.", /* 26763 */ "Novnet HB", /* 26764 */ "Universitaet Bielefeld, Fakultaet fuer Mathematik", /* 26765 */ ".vantronix secure systems", /* 26766 */ "Alcatel-Lucent TMC", /* 26767 */ "Comune di Rimini", /* 26768 */ "United Technologies Corporation", /* 26769 */ "Virtutility Ltd", /* 26770 */ "Versaterm Inc.", /* 26771 */ "The Royal Conservatoire", /* 26772 */ "Linde IT Services", /* 26773 */ "EFOTEK CO.,LTD.", /* 26774 */ "B2BITS Corp.", /* 26775 */ "maintech GmbH", /* 26776 */ "Declude, Inc.", /* 26777 */ "Nerdboy Services", /* 26778 */ "PPW \"ARAJ\" Sp. z o.o.", /* 26779 */ "GMx Technologies, Inc", /* 26780 */ "Greg Cockerham", /* 26781 */ "TRI-D Systems, Inc.", /* 26782 */ "Tioga Project", /* 26783 */ "Acromate, Inc.", /* 26784 */ "University of Messina", /* 26785 */ "Siet SD Mladost - Ynet", /* 26786 */ "Sociedad de Tasación SA", /* 26787 */ "AbiliSoft Ltd", /* 26788 */ "Webworks Sverige AB", /* 26789 */ "Gilbarco Inc.", /* 26790 */ "Thralling Penguin LLC", /* 26791 */ "Promptlink Communications, Inc.", /* 26792 */ "Gawab", /* 26793 */ "Periodik Labs LLC", /* 26794 */ "Kemnetix Corporation", /* 26795 */ "Meitai technology Co.,Ltd", /* 26796 */ "Asankya Networks, Inc.", /* 26797 */ "Hippo, spol. s r. o.", /* 26798 */ "Rotal.com Ltd.", /* 26799 */ "Jan Welte", /* 26800 */ "Network Chemistry, Inc", /* 26801 */ "UNESP-FC", /* 26802 */ "DITTA DI FEO PASQUALE", /* 26803 */ "Digital Opportunity Trust", /* 26804 */ "Krebs Consulting & IT-Services GmbH & Co. KG", /* 26805 */ "MultiVision Communications", /* 26806 */ "United States Postal Service", /* 26807 */ "Visual Acting GmbH", /* 26808 */ "ENTELIENCE", /* 26809 */ "SKIDATA AG", /* 26810 */ "UNLP", /* 26811 */ "Flexy Enterprise Solutions Ltd.", /* 26812 */ "Uniwersytet Gdañski", /* 26813 */ "BVCOM Media Corporation,Ltd.", /* 26814 */ "Advanced Technologies", /* 26815 */ "DTM Consultoria S/C LTDA", /* 26816 */ "IT Professional d.o.o.", /* 26817 */ "Servicio Nacional de Meteorología e Hidrologia del Perú - SENAMHI", /* 26818 */ "Economists Incorporated", /* 26819 */ "MicroPortal.info", /* 26820 */ "Agent Logic", /* 26821 */ "Beijing Telestone Technology Co.,Ltd.", /* 26822 */ "MarzhillStudios", /* 26823 */ "Conseil Général de Meurthe et Moselle", /* 26824 */ "netWerkz IT Solutions", /* 26825 */ "Eon Corporation", /* 26826 */ "ICT 4 Schools", /* 26827 */ "Han Internetworks Co., Ltd.", /* 26828 */ "S4 Technology Pty Ltd", /* 26829 */ "U.S. Home Systems Inc.", /* 26830 */ "Community High School District 155", /* 26831 */ "Jason Petsod", /* 26832 */ "Barkley Evergreen & Partners", /* 26833 */ "Travel & Accommodation ApS", /* 26834 */ "Southernprint Ltd", /* 26835 */ "INVISTA S.à.r.l", /* 26836 */ "Masaryk Hospital in Usti nad Labem", /* 26837 */ "Haystack Professional Services", /* 26838 */ "Diamedx Inc.", /* 26839 */ "NETWAYS GmbH", /* 26840 */ "Soleo Communications, Inc.", /* 26841 */ "Telio AG", /* 26842 */ "Aker Kvaerner Subsea Ltd", /* 26843 */ "Endeavor Information Systems Inc.", /* 26844 */ "Mark Hooper Ltd", /* 26845 */ "Salford City Council", /* 26846 */ "COLLINS TRUCKING LLC", /* 26847 */ "Deutsche Rentenversicherung Niederbayern-Oberpfalz", /* 26848 */ "Departamento de Engenharia Informática da Universidade de Coimbra", /* 26849 */ "VisionOSS Ltd.", /* 26850 */ "Pénzügyi Szervezetek Állami Felügyelete / Hungarian Financial Supervisory Authority", /* 26851 */ "Consejo General de Colegios Oficiales de Medicos", /* 26852 */ "Mueller & Kanduth OEG", /* 26853 */ "Cherokee International Corporation", /* 26854 */ "CommProve Ltd.", /* 26855 */ "EXCELSIS Business Technology AG", /* 26856 */ "Tocaj", /* 26857 */ "ThemSelves", /* 26858 */ "Compuquest, Inc.", /* 26859 */ "6COM s.r.o.", /* 26860 */ "BM Polyco Ltd", /* 26861 */ "Idilia Inc.", /* 26862 */ "CoreBridge", /* 26863 */ "InSight Health Corp.", /* 26864 */ "Spirit Linux", /* 26865 */ "Gigamon Systems LLC", /* 26866 */ "Infitel Engineering GmbH", /* 26867 */ "European Bank of development of metallurgy industry", /* 26868 */ "Skype Technologies S.A.", /* 26869 */ "ArcheNova Consulting GmbH", /* 26870 */ "Tidomat AB", /* 26871 */ "Stainsby", /* 26872 */ "Aldea Global S.A.", /* 26873 */ "More-IT EOOD", /* 26874 */ "University of Technology of Ho Chi Minh City", /* 26875 */ "ADITEC Inc.", /* 26876 */ "Civic Computing", /* 26877 */ "BroadHop Inc", /* 26878 */ "Nine Systems Corporation", /* 26879 */ "CPUArchitects, Inc.", /* 26880 */ "Univesidad Tecnica Particular de Loja", /* 26881 */ "Child Exploitation and Online Protection Centre", /* 26882 */ "Lilla Grän Data och Elektronik", /* 26883 */ "QuickCircuit", /* 26884 */ "Compu-Share, Inc", /* 26885 */ "Compact Microwave Indonesia", /* 26886 */ "Plenware Group Oy", /* 26887 */ "Caresolve C.V.", /* 26888 */ "NAV E.P.E.", /* 26889 */ "Markus Franzke Software Entwicklung", /* 26890 */ "RCZI FORT", /* 26891 */ "yyovkov.net", /* 26892 */ "St.-Willibrord Gymnasium", /* 26893 */ "Apparatus Inc.", /* 26894 */ "Crimean Internet Service", /* 26895 */ "Efore PLC", /* 26896 */ "Copa Airlines", /* 26897 */ "Nippon C.A.D. Co.,Ltd.", /* 26898 */ "University of Zagreb, Faculty of Science", /* 26899 */ "Andanza Technologies S.A.", /* 26900 */ "No Wires Allowed Pty. Ltd.", /* 26901 */ "Xiamen Longtop System Co., Ltd.", /* 26902 */ "Xytac system technologies", /* 26903 */ "Kathmann Consulting, LLC", /* 26904 */ "Aboundi Inc.", /* 26905 */ "Westfax Inc.", /* 26906 */ "Joe Lewis", /* 26907 */ "Pictor Solutions, Inc.", /* 26908 */ "SUBNET Solutions Inc.", /* 26909 */ "Studentersamfundet ved Aalborg Universitet", /* 26910 */ "Trend Micro Inc.", /* 26911 */ "Cheiron", /* 26912 */ "Group Logic, Inc.", /* 26913 */ "TIME Networks Inc,.", /* 26914 */ "Wolfpac Mobile, Inc.", /* 26915 */ "1822direkt Gesellschaft der Frankfurter Sparkasse mbH", /* 26916 */ "Netconsulting", /* 26917 */ "AF Kursor-Audit Ltd.", /* 26918 */ "Danpex Corporation", /* 26919 */ "TXT e-solutions SpA", /* 26920 */ "MPI for Mathematics", /* 26921 */ "TD2 Consulting, LLC", /* 26922 */ "Baptist Health South Florida", /* 26923 */ "Knewco, Inc.", /* 26924 */ "Enigma Data Solutions Ltd.", /* 26925 */ "Masstech Group, Inc", /* 26926 */ "Extant Networks", /* 26927 */ "Aerohive Networks, Inc.", /* 26928 */ "jv consultant", /* 26929 */ "php-systems.com", /* 26930 */ "Reaktor Innovations Oy", /* 26931 */ "Visma Software ASA", /* 26932 */ "Tridion B.V.", /* 26933 */ "Tattile S.r.l.", /* 26934 */ "Oseo", /* 26935 */ "Ville de Marseille", /* 26936 */ "Yahata Kosei Hospital", /* 26937 */ "Worldgroup Consulting Sdn Bhd", /* 26938 */ "Tenwa Ltd.", /* 26939 */ "The Economist", /* 26940 */ "Johnstone Associates", /* 26941 */ "AIM Professional Systems Ltd", /* 26942 */ "dieMosers.org", /* 26943 */ "Icross Technology", /* 26944 */ "INTECH", /* 26945 */ "Aditi Technologies", /* 26946 */ "MIPC Ltd.", /* 26947 */ "Lambda Research Inc.", /* 26948 */ "InterComputer Corp.", /* 26949 */ "GUST / Ninja Services", /* 26950 */ "RENAULT-NISSAN B.V.", /* 26951 */ "Join Stock Commercial bank \"SOYUZ\"", /* 26952 */ "Astronix Technology Inc.", /* 26953 */ "INdustrias Sola Basic, SA de CV", /* 26954 */ "Avalon Networks LLC", /* 26955 */ "AG04 Innovative Solutions", /* 26956 */ "Kognita", /* 26957 */ "Indu-Sol GmbH", /* 26958 */ "www.brianmichael.org", /* 26959 */ "VEM Manutenção e Engenharia S/A", /* 26960 */ "TantaComm Systems", /* 26961 */ "KPMG International", /* 26962 */ "ISEANE", /* 26963 */ "van Deenen Support", /* 26964 */ "Thomas Parquette", /* 26965 */ "Iskoot Israel Ltd.", /* 26966 */ "Assotiation Mir Ltd", /* 26967 */ "KielNET GmbH", /* 26968 */ "Bisping & Bisping GmbH & Co. KG", /* 26969 */ "Doellken Kunststoffverarbeitung GmbH", /* 26970 */ "Kudra Technical Services", /* 26971 */ "Quetz Limited", /* 26972 */ "Tomato Vine, Inc.", /* 26973 */ "Disk Bridge", /* 26974 */ "CompanyName", /* 26975 */ "NexG Co., Ltd.", /* 26976 */ "Qball Technologies Ltd.", /* 26977 */ "next layer GmbH.", /* 26978 */ "Grenkeleasing AG", /* 26979 */ "Dudley PCT", /* 26980 */ "Schrack Energietechnik GmbH", /* 26981 */ "R2 GmbH", /* 26982 */ "RWD Technologies", /* 26983 */ "Otto-Petersen-Haus", /* 26984 */ "ENET Inc.", /* 26985 */ "Southwest Research Institute", /* 26986 */ "Gemini Mobile Technologies, Inc.", /* 26987 */ "7-Eleven, Inc", /* 26988 */ "INTEGRITY Ltd.", /* 26989 */ "Hudson Digital Systems Inc.", /* 26990 */ "Develer S.r.l.", /* 26991 */ "ENTEL S.A.", /* 26992 */ "Promwad Innovation Company", /* 26993 */ "opensma", /* 26994 */ "Public Joint-Stock Company \"Baltiyskiy Bank\"", /* 26995 */ "Qmax Communications", /* 26996 */ "Studer Professional Audio GmbH", /* 26997 */ "AudioSoft Ltd.", /* 26998 */ "Grace Community Church of Howard County, Inc.", /* 26999 */ "Magistrat Linz, AT", /* 27000 */ "optionsXpress, Inc.", /* 27001 */ "Zayo Group", /* 27002 */ "Trigence Corp", /* 27003 */ "HOT Telecom Ltd.", /* 27004 */ "Hackwerk.net", /* 27005 */ "Chalktime", /* 27006 */ "Luceor S.A.S.", /* 27007 */ "Unified Game", /* 27008 */ "Bitrail Networks", /* 27009 */ "LBM Systems, LLC", /* 27010 */ "Sagamore Systems, Inc", /* 27011 */ "CASAudit, Inc.", /* 27012 */ "TeleDirect International Inc.", /* 27013 */ "CommGate Systems India Pvt Ltd", /* 27014 */ "East Coast Access (PTY) Ltd", /* 27015 */ "Alphito d.o.o.", /* 27016 */ "world-direct eBusiness Solutions GmbH", /* 27017 */ "TDC Switzerland AG", /* 27018 */ "Envision Network Technologies Pvt. Ltd.", /* 27019 */ "Pan Asian Certificate Policy Authority Limited", /* 27020 */ "Pactiv Corp.", /* 27021 */ "Instrumentation Technology Systems Corporation", /* 27022 */ "Nexant, Inc.", /* 27023 */ "I-Connect Inc", /* 27024 */ "VisionAlive GmbH", /* 27025 */ "ILIRIKA D.D.", /* 27026 */ "ESTEAM Software GmbH", /* 27027 */ "Torgservis Ltd.", /* 27028 */ "REH", /* 27029 */ "Wichorus Inc.", /* 27030 */ "CNS Technology Inc.", /* 27031 */ "Sobey Digital Technology Co. Ltd.", /* 27032 */ "OK soft GmbH", /* 27033 */ "Hopling Technologies B.V.", /* 27034 */ "Alamon Telco, Inc.", /* 27035 */ "Mercy College", /* 27036 */ "Netmarks, Inc.", /* 27037 */ "Robot Visual Systems Gmbh", /* 27038 */ "Kehitysyhteistyön palvelukeskus ry.", /* 27039 */ "Royal Canadian Mounted Police", /* 27040 */ "KEMET Corporation", /* 27041 */ "UNIVERSIDAD DE COLIMA", /* 27042 */ "Centro de Informatica e Automacao do Estado de Santa Catarina", /* 27043 */ "CLUSTERPOINT LTD.", /* 27044 */ "Santillana de Ediciones S.A.", /* 27045 */ "Alex Group, spol. s r.o.", /* 27046 */ "ASK Interactive UK Ltd", /* 27047 */ "Opteq Systems International Ltd", /* 27048 */ "Symark Software", /* 27049 */ "Warrior Technology Services, Inc", /* 27050 */ "Chipidea Microelectronica S.A.", /* 27051 */ "Bay Microsystems, Inc.", /* 27052 */ "Omnitromics Pty Ltd", /* 27053 */ "Oneida Baptist Institute", /* 27054 */ "ZANDER LLC.", /* 27055 */ "Zednax Limited", /* 27056 */ "Elektrobit Automotive GmbH", /* 27057 */ "Ventelo Norge AS", /* 27058 */ "SmartSol d.o.o.", /* 27059 */ "interactive instruments", /* 27060 */ "NetSENS SRL", /* 27061 */ "OSTIUM-Soluções de Engenharia Lda", /* 27062 */ "IMocha Consulting Sdn Bhd", /* 27063 */ "University of St. Thomas - Houston", /* 27064 */ "Quagility, Inc.", /* 27065 */ "Rave Wireless, Inc.", /* 27066 */ "Softinbox Inc.", /* 27067 */ "Mooter Media Ltd", /* 27068 */ "Kaon Media Co., Ltd.", /* 27069 */ "DekTec Digital Video B.V.", /* 27070 */ "Hålogaland IKT-Senter as", /* 27071 */ "Euro-emme s.r.l.", /* 27072 */ "Septentrio nv/sa", /* 27073 */ "Point International", /* 27074 */ "RDP B92 a.d.", /* 27075 */ "Zot Inc.", /* 27076 */ "Nanasoft Szoftverfejlesztõ Bt.", /* 27077 */ "lohn.us", /* 27078 */ "AT Promotions Limited", /* 27079 */ "Sequanux", /* 27080 */ "Trimm, Inc.", /* 27081 */ "CESMIC - Centro de Excelência em Servidores de Missão Crítica", /* 27082 */ "Switching Technologies", /* 27083 */ "Arnulf Wiedemann", /* 27084 */ "Greenview Data, Inc.", /* 27085 */ "Texas Transportation Institute", /* 27086 */ "Networking Systems", /* 27087 */ "Supreme Court of New Mexico", /* 27088 */ "Guus Leeuw IT Solutions", /* 27089 */ "Nectia SA", /* 27090 */ "Brilliant Telecommunications Inc.", /* 27091 */ "Astronautics Corporation of America", /* 27092 */ "YUSO.JP", /* 27093 */ "RANEEN", /* 27094 */ "Portfolio Wired", /* 27095 */ "Cadet Family", /* 27096 */ "Aphelion Communications Inc", /* 27097 */ "SOE Software Pty Ltd", /* 27098 */ "Bunda Mulia University", /* 27099 */ "SwiftView, Inc.", /* 27100 */ "EMBARC.biz, LLC", /* 27101 */ "GDMC", /* 27102 */ "Romanian Space Agency (ROSA)", /* 27103 */ "CFT Ltd.", /* 27104 */ "SoftMethod GmbH", /* 27105 */ "Averina Software", /* 27106 */ "Supporting Open Source bvba", /* 27107 */ "Micro Elektronische Producten BV", /* 27108 */ "Barnaul State Pedagogical University", /* 27109 */ "Petrozavodsk State University, Computer Science Department", /* 27110 */ "Adamentium SAS", /* 27111 */ "MATHEMA Software GmbH", /* 27112 */ "APCO Worldwide", /* 27113 */ "electrolyte consulting", /* 27114 */ "Qbit GmbH", /* 27115 */ "Freesystems S.L.L.", /* 27116 */ "Tux-Logic", /* 27117 */ "Grontmij NV", /* 27118 */ "ID90 Technologies", /* 27119 */ "Smar Equipamentos Industriais LTDA", /* 27120 */ "ikirby.net", /* 27121 */ "Shadowcat Systems Ltd.", /* 27122 */ "ICOP Digital, Inc.", /* 27123 */ "Kociok Beratungsgesellschaft mbH", /* 27124 */ "Accuity LLP", /* 27125 */ "Universidade Federal de Sao Carlos", /* 27126 */ "Systems and Software, Inc.", /* 27127 */ "Landeshauptstadt Hannover", /* 27128 */ "Department of Conservation, New Zealand", /* 27129 */ "TehnoCom Ltd.", /* 27130 */ "kk+w GmbH", /* 27131 */ "APIS IT d.o.o.", /* 27132 */ "Hensley, Elam & Associates", /* 27133 */ "Bangladesh Online Limited", /* 27134 */ "77 Elektronika Kft", /* 27135 */ "Osaka Gas Information System Research Institute Co.,Ltd.", /* 27136 */ "Proxicom, Inc.", /* 27137 */ "Techno Viking", /* 27138 */ "My2do Solutions", /* 27139 */ "Acrodyne Industries, Inc.", /* 27140 */ "Applied Informatics Software Engineering GmbH", /* 27141 */ "ALSTEC", /* 27142 */ "DirectPark GmbH", /* 27143 */ "Transact Limited", /* 27144 */ "GrahamCox.co.uk", /* 27145 */ "Infocentr Company Ltd.", /* 27146 */ "Mobissimo, Inc.", /* 27147 */ "ICP-SC", /* 27148 */ "Wenzhou University", /* 27149 */ "Angelltech Co., Ltd.", /* 27150 */ "SK C&C", /* 27151 */ "Institut für Kristallzüchtung Berlin", /* 27152 */ "Matzke Softwareentwicklung", /* 27153 */ "Telekomunikacja Polska S.A.", /* 27154 */ "MR Copiadoras Digitais Ltda.", /* 27155 */ "Warlei Alves", /* 27156 */ "Quartet Financial Systems Inc.", /* 27157 */ "Department of Internal Affairs, New Zealand", /* 27158 */ "Persistent Systems, LLC", /* 27159 */ "PlaSec, Inc.", /* 27160 */ "DeGooroo, Inc.", /* 27161 */ "Serveis de Salut Integrats Baix Empordà", /* 27162 */ "Dolphin Technology Inc", /* 27163 */ "CNET Networks Asia Pacific Pte Ltd", /* 27164 */ "Universidade Tecnológica Federal do Paraná (UTFPR)", /* 27165 */ "Checchia.NET IT Consulting", /* 27166 */ "NIPPON ANTENNA CO.,LTD.", /* 27167 */ "Edward Roper", /* 27168 */ "Erlang Financial System (Pty) Ltd", /* 27169 */ "ETHALON GmbH", /* 27170 */ "Council of the European Union", /* 27171 */ "ArcaBit Ltd.", /* 27172 */ "Software Consulting Markus Bernhardt GmbH", /* 27173 */ "Guenther Mair", /* 27174 */ "iO tech s.r.l.", /* 27175 */ "Avinity Systems BV", /* 27176 */ "Intendencia Municipal de Montevideo", /* 27177 */ "ISIB CNR", /* 27178 */ "Ultri", /* 27179 */ "Frontier Science and Technology Research Foundation, Inc.", /* 27180 */ "Teak Technologies", /* 27181 */ "CAI Networks, Inc.", /* 27182 */ "Bluewave Networks Inc.", /* 27183 */ "UNAVCO", /* 27184 */ "Vendorama LTD", /* 27185 */ "shenzhen qiaowei investment & development co.,Ltd", /* 27186 */ "VALIANT COMMUNICATIONS LIMITED", /* 27187 */ "SEP Software Engineering Partner GmbH", /* 27188 */ "DD NetService GmbH", /* 27189 */ "michaelbreuer.eu", /* 27190 */ "Godalming College", /* 27191 */ "Soongsil University", /* 27192 */ "Patrick Monahan (Drogheda) Ltd", /* 27193 */ "DELTA Resources Inc.", /* 27194 */ "Stadtwerke Duesseldorf AG", /* 27195 */ "Harder Software Ltd.", /* 27196 */ "Heteonix", /* 27197 */ "Réseau pour l'Excellence en Enseignement Supérieur de l'Afrique de l'Ouest(RESAO)", /* 27198 */ "Sepracor Inc.", /* 27199 */ "Energy Options, Inc", /* 27200 */ "Vianel", /* 27201 */ "Business Systems UK Ltd", /* 27202 */ "Celesio AG", /* 27203 */ "Seawolf Technologies Inc.", /* 27204 */ "GridApp Systems, Inc", /* 27205 */ "Bitshift, Berchtold IT Solutions", /* 27206 */ "SevOne Inc", /* 27207 */ "Opinsys Oy", /* 27208 */ "Lendworx, Inc.", /* 27209 */ "Suso Technology Services, Inc.", /* 27210 */ "Engsound Technical Enterprise Co., Ltd.", /* 27211 */ "Routing International NV", /* 27212 */ "Banka Slovenije", /* 27213 */ "Holzhausen Network", /* 27214 */ "MAGIX AG", /* 27215 */ "Patryk Sciborek", /* 27216 */ "Digisense Inc.", /* 27217 */ "GASAG Berliner Gaswerke AG", /* 27218 */ "Funambol, Inc.", /* 27219 */ "EFCO Corporation Inc.", /* 27220 */ "Diebold Software Solutions Inc", /* 27221 */ "Pathway Connectivity Inc.", /* 27222 */ "Alcon Technologies, Inc", /* 27223 */ "OhReally", /* 27224 */ "Chiris Networks, Inc.", /* 27225 */ "Asociación Grupo Universitario de Informática (Universidad de Valladolid)", /* 27226 */ "SC SECPRAL COM SRL", /* 27227 */ "DSP Group Inc.", /* 27228 */ "Engineers Without Borders Canada", /* 27229 */ "E-Portal", /* 27230 */ "Big Sky Computer Systems LLC.", /* 27231 */ "BATM Advanced Communications GmbH", /* 27232 */ "La-Events", /* 27233 */ "PortAuthority Technologies Inc.", /* 27234 */ "Politechnika Gdanska", /* 27235 */ "Netoracle Ltd.", /* 27236 */ "Smart Data Solutions, Inc.", /* 27237 */ "Winbond Electronics Corp.", /* 27238 */ "USC-Satunama", /* 27239 */ "Headnet aps", /* 27240 */ "IDC Informatica s.r.l.", /* 27241 */ "Bilfinger Berger AG", /* 27242 */ "Signal Networks Pvt. Ltd.", /* 27243 */ "IronGate S.L.", /* 27244 */ "Maltacom plc", /* 27245 */ "Järfälla Kommun, För- och Grundskolor", /* 27246 */ "Radian Group Inc.", /* 27247 */ "Computer Programs and Systems Inc. (CPSI)", /* 27248 */ "Picosoft Ltd.", /* 27249 */ "West Linn Paper Company", /* 27250 */ "MedStreaming", /* 27251 */ "Excapsa Services Inc.", /* 27252 */ "AusRegistry Pty Ltd", /* 27253 */ "FIX Flyer LLC", /* 27254 */ "Tarkhany Regional (County) Open Joint-Stock Bank", /* 27255 */ "NPF \"KRUG\"", /* 27256 */ "Valimo Wireless Oy", /* 27257 */ "NovaSecure AS", /* 27258 */ "BEL POWER SOLUTIONS", /* 27259 */ "DynaPel Systems Inc.", /* 27260 */ "Servicios Avanzados para las Instituciones S.L.", /* 27261 */ "DANTE Ltd.", /* 27262 */ "Netsmart Public Health, Inc.", /* 27263 */ "Nmodel", /* 27264 */ "Inlet Technologies, Inc.", /* 27265 */ "freecode", /* 27266 */ "Encryptanet, Inc.", /* 27267 */ "Hangar Eighteen Enterprises LLC", /* 27268 */ "Mynavi Corporation", /* 27269 */ "KoSyS - Kockisch ITK Systems and Services", /* 27270 */ "Structured Software Systems Ltd", /* 27271 */ "Envisioneering Medical Technologies", /* 27272 */ "Infinite Video Corporation", /* 27273 */ "Fastfeed Inc.", /* 27274 */ "Alexcoder", /* 27275 */ "Technovare Systems, Inc.", /* 27276 */ "SatPath Systems, Inc.", /* 27277 */ "Sindoricoh Co., Ltd.", /* 27278 */ "GoldenNet Technology Inc.", /* 27279 */ "Università Degli Studi di Urbino \"Carlo Bo", /* 27280 */ "Netcon Systems", /* 27281 */ "Realtek Semiconductor corp.", /* 27282 */ "Xcenium Technology", /* 27283 */ "Daon Trusted Identity Services", /* 27284 */ "The Nisu research team", /* 27285 */ "Netopia, Inc.", /* 27286 */ "University Of Perugia", /* 27287 */ "MySystemAdmin", /* 27288 */ "eGistics, Inc.", /* 27289 */ "Beijing Osee Digital Technology Co.Ltd", /* 27290 */ "Bundesministerium für Verkehr, Bau und Stadtentwicklung", /* 27291 */ "Topex S.A", /* 27292 */ "Melian Italia SRL", /* 27293 */ "MacSpecialist", /* 27294 */ "Axel Technology srl", /* 27295 */ "Blizzard Entertainment", /* 27296 */ "SchechterTech LLC", /* 27297 */ "Asia Pacific Broadband Wireless Communications", /* 27298 */ "Informed Computing", /* 27299 */ "TRANSCOM TECHNOLOGIES CO.,LTD", /* 27300 */ "galaxy.io", /* 27301 */ "Der Senator für Bildung und Wissenschaft", /* 27302 */ "Clear Value", /* 27303 */ "DKT A/S", /* 27304 */ "Satis Superque Merce BV", /* 27305 */ "Automated Computing Machinery, S.L.", /* 27306 */ "Rankin County School District", /* 27307 */ "Unique Communications Inc.", /* 27308 */ "SSRC Media, LLC", /* 27309 */ "NetIDEAS, Inc.", /* 27310 */ "Seni Systems, Inc.", /* 27311 */ "EDA LTD.", /* 27312 */ "Sintrex Integration Services Pty. Ltd.", /* 27313 */ "Del Systems d.o.o.", /* 27314 */ "Internet Management Technology Laboratory", /* 27315 */ "Schoeppner", /* 27316 */ "Extreme Engineering Solutions, Inc", /* 27317 */ "ISE Inc.", /* 27318 */ "Nexen Inc.", /* 27319 */ "Kingsbury Inc.", /* 27320 */ "Ready Technology (UK) Limited", /* 27321 */ "21Net Ltd.", /* 27322 */ "Kei Communication Technology Inc.", /* 27323 */ "Semejny Doktor", /* 27324 */ "Ubiquitech A/S", /* 27325 */ "EUIT Telecomunicacion, Universidad Politécnica de Madrid", /* 27326 */ "Mobizoom AG", /* 27327 */ "ROSA - Dansk Rock Samråd", /* 27328 */ "Business Education Council of Niagara", /* 27329 */ "LKHP Inc.", /* 27330 */ "JTG 99 ApS", /* 27331 */ "Sogeti", /* 27332 */ "Buzz Systems Ltd.", /* 27333 */ "Multidyne Electronics Inc.", /* 27334 */ "Ritek ZRt.", /* 27335 */ "Converged Access, Inc.", /* 27336 */ "CableServ Inc.", /* 27337 */ "ATEME", /* 27338 */ "Project Automation S.p.A.", /* 27339 */ "OpenVPN Solutions LLC.", /* 27340 */ "Medianstrip", /* 27341 */ "Haskology Consulting", /* 27342 */ "\"Telekom Srbija\" a.d.", /* 27343 */ "Dallmeier electronic GmbH & Co.KG", /* 27344 */ "Alticor, Inc", /* 27345 */ "VDA Elettronica spa", /* 27346 */ "Alexandrow Webhosting", /* 27347 */ "Blue Spruce Technologies, Inc.", /* 27348 */ "Lonardi.org", /* 27349 */ "QEW Europe", /* 27350 */ "Medizinische Fakultät Carl Gustav Carus Dresden an der Technischen Universität Dresden", /* 27351 */ "MAYWIDE TECHNOLOGY CO.,LTD.", /* 27352 */ "ELTA", /* 27353 */ "epona.org", /* 27354 */ "University Politechnical of Bucharest", /* 27355 */ "DWESAB Engineering", /* 27356 */ "ANDROME NV", /* 27357 */ "Technology Dynamics, Inc.", /* 27358 */ "HILTRON GmbH", /* 27359 */ "NLS Technology LLC", /* 27360 */ "Rizon Software Technology Co.,Ltd.", /* 27361 */ "Symbio Technologies, LLC", /* 27362 */ "TvHead, Inc.", /* 27363 */ "Axioma Inc.", /* 27364 */ "Softech Worldwide LLC", /* 27365 */ "INSIGNIA MOBILE COMMUNICATIONS,C.A.", /* 27366 */ "Visonys AG", /* 27367 */ "Business I.T. Systems Ltd", /* 27368 */ "Estçe Lauder Inc", /* 27369 */ "Hennepin County", /* 27370 */ "AspellClark", /* 27371 */ "Progenist Systems Inc.", /* 27372 */ "Quickpoint Solutions Limited", /* 27373 */ "MakeITOpen.Net", /* 27374 */ "IT-Systemhaus Thomas Wiese", /* 27375 */ "Triple-It ApS", /* 27376 */ "Groupster", /* 27377 */ "Belden", /* 27378 */ "NESS Consulting Ltd", /* 27379 */ "PCS Process Control Systems AG", /* 27380 */ "Myndit Pty Ltd", /* 27381 */ "OmniAccess S.L.", /* 27382 */ "Theo Benning GmbH & CoKG", /* 27383 */ "Werner Industrielle Elektronik", /* 27384 */ "ELCON Systemtechnik GmbH", /* 27385 */ "Farmers Group Inc.", /* 27386 */ "IHOP Corp.", /* 27387 */ "Wiremat Ltd", /* 27388 */ "Splunk, Inc.", /* 27389 */ "iCoGo Inc.", /* 27390 */ "Braintribe IT Technologies", /* 27391 */ "SCHILLER", /* 27392 */ "Metrovacesa, S.A.", /* 27393 */ "NOSMadeira", /* 27394 */ "AVANSI C. por A.", /* 27395 */ "Open Journal Project", /* 27396 */ "Praxis Balster-De Beer", /* 27397 */ "Bernd Haug", /* 27398 */ "Ross Video Limited", /* 27399 */ "Randolph-Macon College", /* 27400 */ "Dataupia Corporation", /* 27401 */ "TaTrad GmbH", /* 27402 */ "Frontier IT", /* 27403 */ "SimpleComTools", /* 27404 */ "René Faigle AG", /* 27405 */ "Center Communication Systems GmbH", /* 27406 */ "BUROTEC", /* 27407 */ "Hotelplan AG", /* 27408 */ "Mondi Packaging AG", /* 27409 */ "SkoleSYS A/S", /* 27410 */ "Curtis J Coleman", /* 27411 */ "Icsoft Pty Ltd", /* 27412 */ "Labs2 i Lund AB", /* 27413 */ "Stadt Chemnitz", /* 27414 */ "SiRF Technology, Inc.", /* 27415 */ "Elvaco AB", /* 27416 */ "FAST TV-SERVER AG", /* 27417 */ "FiSEC GmbH", /* 27418 */ "University of New England", /* 27419 */ "Southside Community Hospital", /* 27420 */ "Synergy for Smart Solutions", /* 27421 */ "Inter Cars S.A.", /* 27422 */ "Potts Mullarkey", /* 27423 */ "Firstin Wireless Technology", /* 27424 */ "Affinity Mobile, Inc.", /* 27425 */ "VIASOFT Ltd., Ukraine", /* 27426 */ "Vecima Networks Inc.", /* 27427 */ "Intesys S.r.l.", /* 27428 */ "IT Service Zahner", /* 27429 */ "Call Genie Inc", /* 27430 */ "Steton Technology Group, Inc.", /* 27431 */ "Archalien.com", /* 27432 */ "Centeris Corporation", /* 27433 */ "Hal's Software, Inc.", /* 27434 */ "Aozora Information Systems Co. Ltd.", /* 27435 */ "Jefferies & Company, Inc.", /* 27436 */ "TOA Corporation", /* 27437 */ "Eric Lindahl", /* 27438 */ "OpenAgentSystem", /* 27439 */ "Ingo Lantschner", /* 27440 */ "PEM GmbH", /* 27441 */ "SAPERION AG", /* 27442 */ "yLabs SRL", /* 27443 */ "Murphy Software B.V.", /* 27444 */ "InforMed, LLC", /* 27445 */ "PAHL.NET systems", /* 27446 */ "Femtio Procent Data AB", /* 27447 */ "The Aero Group, Inc.", /* 27448 */ "Universidad de Buenos Aires", /* 27449 */ "RealOrganized, Inc.", /* 27450 */ "Aurcon Computer Services", /* 27451 */ "Billings Clinic", /* 27452 */ "LANE COMPANY", /* 27453 */ "NeoMentis Ltd", /* 27454 */ "Schlesinger Associates, Inc.", /* 27455 */ "University of Warwick", /* 27456 */ "Joomla! (OpenSourceMatter Inc)", /* 27457 */ "Flo Healthcare", /* 27458 */ "INTLNET", /* 27459 */ "Digital Maelstrom LLC", /* 27460 */ "Knit One Pearl One", /* 27461 */ "Bubble Motion Pte Ltd", /* 27462 */ "ThüCom GmbH", /* 27463 */ "Projekty Bankowe Polsoft sp. z o.o.", /* 27464 */ "Domodesk S.L.", /* 27465 */ "Inter IKEA Systems BV", /* 27466 */ "NETHINKS GmbH", /* 27467 */ "ELTA-R", /* 27468 */ "Glowlink Communications Technology Inc.", /* 27469 */ "Kuorem IT Consulting s.l.", /* 27470 */ "Kotelett Group", /* 27471 */ "Peak Web Consulting, Inc.", /* 27472 */ "Consejo de la Magistratura de la Ciudad Autonoma de Buenos Aires", /* 27473 */ "Multi Co", /* 27474 */ "CiriTech Systems, Inc.", /* 27475 */ "MicsGarage", /* 27476 */ "Ethrix ltd.", /* 27477 */ "Boekingspunt Nederland BV", /* 27478 */ "Projekt 42! GmbH", /* 27479 */ "FORSIS GmbH", /* 27480 */ "Arzl Datentechnik", /* 27481 */ "G2 Microsystems Pty Ltd", /* 27482 */ "OpenSIPS.ORG", /* 27483 */ "Eightwire.com Limited", /* 27484 */ "JSC Public Key Infrastructure", /* 27485 */ "swissgeek.org", /* 27486 */ "Kent County Council", /* 27487 */ "A.T.U Handels GmbH", /* 27488 */ "Evangelisch-Lutherische Landeskirche in Braunschweig", /* 27489 */ "SP Swedish National Testing and Research Institute", /* 27490 */ "Freeport Technologies Inc.", /* 27491 */ "Major Hospital", /* 27492 */ "Dirección de Tecnología Educativa", /* 27493 */ "Seatore Technology", /* 27494 */ "Optiway", /* 27495 */ "MALAIWAH.COM", /* 27496 */ "Fiducial Staffing", /* 27497 */ "Innovative Technology Solutions, LLC", /* 27498 */ "Operations Feedback Systems Pty. Ltd.", /* 27499 */ "Dawning Ltd.", /* 27500 */ "Seldon Systems, Inc.", /* 27501 */ "ARAB BANKING COPORATION", /* 27502 */ "TD Computer Solutions GmbH & Co. KG", /* 27503 */ "Celtius Ltd", /* 27504 */ "KT-NET Communications GmbH", /* 27505 */ "Object Builder Software - Bulgaria", /* 27506 */ "Automation Control Products Inc.", /* 27507 */ "TravelCenters of America", /* 27508 */ "Creanord Ltd.", /* 27509 */ "NetGain Systems Pte. Ltd.", /* 27510 */ "Gigante Inc.", /* 27511 */ "M3 Technology Group", /* 27512 */ "Pro-E Automation Sdn Bhd", /* 27513 */ "QTECH LLC", /* 27514 */ "Stockholms stad", /* 27515 */ "NIVC AS", /* 27516 */ "GT50 Srl", /* 27517 */ "ProMedica Health System", /* 27518 */ "Pozicom Technologies, Inc.", /* 27519 */ "International Electronic Communication Analysts (IECA), Inc.", /* 27520 */ "eMusic.com, Inc.", /* 27521 */ "Municipio de la Ciudad de Monterrey", /* 27522 */ "runlevel3 GmbH", /* 27523 */ "TRIAX CZ s.r.o.", /* 27524 */ "DET 1 AFEREG", /* 27525 */ "Kanazawa University", /* 27526 */ "ABB Ltd", /* 27527 */ "Dragon Stock labo Inc.", /* 27528 */ "dri, Consultoria Informática Lda", /* 27529 */ "decontis GmbH", /* 27530 */ "Planned IT Solutions, Inc.", /* 27531 */ "Hancock Regional Hospital", /* 27532 */ "BKE a.s.", /* 27533 */ "Widestore srl", /* 27534 */ "Artwork Systems nv", /* 27535 */ "SANTECLAIR", /* 27536 */ "Educatio Public Services Non-profit Llc.", /* 27537 */ "ADTSystems s.r.o.", /* 27538 */ "Pacific DataVision, Inc.", /* 27539 */ "SIMPPLE S.L.", /* 27540 */ "ITSSeevia Group", /* 27541 */ "COSAT INC.", /* 27542 */ "Gillware Data Services, LLC", /* 27543 */ "NSK OpenSource, Inc", /* 27544 */ "NINOMIYA TOWN", /* 27545 */ "American University of Beirut", /* 27546 */ "Four Batons Technology", /* 27547 */ "KRS Hardware Monitoring Development", /* 27548 */ "TELESANTE AQUITAINE", /* 27549 */ "Alchemy Group Limited", /* 27550 */ "Farheap Solutions Inc.", /* 27551 */ "Nimbus, Inc.", /* 27552 */ "Salem Academy and College", /* 27553 */ "PureTech Systems Inc.", /* 27554 */ "Rosum Corporation", /* 27555 */ "The PTR Group Inc", /* 27556 */ "Botech AB", /* 27557 */ "IHMC", /* 27558 */ "Data Science Group, Inc", /* 27559 */ "Alan Dick and Company Ltd", /* 27560 */ "Indeca", /* 27561 */ "daemon software", /* 27562 */ "QStar Technologies, Inc.", /* 27563 */ "UNIFAL-MG - Universidade Federal de Alfenas", /* 27564 */ "Ministerio de Industria Turismo y Comercio", /* 27565 */ "Vizrt", /* 27566 */ "Baur GmbH", /* 27567 */ "Kupetto", /* 27568 */ "National Digital Medical Archive, Inc.", /* 27569 */ "GiaRoCo", /* 27570 */ "Guenther Brunthaler EDV Dienstleistungen", /* 27571 */ "CEOS Integradores de Sistemas C.A.", /* 27572 */ "TechGuard Security, LLC", /* 27573 */ "10MT Co.", /* 27574 */ "DSL Internet Corporation", /* 27575 */ "Envysion, Inc", /* 27576 */ "R. D. Pierce", /* 27577 */ "cartchunk.org", /* 27578 */ "Keltron Corporation", /* 27579 */ "Integrity Soluções em Informática Sociedade Simples", /* 27580 */ "Netum Oy", /* 27581 */ "pH Group Ltd", /* 27582 */ "Metronik d.o.o.", /* 27583 */ "Upplysningscentralen AB", /* 27584 */ "Orange Nederland BV", /* 27585 */ "Altai Technologies Limited", /* 27586 */ "Shinto Densan Corporation", /* 27587 */ "KingsIsle Entertainment, Inc.", /* 27588 */ "ZBN (Zhengzhou Broadcasting TV Network) Co. Ltd.", /* 27589 */ "Cardinal Information Systems Ltd.", /* 27590 */ "Bit-Side GmbH", /* 27591 */ "Beijing NetEast Technologies Corporation Ltd", /* 27592 */ "Media Excel, Inc.", /* 27593 */ "Skipper Wireless, Inc.", /* 27594 */ "NWP-Technologie Informatyczne", /* 27595 */ "NONNIC", /* 27596 */ "CADIGS Ltd.", /* 27597 */ "Ayuntamiento de Madrid - Policia Municipal", /* 27598 */ "BIT-Kazan Ltd.", /* 27599 */ "C?!., C por A", /* 27600 */ "Higher Institute for Applied Sciences and Technology (HIAST)", /* 27601 */ "Woodforest National Bank", /* 27602 */ "Groove Mobile", /* 27603 */ "Tetralogyx", /* 27604 */ "Urzad Miasta Stolecznego Warszawy", /* 27605 */ "Global NetWatch, Incorporated", /* 27606 */ "Skin and Cancer Foundation Inc.", /* 27607 */ "Wuhan Yangtze Optical Technology Co., Ltd", /* 27608 */ "Dash Navigation Inc.", /* 27609 */ "Solarcore, Inc.", /* 27610 */ "Traffix Systems Ltd", /* 27611 */ "SmartStream Technologies", /* 27612 */ "AlbaNova University Center, the Stockholm Center for Physics, Astronomy and Biotechnology", /* 27613 */ "Ascom Sweden AB", /* 27614 */ "devolo", /* 27615 */ "Phaedrus Ltd", /* 27616 */ "PayEx Solutions AB", /* 27617 */ "Sihl + Eika Papier AG", /* 27618 */ "BeWAN Systems", /* 27619 */ "GS1 Uruguay", /* 27620 */ "National Information Technologies JSC", /* 27621 */ "Open Communication Security S.A.", /* 27622 */ "Shavlik Technologies LLC", /* 27623 */ "Metanoia Communications Inc.", /* 27624 */ "UZ Brussel", /* 27625 */ "SK-NIC, a.s.", /* 27626 */ "Ceskoslovenska obchodni banka, a.s.", /* 27627 */ "Unum Group", /* 27628 */ "Helenic Ministry of Interior Public Administration and Decentralization / Helenic Public Administra", /* 27629 */ "OSI ste civile etudes et recherches", /* 27630 */ "Touchstone Technologies Inc.", /* 27631 */ "MVNO Sherpa", /* 27632 */ "Eternix Ltd.", /* 27633 */ "ABC Phones of NC Inc.", /* 27634 */ "Wholesale Communications Group P/L", /* 27635 */ "F. Camara Informática Ltda", /* 27636 */ "Lateral Networks Ltd", /* 27637 */ "Gulf Interstate Engineering", /* 27638 */ "Nashua Mobile (Pty) Ltd", /* 27639 */ "Telefonica Moviles España, S.A.", /* 27640 */ "Junta de Extremadura", /* 27641 */ "Manuel Linsmayer", /* 27642 */ "Zeda Ltd.", /* 27643 */ "CFC Informationssysteme Entwicklungsgesellschaft m.b.H.", /* 27644 */ "PostgreSQL Global Development Group", /* 27645 */ "Systems Engineering & Assessment Ltd", /* 27646 */ "Iskra Zascite d.o.o.", /* 27647 */ "ESPCI", /* 27648 */ "Hay Systems Limited", /* 27649 */ "Herward Hoyer", /* 27650 */ "ProConsultant Informatique", /* 27651 */ "SUNY", /* 27652 */ "MyRunning.com", /* 27653 */ "Tain Malta Ltd.", /* 27654 */ "IFP", /* 27655 */ "HafenCity Universität Hamburg", /* 27656 */ "Hugh McLenaghan", /* 27657 */ "Agemarks Technologies", /* 27658 */ "Atol, Conseils et Développements", /* 27659 */ "Deutsche Welle", /* 27660 */ "GateSquare Co., Ltd.", /* 27661 */ "PePWave Ltd.", /* 27662 */ "AFP548.com", /* 27663 */ "Intuicom, Inc.", /* 27664 */ "ISR Inc.", /* 27665 */ "NF Media Inc.", /* 27666 */ "Apprion, Inc", /* 27667 */ "Olivier Molteni", /* 27668 */ "easyRAID", /* 27669 */ "Tirol Kliniken GmbH.", /* 27670 */ "ATL Systems, Inc.", /* 27671 */ "Electool Systems Kft.", /* 27672 */ "QUOD Financial SA", /* 27673 */ "Mobibrasil Soluçoes Interactivas pela internet", /* 27674 */ "Curtiss-Wright Controls, Inc.", /* 27675 */ "Motionbox, Inc", /* 27676 */ "Evolution Broadcast Pty. Ltd.", /* 27677 */ "Jazzio", /* 27678 */ "The Hyde Company", /* 27679 */ "NEMO ENG", /* 27680 */ "Technorati Inc", /* 27681 */ "ALBA Software S.L.", /* 27682 */ "Mscorp Venezuela C.A.", /* 27683 */ "Idopte", /* 27684 */ "Trent University", /* 27685 */ "Refactored Networks, LLC", /* 27686 */ "DataMirror Corporation", /* 27687 */ "Keane, Inc.", /* 27688 */ "Enertel Wireless BV", /* 27689 */ "Arqiva", /* 27690 */ "Framework Computer Consultants Limited", /* 27691 */ "Thinware s.r.l.", /* 27692 */ "Voith AG", /* 27693 */ "UTU Inc.", /* 27694 */ "Meteor Mobile", /* 27695 */ "AttoSense", /* 27696 */ "GRAVITY CIS INC", /* 27697 */ "Vaal Hosting", /* 27698 */ "Tyche Enterprises, LLC", /* 27699 */ "Open Diameter Project", /* 27700 */ "Origin Electric co.,Ltd.", /* 27701 */ "Beijing Softtone Company, Ltd.", /* 27702 */ "CABO Communications A/S", /* 27703 */ "Keisokugiken Corporation", /* 27704 */ "1984 ehf", /* 27705 */ "E-commerce-xhtml 1.1 dot com", /* 27706 */ "Siminn", /* 27707 */ "ISB Brachert", /* 27708 */ "Software Applications", /* 27709 */ "hostNET Medien GmbH", /* 27710 */ "1053935 Alberta Ltd.", /* 27711 */ "Managing Company SB JSC", /* 27712 */ "Ethon", /* 27713 */ "Arne Steinkamm", /* 27714 */ "Posterity Technologies Co. Ltd", /* 27715 */ "Minnesota State Colleges and Universities", /* 27716 */ "CeDoc Modena", /* 27717 */ "Selfservix IT-Service", /* 27718 */ "Vizioncore, Inc.", /* 27719 */ "SBone.DE", /* 27720 */ "Dotster, Inc.", /* 27721 */ "Pennic Consulting Inc", /* 27722 */ "Permessa Corporation", /* 27723 */ "Opticomm Corporation", /* 27724 */ "Asurion", /* 27725 */ "Executive Coach Inc.", /* 27726 */ "Antartec S.A.C.", /* 27727 */ "Datron World Communications, Inc", /* 27728 */ "US Technology Resources LLC", /* 27729 */ "Leporis Corporation", /* 27730 */ "Western Power", /* 27731 */ "OnionSoftware, Inc.", /* 27732 */ "ASW Systems s.r.o.", /* 27733 */ "Squitel", /* 27734 */ "YawaBureau s.r.l.", /* 27735 */ "Smile Ltd.", /* 27736 */ "Berendsen Group Services GmbH", /* 27737 */ "VERIT Verwaltungs- und Immobilien-Gesellschaft", /* 27738 */ "Taunis GmbH", /* 27739 */ "ADFC LV Berlin e.V.", /* 27740 */ "AAA Carolinas", /* 27741 */ "Flying Horse Studios", /* 27742 */ "Shaney", /* 27743 */ "Majik Networks Inc.", /* 27744 */ "4Step Ltd.", /* 27745 */ "The institute of science and technology", /* 27746 */ "CAMINO MO", /* 27747 */ "Canon Korea Business Solutions Inc.", /* 27748 */ "Stennis Institute of Government", /* 27749 */ "GoodsoftwareLab Co. Ltd.", /* 27750 */ "Firefly FZ LLC", /* 27751 */ "4A Consulting AB", /* 27752 */ "Nucleo Operacional para a Sociedade de Informação (NOSI)", /* 27753 */ "Affinite Corporation", /* 27754 */ "FiveRuns", /* 27755 */ "Renaissoft, Inc.", /* 27756 */ "Solis Energy, Inc.", /* 27757 */ "ServiceSoft Sdn. Bhd.", /* 27758 */ "Sense8 UK Ltd.", /* 27759 */ "Novo Mundo Moveis e Utilidades Ltda", /* 27760 */ "System One GmbH", /* 27761 */ "Fixe-Post", /* 27762 */ "Accuratus Consulting, LLC.", /* 27763 */ "DONG Energy A/S", /* 27764 */ "Welltrans O&E Technology Co. , Ltd.", /* 27765 */ "Grid Net, Inc.", /* 27766 */ "JavaService Consulting", /* 27767 */ "Gesellschaft für Netzwerk- und Automatisierungs-Technologie mbH (N.A.T.)", /* 27768 */ "Université de Perpignan Via Domitia", /* 27769 */ "MIS Corporate Defence Solutions", /* 27770 */ "EVOLIS", /* 27771 */ "Sidon GmbH", /* 27772 */ "Zabiuk", /* 27773 */ "CenturyTel, Inc.", /* 27774 */ "Site Monitoring Solutions Inc.", /* 27775 */ "IDAC Ltd.", /* 27776 */ "Auptyma Corporation", /* 27777 */ "UnState educational establishment of additional education \"Educational center \"Meson\"", /* 27778 */ "OFFRATEL", /* 27779 */ "Public Surplus, LLC", /* 27780 */ "Ministerio de Empleo y Seguridad Social", /* 27781 */ "OnFin", /* 27782 */ "Mulder Innova BV", /* 27783 */ "Sensata Technologies", /* 27784 */ "Vialogy", /* 27785 */ "Five Mile Capital Partners, LLC", /* 27786 */ "Compart AG", /* 27787 */ "eco-warehouse", /* 27788 */ "Catalina Technologies", /* 27789 */ "S5 Wireless Inc", /* 27790 */ "eMobile Networks Inc.", /* 27791 */ "Editure Ltd", /* 27792 */ "mythofbutterfly.com", /* 27793 */ "GENETEC Corporation", /* 27794 */ "Guardian Equipamentos Eletronicos Ltda", /* 27795 */ "Embedded Control Logic Corp.", /* 27796 */ "Nata-Info Ltd.", /* 27797 */ "SES NEW SKIES B.V.", /* 27798 */ "7iD Technologies GmbH", /* 27799 */ "PKE Electronics AG", /* 27800 */ "Fejer Megyei Szent Gyorgy Hospital", /* 27801 */ "NEXPLORE", /* 27802 */ "HTH Consulting GmbH", /* 27803 */ "Bernard Matthews Foods Ltd.", /* 27804 */ "Compagnia Assicuratrice Unipol S.p.A", /* 27805 */ "University of Malta", /* 27806 */ "Hawa AG", /* 27807 */ "SKELVISION SARL", /* 27808 */ "La Mamma Ind. de Alimentos Ltda.", /* 27809 */ "Qovo Systems", /* 27810 */ "Ellsworth School System", /* 27811 */ "voipDS - Voice Over IP Directory Services", /* 27812 */ "linux-on.com", /* 27813 */ "Chiang Family", /* 27814 */ "Advanced UniByte GmbH", /* 27815 */ "WES Power Technology Inc.", /* 27816 */ "Thorcom Systems Ltd.", /* 27817 */ "Vapo Oy", /* 27818 */ "Calaveras Internet", /* 27819 */ "121Media Inc.", /* 27820 */ "Unihost Partnership", /* 27821 */ "Comtech Mobile Datacom", /* 27822 */ "Marienfeld Multimedia GmbH", /* 27823 */ "Renzoo Ltd", /* 27824 */ "Battery Force Ltd.", /* 27825 */ "Bharat Forge Kilsta AB", /* 27826 */ "i-Solutions AB", /* 27827 */ "St. Paul's Cardiac Electrophysiology, Ltd.", /* 27828 */ "Mira Networks (Pty) Ltd", /* 27829 */ "Epitiro Ltd", /* 27830 */ "Itexis SARL", /* 27831 */ "Thomas Bauer", /* 27832 */ "Bizvox Consultoria e Tecnologia de Voz Ltda", /* 27833 */ "Consumers Energy Corporation", /* 27834 */ "Gemstar - TV Guide International, Inc.", /* 27835 */ "jag-stang.ch", /* 27836 */ "HanDreamNet", /* 27837 */ "Host Grad Inc.", /* 27838 */ "Markus Boas", /* 27839 */ "polygon", /* 27840 */ "IP Networks Ltd", /* 27841 */ "Klebanov", /* 27842 */ "Internet Computing & Security Laboratory", /* 27843 */ "iVEC", /* 27844 */ "Netcube Technologies,Inc", /* 27845 */ "Prill Tecnologia Ltda", /* 27846 */ "VirtenSys Ltd.", /* 27847 */ "Itron GmbH", /* 27848 */ "American Research Institute", /* 27849 */ "LiquidXStream Systems Inc", /* 27850 */ "Video Furnace, Inc.", /* 27851 */ "GUANGZHOU ZHIYUAN ELECTRONIC CO.,LTD.", /* 27852 */ "mconsultancy", /* 27853 */ "Petr Kutalek", /* 27854 */ "Interactions Corporation", /* 27855 */ "The Council of Australian University Directors of Information Technology", /* 27856 */ "J. Gordon Electronic Design", /* 27857 */ "University of Delhi", /* 27858 */ "Rapid Information & Communication co. Ltd", /* 27859 */ "DMS Group", /* 27860 */ "FILS COMMUNICATIONS LTD", /* 27861 */ "AtNOC Corn Zauner OEG", /* 27862 */ "DSR Communications Pty Ltd", /* 27863 */ "VOCEL, Inc.", /* 27864 */ "Tellvox S.A.", /* 27865 */ "Logictec", /* 27866 */ "Entic Services", /* 27867 */ "GuardTime AS", /* 27868 */ "Microprocessador - Sistemas Digitais, SA", /* 27869 */ "Hooghuis lyceum", /* 27870 */ "shee consultants", /* 27871 */ "FPT Corporation", /* 27872 */ "The Bridgeman Art Library Ltd", /* 27873 */ "eurotel spa", /* 27874 */ "Zenulta Ltd", /* 27875 */ "ResponsFabrikken Serviços de Telecomunicações Ltda.", /* 27876 */ "Blustaff S.p.A.", /* 27877 */ "agenos GmbH", /* 27878 */ "CTDI Nethouse Services GmbH", /* 27879 */ "FreeSWITCH", /* 27880 */ "KCS Digital, Inc.", /* 27881 */ "Puryear Information Technology, LLC", /* 27882 */ "Extension7", /* 27883 */ "Dom Finansowy QS", /* 27884 */ "National City Corporation", /* 27885 */ "Blacknight Internet Solutions Ltd", /* 27886 */ "TUI-NET", /* 27887 */ "AxesNetwork Solutions inc.", /* 27888 */ "Beijing Huamei Netwave Technology Co.,Ltd.", /* 27889 */ "Roundbox Inc.", /* 27890 */ "Intercomgi Argentina S.R.L.", /* 27891 */ "Navaneethan Shenoy", /* 27892 */ "DMS", /* 27893 */ "Cube Optics AG", /* 27894 */ "ISHD - Inline-Skaterhockey Deutschland", /* 27895 */ "Harpa Italia Srl", /* 27896 */ "QSI srl", /* 27897 */ "RAILOG SPA", /* 27898 */ "STC Raduga", /* 27899 */ "IT-Optics sa", /* 27900 */ "Pier 29 Networks CC", /* 27901 */ "Iris, FGUP PKP", /* 27902 */ "Ingenieurbuero fuer EDV und Netzwerktechnik - Stefan Hartmann", /* 27903 */ "Suncorp-Metway Ltd", /* 27904 */ "Universitaet Wuerzburg", /* 27905 */ "Community4you GmbH", /* 27906 */ "tvtv Services a branch of Sony United Kingdom Ltd.", /* 27907 */ "projects4web.de", /* 27908 */ "LogRhythm Inc.", /* 27909 */ "Presto Networks, Inc.", /* 27910 */ "DDS, Inc.", /* 27911 */ "Messaging Architects", /* 27912 */ "The Internet Group (Northland) Ltd.", /* 27913 */ "iXcall", /* 27914 */ "The Computer Centre for Icelandic Savings Banks", /* 27915 */ "NEC Portugal, S.A.", /* 27916 */ "ATCO I-Tek Inc", /* 27917 */ "Wilfrid Laurier University", /* 27918 */ "Loto-Quebec", /* 27919 */ "Viewtel Co., Ltd.", /* 27920 */ "Information and Mathematical Science Laboratory, Inc.", /* 27921 */ "Tripoint Corporation Pty Ltd", /* 27922 */ "Trillian GmbH", /* 27923 */ "Titof3000.org", /* 27924 */ "Canon Ophthalmic Technologies Sp. z o.o.", /* 27925 */ "Future Voice Technology", /* 27926 */ "Evangelische Kliniken Bonn gGmbH", /* 27927 */ "Ayecka Communication Systems Ltd.", /* 27928 */ "tarczynski.net", /* 27929 */ "Justware Corporation", /* 27930 */ "GFI Italia SpA", /* 27931 */ "LignUp Corporation", /* 27932 */ "NOVOTECNO, S.L.", /* 27933 */ "Computer Science Club", /* 27934 */ "Sigil.org", /* 27935 */ "PD-House", /* 27936 */ "UTNOXIUM SL", /* 27937 */ "GNU Gatekeeper Project", /* 27938 */ "Intellectronika", /* 27939 */ "Stadtwerke Muenchen GmbH", /* 27940 */ "Elaborata Produtos e Treinamentos de Informatica Ltda.", /* 27941 */ "Stredni prumyslova skola, Usti nad Labem, Stara 99, p.o.", /* 27942 */ "VimpelCom Ltd.", /* 27943 */ "3Leaf Networks", /* 27944 */ "Upsys", /* 27945 */ "thomaskoch.it", /* 27946 */ "Gridline Communications Holdings Inc.", /* 27947 */ "CPM Ltd.", /* 27948 */ "C. Alex. North-Keys", /* 27949 */ "Sterling Consulting Group, Inc.", /* 27950 */ "ISGenesis, Inc.", /* 27951 */ "Gazprombank Certification Authority", /* 27952 */ "bitPlus GmbH", /* 27953 */ "Flexoft Ltd.", /* 27954 */ "GridNode", /* 27955 */ "OPNATEL", /* 27956 */ "Rettig ICC", /* 27957 */ "weComm Ltd", /* 27958 */ "International Power Switch ApS", /* 27959 */ "e-Business & Resilience Centre", /* 27960 */ "Tribunal de Justica de Santa Catarina", /* 27961 */ "Demonhost Inc.", /* 27962 */ "Westec InterActive Security", /* 27963 */ "Commugen Ltd.", /* 27964 */ "Scribe Technology Inc.", /* 27965 */ "Citiway Technology Co.,Ltd", /* 27966 */ "APNIC Pty Ltd", /* 27967 */ "Akonix Systems, Inc.", /* 27968 */ "Multical Ltda.", /* 27969 */ "kryglik.com", /* 27970 */ "China Infosec Technologies Co.,Ltd.", /* 27971 */ "Mac Papers, Inc.", /* 27972 */ "Open Finance, LLC", /* 27973 */ "MCS GROUPE", /* 27974 */ "Centec Networks Inc.", /* 27975 */ "GEO CONCEPT SA", /* 27976 */ "Genex", /* 27977 */ "Stewart Information Service Corporation", /* 27978 */ "Met Sacramento High School", /* 27979 */ "POSYSTECH Co., Ltd.", /* 27980 */ "Intrachaos.net", /* 27981 */ "RTUnet Pty Ltd", /* 27982 */ "TechGuard Security, LLC", /* 27983 */ "MSBC Pty Limited", /* 27984 */ "Swinburne University of Technology", /* 27985 */ "Avonaco Systems Inc.", /* 27986 */ "DataAccess Inc.", /* 27987 */ "TOPFIELD Co., Ltd.", /* 27988 */ "Nepro Japan Co., Ltd.", /* 27989 */ "Ltd. AVTOR", /* 27990 */ "Media Layers Inc.", /* 27991 */ "Endesa Network Factory S.L.U.", /* 27992 */ "Vigintos Elektronika", /* 27993 */ "Xunta de Galicia. Conselleria de Innovación e Industria. Dirección Xeral de Promocion Industrial e S", /* 27994 */ "FORTH CORPORATION PUBLIC COMPANY LIMITED", /* 27995 */ "Entorno Digital", /* 27996 */ "Me-On-Tv", /* 27997 */ "Triple IT", /* 27998 */ "Trepesch GmbH", /* 27999 */ "Aptivate Ltd", /* 28000 */ "Tufts Associated Health Plans, Inc.", /* 28001 */ "The Source", /* 28002 */ "Bender Est.", /* 28003 */ "Mobiletech AS", /* 28004 */ "LissProductions", /* 28005 */ "United Space Alliance", /* 28006 */ "Jasmin Buchert", /* 28007 */ "Canu Group LLC", /* 28008 */ "ActionCOACH Inc.", /* 28009 */ "Kumamoto Technology and Industry Foundation", /* 28010 */ "NETNIC CORPORATION", /* 28011 */ "ChannelSoft (Beijing) Technology Co.,Ltd", /* 28012 */ "Photobucket, Inc.", /* 28013 */ "BROADVOX GmbH", /* 28014 */ "metrocom corporation", /* 28015 */ "D-Cube Resource", /* 28016 */ "tekuso H. Kaelber", /* 28017 */ "netjfwatcher", /* 28018 */ "TradeRoot Technologies (Pty) Ltd", /* 28019 */ "Tefnet", /* 28020 */ "trevedi it-consulting gmbh", /* 28021 */ "VITALPHONE SARL", /* 28022 */ "VITALIX SARL", /* 28023 */ "Pilot Systems", /* 28024 */ "Capita Business Services Ltd", /* 28025 */ "Hostbasket", /* 28026 */ "Moviclips S.A.", /* 28027 */ "Urquhart Consultancy", /* 28028 */ "Mera Systems, Inc.", /* 28029 */ "The Sidwell Company", /* 28030 */ "Brightprofiles Resources ltd", /* 28031 */ "creat.io, s. r. o.", /* 28032 */ "VERISOFT CONSULTING TECNOLOGIA DA INFORMAÇÂO LTDA", /* 28033 */ "Belkin Logistics, Inc", /* 28034 */ "Venture Data L.L.C.", /* 28035 */ "TalNet", /* 28036 */ "Iaso Pty Ltd", /* 28037 */ "Triharpskel Productions", /* 28038 */ "Comwave Telecom Inc.", /* 28039 */ "Technological Educational Institute (TEI) of Crete", /* 28040 */ "Jackpot.uk.net", /* 28041 */ "KMK Solutions", /* 28042 */ "Altorian Systems Inc", /* 28043 */ "TECOM CO., LTD.", /* 28044 */ "URALSIB Financial Corporation", /* 28045 */ "Distributed Management Sytems Ltd.", /* 28046 */ "Novabase srl", /* 28047 */ "Presto - prekladatelske centrum s.r.o.", /* 28048 */ "ms2-GmbH", /* 28049 */ "Oxford Computer Group (2005) Limited", /* 28050 */ "Atlas IT", /* 28051 */ "Boomer Consulting, Inc.", /* 28052 */ "Tervela Inc.", /* 28053 */ "Tower Cloud, Inc.", /* 28054 */ "Beck Datentechnik", /* 28055 */ "Jojo", /* 28056 */ "NebuAD Inc.", /* 28057 */ "SNDI (Société Nationale de Développement Informatique)", /* 28058 */ "Mohawk Software", /* 28059 */ "Telairity, Inc", /* 28060 */ "Interzone Entertainment LLC", /* 28061 */ "Kewego SA", /* 28062 */ "SanDisk IL Ltd", /* 28063 */ "OKTET Labs Ltd.", /* 28064 */ "TraviAustria Datenservice für Reise und Touristik GmbH & Co. Nfg. KG", /* 28065 */ "Inomacomp s.r.o", /* 28066 */ "Softcreate Co., Ltd.", /* 28067 */ "connectBlue AB", /* 28068 */ "Universidad de Antioquia", /* 28069 */ "Illertech Datensysteme Gbr", /* 28070 */ "Gentiae Clinical Research", /* 28071 */ "Engine Yard", /* 28072 */ "Grace Reformed Baptist Church", /* 28073 */ "Ricu LLC", /* 28074 */ "Support My System (UK) ltd", /* 28075 */ "Recommind, Inc.", /* 28076 */ "WiseSport (Hong Kong) Limited", /* 28077 */ "Genos Open Source S.L.", /* 28078 */ "OpenScale Technologies GmbH", /* 28079 */ "\"ISG\" Joint Stock Company", /* 28080 */ "New Castle Community School Corporation", /* 28081 */ "Rdesign", /* 28082 */ "SOSDG", /* 28083 */ "Polk Mechanical Company, LLC", /* 28084 */ "STMIK Akakom", /* 28085 */ "Universitaet Passau", /* 28086 */ "Albentia Systems, S.A.", /* 28087 */ "NEC Unified Solutions", /* 28088 */ "Sentrigo Ltd", /* 28089 */ "IAM Technology, Inc.", /* 28090 */ "Thelese Management", /* 28091 */ "Covelight Systems, Inc.", /* 28092 */ "Colombia Movil", /* 28093 */ "Voicemail Anywhere, Inc.", /* 28094 */ "JPEO JTRS", /* 28095 */ "Route1 Security Corp.", /* 28096 */ "ACKSYS", /* 28097 */ "National Interbank Transaction Management and Exchange Co., Ltd.", /* 28098 */ "Processing Center Co., Ltd.", /* 28099 */ "Groupwhere Consulting, L.L.C.", /* 28100 */ "MIVAN KIER JOINT VENTURE LIMITED NEWPARK BUCHAREST", /* 28101 */ "baringanet gmbh", /* 28102 */ "Audionics Ltd", /* 28103 */ "Evorad", /* 28104 */ "Arcelor Bremen GmbH", /* 28105 */ "GEUTEBRUECK", /* 28106 */ "Liangjiang Communications System Inc.", /* 28107 */ "Homisco, Inc", /* 28108 */ "Rozis BV", /* 28109 */ "Near Infinity Corporation", /* 28110 */ "ValuePoint Networks, Inc.", /* 28111 */ "Pioneer Bible Translators", /* 28112 */ "Thai Digital ID Co., Ltd.", /* 28113 */ "Quies Net", /* 28114 */ "Shenzhen o'wonder Tech Inc", /* 28115 */ "4-tune GmbH", /* 28116 */ "Clear Memo", /* 28117 */ "ColdSpark Inc", /* 28118 */ "Steelworks Technologies", /* 28119 */ "Pinacono Software Studio", /* 28120 */ "Hyperband Networks, Inc.", /* 28121 */ "ObjectMastery Pty Ltd", /* 28122 */ "Intermodus d.o.o", /* 28123 */ "C-Group", /* 28124 */ "TRINAPS", /* 28125 */ "ERAMON AG", /* 28126 */ "COSSILYS 21", /* 28127 */ "CIT", /* 28128 */ "Cleversafe , Inc.", /* 28129 */ "MICHATECH", /* 28130 */ "iBro", /* 28131 */ "Embarq Holdings Company LLC", /* 28132 */ "INSIST", /* 28133 */ "LOT Polish Airlines", /* 28134 */ "Cominfo a.s.", /* 28135 */ "Delta Dore SA", /* 28136 */ "NXP Semiconductors B.V.", /* 28137 */ "Icepeak AB", /* 28138 */ "Hrvatske telekomunikacije d.d.", /* 28139 */ "IT GAMES COMERCIO E SERVICOS DE INFORMATICA LTDA", /* 28140 */ "CedarOpenAccounts", /* 28141 */ "Nautel Limited", /* 28142 */ "Altaigazprom", /* 28143 */ "Trilus d.o.o.", /* 28144 */ "origenis GmbH", /* 28145 */ "Fitzpatrick Enterprise OID", /* 28146 */ "Argon ST", /* 28147 */ "saint-paul luxembourg s.a.", /* 28148 */ "RBAS", /* 28149 */ "IMS Global Learning Consortium Inc.", /* 28150 */ "BluePoint Data, Inc.", /* 28151 */ "Palo Alto Software, Inc.", /* 28152 */ "Newfound Communications, Inc", /* 28153 */ "Lattech Systems (Pty) Ltd", /* 28154 */ "Computer Network Solutions, LLC", /* 28155 */ "Reveredata, LLC", /* 28156 */ "Octon Technology(Shanghai) Ltd.", /* 28157 */ "Great Software Laboratory Pvt Ltd", /* 28158 */ "OOPS Development Organization", /* 28159 */ "Mototech Inc.", /* 28160 */ "Anzsoft Co., Ltd.", /* 28161 */ "Kazinvestbank", /* 28162 */ "Beijing Institute of Technology", /* 28163 */ "think-tux", /* 28164 */ "InterpharmData Systems (Pty) Ltd.", /* 28165 */ "Webbed Feet", /* 28166 */ "atip GmbH", /* 28167 */ "Nextlink Technologies, LLC", /* 28168 */ "World Trade Organization", /* 28169 */ "South African National Bioinformatics Institute (SANBI)", /* 28170 */ "Corps Rhenania", /* 28171 */ "Bibliotheksservice-Zentrum Baden-Wuerttemberg", /* 28172 */ "Advanced Control Systems Design, Inc.", /* 28173 */ "Solid State Logic", /* 28174 */ "GlenTech Consulting", /* 28175 */ "Rockport PA, LLC", /* 28176 */ "Buddhadata Consulting, Inc.", /* 28177 */ "Internet Software Solutions", /* 28178 */ "Bank Zachodni WBK S.A.", /* 28179 */ "Cvörnjek Lagerlogistik GmbH", /* 28180 */ "Whitestein Technologies AG", /* 28181 */ "Mobile Visions", /* 28182 */ "MungerWare", /* 28183 */ "Hagenuk Marinekommunikation GmbH", /* 28184 */ "zzvcom", /* 28185 */ "SSA Global Technologies", /* 28186 */ "Uptime Power Services, Inc.", /* 28187 */ "Kim Minh Kaplan", /* 28188 */ "Intelivox", /* 28189 */ "Genoscope -- Centre National de Séquencage", /* 28190 */ "JVS do Brasil LTDA", /* 28191 */ "digitallysign", /* 28192 */ "WebPresso", /* 28193 */ "Exterity Ltd", /* 28194 */ "SKY Italia s.r.l", /* 28195 */ "BroadWare Technologies, Inc.", /* 28196 */ "Wichita State University", /* 28197 */ "SNC-Lavalin Energy Control Systems Inc.", /* 28198 */ "kmel", /* 28199 */ "CBC Companies, Inc", /* 28200 */ "DBG Inc.", /* 28201 */ "Albert Bauer KG", /* 28202 */ "Linux Kernel Austria", /* 28203 */ "Synerway", /* 28204 */ "7-ip Pty Ltd", /* 28205 */ "IKB Deutsche Industriebank AG", /* 28206 */ "Rockford IT Limited", /* 28207 */ "Accurite Technologies Inc.", /* 28208 */ "Up-Mobile Corp", /* 28209 */ "SunRocket Inc.", /* 28210 */ "Emergency Response Management Services Inc.", /* 28211 */ "FARIISTA LIMITED", /* 28212 */ "Open joint-stock company \"Agency for Mortgage Housing Crediting\"", /* 28213 */ "KERNEOS", /* 28214 */ "3Roam SA", /* 28215 */ "FingerPost Ltd", /* 28216 */ "Radiant Logic PTY LTD", /* 28217 */ "The MARF Research and Development Group", /* 28218 */ "Liam Schneider Consulting", /* 28219 */ "Brighthouse Networks", /* 28220 */ "Stabat Solutions Pty Ltd", /* 28221 */ "Spectrum Communications FZE", /* 28222 */ "Quarto Software GmbH", /* 28223 */ "Efficens Software Ltd.", /* 28224 */ "OS Security Ltd", /* 28225 */ "Digidiensten", /* 28226 */ "BTC AD", /* 28227 */ "WIFINET,s.r.o.", /* 28228 */ "Pharos Communications Ltd", /* 28229 */ "Fidback CRM Services", /* 28230 */ "AM Fire & Electronic Services, Inc.", /* 28231 */ "Prince George's Community College", /* 28232 */ "iSERVE Ltd.", /* 28233 */ "Cypress Communications, Inc.", /* 28234 */ "Ellie Mae, Inc.", /* 28235 */ "MySpace, Inc.", /* 28236 */ "CodeRyte, Inc", /* 28237 */ "ADE", /* 28238 */ "University of the Ryukyus", /* 28239 */ "Wavelength Communications, Inc.", /* 28240 */ "RidgeRun LLC", /* 28241 */ "OraTel Pty (Ltd)", /* 28242 */ "Pulsar Inc.", /* 28243 */ "Haus am Rügendamm", /* 28244 */ "agorum Software GmbH", /* 28245 */ "Trusted Peer Networks, Inc", /* 28246 */ "Maxis Communications Berhad", /* 28247 */ "Newport Development Group", /* 28248 */ "eonas IT-Beratung und -Entwicklung GmbH", /* 28249 */ "Enerconv S.r.l.", /* 28250 */ "The Constitutionalist Party of Iran (CPI)", /* 28251 */ "Informatec", /* 28252 */ "Scivis wissenschaftliche Bildverarbeitung GmbH", /* 28253 */ "COBS AB", /* 28254 */ "Unassigned", /* 28255 */ "InfoGuard AG", /* 28256 */ "NUTRICHEM Diät+Pharma GmbH", /* 28257 */ "EidosMedia S.p.A.", /* 28258 */ "Landeshauptstadt Stuttgart", /* 28259 */ "PROGIWEB", /* 28260 */ "ProfiForms Projekt GmbH", /* 28261 */ "Chick-fil-A, Inc", /* 28262 */ "Total Spin Brasil Serviços de Telecomunicações Ltda", /* 28263 */ "CLINICARE Corporation", /* 28264 */ "FSB Förster SystemBeratung", /* 28265 */ "L.A. Specialties Inc.", /* 28266 */ "CYBERTRON CO., LTD.", /* 28267 */ "Global Red Solucoes em Software Livre Ltda.", /* 28268 */ "Institute for Theoritical Computer Science, Tsinghua University", /* 28269 */ "Göteborgs Hamn AB", /* 28270 */ "HTBLuVA Moedling", /* 28271 */ "Concurrent Systems (Pty) Ltd", /* 28272 */ "Starling Advanced Communications", /* 28273 */ "MC Control s.r.o.", /* 28274 */ "ioSafe, Inc.", /* 28275 */ "Galeno", /* 28276 */ "LucasP.com", /* 28277 */ "DinnoVan", /* 28278 */ "Rocksteady Networks LLC", /* 28279 */ "GHL Systems Berhad", /* 28280 */ "Sling Media, Inc.", /* 28281 */ "Kronos, Inc", /* 28282 */ "MEDITECNIA INNOVA SL", /* 28283 */ "Estonian eHealth Foundation", /* 28284 */ "AGES - Österreichische Agentur für Gesundheit und Ernährungssicherheit GmbH", /* 28285 */ "Daon", /* 28286 */ "Optium Corporation", /* 28287 */ "LightRail Inc.", /* 28288 */ "WhisperItLoud LLC", /* 28289 */ "XAware, Inc.", /* 28290 */ "Naval Postgraduate School Center for Network Innovation and Experimentation", /* 28291 */ "Stepstone Technologies Inc.", /* 28292 */ "Julong Sci-tech Co., Ltd.", /* 28293 */ "Instituto Reconcavo de Tecnologia", /* 28294 */ "Gainspan Corporation", /* 28295 */ "von KARMAN INSTITUUT VOOR STROMINGSDYNAMICA ivzw", /* 28296 */ "Lublin Technical University", /* 28297 */ "Info.nl/hf b.v.", /* 28298 */ "unixgarage.com", /* 28299 */ "Miracle TV Corporation", /* 28300 */ "ONERA", /* 28301 */ "One Commerce International Corporation", /* 28302 */ "C.R. Enterprise Business Services", /* 28303 */ "Nexcan Solutions", /* 28304 */ "Universitas Islam Indonesia", /* 28305 */ "Foerderverein Buergernetz Ulm/Neu-Ulm e.V.", /* 28306 */ "PostPath, Inc.", /* 28307 */ "Zaragoza Network Management Research Group", /* 28308 */ "StatRad LLC", /* 28309 */ "Center for Computational Biology and Bioinformatics", /* 28310 */ "TECHNOGAMA Ltd.", /* 28311 */ "Penson GHCO", /* 28312 */ "Lantic Systems A/S", /* 28313 */ "Ariescommerce Ltd.", /* 28314 */ "Neology (Pty) Ltd", /* 28315 */ "Branden Inc.", /* 28316 */ "Borran Technologies Inc.", /* 28317 */ "Accelink Technologies Co.,Ltd", /* 28318 */ "IMIMOBILE Private LIMITED", /* 28319 */ "Geotechmin OOD", /* 28320 */ "Oniontech, Co., Ltd.", /* 28321 */ "THOMSON STS", /* 28322 */ "Central-European International Bank Ltd.", /* 28323 */ "3ple-Media BV", /* 28324 */ "Underground_8 Secure Computing GmbH", /* 28325 */ "ko-sys", /* 28326 */ "Harry & David Operations, Corp.", /* 28327 */ "Bayerischer Rundfunk", /* 28328 */ "Base Technologies, Inc.", /* 28329 */ "Meshdynamics, Inc", /* 28330 */ "Smiley Media, Inc.", /* 28331 */ "Brink's Home Security", /* 28332 */ "Simon Niechzial EDV Dienstleistungen", /* 28333 */ "Siemens A/S", /* 28334 */ "Xworks NZ Limited", /* 28335 */ "Voxeo", /* 28336 */ "albatron S.r.l.", /* 28337 */ "Mushypea Industries", /* 28338 */ "Universidade Federal do Pará", /* 28339 */ "iseek Communications Pty. Ltd.", /* 28340 */ "Civilogix, Inc.", /* 28341 */ "Whitley College The Baptist College of Victoria", /* 28342 */ "Rogers Wireless - OSS", /* 28343 */ "DeskNet Inc.", /* 28344 */ "SFC Co.,Ltd.", /* 28345 */ "Duplex Secure Ltd", /* 28346 */ "SAMURAIWORKS", /* 28347 */ "Pimp My Proxy", /* 28348 */ "PT. Bank Negara Indonesia, Tbk", /* 28349 */ "Shenzhen First Mile Communications Ltd", /* 28350 */ "Vimicro Corporation", /* 28351 */ "maxcom", /* 28352 */ "Vital Images Inc.", /* 28353 */ "BCD Travel", /* 28354 */ "Promsvyazbank OJSC", /* 28355 */ "MyWave Internetdienstleistungs AG", /* 28356 */ "Research Institute of China Mobile", /* 28357 */ "AK IT Services", /* 28358 */ "Simulina GmbH", /* 28359 */ "Impi Linux (Pty) Ltd", /* 28360 */ "Cranix Engineering Co. Ltd.", /* 28361 */ "LM2 Consulting Gmbh", /* 28362 */ "Bytec Bodry Technology GmbH", /* 28363 */ "widesolutions.it srl", /* 28364 */ "Ing.-Buero Dr. Plesnik GmbH", /* 28365 */ "HostBase", /* 28366 */ "PROCURE Personalmanagement GmbH", /* 28367 */ "Green Valley B.V.", /* 28368 */ "InetLabs (DE)", /* 28369 */ "Infoteh d.o.o.", /* 28370 */ "Nutel Communications, Ltd.", /* 28371 */ "Gratka Sp. z o.o.", /* 28372 */ "Conversant Systems (Pty) Ltd", /* 28373 */ "OpenChoice di Diego Zaccariotto", /* 28374 */ "EB Enterprises, Inc.", /* 28375 */ "MacroElite Corp.", /* 28376 */ "Bizztools GmbH", /* 28377 */ "Pulsewidth", /* 28378 */ "Open Systems International, Inc.", /* 28379 */ "01edge technologies", /* 28380 */ "Red Lion Controls (N-Tron)", /* 28381 */ "AirCell LLC", /* 28382 */ "Open1X", /* 28383 */ "PConRails, LLC", /* 28384 */ "Columbia Weather Systems, Inc.", /* 28385 */ "Fujian Fujitsu Communication Software Co., Ltd.", /* 28386 */ "svenux", /* 28387 */ "ITB CompuPhase", /* 28388 */ "Schneeweis", /* 28389 */ "19pouces", /* 28390 */ "Villa Centrum Pty Ltd", /* 28391 */ "Eclipse Foundation, Inc.", /* 28392 */ "the emakers di Fabio Vallino", /* 28393 */ "Monki", /* 28394 */ "NewMarket Corporation", /* 28395 */ "Edoceo, Inc.", /* 28396 */ "BluegrassNet Development", /* 28397 */ "Invictus Networks Pte Ltd", /* 28398 */ "ACHOS.COM", /* 28399 */ "Christian Mayer Buero- und EDV-Systeme", /* 28400 */ "CirTec AG", /* 28401 */ "Conteg", /* 28402 */ "Town & Country Industries", /* 28403 */ "Cynosure Research", /* 28404 */ "Hunt Brothers of Louisiana, LLC", /* 28405 */ "Slovenija online - SiOL internet d.o.o.", /* 28406 */ "Bradley D. Brown", /* 28407 */ "Ramsys Zrt", /* 28408 */ "PHOTONICS INC.", /* 28409 */ "Ippon Technologies", /* 28410 */ "Luhansk Taras Shevchenko National Pedagogical University", /* 28411 */ "Comtools GmbH", /* 28412 */ "Brazilian Mercantile and Futures Exchange", /* 28413 */ "Business System Development Pty Ltd", /* 28414 */ "Dixie Valley Farm", /* 28415 */ "SMX", /* 28416 */ "MÖLLER-WEDEL GmbH", /* 28417 */ "Corenet Ltd.", /* 28418 */ "Trilogic", /* 28419 */ "Opus Software", /* 28420 */ "Partido Socialista Obrero Español (PSOE)", /* 28421 */ "Tobias Scherbaum", /* 28422 */ "Nucomm Inc.", /* 28423 */ "Rockshore Limited", /* 28424 */ "Einstein Industries, Inc.", /* 28425 */ "Saint Vincent's Hospital", /* 28426 */ "udicom AG", /* 28427 */ "Secure64", /* 28428 */ "Novanetic, Inc.", /* 28429 */ "Macedonian Academic And Research Network (MARNet)", /* 28430 */ "OpenAFS", /* 28431 */ "Navajo Technical College", /* 28432 */ "jmedved", /* 28433 */ "NHK Integrated Technology Inc.", /* 28434 */ "AC&T System Co.,Ltd.", /* 28435 */ "Carnegie Learning", /* 28436 */ "Torsten Pohl - Software-Entwicklung", /* 28437 */ "rybezahl", /* 28438 */ "Tradesoft Technologies Srl", /* 28439 */ "Impulse LTD", /* 28440 */ "Sjöland & Thyselius", /* 28441 */ "RPH Consulting", /* 28442 */ "Global Trader", /* 28443 */ "Diratel S.L.L", /* 28444 */ "Dealermade", /* 28445 */ "Institute of Mathematics and Computer Science, University of Latvia", /* 28446 */ "Kabona AB", /* 28447 */ "FCS Fair Computer Systems GmbH", /* 28448 */ "koski.org", /* 28449 */ "Internet Texoma, Inc.", /* 28450 */ "American Water", /* 28451 */ "Arabian Horse Association", /* 28452 */ "amasol AG", /* 28453 */ "wh4f", /* 28454 */ "Trion World Network", /* 28455 */ "QNIX Pty Ltd", /* 28456 */ "NTT America Enterprise Hosting", /* 28457 */ "Nokia Solutions and Networks", /* 28458 */ "Rogue Engineering Inc.", /* 28459 */ "Benone Bitencourt", /* 28460 */ "Mutoh Industries Ltd.", /* 28461 */ "KnoxOne", /* 28462 */ "beginux.org", /* 28463 */ "On Air Networks", /* 28464 */ "Echola Systems", /* 28465 */ "MrLane.com", /* 28466 */ "PiCell B.V.", /* 28467 */ "Fabio Prina", /* 28468 */ "Cyber Media (India) Ltd", /* 28469 */ "St. Lawrence University", /* 28470 */ "Bremer AG", /* 28471 */ "tapirdata.com", /* 28472 */ "DAVOnet GmbH", /* 28473 */ "periscoptic perceptions", /* 28474 */ "Akademickie Centrum Kliniczne - Szpital Akademii Medycznej w Gdansku", /* 28475 */ "bwin Interactive Entertainment AG", /* 28476 */ "Global Tel Link", /* 28477 */ "Implicit Monitoring Solutions, LP", /* 28478 */ "Coremetrics", /* 28479 */ "Traffic.com, Inc.", /* 28480 */ "MicroImaging", /* 28481 */ "Technospace SRL", /* 28482 */ "Satileon Networks", /* 28483 */ "ttb-group", /* 28484 */ "IDTIC. C.A.", /* 28485 */ "PETR HUMMEL", /* 28486 */ "Digital Dynamics Inc", /* 28487 */ "ROBOC Co.,Ltd.", /* 28488 */ "Devcom Solutions AB", /* 28489 */ "Kosmos ry.", /* 28490 */ "mitene internet co.,ltd.", /* 28491 */ "MD PREI KRASKRIPT", /* 28492 */ "nexmedia Pte Ltd", /* 28493 */ "Orbis Lumen", /* 28494 */ "Rodenstock GmbH", /* 28495 */ "Unassigned", /* 28496 */ "The Cavell Group", /* 28497 */ "linuxcon", /* 28498 */ "Differitas as", /* 28499 */ "Tagelin", /* 28500 */ "AMBISEA Technoloy Corp., Ltd", /* 28501 */ "TeleIDEA BV", /* 28502 */ "Unixuser", /* 28503 */ "Proclos", /* 28504 */ "Faculdade Metropolitana IESB", /* 28505 */ "OpServices Tecnologia da Informacao S/A", /* 28506 */ "Gude Analog- und Digitalsysteme GmbH", /* 28507 */ "Cunhol", /* 28508 */ "FifSource", /* 28509 */ "John S. Connor", /* 28510 */ "DowKey Microwave", /* 28511 */ "Intellibyte Inc.", /* 28512 */ "VHV", /* 28513 */ "ITALIACERCA s.a.", /* 28514 */ "Goerz IT-Consulting", /* 28515 */ "bitglue.com", /* 28516 */ "7key", /* 28517 */ "CA & PARTNERS", /* 28518 */ "NEC Fukui, Ltd.", /* 28519 */ "Nexsys Consulting Pty Ltd", /* 28520 */ "Jopasana Software & Systems Ltd.", /* 28521 */ "CANDIDO Kommunikationselektronik", /* 28522 */ "BACH systems s.r.o.", /* 28523 */ "Syntech SW Ltd", /* 28524 */ "Across Finance, a.s.", /* 28525 */ "CCS Customer Communication Systems GmbH", /* 28526 */ "Adeptra Inc.", /* 28527 */ "thevisp", /* 28528 */ "NetSolutions Perú S.A.C.", /* 28529 */ "Khypoea", /* 28530 */ "Steven Roth", /* 28531 */ "AO DAAZ", /* 28532 */ "CYAN", /* 28533 */ "City of Jacksonville", /* 28534 */ "AlarmEngine", /* 28535 */ "Zappos.com", /* 28536 */ "HEALTHSIGN SL", /* 28537 */ "Federated Mutual Insurance", /* 28538 */ "Buf Compagnie", /* 28539 */ "Weisberg Consulting, Inc.", /* 28540 */ "Net Demon", /* 28541 */ "Aleph Web Services", /* 28542 */ "Houston Baptist University", /* 28543 */ "ChilesConsulting", /* 28544 */ "M.G InfoCom Pvt. Ltd.", /* 28545 */ "Laubheimer", /* 28546 */ "Australian National University", /* 28547 */ "Caja de ahorros de Santander y Cantabria", /* 28548 */ "PhysiSoft", /* 28549 */ "Marand d.o.o.", /* 28550 */ "Weird Solutions Sweden AB", /* 28551 */ "Avocet RT Limited", /* 28552 */ "Securepoint GmbH", /* 28553 */ "Care2", /* 28554 */ "Manheim Services Corporation", /* 28555 */ "Last.fm Ltd.", /* 28556 */ "Hillstone Networks Inc", /* 28557 */ "KEYENCE CORPORATION", /* 28558 */ "Utah State University", /* 28559 */ "IServ", /* 28560 */ "eHealthConnecticut", /* 28561 */ "Fortune System Inc.", /* 28562 */ "RFNC-VNIITF", /* 28563 */ "Network Synergy Services, LLC.", /* 28564 */ "Carley IP", /* 28565 */ "SCache Systems", /* 28566 */ "MEGLA GmbH", /* 28567 */ "MicroLink", /* 28568 */ "UltraRAD Corporation", /* 28569 */ "Junta de Castilla y Leon", /* 28570 */ "Hafslund ASA", /* 28571 */ "Auditiel", /* 28572 */ "zonekey Inc.", /* 28573 */ "ICA-NET s.r.l.", /* 28574 */ "My-Portal.gr", /* 28575 */ "Longent LLC", /* 28576 */ "Walnut Valley Unified School District", /* 28577 */ "Powerland Computers", /* 28578 */ "New World Restaurant Group, Inc.", /* 28579 */ "MoroSystems, s.r.o.", /* 28580 */ "Wireless Generation, Inc.", /* 28581 */ "Linux Systemhaus Schulz", /* 28582 */ "Tangent Systems, Inc.", /* 28583 */ "Allegro Networks pty ltd", /* 28584 */ "Sniddle LLC", /* 28585 */ "EATON Wireless", /* 28586 */ "Mobilesoft (Aust) Pty Limited", /* 28587 */ "Kaplan Software, LLC", /* 28588 */ "IDERs Inc", /* 28589 */ "EVC Inc.", /* 28590 */ "BEIJING THINKOR INFORMATION TECHNOLOGIES CO.,LTD.", /* 28591 */ "Eteration A.S.", /* 28592 */ "SCA Timber AB", /* 28593 */ "EXGEN Networks Co., Ltd.", /* 28594 */ "PATRONAS Financial Systems GmbH", /* 28595 */ "CTE Digital Broadcast s.r.l.", /* 28596 */ "National Centre for Scientific Research \"Demokritos\"", /* 28597 */ "Sambers Italia Spa", /* 28598 */ "Landmark Communications, Inc.", /* 28599 */ "Hetra Secure Solutions Corp.", /* 28600 */ "Know It All", /* 28601 */ "LogicBox, Inc.", /* 28602 */ "MEDNETWorld.com, Inc", /* 28603 */ "Factory Creative Studio Ltd.", /* 28604 */ "Logicalis GmbH", /* 28605 */ "TheFind, Inc.", /* 28606 */ "coforum", /* 28607 */ "Technomonk Industries", /* 28608 */ "SpongeLava Ltd.", /* 28609 */ "Bengt Månsson", /* 28610 */ "CommAgility Ltd", /* 28611 */ "Bountiful WiFi LLC", /* 28612 */ "Plastek Group", /* 28613 */ "6202110 Canada Inc.", /* 28614 */ "Ondrej Vlach", /* 28615 */ "Orpak Systems Ltd", /* 28616 */ "KioriSoft, LLC", /* 28617 */ "Lightning Source", /* 28618 */ "Univeris Corporation", /* 28619 */ "CSI Communication Systems Inc. AG", /* 28620 */ "HANDICAP INTERNATIONAL", /* 28621 */ "Integrated Business Systems & Services", /* 28622 */ "Pari Networks", /* 28623 */ "UNHfree.net", /* 28624 */ "tarot.com", /* 28625 */ "Laszlo Systems, Inc.", /* 28626 */ "Hammernet", /* 28627 */ "Twisted Storage Inc", /* 28628 */ "everRaise.com", /* 28629 */ "The Atlantis Consulting", /* 28630 */ "GoonSwarm", /* 28631 */ "EuroMedia-Service GmbH", /* 28632 */ "DataCentr Ltd.", /* 28633 */ "ComAp, spol. s r. o.", /* 28634 */ "Fragnetics LLP", /* 28635 */ "PHB Eletronica Ltda", /* 28636 */ "DANSUPPORT", /* 28637 */ "Bellomy Research, Inc.", /* 28638 */ "TxCore, Inc.", /* 28639 */ "IT Linux", /* 28640 */ "Delinked", /* 28641 */ "Proveedor de Certificados PROCERT, C. A.", /* 28642 */ "SUEIIDISS", /* 28643 */ "Gary Thomas", /* 28644 */ "Techila Technologies Ltd.", /* 28645 */ "650mhz", /* 28646 */ "EKM4 LIMITED", /* 28647 */ "SIATech Inc.", /* 28648 */ "SIPGear AB", /* 28649 */ "AxisMobile", /* 28650 */ "MODS", /* 28651 */ "The Hartford", /* 28652 */ "Physicians Group, L.L.C.", /* 28653 */ "Mobile Interactive Group", /* 28654 */ "TIANJIN OMUX COMMUNICATION TECHNOLOGY CO.,LTD", /* 28655 */ "iPolicy Networks Limited", /* 28656 */ "Fonoklik Iletisim Hizmetleri ve Ticaret A.S.", /* 28657 */ "EnteGreat, Inc.", /* 28658 */ "The Cooper-Cain Group, Inc", /* 28659 */ "Linear Acoustic Inc.", /* 28660 */ "Foster", /* 28661 */ "Richard Gavenda", /* 28662 */ "Arada Systems", /* 28663 */ "GIFTCS, LLC", /* 28664 */ "Village-Island Co.,Ltd.", /* 28665 */ "Elaxys Tecnologia", /* 28666 */ "confusatron.org", /* 28667 */ "Devmach.com Linux Support Services", /* 28668 */ "Bycast, Inc.", /* 28669 */ "Blue Cacao Technologies, S.A. de C.V.", /* 28670 */ "TORINS Ltd.", /* 28671 */ "Communication Research Labs Sweden AB", /* 28672 */ "Conseil Régional de Lorraine", /* 28673 */ "KIRNexus GmbH", /* 28674 */ "Phorm, Inc.", /* 28675 */ "WireGATE Technology", /* 28676 */ "Sistemas Catastrales S.A.", /* 28677 */ "VTK Gent v.z.w.", /* 28678 */ "Middle Atlantic Products", /* 28679 */ "Appalachian Regional Healthcare, Inc.", /* 28680 */ "Crystal Vision Ltd", /* 28681 */ "Planetas Medios Digitales S.L.", /* 28682 */ "Xerox - Document Supplies Europe", /* 28683 */ "KATE-KOM", /* 28684 */ "Consultem d.o.o.", /* 28685 */ "The Hertz Corporation", /* 28686 */ "infotronic", /* 28687 */ "Samway Electronic SRL", /* 28688 */ "PC Solutions Net", /* 28689 */ "morrisey.us", /* 28690 */ "BLStream Sp. z o.o.", /* 28691 */ "Karmoy kommune", /* 28692 */ "Colimbra BV", /* 28693 */ "levigo holding gmbh", /* 28694 */ "Philadelphia Stock Exchange", /* 28695 */ "ASQUARE Consulting GmbH", /* 28696 */ "Transcom Enhanced Services", /* 28697 */ "Teradata Corporation", /* 28698 */ "Auto/Con Corp", /* 28699 */ "O-Regan.org", /* 28700 */ "QuVIS, Inc.", /* 28701 */ "Charles Sturt University", /* 28702 */ "University of Nevada, Las Vegas", /* 28703 */ "Integrated Broadcast Information Systems Ltd.", /* 28704 */ "FURUNO ELECTRIC CO., LTD.", /* 28705 */ "Airservices Australia", /* 28706 */ "National Cancer Center", /* 28707 */ "FUJIFILM Corporation", /* 28708 */ "Universidade de Brasília", /* 28709 */ "Dwi Tunggal Putra Private Limited", /* 28710 */ "Department of Zoology, Stockholm University", /* 28711 */ "META-LEVEL Software AG", /* 28712 */ "GDC Technology Ltd", /* 28713 */ "Slithy Toves", /* 28714 */ "Edfinancial Services", /* 28715 */ "Virtual Viewing Ltd", /* 28716 */ "Zavod K6/4", /* 28717 */ "Ministère de l'Education Nationale, Luxembourg", /* 28718 */ "Tarrant County", /* 28719 */ "Jaguar Software Development", /* 28720 */ "Affernet Pty Ltd", /* 28721 */ "Network Synergy Pty Ltd", /* 28722 */ "GBCOM", /* 28723 */ "AnNeal Technology Inc.", /* 28724 */ "Atonics Inc.", /* 28725 */ "MFLO", /* 28726 */ "EFUN International Corporation", /* 28727 */ "Jerich Austria GmbH", /* 28728 */ "GRD", /* 28729 */ "NiX", /* 28730 */ "Edgeware AB", /* 28731 */ "Secure Links", /* 28732 */ "Ronexprim Srl", /* 28733 */ "Automorpheus.com Corporation", /* 28734 */ "Ahoya Networks Inc", /* 28735 */ "ILOG", /* 28736 */ "webapps.jp", /* 28737 */ "Nippon RAD Inc.", /* 28738 */ "ika", /* 28739 */ "Noval Networks", /* 28740 */ "Banco Popular y de Desarrollo Comunal", /* 28741 */ "Horry Electric Cooperative, Inc.", /* 28742 */ "Greschitz IT Security", /* 28743 */ "College of Medicine, University of Ibadan, Ibadan", /* 28744 */ "Comtest Wireless S.r.l.", /* 28745 */ "The Swedish National Archive of Recorded Sound and Moving Images", /* 28746 */ "GIP AG", /* 28747 */ "LibreStream Technologies Inc.", /* 28748 */ "TeliPhone inc.", /* 28749 */ "ISEDEV", /* 28750 */ "4INFO, Inc.", /* 28751 */ "WAE Technologies, Inc.", /* 28752 */ "EPS Co., Ltd.", /* 28753 */ "Vinotech", /* 28754 */ "comWare GmbH", /* 28755 */ "Fachhochschule Worms", /* 28756 */ "Mu Dynamics", /* 28757 */ "Centurum Inc.", /* 28758 */ "Savant Tecnologia", /* 28759 */ "Albus-Insec", /* 28760 */ "MDS America, Inc.", /* 28761 */ "Unwire", /* 28762 */ "CoCoZ", /* 28763 */ "Hollywood Entertainment", /* 28764 */ "South Bay Community Network, Inc.", /* 28765 */ "Tradescape, Inc.", /* 28766 */ "Enseo, Inc", /* 28767 */ "MasterCard WorldWide", /* 28768 */ "Unison Network Labs", /* 28769 */ "RJ Landau Partners PLLC", /* 28770 */ "wolery.net", /* 28771 */ "Blueberry Consultants Ltd", /* 28772 */ "Papier & Recycling Logistik GmbH", /* 28773 */ "Ixaris Systems Ltd", /* 28774 */ "Expway", /* 28775 */ "Neuf Cegetel", /* 28776 */ "Ignos Estudio de Ingenieria S.L.", /* 28777 */ "Intellistream", /* 28778 */ "Fox-IT B.V.", /* 28779 */ "patteran, inc.", /* 28780 */ "Bowdoin College", /* 28781 */ "Earmark Media Services", /* 28782 */ "Venafi", /* 28783 */ "CER International bv", /* 28784 */ "Me.Dium, Inc.", /* 28785 */ "Vidiom Systems, Inc.", /* 28786 */ "Flex-Networks Inc.", /* 28787 */ "Quarantainenet BV", /* 28788 */ "Cory Albrecht", /* 28789 */ "Poslovno informacioni sistemi, d.o.o.", /* 28790 */ "SBI Japannext Co Inc", /* 28791 */ "TotalWire S.r.l.", /* 28792 */ "Neptuny s.r.l.", /* 28793 */ "slashconcept GbR", /* 28794 */ "uPRESTO, Inc", /* 28795 */ "Haberst Infra AS", /* 28796 */ "SCBA Expert Service Centre", /* 28797 */ "JSC \"SBERCARD\"", /* 28798 */ "Thales Security Solutions and Services", /* 28799 */ "QualiConsult Ltda", /* 28800 */ "FlexStar Technology, Inc", /* 28801 */ "SMS Tecnologia Eletronica LTDA", /* 28802 */ "ISCaD GmbH", /* 28803 */ "L'Occitane SA", /* 28804 */ "Visionary Networks, Inc.", /* 28805 */ "Nationwide Children's Hospital", /* 28806 */ "Mullins Household", /* 28807 */ "accom GmbH & Co. KG", /* 28808 */ "Netwurk Labs", /* 28809 */ "Desai Electronic Technology (Sichuan) Co., Ltd.", /* 28810 */ "SMS spol. s r.o.", /* 28811 */ "DIGITALK Limited", /* 28812 */ "Alberta-Pacific Forest Industries Inc.", /* 28813 */ "HEALTHGRID", /* 28814 */ "Wedjaa", /* 28815 */ "Supplee Technologies", /* 28816 */ "Exploreos, Inc.", /* 28817 */ "St. John Medical Center", /* 28818 */ "Titan Consulting Group, Inc.", /* 28819 */ "XUERON.COM", /* 28820 */ "GreatWall Systems, Incorporated", /* 28821 */ "ABE ELETTRONICA S.p.A.", /* 28822 */ "Neta Technologies Inc.", /* 28823 */ "JPragma", /* 28824 */ "Bufete de Servicios Informaticos, SA de CV", /* 28825 */ "Infinite Innovation, Inc.", /* 28826 */ "TLH Systems", /* 28827 */ "Oita Computer Engineering & Consulting Ltd.", /* 28828 */ "BMST Co., Ltd", /* 28829 */ "ALCON Telecommunications Co., Ltd.", /* 28830 */ "TurboConsult", /* 28831 */ "G-cluster Ltd.", /* 28832 */ "LUFTHANSA TECHNIK AG", /* 28833 */ "Surecloud", /* 28834 */ "ACXSYS Botswana", /* 28835 */ "BERTANA srl", /* 28836 */ "MVP Health Plan", /* 28837 */ "ScreenPC", /* 28838 */ "ZedX, Inc.", /* 28839 */ "Avcorp Industries Inc.", /* 28840 */ "Phönix-PACS GmbH", /* 28841 */ "GJAlves", /* 28842 */ "Dekeyzer", /* 28843 */ "Channel Dynamix", /* 28844 */ "Digital Ocular Networks, Inc.", /* 28845 */ "Universidad de Malaga", /* 28846 */ "D&S Networks", /* 28847 */ "Guangzhou FrameNet Telecommunication Technologies,Co,LTD", /* 28848 */ "Professional Products Inc", /* 28849 */ "Felltech Ltd", /* 28850 */ "Topnordic a/s", /* 28851 */ "Micro Innovation AG", /* 28852 */ "Freudenberg Hosting KG", /* 28853 */ "OOO BB Systems", /* 28854 */ "PRESCOM", /* 28855 */ "Concurrent Thinking Ltd.", /* 28856 */ "Working Today, Inc.", /* 28857 */ "Public Service Mutual Insurance Company", /* 28858 */ "Big Fish Games", /* 28859 */ "GB Development", /* 28860 */ "Proyecto Conectate al Conocimiento", /* 28861 */ "Sipcall.com Inc.", /* 28862 */ "OSS Integrators, Inc.", /* 28863 */ "Cosmofon AD", /* 28864 */ "Achievo Deutschland AG", /* 28865 */ "TRENDnet, Inc.", /* 28866 */ "Ping Identity Corporation", /* 28867 */ "Anubisnetworks", /* 28868 */ "hollaender.net", /* 28869 */ "Hogskolan i Gavle", /* 28870 */ "Péter Szűcs", /* 28871 */ "AGENCE LANDAISE POUR L'INFORMATIQUE", /* 28872 */ "CHIP Xonio Online GmbH", /* 28873 */ "Solarflare Communications Inc.", /* 28874 */ "secom consulting", /* 28875 */ "Jordan & Jordan", /* 28876 */ "NRC Systems Ltd", /* 28877 */ "Seikosha Inc.", /* 28878 */ "Americanas.com", /* 28879 */ "Westone Information Industry INC.", /* 28880 */ "dSigma, LLC", /* 28881 */ "Michael Eisler", /* 28882 */ "Tomas Bata University in Zlín", /* 28883 */ "Kucko", /* 28884 */ "Spolka Inzynierow SIM Sp. z o.o.", /* 28885 */ "OXEA Group", /* 28886 */ "LabSET", /* 28887 */ "UXtechnology B.V.", /* 28888 */ "NemoQ Iberica, S.A.", /* 28889 */ "Art Center College of Design", /* 28890 */ "College of Dunaujvaros (Dunaújvárosi Főiskola)", /* 28891 */ "Exoweb", /* 28892 */ "Rihotec Oy", /* 28893 */ "MAXI VIEW HOLDINGS LIMITED", /* 28894 */ "Caisse Nationale de Sécurité Sociale Maroc", /* 28895 */ "BCC GmbH", /* 28896 */ "nsec", /* 28897 */ "Securaplane Technologies", /* 28898 */ "DataStarved.net", /* 28899 */ "Yasashii Syndicate", /* 28900 */ "Endicott College", /* 28901 */ "AnHui University of Technology", /* 28902 */ "InterFax", /* 28903 */ "Arius Software", /* 28904 */ "MeshLinx Wireless, Inc", /* 28905 */ "Cluenet", /* 28906 */ "ViASSoL (Virtual Applied Scientific Software Laboratory)", /* 28907 */ "MUJIN Systems, Inc.", /* 28908 */ "4A-Securer", /* 28909 */ "Ansitaly", /* 28910 */ "CompFort Meridian Polska Sp. z o.o.", /* 28911 */ "ZURIEL Ltd.", /* 28912 */ "BitTorrent, Inc.", /* 28913 */ "Alstom Signaling Operation LLC", /* 28914 */ "Turtlesystems", /* 28915 */ "Interop Informatica", /* 28916 */ "Comtica", /* 28917 */ "InfoPrint Solutions Company", /* 28918 */ "Borghesia Consulting", /* 28919 */ "blaulink GbR", /* 28920 */ "Anchiva Systems, Inc.", /* 28921 */ "Crescent Group Ltd.", /* 28922 */ "Luminator Holding, LP", /* 28923 */ "Megatel Industries Corp.", /* 28924 */ "BIGLIST Inc.", /* 28925 */ "Mitteldeutscher Rundfunk", /* 28926 */ "First Mallorca", /* 28927 */ "Taylor & Francis Group Ltd", /* 28928 */ "RASKAT", /* 28929 */ "Kilowatt S.A.", /* 28930 */ "MiKe software&network SRL", /* 28931 */ "NazerFarzan", /* 28932 */ "Senado de España", /* 28933 */ "tick Trading Software AG", /* 28934 */ "Sacred Heart College", /* 28935 */ "Information Technology ltda", /* 28936 */ "DASANTPS Inc.", /* 28937 */ "TAS France", /* 28938 */ "bremen online services GmbH & Co. KG", /* 28939 */ "IMP Telekom d.d.", /* 28940 */ "Network Solutions Norway ASA", /* 28941 */ "Amperion South East", /* 28942 */ "Inter Clamp Management AG", /* 28943 */ "Meyer Associates, Inc", /* 28944 */ "nome consulting ltd", /* 28945 */ "E-Band Communications Corp", /* 28946 */ "Trillenium Works", /* 28947 */ "VeePee", /* 28948 */ "Ownage, Inc.", /* 28949 */ "Virtual U at Union College", /* 28950 */ "IP Fjarskipti", /* 28951 */ "Cypress Solutions Inc.", /* 28952 */ "AiNETEK CO.,Ltd.", /* 28953 */ "And-Or Logic", /* 28954 */ "9 to 5 Magic", /* 28955 */ "Allen Martin Ltd", /* 28956 */ "Institut für Graphische und Parallele Datenverarbeitung, Universität Linz", /* 28957 */ "SNAPin Software, Inc.", /* 28958 */ "Fargo Electronics, Incorporated", /* 28959 */ "resolux", /* 28960 */ "PIAX Project", /* 28961 */ "Down to Earth Systems", /* 28962 */ "deyeb", /* 28963 */ "futbag", /* 28964 */ "KOSnet-EDV", /* 28965 */ "37signals, LLC", /* 28966 */ "Optosecurity Inc.", /* 28967 */ "Affinitic s.p.r.l", /* 28968 */ "Dana Koch", /* 28969 */ "Digitec Systems", /* 28970 */ "Incontech Ltd", /* 28971 */ "Keio University", /* 28972 */ "Landschaftsverband Rheinland", /* 28973 */ "Belarusbank", /* 28974 */ "GSI Europe SL", /* 28975 */ "Intersys Sistemas Interactivos", /* 28976 */ "NovusEdge", /* 28977 */ "Canonical Ltd", /* 28978 */ "MwGhennndo", /* 28979 */ "Leiden University, Faculty of Science", /* 28980 */ "TKRJasek", /* 28981 */ "Pachi", /* 28982 */ "TechBase Sp. z o.o.", /* 28983 */ "Universidade Federal de Mato Grosso do Sul", /* 28984 */ "Staples, Inc.", /* 28985 */ "FNMS Project", /* 28986 */ "marsldap", /* 28987 */ "icanetix Software Systems and Consulting GmbH", /* 28988 */ "Sociedad Mutual \"Seguro de Vida\"", /* 28989 */ "PrivateMonitoring", /* 28990 */ "Ghz Soluções em Informatica Dracena LTDA ME", /* 28991 */ "American Century Proprietary Holdings, Inc.", /* 28992 */ "PCM LLC I", /* 28993 */ "LiveSquare", /* 28994 */ "Dresser Wayne, Dresser Inc.", /* 28995 */ "JAE Enterprises", /* 28996 */ "south china university of technology", /* 28997 */ "Pine Tree Systems", /* 28998 */ "Voible Communications Ltd", /* 28999 */ "Markus-Alexander Matthé", /* 29000 */ "TRISKEL TELECOM SL", /* 29001 */ "PGGM", /* 29002 */ "Fibernet International", /* 29003 */ "La Voz de Galicia", /* 29004 */ "Joint Stock Company \"Scientific & Production Enterprise \"ORBITA\"", /* 29005 */ "VocaLink Limited", /* 29006 */ "R&D ScanEx", /* 29007 */ "Kaya Software, LLC", /* 29008 */ "Mirth Corporation", /* 29009 */ "National Bank Of Kuwait", /* 29010 */ "HeBIS", /* 29011 */ "Quality Technology Services", /* 29012 */ "Teldat Sp.J. H. Kruszyński, M. Cichocki", /* 29013 */ "Intellengine", /* 29014 */ "Keitai Gaming", /* 29015 */ "Professional Partnership Ltd", /* 29016 */ "Buda", /* 29017 */ "Network Security Solutions d.o.o.", /* 29018 */ "ACK Networks, Inc.", /* 29019 */ "Marco Aspromonti", /* 29020 */ "MUGLER AG", /* 29021 */ "Dorstewitz", /* 29022 */ "FaMAF - Facultad de Matematica, Astronomia y Física - Universidad Nacional de Cordoba - Argentina", /* 29023 */ "OSERYS Systèmes", /* 29024 */ "RECRO-net d.o.o.", /* 29025 */ "GUZMAN", /* 29026 */ "Netfinity Ltd.", /* 29027 */ "Jerry Chapman", /* 29028 */ "Altierre Corporation", /* 29029 */ "Ringier Slovakia, a.s.", /* 29030 */ "ILSC", /* 29031 */ "Creative Industries", /* 29032 */ "4DK Technologies, Inc.", /* 29033 */ "Common Sense IT-Consulting GmbH.", /* 29034 */ "kymz online page", /* 29035 */ "CACI International Inc", /* 29036 */ "MooL Invest Kft.", /* 29037 */ "ICEGEL Kft.", /* 29038 */ "Otis College of Art and Design", /* 29039 */ "CX computers & consulting, s.r.o.", /* 29040 */ "SmartOfficeBuilding", /* 29041 */ "Toppan", /* 29042 */ "Peek&Cloppenburg KG", /* 29043 */ "Digital Alert Systems", /* 29044 */ "Camp Dresser and McKee, Inc.", /* 29045 */ "The Boston Consulting Group, Inc.", /* 29046 */ "GigaFin Networks", /* 29047 */ "Vianet International Ltd", /* 29048 */ "Sichuan Xinhua Winshare Chainstore Co.,Ltd.", /* 29049 */ "Korcett Holdings, Inc.", /* 29050 */ "DAIKON Integracion y Desarrollo S.L.", /* 29051 */ "Defzone B.V.", /* 29052 */ "Intellio Ltd.", /* 29053 */ "Bluebell Opticom Limited", /* 29054 */ "American International Distribution Corporation, Inc.", /* 29055 */ "logicfish.org", /* 29056 */ "Universitaet fuer Bodenkultur, Wien (BOKU)", /* 29057 */ "Neology Corporation", /* 29058 */ "FAL Solutions", /* 29059 */ "Schnapper Vision Studios", /* 29060 */ "AFORE Solutions, Inc.", /* 29061 */ "HEAnet Limited", /* 29062 */ "Patrick McDonnell", /* 29063 */ "ODDO & CIE", /* 29064 */ "31337 Hackers", /* 29065 */ "enovatia", /* 29066 */ "The Loop Communications", /* 29067 */ "OpenSource Training Ralf Spenneberg", /* 29068 */ "HartmannSoft", /* 29069 */ "Conversion Co., Ltd.", /* 29070 */ "ON DEMAND Microelectronics AG", /* 29071 */ "Neopost", /* 29072 */ "Western Avionics", /* 29073 */ "Epic Aviation, LLC", /* 29074 */ "Oncology & Hematology Associates of Southwest Indiana, P.C.", /* 29075 */ "CP Sharing", /* 29076 */ "Gentgeens Lodge", /* 29077 */ "SynapSense Corporation", /* 29078 */ "Cryptologic Inc.", /* 29079 */ "Kiong Software", /* 29080 */ "ISI.NC", /* 29081 */ "L2C2 Technologies", /* 29082 */ "PKO BP SA", /* 29083 */ "OVH", /* 29084 */ "Conergy AG", /* 29085 */ "Bethlehem Lutheran School", /* 29086 */ "roullier", /* 29087 */ "SpinVox Ltd.", /* 29088 */ "Intec Software Solutions", /* 29089 */ "Sendza, Inc.", /* 29090 */ "FriendlySNMP", /* 29091 */ "Wirama", /* 29092 */ "Stekfon", /* 29093 */ "Aquarius Telecom Technologies", /* 29094 */ "AeroSat Avionics LLC", /* 29095 */ "NewACT Ltd.", /* 29096 */ "TRIGLAV, Zdravstvena zavarovalnica, d.d.", /* 29097 */ "DRM Digital Radio Mondiale", /* 29098 */ "Larimart S.p.A.", /* 29099 */ "Lithustech Sistemas Eletrônicos LTDA.", /* 29100 */ "Interstate Gas Supply", /* 29101 */ "Cargill Inc.", /* 29102 */ "Naropa University", /* 29103 */ "Felix Tiede", /* 29104 */ "Intelleflex Corp.", /* 29105 */ "Xangati", /* 29106 */ "Key Solutions", /* 29107 */ "Enleiten Inc.", /* 29108 */ "Hoover Treated Wood Products, Inc.", /* 29109 */ "Woodside Fabrics Limited", /* 29110 */ "Beijing Poweron Technologies Co., Ltd.", /* 29111 */ "Biblioteca de Catalunya", /* 29112 */ "Bank Pekao S.A.", /* 29113 */ "SecureW2", /* 29114 */ "ECCO Sko A/S", /* 29115 */ "Instituto Politecnico de Setubal", /* 29116 */ "Xembedded, Inc.", /* 29117 */ "BOSSIO SOLUTIONS & SERVICES SL", /* 29118 */ "Joint Stock Company All-Russian Scientific Research Institute of Television and Radio Broadcasting", /* 29119 */ "SYSOON SARL", /* 29120 */ "NZN", /* 29121 */ "TCX Computer Technology", /* 29122 */ "Jalasutram, Inc.", /* 29123 */ "IMAGENICS Co,Ltd.", /* 29124 */ "Advance Interactive Technologies Pte. Ltd", /* 29125 */ "Osterholm & Associates", /* 29126 */ "SV Corporation", /* 29127 */ "Mindwell Technologies", /* 29128 */ "dg-solutions", /* 29129 */ "Lithuanian Academy of Physical Education", /* 29130 */ "PERSONAL_JG", /* 29131 */ "CalNet", /* 29132 */ "ATIS UHER S.A.", /* 29133 */ "SpeedXS", /* 29134 */ "Salvadè S.r.l.", /* 29135 */ "Toys R Us Corporation", /* 29136 */ "michaelgerzabek.com(R)", /* 29137 */ "TWIC Root", /* 29138 */ "UNICOM DATA GROUP TECNOLOGIA LTDA", /* 29139 */ "ONEDOC AB", /* 29140 */ "LiveOps", /* 29141 */ "ViewPlus Technologies, Inc.", /* 29142 */ "CableWorld Ltd.", /* 29143 */ "Unassigned", /* 29144 */ "K&P Computer GmbH", /* 29145 */ "SwapsWire Ltd", /* 29146 */ "Proficient Technology", /* 29147 */ "Axolotl Corp.", /* 29148 */ "data inform srl", /* 29149 */ "COMLAB AG", /* 29150 */ "Live Data Group, inc.", /* 29151 */ "Palo Alto Unified School District", /* 29152 */ "Ridgecrest Financial, Inc.", /* 29153 */ "Electromagnetic Technologies Industries Inc.", /* 29154 */ "Tews Technologies GmbH", /* 29155 */ "Byte Dynamics, SRL", /* 29156 */ "Bytemark Hosting", /* 29157 */ "Alinea Software Solutions SL", /* 29158 */ "Nodak Flying Club, Inc.", /* 29159 */ "L2 Enterprises", /* 29160 */ "Hidden-City.NET", /* 29161 */ "china lottery online co. ltd.", /* 29162 */ "darrow.com", /* 29163 */ "EnabledPeople LLC", /* 29164 */ "Antech", /* 29165 */ "NetQoSt", /* 29166 */ "ISTEC GmbH", /* 29167 */ "T-Mobile International", /* 29168 */ "LLC \"Astelit\"", /* 29169 */ "Interactive Quality Services Inc.", /* 29170 */ "ESET, spol. s r.o.", /* 29171 */ "Bresnan Communications, LLC.", /* 29172 */ "InSpatial LLC", /* 29173 */ "rPath, Inc.", /* 29174 */ "phasma.nl", /* 29175 */ "FIRST RABBIT GmbH", /* 29176 */ "Umlautus", /* 29177 */ "California State University, Bakersfield", /* 29178 */ "Aginova Sàrl", /* 29179 */ "Ponsse Oyj", /* 29180 */ "Ecole de techologie superieure", /* 29181 */ "AMI dept, Sensus Metering Systems, Inc.", /* 29182 */ "6PIXIES International", /* 29183 */ "Humor Rainbow, Inc", /* 29184 */ "Digital Fountain Inc.", /* 29185 */ "Innovative IT Architects. LLC", /* 29186 */ "Revelation TV", /* 29187 */ "Wavex Technologies Pte Ltd", /* 29188 */ "Roadside", /* 29189 */ "Valyd Technologies Pvt Ltd", /* 29190 */ "Dynatech s.r.o.", /* 29191 */ "OpusVL", /* 29192 */ "Fabrix TV LTD.", /* 29193 */ "Shelby County Board of Education", /* 29194 */ "ZeelandNet b.v.", /* 29195 */ "Lattice, L.L.C.", /* 29196 */ "Kaazing Corp.", /* 29197 */ "PhR", /* 29198 */ "TERADA ELECTRIC WORKS CO.,LTD", /* 29199 */ "UNETsystem Co., Ltd.", /* 29200 */ "Rawenstvo OJSC", /* 29201 */ "Hari Sekhon", /* 29202 */ "Grupo Santander", /* 29203 */ "Senex Technologies Inc.", /* 29204 */ "NewMedia-NET GmbH - Division dd-wrt", /* 29205 */ "vargo.us", /* 29206 */ "Rescentris, Inc.", /* 29207 */ "Zandanel Informationstechnologie", /* 29208 */ "Hermann Ehlers Haus", /* 29209 */ "KARCHER & LADWEIN Ingenieurpartnerschaft fuer Bautechnik", /* 29210 */ "DiOmega GmbH", /* 29211 */ "HOV Services, LLC", /* 29212 */ "ARBU", /* 29213 */ "Dairiki Solutions", /* 29214 */ "Eyeball Networks Inc.", /* 29215 */ "Onode Server Project", /* 29216 */ "Grant Street Group, Inc.", /* 29217 */ "The ALPHAVICTOR® Companies", /* 29218 */ "Wuille bvba", /* 29219 */ "Ciputra Group", /* 29220 */ "Enforta", /* 29221 */ "Weisser", /* 29222 */ "Stadtverwaltung Bornheim", /* 29223 */ "CoreTrek AS", /* 29224 */ "Marko Karg", /* 29225 */ "BERGERAT MONNOYEUR LOCATION", /* 29226 */ "Criticall Limited", /* 29227 */ "Distributed Medical Sverige AB", /* 29228 */ "OutServ, Inc.", /* 29229 */ "Direction Générale de l'Aviation Civile", /* 29230 */ "Confédération Française Microtel Multimédia", /* 29231 */ "coreIPM", /* 29232 */ "MCL, Inc.", /* 29233 */ "Titan Publishing Group Limited", /* 29234 */ "Protey", /* 29235 */ "APHP Beclere", /* 29236 */ "New Hampshire Employment Security", /* 29237 */ "AdBrite, Inc.", /* 29238 */ "SYSTEMSKILLS COMPUTER TECHNICAL SERVICES LTD.", /* 29239 */ "HID Global", /* 29240 */ "Spry Hosting", /* 29241 */ "Peabody Energy", /* 29242 */ "Resolve Systems", /* 29243 */ "Lime Wire LLC", /* 29244 */ "Commonwealth of Pennsylvania, Governor's Office of Administration", /* 29245 */ "KnowledgeTrax, LLC", /* 29246 */ "Secioss Corporation", /* 29247 */ "Wanmi Telecom Technologies Co.,Ltd", /* 29248 */ "Revue VTK vzw", /* 29249 */ "EPM expert", /* 29250 */ "LNM IIT", /* 29251 */ "Server System Infrastructure (SSI)", /* 29252 */ "KBK Consultant", /* 29253 */ "Pulsar Mobile Sp. z o. o.", /* 29254 */ "HRZ Zittau/Görlitz", /* 29255 */ "HALLESCHE Krankenversicherung auf Gegenseitigkeit", /* 29256 */ "Fedasil", /* 29257 */ "Mittelrhein-Verlag GmbH", /* 29258 */ "California State University, Chico", /* 29259 */ "Tempest Security Intelligence", /* 29260 */ "emQbit", /* 29261 */ "cybermah.com", /* 29262 */ "Max Planck Institute of Biochemistry", /* 29263 */ "apc interactive solutions ag", /* 29264 */ "KIRP GmbH", /* 29265 */ "xvpn", /* 29266 */ "Teleologic Learning Company", /* 29267 */ "Unitarian Universalist Association", /* 29268 */ "SiteXs Netzwerkloesungen & IT-Consulting GmbH", /* 29269 */ "Rogers West", /* 29270 */ "OBS Technology", /* 29271 */ "Biological and Popular Culture, LLC", /* 29272 */ "GCS Software & Consulting KEG", /* 29273 */ "BusinessFabric Inc", /* 29274 */ "Autometrix Precision Cutting Systems", /* 29275 */ "Wizards Internet Limited", /* 29276 */ "BookieStreet, Ltd.", /* 29277 */ "Dima Technologies Co.,Ltd", /* 29278 */ "WuXi ZhongXing Optoelectronics Technology Co., Ltd.", /* 29279 */ "Widgets", /* 29280 */ "Trelleborgs Hamn AB", /* 29281 */ "Azuki Software", /* 29282 */ "dscnet.org", /* 29283 */ "Axxana", /* 29284 */ "Aquanasoft", /* 29285 */ "Imagine Communications", /* 29286 */ "Finite Communication Inc.", /* 29287 */ "Altus Networks Inc", /* 29288 */ "Advertising.com", /* 29289 */ "WeGo Health, Inc", /* 29290 */ "SECRETARIA DE LA FUNCION PUBLICA", /* 29291 */ "Ubiquitous Systems Ltd", /* 29292 */ "Royal Roads University", /* 29293 */ "Meshweave", /* 29294 */ "IMESC", /* 29295 */ "IDX Company, Ltd.", /* 29296 */ "Shenzhen vStrong technology Co.,Ltd.", /* 29297 */ "Ador Powertron Ltd.", /* 29298 */ "Zarovs Stelsels Bk", /* 29299 */ "SSI Schaefer Peem GmbH", /* 29300 */ "Braxtel Communications Inc", /* 29301 */ "eSI Mobile Solutions. S.L.L (GENAKER)", /* 29302 */ "Telappliant Ltd.", /* 29303 */ "Services for Business IT Ruhr GmbH", /* 29304 */ "IPFIX Reverse Information Element Private Enterprise", /* 29305 */ "Useful Networks", /* 29306 */ "Loki Industries", /* 29307 */ "RPGfiction", /* 29308 */ "IBM Mittelstand Systeme", /* 29309 */ "William Petersen Elektronik A/S", /* 29310 */ "Itay Be'erli", /* 29311 */ "Bernecker+Rainer Industrie-Elektronik Ges.m.b.H.", /* 29312 */ "GloboTech GmbH", /* 29313 */ "WDV GmbH", /* 29314 */ "VAUDE Sport GmbH & Co. KG", /* 29315 */ "Astute Networks, Inc.", /* 29316 */ "Global Technology Inc.", /* 29317 */ "Doquent Inc", /* 29318 */ "NTT Communications Corporation", /* 29319 */ "regio iT aachen gmbh", /* 29320 */ "IBL Software Engineering, Ltd.", /* 29321 */ "Cabinplant A/S", /* 29322 */ "Lesun Technologies Co.,Ltd", /* 29323 */ "Voxy Communications", /* 29324 */ "Worshipworks Ministries International", /* 29325 */ "IBM Rational", /* 29326 */ "barrang", /* 29327 */ "The Stable Group", /* 29328 */ "Trade Me Ltd", /* 29329 */ "Cryptic Studios", /* 29330 */ "Swan Island Networks, Inc.", /* 29331 */ "Frank Meisschaert", /* 29332 */ "JBlade LLC", /* 29333 */ "Provider.nl", /* 29334 */ "Zajil International Telecom K.C.S.C.", /* 29335 */ "Bombardier Transportation (Signal) Germany GmbH", /* 29336 */ "Bynari", /* 29337 */ "Kestrel Wireless, Inc.", /* 29338 */ "3guppies.com", /* 29339 */ "joncaves.com", /* 29340 */ "Ingenieurbuero Schmid", /* 29341 */ "Browave Inc.", /* 29342 */ "Grundig SAT-Systems GmbH", /* 29343 */ "ShangHai HuaBo Taifu Internet Technology Co.,Ltd", /* 29344 */ "Softing AG", /* 29345 */ "UKN Group Limited", /* 29346 */ "Amadeus Global Travel Ltd.", /* 29347 */ "RotaBanner Next", /* 29348 */ "mediagrids plc", /* 29349 */ "Remuda Ranch Center for Anorexia & Bulimia Inc.", /* 29350 */ "Fallibroome High School", /* 29351 */ "IBEX Technology Co.,Ltd.", /* 29352 */ "Brewer Science, Inc.", /* 29353 */ "Health Dialog Services Corporation", /* 29354 */ "PING e.V.", /* 29355 */ "Montville Enterprises LLC", /* 29356 */ "Fenster Software", /* 29357 */ "Zlango", /* 29358 */ "Industrie Dial Face S.p.A.", /* 29359 */ "AMS Media Sverige AB", /* 29360 */ "Magma", /* 29361 */ "Tomizone Limited", /* 29362 */ "CHCLab.net", /* 29363 */ "Applied Electro-Magnetics P. Ltd", /* 29364 */ "Penta Investments, a.s.", /* 29365 */ "BMI spa", /* 29366 */ "Dreamlab Technologies AG", /* 29367 */ "IASC", /* 29368 */ "Tom Collins L.L.C.", /* 29369 */ "Daniel Mandler", /* 29370 */ "CDC Arkhineo", /* 29371 */ "BidiX", /* 29372 */ "Dillet.net", /* 29373 */ "elegiac", /* 29374 */ "Selekron Microcontrol s.l.", /* 29375 */ "Trägerverein Bürgernetz Bamberg e.V.", /* 29376 */ "Make-A-Byte, Inc.", /* 29377 */ "CoCo Communications Corp.", /* 29378 */ "Lostar Bilgi Guvenligi A.S.", /* 29379 */ "Beekhul Holdings Pty Ltd", /* 29380 */ "McNeese State University", /* 29381 */ "Dedalus S.p.a.", /* 29382 */ "sysview Inc", /* 29383 */ "PD Consulting and Security", /* 29384 */ "ANS", /* 29385 */ "Zetes 3iV CC", /* 29386 */ "enovance", /* 29387 */ "Activant Solutions", /* 29388 */ "LOGIKonline Inc.", /* 29389 */ "Digital IMS", /* 29390 */ "Strategic Data Pty Ltd", /* 29391 */ "a3 systems GmbH", /* 29392 */ "AETA AUDIO SYSTEMS", /* 29393 */ "Centre Hospitalier Régional Universitaire de Lille", /* 29394 */ "Pheedo, Inc.", /* 29395 */ "VeriSat AS", /* 29396 */ "Engineering System Solutions", /* 29397 */ "Workscape", /* 29398 */ "SIDSA", /* 29399 */ "OKC AG", /* 29400 */ "Fullnet, Inc.", /* 29401 */ "HELEX", /* 29402 */ "COMWAX", /* 29403 */ "Intelligens Rendszerek Divizio Kft.", /* 29404 */ "Unicel do Brasil Telecomunicações LTDA", /* 29405 */ "Connectbeam", /* 29406 */ "Portal Andres Jadan", /* 29407 */ "KEPCO", /* 29408 */ "Innovation Wireless Inc.", /* 29409 */ "Firesteel Technologies, Inc", /* 29410 */ "Instituto de Tecnologia da Informação e Comunicação do Estado do Espírito Santo - PRODEST", /* 29411 */ "Prodea Systems", /* 29412 */ "Access Layers LTD", /* 29413 */ "Opengate Data Systems", /* 29414 */ "Autentia Real Business Solutions", /* 29415 */ "ORBIT TECHNOLOGY GROUP", /* 29416 */ "Felix Schwarz Software-Entwicklung", /* 29417 */ "Tracenetwork Corporation Sdn. Bhd.", /* 29418 */ "Kapital Insurance Group", /* 29419 */ "West Bengal University of Technology", /* 29420 */ "Kargo Global Inc", /* 29421 */ "Support Soluções em Informática LTDA", /* 29422 */ "2V S.r.l.", /* 29423 */ "Embryo Web Solutions Ltda", /* 29424 */ "Materiales Electricos y Mecanicos - MEM Ltda", /* 29425 */ "State of Mind", /* 29426 */ "EZSAFE", /* 29427 */ "IKOEmed", /* 29428 */ "SynergyRT", /* 29429 */ "HMS GmbH", /* 29430 */ "FaithFamily Academy", /* 29431 */ "Hurco Automation Ltd.", /* 29432 */ "Digma Inc.", /* 29433 */ "MRK - Media AG", /* 29434 */ "Wisekey ELA", /* 29435 */ "Central Technology Services", /* 29436 */ "HNP", /* 29437 */ "ARAMEX International Ltd.", /* 29438 */ "Untold Structures P/L", /* 29439 */ "Université Louis Pasteur - UFR de Mathématique et d'Informatique", /* 29440 */ "Quanzhou Normal University", /* 29441 */ "ARISE", /* 29442 */ "ShangHai RuiGao InformationTechnologies Co.,Ltd", /* 29443 */ "Sondara Solucions", /* 29444 */ "Integra S.r.l.", /* 29445 */ "Telematik Design", /* 29446 */ "Nordic Growth Market NGM AB", /* 29447 */ "Gloucester Research Ltd", /* 29448 */ "Resolvity, Inc", /* 29449 */ "Digistar Telecomunicações S.A.", /* 29450 */ "Interop Technologies", /* 29451 */ "DigitalPersona, Inc.", /* 29452 */ "Brendt Peter", /* 29453 */ "O.D.S., Inc.", /* 29454 */ "CRAHAY.EU", /* 29455 */ "modas mobile Datensysteme GmbH", /* 29456 */ "Peer Fusion, Inc.", /* 29457 */ "ACETEL", /* 29458 */ "Gobierno de Aragón", /* 29459 */ "Red Bee Media", /* 29460 */ "Authentity - Certificaton Entity", /* 29461 */ "Stulz GmbH Klimatechnik", /* 29462 */ "Axigen Messaging", /* 29463 */ "Inverse groupe conseil", /* 29464 */ "Aaron Von Gauss", /* 29465 */ "The Nation Traffic", /* 29466 */ "Fire Breathing Robot Systems", /* 29467 */ "Fruhen Infotec", /* 29468 */ "Freber Enterprises", /* 29469 */ "DAX Technologies Corp", /* 29470 */ "VibiT BVBA", /* 29471 */ "Grinning Fool Productions", /* 29472 */ "Humanity Forward", /* 29473 */ "CHINA NETCOM GROUP BROADBAND SERVICE APPLICATIONS LIMITED CORPORATION FOR NATIONAL ENGINEERING LABORATORY", /* 29474 */ "ADILEC S.L.", /* 29475 */ "Viliam Trepák - NETCOM", /* 29476 */ "Markas-Al-Nour", /* 29477 */ "University of Chicago, Graduate School of Business", /* 29478 */ "hc Consulting", /* 29479 */ "Barash Communication Technologies Inc. (BCTI)", /* 29480 */ "Cambridge Semantics Inc", /* 29481 */ "Excell Battery Company", /* 29482 */ "Proformatique", /* 29483 */ "DevGuy", /* 29484 */ "SMART Technologies ULC", /* 29485 */ "Roundysoft", /* 29486 */ "Beijing LHWT Microelectronics Inc", /* 29487 */ "Jeremy Jones", /* 29488 */ "SlitherSoft", /* 29489 */ "Protech s.a.s.", /* 29490 */ "John Wiley & Sons, Inc.", /* 29491 */ "Pischows", /* 29492 */ "Limestone College", /* 29493 */ "State of Maine Government", /* 29494 */ "Siteworx, Inc.", /* 29495 */ "Marc Suttle", /* 29496 */ "Carbon Planet Pty Ltd", /* 29497 */ "Probin", /* 29498 */ "Unassigned", /* 29499 */ "StorageSwitch", /* 29500 */ "Algolith Inc.", /* 29501 */ "MDIT Innovations Inc", /* 29502 */ "GeniNetworks", /* 29503 */ "SDC ek. för.", /* 29504 */ "Resercom, L.P.", /* 29505 */ "Telepin Software", /* 29506 */ "InCoDe", /* 29507 */ "Pfadfinder & Pfadfinderinnenbund Nordlicht e.V.", /* 29508 */ "Naftna Industrija Srbije a.d. Novi Sad", /* 29509 */ "ZipTie", /* 29510 */ "HITACHI Hi-System21 Co.,Ltd. Minami-Team", /* 29511 */ "Integral Sistemas", /* 29512 */ "MvpZone", /* 29513 */ "NewLines Ltd.", /* 29514 */ "Korea Institute of Science and Technology (KIST)", /* 29515 */ "UUDynamics, Inc.", /* 29516 */ "AuxalNet", /* 29517 */ "Drew Hess", /* 29518 */ "Urząd Zamówień Publicznych", /* 29519 */ "DOMOD", /* 29520 */ "Omega Design, s.r.o.", /* 29521 */ "Unix Systems Management Pty Ltd", /* 29522 */ "IE Internet.com Limited", /* 29523 */ "Dubai Duty Free", /* 29524 */ "Ukrainiain industrial", /* 29525 */ "EBI consulting", /* 29526 */ "Spangenberg Consulting", /* 29527 */ "TOEL Electronics Ltd.", /* 29528 */ "CPS Technologies", /* 29529 */ "New Medical Co.,LTD.", /* 29530 */ "K3-NETWORKS", /* 29531 */ "Pacific West Association of Realtors", /* 29532 */ "NSSE SSC Charleston", /* 29533 */ "the hive", /* 29534 */ "BKMKS.COM", /* 29535 */ "SKY Perfect JSAT Corporation", /* 29536 */ "Velox", /* 29537 */ "Celeonet", /* 29538 */ "Lockview", /* 29539 */ "B-204-1", /* 29540 */ "City of Roseville - Information Technology Department", /* 29541 */ "BroadcastWebs LLC", /* 29542 */ "Inqnet GmbH", /* 29543 */ "University of Montenegro", /* 29544 */ "Open Source Business Group", /* 29545 */ "Soft- & Hardware Beratung Ebeling", /* 29546 */ "Thomas Neumann", /* 29547 */ "4Com GmbH", /* 29548 */ "EDS France SAS/D3SP", /* 29549 */ "Efectivos de Tecnicas, S.A.", /* 29550 */ "Dust in the net", /* 29551 */ "Three Palm Software LLC", /* 29552 */ "Habegger AG", /* 29553 */ "pouik.org", /* 29554 */ "CMB Consulting", /* 29555 */ "TechMind Ltd.", /* 29556 */ "Titus International Inc", /* 29557 */ "Titus Labs Inc", /* 29558 */ "Late-Hours", /* 29559 */ "SBE network solutions GmbH", /* 29560 */ "Yuston BV", /* 29561 */ "Sophelios BVBA", /* 29562 */ "MITANI CORPORATION", /* 29563 */ "Opensquad SARL", /* 29564 */ "DCMSYS LLC", /* 29565 */ "OH San Juan de Dios. Provincia Betica", /* 29566 */ "Central Informatics Organisation", /* 29567 */ "Integro Technologies Private Limited (Singapore)", /* 29568 */ "Senselogic AB", /* 29569 */ "Oak Ridge Associated Univerisites", /* 29570 */ "Mirasys", /* 29571 */ "Apotex Inc", /* 29572 */ "Laredo IT", /* 29573 */ "PowerCore Engineering", /* 29574 */ "Alexander Badent (none)", /* 29575 */ "Kilgour", /* 29576 */ "gateProtect AG, Germany", /* 29577 */ "STN BV", /* 29578 */ "42media group GmbH", /* 29579 */ "Viyya Technologies Inc.", /* 29580 */ "Axiomatica", /* 29581 */ "Nativ Systems Ltd", /* 29582 */ "Angelo State University", /* 29583 */ "Tom Link", /* 29584 */ "Comsec TR Pty. Ltd.", /* 29585 */ "USG People International N.V.", /* 29586 */ "Zadig Srl", /* 29587 */ "EGOS! The Education Company", /* 29588 */ "Wanari Kft.", /* 29589 */ "Lileo Scop Sarl", /* 29590 */ "OpenSS7 Corporation", /* 29591 */ "Corporate Big", /* 29592 */ "Bolkhuis", /* 29593 */ "San Jose State University", /* 29594 */ "Drury Hotels Corporation", /* 29595 */ "CMP Audiovisual", /* 29596 */ "Nextfour Group Ltd", /* 29597 */ "NSI Hosting, Inc.", /* 29598 */ "Torokina Networks", /* 29599 */ "International Islamic University Malaysia", /* 29600 */ "Aricent Communication (Holdings) Ltd.", /* 29601 */ "ALTASIS DI CASTIGLIEGO MICHELE", /* 29602 */ "Kenoxa GmbH", /* 29603 */ "Diverse Computing, Inc.", /* 29604 */ "CellGain", /* 29605 */ "Econoprint, Inc.", /* 29606 */ "Reverb Networks, Inc.", /* 29607 */ "pelzel", /* 29608 */ "Apogee Labs, Inc.", /* 29609 */ "Secure Process", /* 29610 */ "Clonewars.org", /* 29611 */ "Wi-Links", /* 29612 */ "Ethos-Networks", /* 29613 */ "Aug. Hedinger GmbH & Co. KG", /* 29614 */ "29West, Inc.", /* 29615 */ "reynald.org", /* 29616 */ "SyTech", /* 29617 */ "Region Syddanmark", /* 29618 */ "Johannes Oechsle LAN-Party Netzwerkausruester", /* 29619 */ "Gamesys Ltd", /* 29620 */ "BIOS Corporation", /* 29621 */ "Megafon OJSC", /* 29622 */ "Banque du Liban", /* 29623 */ "RIMOC GmbH", /* 29624 */ "Sagi Mehadave", /* 29625 */ "TeleDesign PLC", /* 29626 */ "IDpendant GmbH", /* 29627 */ "n2N Commerce", /* 29628 */ "Legg Mason, Inc.", /* 29629 */ "ONE-ANS S.p.A", /* 29630 */ "iptego GmbH", /* 29631 */ "Seko Worldwide", /* 29632 */ "Peleton Photonic Systems", /* 29633 */ "Dom Inwestycyjny BRE Banku S.A.", /* 29634 */ "Dealer Information Systems Corporation", /* 29635 */ "SecureMedia", /* 29636 */ "TrinitySoft Co.,Ltd.", /* 29637 */ "NovaTec Kommunikationstechnik GmbH", /* 29638 */ "The Electric Sheep Company, Inc.", /* 29639 */ "AP Nederland BV", /* 29640 */ "Hostworks Group Ltd", /* 29641 */ "exxact", /* 29642 */ "Winkwaves", /* 29643 */ "Antony Vennard", /* 29644 */ "bothan.net", /* 29645 */ "VisiWear AS", /* 29646 */ "Virtual Broadband Technology, Inc.", /* 29647 */ "QuoPin", /* 29648 */ "Infoton Corporation", /* 29649 */ "Georg Simon GmbH", /* 29650 */ "vidIP", /* 29651 */ "Shook Hardy & Bacon LLP", /* 29652 */ "Overstock.com Inc", /* 29653 */ "Freedom Networks", /* 29654 */ "Kirishi Glass Plant Ltd", /* 29655 */ "phaseDOT IT-Business-Solutions", /* 29656 */ "VTG Deutschland GmbH", /* 29657 */ "Fundacion Integra", /* 29658 */ "Carestream Health", /* 29659 */ "AFCO Systems", /* 29660 */ "Fulcrum Analytics, Inc.", /* 29661 */ "cron IT GmbH", /* 29662 */ "Embedded X Inc", /* 29663 */ "Packet General Networks, Inc.", /* 29664 */ "Protractor Software, Inc.", /* 29665 */ "Lunixtreme", /* 29666 */ "Destiny Solutions", /* 29667 */ "Kirei AB", /* 29668 */ "Firstlight Networks", /* 29669 */ "Medflow Inc.", /* 29670 */ "Meraki Networks, Inc.", /* 29671 */ "CSK WinTechnology Corporation", /* 29672 */ "M3 Design Inc.", /* 29673 */ "thewolfe.net, llc.", /* 29674 */ "alemo kommunikations GmbH", /* 29675 */ "net plus tecnolodgy", /* 29676 */ "Sensata Technologies - Power Controls WBL", /* 29677 */ "Absolute, Ltd.", /* 29678 */ "Espia Srl", /* 29679 */ "Atlantux Consultores S.L.", /* 29680 */ "AFPy", /* 29681 */ "DMO Technologies", /* 29682 */ "CopperEye Ltd", /* 29683 */ "Pioneer Magnetics Inc.", /* 29684 */ "eVision Pty Ltd", /* 29685 */ "Bharat Electronics Ltd.", /* 29686 */ "Absolute Performance, Inc.", /* 29687 */ "Axstor", /* 29688 */ "Ekplek", /* 29689 */ "Doctor Web, Ltd", /* 29690 */ "Silver Wave Technology Limited", /* 29691 */ "Globesy, s.r.o.", /* 29692 */ "Cobalt Digital", /* 29693 */ "Tethers Unlimited, Inc.", /* 29694 */ "REWSS A/S", /* 29695 */ "CitiFinancial Consumer Finance India Ltd.", /* 29696 */ "Leeds Primary Care Trust", /* 29697 */ "NBG ID", /* 29698 */ "Cetis d.d.", /* 29699 */ "Got Linux, Inc.", /* 29700 */ "PMD GmbH", /* 29701 */ "Eckard Vossas Unternehmensberatung", /* 29702 */ "Stuart Morgan", /* 29703 */ "Carlos Perello Marin", /* 29704 */ "SNOLAB", /* 29705 */ "Mapsolute GmbH", /* 29706 */ "Business & Engineering Systems Corp", /* 29707 */ "InfoStream Technologies", /* 29708 */ "Argibel Servicios Digitales S.L", /* 29709 */ "London Borough of Camden", /* 29710 */ "802automation Ltd", /* 29711 */ "m-sys EDV-Dienstleistungen", /* 29712 */ "LTECH", /* 29713 */ "Kyocera Communication Systems Co.Ltd", /* 29714 */ "Zavod za zdravstveno zavarovanje Slovenije", /* 29715 */ "Concilio Networks", /* 29716 */ "RealDolmen", /* 29717 */ "Technological Educational Institution of Athens (T.E.I. of Athens)", /* 29718 */ "MICROPLEX Printware AG", /* 29719 */ "xyco technologies AG", /* 29720 */ "BI-LO, LLC", /* 29721 */ "TimeCost", /* 29722 */ "IMAX Corp.", /* 29723 */ "RPC Packaging", /* 29724 */ "InConcertCC", /* 29725 */ "Rottenbytes", /* 29726 */ "John Zornig", /* 29727 */ "Planex Technologies S.A.", /* 29728 */ "Logesta Gestion del Transporte S.A.", /* 29729 */ "MADEK, Ltd.", /* 29730 */ "General Dynamics Information Technology", /* 29731 */ "MTS", /* 29732 */ "Hypertag Ltd.", /* 29733 */ "Wartsila Corporation", /* 29734 */ "E.T.S.V. Scintilla", /* 29735 */ "Unified Business Solutions", /* 29736 */ "Hollywood Center Studios", /* 29737 */ "Kerk", /* 29738 */ "GRETA Sud Normandie", /* 29739 */ "MST Systemtechnik AG", /* 29740 */ "Aruba PEC S.p.A.", /* 29741 */ "NetOne S.A.", /* 29742 */ "digiremote", /* 29743 */ "SVP Broadcast Microwave S.L.", /* 29744 */ "International Institute for Applied Systems Analysis", /* 29745 */ "Satro, s.r.o.", /* 29746 */ "ExpressThought", /* 29747 */ "SophiaSoft", /* 29748 */ "Matthew R Chase", /* 29749 */ "KTS InfoTech Pvt Ltd", /* 29750 */ "Cubico Solutions", /* 29751 */ "Computer System Laboratory at CMC Faculty, Moscow State University", /* 29752 */ "3Tera, Inc.", /* 29753 */ "Karl Blanderer Internetmarketing", /* 29754 */ "SISTEER", /* 29755 */ "Rochester Community and Technical College", /* 29756 */ "Oficina de Cooperación Universitaria, S.A.", /* 29757 */ "Polska Grupa Farmaceutyczna", /* 29758 */ "Engineering Solutions, Inc.", /* 29759 */ "CSS Inc.", /* 29760 */ "GoConnect Australia Pty Ltd", /* 29761 */ "DevMetrix", /* 29762 */ "ReadyLinks", /* 29763 */ "Crypto Team", /* 29764 */ "Paycor, Inc.", /* 29765 */ "Falcontrol Security GmbH", /* 29766 */ "James Hunt", /* 29767 */ "Emporia State University", /* 29768 */ "Accountis", /* 29769 */ "DIRECT ENERGIE", /* 29770 */ "TrioCom Ltd.", /* 29771 */ "Sutter Health", /* 29772 */ "Genworth Financial", /* 29773 */ "Amobee", /* 29774 */ "WushNet LLC", /* 29775 */ "Checkphone", /* 29776 */ "Shaw Industries, Inc.", /* 29777 */ "Honeywell Systems Group", /* 29778 */ "Zion Group Limited", /* 29779 */ "Secure IT-IS", /* 29780 */ "XEyedFrog Solutions", /* 29781 */ "CSK Holdings Corporation", /* 29782 */ "Brandenburg University of Technology", /* 29783 */ "Turismo Andaluz", /* 29784 */ "Ministerio de Agricultura, Pesca y Alimentacion", /* 29785 */ "Mediterrum SARL", /* 29786 */ "T-Systems MMS Dresden", /* 29787 */ "GZT Telkom-Telmor Sp. z o.o.", /* 29788 */ "Red Lion Controls (BlueTree Wireless Data, Inc.)", /* 29789 */ "Yelp Inc.", /* 29790 */ "Quality Nighthawk", /* 29791 */ "IPercom", /* 29792 */ "eNVENT Technologies", /* 29793 */ "DBD Deutsche Breitband Dienste", /* 29794 */ "CC Computer Consultants GmbH", /* 29795 */ "Instituto Mexicano del Seguro Social (IMSS)", /* 29796 */ "Working Technologies", /* 29797 */ "Loma Technology Group", /* 29798 */ "ex eventu GmbH", /* 29799 */ "Zeugma Systems Inc.", /* 29800 */ "DEEPSCAN GR", /* 29801 */ "Comway GmbH", /* 29802 */ "Helsinki Metropolia University of Applied Sciences", /* 29803 */ "Pyroll Oy", /* 29804 */ "blueocean IT-Services", /* 29805 */ "Demotera", /* 29806 */ "Ville de Sevran", /* 29807 */ "Nextlead GmbH", /* 29808 */ "Getnet Tecnologia", /* 29809 */ "Moving Bytes Communications, Systementwicklung GmbH", /* 29810 */ "Contaduría General de la Nación", /* 29811 */ "Kinetic Avionics Limited", /* 29812 */ "Prologica SGPS", /* 29813 */ "Gandara Center", /* 29814 */ "Gymnasium Salzgitter-Bad", /* 29815 */ "IRI France", /* 29816 */ "Gold Mobile", /* 29817 */ "National Financial Partners", /* 29818 */ "Elastiq LLC", /* 29819 */ "x-Gate", /* 29820 */ "SztupY dot hu", /* 29821 */ "The Options Clearing Corporation", /* 29822 */ "CallMiner, Inc.", /* 29823 */ "Inprint", /* 29824 */ "NeoAccel, Inc.", /* 29825 */ "WiBorne, Inc.", /* 29826 */ "Qness AB", /* 29827 */ "Bellgardt Embedded Systems", /* 29828 */ "Software Art", /* 29829 */ "Elektro Slovenija d.o.o", /* 29830 */ "Scuola Superiore S.Anna", /* 29831 */ "Saeil Systems Inc.", /* 29832 */ "GTZ India", /* 29833 */ "PRO-ZETA spol. s.r.o. Praha", /* 29834 */ "bruggmann engineering", /* 29835 */ "China Internet Network Information Center", /* 29836 */ "Erema - Engineering Recycling Maschinen und Anlagen GmbH", /* 29837 */ "DialogueScience, Inc.", /* 29838 */ "Dalman Technical Services Ltd", /* 29839 */ "llrp.org", /* 29840 */ "Fat Spaniel Technologies", /* 29841 */ "macmon secure gmbh", /* 29842 */ "CargoServer AG", /* 29843 */ "Centile SA", /* 29844 */ "VCC Perfect Pictures AG", /* 29845 */ "Sparkroom, Inc.", /* 29846 */ "Nav N Go Kft", /* 29847 */ "Far Eastern State University", /* 29848 */ "KSB AG", /* 29849 */ "Netline Communications Technologies (NCT) Ltd.", /* 29850 */ "Nuclear-Whales Informatikai Bt.", /* 29851 */ "Gryphon Networks", /* 29852 */ "eCare4all", /* 29853 */ "Advanced Medical Imaging Solutions, LLC", /* 29854 */ "T-Mobile Crna Gora d.o.o.", /* 29855 */ "anapol", /* 29856 */ "Ready Set Companies", /* 29857 */ "FCA US LLC", /* 29858 */ "KJC Systems Ltd Co", /* 29859 */ "Octopus Technologies Ltd", /* 29860 */ "N-iX LLC", /* 29861 */ "NANCY s.r.o", /* 29862 */ "Software Logic, Inc.", /* 29863 */ "Typeria", /* 29864 */ "Kjaerulff 1 A/S", /* 29865 */ "Method Analysis Limited", /* 29866 */ "Skanska", /* 29867 */ "Business Security", /* 29868 */ "UniNet", /* 29869 */ "EUROCOM Satellite Systems AS", /* 29870 */ "College of Southern Maryland", /* 29871 */ "Project Rialto", /* 29872 */ "OutProtect", /* 29873 */ "TEL2WEB GmbH", /* 29874 */ "sorcellerie", /* 29875 */ "Antwoord voor Bedrijven (ICTU)", /* 29876 */ "Allnight Computing", /* 29877 */ "Reduce My Fee, LLC", /* 29878 */ "Pittman Holdings", /* 29879 */ "Schelde Naval Shipbuilding", /* 29880 */ "Brovic ltd. China", /* 29881 */ "Lambda Networks Ltd", /* 29882 */ "Telemune Software Solutions Ltd", /* 29883 */ "MadaSoft", /* 29884 */ "Haute Ecole Specialisee de Suisse occidentale (HES-SO)", /* 29885 */ "beroNet GmbH", /* 29886 */ "Dirección General del Territorio Marítimo", /* 29887 */ "SpinetiX S.A.", /* 29888 */ "Utilia", /* 29889 */ "Work Microwave GmbH", /* 29890 */ "Bluelon", /* 29891 */ "Genesilico", /* 29892 */ "Jeroen Koekkoek", /* 29893 */ "FrenchCries!", /* 29894 */ "Fam List Schlattstall", /* 29895 */ "VdH Soft", /* 29896 */ "QSent", /* 29897 */ "Acropolis Software SPRL", /* 29898 */ "Roosevelt University", /* 29899 */ "EDEKA Aktiengesellschaft", /* 29900 */ "Anaheim Engineering Co., LTD.", /* 29901 */ "Dytecna Limited", /* 29902 */ "Counsel's Chambers Limited", /* 29903 */ "abacon products GmbH", /* 29904 */ "Perrit", /* 29905 */ "Dybala", /* 29906 */ "Webmedia AS", /* 29907 */ "IndigoVision Ltd", /* 29908 */ "Cicero Networks Limited", /* 29909 */ "Open Systems Management Ltd.", /* 29910 */ "Open-Tec", /* 29911 */ "Hx Technologies Inc.", /* 29912 */ "Intelligent Transportation Video", /* 29913 */ "Networkconcepts BV", /* 29914 */ "Northwood Logic", /* 29915 */ "Lightworks Technology Inc.", /* 29916 */ "Guangzhou New Postcom Equipment Co.,Ltd.", /* 29917 */ "Uralsvjazinform Inc.", /* 29918 */ "CJSC Orbita", /* 29919 */ "mySoftIT GmbH", /* 29920 */ "FV Service KG", /* 29921 */ "Starmark Trading Ltd.", /* 29922 */ "Netris", /* 29923 */ "GTD Sistemas de Informacion", /* 29924 */ "Multiplex Ltd.", /* 29925 */ "Santa Rosa S.A.", /* 29926 */ "LOHR", /* 29927 */ "RelayHealth", /* 29928 */ "United States Steel Corporation", /* 29929 */ "Koinema srl", /* 29930 */ "Cambridge Imaging Systems", /* 29931 */ "SOUND4", /* 29932 */ "APOAL Inc.", /* 29933 */ "Hypermedia Systems Inc. (USA)", /* 29934 */ "ABC Startsiden AS", /* 29935 */ "x15", /* 29936 */ "ellis stewart design", /* 29937 */ "The Swedish Coast Guard", /* 29938 */ "Alpha Red, Inc", /* 29939 */ "Kawhai", /* 29940 */ "Pavlov Media, Inc", /* 29941 */ "Himalaya Technologies", /* 29942 */ "Shelton | Johns Technology Group", /* 29943 */ "COARA Inc.", /* 29944 */ "Chinauninet", /* 29945 */ "OOO Media-Markt-Saturn", /* 29946 */ "CNW Consulting Network AB", /* 29947 */ "Consell de Mallorca", /* 29948 */ "Cassiopea OnLine srl", /* 29949 */ "GMIT GmbH", /* 29950 */ "DCom, spol. s r.o.", /* 29951 */ "JSC \"Alliance Group Holding\"", /* 29952 */ "deburit chemical engineering GmbH", /* 29953 */ "Health Identity Management Consortium - HIMC", /* 29954 */ "Medina VoIP", /* 29955 */ "FreeWave Technologies", /* 29956 */ "PCB Piezotronics Inc.", /* 29957 */ "Washtenaw Community College", /* 29958 */ "KolejNet", /* 29959 */ "specurio studio", /* 29960 */ "AServer NV", /* 29961 */ "Tag Systems S.A.", /* 29962 */ "Iron Council", /* 29963 */ "Tribunal de Contas dos Municipios do Estado do Pará", /* 29964 */ "Shinymark Enterprises Limited", /* 29965 */ "Advanced Concept Technology Ltd.", /* 29966 */ "B&R Data Systems", /* 29967 */ "Universidade Estadual de Campinas (Unicamp)", /* 29968 */ "MORISHIMA.NET", /* 29969 */ "Zervina Technologies LLC", /* 29970 */ "Damogran Apathetic Solutions", /* 29971 */ "compico", /* 29972 */ "GemEx Systems, Inc.", /* 29973 */ "E-WEB INFORMATION Co.", /* 29974 */ "Guangzhou Great Symbol Information Technology Co.,Ltd.", /* 29975 */ "Nara Institute of Science and Technology", /* 29976 */ "Palm Tree Technology, Inc.", /* 29977 */ "Gotland University", /* 29978 */ "Bruker AXS GmbH", /* 29979 */ "Smart Com d.o.o.", /* 29980 */ "Marben Products", /* 29981 */ "Massive Entertainment", /* 29982 */ "Waves Audio Ltd.", /* 29983 */ "Byelorussian State University of Informatics and Radioelectronics (BSUIR)", /* 29984 */ "DETRACOM SAS", /* 29985 */ "NET STREAMS", /* 29986 */ "Hivemind Systems, Inc.", /* 29987 */ "Calabrio, Inc.", /* 29988 */ "Qwaq Inc.", /* 29989 */ "John Smith Network Management", /* 29990 */ "Macif", /* 29991 */ "PONT Technology Co.,Ltd", /* 29992 */ "Net Marvellous", /* 29993 */ "CONCORD GmbH", /* 29994 */ "FUSAGx", /* 29995 */ "The Lorentz Group", /* 29996 */ "LavaNet, Inc.", /* 29997 */ "Kurashiki Cable Television Co.,Ltd.", /* 29998 */ "microC Design SRL", /* 29999 */ "University of Western Sydney", /* 30000 */ "BROWAN COMMUNICATIONS INCORPORATION", /* 30001 */ "FREEPP INCORPORATION", /* 30002 */ "Hiflex GmbH", /* 30003 */ "TerraNua Ltd", /* 30004 */ "Raybit Systems korea, Inc", /* 30005 */ "Mobile Fun", /* 30006 */ "DOB.SK", /* 30007 */ "Bank Austria Real Invest GmbH", /* 30008 */ "Information Industry Company", /* 30009 */ "Embotics Corporation", /* 30010 */ "Itochu Cable System Corp.", /* 30011 */ "ipoque GmbH", /* 30012 */ "Den selvejende institution Paul Bargsøe Kollegiet", /* 30013 */ "Pecsi Tudomanyegyetem Klinikai Kozpont", /* 30014 */ "KBC Bank", /* 30015 */ "Anel-Elektronik AG", /* 30016 */ "TAG Aviation", /* 30017 */ "FusionIO", /* 30018 */ "Diversified Sales and Service, Inc.", /* 30019 */ "Silesian University of Technology", /* 30020 */ "Mühlbauer AG", /* 30021 */ "Guangdong Cirrus Sci-tech Development Co., Ltd", /* 30022 */ "ITS-Telecom", /* 30023 */ "In-Tuition Networks Ltd", /* 30024 */ "Markus Widmer", /* 30025 */ "Blue Caravel", /* 30026 */ "Brainfat Networking", /* 30027 */ "Nova CATV, Inc.", /* 30028 */ "NENTRON Technology", /* 30029 */ "jamesoff.net", /* 30030 */ "Penguinlabs LTD", /* 30031 */ "Beijing Xintong Huaan Technologies Co. Ltd", /* 30032 */ "Atabyte", /* 30033 */ "IIJ Engineering,Inc.", /* 30034 */ "Formosa Wireless Systems Corp.", /* 30035 */ "Nomad Digital Ltd", /* 30036 */ "Company Extrim pro, Ltd.", /* 30037 */ "ALMDUDLER-LIMONADE A. & S. Klein GmbH & Co KG", /* 30038 */ "Topdog-software.com", /* 30039 */ "Tartu University Hospital", /* 30040 */ "Universität Augsburg", /* 30041 */ "Dynaco Oy", /* 30042 */ "Coral Automação Municipal", /* 30043 */ "Walter Dorwin Teague Associates, Inc.", /* 30044 */ "davidfuchs.ca", /* 30045 */ "rh-tec Business GmbH", /* 30046 */ "WorthTEK", /* 30047 */ "BNC Technologies Co.,Ltd.", /* 30048 */ "Acorn Active Media Foundation", /* 30049 */ "Jushri Technologies, Inc", /* 30050 */ "EDICOM (INTERCAMBIO ELECTRONICO DE DATOS Y COM SL)", /* 30051 */ "Agora SA", /* 30052 */ "MDoffice Inc", /* 30053 */ "Untangle Inc.", /* 30054 */ "BKK Essanelle", /* 30055 */ "Bando Electronic Communication Co., Ltd.", /* 30056 */ "AIO Systems", /* 30057 */ "otaking.se", /* 30058 */ "Alarislabs", /* 30059 */ "sevenstax", /* 30060 */ "Imprimerie Nationale", /* 30061 */ "CRIX International", /* 30062 */ "Kantonsspital Luzern", /* 30063 */ "Jens Kaiser", /* 30064 */ "Arista Networks, Inc.", /* 30065 */ "Swissdotnet", /* 30066 */ "Imprint Global Pty Ltd", /* 30067 */ "Walker Chandiok Grant Thornton", /* 30068 */ "Candlelight Software", /* 30069 */ "Lufthansa Systems Indonesia", /* 30070 */ "Colby Dillion", /* 30071 */ "The Government of Brunei Darussalam", /* 30072 */ "WYS S.O.C Corporation.", /* 30073 */ "Beijing Sharenet Information Technology Co.,Ltd.", /* 30074 */ "Humanomed", /* 30075 */ "ATILF - Analyse et Traitement Automatique de la Langue Francaise", /* 30076 */ "clanconley.com", /* 30077 */ "Novella SatComs Limited", /* 30078 */ "Open Mobile Alliance (OMA)", /* 30079 */ "Fraport AG", /* 30080 */ "Philip Morris USA", /* 30081 */ "David Computer Service", /* 30082 */ "Intelleca", /* 30083 */ "1dian.com", /* 30084 */ "Knopad Software SRL", /* 30085 */ "Arinbe Technologies, Inc.", /* 30086 */ "NEU-INFO", /* 30087 */ "Wuhan Gewei Electronic Technology Co., Ltd.", /* 30088 */ "Ak Kamal ISCC LLP", /* 30089 */ "shaikh", /* 30090 */ "SeaBright Insurance Company", /* 30091 */ "Zavarovalnica Maribor d.d.", /* 30092 */ "GEMAC Gesellschaft für Mikroelektronikanwendung Chemnitz mbH", /* 30093 */ "Beijing US-Sino Diverse Telecom Equipment Co.,Ltd.", /* 30094 */ "Kom-Pakt", /* 30095 */ "dataway GmbH", /* 30096 */ "Familie Dieter Baerwolf", /* 30097 */ "BBP AG", /* 30098 */ "MorphoTrust USA", /* 30099 */ "greenBytes Inc.", /* 30100 */ "SUNIX Co., Ltd.", /* 30101 */ "team Communication Technology Management GmbH", /* 30102 */ "One Reel", /* 30103 */ "ERR", /* 30104 */ "JARS OG", /* 30105 */ "Board of European Students of Technology", /* 30106 */ "SEACON TERMINALS LTD", /* 30107 */ "Xaragua® Enterprise Corporation", /* 30108 */ "CompIT SRL", /* 30109 */ "MDEV Desenvolvimento de Software para Celular Ltda", /* 30110 */ "Pacific NETwork Imaging, Inc.", /* 30111 */ "Network Solutions Private Limited", /* 30112 */ "Fornova", /* 30113 */ "Reserved", /* 30114 */ "Damien Degois", /* 30115 */ "Jims Group", /* 30116 */ "Telefield, Inc.", /* 30117 */ "Hostdime.com, INC", /* 30118 */ "UNION FENOSA, S.A.", /* 30119 */ "Nayatek S.L.", /* 30120 */ "scoyo", /* 30121 */ "MdbNet", /* 30122 */ "MaResCom GmbH", /* 30123 */ "ABAJAX", /* 30124 */ "ANDURAS AG", /* 30125 */ "LSI JAPAN CO.,LTD.", /* 30126 */ "Deft Labs Inc.", /* 30127 */ "Neovest, Inc.", /* 30128 */ "Trask solutions", /* 30129 */ "Hyperwave AG", /* 30130 */ "OMA", /* 30131 */ "ANAC", /* 30132 */ "iControl Networks", /* 30133 */ "Bitscape", /* 30134 */ "e-mehlbox.eu", /* 30135 */ "Sharif University of Technology", /* 30136 */ "SHANDONG TRANSPARENT COMMUNICATIONS CO,LTD", /* 30137 */ "Sparkassen Informatik GmbH & Co. KG", /* 30138 */ "AMS Engineering Sticht Gmbh", /* 30139 */ "Advantech B+B SmartWorx s.r.o.", /* 30140 */ "Landesbetrieb Daten und Information Rheinland-Pfalz", /* 30141 */ "National Magazine Company", /* 30142 */ "DecisionSoft LTD", /* 30143 */ "Kepware Technologies", /* 30144 */ "Active Media Architects, Inc.", /* 30145 */ "Dovetail Storage, Inc.", /* 30146 */ "Magnus.net", /* 30147 */ "CrossWorld", /* 30148 */ "TECNOVA LTDA", /* 30149 */ "Nizhny Tagil Iron & Steel Works", /* 30150 */ "Zimbabwe Revenue Authority", /* 30151 */ "nLogy s.r.o.", /* 30152 */ "Keystone Electronic Solutions", /* 30153 */ "e-Vox", /* 30154 */ "OpenBSD Project", /* 30155 */ "The Positive Internet Company Ltd", /* 30156 */ "Kalopa Research Limited", /* 30157 */ "EMPRESA BRASILEIRA DE TELECOMUNICACOES S A - EMBRATEL", /* 30158 */ "Scientific Games Racing", /* 30159 */ "Insomniac Games, Inc.", /* 30160 */ "Orbital Spuds Development, Inc.", /* 30161 */ "Farez", /* 30162 */ "Johannes H Laxdal", /* 30163 */ "Radium Network Solutions", /* 30164 */ "Derek Belrose", /* 30165 */ "Blue Ridge Networks, Inc.", /* 30166 */ "Tavasti Solutions Oy", /* 30167 */ "dnsee", /* 30168 */ "pragma:s Jan Schlosser", /* 30169 */ "Smart Health Solutions Pty Ltd", /* 30170 */ "NET SPACE Daniel Kiper", /* 30171 */ "OpenGoss Corporation", /* 30172 */ "Convey Plus TC", /* 30173 */ "Deka Works", /* 30174 */ "Jeff Knecht", /* 30175 */ "Hirotoshi Hamada", /* 30176 */ "Geodesic Limited", /* 30177 */ "Martin County School District", /* 30178 */ "Cervantes S.A.", /* 30179 */ "PetRays L.P.", /* 30180 */ "Public Works Government Services Canada", /* 30181 */ "3G Factory S.A.R.L", /* 30182 */ "KES INC.", /* 30183 */ "Gleim Internet, Inc.", /* 30184 */ "AWEK microdata", /* 30185 */ "TRINAMIC SOFTWARE FACTORY", /* 30186 */ "HCS GmbH", /* 30187 */ "MB-technology GmbH", /* 30188 */ "Bravura Solutions (UK) Limited", /* 30189 */ "Solera Networks", /* 30190 */ "IPTRADE SA", /* 30191 */ "Veraz Networks", /* 30192 */ "ComdataNetwork, Inc.", /* 30193 */ "Egon Frerich", /* 30194 */ "Carlson Wireless Technologies, Inc.", /* 30195 */ "Smith Travel Research", /* 30196 */ "kestan.co.uk", /* 30197 */ "Coherent Solutions", /* 30198 */ "Abaca Technology Corporation", /* 30199 */ "ePrize LLC", /* 30200 */ "Metaverse Republic", /* 30201 */ "HCE Engineering", /* 30202 */ "Forschungsverbund Berlin e.V.", /* 30203 */ "Faculty of Physics and Applied Informatics, University of Lodz", /* 30204 */ "Sirrix AG security technologies", /* 30205 */ "Invisible Software Ltd", /* 30206 */ "Level 3 Solutions, LLC", /* 30207 */ "Firecode Soluções em Tecnologia LTDA", /* 30208 */ "Universita' Ca' Foscari Venezia", /* 30209 */ "Logalty Servicios de Tercero de Confianza, S.L.", /* 30210 */ "THE CHUNICHI SHIMBUN CO., LTD.", /* 30211 */ "ON telecomm", /* 30212 */ "Vertex Pharmaceuticals", /* 30213 */ "CVSDude PTY LTD", /* 30214 */ "Serenity Information Systems", /* 30215 */ "Azolia", /* 30216 */ "Osinet S.A.", /* 30217 */ "AltaVoz S.A.", /* 30218 */ "Verivue, Inc", /* 30219 */ "Wavestream Corp", /* 30220 */ "UnboundID Corp", /* 30221 */ "Home Credit Finance Ukraine", /* 30222 */ "OOe Gebietskrankenkasse", /* 30223 */ "NCC Hoorn", /* 30224 */ "Cotendo", /* 30225 */ "Mairie de Besançon - France", /* 30226 */ "Channelot Ltd.", /* 30227 */ "Visipia", /* 30228 */ "debian-community.org", /* 30229 */ "dimedis GmbH", /* 30230 */ "morphism", /* 30231 */ "www.themaine.net", /* 30232 */ "John Muir Health", /* 30233 */ "NBT Infra", /* 30234 */ "Gordon & Louis Technologies", /* 30235 */ "Desktone Inc.", /* 30236 */ "EteVan Technologies co., Ltd.", /* 30237 */ "XandMail", /* 30238 */ "Archisys SARL", /* 30239 */ "Vivesta", /* 30240 */ "Jeffrey Ricker LLC", /* 30241 */ "Info Consultoria e Informatica Ltda.", /* 30242 */ "network.co.at GmbH", /* 30243 */ "Dazzle", /* 30244 */ "The Washington Post Company", /* 30245 */ "Diventus GmbH", /* 30246 */ "Coopers Peele (France) SARL", /* 30247 */ "Webkuteer", /* 30248 */ "marek.priv.at", /* 30249 */ "Telecom design (France)", /* 30250 */ "CampusLAN Software GmbH", /* 30251 */ "Jetair N.V.", /* 30252 */ "Certisign Certificadora Digital S.A.", /* 30253 */ "The Main Street America Group", /* 30254 */ "County of San Bernardino", /* 30255 */ "Telecommunication Technologies Ltd.", /* 30256 */ "Intrcomm Technology", /* 30257 */ "Xalyo Systems", /* 30258 */ "LWsystems GmbH & Co. KG", /* 30259 */ "Zenitel Netherlands BV", /* 30260 */ "HigherGround, Inc.", /* 30261 */ "Cacholong", /* 30262 */ "Klopf", /* 30263 */ "Axiometric, LLC", /* 30264 */ "Hinfox Bt.", /* 30265 */ "Inca Digital Printers ltd", /* 30266 */ "sofinco", /* 30267 */ "PENN Warehousing & Distribution, Inc.", /* 30268 */ "via donau Österreichische Wasserstraßengesellschaft mbH.", /* 30269 */ "Microdata Tecnologia Ltda", /* 30270 */ "Netsense", /* 30271 */ "Cache IQ, Inc", /* 30272 */ "Sairyx", /* 30273 */ "Greenfossil Pte Ltd", /* 30274 */ "TeraCortex", /* 30275 */ "OEAMTC", /* 30276 */ "Software Cellular Network Ltd", /* 30277 */ "Peykasa Messageware Co", /* 30278 */ "Gladserv Limited", /* 30279 */ "delta4 business solutions gmbh", /* 30280 */ "AussieHQ Pty Ltd", /* 30281 */ "Hammond Street Developments Pty. Ltd.", /* 30282 */ "GRADIOR GROUP a.s.", /* 30283 */ "Intersoft", /* 30284 */ "TMT SYSTEM", /* 30285 */ "Tridymedia", /* 30286 */ "Agito Networks Inc.", /* 30287 */ "Alog Datacenters do Brasil S/A", /* 30288 */ "Brian W Bush", /* 30289 */ "Vangenechten Packaging", /* 30290 */ "Sujansky & Associates, LLC", /* 30291 */ "Monit24.pl", /* 30292 */ "Collège Dunoyer de Segonzac", /* 30293 */ "InnoTrans Communications Inc.", /* 30294 */ "I2Net Christian Nordmann", /* 30295 */ "Innovation & Support Centre", /* 30296 */ "The Clockwork Lab", /* 30297 */ "Industrial Control and Communication Limited", /* 30298 */ "SEP Bulgaria JSC", /* 30299 */ "Internetworking & Broadband Consulting Co., Ltd.", /* 30300 */ "Invada Records Pty Ltd", /* 30301 */ "NuSuara Technologies Sdn Bhd", /* 30302 */ "KomSens", /* 30303 */ "CHAMBRE D'AGRICULTURE DU BAS-RHIN", /* 30304 */ "ITIS Holdings PLC", /* 30305 */ "SATEL Oy", /* 30306 */ "Invidi Technologies", /* 30307 */ "Clearspring Technologies, Inc.", /* 30308 */ "Svenska Linuxföreningen", /* 30309 */ "Remigio Conti", /* 30310 */ "Cartiza Networks", /* 30311 */ "educagri", /* 30312 */ "Indanet AG", /* 30313 */ "Seltec Computers Ltd.", /* 30314 */ "Papierfabrik Palm GmbH & Co. KG", /* 30315 */ "Unassigned", /* 30316 */ "First Sensor Technology GmbH", /* 30317 */ "GSoft BG", /* 30318 */ "SmartPropertyManager Ltd", /* 30319 */ "Exeltech", /* 30320 */ "Unison Technologies", /* 30321 */ "International Broadband Electric Communications, Inc. (IBEC)", /* 30322 */ "Eigen LLC", /* 30323 */ "Interface Masters, Inc.", /* 30324 */ "Grin AB", /* 30325 */ "ShoreGroup, Inc.", /* 30326 */ "Metro Servers Inc.", /* 30327 */ "Travis Hein", /* 30328 */ "CONRAC GmbH", /* 30329 */ "Atom Consultants Co.,Ltd.", /* 30330 */ "Octant Informatique", /* 30331 */ "eXXcellent solutions", /* 30332 */ "GRIPS - Gillen & Partner", /* 30333 */ "Korscient Consulting Limited", /* 30334 */ "DXI Networks", /* 30335 */ "Eirteic Consulting Ltd", /* 30336 */ "Luceat Spa", /* 30337 */ "Smart421", /* 30338 */ "National Center of Digital Signature Authentication - Ministry of Information and Communications of Viet Nam", /* 30339 */ "Moderntimes", /* 30340 */ "Deltacast", /* 30341 */ "Pellucid Consulting LLC", /* 30342 */ "Middle East Education through Technology", /* 30343 */ "Possimo Technologies Sdn Bhd", /* 30344 */ "TMS, LLC", /* 30345 */ "IT & Design Solutions GmbH", /* 30346 */ "Bekatul Port", /* 30347 */ "W-I-E-S-E-R.net", /* 30348 */ "Kvant-Efir", /* 30349 */ "Caucho Technology, Inc.", /* 30350 */ "Philip Gladstone", /* 30351 */ "sneudert.de", /* 30352 */ "Symmetria Hungary Ltd.", /* 30353 */ "EPiQ Life Science AB", /* 30354 */ "Digital Research Services LLC", /* 30355 */ "Domeo BV", /* 30356 */ "Unix-network", /* 30357 */ "Pro:Atria Ltd", /* 30358 */ "Tango Networks", /* 30359 */ "Trustwave Holdings, Inc.", /* 30360 */ "Triple Play Communications", /* 30361 */ "Brandwidth", /* 30362 */ "N.V. Devoteam Telecom & Media", /* 30363 */ "NewMedia Publications Ltd", /* 30364 */ "INEO SUEZ Group - INEO SYSTRANS", /* 30365 */ "M-Tech", /* 30366 */ "Dragonfly Technologies Pty Ltd", /* 30367 */ "Whitewall Networks", /* 30368 */ "Grupa Lotos S.A.", /* 30369 */ "GIHAR LTD", /* 30370 */ "Financial Link Sdn Bhd", /* 30371 */ "SANBlaze Technology, Inc.", /* 30372 */ "Wallix", /* 30373 */ "Opencode Systems Ltd", /* 30374 */ "Innovature Labs", /* 30375 */ "Outright Solutions", /* 30376 */ "Baseblack Ltd", /* 30377 */ "True Corporation PCL", /* 30378 */ "Southcoast Health System", /* 30379 */ "Aggienerds", /* 30380 */ "FRIENDSHIP-SYSTEMS", /* 30381 */ "Kristoff Kiefer", /* 30382 */ "ViaCom Informatics Ltd.", /* 30383 */ "Interjato Telecom", /* 30384 */ "CAVOK Software Systems GmbH", /* 30385 */ "Software Service Christoph Bach", /* 30386 */ "Singlesnet.com", /* 30387 */ "nobisCum", /* 30388 */ "Hangzhou Digicast Technology Co., Ltd.", /* 30389 */ "City of Garden Grove", /* 30390 */ "Alex Potter Consulting", /* 30391 */ "Globolog GmbH", /* 30392 */ "Cibenix", /* 30393 */ "Kyoto University", /* 30394 */ "Alhambra-Eidos", /* 30395 */ "Cambridge Consultants", /* 30396 */ "TELERAD SA", /* 30397 */ "Leader Technologies", /* 30398 */ "LogiSync LLC", /* 30399 */ "Red Condor, Inc.", /* 30400 */ "Fedora Project", /* 30401 */ "Halsted Surgery", /* 30402 */ "Secure Computing Networks", /* 30403 */ "never.no AS", /* 30404 */ "ClaimLynx, Inc", /* 30405 */ "Aubesoft Inc.", /* 30406 */ "CRISALID SARL", /* 30407 */ "Ulrich Boddenberg Informatique", /* 30408 */ "FTR Pty Ltd", /* 30409 */ "Jozef Hatala", /* 30410 */ "Parker Hannifin Corp", /* 30411 */ "Aeroflex Incorporated", /* 30412 */ "Channel Islands Stock Exchange LBG", /* 30413 */ "OBJECT Sistemas Multimidia Ltda", /* 30414 */ "PANSKY TECHOLOGY CORPORATION CHENGDU GROUP", /* 30415 */ "Latenter", /* 30416 */ "RLG Informatica", /* 30417 */ "Jewelry Television", /* 30418 */ "Novgorod State University", /* 30419 */ "Softex Insoporated", /* 30420 */ "NAVICON A/S", /* 30421 */ "Fatwire Corporation", /* 30422 */ "Centene Corporation", /* 30423 */ "Oak Scientific, LLC", /* 30424 */ "Innovative Communications Engineering", /* 30425 */ "Universal Solutions Group, Inc.", /* 30426 */ "2inches", /* 30427 */ "Telekom Research & Development Sdn Bhd", /* 30428 */ "Amnafzar Co.", /* 30429 */ "carnero.ca", /* 30430 */ "Telvent Environment, S.A.", /* 30431 */ "Open System Solutions (UK) Limited", /* 30432 */ "Dah Sing Life Assurance Company Limited", /* 30433 */ "Satelcom Oy", /* 30434 */ "Dalarna University", /* 30435 */ "Aralia Systems Ltd.", /* 30436 */ "Fortna, Inc", /* 30437 */ "capecom GbR", /* 30438 */ "layerX Technologies", /* 30439 */ "PROXIFLEX", /* 30440 */ "MATRA Systems (UK)", /* 30441 */ "Adaptive Spectrum and Signal Alignment, Inc.", /* 30442 */ "Schooner Information Technology, Inc.", /* 30443 */ "2-Bit Programmers", /* 30444 */ "Genie Technology Management", /* 30445 */ "Mobile Technika, Inc.", /* 30446 */ "Pete Gooch", /* 30447 */ "Sörlöv Holding", /* 30448 */ "Institute of Psychology and Pedagogics of Development", /* 30449 */ "Teleglobe Canada ULC", /* 30450 */ "CPEGM", /* 30451 */ "Xoft, Inc.", /* 30452 */ "Kannel Software Foundation", /* 30453 */ "Santa Barbara City College", /* 30454 */ "Wm Morrison Supermarkets PLC", /* 30455 */ "sugat.com.np", /* 30456 */ "CYGNET Technology BV", /* 30457 */ "Thomas Duclos Software", /* 30458 */ "EchoStorm Worldwide, LLC", /* 30459 */ "Perfomix Technologies Intl(P) Ltd", /* 30460 */ "Radley Network Technologies CC", /* 30461 */ "Freifunk Halle", /* 30462 */ "Supridatta Teleinformatica Ltda.", /* 30463 */ "Tecnosistemas Inc.", /* 30464 */ "Visage Mobile, Inc", /* 30465 */ "Privantis SA", /* 30466 */ "Carlson Wagonlit Travel", /* 30467 */ "Solid Technologies, Inc", /* 30468 */ "Synacor Inc", /* 30469 */ "CyberTrails", /* 30470 */ "TwoPiRadian Infotech Private Limited", /* 30471 */ "CityLink, Ltd.", /* 30472 */ "Steropes Technologies Limited", /* 30473 */ "CJSC \"InCore\"", /* 30474 */ "Intra2net AG", /* 30475 */ "BIS", /* 30476 */ "gig mbh berlin", /* 30477 */ "Enventis", /* 30478 */ "GlobeStar Systems Inc.", /* 30479 */ "DotLibre", /* 30480 */ "HySky Communications", /* 30481 */ "Omnes Loquantur Limited", /* 30482 */ "Virtual Switching Consultancy Limited", /* 30483 */ "OPTeam SA", /* 30484 */ "RTC-Siberia Co., Ltd.", /* 30485 */ "thomas kobienia", /* 30486 */ "Hydra Labs", /* 30487 */ "Boardlink Group Limited", /* 30488 */ "FAMIPOW", /* 30489 */ "Dtella Labs", /* 30490 */ "Helping Hand PC Services & Networking, Inc.", /* 30491 */ "Hypertek Inc.", /* 30492 */ "Digitek spa", /* 30493 */ "Microlink Telecom", /* 30494 */ "RoundTrip Systems", /* 30495 */ "E-Smart Systems d.o.o.", /* 30496 */ "Beijing EaseSea Interman Technology Co.,", /* 30497 */ "AeroScout", /* 30498 */ "Design 2000 Pvt Ltd", /* 30499 */ "Forca A/S", /* 30500 */ "Institute for Networking Technology", /* 30501 */ "The Norwegian Polar Institute", /* 30502 */ "Bastart", /* 30503 */ "Punctual Software Inc.", /* 30504 */ "Swiss Life Deutschland Operations GmbH", /* 30505 */ "ooma Inc.", /* 30506 */ "Extreme Copper, Incorporated", /* 30507 */ "Medavie Blue Cross", /* 30508 */ "Shenzhen Leagsoft Technology Co., Ltd..", /* 30509 */ "Bestwiz Softwarw Development (Dalian) Co.,Ltd.", /* 30510 */ "Arts Alliance Media", /* 30511 */ "ATEIS", /* 30512 */ "Ford Motor Company", /* 30513 */ "Lavínia Tavares", /* 30514 */ "m7 evolution", /* 30515 */ "oclane", /* 30516 */ "Zoot Enterprises, Inc.", /* 30517 */ "CoolIT Systems Inc.", /* 30518 */ "Wieldim", /* 30519 */ "IAESTE Austria", /* 30520 */ "Collab", /* 30521 */ "kludge.ca", /* 30522 */ "Taichung Veterans General Hospital", /* 30523 */ "Intersoft Electronics", /* 30524 */ "H&S Ventures, LLC", /* 30525 */ "Astec Solutions", /* 30526 */ "Mochi Media, Inc.", /* 30527 */ "V.Saint-Denis", /* 30528 */ "Vkernel Corporation", /* 30529 */ "INTI Electronica e Informatica", /* 30530 */ "LEANDRO DA SILVA MENDES INFORMATICA ME", /* 30531 */ "Alox", /* 30532 */ "DASANCNS", /* 30533 */ "Tajinc.ORG LLC", /* 30534 */ "Alphasoft GmbH", /* 30535 */ "BMTI", /* 30536 */ "Welsh Blood Service", /* 30537 */ "webLyzard", /* 30538 */ "Sappi Fine Paper", /* 30539 */ "Zymeworks Inc.", /* 30540 */ "Exacq Technologies, Inc.", /* 30541 */ "Komes Co. Ltd.", /* 30542 */ "QuartzNet", /* 30543 */ "iTAS Technology Corp.", /* 30544 */ "Akademia Podlaska", /* 30545 */ "JLA Ltd", /* 30546 */ "Institute of Physics of the ASCR, v. v. i.", /* 30547 */ "Alberta Blue Cross", /* 30548 */ "Merli dr. Clizio Consultant", /* 30549 */ "Konexxo GmbH", /* 30550 */ "Transtruct Foundation", /* 30551 */ "MicroBlade, Inc.", /* 30552 */ "LincWare", /* 30553 */ "Mitsubishi Space Software Co.,Ltd.", /* 30554 */ "mikhailelias.net", /* 30555 */ "King Faisal University", /* 30556 */ "Sapphire Computer Systems (UK) Ltd", /* 30557 */ "Ticketcorner AG", /* 30558 */ "Krüger Network Training & Consulting", /* 30559 */ "Pumpkin 3D", /* 30560 */ "expact.it", /* 30561 */ "Universidad de Montemorelos, A. C.", /* 30562 */ "Blackwave Inc.", /* 30563 */ "Algarroba", /* 30564 */ "GTS Nextra", /* 30565 */ "Dr. Gregory M. Stone & Associates", /* 30566 */ "Port One Internet, Inc.", /* 30567 */ "Msona Limited", /* 30568 */ "Globitel", /* 30569 */ "Arch Red Oy", /* 30570 */ "Mesto Domazlice", /* 30571 */ "NetDesign A/S", /* 30572 */ "Photon Meissener Technologies GmbH", /* 30573 */ "Fixma S.L.", /* 30574 */ "castLabs GmbH", /* 30575 */ "Wills and co Stockbrokers", /* 30576 */ "Opus Notion", /* 30577 */ "T Proje Muhendislik Dis Tic Ltd. Sti.", /* 30578 */ "Arab Bank (Switzerland)", /* 30579 */ "Peninsula Engineering Solutions Inc", /* 30580 */ "Appriver LLC", /* 30581 */ "RSP Systems A/S", /* 30582 */ "AhMuseIndustry.Net, LLC", /* 30583 */ "Allegory Software, Inc.", /* 30584 */ "SmartShare Systems", /* 30585 */ "Xytronix Research & Design, Inc.", /* 30586 */ "JumpGen Systems, LLC", /* 30587 */ "Euphonix, Inc", /* 30588 */ "HIS Technologies (HK) Limited", /* 30589 */ "Österreichische Pensionsversicherungsanstalt", /* 30590 */ "Hetzner Pty Ltd", /* 30591 */ "Nico Roeser", /* 30592 */ "Spyderweb Consulting", /* 30593 */ "LSTC", /* 30594 */ "Xenatech Co Ltd (South Korea)", /* 30595 */ "Unioncast", /* 30596 */ "Kan sp. z o.o.", /* 30597 */ "H.C. Starck GmbH", /* 30598 */ "SimplisIP", /* 30599 */ "Deltatec", /* 30600 */ "podhart.net", /* 30601 */ "Tyson Foods, Inc.", /* 30602 */ "JXX Technologies", /* 30603 */ "Uhland", /* 30604 */ "Landmark Digital Services", /* 30605 */ "eTour", /* 30606 */ "Saskatchewan Blue Cross", /* 30607 */ "FACULDADE NOVAFAPI", /* 30608 */ "Temboo, Inc.", /* 30609 */ "UVT Unternehmensberatung für Verkehr und Technik GmbH", /* 30610 */ "Maessa Telecontrol", /* 30611 */ "EK3 Technologies Inc.", /* 30612 */ "ATIS", /* 30613 */ "Expandium SAS", /* 30614 */ "Creative Technology Ltd.", /* 30615 */ "MagmaTec (Pty) Ltd", /* 30616 */ "Advanced Digital Systems Inc. (ADS)", /* 30617 */ "Rostocker Freizeitzentrum e.V.", /* 30618 */ "TOSHIBA MITSUBISHI-ELECTRIC INDUSTRIAL SYSTEMS CORPORATION", /* 30619 */ "Sloka Telecom Private Limited", /* 30620 */ "Global Holdings Group", /* 30621 */ "Centre des technologies de l'information de l'Etat , Luxembourg", /* 30622 */ "Federal Signal Corporation, Integrated Systems", /* 30623 */ "ALALOOP SAS", /* 30624 */ "tollwerk sinnesnavigatoren", /* 30625 */ "VeriSign", /* 30626 */ "bitGate data systems GmbH", /* 30627 */ "NIDEC CORPORATION", /* 30628 */ "ArchCyber Technology Co. Ltd.", /* 30629 */ "AfriNIC Ltd.", /* 30630 */ "Terra", /* 30631 */ "CJSC Kyivstar GSM", /* 30632 */ "Universitaet fuer Musik und darstellende Kunst Wien", /* 30633 */ "Eddahbi Karim", /* 30634 */ "II. gimnazija Maribor", /* 30635 */ "AMT DATA", /* 30636 */ "Haagenti Group Inc.", /* 30637 */ "Larry Sturtz", /* 30638 */ "Smart Education sp. z.o.o", /* 30639 */ "Unlimi-Tech Software Inc", /* 30640 */ "AJA Video Systems, Inc.", /* 30641 */ "AOptix Technologies, Inc.", /* 30642 */ "Databits", /* 30643 */ "Amir Rezghian", /* 30644 */ "Entry Point, LLC", /* 30645 */ "NYCLIX", /* 30646 */ "Value Team", /* 30647 */ "iSupportISP, LLC", /* 30648 */ "INetU, Inc.", /* 30649 */ "Para Systems, Inc.", /* 30650 */ "Precognet", /* 30651 */ "GlenMarshall.us", /* 30652 */ "Comability", /* 30653 */ "College of Policy Science, Ritsumeikan University", /* 30654 */ "Diamond Valley College", /* 30655 */ "lancehendrix.com", /* 30656 */ "Eaton-Williams", /* 30657 */ "BTC Business Technology Consulting AG", /* 30658 */ "Scilla Systems Inc.", /* 30659 */ "Onsite Media Network Inc.", /* 30660 */ "zubData", /* 30661 */ "Tara Systems GmbH", /* 30662 */ "Tall Umbrella", /* 30663 */ "P. Bryan Consulting Inc.", /* 30664 */ "APG Algemene Pensioen Groep N.V.", /* 30665 */ "Online Rewards", /* 30666 */ "Port40", /* 30667 */ "BrControls", /* 30668 */ "Research for Science, Art and Technology (RFSAT) Ltd", /* 30669 */ "Vololink Pty Ltd", /* 30670 */ "Crocus-com Company", /* 30671 */ "Ancerno Ltd.", /* 30672 */ "EDELCA", /* 30673 */ "NTS Workspace AG", /* 30674 */ "Wayne State University School of Medicine", /* 30675 */ "D-TA Systems Inc.", /* 30676 */ "C4i Security LLC", /* 30677 */ "Nomovok Ltd", /* 30678 */ "Xicom Technology", /* 30679 */ "City of Walsenburg, Colorado", /* 30680 */ "Donald Swauger Consulting", /* 30681 */ "davidrobin.net", /* 30682 */ "quadium.net", /* 30683 */ "YAZAKI Corporation", /* 30684 */ "TSTENG", /* 30685 */ "N-iTUS", /* 30686 */ "CoSolIT", /* 30687 */ "ShenZhen DaShi Technology Co.,LTD", /* 30688 */ "Planet Controls Pty Ltd", /* 30689 */ "Institute of Computational Mathematics and Mathematical Geophysics SB RAS", /* 30690 */ "Wapice Ltd", /* 30691 */ "WS Atkins PLC", /* 30692 */ "global infinipool GmbH", /* 30693 */ "FaxBack, Inc.", /* 30694 */ "Chrysler Financial", /* 30695 */ "Deimos Engenharia, S.A.", /* 30696 */ "CPC (UK)", /* 30697 */ "n1ety", /* 30698 */ "Ubipart Ltd", /* 30699 */ "Telefonia Dialog SA", /* 30700 */ "Norwegian University of Life Sciences (UMB)", /* 30701 */ "A2E Technologies", /* 30702 */ "Oberthur Technologies", /* 30703 */ "Dipl.-Ing. Eberhard Iglhaut", /* 30704 */ "SoundBite Communications", /* 30705 */ "OpenDNS, LLC", /* 30706 */ "Solaiemes", /* 30707 */ "Stej - Stefan & Jens Internet Services AB", /* 30708 */ "NCCI Holdings, Inc", /* 30709 */ "IT Soft Ltd.", /* 30710 */ "Coolman, Inc", /* 30711 */ "BDO Seidman, LLP", /* 30712 */ "Oopss.org", /* 30713 */ "Harry Wettke Consulting", /* 30714 */ "Q-layer", /* 30715 */ "Alston & Bird LLP", /* 30716 */ "Odysseyware Inc.", /* 30717 */ "TSB Bank Ltd", /* 30718 */ "Elektroservice", /* 30719 */ "Etone", /* 30720 */ "Agenor d.o.o.", /* 30721 */ "ProSoft Technology", /* 30722 */ "FreeCode International Inc.", /* 30723 */ "Vietnam Commercial Computing and Communication", /* 30724 */ "all included software gmbh", /* 30725 */ "fj3.us Enterprises", /* 30726 */ "SNIX/net International", /* 30727 */ "Siltanet", /* 30728 */ "SLM Corporation", /* 30729 */ "Seanodes", /* 30730 */ "BODET S.A", /* 30731 */ "NetSocket, Inc.", /* 30732 */ "Umpqua Bank", /* 30733 */ "Florian Sailer", /* 30734 */ "BLUECOARA Networks", /* 30735 */ "Kyoeisangyo corp.", /* 30736 */ "Servicios Tecnicos Agrupados S.A.", /* 30737 */ "Optenet", /* 30738 */ "Jason Antman", /* 30739 */ "Assyst Gesellschaft für Automatisierung Software und Systeme mbH", /* 30740 */ "Configo Systems GmbH", /* 30741 */ "Glimmerglass Networks Inc.", /* 30742 */ "Global Village Telecom", /* 30743 */ "Mississippi River Maritime Association", /* 30744 */ "Open Channel Software", /* 30745 */ "Opensolutions GmbH & Co. KG", /* 30746 */ "THR Systems", /* 30747 */ "Raumtex Biehl", /* 30748 */ "Marabu EDV -Beratung und -Service GmbH", /* 30749 */ "Mesh City Wireless", /* 30750 */ "Pentadyne Power Corporation", /* 30751 */ "INFOGROUP S.p.A:", /* 30752 */ "University of Tsukuba", /* 30753 */ "Erik Abele Technology Consulting", /* 30754 */ "faultinjection.net", /* 30755 */ "CodersApple.com", /* 30756 */ "FAR NETWORKS SRL", /* 30757 */ "Comtech Systems, Inc.", /* 30758 */ "ShowSys", /* 30759 */ "ELECTRO STANDARDS LABORATORIES", /* 30760 */ "Telavista B.V.", /* 30761 */ "Mbira Technologies", /* 30762 */ "GlassFish Networks", /* 30763 */ "QlikTech", /* 30764 */ "GAMA V2", /* 30765 */ "Tomas Shulman", /* 30766 */ "Full Spectrum Inc.", /* 30767 */ "Collège de France", /* 30768 */ "Citec S.p.A.", /* 30769 */ "Alberto Storch", /* 30770 */ "HealthPlus of Michigan", /* 30771 */ "ProCom Professional Communication & Service GmbH", /* 30772 */ "FlyCatcher", /* 30773 */ "Anthena Technology, Inc.", /* 30774 */ "XControl Sistemas & Soluciones Ltd.", /* 30775 */ "Dronas 2002, S.L.U.", /* 30776 */ "Cymotec", /* 30777 */ "Murilo Fujita", /* 30778 */ "Apelon, Inc", /* 30779 */ "Charles McCrobie", /* 30780 */ "Infonova Consultores", /* 30781 */ "HiliSoft", /* 30782 */ "IceCell ehf", /* 30783 */ "Fink Consulting GmbH", /* 30784 */ "Bitfrost AS", /* 30785 */ "Defne", /* 30786 */ "Global Networks Switzerland AG", /* 30787 */ "VScape", /* 30788 */ "Market Technologies, Inc.", /* 30789 */ "Cortex Informatica", /* 30790 */ "brass Media Inc.", /* 30791 */ "Huber Verlag für Neue Medien GmbH", /* 30792 */ "Ingram Book Co.", /* 30793 */ "Platinumtel Communications", /* 30794 */ "Zeltiq Aesthetics, Inc.", /* 30795 */ "Videon Central, Inc.", /* 30796 */ "elconas", /* 30797 */ "Delta Lambda Phi National Social Fraternity", /* 30798 */ "SkyNet Community VPN", /* 30799 */ "Bee Ware SA", /* 30800 */ "IGUS-ITS GmbH", /* 30801 */ "FireScope, Inc.", /* 30802 */ "Vyatta, Inc.", /* 30803 */ "Lattice Limited", /* 30804 */ "Solegy LLC", /* 30805 */ "ipcenter.at", /* 30806 */ "Franz Krainer - netal", /* 30807 */ "Sun International Management Limited", /* 30808 */ "PacketOps", /* 30809 */ "Universitaet Bremen - Fachbereich 3", /* 30810 */ "Herley-CTI", /* 30811 */ "ObjectTel, Inc.", /* 30812 */ "Advanced Telecom Technologies", /* 30813 */ "Institut français de recherche pour l'exploitation de la mer", /* 30814 */ "Intecna Soluciones", /* 30815 */ "escape studio", /* 30816 */ "illuminate Solutions", /* 30817 */ "Powerset, Inc.", /* 30818 */ "software security networks - Lukas Gradl", /* 30819 */ "Fighting Penguin Business Systems", /* 30820 */ "Cape Cod Sensors", /* 30821 */ "General Conference of Seventh-day Adventists", /* 30822 */ "Akimeka", /* 30823 */ "SH Solutions", /* 30824 */ "CentraComm Communications, Ltd.", /* 30825 */ "SmartOptics AS", /* 30826 */ "RIZ ODASILJACI d.d.", /* 30827 */ "Colfax Corporation", /* 30828 */ "United Technologists Europe Limited (UTEL)", /* 30829 */ "G & L Geissendörfer & Leschinsky GmbH", /* 30830 */ "Network Center of Tianjin University", /* 30831 */ "CompuCredit Corporation", /* 30832 */ "Clearspeed Technology plc", /* 30833 */ "VirtueFusion", /* 30834 */ "Blue Box Group, LLC", /* 30835 */ "WINGServers", /* 30836 */ "Edge Velocity Corporation", /* 30837 */ "Cash America Net of Illinois, LLC", /* 30838 */ "Skidmore College", /* 30839 */ "Replify Ltd", /* 30840 */ "Astase", /* 30841 */ "APINC (Association Pour l'Internet Non Commercial)", /* 30842 */ "Blogreen", /* 30843 */ "Lucas IT Services", /* 30844 */ "Mechron Power Systems", /* 30845 */ "IPsmarx Technology Inc.", /* 30846 */ "9Star Research, Inc.", /* 30847 */ "“SITRONICS Smart Technologies”, LLC", /* 30848 */ "Magellan Netzwerke GmbH", /* 30849 */ "The University of Hong Kong", /* 30850 */ "Accolm", /* 30851 */ "Knipp Medien und Kommunikation GmbH", /* 30852 */ "Mikro Værkstedet", /* 30853 */ "Heinlein Support GmbH", /* 30854 */ "Geckologic GmbH", /* 30855 */ "Bandwidth.com, Inc.", /* 30856 */ "Data Device Corporation", /* 30857 */ "Mobile News Channel S.A.", /* 30858 */ "E-Solutions", /* 30859 */ "Betgenius", /* 30860 */ "Venture Craft Networks", /* 30861 */ "Nancy Universite", /* 30862 */ "Samsung Electro-Mechanics Co., LTD.", /* 30863 */ "CD-adapco", /* 30864 */ "Cilantro Cafe", /* 30865 */ "ID2go IT-solutions", /* 30866 */ "Volksmission entschiedener Christen e.V.", /* 30867 */ "Kansas City Web Repair Co.", /* 30868 */ "Weiland Associates, Inc.", /* 30869 */ "InterRed GmbH", /* 30870 */ "Luce Forward Hamilton and Scripps LLP", /* 30871 */ "Uniloc USA", /* 30872 */ "Confident, Inc.", /* 30873 */ "Tuneology", /* 30874 */ "InnoDomus", /* 30875 */ "Divmod, Inc.", /* 30876 */ "Giogio IT", /* 30877 */ "Panacea Vision Co. LTD", /* 30878 */ "Pavleck LLC", /* 30879 */ "Chaos Computer Club München e.V.", /* 30880 */ "ELycée S.A.S.", /* 30881 */ "Nanjing Xian Zhi Lu Technology Co.,Ltd.", /* 30882 */ "Correlix Inc.", /* 30883 */ "Covertix", /* 30884 */ "Rookie Inc.", /* 30885 */ "Sichuan Jiuzhou Electronic Technology Co.,Ltd", /* 30886 */ "Alfred KUHSE GmbH", /* 30887 */ "cittadino GmbH", /* 30888 */ "Valero Energy Corporation", /* 30889 */ "Institut de Recherche en Ophtalmologie", /* 30890 */ "Gramant", /* 30891 */ "Mirada PLC", /* 30892 */ "CJSC Goodwin", /* 30893 */ "INTRA-SYS GmbH", /* 30894 */ "antonis.mobi", /* 30895 */ "Knitebane.net", /* 30896 */ "McDonald's Corporation", /* 30897 */ "NetworkedAssets GmbH", /* 30898 */ "Montana State University", /* 30899 */ "ipWorks Co., Ltd.", /* 30900 */ "UNITED INFORMATION TECHNOLOGY CO.LTD", /* 30901 */ "GoBGK", /* 30902 */ "Registru Centras", /* 30903 */ "Radius Sweden AB", /* 30904 */ "INNOVA S.A.", /* 30905 */ "IFS Ing.-Vertriebsbuero für EDV Softwaretechnik GmbH", /* 30906 */ "Paradigm Communication Systems Ltd", /* 30907 */ "RtVision, Inc.", /* 30908 */ "wbb wireless", /* 30909 */ "WS Live, LLC", /* 30910 */ "Christopher Hubbard", /* 30911 */ "Indent Solutions LLC", /* 30912 */ "UMC ELECTRONICS CO., LTD.", /* 30913 */ "Oliver Oehme EDV-Service GmbH", /* 30914 */ "Beijing Shengtian Engineering Design&Consult Inc. (bjst)", /* 30915 */ "TeamQuality", /* 30916 */ "jillstephens.org", /* 30917 */ "Catatrepa, S.A.", /* 30918 */ "Unipier Ltd.", /* 30919 */ "Scania Infomate", /* 30920 */ "john horton consultancy ltd", /* 30921 */ "Telsasoft", /* 30922 */ "Max-Planck-Institute for Mathematics in the Sciences", /* 30923 */ "Jantronics", /* 30924 */ "Robust Solutions LLC", /* 30925 */ "flexmedia.com.tw", /* 30926 */ "Mainova AG", /* 30927 */ "Loycon s.c.", /* 30928 */ "Schuberg Philis", /* 30929 */ "Billiamware SW", /* 30930 */ "Sheldon Networks Inc", /* 30931 */ "Epicenter Inc", /* 30932 */ "nick125", /* 30933 */ "STECO Ltd", /* 30934 */ "Railway Equipment Company", /* 30935 */ "Texas State University", /* 30936 */ "Communications-Electronics Solutions Pty Ltd", /* 30937 */ "N8 Identity Corp.", /* 30938 */ "Embrapa Gado de Corte", /* 30939 */ "SC FITS SRL", /* 30940 */ "iFACTORY Consulting", /* 30941 */ "Global IP Solutions, Inc.", /* 30942 */ "MultiQ Products AB", /* 30943 */ "PCMS Group PLC", /* 30944 */ "Chengdu Guangda Electronic&Telecommunication Technology Development Co., Ltd.", /* 30945 */ "Department of Computer Engg.", /* 30946 */ "YAMAKI ELECTRIC CORPORATION", /* 30947 */ "Cloudmark, Inc.", /* 30948 */ "Aha! Software", /* 30949 */ "Transneptune", /* 30950 */ "N Green", /* 30951 */ "CONSTALANT JSC", /* 30952 */ "Novotronik GmbH", /* 30953 */ "IDS services", /* 30954 */ "Flavio Poletti", /* 30955 */ "yTech GmbH", /* 30956 */ "WHP International SAS", /* 30957 */ "Slavenet", /* 30958 */ "ZhongLianTong electronics corporation, Ltd", /* 30959 */ "Innotube, Inc.", /* 30960 */ "RedShift Inter Networking", /* 30961 */ "Denis Knauf", /* 30962 */ "HUTON", /* 30963 */ "ZLGMCU", /* 30964 */ "University \"Dunarea de Jos\" Galati", /* 30965 */ "SHENZHEN CLEVER ELECTRONIC CO.,LTD.", /* 30966 */ "VVAAQIS", /* 30967 */ "For Sale Digital Internet-Agentur GmbH", /* 30968 */ "2MI Tecnologia", /* 30969 */ "IC Plus Corp.", /* 30970 */ "ALEXON CO.,LTD.", /* 30971 */ "College of Lake County", /* 30972 */ "RightsAssist, LLC.", /* 30973 */ "kitASP", /* 30974 */ "cvicse Ltd.", /* 30975 */ "Netezza Inc", /* 30976 */ "SPINLOCK d.o.o.", /* 30977 */ "Cordium Links, LLC", /* 30978 */ "E.C.O. Institut für Ökologie", /* 30979 */ "Krazan and Associates, Inc", /* 30980 */ "MagtiCom LTD", /* 30981 */ "Jacobs University Bremen", /* 30982 */ "Gurulabs.it", /* 30983 */ "GNS Systems GmbH", /* 30984 */ "Gadgets & Technology Solutions LLC", /* 30985 */ "Paymetric Inc.", /* 30986 */ "Norpak Corporation", /* 30987 */ "PowerFile, Inc", /* 30988 */ "Hiscox Plc", /* 30989 */ "Food for the Hungry", /* 30990 */ "PCS do Brasil Ltda", /* 30991 */ "Wrocław University of Economics", /* 30992 */ "Sure3 Networks, LLC", /* 30993 */ "SSB Progetti srl", /* 30994 */ "WebMessenger, Inc.", /* 30995 */ "BlackMesh", /* 30996 */ "Telecom South America S/A", /* 30997 */ "Fikus Development Corp.", /* 30998 */ "Rohati Systems, Inc.", /* 30999 */ "stelcom", /* 31000 */ "secomicon GmbH", /* 31001 */ "COSI", /* 31002 */ "China Pacific Insurance (Group) Company Limited", /* 31003 */ "Nautile SARL", /* 31004 */ "ODS-Medical GmbH", /* 31005 */ "EnergoData", /* 31006 */ "Ikse.net", /* 31007 */ "Business & Decision", /* 31008 */ "PRECISION ELECTRONICS LTD.", /* 31009 */ "Cymphonix Corp", /* 31010 */ "Enterprise Management Consulting Ltd.", /* 31011 */ "Home Works S.p.A.", /* 31012 */ "School District of Philadelphia", /* 31013 */ "FXtion Limited", /* 31014 */ "Nalco Company", /* 31015 */ "Socrata, Inc.", /* 31016 */ "tele.sjb.partners AG", /* 31017 */ "HeLi NET iTK", /* 31018 */ "Tecal Engenharia Ltda", /* 31019 */ "Teachers Credit Union", /* 31020 */ "Nstein Technologies Inc.", /* 31021 */ "Sun&seeds Solutions S.L.", /* 31022 */ "Veeam Software", /* 31023 */ "Swiss Reinsurance Company", /* 31024 */ "NPAI SA", /* 31025 */ "Gil Leduc Industries", /* 31026 */ "SyTech Corporation", /* 31027 */ "Onse telecom corporation", /* 31028 */ "HYUNDAI Digital Technology Co.,Ltd", /* 31029 */ "Voipex Limited", /* 31030 */ "VO2 Labs", /* 31031 */ "jcsbk", /* 31032 */ "Elodig", /* 31033 */ "Schleifenbauer Products BV", /* 31034 */ "Haniriito Co.,Ltd.", /* 31035 */ "Svyaz Engineering M JSC", /* 31036 */ "Luxms Inc.", /* 31037 */ "Next Generation Creative LLC", /* 31038 */ "JinniWare Software", /* 31039 */ "Doze.net", /* 31040 */ "TZ Communications Ltd", /* 31041 */ "Uny IT B.V.", /* 31042 */ "Eclipse Options (HK) Ltd.", /* 31043 */ "Alfresco Software Ltd.", /* 31044 */ "Fry Consulting, Inc.", /* 31045 */ "Collogia Unternehmensberatung AG", /* 31046 */ "Aptilon Holdings Inc", /* 31047 */ "Art Of Mobile", /* 31048 */ "Midtronics Inc.", /* 31049 */ "CyT Comunicaciones y Telemática S.R.L", /* 31050 */ "Mojix Inc.", /* 31051 */ "Liberty Alliance", /* 31052 */ "Evolved Intelligence", /* 31053 */ "TTech", /* 31054 */ "gfsb Gesellschaft fuer Systemberatung mbH", /* 31055 */ "Thunderbird Resorts", /* 31056 */ "Ergowells", /* 31057 */ "Teragauge", /* 31058 */ "Known Star (Beijing) Kiosks Co.. LTD", /* 31059 */ "Video Internet Technologies LTD.", /* 31060 */ "Cheops Elektronik Handels- und Fertigungs KG", /* 31061 */ "Aeracode", /* 31062 */ "Daniel Saul", /* 31063 */ "Optimal Satcom, Inc.", /* 31064 */ "Toyo Electronics Corp.", /* 31065 */ "GSP - Loteamentos", /* 31066 */ "On Line Informatica", /* 31067 */ "Tyfon Svenska AB", /* 31068 */ "Belvok Ltd.", /* 31069 */ "Zentzu Inc.", /* 31070 */ "Intelinet AS", /* 31071 */ "proQuest Computersysteme GmbH", /* 31072 */ "Radian Company", /* 31073 */ "Electronimec, Inc", /* 31074 */ "Mobigeo", /* 31075 */ "Jan Fischer", /* 31076 */ "Systems Neurobiology Laboratory", /* 31077 */ "Nankai Densetsu CO.,LTD.", /* 31078 */ "Bircher ProcessControl AG", /* 31079 */ "Galileo International", /* 31080 */ "Perlan Technologies Polska Sp. z o.o.", /* 31081 */ "EUNETIC GmbH", /* 31082 */ "ALTE LEIPZIGER Versicherung a. G.", /* 31083 */ "TechSAT GmbH", /* 31084 */ "Greyware Automation Products, Inc.", /* 31085 */ "Technology Nexus Secured Business Solutions AB", /* 31086 */ "Enfo Broadcast AS", /* 31087 */ "Extend Health, Inc.", /* 31088 */ "Clemson University", /* 31089 */ "Scale Computing, Inc.", /* 31090 */ "Andreas Tsiotsias", /* 31091 */ "GFI Software Ltd", /* 31092 */ "Passguard", /* 31093 */ "dynaTrace Software, Inc.", /* 31094 */ "SEC (Software Engineering Center, Chinese Academy Of Sciences)", /* 31095 */ "koyo electric co,ltd", /* 31096 */ "Mouse-hole.com", /* 31097 */ "PJM Interconnection, L.L.C.", /* 31098 */ "SZ-ID b.v.", /* 31099 */ "Metascopic", /* 31100 */ "Future Spirits Co,Ltd.", /* 31101 */ "u10 Networks", /* 31102 */ "Daniel Ellard", /* 31103 */ "EPRO Telecom Services Ltd.", /* 31104 */ "WMHost", /* 31105 */ "23projects.org", /* 31106 */ "Global Protocols", /* 31107 */ "Compriva Communications Privacy Solutions Inc.", /* 31108 */ "IAVANTE Foundation", /* 31109 */ "UAB \"BT-Grupe\"", /* 31110 */ "Norfello Oy", /* 31111 */ "XForm Systems GmbH", /* 31112 */ "Swemel JSC", /* 31113 */ "Aetna Group S.p.A.", /* 31114 */ "InfoWatch", /* 31115 */ "Cuesta College", /* 31116 */ "Quality Bicycle Products, Inc.", /* 31117 */ "Cryptomach Ltd.", /* 31118 */ "I-node S.r.l.", /* 31119 */ "QiPlay", /* 31120 */ "Techfirm, Inc.", /* 31121 */ "VoIPFuture Ltd.", /* 31122 */ "WuHan Teklong Technology Co.,Ltd", /* 31123 */ "ABF Baltic AS", /* 31124 */ "Ressources Informatiques", /* 31125 */ "ASTELLIA", /* 31126 */ "Emerson Process Management", /* 31127 */ "Lead Tech Design", /* 31128 */ "Alaska Satellite Facility", /* 31129 */ "Basho Technologies, Inc.", /* 31130 */ "Ilove2ski", /* 31131 */ "Dictao", /* 31132 */ "Triton Container Intl", /* 31133 */ "Kinderedheart", /* 31134 */ "Diglinks GmbH", /* 31135 */ "Gestión de Seguridad Electrónica S.A. - GSE S.A.", /* 31136 */ "Bildungszentrum Uster", /* 31137 */ "DrJays.com, Inc.", /* 31138 */ "Viv Diwakar", /* 31139 */ "TouK Sp. z o. o. s. k. a.", /* 31140 */ "GEMIK", /* 31141 */ "7signal Oy", /* 31142 */ "Andreas Stenius Teknikkonsult", /* 31143 */ "Corporación Santandereana para el Avance y la Innovación Científica y Tecnológica - Avance", /* 31144 */ "Holido", /* 31145 */ "MatrikonOPC", /* 31146 */ "RiverStar Software", /* 31147 */ "Saga d.o.o. Beograd", /* 31148 */ "South-West University", /* 31149 */ "TriumStar International Co., Ltd.", /* 31150 */ "Sixgreen", /* 31151 */ "Allegea Information Services", /* 31152 */ "Aonalu", /* 31153 */ "ck-productions", /* 31154 */ "SeYo Solutions", /* 31155 */ "By Light Professional IT Services", /* 31156 */ "Patersons HR & Payroll Solutions", /* 31157 */ "Team Engineers", /* 31158 */ "Stadtwerke Speyer GmbH", /* 31159 */ "DARTALIS S.A.", /* 31160 */ "SMT&C Co., Ltd.", /* 31161 */ "EMC Electronic Media Communication SA", /* 31162 */ "Ultra Electronics - Tactical Communication Systems", /* 31163 */ "xweb OG", /* 31164 */ "Active Storage, Inc.", /* 31165 */ "ViM Internetdienstleistungen Gmbh", /* 31166 */ "Home State Bank", /* 31167 */ "Pleora Technologies Inc.", /* 31168 */ "Medical Facilities of America", /* 31169 */ "PNG Development Group", /* 31170 */ "Ning Inc", /* 31171 */ "Broward Sheriff's Office", /* 31172 */ "Alaska Department of Fish & Game", /* 31173 */ "Mobile Active Pty Ltd", /* 31174 */ "Partition Tragic", /* 31175 */ "Largic Co.,Ltd.", /* 31176 */ "Quantm", /* 31177 */ "GroundHog Software", /* 31178 */ "Micro Research Ltd", /* 31179 */ "Centre for Development of Advanced Computing", /* 31180 */ "DBALab S.p.A.", /* 31181 */ "Ville de Luxembourg", /* 31182 */ "The Logic Group Enterprises Ltd", /* 31183 */ "EWE AG", /* 31184 */ "Kell Systems", /* 31185 */ "mybasta.com", /* 31186 */ "Secure Designs, Inc.", /* 31187 */ "Engel Solutions AG", /* 31188 */ "Rhombotech LLC", /* 31189 */ "Hackers' Treasure Zoo", /* 31190 */ "Alset Corporation", /* 31191 */ "Hella KGaA Hueck & Co.", /* 31192 */ "DT Netsolution GmbH", /* 31193 */ "Public Association \"RENAM\" (Research and Educational Networking Association of Moldova)", /* 31194 */ "audio data Ton- und Datentechnik GmbH", /* 31195 */ "Sosialistisk Venstreparti", /* 31196 */ "Ousmane Ba International Business Automation", /* 31197 */ "Thomas Stein", /* 31198 */ "E-learning SA", /* 31199 */ "is-ro Informations-Architektur", /* 31200 */ "Dotcom-Monitor Inc", /* 31201 */ "wiredobjects", /* 31202 */ "Jenomics GmbH", /* 31203 */ "I-James Technology", /* 31204 */ "Newsroom Solutions, LLC", /* 31205 */ "DRS Test and Energy Management, LLC", /* 31206 */ "Vertica Systems, Inc", /* 31207 */ "Seneca College of Applied Arts & Technology", /* 31208 */ "Lightcomm Technology", /* 31209 */ "Cross Technologies, Inc.", /* 31210 */ "Engineering Design Team, Inc.", /* 31211 */ "Senotron GmbH", /* 31212 */ "Integrat (Pty) Ltd", /* 31213 */ "ADIPSYS", /* 31214 */ "PFS", /* 31215 */ "PCM Industries", /* 31216 */ "AST", /* 31217 */ "UCOPIA Communications", /* 31218 */ "kubus IT GbR", /* 31219 */ "Syberian", /* 31220 */ "Niggemann Innovations GmbH", /* 31221 */ "Idium AS", /* 31222 */ "Spider Financial", /* 31223 */ "Horizon Semiconductors", /* 31224 */ "Pulse Power and Measurement Ltd.", /* 31225 */ "NWG Technologies, LLC", /* 31226 */ "US Cable", /* 31227 */ "RUSTEDCOMPUTING.COM", /* 31228 */ "One Convergence", /* 31229 */ "Lazurit", /* 31230 */ "Longhurst Group", /* 31231 */ "Ringcentral, Inc.", /* 31232 */ "Almira Labs, S.L.", /* 31233 */ "Inter7 Internet Technologies, Inc.", /* 31234 */ "ENVALE SYSTEMS PVT. LTD.", /* 31235 */ "PartyGaming PLC", /* 31236 */ "e.sigma Technology AG", /* 31237 */ "baumann.at - concepts & sulotions", /* 31238 */ "AustriaPro (e-Zustellung)", /* 31239 */ "i-move internet gmbh", /* 31240 */ "Cross Industries AG", /* 31241 */ "Foster Link Inc.", /* 31242 */ "Interhost AS", /* 31243 */ "Fresh Media Group", /* 31244 */ "Brandon Werner", /* 31245 */ "Realmagic Technology Ltd.", /* 31246 */ "DigiSSL Inc", /* 31247 */ "Field Solutions, LLC", /* 31248 */ "Daruma Telecomunicacoes e Informatica S/A", /* 31249 */ "Avnet", /* 31250 */ "Olé Telecom", /* 31251 */ "ELMECH", /* 31252 */ "Andre Hotzler EDV-Dienstleistungen", /* 31253 */ "Fooman Limited", /* 31254 */ "MAC Telecom Technologies Pvt Ltd", /* 31255 */ "CSO srl", /* 31256 */ "elxsi networking services", /* 31257 */ "3onedata Technology Co. Ltd.", /* 31258 */ "Sisnetinfo CO., ltd.", /* 31259 */ "Phebus", /* 31260 */ "Placid Sky Consulting", /* 31261 */ "HOLA S.A.", /* 31262 */ "Riga Technical university", /* 31263 */ "TEGNIX", /* 31264 */ "Queensland Studies Authority", /* 31265 */ "Privredna komora Srbije", /* 31266 */ "Zivios, LLC.", /* 31267 */ "Nubium Systems", /* 31268 */ "Sapotek Inc.", /* 31269 */ "XRoads Networks", /* 31270 */ "Geni, Inc", /* 31271 */ "Ed Greenberg Technical Services Corp", /* 31272 */ "RIS Technology", /* 31273 */ "Webmasterprogramm GmbH", /* 31274 */ "TTG ULUSLARARASI TELEKOMINIKASYON ILETISIM HIZMETLERI ve ELEKT.TIC.LTD.STI", /* 31275 */ "DSA Volgmann", /* 31276 */ "Fluidmesh Networks, Inc.", /* 31277 */ "Alphons Tech. Co. Ltd", /* 31278 */ "Shenzhen Routdata Technology Co., Ltd", /* 31279 */ "Premiersoft (Singapore) Pte Ltd", /* 31280 */ "sourcephotonics", /* 31281 */ "Solid Access Technologies LLC", /* 31282 */ "SONOWAND AS", /* 31283 */ "Spazidigitali", /* 31284 */ "Beijing 3V Communication Technology Co.,Ltd.", /* 31285 */ "Valora Holding AG", /* 31286 */ "FutureIT", /* 31287 */ "Partners Data Systems, Inc.", /* 31288 */ "SARL SECOM - GMixon - Pixeliris", /* 31289 */ "Nissan Finacial Services Co., Ltd.", /* 31290 */ "Minutolo", /* 31291 */ "WPC-Vogt", /* 31292 */ "Tata Város Polgármesteri Hivatala", /* 31293 */ "Impetus Infotech (india) pvt. ltd.", /* 31294 */ "Aqualectra B.V.", /* 31295 */ "Kynetix", /* 31296 */ "Dortmund University of Technology", /* 31297 */ "Hochschule Anhalt (FH)", /* 31298 */ "Elite CRM Software Ltd.", /* 31299 */ "Emmeskay", /* 31300 */ "Litheware Pty Ltd", /* 31301 */ "ScuttledMonkey", /* 31302 */ "HelloWeb", /* 31303 */ "Andes SCD", /* 31304 */ "Sure Tech (HK) Limited", /* 31305 */ "Severed Head Software Ltd.", /* 31306 */ "astarsoft", /* 31307 */ "Pacific Network Research", /* 31308 */ "QuintessenceLabs Pty Ltd", /* 31309 */ "CRYPTECHNIQ Pty Ltd", /* 31310 */ "CEMA ASP", /* 31311 */ "Jens Axboe Linux Kernel", /* 31312 */ "Nets DanID A/S", /* 31313 */ "Priva B.V.", /* 31314 */ "Thales Alenia Space Italia", /* 31315 */ "Seed Linux", /* 31316 */ "ADTelecom S.L.", /* 31317 */ "Southern Symentech & Solutions Private Limited", /* 31318 */ "Portugal Telecom, SA", /* 31319 */ "Disig, a.s.", /* 31320 */ "Munisense BV", /* 31321 */ "Sierra Wireless, Inc.", /* 31322 */ "eXelate Media", /* 31323 */ "CTS Corporation", /* 31324 */ "Howard University", /* 31325 */ "Apollo Security Sales, Inc.", /* 31326 */ "Greenplum", /* 31327 */ "Whispering Wolf Productions", /* 31328 */ "Diginext B.V.", /* 31329 */ "Comstar, Inc", /* 31330 */ "Commuture Corp", /* 31331 */ "Dr.Reisacher", /* 31332 */ "Purekernel Systems Limited", /* 31333 */ "Unicon, Inc.", /* 31334 */ "John Antypas", /* 31335 */ "Neovera, Inc.", /* 31336 */ "Union & Comstar", /* 31337 */ "Kavach Networks Private Limited", /* 31338 */ "Triada", /* 31339 */ "Jiwalu", /* 31340 */ "innoSysTec GmbH", /* 31341 */ "S-Terra CSP", /* 31342 */ "Festo AG & Co. KG", /* 31343 */ "Tripadvisor", /* 31344 */ "Sun Microsystems (B.C.) Inc.", /* 31345 */ "Cine-tal", /* 31346 */ "Spirus Applied Learning Solutions AG", /* 31347 */ "DONET S.A.C", /* 31348 */ "Digital Wave Co.,Ltd.", /* 31349 */ "Government Information Management Unit, Ministry of Finance, Finland", /* 31350 */ "managedhosting.de GmbH", /* 31351 */ "Meteogroup Deutschland", /* 31352 */ "iKu Systems & Services GmbH & Co. KG", /* 31353 */ "Computa Services and Consultants Ltd", /* 31354 */ "Tuxicoman", /* 31355 */ "Casa Brasil", /* 31356 */ "Guoke tek,Inc.", /* 31357 */ "id3 Semiconductors", /* 31358 */ "Orcanthus", /* 31359 */ "revenco", /* 31360 */ "conject AG", /* 31361 */ "FHeigl", /* 31362 */ "Sumlogic Innovations", /* 31363 */ "BEE MediaSoft Limited", /* 31364 */ "MaxSP Corporation", /* 31365 */ "MMJ Group, Inc", /* 31366 */ "Asseco Slovakia, a.s.", /* 31367 */ "Systancia SA", /* 31368 */ "OhmForce", /* 31369 */ "Jugendzentrum e.V., Karlstr. 13", /* 31370 */ "Communicado, Inc.", /* 31371 */ "University of Southern Indiana", /* 31372 */ "CENELEC TC79 WG7 CCTV Surveillance Systems", /* 31373 */ "Plansmith Corporation", /* 31374 */ "The Hub Partnership LLP", /* 31375 */ "Reliable science & technology co.,Ltd", /* 31376 */ "buunSoft", /* 31377 */ "Vervis COMINT Services GmbH", /* 31378 */ "inform solutions GmbH", /* 31379 */ "Citec", /* 31380 */ "TI-WMC", /* 31381 */ "EDEKA Handelsgesellschaft Suedwest mbH", /* 31382 */ "east taiya wireless telecommunication Inc.", /* 31383 */ "Port25 Solutions, Inc.", /* 31384 */ "Zylex Systems", /* 31385 */ "ARCHE Engenharia e Comercio de Sistemas de Automacao e Teleinformatica Ltda", /* 31386 */ "Row 44, Inc.", /* 31387 */ "On-Net Surveillance Systems, Inc. (OnSSI)", /* 31388 */ "Sven Richter", /* 31389 */ "Ural State Forest Engineering University", /* 31390 */ "Oakton Community College", /* 31391 */ "Squared Financial Services Ltd.", /* 31392 */ "OneBeacon Insurance", /* 31393 */ "Victron Energy B.V.", /* 31394 */ "The Translational Genomics Research Institute", /* 31395 */ "HPC Systems Inc.", /* 31396 */ "Armor Safe Technologies, LLC", /* 31397 */ "Suburbia Public Access Network", /* 31398 */ "SCALABLE NETWORK TECHNOLOGIES", /* 31399 */ "WaveGuider Technology Ltd", /* 31400 */ "Sarbarian Software", /* 31401 */ "WINLAB", /* 31402 */ "Mgame Japan Corp.", /* 31403 */ "Optiwave Photonics Limited", /* 31404 */ "X-tec GmbH ICNS", /* 31405 */ "Le Studio Vert", /* 31406 */ "ON-X", /* 31407 */ "Cincinnati Country Day School", /* 31408 */ "Telemetry Network System", /* 31409 */ "TenRoses SRL", /* 31410 */ "Edinboro University of Pa", /* 31411 */ "Carter and Associates", /* 31412 */ "eBiz Consulting Inc.", /* 31413 */ "MMK", /* 31414 */ "Nederlands Ministerie van Buitenlandse Zaken", /* 31415 */ "Edevag Consulting HB", /* 31416 */ "Tokyo University of Science", /* 31417 */ "Adexso Advanced Expert Solutions", /* 31418 */ "Skalarit AB", /* 31419 */ "team2work GbR", /* 31420 */ "Coblan srl", /* 31421 */ "Retailp S.A.S.", /* 31422 */ "Identity Technology Ltd", /* 31423 */ "Egothor", /* 31424 */ "Mountain Power Inc.", /* 31425 */ "Fitbit, Inc.", /* 31426 */ "ticketpro GmbH", /* 31427 */ "PT. Telemetri Indonesia", /* 31428 */ "RealConnect (Pty) Ltd", /* 31429 */ "RSU GmbH", /* 31430 */ "CoSiSo", /* 31431 */ "Courtyard Electronics Ltd", /* 31432 */ "Toumaz Technology Limited", /* 31433 */ "Minerva-Korea", /* 31434 */ "Users, Incorporated", /* 31435 */ "Ansley & Associates, Inc.", /* 31436 */ "Call & Call Holding S.p.A.", /* 31437 */ "phoops s.r.l.", /* 31438 */ "Correo Uruguayo", /* 31439 */ "Embedded Data Systems, LLC", /* 31440 */ "Eurika srl", /* 31441 */ "JonDos GmbH", /* 31442 */ "The Alberta Library", /* 31443 */ "MAKELSAN LTD.", /* 31444 */ "FatBox Inc.", /* 31445 */ "catpipe", /* 31446 */ "IRGA Production Company", /* 31447 */ "Prolancer Pty Ltd", /* 31448 */ "Perfect Line S.A.", /* 31449 */ "David Rourke", /* 31450 */ "ipado - Informatiker-Partnerschaft Pauxberger und Domschke", /* 31451 */ "VS Information Systems", /* 31452 */ "Zyrion Inc.", /* 31453 */ "towebs inc.", /* 31454 */ "Bulb", /* 31455 */ "ScapeCaster", /* 31456 */ "Meebo, Inc.", /* 31457 */ "RAVIOLIKINGDOM.COM", /* 31458 */ "United States Peoples Virtual Party", /* 31459 */ "Versatile Security Sweden AB", /* 31460 */ "sächsische Informations-Compagnie zu Berlin | Marcus Pauli", /* 31461 */ "Canare", /* 31462 */ "Itibia Technologies Inc.", /* 31463 */ "EPCOM IT-Systeme, Pirker & Zauner OEG", /* 31464 */ "Systemica Consulting", /* 31465 */ "NeoConsult A/S", /* 31466 */ "Gravity Interactive, Inc.", /* 31467 */ "The Bluenote Group", /* 31468 */ "Alior Bank S.A.", /* 31469 */ "Vector Data LLC", /* 31470 */ "SunStrom GmbH", /* 31471 */ "Axcera Inc.", /* 31472 */ "NOVA Chemicals Corporation", /* 31473 */ "Viagenie inc.", /* 31474 */ "ITS Schmidinger GmbH", /* 31475 */ "Deviant Software", /* 31476 */ "TTC MARCONI s.r.o.", /* 31477 */ "Pluribus", /* 31478 */ "Grey Group", /* 31479 */ "Universidade Federal do Rio Grande", /* 31480 */ "ABBRIS Ltd.", /* 31481 */ "Top Level Internet Pty Ltd", /* 31482 */ "Universidad Rey Juan Carlos", /* 31483 */ "Basset AB", /* 31484 */ "FlexSecure GmbH", /* 31485 */ "Logica Norr AB", /* 31486 */ "The Transaction Company", /* 31487 */ "oxylane", /* 31488 */ "Manchester Computing Ltd", /* 31489 */ "Monnsta", /* 31490 */ "Cabo Telecom", /* 31491 */ "BOCOM SECURITY(ASIA PACIFIC) LIMITED", /* 31492 */ "The Hospital Authority Hong Kong", /* 31493 */ "Host 17", /* 31494 */ "Combe Walden Associates Limited", /* 31495 */ "NetModule AG", /* 31496 */ "Haute Ecole d'Ingénierie et de Gestion du Canton de Vaud (HEIG-Vd)", /* 31497 */ "Stiftung Sympany", /* 31498 */ "Novozymes A/S", /* 31499 */ "Lindsay Broadband Inc.", /* 31500 */ "Khaledma", /* 31501 */ "Mantaray AB", /* 31502 */ "Sanitas S.A. de Seguros", /* 31503 */ "Networkers AG", /* 31504 */ "Dirección General de Tráfico", /* 31505 */ "Dragonfly Grzegorz Marszałek", /* 31506 */ "arcutronix Gmbh", /* 31507 */ "Internat der Maristenbrüder Mindelheim", /* 31508 */ "Soapstone Networks", /* 31509 */ "New Horizons", /* 31510 */ "Henry Ford Community College", /* 31511 */ "BittWare, Inc.", /* 31512 */ "Prosul - Projetos, Supervisão e Planejamento LTDA.", /* 31513 */ "Software Horizons Inc.", /* 31514 */ "SizeIT Drift Aktiebolag", /* 31515 */ "Zen Internet Limited", /* 31516 */ "Akixa", /* 31517 */ "International All Sports Limited", /* 31518 */ "Jakko Network", /* 31519 */ "iPerfecta Japan Ltd.", /* 31520 */ "Univar Benelux S.A.", /* 31521 */ "Washington Apple Pi, Ltd.", /* 31522 */ "Community Health Information Collaborative", /* 31523 */ "müller it gmbh", /* 31524 */ "NEC Laboratories Europe", /* 31525 */ "Change Networks A/S", /* 31526 */ "VMF Nord ek för", /* 31527 */ "SIEMENS S.A: IA SPAIN", /* 31528 */ "Pensionskasse SBB", /* 31529 */ "TSI Power Corporation", /* 31530 */ "Immutify Limited", /* 31531 */ "Ensynch, Inc", /* 31532 */ "ScanSafe Ltd", /* 31533 */ "Adfinis SyGroup AG", /* 31534 */ "Parkeon", /* 31535 */ "OpenNHRP project", /* 31536 */ "Gossamer Threads Inc.", /* 31537 */ "Velocity Network", /* 31538 */ "Traveling bits, Inc.", /* 31539 */ "INTEC Inc.", /* 31540 */ "Yaamen Inc", /* 31541 */ "Robert Carleton", /* 31542 */ "RIONERO", /* 31543 */ "Sistema Integrado de Defesa Social", /* 31544 */ "Yellowbook Inc", /* 31545 */ "Rotary International", /* 31546 */ "COGITO Management Consulting", /* 31547 */ "Media & Broadcast Technologies", /* 31548 */ "Shu-Te University", /* 31549 */ "K Franchise Vertriebssysteme Gesellschaft m.b.H.", /* 31550 */ "Niechoj electronic GmbH", /* 31551 */ "Disforce", /* 31552 */ "Invocrown Ltd", /* 31553 */ "Elvys Ltd.", /* 31554 */ "VCS Aktiengesellschaft", /* 31555 */ "TiQ srl", /* 31556 */ "Vision Technologies Inc.", /* 31557 */ "David M Brooke", /* 31558 */ "pathSolutions", /* 31559 */ "ARTEC Computer GmbH", /* 31560 */ "Telecomproduct", /* 31561 */ "Backcountry.com", /* 31562 */ "HGST", /* 31563 */ "Chainzone Tech. Ind.", /* 31564 */ "Nurminen Logistics Oyj", /* 31565 */ "Ytti", /* 31566 */ "EURECA", /* 31567 */ "Licensys Pty Ltd", /* 31568 */ "Branden Schneider", /* 31569 */ "Gnodal", /* 31570 */ "Narratone Pte Ltd", /* 31571 */ "Consolidated Smart Systems", /* 31572 */ "Peel District School Board", /* 31573 */ "Security Monster", /* 31574 */ "InnoGames GmbH", /* 31575 */ "CTC Engineering Ltd.", /* 31576 */ "7Safe Ltd.", /* 31577 */ "A2x Trefzer Consulting", /* 31578 */ "virgitech", /* 31579 */ "Departamento de Engenharia Eletrônica - CEFET RJ", /* 31580 */ "REDDOXX GmbH", /* 31581 */ "Caixa Geral de Depósitos", /* 31582 */ "AgilTech", /* 31583 */ "Ben Jen Online", /* 31584 */ "Umoe Communication", /* 31585 */ "Teragram, A SAS Company", /* 31586 */ "Univ Community", /* 31587 */ "IceWave", /* 31588 */ "Axlon Electronics Corporation", /* 31589 */ "MRI Cardiac Services, Inc", /* 31590 */ "Digital Governance", /* 31591 */ "Jump Trading, LLC", /* 31592 */ "Electronic Child Health Network", /* 31593 */ "Elm Technology", /* 31594 */ "KGlobal Tech Co., Ltd.", /* 31595 */ "OJSC iCFO", /* 31596 */ "Global Real Estate And Technology Consortium, Inc.", /* 31597 */ "Grok-A-Lot, LLC", /* 31598 */ "P0F Sistemske Storitve Grega Bremec s.p.", /* 31599 */ "Beijing TechSolute Technology Co., Ltd.", /* 31600 */ "DreamGarage Inc.", /* 31601 */ "Raying Technology Co., Ltd.", /* 31602 */ "Information Society Development Committee under the Government of the Republic of Lithuania", /* 31603 */ "Sunny Multimedia Co.,ltd", /* 31604 */ "Ekahau Oy", /* 31605 */ "LUMINOUS POWER TECHNOLOGIES PVT LTD", /* 31606 */ "eBox technologies S.L", /* 31607 */ "Emaging", /* 31608 */ "Lisp", /* 31609 */ "Noisivne", /* 31610 */ "California Creativity Association, Inc.", /* 31611 */ "Roessner-Network-Solutions", /* 31612 */ "Extrawerk", /* 31613 */ "Ubuntu NL", /* 31614 */ "LEVELER, LLC", /* 31615 */ "LINUX INK", /* 31616 */ "Celeste", /* 31617 */ "Cloudpic", /* 31618 */ "Editora Abril S.A.", /* 31619 */ "The J.M. Smucker Company", /* 31620 */ "MoCA - Multimedia over Coax Alliance", /* 31621 */ "Meddius LLC", /* 31622 */ "Information Security Corp.", /* 31623 */ "Premier Heart", /* 31624 */ "Astron-Fortis Inc", /* 31625 */ "Lee-Dickens Ltd", /* 31626 */ "Preferred Voice, Inc.", /* 31627 */ "Opticom Communications LLC", /* 31628 */ "fengyun.ltd", /* 31629 */ "media concept GmbH", /* 31630 */ "Conseil Régional Nord - Pas de Calais", /* 31631 */ "Shanghai Titan Technology Co., Ltd.", /* 31632 */ "Quickline Business AG", /* 31633 */ "ICT Embedded b.v.", /* 31634 */ "TextFunnel", /* 31635 */ "Shanghai Colorful Magnetic Resonance Technology Co. Ltd.", /* 31636 */ "Peak Communications Ltd", /* 31637 */ "Indra Systems, Inc.", /* 31638 */ "Litmus Logic", /* 31639 */ "7ia", /* 31640 */ "CFH Software", /* 31641 */ "Eurotech S.p.A.", /* 31642 */ "m-creations gmbh", /* 31643 */ "Perthro Ltd", /* 31644 */ "Network Critical", /* 31645 */ "Virgina Department of Motor Vehicles", /* 31646 */ "Ministerio de Defensa de la Nación", /* 31647 */ "HANGZHOU DPTECH Technologies Co., Ltd.", /* 31648 */ "keksbude.net", /* 31649 */ "Feline Soul Systems", /* 31650 */ "W Key s.r.l.", /* 31651 */ "Arcadia Consulting", /* 31652 */ "Ing. Reinhard Hirz IT Services", /* 31653 */ "EM Software & Systems", /* 31654 */ "Martek di Meucci Marco", /* 31655 */ "Beijing Autelan Technologies Co Ltd.,", /* 31656 */ "Infinitus d.o.o.", /* 31657 */ "LightSoftware", /* 31658 */ "TurnovFree.net, Sdružení", /* 31659 */ "eSure Labs, Inc.", /* 31660 */ "Logilab, SA", /* 31661 */ "TIGNET Open Source Solutions", /* 31662 */ "New York State Assembly", /* 31663 */ "Bravo Tech, Inc.", /* 31664 */ "StrongMail Systems Inc.", /* 31665 */ "AirCanopy Internet", /* 31666 */ "Ministerstwo Sprawiedliwosci", /* 31667 */ "KRAFT Benjamin Jean", /* 31668 */ "Tema Networks Ltd.", /* 31669 */ "Jaworsito", /* 31670 */ "Anunda Technology Co, Ltd.", /* 31671 */ "XORTEC", /* 31672 */ "Datacenter Luxembourg", /* 31673 */ "Global Star Solutions ULC", /* 31674 */ "coldspot.de", /* 31675 */ "Mantara Inc", /* 31676 */ "REMEC Broadband Wireless", /* 31677 */ "Tenalt d.o.o.", /* 31678 */ "droidnest.org", /* 31679 */ "Altor Networks", /* 31680 */ "South African Post Office", /* 31681 */ "Audinate Pty Ltd", /* 31682 */ "community engineering gmbh", /* 31683 */ "EBM WEBSOURCING", /* 31684 */ "IDG GmbH", /* 31685 */ "Harry Jede", /* 31686 */ "Lorica Solutions", /* 31687 */ "rtfmcomputing.com", /* 31688 */ "editspot, LLC", /* 31689 */ "Sensorlogic, Inc", /* 31690 */ "FIMMG - Federazione Italiana Medici di Medicina Generale", /* 31691 */ "Close Premium Finance", /* 31692 */ "MerlinTechs", /* 31693 */ "Heilig Graf", /* 31694 */ "BNYConvergex Execution Solutions LLC", /* 31695 */ "Haberler Enterprises Ltd", /* 31696 */ "Peer 1", /* 31697 */ "Bluemoon Games", /* 31698 */ "Gymnasium Querfurt Broadcasting Channel", /* 31699 */ "Ice House Productions", /* 31700 */ "Sonoa Systems", /* 31701 */ "India Logics, LLC", /* 31702 */ "Institut D'Aéronomie Spatiale de Belgique", /* 31703 */ "ASPICON GmbH", /* 31704 */ "lug.org.uk", /* 31705 */ "Torrenga Engineering, Inc.", /* 31706 */ "Tamil IPTV Inc", /* 31707 */ "Meddiff Technologies Pvt. Ltd.", /* 31708 */ "Sistema FIESC", /* 31709 */ "Torrenga Surveying LLC", /* 31710 */ "Mystiq Mobile Pte Ltd", /* 31711 */ "gpf.me.uk", /* 31712 */ "Khipu Networks Ltd.", /* 31713 */ "national center for missing and exploited children", /* 31714 */ "Portware, LLC", /* 31715 */ "Wilder & Associates", /* 31716 */ "Rogue Project Inc", /* 31717 */ "Krausser EDV", /* 31718 */ "Programmer.com.hk", /* 31719 */ "Jan Dittberner IT-Consulting & -Solutions", /* 31720 */ "ArgoSoft JSC", /* 31721 */ "Spellman High Voltage Electronics Corporation", /* 31722 */ "Communication Systems Company", /* 31723 */ "Das Labor e.V.", /* 31724 */ "E-Cert", /* 31725 */ "Rancore Technologies (P) Ltd.,", /* 31726 */ "U.S. Department of Energy", /* 31727 */ "Monografias.com", /* 31728 */ "art of defence GmbH", /* 31729 */ "MiMOMax Wireless Limited", /* 31730 */ "Sunwave Communications Co. Ltd.", /* 31731 */ "DropFire, Inc.", /* 31732 */ "KEPID AMSTECH Co., LTD.", /* 31733 */ "Dayang Technology Development Inc.", /* 31734 */ "ZAO NPK Microtec", /* 31735 */ "Filipstads kommun", /* 31736 */ "Digital Systems Ltd", /* 31737 */ "S.C. LTHD Corporation S.R.L.", /* 31738 */ "penagosg", /* 31739 */ "University of Prince Edward Island", /* 31740 */ "ProLogic, Inc.", /* 31741 */ "Avenue A | Razorfish", /* 31742 */ "eXerp ApS", /* 31743 */ "ADESA, Inc.", /* 31744 */ "Centro Federal de Educação Tecnológica de Pelotas", /* 31745 */ "Gemalto", /* 31746 */ "AAP Communications, LLC", /* 31747 */ "JED Capital, LLC", /* 31748 */ "Need To Know News, LLC", /* 31749 */ "marcher.it", /* 31750 */ "Burleson Technology Group, LLC.", /* 31751 */ "Omniscient Technologies", /* 31752 */ "ALCEST'IS", /* 31753 */ "Triwest Healthcare Alliance", /* 31754 */ "LINK Lab.Inc.", /* 31755 */ "GXMU(Guangxi Medical University)", /* 31756 */ "Internet Telephony Users Association Inc.", /* 31757 */ "Infinova LLC", /* 31758 */ "Stoo Networks", /* 31759 */ "C-Matic Systems Ltd", /* 31760 */ "RFI Engineering B.V.", /* 31761 */ "Fujian Star-net Communication Co.,Ltd", /* 31762 */ "Bitel Távközlés és Biztonságtechnika Kft", /* 31763 */ "inmedias.it Gesellschaft für Informationstechnologie mbH", /* 31764 */ "Advance Display Technologies, Inc.", /* 31765 */ "ShowIT", /* 31766 */ "Nootek", /* 31767 */ "SHARP Electronics (Europe) GmbH", /* 31768 */ "Kassenärztliche Vereinigung Bayerns", /* 31769 */ "Bachmann GmbH & Co KG", /* 31770 */ "eGenix.com Software, Skills and Services GmbH", /* 31771 */ "International Paper", /* 31772 */ "GEWI Europe GmbH & Co. KG", /* 31773 */ "RealTimeSites", /* 31774 */ "Gellings CO", /* 31775 */ "TheLogInn", /* 31776 */ "DATAPREV - Previdencia Social", /* 31777 */ "SMHS Ltd", /* 31778 */ "Innocom-arcodan", /* 31779 */ "Acipia", /* 31780 */ "TG Mess-, Steuer- und Regeltechnik GmbH", /* 31781 */ "SyferLock Technology Corporation", /* 31782 */ "MetroSouth Medical Center", /* 31783 */ "EndlerNET GmbH", /* 31784 */ "Derouineau", /* 31785 */ "Zdravstveni dom Ljubljana", /* 31786 */ "Syren Technologies", /* 31787 */ "QSG Verkehrstechnik GmbH", /* 31788 */ "HD Software & Systeme GmbH", /* 31789 */ "Compressus, Inc", /* 31790 */ "County of Erie, New York", /* 31791 */ "Adways Co., Ltd.", /* 31792 */ "TEMIX S.p.A.", /* 31793 */ "Infinovate, Inc.", /* 31794 */ "Board of Regents of The University System of Georgia", /* 31795 */ "IdentiPHI, Inc", /* 31796 */ "Neetze Online", /* 31797 */ "Rewse Lab.", /* 31798 */ "TreStore GmbH", /* 31799 */ "VividLogic Inc", /* 31800 */ "Biap, Inc.", /* 31801 */ "Aquasys", /* 31802 */ "Secureware Inc", /* 31803 */ "Office of State Revenue", /* 31804 */ "IBA CZ, s.r.o.", /* 31805 */ "VirtualTec Solutions AG", /* 31806 */ "Universidad de Caldas", /* 31807 */ "Togliatti State University", /* 31808 */ "Josef Lux und Sohn Baumeister GmbH", /* 31809 */ "Cinterion GmbH", /* 31810 */ "IKOR Products GmbH", /* 31811 */ "United Tote Co.", /* 31812 */ "Dikmenoglu", /* 31813 */ "Amway of Australia", /* 31814 */ "BEAR Solutions (Australasia) Pty Ltd", /* 31815 */ "PrintFleet Inc.", /* 31816 */ "Connexis Kft.", /* 31817 */ "Droitech eSolutions Private Limited", /* 31818 */ "CHENGBO NETWORK TECHNOLOGY CO. ,LTD", /* 31819 */ "Federal Prison Industries (UNICOR)", /* 31820 */ "eonBIT as", /* 31821 */ "X2B Security", /* 31822 */ "Schweitzer Engineering Laboratories, Inc.", /* 31823 */ "Solar Technology, Inc", /* 31824 */ "HTW Dresden FB Informatik", /* 31825 */ "Logic United GmbH", /* 31826 */ "Sharedband Limited", /* 31827 */ "Pegasus Telecom", /* 31828 */ "MIPIH", /* 31829 */ "deCODE genetics", /* 31830 */ "Ad Hoc Network srl", /* 31831 */ "Los Angeles Community College District", /* 31832 */ "ACI Worldwide Inc", /* 31833 */ "BecauseWeCan.at", /* 31834 */ "John Berninger", /* 31835 */ "DTS Systeme GmbH", /* 31836 */ "Medinformatix Incorporated", /* 31837 */ "ITech ROMANIA Ltd.", /* 31838 */ "Gridiron Systems Inc.", /* 31839 */ "ChoicePoint Asset Company LLC", /* 31840 */ "University of Western Macedonia", /* 31841 */ "e2E Services Limited", /* 31842 */ "GUISYS CORPORATION", /* 31843 */ "Satellite Systems Corporation", /* 31844 */ "Dans Rock Electronics", /* 31845 */ "Wimba", /* 31846 */ "Bejing XCZY networks Inc.", /* 31847 */ "Sherman Finanial Group LLC", /* 31848 */ "Jacobsson Programutveckling", /* 31849 */ "OTN Systems NV", /* 31850 */ "WH-Netz - Verein fuer Netzwerksicherheit und Technologietransfer e.V.", /* 31851 */ "Pirean Ltd.", /* 31852 */ "LLC Mail.Ru", /* 31853 */ "Stix AS", /* 31854 */ "Plusnet plc", /* 31855 */ "Wycliffe Bible Translators USA", /* 31856 */ "Tirepiste", /* 31857 */ "Intellimedia Systems Ltd", /* 31858 */ "HFR,Inc", /* 31859 */ "Science and Technology Facilities Council", /* 31860 */ "embinet GmbH", /* 31861 */ "Infinity Trust SRL", /* 31862 */ "Australian Research Collaboration Service", /* 31863 */ "kunden-server.org Network Services", /* 31864 */ "Durchmesser", /* 31865 */ "st. bernard software", /* 31866 */ "Unassigned", /* 31867 */ "The Village Group, Inc.", /* 31868 */ "Empowering Media, Inc.", /* 31869 */ "Minkamau", /* 31870 */ "MO Technologies", /* 31871 */ "Nanzan Gakuen", /* 31872 */ "Elanti Systems Inc.", /* 31873 */ "Alpha Networks Inc.", /* 31874 */ "ShangHai XinLan Electronic Technology Co.,Ltd.", /* 31875 */ "de Koomen", /* 31876 */ "Karel Electronics", /* 31877 */ "Chamaeleon AG", /* 31878 */ "TelASIC Communications", /* 31879 */ "Programma Verwijsindex", /* 31880 */ "GGH Engineering s.r.l.", /* 31881 */ "Metrotek", /* 31882 */ "Openstat", /* 31883 */ "Kuipers Electronic Engineering", /* 31884 */ "ProDaM", /* 31885 */ "Syntactic Sugar s. r. o.", /* 31886 */ "Schering-Plough Corporation", /* 31887 */ "AdminDB.org", /* 31888 */ "Apantac LLC", /* 31889 */ "Chicken and Porn", /* 31890 */ "Universidade do Estado do Rio de Janeiro", /* 31891 */ "T3G Technology Co.,Ltd", /* 31892 */ "NelNet", /* 31893 */ "RPBUS LLC", /* 31894 */ "Chita Medias Network INC.", /* 31895 */ "Doxense SARL", /* 31896 */ "Knowledge Powered Solutions", /* 31897 */ "bit4id", /* 31898 */ "CS Group - Puerto Rico", /* 31899 */ "Tarleton State University", /* 31900 */ "Backstop Solutions Group", /* 31901 */ "Ann Arbor Public Schools", /* 31902 */ "Global Information Technology, Inc", /* 31903 */ "Mandli Communications, Inc.", /* 31904 */ "Springdale Public Schools", /* 31905 */ "NMI InfoSecurity Solutions", /* 31906 */ "Dimenzio Informatika Ltd.", /* 31907 */ "Orange Jordan", /* 31908 */ "Textiel Verhaeghe BVBA", /* 31909 */ "Haley Limited", /* 31910 */ "Mine Site Technologies Pty Ltd", /* 31911 */ "Gyventoju registro tarnyba prie Lietuvos Respublikos Vidaus reikalu ministerijos", /* 31912 */ "Smith Micro Software, Inc.", /* 31913 */ "AFCC Inc.", /* 31914 */ "Nstrument, Inc", /* 31915 */ "Exatrol Corporation", /* 31916 */ "Tian Di Ying Cai(SinoProfessional) Ltd.", /* 31917 */ "JSC „Izhevskiy Radiozavod“", /* 31918 */ "Emerion.com", /* 31919 */ "PHARMDATA,s.r.o.", /* 31920 */ "STS GROUP SA", /* 31921 */ "Keeneo SAS", /* 31922 */ "Frontier Electronic Systems Corp.", /* 31923 */ "DmitryKulgavy", /* 31924 */ "Miyowa", /* 31925 */ "Siklu Communication LTD", /* 31926 */ "SQdata", /* 31927 */ "Q-Industries, Inc.", /* 31928 */ "AKUA Corp", /* 31929 */ "Wiinz Ltd", /* 31930 */ "CLERTECH.COM,INC", /* 31931 */ "4IPNET, INC.", /* 31932 */ "Powerbox Australia", /* 31933 */ "Getronics Pinkroccade Healthcare BV", /* 31934 */ "Younou, Inc.", /* 31935 */ "Inventum Technologies Private Limited", /* 31936 */ "NAW Enterprises Inc", /* 31937 */ "anderScore GmbH", /* 31938 */ "rkirkpat.net", /* 31939 */ "TV1.DE", /* 31940 */ "EcoliHub", /* 31941 */ "AKRUPP Networking", /* 31942 */ "Clemens Fink", /* 31943 */ "ish group pty ltd", /* 31944 */ "Advanced Powers Merchant Empires", /* 31945 */ "Elenos Srl", /* 31946 */ "Yomu Project", /* 31947 */ "RC Alltech Power Systems Pvt Ltd", /* 31948 */ "Spikelops", /* 31949 */ "Nextivity, Inc.", /* 31950 */ "Organizacion de Servicios Directos Empresarios", /* 31951 */ "Miroslaw Lach", /* 31952 */ "Markus Falb", /* 31953 */ "E-smile Co., Ltd.", /* 31954 */ "Prolar Corporation", /* 31955 */ "GuangZhou E-Standard Software Technology Co.,Ltd.", /* 31956 */ "TSDA - Tecnologia e Soluções Digitais Aplicadas LTDA", /* 31957 */ "INDUSTRONIC Industrie-Electronic GmbH & Co. KG", /* 31958 */ "EDV-Beratung Robert Velter", /* 31959 */ "Altech ISIS", /* 31960 */ "PubliTronic bv", /* 31961 */ "Flybe", /* 31962 */ "BEJING Tongtian Century Technology CO.LTD", /* 31963 */ "chengdu goldtel communication (group) co.,ltd", /* 31964 */ "PGE Gornictwo i Energetyka S.A.", /* 31965 */ "Lampe-Batkin Associates, Inc.", /* 31966 */ "Thomas Production Company, L.L.C.", /* 31967 */ "Datum Systems, Inc.", /* 31968 */ "Gradwell dot com Ltd", /* 31969 */ "Siegel Daten- und Anwendungsservice", /* 31970 */ "MQuest S.A.", /* 31971 */ "Gruppo Software Oy", /* 31972 */ "thejof.com", /* 31973 */ "Cavazza Anna Sas", /* 31974 */ "Cable Vision Electronics Co., Ltd.", /* 31975 */ "INTEG Process Group, Inc.", /* 31976 */ "Saia-Burgess Controls AG", /* 31977 */ "Forticom", /* 31978 */ "AltimatOS", /* 31979 */ "Melog.com", /* 31980 */ "Hongdian Technologies", /* 31981 */ "ORNL Federal Credit Union", /* 31982 */ "FOUGEROLLE", /* 31983 */ "Ericsson Australia Pty. Ltd.", /* 31984 */ "Syphan Technologies", /* 31985 */ "GOL MOBILE PRODUTOS E SERVIÇOS DE TECNOLOGIA DA INFORMAÇÃO LTDA.", /* 31986 */ "Splatterladder", /* 31987 */ "MEN Mikroelektronik Nuernberg GmbH", /* 31988 */ "EverMAX s.r.o.", /* 31989 */ "Continental AG", /* 31990 */ "TOSCO CORPORATION", /* 31991 */ "Oceana Sensor Module", /* 31992 */ "Parinya Software", /* 31993 */ "NxGen Communications Pte Ltd", /* 31994 */ "National Bank of Poland", /* 31995 */ "Brian Thomas Matthews Limited", /* 31996 */ "Cellusys", /* 31997 */ "NOVA KREDITNA BANKA MARIBOR d.d.", /* 31998 */ "Adcon Telemetry GmbH", /* 31999 */ "Ekstrem Bir Bilgisayar", /* 32000 */ "Convercom AG", /* 32001 */ "Ba-Bi Mobile Media Co. Ltd.", /* 32002 */ "herbstwest.de", /* 32003 */ "On-Waves ehf", /* 32004 */ "Obra Social de Empleados Publicos de Mendoza (OSEP)", /* 32005 */ "Fashion Institute of Technology of the State University of New York", /* 32006 */ "Innovative Labs", /* 32007 */ "Digital Rapids Corp", /* 32008 */ "OuterNet", /* 32009 */ "Pixelworks", /* 32010 */ "Kabel Deutschland GmbH", /* 32011 */ "Penango, Inc.", /* 32012 */ "Intranet Solution", /* 32013 */ "ESAC", /* 32014 */ "ExtraHop Networks, Inc.", /* 32015 */ "Latvia University of Agriculture", /* 32016 */ "LinQuest Corporation", /* 32017 */ "Law Offices Of Roger E. Naghash", /* 32018 */ "Intellon Corporation", /* 32019 */ "doudemoii", /* 32020 */ "Positron Inc.", /* 32021 */ "Pegatron Computer Inc.", /* 32022 */ "American Clean Air, Inc.", /* 32023 */ "Applied Polymorphism", /* 32024 */ "Primal Research", /* 32025 */ "Sigma ITS Co., Ltd.", /* 32026 */ "Edvina AB", /* 32027 */ "Tray International Services and Administration (Pty) Ltd", /* 32028 */ "The Rafferty Patent Law Firm, PC", /* 32029 */ "Commodity Systems", /* 32030 */ "XITIJ INDIA", /* 32031 */ "DWI Technologies", /* 32032 */ "Apfelwald", /* 32033 */ "Finnsat Ltd.", /* 32034 */ "ISEN Consulting and Services", /* 32035 */ "Borders Group Inc.", /* 32036 */ "Commerce Lab", /* 32037 */ "TELZAS", /* 32038 */ "Total Computer Kft.", /* 32039 */ "Tecno&Logic Consulting", /* 32040 */ "Association Paris-Montagne", /* 32041 */ "Virginia Community College System", /* 32042 */ "Hacklab Toronto Club Inc.", /* 32043 */ "IVOCS", /* 32044 */ "Avanquest Software", /* 32045 */ "NetMatch", /* 32046 */ "IDRIX", /* 32047 */ "x9000.com Consulting Services Limited", /* 32048 */ "FacilityONE", /* 32049 */ "PacketFlux Technologies, Inc.", /* 32050 */ "SAMsystems GmbH", /* 32051 */ "Toronto Hydro Corporation", /* 32052 */ "3Y Power Technology, Inc.", /* 32053 */ "IPSL", /* 32054 */ "Service to Youth Council Inc", /* 32055 */ "Vietnam Datacommunication Company (VDC)", /* 32056 */ "Mercury Brain Systems", /* 32057 */ "Vietnam Posts and Telecommunications Group (VNPT)", /* 32058 */ "Axis Network Technology Limited", /* 32059 */ "Babelway", /* 32060 */ "VAS Latvijas Valsts radio un televizijas centrs", /* 32061 */ "Endersys", /* 32062 */ "The eID Company", /* 32063 */ "state51", /* 32064 */ "jonEbird", /* 32065 */ "EAFB - Escola Agrotécnica Federal de Barbacena-MG", /* 32066 */ "IPaXiom Networks", /* 32067 */ "Scherndl", /* 32068 */ "University of Laverne", /* 32069 */ "Laser Interferometer Gravitational-Wave Observatory (LIGO)", /* 32070 */ "Vialtus Solutions", /* 32071 */ "SEKIZAWA Corp. Inc.", /* 32072 */ "MesaVida Information Management", /* 32073 */ "Prorail BV", /* 32074 */ "XS Networks BV", /* 32075 */ "Connectical IT", /* 32076 */ "Sumlock Electronics (NE) Ltd", /* 32077 */ "Zentrum Servicios SA de CV", /* 32078 */ "ESTeem Wireless Modems Inc.", /* 32079 */ "Baseline Communications", /* 32080 */ "Cytec Industries Inc.", /* 32081 */ "Unassigned", /* 32082 */ "HealthBlocks, Inc.", /* 32083 */ "DeltaNode Ltd.", /* 32084 */ "E.ON Business Services GmbH", /* 32085 */ "Fiberblaze", /* 32086 */ "x:fer GmbH", /* 32087 */ "College of Micronesia-FSM", /* 32088 */ "IMS Messsysteme GmbH", /* 32089 */ "Waumovil", /* 32090 */ "AES Corporation", /* 32091 */ "pragma people", /* 32092 */ "Engineering Systems Incorporated", /* 32093 */ "Vantage Tech Solutions", /* 32094 */ "Hosei University Research Institute, California", /* 32095 */ "APD Technologies Inc.", /* 32096 */ "Reorder", /* 32097 */ "Baseline IT", /* 32098 */ "Midnight Oil Consulting, INC.", /* 32099 */ "Oversi Networks", /* 32100 */ "Telinea d.o.o.", /* 32101 */ "Tiaxa", /* 32102 */ "New York Connect", /* 32103 */ "InCharge Systems, Inc", /* 32104 */ "Chief Security Officers, SA", /* 32105 */ "Hadiko e.V.", /* 32106 */ "SOH Systems", /* 32107 */ "PLANAR LLC", /* 32108 */ "ADC Co.,LLC", /* 32109 */ "IPVox Sdn Bhd", /* 32110 */ "Digital Solutions Ltd.", /* 32111 */ "CENARIO systems GmbH", /* 32112 */ "Vocord", /* 32113 */ "ORELIA SAS", /* 32114 */ "Zweites Deutsches Fernsehen Anstalt des oeffentlichen Rechts", /* 32115 */ "ACTIV Financial Systems, Inc.", /* 32116 */ "Unassigned", /* 32117 */ "iWave Software", /* 32118 */ "tera.sys hardware inc.", /* 32119 */ "Focon Electronic Systems A/S", /* 32120 */ "Armstrong Relocation", /* 32121 */ "Netafim Australia", /* 32122 */ "Sidlinger Computer Corporation", /* 32123 */ "Stadtverwaltung Ludwigshafen", /* 32124 */ "Small Media Giant Ltd", /* 32125 */ "Lietuvos archyvu departamentas prie Lietuvos Respublikos Vyriausybes", /* 32126 */ "Darkware Co.", /* 32127 */ "Octotelematics S.r.l.", /* 32128 */ "Innovation Center Computer Assisted Surgery (ICCAS)", /* 32129 */ "Data Elements for Emergency Department Systems (DEEDS)", /* 32130 */ "ESPN, Inc.", /* 32131 */ "UltraMonkey-L7 Project", /* 32132 */ "nativenet.ch", /* 32133 */ "Zestysoft", /* 32134 */ "WWK Lebensversicherung a.G.", /* 32135 */ "Hackburg", /* 32136 */ "TECNOSTEEL", /* 32137 */ "Universidade Federal de Itajubá", /* 32138 */ "Applitron Datasystem AB", /* 32139 */ "Chalmers University of Technology AB", /* 32140 */ "University of Maryland Center for Environmental Science", /* 32141 */ "Solid Solutions", /* 32142 */ "Finsignia LLC", /* 32143 */ "TransHuman Design", /* 32144 */ "Allergan, Inc.", /* 32145 */ "Validian Corporation", /* 32146 */ "Rob Johnson", /* 32147 */ "Individuali veikla", /* 32148 */ "UXCG", /* 32149 */ "Zetron, Inc.", /* 32150 */ "NerdGroup", /* 32151 */ "Rearden Labs", /* 32152 */ "damosys ltd.", /* 32153 */ "iXuros Limited", /* 32154 */ "Humana, Inc.", /* 32155 */ "TechCare", /* 32156 */ "IntelMS (Pty) Ltd.", /* 32157 */ "Alcom", /* 32158 */ "Ancla Internet, S.L.", /* 32159 */ "Power Innovation Stromversorgungstechnik GmbH", /* 32160 */ "Trilogy Communications Ltd", /* 32161 */ "Eutecert", /* 32162 */ "Umber Systems", /* 32163 */ "JWARE TECHNOLOGIES", /* 32164 */ "WestGrid", /* 32165 */ "Computacenter", /* 32166 */ "REDCOM Laboratories, Inc", /* 32167 */ "Fiber-Span", /* 32168 */ "Turkcell Teknoloji Arastirma ve Gelistirme A.S.", /* 32169 */ "MAYA Group", /* 32170 */ "SeaMicro Inc", /* 32171 */ "Prefeitura Municipal de Franco da Rocha", /* 32172 */ "Royal Observatory Edinburgh", /* 32173 */ "Universidade Estadual do Oeste do Paraná", /* 32174 */ "Thieme ICT Services B.V", /* 32175 */ "GlobalTelecom", /* 32176 */ "Barossafarm", /* 32177 */ "ecotel communication ag", /* 32178 */ "SANDS INDIA Pvt Ltd", /* 32179 */ "Moscow Branch of Federal Migration Service, Russia", /* 32180 */ "Amuser SpA", /* 32181 */ "cubro", /* 32182 */ "Answers.com", /* 32183 */ "Instantiations Inc", /* 32184 */ "Environmental Technology, Inc.", /* 32185 */ "Prolexic Technologies", /* 32186 */ "Founder International Inc.", /* 32187 */ "SkyCash Sp. z o.o.", /* 32188 */ "Richards-Zeta Building Intelligence", /* 32189 */ "REDOUBT, Inc.", /* 32190 */ "Emergensys solutions inc.", /* 32191 */ "Vanguard Rugged Storage LLC", /* 32192 */ "I-New Unified Mobile Solutions AG", /* 32193 */ "InDorse Technologies", /* 32194 */ "CommTel Network Solutions Pty Ltd.", /* 32195 */ "EBFS AG", /* 32196 */ "Bunkspeed, Inc", /* 32197 */ "Esang Technologies Co., Ltd.", /* 32198 */ "Louisiana Immersive Technologies Enterprise", /* 32199 */ "Seven Networks, Inc.", /* 32200 */ "Sonitor Technologies AS", /* 32201 */ "Saima Sistemas, S.L.", /* 32202 */ "Pixeon", /* 32203 */ "Mykola Grechukh", /* 32204 */ "Twistround Ltd", /* 32205 */ "Oksijun", /* 32206 */ "U.S. Department of Transportation", /* 32207 */ "www.jointhegrid.com", /* 32208 */ "Escuela Bancaria y Comercia", /* 32209 */ "eAgency, Inc.", /* 32210 */ "Positech Consulting Ltd", /* 32211 */ "Armstrong International, Inc.", /* 32212 */ "Luke Rules", /* 32213 */ "GRETA de Bordeaux", /* 32214 */ "John Anson Co. LLC", /* 32215 */ "SIOS Technology, Inc.", /* 32216 */ "BÖWE Systec GmbH", /* 32217 */ "tedman.com", /* 32218 */ "NBS srl", /* 32219 */ "Esperion Therapeutics, Inc.", /* 32220 */ "Intera Group, Inc.", /* 32221 */ "TCM Networks", /* 32222 */ "Shanghai Kyattinfo Inc.", /* 32223 */ "Epivalley Co., Ltd.", /* 32224 */ "PCCW Mobile", /* 32225 */ "Ingenieurbuero für innovative Informationstechnik", /* 32226 */ "ArtSoft Consult", /* 32227 */ "MERAWEX Sp. z o. o.", /* 32228 */ "Nokia", /* 32229 */ "Aeris Communications, Inc.", /* 32230 */ "hbcms", /* 32231 */ "Landratsamt Muenchen", /* 32232 */ "Vionis d.o.o.", /* 32233 */ "KMUX Project", /* 32234 */ "ProAce International Trading Ltd.", /* 32235 */ "DATASPHERE S.A.", /* 32236 */ "Atea Systems Ltd.", /* 32237 */ "Venture Research Inc.", /* 32238 */ "Emnico Technologies Ltd", /* 32239 */ "Clipsal China Ltd.", /* 32240 */ "Vederie", /* 32241 */ "Comic Relief", /* 32242 */ "FAUSER AG", /* 32243 */ "CASO - Consultores Associados de Organizações e Informática", /* 32244 */ "PingUs Solutions oHG", /* 32245 */ "IBS.Datafort", /* 32246 */ "NewNet Communication Technologies, LLC", /* 32247 */ "Wanzl Metallwarenfabrik GmbH", /* 32248 */ "National Food Technology Research Centre", /* 32249 */ "San Francisco International Airport, Information Technology & Telecommunications", /* 32250 */ "ETRI SRC", /* 32251 */ "Pavol Jozef Šafárik University in Košice", /* 32252 */ "DANU Technologies", /* 32253 */ "Hoare Lea and Partners", /* 32254 */ "J. Christof GmbH", /* 32255 */ "Sonlinc A/S", /* 32256 */ "RealTime Intelligence", /* 32257 */ "WYDE Voice, LLC", /* 32258 */ "Meyer Tool, Inc.", /* 32259 */ "PacketDNA Inc.", /* 32260 */ "Varolii", /* 32261 */ "Cyber Operations, Inc.", /* 32262 */ "Plus Net Solutions", /* 32263 */ "National Institute of Informatics", /* 32264 */ "Johnny Software Studio", /* 32265 */ "Power PLUS Communications AG", /* 32266 */ "I.S.T. Austria", /* 32267 */ "Hobby Lobby Stores, Inc.", /* 32268 */ "Novantiqua multimedia", /* 32269 */ "Elseta", /* 32270 */ "Zaxmy", /* 32271 */ "Sebastien Aperghis-Tramoni", /* 32272 */ "netzwerkplanet.", /* 32273 */ "Sheffield Teaching Hospitals Foundation Trust", /* 32274 */ "Interscan Navigation Systems", /* 32275 */ "SiChuan Public Information Industry Co.Ltd (SCPI)", /* 32276 */ "ZTI", /* 32277 */ "RT Systems (Pty) Ltd", /* 32278 */ "Ryan J Thompson", /* 32279 */ "Johnston Press Plc", /* 32280 */ "Videoplaza", /* 32281 */ "DaimonLab", /* 32282 */ "TBits.net GmbH", /* 32283 */ "erefer", /* 32284 */ "Sumavision Technologies Co.,Ltd", /* 32285 */ "ACD Elektronik GmbH", /* 32286 */ "Sattvik Software & Technology Resources, Ltd. Co.", /* 32287 */ "eg-electronic GmbH", /* 32288 */ "CellSpotting.com", /* 32289 */ "Records For Living, Inc.", /* 32290 */ "lingzhou NetWork", /* 32291 */ "Florida Department of Children and Families", /* 32292 */ "netfutura GmbH & Co. KG", /* 32293 */ "Lewis Silkin", /* 32294 */ "cPanel Inc", /* 32295 */ "Beach Horizon LLP", /* 32296 */ "s2company s.r.l.", /* 32297 */ "Communication Networks, LLC", /* 32298 */ "Coatesoft", /* 32299 */ "Alcorn McBride Inc.", /* 32300 */ "Siemens IT Solutions and Services", /* 32301 */ "Insert Data Here", /* 32302 */ "Anchor Systems Pty Ltd", /* 32303 */ "Lojas Maia LTDA.", /* 32304 */ "KAMP Netzwerkdienste GmbH", /* 32305 */ "Soolbox Association", /* 32306 */ "Embedded Systems", /* 32307 */ "NLI Business Support as", /* 32308 */ "Chittagong Online Limited", /* 32309 */ "Edge Technologies", /* 32310 */ "CPI Progetti S.p.a.", /* 32311 */ "International Hellenic Univeristy", /* 32312 */ "Red Lambda, Inc.", /* 32313 */ "sp-its", /* 32314 */ "Virtual Management Technologies", /* 32315 */ "From2", /* 32316 */ "The National Library of Norway", /* 32317 */ "Tom Geudens Private Enterprise Limited", /* 32318 */ "Fernau Avionics Ltd", /* 32319 */ "Supermarchés Match", /* 32320 */ "eSystems, Inc.", /* 32321 */ "Conseils Oy SimplySecure", /* 32322 */ "Filb.de", /* 32323 */ "Certus Digital, Inc.", /* 32324 */ "BadgerNet.net", /* 32325 */ "NewAge Ukraine Inc.", /* 32326 */ "RF Industries", /* 32327 */ "legendsec Technology Co.Ltd", /* 32328 */ "Shenzhen Guanri Technology Co., Ltd.", /* 32329 */ "Olitechs", /* 32330 */ "Nimbus Data Systems, Inc.", /* 32331 */ "Siscard S.A.", /* 32332 */ "IRRINGER.DE", /* 32333 */ "CGNet", /* 32334 */ "Nippon Control System Corporation (NCS)", /* 32335 */ "Micro Ocean Technologies Sdn Bhd", /* 32336 */ "ISRACARD LDT", /* 32337 */ "United Biscuits", /* 32338 */ "Schweitzer GmbH - Architektur & Generalplanung", /* 32339 */ "DCTI", /* 32340 */ "Gangola Designs", /* 32341 */ "XORP, Inc.", /* 32342 */ "Shop Direct Home Shopping Limited", /* 32343 */ "advanscope Inc.", /* 32344 */ "RF Monolithics, Inc.", /* 32345 */ "Digi Telecommunications Sdn Bhd", /* 32346 */ "SiteScanner Europe AB", /* 32347 */ "Cross Country Systems", /* 32348 */ "iRedMail", /* 32349 */ "Bedework.org", /* 32350 */ "Genscape, Inc", /* 32351 */ "Rindels Information Management Systems (RIMS)", /* 32352 */ "Baidu", /* 32353 */ "vertico Software GmbH", /* 32354 */ "KOCAK Corp", /* 32355 */ "Syslogic Ltd.", /* 32356 */ "Solo Networks Inc.", /* 32357 */ "Epiphan Systems Inc.", /* 32358 */ "UNIVERSITY OF UDINE", /* 32359 */ "Dneprooblenergo", /* 32360 */ "CAIR", /* 32361 */ "IDT SPC", /* 32362 */ "Engineering & Software GmbH", /* 32363 */ "Universidade Federal do Estado do Rio de Janeiro UNIRIO", /* 32364 */ "Mino Wireless USA Inc", /* 32365 */ "Pragmatic Data", /* 32366 */ "Communication Automation Corporation", /* 32367 */ "Faculty of Information Technology - Nguyen Tat Thanh College", /* 32368 */ "Uptime-IT", /* 32369 */ "University of Zielona Gora", /* 32370 */ "Complex IT Solutions", /* 32371 */ "Web Sages", /* 32372 */ "paternostro.org", /* 32373 */ "RidgeviewTel LLC", /* 32374 */ "Secorix, Inc.", /* 32375 */ "RAM Mobile Data", /* 32376 */ "archIT", /* 32377 */ "TB Solutions Security S.A.", /* 32378 */ "Lake Michigan Credit Union", /* 32379 */ "Instituto Curitiba de Informática", /* 32380 */ "Milwaukee County Government", /* 32381 */ "Mixtur Interactive, Inc.", /* 32382 */ "Iojik Inc.", /* 32383 */ "Henchmonkey", /* 32384 */ "Beijing Bohui Science & Technology Co., Ltd", /* 32385 */ "Proxicast, LLC", /* 32386 */ "Etisalat", /* 32387 */ "The NetBSD Foundation", /* 32388 */ "MILLENNIUM ARTS Group", /* 32389 */ "ID7 Ltd.", /* 32390 */ "Systemhuset Episteme AS", /* 32391 */ "Secure-MSP GmbH", /* 32392 */ "Onesto Services Oy", /* 32393 */ "Solutions and Services, a.s.", /* 32394 */ "SalamanderSoft Ltd", /* 32395 */ "Ohio University", /* 32396 */ "iRobot Corporation", /* 32397 */ "Eaton Vance Management", /* 32398 */ "Nederland Live", /* 32399 */ "WaveMaker Software, Inc.", /* 32400 */ "AMP Financial Services New Zealand", /* 32401 */ "Greenson Pty Ltd", /* 32402 */ "China fuzhou evideo", /* 32403 */ "NetHawk Oyj", /* 32404 */ "Selectron Systems AG", /* 32405 */ "Koncept Sp. z o.o.", /* 32406 */ "GeCOSoft Consulting GmbH", /* 32407 */ "Daniel Andrade Costa Silva", /* 32408 */ "Voxel dot Net, Inc.", /* 32409 */ "RF Code Inc", /* 32410 */ "Swedish Orient Line", /* 32411 */ "Minot Enterprises, Inc.", /* 32412 */ "ECbridges, Inc.", /* 32413 */ "Veracity UK", /* 32414 */ "Comax BV.", /* 32415 */ "DOCOUT S.L.", /* 32416 */ "Kinamik Data Integrity S.L.", /* 32417 */ "Marne & Elk Horn Telephone Co", /* 32418 */ "Institut Straumann AG", /* 32419 */ "Payment Processing, Inc.", /* 32420 */ "Bertholdsson", /* 32421 */ "Universidade Federal de Viçosa", /* 32422 */ "Rogaland fylkeskommune (County of Rogaland)", /* 32423 */ "Harry Jackson - Boozled", /* 32424 */ "CRW Data AB", /* 32425 */ "Institute for Studies in Theoretical Physics and Mathematics (IPM)", /* 32426 */ "Bornis Group", /* 32427 */ "Sepehr S. T. Co. Ltd.", /* 32428 */ "University of Isfahan", /* 32429 */ "NADAM CO.,LTD", /* 32430 */ "Yukthi Systems Pvt. Ltd", /* 32431 */ "LDAP Study Union", /* 32432 */ "NetCeler", /* 32433 */ "Telenor Telecom Solutions AS", /* 32434 */ "TamoSoft Ltd.", /* 32435 */ "Intersec", /* 32436 */ "Obsidian Research", /* 32437 */ "PROMONT Soluções Ltda.", /* 32438 */ "ShangHai YoSee Ltd.", /* 32439 */ "kinopsis.net", /* 32440 */ "Netwell Ltd.", /* 32441 */ "MPS.ETI.BR", /* 32442 */ "Internet Research Institute, Inc.", /* 32443 */ "Fibercom Technologies (ShenZhen) CO.,LTD", /* 32444 */ "Lamoree Software", /* 32445 */ "Paessler AG", /* 32446 */ "CASERIS GmbH", /* 32447 */ "Addition IT Sweden AB", /* 32448 */ "Cuatrecasas Abogados", /* 32449 */ "MICRON ENGINEERING DI MANCA MASSIMO", /* 32450 */ "B-Source SA", /* 32451 */ "Damaya UK", /* 32452 */ "Terrapin Associates", /* 32453 */ "Atrato, Inc.", /* 32454 */ "E-Tag, Inc", /* 32455 */ "Freebox SAS", /* 32456 */ "Iptec, Inc.", /* 32457 */ "Colorado Clinical Research ECG Core Lab", /* 32458 */ "HappyEnd", /* 32459 */ "The Digital Freehold", /* 32460 */ "Brinker Pharmaconsulting", /* 32461 */ "VIP Systems Co., Ltd.", /* 32462 */ "Coalese Corporation", /* 32463 */ "IDH GmbH", /* 32464 */ "All Options International B.V.", /* 32465 */ "guifi.net", /* 32466 */ "SysDesign", /* 32467 */ "Teamnett AS", /* 32468 */ "Network Design GmbH", /* 32469 */ "Forschungszentrum Jülich", /* 32470 */ "Daitec GmbH", /* 32471 */ "Tikona Digital Networks", /* 32472 */ "Example Enterprise Number for Documentation Use", /* 32473 */ "Kialco Group", /* 32474 */ "Ambit Communicate", /* 32475 */ "Bell's Booking Agency", /* 32476 */ "ISAccountable", /* 32477 */ "RF Window Co., Ltd.", /* 32478 */ "AppEx Networks", /* 32479 */ "Ollix", /* 32480 */ "Unitronics", /* 32481 */ "Qnective AG", /* 32482 */ "Octrooicentrum Nederland", /* 32483 */ "Escatronic GmbH", /* 32484 */ "Live Interactive S.A.", /* 32485 */ "DCK Worldwide", /* 32486 */ "League of American Orchestras", /* 32487 */ "The College of New Jersey", /* 32488 */ "Alan Savage", /* 32489 */ "Pringo", /* 32490 */ "Beijing UniTrust Tech. Service Co.,Ltd.", /* 32491 */ "maas-martin.nl", /* 32492 */ "CPS Color Equipment S.p.A.", /* 32493 */ "Kwasniak", /* 32494 */ "Screwfix Ltd", /* 32495 */ "MindLogix", /* 32496 */ "Centex Service Co. LLC.", /* 32497 */ "Clockwork Active Media Systems, LLC", /* 32498 */ "TecCon, inc.", /* 32499 */ "Virtual Computer, Inc.", /* 32500 */ "Telemisis Ltd", /* 32501 */ "Pancetera Software, Inc.", /* 32502 */ "Purewire Inc.", /* 32503 */ "Washington Division of URS Corporation", /* 32504 */ "Aptix IT SRL", /* 32505 */ "KOR Networks", /* 32506 */ "First Community Services, Inc", /* 32507 */ "Siemon", /* 32508 */ "luminis", /* 32509 */ "Watchdata", /* 32510 */ "Fountainhead Investments Ltd.", /* 32511 */ "Zen Soluciones", /* 32512 */ "Buerologistik GmbH & Co. KG", /* 32513 */ "JSC Effortel", /* 32514 */ "Rebtel Networks AB", /* 32515 */ "Gisdata", /* 32516 */ "Accsys GmbH", /* 32517 */ "VirtuOz", /* 32518 */ "Wireless Mundi S.L.", /* 32519 */ "Anglo European Aviation AG", /* 32520 */ "kontur networx", /* 32521 */ "Creare Inc.", /* 32522 */ "ACN - Agència Catalana de Notícies", /* 32523 */ "Zaxia", /* 32524 */ "Gold Lasso, Inc.", /* 32525 */ "Object Partners Inc.", /* 32526 */ "Yugma Inc.", /* 32527 */ "Acquia, Inc", /* 32528 */ "Warped Communications, Inc.", /* 32529 */ "uid0 Networks", /* 32530 */ "Nokeena Networks Inc.", /* 32531 */ "Regis Corporation", /* 32532 */ "Xue Can", /* 32533 */ "MB Connect Line GmbH", /* 32534 */ "ZT Systems", /* 32535 */ "Ergobyte Informatics", /* 32536 */ "voidmage.net", /* 32537 */ "NetCare Service Co., Ltd.", /* 32538 */ "Cinnober Financial Technology AB", /* 32539 */ "Manlight", /* 32540 */ "Alsion", /* 32541 */ "Banco Credicoop", /* 32542 */ "Raidbr Solucoes em Informatica LTDA", /* 32543 */ "Kentucky Department of Education", /* 32544 */ "Army & Air Force Exchange Service", /* 32545 */ "Valcom Inc.", /* 32546 */ "SenSage, Inc", /* 32547 */ "University of North Carolina - General Administration", /* 32548 */ "Govierno de la Provincia de Corrientes", /* 32549 */ "COVETEL R.S:", /* 32550 */ "Valunex", /* 32551 */ "FreeIT", /* 32552 */ "Hopewiser Ltd", /* 32553 */ "Vincent Wang", /* 32554 */ "RND.fr", /* 32555 */ "Bruno Medici Consulting", /* 32556 */ "Hungarian Chamber of Civil Law Notaries (MOKK)", /* 32557 */ "Kleinhenz Elektronik GmbH", /* 32558 */ "Paradigma Tecnologico S.L.", /* 32559 */ "Tsubata Engineering Co., Ltd.", /* 32560 */ "E.D.S.I. Trend Argentina S.A.", /* 32561 */ "Ambrado Inc.", /* 32562 */ "DRK gemeinnützige Krankenhaus GmbH Sachsen", /* 32563 */ "Asidev s.r.l.", /* 32564 */ "Neissware GmbH", /* 32565 */ "I2C, Industrie Innovation Conseil", /* 32566 */ "Alastria Networks Limited", /* 32567 */ "Integral", /* 32568 */ "Gayux", /* 32569 */ "Hillyton Electronic Technology Co., Ltd.", /* 32570 */ "Peering Portal, Inc.", /* 32571 */ "Ciavox", /* 32572 */ "ONI-Net C&S", /* 32573 */ "DSIT - ReimsMetropole", /* 32574 */ "Daniel Palffy", /* 32575 */ "Aydayev's Investment Business Group", /* 32576 */ "Proximetry, Inc.", /* 32577 */ "GeekDude.com", /* 32578 */ "Gianluca D'Andrea", /* 32579 */ "HDT Hanseatische Datentechnik GmbH", /* 32580 */ "REMOTEK CORPORATION", /* 32581 */ "N2 Networks", /* 32582 */ "Litespan Inc.", /* 32583 */ "DesignArt Networks", /* 32584 */ "VIGITRONIC", /* 32585 */ "Instituto Venezolano de Investigaciones Cientificas", /* 32586 */ "WiKID Systems, Inc.", /* 32587 */ "MVLogix", /* 32588 */ "Effinger", /* 32589 */ "Axiom Networking", /* 32590 */ "Deltares", /* 32591 */ "Pintu", /* 32592 */ "Crystal Media Inc.", /* 32593 */ "Invensys Robertshaw Industrial Products", /* 32594 */ "Nextgen Networks", /* 32595 */ "PLATH PROCITEC Suisse AG", /* 32596 */ "Double Negative", /* 32597 */ "Providence Life Services", /* 32598 */ "SUPEMIR", /* 32599 */ "ClearCrypt Inc.", /* 32600 */ "GenCore Candeo, Ltd.", /* 32601 */ "Faculdade SEAMA", /* 32602 */ "DVS Solutions", /* 32603 */ "FRC Component Products", /* 32604 */ "Structual Biology Research Center,High Energy Accelerator Research Organization,KEK", /* 32605 */ "Crystaline Infotech", /* 32606 */ "Goldan", /* 32607 */ "Federal Home Loan Bank", /* 32608 */ "Development Consultants Incorporated", /* 32609 */ "Jilin University Information Technologies Co., Ltd.", /* 32610 */ "IMage Manipulation Systems Inc", /* 32611 */ "MORISAKI TAKATOSI", /* 32612 */ "California State Legislature", /* 32613 */ "YOU Telecom India Pvt. Ltd.", /* 32614 */ "ELPROC sp. z o.o.", /* 32615 */ "OpenSourceXpress Ltd.", /* 32616 */ "Polytechnical Engineering College in Subotica", /* 32617 */ "Fiok i Wspólnicy Sp. z o.o.", /* 32618 */ "Movik Networks, Inc.", /* 32619 */ "AnueSystems", /* 32620 */ "Franklin University", /* 32621 */ "CACE Technologies", /* 32622 */ "Kuni Automotive", /* 32623 */ "Khomp Ind. e Com. Ltda", /* 32624 */ "GoPC Pty Ltd", /* 32625 */ "Security Cube", /* 32626 */ "Emageon, Inc.", /* 32627 */ "AXIOMTEK Co., Ltd.", /* 32628 */ "DIGI Ltd", /* 32629 */ "Trezorix", /* 32630 */ "LIYO Technology Co. Ltd.", /* 32631 */ "Excluvior", /* 32632 */ "Ors TISZAY", /* 32633 */ "Bluetick, Inc.", /* 32634 */ "Sisters of Mercy Health Systems", /* 32635 */ "ITS Electronics Inc", /* 32636 */ "Perceptech Inc.", /* 32637 */ "iStor Networks Inc.", /* 32638 */ "Tribunal Electoral del Poder Judicial de la Federación", /* 32639 */ "NeoCatena Networks Inc.", /* 32640 */ "Security Services Framework", /* 32641 */ "Föreningen DIS", /* 32642 */ "Krakowskie e-Centrum Informatyczne JUMP", /* 32643 */ "BWS Consultores C.A.", /* 32644 */ "Coty Inc.", /* 32645 */ "Pneumatic Tube Products Co, Inc", /* 32646 */ "Federal Defender Office", /* 32647 */ "Vortex Technology Networks", /* 32648 */ "Beijing Raycomm Digital Technology Co.,LTD", /* 32649 */ "Namtrac Kft.", /* 32650 */ "Newtec Communications GmbH", /* 32651 */ "Machine VFX", /* 32652 */ "ioko365 Ltd", /* 32653 */ "Institut für Experimentelle Kernphysik, KIT", /* 32654 */ "Classics Animated", /* 32655 */ "Hypios", /* 32656 */ "particle dynamics GmbH", /* 32657 */ "Iconoclast IT", /* 32658 */ "SAT-TRAKT d.o.o.", /* 32659 */ "Joachim Keltsch", /* 32660 */ "MITSUBISHI ELECTRIC ENGINEERING CO.,LTD.", /* 32661 */ "NTTME", /* 32662 */ "IFIN Sistemi srl a socio unico", /* 32663 */ "DSR Information Technologies Ltd.", /* 32664 */ "Veccsa S.A.", /* 32665 */ "Integrated Healthcare Solutions", /* 32666 */ "Ultrablend LLC", /* 32667 */ "IPFire.org", /* 32668 */ "consistec Engineering & Consulting GmbH", /* 32669 */ "Consilience Software", /* 32670 */ "Graspi", /* 32671 */ "betabuild.net", /* 32672 */ "WAB Sicherheitssysteme GmbH", /* 32673 */ "GeekNode", /* 32674 */ "Cracow University of Economics", /* 32675 */ "Softwarehuset.DK", /* 32676 */ "EMI Music Ltd.", /* 32677 */ "Framestore Ltd", /* 32678 */ "Zinc Solutions", /* 32679 */ "Rentabiliweb Group", /* 32680 */ "Atwal Inc", /* 32681 */ "Text Team GmbH & Co. KG", /* 32682 */ "TOKYO KEIKI INC.", /* 32683 */ "Healthtrans LLC", /* 32684 */ "Redefine Sp. z o.o.", /* 32685 */ "Holly Corporation", /* 32686 */ "Digital Finance SPDA", /* 32687 */ "Gigle Semiconductor", /* 32688 */ "MWJ Computing", /* 32689 */ "Comrex Corporation", /* 32690 */ "eXMeritus Software Federal Systems, Inc", /* 32691 */ "Amcom Telecommunications Ltd", /* 32692 */ "E-számla Zrt.", /* 32693 */ "ComputerPride", /* 32694 */ "VOZPP", /* 32695 */ "ZAKLAD PRODUKCYJNY TEL-KA S.C.", /* 32696 */ "ACO Serverin Ahlmann GmbH & Co. KG", /* 32697 */ "SE-Elektronic GmbH", /* 32698 */ "Thales Alenia Space France", /* 32699 */ "INBUSS Informatikai Szolgáltató és Kereskedelmi Kft.", /* 32700 */ "Loyalty Partner GmbH", /* 32701 */ "Joint Stock Company \"NPO RusBITech\"", /* 32702 */ "Centre de Recherche Henri Tudor - SANTEC", /* 32703 */ "JSC ErshovTelecom", /* 32704 */ "dSys e.K.", /* 32705 */ "Reech Capital Ltd", /* 32706 */ "Pi Consulting (UK) Limited", /* 32707 */ "Dimaco Systems S.R.L.", /* 32708 */ "AirTies", /* 32709 */ "Lojas Renner S.A.", /* 32710 */ "fides AG", /* 32711 */ "Linden Lab", /* 32712 */ "Flox-arts.net", /* 32713 */ "IPS MeteoStar", /* 32714 */ "IBM Managed Security Services", /* 32715 */ "Alea Soluciones SLL", /* 32716 */ "Gemintek Corporation", /* 32717 */ "Southwestern University of Finance and Economics", /* 32718 */ "3Nokta Bilisim Teknolojileri Ltd.", /* 32719 */ "CVR Transport Kft", /* 32720 */ "RTPHYS", /* 32721 */ "MAASTRO", /* 32722 */ "Pacemaker Cluster Project", /* 32723 */ "AIRDATEC TECNICOS, S.L.", /* 32724 */ "Trans Iceland", /* 32725 */ "Tatis", /* 32726 */ "Webtech as", /* 32727 */ "Grid Dynamics Consulting Services, Inc", /* 32728 */ "EMS Satcom", /* 32729 */ "Mobile For You - M4U", /* 32730 */ "obviously-nice", /* 32731 */ "W.K. Kellogg Foundation", /* 32732 */ "Phybridge Inc", /* 32733 */ "City of Seattle", /* 32734 */ "SecurityNet.cz s.r.o.", /* 32735 */ "SHD System-Haus-Dresden GmbH", /* 32736 */ "Meghnaben Daxeshbhai Patel", /* 32737 */ "Delta Nusantara Networks Co., Ltd.", /* 32738 */ "Saimaan Lehtipaino Oy", /* 32739 */ "Lehtikanta Oy", /* 32740 */ "Savon Paino Oy", /* 32741 */ "Hämeen Paino Oy", /* 32742 */ "Sanomala Oy", /* 32743 */ "KAMEKO Bt", /* 32744 */ "DURAG data systems", /* 32745 */ "Instituto de Biología, Universidad Nacional Autónoma de México", /* 32746 */ "telenet AG Rhein-Main", /* 32747 */ "KolosStudio", /* 32748 */ "TrustMission", /* 32749 */ "LigoWave", /* 32750 */ "Solytron", /* 32751 */ "John Will Motors", /* 32752 */ "Omniture Inc.", /* 32753 */ "Dexcel Electronics Designs Pvt Ltd", /* 32754 */ "Wesabe, Inc", /* 32755 */ "Creative Solutions Laboratories Sp. z o.o.", /* 32756 */ "ChartConnect Inc.", /* 32757 */ "ANAGKY BVBA", /* 32758 */ "PRIM'X Technologies", /* 32759 */ "Koliada", /* 32760 */ "Deliberant", /* 32761 */ "AKSolutions", /* 32762 */ "YMAGIS", /* 32763 */ "inTechnology PLC", /* 32764 */ "WebHost Asia Pacific Pty Ltd", /* 32765 */ "Capricode", /* 32766 */ "JPPA Gerenciamento e Projetos S/S LTDA.", /* 32767 */ "Educational Service Unit 6", /* 32768 */ "BIZICLE", /* 32769 */ "Hoedl-Online-Systemtechnik", /* 32770 */ "Fujitsu Tohoku Systems Ltd.", /* 32771 */ "Declera Ltd.", /* 32772 */ "Jeremy Self", /* 32773 */ "wei fang lesheng electronic CO.,LTD", /* 32774 */ "Gigaset Communications", /* 32775 */ "Harry J.E Day", /* 32776 */ "BowBridge Software", /* 32777 */ "Raiffeisen Bank Hungary", /* 32778 */ "BBS AS", /* 32779 */ "synergetic AG", /* 32780 */ "Groupe Chevalier", /* 32781 */ "Conseil Général du Morbihan", /* 32782 */ "ECRIN SYSTEMS", /* 32783 */ "Amplia Soluciones S.L.", /* 32784 */ "PWI Consultants", /* 32785 */ "MasonRay Networks", /* 32786 */ "Aprend Technology", /* 32787 */ "Ennoris Trans", /* 32788 */ "Institute of Economics, Management and Law", /* 32789 */ "Raz-Lee Security", /* 32790 */ "ICSMED AG", /* 32791 */ "Atex Group Ltd.", /* 32792 */ "Shenick Network Systems", /* 32793 */ "LuTong Optoelectronic Technology Co.,Ltd", /* 32794 */ "Westnet Ptd Ltd", /* 32795 */ "i-STS Manufactuiring", /* 32796 */ "Asempra Technologies", /* 32797 */ "Netlinx, Inc.", /* 32798 */ "www.thingall.com", /* 32799 */ "www.neuq.edu.cn", /* 32800 */ "ObjectFX", /* 32801 */ "Inuk Networks", /* 32802 */ "Research Institute for Linguistics, Hungarian Academy of Sciences", /* 32803 */ "Unify Software and Solutions GmbH & Co.", /* 32804 */ "CR Host", /* 32805 */ "scientia.net", /* 32806 */ "TVACE", /* 32807 */ "SynTech Soc. Coop. a R.L.", /* 32808 */ "Evalesc GmbH", /* 32809 */ "Lancashire Constabulary", /* 32810 */ "Gemnet bv", /* 32811 */ "ICFO", /* 32812 */ "GXPCONSULT LIMITED", /* 32813 */ "RealTime7 Inc.", /* 32814 */ "Consert, Inc", /* 32815 */ "AREYOUNET.COM", /* 32816 */ "Shifted Labs", /* 32817 */ "Tecton Limited", /* 32818 */ "Infonet Network Systems", /* 32819 */ "Mundo Linux", /* 32820 */ "martin mollet informatik", /* 32821 */ "PGS", /* 32822 */ "Hextra Digital, S.L.L.", /* 32823 */ "Free Open Source Solutions Inc.", /* 32824 */ "LS cable", /* 32825 */ "Tongji University", /* 32826 */ "Siemens I MO TS", /* 32827 */ "Guntermann & Drunck GmbH Systementwicklung", /* 32828 */ "Marc Cain GmbH", /* 32829 */ "Questora Software, CJSC", /* 32830 */ "IDS", /* 32831 */ "Optech Fibres Limited", /* 32832 */ "Université Lille 2 Droit et Santé", /* 32833 */ "ANTALIS SPAIN", /* 32834 */ "Data Driven Logistics Limited", /* 32835 */ "C2SAT communications AB", /* 32836 */ "Lohmann GmbH&Co.KG", /* 32837 */ "University of AJK CS&IT Campus Mirpur azad Kashmir", /* 32838 */ "olea medical", /* 32839 */ "Krum Independent School District", /* 32840 */ "Constant Contact", /* 32841 */ "Seidl KEG", /* 32842 */ "Information Computing Center of Ministery of Communications and Information Technologies", /* 32843 */ "die-rudolphs", /* 32844 */ "Metric Systems Corporation", /* 32845 */ "Cougaar Software, Inc.", /* 32846 */ "DataStress", /* 32847 */ "Arquila Limited", /* 32848 */ "Active Broadband Neworks Inc", /* 32849 */ "C4i Pty Ltd", /* 32850 */ "Aytel", /* 32851 */ "Towerstream", /* 32852 */ "Pixel8 Networks", /* 32853 */ "OmniGlobe Networks, Inc.", /* 32854 */ "Total Transaction Management, LLC", /* 32855 */ "JL Ingram & Associates CC T/A The Hardware Junction", /* 32856 */ "Openware", /* 32857 */ "nerdnet.ca", /* 32858 */ "Escuela Politécnica Nacional", /* 32859 */ "Expert Systems (Pvt.) Ltd.", /* 32860 */ "Shenzhen LinkPower Network Systems Co.,LTD.", /* 32861 */ "Böning IT-Service", /* 32862 */ "OmniTI Labs", /* 32863 */ "Workflow.com, LLC", /* 32864 */ "Heol Design", /* 32865 */ "rockyluke", /* 32866 */ "University of Economics Prague", /* 32867 */ "Diamante Technology Advisors, Inc.", /* 32868 */ "Gravitas MM Ltd", /* 32869 */ "Fujian Sunnada Communication Co., Ltd", /* 32870 */ "BUPT Incowin Information Communication Technology Institute Ltd.", /* 32871 */ "Royal Alberts Broadcasting Network", /* 32872 */ "KONE Corporation", /* 32873 */ "Novatium Solutions Private Limited", /* 32874 */ "vedicis", /* 32875 */ "Marian Fotul", /* 32876 */ "Radio Amateurs Against Packet Radio", /* 32877 */ "MediaPod SARL", /* 32878 */ "Eugene 4J School District", /* 32879 */ "Knerer & Lang Architekten GmbH", /* 32880 */ "BeeMobile", /* 32881 */ "GameAccount Global Ltd", /* 32882 */ "One23 Designs", /* 32883 */ "Chemnitzer Verlag und Druck GmbH & Co. KG", /* 32884 */ "H-Net AG", /* 32885 */ "Restorepoint", /* 32886 */ "Joseph King ICT Consultants", /* 32887 */ "Bizsensors", /* 32888 */ "The College at Brockport State University of New York", /* 32889 */ "Bigred Solutions Ltd", /* 32890 */ "Jangwhan Kim", /* 32891 */ "caplog-x GmbH", /* 32892 */ "BJ's Deisgn & Consulting, Inc.", /* 32893 */ "Touro College", /* 32894 */ "BRICOM Technology Co., Ltd.", /* 32895 */ "Jarn AS", /* 32896 */ "Megware Computer GmbH", /* 32897 */ "Spectrum Health", /* 32898 */ "Quist Ltd.", /* 32899 */ "Dimensional Insight", /* 32900 */ "SAGI-B Expert Group Sp. z o.o.", /* 32901 */ "Verizon", /* 32902 */ "Lincoln Laboratory", /* 32903 */ "NUMLOG", /* 32904 */ "Cognito Ltd", /* 32905 */ "Rorotika Technologies", /* 32906 */ "NPO RTC, Ltd.", /* 32907 */ "ADVENAGE GmbH", /* 32908 */ "Kinek Technologies Inc.", /* 32909 */ "Impeq Technologies BV", /* 32910 */ "Brian Raaen Network Consulting", /* 32911 */ "Duck Creek Technologies, Inc", /* 32912 */ "Electrodata Recorders Pty Ltd", /* 32913 */ "Pharmacy Chain 36.6", /* 32914 */ "Edinburgh's Telford College", /* 32915 */ "Lane Community College", /* 32916 */ "GT Apps Limited", /* 32917 */ "Institut Sainte Catherine", /* 32918 */ "Barking Iguana", /* 32919 */ "ETSA", /* 32920 */ "Orbis Technology Ltd", /* 32921 */ "Verathon", /* 32922 */ "Alastair Carr", /* 32923 */ "Menturagroup Ltd", /* 32924 */ "Treck Inc.", /* 32925 */ "WebOnyx", /* 32926 */ "Unlabeled Artists Group, LLC", /* 32927 */ "BrightHouse", /* 32928 */ "Squarewave Computing", /* 32929 */ "Wolfgang Karall EDV Consulting and Training", /* 32930 */ "TOTEC AMENITY LIMITED", /* 32931 */ "Direct Telecom Ltd", /* 32932 */ "Conduct AS", /* 32933 */ "Institute of Biophysics, AS CR, v.v.i.", /* 32934 */ "Amalto Technologies", /* 32935 */ "Atelier Decora", /* 32936 */ "uma information technology GmbH", /* 32937 */ "Server Racks Australia", /* 32938 */ "Fachhochschule Hannover", /* 32939 */ "NCC AB", /* 32940 */ "Azet.sk, a.s.", /* 32941 */ "Voltage Security", /* 32942 */ "HEXIOS", /* 32943 */ "drs4drs", /* 32944 */ "Norsk eSport DA", /* 32945 */ "Manuel Meistrowitz", /* 32946 */ "Nuclemed S.A.", /* 32947 */ "UniFirst Corporation", /* 32948 */ "SunWater", /* 32949 */ "Meucci Solutions", /* 32950 */ "Wellseeing Communication Technology Co.,Ltd", /* 32951 */ "PheeNet Technology Corp.", /* 32952 */ "YACOUB Automatiom GmbH", /* 32953 */ "Italiaonline S.p.A.", /* 32954 */ "Hrvatske sume d.o.o", /* 32955 */ "ipct.net", /* 32956 */ "IN Switch Solutions", /* 32957 */ "YMMV LLP", /* 32958 */ "Audit Bureau - Qatar", /* 32959 */ "Ringsted Kommune", /* 32960 */ "KBC Consumer Finance", /* 32961 */ "Beijing Gefei Tech. Co., Ltd", /* 32962 */ "Taekjin Solutions", /* 32963 */ "Brand Up LLC", /* 32964 */ "REAL Solutions S.A.", /* 32965 */ "eSpida Limited", /* 32966 */ "Centro de Tecnologia da Informação Renato Archer", /* 32967 */ "HELiX Software + Support GmbH", /* 32968 */ "Odin TeleSystems Inc", /* 32969 */ "Caltha - Krzewski, Mach, Potempski Sp. J.", /* 32970 */ "MUZICALL", /* 32971 */ "TransWorks, Inc.", /* 32972 */ "POP.PL - Internetowe Systemy Sieciowe", /* 32973 */ "Stimulus Software", /* 32974 */ "CircleSoft Llc", /* 32975 */ "HyC Américas", /* 32976 */ "TELoIP", /* 32977 */ "IntelliDOT Corporation", /* 32978 */ "XIX", /* 32979 */ "Hitachi Systems Engineering Services, Ltd.", /* 32980 */ "Arcadyan Technology Corporation", /* 32981 */ "Trends Telematics BV", /* 32982 */ "Open Computing Solutions", /* 32983 */ "Advantage Telecom", /* 32984 */ "Philips Electronics (Israel) LTD - Philips HealthCare", /* 32985 */ "Kommunik8 Inc.", /* 32986 */ "Barrowa", /* 32987 */ "Dott. Giulimondi Gabriele", /* 32988 */ "in-volv", /* 32989 */ "Prahm IT-Systemdienstleistungen", /* 32990 */ "dix.cz", /* 32991 */ "ladava.com", /* 32992 */ "OpenSAF Foundation", /* 32993 */ "Standingstone", /* 32994 */ "Vendio Services, Inc.", /* 32995 */ "GOURMET NAVIGATOR INCORPORATED", /* 32996 */ "Tuijnman Professional Services", /* 32997 */ "Shanghai DareGlobal Technologies Co.,Ltd.", /* 32998 */ "Air Transportation Advancement Program", /* 32999 */ "Zeon Corporation", /* 33000 */ "Micro Talk Systems Corp.", /* 33001 */ "Open End AB", /* 33002 */ "SHENZHEN GONGJIN ELECTRONICS CO.,LTD", /* 33003 */ "Universal Scientific Industrial (Shanghai) Co., Ltd", /* 33004 */ "Artio Oy", /* 33005 */ "MGB-Tech B.V.B.A.", /* 33006 */ "Schoenhofer Sales And Engineering GmbH", /* 33007 */ "TV 2", /* 33008 */ "Stadtverwaltung Mannheim", /* 33009 */ "IRB Barcelona", /* 33010 */ "digital performance", /* 33011 */ "FASTFOOD-SERVICE LTD.", /* 33012 */ "NexAira, Inc.", /* 33013 */ "Network Zen", /* 33014 */ "Emilie Myers and Associates", /* 33015 */ "Ajuntament de Barcelona", /* 33016 */ "Mobito Inc", /* 33017 */ "Pilin-Echtar.NET", /* 33018 */ "Huntsville Hospital", /* 33019 */ "Rebel 2000 Limited", /* 33020 */ "WFG PARTICIPAÇÕES S.A.", /* 33021 */ "Simon & Stolle GbR", /* 33022 */ "Eoos Technologies GmbH", /* 33023 */ "Lenovo Chinaweal System & Service Co.,Ltd", /* 33024 */ "Atlanta Advanced Communications Holdings Limited", /* 33025 */ "Positive Advisory S.A.", /* 33026 */ "CAJA DE AHORROS DE GALICIA", /* 33027 */ "Prassel S.r.l.", /* 33028 */ "CJSC “Borisoglebsk Communication System\"", /* 33029 */ "Timico Ltd", /* 33030 */ "C.G.C.,a.s.", /* 33031 */ "CTP GmbH", /* 33032 */ "Probability PLC", /* 33033 */ "Taleo Inc.", /* 33034 */ "InGenius Software", /* 33035 */ "A.ö. Krankenhaus der Elisabethinen Linz", /* 33036 */ "Broadcast International", /* 33037 */ "Fluor Corporation", /* 33038 */ "Adapt4 LLC", /* 33039 */ "BeatleNet Ltd.", /* 33040 */ "ZEIT Verlag Gerd Bucerius GmbH & CO KG", /* 33041 */ "bitrausch", /* 33042 */ "Shared Autonomous sYstems", /* 33043 */ "Mantica Solutions S.L.", /* 33044 */ "JinPeng", /* 33045 */ "NEXTWERK IT-Services GmbH", /* 33046 */ "Freifunk Potsdam e.V.", /* 33047 */ "Brand", /* 33048 */ "Mellanox Technologies LTD", /* 33049 */ "China IWNCOMM Co., Ltd.", /* 33050 */ "flykernel", /* 33051 */ "Dhyan Infotech Inc.,", /* 33052 */ "Vialis bv.", /* 33053 */ "iPLON GmbH The Infranet Company", /* 33054 */ "Van Dijk Educatie BV", /* 33055 */ "Cambridge Research Systems Ltd.", /* 33056 */ "CRISOL DE FRUTOS SECOS S.A.T", /* 33057 */ "Stratus Telecommunications", /* 33058 */ "MOBITRUM", /* 33059 */ "International Computer Science Institute", /* 33060 */ "University of Shanghai for Science & Technology", /* 33061 */ "Netvision Telecom Inc.", /* 33062 */ "DVN Technology Limited", /* 33063 */ "A2B Electronics AB", /* 33064 */ "CertiCon a.s.", /* 33065 */ "SmartSynch, Inc.", /* 33066 */ "Lake Cumberland District Health Department", /* 33067 */ "F2Ware Inc.", /* 33068 */ "Grieshaber Logistik AG", /* 33069 */ "Alkaloid Networks LLC", /* 33070 */ "BBMS AS", /* 33071 */ "subsist GmbH", /* 33072 */ "System Analysis and Information Technologies Conference", /* 33073 */ "Oryx Mail Systems GmbH", /* 33074 */ "linux systeme thomas", /* 33075 */ "SCORE42 SAS", /* 33076 */ "InformSvyazStroi, Ltd.", /* 33077 */ "Ganymeade Systems", /* 33078 */ "EmblaCom Oy", /* 33079 */ "Drexler Hard- und Software e.K.", /* 33080 */ "KOGAN", /* 33081 */ "zozs.se", /* 33082 */ "Seafreeze Acquisition LLC,", /* 33083 */ "Box and Dice Software Pty Ltd", /* 33084 */ "Mueller Ltd. & Co. KG", /* 33085 */ "ims Info Management System AG", /* 33086 */ "International School of Stuttgart e. V.", /* 33087 */ "Versatile Knowledge System", /* 33088 */ "Fachhochschule für öffentliche Verwaltung NRW", /* 33089 */ "xxlboy", /* 33090 */ "TCRP", /* 33091 */ "Opsource", /* 33092 */ "LexisNexis RIAG", /* 33093 */ "Netactive Systems Ltd", /* 33094 */ "HyTrust, Inc.", /* 33095 */ "Hard To Port Productions", /* 33096 */ "Adligo Inc", /* 33097 */ "Gradient Effects", /* 33098 */ "Rudra Nevatia", /* 33099 */ "ELITE Sistemas", /* 33100 */ "Danube Data Center GmbH", /* 33101 */ "Engelsburg Gymniasum", /* 33102 */ "EmisFR", /* 33103 */ "KyaPanel", /* 33104 */ "D-ns", /* 33105 */ "Softbooking", /* 33106 */ "Meetup, Inc.", /* 33107 */ "Nexen Services, Alter Way Hosting", /* 33108 */ "Cumquat Information Technology BV", /* 33109 */ "ITD Network SA", /* 33110 */ "dickicht.org GbR, Ragnar Nevries & Robert Waltemath", /* 33111 */ "Vidient Systems, Inc.", /* 33112 */ "FXhome", /* 33113 */ "Maricopa County Community College District", /* 33114 */ "Shamir Systems Ltd.", /* 33115 */ "Solvo, Ltd.", /* 33116 */ "Linuxense Information Systems Pvt. Ltd.", /* 33117 */ "Freescale Semiconductor", /* 33118 */ "AltaStream Controls Inc", /* 33119 */ "eZ Systems", /* 33120 */ "Tadcom AB", /* 33121 */ "Vestmark, Inc.", /* 33122 */ "ProTel Communications Ltd", /* 33123 */ "ASKing Co., Ltd.", /* 33124 */ "Precise Power, Inc.", /* 33125 */ "DataSoft Corp.", /* 33126 */ "Dialog und Medien Agentur der ACS mbH", /* 33127 */ "Semperian Capital Management", /* 33128 */ "ENTEREST GmbH", /* 33129 */ "Virtual Instruments Corporation", /* 33130 */ "Drexel University", /* 33131 */ "Lichti² GbR", /* 33132 */ "Daedalus Software, Inc.", /* 33133 */ "LS Industrial Systems Co.,Ltd.", /* 33134 */ "PeakSystems", /* 33135 */ "ELPRO VIDEOLABS srl", /* 33136 */ "JIGAR", /* 33137 */ "TENA SDA", /* 33138 */ "5gbit.de", /* 33139 */ "theBside", /* 33140 */ "e-Rank Internetdiensten", /* 33141 */ "Manuel Kobashigawa", /* 33142 */ "Clipsal Australia Pty Ltd", /* 33143 */ "Kitten Wranglers Unlimited", /* 33144 */ "Digivision Entertainment Private Limited", /* 33145 */ "Stiftung Nikolauspflege", /* 33146 */ "Olivier BONHOMME", /* 33147 */ "British Columbia Wireless Network Society", /* 33148 */ "Defining Technology, Inc.", /* 33149 */ "silmarilli.eu", /* 33150 */ "CAIL Technologies", /* 33151 */ "ASIC North, Inc.", /* 33152 */ "TeleDNA Communications Pvt. Ltd.", /* 33153 */ "NPO Impuls", /* 33154 */ "Code Jawa", /* 33155 */ "Monsternett AS", /* 33156 */ "fqdn dot Ro", /* 33157 */ "ak obs, ltd.", /* 33158 */ "AGS INFORMATIQUE", /* 33159 */ "The Invariant Autocracy", /* 33160 */ "www.libvoip.com", /* 33161 */ "DCS Internet Pty Limited", /* 33162 */ "Gundersen Lutheran", /* 33163 */ "datahouse AG", /* 33164 */ "Minds + Machines", /* 33165 */ "Fiasko Software", /* 33166 */ "Trusted Logic", /* 33167 */ "mLife Sp. z o.o.", /* 33168 */ "Via-Vox Limited", /* 33169 */ "International Financial Data Services (Canada) Ltd.", /* 33170 */ "HELIKA, a.s.", /* 33171 */ "NetClean Technologies Sweden AB", /* 33172 */ "Annidis Health Systems Corp", /* 33173 */ "COMM-connect A/S", /* 33174 */ "ZIEHL industrie-elektronik GmbH+Co KG", /* 33175 */ "Rambla", /* 33176 */ "Radiation Oncology Victoria", /* 33177 */ "Jilin University", /* 33178 */ "omod", /* 33179 */ "PayLife Bank GmbH", /* 33180 */ "LASELEC S.A.", /* 33181 */ "Advanced Network Engineering Consultants Limited", /* 33182 */ "SystemsPromAutomatic", /* 33183 */ "AsiaRF Ltd.", /* 33184 */ "jps networks", /* 33185 */ "Data Robotics, Inc", /* 33186 */ "Commission de la santé et de la sécurité du travail (CSST)", /* 33187 */ "DANS – Data Archiving and Networked Services", /* 33188 */ "Droplet Technology Inc", /* 33189 */ "Petroleum Development Oman LLC", /* 33190 */ "Equine Technology Pte Ltd", /* 33191 */ "University of Žilina", /* 33192 */ "Powercom Consultants Pty Ltd", /* 33193 */ "Kreditor Europe AB", /* 33194 */ "Bimash LLP", /* 33195 */ "VITA", /* 33196 */ "WIT", /* 33197 */ "SISCA", /* 33198 */ "\"TERRATEL\" LLC", /* 33199 */ "Gelber Group LLC", /* 33200 */ "3F Elettronica s.n.c.", /* 33201 */ "ASUMO CO., LTD.", /* 33202 */ "SensiMesh Pte Ltd", /* 33203 */ "Sprillion Technologies", /* 33204 */ "Elman srl", /* 33205 */ "Aqueouslife", /* 33206 */ "CEJIL - Center for Justice and International Law", /* 33207 */ "AMB Consulting SARL", /* 33208 */ "Dich Networks Co.", /* 33209 */ "Qvantel", /* 33210 */ "Westminster College", /* 33211 */ "Rötzer Engineering", /* 33212 */ "Moeller GmbH", /* 33213 */ "IPBFR", /* 33214 */ "Swisscanto Assetmanagement AG", /* 33215 */ "Dr. August Oetker Nahrungsmittel KG", /* 33216 */ "accessec GmbH", /* 33217 */ "Polar Circle AS", /* 33218 */ "Causata Ltd", /* 33219 */ "Netfonds Bank ASA", /* 33220 */ "Insumo Systems", /* 33221 */ "INECOIEC", /* 33222 */ "Aero-Info Technologies Co.,Ltd.", /* 33223 */ "CJSC Rosta", /* 33224 */ "Obelux Oy", /* 33225 */ "Inline Internet Online Dienste GmbH", /* 33226 */ "PromiNet s.r.o", /* 33227 */ "AareNet AG", /* 33228 */ "COMUNICI GmbH", /* 33229 */ "Blueloop Ltd", /* 33230 */ "AvL Technologies", /* 33231 */ "stderr.nl", /* 33232 */ "ALERT Life Sciences Computing, S.A.", /* 33233 */ "Halon Security", /* 33234 */ "DataHack", /* 33235 */ "AMTRON GmbH", /* 33236 */ "Authernative, Inc.", /* 33237 */ "ReachLocal, Inc.", /* 33238 */ "Active Control Technology Inc.", /* 33239 */ "Salamander Technologies, Inc.", /* 33240 */ "CITIZEN SYSTEMS JAPAN CO., LTD.", /* 33241 */ "PanTek", /* 33242 */ "China Broadband Wireless IP Standard Group", /* 33243 */ "William Demant Holding", /* 33244 */ "kaf.cz", /* 33245 */ "UAB Pivot Capital Management", /* 33246 */ "Daton Securities Co., Ltd.", /* 33247 */ "Radix Development Corporation CC", /* 33248 */ "BI@Work S.r.l.", /* 33249 */ "SmurfitKappa News press", /* 33250 */ "REASON TECNOLOGIA S.A.", /* 33251 */ "Flashlight Engineering & Consulting", /* 33252 */ "MiS Inc.", /* 33253 */ "TimeData Corporation", /* 33254 */ "Kentucky Christian University", /* 33255 */ "Small Office Networks", /* 33256 */ "Dienste fuer Menschen gGmbH", /* 33257 */ "dzhon pty. ltd.", /* 33258 */ "Martin DiViaio", /* 33259 */ "Triescom Co., Ltd.", /* 33260 */ "Resilans AB", /* 33261 */ "Jäger Computergesteuerte Messtechnik GmbH", /* 33262 */ "Raiffeisenverband Suedtirol Gen.", /* 33263 */ "EPI Service Ltd", /* 33264 */ "Robert Rhea Photography", /* 33265 */ "ISOMEDIA, Inc.", /* 33266 */ "The SPACEPOL Corporation", /* 33267 */ "ClearTech Ltda", /* 33268 */ "Ecessa corporation", /* 33269 */ "Sysmap Solutions", /* 33270 */ "Baptist Care (SA) Inc", /* 33271 */ "Med-RT, LLC", /* 33272 */ "Gomez & Associates", /* 33273 */ "Nestle Waters North America", /* 33274 */ "The Hutchins School", /* 33275 */ "KDN (Korea Electric Power Data Network)", /* 33276 */ "Pfiffner Gruppe", /* 33277 */ "Confident Instruments, Inc.", /* 33278 */ "Mazioli LTDA-ME", /* 33279 */ "OWFS -- One Wire Filesystem", /* 33280 */ "New Dream Network", /* 33281 */ "Eastern Oregon University", /* 33282 */ "AN-D.cz", /* 33283 */ "Macquarie Group Limited", /* 33284 */ "NavStar Geomatics Ltd", /* 33285 */ "KIPAC", /* 33286 */ "Epix LLC", /* 33287 */ "GEVAS software GmbH", /* 33288 */ "Metalor", /* 33289 */ "Bundesverfassungsgericht", /* 33290 */ "Microvideo Ltd", /* 33291 */ "Fordham University", /* 33292 */ "Jenkins Shipping Company Ltd", /* 33293 */ "Lincor Solutions Ltd", /* 33294 */ "Georg Utz, Inc.", /* 33295 */ "LepomisLab, LLC", /* 33296 */ "Arion Systems Pvt. Ltd.", /* 33297 */ "Wikimedia Foundation, Inc.", /* 33298 */ "Ithos USA", /* 33299 */ "Linkare TI", /* 33300 */ "Mee IT Solutions Co.,Ltd.", /* 33301 */ "Trio Datacom", /* 33302 */ "Dannatu AG", /* 33303 */ "EudoxeSoft SARL", /* 33304 */ "Ark Computing", /* 33305 */ "Telemaque", /* 33306 */ "St. Jude Children's Research Hospital", /* 33307 */ "DataCode srl", /* 33308 */ "Aochuang Electronic Equipment Co.,Ltd.", /* 33309 */ "ZMC Elektronika d.o.o.", /* 33310 */ "Everest Software International", /* 33311 */ "Forenet, Inc.", /* 33312 */ "SoeKul, LLC", /* 33313 */ "Servicio Nacional de Rehabilitación", /* 33314 */ "Max-Planck-Institut fuer Informatik", /* 33315 */ "Government of Saskatchewan", /* 33316 */ "INCITS Technical Committee T11", /* 33317 */ "AIDS Law Project", /* 33318 */ "Technische Universität Kaiserslautern", /* 33319 */ "Skarvon", /* 33320 */ "Tradesmen International Inc", /* 33321 */ "Progress Financial", /* 33322 */ "Chaos Eternal Network", /* 33323 */ "Istochnik Ltd.", /* 33324 */ "MSB Micro Systems", /* 33325 */ "PERTUS", /* 33326 */ "ZIP Sistemas S.L.", /* 33327 */ "NetArt Piotr Nowak", /* 33328 */ "Encode Networks Svenska AB", /* 33329 */ "Relevantum Oy", /* 33330 */ "Balance Network Co. ,Ltd.", /* 33331 */ "City of Edmonton", /* 33332 */ "Morningstar Corporation", /* 33333 */ "STEALTHbits Technologies, Inc.", /* 33334 */ "TrueOffice", /* 33335 */ "Kat5Design", /* 33336 */ "elineis", /* 33337 */ "Comkom GmbH", /* 33338 */ "The Charity Bus", /* 33339 */ "Fundacio Privada Universitat Abat Oliba CEU", /* 33340 */ "Beijing TongFang Gigamega Tech. co., Ltd.", /* 33341 */ "u-blox AG", /* 33342 */ "Storebrand ASA", /* 33343 */ "SC Garant Industries SRL", /* 33344 */ "Branded Payment Solutions", /* 33345 */ "Conseil Général des Pyrénées Atlantiques", /* 33346 */ "Papa John's International, Inc", /* 33347 */ "Voidnet.biz", /* 33348 */ "Mohawk College of Applied Arts and Technology", /* 33349 */ "GALLACCI COMMUNICATIONS", /* 33350 */ "Hospital Service Association of Northeastern Pennsylvania", /* 33351 */ "MAX Technologies", /* 33352 */ "2Ring", /* 33353 */ "Kaasjager Consultancy", /* 33354 */ "Ozeki Informatics Ltd.", /* 33355 */ "HEADJAPAN Co.,Ltd.", /* 33356 */ "TWINSEC GmbH", /* 33357 */ "ApplianSys Ltd", /* 33358 */ "VUT GmbH", /* 33359 */ "Kahaf (pvt) Ltd", /* 33360 */ "Cursum", /* 33361 */ "DataSchenk, Inc.", /* 33362 */ "Duff & Phelps, LLC.", /* 33363 */ "ginkgotek", /* 33364 */ "Edelbluth Engineering", /* 33365 */ "Columbia Data Products, Inc", /* 33366 */ "VIRTUALMGS", /* 33367 */ "VTRON TECHNOLOGIES LTD.", /* 33368 */ "Sino-telecom Technology Co.,Ltd", /* 33369 */ "Erasmus MC Rotterdam", /* 33370 */ "Kelkoo", /* 33371 */ "Infocare AS", /* 33372 */ "ZeroPoint.it", /* 33373 */ "SFProjects", /* 33374 */ "Dalee LLC", /* 33375 */ "Argeon Limited", /* 33376 */ "Paul Armstrong", /* 33377 */ "Zetta, inc", /* 33378 */ "KLabs", /* 33379 */ "ICS Computer Services SA", /* 33380 */ "DVS Digital Video Systems AG", /* 33381 */ "chillyweb", /* 33382 */ "Audisoft Technologies", /* 33383 */ "eSaturnus", /* 33384 */ "Feeva Technology Inc.", /* 33385 */ "Hyper9", /* 33386 */ "SS7 Solutions", /* 33387 */ "InCASE - Sven Mueller", /* 33388 */ "Keyboard Monkeys Ltd.", /* 33389 */ "Cormedica", /* 33390 */ "OSI d.o.o.", /* 33391 */ "Source Allies, Inc", /* 33392 */ "C-NET Information Technology LTD.", /* 33393 */ "Mio Software Laboratory Inc.", /* 33394 */ "Washington State Consolidated Technology Services", /* 33395 */ "Ferpa Consultoria e Sistemas Ltda.", /* 33396 */ "CreAPPtive Limited", /* 33397 */ "Traffic Management Technologies", /* 33398 */ "Egyption Root certification authority", /* 33399 */ "Anywire Corporation", /* 33400 */ "Servera, Inc.", /* 33401 */ "Quadrizen", /* 33402 */ "Radiocomp ApS", /* 33403 */ "Dipl.-Ing. Christian Lindemann", /* 33404 */ "EISST Limited", /* 33405 */ "Keller Williams Realty Intl", /* 33406 */ "I-Evolve", /* 33407 */ "BASIS International Ltd.", /* 33408 */ "The Chronicle", /* 33409 */ "FETAC", /* 33410 */ "QNETIC LTD.", /* 33411 */ "Kootenai Electric Cooperative, Inc.", /* 33412 */ "ADSLWEB-dot-Net", /* 33413 */ "Monitis Inc.", /* 33414 */ "N-Com, L.P.", /* 33415 */ "wondersgroup", /* 33416 */ "PiN GmbH", /* 33417 */ "Rila Feinkost-Importe GmbH und Co. KG", /* 33418 */ "CNStreaming Technologies Co., Ltd", /* 33419 */ "Voalte, Inc", /* 33420 */ "South Gloucestershire Council CYP ICT", /* 33421 */ "Com-Ned Netwerken B.V.", /* 33422 */ "TriaGnoSys GmbH", /* 33423 */ "ITXTEND LLC", /* 33424 */ "Fortisbank NL NV", /* 33425 */ "Mirae Ikorn company", /* 33426 */ "5V Technologies Ltd.", /* 33427 */ "TRAKCE, a.s.", /* 33428 */ "Mobile Experts sp. z o.o.", /* 33429 */ "Libra Szoftver Zrt", /* 33430 */ "Oberfinanzdirektion Karlsruhe", /* 33431 */ "MAHLE International GmbH", /* 33432 */ "Interwetten", /* 33433 */ "SDC Sistemi di Computer", /* 33434 */ "dicas digital image coding GmbH", /* 33435 */ "Lepida spa", /* 33436 */ "Heidelberg Engineering GmbH", /* 33437 */ "RIPN", /* 33438 */ "Centralx", /* 33439 */ "Centro Brasileiro de Pesquisa e Tecnologia em Informática Médica", /* 33440 */ "Science Systems and Applications, Inc.", /* 33441 */ "Bernards", /* 33442 */ "Novus Entertainment Inc.", /* 33443 */ "obtelecom", /* 33444 */ "The London Library", /* 33445 */ "Relay Station Ltd", /* 33446 */ "Comtech Ltd.", /* 33447 */ "Chemtura Corporation", /* 33448 */ "Time2Dive", /* 33449 */ "Facultad de Ingenieria Informatica, CUJAE", /* 33450 */ "Infomed", /* 33451 */ "Comsenz.Ltd", /* 33452 */ "Polylogics Consulting, Inc.", /* 33453 */ "Nippon Sogo Systems, Inc.", /* 33454 */ "BVE Solutions", /* 33455 */ "DCF Technologies", /* 33456 */ "DANET.CZ s.r.o.", /* 33457 */ "Colégio Santo Agostinho", /* 33458 */ "Vivisimo, Inc.", /* 33459 */ "//SEIBERT/MEDIA GmbH", /* 33460 */ "DS Media Labs, Inc.", /* 33461 */ "Zmac1, Inc.", /* 33462 */ "Limelight Networks, Inc.", /* 33463 */ "Leo Lab", /* 33464 */ "Unlimited Bandwidth LLC", /* 33465 */ "Kadeo Pty Ltd", /* 33466 */ "Cyprotex", /* 33467 */ "Future Skies", /* 33468 */ "Produban Servicios Informaticos Generales", /* 33469 */ "Vista Systems, Corp.", /* 33470 */ "Alekstra Oy", /* 33471 */ "Sittig Industrie-Elektronik GmbH & Co. KG", /* 33472 */ "Dataman International B.V.", /* 33473 */ "Regex", /* 33474 */ "Botswana Power Corporation", /* 33475 */ "Kittelberger media solutions GmbH", /* 33476 */ "Sommer Mess-Systemtechnik", /* 33477 */ "aserva GmbH", /* 33478 */ "TradingScreen Inc", /* 33479 */ "Canadian Automobile Association, South Central Ontario", /* 33480 */ "Manufacturing Resources International", /* 33481 */ "ManageIQ, Inc.", /* 33482 */ "Goldflower Incorporated", /* 33483 */ "Initech s.r.o.", /* 33484 */ "Caribou Software", /* 33485 */ "Silk Information Systems, Inc.", /* 33486 */ "Packet Ship Technologies Limited", /* 33487 */ "MoaningMarmot", /* 33488 */ "NERO Network", /* 33489 */ "GeneGO Inc.", /* 33490 */ "Malviny International", /* 33491 */ "Broadex Technologies, Shanghai", /* 33492 */ "Loadcom Technology Shenzhen Co., Ltd.", /* 33493 */ "Sekoci Maju Jaya", /* 33494 */ "AXPO INFORMATIK AG", /* 33495 */ "Spurious Logic Technology Services", /* 33496 */ "Vahni Solutions", /* 33497 */ "Andrew Kipcharskiy", /* 33498 */ "KPN HotSpots", /* 33499 */ "Vertex Antennentechnik GmbH", /* 33500 */ "Novatice Technologies", /* 33501 */ "Comunidad Autonoma Region de Murcia", /* 33502 */ "Heavens-Above GmbH", /* 33503 */ "Narodni technicka knihovna", /* 33504 */ "tw telecom, inc.", /* 33505 */ "Dassault Systemes", /* 33506 */ "Elster Electricity, LLC", /* 33507 */ "Avere Systems, Inc.", /* 33508 */ "Sociedad Hebraica Argentina", /* 33509 */ "Provincial Health Services Authority", /* 33510 */ "Radiant Technologies, Inc.", /* 33511 */ "TheMarkets.com LLC", /* 33512 */ "Arvensian", /* 33513 */ "LUMANTEK", /* 33514 */ "Antonio Cunha Barbosa", /* 33515 */ "Zhuhai Jiasin Industry Co., Ltd", /* 33516 */ "Scourger.nl", /* 33517 */ "Tap / Bkruse & Associates LLC", /* 33518 */ "SkyMesh PTy Ltd", /* 33519 */ "Modern Module Inc.", /* 33520 */ "IKT Advanced Technologies s.r.o.", /* 33521 */ "soit GmbH", /* 33522 */ "Sword Real Time", /* 33523 */ "measanctum", /* 33524 */ "Bewigo Technologies SARL", /* 33525 */ "DonaldWilson.Info", /* 33526 */ "USDA", /* 33527 */ "Krestfield", /* 33528 */ "MIDASPLUS, INC.", /* 33529 */ "EasyWay", /* 33530 */ "Dmitry Komarchev", /* 33531 */ "Valsts Robežsardze", /* 33532 */ "Linkdevices Technology, Inc.", /* 33533 */ "Systembase Limited", /* 33534 */ "Herning Kommune", /* 33535 */ "INESC Porto", /* 33536 */ "BCV solutions s.r.o.", /* 33537 */ "EDX Software Design", /* 33538 */ "Europcar Information Services", /* 33539 */ "Ion Beam Applications", /* 33540 */ "w3variance", /* 33541 */ "CBC Cologne Broadcasting Center GmbH", /* 33542 */ "UHU Systems Kft.", /* 33543 */ "T.Rowe Price", /* 33544 */ "Entelec Control Systems", /* 33545 */ "Axiros GmbH", /* 33546 */ "Liberty Mutual Insurance Company", /* 33547 */ "Managed I.T.", /* 33548 */ "ZnamiNet", /* 33549 */ "BIXOLON Co., Ltd.", /* 33550 */ "David Jones", /* 33551 */ "HiFull Technology", /* 33552 */ "TBC Solutions", /* 33553 */ "Genetech AB", /* 33554 */ "RACOM s.r.o.", /* 33555 */ "Hyperthought Solutions", /* 33556 */ "University of Kent", /* 33557 */ "powertron engineering co., ltd.", /* 33558 */ "AXION - Red de Banda Ancha de Andalucia S.A.", /* 33559 */ "Commercial Court of Tula Region", /* 33560 */ "Express Gifts ltd", /* 33561 */ "Judako AB", /* 33562 */ "CNEA - Regional Centro", /* 33563 */ "MEDIATECH", /* 33564 */ "Epic Event International Pty Ltd", /* 33565 */ "Dublin University Internet Society", /* 33566 */ "Vira Realtime, Ltd.", /* 33567 */ "Bakoma SA", /* 33568 */ "ERG S.p.A.", /* 33569 */ "RENATA WEB SYSTEMS", /* 33570 */ "MRC Epidemiology Unit", /* 33571 */ "Educational Service Unit 10", /* 33572 */ "Corps Saxo-Montania", /* 33573 */ "waxtie", /* 33574 */ "Inovatic d.o.o.", /* 33575 */ "AP Router Industria Eletronica Ltda.", /* 33576 */ "CenIP", /* 33577 */ "Jason B. Alonso", /* 33578 */ "Fairfield County, Ohio", /* 33579 */ "Anacom Eletrônica Ltda", /* 33580 */ "OpenMind S.r.l.", /* 33581 */ "Errigal, Inc.", /* 33582 */ "BSoft", /* 33583 */ "OnlLine Technologies", /* 33584 */ "Intehel", /* 33585 */ "Institute of Information science, Beijing Jiaotong University, China", /* 33586 */ "PlayBox Technology Ltd.", /* 33587 */ "Autek Ingenieria, SL", /* 33588 */ "Ministarstvo unutrasnjih poslova Republike Srbije", /* 33589 */ "Faltermeier", /* 33590 */ "GIE Astria", /* 33591 */ "Gryphon Technology Pty Ltd", /* 33592 */ "Errigal Inc.", /* 33593 */ "Daniel Hommel", /* 33594 */ "San Francisco State University", /* 33595 */ "Adventist Health System", /* 33596 */ "Clasdix SRL", /* 33597 */ "isi-muenchen ltd.", /* 33598 */ "Dolf - Systems", /* 33599 */ "OMNIconnect Pty Ltd", /* 33600 */ "KIRYUNG", /* 33601 */ "northstarlabs.net", /* 33602 */ "Infotech enterprises", /* 33603 */ "SARL LES CAGOTS", /* 33604 */ "Soft & Control Technology s.r.o.", /* 33605 */ "HI5 Networks, Inc", /* 33606 */ "SeeChange Health", /* 33607 */ "RipCode, Inc.", /* 33608 */ "Softtek", /* 33609 */ "fastip, llc", /* 33610 */ "Transmicro", /* 33611 */ "Com Hem AB", /* 33612 */ "CRISPYLOGICS", /* 33613 */ "DPD Polska Sp. z o.o.", /* 33614 */ "Cross Country Automotive Services", /* 33615 */ "Ohio Supercomputer Center", /* 33616 */ "David Kraeutmann", /* 33617 */ "Nito Programs", /* 33618 */ "FreeComm Data Communication Co., Ltd.", /* 33619 */ "CertusNet", /* 33620 */ "Asmens dokumentu israsymo centras prie Lietuvos Respublikos vidaus reikalu ministerijos", /* 33621 */ "4Dst International Telecommunications (Pty) Ltd", /* 33622 */ "Pokrovskoe Ltd", /* 33623 */ "Beijing VBON Science & Technology Development Co.,Ltd.", /* 33624 */ "xallaraparadigm", /* 33625 */ "Reouel", /* 33626 */ "code-drohne.de", /* 33627 */ "Egyption Government Certification Authority", /* 33628 */ "t-Linux Ltd.", /* 33629 */ "Iridea (M) Sdn Bhd", /* 33630 */ "Poczta Polska", /* 33631 */ "AGNEKO", /* 33632 */ "Herman Andersson Oy", /* 33633 */ "Reale Seguros Generales", /* 33634 */ "Ruby Sync", /* 33635 */ "TechnoSec", /* 33636 */ "Walla Walla University", /* 33637 */ "Voiceboard Corporation", /* 33638 */ "Vestas Wind Systems A/S", /* 33639 */ "TCPOS SA", /* 33640 */ "Ajimi", /* 33641 */ "Denmark - Fujitsu Services A/S", /* 33642 */ "Comgroup GmbH", /* 33643 */ "Sytel Limited", /* 33644 */ "MKS Inc.", /* 33645 */ "Extelia", /* 33646 */ "Mashlab / Huther & Sommer GbR", /* 33647 */ "Ireth", /* 33648 */ "Pramana Inc", /* 33649 */ "AdaCore SAS", /* 33650 */ "Sparkplug Inc", /* 33651 */ "Cousteau Network Development LLC", /* 33652 */ "Opulan Technologies Corp.", /* 33653 */ "Posidex Techonologies Pvt Ltd", /* 33654 */ "OVOCENTRUM V+V s.r.o.", /* 33655 */ "Wardsback Brotherhood", /* 33656 */ "Harald Würger", /* 33657 */ "V.D.S. - Video Display Systems Srl", /* 33658 */ "Università di Bari", /* 33659 */ "Lower Colorado River Authority", /* 33660 */ "LineRate Systems, Inc.", /* 33661 */ "AfroDuck Productions", /* 33662 */ "Manz Automation AG", /* 33663 */ "Conei Cia. Int. de Inversiones", /* 33664 */ "Liveperson", /* 33665 */ "STMIK Mikroskil", /* 33666 */ "SADA Systems Inc. - Apps Division", /* 33667 */ "ECtel LTD.", /* 33668 */ "Kevin R. James Enterprise Services", /* 33669 */ "Arctic Lake", /* 33670 */ "HESTIA FRANCE", /* 33671 */ "intecsoft GmbH", /* 33672 */ "Lacerda Sistemas de Energia", /* 33673 */ "NUVICO", /* 33674 */ "Zydax, LLC", /* 33675 */ "Happy Jack Software LLC.", /* 33676 */ "HiWiFi Networks", /* 33677 */ "Fähnle IT-Solutions", /* 33678 */ "The University of Waikato", /* 33679 */ "Bankart, d.o.o.", /* 33680 */ "Deutsche Papier Vertriebs GmbH", /* 33681 */ "Tyze.com", /* 33682 */ "Agilink Systems Corp.", /* 33683 */ "eCern Inc", /* 33684 */ "Netgroup A/S", /* 33685 */ "NetVitesse S.A.R.L", /* 33686 */ "NETAVIS Software GmbH", /* 33687 */ "Packet Power", /* 33688 */ "mediQ", /* 33689 */ "shenzhen etoptech co.,Ltd", /* 33690 */ "MOSTCOM Ltd.", /* 33691 */ "Meona GmbH", /* 33692 */ "SMALS", /* 33693 */ "Knexus Research Corporation", /* 33694 */ "National Oilwell Varco", /* 33695 */ "Trulix Systems", /* 33696 */ "Klaus Becker Kopiersysteme -Service-GmbH", /* 33697 */ "ACRA CONTROL LTD.", /* 33698 */ "TAG Video Systems", /* 33699 */ "Saginaw Valley State University", /* 33700 */ "Cathay Pacific Airways Ltd.", /* 33701 */ "Technalogix Ltd.", /* 33702 */ "ziggurat29", /* 33703 */ "Middle Office Solutions, LLC", /* 33704 */ "Global 360 Inc", /* 33705 */ "OPVISION Technology Co.,Ltd", /* 33706 */ "United International College", /* 33707 */ "SPIT elektromechanica BV", /* 33708 */ "OnTimeLine", /* 33709 */ "Tawasul Telecom", /* 33710 */ "Campanja AB", /* 33711 */ "CSC PYXUS-2006", /* 33712 */ "WB Electronics sp. z o.o.", /* 33713 */ "Neuralitic Systems Inc.", /* 33714 */ "Axcient, Incorporated", /* 33715 */ "Jiangsu Hengtong Photoelectric Stock Co., Ltd", /* 33716 */ "Nirmitsu Technologies Private Limited", /* 33717 */ "Lava-Tech", /* 33718 */ "EBU / UER", /* 33719 */ "ELTA Systems Ltd.", /* 33720 */ "Thrane & Thrane", /* 33721 */ "MC SECURITY Co., Ltd.", /* 33722 */ "laurentum.de", /* 33723 */ "EBDSoft", /* 33724 */ "Bimeng Communications System Co.,Ltd", /* 33725 */ "White Sands Technology", /* 33726 */ "Caerian Inc", /* 33727 */ "Adaptive AI, Inc.", /* 33728 */ "Beijing Pannet Information Technology Co., Ltd.", /* 33729 */ "Stefan aulbach", /* 33730 */ "Asito B.V.", /* 33731 */ "NetResults S.r.l.", /* 33732 */ "sw-k software & system engineering", /* 33733 */ "chini.info", /* 33734 */ "Buzzlogic Inc.", /* 33735 */ "fylleri.is", /* 33736 */ "Soprano Design Pty Ltd", /* 33737 */ "Animelliure", /* 33738 */ "ANTRICE S.A", /* 33739 */ "Interdatanet - DET", /* 33740 */ "Yellowstone Soft", /* 33741 */ "Net4Promotions", /* 33742 */ "Zentrum für Soziale Innovation", /* 33743 */ "Application Solutions (Safety and Security) Ltd.", /* 33744 */ "College for Creative Studies", /* 33745 */ "imagine that", /* 33746 */ "OnlineOK", /* 33747 */ "Wilcox Technologies", /* 33748 */ "VoLGA Forum", /* 33749 */ "Iritel A.D. Beograd", /* 33750 */ "OBEJ di Galantini Andrea", /* 33751 */ "Gen-Z Technologies inc.", /* 33752 */ "Beijing CircLoop Digital Image Tech.Co.,Ltd", /* 33753 */ "Duelco A/S, Denmark", /* 33754 */ "www.capad.de", /* 33755 */ "keimatsu.com", /* 33756 */ "Oblong Industries, Inc.", /* 33757 */ "Inquinox, LLC", /* 33758 */ "Golden Micro Systems Corporation", /* 33759 */ "Ministerstvo Finansov Chelyabinskoy oblasti", /* 33760 */ "OptimSys, s.r.o.", /* 33761 */ "Global Display Solutions SpA", /* 33762 */ "AD Holdings plc", /* 33763 */ "I-bridge B.V.", /* 33764 */ "Sapienza Consulting Ltd", /* 33765 */ "panagenda GmbH", /* 33766 */ "Korean Broadcasting System (KBS)", /* 33767 */ "Beijing ZhonghongLida Technology Development Co., Ltd.", /* 33768 */ "Universidad de La Habana", /* 33769 */ "Telcom Research", /* 33770 */ "Academy Consult München e.V.", /* 33771 */ "The Portalus Group", /* 33772 */ "Weather Kat", /* 33773 */ "Pyro Networks", /* 33774 */ "Moscow Metering Company", /* 33775 */ "Orca Interactive LTD", /* 33776 */ "Cadmos microsystems S.r.l.", /* 33777 */ "TIKLA tv", /* 33778 */ "Stefan Seelmann", /* 33779 */ "Grosvenor Technology Ltd.", /* 33780 */ "FreeKey::Labs s.l.", /* 33781 */ "Pictage, Inc.", /* 33782 */ "Chinarainbow Technology CO.,LTD", /* 33783 */ "AvFinity, L.L.C.", /* 33784 */ "La Salle University", /* 33785 */ "Iquall S.A.", /* 33786 */ "KaHo Sint Lieven", /* 33787 */ "juris GmbH", /* 33788 */ "Medical IT", /* 33789 */ "InFocus Corporation", /* 33790 */ "XelNet", /* 33791 */ "Noisebridge", /* 33792 */ "inviCRO, LLC", /* 33793 */ "Myungmin Systems, Inc.", /* 33794 */ "SOLIT Information Security", /* 33795 */ "ROMTELECOM S.A.", /* 33796 */ "ESRI Portugal", /* 33797 */ "Suefke Softwareentwicklung", /* 33798 */ "LinkSat", /* 33799 */ "CARFAX INC", /* 33800 */ "Colorquick, LLC", /* 33801 */ "Xensor Systems Incorporated", /* 33802 */ "Manor AG", /* 33803 */ "Chrisalys", /* 33804 */ "Peak Drive Solutions Ltd", /* 33805 */ "UTILISE IT LIMITED", /* 33806 */ "Internexo Ltda.", /* 33807 */ "Jim Montague Software LLC", /* 33808 */ "Topomaro", /* 33809 */ "Masterhost, CJSC", /* 33810 */ "Idendego Inc.", /* 33811 */ "Goodus, Inc.", /* 33812 */ "Invenso", /* 33813 */ "IProNet Sistemas, S.A.", /* 33814 */ "Archean Technologies", /* 33815 */ "PROFILAX, s.r.o.", /* 33816 */ "CopyKnight Technologies Ltd", /* 33817 */ "asco", /* 33818 */ "StreetGeek", /* 33819 */ "DECOIT GmbH", /* 33820 */ "Proliphix, Inc.", /* 33821 */ "Computer Task Group, Inc.", /* 33822 */ "comspace GmbH & Co. KG", /* 33823 */ "Spirent Communications of Rockville, Inc.", /* 33824 */ "ECHO KEISOKUKI Co.,Ltd.", /* 33825 */ "Lutong Network Technology Co., ltd", /* 33826 */ "Dan Hirsch", /* 33827 */ "NTT Plala Inc.", /* 33828 */ "Novel Communication Co., LTD.", /* 33829 */ "One97 Communication (P) Limited", /* 33830 */ "noFilis AutoID GmbH", /* 33831 */ "Biologische Heilmittel Heel GmbH", /* 33832 */ "Nettare Srl", /* 33833 */ "Salford", /* 33834 */ "REGS DE CATALUNYA, S.A.", /* 33835 */ "Alliaria, S.L.", /* 33836 */ "GESTIÓ D'INFRAESTRUCTURES, S.A.", /* 33837 */ "Voxline Contact Center", /* 33838 */ "CONFESOL", /* 33839 */ "LEDZGO", /* 33840 */ "ArenaNet", /* 33841 */ "SIBIO", /* 33842 */ "ProIS d.o.o.", /* 33843 */ "Blastwave.org, Inc.", /* 33844 */ "Microlab Snc", /* 33845 */ "DISA CSD MONTGOMERY", /* 33846 */ "maXan Pty Ltd", /* 33847 */ "Hot Solder Ltd", /* 33848 */ "Universidad Autónoma de Colombia", /* 33849 */ "Capgemini Spain SLU", /* 33850 */ "Combilent A/S", /* 33851 */ "Tractis", /* 33852 */ "\"STM\" Co., Ltd", /* 33853 */ "RP Compounds GmbH", /* 33854 */ "ADVtools", /* 33855 */ "Ansgar Jonietz", /* 33856 */ "SECONS s.r.o.", /* 33857 */ "Aveco s.r.o.", /* 33858 */ "JRD", /* 33859 */ "The Insitu Group", /* 33860 */ "CONGUIDE", /* 33861 */ "Large Binocular Telescope Observatory", /* 33862 */ "Mantaro Networks, Inc.", /* 33863 */ "Praktiker Services GmbH", /* 33864 */ "Atukorala Holdings Ltd.", /* 33865 */ "Lionic Corp.", /* 33866 */ "Infrascape Technologies Limited", /* 33867 */ "DOSIsoft", /* 33868 */ "Kompas Xnet d.o.o.", /* 33869 */ "EXXOSS S.P.R.L.", /* 33870 */ "ZIBImed GmbH", /* 33871 */ "Alpha Technologies, Inc.", /* 33872 */ "ARC Créations", /* 33873 */ "Novita", /* 33874 */ "National Bank of Ukraine", /* 33875 */ "Van Hameren ICT diensten", /* 33876 */ "Publications Office", /* 33877 */ "Children's Miracle Network", /* 33878 */ "Global IT Bilisim Hizmetleri Ltd.", /* 33879 */ "Isca Networks Corporation Ltd", /* 33880 */ "ETM Electromatic Inc.", /* 33881 */ "Four Color Studio", /* 33882 */ "The Bank of Lithuania", /* 33883 */ "NSG", /* 33884 */ "Abhineet Singh Chauhan", /* 33885 */ "UNICEF", /* 33886 */ "Integrasul Solucoes em Informatica Ltda.", /* 33887 */ "Aqua Cooler Pty Ltd", /* 33888 */ "Do-Style,INC.", /* 33889 */ "KUB Ltd.", /* 33890 */ "goettert.net Internet Service", /* 33891 */ "Be IP s.a.", /* 33892 */ "Specialized Information Systems Ltd.", /* 33893 */ "Aulofée", /* 33894 */ "The Joint Commission", /* 33895 */ "DDO Organisation sarl", /* 33896 */ "GSA", /* 33897 */ "Synovel Software Technologies Pvt. Ltd.", /* 33898 */ "rahmn.com, llc", /* 33899 */ "Next Level Security Systems, Inc.", /* 33900 */ "ezwww.ch", /* 33901 */ "Tiju Paul", /* 33902 */ "nenunic", /* 33903 */ "Sergei Butakov", /* 33904 */ "iVoltaire.org", /* 33905 */ "WANTS Inc.", /* 33906 */ "SECURITAS DIRECT ESPAÑA S.A.U.", /* 33907 */ "Seowonintech Co., Ltd", /* 33908 */ "Open Joint Stock Company Belvnesheconombank", /* 33909 */ "BSN Medical GmbH", /* 33910 */ "Cerillion Technologies Limited", /* 33911 */ "FULLSEE Electronics Co., Ltd. Beijing", /* 33912 */ "ClusterDB.com", /* 33913 */ "Monmouth Telecom", /* 33914 */ "Middle East Number Thirteen -Financial Services", /* 33915 */ "Freeman Decorating Services, Inc.", /* 33916 */ "Intact Financial Corporation", /* 33917 */ "Top Producer Systems", /* 33918 */ "ImmediaTV Corporation", /* 33919 */ "DLT Limited", /* 33920 */ "Molowa", /* 33921 */ "Byzoro Networks Ltd.", /* 33922 */ "Axione", /* 33923 */ "Ebor Computing Pty Ltd", /* 33924 */ "Progetto 3000 srl", /* 33925 */ "buzzword.org.uk", /* 33926 */ "Cambridge Leaning Center", /* 33927 */ "Ibuildings", /* 33928 */ "Universitat Jaume I", /* 33929 */ "Contineo Systems", /* 33930 */ "IK-TECH", /* 33931 */ "MEDIACAST CO., LTD.", /* 33932 */ "QOX,Inc", /* 33933 */ "XenData Limited", /* 33934 */ "RedFox Communications Ltd", /* 33935 */ "Sentilla Corporation", /* 33936 */ "LinuxBox.cz", /* 33937 */ "Ordina", /* 33938 */ "Bolt Court Consulting", /* 33939 */ "Wuhan Hongxin Telecommunication Technologies Co.,Ltd", /* 33940 */ "Business Logic Systems", /* 33941 */ "NakedApe", /* 33942 */ "Faculty of Electrical Engineering Banja Luka", /* 33943 */ "Compower Systems Inc.", /* 33944 */ "OHO Interactive", /* 33945 */ "Vencomm", /* 33946 */ "MAGICONLINE", /* 33947 */ "Azienda USL Ferrara", /* 33948 */ "Geotech Ltda", /* 33949 */ "Zilogic Systems Pvt. Ltd.", /* 33950 */ "taunusstein.net", /* 33951 */ "ZimZahm Productions", /* 33952 */ "DLT Limited", /* 33953 */ "International School of Beijing", /* 33954 */ "Better Place", /* 33955 */ "Oversun", /* 33956 */ "NCHOVY Inc.", /* 33957 */ "Skytap", /* 33958 */ "The Egyptian Company for Networks and Computer Security Services", /* 33959 */ "Nordnet AB", /* 33960 */ "enCentro Systems Inc", /* 33961 */ "icuetv", /* 33962 */ "OCCN Ltd.", /* 33963 */ "ParaVolve Development Corporation", /* 33964 */ "R-DATA Sp. z o.o.", /* 33965 */ "FUNAI ELECTRIC CO., LTD.", /* 33966 */ "The Now Factory", /* 33967 */ "Puleo Electronics Inc.", /* 33968 */ "Canfield Research Group", /* 33969 */ "TradeHelm, Inc.", /* 33970 */ "VanceInfo Technologies Inc.", /* 33971 */ "RFPA", /* 33972 */ "Net Entertainment NE AB", /* 33973 */ "Agency.com", /* 33974 */ "GnomishThoughts", /* 33975 */ "HackThisSite", /* 33976 */ "BLIP", /* 33977 */ "YAGI ANTENNA INC.", /* 33978 */ "Hong Kong Trade Development Council", /* 33979 */ "DDB Link", /* 33980 */ "Tek-Ops.com", /* 33981 */ "New Internet Technologies Sp. z o. o.", /* 33982 */ "Total Tel International Pty Ltd", /* 33983 */ "Spark::red LLC", /* 33984 */ "MigraTech", /* 33985 */ "Universidade Federal de Pernambuco", /* 33986 */ "Lakstins Family, LLC", /* 33987 */ "Comm.SEC di Valter Foresto", /* 33988 */ "Hyette S.A.", /* 33989 */ "Cassandra Research Center", /* 33990 */ "Beaumaris Networks", /* 33991 */ "Louisiana Community and Technical College System", /* 33992 */ "Coalinga State Hospital", /* 33993 */ "Nei til EU", /* 33994 */ "Pixip.net Gmbh", /* 33995 */ "Diateam", /* 33996 */ "OneMedNet Corporation", /* 33997 */ "Agily Networks Inc.", /* 33998 */ "Xiangmin Technology Co.,Ltd", /* 33999 */ "BYNE", /* 34000 */ "ingrifo", /* 34001 */ "WriteX ltd", /* 34002 */ "AdRiver", /* 34003 */ "PETROFAC INT LTD", /* 34004 */ "Community Technology", /* 34005 */ "Number Kuus Konsultatsioonid OÜ", /* 34006 */ "SKYSOFT ATM", /* 34007 */ "Tech Mahindra", /* 34008 */ "YGOMI Europe Ltd.", /* 34009 */ "Paraflux, Inc.", /* 34010 */ "Donet, Inc.", /* 34011 */ "Internet Doorway, Inc.", /* 34012 */ "CBTS", /* 34013 */ "B1 Systems GmbH", /* 34014 */ "Pinghu Feihong Technology Co.,LTD", /* 34015 */ "management of procurement for state needs of Krasnodar Region", /* 34016 */ "telecommunication software gmbh", /* 34017 */ "MAC GUFF LIGNE", /* 34018 */ "Agrokor", /* 34019 */ "OpenHTTPD", /* 34020 */ "Hosteam", /* 34021 */ "ITG SOLUTIONS S.A.C.", /* 34022 */ "zumbi", /* 34023 */ "Department of Homeland Security", /* 34024 */ "Accelerated Data LLC", /* 34025 */ "Alphalink", /* 34026 */ "Qumu, Inc.", /* 34027 */ "Idaho Power Company", /* 34028 */ "TLSPU", /* 34029 */ "metatux.net", /* 34030 */ "ViewStor Pty Ltd", /* 34031 */ "Amateur Radio Club (ARC) ITB", /* 34032 */ "Unix Linux Authority Kft", /* 34033 */ "Active Web Solutions Ltd", /* 34034 */ "IPsoTV", /* 34035 */ "Benchmark Group", /* 34036 */ "European Nazarene College", /* 34037 */ "USGN", /* 34038 */ "Conversant Solutions Pte Ltd", /* 34039 */ "OrgLDAP Project", /* 34040 */ "unattended-gui", /* 34041 */ "T-Mobile Hrvatska d.o.o.", /* 34042 */ "Suffolk University ITS", /* 34043 */ "Adesta LLC", /* 34044 */ "Vex", /* 34045 */ "Midwatch Systems Inc.", /* 34046 */ "THENEWPASTAWAVE.COM", /* 34047 */ "Novell Consulting Ukraine Ltd", /* 34048 */ "Spirtech", /* 34049 */ "Cloudhopper, Inc.", /* 34050 */ "Universidade Estadual de Ponta Grossa", /* 34051 */ "Mount Desert Island Biological Laboratory", /* 34052 */ "Associação Hospitalar Santa Rosália", /* 34053 */ "Australian Nursing Federation", /* 34054 */ "Vietnam National University, Hanoi", /* 34055 */ "Tranquil Hosting", /* 34056 */ "Beehive Security", /* 34057 */ "Babicom", /* 34058 */ "NII \"Vektor\"", /* 34059 */ "Nexgen Technologies", /* 34060 */ "COS-CRPF", /* 34061 */ "Mosart Medialab AS", /* 34062 */ "Hyves / StartPhone Ltd", /* 34063 */ "Böcherer Angewandte Informatik", /* 34064 */ "Ricoh Europe PLC", /* 34065 */ "Interpublic Group of Companies, Inc.", /* 34066 */ "OWVAT", /* 34067 */ "GAI-Tronics Corporation", /* 34068 */ "Information Security Services Association", /* 34069 */ "TeachMKs", /* 34070 */ "Hearst Communications Inc.", /* 34071 */ "NBEE Embedded Systems S.L.", /* 34072 */ "ISS", /* 34073 */ "IDP Co.,Ltd.", /* 34074 */ "Deltatec - Tecnologia de Sistemas Lda", /* 34075 */ "Datakom Ltd", /* 34076 */ "BRVZ Bau- Rechen und Verwaltungszentrum GmbH", /* 34077 */ "Informtekhnika & Communication, LLC", /* 34078 */ "Axios Systems", /* 34079 */ "rtCamp Solutions Pvt. Ltd.", /* 34080 */ "INSYS Microelectronics GmbH", /* 34081 */ "CitySync Limited", /* 34082 */ "Erayd LTD", /* 34083 */ "Universidade Federal de Juiz de Fora", /* 34084 */ "AWeber Communications, Inc.", /* 34085 */ "Talari Networks", /* 34086 */ "Ultra Electronics, Nuclear Sensors & Process Instrumentation", /* 34087 */ "Visioneer Inc", /* 34088 */ "Newport Electronics, Inc.", /* 34089 */ "TFB Technology Ltd.", /* 34090 */ "Benchlabs Limited", /* 34091 */ "MyMail PLC", /* 34092 */ "UAB Profimus", /* 34093 */ "Fanamoj (JSC)", /* 34094 */ "Gymnazium Jaroslava Seiferta", /* 34095 */ "Trilogical", /* 34096 */ "Racktivity", /* 34097 */ "farbwahl GbR", /* 34098 */ "Palestine Polytechnic University", /* 34099 */ "Tompkins Cortland Community College", /* 34100 */ "Aimetis Corp", /* 34101 */ "Perversia Networking", /* 34102 */ "BV-Tech S.p.A.", /* 34103 */ "Ceton Corp", /* 34104 */ "Local Website Consulting", /* 34105 */ "TESCOMA s.r.o.", /* 34106 */ "SELEX ES LTD", /* 34107 */ "IAM Solutions GmbH & Co. KG", /* 34108 */ "G&G Fitness Equipment Inc.", /* 34109 */ "Code Blue Corporation", /* 34110 */ "Confamiliares de Caldas", /* 34111 */ "NetServe365", /* 34112 */ "CertifiCall", /* 34113 */ "Mitchell International", /* 34114 */ "NIW Solutions", /* 34115 */ "EhangCommucation & Technology Ltd.", /* 34116 */ "Information System Products Co.,Ltd.", /* 34117 */ "HL komm Telekommunikations GmbH", /* 34118 */ "Max Planck Institute for Human Cognitive and Brain Sciences", /* 34119 */ "Laketec Communications Inc.", /* 34120 */ "Alias", /* 34121 */ "Retrix Hosting, Inc.", /* 34122 */ "Akitogo Internet and Media Applications GmbH", /* 34123 */ "Digital Measures", /* 34124 */ "Beyond Semiconductor", /* 34125 */ "Infocon S. A.", /* 34126 */ "Allgemeiner Deutscher Fahrrad-Club Landesverband Nordrhein-Westfalen e.V.", /* 34127 */ "Fabri", /* 34128 */ "TUBITAK BILGEM BTE", /* 34129 */ "ALCEA", /* 34130 */ "United In Song", /* 34131 */ "Cash America International, Inc.", /* 34132 */ "Safety Vision, L.P.", /* 34133 */ "OpenTTD", /* 34134 */ "Forever Home Improvement", /* 34135 */ "VeNMSOL Technologies", /* 34136 */ "Athens Wireless Metropolitan Network (AWMN)", /* 34137 */ "CER FRANCE POITOU-CHARENTES", /* 34138 */ "Vasista Systems Inc", /* 34139 */ "MAISONNEUVE Informatique", /* 34140 */ "EXPRESS", /* 34141 */ "Bank of Thailand", /* 34142 */ "Netrounds Solutions AB", /* 34143 */ "Böhler Edelstahl GmbH & CoKG", /* 34144 */ "Károly Róbert College, Gyöngyös, Hungary", /* 34145 */ "Telogic Ltd.", /* 34146 */ "MANGO", /* 34147 */ "PRESENSE Technologies GmbH", /* 34148 */ "IMATRIX Corp.", /* 34149 */ "Syndicat IT & Internet", /* 34150 */ "Peppe-Certification", /* 34151 */ "esd electronic system design gmbh", /* 34152 */ "Päivölän Kansanopisto", /* 34153 */ "Texprezzo Group BV", /* 34154 */ "Tendril Networks", /* 34155 */ "Orel Analytics", /* 34156 */ "Instituto Nacional de Matemática Pura e Aplicada", /* 34157 */ "Gouvernement de la Polynésie Française", /* 34158 */ "Pelican Engineering, Inc.", /* 34159 */ "Certichron Inc", /* 34160 */ "CUSI(China unicom system integration limited corporation)", /* 34161 */ "Symplified Inc.", /* 34162 */ "LogPatrol", /* 34163 */ "Fubra Limited", /* 34164 */ "Convergence CT, Inc.", /* 34165 */ "Stellar Switches, Inc.", /* 34166 */ "Power Admin LLC", /* 34167 */ "Richer link co.ltd", /* 34168 */ "Northsun.net", /* 34169 */ "TTK S.A.S.", /* 34170 */ "Wingpath Ltd.", /* 34171 */ "Fixme Internet-käyttäjät ry", /* 34172 */ "PD Software s.r.o.", /* 34173 */ "FastOnlinePM", /* 34174 */ "Advanced Navigation & Positioning Corporation", /* 34175 */ "Hedgehog Oy Ltd", /* 34176 */ "Bond Technical Management", /* 34177 */ "Paragon Electronic Design Limited", /* 34178 */ "Inland Revenue Department of Sri Lanka", /* 34179 */ "Photop Technologies, Inc.", /* 34180 */ "DARSHAN DUDHORIA", /* 34181 */ "Area SX", /* 34182 */ "Global Data Logistix (Pty) Ltd", /* 34183 */ "Universität Hohenheim", /* 34184 */ "EBANK ONLINE (BEIJING) TECHNOLOGY Co., LTD", /* 34185 */ "TEAMCAST", /* 34186 */ "WAGNER Group GmbH", /* 34187 */ "Klocktornet AB", /* 34188 */ "Max Planck Institute for the science of light", /* 34189 */ "SSCANRFK54425", /* 34190 */ "Human Factors International", /* 34191 */ "Sikjur", /* 34192 */ "McKinney Identity Management Solutions, LLC", /* 34193 */ "Jerusalem College of Technology", /* 34194 */ "ZID, Vienna University of Technology", /* 34195 */ "Catchy.net BV", /* 34196 */ "EXANE", /* 34197 */ "Pragmatic Source SARL", /* 34198 */ "West Virginia University", /* 34199 */ "Planet-Work", /* 34200 */ "Neuberger Berman", /* 34201 */ "Thing in the Corner Enterprises, LLC", /* 34202 */ "TrustAlert", /* 34203 */ "Netweb Technologies", /* 34204 */ "Altrusoft AB", /* 34205 */ "Penguin Solutions", /* 34206 */ "tmira solutions", /* 34207 */ "Telefin S.p.A.", /* 34208 */ "Vamed Management und Service GmbH & CO KG", /* 34209 */ "Evangelische Kirche von Kurhessen-Waldeck", /* 34210 */ "Hanil Display", /* 34211 */ "Function International", /* 34212 */ "ooVoo, LLC", /* 34213 */ "ACEnet", /* 34214 */ "Acksen Ltd", /* 34215 */ "Izmir University Of Economics", /* 34216 */ "SKY Network Television Ltd", /* 34217 */ "DEW Industrial Electronics (Pty) Ltd, t/a SOS Industrial Electronics", /* 34218 */ "wer-kennt-wen.de", /* 34219 */ "CreAim B.V.", /* 34220 */ "TELEFRANG AB", /* 34221 */ "SOLTENLAR, S. L.", /* 34222 */ "chaos Studio", /* 34223 */ "OpenSpirit S.A.", /* 34224 */ "S30LABS IT ADVANCED SYSTEMS", /* 34225 */ "EION Inc", /* 34226 */ "Software Machine S.r.l.", /* 34227 */ "Radialpoint SafeCare General Partnership", /* 34228 */ "Codewalker Solutions", /* 34229 */ "GCI Science & Technology Co. ,Ltd.", /* 34230 */ "Open Cobalt Project", /* 34231 */ "Lucian-Alexandru Stanescu", /* 34232 */ "Kruger", /* 34233 */ "Land Srl", /* 34234 */ "Cork IT", /* 34235 */ "Pixie", /* 34236 */ "AssureTec Systems, Inc.", /* 34237 */ "NewsWatch, Inc.", /* 34238 */ "Innovating Distributed Systems S.L.", /* 34239 */ "DARS d.d.", /* 34240 */ "Competella AB", /* 34241 */ "PerspecSys Inc.", /* 34242 */ "Rob Sims", /* 34243 */ "Media Capital - Editora Multimedia S.A.", /* 34244 */ "Circle Software Group B.V.", /* 34245 */ "Hacktor", /* 34246 */ "Stationtostation", /* 34247 */ "Cykor Systems Ltd", /* 34248 */ "Triada d.o.o.", /* 34249 */ "Arkadin", /* 34250 */ "FREESTONE INTERNATIONAL GROUP LIMITED", /* 34251 */ "XPS ELETRÔNICA LTDA", /* 34252 */ "VIAFIRMA, S.L.", /* 34253 */ "Savannah Networks LLC", /* 34254 */ "Corner Bowl Software Corporation", /* 34255 */ "HUMICOM co,. ltd", /* 34256 */ "Defense Systems Group, NTT DATA Corporation", /* 34257 */ "Otip Office", /* 34258 */ "The State Higher School of Vocational Education in Elblag", /* 34259 */ "Apttsoft", /* 34260 */ "MeVis Medical Solutions AG", /* 34261 */ "Joinville Eau Vive", /* 34262 */ "picoChip Designs Ltd", /* 34263 */ "I.C.E. Logic Ltd.", /* 34264 */ "OMNITECH SECURITY", /* 34265 */ "Unochapeco", /* 34266 */ "Swedbank AB", /* 34267 */ "Martin Luther College", /* 34268 */ "SLA Corporation", /* 34269 */ "Bamag GmbH", /* 34270 */ "Geomidi Informatica Ltda.", /* 34271 */ "JSC NCC", /* 34272 */ "TMNS B.V.", /* 34273 */ "Sipwise GmbH", /* 34274 */ "Boyne Resorts", /* 34275 */ "Signaturgruppen A/S", /* 34276 */ "Jens Meißner", /* 34277 */ "Janitza electronics GmbH", /* 34278 */ "JoutCon Oy", /* 34279 */ "Metva", /* 34280 */ "Taiwan Dichen Co, Ltd.", /* 34281 */ "MEON-yamaguchi", /* 34282 */ "CA-Jinchen Software Co.,Ltd", /* 34283 */ "Elisa Oyj", /* 34284 */ "S.C. DigiSign S.A.", /* 34285 */ "Feusi Bildungszentrum AG", /* 34286 */ "Raiffeisen Bank Kosovo JSC", /* 34287 */ "Centralna banka Crne Gore", /* 34288 */ "IRE Rayos X S.A.", /* 34289 */ "RS2i", /* 34290 */ "xrow GmbH", /* 34291 */ "Spring Street Storage", /* 34292 */ "Coyote Creek", /* 34293 */ "C-Cron GmbH", /* 34294 */ "Dalian Gigatec Electronics Co.,Ltd", /* 34295 */ "Dalian Maritime University", /* 34296 */ "Mobistar sa/nv", /* 34297 */ "ConteXtream", /* 34298 */ "Datavalet Technologies Inc.", /* 34299 */ "Croix Rouge Francaise", /* 34300 */ "NEON, Inc.", /* 34301 */ "NetIntegrate Solutions Inc", /* 34302 */ "Skyline Network Engineering", /* 34303 */ "Feynman Group, Inc.", /* 34304 */ "Developing Solutions, Inc.", /* 34305 */ "Canodus", /* 34306 */ "Deckland", /* 34307 */ "Ford & Mason Ltd", /* 34308 */ "Archimedes Solutions GmbH", /* 34309 */ "UBINETSYS.CO., LTD.", /* 34310 */ "Data Net Solutions Group, Inc.", /* 34311 */ "Accanto Systems S.r.l.", /* 34312 */ "iDMS", /* 34313 */ "Datanomic Ltd.", /* 34314 */ "Broadband United GmbH", /* 34315 */ "PDSG", /* 34316 */ "Fabric Technologies", /* 34317 */ "iEARN-USA", /* 34318 */ "Inveneo Inc.", /* 34319 */ "Octo Wireless LLC", /* 34320 */ "ICP DAS Co., Ltd", /* 34321 */ "Hoojima Ltd", /* 34322 */ "Zolfo Cooper", /* 34323 */ "Ministry for Information Society of Montenegro", /* 34324 */ "Investec", /* 34325 */ "Nokia Technologies", /* 34326 */ "Farmacia Valentini", /* 34327 */ "Tmcpcorp", /* 34328 */ "DOCOMO interTouch", /* 34329 */ "Webyog Softworks Pvt Ltd", /* 34330 */ "Vilant Systems Oy", /* 34331 */ "Forex Club International Ltd", /* 34332 */ "Streamit BV", /* 34333 */ "Psylock GmbH", /* 34334 */ "Javahar Private Limited", /* 34335 */ "Shenzhen Meikai Electronics Co., Ltd.", /* 34336 */ "Batracomiomachia", /* 34337 */ "Bredbandstelefoni i Sverige AB", /* 34338 */ "Asesoría CTDATA", /* 34339 */ "hoip.org", /* 34340 */ "Globalinx", /* 34341 */ "Prime Creation Technology Limited", /* 34342 */ "Saint-Petersburg Industrial Joint-Stock Bank", /* 34343 */ "PNI Digital Media Inc.", /* 34344 */ "Bloodhound Technologies Inc", /* 34345 */ "Astral Media Radio inc.", /* 34346 */ "ATX Innovation, Inc.", /* 34347 */ "AKC Solutions", /* 34348 */ "miraclesoft beijing co.ltd", /* 34349 */ "Bingley Grammar School", /* 34350 */ "iseemedia Inc.", /* 34351 */ "Kamailio.ORG", /* 34352 */ "ClairMail", /* 34353 */ "CGS, LLC", /* 34354 */ "sol4.net", /* 34355 */ "Inepex Ltd.", /* 34356 */ "Plaid Tie Software", /* 34357 */ "Servicios técnico comerciales en Internet S.C.P", /* 34358 */ "Nucleus Connect Pte Ltd", /* 34359 */ "Silmor.de Projects", /* 34360 */ "Matrixware Information Services GmbH", /* 34361 */ "FH Aachen", /* 34362 */ "Illallangi Enterprises", /* 34363 */ "geinitz.info", /* 34364 */ "Beijing Eastcat Information Technology Company", /* 34365 */ "Erwin Peters Systemtechnik GmbH", /* 34366 */ "Fire Check Consultants Pty Ltd", /* 34367 */ "General Dynamics Mediaware", /* 34368 */ "NanoSoft AG", /* 34369 */ "Papier- und Kartonfabrik Varel GmbH & Co KG", /* 34370 */ "A1 Systems Ltd.", /* 34371 */ "Tubedale Limited", /* 34372 */ "ESCAUX", /* 34373 */ "Paki Shells Internet Services", /* 34374 */ "Mevio", /* 34375 */ "Automática y Regulación S.A.", /* 34376 */ "Locaweb Ltda", /* 34377 */ "q1cc.net", /* 34378 */ "Cheers Co.,Ltd", /* 34379 */ "Puppet Labs, Inc.", /* 34380 */ "Inixa - Security & Communication", /* 34381 */ "Bigdogs Bros & Co.", /* 34382 */ "INEX/ZAMIR", /* 34383 */ "Sipoon kunta", /* 34384 */ "Hinge Software Co.,Ltd.", /* 34385 */ "Intelligent Mechatronic Systems Inc.", /* 34386 */ "Component Engineering, Inc", /* 34387 */ "O'Reilly Automotive, Inc.", /* 34388 */ "Geofront", /* 34389 */ "BlackGinger", /* 34390 */ "Owens Corning", /* 34391 */ "3 Rivers Communications", /* 34392 */ "blau Mobilfunk GmbH", /* 34393 */ "Whiplashcentret", /* 34394 */ "OMESH Networks", /* 34395 */ "Metropolitan Government of Nashville & Davidson County", /* 34396 */ "Cloud Scope Technologies, Inc.", /* 34397 */ "LANCARD.COM inc,", /* 34398 */ "coravy. Ltd.", /* 34399 */ "Research electronics AB", /* 34400 */ "Studio Moderna d.o.o.", /* 34401 */ "Siskiyou County", /* 34402 */ "unseregedanken.de", /* 34403 */ "Unassigned", /* 34404 */ "City of Cape Town", /* 34405 */ "Generals Network, OZ", /* 34406 */ "nexus AG", /* 34407 */ "WANET s.r.o.", /* 34408 */ "Bebidas Gaseosas del Noroeste S.A.", /* 34409 */ "Foss-on-line", /* 34410 */ "Playtech Estonia OÜ", /* 34411 */ "Mutina Technology S.r.l.", /* 34412 */ "Global Substation Solutions Inc.", /* 34413 */ "Beijing Galaxy Golden Star Technology & Development Ltd.", /* 34414 */ "Superna Analytics Inc.", /* 34415 */ "Ottawa Area Intermediate School District", /* 34416 */ "eGestalt Technologies Pvt. Ltd.", /* 34417 */ "Santa Clara University", /* 34418 */ "Regis University", /* 34419 */ "Hochschule RheinMain - University of Applied Sciences", /* 34420 */ "Benoit Eletrodomesticos LTDA", /* 34421 */ "Kingley Health", /* 34422 */ "Jamtlands County Council - Sweden", /* 34423 */ "Lansen Technology", /* 34424 */ "Archant Limited", /* 34425 */ "Wind Telecomunicazioni S.p.a", /* 34426 */ "Czeh Consultants", /* 34427 */ "UAB Lema", /* 34428 */ "Less Rain GmbH", /* 34429 */ "www.fiber-space.de", /* 34430 */ "ForceFive AG", /* 34431 */ "Lescom AG", /* 34432 */ "UniControls a.s.", /* 34433 */ "HongTEC (BeiJing) Co., Ltd", /* 34434 */ "North Loop Networks", /* 34435 */ "TS-Associates plc", /* 34436 */ "Consequor Consulting AG", /* 34437 */ "DOHMEN, HERZOG & Partner GmbH", /* 34438 */ "West Virginia State University", /* 34439 */ "Velocix Limited", /* 34440 */ "NTT Basic Research Laboratories", /* 34441 */ "e-utile S.p.A.", /* 34442 */ "Narinet Inc.", /* 34443 */ "STS Studi Tecnologie Sistemi S.r.l.", /* 34444 */ "Capgemini Nederland B.V. ( Netherlands )", /* 34445 */ "Hasenohr Consulting", /* 34446 */ "Beijing Huoohuoo Technology Co., Ltd", /* 34447 */ "G-Bits Network Technology Co., Ltd.", /* 34448 */ "Laguna Ventures, Inc.", /* 34449 */ "JCNetwork e.V.", /* 34450 */ "OS3 srl", /* 34451 */ "EDV-Service Oliver Strucken", /* 34452 */ "OPT Tahiti", /* 34453 */ "VIS Visual Information Systems Limited", /* 34454 */ "Primex Family of Companies", /* 34455 */ "Dashwire, Inc.", /* 34456 */ "Rex Wheeler", /* 34457 */ "K.S.Transplaneta Ltd", /* 34458 */ "Network Box Corporation Ltd", /* 34459 */ "xplo.re IT Services", /* 34460 */ "Ithaxis", /* 34461 */ "init AG", /* 34462 */ "Corey Farrell", /* 34463 */ "Pragma Securities", /* 34464 */ "CyPace, Inc.", /* 34465 */ "polyformal System- & Formarbeit", /* 34466 */ "REPOTEC CO., LTD.", /* 34467 */ "Open Source Solution Technology Corporation", /* 34468 */ "LOGIT CORPORATION", /* 34469 */ "Institute of Cybernetics at Tallinn University of Technology", /* 34470 */ "Trust-iD BV", /* 34471 */ "Hogeschool van Amsterdam", /* 34472 */ "DOKOM Gesellschaft für Telekommunikation mbH", /* 34473 */ "ALT-LAN", /* 34474 */ "Polytronics Engineering Ltd.", /* 34475 */ "BIA-Net GmbH", /* 34476 */ "K & V spol. s r.o.", /* 34477 */ "CMS Hasche Sigle", /* 34478 */ "DWEB SOLUÇÕES PARA INTERNET", /* 34479 */ "iModules", /* 34480 */ "World Fuel Services", /* 34481 */ "Lambdazero IT", /* 34482 */ "Himalaya networks", /* 34483 */ "Toolio Systems", /* 34484 */ "R2Meton AB", /* 34485 */ "Hanno.dk", /* 34486 */ "Kemi Shipping Oy", /* 34487 */ "Kryptiq Corporation", /* 34488 */ "Nikon AG", /* 34489 */ "Teliwave Pte Ltd", /* 34490 */ "Almaz-Antey Telecom", /* 34491 */ "Aryaka Networks", /* 34492 */ "CPSG", /* 34493 */ "HSQ Technology", /* 34494 */ "Streetcar Ltd", /* 34495 */ "Cision US Inc.", /* 34496 */ "LinSec Consulting", /* 34497 */ "IRBIS-T", /* 34498 */ "Martin Merkel", /* 34499 */ "LAOLA1 Multimedia GmbH", /* 34500 */ "S. C. Null Team Impex SRL.", /* 34501 */ "Millikin University", /* 34502 */ "WMI Computer", /* 34503 */ "GuangZhou Comble Information Technology Co.,Ltd.", /* 34504 */ "SIEGNETZ-IT GmbH", /* 34505 */ "Twinfalls Technologies", /* 34506 */ "Safe Consulting AS", /* 34507 */ "Wyatt Tarrant & Combs LLP", /* 34508 */ "Portland State University", /* 34509 */ "Optimum Path Systems, Inc", /* 34510 */ "Trinity County Office of Education", /* 34511 */ "graphische Informationstechnik Beratungsgesellschaft mbH (grit)", /* 34512 */ "RMT INC", /* 34513 */ "Australian College of Remote and Rural Medicine", /* 34514 */ "Whitemice Consulting", /* 34515 */ "Network Applied Communication Laboratory", /* 34516 */ "Eastcom Systems Pte Ltd", /* 34517 */ "Movianto GmbH", /* 34518 */ "UK Border Agency", /* 34519 */ "Mudra Communications Pvt. Ltd.", /* 34520 */ "Comlink Telecommunication Services Inc", /* 34521 */ "Pinnacle Wireless", /* 34522 */ "BlueKrypt", /* 34523 */ "RIS2048, Lda", /* 34524 */ "Yesin.NET", /* 34525 */ "Techsologic", /* 34526 */ "Matrix Telecom Pvt. Ltd.", /* 34527 */ "SecureWare", /* 34528 */ "Iuniperus S.r.l.", /* 34529 */ "Netpioneer GmbH", /* 34530 */ "landofnever.net", /* 34531 */ "mkbdoos", /* 34532 */ "Compuvisor Lab", /* 34533 */ "Trimble MRM", /* 34534 */ "JetTek LLC", /* 34535 */ "fdXtended", /* 34536 */ "The Moses H. Cone Memorial Hospital", /* 34537 */ "s.a. D'Ieteren n.v.", /* 34538 */ "Netcom XXI Informatica y Comunicaciones, S.L.", /* 34539 */ "azeti Networks GmbH", /* 34540 */ "Bematech S.A.", /* 34541 */ "kindwind technological ltd.", /* 34542 */ "Susquehanna International Group", /* 34543 */ "Certant", /* 34544 */ "Cistera Networks", /* 34545 */ "RedZinc Ltd", /* 34546 */ "Talaris", /* 34547 */ "Badischer Landwirtschaftlicher Hauptverband e.V.", /* 34548 */ "University of Saskatchewan", /* 34549 */ "Austin Hughes Electronics Ltd.", /* 34550 */ "Zettacon Systems Inc.", /* 34551 */ "IP SQUARE Softwareerzeuger GmbH", /* 34552 */ "Spryware", /* 34553 */ "GrandPower", /* 34554 */ "Eurasian energy corporation JSC", /* 34555 */ "EDAN INSTRUMENTS CO., LTD.", /* 34556 */ "Ministerio de Justicia", /* 34557 */ "Unassigned", /* 34558 */ "Maschinenfabrik Reinhausen GmbH", /* 34559 */ "Marquise Technologies", /* 34560 */ "VITALATIV, s.r.o.", /* 34561 */ "FUHST MEHRENS", /* 34562 */ "Calame", /* 34563 */ "Hoseo telecom Co., Ltd.", /* 34564 */ "KVARTA Ltd.", /* 34565 */ "Tradar Limited", /* 34566 */ "Micronetics, Inc.", /* 34567 */ "Synectics", /* 34568 */ "KB \"Uniastrumbank\"", /* 34569 */ "Netdeep Tecnologia", /* 34570 */ "SIGNION SYSTEMS", /* 34571 */ "NARI-RELAYS Electric Co., Ltd.", /* 34572 */ "Finaf S.p.A", /* 34573 */ "Blackbit Studio", /* 34574 */ "Kent Imaging Inc.", /* 34575 */ "HS Emden/Leer", /* 34576 */ "Correlation Systems Ltd", /* 34577 */ "OpenNMS Sans Effort (OSE)", /* 34578 */ "SYM Technology, Inc.", /* 34579 */ "Need Solutions", /* 34580 */ "J3TEL", /* 34581 */ "Tuenti Technologies", /* 34582 */ "V-Private AG", /* 34583 */ "unterberg-electronic Gmbh", /* 34584 */ "REWE-Informations-Systeme GmbH", /* 34585 */ "Ontario Teachers Pension Plan Board", /* 34586 */ "Hiive Systems", /* 34587 */ "Beijing office of International Air Transport Association", /* 34588 */ "Adnovate", /* 34589 */ "Novus Produtos Eletronicos Ltda", /* 34590 */ "JSC Proryv-Komplekt", /* 34591 */ "Shenzhen C-Data Technology Co.,Ltd.", /* 34592 */ "Zhilabs", /* 34593 */ "Growing Opportunity Finance India Private Limited", /* 34594 */ "Xteam Network(Beijing) Co.,Ltd", /* 34595 */ "Casalogic A/S", /* 34596 */ "CADT Software and Drafting, S.L.", /* 34597 */ "Cable Sense Ltd", /* 34598 */ "3SI Security Systems NV", /* 34599 */ "TECSEM Tecnologia em Sistemas Embarcados", /* 34600 */ "MongoDB", /* 34601 */ "Bomgar Corporation", /* 34602 */ "Seria AS", /* 34603 */ "Fibernetics Corp", /* 34604 */ "SL Corporation", /* 34605 */ "Wayne RESA", /* 34606 */ "Newdaysoft Co., Ltd", /* 34607 */ "American Society for Microbiology", /* 34608 */ "Vine Telecom Co., Ltd", /* 34609 */ "Grand Future Beijing Info-Tech Co., Ltd.", /* 34610 */ "Berufsförderungswerk Oberhausen", /* 34611 */ "Alteris Sp. z o.o.", /* 34612 */ "iKron Ltd.", /* 34613 */ "Technocats GmbH", /* 34614 */ "Magyar Államkincstár / Hungarian State Treasury", /* 34615 */ "ActualWeb Soluciones Informaticas", /* 34616 */ "RCDevs", /* 34617 */ "Gruppo TNT S.r.l.", /* 34618 */ "3Dicom, S.L.", /* 34619 */ "Asuerus van Tuijl", /* 34620 */ "imacab", /* 34621 */ "Heimore Group AB", /* 34622 */ "USF1", /* 34623 */ "Tokavuh Technologies oy", /* 34624 */ "Actavis Group hf", /* 34625 */ "A-Real Consulting LLC", /* 34626 */ "Digifix Ltda", /* 34627 */ "Citrus Networks", /* 34628 */ "MP Advanced Multimedia", /* 34629 */ "Tigron BVBA", /* 34630 */ "Janelia Farm Research Campus/HHMI", /* 34631 */ "Cohort Technology Ltd", /* 34632 */ "norgie.net", /* 34633 */ "Graduate School of Education and Information Studies", /* 34634 */ "Pi-Systemprogrammierungs-GmbH", /* 34635 */ "Contact Center Compliance Corporation", /* 34636 */ "Revenue Solutions, Inc", /* 34637 */ "Memphis Network Service Ltd.", /* 34638 */ "Conformity Inc", /* 34639 */ "Nodnet", /* 34640 */ "Dimac Hosting AB", /* 34641 */ "Rugged Information Technology Equipment Corporation", /* 34642 */ "Garmin International", /* 34643 */ "Potomac & Bluebonnet Technolgy LLC", /* 34644 */ "Adael Wireless SARL", /* 34645 */ "HellermannTyton Data Ltd", /* 34646 */ "KAMOME Engineering, Inc.", /* 34647 */ "The-Box Development", /* 34648 */ "netvisiontel", /* 34649 */ "P2Cache Pte Ltd", /* 34650 */ "agama co,ltd", /* 34651 */ "IPF Technology Ltd", /* 34652 */ "Irisys", /* 34653 */ "La Gentz KG", /* 34654 */ "Berthold Boeser Ingenieurbuero", /* 34655 */ "ATS, Applicazione Tecnologie Speciali", /* 34656 */ "Seifert mtm Systems (Malta) Ltd.", /* 34657 */ "Sysadmins LV", /* 34658 */ "EPLAN Software & Service GmbH & Co. KG", /* 34659 */ "SIA Datu Sistemas", /* 34660 */ "Islandsbanki", /* 34661 */ "Ajuntament de Sant Adria de Besos", /* 34662 */ "Lavinia Interactiva", /* 34663 */ "Trident Micro Systems", /* 34664 */ "ENTEL S.A. BOLIVIA", /* 34665 */ "Lava Business Solutions", /* 34666 */ "DSP LABS S.r.l.", /* 34667 */ "Koine Servizi S.r.l.", /* 34668 */ "Encarnate, LLC", /* 34669 */ "Scott Shen", /* 34670 */ "Anoop Aryal", /* 34671 */ "MicroAqua Network system", /* 34672 */ "The FreeDHCP Project", /* 34673 */ "FLIR Systems, Inc.", /* 34674 */ "blackcase.pl", /* 34675 */ "Vox Telecom", /* 34676 */ "informationpartners GmbH & Co. KG", /* 34677 */ "Anticept", /* 34678 */ "forcont business technology gmbh", /* 34679 */ "RUAG Holding AG", /* 34680 */ "DATAGROUP IT Services Holding AG", /* 34681 */ "ATP Management & Technology s.r.l.", /* 34682 */ "Seacliff Associates, LLC", /* 34683 */ "Rosado Beheer BV", /* 34684 */ "Accipiter Systems, Inc.", /* 34685 */ "Sunet Technology LLC", /* 34686 */ "Gale", /* 34687 */ "King Abdullah University of Science and Technology", /* 34688 */ "Tekron International Ltd", /* 34689 */ "National Gypsum Company", /* 34690 */ "EON Co.,Ltd", /* 34691 */ "DICOM Grid, Inc", /* 34692 */ "Netsoft Lund Development AB", /* 34693 */ "eleven GmbH", /* 34694 */ "EXTENSION, Inc.", /* 34695 */ "RIOD Technologies", /* 34696 */ "AfirmTrust, LLC", /* 34697 */ "Studio Caccia", /* 34698 */ "France Développement Conseil", /* 34699 */ "Beijing Hongdexin Information Technology Co, Ltd.", /* 34700 */ "BTCentral", /* 34701 */ "Parity Energy Inc.", /* 34702 */ "Stefan Sieber", /* 34703 */ "H. Lundbeck A/S", /* 34704 */ "ZAO GU NPO \"Stroytechautomatika\"", /* 34705 */ "Aprius Inc.", /* 34706 */ "Centro Federal de Educação Tecnológica de Minas Gerais", /* 34707 */ "Etrafficers, Inc.", /* 34708 */ "Lightner Engineering", /* 34709 */ "Advance Communication Technologies", /* 34710 */ "Jamaica Broilers Group", /* 34711 */ "Fujian Newland Auto-ID Tech. Co., Ltd.", /* 34712 */ "lc4ever.net", /* 34713 */ "OCULUS Optikgeräte GmbH", /* 34714 */ "ITVT GmbH", /* 34715 */ "Vizimax Inc.", /* 34716 */ "bhold", /* 34717 */ "FUENSO", /* 34718 */ "Cronon AG", /* 34719 */ "mFoundry", /* 34720 */ "Magyar Waldorf Szövetség / Hungarian Waldorf Fellowship", /* 34721 */ "FastSoft, Inc.", /* 34722 */ "Conxx", /* 34723 */ "netInsight ITLabs", /* 34724 */ "Vasc-Alert", /* 34725 */ "Works Systems", /* 34726 */ "Burda Digital Systems GmbH", /* 34727 */ "INSA de Lyon", /* 34728 */ "OOO PS Yandex.Dengi", /* 34729 */ "FRANCILIENNE D'INGENIERIE ET DE SERVICES INFORMATIQUES SAS", /* 34730 */ "Sloan Valve Company", /* 34731 */ "Spb Software Inc.", /* 34732 */ "Zinnia Systems", /* 34733 */ "University of Macerata", /* 34734 */ "Cellfish", /* 34735 */ "Universidade Estadual Vale do Acaraú - UVA", /* 34736 */ "CIMNE", /* 34737 */ "MassiveSolutions Ltd", /* 34738 */ "lihnidos.org", /* 34739 */ "University of Ottawa", /* 34740 */ "Binet Réseau", /* 34741 */ "LevelMobile, Inc.", /* 34742 */ "Teleperformance", /* 34743 */ "QC Technology B.V.", /* 34744 */ "METADYS", /* 34745 */ "Kevinsnet Limited", /* 34746 */ "Infineta Systems, Inc", /* 34747 */ "Twitter, Inc.", /* 34748 */ "SubscriberMail, LLC", /* 34749 */ "Truenorthlogic", /* 34750 */ "Shanghai Meridian Technologies, Co. Ltd.", /* 34751 */ "ITDiv.com", /* 34752 */ "OnTime Networks AS", /* 34753 */ "PowerTrunk Inc.", /* 34754 */ "Res Ingenium s.r.l.", /* 34755 */ "Inoa", /* 34756 */ "Gorilla Concept GmbH", /* 34757 */ "Univerza v Ljubljani", /* 34758 */ "Thames Valley Police", /* 34759 */ "AMiT s.r.o.", /* 34760 */ "SSC-IT", /* 34761 */ "DartIT", /* 34762 */ "People Power Company", /* 34763 */ "ProStructure Consulting", /* 34764 */ "forVNs Group", /* 34765 */ "Invities", /* 34766 */ "ISPIN AG", /* 34767 */ "S+P LION AG", /* 34768 */ "ACORDE TECHNOLOGIES", /* 34769 */ "Cardiff University", /* 34770 */ "Altmann Software", /* 34771 */ "Automat Limited", /* 34772 */ "Hx Engineering, LLC", /* 34773 */ "Huawei Symantec Technologies Co.,Ltd", /* 34774 */ "Canford Software Consultancy Limited", /* 34775 */ "TODO BPO E SOLUCOES EM TECNOLOGIA S.A.", /* 34776 */ "Capek Consulting", /* 34777 */ "American Customer Care, Inc.", /* 34778 */ "DeltaGlobal Co. LTD", /* 34779 */ "IT One", /* 34780 */ "Unassigned", /* 34781 */ "dcm4che.org", /* 34782 */ "Gordian Knot Limited", /* 34783 */ "Hurtig DataComm", /* 34784 */ "University of Craiova", /* 34785 */ "Hartwick Services", /* 34786 */ "Sunflower Broadband", /* 34787 */ "Ministerio de Hacienda de El Salvador", /* 34788 */ "Northgate Information Solutions PLC", /* 34789 */ "Vtkom d.o.o.", /* 34790 */ "Centre Hospitalier de Péronne", /* 34791 */ "Gouvernement de Nouvelle-Caledonie", /* 34792 */ "Azblink", /* 34793 */ "JSC Commercial Bank \"Center-invest\"", /* 34794 */ "DATA-PKS Ltd.", /* 34795 */ "MBS GmbH", /* 34796 */ "AM-GmbH", /* 34797 */ "Tribunal Regional Eleitoral do Maranhão", /* 34798 */ "ACTi Corporation", /* 34799 */ "Polizei Baden-Württemberg", /* 34800 */ "sublab e.V.", /* 34801 */ "HomeNet", /* 34802 */ "Gubkin Russian State University", /* 34803 */ "Wideband Semiconductor, Inc.", /* 34804 */ "Zivillian Software", /* 34805 */ "Optical Systems Design Pty Ltd", /* 34806 */ "Q-TECH INFORMATION CO.,LTD", /* 34807 */ "Jiangsu broadcasting television network corporation limited", /* 34808 */ "Parsons Brinckerhoff", /* 34809 */ "Intermountain Healthcare", /* 34810 */ "Stollmann E+V GmbH", /* 34811 */ "Mirifice Ltd", /* 34812 */ "Multilink", /* 34813 */ "Zpend Pty. Ltd.", /* 34814 */ "Angry Dog Business Sytems", /* 34815 */ "Icon Power Solutions Pvt. Ltd.", /* 34816 */ "Tamtron Oy", /* 34817 */ "CPI Corporation", /* 34818 */ "Nacka kommun", /* 34819 */ "Satcom Technologies EMC", /* 34820 */ "Lafayette Consolidated Government", /* 34821 */ "Calet, Inc.", /* 34822 */ "VersaForm Systems Corp", /* 34823 */ "Texas A&M University System", /* 34824 */ "Pareto Networks Inc.", /* 34825 */ "Tayana Software Solutions Pvt Ltd", /* 34826 */ "RT-RK", /* 34827 */ "Pannon GSM Távközlési Zrt.", /* 34828 */ "GraphLogic Inc", /* 34829 */ "Forers, s. r. o.", /* 34830 */ "The Freecycle Network", /* 34831 */ "Intelibs, Inc", /* 34832 */ "DrivenDown.com", /* 34833 */ "BermudaTriangle.com", /* 34834 */ "Hypercable", /* 34835 */ "Denkosha Co.,Ltd.", /* 34836 */ "Arrive Technologies", /* 34837 */ "Innovative SCADA Solutions Pty Ltd", /* 34838 */ "abakus IT AG", /* 34839 */ "Shanghai Huaheng Telecom Equipment Co.,Ltd", /* 34840 */ "Gordon Food Service, Inc.", /* 34841 */ "TERASAKI ELECTRIC CO.,LTD", /* 34842 */ "NASCENT Technology, LLC", /* 34843 */ "Gennet S.A.", /* 34844 */ "Faculté des Sciences et Techniques de Tanger", /* 34845 */ "SERTRES del Norte", /* 34846 */ "Spacetime Studios, LLC", /* 34847 */ "Shibasoku", /* 34848 */ "Security Code Ltd.", /* 34849 */ "EldoS Corporation", /* 34850 */ "Adalia Oy", /* 34851 */ "Roeften", /* 34852 */ "RainStor", /* 34853 */ "indeni", /* 34854 */ "Votiro Ltd.", /* 34855 */ "ALTAVIA SA", /* 34856 */ "BaiY Studio", /* 34857 */ "Wireless Networks Association (WNA.gr)", /* 34858 */ "jgfs.net", /* 34859 */ "Finalist IT Group", /* 34860 */ "Rajant Corporation", /* 34861 */ "Fundamo", /* 34862 */ "Leopold Kostal GmbH & Co. KG", /* 34863 */ "Mito Europe Ltd", /* 34864 */ "World Evolved Services, LLC", /* 34865 */ "Suffolk County Council", /* 34866 */ "Universitaet Greifswald", /* 34867 */ "Winnerstek Inc.", /* 34868 */ "Ian Hine Consulting", /* 34869 */ "Megabyte Doctor (Pty) Ltd", /* 34870 */ "trovicor GmbH", /* 34871 */ "ETM Communications AB", /* 34872 */ "Klein & Partner KG", /* 34873 */ "Automasjon og Data as", /* 34874 */ "Alpikom SpA", /* 34875 */ "Informatics Corporation of America", /* 34876 */ "Masergy Communications, Inc.", /* 34877 */ "Advanstar Communications Inc.", /* 34878 */ "BlueCross BlueShield of Minnesota", /* 34879 */ "Cortina Systems", /* 34880 */ "EVT Technologies LTD", /* 34881 */ "Kolektor Group", /* 34882 */ "House Arkko", /* 34883 */ "David Wozny Limited", /* 34884 */ "SSI (US) Inc", /* 34885 */ "Compagnie des Alpes", /* 34886 */ "Iariss", /* 34887 */ "Gatix", /* 34888 */ "McKnight Insight", /* 34889 */ "Aizkraukles Banka A/S", /* 34890 */ "Croatia Control Ltd.", /* 34891 */ "Kedros, a.s.", /* 34892 */ "Leeds City Council", /* 34893 */ "Global Strategies Group, Mission Systems", /* 34894 */ "ITaM Services", /* 34895 */ "Gorilla Logic, Inc.", /* 34896 */ "Centro Brasileiro de Pesquisas Fisicas", /* 34897 */ "CESEC-SFF", /* 34898 */ "H5 audits", /* 34899 */ "Informations Technologie Service und Consulting GmbH", /* 34900 */ "Fortunaglobal (Pvt) Limited", /* 34901 */ "IT Industry LTD", /* 34902 */ "M247 Ltd", /* 34903 */ "KRC OOO", /* 34904 */ "G-Lab", /* 34905 */ "RadiantGrid Technologies, LLC", /* 34906 */ "TELEVIC N.V.", /* 34907 */ "CareCloud Corp", /* 34908 */ "RHD Research Ltd", /* 34909 */ "Geeknet, Inc.", /* 34910 */ "Nanjing Jiajian Network Co. Ltd.", /* 34911 */ "PT. Nyra", /* 34912 */ "TDM Ingénierie", /* 34913 */ "Creative Consulting GmbH", /* 34914 */ "Free Software Foundation Europe e.V.", /* 34915 */ "Walki Group Oy", /* 34916 */ "Car Chase Workshop Inc.", /* 34917 */ "Syncapse Corp.", /* 34918 */ "Sky Wisdom Technology Limited", /* 34919 */ "Allen Lund Company", /* 34920 */ "EvoStor Inc.", /* 34921 */ "Epic Advertising Inc", /* 34922 */ "KOOLING", /* 34923 */ "Augustine Consulting", /* 34924 */ "Nantes Systems Private Limited", /* 34925 */ "Limited Liability Company \"Wild Orchid\"", /* 34926 */ "DL Santé", /* 34927 */ "ACVITAS", /* 34928 */ "SURGIDEX", /* 34929 */ "Caneris Inc", /* 34930 */ "ShangHai DynamiCode Company Limited", /* 34931 */ "CMS Affiliate", /* 34932 */ "CPO Partners", /* 34933 */ "CirclePrinters", /* 34934 */ "marmira", /* 34935 */ "Creowave Oy", /* 34936 */ "UniversitaetsSpital Zurich", /* 34937 */ "Fédération française d'équitation", /* 34938 */ "SURMEI MIHAI-EUGEN", /* 34939 */ "Roman V. Kiseliov", /* 34940 */ "DiegoLima.org", /* 34941 */ "Cambrium BV.", /* 34942 */ "Sumisho Computer Systems Corporation", /* 34943 */ "Amplus Communication PTE LTD", /* 34944 */ "Albert Ziegler GmbH & Co. KG", /* 34945 */ "Independent Project Engineering Ltd", /* 34946 */ "chill-n-go, Inc", /* 34947 */ "NORMHOST", /* 34948 */ "Electronics Source Co.,Ltd.", /* 34949 */ "Herrmann & Lenz Solutions GmbH", /* 34950 */ "Komercijalna Banka AD Skopje", /* 34951 */ "nxtControl GmbH", /* 34952 */ "Concentric Circle Consulting", /* 34953 */ "Novtis do Brasil S/A", /* 34954 */ "Roland Gruber Softwareentwicklung", /* 34955 */ "Shanghai Transform IT Co. Ltd", /* 34956 */ "TTC Next-generation Home Network System WG", /* 34957 */ "Logilin", /* 34958 */ "Ingenieurbuero Berghofer KG", /* 34959 */ "SuperHost.pl s.c.", /* 34960 */ "H&S Hochfrequenztechnik GmbH", /* 34961 */ "Falco Networks B.V.", /* 34962 */ "Idle Pattern Communications, LLC", /* 34963 */ "Carbones del Cerrejon Ltd.", /* 34964 */ "Ricardo I. Vieitez Parra", /* 34965 */ "Global Rail Systems, Inc", /* 34966 */ "Sichuan Hongguan Communication Technology Co., Ltd.", /* 34967 */ "Airimba Wireless, Inc.", /* 34968 */ "REGNIA,Inc.", /* 34969 */ "Institut Teknologi Nasional (ITENAS)", /* 34970 */ "Ethereal Information Technology, Ltd.", /* 34971 */ "Eric Huss", /* 34972 */ "MIANYANG NETOP TELECOM EQUIPMENT LTD.CO.", /* 34973 */ "alentogroup.org", /* 34974 */ "IPROAD, Inc.", /* 34975 */ "Mathew Systems Inc.", /* 34976 */ "Node-Nine, Inc.", /* 34977 */ "Laysis Consulting Inc.", /* 34978 */ "Scientis Solutions Ltd", /* 34979 */ "linexus", /* 34980 */ "cramif", /* 34981 */ "exaStack Limited", /* 34982 */ "013Netvision", /* 34983 */ "ER Technology Ltda.", /* 34984 */ "kylimar.com", /* 34985 */ "Bookmans", /* 34986 */ "OneWire", /* 34987 */ "Clearstone Central Laboratories", /* 34988 */ "appventure GmbH", /* 34989 */ "Vodafone Czech Republic a.s.", /* 34990 */ "SooperCreations", /* 34991 */ "Microlynx Systems Ltd", /* 34992 */ "Cymfony", /* 34993 */ "d3v Systems", /* 34994 */ "DBMJ Rehabilitation Services, PLLC", /* 34995 */ "Richard D. Ball, MD, PhD", /* 34996 */ "Kyoto University of Education", /* 34997 */ "CILogon Project", /* 34998 */ "JSC «Institute of infotelecommunications»", /* 34999 */ "OptXware Research&Development Ltd.", /* 35000 */ "APTASYS S.R.L.", /* 35001 */ "dcux Co.Ltd.", /* 35002 */ "ADP ESI", /* 35003 */ "Bahia Software SL", /* 35004 */ "IMS Nanofabrication AG", /* 35005 */ "Vivio World", /* 35006 */ "mPAY24 GmbH", /* 35007 */ "Corporation Service Company", /* 35008 */ "Techno Factory Desenvolvimento de Software Ltda.", /* 35009 */ "ATK-tehdas Oy", /* 35010 */ "Toyota Finance Australia Ltd.", /* 35011 */ "StorSimple", /* 35012 */ "Sweet Briar College", /* 35013 */ "Fenzke Netzwerktechnik GmbH", /* 35014 */ "PWM Project", /* 35015 */ "Bank-Pedersen", /* 35016 */ "Western Range Maintenance", /* 35017 */ "GoMidjets", /* 35018 */ "Decho Corporation", /* 35019 */ "nangu.TV", /* 35020 */ "TranSoft a.s.", /* 35021 */ "Sueddeutscher Verlag", /* 35022 */ "Heirich IT Dienste GmbH", /* 35023 */ "Hospital Sierrallana - Servicio Cántabro de Salud", /* 35024 */ "Lachlan Gunn", /* 35025 */ "PRODIST CONSULTORIA INFORMATICA E PRODUCOES ARTISTICAS LTDA.", /* 35026 */ "liuxiangbupt.com", /* 35027 */ "netPark LLC", /* 35028 */ "K.C.Innovations Co.,Ltd.", /* 35029 */ "Run Technologies Co.,Ltd.Beijing", /* 35030 */ "GP NPF \"Ratex\"", /* 35031 */ "BelTechInfo", /* 35032 */ "Global Net Commerce, Inc.", /* 35033 */ "Sentai Digital, LLC", /* 35034 */ "interCLICK", /* 35035 */ "ASKO-IT", /* 35036 */ "Onesource", /* 35037 */ "XYMA-SONDEO", /* 35038 */ "Denva ApS", /* 35039 */ "Xiamen Helios Telecom Equipment Manufacture Inc.", /* 35040 */ "Electro Power Systems SpA", /* 35041 */ "Sporting Index Ltd", /* 35042 */ "Tripower", /* 35043 */ "CJSC Schelkovo Agrochim", /* 35044 */ "Mathieu Malaterre Consulting", /* 35045 */ "Intucell", /* 35046 */ "Sangfor Technologies Co.,Ltd.", /* 35047 */ "ShenZhen GreatFirst Technology Co., Ltd.", /* 35048 */ "Marler Media", /* 35049 */ "topdog.ru.net", /* 35050 */ "Systemnoe Modelirovanie i Analiz LLC", /* 35051 */ "Condrey Corporation", /* 35052 */ "LLC \"Promo Interactive\"", /* 35053 */ "Jan Schampera", /* 35054 */ "Gameloft", /* 35055 */ "whiteroad", /* 35056 */ "UNESP", /* 35057 */ "NikB-Soft", /* 35058 */ "VarnaNet", /* 35059 */ "IGI Mobile, Inc.", /* 35060 */ "Normation", /* 35061 */ "AiN-Tech. Corp.", /* 35062 */ "Ukraine Property Group, Ltd.", /* 35063 */ "Jderobot", /* 35064 */ "Sinequa", /* 35065 */ "HLRN", /* 35066 */ "mail.de GmbH", /* 35067 */ "Virgo Systems Kft.", /* 35068 */ "Worldwide Trust Asia Pte Ltd", /* 35069 */ "Plausible Labs Cooperative, Inc.", /* 35070 */ "Q & M Informática Ltda", /* 35071 */ "NGK Houten", /* 35072 */ "GateWare Communications GmbH", /* 35073 */ "MaxMara Fashion Group s.r.l.", /* 35074 */ "BlueTech Technology Co., Ltd.", /* 35075 */ "synfin.de", /* 35076 */ "Gracenote Inc.", /* 35077 */ "i-fabrik GmbH", /* 35078 */ "Terminal Quequen S.A", /* 35079 */ "KDH", /* 35080 */ "Sarana Tunggal Pratama", /* 35081 */ "Amaranten (ASIA) Network Co. Ltd.", /* 35082 */ "TOSS GmbH", /* 35083 */ "RBS Coutts International", /* 35084 */ "EURO-INFORMATION", /* 35085 */ "ReliabilityFirst Corporation", /* 35086 */ "BD Consult A/S", /* 35087 */ "SRA International, Inc", /* 35088 */ "Bluebird Electronics Ltd", /* 35089 */ "CTI", /* 35090 */ "Mitec Telecom Inc", /* 35091 */ "Made IT", /* 35092 */ "AT Testing", /* 35093 */ "iDevices Industria e Comercio de Produtos Eletronicos Ltda", /* 35094 */ "OFFICE24 Co.,Ltd.", /* 35095 */ "SmartEquip Inc.", /* 35096 */ "BlueWater Communication Group", /* 35097 */ "Pica8 Technologies, Inc", /* 35098 */ "E-Mice Solutions (H.K.) Limited", /* 35099 */ "Globelinks Technologies Limited", /* 35100 */ "SHENZHEN SHENXUN INFORMATION TECHNOLOGY DEVELOPMENT CO.,LID", /* 35101 */ "Guangdong Huada Integrated Technology Co.,ltd.", /* 35102 */ "Sichuan Cybercamera Information Technology Co.,Ltd", /* 35103 */ "Oerlikon Textile", /* 35104 */ "Mason Brown Development, LLC", /* 35105 */ "Reale Mutua Assicurazioni", /* 35106 */ "Prosol Group (Pty) Ltd", /* 35107 */ "tocore education", /* 35108 */ "Scienta Media s.r.o", /* 35109 */ "443 Pty Ltd", /* 35110 */ "NBank - Investitions und Förderbank", /* 35111 */ "Vem Sistemi SpA", /* 35112 */ "OpTier", /* 35113 */ "Robert Wood Johnson University Hospital", /* 35114 */ "SqueakSoft.com, LLC", /* 35115 */ "Trover Solutions", /* 35116 */ "BamNet", /* 35117 */ "Korestone Technologies", /* 35118 */ "Belhard Group JSC", /* 35119 */ "SIDN", /* 35120 */ "BULiGL", /* 35121 */ "Wayob", /* 35122 */ "Clear Channel Radio Digital", /* 35123 */ "FilesAnywhere.com", /* 35124 */ "Helmut Ritter", /* 35125 */ "Vodafone Group Services GmbH", /* 35126 */ "Japan Communication Inc.", /* 35127 */ "KWS-Electronic GmbH", /* 35128 */ "Rahn & Bodmer Co.", /* 35129 */ "fipscode", /* 35130 */ "London Underground Ltd", /* 35131 */ "IFProject", /* 35132 */ "Gobierno de la Republica NeuKarthago", /* 35133 */ "4Access Communications Company, Inc.", /* 35134 */ "Personal Software Company", /* 35135 */ "BlueStripe Software", /* 35136 */ "Chris Clayson", /* 35137 */ "PK Verkkotaito Oy", /* 35138 */ "AZWUL", /* 35139 */ "CableHD Radio Network", /* 35140 */ "PSIGlenmere", /* 35141 */ "VX4.NET", /* 35142 */ "Helpo Systems", /* 35143 */ "Power Quadrant", /* 35144 */ "Gearbit", /* 35145 */ "China Net Cloud", /* 35146 */ "Wishfi Pte. Ltd", /* 35147 */ "Technological Educational Institute of Piraeus", /* 35148 */ "NPO Lisco Ltd.", /* 35149 */ "inno-networks", /* 35150 */ "Raiffeisen Bank Aval", /* 35151 */ "AvroRAID", /* 35152 */ "Kynetics srl", /* 35153 */ "PowerShield Ltd.", /* 35154 */ "IP Cube Co.,Ltd", /* 35155 */ "Unbit", /* 35156 */ "University of Manitoba", /* 35157 */ "Osaka International Educational Institution", /* 35158 */ "ITC MIKS, LLC", /* 35159 */ "Equicom", /* 35160 */ "Venturi S.R.L.", /* 35161 */ "TeleOSS Consulting Ltd.", /* 35162 */ "OOO InfoTechService", /* 35163 */ "Black Earth Consulting Ltd", /* 35164 */ "Barid Al Maghrib", /* 35165 */ "E2E Networks Private Limited", /* 35166 */ "MPI Bremen", /* 35167 */ "NT Services Ltd.", /* 35168 */ "Sven Christel", /* 35169 */ "Bioptic Co., Ltd.", /* 35170 */ "Cloudeva", /* 35171 */ "Nordex", /* 35172 */ "Automobile Association \"DreamCar\"", /* 35173 */ "PBS&J", /* 35174 */ "TamKang University - Information Management Network Association", /* 35175 */ "Asavie Technologies Ltd.", /* 35176 */ "Control4", /* 35177 */ "MJV Tecnologia Ltda", /* 35178 */ "danzuck", /* 35179 */ "Mark Domansky Consulting", /* 35180 */ "Techubs Network", /* 35181 */ "Aggregate Knowledge, Inc", /* 35182 */ "Rob Haverkort BV", /* 35183 */ "Kontorsplatsen Business Group AB", /* 35184 */ "PlainText s.r.o.", /* 35185 */ "Hiromasa Nara", /* 35186 */ "kunming ucrown network system (china) ltd. co", /* 35187 */ "Eventide", /* 35188 */ "Thermo Fisher Scientific Inc", /* 35189 */ "Trice Imaging, Inc.", /* 35190 */ "Applied Software Control Ltd.", /* 35191 */ "Miracle Tan", /* 35192 */ "MicroNet Video Technology Ltd.,", /* 35193 */ "Barclays Capital", /* 35194 */ "Rudraksha Technology Private Limited", /* 35195 */ "Demonware Limited", /* 35196 */ "INTEGRA Software Systems", /* 35197 */ "Al-Madinah International University", /* 35198 */ "DynCorp International LLC", /* 35199 */ "ARIAL", /* 35200 */ "Ochanomizu University", /* 35201 */ "TechniData AG", /* 35202 */ "squatlabs", /* 35203 */ "Younicos AG", /* 35204 */ "SIAG-OMC", /* 35205 */ "AllDSP GmbH & Co. KG", /* 35206 */ "Dynamica s.r.l", /* 35207 */ "Trubiquity GmbH", /* 35208 */ "Fomento de Construcciones y Contratas, S.A", /* 35209 */ "Bechtle AG", /* 35210 */ "North Point Technology LLC", /* 35211 */ "dealnews.com, Inc.", /* 35212 */ "Sandbox Solutions", /* 35213 */ "Agence pour l'Enseignement Français à l'Etranger", /* 35214 */ "ZAO \"Begun\"", /* 35215 */ "w-Ha", /* 35216 */ "Adknowledge Inc", /* 35217 */ "Beemaster ICT", /* 35218 */ "FttX.nu", /* 35219 */ "Ioannes Co., LTD", /* 35220 */ "S.C. InterData Systems S.R.L.", /* 35221 */ "NewYork-Presbyterian Hospital - Radiation Oncology", /* 35222 */ "Insight International Corporation", /* 35223 */ "Langara College", /* 35224 */ "Shanghai HOWZONE Network Communication Device Co.,LTD", /* 35225 */ "Bureau Software Development Corporation", /* 35226 */ "OOO Nika Motors Holding", /* 35227 */ "Commsquare BVBA", /* 35228 */ "Intercard Services AD", /* 35229 */ "Generic Sweden AB", /* 35230 */ "Arca Sistemi SCARL", /* 35231 */ "Imaging In Motion LLC", /* 35232 */ "WHITEBEARSOLUTIONS", /* 35233 */ "Computerized Assessments & Learning, LLC", /* 35234 */ "Hargrove & Associates, Inc.", /* 35235 */ "Florian Rupp Ingenieur", /* 35236 */ "KBJ JEDYNAK I WSPÓLNICY SPÓŁKA JAWNA", /* 35237 */ "Novgorod Information and Analitical Centre", /* 35238 */ "NetSieben Technologies INC.", /* 35239 */ "Beehivetesting", /* 35240 */ "Betz Stefan -- Webdesign & Computerservice", /* 35241 */ "Cygnus Networks GmbH", /* 35242 */ "Dorna Sports", /* 35243 */ "Wojo", /* 35244 */ "Railcar Management, Inc", /* 35245 */ "OS Qingdao University", /* 35246 */ "OpenDL Pty Ltd", /* 35247 */ "Serendio Inc", /* 35248 */ "ALTAMYS - Tiers de Confiance", /* 35249 */ "Simply-Info", /* 35250 */ "AWIND Inc", /* 35251 */ "SAM Electronics", /* 35252 */ "AixSolve GmbH", /* 35253 */ "ZON Multimédia", /* 35254 */ "Mind Candy Ltd", /* 35255 */ "Iondale Information Services Limited", /* 35256 */ "Brisa Inovação e Tecnologia, SA", /* 35257 */ "HEHA.ORG", /* 35258 */ "Televersions LLC.", /* 35259 */ "Rotkraut", /* 35260 */ "Norwegian Defence", /* 35261 */ "Versorgungs- und Verkehrsgesellschaft Saarbrücken mbH", /* 35262 */ "Araneo Limited", /* 35263 */ "TetraStorm Technologies", /* 35264 */ "Eltex Enterprise, Ltd.", /* 35265 */ "EJJE, Lda", /* 35266 */ "Eten Technologies Inc.", /* 35267 */ "ORESCO", /* 35268 */ "Siemens AG Österreich, CMT", /* 35269 */ "Samji Eletronics Co., Ltd.", /* 35270 */ "micallef.fr", /* 35271 */ "DEBID", /* 35272 */ "Jah'Z Interactive", /* 35273 */ "CHU Angers", /* 35274 */ "SMARIS s.r.o.", /* 35275 */ "TopCoder, Inc.", /* 35276 */ "ZZ Dats Ltd", /* 35277 */ "Texas Communications Inc.", /* 35278 */ "Singlenesia Software", /* 35279 */ "QuickPlay Media, Inc.", /* 35280 */ "METRACOM", /* 35281 */ "Community Health Network", /* 35282 */ "Pacific Blue Cross", /* 35283 */ "UROEP.COM", /* 35284 */ "Ministry of Administration and Interior - General Directorate for IT & C", /* 35285 */ "Johanniter-Unfall-Hilfe e. V. - Landesverband Baden-Wuerttemberg", /* 35286 */ "Mobile Metrics", /* 35287 */ "Deep Web GmbH & Co KG", /* 35288 */ "Quative Limited", /* 35289 */ "ptman.name", /* 35290 */ "Embvue", /* 35291 */ "Embedded Solutions Group", /* 35292 */ "Collegium Josephinum Bonn", /* 35293 */ "INETJ Communications, LTD", /* 35294 */ "ExitPi", /* 35295 */ "Cyclone Microsystems Inc.", /* 35296 */ "orainf", /* 35297 */ "dvsAnalytics, Inc.", /* 35298 */ "Universidad del Valle de Guatemala", /* 35299 */ "REGISTRO NACIONAL DE IDENTIFICACIÓN Y ESTADO CIVIL", /* 35300 */ "Kvazar Test", /* 35301 */ "Outblaze Limited", /* 35302 */ "Velocity", /* 35303 */ "Procube Ltd.", /* 35304 */ "DB ELETTRONICA TELECOMUNICAZIONI SPA", /* 35305 */ "Equinox Software, Inc.", /* 35306 */ "Screwgun Logic", /* 35307 */ "Koukaam a.s.", /* 35308 */ "am-cor inc.", /* 35309 */ "Gaggle.Net, Inc.", /* 35310 */ "ARANZ Medical Ltd", /* 35311 */ "gabosh", /* 35312 */ "Spinnaker Web Design & Hosting LLC", /* 35313 */ "Conergos GmbH & Co. KG", /* 35314 */ "Wave Creative Technologies", /* 35315 */ "Schauer Hungaria Kft.", /* 35316 */ "Kolibri Systems B.V.", /* 35317 */ "Kutztown University", /* 35318 */ "On-Ramp Wireless, Inc.", /* 35319 */ "Università degli Studi di Torino", /* 35320 */ "Profitcomputing s.r.o.", /* 35321 */ "PJRC.COM, LLC", /* 35322 */ "Kliniken Nordoberpfalz AG", /* 35323 */ "Edutel B.V.", /* 35324 */ "Universität Witten/Herdecke", /* 35325 */ "University of Music and Drama Hannover", /* 35326 */ "SMABTP", /* 35327 */ "BlueCrest Capital Management", /* 35328 */ "S. Walter Packaging", /* 35329 */ "RRsat Global Communications Network", /* 35330 */ "Faculdade Natalense para o Desenvolvimento do Rio Grande do Norte", /* 35331 */ "Alticast Corp.", /* 35332 */ "pk0", /* 35333 */ "Lamda Networks", /* 35334 */ "Alion Science and Technology", /* 35335 */ "Lime Labs, LLC", /* 35336 */ "Primitives.lv", /* 35337 */ "IMFirewall Software", /* 35338 */ "Yambay Technologies Pty Ltd", /* 35339 */ "dustOS", /* 35340 */ "Bundesamt f. Eich- und Vermessungswesen", /* 35341 */ "American HomePatient", /* 35342 */ "Cairo University Hospitals", /* 35343 */ "Thales Defence Deutschland GmbH", /* 35344 */ "SRC d.o.o.", /* 35345 */ "Northern Ireland Housing Executive", /* 35346 */ "WuHan RenTang Information Limited", /* 35347 */ "RTQA Medical Limited", /* 35348 */ "Takahashi Yusuke", /* 35349 */ "DS-Department", /* 35350 */ "Silver Sky Soft", /* 35351 */ "A&R Carton", /* 35352 */ "Entry Point", /* 35353 */ "Nintendo of America Inc.", /* 35354 */ "Intelliresponse Systems Inc", /* 35355 */ "Telezygology, inc.", /* 35356 */ "Garden State Health Systems", /* 35357 */ "Syntervision", /* 35358 */ "Fensom System S.L.", /* 35359 */ "ZODIAC Data Systems GmbH", /* 35360 */ "Newtel Engineering S.r.l.", /* 35361 */ "Quill Training Systems Ltd", /* 35362 */ "University of Huddersfield", /* 35363 */ "Seattle Children's Hospital", /* 35364 */ "Schroff Technologies International, Inc", /* 35365 */ "ChengDu OuRuan Corp., Ltd.", /* 35366 */ "ITL, LLC", /* 35367 */ "doubango", /* 35368 */ "3iMedia GmbH", /* 35369 */ "natnat inc.", /* 35370 */ "Infocore.Inc", /* 35371 */ "Daniel Clark", /* 35372 */ "Slovak Telekom, a.s.", /* 35373 */ "Universidade Federal do Espirito Santo", /* 35374 */ "UAB \"Mano numeris\"", /* 35375 */ "SOFTWAY MEDICAL", /* 35376 */ "Funkwerk IP-Appliances GmbH", /* 35377 */ "Antwerpse Waterwerken", /* 35378 */ "ISiS Papyrus Software AG", /* 35379 */ "Rogers Broadcasting Ltd. - Vancouver Television", /* 35380 */ "Informatikos ir rysiu departamentas prie Lietuvos Respublikos vidaus reikalu ministerijos", /* 35381 */ "EuPathDB Bioinformatics Resource Center", /* 35382 */ "Swissfram SRL", /* 35383 */ "International Social Security Association", /* 35384 */ "Far Systems SpA", /* 35385 */ "Neverfail Group", /* 35386 */ "Ning", /* 35387 */ "Beyel", /* 35388 */ "KIWIGRID", /* 35389 */ "Credoc services CVBA", /* 35390 */ "HealthTrio, LLC", /* 35391 */ "sepox.de", /* 35392 */ "Blue Vervet Ltd", /* 35393 */ "SuKaiTek", /* 35394 */ "PT. Prima Teknologi", /* 35395 */ "ZAO Intercross", /* 35396 */ "x-fabric GmbH", /* 35397 */ "IDKAYA", /* 35398 */ "CeNetMon", /* 35399 */ "Noumenon, LLC", /* 35400 */ "ElectroLink Srl", /* 35401 */ "Internet Connectivity Group, Inc", /* 35402 */ "Hochschule Mittweida", /* 35403 */ "Beijing C&W Optical Communication Technology Co.,Ltd.", /* 35404 */ "Default Deny Security", /* 35405 */ "RADiflow", /* 35406 */ "BOUYGUES IMMOBILIER", /* 35407 */ "Ing. Roman Těšík", /* 35408 */ "AccelOps, Inc.", /* 35409 */ "SOLIS - Cooperativa de Soluções Livres Ltda", /* 35410 */ "Fortium Technologies Ltd", /* 35411 */ "CZ-MAN s.r.o.", /* 35412 */ "GlideAround LLC", /* 35413 */ "Molisoft grupo empresarial S.L.", /* 35414 */ "Universitas Surabaya", /* 35415 */ "DHD Deubner Hoffmann Digital GmbH", /* 35416 */ "Randstad Deutschland", /* 35417 */ "icub3d", /* 35418 */ "Electron, Ltd.", /* 35419 */ "rtron", /* 35420 */ "ChinaScope Financial Limited", /* 35421 */ "Schweizer Paraplegiker-Zentrum", /* 35422 */ "berolina Schriftbild GmbH & Co. KG", /* 35423 */ "Viprinet GmbH", /* 35424 */ "Mastery Technologies, Inc.", /* 35425 */ "The OpenSSH Project", /* 35426 */ "Data Turbine, Inc.", /* 35427 */ "Sterling Computer Systems", /* 35428 */ "Limis", /* 35429 */ "IntelligentWorks Co., Ltd.", /* 35430 */ "KAMFU Infomation & Technology Co., LTD.", /* 35431 */ "Superblock, LLC", /* 35432 */ "Connexion Technologies", /* 35433 */ "Quadrant Newmedia Corp.", /* 35434 */ "Anabasis Consulting Ltd.", /* 35435 */ "01.com, Inc.", /* 35436 */ "SERPRO - Serviço Federal de Processamento de Dados", /* 35437 */ "ekom21 - KGRZ Hessen", /* 35438 */ "App B.V.", /* 35439 */ "Faivre et Mahon", /* 35440 */ "corporacion empresarial iunka", /* 35441 */ "deZem GmbH", /* 35442 */ "Cat Consulting, Inc", /* 35443 */ "Spectralnet Sollutions, LLC", /* 35444 */ "Information Security Service Digital United", /* 35445 */ "Connaught FactsLine Ltd.", /* 35446 */ "SeeByte Ltd.", /* 35447 */ "Video Location Service", /* 35448 */ "Keytech BVBA", /* 35449 */ "Storagedata", /* 35450 */ "Incenp", /* 35451 */ "Commercial Bank DeltaCredit", /* 35452 */ "DREAM TRAIN INTERNET, INC.", /* 35453 */ "Niometrics Pte Ltd", /* 35454 */ "Tokyo Metropolitan Organization for Medical Research", /* 35455 */ "Westway Nominees", /* 35456 */ "Infocomm Development Authority Of Singapore", /* 35457 */ "Dossot Networks", /* 35458 */ "LEMKO Corporation", /* 35459 */ "EDAXI UG (haftungsbeschraenkt)", /* 35460 */ "Bernhard Dick", /* 35461 */ "Qingdao Hisense Media Networks LTD", /* 35462 */ "EfiCode Oy", /* 35463 */ "Blues Point Partners Pty Ltd", /* 35464 */ "Bank Julius Baer & Co. Ltd.", /* 35465 */ "Forsway Scandinavia AB", /* 35466 */ "OOO\"SpinBrain\"", /* 35467 */ "Kaunas University of Technology", /* 35468 */ "Seamless Distribution AB", /* 35469 */ "First-Matrix", /* 35470 */ "Johns Byrne Company", /* 35471 */ "blichmann.de", /* 35472 */ "UNETCONVERGENCE", /* 35473 */ "TransMIT GmbH", /* 35474 */ "Sprengnetter GmbH", /* 35475 */ "The Overtis Group Limited", /* 35476 */ "Dataram Corporation", /* 35477 */ "The UNIX Man Consulting, LLC", /* 35478 */ "Academic Medical Center", /* 35479 */ "Kutak Rock LLP", /* 35480 */ "LightningIO", /* 35481 */ "Image Soft Oy", /* 35482 */ "Exagate", /* 35483 */ "Alphacom LLC.", /* 35484 */ "Derrick & Associates, Inc", /* 35485 */ "Television New Zealand Ltd", /* 35486 */ "The Salvation Army USA Western Territory", /* 35487 */ "The Corosync Cluster Engine Project", /* 35488 */ "Radiofid Ltd", /* 35489 */ "AGEPS - APHP", /* 35490 */ "M.S. Projekt Management + Vertrieb GmbH", /* 35491 */ "RheinLand Versicherungen", /* 35492 */ "EMBED-IT OG", /* 35493 */ "act750", /* 35494 */ "Arjo Wiggins Chartham Limited", /* 35495 */ "Interface Devices Ltd", /* 35496 */ "GenLan d.o.o.", /* 35497 */ "VDG Security BV", /* 35498 */ "Stratos NZ Ltd", /* 35499 */ "Aim co., Ltd.", /* 35500 */ "Access General Insurance Holdings", /* 35501 */ "BIGSSS", /* 35502 */ "CybersCube", /* 35503 */ "Eitelwein Net", /* 35504 */ "Lindenbaum GmbH", /* 35505 */ "Streamezzo S.A.", /* 35506 */ "Ben Clifford", /* 35507 */ "Addiva Engineering AB", /* 35508 */ "C Squared Systems, LLC", /* 35509 */ "Tecnicas De Soft, S.A.", /* 35510 */ "VirtualScopics", /* 35511 */ "OSSEra, Inc", /* 35512 */ "AixConcept GmbH", /* 35513 */ "Liquidweb Inc", /* 35514 */ "KJ3 Elektronik", /* 35515 */ "Suomen Teollisuusosa Oy", /* 35516 */ "Shernet", /* 35517 */ "Bay Talkitec Private Limited", /* 35518 */ "Maldives Monetary Authority", /* 35519 */ "Video Clarity", /* 35520 */ "Entimo AG", /* 35521 */ "Comelit Group SpA", /* 35522 */ "Phillips and Jordan, Inc.", /* 35523 */ "phgamers", /* 35524 */ "DirectStreams", /* 35525 */ "Foundata GmbH", /* 35526 */ "FlexRadio Systems", /* 35527 */ "ADLANTIA", /* 35528 */ "Evony LLC", /* 35529 */ "TJK Tietolaite Oy", /* 35530 */ "Contato Global Solutions", /* 35531 */ "ACSYS BSC Sp. z o.o.", /* 35532 */ "Axecta Inc.", /* 35533 */ "ettex GmbH", /* 35534 */ "NanVPN", /* 35535 */ "Systems in Progress GmbH", /* 35536 */ "TeMeno GmbH", /* 35537 */ "TeleTrader Software AG", /* 35538 */ "Micros Systems, Inc.", /* 35539 */ "M/s. Varun Infosys", /* 35540 */ "Oesterreichische Elektrizitaetswirtschafts-AG", /* 35541 */ "Lucas sarl", /* 35542 */ "Novaworx", /* 35543 */ "Jas. Quinn & Son", /* 35544 */ "Robot Lda.", /* 35545 */ "EBS S.R.L.", /* 35546 */ "CA DiKey Ltd", /* 35547 */ "KNI Technical Consulting Ltd.", /* 35548 */ "E-Disp DA", /* 35549 */ "Leith Brandeland", /* 35550 */ "Conchus", /* 35551 */ "COMGuide Co.,Ltd.", /* 35552 */ "Internet Hypermarket Ltd.", /* 35553 */ "CorSsys", /* 35554 */ "Infinities Within", /* 35555 */ "OdysSloot", /* 35556 */ "Nyadendis Enterprices", /* 35557 */ "IT-INTEGRATION - SOLUÇÕES INTEGRADAS EM TECNOLOGIA DA INFORMAÇÃO LTDA ME", /* 35558 */ "Shanda Interactive Entertainment Limited", /* 35559 */ "Dnspod", /* 35560 */ "NetDialog International B.V.", /* 35561 */ "Service Elements", /* 35562 */ "saladisdead.com", /* 35563 */ "Universidad Catolica Andres Bello", /* 35564 */ "Koozyt, Inc.", /* 35565 */ "trammell.ch", /* 35566 */ "CME Group", /* 35567 */ "Beth Israel Deaconess Medical Center", /* 35568 */ "A-dec Inc.", /* 35569 */ "Travel Tripper LLC", /* 35570 */ "LU-Hosting", /* 35571 */ "Arends IT+TK", /* 35572 */ "sitel", /* 35573 */ "Dambach-Werke GmbH", /* 35574 */ "ByteSource Technology Consulting GmbH", /* 35575 */ "Ailux S.r.l.", /* 35576 */ "LivingData Gesellschaft für angewandte Informationstechnologien mbH", /* 35577 */ "Southern Telecommunications Company", /* 35578 */ "Super Group Trading (Pty) Ltd", /* 35579 */ "Technisys, Inc.", /* 35580 */ "Linct", /* 35581 */ "mTrust, s. r. o.", /* 35582 */ "Drizzle", /* 35583 */ "BANK AL MAGHRIB", /* 35584 */ "Intelcan Technosystems Inc.", /* 35585 */ "Competentum", /* 35586 */ "White Birch Paper division Papier Masson", /* 35587 */ "ndl.kiev.ua", /* 35588 */ "Confederación Pirata", /* 35589 */ "Convergent Communications, Inc", /* 35590 */ "Limited Liability Company \"Mejregiongaz \"", /* 35591 */ "FiberSensing S.A.", /* 35592 */ "Thales / Rockwell Collins", /* 35593 */ "iCOMcept GmbH", /* 35594 */ "distributedmatter.net", /* 35595 */ "Innovid Co., Ltd.", /* 35596 */ "\"TeleMiks\" UE", /* 35597 */ "PIWorks Inc", /* 35598 */ "Marketware", /* 35599 */ "TCC R&D GmbH", /* 35600 */ "TransCanada Pipelines Ltd", /* 35601 */ "Syndetic Pty Ltd", /* 35602 */ "TIANJIN DEVISER ELECTRONICS INSTRUMENT CO.,LTD", /* 35603 */ "Compal Broadband Networks Inc.", /* 35604 */ "Montani Webdevelopment + Strategie", /* 35605 */ "ZAO NPC \"KOMPYUTERNYE TECHNOLOGII\"", /* 35606 */ "Wireless eSystems", /* 35607 */ "Answer Quick", /* 35608 */ "AXIe Consortium, Inc.", /* 35609 */ "Itel snc", /* 35610 */ "SOFT PROJECT C.A.", /* 35611 */ "Digital Mages", /* 35612 */ "Linktrust", /* 35613 */ "ITK-Engineering", /* 35614 */ "Basilea Pharmaceutica Ltd", /* 35615 */ "Deltanet AG", /* 35616 */ "XtcN", /* 35617 */ "Beanfield Technologies Inc.", /* 35618 */ "Mittwald CM Service", /* 35619 */ "William Beaumont Hospitals", /* 35620 */ "Patrick Kobly", /* 35621 */ "Akaflieg Stuttgart", /* 35622 */ "stwalkerster.co.uk", /* 35623 */ "tuxad.com", /* 35624 */ "Vembu Technologies Private Limited", /* 35625 */ "CHONGQING JINGHONG HI-TECH CO.,LTD", /* 35626 */ "Atera Networks LTD", /* 35627 */ "Unitas Network GmbH", /* 35628 */ "PL-Grid", /* 35629 */ "Qube Technologies Sp. z o.o.", /* 35630 */ "CyberTrans Japan", /* 35631 */ "ntop", /* 35632 */ "Open Sistemas", /* 35633 */ "Karl Wörwag Lack- und Farbenfabrik GmbH & Co. KG", /* 35634 */ "GFR Software Solutions AG", /* 35635 */ "KION GROUP GmbH", /* 35636 */ "ubiqu access b.v.", /* 35637 */ "Flughafen Wien AG", /* 35638 */ "Wydawnictwo Naukowe PWN S.A.", /* 35639 */ "Appareo Systems, LLC", /* 35640 */ "Universidad de los Andes", /* 35641 */ "Paneda AS", /* 35642 */ "EURIX srl", /* 35643 */ "Olson Consulting", /* 35644 */ "ZiChen Tech. Co. Ltd.", /* 35645 */ "CTS cashpro s.p.a.", /* 35646 */ "Deposita Systems (Pty) Ltd", /* 35647 */ "Broadband Solutions Technology Pty Ltd", /* 35648 */ "Direct Payment Solutions Limited", /* 35649 */ "Piratenpartei Schweiz", /* 35650 */ "IHM P/S", /* 35651 */ "Informatique de Sécurité", /* 35652 */ "DeltaWare Systems Inc.", /* 35653 */ "HAUT COMMISSARIAT POUR LES REFUGIES HCR (UNHCR)", /* 35654 */ "Peak Solution GmbH", /* 35655 */ "Brian Delaney", /* 35656 */ "PT. Bank BRI Syariah", /* 35657 */ "Health Info Net AG", /* 35658 */ "«Baker Tilly Russaudit» Ltd.", /* 35659 */ "3Way Solutions", /* 35660 */ "NetworkIP", /* 35661 */ "Optrak Distribution Software Ltd", /* 35662 */ "State of Hawaii", /* 35663 */ "PI-Embedded - Building Automation Community", /* 35664 */ "BroadBand Security, Inc.", /* 35665 */ "Joint Stock Commercial Bank INVESTBANK Open-end JSC", /* 35666 */ "Elimco Sistemas S.L.", /* 35667 */ "PEAK6 Investments, L.P.", /* 35668 */ "Advanced Integration Technology", /* 35669 */ "Alberta Health Services", /* 35670 */ "im3D S.p.A.", /* 35671 */ "Bitnethic Srl", /* 35672 */ "Bank Saint Petersburg", /* 35673 */ "Johan De Wit", /* 35674 */ "ZAP S/A Internet", /* 35675 */ "ComPughTerWorx", /* 35676 */ "Envisionier Medical Technologies, Inc.", /* 35677 */ "Clayster AB", /* 35678 */ "GRITA", /* 35679 */ "AdGear Technologies Inc.", /* 35680 */ "Zenith System Solutions", /* 35681 */ "Technical University of Liberec", /* 35682 */ "Hofmann-IT-Systeme Ingenieurbuero", /* 35683 */ "Proserve B.V.", /* 35684 */ "HELLUG", /* 35685 */ "Brian Desmond Consulting, LLC", /* 35686 */ "Proware Technologies Co., LTD", /* 35687 */ "Hochschule Wismar - University of Applied Sciences - Technology, Business and Design", /* 35688 */ "Betfair", /* 35689 */ "Indaal Information Management GmbH", /* 35690 */ "Matthias Bonn it-consult", /* 35691 */ "Headweb AB", /* 35692 */ "Open-Future BVBA", /* 35693 */ "Choosehelp.com", /* 35694 */ "SITEM S.r.l.", /* 35695 */ "Avvasi", /* 35696 */ "Ystrad Mynach College of Further Education", /* 35697 */ "Ldap.com.br", /* 35698 */ "Cummins Power Generation", /* 35699 */ "Tyrian Technical Consulting", /* 35700 */ "phpcoms", /* 35701 */ "NTO IRE-Polus, Ltd.", /* 35702 */ "JSC DevLab", /* 35703 */ "SALUC", /* 35704 */ "HWS Informationssysteme GmbH", /* 35705 */ "Guangzhou KingTeller Technology Co.,Ltd", /* 35706 */ "S&P", /* 35707 */ "BOUYGUES CONSTRUCTION", /* 35708 */ "Unassigned", /* 35709 */ "Alcatel-Lucent, 4ESS", /* 35710 */ "Sopinspace", /* 35711 */ "Master Translation and Technology Services Co.,Ltd.", /* 35712 */ "Information Management Services", /* 35713 */ "kommtnoch.com", /* 35714 */ "Video Gaming Technologies", /* 35715 */ "Action Without Borders", /* 35716 */ "DI Michael Kuen", /* 35717 */ "Mississippi Gulf Coast Community College", /* 35718 */ "Shopping.com", /* 35719 */ "Infotrend Development", /* 35720 */ "Institute of Corporate Law and Corporate Governance", /* 35721 */ "Digital Nirvana", /* 35722 */ "SENSAIR Pty Ltd", /* 35723 */ "Chenega Corporation", /* 35724 */ "China Beijing TV Station", /* 35725 */ "China Guangdong Telepower Communication Technology Co.,Ltd.", /* 35726 */ "First Horizon National Corporation", /* 35727 */ "Scallable Technologies, Inc.", /* 35728 */ "Forssan Seudun Puhelin Oy / SurffiNET", /* 35729 */ "iAd GmbH", /* 35730 */ "abtis GmbH", /* 35731 */ "Ajuntament de Benicarló", /* 35732 */ "VIDA Diagnostics Inc", /* 35733 */ "Lennart Jütte", /* 35734 */ "A9 SAS", /* 35735 */ "BZCToOn'S Network / RedJuice.fr SARL", /* 35736 */ "QA Cafe LLC", /* 35737 */ "abcwxy.com", /* 35738 */ "Bowline Network Consulting, Inc", /* 35739 */ "SACD", /* 35740 */ "Chi-X Europe Ltd", /* 35741 */ "Neurosearch, Inc.", /* 35742 */ "Workonline Communications (Pty) Ltd", /* 35743 */ "D-Media Communication Tech", /* 35744 */ "Marine Harvest ASA", /* 35745 */ "Passepartout sa", /* 35746 */ "FEDERALNOE AGENTSTVO ZhELEZNODOROZhNOGO TRANSPORTA", /* 35747 */ "Switch++", /* 35748 */ "Alsim", /* 35749 */ "Spring Wireless", /* 35750 */ "Linux Lunatix", /* 35751 */ "Supra net d.o.o.", /* 35752 */ "Les Développements Durables", /* 35753 */ "ON-AIR Systems Ltd.", /* 35754 */ "P-21 GmbH", /* 35755 */ "inett GmbH", /* 35756 */ "Sonnection B.V.", /* 35757 */ "Stichting Diagnose Kanker", /* 35758 */ "Welkin Sciences, LLC", /* 35759 */ "Optical Access Networks Lab, Shanghai University", /* 35760 */ "Center Parcs Europe", /* 35761 */ "FMLOG, Swedish Armed Forces Logistics", /* 35762 */ "Groupe Laurent", /* 35763 */ "St. Lawrence College", /* 35764 */ "zbits Unternehmensberatung GmbH", /* 35765 */ "Killermann GdbR", /* 35766 */ "University of Lodz", /* 35767 */ "GetWellNetwork, Inc.", /* 35768 */ "Wellogic", /* 35769 */ "USIL Technology", /* 35770 */ "Hightech Payment Systems", /* 35771 */ "n@work Internet Informationssysteme GmbH", /* 35772 */ "Arcturus Networks Inc.", /* 35773 */ "Universal Electric Corporation", /* 35774 */ "Rachitskiy Research and Development LLC", /* 35775 */ "BlueNote Communications SA", /* 35776 */ "Unique Solutions SA", /* 35777 */ "RTC-LEASING OJSC", /* 35778 */ "ican solutions private limited", /* 35779 */ "OAO Tatneft", /* 35780 */ "Matej Bel University Banska Bystrica", /* 35781 */ "Universidad de Extremadura", /* 35782 */ "Nika Ltd", /* 35783 */ "ECKD GmbH", /* 35784 */ "Xcira, Inc.", /* 35785 */ "Continuant Inc", /* 35786 */ "Computaris", /* 35787 */ "Xolido Systems,S.A.", /* 35788 */ "Despegar.com, Inc.", /* 35789 */ "ClearCorp", /* 35790 */ "IES Systems, Inc.", /* 35791 */ "Rygl", /* 35792 */ "Hirotech, Inc.", /* 35793 */ "Java Verified", /* 35794 */ "Actifio", /* 35795 */ "Burda:IC GmbH", /* 35796 */ "Polska Telefonia Cyfrowa Sp. z o.o.", /* 35797 */ "shack e.V.", /* 35798 */ "Phmb Consulting", /* 35799 */ "Uniconsult", /* 35800 */ "EIX Ltd", /* 35801 */ "Mobango Ltd", /* 35802 */ "Eucalyptus Systems Inc.", /* 35803 */ "Allgood Networks", /* 35804 */ "Athonet s.r.l.", /* 35805 */ "Paul Milliken", /* 35806 */ "AJR Development", /* 35807 */ "SAR Elektronik A.S.", /* 35808 */ "Hosting Community", /* 35809 */ "CDL PMO", /* 35810 */ "AMTANGEE Aktiengesellschaft", /* 35811 */ "CANCOM IT Solutions GmbH", /* 35812 */ "LinuxRulz", /* 35813 */ "Cordier Networks", /* 35814 */ "QUADStor Systems", /* 35815 */ "Shenzhen HY Amplitec Technology Co.,Ltd", /* 35816 */ "Giorik spa", /* 35817 */ "Azienda Feltrina s.p.", /* 35818 */ "Digithurst Bildverarbeitungssysteme", /* 35819 */ "RCS Kladno, s.r.o.", /* 35820 */ "FBComputers s.r.l.", /* 35821 */ "V-Internet Operations, Inc.", /* 35822 */ "HANGZHOU RICH INFO-TECH CO.,LTD", /* 35823 */ "Boll und Partner Software GmbH", /* 35824 */ "INAX Corporation", /* 35825 */ "THALES AIR OPERATION", /* 35826 */ "Invengo Information Technology Co.,Ltd", /* 35827 */ "Entropia e.V.", /* 35828 */ "United Natural Foods, Inc.", /* 35829 */ "ROFFET.com", /* 35830 */ "ATECH MICROELECTRONIC SYSTEMS", /* 35831 */ "Open Horizont.Ltd", /* 35832 */ "Deva Broadcast Ltd.", /* 35833 */ "Gozaimass", /* 35834 */ "iB Solution Corporation", /* 35835 */ "China BraveFly Technology Co., Ltd.", /* 35836 */ "Mamat GmbH", /* 35837 */ "Matrixx Software Inc.", /* 35838 */ "Imagine One Technology & Management", /* 35839 */ "Gyrus ACMI, Inc.", /* 35840 */ "Agecodagis SARL", /* 35841 */ "RamVZ", /* 35842 */ "Sebastian Muszytowski", /* 35843 */ "Stormont-Vail HealthCare", /* 35844 */ "Heraklion Wireless", /* 35845 */ "Parsons", /* 35846 */ "Greenbone Networks GmbH", /* 35847 */ "Multipolaris Ltd.", /* 35848 */ "Telefonica International Wholesale Services", /* 35849 */ "Horns And Hooves", /* 35850 */ "Abix Tecnologia", /* 35851 */ "Spire Sciences LLC", /* 35852 */ "Remote Enterprise Monitoring, Inc.", /* 35853 */ "American Modern", /* 35854 */ "Dialog Semiconductor", /* 35855 */ "Berchtold Holding GmbH", /* 35856 */ "AMARON BVBA", /* 35857 */ "The Goodyear Tire & Rubber Co.", /* 35858 */ "Georgia-Pacific LLC.", /* 35859 */ "Kvadroteh Ltd.", /* 35860 */ "CRAWFORD COMMUNICATIONS, INC", /* 35861 */ "Mobile Integration Workgroup", /* 35862 */ "WAMAJU LLC", /* 35863 */ "Ales Hakl", /* 35864 */ "Trivia Solutions B.V.", /* 35865 */ "Eno, Inc.", /* 35866 */ "Prior srl", /* 35867 */ "Ater Belluno", /* 35868 */ "STB Broadcast", /* 35869 */ "OpsWise Software Inc.", /* 35870 */ "Cloupia", /* 35871 */ "huggla.com", /* 35872 */ "JDS Uniphase Corporation", /* 35873 */ "Action Packed Networks", /* 35874 */ "JX2 Technology Pty Ltd", /* 35875 */ "WHITECODE,.LTD", /* 35876 */ "High Technology Industries B.V.", /* 35877 */ "Conseil général de l'Aube", /* 35878 */ "WellDoc, Inc.", /* 35879 */ "JSC \"Mediafon\"", /* 35880 */ "Ionis group", /* 35881 */ "NTT DATA KYUSHU CORPORATION", /* 35882 */ "VisualSoft Private Limited", /* 35883 */ "Nethost s.r.o.", /* 35884 */ "VZ Holding AG", /* 35885 */ "Arise Telecommunications Ltd.", /* 35886 */ "Lucierna SLNE", /* 35887 */ "DeadInkVinyl", /* 35888 */ "ColumbiaSoft Corporation", /* 35889 */ "Video-Flow ltd", /* 35890 */ "punctum Gesellschaft fuer Software mbH", /* 35891 */ "ELMEH GIU", /* 35892 */ "Xelmo", /* 35893 */ "Cognimatics AB", /* 35894 */ "Slackarea Internet Services", /* 35895 */ "Concord Energy", /* 35896 */ "Violin Memory, Inc.", /* 35897 */ "SYSTEREL", /* 35898 */ "Prism Clinical Imaging, Inc.", /* 35899 */ "DuMont Net GmbH & Co. KG", /* 35900 */ "Al-Quds University", /* 35901 */ "OpenHeadend", /* 35902 */ "Bartonia Domain and Enterprises", /* 35903 */ "MacroSAN", /* 35904 */ "ACME-Cebul inc.", /* 35905 */ "Unister", /* 35906 */ "CRV Natural", /* 35907 */ "Embrane, Inc.", /* 35908 */ "Horace Mann Educators Corporation", /* 35909 */ "overnet.qc.ca", /* 35910 */ "Mrezne Tehnologije Verso", /* 35911 */ "Makedonijalek", /* 35912 */ "Diputacion Provincial de Cáceres", /* 35913 */ "Borea, Ltd.", /* 35914 */ "SERLI", /* 35915 */ "Orangehead Software", /* 35916 */ "kobisun.org Surdurulebilir Sunucu Sistemleri", /* 35917 */ "ETON International co. ltd", /* 35918 */ "Funkwerk plettac electronics GmbH", /* 35919 */ "Sebastian Himberger Software", /* 35920 */ "Alpha-Bit GmbH", /* 35921 */ "Backbase B.V.", /* 35922 */ "Enthusia Consulting Ltd", /* 35923 */ "IET-International Empire Traders", /* 35924 */ "Warsaw Stock Exchange", /* 35925 */ "Aguas de la Cuenca del Norte, S.A.", /* 35926 */ "Softfinança S.A.", /* 35927 */ "Wheaton College", /* 35928 */ "Prodata Mobility Systems NV", /* 35929 */ "Radeks Medical Information Technologies Ltd", /* 35930 */ "Woasis Telecommunications Ltd.", /* 35931 */ "JM Technology Inc.", /* 35932 */ "Semiocast", /* 35933 */ "OOO CPCR-Express", /* 35934 */ "RAU-Stromversorgungen GmbH", /* 35935 */ "Iconmobile GmbH", /* 35936 */ "Unassigned", /* 35937 */ "Omnibond Systems LLC.", /* 35938 */ "Original1 GmbH", /* 35939 */ "Neuhalfen", /* 35940 */ "Mitsubishi UFJ Securities (USA), Inc.", /* 35941 */ "Uralchem", /* 35942 */ "Boerse Stuttgart", /* 35943 */ "Selecom", /* 35944 */ "Swid", /* 35945 */ "SMG Co., Ltd.", /* 35946 */ "SME Soluciones", /* 35947 */ "Phoneytunes.com", /* 35948 */ "Vienna Symphonic Library GmbH", /* 35949 */ "eFolder, Inc.", /* 35950 */ "XConnect Global Networks", /* 35951 */ "Sleevewerks BV", /* 35952 */ "Chargetek, Inc.", /* 35953 */ "VOD Pty Ltd", /* 35954 */ "Niigata University", /* 35955 */ "china wing technologies co.,ltd.", /* 35956 */ "Donjin Communication Technology Co.Ltd", /* 35957 */ "Vedekon", /* 35958 */ "TECHWAY S.A.S", /* 35959 */ "Drotposta Consulting Ltd", /* 35960 */ "Christian Arnold", /* 35961 */ "Pumpkin Heads Co.,Ltd.", /* 35962 */ "k12 ITC, Inc.", /* 35963 */ "BeiJing CS&S HuaTech Info Tech Ltd", /* 35964 */ "Control Risks Group Ltd", /* 35965 */ "MBDA Italia SPA", /* 35966 */ "AutoZone", /* 35967 */ "TrustFabric", /* 35968 */ "Vidyo, Inc.", /* 35969 */ "Planetsgroup", /* 35970 */ "Zaha Hadid Architects", /* 35971 */ "Audaxis S.A.", /* 35972 */ "Fenazari", /* 35973 */ "SnmpSoft Company", /* 35974 */ "Healthsense, Inc.", /* 35975 */ "Herrmann EDV-Beratung", /* 35976 */ "Reddog Chili", /* 35977 */ "Clearleap, Inc.", /* 35978 */ "Gonow Tecnologia", /* 35979 */ "vMonitor LLC", /* 35980 */ "isigma asesoría tecnológica, S.L.", /* 35981 */ "HUMANNIX co., Ltd", /* 35982 */ "MADS B.V.", /* 35983 */ "Simbrella", /* 35984 */ "SM CNS Corporation", /* 35985 */ "KALKITECH", /* 35986 */ "Sangoma Technologies", /* 35987 */ "Hiport srl", /* 35988 */ "Maranatha Christian University", /* 35989 */ "UK MOD DE&S", /* 35990 */ "Chesapeake Systems", /* 35991 */ "Christian Hain", /* 35992 */ "Syrus, Ltd.", /* 35993 */ "Intuix LLC", /* 35994 */ "quidecco.de", /* 35995 */ "Datatek Applications Inc.", /* 35996 */ "Kath. Jugend St. Bruno", /* 35997 */ "Universitat d'Andorra", /* 35998 */ "E-Flamingo LLC", /* 35999 */ "Host-Consultants", /* 36000 */ "PJB Consulting", /* 36001 */ "Taiji Computer Corporation Ltd.", /* 36002 */ "Techlan s.r.l.", /* 36003 */ "Vitracom AG", /* 36004 */ "CSE s.c.a.r.l. Consorzio Servizi Bancari", /* 36005 */ "VFT Telecom", /* 36006 */ "Logikos, Inc.", /* 36007 */ "Kelly Services, Inc.", /* 36008 */ "6connect, Inc.", /* 36009 */ "lordgandalf", /* 36010 */ "Commontime Ltd", /* 36011 */ "Oxford Life Insurance Company", /* 36012 */ "SMA Solar Technology AG", /* 36013 */ "Radio Free Asia", /* 36014 */ "SavillTech", /* 36015 */ "PROCERGS - Rio Grande do Sul State IT Company, Brazil", /* 36016 */ "Huntsman Cancer Institute at the University of Utah", /* 36017 */ "RAAF Technology", /* 36018 */ "die tageszeitung", /* 36019 */ "PoC Oy Ltd.", /* 36020 */ "IT Research Center LLP", /* 36021 */ "rku.it GmbH", /* 36022 */ "Stichting Christelijke Hogeschool Windesheim", /* 36023 */ "AltaSoft s.c.", /* 36024 */ "Videopolis France", /* 36025 */ "GoldZone Web", /* 36026 */ "Methode Electronics", /* 36027 */ "NoconaGeek", /* 36028 */ "Medical Micrographics LLC", /* 36029 */ "Happyserver Ltd", /* 36030 */ "Techsense Solutions Sdn Bhd", /* 36031 */ "Promsvjazdizajn, OOO", /* 36032 */ "Pak eVentures", /* 36033 */ "Kelvin Connect Ltd", /* 36034 */ "Signe S.A.", /* 36035 */ "DNA Oy", /* 36036 */ "Folia a/s", /* 36037 */ "Adif, Administrador de Infraestructuras Ferroviarias", /* 36038 */ "Estonian Internet Foundation", /* 36039 */ "Ibetor, S.L.", /* 36040 */ "KAMAZ Inc.", /* 36041 */ "LIAB ApS", /* 36042 */ "Athena Wireless Communications Inc.", /* 36043 */ "UCC Pro GmbH", /* 36044 */ "Uma Electrotechnical Services", /* 36045 */ "tdvine Co., Ltd", /* 36046 */ "Kadme AS", /* 36047 */ "PUISSANCE +", /* 36048 */ "GGG Kft.", /* 36049 */ "Feed Your Head", /* 36050 */ "TDM Consult GmbH", /* 36051 */ "EdgeCast Networks, Inc.", /* 36052 */ "Azka National for Information Technology", /* 36053 */ "eVigilo Ltd", /* 36054 */ "RadLogix Pty Ltd", /* 36055 */ "AIDev LLC", /* 36056 */ "FreeSInno Network Technology Co.,Ltd", /* 36057 */ "Beijing TopLink Technology Development Co., Ltd", /* 36058 */ "International Electric Supply Corp. (IESC)", /* 36059 */ "geek!daily", /* 36060 */ "Amonics Ltd.", /* 36061 */ "Integrius AB", /* 36062 */ "NKIA Co.,Ltd.", /* 36063 */ "Zappware", /* 36064 */ "Pionier - Polish Optical Internet", /* 36065 */ "Invensys/Triconex", /* 36066 */ "Timo Gerke", /* 36067 */ "UBIMET GesmbH", /* 36068 */ "Carbofos RU", /* 36069 */ "Power Standards Lab", /* 36070 */ "HerpEco LLC", /* 36071 */ "Antares 611 LLC", /* 36072 */ "ETECSA s.a.", /* 36073 */ "Dark Matter Labs Inc.", /* 36074 */ "TBWA\\Chiat\\Day", /* 36075 */ "SAPO", /* 36076 */ "Xilocore", /* 36077 */ "RFVISION Co.,LTD", /* 36078 */ "Audaxis", /* 36079 */ "National Information Technology and Internet Agency", /* 36080 */ "Clare Controls, Inc.", /* 36081 */ "Electronic Tele-Communications, Inc.", /* 36082 */ "Agility Logistics Pvt Ltd", /* 36083 */ "Electronic Classroom Of Tomorrow", /* 36084 */ "L-Card", /* 36085 */ "lamehost.it", /* 36086 */ "MCIO Incorporated", /* 36087 */ "LinowSat", /* 36088 */ "SPARF", /* 36089 */ "Remote Instruments", /* 36090 */ "SIS Group Pty Ltd", /* 36091 */ "NPP Ugpromavtomatizaciya", /* 36092 */ "Weifang Dongsheng Electronics Co., Ltd.", /* 36093 */ "VVDN Technologies", /* 36094 */ "Insighteck", /* 36095 */ "Adama University", /* 36096 */ "Unixwiz.net", /* 36097 */ "GoodForBusiness", /* 36098 */ "Hangmat", /* 36099 */ "WWF-UK", /* 36100 */ "South Patron", /* 36101 */ "Paramatrix Technologies Pvt. Ltd.", /* 36102 */ "Lan ETS", /* 36103 */ "TraceSpan Communications", /* 36104 */ "Blue Corss Blue Shield of Massachusetts", /* 36105 */ "Wraptastic, LLC (for http://rpm5.org)", /* 36106 */ "Helen Marks Marketing Ltd", /* 36107 */ "Cooperative Resources International", /* 36108 */ "stellaware.de", /* 36109 */ "Wannet Tecnologia da Informação LTDA.", /* 36110 */ "INNOS Co., Ltd.", /* 36111 */ "Perceptive Software, Inc", /* 36112 */ "IQinVision", /* 36113 */ "Automazione e Sicurezza Ferroviaria", /* 36114 */ "True Access Consulting SA", /* 36115 */ "Akrometrix, LLC", /* 36116 */ "Gustav R. Jansen", /* 36117 */ "Offshore Systems Ltd.", /* 36118 */ "Zer0.Tools IT Solutions", /* 36119 */ "Lemnisys", /* 36120 */ "Ebruit Ltd.", /* 36121 */ "Designskolen Kolding", /* 36122 */ "KORATEK", /* 36123 */ "Vinzenz Gruppe Krankenhausbeteiligungs- und Management GmbH", /* 36124 */ "secadm GmbH", /* 36125 */ "CCBill", /* 36126 */ "The Ulyanovsk reg. Dept. of Treasury", /* 36127 */ "MobileTech Limited", /* 36128 */ "Institution des Chartreux", /* 36129 */ "INDUSTEX S.L.", /* 36130 */ "Orafol Europe GmbH", /* 36131 */ "woernhard.NET", /* 36132 */ "Cartagena as", /* 36133 */ "Tristan Navikrvicius", /* 36134 */ "Yet Another Linux Distro", /* 36135 */ "Central Bank of the UAE", /* 36136 */ "Rising Sun Pictures", /* 36137 */ "CENTRON COMMUNICATIONS TECHNOLOGIES FUJIAN CO.,LTD", /* 36138 */ "Fläkt Woods Group SA", /* 36139 */ "Funkwerk Information Technologies Karlsfeld GmbH", /* 36140 */ "Ubiquoss", /* 36141 */ "ASTREA LA INFOPISTA JURIDICA SL", /* 36142 */ "dipswitch networks", /* 36143 */ "NovaSparks", /* 36144 */ "Alliance Healthcare", /* 36145 */ "Five Colleges, Incorporated", /* 36146 */ "Simrex Corporation", /* 36147 */ "Webproduce Corporation", /* 36148 */ "Argox Information Co., Ltd.", /* 36149 */ "ShenZhen MingWah AoHan High Technology Corporation Ltd.", /* 36150 */ "HM EI Zrt.", /* 36151 */ "Kulczyk Tradex", /* 36152 */ "Beijing InHand Networks Technology Co,.Ltd", /* 36153 */ "Factor Power Inc.", /* 36154 */ "US Army Surface Deployment and Distribution Command", /* 36155 */ "m.a.x. Informationstechnologie AG", /* 36156 */ "gooseman.cz", /* 36157 */ "CoBlitz LLC", /* 36158 */ "Inphoria Corporation", /* 36159 */ "OR-CZ spol. s r. o.", /* 36160 */ "Hills-Cook Outcomes Consulting Company", /* 36161 */ "Hardata", /* 36162 */ "CC Services, Inc", /* 36163 */ "Videoswitch S.R.L.", /* 36164 */ "Learning Objects, Inc.", /* 36165 */ "Cabela's", /* 36166 */ "BEWATEC Kommunikationstechnik GmbH", /* 36167 */ "Jurkiewicz", /* 36168 */ "RSG Model Works", /* 36169 */ "KeeperOS", /* 36170 */ "Host Group of Companies Pty Ltd", /* 36171 */ "Gorenje, d.d.", /* 36172 */ "Bob.sh", /* 36173 */ "Chengdu Ethercom Information Tech.Co.Ltd", /* 36174 */ "Sunspeedy Technology Co.,Ltd", /* 36175 */ "Huayuan Technology CO.,LTD", /* 36176 */ "AirSage Inc", /* 36177 */ "Minetec Pty Ltd", /* 36178 */ "Celerity Systems (Pty) Ltd", /* 36179 */ "Baltic Amadeus infrastrukturos paslaugos", /* 36180 */ "PM Microwave Srl", /* 36181 */ "ENYCA", /* 36182 */ "VMK RAUSCHER", /* 36183 */ "Wright Line LLC", /* 36184 */ "LVM Works", /* 36185 */ "Hangzhou Prevail Optoelectronic Equipment Co.,LTD", /* 36186 */ "LogicFactor", /* 36187 */ "Plandata Datenverarbeitungsgesellschaft m.b.H.", /* 36188 */ "BILGI GIS", /* 36189 */ "Jiang Wenkai's Own LDAP", /* 36190 */ "otop AG", /* 36191 */ "xtendx AG", /* 36192 */ "KenBIT Koenig i Wspólnicy Sp.J.", /* 36193 */ "it-proserv Projects & Services Ing. Karl Liepold", /* 36194 */ "Hedera Technology", /* 36195 */ "Kai-Media Co.", /* 36196 */ "Movius Interactive Corporation", /* 36197 */ "TheSpidersProject", /* 36198 */ "Open Finance", /* 36199 */ "Valtech", /* 36200 */ "NTV Broadcasting Company", /* 36201 */ "Thomson Reuters", /* 36202 */ "Namirial S.p.A.", /* 36203 */ "Sysinforg Kft.", /* 36204 */ "xhombee studios", /* 36205 */ "Stichting Revelation Space", /* 36206 */ "SYNERGY INFORMATION SYSTEMS INC.", /* 36207 */ "Karl Storz", /* 36208 */ "RGazdi Kft.", /* 36209 */ "Centre hospitalier de l'Université de Montréal", /* 36210 */ "The Catholic University of America", /* 36211 */ "Research and Education Bridge Certification Authority, Inc.", /* 36212 */ "SIA \"INBOKSS\"", /* 36213 */ "Galaxy Telecom Technologies Ltd", /* 36214 */ "Greek Academic Network - GUnet", /* 36215 */ "GoliathDNS ENK", /* 36216 */ "Ladela Interactive", /* 36217 */ "Open Cloud Consultants, Inc", /* 36218 */ "Pipe Coaters Nigeria Limited", /* 36219 */ "FLACSO", /* 36220 */ "Internet Brands, Inc.", /* 36221 */ "QBS - Quality Business Software", /* 36222 */ "BeST (Closed Joint-Stock Company «Belarusian Telecommunications Network»)", /* 36223 */ "Playphone Entretenimento LTDA", /* 36224 */ "Secure Forward, LLC", /* 36225 */ "Securus Technologies Inc.", /* 36226 */ "bookmark.com", /* 36227 */ "Dellus communication technologies Ltd.", /* 36228 */ "TechStudio Solutions Pte Ltd", /* 36229 */ "Axco Insurance Information Services", /* 36230 */ "semantics GmbH", /* 36231 */ "Stig Johnsen IKT", /* 36232 */ "Security Industry Supplies Pty. Ltd.", /* 36233 */ "The Otto von Guericke University of Magdeburg", /* 36234 */ "Livedrive Internet Ltd", /* 36235 */ "PointSharp", /* 36236 */ "Application Solutions (Electronics And Vision) Ltd", /* 36237 */ "oocero microsystems Unternehmergesellschaft (haftungsbeschränkt)", /* 36238 */ "Live Oak Technologies LLC", /* 36239 */ "ProBuild Holdings LLC", /* 36240 */ "Bankinter", /* 36241 */ "mep srl", /* 36242 */ "Hollan Family", /* 36243 */ "Linguamatics Solutions Ltd.", /* 36244 */ "EBO Group Inc.", /* 36245 */ "Ärztekammer Schleswig-Holstein", /* 36246 */ "ACAMS AS", /* 36247 */ "HeadHunter", /* 36248 */ "Green Cloud srl", /* 36249 */ "New York State Division of Criminal Justice Services", /* 36250 */ "Allgoodbits.org", /* 36251 */ "PHARMATECHNIK GmbH & Co. KG", /* 36252 */ "Customized InformSystems, Ltd", /* 36253 */ "Brandon Associates", /* 36254 */ "Geek Central", /* 36255 */ "PRIMA Cinema, Inc.", /* 36256 */ "Givaudan SA", /* 36257 */ "ThreatGuard Inc.", /* 36258 */ "Callino", /* 36259 */ "BioMarin Pharmaceutical Inc.", /* 36260 */ "BD2000 Ltd", /* 36261 */ "Meyertech Ltd.", /* 36262 */ "EUROP ASSISTANCE SERVICIOS INTEGRALES DE GESTION S.A.", /* 36263 */ "Evaldo Gardenali", /* 36264 */ "MAXBERT", /* 36265 */ "Golden Gekko", /* 36266 */ "Torsten Franke", /* 36267 */ "ComAbility", /* 36268 */ "Servicios de Consultoria Independiente S.L.", /* 36269 */ "JAEA", /* 36270 */ "StreamOcean inc.", /* 36271 */ "Protacon Solutions Oy", /* 36272 */ "Haas Elektro GmbH", /* 36273 */ "Embedded Systems Technology Group", /* 36274 */ "Communitake", /* 36275 */ "North Island Credit Union", /* 36276 */ "UOL S.A.", /* 36277 */ "Protality Ltd", /* 36278 */ "Uno Web Informação e Tecnologia Ltda", /* 36279 */ "Basda Medical Apparatus Co.,Ltd", /* 36280 */ "Beijing Boomsense Technology CO.,LTD.", /* 36281 */ "Monico Monitoring inc.", /* 36282 */ "Lilee Systems, Inc.", /* 36283 */ "Centre Psychothérapique de l'Ain", /* 36284 */ "Alliance Design WorkGroup", /* 36285 */ "MIKROKLIMA s.r.o.", /* 36286 */ "wTVision", /* 36287 */ "Editora del Mar S.A.", /* 36288 */ "AVM Informatique", /* 36289 */ "VeEX Inc", /* 36290 */ "Signalion GmbH", /* 36291 */ "kulthauskante e.V.", /* 36292 */ "Smartlink Network Systems Limited", /* 36293 */ "MSO Link", /* 36294 */ "Marubeni-Itochu Tubulars America, Inc.", /* 36295 */ "Mentor Solutions", /* 36296 */ "DVM ITS", /* 36297 */ "Baustem Technologies Ltd.", /* 36298 */ "Ronix Systems", /* 36299 */ "Intervale JSC", /* 36300 */ "URS Federal Services", /* 36301 */ "ARTiiS GROUP a.s.", /* 36302 */ "AuthenTec Inc.", /* 36303 */ "Kandcnet Inc.", /* 36304 */ "WoSign CA Limited", /* 36305 */ "University of Teesside", /* 36306 */ "SONUMA", /* 36307 */ "txtNation Ltd.", /* 36308 */ "Circadence Corporation", /* 36309 */ "Firelands Regional Medical Center", /* 36310 */ "exthex GmbH", /* 36311 */ "Alert Logic, inc.", /* 36312 */ "GL Communications, Inc.", /* 36313 */ "Regional Court in Lublin", /* 36314 */ "Joel Riedesel", /* 36315 */ "Polar Power Inc", /* 36316 */ "AVCOM Of Virginia, Inc.", /* 36317 */ "Marathon Petroleum Company", /* 36318 */ "iT-CUBE SYSTEMS GmbH", /* 36319 */ "4Tel Pty Ltd", /* 36320 */ "Dirección Ejecutiva de la Magistratura", /* 36321 */ "semanticlab", /* 36322 */ "WynnIT Ltd", /* 36323 */ "OpenRT", /* 36324 */ "IMAQLIQ Ltd.", /* 36325 */ "T. Gipp", /* 36326 */ "9Netics Inc.", /* 36327 */ "Parvus Corporation", /* 36328 */ "Ohio Farmers Insurance Company", /* 36329 */ "Comwired, Inc.", /* 36330 */ "Social & Scientific Systems", /* 36331 */ "Coast360 Federal Credit Union", /* 36332 */ "Wilshire Media Group", /* 36333 */ "Dialog Information Technology", /* 36334 */ "aceway telecom co.,Ltd", /* 36335 */ "Arxscan Inc.", /* 36336 */ "St. Antonius Ziekenhuis", /* 36337 */ "RESI Informatik & Automation GmbH", /* 36338 */ "Neurosearch A/S", /* 36339 */ "Phonographic Performance Limited", /* 36340 */ "Optiver", /* 36341 */ "Erlyvideo", /* 36342 */ "CoreCodec, Inc.", /* 36343 */ "Skyfiber Inc", /* 36344 */ "Benchbee co., Ltd.", /* 36345 */ "X-TRANS, Inc.", /* 36346 */ "Prosodie", /* 36347 */ "Compass-EOS", /* 36348 */ "ANSEC Group, s.r.o.", /* 36349 */ "New Zealand Ministry of Education", /* 36350 */ "CESI S.p.A.", /* 36351 */ "Just IT s.r.l.", /* 36352 */ "Bridgewater", /* 36353 */ "globo.com", /* 36354 */ "BIRUNI Grid Computing Centre", /* 36355 */ "Zycomm Electronics Limited", /* 36356 */ "NOMOS-BANK Open Joint-Stock Company", /* 36357 */ "Whole Foods Market Services, Inc", /* 36358 */ "Securus Software Ltd", /* 36359 */ "ASTELNET", /* 36360 */ "APTEC, LLC", /* 36361 */ "OT Bioelettronica snc", /* 36362 */ "NRT LLC", /* 36363 */ "Stefan Reinhold", /* 36364 */ "OTJ Tecnologia", /* 36365 */ "Kaminario", /* 36366 */ "E-SONDE NETWORK MONITORING, S.L.", /* 36367 */ "Shenzhen Hexicom Technology Co., Ltd.", /* 36368 */ "Cirrascale Corporation", /* 36369 */ "Growth Curve Technologies Ltd.", /* 36370 */ "Solium Capital Inc.", /* 36371 */ "Flygprestanda U.S. Inc.", /* 36372 */ "HHO_Automation", /* 36373 */ "MIG", /* 36374 */ "Neota Logic Inc.", /* 36375 */ "VersaSuite", /* 36376 */ "Schmidt electronic", /* 36377 */ "Nordic AkkaSource AB", /* 36378 */ "Mesto Prostejov", /* 36379 */ "Internet Applications Research and Development, LLC", /* 36380 */ "TeleMate.Net Software", /* 36381 */ "Damballa, Inc.", /* 36382 */ "VDC Display Company", /* 36383 */ "Designfusion Inc.", /* 36384 */ "NMS Unlimited", /* 36385 */ "Digia cc", /* 36386 */ "Scorpion Holding Company Limited", /* 36387 */ "Sanctuary Group", /* 36388 */ "Infospectrum India Pvt. Ltd.", /* 36389 */ "Nice Thoughts", /* 36390 */ "Beijing JinYuanXin Technology Co.,Ltd.", /* 36391 */ "Taxcom Ltd.", /* 36392 */ "Bohemia Interactive", /* 36393 */ "Benco Dental", /* 36394 */ "Hochschule Wilhelmshaven/Oldenburg/Elsfleth", /* 36395 */ "OAO \"FSK EES\" MES Siberian", /* 36396 */ "Plurk Inc.", /* 36397 */ "Ingenieria GBR, C.A.", /* 36398 */ "39th Studios, LLC", /* 36399 */ "Neo Silurian Technologies (NS-Technologies)", /* 36400 */ "Dax Networks Ltd", /* 36401 */ "Chunichi Denshi Co.,LTD.", /* 36402 */ "sentiam, inc.", /* 36403 */ "Mako Networks Ltd", /* 36404 */ "Department of Information System, Hanoi National university of Education, Vietnam", /* 36405 */ "PopTarantula", /* 36406 */ "Peer Review Mediation and Arbitration", /* 36407 */ "Norges Bank Investment Management", /* 36408 */ "Foyer Assurances S.A.", /* 36409 */ "gokuraku.it", /* 36410 */ "Zhejiang Chuangyi Technology Co., Ltd", /* 36411 */ "Scientific manufacturing firm Stalenergo Limited", /* 36412 */ "LUMIPLAN SAS", /* 36413 */ "Espial Group Inc.", /* 36414 */ "INRS Custom Data Inc", /* 36415 */ "Harritronics LLC", /* 36416 */ "KDE e.V", /* 36417 */ "Qwilt Inc.", /* 36418 */ "Path Intelligence", /* 36419 */ "Trinet Co., Ltd.", /* 36420 */ "geniegate.com", /* 36421 */ "Gaikai, Inc.", /* 36422 */ "Warped Reality Studios", /* 36423 */ "Roberto De Duro", /* 36424 */ "Fladi.at", /* 36425 */ "AT Software und Rechnertechnik GmbH", /* 36426 */ "Soneco d.o.o.", /* 36427 */ "Inreal Technologies Ltd", /* 36428 */ "TOOLS.LV SIA", /* 36429 */ "Piarista Gimnázium, Vác", /* 36430 */ "Cobham", /* 36431 */ "Proteco Industria Eletrotecnica Ltda.", /* 36432 */ "Station to Station BV", /* 36433 */ "Inovit GmbH", /* 36434 */ "Rathravane LLC", /* 36435 */ "Beijing GuoTie HuaChen Communication & Information Technology Co.,Ltd.", /* 36436 */ "ASAHI ELECTRONICS CO.,LTD.", /* 36437 */ "Shanghai XZ-COM. Co.,Ltd.", /* 36438 */ "Telenetik Corporation", /* 36439 */ "RICH RIGHT TECHNOLOGY LIMITED", /* 36440 */ "G-FIT GmbH & Co. KG", /* 36441 */ "comune di Jesi", /* 36442 */ "eikju: AG", /* 36443 */ "Sana IT Services GmbH Berlin-Brandenburg", /* 36444 */ "fotocom", /* 36445 */ "netkey information technology gmbh", /* 36446 */ "Colliers International", /* 36447 */ "Verkehrsautomatisierung Berlin GmbH", /* 36448 */ "Computation Institute", /* 36449 */ "DFZ", /* 36450 */ "CNP Assurances", /* 36451 */ "Samara Institute of Open Education", /* 36452 */ "Vanguardia Liberal", /* 36453 */ "RGI, Inc", /* 36454 */ "synertronixx GmbH", /* 36455 */ "Freiwillige Feuerwehr Strasshof", /* 36456 */ "APL software, SL", /* 36457 */ "Triumfant, Inc.", /* 36458 */ "SURVISION", /* 36459 */ "PangyreSoft", /* 36460 */ "Squeep", /* 36461 */ "1st Source Bank", /* 36462 */ "DNW Technologies", /* 36463 */ "henrich", /* 36464 */ "Data Center Manageability Interface Forum", /* 36465 */ "Ballard Fuel Cell Systems", /* 36466 */ "adesso AG", /* 36467 */ "Cornastone Infrastructure Services (Pty) Ltd", /* 36468 */ "Through IP Pty. Ltd.", /* 36469 */ "Sofdela Inc.", /* 36470 */ "Beijing SureKAM Technology Co., Ltd.", /* 36471 */ "Ilait", /* 36472 */ "Direct One S.A.", /* 36473 */ "Lifespan Corporation", /* 36474 */ "Fujian Etim Information & Technology Co,.Ltd.", /* 36475 */ "Academia de Informática Brava, Engenharia de Sistema, Lda", /* 36476 */ "Ministry Of Health, Saudi Arabia", /* 36477 */ "WareValley", /* 36478 */ "Fastbooking", /* 36479 */ "Driving Growth International GmbH", /* 36480 */ "eqqon GmbH", /* 36481 */ "First Businesspost GmbH", /* 36482 */ "Lowe Enterprises and Destination Hotels and Resorts", /* 36483 */ "JaReVo", /* 36484 */ "nCk Research LLC", /* 36485 */ "Ecator Ltd", /* 36486 */ "Shanghai Xinmin Telecom Technologies Co.,Ltd", /* 36487 */ "Brimrose Technology Corporation", /* 36488 */ "Geovan Salvato Borges", /* 36489 */ "MassHousing", /* 36490 */ "California State University, Long Beach", /* 36491 */ "JUNet (Jordanian Network Universities)", /* 36492 */ "IDIS Co.,Ltd.", /* 36493 */ "Fixmo Inc", /* 36494 */ "Systemfive", /* 36495 */ "TeamBox SARL", /* 36496 */ "Buzzinbees SAS", /* 36497 */ "Asurea Insurance Services", /* 36498 */ "West Penn Allegheny Health Systems", /* 36499 */ "Behavioreal Ltd.", /* 36500 */ "Ever-Team Software", /* 36501 */ "NetBoss Technologies, Inc.", /* 36502 */ "waldmeisda.com", /* 36503 */ "Joint Stock Company «Arkhangelsk Sale Company»", /* 36504 */ "Viatel", /* 36505 */ "Com N S Ltd.", /* 36506 */ "chgauert", /* 36507 */ "Unica Corporation", /* 36508 */ "BeiJing testor techniqual Ltd", /* 36509 */ "TechnoServ A/S", /* 36510 */ "MKB Unionbank AD", /* 36511 */ "CITILOG", /* 36512 */ "SOGELINK SAS", /* 36513 */ "Ipeer Internet Network", /* 36514 */ "Suprema Corte de Justicia de la República Oriental del Uruguay", /* 36515 */ "Beaufort Delta Education Council", /* 36516 */ "Estalea, L.P.", /* 36517 */ "RF Technology Pty Ltd", /* 36518 */ "bsdn", /* 36519 */ "SIGI", /* 36520 */ "Global RadioData Communications Ltd", /* 36521 */ "Simples Consultoria", /* 36522 */ "SippySoft", /* 36523 */ "Locus Telecommunications, Inc.", /* 36524 */ "Imatia Innovation S.L.", /* 36525 */ "Blackhawk Computer Services", /* 36526 */ "Mark Pröhl", /* 36527 */ "WMZ Engenharia", /* 36528 */ "BlueSpace Software", /* 36529 */ "Fruktträdet", /* 36530 */ "netford", /* 36531 */ "State Agency of Medicines of Latvia", /* 36532 */ "Danaher Corporation", /* 36533 */ "Bitartists", /* 36534 */ "Der Beck GmbH", /* 36535 */ "Eprinsa", /* 36536 */ "Beijing NeTopChip Technology Co.,LTD", /* 36537 */ "ExperTeach Gesellschaft für Netzwerkkompetenz mbH", /* 36538 */ "smart SNMP", /* 36539 */ "Innofinity GmbH", /* 36540 */ "FIVES", /* 36541 */ "St.Petersburg Out-patient department N106", /* 36542 */ "Sascha Silbe", /* 36543 */ "Universidade Federal do ABC", /* 36544 */ "ii2P, LLC", /* 36545 */ "Towers Watson", /* 36546 */ "Heimatverein Elte e.V.", /* 36547 */ "Virtualmin Inc", /* 36548 */ "Medienzentrum Kassel", /* 36549 */ "AnthonyVinhPham", /* 36550 */ "RAADIUS LLC", /* 36551 */ "Cora Informatique", /* 36552 */ "Altos Solutions", /* 36553 */ "Moocom Corporation", /* 36554 */ "TimeTools Limited", /* 36555 */ "Triad Semiconductor, Inc.", /* 36556 */ "Positive Software sprl", /* 36557 */ "Actus Digital", /* 36558 */ "Bitnet.hu Ltd.", /* 36559 */ "Entr'ouvert", /* 36560 */ "Nwork Co.,Ltd.", /* 36561 */ "Green Resource Inc.", /* 36562 */ "Remsdaq Limited", /* 36563 */ "Daniel Fernandes", /* 36564 */ "Washington State Patrol", /* 36565 */ "new frontiers software GmbH", /* 36566 */ "Teva Pharmaceutical Industries Ltd.", /* 36567 */ "Anixter", /* 36568 */ "Gridstore", /* 36569 */ "Gemüsering Stuttgart GmbH", /* 36570 */ "Picoware Ltd", /* 36571 */ "NET4GAS, s.r.o.", /* 36572 */ "Harney", /* 36573 */ "SCI Group", /* 36574 */ "MerLar", /* 36575 */ "APB PRODATA LTDA.", /* 36576 */ "Starscriber Corporation", /* 36577 */ "Kron Telekomunikasyon Hizmetleri A.S", /* 36578 */ "Erste Bank Hungary Nyrt.", /* 36579 */ "DVG Deutsche Vertriebsgesellschaft für Publikationen und Filme mbH", /* 36580 */ "BSTECNOLOGIA", /* 36581 */ "Arduino (http://www.arduino.cc/)", /* 36582 */ "Tom Aafloen", /* 36583 */ "vmkid.com", /* 36584 */ "Logan Technologies", /* 36585 */ "NET IDEA d.o.o.", /* 36586 */ "NFB Consulting", /* 36587 */ "Satellink, Inc", /* 36588 */ "Pier 1 Imports", /* 36589 */ "Rb Datensysteme GmbH", /* 36590 */ "Prefeitura Municipal de Fortaleza", /* 36591 */ "The CBORD Group, Inc.", /* 36592 */ "Paul De Audney", /* 36593 */ "Certi Networks Sdn Bhd", /* 36594 */ "Ena Tecnologia, S.L.", /* 36595 */ "Dachser GmbH & Co. KG", /* 36596 */ "PRDS", /* 36597 */ "SELEX Systems Integration Inc", /* 36598 */ "Bremer Landesbank", /* 36599 */ "Nashire AG (startup) (http://www.nashire.com)", /* 36600 */ "OTPasswd", /* 36601 */ "Observium", /* 36602 */ "ITechnical", /* 36603 */ "Media Service Provider Ltd", /* 36604 */ "Hannover Rückversicherung AG", /* 36605 */ "Littlehall Corporation", /* 36606 */ "Johnny Abrahamsson", /* 36607 */ "whty", /* 36608 */ "Universita' del Salento", /* 36609 */ "August Moon LLC", /* 36610 */ "Ziborski KG", /* 36611 */ "AngloGold Ashanti", /* 36612 */ "United Europe Holding OJSC", /* 36613 */ "itl Institut für technische Literatur AG", /* 36614 */ "Identity Networks", /* 36615 */ "Arcatem", /* 36616 */ "RooX", /* 36617 */ "Alceo s.r.l.", /* 36618 */ "Beatport, LLC", /* 36619 */ "8086 Limited", /* 36620 */ "Krithia Ltd", /* 36621 */ "WELLHAT,INC", /* 36622 */ "Swedish Orphan Biovitrum", /* 36623 */ "Senath Pty Ltd", /* 36624 */ "Allesklar.com AG", /* 36625 */ "State of Montana", /* 36626 */ "COMPLUS CZ, a.s.", /* 36627 */ "Inphosoft Pte Ltd", /* 36628 */ "Assens Kommune", /* 36629 */ "3stylestudio srl", /* 36630 */ "Portalify Ltd", /* 36631 */ "Scalr Inc.", /* 36632 */ "Ivoclar Vivadent Corporation", /* 36633 */ "LinkORB", /* 36634 */ "Kirchliche Paedagogische Hochschule Wien/Krems", /* 36635 */ "AMS Ltd.", /* 36636 */ "Delaware Department of Education", /* 36637 */ "Planphoria, LLC", /* 36638 */ "TimedOut Services", /* 36639 */ "Benjamin Tietz", /* 36640 */ "Famos, LLC", /* 36641 */ "FireID", /* 36642 */ "ANNAX Schweiz AG", /* 36643 */ "WiseMo A/S", /* 36644 */ "cybertronixx consulting services GmbH", /* 36645 */ "San Diego State University", /* 36646 */ "STV Electronic GmbH", /* 36647 */ "Netherlands Institute for Neuroscience", /* 36648 */ "Traficon International n.v.", /* 36649 */ "Joh. Enschedé IT & Consultancy", /* 36650 */ "Sportvision, Inc", /* 36651 */ "denkagenten GbR", /* 36652 */ "Copenhagen Business School", /* 36653 */ "CHU de Nantes", /* 36654 */ "Innovative Energies", /* 36655 */ "Unger, Welsow & Company GmbH", /* 36656 */ "Axept AG", /* 36657 */ "OMGPOP", /* 36658 */ "ATRUST COMPUTER CORPORATION", /* 36659 */ "PAUL Consultants e.V.", /* 36660 */ "MailCleaner", /* 36661 */ "Tognum AG", /* 36662 */ "Aish Technologies Limited", /* 36663 */ "Stadt Warburg", /* 36664 */ "Egress Software Technologies Ltd", /* 36665 */ "Golden Frog, Inc.", /* 36666 */ "Orange County Container Group LLC", /* 36667 */ "Canadian Standards Association", /* 36668 */ "Medicom Health Interactive", /* 36669 */ "Bundesministerium für Inneres - Republik Österreich", /* 36670 */ "Guangzhou Changyue Electronic Technology Ltd.", /* 36671 */ "FieldView Solutions", /* 36672 */ "IP Infusion Inc", /* 36673 */ "Moving Impressions", /* 36674 */ "Cossette", /* 36675 */ "E-Prime Co., Ltd.", /* 36676 */ "Nejla", /* 36677 */ "Barmherzige Brüder Österreich", /* 36678 */ "eo Networks S.A.", /* 36679 */ "B&W Software GmbH", /* 36680 */ "IsoBeef GbR", /* 36681 */ "Reaonix, LLC", /* 36682 */ "ApexIdentity Inc.", /* 36683 */ "NetCom Consulting GmbH", /* 36684 */ "Mozdell Inc,", /* 36685 */ "iSencia AB", /* 36686 */ "JaxMP L.L.C.", /* 36687 */ "DOORSolutions", /* 36688 */ "J&T Systems", /* 36689 */ "HCS - HES Cabling Systems", /* 36690 */ "Dolphin Speed Networks Ltd", /* 36691 */ "Open Certification Centre", /* 36692 */ "SGI Japan, Ltd.", /* 36693 */ "The Revenue Department", /* 36694 */ "Cognitive Security, Ltd.", /* 36695 */ "Natural History Museum", /* 36696 */ "Neo Telecoms", /* 36697 */ "Toyon", /* 36698 */ "The Engle Group", /* 36699 */ "Defferrari Sistemas de Informática Ltda", /* 36700 */ "Cogeco Cable", /* 36701 */ "Cerbini", /* 36702 */ "ABR Innovations, LLC.", /* 36703 */ "My Ways, Org.", /* 36704 */ "National Time Service Center,Chinese Academy of Sciences", /* 36705 */ "Fundación Centro Oncológico de Galicia \"José Antonio Quiroga y Piñeyro\"", /* 36706 */ "SpiderCloud Wireless, Inc.", /* 36707 */ "Sensus Informatika Kft.", /* 36708 */ "Mezeo Software Corporation", /* 36709 */ "Anoigo Services Ltd.", /* 36710 */ "Micromodje Industries", /* 36711 */ "The Cell", /* 36712 */ "Alepo USA", /* 36713 */ "jackl0phty, LLC", /* 36714 */ "SEAS-NVE", /* 36715 */ "Jiu Info & Tech", /* 36716 */ "Studentenwerk München", /* 36717 */ "Futurice Ltd", /* 36718 */ "onedrous.com", /* 36719 */ "Evax S.A.R.L.", /* 36720 */ "Cuker Interactive", /* 36721 */ "TSC Technologies", /* 36722 */ "ILT Innovations AB", /* 36723 */ "Kaplan Research and Application Prototyping", /* 36724 */ "Artisan Computer Services LLC", /* 36725 */ "Centered Logic, LLC", /* 36726 */ "Benchmark Systems, LLC", /* 36727 */ "Ellerines", /* 36728 */ "EAS Schaltanlagen GmbH", /* 36729 */ "TAGSYS RFID", /* 36730 */ "Agorabox", /* 36731 */ "PDR Network", /* 36732 */ "ForgeRock", /* 36733 */ "Leibniz Center for Marine Tropical Ecology (ZMT)", /* 36734 */ "Regione Emilia Romagna", /* 36735 */ "Balance of Nature", /* 36736 */ "Pošta Crne Gore", /* 36737 */ "BLINQ Networks Inc.", /* 36738 */ "Christophe Garault", /* 36739 */ "Sinicnet Technology Co., Ltd.", /* 36740 */ "CV Rekatama Elektronika Persada", /* 36741 */ "Provincial Government of the Western Cape", /* 36742 */ "GESTICUMPRE", /* 36743 */ "mcclishingramcatering service", /* 36744 */ "ninjo-workstation, EuMetSys c/o Ernst Basler + Partner GmbH", /* 36745 */ "Papendorf Software Engineering GmbH", /* 36746 */ "Vertica A/S", /* 36747 */ "Leine & Linde AB", /* 36748 */ "European Media Laboratory GmbH", /* 36749 */ "JaCoTec", /* 36750 */ "RPC Scandinavia", /* 36751 */ "Datasinc", /* 36752 */ "Engineering with IT", /* 36753 */ "BZK GROUP Sp. z o.o.", /* 36754 */ "stocker-schmid.ch", /* 36755 */ "Fossmart Pvt Limited", /* 36756 */ "GuanFang Technologies Co., Ltd", /* 36757 */ "FORTRUST LLC", /* 36758 */ "eks Engel GmbH & Co. KG", /* 36759 */ "Ancitel S.p.A.", /* 36760 */ "Datera S.A.", /* 36761 */ "Actisis GmbH", /* 36762 */ "Riverside Health System", /* 36763 */ "Linuxstar DE", /* 36764 */ "Herff Jones Inc", /* 36765 */ "Ixolit GmbH", /* 36766 */ "Rockyou", /* 36767 */ "IT Prof Service Ltd.", /* 36768 */ "Originity", /* 36769 */ "Redmark", /* 36770 */ "Learning Unlimited, Inc.", /* 36771 */ "Funk-Electronic Piciorgros GmbH", /* 36772 */ "SecurActive", /* 36773 */ "op5 AB", /* 36774 */ "Akera S.r.l.", /* 36775 */ "Washington State University Extension Energy Program", /* 36776 */ "sedOSS AB", /* 36777 */ "Leap Power", /* 36778 */ "University Corporation for Atmospheric Research", /* 36779 */ "Format Computing", /* 36780 */ "Monument Systems LLC", /* 36781 */ "Premier Wireless, Inc.", /* 36782 */ "Tasco Sales (Aust) Pty Ltd", /* 36783 */ "FMS Software Ltd.", /* 36784 */ "Diino AB", /* 36785 */ "TechMA s.r.l.", /* 36786 */ "Futurex, LLC", /* 36787 */ "Autoridade Nacional de Segurança Rodoviária", /* 36788 */ "BONET Group", /* 36789 */ "POWERVAR INC", /* 36790 */ "eac easy automation components GmbH", /* 36791 */ "ZyTrust SA", /* 36792 */ "Kiwibank", /* 36793 */ "Web4U s.r.o.", /* 36794 */ "Allgemeine Baugesellschaft - A. Porr Aktiengesellschaft", /* 36795 */ "Norbit", /* 36796 */ "No Limits Software", /* 36797 */ "Teamup Technology Limited", /* 36798 */ "Codeworx3 Pty Ltd", /* 36799 */ "DONGGUANG APTECH ELECTRONICS CO., LTD", /* 36800 */ "kokii", /* 36801 */ "Cazoodle, Inc.", /* 36802 */ "Flughafen Stuttgart GmbH", /* 36803 */ "UCN GmbH", /* 36804 */ "RideCharge Inc.", /* 36805 */ "Great River Energy", /* 36806 */ "NetWitness", /* 36807 */ "The Sherwin-Williams Company", /* 36808 */ "ITERANET Ltd", /* 36809 */ "237 Solutions Pty Ltd", /* 36810 */ "Consendo Systems A/S", /* 36811 */ "CSP, Inc.", /* 36812 */ "SafeTek USA, LLC", /* 36813 */ "DEFFAYET", /* 36814 */ "Savings Society Inc", /* 36815 */ "Beijing Abloomy Technologies Co., Ltd", /* 36816 */ "Bohemia Interactive Simulations", /* 36817 */ "Accelya France SAS", /* 36818 */ "Yare Objects AB", /* 36819 */ "Updata Infrastructure UK Limited", /* 36820 */ "Local Matters, Inc.", /* 36821 */ "Adaffix GmbH", /* 36822 */ "Conference Plus, Inc.", /* 36823 */ "UFPS \"Tatarstan pochtasy\" - filial FGUP \"Pochta Rossii\"", /* 36824 */ "Grenada Lake Medical Center", /* 36825 */ "Control Zero", /* 36826 */ "Message Solution", /* 36827 */ "CEZ, a. s.", /* 36828 */ "LAGARDERE ACTIVE", /* 36829 */ "WHATEVER MOBILE GmbH", /* 36830 */ "Ratio Consulta", /* 36831 */ "Pocket Kings Ltd", /* 36832 */ "Authenware Corporation", /* 36833 */ "Omnis Cloud", /* 36834 */ "Solimar Systems, Inc.", /* 36835 */ "Brian Carlson", /* 36836 */ "Hangzhou Future Technology Co.,Ltd", /* 36837 */ "GK Software AG", /* 36838 */ "Connect Informatica S.r.l.", /* 36839 */ "Peter Kutting IT-Services", /* 36840 */ "Thor DMS", /* 36841 */ "CSR Ltd", /* 36842 */ "Valley Telegence Private Ltd", /* 36843 */ "Sozialhilfeverband Kirchdorf an der Krems", /* 36844 */ "ABACOM-Ingenieurgesllschaft", /* 36845 */ "OOO \"SMU OFISSTROY\"", /* 36846 */ "International Game Technology, Inc.", /* 36847 */ "CRE-DO GmbH", /* 36848 */ "Samsung Techwin Co., Ltd.", /* 36849 */ "Dharma Drum Buddhist College (DDBC)", /* 36850 */ "OutputLinks, Inc.", /* 36851 */ "Bnei Baruch", /* 36852 */ "axilaris GmbH", /* 36853 */ "BURGO GROUP SPA", /* 36854 */ "Ge.Si.ass scrl", /* 36855 */ "GEDIA Gebrüder Dingerkus GmbH", /* 36856 */ "Holztechnikum Kuchl", /* 36857 */ "THQ Inc.", /* 36858 */ "Ixia", /* 36859 */ "True Value Company", /* 36860 */ "Pacmed International Inc", /* 36861 */ "Mitrol SRL", /* 36862 */ "sankai", /* 36863 */ "South Stream", /* 36864 */ "delight software gmbh", /* 36865 */ "Zott GmbH & Co. KG", /* 36866 */ "Zaměstnanci.com s.r.o.", /* 36867 */ "SignGuard Europe Ab", /* 36868 */ "Sofium", /* 36869 */ "Walter Parr", /* 36870 */ "Daylife, Inc.", /* 36871 */ "Tekno Telecom, L.L.C.", /* 36872 */ "Wideportal IT Solutions UG (haftungsbeschränkt)", /* 36873 */ "Anerma Electronics b.v.b.a", /* 36874 */ "TOYO Corporation", /* 36875 */ "Chongqing Rural Commercial Bank", /* 36876 */ "Sundale Garden Village", /* 36877 */ "Insta Group Ltd.", /* 36878 */ "New Mexico Consortium", /* 36879 */ "tolj.org system architecture", /* 36880 */ "Simon Josefsson Datakonsult AB", /* 36881 */ "Texas Department of Transportation", /* 36882 */ "Modernizing Medicine, Inc.", /* 36883 */ "ESE (Mod-Electronics Inc.)", /* 36884 */ "CImbal Inc.", /* 36885 */ "Oliver Wyman Group", /* 36886 */ "ArtPlant", /* 36887 */ "E-Formation GmbH", /* 36888 */ "China Bluedon information security technology co., ltd", /* 36889 */ "future Training & Consulting GmbH", /* 36890 */ "Nomadic Technologies Inc.", /* 36891 */ "Axel Springer SE", /* 36892 */ "Takacom Corporation", /* 36893 */ "Compagnie Européenne des Emballages Robert Schisler", /* 36894 */ "Guangdong Newstart Technology Service Co.,Ltd", /* 36895 */ "Quality Manager Plus AS", /* 36896 */ "OEConnection LLC", /* 36897 */ "Finning (Canada)", /* 36898 */ "CEVA Sante Animale", /* 36899 */ "Atricore, Inc.", /* 36900 */ "Art Is Rebellion", /* 36901 */ "OneWaiheke", /* 36902 */ "Osyris", /* 36903 */ "Legion Telekommunikation GmbH", /* 36904 */ "MedCentral Health System", /* 36905 */ "Institute for Internet Technologies and Applications", /* 36906 */ "Luggage Pros", /* 36907 */ "Research Industrial Systems Engineering (RISE) Forschungs-, Entwicklungs- und Großprojektberatung GmbH", /* 36908 */ "Bison IT Services AG", /* 36909 */ "Pacific Communications", /* 36910 */ "EEtrust", /* 36911 */ "Lenglet imprimeurs", /* 36912 */ "Asociación Cooperativa Sutronix, R.L.", /* 36913 */ "Square, Inc.", /* 36914 */ "ALFATRUST CERTIFICATION S.A.", /* 36915 */ "Gemeente Groningen", /* 36916 */ "Tunz.com", /* 36917 */ "Altran", /* 36918 */ "Mentana - Claimsoft GmbH", /* 36919 */ "Yearsun Industrial Co., Ltd.", /* 36920 */ "LLC SIBUR", /* 36921 */ "Eurohueco S.A.", /* 36922 */ "schlott gruppe Aktiengesellschaft", /* 36923 */ "Doosan Power Systems Limited", /* 36924 */ "Heinrich Schmid Systemhaus GmbH & Co. KG", /* 36925 */ "Prime Therapeutics", /* 36926 */ "Innovasic Semiconductor Inc", /* 36927 */ "Technical University of Lodz Computer Center", /* 36928 */ "Vitri Solutions Private Limited", /* 36929 */ "Zoe Evangelistische Vereinigung", /* 36930 */ "Aboagye Okyere Emmanuel", /* 36931 */ "Zetetic LLC", /* 36932 */ "PXL S.C. ARL", /* 36933 */ "Lemco Electronics", /* 36934 */ "Kentuckiana Pride Foundation", /* 36935 */ "Clinical Software Solutions", /* 36936 */ "Alphasoft Nederland", /* 36937 */ "Profweb", /* 36938 */ "Sentinela Security Ltda.", /* 36939 */ "TLO", /* 36940 */ "Solekai Systems Corporation", /* 36941 */ "KAVECO-Workflow", /* 36942 */ "Venice International University", /* 36943 */ "ANO \"TV-Novosti\"", /* 36944 */ "Advance Milles System Co.,Ltd.", /* 36945 */ "Web Technology Projects ltd.", /* 36946 */ "Multilab AS", /* 36947 */ "OpenIT GmbH", /* 36948 */ "GFI", /* 36949 */ "Dédalo Helicolor S.A.", /* 36950 */ "Southern Illinois Univeristy", /* 36951 */ "Kunming Railway Signalling And Telecommunications Department", /* 36952 */ "VOX - Norwegian Agency for Lifelong Learning", /* 36953 */ "42 Units - IT, Ltd.", /* 36954 */ "ELSIST Srl", /* 36955 */ "SEMATECH", /* 36956 */ "libvirt", /* 36957 */ "Receptive IT", /* 36958 */ "The Cellars Group LLC", /* 36959 */ "TPH Acquisitions LLLP", /* 36960 */ "BOC GmbH", /* 36961 */ "Advertiser Technologies", /* 36962 */ "Communications Supply & Support Limited", /* 36963 */ "Arkodia Technologies, LLC", /* 36964 */ "CriptoTec", /* 36965 */ "CCDMD", /* 36966 */ "FNet", /* 36967 */ "Ocom Communications, Inc.", /* 36968 */ "NELLS Electronic Systems, Inc.", /* 36969 */ "FinanceScout24 GmbH", /* 36970 */ "Transcend Communication Beijing Co.,Ltd", /* 36971 */ "Banco Central de Honduras", /* 36972 */ "Phoenix Capital", /* 36973 */ "Simulation Systems Ltd", /* 36974 */ "UrgentCare Works, LLC", /* 36975 */ "Critter bvba", /* 36976 */ "Eloqua Corporation", /* 36977 */ "Pico Digital Inc", /* 36978 */ "accumio GmbH", /* 36979 */ "Steinle Solution-Factory GmbH", /* 36980 */ "Kindersprachscreening", /* 36981 */ "UNESCO-IHE", /* 36982 */ "Kiwilight.com Limited", /* 36983 */ "TAO Beratungs- und Management GmbH", /* 36984 */ "Sewar Technologies", /* 36985 */ "Piratenpartei Oesterreichs", /* 36986 */ "OnVPS", /* 36987 */ "host4u.at", /* 36988 */ "BEIJING XINGHUA BRAINRUST TECHNOLOGY CO.,LTD", /* 36989 */ "Prinovis Nuernberg GmbH", /* 36990 */ "CASTEL", /* 36991 */ "SystemGroup", /* 36992 */ "Lucid Design Group", /* 36993 */ "Fastnet", /* 36994 */ "akrido.net", /* 36995 */ "Fordingbridge Computer Services", /* 36996 */ "XuZhou Medical College", /* 36997 */ "MTek Enterprises, LLC", /* 36998 */ "Instituto de Tecnologia Química e Biológica", /* 36999 */ "Joel Hatcher", /* 37000 */ "MindShift Corp", /* 37001 */ "Diversified Control, Inc.", /* 37002 */ "Vertu", /* 37003 */ "VMTurbo", /* 37004 */ "Medizinische Einrichtungen des Bezirks Oberpfalz GmbH", /* 37005 */ "Koger, Inc.", /* 37006 */ "LOGIWAYS", /* 37007 */ "Cleopatra", /* 37008 */ "CHIP-N LLC", /* 37009 */ "Saguna Networks LTD", /* 37010 */ "KFSoftware", /* 37011 */ "Bestgo.pl Sp. Z O.O.", /* 37012 */ "eoswan", /* 37013 */ "Hanming Technology Co., Ltd", /* 37014 */ "Harms Consulting Pty Ltd", /* 37015 */ "Unicredit S.P.A.", /* 37016 */ "NATION Technologies Group, Inc", /* 37017 */ "Phabrix", /* 37018 */ "LANOS Computer GmbH & Cie KG", /* 37019 */ "Dichotomia", /* 37020 */ "ScandFibre Logistics AB", /* 37021 */ "Scientific and Production Company Granch Ltd.", /* 37022 */ "KazTransCom JSC", /* 37023 */ "edv neubrand", /* 37024 */ "Maverick Wireless Solutions Private Limited", /* 37025 */ "Mylab Oy", /* 37026 */ "rc-tec GmbH", /* 37027 */ "Fernwaerme Ulm GmbH", /* 37028 */ "Technology On Demand, Inc.", /* 37029 */ "G4S Technology Limited", /* 37030 */ "Studio MekTek, Inc", /* 37031 */ "RR Donnelley Europe Sp. z o.o.", /* 37032 */ "Eden Rock Communications", /* 37033 */ "Goatrace Ltd", /* 37034 */ "Kitami Institute of Technology", /* 37035 */ "Geekerati", /* 37036 */ "America First Federal Credit Union", /* 37037 */ "ComplexNet Ltd.", /* 37038 */ "EtherWorks Pty. Ltd.", /* 37039 */ "GoldCard spol. s r. o.", /* 37040 */ "Thales Alenia Space España", /* 37041 */ "Bee Software Inc.", /* 37042 */ "Irkutsk regional clinical hospital", /* 37043 */ "DINEC International", /* 37044 */ "LexisNexis Univentio B.V.", /* 37045 */ "Fjord Technology UG (haftungsbeschränkt)", /* 37046 */ "InterCard Kartensyteme GmbH", /* 37047 */ "Tetra Tech Inc.", /* 37048 */ "UFCSPA", /* 37049 */ "Techyond Inc.", /* 37050 */ "Oliver Roll", /* 37051 */ "and One Inc.", /* 37052 */ "MMR Network Management Science & Technology Co., Ltd", /* 37053 */ "AirP Systems LLC", /* 37054 */ "JM Properties", /* 37055 */ "ATM Japan, Ltd.", /* 37056 */ "Quickpay Ltd.", /* 37057 */ "thockar IT consulting", /* 37058 */ "Command and Control Systems", /* 37059 */ "Silicon & Software Systems Ltd.", /* 37060 */ "Sargento Foods Inc.", /* 37061 */ "RigNet, Inc.", /* 37062 */ "SARL AEGLE INFORMATIQUE MEDICALE", /* 37063 */ "The University of Kitakyushu", /* 37064 */ "COTEK ELECTRONIC IND.CO.,LTD", /* 37065 */ "OE INVESTMENTS LIMITED", /* 37066 */ "Centrum Rozwoju Szkół Wyższych TEB Akademia sp. z o.o.", /* 37067 */ "Arizona Coppersoft", /* 37068 */ "Broadband Antenna Tracking Systems", /* 37069 */ "RadioOpt GmbH", /* 37070 */ "Sofistone Oy", /* 37071 */ "Lantech Communications Global, Inc.", /* 37072 */ "BEIJING JETSEN TECHNOLOGY CO.,LTD", /* 37073 */ "Assam Electronics Development Corporation Limited (AMTRON)", /* 37074 */ "rootsys", /* 37075 */ "IPETRIK", /* 37076 */ "Albuquerque Public Schools", /* 37077 */ "Nor1, Inc.", /* 37078 */ "Wofford College", /* 37079 */ "3VR Security, Inc.", /* 37080 */ "Wicked Trickster LLC", /* 37081 */ "Ministry of Finance", /* 37082 */ "Blok Software Development (BlokSoft)", /* 37083 */ "9h37", /* 37084 */ "KDS", /* 37085 */ "Elemental Technologies, Inc.", /* 37086 */ "Holy Cross Energy", /* 37087 */ "Teamsourcing Cia. Ltda.", /* 37088 */ "Mediengruppe Pressedruck Dienstleistungs-GmbH & Co. OHG", /* 37089 */ "OUVREZLABOITE", /* 37090 */ "Orion Virtualisation Solutions Pty Limited", /* 37091 */ "CJ Computers", /* 37092 */ "Consolidated Edison Company of New York Inc", /* 37093 */ "MadPilot Productions", /* 37094 */ "GH-Informatik GmbH.", /* 37095 */ "Dongnian Networks Inc", /* 37096 */ "UkSATSE", /* 37097 */ "Ingenieursbureau Ebatech BV", /* 37098 */ "Itautec S.A.", /* 37099 */ "Endai Worldwide", /* 37100 */ "Quelltext AG", /* 37101 */ "Wind mobile", /* 37102 */ "Infinetix Corp.", /* 37103 */ "Pebble Beach System Ltd", /* 37104 */ "Secure Systems and Technologies Ltd", /* 37105 */ "RazorThreat, Inc.", /* 37106 */ "Manitoba Telecom Services", /* 37107 */ "DonbassInformCommunicationService", /* 37108 */ "SMS Data Products Group, Inc.", /* 37109 */ "Altera Corporation", /* 37110 */ "Institute for Clinical and Experimental Medicine", /* 37111 */ "Infosol d.o.o.", /* 37112 */ "Chita State University", /* 37113 */ "Christian Aid", /* 37114 */ "VIVA SOFT LTD", /* 37115 */ "Instituto Nacional de Seguros", /* 37116 */ "Industrial Thinking Ltd", /* 37117 */ "Panoramic Data", /* 37118 */ "Object ECM AG", /* 37119 */ "Velocent Systems Inc.", /* 37120 */ "Eiritu Equipment Technology Co.,Ltd", /* 37121 */ "EVOTRIX SYSTEMS", /* 37122 */ "BYTIS Ltd.", /* 37123 */ "beatandmusic media GmbH", /* 37124 */ "Omega Cube", /* 37125 */ "syn2cat a.s.b.l.", /* 37126 */ "SuperLumin Networks", /* 37127 */ "bo.lt", /* 37128 */ "Project 76", /* 37129 */ "Miroslav Mrakota", /* 37130 */ "Unioncast Network Technology Co.,LTD,BeiJing", /* 37131 */ "Friedrich Kuhnt GmbH", /* 37132 */ "Reverse-Logic Ltd.", /* 37133 */ "MackTECH GmbH", /* 37134 */ "oscardijkhoff.nl", /* 37135 */ "Crawford and Company", /* 37136 */ "Reilly Telecom Inc.", /* 37137 */ "tibra", /* 37138 */ "Deep-Secure Ltd", /* 37139 */ "Guavus Inc", /* 37140 */ "MUWA-Spelle", /* 37141 */ "Actua", /* 37142 */ "in-put GbR - Das Linux-Systemhaus", /* 37143 */ "Viktor Gruber", /* 37144 */ "MedicVision", /* 37145 */ "Unitrin Services Group", /* 37146 */ "Alveole Studio", /* 37147 */ "burak özen", /* 37148 */ "OnLineDB ltd", /* 37149 */ "Surtronic International B.V.", /* 37150 */ "Cross Domain Technical Forum", /* 37151 */ "France Net Com", /* 37152 */ "srnjak.com", /* 37153 */ "Junction Software Ltd", /* 37154 */ "ByteActive AB", /* 37155 */ "Hangzhou Lancable Technology Co.,ltd", /* 37156 */ "NetentSec Inc.", /* 37157 */ "cynix.org", /* 37158 */ "SCK-CEN", /* 37159 */ "Continium Ltd.", /* 37160 */ "Mobis Ltd", /* 37161 */ "Softperience", /* 37162 */ "IPS - International Power Supply", /* 37163 */ "IMage INTelligence (IMINT)", /* 37164 */ "Kivanc Oskay", /* 37165 */ "Seillac Co., Ltd.", /* 37166 */ "Infrafuture Inc.", /* 37167 */ "CorpGenie", /* 37168 */ "Xeirius Solutions", /* 37169 */ "SoftwareMind", /* 37170 */ "Dipl.-Ing. (BA) Thomas Knoblauch", /* 37171 */ "Wired Informática e Sistemas Lda", /* 37172 */ "Kluwer", /* 37173 */ "STEP Networks Inc", /* 37174 */ "NovoLink Communications", /* 37175 */ "Integrated Products Inc", /* 37176 */ "Southern Oregon University", /* 37177 */ "Alquist Consulting Ltd", /* 37178 */ "Ab Ovo Nederland BV", /* 37179 */ "Centric Corporation", /* 37180 */ "IP Technology Labs", /* 37181 */ "Viewteq Corp.", /* 37182 */ "Cipherdyne", /* 37183 */ "Aptus Interactive Ltd", /* 37184 */ "AMERSPORTS", /* 37185 */ "Perfecto Mobile", /* 37186 */ "Premier Manufacturing Support Services Poland Sp. z o.o.", /* 37187 */ "eTellicom Pty Ltd", /* 37188 */ "Audit Grup Ltd.", /* 37189 */ "Tecisa74 S.L.", /* 37190 */ "Androscoggin Valley Hospital", /* 37191 */ "INSTITUTO FEDERAL DO PARÁ - IFPA", /* 37192 */ "REACH Global Services", /* 37193 */ "Gaba Corporation", /* 37194 */ "connect co.Ltd", /* 37195 */ "Tieline Technology", /* 37196 */ "Oberfinanzdirektion Niedersachsen", /* 37197 */ "SoftAgency Co., Ltd.", /* 37198 */ "Zentrum fuer Informationstechnologie kreuznacher diakonie", /* 37199 */ "S&L ITcompliance GmbH", /* 37200 */ "S&L Netzwerktechnik GmbH", /* 37201 */ "United Network for Organ Sharing", /* 37202 */ "Global Telecom Tools, LLC", /* 37203 */ "Maxxess Systems, Inc.", /* 37204 */ "SAMPENSION KP LIVSFORSIKRING A/S", /* 37205 */ "FEMSWISS AG", /* 37206 */ "Astrium Services - GEO-Information division", /* 37207 */ "Embedded Planet", /* 37208 */ "San Francisco Department of Public Health", /* 37209 */ "The Monkeysphere Project", /* 37210 */ "Fontana Unified School District", /* 37211 */ "Yamaha motor solutions xiamen", /* 37212 */ "RS Automation Co.,Ltd.", /* 37213 */ "Aeromaritime Systembau GmbH", /* 37214 */ "MicroWorld Technologies Inc.", /* 37215 */ "Clickstream Technologies Plc", /* 37216 */ "Entanet International Ltd.", /* 37217 */ "SZM.com s.r.o.", /* 37218 */ "Wandertec", /* 37219 */ "cPacket Networks Inc.", /* 37220 */ "TerraVision Pty Ltd", /* 37221 */ "ALLCLEAR", /* 37222 */ "Integra-S", /* 37223 */ "international west trading ltd", /* 37224 */ "eParadeigma, LLC", /* 37225 */ "Polizei Saarland", /* 37226 */ "INC Technologies", /* 37227 */ "HandcraftIT", /* 37228 */ "Applied-Intelligence GmbH", /* 37229 */ "Modulo Consulting", /* 37230 */ "University of Plovdiv", /* 37231 */ "GTS-Thaumat XXI, S.A.", /* 37232 */ "Void Sistemas S.L", /* 37233 */ "Xuzhou Normal University", /* 37234 */ "Gen Energija d.o.o.", /* 37235 */ "Stantech Communications Solutions, Inc.", /* 37236 */ "Metabolon", /* 37237 */ "Bateau Limited", /* 37238 */ "MKM Bilgisayar Danismanlik ve Egitim Hizmetleri San. ve Tic. Ltd. Sti.", /* 37239 */ "Joerg Riesmeier", /* 37240 */ "Grupo Soares da Costa SA", /* 37241 */ "Zerolag Communications", /* 37242 */ "Everyone Counts, Inc.", /* 37243 */ "ZigBee Alliance, Inc.", /* 37244 */ "Fusion Crypto", /* 37245 */ "Zerfowski", /* 37246 */ "Thales Solutions Asia", /* 37247 */ "JoongboTech Co, LTD.", /* 37248 */ "Amicon Ltd", /* 37249 */ "Grid2Home", /* 37250 */ "eVent Medical Inc", /* 37251 */ "Image Video", /* 37252 */ "Energy Aware Technology Inc.", /* 37253 */ "Intronis, Inc.", /* 37254 */ "Mirada", /* 37255 */ "Mendeley Ltd", /* 37256 */ "die | brueckenschlaeger", /* 37257 */ "Telekomunikacije RS AD Banja Luka", /* 37258 */ "Netic A/S", /* 37259 */ "XIAN ZIKING NETWORK COMMUNICATIONS CO.,LTD.", /* 37260 */ "University of Shkodra", /* 37261 */ "Sabrefin Limited", /* 37262 */ "Catholic Education Office, Lismore", /* 37263 */ "Tularosa Communications", /* 37264 */ "Delovoy Partner Ltd.", /* 37265 */ "Schindler Elevator Ltd", /* 37266 */ "Tecnobit", /* 37267 */ "Gira Giersiepen GmbH & Co. KG", /* 37268 */ "Rosa-Luxemburg-Stiftung Gesellschaftsanalyse und politische Bildung e. V.", /* 37269 */ "Farell Instruments SL", /* 37270 */ "COESYS s.r.l.", /* 37271 */ "Westvik", /* 37272 */ "Acision Ltd", /* 37273 */ "Infratel, Inc.", /* 37274 */ "Skyfire Labs, Inc.", /* 37275 */ "System of Modular Technologies - ICC", /* 37276 */ "Universidad TecMilenio", /* 37277 */ "Hanselmann Consulting GmbH", /* 37278 */ "eco-ged", /* 37279 */ "jTendo Sp. z o.o.", /* 37280 */ "Signatec ltd.", /* 37281 */ "Barloworld Power", /* 37282 */ "SPF FInances", /* 37283 */ "Energy Sector Security Consortium, Inc.", /* 37284 */ "NationalField", /* 37285 */ "Congressional Budget Office", /* 37286 */ "christopher d del riesgo", /* 37287 */ "AXGATE CO., LTD", /* 37288 */ "Inco-Service Ltd.", /* 37289 */ "Gridmerge Limited", /* 37290 */ "BRITZE Elektronik und Geraetebau GmbH", /* 37291 */ "Arcanum Communications Ltd", /* 37292 */ "Rusteletech Ltd.", /* 37293 */ "netzquadrat GmbH", /* 37294 */ "Stadt Muenster - citeq", /* 37295 */ "nanoLogika GmbH", /* 37296 */ "LiteCore Networks India Pvt Ltd", /* 37297 */ "PAGANI INFORMATIQUE sarl", /* 37298 */ "Quanxi Technologies, LLC", /* 37299 */ "Neoware s.r.o.", /* 37300 */ "metaVentis GmbH", /* 37301 */ "Daniel Adam", /* 37302 */ "Ignesco Software", /* 37303 */ "Stonegate Instruments Ltd", /* 37304 */ "Beijing Utility Software Core Technology Co., Ltd", /* 37305 */ "Hintz", /* 37306 */ "Vodéa", /* 37307 */ "GSMK mbH", /* 37308 */ "PÉTÁV Pécsi Távfűtő Kft.", /* 37309 */ "NetAcademia Kft.", /* 37310 */ "N@team Leibniz-Gymnasium Remscheid", /* 37311 */ "ULC Systems Inc.", /* 37312 */ "peers@play", /* 37313 */ "40 North LLC", /* 37314 */ "Greenshift", /* 37315 */ "Yuvad Technologies", /* 37316 */ "Ruby Rocket (Chengdu) Consulting Co., Ltd", /* 37317 */ "Datacenter Services, Inc.", /* 37318 */ "GERNY", /* 37319 */ "Inneasoft", /* 37320 */ "Really Helsinki Oy", /* 37321 */ "ERNW GmbH", /* 37322 */ "Yasashi Matsuo", /* 37323 */ "Albany Medical Center", /* 37324 */ "York College of Pennsylvania", /* 37325 */ "Datasat Digital Entertainment", /* 37326 */ "Student Satellite Initiative Munich SSIMUC e.V.", /* 37327 */ "Peninsula Regional Medical Center", /* 37328 */ "Community Care Physicians, P.C.", /* 37329 */ "OpenMarket", /* 37330 */ "Frey Textilreinigung GmbH", /* 37331 */ "CPS Power Systems GmbH", /* 37332 */ "CADENAS GmbH", /* 37333 */ "Norsk Hydro ASA", /* 37334 */ "DimpleDough", /* 37335 */ "Identity Solutions Pty Ltd", /* 37336 */ "RandomStorm Ltd", /* 37337 */ "C3", /* 37338 */ "Open IPTV Forum, e.V.", /* 37339 */ "Teclo Networks", /* 37340 */ "Plexxi, Inc.", /* 37341 */ "uCIRRUS Corp", /* 37342 */ "InterScot Network", /* 37343 */ "Express TeleCom JSC", /* 37344 */ "it suits IT", /* 37345 */ "Medicity", /* 37346 */ "IT-Services der Oesterreichischen Sozialversicherungs GmbH", /* 37347 */ "Compact Software International SA", /* 37348 */ "Family Trach", /* 37349 */ "SkyOnline Argentina", /* 37350 */ "Agile Europe s. r. o.", /* 37351 */ "Ministerio de Relaciones Exteriores, Comercio Internacional y Culto", /* 37352 */ "Euroports", /* 37353 */ "Arawat Inc", /* 37354 */ "Norris Communications", /* 37355 */ "Deutschmann Automation GmbH & Co. KG", /* 37356 */ "Auderis", /* 37357 */ "Regionalmedien Austria AG", /* 37358 */ "PaperlinX Europe", /* 37359 */ "Hypace Technology Co.,Ltd", /* 37360 */ "EquiVox Inc.", /* 37361 */ "Center Information Technologies of Amur Region", /* 37362 */ "Viishanke Oy", /* 37363 */ "Likewise Software", /* 37364 */ "AeCS Aeroclub Saar e.V.", /* 37365 */ "Network Application Engineering Laboratories LTD.", /* 37366 */ "UNIVISION SRL", /* 37367 */ "AND Technology Research Ltd.", /* 37368 */ "CyberCité", /* 37369 */ "Mark White", /* 37370 */ "Idibri", /* 37371 */ "University of San Diego", /* 37372 */ "MitraStar Technology Corporation", /* 37373 */ "Brainstorm Mobile Solutions Ltd", /* 37374 */ "DATA 5 Ingenieurbuero fuer Datentechnik GmbH", /* 37375 */ "Gerhard Messer", /* 37376 */ "Chaos Creations", /* 37377 */ "Dansk Kabel TV", /* 37378 */ "Charles Schwab & Co., Inc.", /* 37379 */ "Computer Output Print & Internet (COPI)", /* 37380 */ "Balidev.com", /* 37381 */ "Danateq PTE Ltd", /* 37382 */ "Infocom Network Limited", /* 37383 */ "Onze Lieve Vrouw Ziekenhuis Aalst", /* 37384 */ "Centrum Informatyki ZETO S.A. w Białymstoku", /* 37385 */ "CEGES/SOMA", /* 37386 */ "NAVUM GmbH", /* 37387 */ "Lietuvos Respublikos Seimo kanceliarija", /* 37388 */ "BYO NETWORKS", /* 37389 */ "Adyton Systems AG", /* 37390 */ "Ministry of health Republic of Macedonia", /* 37391 */ "PROBE Inc.", /* 37392 */ "Tazarv Afzar Co.", /* 37393 */ "Farsinet", /* 37394 */ "kaspian sanat co.", /* 37395 */ "Usługi Informatyczne ITS Mariusz Kryński", /* 37396 */ "MMB Research Inc.", /* 37397 */ "ThreatMetrix", /* 37398 */ "Oceans Edge Inc", /* 37399 */ "Topsoft ZRt", /* 37400 */ "FancyFon Software", /* 37401 */ "neverpanic.de", /* 37402 */ "Marmiko IT-Solutions GmbH", /* 37403 */ "Rischioto Corp", /* 37404 */ "HeBei FarEast Harries comunication company", /* 37405 */ "AHASWARE s.r.o.", /* 37406 */ "Comcraft", /* 37407 */ "Callis Technologies", /* 37408 */ "Home Credit International, a. s.", /* 37409 */ "Opus VFX", /* 37410 */ "L-S-B Broadcast Technologies GmbH", /* 37411 */ "Cable Manufacturing Business, Inc", /* 37412 */ "Smile SA", /* 37413 */ "Tipjar L.L.C.", /* 37414 */ "International Radio and Electronics Corp.", /* 37415 */ "Rivet Software", /* 37416 */ "EFM s.r.l.", /* 37417 */ "Mobile People", /* 37418 */ "Bonprix sp. z.o.o", /* 37419 */ "Virtual Bit di Lucio Crusca", /* 37420 */ "Factum IT BV", /* 37421 */ "Start Norge", /* 37422 */ "DynaMITe Services", /* 37423 */ "MDL29", /* 37424 */ "Ericsson-LG Enterprise Co., Ltd.", /* 37425 */ "Travelzen Group Ltd.", /* 37426 */ "ENTE", /* 37427 */ "Bürkert Werke GmbH", /* 37428 */ "Grand Canyon University", /* 37429 */ "Electronic Power And Market Sp. z o.o.", /* 37430 */ "Montalbano Technology SPA", /* 37431 */ "Carbon Mountain LLC", /* 37432 */ "Custom Radio Network, Inc.", /* 37433 */ "ZenRobotics Ltd.", /* 37434 */ "Gensler IT-Support", /* 37435 */ "Maritime Broadband Inc.", /* 37436 */ "Softec Integrations AG", /* 37437 */ "networks direkt Gesellschaft für Informationstechnologie mbH", /* 37438 */ "Computer Network Limited", /* 37439 */ "Digitalwatt S.r.L", /* 37440 */ "OCI Nitrogen", /* 37441 */ "ANF Authority of Certification Ecuador, S.A.", /* 37442 */ "Centina Systems", /* 37443 */ "Digital Products Limited", /* 37444 */ "Atlantic Intertrade Ltd.", /* 37445 */ "Andrey Klyachkin", /* 37446 */ "Nimble Storage", /* 37447 */ "ENBLINK", /* 37448 */ "Opzoon Technology Co., Ltd.", /* 37449 */ "Sodrugestvo Group of Companies", /* 37450 */ "Effdon Networks Ltd.", /* 37451 */ "Delta Sistemi Srl", /* 37452 */ "B-Obvious", /* 37453 */ "Newsweb", /* 37454 */ "Abertis Autopistas España", /* 37455 */ "The New School", /* 37456 */ "Medas S.R.L.", /* 37457 */ "QualCare, Inc", /* 37458 */ "Yealink", /* 37459 */ "Nova banka AD", /* 37460 */ "Peakwork GmbH", /* 37461 */ "COGISTICS, INC.", /* 37462 */ "Leitwelt GmbH", /* 37463 */ "Intelligrated, Inc", /* 37464 */ "DataDesign", /* 37465 */ "Digitactics, Inc.", /* 37466 */ "Arpeggio Software Inc", /* 37467 */ "Educational Service Unit Coordinating Counsel", /* 37468 */ "Shenzhen Communication Technology Co.Ltd", /* 37469 */ "Power Internet Ltd", /* 37470 */ "QEES Aps.", /* 37471 */ "Cuculus GmbH", /* 37472 */ "Used Car Dealers Association of Ontario", /* 37473 */ "sedkol", /* 37474 */ "OT Systems Limited", /* 37475 */ "ViaThinkSoft", /* 37476 */ "SIGNALIS", /* 37477 */ "The Karthikeyans", /* 37478 */ "Warimax Ltd.", /* 37479 */ "SkySQL Ab", /* 37480 */ "Canyons School District", /* 37481 */ "Stewart McKelvey", /* 37482 */ "A.5 Security Consulting Group, SL", /* 37483 */ "PT. Teknologi Multimedia Indonesia", /* 37484 */ "Alico Graphic Web Designs", /* 37485 */ "OOO Verified Solutions", /* 37486 */ "Nicolas Ledez", /* 37487 */ "Ridgetop Group, Inc.", /* 37488 */ "Scality", /* 37489 */ "ENCO Systems, Inc.", /* 37490 */ "FTM Systems Kft.", /* 37491 */ "Mindstorm Networks", /* 37492 */ "Cyberlink AG", /* 37493 */ "Vincent de Lau", /* 37494 */ "MARS Advanced Research Systems", /* 37495 */ "ZHEJIANG DAHUA TECHNOLOGY CO.,LTD", /* 37496 */ "Delphi Innovations", /* 37497 */ "NasuTek Enterprises", /* 37498 */ "NetSoft Distributed Solutions Pty Ltd", /* 37499 */ "Schmid Industrieholding", /* 37500 */ "Progetto Archivio S.r.l.", /* 37501 */ "kyberna AG", /* 37502 */ "Seratel Technology SAL", /* 37503 */ "ONETASTIC S.r.l.", /* 37504 */ "WSO2 Inc.", /* 37505 */ "Biodec s.r.l.", /* 37506 */ "Freenet Liberec, o.s.", /* 37507 */ "AQUAPHOR", /* 37508 */ "DirectorySelfService", /* 37509 */ "SilentSystem", /* 37510 */ "Future Dynamics Interstellar", /* 37511 */ "Systems Corps", /* 37512 */ "Citkomm", /* 37513 */ "Raphael Frasch GmbH", /* 37514 */ "Avajadi Solutions", /* 37515 */ "Software Integration Development", /* 37516 */ "Sveriges Radio AB", /* 37517 */ "Firewall Services", /* 37518 */ "Draexlmaier Group", /* 37519 */ "Kassenaerztliche Vereinigung Baden-Wuerttemberg", /* 37520 */ "Network Pipeline Inc.", /* 37521 */ "Kousec Software, Inc.", /* 37522 */ "Alyrica Networks Inc", /* 37523 */ "Com1 Communication Solutions B.V.", /* 37524 */ "Infovide-Matrix", /* 37525 */ "WellCentive, LLC", /* 37526 */ "Signalsky Communication Co., Ltd.", /* 37527 */ "Crompton Greaves Limited", /* 37528 */ "A and A System Co., Ltd.", /* 37529 */ "WebRadar", /* 37530 */ "Frank Moeller", /* 37531 */ "BBT Technology Corp.", /* 37532 */ "Delta Electronics (Thailand) Public Co.,Ltd", /* 37533 */ "uher.info", /* 37534 */ "microDATA GIS, Inc.", /* 37535 */ "NRG2 B.V.", /* 37536 */ "JADE", /* 37537 */ "Big Switch Networks", /* 37538 */ "Code One GmbH", /* 37539 */ "N3 Labs Sdn. Bhd.", /* 37540 */ "COMPUTER HI-TECH INC.", /* 37541 */ "Depelmaan Ltd", /* 37542 */ "Crowe Horwath LLP", /* 37543 */ "UM Labs Ltd", /* 37544 */ "GFI Solutions Group inc.", /* 37545 */ "BNP Paribas Fortis group", /* 37546 */ "Europapier International GmbH", /* 37547 */ "CenturyLink", /* 37548 */ "C&T sas", /* 37549 */ "Flexenclosure AB", /* 37550 */ "IFM Infomaster SpA", /* 37551 */ "RAYCORE TAIWAN CO., LTD.", /* 37552 */ "FRDLWEB", /* 37553 */ "Archbold Medical Center", /* 37554 */ "Enabling Technologies Company, Inc.", /* 37555 */ "Brandwatch", /* 37556 */ "Pathology Associates Medical Laboratories, LLC", /* 37557 */ "VM-DG Hemmert & Schuster GbR", /* 37558 */ "Socialcast", /* 37559 */ "Netscout Systems, Inc.", /* 37560 */ "Beijing KEMACOM technologies Co., Ltd.", /* 37561 */ "Hangzhou Yuwan Technology Co., Ltd.", /* 37562 */ "NNS - Nigl Network Solutions", /* 37563 */ "Everest Display Inc.", /* 37564 */ "Struck Innovative Systeme GmbH", /* 37565 */ "Discovery Reply S.r.l.", /* 37566 */ "Alliant Techsystems Inc.", /* 37567 */ "Commend International GmbH", /* 37568 */ "Vocative Ltd.", /* 37569 */ "ELFF Tech", /* 37570 */ "KVUC", /* 37571 */ "Panini s.p.a.", /* 37572 */ "LightSoft Research Ltd.", /* 37573 */ "Alberta Distance Learning Centre", /* 37574 */ "Infobip LTD", /* 37575 */ "NovelSat", /* 37576 */ "Branch of LLC \"Tabak-Invest\" Trade Center \"Korona\"", /* 37577 */ "Samworth Brothers Ltd", /* 37578 */ "Synetrix Holdings Limited", /* 37579 */ "Chao-Inn elementary school", /* 37580 */ "Mika timing GmbH", /* 37581 */ "Theobroma Systems Design und Consulting GmbH", /* 37582 */ "Surescripts, LLC", /* 37583 */ "Gary Hawkins", /* 37584 */ "QDIAGNOSTICA", /* 37585 */ "E-sektionens Teletekniska Avdelning", /* 37586 */ "QualVu, Inc.", /* 37587 */ "QingDao Easytelecom Co., Ltd.", /* 37588 */ "Institut de l'Ebre", /* 37589 */ "Meyer Burger Technology AG", /* 37590 */ "Reggiani", /* 37591 */ "Ev.-Luth. Brüdergemeinde Enger e.V.", /* 37592 */ "Platform-a Arastirma Gelistirme Koordinasyon Hizmetleri A. S.", /* 37593 */ "Netmining LLC", /* 37594 */ "Geomarine Ltd", /* 37595 */ "Agri-hitech LLC", /* 37596 */ "Decatur Hospital Authority dba Wise Regional Health System", /* 37597 */ "CipherCloud, Inc.", /* 37598 */ "Meontrust Inc.", /* 37599 */ "ledeuns.org", /* 37600 */ "Xech S.r.l.", /* 37601 */ "Spider Software GmbH", /* 37602 */ "Meami.org", /* 37603 */ "RMG Tech (Malaysia) Sdn Bhd", /* 37604 */ "MCX Telecom 2 Sp. z o.o.", /* 37605 */ "\"SM Finance\",JSC", /* 37606 */ "Cascada Software & Consulting", /* 37607 */ "CareEvolution, Inc", /* 37608 */ "Dang Networks Inc.", /* 37609 */ "The TuxClan", /* 37610 */ "CJSC TSI Service", /* 37611 */ "Kassenärztliche Vereinigung Niedersachsen", /* 37612 */ "ennovatis GmbH", /* 37613 */ "Siqura", /* 37614 */ "V Labs Informatica Ltda", /* 37615 */ "SATS Holding AB", /* 37616 */ "Ventek Sistemas e Automação", /* 37617 */ "Tumblr", /* 37618 */ "SCHIEx", /* 37619 */ "Alegent Health", /* 37620 */ "Ename, S.A.", /* 37621 */ "Chrysalis Utah, Inc.", /* 37622 */ "Red Hound Software, Inc.", /* 37623 */ "M & PI Software S.r.l.", /* 37624 */ "Mike Johnson", /* 37625 */ "STC AKTOR", /* 37626 */ "ensemble", /* 37627 */ "NETRATOR Andrzej Dopierala", /* 37628 */ "COMTEC NET", /* 37629 */ "Iron Technology Solutions Ltd", /* 37630 */ "Plasmatronics Pty Ltd", /* 37631 */ "The Frontier Group", /* 37632 */ "Bolnisnica Golnik KOPA", /* 37633 */ "Achieve3000, Inc.", /* 37634 */ "Awarepoint", /* 37635 */ "Catholic Health", /* 37636 */ "Henry County Hospital", /* 37637 */ "Infinitrum Co., Ltd", /* 37638 */ "ECYS S.A.", /* 37639 */ "Federal Cardiovascular surgery center", /* 37640 */ "Neebula Systems", /* 37641 */ "GK \"SoftExpert\"", /* 37642 */ "IBM BTO Business Consulting Services Sp. z o.o.", /* 37643 */ "Fuzhou Ucore Information Technologies Co,.Ltd", /* 37644 */ "Medical Data Express", /* 37645 */ "Wyoming Valley Health Care System", /* 37646 */ "Ministry of Interior - UAE (Governmental Entity)", /* 37647 */ "Kalmia Technology Co, LLC", /* 37648 */ "Helium Inc.", /* 37649 */ "Shared Technology Services Group, Inc.", /* 37650 */ "JoyStem Web Services Private Limited", /* 37651 */ "I-TECH", /* 37652 */ "Lamby", /* 37653 */ "Moccu GmbH", /* 37654 */ "Far South Networks", /* 37655 */ "Broxtowe Borough Council", /* 37656 */ "Erskine Design", /* 37657 */ "Czech National Bank", /* 37658 */ "ControlCircle Ltd.", /* 37659 */ "Unit of Research of Technologies of Information and Communication (UTIC)", /* 37660 */ "Transcon Electronic Systems spol. s r. o.", /* 37661 */ "Ablerex Electronic Co., Ltd.", /* 37662 */ "nGen - Niagara Interactive Media Generator", /* 37663 */ "Zone de Police Midi", /* 37664 */ "R. W. Beckett Corporation", /* 37665 */ "Airebullas C.B.", /* 37666 */ "Office of the Auditor General of Norway", /* 37667 */ "bit GmbH", /* 37668 */ "FONDEMI", /* 37669 */ "Barling Bay LLC", /* 37670 */ "The Biostatistics Center - GWU", /* 37671 */ "VERSCOM INTERNATIONAL HOLDING UK LLP", /* 37672 */ "Estech Systems, Inc.", /* 37673 */ "Heineken International", /* 37674 */ "LoveBee", /* 37675 */ "Sutunam Co., Ltd.", /* 37676 */ "Linuxsoft s.r.o.", /* 37677 */ "Hall Research", /* 37678 */ "AGILiCOM", /* 37679 */ "Scott Ellis", /* 37680 */ "Sinefa Pty Ltd", /* 37681 */ "AlexxHost", /* 37682 */ "TimoCom Soft- und Hardware GmbH", /* 37683 */ "Grupo Alsa", /* 37684 */ "Online Marketing Solutions AG", /* 37685 */ "Lookout Mobile Security, Inc.", /* 37686 */ "Bethesda Memorial Hospital", /* 37687 */ "ACE Computer bv", /* 37688 */ "unixtastic", /* 37689 */ "JOTATEC", /* 37690 */ "Broadcast Devices Inc.", /* 37691 */ "StringIT", /* 37692 */ "Brattleboro Memorial Hospital", /* 37693 */ "Tsubakimoto Chain Co.", /* 37694 */ "Quantum Data Systems (HK) Ltd", /* 37695 */ "WIKA Polska S.A.", /* 37696 */ "Higher One", /* 37697 */ "Customs and Border Protection", /* 37698 */ "BolzWachtel Dental Clinic", /* 37699 */ "Axed S.p.A.", /* 37700 */ "energie-m.de", /* 37701 */ "Narodowy Fundusz Zdrowia - Centrala", /* 37702 */ "Mywindowslab.com", /* 37703 */ "Interconcept GmbH", /* 37704 */ "CommSoft RMS LLC", /* 37705 */ "Netmedia Systems e. K.", /* 37706 */ "Rocrail", /* 37707 */ "Systola Forwarding GmbH", /* 37708 */ "S3 Satcom Ltd", /* 37709 */ "Dane E. Jones", /* 37710 */ "FileMaker Inc", /* 37711 */ "Eurosistemi", /* 37712 */ "Winextreme.org", /* 37713 */ "AppFolio, Inc.", /* 37714 */ "FTN", /* 37715 */ "Ville de Lausanne", /* 37716 */ "Herbert Smith LLP", /* 37717 */ "Fresenius Vial", /* 37718 */ "PT. Multi Structure", /* 37719 */ "CSR ZHUZHOU INSTITUTE CO LTD", /* 37720 */ "OpenSys (M) Berhad", /* 37721 */ "Trusted Information Consulting Sp. z o.o.", /* 37722 */ "ODIN technologies", /* 37723 */ "Chalet Technologies Inc.", /* 37724 */ "Yupiq Corp", /* 37725 */ "Bertol, Alexander", /* 37726 */ "General Digital Corporation", /* 37727 */ "ADV Consulting", /* 37728 */ "ATS Group GmbH", /* 37729 */ "p-rimes.net", /* 37730 */ "MB S.p.A.", /* 37731 */ "Ymif Engineering b.v.", /* 37732 */ "Civil Registry Agency of Ministry of Justice of Georgia", /* 37733 */ "ASSA ABLOY AB", /* 37734 */ "St. Mary's Medical Center", /* 37735 */ "PinnacleHealth System", /* 37736 */ "GUANGDONG DONYAN NETWORK TECHNOLOGIES CO.,LTD.", /* 37737 */ "Apadmi Ltd", /* 37738 */ "Braintree Payment Solutions, LLC", /* 37739 */ "Johannes Roith", /* 37740 */ "First Step Internet, LLC", /* 37741 */ "Iprio Corporation", /* 37742 */ "Robert Frank", /* 37743 */ "Centrify Corporation", /* 37744 */ "spampig.org.uk", /* 37745 */ "Security Data S.A.", /* 37746 */ "Mercy Health Partners", /* 37747 */ "GIAVANEERS", /* 37748 */ "Wire e Wireless World, SA", /* 37749 */ "Quester Tangent", /* 37750 */ "E.I. du Pont de Nemours and Company", /* 37751 */ "NETS DENMARK A/S", /* 37752 */ "Robin Partington Architects", /* 37753 */ "Nextragen GmbH", /* 37754 */ "Radio Activity srl", /* 37755 */ "The Ministry of Interior of the Republic of Croatia", /* 37756 */ "Newton Graphics, Inc.", /* 37757 */ "Actidata Company", /* 37758 */ "WXXR Network Technology Ltd. BEIJING", /* 37759 */ "Powertech Automation Solutions Pvt. Ltd", /* 37760 */ "Altitude Software", /* 37761 */ "Neotion R&D", /* 37762 */ "Bitxenio, S.L.", /* 37763 */ "Portel Servicios Telemáticos", /* 37764 */ "LHERITIER", /* 37765 */ "Beijing Banggoo Networks Co,Ltd.", /* 37766 */ "Gartner Inc.", /* 37767 */ "Bundesministerium für Arbeit und Soziales", /* 37768 */ "Koramis GmbH", /* 37769 */ "IDmachines LLC", /* 37770 */ "Linkwise Technology Private Limited", /* 37771 */ "AERODEV", /* 37772 */ "OAO NESK Novorossiyskenergosbit", /* 37773 */ "51.6 Noord B.V.", /* 37774 */ "BaoBros Studio", /* 37775 */ "Co. Ltd. \"RCS Labs\"", /* 37776 */ "Cabinet Pierre Guerin", /* 37777 */ "Northern Design (Electronics) Ltd", /* 37778 */ "Nuvolas", /* 37779 */ "MicroRIGHT Corporation", /* 37780 */ "eZuce Inc", /* 37781 */ "KindleIT", /* 37782 */ "Wolf Pond Creative LLC", /* 37783 */ "IDC Solutions Pty Ltd", /* 37784 */ "Ingenieurbuero Jan F Westerkamp (IBW)", /* 37785 */ "Galtronics Telemetry, Inc.", /* 37786 */ "Emirates Identity Authority", /* 37787 */ "Syslife", /* 37788 */ "Novapost SAS", /* 37789 */ "Gould International UK Ltd", /* 37790 */ "PortaOne, Inc.", /* 37791 */ "Enfuse Inc", /* 37792 */ "Squirrel Solutions Ltd", /* 37793 */ "DVR Support Center", /* 37794 */ "Centre Hospitalier du Nord", /* 37795 */ "PTS Group AG", /* 37796 */ "Graylog2", /* 37797 */ "Pcmedic", /* 37798 */ "Coloriuris A.I.E.", /* 37799 */ "Aster Data Systems, Inc", /* 37800 */ "Innovactive Engineering s.r.l.", /* 37801 */ "Sypris Solutions, Inc", /* 37802 */ "California State University San Marcos", /* 37803 */ "Spirit Software Solutions", /* 37804 */ "Team Simoco Ltd.", /* 37805 */ "North Power Coporation (EVN NPC)", /* 37806 */ "Instituto Tecnológico de Canarias", /* 37807 */ "FIBCOM INDIA LIMITED", /* 37808 */ "Wnet Wisp S.r.l", /* 37809 */ "PCE SYSTEMS", /* 37810 */ "Glass Echidna", /* 37811 */ "Kotkamills Oy", /* 37812 */ "DSM Computer GmbH", /* 37813 */ "Infinidat LTD", /* 37814 */ "Friendly Runet Foundation", /* 37815 */ "skweez.net", /* 37816 */ "GMG Technologies", /* 37817 */ "LEGALBOX", /* 37818 */ "Technical Dabblings", /* 37819 */ "Telecore LTD.", /* 37820 */ "untermStrich software gmbh", /* 37821 */ "Wolfplex Hackerspace ASBL", /* 37822 */ "Vimukti Technologies Private Limited", /* 37823 */ "ECOLE NATIONALE VETERINAIRE D'ALFORT", /* 37824 */ "Interregional Distribution Grid Company of Volga, JSC", /* 37825 */ "ISL Internet Sicherheitsloesungen GmbH", /* 37826 */ "WV Network for Educational Telecomputing (WVNet)", /* 37827 */ "LIL'SYSTEMS", /* 37828 */ "Puxlit", /* 37829 */ "InCampus Pte Ltd", /* 37830 */ "Techroutes Network", /* 37831 */ "Clifford Chance LLP", /* 37832 */ "Southern New Hampshire Medical Center", /* 37833 */ "No23", /* 37834 */ "Jerome Baum", /* 37835 */ "CCM Benchmark Group", /* 37836 */ "mikroVOX s.r.o.", /* 37837 */ "Futurad S.r.l.", /* 37838 */ "OneSystem S.A.", /* 37839 */ "Veda Advantage", /* 37840 */ "Flughafen Zürich AG", /* 37841 */ "Aicox Soluciones S.A.", /* 37842 */ "Adecco Group", /* 37843 */ "Eastern Upper Peninsula ISD", /* 37844 */ "VINCI S.A.", /* 37845 */ "MEDIAPRINT Zeitungs und Zeitschriften Verlags GesmbH", /* 37846 */ "Business Information Intelligence Services", /* 37847 */ "ORSENNA", /* 37848 */ "Aris System", /* 37849 */ "Slavic Gospel Association", /* 37850 */ "YTY Enterprises", /* 37851 */ "ECCOS inzenjering", /* 37852 */ "OASIS Systems Pty Ltd", /* 37853 */ "Crozer-Keystone Health System", /* 37854 */ "The Reading Hospital and Medical Center", /* 37855 */ "Essential Enterprise Solutions Inc.", /* 37856 */ "Veolia Environmental Services - North America", /* 37857 */ "Synegen", /* 37858 */ "Synerline sprl", /* 37859 */ "Source Trading Co., Ltd.", /* 37860 */ "Austco Communication Systems", /* 37861 */ "Suntel S.A.", /* 37862 */ "ETMC Regional Healthcare System", /* 37863 */ "Cape Cod Healthcare", /* 37864 */ "City and County of San Francisco, Department of Technology", /* 37865 */ "Bank of New Zealand", /* 37866 */ "APG", /* 37867 */ "VirtualSharp Software", /* 37868 */ "BruteCO Certificate Authority", /* 37869 */ "Sensometrix SA", /* 37870 */ "Digital Vision, s.r.o.", /* 37871 */ "Neko Consulting Ltd.", /* 37872 */ "J4care GmbH", /* 37873 */ "CebaTech Inc.", /* 37874 */ "oogle Networks LLC", /* 37875 */ "Delta Management AB", /* 37876 */ "TITNC Alexander Seifarth", /* 37877 */ "WineSkills", /* 37878 */ "NetOrg LTD", /* 37879 */ "Qowisio", /* 37880 */ "ESCA", /* 37881 */ "RedeCamp Ind. Com. e Serviços de Telecomunicações S.A.", /* 37882 */ "Vitaly Pashkov", /* 37883 */ "Perfect Home AS", /* 37884 */ "Renewable Funding, LLC", /* 37885 */ "Coraid Inc.", /* 37886 */ "OraPharma, Inc.", /* 37887 */ "PROGIRIS", /* 37888 */ "Accord Medical Management, LP DBA Nix Health Care System", /* 37889 */ "Quality Fiber and RF Inc", /* 37890 */ "Big Ant Studios Pty Ltd", /* 37891 */ "GCT Semiconductor, Inc.", /* 37892 */ "BeyondTrust Software, Inc", /* 37893 */ "aylite", /* 37894 */ "LucidView", /* 37895 */ "IFD Kapital", /* 37896 */ "Maxwell Management Inc. (MMI)", /* 37897 */ "Éric Larivière", /* 37898 */ "Hahn Family", /* 37899 */ "International Information Programs IR, Deptartment of State", /* 37900 */ "Aeon Experienced Development", /* 37901 */ "Polynet Ltd.", /* 37902 */ "CURUPIRA S/A", /* 37903 */ "UnixServices", /* 37904 */ "Beijing Jiaxun Feihong Electrical Co.,Ltd", /* 37905 */ "Beijing WingMax Technology Co.,Ltd", /* 37906 */ "Fusion Comm Solution Sdn Bhd", /* 37907 */ "A puissance 3", /* 37908 */ "Arantia 2010 S.L.U.", /* 37909 */ "Modesat Communications", /* 37910 */ "CDP Communications Inc.", /* 37911 */ "Locomotive Software & Consulting", /* 37912 */ "ZAO PTKB \"MERCURIY\"", /* 37913 */ "TECNOTEL s.r.l.", /* 37914 */ "Shenzhen Zyeeda Information Technology Co. Ltd.", /* 37915 */ "Volvo Car Corporation AB", /* 37916 */ "MarkitServ", /* 37917 */ "SAGE Dining Services", /* 37918 */ "NETMOON", /* 37919 */ "DEXUS Holdings Pty Limited", /* 37920 */ "Southwest Institute of Healing Arts", /* 37921 */ "TeleMedia Systems, Inc.", /* 37922 */ "Freysteinn Alfredsson", /* 37923 */ "NokianTyres LLC", /* 37924 */ "mysql-cluster-snmp-monitor", /* 37925 */ "Pranveer Singh Institute of Technology", /* 37926 */ "RTLGroup", /* 37927 */ "Sheffield Teaching Hospitals NHS Foundation Trust", /* 37928 */ "PIPS Technology Ltd", /* 37929 */ "Virus Stopper Foundation Registered NGO No 348 -2010", /* 37930 */ "Bob Greene", /* 37931 */ "Jack Storm", /* 37932 */ "Westchester Medical Center", /* 37933 */ "Confident Technologies, Inc.", /* 37934 */ "Danmarks Designskole", /* 37935 */ "Calendar42", /* 37936 */ "Schaffhausen Communication GmbH", /* 37937 */ "Lake Hospital System, Inc.", /* 37938 */ "Reykjavik University", /* 37939 */ "WRD Technology Co., Ltd.", /* 37940 */ "comForte 21 GmbH", /* 37941 */ "Futuver S.A. de C.V.", /* 37942 */ "Medium Link System Technology CO., LTD", /* 37943 */ "megalo & company", /* 37944 */ "Inspur(BeiJing) Electronic Information Industry Co.,Ltd", /* 37945 */ "CJSC \"Dzetta\"", /* 37946 */ "Banco Central del Ecuador", /* 37947 */ "TOS.BG", /* 37948 */ "TenneT TSO", /* 37949 */ "v-solution", /* 37950 */ "DataONE", /* 37951 */ "MoCA by Design", /* 37952 */ "ControlNet International Inc.", /* 37953 */ "Kentix GmbH", /* 37954 */ "Nierhaus", /* 37955 */ "EMH Healthcare", /* 37956 */ "Texas Regional Medical Center", /* 37957 */ "http://www.sentinel-engine.org", /* 37958 */ "paratio.com e.K.", /* 37959 */ "MINIADMIN", /* 37960 */ "COCUS AG", /* 37961 */ "Mindbender Technologies", /* 37962 */ "Affirmed Networks, Inc.", /* 37963 */ "CTI Digital", /* 37964 */ "Altoona Regional Health System", /* 37965 */ "Perth Linux Users Group", /* 37966 */ "Webra JSC", /* 37967 */ "Elma Electronic GmbH", /* 37968 */ "OKSEI", /* 37969 */ "Global Digital Inc.", /* 37970 */ "EKILIA", /* 37971 */ "Dyalog Ltd", /* 37972 */ "Mountain View Systems, LLC.", /* 37973 */ "Winthrop University Hospital", /* 37974 */ "imessage.de", /* 37975 */ "MetaFORM Bilisim Iletisim ve Danismanlik Ltd Sti", /* 37976 */ "XTO Energy, Inc", /* 37977 */ "TEB", /* 37978 */ "Panaram Ltd", /* 37979 */ "Bayer Business Services GmbH", /* 37980 */ "Solution Concept s.r.o.", /* 37981 */ "Netstream AG", /* 37982 */ "Nux Ltd.", /* 37983 */ "GsurfNET", /* 37984 */ "CCDI", /* 37985 */ "mCarbon Tech innovation pvt. ltd.", /* 37986 */ "The Hong Kong Country Club", /* 37987 */ "Jack in the Box", /* 37988 */ "FASTEK ITALIA S.R.L.", /* 37989 */ "Intellique", /* 37990 */ "Letechnic Ltd", /* 37991 */ "SYSM Systemmanagement Service & Konzepte GmbH", /* 37992 */ "Hokkaido Telecommunication Network Co., Inc.", /* 37993 */ "i-free", /* 37994 */ "Initiative für Netzfreiheit", /* 37995 */ "KTS GmbH", /* 37996 */ "4G Technology", /* 37997 */ "Greenwood Leflore Hospital", /* 37998 */ "TransPacket AS", /* 37999 */ "DELEC Audio- und Videotechnik GmbH", /* 38000 */ "DIgitata LTD", /* 38001 */ "Innovise IES", /* 38002 */ "StorMagic Ltd", /* 38003 */ "Edenred SA", /* 38004 */ "REFLEXE Technologies", /* 38005 */ "Dietrich IT-Services", /* 38006 */ "Handy Networks", /* 38007 */ "ELECOM S.A.S", /* 38008 */ "FonSee Technology Inc.", /* 38009 */ "CE Labs", /* 38010 */ "NTTM (Name to Telephone Mapping) Limited", /* 38011 */ "USL, Inc.", /* 38012 */ "Ampex Data Systems", /* 38013 */ "NORICS GmbH", /* 38014 */ "DUHA system s.r.o.", /* 38015 */ "Exicom Tele-Systems Limited", /* 38016 */ "SC EXIMTUR SRL", /* 38017 */ "guideye.de", /* 38018 */ "Special Systems Engineering Center LLC", /* 38019 */ "Franklin County Public Schools", /* 38020 */ "Cfengine AS", /* 38021 */ "HappyBooking UG (haftungsbeschränkt)", /* 38022 */ "ultrachaos", /* 38023 */ "Logic Soft sas", /* 38024 */ "MindArray Systems (P) Ltd", /* 38025 */ "ACOME", /* 38026 */ "Ltd \"InfoTechnoService\"", /* 38027 */ "DANTECH Limited", /* 38028 */ "University of South Florida", /* 38029 */ "Conngame Co.Ltd.", /* 38030 */ "NextGate", /* 38031 */ "EFOLIA", /* 38032 */ "TeamF1", /* 38033 */ "IHSE GmbH", /* 38034 */ "GS1 Sweden AB", /* 38035 */ "ChronoPay B.V.", /* 38036 */ "Ståle Hebæk Ødegården", /* 38037 */ "Informacijsko svetovanje, Miha Valenčič, s.p.", /* 38038 */ "Klika d.o.o.", /* 38039 */ "Reliable System Services Corporation", /* 38040 */ "Via Christi Health", /* 38041 */ "Unassigned", /* 38042 */ "Hear And See Systems OÜ", /* 38043 */ "wu-way, inc.", /* 38044 */ "Shenzhen Winhap Commucations Inc.", /* 38045 */ "CJSC UniCredit Bank", /* 38046 */ "JSC STC Electron-Service", /* 38047 */ "Institut des Sciences de l'Homme", /* 38048 */ "Zaehlwerk GbR", /* 38049 */ "Lightbar Software Solutions LLC", /* 38050 */ "Boy Scouts of America", /* 38051 */ "Attackplan Software", /* 38052 */ "Avisit Solutions Limited", /* 38053 */ "Arellia Corporation", /* 38054 */ "Gforce Inc.", /* 38055 */ "Nason Hospital", /* 38056 */ "D&B Germany GmbH", /* 38057 */ "Cyanide Studio", /* 38058 */ "Banking production center", /* 38059 */ "Sempla Srl", /* 38060 */ "Edistar Srl", /* 38061 */ "Marathon Oil Corporation", /* 38062 */ "Suomen Asiakastieto Oy", /* 38063 */ "SSL Corp", /* 38064 */ "Media Alliance, CJSC", /* 38065 */ "SC Romastru Trading SRL", /* 38066 */ "APPRO International, Inc.", /* 38067 */ "Centrastate Medical Center, Inc.", /* 38068 */ "Cetis, Inc.", /* 38069 */ "Anode", /* 38070 */ "MaximaTelecom JSC", /* 38071 */ "Linear Photonics, LLC", /* 38072 */ "Defense Photonics Group", /* 38073 */ "Statropy Software LLC", /* 38074 */ "Sentaca Communications", /* 38075 */ "Radical Creations", /* 38076 */ "JetPay, LLC", /* 38077 */ "Nanjing Yxlink Information Technologies Co.,Ltd", /* 38078 */ "DEAC Medics S de RL de CV", /* 38079 */ "Pick n Pay", /* 38080 */ "Rank Group", /* 38081 */ "HD Vietnam Co.", /* 38082 */ "SLG Broadcast AG", /* 38083 */ "Connecture, Inc.", /* 38084 */ "Solo Cup Company", /* 38085 */ "Kordia", /* 38086 */ "Real I.T. Technicians, LLC", /* 38087 */ "Joshua Tree Software, LLC", /* 38088 */ "Prometheus Research", /* 38089 */ "GreenMojito.org", /* 38090 */ "SolidFire, Inc.", /* 38091 */ "EtherDVB Pty Ltd", /* 38092 */ "wopoco.de", /* 38093 */ "Thales Optronics", /* 38094 */ "Cooperativa de Ensino Superior Politecnico e Universitario", /* 38095 */ "CyclopusCAD s.r.l.", /* 38096 */ "Universidade Estadual de Goiás", /* 38097 */ "Rostov region office of Federal service of state registration cadaster and cartography", /* 38098 */ "Transglobal Secure Collaboration Participation Inc. (TSCP)", /* 38099 */ "CAMI Research Inc.", /* 38100 */ "Roalter International", /* 38101 */ "Szechenyi Istvan University", /* 38102 */ "Dataport AöR", /* 38103 */ "ProFIX Co.", /* 38104 */ "Kit Digital", /* 38105 */ "Nebraska Furniture Mart, Inc.", /* 38106 */ "Aviosys Inc.", /* 38107 */ "MicroXel Networks, Inc.", /* 38108 */ "Domtar", /* 38109 */ "Arkivum Ltd", /* 38110 */ "SHENZHEN DINSTAR TECHNOLOGIES Co.,Ltd.", /* 38111 */ "Wuxi ZhongXun Technology Co.,ltd.", /* 38112 */ "Red Lion Controls Inc.", /* 38113 */ "Merseytravel", /* 38114 */ "Marist College", /* 38115 */ "ClearBUS", /* 38116 */ "University College Dublin", /* 38117 */ "BEI Electronics LLC", /* 38118 */ "Open Mobile Video Coalition", /* 38119 */ "UMass Memorial Medical Center", /* 38120 */ "IOD Incorporated.com", /* 38121 */ "Red Wire Services, LLC", /* 38122 */ "kinkajougames", /* 38123 */ "Thomson Video Networks", /* 38124 */ "EuroDNS SA", /* 38125 */ "COGITOP SAS", /* 38126 */ "IES Doctor Balmis", /* 38127 */ "Laurentian University", /* 38128 */ "Akumen LTD", /* 38129 */ "Faith Regional Health Services", /* 38130 */ "RG Nets", /* 38131 */ "eTruhla s.r.o.", /* 38132 */ "Ingnitia http://www.ingnitia.com", /* 38133 */ "National Document Custodians, LLC", /* 38134 */ "Shield Bridge Inc.", /* 38135 */ "In Touch Pharmaceuticals, Inc", /* 38136 */ "Fusionskye", /* 38137 */ "Hochschule Regensburg", /* 38138 */ "pro parity IT-Service", /* 38139 */ "Imtech Marine", /* 38140 */ "Emich KsE - Kundenspezifische Elektronik", /* 38141 */ "BHE Bonn Hungary Electronics Ltd.", /* 38142 */ "CloudBees, Inc.", /* 38143 */ "Displaydata Ltd", /* 38144 */ "ECG, Inc.", /* 38145 */ "Access Now", /* 38146 */ "Mind Matters LLC", /* 38147 */ "EMCALI E.I.C.E. E.S.P.", /* 38148 */ "Teknokala Ky", /* 38149 */ "Altia Consultores S.A.", /* 38150 */ "Invendis Technologies", /* 38151 */ "Bauerfeind AG", /* 38152 */ "Dada S.p.A.", /* 38153 */ "Autopart International, Inc.", /* 38154 */ "EXATEQ Ltd.", /* 38155 */ "Zepheira LLC", /* 38156 */ "Policìa Nacional de Colombìa", /* 38157 */ "Open Platform Trust Services", /* 38158 */ "Unity Global Corporation", /* 38159 */ "Datto Inc.", /* 38160 */ "W.W. Grainger, Inc.", /* 38161 */ "BNTPRO BILGI ve ILETISIM HIZ. LTD. STI.", /* 38162 */ "Kiesel GmbH", /* 38163 */ "Ticket Monster Inc", /* 38164 */ "Kohlpharma GmbH", /* 38165 */ "nexurium.fr", /* 38166 */ "Albrecht Jung GmbH & Co. KG", /* 38167 */ "The Taubman Company", /* 38168 */ "Life Image Inc", /* 38169 */ "LocalNet Corp.", /* 38170 */ "fischerwerke GmbH & Co. KG", /* 38171 */ "CustosMobile", /* 38172 */ "Adminia Sistemas", /* 38173 */ "Hamilton Medical Center", /* 38174 */ "Dali Wireless, Inc.", /* 38175 */ "Marken Mehrwert AG", /* 38176 */ "iCue", /* 38177 */ "Skytide, Inc", /* 38178 */ "Bard College", /* 38179 */ "Kangaroo Media Inc.", /* 38180 */ "Trinity Health", /* 38181 */ "CUBE. Corporate Release SA", /* 38182 */ "Pythagore FD", /* 38183 */ "Heidelberg Mobil International GmbH", /* 38184 */ "Detailresult Groep", /* 38185 */ "Xpandia Ltd.", /* 38186 */ "Weidmüller Interface GmbH & Co. KG", /* 38187 */ "StormMQ Limited", /* 38188 */ "Telemedia LTD", /* 38189 */ "Magna", /* 38190 */ "Memjet, Inc.", /* 38191 */ "Gravity R&D Limited", /* 38192 */ "Yuduan Mobile Co., Ltd.", /* 38193 */ "Naga Concept", /* 38194 */ "Gameservers.com", /* 38195 */ "Flagship Facility Services", /* 38196 */ "Lacuna Systems, Inc.", /* 38197 */ "Rincon Research Corporation", /* 38198 */ "Fraser Talbot Consulting Services; L.L.C", /* 38199 */ "Libéo", /* 38200 */ "Ronald Hummelink", /* 38201 */ "NETILITY GmbH & Co. KG", /* 38202 */ "Interactive Systems & Business Consulting", /* 38203 */ "Six DEE Telecom Solutions Pvt. Ltd.", /* 38204 */ "University Teleinformatic Center - UTIC, University of Sarajevo", /* 38205 */ "Eloquera", /* 38206 */ "Fujian JinQianMao Electronic Technology Co.,Ltd.", /* 38207 */ "meaganharris.net", /* 38208 */ "VMC Systems Ltd.", /* 38209 */ "Xovis AG", /* 38210 */ "JSC 'Siberian Coal Energy Company'", /* 38211 */ "Derichebourg", /* 38212 */ "ACCENT-ELECTRONIC", /* 38213 */ "Vlatacom", /* 38214 */ "Hochschule Hamm-Lippstadt - University of Applied Sciences", /* 38215 */ "Blumenthal S.R.L.", /* 38216 */ "gigatec GmbH", /* 38217 */ "Designer Systems Ltd", /* 38218 */ "Therap Services, LLC", /* 38219 */ "Private Unitary Enterprise on Rendering Services \"Greenwall Systems\"", /* 38220 */ "IP Gorshkov Yuri Valerevich", /* 38221 */ "Philips Electronics North America Corporation", /* 38222 */ "definition six, inc.", /* 38223 */ "Caromont Health", /* 38224 */ "Encell Technology, Inc.", /* 38225 */ "AriadNEXT", /* 38226 */ "Wellington and King, Inc.", /* 38227 */ "PICA GmbH", /* 38228 */ "GIVC", /* 38229 */ "Kostroma State Technological University", /* 38230 */ "Lycée Sainte Marie du Port", /* 38231 */ "Onondaga Community College", /* 38232 */ "ARCHE Systeme GmbH", /* 38233 */ "TESSCO Technologies Incorporated", /* 38234 */ "ENTERSECT Technologies (PTY) LTD", /* 38235 */ "Colsys s.r.o.", /* 38236 */ "Elverson Rod and Gun Club", /* 38237 */ "karnal talat private limited", /* 38238 */ "OARC, Inc.", /* 38239 */ "Butte-Glenn Community College District", /* 38240 */ "Hanlong Technology Co.,Ltd.", /* 38241 */ "Shenzhen 33e9 E-Business Co., Ltd", /* 38242 */ "Thecus Thecnology Corp.", /* 38243 */ "TOKYO RADAR CORPORATION", /* 38244 */ "MIBUC-NET", /* 38245 */ "FSC International Center GmbH", /* 38246 */ "Charleston Area Medical Center, Inc.", /* 38247 */ "Nebraska Heart Hospital", /* 38248 */ "Niagara Health System", /* 38249 */ "Proventa AG", /* 38250 */ "Zmanda, Inc.", /* 38251 */ "EOSSOnline Limited", /* 38252 */ "Athenta Technologies (P) Ltd., India", /* 38253 */ "Resolan", /* 38254 */ "Khalid Shukri IT-Beratung", /* 38255 */ "ItsOn, Inc.", /* 38256 */ "nuinno", /* 38257 */ "WhipTail Technologies", /* 38258 */ "ADD-Technology SRL", /* 38259 */ "4SMS ApS", /* 38260 */ "Brightstone", /* 38261 */ "Boxcar Press, Inc", /* 38262 */ "Thomas Memorial Hospital", /* 38263 */ "Midwest Health Systems Data Center", /* 38264 */ "Intendencia de Canelones", /* 38265 */ "Chinese Bible Church of Greater Boston", /* 38266 */ "UTS Programmers' Society", /* 38267 */ "Threeline LLC", /* 38268 */ "rrbone", /* 38269 */ "inTaligent Digital Consultants", /* 38270 */ "inTaligent Digital Consultants", /* 38271 */ "Liberti", /* 38272 */ "AvePoint, Inc.", /* 38273 */ "Safirion GmbH", /* 38274 */ "3-IK", /* 38275 */ "CipSoft GmbH", /* 38276 */ "r-tec IT Systeme GmbH", /* 38277 */ "Memorial Hospital of South Bend", /* 38278 */ "Pilot Corporation of America", /* 38279 */ "Millennium Information Technologies (Private) Limited", /* 38280 */ "1st Setup", /* 38281 */ "Italtelec S.p.A.", /* 38282 */ "MobiWork LLC", /* 38283 */ "PacketAccess", /* 38284 */ "Live-PA Ltd", /* 38285 */ "pki24.com", /* 38286 */ "D-TACQ Solutions Ltd", /* 38287 */ "Swiss public broadcasting organisation (SRG SSR)", /* 38288 */ "LeetGeek Pty Ltd", /* 38289 */ "IntelliVoice Co,Ltd.", /* 38290 */ "G Data Software AG", /* 38291 */ "Damall Technologies Sas", /* 38292 */ "Dynamic Technical Solutions Inc.", /* 38293 */ "IOMachine LLC", /* 38294 */ "Pro Broadband Inc.", /* 38295 */ "Multi Sinergi Infrastruktur, PT", /* 38296 */ "ComMedia, Lda", /* 38297 */ "DaGo Solutions", /* 38298 */ "Dillard's Inc", /* 38299 */ "GrubHub", /* 38300 */ "hosthis.org", /* 38301 */ "ITSUMO s.c.", /* 38302 */ "Pask", /* 38303 */ "CrossImaging Inc.", /* 38304 */ "LybreDyne Technologies", /* 38305 */ "MASIBUS AUTOMATION AND INSTRUMENTATION PVT LTD", /* 38306 */ "OIS-Net", /* 38307 */ "Joint Stock Company «Banking & Financial Network»", /* 38308 */ "Cirquent GmbH", /* 38309 */ "PREMIER Bankcard, LLC", /* 38310 */ "OPTIM'HEXA", /* 38311 */ "CareView Communications", /* 38312 */ "STG (Stargazer)", /* 38313 */ "adjectivism.org", /* 38314 */ "National Land Survey of Iceland", /* 38315 */ "SEKONIC CORPORATION", /* 38316 */ "JR East Mechatronics Co.Ltd.", /* 38317 */ "Ing. Buero Fischer GmbH", /* 38318 */ "Lantiq Deutschland GmbH", /* 38319 */ "Bubblephone Ltd", /* 38320 */ "Greatnet.de OHG", /* 38321 */ "Strangeloop Networks", /* 38322 */ "Stuart McGraw", /* 38323 */ "emagsoftware", /* 38324 */ "Precogen, LLC", /* 38325 */ "nepda", /* 38326 */ "Vokzal-infokom", /* 38327 */ "LvlUp e.V.", /* 38328 */ "Three Laws of Mobility", /* 38329 */ "Datametrix AS", /* 38330 */ "Skeed Co., Ltd.", /* 38331 */ "LeonIT GbR", /* 38332 */ "Network Solution Technologies Co., Ltd.", /* 38333 */ "ArchOne", /* 38334 */ "AVIN Networks Private Limited", /* 38335 */ "Platte Valley Medical Center", /* 38336 */ "Power Instruments Pte Ltd.", /* 38337 */ "Suntel Ltd", /* 38338 */ "Centrum Informatyki Statystycznej", /* 38339 */ "Broadcast Partners", /* 38340 */ "AGETO Innovation GmbH", /* 38341 */ "City of Hope", /* 38342 */ "Wilcom Technologies", /* 38343 */ "Maxwell Worthington", /* 38344 */ "S&T Ukraine", /* 38345 */ "Pallas GmbH", /* 38346 */ "Ing. Günther Vlaschits", /* 38347 */ "ISDEFE Ingenieria de Sistemas para la Defensa de España S.A.", /* 38348 */ "Firstcom A/S", /* 38349 */ "XtreemFS project", /* 38350 */ "net-lab GmbH", /* 38351 */ "National Information Technology Center", /* 38352 */ "Weebly, Inc.", /* 38353 */ "Princeton Consultants", /* 38354 */ "TTTech Computertechnik AG", /* 38355 */ "Mike Becker", /* 38356 */ "ActualMed", /* 38357 */ "Peak Reliability", /* 38358 */ "Meissner", /* 38359 */ "Delled Company Ltd", /* 38360 */ "Exabre Ltd", /* 38361 */ "alpha dot net Australia", /* 38362 */ "PT Primatama Sentra Solusi", /* 38363 */ "Netsis Technology", /* 38364 */ "BKW FMB Energie AG", /* 38365 */ "Joint-Stock Bank \"Master-Bank\"", /* 38366 */ "KIS Information Services GmbH", /* 38367 */ "Radimetrics Inc.", /* 38368 */ "ZiXi, LLC", /* 38369 */ "jetNEXUS Limited", /* 38370 */ "PT. Cahaya Barumas Sejahtera", /* 38371 */ "PT INPAR SAKA", /* 38372 */ "Greenville Hospital System University Medical Center", /* 38373 */ "Cloudera", /* 38374 */ "Linus van Geuns", /* 38375 */ "The Chester County Hospital", /* 38376 */ "Tohojo ApS", /* 38377 */ "FeedHenry Ltd.", /* 38378 */ "Inter Media Group", /* 38379 */ "AMG.net S.A.", /* 38380 */ "Unetvale Servicos e Equipamentos Ltda. EPP", /* 38381 */ "znt Zentren für Neue Technologien GmbH", /* 38382 */ "WorldCare Clinical LLC", /* 38383 */ "DBAPP Security", /* 38384 */ "Svyazcom Ltd.", /* 38385 */ "Coop Denmark A/S", /* 38386 */ "Smart Design sprl", /* 38387 */ "HANGZHOU LAYBEL ELECTRONIC TECHNOLOGY CO,. LTD", /* 38388 */ "Verisec AB", /* 38389 */ "Railinc Corporation", /* 38390 */ "iroïd", /* 38391 */ "University of Dayton", /* 38392 */ "SJX Soft", /* 38393 */ "Interfibra Telecomunicaciones, S.L.", /* 38394 */ "Phillips Foods, Inc.", /* 38395 */ "Flinders Christian Community College Inc", /* 38396 */ "TSB - Tiefdruck Schwann-Bagel GmbH & Co.KG", /* 38397 */ "ZAO TD BOVID", /* 38398 */ "Kloeckner & Co SE", /* 38399 */ "nfon AG", /* 38400 */ "Veridian Solutions Pty. Ltd", /* 38401 */ "C.I. Centro de Informacoes", /* 38402 */ "vacc.ch", /* 38403 */ "Maintainet AG", /* 38404 */ "Autotalks", /* 38405 */ "Roscom Ltd", /* 38406 */ "Chesapeake Ltd", /* 38407 */ "OKIT GmbH", /* 38408 */ "CargoSoft LLC", /* 38409 */ "Raikosoft GmbH", /* 38410 */ "Knology", /* 38411 */ "Fun & RelaX GmbH", /* 38412 */ "Lodgeistics Inc.", /* 38413 */ "FusionDirectory", /* 38414 */ "Clavius-Gymnasium Bamberg", /* 38415 */ "Nordic ID Oy", /* 38416 */ "Kybeire Ltd", /* 38417 */ "UFMA - Universidade Federal do Maranhão", /* 38418 */ "Rauland Australia Pty Ltd", /* 38419 */ "Yottaa Inc", /* 38420 */ "ALL-RTP", /* 38421 */ "Tesync Technology Limited", /* 38422 */ "PBeaKK", /* 38423 */ "BalTstamp", /* 38424 */ "Private University College of Education of the Diocese of Linz", /* 38425 */ "State company \"Russian highways\"", /* 38426 */ "Genève Aéroport", /* 38427 */ "SlimPay", /* 38428 */ "Dryden Municipal Telephone System", /* 38429 */ "Irell & Manella LLP", /* 38430 */ "Communications & Power Industries, Satcom Division", /* 38431 */ "Oberon, Inc.", /* 38432 */ "NetAxis Solutions", /* 38433 */ "OpenCSI", /* 38434 */ "abegglen-IT Consulting", /* 38435 */ "ReiniNET", /* 38436 */ "Vlastimil Kupsky", /* 38437 */ "GTwins", /* 38438 */ "Aurenz GmbH", /* 38439 */ "HEROLD Business Data GmbH", /* 38440 */ "Blue-Sphere", /* 38441 */ "INRADIOS GmbH", /* 38442 */ "OrbiConnect GmbH & Co. KG", /* 38443 */ "Holiday Extras Limited", /* 38444 */ "VMC", /* 38445 */ "Enlogic Systems, LLC", /* 38446 */ "Ing. Viliam Oršula - iElectro", /* 38447 */ "NOLOGIN CONSULTING SL", /* 38448 */ "Nationwide Building Society", /* 38449 */ "DediPower Managed Hosting Ltd.", /* 38450 */ "LanderNet Inc.", /* 38451 */ "QQ2", /* 38452 */ "Indigo Dynamic Networks, LLC", /* 38453 */ "Adpuntum GmbH", /* 38454 */ "Cyberware Inc.", /* 38455 */ "IC \"ISKRA\" Ltd.", /* 38456 */ "ecvision", /* 38457 */ "Nachtwacht", /* 38458 */ "SBIT GmbH", /* 38459 */ "Gemtek Technology Co., Ltd.", /* 38460 */ "ragenet llc", /* 38461 */ "Pt Magnar Nugraha", /* 38462 */ "Data Service Integration", /* 38463 */ "Snoerf.org", /* 38464 */ "Avalcom Sp. z o.o.", /* 38465 */ "Max-Planck-Institut für Molekulare Genetik", /* 38466 */ "Carl Edelmann GmbH", /* 38467 */ "Garage Center for Contemporary Culture", /* 38468 */ "Axtion Sdn Bhd", /* 38469 */ "Bison Schweiz AG", /* 38470 */ "Multimediakontor Hamburg GmbH", /* 38471 */ "Kevin Mullet", /* 38472 */ "Ellis Hospital", /* 38473 */ "Blackridge Technology", /* 38474 */ "Global SATCOM Technology, Inc.", /* 38475 */ "prosozial GmbH", /* 38476 */ "Antaira Technologies, LLC.", /* 38477 */ "VerticalCue Design LLC", /* 38478 */ "Seluxit", /* 38479 */ "ABPM", /* 38480 */ "M Financial Group", /* 38481 */ "MetaStack Solutions Ltd.", /* 38482 */ "netmonitor", /* 38483 */ "Innerdive Solutions, LLC.", /* 38484 */ "Westchester Digestive Disease Group LLP", /* 38485 */ "Eurotec Information Systems K.K.", /* 38486 */ "Quadro Systems", /* 38487 */ "Exceptional Innovation, LLC.", /* 38488 */ "WD-40 Company", /* 38489 */ "Nebula, Inc.", /* 38490 */ "Clean Communications Ltd", /* 38491 */ "WorldmingoSolutions", /* 38492 */ "VPT", /* 38493 */ "CLINTWORLD GmbH", /* 38494 */ "PERTIMM", /* 38495 */ "Digg, Inc.", /* 38496 */ "Collins Systems", /* 38497 */ "Georgia-Cumberland Conference", /* 38498 */ "Versadial Solutions", /* 38499 */ "CareTech AB", /* 38500 */ "Fundação Parque Tecnológico Itaipu", /* 38501 */ "BizNet Corporación Costa Rica", /* 38502 */ "Advtal52", /* 38503 */ "Skyworth", /* 38504 */ "OJSC OC ROSNEFT", /* 38505 */ "Plus Pack A/S", /* 38506 */ "Depalol Gestió i Multimèdia", /* 38507 */ "BW Broadcast Ltd", /* 38508 */ "DNS:NET Internet Service GmbH", /* 38509 */ "Colorcon, Inc.", /* 38510 */ "Toyota Motor Corporation Australia", /* 38511 */ "St Mary's College", /* 38512 */ "PJSC Myronivsky Hliboproduct", /* 38513 */ "Fr. Sauter AG", /* 38514 */ "IXC", /* 38515 */ "Allworx", /* 38516 */ "St Joseph Healthcare", /* 38517 */ "ATMA Tecnologia Ltda.", /* 38518 */ "DeltaVision Sp. Z o.o.", /* 38519 */ "Semmle Ltd.", /* 38520 */ "Občanské sdružení Ubuntu pro Českou republiku", /* 38521 */ "Zhejiang Post", /* 38522 */ "Samimrayaneh", /* 38523 */ "StorageCraft Technology Corporation", /* 38524 */ "City of Windhoek", /* 38525 */ "Paul Davison (consulting)", /* 38526 */ "GeekSoc", /* 38527 */ "PIKA Technologies", /* 38528 */ "AKA Computer Solution Inc.", /* 38529 */ "Informationsdesign AG", /* 38530 */ "ICF International", /* 38531 */ "GroupScape.com", /* 38532 */ "ElphoTech", /* 38533 */ "L-ACOUSTICS", /* 38534 */ "Sierra Photonics Inc.", /* 38535 */ "10ZiG Technology", /* 38536 */ "Texas Municipal League Intergovernmental Risk Pool", /* 38537 */ "Sify Technologies Ltd", /* 38538 */ "ANKABUT (UAE Advanced Network for Research and Education)", /* 38539 */ "Phoebus Vision", /* 38540 */ "Concentric Cloud Solutions, LLC", /* 38541 */ "OpenIP", /* 38542 */ "Continental Lensa Ltd.", /* 38543 */ "Asset Control International BV", /* 38544 */ "Advanced Medical X-Ray", /* 38545 */ "ORPHEUS", /* 38546 */ "Dignitas Technologies", /* 38547 */ "SHENZHEN UNIVERSAL INTELLISYS PTE LTD", /* 38548 */ "Netstor Technology Co., Ltd.", /* 38549 */ "Security Pillar Ltd", /* 38550 */ "Pansardata AB", /* 38551 */ "Manfred Nagl - naglit.at", /* 38552 */ "Bureau of industrial automation LLC", /* 38553 */ "Mark & Space Telesystems (P) LTD.", /* 38554 */ "Jeppesen", /* 38555 */ "Tradesignal GmbH", /* 38556 */ "Artvin Coruh University", /* 38557 */ "Innes Corporation Pty Ltd", /* 38558 */ "ITAC, IT APPLICATIONS CONSULTING S.A.", /* 38559 */ "Denver International Airport (City and County of Denver)", /* 38560 */ "Appleton Coated llc", /* 38561 */ "KokelNET", /* 38562 */ "Ryan Systems, Inc.", /* 38563 */ "Mark IV Indonesia", /* 38564 */ "Instrumentation Technologies d.d.", /* 38565 */ "FirstPower a.s.", /* 38566 */ "Hit the Sticks, LLC", /* 38567 */ "Syvea Technologies", /* 38568 */ "Uziek Pte. Ltd.", /* 38569 */ "axn software UG (haftungsbeschränkt)", /* 38570 */ "Health Information Technology Exchange of Connecticut", /* 38571 */ "TroSoft AB", /* 38572 */ "Zucchetti Axess SpA", /* 38573 */ "Facultad Regional Santa Fe, Universidad Tecnológica Nacional.", /* 38574 */ "TeraTron GmbH", /* 38575 */ "Lomond Paper Ltd", /* 38576 */ "Perfecta Aviation", /* 38577 */ "New York City Transit Authority", /* 38578 */ "Pike Aerospace Research Corporation", /* 38579 */ "i3 International inc.", /* 38580 */ "Crouse Hospital", /* 38581 */ "Fryman and Associates, Inc", /* 38582 */ "MetroPCS Wireless, Inc.", /* 38583 */ "Superior Communication Solutions Inc.", /* 38584 */ "VEG Networks", /* 38585 */ "DoZeener Controls", /* 38586 */ "SmartKomm GmbH", /* 38587 */ "Tanuki Software, Ltd.", /* 38588 */ "Egyptian Universities Network, EUN", /* 38589 */ "Islamic Republic Broadcasting of Iran", /* 38590 */ "Indusface Telecom Private Limited", /* 38591 */ "Cyan Technology", /* 38592 */ "Cloud 9 Business Analytics Limited", /* 38593 */ "Enel PS d.o.o.", /* 38594 */ "Shanghai Zhongmi Communication Technology CO.,LTD.", /* 38595 */ "University of Saint Joseph", /* 38596 */ "Sunfest", /* 38597 */ "Sunfest", /* 38598 */ "LTU Technologies", /* 38599 */ "kleinhans it-solutions und services", /* 38600 */ "ELIUM GmbH", /* 38601 */ "S&C Electric Company", /* 38602 */ "Applied Systems Engineering, Inc.", /* 38603 */ "In And Out Cologne", /* 38604 */ "Calxeda, Inc.", /* 38605 */ "Gusbeckers Development", /* 38606 */ "WITTENSTEIN AG", /* 38607 */ "Gymnázium, Plzeň", /* 38608 */ "lipple.jp", /* 38609 */ "PT Respati Solusi Rekatama", /* 38610 */ "Alan Baugher", /* 38611 */ "Itrix Incorporation", /* 38612 */ "Computer Technologes and Systems Ltd.", /* 38613 */ "Nextest Systems", /* 38614 */ "Mettle Networks, Inc", /* 38615 */ "METEL s.r.o.", /* 38616 */ "Callplus Services Limited", /* 38617 */ "Critical Software Ltd", /* 38618 */ "think digital GmbH", /* 38619 */ "Gamma 2000 Pte Ltd", /* 38620 */ "Merruk Technology, SARL.", /* 38621 */ "Master Power Technologies", /* 38622 */ "bolay.co", /* 38623 */ "NETGRAPPLER Corporation", /* 38624 */ "SILOCOM Internacional Corp.", /* 38625 */ "Bureau 14 SARL", /* 38626 */ "DLC Systems, Inc.", /* 38627 */ "LivingSocial", /* 38628 */ "Connamara Systems, llc", /* 38629 */ "OneHealthPort", /* 38630 */ "Morgajel.com", /* 38631 */ "Mariana Consulting, LLC", /* 38632 */ "VOXLIBERTUM AG", /* 38633 */ "Hendrikx ITC B.V.", /* 38634 */ "Falcon Steel Co.", /* 38635 */ "Starfish Technologies Limited", /* 38636 */ "U2 Systems", /* 38637 */ "ista International GmbH", /* 38638 */ "bpost", /* 38639 */ "Novus Partners, Inc.", /* 38640 */ "yate", /* 38641 */ "Net Trans Services AS", /* 38642 */ "SQISOFT Inc.", /* 38643 */ "Armadino", /* 38644 */ "OCV CJSC", /* 38645 */ "StoniesHome", /* 38646 */ "KV-Telematik ARGE", /* 38647 */ "DOMENY.PL Ltd", /* 38648 */ "Mr Panquecito", /* 38649 */ "Western Australian Network Gaming Inc.", /* 38650 */ "Observatório Nacional", /* 38651 */ "Instituto Federal Catarinense Campus Videira", /* 38652 */ "Verlagsgruppe NEWS Ges.m.b.H", /* 38653 */ "BoostAeroSpace SAS", /* 38654 */ "NBU SK (NATIONAL SECURITY AUTHORITY)", /* 38655 */ "Energinet.dk", /* 38656 */ "Ministerio de Justicia y Paz", /* 38657 */ "Music for Humans", /* 38658 */ "The Criminal Defense Group", /* 38659 */ "Certipost n.v./s.a.", /* 38660 */ "Wuxi Thinkyare Electronic Technology Co., Ltd.", /* 38661 */ "Drachenfels Ltd", /* 38662 */ "ahd hellweg data GmbH & Co. KG", /* 38663 */ "Sky Area", /* 38664 */ "PUUR it (www.puur-it.nl)", /* 38665 */ "Silversands Limited", /* 38666 */ "Mindbean", /* 38667 */ "RahuNAS", /* 38668 */ "NIKKEY CO.,LTD.", /* 38669 */ "BICS - Belgacom International Carrier Services", /* 38670 */ "Cellbusters LLC", /* 38671 */ "Zaeim Electronic Industries", /* 38672 */ "E-merchant", /* 38673 */ "West Virginia Health Information Network (WVHIN)", /* 38674 */ "NorCell Inc.", /* 38675 */ "PDU EXPERT UK LTD", /* 38676 */ "ECOSIX", /* 38677 */ "Joyent, Inc.", /* 38678 */ "idcell.co.ltd", /* 38679 */ "Nimbula, Inc", /* 38680 */ "HJBaier", /* 38681 */ "Mindlinx Technology Solutions", /* 38682 */ "Klinikum Ansbach", /* 38683 */ "LOGEMED", /* 38684 */ "Semptian Technologies Ltd.", /* 38685 */ "CLS Argos", /* 38686 */ "The Online Backup Company Norway AS", /* 38687 */ "Educa.ch - Schweizer Medieninstitut für Bildung und Kultur", /* 38688 */ "Old Mutual", /* 38689 */ "Corepoint Health", /* 38690 */ "Quanti s.r.o.", /* 38691 */ "ONPATH Technologies Inc", /* 38692 */ "matthewv.com", /* 38693 */ "Alabama One Health Record (ALOHR)", /* 38694 */ "Joehl + Koeferli AG", /* 38695 */ "Hacking Networked Solutions Ltd.", /* 38696 */ "DSM Inc", /* 38697 */ "Onebox Ticket Management", /* 38698 */ "Pulsar Consulting sa", /* 38699 */ "Sergey Kozlov", /* 38700 */ "ECBIZNET, INC.", /* 38701 */ "Talisman Energy Inc", /* 38702 */ "Advancia Corporation", /* 38703 */ "Nvest., Inc", /* 38704 */ "Amplidata", /* 38705 */ "maceghost", /* 38706 */ "Zodiac Data Systems", /* 38707 */ "Shenzhen CTI Technology Co., Ltd.", /* 38708 */ "Edison Global Circuits, LLC", /* 38709 */ "Ian Kristin", /* 38710 */ "Dolby Medical Home Respiratory Care Ltd", /* 38711 */ "St. Joseph's Healthcare System INC", /* 38712 */ "National Association of REALTORS®", /* 38713 */ "RLH INDUSTRIES,INC.", /* 38714 */ "jllin agricultural university", /* 38715 */ "Orbotech", /* 38716 */ "INSIEL – Informatica per il Sistema degli Enti Locali S.p.A", /* 38717 */ "Zobele Instrument (Shenzhen) Co., Ltd.", /* 38718 */ "Nextgen Innovation Labs LLC", /* 38719 */ "ENTLibre", /* 38720 */ "Hexaglobe", /* 38721 */ "Conseil Général du Calvados", /* 38722 */ "jusme.com", /* 38723 */ "3iSYS", /* 38724 */ "Florian Wagner", /* 38725 */ "bjoernskou", /* 38726 */ "banan s.r.o.", /* 38727 */ "Kiez.Net", /* 38728 */ "GCCA Inc.", /* 38729 */ "RadioAccess", /* 38730 */ "Wiscada s.r.l", /* 38731 */ "Sachsen DV GmbH", /* 38732 */ "VoiceRite, Inc.", /* 38733 */ "Padilha com", /* 38734 */ "Web Secure Vault, Inc.", /* 38735 */ "Promise Regional Medical Center - Hutchinson", /* 38736 */ "MyOwnFile BV", /* 38737 */ "NL Technologies", /* 38738 */ "Nebras Technology", /* 38739 */ "Attentec AB", /* 38740 */ "Mobile Frosting", /* 38741 */ "Les créations Snowflakes", /* 38742 */ "Gruden", /* 38743 */ "twootton", /* 38744 */ "UNO System", /* 38745 */ "incelis", /* 38746 */ "SHENZHEN SUPLET CO., LTD.", /* 38747 */ "2H ENERGY", /* 38748 */ "GNU Generation", /* 38749 */ "Neologic Sp. z o.o.", /* 38750 */ "Marketwire", /* 38751 */ "New Jersey Manufacturers Insurance Company", /* 38752 */ "TECNOMEDSA", /* 38753 */ "Jinon Corporation", /* 38754 */ "Českomoravské informační systémy s.r.o.", /* 38755 */ "TNG Technology Consulting", /* 38756 */ "Sigtec Pty Ltd", /* 38757 */ "GrandCapital Ltd.", /* 38758 */ "Katholieke Hogeschool Limburg", /* 38759 */ "Veselības ekonomikas centrs", /* 38760 */ "OSnode", /* 38761 */ "Deutsche Rentenversicherung Bund", /* 38762 */ "cenhare AG", /* 38763 */ "Boscad", /* 38764 */ "imirhil.fr", /* 38765 */ "Gosloto Ltd.", /* 38766 */ "Martin Diener", /* 38767 */ "StreamBase Systems, Inc.", /* 38768 */ "Holy Redeemer Hospital and Medical Center", /* 38769 */ "AGGREGATUM", /* 38770 */ "Internet Integration, Inc.", /* 38771 */ "Mageia.Org", /* 38772 */ "Visionutveckling AB", /* 38773 */ "CONET Solutions GmbH", /* 38774 */ "Stream Labs", /* 38775 */ "Telarix", /* 38776 */ "NOU DPO UMC YARB", /* 38777 */ "Jeda Networks", /* 38778 */ "Noggin IT", /* 38779 */ "Gaertner", /* 38780 */ "trainline", /* 38781 */ "TAGHOS Tecnologia", /* 38782 */ "Teracom Ltd.", /* 38783 */ "Systems Integration Specialists Company, Inc.", /* 38784 */ "Dirdal-it", /* 38785 */ "Emirates Integrated Telecommunications Company, PJSC", /* 38786 */ "Nanjing Tunec Science & Technology Co., Ltd.", /* 38787 */ "Oasis Telecommunication Technologies", /* 38788 */ "National TeleConsultants LLC", /* 38789 */ "EUROBANK EFG BULGARIA AD", /* 38790 */ "Atos IT Solutions and Services AG", /* 38791 */ "Operator Logistyczny Paliw Płynnych Sp. z o.o.", /* 38792 */ "Universidade Federal Rural do Rio de Janeiro", /* 38793 */ "UQODE", /* 38794 */ "ASSOCIATION MENSA FRANCE", /* 38795 */ "Takashi Komatsubara", /* 38796 */ "Atlantis Computing Inc.", /* 38797 */ "Compulink", /* 38798 */ "Dream Property GmbH", /* 38799 */ "Ecker & Partner", /* 38800 */ "Pythia Technologies", /* 38801 */ "CloudWare Co", /* 38802 */ "Woori-Net Inc.", /* 38803 */ "SEVEN PRINCIPLES AG", /* 38804 */ "Envers AG", /* 38805 */ "Victor Technologies", /* 38806 */ "Lanka Education and Research Network", /* 38807 */ "University of Miyazaki", /* 38808 */ "4finance", /* 38809 */ "Anhui Asky Quantum Technology Co.,Ltd", /* 38810 */ "Ministry of Information", /* 38811 */ "Centerm Information Company", /* 38812 */ "Computer Systems Consulting s.r.o.", /* 38813 */ "IFMOD GmbH & Co. KG", /* 38814 */ "ETHERPOWER S.R.L.", /* 38815 */ "Partnerpedia Solutions, Inc.", /* 38816 */ "University of Western Greece", /* 38817 */ "American National Insurance", /* 38818 */ "VCE Company, LLC", /* 38819 */ "Inside Lacrosse", /* 38820 */ "ThirdWave B.V.", /* 38821 */ "Sport Voswinkel GmbH & Co. KG", /* 38822 */ "Grandvision", /* 38823 */ "LYNX spol. s r.o.", /* 38824 */ "Huntsman International LLC", /* 38825 */ "Liberty Life", /* 38826 */ "orientscience", /* 38827 */ "AllDigital, Inc.", /* 38828 */ "Sjöfartsverket", /* 38829 */ "Sepialine Inc.", /* 38830 */ "Fédération Nationale des Tiers de Confiance", /* 38831 */ "Clearfield Hospital", /* 38832 */ "TRANSPOREON GmbH", /* 38833 */ "Orad Hi Tec Systems Ltd.", /* 38834 */ "Yota", /* 38835 */ "Western Oregon University", /* 38836 */ "First Interstate Bank", /* 38837 */ "Angstrem-Telecom JSC", /* 38838 */ "nPhase LLC.", /* 38839 */ "Visual Click Software, Inc.", /* 38840 */ "XCEL SOLUTIONS CORP", /* 38841 */ "ECM Inc", /* 38842 */ "Kinoton GmbH", /* 38843 */ "Astec IT Solutions Ltd.", /* 38844 */ "DZ BANK AG", /* 38845 */ "Bong U.K. Ltd.", /* 38846 */ "Prelert", /* 38847 */ "Susquehanna Health", /* 38848 */ "Intwine Energy", /* 38849 */ "Global MunnexTech SA de CV", /* 38850 */ "Izmir Institute of High Technology", /* 38851 */ "XCOM AG", /* 38852 */ "RIA Novosti", /* 38853 */ "Ncurity", /* 38854 */ "Nagoya Institute of Technology", /* 38855 */ "Login People", /* 38856 */ "VASONA NETWORKS", /* 38857 */ "General Micro Systems, Inc", /* 38858 */ "Agile Communications, Inc.", /* 38859 */ "comadot.net", /* 38860 */ "Rudy Gevaert", /* 38861 */ "Erstikalender.info", /* 38862 */ "SiChuan Andi industry co.LTD", /* 38863 */ "Virgin Holidays Ltd", /* 38864 */ "Squadra Technologies", /* 38865 */ "TRIMET Aluminium SE", /* 38866 */ "mecodia GmbH", /* 38867 */ "Comision Nacional de Bancos y Seguros", /* 38868 */ "Alexey S Khromov", /* 38869 */ "Mandiant", /* 38870 */ "Vostokcement Ltd.", /* 38871 */ "JSC \"Prompribor\"", /* 38872 */ "Alex Bolgov", /* 38873 */ "ENABIL Solutions Ltd.", /* 38874 */ "UnifiedPost S.A.", /* 38875 */ "Mork", /* 38876 */ "BPM Advanced Technology Company", /* 38877 */ "s.d.i. s.p.a.", /* 38878 */ "tradebridge Pty Ltd", /* 38879 */ "MicroAutomation", /* 38880 */ "Abelium d.o.o.", /* 38881 */ "Barron McCann Technology", /* 38882 */ "Phenomic Business Systems Ltd", /* 38883 */ "Electrolux", /* 38884 */ "nPulse Technologies Inc.", /* 38885 */ "Societe d'exploitation de Reseaux et de Services Securises (SER2S)", /* 38886 */ "VIS - Verein der Informatik Studierenden", /* 38887 */ "c3pb e.V.", /* 38888 */ "Okuejina", /* 38889 */ "Blue Shield of California", /* 38890 */ "Jimma University", /* 38891 */ "Axiovista S.A.", /* 38892 */ "Marc Luehr", /* 38893 */ "GROB-WERKE GmbH & Co. KG", /* 38894 */ "sig21 labs", /* 38895 */ "Findaway World", /* 38896 */ "Safegate International AB", /* 38897 */ "La France du Nord au Sud", /* 38898 */ "National Institute Of Weather And Atmospheric Research", /* 38899 */ "Fukuoka University", /* 38900 */ "Landsvirkjun", /* 38901 */ "NovAtel Inc.", /* 38902 */ "Malin Space Science Systems", /* 38903 */ "School Specialty, Inc.", /* 38904 */ "Timanetworks Inc.", /* 38905 */ "Goethe-Universitaet Frankfurt am Main", /* 38906 */ "Zumbox, Inc.", /* 38907 */ "Aon Corporation", /* 38908 */ "Linguistic Data Consortium", /* 38909 */ "Xicoy Electronica S.L.", /* 38910 */ "McLeod Health", /* 38911 */ "psych0tik.net", /* 38912 */ "QXTN Pty Ltd", /* 38913 */ "JNT SOUND SYSTEM AB", /* 38914 */ "avono AG", /* 38915 */ "Shanghai ekingstar Digital Campus Co,.Ltd.", /* 38916 */ "Guangxi Xinhai Communication Technology Co.,Ltd", /* 38917 */ "DEK Technologies Pty Ltd", /* 38918 */ "EPRONA, a.s.", /* 38919 */ "SnapTV AS", /* 38920 */ "Capetti Elettronica srl", /* 38921 */ "Hypotecni banka, a.s.", /* 38922 */ "iProfs", /* 38923 */ "Damarel Systems International Ltd.", /* 38924 */ "PROCENTEC", /* 38925 */ "InnovAction srl", /* 38926 */ "Versile AS", /* 38927 */ "Powel Energy Management AB", /* 38928 */ "Fugro Geos Ltd", /* 38929 */ "@Planet Ltd", /* 38930 */ "Chaz6", /* 38931 */ "INSTART INC", /* 38932 */ "Ubilogix International, Inc.", /* 38933 */ "35x.de", /* 38934 */ "MPM sas", /* 38935 */ "Enrico Rivarola", /* 38936 */ "ResMed SAS", /* 38937 */ "ISACO GmbH", /* 38938 */ "Flexera Software LLC", /* 38939 */ "Thales Communications and Security", /* 38940 */ "D. E. Shaw & Co, L.P.", /* 38941 */ "Coca-Cola Enterprises, Inc.", /* 38942 */ "Edgar Kittner GmbH & Co.KG", /* 38943 */ "Kamstrup A/S", /* 38944 */ "NASA Center for Climate Simulation (NCCS)", /* 38945 */ "Raja Consulting Ltd", /* 38946 */ "IREQ (Institut de recherche d'Hydro-Quebec)", /* 38947 */ "SureID, Inc.", /* 38948 */ "Ballard Technology, Inc.", /* 38949 */ "Mars Space Flight Facility", /* 38950 */ "Beijing Zigvine Tech. Co. Ltd.", /* 38951 */ "Ferox Communications S.L.", /* 38952 */ "coveragetools", /* 38953 */ "Informatio GmbH", /* 38954 */ "Wire and Wireless Co., Ltd.", /* 38955 */ "HOERBIGER Deutschland Holding GmbH", /* 38956 */ "SWISS-ARTG", /* 38957 */ "Dynamic Technologies(Asia) Ltd", /* 38958 */ "K M Medicals", /* 38959 */ "E-VAL Tecnologia em Informática Ltd.", /* 38960 */ "A&W Networks", /* 38961 */ "Oleksandr Moskalets", /* 38962 */ "WoodWing Software", /* 38963 */ "Coral Sea Enterprises, LLC", /* 38964 */ "TelePro, Inc.", /* 38965 */ "Stryker", /* 38966 */ "Resal spol. s r.o.", /* 38967 */ "Telino", /* 38968 */ "Intellipower, Inc.", /* 38969 */ "Vilpra, UAB", /* 38970 */ "Guacamole Project", /* 38971 */ "Coordinate-System Transport Tech. Co.,Ltd", /* 38972 */ "k-blue", /* 38973 */ "ENDA GmbH & Co. KG", /* 38974 */ "Production Resource Group L.L.C.", /* 38975 */ "Quortus Ltd", /* 38976 */ "Imayhem S.L.L.", /* 38977 */ "Adriatic Solutions Corp.", /* 38978 */ "SII Lille", /* 38979 */ "AGH University of Science and Technology", /* 38980 */ "Stradus", /* 38981 */ "Advanced Telecommunications Technology Research Sp. z o.o.", /* 38982 */ "CompuRoot", /* 38983 */ "CampusIT", /* 38984 */ "ECM2", /* 38985 */ "SOCAR Georgia", /* 38986 */ "Nettbuss AS", /* 38987 */ "Ministry of Awqaf and Islamic Affairs - Kuwait", /* 38988 */ "Qtree BVBA", /* 38989 */ "Nova World International, LLC dba Nova Shipping", /* 38990 */ "Innoforma E-learning Technologies", /* 38991 */ "SCCT, Wilhelm Wimmreuter", /* 38992 */ "South Jersey Healthcare", /* 38993 */ "San Juan Software", /* 38994 */ "Connexon Telecom Inc.", /* 38995 */ "Japan Aerospace Exploration Agency", /* 38996 */ "Telnetware Co.,Ltd", /* 38997 */ "i20", /* 38998 */ "Higher Light Communications", /* 38999 */ "LinuxMCE", /* 39000 */ "NetFlow Logic", /* 39001 */ "cibex gmbh", /* 39002 */ "Sub10 Systems Ltd.", /* 39003 */ "Diaphanoscope", /* 39004 */ "Total Device", /* 39005 */ "VZTech Importacao Exportacao e Desenvolvimento de Tecnologia Ltda", /* 39006 */ "Armada Nacional - Uruguay", /* 39007 */ "Nouvelle s.r.l.", /* 39008 */ "hub telecom", /* 39009 */ "GrupaA Sp. z o.o.", /* 39010 */ "Fresco Logic, Inc.", /* 39011 */ "INNOBAND TECHNOLOGIES, INC.", /* 39012 */ "Assurity Trusted Solutions Pte Ltd", /* 39013 */ "Colina Participations", /* 39014 */ "MAXXING S.A.S.U.", /* 39015 */ "Field Electronics Limited", /* 39016 */ "Object Trading Pty Ltd", /* 39017 */ "Dyna Healthcare Co., Ltd.", /* 39018 */ "Techinfocom, Jsc", /* 39019 */ "Net To Net Co., Ltd", /* 39020 */ "pdv-systeme Sachsen GmbH", /* 39021 */ "Joint Stock Company SVYAZNOY BANK", /* 39022 */ "murtaza enterprizes", /* 39023 */ "Bjango", /* 39024 */ "Velleros, Inc.", /* 39025 */ "Tritux", /* 39026 */ "www.duowan.com", /* 39027 */ "Enkata", /* 39028 */ "Lukse", /* 39029 */ "CloudGuard Software AG", /* 39030 */ "Eastern Mennonite University", /* 39031 */ "Caldwell Memorial Hospital, Inc.", /* 39032 */ "Quinstar Technology, Inc.", /* 39033 */ "nesfile.org", /* 39034 */ "Orbital Systems, Ltd.", /* 39035 */ "iMobile3, LLC", /* 39036 */ "Inocybe Technologies inc.", /* 39037 */ "COMPNET Ltd", /* 39038 */ "Daniels Electronics, Ltd", /* 39039 */ "DigitalArts Inc.", /* 39040 */ "Enthina", /* 39041 */ "E-ID internet strategies B.V.", /* 39042 */ "EBRO ARMATUREN GMBH", /* 39043 */ "idefclub.ru", /* 39044 */ "Cubio Communications Oy", /* 39045 */ "Jimdo GmbH", /* 39046 */ "The Foundry", /* 39047 */ "Sayre Memorial Hospital", /* 39048 */ "Byte, SIA", /* 39049 */ "Forschungsgemeinschaft elektronische Medien (FeM) e.V.", /* 39050 */ "g360apps.com", /* 39051 */ "Vutlan sro", /* 39052 */ "Rail & Sea", /* 39053 */ "NetUP Inc.", /* 39054 */ "S2 Communications AB", /* 39055 */ "Samsung Electronics America, Inc.", /* 39056 */ "SCAE Co. Ltd.", /* 39057 */ "CET Electronics", /* 39058 */ "RTE", /* 39059 */ "Suster.net", /* 39060 */ "Analytica", /* 39061 */ "Mark Harlos, Software Engineering Consultant", /* 39062 */ "Delecon", /* 39063 */ "Eseye Ltd", /* 39064 */ "African Institute for Mathematical Sciences", /* 39065 */ "FTS DVL SRL", /* 39066 */ "Verba Technologies", /* 39067 */ "hostapd/wpa_supplicant project", /* 39068 */ "Japan Ballast Co.", /* 39069 */ "STARK", /* 39070 */ "Konkurent Ltd.", /* 39071 */ "Campai Business Solutions BV", /* 39072 */ "Blue Mind", /* 39073 */ "makabra", /* 39074 */ "HealthE Advocate LLP", /* 39075 */ "Zalaszam Kft", /* 39076 */ "Dorlet S.A", /* 39077 */ "Vimpex GmbH", /* 39078 */ "AdvaICT, a.s.", /* 39079 */ "ITRS Group Limited", /* 39080 */ "ASACA Corporation", /* 39081 */ "PhoenixNAP", /* 39082 */ "Samodzielny Publiczny Centralny Szpital Kliniczny", /* 39083 */ "Texas A&M University - Kingsville", /* 39084 */ "MUJIN Inc.", /* 39085 */ "FriendFinder Networks, Inc.", /* 39086 */ "Astra Communication Service Co., Ltd", /* 39087 */ "Hochschule Deggendorf", /* 39088 */ "Krones AG", /* 39089 */ "subreport Verlag Schawe GmbH", /* 39090 */ "Good Link", /* 39091 */ "ChongQing Cable Network", /* 39092 */ "Basler AG", /* 39093 */ "Kambi", /* 39094 */ "iFlex Ltd.", /* 39095 */ "Lohika ltd.", /* 39096 */ "Maxeler Technologies Ltd", /* 39097 */ "Kyanmedia Limited", /* 39098 */ "RSA SaaS", /* 39099 */ "The Binary Workshop", /* 39100 */ "Frisbie Memorial Hospital", /* 39101 */ "Power Home Remodeling Group, Inc.", /* 39102 */ "LS telcom AG", /* 39103 */ "Universidad Central de Las Villas", /* 39104 */ "Technet Systems", /* 39105 */ "ExpatJob.net GROUP", /* 39106 */ "ULHI - Urrutiko Lanbide Heziketa Institutua", /* 39107 */ "Trusteer Ltd.", /* 39108 */ "Morpho Detection, Inc.", /* 39109 */ "State of Colorado Judicial Department", /* 39110 */ "Eladian Partners, LLC", /* 39111 */ "Netsoc DIT", /* 39112 */ "IRT Technologies Inc.", /* 39113 */ "Ittxa", /* 39114 */ "XACK,Inc.", /* 39115 */ "Folkwang Universität der Künste", /* 39116 */ "noax Technologies AG", /* 39117 */ "Amadeus s.a.s", /* 39118 */ "dm-drogerie markt GmbH + Co. KG", /* 39119 */ "itunic consulting", /* 39120 */ "ElringKlinger AG", /* 39121 */ "Framehawk Inc.", /* 39122 */ "Two Degrees Mobile Ltd", /* 39123 */ "Kaweah Delta Health Care District", /* 39124 */ "Instituto Superior de Engenharia do Porto (ISEP)", /* 39125 */ "DCA Inc", /* 39126 */ "Mercury Insurance Group", /* 39127 */ "ALLIANZ LIFE INSURANCE OF NORTH AMERICA", /* 39128 */ "Reiknistofa i Vedurfraedi", /* 39129 */ "Century Software (M) Sdn Bhd", /* 39130 */ "Sistemas Informaticos Abiertos S.A.", /* 39131 */ "Camair-Co", /* 39132 */ "Kamsoft S.A.", /* 39133 */ "Apex", /* 39134 */ "U.S. Bancorp", /* 39135 */ "Adams State College", /* 39136 */ "ameria GmbH", /* 39137 */ "Santa Barbara County Education Office", /* 39138 */ "nPario Inc", /* 39139 */ "Interra Systems, Inc.", /* 39140 */ "Qice Technology Co. Ltd", /* 39141 */ "Nian Electronic Company", /* 39142 */ "LARS", /* 39143 */ "Nextouch, Inc.", /* 39144 */ "Innovative Circuit Technology Ltd.", /* 39145 */ "Watchdog Software Pty Limited", /* 39146 */ "intratop", /* 39147 */ "Agjencia Kombetare e Shoqerise se Informacionit", /* 39148 */ "broadAngle, LLC", /* 39149 */ "B.O.S. Software Service und Vertrieb GmbH", /* 39150 */ "Autorité des Marchés Financiers", /* 39151 */ "DVT - Daten-Verarbeitung-Tirol GmbH", /* 39152 */ "WAYF - Where Are You From", /* 39153 */ "SwiftStack", /* 39154 */ "Mango DSP, Inc.", /* 39155 */ "PROSCOPE Corporation", /* 39156 */ "DERMALOG IDENTIFICATION SYSTEMS GMBH", /* 39157 */ "Akouto", /* 39158 */ "Redpoint Software", /* 39159 */ "PointRed Telecom Ltd.", /* 39160 */ "Precision Infomatic", /* 39161 */ "WEOLO", /* 39162 */ "U-BTech Solutions", /* 39163 */ "Cires21 S.L.", /* 39164 */ "Hikvision Digital Technology Co., Ltd.", /* 39165 */ "Stadt Moenchengladbach", /* 39166 */ "kastel.net", /* 39167 */ "eneatec GmbH", /* 39168 */ "Softronics AG", /* 39169 */ "Koario", /* 39170 */ "alipay", /* 39171 */ "Paytronix Systems, Inc.", /* 39172 */ "Datek Wireless AS", /* 39173 */ "Club Méditerrannée S.A.", /* 39174 */ "GoEast GmbH", /* 39175 */ "MiTek Inc.", /* 39176 */ "Leuphana University of Lueneburg", /* 39177 */ "The IMS Company", /* 39178 */ "Accuoss", /* 39179 */ "MTICUBE, LLC", /* 39180 */ "International Development Council for Academic Studies (IDCAS)", /* 39181 */ "OJSC \"GT-TEC Energo\"", /* 39182 */ "Layered Logic, Inc.", /* 39183 */ "xingplatform inc", /* 39184 */ "System Level Solutions (India) Pvt. Ltd", /* 39185 */ "Ministry of Foreign Affairs of Hungary", /* 39186 */ "Marmara Univesity", /* 39187 */ "Virtual Cable S.L.", /* 39188 */ "King Pine", /* 39189 */ "Sergey I Mihailov", /* 39190 */ "Comfort Consulting", /* 39191 */ "IBSmm Engineering, spol. s r.o.", /* 39192 */ "Vayosoft Network Technologies Ltd.", /* 39193 */ "CSSS IUGS (Centre de Sante et des Services Sociaux - Institut Universitaire de Geriatrie de Sherbrooke)", /* 39194 */ "Spawngrid, Inc.", /* 39195 */ "Oxynux", /* 39196 */ "Xitek Design Ltd", /* 39197 */ "Brekeke Software, Inc.", /* 39198 */ "EXPRESSTRAK - DATS", /* 39199 */ "KTB COMPUTER SERVICES Co.,Ltd", /* 39200 */ "redtoo ag", /* 39201 */ "ASP Alerce Tecnology SL", /* 39202 */ "Qualysoft Informatikai Zrt.", /* 39203 */ "QuanticEvents", /* 39204 */ "Broadnet Telecom Inc", /* 39205 */ "EITV - Entretenimento e Interatividade para TV Digital", /* 39206 */ "SparkYard, Inc.", /* 39207 */ "LivingObjects", /* 39208 */ "Plexus Corp.", /* 39209 */ "Impulse Point LLC", /* 39210 */ "Positronics Enterprise Limited", /* 39211 */ "Prosyscor Ltd", /* 39212 */ "Datakonsult Magnus Sandberg", /* 39213 */ "MT2IT", /* 39214 */ "Kernun", /* 39215 */ "BroadForward B.V.", /* 39216 */ "Triple T Broadband PCL", /* 39217 */ "Connection Electronics Ltd.", /* 39218 */ "Overkiz", /* 39219 */ "Theoldmonk.net", /* 39220 */ "Pakedge Device and Software Inc", /* 39221 */ "Patrick Shuff Industries", /* 39222 */ "ADNET Systems, Inc.", /* 39223 */ "Djipalo Junuz", /* 39224 */ "AVRO Electrics", /* 39225 */ "REWOO Technologies AG", /* 39226 */ "GIE Vauban Humanis", /* 39227 */ "Kemira Oyj", /* 39228 */ "Convergence Technologies", /* 39229 */ "lenic.eu", /* 39230 */ "Hosting.com, Inc.", /* 39231 */ "Drogentherapiezentrum LAGO", /* 39232 */ "Saint John's Health System", /* 39233 */ "Mitroko Inc.", /* 39234 */ "Exelis Inc.", /* 39235 */ "TriFractal Studios", /* 39236 */ "FW-Systeme GmbH", /* 39237 */ "VelociData, Inc", /* 39238 */ "LittleJackal", /* 39239 */ "Atacama Large Millimeter/submillimeter Array", /* 39240 */ "volkszaehler.org", /* 39241 */ "Krki IT", /* 39242 */ "VNLI LTD CO.", /* 39243 */ "CHINA NATIONAL SOFTWARE & SERVICE CO., LTD.", /* 39244 */ "Linkra Networks", /* 39245 */ "MBDA Deutschland GmbH", /* 39246 */ "medInt Holdings LLC", /* 39247 */ "STEC", /* 39248 */ "Shango", /* 39249 */ "Dalian Xinyu Technology, Ltd", /* 39250 */ "NewSun Co., LTD", /* 39251 */ "RioCard Tecnologia da Informacao S/A", /* 39252 */ "Punto Com srl", /* 39253 */ "Consecom AG", /* 39254 */ "Yakaz", /* 39255 */ "laorim", /* 39256 */ "Medical Records LLC", /* 39257 */ "TZ Consulting UG", /* 39258 */ "Geoffroy PLANQUART", /* 39259 */ "Koeller Family", /* 39260 */ "Planungsbüro Ledermann", /* 39261 */ "MediaMelon, Inc.", /* 39262 */ "Akademischer Verein", /* 39263 */ "New Rock Technologies, Inc.", /* 39264 */ "Versino GmbH", /* 39265 */ "Runway International OÜ", /* 39266 */ "ZAT a.s.", /* 39267 */ "Fachhochschule Brandenburg", /* 39268 */ "BASE - Gestió d'Ingressos", /* 39269 */ "CLUB PSCO", /* 39270 */ "Palisades Medical Center", /* 39271 */ "WCR EDV GesmbH", /* 39272 */ "ARC Wireless LLC", /* 39273 */ "INNOV@TIVE IT LTD", /* 39274 */ "Martello Technologies Corporation", /* 39275 */ "Intux", /* 39276 */ "Cape Regional Medical Center", /* 39277 */ "ZeXtras s.r.l.", /* 39278 */ "Web Devices Ltd", /* 39279 */ "ARVOO Engineering B.V.", /* 39280 */ "ST Enclosures for Electronics Systems LTD", /* 39281 */ "Infinet Financial Systems", /* 39282 */ "TeleWare PLC", /* 39283 */ "Mountain States Health Alliance", /* 39284 */ "Prime Engineering Ltd", /* 39285 */ "Wargaming.net LLP", /* 39286 */ "Unimed Litoral", /* 39287 */ "Fimasys", /* 39288 */ "SPAUN electronic GmbH & Co. KG", /* 39289 */ "Citibank, N.A.", /* 39290 */ "SugarCRM, LLC", /* 39291 */ "Victoria's Secret", /* 39292 */ "MARS", /* 39293 */ "Rue La La", /* 39294 */ "Yakima Valley Memorial Hospital", /* 39295 */ "Salford Software Ltd", /* 39296 */ "Beijing YUKUAN Technology Co.,Ltd", /* 39297 */ "Banque du Bois AG", /* 39298 */ "McPherson Hospital, Inc", /* 39299 */ "Sherwood Compliance Services Ltd.", /* 39300 */ "oikaze", /* 39301 */ "Essent NV", /* 39302 */ "Ospow", /* 39303 */ "Shine Data AB", /* 39304 */ "WiVDO, Lda", /* 39305 */ "Intellidesign", /* 39306 */ "Clealink Technology Co., Ltd.", /* 39307 */ "Blinkenlichten Open Source Solutions", /* 39308 */ "Centrum Promocji i Rozwoju Inicjatyw Obywatelskich OPUS", /* 39309 */ "Sønderborg Kommune", /* 39310 */ "Wellspan", /* 39311 */ "Brookhaven Memorial Hospital", /* 39312 */ "iFAX Solutions, Inc.", /* 39313 */ "Efactures (JLEM)", /* 39314 */ "Xelion b.v.", /* 39315 */ "Savtira", /* 39316 */ "Systems Solutions & Development Technologies Ltd", /* 39317 */ "QUALIS AUDIO, INC.", /* 39318 */ "mr-brooks.com", /* 39319 */ "Canada Revenue Agency", /* 39320 */ "Schooneman.net", /* 39321 */ "Champlain Valley Physicians Hospital Medical Center", /* 39322 */ "E2E4 TECHNOLOGIES", /* 39323 */ "OS NEXUS, Inc", /* 39324 */ "SecuAvail, Inc.", /* 39325 */ "University of Neuchatel", /* 39326 */ "ID Cyber-Identity Ltd", /* 39327 */ "SeaWell Networks", /* 39328 */ "Lesley University", /* 39329 */ "Dalian Jinghaofeng Techbology Co., Ltd", /* 39330 */ "SurGATE Labs", /* 39331 */ "Zuercher Lehrbetriebsverband ICT", /* 39332 */ "m3 bauprojektmanagement gmbh", /* 39333 */ "RADMOR S.A.", /* 39334 */ "basis Volume Limited", /* 39335 */ "Kraus", /* 39336 */ "Elephant Bird Consulting", /* 39337 */ "Operate4all", /* 39338 */ "Bagsbug", /* 39339 */ "Kingsbrook Jewish Medical Center", /* 39340 */ "Soifdinfo", /* 39341 */ "CSF Sistemi S.r.l.", /* 39342 */ "Vennetics Limited", /* 39343 */ "NextNav, LLC", /* 39344 */ "ConCen", /* 39345 */ "Communaute d'agglomeration Herault Mediterranee", /* 39346 */ "LeoNux", /* 39347 */ "Hochschule für Telekommunikaton Leipzig", /* 39348 */ "National Observatory of Athens", /* 39349 */ "SuperNAS", /* 39350 */ "Voxbone SA", /* 39351 */ "Adirondack Community College", /* 39352 */ "Biogen Idec", /* 39353 */ "Oceus Networks, Inc.", /* 39354 */ "Jeanes Hospital", /* 39355 */ "Showa University", /* 39356 */ "INSTITUTO FEDERAL DO CEARÁ - IFCE", /* 39357 */ "Prospect Computer Systems Inc. (PCS)", /* 39358 */ "Supranetcom", /* 39359 */ "Welotec GmbH", /* 39360 */ "FraudBuster", /* 39361 */ "Activanos SAS", /* 39362 */ "Wessel Dankers", /* 39363 */ "The Basis Group, Inc.", /* 39364 */ "Komar Consulting Inc.", /* 39365 */ "href.net", /* 39366 */ "Theodore Productions", /* 39367 */ "Aqcua Electronics", /* 39368 */ "Silicon Valley Medical Instruments", /* 39369 */ "Reelway GmbH", /* 39370 */ "deron Consulting GmbH", /* 39371 */ "Teo Technologies, Inc.", /* 39372 */ "Cooltech srl", /* 39373 */ "TDK Technologies, LLC", /* 39374 */ "Xtronix Ltd", /* 39375 */ "Gigalan", /* 39376 */ "g2b Holdings Inc.", /* 39377 */ "WAO Corporation", /* 39378 */ "Lab M, llc", /* 39379 */ "Fysisch-Mathematische Faculteitsvereniging", /* 39380 */ "Daggerpoint Technologies", /* 39381 */ "JSC \"ZHASO\"", /* 39382 */ "Flex Valley srl", /* 39383 */ "CRYPTAS it-Security GmbH", /* 39384 */ "M.M. Elektrolab", /* 39385 */ "Ultra Electronics - Advanced Tactical Systems", /* 39386 */ "Alpha Direct Services", /* 39387 */ "Online Classifieds Australia", /* 39388 */ "Beaulaton", /* 39389 */ "Baycom Technology Co.,Ltd", /* 39390 */ "H&L Instruments, LLC", /* 39391 */ "jameskinnaird.ca", /* 39392 */ "Global Reach Technology Limited", /* 39393 */ "Direccion General de Escuela Nacional Preparatoria", /* 39394 */ "ELDIS Pardubice, s.r.o.", /* 39395 */ "Zygma LLC", /* 39396 */ "amitego engineering GmbH", /* 39397 */ "HvS-Consulting AG", /* 39398 */ "Gumilyov Eurasian National University", /* 39399 */ "Institut für angewandte Funksystemtechnik GmbH", /* 39400 */ "Tilburg University", /* 39401 */ "B2F Concept", /* 39402 */ "GEBIT Solutions GmbH", /* 39403 */ "Keirex Technology Inc.", /* 39404 */ "Yieldbroker Pty Limited", /* 39405 */ "Benu Networks, Inc.", /* 39406 */ "Explorys", /* 39407 */ "Clark State Community College", /* 39408 */ "b3Lateral Ltd", /* 39409 */ "Ideco", /* 39410 */ "Ongoing Warehouse AB", /* 39411 */ "ALBEDO Telecom SL", /* 39412 */ "SD Worx VZW", /* 39413 */ "Domo, Inc.", /* 39414 */ "MicroStep-MIS spol. s r.o.", /* 39415 */ "Metropolitan Transportation Authority", /* 39416 */ "Kukinto", /* 39417 */ "Liberty Healthcare System Inc", /* 39418 */ "NETWORK PROCESS CONTROL SYSTEMS S.L.", /* 39419 */ "Delta Information Systems, Inc.", /* 39420 */ "Rising-Gods UG", /* 39421 */ "JazzHands Management System", /* 39422 */ "Joshua Morgan", /* 39423 */ "hilltonic", /* 39424 */ "Verein für Menschen mit Körper- und Mehrfachbehinderung e.V.", /* 39425 */ "Medical Mutual of Ohio", /* 39426 */ "Cyrrus Products Ltd", /* 39427 */ "Himilco", /* 39428 */ "G10 Transportes - LTDA", /* 39429 */ "ownCloud Inc.", /* 39430 */ "BLT Italia srl", /* 39431 */ "devcoach GbR - Michael Willers & Partner", /* 39432 */ "T8, LLC", /* 39433 */ "Isthmus SARL", /* 39434 */ "Sistemas Dypsa S.R.L", /* 39435 */ "Just Commodity Software Solutions Pte Ltd", /* 39436 */ "Six Quarks", /* 39437 */ "CB10", /* 39438 */ "FACOS", /* 39439 */ "JELETL", /* 39440 */ "George Watson's College", /* 39441 */ "Fred Hutchinson Cancer Research Center", /* 39442 */ "Banco de la Provincia del Nequén S.A.", /* 39443 */ "Caucasus Online LLC", /* 39444 */ "Alameda County Medical Center", /* 39445 */ "RESEARCH CONCEPTS, INC.", /* 39446 */ "Career Partner GmbH", /* 39447 */ "Swiss Mideast Finance Group AG", /* 39448 */ "UBI sistemi e Servizi S.c.p.a", /* 39449 */ "The Lampo Group, Inc.", /* 39450 */ "Zarathustra Solucoes em Informatica", /* 39451 */ "Artemis Investment Management LLP", /* 39452 */ "Bequant S.L.", /* 39453 */ "University of Scranton", /* 39454 */ "Reno A&E", /* 39455 */ "Denis Bondar", /* 39456 */ "pcsysteme.at IT Service Gmbh", /* 39457 */ "Lobster GmbH", /* 39458 */ "StoFey GbR", /* 39459 */ "CIPHERTELECOM", /* 39460 */ "Arachnocypher Web Services", /* 39461 */ "Damovo Belgium nv/sa", /* 39462 */ "Adaptive Networks, Inc.", /* 39463 */ "Solid Instance, Inc", /* 39464 */ "ENBALA Power Networks", /* 39465 */ "NV Nederlandse Gasunie", /* 39466 */ "RISC Software Gmbh", /* 39467 */ "Kettering University", /* 39468 */ "Neosho Memorial Regional Medical Center", /* 39469 */ "MetaEmotion S.L", /* 39470 */ "El Centro Regional Medical Center", /* 39471 */ "Karsten Eberding", /* 39472 */ "TGW Limited", /* 39473 */ "Kaleva Oy", /* 39474 */ "TUIR WARTA S.A.", /* 39475 */ "Antinea Software", /* 39476 */ "American Bureau of Shipping (ABS)", /* 39477 */ "Andi Miller Engineering Services", /* 39478 */ "sysangels e.U.", /* 39479 */ "BC Hydro", /* 39480 */ "WWPass Corporation", /* 39481 */ "Pieceable Software, Inc.", /* 39482 */ "Eneo Tecnologia S.L.", /* 39483 */ "The University of Connecticut Health Center", /* 39484 */ "EUCAST Co., Ltd.", /* 39485 */ "ChongQing TrunkSoft Technology Co., LTD.", /* 39486 */ "Wavestore Limited", /* 39487 */ "Plexipi Kft.", /* 39488 */ "EZYield", /* 39489 */ "Data Security Systems Solutions Pte Ltd", /* 39490 */ "Eleiss", /* 39491 */ "Steven Denzinger", /* 39492 */ "Brückenkopf e.v.", /* 39493 */ "comBerg Computersysteme", /* 39494 */ "CHU de Charleroi", /* 39495 */ "Arch Systems, Inc.", /* 39496 */ "EMSYS Design Inc", /* 39497 */ "Peerpath", /* 39498 */ "Flowmon Networks a.s.", /* 39499 */ "Sumatronic AG", /* 39500 */ "Bayerische Medien Technik (bmt) GmbH", /* 39501 */ "Aaron Wolfe", /* 39502 */ "Adsalsa Publicidad, S.L.", /* 39503 */ "CTI Group (Holdings), Inc.", /* 39504 */ "Lingo Systems SA de CV", /* 39505 */ "Qalixa Solutions AB", /* 39506 */ "Kreuzer-bb networking", /* 39507 */ "Schmitz RZ Consult GmbH", /* 39508 */ "Totemo AG", /* 39509 */ "Institut de Biologie Structurale", /* 39510 */ "Schiavone Org", /* 39511 */ "saman insurance", /* 39512 */ "MacAllister Software", /* 39513 */ "Associated Engineering", /* 39514 */ "Jõhvi Vallavalitsus", /* 39515 */ "Indisys", /* 39516 */ "Evernote Corp.", /* 39517 */ "KAGE Systems Ltd", /* 39518 */ "HavenSec, Inc.", /* 39519 */ "Qualycloud", /* 39520 */ "xG Technology", /* 39521 */ "Maldivica Inc", /* 39522 */ "Aliphcom", /* 39523 */ "Nacogdoches Memorial Hospital", /* 39524 */ "Creotech Instruments SA", /* 39525 */ "LogicLore Incorporation", /* 39526 */ "Motaavi, LLC", /* 39527 */ "ADDIT LTD", /* 39528 */ "Luga Technology Ltd.", /* 39529 */ "6cure SAS", /* 39530 */ "n-Tier construct GmbH", /* 39531 */ "Quanex Building Products", /* 39532 */ "Armadillo Software", /* 39533 */ "Mobiata, LLC", /* 39534 */ "modusoft GmbH", /* 39535 */ "RBNetwork", /* 39536 */ "Supreme Education Council", /* 39537 */ "Bright Pattern, Inc", /* 39538 */ "Northwest Hospital & Medical Center", /* 39539 */ "Saphety Level - Trusted Services, S.A.", /* 39540 */ "Blacklight IT UG", /* 39541 */ "Calgary Co-operative Association Limited", /* 39542 */ "GNUstep (gnu.org)", /* 39543 */ "igolgi Inc.", /* 39544 */ "Winters Broadband LLC", /* 39545 */ "Infoage", /* 39546 */ "WakeMed Health and Hospitals", /* 39547 */ "Beijing TopShine Technology Co., Ltd.", /* 39548 */ "DataCore Systems Ltd", /* 39549 */ "KE2 Therm Solutions", /* 39550 */ "UAB SignDigi", /* 39551 */ "Dalian Co-Edifice Video Technology Co. Ltd.", /* 39552 */ "Beijing Dynamic Power Co.,Ltd.", /* 39553 */ "D'Crypt Private Limited", /* 39554 */ "gyselroth GmbH", /* 39555 */ "University of Zurich, Institute of Mathematics", /* 39556 */ "Horoquartz", /* 39557 */ "that's it gmbh", /* 39558 */ "derEDVdienst", /* 39559 */ "Lead Innovation System Technology Corp.", /* 39560 */ "XSD Zrt.", /* 39561 */ "Greenhills IT Ltd.", /* 39562 */ "Smart Messaging Solution Pte Ltd", /* 39563 */ "Yunnan Technician College", /* 39564 */ "Birzeit University", /* 39565 */ "Idealo Internet GmbH", /* 39566 */ "DJIGZO", /* 39567 */ "Liberologico Srl", /* 39568 */ "max4G, Inc.", /* 39569 */ "POOL4TOOL AG", /* 39570 */ "L33 NETWORKS", /* 39571 */ "TCPWave Inc", /* 39572 */ "Sauper Associates, Inc.", /* 39573 */ "Guido Berhoerster", /* 39574 */ "Global Patient Identifiers, Inc.", /* 39575 */ "ElvenStar Productions", /* 39576 */ "GlobeOSS Sdn. Bhd.", /* 39577 */ "Sven van den Heuvel GmbH", /* 39578 */ "Hearst Business Media", /* 39579 */ "dual-PROJEKT Paweł Szmidt", /* 39580 */ "ZPBE ENERGOPOMIAR-ELEKTRYKA", /* 39581 */ "WebSatMedia Pte Ltd", /* 39582 */ "Egemin Automation", /* 39583 */ "Hannoversche Volksbank eG", /* 39584 */ "Kleyling Spedition GmbH", /* 39585 */ "Datasiel Spa", /* 39586 */ "GuideStone Financial Resources of the Southern Baptist Convention", /* 39587 */ "SELECTRIC Nachrichten-Systeme GmbH", /* 39588 */ "eBackpack, Inc.", /* 39589 */ "Fundació privada i2cat", /* 39590 */ "Aux Sable Liquid Products LP", /* 39591 */ "Sermotec Communications GmbH", /* 39592 */ "Suofeiya Home Collection Co., Ltd", /* 39593 */ "Point Of Pay Pty Ltd", /* 39594 */ "GuangZhou JoySim Network Technology Co.,Ltd.", /* 39595 */ "Zhejiang Broadcast&Television Technology Co.,Ltd.", /* 39596 */ "Chongqing Chongyou Communication Technologies Co,Ltd.", /* 39597 */ "INFACOM S.L.", /* 39598 */ "Mzinga, Inc.", /* 39599 */ "Capital Bank", /* 39600 */ "Vector 3 S.A.", /* 39601 */ "Regional Medical Center at Memphis", /* 39602 */ "DTTec Consulting", /* 39603 */ "Accuenergy (CANADA) Inc.", /* 39604 */ "GlobeCast France", /* 39605 */ "GoldKey Security Corporation", /* 39606 */ "NX Information Services", /* 39607 */ "Palosanto Solutions S.A.", /* 39608 */ "next-pbx", /* 39609 */ "BITLANCER LLC", /* 39610 */ "Video Design Software Inc.", /* 39611 */ "Stantec Consulting", /* 39612 */ "Sawridge Systems India Pvt Ltd", /* 39613 */ "Valid", /* 39614 */ "2008mcitp.com", /* 39615 */ "GlasgowNet", /* 39616 */ "PDT Partners, LLC", /* 39617 */ "Cloud Assist", /* 39618 */ "Institutul pentru Tehnologii Avansate", /* 39619 */ "JANUS srl", /* 39620 */ "SOPLEX Consult GmbH", /* 39621 */ "Intermas France S.A.S", /* 39622 */ "PCS Systemtechnik GmbH", /* 39623 */ "herold&schönsteiner networks UG haftungsbeschränkt", /* 39624 */ "Kraft Foods", /* 39625 */ "Hackerspace Warsaw", /* 39626 */ "Rhinobee", /* 39627 */ "Vegayan Systems", /* 39628 */ "Auxilium", /* 39629 */ "mailplus.co.at", /* 39630 */ "mocube", /* 39631 */ "Hyro Pty Ltd", /* 39632 */ "Dos Tek Group", /* 39633 */ "HighGrand Technology", /* 39634 */ "Beijing ZhongChuang Telecom Test Co.,LTD", /* 39635 */ "Comet Computer GmbH", /* 39636 */ "IMP Solutions Network Operations", /* 39637 */ "Cornerstone Backup, Inc.", /* 39638 */ "Vigilent Corporation", /* 39639 */ "Europalab Networks", /* 39640 */ "SPICE DIGITAL LIMITED", /* 39641 */ "S3 s.r.l.", /* 39642 */ "WedaCon Informationstechnologien GmbH", /* 39643 */ "The University of North Carolina at Greensboro", /* 39644 */ "Anglo-American School of Moscow", /* 39645 */ "Mikro Odeme Sistemleri A.S", /* 39646 */ "iNic AS", /* 39647 */ "Enovacom", /* 39648 */ "General Data Technology Co. Ltd.", /* 39649 */ "AEMO Ltd", /* 39650 */ "ComTecT", /* 39651 */ "The William Carter Company", /* 39652 */ "Imbio", /* 39653 */ "TISSOT", /* 39654 */ "Humbug Telecom Labs Limited", /* 39655 */ "Nationale Nederlanden", /* 39656 */ "Administration of the Vladimir Region", /* 39657 */ "TollNet a.s.", /* 39658 */ "NSD CO., LTD.", /* 39659 */ "Tarana Wireless Inc", /* 39660 */ "Allianz Managed Operations and Services SE - oneWeb", /* 39661 */ "metafinanz Informationssysteme GmbH", /* 39662 */ "RENK AG", /* 39663 */ "Lingua-IT Sp. z o.o.", /* 39664 */ "Fat Mongoose Technologies, Inc.", /* 39665 */ "Consult A Nerd", /* 39666 */ "CodeMettle, LLC", /* 39667 */ "Iridium Digital Systems Corporation", /* 39668 */ "Koning Corporation", /* 39669 */ "knaute.info", /* 39670 */ "NEXTDC Ltd", /* 39671 */ "Elite Automação Comércio e Serviços Ltda ME", /* 39672 */ "Talon Storage Solutions", /* 39673 */ "OctoGate GmbH", /* 39674 */ "Vast Array Corporation", /* 39675 */ "Pason Systems Corp.", /* 39676 */ "Archdata SPRL", /* 39677 */ "American Domain Names LLC", /* 39678 */ "JSC Tekhdiagnostika", /* 39679 */ "Nozhup B.V.", /* 39680 */ "Catalyst Repository Systems", /* 39681 */ "Exegin Technologies Limited", /* 39682 */ "Single Touch Interactive", /* 39683 */ "Genteel.org", /* 39684 */ "WTG Muenster", /* 39685 */ "Acquirente Unico", /* 39686 */ "JSC Aprelevka X-ray factory", /* 39687 */ "interactingstars.org", /* 39688 */ "BRF", /* 39689 */ "IPACCT Ltd.", /* 39690 */ "embeddeers GmbH", /* 39691 */ "Ideal Mahdban Engineering Services", /* 39692 */ "N-Partner", /* 39693 */ "Diamont Equipamentos Especiais Ltda", /* 39694 */ "FRAFOS GmbH", /* 39695 */ "Banglalion Communications Limited", /* 39696 */ "Intelligent Security Systems", /* 39697 */ "Mianyang Netop Telecom Equipment Co.,Ltd", /* 39698 */ "Robustel Technologies", /* 39699 */ "Sonic Boom Wellness", /* 39700 */ "Mangelal & Sons", /* 39701 */ "Linux Solutions", /* 39702 */ "SASCO", /* 39703 */ "Unyonsys", /* 39704 */ "skslater.net", /* 39705 */ "ADTEK", /* 39706 */ "Cumbria Constabulary", /* 39707 */ "Telent GmbH * A division of euromicron Group", /* 39708 */ "Broadcast Graphics and Control Limited", /* 39709 */ "Wentworth-Douglass Hospital", /* 39710 */ "Radiobolaget Gunhamn och Åsbrink AB", /* 39711 */ "QSD Sistemi Srl", /* 39712 */ "Abertis telecom", /* 39713 */ "Associacio Cultural TGK", /* 39714 */ "DominionTech Computer Services", /* 39715 */ "University of South Alabama Health System", /* 39716 */ "Westerholt", /* 39717 */ "Silverflare Ltd", /* 39718 */ "TCF Financial Corporation", /* 39719 */ "Maryland Stadium Authority", /* 39720 */ "DUCSS", /* 39721 */ "Underpin Taiwan Ltd.", /* 39722 */ "Logistics Energy Korea Co., Ltd.", /* 39723 */ "[j]karef GmbH", /* 39724 */ "JeraSoft", /* 39725 */ "British National Party", /* 39726 */ "IT Ihme", /* 39727 */ "Bessels IT", /* 39728 */ "Cilutions, Digital Media Bridge", /* 39729 */ "SHANGHAI MEXON COMMUNICATION TECHNOLOGY.,LTD", /* 39730 */ "Emind Systems Ltd", /* 39731 */ "Shenzhen Smart Cube Intelligent Technology Co.,LTD", /* 39732 */ "Boss Info AG", /* 39733 */ "wujiman.net", /* 39734 */ "Main Street Softworks, Inc.", /* 39735 */ "ACTIVE SYSTEM MANAGEMENT", /* 39736 */ "CommercePack", /* 39737 */ "IBS America, Inc.", /* 39738 */ "Madscientistclub", /* 39739 */ "PSA Zeebrugge International Port nv", /* 39740 */ "Egnyte Inc.", /* 39741 */ "Société des ingénieurs Arts et Métiers", /* 39742 */ "Shanghai Dongzhou Lawton Telecom Technologies Co.,ltd", /* 39743 */ "EDESA", /* 39744 */ "OPower, Inc.", /* 39745 */ "MEITSUDENSHI", /* 39746 */ "Zhejiang Uniview Technologies Co., Ltd.", /* 39747 */ "Intesyn S.r.l.", /* 39748 */ "Kassenärztliche Vereinigung Brandenburg", /* 39749 */ "Union Hospital Health Group", /* 39750 */ "Mobintegro", /* 39751 */ "HootSuite Media Inc", /* 39752 */ "Vignold Workflow & New Media GmbH", /* 39753 */ "HAVI Logistics IS GmbH", /* 39754 */ "Saint Mondiale PTE LTD", /* 39755 */ "St. Johns County School District", /* 39756 */ "Schomäcker GmbH", /* 39757 */ "imoxion", /* 39758 */ "LOREME", /* 39759 */ "New Cosmos Electric Co., Ltd.", /* 39760 */ "Galiam Capital, LLC", /* 39761 */ "Radio Mobile Access, Inc", /* 39762 */ "Adams County School District 50", /* 39763 */ "Transoft (Shanghai) Inc.", /* 39764 */ "Keydap", /* 39765 */ "Null Pointer Inc.", /* 39766 */ "TomTom International BV", /* 39767 */ "UAB Technologiju ir inovaciju centras", /* 39768 */ "Italian Grid Infrastructure (IGI)", /* 39769 */ "Martin Neimeier", /* 39770 */ "SIP Express Media Server", /* 39771 */ "Melchinger Systemhaus UG", /* 39772 */ "Pannon Site Ltd.", /* 39773 */ "Criena Network", /* 39774 */ "Capitol Lien Records & Research, Inc.", /* 39775 */ "Andreas Strey", /* 39776 */ "Simon Arlott", /* 39777 */ "Young Master Supplies & General Enterprises Ltd", /* 39778 */ "UCLA Anderson School of Managemetn", /* 39779 */ "Pikopiko Network", /* 39780 */ "T&W", /* 39781 */ "Hangzhou I'converge Techonoloay Co.,Ltd", /* 39782 */ "ASB Bank Limited", /* 39783 */ "National Jewish Health", /* 39784 */ "DS/2 GbR", /* 39785 */ "Travelocity.com", /* 39786 */ "Suntrust Banks, Inc.", /* 39787 */ "LogoDynamic Unit GmbH", /* 39788 */ "Southwest Texas Regional Advisory Council", /* 39789 */ "Church & Dwight Co., Inc.", /* 39790 */ "Unified Microsystems", /* 39791 */ "YouDotNet Limited", /* 39792 */ "World Net", /* 39793 */ "FedeRez", /* 39794 */ "Cardiothink, Inc.", /* 39795 */ "BkavCA", /* 39796 */ "Contract Kitting", /* 39797 */ "Republički fond za zdravstveno osiguranje", /* 39798 */ "TELE APOSTUAK", /* 39799 */ "MTU Aero Engines GmbH", /* 39800 */ "Imagicle SpA", /* 39801 */ "Urban Airship, Inc.", /* 39802 */ "IT-Box GmbH", /* 39803 */ "Ctyle Corporation", /* 39804 */ "Ingenious Med", /* 39805 */ "PrJSC \"IC SEB LIFE UKRAINE\"", /* 39806 */ "Edgewater Wireless Systems Inc.", /* 39807 */ "SHINE SYSTEM", /* 39808 */ "Lonely Planet", /* 39809 */ "KNET Co., Ltd.", /* 39810 */ "ZaPOP (Pty) Ltd", /* 39811 */ "UC RUSAL", /* 39812 */ "Public Joint-Stock Company \"National Depository of Ukraine\"", /* 39813 */ "SOLYSTIC", /* 39814 */ "iphion B.V.", /* 39815 */ "Accelatis", /* 39816 */ "cl0secall.net", /* 39817 */ "Anator", /* 39818 */ "VaporPunk, Inc.", /* 39819 */ "Cyssea", /* 39820 */ "EDINEC SRL", /* 39821 */ "iSchemaView, Inc.", /* 39822 */ "Consorci Administració Oberta de Catalunya", /* 39823 */ "Smart Grid Networks", /* 39824 */ "Public Safety canada", /* 39825 */ "Accelerated Servers, Inc", /* 39826 */ "Celal Bayar University", /* 39827 */ "ATP", /* 39828 */ "Asetek", /* 39829 */ "Greeve", /* 39830 */ "Museu de Astronomia e Ciencias Afins", /* 39831 */ "LogicMonitor Inc", /* 39832 */ "hangzhou e-vision electronic system engineering corp.", /* 39833 */ "Fata Informatica", /* 39834 */ "JANTEQ CORPORATION", /* 39835 */ "Sindikat “Akademska solidarnost”", /* 39836 */ "A123 Systems, Inc.", /* 39837 */ "University of Bahrain", /* 39838 */ "Gaftech", /* 39839 */ "ICAR CNR", /* 39840 */ "Danske Bank", /* 39841 */ "Communauté Urbaine du Grand Toulouse", /* 39842 */ "Precogs Software SAS", /* 39843 */ "MAPPER Lithography", /* 39844 */ "Dr. Schenk IT-Consulting GmbH", /* 39845 */ "UNILINK SA", /* 39846 */ "ATS GRUP LTD", /* 39847 */ "Voximage", /* 39848 */ "Arbiter Systems", /* 39849 */ "Ross Opticians Inc.", /* 39850 */ "HLT Software GmbH", /* 39851 */ "Clima-Tech Coporation", /* 39852 */ "BSI Business Systems Integration AG", /* 39853 */ "eVolution Networks", /* 39854 */ "FCP Fritsch, Chiari & Partner ZT GmbH", /* 39855 */ "Beijing Qibadian Information Technology CO., Ltd.", /* 39856 */ "CYSM Ltd.", /* 39857 */ "Kirin-gumi", /* 39858 */ "Clemax,Inc", /* 39859 */ "OGS IT-Solutions", /* 39860 */ "Orbitz Worldwide, LLC.", /* 39861 */ "ComSonics,Inc.", /* 39862 */ "World Vision US", /* 39863 */ "WEBeDoctor, Inc.", /* 39864 */ "Slabinfo E.U.", /* 39865 */ "Advanced Network Devices", /* 39866 */ "Linedata", /* 39867 */ "Miami International Holdings", /* 39868 */ "Illumina, Inc", /* 39869 */ "Telesis A.S.", /* 39870 */ "Trans Industrias Electronicas", /* 39871 */ "CIPFP Ausias March", /* 39872 */ "Silicon Labs", /* 39873 */ "Asmlab Limited", /* 39874 */ "Beijing GuangXinYingKe Technology Co.,Ltd", /* 39875 */ "7-Technologies A/S", /* 39876 */ "VCE Vienna Consulting Engineers", /* 39877 */ "Le Aquile Unita' Cinofile da Soccorso Ravennate", /* 39878 */ "Amplitude Systemes", /* 39879 */ "Thomas Wiedstruck - Informationstechnik", /* 39880 */ "EyesOfNetwork", /* 39881 */ "Greater Pittsburgh Glass & Door", /* 39882 */ "Sysacom", /* 39883 */ "T-Platforms", /* 39884 */ "StorONE", /* 39885 */ "Kurt Kincaid Consulting", /* 39886 */ "localroot.de", /* 39887 */ "Ness Computing, Inc.", /* 39888 */ "icecreek Software und Services", /* 39889 */ "Beijing Forsun Technology Co.,Ltd", /* 39890 */ "MNUCIB VNII PVTI", /* 39891 */ "v-ic", /* 39892 */ "Energierversorgung Mittelrhein GmbH", /* 39893 */ "Haley Technologies Inc. dba PC PitStop", /* 39894 */ "OpenX", /* 39895 */ "The Cleveland Clinic Foundation", /* 39896 */ "Ryder System, Inc.", /* 39897 */ "AtrilA GmbH", /* 39898 */ "Virginia Hospital Center", /* 39899 */ "INITE SC", /* 39900 */ "Crypto4A", /* 39901 */ "inqa.be", /* 39902 */ "Pivotal Technologies Pty Ltd", /* 39903 */ "Sascha Wolf", /* 39904 */ "eA-light Arbeitsgemeinschaft der ÄKNO und ÄKWL", /* 39905 */ "Zwissler Technologies, LLC", /* 39906 */ "LinkSquare", /* 39907 */ "china beijing koal Company", /* 39908 */ "OJSC GUTA-BANK", /* 39909 */ "Fusionex", /* 39910 */ "ltd Arhangelskoe predprijatie protivopozharnoj avtomatiki", /* 39911 */ "State Grid Electric Power Research Institute", /* 39912 */ "ELONG Corp", /* 39913 */ "ZPAS S.A.", /* 39914 */ "wiba10", /* 39915 */ "KeyLemon SA", /* 39916 */ "KUFP “Medaparatura”, ALC", /* 39917 */ "Cardiocore", /* 39918 */ "hybris GmbH", /* 39919 */ "wintek System", /* 39920 */ "UKFast.Net Ltd", /* 39921 */ "SDN SPA", /* 39922 */ "Seres", /* 39923 */ "Chase Paymentech", /* 39924 */ "Excellent S.A.", /* 39925 */ "Aspen Systems", /* 39926 */ "Voronezh Cityhall", /* 39927 */ "Dmitry Ponomarev", /* 39928 */ "Dingbox", /* 39929 */ "Rewired State", /* 39930 */ "openNetMon", /* 39931 */ "Mindware", /* 39932 */ "Technology Space Integration Limited", /* 39933 */ "TopHat Software", /* 39934 */ "Transas Marine International", /* 39935 */ "Cheshire Medical Center", /* 39936 */ "Netspective", /* 39937 */ "Inca Networks Inc.", /* 39938 */ "Lansing Community College", /* 39939 */ "Oregon Scientific Global Distribution Limited", /* 39940 */ "KUZUMI Electronics,Inc.", /* 39941 */ "eWorld Technologies Ltd.", /* 39942 */ "University of Santo tomas", /* 39943 */ "shenzhen Catic Bit Communication Technology Co.LTD", /* 39944 */ "Tecblazer", /* 39945 */ "EV Group GmbH", /* 39946 */ "B PLUS TV a.s.", /* 39947 */ "Ping Communication", /* 39948 */ "Beijing Arrays Medical Imaging Technology Development Co.,td", /* 39949 */ "Altersign, LLC.", /* 39950 */ "Town Sports International", /* 39951 */ "SecurePKI", /* 39952 */ "SERVICE DEPARTEMENTAL D INCENDIE ET DE SECOURS DE LA DROME", /* 39953 */ "RWetc. s.r.o.", /* 39954 */ "SMP Bank OJSC", /* 39955 */ "Vale", /* 39956 */ "Columbus Regional Heathcare System, Inc.", /* 39957 */ "Withings", /* 39958 */ "CIRCUTOR, SA", /* 39959 */ "cktsoi.com", /* 39960 */ "Nicira, Inc.", /* 39961 */ "Kern Scientific Co.", /* 39962 */ "AGCO Corporation", /* 39963 */ "EIDEN Co,Ltd", /* 39964 */ "Trans Sped", /* 39965 */ "Luminoso, LLC", /* 39966 */ "Ethersex Project", /* 39967 */ "Toya Technologies Inc.", /* 39968 */ "United Energy Pakistan Limited", /* 39969 */ "HandySolutions (CJSC)", /* 39970 */ "Shenzhen Skyee Optical Fiber Communication Technology Ltd.", /* 39971 */ "TUV RHEINLAND IBERICA SA", /* 39972 */ "Janmedia Interactive Sp. z o.o.", /* 39973 */ "Garland Technology LLC", /* 39974 */ "COGNEX", /* 39975 */ "Southwestern University", /* 39976 */ "Deltix, Inc.", /* 39977 */ "Daniel Theodoro Consultoria em Informatica Ltd.", /* 39978 */ "ConicIT Ltd.", /* 39979 */ "Nocturnal Aviation", /* 39980 */ "OPT SP CO.,LTD.", /* 39981 */ "Icareus Ltd", /* 39982 */ "Project Engineering srl", /* 39983 */ "Shenzhen Process Tech.Co.,Ltd.", /* 39984 */ "GRZ IT Center Linz GmbH", /* 39985 */ "Florida Department of Education", /* 39986 */ "Pathmaker Group, Inc.", /* 39987 */ "Reserved", /* 39988 */ "LINE SEÑALIZACIÓN ELECTRÓNICA S.L.", /* 39989 */ "Center of Information Technologies of Volgograd region (http:\\\\citvo.ru)", /* 39990 */ "Aitia International Inc.", /* 39991 */ "davidhowland.com", /* 39992 */ "Owl Forestry", /* 39993 */ "Echo360", /* 39994 */ "Plymouth University", /* 39995 */ "sys4 AG", /* 39996 */ "Netsumo Ltd", /* 39997 */ "Beijing Lanxum New Technology", /* 39998 */ "Prodo Telecom (An OT Company)", /* 39999 */ "Kapsi Internet-käyttäjät ry", /* 40000 */ "WineSOFT", /* 40001 */ "Open System Co., Ltd.", /* 40002 */ "Karjalan Paperi Oy", /* 40003 */ "Cargo Service Nord GmbH", /* 40004 */ "5p. GmbH & Co. KG", /* 40005 */ "Reevex, LLC", /* 40006 */ "Universal Research Solutions, LLC", /* 40007 */ "Virtual Connect Technologies, Inc", /* 40008 */ "Oasiswork SARL", /* 40009 */ "MSMC Informatica Ltda", /* 40010 */ "Fripost", /* 40011 */ "Hatomi Sp. z o.o.", /* 40012 */ "lintloaf.net", /* 40013 */ "Progress Rail Services Inspection & Information Systems", /* 40014 */ "Hüttner & Werfling Softwareentwicklung GbR", /* 40015 */ "MAS Technology", /* 40016 */ "ARKS LLC", /* 40017 */ "JSC Bank Vologzhanin", /* 40018 */ "Isbak A.S.", /* 40019 */ "Gutenberg Networks", /* 40020 */ "Viscount Systems Inc", /* 40021 */ "Sirius Software, Inc.", /* 40022 */ "LLC \" NPF DUKON\"", /* 40023 */ "iNovo Broadband, Inc.", /* 40024 */ "Tym3", /* 40025 */ "Société d’Informatique et de Systèmes", /* 40026 */ "Aki Network", /* 40027 */ "TAKOTA, LTD", /* 40028 */ "leadtone", /* 40029 */ "RADOM, s.r.o.", /* 40030 */ "Oblako10, Ltd.", /* 40031 */ "Ultra Electronics, Precision Air & Land Systems", /* 40032 */ "Radio Design", /* 40033 */ "DuraSpace", /* 40034 */ "CellSec Inc.", /* 40035 */ "Vertafore PLM", /* 40036 */ "Inceptum d.o.o", /* 40037 */ "Livestream, LLC", /* 40038 */ "MySysAdmin.DE", /* 40039 */ "Stichting IFCAT Foundation", /* 40040 */ "ООО «Электронные Офисные Системы (проектирование и внедрение)» /OOO “Elektronnye Ofisnye Sistemy (proektirovanie i vnedrenie)/", /* 40041 */ "Stiftelsen Chalmers Studentbostäder", /* 40042 */ "NewPace Technology Development Inc.‎", /* 40043 */ "PC-Doctor, Inc.", /* 40044 */ "Nexenta Systems, Inc.", /* 40045 */ "CREDIT EUROPE BANK Ltd.", /* 40046 */ "Korex Networks s.r.o.", /* 40047 */ "Information Display Company", /* 40048 */ "Red Bend", /* 40049 */ "Microtech Andrzej Sokulski", /* 40050 */ "RELEASE14", /* 40051 */ "Energie AG Oberösterreich Data GmbH", /* 40052 */ "Sistemas Avanzados de Diseño", /* 40053 */ "4UR", /* 40054 */ "Yuchengtech", /* 40055 */ "AccuBeat Ltd", /* 40056 */ "Reserved", /* 40057 */ "Vitaliy Tokarev", /* 40058 */ "Datagram, Inc.", /* 40059 */ "Leo-Li com.", /* 40060 */ "Bay Area Hospital", /* 40061 */ "Trevor and Emily Mouat King", /* 40062 */ "Qintara, Inc.", /* 40063 */ "Optima Lab srl", /* 40064 */ "Larch networks", /* 40065 */ "Saliens Information Systems Ltd.", /* 40066 */ "LinTech JSC", /* 40067 */ "The Venus Project", /* 40068 */ "enprovia Software Engineering s. r. o.", /* 40069 */ "RetailNext", /* 40070 */ "P. St. Onge", /* 40071 */ "techlab.jp", /* 40072 */ "Lutron Electronics Company, Inc", /* 40073 */ "Energy Solutions Ltd.", /* 40074 */ "SPL-Xdemat", /* 40075 */ "SiFox", /* 40076 */ "Austrian Red Cross", /* 40077 */ "Open Grid Computing", /* 40078 */ "Electronic Systems Protection, Inc.", /* 40079 */ "IIHE - Inter-university Institute for High Energies", /* 40080 */ "Shanghai Myway Technology, Inc.", /* 40081 */ "NuGardt Software UG (haftungsbeschränkt)", /* 40082 */ "Accelerated Concepts, Inc.", /* 40083 */ "Ingalls Memorial Hospital", /* 40084 */ "Stage Tec GmbH", /* 40085 */ "Inworx Group", /* 40086 */ "NIDO Informatica", /* 40087 */ "Voixtel Telecom", /* 40088 */ "NetAmbit Infosource & E-services Pvt. Ltd.", /* 40089 */ "Netline Communications Technologies Ltd", /* 40090 */ "A.C.T.I.C asbl", /* 40091 */ "Wiwynn Corporation", /* 40092 */ "Zhuhai Seine Technology Co., Ltd", /* 40093 */ "SecuEnv", /* 40094 */ "G4S Engenharia e Sistemas S. A.", /* 40095 */ "ROICX", /* 40096 */ "WorldPay", /* 40097 */ "update software", /* 40098 */ "North Carolina Healthcare Exchange", /* 40099 */ "TechNet", /* 40100 */ "EPB Fiber Optics", /* 40101 */ "Pinger, Inc.", /* 40102 */ "Fashion Days", /* 40103 */ "BamseNet GmbH", /* 40104 */ "APN Promise S.A.", /* 40105 */ "Polara Engineering, Inc.", /* 40106 */ "Michael Reschly", /* 40107 */ "Amber Buddha", /* 40108 */ "SigAlgo Technology Ltd", /* 40109 */ "EGNATIA", /* 40110 */ "Deloitte Services & Investments nv", /* 40111 */ "Ethernix", /* 40112 */ "Blue Mountain Health System", /* 40113 */ "Guavatech", /* 40114 */ "V & B Ingenieria S.A. de C.V.", /* 40115 */ "DCO4 Sp. z o.o.", /* 40116 */ "Faculté des Sciences et Technologies - Université de Lorraine", /* 40117 */ "CNPC LOGGING Co.Ltc", /* 40118 */ "Terralink LLC", /* 40119 */ "Pamlock AB", /* 40120 */ "Methodia Inc", /* 40121 */ "Beijing Cyber Stone Information Technology Corp. Ltd.", /* 40122 */ "Hangzhou dunchong Technology Co.,Ltd.", /* 40123 */ "Kernkraftwerk Leibstadt AG", /* 40124 */ "Travelfusion Ltd", /* 40125 */ "real virtual GmbH", /* 40126 */ "Monolith Software", /* 40127 */ "Beijing Photon-Byte Technology Co., Ltd.", /* 40128 */ "MarLukKi Centre", /* 40129 */ "Asguard Networks", /* 40130 */ "Nuvem Networks Inc", /* 40131 */ "Telemedia Argentina S.A.", /* 40132 */ "FIX TELECOM", /* 40133 */ "Nexum, Inc", /* 40134 */ "Spawn Labs, Inc.", /* 40135 */ "Comviva Technologies Limited", /* 40136 */ "University of Pardubice", /* 40137 */ "DataNET21 Solutions GmbH", /* 40138 */ "GRN Serveis Telematics", /* 40139 */ "AIRTEL ATN", /* 40140 */ "InterConnect Brasil", /* 40141 */ "MODULISTIC.NET", /* 40142 */ "CookieConcepts", /* 40143 */ "Understanding SharePoint LLC", /* 40144 */ "STRYME GmbH", /* 40145 */ "Ascent Communication Technology", /* 40146 */ "IT-Technology GmbH", /* 40147 */ "Thorsten Pape", /* 40148 */ "PFA Pension", /* 40149 */ "Kenium", /* 40150 */ "G²mobility SA", /* 40151 */ "Trimtab.ca", /* 40152 */ "Abraxas Informatik AG", /* 40153 */ "North Caucasian Federal University", /* 40154 */ "Groundhog Technologies", /* 40155 */ "WVNET GmbH", /* 40156 */ "Medicalgorithmics", /* 40157 */ "Gage Marketing Group, LLC", /* 40158 */ "Paul Reinhart AG", /* 40159 */ "NJVC", /* 40160 */ "Canal Street Securities", /* 40161 */ "McCarthy Tetrault", /* 40162 */ "Kamidama Breedables", /* 40163 */ "OOO Avtomatizirovannye sistemy (Automated Systems, LTD)", /* 40164 */ "morrow.me.uk", /* 40165 */ "Omega Tech Consulting Group LLC", /* 40166 */ "NS Reizigers B.V.", /* 40167 */ "Etransmedia Technology", /* 40168 */ "3xA Security AB", /* 40169 */ "NP Networks, Inc.", /* 40170 */ "HF. Radio Communication Technology Co., Ltd", /* 40171 */ "Closed joint stock company “StandarTelecom”", /* 40172 */ "Hoermann Solutions", /* 40173 */ "BlueFinch", /* 40174 */ "RIPAS", /* 40175 */ "Consulfem", /* 40176 */ "Right&Above", /* 40177 */ "Noolitic", /* 40178 */ "aplicacionesYredes.com", /* 40179 */ "HTL Kaindorf - Mechatronik", /* 40180 */ "CyberCenter S.A.", /* 40181 */ "Sichuan Cable TV Network Co., Ltd.", /* 40182 */ "con terra GmbH", /* 40183 */ "NovInTeh LLC", /* 40184 */ "Esa Unggul University", /* 40185 */ "DA/Page, LLC", /* 40186 */ "Aclima, Inc.", /* 40187 */ "United States Infrastructure Corporation", /* 40188 */ "Charlton Labs", /* 40189 */ "JCL-eCommerce GmbH", /* 40190 */ "Lylid Net Ltd.", /* 40191 */ "ITQuality", /* 40192 */ "Institute of Electronic Music and Acoustics", /* 40193 */ "WaveCloud Corporation", /* 40194 */ "Zantek Pty. Ltd.", /* 40195 */ "SANTOS", /* 40196 */ "JSC CROC POVOLZHYE", /* 40197 */ "Movirtu", /* 40198 */ "Szechenyi Istvan SZKI", /* 40199 */ "Anext", /* 40200 */ "Nexiway", /* 40201 */ "Primetech Ltd.", /* 40202 */ "Golder Associates", /* 40203 */ "Availity, L.L.C.", /* 40204 */ "Jackson Family Enterprises", /* 40205 */ "minivi", /* 40206 */ "Gerrit Beine GmbH", /* 40207 */ "S.J.M. Steffann", /* 40208 */ "Hiroshima University", /* 40209 */ "Matt-J.co.uk", /* 40210 */ "SHENZHEN MEGMEET ELECTRICAL CO.,LTD", /* 40211 */ "PHV - Confluances", /* 40212 */ "University College Northen Denmark", /* 40213 */ "ICEANS, Inventive Computer Engineering and Network Service", /* 40214 */ "ITF-EDV Froeschl GmbH", /* 40215 */ "Global Traffic Technologies, LLC", /* 40216 */ "Bertel S.p.A.", /* 40217 */ "Witzig The Office Company AG", /* 40218 */ "Hirtle, Callaghan & Co.", /* 40219 */ "Northwestern Michigan College", /* 40220 */ "Infrastructures Technologiques Gallium", /* 40221 */ "Family Home Care & Hospice, Inc.", /* 40222 */ "molotov.ro", /* 40223 */ "Willem4Ever BV", /* 40224 */ "Image Data Systems", /* 40225 */ "xNet Solutions Inc.", /* 40226 */ "Digital One", /* 40227 */ "Valley ComputerWorks, Inc. DBA Paragus Strategic I.T.", /* 40228 */ "VizionR", /* 40229 */ "Medikon Polska Sp. z o.o.", /* 40230 */ "Baptist St. Anthony's Health System", /* 40231 */ "Michel Messerschmidt", /* 40232 */ "Sanoma Media Netherlands B.V.", /* 40233 */ "Andreas Zieschang", /* 40234 */ "Stadt Dortmund", /* 40235 */ "Diputació de Barcelona", /* 40236 */ "The Office of the Government Chief Information Officer of the Government of the Hong Kong Special Administrative Region", /* 40237 */ "RoutoMessaging", /* 40238 */ "Gruppo Editoriale L'Espresso spa", /* 40239 */ "OpenSky.com", /* 40240 */ "Ogden Technology Corporation", /* 40241 */ "GNS Science", /* 40242 */ "3U HOLDING AG", /* 40243 */ "SDAMO Group, LLC", /* 40244 */ "Böning Automationstechnologie GmbH & Co. KG", /* 40245 */ "OOO \"Laboratoriya Trehmernogo Zreniya\"", /* 40246 */ "GGS German Graduate School of Management and Law", /* 40247 */ "NPO Telecom JSC", /* 40248 */ "Vargyas Networks, Inc D/B/A Maxxwave", /* 40249 */ "Fiber Connections Inc.", /* 40250 */ "coretanium.net", /* 40251 */ "Lonnie Mandigo", /* 40252 */ "RunStone Technology Co., Ltd.", /* 40253 */ "Particle Software Industries", /* 40254 */ "Zhiway Technologies CO., Ltd.", /* 40255 */ "EFG Bank SA", /* 40256 */ "Arcontia Technology AB", /* 40257 */ "REWAG Regensburger Energie- und Wasserversorgung AG & Co KG", /* 40258 */ "BruderhausDiakonie Stiftung", /* 40259 */ "Mongoose Metrics, LLC.", /* 40260 */ "KeenSystems B.V.", /* 40261 */ "Airbnb, Inc.", /* 40262 */ "Bank of Latvia", /* 40263 */ "CIRTEC Medical Systems, LLC", /* 40264 */ "Derbyshire County Council", /* 40265 */ "zxc ltd", /* 40266 */ "Anite Travel Ltd.", /* 40267 */ "KRZN", /* 40268 */ "Kenshoo ltd", /* 40269 */ "Flexagon GmbH", /* 40270 */ "Peconic Bay Medical Center", /* 40271 */ "SLAC National Accelerator Laboratory", /* 40272 */ "XeroAtom Group Ltd", /* 40273 */ "Spire Payments Holdings S.a.r.l.", /* 40274 */ "blackholearchives.org", /* 40275 */ "Navy Federal Credit Union", /* 40276 */ "Cloudant, Inc.", /* 40277 */ "Ocean-County Monmouth Amateur Radio Club, Inc. (OMARC)", /* 40278 */ "HAMILTON Bonaduz AG", /* 40279 */ "Sovtest-Internet Limited Company", /* 40280 */ "Bottega Verde Srl", /* 40281 */ "NSB AS", /* 40282 */ "Soporcel, Sociedade Portuguesa de Papel, SA", /* 40283 */ "Wavex Technology Ltd", /* 40284 */ "British Columbia International School, Bangkok", /* 40285 */ "Siclic SARL", /* 40286 */ "Perfectly Posh LLC", /* 40287 */ "Delta Power Solutions India Pvt Ltd", /* 40288 */ "TransLattice, Inc.", /* 40289 */ "Government of Dane County, Wisconsin", /* 40290 */ "Central National Australia Pty Ltd", /* 40291 */ "Mekelle University", /* 40292 */ "TG Byte Software GmbH", /* 40293 */ "OOO \"Jewelry House \"Kristall\"", /* 40294 */ "dogado Internet GmbH", /* 40295 */ "stocka", /* 40296 */ "Hytera Communications Co.,Ltd.", /* 40297 */ "Thad Touchton", /* 40298 */ "Peter Janke", /* 40299 */ "Radialogica, LLC", /* 40300 */ "Esis Enerji ve Elektronik San. Tic. A.S.", /* 40301 */ "Oozlum", /* 40302 */ "Anix Networks, Inc.", /* 40303 */ "Wacker Neuson SE", /* 40304 */ "Eletrosul Centrais Elétricas S/A", /* 40305 */ "Pointstore", /* 40306 */ "Great River Technology", /* 40307 */ "Fundația Ceata", /* 40308 */ "UNICART EOOD", /* 40309 */ "Cumulus Networks, inc", /* 40310 */ "ECHOES Technologies SAS", /* 40311 */ "Denbridge Marine Ltd.", /* 40312 */ "goRill Solutions", /* 40313 */ "Universidad Europea de Madrid", /* 40314 */ "M&L Solution", /* 40315 */ "VastRiver Technology Co.,Ltd.", /* 40316 */ "Alltech Group", /* 40317 */ "Budikom", /* 40318 */ "Canto GmbH", /* 40319 */ "Convene Networks", /* 40320 */ "Vitroconnect GmbH", /* 40321 */ "Jan Axelsson - DICOM2USB", /* 40322 */ "Big Nerd Ranch", /* 40323 */ "The Woman's Christian Association of Jamestown, N.Y.", /* 40324 */ "Leon Gaming Limited", /* 40325 */ "Expertize", /* 40326 */ "Metal Expert LLC", /* 40327 */ "Yunohost", /* 40328 */ "Tanaza S.r.l.", /* 40329 */ "KuVision Digital Technology Ltd", /* 40330 */ "Micronica srl", /* 40331 */ "Syn-Apps LLC", /* 40332 */ "Enthought", /* 40333 */ "Mercury Security Corp.", /* 40334 */ "RMTech", /* 40335 */ "Mericle Technologies, LLC.", /* 40336 */ "Centers for Medicare and Medicaid Services", /* 40337 */ "aizoOn Consulting s.r.l.", /* 40338 */ "Anovio AG", /* 40339 */ "miersch-IT", /* 40340 */ "Dalmartin Ltd", /* 40341 */ "CronLab Ltd", /* 40342 */ "E-Sales Soluções de Intergração", /* 40343 */ "Falk Online", /* 40344 */ "JRE & Associates, Inc.", /* 40345 */ "Belarusian Universal Commodity Exchange", /* 40346 */ "DUIT GmbH", /* 40347 */ "Snmart Grid Norway AS", /* 40348 */ "EICSYS GmbH", /* 40349 */ "Health Sciences Libraries Consortium", /* 40350 */ "XO Communications LLC", /* 40351 */ "American Electric Power", /* 40352 */ "Cirrus Software Engineering LLC", /* 40353 */ "Suttle Apparatus", /* 40354 */ "Domantic", /* 40355 */ "IT-CE", /* 40356 */ "Michael Buth - IT Consulting", /* 40357 */ "Mercado Libre S.R.L.", /* 40358 */ "Zeppelin GmbH", /* 40359 */ "IP Total Software S.A", /* 40360 */ "Xenya d.o.o.", /* 40361 */ "Cambridge Communication Systems", /* 40362 */ "Galambos Dániel", /* 40363 */ "Trinity Desktop Project", /* 40364 */ "Weichi Consulting LLC", /* 40365 */ "SHadrinsky Telephonny Zavod (SHTZ)", /* 40366 */ "Elcom International Pvt Ltd", /* 40367 */ "DATA-1 Ltd.", /* 40368 */ "gruppenrichtlinien.de", /* 40369 */ "Socialbakers a. s.", /* 40370 */ "Forcare B.V.", /* 40371 */ "Celab Ltd", /* 40372 */ "HealthForce Partners", /* 40373 */ "ODYA Bilgisayar ve Teknoloji Urunleri San. ve Tic. Ltd. Sti.", /* 40374 */ "Bayport Financial Services", /* 40375 */ "Astorex Corp", /* 40376 */ "Independence School District", /* 40377 */ "Innovative Technology Solutions, Inc.", /* 40378 */ "Lower Bucks Hospital", /* 40379 */ "Arkologic, Inc.", /* 40380 */ "Golub Capital", /* 40381 */ "Klimat prof Co.", /* 40382 */ "CAME CANCELLI AUTOMATICI SPA", /* 40383 */ "Association of friends of japanese culture (SPJK)", /* 40384 */ "Rose Datasystems Inc.", /* 40385 */ "Instituto Nacional de Segurança Social", /* 40386 */ "Mediatree SAS", /* 40387 */ "Eurosel", /* 40388 */ "Facultad Regional Cordoba Universidad Tecnológica Nacional", /* 40389 */ "Shale-Inland Holdings, LLC", /* 40390 */ "Ecks Three Ltd", /* 40391 */ "MDV Soft", /* 40392 */ "Phantasy Concepts", /* 40393 */ "Optogan Group", /* 40394 */ "25-Seven Systems", /* 40395 */ "LUMINO Licht Elektronik GmbH", /* 40396 */ "Piratepartei Lëtzebuerg", /* 40397 */ "Scout Trading LLC", /* 40398 */ "Huneed Technologies Co.,Ltd", /* 40399 */ "CortijoDelRio.net", /* 40400 */ "VidScale, Inc.", /* 40401 */ "Cryptonector, LLC", /* 40402 */ "Detached", /* 40403 */ "Vestiaire Collective", /* 40404 */ "UAB Fortevento", /* 40405 */ "Cadis", /* 40406 */ "Smartbox Experience Limited", /* 40407 */ "Philip Cullen Ltd", /* 40408 */ "YEEJOIN (BEIJING) TECHNOLOGY COMPANY LIMITED", /* 40409 */ "boxEleven", /* 40410 */ "PaansNet", /* 40411 */ "Option Computers Ltd", /* 40412 */ "Concordus Applications Inc.", /* 40413 */ "New England Baptist Hospital Inc.", /* 40414 */ "symThoughts", /* 40415 */ "Hectronic GmbH", /* 40416 */ "SUNSEA OPMEX Technologies Co., Ltd.", /* 40417 */ "NAG LLC", /* 40418 */ "PAWI Verpackungen AG", /* 40419 */ "Tuxum Secure Systems, S. L.", /* 40420 */ "adorsys GmbH & Co. KG", /* 40421 */ "Solutionary, Inc.", /* 40422 */ "Osceola County Board of County Comissioners", /* 40423 */ "TJ Samson Community Hospital", /* 40424 */ "Laird Technologies", /* 40425 */ "Unified Communications Inc.", /* 40426 */ "Kodofon JSC", /* 40427 */ "SwiftServe Limited.", /* 40428 */ "Utoolity GmbH", /* 40429 */ "ZinuSoft S.A. de C.V.", /* 40430 */ "Dracal technologies inc.", /* 40431 */ "SquareOne Networks, Inc", /* 40432 */ "Census Digital Inc.", /* 40433 */ "Huntington National Bank", /* 40434 */ "Cyara Solutions Pty Ltd", /* 40435 */ "dba Glen Black", /* 40436 */ "Polcom Sp. z o.o.", /* 40437 */ "Otto-Friedrich-Universität Bamberg", /* 40438 */ "I M Skaugen SE", /* 40439 */ "restfarbe.de", /* 40440 */ "DarkDNA", /* 40441 */ "OnApp", /* 40442 */ "Computer Rehab", /* 40443 */ "ETEK TECHNOLOGY SHENZHEN CO., LTD.", /* 40444 */ "TRADERS S.A.", /* 40445 */ "Ordbogen A/S", /* 40446 */ "FAVITE Inc.", /* 40447 */ "Ratocsystems, Inc.", /* 40448 */ "Max-Planck-Institut fuer extraterrestrische Physik", /* 40449 */ "University of Ottawa Heart Institute", /* 40450 */ "Allens, Inc.", /* 40451 */ "Care Team Connect Inc.", /* 40452 */ "School District #59 (Peace River South)", /* 40453 */ "Jaguar Network", /* 40454 */ "TMM.CX", /* 40455 */ "Radio Systems Ltd", /* 40456 */ "Zen Entertainment, Inc.", /* 40457 */ "East Tennessee State University", /* 40458 */ "Paymark Limited", /* 40459 */ "SHENZHEN SUPER RICH TECHNOLOGY CO.,LTD", /* 40460 */ "Mirzo Ulugbek Professional College of Informatics", /* 40461 */ "CIDEON", /* 40462 */ "TROY Group, Inc.", /* 40463 */ "a4ESSOR SAS", /* 40464 */ "ZETA6 Computer Systems LLC", /* 40465 */ "West Monroe Partners, LLC", /* 40466 */ "Netronome Systems, Inc.", /* 40467 */ "LSE Leading Security Experts GmbH", /* 40468 */ "Arkansas Heart Hospital", /* 40469 */ "Ecodota - Ecolo federal asbl.", /* 40470 */ "Zimory GmbH", /* 40471 */ "Synapture", /* 40472 */ "Chiang Mai International School, CMIS", /* 40473 */ "ALAGAS NETWORK PTE LTD", /* 40474 */ "iWeave inc.", /* 40475 */ "Winnertel", /* 40476 */ "geomedia", /* 40477 */ "LevelOne Communications GmbH", /* 40478 */ "40mm Holdings, LLC", /* 40479 */ "OTS Logistics Group, Ltd.", /* 40480 */ "MiMedia.com, Inc.", /* 40481 */ "Pure Storage", /* 40482 */ "Volta electronics srl", /* 40483 */ "Auroville Foundation", /* 40484 */ "Online.net", /* 40485 */ "State of Nevada Dept of Employment Training and Rehabilitation", /* 40486 */ "Timesafer Inc.", /* 40487 */ "Staiger, Schwald & Partner AG", /* 40488 */ "Mintlab B.V.", /* 40489 */ "The Dot Net Factory, LLC", /* 40490 */ "Uceem Networks Inc.", /* 40491 */ "Balsec GmbH", /* 40492 */ "Toyota Adria d.o.o.", /* 40493 */ "Ditenity Inc.", /* 40494 */ "ADVANCEDDIGITAL INC.", /* 40495 */ "Shanghai Aerospace Automobile Electromechanical Co.,LTD", /* 40496 */ "CROSS Zlin a.s.", /* 40497 */ "Third Sight Pte. Ltd.", /* 40498 */ "SOCEL VISIONOR", /* 40499 */ "DAN electronic Ltd", /* 40500 */ "MAF Consulting Ltd", /* 40501 */ "AT Consulting", /* 40502 */ "University of Louisville Hospital", /* 40503 */ "Kamil Bujniewicz", /* 40504 */ "OUTSCALE", /* 40505 */ "NSC corpration", /* 40506 */ "TravelSky Technology Limited", /* 40507 */ "Dynamic Telecom", /* 40508 */ "VoipSwitch", /* 40509 */ "Fourth Sector Innovations", /* 40510 */ "DoGi Enterprise", /* 40511 */ "Hamid Saeed", /* 40512 */ "weifang mingji technology co., LTD", /* 40513 */ "Shenzhen Howah Network Communication Co., Ltd", /* 40514 */ "Boivie Inc", /* 40515 */ "Staffordshire County Council", /* 40516 */ "Shenzhen Herotel Tech. Co.,Ltd.", /* 40517 */ "Foresight", /* 40518 */ "sprd.net AG", /* 40519 */ "Novareto", /* 40520 */ "Metacloud, Inc", /* 40521 */ "myoscience Inc", /* 40522 */ "Eau De Web", /* 40523 */ "Realex Payments", /* 40524 */ "Business Intelligence Direct Limited", /* 40525 */ "REGISTRO PUBLICO DE PANAMA", /* 40526 */ "Bank of Canada", /* 40527 */ "Kod Integrations, LLC", /* 40528 */ "Massxess", /* 40529 */ "Agence universitaire de la Francophonie", /* 40530 */ "Dr. Stolyarenko Medical Center", /* 40531 */ "Zeptonics Pty. Ltd.", /* 40532 */ "Voice of Russia", /* 40533 */ "Signamax, a.s.", /* 40534 */ "SVYAZKOMPLEKTSERVICE, LLC", /* 40535 */ "Wieland-Werke AG", /* 40536 */ "Null Ventures LLC", /* 40537 */ "Seal Maker Produktions- und Vertriebs GmbH", /* 40538 */ "Aquto", /* 40539 */ "LPAR2RRD", /* 40540 */ "MecSys", /* 40541 */ "SDL Fredhopper", /* 40542 */ "Udruga P.O.I.N.T.", /* 40543 */ "Impedance Mismatch LLC", /* 40544 */ "Insight Enterprises, Inc.", /* 40545 */ "Tentixo NG AB", /* 40546 */ "Aadvanced Filtering Services", /* 40547 */ "id3as", /* 40548 */ "synchroad.com", /* 40549 */ "OZtell", /* 40550 */ "Bootable Cluster CD", /* 40551 */ "Salcininku rajono savivaldybes administracija", /* 40552 */ "\"Bulgartabac-Holding\" AD", /* 40553 */ "Tecom", /* 40554 */ "Garz & Fricke GmbH", /* 40555 */ "Moving Possibilities LLC", /* 40556 */ "Triodos Bank NV", /* 40557 */ "Elecmor", /* 40558 */ "BPCE", /* 40559 */ "Norsat International Inc.", /* 40560 */ "Alloy Computer Products (Aust) Pty Ltd", /* 40561 */ "Open Broadcast Systems Ltd", /* 40562 */ "Christine Steup Unternehmensberatung", /* 40563 */ "StrikeAd LCC", /* 40564 */ "Berufsbildende Schulen Technik", /* 40565 */ "Forte Automation System, Inc.", /* 40566 */ "Melodon Software Inc.", /* 40567 */ "Tredegar Corporation", /* 40568 */ "HERNIS Scan Systems AS", /* 40569 */ "RFOptic", /* 40570 */ "SRT Communications, Inc.", /* 40571 */ "Carlos Domingues", /* 40572 */ "vklop.com", /* 40573 */ "Ukrainian Computer Laboratory ltd.", /* 40574 */ "Touro Infirmary", /* 40575 */ "NovaTech, LLC", /* 40576 */ "KOCH", /* 40577 */ "Computing Point Limited", /* 40578 */ "Vistula University", /* 40579 */ "GlobalSite UK", /* 40580 */ "Big Dutchman ltd.", /* 40581 */ "iBlocks Ltd.", /* 40582 */ "Federal Service State Registration, Cadastre and Cartography in Moscow", /* 40583 */ "Petersburg State University of Railways Transport", /* 40584 */ "Box UK, Limited", /* 40585 */ "Rocky Mountain College", /* 40586 */ "Neptec OS, Inc.", /* 40587 */ "TrikeApps Pty Ltd", /* 40588 */ "Indochina Telecommunication Technology JSC (ITT)", /* 40589 */ "ClickBridge Inc", /* 40590 */ "Avateq Corp.", /* 40591 */ "IDK CORPORATION", /* 40592 */ "Iberdrola USA Management Corporation", /* 40593 */ "ilogixx Limited", /* 40594 */ "NB Software", /* 40595 */ "ComTec!Fütterer", /* 40596 */ "NetProbe, Llc", /* 40597 */ "Geopost UK Ltd", /* 40598 */ "Quick OID Registry (quick-oid.org) (Roman Rybalko)", /* 40599 */ "EWA Ltd", /* 40600 */ "Emaris Limited", /* 40601 */ "Vytautas Magnus University", /* 40602 */ "Harvard Pilgrim Health Care", /* 40603 */ "Geosync Microwave, Inc.", /* 40604 */ "Younes Sleep Technologies", /* 40605 */ "Scripps Health", /* 40606 */ "Menara Netowrks", /* 40607 */ "Bars NPK Ltd.", /* 40608 */ "Nordstrom", /* 40609 */ "Docstoc, INC", /* 40610 */ "Key Software Develpment", /* 40611 */ "SoftPro S.r.l.", /* 40612 */ "Instituto Tecnológico de Informática", /* 40613 */ "GUANGDONG EAST POWER CO.,LTD.", /* 40614 */ "Olympus Corporation of the Americas", /* 40615 */ "Pragmatica, LLC", /* 40616 */ "WiMacTel, Inc", /* 40617 */ "Intechne Tecnologia da Informação", /* 40618 */ "First Gulf Bank PJSC", /* 40619 */ "Welcome Italia spa", /* 40620 */ "Centrum Holdings, s.r.o.", /* 40621 */ "Covea Insurance plc", /* 40622 */ "Morgowicz Inc", /* 40623 */ "Willops Management", /* 40624 */ "SBO \"Centre of Information Technology of the Orenburg region\"", /* 40625 */ "Web de Confianza Andaluza S.Coop.And.", /* 40626 */ "Jefferson Regional Medical Center", /* 40627 */ "FormPipe Software A/S", /* 40628 */ "Lexington, S.L.", /* 40629 */ "Crexendo, Inc.", /* 40630 */ "AVA Communications", /* 40631 */ "Trüb AG", /* 40632 */ "\"Scan Engineering Telecom\" CJSC", /* 40633 */ "Willway, S.A.", /* 40634 */ "opvizor GmbH", /* 40635 */ "Use System Engineering B.V.", /* 40636 */ "Deliservice Punnitse & Säästä Oy", /* 40637 */ "BSC Nutrition LTD", /* 40638 */ "PROFI-UC Ltd.", /* 40639 */ "Polisnab JSC", /* 40640 */ "Dierichsweiler Unternehmens- und Prozessberatung GmbH", /* 40641 */ "Gardado s.r.o.", /* 40642 */ "Broadpeak", /* 40643 */ "Formanek", /* 40644 */ "UFAL - Universidade Federal de Alagoas", /* 40645 */ "iNet Telecoms Ltd (Voipfone)", /* 40646 */ "HELVETAS Swiss Intercooperation", /* 40647 */ "AREAL", /* 40648 */ "Acumentrics Corporation", /* 40649 */ "InterMedia Enterprises", /* 40650 */ "Beijing Huasun Unicreate Technology LTD.", /* 40651 */ "Illinois Wesleyan University", /* 40652 */ "Bittoo", /* 40653 */ "Consórcio de Informática na Gestão Pública Municipal", /* 40654 */ "Nanjing Wlanease Co., Ltd.", /* 40655 */ "State independent уestablishment Tula region center of information technologies", /* 40656 */ "experience4you GmbH", /* 40657 */ "Delta Meccanica S.r.l.", /* 40658 */ "Oregano Systems – Design & Consulting GesmbH", /* 40659 */ "Southern Record Distributors Ltd.", /* 40660 */ "Airwave Solutions", /* 40661 */ "NISZ Co.", /* 40662 */ "Kupson spol. s r.o.", /* 40663 */ "Noblis, Inc.", /* 40664 */ "Akron Group", /* 40665 */ "Zito Media", /* 40666 */ "BRToken Ind. e Com. de Produtos Eletrônicos Ltda.", /* 40667 */ "NEC New Zealand Ltd", /* 40668 */ "Microlab RF Ltd", /* 40669 */ "Lanka Government Information Infrastucture", /* 40670 */ "Radinet Communications Inc.", /* 40671 */ "Fiber SenSys, Inc.", /* 40672 */ "Unigine Inc.", /* 40673 */ "SAIT", /* 40674 */ "geiger BDT GmbH", /* 40675 */ "Microsemi Corporation", /* 40676 */ "RKF Engineering Solutions, LLC", /* 40677 */ "Nexura Internacional S.A", /* 40678 */ "Centre Hospitalier de Fougeres", /* 40679 */ "La Trobe University", /* 40680 */ "ELNO", /* 40681 */ "Thanis.org", /* 40682 */ "Open Grid Europe GmbH", /* 40683 */ "Appdynamics", /* 40684 */ "Kafinated Kode, Inc", /* 40685 */ "Issac Systems Inc.", /* 40686 */ "ezamber", /* 40687 */ "Kum and Go", /* 40688 */ "Digital Processing Systems", /* 40689 */ "MBTechnology Ltd", /* 40690 */ "Crosstel Inc", /* 40691 */ "The ZAP Group", /* 40692 */ "Inter Vehicle Communication", /* 40693 */ "antrou", /* 40694 */ "BitPlanet Inc.", /* 40695 */ "IDENETWORK", /* 40696 */ "Alma Manu Oy", /* 40697 */ "TeliSwitch Solutions", /* 40698 */ "LexSoft, LTD", /* 40699 */ "M-Cube S.p.A.", /* 40700 */ "Vitera Healthcare Solutions", /* 40701 */ "San Mateo Medical Center", /* 40702 */ "Hokkaido Tracks", /* 40703 */ "Amstar Creative Ltd", /* 40704 */ "Signal Processing Devices", /* 40705 */ "AGMF Prévoyance Union de mutuelles soumise au livre II du Code de la Mutualité - Filiale de GPM", /* 40706 */ "Aleturo Group", /* 40707 */ "Rhythm Engineering, LLC", /* 40708 */ "Jiaheng Medical Technology Co., Ltd.", /* 40709 */ "Grasshopper", /* 40710 */ "DSTA S.L.", /* 40711 */ "DHCPCD Project", /* 40712 */ "Migame.org", /* 40713 */ "Accelera Mobile Broadband, Inc.", /* 40714 */ "Innerworkings", /* 40715 */ "Kyle Brantley", /* 40716 */ "Conde Nast", /* 40717 */ "RelySys Technologies India Private Limited", /* 40718 */ "The Lubrizol Corporation", /* 40719 */ "Texas Department of Public Safety", /* 40720 */ "FormFactor, Inc.", /* 40721 */ "HUVITZ", /* 40722 */ "New Zealand Defence Force", /* 40723 */ "Ubisoft Entertainment", /* 40724 */ "Intune Networks Limited", /* 40725 */ "CIPHRON GmbH", /* 40726 */ "Cosium", /* 40727 */ "Falck Danmark A/S", /* 40728 */ "LAND-DATA GmbH", /* 40729 */ "Neocom Software Ltd.", /* 40730 */ "Elephant Talk Communications Corp.", /* 40731 */ "Consortium for Smart Energy Profile 2 Interoperability", /* 40732 */ "Sabzfaam ICT", /* 40733 */ "Karina Mobile Solutions", /* 40734 */ "DoctuSoft Ltd.", /* 40735 */ "Audeo, Inc.", /* 40736 */ "National Labor Relations Board", /* 40737 */ "The Children's Institute of Pittsburgh", /* 40738 */ "Affirmative Insurance Holdings, Inc.", /* 40739 */ "DirectOut GmbH", /* 40740 */ "Flying Horse Productions, LLC", /* 40741 */ "PDI Ninth House", /* 40742 */ "Reissmann IT-Services", /* 40743 */ "Center for Translational Molecular Medicine (CTMM TraIT)", /* 40744 */ "WiValley, Inc", /* 40745 */ "GOZUBUYUKOGLU", /* 40746 */ "Radiant Logic, Inc.", /* 40747 */ "IONODES Inc.", /* 40748 */ "Corfire (SK C&C USA) Inc.", /* 40749 */ "Synrc Research Center", /* 40750 */ "Homemail - Ross Johnson", /* 40751 */ "Barricane Technology Ltd.", /* 40752 */ "Beijing Time Antaeus Media Technology Co.,Ltd", /* 40753 */ "Liikennevirasto TVT", /* 40754 */ "Acticom", /* 40755 */ "K.W.Doggett Fine Paper", /* 40756 */ "MOSCOW COMMERCIAL BANK MOSCOMPRIVATBANK ZAO", /* 40757 */ "Eltek Polska", /* 40758 */ "EGRIMA BuisnessCenter", /* 40759 */ "TOMRA Systems ASA", /* 40760 */ "Mideye AB", /* 40761 */ "Hitec Electric b.v.", /* 40762 */ "Kennedy University Hospitals, Inc.", /* 40763 */ "Resonate Insights", /* 40764 */ "hSenid Software (Singapore) PVT Limited", /* 40765 */ "Xenode Co. Ltd.", /* 40766 */ "Reporting Estándar S.L.", /* 40767 */ "Hotwords Tecnologia", /* 40768 */ "VendScreen", /* 40769 */ "Partheas", /* 40770 */ "VISUAPPS GmbH", /* 40771 */ "SuperMedia, LLC", /* 40772 */ "The Prosecutor General`s Office of Ukraine", /* 40773 */ "NagSNMP", /* 40774 */ "TripodWorks CO.,LTD.", /* 40775 */ "Kalyan Kadiyala", /* 40776 */ "Qin Technology SpA", /* 40777 */ "Unassigned", /* 40778 */ "2reallife", /* 40779 */ "Smartpipe Solutions", /* 40780 */ "Cynaptica", /* 40781 */ "Dyne System Co., Ltd", /* 40782 */ "icoMetrix", /* 40783 */ "Kumahira Co., Ltd.", /* 40784 */ "Optro Co.,Ltd", /* 40785 */ "Unassigned", /* 40786 */ "Compumatica secure networks", /* 40787 */ "Abegglen Management Consultants AG", /* 40788 */ "Logix", /* 40789 */ "Simple Solution Technologies LLC", /* 40790 */ "Beijing OMATE Digital Technology CO.,Ltd", /* 40791 */ "Express-Interfracht Internationale Spedition GmbH", /* 40792 */ "Andelskassen JAK", /* 40793 */ "IG Metall Vorstandsverwaltung", /* 40794 */ "otaku-realm.net", /* 40795 */ "ICBPI S.p.A.", /* 40796 */ "Sidion", /* 40797 */ "3D-P", /* 40798 */ "Swiss International Air Lines Ltd.", /* 40799 */ "Smart Refill i Helsingborg AB", /* 40800 */ "FiveCo", /* 40801 */ "Indra Navia as", /* 40802 */ "netRapid GmbH & Co. KG", /* 40803 */ "ULTEO", /* 40804 */ "Nimbus Directory Services", /* 40805 */ "ICBTECH d.o.o.", /* 40806 */ "semyon.org", /* 40807 */ "Wi-Fi Alliance", /* 40808 */ "Tohoku Gakuin University", /* 40809 */ "BUPT-GUOAN Broadband Network Technology Co.Ltd", /* 40810 */ "WebSistem", /* 40811 */ "Die Firma GmbH", /* 40812 */ "Agenturadmin.de", /* 40813 */ "Garden City Hospital", /* 40814 */ "Dr. Thalmair", /* 40815 */ "Ecodigi Tecnologia e Serviços Ltda.", /* 40816 */ "Dr. Martin Froehlich", /* 40817 */ "CYG SUNRI CO.,LTD", /* 40818 */ "Provident Solutions LLC", /* 40819 */ "OpenIPMI", /* 40820 */ "Public Protector South Africa", /* 40821 */ "Hagedorn Informationssysteme GmbH", /* 40822 */ "NVable Limited", /* 40823 */ "Qore Technologies, sro", /* 40824 */ "VeriTeknik", /* 40825 */ "Short Films 4 U Limited", /* 40826 */ "Lifelan Technology Co., LTD.", /* 40827 */ "CHIeru Co., Ltd.", /* 40828 */ "Cambridge Industries Group (CIG)", /* 40829 */ "Qiaoy.info", /* 40830 */ "Domenikss SIA", /* 40831 */ "MicroNova AG", /* 40832 */ "Hytec Electronics Ltd", /* 40833 */ "Kübler IT", /* 40834 */ "Department of Microelectronics and Computer Science, Lodz University of Technology", /* 40835 */ "Blackbird Group, Inc.", /* 40836 */ "iTech Comércio Importação e Exportação de Componentes Eletrônicos LTDA", /* 40837 */ "Commune de Niort", /* 40838 */ "SARDA South Wales", /* 40839 */ "Rainydayz", /* 40840 */ "n-Systems GmbH & Co. KG", /* 40841 */ "A10 Networks", /* 40842 */ "Chatmongers, LLC", /* 40843 */ "MAC&C LLC", /* 40844 */ "Veris Industries", /* 40845 */ "Montpelier Technical Resources Ltd", /* 40846 */ "CRDP de l'Académie de Versailles", /* 40847 */ "VeriFyle, Inc.", /* 40848 */ "Ceiec Electric Technology Inc.", /* 40849 */ "Kongsberg Spacetec AS", /* 40850 */ "IPContact Software", /* 40851 */ "Main Line Health Inc.", /* 40852 */ "ATOSS CSD Software GmbH", /* 40853 */ "WH Ireland Limited", /* 40854 */ "University of Pittsburgh", /* 40855 */ "Tofino Security", /* 40856 */ "Mira Soft", /* 40857 */ "ModemTec, spol. s r. o.", /* 40858 */ "VOSGELIS", /* 40859 */ "Protocom Technology", /* 40860 */ "Silent Softwares Pvt. Ltd.", /* 40861 */ "Systema Technologies SA", /* 40862 */ "UP-nxt", /* 40863 */ "Larcan Inc", /* 40864 */ "Majorpower Corporation", /* 40865 */ "Arcusys Oy", /* 40866 */ "Boardroom Pty Limited", /* 40867 */ "Genew Technologies Co.,Ltd", /* 40868 */ "TAIWAN-CA Inc.", /* 40869 */ "Closed Joint Stock Company Interfax", /* 40870 */ "poweroasis", /* 40871 */ "Pardazeshgaran Saman Banking Solutions", /* 40872 */ "Semafone Limited", /* 40873 */ "LL Control Solutions International (PTY) Ltd", /* 40874 */ "OfficeCore", /* 40875 */ "Pressens Fællesindkøb", /* 40876 */ "myprocurement", /* 40877 */ "Venere Net Srl", /* 40878 */ "VERION TEKNOLOJI A.S.", /* 40879 */ "DBI Software, Inc.", /* 40880 */ "Mutualink Inc", /* 40881 */ "Step One AS", /* 40882 */ "Beijing CangLang TV Technologies Co., Ltd.", /* 40883 */ "Instituto Federal Fluminense - IFF", /* 40884 */ "ELCUS", /* 40885 */ "Kommunales Rechenzentrum Minden-Ravensberg/Lippe", /* 40886 */ "Edeka Minden-Hannover IT-/logistic service GmbH", /* 40887 */ "Universitaetsklinikum Tuebingen", /* 40888 */ "Global Invacom Ltd", /* 40889 */ "Hardomo", /* 40890 */ "RDC, Inc. dba LynTec", /* 40891 */ "abimus", /* 40892 */ "University of the Arts Helsinki", /* 40893 */ "Cory-Net", /* 40894 */ "VRVis Zentrum für Virtual Reality und Visualisierung Forschungs-GmbH", /* 40895 */ "Pearson Technology", /* 40896 */ "C.S. Veritas", /* 40897 */ "Cirries Technologies Inc.", /* 40898 */ "Evo Group Technologies, Inc.", /* 40899 */ "Cybersmart Ltd", /* 40900 */ "Courtney.org.za", /* 40901 */ "TransLink - South Coast British Columbia Transportation Authority", /* 40902 */ "Thongfforong.cyf", /* 40903 */ "Brisbane City Council", /* 40904 */ "Altronix Corporation", /* 40905 */ "Divitel Development Lda", /* 40906 */ "OOO Adicom", /* 40907 */ "Autoritatea Naţională pentru Administrare şi Reglementare în Comunicaţii - ANCOM", /* 40908 */ "BigBrother Security Systems", /* 40909 */ "Bradley University", /* 40910 */ "Freedompay, Inc.", /* 40911 */ "Kulcs-Soft Nyrt.", /* 40912 */ "QEM Software Ltd.", /* 40913 */ "Symanitron", /* 40914 */ "WANdisco, Inc", /* 40915 */ "Berico Technologies", /* 40916 */ "Lender Processing Service", /* 40917 */ "ResponseTap Limited", /* 40918 */ "Vnomics", /* 40919 */ "Icahn School of Medicine at Mount Sinai", /* 40920 */ "MikroM Mikroelektronik für Multimedia GmbH", /* 40921 */ "Telydata Cía. Ltda.", /* 40922 */ "Isle of Capri Casinos, Inc.", /* 40923 */ "aYaline", /* 40924 */ "Trenkwlader Solutions, s.r.o.", /* 40925 */ "Majic", /* 40926 */ "SID Solutions Inc.", /* 40927 */ "Esprit Digital Ltd", /* 40928 */ "Barrett Consulting Group Pty Ltd", /* 40929 */ "MAGREX Co. Ltd.", /* 40930 */ "Victorian Electoral Commission", /* 40931 */ "SuccWare (Beijing) Software System Co., Ltd", /* 40932 */ "QiZhi Technologies", /* 40933 */ "LIG Nex1", /* 40934 */ "LTD \"MedScann\"", /* 40935 */ "St. Elisabeth Convent", /* 40936 */ "Axelprod GSM Transmission", /* 40937 */ "MobileIron Inc.", /* 40938 */ "Alphonso", /* 40939 */ "ROYAL NEW ZEALAND PLUNKET SOCIETY INCORPORATED", /* 40940 */ "Tamara Elektronik Ltd.Sti.", /* 40941 */ "logic-base GmbH", /* 40942 */ "XHONIA", /* 40943 */ "Bitlomat LLC", /* 40944 */ "Oak Solucoes em Informatica LTDA EPP", /* 40945 */ "Yuriy Moskovets", /* 40946 */ "Metromatics Pty Ltd", /* 40947 */ "BiTMICRO Networks, Inc.", /* 40948 */ "Smart Grid Billing, Inc", /* 40949 */ "JSC Stock Company OZNA", /* 40950 */ "uAnywhere", /* 40951 */ "S3 ID Ltd", /* 40952 */ "Unassigned", /* 40953 */ "Ivar Jacobson International AB", /* 40954 */ "Campbell County Hospital District", /* 40955 */ "SEAKR Engineering Inc", /* 40956 */ "Dexa Systems, Inc", /* 40957 */ "Geneity Ltd", /* 40958 */ "Optical Zonu Corporation", /* 40959 */ "Witelcom AS", /* 40960 */ "Axxes", /* 40961 */ "SDL - Language Weaver", /* 40962 */ "Jacques Ledoux", /* 40963 */ "Stone Fifteen Design Group", /* 40964 */ "Louisiana State Board of Medical Examiners", /* 40965 */ "Ronald.ORG", /* 40966 */ "SVIAT Ltd.", /* 40967 */ "Nirvanix, Inc.", /* 40968 */ "Tobila Systems, Inc.", /* 40969 */ "LRD23 Consulting LLC", /* 40970 */ "Audioptic Trade Services", /* 40971 */ "SFR", /* 40972 */ "Freeside Atlanta", /* 40973 */ "Kim Johnsson", /* 40974 */ "Applied Communication Sciences", /* 40975 */ "Videotrec Industrial Co. Ltd.", /* 40976 */ "Inter-M", /* 40977 */ "AZElectronic", /* 40978 */ "Newell Rubbermaid - DYMO Corp.", /* 40979 */ "creatale GmbH", /* 40980 */ "Facebook, Inc.", /* 40981 */ "ROARING FORK SCHOOL DISTRICT", /* 40982 */ "Trinity Solutions, Inc.", /* 40983 */ "Fastback Networks", /* 40984 */ "Clearview Systems, LLC", /* 40985 */ "JVL Ventures / Isis Mobile Commerce", /* 40986 */ "Quality Software Works", /* 40987 */ "Justin Obernier", /* 40988 */ "GLsun Science and Tech Co.Ltd", /* 40989 */ "Domain Name Services", /* 40990 */ "tedox KG", /* 40991 */ "vijay. Pvt. Ltd", /* 40992 */ "HD Vest Inc.", /* 40993 */ "LLC \"AIS Gorod\"", /* 40994 */ "DLG Automacao Industrial Ltda", /* 40995 */ "SilverRail Technologies, Inc.", /* 40996 */ "Armonti Digital Services", /* 40997 */ "DomaCom Pty Ltd", /* 40998 */ "Ribose Inc", /* 40999 */ "mykarte.com", /* 41000 */ "Cuattro, LLC.", /* 41001 */ "Biotest AG", /* 41002 */ "Workers' Compensation Board - Alberta", /* 41003 */ "Clackamas County", /* 41004 */ "IntelliBatt, Inc.", /* 41005 */ "Ineluctable Designs", /* 41006 */ "IMBC GmbH", /* 41007 */ "EMTS Telecom Services Ltd.", /* 41008 */ "Info-M Ltd.", /* 41009 */ "FlyingVoice Technology Ltd.", /* 41010 */ "LanPro Inc.", /* 41011 */ "tmakinen.com", /* 41012 */ "Miyagi University of Education", /* 41013 */ "Attam Ltd", /* 41014 */ "Intelligenza", /* 41015 */ "Héonium SARL", /* 41016 */ "EDV-Studio Stephan Konheiser", /* 41017 */ "WaldiNetwork Ltd. Home", /* 41018 */ "Acuntia S.A.", /* 41019 */ "GetOnline Ltd", /* 41020 */ "Gensicke", /* 41021 */ "van Rens IT Consultancy", /* 41022 */ "BAITS Global", /* 41023 */ "BG Unfallklinik Murnau", /* 41024 */ "Lorillard Tobacco Company", /* 41025 */ "DealerTrack", /* 41026 */ "Direct Line Insurance Group PLC", /* 41027 */ "Delphix Corp", /* 41028 */ "The Orvis Company Inc.", /* 41029 */ "JAI Inc.", /* 41030 */ "Axeos Services B.V.", /* 41031 */ "VeriCom AB", /* 41032 */ "Amor Group", /* 41033 */ "Systems With Intelligence Inc.", /* 41034 */ "TM Systems, LLC", /* 41035 */ "Corero Network Security", /* 41036 */ "Edgepoint IT Services", /* 41037 */ "Gridcore AB", /* 41038 */ "adidas AG", /* 41039 */ "Scientific & Research Center Epsilon", /* 41040 */ "Fairpersonal GmbH", /* 41041 */ "tinNet - Lukas Barth", /* 41042 */ "Radius, LLC", /* 41043 */ "SohnTech Solutions, LLC.", /* 41044 */ "Rover Apps, LLC", /* 41045 */ "Driven Technical Solutions", /* 41046 */ "Sestek Communications Inc.", /* 41047 */ "NETIFY", /* 41048 */ "Erudio Solutions", /* 41049 */ "Raspmon", /* 41050 */ "MBIA Inc.", /* 41051 */ "IntraFind Software AG", /* 41052 */ "musicute project - Rouven Raudzus", /* 41053 */ "Dinamo Networks", /* 41054 */ "Esquisse Software Studio", /* 41055 */ "telco Management & Service GmbH", /* 41056 */ "FANCYRABBIT.ORG", /* 41057 */ "Loggly Inc.", /* 41058 */ "Petromoc", /* 41059 */ "M-D Technology", /* 41060 */ "SOLUTI Certificacao Digital", /* 41061 */ "NuScale Power LLC", /* 41062 */ "Asynchrony, Inc.", /* 41063 */ "CheckMySystems Ltd.", /* 41064 */ "Alea Iacta Est", /* 41065 */ "Shaanxi Tians Information & Technology Co.,Ltd.", /* 41066 */ "Quantitative Risk Research, S.L.", /* 41067 */ "Shenzhen RHC technology Co.,Ltd", /* 41068 */ "insystem", /* 41069 */ "WhereGroup Gmbh & Co. KG", /* 41070 */ "Servicios Electrónicos Universitarios, S.A.S.", /* 41071 */ "Domogik", /* 41072 */ "Openreach", /* 41073 */ "voestalpine group-IT GmbH", /* 41074 */ "Edge S.A.", /* 41075 */ "The Probe Project Ltd", /* 41076 */ "iOWA AB", /* 41077 */ "Apteka Alpi Farm", /* 41078 */ "autocrash.info", /* 41079 */ "IT-EASY Berlin", /* 41080 */ "LLC Okey", /* 41081 */ "Altarix-Samara", /* 41082 */ "Shanghai Ruiyuan Information Technologies Co.,Ltd.", /* 41083 */ "ALTELL Ltd.", /* 41084 */ "Isida-Informatica, Ltd", /* 41085 */ "Trafikselskabet Movia", /* 41086 */ "Automation NV/SA", /* 41087 */ "TCUBE", /* 41088 */ "Neptune Internet Service", /* 41089 */ "Shanghai HEADING Information Engineering Co., Ltd.", /* 41090 */ "Libra Srl", /* 41091 */ "Dynamic Systems, Inc.", /* 41092 */ "Bareos GmbH & Co. KG", /* 41093 */ "iS5 Communications Inc.", /* 41094 */ "Evrisko Systems", /* 41095 */ "Metadosis GP", /* 41096 */ "Magnus LTD", /* 41097 */ "ESPEC CORP.", /* 41098 */ "COMPTA - EQUIPAMENTOS E SERVIÇOS DE INFORMÁTICA S.A.", /* 41099 */ "Fon Wireless LTD", /* 41100 */ "Simply Business", /* 41101 */ "NS Solutions Corporation", /* 41102 */ "Global Radio Services Limited", /* 41103 */ "Transway Ltd.", /* 41104 */ "Lognet Billing LTD", /* 41105 */ "Institute of Photonics and Electronics AS CR, v.v.i.", /* 41106 */ "Transact Technologies Inc", /* 41107 */ "Mill Software", /* 41108 */ "TriVu Media", /* 41109 */ "Good Dog Design", /* 41110 */ "66 VISION TECH CO.,LTD", /* 41111 */ "Ubiquiti Networks, Inc.", /* 41112 */ "Barnfind Technologies AS", /* 41113 */ "S2 Factory, Inc.", /* 41114 */ "Glarner Kantonalbank", /* 41115 */ "DEBES ENGINEERING", /* 41116 */ "Richard Wolf GmbH", /* 41117 */ "Stadt Duisburg", /* 41118 */ "3 Stack Technologies", /* 41119 */ "CMosaix", /* 41120 */ "Terminal plus, LLC", /* 41121 */ "Pindrop Security", /* 41122 */ "Sumo Logic, Inc.", /* 41123 */ "KfW", /* 41124 */ "Mystic Video, Inc.", /* 41125 */ "SFERA", /* 41126 */ "Linux Router Systems", /* 41127 */ "Knorst Consulting LTDA", /* 41128 */ "WideNet", /* 41129 */ "Mint Medical GmbH", /* 41130 */ "LUGO TERMINAL SPA", /* 41131 */ "Västra Götalandsregionen", /* 41132 */ "Alinean, Inc.", /* 41133 */ "Ronal AG", /* 41134 */ "Salsbury Engineering, Inc.", /* 41135 */ "Ryan Spinuzzi", /* 41136 */ "Autotoll Limited", /* 41137 */ "10gen, Inc.", /* 41138 */ "NextGenTel AS", /* 41139 */ "nplawes", /* 41140 */ "Southeast Health", /* 41141 */ "Instant Solutions LTDA", /* 41142 */ "Goodloe Consulting Group, LLC", /* 41143 */ "Initra d.o.o.", /* 41144 */ "Industrial Control Communications, Inc", /* 41145 */ "VertiCloud", /* 41146 */ "The Southampton Hospital Association", /* 41147 */ "Binary Software Indy, llc", /* 41148 */ "Shandong New Beiyang Information Technology Co., Ltd. (SNBC)", /* 41149 */ "Acelis SARL", /* 41150 */ "dev.ncds.eu", /* 41151 */ "Cyfrowy Polsat SA", /* 41152 */ "Status Nobilis SA", /* 41153 */ "trojniak.net", /* 41154 */ "Oberlin College", /* 41155 */ "Solmate Group", /* 41156 */ "JEFFREY WALTER HEISEY", /* 41157 */ "Special Services Division, NCISS", /* 41158 */ "Media Group LLC", /* 41159 */ "Copper Systems Ltd", /* 41160 */ "Bentsen Electronics", /* 41161 */ "Software Daten Service", /* 41162 */ "INVAP S.E.", /* 41163 */ "Tulsa Technology Center", /* 41164 */ "SKYERA Inc", /* 41165 */ "streibelt.net", /* 41166 */ "Pomona Valley Hospital Medical Center", /* 41167 */ "Excelitas", /* 41168 */ "Scorpio IT", /* 41169 */ "NOVXTEL", /* 41170 */ "MECC CO., LTD.", /* 41171 */ "HEC Paris", /* 41172 */ "Dream Chip Technologies GmbH", /* 41173 */ "Mount Vernon Hospital Physics (UK)", /* 41174 */ "Aartesys AG", /* 41175 */ "Energy X Systems Ltd.", /* 41176 */ "Ocean Interactive (Beijing) Technology Co. Ltd", /* 41177 */ "Proftal Oy", /* 41178 */ "DirectTrust.org Inc.", /* 41179 */ "Process Query Systems, LLC", /* 41180 */ "conversis technologies GmbH", /* 41181 */ "Digital Imaging Lab.", /* 41182 */ "Contim Automação de Sistemas Ltda", /* 41183 */ "FreedomVoice Systems", /* 41184 */ "Norwia AS", /* 41185 */ "QuantuMatriX Technologies", /* 41186 */ "Video Tech Laboratories", /* 41187 */ "University of California Hastings College of the Law", /* 41188 */ "Sika Informationssysteme AG", /* 41189 */ "Invensys Rail", /* 41190 */ "Educastream", /* 41191 */ "VICTORY Standards Support Office", /* 41192 */ "TELETOR, LLC", /* 41193 */ "Piratenpartei Deutschland Landesverband Saarland", /* 41194 */ "Imecon Engineering srl", /* 41195 */ "SimpliVity Corporation", /* 41196 */ "Epicard SA", /* 41197 */ "Ryan J. Geyer", /* 41198 */ "OPTEYA SAS", /* 41199 */ "Vision Microsystems Co.,ltd.", /* 41200 */ "ZeroSpace ICT Services B.V.", /* 41201 */ "Intigua Inc.", /* 41202 */ "Swiss Bankers Prepaid Services AG", /* 41203 */ "AVASAD", /* 41204 */ "Colégio Técnico Industrial de Santa Maria (CTISM)", /* 41205 */ "Travelex Limited", /* 41206 */ "Yospace Technologies Ltd", /* 41207 */ "Gorodissky & Partners, Ltd.", /* 41208 */ "Qpay Inc.", /* 41209 */ "Santa Fe College", /* 41210 */ "CherryRoad Technologies Inc.", /* 41211 */ "Providigm", /* 41212 */ "bitagentur GmbH & Co. KG", /* 41213 */ "Cloud Concepts", /* 41214 */ "INFOMARK CO., LTD.", /* 41215 */ "Monitise Group Limited", /* 41216 */ "Xcision Medical Systems, LLC", /* 41217 */ "Vera Networks, LLC", /* 41218 */ "Lytzen IT A/S", /* 41219 */ "PS-IT-Consulting", /* 41220 */ "IMDIT GmbH", /* 41221 */ "Jnsys", /* 41222 */ "ASC-TEC AG", /* 41223 */ "MobileVaults, Inc.", /* 41224 */ "JSC Volga", /* 41225 */ "Ennetix", /* 41226 */ "Voice Conferencing Systems for Misson Control Centers (vocsmcc)", /* 41227 */ "CoreMeda", /* 41228 */ "Friulia SPA", /* 41229 */ "Usharesoft", /* 41230 */ "IntelliMagic B.V.", /* 41231 */ "ZFSoft", /* 41232 */ "HubSpot, Inc.", /* 41233 */ "RNelson Consulting", /* 41234 */ "Schalter Eletrônica", /* 41235 */ "Telepoint Global Hosting Services, LLC.", /* 41236 */ "Great Lakes Data Systems Inc.", /* 41237 */ "Shane Spinuzzi", /* 41238 */ "Charles County Goverment", /* 41239 */ "Mijares Consultoría y Sistemas SL", /* 41240 */ "ARC Document Solutions, Inc", /* 41241 */ "Shanghai PPLive Media Tech. Co.,Ltd", /* 41242 */ "Desoma GmbH", /* 41243 */ "ABAK Systèmes", /* 41244 */ "Sadara Internet", /* 41245 */ "2600hz", /* 41246 */ "Rakennusliitto ry", /* 41247 */ "IETFNG.org", /* 41248 */ "Silent Circle LLC", /* 41249 */ "Globosat Programadora LTDA", /* 41250 */ "Simple Software Solutions", /* 41251 */ "Wicked Software", /* 41252 */ "Millry Telephone Co", /* 41253 */ "Wroclaw School of Applied Informatics \"Horyzont\"", /* 41254 */ "Maui Systems Ltd", /* 41255 */ "NormanStudios", /* 41256 */ "SignOn", /* 41257 */ "Jason R. Gonsalves", /* 41258 */ "Lullabot Consulting, Inc.", /* 41259 */ "Critical Link, LLC", /* 41260 */ "TraceVector", /* 41261 */ "Institut National de Physique Nucléaire et de Physique des Particules", /* 41262 */ "Nutanix Inc.", /* 41263 */ "Kent and Essex Police IT Directorate", /* 41264 */ "infOpen", /* 41265 */ "Igor Posledov", /* 41266 */ "Benbro Electronics Pty Ltd", /* 41267 */ "Elsicom Ltd.", /* 41268 */ "Dr. V.M.Ponzoni ICT Outsourcing", /* 41269 */ "Vibicom Communications Inc.", /* 41270 */ "Ondot Systems, Inc.", /* 41271 */ "Cascade Microtech, Inc.", /* 41272 */ "Lakehead University", /* 41273 */ "Bluwan S.A", /* 41274 */ "Kapsch Telematic Services Sp. z o.o.", /* 41275 */ "BCi Limited", /* 41276 */ "Computer System Corp.", /* 41277 */ "Stateless Networks", /* 41278 */ "Danish Broadcasting Corporation", /* 41279 */ "Neul Limited", /* 41280 */ "tols.org", /* 41281 */ "SpeechStorm Ltd.", /* 41282 */ "IEX Group, LLC", /* 41283 */ "Celestech, Inc", /* 41284 */ "Clemex Technologies Inc", /* 41285 */ "The Libreswan Project", /* 41286 */ "Red Bull GmbH", /* 41287 */ "J.D. Irving, Limited, IT Division", /* 41288 */ "Lanaccess Telecom", /* 41289 */ "o3, d.o.o.", /* 41290 */ "LEO Pharma A/S", /* 41291 */ "LSU Health System", /* 41292 */ "Taylor Innovations, LLC", /* 41293 */ "Datafrog", /* 41294 */ "Andalusia Group", /* 41295 */ "E-Gate Communications Inc.", /* 41296 */ "Nextech Co.,Ltd", /* 41297 */ "BRGFrauengasse", /* 41298 */ "Infodom d.o.o.", /* 41299 */ "Deganius", /* 41300 */ "CSF Scientific Computing Core", /* 41301 */ "Unified Technology Ltd", /* 41302 */ "Six Degrees Managed Data Ltd", /* 41303 */ "QiNet SRL", /* 41304 */ "Schoch-IT UG", /* 41305 */ "Columbus College of Art & Design", /* 41306 */ "LDS Technology Group", /* 41307 */ "ALCO Aircraft", /* 41308 */ "Inter Dimensional Space Port", /* 41309 */ "dwApi, Ltd.", /* 41310 */ "Missouri Western State University", /* 41311 */ "Netscreens LTD.", /* 41312 */ "OLTRI LLC", /* 41313 */ "A.E.Q. Aplicaciones Electrónicas Quasar", /* 41314 */ "Recording Enterprise Solution (R.E.S.)", /* 41315 */ "Velocimetrics Ltd", /* 41316 */ "DAC Beachcroft LLP", /* 41317 */ "Adaptavist", /* 41318 */ "Netbuilder S.r.l.", /* 41319 */ "Diagnosoft", /* 41320 */ "Commsky Technologies(HangZhou)Co.,Ltd.", /* 41321 */ "Time-O-Matic, Inc.", /* 41322 */ "Reid Hospital & Health Care Services", /* 41323 */ "Centre de services partagés du Québec", /* 41324 */ "Uber Technologies, Inc.", /* 41325 */ "Dangerous Linux", /* 41326 */ "Radiology.io, Inc", /* 41327 */ "blackned GmbH", /* 41328 */ "Soncatec Oy", /* 41329 */ "Eurotoll", /* 41330 */ "NxtGrid Ltd", /* 41331 */ "Fourth Watch Business Continuity Services LC", /* 41332 */ "ShenZhen Great Electronic Technology Co., LTD", /* 41333 */ "Feldhaus - Uhlenbrock Sicherheit &Technik GmbH", /* 41334 */ "AMPEG GmbH", /* 41335 */ "UEL - Universidade Estadual de Londrina", /* 41336 */ "WingSystem Rst. inc.", /* 41337 */ "Imagination Team", /* 41338 */ "Duons", /* 41339 */ "Friedrich Miescher Institute for Biomedical Research", /* 41340 */ "Knobbe, Martens, Olson & Bear, LLP.", /* 41341 */ "IMAIOS SAS", /* 41342 */ "Qihong Computer Science & Technology Co. Ltd", /* 41343 */ "FirmWin software technology Co. Ltd", /* 41344 */ "Nectar Services Corporation", /* 41345 */ "Certiwise", /* 41346 */ "Comsys Bärtsch AG", /* 41347 */ "Ronyo", /* 41348 */ "Enigmedia", /* 41349 */ "ITManx Ltd", /* 41350 */ "FJM Security Solutions, LLC", /* 41351 */ "Paychex, Inc.", /* 41352 */ "Waukegan Public Schools", /* 41353 */ "Parker Poe Adams and Bernstein, LLP", /* 41354 */ "Optic Cloud Technology Co,.Ltd", /* 41355 */ "Tufts Clinical and Translational Science Institute", /* 41356 */ "Groupe Clarins", /* 41357 */ "JSC «AMB Bank»", /* 41358 */ "Triax AS", /* 41359 */ "Prodrive B.V.", /* 41360 */ "KYOS SARL", /* 41361 */ "Transport Department, HKSARG", /* 41362 */ "Naunet Corporation", /* 41363 */ "MIRACLE Information Systems GmbH", /* 41364 */ "Avon and Wiltshire Mental Health Partnership NHS Trust", /* 41365 */ "Citelum", /* 41366 */ "A.T.WORKS, Inc.", /* 41367 */ "Nilsoft Janko Debenjak s.p.", /* 41368 */ "Burri IT Systems", /* 41369 */ "JHome Consulting, Ltd.", /* 41370 */ "2ndQuadrant", /* 41371 */ "ConVista Consulting AG", /* 41372 */ "Seawind Sud America", /* 41373 */ "Fachschaftsrat Elektrotechnik an der TU Dresden", /* 41374 */ "Switching Power Inc.", /* 41375 */ "Hivecast Corporation", /* 41376 */ "IONHT CO.,LTD", /* 41377 */ "Rodnik SPE, Inc.", /* 41378 */ "Miros AS", /* 41379 */ "KORUS Consulting SNG Ltd", /* 41380 */ "CJSC NEC Neva Communications Systems", /* 41381 */ "Fundacion Social Camara Chilena de la Construccion", /* 41382 */ "DURR Systems GmbH", /* 41383 */ "Zakład Usług Informatycznych OTAGO Sp. z o.o.", /* 41384 */ "Deep Sea Electronics plc", /* 41385 */ "SYBORG Informationssysteme b.h. OHG", /* 41386 */ "Nest Labs", /* 41387 */ "IRIS Analytics GmbH", /* 41388 */ "Smarsh Inc", /* 41389 */ "Suzhou Anke Medical System Co., LTD", /* 41390 */ "OOO TFPK", /* 41391 */ "Livesport s.r.o.", /* 41392 */ "Oh Leck!", /* 41393 */ "quarxConnect", /* 41394 */ "Codiac GmbH", /* 41395 */ "V-Nova Ltd", /* 41396 */ "ARAG SE", /* 41397 */ "Micaela Gasper LMT", /* 41398 */ "Groupe Dynamite Inc.", /* 41399 */ "ECCEL CORP", /* 41400 */ "Northwest Savings Bank", /* 41401 */ "NMS Guru, Inc", /* 41402 */ "Apcera, Inc.", /* 41403 */ "Rayan Roshd Electronic", /* 41404 */ "FrontRange Solutions", /* 41405 */ "focom limited", /* 41406 */ "Commune de Blonay", /* 41407 */ "Strix d.o.o.", /* 41408 */ "CDJEM", /* 41409 */ "NTS Netzwerk Telekom Service AG", /* 41410 */ "ThinkSkink S.A. de C.V", /* 41411 */ "Innovative Technical Decisions LTD", /* 41412 */ "Xetawave, LLC", /* 41413 */ "Systeme-U (GIE Iris)", /* 41414 */ "Lucile Packard Children's Hospital at Stanford", /* 41415 */ "Futura Retail Solution AG", /* 41416 */ "rosemann software GmbH", /* 41417 */ "Toopher, Inc", /* 41418 */ "Schlenkermann", /* 41419 */ "Comunicación y Tecnología Araos LTDA", /* 41420 */ "Arizona Engineered Products LLC", /* 41421 */ "Vello Systems Inc.", /* 41422 */ "Horasphere Inc.", /* 41423 */ "National Computer Board", /* 41424 */ "iQsim", /* 41425 */ "Flexlab Ltd.", /* 41426 */ "Benbria", /* 41427 */ "Otter Tail Power Company", /* 41428 */ "Incoax Networks Europe AB", /* 41429 */ "New Zealand Ministry of Business, Innovation and Employment", /* 41430 */ "Tahiti Nui Arena", /* 41431 */ "Bernhard Czech", /* 41432 */ "GROWMARK, Inc.", /* 41433 */ "Rolamasao.org", /* 41434 */ "Smart Associates Limited", /* 41435 */ "Allwin Telecommunication Co., Ltd.", /* 41436 */ "Geoffroy Gramaize", /* 41437 */ "HITOTEK Co.,Ltd", /* 41438 */ "Moscow Psychological and Social University", /* 41439 */ "Stabilus GmbH", /* 41440 */ "Tohoku University", /* 41441 */ "Berger Gunkel IT Systeme GmbH", /* 41442 */ "Evotope AS", /* 41443 */ "Syslore Oy", /* 41444 */ "Broadcast Over cellular", /* 41445 */ "APEX Medicus UAB", /* 41446 */ "INGECOM", /* 41447 */ "Electronic Tolling Société Habilitée fournissant un service de Télépéage (toll service provider) Front End", /* 41448 */ "Teranga-Software", /* 41449 */ "SheepDip Project", /* 41450 */ "Candid Color Systems, Inc.", /* 41451 */ "LUISLAIN.COM", /* 41452 */ "Decura IM LLP", /* 41453 */ "Globig Consulting", /* 41454 */ "International Radio and Electronics Corporation", /* 41455 */ "Tintri Inc.", /* 41456 */ "Bauman Moscow State Technical University (BMSTU)", /* 41457 */ "Ensoft Ltd", /* 41458 */ "Cofely Zuid Nederland BV", /* 41459 */ "Bundesnotarkammer", /* 41460 */ "ELMITEL d.o.o.", /* 41461 */ "Actiontec Electronics Inc.", /* 41462 */ "Air Internet Service Co.,Ltd.", /* 41463 */ "MAXIOL Ltd.", /* 41464 */ "DiceLock Security, SL", /* 41465 */ "JAKE Pty Ltd", /* 41466 */ "Shanghai iComhome Co., Ltd.", /* 41467 */ "Zakład Ubezpieczeń Społecznych", /* 41468 */ "Lactalis Danmark", /* 41469 */ "IMAGiNA Visión Artificial S. L.", /* 41470 */ "Basware Belgium", /* 41471 */ "PKP CARGO S.A.", /* 41472 */ "Overseas Private Investment Corporation", /* 41473 */ "Pascagoula School District", /* 41474 */ "Shenzhen Tencent computer system Co., Ltd.", /* 41475 */ "LightSquared", /* 41476 */ "Computer Systems Institute", /* 41477 */ "ExtremFarm Ltd.", /* 41478 */ "Koenig & Bauer AG Werk Bielefeld", /* 41479 */ "LA DETECTION ELECTRONIQUE FRANCAISE - DEF", /* 41480 */ "MedischeGegevens.nl", /* 41481 */ "Yubico", /* 41482 */ "4Safe Advanced Solutions", /* 41483 */ "VidOvation - Moving Video Forward", /* 41484 */ "FPX, LLC", /* 41485 */ "Sargent & Lundy, L.L.C.", /* 41486 */ "Ostrovok.ru", /* 41487 */ "City of Naperville", /* 41488 */ "Hakwerk IT B.V.", /* 41489 */ "SUNGSAM CO., Ltd.", /* 41490 */ "KDDI Web Communications Inc.", /* 41491 */ "Mobtechonline", /* 41492 */ "Bangkok Pacific Steel Co., Ltd.", /* 41493 */ "Hydac Verwaltung GmbH", /* 41494 */ "Northgas", /* 41495 */ "Dedicated Network Partners", /* 41496 */ "Optimus S.A.", /* 41497 */ "SCHOTT AG", /* 41498 */ "Orgacomm international S.A.", /* 41499 */ "faboleon bonaparte", /* 41500 */ "Afghanistan Root Certification Authority (ARCA)", /* 41501 */ "Balogh SA", /* 41502 */ "St. Tammany Parish Hospital", /* 41503 */ "Les solutions Asentri inc", /* 41504 */ "ALLIANCE AVIA", /* 41505 */ "Maniilaq Association", /* 41506 */ "Cloud21", /* 41507 */ "Rest Network", /* 41508 */ "SPING", /* 41509 */ "NAS Recruitment Communications", /* 41510 */ "Municipality of Athens", /* 41511 */ "DENSAN.CO.,LTD.", /* 41512 */ "Autonomy Systems Limited", /* 41513 */ "LiHAS - Adrian Reyer", /* 41514 */ "QUADRAC Co. Ltd.", /* 41515 */ "SaitecSrl", /* 41516 */ "Eagle Electronics", /* 41517 */ "Ingram Content Group", /* 41518 */ "OpenADR Alliance", /* 41519 */ "Jakub Juszczakiewicz", /* 41520 */ "Zebsys Ltd", /* 41521 */ "www.info-x.org", /* 41522 */ "Cloudseed", /* 41523 */ "Neratec Solutions AG", /* 41524 */ "Hubject GmbH", /* 41525 */ "MJP Communications Ltd", /* 41526 */ "Paperless", /* 41527 */ "Dunder Mifflin", /* 41528 */ "Zenerji, LLC", /* 41529 */ "USIX Co., Ltd.", /* 41530 */ "Basic., INC.", /* 41531 */ "Quick2Wire Limited", /* 41532 */ "CDS Call Dispatch Scholz GmbH", /* 41533 */ "VoiceHost Ltd", /* 41534 */ "Cleo Communications US, LLC", /* 41535 */ "Vix Technology", /* 41536 */ "U.P. Joven Club de Computación y Electrónica", /* 41537 */ "DARC e.V. OV Freiburg", /* 41538 */ "RAGged Software", /* 41539 */ "Intelligent Software Solutions, Inc.", /* 41540 */ "Ardral Co.", /* 41541 */ "Monnit Corporation", /* 41542 */ "Advanced Power Laboratories", /* 41543 */ "Fish Eagle Limited", /* 41544 */ "Gravity Networks", /* 41545 */ "Innologica JSC", /* 41546 */ "MOVASIM", /* 41547 */ "Laimbock Consulting", /* 41548 */ "runtastic GmbH", /* 41549 */ "Interlogica", /* 41550 */ "Navayo Research Kft.", /* 41551 */ "Compagnie Nationale des Commissaires aux Comptes", /* 41552 */ "Spellpoint Oy", /* 41553 */ "ITX Secrurity", /* 41554 */ "ECOIT", /* 41555 */ "Fexco Merchant Services LTD", /* 41556 */ "AutoUplink Tech", /* 41557 */ "DigitalSignal", /* 41558 */ "GRUP SERHS, S.A.", /* 41559 */ "Landesforsten Rheinland-Pfalz", /* 41560 */ "Inteligo Financial Services SA", /* 41561 */ "Nexiens", /* 41562 */ "BioLink Solutions Ltd.", /* 41563 */ "Selectel LLC.", /* 41564 */ "Ministry of Taxes of the Republic of Azerbaijan", /* 41565 */ "amagical.net", /* 41566 */ "A B Gensets Inc.", /* 41567 */ "Sokuda Technologies(Beijing), Inc.", /* 41568 */ "Mobile Interactiva S.L.", /* 41569 */ "9bit, Borut Mrak s.p.", /* 41570 */ "Global Linking Solutions", /* 41571 */ "BRS Labs", /* 41572 */ "ITRun Consulting Sp. z o.o.", /* 41573 */ "UNIÃO BRASILEIRA DOS ESTUDANTES SECUNDARISTAS", /* 41574 */ "Modern Woodmen of America", /* 41575 */ "Uniao Nacional dos Estudantes", /* 41576 */ "Car Connectivity Consortium", /* 41577 */ "MAC IT Solutions", /* 41578 */ "Teraoka Seiko Co., Ltd.", /* 41579 */ "Homer Electric Association, Inc.", /* 41580 */ "RB Generalekonomik", /* 41581 */ "Maksat Tech Pvt Ltd", /* 41582 */ "ZAO NHK", /* 41583 */ "GCC Ltd.", /* 41584 */ "EILEO", /* 41585 */ "ENSTEAM Sp. z o.o. (c/o E-FISH Sp. z o.o.)", /* 41586 */ "HOLLY&Co.,Ltd.", /* 41587 */ "Shumilov Nikita Sergeevich", /* 41588 */ "Jolokia", /* 41589 */ "Wirtschaftsagentur Wien. Ein Fonds der Stadt Wien.", /* 41590 */ "Sipi srl", /* 41591 */ "Evanti", /* 41592 */ "Sard Verbinnen & Co", /* 41593 */ "LLC \"Ekb-Info\"", /* 41594 */ "Genesis Technical Systems Corp", /* 41595 */ "HornersCorners, LLC", /* 41596 */ "RFEvolution s.r.l.", /* 41597 */ "Instituto Federal Catarinense - Campus Concórdia", /* 41598 */ "University of the Philippines - Diliman", /* 41599 */ "ABDUL KHALEK STORE", /* 41600 */ "Myriad Group AG", /* 41601 */ "Links Global Services, C.A.", /* 41602 */ "SOMANSA Co., Ltd", /* 41603 */ "Monitor Electric Joint Stock Company", /* 41604 */ "Georgia's Own Credit Union", /* 41605 */ "centrotherm photovoltaics AG", /* 41606 */ "One IP", /* 41607 */ "EFP Rotenberg LLP", /* 41608 */ "Kjempekjekt AS", /* 41609 */ "Aspectra AG", /* 41610 */ "Bank Vontobel AG", /* 41611 */ "Swisscom Energy Solution AG", /* 41612 */ "Controles S.A.", /* 41613 */ "Eagleville Hospital", /* 41614 */ "Manhattan College", /* 41615 */ "Weeo Group", /* 41616 */ "Sparta Consulting", /* 41617 */ "OJSC Bank SGB", /* 41618 */ "Hospitality Alliance AG", /* 41619 */ "Eric Lakin", /* 41620 */ "Ministerio de Gobierno y Reforma del Estado", /* 41621 */ "XOR Media, Inc.", /* 41622 */ "One Tech Inc.", /* 41623 */ "Bell Aliant", /* 41624 */ "Mended Duck Computer Services", /* 41625 */ "Geller & Company LLC", /* 41626 */ "Cenwell LTD", /* 41627 */ "Learning Media Ltd", /* 41628 */ "Chakra Network Solutions Private Limited", /* 41629 */ "SENSEMATIX", /* 41630 */ "Tasneem electronics LLC", /* 41631 */ "PT.Bina Buana Raya", /* 41632 */ "Certivox Ltd.", /* 41633 */ "EDV Beratung Haag", /* 41634 */ "NBC Elettronica Group Srl", /* 41635 */ "Tolaris.com", /* 41636 */ "Talia Ltd", /* 41637 */ "Socus networks", /* 41638 */ "SVSI", /* 41639 */ "Laconisoft LLC", /* 41640 */ "Colglazier Clinic", /* 41641 */ "ThinKom Solutions, Inc.", /* 41642 */ "RCG Creations Limited", /* 41643 */ "Cinegy GmbH", /* 41644 */ "Sinogram Technology (Beijing) Co., Ltd.", /* 41645 */ "QUADROtech Solutions AG", /* 41646 */ "SpectrAp", /* 41647 */ "Shenzhen SDGI Optical Network Technologies Co,. Ltd.", /* 41648 */ "Schnoor Industrieelektronik GmbH & Co. KG", /* 41649 */ "Engisoft", /* 41650 */ "Dapesco S.A.", /* 41651 */ "IdentSign", /* 41652 */ "KCG Europe Ltd", /* 41653 */ "EAL (Apeldoorn) BV", /* 41654 */ "CardSmart Technologies", /* 41655 */ "2024Sight INC.", /* 41656 */ "Bressner Technology", /* 41657 */ "United Business Media", /* 41658 */ "Datasat Technologies Ltd", /* 41659 */ "SciVisum Ltd", /* 41660 */ "SEKAS GmbH", /* 41661 */ "Capio S:t Görans Sjukhus AB", /* 41662 */ "Philippe Bonatti", /* 41663 */ "Costaneira - Arno Johann S/A Comércio de Material de Construção", /* 41664 */ "George Flemming LLC", /* 41665 */ "Government of Yukon", /* 41666 */ "Park Bench Software", /* 41667 */ "The Evergreen State College", /* 41668 */ "Spiros Iliadis", /* 41669 */ "AddOn Holding Gmbh", /* 41670 */ "Atelier WW Architekten SIA AG", /* 41671 */ "TECMASUR CIA. LTDA.", /* 41672 */ "Lapsum", /* 41673 */ "WAS.ch GmbH", /* 41674 */ "ArmOwl LAB (Roman V. Kosinskiy)", /* 41675 */ "Gordon Broom", /* 41676 */ "Nicholas Brown", /* 41677 */ "SIBOAVANCE", /* 41678 */ "OVNETAP", /* 41679 */ "Media Netwerk AS", /* 41680 */ "Chudyk Cloud Services", /* 41681 */ "ASSEMBLY Organizing Oy", /* 41682 */ "Nebula Media Solutions Ltd.", /* 41683 */ "Pyzuka", /* 41684 */ "nfotex Informationstechnologie Dienstleistungs GmbH", /* 41685 */ "Uzin Utz AG", /* 41686 */ "Cold Crossing", /* 41687 */ "EOS Sistemi s.r.l.", /* 41688 */ "Thüga Aktiengesellschaft", /* 41689 */ "Dension Audio Systems", /* 41690 */ "Horizon Forest Products, LLP", /* 41691 */ "Renee Marie Jones", /* 41692 */ "Nyingma Association of Mangalam Organizations - Communications And Network Infrastructure", /* 41693 */ "Christians Against Poverty", /* 41694 */ "Translational Centre for Regenerative Medicine (TRM)", /* 41695 */ "Actia Systems España SAU", /* 41696 */ "European Central Bank", /* 41697 */ "Lucas-Consulting", /* 41698 */ "LGS Innovations", /* 41699 */ "eyeReturn Marketing Inc.", /* 41700 */ "Jarvis Ford", /* 41701 */ "Levart Distribution Systems Pty. Ltd.", /* 41702 */ "ATM-12", /* 41703 */ "Neoflow. Co., Ltd.", /* 41704 */ "Institutul de Dezvoltare a Societatii Informationale", /* 41705 */ "Trollhattan Stad IT", /* 41706 */ "Solbox Inc.", /* 41707 */ "Superior Access Solutions, Inc.", /* 41708 */ "EAP Technologies, Inc.", /* 41709 */ "ATES Networks", /* 41710 */ "Dossia", /* 41711 */ "ISTHARI", /* 41712 */ "Melet.com", /* 41713 */ "Azuki Systems, Inc.", /* 41714 */ "Universal Cinema Services Co., Ltd.", /* 41715 */ "Rational Retention, LLC", /* 41716 */ "Blekinge Institute of Technology", /* 41717 */ "Ouroboros", /* 41718 */ "Qosmotec GmbH", /* 41719 */ "Saisei Networks Inc", /* 41720 */ "International Communications Corporation INC", /* 41721 */ "Information Networks Ltd.", /* 41722 */ "XGEN - Web Business", /* 41723 */ "Chengdu SKSpruce Technology Inc.", /* 41724 */ "Tere.com Networks OÜ", /* 41725 */ "Dr. Sulaiman Al Habib Medical Group", /* 41726 */ "Sabatier Geolocalisation", /* 41727 */ "athenahealth, Inc.", /* 41728 */ "United Equitable Group, Ltd.", /* 41729 */ "Arab States Research and Education Network, GmbH", /* 41730 */ "Prodware Deutschland AG", /* 41731 */ "Mathias Haimerl 3S", /* 41732 */ "Parallel Wireless", /* 41733 */ "V10 Networks", /* 41734 */ "Teletech Pty. Ltd.", /* 41735 */ "Beatrice Wireko IT", /* 41736 */ "Bryan Health", /* 41737 */ "Algo Communication Products Ltd.", /* 41738 */ "Five9, Inc.", /* 41739 */ "TheGunns.net", /* 41740 */ "Ittim Technology Co.Ltd", /* 41741 */ "IMEC", /* 41742 */ "eKing Technology Co., Ltd.", /* 41743 */ "Z3 Technology", /* 41744 */ "FrozenWarrior.com", /* 41745 */ "Chengdu Kingtype Digital TV Equipment Co., Ltd.", /* 41746 */ "Oliver Solutions", /* 41747 */ "CensorNet Ltd", /* 41748 */ "Owens State Community College", /* 41749 */ "Head Department for Statistics and Information Technologies of State Customs Committee", /* 41750 */ "ROBIN'S", /* 41751 */ "ZAO \"NPK Rotek\"", /* 41752 */ "Greg Waterhouse", /* 41753 */ "Daniel Sage", /* 41754 */ "Lastline, Inc.", /* 41755 */ "REVCORD - Revolutionizing Voice Recording", /* 41756 */ "Prism Systems, Inc.", /* 41757 */ "Axham Corporation", /* 41758 */ "Open Computing Facility", /* 41759 */ "TibetSystem Co.,Ltd.", /* 41760 */ "Atea Sverige AB", /* 41761 */ "Mayak LTD", /* 41762 */ "JSC «BystroBank»", /* 41763 */ "ETAT DE FRIBOURG", /* 41764 */ "Troyer AG", /* 41765 */ "Flow-Data, Inc", /* 41766 */ "IDSS AB", /* 41767 */ "Beijing Telesound Electronics Co., Ltd.", /* 41768 */ "IS4IT GmbH", /* 41769 */ "Ascendi", /* 41770 */ "Fundamental Games", /* 41771 */ "Auth-servers", /* 41772 */ "TelVue Corporation", /* 41773 */ "Health Research, Inc.", /* 41774 */ "Global Solutions Tecnologia da Informação LTDA", /* 41775 */ "IACIT Soluções Tecnológicas LTDA", /* 41776 */ "GSE Environmental, LLC", /* 41777 */ "Lake Avenue Congregational Church of Pasadena", /* 41778 */ "QualityLogic Inc.", /* 41779 */ "Telesphere Networks Ltd", /* 41780 */ "Digby Wells Environmental", /* 41781 */ "Pacific Design Enginering", /* 41782 */ "Geolink Satellite Services", /* 41783 */ "ifbyphone, Inc.", /* 41784 */ "Mary Washington Healthcare", /* 41785 */ "Ryu project", /* 41786 */ "HyperMatrix Solutions Ltd.", /* 41787 */ "kuederli.net", /* 41788 */ "AlTaysir for Information Systems Security Consulting LLC", /* 41789 */ "I-CONCEPT", /* 41790 */ "eSPe", /* 41791 */ "Alrayyan for media and marketing co", /* 41792 */ "North East Independent School District", /* 41793 */ "High Point PC Solutions", /* 41794 */ "Net Consulting UK Ltd", /* 41795 */ "EleSy", /* 41796 */ "STC Systema", /* 41797 */ "astozi", /* 41798 */ "William Hill", /* 41799 */ "GaHIN (Georgia Health Information Network)", /* 41800 */ "Prattville Water Works Board", /* 41801 */ "Talkpath LLC", /* 41802 */ "On Center Software, Inc.", /* 41803 */ "Austrian Federal Ministry of Science and Research", /* 41804 */ "Guidance Solutions, Inc.", /* 41805 */ "Viastorage", /* 41806 */ "GuiZhou BC&TV Information Network Co.,LTD", /* 41807 */ "Administration of Municipal Formation of the City-Hero of Novorossiysk", /* 41808 */ "Dismuntel S.A.L.", /* 41809 */ "Credit Agricole Bank, PJSC", /* 41810 */ "Spital Männedorf AG", /* 41811 */ "Rouis Labs", /* 41812 */ "Anhui comhigher tech co.,ltd", /* 41813 */ "Hubei University Of Automotive Technology", /* 41814 */ "Fraunhofer-Institut fuer Software- und Systemtechnik ISST", /* 41815 */ "Blissful Living Foundation", /* 41816 */ "Cooper Gitiesse", /* 41817 */ "Quotient, Inc.", /* 41818 */ "IPNetwork", /* 41819 */ "Kanton Basel-Landschaft", /* 41820 */ "Frantovo.cz", /* 41821 */ "Project FiFo", /* 41822 */ "Miaozhen Systems", /* 41823 */ "Université Gaston Berger", /* 41824 */ "Agilord Ltd.", /* 41825 */ "Prognus Soluções Livres em TI", /* 41826 */ "Novantum BV", /* 41827 */ "NySoft Argentina SRL", /* 41828 */ "MEDDATA", /* 41829 */ "PicoCELA Inc.", /* 41830 */ "Bitbase AS", /* 41831 */ "Private Entrepreneur Kutsevol Maxym", /* 41832 */ "Paree BV - Elektro Telecom", /* 41833 */ "BRAM Technologies", /* 41834 */ "JDL Digital Systems Inc.", /* 41835 */ "bct electronic GesmbH", /* 41836 */ "Evan-Moor Corp", /* 41837 */ "Dynamic Network Services Inc.", /* 41838 */ "Prism-IPX Systems, LLC", /* 41839 */ "University of the Philippines Manila", /* 41840 */ "Zhuhai Bluemax Broadband Electronic Co.,Ltd", /* 41841 */ "Novosibirsk State University", /* 41842 */ "Uni-Film-Club Dortmund", /* 41843 */ "PERF-IT B.V.", /* 41844 */ "Bitcarrier S.L.", /* 41845 */ "Chinasoft International Co., Ltd.", /* 41846 */ "EDALab s.r.l.", /* 41847 */ "TOVEK", /* 41848 */ "CIDON", /* 41849 */ "DaySequerra Corporation", /* 41850 */ "zeb/rolfes.schierenbeck.associates gmbh", /* 41851 */ "Peregrine Capital Management", /* 41852 */ "RAMI", /* 41853 */ "W.J. Bradley", /* 41854 */ "Logol", /* 41855 */ "Grand Valley State University", /* 41856 */ "AGENCE NATIONALE DES INFRASTRUCTURES NUMERIQUES ET DES FREQUENCES", /* 41857 */ "The Trade Desk, Inc.", /* 41858 */ "Hidden Design Kft.", /* 41859 */ "Oryon TI", /* 41860 */ "Tucker Ellis LLP", /* 41861 */ "Metawell", /* 41862 */ "Mongoose GFX", /* 41863 */ "EyeKor LLC.", /* 41864 */ "Monitor Business Machines Ltd", /* 41865 */ "Hitachi-LG Data Storage, Inc.", /* 41866 */ "yinyuetai", /* 41867 */ "elecom co., ltd.", /* 41868 */ "Selex Gematronik GmbH", /* 41869 */ "Notartel S.p.A", /* 41870 */ "Sonifex Ltd", /* 41871 */ "Masdar PV GmbH", /* 41872 */ "Institut Superieur d'Electronique de Paris (ISEP)", /* 41873 */ "LLC \"ANTE-MEDIAM\"", /* 41874 */ "Esselte IPR AB", /* 41875 */ "FOXCOMM NETWORKS", /* 41876 */ "Orban", /* 41877 */ "Tobias & Tobias", /* 41878 */ "Mind Labs", /* 41879 */ "MIcrotel Innovation S.r.l.", /* 41880 */ "Korbitec (Pty) Ltd.", /* 41881 */ "KLU Consulting / Kōkua Lolo Uila", /* 41882 */ "Trojan Technologies", /* 41883 */ "Katherine Shaw Bethea Hospital", /* 41884 */ "NDsoftware", /* 41885 */ "Beijing Sapling Technology Co.,Ltd", /* 41886 */ "ENSCO, Inc.", /* 41887 */ "URZ Friedrich-Schiller-Universität Jena", /* 41888 */ "Nine Internet Solutions AG", /* 41889 */ "Cuyahoga Community College District", /* 41890 */ "Holland LP", /* 41891 */ "BIFIT Service", /* 41892 */ "DBM S.r.l.", /* 41893 */ "Logistica Integral", /* 41894 */ "Alliance Data", /* 41895 */ "Alberta Electric System Operator", /* 41896 */ "Inovar", /* 41897 */ "Australian Nuclear Science Technology Organization", /* 41898 */ "YU JYA TECHNOLOGY CO., LTD.", /* 41899 */ "Ministry of Interior, Bulgaria", /* 41900 */ "CSG SCIENCE&TECHNOLOGY CO., LTD.HEFEI", /* 41901 */ "Gemeindeverwaltung Landquart", /* 41902 */ "ETL Solutions Ltd.", /* 41903 */ "Impala Editores, SA", /* 41904 */ "Great-West Life", /* 41905 */ "VeriSign, Inc.", /* 41906 */ "LoudCell Technologies Pvt Ltd.", /* 41907 */ "HanKeInfo", /* 41908 */ "AventuraHQ, Inc", /* 41909 */ "Zentyal", /* 41910 */ "Great Plains Manufacturing, Inc.", /* 41911 */ "International Electrotechnical Commission", /* 41912 */ "Tecsys do Brasil Industrial Ltda", /* 41913 */ "Bradford Robotic Telescope", /* 41914 */ "Southwestern Energy Co.", /* 41915 */ "vIPtela Inc.", /* 41916 */ "Leica Geosystems AG", /* 41917 */ "CIT Telecom-Service JSC", /* 41918 */ "Ugobame Uchibeke", /* 41919 */ "Shenzhen Integrated Electronic Systerms Lab Co.,Ltd.", /* 41920 */ "Beijing Infomedia Electronic Technology Co., Ltd", /* 41921 */ "GuangDong Super Telecom Co,Ltd.", /* 41922 */ "Patrick Sczepanski", /* 41923 */ "Digital Value SL", /* 41924 */ "Nufarm Limited", /* 41925 */ "Finecom Telecommunications AG", /* 41926 */ "FORO-tele", /* 41927 */ "Muir Matheson Ltd", /* 41928 */ "Jung, DMS & Cie. AG", /* 41929 */ "Nautronix Limited", /* 41930 */ "CMC Electronics", /* 41931 */ "HSC Brasil", /* 41932 */ "Aligera", /* 41933 */ "NKI AS", /* 41934 */ "Indian River County Sheriff", /* 41935 */ "Marway Power Solutions", /* 41936 */ "Escola Agricola de Jundiai - EAJ/UFRN", /* 41937 */ "INCEPTRUM Technologies Inc.", /* 41938 */ "Tralix México S. de R.L. de C.V.", /* 41939 */ "Bradbury School", /* 41940 */ "StuStaNet e. V.", /* 41941 */ "Lettergen", /* 41942 */ "Bartec GmbH", /* 41943 */ "Virginia Department of Behavioral Health and Developmental Services", /* 41944 */ "Institution Solutions", /* 41945 */ "The Information Architecture Institute", /* 41946 */ "Unidem Sales Inc", /* 41947 */ "Job Snijders", /* 41948 */ "Danmagi", /* 41949 */ "DTI Solutions", /* 41950 */ "Quarles & Brady, LLP", /* 41951 */ "Asad Ahmed", /* 41952 */ "JSC \"ESC of EVRAAS\"", /* 41953 */ "Polewall Norge AS", /* 41954 */ "Jansen AG", /* 41955 */ "Fellig e.V.", /* 41956 */ "Olfeo", /* 41957 */ "Prime Rate Ltd.", /* 41958 */ "Earlham College", /* 41959 */ "easygo", /* 41960 */ "IntraCom Systems, LLC", /* 41961 */ "3ZTelecom Inc.", /* 41962 */ "WebAmphibian.Com", /* 41963 */ "Ozona Consulting, S.L.", /* 41964 */ "Mano Namai UK", /* 41965 */ "Applied Card Technologies Ltd.", /* 41966 */ "Pivot Point Security", /* 41967 */ "EPCOTS", /* 41968 */ "Enero Solutions, inc.", /* 41969 */ "Orion Networks International, Inc.", /* 41970 */ "Touch Tecnologia e Informática LTDA", /* 41971 */ "Poznan University of Life Sciences", /* 41972 */ "Generation Tech", /* 41973 */ "Auf nach Mallorca GmbH", /* 41974 */ "ALNET ELEKTROMEKANIK LTD", /* 41975 */ "Turvasana Tmi", /* 41976 */ "Oakland County, Michigan", /* 41977 */ "BEIJING DING QING TECHNOLOGY LTD.", /* 41978 */ "Mitsubishi Electric TOKKI Systems Corporation", /* 41979 */ "Neo-Renaissance Studios", /* 41980 */ "AerVox", /* 41981 */ "zetVisions AG", /* 41982 */ "Vorboss Limited", /* 41983 */ "meterriblecrew.net", /* 41984 */ "Desvaux Labs", /* 41985 */ "deepearth.co.uk", /* 41986 */ "BMO Capital Markets", /* 41987 */ "Van Wert County Hospital", /* 41988 */ "Alphatron Security Systems", /* 41989 */ "Pelagicore AG", /* 41990 */ "Super-Visions", /* 41991 */ "HOPPE Holding AG", /* 41992 */ "Redactia", /* 41993 */ "Jonas Kopp Systems Trust Network", /* 41994 */ "SIA-CE", /* 41995 */ "COM-TECH Italia S.p.A.", /* 41996 */ "Silversky Inc.", /* 41997 */ "Bumicom Telecommunicatie B.V.", /* 41998 */ "e2x Ltd.", /* 41999 */ "National Mineral Resource University", /* 42000 */ "TechDivision GmbH", /* 42001 */ "Hurrikane Systems", /* 42002 */ "Akron Public Schools", /* 42003 */ "Gertec", /* 42004 */ "NHST MEDIA GROUP AS", /* 42005 */ "netis korea", /* 42006 */ "nikolakoco", /* 42007 */ "BumeBox, Inc.", /* 42008 */ "Riava Networks Inc.", /* 42009 */ "Luxul Corporation", /* 42010 */ "ISAAC Software Solutions B.V.", /* 42011 */ "Mangold Technologies", /* 42012 */ "Registro General de la Propiedad de Guatemala", /* 42013 */ "Francois Trahan", /* 42014 */ "Weilhammer Networks", /* 42015 */ "Kingman Regional Medical Center", /* 42016 */ "MailMak ApS", /* 42017 */ "numo labs Pty. Ltd.", /* 42018 */ "Fort-Telecom", /* 42019 */ "Piter Gaz JSC.", /* 42020 */ "VoiceCom SA", /* 42021 */ "ITUS JAPAN Co.,Ltd.", /* 42022 */ "Thetus Corporation", /* 42023 */ "Cibertec Internacional", /* 42024 */ "Koji Komatsuzaki", /* 42025 */ "TSTREAM CO.,LTD.", /* 42026 */ "Sanctum Networks (P) Ltd.", /* 42027 */ "Arnel limited", /* 42028 */ "Amigo Software", /* 42029 */ "Ghost Software", /* 42030 */ "42", /* 42031 */ "swisspartners Investment Network AG", /* 42032 */ "IslaLink", /* 42033 */ "Intemo Technologies", /* 42034 */ "Zedge", /* 42035 */ "LOYTEC electronics GmbH", /* 42036 */ "Stadt Augsburg", /* 42037 */ "Sanquin Bloedvoorziening", /* 42038 */ "Laboratoire Jacques Louis Lions", /* 42039 */ "Nasuni Corporation", /* 42040 */ "Vänerhamn AB", /* 42041 */ "Inca Telecom S.A.C.", /* 42042 */ "DingLi Communications Corp., Ltd.", /* 42043 */ "GMQ Consulting AB", /* 42044 */ "Logical Tools s.r.l.", /* 42045 */ "DigitalSign - Certificação Digital Ltda", /* 42046 */ "twis.la (Clement Martin)", /* 42047 */ "Circle of Life Hospice", /* 42048 */ "Achkey Ltd", /* 42049 */ "China Security & Surveillance Technology,Inc.", /* 42050 */ "Skyward Information System Co.,LTD.", /* 42051 */ "vitapublic GmbH", /* 42052 */ "MEDvision360", /* 42053 */ "Stadler Bussnang AG", /* 42054 */ "West Lothian Council", /* 42055 */ "MultiToll Solutions SAS", /* 42056 */ "cegedim", /* 42057 */ "Lomnido, s.r.o.", /* 42058 */ "MED2020 Health Care Software Inc.", /* 42059 */ "Egon Braun", /* 42060 */ "SquareTwo Financial", /* 42061 */ "CyberTransJapan Co., Ltd.", /* 42062 */ "Guidoon SAS", /* 42063 */ "Royse City ISD", /* 42064 */ "Iberia", /* 42065 */ "dbSpectra", /* 42066 */ "Bayerische Staatsforsten AoeR", /* 42067 */ "UBM Drecker GmbH", /* 42068 */ "The Comptroller General’s Department", /* 42069 */ "German Aerospace Center; Institute of Communications and Navigation", /* 42070 */ "Sprecher Automation GmbH", /* 42071 */ "Homes and Communities Agency", /* 42072 */ "DatASE", /* 42073 */ "Deltenna Limited", /* 42074 */ "BAFO Technologies Corp", /* 42075 */ "saltation GmbH & Co. KG", /* 42076 */ "sRatio", /* 42077 */ "Recursoft.org", /* 42078 */ "Army Emergency Relief", /* 42079 */ "Dajar", /* 42080 */ "TravailPrive", /* 42081 */ "Travis Perkins PLC", /* 42082 */ "JS Networking Lab", /* 42083 */ "Mike Mackintosh", /* 42084 */ "Prolateral Consulting Ltd", /* 42085 */ "Vossloh Cogifer", /* 42086 */ "Business Insurance Direct", /* 42087 */ "Legal & General Nederland", /* 42088 */ "Rambler Internet Holding LLC", /* 42089 */ "Aleat shpk", /* 42090 */ "Tritech International Limited", /* 42091 */ "Serttel LTDA", /* 42092 */ "Expand", /* 42093 */ "Bfabric.org", /* 42094 */ "NII SOKB Ltd", /* 42095 */ "IQnet Ltd", /* 42096 */ "IT2u Czech s.r.o.", /* 42097 */ "Fahrzeugsystemdaten GmbH", /* 42098 */ "Smart Green Labs S.L.", /* 42099 */ "DV Industrial Computer Ltd.", /* 42100 */ "iTEL", /* 42101 */ "Communications Audit UK Ltd", /* 42102 */ "hmcw gmbh", /* 42103 */ "wi2be Tecnologia S/A", /* 42104 */ "WebControl", /* 42105 */ "'MIGHTY APPARATUS FOR RADIOBRODCASTING AND TV\" Joint-Stock Company", /* 42106 */ "South Carolina Department of Revenue", /* 42107 */ "HRSoftworks", /* 42108 */ "Linux Based Systems Design, Ltd", /* 42109 */ "API Digital Communications Group, LLC", /* 42110 */ "Inovonics, Inc.", /* 42111 */ "Kakapo Technologies Ltd.", /* 42112 */ "STAsoft.net", /* 42113 */ "Finnish Institute of Occupational Health", /* 42114 */ "CommerceWest Bank", /* 42115 */ "AIG", /* 42116 */ "Oman Telecommunications Company (S.A.O.G)", /* 42117 */ "IDentAcc", /* 42118 */ "TRACT cjsc", /* 42119 */ "Multimatic Inc.", /* 42120 */ "Michigan Public Health Institute", /* 42121 */ "Yurur", /* 42122 */ "Shanghai Xinyou Information Technology Co., Ltd.", /* 42123 */ "YN-IT", /* 42124 */ "CK Engineering Ltd", /* 42125 */ "NOVARCHIVE", /* 42126 */ "SYMCOM INC", /* 42127 */ "KUL Elektronik Teknolojileri Ltd.", /* 42128 */ "Continental Graphics Corp", /* 42129 */ "Skylink Technology Inc.", /* 42130 */ "Westmont College", /* 42131 */ "Applied Security GmbH", /* 42132 */ "GoS Networks Ltd.", /* 42133 */ "ScaleArc", /* 42134 */ "TRUSTe", /* 42135 */ "Ultra Electronics Airport Systems", /* 42136 */ "Unipagos S. de R.L. de C.V.", /* 42137 */ "Virtualmaster, s.r.o.", /* 42138 */ "Internet Corporation for Assigned Names and Numbers", /* 42139 */ "Bitfabrik GmbH & Co. KG", /* 42140 */ "Laboratoire d'Informatique Paris Nord", /* 42141 */ "The Faculty of Advocates", /* 42142 */ "Moose Beast Software", /* 42143 */ "cycos AG", /* 42144 */ "PRIME Apparatus", /* 42145 */ "EntobilSoft, Inc.", /* 42146 */ "Pepperl+Fuchs GmbH", /* 42147 */ "The Geneva Foundation", /* 42148 */ "Cloud Life Software, LLC", /* 42149 */ "AffiniInternational B.V.", /* 42150 */ "Net Business Pty Ltd", /* 42151 */ "Itransition", /* 42152 */ "Chuden CTI Co.,Ltd.", /* 42153 */ "oak3 GmbH", /* 42154 */ "Evolution Racingteam Saar", /* 42155 */ "NeoLab-Systems S.A.R.L.", /* 42156 */ "CERTIFIRMA, SOCIEDAD ANONIMA", /* 42157 */ "NetAgent Co., Ltd.", /* 42158 */ "AT-Biotech Traceability Information Systems, S.L.U.", /* 42159 */ "Iverdahl Systems", /* 42160 */ "GIE AGIRC-ARRCO", /* 42161 */ "NAKAYO ELECTRONICS CO.,LTD", /* 42162 */ "EBS Service Company Limited", /* 42163 */ "Ministério Público do RS", /* 42164 */ "Pi-Coral Inc.", /* 42165 */ "Saint Josephs Hospital, Yonkers", /* 42166 */ "Data Tote", /* 42167 */ "blackchair Ltd", /* 42168 */ "The Coca-Cola Company", /* 42169 */ "Tiger Computing Ltd.", /* 42170 */ "Gravitate", /* 42171 */ "Strencom", /* 42172 */ "Adiczion SARL", /* 42173 */ "ThiemoNet", /* 42174 */ "REFER Telecom, S.A.", /* 42175 */ "eBernd", /* 42176 */ "Anuta Networks, Inc.", /* 42177 */ "Nym Networks", /* 42178 */ "Sonora Quest Laboratories", /* 42179 */ "Kantonsspital Winterthur", /* 42180 */ "Wavecom - Soluções Rádio S.A.", /* 42181 */ "Speed and Function", /* 42182 */ "Digitus Biometrics", /* 42183 */ "ECG Management Consultants, Inc.", /* 42184 */ "DEMTECH", /* 42185 */ "National Cement Company, Inc.", /* 42186 */ "Podomatic, Inc", /* 42187 */ "MATRIXGROUP (CMS) PTY LTD", /* 42188 */ "JRTwine Software, LLC", /* 42189 */ "Genowise", /* 42190 */ "TotalServe Pty Ltd", /* 42191 */ "IDF Connect, Inc.", /* 42192 */ "Alpha Networks S.A.", /* 42193 */ "Matthews Midrange Consulting, Inc.", /* 42194 */ "Tektorque, Lda", /* 42195 */ "Cauldron Development LLC", /* 42196 */ "Coffee Bean Software Pty Ltd", /* 42197 */ "IO-Power Technology Co., Ltd.", /* 42198 */ "Foothills Rural Telephone Cooperative Corporation Inc.", /* 42199 */ "Ecil Informática Indústria e Comercio LTDA", /* 42200 */ "Schenker, Inc.", /* 42201 */ "FreeTel, s.r.o.", /* 42202 */ "TRAÇOTOPÁZIO - INFORMÁTICA UNIPESSOAL LDA", /* 42203 */ "Kumoya Network", /* 42204 */ "Dooks Computer Services Ltd.", /* 42205 */ "Proelse", /* 42206 */ "Commission Scolaire de la Pointe-de-l'Ile", /* 42207 */ "itecPlus GmbH", /* 42208 */ "CharlesRead Dot Com", /* 42209 */ "Beenius d.o.o.", /* 42210 */ "SHENZHEN HUAXUNARK TECHNOLOGY Co. Ltd.", /* 42211 */ "CareCenter Software GmbH", /* 42212 */ "troydenton.ca", /* 42213 */ "Kaplan Bilisim Teknolojileri Yazilim ve Ticaret Ltd.", /* 42214 */ "Alerant Inc.", /* 42215 */ "BlueCorner", /* 42216 */ "Khoo Software Solutions", /* 42217 */ "ValleyCare Health System", /* 42218 */ "UniCredit Luxembourg S.A.", /* 42219 */ "TELEDATA IT-Lösungen GmbH", /* 42220 */ "Syl Research Limited", /* 42221 */ "Integrated Systems Technology, Inc.", /* 42222 */ "Archive Analytics Ltd", /* 42223 */ "Fraunhofer Portugal Research Center for Assistive Information and Communication Solutions (Fraunhofer AICOS)", /* 42224 */ "Amco Marketing", /* 42225 */ "Evolve Media LLC", /* 42226 */ "Max-Planck-Institut fuer Mikrostrukturphysik", /* 42227 */ "Center Group", /* 42228 */ "Coriant R&D GmbH", /* 42229 */ "HiProCall GmbH", /* 42230 */ "AlfaTrein Ltd", /* 42231 */ "Fanzz", /* 42232 */ "Sigma Designs Inc.", /* 42233 */ "Knotice, Ltd.", /* 42234 */ "Tresorit Kft.", /* 42235 */ "RDT Ltd", /* 42236 */ "Texas A&M University-Central Texas", /* 42237 */ "Grenville Mutual Insurance Company", /* 42238 */ "Aspira Networks, Inc", /* 42239 */ "Keyano College", /* 42240 */ "Geoquip Worldwide", /* 42241 */ "znets", /* 42242 */ "DLA Piper LLP (US)", /* 42243 */ "ITS Express, Inc.", /* 42244 */ "Tagged, Inc.", /* 42245 */ "OnePIN, Inc.", /* 42246 */ "Aleph01", /* 42247 */ "SAIV", /* 42248 */ "Claritech SRL", /* 42249 */ "HFC Technics Ltd.", /* 42250 */ "FutureTek, Inc.", /* 42251 */ "Pflegeheim Alexander Beer GmbH & Co KG", /* 42252 */ "Zalando GmbH", /* 42253 */ "Inline Telecom Solutions", /* 42254 */ "The All England Lawn Tennis Club (Championships) Limited", /* 42255 */ "McGuireWoods LLP", /* 42256 */ "Cambridge Major Laboratories, Inc.", /* 42257 */ "ooblick.com", /* 42258 */ "Green Energy Options Ltd", /* 42259 */ "Bent Vector", /* 42260 */ "Sayegh & John e-Trolley GbR", /* 42261 */ "TechRede, LLC", /* 42262 */ "Servas", /* 42263 */ "Fabien Debuire", /* 42264 */ "Thunder Software Technology Co., Ltd.", /* 42265 */ "Otto (GmbH & Co KG)", /* 42266 */ "SARL Mixcom", /* 42267 */ "MEWA Textil-Service AG & Co. Management OHG", /* 42268 */ "Rigspolitiet (Danish National Police)", /* 42269 */ "Azienda Unita' Sanitaria Locale di Parma", /* 42270 */ "Fixious Global Indonesia", /* 42271 */ "Howard University Hospital", /* 42272 */ "AMPER", /* 42273 */ "Nexusguard Limited", /* 42274 */ "Advanced MR Analytics AB", /* 42275 */ "Infragear Inc", /* 42276 */ "CSW.IO", /* 42277 */ "Precitel SA", /* 42278 */ "SensMaster S/B", /* 42279 */ "SatExpander", /* 42280 */ "InfoBridge Solutions", /* 42281 */ "Pragmatix Services Private Limited", /* 42282 */ "Berwick Area School District", /* 42283 */ "Kai van Es", /* 42284 */ "FCS Computer Systems Sdn Bhd", /* 42285 */ "Connectem Inc.", /* 42286 */ "UAP inc.", /* 42287 */ "Sportech Inc.", /* 42288 */ "NetTech Associates LLC", /* 42289 */ "LLC Sysvisor", /* 42290 */ "DWANGO MOBILE Co., Ltd.", /* 42291 */ "SL Audio A/S", /* 42292 */ "North-West Customs-Logistical Service Co. Ltd.", /* 42293 */ "S. & A.S. Ltd.", /* 42294 */ "imzadi.de Network", /* 42295 */ "Impero Solutions Ltd", /* 42296 */ "Fraunhofer-Institut fuer Kommunikation, Informationsverarbeitung und Ergonomie FKIE", /* 42297 */ "Smoothwall Ltd", /* 42298 */ "Johnson Financial Group", /* 42299 */ "Ministère de la santé et des serveurs sociaux", /* 42300 */ "turleyclan.com", /* 42301 */ "Beijing ForEase Times Technology Co., Ltd.", /* 42302 */ "TE-SYSTEMS GmbH", /* 42303 */ "it & synergy GmbH", /* 42304 */ "Lupus alpha Asset Management", /* 42305 */ "CANARIE Inc.", /* 42306 */ "Wildcard UK Ltd", /* 42307 */ "IndexUniverse, LLC", /* 42308 */ "Skale, Inc.", /* 42309 */ "Matrix Switch Corporation", /* 42310 */ "X-Centric Solutions", /* 42311 */ "Hangzhou Zailing Electronic Technology Co., LTD", /* 42312 */ "Synergy Tecnologia", /* 42313 */ "D2D Technologies, LLC", /* 42314 */ "Mobisante, INC", /* 42315 */ "Pragmatech", /* 42316 */ "inVentia", /* 42317 */ "Recognition Technologies, Ltd", /* 42318 */ "777 Technology Solutions Limited", /* 42319 */ "Unassigned", /* 42320 */ "Mother Lode Holding Company", /* 42321 */ "TrakSystems", /* 42322 */ "Demma", /* 42323 */ "Powercode LLC", /* 42324 */ "Dialight, Inc.", /* 42325 */ "ICON Americas", /* 42326 */ "IEEE Student Branch Passau", /* 42327 */ "Nementis", /* 42328 */ "ipowertec", /* 42329 */ "Deltapath Commerce And Technology Limited", /* 42330 */ "Polarlink", /* 42331 */ "Vaillant Group", /* 42332 */ "Aliter Technologies, a.s.", /* 42333 */ "Relmek co., Ltd", /* 42334 */ "iQ Consult Pty Ltd", /* 42335 */ "ADITO Software GmbH", /* 42336 */ "New York State Workers' Compensation Board", /* 42337 */ "Anywhere.24 Technologies GmbH", /* 42338 */ "Sabtech", /* 42339 */ "Open Standard Digital-IF Interface", /* 42340 */ "Tucson Airport Authority", /* 42341 */ "Guangdong Cable Corporation Limited", /* 42342 */ "James Hurley", /* 42343 */ "Puli Space Technologies Ltd.", /* 42344 */ "Fluidic, Inc., d/b/a Fluidic Energy", /* 42345 */ "E-SIGN S.A.", /* 42346 */ "Toyou Feiji Electronics Co., Ltd.", /* 42347 */ "RUSNANO", /* 42348 */ "Noack Group", /* 42349 */ "Trebing & Himstedt Prozessautomation GmbH & Co. KG", /* 42350 */ "Champs Libres SCRLFS", /* 42351 */ "Hanweck Associates LLC", /* 42352 */ "LottSpot", /* 42353 */ "Trackprotect B.V.", /* 42354 */ "ABCTec", /* 42355 */ "Electronic Media Services Ltd", /* 42356 */ "CHILLI MINT LABS LIMITED", /* 42357 */ "IP2I", /* 42358 */ "Versa Networks, Inc", /* 42359 */ "Skybox Imaging, Inc.", /* 42360 */ "rahont", /* 42361 */ "spacefrogg.net", /* 42362 */ "Dematis", /* 42363 */ "Optoscape Optical Electronic Tech.Co.,Ltd", /* 42364 */ "H & M Hennes & Mauritz AB", /* 42365 */ "WxBR Wireless Broadband Soluctions", /* 42366 */ "Gedomo GmbH", /* 42367 */ "Azuru Networks", /* 42368 */ "Softel ltd", /* 42369 */ "ADRIATIC SLOVENICA d.d.", /* 42370 */ "PA CSS (Pennsylvania eHealth Partnership Authority’s Community Shared Services)", /* 42371 */ "Banterra", /* 42372 */ "Kliniken des MTK GmbH", /* 42373 */ "Inmar Enterprises", /* 42374 */ "Unassigned", /* 42375 */ "Riverbed Technology Labs GmbH", /* 42376 */ "MBD Consulting, LLC", /* 42377 */ "FOSS-Group GmbH", /* 42378 */ "Danske Fragtmænd A/S", /* 42379 */ "IDFocus", /* 42380 */ "Human Brain Project", /* 42381 */ "iSystems e.U.", /* 42382 */ "Horizon Fuel Cell Technologies", /* 42383 */ "Tecnologías Inteligentes y Modelación de Sistemas, S.A de C.V.", /* 42384 */ "AIC Inc.", /* 42385 */ "dylanharris.org", /* 42386 */ "CompuTEK Industries", /* 42387 */ "TEL-STER sp. z o.o.", /* 42388 */ "Ital-Mec s.r.l.", /* 42389 */ "Oslo KFUMs Sjøkorps", /* 42390 */ "Eastern Informatics, Inc.", /* 42391 */ "FOXTER Cia Imobiliária", /* 42392 */ "Teledata Comunicaciones S.A.", /* 42393 */ "Synapse", /* 42394 */ "EPM", /* 42395 */ "xsinfosol pvt ltd", /* 42396 */ "Grandstream Networks, Inc.", /* 42397 */ "KnCMiner AB", /* 42398 */ "Garuda Permata Saputra, CV.", /* 42399 */ "TD Tech Ltd.", /* 42400 */ "CanTech s.r.o.", /* 42401 */ "Spec S.A.", /* 42402 */ "Ivane Javakhishvili Tbilisi State University", /* 42403 */ "Vadacom Limited", /* 42404 */ "Roambotics, Inc.", /* 42405 */ "SATO Corporation", /* 42406 */ "iGrid S.L.", /* 42407 */ "HealthSafe24", /* 42408 */ "TopMenu.com", /* 42409 */ "Blue Denim Consulting Group Inc.", /* 42410 */ "Niklaus Ltd.", /* 42411 */ "Osorno Enterprises Inc.", /* 42412 */ "PACSHealth, LLC", /* 42413 */ "Cloudacc Interactive, Inc.", /* 42414 */ "Prince Rupert Grain Ltd.", /* 42415 */ "Software Engineering Center (SEC)", /* 42416 */ "A2Zlogix", /* 42417 */ "GovSource Pty Ltd", /* 42418 */ "NICEUC Communication Tech CO., LTD", /* 42419 */ "Hebei SICON-EMI Power System Co., Ltd.", /* 42420 */ "OpenVox Ltd.", /* 42421 */ "ALLWIN Network Corp.", /* 42422 */ "Republic of Azerbaijan Ministry of Foreign Affairs", /* 42423 */ "International Card Services BV (ICS)", /* 42424 */ "Thiesen Hardware- & Software-Design GmbH", /* 42425 */ "Institut Paul Bocuse", /* 42426 */ "New York Community Bancorp", /* 42427 */ "Bharti Airtel Limited", /* 42428 */ "Hidden Authentication and Trust service", /* 42429 */ "University of Massachusetts", /* 42430 */ "Chelyabinsk palace of pioneers and pupils named after Krupskaya N.K.", /* 42431 */ "lepassepresent.com", /* 42432 */ "Parliamentary Commissioner for Administrative Investigations", /* 42433 */ "BOMATEC AG", /* 42434 */ "LEONHARD KURZ Stiftung & Co. KG", /* 42435 */ "Ojsc NIAEP", /* 42436 */ "Deltek, Inc.", /* 42437 */ "Saratoga Speed Inc.", /* 42438 */ "Stephan Seitz", /* 42439 */ "IQ Devices", /* 42440 */ "Uniscon universal identity control GmbH", /* 42441 */ "Hochschule der Medien Stuttgart", /* 42442 */ "Genesis Integration", /* 42443 */ "Oriental Cambridge Education Group", /* 42444 */ "InterASIA Solutions Inc.", /* 42445 */ "Beijing Hesun Technologies Co.Ltd.", /* 42446 */ "FreeSoft Nyrt.", /* 42447 */ "Taisis Integration And Consulting Services sl", /* 42448 */ "InvestLab Technology, LLC", /* 42449 */ "Mutual Aid Labs, LLC", /* 42450 */ "Rizotec", /* 42451 */ "IRIS-RFID", /* 42452 */ "Drawersteak Research", /* 42453 */ "Funkring.net", /* 42454 */ "FOBAS Consulting, Inc.", /* 42455 */ "VM Farms", /* 42456 */ "Palluc", /* 42457 */ "TigerLead Solutions", /* 42458 */ "Esdenera Networks GmbH", /* 42459 */ "SYS'TRONICS Co., Ltd.", /* 42460 */ "Innosonix GmbH", /* 42461 */ "David Ouagne", /* 42462 */ "TLS Corp.", /* 42463 */ "binarycube", /* 42464 */ "Xerx Software Ltd", /* 42465 */ "Kratos Defense and Security Solutions, Inc.", /* 42466 */ "Lucipher", /* 42467 */ "Jorge Cavallin", /* 42468 */ "Infobahn SA", /* 42469 */ "Voippartners s.r.l.", /* 42470 */ "HOTCITY S.A.", /* 42471 */ "SC-IT GmbH", /* 42472 */ "Action Technology Ltd.", /* 42473 */ "Toro Development Ltd.", /* 42474 */ "Dewar Electronics Pty Ltd", /* 42475 */ "Border 6", /* 42476 */ "OneNeck IT Services Corporation", /* 42477 */ "Proteus Sensor", /* 42478 */ "Metropolitan Wireless International Pte Ltd", /* 42479 */ "Grenland Data as", /* 42480 */ "Teletronix", /* 42481 */ "DocuSign, Inc.", /* 42482 */ "Pioneer Bank", /* 42483 */ "Ultrix Sistemas de Informação", /* 42484 */ "Christian Scholz", /* 42485 */ "Nuolezio", /* 42486 */ "Shenzhen Philorise co.ltd.", /* 42487 */ "Element d.o.o", /* 42488 */ "Preferred Credit, Inc.", /* 42489 */ "Intesi Group SpA", /* 42490 */ "Racktop Systems", /* 42491 */ "Far Bank Enterprises", /* 42492 */ "City of Waukesha", /* 42493 */ "Beckwith Electric Co. Inc", /* 42494 */ "O2 Systems Limited", /* 42495 */ "GlobalNaz IT", /* 42496 */ "Brookhaven Retreat, LLC", /* 42497 */ "Guenter Zimmermann", /* 42498 */ "Orlov-Miller", /* 42499 */ "Deoca Ltd.", /* 42500 */ "Oto IT Limited", /* 42501 */ "CellOS Software Limited", /* 42502 */ "XJ Group Corporation", /* 42503 */ "SOKRAT Ltd.", /* 42504 */ "Denkovi Assembly Electronics LTD", /* 42505 */ "Gostcomp Oliwer Godlewski", /* 42506 */ "HeuleSoft", /* 42507 */ "Shepherd Group Built Environment Information Systems (SGBE IS)", /* 42508 */ "net4home GmbH", /* 42509 */ "Cape Fear Valley Health System", /* 42510 */ "maxrosin.com", /* 42511 */ "Suchocki IT", /* 42512 */ "Ymax Communications", /* 42513 */ "SHENZHEN HXWK TECHNOLOGIES,CO LTD", /* 42514 */ "Liberty Global Services B.V.", /* 42515 */ "Orderman GmbH", /* 42516 */ "Fundación Centro de Estudios de Física del Cosmos de Aragón", /* 42517 */ "ZPE Systems, Inc", /* 42518 */ "BrainLogical Software Development", /* 42519 */ "LifeSafety Power, Inc.", /* 42520 */ "Assystem France", /* 42521 */ "Velin V. Pavlov", /* 42522 */ "Leibniz-Institut fuer Analytische Wissenschaften -ISAS- e.V.", /* 42523 */ "Townet srl", /* 42524 */ "Werkbank Multimedia GmbH", /* 42525 */ "elgris UG", /* 42526 */ "WTG Technologies Ltd", /* 42527 */ "Slovak Hydrometeorological Institute (SHMU)", /* 42528 */ "New Jersey Office of Information Technology", /* 42529 */ "SSQ Financial Group", /* 42530 */ "Security Industry Association", /* 42531 */ "Holysee Vatican Library", /* 42532 */ "BIOVELA, UAB", /* 42533 */ "CAFAT", /* 42534 */ "ictjob", /* 42535 */ "Hanover Displays Ltd.", /* 42536 */ "SnmpStack", /* 42537 */ "artnet world wide", /* 42538 */ "Trumpet, Inc", /* 42539 */ "Zimpel Events And Communications PTY Ltd.", /* 42540 */ "My Telecom Holdings Pty Ltd", /* 42541 */ "Voillo Solutions Ltd.", /* 42542 */ "Simpson University", /* 42543 */ "ALLENGERS GLOBAL HEALTHCARE PRIVATE LIMITED", /* 42544 */ "CSC Telecom", /* 42545 */ "tyntec GmbH", /* 42546 */ "OrecX LLC", /* 42547 */ "gloops, Inc.", /* 42548 */ "F.S.P. Filofarm", /* 42549 */ "SFS services AG", /* 42550 */ "CRFS Limited", /* 42551 */ "Hrvatski zavod za telemedicinu", /* 42552 */ "TeknoUnit", /* 42553 */ "Dynamic Quest, INC", /* 42554 */ "Faculty of Information Technology and Applied Mathematics, BelSU", /* 42555 */ "Visao Tecnologia em Transmissao de Dados Ltda", /* 42556 */ "Unico Data AG", /* 42557 */ "Canis Lupus LLC", /* 42558 */ "AppEnsure", /* 42559 */ "Kirovohrad Volodymyr Vynnychenko State Pedagogical University", /* 42560 */ "ZAO \"MD Project 2000\"", /* 42561 */ "Universidad Pública de Navarra (UPNA)", /* 42562 */ "Kaleidescape, Inc.", /* 42563 */ "KO4BB Electronics", /* 42564 */ "Weirton Medical Center", /* 42565 */ "ClearBearing, Inc.", /* 42566 */ "David Spinella", /* 42567 */ "Andreas Vavra", /* 42568 */ "Miesepies", /* 42569 */ "Independent Bank Corporation", /* 42570 */ "Cybera, Inc", /* 42571 */ "SAFELYLOCKED, LLC", /* 42572 */ "Sun Nuclear Corporation", /* 42573 */ "Sydestep Ltd", /* 42574 */ "e-business-systems SARL", /* 42575 */ "Linpow SRL", /* 42576 */ "Crosspoint SRL Romania", /* 42577 */ "Xcel Energy", /* 42578 */ "sysmocom - systems for mobile communications GmbH", /* 42579 */ "Statseeker", /* 42580 */ "Regional Digital Telecommunication Company", /* 42581 */ "Interlink Ltd.", /* 42582 */ "DPII TELECOM & SERVICES", /* 42583 */ "ROWA Group Holding GmbH", /* 42584 */ "TRIKOM Ltd.", /* 42585 */ "DAG System", /* 42586 */ "Investigaciones Medicas S.A.", /* 42587 */ "AGST Controles e Automação Ltda", /* 42588 */ "Swifttrip LLC", /* 42589 */ "AVB GmbH Wind Engineering", /* 42590 */ "Forlani Impianti s.r.l.", /* 42591 */ "TV 2/Danmark A/S", /* 42592 */ "Gas Natural Informática, S.A.", /* 42593 */ "Fox Technologies", /* 42594 */ "Right Systems Inc", /* 42595 */ "ATNet Services", /* 42596 */ "Norberto Bensa - ENEABE", /* 42597 */ "Tibero", /* 42598 */ "NIPPON TELEGRAPH AND TELEPHONE WEST CORPORATION", /* 42599 */ "Rejlers Oy", /* 42600 */ "Sycada", /* 42601 */ "Performr B.V.", /* 42602 */ "Vorston", /* 42603 */ "Springfield Technical Community College", /* 42604 */ "PLC International Inc", /* 42605 */ "Urban-Software.de", /* 42606 */ "Brekford International", /* 42607 */ "Alan Seedhouse", /* 42608 */ "Boundary, Inc.", /* 42609 */ "Superior Power solutions (HK) Co.,Ltd", /* 42610 */ "Valdrea, LLC", /* 42611 */ "Koninklijke BAM Groep nv", /* 42612 */ "POLYONE CORPORATION", /* 42613 */ "Tribal Chicken Australia", /* 42614 */ "eTRUST co., ltd.", /* 42615 */ "Pannonia Technologies", /* 42616 */ "Alphion India Private Limited", /* 42617 */ "Kaaos Unlimited Oy", /* 42618 */ "PRYSM SARL", /* 42619 */ "Katalix Systems Ltd", /* 42620 */ "Elecdan", /* 42621 */ "Hernic Ferro Chrome Pty Ltd", /* 42622 */ "Open Compute Project", /* 42623 */ "Whatever s.a.", /* 42624 */ "Technology Toolbox LLC", /* 42625 */ "Blue Fire Capital", /* 42626 */ "Vermont Department of Labor", /* 42627 */ "Shenzhen HD Digital Tech Co., Ltd.", /* 42628 */ "WaveNT Co.,Ltd.", /* 42629 */ "Dona Ana County, New Mexico", /* 42630 */ "Xellia Pharmaceuticals ApS", /* 42631 */ "Kompanija Dunav Osiguranje a.d.o. Beograd", /* 42632 */ "VOXXL", /* 42633 */ "PSW GROUP GmbH & Co. KG", /* 42634 */ "RudiNet Ltd.", /* 42635 */ "SecuriPax", /* 42636 */ "Cloudhouse Technologies", /* 42637 */ "ARD-Sternpunkt", /* 42638 */ "Cellcrypt Ltd", /* 42639 */ "Derek Lambert (CrEOF)", /* 42640 */ "Tri-State Generation and Transmission", /* 42641 */ "Stage Entertainment", /* 42642 */ "NetSavia SA", /* 42643 */ "New Leaf Publishing Group, Inc.", /* 42644 */ "Ros Vicente (ITComp)", /* 42645 */ "Etherlive Ltd", /* 42646 */ "Alliance Spacesystems, LLC", /* 42647 */ "Blue Global Media", /* 42648 */ "The LaSalle Technology Group", /* 42649 */ "Parque Tecnológico Itaipu - Paraguay", /* 42650 */ "willisss.com", /* 42651 */ "Sichuan Bihong Broadcast&Television New Technologies Co.,Ltd", /* 42652 */ "Netcloud AG", /* 42653 */ "RCS & RDS SA", /* 42654 */ "On the Cusp Ltd.", /* 42655 */ "Clear-Com", /* 42656 */ "Mixpo", /* 42657 */ "Lakra Sintez Ltd.", /* 42658 */ "Robert Maxwell Professional Consulting", /* 42659 */ "Wildman & Morris", /* 42660 */ "Asian Pacific Telecommunications", /* 42661 */ "Wuerzburger Versorgungs- und Verkehrs-GmbH", /* 42662 */ "Zhengwei-tech Co.,Ltd.", /* 42663 */ "Iromedica AG", /* 42664 */ "WIRD AG", /* 42665 */ "Affiliated Managers Group, Inc.", /* 42666 */ "Northwest Multiple Listing Service", /* 42667 */ "ZIMT University of Siegen", /* 42668 */ "HangZhou Chenxiao Technologies Co.,ltd", /* 42669 */ "SICE Tecnología y Sistemas, S.A.", /* 42670 */ "Pinetron Co.,Ltd", /* 42671 */ "G. X. Clarke & Co.", /* 42672 */ "SAIC, Inc.", /* 42673 */ "TVH Group NV", /* 42674 */ "Comité Permanent des Médecins Européens", /* 42675 */ "Servergy, Inc", /* 42676 */ "Altertech s.r.o.", /* 42677 */ "Lakra Sibir Ltd.", /* 42678 */ "cne.at", /* 42679 */ "Randstad España, S.L.", /* 42680 */ "Freeport of Riga Authority", /* 42681 */ "Cyviz AS", /* 42682 */ "Trans Data Management (TDM)", /* 42683 */ "Bump Networks, Inc.", /* 42684 */ "Benjamin Huepeden IT", /* 42685 */ "Siempelkamp Maschinen- und Anlagenbau GmbH & Co. KG", /* 42686 */ "Meridian Health System", /* 42687 */ "STABILO International GmbH", /* 42688 */ "Southern Methodist University", /* 42689 */ "nGeniux LLC", /* 42690 */ "Australia and New Zealand Banking Group Limited", /* 42691 */ "Philotech", /* 42692 */ "AcroRed Technologies, Inc.", /* 42693 */ "LoopPay, Inc.", /* 42694 */ "Beijing QTS Networks Technologies Co., Ltd", /* 42695 */ "Indian Hotels Company Limited", /* 42696 */ "Activsolar", /* 42697 */ "Qualitis Kft.", /* 42698 */ "Dorwin Enterprises", /* 42699 */ "ESP Credit Management", /* 42700 */ "thepickle.com, Inc.", /* 42701 */ "Altairis, s. r. o.", /* 42702 */ "Locatrix Communications", /* 42703 */ "Marco Displays", /* 42704 */ "HVR Software", /* 42705 */ "Ministry of Internal Affairs - Kosova", /* 42706 */ "Corvinus University of Budapest", /* 42707 */ "Teachers Assurance", /* 42708 */ "CarWoo! Inc.", /* 42709 */ "Designs for Health, Inc.", /* 42710 */ "MEIRYO DENSHI CORPORATION", /* 42711 */ "Hanvit SI, Inc.", /* 42712 */ "HPS ICT&Mobile Solutions", /* 42713 */ "Beijing Joy and Success Technology Co., Ltd.", /* 42714 */ "tanum consult GmbH", /* 42715 */ "LzLabs GmbH", /* 42716 */ "Prefeitura Municipal de Cachoeirinha - RS - Brasil", /* 42717 */ "Vema, a.s.", /* 42718 */ "CyberFX, Inc.", /* 42719 */ "Bilgibim Bilgisayar Teknolojileri", /* 42720 */ "Teck Resources Limited", /* 42721 */ "Miraj Technology and Consulting Corporation", /* 42722 */ "Shouting Ground Technologies, Inc.", /* 42723 */ "Kernel Electronics Co Ltd", /* 42724 */ "Institut Teknologi Sepuluh Nopember", /* 42725 */ "ArcSoft Hangzhou CO.,LTD.", /* 42726 */ "X-Company Pty Ltd", /* 42727 */ "Tomaxx GmbH", /* 42728 */ "Private Iron and Steel Joint Stock Company \"Donetsksteel\"", /* 42729 */ "Croda International Plc", /* 42730 */ "Statkraft SF", /* 42731 */ "Southern Power Systems, Inc.", /* 42732 */ "FSMLabs", /* 42733 */ "Nextmove Technologies", /* 42734 */ "dParadig", /* 42735 */ "Haus der Barmherzigkeit", /* 42736 */ "Zends", /* 42737 */ "Vivint Wireless", /* 42738 */ "Veolia Water Solutions & Technologies", /* 42739 */ "MaerdnGaming GbR", /* 42740 */ "Nanjing Dong Xun Information Technology Co., Ltd.", /* 42741 */ "Winix Solutions LLC", /* 42742 */ "Niederösterreichische Gebietskrankenkasse", /* 42743 */ "Falabella", /* 42744 */ "Jamdeo", /* 42745 */ "InterNetX GmbH", /* 42746 */ "Kik Interactive", /* 42747 */ "MyOrg.at (Johannes Hackl)", /* 42748 */ "Utilidata, Inc", /* 42749 */ "Umbrella ID", /* 42750 */ "Neowatt Energy Solutions Co. Pvt. Ltd.", /* 42751 */ "AMEDTEC Medizintechnik Aue GmbH", /* 42752 */ "University of The Philippines Los Baños", /* 42753 */ "Enel Energy Electronic", /* 42754 */ "ATON GmbH", /* 42755 */ "Purdue Research Foundation", /* 42756 */ "Encana Corporation", /* 42757 */ "C4B Com For Business AG", /* 42758 */ "Practicom B.V.", /* 42759 */ "PHOENIX PHARMA", /* 42760 */ "Imavis srl", /* 42761 */ "ipex telecom LLC", /* 42762 */ "ShangHai Jeelan Information Technology Inc.", /* 42763 */ "Smith College", /* 42764 */ "Muzeum Historii Zydow Polskich", /* 42765 */ "Typomedia Foundation", /* 42766 */ "Queensland Motorways Limited", /* 42767 */ "Marcelo Leal", /* 42768 */ "Supermathie Networks", /* 42769 */ "Totalpost Services PLC", /* 42770 */ "DGQoS", /* 42771 */ "Galkam PTY LTD", /* 42772 */ "Transport for London", /* 42773 */ "Semtech Corporation", /* 42774 */ "Linx ICT Solutions", /* 42775 */ "one2many BV", /* 42776 */ "Gosuncn Technology Group Co., Ltd", /* 42777 */ "Michael Offel (mflour.com)", /* 42778 */ "CJSC \"NORSI-TRANS\"", /* 42779 */ "SEB DEVELOPPEMENT SAS", /* 42780 */ "Bragg Communications Inc.", /* 42781 */ "Ekrompt, JSC", /* 42782 */ "workvslife.com", /* 42783 */ "Pinnacle Foods Group, LLC", /* 42784 */ "Syntaxjockey", /* 42785 */ "CNS Engineering", /* 42786 */ "Concentric Sky", /* 42787 */ "artec technologies AG", /* 42788 */ "SynQor, Inc.", /* 42789 */ "Rebasoft", /* 42790 */ "Geo-Comm, Inc.", /* 42791 */ "Near East University", /* 42792 */ "IntCache Technology Co.,Ltd", /* 42793 */ "LEX Media Concepts SRL", /* 42794 */ "mrByte Tech Solutions", /* 42795 */ "IQ Solutions S.A.", /* 42796 */ "Freie ArbeiterInnen Union", /* 42797 */ "HUENGSBERG AG", /* 42798 */ "Alfstore", /* 42799 */ "Co-Nexus Communications Systems, Inc.", /* 42800 */ "Essai Inc", /* 42801 */ "Rigel Engineering", /* 42802 */ "Valialsoft LLC", /* 42803 */ "New Singularity International Technical Development Co.,Ltd.", /* 42804 */ "Cloudy IT", /* 42805 */ "WINFO Corp.", /* 42806 */ "City West Country Ltd", /* 42807 */ "Arachnid Labs Ltd", /* 42808 */ "netbreaker IT-Service", /* 42809 */ "Telesis, S.A. de C.V.", /* 42810 */ "Enyx", /* 42811 */ "ISD Dunaferr Co. Ltd.", /* 42812 */ "Polskie Sieci Elektroenergetyczne S.A.", /* 42813 */ "Inveo", /* 42814 */ "Tussa IKT AS", /* 42815 */ "HACENTER", /* 42816 */ "IBM Platform Firmware Division", /* 42817 */ "Relative Variable Software", /* 42818 */ "Carante Groep", /* 42819 */ "Techsun", /* 42820 */ "ACXIO", /* 42821 */ "Tesc", /* 42822 */ "Spilsby Internet Solutions", /* 42823 */ "Web.Cloud.Apps. GmbH", /* 42824 */ "vArmour Networks", /* 42825 */ "ChengDu Network Security Technology Corporation", /* 42826 */ "rm-netproject UG (haftungsbeschränkt)", /* 42827 */ "US Army Electronic Provings Ground (USAEPG) Instrumentation Management System (IMS)", /* 42828 */ "QuartzDesk.com", /* 42829 */ "PowerSense", /* 42830 */ "Kickass Systems", /* 42831 */ "Tata Institute Fundamental Research", /* 42832 */ "Nimbus Technologieberatung GmbH", /* 42833 */ "TechniData IT-Service GmbH", /* 42834 */ "ZELITRON SA", /* 42835 */ "eXtreme IT Development", /* 42836 */ "Westpac New Zealand Ltd", /* 42837 */ "FAST DISTRIBUTED CLOUD COMPUTING INC.,", /* 42838 */ "Tactical Communications Corporation", /* 42839 */ "Reporo", /* 42840 */ "Kraftanlagen Muenchen GmbH", /* 42841 */ "iQSpot", /* 42842 */ "TWIN Engineering S.r.l.", /* 42843 */ "SPI GmbH", /* 42844 */ "TOKYO SYSTEM HOUSE Co., Ltd.", /* 42845 */ "Corhoma SRL", /* 42846 */ "2H Offshore Engineering Ltd", /* 42847 */ "NETIXIA", /* 42848 */ "Fabrecode", /* 42849 */ "LocalTV LLC of Alabama", /* 42850 */ "Fidelity Voice Services", /* 42851 */ "Bank Gospodarstwa Krajowego", /* 42852 */ "DunnCox", /* 42853 */ "EMPRESA DE TECNOLOGIA DA INFORMAÇÃO E COMUNICAÇÃO DO MUNICÍPIO DE SÃO PAULO", /* 42854 */ "techsoup.net", /* 42855 */ "Kreis Warendorf", /* 42856 */ "Family Madera of Switzerland", /* 42857 */ "Linux Szerver Kft.", /* 42858 */ "Shanghai SHR Automation Co.,Ltd", /* 42859 */ "Asul IT Consulting LLP", /* 42860 */ "Ophylink Communication Technology Co., Ltd.", /* 42861 */ "AITA-Soft", /* 42862 */ "IOS Health Systems", /* 42863 */ "Mobius Embedded Systems Ltd", /* 42864 */ "Hoza Logistic Solutions", /* 42865 */ "Frontend.biz GmbH", /* 42866 */ "BestSolution.at", /* 42867 */ "Association of American Railroads", /* 42868 */ "UNE EPM Telecomunicaciones S.A.", /* 42869 */ "Unither Manufacturing LLC", /* 42870 */ "IMRIS", /* 42871 */ "Unomaly AB", /* 42872 */ "Comune di Ascoli Piceno", /* 42873 */ "Hospedia Ltd", /* 42874 */ "ACISA", /* 42875 */ "SGSITES Technologies", /* 42876 */ "Sundvor", /* 42877 */ "Credit-Moscow Bank", /* 42878 */ "Sielaff GmbH & Co. KG", /* 42879 */ "Uwe Disch", /* 42880 */ "No Limit Network", /* 42881 */ "Jiangsu Fablesoft Co.,Ltd", /* 42882 */ "CARC (C-DOT Alcatel-Lucent Research Centre Pvt Ltd)", /* 42883 */ "Anderson Morgan Kelowna Inc.", /* 42884 */ "S P I R I T - informačné systémy, a.s.", /* 42885 */ "InMotion Hosting", /* 42886 */ "One Call Now", /* 42887 */ "Canadian Museum for Human Rights", /* 42888 */ "IO Data Centers, LLC", /* 42889 */ "Renkus Heinz Incorporated", /* 42890 */ "Santechkomplekt Ltd.", /* 42891 */ "TOYGA", /* 42892 */ "Funkfeuer Wien - Verein zur Förderung freier Netze", /* 42893 */ "CAROL JEANNE MACK CORPORATION", /* 42894 */ "Securiton GmbH", /* 42895 */ "The O'Gara Group", /* 42896 */ "Evan Edstrom", /* 42897 */ "IM Service Lab Srl", /* 42898 */ "kiloWattsol", /* 42899 */ "Elcom Innovations Private Limited", /* 42900 */ "Chaos Computer Club Cologne", /* 42901 */ "J.R. Torralba", /* 42902 */ "IT Innovations Ukraine LLC", /* 42903 */ "Nemik Consulting Inc", /* 42904 */ "Trihedral Engineering Ltd.", /* 42905 */ "Shift Workforce Management", /* 42906 */ "PLUTEX GmbH", /* 42907 */ "Megadevices", /* 42908 */ "Tver State University", /* 42909 */ "latticeware.com", /* 42910 */ "Metiri Systems, LLC", /* 42911 */ "locate solution GmbH", /* 42912 */ "Exatech bv", /* 42913 */ "Wimsey", /* 42914 */ "MCATSYSTEMS LLC", /* 42915 */ "Arcerm", /* 42916 */ "Adcubum AG", /* 42917 */ "Trafigura", /* 42918 */ "Max-Planck-Institut fuer Astrophysik", /* 42919 */ "Slaughter and May", /* 42920 */ "Dropbox, Inc.", /* 42921 */ "Ministarstvo odbrane Republike Srbije", /* 42922 */ "Stefan Ebert", /* 42923 */ "The Molecule", /* 42924 */ "SYLEB SARL", /* 42925 */ "NSC Communications Siberia Ltd", /* 42926 */ "Fidelio Cruise Software", /* 42927 */ "Galleon Systems Ltd", /* 42928 */ "securedeviceaccess.com", /* 42929 */ "GEKO.NET di Mena Giuseppe", /* 42930 */ "Vladimir Mihajlović pr, računarsko programiranje, METACODE, Beograd", /* 42931 */ "Infolink Global", /* 42932 */ "iArtemis", /* 42933 */ "APRS World, LLC", /* 42934 */ "Axcelera", /* 42935 */ "Anhui Telehome Digital Technology Co. Ltd", /* 42936 */ "VP (Video Privacy) Forum", /* 42937 */ "Moviri S.p.a.", /* 42938 */ "Applied Informatics for Health Society", /* 42939 */ "City of Smyrna", /* 42940 */ "2XWIRELESS, INC", /* 42941 */ "kayzan", /* 42942 */ "CopperPoint Mutual Insurance Company", /* 42943 */ "Seenov Inc.", /* 42944 */ "Seeser Datentechnik", /* 42945 */ "Utel Systems", /* 42946 */ "Network Technologies International, Inc.", /* 42947 */ "Methodist Home for Children", /* 42948 */ "Bol.com b.v.", /* 42949 */ "Hangzhou Joson Technology Co.,Ltd", /* 42950 */ "Highlands Technologies Solutions", /* 42951 */ "SOREDI touch systems GmbH", /* 42952 */ "\"Runet Business Systems\"", /* 42953 */ "Bizerba GmbH & Co. KG", /* 42954 */ "Louisville-Jefferson County Metro Government", /* 42955 */ "HumanIT Inc.", /* 42956 */ "Wave Advanced Technology Applications s.r.l.", /* 42957 */ "Central Office for Administrative and Electronic Public Services", /* 42958 */ "Snap Limited", /* 42959 */ "Garn Contracting & Consulting Pty Ltd", /* 42960 */ "EH-electronics GmbH", /* 42961 */ "Blitznote e.K.", /* 42962 */ "UltraMED Systems, Inc.", /* 42963 */ "Abelsoft Inc", /* 42964 */ "ec3 Networks GmbH", /* 42965 */ "ECHO LLC", /* 42966 */ "liedloff.org", /* 42967 */ "ME Engineering M2M GmbH", /* 42968 */ "Iorga Group", /* 42969 */ "RP SIA \"Rigas satiksme\"", /* 42970 */ "ONELAN LIMITED", /* 42971 */ "IT Business Solutions and Services (ITBSS)", /* 42972 */ "COMDOK GmbH", /* 42973 */ "Willis-Knighton Health System", /* 42974 */ "Iridium Thought", /* 42975 */ "Key Source International", /* 42976 */ "Matta Consulting Limited", /* 42977 */ "CSN Groep BV", /* 42978 */ "Wellington Security Systems", /* 42979 */ "EZ e-TRAK", /* 42980 */ "Heuristic Systems Pty Ltd", /* 42981 */ "Leafsprout", /* 42982 */ "SAS Nexylan", /* 42983 */ "Toyohashi University of Technology", /* 42984 */ "Cnofe", /* 42985 */ "Beijing MicroColor Corp., LTD.", /* 42986 */ "Gida Technology Services", /* 42987 */ "Nanjing Huamai Technology Co., Ltd", /* 42988 */ "Telegärtner Karl Gärtner GmbH", /* 42989 */ "VTSL Ltd", /* 42990 */ "Marylhurst University", /* 42991 */ "Vektron Energy (Pty) Ltd", /* 42992 */ "Cornerstone Health Care, P.A.", /* 42993 */ "Institut de Physique de Rennes", /* 42994 */ "AvertIT", /* 42995 */ "NOMASYSTEMS, S.L.", /* 42996 */ "Red Giant Inc", /* 42997 */ "Progdence Co.,Ltd.", /* 42998 */ "Parse Software Development B.V.", /* 42999 */ "Service Ontario", /* 43000 */ "Nextbeacon", /* 43001 */ "RootService (Markus Kohlmeyer)", /* 43002 */ "TribalGroup", /* 43003 */ "Xinguard, Inc.", /* 43004 */ "University of Technology and Life Sciences in Bydgoszcz", /* 43005 */ "root-a.net", /* 43006 */ "Gipen Systems", /* 43007 */ "FRTek", /* 43008 */ "Vilnius Gallery", /* 43009 */ "Two Sigma Investments, LLC", /* 43010 */ "Sängerschaft Erato", /* 43011 */ "Aldo Group Inc.", /* 43012 */ "ISC8, Inc.", /* 43013 */ "En Garde Systems, Inc.", /* 43014 */ "Quinyx AB", /* 43015 */ "Réseau en scène Languedoc-Roussillon", /* 43016 */ "Albaad", /* 43017 */ "Pädagogisches Landesinstitut", /* 43018 */ "Digital Human Identity S.L", /* 43019 */ "Angel Lane", /* 43020 */ "i-storm", /* 43021 */ "OneSearch Direct Ltd.", /* 43022 */ "Tuxpower.dk", /* 43023 */ "InfoGoose.Inc", /* 43024 */ "Nomadconnection, Inc.", /* 43025 */ "Mostlucky Ltd.", /* 43026 */ "Fujian Great Power PLC Equipment Co.,Ltd", /* 43027 */ "Office of Immigration and Nationality", /* 43028 */ "Netco Ltda. Network Solutions Co.", /* 43029 */ "ROCK YOUR LIFE! gGmbH", /* 43030 */ "RaumZeitLabor e.V.", /* 43031 */ "Live It - Nerd", /* 43032 */ "TVV lippu- ja maksujärjestelmä Oy", /* 43033 */ "K and P Business Solutions", /* 43034 */ "Feinschliff", /* 43035 */ "Bay Of Plenty District Health Board", /* 43036 */ "Newcastle-under-Lyme College", /* 43037 */ "Creative Electronic Systems SA", /* 43038 */ "OASYS Healthcare Corporation", /* 43039 */ "Davra Networks", /* 43040 */ "ATREM S.A.", /* 43041 */ "Definition Networks Inc.", /* 43042 */ "Information System Assiociaties", /* 43043 */ "Gran Investimentos", /* 43044 */ "Banco Exterior C.A. Banco Universal", /* 43045 */ "Andrey Fedorov", /* 43046 */ "H&W Computer Systems", /* 43047 */ "CB7 Systems LLC", /* 43048 */ "Stewart Bryant", /* 43049 */ "Vobile Co., Ltd.", /* 43050 */ "SHENZHEN SENSEGRID CO.,LTD.", /* 43051 */ "Shenzhen Tendzone Intelligent Technology Co; Ltd", /* 43052 */ "I.T. SYNERGY LIMITED", /* 43053 */ "Crown Prince Court", /* 43054 */ "American Kybernetik (Juan Daugherty)", /* 43055 */ "ENVISTACOM", /* 43056 */ "PrAT CENTRAVIS PRODUCTION UKRAINE", /* 43057 */ "Synergy Sky AS", /* 43058 */ "iteracon GmbH", /* 43059 */ "Leepfrog Technologies, Inc.", /* 43060 */ "Global System & Network Services BVBA", /* 43061 */ "Ingenieure ohne Grenzen e.V.", /* 43062 */ "Digital Multimedia Technology Co.,Ltd.", /* 43063 */ "Embedded Wireless Labs", /* 43064 */ "Shanghai Onezero Electronic Commerce Co., Ltd.", /* 43065 */ "Stiebel Eltron GmbH & Co. KG", /* 43066 */ "VFI SYSTEM", /* 43067 */ "AVG Technologies", /* 43068 */ "Markus Ruecker (mr-consult.net)", /* 43069 */ "Hrvatska narodna banka", /* 43070 */ "NABB Gaming Community", /* 43071 */ "Privlo, Inc.", /* 43072 */ "roskakori.fi", /* 43073 */ "WRH Inc", /* 43074 */ "SKY Interactive", /* 43075 */ "Greiner Holding AG", /* 43076 */ "TUI Marine", /* 43077 */ "Lindvik", /* 43078 */ "Zimmer GmbH", /* 43079 */ "Atlantic Corporation of Wilmington, Inc.", /* 43080 */ "intellec", /* 43081 */ "Informatik Service Gesellschaft mbH", /* 43082 */ "IMEN RAYANE SHRGH Co.", /* 43083 */ "Webtown Informatika Kft.", /* 43084 */ "Detroit R & D, Inc.", /* 43085 */ "NHS Sistemas Eletronicos", /* 43086 */ "xCelor LLC", /* 43087 */ "Measurlogic Inc.", /* 43088 */ "Dualog AS", /* 43089 */ "KVADOS, a.s.", /* 43090 */ "SAP integrator Ltd.", /* 43091 */ "Habermehl", /* 43092 */ "Xiamen Faratronic Co., Ltd.", /* 43093 */ "HyperWallet Systems Inc", /* 43094 */ "Service2Media B.V.", /* 43095 */ "James Guse (JAG Enterprises)", /* 43096 */ "ROTH + WEBER GmbH", /* 43097 */ "Martem AS", /* 43098 */ "Embrionix Design inc.", /* 43099 */ "Strata Decision Technology, L.L.C.", /* 43100 */ "Alphavida", /* 43101 */ "Regional Municipality of Peel", /* 43102 */ "Caradigm", /* 43103 */ "CyberSecure IPS", /* 43104 */ "CyberFlow Analytics, Inc.", /* 43105 */ "PERK Innovation GmbH", /* 43106 */ "Waclaw Schiller (Torinthiel)", /* 43107 */ "Attend Systems, LLC", /* 43108 */ "dataFASCIA Corporation", /* 43109 */ "LTD «Bradbury Lab»", /* 43110 */ "VNT Software", /* 43111 */ "Picsearch AB (publ)", /* 43112 */ "Screen9 AB", /* 43113 */ "Kantonsapotheke Zuerich", /* 43114 */ "Forêts & Bois de l'Est", /* 43115 */ "Berghof Automation GmbH", /* 43116 */ "National Stock Exchange Of India Limited", /* 43117 */ "NORDSYS GmbH", /* 43118 */ "Altibox AS", /* 43119 */ "Peshawar Business School", /* 43120 */ "Ypsomed AG", /* 43121 */ "Summit Networks", /* 43122 */ "Instituto Nacional para la Evaluación de la Educación", /* 43123 */ "PasswordBox Inc.", /* 43124 */ "System Studies Incorporated", /* 43125 */ "US Fire Insurance Company", /* 43126 */ "Oliver Manz (ips manz consulting)", /* 43127 */ "TangentOrg", /* 43128 */ "Meijo University", /* 43129 */ "Amplesky Communication Technologies Ltd.", /* 43130 */ "Ternopil State Medical University", /* 43131 */ "CJSC Svyaz engineering", /* 43132 */ "mailgarant (Meint Post)", /* 43133 */ "Advanced Fiber Products LLC", /* 43134 */ "adis.ca", /* 43135 */ "Digital Footprints International, LLC; DBA Internet Identity", /* 43136 */ "Raven Rocks Computer Services Group, Inc.", /* 43137 */ "Multapplied Networks, Inc.", /* 43138 */ "Glutonus SRL", /* 43139 */ "Xora, Inc.", /* 43140 */ "RVTN.org", /* 43141 */ "St. Mary's International School", /* 43142 */ "Nanjing Sinovatio Technology Co. ltd", /* 43143 */ "HMS Industrial Networks", /* 43144 */ "Vasily Nushtakin (Home Router)", /* 43145 */ "VanWesten.net", /* 43146 */ "Best Theratronics Ltd.", /* 43147 */ "Det Norske Oljeselskap", /* 43148 */ "RUBYCAT-Labs", /* 43149 */ "Stenbock Systems Inc.", /* 43150 */ "AltaSteel Ltd", /* 43151 */ "Kristoffer Berdal (cognitive.io)", /* 43152 */ "Gerriko S-E-T Technology Solutions Ltd.", /* 43153 */ "NexLabs Pte Ltd", /* 43154 */ "ION Trading Srl", /* 43155 */ "WEY Elektronik AG", /* 43156 */ "Tatung Technology Inc.", /* 43157 */ "Skytech.lt", /* 43158 */ "Hartley Consultants Limited", /* 43159 */ "EnStream LP", /* 43160 */ "Riverside County Regional Medical Center", /* 43161 */ "Flash Services", /* 43162 */ "Cloud Technologies Inc.", /* 43163 */ "Eruditor Group Ltd.", /* 43164 */ "Strike Technologies, LLC", /* 43165 */ "Thai Citrus, Inc.", /* 43166 */ "NaSys Inc.", /* 43167 */ "ALFRED E. TIEFENBACHER (Gmbh & Co. KG)", /* 43168 */ "Tiroler Versicherung", /* 43169 */ "Banco Bilbao Vizcaya Argentaria S.A", /* 43170 */ "Datwyler Holding AG", /* 43171 */ "Atrium - Region PACA", /* 43172 */ "Elesta Ltd.", /* 43173 */ "Ubiquity Srl", /* 43174 */ "Dorsey Racing", /* 43175 */ "Swiss Mobility Solutions", /* 43176 */ "Positron srl", /* 43177 */ "Main Line HealthCare", /* 43178 */ "Lendy LLC", /* 43179 */ "Ole Virginia Hams Amateur Radio Club", /* 43180 */ "VFA INC", /* 43181 */ "Minor Inf.Tech.", /* 43182 */ "Renfe Viajeros, S.A.", /* 43183 */ "The Floow", /* 43184 */ "FINN Sp. z o.o.", /* 43185 */ "Zweite Heimat GmbH", /* 43186 */ "LIM college.", /* 43187 */ "INDIWAN GmbH", /* 43188 */ "J.B. Hunt Transport Services, Inc.", /* 43189 */ "Arket Srl", /* 43190 */ "Metamako", /* 43191 */ "Automation & Integration Global Security Group, LLC.", /* 43192 */ "GRG International LTD", /* 43193 */ "ABB Oy", /* 43194 */ "Management of finance of the Administration of Tchaikovsky municipal district Perm region", /* 43195 */ "Evintia SL", /* 43196 */ "BCS Technologies", /* 43197 */ "stepins.com", /* 43198 */ "Rubisco Ltd", /* 43199 */ "CLAAS KGaA mbH", /* 43200 */ "bytemine GmbH", /* 43201 */ "Zeta Storage Systems Ltd", /* 43202 */ "TSS COMPANY", /* 43203 */ "Hard 'n Software Consulting GmbH", /* 43204 */ "Aloxa.eu", /* 43205 */ "American Cancer Society, Inc.", /* 43206 */ "Real-Time by Design, LLC", /* 43207 */ "Cybersavants,LLC", /* 43208 */ "Bliik", /* 43209 */ "Prominic.NET, Inc.", /* 43210 */ "Atostek Oy", /* 43211 */ "space150, Inc.", /* 43212 */ "Aveillant Ltd", /* 43213 */ "Programa Interlegis", /* 43214 */ "PC Users Group (ACT) Incorporated", /* 43215 */ "Fukushima Prefectural Government. Japan", /* 43216 */ "Ultimate Europe Transportation Equipment GmbH", /* 43217 */ "tecalor", /* 43218 */ "Sallie Mae", /* 43219 */ "DB Netz AG", /* 43220 */ "Bemobi Midia e Entretenimento LTDA.", /* 43221 */ "Oxfam", /* 43222 */ "Wireless Telecom Group, Inc", /* 43223 */ "Netyard Pawel Jenner", /* 43224 */ "Unitymedia KabelBW", /* 43225 */ "Ashe Cosgrove Corporation", /* 43226 */ "ossmail.de", /* 43227 */ "Shanghai MRDcom Co., Ltd.", /* 43228 */ "SOFTEH PLUS SRL", /* 43229 */ "Betrust N.V.", /* 43230 */ "GSI Helmholtzzentrum für Schwerionenforschung GmbH", /* 43231 */ "Bank of Nova Scotia", /* 43232 */ "Scheinkönig & Co.", /* 43233 */ "LLC Enistek", /* 43234 */ "Stadt Chur", /* 43235 */ "Pilz GmbH & Co. KG", /* 43236 */ "AOC Oost", /* 43237 */ "Compass Plus Ltd.", /* 43238 */ "MindMade sp. z o.o.", /* 43239 */ "Day & Zimmermann", /* 43240 */ "Guidance Ltd.", /* 43241 */ "Universal Switching Corporation", /* 43242 */ "ShinyByte Web Agency, LLC.", /* 43243 */ "Open Information Security Foundation", /* 43244 */ "G421 Networks", /* 43245 */ "Bennington-Rutland Supervisory Union", /* 43246 */ "Rui Pereira (netcloud.pt)", /* 43247 */ "3 Turn Productions LLC", /* 43248 */ "THM Consulting Ltd", /* 43249 */ "\"Group of companies \"POWER ENGINEERING\" Ltd", /* 43250 */ "Planet Erde", /* 43251 */ "CosDay e. V.", /* 43252 */ "ASGraphics", /* 43253 */ "Geonov", /* 43254 */ "FISBA Optik AG", /* 43255 */ "FlouLab (Ioannis Angelakopoulos)", /* 43256 */ "webs.bz", /* 43257 */ "D'Youville College", /* 43258 */ "Cambridge Health Alliance", /* 43259 */ "WireGeo.com", /* 43260 */ "Pontis Research Inc.", /* 43261 */ "ABVI-Goodwill", /* 43262 */ "SolarCity", /* 43263 */ "Opanga Networks, Inc.", /* 43264 */ "HongKong Yunlink Technology Co., Ltd", /* 43265 */ "S.Toraighyrov Pavlodar State University", /* 43266 */ "JAMESON MEMORIAL HOSPITAL", /* 43267 */ "TELECO Spa", /* 43268 */ "DI Kurt Renauer", /* 43269 */ "Yoshitaka Yamane", /* 43270 */ "Justus-Liebig-Universität Gießen", /* 43271 */ "Austria Card Plastikkarten und Ausweissysteme Ges.m.b.H", /* 43272 */ "Control Center Apps GmbH", /* 43273 */ "\"Group of Companies \"RosIntegracija\" LLC.", /* 43274 */ "Alex Eggenberger", /* 43275 */ "Coreline Soft Co.,Ltd", /* 43276 */ "AE Telelink System Limited", /* 43277 */ "zalio", /* 43278 */ "R. L. Drake Holdings, LLC", /* 43279 */ "Vereniging Ons Middelbaar Onderwijs", /* 43280 */ "PAUL HARTMANN AG", /* 43281 */ "PROVIDENTIA SYSTEMS", /* 43282 */ "Vado Security", /* 43283 */ "Dream Solutions Ltd", /* 43284 */ "Quanzhou Karassn Security Protection Electronics Co., Ltd.", /* 43285 */ "Keysight Technologies, Inc.", /* 43286 */ "Mocomsoft Inc.", /* 43287 */ "Lugansk State Academy Culture and Arts", /* 43288 */ "W3Security", /* 43289 */ "DLP Networks", /* 43290 */ "Frank Loepthien (Loeppi)", /* 43291 */ "Applifier Oy", /* 43292 */ "Diakonie Deutschland", /* 43293 */ "M2M Telemetria Ltda", /* 43294 */ "Kreel LLC", /* 43295 */ "Exablaze", /* 43296 */ "BASSANO & ASSOCIATES", /* 43297 */ "fnordspace.net", /* 43298 */ "Das Kartell (German Star Citizen Organization)", /* 43299 */ "PDC Corporation", /* 43300 */ "xiamen diksoft Co.,Ltd.", /* 43301 */ "Bank Of Stockton", /* 43302 */ "1st Choice Tax Service, Inc.", /* 43303 */ "Davenport University", /* 43304 */ "Hey Communications", /* 43305 */ "Bitclear, LLC", /* 43306 */ "Keyprocessor", /* 43307 */ "Appcara Inc", /* 43308 */ "Sweratel AB", /* 43309 */ "Konak Solutions Pty Ltd", /* 43310 */ "Belcity Software", /* 43311 */ "ZRO Kvant", /* 43312 */ "zerolatency ltd", /* 43313 */ "Tecteo Group SA", /* 43314 */ "PowerDNS.COM BV", /* 43315 */ "Information Factory", /* 43316 */ "Stadtwerke Bonn GmbH", /* 43317 */ "PERSON to PERSON Analysis CA", /* 43318 */ "Secure Meters Limited", /* 43319 */ "NetSTAR inc", /* 43320 */ "Polaris Networks", /* 43321 */ "Kenya Education Network", /* 43322 */ "Trans4mation IT GmbH", /* 43323 */ "FARSENS S.L.", /* 43324 */ "Shoreland Inc.", /* 43325 */ "Triple Canopy Inc.", /* 43326 */ "Toronto Public Library", /* 43327 */ "Exscribe, Inc", /* 43328 */ "OneConfig Pty Ltd", /* 43329 */ "Sonavation, Inc.", /* 43330 */ "Madhat Technical Solutions LLC", /* 43331 */ "DialogSoft inc.", /* 43332 */ "Gangwon EMbedded Software Cooperative Research Center", /* 43333 */ "iDocTrust", /* 43334 */ "Union des Bois de Champagne", /* 43335 */ "GOERLITZ AG", /* 43336 */ "ZENON MEDIA GmbH", /* 43337 */ "Yottabyte", /* 43338 */ "efComs UG", /* 43339 */ "Traffic Technologies, Inc.", /* 43340 */ "Dashlink", /* 43341 */ "SnailProof Computer Services", /* 43342 */ "Contactless Devices LLC", /* 43343 */ "Maven Inventing Solutions", /* 43344 */ "Aktietrykkeriet AS", /* 43345 */ "Douglas County School District, Colorado", /* 43346 */ "ValueDatum Systems, Inc. Ltd", /* 43347 */ "EmbeddedSoft Ltd", /* 43348 */ "Nigerian Research and Education Network (NgREN)", /* 43349 */ "Arikel.net Enterprises, LLC", /* 43350 */ "Advania", /* 43351 */ "Hangzhou Huaxing Chuangye Communication Technology CO.,LTD.", /* 43352 */ "Beijing Certificate Authority", /* 43353 */ "OBI Smart Technologies GmbH", /* 43354 */ "VTI Instruments Corporation", /* 43355 */ "Mimosa Networks, Inc", /* 43356 */ "Thomas Fagart (Brozs)", /* 43357 */ "candiansolar.com", /* 43358 */ "China Guodian Corporation", /* 43359 */ "Binhai Online Information Technology Company Limited", /* 43360 */ "IT Voimala Oy", /* 43361 */ "Zakład Automatyki i Urządzeń Pomiarowych AREX Sp. z o.o.", /* 43362 */ "B2B.CZ, s.r.o.", /* 43363 */ "Vision Box, S.A.", /* 43364 */ "Qi ict", /* 43365 */ "N-Tools.de", /* 43366 */ "Suedzucker AG", /* 43367 */ "Oradian d.o.o.", /* 43368 */ "BrightSign LLC", /* 43369 */ "Giordano Bruno Stiftung", /* 43370 */ "Moegui S.p.A", /* 43371 */ "Embedded Access Inc", /* 43372 */ "Associação dos Registradores Imobiliários de São Paulo", /* 43373 */ "Belton IT", /* 43374 */ "Baer & Karrer AG", /* 43375 */ "Ladybird Cranes Ltd.", /* 43376 */ "GDV-IT", /* 43377 */ "Holger Genth (HGD)", /* 43378 */ "R.J. O'Brien and Associates", /* 43379 */ "Counterpoint Networking, Inc.", /* 43380 */ "GEMATICA SRL", /* 43381 */ "Dreamket Co., Ltd.", /* 43382 */ "Commercial Bank “Severo-Vostochny Alliance” (Joint-Stock сompany)", /* 43383 */ "Pelle Olsson (Raholmen)", /* 43384 */ "Proyectos-IP", /* 43385 */ "Expkits", /* 43386 */ "city of Sioux City, IA", /* 43387 */ "aeworld.co.uk", /* 43388 */ "Eko-konnect Research and Education Initiative", /* 43389 */ "BEIJING FOREVER COMMUNICATION ELECTRONICS CO.,LTD", /* 43390 */ "UTT Co., Ltd.", /* 43391 */ "Agile Digital Engineering Pty Ltd", /* 43392 */ "S-Net", /* 43393 */ "Intrinium, Inc", /* 43394 */ "The City of Amsterdam", /* 43395 */ "earthlab (daichi makino)", /* 43396 */ "NET MEDIA SERVICES a.s.", /* 43397 */ "WILDIX", /* 43398 */ "Tiscali Italia SpA", /* 43399 */ "IT storitve, Gregor Jerše, s.p.", /* 43400 */ "TRData Limited", /* 43401 */ "Layer-7 Technologies", /* 43402 */ "CareerHub Pty Ltd", /* 43403 */ "SOCIEDAD ESTATAL CORREOS Y TELEGRAFOS SA", /* 43404 */ "SA Water Corporation", /* 43405 */ "Universiti Putra Malaysia", /* 43406 */ "David Martin (ReaperLegion)", /* 43407 */ "HDmessaging Inc", /* 43408 */ "Reith IT-Lösungen GmbH", /* 43409 */ "Joseph Williams", /* 43410 */ "Graeser Development", /* 43411 */ "Genius Digital Limited", /* 43412 */ "Fairview Health Services", /* 43413 */ "Molson Coors Brewing Company", /* 43414 */ "Deepblue Informatikai Kft", /* 43415 */ "Multigenregameworld LLC", /* 43416 */ "South Side Hackerspace Chicago, NFP", /* 43417 */ "Khakham Sayavong (Nticks)", /* 43418 */ "Microsoft Unified Communications and Collaboration User Group", /* 43419 */ "Proximic Inc", /* 43420 */ "SysMa.cz", /* 43421 */ "ADTEC Communications", /* 43422 */ "KeyONet", /* 43423 */ "Securitas FINLAND", /* 43424 */ "Aduno Gruppe", /* 43425 */ "Noction", /* 43426 */ "Altus Sistemas de Automação S.A", /* 43427 */ "The William and Flora Hewlett Foundation", /* 43428 */ "Strata Information Technology, Inc", /* 43429 */ "Systems Definition, Inc.", /* 43430 */ "Tate, Inc.", /* 43431 */ "MICROMED BIOTECNOLOGIA LTDA", /* 43432 */ "Sreevidya Aravind", /* 43433 */ "Metacom Pty Ltd", /* 43434 */ "Nutsrange Technologies", /* 43435 */ "Accumuli PLC", /* 43436 */ "City of Montclair", /* 43437 */ "County Of Bruce", /* 43438 */ "J.J. Downs Industrial Plastics Inc.", /* 43439 */ "royal holloway, university of london", /* 43440 */ "royal holloway, university of london", /* 43441 */ "Niles Radio Communications", /* 43442 */ "Transacciones y Servicios Mobile", /* 43443 */ "Inspire Living, Inc.", /* 43444 */ "4th Layer Integrated Solutions S.r.l.", /* 43445 */ "Hartmann Electronic GmbH", /* 43446 */ "LoadFront, S.L.", /* 43447 */ "THEFEINERS.COM", /* 43448 */ "mobilcom-debitel GmbH", /* 43449 */ "Agencja Restrukturyzacji i Modernizacji Rolnictwa", /* 43450 */ "Australian Customs and Border Protection Service", /* 43451 */ "Pragtec inc.", /* 43452 */ "Visiometrics S.L.", /* 43453 */ "Wiccess", /* 43454 */ "LFT Solutions", /* 43455 */ "KHS GmbH", /* 43456 */ "Warp Software Ltda.", /* 43457 */ "Nvizible Ltd", /* 43458 */ "Virsae Group Ltd", /* 43459 */ "university college Leuven Limburg (UCLL)", /* 43460 */ "DGIT INTERNATIONAL PTE. LTD", /* 43461 */ "Universidade Federal Rural de Pernambuco", /* 43462 */ "Kyoto-University Microcomputer Club", /* 43463 */ "Ten Cities Media", /* 43464 */ "Communication Federal Credit Union", /* 43465 */ "CMS Central Media Solutions GmbH", /* 43466 */ "Evolv, Inc.", /* 43467 */ "Cacto Internet Ltda", /* 43468 */ "Sysnove", /* 43469 */ "G + H Netzwerk-Design Gesellschaft für IT-Consulting mbH", /* 43470 */ "Sun Trading Solutions", /* 43471 */ "APC Integrated Services Group, Inc.", /* 43472 */ "YHGfL Foundation", /* 43473 */ "Coca-Cola Hellenic Bottling Company", /* 43474 */ "XNX Sàrl", /* 43475 */ "LeanDev", /* 43476 */ "Bioss Consulting SRL", /* 43477 */ "Jonathon Anderson (civilfritz)", /* 43478 */ "Ecole nationale Supérieure d'Informatique", /* 43479 */ "Canine Creche", /* 43480 */ "Innovaatik OÜ", /* 43481 */ "GlobalSensing Technologies", /* 43482 */ "AIPHONE CO., LTD.", /* 43483 */ "Fundación Fulgor", /* 43484 */ "Trillium Teamologies, Inc.", /* 43485 */ "Fuse Networks, LLC", /* 43486 */ "Guangzhou Woxiang Information Technology Co., Ltd", /* 43487 */ "Schletter GmbH", /* 43488 */ "GOOD FIRST GROUP .", /* 43489 */ "Rite-Tech Industrial Co., Ltd.", /* 43490 */ "ITR Service GmbH", /* 43491 */ "Bernhard Trinnes (microdots)", /* 43492 */ "Online Linjeforening", /* 43493 */ "Clarity Ltd", /* 43494 */ "Taide Enterprise Co.,Ltd.", /* 43495 */ "QSC AG", /* 43496 */ "Weavesys UK", /* 43497 */ "SENSORBOX LTDA", /* 43498 */ "Youncta", /* 43499 */ "4D Security Solutions", /* 43500 */ "Boston Financial Data Services Inc", /* 43501 */ "HighRes Biosolutions", /* 43502 */ "Jay Ridgeway (beekling.com)", /* 43503 */ "Judd Storrs", /* 43504 */ "Plugh Studios Ltd", /* 43505 */ "Beats by Dre", /* 43506 */ "ti&m AG", /* 43507 */ "EDT SAS - Electronic Data Transfer", /* 43508 */ "BITPRO AS", /* 43509 */ "Juan Jose Rodriguez Ponce", /* 43510 */ "E7 Solutions", /* 43511 */ "BEIJING SIFANG AUTOMATION CO., LTD", /* 43512 */ "SDIS68", /* 43513 */ "kt telecop", /* 43514 */ "NISCOM,Inc.", /* 43515 */ "Auvik Networks Inc.", /* 43516 */ "CoolMinds Technologies (P) Ltd", /* 43517 */ "Smartconnect NV / SA", /* 43518 */ "Tranwall", /* 43519 */ "pteam gmbh", /* 43520 */ "RSE Informationstechnologie GmbH", /* 43521 */ "VoltServer, Inc.", /* 43522 */ "Alberta Investment Management Corporation", /* 43523 */ "Vanteon Corp.", /* 43524 */ "Wavecon GmbH", /* 43525 */ "Signal Bredbånd AS", /* 43526 */ "Presidio Networked Solutions", /* 43527 */ "SHODEN CORPORATION", /* 43528 */ "Istituto Radiologico e Fisioradioterapico Valdarno", /* 43529 */ "HYTEC INTER Co.,Ltd.", /* 43530 */ "Atomic Object LLC", /* 43531 */ "Yafeng Shan (kokonur)", /* 43532 */ "Beijing National Railway Research & Design Institude of Signal & Communication Co, Ltd. (CRSCD)", /* 43533 */ "Alstom Grid", /* 43534 */ "Luxottica North America Distribution LLC", /* 43535 */ "AO K-Dorstroy", /* 43536 */ "Solumed", /* 43537 */ "EXA-TMR", /* 43538 */ "Dwarf Animation Studio", /* 43539 */ "Federal Agricultural Marketing Authority", /* 43540 */ "LSY Inc", /* 43541 */ "DENT Instruments", /* 43542 */ "ID Business Solutions Ltd", /* 43543 */ "DigiComm GmbH", /* 43544 */ "Omnitracs, LLC", /* 43545 */ "Tariox Limited", /* 43546 */ "SCOOP Software GmbH", /* 43547 */ "Trasis sa", /* 43548 */ "IT Competence Group SE", /* 43549 */ "CAMEA spol. s r. o.", /* 43550 */ "Mavari-IT bvba", /* 43551 */ "Whitesky Communications", /* 43552 */ "Rapid Focus Security, Inc.", /* 43553 */ "IGC", /* 43554 */ "LayeredDefense", /* 43555 */ "Rigas domes Informacijas tehnologiju centrs", /* 43556 */ "Nick Fender", /* 43557 */ "GitHub, Inc", /* 43558 */ "ENKOM AG", /* 43559 */ "New Orleans East Hospital", /* 43560 */ "Micro-Research Finland Oy", /* 43561 */ "ZepMed, LLC", /* 43562 */ "pedro paulo medeiros", /* 43563 */ "TSC AUTO ID Technology Co., Ltd.", /* 43564 */ "Reliance Jio Infocomm Limited", /* 43565 */ "Engineering Center REGIONAL SYSTEMS, Limited", /* 43566 */ "Yongjia County Board of Education", /* 43567 */ "EMICON", /* 43568 */ "Hong Yun Technology", /* 43569 */ "Coopérative Forestière Bourgogne Limousin (CFBL)", /* 43570 */ "SOCIETE DES TRANSPORTS ROCHATTE", /* 43571 */ "Foundation for Research and Technology Hellas", /* 43572 */ "VSAT-SERVICE", /* 43573 */ "Lansing Makers Network", /* 43574 */ "OpenPeak", /* 43575 */ "IntSec.NET", /* 43576 */ "CNPC Beijing Richfit Information Technology Co.,LTD.", /* 43577 */ "42technology AG", /* 43578 */ "EASYPROTO di Giacomo Cesari", /* 43579 */ "SutherlandGlobalServices", /* 43580 */ "Ooyala Inc.", /* 43581 */ "Document Centric Solutions Ltd", /* 43582 */ "ReMake Electric", /* 43583 */ "Trizetto Provider Solutions", /* 43584 */ "SAMSON AG", /* 43585 */ "SVS TELEKOMÜNİKASYON HİZ. TİC. SAN. A.Ş.", /* 43586 */ "Roave, LLC.", /* 43587 */ "SAA Topnet GmbH", /* 43588 */ "KEKLOLWTF AS", /* 43589 */ "HAL9k hackerspace", /* 43590 */ "Erlang Solutions LTD", /* 43591 */ "Campbell Scientific, Incorporated", /* 43592 */ "Crimson Innovative", /* 43593 */ "Interhyp AG", /* 43594 */ "MolinoSoft (Julian Bourne)", /* 43595 */ "Carnegie Fitness", /* 43596 */ "Comprehensive Health Management, Inc.", /* 43597 */ "STORM", /* 43598 */ "Paneidos Desu", /* 43599 */ "Beijing Easesky Netcom Technology Co.,Ltd", /* 43600 */ "Nuri Technology Co., Ltd.", /* 43601 */ "Rossiya Segodnya", /* 43602 */ "The Twelve Tribes", /* 43603 */ "Arkansas Educational Television Network (AETN)", /* 43604 */ "Metatrust", /* 43605 */ "nobaq.net", /* 43606 */ "Funda Real Estate B.V.", /* 43607 */ "Raben Group", /* 43608 */ "NetCracker Technology Corp.", /* 43609 */ "ColosseoEAS, a.s.", /* 43610 */ "Power Ethernet", /* 43611 */ "IOLAN", /* 43612 */ "Skylife Engineering", /* 43613 */ "phaenovum Schülerforschungszentrum Lörrach-Dreiländereck e.V.", /* 43614 */ "VonRoll", /* 43615 */ "Aventura Technologies Inc.", /* 43616 */ "Vidant Health", /* 43617 */ "Camtrace", /* 43618 */ "LianYunGang E-Port Information Development Co.,Ltd", /* 43619 */ "Shenzhen Headsun Technology", /* 43620 */ "Medical Effect", /* 43621 */ "WebPerative LLC", /* 43622 */ "Umensis - Guillaume Pannatier", /* 43623 */ "Jaroslav Sendler (xsendl00)", /* 43624 */ "Core Technology", /* 43625 */ "NewB", /* 43626 */ "Devani Creative", /* 43627 */ "The Rubicon Project", /* 43628 */ "PSITEX, LLC", /* 43629 */ "Duxoft, Inc.", /* 43630 */ "Heijmans N.V.", /* 43631 */ "Celtex Works", /* 43632 */ "AIES Advanced Industrial Electronic Systems", /* 43633 */ "Metrellis, Inc.", /* 43634 */ "Practice Velocity, LLC", /* 43635 */ "LES.NET", /* 43636 */ "Zymer Inc.", /* 43637 */ "ITS Korea", /* 43638 */ "Evoluta Interactive", /* 43639 */ "THROUGHOTHEREYES (Jonathan Platzer)", /* 43640 */ "netplus.ch SA", /* 43641 */ "Linde Engineering", /* 43642 */ "TEQ SA", /* 43643 */ "Infra Services", /* 43644 */ "FEIG ELECTRONIC GmbH", /* 43645 */ "Datatal AB", /* 43646 */ "Rimbach IT Systems UG", /* 43647 */ "Naudit High Performance Computing and Networking S.L.", /* 43648 */ "Raritan Bay Medical Center", /* 43649 */ "United Health Services", /* 43650 */ "INTTRA Inc", /* 43651 */ "GoBICS", /* 43652 */ "UNIVERSITAT OBERTA DE CATALUNYA", /* 43653 */ "marcsi.ch", /* 43654 */ "University Ecclesiastical Academy of Thessaloniki", /* 43655 */ "Consortium", /* 43656 */ "Kanton St.Gallen", /* 43657 */ "Seacloud", /* 43658 */ "Hochschule für Technik und Wirtschaft des Saarlandes (htw saar)", /* 43659 */ "Zadara Storage Ltd", /* 43660 */ "Columbus Business Solutions", /* 43661 */ "Simpson Housing LLLP", /* 43662 */ "eTouch Federal Systems", /* 43663 */ "Unzane", /* 43664 */ "rioxo GmbH", /* 43665 */ "Hackerspace Brussels", /* 43666 */ "Sunwire Inc", /* 43667 */ "Andreas Kreisel", /* 43668 */ "The Institute of Mathematical Sciences", /* 43669 */ "Epic Code Pty. Ltd.", /* 43670 */ "EMSEAS Teknik AB", /* 43671 */ "INTELLECT MODULE", /* 43672 */ "Federal State Unitary Enterprise CentrInform", /* 43673 */ "Robonect", /* 43674 */ "Accenture CAS GmbH", /* 43675 */ "57North Hacklab", /* 43676 */ "ICT Plus srl", /* 43677 */ "Michael Kramer", /* 43678 */ "SETTE", /* 43679 */ "Chorus Limited", /* 43680 */ "ELESTER-PKP Sp. z o.o.", /* 43681 */ "ITSA Consulting, LLC", /* 43682 */ "ALDEIS", /* 43683 */ "NOVASIB GmbH", /* 43684 */ "biz:Consult Unternehmensberatung GmbH", /* 43685 */ "Jefferson County", /* 43686 */ "Christoph Knott - IT-Sicherheitstechnik", /* 43687 */ "GERMEN ELEKTRONIK LTD", /* 43688 */ "schugart", /* 43689 */ "The Active Network", /* 43690 */ "Michael Kettner", /* 43691 */ "haberberger.com", /* 43692 */ "Fotolia LLC", /* 43693 */ "Omega Intelligence Systems Ltd", /* 43694 */ "5nine Software", /* 43695 */ "LLC Info-Kontent", /* 43696 */ "JSC Tyumen Electricity sale company", /* 43697 */ "Joint Electronic Teller Services Ltd.", /* 43698 */ "EasyData, LLC", /* 43699 */ "PathCore", /* 43700 */ "HySecurity, Inc.", /* 43701 */ "Dom-Daniel", /* 43702 */ "Wacom Company Ltd.", /* 43703 */ "Accutron Instruments Inc", /* 43704 */ "F!nTcH.org", /* 43705 */ "Statnett SF", /* 43706 */ "Australian Rail Tecchnology", /* 43707 */ "SimonMed Imaging", /* 43708 */ "AirDSL (Pty) Ltd", /* 43709 */ "GAMESA", /* 43710 */ "mySupply ApS", /* 43711 */ "Universidad Central de Venezuela", /* 43712 */ "Code 42", /* 43713 */ "Mega Soft Computación, C.A.", /* 43714 */ "Data Infrastructure Technologies Ltd.", /* 43715 */ "Veterinary Nurse Solutions Pty Ltd", /* 43716 */ "imensup", /* 43717 */ "Österreichisches Weltraum Forum", /* 43718 */ "Telvio LLC", /* 43719 */ "Creat0r.pro", /* 43720 */ "Cyberoam Technologies Pvt. Ltd.", /* 43721 */ "DAC Systems, Inc.", /* 43722 */ "Stancil Corporation", /* 43723 */ "Japan Prime Computing", /* 43724 */ "Casair, Inc", /* 43725 */ "GO! Express & Logistics Deutschland GmbH", /* 43726 */ "Valeo Comfort ans Driving assitance", /* 43727 */ "Sinergise Ltd.", /* 43728 */ "Teckids e.V.", /* 43729 */ "Ernst Klett AG", /* 43730 */ "FooxTek Co., LTD.", /* 43731 */ "Netmag Technology Corporation", /* 43732 */ "East Photonics, Inc.", /* 43733 */ "IQUO Ltd", /* 43734 */ "STI-Tassimco", /* 43735 */ "Standard Imaging, Inc.", /* 43736 */ "MedAllies", /* 43737 */ "Doshisha University", /* 43738 */ "Concept Smoke screen Ltd", /* 43739 */ "ASB-Technology Sp. z o.o.", /* 43740 */ "Cerqueira & Marcos, Lda", /* 43741 */ "Microx Computer GmbH", /* 43742 */ "Open Systems Technology, Pty.", /* 43743 */ "airberlin", /* 43744 */ "CONSEJO DE LA JUDICATURA", /* 43745 */ "Ulterius Technologies, LLC", /* 43746 */ "MaterialApps", /* 43747 */ "ARES Conocimiento de Negocio, SL", /* 43748 */ "Country Bright Company Ltd.", /* 43749 */ "Jabil Circuit, Inc", /* 43750 */ "Shenzhen TG-NET Botone Technology CO. Ltd.", /* 43751 */ "China Film Equipment Co. Ltd.", /* 43752 */ "Kyriasis", /* 43753 */ "Philipp Wagner Softwareentwicklung", /* 43754 */ "BG-Phoenics GmbH", /* 43755 */ "Schwarz Dienstleistung KG", /* 43756 */ "QOSIT AG", /* 43757 */ "Clique Intelligence Inc.", /* 43758 */ "Big White Network Technologies,Ltd.", /* 43759 */ "Atlas Networks", /* 43760 */ "Our School Ltd", /* 43761 */ "PlazaLotusGroup", /* 43762 */ "ChinaFilm Global (Beijing) Technology limited", /* 43763 */ "Tallac Networks", /* 43764 */ "Color Print", /* 43765 */ "MBSys LLC Azerbaijan", /* 43766 */ "Eastern Long Island Hospital", /* 43767 */ "GatesAir, Inc.", /* 43768 */ "Vezea", /* 43769 */ "Addat s.r.o.", /* 43770 */ "Behlman Electronics", /* 43771 */ "K+S IT-Services GmbH", /* 43772 */ "The Vancouver Clinic Inc.", /* 43773 */ "Hortonworks Inc", /* 43774 */ "Quotepro Inc", /* 43775 */ "Symbiotic System Design", /* 43776 */ "Maikel de Boer", /* 43777 */ "Hampshire Controls Corporation", /* 43778 */ "Finnova AG", /* 43779 */ "Paradox Networks, Inc", /* 43780 */ "Moshel Kamadu Records", /* 43781 */ "UPS Solutions INC.", /* 43782 */ "WaveNet Communications Private Limited", /* 43783 */ "IFOM", /* 43784 */ "Magellium", /* 43785 */ "Factual Inc", /* 43786 */ "Leviathan Security Technologies", /* 43787 */ "Comita d.d.", /* 43788 */ "Trading & Consulting 'H.P.C.' GmbH", /* 43789 */ "becker-aero", /* 43790 */ "Cine Digital Service", /* 43791 */ "Now Wireless Limited", /* 43792 */ "Tom Gundersen (systemd)", /* 43793 */ "Chris Thomson", /* 43794 */ "Guangzhou Andea Electronics Technology Co.,Ltd", /* 43795 */ "Rasing IT Solutions", /* 43796 */ "Croz d.o.o.", /* 43797 */ "NANJING SAND TECHNOLOGY CO., LTD", /* 43798 */ "TRUMPF GmbH + Co. KG", /* 43799 */ "OraSentry", /* 43800 */ "Dolphin Systems AG", /* 43801 */ "Avaloq Evolution AG", /* 43802 */ "University of South Wales", /* 43803 */ "Bombardier Aerospace", /* 43804 */ "Metalogix International GmbH", /* 43805 */ "Shape Security, Inc", /* 43806 */ "CENTRI Technology, Inc.", /* 43807 */ "Spincat Studios", /* 43808 */ "University of the Philippines", /* 43809 */ "Li Hongnan (LiHN)", /* 43810 */ "University of the Philippines Mindanao", /* 43811 */ "Corscience GmbH & Co. KG", /* 43812 */ "Centraal Justitieel Incassobureau", /* 43813 */ "GNU Networks Ltd.", /* 43814 */ "The University of Texas M.D. Anderson Cancer Center", /* 43815 */ "Tran Industries LLC", /* 43816 */ "Vertex Business Services", /* 43817 */ "Featurespace Limited", /* 43818 */ "pulse technologies", /* 43819 */ "Mozy, Inc.", /* 43820 */ "Suwannee County School Board", /* 43821 */ "Nok Nok Labs, Inc.", /* 43822 */ "VAS Experts", /* 43823 */ "ConectaIP Tecnologia S.L.", /* 43824 */ "Earnest Products, Inc. dba Southern Manufacturing", /* 43825 */ "TEXKA LABS", /* 43826 */ "Ideosoft C.B.", /* 43827 */ "Bosoft", /* 43828 */ "Ifield School", /* 43829 */ "eWater Pty Ltd", /* 43830 */ "Ezvoicetek Co., Ltd.", /* 43831 */ "Beijing D&S FieldBus Technology Co.,Ltd", /* 43832 */ "LIVECREATION", /* 43833 */ "Urban Systems Design Institute", /* 43834 */ "HOCHTIEF CZ, a.s.", /* 43835 */ "C Tech Bilisim Teknolojileri San.ve Tic. A.S", /* 43836 */ "DTI Group Ltd", /* 43837 */ "Genex Hellas L.T.D", /* 43838 */ "RailComm LLC", /* 43839 */ "Sumitomo Mitsui Banking Corporation", /* 43840 */ "Eatel", /* 43841 */ "Zero Waste Scotland", /* 43842 */ "Alter Trading Corporation, LLC", /* 43843 */ "GuangDong Big Banian Info Tech Co., Ltd.", /* 43844 */ "Toshiba Tec Solution Services Corporation", /* 43845 */ "University of the Philippines - Baguio", /* 43846 */ "A Hagedoorn Electronics", /* 43847 */ "INoTHINGS GmbH", /* 43848 */ "LiiON, LLC", /* 43849 */ "Doxcelerate Corporation", /* 43850 */ "danieLLegal.Net - Rechtsanwälte", /* 43851 */ "Truseco, s.r.o.", /* 43852 */ "Academy of Economic Studies of Moldova", /* 43853 */ "TU Investment Club e.V.", /* 43854 */ "ezIX.org", /* 43855 */ "UNIT4 Business Software Spain S.L.U.", /* 43856 */ "mITra data", /* 43857 */ "Grigorivska International School", /* 43858 */ "Harbor Freight Tools", /* 43859 */ "Groenewoud", /* 43860 */ "New York Genome Center", /* 43861 */ "Drei Banken EDV Ges.m.b.H.", /* 43862 */ "Valour Security Ltd", /* 43863 */ "Breeze Innovations Private Limited", /* 43864 */ "Matthias Krause (spectre-net)", /* 43865 */ "beijing huafei technology co.,ltd", /* 43866 */ "Rename it", /* 43867 */ "Conjur Inc", /* 43868 */ "Yatharth Gupta", /* 43869 */ "Precyse Technologies", /* 43870 */ "Metricell Ltd.", /* 43871 */ "Q'ligent.inc", /* 43872 */ "TA Associates", /* 43873 */ "pmacct", /* 43874 */ "TeKnowledgy, Inc.", /* 43875 */ "Centre Hospitalier Universitaire Sainte-Justine", /* 43876 */ "Dalian Rural Commercial Bank Co.,Ltd.", /* 43877 */ "Embross Group", /* 43878 */ "Chengdu Fuhuaxin Technology Co.,Ltd.", /* 43879 */ "FRAKO Kondensatoren- und Anlagenbau GmbH", /* 43880 */ "Informatics Services Corporation (ISC)", /* 43881 */ "DHBW Villingen Schwenningen", /* 43882 */ "NiVo Engineering BV", /* 43883 */ "AnyCode Kft.", /* 43884 */ "WCC Group BV", /* 43885 */ "Anjary Pty Ltd", /* 43886 */ "ΒΥΤΕ COMPUTER S.A", /* 43887 */ "Agiloo S.r.l. Semplificata", /* 43888 */ "datenkollektiv.net", /* 43889 */ "Thotaka Technologies Private Limited", /* 43890 */ "SMY.com", /* 43891 */ "NerySEC", /* 43892 */ "Hope Bay Technologies, Inc.", /* 43893 */ "HedoN electronic developments B.V.", /* 43894 */ "Institut für Holztechnologie Dresden gemeinnützige GmbH", /* 43895 */ "Emercit", /* 43896 */ "Amped Wireless", /* 43897 */ "Hudson City Savings Bank", /* 43898 */ "atlantis software", /* 43899 */ "Teramatrix Technologies Private Limited", /* 43900 */ "Talisman Sinopec Energy UK Limited", /* 43901 */ "Enkel Tecnologia", /* 43902 */ "LIons Clubs International - Multi District 111 (Germany)", /* 43903 */ "BitronikLab", /* 43904 */ "MelRok LLC", /* 43905 */ "Tegile Systems, Inc.", /* 43906 */ "CloudThing Ltd.", /* 43907 */ "Hawking Technology, Inc.", /* 43908 */ "Association PauLLA", /* 43909 */ "Pravala Inc.", /* 43910 */ "Thureon Limited", /* 43911 */ "FUJI FURUKAWA ENGINEERING & CONSTRUCTION Co.Ltd.", /* 43912 */ "Zhejiang Science Electronic Technology Co., Ltd", /* 43913 */ "The Administrative Committee of Jiangning Development Zone", /* 43914 */ "Wallace Kroeker", /* 43915 */ "Van Lanschot", /* 43916 */ "SantéLink SAS", /* 43917 */ "Marina Del Rey Hospital", /* 43918 */ "Neoteck Grup", /* 43919 */ "Shandong Chaoyue Digital Control Electronics Co., Ltd.", /* 43920 */ "CJSC STC SIMOS", /* 43921 */ "Equra Health Trust", /* 43922 */ "Ivan Leonardi", /* 43923 */ "Standard Transfer Specification Association", /* 43924 */ "EastWind", /* 43925 */ "CSI.NET, Inc.", /* 43926 */ "ID.me, Inc.", /* 43927 */ "Vantage Communications", /* 43928 */ "WellerNET", /* 43929 */ "Radlink Communications", /* 43930 */ "IFB Institut für Bahntechnik GmbH", /* 43931 */ "Bluwireless Technology Limited", /* 43932 */ "Exploros inc.", /* 43933 */ "Võrumaa Kutsehariduskeskus", /* 43934 */ "Keen IO", /* 43935 */ "zhong yuan hua dian", /* 43936 */ "Tieto Signaling Solutions", /* 43937 */ "Memorable Images", /* 43938 */ "invliD", /* 43939 */ "WISAG Dienstleistungsholding GmbH", /* 43940 */ "Event Store LLP", /* 43941 */ "Luma Pictures", /* 43942 */ "VOLTRONIC POWER TECHNOLOGY CORP.", /* 43943 */ "VOLTRONIC POWER TECHNOLOGY CORP.", /* 43944 */ "Telenia Software srl", /* 43945 */ "Vanilla.no", /* 43946 */ "LichtBlick SE", /* 43947 */ "Taiwan Intelligent Home", /* 43948 */ "Aceyus, Inc.", /* 43949 */ "NexxCom Wireless", /* 43950 */ "Denovo Ventures LLC", /* 43951 */ "LRAD Corporation", /* 43952 */ "closerlook, inc.", /* 43953 */ "Seno Medical Instruments Inc.", /* 43954 */ "Radiology Associates LLP", /* 43955 */ "Total Restyling di Tola Rosa", /* 43956 */ "Multitone Electronic plc", /* 43957 */ "University of Innsbruck", /* 43958 */ "Torraspapel SA", /* 43959 */ "SaF GmbH", /* 43960 */ "OKTAL, SAS", /* 43961 */ "Utena University of Applied Sciences", /* 43962 */ "Thruput Ltd", /* 43963 */ "Silpakorn University", /* 43964 */ "akraas.de", /* 43965 */ "J4SYSTEMS SOLUCOES TECNOLOGICAS LTDA.", /* 43966 */ "Manthorpe Ltd", /* 43967 */ "California University of Pennsylvania", /* 43968 */ "NIPPON FIELD ENGINEERING Co.,Ltd.", /* 43969 */ "Bächtold & Moor AG", /* 43970 */ "Map59", /* 43971 */ "DriveWorks Ltd", /* 43972 */ "Universidad Nacional de Córdoba - UNC", /* 43973 */ "Elcoma", /* 43974 */ "DaedaFusion, LLC", /* 43975 */ "University of the Philippines Cebu", /* 43976 */ "HomeSend SCRL", /* 43977 */ "IKATA NETWORKS", /* 43978 */ "IMED Engineering s.r.o.", /* 43979 */ "Cerritos College", /* 43980 */ "Partnet, Inc.", /* 43981 */ "Analytical Flavor Systems", /* 43982 */ "Colibri Technologies Inc.", /* 43983 */ "MPL Technology Group", /* 43984 */ "WebINTENSIVE Software", /* 43985 */ "Privredna Banka Zagreb d. d.", /* 43986 */ "ALVA IT-Solutions", /* 43987 */ "Bichara Tecnologia Ltd", /* 43988 */ "EEMRA Inc.", /* 43989 */ "Tropo, Inc.", /* 43990 */ "Elektrum, S.A.R.L", /* 43991 */ "Power Assure, Inc", /* 43992 */ "Security First Corp.", /* 43993 */ "QuanTemplate Technologies Limited", /* 43994 */ "Axentia Technologies AB", /* 43995 */ "Bloomington Medical Services", /* 43996 */ "Cellwize wireless technologies PTE LTD", /* 43997 */ "Computerwork GmbH", /* 43998 */ "Agencija za komercijalnu djelatnost d.o.o.", /* 43999 */ "PointSecure Technologies Inc", /* 44000 */ "Shenzhen Envicool Technology Co., Ltd.", /* 44001 */ "Gridwiz, Inc.", /* 44002 */ "AutoGrid Systems", /* 44003 */ "BYKING INC.", /* 44004 */ "Wadi Chadli", /* 44005 */ "Xunlei Networking Technologies,Ltd.", /* 44006 */ "Informatica Bancaria Trentina", /* 44007 */ "SYSTECH", /* 44008 */ "WebPKI.org", /* 44009 */ "OadisCorp", /* 44010 */ "eMortgage Logic", /* 44011 */ "Tata advanced systems limited (TASL)", /* 44012 */ "MPEC Technology Ltd", /* 44013 */ "Tyco Fire & Integrated Solutions (UK) Ltd.", /* 44014 */ "DataInfo", /* 44015 */ "Baikal Electronics", /* 44016 */ "SmartGuard, LLC", /* 44017 */ "exiztec", /* 44018 */ "MAXIMA GROUP, UAB", /* 44019 */ "Router Networking Ltd.", /* 44020 */ "Alliance Resource Partners, L.P. (ARLP)", /* 44021 */ "Advanced Publishing Technology", /* 44022 */ "Karther Ingeniería", /* 44023 */ "ConnectSolutions", /* 44024 */ "Foobar Development LLC", /* 44025 */ "Smart4Aviation Group", /* 44026 */ "Shop Airlines, Ltd.", /* 44027 */ "Extreme-Access.com", /* 44028 */ "Nestlé Operational Services Worldwide SA", /* 44029 */ "WooshCom Corporation", /* 44030 */ "TrustCor Systems S. de R.L.", /* 44031 */ "Cloud Utility District", /* 44032 */ "Mobitech", /* 44033 */ "S Broker AG & Co. KG", /* 44034 */ "Wojskowe Zaklady Lacznosci nr 1 S.A.", /* 44035 */ "OPENNETEUROPE", /* 44036 */ "Deželna banka Slovenije d. d.", /* 44037 */ "Filmakademie Baden-Württemberg GmbH", /* 44038 */ "Wind Mobile SA", /* 44039 */ "IEI Integration Corp.", /* 44040 */ "Conntrack Technologies", /* 44041 */ "Instituto Nacional de Tecnologias de Informacao e Comunicacao (INTIC)", /* 44042 */ "BSG-IT Kft.", /* 44043 */ "SETCCE", /* 44044 */ "Dos al Cubo", /* 44045 */ "POK Power of Knowledge", /* 44046 */ "Schreiber Foods Inc", /* 44047 */ "Instytut Hodowli i Aklimatyzacji Roslin - Panstwowy Instytut Badawczy", /* 44048 */ "Cloud2Ground Technologies Div. Digital Multimedia, LLC", /* 44049 */ "Cryptografree (David Hoyle)", /* 44050 */ "Sapporo Gakuin University", /* 44051 */ "Beijing Cloud Core Network Technology Co., Ltd.", /* 44052 */ "ELFTECH Co., Ltd.", /* 44053 */ "Hörmann KG Verkaufsgesellschaft", /* 44054 */ "Identity And Access Management Technologies (IAM Tec)", /* 44055 */ "Aktif Mühendislik", /* 44056 */ "predata.org", /* 44057 */ "Avalanche Cloud Corporation", /* 44058 */ "School District #63 (Saanich)", /* 44059 */ "Iridium Communications Inc", /* 44060 */ "Tippecanoe County Government", /* 44061 */ "FlightStats Inc.", /* 44062 */ "ACCESS CO., LTD.", /* 44063 */ "Quobyte Inc.", /* 44064 */ "PROGSTAR", /* 44065 */ "Fachschaftinformatik, WHS", /* 44066 */ "McStas project", /* 44067 */ "Major League Baseball Advanced Media", /* 44068 */ "Groupe Citypassenger Inc", /* 44069 */ "IFTER", /* 44070 */ "New Relic, Inc", /* 44071 */ "Lee County Schools", /* 44072 */ "Data People Pty Ltd", /* 44073 */ "Servyou", /* 44074 */ "Beijing Nan Bao Technology Co., Ltd.", /* 44075 */ "Landtag von Baden-Württemberg", /* 44076 */ "PST AG", /* 44077 */ "Taiwan Mobile Payment Co.", /* 44078 */ "NPO SISTEMI S.p.A.", /* 44079 */ "TNTNET", /* 44080 */ "UNI LEADER INTERNATIONAL LTD", /* 44081 */ "Beijing DTLT Technology CO., LTD.", /* 44082 */ "GuiLin HYGJ communication technology co., Ltd", /* 44083 */ "B. Metzler seel. Sohn & Co. KGaA", /* 44084 */ "Display Quality Equipment, S.L", /* 44085 */ "E-T-A Elektrotechnische Apparate GmbH", /* 44086 */ "Hammond Consulting Services", /* 44087 */ "CODESA - Grupo Empresarial de la Construcción, Santiago de Cuba, Cuba", /* 44088 */ "ABit Consulting", /* 44089 */ "CSG Global LLC", /* 44090 */ "Agilion GmbH", /* 44091 */ "Sigel GmbH", /* 44092 */ "Bell Ambulance, Inc.", /* 44093 */ "Aser Secury", /* 44094 */ "Kagoshima University", /* 44095 */ "Shenzhen Zhong Yuan Tong Power Supply Technology Co., Ltd.", /* 44096 */ "db-central GmbH", /* 44097 */ "Patchman B.V.", /* 44098 */ "CyberSeal LTD", /* 44099 */ "SLASH16", /* 44100 */ "Radiss s.c.", /* 44101 */ "GRC Advisory Solutions", /* 44102 */ "Agora Con GmbH", /* 44103 */ "Groupe Alsatis", /* 44104 */ "BHS tabletop AG", /* 44105 */ "IMSWorkX, Inc.", /* 44106 */ "Rivada Networks, LLC", /* 44107 */ "Telecom Argentina S.A.", /* 44108 */ "FAA National Airspace Systems", /* 44109 */ "Nowa Era Sp. z o.o.", /* 44110 */ "Guangzhou Younghead Electronic Technology Co.,Ltd", /* 44111 */ "Rabobank International", /* 44112 */ "Villeroy & Boch AG", /* 44113 */ "RealVNC Ltd", /* 44114 */ "Height8 Technologies Pvt. Ltd", /* 44115 */ "RosBusinessConsulting, CJSC", /* 44116 */ "Cross Borders Trust Services OÜ", /* 44117 */ "Noakes", /* 44118 */ "Creighton", /* 44119 */ "Avairis, Inc.", /* 44120 */ "HRK Soft Group Ltd.", /* 44121 */ "T17R (Martin Treusch von Buttlar)", /* 44122 */ "Business-intelligence of Oriental Nations Corporation, Ltd.", /* 44123 */ "bit media e-solutions gmbh.", /* 44124 */ "Lanyo Networks Co., LTD.", /* 44125 */ "Lookhere Design", /* 44126 */ "Borderlight AB", /* 44127 */ "MapGear", /* 44128 */ "beijing yunzheng telecommunication technology Co, LTD", /* 44129 */ "Michael Ghazi", /* 44130 */ "Nanjing DunLei Network Technology Co.,Ltd.", /* 44131 */ "OpsVision Solutions", /* 44132 */ "Commerce Technologies, Inc.", /* 44133 */ "Bless Information & Communication Inc.", /* 44134 */ "Jonkoping Energi AB", /* 44135 */ "Data Controls Inc.", /* 44136 */ "KaiXiang", /* 44137 */ "NodeForge", /* 44138 */ "Vizury Interactive Solutions Pvt. Ltd", /* 44139 */ "Rapp Management AG", /* 44140 */ "Rosbank", /* 44141 */ "Edidin Group, Inc", /* 44142 */ "kazalo GmbH", /* 44143 */ "Symbolic IO", /* 44144 */ "Pokazz sp. z o.o.", /* 44145 */ "INSYS K.Bartkowski, P.Czekala sp.j.", /* 44146 */ "Diagnostic Imaging Associates", /* 44147 */ "Nanjing Tsinghua Novel Network Technology Co.,Ltd.", /* 44148 */ "KouXianglong", /* 44149 */ "Intermarketing Oy", /* 44150 */ "Metrovision", /* 44151 */ "Kambio Company", /* 44152 */ "DreamCode S.A.S.", /* 44153 */ "InfoStreet, Inc.", /* 44154 */ "Sacred Heart Hospital of Allentown", /* 44155 */ "Computer Applications & Technical Services", /* 44156 */ "Stadtverwaltung Duebendorf", /* 44157 */ "Mediterranean Broadband Infrastructure s.r.l.", /* 44158 */ "DK-Technologies", /* 44159 */ "Contra Costa Oncology", /* 44160 */ "Tri-County Hematology & Oncology Assoc.", /* 44161 */ "CHAMPLAIN VALLEY HEMATOLOGY ONCOLOGY, PC", /* 44162 */ "University of SS. Cyril and Methodius in Trnava", /* 44163 */ "OutSmart Power Systems LLC", /* 44164 */ "Eduardo Miranda MD", /* 44165 */ "Andrews & Patel Associates, P.C", /* 44166 */ "North Texas Gynecologic Oncology", /* 44167 */ "NetCraft Australia Pty Ltd", /* 44168 */ "FIDA INTERNATIONAL (S) PTE LTD", /* 44169 */ "Decision Group Inc.", /* 44170 */ "RogSibAl LLC", /* 44171 */ "Hangzhou Kuaiyue Mobile Technologies, Ltd.", /* 44172 */ "InPhoSys Ltd", /* 44173 */ "Baptist Health Cancer Care & Blood Disorders", /* 44174 */ "Urology Cancer Center", /* 44175 */ "SOCIETE REUNIONNAISE DU RADIOTELEPHONE", /* 44176 */ "INSTITUTO DE HEMATOLOGIA Y ONCOLOGIA MEDICA, SRL", /* 44177 */ "Cancer Clinic", /* 44178 */ "Daniel Stensnes", /* 44179 */ "Oncology & Hematology Associates of West Broward, P.A.", /* 44180 */ "Chitra Venkatraman, M.D., P.A.", /* 44181 */ "Associates in Oncology/Hematology", /* 44182 */ "Security Confidence Corporation", /* 44183 */ "Ma-Ya IT Consult, e.U.", /* 44184 */ "Horizon Medical Group, Inc", /* 44185 */ "Keats, Connelly & Associates, LLC", /* 44186 */ "Zirtual Inc", /* 44187 */ "Cancer Center Oncology Medical Group", /* 44188 */ "Pacific Cancer Care", /* 44189 */ "PostAR", /* 44190 */ "CLG Enterprises", /* 44191 */ "Remego Ltd.", /* 44192 */ "Beijing DATAX Technology Co., Ltd.", /* 44193 */ "EnGenius Networks, Inc.", /* 44194 */ "Southern Oncology Specialists, PLLC", /* 44195 */ "SecureRF Corporation", /* 44196 */ "Piedmont Cancer Institute", /* 44197 */ "Cancer and Hematology Centers of Western Michigan", /* 44198 */ "University of New South Wales", /* 44199 */ "Markit Ltd", /* 44200 */ "Micromation.Net", /* 44201 */ "American Energy Partners, LP", /* 44202 */ "Global 3R Ltd.", /* 44203 */ "Medical Oncology Associates of Long Island, PC", /* 44204 */ "BandRich, Inc.", /* 44205 */ "Fujitsu Isotec Limited", /* 44206 */ "Proxee Solutions", /* 44207 */ "Telecom Personal Paraguay", /* 44208 */ "fsis GmbH", /* 44209 */ "Robadey Network", /* 44210 */ "GGR Communications Ltd", /* 44211 */ "Oncology Hematology Care of Connecticut, LLC", /* 44212 */ "Happy Gears Inc", /* 44213 */ "Erie Indemnity Company", /* 44214 */ "Arsslensoft", /* 44215 */ "FUYOH VIDEO INDUSTRY CO.,LTD.", /* 44216 */ "FiberRoad", /* 44217 */ "Buffalo Boots GmbH", /* 44218 */ "Beijing Raytight Technologies, Co", /* 44219 */ "Netzin Technology Corporation,.Ltd.", /* 44220 */ "Primary Oncology Network, PLLC", /* 44221 */ "Fox Valley Hematology Oncology/Illinois Cancer Specialists", /* 44222 */ "GE AVIC Civil Avionics Systems Company Limited", /* 44223 */ "MATTHEW TAUB MD PA", /* 44224 */ "Mr.yassine hamraoui", /* 44225 */ "sonoran hematology oncology", /* 44226 */ "Pulse Secure", /* 44227 */ "port GmbH", /* 44228 */ "Wanco Inc", /* 44229 */ "Bundesamt für Seeschifffahrt und Hydrographie", /* 44230 */ "Queens Medical Associates, PC", /* 44231 */ "Ing. Büro Mann", /* 44232 */ "Balluff GmbH", /* 44233 */ "VIT S.A.", /* 44234 */ "Ospero Pty. Ltd.", /* 44235 */ "Compassionate Oncology Medical Group", /* 44236 */ "Allegro Packets GmbH", /* 44237 */ "Esense Embeded", /* 44238 */ "Centro de cancer de la mujer de Puerto Rico", /* 44239 */ "Rocket Internet AG", /* 44240 */ "LotusCom Inc.", /* 44241 */ "Radomir LLC", /* 44242 */ "NSTEK Inc.", /* 44243 */ "Gardens Regional Hospital and Medical Center, Inc.", /* 44244 */ "Fazion Sistemas Ltda", /* 44245 */ "St. Louis Cancer Care, LLC", /* 44246 */ "CLEAR SRL", /* 44247 */ "Simula Research Laboratory", /* 44248 */ "Florida Cancer Specialists & Research Institute", /* 44249 */ "Coastal Integrative Cancer Care", /* 44250 */ "IMT Services Corp", /* 44251 */ "Iceotope", /* 44252 */ "HANKYUNG I-NET", /* 44253 */ "LuckyBulldozer", /* 44254 */ "Medical Oncology Associates of San Diego", /* 44255 */ "Kootenai Cancer Center", /* 44256 */ "Teraoka Weigh-System Pte Ltd", /* 44257 */ "Hello World Ltd", /* 44258 */ "Xstream Flow (Pty) Ltd", /* 44259 */ "BALLY WULFF Games & Entertainment GmbH", /* 44260 */ "CARBOGEN AMCIS AG", /* 44261 */ "BJ's Wholesale Club", /* 44262 */ "Cancer Center of Sarasota Manatee", /* 44263 */ "SurfCrew, Inc.", /* 44264 */ "Grotex OOO", /* 44265 */ "Luna-78 LLC", /* 44266 */ "Hematology & Oncology Associates of Alabama, LLC", /* 44267 */ "DynaScan Technology, Inc.", /* 44268 */ "Beamly", /* 44269 */ "Barnardsoft Co., Ltd.", /* 44270 */ "Nuage Networks", /* 44271 */ "PRO-PflegeBeratung", /* 44272 */ "Gernert-Net", /* 44273 */ "Trit Networks LLC", /* 44274 */ "Illumio, Inc.", /* 44275 */ "TANABIKI Inc.", /* 44276 */ "Mike Tennant", /* 44277 */ "ShangHai RealCom Communication Technology Co.,Ltd.", /* 44278 */ "ZheJiang University PRESS", /* 44279 */ "F E T Elettronica snc", /* 44280 */ "Blood & Marrow Transplant Group of Georgia", /* 44281 */ "Microware Computing & Consulting Pvt Ltd", /* 44282 */ "Appnovation Technologies Inc", /* 44283 */ "Time4 Systems Ltd.", /* 44284 */ "New England Cancer Specialists", /* 44285 */ "Working Distributors, Inc.", /* 44286 */ "JConcept Open Solutions", /* 44287 */ "greaty", /* 44288 */ "Beijing Cyber Greatwall Information Technology Co., Ltd.", /* 44289 */ "Sajeev Anand, M.D., LLC", /* 44290 */ "New London Cancer Center", /* 44291 */ "emplus Networks Inc.", /* 44292 */ "Unwired Networks GmbH", /* 44293 */ "Quanta-Computing", /* 44294 */ "SSE - Stuellein Software Engineering", /* 44295 */ "HelmetHub", /* 44296 */ "Alliance Cancer Specialists, PC", /* 44297 */ "CogVis GmbH", /* 44298 */ "I.M. Dauntless", /* 44299 */ "Cyber1st R&D Ltd.", /* 44300 */ "Alexander Maier GmbH", /* 44301 */ "Clearview Cancer Institute", /* 44302 */ "Netz-AG Emil-Figgestraße 15-39", /* 44303 */ "HEMATOLOGY ONCOLOGY LIFE CENTER LLC", /* 44304 */ "Oncology Hematology Associates of Springfield, MD, PC", /* 44305 */ "CAROLINA ONCOLOGY ASSOCIATES, P.A.", /* 44306 */ "LP Technologies, Inc.", /* 44307 */ "Centripetal Networks, Inc.", /* 44308 */ "Center for Cancer Care", /* 44309 */ "SiteSpect, Inc.", /* 44310 */ "Budapesti Fazekas Mihaly Gyakorlo Altalanos Iskola es Gimnazium", /* 44311 */ "Amundson Partners, Inc.", /* 44312 */ "Johan Grip (ogun.org)", /* 44313 */ "Democritus University of Thrace", /* 44314 */ "Guido Di Fazio", /* 44315 */ "Softneta UAB", /* 44316 */ "Kanton Zug (www.zg.ch)", /* 44317 */ "PT. Telekomunikasi Indonesia", /* 44318 */ "Oklahoma Cancer Specialists and Research Institute", /* 44319 */ "Lake Norman Hematology Oncology", /* 44320 */ "TrilioData, Inc", /* 44321 */ "Shenzhen Mailian Electronics Co.,Ltd", /* 44322 */ "SmartRG, Inc.", /* 44323 */ "EstiNet Technologies Inc.", /* 44324 */ "TangoME, Inc.", /* 44325 */ "Kwartzlab Makerspace", /* 44326 */ "Ardexa Pty Ltd", /* 44327 */ "tmon", /* 44328 */ "Elektronik Art", /* 44329 */ "Xeneta AS", /* 44330 */ "ZHAW Zürcher Hochschule für Angewandte Wissenschaften", /* 44331 */ "Wallarm, Inc", /* 44332 */ "artdecode.de", /* 44333 */ "Saint Vincent Physician Services, Inc.", /* 44334 */ "Waverules LLC", /* 44335 */ "Oncology Hematology Associates of Saginaw Valley, P.C.", /* 44336 */ "ONCOLOGY ASSOCIATES OF MONROE", /* 44337 */ "Low Country Cancer Care Associates, P.C.", /* 44338 */ "Low Country Cancer Care Associates, P.C.", /* 44339 */ "Mid-Illinois Hematology & Oncology Associates, Ltd.", /* 44340 */ "GreatCall, Inc.", /* 44341 */ "Regional Cancer Care Associates LLC", /* 44342 */ "Jackson Oncology Associates, PLLC", /* 44343 */ "CANCER CENTER ASSOCIATES", /* 44344 */ "LLC, Sintek", /* 44345 */ "JSC \"Promstroikontrakt\"", /* 44346 */ "IK SATPROF LLC", /* 44347 */ "NIL KSA", /* 44348 */ "Highland Clinic, APMC", /* 44349 */ "Cancer Care Centers of Brevard", /* 44350 */ "greglearns (Greg Edwards)", /* 44351 */ "North Shore Hematology & Oncology Associates P.C.", /* 44352 */ "Cancer Center of Central Connecticut, LLC", /* 44353 */ "Grace Hematology and Oncology", /* 44354 */ "Oncology Hematology Associates of Northern PA, PC", /* 44355 */ "Trust Medical and Oncology Center", /* 44356 */ "Birchbox Inc.", /* 44357 */ "Nashat Y Gabrail, MD Inc", /* 44358 */ "Frederick P. Smith, MD PC", /* 44359 */ "EAST SIDE ONCOLOGY ASSOCIATES, PLLC", /* 44360 */ "Dabas Cancer Institute, P.A.", /* 44361 */ "Universidade Federal de Uberlandia", /* 44362 */ "CloudFlare", /* 44363 */ "AVEA", /* 44364 */ "DR. CHRISTOPHER T. SOPRENUK, M.D. P.A.", /* 44365 */ "Essex Oncology of North Jersey PA", /* 44366 */ "Highland Solutions", /* 44367 */ "Unmukti Technology Private Limited", /* 44368 */ "NeoTerra Systems Inc.", /* 44369 */ "Utelisys Communications B.V.", /* 44370 */ "Jay Steel", /* 44371 */ "Valley Medical Oncology Consultants, A Medical Group, A Professional Corp", /* 44372 */ "Regional Cancer Care Associates- Central Jersey Division", /* 44373 */ "New England Hematology Oncology Associatesd", /* 44374 */ "Eastern Long Island Hematology Oncology", /* 44375 */ "Opus One Winery, LLC", /* 44376 */ "Hudson Hematology Oncology", /* 44377 */ "Stephan Gogler", /* 44378 */ "Meanwave GmbH", /* 44379 */ "Desert Hematology Oncology Medical Group Inc.", /* 44380 */ "Medical Oncology Associates, PS", /* 44381 */ "Intec Pacific Pty. Ltd.", /* 44382 */ "Ascent Co.,Ltd", /* 44383 */ "Harbour IT Pty Ltd", /* 44384 */ "BONSONINFO SYSTEM CO.,LTD", /* 44385 */ "3 Gen d.o.o.", /* 44386 */ "Conway Hematology Oncology", /* 44387 */ "Medical and Surgical Clinic of Irving", /* 44388 */ "Max Planck Institute for Metabolism Research", /* 44389 */ "Skootr.com", /* 44390 */ "Polytechnic West", /* 44391 */ "Xperterra", /* 44392 */ "Pinellas Hematology &Oncology PA.", /* 44393 */ "Province Nord - Nouvelle Calédonie", /* 44394 */ "Pierre Decazes", /* 44395 */ "Hilberling GmbH", /* 44396 */ "OTP Bank Plc.", /* 44397 */ "SAITEL Telecomunicazioni s.r.l.", /* 44398 */ "Masgalor", /* 44399 */ "Eagle Investment Systems LLC", /* 44400 */ "Meeting House Lane Medical Practice PC", /* 44401 */ "Singh & Arora Oncology/Hematology, P.C.", /* 44402 */ "STUART ONCOLOGY ASSOCIATES", /* 44403 */ "Climate-control NN, Ltd.", /* 44404 */ "Shenzhen Wintop Photoelectric Technology Co., Ltd", /* 44405 */ "SMT S.A.", /* 44406 */ "Vidder, Inc.", /* 44407 */ "Ventus Technologies S.L.", /* 44408 */ "OSNA Research", /* 44409 */ "Versilis Inc", /* 44410 */ "Universidad Mariano Gálvez de Guatemala", /* 44411 */ "Markus Froehlich", /* 44412 */ "Studievereniging A-Eskwadraat", /* 44413 */ "Aldazar LLC", /* 44414 */ "Mikeji d.o.o.", /* 44415 */ "China Electronics Technology Group Corporation No.7 Research Institute", /* 44416 */ "Lazy Mountain Computers", /* 44417 */ "Shenzhen Haipengxin Electronics Co., Ltd.", /* 44418 */ "South County Hematology Oncology", /* 44419 */ "Fairfax Media", /* 44420 */ "Shen zhen huaptec co.,ltd", /* 44421 */ "CloudGate Systems India Pvt Ltd", /* 44422 */ "Frederick G. Barr, MD", /* 44423 */ "Nelson G.N. Kalil, MD PC", /* 44424 */ "goldenTech SA", /* 44425 */ "ek-soft GmbH", /* 44426 */ "Hills Road Sixth Form College", /* 44427 */ "ZAO Severo-Zapad", /* 44428 */ "Great Lakes Cancer Management Specialists", /* 44429 */ "AGF Management Limited", /* 44430 */ "Panhandle Cancer Center", /* 44431 */ "CanDeal", /* 44432 */ "Tri-Tech Manufacturing, Inc", /* 44433 */ "Junta de Comunidades de Castilla-La Mancha", /* 44434 */ "Staatliches Berufsschulzentrum Hermsdorf", /* 44435 */ "IdentKey Sicherheitsverbund (Ithamar Garbe)", /* 44436 */ "CommBox Pty. Ltd.", /* 44437 */ "Thomas A. York", /* 44438 */ "FOP Kagarlickij D.V.", /* 44439 */ "INFUSION ASSOCIATES, PC", /* 44440 */ "Radford University", /* 44441 */ "iSysBus", /* 44442 */ "Stelo - Companhia Brasileira de Pag Eletr", /* 44443 */ "iWelcome B.V.", /* 44444 */ "Corrado Mulas Enterprise Root CA", /* 44445 */ "GovComm, Inc.", /* 44446 */ "Fairchild Medical Center", /* 44447 */ "Apica", /* 44448 */ "Xiamen University", /* 44449 */ "Synapsys Solutions Ltd.", /* 44450 */ "Schessner IT-Consulting", /* 44451 */ "Evgeny Artemyev (XART)", /* 44452 */ "Arizona Oncology/Saguaro Cancer Center", /* 44453 */ "Globalstar, Inc.", /* 44454 */ "CHINA HUALU GROUP CO., LTD", /* 44455 */ "tuxwave.net", /* 44456 */ "Biamp Systems", /* 44457 */ "IT WATANA COMPANY", /* 44458 */ "Bluepunkt Networks, Inc.", /* 44459 */ "Alumina Elit 2003 Ltd.", /* 44460 */ "Rainus", /* 44461 */ "K2E", /* 44462 */ "BTS TECH S.r.l.", /* 44463 */ "Edgeguide AB", /* 44464 */ "Cataleya Pte Ltd", /* 44465 */ "FOP Tumakha Yuriy Volodymyrovych", /* 44466 */ "Sigmacom Broadcast", /* 44467 */ "Streamline, Lda.", /* 44468 */ "ARPA2", /* 44469 */ "Intermediate Engineering GmbH", /* 44470 */ "Kryptos Security", /* 44471 */ "BAMBR Information, Inc.", /* 44472 */ "CSTx GmbH", /* 44473 */ "Murata Manufacturing Co.,Ltd", /* 44474 */ "init.at informationstechnologie GmbH", /* 44475 */ "Middlesex Oncology", /* 44476 */ "Washington Metropolitan Area Transit Authority", /* 44477 */ "BIN-Control GmbH", /* 44478 */ "Gikos Networks", /* 44479 */ "Beijing Liuhe Intelligence Technology Ltd.", /* 44480 */ "CentrAlert", /* 44481 */ "Oncare-Hawaii Hematology Oncology", /* 44482 */ "Los Angeles Cancer Network", /* 44483 */ "YIXUN Technology Co., Ltd.", /* 44484 */ "WIBU-SYSTEMS AG", /* 44485 */ "Diabolocom", /* 44486 */ "Ineos Manufacturing Koeln GmbH", /* 44487 */ "Reichle & De-Massari AG", /* 44488 */ "possybility", /* 44489 */ "Beward R&D Co., Ltd", /* 44490 */ "Cherry Creek Mortgage Co., Inc.", /* 44491 */ "MEDIAHOUND, INC.", /* 44492 */ "STARMON s.r.o.", /* 44493 */ "TrustAsia Technologies, Inc.", /* 44494 */ "PAIO co.,ltd.", /* 44495 */ "Bender GmbH & Co. KG", /* 44496 */ "CHINA AERONAUTICAL RADIO ELECTRONICS RESEARCH INSTITUTE", /* 44497 */ "IT Solutions Roland Breitschaft", /* 44498 */ "BLOOD AND CANCER CENTER OF EAST TEXAS", /* 44499 */ "CHRONOTRACK SYSTEMS CORP.", /* 44500 */ "NuLEDs, Inc.", /* 44501 */ "SmartCast GmbH", /* 44502 */ "MDLIVE Inc.", /* 44503 */ "Evilcats Organization", /* 44504 */ "Ideum Group, Inc", /* 44505 */ "Consulta Network Security AB", /* 44506 */ "Northwest Alabama Cancer Center, PC", /* 44507 */ "Vigilant Applications Limited", /* 44508 */ "CompTek", /* 44509 */ "FJ Consultant", /* 44510 */ "Rudolf Wild GmbH & Co. KG", /* 44511 */ "iptronix srl", /* 44512 */ "Essener Versorgungs- und Verkehrsgesellschaft mbH (EVV)", /* 44513 */ "bremersee.org", /* 44514 */ "Griesson - de Beukelaer GmbH & Co. KG", /* 44515 */ "ETES GmbH", /* 44516 */ "Virgil Grigoras", /* 44517 */ "EUROSELL SPA", /* 44518 */ "US Railroad Retirement Board", /* 44519 */ "Consolidated Information Systems", /* 44520 */ "WUNDERVOLL NETWORKS", /* 44521 */ "Information Technology Solutions Laboratory", /* 44522 */ "NetBeez", /* 44523 */ "Research & Development Center \"Vulkan\" LLC", /* 44524 */ "Breast Surgery of Tulsa", /* 44525 */ "Carta Solutions Processing Services Corp", /* 44526 */ "Marco Dominguez", /* 44527 */ "Uriel Technologies", /* 44528 */ "One Call Care Management", /* 44529 */ "Alphapower Ltd.", /* 44530 */ "Renfell Engineering Pty Ltd", /* 44531 */ "Sage Electronic Engineering, LLC", /* 44532 */ "Digital Barriers", /* 44533 */ "Weybourne Partners LLP", /* 44534 */ "TSAT AS", /* 44535 */ "True Partners Consulting LLC", /* 44536 */ "Elauwit Networks, LLC", /* 44537 */ "Providius Corp", /* 44538 */ "Safe Patient Systems Ltd", /* 44539 */ "Bond Enterprises", /* 44540 */ "FeiTian United (Beijing) System Technology Co.,Ltd.", /* 44541 */ "VdS Schadenverhütung GmbH", /* 44542 */ "Viesti Networks Oy", /* 44543 */ "SANEF-ITS", /* 44544 */ "K-LAGAN España S.L.", /* 44545 */ "Harp Visual Communications Ltd", /* 44546 */ "YMOR Group B.V.", /* 44547 */ "Centrale Ashton Inc.", /* 44548 */ "ELECTRIS", /* 44549 */ "Avature USA LLC", /* 44550 */ "NetCredit Group", /* 44551 */ "Night Corporation", /* 44552 */ "Oncology/Hematology of Loudoun and Reston", /* 44553 */ "Primevation Ltd.", /* 44554 */ "CICS AB", /* 44555 */ "Universitas Al Azhar Indonesia", /* 44556 */ "WorNet AG", /* 44557 */ "Derixx GmbH", /* 44558 */ "Tribunal Regional do Trabalho da 13a. Regiao", /* 44559 */ "International Black Sea University", /* 44560 */ "Alachua County Library District", /* 44561 */ "aixtools (Michael Felt)", /* 44562 */ "Irkutsk Diagnostic Centre", /* 44563 */ "CJSC \"ENERGOMERA\"", /* 44564 */ "LECKERBEEF.de", /* 44565 */ "OOO Komandor-holding", /* 44566 */ "Agencja Rozwoju Przemyslu S.A.", /* 44567 */ "newnet Marketing", /* 44568 */ "Regional Networks, Ltd.", /* 44569 */ "Lancaster Cancer Center", /* 44570 */ "Solinea, Inc", /* 44571 */ "Abington Hematology Oncology Associates", /* 44572 */ "MGI1", /* 44573 */ "Jilin Yuxin Technology Co. Ltd", /* 44574 */ "3S PocketNet", /* 44575 */ "PERNOD-RICARD", /* 44576 */ "Proxion Solutions Oy", /* 44577 */ "Spectra Engineering Pty Ltd", /* 44578 */ "Sonnenburg Electronic AG", /* 44579 */ "Johann Sperber GMBH & Co. KG", /* 44580 */ "Regional Hematology Oncology Associates,P.C", /* 44581 */ "Inversion Software OÜ", /* 44582 */ "Obicis Ltd.", /* 44583 */ "JumpCloud, Inc", /* 44584 */ "Servato Corp", /* 44585 */ "CommDev, LLC", /* 44586 */ "InMechaSol", /* 44587 */ "Kryptus Information Security Ltd.", /* 44588 */ "becker-ikt.de - Jochen Becker", /* 44589 */ "Kevin Niehage", /* 44590 */ "Morgan Hunt Ltd", /* 44591 */ "Fininvest Sp. z o.o.", /* 44592 */ "Jan Bětík (Údolí Sviní)", /* 44593 */ "Yokogawa Digital Computer Corporation", /* 44594 */ "indigo Consulting GmbH", /* 44595 */ "DILO Armaturen und Anlagen GmbH", /* 44596 */ "BigBoards", /* 44597 */ "Gosford IT", /* 44598 */ "Vuzix Corporation", /* 44599 */ "e-Paper Ltd.", /* 44600 */ "Sunware s.r.o.", /* 44601 */ "Systems Mechanics Ltd.", /* 44602 */ "u-form Testsysteme GmbH & Co KG", /* 44603 */ "Beijing Jinhong Xi-Dian Information Technology Corp.", /* 44604 */ "Lighthouse IVM GmbH", /* 44605 */ "Siraya Networks Co., Ltd.", /* 44606 */ "GreenField Software Private Limited", /* 44607 */ "Net at Work Netzwerksysteme GmbH", /* 44608 */ "PRONIX s.r.o.", /* 44609 */ "Elvis-Telecom JSC", /* 44610 */ "Dumee.fr", /* 44611 */ "Beijing Tonlier Energy Technology Co., Ltd.", /* 44612 */ "Sunkaisens(Beijing) Technology Co.,Ltd.", /* 44613 */ "Lingualeo LLC.", /* 44614 */ "Bluehouse Technology Ltd", /* 44615 */ "University Transilvania of Brasov", /* 44616 */ "GLOBTECH spol. s r.o.", /* 44617 */ "Philter, LLC", /* 44618 */ "Ziften Technologies", /* 44619 */ "Integrated Service Company LLC", /* 44620 */ "OLeary Computers Inc", /* 44621 */ "Instituto Colegio de Todos los Santos", /* 44622 */ "Iomnis Surveillance Solutions", /* 44623 */ "Blood & Cancer Center (Ohio)", /* 44624 */ "Electre", /* 44625 */ "Captive.net", /* 44626 */ "National Instruments Corporation", /* 44627 */ "Canva, Inc.", /* 44628 */ "Australian Department of Infrastructure and Regional Development", /* 44629 */ "JSC Platron", /* 44630 */ "TechFu (Pty) Ltd.", /* 44631 */ "EBlink SA", /* 44632 */ "Squire Technologies", /* 44633 */ "markentier (Christoph Grabo)", /* 44634 */ "Degeetia OÜ", /* 44635 */ "NewCashel Inc.", /* 44636 */ "CB&I Federal Services", /* 44637 */ "ONEDC", /* 44638 */ "Hermes Europe GmbH", /* 44639 */ "UpdateLogic, Inc.", /* 44640 */ "VyOS", /* 44641 */ "National Knowledge Network", /* 44642 */ "Fujikura Automotive Europe S.A.", /* 44643 */ "Vopium A/S", /* 44644 */ "Infrabel NV", /* 44645 */ "Emko Elektronik Sanayi ve Ticaret A.Ş.", /* 44646 */ "Argus der Presse AG", /* 44647 */ "Manet Ltd", /* 44648 */ "Alma Technologies", /* 44649 */ "Hemotology Oncology Care of Northern VA", /* 44650 */ "University of Detroit Jesuit High School and Academy", /* 44651 */ "LaMarche Mfg. Company", /* 44652 */ "Unassigned", /* 44653 */ "Hochschule für Musik Freiburg", /* 44654 */ "Heartland Hematology & Oncology", /* 44655 */ "Sound Choice Communications LLC", /* 44656 */ "Bow Valley College", /* 44657 */ "Northwest Medical Specialties PLLC", /* 44658 */ "Burlington County Hematology-Oncology Associates, P.A.", /* 44659 */ "Landspitali", /* 44660 */ "Boyce Technologies, Inc.", /* 44661 */ "CodeChase", /* 44662 */ "Wuhan GreeNet Information Service Co., Ltd.", /* 44663 */ "IRCOS JSC", /* 44664 */ "1&1 Internet AG", /* 44665 */ "Ville de Saint André", /* 44666 */ "Pardic Systems , Ltd.", /* 44667 */ "Securosys SA", /* 44668 */ "First Capital Payments", /* 44669 */ "Prism Software Corporation", /* 44670 */ "Sysctl AB", /* 44671 */ "Naucra Co., Ltd", /* 44672 */ "SitePen, Inc.", /* 44673 */ "FUSED NETWORK CORP", /* 44674 */ "Spillman Technologies Inc.", /* 44675 */ "Glenn McGurrin", /* 44676 */ "Dreamhack Network", /* 44677 */ "Loopia AB", /* 44678 */ "Plansee Group Service GmbH", /* 44679 */ "Iudex", /* 44680 */ "Ajuntament de Valencia", /* 44681 */ "CompliSpace Technology Pty Ltd", /* 44682 */ "Intern-net", /* 44683 */ "Corsa Technology Inc.", /* 44684 */ "NTENT", /* 44685 */ "ROI Development Corp., DBA Newmar", /* 44686 */ "Hebeo", /* 44687 */ "WorldWide Supply LLC (aka \"WWS\")", /* 44688 */ "Groupe Simplinet inc.", /* 44689 */ "Sonavox Canada Inc.", /* 44690 */ "GRUPO ONCOLOGICO COMUNITARIO DE SAN JUAN", /* 44691 */ "Sedus Stoll AG", /* 44692 */ "Microwave Photonic Systems, Inc.", /* 44693 */ "Adams County Cancer Center", /* 44694 */ "Wolfgang Erlenkoetter IT", /* 44695 */ "apl.io", /* 44696 */ "Charles University in Prague, Faculty of Mathematics and Physics", /* 44697 */ "Baxter Planning System", /* 44698 */ "BiLL GmbH", /* 44699 */ "Kuss IT-Solutions", /* 44700 */ "Hearsay Social", /* 44701 */ "Voiceworks B.V.", /* 44702 */ "Danville Hematology and Oncology", /* 44703 */ "BlackSip Development", /* 44704 */ "Hack12", /* 44705 */ "Hostopia.com Inc.", /* 44706 */ "SAI Technology Inc.", /* 44707 */ "Crews Banking corporation", /* 44708 */ "Xolphin B.V.", /* 44709 */ "Ensured B.V.", /* 44710 */ "T-Mobile Nederland BV", /* 44711 */ "AGAT-System", /* 44712 */ "COSMOS-SOFT.net", /* 44713 */ "Transdata", /* 44714 */ "Ezitherm", /* 44715 */ "University of the Sunshine Coast", /* 44716 */ "CO-Sol Inc.", /* 44717 */ "Loews Hotels Inc", /* 44718 */ "UniversalCard Sibiria LLC", /* 44719 */ "Shanghai BEIDIAN Industry Group", /* 44720 */ "Okaki Health Intelligence Inc", /* 44721 */ "WALLMEDIEN AG", /* 44722 */ "Unassigned", /* 44723 */ "LLC \"ITTech\"", /* 44724 */ "BADTRONIC sarl", /* 44725 */ "Radionika Sp. z o.o.", /* 44726 */ "Y2S Corporation", /* 44727 */ "I3 CZ s.r.o.", /* 44728 */ "Fixmon", /* 44729 */ "Elkomtech S.A.", /* 44730 */ "Palestine Monetary Authority", /* 44731 */ "OOO bella-Don", /* 44732 */ "Forbes Technosys Ltd", /* 44733 */ "Menlo Security", /* 44734 */ "Electronic Commerce Inc.", /* 44735 */ "JERRA Soft GmbH", /* 44736 */ "Raindrop Laboratories (Alan Batie)", /* 44737 */ "ASUSTOR Inc.", /* 44738 */ "Miele & Cie. KG", /* 44739 */ "Innovapuglia S.p.A.", /* 44740 */ "IAV GmbH", /* 44741 */ "Aunigma Network Security Corp.", /* 44742 */ "POMA", /* 44743 */ "Scanline VFX LA Inc.", /* 44744 */ "Tremor Video", /* 44745 */ "Sea Surveillance AS", /* 44746 */ "VoiceTrust", /* 44747 */ "Wild Kilt Pty Ltd", /* 44748 */ "Malwarebytes Corporation", /* 44749 */ "Edifecs Inc", /* 44750 */ "Tell International Inc.", /* 44751 */ "Quamatik doo", /* 44752 */ "UniQ-CA B.V.", /* 44753 */ "Patent Agency Tegas Llc", /* 44754 */ "Online Development Inc.", /* 44755 */ "AgNO3 GmbH & Co. KG", /* 44756 */ "ANIMO LIMITED.", /* 44757 */ "ACTRONICS K.K.", /* 44758 */ "Turbo Systems Co., Ltd.", /* 44759 */ "Vsoft Colombia Ltda.", /* 44760 */ "VoxIdea", /* 44761 */ "IBS PROJECT LLC", /* 44762 */ "Steven Sloane", /* 44763 */ "bacq.ru", /* 44764 */ "PTL Limited", /* 44765 */ "Katao Ops", /* 44766 */ "Tieto Sweden AB", /* 44767 */ "Grayson bvba", /* 44768 */ "Tsinghua University", /* 44769 */ "NYNEX satellite OHG", /* 44770 */ "Apsidis", /* 44771 */ "West Genesee Central School District", /* 44772 */ "Sistemas de Seguridade A1", /* 44773 */ "Alameda Health Services", /* 44774 */ "City Network Hosting AB", /* 44775 */ "Hedberg Produtions", /* 44776 */ "MEAZON SA", /* 44777 */ "thinkindifferent.net", /* 44778 */ "Unity Health Insurance", /* 44779 */ "BikePics", /* 44780 */ "Connetos Company", /* 44781 */ "Xiamen Kehua Hengsheng Co.,Ltd", /* 44782 */ "Push To Talk International Ltd", /* 44783 */ "Hitzigrath", /* 44784 */ "IS2 Intelligent Solution Services AG", /* 44785 */ "Stadtwerke Jena GmbH", /* 44786 */ "Corporate Business Systems LLP.", /* 44787 */ "Goethe-Institut e. V.", /* 44788 */ "Sarah Cannon Research Institute", /* 44789 */ "Ingenium Automation + Engineering Pte Ltd", /* 44790 */ "Chengdu Global Capsheaf Solution Technology Co., Ltd.", /* 44791 */ "AzuriteUK (Valerij Prusakov)", /* 44792 */ "GAMING1 SPRL", /* 44793 */ "Chickasaw Holding Company", /* 44794 */ "Tridigy, LLC", /* 44795 */ "SFO Technologies Pvt. Ltd.", /* 44796 */ "Stoat Works", /* 44797 */ "TechsMix Networks", /* 44798 */ "audioalgorithms", /* 44799 */ "it7 s.r.o.", /* 44800 */ "Sole proprietorship Ilya Gruzinov", /* 44801 */ "IT-Labor", /* 44802 */ "Whatson-Web", /* 44803 */ "FCM TECHNOLOGY S.r.l.", /* 44804 */ "Sea Island Cancer Center", /* 44805 */ "Universidade Federal da Integração Latino-Americana", /* 44806 */ "Infor*Med", /* 44807 */ "tsblog.org", /* 44808 */ "HealthStream, Inc.", /* 44809 */ "arales.org", /* 44810 */ "Funambolo Technologies Private Limited", /* 44811 */ "JSC \"Institute of Automation of Energy Systems\"", /* 44812 */ "Beijing Easynetworks Technology Co.,Ltd.", /* 44813 */ "Genexyx Srl", /* 44814 */ "Mauro Altamura", /* 44815 */ "South Carolina Oncology Associates", /* 44816 */ "Idaho Division of Veterans Services", /* 44817 */ "CADMO CONOCIMIENTO S.L.", /* 44818 */ "Store Electronic Systems S.A.", /* 44819 */ "Chlorine Hilarva", /* 44820 */ "Beijer Electronics AB", /* 44821 */ "DC Matrix Internet S/A", /* 44822 */ "Airborne Interactive", /* 44823 */ "Opravil", /* 44824 */ "Lautersoft", /* 44825 */ "Fire Protection Service Corporation", /* 44826 */ "epcan GmbH", /* 44827 */ "SilverNet Ltd.", /* 44828 */ "Ganymed Pharmaceuticals AG", /* 44829 */ "Trio Motion Technology Ltd", /* 44830 */ "Nuvotex Solutions GmbH & Co KG", /* 44831 */ "Product Ventures Ltd", /* 44832 */ "peteheilig.com", /* 44833 */ "SYSTEMS AND TECHNOLOGIES, ZAO", /* 44834 */ "Oncology & Hematology Consultants of Houston", /* 44835 */ "Breqwatr, Inc.", /* 44836 */ "Absec Malaysia Sdn Bhd", /* 44837 */ "chinasoft-tokyo corporation", /* 44838 */ "Mega Designs Pvt. Ltd.", /* 44839 */ "Intrasonics Ltd", /* 44840 */ "Lyngmo.Net", /* 44841 */ "Fairbanks North Star Borough School District", /* 44842 */ "Hasin Technology", /* 44843 */ "Nobel Biocare Services AG", /* 44844 */ "Dillert", /* 44845 */ "SuperNetwork s.r.o.", /* 44846 */ "Yuri Bugelli", /* 44847 */ "COSYLVAL", /* 44848 */ "Five Below, Inc.", /* 44849 */ "United States Antarctic Program", /* 44850 */ "WINK Streaming", /* 44851 */ "Energy Communications Management Exchange, sub-division of Future DOS Research & Development Inc.", /* 44852 */ "KVL COMP Kft.", /* 44853 */ "linmaonline.de", /* 44854 */ "h-dy's Home", /* 44855 */ "Art Developers Corporation", /* 44856 */ "Broadsound Corporation", /* 44857 */ "Elkjøp Nordic AS", /* 44858 */ "Mobik d.o.o.", /* 44859 */ "Emanomedia GmbH", /* 44860 */ "Catoctin Systems", /* 44861 */ "IT SYSTEMS srl", /* 44862 */ "Unitow Services (1978) Ltd.", /* 44863 */ "Bethel Blood and Cancer Center", /* 44864 */ "Bay Area Regional Medical Center", /* 44865 */ "Benedikt Frenzel Systems", /* 44866 */ "Etic Telecom", /* 44867 */ "Earthling Interactive", /* 44868 */ "Zen Solutions Limited", /* 44869 */ "JSC \"SKB Electronmash\"", /* 44870 */ "Universidad de Cuenca", /* 44871 */ "FiberLabs Inc.", /* 44872 */ "CJSC «INTERSET»", /* 44873 */ "Instytut Matematyczny Polskiej Akademii Nauk", /* 44874 */ "Reykjavikurborg", /* 44875 */ "Hrvatska poštanska banka, dioničko društvo", /* 44876 */ "IMMA Inc.", /* 44877 */ "Datcent Technology Co.,Ltd.", /* 44878 */ "Cunz RaD Ltd.", /* 44879 */ "Harte & Lyne Limited", /* 44880 */ "ikara", /* 44881 */ "Techno-com", /* 44882 */ "Iw1BI", /* 44883 */ "OneVision Software AG", /* 44884 */ "Baltech AG", /* 44885 */ "Gainspeed, Inc.", /* 44886 */ "The Kansas City Southern Railway Company", /* 44887 */ "klolik.org", /* 44888 */ "Denver Public Library", /* 44889 */ "BKtel Photonics SAS", /* 44890 */ "Xero", /* 44891 */ "Primum Health IT S.L.", /* 44892 */ "Software Diversions, Inc.", /* 44893 */ "Napatech", /* 44894 */ "Bitcraze AB", /* 44895 */ "Secureloin", /* 44896 */ "Vista Oncology", /* 44897 */ "Insignis", /* 44898 */ "Code L7", /* 44899 */ "ReminderMedia", /* 44900 */ "Xiamen Sunwe Technology CO.,Ltd", /* 44901 */ "ShareTech Information Co., LTD.", /* 44902 */ "Stratech Systems Limited", /* 44903 */ "Media Stream Co., LTD.", /* 44904 */ "NightTrade Group, Inc.", /* 44905 */ "TBDD, LTD", /* 44906 */ "nVisionIT Pty Ltd", /* 44907 */ "CARTIERE DEL GARDA", /* 44908 */ "sys-pro GmbH", /* 44909 */ "ST-Vitrinen Trautmann GmbH & Co. KG", /* 44910 */ "Alpha ENGINEERING Tunisia", /* 44911 */ "2Be-FFICIENT", /* 44912 */ "RedSocks B.V.", /* 44913 */ "Genting Casinos UK", /* 44914 */ "Silex Industrial Automation Ltd.", /* 44915 */ "MJog Limited", /* 44916 */ "LMpro GmbH", /* 44917 */ "Nethix S.r.l", /* 44918 */ "Avisi B.V", /* 44919 */ "Argyle Security Inc", /* 44920 */ "Exele", /* 44921 */ "Echo Technology Solutions", /* 44922 */ "Remco ICT", /* 44923 */ "AllSeen Alliance, Inc.", /* 44924 */ "East Kent Hospitals University Foundation Trust", /* 44925 */ "Amdocs Network Solutions", /* 44926 */ "SyS LLC.", /* 44927 */ "Caligare, s.r.o.", /* 44928 */ "NetKnights GmbH", /* 44929 */ "Fisher Investments", /* 44930 */ "SyncWise Systems & Technology", /* 44931 */ "Panasonic System Communications Company of North America", /* 44932 */ "In Ardua Petit", /* 44933 */ "G-RAY", /* 44934 */ "Digital Telecommunication Systems WA PTY LTD", /* 44935 */ "Stratech iVision Pte. Ltd", /* 44936 */ "Inoventica technologies", /* 44937 */ "Charité - Universitätsmedizin Berlin", /* 44938 */ "AVA-PETER Ltd.", /* 44939 */ "Nemiroff", /* 44940 */ "GCP German Cathodic Protection GmbH & Co. KG", /* 44941 */ "Stadt Duelmen", /* 44942 */ "Inlink OÜ", /* 44943 */ "Rock Flow Dynamics", /* 44944 */ "TEKTELIC Communications Inc.", /* 44945 */ "Danish Railway (DSB)", /* 44946 */ "Internet Security Research Group", /* 44947 */ "Pacific Institute for the Mathematical Sciences", /* 44948 */ "NJK Aviation AG", /* 44949 */ "automation-engineering", /* 44950 */ "SSR Engineering, Inc.", /* 44951 */ "AC/ BC Electrical Company", /* 44952 */ "Flat World Resource Technologies Limited.", /* 44953 */ "Keweon", /* 44954 */ "Connexo Tecnologia e Comunicação EIRELI", /* 44955 */ "Savvi Inc.", /* 44956 */ "Robotron Datenbank-Software GmbH", /* 44957 */ "mse GmbH", /* 44958 */ "Carl Berberich GmbH", /* 44959 */ "Craltech Electrónica, S.L.", /* 44960 */ "Valley Medical Center, PLLC", /* 44961 */ "Foreman Instrumentation And Controls", /* 44962 */ "gueux.org", /* 44963 */ "Vivid Orange Limited", /* 44964 */ "pascher.IT", /* 44965 */ "Jingtu Printing Systems Co., Ltd", /* 44966 */ "Beijing Heweinet Technology Co.,Ltd (北京和维网通科技有限公司)", /* 44967 */ "May China", /* 44968 */ "CLINICA DE CANCER Y ENFERMEDADES DE LA SANGRE, CSP", /* 44969 */ "Thread Group, Inc.", /* 44970 */ "Compen Embedded Software", /* 44971 */ "Alameda Hospital", /* 44972 */ "Kantar Media France SAS", /* 44973 */ "Sonos, Inc.", /* 44974 */ "FlexCoders Ltd", /* 44975 */ "Onegini B.V.", /* 44976 */ "Reduxio Systems", /* 44977 */ "Istria, soluciones de criptografía, S. A.", /* 44978 */ "Tsmart Inc.", /* 44979 */ "MEDiA LiNK Co.,Ltd.", /* 44980 */ "LLC \"PromIT\"", /* 44981 */ "INNEXIV, INC.", /* 44982 */ "ARTIS GmbH", /* 44983 */ "EPAM Systems", /* 44984 */ "Tecnologias Corporativas SC", /* 44985 */ "Taglio LLC", /* 44986 */ "Temple University", /* 44987 */ "Nxtera Ltd", /* 44988 */ "Multi Parts Supply USA, Inc.", /* 44989 */ "TONGFANG INDUSTRIAL CO.,LTD", /* 44990 */ "Ameriprise Financial", /* 44991 */ "Amscreen Group Limited", /* 44992 */ "BCP Co.", /* 44993 */ "Umbrellium Ltd.", /* 44994 */ "Regional Cancer Care Associates, Little Silver Division", /* 44995 */ "JMP Group Inc.", /* 44996 */ "Emery Telcom", /* 44997 */ "Sichuan Zero Gravity Technology CO.LTD", /* 44998 */ "Ltd GoldLans", /* 44999 */ "Symbicon Ltd", /* 45000 */ "Northern Virginia Hematology Oncology Associates", /* 45001 */ "CompuGroup Medical Polska sp. z o.o.", /* 45002 */ "Egag, LLC", /* 45003 */ "SMARTRAC N.V.", /* 45004 */ "Advanced Alloy Processing", /* 45005 */ "Wuestenrot poistovna, a.s.", /* 45006 */ "Trial Software Laboratories, Inc.", /* 45007 */ "Things.Expert LLC", /* 45008 */ "Thomas Hassall Anglican College", /* 45009 */ "Youhua", /* 45010 */ "Ming Dynasty AvantLexa Firm", /* 45011 */ "Miraeson", /* 45012 */ "Beijing Gehua CATV Network Co.,Ltd.", /* 45013 */ "Andra sp. z o. o.", /* 45014 */ "foo.sh", /* 45015 */ "Kouba & Partner", /* 45016 */ "I3 Comércio de Computadores Ltda Epp", /* 45017 */ "QualiStream", /* 45018 */ "Infinite AI, Inc.", /* 45019 */ "Bitnasium Co., Ltd.", /* 45020 */ "Health Plan Partners LLC", /* 45021 */ "digivod gmbh", /* 45022 */ "Chair Four Development Group LLC", /* 45023 */ "BTS Software Solutions, LLC", /* 45024 */ "Fujitsu Hokuriku Systems Limited", /* 45025 */ "Mynavi Corporation", /* 45026 */ "The Center For Mental Health", /* 45027 */ "Debugo", /* 45028 */ "Fengyz Technology CO.,Ltd.", /* 45029 */ "Lagopus switch project", /* 45030 */ "Engineering Centre Energoservice LLC", /* 45031 */ "JustNow", /* 45032 */ "synyx GmbH & Co. KG", /* 45033 */ "Millimetrica s.r.l.", /* 45034 */ "TelSIP Communication", /* 45035 */ "NIC Hosting", /* 45036 */ "Hauke Bartsch", /* 45037 */ "Enman", /* 45038 */ "Central Bank of the Republic of Azerbaijan", /* 45039 */ "BBH Media", /* 45040 */ "Vieira Filho Tecnologia Eletronica", /* 45041 */ "Officeworks Ltd", /* 45042 */ "Argus Hosting, LLC", /* 45043 */ "TangoRythm", /* 45044 */ "DELNET", /* 45045 */ "lpk", /* 45046 */ "Crypto Software Chryselius", /* 45047 */ "MARIA - DEBORA", /* 45048 */ "Gudok LLC", /* 45049 */ "Bjørn Ludvig Langaas Johansen", /* 45050 */ "Finalsite", /* 45051 */ "SequoiaDB Ltd.", /* 45052 */ "Information and Telecom Systems India Pvt. Ltd.", /* 45053 */ "Tony Ditchfield", /* 45054 */ "ISAE", /* 45055 */ "Kassenärztliche Vereinigung Schleswig-Holstein", /* 45056 */ "COPALP", /* 45057 */ "CCP Games", /* 45058 */ "Bauduin Raphaël", /* 45059 */ "Otis R Bowen Center for Human Services, Inc", /* 45060 */ "Gymnasium Geretsried", /* 45061 */ "Southern Cancer Center", /* 45062 */ "SEAtech Technology Inc", /* 45063 */ "China Mobile Hong Kong Company Limited", /* 45064 */ "Insyde", /* 45065 */ "SIP Cantabria S.L.", /* 45066 */ "Dude Solutions Inc.", /* 45067 */ "PROTECH SYSTEMS PRIVATE LIMITED", /* 45068 */ "TOMinf Tomasz Tomaszewski", /* 45069 */ "Reservoir Labs, Inc.", /* 45070 */ "tetraguard systems GmbH", /* 45071 */ "Catalyst Paper", /* 45072 */ "Pacific Seafood Group", /* 45073 */ "TTSSB corp", /* 45074 */ "Electron Jungle, LLC", /* 45075 */ "HamLogin.com", /* 45076 */ "Sestek Ses ve Iletisim Bilgisayar Teknolojileri San. ve Tic. A.S.", /* 45077 */ "QoS Solutions", /* 45078 */ "i2p informatikai kft.", /* 45079 */ "Kerio Technologies, Inc.", /* 45080 */ "Increase Qingdao Information Technology Co., Ltd.", /* 45081 */ "PT. Tekno Inovasi Asia", /* 45082 */ "Intility AS", /* 45083 */ "Arbeitsgemeinschaft Dresdner Studentennetz", /* 45084 */ "Bibliotheca Alexandrina", /* 45085 */ "Advanced Imaging Technologies (Pty) Ltd", /* 45086 */ "Institut Catala de Finances", /* 45087 */ "Volkswagen Møller Bilfinans AS", /* 45088 */ "ICANN", /* 45089 */ "Mushroom Networks, Inc.", /* 45090 */ "Cisco Sera", /* 45091 */ "Silectica", /* 45092 */ "SUMOMO Computer Association", /* 45093 */ "UAB \"VAATC\"", /* 45094 */ "INAF - Osservatorio Astrofisico di Arcetri", /* 45095 */ "INTERNATIONAL MEDICAL SOLUTIONS INC.", /* 45096 */ "Graphite Systems, Inc.", /* 45097 */ "Ex Cathedra Solutions Ltd.", /* 45098 */ "Pentaho Corporation", /* 45099 */ "Cloud Vision Networks Technology Co.,Ltd. (cvn)", /* 45100 */ "Yew Tree Services, Inc.", /* 45101 */ "Yawns.com Limited", /* 45102 */ "Satel Spain, S.L.", /* 45103 */ "infoworxx GmbH", /* 45104 */ "Samsung Poland R&D Center", /* 45105 */ "Subsentio", /* 45106 */ "IntegraOptics Inc", /* 45107 */ "Jetmobile", /* 45108 */ "Chaos Labs OOD", /* 45109 */ "IzumoBASE, Inc.", /* 45110 */ "Elbrus-RW", /* 45111 */ "Christian Wilhelmi", /* 45112 */ "OPTIMANS", /* 45113 */ "PALS Elektronik", /* 45114 */ "Ajenti Solutions", /* 45115 */ "LoJack Corp.", /* 45116 */ "University of North Carolina at Charlotte", /* 45117 */ "ehaaihee", /* 45118 */ "SBONGILE PROJECT", /* 45119 */ "iba AG", /* 45120 */ "Hangzhou Guangwei Technology Co., Ltd", /* 45121 */ "M & T Bank Corporation", /* 45122 */ "Suzhou Industrial Park Kejia Automation Co., Ltd", /* 45123 */ "De Haan", /* 45124 */ "Netcom Europa S.L.", /* 45125 */ "Sarada Gummadi MD PA", /* 45126 */ "ProfitBricks GmbH", /* 45127 */ "Infotrage Limited", /* 45128 */ "BID Initiative Tanzania - PATH", /* 45129 */ "r3k", /* 45130 */ "Onelogin, Inc.", /* 45131 */ "ADD-Engineering BV", /* 45132 */ "Kristian Söderholm", /* 45133 */ "XCore Company Limited", /* 45134 */ "AQUASOFT spol. s r.o.", /* 45135 */ "e-Cop Pte Ltd.", /* 45136 */ "Nanoha Project", /* 45137 */ "Huwomobility Inc.", /* 45138 */ "Maruganzer", /* 45139 */ "Green Vict Technology Co., Ltd", /* 45140 */ "Onomichi ikakikai Co., Ltd.", /* 45141 */ "Corporate West Computer Systems, Inc.", /* 45142 */ "Datawise Systems, Inc.", /* 45143 */ "American Airlines Federal Credit Union", /* 45144 */ "Hivemind Engineering", /* 45145 */ "Primestone Network", /* 45146 */ "Datu Health", /* 45147 */ "Universität Koblenz-Landau", /* 45148 */ "NoisyPeak", /* 45149 */ "WAGNER AG", /* 45150 */ "MEISLAB", /* 45151 */ "Parchment Inc.", /* 45152 */ "Drillinginfo", /* 45153 */ "ELES, d.o.o., sistemski operater prenosnega elektroenergetskega omrezja", /* 45154 */ "Democratic Alliance", /* 45155 */ "The IcedTea project (HeapStats)", /* 45156 */ "Medgate AG", /* 45157 */ "Infracom S.p.A.", /* 45158 */ "Heinz Nixdorf MuseumsForum GmbH", /* 45159 */ "Jabatan Ketua Menteri Melaka", /* 45160 */ "YouCo Srl", /* 45161 */ "GUANG DONG SMART ELECTRIC INFORMATION INDUSTRY CO.,LTD.", /* 45162 */ "Hafen-Entwicklungsgesellschaft Rostock mbH", /* 45163 */ "Brulli Energia", /* 45164 */ "IT Services, Loughborough University", /* 45165 */ "Itaipu Binacional", /* 45166 */ "Redgates.com", /* 45167 */ "krumedia GmbH", /* 45168 */ "Tahoe Forest Health System", /* 45169 */ "The Baupost Group, L.L.C.", /* 45170 */ "Gareth Morgan Investments", /* 45171 */ "Stronghold, Ltd.", /* 45172 */ "The Furukawa Battery Co.,Ltd", /* 45173 */ "Eyecom Telecommunication Equipments Ltd", /* 45174 */ "NGI SpA", /* 45175 */ "Mirantis Inc", /* 45176 */ "Sapientier Development", /* 45177 */ "Direktion der Justiz und des Innern des Kantons Zuerich", /* 45178 */ "Jablotron Alarms a.s.", /* 45179 */ "Rolls-Royce Marine", /* 45180 */ "AVSystem", /* 45181 */ "bkaiser GmbH", /* 45182 */ "Access Control Services Ltd", /* 45183 */ "Patrick Kalkman", /* 45184 */ "SCA Skog AB", /* 45185 */ "frazz.se", /* 45186 */ "Amber Technical Solutions Ltd", /* 45187 */ "Vzajemna, d.v.z.", /* 45188 */ "Genplus Pte Ltd", /* 45189 */ "Peaxy, Inc.", /* 45190 */ "Simple Finance Technology Corp", /* 45191 */ "Lonmin", /* 45192 */ "TeraStream", /* 45193 */ "Oryx Embedded", /* 45194 */ "Beijing 35one Technology Development Co., Ltd", /* 45195 */ "Of Modems and Men", /* 45196 */ "C.S.C.D.G.R", /* 45197 */ "Weichert Lead Network, Inc", /* 45198 */ "Lite-On Power System Solutions", /* 45199 */ "Reserve Bank Of Australia", /* 45200 */ "BBright", /* 45201 */ "Fachhochschule Potsdam", /* 45202 */ "Synergy Consulting Ltd.", /* 45203 */ "Four Horsemen", /* 45204 */ "Richard Frostell", /* 45205 */ "Quintron Systems, Inc", /* 45206 */ "healcerion", /* 45207 */ "GSS International Group", /* 45208 */ "Altostratus Oy", /* 45209 */ "DigiSeq Limited", /* 45210 */ "Data Control Ltd", /* 45211 */ "Vecture Inc.", /* 45212 */ "Municipal Parking Services, Inc.", /* 45213 */ "Community Campaign (Hart)", /* 45214 */ "Matchpoint Systems, Inc.", /* 45215 */ "Cyprus Telecommunications Authority (CYTA)", /* 45216 */ "Large Display Solutions International ltd.", /* 45217 */ "Mesosphere", /* 45218 */ "Telecomax", /* 45219 */ "eGO Travel & Leisure AG", /* 45220 */ "AMP", /* 45221 */ "XpoLog Ltd.", /* 45222 */ "FASII Information Technology", /* 45223 */ "Wireless Sensors LLC", /* 45224 */ "Guangzhou Netzone Inc.", /* 45225 */ "Allicient", /* 45226 */ "Okinawa Institute of Science and Technology Graduate University", /* 45227 */ "Lumagate AB", /* 45228 */ "nyantec UG (haftungsbeschränkt)", /* 45229 */ "RCD Radiokomunikace spol. s r. o.", /* 45230 */ "Liverock Technologies", /* 45231 */ "Hellenic Ministry of Foreign Affairs", /* 45232 */ "Guangzhou Tongrui Electronic Electronic Technology Co.,Ltd", /* 45233 */ "Pennsylvania State Education Association", /* 45234 */ "ConfirmSign S.L.", /* 45235 */ "Ferz corp.", /* 45236 */ "Context Relevant", /* 45237 */ "City of Oregon City", /* 45238 */ "RosReserv", /* 45239 */ "International Capital & Management Company", /* 45240 */ "fuzzcat.net", /* 45241 */ "INGEBI", /* 45242 */ "La Boulgour Compagnie", /* 45243 */ "IJM Systems", /* 45244 */ "SAS CALVI Célestin", /* 45245 */ "EcoCooling Ltd", /* 45246 */ "Triple Domain Vision Co., Ltd.", /* 45247 */ "NetOcean", /* 45248 */ "Banco Macro S.A.", /* 45249 */ "Habr LLC", /* 45250 */ "axelIT Üzletfejlesztési Kft.", /* 45251 */ "mDAKS GmbH", /* 45252 */ "RMB Capital Management, LLC", /* 45253 */ "Shouei Denshi Kenkyuusho Co.,Ltd.", /* 45254 */ "Dallas Delta Corp", /* 45255 */ "Foreks Bilgi Iletisim Hiz. A.S.", /* 45256 */ "InterConnectData", /* 45257 */ "Lazaros Economou", /* 45258 */ "Billo Systems Ltd. Co.", /* 45259 */ "FYLDE MICRO LTD", /* 45260 */ "inAere Holdings", /* 45261 */ "Raven", /* 45262 */ "VTAS GmbH & Co. KG", /* 45263 */ "Schaeffler Technologies AG & Co. KG", /* 45264 */ "GMAURER", /* 45265 */ "bootix Technology GmbH", /* 45266 */ "ISSENDIS", /* 45267 */ "RusHydro", /* 45268 */ "Rivasense Technologies Ltd", /* 45269 */ "Electronic Certification Services SL", /* 45270 */ "Beco", /* 45271 */ "Szallas.hu Ltd.", /* 45272 */ "independIT Integrative Technologies GmbH", /* 45273 */ "EyaSys", /* 45274 */ "Energy Essentials Group B.V.", /* 45275 */ "iTEAM (Instituto de Telecomunicaciones y Aplicaciones Multimedia, Grupo COMM)", /* 45276 */ "Five Monkeys Code Factory", /* 45277 */ "OpenCloud SL", /* 45278 */ "Strategy Object", /* 45279 */ "Premise Health", /* 45280 */ "Generac Power Systems Inc.", /* 45281 */ "LinkUp Networks", /* 45282 */ "T-Systems International GmbH", /* 45283 */ "ax86.net", /* 45284 */ "Salience Systems Pty Ltd", /* 45285 */ "Morning Project Samurai", /* 45286 */ "GEOPRAEVENT AG", /* 45287 */ "Compania Logistica de Hidrocarburos CLH, S.A.", /* 45288 */ "unixadm.org", /* 45289 */ "Agentia pentru Agenda Digitala a Romaniei", /* 45290 */ "DOCTORS CENTER HEMATOLOGY & ONCOLOGY GROUP, PSC", /* 45291 */ "DOCTORS' CENTER HEMATOLOGY & ONCOLOGY GROUP BAYAMON, PSC", /* 45292 */ "Transport Network llc", /* 45293 */ "ANEAC Co., Ltd.", /* 45294 */ "BTT Bilgi Teknoloji Tasarim Ltd", /* 45295 */ "Mazars", /* 45296 */ "T-21 Technologies, LLC", /* 45297 */ "Alea s.r.l.", /* 45298 */ "AMRTEC TECNOLOGIA IMPORTAÇÂO E EXPORTAÇÂO LTDA", /* 45299 */ "WatchDox LTD", /* 45300 */ "Double B - Business, s.r.o.", /* 45301 */ "SOIN Soluciones Integrales S.A,", /* 45302 */ "Industrial Software Co", /* 45303 */ "ByteLogix", /* 45304 */ "Asyne inc.", /* 45305 */ "DE-CIX Management GmbH", /* 45306 */ "Tracsis plc", /* 45307 */ "Born Inventors BV", /* 45308 */ "Needham Public Schools", /* 45309 */ "Universidade Estadual de Santa Cruz", /* 45310 */ "GHT Co., Ltd", /* 45311 */ "Instituto para os Assuntos Cívicos e Municipais Macau", /* 45312 */ "iiPAY Ltd", /* 45313 */ "CCV Deutschland GmbH", /* 45314 */ "KRKA, tovarna zdravil, d. d., Novo mesto", /* 45315 */ "devlab", /* 45316 */ "SAU", /* 45317 */ "Rosa Khutor LLC", /* 45318 */ "NGENIX", /* 45319 */ "ActiStuff", /* 45320 */ "Triumph Bancorp, Inc.", /* 45321 */ "GigaEnergy Inc.", /* 45322 */ "BIORETICS SRL", /* 45323 */ "Business Solutions Adviser", /* 45324 */ "roo.ch", /* 45325 */ "Yves Durce ent.", /* 45326 */ "NATAJA Maciej Kozuch", /* 45327 */ "KOSHIN DENKI KOGYO CO., LTD.", /* 45328 */ "Kristin School", /* 45329 */ "Fineline Solutions Ltd.", /* 45330 */ "San Fernando Valley Community Mental Health Center, Inc.", /* 45331 */ "East Side Oncology Clinic PLLC", /* 45332 */ "NeatApps, Inc.", /* 45333 */ "Nextys", /* 45334 */ "Matthias Blümel IT-Dienstleistungen", /* 45335 */ "Microbase", /* 45336 */ "voria.net", /* 45337 */ "Tableau Software, Inc.", /* 45338 */ "JSC \"Housing Construction Savings Bank of Kazakhstan\"", /* 45339 */ "Half-Baked Software", /* 45340 */ "NEXT Srl", /* 45341 */ "IWD Ltd.", /* 45342 */ "Thum+Mahr GmbH", /* 45343 */ "ZhenJiang College", /* 45344 */ "Smithee, Spelvin, Agnew & Plinge, Inc.", /* 45345 */ "Velocloud Networks, Inc.", /* 45346 */ "The Centers for Families and Children", /* 45347 */ "Megvii Inc.", /* 45348 */ "VGNet Networking", /* 45349 */ "jorde.it", /* 45350 */ "XPSoft sas", /* 45351 */ "AMERGINT Technologies Inc.", /* 45352 */ "BRS Sistemas Eletrônicos", /* 45353 */ "E2G srl", /* 45354 */ "Staffordshire Police", /* 45355 */ "Liveblock Auctions International", /* 45356 */ "CUBENet GmbH", /* 45357 */ "Integral Business Solutions", /* 45358 */ "ARC Informatique", /* 45359 */ "Valley Christian School", /* 45360 */ "OC Software Engineering", /* 45361 */ "Coca-Cola Erfrischungsgetraenke AG", /* 45362 */ "Advanced Training LLC", /* 45363 */ "TRIADE InformationSystems GmbH", /* 45364 */ "Om Vindhyavasini College of IT & Management", /* 45365 */ "Cohere Technologies", /* 45366 */ "SilverTip Marine Inc.", /* 45367 */ "Amida Technology Solutions", /* 45368 */ "MVZ Labor Dr. Quade und Kollegen", /* 45369 */ "ID TECH", /* 45370 */ "AV", /* 45371 */ "Professional Software Design Pty Ltd", /* 45372 */ "Speech Technology Center Limited", /* 45373 */ "i-SOLUTIONS HEALTH GmbH", /* 45374 */ "Znuny GmbH", /* 45375 */ "PT. Mahardika Putra Mahkota", /* 45376 */ "Air Liquide IT", /* 45377 */ "Beijing Uxsino software CO.,Ltd", /* 45378 */ "iCRCo, Inc", /* 45379 */ "Happy Crow Enterprises, LLC", /* 45380 */ "iCode Global, LLC", /* 45381 */ "Huf Secure Mobile", /* 45382 */ "SHARP Corporation Communication Systems Division", /* 45383 */ "SERgroup Holding Europe GmbH", /* 45384 */ "4GTSS Corporation W.L.L.", /* 45385 */ "PeopleLogic Corporation", /* 45386 */ "NCC Group PLC.", /* 45387 */ "SSV Software Systems GmbH", /* 45388 */ "LV=", /* 45389 */ "Alef Mobitech Inc.", /* 45390 */ "PLC Group", /* 45391 */ "Quadro Group LLC", /* 45392 */ "OSM GmbH", /* 45393 */ "Mangstor Inc", /* 45394 */ "Secrétariat général de l'enseignement catholique", /* 45395 */ "Dejero Labs. Inc", /* 45396 */ "ASFINAG Maut Service GmbH", /* 45397 */ "Segmint, Inc.", /* 45398 */ "Omemee Engineering Group", /* 45399 */ "Candid Security Solutions LLC", /* 45400 */ "Unitron NV", /* 45401 */ "Arvet Bank Operations, INC.", /* 45402 */ "ExchangeCore LLC", /* 45403 */ "TightVideo Ltd.", /* 45404 */ "Lee County School System", /* 45405 */ "BetEasy Pty Ltd", /* 45406 */ "Northwest Kits", /* 45407 */ "Octavian Technology Ltd", /* 45408 */ "OneSoft Tecnologia S/A", /* 45409 */ "ISAMBERT", /* 45410 */ "Ultra Electronics - Varisys", /* 45411 */ "HGH SYSTEMES INFRAROUGES", /* 45412 */ "Global IQX", /* 45413 */ "SHUYSKIY ZAVOD AKVARIUS LLC", /* 45414 */ "Repheka Haiti, Inc.", /* 45415 */ "Chengdu Chengxun Network Technologies Co., Ltd.", /* 45416 */ "HCO Computer Products /dba ZGO Tech Hosting", /* 45417 */ "ABAST systems", /* 45418 */ "PhirePhly Design", /* 45419 */ "Strike XII Development", /* 45420 */ "Nico Boehr", /* 45421 */ "powerbrand marketing GmbH", /* 45422 */ "Match.com L.L.C.", /* 45423 */ "The Ghosh Center for Oncology & Hematology", /* 45424 */ "Kadlec Health System", /* 45425 */ "Soltec Technology Co., Ltd.", /* 45426 */ "Xiamen Winer Technology Co.,Ltd", /* 45427 */ "UrtheCast", /* 45428 */ "Instituto Federal Catarinense Campus Sombrio", /* 45429 */ "Atlas Copco Rock Drills AB (Business Area MR)", /* 45430 */ "Nanjing Lopu Co., Ltd.", /* 45431 */ "Cirrato Technologies AB", /* 45432 */ "Finivation Software", /* 45433 */ "Accel Frontline Ltd", /* 45434 */ "Cyprus University of Technology", /* 45435 */ "THALES Services Lab DT", /* 45436 */ "TEOCO Corporation", /* 45437 */ "AI2M srl", /* 45438 */ "Esterline Belgium bvba", /* 45439 */ "BISS d.o.o.", /* 45440 */ "Safe Internet, LLC", /* 45441 */ "Wrocław University of Technology", /* 45442 */ "Arca Sistemi Scarl", /* 45443 */ "ecg.local", /* 45444 */ "Kuantic SAS", /* 45445 */ "Ministerio Publico de la Acusación", /* 45446 */ "SOCIETE DU FIGARO", /* 45447 */ "UF Health Oncology - Baymeadows", /* 45448 */ "Blue Krait Consulting Inc.", /* 45449 */ "Parsec (Pty) Ltd", /* 45450 */ "reBTSOFT", /* 45451 */ "Instituto Medico Alexander Fleming", /* 45452 */ "Banff Cyber Technologies Pte Ltd", /* 45453 */ "Shanghai Digigrid Technology Co.,Ltd", /* 45454 */ "John Wason", /* 45455 */ "Galaxia Electronics Co., Ltd.", /* 45456 */ "Kanton Thurgau", /* 45457 */ "VKBit Betrieb GmbH", /* 45458 */ "Lonix Oy", /* 45459 */ "Comfact AB", /* 45460 */ "Pocos bv", /* 45461 */ "Delvag Luftfahrtversicherungs-AG", /* 45462 */ "Federal Public Service Justice, Belgium", /* 45463 */ "Verband Christlicher Pfadfinderinnen und Pfadfinder in Württemberg", /* 45464 */ "Clear2Pay NV/SA", /* 45465 */ "PIXEL Sp. z o.o.", /* 45466 */ "Vidat", /* 45467 */ "Avi Networks", /* 45468 */ "IQ Messenger", /* 45469 */ "Azienda Ospedaliero-Universitaria di Bologna", /* 45470 */ "Triangle Wholefoods Collective Ltd.", /* 45471 */ "Ebee Smart Technologies GmbH", /* 45472 */ "Excelfore Corporation", /* 45473 */ "HfMT Hamburg", /* 45474 */ "MEYTEC GmbH", /* 45475 */ "StreamVue Ltd", /* 45476 */ "ZOO Digital Group plc.", /* 45477 */ "DIVA IT SIA", /* 45478 */ "PXP Solutions Ltd", /* 45479 */ "Packetwerk GmbH", /* 45480 */ "Galore Networks Private Limited", /* 45481 */ "St Jude Medical", /* 45482 */ "FusionLayer, Inc.", /* 45483 */ "Siama Systems Inc.", /* 45484 */ "SCUBI", /* 45485 */ "ACSS Communications Pty Ltd", /* 45486 */ "Polydata Corporate", /* 45487 */ "KONAR", /* 45488 */ "groupe-alpha", /* 45489 */ "Nexperteam", /* 45490 */ "Gainde 2000", /* 45491 */ "Connexin Software, Inc.", /* 45492 */ "Media System Technologies Srl", /* 45493 */ "GISTEC", /* 45494 */ "Konneka Information Technologies", /* 45495 */ "Groupe ESB", /* 45496 */ "Qucell", /* 45497 */ "Novella-R SIA", /* 45498 */ "Janos", /* 45499 */ "Virgin Technologies Inc", /* 45500 */ "Micro Instruments", /* 45501 */ "nterra integration GmbH", /* 45502 */ "42 Solutions B.V.", /* 45503 */ "Synaptive Medical Inc.", /* 45504 */ "Tox Foundation", /* 45505 */ "Mida Solutions s.r.l.", /* 45506 */ "iMapData.com", /* 45507 */ "Strich Labs", /* 45508 */ "YourMembership", /* 45509 */ "BBMRI-ERIC", /* 45510 */ "Cogent Technologies Limited", /* 45511 */ "Entergate AB", /* 45512 */ "Hekatron Technik GmbH", /* 45513 */ "ShenZhen SNMP Link Electronics Co., Ltd.", /* 45514 */ "Econocom-osiatis", /* 45515 */ "Valid Soluciones Tecnógicas S.A.U.", /* 45516 */ "GarantPlus Ltd", /* 45517 */ "Macnica Inc.", /* 45518 */ "Diamedica Sp. z o.o.", /* 45519 */ "Actility", /* 45520 */ "OPENBASE", /* 45521 */ "xipki.org", /* 45522 */ "RFE Broadcast srl", /* 45523 */ "Advancapp", /* 45524 */ "Ubiqam LTD", /* 45525 */ "Snapper Services", /* 45526 */ "Diehl AKO Stiftung & Co. KG", /* 45527 */ "Joerg-Peter Hempel", /* 45528 */ "vishmail.net", /* 45529 */ "Medien Service Untermain GmbH", /* 45530 */ "M.A.D.A.", /* 45531 */ "Infinicore inc", /* 45532 */ "Red Arrow (Southampton) Group Limited", /* 45533 */ "WestNet", /* 45534 */ "Information Systems Dynamics", /* 45535 */ "Rheinmetall Defence Electronics GmbH", /* 45536 */ "NUAZ", /* 45537 */ "PHARMAGEST INTERACTIVE", /* 45538 */ "Domain fritze.org", /* 45539 */ "Rueval S.A.", /* 45540 */ "Schneider Elektronik GmbH", /* 45541 */ "Orlando Utilities Commission", /* 45542 */ "Mekansal Yazilim", /* 45543 */ "IT Kimmig", /* 45544 */ "Ormazabal", /* 45545 */ "SECUWAVE CO,. LT", /* 45546 */ "Wirtgen (China) Machinery Co., Ltd.", /* 45547 */ "Asian Hope Inc", /* 45548 */ "Shenzhen Zontele Technologies Co., Ltd", /* 45549 */ "Webstudio Information Technology Inc.", /* 45550 */ "VIPP", /* 45551 */ "Unisys", /* 45552 */ "GE Healthcare - Engineering", /* 45553 */ "Grupo JAMPIG S.A.S.", /* 45554 */ "RDP", /* 45555 */ "Triadic Industries, LLC", /* 45556 */ "SHENZHEN CAN TECHNOLOGY CO.,LTD", /* 45557 */ "CJSC GROUP OF COMPANIES RENOVA", /* 45558 */ "Prevoty, Inc.", /* 45559 */ "Inovapar Soluções LTDA.", /* 45560 */ "Masterclock, Inc.", /* 45561 */ "Capella Aerospace Systems Engineering Inc.", /* 45562 */ "SOMNOmedics GmbH", /* 45563 */ "Beijing SplendidTel Co.,Ltd.", /* 45564 */ "INTERBYSS S.R.L", /* 45565 */ "INTELMA CONSULTING Inc.", /* 45566 */ "Ticom Geomatics, Inc.", /* 45567 */ "GoCardless Ltd", /* 45568 */ "Core Network Dynamics", /* 45569 */ "IQ Tel d.o.o.", /* 45570 */ "Midfin Systems", /* 45571 */ "awelten", /* 45572 */ "Western Michigan University Homer Stryker M.D. School of Medicine", /* 45573 */ "Hellea SPRL", /* 45574 */ "China Beijing Stegosaurus Technology Laboratory", /* 45575 */ "Hulu LLC", /* 45576 */ "Shenzhen Sundray Technologies Company Limited", /* 45577 */ "BroadQuest", /* 45578 */ "Guangdong Nenkingtech Development Co,Ltd.", /* 45579 */ "DENTCAT", /* 45580 */ "YICHUN YILIAN PRINT TECH CO.,LTD", /* 45581 */ "paysafecard.com Wertkarten GmbH", /* 45582 */ "Puminsoft Co.,Ltd.", /* 45583 */ "OJSC \"RIRT\"", /* 45584 */ "Space Imaging Middle East (SIME)", /* 45585 */ "Mythic Network", /* 45586 */ "Software & Service Center,Sichuan Changhong Electric Co.,Ltd", /* 45587 */ "OLSPS", /* 45588 */ "Doc-Soft Ltd.", /* 45589 */ "Mutesah General Investments ltd", /* 45590 */ "Shenzhen Sungreat Communication Co.,LTD", /* 45591 */ "Julius Clinical", /* 45592 */ "OpenREM", /* 45593 */ "Università Iuav di Venezia", /* 45594 */ "Reaktor 23", /* 45595 */ "ICloud Innovation (Beijing) ltd.", /* 45596 */ "TESA Assa Abloy", /* 45597 */ "Mckinney Independent School District", /* 45598 */ "Network RADIUS SARL", /* 45599 */ "OX Service AG", /* 45600 */ "Wikimedia Deutschland e.V.", /* 45601 */ "Corvus Energy", /* 45602 */ "Rieker, Inc.", /* 45603 */ "BeiJing SmartWell Info&Tech Co.,Ltd.", /* 45604 */ "Wi-SUN Alliance, Inc", /* 45605 */ "Carillon Federal Services Inc.", /* 45606 */ "Sysco Foods", /* 45607 */ "Atlan dynamic group", /* 45608 */ "Centralschweizerische Kraftwerke AG", /* 45609 */ "EAM GmbH & Co. KG", /* 45610 */ "EOSPACE Inc.", /* 45611 */ "Under Armour Connected Fitness", /* 45612 */ "Universiti Malaysia Terengganu", /* 45613 */ "RegEd Inc.", /* 45614 */ "CityNet", /* 45615 */ "Healthcare Information and Management System Society (HIMSS)", /* 45616 */ "The Institute of Computational Technologies of the Siberian Branch of the Russian Academy of Sciences", /* 45617 */ "Ferdinand Malcher", /* 45618 */ "Oei Family Office", /* 45619 */ "Steampunk Island Inc", /* 45620 */ "Tycon Systems Inc.", /* 45621 */ "Netrix LLC.", /* 45622 */ "Hughey & Phillips, LLC", /* 45623 */ "Brain Sense", /* 45624 */ "hahnefeld.net", /* 45625 */ "Sapientia Systems", /* 45626 */ "X NET", /* 45627 */ "HANFORD (DOE)", /* 45628 */ "Ritron", /* 45629 */ "Regional Medical Oncology Center", /* 45630 */ "Perimind Corporation", /* 45631 */ "br0.fr", /* 45632 */ "The Hershey Company", /* 45633 */ "XeeMetric Inc.", /* 45634 */ "Cornerstone Health Enablement Strategic Solutions, LLC", /* 45635 */ "Robit SAS", /* 45636 */ "Dicks Garage", /* 45637 */ "AVOLITES LTD", /* 45638 */ "Chen-Hung Chen", /* 45639 */ "Fujitsu Taiwan Ltd.", /* 45640 */ "SOARNEX Technology Corporation", /* 45641 */ "SITRINICS CAMS, JSC", /* 45642 */ "MARETON d.o.o.", /* 45643 */ "Tom Maher", /* 45644 */ "thinkCSC, Inc", /* 45645 */ "UK Shared Business Services Ltd", /* 45646 */ "Grant Thornton UK LLP", /* 45647 */ "Bridgeway Software, Inc.", /* 45648 */ "Sousou Industries", /* 45649 */ "Fibersystem AB", /* 45650 */ "Layer3 TV, Inc.", /* 45651 */ "New Jersey State Government (Office of Information Technology)", /* 45652 */ "Compression Services", /* 45653 */ "LogicVein, Inc.", /* 45654 */ "CHUNG-HSIN ELECTRIC & MACHINERY MFG. CORP.", /* 45655 */ "Vector-V, Law Firm", /* 45656 */ "Syncbak", /* 45657 */ "P3 GmbH & Co KG", /* 45658 */ "LPO OUI Dev Teams", /* 45659 */ "Pentandra Research Solutions, Inc.", /* 45660 */ "Instec Inc.", /* 45661 */ "Intelligence Ambiante", /* 45662 */ "Hochschule Merseburg", /* 45663 */ "Guangzhou Hugen Electronic Technology Co .Ltd", /* 45664 */ "Biroteh Ltd", /* 45665 */ "Ebiid Product and Solutions, S.L.", /* 45666 */ "Single Digits", /* 45667 */ "Midwest Microwave Solutions Inc.", /* 45668 */ "CBR Systems Limited", /* 45669 */ "tcc construction", /* 45670 */ "Nick Sverdel", /* 45671 */ "HARVL", /* 45672 */ "Smith & Nephew", /* 45673 */ "Redbird Advanced Learning, LLC", /* 45674 */ "Evolve IP, LLC", /* 45675 */ "OCHIN", /* 45676 */ "Parashift", /* 45677 */ "Department of Primary Industries and Mines", /* 45678 */ "AGR Abfallentsorgungs-Gesellschaft Ruhrgebiet mbH", /* 45679 */ "ORISOFT", /* 45680 */ "Polska Spolka Gazownictwa sp. z o.o.", /* 45681 */ "Michigan Education Special Services Association", /* 45682 */ "Flexpay AB (Benify)", /* 45683 */ "Ingenieurbüro Dübon", /* 45684 */ "AllCreator Co., Ltd.", /* 45685 */ "Ratel Technologies", /* 45686 */ "oneM2M", /* 45687 */ "Limone Fresco Limited", /* 45688 */ "Evolveum", /* 45689 */ "bitbone AG", /* 45690 */ "Javacraft LLC", /* 45691 */ "Dantherm Power A/S", /* 45692 */ "arvato Systems S4M GmbH", /* 45693 */ "Comvergence Pty Ltd", /* 45694 */ "CHAPS spol. s r.o.", /* 45695 */ "Mitchel Berberich Software GmbH", /* 45696 */ "Computer Sciences Corporation", /* 45697 */ "E-KENT Teknoloji ve Odeme Sistemleri San. ve Tic A.S", /* 45698 */ "Hireku, Inc.", /* 45699 */ "Transylvania University", /* 45700 */ "IntegraCore, LLC", /* 45701 */ "China Transinfo Technology", /* 45702 */ "Gemeindewerke Ga.-Pa.", /* 45703 */ "Landstinget i Kalmar Län", /* 45704 */ "FINT AB", /* 45705 */ "Bluer Medical Technology", /* 45706 */ "ITCEG S.A.S", /* 45707 */ "Lively Arts Productions LLC", /* 45708 */ "Seibels", /* 45709 */ "Mobie Oy", /* 45710 */ "Matrix Electronica S.L.", /* 45711 */ "SERFIM T.I.C.", /* 45712 */ "CONSULDATA Advisors di Massimo Del Barba", /* 45713 */ "Logitravel SL", /* 45714 */ "Empresa Municipal de Informática S.A. - IPLANRIO", /* 45715 */ "ARGE Rundfunk-Betriebstechnik", /* 45716 */ "Sensu Enterprise", /* 45717 */ "TJH Systems Pty Limited", /* 45718 */ "inQool a.s.", /* 45719 */ "Chaos Computer Club Mainz e.V.", /* 45720 */ "Shenzhen SONTU Medical Imaging Equipment Co.,LTD", /* 45721 */ "Hamburg Port Authority AoeR", /* 45722 */ "Cirrent", /* 45723 */ "FIDO Alliance, Inc.", /* 45724 */ "ABB Xiamen Low Voltage Equipment Co.,Ltd", /* 45725 */ "ecava sdn bhd", /* 45726 */ "HDWIFI TECHNOLOGIES", /* 45727 */ "JunoTele Solutions Pvt. Ltd", /* 45728 */ "Roedl IT Operation GmbH", /* 45729 */ "Geneberg", /* 45730 */ "WOOBE s.a.s.", /* 45731 */ "TIM AG", /* 45732 */ "Frank Wagner Holding Hanseatische Management GmbH", /* 45733 */ "STARNET s.r.o.", /* 45734 */ "easyset", /* 45735 */ "Utilisoft Ltd", /* 45736 */ "shah-network.com", /* 45737 */ "Aspirational Cognition LLC", /* 45738 */ "winfonet.eu", /* 45739 */ "Cirrus Identity, Inc", /* 45740 */ "Entensys", /* 45741 */ "ImageWare Components GmbH", /* 45742 */ "FIBERLAB", /* 45743 */ "GGExo", /* 45744 */ "Care Zone Inc.", /* 45745 */ "University of Rochester Medical Center", /* 45746 */ "Wuhan Rui Ying Tong Network Technology Co., Ltd(China)", /* 45747 */ "Thüga MeteringService GmbH", /* 45748 */ "Evolving Models", /* 45749 */ "gerthoux", /* 45750 */ "Hibernating Rhinos", /* 45751 */ "connecT EDV-Vertriebs GmbH", /* 45752 */ "winterdrache.de", /* 45753 */ "VoipOtago Ltd", /* 45754 */ "2memory LTD", /* 45755 */ "MicroLAB Systems", /* 45756 */ "FUCOM", /* 45757 */ "IPCOMM GmbH", /* 45758 */ "Signicat AS", /* 45759 */ "Kove IO Inc.", /* 45760 */ "Celab Communications AB", /* 45761 */ "Platan spółka z ograniczoną odpowiedzialnością sp.k.", /* 45762 */ "EMG Systems Sp. z o.o.", /* 45763 */ "CH Des pays de Morlaix", /* 45764 */ "nohl.eu", /* 45765 */ "Serval CA", /* 45766 */ "Succeed Management Solutions, LLC", /* 45767 */ "telecoms forensics equipment ltd", /* 45768 */ "Farm House Technologies, LLC.", /* 45769 */ "Digital Loggers, Inc.", /* 45770 */ "weatherlights.com", /* 45771 */ "TauRes Gesellschaft für Investmentberatung mbH", /* 45772 */ "Liebherr-IT Services GmbH", /* 45773 */ "SHS SERVICES GmbH", /* 45774 */ "Tornado Network Operating System", /* 45775 */ "Belden Deutschland GmbH", /* 45776 */ "Fingerprint Technologies SAS", /* 45777 */ "exp Services Inc.", /* 45778 */ "Mosaic Life Care at St. Joseph Medical Oncology", /* 45779 */ "Norsk Sykepleierforbund", /* 45780 */ "Masaryk Memorial Cancer Institute", /* 45781 */ "Metacores Sp. z o.o.", /* 45782 */ "TEKIN", /* 45783 */ "Novarad, Corp", /* 45784 */ "bangj, LLC", /* 45785 */ "SAT-AN CableNet SE", /* 45786 */ "WISTE", /* 45787 */ "Agustus & Ahab, Inc.", /* 45788 */ "Vicon", /* 45789 */ "Crystal GmbH", /* 45790 */ "Neos Ventures GmbH", /* 45791 */ "Flohr IT", /* 45792 */ "Joint Stock Company \"PK Kupchino\"", /* 45793 */ "Safe Creative", /* 45794 */ "Primo1D SA", /* 45795 */ "Umea Municipality", /* 45796 */ "Viettel Group", /* 45797 */ "Enovae BV", /* 45798 */ "Csaw BV", /* 45799 */ "Zorgdoc Nederland BV", /* 45800 */ "TARASOFT SRL", /* 45801 */ "Ubee Interactive Corp.", /* 45802 */ "netcruz inc.", /* 45803 */ "ERICA", /* 45804 */ "OCMW Temse", /* 45805 */ "genealogie.com", /* 45806 */ "Starbucks Coffee Company", /* 45807 */ "Global Tecnologia LTDA.", /* 45808 */ "Beijing Mipay Technology Co., Ltd.", /* 45809 */ "Binary Rock", /* 45810 */ "Istvan Puzsar e.v.", /* 45811 */ "ILoca Services, Inc.", /* 45812 */ "PI '97 Bt.", /* 45813 */ "Waukesha-Pearce Industries, Inc.", /* 45814 */ "Sourcewise", /* 45815 */ "Bruce R. Smith Limited", /* 45816 */ "Inacomp Consultores SA", /* 45817 */ "Passaic County Technical Institute", /* 45818 */ "Sven Anders", /* 45819 */ "PROFIPRINT spol. s r.o.", /* 45820 */ "21st century Oncology, LLC-Gabriel Domenech MD", /* 45821 */ "Les Ambassadeurs Club", /* 45822 */ "Orient Technologies LTD", /* 45823 */ "System One Noc & Development Solutions", /* 45824 */ "One-Click Softworks", /* 45825 */ "Singlewire Software, LLC", /* 45826 */ "Beijing JN TASS Technology Co.,Ltd.", /* 45827 */ "Kanhan Technologies Limited", /* 45828 */ "preis24.de GmbH", /* 45829 */ "Imtech Traffic & Infra UK Ltd", /* 45830 */ "Argo Technologie SA", /* 45831 */ "I-ROSE d.o.o.", /* 45832 */ "Hoffmann Foerdertechnik GmbH", /* 45833 */ "Tieto Finland Oy", /* 45834 */ "Tangara Tagentis Inc.", /* 45835 */ "Varonis System inc.", /* 45836 */ "Orage.io", /* 45837 */ "BELIMO Automation AG", /* 45838 */ "NETEVEN", /* 45839 */ "Lester Electrical of Nebraska, Inc.", /* 45840 */ "System One Noc & Development Solutions S.A", /* 45841 */ "Andrew Stemen", /* 45842 */ "WebNet Broadband", /* 45843 */ "Uwe Stoppel", /* 45844 */ "EchoPixel, Inc.", /* 45845 */ "StorPool Storage AD", /* 45846 */ "ComputerTel LTD", /* 45847 */ "VISHMAIL", /* 45848 */ "MMCVEN Mail", /* 45849 */ "Eternity's Touch, Inc.", /* 45850 */ "Unfallkasse Baden-Wuerttemberg", /* 45851 */ "Miami Hematology and Oncology Associates", /* 45852 */ "Jaguar Land Rover Limited", /* 45853 */ "Cell Technology Ltd.", /* 45854 */ "Intracom Asia Co., Ltd.", /* 45855 */ "Mie Prefectural Government", /* 45856 */ "Kailow Graphic A/S", /* 45857 */ "Cifernet Inc.", /* 45858 */ "Pylo.Net", /* 45859 */ "Exel Technology Group", /* 45860 */ "Research Associates of Syracuse, Inc.", /* 45861 */ "Apost Ltd.", /* 45862 */ "La Folie Boutique", /* 45863 */ "Direction Generale de l'Education et des Enseignements", /* 45864 */ "Shouei electric,co", /* 45865 */ "GlobalPME", /* 45866 */ "LUKOIL Bulgaria Ltd.", /* 45867 */ "Skywire Technologies", /* 45868 */ "POET GmbH", /* 45869 */ "Fraunhofer Institute for Secure Information Technology SIT", /* 45870 */ "FATECH Electronic", /* 45871 */ "Institut National de l'Audiovisuel", /* 45872 */ "Instituto Federal Catarinense", /* 45873 */ "Coencorp", /* 45874 */ "Edward H. Kaplan,M.D. and Assoc.", /* 45875 */ "Jetson Systems, LLC", /* 45876 */ "Intelligent Homes", /* 45877 */ "vesperal.eu", /* 45878 */ "Université de Lille", /* 45879 */ "West-Ward Pharmaceuticals Corp", /* 45880 */ "2Lconsult", /* 45881 */ "Global Voice Group, S.A.", /* 45882 */ "EagleBurgmann Germany GmbH & Co. KG", /* 45883 */ "AuthClub Inc", /* 45884 */ "Cesbo Ltd.", /* 45885 */ "Connect-Omsk, Ltd.", /* 45886 */ "Arke Telekom Ltd. Sti.", /* 45887 */ "Jawset Visual Computing", /* 45888 */ "TechMIC electronics", /* 45889 */ "Sys-City Co., Ltd.", /* 45890 */ "Pandora A/S", /* 45891 */ "Combination AB", /* 45892 */ "PSTech", /* 45893 */ "SysAdmin-CR Sociedad Anonima", /* 45894 */ "SysAdmin-CR Sociedad Anonima", /* 45895 */ "Paperless Pipeline, LLC.", /* 45896 */ "M H Corbin Inc", /* 45897 */ "KEYLOGIC AB", /* 45898 */ "CASwell Inc", /* 45899 */ "Weber Schraubautomaten GmbH", /* 45900 */ "Kellerman Networks", /* 45901 */ "Kellerman Networks", /* 45902 */ "dachsbau", /* 45903 */ "National Foods Ltd.", /* 45904 */ "Obihai Technology, Inc.", /* 45905 */ "Selinko S.A.", /* 45906 */ "PolyVirtual Corporation", /* 45907 */ "ITDO Inc.", /* 45908 */ "SHENZHEN ANKKI TECHNOLOGIES CO., LTD", /* 45909 */ "haiyi", /* 45910 */ "SynerMed Labs", /* 45911 */ "Universitas Brawijaya", /* 45912 */ "M2 Group Pty Ltd", /* 45913 */ "Cetera Financial Group", /* 45914 */ "PromonLogicalis", /* 45915 */ "Quest Payment Systems", /* 45916 */ "NFRI", /* 45917 */ "Network Canary", /* 45918 */ "Planevision Systems GmbH", /* 45919 */ "Humble Carrier", /* 45920 */ "Ministry of Agriculture Latvia", /* 45921 */ "DunaNet-DeviceManagement LLC", /* 45922 */ "TVN S.A.", /* 45923 */ "NOU IPAP", /* 45924 */ "MPS GmbH", /* 45925 */ "OpenZAB.com", /* 45926 */ "Ahsay Systems Corporation Limited", /* 45927 */ "MORU Industrial Systems Co.,LTD.", /* 45928 */ "Plum Sp. z o.o.", /* 45929 */ "Landwirtschaftskammer Niedersachsen", /* 45930 */ "Patterson Companies", /* 45931 */ "Walcoe", /* 45932 */ "Kuratorium für Dialyse und Nierentransplantation e.V.", /* 45933 */ "Fiber Mountain Inc", /* 45934 */ "Main Line Oncology Hematology Associates", /* 45935 */ "Das Kommunalunternehmen des Landkreises Wuerzburg", /* 45936 */ "M & C Enterprises, Ltd.", /* 45937 */ "Intelligent Visibility, Inc.", /* 45938 */ "TRIMET S.A.", /* 45939 */ "Beckman Library", /* 45940 */ "Papa Malick MBOW", /* 45941 */ "ezVoice Telecom", /* 45942 */ "Londelec UK Ltd", /* 45943 */ "IT Telecom co.,Ltd", /* 45944 */ "Friedrich-von-Bodelschwingh-Schule", /* 45945 */ "dynexo GmbH", /* 45946 */ "Kartal Belediye Baskanligi", /* 45947 */ "FitnessFirst Germany", /* 45948 */ "RF elements s.r.o.", /* 45949 */ "Cogo Labs", /* 45950 */ "RDK Management LLC", /* 45951 */ "CTRLTECH S.A.", /* 45952 */ "CyberData Corporation", /* 45953 */ "Truven Health Analytics Inc.", /* 45954 */ "Big Daddy Games, LLC", /* 45955 */ "128 Technology", /* 45956 */ "Cryptographic Information Services", /* 45957 */ "aisubp", /* 45958 */ "Zhongyunwangan Technology (Beijing) Co.,Ltd", /* 45959 */ "IMS, TU Wien", /* 45960 */ "ATGEN SOFTWARE SOLUTIONS LLP", /* 45961 */ "SHOWA TSUSHIN KOGYO INC.", /* 45962 */ "HHnet", /* 45963 */ "Dispersive Technologies", /* 45964 */ "Aleris International Inc", /* 45965 */ "GURI SOFTHOUSE LTDA", /* 45966 */ "SWAN Analytische Instrumente AG", /* 45967 */ "perinova IT-Management GmbH", /* 45968 */ "perinova IT-Management GmbH", /* 45969 */ "Böttcher & Collin GbR", /* 45970 */ "CJSC \"Transinfoset\"", /* 45971 */ "Baptist School of Health Professions", /* 45972 */ "Playground Global", /* 45973 */ "SPINNER GmbH", /* 45974 */ "Securities Finance Trust Company", /* 45975 */ "Intema Comunicaciones", /* 45976 */ "Platform.sh", /* 45977 */ "Vision 95 Ltd.", /* 45978 */ "Intevac, Inc.", /* 45979 */ "S.Network Communications Ltd.", /* 45980 */ "DroidInActu", /* 45981 */ "Goletas", /* 45982 */ "Airbus DS Limited - MIPN", /* 45983 */ "OOO Stels", /* 45984 */ "CyberStream Ltd", /* 45985 */ "Kramer Electronics Ltd.", /* 45986 */ "Rete telematica del CNR di Pisa", /* 45987 */ "SKYCOM", /* 45988 */ "SKYCOM", /* 45989 */ "Brueckner-Werke KG", /* 45990 */ "KLENK HOLZ AG", /* 45991 */ "Grabeuh Corp.", /* 45992 */ "ITSMOS", /* 45993 */ "Prink s.r.l", /* 45994 */ "Posteo e.K.", /* 45995 */ "Chora A/S", /* 45996 */ "Colorado Center for Gynecologic Oncology", /* 45997 */ "JENSEN-GROUP", /* 45998 */ "The Dysongang", /* 45999 */ "Third Light Ltd.", /* 46000 */ "Vektra Advanced Engineering", /* 46001 */ "6Harmonics Inc.", /* 46002 */ "NAUTILUS INFOTECH Co., Ltd.", /* 46003 */ "50Hertz Transmission GmbH", /* 46004 */ "SAG Services AG", /* 46005 */ "Greetz BV", /* 46006 */ "Augustinum gGmbH", /* 46007 */ "Codan A/S", /* 46008 */ "Advanced Hematology & Oncology Group of PR", /* 46009 */ "Westfalen Weser Netz GmbH", /* 46010 */ "cloudVM Inc.", /* 46011 */ "Redhot OOO", /* 46012 */ "Yhat, Inc.", /* 46013 */ "KCA Deutag", /* 46014 */ "PrimoTechSolution S.R.L.", /* 46015 */ "Leonton Technologies, Co. Ltd.", /* 46016 */ "Research Institute of Systems Planning, Inc. / ISP", /* 46017 */ "Thoralf Tietboehl (ttcn)", /* 46018 */ "DSPG Ltd.", /* 46019 */ "Cardio Sistemas Coml. Indl. Ltda.", /* 46020 */ "Thales Belgium SA", /* 46021 */ "Deep S.R.L", /* 46022 */ "High Desert Oncology", /* 46023 */ "W&W-AFCO STEEL LLC", /* 46024 */ "Kahana Technology, LLC", /* 46025 */ "Southern Oncology Hematology Associates", /* 46026 */ "OFICINA NACIONAL DE PROCESOS ELECTORALES", /* 46027 */ "Play Consulting", /* 46028 */ "Serenergy A/S", /* 46029 */ "iRespond", /* 46030 */ "Taconza LLC", /* 46031 */ "AccelStor, Inc.", /* 46032 */ "Cavium Inc.", /* 46033 */ "Ramakrishna Mission Vivekananda University", /* 46034 */ "Company Crypton Ltd.", /* 46035 */ "IT CARD Centrum Technologii Platniczych SA", /* 46036 */ "City of Pearland", /* 46037 */ "Layer8", /* 46038 */ "Dynamist AB", /* 46039 */ "Freestyle Technology Pty. Ltd.", /* 46040 */ "W.B. Hunt Co., Inc.", /* 46041 */ "SpacePath Communications", /* 46042 */ "element j", /* 46043 */ "Cloudbyte", /* 46044 */ "BYTEDANCE LTD.", /* 46045 */ "Branislav Manic Law Office", /* 46046 */ "paulista informatica ltd", /* 46047 */ "Attivo Networks", /* 46048 */ "SMSEagle", /* 46049 */ "Remod Oy", /* 46050 */ "STAGE2015", /* 46051 */ "Neotys", /* 46052 */ "AVEBE U.A.", /* 46053 */ "NBS Ltd.", /* 46054 */ "Hytera Broadband Products", /* 46055 */ "OOO\"NPF MULTIOBRABOTKA\"", /* 46056 */ "Hong Kong Community Athletic Development", /* 46057 */ "Panda Sports", /* 46058 */ "Vidamin Ltd", /* 46059 */ "central florida cancer and blood center", /* 46060 */ "Ognios GmbH", /* 46061 */ "YAVEON AG", /* 46062 */ "Broala", /* 46063 */ "AddApptr GmbH", /* 46064 */ "Cannabis Credit", /* 46065 */ "The DiameterTech Project", /* 46066 */ "Union College - Computer Science Department", /* 46067 */ "Take-Two Interactive Software, Inc.", /* 46068 */ "Deutsches Rotes Kreuz Ortsverein Suedlicher Wonnegau e. V.", /* 46069 */ "NDP, LLC (NVEA)", /* 46070 */ "Chista Ltd.", /* 46071 */ "B2B-SOFT", /* 46072 */ "Imbasoft", /* 46073 */ "ROAMData, Inc.", /* 46074 */ "Freshmind Sp. z o. o.", /* 46075 */ "Edward A Eichler, Jr., M.D., P.A.", /* 46076 */ "Inventive IT Services Ltd", /* 46077 */ "Beijing ForceControl-Huacon Technology Co., Ltd.", /* 46078 */ "HM Electronics, Inc.", /* 46079 */ "Yara SA/NV", /* 46080 */ "INFODAS Gesellschaft für Systementwicklung und Informationsverarbeitung mbH", /* 46081 */ "AVI", /* 46082 */ "F&F Computer Anwendungen und Unternehmensberatung GmbH", /* 46083 */ "FACTORYNET AUGUSTA, S.L.", /* 46084 */ "INFORMATICA Y PROCESOS DE GESTION, S.L.", /* 46085 */ "Infoteam Technique SA", /* 46086 */ "IT Scharschinger", /* 46087 */ "Sylvain Girod", /* 46088 */ "DB.Studio", /* 46089 */ "namotronic GmbH", /* 46090 */ "ICM University of Warsaw", /* 46091 */ "Ingenieurgesellschaft für Gebäudeautomation mbH", /* 46092 */ "Sistelbanda S.A.", /* 46093 */ "Brampton College", /* 46094 */ "otrisPROJECTS GmbH", /* 46095 */ "bitbert.com", /* 46096 */ "IPiFony Systems, Inc.", /* 46097 */ "Ericsson Canada Inc.", /* 46098 */ "Community Health Systems-CHS14", /* 46099 */ "Maxwell Paper Canada Inc", /* 46100 */ "Belar Electronics Laboratory Inc", /* 46101 */ "Art Van Furniture, Inc.", /* 46102 */ "VoIP Integration Inc", /* 46103 */ "TVM Capital", /* 46104 */ "Alexion Pharmaceuticals, Inc.", /* 46105 */ "1-800 Contacts Inc.", /* 46106 */ "Medivation, Inc.", /* 46107 */ "Medivation, Inc.", /* 46108 */ "Credomatic", /* 46109 */ "smartTrade Technologies", /* 46110 */ "Document Knowledge Business Solutions (DKB Solutions SA)", /* 46111 */ "All Russian Institute for Scientific and Technical Information (VINITI) of the Russian Academy of Sciences", /* 46112 */ "The Moscow Chamber of Advocates", /* 46113 */ "«SUMYOBLENERGO» PJSC", /* 46114 */ "Progi-média inc.", /* 46115 */ "CRYPTONEO", /* 46116 */ "SMP Solutions GmbH", /* 46117 */ "SwissMediaPartners AG", /* 46118 */ "Eden Rock Communications, LLC", /* 46119 */ "Alliance-Electronics, Ltd.", /* 46120 */ "The Stahura-Brenner Group Inc.", /* 46121 */ "WrightCCS", /* 46122 */ "Wiener Boerse AG", /* 46123 */ "MICI Network Co,.Ltd", /* 46124 */ "Canadian Pacific", /* 46125 */ "Blockstream", /* 46126 */ "Rock Solid Solutions LLC", /* 46127 */ "City of Biel", /* 46128 */ "MechanicaPark LLC", /* 46129 */ "Informa Sistemi S.P.A.", /* 46130 */ "Hackerspace Kraków", /* 46131 */ "Amdatu", /* 46132 */ "ostermeyer.de", /* 46133 */ "Uprava za indirektno oporezivanje", /* 46134 */ "MSS Managed Security Services GmbH", /* 46135 */ "Steinbeis Embedded Systems Technologies GmbH", /* 46136 */ "Association Clandestine", /* 46137 */ "HTU Härtetechnik Uhldingen-Mühlhofen GmbH", /* 46138 */ "Baseventure Investing", /* 46139 */ "Laboratoire d'Analyse et de Mathématiques Appliquées", /* 46140 */ "Ysance", /* 46141 */ "ShenZhen Sinexcel Electric Co.Ltd.", /* 46142 */ "Lazada Tech Hub", /* 46143 */ "Schmidt & Co., (H.K.) Ltd. Taiwan Branch", /* 46144 */ "A. Baggenstos & Co. AG", /* 46145 */ "INFORM GmbH", /* 46146 */ "American Prepaid VAS LLC", /* 46147 */ "Beijing Yoxon Smart Technology Co.,Ltd.", /* 46148 */ "ZAO Citibank", /* 46149 */ "spornkuller.de", /* 46150 */ "Brett A. Lewis", /* 46151 */ "MCHV Software", /* 46152 */ "Budafony", /* 46153 */ "xMob", /* 46154 */ "TAKAOKA TOKO CO.,LTD.", /* 46155 */ "SB Systems Co.,Ltd", /* 46156 */ "NARI Technology Co., Ltd.", /* 46157 */ "Ohanae", /* 46158 */ "TselinTransStroy Ltd.", /* 46159 */ "GDV Dienstleistungs-GmbH & Co. KG", /* 46160 */ "Mobile Viewpoint", /* 46161 */ "Tuna Technologies Limited", /* 46162 */ "Neuberger Gebaeudeautomation GmbH", /* 46163 */ "AS-PC Sarl", /* 46164 */ "Politeknik Negeri Ujung Pandang", /* 46165 */ "JETR Consulting", /* 46166 */ "Toptranslation GmbH", /* 46167 */ "NewGen Interactive Software Corporation", /* 46168 */ "International Capital Investment Company", /* 46169 */ "Runetwister Publishing", /* 46170 */ "HashPlex, Inc", /* 46171 */ "Redcello Ltd.", /* 46172 */ "PayPal Inc", /* 46173 */ "SecuLynx Corporation", /* 46174 */ "NEWIND Sp. z o.o.", /* 46175 */ "SensorLink", /* 46176 */ "KYOSAN ELECTRIC MFG. CO., LTD.", /* 46177 */ "Faculty of Informatics, TU Wien", /* 46178 */ "Pikkatech Software Development & Consulting", /* 46179 */ "Gables Engineering, Inc.", /* 46180 */ "sanscomp", /* 46181 */ "Golden Grid Systems", /* 46182 */ "Dansk Medicinsk DataCenter ApS", /* 46183 */ "Lumentum.com", /* 46184 */ "Intelity", /* 46185 */ "cyontec solutions GmbH", /* 46186 */ "AGRAVIS Raiffeisen AG", /* 46187 */ "MarketFactory Inc", /* 46188 */ "John Cianfarani", /* 46189 */ "Phoenyxcode", /* 46190 */ "21st Century Oncology - Crestview", /* 46191 */ "ToastCoders", /* 46192 */ "Distributed Hacker Maker Network Inc.", /* 46193 */ "arara inc.", /* 46194 */ "sdc world group co.", /* 46195 */ "Narodowy Fundusz Ochrony Srodowiska i Gospodarki Wodnej", /* 46196 */ "Telensa Limited", /* 46197 */ "Equinox Holdings LLC", /* 46198 */ "DENTSPLY International", /* 46199 */ "Matthew Martin", /* 46200 */ "Business Telecommunications Services Europe", /* 46201 */ "Avigilon Corporation", /* 46202 */ "Strictly Monitoring Limited", /* 46203 */ "Hutchison Drei Austria GmbH", /* 46204 */ "MIT Dynamic Technologies Limited", /* 46205 */ "Stamm", /* 46206 */ "Kasisto, Inc.", /* 46207 */ "Knjaz Milos a.d.", /* 46208 */ "deepin", /* 46209 */ "Shanghai Koal Software", /* 46210 */ "Fernfachhochschule Schweiz (FFHS)", /* 46211 */ "e2E Satcom Limited", /* 46212 */ "Atmos Sistemas Ltda.", /* 46213 */ "COGIT MATIDA UK LTD", /* 46214 */ "Shandong Senter Electronic Co., Ltd.", /* 46215 */ "Rocken am Brocken UG", /* 46216 */ "VINCI Energies Schweiz AG", /* 46217 */ "SilverTours GmbH", /* 46218 */ "Migros Bank AG", /* 46219 */ "Ministério Público do Estado de Santa Catarina", /* 46220 */ "iconectiv", /* 46221 */ "On IP 46 Limited", /* 46222 */ "Cyber Medical Imaging, Inc.", /* 46223 */ "Inner Range Pty. Ltd.", /* 46224 */ "tehasdf.com", /* 46225 */ "Apigee Corporation", /* 46226 */ "Guangxi radio and television information network corporation limited", /* 46227 */ "Nikko Graphic Arts Co.,Ltd.", /* 46228 */ "igus GmbH", /* 46229 */ "Cleverlance Enterprise Solutions a.s.", /* 46230 */ "Eikeo", /* 46231 */ "Ergatel", /* 46232 */ "Mundo Digital Informática Redes y Comunicación S.L.", /* 46233 */ "SpaceTeamLab, Ltd.", /* 46234 */ "RCNTEC", /* 46235 */ "Multisoft S.A.", /* 46236 */ "Ayuntamiento de Alcobendas", /* 46237 */ "Immobilien Hilgers e.K", /* 46238 */ "InviNets", /* 46239 */ "Polish Border Guard (Border Guard Headquarters)", /* 46240 */ "Bionic Fuel Knowledge Partners Inc.", /* 46241 */ "Netonix", /* 46242 */ "Programize", /* 46243 */ "South African Air Force", /* 46244 */ "Reo3", /* 46245 */ "88.io", /* 46246 */ "Supertel-DALS", /* 46247 */ "Pole/Zero Corporation", /* 46248 */ "SITES", /* 46249 */ "Amsted Rail", /* 46250 */ "POSBANK", /* 46251 */ "Z-ROUTER TECHNOLOGY", /* 46252 */ "Plusserver GmbH", /* 46253 */ "Vector Informatik GmbH", /* 46254 */ "Ovenden Papers Limited", /* 46255 */ "Hokkaido University", /* 46256 */ "Wlbe Deutschland", /* 46257 */ "VENISO SOLUTIONS PRIVATE LIMITED", /* 46258 */ "Hauseigentümerverband Zürich", /* 46259 */ "IQ-Media B.V.", /* 46260 */ "Universidad Nacional del Litoral", /* 46261 */ "Zscaler Inc", /* 46262 */ "LPL Financial", /* 46263 */ "FinnHEMS Oy", /* 46264 */ "AlBikar.net", /* 46265 */ "Wood County Telephone Company dba Solarus", /* 46266 */ "Development Gateway", /* 46267 */ "bleim.net GmbH", /* 46268 */ "Dynasys Technology Co.,LTD", /* 46269 */ "NBOO-RU", /* 46270 */ "PaloVerde Cancer Specialists", /* 46271 */ "DataStax, Inc.", /* 46272 */ "informalogique", /* 46273 */ "Heartware", /* 46274 */ "EBPI", /* 46275 */ "Linux Lab", /* 46276 */ "Ministerio dos Petroleos", /* 46277 */ "TÜV NORD AG", /* 46278 */ "Thomas Hellström", /* 46279 */ "Enterprise Computing", /* 46280 */ "WRITESYS Traffic Systems", /* 46281 */ "uGo3D LLC", /* 46282 */ "Inmotion Data, LLC.", /* 46283 */ "ENERGEX", /* 46284 */ "Trimble Navigation Ltd.", /* 46285 */ "RUDIMENTS", /* 46286 */ "yaxunhongda", /* 46287 */ "Tedas B.V.", /* 46288 */ "gluIT Software GmbH", /* 46289 */ "VS XXI JSC", /* 46290 */ "IES srl", /* 46291 */ "Koiossian Inc.", /* 46292 */ "Monroe County Hospital Oncology Clinic", /* 46293 */ "inView GmbH", /* 46294 */ "City of Huntsville", /* 46295 */ "SHI", /* 46296 */ "Agrarmarkt Austria", /* 46297 */ "ISPM Serviços em Informática LTDA", /* 46298 */ "Birmingham Hematology and Oncology Associates, LLC d/b/a Alabama Oncology", /* 46299 */ "MicroKnight Business Systems Ltd.", /* 46300 */ "CARRA, Inc.", /* 46301 */ "Urmet Sistemi S.p.A.", /* 46302 */ "ITSUDE", /* 46303 */ "GSMA", /* 46304 */ "OSDE", /* 46305 */ "Institute for Traffic Safety Management and Research", /* 46306 */ "Briskhome", /* 46307 */ "GDC Communications", /* 46308 */ "Delft Solutions", /* 46309 */ "BCons Argentina S.A.", /* 46310 */ "Baufest", /* 46311 */ "Jack Kingsman", /* 46312 */ "Level 8 Aps", /* 46313 */ "SongMovers", /* 46314 */ "Silicon Valley Bank", /* 46315 */ "AERTiCKET AG", /* 46316 */ "VRSG Verwaltungsrechenzentrum AG St.Gallen", /* 46317 */ "Mils Electronic Gesmbh & CoKG", /* 46318 */ "Traffic Tech Inc.", /* 46319 */ "BNC National Bank", /* 46320 */ "Sensignal Co.,Ltd.", /* 46321 */ "Gareth Williams", /* 46322 */ "F. KLUCZNIK & SON LIMITED", /* 46323 */ "HAYSYS Ltd", /* 46324 */ "Firstwan Delivery Network Services", /* 46325 */ "IUT de VALENCE", /* 46326 */ "Niagara Regional Police Service", /* 46327 */ "DDS Wireless International Inc", /* 46328 */ "Security Indemnity Insurance Company In Liquidation", /* 46329 */ "Vubiq Networks", /* 46330 */ "NightSteam Solutions", /* 46331 */ "Lacuna Software LTDA - EPP", /* 46332 */ "American Express Global Business Travel", /* 46333 */ "HRM Systems AG", /* 46334 */ "Bruce A. Hayton, M.D.", /* 46335 */ "Live Niaga", /* 46336 */ "Meisei Electric Co., Ltd.", /* 46337 */ "CTO Balzuweit GmbH", /* 46338 */ "National Archives, Czech Republic", /* 46339 */ "The Opole University of Technology", /* 46340 */ "Dansk Metalarbejderforbund", /* 46341 */ "Anoop Sukumaran", /* 46342 */ "mazou kitchen", /* 46343 */ "PricewaterhouseCoopers AG", /* 46344 */ "Clear Government Solutions, Inc.", /* 46345 */ "Vail Software Solutions", /* 46346 */ "Ovapro", /* 46347 */ "Providence Health & Services", /* 46348 */ "Deepfield", /* 46349 */ "NorCERT - Norwegian Computer Emergency Response Team", /* 46350 */ "Laubheimer Networks", /* 46351 */ "Premier Business Centers", /* 46352 */ "Schwackenberg Consulting", /* 46353 */ "Kooperativa pojistovna, a.s.", /* 46354 */ "Expert-Team Pte Ltd", /* 46355 */ "Grupo de Tecnologia Cibernetica, S.A. de C.V.", /* 46356 */ "NBS System", /* 46357 */ "Zwick GmbH & Co KG", /* 46358 */ "Robert P. Fein and David A. Richards", /* 46359 */ "West and Central African Research and Education Network (WACREN)", /* 46360 */ "Richard Scranton", /* 46361 */ "Digital Data Technologies Inc.", /* 46362 */ "BGProtect", /* 46363 */ "Halmstad University", /* 46364 */ "arvato IT Support GmbH", /* 46365 */ "Technicolor", /* 46366 */ "UPSINVERTER.COM", /* 46367 */ "The Job Planet", /* 46368 */ "Miskolci Egyetem Informatikai Intezet", /* 46369 */ "eshore", /* 46370 */ "Japan Canada Oil Sands Limited", /* 46371 */ "Uber Operations, LLC", /* 46372 */ "Bypass Network Services", /* 46373 */ "Zizaike Inc.", /* 46374 */ "eCommistry Ltd", /* 46375 */ "Nullroute", /* 46376 */ "Star Media (Beijing) CO.,LTD", /* 46377 */ "Centre Hospitalier Mémorial Saint-Lô", /* 46378 */ "LunaticIsland.net", /* 46379 */ "Enghouse Interactive AB", /* 46380 */ "Imterra", /* 46381 */ "Berolina-autolacke", /* 46382 */ "Ministry Division, Church of England", /* 46383 */ "DUCA Financial Services Credit Union Ltd.", /* 46384 */ "Walnut Hill Physicians’ Hospital, LLC", /* 46385 */ "Shenzhen GL-COM Technology Co.,Ltd.", /* 46386 */ "Drift", /* 46387 */ "Taygeta Scientific Inc.", /* 46388 */ "VESTA", /* 46389 */ "Clarke Technical Services, Inc.", /* 46390 */ "jddev", /* 46391 */ "Donostian Belgie", /* 46392 */ "Programlabbet AB", /* 46393 */ "BLITSC", /* 46394 */ "FirstRand Group", /* 46395 */ "Marotta Controls, Inc.", /* 46396 */ "iSecway Inc.", /* 46397 */ "Regional Cancer Care Associates Hope Community Cancer Center Division", /* 46398 */ "iSIGHT Partners", /* 46399 */ "NorQuest College", /* 46400 */ "Marshall B. Ketchum University", /* 46401 */ "NSF Telecom Ab", /* 46402 */ "QA2", /* 46403 */ "DOT Systems Sp. z o.o.", /* 46404 */ "superChic", /* 46405 */ "Foundation Pärnu Hospital", /* 46406 */ "TECNOLOGIAS EOS SA DE CV", /* 46407 */ "PKP Polskie Linie Kolejowe S.A.", /* 46408 */ "BSP Consulting spol. s r.o.", /* 46409 */ "SEGGER Microcontroller GmbH & Co. KG", /* 46410 */ "Art2Wave Canada Inc.", /* 46411 */ "Andrew Sheret Ltd.", /* 46412 */ "Table25, Inc.", /* 46413 */ "William Oliver", /* 46414 */ "Open Banking Foundation", /* 46415 */ "The National Archives of Latvia", /* 46416 */ "Emerald Coast Cancer Center", /* 46417 */ "Agile Ingeniería y Consultoría Ltda.", /* 46418 */ "Araknis Networks", /* 46419 */ "Knauf Information Services GmbH", /* 46420 */ "B/E Aerospace", /* 46421 */ "UTEK TECHNOLOGY(SHENZHEN)CO,LTD", /* 46422 */ "Osirium Ltd", /* 46423 */ "Otterbein Homes", /* 46424 */ "DTSV, Inc.", /* 46425 */ "Salinas Valley Medical Clinic Cancer Care", /* 46426 */ "LISI AEROSPACE", /* 46427 */ "Mobicare", /* 46428 */ "Universidad Nacional de San Martin", /* 46429 */ "RTEC", /* 46430 */ "Alaf Organization", /* 46431 */ "Modula Shop Systems", /* 46432 */ "Fern Ridge School District 28J", /* 46433 */ "consulter net GmbH", /* 46434 */ "LEW AG", /* 46435 */ "Infoprocess", /* 46436 */ "TTI NORTE SL", /* 46437 */ "Bartec-Vodec", /* 46438 */ "Bolsas y Mercados Españoles Innova, S.A.U. (BME Innova).", /* 46439 */ "Cloud Electronics Ltd.", /* 46440 */ "AKROS AG", /* 46441 */ "PIHI Media", /* 46442 */ "intec GmbH", /* 46443 */ "Zhejiang Huanshun Network Science & Technology Co., Ltd.", /* 46444 */ "Unitel Engineering", /* 46445 */ "OV Corporation SAS", /* 46446 */ "Embedict", /* 46447 */ "Telewizja Polsat Spolka z o. o.", /* 46448 */ "Collibra", /* 46449 */ "Opsmate, Inc.", /* 46450 */ "InfoRelay Online Systems, Inc", /* 46451 */ "Lanworld Finland Oy", /* 46452 */ "McKesson IWS", /* 46453 */ "Goldberg and Mathew Medical Assc P.L.L.C.", /* 46454 */ "Coral Active", /* 46455 */ "AttoCore Ltd", /* 46456 */ "Gerrie Electric Wholesale Limited", /* 46457 */ "ENow, inc.", /* 46458 */ "Mairie de Canteleu", /* 46459 */ "Veterinary Specialists of North Texas", /* 46460 */ "Outhwaite Technologies", /* 46461 */ "Sicoob Confederação", /* 46462 */ "Radio Gigabit Inc.", /* 46463 */ "Knowledgeloop, Inc.", /* 46464 */ "EKE-Electronics Ltd.", /* 46465 */ "Rossbach Systems", /* 46466 */ "CellSens", /* 46467 */ "Coho Data, Inc.", /* 46468 */ "149W Managed Services LLC", /* 46469 */ "Man Technology Co, Ltd.", /* 46470 */ "Illusive Networks Ltd.", /* 46471 */ "infraView GmbH", /* 46472 */ "Otterbein Homes", /* 46473 */ "Kiwox Soluciones Tecnológicas", /* 46474 */ "OSTEC Business Security", /* 46475 */ "Martijn van Hoof", /* 46476 */ "HealthNow New York Inc", /* 46477 */ "DIAL GmbH", /* 46478 */ "Unidesk Corporation", /* 46479 */ "Modular Mining Systems, Inc.", /* 46480 */ "Desjardins Groupe Technologies", /* 46481 */ "Netki, Inc.", /* 46482 */ "ERLPhase Power Technologies Ltd", /* 46483 */ "HERE North America, LLC", /* 46484 */ "Guy's and St Thomas' NHS Foundation Trust", /* 46485 */ "Dedrone GmbH", /* 46486 */ "Stripe, Inc.", /* 46487 */ "WALSER-NET", /* 46488 */ "TGR - Tecnologia para Gestão de Redes, S.A.", /* 46489 */ "Captel", /* 46490 */ "Valerio Morozzo", /* 46491 */ "Conevity Solutions Inc", /* 46492 */ "UAB \"GKF\"", /* 46493 */ "Assimil8 Limited", /* 46494 */ "European Dynamics SA", /* 46495 */ "DEPARTAMENTO ADMINISTRATIVO DE CIENCIA, TECNOLOGIA E INNOVACION - COLCIENCIAS", /* 46496 */ "ISS BRASIL LTDA", /* 46497 */ "Jiangsu Sinolte Wireless Technology Co., Ltd.", /* 46498 */ "ICD CO.,LTD", /* 46499 */ "Trukai Industries Limited", /* 46500 */ "Didactum® Ltd. Deutschland", /* 46501 */ "TASS", /* 46502 */ "Quench Worldwide Limited", /* 46503 */ "Stolt-Nielsen Limited", /* 46504 */ "PLAS-TEK Ltd.", /* 46505 */ "Systems Integrated", /* 46506 */ "Simpress Comercio Locacao e Servicos", /* 46507 */ "Glen Raven, Inc.", /* 46508 */ "Oncology and Hematology Specialists", /* 46509 */ "Wake County Public School System", /* 46510 */ "New Telecom Solutions LLC", /* 46511 */ "Times Internet Limited", /* 46512 */ "ZorgNed Automatisering BV", /* 46513 */ "Mhashim Ltd", /* 46514 */ "Wolf-Medizintechnik GmbH", /* 46515 */ "Ante Grup Elektrik Elektronik Bilişim İnşaat Danışmanlık San. ve Tic. Ltd. Şti.", /* 46516 */ "FitX Deutschland GmbH", /* 46517 */ "SPD Electrical Engineers (Pty) Ltd", /* 46518 */ "Albertslund Kommune", /* 46519 */ "Hitachi Industry & Control Solutions, Ltd.", /* 46520 */ "PMC - PERIPHERIQUES ET MATERIELS DE CONTROLE", /* 46521 */ "Dino Occhialini", /* 46522 */ "Bridgetec Corp.", /* 46523 */ "Linkbroad Technology Beijing Corporation Limited", /* 46524 */ "Hedvig Inc.", /* 46525 */ "Moldeo AB", /* 46526 */ "Trans Link Systems B.V.", /* 46527 */ "Shanghai Chuxun Information Technology Co.,Ltd.", /* 46528 */ "ldap4mail", /* 46529 */ "R-SYS s.r.o.", /* 46530 */ "PGE Polska Grupa Energetyczna S.A.", /* 46531 */ "Hinchingbrooke Hospital NHS Health Care Trust", /* 46532 */ "Open Source System", /* 46533 */ "Arx One", /* 46534 */ "CosmoKey GmbH & Co. KG", /* 46535 */ "Textel Marimon s.a.", /* 46536 */ "Yodel Delivery Network Limited", /* 46537 */ "Pioneers Memorial Healthcare", /* 46538 */ "Virtual Network Element, Inc.", /* 46539 */ "VSSUT", /* 46540 */ "Seneca Data Distributors, Inc.", /* 46541 */ "Mountain Blue Cancer Care Center", /* 46542 */ "CNIAP - Guinea Ecuatorial", /* 46543 */ "Axion Technologies Ltd.", /* 46544 */ "Rechtsanwaltskanzlei Schaalo", /* 46545 */ "Impavid LLC", /* 46546 */ "BILD GmbH & Co. KG", /* 46547 */ "Secvice Information Technologies Private Limited", /* 46548 */ "Messer Information Services GmbH", /* 46549 */ "Dufoort", /* 46550 */ "Amprion GmbH", /* 46551 */ "Eltham College", /* 46552 */ "Amsterdamtelecom Ltd.", /* 46553 */ "Anthon Romanov", /* 46554 */ "Kostya.Pro", /* 46555 */ "L.D. Lutum", /* 46556 */ "Scale Genius Inc.", /* 46557 */ "FutoIn", /* 46558 */ "ESC - Electronic Service Center GbR", /* 46559 */ "Cox Communications Inc - Engineering", /* 46560 */ "BHS Sonthofen GmbH", /* 46561 */ "Revenue Management Solutions, LLC", /* 46562 */ "Virgin Islands Oncology & Hematology,PC", /* 46563 */ "Entera AS", /* 46564 */ "Wiollo Sp. z o.o.", /* 46565 */ "Holbæk Kommune", /* 46566 */ "DIROX", /* 46567 */ "Moqom Limited", /* 46568 */ "HybridDigital", /* 46569 */ "Mithril Informatique", /* 46570 */ "Fruit of the Loom", /* 46571 */ "Comact Equipment Inc.", /* 46572 */ "Stefan van Someren", /* 46573 */ "Encore Systems, LLC", /* 46574 */ "WorkCover Queensland", /* 46575 */ "NFWare Inc.", /* 46576 */ "Cloudstead, Inc.", /* 46577 */ "Gereltei Systems", /* 46578 */ "Pivotal Cloud Foundry", /* 46579 */ "Braincoolant Oy", /* 46580 */ "MalariaGEN", /* 46581 */ "Robert-Bosch-Krankenhaus GmbH", /* 46582 */ "Linoma Software", /* 46583 */ "French Lick Resort", /* 46584 */ "StrathTech", /* 46585 */ "ProSiebenSat.1 Media SE", /* 46586 */ "Institute of Low Temperature and Structure Research, Polish Academy of Sciences", /* 46587 */ "Aptitude Technologies", /* 46588 */ "Stifel Financial Corp", /* 46589 */ "suretap wallet lp", /* 46590 */ "Auditoria y Consultoria de Privacidad y Seguridad, S.L.", /* 46591 */ "Gebr. Hoffmann Werkzeugmaschinen GmbH", /* 46592 */ "JuntoTelecom", /* 46593 */ "Matthew Wynn", /* 46594 */ "smartbits", /* 46595 */ "Hazelnut Software Ltd", /* 46596 */ "OW2 Consortium", /* 46597 */ "Industrielle Alliance Valeurs mobilières inc.", /* 46598 */ "UAB Erisata", /* 46599 */ "Mersoft Corporation", /* 46600 */ "Inform-Mobil", /* 46601 */ "kt Corporation", /* 46602 */ "Xeron Universal Technologies", /* 46603 */ "NetIndia Private Limited", /* 46604 */ "WALLYS COMMUNICATIONS SDN BHD", /* 46605 */ "Cisco Systems India Private Limited", /* 46606 */ "VetRay N", /* 46607 */ "SoftLab–NSK Co., Ltd.", /* 46608 */ "The Wireless Innovation Forum", /* 46609 */ "Sensorpoint, LLC", /* 46610 */ "St Vincents Health Australia (NSW)", /* 46611 */ "DV Impex, Ltd", /* 46612 */ "JSC \"SPO Angstrem\"", /* 46613 */ "BBM spol. s r. o.", /* 46614 */ "WirelessCar", /* 46615 */ "Anghel F. Dan-Alexandru PFA", /* 46616 */ "Helse Nord IKT", /* 46617 */ "AXEL", /* 46618 */ "Centre Hospitalier Emile Mayrisch", /* 46619 */ "Wolseley plc", /* 46620 */ "Thales Services France Toulouse", /* 46621 */ "FLAG Solutions S.L.", /* 46622 */ "Trunomi, Inc.", /* 46623 */ "Flexoptix GmbH", /* 46624 */ "wingtop co., ltd", /* 46625 */ "zibernetics", /* 46626 */ "Init Corporation", /* 46627 */ "SC 4 WAVE BRO SRL", /* 46628 */ "Joe Pitt", /* 46629 */ "Dominique Dor", /* 46630 */ "DeviousOps", /* 46631 */ "Encinitas Country Day School", /* 46632 */ "Oncology San Antonio", /* 46633 */ "NIvetti Systems Private Limited", /* 46634 */ "INTERSCHALT maritime systems AG", /* 46635 */ "Honorardozent Peter Kruse", /* 46636 */ "RaulWalter LLC", /* 46637 */ "City of Sunrise", /* 46638 */ "Jan Skogqvist", /* 46639 */ "Caixa Economica Federal", /* 46640 */ "MeterBee", /* 46641 */ "National Documentation Centre", /* 46642 */ "kittenberger.org", /* 46643 */ "ZettaLogs", /* 46644 */ "Aeronix", /* 46645 */ "Wavelab Inc.", /* 46646 */ "Michael G. Sullivan (MGS)", /* 46647 */ "Brain4Net, Inc.", /* 46648 */ "PTPd project", /* 46649 */ "Humboldt Solutions Ltd", /* 46650 */ "Dantherm Cooling A/S", /* 46651 */ "Sertel Electronics UK Ltd", /* 46652 */ "Raymond Chung Industries Corporation", /* 46653 */ "Future Infrastructures Online Ltd.", /* 46654 */ "Innofidei Technologies Inc.", /* 46655 */ "Polskie Koleje Państwowe S.A.", /* 46656 */ "EKCR", /* 46657 */ "AssetOwl", /* 46658 */ "BBR Verkehrstechnik GmbH", /* 46659 */ "Volvo Group Telematics", /* 46660 */ "Bucherer AG", /* 46661 */ "Pointek", /* 46662 */ "TORRING SYSTEMS CORP", /* 46663 */ "Novatronic", /* 46664 */ "Reshin", /* 46665 */ "NPF Modem, Ltd.", /* 46666 */ "Limited Liability Company «ICBCOM»", /* 46667 */ "ENX Association", /* 46668 */ "Job Corps", /* 46669 */ "OCTAGON computer&communication", /* 46670 */ "Medical Specialists of Fairfield, LLC.", /* 46671 */ "PrimeDesign", /* 46672 */ "Minoris", /* 46673 */ "cantaa GmbH", /* 46674 */ "Essential Energy", /* 46675 */ "Weir Shared Services Ltd", /* 46676 */ "XATU", /* 46677 */ "naksitrallid.com", /* 46678 */ "Bistum Würzburg", /* 46679 */ "Control Techniques", /* 46680 */ "SV Informatik GmbH", /* 46681 */ "Applied Optoelectronics, Inc.", /* 46682 */ "Zdravec Bulgaria Ltd", /* 46683 */ "Nazessen", /* 46684 */ "Maag Informatik", /* 46685 */ "Document Storage Systems, Inc.", /* 46686 */ "Qualicorp SA", /* 46687 */ "Karl Camilleri", /* 46688 */ "Entria LLC", /* 46689 */ "12Sided Technology, LLC", /* 46690 */ "IDOBJECT", /* 46691 */ "Ripple", /* 46692 */ "BestCAS Ltd", /* 46693 */ "KoreLogic, Inc.", /* 46694 */ "Cancer Care of West Central Ohio", /* 46695 */ "MastMinder Ltd", /* 46696 */ "Unimar, Inc.", /* 46697 */ "Cybersales a.s.", /* 46698 */ "HCit Consultant", /* 46699 */ "ICTrex", /* 46700 */ "State Historical Museum", /* 46701 */ "Control Service do Brasil Ltda.", /* 46702 */ "aBjorne", /* 46703 */ "Salib Oncology Hematology", /* 46704 */ "Maestria en Seguridad Informatica Aplicada - ESPOL", /* 46705 */ "Wowza Media Systems, LLC", /* 46706 */ "Neocoretech SAS", /* 46707 */ "Action for Children", /* 46708 */ "BDO Canada LLP", /* 46709 */ "Network Time Foundation", /* 46710 */ "DoubleNegative.eu", /* 46711 */ "Open Infrastructure", /* 46712 */ "Datahealth", /* 46713 */ "Cesa Inc", /* 46714 */ "Bioptická laboratoř s.r.o.", /* 46715 */ "TARGOBANK AG & Co. KGaA", /* 46716 */ "Ibys Technologies S.A.", /* 46717 */ "Sea Island Systems, Inc.", /* 46718 */ "dtsi", /* 46719 */ "LightFactor", /* 46720 */ "Cancer Care Center, PC", /* 46721 */ "Merge Security", /* 46722 */ "United Educators Credit Union", /* 46723 */ "Ferrograph Limited", /* 46724 */ "Swift MT", /* 46725 */ "U.S. Anesthesia Partners, Inc.", /* 46726 */ "SOFTEK GLOBAL EDESIGN S DE RL DE CV", /* 46727 */ "Heksagon Group Cy Ltd", /* 46728 */ "Growing Energy Labs, Inc.", /* 46729 */ "Route Weaver LLC", /* 46730 */ "Institut fuer medizinische und pharmazeutische Pruefungsfragen", /* 46731 */ "Vedang Radio Technology Pvt. Limited", /* 46732 */ "DOM-P Zrt", /* 46733 */ "TCCC", /* 46734 */ "Silhouette International Schmied AG", /* 46735 */ "Powertech IT Services S.R.L.", /* 46736 */ "Amphinicy Technologies", /* 46737 */ "Beeler IT Services", /* 46738 */ "RONIT. N.THAKOR", /* 46739 */ "Zendesk, Inc", /* 46740 */ "Aspect Enterprise Solutions Inc.", /* 46741 */ "Global Biodiversity Information Facility (GBIF)", /* 46742 */ "Technology Architects LLC", /* 46743 */ "Transaction Technologies Pte Ltd", /* 46744 */ "Joe Thielen", /* 46745 */ "Weill Cornell Medicine", /* 46746 */ "The Christ Hospital Hem Onc", /* 46747 */ "Alliance Technology Group, LLC", /* 46748 */ "121 Marketing Services Group, Inc.", /* 46749 */ "MobilSign Ltd.", /* 46750 */ "Carrizo Oil & Gas, Inc.", /* 46751 */ "THE MINNITI CENTER FOR MEDICAL ONCOLOGY & HEMATOLOGY", /* 46752 */ "Hematology Oncology Clinic, LLP", /* 46753 */ "NETFOX AG", /* 46754 */ "Nexgen Oncology", /* 46755 */ "Michael Oberdorf IT-Consulting", /* 46756 */ "DeMoulas Market Basket, Inc.", /* 46757 */ "CarMax", /* 46758 */ "CoverMyMeds", /* 46759 */ "Teksush.com", /* 46760 */ "Groupe JVS", /* 46761 */ "Atos IT Solutions and Services GmbH", /* 46762 */ "alfer aluminium Gesellschaft mbH", /* 46763 */ "HealthInsight", /* 46764 */ "Sviaz-Bank", /* 46765 */ "Creatcomm Technology", /* 46766 */ "CarMax, Inc", /* 46767 */ "Symphony Communication Services LLC", /* 46768 */ "St. Leonard's Community Services", /* 46769 */ "Benz Dataconsulting", /* 46770 */ "Atos IT Services Sp. z o.o.", /* 46771 */ "Brig Center for Cancer Care and Survivorship", /* 46772 */ "Voss Kommunikasjon AS", /* 46773 */ "K4Connect", /* 46774 */ "Bourgeois Bits LLC", /* 46775 */ "Westchester Cancer Care", /* 46776 */ "Air New Zealand", /* 46777 */ "NTx Back Office Consulting Group", /* 46778 */ "Belgian Supreme Administrative Court", /* 46779 */ "Leo Angelo", /* 46780 */ "Sasola Limited", /* 46781 */ "John Holland PTY LTD", /* 46782 */ "Nephos6", /* 46783 */ "COSMOVISION Co., Ltd.", /* 46784 */ "Comark Communications LLC", /* 46785 */ "blue-beam.de", /* 46786 */ "Sony Computer Entertainment Shanghai Ltd.", /* 46787 */ "Xabyss Inc.", /* 46788 */ "Rains Corp.", /* 46789 */ "TOYOTA MOTOR CORPORATION", /* 46790 */ "Stephan Fiebrandt", /* 46791 */ "ISON Technology Co., Ltd", /* 46792 */ "ASAT Co., Ltd.", /* 46793 */ "Decision Detective Corporation", /* 46794 */ "Organization for Security and Co-operation in Europe", /* 46795 */ "Bedrock Automation Platforms, Inc.", /* 46796 */ "The self-financing Science Information Center for New Technologies under State Tax Committee of the Republic of Uzbekistan", /* 46797 */ "RBS Services (Switzerland) Ltd", /* 46798 */ "Interblock d.d.", /* 46799 */ "Digitoll Information Technology and Servicing Ltd.", /* 46800 */ "The Hut Group", /* 46801 */ "The Business Clinic Ltd", /* 46802 */ "BROCELIA", /* 46803 */ "Himnark CJSC", /* 46804 */ "Oncology Consultants", /* 46805 */ "Mid Florida Hematology Oncology", /* 46806 */ "Motiv Telecom Group", /* 46807 */ "Fall River School District", /* 46808 */ "KB PROMSVYAZ", /* 46809 */ "Stockton University", /* 46810 */ "L'Imprimerie", /* 46811 */ "Konsortium ICT Pantai Timur", /* 46812 */ "Sunbird Software, Inc.", /* 46813 */ "SC3 Technologies Oü", /* 46814 */ "Third Point LLC", /* 46815 */ "HELM AG", /* 46816 */ "Atam Holdings", /* 46817 */ "Systemhaus Scheuschner GmbH", /* 46818 */ "Attenda Ltd.", /* 46819 */ "Telekom Malaysia Berhad", /* 46820 */ "Commandus", /* 46821 */ "Zhuhai Kingsoft Office Software Co Ltd", /* 46822 */ "Siselectron Technology Ltd", /* 46823 */ "Certly, Inc.", /* 46824 */ "Loop Technologies Limited", /* 46825 */ "OptimalMethods Ltd.", /* 46826 */ "Affix Technology Co., Ltd.", /* 46827 */ "Sea and Air Technology, S.L.", /* 46828 */ "GLOCK Ges.m.b.H.", /* 46829 */ "LearnConsult - DI Meitz & Ing. Pock OG", /* 46830 */ "GRAUPNER medical solutions GmbH", /* 46831 */ "Heylige FRau Latte", /* 46832 */ "Synapses Technologies, LLC", /* 46833 */ "Martin GmbH für Umwelt- und Energietechnik", /* 46834 */ "rf152", /* 46835 */ "Bilfinger GreyLogix GmbH", /* 46836 */ "AZD Praha s.r.o.", /* 46837 */ "Swaffer Consulting Ltd.", /* 46838 */ "RED ELECTRICA DE ESPAÑA SAU", /* 46839 */ "Christophorus Club e.V.", /* 46840 */ "Hwacheon Machinery Europe GmbH", /* 46841 */ "Hamburger Software GmbH & Co. KG", /* 46842 */ "Newfield Automation Ltd.", /* 46843 */ "Dreamtime.net (Thailand) Co., Ltd.", /* 46844 */ "Interlink INC", /* 46845 */ "FLOPNET", /* 46846 */ "VALLEY MEDICAL & SURGICAL CLINIC", /* 46847 */ "Lavelle Networks India Private Limited", /* 46848 */ "Irving Independent School District", /* 46849 */ "Tula State Center of Information Technology", /* 46850 */ "Terremark", /* 46851 */ "viagogo AG", /* 46852 */ "PAC Enterprises", /* 46853 */ "Hagenberger Kreis zur Förderung der digitalen Sicherheit", /* 46854 */ "ShowCase PRO Tecnologia LTDA", /* 46855 */ "ZPEG, Inc.", /* 46856 */ "Park Controls & Communications (P) Ltd.", /* 46857 */ "Dgoujard", /* 46858 */ "Guangdong Quantum Technology Co., Ltd", /* 46859 */ "Bittacle Consulting Limited", /* 46860 */ "JVCKENWOOD Corporation", /* 46861 */ "Digital Life Promotion Association", /* 46862 */ "Bosch Thermotechnik GmbH", /* 46863 */ "Embedtronics Oy", /* 46864 */ "IS4U, s.r.o.", /* 46865 */ "Virdata NV", /* 46866 */ "Synthetel Corporation", /* 46867 */ "Secure Energy Services", /* 46868 */ "Torchmind", /* 46869 */ "relaxt confusion labs e.U.", /* 46870 */ "Magic Mike, Ltd", /* 46871 */ "Bimex Energy AG", /* 46872 */ "y1s2", /* 46873 */ "Wavenet sprl", /* 46874 */ "prodot GmbH", /* 46875 */ "GE Lighting", /* 46876 */ "ATB Financial", /* 46877 */ "PermaGreen Supreme, Inc.", /* 46878 */ "Lengvarsky.com", /* 46879 */ "Technology Kitchen Corporation", /* 46880 */ "henz.co", /* 46881 */ "LSTI", /* 46882 */ "Capsicum Business Architects", /* 46883 */ "Freie ev. Gemeinde Giessen", /* 46884 */ "TwoFive, Inc.", /* 46885 */ "Beken Learning Systems, Inc.", /* 46886 */ "Bulletin.net Ltd", /* 46887 */ "KRDS", /* 46888 */ "Gravity Academy Engineering", /* 46889 */ "SOLUM Co., Ltd.", /* 46890 */ "fmad engineering llc", /* 46891 */ "TwelveBaud Studios, LLC", /* 46892 */ "Antelope Enterprises", /* 46893 */ "Hanwha S&C", /* 46894 */ "NexDefense, Inc.", /* 46895 */ "UNIACC Electronic Technology Ltd. of Suzhou", /* 46896 */ "Virtual Hold Technology, LLC", /* 46897 */ "Hewlett-Packard (Schweiz) GmbH", /* 46898 */ "TDK LAMBDA LTD", /* 46899 */ "TiePie engineering", /* 46900 */ "Wilhelmsen Loom Consulting", /* 46901 */ "Keegan Moodley Ltd", /* 46902 */ "DE-CIX Management GmbH", /* 46903 */ "Sepura plc", /* 46904 */ "KTI RÁDIO, spol. s r.o.", /* 46905 */ "Enghouse Networks Nordics AB", /* 46906 */ "Qognify LTD", /* 46907 */ "Ascot Industrial", /* 46908 */ "Centric Housing & Healthcare", /* 46909 */ "AIC S.A.", /* 46910 */ "KERLINK", /* 46911 */ "Nassauische Heimstaette Wohnungs- und Entwicklungsgesellschaft mbH", /* 46912 */ "Hotspot Tiefenort", /* 46913 */ "Administration des Ponts et Chaussées", /* 46914 */ "raffel.biz", /* 46915 */ "Aviva Voice Systems and Services SL", /* 46916 */ "PC-TipTop", /* 46917 */ "GRUPO REVENGA", /* 46918 */ "Aadi Network Tools", /* 46919 */ "DEVISE FUTURES - IT SOLUTIONS, LDA", /* 46920 */ "Universidade Federal de Sao Joao del-Rei", /* 46921 */ "Wolf GmbH", /* 46922 */ "LG&E-KU LLC", /* 46923 */ "Oncology Specialists of Charlotte, PA", /* 46924 */ "EEBus Initiative e.V.", /* 46925 */ "Midas Green Technologies", /* 46926 */ "INVITE Networks Incorporated", /* 46927 */ "r0ck.net", /* 46928 */ "Uzma Iqbal MD PA", /* 46929 */ "Sandelman Software Works", /* 46930 */ "Welch Allyn Singapore Pte Ltd", /* 46931 */ "OAO NEFAZ", /* 46932 */ "Business&Decision", /* 46933 */ "AFSOC", /* 46934 */ "Provinzial NordWest", /* 46935 */ "Ingenieurbüro Eggimann", /* 46936 */ "jduprat.net", /* 46937 */ "Frederick Oncology Hematology Associates", /* 46938 */ "Sentinel Technologies", /* 46939 */ "Quantic Telecom", /* 46940 */ "Noom, Inc.", /* 46941 */ "Löwenfelsen UG (haftungsbeschränkt)", /* 46942 */ "STC Systems", /* 46943 */ "Beijing Yanglian technology co., LTD", /* 46944 */ "Rafako S.A.", /* 46945 */ "Transports Publics Genevois", /* 46946 */ "Meplan GmbH", /* 46947 */ "United Airlines, Inc.", /* 46948 */ "Moore Family", /* 46949 */ "FRZ Uni Leipzig", /* 46950 */ "中山大学附属第一医院 (First Affiliated Hospital of Sun Yat-sen)", /* 46951 */ "SecureAuth Corporation", /* 46952 */ "Active8", /* 46953 */ "Institut Puig Castellar", /* 46954 */ "Wolfnet", /* 46955 */ "Institute of Cosmophysical Research and Aeronomy of the Siberian Branch of the Russian Academy of Sciences", /* 46956 */ "setelsa", /* 46957 */ "New Cloud Technologies Ltd.", /* 46958 */ "Jaxageto", /* 46959 */ "mrn sa", /* 46960 */ "emineo AG", /* 46961 */ "Novaris Ltd.", /* 46962 */ "Shenzhen United Innovation Automatic Control System Co., Ltd.", /* 46963 */ "Yandik", /* 46964 */ "Wordery", /* 46965 */ "KIRACON Ltd.", /* 46966 */ "Thompson Rivers University", /* 46967 */ "Triad RF Systems", /* 46968 */ "R&D Software Solutions srl", /* 46969 */ "Borealis", /* 46970 */ "GKeS", /* 46971 */ "ICS Industries Pty Ltd", /* 46972 */ "Datalab Software GmbH", /* 46973 */ "EdgeTheory LLC", /* 46974 */ "MediGroup", /* 46975 */ "Rhebo AG", /* 46976 */ "ELTEC Elektronik AG", /* 46977 */ "The Akron Holding", /* 46978 */ "Q&D Solutions", /* 46979 */ "Ondics GmbH", /* 46980 */ "Netclient as", /* 46981 */ "Smart Concepts B.V.", /* 46982 */ "inIT - Institute Industrial IT, Ostwestfalen-Lippe University of Applied Sciences", /* 46983 */ "SABO Elektronik GmbH", /* 46984 */ "Marcus Portmann", /* 46985 */ "Meister Rechtsanwaelte", /* 46986 */ "Cancer & Blood Disorders Treatment Center", /* 46987 */ "CGI Deutschland", /* 46988 */ "Systemservice Nordfriesland", /* 46989 */ "ACCOLADE ELECTRONICS PVT. LTD.", /* 46990 */ "Universitaetsmedizin Goettingen", /* 46991 */ "IP CINT", /* 46992 */ "TDP s.r.o.", /* 46993 */ "ETS Schick", /* 46994 */ "Tantalus Systems", /* 46995 */ "Claus Queck GmbH", /* 46996 */ "MyQuickCloud", /* 46997 */ "CEHL", /* 46998 */ "RAK", /* 46999 */ "Converling Group B.V.", /* 47000 */ "LCS Co.Ltd", /* 47001 */ "System Controls Technology Solutions Private Limited", /* 47002 */ "JSC VELAN", /* 47003 */ "Secucloud Network GmbH", /* 47004 */ "Fort Lewis College", /* 47005 */ "TransneftEnergy, LLC", /* 47006 */ "Ascent Resources", /* 47007 */ "MBDA France", /* 47008 */ "ISIS Bilisim Teknolojileri San. Tic. Ltd. Sti.", /* 47009 */ "UK Ministry of Defence", /* 47010 */ "Ozarks Community Hospital", /* 47011 */ "SIMP", /* 47012 */ "APTVISION LIMITED", /* 47013 */ "BBS1 Mainz", /* 47014 */ "Zeye Solutions", /* 47015 */ "BlackSands Inc", /* 47016 */ "Qumulo Inc.", /* 47017 */ "ZeuSWarE GmbH", /* 47018 */ "ApexSQL LLC", /* 47019 */ "Flor Szoftver Ltd.", /* 47020 */ "Real Time Automation, Inc.", /* 47021 */ "TSI Automacao", /* 47022 */ "Xolarsoft", /* 47023 */ "Catalyze", /* 47024 */ "Charles River Analytics, Inc.", /* 47025 */ "Paraqum Technologies (Private) Limited", /* 47026 */ "Quavant Networks, Inc.", /* 47027 */ "Bund der Pfadfinderinnen und Pfadfinder e.V.", /* 47028 */ "Thomas Tague", /* 47029 */ "HAN Networks Co., Ltd", /* 47030 */ "Shenzhen Eunicum Electric Co., Ltd.", /* 47031 */ "Shanghai Yamu Technology Limited", /* 47032 */ "LLC \"66 Parallel\"", /* 47033 */ "CARS", /* 47034 */ "trash.net", /* 47035 */ "Ecosoft B.V. (trademark is Vidicode)", /* 47036 */ "Jubic Oy", /* 47037 */ "Université de Namur (UNamur)", /* 47038 */ "312Telephony", /* 47039 */ "ChuckStarter", /* 47040 */ "gurtzick.net", /* 47041 */ "Neragon Networks LTD", /* 47042 */ "Illusion Ltd.", /* 47043 */ "Charter Court Financial Services", /* 47044 */ "MartinLefebvre.com", /* 47045 */ "Bucks New University", /* 47046 */ "Phoenix Home", /* 47047 */ "Webnii", /* 47048 */ "EndFirst LLC", /* 47049 */ "The AREDN Project", /* 47050 */ "Virtu Financial LLC", /* 47051 */ "SK Planet", /* 47052 */ "SOUTHEAST ASIA JOINT STOCK COMMERCIAL BANK (SeABank)", /* 47053 */ "CJSC Transmashholding", /* 47054 */ "GouldFLP", /* 47055 */ "SunEdison Inc", /* 47056 */ "CityLink Data Co,.Ltd", /* 47057 */ "AlfaSix Tecnologia", /* 47058 */ "Earth2 Software Pty Ltd.", /* 47059 */ "elementmedia GmbH", /* 47060 */ "Shenzhen headsun technology co.,ltd.", /* 47061 */ "Isha Foundation", /* 47062 */ "ZWAY CO.,LTD.", /* 47063 */ "St. Joseph's Anglo-Chinese Primary School", /* 47064 */ "TACACS.net, Inc.", /* 47065 */ "VISQUAL Technologies", /* 47066 */ "xlea.se GmbH", /* 47067 */ "Optelix (Pty) Ltd", /* 47068 */ "Economia per i Cittadini", /* 47069 */ "Orell Fuessli Holding AG", /* 47070 */ "Flash Systems", /* 47071 */ "567.dk", /* 47072 */ "Layka Soluciones", /* 47073 */ "TRONTEQ Electronic", /* 47074 */ "PROJECT-M", /* 47075 */ "Bridgeway Security Solutions", /* 47076 */ "Device Insight GmbH", /* 47077 */ "JAPAN TELECOMMUNICATION ENGINEERING SERVICE CO., LTD.", /* 47078 */ "Mott MacDonald", /* 47079 */ "EDV-Beratung Baumgarten GmbH", /* 47080 */ "Aragon Institute of Engineering Research", /* 47081 */ "Mobiquithings", /* 47082 */ "Advanced Vision Technology LTD", /* 47083 */ "Stade Toulousain Rugby", /* 47084 */ "Controles Inteligentes S.A.S", /* 47085 */ "Olmsted County Minnesota", /* 47086 */ "Masonic Villages of the Grand Lodge of PA", /* 47087 */ "Pro-hosting s.r.o.", /* 47088 */ "Ramp Holdings, Inc.", /* 47089 */ "Exdev", /* 47090 */ "Cancer and Blood Specialist of Northern Virginia, PC", /* 47091 */ "Tangible Trade", /* 47092 */ "DeMaTech HB", /* 47093 */ "Sielte S.p.A.", /* 47094 */ "Subtopia Ltd", /* 47095 */ "Unisphone", /* 47096 */ "ARDIAN", /* 47097 */ "Lloyd Industries Inc.", /* 47098 */ "G4S Security Systems (Hungary) Ltd.", /* 47099 */ "Linkscreens SRL", /* 47100 */ "DAS-Online", /* 47101 */ "Global Technology Solutions", /* 47102 */ "PLC Technology, LLC", /* 47103 */ "Agentia pentru Agenda Digitala a Romaniei", /* 47104 */ "Together Bulgaria", /* 47105 */ "Spearline Labs", /* 47106 */ "Shaw Academy", /* 47107 */ "Beeper Communications Ltd.", /* 47108 */ "Abaco Systems", /* 47109 */ "Agenzia per l'Italia Digitale", /* 47110 */ "Baker Hill Solutions, LLC", /* 47111 */ "Louisiana Division of Administration", /* 47112 */ "Aviacomm Inc.", /* 47113 */ "WOM Engineering", /* 47114 */ "The Star Entertainment Group Limited", /* 47115 */ "NPL Management Ltd", /* 47116 */ "Spaulding Clinical", /* 47117 */ "Asian Arts Talents Foundation", /* 47118 */ "SCIFI", /* 47119 */ "Solustic - Solucoes em Tecnologia", /* 47120 */ "TDCH A/S", /* 47121 */ "BVL Group Ltd", /* 47122 */ "CODEC CO.,LTD.", /* 47123 */ "Schmied Elektronik & Software", /* 47124 */ "IDEAS S.R.L.", /* 47125 */ "earthTV network GmbH", /* 47126 */ "Yoti Ltd", /* 47127 */ "Insobis GmbH", /* 47128 */ "SECURA Insurance Companies", /* 47129 */ "Al Yah Satellite Communication Company PJSC (Yahsat)", /* 47130 */ "ViktorBalogh", /* 47131 */ "Thinking Automation, Inc.", /* 47132 */ "Research Capital Group, Inc.", /* 47133 */ "FROG CELLSAT LIMITED", /* 47134 */ "MotionLED Technology Ltd.", /* 47135 */ "4S Information Technologies", /* 47136 */ "Andre Grosse Bley", /* 47137 */ "Noble 3D Printers, LLC", /* 47138 */ "MaTelSo GmbH", /* 47139 */ "DSG Systems AS", /* 47140 */ "PT. WIRAKY NUSA TELEKOMUNIKASI", /* 47141 */ "CoralTree Systems", /* 47142 */ "iSnapp", /* 47143 */ "CommerceHub", /* 47144 */ "Telonic Berkeley Inc", /* 47145 */ "ENDERCODING", /* 47146 */ "Avionics Interface Technologies", /* 47147 */ "Winston Brands Inc.", /* 47148 */ "Adaptrum Inc.", /* 47149 */ "Virginia Cancer Institute", /* 47150 */ "CoinBau GmbH", /* 47151 */ "Dovecot Oy", /* 47152 */ "Brunke electronic", /* 47153 */ "Stabilitas", /* 47154 */ "VINTEGRIS SL", /* 47155 */ "Haus Michael auf Draht e.V.", /* 47156 */ "Boston Scientific Corporation", /* 47157 */ "Clipcomm Inc.", /* 47158 */ "Jevons Global Pty Ltd", /* 47159 */ "Centorrino Technologies", /* 47160 */ "Stuttgarter Haus- und Grundbesitzerverein e. V.", /* 47161 */ "Ote SA (Hellenic Telecommunications Organisation)", /* 47162 */ "Banka Koper d.d.", /* 47163 */ "Ciudad del Motor de Aragon, SA", /* 47164 */ "Self Esteem Brands", /* 47165 */ "Digital Insyte, LLC", /* 47166 */ "AB LITGRID", /* 47167 */ "Guangzhou Yinxun Comm. Tech. Co., LTD", /* 47168 */ "JSS Technologies, LLC", /* 47169 */ "Skylark Technology Inc.", /* 47170 */ "Maximus, Inc.", /* 47171 */ "OMNITEC SOLUTIONS, Inc.", /* 47172 */ "Openwave Messaging", /* 47173 */ "Compute Canada", /* 47174 */ "Cosylab d.d.", /* 47175 */ "gbltech.net", /* 47176 */ "Diplomat Pharmacy, Inc.", /* 47177 */ "Seneca Mortgage Servicing LLC", /* 47178 */ "Infosec Global Inc", /* 47179 */ "Unite Control Sp. z o.o.", /* 47180 */ "Capella Systems, LLC", /* 47181 */ "Applied Micro Design Inc.", /* 47182 */ "Studer Innotec SA", /* 47183 */ "LifeTech", /* 47184 */ "TOPCON CORPORATION", /* 47185 */ "CryoWerx", /* 47186 */ "Global Blue Service Company Austria GmbH", /* 47187 */ "Slovenske elektrarne, a.s.", /* 47188 */ "EPICT Italy", /* 47189 */ "HCMI datasharing consortium", /* 47190 */ "Bulat LLC", /* 47191 */ "Central Bank of Ireland", /* 47192 */ "ATICEL - Advanced Tech Cell", /* 47193 */ "Asesoria Telematica Canarias SL", /* 47194 */ "Gradkell Systems, Inc.", /* 47195 */ "Hewlett Packard Enterprise", /* 47196 */ "Rainbow Crow", /* 47197 */ "IVALUA SAS", /* 47198 */ "ISEC7", /* 47199 */ "realraum - Verein für Technik in Kultur und Gesellschaft", /* 47200 */ "Vivid-Hosting, LLC", /* 47201 */ "Top Down Systems Corporation", /* 47202 */ "Reactiv Media Ltd", /* 47203 */ "«КВАНТЭКС» Limited liability partnership («QUANTEX»)", /* 47204 */ "Lake Superior State University", /* 47205 */ "Brnit", /* 47206 */ "DAVID Systems GmbH", /* 47207 */ "Ensinger GmbH", /* 47208 */ "MonkZ", /* 47209 */ "ug consult", /* 47210 */ "Ecole Polytechnique Fédérale de Lausanne", /* 47211 */ "MailInBlack", /* 47212 */ "Nechi Group", /* 47213 */ "4all Tecnologia", /* 47214 */ "Markus Losco", /* 47215 */ "Mundio Mobile Holding Limited", /* 47216 */ "Einstein Medical Center", /* 47217 */ "websix GmbH", /* 47218 */ "Primary Data", /* 47219 */ "IUT de BEZIERS", /* 47220 */ "µE Kunst", /* 47221 */ "Megapath", /* 47222 */ "IQlunch", /* 47223 */ "Maersk Oil", /* 47224 */ "David Garner NZ", /* 47225 */ "Walker Digital Table Systems", /* 47226 */ "EPI-USE Systems", /* 47227 */ "Evolution Gaming, Ltd.", /* 47228 */ "SIPO Global", /* 47229 */ "Gafachi, Inc.", /* 47230 */ "Foxconn Corporation", /* 47231 */ "RodNoc", /* 47232 */ "TELENT TECHNOLOGY SERVICES LIMITED", /* 47233 */ "Suffolk County Scouts", /* 47234 */ "QXIP", /* 47235 */ "MarSoftware", /* 47236 */ "SYSTEMES INFORMATION HARMONIE MUTUELLE SIHM GIE", /* 47237 */ "AIS Advanced Info Service", /* 47238 */ "Braincarta", /* 47239 */ "Vision Solutions, Inc.", /* 47240 */ "DZIECIECY SWIAT Krzysztof Pytko", /* 47241 */ "CoreOS, Inc", /* 47242 */ "Steelcase, Inc.", /* 47243 */ "Roku Inc.", /* 47244 */ "Shar3d Interactive", /* 47245 */ "JF Zwobada", /* 47246 */ "SILKAN SA", /* 47247 */ "Ramarc Innovations", /* 47248 */ "Pjano Consulting AB", /* 47249 */ "ProMDM d.o.o.", /* 47250 */ "Web Solutions PH", /* 47251 */ "City of West Lafayette", /* 47252 */ "secureNET Switzerland Inc.", /* 47253 */ "Western Australian Internet Association Inc.", /* 47254 */ "T&T sistemi srl", /* 47255 */ "INSTER Tecnologia y Comunicaciones", /* 47256 */ "DBC A/S", /* 47257 */ "The Automobile Association (AA PLC)", /* 47258 */ "LUNATICANET", /* 47259 */ "Electrontechnika", /* 47260 */ "OBI Smart Technologies mbH", /* 47261 */ "LSware Inc.", /* 47262 */ "HEITZ Jean-Marie", /* 47263 */ "New Zealand Customs Service", /* 47264 */ "HWADAR Technologies Co., Ltd.", /* 47265 */ "Prochista Irsa Tech Ltd.", /* 47266 */ "OpenSwitch", /* 47267 */ "FARMING BITS, UNIPESSOAL LDA", /* 47268 */ "Pluribus Networks, Inc", /* 47269 */ "Felixfound", /* 47270 */ "Dreamlab Onet.pl SA", /* 47271 */ "Evrotrust JSC", /* 47272 */ "LLAMMA SK", /* 47273 */ "CPK Interior Products", /* 47274 */ "Hirschmann Multimedia B.V.", /* 47275 */ "Helsana Versicherungen AG", /* 47276 */ "Hochschule Weihenstephan-Triesdorf", /* 47277 */ "TeskaLabs Ltd", /* 47278 */ "ITCENTER", /* 47279 */ "Imagen Technologies", /* 47280 */ "Auloce S.A.", /* 47281 */ "The LinchPinGroup, LLC", /* 47282 */ "PJSC SOLLERS", /* 47283 */ "Cyber IT Solutions", /* 47284 */ "LLC \"Smartbrood\"", /* 47285 */ "UANATACA S.A.", /* 47286 */ "Brabbler Secure Message and Data Exchange Aktiengesellschaft", /* 47287 */ "COMMUNITHINGS S.A.", /* 47288 */ "Tango Wave", /* 47289 */ "Johnson Computers", /* 47290 */ "Deep Groups", /* 47291 */ "Luxar Tech Inc", /* 47292 */ "STILLITS", /* 47293 */ "NPort Networks, Inc.", /* 47294 */ "Marvin Gülker", /* 47295 */ "Arctic Paper Kostrzyn S.A.", /* 47296 */ "hotelleriesuisse", /* 47297 */ "Pastem Solutions, Ltd.", /* 47298 */ "P2 Wireless Technologies Limited", /* 47299 */ "itelligence AG", /* 47300 */ "\"NR\"WEB US", /* 47301 */ "Alnatura Produktions- und Handels GmbH", /* 47302 */ "Moratua Solutions", /* 47303 */ "Ivnosys Soluciones S.L.", /* 47304 */ "FoxGuard Solutions", /* 47305 */ "Jasper", /* 47306 */ "IgniteNet", /* 47307 */ "Lanbowan Technology Ltd.", /* 47308 */ "Sofia Digital, Ltd.", /* 47309 */ "botanic", /* 47310 */ "Seacomp s.r.o.", /* 47311 */ "Searidge Technologies", /* 47312 */ "Adenon Bilisim ve Iletisim Tek. San. ve Tic. Ltd. Sti.", /* 47313 */ "Torrential Data Solutions, Inc.", /* 47314 */ "Wahsega Labs", /* 47315 */ "True Manufacturing", /* 47316 */ "University of Warsaw", /* 47317 */ "Optigo Networks", /* 47318 */ "Riella Systems", /* 47319 */ "Advanced Enterprise Solutions Limited", /* 47320 */ "memit.de", /* 47321 */ "Office IT-Partner Borås", /* 47322 */ "TrustKo", /* 47323 */ "Mokop, Bartosz Rebeś", /* 47324 */ "Suzhou Robot Information Technology Co.,Ltd.", /* 47325 */ "yanyuxieyang", /* 47326 */ "Kassenärztliche Vereinigung Nordrhein", /* 47327 */ "Simulity Labs", /* 47328 */ "Stancke Transporte GmbH & Co. KG", /* 47329 */ "Murrelektronik GmbH", /* 47330 */ "Pro:Atria Ltd.", /* 47331 */ "Current, powered by GE", /* 47332 */ "Asintel, S.L.", /* 47333 */ "trendytech", /* 47334 */ "Superwave Group LLC", /* 47335 */ "Iguana Comunicacions SL", /* 47336 */ "Security On-Demand, Inc.", /* 47337 */ "Bob Ziuchkovski Free/Libre and Open Source Software", /* 47338 */ "Hessware GmbH", /* 47339 */ "Handysoft,co.ltd.", /* 47340 */ "Syllaba Press International Inc.", /* 47341 */ "VITAL WILLIAM CONSEIL", /* 47342 */ "ElektronIT GmbH", /* 47343 */ "COMSYS Communications Systems Service GmbH", /* 47344 */ "Variant", /* 47345 */ "Laurenz Wagner", /* 47346 */ "MIRACL", /* 47347 */ "Centro de Tradições Nordestinas", /* 47348 */ "Rockwell Automation", /* 47349 */ "Securian Financial Group", /* 47350 */ "Premium Security Broadband", /* 47351 */ "AMPAREX GmbH", /* 47352 */ "HornasjövägenIT", /* 47353 */ "Avista Corporation", /* 47354 */ "Metamarkets", /* 47355 */ "Cress Enterprises", /* 47356 */ "Technology Concepts & Design, Inc.", /* 47357 */ "HenzHome Services", /* 47358 */ "stary tec", /* 47359 */ "MAX-TECH", /* 47360 */ "KT&C CO., LTD.", /* 47361 */ "Woningstichting Haag Wonen", /* 47362 */ "SYSTEM Development Inc.", /* 47363 */ "SIRIETA", /* 47364 */ "Wabtec Railway Electronics", /* 47365 */ "Arturs Plisko", /* 47366 */ "Transport for New South Wales", /* 47367 */ "dainox GmbH", /* 47368 */ "Canal Digital AS", /* 47369 */ "Lorindus", /* 47370 */ "Shine Security Ltd", /* 47371 */ "MariaDB Corporation Ab", /* 47372 */ "Octopod Technology Company Limited", /* 47373 */ "Sitex Inc.", /* 47374 */ "Turpeinen", /* 47375 */ "Taqniat Ltd", /* 47376 */ "International Software Systems Inc. (ISSI)", /* 47377 */ "Threema GmbH", /* 47378 */ "iot.nxt", /* 47379 */ "Zagrebacka banka d.d.", /* 47380 */ "Omnitelecom", /* 47381 */ "UMAITEK", /* 47382 */ "Kaessbohrer Geländefahrzeug AG", /* 47383 */ "Sartorius Mechatronics T+H GmbH", /* 47384 */ "Sveaskog Förvaltnings AB", /* 47385 */ "US Signal", /* 47386 */ "0xBEDA, LLC", /* 47387 */ "SeGuru Corp.", /* 47388 */ "State Universities Retirement System", /* 47389 */ "Affinity Credit Union 2013", /* 47390 */ "Green Cubes Technology Corporation", /* 47391 */ "FAWONG", /* 47392 */ "Koalephant Co., Ltd.", /* 47393 */ "BKT Elektronik Sp. z o.o.", /* 47394 */ "East Central Oncology", /* 47395 */ "CJSC TransProektInzhiniring", /* 47396 */ "IT-Wissen.org", /* 47397 */ "AVP Technology", /* 47398 */ "AMAG Technology", /* 47399 */ "Cottonwood Creek Technologies, Inc.", /* 47400 */ "Hotel Internet Services", /* 47401 */ "VALID CERTIFICADORA DIGITAL LTDA", /* 47402 */ "Connect Managed Services", /* 47403 */ "Coligo AB", /* 47404 */ "Brukarkooperativet JAG", /* 47405 */ "Tactic Code AB", /* 47406 */ "Forester IT", /* 47407 */ "Pankraz Elektronik", /* 47408 */ "Javier Pastor", /* 47409 */ "InfraSource Inc.", /* 47410 */ "Esferize Comunicaciones SL", /* 47411 */ "SAIFER ASSOCIATES LTD", /* 47412 */ "Caprica Limited", /* 47413 */ "Burgstaller", /* 47414 */ "Voxaware Ltd.", /* 47415 */ "3Shape Medical A/S", /* 47416 */ "Associazione La Nostra Famiglia", /* 47417 */ "Key Bridge LLC", /* 47418 */ "Halter AG", /* 47419 */ "2scale GmbH", /* 47420 */ "Cohesity Inc.", /* 47421 */ "imito AG", /* 47422 */ "Viamericas Corporation", /* 47423 */ "RPCI Oncology, PC", /* 47424 */ "BASYS Bartsch EDV-Systeme GmbH", /* 47425 */ "Triolan Limited Inc.", /* 47426 */ "PULLNET TECHNOLOGY, S.L.", /* 47427 */ "Taras Shevchenko National University of Kyiv", /* 47428 */ "NOWMEDIA TECHNOLOGIES", /* 47429 */ "Ifixmail.com", /* 47430 */ "CrowdStrike Inc.", /* 47431 */ "Diamond Technologies Inc.", /* 47432 */ "DAC System SA", /* 47433 */ "COUNT+CARE GmbH & Co. KG", /* 47434 */ "Roksnet Solutions LTD", /* 47435 */ "Lufthansa Systems GmbH & Co. KG", /* 47436 */ "Vagaro Inc.", /* 47437 */ "tofutown gmbh", /* 47438 */ "Alexander Zaigraev", /* 47439 */ "Stellus Technologies", /* 47440 */ "Lagardère Ressources", /* 47441 */ "Highlands Oncology Group", /* 47442 */ "Jockulator Studios North", /* 47443 */ "Milwaukee School of Engineering", /* 47444 */ "Telestream LLC", /* 47445 */ "443 IT", /* 47446 */ "UniqCast", /* 47447 */ "Intis d.o.o.", /* 47448 */ "Ryanair Ltd", /* 47449 */ "Cloud Foundry Foundation", /* 47450 */ "OmegaStar", /* 47451 */ "QMS Capital Management LP", /* 47452 */ "Gobierno de Santa Fe", /* 47453 */ "Area d'Inxenieria Telematica - University of Oviedo", /* 47454 */ "Sydved AB", /* 47455 */ "Vodafone NZ Limited", /* 47456 */ "SAS Orbitracs", /* 47457 */ "GIGANET NETWORKING SOLUTIONS LTD", /* 47458 */ "BKM-Micronic Richtfunkanlagen GmbH", /* 47459 */ "LiquidCool Solutions", /* 47460 */ "Lit Consulting", /* 47461 */ "ChangZhou Taiping Communication Technology Co.Ltd", /* 47462 */ "bestrun nanjing, co.ltd", /* 47463 */ "IN WIN Development Inc.", /* 47464 */ "CDB Monolit", /* 47465 */ "Lab3 e.V.", /* 47466 */ "Allianz Insurance Company Russia OJSC", /* 47467 */ "Trueverit", /* 47468 */ "Presence Technology", /* 47469 */ "CGI Sverige", /* 47470 */ "Apogey Ltd", /* 47471 */ "Purkinje Inc.", /* 47472 */ "Resurs-Komplekt LLC", /* 47473 */ "Sonn & Partner Patentanwälte", /* 47474 */ "ShenZhen Smart Imaging Healthcare Co.,Ltd.", /* 47475 */ "medi.com sp. z o.o.", /* 47476 */ "CGS Tower Networks Ltd.", /* 47477 */ "NetSection Security", /* 47478 */ "Artec Design LLC", /* 47479 */ "TECO Ltd", /* 47480 */ "RADD Web Studio", /* 47481 */ "ATVIRTUAL.NET KG", /* 47482 */ "Mcallen Oncology", /* 47483 */ "Quest Medical Imaging B.V.", /* 47484 */ "ArmySr", /* 47485 */ "Factorial Advance Systems Ltd", /* 47486 */ "Leroy Merlin Polska Sp. z o.o.", /* 47487 */ "Nedam ENG. Co., ltd.", /* 47488 */ "Techonline Consulting Ltd", /* 47489 */ "Nordea AEP Luxembourg", /* 47490 */ "Feenix Communications", /* 47491 */ "Carnelutti Studio Legale Associato", /* 47492 */ "SHENZHEN GYE TECH CO.,LTD", /* 47493 */ "AO-27 Control Operators Association", /* 47494 */ "alfaleasing", /* 47495 */ "Binary Kitchen e.V.", /* 47496 */ "KIZIL Elektronik", /* 47497 */ "Dirk Rossmann GmbH", /* 47498 */ "Beijing NewDigit Technology Co., Ltd.", /* 47499 */ "PB Design & Developments Limited", /* 47500 */ "Hargreaves Lansdown Plc", /* 47501 */ "Hiawatha Valley Education District", /* 47502 */ "Ralph Lauren Center for Cancer Care", /* 47503 */ "Zellkraftwerk GmbH", /* 47504 */ "Numonix", /* 47505 */ "AOSense, Inc.", /* 47506 */ "CT LAB", /* 47507 */ "Incosys SAS", /* 47508 */ "Herz Group", /* 47509 */ "Signifai, Inc", /* 47510 */ "GPC Asia Pacific", /* 47511 */ "linuxmuster.net e.V.", /* 47512 */ "venetex corporation", /* 47513 */ "RAK SYSTEM CO,;LTD", /* 47514 */ "Spectrum Controls, Inc.", /* 47515 */ "Certego s.r.l.", /* 47516 */ "Nekomit", /* 47517 */ "Openflexo", /* 47518 */ "Fincons SpA", /* 47519 */ "NES Technology Inc", /* 47520 */ "S+T Service & Technique S.A.", /* 47521 */ "BTECO LIMITED", /* 47522 */ "VDE Prüf- und Zertifizierungsinstitut GmbH", /* 47523 */ "Rubicon Labs, Inc.", /* 47524 */ "Wuliang", /* 47525 */ "A. Farber & Partners Inc.", /* 47526 */ "Charbonnier", /* 47527 */ "Softhum", /* 47528 */ "NATIONAL BANK OF GREECE", /* 47529 */ "Softwaretechnik Ges.m.b.H.", /* 47530 */ "Analytik Jena AG", /* 47531 */ "Arhides d.o.o.", /* 47532 */ "Balyasny Asset management L.P.", /* 47533 */ "AutoAlert", /* 47534 */ "Autoridad Certificante de la Oficina Nacional de Tecnologías de Información", /* 47535 */ "PJSC \"Sumykhimprom\"", /* 47536 */ "SATT PACA Corse", /* 47537 */ "knoefel.xyz", /* 47538 */ "Greendoc Systems Kft.", /* 47539 */ "QuadraNet, Inc", /* 47540 */ "Admino LLC", /* 47541 */ "Tianyi iMusic culture & technology Co. Ltd.", /* 47542 */ "MWR InfoSecurity", /* 47543 */ "JTKJ.com", /* 47544 */ "Jingtong Technology Co. Ltd.", /* 47545 */ "HANGZHOU CHANGER TECHNOLOGY.,LTD", /* 47546 */ "Takta Co.", /* 47547 */ "Tvip Ltd", /* 47548 */ "iniLINE Co., Ltd.", /* 47549 */ "AVENTICS GmbH", /* 47550 */ "USGS National Wildlife Health Center", /* 47551 */ "Marcone Supply", /* 47552 */ "Hochschule Koblenz", /* 47553 */ "Total Highspeed", /* 47554 */ "EA Games FireMonkeys", /* 47555 */ "Barrcode Ltd", /* 47556 */ "Hangzhou Telin Technologies Company limited", /* 47557 */ "General Dynamics SATCOM Technologies, Inc.", /* 47558 */ "Crypto-Pro", /* 47559 */ "Westinghouse Electric Sweden AB", /* 47560 */ "System-on-Chip engineering (SoC-e)", /* 47561 */ "Chengdu Emfuture Automation Engineering Co., Ltd", /* 47562 */ "Falcon Critical Care Transport", /* 47563 */ "Permian Resources, LLC", /* 47564 */ "Forcepoint LLC", /* 47565 */ "Uniper AG", /* 47566 */ "Seifert Logistics GmbH", /* 47567 */ "Pantel International", /* 47568 */ "FIAMM SoNick S.A.", /* 47569 */ "Ennnot", /* 47570 */ "Glowpoint", /* 47571 */ "University of Keele", /* 47572 */ "McFarland Clinic", /* 47573 */ "City of Harker Heights", /* 47574 */ "AUTEC Gesellschaft fuer Automationstechnik mbH", /* 47575 */ "CapSenze Biosystems AB", /* 47576 */ "Newell Rubbermaid", /* 47577 */ "Vantiv Inc", /* 47578 */ "Open Software S.r.l.", /* 47579 */ "Liechtensteinische Landesverwaltung", /* 47580 */ "Styevko Attila", /* 47581 */ "Timothy Boronczyk", /* 47582 */ "Gentrack", /* 47583 */ "Hirealton network technology co., LTD", /* 47584 */ "上海兆越通讯技术有限公司 (Shanghai Communication Technology Co., Ltd. trillion more)", /* 47585 */ "Alfing Kessler Sondermaschinen GmbH", /* 47586 */ "Rack2Cloud Limited", /* 47587 */ "StatPro Group Plc.", /* 47588 */ "Route443 LLP", /* 47589 */ "iik", /* 47590 */ "aidounix", /* 47591 */ "NJATECH", /* 47592 */ "Shenzhen Electrical Co.", /* 47593 */ "Allwaywin Co., Ltd", /* 47594 */ "cluster", /* 47595 */ "INSS", /* 47596 */ "christmann informationstechnik + medien GmbH & Co. KG", /* 47597 */ "Weiss Klimatechnik GmbH", /* 47598 */ "Changzhou Wisdom Intelligent Technology CO.,LTD.", /* 47599 */ "LLC \"Commercial Bank\" Bank Talmenka \"", /* 47600 */ "Novo Nordisk A/S", /* 47601 */ "pandoranorge", /* 47602 */ "eClinicalWorks", /* 47603 */ "OOO NPP ETRA-Plus (Ltd, Research and Production Enterprise)", /* 47604 */ "OOO BALTSTAR", /* 47605 */ "ocuro", /* 47606 */ "Lopez Foods, Inc.", /* 47607 */ "WIRTGEN GROUP Holding GmbH", /* 47608 */ "Escola Nacional de Administração Pública (Enap)", /* 47609 */ "Bitwiseshift Ltd.", /* 47610 */ "CENAPAD", /* 47611 */ "Gurtsoft", /* 47612 */ "Esbjerg Kommune", /* 47613 */ "Pranas.NET", /* 47614 */ "WRELMS Networking", /* 47615 */ "HangZhou AOBO TELECOM Corp", /* 47616 */ "NTSystems", /* 47617 */ "SEFIRA spol. s r.o.", /* 47618 */ "D&K Technologies GmbH", /* 47619 */ "DOMIS/SOMFY", /* 47620 */ "RiverWeb IT Solutions", /* 47621 */ "nicos Research & Development GmbH", /* 47622 */ "schaetz cro", /* 47623 */ "Sysdat Turismo s.r.l.", /* 47624 */ "Gekås Ullared AB", /* 47625 */ "Datelstream Limited", /* 47626 */ "kapptivate", /* 47627 */ "krauth technology GmbH", /* 47628 */ "AAEON Technology Inc.", /* 47629 */ "Ontario English Catholic Teachers Association", /* 47630 */ "University of South Alabama", /* 47631 */ "HC APMC ONCOLOGY", /* 47632 */ "International Airlines Group", /* 47633 */ "Blue Labs", /* 47634 */ "Skogsutveckling Syd AB", /* 47635 */ "Stora Enso Bioenergi AB", /* 47636 */ "gehrigmobi", /* 47637 */ "Crescend Technologies", /* 47638 */ "KpXX", /* 47639 */ "Tangible Security Inc", /* 47640 */ "gruenewald-clan.de", /* 47641 */ "Istituto Clinico Città Studi", /* 47642 */ "Asahi Net, Inc.", /* 47643 */ "Robin Systems", /* 47644 */ "Harman Intl.", /* 47645 */ "Beijing Qianxin Technology Co., LTD.", /* 47646 */ "barox Kommunikation", /* 47647 */ "Aireon LLC", /* 47648 */ "World Economic Forum", /* 47649 */ "Arkin Net Inc.", /* 47650 */ "Accessnord AB", /* 47651 */ "D.C.Orbital LLC", /* 47652 */ "Lanbowan Technology Ltd.", /* 47653 */ "News India Today Trust", /* 47654 */ "Nufront co.ltd", /* 47655 */ "Conval, Inc.", /* 47656 */ "Shanghai Golden Bridge InfoTech Co.,Ltd", /* 47657 */ "ZITH", /* 47658 */ "Actions-Micro", /* 47659 */ "Cookpad Inc.", /* 47660 */ "H&K International", /* 47661 */ "weroSoft AG", /* 47662 */ "Baruwa Enterprise Edition", /* 47663 */ "IP Rozduhov M.E.", /* 47664 */ "InformInvestGroup", /* 47665 */ "Qualica Technologies (Pty) Ltd", /* 47666 */ "Init AB", /* 47667 */ "Agência para a Modernização Administrativa, I.P. (AMA)", /* 47668 */ "IHI Charging Systems International GmbH", /* 47669 */ "Hitachi, Ltd., Defense Systems Business Unit", /* 47670 */ "Intra", /* 47671 */ "findsolutions", /* 47672 */ "IHI Charging Systems International Germany GmbH", /* 47673 */ "University POLITEHNICA of Bucharest", /* 47674 */ "IHI Charging Systems International Sp A", /* 47675 */ "Social Native", /* 47676 */ "Point of Presence Technologies", /* 47677 */ "Intuity Consultants, Inc.", /* 47678 */ "DigitalX", /* 47679 */ "Weimann - IT Consulting", /* 47680 */ "Endeavor Air, Inc.", /* 47681 */ "Rocket Lab Ltd.", /* 47682 */ "MSCH", /* 47683 */ "Babcock Power", /* 47684 */ "SimuOne ApS", /* 47685 */ "Switzerland Global Enterprise", /* 47686 */ "Filetress", /* 47687 */ "Itential", /* 47688 */ "Chop-Chop Sp. z o.o.", /* 47689 */ "Linton Enterprise I (LEI)", /* 47690 */ "Krogh-Consult", /* 47691 */ "Tribunal Supremo de Elecciones de Costa Rica", /* 47692 */ "Monroe Tool and Manufacturing", /* 47693 */ "CANATAL", /* 47694 */ "McKesson Corporation", /* 47695 */ "MedicusTek Inc", /* 47696 */ "Nanjing Tian Hua Zhong An Communication Technology CO.LTD", /* 47697 */ "aroba Inc.", /* 47698 */ "Avon Products Inc", /* 47699 */ "Systrome Networks", /* 47700 */ "BDO Audit SRL", /* 47701 */ "SECLAB", /* 47702 */ "cadilinea, slu", /* 47703 */ "BEIT Systemhaus GmbH", /* 47704 */ "Norra Skogsägarna Ek För", /* 47705 */ "Silion Technology Co., Ltd", /* 47706 */ "Zynx", /* 47707 */ "Di-Nikko Engineering Co.,Ltd.", /* 47708 */ "GE Healthcare on behalf of ACRIM hospital", /* 47709 */ "RIBS - Registration and Imaging of Brain Systems", /* 47710 */ "KECK MEDICINE OF USC", /* 47711 */ "Treegital", /* 47712 */ "Charlieuniformtango", /* 47713 */ "qsx", /* 47714 */ "EZTrader", /* 47715 */ "Devdot B.V.", /* 47716 */ "OrbiWise SA", /* 47717 */ "Zetes", /* 47718 */ "Videology", /* 47719 */ "LAWO Informationssysteme GmbH", /* 47720 */ "Avaleris", /* 47721 */ "Hansoft AB", /* 47722 */ "Michigan Open Carry, Inc.", /* 47723 */ "Cuyahoga County", /* 47724 */ "Konke Online", /* 47725 */ "Slots Machines S.A.", /* 47726 */ "Assistance Publique des Hôpitaux de Paris", /* 47727 */ "Tobias Buchloh", /* 47728 */ "Niagara Networks Inc", /* 47729 */ "République et Canton du Jura", /* 47730 */ "Leidos, Inc.", /* 47731 */ "Kopano B.V.", /* 47732 */ "Beijing Lehe Innovation Information Technology Co.,Ltd.", /* 47733 */ "Nomura Holdings, Inc.", /* 47734 */ "Toyam Cox", /* 47735 */ "L2M Solutions doo", /* 47736 */ "BLUETOWN", /* 47737 */ "MilDef AB", /* 47738 */ "Fam.Andersson Skog AB", /* 47739 */ "Holmen Skog AB", /* 47740 */ "Vista Entertainment Solutions", /* 47741 */ "V-Key Pte Ltd", /* 47742 */ "Atelios Communication Systems GmbH", /* 47743 */ "Tomra ASA", /* 47744 */ "Monmouth Hematology Oncology", /* 47745 */ "Celgene", /* 47746 */ "Oakwood Controls", /* 47747 */ "Rubricall, SL", /* 47748 */ "GemTalk Systems", /* 47749 */ "Bring Dialog Norge AS", /* 47750 */ "Mattersight Corporation", /* 47751 */ "Lycee Louis Armand", /* 47752 */ "Aperi Corporation", /* 47753 */ "Core Services Corporation", /* 47754 */ "OpenRat CMS", /* 47755 */ "Global Oncology, Inc", /* 47756 */ "Bariq Electronics", /* 47757 */ "Służba Więzienna", /* 47758 */ "Sociedade Educacional Braz Cubas Ltda", /* 47759 */ "County of El Dorado", /* 47760 */ "Wishnmix Ltd", /* 47761 */ "Section9", /* 47762 */ "OfficeFlex LLC", /* 47763 */ "Elektrownia Rybnik", /* 47764 */ "DOC.INFOSAFE (ISRAEL) LTD", /* 47765 */ "MACNICA FUJI ELECTRONICS HOLDINGS, INC.", /* 47766 */ "ASH Szoftverhaz Kft", /* 47767 */ "Aristech GmbH", /* 47768 */ "Armour Communications Limited", /* 47769 */ "ESG BIRO DE SERVICOS S/S LIMITADA - ME", /* 47770 */ "Colorado School of Mines", /* 47771 */ "Clear Axess SAGL", /* 47772 */ "Radeus Labs", /* 47773 */ "Microsoft Small Basic", /* 47774 */ "Ernst Basler + Partner AG", /* 47775 */ "TS Gateway Ltd", /* 47776 */ "Fachschaftsvertretung der Fakultät für Informatik und Mathematik, Universität Passau", /* 47777 */ "Cox Communications Inc. - Atlanta Technology", /* 47778 */ "TaiHao Medical", /* 47779 */ "Prosoft Kroměříž s.r.o.", /* 47780 */ "National Western Life Insurance", /* 47781 */ "Nautile Software", /* 47782 */ "codia Software GmbH", /* 47783 */ "Suncoast Cancer Institute", /* 47784 */ "mBank S.A.", /* 47785 */ "5BARz India Private Limited", /* 47786 */ "MuseumsIT", /* 47787 */ "Prismaflex International", /* 47788 */ "OAO MNIIPI OKOSZ \"MOSPROEKT-4\"", /* 47789 */ "ASYS Automatic Systems GmbH & Co. KG", /* 47790 */ "Rayed Alrashed", /* 47791 */ "Pew Research Center", /* 47792 */ "Scripps Networks Interactive", /* 47793 */ "Arizona Center for Hematology and Oncology, LLC", /* 47794 */ "Tegsoft", /* 47795 */ "Architecting.nl", /* 47796 */ "Yellowbrick Data, Inc", /* 47797 */ "CNI", /* 47798 */ "Verody, LLC", /* 47799 */ "Waiariki Bay of Plenty Polytechnic", /* 47800 */ "CloudSeeds GmbH", /* 47801 */ "CTSI Limited", /* 47802 */ "Urban Renaissance Agency", /* 47803 */ "Bravowhale Information Technology Ltd", /* 47804 */ "Shenzhen Grentech RF Communication Limited", /* 47805 */ "Trussan Co., Ltd", /* 47806 */ "DSRI \"Volna\", OJSC", /* 47807 */ "Delaware County Community College", /* 47808 */ "Centerline Biomedical, Inc.", /* 47809 */ "LINAGORA TUNISIE", /* 47810 */ "Pavilion Data Systems Inc", /* 47811 */ "AZ Elektro AG", /* 47812 */ "Luetze Transportation GmbH", /* 47813 */ "ChinaUnicom", /* 47814 */ "Stora Enso Skog AB", /* 47815 */ "Joseph Workstation", /* 47816 */ "HAWE Hydraulik SE", /* 47817 */ "Salzburg AG", /* 47818 */ "NTT DATA Italia", /* 47819 */ "Böco Böddecker & Co. GmbH & Co. KG", /* 47820 */ "Sjova-Almennar tryggingar hf", /* 47821 */ "NdT Web Services", /* 47822 */ "Couch Red", /* 47823 */ "Exprivia Telco & Media srl", /* 47824 */ "Ravel Electronics Pvt Ltd", /* 47825 */ "Bristows LLP", /* 47826 */ "Moogsoft", /* 47827 */ "Lincoln Oncology, LLC", /* 47828 */ "Fornetix", /* 47829 */ "MovingStar Corporation", /* 47830 */ "Robert Half Inc.", /* 47831 */ "NBCUniversal", /* 47832 */ "Teleworks Co., Ltd.", /* 47833 */ "OOO NPP \"POLUS\"", /* 47834 */ "ARCHIVECO", /* 47835 */ "Bernd Matusche", /* 47836 */ "Produban Global Services", /* 47837 */ "onether.net", /* 47838 */ "Landesarchiv Nordrhein-Westfalen", /* 47839 */ "alzahra university", /* 47840 */ "Comita Group of companies", /* 47841 */ "Identity Tech Solutions, LLC", /* 47842 */ "广州易速计算机设备有限公司 (Guangzhou-speed computer equipment Ltd.)", /* 47843 */ "ELEET Networks", /* 47844 */ "Netz39 e.V.", /* 47845 */ "BCausE Enterprise Private Limited", /* 47846 */ "Informatikdienste, Stadt Bern", /* 47847 */ "SYNERGY SYSTEMS AND SOLUTIONS", /* 47848 */ "RealSprint AB", /* 47849 */ "Cathexis Technologies (PTY) LTD", /* 47850 */ "Arest Inc.", /* 47851 */ "throwstone", /* 47852 */ "Key Performance Consulting", /* 47853 */ "Abakusz Computer Services", /* 47854 */ "Rumo Logística", /* 47855 */ "Geo++ GmbH", /* 47856 */ "Juice Goose", /* 47857 */ "ENDICOTT PRECISION", /* 47858 */ "KEO GmbH", /* 47859 */ "Thalia Bücher GmbH", /* 47860 */ "The Berkeley Carroll School", /* 47861 */ }; freeipmi-1.6.4/libfreeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.c0000644002055400205540000011123513527331637030203 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h" #include "freeipmi-portability.h" /* Generated from jedec-raw.txt, copied from * * Jedec 106 - Standard Manufactuer's Identification Code - JEP106AN - January 2014 */ const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank1[] = { { 0x01, "AMD" }, { 0x02, "AMI" }, { 0x83, "Fairchild" }, { 0x04, "Fujitsu" }, { 0x85, "GTE" }, { 0x86, "Harris" }, { 0x07, "Hitachi" }, { 0x08, "Inmos" }, { 0x89, "Intel" }, { 0x8A, "I.T.T." }, { 0x0B, "Intersil" }, { 0x8C, "Monolithic Memories" }, { 0x0D, "Mostek" }, { 0x0E, "Freescale (Motorola)" }, { 0x8F, "National" }, { 0x10, "NEC" }, { 0x91, "RCA" }, { 0x92, "Raytheon" }, { 0x13, "Conexant (Rockwell)" }, { 0x94, "Seeq" }, { 0x15, "NXP (Philips)" }, { 0x16, "Synertek" }, { 0x97, "Texas Instruments" }, { 0x98, "Toshiba" }, { 0x19, "Xicor" }, { 0x1A, "Zilog" }, { 0x9B, "Eurotechnique" }, { 0x1C, "Mitsubishi" }, { 0x9D, "Lucent (AT&T)" }, { 0x9E, "Exel" }, { 0x1F, "Atmel" }, { 0x20, "STMicroelectronics" }, { 0xA1, "Lattice Semi." }, { 0xA2, "NCR" }, { 0x23, "Wafer Scale Integration" }, { 0xA4, "IBM" }, { 0x25, "Tristar" }, { 0x26, "Visic" }, { 0xA7, "Intl. CMOS Technology" }, { 0xA8, "SSSI" }, { 0x29, "MicrochipTechnology" }, { 0x2A, "Ricoh Ltd." }, { 0xAB, "VLSI" }, { 0x2C, "Micron Technology" }, { 0xAD, "SK Hynix" }, { 0xAE, "OKI Semiconductor" }, { 0x2F, "ACTEL" }, { 0xB0, "Sharp" }, { 0x31, "Catalyst" }, { 0x32, "Panasonic" }, { 0xB3, "IDT" }, { 0x34, "Cypress" }, { 0xB5, "DEC" }, { 0xB6, "LSI Logic" }, { 0x37, "Zarlink (Plessey)" }, { 0x38, "UTMC" }, { 0xB9, "Thinking Machine" }, { 0xBA, "Thomson CSF" }, { 0x3B, "Integrated CMOS (Vertex)" }, { 0xBC, "Honeywell" }, { 0x3D, "Tektronix" }, { 0x3E, "Oracle Corporation" }, { 0xBF, "Silicon Storage Technology" }, { 0x40, "ProMos/Mosel Vitelic" }, { 0xC1, "Infineon (Siemens)" }, { 0xC2, "Macronix" }, { 0x43, "Xerox" }, { 0xC4, "Plus Logic" }, { 0x45, "SanDisk Corporation" }, { 0x46, "Elan Circuit Tech." }, { 0xC7, "European Silicon Str." }, { 0xC8, "Apple Computer" }, { 0x49, "Xilinx" }, { 0x4A, "Compaq" }, { 0xCB, "Protocol Engines" }, { 0x4C, "SCI" }, { 0xCD, "Seiko Instruments" }, { 0xCE, "Samsung" }, { 0x4F, "I3 Design System" }, { 0xD0, "Klic" }, { 0x51, "Crosspoint Solutions" }, { 0x52, "Alliance Semiconductor" }, { 0xD3, "Tandem" }, { 0x54, "Hewlett-Packard" }, { 0xD5, "Integrated Silicon Solutions" }, { 0xD6, "Brooktree" }, { 0x57, "New Media" }, { 0x58, "MHS Electronic" }, { 0xD9, "Performance Semi." }, { 0xDA, "Winbond Electronic" }, { 0x5B, "Kawasaki Steel" }, { 0xDC, "Bright Micro" }, { 0x5D, "TECMAR" }, { 0x5E, "Exar" }, { 0xDF, "PCMCIA" }, { 0xE0, "LG Semi (Goldstar)" }, { 0x61, "Northern Telecom" }, { 0x62, "Sanyo" }, { 0xE3, "Array Microsystems" }, { 0x64, "Crystal Semiconductor" }, { 0xE5, "Analog Devices" }, { 0xE6, "PMC-Sierra" }, { 0x67, "Asparix" }, { 0x68, "Convex Computer" }, { 0xE9, "Quality Semiconductor" }, { 0xEA, "Nimbus Technology" }, { 0x6B, "Transwitch" }, { 0xEC, "Micronas (ITT Intermetall)" }, { 0x6D, "Cannon" }, { 0x6E, "Altera" }, { 0xEF, "NEXCOM" }, { 0x70, "Qualcomm" }, { 0xF1, "Sony" }, { 0xF2, "Cray Research" }, { 0x73, "AMS(Austria Micro)" }, { 0xF4, "Vitesse" }, { 0x75, "Aster Electronics" }, { 0x76, "Bay Networks (Synoptic)" }, { 0xF7, "Zentrum/ZMD" }, { 0xF8, "TRW" }, { 0x79, "Thesys" }, { 0x7A, "Solbourne Computer" }, { 0xFB, "Allied-Signal" }, { 0x7C, "Dialog Semiconductor" }, { 0xFD, "Media Vision" }, { 0xFE, "Numonyx Corporation" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank2[] = { { 0x01, "Cirrus Logic" }, { 0x02, "National Instruments" }, { 0x83, "ILC Data Device" }, { 0x04, "Alcatel Mietec" }, { 0x85, "Micro Linear" }, { 0x86, "Univ. of NC" }, { 0x07, "JTAG Technologies" }, { 0x08, "BAE Systems (Loral)" }, { 0x89, "Nchip" }, { 0x8A, "Galileo Tech" }, { 0x0B, "Bestlink Systems" }, { 0x8C, "Graychip" }, { 0x0D, "GENNUM" }, { 0x0E, "VideoLogic" }, { 0x8F, "Robert Bosch" }, { 0x10, "Chip Express" }, { 0x91, "DATARAM" }, { 0x92, "United Microelectronics Corp." }, { 0x13, "TCSI" }, { 0x94, "Smart Modular" }, { 0x15, "Hughes Aircraft" }, { 0x16, "Lanstar Semiconductor" }, { 0x97, "Qlogic" }, { 0x98, "Kingston" }, { 0x19, "Music Semi" }, { 0x1A, "Ericsson Components" }, { 0x9B, "SpaSE" }, { 0x1C, "Eon Silicon Devices" }, { 0x9D, "Programmable Micro Corp" }, { 0x9E, "DoD" }, { 0x1F, "Integ. Memories Tech." }, { 0x20, "Corollary Inc." }, { 0xA1, "Dallas Semiconductor" }, { 0xA2, "Omnivision" }, { 0x23, "EIV(Switzerland)" }, { 0xA4, "Novatel Wireless" }, { 0x25, "Zarlink (Mitel)" }, { 0x26, "Clearpoint" }, { 0xA7, "Cabletron" }, { 0xA8, "STEC (Silicon Tech)" }, { 0x29, "Vanguard" }, { 0x2A, "Hagiwara Sys-Com" }, { 0xAB, "Vantis" }, { 0x2C, "Celestica" }, { 0xAD, "Century" }, { 0xAE, "Hal Computers" }, { 0x2F, "Rohm Company Ltd." }, { 0xB0, "Juniper Networks" }, { 0x31, "Libit Signal Processing" }, { 0x32, "Mushkin Enhanced Memory" }, { 0xB3, "Tundra Semiconductor" }, { 0x34, "Adaptec Inc." }, { 0xB5, "LightSpeed Semi." }, { 0xB6, "ZSP Corp." }, { 0x37, "AMIC Technology" }, { 0x38, "Adobe Systems" }, { 0xB9, "Dynachip" }, { 0xBA, "PNY Electronics" }, { 0x3B, "Newport Digital" }, { 0xBC, "MMC Networks" }, { 0x3D, "T Square" }, { 0x3E, "Seiko Epson" }, { 0xBF, "Broadcom" }, { 0x40, "Viking Components" }, { 0xC1, "V3 Semiconductor" }, { 0xC2, "Flextronics (Orbit Semiconductor)" }, { 0x43, "Suwa Electronics" }, { 0xC4, "Transmeta" }, { 0x45, "Micron CMS" }, { 0x46, "American Computer & Digital Components Inc." }, { 0xC7, "Enhance 3000 Inc." }, { 0xC8, "Tower Semiconductor" }, { 0x49, "CPU Design" }, { 0x4A, "Price Point" }, { 0xCB, "Maxim Integrated Product" }, { 0x4C, "Tellabs" }, { 0xCD, "Centaur Technology" }, { 0xCE, "Unigen Corporation" }, { 0x4F, "Transcend Information" }, { 0xD0, "Memory Card Technology" }, { 0x51, "CKD Corporation Ltd." }, { 0x52, "Capital Instruments, Inc." }, { 0xD3, "Aica Kogyo, Ltd." }, { 0x54, "Linvex Technology" }, { 0xD5, "MSC Vertriebs GmbH" }, { 0xD6, "AKM Company, Ltd." }, { 0x57, "Dynamem, Inc." }, { 0x58, "NERA ASA" }, { 0xD9, "GSI Technology" }, { 0xDA, "Dane-Elec (C Memory)" }, { 0x5B, "Acorn Computers" }, { 0xDC, "Lara Technology" }, { 0x5D, "Oak Technology, Inc." }, { 0x5E, "Itec Memory" }, { 0xDF, "Tanisys Technology" }, { 0xE0, "Truevision" }, { 0x61, "Wintec Industries" }, { 0x62, "Super PC Memory" }, { 0xE3, "MGV Memory" }, { 0x64, "Galvantech" }, { 0xE5, "Gadzoox Networks" }, { 0xE6, "Multi Dimensional Cons." }, { 0x67, "GateField" }, { 0x68, "Integrated Memory System" }, { 0xE9, "Triscend" }, { 0xEA, "XaQti" }, { 0x6B, "Goldenram" }, { 0xEC, "Clear Logic" }, { 0x6D, "Cimaron Communications" }, { 0x6E, "Nippon Steel Semi. Corp." }, { 0xEF, "Advantage Memory" }, { 0x70, "AMCC" }, { 0xF1, "LeCroy" }, { 0xF2, "Yamaha Corporation" }, { 0x73, "Digital Microwave" }, { 0xF4, "NetLogic Microsystems" }, { 0x75, "MIMOS Semiconductor" }, { 0x76, "Advanced Fibre" }, { 0xF7, "BF Goodrich Data." }, { 0xF8, "Epigram" }, { 0x79, "Acbel Polytech Inc." }, { 0x7A, "Apacer Technology" }, { 0xFB, "Admor Memory" }, { 0x7C, "FOXCONN" }, { 0xFD, "Quadratics Superconductor" }, { 0xFE, "3COM" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank3[] = { { 0x01, "Camintonn Corporation" }, { 0x02, "ISOA Incorporated" }, { 0x83, "Agate Semiconductor" }, { 0x04, "ADMtek Incorporated" }, { 0x85, "HYPERTEC" }, { 0x86, "Adhoc Technologies" }, { 0x07, "MOSAID Technologies" }, { 0x08, "Ardent Technologies" }, { 0x89, "Switchcore" }, { 0x8A, "Cisco Systems, Inc." }, { 0x0B, "Allayer Technologies" }, { 0x8C, "WorkX AG (Wichman)" }, { 0x0D, "Oasis Semiconductor" }, { 0x0E, "Novanet Semiconductor" }, { 0x8F, "E-M Solutions" }, { 0x10, "Power General" }, { 0x91, "Advanced Hardware Arch." }, { 0x92, "Inova Semiconductors GmbH" }, { 0x13, "Telocity" }, { 0x94, "Delkin Devices" }, { 0x15, "Symagery Microsystems" }, { 0x16, "C-Port Corporation" }, { 0x97, "SiberCore Technologies" }, { 0x98, "Southland Microsystems" }, { 0x19, "Malleable Technologies" }, { 0x1A, "Kendin Communications" }, { 0x9B, "Great Technology Microcomputer" }, { 0x1C, "Sanmina Corporation" }, { 0x9D, "HADCO Corporation" }, { 0x9E, "Corsair" }, { 0x1F, "Actrans System Inc." }, { 0x20, "ALPHA Technologies" }, { 0xA1, "Silicon Laboratories, Inc. (Cygnal)" }, { 0xA2, "Artesyn Technologies" }, { 0x23, "Align Manufacturing" }, { 0xA4, "Peregrine Semiconductor" }, { 0x25, "Chameleon Systems" }, { 0x26, "Aplus Flash Technology" }, { 0xA7, "MIPS Technologies" }, { 0xA8, "Chrysalis ITS" }, { 0x29, "ADTEC Corporation" }, { 0x2A, "Kentron Technologies" }, { 0xAB, "Win Technologies" }, { 0x2C, "Tezzaron Semiconductor" }, { 0xAD, "Extreme Packet Devices" }, { 0xAE, "RF Micro Devices" }, { 0x2F, "Siemens AG" }, { 0xB0, "Sarnoff Corporation" }, { 0x31, "Itautec SA" }, { 0x32, "Radiata Inc." }, { 0xB3, "Benchmark Elect. (AVEX)" }, { 0x34, "Legend" }, { 0xB5, "SpecTek Incorporated" }, { 0xB6, "Hi/fn" }, { 0x37, "Enikia Incorporated" }, { 0x38, "SwitchOn Networks" }, { 0xB9, "AANetcom Incorporated" }, { 0xBA, "Micro Memory Bank" }, { 0x3B, "ESS Technology" }, { 0xBC, "Virata Corporation" }, { 0x3D, "Excess Bandwidth" }, { 0x3E, "West Bay Semiconductor" }, { 0xBF, "DSP Group" }, { 0x40, "Newport Communications" }, { 0xC1, "Chip2Chip Incorporated" }, { 0xC2, "Phobos Corporation" }, { 0x43, "Intellitech Corporation" }, { 0xC4, "Nordic VLSI ASA" }, { 0x45, "Ishoni Networks" }, { 0x46, "Silicon Spice" }, { 0xC7, "Alchemy Semiconductor" }, { 0xC8, "Agilent Technologies" }, { 0x49, "Centillium Communications" }, { 0x4A, "W.L. Gore" }, { 0xCB, "HanBit Electronics" }, { 0x4C, "GlobeSpan" }, { 0xCD, "Element 14" }, { 0xCE, "Pycon" }, { 0x4F, "Saifun Semiconductors" }, { 0xD0, "Sibyte, Incorporated" }, { 0x51, "MetaLink Technologies" }, { 0x52, "Feiya Technology" }, { 0xD3, "I & C Technology" }, { 0x54, "Shikatronics" }, { 0xD5, "Elektrobit" }, { 0xD6, "Megic" }, { 0x57, "Com-Tier" }, { 0x58, "Malaysia Micro Solutions" }, { 0xD9, "Hyperchip" }, { 0xDA, "Gemstone Communications" }, { 0x5B, "Anadigm (Anadyne)" }, { 0xDC, "3ParData" }, { 0x5D, "Mellanox Technologies" }, { 0x5E, "Tenx Technologies" }, { 0xDF, "Helix AG" }, { 0xE0, "Domosys" }, { 0x61, "Skyup Technology" }, { 0x62, "HiNT Corporation" }, { 0xE3, "Chiaro" }, { 0x64, "MDT Technologies GmbH" }, { 0xE5, "Exbit Technology A/S" }, { 0xE6, "Integrated Technology Express" }, { 0x67, "AVED Memory" }, { 0x68, "Legerity" }, { 0xE9, "Jasmine Networks" }, { 0xEA, "Caspian Networks" }, { 0x6B, "nCUBE" }, { 0xEC, "Silicon Access Networks" }, { 0x6D, "FDK Corporation" }, { 0x6E, "High Bandwidth Access" }, { 0xEF, "MultiLink Technology" }, { 0x70, "BRECIS" }, { 0xF1, "World Wide Packets" }, { 0xF2, "APW" }, { 0x73, "Chicory Systems" }, { 0xF4, "Xstream Logic" }, { 0x75, "Fast-Chip" }, { 0x76, "Zucotto Wireless" }, { 0xF7, "Realchip" }, { 0xF8, "Galaxy Power" }, { 0x79, "eSilicon" }, { 0x7A, "Morphics Technology" }, { 0xFB, "Accelerant Networks" }, { 0x7C, "Silicon Wave" }, { 0xFD, "SandCraft" }, { 0xFE, "Elpida" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank4[] = { { 0x01, "Solectron" }, { 0x02, "Optosys Technologies" }, { 0x83, "Buffalo (Formerly Melco)" }, { 0x04, "TriMedia Technologies" }, { 0x85, "Cyan Technologies" }, { 0x86, "Global Locate" }, { 0x07, "Optillion" }, { 0x08, "Terago Communications" }, { 0x89, "Ikanos Communications" }, { 0x8A, "Princeton Technology" }, { 0x0B, "Nanya Technology" }, { 0x8C, "Elite Flash Storage" }, { 0x0D, "Mysticom" }, { 0x0E, "LightSand Communications" }, { 0x8F, "ATI Technologies" }, { 0x10, "Agere Systems" }, { 0x91, "NeoMagic" }, { 0x92, "AuroraNetics" }, { 0x13, "Golden Empire" }, { 0x94, "Mushkin" }, { 0x15, "Tioga Technologies" }, { 0x16, "Netlist" }, { 0x97, "TeraLogic" }, { 0x98, "Cicada Semiconductor" }, { 0x19, "Centon Electronics" }, { 0x1A, "Tyco Electronics" }, { 0x9B, "Magis Works" }, { 0x1C, "Zettacom" }, { 0x9D, "Cogency Semiconductor" }, { 0x9E, "Chipcon AS" }, { 0x1F, "Aspex Technology" }, { 0x20, "F5 Networks" }, { 0xA1, "Programmable Silicon Solutions" }, { 0xA2, "ChipWrights" }, { 0x23, "Acorn Networks" }, { 0xA4, "Quicklogic" }, { 0x25, "Kingmax Semiconductor" }, { 0x26, "BOPS" }, { 0xA7, "Flasys" }, { 0xA8, "BitBlitz Communications" }, { 0x29, "eMemory Technology" }, { 0x2A, "Procket Networks" }, { 0xAB, "Purple Ray" }, { 0x2C, "Trebia Networks" }, { 0xAD, "Delta Electronics" }, { 0xAE, "Onex Communications" }, { 0x2F, "Ample Communications" }, { 0xB0, "Memory Experts Intl" }, { 0x31, "Astute Networks" }, { 0x32, "Azanda Network Devices" }, { 0xB3, "Dibcom" }, { 0x34, "Tekmos" }, { 0xB5, "API NetWorks" }, { 0xB6, "Bay Microsystems" }, { 0x37, "Firecron Ltd" }, { 0x38, "Resonext Communications" }, { 0xB9, "Tachys Technologies" }, { 0xBA, "Equator Technology" }, { 0x3B, "Concept Computer" }, { 0xBC, "SILCOM" }, { 0x3D, "3Dlabs" }, { 0x3E, "t Magazine" }, { 0xBF, "Sanera Systems" }, { 0x40, "Silicon Packets" }, { 0xC1, "Viasystems Group" }, { 0xC2, "Simtek" }, { 0x43, "Semicon Devices Singapore" }, { 0xC4, "Satron Handelsges" }, { 0x45, "Improv Systems" }, { 0x46, "INDUSYS GmbH" }, { 0xC7, "Corrent" }, { 0xC8, "Infrant Technologies" }, { 0x49, "Ritek Corp" }, { 0x4A, "empowerTel Networks" }, { 0xCB, "Hypertec" }, { 0x4C, "Cavium Networks" }, { 0xCD, "PLX Technology" }, { 0xCE, "Massana Design" }, { 0x4F, "Intrinsity" }, { 0xD0, "Valence Semiconductor" }, { 0x51, "Terawave Communications" }, { 0x52, "IceFyre Semiconductor" }, { 0xD3, "Primarion" }, { 0x54, "Picochip Designs Ltd" }, { 0xD5, "Silverback Systems" }, { 0xD6, "Jade Star Technologies" }, { 0x57, "Pijnenburg Securealink" }, { 0x58, "takeMS - Ultron AG" }, { 0xD9, "Cambridge Silicon Radio" }, { 0xDA, "Swissbit" }, { 0x5B, "Nazomi Communications" }, { 0xDC, "eWave System" }, { 0x5D, "Rockwell Collins" }, { 0x5E, "Picocel Co. Ltd. (Paion)" }, { 0xDF, "Alphamosaic Ltd" }, { 0xE0, "Sandburst" }, { 0x61, "SiCon Video" }, { 0x62, "NanoAmp Solutions" }, { 0xE3, "Ericsson Technology" }, { 0x64, "PrairieComm" }, { 0xE5, "Mitac International" }, { 0xE6, "Layer N Networks" }, { 0x67, "MtekVision (Atsana)" }, { 0x68, "Allegro Networks" }, { 0xE9, "Marvell Semiconductors" }, { 0xEA, "Netergy Microelectronic" }, { 0x6B, "NVIDIA" }, { 0xEC, "Internet Machines" }, { 0x6D, "Peak Electronics" }, { 0x6E, "Litchfield Communication" }, { 0xEF, "Accton Technology" }, { 0x70, "Teradiant Networks" }, { 0xF1, "Scaleo Chip" }, { 0xF2, "Cortina Systems" }, { 0x73, "RAM Components" }, { 0xF4, "Raqia Networks" }, { 0x75, "ClearSpeed" }, { 0x76, "Matsushita Battery" }, { 0xF7, "Xelerated" }, { 0xF8, "SimpleTech" }, { 0x79, "Utron Technology" }, { 0x7A, "Astec International" }, { 0xFB, "AVM gmbH" }, { 0x7C, "Redux Communications" }, { 0xFD, "Dot Hill Systems" }, { 0xFE, "TeraChip" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank5[] = { { 0x01, "T-RAM Incorporated" }, { 0x02, "Innovics Wireless" }, { 0x83, "Teknovus" }, { 0x04, "KeyEye Communications" }, { 0x85, "Runcom Technologies" }, { 0x86, "RedSwitch" }, { 0x07, "Dotcast" }, { 0x08, "Silicon Mountain Memory" }, { 0x89, "Signia Technologies" }, { 0x8A, "Pixim" }, { 0x0B, "Galazar Networks" }, { 0x8C, "White Electronic Designs" }, { 0x0D, "Patriot Scientific" }, { 0x0E, "Neoaxiom Corporation" }, { 0x8F, "3Y Power Technology" }, { 0x10, "Scaleo Chip" }, { 0x91, "Potentia Power Systems" }, { 0x92, "C-guys Incorporated" }, { 0x13, "Digital Communications Technology Incorporated" }, { 0x94, "Silicon-Based Technology" }, { 0x15, "Fulcrum Microsystems" }, { 0x16, "Positivo Informatica Ltd" }, { 0x97, "XIOtech Corporation" }, { 0x98, "PortalPlayer" }, { 0x19, "Zhiying Software" }, { 0x1A, "ParkerVision, Inc." }, { 0x9B, "Phonex Broadband" }, { 0x1C, "Skyworks Solutions" }, { 0x9D, "Entropic Communications" }, { 0x9E, "M Intelligent Memory Ltd." }, { 0x1F, "Zensys A/S" }, { 0x20, "Legend Silicon Corp." }, { 0xA1, "Sci-worx GmbH" }, { 0xA2, "SMSC (Standard Microsystems)" }, { 0x23, "Renesas Electronics" }, { 0xA4, "Raza Microelectronics" }, { 0x25, "Phyworks" }, { 0x26, "MediaTek" }, { 0xA7, "Non-cents Productions" }, { 0xA8, "US Modular" }, { 0x29, "Wintegra Ltd." }, { 0x2A, "Mathstar" }, { 0xAB, "StarCore" }, { 0x2C, "Oplus Technologies" }, { 0xAD, "Mindspeed" }, { 0xAE, "Just Young Computer" }, { 0x2F, "Radia Communications" }, { 0xB0, "OCZ" }, { 0x31, "Emuzed" }, { 0x32, "LOGIC Devices" }, { 0xB3, "Inphi Corporation" }, { 0x34, "Quake Technologies" }, { 0xB5, "Vixel" }, { 0xB6, "SolusTek" }, { 0x37, "Kongsberg Maritime" }, { 0x38, "Faraday Technology" }, { 0xB9, "Altium Ltd." }, { 0xBA, "Insyte" }, { 0x3B, "ARM Ltd." }, { 0xBC, "DigiVision" }, { 0x3D, "Vativ Technologies" }, { 0x3E, "Endicott Interconnect Technologies" }, { 0xBF, "Pericom" }, { 0x40, "Bandspeed" }, { 0xC1, "LeWiz Communications" }, { 0xC2, "CPU Technology" }, { 0x43, "Ramaxel Technology" }, { 0xC4, "DSP Group" }, { 0x45, "Axis Communications" }, { 0x46, "Legacy Electronics" }, { 0xC7, "Chrontel" }, { 0xC8, "Powerchip Semiconductor" }, { 0x49, "MobilEye Technologies" }, { 0x4A, "Excel Semiconductor" }, { 0xCB, "A-DATA Technology" }, { 0x4C, "VirtualDigm" }, { 0xCD, "G Skill Intl" }, { 0xCE, "Quanta Computer" }, { 0x4F, "Yield Microelectronics" }, { 0xD0, "Afa Technologies" }, { 0x51, "KINGBOX Technology Co. Ltd." }, { 0x52, "Ceva" }, { 0xD3, "iStor Networks" }, { 0x54, "Advance Modules" }, { 0xD5, "Microsoft" }, { 0xD6, "Open-Silicon" }, { 0x57, "Goal Semiconductor" }, { 0x58, "ARC International" }, { 0xD9, "Simmtec" }, { 0xDA, "Metanoia" }, { 0x5B, "Key Stream" }, { 0xDC, "Lowrance Electronics" }, { 0x5D, "Adimos" }, { 0x5E, "SiGe Semiconductor" }, { 0xDF, "Fodus Communications" }, { 0xE0, "Credence Systems Corp." }, { 0x61, "Genesis Microchip Inc." }, { 0x62, "Vihana, Inc." }, { 0xE3, "WIS Technologies" }, { 0x64, "GateChange Technologies" }, { 0xE5, "High Density Devices AS" }, { 0xE6, "Synopsys" }, { 0x67, "Gigaram" }, { 0x68, "Enigma Semiconductor Inc." }, { 0xE9, "Century Micro Inc." }, { 0xEA, "Icera Semiconductor" }, { 0x6B, "Mediaworks Integrated Systems" }, { 0xEC, "Neil Product Development" }, { 0x6D, "Supreme Top Technology Ltd." }, { 0x6E, "MicroDisplay Corporation" }, { 0xEF, "Team Group Inc." }, { 0x70, "Sinett Corporation" }, { 0xF1, "Toshiba Corporation" }, { 0xF2, "Tensilica" }, { 0x73, "SiRF Technology" }, { 0xF4, "Bacoc Inc." }, { 0x75, "SMaL Camera Technologies" }, { 0x76, "Thomson SC" }, { 0xF7, "Airgo Networks" }, { 0xF8, "Wisair Ltd." }, { 0x79, "SigmaTel" }, { 0x7A, "Arkados" }, { 0xFB, "Compete IT gmbH Co. KG" }, { 0x7C, "Eudar Technology Inc." }, { 0xFD, "Focus Enhancements" }, { 0xFE, "Xyratex" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank6[] = { { 0x01, "Specular Networks" }, { 0x02, "Patriot Memory (PDP Systems)" }, { 0x83, "U-Chip Technology Corp." }, { 0x04, "Silicon Optix" }, { 0x85, "Greenfield Networks" }, { 0x86, "CompuRAM GmbH" }, { 0x07, "Stargen, Inc." }, { 0x08, "NetCell Corporation" }, { 0x89, "Excalibrus Technologies Ltd" }, { 0x8A, "SCM Microsystems" }, { 0x0B, "Xsigo Systems, Inc." }, { 0x8C, "CHIPS & Systems Inc" }, { 0x0D, "Tier 1 Multichip Solutions" }, { 0x0E, "CWRL Labs" }, { 0x8F, "Teradici" }, { 0x10, "Gigaram, Inc." }, { 0x91, "g2 Microsystems" }, { 0x92, "PowerFlash Semiconductor" }, { 0x13, "P.A. Semi, Inc." }, { 0x94, "NovaTech Solutions, S.A." }, { 0x15, "c2 Microsystems, Inc." }, { 0x16, "Level5 Networks" }, { 0x97, "COS Memory AG" }, { 0x98, "Innovasic Semiconductor" }, { 0x19, "02IC Co. Ltd" }, { 0x1A, "Tabula, Inc." }, { 0x9B, "Crucial Technology" }, { 0x1C, "Chelsio Communications" }, { 0x9D, "Solarflare Communications" }, { 0x9E, "Xambala Inc." }, { 0x1F, "EADS Astrium" }, { 0x20, "Terra Semiconductor, Inc." }, { 0xA1, "Imaging Works, Inc." }, { 0xA2, "Astute Networks, Inc." }, { 0x23, "Tzero" }, { 0xA4, "Emulex" }, { 0x25, "Power-One" }, { 0x26, "Pulse~LINK Inc." }, { 0xA7, "Hon Hai Precision Industry" }, { 0xA8, "White Rock Networks Inc." }, { 0x29, "Telegent Systems USA, Inc." }, { 0x2A, "Atrua Technologies, Inc." }, { 0xAB, "Acbel Polytech Inc." }, { 0x2C, "eRide Inc." }, { 0xAD, "ULi Electronics Inc." }, { 0xAE, "Magnum Semiconductor Inc." }, { 0x2F, "neoOne Technology, Inc." }, { 0xB0, "Connex Technology, Inc." }, { 0x31, "Stream Processors, Inc." }, { 0x32, "Focus Enhancements" }, { 0xB3, "Telecis Wireless, Inc." }, { 0x34, "uNav Microelectronics" }, { 0xB5, "Tarari, Inc." }, { 0xB6, "Ambric, Inc." }, { 0x37, "Newport Media, Inc." }, { 0x38, "VMTS" }, { 0xB9, "Enuclia Semiconductor, Inc." }, { 0xBA, "Virtium Technology Inc." }, { 0x3B, "Solid State System Co., Ltd." }, { 0xBC, "Kian Tech LLC" }, { 0x3D, "Artimi" }, { 0x3E, "Power Quotient International" }, { 0xBF, "Avago Technologies" }, { 0x40, "ADTechnology" }, { 0xC1, "Sigma Designs" }, { 0xC2, "SiCortex, Inc." }, { 0x43, "Ventura Technology Group" }, { 0xC4, "eASIC" }, { 0x45, "M.H.S. SAS" }, { 0x46, "Micro Star International" }, { 0xC7, "Rapport Inc." }, { 0xC8, "Makway International" }, { 0x49, "Broad Reach Engineering Co." }, { 0x4A, "Semiconductor Mfg Intl Corp" }, { 0xCB, "SiConnect" }, { 0x4C, "FCI USA Inc." }, { 0xCD, "Validity Sensors" }, { 0xCE, "Coney Technology Co. Ltd." }, { 0x4F, "Spans Logic" }, { 0xD0, "Neterion Inc." }, { 0x51, "Qimonda" }, { 0x52, "New Japan Radio Co. Ltd." }, { 0xD3, "Velogix" }, { 0x54, "Montalvo Systems" }, { 0xD5, "iVivity Inc." }, { 0xD6, "Walton Chaintech" }, { 0x57, "AENEON" }, { 0x58, "Lorom Industrial Co. Ltd." }, { 0xD9, "Radiospire Networks" }, { 0xDA, "Sensio Technologies, Inc." }, { 0x5B, "Nethra Imaging" }, { 0xDC, "Hexon Technology Pte Ltd" }, { 0x5D, "CompuStocx (CSX)" }, { 0x5E, "Methode Electronics, Inc." }, { 0xDF, "Connect One Ltd." }, { 0xE0, "Opulan Technologies" }, { 0x61, "Septentrio NV" }, { 0x62, "Goldenmars Technology Inc." }, { 0xE3, "Kreton Corporation" }, { 0x64, "Cochlear Ltd." }, { 0xE5, "Altair Semiconductor" }, { 0xE6, "NetEffect, Inc." }, { 0x67, "Spansion, Inc." }, { 0x68, "Taiwan Semiconductor Mfg" }, { 0xE9, "Emphany Systems Inc." }, { 0xEA, "ApaceWave Technologies" }, { 0x6B, "Mobilygen Corporation" }, { 0xEC, "Tego" }, { 0x6D, "Cswitch Corporation" }, { 0x6E, "Haier (Beijing) IC Design Co." }, { 0xEF, "MetaRAM" }, { 0x70, "Axel Electronics Co. Ltd." }, { 0xF1, "Tilera Corporation" }, { 0xF2, "Aquantia" }, { 0x73, "Vivace Semiconductor" }, { 0xF4, "Redpine Signals" }, { 0x75, "Octalica" }, { 0x76, "InterDigital Communications" }, { 0xF7, "Avant Technology" }, { 0xF8, "Asrock, Inc." }, { 0x79, "Availink" }, { 0x7A, "Quartics, Inc." }, { 0xFB, "Element CXI" }, { 0x7C, "Innovaciones Microelectronicas" }, { 0xFD, "VeriSilicon Microelectronics" }, { 0xFE, "W5 Networks" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank7[] = { { 0x01, "MOVEKING" }, { 0x02, "Mavrix Technology, Inc." }, { 0x83, "CellGuide Ltd." }, { 0x04, "Faraday Technology" }, { 0x85, "Diablo Technologies, Inc." }, { 0x86, "Jennic" }, { 0x07, "Octasic" }, { 0x08, "Molex Incorporated" }, { 0x89, "3Leaf Networks" }, { 0x8A, "Bright Micron Technology" }, { 0x0B, "Netxen" }, { 0x8C, "NextWave Broadband Inc." }, { 0x0D, "DisplayLink" }, { 0x0E, "ZMOS Technology" }, { 0x8F, "Tec-Hill" }, { 0x10, "Multigig, Inc." }, { 0x91, "Amimon" }, { 0x92, "Euphonic Technologies, Inc." }, { 0x13, "BRN Phoenix" }, { 0x94, "InSilica" }, { 0x15, "Ember Corporation" }, { 0x16, "Avexir Technologies Corporation" }, { 0x97, "Echelon Corporation" }, { 0x98, "Edgewater Computer Systems" }, { 0x19, "XMOS Semiconductor Ltd." }, { 0x1A, "GENUSION, Inc." }, { 0x9B, "Memory Corp NV" }, { 0x1C, "SiliconBlue Technologies" }, { 0x9D, "Rambus Inc." }, { 0x9E, "Andes Technology Corporation" }, { 0x1F, "Coronis Systems" }, { 0x20, "Achronix Semiconductor" }, { 0xA1, "Siano Mobile Silicon Ltd." }, { 0xA2, "Semtech Corporation" }, { 0x23, "Pixelworks Inc." }, { 0xA4, "Gaisler Research AB" }, { 0x25, "Teranetics" }, { 0x26, "Toppan Printing Co. Ltd." }, { 0xA7, "Kingxcon" }, { 0xA8, "Silicon Integrated Systems" }, { 0x29, "I-O Data Device, Inc." }, { 0x2A, "NDS Americas Inc." }, { 0xAB, "Solomon Systech Limited" }, { 0x2C, "On Demand Microelectronics" }, { 0xAD, "Amicus Wireless Inc." }, { 0xAE, "SMARDTV SNC" }, { 0x2F, "Comsys Communication Ltd." }, { 0xB0, "Movidia Ltd." }, { 0x31, "Javad GNSS, Inc." }, { 0x32, "Montage Technology Group" }, { 0xB3, "Trident Microsystems" }, { 0x34, "Super Talent" }, { 0xB5, "Optichron, Inc." }, { 0xB6, "Future Waves UK Ltd." }, { 0x37, "SiBEAM, Inc." }, { 0x38, "Inicore,Inc." }, { 0xB9, "Virident Systems" }, { 0xBA, "M2000, Inc." }, { 0x3B, "ZeroG Wireless, Inc." }, { 0xBC, "Gingle Technology Co. Ltd." }, { 0x3D, "Space Micro Inc." }, { 0x3E, "Wilocity" }, { 0xBF, "Novafora, Inc." }, { 0x40, "iKoa Corporation" }, { 0xC1, "ASint Technology" }, { 0xC2, "Ramtron" }, { 0x43, "Plato Networks Inc." }, { 0xC4, "IPtronics AS" }, { 0x45, "Infinite-Memories" }, { 0x46, "Parade Technologies Inc." }, { 0xC7, "Dune Networks" }, { 0xC8, "GigaDevice Semiconductor" }, { 0x49, "Modu Ltd." }, { 0x4A, "CEITEC" }, { 0xCB, "Northrop Grumman" }, { 0x4C, "XRONET Corporation" }, { 0xCD, "Sicon Semiconductor AB" }, { 0xCE, "Atla Electronics Co. Ltd." }, { 0x4F, "TOPRAM Technology" }, { 0xD0, "Silego Technology Inc." }, { 0x51, "Kinglife" }, { 0x52, "Ability Industries Ltd." }, { 0xD3, "Silicon Power Computer & Communications" }, { 0x54, "Augusta Technology, Inc." }, { 0xD5, "Nantronics Semiconductors" }, { 0xD6, "Hilscher Gesellschaft" }, { 0x57, "Quixant Ltd." }, { 0x58, "Percello Ltd." }, { 0xD9, "NextIO Inc." }, { 0xDA, "Scanimetrics Inc." }, { 0x5B, "FS-Semi Company Ltd." }, { 0xDC, "Infinera Corporation" }, { 0x5D, "SandForce Inc." }, { 0x5E, "Lexar Media" }, { 0xDF, "Teradyne Inc." }, { 0xE0, "Memory Exchange Corp." }, { 0x61, "Suzhou Smartek Electronics" }, { 0x62, "Avantium Corporation" }, { 0xE3, "ATP Electronics Inc." }, { 0x64, "Valens Semiconductor Ltd" }, { 0xE5, "Agate Logic, Inc." }, { 0xE6, "Netronome" }, { 0x67, "Zenverge, Inc." }, { 0x68, "N-trig Ltd" }, { 0xE9, "SanMax Technologies Inc." }, { 0xEA, "Contour Semiconductor Inc." }, { 0x6B, "TwinMOS" }, { 0xEC, "Silicon Systems, Inc." }, { 0x6D, "V-Color Technology Inc." }, { 0x6E, "Certicom Corporation" }, { 0xEF, "JSC ICC Milandr" }, { 0x70, "PhotoFast Global Inc." }, { 0xF1, "InnoDisk Corporation" }, { 0xF2, "Muscle Power" }, { 0x73, "Energy Micro" }, { 0xF4, "Innofidei" }, { 0x75, "CopperGate Communications" }, { 0x76, "Holtek Semiconductor Inc." }, { 0xF7, "Myson Century, Inc." }, { 0xF8, "FIDELIX" }, { 0x79, "Red Digital Cinema" }, { 0x7A, "Densbits Technology" }, { 0xFB, "Zempro" }, { 0x7C, "MoSys" }, { 0xFD, "Provigent" }, { 0xFE, "Triad Semiconductor, Inc." }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank8[] = { { 0x01, "Siklu Communication Ltd." }, { 0x02, "A Force Manufacturing Ltd." }, { 0x83, "Strontium" }, { 0x04, "Abilis Systems" }, { 0x85, "Siglead, Inc." }, { 0x86, "Ubicom, Inc." }, { 0x07, "Unifosa Corporation" }, { 0x08, "Stretch, Inc." }, { 0x89, "Lantiq Deutschland GmbH" }, { 0x8A, "Visipro." }, { 0x0B, "EKMemory" }, { 0x8C, "Microelectronics Institute ZTE" }, { 0x0D, "Cognovo Ltd." }, { 0x0E, "Carry Technology Co. Ltd." }, { 0x8F, "Nokia" }, { 0x10, "King Tiger Technology" }, { 0x91, "Sierra Wireless" }, { 0x92, "HT Micron" }, { 0x13, "Albatron Technology Co. Ltd." }, { 0x94, "Leica Geosystems AG" }, { 0x15, "BroadLight" }, { 0x16, "AEXEA" }, { 0x97, "ClariPhy Communications, Inc." }, { 0x98, "Green Plug" }, { 0x19, "Design Art Networks" }, { 0x1A, "Mach Xtreme Technology Ltd." }, { 0x9B, "ATO Solutions Co. Ltd." }, { 0x1C, "Ramsta" }, { 0x9D, "Greenliant Systems, Ltd." }, { 0x9E, "Teikon" }, { 0x1F, "Antec Hadron" }, { 0x20, "NavCom Technology, Inc." }, { 0xA1, "Shanghai Fudan Microelectronics" }, { 0xA2, "Calxeda, Inc." }, { 0x23, "JSC EDC Electronics" }, { 0xA4, "Kandit Technology Co. Ltd." }, { 0x25, "Ramos Technology" }, { 0x26, "Goldenmars Technology" }, { 0xA7, "XeL Technology Inc." }, { 0xA8, "Newzone Corporation" }, { 0x29, "ShenZhen MercyPower Tech" }, { 0x2A, "Nanjing Yihuo Technology" }, { 0xAB, "Nethra Imaging Inc." }, { 0x2C, "SiTel Semiconductor BV" }, { 0xAD, "SolidGear Corporation" }, { 0xAE, "Topower Computer Ind Co Ltd." }, { 0x2F, "Wilocity" }, { 0xB0, "Profichip GmbH" }, { 0x31, "Gerad Technologies" }, { 0x32, "Ritek Corporation" }, { 0xB3, "Gomos Technology Limited" }, { 0x34, "Memoright Corporation" }, { 0xB5, "D-Broad, Inc." }, { 0xB6, "HiSilicon Technologies" }, { 0x37, "Syndiant Inc.." }, { 0x38, "Enverv Inc." }, { 0xB9, "Cognex" }, { 0xBA, "Xinnova Technology Inc." }, { 0x3B, "Ultron AG" }, { 0xBC, "Concord Idea Corporation" }, { 0x3D, "AIM Corporation" }, { 0x3E, "Lifetime Memory Products" }, { 0xBF, "Ramsway" }, { 0x40, "Recore Systems B.V." }, { 0xC1, "Haotian Jinshibo Science Tech" }, { 0xC2, "Being Advanced Memory" }, { 0x43, "Adesto Technologies" }, { 0xC4, "Giantec Semiconductor, Inc." }, { 0x45, "HMD Electronics AG" }, { 0x46, "Gloway International (HK)" }, { 0xC7, "Kingcore" }, { 0xC8, "Anucell Technology Holding" }, { 0x49, "Accord Software & Systems Pvt. Ltd." }, { 0x4A, "Active-Semi Inc." }, { 0xCB, "Denso Corporation" }, { 0x4C, "TLSI Inc." }, { 0xCD, "Qidan" }, { 0xCE, "Mustang" }, { 0x4F, "Orca Systems" }, { 0xD0, "Passif Semiconductor" }, { 0x51, "GigaDevice Semiconductor (Beijing) Inc." }, { 0x52, "Memphis Electronic" }, { 0xD3, "Beckhoff Automation GmbH" }, { 0x54, "Harmony Semiconductor Corp" }, { 0xD5, "Air Computers SRL" }, { 0xD6, "TMT Memory" }, { 0x57, "Eorex Corporation" }, { 0x58, "Xingtera" }, { 0xD9, "Netsol" }, { 0xDA, "Bestdon Technology Co. Ltd." }, { 0x5B, "Baysand Inc." }, { 0xDC, "Uroad Technology Co. Ltd." }, { 0x5D, "Wilk Elektronik S.A." }, { 0x5E, "AAI" }, { 0xDF, "Harman" }, { 0xE0, "Berg Microelectronics Inc." }, { 0x61, "ASSIA, Inc." }, { 0x62, "Visiontek Products LLC" }, { 0xE3, "OCMEMORY" }, { 0x64, "Welink Solution Inc." }, { 0xE5, "Shark Gaming" }, { 0xE6, "Avalanche Technology" }, { 0x67, "R&D Center ELVEES OJSC" }, { 0x68, "KingboMars Technology Co. Ltd." }, { 0xE9, "High Bridge Solutions Industria Eletronica" }, { 0xEA, "Transcend Technology Co. Ltd." }, { 0x6B, "Everspin Technologies" }, { 0xEC, "Hon-Hai Precision" }, { 0x6D, "Smart Storage Systems" }, { 0x6E, "Toumaz Group" }, { 0xEF, "Zentel Electronics Corporation" }, { 0x70, "Panram International Corporation" }, { 0xF1, "Silicon Space Technology" }, { 0xF2, "LITE-ON IT Corporation" }, { 0x73, "Inuitive" }, { 0xF4, "HMicro" }, { 0x75, "BittWare, Inc." }, { 0x76, "GLOBALFOUNDRIES" }, { 0xF7, "ACPI Digital Co. Ltd." }, { 0xF8, "Annapurna Labs" }, { 0x79, "AcSiP Technology Corporation" }, { 0x7A, "Idea! Electronic Systems" }, { 0xFB, "Gowe Technology Co. Ltd." }, { 0x7C, "Hermes Testing Solutions, Inc." }, { 0xFD, "Positivo BGH" }, { 0xFE, "Intelligence Silicon Technology" }, { 0x00, NULL }, }; const struct ipmi_jedec_manufacturer_id_pair ipmi_jedec_manufacturer_id_bank9[] = { { 0x01, "3D PLUS" }, { 0x02, "Diehl Aerospace" }, { 0x83, "Fairchild" }, { 0x04, "Mercury Systems" }, { 0x85, "Sonics, Inc." }, { 0x86, "GE Intelligent Platforms GmbH & Co." }, { 0x07, "Shenzhen Jinge Information Co. Ltd." }, { 0x08, "SCWW" }, { 0x89, "Silicon Motion Inc." }, { 0x8A, "Anurag" }, { 0x0B, "King Kong" }, { 0x8C, "FROM30 Co. Ltd." }, { 0x0D, "Gowin Semiconductor Corp" }, { 0x0E, "Fremont Micro Devices Ltd." }, { 0x8F, "Ericsson Modems" }, { 0x10, "Exelis" }, { 0x91, "Satixfy Ltd." }, { 0x92, "Galaxy Microsystems Ltd." }, { 0x13, "Gloway International Co. Ltd." }, { 0x94, "Lab" }, { 0x15, "Smart Energy Instruments" }, { 0x16, "Approved Memory Corporation" }, { 0x97, "Axell Corporation" }, { 0x98, "ISD Technology Limited" }, { 0x19, "Phytium" }, { 0x1A, "an SinoChip Semiconductor" }, { 0x9B, "Ambiq Micro" }, { 0x1C, "eveRAM Technology, Inc." }, { 0x9D, "Infomax" }, { 0x9E, "Butterfly Network, Inc." }, { 0x1F, "Shenzhen City Gcai Electronics" }, { 0x20, "Stack Devices Corporation" }, { 0xA1, "ADK Media Group" }, { 0xA2, "TSP Global Co., Ltd." }, { 0x23, "HighX" }, { 0xA4, "Shenzhen Elicks Technology" }, { 0x25, "ISSI/Chingis" }, { 0x26, "Google, Inc." }, { 0xA7, "Dasima International Development" }, { 0xA8, "Leahkinn Technology Limited" }, { 0x00, NULL }, }; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-spec.c0000644002055400205540000014320113527331637026106 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /************************************************ * Generic Event Reading Strings (FULL STRINGS) * ************************************************/ const char * const ipmi_generic_event_reading_type_code_threshold[] = { "Lower Non-critical - going low", "Lower Non-critical - going high", "Lower Critical - going low", "Lower Critical - going high", "Lower Non-recoverable - going low", "Lower Non-recoverable - going high", "Upper Non-critical - going low", "Upper Non-critical - going high", "Upper Critical - going low", "Upper Critical - going high", "Upper Non-recoverable - going low", "Upper Non-recoverable - going high", NULL }; unsigned int ipmi_generic_event_reading_type_code_threshold_max_index = 0x0B; const char * const ipmi_generic_event_reading_type_code_transition_state[] = { "Transition to Idle", "Transition to Active", "Transition to Busy", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_state_max_index = 0x02; const char * const ipmi_generic_event_reading_type_code_state[] = { "State Deasserted", "State Asserted", NULL }; unsigned int ipmi_generic_event_reading_type_code_state_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_predictive_failure[] = { "Predictive Failure deasserted", "Predictive Failure asserted", NULL }; unsigned int ipmi_generic_event_reading_type_code_predictive_failure_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_limit[] = { "Limit Not Exceeded", "Limit Exceeded", NULL }; unsigned int ipmi_generic_event_reading_type_code_limit_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_performance[] = { "Performance Met", "Performance Lags", NULL }; unsigned int ipmi_generic_event_reading_type_code_performance_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_transition_severity[] = { "transition to OK", "transition to Non-Critical from OK", "transition to Critical from less severe", "transition to Non-recoverable from less severe", "transition to Non-Critical from more severe", "transition to Critical from Non-recoverable", "transition to Non-recoverable", "Monitor", "Informational", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_severity_max_index = 0x08; const char * const ipmi_generic_event_reading_type_code_device_present[] = { "Device Removed/Device Absent", "Device Inserted/Device Present", NULL }; unsigned int ipmi_generic_event_reading_type_code_device_present_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_device_enabled[] = { "Device Disabled", "Device Enabled", NULL }; unsigned int ipmi_generic_event_reading_type_code_device_enabled_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_transition_availability[] = { "transition to Running", "transition to In Test", "transition to Power Off", "transition to On Line", "transition to Off Line", "transition to Off Duty", "transition to Degraded", "transition to Power Save", "Install Error", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_availability_max_index = 0x08; const char * const ipmi_generic_event_reading_type_code_redundancy[] = { "Fully Redundant (formerly \"Redundancy Regained\")", "Redundancy Lost", "Redundancy Degraded", "Non-redundant:Sufficient Resources from Redundant", "Non-redundant:Sufficient Resources from Insufficient Resources", "Non-redundant:Insufficient Resources", "Redundancy Degraded from Fully Redundant", "Redundancy Degraded from Non-redundant", NULL }; unsigned int ipmi_generic_event_reading_type_code_redundancy_max_index = 0x07; const char * const ipmi_generic_event_reading_type_code_acpi_power_state[] = { "D0 Power State", "D1 Power State", "D2 Power State", "D3 Power State", NULL }; unsigned int ipmi_generic_event_reading_type_code_acpi_power_state_max_index = 0x03; /************************************************* * Generic Event Reading Strings (SHORT STRINGS) * *************************************************/ /* achu: these are identical to the above but cleaned up for * situations where "short strings" are better for output. I may have * slightly modified the strings statements too. */ const char * const ipmi_generic_event_reading_type_code_threshold_short[] = { "Lower Non-critical - going low", "Lower Non-critical - going high", "Lower Critical - going low", "Lower Critical - going high", "Lower Non-recoverable - going low", "Lower Non-recoverable - going high", "Upper Non-critical - going low", "Upper Non-critical - going high", "Upper Critical - going low", "Upper Critical - going high", "Upper Non-recoverable - going low", "Upper Non-recoverable - going high", NULL }; unsigned int ipmi_generic_event_reading_type_code_threshold_short_max_index = 0x0B; const char * const ipmi_generic_event_reading_type_code_transition_state_short[] = { "Transition to Idle", "Transition to Active", "Transition to Busy", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_state_short_max_index = 0x02; const char * const ipmi_generic_event_reading_type_code_state_short[] = { "State Deasserted", "State Asserted", NULL }; unsigned int ipmi_generic_event_reading_type_code_state_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_predictive_failure_short[] = { "Predictive Failure deasserted", "Predictive Failure asserted", NULL }; unsigned int ipmi_generic_event_reading_type_code_predictive_failure_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_limit_short[] = { "Limit Not Exceeded", "Limit Exceeded", NULL }; unsigned int ipmi_generic_event_reading_type_code_limit_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_performance_short[] = { "Performance Met", "Performance Lags", NULL }; unsigned int ipmi_generic_event_reading_type_code_performance_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_transition_severity_short[] = { "transition to OK", "transition to Non-Critical from OK", "transition to Critical from less severe", "transition to Non-recoverable from less severe", "transition to Non-Critical from more severe", "transition to Critical from Non-recoverable", "transition to Non-recoverable", "Monitor", "Informational", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_severity_short_max_index = 0x08; const char * const ipmi_generic_event_reading_type_code_device_present_short[] = { "Device Removed/Device Absent", "Device Inserted/Device Present", NULL }; unsigned int ipmi_generic_event_reading_type_code_device_present_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_device_enabled_short[] = { "Device Disabled", "Device Enabled", NULL }; unsigned int ipmi_generic_event_reading_type_code_device_enabled_short_max_index = 0x01; const char * const ipmi_generic_event_reading_type_code_transition_availability_short[] = { "transition to Running", "transition to In Test", "transition to Power Off", "transition to On Line", "transition to Off Line", "transition to Off Duty", "transition to Degraded", "transition to Power Save", "Install Error", NULL }; unsigned int ipmi_generic_event_reading_type_code_transition_availability_short_max_index = 0x08; const char * const ipmi_generic_event_reading_type_code_redundancy_short[] = { "Fully Redundant", "Redundancy Lost", "Redundancy Degraded", "Non-redundant:Sufficient Resources from Redundant", "Non-redundant:Sufficient Resources from Insufficient Resources", "Non-redundant:Insufficient Resources", "Redundancy Degraded from Fully Redundant", "Redundancy Degraded from Non-redundant", NULL }; unsigned int ipmi_generic_event_reading_type_code_redundancy_short_max_index = 0x07; const char * const ipmi_generic_event_reading_type_code_acpi_power_state_short[] = { "D0 Power State", "D1 Power State", "D2 Power State", "D3 Power State", NULL }; unsigned int ipmi_generic_event_reading_type_code_acpi_power_state_short_max_index = 0x03; /************************************** * Sensor Type Strings (FULL STRINGS) * **************************************/ /* achu: 'undock' removed as noted in errata */ const char * const ipmi_sensor_type_physical_security[] = { "General Chassis Intrusion", "Drive Bay intrusion", "I/O Card area intrusion", "Processor area intrusion", "LAN Leash Lost (system is unplugged from LAN)", "Unauthorized dock", "FAN area intrusion (supports detection of hot plug fan tampering)", NULL }; unsigned int ipmi_sensor_type_physical_security_max_index = 0x06; const char * const ipmi_sensor_type_platform_security_violation_attempt[] = { "Secure Mode (Front Panel Lockout) Violation attempt", "Pre-boot Password Violation - user password", "Pre-boot Password Violation attempt - setup password", "Pre-boot Password Violation - network boot password", "Other pre-boot Password Violation", "Out-of-band Access Password Violation", NULL }; unsigned int ipmi_sensor_type_platform_security_violation_attempt_max_index = 0x05; const char * const ipmi_sensor_type_processor[] = { "IERR", "Thermal Trip", "FRB1/BIST failure", "FRB2/Hang in POST failure (used hang is believed to be due or related to a processor failure. Use System Firmware Progress sensor for other BIOS hangs.)", "FRB3/Processor Startup/Initialization failure (CPU didn't start)", "Configuration Error", "SM BIOS `Uncorrectable CPU-complex Error'", "Processor Presence detected", "Processor disabled", "Terminator Presence Detected", "Processor Automatically Throttled (processor throttling triggered by a hardware-based mechanism operating independent from system software, such as automatic thermal throttling or throttling to limit power consumption.)", "Machine Check Exception (Uncorrectable)", "Correctable Machine Check Error", NULL }; unsigned int ipmi_sensor_type_processor_max_index = 0x0C; const char * const ipmi_sensor_type_power_supply[] = { "Presence detected", "Power Supply Failure detected", "Predictive Failure", "Power Supply input lost (AC/DC)", "Power Supply input lost or out-of-range", "Power Supply input out-of-range, but present", "Configuration error", "Power Supply Inactive (in standby state)", NULL }; unsigned int ipmi_sensor_type_power_supply_max_index = 0x07; const char * const ipmi_sensor_type_power_unit[] = { "Power Off/Power Down", "Power Cycle", "240VA Power Down", "Interlock Power Down", "AC lost/Power input lost (The power source for the power unit was lost)", "Soft Power Control Failure (unit did not respond to request to turn on)", "Power Unit Failure detected", "Predictive Failure", NULL }; unsigned int ipmi_sensor_type_power_unit_max_index = 0x07; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_memory[] = { "Correctable ECC/other correctable memory error", "Uncorrectable ECC/other uncorrectable memory error", "Parity", "Memory Scrub Failed (stuck bit)", "Memory Device Disabled", "Correctable ECC/other correctable memory error logging limit reached", "Presence detected", "Configuration error", "Spare", "Memory Automatically Throttled", "Critical Overtemperature. Memory device has entered a critical overtemperature state, exceeding specified operating conditions. Memory devices in this state may produce errors or become inaccessible", NULL }; unsigned int ipmi_sensor_type_memory_max_index = 0x0A; /* achu: defined in errata */ const char * const ipmi_sensor_type_drive_slot[] = { "Drive Presence", "Drive Fault", "Predictive Failure", "Hot Spare", "Consistency Check / Parity Check in progress", "In Critical Array", "In Failed Array", "Rebuild/Remap in progress", "Rebuild/Remap Aborted (was not completed normally)", NULL }; unsigned int ipmi_sensor_type_drive_slot_max_index = 0x08; const char * const ipmi_sensor_type_system_firmware_progress[] = { "System Firmware Error (POST Error)", "System Firmware Hang", "System Firmware Progress", NULL }; unsigned int ipmi_sensor_type_system_firmware_progress_max_index = 0x02; const char * const ipmi_sensor_type_event_logging_disabled[] = { "Correctable Memory Error Logging Disabled", "Event `Type' Logging Disabled", "Log Area Reset/Cleared", "All Event Logging Disabled", "SEL Full", "SEL Almost Full", "Correctable Machine Check Error Logging Disabled", NULL }; unsigned int ipmi_sensor_type_event_logging_disabled_max_index = 0x06; const char * const ipmi_sensor_type_watchdog1[] = { "BIOS Watchdog Reset", "OS Watchdog Reset", "OS Watchdog Shut Down", "OS Watchdog Power Down", "OS Watchdog Power Cycle", "OS Watchdog NMI/Diagnostic Interrupt", "OS Watchdog Expired, status only", "OS Watchdog pre-timeout Interrupt, non-NMI", NULL }; unsigned int ipmi_sensor_type_watchdog1_max_index = 0x07; const char * const ipmi_sensor_type_system_event[] = { "System Reconfigured", "OEM System Boot Event", "Undetermined system hardware failure", "Entry added to Auxiliary Log", "PEF Action", "Timestamp Clock Synch", NULL }; unsigned int ipmi_sensor_type_system_event_max_index = 0x05; const char * const ipmi_sensor_type_critical_interrupt[] = { "Front Panel NMI/Diagnostic Interrupt", "Bus Timeout", "I/O channel check NMI", "Software NMI", "PCI PERR", "PCI SERR", "EISA Fail Safe Timeout", "Bus Correctable Error", "Bus Uncorrectable Error", "Fatal NMI (port 61h, bit 7)", "Bus Fatal Error", "Bus Degraded (bus operating in a degraded performance state)", NULL }; unsigned int ipmi_sensor_type_critical_interrupt_max_index = 0x0B; const char * const ipmi_sensor_type_button_switch[] = { "Power Button pressed", "Sleep Button pressed", "Reset Button pressed", "FRU latch open (Switch indicating FRU latch is in `unlatched' position and FRU is mechanically removable)", "FRU service request button (pressed, service, e.g. removal/replacement, requested)", NULL }; unsigned int ipmi_sensor_type_button_switch_max_index = 0x04; const char * const ipmi_sensor_type_chip_set[] = { "Soft Power Control Failure (chipset did not respond to BMC request to change system power state)", "Thermal Trip", NULL }; unsigned int ipmi_sensor_type_chip_set_max_index = 0x01; const char * const ipmi_sensor_type_cable_interconnect[] = { "Cable/Interconnect is connected", "Configuration Error - Incorrect cable connected / Incorrect interconnection", NULL }; unsigned int ipmi_sensor_type_cable_interconnect_max_index = 0x01; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_system_boot_initiated[] = { "Initiated by power up", "Initiated by hard reset", "Initiated by warm reset", "User requested PXE boot", "Automatic boot to diagnostic", "OS / run-time software initiated hard reset", "OS / run-time software initiated warm reset", "System Restart", NULL }; unsigned int ipmi_sensor_type_system_boot_initiated_max_index = 0x07; const char * const ipmi_sensor_type_boot_error[] = { "No bootable media", "Non-bootable diskette left in drive", "PXE Server not found", "Invalid boot sector", "Timeout waiting for user selection of boot source", NULL }; unsigned int ipmi_sensor_type_boot_error_max_index = 0x04; const char * const ipmi_sensor_type_os_boot[] = { "A: boot completed", "C: boot completed", "PXE boot completed", "Diagnostic boot completed", "CD-ROM boot completed", "ROM boot completed", "boot completed - boot device not specified", "Base OS/Hypervisor Installation started", "Base OS/Hypervisor Installation completed", "Base OS/Hypervisor Installation aborted", "Base OS/Hypervisor Installation failed", NULL }; unsigned int ipmi_sensor_type_os_boot_max_index = 0x0A; /* achu: modified per errata */ const char * const ipmi_sensor_type_os_critical_stop[] = { "Critical stop during OS load / initialization. Unexpected error during system startup. Stopped waiting for input or power cycle/reset.", "Run-time Critical Stop (a.k.a. 'core dump', 'blue screen')", "OS Graceful Stop (system powered up, but normal OS operation has shut down and system is awaiting reset pushbutton, powercycle or other external input)", "OS Graceful Shutdown (system graceful power down by OS)", "Soft Shutdown initiated by PEF", "Agent Not Responding. Graceful shutdown request to agent via BMC did not occur due to missing or malfunctioning local agent.", NULL }; unsigned int ipmi_sensor_type_os_critical_stop_max_index = 0x05; const char * const ipmi_sensor_type_slot_connector[] = { "Fault Status asserted", "Identify Status asserted", "Slot/Connector Device installed/attached", "Slot/Connector Ready for Device Installation", "Slot/Connector Ready for Device Removal", "Slot Power is Off", "Slot/Connector Device Removal Request", "Interlock asserted", "Slot is Disabled", "Slot holds spare device", NULL }; unsigned int ipmi_sensor_type_slot_connector_max_index = 0x09; const char * const ipmi_sensor_type_acpi_power_state[] = { "S0/G0 \"working\"", "S1 \"sleeping with system h/w & processor context maintained\"", "S2 \"sleeping, processor context lost\"", "S3 \"sleeping, processor & h/w context lost, memory retained.\"", "S4 \"non-volatile sleep/suspend-to disk\"", "S5/G2 \"soft-off\"", "S4/S5 soft-off, particular S4/S5 state cannot be determined", "G3/Mechanical Off", "Sleeping in an S1, S2, or S3 states (used when particular S1, S2, S3 state cannot be determined)", "G1 sleeping (S1-S4 state cannot be determined)", "S5 entered by override", "Legacy ON state", "Legacy OFF state", "Unspecified", "Unknown", NULL }; unsigned int ipmi_sensor_type_acpi_power_state_max_index = 0x0E; const char * const ipmi_sensor_type_watchdog2[] = { "Timer expired, status only (no action, no interrupt)", "Hard Reset", "Power Down", "Power Cycle", "reserved", "reserved", "reserved", "reserved", "Timer interrupt", NULL }; unsigned int ipmi_sensor_type_watchdog2_max_index = 0x08; const char * const ipmi_sensor_type_platform_alert[] = { "platform generated page", "platform generated LAN alert", "Platform Event Trap generated, formatted per IPMI PET specification", "platform generated SNMP trap, OEM format", NULL }; unsigned int ipmi_sensor_type_platform_alert_max_index = 0x03; const char * const ipmi_sensor_type_entity_presence[] = { "Entity Present", "Entity Absent", "Entity Disabled", NULL }; unsigned int ipmi_sensor_type_entity_presence_max_index = 0x02; const char * const ipmi_sensor_type_lan[] = { "LAN Heartbeat Lost", "LAN Heartbeat", NULL }; unsigned int ipmi_sensor_type_lan_max_index = 0x01; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_management_subsystem_health[] = { "sensor access degraded or unavailable", "controller access degraded or unavailable", "management controller off-line", "management controller unavailable", "sensor failure", "FRU failure", NULL }; unsigned int ipmi_sensor_type_management_subsystem_health_max_index = 0x05; const char * const ipmi_sensor_type_battery[] = { "battery low (predictive failure)", "battery failed", "battery presence detected", NULL }; unsigned int ipmi_sensor_type_battery_max_index = 0x02; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_session_audit[] = { "Session Activated", "Session Deactivated", "Invalid Username or Password", "Invalid Password Disable", NULL }; unsigned int ipmi_sensor_type_session_audit_max_index = 0x03; const char * const ipmi_sensor_type_version_change[] = { "Hardware change detected with associated Entity", "Firmware or software change detected with associated Entity", "Hardware incompatibility detected with associated Entity", "Firmware or software incompatibility detected with associated Entity", "Entity is of an invalid or unsupported hardware version", "Entity contains an invalid or unsupported firmware or software version", "Hardware Change detected with associated Entity was successful", "Software or F/W Change detected with associated Entity was successful", NULL }; unsigned int ipmi_sensor_type_version_change_max_index = 0x07; const char * const ipmi_sensor_type_fru_state[] = { "FRU Not Installed", "FRU Inactive (in standby or `hot spare' state)", "FRU Activation Requested", "FRU Activation In Progress", "FRU Active", "FRU Deactivation Requested", "FRU Deactivation In Progress", "FRU Communication Lost", NULL }; unsigned int ipmi_sensor_type_fru_state_max_index = 0x07; /*************************************** * Sensor Type Strings (SHORT STRINGS) * ***************************************/ /* achu: these are identical to the above but cleaned up for * situations where "short strings" are better for output. I may have * slightly modified the strings statements too. */ /* achu: 'undock' removed as noted in errata */ const char * const ipmi_sensor_type_physical_security_short[] = { "General Chassis Intrusion", "Drive Bay intrusion", "I/O Card area intrusion", "Processor area intrusion", "LAN Leash Lost", "Unauthorized dock", "FAN area intrusion", NULL }; unsigned int ipmi_sensor_type_physical_security_short_max_index = 0x06; const char * const ipmi_sensor_type_platform_security_violation_attempt_short[] = { "Secure Mode Violation attempt", "Pre-boot Password Violation - user password", "Pre-boot Password Violation - setup password", "Pre-boot Password Violation - network boot password", "Other pre-boot Password Violation", "Out-of-band Access Password Violation", NULL }; unsigned int ipmi_sensor_type_platform_security_violation_attempt_short_max_index = 0x05; const char * const ipmi_sensor_type_processor_short[] = { "IERR", "Thermal Trip", "FRB1/BIST failure", "FRB2/Hang in POST failure", "FRB3/Processor Startup/Initialization failure", "Configuration Error", "SM BIOS `Uncorrectable CPU-complex Error'", "Processor Presence detected", "Processor disabled", "Terminator Presence Detected", "Processor Automatically Throttled", "Machine Check Exception", "Correctable Machine Check Error", NULL }; unsigned int ipmi_sensor_type_processor_short_max_index = 0x0C; const char * const ipmi_sensor_type_power_supply_short[] = { "Presence detected", "Power Supply Failure detected", "Predictive Failure", "Power Supply input lost (AC/DC)", "Power Supply input lost or out-of-range", "Power Supply input out-of-range, but present", "Configuration error", "Power Supply Inactive", NULL }; unsigned int ipmi_sensor_type_power_supply_short_max_index = 0x07; const char * const ipmi_sensor_type_power_unit_short[] = { "Power Off/Power Down", "Power Cycle", "240VA Power Down", "Interlock Power Down", "AC lost/Power input lost", "Soft Power Control Failure", "Power Unit Failure detected", "Predictive Failure", NULL }; unsigned int ipmi_sensor_type_power_unit_short_max_index = 0x07; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_memory_short[] = { "Correctable memory error", "Uncorrectable memory error", "Parity", "Memory Scrub Failed", "Memory Device Disabled", "Correctable memory error logging limit reached", "Presence detected", "Configuration error", "Spare", "Memory Automatically Throttled", "Critical Overtemperature", NULL }; unsigned int ipmi_sensor_type_memory_short_max_index = 0x0A; /* achu: defined in errata */ const char * const ipmi_sensor_type_drive_slot_short[] = { "Drive Presence", "Drive Fault", "Predictive Failure", "Hot Spare", "Consistency Check / Parity Check in progress", "In Critical Array", "In Failed Array", "Rebuild/Remap in progress", "Rebuild/Remap Aborted", NULL }; unsigned int ipmi_sensor_type_drive_slot_short_max_index = 0x08; const char * const ipmi_sensor_type_system_firmware_progress_short[] = { "System Firmware Error", "System Firmware Hang", "System Firmware Progress", NULL }; unsigned int ipmi_sensor_type_system_firmware_progress_short_max_index = 0x02; const char * const ipmi_sensor_type_event_logging_disabled_short[] = { "Correctable Memory Error Logging Disabled", "Event Type Logging Disabled", "Log Area Reset/Cleared", "All Event Logging Disabled", "SEL Full", "SEL Almost Full", "Correctable Machine Check Error Logging Disabled", NULL }; unsigned int ipmi_sensor_type_event_logging_disabled_short_max_index = 0x06; const char * const ipmi_sensor_type_watchdog1_short[] = { "BIOS Watchdog Reset", "OS Watchdog Reset", "OS Watchdog Shut Down", "OS Watchdog Power Down", "OS Watchdog Power Cycle", "OS Watchdog NMI/Diagnostic Interrupt", "OS Watchdog Expired, status only", "OS Watchdog pre-timeout Interrupt, non-NMI", NULL }; unsigned int ipmi_sensor_type_watchdog1_short_max_index = 0x07; const char * const ipmi_sensor_type_system_event_short[] = { "System Reconfigured", "OEM System Boot Event", "Undetermined system hardware failure", "Entry added to Auxiliary Log", "PEF Action", "Timestamp Clock Synch", NULL }; unsigned int ipmi_sensor_type_system_event_short_max_index = 0x05; const char * const ipmi_sensor_type_critical_interrupt_short[] = { "Front Panel NMI/Diagnostic Interrupt", "Bus Timeout", "I/O channel check NMI", "Software NMI", "PCI PERR", "PCI SERR", "EISA Fail Safe Timeout", "Bus Correctable Error", "Bus Uncorrectable Error", "Fatal NMI", "Bus Fatal Error", "Bus Degraded", NULL }; unsigned int ipmi_sensor_type_critical_interrupt_short_max_index = 0x0B; const char * const ipmi_sensor_type_button_switch_short[] = { "Power Button pressed", "Sleep Button pressed", "Reset Button pressed", "FRU latch open", "FRU service request button", NULL }; unsigned int ipmi_sensor_type_button_switch_short_max_index = 0x04; const char * const ipmi_sensor_type_chip_set_short[] = { "Soft Power Control Failure", "Thermal Trip", NULL }; unsigned int ipmi_sensor_type_chip_set_short_max_index = 0x00; const char * const ipmi_sensor_type_cable_interconnect_short[] = { "Cable/Interconnect is connected", "Configuration Error - Incorrect cable connected", NULL }; unsigned int ipmi_sensor_type_cable_interconnect_short_max_index = 0x01; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_system_boot_initiated_short[] = { "Initiated by power up", "Initiated by hard reset", "Initiated by warm reset", "User requested PXE boot", "Automatic boot to diagnostic", "OS / run-time software initiated hard reset", "OS / run-time software initiated warm reset", "System Restart", NULL }; unsigned int ipmi_sensor_type_system_boot_initiated_short_max_index = 0x07; const char * const ipmi_sensor_type_boot_error_short[] = { "No bootable media", "Non-bootable diskette left in drive", "PXE Server not found", "Invalid boot sector", "Timeout waiting for user selection of boot source", NULL }; unsigned int ipmi_sensor_type_boot_error_short_max_index = 0x04; const char * const ipmi_sensor_type_os_boot_short[] = { "A: boot completed", "C: boot completed", "PXE boot completed", "Diagnostic boot completed", "CD-ROM boot completed", "ROM boot completed", "boot completed - boot device not specified", "Base OS/Hypervisor Installation started", "Base OS/Hypervisor Installation completed", "Base OS/Hypervisor Installation aborted", "Base OS/Hypervisor Installation failed", NULL }; unsigned int ipmi_sensor_type_os_boot_short_max_index = 0x0A; /* achu: modified per errata */ const char * const ipmi_sensor_type_os_critical_stop_short[] = { "Critical stop during OS load", "Run-time Critical Stop", "OS Graceful Stop", "OS Graceful Shutdown", "Soft Shutdown initiated by PEF", "Agent Not Responding", NULL }; unsigned int ipmi_sensor_type_os_critical_stop_short_max_index = 0x05; const char * const ipmi_sensor_type_slot_connector_short[] = { "Fault Status asserted", "Identify Status asserted", "Slot/Connector Device installed/attached", "Slot/Connector Ready for Device Installation", "Slot/Connector Ready for Device Removal", "Slot Power is Off", "Slot/Connector Device Removal Request", "Interlock asserted", "Slot is Disabled", "Slot holds spare device", NULL }; unsigned int ipmi_sensor_type_slot_connector_short_max_index = 0x09; const char * const ipmi_sensor_type_acpi_power_state_short[] = { "S0/G0", "S1", "S2", "S3", "S4", "S5/G2", "S4/S5 soft-off", "G3/Mechanical Off", "Sleeping in an S1, S2, or S3 states", "G1 sleeping", "S5 entered by override", "Legacy ON state", "Legacy OFF state", "Unspecified", "Unknown", NULL }; unsigned int ipmi_sensor_type_acpi_power_state_short_max_index = 0x0E; const char * const ipmi_sensor_type_watchdog2_short[] = { "Timer expired, status only", "Hard Reset", "Power Down", "Power Cycle", "reserved", "reserved", "reserved", "reserved", "Timer interrupt", NULL }; unsigned int ipmi_sensor_type_watchdog2_short_max_index = 0x08; const char * const ipmi_sensor_type_platform_alert_short[] = { "platform generated page", "platform generated LAN alert", "Platform Event Trap generated", "platform generated SNMP trap, OEM format", NULL }; unsigned int ipmi_sensor_type_platform_alert_short_max_index = 0x03; const char * const ipmi_sensor_type_entity_presence_short[] = { "Entity Present", "Entity Absent", "Entity Disabled", NULL }; unsigned int ipmi_sensor_type_entity_presence_short_max_index = 0x02; const char * const ipmi_sensor_type_lan_short[] = { "LAN Heartbeat Lost", "LAN Heartbeat", NULL }; unsigned int ipmi_sensor_type_lan_short_max_index = 0x01; /* achu: new additions as stated in errata */ const char * const ipmi_sensor_type_management_subsystem_health_short[] = { "sensor access degraded or unavailable", "controller access degraded or unavailable", "management controller off-line", "management controller unavailable", "sensor failure", "FRU failure", NULL }; unsigned int ipmi_sensor_type_management_subsystem_health_short_max_index = 0x05; const char * const ipmi_sensor_type_battery_short[] = { "battery low", "battery failed", "battery presence detected", NULL }; unsigned int ipmi_sensor_type_battery_short_max_index = 0x02; const char * const ipmi_sensor_type_session_audit_short[] = { "Session Activated", "Session Deactivated", "Invalid Username or Password", "Invalid Password Disable", NULL }; unsigned int ipmi_sensor_type_session_audit_short_max_index = 0x03; const char * const ipmi_sensor_type_version_change_short[] = { "Hardware change detected with associated Entity", "Firmware or software change detected with associated Entity", "Hardware incompatibility detected with associated Entity", "Firmware or software incompatibility detected with associated Entity", "Entity is of an invalid or unsupported hardware version", "Entity contains an invalid or unsupported firmware or software version", "Hardware Change detected with associated Entity was successful", "Software or F/W Change detected with associated Entity was successful", NULL }; unsigned int ipmi_sensor_type_version_change_short_max_index = 0x07; const char * const ipmi_sensor_type_fru_state_short[] = { "FRU Not Installed", "FRU Inactive", "FRU Activation Requested", "FRU Activation In Progress", "FRU Active", "FRU Deactivation Requested", "FRU Deactivation In Progress", "FRU Communication Lost", NULL }; unsigned int ipmi_sensor_type_fru_state_short_max_index = 0x07; /******************************************************* * Sensor Type Strings for Event Data 2 (FULL STRINGS) * *******************************************************/ const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error[] = { "Unspecified", "No system memory is physically installed in the system", "No usable system memory, all installed memory has experienced an unrecoverable failure", "Unrecoverable hard-disk/ATAPI/IDE device failure", "Unrecoverable system-board failure", "Unrecoverable diskette subsystem failure", "Unrecoverable hard-disk controller failure", "Unrecoverable PS/2 or USB keyboard failure", "Removable boot media not found", "Unrecoverable video controller failure", "No video device detected", "Firmware (BIOS) ROM corruption detected", "CPU voltage mismatch (processors that share same supply have mismatched voltage requirements)", "CPU speed matching failure", NULL }; unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error_max_index = 0x0D; const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang[] = { "Unspecified", "Memory initialization", "Hard-disk initialization", "Secondary processor(s) initialization", "User authentication", "User-initiated system setup", "USB resource configuration", "PCI resource configuration", "Option ROM initialization", "Video initialization", "Cache initialization", "SM Bus initialization", "Keyboard controller initialization", "Embedded controller/management controller initialization", "Docking station attachment", "Enabling docking station", "Docking station ejection", "Disabling docking station", "Calling operating system wake-up vector", "Starting operating system boot process, e.g. calling Unsigned Int 19h", "Baseboard or motherboard initialization", "reserved", "Floppy initialization", "Keyboard test", "Pointing device test", "Primary processor initialization", NULL }; unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang_max_index = 0x19; const char * const ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress[] = { "Unspecified", "Memory initialization", "Hard-disk initialization", "Secondary processor(s) initialization", "User authentication", "User-initiated system setup", "USB resource configuration", "PCI resource configuration", "Option ROM initialization", "Video initialization", "Cache initialization", "SM Bus initialization", "Keyboard controller initialization", "Embedded controller/management controller initialization", "Docking station attachment", "Enabling docking station", "Docking station ejection", "Disabling docking station", "Calling operating system wake-up vector", "Starting operating system boot process, e.g. calling Unsigned Int 19h", "Baseboard or motherboard initialization", "reserved", "Floppy initialization", "Keyboard test", "Pointing device test", "Primary processor initialization", NULL }; unsigned int ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress_max_index = 0x19; const char * const ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action[] = { "Log entry action = entry added", "Log entry action = entry added because event did not be map to standard IPMI event", "Log entry action = entry added along with one or more corresponding SEL entries", "Log entry action = log cleared", "Log entry action = log disabled", "Log entry action = log enabled", NULL }; unsigned int ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action_max_index = 0x05; const char * const ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type[] = { "Log Type = MCA log", "Log Type = OEM1", "Log Type = OEM2", NULL }; unsigned int ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type_max_index = 0x02; const char * const ipmi_sensor_type_system_event_event_data2_offset_pef_action[] = { "Alert", "power off", "reset", "power cycle", "OEM action", "Diagnostic Interrupt (NMI)", NULL, }; #if 0 /* Not used */ unsigned int ipmi_sensor_type_system_event_event_data2_offset_pef_action_max_index = 0x05; #endif const char * const ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second[] = { "event is first of pair", "event is second of pair", NULL, }; unsigned int ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second_max_index = 0x01; const char * const ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type[] = { "SEL Timestamp Clock updated (Also used when both SEL and SDR Timestamp clocks are linked together)", "SDR Timestamp Clock updated", NULL, }; unsigned int ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type_max_index = 0x01; const char * const ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure[] = { "Requested power state = S0/G0 \"working\"", "Requested power state = S1 \"sleeping with system h/w & processor context maintained\"", "Requested power state = S2 \"sleeping, processor context lost\"", "Requested power state = S3 \"sleeping, processor & h/w context lost, memory retained.\"", "Requested power state = S4 \"non-volatile sleep/suspend-to disk\"", "Requested power state = S5/G2 \"soft-off\"", "Requested power state = S4/S5 soft-off, particular S4/S5 state cannot be determined", "Requested power state = G3/Mechanical Off", "Requested power state = Sleeping in an S1, S2, or S3 states (used when particular S1, S2, S3 state cannot be determined)", "Requested power state = G1 sleeping (S1-S4 state cannot be determined)", "Requested power state = S5 entered by override", "Requested power state = Legacy ON state", "Requested power state = Legacy OFF state", NULL, }; unsigned int ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure_max_index = 0x0C; const char * const ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause[] = { "unknown", "Chassis Control command", "reset via pushbutton", "power-up via power pushbutton", "Watchdog expiration", "OEM", "automatic power-up on AC being applied due to 'always restore' power restore policy", "automatic power-up on AC being applied due to 'restore previous power state' power restore policy", "reset via PEF", "power-cycle via PEF", "soft reset (e.g. CTRL-ALT-DEL)", "power-up via RTC (system real time clock) wakeup", NULL }; unsigned int ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause_max_index = 0x0B; const char * const ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type[] = { "Slot/Connector Type = PCI", "Slot/Connector Type = Drive Array", "Slot/Connector Type = External Peripheral Connector", "Slot/Connector Type = Docking", "Slot/Connector Type = other standard internal expansion slot", "Slot/Connector Type = slot associated with entity specified by Entity ID for sensor", "Slot/Connector Type = AdvancedTCA", "Slot/Connector Type = DIMM/memory device", "Slot/Connector Type = FAN", "Slot/Connector Type = PCI Express", "Slot/Connector Type = SCSI (parallel)", "Slot/Connector Type = SATA / SAS", "Slot/Connector Type = USB", NULL }; unsigned int ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type_max_index = 0x0C; const char * const ipmi_sensor_type_watchdog2_event_data2_interrupt_type[] = { "Interrupt type = none", "Interrupt type = SMI", "Interrupt type = NMI", "Interrupt type = Messaging Interrupt", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Interrupt type = unspecified", NULL, }; unsigned int ipmi_sensor_type_watchdog2_event_data2_interrupt_type_max_index = 0x0F; const char * const ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration[] = { "reserved", "Timer use at expiration = BIOS FRB2", "Timer use at expiration = BIOS/POST", "Timer use at expiration = OS Load", "Timer use at expiration = SMS/OS", "Timer use at expiration = OEM", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Timer use at expiration = unspecified", NULL }; unsigned int ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration_max_index = 0x0F; const char * const ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device[] = { "device is not a logical FRU Device", "device is logical FRU Device (accessed via FRU commands to mgmt. controller", NULL }; unsigned int ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device_max_index = 0x01; const char * const ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type[] = { "Version change type = unspecified", "Version change type = management controller device ID (change in one or more fields from `Get Device ID')", "Version change type = management controller firmware revision", "Version change type = management controller device revision", "Version change type = management controller manufacturer ID", "Version change type = management controller IPMI version", "Version change type = management controller auxiliary firmware ID", "Version change type = management controller firmware boot block", "Version change type = other management controller firmware", "Version change type = system firmware (EFI/BIOS) change", "Version change type = SMBIOS change", "Version change type = operating system change", "Version change type = operating system loader change", "Version change type = service or diagnostic partition change", "Version change type = management software agent change", "Version change type = management software application change", "Version change type = management software middleware change", "Version change type = programmable hardware change (e.g. FPGA)", "Version change type = board/FRU module change (change of a module plugged into associated entity)", "Version change type = board/FRU component change (addition or removal of a replaceable component on the board/FRU that is not tracked as a FRU)", "Version change type = board/FRU replaced with equivalent version", "Version change type = board/FRU replaced with newer version", "Version change type = board/FRU replaced with older version", "Version change type = board/FRU hardware configuration change (e.g. strap, jumper, cable change, etc.)", NULL }; unsigned int ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type_max_index = 0x17; const char * const ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change[] = { "Cause of state change = Normal State Change", "Cause of state change = Change Commanded by software external to FRU", "Cause of state change = State Change due to operator changing a Handle latch", "Cause of state change = State Change due to operator pressing the hotswap push button", "Cause of state change = State Change due to FRU programmatic action", "Cause of state change = Communication Lost", "Cause of state change = Communication Lost due to local failure", "Cause of state change = State Change due to unexpected extraction", "Cause of state change = State Change due to operator intervention/update", "Cause of state change = Unable to compute IPMB address", "Cause of state change = Unexpected Deactivation", "reserved", "reserved", "reserved", "reserved", "Cause of state change = State Change, Cause Unknown", NULL }; unsigned int ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change_max_index = 0x0F; /******************************************************* * Sensor Type Strings for Event Data 3 (FULL STRINGS) * *******************************************************/ const char * const ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type[] = { "Vendor mismatch", "Revision mismatch", "Processor missing or unexpected/unsupported condition", "Power Supply rating mismatch", "Voltage rating mismatch", NULL }; unsigned int ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type_max_index = 0x04; const char * const ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event[] = { "deassertion event", "assertion event", NULL }; unsigned int ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event_max_index = 0x01; const char * const ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events[] = { "", "logging has been disabled for all events of given type", NULL }; unsigned int ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events_max_index = 0x01; const char * const ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure[] = { "Power state at time of request = S0/G0 \"working\"", "Power state at time of request = S1 \"sleeping with system h/w & processor context maintained\"", "Power state at time of request = S2 \"sleeping, processor context lost\"", "Power state at time of request = S3 \"sleeping, processor & h/w context lost, memory retained.\"", "Power state at time of request = S4 \"non-volatile sleep/suspend-to disk\"", "Power state at time of request = S5/G2 \"soft-off\"", "Power state at time of request = S4/S5 soft-off, particular S4/S5 state cannot be determined", "Power state at time of request = G3/Mechanical Off", "Power state at time of request = Sleeping in an S1, S2, or S3 states (used when particular S1, S2, S3 state cannot be determined)", "Power state at time of request = G1 sleeping (S1-S4 state cannot be determined)", "Power state at time of request = S5 entered by override", "Power state at time of request = Legacy ON state", "Power state at time of request = Legacy OFF state", "Power state at time of request = unknown", NULL }; unsigned int ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure_max_index = 0x0D; const char * const ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause[] = { "Session deactivatation cause unspecified. This value is also used for Session Activated events", "Session deactivated by Close Session command", "Session deactivated by timeout", "Session deactivated by configuration change", NULL }; unsigned int ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause_max_index = 0x03; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c0000644002055400205540000000676413527331637027616 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ const char * const ipmi_generic_event_reading_type_code_oem_dell_status[] = { "Absent", "Standby", "IPMI Function ready", "Fully ready", "Offline", "Failed", "Active", "Booting", "Write protected", NULL }; unsigned int ipmi_generic_event_reading_type_code_oem_dell_status_max_index = 0x08; /* * Dell Poweredge R720 */ const char * const ipmi_generic_event_reading_type_code_oem_dell_failure[] = { "undocumented", /* not known yet */ "undocumented", /* not known yet */ "undocumented", /* not known yet */ "Memory failed to transition to Online", NULL }; unsigned int ipmi_generic_event_reading_type_code_oem_dell_failure_max_index = 0x03; /* achu: * * I have a feeling "good" is the random string they choose in some * code, it's not the real string. But that's all I got to go on. * */ const char * const ipmi_sensor_type_oem_dell_system_performance_degradation_status[] = { "Good", "Degraded, other", "Degraded, thermal protection", "Degraded, cooling capacity change", "Degraded, power capacity change", "Degraded, user defined power capacity", "Halted, system power exceeds capacity", "Degraded, system power exceeds capacity", NULL }; unsigned int ipmi_sensor_type_oem_dell_system_performance_degradation_status_max_index = 0x07; const char * const ipmi_sensor_type_oem_dell_link_tuning[] = { "Good", "Failed to program virtual MAC address", "Device option ROM failed to support link tuning or flex address", "Failed to get link tuning or flex address data", NULL }; unsigned int ipmi_sensor_type_oem_dell_link_tuning_max_index = 0x03; const char * const ipmi_sensor_type_oem_dell_non_fatal_error[] = { "PCIe error", "undocumented", /* not known yet */ "QPI Link Degrade", }; unsigned int ipmi_sensor_type_oem_dell_non_fatal_error_max_index = 0x02; const char * const ipmi_sensor_type_oem_dell_fatal_io_error[] = { "Successful", "Fatal IO error", NULL }; unsigned int ipmi_sensor_type_oem_dell_fatal_io_error_max_index = 0x01; const char * const ipmi_sensor_type_oem_dell_upgrade[] = { "Successful", "Failed", NULL }; unsigned int ipmi_sensor_type_oem_dell_upgrade_max_index = 0x01; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c0000644002055400205540000002006713527331637030357 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * Fuijitsu */ /* * iRMC S1 / iRMC S2 */ /* 0xC0 / IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS */ const char * const ipmi_sensor_type_oem_fujitsu_i2c_bus[] = { /* EN 0x00 */ "I2C Bus Error", /* EN 0x01 */ "I2C Bus OK", /* EN 0x02 */ "I2C Bus Disabled", /* EN 0x03 */ "I2C Bus Failed", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_i2c_bus_max_index = 0x03; /* 0xDD / IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION */ const char * const ipmi_sensor_type_oem_fujitsu_system_power_consumption[] = { /* EN 0x00 */ "System Power Consumption within Limit", /* EN 0x01 */ "System Power Consumption above Warning Level", /* EN 0x02 */ "System Power Consumption above Critical Level", /* EN 0x03 */ "System Power Consumption limiting disabled", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_system_power_consumption_max_index = 0x03; /* 0xDE / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS */ const char * const ipmi_sensor_type_oem_fujitsu_memory_status[] = { /* EN 0x00 */ "Empty slot", /* EN 0x01 */ "OK", /* EN 0x02 */ "Reserved", /* EN 0x03 */ "Error", /* EN 0x04 */ "Fail", /* EN 0x05 */ "Prefailure", /* EN 0x06 */ "Reserved", /* EN 0x07 */ "Unknown", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_memory_status_max_index = 0x07; /* 0xDF / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG */ const char * const ipmi_sensor_type_oem_fujitsu_memory_config[] = { /* EN 0x00 */ "Normal", /* EN 0x01 */ "Disabled", /* EN 0x02 */ "Spare module", /* EN 0x03 */ "Mirrored module", /* EN 0x04 */ "RAID module", /* EN 0x05 */ "Not Usable", /* EN 0x06 */ "Unspecified state(6)", /* EN 0x07 */ "Unspecified state(7)", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_memory_config_max_index = 0x07; /* 0xE1 / IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY */ const char * const ipmi_sensor_type_oem_fujitsu_memory[] = { /* EN 0x00 */ "Non Fujitsu memory module detected", /* EN 0x01 */ "Memory module replaced", /* EN 0x02 */ "Fatal general memory error", /* EN 0x03 */ "Recoverable general memory error", /* EN 0x04 */ "Recoverable ECC memory error", /* EN 0x05 */ "Recoverable CRC memory error", /* EN 0x06 */ "Fatal CRC memory error", /* EN 0x07 */ "Recoverable thermal memory event", /* EN 0x08 */ "Fatal thermal memory error", /* EN 0x09 */ "Too many correctable memory errors", /* EN 0x0A */ "Uncorrectable Parity memory error", /* EN 0x0B */ "Memory Modules swapped", /* EN 0x0C */ "Memory Module moved", /* EN 0x0D */ "Memory removed", /* EN 0x0E */ "Memory Re-inserted", /* EN 0x0F */ "Memory module(s) changed", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_memory_max_index = 0x0F; /* 0xE3 / IPMI_SENSOR_TYPE_OEM_FUJITSU_HW_ERROR */ const char * const ipmi_sensor_type_oem_fujitsu_hw_error[] = { /* EN 0x00 */ "TPM Error", /* EN 0x01 */ "Reserved", /* EN 0x02 */ "No usable CPU", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_hw_error_max_index = 0x02; /* 0xE4 / IPMI_SENSOR_TYPE_OEM_FUJITSU_SYS_ERROR */ const char * const ipmi_sensor_type_oem_fujitsu_sys_error[] = { /* EN 0x00 */ "System configuration Data error", /* EN 0x01 */ "Resource Conflict", /* Slot in EventData3 */ /* EN 0x02 */ "IRQ not configured", /* Slot in EventData3 */ /* EN 0x03 */ "Device node allocation error", /* Device in EventData3 */ /* EN 0x04 */ "Expansion ROM Slot not initialized", /* Slot in EventData3 */ NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_sys_error_max_index = 0x04; /* 0xE6 / IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS */ const char * const ipmi_sensor_type_oem_fujitsu_fan_status[] = { /* EN 0x00 */ "FAN on, running", /* EN 0x01 */ "FAN failed", /* EN 0x02 */ "FAN prefailure", /* EN 0x03 */ "Redundant FAN failed", /* EN 0x04 */ "FAN not manageable", /* EN 0x05 */ "FAN not installed", /* EN 0x06 */ "FAN unspecified state(6)", /* EN 0x07 */ "FAN in init phase", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_fan_status_max_index = 0x07; /* 0xE8 / IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS */ const char * const ipmi_sensor_type_oem_fujitsu_psu_status[] = { /* EN 0x00 */ "Power supply - Not present", /* EN 0x01 */ "Power supply - OK", /* EN 0x02 */ "Power supply - Failed", /* EN 0x03 */ "Redundant power supply - AC failed", /* EN 0x04 */ "Redundant power supply - DC failed", /* EN 0x05 */ "Power supply - Critical Temperature", /* EN 0x06 */ "Power supply - Not manageable", /* EN 0x07 */ "Power supply - Fan failure predicted", /* EN 0x08 */ "Power supply - Fan failed", /* EN 0x09 */ "Power supply - Power Save Mode", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_psu_status_max_index = 0x09; /* 0xE9 / IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY */ const char * const ipmi_sensor_type_oem_fujitsu_psu_redundancy[] = { /* EN 0x00 */ "Power Supply - redundancy present", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_psu_redundancy_max_index = 0x00; /* 0xEC / IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH */ const char * const ipmi_sensor_type_oem_fujitsu_flash[] = { /* EN 0x00 */ "Online firmware flash", /* EN 0x01 */ "Online firmware flash: reboot", /* EN 0x02 */ "BIOS TFTP Flash: OK", /* EN 0x03 */ "BIOS TFTP Flash: failed", /* EN 0x04 */ "iRMC TFTP Flash: OK", /* EN 0x05 */ "iRMC TFTP Flash: failed", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_flash_max_index = 0x05; /* 0xEF / IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP */ const char * const ipmi_sensor_type_oem_fujitsu_config_backup[] = { /* EN 0x00 */ "Chassis IDPROM: Motherboard Exchange detected", /* EN 0x01 */ "Chassis IDPROM: Read or Write error", /* EN 0x02 */ "Chassis IDPROM: Restore successful", /* EN 0x03 */ "Chassis IDPROM: Restore failed", /* EN 0x04 */ "Chassis IDPROM: Backup successful", /* EN 0x05 */ "Chassis IDPROM: Backup failed", /* EN 0x06 */ "Chassis IDPROM: Feature disabled", /* EN 0x07 */ "Chassis IDPROM: Function Not Available", /* EN 0x08 */ "Reserved", /* EN 0x09 */ "Reserved", /* EN 0x0A */ "Reserved", /* EN 0x0B */ "Reserved", /* EN 0x0C */ "Reserved", /* EN 0x0D */ "Reserved", /* EN 0x0E */ "Reserved", /* EN 0x0F */ "NVRAM defaults loaded", NULL }; unsigned int ipmi_sensor_type_oem_fujitsu_config_backup_max_index = 0x0F; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c0000644002055400205540000000271413527331637027274 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-hp-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * HP Proliant DL160 G8 */ const char * const ipmi_oem_hp_uid_light[] = { "on", "off", "blinking", }; unsigned int ipmi_oem_hp_uid_light_max_index = 0x02; const char * const ipmi_oem_hp_health_led[] = { "green", "amber", "red", }; unsigned int ipmi_oem_hp_health_led_max_index = 0x02; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c0000644002055400205540000003617113527331637030004 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * Intel S5500WB/Penguin Computing Relion 700 */ const char * const ipmi_oem_intel_specific_pci_fatal_sensor[] = { "Data Link Layer Protocol Error", "Surprise Link Down", "Unexpected Completion", "Received Unsupported request condition on inbound address decode with exception of SAD", "Poisoned TLP Error", "Flow Control Protocol Error", "Completion Timeout Error", "Completer Abort Error", "Receiver Buffer Overflow Error", "ACS Violation Error", "Malformed TLP Error", "Received ERR_FATAL Message From Downstream Error", "Unexpected Completion", /* not a typo, identical to above */ "Received ERR_NONFATAL Message Error", NULL }; unsigned int ipmi_oem_intel_specific_pci_fatal_sensor_max_index = 0x0D; const char * const ipmi_oem_intel_specific_pci_correctable_sensor[] = { "Receiver Error", "Bad DLLP Error", "Bad TLLP Error", "REPLAY_NUM Rollover Error", "REPLAY Timer Timeout Error", "Advisory Non-fatal Error (Received ERR_COR message)", "Link Bandwidth Changed (ECN) Error", NULL }; unsigned int ipmi_oem_intel_specific_pci_correctable_sensor_max_index = 0x06; /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ /* achu: Similar to above, but some events text changed, so new arrays to differentiate */ const char * const ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor[] = { "Data Link Layer Protocol Error", "Surprise Link Down", "Unexpected Completer", "Received Unsupported request condition on inbound address decode with exception of SAD", "Poisoned TLP Error", "Flow Control Protocol Error", "Completion Timeout Error", "Completer Abort Error", "Receiver Buffer Overflow Error", "ACS Violation Error", "Malformed TLP Error", "Received ERR_FATAL Message From Downstream Error", "Unexpected Completion Error", "Received ERR_NONFATAL Message Error", NULL }; unsigned int ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor_max_index = 0x0D; const char * const ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor[] = { "Receiver Error", "Bad DLLP Error", "Bad TLLP Error", "REPLAY_NUM Rollover Error", "REPLAY Timer Timeout Error", "Advisory Non-fatal Error (Received ERR_COR message)", "Link Bandwidth Changed (ECN) Error", NULL }; unsigned int ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor_max_index = 0x06; /* * Intel S2600JF/Appro 512X */ /* achu: Similar to above, but some events text changed and new ones, * so new arrays to differentiate */ const char * const ipmi_oem_intel_s2600jf_specific_pci_fatal_error[] = { "Data Link Layer Protocol Error", "Surprise Link Down Error", "Completer Abort", "Unsupported Request", "Poisoned TLP", "Flow Control Protocol", "Completion Timeout", "Receiver Buffer Overflow", "ACS Violation Error", "Malformed TLP Error", "ECRC Error", "Received Fatal Message From Downstream", "Unexpected Completion", "Received ERR_NONFATAL Message", "Uncorrectable Internal", "MC Blocked TLP", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_pci_fatal_error_max_index = 0x0F; const char * const ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2[] = { "Atomic Egress Blocked", "TLP Prefix Blocked", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Unspecified Non-AER Fatal Error", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2_max_index = 0x0F; const char * const ipmi_oem_intel_s2600jf_specific_pci_correctable_error[] = { "Receiver Error", "Bad DLLP", "Bad TLP", "Replay Num Rollover", "Replay Timer timeout", "Advisory Non-fatal", "Link BW Changed", "Correctable Internal", "Header Log Overflow", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_pci_correctable_error_max_index = 0x08; const char * const ipmi_oem_intel_s2600jf_specific_opi_fatal_error[] = { "Link Layer Uncorrectable ECC Error", "Protocol Layer Poisoned Packet Reception Error", "LINK/PHY Init Failure with resultant degradation in link width", "CSI PHY Layer detected drift buffer alarm", "CSI PHY detected latency buffer rollover", "CSI PHY Init Failure", "CSI Link Layer generic control error (buffer overflow/underflow, credit underflow and so on.)", "Parity error in link or PHY layer", "Protocol layer timeout detected", "Protocol layer failed response", "Protocol layer illegal packet field, target Node ID and so on.", "Protocol Layer Queue/table overflow/underflow", "Viral Error", "Protocol Layer parity error", "Routing Table Error", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_opi_fatal_error_max_index = 0x0E; #if 0 /* achu: Intel informed me there was an error in their documentation and the following was not correct. * I'll leave this here for legacy documentation */ const char * const ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2[] = { "Illegal inbound request", "PCH Write Cache Uncorrectable Data ECC Error", "PCH Write Cache Uncorrectable Data ECC Error", /* same not typo, typo in spec? */ "PCH Write Cache Uncorrectable Data ECC Error", /* same not typo, typo in spec? */ "PCH Received XPF physical/logical redirect interrupt inbound", "PCH Illegal SAD or Illegal or non-existent address or memory", "PCH Write Cache Coherency Violation", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2_max_index = 0x06; #else /* !0 */ const char * const ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2[] = { "Illegal inbound request", "IIO Write Cache Uncorrectable Data ECC Error", "IIO CSR crossing 32-bit boundary Error", "IIO Received XPF physical/logical redirect interrupt inbound", "IIO Illegal SAD or Illegal or non-existent address or memory", "IIO Write Cache Coherency Violation", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2_max_index = 0x05; #endif /* !0 */ const char * const ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced[] = { "reserved", "Reduced to 1/2 width", "Reduced to 1/4 width", NULL }; unsigned int ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced_max_index = 0x02; /* * Intel S2600WP */ /* achu: Similar to above, but some events text changed and new ones, * so new arrays to differentiate */ const char * const ipmi_oem_intel_s2600wp_specific_pcie_fatal_error[] = { "Data Link Layer Protocol Error", "Surprise Link Down Error", "Completer Abort", "Unsupported Request", "Poisoned TLP", "Flow Control Protocol", "Completion Timeout", "Receiver Buffer Overflow", "ACS Violation Error", "Malformed TLP Error", "ECRC Error", "Received Fatal Message From Downstream", "Unexpected Completion", "Received ERR_NONFATAL Message", "Uncorrectable Internal", "MC Blocked TLP", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_max_index = 0x0F; const char * const ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2[] = { "Atomic Egress Blocked", "TLP Prefix Blocked", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Unspecified Non-AER Fatal Error", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2_max_index = 0x0F; const char * const ipmi_oem_intel_s2600wp_specific_pcie_correctable_error[] = { "Receiver Error", "Bad DLLP", "Bad TLP", "Replay Num Rollover", "Replay Timer timeout", "Advisory Non-fatal", "Link BW Changed", "Correctable Internal", "Header Log Overflow", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_pcie_correctable_error_max_index = 0x08; const char * const ipmi_oem_intel_s2600wp_specific_qpi_fatal_error[] = { "Link Layer Uncorrectable ECC Error", "Protocol Layer Poisoned Packet Reception Error", "LINK/PHY Init Failure with resultant degradation in link width", "CSI PHY Layer detected drift buffer alarm", "CSI PHY detected latency buffer rollover", "CSI PHY Init Failure", "CSI Link Layer generic control error (buffer overflow/underflow, credit underflow and so on.)", "Parity error in link or PHY layer", "Protocol layer timeout detected", "Protocol layer failed response", "Protocol layer illegal packet field, target Node ID and so on.", "Protocol Layer Queue/table overflow/underflow", "Viral Error", "Protocol Layer parity error", "Routing Table Error", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_max_index = 0x0E; const char * const ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2[] = { "Illegal inbound request", "IIO Write Cache Uncorrectable Data ECC Error", "IIO CSR crossing 32-bit boundary Error", "IIO Received XPF physical/logical redirect interrupt inbound", "IIO Illegal SAD or Illegal or non-existent address or memory", "IIO Write Cache Coherency Violation", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2_max_index = 0x05; const char * const ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced[] = { "reserved", "Reduced to 1/2 width", "Reduced to 1/4 width", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced_max_index = 0x02; const char * const ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor[] = { "Update started", "Update completed successfully", "Update failure", NULL }; unsigned int ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor_max_index = 0x02; /* * Intel S2600KP * Intel S2600WT2 * Intel S2600WTT * Intel S2600GZ */ const char * const ipmi_oem_intel_e52600v3_specific_qpi_fatal_error[] = { "Link Layer Uncorrectable ECC Error", "Protocol Layer Poisoned Packet Reception Error", "LINK/PHY Init Failure with resultant degradation in link width", "PHY Layer detected drift buffer alarm", "PHY detected latency buffer rollover", "PHY Init Failure", "Link Layer generic control error (buffer overflow/underflow, credit underflow, and so on.)", "Parity error in link or PHY layer", "Protocol layer timeout detected", "Protocol layer failed response", "Protocol layer illegal packet field, target Node ID, and so on.", "Protocol Layer Queue/table overflow/underflow", "Viral Error", "Protocol Layer parity error", "Routing Table Error", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_max_index = 0x0E; const char * const ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2[] = { "Illegal inbound request", "IIO Write Cache Uncorrectable Data ECC Error", "IIO CSR crossing 32-bit boundary Error", "IIO Received XPF physical/logical redirect interrupt inbound", "IIO Illegal SAD or Illegal or non-existent address or memory", "IIO Write Cache Coherency Violation", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2_max_index = 0x05; const char * const ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced[] = { "reserved", "Reduced to 1/2 width", "Reduced to 1/4 width", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced_max_index = 0x02; const char * const ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors[] = { "Data Link Layer Protocol Error", "Surprise Link Down Error", "Completer Abort", "Unsupported Request", "Poisoned TLP", "Flow Control Protocol", "Completion Timeout", "Receiver Buffer Overflow", "ACS Violation", "Malformed TLP", "ECRC Error", "Received Fatal Message From Downstream", "Unexpected Completion", "Received ERR_NONFATAL Message", "Uncorrectable Internal", "MC Blocked TLP", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_max_index = 0x0F; const char * const ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2[] = { "Atomic Egress Blocked", "TLP Prefix Blocked", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "Unspecified Non-AER Fatal Error", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2_max_index = 0x0F; const char * const ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors[] = { "Receiver Error", "Bad DLLP", "Bad TLP", "Replay Num Rollover", "Replay Timer timeout", "Advisory Non-fatal", "Link BW Changed", "Correctable Internal", "Header Log Overflow", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors_max_index = 0x08; const char * const ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor[] = { "Update started", "Update completed successfully", "Update failure", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor_max_index = 0x02; const char * const ipmi_oem_intel_e52600v3_specific_bios_recovery_start[] = { "reserved", "BIOS Recovery Start", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_bios_recovery_start_max_index = 0x01; const char * const ipmi_oem_intel_e52600v3_specific_bios_recovery_finish[] = { "reserved", "BIOS Recovery Finish", NULL }; unsigned int ipmi_oem_intel_e52600v3_specific_bios_recovery_finish_max_index = 0x01; const char * const ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info[] = { "reserved", "Dump failed", NULL, }; unsigned int ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info_max_index = 0x01; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c0000644002055400205540000000300313527331637030362 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-wistron-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * Wistron / Dell Poweredge C6220 */ const char * const ipmi_sensor_type_oem_wistron_ioh_core_error[] = { "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "reserved", "core", "non-fatal", "reserved", "fatal", NULL }; unsigned int ipmi_sensor_type_oem_wistron_ioh_core_error_max_index = 0x0A; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-types-spec.c0000644002055400205540000000370413527331637023214 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi-portability.h" const char *const ipmi_sensor_types[] = { "Reserved", "Temperature", "Voltage", "Current", "Fan", "Physical Security", "Platform Security Violation Attempt", "Processor", "Power Supply", "Power Unit", "Cooling Device", "Other Units Based Sensor", "Memory", "Drive Slot", "POST Memory Resize", "System Firmware Progress", "Event Logging Disabled", "Watchdog 1", "System Event", "Critical Interrupt", "Button/Switch", "Module/Board", "Microcontroller/Coprocessor", "Add In Card", "Chassis", "Chip Set", "Other Fru", "Cable/Interconnect", "Terminator", "System Boot Initiated", "Boot Error", "OS Boot", "OS Critical Stop", "Slot/Connector", "System ACPI Power State", "Watchdog 2", "Platform Alert", "Entity Presence", "Monitor ASIC/IC", "LAN", "Management Subsystem Health", "Battery", "Session Audit", "Version Change", "FRU State", NULL }; const char *const ipmi_oem_sensor_type = "OEM Reserved"; freeipmi-1.6.4/libfreeipmi/spec/ipmi-sensor-units-spec.c0000644002055400205540000000720113527331637023206 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/spec/ipmi-sensor-units-spec.h" #include "freeipmi-portability.h" const char *const ipmi_sensor_units[] = { "unspecified", "degrees C", "degrees F", "degrees K", "Volts", "Amps", "Watts", "Joules", "Coulombs", "VA", "Nits", "Lumen", "Lux", "Candela", "kPA", "PSI", "Newton", "CFM", "RPM", "Hz", "microsecond", "millisecond", "second", "minute", "hour", "day", "week", "mil", "inches", "feet", "cu in", "cu feet", "mm", "cm", "m", "cu cm", "cu m", "liters", "fluid Ounce", "radians", "steradians", "revolutions", "cycles", "gravities", "ounce", "pound", "ft-lb", "oz-in", "gauss", "gilberts", "henry", "millihenry", "farad", "microfarad", "ohms", "siemens", "mole", "becquerel", "PPM", "reserved", "Decibels", "DbA", "DbC", "gray", "sievert", "color temp deg K", "bit", "kilobit", "megabit", "gigabit", "byte", "kilobyte", "megabyte", "gigabyte", "word", "dword", "qword", "line", "hit", "miss", "retry", "reset", "overrun / overflow", "underrun", "collision", "packets", "messages", "characters", "error", "correctable Error", "uncorrectable Error", "fatal Error", "grams", NULL }; const char *const ipmi_sensor_units_abbreviated[] = { "unspecified", "C", "F", "K", "V", "A", "W", "J", "C", "VA", "nits", /* ? */ "lm", "lux", "cd", "KPA", "PSI", "N", "CFM", "RPM", "Hz", "us", "ms", "s", "min", "hr", "day", "wk", "mil", "in", "ft", "cu in", "cu feet", "mm", "cm", "m", "cu cm", "cu m", "L", "fl oz", "rad", "sr", "rev", "c", "g", "oz", "lb", "ft lB", "oz in", "G", "Gi", "H", "mH", "F", "uF", "ohms", /* no abbreviation? only symbol? */ "S", "mol", "Bq", "PPM", "Reserved", "dB", "DbA", "DbC", "Gy", "Sv", "color temp deg K", /* ??? */ "b", "Kb", "Mb", "Gb", "B", "KB", "MB", "GB", "word", "dword", "qword", "line", "hit", "miss", "retry", "reset", "overrun / overflow", "underrun", "collision", "pkts", "msgs", "chars", "err", "correctable err", "uncorrectable err", "fatal err", "g", NULL }; const char *const ipmi_sensor_rate_units[] = { "none", "per uS", "per ms", "per s", "per minute", "per hour", "per day", NULL, }; freeipmi-1.6.4/libfreeipmi/util/0000755002055400205540000000000013527342543016526 5ustar00achuachu00000000000000freeipmi-1.6.4/libfreeipmi/util/ipmi-channel-util.c0000644002055400205540000001663213527331637022223 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/util/ipmi-channel-util.h" #include "freeipmi/api/ipmi-device-global-cmds-api.h" #include "freeipmi/api/ipmi-messaging-support-cmds-api.h" #include "freeipmi/cmds/ipmi-device-global-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-channel-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "api/ipmi-api-defs.h" #include "api/ipmi-api-trace.h" #include "api/ipmi-api-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_NUM_CHANNELS 12 static int _get_channel_numbers (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t channels[IPMI_NUM_CHANNELS], unsigned int *channels_found) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; uint64_t val; int i; assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); assert (channels_found); (*channels_found) = 0; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_info_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } /* Channel numbers range from 0 - 11 */ for (i = 0; i < IPMI_NUM_CHANNELS; i++) { uint8_t channel_medium_type_read; if (ipmi_cmd_get_channel_info (ctx, i, obj_cmd_rs) < 0) continue; if (FIID_OBJ_GET (obj_cmd_rs, "channel_medium_type", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } channel_medium_type_read = val; if (channel_medium_type_read == channel_medium_type) { uint8_t actual_channel_number; if (FIID_OBJ_GET (obj_cmd_rs, "actual_channel_number", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } actual_channel_number = val; rv = 0; channels[(*channels_found)] = actual_channel_number; (*channels_found)++; } } if (rv < 0) API_SET_ERRNUM (ctx, IPMI_ERR_NOT_FOUND); cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* returns 1 if special case handled, 0 if not, -1 on error */ static int _get_channel_number_special (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t *channel_number) { fiid_obj_t obj_cmd_rs = NULL; uint32_t manufacturer_id; uint16_t product_id; uint64_t val; int rv = -1; assert (ctx); assert (ctx->magic == IPMI_CTX_MAGIC); if (channel_medium_type == IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3) { if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_device_id_rs))) { API_ERRNO_TO_API_ERRNUM (ctx, errno); goto cleanup; } if (ipmi_cmd_get_device_id (ctx, obj_cmd_rs) < 0) goto cleanup; if (FIID_OBJ_GET (obj_cmd_rs, "manufacturer_id.id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } manufacturer_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "product_id", &val) < 0) { API_FIID_OBJECT_ERROR_TO_API_ERRNUM (ctx, obj_cmd_rs); goto cleanup; } product_id = val; switch (manufacturer_id) { case IPMI_IANA_ENTERPRISE_ID_INTEL: case 0xB000157: /* Intel */ switch (product_id) { case 0x1B: rv = 1; (*channel_number) = 7; goto cleanup; } } } if (rv < 0) rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_get_channel_number (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t *channel_number) { uint8_t channels[IPMI_NUM_CHANNELS]; unsigned int channels_found = 0; uint8_t special_channel_number = 0; int rv = -1; int ret; /* XXX channel medium type check? - OEM channels 0-0xFF possible, so skip */ if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!channel_number) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if ((ret = _get_channel_number_special (ctx, channel_medium_type, &special_channel_number)) < 0) goto cleanup; if (ret) { rv = 0; (*channel_number) = special_channel_number; goto cleanup; } if (_get_channel_numbers (ctx, channel_medium_type, channels, &channels_found) < 0) goto cleanup; if (!channels_found) { API_SET_ERRNUM (ctx, IPMI_ERR_NOT_FOUND); goto cleanup; } rv = 0; (*channel_number) = channels[0]; cleanup: return (rv); } int ipmi_get_channel_numbers (ipmi_ctx_t ctx, uint8_t channel_medium_type, uint8_t *channel_numbers, unsigned int channel_numbers_len) { uint8_t channels[IPMI_NUM_CHANNELS]; unsigned int channels_found = 0; uint8_t special_channel_number = 0; int rv = -1; int ret; /* XXX channel medium type check? - OEM channels 0-0xFF possible, so skip */ if (!ctx || ctx->magic != IPMI_CTX_MAGIC) { ERR_TRACE (ipmi_ctx_errormsg (ctx), ipmi_ctx_errnum (ctx)); return (-1); } if (!channel_numbers || !channel_numbers_len) { API_SET_ERRNUM (ctx, IPMI_ERR_PARAMETERS); return (-1); } if ((ret = _get_channel_number_special (ctx, channel_medium_type, &special_channel_number)) < 0) goto cleanup; if (ret) { rv = 1; channel_numbers[0] = special_channel_number; goto cleanup; } if (_get_channel_numbers (ctx, channel_medium_type, channels, &channels_found) < 0) goto cleanup; if (!channels_found) { API_SET_ERRNUM (ctx, IPMI_ERR_NOT_FOUND); goto cleanup; } if (channels_found > channel_numbers_len) channels_found = channel_numbers_len; rv = (int)channels_found; memcpy (channel_numbers, channels, channels_found); cleanup: return (rv); } freeipmi-1.6.4/libfreeipmi/util/ipmi-cipher-suite-util.c0000644002055400205540000001706713527331637023217 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include "freeipmi/util/ipmi-cipher-suite-util.h" #include "freeipmi/record-format/ipmi-cipher-suite-record-format.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" int ipmi_cipher_suite_id_to_algorithms (uint8_t cipher_suite_id, uint8_t *authentication_algorithm, uint8_t *integrity_algorithm, uint8_t *confidentiality_algorithm) { uint8_t a, i, c; /* To avoid gcc warnings, add +1 to comparison */ if (!((cipher_suite_id + 1) >= 1 && cipher_suite_id <= 19)) { SET_ERRNO (EINVAL); return (-1); } if (cipher_suite_id == 0) a = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; else if (cipher_suite_id >= 1 && cipher_suite_id <= 5) a = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1; else if (cipher_suite_id >= 6 && cipher_suite_id <= 14) a = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5; else /* cipher_suite_id >= 15 && cipher_suite_id <= 19 */ a = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256; if (cipher_suite_id == 0 || cipher_suite_id == 1 || cipher_suite_id == 6 || cipher_suite_id == 15) i = IPMI_INTEGRITY_ALGORITHM_NONE; else if (cipher_suite_id >= 2 && cipher_suite_id <= 5) i = IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96; else if (cipher_suite_id >= 7 && cipher_suite_id <= 10) i = IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128; else if (cipher_suite_id >= 11 && cipher_suite_id <= 14) i = IPMI_INTEGRITY_ALGORITHM_MD5_128; else /* cipher_suite_id >= 16 && cipher_suite_id <= 19 */ i = IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128; if (cipher_suite_id == 0 || cipher_suite_id == 1 || cipher_suite_id == 2 || cipher_suite_id == 6 || cipher_suite_id == 7 || cipher_suite_id == 11 || cipher_suite_id == 15 || cipher_suite_id == 16) c = IPMI_CONFIDENTIALITY_ALGORITHM_NONE; else if (cipher_suite_id == 3 || cipher_suite_id == 8 || cipher_suite_id == 12 || cipher_suite_id == 17) c = IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128; else if (cipher_suite_id == 4 || cipher_suite_id == 9 || cipher_suite_id == 13 || cipher_suite_id == 18) c = IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128; else /* cipher_suite_id == 5 || cipher_suite_id == 10 || cipher_suite_id == 14 || cipher_suite_id == 19 */ c = IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40; if (authentication_algorithm) *authentication_algorithm = a; if (integrity_algorithm) *integrity_algorithm = i; if (confidentiality_algorithm) *confidentiality_algorithm = c; return (0); } int ipmi_algorithms_to_cipher_suite_id (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, uint8_t *cipher_suite_id) { if (!IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || !IPMI_CIPHER_SUITE_COMBINATION_VALID (authentication_algorithm, integrity_algorithm, confidentiality_algorithm) || !cipher_suite_id) { SET_ERRNO (EINVAL); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE && confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 0; else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE && confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 1; else /* integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) */ { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 2; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) *cipher_suite_id = 3; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128) *cipher_suite_id = 4; else /* confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40 */ *cipher_suite_id = 5; } } else if (authentication_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) { if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE && confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 6; else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 7; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) *cipher_suite_id = 8; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128) *cipher_suite_id = 9; else /* confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40 */ *cipher_suite_id = 10; } else /* integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128 */ { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 11; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) *cipher_suite_id = 12; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128) *cipher_suite_id = 13; else /* confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40 */ *cipher_suite_id = 14; } } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) { if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE && confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 15; else /* integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 */ { if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) *cipher_suite_id = 16; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) *cipher_suite_id = 17; else if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_128) *cipher_suite_id = 18; else /* confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_XRC4_40 */ *cipher_suite_id = 19; } } return (0); } freeipmi-1.6.4/libfreeipmi/util/ipmi-dcmi-util.c0000644002055400205540000000751713527331637021531 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /*****************************************************************************\ * $Id: ipmi-dcmi-util.c,v 1.5 2010-05-17 17:42:45 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/util/ipmi-dcmi-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-dcmi-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" const char * ipmi_cmd_dcmi_str (uint8_t cmd) { switch (cmd) { case IPMI_CMD_DCMI_GET_DCMI_CAPABILITY_INFO: return "Get DCMI Capability Info"; case IPMI_CMD_DCMI_GET_POWER_READING: return "Get Power Reading"; case IPMI_CMD_DCMI_GET_POWER_LIMIT: return "Get Power Limit"; case IPMI_CMD_DCMI_SET_POWER_LIMIT: return "Set Power LIMIT"; case IPMI_CMD_DCMI_ACTIVATE_DEACTIVATE_POWER_LIMIT: return "Activate/Deactivate Power Limit"; case IPMI_CMD_DCMI_GET_ASSET_TAG: return "Get Asset Tag"; case IPMI_CMD_DCMI_GET_DCMI_SENSOR_INFO: return "Get DCMI Sensor Info"; case IPMI_CMD_DCMI_SET_ASSET_TAG: return "Set Asset Tag"; case IPMI_CMD_DCMI_GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING: return "Get Management Controller Identifier String"; case IPMI_CMD_DCMI_SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING: return "Set Management Controller Identifier String"; case IPMI_CMD_DCMI_SET_THERMAL_LIMIT: return "Set Thermal Limit"; case IPMI_CMD_DCMI_GET_THERMAL_LIMIT: return "Get Thermal Limit"; case IPMI_CMD_DCMI_GET_TEMPERATURE_READING: return "Set Temperature Reading"; case IPMI_CMD_DCMI_SET_DCMI_CONFIGURATION_PARAMETERS: return "Set DCMI Configuration Parameters"; case IPMI_CMD_DCMI_GET_DCMI_CONFIGURATION_PARAMETERS: return "Get DCMI Configuration Parameters"; default: return "Unknown"; } } freeipmi-1.6.4/libfreeipmi/util/ipmi-device-types-util.c0000644002055400205540000003254413527331637023214 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/util/ipmi-device-types-util.h" #include "freeipmi/spec/ipmi-device-types-spec.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" static int _get_message (unsigned int offset, char *buf, unsigned int buflen, unsigned int offset_max, const char * const string_array[]) { assert (buf && buflen); if (offset > offset_max) { SET_ERRNO (EINVAL); return (-1); } return (snprintf (buf, buflen, "%s", string_array[offset])); } int ipmi_device_type_modifer_message (uint8_t device_type, uint8_t device_modifier, char *buf, unsigned int buflen) { if (!IPMI_DEVICE_TYPE_VALID (device_type) || !buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (device_type) { case IPMI_DEVICE_TYPE_DS1624_TEMPERATURE_SENSOR_EEPROM_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent_max_index, ipmi_device_type_modifier_ds1624_temperature_sensor_eeprom_or_equivalent)); case IPMI_DEVICE_TYPE_DS1621_TEMPERATURE_SENSOR_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent_max_index, ipmi_device_type_modifier_ds1621_temperature_sensor_eeprom_or_equivalent)); case IPMI_DEVICE_TYPE_LM75_TEMPERATURE_SENSOR_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent_max_index, ipmi_device_type_modifier_lm75_temperature_sensor_eeprom_or_equivalent)); case IPMI_DEVICE_TYPE_HECETA_ASIC_OR_SIMILAR: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_heceta_asic_or_similar_max_index, ipmi_device_type_modifier_heceta_asic_or_similar)); case IPMI_DEVICE_TYPE_EEPROM_24C01_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c01_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c01_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C02_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c02_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c02_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C04_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c04_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c04_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C08_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c08_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c08_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C16_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c16_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c16_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C17_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c17_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c17_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C32_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c32_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c32_or_equivalent)); case IPMI_DEVICE_TYPE_EEPROM_24C64_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_eeprom_24c64_or_equivalent_max_index, ipmi_device_type_modifier_eeprom_24c64_or_equivalent)); case IPMI_DEVICE_TYPE_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_fru_inventory_device_behind_management_controller_max_index, ipmi_device_type_modifier_fru_inventory_device_behind_management_controller)); case IPMI_DEVICE_TYPE_PCF_8570_256_BYTE_RAM_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8570_256_byte_ram_or_equivalent)); case IPMI_DEVICE_TYPE_PCF_8573_CLOCK_CALENDAR_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8573_clock_calendar_or_equivalent)); case IPMI_DEVICE_TYPE_PCF_8574A_IO_PORT_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8574a_io_port_or_equivalent)); case IPMI_DEVICE_TYPE_PCF_8583_CLOCK_CALENDAR_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8583_clock_calendar_or_equivalent)); case IPMI_DEVICE_TYPE_PCF_8593_CLOCK_CALENDAR_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8593_clock_calendar_or_equivalent)); case IPMI_DEVICE_TYPE_CLOCK_CALENDAR_TYPE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_clock_calendar_type_not_specified_max_index, ipmi_device_type_modifier_clock_calendar_type_not_specified)); case IPMI_DEVICE_TYPE_PCF_8591_AD_DA_CONVERTER_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent_max_index, ipmi_device_type_modifier_pcf_8591_ad_da_converter_or_equivalent)); case IPMI_DEVICE_TYPE_IO_PORT_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_io_port_specific_device_not_specified_max_index, ipmi_device_type_modifier_io_port_specific_device_not_specified)); case IPMI_DEVICE_TYPE_AD_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_ad_converter_specific_device_not_specified_max_index, ipmi_device_type_modifier_ad_converter_specific_device_not_specified)); case IPMI_DEVICE_TYPE_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_da_converter_specific_device_not_specified_max_index, ipmi_device_type_modifier_da_converter_specific_device_not_specified)); case IPMI_DEVICE_TYPE_AD_DA_CONVERTER_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified_max_index, ipmi_device_type_modifier_ad_da_converter_specific_device_not_specified)); case IPMI_DEVICE_TYPE_LCD_CONTROLLER_DRIVER_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified_max_index, ipmi_device_type_modifier_lcd_controller_driver_specific_device_not_specified)); case IPMI_DEVICE_TYPE_CORE_LOGIC_DEVICE_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_core_logic_device_specific_device_not_specified_max_index, ipmi_device_type_modifier_core_logic_device_specific_device_not_specified)); case IPMI_DEVICE_TYPE_LMC6874_INTELLIGENT_BATTERY_CONTROLLER_OR_EQUIVALENT: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent_max_index, ipmi_device_type_modifier_lmc6874_intelligent_battery_controller_or_equivalent)); case IPMI_DEVICE_TYPE_INTELLIGENT_BATTERY_CONTROLLER_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified_max_index, ipmi_device_type_modifier_intelligent_battery_controller_specific_device_not_specified)); case IPMI_DEVICE_TYPE_COMBO_MANAGEMENT_ASIC_SPECIFIC_DEVICE_NOT_SPECIFIED: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified_max_index, ipmi_device_type_modifier_combo_management_asic_specific_device_not_specified)); case IPMI_DEVICE_TYPE_MAXIM_1617_TEMPERATURE_SENSOR: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_maxim_1617_temperature_sensor_max_index, ipmi_device_type_modifier_maxim_1617_temperature_sensor)); case IPMI_DEVICE_TYPE_OTHER_UNSPECIFIED_DEVICE: return (_get_message (device_modifier, buf, buflen, ipmi_device_type_modifier_other_unspecified_device_max_index, ipmi_device_type_modifier_other_unspecified_device)); } SET_ERRNO (EINVAL); return (-1); } freeipmi-1.6.4/libfreeipmi/util/ipmi-entity-ids-util.c0000644002055400205540000000302513527331637022674 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "freeipmi/util/ipmi-entity-ids-util.h" #include "freeipmi/spec/ipmi-entity-ids-spec.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" const char * ipmi_get_entity_id_string (uint8_t entity_id) { if (IPMI_ENTITY_ID_VALID (entity_id)) return (ipmi_entity_ids_pretty[entity_id]); else if (IPMI_ENTITY_ID_IS_CHASSIS_SPECIFIC (entity_id)) return (ipmi_entity_id_chassis_specific); else if (IPMI_ENTITY_ID_IS_BOARD_SET_SPECIFIC (entity_id)) return (ipmi_entity_id_board_set_specific); else if (IPMI_ENTITY_ID_IS_OEM_SYSTEM_INTEGRATOR_DEFINED (entity_id)) return (ipmi_entity_id_oem_system_integrator); return (ipmi_entity_id_oem_system_integrator); } freeipmi-1.6.4/libfreeipmi/util/ipmi-error-dcmi-util.c0000644002055400205540000001163413527331637022653 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/util/ipmi-error-dcmi-util.h" #include "freeipmi/util/ipmi-error-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-dcmi-spec.h" #include "freeipmi/spec/ipmi-comp-code-dcmi-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define SNPRINTF_RETURN(arg...) \ do \ { \ snprintf (errstr, len, arg); \ return (0); \ } while (0) int ipmi_completion_code_dcmi_strerror_r (uint8_t cmd, uint8_t netfn, uint8_t comp_code, char *errstr, size_t len) { if (!errstr) { SET_ERRNO (EINVAL); return (-1); } if (netfn == IPMI_NET_FN_GROUP_EXTENSION_RQ || netfn == IPMI_NET_FN_GROUP_EXTENSION_RS) { switch (cmd) { case IPMI_CMD_DCMI_GET_POWER_LIMIT: switch (comp_code) { case IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT_STR); } break; case IPMI_CMD_DCMI_SET_POWER_LIMIT: switch (comp_code) { case IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE_STR); case IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE_STR); case IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR); } break; case IPMI_CMD_DCMI_GET_ASSET_TAG: switch (comp_code) { case IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BINARY_UNSPECIFIED: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BINARY_UNSPECIFIED_STR); case IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BCD_PLUS: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_BCD_PLUS_STR); case IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_6BIT_ASCII_PACKED: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_6BIT_ASCII_PACKED_STR); case IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_SET_TO_ASCII_LATIN1_NOT_ENGLISH: SNPRINTF_RETURN (IPMI_COMP_CODE_DCMI_ENCODING_TYPE_IN_FRU_IS_SET_TO_ASCII_LATIN1_NOT_ENGLISH_STR); } break; } } return ipmi_completion_code_strerror_r (cmd, netfn, comp_code, errstr, len); } int ipmi_completion_code_dcmi_strerror_cmd_r (fiid_obj_t obj_cmd, uint8_t netfn, char *errstr, size_t len) { uint8_t cmd, comp_code; uint64_t val; /* The netfn need not be valid */ if (!fiid_obj_valid (obj_cmd) || !errstr) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "cmd") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "comp_code") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_GET (obj_cmd, "cmd", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } cmd = val; if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } comp_code = val; return (ipmi_completion_code_dcmi_strerror_r (cmd, netfn, comp_code, errstr, len)); } freeipmi-1.6.4/libfreeipmi/util/ipmi-error-util.c0000644002055400205540000010241713527331637021741 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/util/ipmi-error-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/spec/ipmi-rmcpplus-status-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define SNPRINTF_RETURN(arg...) \ do \ { \ snprintf (errstr, len, arg); \ return (0); \ } while (0) int ipmi_completion_code_strerror_r (uint8_t cmd, uint8_t netfn, uint8_t comp_code, char *errstr, size_t len) { if (!errstr) { SET_ERRNO (EINVAL); return (-1); } switch (comp_code) { case IPMI_COMP_CODE_COMMAND_SUCCESS: SNPRINTF_RETURN (IPMI_COMP_CODE_COMMAND_SUCCESS_STR); case IPMI_COMP_CODE_NODE_BUSY: SNPRINTF_RETURN (IPMI_COMP_CODE_NODE_BUSY_STR); case IPMI_COMP_CODE_INVALID_COMMAND: SNPRINTF_RETURN (IPMI_COMP_CODE_INVALID_COMMAND_STR); case IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN: SNPRINTF_RETURN (IPMI_COMP_CODE_COMMAND_INVALID_FOR_LUN_STR); case IPMI_COMP_CODE_COMMAND_TIMEOUT: SNPRINTF_RETURN (IPMI_COMP_CODE_COMMAND_TIMEOUT_STR); case IPMI_COMP_CODE_OUT_OF_SPACE: SNPRINTF_RETURN (IPMI_COMP_CODE_OUT_OF_SPACE_STR); case IPMI_COMP_CODE_RESERVATION_CANCELLED: SNPRINTF_RETURN (IPMI_COMP_CODE_RESERVATION_CANCELLED_STR); case IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUEST_DATA_TRUNCATED_STR); case IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID_STR); case IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUEST_DATA_LENGTH_LIMIT_EXCEEDED_STR); case IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE: SNPRINTF_RETURN (IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE_STR); case IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES: SNPRINTF_RETURN (IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES_STR); case IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT_STR); case IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST: SNPRINTF_RETURN (IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST_STR); case IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE: SNPRINTF_RETURN (IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE_STR); case IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED: SNPRINTF_RETURN (IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED_STR); case IPMI_COMP_CODE_CANNOT_EXECUTE_DUPLICATE_REQUEST: SNPRINTF_RETURN (IPMI_COMP_CODE_CANNOT_EXECUTE_DUPLICATE_REQUEST_STR); case IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE: SNPRINTF_RETURN (IPMI_COMP_CODE_SDR_REPOSITORY_IN_UPDATE_MODE_STR); case IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE: SNPRINTF_RETURN (IPMI_COMP_CODE_DEVICE_IN_FIRMWARE_UPDATE_MODE_STR); case IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_BMC_INITIALIZATION_IN_PROGRESS_STR); case IPMI_COMP_CODE_DESTINATION_UNAVAILABLE: SNPRINTF_RETURN (IPMI_COMP_CODE_DESTINATION_UNAVAILABLE_STR); case IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL: SNPRINTF_RETURN (IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL_STR); case IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_REQUEST_PARAMETER_ILLEGAL: SNPRINTF_RETURN (IPMI_COMP_CODE_REQUEST_PARAMETER_ILLEGAL_STR); case IPMI_COMP_CODE_UNSPECIFIED_ERROR: SNPRINTF_RETURN (IPMI_COMP_CODE_UNSPECIFIED_ERROR_STR); } /* Device Specific OEM completion codes */ if (IPMI_COMP_CODE_DEVICE_SPECIFIC_CODES (comp_code)) SNPRINTF_RETURN ("Device specific (OEM) completion code %02Xh.", comp_code); /* Command specific completion codes */ if (IPMI_COMP_CODE_COMMAND_SPECIFIC_CODES (comp_code)) { if (!IPMI_NET_FN_VALID (netfn)) { SET_ERRNO (EINVAL); return (-1); } switch (netfn) { case IPMI_NET_FN_CHASSIS_RQ: case IPMI_NET_FN_CHASSIS_RS: switch (cmd) { case IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS: switch (comp_code) { case IPMI_COMP_CODE_SET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_BOOT_OPTIONS_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_BOOT_OPTIONS_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_BOOT_OPTIONS_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_BOOT_OPTIONS_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_BOOT_OPTIONS_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_BOOT_OPTIONS_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS: switch (comp_code) { case IPMI_COMP_CODE_GET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED_STR); } break; } break; case IPMI_NET_FN_BRIDGE_RQ: case IPMI_NET_FN_BRIDGE_RS: break; case IPMI_NET_FN_SENSOR_EVENT_RQ: case IPMI_NET_FN_SENSOR_EVENT_RS: switch (cmd) { case IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_GET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); } break; case IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID: switch (comp_code) { case IPMI_COMP_CODE_SET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS_STR); } break; case IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID: switch (comp_code) { case IPMI_COMP_CODE_GET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_LAST_PROCESSED_EVENT_ID_SEL_ERASE_IN_PROGRESS_STR); } break; case IPMI_CMD_ALERT_IMMEDIATE: switch (comp_code) { case IPMI_COMP_CODE_ALERT_ALREADY_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_ALERT_ALREADY_IN_PROGRESS_STR); case IPMI_COMP_CODE_ALERT_IPMI_MESSAGING_SESSION_ACTIVE: SNPRINTF_RETURN (IPMI_COMP_CODE_ALERT_IPMI_MESSAGING_SESSION_ACTIVE_STR); } break; case IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS: switch (comp_code) { case IPMI_COMP_CODE_SENSOR_READING_OR_STATUS_NOT_SETTABLE: SNPRINTF_RETURN (IPMI_COMP_CODE_SENSOR_READING_OR_STATUS_NOT_SETTABLE_STR); case IPMI_COMP_CODE_EVENT_DATA_BYTES_NOT_SETTABLE: SNPRINTF_RETURN (IPMI_COMP_CODE_EVENT_DATA_BYTES_NOT_SETTABLE_STR); } break; } break; case IPMI_NET_FN_APP_RQ: case IPMI_NET_FN_APP_RS: switch (cmd) { case IPMI_CMD_SET_COMMAND_ENABLES: switch (comp_code) { case IPMI_COMP_CODE_SET_COMMAND_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_COMMAND_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR); } break; case IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES: switch (comp_code) { case IPMI_COMP_CODE_SET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR); } break; case IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES: switch (comp_code) { case IPMI_COMP_CODE_GET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_COMMAND_SUB_FUNCTION_ENABLES_ATTMPT_TO_ENABLE_AN_UNSUPPORTED_OR_UNCONFIGURABLE_COMMAND_STR); } break; case IPMI_CMD_RESET_WATCHDOG_TIMER: switch (comp_code) { case IPMI_COMP_CODE_RESET_WATCHDOG_TIMER_ATTEMPT_TO_START_UNINITIALIZED_WATCHDOG: SNPRINTF_RETURN (IPMI_COMP_CODE_RESET_WATCHDOG_TIMER_ATTEMPT_TO_START_UNINITIALIZED_WATCHDOG_STR); } break; case IPMI_CMD_GET_MESSAGE: switch (comp_code) { case IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_MESSAGE_DATA_NOT_AVAILABLE_STR); } break; case IPMI_CMD_SEND_MESSAGE: switch (comp_code) { case IPMI_COMP_CODE_SEND_MESSAGE_INVALID_SESSION_HANDLE: SNPRINTF_RETURN (IPMI_COMP_CODE_SEND_MESSAGE_INVALID_SESSION_HANDLE_STR); case IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION: SNPRINTF_RETURN (IPMI_COMP_CODE_SEND_MESSAGE_LOST_ARBITRATION_STR); case IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR: SNPRINTF_RETURN (IPMI_COMP_CODE_SEND_MESSAGE_BUS_ERROR_STR); case IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE: SNPRINTF_RETURN (IPMI_COMP_CODE_SEND_MESSAGE_NAK_ON_WRITE_STR); } break; case IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SYSTEM_INFO_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); } break; case IPMI_CMD_GET_SESSION_CHALLENGE: switch (comp_code) { case IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME_STR); case IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED_STR); } break; case IPMI_CMD_ACTIVATE_SESSION: switch (comp_code) { case IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE_STR); case IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER_STR); case IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_TO_SUPPORT_USER: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILALBE_TO_SUPPORT_USER_STR); case IPMI_COMP_CODE_ACTIVATE_SESSION_SESSION_SEQ_NUM_OUT_OF_RANGE: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_SESSION_SEQ_NUM_OUT_OF_RANGE_STR); case IPMI_COMP_CODE_ACTIVATE_SESSION_INVALID_SESSION_ID: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_INVALID_SESSION_ID_STR); case IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL_STR); } break; case IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL: switch (comp_code) { case IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER_STR); case IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT_STR); case IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_CANNOT_DISABLE_USER_LEVEL_AUTHENTICATION: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_CANNOT_DISABLE_USER_LEVEL_AUTHENTICATION_STR); } break; case IPMI_CMD_CLOSE_SESSION: switch (comp_code) { case IPMI_COMP_CODE_CLOSE_SESSION_INVALID_SESSION_ID_IN_REQUEST: SNPRINTF_RETURN (IPMI_COMP_CODE_CLOSE_SESSION_INVALID_SESSION_ID_IN_REQUEST_STR); } break; case IPMI_CMD_SET_CHANNEL_ACCESS: switch (comp_code) { case IPMI_COMP_CODE_SET_CHANNEL_ACCESS_SET_NOT_SUPPORTED_ON_SELECTED_CHANNEL: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_ACCESS_SET_NOT_SUPPORTED_ON_SELECTED_CHANNEL_STR); case IPMI_COMP_CODE_SET_CHANNEL_ACCESS_ACCESS_MODE_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_ACCESS_ACCESS_MODE_NOT_SUPPORTED_STR); } break; case IPMI_CMD_GET_CHANNEL_ACCESS: switch (comp_code) { case IPMI_COMP_CODE_GET_CHANNEL_ACCESS_COMMAND_NOT_SUPPORTED_FOR_SELECTED_CHANNEL: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_CHANNEL_ACCESS_COMMAND_NOT_SUPPORTED_FOR_SELECTED_CHANNEL_STR); } break; case IPMI_CMD_SET_USER_PASSWORD_COMMAND: switch (comp_code) { case IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_CORRECT: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_CORRECT_STR); case IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT_STR); } break; case IPMI_CMD_ACTIVATE_PAYLOAD: switch (comp_code) { case IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION_STR); case IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED_STR); case IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED_STR); case IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION_STR); case IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION: SNPRINTF_RETURN (IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION_STR); } break; case IPMI_CMD_DEACTIVATE_PAYLOAD: switch (comp_code) { case IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_ALREADY_DEACTIVATED: SNPRINTF_RETURN (IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_ALREADY_DEACTIVATED_STR); case IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED: SNPRINTF_RETURN (IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED_STR); } break; case IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION: switch (comp_code) { case IPMI_COMP_CODE_GET_CHANNEL_PAYLOAD_VERSION_PAYLOAD_TYPE_NOT_AVAILABLE_ON_GIVEN_CHANNEL: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_CHANNEL_PAYLOAD_VERSION_PAYLOAD_TYPE_NOT_AVAILABLE_ON_GIVEN_CHANNEL_STR); } break; case IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO: switch (comp_code) { case IPMI_COMP_CODE_GET_CHANNEL_OEM_PAYLOAD_INFO_OEM_PAYLOAD_IANA_OR_PAYLOAD_ID_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_CHANNEL_OEM_PAYLOAD_INFO_OEM_PAYLOAD_IANA_OR_PAYLOAD_ID_NOT_SUPPORTED_STR); } break; case IPMI_CMD_MASTER_WRITE_READ: switch (comp_code) { case IPMI_COMP_CODE_MASTER_WRITE_READ_LOST_ARBITRATION: SNPRINTF_RETURN (IPMI_COMP_CODE_MASTER_WRITE_READ_LOST_ARBITRATION_STR); case IPMI_COMP_CODE_MASTER_WRITE_READ_BUS_ERROR: SNPRINTF_RETURN (IPMI_COMP_CODE_MASTER_WRITE_READ_BUS_ERROR_STR); case IPMI_COMP_CODE_MASTER_WRITE_READ_NAK_ON_WRITE: SNPRINTF_RETURN (IPMI_COMP_CODE_MASTER_WRITE_READ_NAK_ON_WRITE_STR); case IPMI_COMP_CODE_MASTER_WRITE_READ_TRUNCATED_READ: SNPRINTF_RETURN (IPMI_COMP_CODE_MASTER_WRITE_READ_TRUNCATED_READ_STR); } case IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION: switch (comp_code) { case IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_ALLOWED_UNDER_PRESENT_CONFIGURATION: SNPRINTF_RETURN (IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_OPERATION_NOT_ALLOWED_UNDER_PRESENT_CONFIGURATION_STR); case IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_ENCRYPTION_IS_NOT_AVAILABLE_FOR_SESSION: SNPRINTF_RETURN (IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_ENCRYPTION_IS_NOT_AVAILABLE_FOR_SESSION_STR); case IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_PAYLOAD_INSTANCE_NOT_PRESENTLY_ACTIVE: SNPRINTF_RETURN (IPMI_COMP_CODE_SUSPEND_RESUME_PAYLOAD_ENCRYPTION_PAYLOAD_INSTANCE_NOT_PRESENTLY_ACTIVE_STR); } break; case IPMI_CMD_SET_CHANNEL_SECURITY_KEYS: switch (comp_code) { case IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_CANNOT_PERFORM_SET_CONFIRM_KEY_IS_LOCKED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_CANNOT_PERFORM_SET_CONFIRM_KEY_IS_LOCKED_STR); case IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_INSUFFICIENT_KEY_BYTES: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_INSUFFICIENT_KEY_BYTES_STR); case IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_TOO_MANY_KEY_BYTES: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_TOO_MANY_KEY_BYTES_STR); case IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KEY_VALUE_DOES_NOT_MEET_CRITERIA: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KEY_VALUE_DOES_NOT_MEET_CRITERIA_STR); case IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KR_IS_NOT_USED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_CHANNEL_SECURITY_KEYS_KR_IS_NOT_USED_STR); } break; } break; case IPMI_NET_FN_FIRMWARE_RQ: case IPMI_NET_FN_FIRMWARE_RS: break; case IPMI_NET_FN_STORAGE_RQ: case IPMI_NET_FN_STORAGE_RS: switch(cmd) { case IPMI_CMD_READ_FRU_DATA: switch (comp_code) { case IPMI_COMP_CODE_READ_FRU_DATA_FRU_DEVICE_BUSY: SNPRINTF_RETURN (IPMI_COMP_CODE_READ_FRU_DATA_FRU_DEVICE_BUSY_STR); } break; case IPMI_CMD_WRITE_FRU_DATA: switch (comp_code) { case IPMI_COMP_CODE_WRITE_FRU_DATA_WRITE_PROTECTED_OFFSET: SNPRINTF_RETURN (IPMI_COMP_CODE_WRITE_FRU_DATA_WRITE_PROTECTED_OFFSET_STR); case IPMI_COMP_CODE_WRITE_FRU_DATA_FRU_DEVICE_BUSY: SNPRINTF_RETURN (IPMI_COMP_CODE_WRITE_FRU_DATA_FRU_DEVICE_BUSY_STR); } break; case IPMI_CMD_GET_SEL_ENTRY: switch (comp_code) { case IPMI_COMP_CODE_GET_SEL_ENTRY_SEL_ERASE_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SEL_ENTRY_SEL_ERASE_IN_PROGRESS_STR); } break; case IPMI_CMD_DELETE_SEL_ENTRY: switch (comp_code) { case IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_OPERATION_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_OPERATION_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_ERASE_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_DELETE_SEL_ENTRY_SEL_ERASE_IN_PROGRESS_STR); } break; } break; case IPMI_NET_FN_TRANSPORT_RQ: case IPMI_NET_FN_TRANSPORT_RS: switch (cmd) { case IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_GET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); } break; case IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS: switch (comp_code) { case IPMI_COMP_CODE_GET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED_STR); } break; case IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION: switch (comp_code) { case IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR); case IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_INVALID_SET_IN_PROGRESS: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_INVALID_SET_IN_PROGRESS_STR); case IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_WRITE_READ_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_WRITE_READ_ONLY_PARAMETER_STR); case IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_READ_WRITE_ONLY_PARAMETER: SNPRINTF_RETURN (IPMI_COMP_CODE_SET_SERIAL_MODEM_CONFIGURATION_READ_WRITE_ONLY_PARAMETER_STR); } break; case IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION: switch (comp_code) { case IPMI_COMP_CODE_GET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED: SNPRINTF_RETURN (IPMI_COMP_CODE_GET_SERIAL_MODEM_CONFIGURATION_PARAMETER_NOT_SUPPORTED_STR); } break; } break; default: SET_ERRNO (EINVAL); return (-1); } SNPRINTF_RETURN ("No error message found for command " "%02Xh, network function %02Xh, and completion code %02Xh. " "Please report to ", cmd, netfn, comp_code); } SNPRINTF_RETURN ("Unknown completion code %02Xh for command %02Xh and network function %02Xh.", comp_code, cmd, netfn); } int ipmi_completion_code_strerror_cmd_r (fiid_obj_t obj_cmd, uint8_t netfn, char *errstr, size_t len) { uint8_t cmd, comp_code; uint64_t val; /* The netfn need not be valid */ if (!fiid_obj_valid (obj_cmd) || !errstr) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "cmd") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "comp_code") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_GET (obj_cmd, "cmd", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } cmd = val; if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } comp_code = val; return (ipmi_completion_code_strerror_r (cmd, netfn, comp_code, errstr, len)); } int ipmi_rmcpplus_status_strerror_r (uint8_t rmcpplus_status_code, char *errstr, size_t len) { if (!errstr) { SET_ERRNO (EINVAL); return (-1); } switch (rmcpplus_status_code) { case RMCPPLUS_STATUS_NO_ERRORS: SNPRINTF_RETURN (RMCPPLUS_STATUS_NO_ERRORS_STR); case RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION: SNPRINTF_RETURN (RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_STR); case RMCPPLUS_STATUS_INVALID_SESSION_ID: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_SESSION_ID_STR); case RMCPPLUS_STATUS_INVALID_PAYLOAD_TYPE: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_PAYLOAD_TYPE_STR); case RMCPPLUS_STATUS_INVALID_AUTHENTICATION_ALGORITHM: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_AUTHENTICATION_ALGORITHM_STR); case RMCPPLUS_STATUS_INVALID_INTEGRITY_ALGORITHM: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_INTEGRITY_ALGORITHM_STR); case RMCPPLUS_STATUS_NO_MATCHING_AUTHENTICATION_PAYLOAD: SNPRINTF_RETURN (RMCPPLUS_STATUS_NO_MATCHING_AUTHENTICATION_PAYLOAD_STR); case RMCPPLUS_STATUS_NO_MATCHING_INTEGRITY_PAYLOAD: SNPRINTF_RETURN (RMCPPLUS_STATUS_NO_MATCHING_INTEGRITY_PAYLOAD_STR); case RMCPPLUS_STATUS_INACTIVE_SESSION_ID: SNPRINTF_RETURN (RMCPPLUS_STATUS_INACTIVE_SESSION_ID_STR); case RMCPPLUS_STATUS_INVALID_ROLE: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_ROLE_STR); case RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED: SNPRINTF_RETURN (RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED_STR); case RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME: SNPRINTF_RETURN (RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME_STR); case RMCPPLUS_STATUS_INVALID_NAME_LENGTH: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_NAME_LENGTH_STR); case RMCPPLUS_STATUS_UNAUTHORIZED_NAME: SNPRINTF_RETURN (RMCPPLUS_STATUS_UNAUTHORIZED_NAME_STR); case RMCPPLUS_STATUS_UNAUTHORIZED_GUID: SNPRINTF_RETURN (RMCPPLUS_STATUS_UNAUTHORIZED_GUID_STR); case RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE_STR); case RMCPPLUS_STATUS_INVALID_CONFIDENTIALITY_ALGORITHM: SNPRINTF_RETURN (RMCPPLUS_STATUS_INVALID_CONFIDENTIALITY_ALGORITHM_STR); case RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS: SNPRINTF_RETURN (RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS_STR); case RMCPPLUS_STATUS_ILLEGAL_OR_UNRECOGNIZED_PARAMETER: SNPRINTF_RETURN (RMCPPLUS_STATUS_ILLEGAL_OR_UNRECOGNIZED_PARAMETER_STR); } SNPRINTF_RETURN ("Unknown rmcp+ or rakp status code %02Xh.", rmcpplus_status_code); } freeipmi-1.6.4/libfreeipmi/util/ipmi-iana-enterprise-numbers-util.c0000644002055400205540000000462313527331637025347 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "freeipmi/util/ipmi-iana-enterprise-numbers-util.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" static int _is_special_case_manufacturer_id (uint32_t manufacturer_id) { if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND) return (1); return (0); } int ipmi_iana_enterprise_numbers_string (uint32_t manufacturer_id, char *buf, unsigned int buflen) { char *str = NULL; int rv = -1; if ((!IPMI_IANA_ENTERPRISE_ID_VALID (manufacturer_id) && !_is_special_case_manufacturer_id (manufacturer_id)) || !buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } if (IPMI_IANA_ENTERPRISE_ID_VALID (manufacturer_id)) { str = (char *)ipmi_iana_enterprise_numbers[manufacturer_id]; /* some entries are NULL, b/c manufacturers got deleted */ if (str) rv = snprintf (buf, buflen, "%s", str); else rv = 0; } else { /* it's a special case manufacturer id */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND) str = (char *)ipmi_iana_enterprise_numbers[IPMI_IANA_ENTERPRISE_ID_SUPERMICRO]; /* some entries are NULL, b/c manufacturers got deleted */ if (str) rv = snprintf (buf, buflen, "%s", str); } return (rv); } freeipmi-1.6.4/libfreeipmi/util/ipmi-ipmb-util.c0000644002055400205540000001157413527331637021542 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "freeipmi/util/ipmi-ipmb-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-ipmb-interface.h" #include "freeipmi/util/ipmi-util.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #include "secure.h" int ipmi_ipmb_check_rq_seq (fiid_obj_t obj_ipmb_msg_hdr, uint8_t rq_seq) { uint8_t rq_seq_recv; uint64_t val; if (!fiid_obj_valid (obj_ipmb_msg_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_ipmb_msg_hdr, "rq_seq") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } if (FIID_OBJ_GET (obj_ipmb_msg_hdr, "rq_seq", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); return (-1); } rq_seq_recv = val; return ((rq_seq_recv == rq_seq) ? 1 : 0); } int ipmi_ipmb_check_checksum (uint8_t rq_addr, fiid_obj_t obj_ipmb_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_ipmb_msg_trlr) { int obj_ipmb_msg_hdr_len, obj_cmd_len, obj_len; uint8_t checksum1_recv, checksum1_calc, checksum2_recv, checksum2_calc; uint8_t *buf1 = NULL; uint8_t *buf2 = NULL; unsigned int buflen; unsigned int len = 0; uint64_t val; int rv = -1; if (!fiid_obj_valid (obj_ipmb_msg_hdr) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_ipmb_msg_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_hdr, tmpl_ipmb_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (FIID_OBJ_TEMPLATE_COMPARE (obj_ipmb_msg_trlr, tmpl_ipmb_msg_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_ipmb_msg_hdr_len = fiid_obj_len_bytes (obj_ipmb_msg_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (FIID_OBJ_GET (obj_ipmb_msg_hdr, "checksum1", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } checksum1_recv = val; if (!(buf1 = malloc (obj_ipmb_msg_hdr_len + 1))) { ERRNO_TRACE (errno); goto cleanup; } /* achu: The rq_addr isn't in the ipmb_msg_hdr response, but it's * part of the calculated checksum stored in the header. If you're * thinking that's dumb. I think so too. */ buf1[0] = rq_addr; if ((obj_len = fiid_obj_get_block (obj_ipmb_msg_hdr, "rq_lun", "net_fn", buf1 + 1, obj_ipmb_msg_hdr_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } checksum1_calc = ipmi_checksum (buf1, obj_len + 1); if (checksum1_recv != checksum1_calc) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_ipmb_msg_trlr, "checksum2", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_trlr); goto cleanup; } checksum2_recv = val; buflen = obj_ipmb_msg_hdr_len + obj_cmd_len; if (!(buf2 = malloc (buflen))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_get_block (obj_ipmb_msg_hdr, "rs_addr", "rq_seq", buf2, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_ipmb_msg_hdr); goto cleanup; } len += obj_len; if ((obj_len = fiid_obj_get_all (obj_cmd, buf2 + len, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } len += obj_len; checksum2_calc = ipmi_checksum (buf2, len); if (checksum2_recv != checksum2_calc) { rv = 0; goto cleanup; } rv = 1; cleanup: free (buf1); free (buf2); return (rv); } freeipmi-1.6.4/libfreeipmi/util/ipmi-jedec-manufacturer-identification-code-util.c0000644002055400205540000000460613527331637030254 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "freeipmi/util/ipmi-jedec-manufacturer-identification-code-util.h" #include "freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" char * _find_str (uint8_t id, const struct ipmi_jedec_manufacturer_id_pair *pairs) { struct ipmi_jedec_manufacturer_id_pair *tmppair; assert (pairs); tmppair = (struct ipmi_jedec_manufacturer_id_pair *)pairs; while (tmppair->str) { if (tmppair->id == id) return (tmppair->str); tmppair++; } return (NULL); } char * ipmi_jedec_manufacturer_id_search (uint8_t continuation_codes_count, uint8_t id) { if (!IPMI_JEDEC_MANUFACTURER_CONTINUATION_CODES_VALID (continuation_codes_count)) { SET_ERRNO (EINVAL); return (NULL); } switch (continuation_codes_count) { case 0: return (_find_str (id, ipmi_jedec_manufacturer_id_bank1)); case 1: return (_find_str (id, ipmi_jedec_manufacturer_id_bank2)); case 2: return (_find_str (id, ipmi_jedec_manufacturer_id_bank3)); case 3: return (_find_str (id, ipmi_jedec_manufacturer_id_bank4)); case 4: return (_find_str (id, ipmi_jedec_manufacturer_id_bank5)); case 5: return (_find_str (id, ipmi_jedec_manufacturer_id_bank6)); case 6: return (_find_str (id, ipmi_jedec_manufacturer_id_bank7)); case 7: return (_find_str (id, ipmi_jedec_manufacturer_id_bank8)); case 8: return (_find_str (id, ipmi_jedec_manufacturer_id_bank9)); default: return (NULL); } } freeipmi-1.6.4/libfreeipmi/util/ipmi-lan-util.c0000644002055400205540000006077313527331637021372 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/util/ipmi-lan-util.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-lan-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "freeipmi/util/ipmi-util.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "libcommon/ipmi-md2.h" #include "libcommon/ipmi-md5.h" #include "freeipmi-portability.h" #include "secure.h" int ipmi_lan_check_session_sequence_number (fiid_obj_t obj_lan_session_hdr, uint32_t session_sequence_number) { uint32_t session_sequence_number_recv; uint64_t val; if (!fiid_obj_valid (obj_lan_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_lan_session_hdr, "session_sequence_number") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } if (FIID_OBJ_GET (obj_lan_session_hdr, "session_sequence_number", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } session_sequence_number_recv = val; return ((session_sequence_number_recv == session_sequence_number) ? 1 : 0); } int ipmi_lan_check_session_id (fiid_obj_t obj_lan_session_hdr, uint32_t session_id) { uint32_t session_id_recv; uint64_t val; if (fiid_obj_valid (obj_lan_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_lan_session_hdr, "session_id") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } if (FIID_OBJ_GET (obj_lan_session_hdr, "session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr); return (-1); } session_id_recv = val; return ((session_id_recv == session_id) ? 1 : 0); } int ipmi_lan_check_session_authentication_code (fiid_obj_t obj_lan_session_hdr_rs, fiid_obj_t obj_lan_msg_hdr_rs, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr_rs, uint8_t authentication_type, const void *authentication_code_data, unsigned int authentication_code_data_len) { uint8_t authentication_code_recv[IPMI_1_5_MAX_PASSWORD_LENGTH]; uint8_t authentication_code_calc[IPMI_1_5_MAX_PASSWORD_LENGTH]; int authentication_code_recv_len, rv = -1; uint8_t pwbuf[IPMI_1_5_MAX_PASSWORD_LENGTH]; uint8_t l_authentication_type; uint64_t val; uint8_t *buf = NULL; if (!fiid_obj_valid (obj_lan_session_hdr_rs) || !fiid_obj_valid (obj_lan_msg_hdr_rs) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_lan_msg_trlr_rs) || (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE && authentication_type != IPMI_AUTHENTICATION_TYPE_MD2 && authentication_type != IPMI_AUTHENTICATION_TYPE_MD5 && authentication_type != IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) || (authentication_code_data && authentication_code_data_len > IPMI_1_5_MAX_PASSWORD_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_session_hdr_rs, tmpl_lan_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr_rs, tmpl_lan_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_trlr_rs, tmpl_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_lan_session_hdr_rs) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr_rs); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_lan_msg_hdr_rs) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr_rs); return (-1); } if (FIID_OBJ_PACKET_VALID (obj_lan_msg_trlr_rs) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr_rs); return (-1); } if (FIID_OBJ_GET (obj_lan_session_hdr_rs, "authentication_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr_rs); return (-1); } l_authentication_type = val; if (authentication_type != l_authentication_type) return (0); if ((authentication_code_recv_len = fiid_obj_get_data (obj_lan_session_hdr_rs, "authentication_code", authentication_code_recv, IPMI_1_5_MAX_PASSWORD_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr_rs); return (-1); } if (authentication_type == IPMI_AUTHENTICATION_TYPE_NONE) { if (authentication_code_recv_len) rv = 0; else rv = 1; goto cleanup; } if (authentication_code_recv_len != IPMI_1_5_MAX_PASSWORD_LENGTH) { rv = 0; goto cleanup; } if (authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) memcpy (authentication_code_calc, authentication_code_data, authentication_code_data_len); else if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2 || authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) { int obj_lan_msg_hdr_len, obj_cmd_len, obj_lan_msg_trlr_len, obj_len; unsigned int len = 0; uint8_t session_id_buf[1024]; uint8_t session_sequence_number_buf[1024]; int session_id_len, session_sequence_number_len; unsigned int buflen; if ((session_id_len = fiid_obj_get_data (obj_lan_session_hdr_rs, "session_id", session_id_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr_rs); goto cleanup; } if ((session_sequence_number_len = fiid_obj_get_data (obj_lan_session_hdr_rs, "session_sequence_number", session_sequence_number_buf, 1024)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_session_hdr_rs); goto cleanup; } /* Must zero extend password. No null termination is required. * Also, must memcpy instead of strcpy, password need not be * 1 word */ memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); memcpy (pwbuf, authentication_code_data, authentication_code_data_len); if ((obj_lan_msg_hdr_len = fiid_obj_len_bytes (obj_lan_msg_hdr_rs)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr_rs); goto cleanup; } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if ((obj_lan_msg_trlr_len = fiid_obj_len_bytes (obj_lan_msg_trlr_rs)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr_rs); goto cleanup; } buflen = obj_lan_msg_hdr_len + obj_cmd_len + obj_lan_msg_trlr_len; if (!(buf = (uint8_t *)malloc (buflen))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_get_all (obj_lan_msg_hdr_rs, buf + len, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr_rs); goto cleanup; } len += obj_len; if ((obj_len = fiid_obj_get_all (obj_cmd, buf + len, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } len += obj_len; if ((obj_len = fiid_obj_get_all (obj_lan_msg_trlr_rs, buf + len, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr_rs); goto cleanup; } len += obj_len; if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2) { md2_t ctx; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD2_DIGEST_LENGTH); md2_init (&ctx); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_update_data (&ctx, session_id_buf, session_id_len); md2_update_data (&ctx, buf, len); md2_update_data (&ctx, session_sequence_number_buf, session_sequence_number_len); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_finish (&ctx, authentication_code_calc, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_init (&ctx); } else if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) { md5_t ctx; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD5_DIGEST_LENGTH); md5_init (&ctx); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_update_data (&ctx, session_id_buf, session_id_len); md5_update_data (&ctx, buf, len); md5_update_data (&ctx, session_sequence_number_buf, session_sequence_number_len); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_finish (&ctx, authentication_code_calc, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_init (&ctx); } } /* Must memcmp instead of strcmp, password need not be 1 word */ if (memcmp (authentication_code_recv, authentication_code_calc, IPMI_1_5_MAX_PASSWORD_LENGTH) == 0) rv = 1; else rv = 0; cleanup: free (buf); /* secure_memset b/c could contain cleartext password */ secure_memset (authentication_code_recv, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); secure_memset (authentication_code_calc, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); secure_memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); return (rv); } int ipmi_lan_check_packet_session_authentication_code (const void *pkt, unsigned int pkt_len, uint8_t authentication_type, const void *authentication_code_data, unsigned int authentication_code_data_len) { uint8_t authentication_type_recv; int rmcp_hdr_len, authentication_type_index, authentication_code_index, rv = -1; unsigned int authentication_type_offset, authentication_code_offset; uint8_t authentication_code_buf[IPMI_1_5_MAX_PASSWORD_LENGTH]; uint8_t pwbuf[IPMI_1_5_MAX_PASSWORD_LENGTH]; if (!pkt || (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE && authentication_type != IPMI_AUTHENTICATION_TYPE_MD2 && authentication_type != IPMI_AUTHENTICATION_TYPE_MD5 && authentication_type != IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) || (authentication_code_data && authentication_code_data_len > IPMI_1_5_MAX_PASSWORD_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } if ((rmcp_hdr_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((authentication_type_index = fiid_template_field_start_bytes (tmpl_lan_session_hdr, "authentication_type")) < 0) { ERRNO_TRACE (errno); return (-1); } authentication_type_offset = rmcp_hdr_len + authentication_type_index; if (pkt_len < authentication_type_offset) return (0); authentication_type_recv = ((uint8_t *)pkt)[authentication_type_offset]; /* authentication code check fails if authentication types do not match */ if (authentication_type != authentication_type_recv) return (0); /* Automatically return (1) if auth type is none */ if (authentication_type_recv == IPMI_AUTHENTICATION_TYPE_NONE) return (1); if ((authentication_code_index = fiid_template_field_start_bytes (tmpl_lan_session_hdr, "authentication_code")) < 0) { ERRNO_TRACE (errno); return (-1); } authentication_code_offset = rmcp_hdr_len + authentication_code_index; if (pkt_len < (authentication_code_offset + IPMI_1_5_MAX_PASSWORD_LENGTH)) return (0); if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2 || authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) { int data_index, session_id_index, session_sequence_number_index; uint32_t session_id_offset, session_sequence_number_offset, data_offset; int session_id_len, session_sequence_number_len; if ((session_id_index = fiid_template_field_start_bytes (tmpl_lan_session_hdr, "session_id")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((session_sequence_number_index = fiid_template_field_start_bytes (tmpl_lan_session_hdr, "session_sequence_number")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((session_id_len = fiid_template_field_len_bytes (tmpl_lan_session_hdr, "session_id")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((session_sequence_number_len = fiid_template_field_len_bytes (tmpl_lan_session_hdr, "session_sequence_number")) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((data_index = fiid_template_len_bytes (tmpl_lan_session_hdr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } session_id_offset = rmcp_hdr_len + session_id_index; session_sequence_number_offset = rmcp_hdr_len + session_sequence_number_index; data_offset = rmcp_hdr_len + data_index; if (pkt_len < (session_id_offset + session_id_len) || pkt_len < (session_sequence_number_offset + session_sequence_number_len) || pkt_len < data_offset) { rv = 0; goto cleanup; } /* Must zero extend password. No null termination is required. * Also, must memcpy instead of strcpy, password need not be * 1 word */ memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); memcpy (pwbuf, authentication_code_data, authentication_code_data_len); if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD2) { md2_t ctx; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD2_DIGEST_LENGTH); md2_init (&ctx); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_update_data (&ctx, pkt + session_id_offset, session_id_len); md2_update_data (&ctx, pkt + data_offset, pkt_len - data_offset); md2_update_data (&ctx, pkt + session_sequence_number_offset, session_sequence_number_len); md2_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_finish (&ctx, authentication_code_buf, IPMI_1_5_MAX_PASSWORD_LENGTH); md2_init (&ctx); } else if (authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) { md5_t ctx; assert (IPMI_1_5_MAX_PASSWORD_LENGTH == MD5_DIGEST_LENGTH); md5_init (&ctx); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_update_data (&ctx, pkt + session_id_offset, session_id_len); md5_update_data (&ctx, pkt + data_offset, pkt_len - data_offset); md5_update_data (&ctx, pkt + session_sequence_number_offset, session_sequence_number_len); md5_update_data (&ctx, pwbuf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_finish (&ctx, authentication_code_buf, IPMI_1_5_MAX_PASSWORD_LENGTH); md5_init (&ctx); } } else /* authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY || authentication_type == IPMI_AUTHENTICATION_TYPE_OEM_PROP */ { if (authentication_code_data) memcpy (authentication_code_buf, authentication_code_data, authentication_code_data_len); } /* Must memcmp instead of strcmp, password need not be 1 word */ if (memcmp (authentication_code_buf, pkt + authentication_code_offset, IPMI_1_5_MAX_PASSWORD_LENGTH) == 0) rv = 1; else rv = 0; cleanup: /* secure_memset b/c could contain cleartext password */ secure_memset (authentication_code_buf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); secure_memset (pwbuf, '\0', IPMI_1_5_MAX_PASSWORD_LENGTH); return (rv); } int ipmi_lan_check_net_fn (fiid_obj_t obj_lan_msg_hdr, uint8_t net_fn) { uint8_t net_fn_recv; uint64_t val; if (!fiid_obj_valid (obj_lan_msg_hdr) || !IPMI_NET_FN_VALID (net_fn)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_lan_msg_hdr, "net_fn") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } if (FIID_OBJ_GET (obj_lan_msg_hdr, "net_fn", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } net_fn_recv = val; return ((net_fn_recv == net_fn) ? 1 : 0); } int ipmi_lan_check_rq_seq (fiid_obj_t obj_lan_msg_hdr, uint8_t rq_seq) { uint8_t rq_seq_recv; uint64_t val; if (!fiid_obj_valid (obj_lan_msg_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_lan_msg_hdr, "rq_seq") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } if (FIID_OBJ_GET (obj_lan_msg_hdr, "rq_seq", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); return (-1); } rq_seq_recv = val; return ((rq_seq_recv == rq_seq) ? 1 : 0); } int ipmi_lan_check_checksum (fiid_obj_t obj_lan_msg_hdr, fiid_obj_t obj_cmd, fiid_obj_t obj_lan_msg_trlr) { int obj_lan_msg_hdr_len, obj_cmd_len, obj_len; unsigned int len = 0; uint8_t checksum1_recv, checksum1_calc, checksum2_recv, checksum2_calc; uint8_t *buf1 = NULL; uint8_t *buf2 = NULL; unsigned int buflen; uint64_t val; int rv = -1; if (!fiid_obj_valid (obj_lan_msg_hdr) || !fiid_obj_valid (obj_cmd) || !fiid_obj_valid (obj_lan_msg_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_hdr, tmpl_lan_msg_hdr_rs) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (FIID_OBJ_TEMPLATE_COMPARE (obj_lan_msg_trlr, tmpl_lan_msg_trlr) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_lan_msg_hdr_len = fiid_obj_len_bytes (obj_lan_msg_hdr)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } if ((obj_cmd_len = fiid_obj_len_bytes (obj_cmd)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (FIID_OBJ_GET (obj_lan_msg_hdr, "checksum1", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } checksum1_recv = val; if (!(buf1 = (uint8_t *)malloc (obj_lan_msg_hdr_len))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_get_block (obj_lan_msg_hdr, "rq_addr", "net_fn", buf1, obj_lan_msg_hdr_len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } checksum1_calc = ipmi_checksum (buf1, obj_len); if (checksum1_recv != checksum1_calc) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_lan_msg_trlr, "checksum2", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_trlr); goto cleanup; } checksum2_recv = val; buflen = obj_lan_msg_hdr_len + obj_cmd_len; if (!(buf2 = malloc (buflen))) { ERRNO_TRACE (errno); goto cleanup; } if ((obj_len = fiid_obj_get_block (obj_lan_msg_hdr, "rs_addr", "rq_seq", buf2, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_lan_msg_hdr); goto cleanup; } len += obj_len; if ((obj_len = fiid_obj_get_all (obj_cmd, buf2 + len, buflen - len)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } len += obj_len; checksum2_calc = ipmi_checksum (buf2, len); if (checksum2_recv != checksum2_calc) { rv = 0; goto cleanup; } rv = 1; cleanup: free (buf1); free (buf2); return (rv); } int ipmi_lan_check_packet_checksum (const void *pkt, unsigned int pkt_len) { uint8_t authentication_type; unsigned int authentication_type_offset; int rmcp_hdr_len, msg_hdr_len1, msg_hdr_len2, authentication_type_start_bytes, checksum1_block_len; unsigned int authentication_code_len, checksum1_block_index, checksum2_block_index, checksum2_block_len; uint8_t checksum1_recv, checksum1_calc, checksum2_recv, checksum2_calc; if (!pkt || !pkt_len) { SET_ERRNO (EINVAL); return (-1); } if ((rmcp_hdr_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } if ((authentication_type_start_bytes = fiid_template_field_start_bytes (tmpl_lan_session_hdr, "authentication_type")) < 0) { ERRNO_TRACE (errno); return (-1); } authentication_type_offset = rmcp_hdr_len + authentication_type_start_bytes; authentication_type = ((uint8_t *)pkt)[authentication_type_offset]; if ((msg_hdr_len1 = fiid_template_block_len_bytes (tmpl_lan_session_hdr, "authentication_type", "session_id")) < 0) { ERRNO_TRACE (errno); return (-1); } if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) authentication_code_len = IPMI_1_5_MAX_PASSWORD_LENGTH; else authentication_code_len = 0; if ((msg_hdr_len2 = fiid_template_field_len_bytes (tmpl_lan_session_hdr, "ipmi_msg_len")) < 0) { ERRNO_TRACE (errno); return (-1); } checksum1_block_index = rmcp_hdr_len + msg_hdr_len1 + authentication_code_len + msg_hdr_len2; if ((checksum1_block_len = fiid_template_block_len_bytes (tmpl_lan_msg_hdr_rs, "rq_addr", "net_fn")) < 0) { ERRNO_TRACE (errno); return (-1); } if (pkt_len < (checksum1_block_index + checksum1_block_len + 1)) return (0); checksum1_calc = ipmi_checksum (pkt + checksum1_block_index, checksum1_block_len); checksum1_recv = ((uint8_t *)pkt)[checksum1_block_index + checksum1_block_len]; if (checksum1_calc != checksum1_recv) return (0); checksum2_block_index = checksum1_block_index + checksum1_block_len + 1; if (pkt_len <= (checksum2_block_index + 1)) return (0); checksum2_block_len = pkt_len - checksum2_block_index - 1; checksum2_calc = ipmi_checksum (pkt + checksum2_block_index, checksum2_block_len); checksum2_recv = ((uint8_t *)pkt)[checksum2_block_index + checksum2_block_len]; if (checksum2_calc != checksum2_recv) return (0); return (1); } freeipmi-1.6.4/libfreeipmi/util/ipmi-outofband-util.c0000644002055400205540000004275313527331637022577 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* 2's complement checksum of preceding bytes in the connection header or between the previous checksum. 8-bit checksum algorithm: Initialize checksum to 0. For each byte, checksum = (checksum + byte) modulo 256. Then find 1's compliment of checksum and add one to it. To verify add all the bytes and the checksum and then % 256 should yield 0. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "freeipmi/util/ipmi-outofband-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_SEQUENCE_NUMBER_MAX 0xFFFFFFFF #define IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT 8 #define IPMI_SEQUENCE_NUMBER_WINDOW_MAX 32 #define IPMI_SEQUENCE_NUMBER_WINDOW_MIN 1 int ipmi_is_ipmi_1_5_packet (const void *pkt, unsigned int pkt_len) { int rmcp_hdr_len; uint8_t auth_type; if ((rmcp_hdr_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } if (pkt_len <= rmcp_hdr_len) { SET_ERRNO (EINVAL); return (-1); } auth_type = *((uint8_t *)(pkt + rmcp_hdr_len)); auth_type &= 0x0F; return ((auth_type != IPMI_AUTHENTICATION_TYPE_RMCPPLUS) ? 1 : 0); } int ipmi_is_ipmi_2_0_packet (const void *pkt, unsigned int pkt_len) { int rmcp_hdr_len; uint8_t auth_type; if ((rmcp_hdr_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } if (pkt_len <= rmcp_hdr_len) { SET_ERRNO (EINVAL); return (-1); } auth_type = *((uint8_t *)(pkt + rmcp_hdr_len)); auth_type &= 0x0F; return ((auth_type == IPMI_AUTHENTICATION_TYPE_RMCPPLUS) ? 1 : 0); } int ipmi_check_session_sequence_number_1_5_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list) { if (!highest_received_sequence_number || !previously_received_list) { SET_ERRNO (EINVAL); return (-1); } (*highest_received_sequence_number) = 0; (*previously_received_list) = 0xFF; return (0); } int ipmi_check_session_sequence_number_2_0_init (uint32_t *highest_received_sequence_number, uint32_t *previously_received_list) { if (!highest_received_sequence_number || !previously_received_list) { SET_ERRNO (EINVAL); return (-1); } (*highest_received_sequence_number) = 0; (*previously_received_list) = 0xFF; return (0); } static int _check_session_sequence_number (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window, int ipmi_2_0_flag) { uint32_t shift_num, wrap_val; if (!highest_received_sequence_number || !previously_received_list) { SET_ERRNO (EINVAL); return (-1); } if (sequence_number_window > IPMI_SEQUENCE_NUMBER_WINDOW_MAX) { SET_ERRNO (EINVAL); return (-1); } if (!sequence_number_window) sequence_number_window = IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT; /* achu: This algorithm is more or less from Appendix A of the IPMI * spec. I know that technically I could remove a lot of code here * if I just let unsigned ints wrap around. I dunno, I like to see * all of the code actually written out b/c it makes more sense to * the casual code reviewer. Maybe I'll change it later. */ /* Drop duplicate packet */ if (session_sequence_number == (*highest_received_sequence_number)) return (0); /* In IPMI 2.0, sequence number 0 is special, and shouldn't happen */ if (ipmi_2_0_flag && !session_sequence_number) return (0); /* Check if sequence number is greater than highest received and is * within range */ if ((*highest_received_sequence_number) > (IPMI_SEQUENCE_NUMBER_MAX - IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT)) { wrap_val = IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT - (IPMI_SEQUENCE_NUMBER_MAX - (*highest_received_sequence_number)) - 1; /* In IPMI 2.0, sequence number 0 isn't possible, so adjust wrap_val */ if (ipmi_2_0_flag) wrap_val++; if ((session_sequence_number > (*highest_received_sequence_number)) || (session_sequence_number <= wrap_val)) { if (session_sequence_number > (*highest_received_sequence_number) && session_sequence_number <= IPMI_SEQUENCE_NUMBER_MAX) shift_num = session_sequence_number - (*highest_received_sequence_number); else { /* IPMI 2.0 Special Case b/c 0 isn't a legit sequence number */ if (ipmi_2_0_flag) shift_num = session_sequence_number + (IPMI_SEQUENCE_NUMBER_MAX - (*highest_received_sequence_number)); else shift_num = session_sequence_number + (IPMI_SEQUENCE_NUMBER_MAX - (*highest_received_sequence_number)) + 1; } (*highest_received_sequence_number) = session_sequence_number; (*previously_received_list) <<= shift_num; (*previously_received_list) |= (0x1 << (shift_num - 1)); return (1); } } else { if (session_sequence_number > (*highest_received_sequence_number) && (session_sequence_number - (*highest_received_sequence_number)) <= IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT) { shift_num = (session_sequence_number - (*highest_received_sequence_number)); (*highest_received_sequence_number) = session_sequence_number; (*previously_received_list) <<= shift_num; (*previously_received_list) |= (0x1 << (shift_num - 1)); return (1); } } /* Check if sequence number is lower than highest received, is * within range, and hasn't been seen yet */ if ((*highest_received_sequence_number) < IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT) { wrap_val = IPMI_SEQUENCE_NUMBER_MAX - (IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT - (*highest_received_sequence_number)) + 1; /* In IPMI 2.0, sequence number 0 isn't possible, so adjust wrap_val */ if (ipmi_2_0_flag) wrap_val--; if (session_sequence_number < (*highest_received_sequence_number) || session_sequence_number >= wrap_val) { if (session_sequence_number > (*highest_received_sequence_number) && session_sequence_number <= IPMI_SEQUENCE_NUMBER_MAX) { /* IPMI 2.0 Special Case b/c 0 isn't a legit sequence number */ if (ipmi_2_0_flag) shift_num = (*highest_received_sequence_number) + (IPMI_SEQUENCE_NUMBER_MAX - session_sequence_number); else shift_num = (*highest_received_sequence_number) + (IPMI_SEQUENCE_NUMBER_MAX - session_sequence_number) + 1; } else shift_num = (*highest_received_sequence_number) - session_sequence_number; /* Duplicate packet check*/ if ((*previously_received_list) & (0x1 << (shift_num - 1))) return (0); (*previously_received_list) |= (0x1 << (shift_num - 1)); return (1); } } else { if (session_sequence_number < (*highest_received_sequence_number) && session_sequence_number >= ((*highest_received_sequence_number) - IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT)) { shift_num = (*highest_received_sequence_number) - session_sequence_number; /* Duplicate packet check*/ if ((*previously_received_list) & (0x1 << (shift_num - 1))) return (0); (*previously_received_list) |= (0x1 << (shift_num - 1)); return (1); } } return (0); } int ipmi_check_session_sequence_number_1_5 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window) { return (_check_session_sequence_number (session_sequence_number, highest_received_sequence_number, previously_received_list, sequence_number_window, 0)); } int ipmi_check_session_sequence_number_2_0 (uint32_t session_sequence_number, uint32_t *highest_received_sequence_number, uint32_t *previously_received_list, unsigned int sequence_number_window) { return (_check_session_sequence_number (session_sequence_number, highest_received_sequence_number, previously_received_list, sequence_number_window, 1)); } int ipmi_check_authentication_capabilities_authentication_type (uint8_t authentication_type, fiid_obj_t obj_cmd) { uint8_t supported_authentication_type = 0; uint64_t val; if (!IPMI_1_5_AUTHENTICATION_TYPE_VALID (authentication_type) || !fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) { SET_ERRNO (EINVAL); return (-1); } switch (authentication_type) { case IPMI_AUTHENTICATION_TYPE_NONE: if (FIID_OBJ_GET (obj_cmd, "authentication_type.none", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } supported_authentication_type = val; break; case IPMI_AUTHENTICATION_TYPE_MD2: if (FIID_OBJ_GET (obj_cmd, "authentication_type.md2", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } supported_authentication_type = val; break; case IPMI_AUTHENTICATION_TYPE_MD5: if (FIID_OBJ_GET (obj_cmd, "authentication_type.md5", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } supported_authentication_type = val; break; case IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY: if (FIID_OBJ_GET (obj_cmd, "authentication_type.straight_password_key", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } supported_authentication_type = val; break; case IPMI_AUTHENTICATION_TYPE_OEM_PROP: if (FIID_OBJ_GET (obj_cmd, "authentication_type.oem_prop", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } supported_authentication_type = val; break; } if (supported_authentication_type) return (1); return (0); } int ipmi_check_authentication_capabilities_username (const char *username, const char *password, fiid_obj_t obj_cmd) { uint8_t authentication_status_anonymous_login; uint8_t authentication_status_null_username; uint8_t authentication_status_non_null_username; uint64_t val; if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_GET (obj_cmd, "authentication_status.anonymous_login", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } authentication_status_anonymous_login = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.null_username", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } authentication_status_null_username = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.non_null_username", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } authentication_status_non_null_username = val; if ((!username && !password && !authentication_status_anonymous_login) || (!username && password && !authentication_status_null_username) || (username && !authentication_status_non_null_username)) return (0); return (1); } int ipmi_check_authentication_capabilities_ipmi_2_0 (fiid_obj_t obj_cmd) { uint8_t ipmi_v20_extended_capabilities_available; uint8_t channel_supports_ipmi_v20_connections; uint64_t val; if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_GET (obj_cmd, "authentication_type.ipmi_v2.0_extended_capabilities_available", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } ipmi_v20_extended_capabilities_available = val; if (FIID_OBJ_GET (obj_cmd, "channel_supports_ipmi_v2.0_connections", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } channel_supports_ipmi_v20_connections = val; if (!ipmi_v20_extended_capabilities_available || !channel_supports_ipmi_v20_connections) return (0); return (1); } int ipmi_check_authentication_capabilities_k_g (const void *k_g, fiid_obj_t obj_cmd) { uint8_t authentication_status_k_g; uint64_t val; if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_GET (obj_cmd, "authentication_status.k_g", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } authentication_status_k_g = val; if ((!k_g && authentication_status_k_g) || (k_g && !authentication_status_k_g)) return (0); return (1); } int ipmi_check_open_session_maximum_privilege (uint8_t privilege_level, fiid_obj_t obj_cmd) { uint8_t maximum_privilege_level; uint64_t val; if (!IPMI_PRIVILEGE_LEVEL_VALID (privilege_level) || !fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_response) < 0) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_GET (obj_cmd, "maximum_privilege_level", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } maximum_privilege_level = val; if (privilege_level == IPMI_PRIVILEGE_LEVEL_USER && (maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_USER || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OEM)) return (1); else if (privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR && (maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OEM)) return (1); else if (privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN && (maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN || maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OEM)) return (1); else if (privilege_level == IPMI_PRIVILEGE_LEVEL_OEM && maximum_privilege_level == IPMI_PRIVILEGE_LEVEL_OEM) return (1); return (0); } freeipmi-1.6.4/libfreeipmi/util/ipmi-rmcpplus-util.c0000644002055400205540000015465113527331637022464 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "freeipmi/util/ipmi-rmcpplus-util.h" #include "freeipmi/cmds/ipmi-messaging-support-cmds.h" #include "freeipmi/debug/ipmi-debug.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/ipmi-rmcpplus-interface.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-privilege-level-spec.h" #include "freeipmi/spec/ipmi-rmcpplus-status-spec.h" #include "freeipmi/util/ipmi-cipher-suite-util.h" #include "libcommon/ipmi-crypt.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #include "secure.h" #define IPMI_KEY_CONSTANT_LENGTH 20 #define IPMI_MAX_K1_LENGTH 32 #define IPMI_MAX_K2_LENGTH 32 #define IPMI_MAX_SIK_KEY_LENGTH 32 #define IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH 32 #define IPMI_MAX_INTEGRITY_CHECK_VALUE_LENGTH 64 #define IPMI_MAX_KEY_DATA_LENGTH 1024 #define IPMI_MAX_INTEGRITY_PAD_LENGTH 8 #define IPMI_MAX_CONFIDENTIALITY_TRAILER_LENGTH 64 #define IPMI_MAX_INTEGRITY_DATA_LENGTH 32 int ipmi_calculate_sik (uint8_t authentication_algorithm, const void *k_g, unsigned int k_g_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void *sik, unsigned int sik_len) { int expected_digest_len, crypt_digest_len, computed_digest_len, rv = -1; unsigned int hash_algorithm, hash_flags, hash_data_len; uint8_t hash_data[IPMI_MAX_KEY_DATA_LENGTH]; uint8_t priv_byte = 0; /* k_g can be NULL, indicating a empty k_g */ if ((authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) || (k_g && !k_g_len) || (k_g && k_g_len > IPMI_MAX_K_G_LENGTH) || !remote_console_random_number || (remote_console_random_number_len < IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) || !managed_system_random_number || (managed_system_random_number_len < IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) || !IPMI_USER_NAME_LOOKUP_VALID (name_only_lookup) || !IPMI_PRIVILEGE_LEVEL_VALID (requested_privilege_level) || (user_name && !user_name_len) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || (!user_name && user_name_len) || !sik || !sik_len) { SET_ERRNO (EINVAL); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA1_DIGEST_LENGTH; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5) { hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_MD5_DIGEST_LENGTH; } else /* IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 */ { hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA256_DIGEST_LENGTH; } if ((crypt_digest_len = crypt_hash_digest_len (hash_algorithm)) < 0) { ERRNO_TRACE (errno); goto cleanup; } assert (crypt_digest_len == expected_digest_len); if (sik_len < expected_digest_len) { SET_ERRNO (EINVAL); goto cleanup; } k_g_len = (k_g_len > IPMI_MAX_SIK_KEY_LENGTH) ? IPMI_MAX_SIK_KEY_LENGTH : k_g_len; /* * Build up data for hashing. */ /* checks above and memcpy limits below ensure can't overflow unsigned int */ hash_data_len = 0; memcpy (hash_data + hash_data_len, (void *)remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH); hash_data_len += IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH; memcpy (hash_data + hash_data_len, (void *)managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH); hash_data_len += IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH; /* This part of the spec is wierd, gotta hack it out */ if (name_only_lookup) priv_byte |= 0x10; priv_byte |= (requested_privilege_level & 0xF); hash_data[hash_data_len++] = priv_byte; hash_data[hash_data_len++] = user_name_len; if (user_name && user_name_len > 0) { memcpy (hash_data + hash_data_len, (void *)user_name, user_name_len); hash_data_len += user_name_len; } if ((computed_digest_len = crypt_hash (hash_algorithm, hash_flags, k_g, k_g_len, hash_data, hash_data_len, sik, sik_len)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (computed_digest_len != crypt_digest_len) { SET_ERRNO (EINVAL); goto cleanup; } rv = computed_digest_len; cleanup: return (rv); } static int _calculate_k_rakp_hmac (unsigned int hash_algorithm, unsigned int expected_digest_len, const void *sik_key, unsigned int sik_key_len, void *k, unsigned int k_len, const void *constant, unsigned int constant_len) { int computed_digest_len, crypt_digest_len; if (!IPMI_CRYPT_HASH_ALGORITHM_VALID (hash_algorithm) || !sik_key || !sik_key_len || !k || !k_len || !constant || !constant_len || (sik_key_len < expected_digest_len) || (k_len < expected_digest_len) || (constant_len < IPMI_KEY_CONSTANT_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } if ((crypt_digest_len = crypt_hash_digest_len (hash_algorithm)) < 0) { ERRNO_TRACE (errno); return (-1); } assert (crypt_digest_len == expected_digest_len); /* SPEC: achu: I believe the length of the constant you pass in * is the digest_len, atleast according to IPMI 2.0 Spec Section * 13.32, "constants are constructed using a hexadecimal octet * value repeated up to the HMAC block size in length starting * with the constant 01h". */ if ((computed_digest_len = crypt_hash (hash_algorithm, IPMI_CRYPT_HASH_FLAGS_HMAC, sik_key, crypt_digest_len, constant, IPMI_KEY_CONSTANT_LENGTH, k, k_len)) < 0) { ERRNO_TRACE (errno); return (-1); } if (computed_digest_len != crypt_digest_len) { SET_ERRNO (EINVAL); return (-1); } return (computed_digest_len); } static int _calculate_k_rakp_hmac_sha1 (const void *sik_key, unsigned int sik_key_len, void *k, unsigned int k_len, const void *constant, unsigned int constant_len) { if (!sik_key || !sik_key_len || !k || !k_len || !constant || !constant_len || (constant_len < IPMI_KEY_CONSTANT_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } return (_calculate_k_rakp_hmac (IPMI_CRYPT_HASH_SHA1, IPMI_HMAC_SHA1_DIGEST_LENGTH, sik_key, sik_key_len, k, k_len, constant, constant_len)); } static int _calculate_k_rakp_hmac_md5 (const void *sik_key, unsigned int sik_key_len, void *k, unsigned int k_len, const void *constant, unsigned int constant_len) { if (!sik_key || !sik_key_len || !k || !k_len || !constant || !constant_len || (constant_len < IPMI_KEY_CONSTANT_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } return (_calculate_k_rakp_hmac (IPMI_CRYPT_HASH_MD5, IPMI_HMAC_MD5_DIGEST_LENGTH, sik_key, sik_key_len, k, k_len, constant, constant_len)); } static int _calculate_k_rakp_hmac_sha256 (const void *sik_key, unsigned int sik_key_len, void *k, unsigned int k_len, const void *constant, unsigned int constant_len) { if (!sik_key || !sik_key_len || !k || !k_len || !constant || !constant_len || (constant_len < IPMI_KEY_CONSTANT_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } return (_calculate_k_rakp_hmac (IPMI_CRYPT_HASH_SHA256, IPMI_HMAC_SHA256_DIGEST_LENGTH, sik_key, sik_key_len, k, k_len, constant, constant_len)); } static int _ipmi_calculate_k (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, void *k, unsigned int k_len, const void *constant, unsigned int constant_len) { if ((authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) || !sik_key || !sik_key_len || !k || !k_len || !constant || !constant_len || (constant_len < IPMI_KEY_CONSTANT_LENGTH)) { SET_ERRNO (EINVAL); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) return (_calculate_k_rakp_hmac_sha1 (sik_key, sik_key_len, k, k_len, constant, constant_len)); else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5) return (_calculate_k_rakp_hmac_md5 (sik_key, sik_key_len, k, k_len, constant, constant_len)); else /* IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 */ return (_calculate_k_rakp_hmac_sha256 (sik_key, sik_key_len, k, k_len, constant, constant_len)); } int ipmi_calculate_k1 (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, void *k1, unsigned int k1_len) { uint8_t constant[IPMI_KEY_CONSTANT_LENGTH] = { 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01, 0x01}; return (_ipmi_calculate_k (authentication_algorithm, sik_key, sik_key_len, k1, k1_len, constant, IPMI_KEY_CONSTANT_LENGTH)); } int ipmi_calculate_k2 (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, void *k1, unsigned int k1_len) { uint8_t constant[IPMI_KEY_CONSTANT_LENGTH] = { 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02, 0x02}; return (_ipmi_calculate_k (authentication_algorithm, sik_key, sik_key_len, k1, k1_len, constant, IPMI_KEY_CONSTANT_LENGTH)); } int ipmi_calculate_rmcpplus_session_keys (uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, const void *authentication_code_data, unsigned int authentication_code_data_len, const void *k_g, unsigned int k_g_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void **sik_key, unsigned int *sik_key_len, void **integrity_key, unsigned int *integrity_key_len, void **confidentiality_key, unsigned int *confidentiality_key_len) { void *sik_key_buf; unsigned int sik_key_buf_len; void *integrity_key_buf; unsigned int integrity_key_buf_len; void *confidentiality_key_buf; unsigned int confidentiality_key_buf_len; uint8_t k_g_buf[IPMI_2_0_MAX_PASSWORD_LENGTH]; void *k_g_ptr; unsigned int k_g_ptr_len; uint8_t sik[IPMI_MAX_SIK_KEY_LENGTH]; int sik_len; uint8_t k1[IPMI_MAX_K1_LENGTH]; int k1_len; uint8_t k2[IPMI_MAX_K2_LENGTH]; int k2_len; int rv = -1; if (!IPMI_CIPHER_SUITE_COMBINATION_VALID (authentication_algorithm, integrity_algorithm, confidentiality_algorithm) || !IPMI_AUTHENTICATION_ALGORITHM_SUPPORTED (authentication_algorithm) || !IPMI_INTEGRITY_ALGORITHM_SUPPORTED (integrity_algorithm) || !IPMI_CONFIDENTIALITY_ALGORITHM_SUPPORTED (confidentiality_algorithm) || !sik_key || !(*sik_key) || !sik_key_len || !(*sik_key_len) || !integrity_key || !(*integrity_key) || !integrity_key_len || !(*integrity_key_len) || !confidentiality_key || !(*confidentiality_key) || !confidentiality_key_len || !(*confidentiality_key_len)) { SET_ERRNO (EINVAL); return (-1); } sik_key_buf = *sik_key; sik_key_buf_len = *sik_key_len; integrity_key_buf = *integrity_key; integrity_key_buf_len = *integrity_key_len; confidentiality_key_buf = *confidentiality_key; confidentiality_key_buf_len = *confidentiality_key_len; if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE) { sik_key_buf = NULL; sik_key_buf_len = 0; } else /* authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 || authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 || authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 */ { if ((authentication_code_data_len && !authentication_code_data) || (authentication_code_data && authentication_code_data_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || (k_g_len && !k_g) || (k_g && k_g_len > IPMI_MAX_K_G_LENGTH) || !remote_console_random_number || (remote_console_random_number_len < IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) || !managed_system_random_number || (managed_system_random_number_len < IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) || !IPMI_USER_NAME_LOOKUP_VALID (name_only_lookup) || !IPMI_PRIVILEGE_LEVEL_VALID (requested_privilege_level) || (user_name && !user_name_len) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || (!user_name && user_name_len)) { SET_ERRNO (EINVAL); goto cleanup; } if (k_g && k_g_len) { k_g_ptr = (void *)k_g; k_g_ptr_len = k_g_len; } else { if (authentication_code_data && authentication_code_data_len) { k_g_ptr = (void *)authentication_code_data; k_g_ptr_len = authentication_code_data_len; } else { memset (k_g_buf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); k_g_ptr = k_g_buf; k_g_ptr_len = IPMI_2_0_MAX_PASSWORD_LENGTH; } } if ((sik_len = ipmi_calculate_sik (authentication_algorithm, k_g_ptr, k_g_ptr_len, remote_console_random_number, remote_console_random_number_len, managed_system_random_number, managed_system_random_number_len, name_only_lookup, requested_privilege_level, user_name, user_name_len, sik, IPMI_MAX_SIK_KEY_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (sik_key_buf_len < sik_len) { SET_ERRNO (EMSGSIZE); goto cleanup; } memcpy (sik_key_buf, sik, sik_len); sik_key_buf_len = sik_len; } if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) { integrity_key_buf = NULL; integrity_key_buf_len = 0; } else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) { if ((k1_len = ipmi_calculate_k1 (authentication_algorithm, sik_key_buf, sik_key_buf_len, k1, IPMI_MAX_K1_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (integrity_key_buf_len < k1_len) { SET_ERRNO (EMSGSIZE); goto cleanup; } memcpy (integrity_key_buf, k1, k1_len); integrity_key_buf_len = k1_len; } else /* IPMI_INTEGRITY_ALGORITHM_MD5_128 */ { if (authentication_code_data && (!authentication_code_data_len || integrity_key_buf_len < authentication_code_data_len)) { SET_ERRNO (EMSGSIZE); goto cleanup; } memset (integrity_key_buf, '\0', integrity_key_buf_len); if (authentication_code_data) { memcpy (integrity_key_buf, authentication_code_data, authentication_code_data_len); integrity_key_buf_len = authentication_code_data_len; } else integrity_key_buf_len = 0; } if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) { confidentiality_key_buf = NULL; confidentiality_key_buf_len = 0; } else /* IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 */ { if ((k2_len = ipmi_calculate_k2 (authentication_algorithm, sik_key_buf, sik_key_buf_len, k2, IPMI_MAX_K2_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (confidentiality_key_buf_len < k2_len) { SET_ERRNO (EMSGSIZE); goto cleanup; } memcpy (confidentiality_key_buf, k2, k2_len); confidentiality_key_buf_len = k2_len; } *sik_key = sik_key_buf; *sik_key_len = sik_key_buf_len; *integrity_key = integrity_key_buf; *integrity_key_len = integrity_key_buf_len; *confidentiality_key = confidentiality_key_buf; *confidentiality_key_len = confidentiality_key_buf_len; rv = 0; cleanup: /* secure_memset b/c k_g is a key */ secure_memset (k_g_buf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); return (rv); } int ipmi_calculate_rakp_3_key_exchange_authentication_code (uint8_t authentication_algorithm, const void *k_uid, unsigned int k_uid_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, uint32_t remote_console_session_id, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, void *key_exchange_authentication_code, unsigned int key_exchange_authentication_code_len) { uint8_t priv_byte = 0; uint8_t k_uid_buf[IPMI_2_0_MAX_PASSWORD_LENGTH]; void *k_uid_ptr; unsigned int k_uid_ptr_len; uint8_t buf[IPMI_MAX_KEY_DATA_LENGTH]; unsigned int buf_index = 0; uint8_t digest[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; unsigned int hash_algorithm, hash_flags; int digest_len, expected_digest_len; int rv = -1; if ((authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) || (k_uid && !k_uid_len) || (k_uid && k_uid_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || !managed_system_random_number || (managed_system_random_number_len < IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) || !IPMI_USER_NAME_LOOKUP_VALID (name_only_lookup) || !IPMI_PRIVILEGE_LEVEL_VALID (requested_privilege_level) || (user_name && !user_name_len) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || (!user_name && user_name_len) || !key_exchange_authentication_code) { SET_ERRNO (EINVAL); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE) { memset (key_exchange_authentication_code, '\0', key_exchange_authentication_code_len); return (0); } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { if (key_exchange_authentication_code_len < IPMI_HMAC_SHA1_DIGEST_LENGTH) { SET_ERRNO (EINVAL); goto cleanup; } expected_digest_len = IPMI_HMAC_SHA1_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5) { if (key_exchange_authentication_code_len < IPMI_HMAC_MD5_DIGEST_LENGTH) { SET_ERRNO (EINVAL); goto cleanup; } expected_digest_len = IPMI_HMAC_MD5_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else /* IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256 */ { if (key_exchange_authentication_code_len < IPMI_HMAC_SHA256_DIGEST_LENGTH) { SET_ERRNO (EINVAL); goto cleanup; } expected_digest_len = IPMI_HMAC_SHA256_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } /* checks above and memcpy limits below ensure can't overflow unsigned int */ memcpy (buf + buf_index, managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH); buf_index += IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH; buf[buf_index] = (remote_console_session_id & 0x000000ff); buf_index++; buf[buf_index] = (remote_console_session_id & 0x0000ff00) >> 8; buf_index++; buf[buf_index] = (remote_console_session_id & 0x00ff0000) >> 16; buf_index++; buf[buf_index] = (remote_console_session_id & 0xff000000) >> 24; buf_index++; /* This part of the spec is wierd, gotta hack it out */ if (name_only_lookup) priv_byte |= 0x10; priv_byte |= (requested_privilege_level & 0xF); buf[buf_index] = priv_byte; buf_index++; buf[buf_index] = user_name_len; buf_index++; if (user_name && user_name_len) { memcpy (buf + buf_index, user_name, user_name_len); buf_index += user_name_len; } if (k_uid && k_uid_len) { k_uid_ptr = (void *)k_uid; k_uid_ptr_len = k_uid_len; } else { memset (k_uid_buf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); k_uid_ptr = k_uid_buf; k_uid_ptr_len = IPMI_2_0_MAX_PASSWORD_LENGTH; } if ((digest_len = crypt_hash (hash_algorithm, hash_flags, k_uid_ptr, k_uid_ptr_len, buf, buf_index, digest, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (digest_len != expected_digest_len) { SET_ERRNO (EINVAL); goto cleanup; } memcpy (key_exchange_authentication_code, digest, digest_len); rv = digest_len; cleanup: return (rv); } int ipmi_rmcpplus_check_payload_pad (uint8_t confidentiality_algorithm, fiid_obj_t obj_rmcpplus_payload) { if ((confidentiality_algorithm != IPMI_CONFIDENTIALITY_ALGORITHM_NONE && confidentiality_algorithm != IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128) || !fiid_obj_valid (obj_rmcpplus_payload)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_payload, tmpl_rmcpplus_payload) < 0) { ERRNO_TRACE (errno); return (-1); } if (confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) /* No padding */ return (1); else /* IPMI_CONFIDENTIALITY_ALGORITHM_AES_CBC_128 */ { uint8_t confidentiality_trailer[IPMI_MAX_CONFIDENTIALITY_TRAILER_LENGTH]; int confidentiality_trailer_len; uint8_t pad_len; unsigned int i; if ((confidentiality_trailer_len = fiid_obj_get_data (obj_rmcpplus_payload, "confidentiality_trailer", confidentiality_trailer, IPMI_MAX_CONFIDENTIALITY_TRAILER_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_payload); return (-1); } if (!confidentiality_trailer_len) return (0); pad_len = confidentiality_trailer[confidentiality_trailer_len - 1]; if ((uint8_t)(confidentiality_trailer_len - 1) != pad_len) return (0); for (i = 0; i < pad_len; i++) { if (confidentiality_trailer[i] != i + 1) return (0); } return (1); } } int ipmi_rmcpplus_check_integrity_pad (fiid_obj_t obj_rmcpplus_session_trlr) { uint8_t integrity_pad[IPMI_MAX_INTEGRITY_PAD_LENGTH]; uint8_t pad_length; uint64_t val; unsigned int i; if (!fiid_obj_valid (obj_rmcpplus_session_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_rmcpplus_session_trlr, "pad_length", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } pad_length = val; if (!pad_length) return (1); if (pad_length > IPMI_INTEGRITY_PAD_MULTIPLE) return (0); if (fiid_obj_get_data (obj_rmcpplus_session_trlr, "integrity_pad", integrity_pad, IPMI_MAX_INTEGRITY_PAD_LENGTH) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); return (-1); } for (i = 0; i < pad_length; i++) { if (integrity_pad[i] != IPMI_INTEGRITY_PAD_DATA) return (0); } return (1); } int ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code (uint8_t authentication_algorithm, const void *k_uid, unsigned int k_uid_len, uint32_t remote_console_session_id, uint32_t managed_system_session_id, const void *remote_console_random_number, unsigned int remote_console_random_number_len, const void *managed_system_random_number, unsigned int managed_system_random_number_len, const void *managed_system_guid, unsigned int managed_system_guid_len, uint8_t name_only_lookup, uint8_t requested_privilege_level, const char *user_name, unsigned int user_name_len, fiid_obj_t obj_cmd) { uint8_t priv_byte = 0; uint8_t k_uid_buf[IPMI_2_0_MAX_PASSWORD_LENGTH]; void *k_uid_ptr; unsigned int k_uid_ptr_len; uint8_t buf[IPMI_MAX_KEY_DATA_LENGTH]; unsigned int buf_index = 0; uint8_t digest[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; unsigned int hash_algorithm = 0, hash_flags = 0; int digest_len = 0; uint8_t key_exchange_authentication_code[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int key_exchange_authentication_code_len; unsigned int compare_len = 0; int rv = -1; if ((authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) || (k_uid && !k_uid_len) || (k_uid && k_uid_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || !remote_console_random_number || (remote_console_random_number_len < IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) || !managed_system_random_number || (managed_system_random_number_len < IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) || !managed_system_guid || (managed_system_guid_len < IPMI_MANAGED_SYSTEM_GUID_LENGTH) || !IPMI_USER_NAME_LOOKUP_VALID (name_only_lookup) || !IPMI_PRIVILEGE_LEVEL_VALID (requested_privilege_level) || (user_name && !user_name_len) || (user_name && user_name_len > IPMI_MAX_USER_NAME_LENGTH) || (!user_name && user_name_len) || !fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0) { ERRNO_TRACE (errno); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { compare_len = IPMI_HMAC_SHA1_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5) { compare_len = IPMI_HMAC_MD5_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) { compare_len = IPMI_HMAC_SHA256_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } if ((key_exchange_authentication_code_len = fiid_obj_get_data (obj_cmd, "key_exchange_authentication_code", key_exchange_authentication_code, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE) { if (key_exchange_authentication_code_len) rv = 0; else rv = 1; goto cleanup; } if (key_exchange_authentication_code_len < compare_len) { rv = 0; goto cleanup; } /* checks above and memcpy limits below ensure we can't overflow an unsigned int */ buf[buf_index] = (remote_console_session_id & 0x000000ff); buf_index++; buf[buf_index] = (remote_console_session_id & 0x0000ff00) >> 8; buf_index++; buf[buf_index] = (remote_console_session_id & 0x00ff0000) >> 16; buf_index++; buf[buf_index] = (remote_console_session_id & 0xff000000) >> 24; buf_index++; buf[buf_index] = (managed_system_session_id & 0x000000ff); buf_index++; buf[buf_index] = (managed_system_session_id & 0x0000ff00) >> 8; buf_index++; buf[buf_index] = (managed_system_session_id & 0x00ff0000) >> 16; buf_index++; buf[buf_index] = (managed_system_session_id & 0xff000000) >> 24; buf_index++; memcpy (buf + buf_index, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH); buf_index += IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH; memcpy (buf + buf_index, managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH); buf_index += IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH; memcpy (buf + buf_index, managed_system_guid, IPMI_MANAGED_SYSTEM_GUID_LENGTH); buf_index += IPMI_MANAGED_SYSTEM_GUID_LENGTH; /* This part of the spec is wierd, gotta hack it out */ if (name_only_lookup) priv_byte |= 0x10; priv_byte |= (requested_privilege_level & 0xF); buf[buf_index] = priv_byte; buf_index++; buf[buf_index] = user_name_len; buf_index++; if (user_name && user_name_len) { memcpy (buf + buf_index, user_name, user_name_len); buf_index += user_name_len; } if (k_uid && k_uid_len) { k_uid_ptr = (void *)k_uid; k_uid_ptr_len = k_uid_len; } else { memset (k_uid_buf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); k_uid_ptr = k_uid_buf; k_uid_ptr_len = IPMI_2_0_MAX_PASSWORD_LENGTH; } if ((digest_len = crypt_hash (hash_algorithm, hash_flags, k_uid_ptr, k_uid_ptr_len, buf, buf_index, digest, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (key_exchange_authentication_code_len != digest_len) { rv = 0; goto cleanup; } rv = memcmp (digest, key_exchange_authentication_code, digest_len) ? 0 : 1; cleanup: return (rv); } int ipmi_rmcpplus_check_rakp_4_integrity_check_value (uint8_t authentication_algorithm, const void *sik_key, unsigned int sik_key_len, const void *remote_console_random_number, unsigned int remote_console_random_number_len, uint32_t managed_system_session_id, const void *managed_system_guid, unsigned int managed_system_guid_len, fiid_obj_t obj_cmd) { uint8_t buf[IPMI_MAX_KEY_DATA_LENGTH]; unsigned int buf_index = 0; uint8_t digest[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; unsigned int hash_algorithm = 0, hash_flags = 0; int digest_len = 0; unsigned int compare_len = 0; uint8_t integrity_check_value[IPMI_MAX_INTEGRITY_CHECK_VALUE_LENGTH]; int integrity_check_value_len, rv = -1; if ((authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && authentication_algorithm != IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) || !remote_console_random_number || (remote_console_random_number_len < IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) || !managed_system_guid || (managed_system_guid_len < IPMI_MANAGED_SYSTEM_GUID_LENGTH) || !fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0) { ERRNO_TRACE (errno); return (-1); } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { if (!sik_key || sik_key_len < IPMI_HMAC_SHA1_DIGEST_LENGTH) { SET_ERRNO (EINVAL); return (-1); } /* achu: For some reason they want SHA1_96 for this check, sigh */ compare_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5) { if (!sik_key || sik_key_len < IPMI_HMAC_MD5_DIGEST_LENGTH) { SET_ERRNO (EINVAL); return (-1); } compare_len = IPMI_HMAC_MD5_DIGEST_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } else if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA256) { if (!sik_key || sik_key_len < IPMI_HMAC_SHA256_DIGEST_LENGTH) { SET_ERRNO (EINVAL); return (-1); } compare_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; } if ((integrity_check_value_len = fiid_obj_get_data (obj_cmd, "integrity_check_value", integrity_check_value, IPMI_MAX_INTEGRITY_CHECK_VALUE_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); goto cleanup; } if (authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE) { if (integrity_check_value_len) rv = 0; else rv = 1; goto cleanup; } if (integrity_check_value_len < compare_len) { rv = 0; goto cleanup; } /* checks above and memcpy limits below ensure can't overflow unsigned int */ memcpy (buf + buf_index, remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH); buf_index += IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH; buf[buf_index] = (managed_system_session_id & 0x000000ff); buf_index++; buf[buf_index] = (managed_system_session_id & 0x0000ff00) >> 8; buf_index++; buf[buf_index] = (managed_system_session_id & 0x00ff0000) >> 16; buf_index++; buf[buf_index] = (managed_system_session_id & 0xff000000) >> 24; buf_index++; memcpy (buf + buf_index, managed_system_guid, IPMI_MANAGED_SYSTEM_GUID_LENGTH); buf_index += IPMI_MANAGED_SYSTEM_GUID_LENGTH; if ((digest_len = crypt_hash (hash_algorithm, hash_flags, sik_key, sik_key_len, buf, buf_index, digest, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (digest_len < compare_len) { SET_ERRNO (EINVAL); goto cleanup; } rv = memcmp (digest, integrity_check_value, compare_len) ? 0 : 1; cleanup: return (rv); } int ipmi_rmcpplus_check_packet_session_authentication_code (uint8_t integrity_algorithm, const void *pkt, unsigned int pkt_len, const void *integrity_key, unsigned int integrity_key_len, const void *authentication_code_data, unsigned int authentication_code_data_len, fiid_obj_t obj_rmcpplus_session_trlr) { unsigned int hash_algorithm, hash_flags; unsigned int expected_digest_len, compare_digest_len, hash_data_len = 0; uint8_t hash_data[IPMI_MAX_PAYLOAD_LENGTH]; uint8_t integrity_digest[IPMI_MAX_INTEGRITY_DATA_LENGTH]; uint8_t authentication_code[IPMI_MAX_INTEGRITY_DATA_LENGTH]; int rmcp_header_len, authentication_code_len, integrity_digest_len, crypt_digest_len, rv = -1; uint8_t pwbuf[IPMI_2_0_MAX_PASSWORD_LENGTH]; if ((integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_NONE && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96 && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128 && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_MD5_128 && integrity_algorithm != IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128) || !pkt || !pkt_len || (authentication_code_data && !authentication_code_data_len) || (authentication_code_data && authentication_code_data_len > IPMI_2_0_MAX_PASSWORD_LENGTH) || !fiid_obj_valid (obj_rmcpplus_session_trlr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_trlr, tmpl_rmcpplus_session_trlr) < 0) { ERRNO_TRACE (errno); return (-1); } if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) { hash_algorithm = IPMI_CRYPT_HASH_SHA1; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA1_DIGEST_LENGTH; compare_digest_len = IPMI_HMAC_SHA1_96_AUTHENTICATION_CODE_LENGTH; } else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) { hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_MD5_DIGEST_LENGTH; compare_digest_len = IPMI_HMAC_MD5_128_AUTHENTICATION_CODE_LENGTH; } else if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { hash_algorithm = IPMI_CRYPT_HASH_MD5; hash_flags = 0; expected_digest_len = IPMI_MD5_DIGEST_LENGTH; compare_digest_len = IPMI_MD5_128_AUTHENTICATION_CODE_LENGTH; } else /* IPMI_INTEGRITY_ALGORITHM_HMAC_SHA256_128 */ { hash_algorithm = IPMI_CRYPT_HASH_SHA256; hash_flags = IPMI_CRYPT_HASH_FLAGS_HMAC; expected_digest_len = IPMI_HMAC_SHA256_DIGEST_LENGTH; compare_digest_len = IPMI_HMAC_SHA256_128_AUTHENTICATION_CODE_LENGTH; } if ((crypt_digest_len = crypt_hash_digest_len (hash_algorithm)) < 0) { ERRNO_TRACE (errno); goto cleanup; } assert (crypt_digest_len == expected_digest_len); if ((rmcp_header_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((authentication_code_len = fiid_obj_get_data (obj_rmcpplus_session_trlr, "authentication_code", authentication_code, IPMI_MAX_INTEGRITY_DATA_LENGTH)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_trlr); goto cleanup; } if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) { if (authentication_code_len) rv = 0; else rv = 1; goto cleanup; } if (authentication_code_len != compare_digest_len) { rv = 0; goto cleanup; } /* Packet is too short, packet must be bogus :-) */ if (pkt_len <= (rmcp_header_len + compare_digest_len)) { rv = 0; goto cleanup; } if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { /* achu: Password must be zero padded */ memset (pwbuf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); if (authentication_code_data && authentication_code_data_len) memcpy (pwbuf, authentication_code_data, authentication_code_data_len); memcpy (hash_data + hash_data_len, pwbuf, IPMI_2_0_MAX_PASSWORD_LENGTH); hash_data_len += IPMI_2_0_MAX_PASSWORD_LENGTH; } memcpy (hash_data + hash_data_len, pkt + rmcp_header_len, pkt_len - rmcp_header_len - compare_digest_len); hash_data_len += pkt_len - rmcp_header_len - compare_digest_len; if (integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { memcpy (hash_data + hash_data_len, pwbuf, IPMI_2_0_MAX_PASSWORD_LENGTH); hash_data_len += IPMI_2_0_MAX_PASSWORD_LENGTH; } if ((integrity_digest_len = crypt_hash (hash_algorithm, hash_flags, integrity_key, integrity_key_len, hash_data, hash_data_len, integrity_digest, IPMI_MAX_INTEGRITY_DATA_LENGTH)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if (integrity_digest_len != crypt_digest_len) { SET_ERRNO (EINVAL); goto cleanup; } rv = memcmp (integrity_digest, authentication_code, compare_digest_len) ? 0 : 1; cleanup: /* secure_memset b/c contains password */ secure_memset (pwbuf, '\0', IPMI_2_0_MAX_PASSWORD_LENGTH); /* secure_memset b/c contains password */ secure_memset (hash_data, '\0', hash_data_len); return (rv); } int ipmi_rmcpplus_check_payload_type (fiid_obj_t obj_rmcpplus_session_hdr, uint8_t payload_type) { uint8_t l_payload_type; uint64_t val; if (!IPMI_PAYLOAD_TYPE_VALID (payload_type) || !fiid_obj_valid (obj_rmcpplus_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_hdr, tmpl_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "payload_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } l_payload_type = val; return ((payload_type == l_payload_type) ? 1 : 0); } int ipmi_rmcpplus_check_status_code (fiid_obj_t obj_cmd, uint8_t status_code) { uint8_t l_rmcpplus_status_code; uint64_t val; if (!fiid_obj_valid (obj_cmd) || !RMCPPLUS_STATUS_VALID (status_code) || (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_response) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_3) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0)) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_cmd, "rmcpplus_status_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } l_rmcpplus_status_code = val; return ((status_code == l_rmcpplus_status_code) ? 1 : 0); } int ipmi_rmcpplus_check_message_tag (fiid_obj_t obj_cmd, uint8_t message_tag) { uint8_t l_message_tag; uint64_t val; if (!fiid_obj_valid (obj_cmd) || (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_request) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_response) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_1) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_3) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0)) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_cmd, "message_tag", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } l_message_tag = val; return ((message_tag == l_message_tag) ? 1 : 0); } int ipmi_rmcpplus_check_remote_console_session_id (fiid_obj_t obj_cmd, uint32_t remote_console_session_id) { uint32_t l_remote_console_session_id; uint64_t val; if (!fiid_obj_valid (obj_cmd) || (FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_request) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_open_session_response) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_2) < 0 && FIID_OBJ_TEMPLATE_COMPARE (obj_cmd, tmpl_rmcpplus_rakp_message_4) < 0)) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_cmd, "remote_console_session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } l_remote_console_session_id = val; return ((remote_console_session_id == l_remote_console_session_id) ? 1 : 0); } int ipmi_rmcpplus_check_session_id (fiid_obj_t obj_rmcpplus_session_hdr, uint32_t session_id) { uint32_t l_session_id; uint64_t val; if (!fiid_obj_valid (obj_rmcpplus_session_hdr)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (obj_rmcpplus_session_hdr, tmpl_rmcpplus_session_hdr) < 0) { ERRNO_TRACE (errno); return (-1); } if (FIID_OBJ_GET (obj_rmcpplus_session_hdr, "session_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_rmcpplus_session_hdr); return (-1); } l_session_id = val; return ((session_id == l_session_id) ? 1 : 0); } int ipmi_rmcpplus_calculate_payload_type (const void *pkt, unsigned int pkt_len, uint8_t *payload_type) { int rmcp_hdr_len; uint8_t auth_type; if (!pkt || !pkt_len || !payload_type) { SET_ERRNO (EINVAL); return (-1); } if ((rmcp_hdr_len = fiid_template_len_bytes (tmpl_rmcp_hdr)) < 0) { ERRNO_TRACE (errno); return (-1); } if (pkt_len <= rmcp_hdr_len) { SET_ERRNO (EINVAL); return (-1); } auth_type = *((uint8_t *)pkt + rmcp_hdr_len); if (auth_type != IPMI_AUTHENTICATION_TYPE_RMCPPLUS) { SET_ERRNO (EINVAL); return (-1); } (*payload_type) = *((uint8_t *)pkt + rmcp_hdr_len + 1); (*payload_type) &= 0x3F; if (!IPMI_PAYLOAD_TYPE_VALID ((*payload_type))) { SET_ERRNO (EINVAL); return (-1); } return (0); } freeipmi-1.6.4/libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c0000644002055400205540000036124513527331637026166 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi/util/ipmi-sensor-and-event-code-tables-util.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-dell-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-hp-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-hp-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-hp-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-numbers-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-intel-spec.h" #include "freeipmi/spec/oem/ipmi-event-reading-type-code-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-supermicro-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-and-event-code-tables-oem-wistron-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-wistron-spec.h" #include "freeipmi/util/ipmi-sensor-util.h" #include "freeipmi/fiid/fiid.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" static char *_ipmi_event_message_separator = " ; "; #define EVENT_BUFLEN 1024 #define EVENT_MAX_MESSAGES 16 /* 16th bit reserved, see Get Sensor Reading command in spec */ #define IPMI_MAX_SENSOR_AND_EVENT_OFFSET 15 int ipmi_event_reading_type_code_class (uint8_t event_reading_type_code) { if (IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) return (IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD); if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code)) return (IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE); if (IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) return (IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE); if (IPMI_EVENT_READING_TYPE_CODE_IS_OEM (event_reading_type_code)) return (IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM); return (IPMI_EVENT_READING_TYPE_CODE_CLASS_UNKNOWN); } static int _snprintf (char *buf, unsigned int buflen, const char * const fmt, ...) { int rv; va_list ap; assert (buf && buflen && fmt); va_start (ap, fmt); rv = vsnprintf (buf, buflen, fmt, ap); va_end (ap); return (rv); } static int get_physical_security_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY_LAN_LEASH_LOST) return (_snprintf (buf, buflen, "Network controller #%d", event_data2)); SET_ERRNO (EINVAL); return (-1); } static int get_system_firmware_progress_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR && event_data2 <= ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_error[event_data2])); if (offset == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_HANG && event_data2 <= ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_hang[event_data2])); if (offset == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_PROGRESS && event_data2 <= ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_system_firmware_progress_event_data2_offset_system_firmware_progress[event_data2])); SET_ERRNO (EINVAL); return (-1); } static int get_event_logging_disabled_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED) return (_snprintf (buf, buflen, "Memory module/device #%d", event_data2)); if (offset == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_TYPE_LOGGING_DISABLED) return (_snprintf (buf, buflen, "Event/Reading Type Code #%d", event_data2)); if (offset == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED) return (_snprintf (buf, buflen, "Instance ID #%d", event_data2)); SET_ERRNO (EINVAL); return (-1); } static int _get_system_event_event_data2_message_offset_entry_added_to_auxiliary_log (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 4, "log_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "log_entry_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t log_type; uint8_t log_entry_action; char *str1 = NULL; char *str2 = NULL; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "log_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } log_type = val; if (FIID_OBJ_GET (obj, "log_entry_action", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } log_entry_action = val; if (log_type <= ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action_max_index) str1 = (char *)ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_entry_action[log_type]; if (log_entry_action <= ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type_max_index) str2 = (char *)ipmi_sensor_type_system_event_event_data2_offset_entry_added_to_auxiliary_log_log_type[log_entry_action]; if (str1 || str2) rv = _snprintf (buf, buflen, "%s%s%s", (str1 ? str1 : ""), ((str1 && str2) ? _ipmi_event_message_separator : ""), (str2 ? str2 : "")); cleanup: fiid_obj_destroy (obj); return (rv); } static int _strcat_pef_action (char *buf, unsigned int buflen, uint8_t flag, int str_len, int index) { if (flag) { int len_temp; len_temp = strlen (ipmi_sensor_type_system_event_event_data2_offset_pef_action[index]); if (str_len) len_temp += strlen (_ipmi_event_message_separator); if ((str_len + len_temp) > buflen) { SET_ERRNO (ENOSPC); return (-1); } if (!str_len) strcat (buf, ipmi_sensor_type_system_event_event_data2_offset_pef_action[index]); else { strcat (buf, _ipmi_event_message_separator); strcat (buf, "%s"); } return (str_len + len_temp); } return (str_len); } static int _get_system_event_event_data2_message_offset_pef_action (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 1, "alert", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_off", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "power_cycle", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "oem_action", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "diagonstic_interrupt", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t alert, power_off, reset, power_cycle, oem_action, diagnostic_interrupt; fiid_obj_t obj = NULL; int str_len = 0; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "alert", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } alert = val; if (FIID_OBJ_GET (obj, "power_off", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } power_off = val; if (FIID_OBJ_GET (obj, "reset", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } reset = val; if (FIID_OBJ_GET (obj, "power_cycle", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } power_cycle = val; if (FIID_OBJ_GET (obj, "oem_action", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } oem_action = val; if (FIID_OBJ_GET (obj, "diagnostic_interrupt", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } diagnostic_interrupt = val; memset (buf, '\0', buflen); if ((str_len = _strcat_pef_action (buf, buflen, alert, str_len, 0)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((str_len = _strcat_pef_action (buf, buflen, power_off, str_len, 1)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((str_len = _strcat_pef_action (buf, buflen, reset, str_len, 2)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((str_len = _strcat_pef_action (buf, buflen, power_cycle, str_len, 3)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((str_len = _strcat_pef_action (buf, buflen, oem_action, str_len, 4)) < 0) { ERRNO_TRACE (errno); goto cleanup; } if ((str_len = _strcat_pef_action (buf, buflen, diagnostic_interrupt, str_len, 5)) < 0) { ERRNO_TRACE (errno); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj); return (rv); } static int _get_system_event_event_data2_message_offset_timestamp_clock_synch (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 4, "timestamp_clock_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "first_second", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t timestamp_clock_type; uint8_t first_second; char *str1 = NULL; char *str2 = NULL; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "timestamp_clock_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } timestamp_clock_type = val; if (FIID_OBJ_GET (obj, "first_second", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } first_second = val; if (timestamp_clock_type <= ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type_max_index) str1 = (char *)ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_timestamp_clock_type[timestamp_clock_type]; if (first_second <= ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second_max_index) str2 = (char *)ipmi_sensor_type_system_event_event_data2_offset_timestamp_clock_synch_first_second[first_second]; rv = _snprintf (buf, buflen, "%s%s%s", str1 ? str1 : "", _ipmi_event_message_separator, str2 ? str2 : ""); cleanup: fiid_obj_destroy (obj); return (rv); } static int get_system_event_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_SYSTEM_EVENT_ENTRY_ADDED_TO_AUXILIARY_LOG) return (_get_system_event_event_data2_message_offset_entry_added_to_auxiliary_log (offset, event_data2, buf, buflen)); if (offset == IPMI_SENSOR_TYPE_SYSTEM_EVENT_PEF_ACTION) return (_get_system_event_event_data2_message_offset_pef_action (offset, event_data2, buf, buflen)); if (offset == IPMI_SENSOR_TYPE_SYSTEM_EVENT_TIMESTAMP_CLOCK_SYNCH) return (_get_system_event_event_data2_message_offset_timestamp_clock_synch (offset, event_data2, buf, buflen)); SET_ERRNO (EINVAL); return (-1); } static int get_chip_set_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_CHIP_SET_SOFT_POWER_CONTROL_FAILURE && event_data2 <= ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_chip_set_event_data2_offset_soft_power_control_failure[event_data2])); SET_ERRNO (EINVAL); return (-1); } static int get_system_boot_initiated_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_SYSTEM_RESTART) { fiid_template_t tmpl_event_data2 = { { 4, "restart_cause", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create ( tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "restart_cause", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (val <= ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause_max_index) rv = _snprintf (buf, buflen, ipmi_sensor_type_system_boot_initiated_event_data2_offset_system_restart_restart_cause[val]); cleanup: fiid_obj_destroy (obj); return (rv); } SET_ERRNO (EINVAL); return (-1); } static int get_slot_connector_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 7, "slot_connector_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; fiid_obj_t obj = NULL; int rv = -1; assert (buf && buflen); if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "slot_connector_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (val <= ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type_max_index) rv = _snprintf (buf, buflen, ipmi_sensor_type_slot_connector_event_data2_offset_slot_holds_spare_device_slot_connector_type[val]); cleanup: fiid_obj_destroy (obj); return (rv); } static int get_watchdog2_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 4, "timer_at_expiration", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "interrupt_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t timer_at_expiration; uint8_t interrupt_type; char *str1 = NULL; char *str2 = NULL; fiid_obj_t obj = NULL; int rv = -1; assert (buf && buflen); if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "timer_at_expiration", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } timer_at_expiration = val; if (FIID_OBJ_GET (obj, "interrupt_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } interrupt_type = val; if (timer_at_expiration <= ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration_max_index) str1 = (char *)ipmi_sensor_type_watchdog2_event_data2_timer_use_at_expiration[timer_at_expiration]; if (interrupt_type <= ipmi_sensor_type_watchdog2_event_data2_interrupt_type_max_index) str2 = (char *)ipmi_sensor_type_watchdog2_event_data2_interrupt_type[interrupt_type]; if (str1 || str2) rv = _snprintf (buf, buflen, "%s%s%s", (str1 ? str1 : ""), ((str1 && str2) ? _ipmi_event_message_separator : ""), (str2 ? str2 : "")); cleanup: fiid_obj_destroy (obj); return (rv); } static int get_management_subsystem_health_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { int rv = -1; assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_ACCESS_DEGRADED_OR_UNAVAILABLE || offset == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_FAILURE) { rv = _snprintf (buf, buflen, "Sensor Number #%d", event_data2); return (rv); } else if (offset == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_FRU_FAILURE) { fiid_template_t tmpl_event_data2 = { { 3, "private_bus_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "lun", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "fru_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t private_bus_id, lun, fru_device; fiid_obj_t obj = NULL; char *str = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "private_bus_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } private_bus_id = val; if (FIID_OBJ_GET (obj, "lun", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } lun = val; if (FIID_OBJ_GET (obj, "fru_device", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } fru_device = val; if (fru_device <= ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device_max_index) str = (char *)ipmi_sensor_type_management_subsystem_health_event_data2_offset_fru_failure_logical_fru_device[fru_device]; rv = _snprintf (buf, buflen, "%s%sLUN for Master Write-Read command or FRU Command #%d%sPrivate bus ID #%d", str ? str : "", str ? _ipmi_event_message_separator : "", lun, _ipmi_event_message_separator, private_bus_id); cleanup: fiid_obj_destroy (obj); return (rv); } SET_ERRNO (EINVAL); return (-1); } static int get_session_audit_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_SESSION_AUDIT_SESSION_ACTIVATED) { fiid_template_t tmpl_event_data2 = { { 6, "user_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t user_id; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "user_id", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } user_id = val; if (!user_id) rv = _snprintf (buf, buflen, "User ID for user that activated session = Unspecified"); else rv = _snprintf (buf, buflen, "User ID for user that activated session #%u", user_id); cleanup: fiid_obj_destroy (obj); return (rv); } SET_ERRNO (EINVAL); return (-1); } static int get_version_change_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { assert (buf && buflen); if (event_data2 <= ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_version_change_event_data2_offset_software_or_fw_change_detected_with_associated_entity_was_successful_version_change_type[event_data2])); SET_ERRNO (EINVAL); return (-1); } static int get_fru_state_event_data2_message (unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data2 = { { 4, "previous_state_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "cause_of_state_change", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t previous_state_offset; uint8_t cause_of_state_change; char *previous_state_offset_str = NULL; char *cause_of_state_change_str = NULL; fiid_obj_t obj = NULL; int rv = -1; assert (buf && buflen); if (!(obj = fiid_obj_create (tmpl_event_data2))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data2, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "previous_state_offset", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } previous_state_offset = val; if (FIID_OBJ_GET (obj, "cause_of_state_change", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } cause_of_state_change = val; if (previous_state_offset <= ipmi_sensor_type_fru_state_max_index) previous_state_offset_str = (char *)ipmi_sensor_type_fru_state[previous_state_offset]; if (cause_of_state_change <= ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change_max_index) cause_of_state_change_str = (char *)ipmi_sensor_type_fru_state_event_data2_offset_communication_lost_cause_of_state_change[cause_of_state_change]; rv = _snprintf (buf, buflen, "Previous State = %s%s%s", previous_state_offset_str ? previous_state_offset_str : "", cause_of_state_change_str ? _ipmi_event_message_separator : "", cause_of_state_change_str ? cause_of_state_change_str : ""); cleanup: fiid_obj_destroy (obj); return (rv); } static int get_power_supply_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_POWER_SUPPLY_CONFIGURATION_ERROR) { fiid_template_t tmpl_event_data3 = { { 4, "event_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data3))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data3, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "event_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (val <= ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type_max_index) rv = _snprintf (buf, buflen, ipmi_sensor_type_power_supply_event_data3_offset_configuration_error_error_type[val]); cleanup: fiid_obj_destroy (obj); return (rv); } SET_ERRNO (EINVAL); return (-1); } static int get_memory_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_MEMORY_SPARE) return (_snprintf (buf, buflen, "Memory module/device #%d", event_data3)); SET_ERRNO (EINVAL); return (-1); } static int get_event_logging_disabled_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); switch (offset) { case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_TYPE_LOGGING_DISABLED: { fiid_template_t tmpl_event_data3 = { { 4, "event_offset", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "assertion_deassertion_event", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "logging_disabled_all_events", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t event_offset; uint8_t assertion_deassertion_event; uint8_t logging_disabled_all_events; fiid_obj_t obj = NULL; char *str1 = NULL; char *str2 = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data3))) { ERRNO_TRACE (errno); goto cleanup1; } if (fiid_obj_set_all (obj, &event_data3, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup1; } if (FIID_OBJ_GET (obj, "event_offset", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup1; } event_offset = val; if (FIID_OBJ_GET (obj, "assertion_deassertion_event", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup1; } assertion_deassertion_event = val; if (FIID_OBJ_GET (obj, "logging_disabled_all_events", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup1; } logging_disabled_all_events = val; if (assertion_deassertion_event <= ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event_max_index) str1 = (char *)ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_assertion_event[assertion_deassertion_event]; if (logging_disabled_all_events <= ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events_max_index) str2 = (char *)ipmi_sensor_type_event_logging_disabled_event_data3_offset_event_type_logging_disabled_logging_disabled_all_events[logging_disabled_all_events]; rv = _snprintf (buf, buflen, "Event Offset #%d%s%s%s%s", event_offset, (str1 || str2) ? _ipmi_event_message_separator : "", (str1 ? str1 : ""), ((str1 && str2 && strlen (str2)) ? _ipmi_event_message_separator : ""), (str2 ? str2 : "")); cleanup1: fiid_obj_destroy (obj); return (rv); } case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_SEL_ALMOST_FULL: return (_snprintf (buf, buflen, "%d%% full", event_data3)); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED: { fiid_template_t tmpl_event_data3 = { { 7, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "number_type", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t number_type; char *str = NULL; fiid_obj_t obj = NULL; int rv = -1; if (!(obj = fiid_obj_create (tmpl_event_data3))) { ERRNO_TRACE (errno); goto cleanup2; } if (fiid_obj_set_all (obj, &event_data3, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup2; } if (FIID_OBJ_GET (obj, "number_type", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup2; } number_type = val; if (number_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED_EVENT_DATA3_OFFSET_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED_ENTITY_INSTANCE_NUMBER) str = "Entity Instance Number"; else str = "Vendor-specific Processor Number"; rv = _snprintf (buf, buflen, "%s = #%d", str, event_data2); cleanup2: fiid_obj_destroy (obj); return (rv); } } SET_ERRNO (EINVAL); return (-1); } static int get_chip_set_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_CHIP_SET_SOFT_POWER_CONTROL_FAILURE && event_data3 <= ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure_max_index) return (_snprintf (buf, buflen, ipmi_sensor_type_chip_set_event_data3_offset_soft_power_control_failure[event_data3])); SET_ERRNO (EINVAL); return (-1); } static int get_system_boot_initiated_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED_SYSTEM_RESTART) return (_snprintf (buf, buflen, "Channel Number used to deliver command that generated restart #%d", event_data3)); SET_ERRNO (EINVAL); return (-1); } static int get_slot_connector_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); return (_snprintf (buf, buflen, "Slot/Connector #%d", event_data3)); } static int get_management_subsystem_health_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { assert (buf && buflen); if (offset == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH_FRU_FAILURE) return (_snprintf (buf, buflen, "FRU Device ID/Slave Address #%d", event_data3)); SET_ERRNO (EINVAL); return (-1); } static int get_session_audit_event_data3_message (unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { fiid_template_t tmpl_event_data3 = { { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "deactivation_cause", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; uint64_t val; uint8_t channel_number; uint8_t deactivation_cause; fiid_obj_t obj = NULL; char *str = NULL; int rv = -1; assert (buf && buflen); if (!(obj = fiid_obj_create (tmpl_event_data3))) { ERRNO_TRACE (errno); goto cleanup; } if (fiid_obj_set_all (obj, &event_data3, sizeof (uint8_t)) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } if (FIID_OBJ_GET (obj, "channel_number", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } channel_number = val; if (FIID_OBJ_GET (obj, "deactivation_cause", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj); goto cleanup; } deactivation_cause = val; /* output deactivation case only if deactivation offset occurred */ if (offset == IPMI_SENSOR_TYPE_SESSION_AUDIT_SESSION_DEACTIVATED) { if (deactivation_cause <= ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause_max_index) str = (char *)ipmi_sensor_type_session_audit_event_data3_offset_session_deactivated_deactivation_cause[deactivation_cause]; } rv = _snprintf (buf, buflen, "Channel number that session was activated/deactivated = %d%s%s", channel_number, (str) ? _ipmi_event_message_separator : "", str ? str : ""); cleanup: fiid_obj_destroy (obj); return (rv); } /***************************************************/ static int _get_event_message (unsigned int offset, char *buf, unsigned int buflen, unsigned int offset_max, const char * const string_array[]) { assert (buf && buflen); if (offset > offset_max) { SET_ERRNO (EINVAL); return (-1); } return (snprintf (buf, buflen, "%s", string_array[offset])); } int ipmi_event_message_separator (const char *separator) { if (!separator) { SET_ERRNO (EINVAL); return (-1); } _ipmi_event_message_separator = (char *)separator; return (0); } int ipmi_get_generic_event_message (uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (event_reading_type_code) { case IPMI_EVENT_READING_TYPE_CODE_THRESHOLD: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_threshold_max_index, ipmi_generic_event_reading_type_code_threshold)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_state_max_index, ipmi_generic_event_reading_type_code_transition_state)); case IPMI_EVENT_READING_TYPE_CODE_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_state_max_index, ipmi_generic_event_reading_type_code_state)); case IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_predictive_failure_max_index, ipmi_generic_event_reading_type_code_predictive_failure)); case IPMI_EVENT_READING_TYPE_CODE_LIMIT: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_limit_max_index, ipmi_generic_event_reading_type_code_limit)); case IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_performance_max_index, ipmi_generic_event_reading_type_code_performance)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_severity_max_index, ipmi_generic_event_reading_type_code_transition_severity)); case IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_device_present_max_index, ipmi_generic_event_reading_type_code_device_present)); case IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_device_enabled_max_index, ipmi_generic_event_reading_type_code_device_enabled)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_availability_max_index, ipmi_generic_event_reading_type_code_transition_availability)); case IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_redundancy_max_index, ipmi_generic_event_reading_type_code_redundancy)); case IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_acpi_power_state_max_index, ipmi_generic_event_reading_type_code_acpi_power_state)); } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_sensor_type_message (uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (sensor_type) { case IPMI_SENSOR_TYPE_PHYSICAL_SECURITY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_physical_security_max_index, ipmi_sensor_type_physical_security)); case IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_platform_security_violation_attempt_max_index, ipmi_sensor_type_platform_security_violation_attempt)); case IPMI_SENSOR_TYPE_PROCESSOR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_processor_max_index, ipmi_sensor_type_processor)); case IPMI_SENSOR_TYPE_POWER_SUPPLY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_power_supply_max_index, ipmi_sensor_type_power_supply)); case IPMI_SENSOR_TYPE_POWER_UNIT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_power_unit_max_index, ipmi_sensor_type_power_unit)); case IPMI_SENSOR_TYPE_MEMORY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_memory_max_index, ipmi_sensor_type_memory)); case IPMI_SENSOR_TYPE_DRIVE_SLOT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_drive_slot_max_index, ipmi_sensor_type_drive_slot)); case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_firmware_progress_max_index, ipmi_sensor_type_system_firmware_progress)); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_event_logging_disabled_max_index, ipmi_sensor_type_event_logging_disabled)); case IPMI_SENSOR_TYPE_WATCHDOG1: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_watchdog1_max_index, ipmi_sensor_type_watchdog1)); case IPMI_SENSOR_TYPE_SYSTEM_EVENT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_event_max_index, ipmi_sensor_type_system_event)); case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_critical_interrupt_max_index, ipmi_sensor_type_critical_interrupt)); case IPMI_SENSOR_TYPE_BUTTON_SWITCH: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_button_switch_max_index, ipmi_sensor_type_button_switch)); case IPMI_SENSOR_TYPE_CHIP_SET: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_chip_set_max_index, ipmi_sensor_type_chip_set)); case IPMI_SENSOR_TYPE_CABLE_INTERCONNECT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_cable_interconnect_max_index, ipmi_sensor_type_cable_interconnect)); case IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_boot_initiated_max_index, ipmi_sensor_type_system_boot_initiated)); case IPMI_SENSOR_TYPE_BOOT_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_boot_error_max_index, ipmi_sensor_type_boot_error)); case IPMI_SENSOR_TYPE_OS_BOOT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_os_boot_max_index, ipmi_sensor_type_os_boot)); case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_os_critical_stop_max_index, ipmi_sensor_type_os_critical_stop)); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_slot_connector_max_index, ipmi_sensor_type_slot_connector)); case IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_acpi_power_state_max_index, ipmi_sensor_type_acpi_power_state)); case IPMI_SENSOR_TYPE_WATCHDOG2: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_watchdog2_max_index, ipmi_sensor_type_watchdog2)); case IPMI_SENSOR_TYPE_PLATFORM_ALERT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_platform_alert_max_index, ipmi_sensor_type_platform_alert)); case IPMI_SENSOR_TYPE_ENTITY_PRESENCE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_entity_presence_max_index, ipmi_sensor_type_entity_presence)); case IPMI_SENSOR_TYPE_LAN: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_lan_max_index, ipmi_sensor_type_lan)); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_management_subsystem_health_max_index, ipmi_sensor_type_management_subsystem_health)); case IPMI_SENSOR_TYPE_BATTERY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_battery_max_index, ipmi_sensor_type_battery)); case IPMI_SENSOR_TYPE_SESSION_AUDIT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_session_audit_max_index, ipmi_sensor_type_session_audit)); case IPMI_SENSOR_TYPE_VERSION_CHANGE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_version_change_max_index, ipmi_sensor_type_version_change)); case IPMI_SENSOR_TYPE_FRU_STATE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_fru_state_max_index, ipmi_sensor_type_fru_state)); } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_generic_event_message_short (uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (event_reading_type_code) { case IPMI_EVENT_READING_TYPE_CODE_THRESHOLD: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_threshold_short_max_index, ipmi_generic_event_reading_type_code_threshold_short)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_state_short_max_index, ipmi_generic_event_reading_type_code_transition_state_short)); case IPMI_EVENT_READING_TYPE_CODE_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_state_short_max_index, ipmi_generic_event_reading_type_code_state_short)); case IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_predictive_failure_short_max_index, ipmi_generic_event_reading_type_code_predictive_failure_short)); case IPMI_EVENT_READING_TYPE_CODE_LIMIT: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_limit_short_max_index, ipmi_generic_event_reading_type_code_limit_short)); case IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_performance_short_max_index, ipmi_generic_event_reading_type_code_performance_short)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_severity_short_max_index, ipmi_generic_event_reading_type_code_transition_severity_short)); case IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_device_present_short_max_index, ipmi_generic_event_reading_type_code_device_present_short)); case IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_device_enabled_short_max_index, ipmi_generic_event_reading_type_code_device_enabled_short)); case IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_transition_availability_short_max_index, ipmi_generic_event_reading_type_code_transition_availability_short)); case IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_redundancy_short_max_index, ipmi_generic_event_reading_type_code_redundancy_short)); case IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_acpi_power_state_short_max_index, ipmi_generic_event_reading_type_code_acpi_power_state_short)); } return (-1); } int ipmi_get_sensor_type_message_short (uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (sensor_type) { case IPMI_SENSOR_TYPE_PHYSICAL_SECURITY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_physical_security_short_max_index, ipmi_sensor_type_physical_security_short)); case IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_platform_security_violation_attempt_short_max_index, ipmi_sensor_type_platform_security_violation_attempt_short)); case IPMI_SENSOR_TYPE_PROCESSOR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_processor_short_max_index, ipmi_sensor_type_processor_short)); case IPMI_SENSOR_TYPE_POWER_SUPPLY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_power_supply_short_max_index, ipmi_sensor_type_power_supply_short)); case IPMI_SENSOR_TYPE_POWER_UNIT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_power_unit_short_max_index, ipmi_sensor_type_power_unit_short)); case IPMI_SENSOR_TYPE_MEMORY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_memory_short_max_index, ipmi_sensor_type_memory_short)); case IPMI_SENSOR_TYPE_DRIVE_SLOT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_drive_slot_short_max_index, ipmi_sensor_type_drive_slot_short)); case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_firmware_progress_short_max_index, ipmi_sensor_type_system_firmware_progress_short)); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_event_logging_disabled_short_max_index, ipmi_sensor_type_event_logging_disabled_short)); case IPMI_SENSOR_TYPE_WATCHDOG1: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_watchdog1_short_max_index, ipmi_sensor_type_watchdog1_short)); case IPMI_SENSOR_TYPE_SYSTEM_EVENT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_event_short_max_index, ipmi_sensor_type_system_event_short)); case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_critical_interrupt_short_max_index, ipmi_sensor_type_critical_interrupt_short)); case IPMI_SENSOR_TYPE_BUTTON_SWITCH: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_button_switch_short_max_index, ipmi_sensor_type_button_switch_short)); case IPMI_SENSOR_TYPE_CHIP_SET: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_chip_set_short_max_index, ipmi_sensor_type_chip_set_short)); case IPMI_SENSOR_TYPE_CABLE_INTERCONNECT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_cable_interconnect_short_max_index, ipmi_sensor_type_cable_interconnect_short)); case IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_system_boot_initiated_short_max_index, ipmi_sensor_type_system_boot_initiated_short)); case IPMI_SENSOR_TYPE_BOOT_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_boot_error_short_max_index, ipmi_sensor_type_boot_error_short)); case IPMI_SENSOR_TYPE_OS_BOOT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_os_boot_short_max_index, ipmi_sensor_type_os_boot_short)); case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_os_critical_stop_short_max_index, ipmi_sensor_type_os_critical_stop_short)); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_slot_connector_short_max_index, ipmi_sensor_type_slot_connector_short)); case IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_acpi_power_state_short_max_index, ipmi_sensor_type_acpi_power_state_short)); case IPMI_SENSOR_TYPE_WATCHDOG2: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_watchdog2_short_max_index, ipmi_sensor_type_watchdog2_short)); case IPMI_SENSOR_TYPE_PLATFORM_ALERT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_platform_alert_short_max_index, ipmi_sensor_type_platform_alert_short)); case IPMI_SENSOR_TYPE_ENTITY_PRESENCE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_entity_presence_short_max_index, ipmi_sensor_type_entity_presence_short)); case IPMI_SENSOR_TYPE_LAN: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_lan_short_max_index, ipmi_sensor_type_lan_short)); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_management_subsystem_health_short_max_index, ipmi_sensor_type_management_subsystem_health_short)); case IPMI_SENSOR_TYPE_BATTERY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_battery_short_max_index, ipmi_sensor_type_battery_short)); case IPMI_SENSOR_TYPE_SESSION_AUDIT: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_session_audit_short_max_index, ipmi_sensor_type_session_audit_short)); case IPMI_SENSOR_TYPE_VERSION_CHANGE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_version_change_short_max_index, ipmi_sensor_type_version_change_short)); case IPMI_SENSOR_TYPE_FRU_STATE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_fru_state_short_max_index, ipmi_sensor_type_fru_state_short)); } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_event_data2_message (uint8_t sensor_type, unsigned int offset, uint8_t event_data2, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (sensor_type) { case IPMI_SENSOR_TYPE_PHYSICAL_SECURITY: return (get_physical_security_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return (get_system_firmware_progress_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (get_event_logging_disabled_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_SYSTEM_EVENT: return (get_system_event_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_CHIP_SET: return (get_chip_set_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return (get_system_boot_initiated_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (get_slot_connector_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_WATCHDOG2: return (get_watchdog2_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (get_management_subsystem_health_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_SESSION_AUDIT: return (get_session_audit_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_VERSION_CHANGE: return (get_version_change_event_data2_message (offset, event_data2, buf, buflen)); case IPMI_SENSOR_TYPE_FRU_STATE: return (get_fru_state_event_data2_message (offset, event_data2, buf, buflen)); } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_event_data3_message (uint8_t sensor_type, unsigned int offset, uint8_t event_data2, uint8_t event_data3, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } switch (sensor_type) { case IPMI_SENSOR_TYPE_POWER_SUPPLY: return (get_power_supply_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_MEMORY: return (get_memory_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (get_event_logging_disabled_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_CHIP_SET: return (get_chip_set_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return (get_system_boot_initiated_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (get_slot_connector_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (get_management_subsystem_health_event_data3_message (offset, event_data2, event_data3, buf, buflen)); case IPMI_SENSOR_TYPE_SESSION_AUDIT: return (get_session_audit_event_data3_message (offset, event_data2, event_data3, buf, buflen)); } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_oem_generic_event_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720)) { switch (event_reading_type_code) { case IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_oem_dell_status_max_index, ipmi_generic_event_reading_type_code_oem_dell_status)); case IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_FAILURE: return (_get_event_message (offset, buf, buflen, ipmi_generic_event_reading_type_code_oem_dell_failure_max_index, ipmi_generic_event_reading_type_code_oem_dell_failure)); } } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_oem_sensor_type_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t sensor_type, uint8_t sensor_number, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 * Dell Poweredge R720 */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R720)) { switch (sensor_type) { case IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_dell_system_performance_degradation_status_max_index, ipmi_sensor_type_oem_dell_system_performance_degradation_status)); case IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_dell_link_tuning_max_index, ipmi_sensor_type_oem_dell_link_tuning)); case IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_dell_non_fatal_error_max_index, ipmi_sensor_type_oem_dell_non_fatal_error)); case IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_dell_fatal_io_error_max_index, ipmi_sensor_type_oem_dell_fatal_io_error)); case IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_dell_upgrade_max_index, ipmi_sensor_type_oem_dell_upgrade)); } } /* * OEM Interpretation * * Fujitsu iRMC S1 / iRMC S2 * */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU && (product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX)) { switch (sensor_type) { case IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_i2c_bus_max_index, ipmi_sensor_type_oem_fujitsu_i2c_bus)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_system_power_consumption_max_index, ipmi_sensor_type_oem_fujitsu_system_power_consumption)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_memory_status_max_index, ipmi_sensor_type_oem_fujitsu_memory_status)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_memory_config_max_index, ipmi_sensor_type_oem_fujitsu_memory_config)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_memory_max_index, ipmi_sensor_type_oem_fujitsu_memory)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_HW_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_hw_error_max_index, ipmi_sensor_type_oem_fujitsu_hw_error)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_SYS_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_sys_error_max_index, ipmi_sensor_type_oem_fujitsu_sys_error)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_fan_status_max_index, ipmi_sensor_type_oem_fujitsu_fan_status)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_psu_status_max_index, ipmi_sensor_type_oem_fujitsu_psu_status)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_psu_redundancy_max_index, ipmi_sensor_type_oem_fujitsu_psu_redundancy)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_flash_max_index, ipmi_sensor_type_oem_fujitsu_flash)); case IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_fujitsu_config_backup_max_index, ipmi_sensor_type_oem_fujitsu_config_backup)); /* These are reserved */ case IPMI_SENSOR_TYPE_OEM_FUJITSU_COMMUNICATION: case IPMI_SENSOR_TYPE_OEM_FUJITSU_EVENT: default: break; } } /* OEM Interpretation * * Wistron / Dell Poweredge C6220 */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON && product_id == IPMI_WISTRON_PRODUCT_ID_C6220) { switch (sensor_type) { case IPMI_SENSOR_TYPE_OEM_WISTRON_IOH_CORE_ERROR: return (_get_event_message (offset, buf, buflen, ipmi_sensor_type_oem_wistron_ioh_core_error_max_index, ipmi_sensor_type_oem_wistron_ioh_core_error)); } } /* OEM Interpretation * * Intel Windmill * (Quanta Winterfell) * (Wiwynn Windmill) */ /* * achu: Ugh .. vendor uses same sensor type for multiple OEM * sensors ... gotta use sensor number to differentiate. This is * awful. */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL && product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL && sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC) { unsigned int sensor_reading = (1 << offset); if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CPU_SEL_STATUS) { if (sensor_reading & IPMI_SENSOR_TYPE_OEM_INTEL_SEL_CLEAR_BITMASK) return (snprintf (buf, buflen, "SEL Clear")); else if (sensor_reading & IPMI_SENSOR_TYPE_OEM_INTEL_SEL_ROLLOVER_BITMASK) return (snprintf (buf, buflen, "SEL Rollover")); } else if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS) { /* achu: A/C Lost is 4h, not 3h, so the below may not be correct. Had to guess */ if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_DOWN)) return (snprintf (buf, buflen, "Power Down")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_CYCLE_RESET)) return (snprintf (buf, buflen, "Power Cycle/Reset")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_POWER_ON)) return (snprintf (buf, buflen, "Power On")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_CHASSIS_POWER_STATUS_AC_LOST)) return (snprintf (buf, buflen, "A/C Lost")); } else if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_LOW) { if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_NONE_OF_THE_ABOVE)) return (snprintf (buf, buflen, "Active status bits are waiting to be read")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_CML_ERROR)) return (snprintf (buf, buflen, "An error was detected on the I2C/PMBus interface")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_VIN_UV_FAULT)) return (snprintf (buf, buflen, "An undervoltage input fault was detected on the UV pin")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_IOUT_OC_FAULT)) return (snprintf (buf, buflen, "The hot swap controller detected an overcurrent condition")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_LOW_HOTSWAP_OFF)) return (snprintf (buf, buflen, "The hot swap gate driver output is disabled")); } else if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH) { if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_POWER_GOOD)) return (snprintf (buf, buflen, "The voltage on the FLB pin is below the required threshold")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_MFR_STATUS)) return (snprintf (buf, buflen, "There are one or more active status bits to be read by STATUS_MFR_SPECIFIC")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_INPUT_STATUS)) return (snprintf (buf, buflen, "There are one or more active status bits to be read by STATUS_INPUT")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_IOUT_STATUS)) return (snprintf (buf, buflen, "There are one or more active status bits to be read by STATUS_IOUT")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_HIGH_VOUT_STATUS)) return (snprintf (buf, buflen, "There are one or more active status bits to be read by STATUS_VOUT")); } else if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC) { if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_IOUT_WARN2)) return (snprintf (buf, buflen, "An undercurrent or overcurrent condition on the output supply detected")); /* achu: HS_SHUTDOWN_CAUSE1 & HS_SHUTDOWN_CAUSE2 list 4 error messages * with <00>, <01>, <10>, & <11> listed next to them. I have no idea * where these other bits come from. * * So all user gets is a generic "hotswap shutdown" */ else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE1)) return (snprintf (buf, buflen, "Hotswap shutdown")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_SHUTDOWN_CAUSE2)) return (snprintf (buf, buflen, "Hotswap shutdown")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_HS_INLIM)) return (snprintf (buf, buflen, "The ADM1276 has actively limited current into the load")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_OV_CMP_OUT)) return (snprintf (buf, buflen, "Input Voltage to OV pin is above threshold")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_UV_CMP_OUT)) return (snprintf (buf, buflen, "Input voltage to UV pin is below threshold")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_MFR_SPECIFIC_FET_HEALTH_BAD)) return (snprintf (buf, buflen, "FET behavior suggests that the FET may be shorted")); } else if (sensor_number == IPMI_SENSOR_NUMBER_OEM_INTEL_WINDMILL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT) { if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_PIN_OP_WARN)) return (snprintf (buf, buflen, "An overpower condition on the input supply was detected by power monitor")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_FAULT)) return (snprintf (buf, buflen, "An undervoltage was detected on the UV pin")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_UV_WARN)) return (snprintf (buf, buflen, "An undervoltage condition on the input supply was detected by the power monitor")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_WARN)) return (snprintf (buf, buflen, "An overvoltage condition on the input supply was detected by hte power monitor")); else if (sensor_reading & (1 << IPMI_SENSOR_TYPE_OEM_INTEL_HOT_SWAP_CONTROLLER_0_STATUS_INPUT_VIN_OV_FAULT)) return (snprintf (buf, buflen, "An overvoltage was detected on the OV pin")); } } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_oem_specific_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, unsigned int offset, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* OEM Interpretation * * HP Proliant DL160 G8 */ if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_HP) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_HP_UID_LIGHT && sensor_type == IPMI_SENSOR_TYPE_OEM_HP_LED) return (_get_event_message (offset, buf, buflen, ipmi_oem_hp_uid_light_max_index, ipmi_oem_hp_uid_light)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_HP_HEALTH_LED && sensor_type == IPMI_SENSOR_TYPE_OEM_HP_LED) return (_get_event_message (offset, buf, buflen, ipmi_oem_hp_health_led_max_index, ipmi_oem_hp_health_led)); } /* OEM Interpretation * * Intel S5500WB/Penguin Computing Relion 700 * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) * Intel S2600JF/Appro 512X * Intel S2600WP */ else if (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL) { if (product_id == IPMI_INTEL_PRODUCT_ID_S5500WB) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_FATAL_SENSOR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_specific_pci_fatal_sensor_max_index, ipmi_oem_intel_specific_pci_fatal_sensor)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_PCIE_CORRECTABLE_SENSOR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_specific_pci_correctable_sensor_max_index, ipmi_oem_intel_specific_pci_correctable_sensor)); } else if (product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_FATAL_SENSOR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor_max_index, ipmi_oem_intel_quanta_qssc_s4r_specific_pci_fatal_sensor)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_QUANTA_QSSC_S4R_PCIE_CORRECTABLE_SENSOR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor_max_index, ipmi_oem_intel_quanta_qssc_s4r_specific_pci_correctable_sensor)); } else if (product_id == IPMI_INTEL_PRODUCT_ID_S2600JF) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_pci_fatal_error_max_index, ipmi_oem_intel_s2600jf_specific_pci_fatal_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_FATAL_ERROR_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2_max_index, ipmi_oem_intel_s2600jf_specific_pci_fatal_error_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_PCIE_CORRECTABLE_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_pci_correctable_error_max_index, ipmi_oem_intel_s2600jf_specific_pci_correctable_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_opi_fatal_error_max_index, ipmi_oem_intel_s2600jf_specific_opi_fatal_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_OPI_FATAL_ERROR_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2_max_index, ipmi_oem_intel_s2600jf_specific_opi_fatal_error_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600JF_QPI_LINK_WIDTH_REDUCED && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced_max_index, ipmi_oem_intel_s2600jf_specific_qpi_link_width_reduced)); } else if (product_id == IPMI_INTEL_PRODUCT_ID_S2600WP) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_max_index, ipmi_oem_intel_s2600wp_specific_pcie_fatal_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_FATAL_ERROR_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2_max_index, ipmi_oem_intel_s2600wp_specific_pcie_fatal_error_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_PCIE_CORRECTABLE_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_pcie_correctable_error_max_index, ipmi_oem_intel_s2600wp_specific_pcie_correctable_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_max_index, ipmi_oem_intel_s2600wp_specific_qpi_fatal_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_FATAL_ERROR_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2_max_index, ipmi_oem_intel_s2600wp_specific_qpi_fatal_error_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_QPI_LINK_WIDTH_REDUCED && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced_max_index, ipmi_oem_intel_s2600wp_specific_qpi_link_width_reduced)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_S2600WP_FIRMWARE_UPDATE_STATUS_SENSOR && sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor_max_index, ipmi_oem_intel_s2600wp_specific_firmware_update_status_sensor)); } else if (product_id == IPMI_INTEL_PRODUCT_ID_S2600KP || product_id == IPMI_INTEL_PRODUCT_ID_S2600WT2 || product_id == IPMI_INTEL_PRODUCT_ID_S2600WTT || product_id == IPMI_INTEL_PRODUCT_ID_S2600GZ) { if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_max_index, ipmi_oem_intel_e52600v3_specific_qpi_fatal_error)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_FATAL_ERROR_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2_max_index, ipmi_oem_intel_e52600v3_specific_qpi_fatal_error_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_QPI_LINK_WIDTH_REDUCED && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced_max_index, ipmi_oem_intel_e52600v3_specific_qpi_link_width_reduced)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_max_index, ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_FATAL_ERRORS_2 && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2_max_index, ipmi_oem_intel_e52600v3_specific_pci_express_fatal_errors_2)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_PCI_EXPRESS_CORRECTABLE_ERRORS && sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors_max_index, ipmi_oem_intel_e52600v3_specific_pci_express_correctable_errors)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_FIRMWARE_UPDATE_STATUS_SENSOR && sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor_max_index, ipmi_oem_intel_e52600v3_specific_firmware_update_status_sensor)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_START && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_bios_recovery_start_max_index, ipmi_oem_intel_e52600v3_specific_bios_recovery_start)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_BIOS_RECOVERY_FINISH && sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_bios_recovery_finish_max_index, ipmi_oem_intel_e52600v3_specific_bios_recovery_finish)); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO && sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_E52600V3_IERR_RECOVERY_DUMP_INFO) return (_get_event_message (offset, buf, buflen, ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info_max_index, ipmi_oem_intel_e52600v3_specific_ierr_recovery_dump_info)); } } SET_ERRNO (EINVAL); return (-1); } static int _supermicro_oem_temp_level_sensor_supported (uint32_t manufacturer_id, uint16_t product_id) { /* OEM Interpretation * * Supermicro X7DBR-3 (X7DBR_3) * Supermicro X7DB8 * Supermicro X8DTN * Supermicro X7SBI-LN4 (X7SBI_LN4) * Supermicro X8DTH * Supermicro X8DTG * Supermicro X8DTU * Supermicro X8DT3-LN4F (X8DT3_LN4F) * Supermicro X8DTU-6+ (X8DTU_6PLUS) * Supermicro X8DTL * Supermicro X8DTL-3F (X8DTL_3F) * Supermicro X8SIL-F (X8SIL_F) * Supermicro X9SCL * Supermicro X9SCM * Supermicro X8DTN+-F (X8DTNPLUS_F) * Supermicro X8SIE * Supermicro X9SCA-F-O (X9SCA_F_O) * Supermicro H8DGU-F (H8DGU_F) * Supermicro X9DRi-F (X9DRI_F) * Supermicro X9DRI-LN4F+ (X9DRI_LN4F_PLUS) * Supermicro X9SPU-F-O (X9SPU_F_O) * Supermicro X9SCM-iiF (X9SCM_IIF) * Supermicro H8SGL-F (H8SGL_F) * * Event Reading Type Code = IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC * Sensor Type = IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP * - 0 = Low * - 1 = Medium * - 2 = High * - 4 = Overheat * - 7 = Not Installed * * Note: Early Supermicro motherboards used the "Peppercon" Manufacturer ID * Note: Some Supermicro motherboards are rebranded with random manufacturer IDs */ if ((manufacturer_id == IPMI_IANA_ENTERPRISE_ID_PEPPERCON && (product_id == IPMI_SUPERMICRO_PRODUCT_ID_X7DBR_3 || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X7DB8 || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTN || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X7SBI_LN4)) || ((manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO || manufacturer_id == IPMI_IANA_ENTERPRISE_ID_SUPERMICRO_WORKAROUND) && (product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTH || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTG || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DT3_LN4F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTU_6PLUS || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL_3F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIL_F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCL || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTNPLUS_F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8SIE || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCA_F_O || product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU_F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DGU || product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8DG6 || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_F || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9DRI_LN4F_PLUS || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SPU_F_O || product_id == IPMI_SUPERMICRO_PRODUCT_ID_X9SCM_IIF || product_id == IPMI_SUPERMICRO_PRODUCT_ID_H8SGL_F)) || (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_MAGNUM_TECHNOLOGIES && product_id == IPMI_SUPERMICRO_PRODUCT_ID_X8DTL)) return (1); return (0); } int ipmi_get_oem_event_bitmask_message (uint32_t manufacturer_id, uint16_t product_id, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t event_bitmask, char *buf, unsigned int buflen) { if (!buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* OEM Interpretation * * See notes in _supermicro_oem_temp_level_sensor_supported() */ if (_supermicro_oem_temp_level_sensor_supported (manufacturer_id, product_id)) { switch (event_reading_type_code) { case IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC: { switch (sensor_type) { case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP: { switch (event_bitmask) { case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_LOW: return (snprintf (buf, buflen, "Low")); case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_MEDIUM: return (snprintf (buf, buflen, "Medium")); case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_HIGH: return (snprintf (buf, buflen, "High")); case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_OVERHEAT: return (snprintf (buf, buflen, "Overheat")); case IPMI_SENSOR_TYPE_OEM_SUPERMICRO_CPU_TEMP_NOT_INSTALLED: return (snprintf (buf, buflen, "Not Installed")); } } break; } } break; /* end case IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC: */ } } SET_ERRNO (EINVAL); return (-1); } int ipmi_get_event_messages (uint8_t event_reading_type_code, uint8_t sensor_type, /* ignored if not relevant for event_reading_type_code */ uint8_t sensor_number, /* ignored if not relevant for event_reading_type_code or sensor_type */ uint16_t event_bitmask, /* ignored if not relevant for event_reading_type_code */ uint32_t manufacturer_id, /* ignored if INTERPRET_OEM_DATA not set */ uint16_t product_id, /* ignored if INTERPRET_OEM_DATA not set */ char ***event_messages, unsigned int *event_messages_count, const char *no_event_message_string, unsigned int flags) { char **tmp_event_messages_ptr = NULL; char *tmp_event_messages[EVENT_MAX_MESSAGES]; unsigned int tmp_event_messages_count = 0; char buf[EVENT_BUFLEN + 1]; int event_reading_type_code_class; uint16_t bitmask; unsigned int i; int len; if (!event_messages || !event_messages_count || (flags & ~(IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT | IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA | IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING | IPMI_GET_EVENT_MESSAGES_FLAGS_IGNORE_UNRECOGNIZED_EVENTS))) { SET_ERRNO (EINVAL); return (-1); } memset (buf, '\0', EVENT_BUFLEN + 1); event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD && flags & IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING) { int j; /* achu: multiple threshold flags can be set (e.g. if we pass * the critical threshold, we've also passed the non-critical * threshold). It makes no sense to output multiple in this * case, so one message is returned at the max. Luckily for us * (and due to smarts by the IPMI specification authors) if we * go from high bits to low bits, we will read the flags in the * correct order for output. * * If you're confused why were use 'ipmi_get_threshold_message' * instead of 'ipmi_get_generic_event_message' (b/c this is * presumably event_reading_type_code == 0x01), the reason is * b/c this is for sensors, not sel events. In other words, the * result we care about comes from the Get Sensor Reading * command. */ /* use 'j' instead of 'i', b/c needs to be signed integer */ for (j = 5; j >= 0; j--) { bitmask = 0x1 << j; if (event_bitmask & bitmask) { memset (buf, '\0', EVENT_BUFLEN + 1); if ((len = ipmi_get_threshold_message (j, buf, EVENT_BUFLEN)) < 0) goto cleanup; if (len) { if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; break; } } } } /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 */ else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD || event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE || (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM && flags & IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA && ((manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710) && event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_DELL_STATUS)))) { for (i = 0; i < IPMI_MAX_SENSOR_AND_EVENT_OFFSET; i++) { bitmask = 0x1 << i; if (event_bitmask & bitmask) { memset (buf, '\0', EVENT_BUFLEN + 1); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD || event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE) { if (flags & IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT) len = ipmi_get_generic_event_message_short (event_reading_type_code, i, buf, EVENT_BUFLEN); else len = ipmi_get_generic_event_message (event_reading_type_code, i, buf, EVENT_BUFLEN); } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if (flags & IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA && ((manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710) && (sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_SYSTEM_PERFORMANCE_DEGRADATION_STATUS || sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_LINK_TUNING || sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_NON_FATAL_ERROR || sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_FATAL_IO_ERROR || sensor_type == IPMI_SENSOR_TYPE_OEM_DELL_UPGRADE) ) || (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU && (product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX) && (sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP /* These are for events only --begin */ || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_EVENT || sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_COMMUNICATION /* These are for events only --end */ ) ) || (manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL && (product_id == IPMI_INTEL_PRODUCT_ID_WINDMILL) && (sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_WINDMILL_GENERIC) ) ) ) { len = ipmi_get_oem_sensor_type_message (manufacturer_id, product_id, sensor_type, sensor_number, i, buf, EVENT_BUFLEN); } else goto oem_default_output; } else { if (flags & IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT) len = ipmi_get_sensor_type_message_short (sensor_type, i, buf, EVENT_BUFLEN); else len = ipmi_get_sensor_type_message (sensor_type, i, buf, EVENT_BUFLEN); } } else len = ipmi_get_oem_generic_event_message (manufacturer_id, product_id, event_reading_type_code, i, buf, EVENT_BUFLEN); if (len < 0) { if (!(flags & IPMI_GET_EVENT_MESSAGES_FLAGS_IGNORE_UNRECOGNIZED_EVENTS)) { snprintf (buf, EVENT_BUFLEN, "Unrecognized Event = %04Xh", bitmask); if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; continue; } else continue; } if (len) { if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; continue; } } } } /* OEM Interpretation * * See notes in _supermicro_oem_temp_level_sensor_supported() */ else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM && flags & IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA && _supermicro_oem_temp_level_sensor_supported (manufacturer_id, product_id) && event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_SUPERMICRO_GENERIC) { len = ipmi_get_oem_event_bitmask_message (manufacturer_id, product_id, event_reading_type_code, sensor_type, event_bitmask, buf, EVENT_BUFLEN); if (len > 0) { if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; } else goto oem_default_output; } /* OEM Interpretation * * HP Proliant DL160 G8 */ else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM && flags & IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA && manufacturer_id == IPMI_IANA_ENTERPRISE_ID_HP && product_id == IPMI_HP_PRODUCT_ID_PROLIANT_DL160_G8 && (sensor_type == IPMI_SENSOR_TYPE_OEM_HP_LED && (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_HP_UID_LIGHT || event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_HP_HEALTH_LED))) { for (i = 0; i < IPMI_MAX_SENSOR_AND_EVENT_OFFSET; i++) { bitmask = 0x1 << i; if (event_bitmask & bitmask) { len = ipmi_get_oem_specific_message (manufacturer_id, product_id, event_reading_type_code, sensor_type, i, buf, EVENT_BUFLEN); if (len > 0) { if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; break; } else goto oem_default_output; } } } else /* OEM Event */ { oem_default_output: memset (buf, '\0', EVENT_BUFLEN + 1); snprintf (buf, EVENT_BUFLEN, "OEM Event = %04Xh", event_bitmask); if (!(tmp_event_messages[tmp_event_messages_count] = strdup (buf))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; } if (!tmp_event_messages_count && no_event_message_string) { if (!(tmp_event_messages[0] = strdup (no_event_message_string))) { SET_ERRNO (ENOMEM); goto cleanup; } tmp_event_messages_count++; } if (tmp_event_messages_count) { if (!(tmp_event_messages_ptr = (char **) malloc (sizeof (char *) * (tmp_event_messages_count + 1)))) { SET_ERRNO (ENOMEM); goto cleanup; } for (i = 0; i < tmp_event_messages_count; i++) tmp_event_messages_ptr[i] = tmp_event_messages[i]; tmp_event_messages_ptr[tmp_event_messages_count] = NULL; } (*event_messages) = tmp_event_messages_ptr; (*event_messages_count) = tmp_event_messages_count; return (0); cleanup: free (tmp_event_messages_ptr); for (i = 0; i < tmp_event_messages_count; i++) free (tmp_event_messages[i]); return (-1); } freeipmi-1.6.4/libfreeipmi/util/ipmi-sensor-util.c0000644002055400205540000003662013527331637022123 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "freeipmi/util/ipmi-sensor-util.h" #include "freeipmi/record-format/ipmi-sdr-record-format.h" #include "freeipmi/spec/ipmi-event-reading-type-code-spec.h" #include "freeipmi/spec/ipmi-sensor-types-spec.h" #include "freeipmi/spec/ipmi-sensor-units-spec.h" #include "freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h" #include "freeipmi/spec/ipmi-product-id-spec.h" #include "freeipmi/spec/oem/ipmi-sensor-types-oem-fujitsu-spec.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" /* * Threshold Comparsion status */ static char *threshold_comparison_status_desc[] = { "At or Below (<=) Lower Non-Critical Threshold", "At or Below (<=) Lower Critical Threshold", "At or Below (<=) Lower Non-Recoverable Threshold", "At or Above (>=) Upper Non-Critical Threshold", "At or Above (>=) Upper Critical Threshold", "At or Above (>=) Upper Non-Recoverable Threshold", NULL, }; static int threshold_comparison_status_desc_max = 0x5; int ipmi_get_threshold_message (uint8_t offset, char *buf, unsigned int buflen) { if (!buf || !buflen || offset > threshold_comparison_status_desc_max) { SET_ERRNO (EINVAL); return (-1); } return (snprintf (buf, buflen, "%s", threshold_comparison_status_desc[offset])); } const char * ipmi_get_sensor_type_string (uint8_t sensor_type) { if (IPMI_SENSOR_TYPE_VALID (sensor_type)) return (ipmi_sensor_types[sensor_type]); if (IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) return (ipmi_oem_sensor_type); return (NULL); } const char * ipmi_get_oem_sensor_type_string (uint8_t sensor_type, uint8_t event_reading_code, uint32_t manufacturer_id, uint16_t product_id) { if (IPMI_SENSOR_TYPE_VALID (sensor_type)) return (ipmi_sensor_types[sensor_type]); if (IPMI_SENSOR_TYPE_IS_OEM (sensor_type)) { if ((manufacturer_id == IPMI_IANA_ENTERPRISE_ID_FUJITSU) && (product_id >= IPMI_FUJITSU_PRODUCT_ID_MIN && product_id <= IPMI_FUJITSU_PRODUCT_ID_MAX)) { if (event_reading_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC) { switch (sensor_type) { case IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS: return ("OEM I2C Bus"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_SYSTEM_POWER_CONSUMPTION: return ("OEM Power Consumption"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_STATUS: return ("OEM Memory Status"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY_CONFIG: return ("OEM Memory Config"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_MEMORY: return ("OEM Memory"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_FAN_STATUS: return ("OEM Fan Status"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_STATUS: return ("OEM PSU Status"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_PSU_REDUNDANCY: return ("OEM PSU Redundancy"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_COMMUNICATION: return ("OEM Communication"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_FLASH: return ("OEM Flash"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_EVENT: return ("OEM Event"); case IPMI_SENSOR_TYPE_OEM_FUJITSU_CONFIG_BACKUP: return ("OEM Config Backup"); default: /* fall into generic case below */ break; } } else if (event_reading_code == IPMI_EVENT_READING_TYPE_CODE_THRESHOLD) { /* Currently only one combination */ if (sensor_type == IPMI_SENSOR_TYPE_OEM_FUJITSU_I2C_BUS) return ("OEM I2C Bus"); } } return (ipmi_oem_sensor_type); } return (NULL); } int ipmi_sensor_units_string (uint8_t sensor_units_percentage, uint8_t sensor_units_modifier, uint8_t sensor_units_rate, uint8_t sensor_base_unit_type, uint8_t sensor_modifier_unit_type, char *buf, unsigned int buflen, unsigned int abbreviated_units_flag) { const char **sensor_units = NULL; int offset = 0; int rv = -1; if (!IPMI_SDR_PERCENTAGE_VALID(sensor_units_percentage) || !IPMI_SDR_MODIFIER_UNIT_VALID(sensor_units_modifier) || !IPMI_SENSOR_RATE_UNIT_VALID(sensor_units_rate) || !IPMI_SENSOR_UNIT_VALID(sensor_base_unit_type) || !IPMI_SENSOR_UNIT_VALID(sensor_modifier_unit_type) || !buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* achu: I assume this must be the case */ if (sensor_units_modifier != IPMI_SDR_MODIFIER_UNIT_NONE && sensor_units_rate != IPMI_SENSOR_RATE_UNIT_NONE) { SET_ERRNO (EINVAL); return (-1); } /* achu: I don't understand percentages exactly, I'll just * assume it's a percent sign infront of everything else. */ if (sensor_units_percentage == IPMI_SDR_PERCENTAGE_YES) { /* Special case, nothing to add to the end of the percentage, * and the base unit is unspecified, just output '%' only. */ if (sensor_units_modifier == IPMI_SDR_MODIFIER_UNIT_NONE && sensor_units_rate == IPMI_SENSOR_RATE_UNIT_NONE && sensor_base_unit_type == IPMI_SENSOR_UNIT_UNSPECIFIED) { rv = snprintf (buf, buflen, "%%"); return (rv); } else offset = snprintf (buf, buflen, "%% "); } if (abbreviated_units_flag) sensor_units = (const char **)ipmi_sensor_units_abbreviated; else sensor_units = (const char **)ipmi_sensor_units; if (sensor_units_modifier == IPMI_SDR_MODIFIER_UNIT_NONE && sensor_units_rate == IPMI_SENSOR_RATE_UNIT_NONE) { rv = snprintf (buf + offset, buflen, "%s", sensor_units[sensor_base_unit_type]); return (rv); } if (sensor_units_rate != IPMI_SENSOR_RATE_UNIT_NONE) { /* Special case, RPM is inheritly per minute * * If vendor specifies a rate other than "per minute", that's * probably a bug in their SDR. */ if (sensor_base_unit_type == IPMI_SENSOR_UNIT_RPM && sensor_units_rate == IPMI_SENSOR_RATE_UNIT_PER_MINUTE) rv = snprintf (buf + offset, buflen, "%s", sensor_units[sensor_base_unit_type]); else rv = snprintf (buf + offset, buflen, "%s %s", sensor_units[sensor_base_unit_type], ipmi_sensor_rate_units[sensor_units_rate]); return (rv); } /* else sensor_units_modifier != IPMI_SDR_MODIFIER_UNIT_NONE */ /* achu: corner case, some vendors messed up */ if (sensor_modifier_unit_type == IPMI_SENSOR_UNIT_UNSPECIFIED) { rv = snprintf (buf + offset, buflen, "%s", sensor_units[sensor_base_unit_type]); } else { if (sensor_units_modifier == IPMI_SDR_MODIFIER_UNIT_DIVIDE) rv = snprintf (buf + offset, buflen, "%s / %s", sensor_units[sensor_base_unit_type], sensor_units[sensor_modifier_unit_type]); else rv = snprintf (buf + offset, buflen, "%s * %s", sensor_units[sensor_base_unit_type], sensor_units[sensor_modifier_unit_type]); } return (rv); } int ipmi_sensor_decode_value (int8_t r_exponent, int8_t b_exponent, int16_t m, int16_t b, uint8_t linearization, uint8_t analog_data_format, uint8_t raw_data, double *value) { double dval = 0.0; if (!value || !IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format) || !IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SET_ERRNO (EINVAL); return (-1); } if (analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED) dval = (double) raw_data; else if (analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT) { if (raw_data & 0x80) raw_data++; dval = (double)((char) raw_data); } else /* analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT */ dval = (double)((char) raw_data); dval *= (double) m; dval += (b * pow (10, b_exponent)); dval *= pow (10, r_exponent); switch (linearization) { case IPMI_SDR_LINEARIZATION_LN: dval = log (dval); break; case IPMI_SDR_LINEARIZATION_LOG10: dval = log10 (dval); break; case IPMI_SDR_LINEARIZATION_LOG2: dval = log2 (dval); break; case IPMI_SDR_LINEARIZATION_E: dval = exp (dval); break; case IPMI_SDR_LINEARIZATION_EXP10: dval = exp10 (dval); break; case IPMI_SDR_LINEARIZATION_EXP2: dval = exp2 (dval); break; case IPMI_SDR_LINEARIZATION_INVERSE: if (dval != 0.0) dval = 1.0 / dval; break; case IPMI_SDR_LINEARIZATION_SQR: dval = pow (dval, 2.0); break; case IPMI_SDR_LINEARIZATION_CUBE: dval = pow (dval, 3.0); break; case IPMI_SDR_LINEARIZATION_SQRT: dval = sqrt (dval); break; case IPMI_SDR_LINEARIZATION_CUBERT: dval = cbrt (dval); break; } *value = dval; return (0); } int ipmi_sensor_decode_raw_value (int8_t r_exponent, int8_t b_exponent, int16_t m, int16_t b, uint8_t linearization, uint8_t analog_data_format, double value, uint8_t *raw_data) { double dval; uint8_t rval; if (!raw_data || !IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format) || !IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SET_ERRNO (EINVAL); return (-1); } dval = value; /* achu: * * b/c I always forget: * * y = log_b(x) == x = b^y * * log_b(x) = log_k(x)/log(k(b) */ /* achu: the macros M_E or M_El for 'e' is questionably portable. * Folks online suggest just using exp(1.0) in its place. Sounds * good to me. */ switch (linearization) { case IPMI_SDR_LINEARIZATION_LN: dval = exp (dval); break; case IPMI_SDR_LINEARIZATION_LOG10: dval = exp10 (dval); break; case IPMI_SDR_LINEARIZATION_LOG2: dval = exp2 (dval); break; case IPMI_SDR_LINEARIZATION_E: dval = (log (dval)/log (exp (1.0))); break; case IPMI_SDR_LINEARIZATION_EXP10: dval = (log (dval)/log (10)); break; case IPMI_SDR_LINEARIZATION_EXP2: dval = (log (dval)/log (2)); break; case IPMI_SDR_LINEARIZATION_INVERSE: if (dval != 0.0) dval = 1.0 / dval; break; case IPMI_SDR_LINEARIZATION_SQR: dval = sqrt (dval); break; case IPMI_SDR_LINEARIZATION_CUBE: dval = cbrt (dval); break; case IPMI_SDR_LINEARIZATION_SQRT: dval = pow (dval, 2.0); break; case IPMI_SDR_LINEARIZATION_CUBERT: dval = pow (dval, 3.0); break; } dval = (dval / pow (10, r_exponent)); dval = (dval - (b * pow (10, b_exponent))); if (m) dval = (dval / m); /* Floating point arithmetic cannot guarantee us a perfect * conversion of raw to value and back to raw. This can * fix things. */ if ((dval - (int)dval) >= 0.5) dval = ceil (dval); else dval = floor (dval); if (analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED) rval = (uint8_t) dval; else if (analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT) { rval = (char)dval; if (rval & 0x80) rval--; } else /* analog_data_format == IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT */ rval = (char)dval; *raw_data = rval; return (0); } int ipmi_sensor_decode_tolerance (int8_t r_exponent, int16_t m, uint8_t linearization, uint8_t raw_data, double *value) { double dval = 0.0; if (!value || !IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { SET_ERRNO (EINVAL); return (-1); } /* note no analog_data format, tolerance always stored as unsigned */ dval = (double) raw_data; dval *= (double) m; dval /= 2.0; dval += (dval * pow (10, r_exponent)); switch (linearization) { case IPMI_SDR_LINEARIZATION_LN: dval = log (dval); break; case IPMI_SDR_LINEARIZATION_LOG10: dval = log10 (dval); break; case IPMI_SDR_LINEARIZATION_LOG2: dval = log2 (dval); break; case IPMI_SDR_LINEARIZATION_E: dval = exp (dval); break; case IPMI_SDR_LINEARIZATION_EXP10: dval = exp10 (dval); break; case IPMI_SDR_LINEARIZATION_EXP2: dval = exp2 (dval); break; case IPMI_SDR_LINEARIZATION_INVERSE: if (dval != 0.0) dval = 1.0 / dval; break; case IPMI_SDR_LINEARIZATION_SQR: dval = pow (dval, 2.0); break; case IPMI_SDR_LINEARIZATION_CUBE: dval = pow (dval, 3.0); break; case IPMI_SDR_LINEARIZATION_SQRT: dval = sqrt (dval); break; case IPMI_SDR_LINEARIZATION_CUBERT: dval = cbrt (dval); break; } *value = dval; return (0); } int ipmi_sensor_decode_accuracy (uint16_t accuracy_raw, uint8_t accuracy_exp, double *value) { double dval = 0.0; if (!value) { SET_ERRNO (EINVAL); return (-1); } dval = (accuracy_raw * pow (10, accuracy_exp)) / 100.0; *value = dval; return (0); } int ipmi_sensor_decode_resolution (int8_t r_exponent, int16_t m, double *value) { double dval = 0.0; if (!value) { SET_ERRNO (EINVAL); return (-1); } dval = abs (m * pow (10, r_exponent)); *value = dval; return (0); } freeipmi-1.6.4/libfreeipmi/util/ipmi-timestamp-util.c0000644002055400205540000000725513527331637022617 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include "freeipmi/util/ipmi-timestamp-util.h" #include "freeipmi/spec/ipmi-timestamp-spec.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_TIMESTAMP_FLAG_MASK \ (IPMI_TIMESTAMP_FLAG_ABBREVIATE \ | IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME \ | IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC) int ipmi_timestamp_string (uint32_t timestamp, int utc_offset, unsigned int flags, const char *format, char *buf, unsigned int buflen) { struct tm tm; time_t t; if ((flags & ~IPMI_TIMESTAMP_FLAG_MASK) || !buf || !buflen) { SET_ERRNO (EINVAL); return (-1); } /* Timestamp Special Cases */ if (timestamp == IPMI_TIMESTAMP_UNSPECIFIED) { if (flags & IPMI_TIMESTAMP_FLAG_ABBREVIATE) snprintf (buf, buflen, "Unspec."); else snprintf (buf, buflen, "Unspecified"); return (0); } if (IPMI_TIMESTAMP_POST_INIT (timestamp)) { if (flags & IPMI_TIMESTAMP_FLAG_ABBREVIATE) snprintf (buf, buflen, "PostInit"); else snprintf (buf, buflen, "Post-Init %u s", timestamp); return (0); } /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof (struct tm)); t = timestamp; if (utc_offset) t += utc_offset; if (flags & IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME) localtime_r (&t, &tm); else if (flags & IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC) { /* In order for this to be threadsafe, we won't modify the TZ * environment variable. We'll calculate the offset manually. * * XXX: This may be called alot via tools like ipmi-sel, should * find some way to cache this or something if we care about * performance later on. */ struct tm gmtm; struct tm localtm; time_t gmt, localt; time_t offset; time_t utc_timestamp; gmtime_r (&t, &gmtm); localtime_r (&t, &localtm); gmt = mktime (&gmtm); localt = mktime (&localtm); /* Notes: * localtime = UTC + offset * UTC = localtime - offset * soo ... */ offset = localt - gmt; utc_timestamp = t - offset; gmtime_r (&utc_timestamp, &tm); } else gmtime_r (&t, &tm); if (format) strftime (buf, buflen, format, &tm); else strftime (buf, buflen, "%m/%d/%Y - %H:%M:%S", &tm); return (0); } freeipmi-1.6.4/libfreeipmi/util/ipmi-util.c0000644002055400205540000005355313527331637020620 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* 2's complement checksum of preceding bytes in the connection header or between the previous checksum. 8-bit checksum algorithm: Initialize checksum to 0. For each byte, checksum = (checksum + byte) modulo 256. Then find 1's compliment of checksum and add one to it. To verify add all the bytes and the checksum and then % 256 should yield 0. */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_GCRYPT_H #include #endif /* HAVE_GCRYPT_H */ #include "freeipmi/util/ipmi-util.h" #include "freeipmi/fiid/fiid.h" #include "freeipmi/interface/rmcp-interface.h" #include "freeipmi/spec/ipmi-authentication-type-spec.h" #include "freeipmi/spec/ipmi-cmd-spec.h" #include "freeipmi/spec/ipmi-comp-code-spec.h" #include "freeipmi/spec/ipmi-netfn-spec.h" #include "libcommon/ipmi-fiid-util.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" #define IPMI_SEQUENCE_NUMBER_MAX 0xFFFFFFFF #define IPMI_SEQUENCE_NUMBER_WINDOW_DEFAULT 8 #define IPMI_SEQUENCE_NUMBER_WINDOW_MAX 32 #define IPMI_SEQUENCE_NUMBER_WINDOW_MIN 1 static uint8_t _checksum (const void *buf, unsigned int buflen, uint8_t checksum_initial) { register unsigned int i = 0; register int8_t checksum = checksum_initial; if (buf == NULL || buflen == 0) return (checksum); for (; i < buflen; i++) checksum = (checksum + ((uint8_t *)buf)[i]) % 256; return (checksum); } uint8_t ipmi_checksum (const void *buf, unsigned int buflen) { uint8_t checksum; checksum = _checksum (buf, buflen, 0); return (-checksum); } uint8_t ipmi_checksum_incremental (const void *buf, unsigned int buflen, uint8_t checksum_initial) { return (_checksum (buf, buflen, checksum_initial)); } uint8_t ipmi_checksum_final (const void *buf, unsigned int buflen, uint8_t checksum_initial) { uint8_t checksum; if (!buf || !buflen) return (-checksum_initial); checksum = _checksum (buf, buflen, checksum_initial); return (-checksum); } int ipmi_check_cmd (fiid_obj_t obj_cmd, uint8_t cmd) { uint8_t cmd_recv; uint64_t val; if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "cmd") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_GET (obj_cmd, "cmd", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } cmd_recv = val; return ((cmd_recv == cmd) ? 1 : 0); } int ipmi_check_completion_code (fiid_obj_t obj_cmd, uint8_t completion_code) { uint8_t completion_code_recv; uint64_t val; if (!fiid_obj_valid (obj_cmd)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_FIELD_LOOKUP (obj_cmd, "comp_code") < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { FIID_OBJECT_ERROR_TO_ERRNO (obj_cmd); return (-1); } completion_code_recv = val; return ((completion_code_recv == completion_code) ? 1 : 0); } int ipmi_check_completion_code_success (fiid_obj_t obj_cmd) { return (ipmi_check_completion_code (obj_cmd, IPMI_COMP_CODE_COMMAND_SUCCESS)); } int ipmi_get_random (void *buf, unsigned int buflen) { #if (HAVE_DEVURANDOM || HAVE_DEVRANDOM) int fd, len, rv = -1; #endif /* !(HAVE_DEVURANDOM || HAVE_DEVRANDOM) */ if (!buf) { SET_ERRNO (EINVAL); return (-1); } if (!buflen) return (0); #if (HAVE_DEVURANDOM || HAVE_DEVRANDOM) #if HAVE_DEVURANDOM if ((fd = open ("/dev/urandom", O_RDONLY)) < 0) goto cleanup; #else /* !HAVE_DEVURANDOM */ if ((fd = open ("/dev/random", O_RDONLY)) < 0) goto cleanup; #endif /* !HAVE_DEVURANDOM */ if ((len = read (fd, buf, buflen)) < 0) goto cleanup; if (((unsigned int)len) < buflen) goto cleanup; rv = len; cleanup: /* ignore potential error, cleanup path */ close (fd); return (rv); #else /* !(HAVE_DEVURANDOM || HAVE_DEVRANDOM) */ SET_ERRNO (EPERM); return (-1); #endif /* !(HAVE_DEVURANDOM || HAVE_DEVRANDOM) */ } const char * ipmi_cmd_str (uint8_t net_fn, uint8_t cmd) { switch (net_fn) { case IPMI_NET_FN_CHASSIS_RQ: case IPMI_NET_FN_CHASSIS_RS: switch (cmd) { case IPMI_CMD_GET_CHASSIS_CAPABILITIES: return "Get Chassis Capabilities"; case IPMI_CMD_GET_CHASSIS_STATUS: return "Get Chassis Status"; case IPMI_CMD_CHASSIS_CONTROL: return "Chassis Control"; case IPMI_CMD_CHASSIS_RESET: return "Chassis Reset"; case IPMI_CMD_CHASSIS_IDENTIFY: return "Chassis Identify"; case IPMI_CMD_SET_CHASSIS_CAPABILITIES: return "Set Chassis Capabilities"; case IPMI_CMD_SET_POWER_RESTORE_POLICY: return "Set Power Restore Policy"; case IPMI_CMD_GET_SYSTEM_RESTART_CAUSE: return "Get System Restart Cause"; case IPMI_CMD_SET_SYSTEM_BOOT_OPTIONS: return "Set System Boot Options"; case IPMI_CMD_GET_SYSTEM_BOOT_OPTIONS: return "Get System Boot Options"; case IPMI_CMD_SET_FRONT_PANEL_BUTTON_ENABLES: return "Set Front Panel Button Enables"; case IPMI_CMD_SET_POWER_CYCLE_INTERVAL: return "Set Power Cycle Interval"; case IPMI_CMD_GET_POWER_ON_HOURS_COUNTER: return "Get Power On Hours Counter"; default: return "Unknown"; } break; case IPMI_NET_FN_BRIDGE_RQ: case IPMI_NET_FN_BRIDGE_RS: switch (cmd) { case IPMI_CMD_GET_BRIDGE_STATE: return "Get Bridge State"; case IPMI_CMD_SET_BRIDGE_STATE: return "Set Bridge State"; case IPMI_CMD_GET_ICMB_ADDRESS: return "Get ICM Address"; case IPMI_CMD_SET_ICMB_ADDRESS: return "Set ICMB Address"; case IPMI_CMD_SET_BRIDGE_PROXY_ADDRESS: return "Set Bridge Proxy Address"; case IPMI_CMD_GET_BRIDGE_STATISTICS: return "Get Bridge Statistics"; case IPMI_CMD_GET_ICMB_CAPABILITIES: return "Get ICMB Capabilities"; case IPMI_CMD_CLEAR_BRIDGE_STATISTICS: return "Clear Bridge Statistics"; case IPMI_CMD_GET_BRIDGE_PROXY_ADDRESS: return "Get Bridge Proxy Address"; case IPMI_CMD_GET_ICMB_CONNECTOR_INFO: return "Get ICMB Connector Info"; case IPMI_CMD_GET_ICMB_CONNECTION_ID: return "Get ICMB Connection ID"; case IPMI_CMD_SEND_ICMB_CONNECTION_ID: return "Send ICMB Connection ID"; case IPMI_CMD_PREPARE_FOR_DISCOVERY: return "Prepare For Discovery"; case IPMI_CMD_GET_ADDRESSES: return "Get Addresses"; case IPMI_CMD_SET_DISCOVERED: return "Set Discovered"; case IPMI_CMD_GET_CHASSIS_DEVICE_ID: return "Get Chassis Device ID"; case IPMI_CMD_SET_CHASSIS_DEVICE_ID: return "Set Chassis Device ID"; case IPMI_CMD_BRIDGE_REQUEST: return "Bridge Request"; case IPMI_CMD_BRIDGE_MESSAGE: return "Bridge Message"; case IPMI_CMD_GET_EVENT_COUNT: return "Get Event Count"; case IPMI_CMD_SET_EVENT_DESTINATION: return "Set Event Destination"; case IPMI_CMD_SET_EVENT_RECEPTION_STATE: return "Set Event Reception State"; case IPMI_CMD_SEND_ICMB_EVENT_MESSAGE: return "Send ICMB Event Message"; case IPMI_CMD_GET_EVENT_DESTINATION: return "Get Event Destination"; case IPMI_CMD_GET_EVENT_RECEPTION_STATE: return "Get Event Reception State"; case IPMI_CMD_ERROR_REPORT: return "Error Report"; default: return "Unknown"; } break; case IPMI_NET_FN_SENSOR_EVENT_RQ: case IPMI_NET_FN_SENSOR_EVENT_RS: switch (cmd) { case IPMI_CMD_SET_EVENT_RECEIVER: return "Set Event Receiver"; case IPMI_CMD_GET_EVENT_RECEIVER: return "Get Event Receiver"; case IPMI_CMD_PLATFORM_EVENT: return "Platform Event"; case IPMI_CMD_GET_PEF_CAPABILITIES: return "Get PEF Capabilities"; case IPMI_CMD_ARM_PEF_POSTPONE_TIMER: return "ARM PEF Postpone Timer"; case IPMI_CMD_SET_PEF_CONFIGURATION_PARAMETERS: return "Set PEF Configuration Parameters"; case IPMI_CMD_GET_PEF_CONFIGURATION_PARAMETERS: return "Get PEF Configuration Parameters"; case IPMI_CMD_SET_LAST_PROCESSED_EVENT_ID: return "Set Last Processed Event ID"; case IPMI_CMD_GET_LAST_PROCESSED_EVENT_ID: return "Get Last Processed Event ID"; case IPMI_CMD_ALERT_IMMEDIATE: return "Alert Immediate"; case IPMI_CMD_PET_ACKNOWLEDGE: return "PET Acknowledge"; case IPMI_CMD_GET_DEVICE_SDR_INFO: return "Get Device SDR Info"; case IPMI_CMD_GET_DEVICE_SDR: return "Get Device SDR"; case IPMI_CMD_RESERVE_DEVICE_SDR_REPOSITORY: return "Reserve Device SDR Repository"; case IPMI_CMD_GET_SENSOR_READING_FACTORS: return "Get Sensor Reading Factors"; case IPMI_CMD_SET_SENSOR_HYSTERESIS: return "Set Sensor Hysteresis"; case IPMI_CMD_GET_SENSOR_HYSTERESIS: return "Get Sensor Hysteresis"; case IPMI_CMD_SET_SENSOR_THRESHOLDS: return "Set Sensor Thresholds"; case IPMI_CMD_GET_SENSOR_THRESHOLDS: return "Get Sensor Thresholds"; case IPMI_CMD_SET_SENSOR_EVENT_ENABLE: return "Set Sensor Event Enable"; case IPMI_CMD_GET_SENSOR_EVENT_ENABLE: return "Get Sensor Event Enable"; case IPMI_CMD_RE_ARM_SENSOR_EVENTS: return "Re-arm Sensor Events"; case IPMI_CMD_GET_SENSOR_EVENT_STATUS: return "Get Sensor Event Status"; case IPMI_CMD_GET_SENSOR_READING: return "Get Sensor Reading"; case IPMI_CMD_SET_SENSOR_TYPE: return "Set Sensor Type"; case IPMI_CMD_GET_SENSOR_TYPE: return "Get Sensor Type"; case IPMI_CMD_SET_SENSOR_READING_AND_EVENT_STATUS: return "Set Sensor Reading and Event Status"; default: return "Unknown"; } break; case IPMI_NET_FN_APP_RQ: case IPMI_NET_FN_APP_RS: switch (cmd) { case IPMI_CMD_GET_DEVICE_ID: return "Get Device ID"; case IPMI_CMD_COLD_RESET: return "Cold Reset"; case IPMI_CMD_WARM_RESET: return "Warm Reset"; case IPMI_CMD_GET_SELF_TEST_RESULTS: return "Get Self Test Results"; case IPMI_CMD_MANUFACTURING_TEST_ON: return "Manufacturing Test On"; case IPMI_CMD_SET_ACPI_POWER_STATE: return "Set ACPI Power State"; case IPMI_CMD_GET_ACPI_POWER_STATE: return "Get ACPI Power State"; case IPMI_CMD_GET_DEVICE_GUID: return "Get Device GUID"; case IPMI_CMD_GET_NETFN_SUPPORT: return "Get NetFN Support"; case IPMI_CMD_GET_COMMAND_SUPPORT: return "Get Command Support"; case IPMI_CMD_GET_COMMAND_SUB_FUNCTION_SUPPORT: return "Get Command Sub-Function Support"; case IPMI_CMD_GET_CONFIGURABLE_COMMANDS: return "Get Configurable Commands"; case IPMI_CMD_GET_CONFIGURABLE_COMMAND_SUB_FUNCTIONS: return "Get Configurable Command Sub-Functions"; case IPMI_CMD_SET_COMMAND_ENABLES: return "Set Command Enables"; case IPMI_CMD_GET_COMMAND_ENABLES: return "Get Command Enables"; case IPMI_CMD_SET_COMMAND_SUB_FUNCTION_ENABLES: return "Set Command Sub-Function Enables"; case IPMI_CMD_GET_COMMAND_SUB_FUNCTION_ENABLES: return "Get Command Sub-Function Enables"; case IPMI_CMD_GET_OEM_NETFN_IANA_SUPPORT: return "Get OEM NetFN IANA Support"; case IPMI_CMD_RESET_WATCHDOG_TIMER: return "Reset Watchdog Timer"; case IPMI_CMD_SET_WATCHDOG_TIMER: return "Set Watchdog Timer"; case IPMI_CMD_GET_WATCHDOG_TIMER: return "Get Watchdog Timer"; case IPMI_CMD_SET_BMC_GLOBAL_ENABLES: return "Set BMC Global Enables"; case IPMI_CMD_GET_BMC_GLOBAL_ENABLES: return "Get BMC Global Enables"; case IPMI_CMD_CLEAR_MESSAGE_FLAGS: return "Clear Message Flags"; case IPMI_CMD_GET_MESSAGE_FLAGS: return "Get Message Flags"; case IPMI_CMD_ENABLE_MESSAGE_CHANNEL_RECEIVE: return "Enable Message Channel Receive"; case IPMI_CMD_GET_MESSAGE: return "Get Message"; case IPMI_CMD_SEND_MESSAGE: return "Send Message"; case IPMI_CMD_READ_EVENT_MESSAGE_BUFFER: return "Read Event Message Buffer"; case IPMI_CMD_GET_BT_INTERFACE_CAPABILITIES: return "Get BT Interface Capabilities"; case IPMI_CMD_GET_SYSTEM_GUID: return "Get System GUID"; case IPMI_CMD_SET_SYSTEM_INFO_PARAMETERS: return "Set System Info Parameters"; case IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS: return "Get System Info Parameters"; case IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES: return "Get Channel Authentication Capabilities"; case IPMI_CMD_GET_SESSION_CHALLENGE: return "Get Session Challenge"; case IPMI_CMD_ACTIVATE_SESSION: return "Activate Session"; case IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL: return "Set Session Privilege Level"; case IPMI_CMD_CLOSE_SESSION: return "Close Session"; case IPMI_CMD_GET_SESSION_INFO: return "Get Session Info"; case IPMI_CMD_GET_AUTHCODE: return "Get Authcode"; case IPMI_CMD_SET_CHANNEL_ACCESS: return "Set Channel Access"; case IPMI_CMD_GET_CHANNEL_ACCESS: return "Get Channel Access"; case IPMI_CMD_GET_CHANNEL_INFO_COMMAND: return "Get Channel Info Command"; case IPMI_CMD_SET_USER_ACCESS_COMMAND: return "Set User Access Command"; case IPMI_CMD_GET_USER_ACCESS_COMMAND: return "Get User Access Command"; case IPMI_CMD_SET_USER_NAME: return "Set User Name Command"; /* 'Set User Name' in table, added 'Command' for consistency */ case IPMI_CMD_GET_USER_NAME_COMMAND: return "Get User Name Command"; case IPMI_CMD_SET_USER_PASSWORD_COMMAND: return "Set User Password Command"; case IPMI_CMD_ACTIVATE_PAYLOAD: return "Activate Payload"; case IPMI_CMD_DEACTIVATE_PAYLOAD: return "Deactivate Payload"; case IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS: return "Get Payload Activation Status"; case IPMI_CMD_GET_PAYLOAD_INSTANCE_INFO: return "Get Payload Instance Info"; case IPMI_CMD_SET_USER_PAYLOAD_ACCESS: return "Set User Payload Access"; case IPMI_CMD_GET_USER_PAYLOAD_ACCESS: return "Get User Payload Access"; case IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT: return "Get Channel Payload Support"; case IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION: return "Get Channel Payload Version"; case IPMI_CMD_GET_CHANNEL_OEM_PAYLOAD_INFO: return "Get Channel OEM Payload Info"; case IPMI_CMD_MASTER_WRITE_READ: return "Master Write Read"; case IPMI_CMD_GET_CHANNEL_CIPHER_SUITES: return "Get Channel Cipher Suites"; case IPMI_CMD_SUSPEND_RESUME_PAYLOAD_ENCRYPTION: return "Suspend Resume Payload Encryption"; case IPMI_CMD_SET_CHANNEL_SECURITY_KEYS: return "Set Channel Security Keys"; case IPMI_CMD_GET_SYSTEM_INTERFACE_CAPABILITIES: return "Get System Interface Capabilities"; default: return "Unknown"; } break; case IPMI_NET_FN_FIRMWARE_RQ: case IPMI_NET_FN_FIRMWARE_RS: return "Unknown"; break; case IPMI_NET_FN_STORAGE_RQ: case IPMI_NET_FN_STORAGE_RS: switch (cmd) { case IPMI_CMD_GET_FRU_INVENTORY_AREA_INFO: return "Get FRU Inventory Area Info"; case IPMI_CMD_READ_FRU_DATA: return "Read FRU Data"; case IPMI_CMD_WRITE_FRU_DATA: return "Write FRU Data"; case IPMI_CMD_GET_SDR_REPOSITORY_INFO: return "Get SDR Repository Info"; case IPMI_CMD_GET_SDR_REPOSITORY_ALLOCATION_INFO: return "Get SDR Repository Allocation Info"; case IPMI_CMD_RESERVE_SDR_REPOSITORY: return "Reserve SDR Repository"; case IPMI_CMD_GET_SDR: return "Get SDR"; case IPMI_CMD_ADD_SDR: return "Add SDR"; case IPMI_CMD_PARTIAL_ADD_SDR: return "Partial Add SDR"; case IPMI_CMD_DELETE_SDR: return "Delete SDR"; case IPMI_CMD_CLEAR_SDR_REPOSITORY: return "Clear SDR Repository"; case IPMI_CMD_GET_SDR_REPOSITORY_TIME: return "Get SDR Repository Time"; case IPMI_CMD_SET_SDR_REPOSITORY_TIME: return "Set SDR Repository Time"; case IPMI_CMD_ENTER_SDR_REPOSITORY_UPDATE_MODE: return "Enter SDR Repository Update Mode"; case IPMI_CMD_EXIT_SDR_REPOSITORY_UPDATE_MODE: return "Exit SDR Repository Update Mode"; case IPMI_CMD_RUN_INITIALIZATION_AGENT: return "Run Initialization Agent"; case IPMI_CMD_GET_SEL_INFO: return "Get SEL Info"; case IPMI_CMD_GET_SEL_ALLOCATION_INFO: return "Get SEL Allocation Info"; case IPMI_CMD_RESERVE_SEL: return "Reserve SEL"; case IPMI_CMD_GET_SEL_ENTRY: return "Get SEL Entry"; case IPMI_CMD_ADD_SEL_ENTRY: return "Add SEL Entry"; case IPMI_CMD_PARTIAL_ADD_SEL_ENTRY: return "Partial Add SEL Entry"; case IPMI_CMD_DELETE_SEL_ENTRY: return "Delete SEL Entry"; case IPMI_CMD_CLEAR_SEL: return "Clear SEL"; case IPMI_CMD_GET_SEL_TIME: return "Get SEL Time"; case IPMI_CMD_SET_SEL_TIME: return "Set SEL Time"; case IPMI_CMD_GET_AUXILIARY_LOG_STATUS: return "Get Auxiliary Log Status"; case IPMI_CMD_SET_AUXILIARY_LOG_STATUS: return "Set Auxiliary Log Status"; case IPMI_CMD_GET_SEL_TIME_UTC_OFFSET: return "Get SEL Time UTC Offset"; case IPMI_CMD_SET_SEL_TIME_UTC_OFFSET: return "Set SEL Time UTC Offset"; default: return "Unknown"; } break; case IPMI_NET_FN_TRANSPORT_RQ: case IPMI_NET_FN_TRANSPORT_RS: switch (cmd) { case IPMI_CMD_SET_LAN_CONFIGURATION_PARAMETERS: return "Set LAN Configuration Parameters"; case IPMI_CMD_GET_LAN_CONFIGURATION_PARAMETERS: return "Get LAN Configuration Parameters"; case IPMI_CMD_SUSPEND_BMC_ARPS: return "Suspend BMC ARPs"; case IPMI_CMD_GET_IP_UDP_RMCP_STATISTICS: return "Get IP UDP RMCP Statistics"; case IPMI_CMD_SET_SERIAL_MODEM_CONFIGURATION: return "Set Serial Modem Configuration"; case IPMI_CMD_GET_SERIAL_MODEM_CONFIGURATION: return "Get Serial Modem Configuration"; case IPMI_CMD_SET_SERIAL_MODEM_MUX: return "Set Serial Modem Mux"; case IPMI_CMD_GET_TAP_RESPONSE_CODES: return "Get TAP Response Codes"; case IPMI_CMD_SET_PPP_UDP_PROXY_TRANSMIT_DATA: return "Set PPP UDP Proxy Transmit Data"; case IPMI_CMD_GET_PPP_UDP_PROXY_TRANSMIT_DATA: return "Get PPP UDP Proxy Transmit Data"; case IPMI_CMD_SEND_PPP_UDP_PROXY_PACKET: return "Send PPP UDP Proxy Packet"; case IPMI_CMD_GET_PPP_UDP_PROXY_RECEIVE_DATA: return "Get PPP UDP Proxy Receive Data"; case IPMI_CMD_SERIAL_MODEM_CONNECTION_ACTIVE: return "Serial Modem Connection Active"; case IPMI_CMD_CALLBACK: return "Callback"; case IPMI_CMD_SET_USER_CALLBACK_OPTIONS: return "Set User Callback Options"; case IPMI_CMD_GET_USER_CALLBACK_OPTIONS: return "Get User Callback Options"; case IPMI_CMD_SET_SERIAL_ROUTING_MUX: return "Set Serial Routing Mux"; case IPMI_CMD_SOL_ACTIVATING: return "SOL Activating"; case IPMI_CMD_SET_SOL_CONFIGURATION_PARAMETERS: return "Set SOL Configuration Parameters"; case IPMI_CMD_GET_SOL_CONFIGURATION_PARAMETERS: return "Get SOL Configuration Parameters"; case IPMI_CMD_FORWARDED_COMMAND: return "Forwarded Command"; case IPMI_CMD_SET_FORWARDED_COMMANDS: return "Set Forwarded Commands"; case IPMI_CMD_GET_FORWARDED_COMMANDS: return "Get Forwarded Commands"; case IPMI_CMD_ENABLE_FORWARDED_COMMANDS: return "Enable Forwarded Commands"; default: return "Unknown"; } break; default: return "Unknown"; } } freeipmi-1.6.4/libfreeipmi/util/rmcp-util.c0000644002055400205540000000275413527331637020620 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include "freeipmi/util/rmcp-util.h" #include "freeipmi/cmds/rmcp-cmds.h" #include "libcommon/ipmi-trace.h" #include "freeipmi-portability.h" int ipmi_rmcp_check_message_tag (fiid_obj_t pong, uint8_t message_tag) { uint8_t l_message_tag; uint64_t val; if (!fiid_obj_valid (pong)) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_TEMPLATE_COMPARE (pong, tmpl_cmd_asf_presence_pong) < 0) { SET_ERRNO (EINVAL); return (-1); } if (FIID_OBJ_GET (pong, "message_tag", &val) < 0) { ERRNO_TRACE (errno); return (-1); } l_message_tag = val; if (message_tag == l_message_tag) return (1); return (0); } freeipmi-1.6.4/libfreeipmi/Makefile.in0000644002055400205540000115410213527342446017624 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libfreeipmi DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/libfreeipmi.pc.in $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = libfreeipmi.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" LTLIBRARIES = $(lib_LTLIBRARIES) libfreeipmi_la_DEPENDENCIES = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la am__dirstamp = $(am__leading_dot)dirstamp am_libfreeipmi_la_OBJECTS = api/libfreeipmi_la-ipmi-api.lo \ api/libfreeipmi_la-ipmi-api-util.lo \ api/libfreeipmi_la-ipmi-chassis-cmds-api.lo \ api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo \ api/libfreeipmi_la-ipmi-device-global-cmds-api.lo \ api/libfreeipmi_la-ipmi-event-cmds-api.lo \ api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo \ api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo \ api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo \ api/libfreeipmi_la-ipmi-kcs-driver-api.lo \ api/libfreeipmi_la-ipmi-lan-cmds-api.lo \ api/libfreeipmi_la-ipmi-lan-interface-api.lo \ api/libfreeipmi_la-ipmi-lan-session-common.lo \ api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo \ api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo \ api/libfreeipmi_la-ipmi-openipmi-driver-api.lo \ api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo \ api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo \ api/libfreeipmi_la-ipmi-sel-cmds-api.lo \ api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo \ api/libfreeipmi_la-ipmi-sensor-cmds-api.lo \ api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo \ api/libfreeipmi_la-ipmi-sol-cmds-api.lo \ api/libfreeipmi_la-ipmi-ssif-driver-api.lo \ api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo \ cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo \ cmds/libfreeipmi_la-ipmi-chassis-cmds.lo \ cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo \ cmds/libfreeipmi_la-ipmi-device-global-cmds.lo \ cmds/libfreeipmi_la-ipmi-event-cmds.lo \ cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo \ cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo \ cmds/libfreeipmi_la-ipmi-lan-cmds.lo \ cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo \ cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo \ cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo \ cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo \ cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo \ cmds/libfreeipmi_la-ipmi-sel-cmds.lo \ cmds/libfreeipmi_la-ipmi-sensor-cmds.lo \ cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo \ cmds/libfreeipmi_la-ipmi-sol-cmds.lo \ cmds/libfreeipmi_la-rmcp-cmds.lo \ debug/libfreeipmi_la-ipmi-debug.lo \ debug/libfreeipmi_la-ipmi-debug-common.lo \ debug/libfreeipmi_la-ipmi-debug-inband.lo \ debug/libfreeipmi_la-ipmi-debug-lan.lo \ debug/libfreeipmi_la-ipmi-debug-rmcp.lo \ debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo \ debug/libfreeipmi_la-ipmi-debug-sdr.lo \ driver/libfreeipmi_la-ipmi-semaphores.lo \ driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo \ driver/libfreeipmi_la-ipmi-kcs-driver.lo \ driver/libfreeipmi_la-ipmi-openipmi-driver.lo \ driver/libfreeipmi_la-ipmi-sunbmc-driver.lo \ driver/libfreeipmi_la-ipmi-ssif-driver.lo \ fiid/libfreeipmi_la-fiid.lo fru/libfreeipmi_la-ipmi-fru.lo \ fru/libfreeipmi_la-ipmi-fru-common.lo \ fru/libfreeipmi_la-ipmi-fru-data.lo \ fru/libfreeipmi_la-ipmi-fru-util.lo \ interface/libfreeipmi_la-ipmi-ipmb-interface.lo \ interface/libfreeipmi_la-ipmi-kcs-interface.lo \ interface/libfreeipmi_la-ipmi-lan-interface.lo \ interface/libfreeipmi_la-ipmi-network.lo \ interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo \ interface/libfreeipmi_la-rmcp-interface.lo \ interpret/libfreeipmi_la-ipmi-interpret.lo \ interpret/libfreeipmi_la-ipmi-interpret-config-common.lo \ interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo \ interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo \ interpret/libfreeipmi_la-ipmi-interpret-util.lo \ libcommon/libfreeipmi_la-ipmi-bit-ops.lo \ libcommon/libfreeipmi_la-ipmi-crypt.lo \ libcommon/libfreeipmi_la-ipmi-fiid-util.lo \ libcommon/libfreeipmi_la-ipmi-md2.lo \ libcommon/libfreeipmi_la-ipmi-md5.lo \ locate/libfreeipmi_la-ipmi-locate.lo \ locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo \ locate/libfreeipmi_la-ipmi-locate-defaults.lo \ locate/libfreeipmi_la-ipmi-locate-dmidecode.lo \ locate/libfreeipmi_la-ipmi-locate-pci.lo \ locate/libfreeipmi_la-ipmi-locate-smbios.lo \ locate/libfreeipmi_la-ipmi-locate-util.lo \ payload/libfreeipmi_la-ipmi-sol-payload.lo \ record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo \ record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo \ record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo \ record-format/libfreeipmi_la-ipmi-sdr-record-format.lo \ record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo \ record-format/libfreeipmi_la-ipmi-sel-record-format.lo \ sdr/libfreeipmi_la-ipmi-sdr.lo \ sdr/libfreeipmi_la-ipmi-sdr-common.lo \ sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo \ sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo \ sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo \ sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo \ sdr/libfreeipmi_la-ipmi-sdr-parse.lo \ sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo \ sdr/libfreeipmi_la-ipmi-sdr-stats.lo \ sdr/libfreeipmi_la-ipmi-sdr-util.lo \ sel/libfreeipmi_la-ipmi-sel.lo \ sel/libfreeipmi_la-ipmi-sel-common.lo \ sel/libfreeipmi_la-ipmi-sel-string.lo \ sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo \ sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo \ sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo \ sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo \ sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo \ sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo \ sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo \ sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo \ sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo \ sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo \ sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo \ sel/libfreeipmi_la-ipmi-sel-util.lo \ sensor-read/libfreeipmi_la-ipmi-sensor-read.lo \ sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo \ spec/libfreeipmi_la-ipmi-device-types-spec.lo \ spec/libfreeipmi_la-ipmi-entity-ids-spec.lo \ spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo \ spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo \ spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo \ spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-types-spec.lo \ spec/libfreeipmi_la-ipmi-sensor-units-spec.lo \ util/libfreeipmi_la-ipmi-channel-util.lo \ util/libfreeipmi_la-ipmi-cipher-suite-util.lo \ util/libfreeipmi_la-ipmi-dcmi-util.lo \ util/libfreeipmi_la-ipmi-device-types-util.lo \ util/libfreeipmi_la-ipmi-entity-ids-util.lo \ util/libfreeipmi_la-ipmi-error-dcmi-util.lo \ util/libfreeipmi_la-ipmi-error-util.lo \ util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo \ util/libfreeipmi_la-ipmi-ipmb-util.lo \ util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo \ util/libfreeipmi_la-ipmi-lan-util.lo \ util/libfreeipmi_la-ipmi-outofband-util.lo \ util/libfreeipmi_la-ipmi-rmcpplus-util.lo \ util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo \ util/libfreeipmi_la-ipmi-sensor-util.lo \ util/libfreeipmi_la-ipmi-timestamp-util.lo \ util/libfreeipmi_la-ipmi-util.lo \ util/libfreeipmi_la-rmcp-util.lo libfreeipmi_la_OBJECTS = $(am_libfreeipmi_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libfreeipmi_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libfreeipmi_la_LDFLAGS) $(LDFLAGS) -o \ $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libfreeipmi_la_SOURCES) DIST_SOURCES = $(libfreeipmi_la_SOURCES) RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = include @WITH_PKG_CONFIG_TRUE@pkgconfig_DATA = libfreeipmi.pc @WITH_GNU_LD_TRUE@VERSION_SCRIPT = $(srcdir)/freeipmi.map @WITH_GNU_LD_TRUE@VERSION_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) lib_LTLIBRARIES = libfreeipmi.la # achu # # IPMI_DEBUG_IPCKEY is so we can do inband development without the # real ipckey being installed. libfreeipmi_la_CPPFLAGS = \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi \ -DIPMI_IPCKEY=\"$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey\" \ -DIPMI_DEBUG_IPCKEY=\"$(top_builddir)/libfreeipmi/driver/ipmi-semaphores.h\" \ -D_GNU_SOURCE \ -D_REENTRANT libfreeipmi_la_LDFLAGS = \ -version-info @LIBFREEIPMI_VERSION_INFO@ $(VERSION_FLAGS) \ $(OTHER_FLAGS) \ $(PTHREAD_LIBS) \ @GCRYPT_LIBS@ \ -lm libfreeipmi_la_LIBADD = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la libfreeipmi_la_SOURCES = \ api/ipmi-api.c \ api/ipmi-api-defs.h \ api/ipmi-api-trace.h \ api/ipmi-api-util.c \ api/ipmi-api-util.h \ api/ipmi-chassis-cmds-api.c \ api/ipmi-dcmi-cmds-api.c \ api/ipmi-device-global-cmds-api.c \ api/ipmi-event-cmds-api.c \ api/ipmi-firmware-firewall-command-discovery-cmds-api.c \ api/ipmi-fru-inventory-device-cmds-api.c \ api/ipmi-inteldcmi-driver-api.c \ api/ipmi-inteldcmi-driver-api.h \ api/ipmi-kcs-driver-api.c \ api/ipmi-kcs-driver-api.h \ api/ipmi-lan-cmds-api.c \ api/ipmi-lan-interface-api.c \ api/ipmi-lan-interface-api.h \ api/ipmi-lan-session-common.c \ api/ipmi-lan-session-common.h \ api/ipmi-messaging-support-cmds-api.c \ api/ipmi-oem-intel-node-manager-cmds-api.c \ api/ipmi-openipmi-driver-api.c \ api/ipmi-openipmi-driver-api.h \ api/ipmi-pef-and-alerting-cmds-api.c \ api/ipmi-rmcpplus-support-and-payload-cmds-api.c \ api/ipmi-sel-cmds-api.c \ api/ipmi-sdr-repository-cmds-api.c \ api/ipmi-sensor-cmds-api.c \ api/ipmi-serial-modem-cmds-api.c \ api/ipmi-sol-cmds-api.c \ api/ipmi-ssif-driver-api.c \ api/ipmi-ssif-driver-api.h \ api/ipmi-sunbmc-driver-api.c \ api/ipmi-sunbmc-driver-api.h \ cmds/ipmi-bmc-watchdog-timer-cmds.c \ cmds/ipmi-chassis-cmds.c \ cmds/ipmi-dcmi-cmds.c \ cmds/ipmi-device-global-cmds.c \ cmds/ipmi-event-cmds.c \ cmds/ipmi-firmware-firewall-command-discovery-cmds.c \ cmds/ipmi-fru-inventory-device-cmds.c \ cmds/ipmi-lan-cmds.c \ cmds/ipmi-messaging-support-cmds.c \ cmds/ipmi-oem-intel-node-manager-cmds.c \ cmds/ipmi-pef-and-alerting-cmds.c \ cmds/ipmi-rmcpplus-support-and-payload-cmds.c \ cmds/ipmi-sdr-repository-cmds.c \ cmds/ipmi-sel-cmds.c \ cmds/ipmi-sensor-cmds.c \ cmds/ipmi-serial-modem-cmds.c \ cmds/ipmi-sol-cmds.c \ cmds/rmcp-cmds.c \ debug/ipmi-debug.c \ debug/ipmi-debug-common.c \ debug/ipmi-debug-common.h \ debug/ipmi-debug-inband.c \ debug/ipmi-debug-lan.c \ debug/ipmi-debug-rmcp.c \ debug/ipmi-debug-rmcpplus.c \ debug/ipmi-debug-sdr.c \ driver/freeipmi_bmc_intf.h \ driver/ipmi-driver-trace.h \ driver/ipmi-semaphores.c \ driver/ipmi-semaphores.h \ driver/ipmi-inteldcmi-driver.c \ driver/ipmi-kcs-driver.c \ driver/ipmi-openipmi-driver.c \ driver/ipmi-sunbmc-driver.c \ driver/ipmi-ssif-driver.c \ fiid/fiid.c \ fru/ipmi-fru.c \ fru/ipmi-fru-common.c \ fru/ipmi-fru-common.h \ fru/ipmi-fru-data.c \ fru/ipmi-fru-defs.h \ fru/ipmi-fru-trace.h \ fru/ipmi-fru-util.c \ fru/ipmi-fru-util.h \ interface/ipmi-ipmb-interface.c \ interface/ipmi-kcs-interface.c \ interface/ipmi-lan-interface.c \ interface/ipmi-network.c \ interface/ipmi-network.h \ interface/ipmi-rmcpplus-interface.c \ interface/rmcp-interface.c \ interpret/ipmi-interpret.c \ interpret/ipmi-interpret-config-common.c \ interpret/ipmi-interpret-config-common.h \ interpret/ipmi-interpret-config-sel.c \ interpret/ipmi-interpret-config-sel.h \ interpret/ipmi-interpret-config-sensor.c \ interpret/ipmi-interpret-config-sensor.h \ interpret/ipmi-interpret-defs.h \ interpret/ipmi-interpret-util.c \ interpret/ipmi-interpret-util.h \ interpret/ipmi-interpret-trace.h \ libcommon/ipmi-bit-ops.c \ libcommon/ipmi-bit-ops.h \ libcommon/ipmi-crypt.c \ libcommon/ipmi-crypt.h \ libcommon/ipmi-fiid-util.c \ libcommon/ipmi-fiid-util.h \ libcommon/ipmi-fill-util.h \ libcommon/ipmi-md2.c \ libcommon/ipmi-md2.h \ libcommon/ipmi-md5.c \ libcommon/ipmi-md5.h \ libcommon/ipmi-trace.h \ locate/ipmi-locate.c \ locate/ipmi-locate-acpi-spmi.c \ locate/ipmi-locate-defaults.c \ locate/ipmi-locate-defs.h \ locate/ipmi-locate-dmidecode.c \ locate/ipmi-locate-pci.c \ locate/ipmi-locate-smbios.c \ locate/ipmi-locate-trace.h \ locate/ipmi-locate-util.c \ locate/ipmi-locate-util.h \ payload/ipmi-sol-payload.c \ record-format/ipmi-cipher-suite-record-format.c \ record-format/ipmi-fru-dimmspd-record-format.c \ record-format/ipmi-fru-information-record-format.c \ record-format/ipmi-sdr-record-format.c \ record-format/ipmi-sdr-oem-intel-node-manager-record-format.c \ record-format/ipmi-sel-record-format.c \ sdr/ipmi-sdr.c \ sdr/ipmi-sdr-common.c \ sdr/ipmi-sdr-common.h \ sdr/ipmi-sdr-cache-create.c \ sdr/ipmi-sdr-defs.h \ sdr/ipmi-sdr-cache-delete.c \ sdr/ipmi-sdr-cache-read.c \ sdr/ipmi-sdr-oem-intel-node-manager.c \ sdr/ipmi-sdr-parse.c \ sdr/ipmi-sdr-parse-util.c \ sdr/ipmi-sdr-stats.c \ sdr/ipmi-sdr-trace.h \ sdr/ipmi-sdr-util.c \ sdr/ipmi-sdr-util.h \ sel/ipmi-sel.c \ sel/ipmi-sel-common.c \ sel/ipmi-sel-common.h \ sel/ipmi-sel-defs.h \ sel/ipmi-sel-string.c \ sel/ipmi-sel-string.h \ sel/ipmi-sel-string-dell-poweredge.c \ sel/ipmi-sel-string-fujitsu-irmc-common.c \ sel/ipmi-sel-string-gigabyte-common.c \ sel/ipmi-sel-string-gigabyte-common.h \ sel/ipmi-sel-string-gigabyte-md90fs0zb.c \ sel/ipmi-sel-string-gigabyte-mg20op0zb.c \ sel/ipmi-sel-string-intel-node-manager.c \ sel/ipmi-sel-string-intel-node-manager.h \ sel/ipmi-sel-string-intel-s5500wb.c \ sel/ipmi-sel-string-intel-quanta-qssc-s4r.c \ sel/ipmi-sel-string-intel-s2600jf.c \ sel/ipmi-sel-string-intel-s2600wp.c \ sel/ipmi-sel-string-intel-windmill.c \ sel/ipmi-sel-string-intel-e52600v3-common.c \ sel/ipmi-sel-string-intel-e52600v3-common.h \ sel/ipmi-sel-string-intel-s2600kp.c \ sel/ipmi-sel-string-intel-s2600gz.c \ sel/ipmi-sel-string-intel-s2600wt-common.c \ sel/ipmi-sel-string-inventec-common.c \ sel/ipmi-sel-string-inventec-common.h \ sel/ipmi-sel-string-inventec-5441.c \ sel/ipmi-sel-string-inventec-5442.c \ sel/ipmi-sel-string-linux-kernel.c \ sel/ipmi-sel-string-linux-kernel.h \ sel/ipmi-sel-string-quanta-s99q.c \ sel/ipmi-sel-string-sun-x4140.c \ sel/ipmi-sel-string-supermicro-common.c \ sel/ipmi-sel-string-supermicro-common.h \ sel/ipmi-sel-string-supermicro-overheat-common.c \ sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c \ sel/ipmi-sel-string-supermicro-peppercon-common.c \ sel/ipmi-sel-string-supermicro-x10dimm-common.c \ sel/ipmi-sel-string-wistron-c6220.c \ sel/ipmi-sel-trace.h \ sel/ipmi-sel-util.c \ sel/ipmi-sel-util.h \ sensor-read/ipmi-sensor-read.c \ sensor-read/ipmi-sensor-read-defs.h \ sensor-read/ipmi-sensor-read-trace.h \ sensor-read/ipmi-sensor-read-util.c \ sensor-read/ipmi-sensor-read-util.h \ spec/ipmi-device-types-spec.c \ spec/ipmi-entity-ids-spec.c \ spec/ipmi-fru-chassis-types-spec.c \ spec/ipmi-fru-language-codes-spec.c \ spec/ipmi-iana-enterprise-numbers-spec.c \ spec/ipmi-jedec-manufacturer-identification-code-spec.c \ spec/ipmi-sensor-and-event-code-tables-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c \ spec/ipmi-sensor-types-spec.c \ spec/ipmi-sensor-units-spec.c \ util/ipmi-channel-util.c \ util/ipmi-cipher-suite-util.c \ util/ipmi-dcmi-util.c \ util/ipmi-device-types-util.c \ util/ipmi-entity-ids-util.c \ util/ipmi-error-dcmi-util.c \ util/ipmi-error-util.c \ util/ipmi-iana-enterprise-numbers-util.c \ util/ipmi-ipmb-util.c \ util/ipmi-jedec-manufacturer-identification-code-util.c \ util/ipmi-lan-util.c \ util/ipmi-outofband-util.c \ util/ipmi-rmcpplus-util.c \ util/ipmi-sensor-and-event-code-tables-util.c \ util/ipmi-sensor-util.c \ util/ipmi-timestamp-util.c \ util/ipmi-util.c \ util/rmcp-util.c EXTRA_DIST = freeipmi.map ipckey all: all-recursive .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libfreeipmi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libfreeipmi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): libfreeipmi.pc: $(top_builddir)/config.status $(srcdir)/libfreeipmi.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } api/$(am__dirstamp): @$(MKDIR_P) api @: > api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) api/$(DEPDIR) @: > api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-api-util.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-chassis-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-device-global-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-event-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-kcs-driver-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-lan-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-lan-interface-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-lan-session-common.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-openipmi-driver-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-sel-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo: \ api/$(am__dirstamp) api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-sensor-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-sol-cmds-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-ssif-driver-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo: api/$(am__dirstamp) \ api/$(DEPDIR)/$(am__dirstamp) cmds/$(am__dirstamp): @$(MKDIR_P) cmds @: > cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) cmds/$(DEPDIR) @: > cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-chassis-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-device-global-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-event-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-lan-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo: \ cmds/$(am__dirstamp) cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-sel-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-sensor-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-ipmi-sol-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) cmds/libfreeipmi_la-rmcp-cmds.lo: cmds/$(am__dirstamp) \ cmds/$(DEPDIR)/$(am__dirstamp) debug/$(am__dirstamp): @$(MKDIR_P) debug @: > debug/$(am__dirstamp) debug/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) debug/$(DEPDIR) @: > debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-common.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-inband.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-lan.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-rmcp.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) debug/libfreeipmi_la-ipmi-debug-sdr.lo: debug/$(am__dirstamp) \ debug/$(DEPDIR)/$(am__dirstamp) driver/$(am__dirstamp): @$(MKDIR_P) driver @: > driver/$(am__dirstamp) driver/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) driver/$(DEPDIR) @: > driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-semaphores.lo: driver/$(am__dirstamp) \ driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo: \ driver/$(am__dirstamp) driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-kcs-driver.lo: driver/$(am__dirstamp) \ driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-openipmi-driver.lo: driver/$(am__dirstamp) \ driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-sunbmc-driver.lo: driver/$(am__dirstamp) \ driver/$(DEPDIR)/$(am__dirstamp) driver/libfreeipmi_la-ipmi-ssif-driver.lo: driver/$(am__dirstamp) \ driver/$(DEPDIR)/$(am__dirstamp) fiid/$(am__dirstamp): @$(MKDIR_P) fiid @: > fiid/$(am__dirstamp) fiid/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) fiid/$(DEPDIR) @: > fiid/$(DEPDIR)/$(am__dirstamp) fiid/libfreeipmi_la-fiid.lo: fiid/$(am__dirstamp) \ fiid/$(DEPDIR)/$(am__dirstamp) fru/$(am__dirstamp): @$(MKDIR_P) fru @: > fru/$(am__dirstamp) fru/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) fru/$(DEPDIR) @: > fru/$(DEPDIR)/$(am__dirstamp) fru/libfreeipmi_la-ipmi-fru.lo: fru/$(am__dirstamp) \ fru/$(DEPDIR)/$(am__dirstamp) fru/libfreeipmi_la-ipmi-fru-common.lo: fru/$(am__dirstamp) \ fru/$(DEPDIR)/$(am__dirstamp) fru/libfreeipmi_la-ipmi-fru-data.lo: fru/$(am__dirstamp) \ fru/$(DEPDIR)/$(am__dirstamp) fru/libfreeipmi_la-ipmi-fru-util.lo: fru/$(am__dirstamp) \ fru/$(DEPDIR)/$(am__dirstamp) interface/$(am__dirstamp): @$(MKDIR_P) interface @: > interface/$(am__dirstamp) interface/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) interface/$(DEPDIR) @: > interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-ipmi-ipmb-interface.lo: \ interface/$(am__dirstamp) interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-ipmi-kcs-interface.lo: \ interface/$(am__dirstamp) interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-ipmi-lan-interface.lo: \ interface/$(am__dirstamp) interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-ipmi-network.lo: interface/$(am__dirstamp) \ interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo: \ interface/$(am__dirstamp) interface/$(DEPDIR)/$(am__dirstamp) interface/libfreeipmi_la-rmcp-interface.lo: interface/$(am__dirstamp) \ interface/$(DEPDIR)/$(am__dirstamp) interpret/$(am__dirstamp): @$(MKDIR_P) interpret @: > interpret/$(am__dirstamp) interpret/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) interpret/$(DEPDIR) @: > interpret/$(DEPDIR)/$(am__dirstamp) interpret/libfreeipmi_la-ipmi-interpret.lo: interpret/$(am__dirstamp) \ interpret/$(DEPDIR)/$(am__dirstamp) interpret/libfreeipmi_la-ipmi-interpret-config-common.lo: \ interpret/$(am__dirstamp) interpret/$(DEPDIR)/$(am__dirstamp) interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo: \ interpret/$(am__dirstamp) interpret/$(DEPDIR)/$(am__dirstamp) interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo: \ interpret/$(am__dirstamp) interpret/$(DEPDIR)/$(am__dirstamp) interpret/libfreeipmi_la-ipmi-interpret-util.lo: \ interpret/$(am__dirstamp) interpret/$(DEPDIR)/$(am__dirstamp) libcommon/$(am__dirstamp): @$(MKDIR_P) libcommon @: > libcommon/$(am__dirstamp) libcommon/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) libcommon/$(DEPDIR) @: > libcommon/$(DEPDIR)/$(am__dirstamp) libcommon/libfreeipmi_la-ipmi-bit-ops.lo: libcommon/$(am__dirstamp) \ libcommon/$(DEPDIR)/$(am__dirstamp) libcommon/libfreeipmi_la-ipmi-crypt.lo: libcommon/$(am__dirstamp) \ libcommon/$(DEPDIR)/$(am__dirstamp) libcommon/libfreeipmi_la-ipmi-fiid-util.lo: libcommon/$(am__dirstamp) \ libcommon/$(DEPDIR)/$(am__dirstamp) libcommon/libfreeipmi_la-ipmi-md2.lo: libcommon/$(am__dirstamp) \ libcommon/$(DEPDIR)/$(am__dirstamp) libcommon/libfreeipmi_la-ipmi-md5.lo: libcommon/$(am__dirstamp) \ libcommon/$(DEPDIR)/$(am__dirstamp) locate/$(am__dirstamp): @$(MKDIR_P) locate @: > locate/$(am__dirstamp) locate/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) locate/$(DEPDIR) @: > locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate.lo: locate/$(am__dirstamp) \ locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo: \ locate/$(am__dirstamp) locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-defaults.lo: locate/$(am__dirstamp) \ locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-dmidecode.lo: \ locate/$(am__dirstamp) locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-pci.lo: locate/$(am__dirstamp) \ locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-smbios.lo: locate/$(am__dirstamp) \ locate/$(DEPDIR)/$(am__dirstamp) locate/libfreeipmi_la-ipmi-locate-util.lo: locate/$(am__dirstamp) \ locate/$(DEPDIR)/$(am__dirstamp) payload/$(am__dirstamp): @$(MKDIR_P) payload @: > payload/$(am__dirstamp) payload/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) payload/$(DEPDIR) @: > payload/$(DEPDIR)/$(am__dirstamp) payload/libfreeipmi_la-ipmi-sol-payload.lo: payload/$(am__dirstamp) \ payload/$(DEPDIR)/$(am__dirstamp) record-format/$(am__dirstamp): @$(MKDIR_P) record-format @: > record-format/$(am__dirstamp) record-format/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) record-format/$(DEPDIR) @: > record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-sdr-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) record-format/libfreeipmi_la-ipmi-sel-record-format.lo: \ record-format/$(am__dirstamp) \ record-format/$(DEPDIR)/$(am__dirstamp) sdr/$(am__dirstamp): @$(MKDIR_P) sdr @: > sdr/$(am__dirstamp) sdr/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) sdr/$(DEPDIR) @: > sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-common.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo: \ sdr/$(am__dirstamp) sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-parse.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-stats.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sdr/libfreeipmi_la-ipmi-sdr-util.lo: sdr/$(am__dirstamp) \ sdr/$(DEPDIR)/$(am__dirstamp) sel/$(am__dirstamp): @$(MKDIR_P) sel @: > sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) sel/$(DEPDIR) @: > sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel.lo: sel/$(am__dirstamp) \ sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-common.lo: sel/$(am__dirstamp) \ sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string.lo: sel/$(am__dirstamp) \ sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo: sel/$(am__dirstamp) \ sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo: \ sel/$(am__dirstamp) sel/$(DEPDIR)/$(am__dirstamp) sel/libfreeipmi_la-ipmi-sel-util.lo: sel/$(am__dirstamp) \ sel/$(DEPDIR)/$(am__dirstamp) sensor-read/$(am__dirstamp): @$(MKDIR_P) sensor-read @: > sensor-read/$(am__dirstamp) sensor-read/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) sensor-read/$(DEPDIR) @: > sensor-read/$(DEPDIR)/$(am__dirstamp) sensor-read/libfreeipmi_la-ipmi-sensor-read.lo: \ sensor-read/$(am__dirstamp) \ sensor-read/$(DEPDIR)/$(am__dirstamp) sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo: \ sensor-read/$(am__dirstamp) \ sensor-read/$(DEPDIR)/$(am__dirstamp) spec/$(am__dirstamp): @$(MKDIR_P) spec @: > spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) spec/$(DEPDIR) @: > spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-device-types-spec.lo: spec/$(am__dirstamp) \ spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-entity-ids-spec.lo: spec/$(am__dirstamp) \ spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo: \ spec/$(am__dirstamp) spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-types-spec.lo: spec/$(am__dirstamp) \ spec/$(DEPDIR)/$(am__dirstamp) spec/libfreeipmi_la-ipmi-sensor-units-spec.lo: spec/$(am__dirstamp) \ spec/$(DEPDIR)/$(am__dirstamp) util/$(am__dirstamp): @$(MKDIR_P) util @: > util/$(am__dirstamp) util/$(DEPDIR)/$(am__dirstamp): @$(MKDIR_P) util/$(DEPDIR) @: > util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-channel-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-cipher-suite-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-dcmi-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-device-types-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-entity-ids-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-error-dcmi-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-error-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo: \ util/$(am__dirstamp) util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-ipmb-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo: \ util/$(am__dirstamp) util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-lan-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-outofband-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-rmcpplus-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo: \ util/$(am__dirstamp) util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-sensor-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-timestamp-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-ipmi-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) util/libfreeipmi_la-rmcp-util.lo: util/$(am__dirstamp) \ util/$(DEPDIR)/$(am__dirstamp) libfreeipmi.la: $(libfreeipmi_la_OBJECTS) $(libfreeipmi_la_DEPENDENCIES) $(EXTRA_libfreeipmi_la_DEPENDENCIES) $(AM_V_CCLD)$(libfreeipmi_la_LINK) -rpath $(libdir) $(libfreeipmi_la_OBJECTS) $(libfreeipmi_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) -rm -f api/*.$(OBJEXT) -rm -f api/*.lo -rm -f cmds/*.$(OBJEXT) -rm -f cmds/*.lo -rm -f debug/*.$(OBJEXT) -rm -f debug/*.lo -rm -f driver/*.$(OBJEXT) -rm -f driver/*.lo -rm -f fiid/*.$(OBJEXT) -rm -f fiid/*.lo -rm -f fru/*.$(OBJEXT) -rm -f fru/*.lo -rm -f interface/*.$(OBJEXT) -rm -f interface/*.lo -rm -f interpret/*.$(OBJEXT) -rm -f interpret/*.lo -rm -f libcommon/*.$(OBJEXT) -rm -f libcommon/*.lo -rm -f locate/*.$(OBJEXT) -rm -f locate/*.lo -rm -f payload/*.$(OBJEXT) -rm -f payload/*.lo -rm -f record-format/*.$(OBJEXT) -rm -f record-format/*.lo -rm -f sdr/*.$(OBJEXT) -rm -f sdr/*.lo -rm -f sel/*.$(OBJEXT) -rm -f sel/*.lo -rm -f sensor-read/*.$(OBJEXT) -rm -f sensor-read/*.lo -rm -f spec/*.$(OBJEXT) -rm -f spec/*.lo -rm -f util/*.$(OBJEXT) -rm -f util/*.lo distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-api-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-session-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@api/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver-api.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@cmds/$(DEPDIR)/libfreeipmi_la-rmcp-cmds.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-inband.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-lan.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcpplus.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-sdr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-semaphores.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@driver/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fiid/$(DEPDIR)/libfreeipmi_la-fiid.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-data.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-ipmi-network.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interface/$(DEPDIR)/libfreeipmi_la-rmcp-interface.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sensor.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-bit-ops.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-crypt.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-fiid-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md2.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md5.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-acpi-spmi.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-defaults.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-dmidecode.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-pci.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-smbios.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@payload/$(DEPDIR)/libfreeipmi_la-ipmi-sol-payload.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-dimmspd-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-information-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sel-record-format.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-create.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-delete.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-stats.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-dell-poweredge.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-node-manager.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-windmill.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5441.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5442.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-linux-kernel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-quanta-s99q.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-sun-x4140.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-wistron-c6220.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-chassis-types-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-language-codes-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-types-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-units-spec.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-channel-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-error-dcmi-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-error-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-lan-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-outofband-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-timestamp-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-ipmi-util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@util/$(DEPDIR)/libfreeipmi_la-rmcp-util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< api/libfreeipmi_la-ipmi-api.lo: api/ipmi-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-api.Tpo -c -o api/libfreeipmi_la-ipmi-api.lo `test -f 'api/ipmi-api.c' || echo '$(srcdir)/'`api/ipmi-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-api.c' object='api/libfreeipmi_la-ipmi-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-api.lo `test -f 'api/ipmi-api.c' || echo '$(srcdir)/'`api/ipmi-api.c api/libfreeipmi_la-ipmi-api-util.lo: api/ipmi-api-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-api-util.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-api-util.Tpo -c -o api/libfreeipmi_la-ipmi-api-util.lo `test -f 'api/ipmi-api-util.c' || echo '$(srcdir)/'`api/ipmi-api-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-api-util.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-api-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-api-util.c' object='api/libfreeipmi_la-ipmi-api-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-api-util.lo `test -f 'api/ipmi-api-util.c' || echo '$(srcdir)/'`api/ipmi-api-util.c api/libfreeipmi_la-ipmi-chassis-cmds-api.lo: api/ipmi-chassis-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-chassis-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-chassis-cmds-api.lo `test -f 'api/ipmi-chassis-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-chassis-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-chassis-cmds-api.c' object='api/libfreeipmi_la-ipmi-chassis-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-chassis-cmds-api.lo `test -f 'api/ipmi-chassis-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-chassis-cmds-api.c api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo: api/ipmi-dcmi-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo `test -f 'api/ipmi-dcmi-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-dcmi-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-dcmi-cmds-api.c' object='api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-dcmi-cmds-api.lo `test -f 'api/ipmi-dcmi-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-dcmi-cmds-api.c api/libfreeipmi_la-ipmi-device-global-cmds-api.lo: api/ipmi-device-global-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-device-global-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-device-global-cmds-api.lo `test -f 'api/ipmi-device-global-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-device-global-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-device-global-cmds-api.c' object='api/libfreeipmi_la-ipmi-device-global-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-device-global-cmds-api.lo `test -f 'api/ipmi-device-global-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-device-global-cmds-api.c api/libfreeipmi_la-ipmi-event-cmds-api.lo: api/ipmi-event-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-event-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-event-cmds-api.lo `test -f 'api/ipmi-event-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-event-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-event-cmds-api.c' object='api/libfreeipmi_la-ipmi-event-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-event-cmds-api.lo `test -f 'api/ipmi-event-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-event-cmds-api.c api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo: api/ipmi-firmware-firewall-command-discovery-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo `test -f 'api/ipmi-firmware-firewall-command-discovery-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-firmware-firewall-command-discovery-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-firmware-firewall-command-discovery-cmds-api.c' object='api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds-api.lo `test -f 'api/ipmi-firmware-firewall-command-discovery-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-firmware-firewall-command-discovery-cmds-api.c api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo: api/ipmi-fru-inventory-device-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo `test -f 'api/ipmi-fru-inventory-device-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-fru-inventory-device-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-fru-inventory-device-cmds-api.c' object='api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-fru-inventory-device-cmds-api.lo `test -f 'api/ipmi-fru-inventory-device-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-fru-inventory-device-cmds-api.c api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo: api/ipmi-inteldcmi-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver-api.Tpo -c -o api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo `test -f 'api/ipmi-inteldcmi-driver-api.c' || echo '$(srcdir)/'`api/ipmi-inteldcmi-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-inteldcmi-driver-api.c' object='api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-inteldcmi-driver-api.lo `test -f 'api/ipmi-inteldcmi-driver-api.c' || echo '$(srcdir)/'`api/ipmi-inteldcmi-driver-api.c api/libfreeipmi_la-ipmi-kcs-driver-api.lo: api/ipmi-kcs-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-kcs-driver-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver-api.Tpo -c -o api/libfreeipmi_la-ipmi-kcs-driver-api.lo `test -f 'api/ipmi-kcs-driver-api.c' || echo '$(srcdir)/'`api/ipmi-kcs-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-kcs-driver-api.c' object='api/libfreeipmi_la-ipmi-kcs-driver-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-kcs-driver-api.lo `test -f 'api/ipmi-kcs-driver-api.c' || echo '$(srcdir)/'`api/ipmi-kcs-driver-api.c api/libfreeipmi_la-ipmi-lan-cmds-api.lo: api/ipmi-lan-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-lan-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-lan-cmds-api.lo `test -f 'api/ipmi-lan-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-lan-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-lan-cmds-api.c' object='api/libfreeipmi_la-ipmi-lan-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-lan-cmds-api.lo `test -f 'api/ipmi-lan-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-lan-cmds-api.c api/libfreeipmi_la-ipmi-lan-interface-api.lo: api/ipmi-lan-interface-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-lan-interface-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface-api.Tpo -c -o api/libfreeipmi_la-ipmi-lan-interface-api.lo `test -f 'api/ipmi-lan-interface-api.c' || echo '$(srcdir)/'`api/ipmi-lan-interface-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-lan-interface-api.c' object='api/libfreeipmi_la-ipmi-lan-interface-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-lan-interface-api.lo `test -f 'api/ipmi-lan-interface-api.c' || echo '$(srcdir)/'`api/ipmi-lan-interface-api.c api/libfreeipmi_la-ipmi-lan-session-common.lo: api/ipmi-lan-session-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-lan-session-common.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-session-common.Tpo -c -o api/libfreeipmi_la-ipmi-lan-session-common.lo `test -f 'api/ipmi-lan-session-common.c' || echo '$(srcdir)/'`api/ipmi-lan-session-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-session-common.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-lan-session-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-lan-session-common.c' object='api/libfreeipmi_la-ipmi-lan-session-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-lan-session-common.lo `test -f 'api/ipmi-lan-session-common.c' || echo '$(srcdir)/'`api/ipmi-lan-session-common.c api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo: api/ipmi-messaging-support-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo `test -f 'api/ipmi-messaging-support-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-messaging-support-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-messaging-support-cmds-api.c' object='api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-messaging-support-cmds-api.lo `test -f 'api/ipmi-messaging-support-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-messaging-support-cmds-api.c api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo: api/ipmi-oem-intel-node-manager-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo `test -f 'api/ipmi-oem-intel-node-manager-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-oem-intel-node-manager-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-oem-intel-node-manager-cmds-api.c' object='api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds-api.lo `test -f 'api/ipmi-oem-intel-node-manager-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-oem-intel-node-manager-cmds-api.c api/libfreeipmi_la-ipmi-openipmi-driver-api.lo: api/ipmi-openipmi-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-openipmi-driver-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver-api.Tpo -c -o api/libfreeipmi_la-ipmi-openipmi-driver-api.lo `test -f 'api/ipmi-openipmi-driver-api.c' || echo '$(srcdir)/'`api/ipmi-openipmi-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-openipmi-driver-api.c' object='api/libfreeipmi_la-ipmi-openipmi-driver-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-openipmi-driver-api.lo `test -f 'api/ipmi-openipmi-driver-api.c' || echo '$(srcdir)/'`api/ipmi-openipmi-driver-api.c api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo: api/ipmi-pef-and-alerting-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo `test -f 'api/ipmi-pef-and-alerting-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-pef-and-alerting-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-pef-and-alerting-cmds-api.c' object='api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-pef-and-alerting-cmds-api.lo `test -f 'api/ipmi-pef-and-alerting-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-pef-and-alerting-cmds-api.c api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo: api/ipmi-rmcpplus-support-and-payload-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo `test -f 'api/ipmi-rmcpplus-support-and-payload-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-rmcpplus-support-and-payload-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-rmcpplus-support-and-payload-cmds-api.c' object='api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds-api.lo `test -f 'api/ipmi-rmcpplus-support-and-payload-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-rmcpplus-support-and-payload-cmds-api.c api/libfreeipmi_la-ipmi-sel-cmds-api.lo: api/ipmi-sel-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-sel-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-sel-cmds-api.lo `test -f 'api/ipmi-sel-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sel-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-sel-cmds-api.c' object='api/libfreeipmi_la-ipmi-sel-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-sel-cmds-api.lo `test -f 'api/ipmi-sel-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sel-cmds-api.c api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo: api/ipmi-sdr-repository-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo `test -f 'api/ipmi-sdr-repository-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sdr-repository-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-sdr-repository-cmds-api.c' object='api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-sdr-repository-cmds-api.lo `test -f 'api/ipmi-sdr-repository-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sdr-repository-cmds-api.c api/libfreeipmi_la-ipmi-sensor-cmds-api.lo: api/ipmi-sensor-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-sensor-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-sensor-cmds-api.lo `test -f 'api/ipmi-sensor-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sensor-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-sensor-cmds-api.c' object='api/libfreeipmi_la-ipmi-sensor-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-sensor-cmds-api.lo `test -f 'api/ipmi-sensor-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sensor-cmds-api.c api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo: api/ipmi-serial-modem-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo `test -f 'api/ipmi-serial-modem-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-serial-modem-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-serial-modem-cmds-api.c' object='api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-serial-modem-cmds-api.lo `test -f 'api/ipmi-serial-modem-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-serial-modem-cmds-api.c api/libfreeipmi_la-ipmi-sol-cmds-api.lo: api/ipmi-sol-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-sol-cmds-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds-api.Tpo -c -o api/libfreeipmi_la-ipmi-sol-cmds-api.lo `test -f 'api/ipmi-sol-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sol-cmds-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-sol-cmds-api.c' object='api/libfreeipmi_la-ipmi-sol-cmds-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-sol-cmds-api.lo `test -f 'api/ipmi-sol-cmds-api.c' || echo '$(srcdir)/'`api/ipmi-sol-cmds-api.c api/libfreeipmi_la-ipmi-ssif-driver-api.lo: api/ipmi-ssif-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-ssif-driver-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver-api.Tpo -c -o api/libfreeipmi_la-ipmi-ssif-driver-api.lo `test -f 'api/ipmi-ssif-driver-api.c' || echo '$(srcdir)/'`api/ipmi-ssif-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-ssif-driver-api.c' object='api/libfreeipmi_la-ipmi-ssif-driver-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-ssif-driver-api.lo `test -f 'api/ipmi-ssif-driver-api.c' || echo '$(srcdir)/'`api/ipmi-ssif-driver-api.c api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo: api/ipmi-sunbmc-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo -MD -MP -MF api/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver-api.Tpo -c -o api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo `test -f 'api/ipmi-sunbmc-driver-api.c' || echo '$(srcdir)/'`api/ipmi-sunbmc-driver-api.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) api/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver-api.Tpo api/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver-api.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='api/ipmi-sunbmc-driver-api.c' object='api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o api/libfreeipmi_la-ipmi-sunbmc-driver-api.lo `test -f 'api/ipmi-sunbmc-driver-api.c' || echo '$(srcdir)/'`api/ipmi-sunbmc-driver-api.c cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo: cmds/ipmi-bmc-watchdog-timer-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo `test -f 'cmds/ipmi-bmc-watchdog-timer-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-bmc-watchdog-timer-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-bmc-watchdog-timer-cmds.c' object='cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-bmc-watchdog-timer-cmds.lo `test -f 'cmds/ipmi-bmc-watchdog-timer-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-bmc-watchdog-timer-cmds.c cmds/libfreeipmi_la-ipmi-chassis-cmds.lo: cmds/ipmi-chassis-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-chassis-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-chassis-cmds.lo `test -f 'cmds/ipmi-chassis-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-chassis-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-chassis-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-chassis-cmds.c' object='cmds/libfreeipmi_la-ipmi-chassis-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-chassis-cmds.lo `test -f 'cmds/ipmi-chassis-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-chassis-cmds.c cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo: cmds/ipmi-dcmi-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo `test -f 'cmds/ipmi-dcmi-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-dcmi-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-dcmi-cmds.c' object='cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-dcmi-cmds.lo `test -f 'cmds/ipmi-dcmi-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-dcmi-cmds.c cmds/libfreeipmi_la-ipmi-device-global-cmds.lo: cmds/ipmi-device-global-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-device-global-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-device-global-cmds.lo `test -f 'cmds/ipmi-device-global-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-device-global-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-device-global-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-device-global-cmds.c' object='cmds/libfreeipmi_la-ipmi-device-global-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-device-global-cmds.lo `test -f 'cmds/ipmi-device-global-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-device-global-cmds.c cmds/libfreeipmi_la-ipmi-event-cmds.lo: cmds/ipmi-event-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-event-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-event-cmds.lo `test -f 'cmds/ipmi-event-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-event-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-event-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-event-cmds.c' object='cmds/libfreeipmi_la-ipmi-event-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-event-cmds.lo `test -f 'cmds/ipmi-event-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-event-cmds.c cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo: cmds/ipmi-firmware-firewall-command-discovery-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo `test -f 'cmds/ipmi-firmware-firewall-command-discovery-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-firmware-firewall-command-discovery-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-firmware-firewall-command-discovery-cmds.c' object='cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-firmware-firewall-command-discovery-cmds.lo `test -f 'cmds/ipmi-firmware-firewall-command-discovery-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-firmware-firewall-command-discovery-cmds.c cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo: cmds/ipmi-fru-inventory-device-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo `test -f 'cmds/ipmi-fru-inventory-device-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-fru-inventory-device-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-fru-inventory-device-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-fru-inventory-device-cmds.c' object='cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-fru-inventory-device-cmds.lo `test -f 'cmds/ipmi-fru-inventory-device-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-fru-inventory-device-cmds.c cmds/libfreeipmi_la-ipmi-lan-cmds.lo: cmds/ipmi-lan-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-lan-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-lan-cmds.lo `test -f 'cmds/ipmi-lan-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-lan-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-lan-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-lan-cmds.c' object='cmds/libfreeipmi_la-ipmi-lan-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-lan-cmds.lo `test -f 'cmds/ipmi-lan-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-lan-cmds.c cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo: cmds/ipmi-messaging-support-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo `test -f 'cmds/ipmi-messaging-support-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-messaging-support-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-messaging-support-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-messaging-support-cmds.c' object='cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-messaging-support-cmds.lo `test -f 'cmds/ipmi-messaging-support-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-messaging-support-cmds.c cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo: cmds/ipmi-oem-intel-node-manager-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo `test -f 'cmds/ipmi-oem-intel-node-manager-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-oem-intel-node-manager-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-oem-intel-node-manager-cmds.c' object='cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-oem-intel-node-manager-cmds.lo `test -f 'cmds/ipmi-oem-intel-node-manager-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-oem-intel-node-manager-cmds.c cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo: cmds/ipmi-pef-and-alerting-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo `test -f 'cmds/ipmi-pef-and-alerting-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-pef-and-alerting-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-pef-and-alerting-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-pef-and-alerting-cmds.c' object='cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-pef-and-alerting-cmds.lo `test -f 'cmds/ipmi-pef-and-alerting-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-pef-and-alerting-cmds.c cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo: cmds/ipmi-rmcpplus-support-and-payload-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo `test -f 'cmds/ipmi-rmcpplus-support-and-payload-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-rmcpplus-support-and-payload-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-rmcpplus-support-and-payload-cmds.c' object='cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-rmcpplus-support-and-payload-cmds.lo `test -f 'cmds/ipmi-rmcpplus-support-and-payload-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-rmcpplus-support-and-payload-cmds.c cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo: cmds/ipmi-sdr-repository-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo `test -f 'cmds/ipmi-sdr-repository-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sdr-repository-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-repository-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-sdr-repository-cmds.c' object='cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-sdr-repository-cmds.lo `test -f 'cmds/ipmi-sdr-repository-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sdr-repository-cmds.c cmds/libfreeipmi_la-ipmi-sel-cmds.lo: cmds/ipmi-sel-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-sel-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-sel-cmds.lo `test -f 'cmds/ipmi-sel-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sel-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sel-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-sel-cmds.c' object='cmds/libfreeipmi_la-ipmi-sel-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-sel-cmds.lo `test -f 'cmds/ipmi-sel-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sel-cmds.c cmds/libfreeipmi_la-ipmi-sensor-cmds.lo: cmds/ipmi-sensor-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-sensor-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-sensor-cmds.lo `test -f 'cmds/ipmi-sensor-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sensor-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-sensor-cmds.c' object='cmds/libfreeipmi_la-ipmi-sensor-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-sensor-cmds.lo `test -f 'cmds/ipmi-sensor-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sensor-cmds.c cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo: cmds/ipmi-serial-modem-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo `test -f 'cmds/ipmi-serial-modem-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-serial-modem-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-serial-modem-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-serial-modem-cmds.c' object='cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-serial-modem-cmds.lo `test -f 'cmds/ipmi-serial-modem-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-serial-modem-cmds.c cmds/libfreeipmi_la-ipmi-sol-cmds.lo: cmds/ipmi-sol-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-ipmi-sol-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds.Tpo -c -o cmds/libfreeipmi_la-ipmi-sol-cmds.lo `test -f 'cmds/ipmi-sol-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sol-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-ipmi-sol-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/ipmi-sol-cmds.c' object='cmds/libfreeipmi_la-ipmi-sol-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-ipmi-sol-cmds.lo `test -f 'cmds/ipmi-sol-cmds.c' || echo '$(srcdir)/'`cmds/ipmi-sol-cmds.c cmds/libfreeipmi_la-rmcp-cmds.lo: cmds/rmcp-cmds.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT cmds/libfreeipmi_la-rmcp-cmds.lo -MD -MP -MF cmds/$(DEPDIR)/libfreeipmi_la-rmcp-cmds.Tpo -c -o cmds/libfreeipmi_la-rmcp-cmds.lo `test -f 'cmds/rmcp-cmds.c' || echo '$(srcdir)/'`cmds/rmcp-cmds.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) cmds/$(DEPDIR)/libfreeipmi_la-rmcp-cmds.Tpo cmds/$(DEPDIR)/libfreeipmi_la-rmcp-cmds.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cmds/rmcp-cmds.c' object='cmds/libfreeipmi_la-rmcp-cmds.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o cmds/libfreeipmi_la-rmcp-cmds.lo `test -f 'cmds/rmcp-cmds.c' || echo '$(srcdir)/'`cmds/rmcp-cmds.c debug/libfreeipmi_la-ipmi-debug.lo: debug/ipmi-debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug.Tpo -c -o debug/libfreeipmi_la-ipmi-debug.lo `test -f 'debug/ipmi-debug.c' || echo '$(srcdir)/'`debug/ipmi-debug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug.c' object='debug/libfreeipmi_la-ipmi-debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug.lo `test -f 'debug/ipmi-debug.c' || echo '$(srcdir)/'`debug/ipmi-debug.c debug/libfreeipmi_la-ipmi-debug-common.lo: debug/ipmi-debug-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-common.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-common.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-common.lo `test -f 'debug/ipmi-debug-common.c' || echo '$(srcdir)/'`debug/ipmi-debug-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-common.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-common.c' object='debug/libfreeipmi_la-ipmi-debug-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-common.lo `test -f 'debug/ipmi-debug-common.c' || echo '$(srcdir)/'`debug/ipmi-debug-common.c debug/libfreeipmi_la-ipmi-debug-inband.lo: debug/ipmi-debug-inband.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-inband.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-inband.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-inband.lo `test -f 'debug/ipmi-debug-inband.c' || echo '$(srcdir)/'`debug/ipmi-debug-inband.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-inband.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-inband.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-inband.c' object='debug/libfreeipmi_la-ipmi-debug-inband.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-inband.lo `test -f 'debug/ipmi-debug-inband.c' || echo '$(srcdir)/'`debug/ipmi-debug-inband.c debug/libfreeipmi_la-ipmi-debug-lan.lo: debug/ipmi-debug-lan.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-lan.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-lan.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-lan.lo `test -f 'debug/ipmi-debug-lan.c' || echo '$(srcdir)/'`debug/ipmi-debug-lan.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-lan.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-lan.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-lan.c' object='debug/libfreeipmi_la-ipmi-debug-lan.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-lan.lo `test -f 'debug/ipmi-debug-lan.c' || echo '$(srcdir)/'`debug/ipmi-debug-lan.c debug/libfreeipmi_la-ipmi-debug-rmcp.lo: debug/ipmi-debug-rmcp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-rmcp.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcp.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-rmcp.lo `test -f 'debug/ipmi-debug-rmcp.c' || echo '$(srcdir)/'`debug/ipmi-debug-rmcp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcp.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-rmcp.c' object='debug/libfreeipmi_la-ipmi-debug-rmcp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-rmcp.lo `test -f 'debug/ipmi-debug-rmcp.c' || echo '$(srcdir)/'`debug/ipmi-debug-rmcp.c debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo: debug/ipmi-debug-rmcpplus.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcpplus.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo `test -f 'debug/ipmi-debug-rmcpplus.c' || echo '$(srcdir)/'`debug/ipmi-debug-rmcpplus.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcpplus.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-rmcpplus.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-rmcpplus.c' object='debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-rmcpplus.lo `test -f 'debug/ipmi-debug-rmcpplus.c' || echo '$(srcdir)/'`debug/ipmi-debug-rmcpplus.c debug/libfreeipmi_la-ipmi-debug-sdr.lo: debug/ipmi-debug-sdr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT debug/libfreeipmi_la-ipmi-debug-sdr.lo -MD -MP -MF debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-sdr.Tpo -c -o debug/libfreeipmi_la-ipmi-debug-sdr.lo `test -f 'debug/ipmi-debug-sdr.c' || echo '$(srcdir)/'`debug/ipmi-debug-sdr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-sdr.Tpo debug/$(DEPDIR)/libfreeipmi_la-ipmi-debug-sdr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug/ipmi-debug-sdr.c' object='debug/libfreeipmi_la-ipmi-debug-sdr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o debug/libfreeipmi_la-ipmi-debug-sdr.lo `test -f 'debug/ipmi-debug-sdr.c' || echo '$(srcdir)/'`debug/ipmi-debug-sdr.c driver/libfreeipmi_la-ipmi-semaphores.lo: driver/ipmi-semaphores.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-semaphores.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-semaphores.Tpo -c -o driver/libfreeipmi_la-ipmi-semaphores.lo `test -f 'driver/ipmi-semaphores.c' || echo '$(srcdir)/'`driver/ipmi-semaphores.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-semaphores.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-semaphores.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-semaphores.c' object='driver/libfreeipmi_la-ipmi-semaphores.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-semaphores.lo `test -f 'driver/ipmi-semaphores.c' || echo '$(srcdir)/'`driver/ipmi-semaphores.c driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo: driver/ipmi-inteldcmi-driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver.Tpo -c -o driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo `test -f 'driver/ipmi-inteldcmi-driver.c' || echo '$(srcdir)/'`driver/ipmi-inteldcmi-driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-inteldcmi-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-inteldcmi-driver.c' object='driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-inteldcmi-driver.lo `test -f 'driver/ipmi-inteldcmi-driver.c' || echo '$(srcdir)/'`driver/ipmi-inteldcmi-driver.c driver/libfreeipmi_la-ipmi-kcs-driver.lo: driver/ipmi-kcs-driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-kcs-driver.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver.Tpo -c -o driver/libfreeipmi_la-ipmi-kcs-driver.lo `test -f 'driver/ipmi-kcs-driver.c' || echo '$(srcdir)/'`driver/ipmi-kcs-driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-kcs-driver.c' object='driver/libfreeipmi_la-ipmi-kcs-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-kcs-driver.lo `test -f 'driver/ipmi-kcs-driver.c' || echo '$(srcdir)/'`driver/ipmi-kcs-driver.c driver/libfreeipmi_la-ipmi-openipmi-driver.lo: driver/ipmi-openipmi-driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-openipmi-driver.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver.Tpo -c -o driver/libfreeipmi_la-ipmi-openipmi-driver.lo `test -f 'driver/ipmi-openipmi-driver.c' || echo '$(srcdir)/'`driver/ipmi-openipmi-driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-openipmi-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-openipmi-driver.c' object='driver/libfreeipmi_la-ipmi-openipmi-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-openipmi-driver.lo `test -f 'driver/ipmi-openipmi-driver.c' || echo '$(srcdir)/'`driver/ipmi-openipmi-driver.c driver/libfreeipmi_la-ipmi-sunbmc-driver.lo: driver/ipmi-sunbmc-driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-sunbmc-driver.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver.Tpo -c -o driver/libfreeipmi_la-ipmi-sunbmc-driver.lo `test -f 'driver/ipmi-sunbmc-driver.c' || echo '$(srcdir)/'`driver/ipmi-sunbmc-driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-sunbmc-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-sunbmc-driver.c' object='driver/libfreeipmi_la-ipmi-sunbmc-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-sunbmc-driver.lo `test -f 'driver/ipmi-sunbmc-driver.c' || echo '$(srcdir)/'`driver/ipmi-sunbmc-driver.c driver/libfreeipmi_la-ipmi-ssif-driver.lo: driver/ipmi-ssif-driver.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT driver/libfreeipmi_la-ipmi-ssif-driver.lo -MD -MP -MF driver/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver.Tpo -c -o driver/libfreeipmi_la-ipmi-ssif-driver.lo `test -f 'driver/ipmi-ssif-driver.c' || echo '$(srcdir)/'`driver/ipmi-ssif-driver.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) driver/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver.Tpo driver/$(DEPDIR)/libfreeipmi_la-ipmi-ssif-driver.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='driver/ipmi-ssif-driver.c' object='driver/libfreeipmi_la-ipmi-ssif-driver.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o driver/libfreeipmi_la-ipmi-ssif-driver.lo `test -f 'driver/ipmi-ssif-driver.c' || echo '$(srcdir)/'`driver/ipmi-ssif-driver.c fiid/libfreeipmi_la-fiid.lo: fiid/fiid.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fiid/libfreeipmi_la-fiid.lo -MD -MP -MF fiid/$(DEPDIR)/libfreeipmi_la-fiid.Tpo -c -o fiid/libfreeipmi_la-fiid.lo `test -f 'fiid/fiid.c' || echo '$(srcdir)/'`fiid/fiid.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fiid/$(DEPDIR)/libfreeipmi_la-fiid.Tpo fiid/$(DEPDIR)/libfreeipmi_la-fiid.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fiid/fiid.c' object='fiid/libfreeipmi_la-fiid.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fiid/libfreeipmi_la-fiid.lo `test -f 'fiid/fiid.c' || echo '$(srcdir)/'`fiid/fiid.c fru/libfreeipmi_la-ipmi-fru.lo: fru/ipmi-fru.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fru/libfreeipmi_la-ipmi-fru.lo -MD -MP -MF fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru.Tpo -c -o fru/libfreeipmi_la-ipmi-fru.lo `test -f 'fru/ipmi-fru.c' || echo '$(srcdir)/'`fru/ipmi-fru.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru.Tpo fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fru/ipmi-fru.c' object='fru/libfreeipmi_la-ipmi-fru.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fru/libfreeipmi_la-ipmi-fru.lo `test -f 'fru/ipmi-fru.c' || echo '$(srcdir)/'`fru/ipmi-fru.c fru/libfreeipmi_la-ipmi-fru-common.lo: fru/ipmi-fru-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fru/libfreeipmi_la-ipmi-fru-common.lo -MD -MP -MF fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-common.Tpo -c -o fru/libfreeipmi_la-ipmi-fru-common.lo `test -f 'fru/ipmi-fru-common.c' || echo '$(srcdir)/'`fru/ipmi-fru-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-common.Tpo fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fru/ipmi-fru-common.c' object='fru/libfreeipmi_la-ipmi-fru-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fru/libfreeipmi_la-ipmi-fru-common.lo `test -f 'fru/ipmi-fru-common.c' || echo '$(srcdir)/'`fru/ipmi-fru-common.c fru/libfreeipmi_la-ipmi-fru-data.lo: fru/ipmi-fru-data.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fru/libfreeipmi_la-ipmi-fru-data.lo -MD -MP -MF fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-data.Tpo -c -o fru/libfreeipmi_la-ipmi-fru-data.lo `test -f 'fru/ipmi-fru-data.c' || echo '$(srcdir)/'`fru/ipmi-fru-data.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-data.Tpo fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-data.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fru/ipmi-fru-data.c' object='fru/libfreeipmi_la-ipmi-fru-data.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fru/libfreeipmi_la-ipmi-fru-data.lo `test -f 'fru/ipmi-fru-data.c' || echo '$(srcdir)/'`fru/ipmi-fru-data.c fru/libfreeipmi_la-ipmi-fru-util.lo: fru/ipmi-fru-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT fru/libfreeipmi_la-ipmi-fru-util.lo -MD -MP -MF fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-util.Tpo -c -o fru/libfreeipmi_la-ipmi-fru-util.lo `test -f 'fru/ipmi-fru-util.c' || echo '$(srcdir)/'`fru/ipmi-fru-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-util.Tpo fru/$(DEPDIR)/libfreeipmi_la-ipmi-fru-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fru/ipmi-fru-util.c' object='fru/libfreeipmi_la-ipmi-fru-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o fru/libfreeipmi_la-ipmi-fru-util.lo `test -f 'fru/ipmi-fru-util.c' || echo '$(srcdir)/'`fru/ipmi-fru-util.c interface/libfreeipmi_la-ipmi-ipmb-interface.lo: interface/ipmi-ipmb-interface.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-ipmi-ipmb-interface.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-interface.Tpo -c -o interface/libfreeipmi_la-ipmi-ipmb-interface.lo `test -f 'interface/ipmi-ipmb-interface.c' || echo '$(srcdir)/'`interface/ipmi-ipmb-interface.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-interface.Tpo interface/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-interface.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/ipmi-ipmb-interface.c' object='interface/libfreeipmi_la-ipmi-ipmb-interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-ipmi-ipmb-interface.lo `test -f 'interface/ipmi-ipmb-interface.c' || echo '$(srcdir)/'`interface/ipmi-ipmb-interface.c interface/libfreeipmi_la-ipmi-kcs-interface.lo: interface/ipmi-kcs-interface.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-ipmi-kcs-interface.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-interface.Tpo -c -o interface/libfreeipmi_la-ipmi-kcs-interface.lo `test -f 'interface/ipmi-kcs-interface.c' || echo '$(srcdir)/'`interface/ipmi-kcs-interface.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-interface.Tpo interface/$(DEPDIR)/libfreeipmi_la-ipmi-kcs-interface.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/ipmi-kcs-interface.c' object='interface/libfreeipmi_la-ipmi-kcs-interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-ipmi-kcs-interface.lo `test -f 'interface/ipmi-kcs-interface.c' || echo '$(srcdir)/'`interface/ipmi-kcs-interface.c interface/libfreeipmi_la-ipmi-lan-interface.lo: interface/ipmi-lan-interface.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-ipmi-lan-interface.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface.Tpo -c -o interface/libfreeipmi_la-ipmi-lan-interface.lo `test -f 'interface/ipmi-lan-interface.c' || echo '$(srcdir)/'`interface/ipmi-lan-interface.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface.Tpo interface/$(DEPDIR)/libfreeipmi_la-ipmi-lan-interface.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/ipmi-lan-interface.c' object='interface/libfreeipmi_la-ipmi-lan-interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-ipmi-lan-interface.lo `test -f 'interface/ipmi-lan-interface.c' || echo '$(srcdir)/'`interface/ipmi-lan-interface.c interface/libfreeipmi_la-ipmi-network.lo: interface/ipmi-network.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-ipmi-network.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-ipmi-network.Tpo -c -o interface/libfreeipmi_la-ipmi-network.lo `test -f 'interface/ipmi-network.c' || echo '$(srcdir)/'`interface/ipmi-network.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-ipmi-network.Tpo interface/$(DEPDIR)/libfreeipmi_la-ipmi-network.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/ipmi-network.c' object='interface/libfreeipmi_la-ipmi-network.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-ipmi-network.lo `test -f 'interface/ipmi-network.c' || echo '$(srcdir)/'`interface/ipmi-network.c interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo: interface/ipmi-rmcpplus-interface.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-interface.Tpo -c -o interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo `test -f 'interface/ipmi-rmcpplus-interface.c' || echo '$(srcdir)/'`interface/ipmi-rmcpplus-interface.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-interface.Tpo interface/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-interface.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/ipmi-rmcpplus-interface.c' object='interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-ipmi-rmcpplus-interface.lo `test -f 'interface/ipmi-rmcpplus-interface.c' || echo '$(srcdir)/'`interface/ipmi-rmcpplus-interface.c interface/libfreeipmi_la-rmcp-interface.lo: interface/rmcp-interface.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interface/libfreeipmi_la-rmcp-interface.lo -MD -MP -MF interface/$(DEPDIR)/libfreeipmi_la-rmcp-interface.Tpo -c -o interface/libfreeipmi_la-rmcp-interface.lo `test -f 'interface/rmcp-interface.c' || echo '$(srcdir)/'`interface/rmcp-interface.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interface/$(DEPDIR)/libfreeipmi_la-rmcp-interface.Tpo interface/$(DEPDIR)/libfreeipmi_la-rmcp-interface.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interface/rmcp-interface.c' object='interface/libfreeipmi_la-rmcp-interface.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interface/libfreeipmi_la-rmcp-interface.lo `test -f 'interface/rmcp-interface.c' || echo '$(srcdir)/'`interface/rmcp-interface.c interpret/libfreeipmi_la-ipmi-interpret.lo: interpret/ipmi-interpret.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interpret/libfreeipmi_la-ipmi-interpret.lo -MD -MP -MF interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret.Tpo -c -o interpret/libfreeipmi_la-ipmi-interpret.lo `test -f 'interpret/ipmi-interpret.c' || echo '$(srcdir)/'`interpret/ipmi-interpret.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret.Tpo interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interpret/ipmi-interpret.c' object='interpret/libfreeipmi_la-ipmi-interpret.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interpret/libfreeipmi_la-ipmi-interpret.lo `test -f 'interpret/ipmi-interpret.c' || echo '$(srcdir)/'`interpret/ipmi-interpret.c interpret/libfreeipmi_la-ipmi-interpret-config-common.lo: interpret/ipmi-interpret-config-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interpret/libfreeipmi_la-ipmi-interpret-config-common.lo -MD -MP -MF interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-common.Tpo -c -o interpret/libfreeipmi_la-ipmi-interpret-config-common.lo `test -f 'interpret/ipmi-interpret-config-common.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-common.Tpo interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interpret/ipmi-interpret-config-common.c' object='interpret/libfreeipmi_la-ipmi-interpret-config-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interpret/libfreeipmi_la-ipmi-interpret-config-common.lo `test -f 'interpret/ipmi-interpret-config-common.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-common.c interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo: interpret/ipmi-interpret-config-sel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo -MD -MP -MF interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sel.Tpo -c -o interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo `test -f 'interpret/ipmi-interpret-config-sel.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-sel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sel.Tpo interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interpret/ipmi-interpret-config-sel.c' object='interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interpret/libfreeipmi_la-ipmi-interpret-config-sel.lo `test -f 'interpret/ipmi-interpret-config-sel.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-sel.c interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo: interpret/ipmi-interpret-config-sensor.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo -MD -MP -MF interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sensor.Tpo -c -o interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo `test -f 'interpret/ipmi-interpret-config-sensor.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-sensor.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sensor.Tpo interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-config-sensor.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interpret/ipmi-interpret-config-sensor.c' object='interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interpret/libfreeipmi_la-ipmi-interpret-config-sensor.lo `test -f 'interpret/ipmi-interpret-config-sensor.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-config-sensor.c interpret/libfreeipmi_la-ipmi-interpret-util.lo: interpret/ipmi-interpret-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT interpret/libfreeipmi_la-ipmi-interpret-util.lo -MD -MP -MF interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-util.Tpo -c -o interpret/libfreeipmi_la-ipmi-interpret-util.lo `test -f 'interpret/ipmi-interpret-util.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-util.Tpo interpret/$(DEPDIR)/libfreeipmi_la-ipmi-interpret-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='interpret/ipmi-interpret-util.c' object='interpret/libfreeipmi_la-ipmi-interpret-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o interpret/libfreeipmi_la-ipmi-interpret-util.lo `test -f 'interpret/ipmi-interpret-util.c' || echo '$(srcdir)/'`interpret/ipmi-interpret-util.c libcommon/libfreeipmi_la-ipmi-bit-ops.lo: libcommon/ipmi-bit-ops.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcommon/libfreeipmi_la-ipmi-bit-ops.lo -MD -MP -MF libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-bit-ops.Tpo -c -o libcommon/libfreeipmi_la-ipmi-bit-ops.lo `test -f 'libcommon/ipmi-bit-ops.c' || echo '$(srcdir)/'`libcommon/ipmi-bit-ops.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-bit-ops.Tpo libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-bit-ops.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcommon/ipmi-bit-ops.c' object='libcommon/libfreeipmi_la-ipmi-bit-ops.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcommon/libfreeipmi_la-ipmi-bit-ops.lo `test -f 'libcommon/ipmi-bit-ops.c' || echo '$(srcdir)/'`libcommon/ipmi-bit-ops.c libcommon/libfreeipmi_la-ipmi-crypt.lo: libcommon/ipmi-crypt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcommon/libfreeipmi_la-ipmi-crypt.lo -MD -MP -MF libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-crypt.Tpo -c -o libcommon/libfreeipmi_la-ipmi-crypt.lo `test -f 'libcommon/ipmi-crypt.c' || echo '$(srcdir)/'`libcommon/ipmi-crypt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-crypt.Tpo libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-crypt.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcommon/ipmi-crypt.c' object='libcommon/libfreeipmi_la-ipmi-crypt.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcommon/libfreeipmi_la-ipmi-crypt.lo `test -f 'libcommon/ipmi-crypt.c' || echo '$(srcdir)/'`libcommon/ipmi-crypt.c libcommon/libfreeipmi_la-ipmi-fiid-util.lo: libcommon/ipmi-fiid-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcommon/libfreeipmi_la-ipmi-fiid-util.lo -MD -MP -MF libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-fiid-util.Tpo -c -o libcommon/libfreeipmi_la-ipmi-fiid-util.lo `test -f 'libcommon/ipmi-fiid-util.c' || echo '$(srcdir)/'`libcommon/ipmi-fiid-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-fiid-util.Tpo libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-fiid-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcommon/ipmi-fiid-util.c' object='libcommon/libfreeipmi_la-ipmi-fiid-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcommon/libfreeipmi_la-ipmi-fiid-util.lo `test -f 'libcommon/ipmi-fiid-util.c' || echo '$(srcdir)/'`libcommon/ipmi-fiid-util.c libcommon/libfreeipmi_la-ipmi-md2.lo: libcommon/ipmi-md2.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcommon/libfreeipmi_la-ipmi-md2.lo -MD -MP -MF libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md2.Tpo -c -o libcommon/libfreeipmi_la-ipmi-md2.lo `test -f 'libcommon/ipmi-md2.c' || echo '$(srcdir)/'`libcommon/ipmi-md2.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md2.Tpo libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md2.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcommon/ipmi-md2.c' object='libcommon/libfreeipmi_la-ipmi-md2.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcommon/libfreeipmi_la-ipmi-md2.lo `test -f 'libcommon/ipmi-md2.c' || echo '$(srcdir)/'`libcommon/ipmi-md2.c libcommon/libfreeipmi_la-ipmi-md5.lo: libcommon/ipmi-md5.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libcommon/libfreeipmi_la-ipmi-md5.lo -MD -MP -MF libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md5.Tpo -c -o libcommon/libfreeipmi_la-ipmi-md5.lo `test -f 'libcommon/ipmi-md5.c' || echo '$(srcdir)/'`libcommon/ipmi-md5.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md5.Tpo libcommon/$(DEPDIR)/libfreeipmi_la-ipmi-md5.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libcommon/ipmi-md5.c' object='libcommon/libfreeipmi_la-ipmi-md5.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libcommon/libfreeipmi_la-ipmi-md5.lo `test -f 'libcommon/ipmi-md5.c' || echo '$(srcdir)/'`libcommon/ipmi-md5.c locate/libfreeipmi_la-ipmi-locate.lo: locate/ipmi-locate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate.Tpo -c -o locate/libfreeipmi_la-ipmi-locate.lo `test -f 'locate/ipmi-locate.c' || echo '$(srcdir)/'`locate/ipmi-locate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate.c' object='locate/libfreeipmi_la-ipmi-locate.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate.lo `test -f 'locate/ipmi-locate.c' || echo '$(srcdir)/'`locate/ipmi-locate.c locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo: locate/ipmi-locate-acpi-spmi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-acpi-spmi.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo `test -f 'locate/ipmi-locate-acpi-spmi.c' || echo '$(srcdir)/'`locate/ipmi-locate-acpi-spmi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-acpi-spmi.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-acpi-spmi.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-acpi-spmi.c' object='locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-acpi-spmi.lo `test -f 'locate/ipmi-locate-acpi-spmi.c' || echo '$(srcdir)/'`locate/ipmi-locate-acpi-spmi.c locate/libfreeipmi_la-ipmi-locate-defaults.lo: locate/ipmi-locate-defaults.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-defaults.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-defaults.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-defaults.lo `test -f 'locate/ipmi-locate-defaults.c' || echo '$(srcdir)/'`locate/ipmi-locate-defaults.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-defaults.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-defaults.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-defaults.c' object='locate/libfreeipmi_la-ipmi-locate-defaults.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-defaults.lo `test -f 'locate/ipmi-locate-defaults.c' || echo '$(srcdir)/'`locate/ipmi-locate-defaults.c locate/libfreeipmi_la-ipmi-locate-dmidecode.lo: locate/ipmi-locate-dmidecode.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-dmidecode.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-dmidecode.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-dmidecode.lo `test -f 'locate/ipmi-locate-dmidecode.c' || echo '$(srcdir)/'`locate/ipmi-locate-dmidecode.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-dmidecode.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-dmidecode.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-dmidecode.c' object='locate/libfreeipmi_la-ipmi-locate-dmidecode.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-dmidecode.lo `test -f 'locate/ipmi-locate-dmidecode.c' || echo '$(srcdir)/'`locate/ipmi-locate-dmidecode.c locate/libfreeipmi_la-ipmi-locate-pci.lo: locate/ipmi-locate-pci.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-pci.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-pci.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-pci.lo `test -f 'locate/ipmi-locate-pci.c' || echo '$(srcdir)/'`locate/ipmi-locate-pci.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-pci.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-pci.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-pci.c' object='locate/libfreeipmi_la-ipmi-locate-pci.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-pci.lo `test -f 'locate/ipmi-locate-pci.c' || echo '$(srcdir)/'`locate/ipmi-locate-pci.c locate/libfreeipmi_la-ipmi-locate-smbios.lo: locate/ipmi-locate-smbios.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-smbios.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-smbios.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-smbios.lo `test -f 'locate/ipmi-locate-smbios.c' || echo '$(srcdir)/'`locate/ipmi-locate-smbios.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-smbios.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-smbios.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-smbios.c' object='locate/libfreeipmi_la-ipmi-locate-smbios.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-smbios.lo `test -f 'locate/ipmi-locate-smbios.c' || echo '$(srcdir)/'`locate/ipmi-locate-smbios.c locate/libfreeipmi_la-ipmi-locate-util.lo: locate/ipmi-locate-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT locate/libfreeipmi_la-ipmi-locate-util.lo -MD -MP -MF locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-util.Tpo -c -o locate/libfreeipmi_la-ipmi-locate-util.lo `test -f 'locate/ipmi-locate-util.c' || echo '$(srcdir)/'`locate/ipmi-locate-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-util.Tpo locate/$(DEPDIR)/libfreeipmi_la-ipmi-locate-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='locate/ipmi-locate-util.c' object='locate/libfreeipmi_la-ipmi-locate-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o locate/libfreeipmi_la-ipmi-locate-util.lo `test -f 'locate/ipmi-locate-util.c' || echo '$(srcdir)/'`locate/ipmi-locate-util.c payload/libfreeipmi_la-ipmi-sol-payload.lo: payload/ipmi-sol-payload.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT payload/libfreeipmi_la-ipmi-sol-payload.lo -MD -MP -MF payload/$(DEPDIR)/libfreeipmi_la-ipmi-sol-payload.Tpo -c -o payload/libfreeipmi_la-ipmi-sol-payload.lo `test -f 'payload/ipmi-sol-payload.c' || echo '$(srcdir)/'`payload/ipmi-sol-payload.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) payload/$(DEPDIR)/libfreeipmi_la-ipmi-sol-payload.Tpo payload/$(DEPDIR)/libfreeipmi_la-ipmi-sol-payload.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='payload/ipmi-sol-payload.c' object='payload/libfreeipmi_la-ipmi-sol-payload.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o payload/libfreeipmi_la-ipmi-sol-payload.lo `test -f 'payload/ipmi-sol-payload.c' || echo '$(srcdir)/'`payload/ipmi-sol-payload.c record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo: record-format/ipmi-cipher-suite-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo `test -f 'record-format/ipmi-cipher-suite-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-cipher-suite-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-cipher-suite-record-format.c' object='record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-cipher-suite-record-format.lo `test -f 'record-format/ipmi-cipher-suite-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-cipher-suite-record-format.c record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo: record-format/ipmi-fru-dimmspd-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-dimmspd-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo `test -f 'record-format/ipmi-fru-dimmspd-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-fru-dimmspd-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-dimmspd-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-dimmspd-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-fru-dimmspd-record-format.c' object='record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-fru-dimmspd-record-format.lo `test -f 'record-format/ipmi-fru-dimmspd-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-fru-dimmspd-record-format.c record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo: record-format/ipmi-fru-information-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-information-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo `test -f 'record-format/ipmi-fru-information-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-fru-information-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-information-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-fru-information-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-fru-information-record-format.c' object='record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-fru-information-record-format.lo `test -f 'record-format/ipmi-fru-information-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-fru-information-record-format.c record-format/libfreeipmi_la-ipmi-sdr-record-format.lo: record-format/ipmi-sdr-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-sdr-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-sdr-record-format.lo `test -f 'record-format/ipmi-sdr-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sdr-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-sdr-record-format.c' object='record-format/libfreeipmi_la-ipmi-sdr-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-sdr-record-format.lo `test -f 'record-format/ipmi-sdr-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sdr-record-format.c record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo: record-format/ipmi-sdr-oem-intel-node-manager-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo `test -f 'record-format/ipmi-sdr-oem-intel-node-manager-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sdr-oem-intel-node-manager-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-sdr-oem-intel-node-manager-record-format.c' object='record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager-record-format.lo `test -f 'record-format/ipmi-sdr-oem-intel-node-manager-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sdr-oem-intel-node-manager-record-format.c record-format/libfreeipmi_la-ipmi-sel-record-format.lo: record-format/ipmi-sel-record-format.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT record-format/libfreeipmi_la-ipmi-sel-record-format.lo -MD -MP -MF record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sel-record-format.Tpo -c -o record-format/libfreeipmi_la-ipmi-sel-record-format.lo `test -f 'record-format/ipmi-sel-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sel-record-format.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sel-record-format.Tpo record-format/$(DEPDIR)/libfreeipmi_la-ipmi-sel-record-format.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='record-format/ipmi-sel-record-format.c' object='record-format/libfreeipmi_la-ipmi-sel-record-format.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o record-format/libfreeipmi_la-ipmi-sel-record-format.lo `test -f 'record-format/ipmi-sel-record-format.c' || echo '$(srcdir)/'`record-format/ipmi-sel-record-format.c sdr/libfreeipmi_la-ipmi-sdr.lo: sdr/ipmi-sdr.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr.lo `test -f 'sdr/ipmi-sdr.c' || echo '$(srcdir)/'`sdr/ipmi-sdr.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr.c' object='sdr/libfreeipmi_la-ipmi-sdr.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr.lo `test -f 'sdr/ipmi-sdr.c' || echo '$(srcdir)/'`sdr/ipmi-sdr.c sdr/libfreeipmi_la-ipmi-sdr-common.lo: sdr/ipmi-sdr-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-common.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-common.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-common.lo `test -f 'sdr/ipmi-sdr-common.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-common.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-common.c' object='sdr/libfreeipmi_la-ipmi-sdr-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-common.lo `test -f 'sdr/ipmi-sdr-common.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-common.c sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo: sdr/ipmi-sdr-cache-create.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-create.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo `test -f 'sdr/ipmi-sdr-cache-create.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-create.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-create.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-create.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-cache-create.c' object='sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-create.lo `test -f 'sdr/ipmi-sdr-cache-create.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-create.c sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo: sdr/ipmi-sdr-cache-delete.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-delete.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo `test -f 'sdr/ipmi-sdr-cache-delete.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-delete.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-delete.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-delete.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-cache-delete.c' object='sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-delete.lo `test -f 'sdr/ipmi-sdr-cache-delete.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-delete.c sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo: sdr/ipmi-sdr-cache-read.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-read.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo `test -f 'sdr/ipmi-sdr-cache-read.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-read.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-read.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-cache-read.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-cache-read.c' object='sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-cache-read.lo `test -f 'sdr/ipmi-sdr-cache-read.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-cache-read.c sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo: sdr/ipmi-sdr-oem-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo `test -f 'sdr/ipmi-sdr-oem-intel-node-manager.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-oem-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-oem-intel-node-manager.c' object='sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-oem-intel-node-manager.lo `test -f 'sdr/ipmi-sdr-oem-intel-node-manager.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-oem-intel-node-manager.c sdr/libfreeipmi_la-ipmi-sdr-parse.lo: sdr/ipmi-sdr-parse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-parse.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-parse.lo `test -f 'sdr/ipmi-sdr-parse.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-parse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-parse.c' object='sdr/libfreeipmi_la-ipmi-sdr-parse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-parse.lo `test -f 'sdr/ipmi-sdr-parse.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-parse.c sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo: sdr/ipmi-sdr-parse-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse-util.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo `test -f 'sdr/ipmi-sdr-parse-util.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-parse-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse-util.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-parse-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-parse-util.c' object='sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-parse-util.lo `test -f 'sdr/ipmi-sdr-parse-util.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-parse-util.c sdr/libfreeipmi_la-ipmi-sdr-stats.lo: sdr/ipmi-sdr-stats.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-stats.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-stats.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-stats.lo `test -f 'sdr/ipmi-sdr-stats.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-stats.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-stats.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-stats.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-stats.c' object='sdr/libfreeipmi_la-ipmi-sdr-stats.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-stats.lo `test -f 'sdr/ipmi-sdr-stats.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-stats.c sdr/libfreeipmi_la-ipmi-sdr-util.lo: sdr/ipmi-sdr-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sdr/libfreeipmi_la-ipmi-sdr-util.lo -MD -MP -MF sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-util.Tpo -c -o sdr/libfreeipmi_la-ipmi-sdr-util.lo `test -f 'sdr/ipmi-sdr-util.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-util.Tpo sdr/$(DEPDIR)/libfreeipmi_la-ipmi-sdr-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sdr/ipmi-sdr-util.c' object='sdr/libfreeipmi_la-ipmi-sdr-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sdr/libfreeipmi_la-ipmi-sdr-util.lo `test -f 'sdr/ipmi-sdr-util.c' || echo '$(srcdir)/'`sdr/ipmi-sdr-util.c sel/libfreeipmi_la-ipmi-sel.lo: sel/ipmi-sel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel.Tpo -c -o sel/libfreeipmi_la-ipmi-sel.lo `test -f 'sel/ipmi-sel.c' || echo '$(srcdir)/'`sel/ipmi-sel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel.c' object='sel/libfreeipmi_la-ipmi-sel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel.lo `test -f 'sel/ipmi-sel.c' || echo '$(srcdir)/'`sel/ipmi-sel.c sel/libfreeipmi_la-ipmi-sel-common.lo: sel/ipmi-sel-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-common.lo `test -f 'sel/ipmi-sel-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-common.c' object='sel/libfreeipmi_la-ipmi-sel-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-common.lo `test -f 'sel/ipmi-sel-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-common.c sel/libfreeipmi_la-ipmi-sel-string.lo: sel/ipmi-sel-string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string.lo `test -f 'sel/ipmi-sel-string.c' || echo '$(srcdir)/'`sel/ipmi-sel-string.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string.c' object='sel/libfreeipmi_la-ipmi-sel-string.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string.lo `test -f 'sel/ipmi-sel-string.c' || echo '$(srcdir)/'`sel/ipmi-sel-string.c sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo: sel/ipmi-sel-string-dell-poweredge.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-dell-poweredge.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo `test -f 'sel/ipmi-sel-string-dell-poweredge.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-dell-poweredge.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-dell-poweredge.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-dell-poweredge.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-dell-poweredge.c' object='sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-dell-poweredge.lo `test -f 'sel/ipmi-sel-string-dell-poweredge.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-dell-poweredge.c sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo: sel/ipmi-sel-string-fujitsu-irmc-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo `test -f 'sel/ipmi-sel-string-fujitsu-irmc-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-fujitsu-irmc-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-fujitsu-irmc-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-fujitsu-irmc-common.lo `test -f 'sel/ipmi-sel-string-fujitsu-irmc-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-fujitsu-irmc-common.c sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo: sel/ipmi-sel-string-gigabyte-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo `test -f 'sel/ipmi-sel-string-gigabyte-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-gigabyte-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-common.lo `test -f 'sel/ipmi-sel-string-gigabyte-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-common.c sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo: sel/ipmi-sel-string-gigabyte-md90fs0zb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo `test -f 'sel/ipmi-sel-string-gigabyte-md90fs0zb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-md90fs0zb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-gigabyte-md90fs0zb.c' object='sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-md90fs0zb.lo `test -f 'sel/ipmi-sel-string-gigabyte-md90fs0zb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-md90fs0zb.c sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo: sel/ipmi-sel-string-gigabyte-mg20op0zb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo `test -f 'sel/ipmi-sel-string-gigabyte-mg20op0zb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-mg20op0zb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-gigabyte-mg20op0zb.c' object='sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-gigabyte-mg20op0zb.lo `test -f 'sel/ipmi-sel-string-gigabyte-mg20op0zb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-gigabyte-mg20op0zb.c sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo: sel/ipmi-sel-string-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-node-manager.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo `test -f 'sel/ipmi-sel-string-intel-node-manager.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-node-manager.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-node-manager.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-node-manager.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-node-manager.lo `test -f 'sel/ipmi-sel-string-intel-node-manager.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-node-manager.c sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo: sel/ipmi-sel-string-intel-s5500wb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo `test -f 'sel/ipmi-sel-string-intel-s5500wb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s5500wb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s5500wb.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s5500wb.lo `test -f 'sel/ipmi-sel-string-intel-s5500wb.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s5500wb.c sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo: sel/ipmi-sel-string-intel-quanta-qssc-s4r.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo `test -f 'sel/ipmi-sel-string-intel-quanta-qssc-s4r.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-quanta-qssc-s4r.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-quanta-qssc-s4r.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-quanta-qssc-s4r.lo `test -f 'sel/ipmi-sel-string-intel-quanta-qssc-s4r.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-quanta-qssc-s4r.c sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo: sel/ipmi-sel-string-intel-s2600jf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo `test -f 'sel/ipmi-sel-string-intel-s2600jf.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600jf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s2600jf.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600jf.lo `test -f 'sel/ipmi-sel-string-intel-s2600jf.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600jf.c sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo: sel/ipmi-sel-string-intel-s2600wp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo `test -f 'sel/ipmi-sel-string-intel-s2600wp.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600wp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s2600wp.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wp.lo `test -f 'sel/ipmi-sel-string-intel-s2600wp.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600wp.c sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo: sel/ipmi-sel-string-intel-windmill.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-windmill.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo `test -f 'sel/ipmi-sel-string-intel-windmill.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-windmill.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-windmill.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-windmill.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-windmill.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-windmill.lo `test -f 'sel/ipmi-sel-string-intel-windmill.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-windmill.c sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo: sel/ipmi-sel-string-intel-e52600v3-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo `test -f 'sel/ipmi-sel-string-intel-e52600v3-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-e52600v3-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-e52600v3-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-e52600v3-common.lo `test -f 'sel/ipmi-sel-string-intel-e52600v3-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-e52600v3-common.c sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo: sel/ipmi-sel-string-intel-s2600kp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo `test -f 'sel/ipmi-sel-string-intel-s2600kp.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600kp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s2600kp.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600kp.lo `test -f 'sel/ipmi-sel-string-intel-s2600kp.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600kp.c sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo: sel/ipmi-sel-string-intel-s2600gz.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo `test -f 'sel/ipmi-sel-string-intel-s2600gz.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600gz.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s2600gz.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600gz.lo `test -f 'sel/ipmi-sel-string-intel-s2600gz.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600gz.c sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo: sel/ipmi-sel-string-intel-s2600wt-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo `test -f 'sel/ipmi-sel-string-intel-s2600wt-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600wt-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-intel-s2600wt-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-intel-s2600wt-common.lo `test -f 'sel/ipmi-sel-string-intel-s2600wt-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-intel-s2600wt-common.c sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo: sel/ipmi-sel-string-inventec-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo `test -f 'sel/ipmi-sel-string-inventec-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-inventec-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-common.lo `test -f 'sel/ipmi-sel-string-inventec-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-common.c sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo: sel/ipmi-sel-string-inventec-5441.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5441.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo `test -f 'sel/ipmi-sel-string-inventec-5441.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-5441.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5441.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5441.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-inventec-5441.c' object='sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-5441.lo `test -f 'sel/ipmi-sel-string-inventec-5441.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-5441.c sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo: sel/ipmi-sel-string-inventec-5442.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5442.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo `test -f 'sel/ipmi-sel-string-inventec-5442.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-5442.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5442.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-inventec-5442.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-inventec-5442.c' object='sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-inventec-5442.lo `test -f 'sel/ipmi-sel-string-inventec-5442.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-inventec-5442.c sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo: sel/ipmi-sel-string-linux-kernel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-linux-kernel.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo `test -f 'sel/ipmi-sel-string-linux-kernel.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-linux-kernel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-linux-kernel.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-linux-kernel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-linux-kernel.c' object='sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-linux-kernel.lo `test -f 'sel/ipmi-sel-string-linux-kernel.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-linux-kernel.c sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo: sel/ipmi-sel-string-quanta-s99q.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-quanta-s99q.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo `test -f 'sel/ipmi-sel-string-quanta-s99q.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-quanta-s99q.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-quanta-s99q.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-quanta-s99q.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-quanta-s99q.c' object='sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-quanta-s99q.lo `test -f 'sel/ipmi-sel-string-quanta-s99q.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-quanta-s99q.c sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo: sel/ipmi-sel-string-sun-x4140.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-sun-x4140.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo `test -f 'sel/ipmi-sel-string-sun-x4140.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-sun-x4140.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-sun-x4140.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-sun-x4140.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-sun-x4140.c' object='sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-sun-x4140.lo `test -f 'sel/ipmi-sel-string-sun-x4140.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-sun-x4140.c sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo: sel/ipmi-sel-string-supermicro-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo `test -f 'sel/ipmi-sel-string-supermicro-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-supermicro-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-common.lo `test -f 'sel/ipmi-sel-string-supermicro-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-common.c sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo: sel/ipmi-sel-string-supermicro-overheat-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo `test -f 'sel/ipmi-sel-string-supermicro-overheat-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-overheat-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-supermicro-overheat-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-overheat-common.lo `test -f 'sel/ipmi-sel-string-supermicro-overheat-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-overheat-common.c sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo: sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo `test -f 'sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c' object='sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-magnum-technologies-x8dtl.lo `test -f 'sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo: sel/ipmi-sel-string-supermicro-peppercon-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo `test -f 'sel/ipmi-sel-string-supermicro-peppercon-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-peppercon-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-supermicro-peppercon-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-peppercon-common.lo `test -f 'sel/ipmi-sel-string-supermicro-peppercon-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-peppercon-common.c sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo: sel/ipmi-sel-string-supermicro-x10dimm-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo `test -f 'sel/ipmi-sel-string-supermicro-x10dimm-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-x10dimm-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-supermicro-x10dimm-common.c' object='sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-supermicro-x10dimm-common.lo `test -f 'sel/ipmi-sel-string-supermicro-x10dimm-common.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-supermicro-x10dimm-common.c sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo: sel/ipmi-sel-string-wistron-c6220.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-wistron-c6220.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo `test -f 'sel/ipmi-sel-string-wistron-c6220.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-wistron-c6220.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-wistron-c6220.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-string-wistron-c6220.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-string-wistron-c6220.c' object='sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-string-wistron-c6220.lo `test -f 'sel/ipmi-sel-string-wistron-c6220.c' || echo '$(srcdir)/'`sel/ipmi-sel-string-wistron-c6220.c sel/libfreeipmi_la-ipmi-sel-util.lo: sel/ipmi-sel-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sel/libfreeipmi_la-ipmi-sel-util.lo -MD -MP -MF sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-util.Tpo -c -o sel/libfreeipmi_la-ipmi-sel-util.lo `test -f 'sel/ipmi-sel-util.c' || echo '$(srcdir)/'`sel/ipmi-sel-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-util.Tpo sel/$(DEPDIR)/libfreeipmi_la-ipmi-sel-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sel/ipmi-sel-util.c' object='sel/libfreeipmi_la-ipmi-sel-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sel/libfreeipmi_la-ipmi-sel-util.lo `test -f 'sel/ipmi-sel-util.c' || echo '$(srcdir)/'`sel/ipmi-sel-util.c sensor-read/libfreeipmi_la-ipmi-sensor-read.lo: sensor-read/ipmi-sensor-read.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sensor-read/libfreeipmi_la-ipmi-sensor-read.lo -MD -MP -MF sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read.Tpo -c -o sensor-read/libfreeipmi_la-ipmi-sensor-read.lo `test -f 'sensor-read/ipmi-sensor-read.c' || echo '$(srcdir)/'`sensor-read/ipmi-sensor-read.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read.Tpo sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sensor-read/ipmi-sensor-read.c' object='sensor-read/libfreeipmi_la-ipmi-sensor-read.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sensor-read/libfreeipmi_la-ipmi-sensor-read.lo `test -f 'sensor-read/ipmi-sensor-read.c' || echo '$(srcdir)/'`sensor-read/ipmi-sensor-read.c sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo: sensor-read/ipmi-sensor-read-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo -MD -MP -MF sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read-util.Tpo -c -o sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo `test -f 'sensor-read/ipmi-sensor-read-util.c' || echo '$(srcdir)/'`sensor-read/ipmi-sensor-read-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read-util.Tpo sensor-read/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-read-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='sensor-read/ipmi-sensor-read-util.c' object='sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o sensor-read/libfreeipmi_la-ipmi-sensor-read-util.lo `test -f 'sensor-read/ipmi-sensor-read-util.c' || echo '$(srcdir)/'`sensor-read/ipmi-sensor-read-util.c spec/libfreeipmi_la-ipmi-device-types-spec.lo: spec/ipmi-device-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-device-types-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-device-types-spec.lo `test -f 'spec/ipmi-device-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-device-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-device-types-spec.c' object='spec/libfreeipmi_la-ipmi-device-types-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-device-types-spec.lo `test -f 'spec/ipmi-device-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-device-types-spec.c spec/libfreeipmi_la-ipmi-entity-ids-spec.lo: spec/ipmi-entity-ids-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-entity-ids-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-entity-ids-spec.lo `test -f 'spec/ipmi-entity-ids-spec.c' || echo '$(srcdir)/'`spec/ipmi-entity-ids-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-entity-ids-spec.c' object='spec/libfreeipmi_la-ipmi-entity-ids-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-entity-ids-spec.lo `test -f 'spec/ipmi-entity-ids-spec.c' || echo '$(srcdir)/'`spec/ipmi-entity-ids-spec.c spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo: spec/ipmi-fru-chassis-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-chassis-types-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo `test -f 'spec/ipmi-fru-chassis-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-fru-chassis-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-chassis-types-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-chassis-types-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-fru-chassis-types-spec.c' object='spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-fru-chassis-types-spec.lo `test -f 'spec/ipmi-fru-chassis-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-fru-chassis-types-spec.c spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo: spec/ipmi-fru-language-codes-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-language-codes-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo `test -f 'spec/ipmi-fru-language-codes-spec.c' || echo '$(srcdir)/'`spec/ipmi-fru-language-codes-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-language-codes-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-fru-language-codes-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-fru-language-codes-spec.c' object='spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-fru-language-codes-spec.lo `test -f 'spec/ipmi-fru-language-codes-spec.c' || echo '$(srcdir)/'`spec/ipmi-fru-language-codes-spec.c spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo: spec/ipmi-iana-enterprise-numbers-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo `test -f 'spec/ipmi-iana-enterprise-numbers-spec.c' || echo '$(srcdir)/'`spec/ipmi-iana-enterprise-numbers-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-iana-enterprise-numbers-spec.c' object='spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-iana-enterprise-numbers-spec.lo `test -f 'spec/ipmi-iana-enterprise-numbers-spec.c' || echo '$(srcdir)/'`spec/ipmi-iana-enterprise-numbers-spec.c spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo: spec/ipmi-jedec-manufacturer-identification-code-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo `test -f 'spec/ipmi-jedec-manufacturer-identification-code-spec.c' || echo '$(srcdir)/'`spec/ipmi-jedec-manufacturer-identification-code-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-jedec-manufacturer-identification-code-spec.c' object='spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-spec.lo `test -f 'spec/ipmi-jedec-manufacturer-identification-code-spec.c' || echo '$(srcdir)/'`spec/ipmi-jedec-manufacturer-identification-code-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo: spec/ipmi-sensor-and-event-code-tables-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo: spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-dell-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo: spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo: spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-hp-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo: spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-intel-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo: spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-and-event-code-tables-oem-wistron-spec.lo `test -f 'spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c spec/libfreeipmi_la-ipmi-sensor-types-spec.lo: spec/ipmi-sensor-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-types-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-types-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-types-spec.lo `test -f 'spec/ipmi-sensor-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-types-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-types-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-types-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-types-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-types-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-types-spec.lo `test -f 'spec/ipmi-sensor-types-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-types-spec.c spec/libfreeipmi_la-ipmi-sensor-units-spec.lo: spec/ipmi-sensor-units-spec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT spec/libfreeipmi_la-ipmi-sensor-units-spec.lo -MD -MP -MF spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-units-spec.Tpo -c -o spec/libfreeipmi_la-ipmi-sensor-units-spec.lo `test -f 'spec/ipmi-sensor-units-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-units-spec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-units-spec.Tpo spec/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-units-spec.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='spec/ipmi-sensor-units-spec.c' object='spec/libfreeipmi_la-ipmi-sensor-units-spec.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o spec/libfreeipmi_la-ipmi-sensor-units-spec.lo `test -f 'spec/ipmi-sensor-units-spec.c' || echo '$(srcdir)/'`spec/ipmi-sensor-units-spec.c util/libfreeipmi_la-ipmi-channel-util.lo: util/ipmi-channel-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-channel-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-channel-util.Tpo -c -o util/libfreeipmi_la-ipmi-channel-util.lo `test -f 'util/ipmi-channel-util.c' || echo '$(srcdir)/'`util/ipmi-channel-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-channel-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-channel-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-channel-util.c' object='util/libfreeipmi_la-ipmi-channel-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-channel-util.lo `test -f 'util/ipmi-channel-util.c' || echo '$(srcdir)/'`util/ipmi-channel-util.c util/libfreeipmi_la-ipmi-cipher-suite-util.lo: util/ipmi-cipher-suite-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-cipher-suite-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-util.Tpo -c -o util/libfreeipmi_la-ipmi-cipher-suite-util.lo `test -f 'util/ipmi-cipher-suite-util.c' || echo '$(srcdir)/'`util/ipmi-cipher-suite-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-cipher-suite-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-cipher-suite-util.c' object='util/libfreeipmi_la-ipmi-cipher-suite-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-cipher-suite-util.lo `test -f 'util/ipmi-cipher-suite-util.c' || echo '$(srcdir)/'`util/ipmi-cipher-suite-util.c util/libfreeipmi_la-ipmi-dcmi-util.lo: util/ipmi-dcmi-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-dcmi-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-util.Tpo -c -o util/libfreeipmi_la-ipmi-dcmi-util.lo `test -f 'util/ipmi-dcmi-util.c' || echo '$(srcdir)/'`util/ipmi-dcmi-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-dcmi-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-dcmi-util.c' object='util/libfreeipmi_la-ipmi-dcmi-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-dcmi-util.lo `test -f 'util/ipmi-dcmi-util.c' || echo '$(srcdir)/'`util/ipmi-dcmi-util.c util/libfreeipmi_la-ipmi-device-types-util.lo: util/ipmi-device-types-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-device-types-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-util.Tpo -c -o util/libfreeipmi_la-ipmi-device-types-util.lo `test -f 'util/ipmi-device-types-util.c' || echo '$(srcdir)/'`util/ipmi-device-types-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-device-types-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-device-types-util.c' object='util/libfreeipmi_la-ipmi-device-types-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-device-types-util.lo `test -f 'util/ipmi-device-types-util.c' || echo '$(srcdir)/'`util/ipmi-device-types-util.c util/libfreeipmi_la-ipmi-entity-ids-util.lo: util/ipmi-entity-ids-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-entity-ids-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-util.Tpo -c -o util/libfreeipmi_la-ipmi-entity-ids-util.lo `test -f 'util/ipmi-entity-ids-util.c' || echo '$(srcdir)/'`util/ipmi-entity-ids-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-entity-ids-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-entity-ids-util.c' object='util/libfreeipmi_la-ipmi-entity-ids-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-entity-ids-util.lo `test -f 'util/ipmi-entity-ids-util.c' || echo '$(srcdir)/'`util/ipmi-entity-ids-util.c util/libfreeipmi_la-ipmi-error-dcmi-util.lo: util/ipmi-error-dcmi-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-error-dcmi-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-error-dcmi-util.Tpo -c -o util/libfreeipmi_la-ipmi-error-dcmi-util.lo `test -f 'util/ipmi-error-dcmi-util.c' || echo '$(srcdir)/'`util/ipmi-error-dcmi-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-error-dcmi-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-error-dcmi-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-error-dcmi-util.c' object='util/libfreeipmi_la-ipmi-error-dcmi-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-error-dcmi-util.lo `test -f 'util/ipmi-error-dcmi-util.c' || echo '$(srcdir)/'`util/ipmi-error-dcmi-util.c util/libfreeipmi_la-ipmi-error-util.lo: util/ipmi-error-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-error-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-error-util.Tpo -c -o util/libfreeipmi_la-ipmi-error-util.lo `test -f 'util/ipmi-error-util.c' || echo '$(srcdir)/'`util/ipmi-error-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-error-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-error-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-error-util.c' object='util/libfreeipmi_la-ipmi-error-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-error-util.lo `test -f 'util/ipmi-error-util.c' || echo '$(srcdir)/'`util/ipmi-error-util.c util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo: util/ipmi-iana-enterprise-numbers-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.Tpo -c -o util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo `test -f 'util/ipmi-iana-enterprise-numbers-util.c' || echo '$(srcdir)/'`util/ipmi-iana-enterprise-numbers-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-iana-enterprise-numbers-util.c' object='util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-iana-enterprise-numbers-util.lo `test -f 'util/ipmi-iana-enterprise-numbers-util.c' || echo '$(srcdir)/'`util/ipmi-iana-enterprise-numbers-util.c util/libfreeipmi_la-ipmi-ipmb-util.lo: util/ipmi-ipmb-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-ipmb-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-util.Tpo -c -o util/libfreeipmi_la-ipmi-ipmb-util.lo `test -f 'util/ipmi-ipmb-util.c' || echo '$(srcdir)/'`util/ipmi-ipmb-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-ipmb-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-ipmb-util.c' object='util/libfreeipmi_la-ipmi-ipmb-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-ipmb-util.lo `test -f 'util/ipmi-ipmb-util.c' || echo '$(srcdir)/'`util/ipmi-ipmb-util.c util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo: util/ipmi-jedec-manufacturer-identification-code-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.Tpo -c -o util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo `test -f 'util/ipmi-jedec-manufacturer-identification-code-util.c' || echo '$(srcdir)/'`util/ipmi-jedec-manufacturer-identification-code-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-jedec-manufacturer-identification-code-util.c' object='util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-jedec-manufacturer-identification-code-util.lo `test -f 'util/ipmi-jedec-manufacturer-identification-code-util.c' || echo '$(srcdir)/'`util/ipmi-jedec-manufacturer-identification-code-util.c util/libfreeipmi_la-ipmi-lan-util.lo: util/ipmi-lan-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-lan-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-lan-util.Tpo -c -o util/libfreeipmi_la-ipmi-lan-util.lo `test -f 'util/ipmi-lan-util.c' || echo '$(srcdir)/'`util/ipmi-lan-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-lan-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-lan-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-lan-util.c' object='util/libfreeipmi_la-ipmi-lan-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-lan-util.lo `test -f 'util/ipmi-lan-util.c' || echo '$(srcdir)/'`util/ipmi-lan-util.c util/libfreeipmi_la-ipmi-outofband-util.lo: util/ipmi-outofband-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-outofband-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-outofband-util.Tpo -c -o util/libfreeipmi_la-ipmi-outofband-util.lo `test -f 'util/ipmi-outofband-util.c' || echo '$(srcdir)/'`util/ipmi-outofband-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-outofband-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-outofband-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-outofband-util.c' object='util/libfreeipmi_la-ipmi-outofband-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-outofband-util.lo `test -f 'util/ipmi-outofband-util.c' || echo '$(srcdir)/'`util/ipmi-outofband-util.c util/libfreeipmi_la-ipmi-rmcpplus-util.lo: util/ipmi-rmcpplus-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-rmcpplus-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-util.Tpo -c -o util/libfreeipmi_la-ipmi-rmcpplus-util.lo `test -f 'util/ipmi-rmcpplus-util.c' || echo '$(srcdir)/'`util/ipmi-rmcpplus-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-rmcpplus-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-rmcpplus-util.c' object='util/libfreeipmi_la-ipmi-rmcpplus-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-rmcpplus-util.lo `test -f 'util/ipmi-rmcpplus-util.c' || echo '$(srcdir)/'`util/ipmi-rmcpplus-util.c util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo: util/ipmi-sensor-and-event-code-tables-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.Tpo -c -o util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo `test -f 'util/ipmi-sensor-and-event-code-tables-util.c' || echo '$(srcdir)/'`util/ipmi-sensor-and-event-code-tables-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-sensor-and-event-code-tables-util.c' object='util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-sensor-and-event-code-tables-util.lo `test -f 'util/ipmi-sensor-and-event-code-tables-util.c' || echo '$(srcdir)/'`util/ipmi-sensor-and-event-code-tables-util.c util/libfreeipmi_la-ipmi-sensor-util.lo: util/ipmi-sensor-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-sensor-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-util.Tpo -c -o util/libfreeipmi_la-ipmi-sensor-util.lo `test -f 'util/ipmi-sensor-util.c' || echo '$(srcdir)/'`util/ipmi-sensor-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-sensor-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-sensor-util.c' object='util/libfreeipmi_la-ipmi-sensor-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-sensor-util.lo `test -f 'util/ipmi-sensor-util.c' || echo '$(srcdir)/'`util/ipmi-sensor-util.c util/libfreeipmi_la-ipmi-timestamp-util.lo: util/ipmi-timestamp-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-timestamp-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-timestamp-util.Tpo -c -o util/libfreeipmi_la-ipmi-timestamp-util.lo `test -f 'util/ipmi-timestamp-util.c' || echo '$(srcdir)/'`util/ipmi-timestamp-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-timestamp-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-timestamp-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-timestamp-util.c' object='util/libfreeipmi_la-ipmi-timestamp-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-timestamp-util.lo `test -f 'util/ipmi-timestamp-util.c' || echo '$(srcdir)/'`util/ipmi-timestamp-util.c util/libfreeipmi_la-ipmi-util.lo: util/ipmi-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-ipmi-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-ipmi-util.Tpo -c -o util/libfreeipmi_la-ipmi-util.lo `test -f 'util/ipmi-util.c' || echo '$(srcdir)/'`util/ipmi-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-ipmi-util.Tpo util/$(DEPDIR)/libfreeipmi_la-ipmi-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/ipmi-util.c' object='util/libfreeipmi_la-ipmi-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-ipmi-util.lo `test -f 'util/ipmi-util.c' || echo '$(srcdir)/'`util/ipmi-util.c util/libfreeipmi_la-rmcp-util.lo: util/rmcp-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT util/libfreeipmi_la-rmcp-util.lo -MD -MP -MF util/$(DEPDIR)/libfreeipmi_la-rmcp-util.Tpo -c -o util/libfreeipmi_la-rmcp-util.lo `test -f 'util/rmcp-util.c' || echo '$(srcdir)/'`util/rmcp-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) util/$(DEPDIR)/libfreeipmi_la-rmcp-util.Tpo util/$(DEPDIR)/libfreeipmi_la-rmcp-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='util/rmcp-util.c' object='util/libfreeipmi_la-rmcp-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libfreeipmi_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o util/libfreeipmi_la-rmcp-util.lo `test -f 'util/rmcp-util.c' || echo '$(srcdir)/'`util/rmcp-util.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs -rm -rf api/.libs api/_libs -rm -rf cmds/.libs cmds/_libs -rm -rf debug/.libs debug/_libs -rm -rf driver/.libs driver/_libs -rm -rf fiid/.libs fiid/_libs -rm -rf fru/.libs fru/_libs -rm -rf interface/.libs interface/_libs -rm -rf interpret/.libs interpret/_libs -rm -rf libcommon/.libs libcommon/_libs -rm -rf locate/.libs locate/_libs -rm -rf payload/.libs payload/_libs -rm -rf record-format/.libs record-format/_libs -rm -rf sdr/.libs sdr/_libs -rm -rf sel/.libs sel/_libs -rm -rf sensor-read/.libs sensor-read/_libs -rm -rf spec/.libs spec/_libs -rm -rf util/.libs util/_libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile $(LTLIBRARIES) $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -rm -f api/$(DEPDIR)/$(am__dirstamp) -rm -f api/$(am__dirstamp) -rm -f cmds/$(DEPDIR)/$(am__dirstamp) -rm -f cmds/$(am__dirstamp) -rm -f debug/$(DEPDIR)/$(am__dirstamp) -rm -f debug/$(am__dirstamp) -rm -f driver/$(DEPDIR)/$(am__dirstamp) -rm -f driver/$(am__dirstamp) -rm -f fiid/$(DEPDIR)/$(am__dirstamp) -rm -f fiid/$(am__dirstamp) -rm -f fru/$(DEPDIR)/$(am__dirstamp) -rm -f fru/$(am__dirstamp) -rm -f interface/$(DEPDIR)/$(am__dirstamp) -rm -f interface/$(am__dirstamp) -rm -f interpret/$(DEPDIR)/$(am__dirstamp) -rm -f interpret/$(am__dirstamp) -rm -f libcommon/$(DEPDIR)/$(am__dirstamp) -rm -f libcommon/$(am__dirstamp) -rm -f locate/$(DEPDIR)/$(am__dirstamp) -rm -f locate/$(am__dirstamp) -rm -f payload/$(DEPDIR)/$(am__dirstamp) -rm -f payload/$(am__dirstamp) -rm -f record-format/$(DEPDIR)/$(am__dirstamp) -rm -f record-format/$(am__dirstamp) -rm -f sdr/$(DEPDIR)/$(am__dirstamp) -rm -f sdr/$(am__dirstamp) -rm -f sel/$(DEPDIR)/$(am__dirstamp) -rm -f sel/$(am__dirstamp) -rm -f sensor-read/$(DEPDIR)/$(am__dirstamp) -rm -f sensor-read/$(am__dirstamp) -rm -f spec/$(DEPDIR)/$(am__dirstamp) -rm -f spec/$(am__dirstamp) -rm -f util/$(DEPDIR)/$(am__dirstamp) -rm -f util/$(am__dirstamp) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-recursive -rm -rf api/$(DEPDIR) cmds/$(DEPDIR) debug/$(DEPDIR) driver/$(DEPDIR) fiid/$(DEPDIR) fru/$(DEPDIR) interface/$(DEPDIR) interpret/$(DEPDIR) libcommon/$(DEPDIR) locate/$(DEPDIR) payload/$(DEPDIR) record-format/$(DEPDIR) sdr/$(DEPDIR) sel/$(DEPDIR) sensor-read/$(DEPDIR) spec/$(DEPDIR) util/$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-data-local install-pkgconfigDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -rf api/$(DEPDIR) cmds/$(DEPDIR) debug/$(DEPDIR) driver/$(DEPDIR) fiid/$(DEPDIR) fru/$(DEPDIR) interface/$(DEPDIR) interpret/$(DEPDIR) libcommon/$(DEPDIR) locate/$(DEPDIR) payload/$(DEPDIR) record-format/$(DEPDIR) sdr/$(DEPDIR) sel/$(DEPDIR) sensor-read/$(DEPDIR) spec/$(DEPDIR) util/$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-local \ uninstall-pkgconfigDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libLTLIBRARIES \ clean-libtool cscopelist-am ctags ctags-am distclean \ distclean-compile distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-libLTLIBRARIES uninstall-local \ uninstall-pkgconfigDATA $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME) $(INSTALL) -m 644 $(srcdir)/ipckey $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey uninstall-local: $(RM) -f $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/libfreeipmi/Makefile.am0000644002055400205540000002206313527331636017611 0ustar00achuachu00000000000000SUBDIRS = include if WITH_PKG_CONFIG pkgconfig_DATA = libfreeipmi.pc endif if WITH_GNU_LD VERSION_SCRIPT = $(srcdir)/freeipmi.map VERSION_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) endif lib_LTLIBRARIES = libfreeipmi.la # achu # # IPMI_DEBUG_IPCKEY is so we can do inband development without the # real ipckey being installed. libfreeipmi_la_CPPFLAGS = \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi \ -DIPMI_IPCKEY=\"$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey\" \ -DIPMI_DEBUG_IPCKEY=\"$(top_builddir)/libfreeipmi/driver/ipmi-semaphores.h\" \ -D_GNU_SOURCE \ -D_REENTRANT libfreeipmi_la_LDFLAGS = \ -version-info @LIBFREEIPMI_VERSION_INFO@ $(VERSION_FLAGS) \ $(OTHER_FLAGS) \ $(PTHREAD_LIBS) \ @GCRYPT_LIBS@ \ -lm libfreeipmi_la_LIBADD = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la libfreeipmi_la_SOURCES = \ api/ipmi-api.c \ api/ipmi-api-defs.h \ api/ipmi-api-trace.h \ api/ipmi-api-util.c \ api/ipmi-api-util.h \ api/ipmi-chassis-cmds-api.c \ api/ipmi-dcmi-cmds-api.c \ api/ipmi-device-global-cmds-api.c \ api/ipmi-event-cmds-api.c \ api/ipmi-firmware-firewall-command-discovery-cmds-api.c \ api/ipmi-fru-inventory-device-cmds-api.c \ api/ipmi-inteldcmi-driver-api.c \ api/ipmi-inteldcmi-driver-api.h \ api/ipmi-kcs-driver-api.c \ api/ipmi-kcs-driver-api.h \ api/ipmi-lan-cmds-api.c \ api/ipmi-lan-interface-api.c \ api/ipmi-lan-interface-api.h \ api/ipmi-lan-session-common.c \ api/ipmi-lan-session-common.h \ api/ipmi-messaging-support-cmds-api.c \ api/ipmi-oem-intel-node-manager-cmds-api.c \ api/ipmi-openipmi-driver-api.c \ api/ipmi-openipmi-driver-api.h \ api/ipmi-pef-and-alerting-cmds-api.c \ api/ipmi-rmcpplus-support-and-payload-cmds-api.c \ api/ipmi-sel-cmds-api.c \ api/ipmi-sdr-repository-cmds-api.c \ api/ipmi-sensor-cmds-api.c \ api/ipmi-serial-modem-cmds-api.c \ api/ipmi-sol-cmds-api.c \ api/ipmi-ssif-driver-api.c \ api/ipmi-ssif-driver-api.h \ api/ipmi-sunbmc-driver-api.c \ api/ipmi-sunbmc-driver-api.h \ cmds/ipmi-bmc-watchdog-timer-cmds.c \ cmds/ipmi-chassis-cmds.c \ cmds/ipmi-dcmi-cmds.c \ cmds/ipmi-device-global-cmds.c \ cmds/ipmi-event-cmds.c \ cmds/ipmi-firmware-firewall-command-discovery-cmds.c \ cmds/ipmi-fru-inventory-device-cmds.c \ cmds/ipmi-lan-cmds.c \ cmds/ipmi-messaging-support-cmds.c \ cmds/ipmi-oem-intel-node-manager-cmds.c \ cmds/ipmi-pef-and-alerting-cmds.c \ cmds/ipmi-rmcpplus-support-and-payload-cmds.c \ cmds/ipmi-sdr-repository-cmds.c \ cmds/ipmi-sel-cmds.c \ cmds/ipmi-sensor-cmds.c \ cmds/ipmi-serial-modem-cmds.c \ cmds/ipmi-sol-cmds.c \ cmds/rmcp-cmds.c \ debug/ipmi-debug.c \ debug/ipmi-debug-common.c \ debug/ipmi-debug-common.h \ debug/ipmi-debug-inband.c \ debug/ipmi-debug-lan.c \ debug/ipmi-debug-rmcp.c \ debug/ipmi-debug-rmcpplus.c \ debug/ipmi-debug-sdr.c \ driver/freeipmi_bmc_intf.h \ driver/ipmi-driver-trace.h \ driver/ipmi-semaphores.c \ driver/ipmi-semaphores.h \ driver/ipmi-inteldcmi-driver.c \ driver/ipmi-kcs-driver.c \ driver/ipmi-openipmi-driver.c \ driver/ipmi-sunbmc-driver.c \ driver/ipmi-ssif-driver.c \ fiid/fiid.c \ fru/ipmi-fru.c \ fru/ipmi-fru-common.c \ fru/ipmi-fru-common.h \ fru/ipmi-fru-data.c \ fru/ipmi-fru-defs.h \ fru/ipmi-fru-trace.h \ fru/ipmi-fru-util.c \ fru/ipmi-fru-util.h \ interface/ipmi-ipmb-interface.c \ interface/ipmi-kcs-interface.c \ interface/ipmi-lan-interface.c \ interface/ipmi-network.c \ interface/ipmi-network.h \ interface/ipmi-rmcpplus-interface.c \ interface/rmcp-interface.c \ interpret/ipmi-interpret.c \ interpret/ipmi-interpret-config-common.c \ interpret/ipmi-interpret-config-common.h \ interpret/ipmi-interpret-config-sel.c \ interpret/ipmi-interpret-config-sel.h \ interpret/ipmi-interpret-config-sensor.c \ interpret/ipmi-interpret-config-sensor.h \ interpret/ipmi-interpret-defs.h \ interpret/ipmi-interpret-util.c \ interpret/ipmi-interpret-util.h \ interpret/ipmi-interpret-trace.h \ libcommon/ipmi-bit-ops.c \ libcommon/ipmi-bit-ops.h \ libcommon/ipmi-crypt.c \ libcommon/ipmi-crypt.h \ libcommon/ipmi-fiid-util.c \ libcommon/ipmi-fiid-util.h \ libcommon/ipmi-fill-util.h \ libcommon/ipmi-md2.c \ libcommon/ipmi-md2.h \ libcommon/ipmi-md5.c \ libcommon/ipmi-md5.h \ libcommon/ipmi-trace.h \ locate/ipmi-locate.c \ locate/ipmi-locate-acpi-spmi.c \ locate/ipmi-locate-defaults.c \ locate/ipmi-locate-defs.h \ locate/ipmi-locate-dmidecode.c \ locate/ipmi-locate-pci.c \ locate/ipmi-locate-smbios.c \ locate/ipmi-locate-trace.h \ locate/ipmi-locate-util.c \ locate/ipmi-locate-util.h \ payload/ipmi-sol-payload.c \ record-format/ipmi-cipher-suite-record-format.c \ record-format/ipmi-fru-dimmspd-record-format.c \ record-format/ipmi-fru-information-record-format.c \ record-format/ipmi-sdr-record-format.c \ record-format/ipmi-sdr-oem-intel-node-manager-record-format.c \ record-format/ipmi-sel-record-format.c \ sdr/ipmi-sdr.c \ sdr/ipmi-sdr-common.c \ sdr/ipmi-sdr-common.h \ sdr/ipmi-sdr-cache-create.c \ sdr/ipmi-sdr-defs.h \ sdr/ipmi-sdr-cache-delete.c \ sdr/ipmi-sdr-cache-read.c \ sdr/ipmi-sdr-oem-intel-node-manager.c \ sdr/ipmi-sdr-parse.c \ sdr/ipmi-sdr-parse-util.c \ sdr/ipmi-sdr-stats.c \ sdr/ipmi-sdr-trace.h \ sdr/ipmi-sdr-util.c \ sdr/ipmi-sdr-util.h \ sel/ipmi-sel.c \ sel/ipmi-sel-common.c \ sel/ipmi-sel-common.h \ sel/ipmi-sel-defs.h \ sel/ipmi-sel-string.c \ sel/ipmi-sel-string.h \ sel/ipmi-sel-string-dell-poweredge.c \ sel/ipmi-sel-string-fujitsu-irmc-common.c \ sel/ipmi-sel-string-gigabyte-common.c \ sel/ipmi-sel-string-gigabyte-common.h \ sel/ipmi-sel-string-gigabyte-md90fs0zb.c \ sel/ipmi-sel-string-gigabyte-mg20op0zb.c \ sel/ipmi-sel-string-intel-node-manager.c \ sel/ipmi-sel-string-intel-node-manager.h \ sel/ipmi-sel-string-intel-s5500wb.c \ sel/ipmi-sel-string-intel-quanta-qssc-s4r.c \ sel/ipmi-sel-string-intel-s2600jf.c \ sel/ipmi-sel-string-intel-s2600wp.c \ sel/ipmi-sel-string-intel-windmill.c \ sel/ipmi-sel-string-intel-e52600v3-common.c \ sel/ipmi-sel-string-intel-e52600v3-common.h \ sel/ipmi-sel-string-intel-s2600kp.c \ sel/ipmi-sel-string-intel-s2600gz.c \ sel/ipmi-sel-string-intel-s2600wt-common.c \ sel/ipmi-sel-string-inventec-common.c \ sel/ipmi-sel-string-inventec-common.h \ sel/ipmi-sel-string-inventec-5441.c \ sel/ipmi-sel-string-inventec-5442.c \ sel/ipmi-sel-string-linux-kernel.c \ sel/ipmi-sel-string-linux-kernel.h \ sel/ipmi-sel-string-quanta-s99q.c \ sel/ipmi-sel-string-sun-x4140.c \ sel/ipmi-sel-string-supermicro-common.c \ sel/ipmi-sel-string-supermicro-common.h \ sel/ipmi-sel-string-supermicro-overheat-common.c \ sel/ipmi-sel-string-supermicro-magnum-technologies-x8dtl.c \ sel/ipmi-sel-string-supermicro-peppercon-common.c \ sel/ipmi-sel-string-supermicro-x10dimm-common.c \ sel/ipmi-sel-string-wistron-c6220.c \ sel/ipmi-sel-trace.h \ sel/ipmi-sel-util.c \ sel/ipmi-sel-util.h \ sensor-read/ipmi-sensor-read.c \ sensor-read/ipmi-sensor-read-defs.h \ sensor-read/ipmi-sensor-read-trace.h \ sensor-read/ipmi-sensor-read-util.c \ sensor-read/ipmi-sensor-read-util.h \ spec/ipmi-device-types-spec.c \ spec/ipmi-entity-ids-spec.c \ spec/ipmi-fru-chassis-types-spec.c \ spec/ipmi-fru-language-codes-spec.c \ spec/ipmi-iana-enterprise-numbers-spec.c \ spec/ipmi-jedec-manufacturer-identification-code-spec.c \ spec/ipmi-sensor-and-event-code-tables-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-dell-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-fujitsu-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-hp-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-intel-spec.c \ spec/ipmi-sensor-and-event-code-tables-oem-wistron-spec.c \ spec/ipmi-sensor-types-spec.c \ spec/ipmi-sensor-units-spec.c \ util/ipmi-channel-util.c \ util/ipmi-cipher-suite-util.c \ util/ipmi-dcmi-util.c \ util/ipmi-device-types-util.c \ util/ipmi-entity-ids-util.c \ util/ipmi-error-dcmi-util.c \ util/ipmi-error-util.c \ util/ipmi-iana-enterprise-numbers-util.c \ util/ipmi-ipmb-util.c \ util/ipmi-jedec-manufacturer-identification-code-util.c \ util/ipmi-lan-util.c \ util/ipmi-outofband-util.c \ util/ipmi-rmcpplus-util.c \ util/ipmi-sensor-and-event-code-tables-util.c \ util/ipmi-sensor-util.c \ util/ipmi-timestamp-util.c \ util/ipmi-util.c \ util/rmcp-util.c $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: EXTRA_DIST = freeipmi.map ipckey install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME) $(INSTALL) -m 644 $(srcdir)/ipckey $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey uninstall-local: $(RM) -f $(DESTDIR)$(localstatedir)/lib/$(PACKAGE_NAME)/ipckey freeipmi-1.6.4/libfreeipmi/libfreeipmi.pc.in0000644002055400205540000000032313527331637020771 0ustar00achuachu00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ Name: libfreeipmi Description: FreeIPMI library Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lfreeipmi freeipmi-1.6.4/libfreeipmi/freeipmi.map0000644002055400205540000000016613527331636020054 0ustar00achuachu00000000000000{ global: ipmi*; fiid*; FIID*; fill*; tmpl*; assemble*; unassemble*; local: *; }; freeipmi-1.6.4/libfreeipmi/ipckey0000644002055400205540000000000013527331637016750 0ustar00achuachu00000000000000freeipmi-1.6.4/INSTALL0000644002055400205540000002243213527331634014315 0ustar00achuachu00000000000000Installation Instructions ************************* Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005 Free Software Foundation, Inc. This file is free documentation; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. Basic Installation ================== These are generic installation instructions. The `configure' shell script attempts to guess correct values for various system-dependent variables used during compilation. It uses those values to create a `Makefile' in each directory of the package. It may also create one or more `.h' files containing system-dependent definitions. Finally, it creates a shell script `config.status' that you can run in the future to recreate the current configuration, and a file `config.log' containing compiler output (useful mainly for debugging `configure'). It can also use an optional file (typically called `config.cache' and enabled with `--cache-file=config.cache' or simply `-C') that saves the results of its tests to speed up reconfiguring. (Caching is disabled by default to prevent problems with accidental use of stale cache files.) If you need to do unusual things to compile the package, please try to figure out how `configure' could check whether to do them, and mail diffs or instructions to the address given in the `README' so they can be considered for the next release. If you are using the cache, and at some point `config.cache' contains results you don't want to keep, you may remove or edit it. The file `configure.ac' (or `configure.in') is used to create `configure' by a program called `autoconf'. You only need `configure.ac' if you want to change it or regenerate `configure' using a newer version of `autoconf'. The simplest way to compile this package is: 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. If you're using `csh' on an old version of System V, you might need to type `sh ./configure' instead to prevent `csh' from trying to execute `configure' itself. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. 2. Type `make' to compile the package. 3. Optionally, type `make check' to run any self-tests that come with the package. 4. Type `make install' to install the programs and any data files and documentation. 5. You can remove the program binaries and object files from the source code directory by typing `make clean'. To also remove the files that `configure' created (so you can compile the package for a different kind of computer), type `make distclean'. There is also a `make maintainer-clean' target, but that is intended mainly for the package's developers. If you use it, you may have to get all sorts of other programs in order to regenerate files that came with the distribution. Compilers and Options ===================== Some systems require unusual options for compilation or linking that the `configure' script does not know about. Run `./configure --help' for details on some of the pertinent environment variables. You can give `configure' initial values for configuration parameters by setting variables in the command line or in the environment. Here is an example: ./configure CC=c89 CFLAGS=-O2 LIBS=-lposix *Note Defining Variables::, for more details. Compiling For Multiple Architectures ==================================== You can compile the package for more than one kind of computer at the same time, by placing the object files for each architecture in their own directory. To do this, you must use a version of `make' that supports the `VPATH' variable, such as GNU `make'. `cd' to the directory where you want the object files and executables to go and run the `configure' script. `configure' automatically checks for the source code in the directory that `configure' is in and in `..'. If you have to use a `make' that does not support the `VPATH' variable, you have to compile the package for one architecture at a time in the source code directory. After you have installed the package for one architecture, use `make distclean' before reconfiguring for another architecture. Installation Names ================== By default, `make install' installs the package's commands under `/usr/local/bin', include files under `/usr/local/include', etc. You can specify an installation prefix other than `/usr/local' by giving `configure' the option `--prefix=PREFIX'. You can specify separate installation prefixes for architecture-specific files and architecture-independent files. If you pass the option `--exec-prefix=PREFIX' to `configure', the package uses PREFIX as the prefix for installing programs and libraries. Documentation and other data files still use the regular prefix. In addition, if you use an unusual directory layout you can give options like `--bindir=DIR' to specify different values for particular kinds of files. Run `configure --help' for a list of the directories you can set and what kinds of files go in them. If the package supports it, you can cause programs to be installed with an extra prefix or suffix on their names by giving `configure' the option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'. Optional Features ================= Some packages pay attention to `--enable-FEATURE' options to `configure', where FEATURE indicates an optional part of the package. They may also pay attention to `--with-PACKAGE' options, where PACKAGE is something like `gnu-as' or `x' (for the X Window System). The `README' should mention any `--enable-' and `--with-' options that the package recognizes. For packages that use the X Window System, `configure' can usually find the X include and library files automatically, but if it doesn't, you can use the `configure' options `--x-includes=DIR' and `--x-libraries=DIR' to specify their locations. Specifying the System Type ========================== There may be some features `configure' cannot figure out automatically, but needs to determine by the type of machine the package will run on. Usually, assuming the package is built to be run on the _same_ architectures, `configure' can figure that out, but if it prints a message saying it cannot guess the machine type, give it the `--build=TYPE' option. TYPE can either be a short name for the system type, such as `sun4', or a canonical name which has the form: CPU-COMPANY-SYSTEM where SYSTEM can have one of these forms: OS KERNEL-OS See the file `config.sub' for the possible values of each field. If `config.sub' isn't included in this package, then this package doesn't need to know the machine type. If you are _building_ compiler tools for cross-compiling, you should use the option `--target=TYPE' to select the type of system they will produce code for. If you want to _use_ a cross compiler, that generates code for a platform different from the build platform, you should specify the "host" platform (i.e., that on which the generated programs will eventually be run) with `--host=TYPE'. Sharing Defaults ================ If you want to set default values for `configure' scripts to share, you can create a site shell script called `config.site' that gives default values for variables like `CC', `cache_file', and `prefix'. `configure' looks for `PREFIX/share/config.site' if it exists, then `PREFIX/etc/config.site' if it exists. Or, you can set the `CONFIG_SITE' environment variable to the location of the site script. A warning: not all `configure' scripts look for a site script. Defining Variables ================== Variables not defined in a site shell script can be set in the environment passed to `configure'. However, some packages may run configure again during the build, and the customized values of these variables may be lost. In order to avoid this problem, you should set them in the `configure' command line, using `VAR=value'. For example: ./configure CC=/usr/local2/bin/gcc causes the specified `gcc' to be used as the C compiler (unless it is overridden in the site shell script). Here is a another example: /bin/bash ./configure CONFIG_SHELL=/bin/bash Here the `CONFIG_SHELL=/bin/bash' operand causes subsequent configuration-related scripts to be executed by `/bin/bash'. `configure' Invocation ====================== `configure' recognizes the following options to control how it operates. `--help' `-h' Print a summary of the options to `configure', and exit. `--version' `-V' Print the version of Autoconf used to generate the `configure' script, and exit. `--cache-file=FILE' Enable the cache: use and save the results of the tests in FILE, traditionally `config.cache'. FILE defaults to `/dev/null' to disable caching. `--config-cache' `-C' Alias for `--cache-file=config.cache'. `--quiet' `--silent' `-q' Do not print messages saying which checks are being made. To suppress all normal output, redirect it to `/dev/null' (any error messages will still be shown). `--srcdir=DIR' Look for the package's source code in directory DIR. Usually `configure' can determine that directory automatically. `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. freeipmi-1.6.4/NEWS0000644002055400205540000033412213527342002013754 0ustar00achuachu00000000000000FreeIPMI 1.6.4 - 08/23/19 ------------------------- o In libfreeipmi, add additional workarounds for packets that are re-ordered during sensor bridging. o In libfreeipmi, add additional sensor / event interpretations. o In libfreeipmi, fix error return value on bridging requests. o Add workaround in ipmi-sel for QuantaPlex T42D-2U motherboard, which lists a SDR record that makes no sense. o Add workaround for Dell Poweredge FC830, which have an error when reading the last SDR record on a motherboard. o Support Supermicro X10 OEM dimm events. FreeIPMI 1.6.3 - 01/23/19 ------------------------- o In ipmi-locate, support parsing SPMI tables exported via sysfs. o Support Intel S2600GZ OEM sensor and SEL events. o Support Intel S2600WP OEM sensor and SEL events. o Support Gigabyte MG20-OP0-ZB OEM SEL events. o Fix DISCRETE_READING workaround in libipmimonitoring. o In libfreeipmi, add workaround for packets that are re-ordered during sensor bridging. o Minor bug fixes. o Various documentation updates/fixes. FreeIPMI 1.6.2 - 05/03/18 ------------------------- o Fix error in bridging where bridged requests were sent to the wrong LUN. o Fix command parsing bugs in legacy ipmi-config scripts (i.e. bmc-config, ipmi-pef-config, etc.) o Do not output full path of daemons in syslog, output only the daemon name (i.e. output "ipmidetected" instead of "/usr/sbin/ipmidetectd"). o Update channel range from 0-7 to 0-11, per errata IPMI update. FreeIPMI 1.6.1 - 02/02/18 ------------------------- o Add IPv6 hostname support to FreeIPMI, all of FreeIPMI can now take IPv6 addresses as inputs to "host" parameters, options, or inputs. o Support significant portions of IPMI IPv6 configuration in libfreeipmi. o Add --no-session option in ipmi-raw. o Add SDR cache options to ipmi-config. o Legacy -f short option for --flush-cache and -Q short option for quiet-cache. Backwards compatible for tools that supported it before. o In ipmi-oem, support Gigabyte get-bmc-services and set-bmc-services. o Various performance improvements: - Remove excessive calls to secure_memset to clear memory. - Remove excessive memsets and clears of data. - Remove unnecessary "double input checks". - Remove expensive input checks in libfreeipmi fiid library. Fallout from this may include FIID_ERR_FIELD_NOT_FOUND errors in different fiid functions. - Remove unnecessary input checks in libfreeipmi fiid library. - Add recent 'lookups' of fields in fiid library to internal cache. o Various minor fixes/improvements - Update libfreeipmi core API to use poll() instead of select(), to avoid issues with applications with a high number of threads. FreeIPMI 1.5.7 - 08/16/17 ------------------------- o In libipmimonitoring, fix several mem-leak corner cases. FreeIPMI 1.5.6 - 07/05/17 ------------------------- o In libfreeipmi locate (used by ipmi-locate), use DMI firmware in sysfs if it exists. o Minor mem-leak corner case fix in libfreeipmi. o Minor documentation fixes. o Minor error message clarifications. FreeIPMI 1.5.5 - 11/02/16 ------------------------- o Fix invalid flag clear in libipmiconsole that can lead to a potential double close on a file descriptor. o Support Supermicro H8SGL-F OEM sensors and events. FreeIPMI 1.5.4 - 09/30/16 ------------------------- o Various changes/fixes in libipmiconsole - If user retrieves file descriptor from ipmiconsole_ctx_fd, user is required to close it. ipmiconsole_ctx_destroy no longer closes it. This is to avoid a potential double close which can be a problem for multithreaded applications. This is a change in behavior, but we do not believe this will affect most applications since most users close the file descriptor under most scenarios anyways. - ipmiconsole_ctx_destroy() should now be called to free resources even if ipmiconsole_engine_teardown() has been called. This has been done to create consistent behavior in the API and avoid a former segfault possibility. This is a change in behavior, but we do not believe this will affect most applications since ipmiconsole_engine_teardown() is only called when an application is being shutdown. - The use of IPMICONSOLE_ENGINE_CLOSE_FD has been clarified in the header file. Some of the prior text was unclear. Behavior has not been changed. o In ipmi-oem, support Intel get-bmc-services and set-bmc-services commands. o In ipmi-oem, support Gigabyte get-nic-mode and set-nic-mode commands. o Support Gigabyte MD90-FS0-ZB OEM SEL events. FreeIPMI 1.5.3 - 08/01/16 ------------------------- o Update Fujitsu OEM extension product id support range. o In ipmiconsole, support --debugfile option for more difficult debugging scenarios. o In all sensor related tools, increase max number of record ids and sensor types that can be handled. o Fix several invalid completion code errors/values. FreeIPMI 1.5.2 - 05/24/16 ------------------------- o Update configuration file parsing code to handle values up to 1024 characters in length. o Set FD_CLOEXEC for ipmi driver device files opened within libfreeipmi. o Support --read-fru, --write-fru, and --device-id option in bmc-device. o Support --fru-file option in ipmi-fru. o Various library updates in libfreeipmi to handle new features. FreeIPMI 1.5.1 - 12/01/15 ------------------------- o Update Intel Node Manager support for 3.0 specification. - Update API and fiid templates in libfreeipmi. - Support new OEM SEL events - Update ipmi-oem commands. - Support new get/set-turbo-synchronization-ratio - Support new 'policypowerdomain' option in get-node-manager-capabilities and set-node-manager-policy. - Update output of get-node-manager-policy and get-node-manager-capabilities for changes. - get/set-node-manager-alert-thresholds converted to get/set-node-manager-policy-alert-thresholds. Legacy commands still supported. o Update libfreeipmi for IPMI 2.0 Errata 7. - Support/handle FRU Multirecord NVM Express type. o Support Get Device SDR Info, Get Device SDR, and Reserve Device SDR Repository commands in libfreeipmi. o Support ipmi-sel OEM interpretation of Linux kernel panics. o Re-organize OEM header files into per-vendor files. o In ipmi-oem, fix error in "DNS Register BMC" output in "get-dns-config" output in Inventec, Quanta, and Wistron vendor sections. o Support systemd through --with-systemdsystemunitdir configure option. o Minor corner case bug fixes. FreeIPMI 1.4.11 - 10/29/15 -------------------------- o Fix logic error with a few OEM SEL events for Intel E5 2600 V3 motherboard. o Fix various logic errors in ipmi-oem Intel Node Manager extensions. o Documentation updates. FreeIPMI 1.4.10 - 10/20/15 -------------------------- o In ipmi-oem, support Supermicro get-power-supply-status2. o In ipmi-locate, fix probing issue on arm32 & 64. o Handle several additional completion code error message in libfreeipmi. o Handle several error handling corner cases in ipmi-sensors. o Support Intel E5 2600 V3 motherboard OEM SEL events. o Fix several errors in ipmi-oem intelnm get-node-manager-statistics output. o Fix logic errors in ipmi-oem intelnm set-node-manager-policy. FreeIPMI 1.4.9 - 06/01/15 ------------------------- o Fix strtol parse corner cases in several commands. o Minor documentation fixes. FreeIPMI 1.4.8 - 01/07/15 ------------------------- o Fix segfault in crypt code with libgcrypt versions >= 1.6.0. o Fix --fanout command line parse bug. FreeIPMI 1.4.7 - 12/10/14 ------------------------- o Fix typo from FRU spec, language "Tegulu" is actually "Telugu". o Fix typo in SEL session output, "Invalid Username of Password" to "Invalid Username or Password". o Loop on select() call if interrupted by EINTR in openipmi, ssif, and sunbmc inband drivers. o Fix integer overflow bug in ipmi-config when configure vlan ID > 255. o Add workaround for ipmi-config issue on Supermicro X10DDW-i. o Fix error handling bug in bmc-info. FreeIPMI 1.4.6 - 10/29/14 ------------------------- o In ipmi-fru, support output of DDR4 SDRAM modules. o Fix EFI probing on non IA64 systems. o Fix corner case in ipmi-raw w/ standard input or --file and empty lines. o Fix parsing corner case in ipmi-chassis. o Support SSIF bridging. FreeIPMI 1.4.5 - 07/28/14 ------------------------- o Fix libipmiconsole calculation bug w/ SOL character send size. o Support Supermicro H8DGU and H8DG6 OEM sensors and events. o Minor documentation updates. FreeIPMI 1.4.4 - 06/27/14 ------------------------- o Support retrys of SSIF reads to handle SSIF NACKs. FreeIPMI 1.4.3 - 05/07/14 ------------------------- o Fix compile bug in 1.4.2 release. FreeIPMI 1.4.2 - 05/06/14 ------------------------- o In ipmi-oem, support Supermicro get-power-supply-status and get-pmbus-power-supply-status commands. o Support 'ipmiping' workaround in ipmipower. o Minor documentation updates. FreeIPMI 1.4.1 - 03/01/14 ------------------------- Tools - New Features -------------------- o Support new tool ipmi-config. Ipmi-config is a consolidated configuration tool implementing everything that was previously in bmc-config, ipmi-pef-config, ipmi-sensors-config, and ipmi-chassis-config. - The consolidated tool will allow users to checkout, commit, and diff sections/fields across the four former tools using only one tool. - The consolidated tool will also allow users to checkout, commit, and diff new sections/fields not yet covered in the four former tools. - Legacy scripts for bmc-config, ipmi-pef-config, ipmi-sensors-config, and ipmi-chassis-config will point to the new tool with all appropriate options to ensure full backwards compatability. - The ipmi-pef-config --info option has been made legacy. It is still supported but no longer advertised. o Support Intel Data Center Host Interface / Management Engine as optional driver type for in-band communication. - Typically these are loaded as /dev/dcmi and /dev/mei drivers. - This driver is identified as the "inteldcmi" type, as it is specific to Intel systems. o Support OEM extensions for Intel Windmill, Wiwynn Windmill, and Quanta Winterfell motherboards in ipmi-sel and ipmi-sensors. These motherboards are also know as motherboards for the Open Compute Project (OCP). o Support DCMI configuration in ipmi-config. o Update FreeIPMI for changes in IPMI 2.0 Errata 5. Include are: - New sensor events for Power Supply and OS Boot sensors. New events are supported in all areas, ipmi-sensors, ipmi-sel, libipmimonitoring, etc. - PEF now supports 255 filter numbers, not 127. This is supported in ipmi-config (formerly ipmi-pef-config). - Support get/set of new System Info Parameters Present OS Version, BMC URL, and Base OS/Hypervisor URL. This is supported in bmc-info and bmc-device. o Update ipmi-oem Intel Node Manager OEM commands for changes listed in Intelligent Power Node Manager 2.0 specification. - Due to changes in the specification, minor text changes may exist in some output from intelnm OEM commands. o Update ipmi-sel to support new SEL events in Intelligent Power Node Manager 2.0 specification. o Support 'serialalertsdeferred' workaround in ipmiconsole. o Support 'solpacketseq' workaround in ipmiconsole. o Fix portability issues for Apple / OS X. Tools - Bug Fixes/Minor Changes ------------------------------- o Fix bmc-info output of GUID, format was output with two bytes out of order. - May affect scripts parsing and using the GUID. o Bmc-info now supports --get-system-guid and outputs the System GUID as well as the Device GUID by default. - The Device GUID is not prefixed with the text "Device GUID" instead of just "GUID". Any scripts scripting against this will need to be adjusted. o Bmc-info now supports a workaround of 'guidformat' to read the GUID with a format a number of vendors have incorrectly used. o In ipmi-config's sensor configuration, decimal values that cannot be encoded accurately now report a clearer error message. Libraries --------- o Update libfreeipmi and libipmimonitoring to support IPMI 2.0 Errata 5. Included are: - Support new sensor events for Power Supply and OS Boot sensors. - Support PEF filter numbers up to 255. - Support new System Info Parameters for Present OS Version, BMC URL, and Base OS/Hypervisor URL. o Update libfreeipmi to support Intel Node Manager payloads per Intel Intelligent Power Node Manager 2.0 specification. - Due to changes in the specification, some payload fields have been changed. o Update libfreeipmi SEL sub-library to handle new event messages in Intelligent Power Node Manager 2.0 specification. o Support SERIAL_ALERTS_DEFERRED workaround in libipmiconsole. o Support INCREMENT_SOL_PACKET_SEQUENCE workaround in libipmiconsole. FreeIPMI 1.3.4 - 12/12/13 ------------------------- o Support 'solchannelsupport' workraound in ipmiconsole / IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT workaround flag in libipmiconsole. o Fix SDR cache workaround for motherboards with invalid SDR record counts listed. o Workaround Supermicro bug in bmc-watchdog. o Fix error checks in sensor decoding functions, leading to possible problems in ipmi-sensors-config. o Update documentation with additional workarounds for motherboards. o Fix various minor bugs. FreeIPMI 1.3.3 - 10/29/13 ------------------------- o Add support for intelnm get-node-manager-alert-destination and set-node-manager-alert-destination in ipmi-oem. o Under very verbose mode, ipmi-sel will now record types for OEM records. This should allow OEM parses outside of FreeIPMI to more effectively parse OEM specific SEL records. o Fix big endian portability bugs. FreeIPMI 1.3.2 - 09/10/13 ------------------------- o Update FreeIPMI tools to check libfreeipmi API error codes correctly. o Update ipmi-api.h to list mappings of IPMI completion codes and RMCPPlus codes to API Error codes. FreeIPMI 1.3.1 - 08/22/13 ------------------------- Tools - New Features -------------------- o In all tools reporting time (ipmi-sel, ipmi-fru, ipmi-oem, bmc-device, ipmi-sensors, ipmi-dcmi), timestamps are now reporting under the assumption the timestamp is already in localtime (compared to being in UTC time and converted to localtime). This is by definition in the IPMI specification. o In all tools reporting time (ipmi-sel, ipmi-fru, ipmi-oem, bmc-device, ipmi-sensors, ipmi-dcmi), support --utc-to-localtime, --localtime-to-utc, and --utc-offset options to allow users to adjust timestamps as needed for certain environments. o In ipmi-fru, support output of DDR3 SDRAM modules. o In ipmi-fru, support output of new FRU multirecords, most notably extended DC output and extended DC load (per FRU Revision 1.2 update). o In bmc-device, support --get-sel-time-utc-offset and --set-sel-time-utc-offset. Tools - Bug Fixes/Minor Changes ------------------------------- o In ipmi-fru, report power supply low/high end voltage ranges as signed numbers (per FRU Revision 1.2 update). o In ipmi-fru, output "unspecified" for manufacturing date/time or peak capacity as appropriate (per FRU Revision 1.2 update). o In ipmi-fru, bridge additional FRU entries as appropriate. o In all tools reporting time (ipmi-sel, ipmi-fru, ipmi-oem, bmc-device, ipmi-sensors, ipmi-dcmi), special timestamps such as Post-Init and Unspecified will now be output. o Fix output corner case with entity sensor names in various tools. Libraries --------- o In libfreeipmi, support additional chassis types (per FRU Revision 1.2 update). o In libfreeipmi, support new FRU multirecord types (per FRU Revision 1.2 update). o In libfreeipmi, support new IPMI_FRU_FLAGS_READ_RAW 'fru' sub-library flag to read data from the FRU raw without parsing headers/records. o In libfreeipmi, add support for DDR3 SDRAM FRU entries and JEDEC manufacturer IDs. o In libfreeipmi, add support for Get SEL Time UTC Offset and Set SEL Time UTC Offset payloads. o In libfreeipmi 'sel' sub-library, support IPMI_SEL_PARAMETER_UTC_OFFSET, IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME, and IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC options/flags. o In libfreeipmi, do not pad legacy byte on IPMI 1.5 packets. Legacy byte should be padded on ethernet frame, not IP packet. o In libfreeipmi, 'sdr' sub-library, when creating SDR cache, add checksums to cache to ensure data in cache is not corrupted. Older caches without checksums still backwards compatible supported. o In libfreeipmi, support new IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED error code for IPMI commands that are invalid or unsupported. FreeIPMI 1.2.9 - 07/17/13 ------------------------- o Fix threshold output corner case in ipmi-sensors. o Fix invalid declaration in libipmimonitoring header. o Fix older compiler build problems. FreeIPMI 1.2.8 - 06/21/13 ------------------------- o Fix portability build bug on ARM systems. o Add 'internal IPMI error' troubleshooting to manpages. o Fix bmc-info corner case on Bull 510 systems. FreeIPMI 1.2.7 - 05/16/13 ------------------------- o Fix sensor output errors with OEM sensors. FreeIPMI 1.2.6 - 04/29/13 ------------------------- o Support HP Proliant DL160 G8 OEM sensors. o Support Supermicro X9SCM-iiF OEM sensors and events. o Support output of temperature sampling period to ipmi-dcmi. o Clarify error message when SOL session cannot be stolen in ipmiconsole/libipmiconsole. o Fix dcmi rolling average time period output error o Fix ipmi-dcmi output errors with --get-dcmi-sensor-info. o Fix corner case in calculation of confidentiality pad length with AES-CBC-128 encryption. Incorrect pad effects some vendor firmware implementations. o Send IPMI 2.0 packets differently than IPMI 1.5 packets, as the former does not require legacy pad data to be appended to payloads. o Fix Intel OEM SEL buffer overflow. o Fix out of trunk source build. Libraries --------- o Support new ipmi_rmcpplus_sendto() and ipmi_rmcpplus_recvfrom() functions. o Support new HP Proliant DL160 G8 OEM sensor events. FreeIPMI 1.2.5 - 02/26/13 ------------------------- o In all config tools (bmc-config, ipmi-pef-config, ipmi-chassis-config, ipmi-sensors-config), fix bug when user specifies --checkout and --filename option and no data outputs to file. o In all config tools, exit with value 1 when non-fatal errors occur. Exit with value 2 when fatal errors occur. o Support Supermicro X9SPU-F-O OEM sensors and events. o Support Supermicro X9DRI-LN4F+ OEM intepretations (previously forgotten). o Clarify use of --filename in config tool manpages. FreeIPMI 1.2.4 - 01/10/13 ------------------------- o Support Supermicro X9DRI-LN4F+ OEM sensors and events. o Fix output corner case for "session-based" channels. o Fix ipmi-oem set-power-restore-delay corner case in time settings. o Fix ipmiseld memleak. o Fix libfreeipmi potential fd leak when generating random numbers. o Fix libfreeipmi error output bug in RMCP interface. o Fix several minor corner cases discovered by static code analysis. FreeIPMI 1.2.3 - 11/14/12 ------------------------- Tools ------ o In ipmi-oem, support new Dell Poweredge R720 OEM commands extensions, including: - get-nic-selection-failover - set-nic-selection-failover - power-monitoring-over-interval - power-monitoring-interval-range - get-last-post-code o In ipmi-oem, update active-lom-status for Dell Poweredge R720. o In ipmi-oem, support new Dell Poweredge R720 get-system-info option 'cmc-info'. o In ipmi-oem, Dell get-system-info "slot-number" key changed to "blade-slot-info". Legacy option still supported. o In ipmi-sel, support Dell Poweredge R720 OEM SEL extensions. o In all tools, support nochecksumcheck workaround option. o In all daemons (ipmiseld, ipmidetectd, bmc-watchdog), check for syscall errors during daemon setup. Libraries --------- o In libfreeipmi, support Dell R720 OEM extension intepretations. o In libfreeipmi, libipmimonitoring, and libipmiconsole, support NO_CHECKSUM_CHECK workaround flag. o In libipmiconsole, IPMICONSOLE_DEBUG_FILE logs debug to files in current working directory and not /var/log. PID is also appended to debug files. Misc ---- o Various documentation updates and fixes. FreeIPMI 1.2.2 - 10/02/12 ------------------------- Tools ------ o Support new --sol-payload-instance and --deactivate-all-instances options in ipmiconsole. o Fix ipmiseld compile issue with -Werror=format-security. Libraries --------- o In libipmiconsole, add new ipmiconsole_ctx_set_config() and ipmiconsole_ctx_get_config() functions. o In libipmiconsole, add support for specifying and handling different SOL payload instances. This support includes: - Support new IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE configuration option. - In libipmiconsole, support new IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES behavior flag. - Return more appropriate error codes when activation limits are discovered. o In libfreeipmi, fix debug output corner case when outputting byte arrays. Misc ---- o Various documentation updates and fixes. FreeIPMI 1.2.1 - 08/22/12 ------------------------- Tools - New Features -------------------- o Support new ipmiseld daemon, a daemon that regularly polls the SEL and stores the events to the local syslog. o In ipmipower, support --oem-power-type option to support OEM specific power control operations. Included in this support were the follow changes to ipmipower: - Support initial OEM power type of C410X. - Re-architect to allow input of extra information for an OEM power operation via the '+' operator after the hostname. - Re-architect to allow input of target hostname multiple times under OEM power cases. - Re-architect to allow serialization of power control operations to the same host. o Globally in tools, support --target-channel-number and --target-slave-address to specify specific targets. o Globally in tools, support ability to specify alternate port via optional [:port] in hostname or host config. o In ipmi-fru, support --bridge-fru option to allow reading FRU entries from satellite controllers. o In bmc-config, add configuration support for Maximum_Privilege_Cipher_Suite_Id_15 under RMCPplus_Conf_Privilege. o Globally support Cipher Suite ID 15 and 16 based on comments from Intel. o In ipmi-sensors, support --output-sensor-thresholds, to allow outputting of sensor thresholds in default output for scripting. o In ipmi-sel, support new --post-clear option. o In bmc-device, support new --set-sensor-reading-and-event-status option. o In ipmi-oem, support additional Intel Node Manager commands, including: - get-node-manager-capabilities - node-manager-policy-control - get-node-manager-policy - set-node-manager-policy - remove-node-manager-policy - get-node-manager-alert-thresholds - set-node-manager-alert-thresholds - get-node-manager-policy-suspend-periods - set-node-manager-policy-suspend-periods - set-node-manager-power-draw-range o In ipmi-oem, support Wistron OEM commands extensions. o In ipmi-sel, support Wistron OEM SEL interpretations. o In ipmi-fru, support Wistron OEM FRU records. o In ipmi-pef-config, support configuration volatile Alert String 0 and Lan Alert Destination 0. Tools - Bug Fixes/Minor Changes ------------------------------- o In ipmi-fru, if builtin FRU device (ID 0) has SDR entry, output SDR entry name rather than fixed string. o In ipmipower, exit with value 1 on IPMI errors in addition to system errors. o In ipmidetect, exit with exit value 2 when an error occurs. Exit value of 0 or 1 are reserved for scripting. o In bmc-watchdog, properly support assumeio and spinpoll workarounds. o In bmc-watchdog and ipmidetectd daemon, support handling of SIGQUIT signal in addition to SIGTERM and SIGINT, properly umask generated pidfile, and delete pidfile when necessary. o In bmc-watchdog, log all errors to syslog instead of unique file. o In bmc-watchdog, remove --logfile option. o In bmc-watchdog, support --verbose-logging option for increased logging. o In ipmidetectd daemon, create/handle pidfile. o In ipmidetectd daemon and ipmidetect, update command line parsing to use argp instead of getopt. This change leads to some changes for consistency with the rest of FreeIPMI, but changes some command line options. - -v is no longer supported, -V outputs version information - -h is no longer supported, -? outputs help o In ipmi-raw, make --channel-number and --slave-address legacy options. They are now overriden by --target-channel-number and --target-slave-address. o Re-work entity sensor names calculation to more properly meet IPMI specification. Users may see slight changes in the output of sensor names when using the --entity-sensor-names option or similar output in ipmi-sensors, ipmi-sel, ipmi-pet, or ipmi-oem. o Re-work shared sensors name output to more properly meet IPMI specification. Users may see slight changes in the output of sensor names when using the --shared-sensors option or similar output in ipmi-sensors, ipmi-sel, or ipmi-pet. o In ipmi-fru, deprecate --skip-checks option in favor of "skipchecks" workaround flag. o Support "assumemaxsdrrecordcount" workaround in all tools that use SDR. o Support "noauthcodecheck" workaround in all tools that use IPMI 1.5. o Support workaround to load SDR properly on systems which return invalid lengthed SDR records. Noticed on Xyratex HB-F8-SRAY. o Support workaround handling of IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED completion code when returned from activate session command. Noticed on Xyratex HB-F8-SRAY. Libraries --------- o In libfreeipmi, create new 'sdr' sub-library which is merger of the earlier 'sdr-cache' and 'sdr-parse' libraries. - This results in an ABI change. Generally speaking, all "ipmi_sdr_cache" and "ipmi_sdr_parse" functions, types, and macros are changed to "ipmi_sdr", although some minor exceptions exist. - For example: ipmi_sdr_cache_ctx_t -> ipmi_sdr_ctx_t ipmi_sdr_parse_ctx_t -> ipmi_sdr_ctx_t ipmi_sdr_cache_ctx_create() -> ipmi_sdr_ctx_create() ipmi_sdr_parse_ctx_destroy() -> ipmi_sdr_ctx_destroy() IPMI_SDR_CACHE_ERR_PERMISSION -> IPMI_SDR_ERR_PERMISSION IPMI_SDR_PARSE_ERR_PARAMETERS -> IPMI_SDR_ERR_PARAMETERS - Please see the new ipmi-sdr.h header file for full changes. o In libfreeipmi, create new 'sel' sub-library which replaces the 'sel-parse' library. - This results in an ABI change. Generally speaking, all ipmi_sel_parse" functions, types, and macros are changed to "ipmi_sel", although some minor exceptions exist. - For example: ipmi_sel_parse_ctx_t -> ipmi_sel_ctx_t ipmi_sel_parse_ctx_destroy() -> ipmi_sel_ctx_destroy() IPMI_SEL_PARSE_ERR_PARAMETERS -> IPMI_SEL_ERR_PARAMETERS - Please see the new ipmi-sel.h header file for full changes. o In libfreeipmi, create new 'fru' sub-library which replaces the 'fru-parse' library. - This results in an ABI change. Generally speaking, all ipmi_fru_parse" functions, types, and macros are changed to "ipmi_fru", although some minor exceptions exist. - For example: ipmi_fru_parse_ctx_t -> ipmi_fru_ctx_t ipmi_fru_parse_ctx_destroy() -> ipmi_fru_ctx_destroy() IPMI_FRU_PARSE_ERR_PARAMETERS -> IPMI_FRU_ERR_PARAMETERS - Please see the new ipmi-fru.h header file for full changes. o In libfreeipmi, support Cipher Suite 15 and 16 implementation based on comments from Intel. o In libfreeipmi, add Cipher Suite 18 and 19 information, but do not support. o In libfreeipmi, support SEL string output format '%E' for combined event data1, data2, and data3 output. o In libfreeipmi, support SEL string output format '%I' for interpretation event output. o In libfreeipmi, fix bug in SEL string output in which both sensor name and severity used '%s'. Severity now uses '%S'. o In libfreeipmi, support ability to config interpret config file and sel library and receive appropriate error. o In libfreeipmi, support reservation-id registration and clearing in the sel sub-library. o In libfreeipmi, sel sub-library now supports a "no sel entries loaded" error. o In libfreeipmi, condense sel record parsing functions. One set of functions now handles the previous case of both sets. o In libfreeipmi, fru sub-library now supports ipmi_fru_parse_read_multirecord_record_type_id function. o In libfreeipmi, support additional sensor/SEL interpretations, including: - OS Boot - OS Critical State State - Platform Alert State - Boot Error State - System Event Transition State o In libfreeipmi, add missing macro definitions. o In libipmimonitoring, support Cipher Suite ID 15, 16, and 17. o In libfreeipmi, libipmiconsole, libipmimonitoring, support ability to specify alternate port via optional [:port] in hostname. o In libfreeipmi, add additional IPMI commands/payloads. o In libfreeipmi, fix several macro names which did not meet standardization needs. o In libfreeipmi, support new IPMI_ERR_DRIVER_BUSY error code. o In libfreeipmi sdr, support more complete parsing of Management Controller Locator Records. o In libfreeipmi, KCS driver now sleeps a small amount between IPMB retries to avoid spinning. o In libfreeipmi and libipmimonitoring, do not export functions that shouldn't be. o In libfreeipmi, support stats functions and new utility functions in sdr sub-library. o In libfreeipmi, sel sub-library now supports the output of entity sensor names. o In libfreeipmi, fru sub library now supports new function to determine multirecord type. o In libfreeipmi, fix argument size bugs with Intel Node Manager functions. o In libipmimonitoring, support entity sensor name output options. Misc ---- o Add diagnostic/exit-value information to most manpages. FreeIPMI 1.1.7 - 07/30/12 ------------------------- o In ipmi-sensors and ipmi-sel, fix units output corner case. o In bmc-info, detect unsupported system info corner case. o Update documentation with motherboard support. FreeIPMI 1.1.6 - 06/28/12 ------------------------- Tools ------ o In ipmi-sel, support Supermicro SEL OEM interpretations in --output-event-state. o In ipmi-sel and ipmi-sensors, support additional sensor/SEL interpretations including: - Version Change - System Firmware Progress Transition Severity - Button/Switch Transition Severity - Chassis Transition Severity - POST Memory Resize State - Cable/Interconnect Transition Severity - Boot Error Transition Severity - Slot Connector Transition Severity - Memory State - Memory Transition Severity o In bmc-config, ipmi-chassis-config, ipmi-pef-config, and ipmi-chassis-config, support cipher suite ID argument. o Support Supermicro X9DRi-F OEM sensors and events. o Fix Intel S2600JF/Appro 512x OEM SEL interpretations based on comments from Intel. Libraries --------- o Support Supermicro SEL OEM interpretations. o Support new sensor/SEL interpretations. Misc ---- o Various documentation updates and fixes. FreeIPMI 1.1.5 - 05/17/12 ------------------------- Tools ------ o Support Supermicro OEM sensors/SEL on H8DGU-F motherboards. o In ipmiconsole, fix password length check bug. o In bmc-watchdog, fix --start-if-stopped and --reset-if-running options. o In ipmidetectd, fix usage output typos. o In ipmi-sensors-config, fix several parallel output corner cases. o For consistency to other tools, turn on quiet-caching if communicating with multiple hosts in bmc-device and ipmi-oem. o In ipmi-sensors, fix bug in which multiple workarounds could not be used or used in combination with bridging. o Fix start run levels in ipmidetectd init script. Libraries --------- o In libfreeipmi fru-parse API, handle additional device busy errors. Misc ---- o Various documentation updates. FreeIPMI 1.1.4 - 04/19/12 ------------------------- Tools ------ o In ipmi-oem, fix error message output in several Supermicro OEM commands. o In ipmi-oem, add Intel --get-power-restore-delay and --set-power-restore-delay support. o In ipmi-sel, support Intel S2600JF/Appro 512x OEM SEL interpretations. Libraries ---------- o In libfreeipmi, support new sensor and SEL event interpretations, including Session Audit, Voltage Limits. o In libfreeipmi, support new OEM interpretations for Intel S5000PAL NMI State and SMI timeout sensors/SEL events. o In libfreeipmi, support Intel S2600JF/Appro 512x OEM SEL interpretations. Misc ---- o Various documentation updates. FreeIPMI 1.1.3 - 03/06/12 ------------------------- Tools ------ o Support Supermicro CPU temperature SEL events. o In ipmi-oem, fix corner case with Dell C410x power control calculation. o In all tools, fix error messages to differentiate between invalid and unsupported cipher suite IDs. o In bmc-config, fix a Cipher Suite Privilege configuration corner case in the workaround for an HP DL145 workaround. o In bmc-config, add workaround for Cipher Suite Privilege configuration on Intel S2600JF/Appro 512X. o Various documentation updates. Libraries ---------- o In libfreeipmi, fix incorrect packet layout for the Get Lan Configuration Parameters RMCPplus Messaging Cipher Suite Entry Support response. o In libipmimonitoring, properly return connection timeout error on connection timeout. Misc ---- o Fix build when using --docdir. o Various documentation updates. FreeIPMI 1.1.2 - 02/06/12 ------------------------- Tools ------ o In ipmi-oem, support new Dell C410x OEM extensions slot-power-toggle, slot-power-control, get-port-map, set-port-map. o Fix daemon setup race condition in ipmidetectd and bmc-watchdog that can affect systemd. o In ipmiconsole, support new --serial-keepalive-empty option. o In bmc-device, support new --rearm-sensor option. o In ipmi-oem, add additional Dell get-system-info options - slot-number - system-revision - embedded-video-status - idrac-info - idrac-ipv4-url - idrac-gui-webserver-control - cmc-ipv4-url, - cmc-ipv6-info - cmc-ipv6-url o In ipmi-oem, support Dell 12G mac addresses under get-system-info. o In ipmi-sensors, some sensors that reported "Unknown" may now report "N/A" due to an interpretation change of several IPMI error codes. o In ipmi-sensors, workaround sensor reading issue on Sun Blade x6250 and Sun Blade 6000M2. o Fix several freeipmi.conf config file parsing bugs. Libraries ---------- o In libipmiconsole, fix serial keepalive timeout calculation bug that can lead to excessive packets retransmitted. o In libipmiconsole, support new SERIAL_KEEPALIVE_EMPTY engine flag. o In libipmiconsole, do not deactivate a SOL payload if it appears the SOL payload has been stolen, but we did not receive a SOL deactivating flag. o In libipmiconsole, fix corner case in which session not closed cleanly when DEACTIVATE_ONLY flag specified. o In libipmiconsole, workaround bug in Dell Poweredge M605, M610, and M915 where instance count of SOL is always returned as 0. o In libfreeipmi, add functions for re-arm sensor events IPMI payload. o In libfreeipmi/sensor-read, under some error conditions return error of "unavailable" instead of "cannot be obtained" error code. o In libfreeipmi/sensor-read, add workarounds to handle issues on Sun Blade x6250 and Sun Blade 6000M2. Misc ---- o Various documentation updates. o Redo formattig of include/freeipmi/templates/ documents. FreeIPMI 1.1.1 - 01/03/12 ------------------------- Tools ----- o Support new tool ipmi-pet, tool to parse/interpret platform event traps. o Support new --sdr-cache-file option specify specific SDR cache file in all SDR related tools (ipmi-sensors, ipmi-sel, ipmi-fru, etc.). o In ipmi-fru, do not consider a busy device a fatal error. o In ipmi-sensors, support 'ignoreauthcode' workaround option. o In ipmi-sensors, support Quanta QSSC-S4R/Appro GB812X-CN OEM SDRs and sensors. o In ipmi-sel, support Quanta QSSC-S4R/Appro GB812X-CN OEM SEL events. o In ipmi-sel, fix several OEM specific event output bugs. o In ipmi-pef-config, fix configuration bug for Enable_PEF_Event_Messages. o In ipmi-raw, for file/stdin input, output line number when there is an error. Libraries --------- o Update libfreeipmi for DCMI 1.5 additions. o Update libfreeipmi fru-parse sub-library to support FRU parsing without an IPMI connection. o In libfreeipmi, support IPMI_FLAGS_NOSESSION flag to open a context for IPMI communication w/o establishing a session. o In libfreeipmi, support IPMI_FLAGS_NO_LEGAL_CHECK flag, to workaround motherboards to may return illegal IPMI packets. o In libfreeipmi, support IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE flag, to workaround specific situations where motherboards return incorrectly generated authentication codes. o In libfreeipmi fru-parse sub-library, support IPMI_FRU_PARSE_ERR_DEVICE_BUSY error code. o In libfreeipmi, add support for IPMI firmware firewall and command discovery payloads. o In libfreeipmi, support Quanta QSSC-S4R/Appro GB812X-CN OEM SEL events. o Fix various macro names (typos, invalid naming, etc.) Contributions ------------- o petalert.pl - snmptrapd handler script to alert when Platform Event Traps (PET) occur. FreeIPMI 1.0.10 - 12/13/11 -------------------------- o Clarify bmc-watchdog error messages. o Various documentation updates. FreeIPMI 1.0.9 - 11/21/11 ------------------------- o Support Supermicro OEM sensors on X9SCA-F-O motherboards. o Support Supermicro OEM sensors on X9SCM-F motherboards with newer firmware. FreeIPMI 1.0.8 - 10/27/11 ------------------------- o Fix corner case in which invalid SDR entry could be loaded when shared sensors exist on event only records. o Fix several event output corner cases. o Fix 'assumesystemevent' workaround for ipmi-sel. o Fix ipmi-raw and ipmi-oem allocation bug on newer systems, such as RHEL6. o Support Intel Node Manager sensor/SEL events for Intel S2600JF/Appro 512X. o Document workarounds for Intel S2600JF/Appro 512X. o Per definition, output GUID w/ lower case characters in bmc-info. o Other minor bug fixes. FreeIPMI 1.0.7 - 09/28/11 ------------------------- o Support many new sensor state and sel event interpretations. o Fix parsing bugs for freeipmi_interpret_sel.conf. o Support 'assumebmcowner' workaround in ipmi-sensors. o Support dynamic linking in libfreeipmi. o Output pidfile in bmc-watchdog to support easier init script killing. o Do not poll stdin in ipmipower when operating in non-interactive mode. o Support IGNORE_SCANNING_DISABLED workaround in libipmimonitoring. o Support Supermicro OEM sensors on X7DB8, X8DTN, X7SBI-LN4, X8DTL, X8DTN+-F, and X8SIE motherboards. o Fix handling error codes in optional parts of ipmi-dcmi. o Fix various debug dumping bugs. o Fix ipmimonitoring script install bug on some systems. o Fix symbol global vs. locals in libipmimonitoring. o Minor documentation and manpage updates. FreeIPMI 1.0.6 - 09/01/11 ------------------------- o Support 'ignorescanningdisabled' workaround in ipmi-sensors. o Support Supermicro X8SIL-F, X9SCL, and X9SCM motherboard OEM sensors. o Update bmc-watchdog logrotate script to reduce unnecessary output. o Fix ipmi-fru output typo. FreeIPMI 1.0.5 - 06/30/11 ------------------------- o Fix various issues in ipmi-dcmi, including command line parsing bugs, asset tag/string identifier overwriting, and fix assumptions based on new information in v1.5 errata. o Support pkg-config files for libraries. o Various documentation updates. FreeIPMI 1.0.4 - 04/21/11 ------------------------- o Support "discretereading" workaround in ipmi-sensors and associated libraries. o Support "spinpoll" workaround/performance optimization in tools and libraries. o Support additional sensor/SEL interpretations for Intel motherboards. o Add convenience input checking functions to libipmiconsole. o Fix bug in libipmimonitoring to allow additional OEM interpretations. FreeIPMI 1.0.3 - 03/29/11 ------------------------- o Support additional error handling in bmc-info. o Support ability to set "none" workaround flags on the command line and in tools. o In libipmiconsole, force ipmiconsole_engine_init() to be called before ipmiconsole_ctx_create(). o Fix libipmiconsole callback semantics. o Fix libipmiconsole bugs in overriding standard defaults vs. config file defaults. o Fix potential race in libipmiconsole during engine teardown. o Add package version macros to libfreeipmi. o Add library version macros to all libraries. o Fix Solaris build bug. o Fix config output bug in ipmipower. FreeIPMI 1.0.2 - 02/22/11 ------------------------- o Support --ignore-unrecognized-events in ipmi-sensors. o Clarify error messages in ipmi-locate. o Support Supermicro X7DBR-3, X8DTL-3F, X8DT3-LN4F motherboard OEM sensors. o Support Dell Module/Board OEM sensor interpretation on Poweredge R210 motherboards. o In bmc-info, support motherboards that don't implement Get Device Guid. o In bmc-watchdog, fix error logging corner case. o Support new -r option in ganglia_ipmi_sensors.pl plugin to modify ipmi hostname. o Add workaround for SDR caching compliance bug in HP Proliant DL585G7. o In bmc-config, add workaround for motherboards that do not allow you to configure identical usernames. o Various documentation updates. FreeIPMI 1.0.1 - 01/20/11 ------------------------- Major Changes, Additions, and Features -------------------------------------- o Remove ipmimonitoring tool. Tool is now superseded by ipmi-sensors and the new --output-sensor-state option. o Support --output-event-state option for ipmi-sel to support SEL event interpretation. o All config-tools now support multi-channel configuration under verbose mode. o Re-architect libipmimonitoring to support all defined IPMI sensor types, OEM bitmasks, and OEM interpretations. o Add SEL monitoring support to libipmimonitoring. o Support new 'interpret' sub-library in libfreeipmi. o Support interpretation rules for sensors when no states/events occur. o Support interpretation rules for out of spec sensor states/events. o Support interpretation rules for OEM sensors and events. o Move all config files to /etc/freeipmi/. Support legacy config files for backwards compatibility. o Support serial keepalive in ipmiconsole to check if serial connection has remained alive across system reboots. o Create symlinks and manpage pointers for 'ipmi-power', 'ipmi-ping', 'rmcp-ping', 'ipmi-console', and 'ipmi-detect' to give some additional consistency to the tool naming. o Various documentation updates. o Update to support DCMI 1.1. o Update all licensing information to GPLv3. Tools - Detailed Enhancements/Changes/Fixes ------------------------------------------- o ipmi-sensors - Support --output-sensor-state option. - Support --sensor-state-config-file option. - Support --output-event-bitmask option. - Support Intel Node Manager sensors. - Some sensor states may now report 'N/A' if an invalid sensor event occurred. - Report 'N/A' instead of 'Unknown' is requested sensor does not exist on motherboard. - Support number input for --sensor-types and --exclude-sensor-types. - The "Unrecognized State" event string is now output as "Unrecognized Event = X" or "OEM Event = X" where X is the event bitmask. o ipmi-sel - Support --output-event-state option. - Support --event-state-config-file option. - Support --sensor-types option. - Support --exclude-sensor-types option. - Support --output-manufacturer-id option. - Support --date-range option. - Support --exclude-date-range option. - Alter OEM record output to align with columns by outputting "N/A" in appropriate fields and putting manufacturer ID in event output. o ipmi-dcmi - Support --set-asset-tag option. - Support --get-management-controller-identifier-string option. - Support --set-management-controller-identifier-string option. o ipmiconsole - Support --serial-keepalive option. - Rework 'intel20' workaround to not allow a non two-part authentication. o ipmipower - Rework 'intel20' workaround to not allow a non two-part authentication. o bmc-config - Support --lan-channel-number. - Support --serial-channel-number. - Support --sol-channel-number. - Support 'solchannelassumelanchannel' workaround. - Support IPv4 header parameter configuration under verbose mode. - Support RMCP port configuration under verbose mode. - Move Vlan configuration to output only on verbose. - Show verbose-only sections in --list. - Do not output section comments if key-pair specified on command line. - Allow checkout of sections/key-pairs if specified on command line, even if not available by default. - Support very-verbose output by specifying -vv. Move some output from verbose output to very verbose output. o ipmi-pef-config - Support --lan-channel-number. - Do not output section comments if key-pair specified on command line. - Allow checkout of sections/key-pairs if specified on command line, even if not available by default. - Support very-verbose output by specifying -vv. Move some output from verbose output to very verbose output. o ipmi-sensors-config - Do not output section comments if key-pair specified on command line. - Allow checkout of sections/key-pairs if specified on command line, even if not available by default. - Support very-verbose output by specifying -vv. Move some output from verbose output to very verbose output. o ipmi-chassis-config - Do not output section comments if key-pair specified on command line. - Allow checkout of sections/key-pairs if specified on command line, even if not available by default. - Support very-verbose output by specifying -vv. Move some output from verbose output to very verbose output. o ipmi-oem - Support Intel get/set-smtp-config. - Support basic Intel Node Manager OEM commands. o ipmimonitoring - Removed tool. Tool is now superseded by ipmi-sensors and the new --output-sensor-state option. - Legacy output support maintained via --ipmimonitoring-legacy-output option. o ipmi-locate - Do not output system defaults by default. - Support --defaults option. Libraries - Detailed Enhancements/Changes/Fixes ----------------------------------------------- o libfreeipmi - Support new 'interpret' sub-library. - Support new 'payload' sub-library and templates. Split off SOL Payload templates, functions, etc. into this section. - Support new 'oem' sub-library and templates. - Support OEM Intel Node Manager extensions. - 'sel-parse' library now does not require valid ipmi_ctx. Functions performing ipmi communication will simply error. - Rework 'intel20' workaround to not allow a non two-part authentication. - Add DCMI 1.1 support. - Split workaround flags for inband, IPMI 1.5, and IPMI 2.0 to save bits. - Improve SDR caching speed for many modern motherboards. - Support more IPMI templates. - Fix some API differences from spec. - Fix some template bugs/typos. - Rename number of macros for consistency to IPMI spec. o libipmimonitoring - Add SEL monitoring support to libipmimonitoring. - Re-architect to support all defined IPMI sensor types. - Re-architect to use 'interpret' sub-library. - Rename a number of functions to differentiate sensor vs. SEL functions. - Support percent (i.e. '%') units. - Support OEM bitmasks and bitmask strings. - Add bitmask type IPMI_MONITORING_SENSOR_BITMASK_TYPE_OEM. - Add ipmi_monitoring_read_sensor_bitmask_string(). - Remove ipmi_monitoring_sensor_bitmask_string(). - Through libfreeipmi 'interpret' sub-library, support OEM sensor interpretations. Initial OEM interpretations include: - Dell Poweredge R610/R710 - Supermicro X8DTH - Support IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST error code. - Remove unused IPMI_MONITORING_ERR_CONFIG_FILE_PARSE error code. - Split workaround flags for inband, IPMI 1.5, and IPMI 2.0 to save bits. o libipmiconsole - Support serial keepalive to check for loss of serial connection. - Support libipmiconsole.conf defaults file. - Support default thread_count of 4 if zero input for thread_count. Contributions ------------- o ganglia_ipmi_sensors.pl - Updated for new output format and options. - Support ability to monitor sensor state. - Support -T and -t options to allow option to monitor only sensor state or sensor readings. o ganglia_ipmimonitoring.pl - Removed. Superseded by ganglia_ipmi_sensors.pl. o nagios_ipmi_sensors.pl - New tool to replace nagios_ipmimonitoring.pl. o nagios_ipmimonitoring.pl - Removed. Superseded by nagios_ipmi_sensors.pl. FreeIPMI 0.8.12 - 10/28/10 -------------------------- o In bmc-config, workaround RMCP+ Privilege Level configuration bugs on HP DL145 servers. o Fix N/A output corner case in ipmi-sel. o Support Supermicro X8DTU-6+ motherboard OEM sensors. FreeIPMI 0.8.11 - 10/28/10 -------------------------- o Support Fujitsu iRMC S1 and iRMC S2 OEM extensions in ipmi-sensors and ipmi-sel. o Support --output-oem-event-string in ipmi-sel. o Other minor documentation/bug fixes. FreeIPMI 0.8.10 - 09/28/10 -------------------------- o Support many new Inventec OEM extensions in ipmi-oem. o Support many new Quanta OEM extensions in ipmi-oem. o Support many new Intel OEM extensions in ipmi-oem. o Support Intel s5500WB OEM extensions in ipmi-sel. o Support Intel Node Manager SEL events across Quanta S99Q, Inventec 5441, Inventec 5442, and Intel S5500WB motherboards. o Move some OEM extensions from Dell section to Inventec section in ipmi-oem. Were previously thought to be additions by Dell, but in fact are not. Backwards compatability supported. o Support 'assumeio' inband workaround globally. o Gracefully handle some errors in ipmi-sensors. o Fix in-band probing corner case. o Fix various parameter input checks in ipmi-oem. o Fix help output corner cases in ipmi-oem. o Other minor documentation/bug fixes. FreeIPMI 0.8.9 - 08/20/10 ------------------------- o In ipmi-sel and ipmimonitoring, workaround Supermicro H8QME SEL compliance issues in ipmi-sel. o In ipmi-sel, do not report error if SEL is empty. o Support Fujitsu 'get-sel-entry-long-text' in ipmi-oem. o Fix workaround flags bug in ipmimonitoring. o Revert 'Open Session Privilege Workaround' changes in 0.8.8, were unnecessary. o Fix daylight savings bug when configuring BMC times in bmc-device. o Support 'veryslowcommit' workaround for config tools to work around very slow BMCs. o Support --enable-rawdumps compile option. o Support SHA256 in IPMI 2.0. o Other minor bug fixes. FreeIPMI 0.8.8 - 07/20/10 ------------------------- o Support Supermicro 'get-bmc-services-status' and 'set-bmc-services-status' in ipmi-oem. o Support bmc-watchdog 'ignorestateflag' workaround around more issues. o Support Open Session Privilege Workaround around more related compliance issues. o Fix bmc-watchdog --version option. o Fix legacy workaround corner case in channel detection for Intel nodes. o Support Quanta reset-to-defaults command in ipmi-oem. o Modify ipmiconsole protocol to not deactivate SOL protocol is SOL is already deactivated. o Modify ipmiconsole protocol to not error out under several malformed packet scenarios. o Fix ipmiping/rmcpping command line parsing corner case. o Minor documentation updates. o Minor error message output fixes. o Support --without-random-device configure option for some embedded systems. FreeIPMI 0.8.7 - 06/17/10 ------------------------- o Support Supermicro X8DTG OEM sensors. o Support Supermicro X8DTG workarounds with 'integritycheckvalue' workaround flag. o Document workarounds for Intel S5500WBV/Penguin Relion 700 motherboard. o Map IPMI 2.0 "invalid role" error code to "privilege level cannot be obtained" for better usability. o Fix bmc-config Security Keys commit by making some required fields optional. o Fix bmc-watchdog init script return codes on Suse. o Support 'ignorestateflag' workaround in bmc-watchdog. o Fix ipmi-sensors corner case for sensors with percentage units. o Support 'slowcommit' workaround for config tools to work around slower BMCs. o Update documentation w/ Supermicro X8DTG issues. o Update documentation w/ inband troubleshooting. FreeIPMI 0.8.6 - 05/24/10 ------------------------- o Support Quanta S99Q/Dell FS12-TY OEM SEL events. o In ipmi-oem, support Quanta S99Q/Dell FS12-TY OEM commands. o Fix --key-pair parsing bug in all config tools. o Locally support sunbmc driver if bmc_intf.h header not found. o If Sunbmc driver is not supported, report "Device Not Supported" instead of "Internal Error". o Fix error output messages. o Fix Solaris install issue. o Other minor fixes. FreeIPMI 0.8.5 - 04/29/10 ------------------------- o Support Inventec 5442/Dell Xanadu III OEM events. o Workaround Quanta S99Q/Dell FS12-TY Node Busy errors. o Fix some library error checks limiting bmc-config Bad Password Threshold configuration. o Fix some library macro names based on actual OEM names. o Fix documentation typos. FreeIPMI 0.8.4 - 03/05/10 ------------------------- o Fix IPMI 2.0 sequence number wrap around corner case. o Fix ipmi-sensors --comma-separated-output corner case. o In ipmi-sensors, output multiple event strings w/ space delimiter in simple output. o In ipmi-oem, support Dell get-active-lom-status. o In ipmi-oem, support IBM get-led. o In ipmi-sel, fix possible --assume-system-event-records corner case. o Fix Posix portability issue w/ time functions. o Minor documentation updates. FreeIPMI 0.8.3 - 02/02/10 ------------------------- o Support Sun Microsystems OEM SEL events. o Fix Solaris 64 bit portability bugs. o In ipmi-oem, fix some Dell options and output given Dell docs (backwards compatability maintained on options). - Rename 'get-power-headroom-info' to 'get-power-head-room'. o Minor bug fixes. o Minor documentation updates. o Minor documentation fixes. FreeIPMI 0.8.2 - 01/05/10 ------------------------- o Add fixes to deal with OSes that will report ECONNRESET or ECONNREFUSED on failed UDP sends. o In ipmi-sensors, fix output corner case w/ device types and modifiers. o In ipmi-sel, tweak column size to fix output for common scenario. o In ipmi-sel, fix output corner case when --ignore-sdr-cache is specified. o In ipmi-dcmi, handle interpretation issue on --set-power-limit. o In ipmi-dcmi, fix various output bugs. o In ipmi-dcmi, add more detailed error messages. o In ipmi-dcmi, fix command line parsing of --activate-deactivate-power-limit. o Support --interpret-oem-data option in ipmi-dcmi. o In ipmi-oem, fix various Fujitsu ambiguities from the official documentation. o In ipmi-oem, fix various Dell options and output given Dell docs (backwards compatability maintained on options). - Rename 'product-name' to 'platform-model-name' for Dell get-system-info. - Dell get-power-info is now get-power-consumption-data - Dell reset-power-info is now reset-power-consumption-data - Dell get-power-supply-info is now power-supply-info - Include additional output in Dell power-supply-info. - Dell get-instantaneous-power-consumption-info is now get-instantaneous-power-consumption-data. - Support instance number for get-instantaneous-power-consumption-data. - Dell get-average-power-history and get-peak-power-history collapsed into get-power-consumption-statistics. - Support 'min' option for Dell get-power-consumption-statistics. o In ipmi-oem, support additional OEM commands - Dell get-chassis-identify-status - Dell get-system-info 'guid', 'chassis-service-tag', 'chassis-related-service-tag', and 'board-revision' inputs. o In ipmi-sensors, output Entity ID string with "Container Entity ID" and "FRU Entity ID" if string available. o Fix --eliminate corner case when elimination of nodes leads to 0 hosts specified. o Report proper error message when underlying crypt library is incompatible. o In ipmidetectd, support quick port reuse on server setup. o Fix hostrange parsing corner case. o Fix Cygwin portability bugs. o Fix minor output corner cases on sensor units. o Fix header file typing inconsistencies. o Fix header file documentation. o Various documentation updates and fixes. FreeIPMI 0.8.1 - 12/07/09 ------------------------- Tools - High Level Description of Changes ----------------------------------------- o Support ipmi-dcmi, Data Center Management Interface (often referred to as DCM or DCMI). o Make output of ipmi-sel, ipmi-sensors, and ipmimonitoring easier to read and consistent to each other. Under default output, sensors listed in ipmi-sensors and ipmimonitoring are identical. Legacy output is supported through the --legacy-output option. o Rename pef-config to ipmi-pef-config for naming consistency. o Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. o When querying active/inactive, allowed/unallowed, true/false, etc. status fields in ipmi-chassis, bmc-info, and bmc-device, output all fields instead of only the active/allowed/true/etc. fields. o Support exclusion equivalent options (such as --exclude-sensor-types) in various tools such as ipmi-sel, ipmi-sensors, and ipmimonitoring. o Support sensor unit percentages, rates, and modifiers (e.g. "% hit", "gigabyte per minute", "pounds / cu in") in most tools. o Support non-abbreviated units (e.g. "Amps" instead of "A") in most tools. o Output IANA Manufacturer Name when appropriate in most tools. o Support Entity ID based sensor naming through the --entity-sensor-names option in many tools. o Support OEM interpreted output through the --interpret-oem-data option in many tools. o "Library-ize" much of the functionality originally only included in tools. o Re-work libipmimonitoring to return sensor events for all sensors, not just non-threshold sensors. Resulted in an API change. o Removed many short options for more consistent command line "architecture" between tools and to ensure short options are more consistent between tools. Limit short options to only the most popular options. Short options have been removed from ipmipower, ipmiconsole, bmc-watchdog, ipmi-chassis, ipmimonitoring, ipmi-sel, and ipmi-raw. See details below for specific short options removed. o Various new options and features added to most tools. o Various minor feature enhancements. o Various bug fixes. o Various documentation updates. Tools - Detailed Enhancements/Changes/Fixes ------------------------------------------- o ipmi-dcmi - A new tool to support the data center managemen interface (often referred to as DCM or DCMI). o ipmi-sel - Alter output to make fields easier to read, consistent to other tools, and more consistent to IPMI (legacy output option supported). - Use short-message event strings instead of long ones for readability. - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - Support --verbose option to offer verbose and very verbose SEL event information. - Support --display and --display-range options. - Support --exclude-display and --exclude-display-range options. - Support --tail option. - Support --system-event-only and --oem-event-only options. - Support --non-abbreviated-units option to output no abbreviated units (e.g. "Amps" instead of "A"). - Support --entity-sensor-names option. - Support --no-sensor-type-output option. - Support --interpret-oem-data option. - Support Inventec 5441/Dell Xanadu2 OEM SEL records. - Support Dell Poweredge R610 OEM SEL records. - Support Dell Poweredge R710 OEM SEL records. - Support --comma-separated-output option. - Support --no-header-output option. - Rename --delete-all to --clear for consistency to IPMI spec. Backwards compatability maintained. - Output manufacturer name with "Manufacturer ID" if name available. - Support sensor unit percentages, rates and modifiers (e.g. "% hit", "gigabyte per minute", "pounds / cu in"). - Output allocation information with --info if available. - Output hex code more often if translation to string not available. - Output OEM hex codes in consistent format. - Re-work to use new libfreeipmi sel-parse sub library. - Remove legacy option to dump hex output to optional filename. - Removed the following short options (long options remain). - 'c' (--delete-all) - 'd' (--delete) - 'R' (--delete-range) - 'x' (--hex-dump) - Support additional options in FreeIPMI config file. o ipmi-sensors - Alter output to make fields easier to read, consistent to other tools, and more consistent to IPMI (legacy output option supported). - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - For consistency to other tools, outputs of "NA" are now "N/A". - Events are now surrounded by single quotes (') instead of square brackets ([]). - Sensors that can't be read or don't exist (i.e. "N/A", "Unknown") are now *not* surrounded by single quotes (') or square brackets ([]). - Software sensors output "N/A" instead of "Unknown" now. - Globally rename "Group" to "Sensor Type" for correctness to IPMI spec. Leads to rename of --groups option to --sensor-types and --list-groups to --list-sensor-types. Backwards compatability maintained. - Support --non-abbreviated-units option to output no abbreviated units (e.g. "Amps" instead of "A"). - Rename --sensors option to --record-ids. Maintain old options for backwards compatability. - Support --exclude-record-ids option. - Support --exclude-sensor-types option. - Support "all" and "none" inputs for sensor-types and record-ids options. - Support --comma-separated-output option. - Support --no-header-output option. - Support --shared-sensors option. - Support --entity-sensor-names option. - Support --no-sensor-type-output option. - Support --interpret-oem-data option. - Support Dell Poweredge R610 OEM sensors. - Support Dell Poweredge R710 OEM sensors. - Support Supermicro X8DTH OEM sensors. - Do not output Sensor Reading for discrete sensors under verbose mode (because the result is always "N/A"). - Do not output SDR event records type under verbose output, only in very verbose output. - Support sensor unit percentages, rates and modifiers (e.g. "% hit", "gigabyte per minute", "pounds / cu in"). - Output allocation information with --sdr-info if available. - Output Entity ID under verbose instead of very verbose mode. - Under very verbose output, "Sensor Status" is now "Sensor Event". - Under very verbose output, if multiple sensor states are triggered, always output a prefix of "Sensor Event". - Under very verbose output, always output a prefix of "Assertion Event Enabled" or "Deassertion Event Enabled" for assertion and deassertion event listings (changed from a single "Assertion Events Enabled" or "Deassertion Events Enabled"). - Under verbose output, do not output Nominal reading, Normal Min., or Normal Max. if SDR flags do not indicate the values are specified. - Under very verbose output, output Sensor Direction. - Under very verbose output, output Tolerance. - Under very verbose output, output Resolution. - Under very verbose output, output Accuracy. - Under very verbose output, output sensor sharing information. - Under very verbose output, output entity instance type. - Under very verbose output, output OEM bytes in generic device locator records. - Output record-type names in addition to record type hex code in very-verbose output. - Output device-type names and device-modifiers in addition to hex codes in very-verbose output. - Under very verbose output, default to abbreviated units. - Output linearization in hex in verbose outputs. - Output linearization name in verbose outputs. - Output analog data format in hex in verbose outputs. - Output analog data format name in verbose outputs. - Output manufacturer name with "Manufacturer ID" if name available. - Output Entity ID string with "Entity ID" if string available. - Output hex code of sensor type in addition to type name in very-verbose output. - Re-work to use new libfreeipmi sensor-read sub library. - Support additional options in FreeIPMI config file. o ipmimonitoring - Alter output to make fields easier to read, consistent to other tools, and more consistent to IPMI (legacy output option supported). - "Monitoring Status" is now listed as "Sensor State" for consistency to libipmimonitoring library definition. - Sensor events are now output for all sensors. Sensor readings are only output appropriately for non-discrete sensors. - Rename a number of config fields for overall FreeIPMI consistency, may break backwards compatability. - Globally rename "Group" to "Sensor Type" for correctness to IPMI spec. Leads to rename of --groups option to --sensor-types and --list-groups to --list-sensor-types. Backwards compatability maintained. - With default output, output same sensors as listed in ipmi-sensors, including some sensors that can't be interpreted. - Sensors that can't be read or don't exist (i.e. "N/A", "Unknown") are now *not* surrounded by single quotes ('). - A sensor event of "NONE" is now output instead of "OK" if no sensor events are indicated. - Support --exclude-record-ids option. - Support --exclude-sensor-types option. - Support "all" and "none" inputs for sensor-types and record-ids options. - Support --ignore-non-interpretable-sensors option. - Rename --sensors option to --record-ids. Maintain old options for backwards compatability. - Remove --regenerate-sdr-cache legacy option due to conflict with newer option. - Support --non-abbreviated-units option to output no abbreviated units (e.g. "Amps" instead of "A"). - Support --comma-separated-output option. - Support --no-header-output option. - Support --entity-sensor-names option. - Support --no-sensor-type-output option. - Support --interpret-oem-data option. - Support --shared-sensors option. - Utilize libipmimonitoring callback routines to make sensors output as they are read, rather than just at the end. This removes the impression that the tool "hangs" on start. - Fix inconsistency in output, header output of "Record_ID" now "Record ID". - Support additional options in FreeIPMI config file. - Removed the following short options (long options remain). - 'c' (legacy --cache-dir) o ipmi-fru - Output hex with 'h' suffix instead of '0x' prefix for consistency to other FreeIPMI tools. - Output manufacturer name with "Manufacturer ID" if name available. - Do not output string "Info Area", the text is redundant. - Very verbose support removed. - Language codes now output under verbose mode. Language code output as string instead of hex code. - Slightly alter Base/Extended Compatibility Code Mask output for common case. - Support --interpret-oem-data option. - Various output changes under error conditions. - Re-work to use new libfreeipmi fru-parse sub library. - Check for valid device ID inputs. - Support additional options in FreeIPMI config file. o ipmipower - Removed the following short options (long options remain). - 'R' (legacy --ipmi-version) - 'j' (--pulse) - 'm' (--soft) - 'g' (--on-if-off) - 'A' (--wait-until-off) - 'G' (--wait-until-on) - 't' (legacy --session-timeout) - 'y' (legacy --retransmission-timeout) - 'q' (--retransmission--wait-timeout) - 'b' (--retransmission-backoff-count) - 'i' (--ping-interval) - 'z' (--ping-timeout) - 'v' (--ping-packet-count) - 'w' (--ping-percent) - 'x' (--ping-consec-count) o ipmiconsole - Removed the following short options (long options remain). - 'c' (legacy --cipher-suite-id, 'I' support remains) o bmc-device - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - Indicate hex code output consistently with 'h' suffix instead of '0x' prefix. - Support --get-bmc-global-eanbles, --set-system-firmware-version, --set-system-name, --set-primary-operating-system-name, and --set-operating-system-name. o bmc-info - When querying active/inactive, allowed/unallowed, true/false, etc. status fields output all fields instead of only the active/allowed/true/etc. fields. - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - Output GUID by default. - Output system info by default. - Rename --guid to --get-device-guid. Legacy option still supported. - When outputting only the GUID, don't prefix "GUID : " in the output. - Support --get-system-info. - Support --get-channel-info. - Support --get-device-id. - Support --interpret-oem-data option. Do not automatically assume OEM data is correct and output by default. - Output manufacturer name with "Manufacturer ID" if name available. o ipmi-chassis - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - When querying active/inactive, allowed/unallowed, true/false, etc. status fields output all fields instead of only the active/allowed/true/etc. fields. - Output some text more consistently to IPMI specification. - Rename --get-status option to --get-chassis-status. Legacy option still supported. - Rename --get-capabilities option to --get-chassis-capabilities. Legacy option still supported. - Check interval input ranges. - Removed the following short options (long options remain). - 'c' (--get-chassis-capabilities) - 's' (--get-chassis-status) - 'O' (--chassis-control) - 'i' (--chassis-identify) - 'X' (legacy --set-power-restore-policy) - 'S' (legacy --set-power-cycle-interval) - 'R' (--get-system-restart-cause) - 'H' (--get-power-on-hours-counter) - 'G' (legacy --get-boot-flags) - 'L' (legacy --set-boot-flags) o ipmi-raw - Support --channel-number and --slave-address for command bridging. - Removed the following short options (long options remain). - 'f' (--file) o bmc-config - Collapse "Password20" field into "Password" field so "Password" supports both IPMI 1.5 and IPMI 2.0 length passwords. "Password20" still supported as legacy support. - Update to include new BMC Password Threshold configuration. - Support ability to report read only field error. - Support ability to report not supported field error. - Support additional options in FreeIPMI config file. o ipmi-chassis-config - Update to include new configurable boot options in IPMI errata. - Update to include new device instance selector in IPMI errata. - Support ability to report read only field error. - Support ability to report not supported field error. - Support additional options in FreeIPMI config file. o ipmi-sensors-config - Support sensor unit percentages, rates and modifiers (e.g. "% hit", "gigabyte per minute", "pounds / cu in"). - Support ability to report read only field error. - Support ability to report not supported field error. - Support additional options in FreeIPMI config file. o ipmi-pef-config/pef-config - Rename pef-config to ipmi-pef-config for consistency to other tools. Keep backwards compatability with symlinks and such. - Make output of ipmi-chassis, bmc-info, bmc-device, and info output of ipmi-sel, ipmi-sensors, and ipmi-pef-config consistent to each other. - Support workaround for Alert Policy config on Fujitsu motherboards. - Support ability to report read only field error. - Support ability to report not supported field error. - Support additional options in FreeIPMI config file. o ipmi-oem - Support common 'list' command to all OEM IDs. - If user does not input OEM ID, list OEM IDs and Commands. - If user does not input OEM command, list OEM commands for a particular OEM ID. - Add additional Dell OEM commands. - Add additional Inventec OEM commands. - Add additional Sun OEM commands. - Rename "get/set-nic-status" as "get/set-nic-mode" to meet vendor doc naming. Backwards compatability included. o bmc-watchdog - Removed the following short options. - 'h' (legacy -?) - 'H' (legacy -?) o Make init scripts LSB compliant. o Various documentation updates. Libraries --------- o libfreeipmi - Add new fru-parse sub library. - Add new sdr-parse sub library. - Add new sel-parse sub library. - Add new sensor-read sub library. - Add dcmi support. - The locate sub library now uses a context style API for consistency to the rest of libfreeipmi. - Re-architect all 'unassemble' functions to return 1 if packet fully and correctly parsed, 0 if not, and -1 on error. - Support SDR sensor sharing in sdr-cache library. - Collapse all BAD_COMPLETION_CODE variant errors into single BAD_COMPLETION_CODE error. - New 'ipmi_ctx_find_inband' call to find an inband device. - New freeipmi/template/ files to document fiid fields for fiid templates. - New error code IPMI_ERR_NOT_FOUND in libfreeipmi API sub library supported. - Add a number of 'errormsg' functions so common code of foo_strerror(foo_errnum(ctx)) can be condensed to foo_errormsg(ctx). - Add 'ipmb' raw functions. - Various API cleanup. - Return int instead of int8_t or int32_t consistently. - Pass unsigned int instead of uint32_t for buffer lengths. - Fix function naming inconsistencies. - Fix API inconsistencies. - Appropriately indicate const pointers in parameters. - Make buffers void * instead of uint8_t * consistently. - Various fixes to maintain consistency between sub library APIs. - Add IANA Enterprise Numbers definitions. - Add Entity IDs definitions. - Remove IPMI_ERR_LIBRARY_ERROR errnum. Use IPMI_ERR_INTERNAL_ERROR errnum instead. - IPMI_*CTX_ERR* renamed to IPMI_*ERR* for consistency throughout. - The fiid sub library now includes wrapper functions for a number of fiid library functions. - Suppot FIID_FIELD_MAKES_PACKET_SUFFICIENT fiid field flags and new functions. - Support ipmi_sensor_units_string utility function to support units, percentages, rates, and units modifiers (e.g. "% hit", "gigabyte per minute", "pounds / cu in"). - Properly handle int/unsigned int potential overflow conditions. - Fix several sensor units abbreviations. - More detailed KCS and SSIF debug output with header information. - Always output debug key fields (e.g. 'raw_data' from ipmi-raw) in byte array format instead of an integer even if the field length is < 64 bits. - Update various macros, fields, etc. for IPMI errata updates. - Support 'session_handle' in close session packets (IPMI errata 387). Results in API change for all close session packet calls. - Support 'device instance locator' in chassis boot configuration. Results in API change. - Support 'change_bits' flag in Set User Access. Results in API change. - Remove duplicate sensor number checks in sdr-cache sub library, which was invalid b/c of potential duplicate generator ids. - Collapse v1.5 and v2.0 "Get Authentication Capabilities" templates, functions, etc. into one. Results in API change. - Collapse v1.5 and v2.0 "Set User Password" templates, functions, etc. into one. Results in API change. o libipmimonitoring - Support callback functions in API to monitor sensors as they are read/analyzed instead of after all sensors have been read/analyzed. - Support new function ipmi_monitoring_read_sensor_bitmask() to read bitmask of each sensor. - Add IPMI_MONITORING_SENSOR_BITMASK_TYPE_THRESHOLD bitmask type. - Remove IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER16_BITMASK sensor reading type. Every sensor technically has a bitmask, but not all sensors have a sensor reading. - Rename IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_UNREADABLE_SENSORS to IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS. Legacy macro still supported. - Add IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA flag. - Add IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS flag. - Rename a number of macros for overall FreeIPMI consistency, may break backwards compatability. - Globally rename "Group" to "Sensor Type" for correctness to IPMI spec. - Update various macros, fields, config, etc. for IPMI errata updates. - Variety of API functions reworked or renamed for new functionality. Will require recompile and rework in existing code. Contributions ------------- o Update Ganglia and Nagios plugins for changes in ipmi-sensors and ipmimonitoring. FreeIPMI 0.7.16 - 11/30/09 -------------------------- o In ipmi-oem, add additional Fujitsu OEM support. o Fix portability to kfreebsd. FreeIPMI 0.7.15 - 11/19/09 -------------------------- o Add "solstatus" workaround to ipmiconsole. o Support hex codes to event filter sensor type inputs in pef-config. o In ipmiconsole, handle corner cases surrounding non-default SOL ports more cleanly. o In ipmi-oem, support Fujitsu OEM commands. o Document workarounds for additional motherboards. FreeIPMI 0.7.14 - 10/16/09 -------------------------- o Fix consolidated-output corner cases. FreeIPMI 0.7.13 - 09/30/09 -------------------------- o Support --platform-event in bmc-device. o Support read/clear eeprom in ipmi-oem. o Fix corner case in system firmware progress error data2 output. o Fix documentation typos. FreeIPMI 0.7.12 - 09/08/09 -------------------------- o In bmc-config, fix SOL config corner case. Assume LAN channel if SOL channel cannot be read. o In bmc-config, configure Password before Enable_User by default for security. o Add SDR reading/loading workarounds for Fujitsu RX 100 motherboards. o Add --assume-system-event-records to ipmi-sel to workaround HP DL 380 G5 motherboards. o In bmc-config, add workarounds for Dell Poweredge servers. o In ipmi-oem, support additional Dell Poweredge OEM commands. o In ipmi-oem, support additional Supermicro OEM commands. o Document workarounds necessary for newer Supermicro motherboards. o Fix several error output corner cases. FreeIPMI 0.7.11 - 07/28/09 -------------------------- o In ipmi-fru, fix FRU output corner cases. o In ipmi-oem, support Dell poweredge, Dell Xanadu2, and new Inventec OEM commands. o In ipmi-sensors and ipmimonitoring, continue reading sensors after a "request parameter not supported" error. o In libfreeipmi, support Get System Information parameters command. o Support --without-encryption build option . o Do not require execute permissions on driver devices. o Fix portability for some embedded systems. FreeIPMI 0.7.10 - 06/16/09 -------------------------- o In all tools, properly deal with workaround flags when specifying different devices than what workaround flags are intended for. o In bmc-config, fix bug setting volatile vs. non-volatile settings. o Fix in-band probing priority ordering to fix issues with machines that support multiple drivers. o In ipmi-sensors and ipmimonitoring, continue reading sensors after a "command response cannot be provided" error. o Add additional workaround handling into Sun 2.0 workaround. o In ipmimonitoring, fix sunbmc driver interface bug. o In ipmiconsole, consider IPMICONSOLE_ERR_BMC_IMPLEMENTATION a non-fatal error. o Update workaround documentation with additional motherboards. FreeIPMI 0.7.9 - 05/15/09 ------------------------- o In bmc-config, fix diff check for "Password20" field. o In ipmi-fru, fix various output typoes and output errors. - Output "Product Name" instead of "Product Product Name". - Output "FRU Chassis Type" instead of "Chassis Type". - Output "Version" instead of "Version Type". - Fix invalid DC Output and DC Load voltage outputs. mV multiplier of 10 was previously not factored in. o In ipmi-chassis, fix chassis-identify parameter parsing bug. o In ipmi-chassis, fix output corner cases. o In ipmipower, support identify-on, identify-off, identify-status in interactive mode. o In ipmipower, fix closing session corner case bug. o Update ipmi-oem manpage with extra information. o Fix bmc-device --get-mca-auxiliary-log-status bug. o Fix debug output corner case in ipmi-oem. o Fix glibc 2.8 portability bug with ipmi-raw. o Fix freeipmi.conf comment typos. FreeIPMI 0.7.8 - 04/10/09 ------------------------- o Support and document Inventec 5441 workarounds. Most notably, added "opensesspriv" workaround to tools and OPEN_SESSION_PRIVILEGE workaround to libraries. o In ipmi-fru, do not fail on invalid chassis info area type, output that type is unknown and continue to parse area. o In bmc-info, output device ID, manufacturer ID, and product ID as integers, not hex. o Fix glibc 2.8 compile bug. FreeIPMI 0.7.7 - 04/03/09 ------------------------- o Support inventec get-nic-status, set-nic-status, get-mac-address, and set-mac-address OEM commands in ipmi-oem. o Make default privilege level ADMIN for ipmi-oem. o In bmc-info, output both chars of firmware minor revision (i.e. 1.01 instead of 1.1). o Fix libfreeipmi field validity checks for sensor units. o Support "oem_reserved" group input to ipmi-sensors. o Fix Solaris porting bugs. o Fix potential config file bug by clearing out stack data appropriatly. o Support build option (--with-dont-check-for-root) to not have tools check for root for in-band IPMI communication. Permission checks are subsequently dealt with at underlying system calls and drivers. (i.e. open() on /dev/ipmi0). o Update bmc-config manpage with Dell specific workaround. o Remove "experimental" note from SUNBMC driver documentation. FreeIPMI 0.7.6 - 02/25/09 ------------------------- o In ipmimonitoring, output sensor group names consistently to other tools: "Cable Interconnect" -> "Cable/Interconnect" "Slot Connector" -> "Slot/Connector" "Module Board" -> "Module/Board" o In ipmi-sensors, don't output threshold related fields for non-threshold sensors in verbose modes. o In bmc-config, ipmi-chassis-config, ipmi-sensors, ipmi-sensors-config, ipmimonitoring, and pef-config, support --config-file option. o In ipmi-chassis-config, fix typo of "FLOOPY" to "FLOPPY". o In ipmi-sensors-config, fix event bit bug in which assertion events were configured for deassertion events. o Fix bmc-watchdog init script portability to Suse. o Update ipmi-sel manpage. FreeIPMI 0.7.5 - 01/12/09 ------------------------- o In ipmi-fru, do not output error messages for FRU entries that do not exist on a motherboard. o In ipmi-sel, fix SEL message output corner case. o In ipmi-sel, ipmi-sensors, and ipmimonitoring, check that inputted record IDs are not illegal record ID values. o In bmc-config, fix "Enable_User" checkout corner case bug. o Fix/clarify minor documentation typos/wording. FreeIPMI 0.7.4 - 12/15/08 ------------------------- o Change -I short option (for --chassis-identify) to -i in ipmi-chassis to avoid conflicting short option with -I (for --cipher-suite-id). o Support output of "" in bmc-config for fields that require a username to be configured before data may be read/written. o Support supermicro reset-intrusion OEM ID and command in ipmi-oem. o Support --list option in ipmi-oem. o Output checksum errors by default in ipmi-fru. o Fix ipmipower/ipmiconsole corner case bugs for IPMI 2.0 with certain cipher suite IDs. o Fix bmc-config Enable_User workaround bug. o Fix Intel IPMI 2.0 workarounds in all tools/libraries. o Fix state machine cycle corner case in ipmiconsole/libipmiconsole. o Fix Suse build issue in spec file. o Fix glibc 2.8 build issues. o Fix/clarify minor documentation typos/wording. FreeIPMI 0.7.3 - 12/01/08 ------------------------- o Add workaround into ipmi-sensors and ipmi-sensors-config for motherboards that do not support the Get Sensor Thresholds command. o Output 'NA' on sensors in ipmi-sensors and ipmimonitoring that have sensor scanning disabled. In libipmimonitoring, appropriately handle sensors with sensor scanning disabled and return 'unreadable sensor'. o Add the following ipmimonitoring/libipmimonitoring interpretations. Power Unit Device Installation Fan Transition Availability Power Supply State Drive Slot State Drive Slot Predictive Failure System ACPI Power State Button Switch Button Switch State Entity Presence Device Install Processor State o Fix typos in macro names and string names for sensor types to accurately coincide with IPMI specification. May lead to slightly different inputs/outputs in ipmi-sensors and pef-config. Altered strings include: "Platform Chassis Intrusion" -> "Physical Security" "Platform Security Violation" -> "Platform Security Violation Attempt" "Post Memory Resize" -> "POST Memory Resize" "System Firmware" -> "System Firmware Progress" "Button" -> "Button/Switch" "Microcontroller" -> "Microcontroller/Coprocessor" "Cable Interconnect" -> "Cable/Interconnect" "Slot Connector" -> "Slot/Connector" "ACPI Power State" -> "System ACPI Power State" "Monitor Asic" -> "Monitor ASIC/IC" o Fix ipmi-sensors non-recoverable threshold output corner case. o Fix ipmi-sensors group selection corner cases. o Fix ipmiconsole workarounds command line parse corner case. o Fix ipmi-sel/libfreeipmi event data output corner cases. o Use a reservation ID on all SEL entry operations to workaround some manufacturer compliance issues. o Fix config option names in ipmimonitoring/libipmimonitoring. o Add forgotten bitmask flags in libipmimonitoring. o In ipmi-sensors default output, output non-recoverable or non-critical thresholds if both non-critical thresholds are not available. o Remove unused libfreeipmi workaround flags/macros. Contain tool specific workaround flags within tools. o Optionally output auxiliary information in bmc-info. o Add ipmi_monitoring_sensors.conf.5 manpage. o Various documentation updates. FreeIPMI 0.7.2 - 11/18/08 ------------------------- o Add Sensor Owner ID output to verbose and very verbose output in ipmi-sensors. Alter previous ipmi-sensors output of slave address and system software id to deal with slave address/system software ID vs. sensor owner ID semantics. o Fix ipmi-raw cmdline parsing corner case. o Fix/clarify documentation. FreeIPMI 0.7.1 - 11/07/08 ------------------------- Tools - New Significant Additions/Features ------------------------------------------ o Add new tool ipmi-chassis-config for chassis configuration, such as boot device and power restore policy configuration. o Add new tool bmc-device to support advanced BMC commands including cold reset, warm reset, setting BMC times, and more. o Support FreeIPMI configuration file for most tools (bmc-config, bmc-info, bmc-device, bmc-watchdog, ipmi-chassis, ipmi-chassis-config, ipmi-fru, ipmi-oem, ipmi-raw, ipmi-sel, ipmi-sensors, ipmi-sensors-config, ipmiconsole, ipmimonitoring, ipmipower, pef-config) to avoid typing common options on the command line. See freeipmi.conf(5) for more information. o Add hostrange support to all config tools (bmc-config, pef-config, ipmi-sensors-config, ipmi-chassis-config) to support parallel configuration on a cluster. o Support --bridge-sensors in ipmi-sensors and ipmimonitoring to access non-BMC owned sensors (experimental). o Support --sensor-config-file on ipmimonitoring to support alternate interpretation rules. o Add additional "connection timeout" error message to tools to differentiate between no IPMI communication at all vs. session timeout in the middle of a command's operations. o Support hysteresis and sensor event configuration in ipmi-sensors-config. o Support additional sensor monitoring interpretations in ipmimonitoring. o Output additional sensor information in ipmi-sensors under verbose modes, such as lun, channel and event enable information. o Support --always-prefix option in most tools for easier scripting. o Support --sdr-cache-recreate in all SDR related tools for easier scripting. o Support --guid option in bmc-info to retrieve global ID (guid). o Support "SUNBMC" in-band driver for Solaris (experimental). Please see README.sunbmc for compilation instructions. Tools - Enhancements/Changes/Bug Fixes -------------------------------------- o Global in most tools - Rename --no-probing option to --disable-auto-probe for consistency in FreeIPMI. Backwards compatability maintained. o Global in config tools (bmc-config, pef-config, ipmi-sensors-config) - More carefully check for fatal vs. non-fatal errors when performing configuration. This change may result in slight behavior differences. For example, a session-timeout may have previously been considered a non-fatal error, making the config tools continue on attempting more configuration activities. Now, it would error out on the first session-timeout indication. o ipmi-sensors - Check variety of corner cases such as whether sensor readings, hysteresis, thresholds, etc. are even available before reading them. Some sensors may output slightly different information than before. For example, suppose a power supply sensor exists for a power supply that is not installed. If the sensor is enabled on the motherboard, ipmi-sensors would likely report "OK". If the sensor is disabled on the motherboard, ipmi-sensors would now likely report "NA". Previously, "OK" would have been reported under both conditions. - Output "NA" for sensors whose slave addresses are not the BMC. - Output "Unknown" for sensors whose readings cannot be determined. - Output multiple sensor status messages on separate lines, rather than all on one line under verbose modes. - Output "Unrecognized State" if the sensor specifies a state that is unrecognized. - Busy sensors are now output with "Unknown" instead of causing errors. - When fields are not relevant, do not output as much information in verbose and very verbose mode. For example, don't output hysteresis or threshold information for power supply sensors. - Alter some output ordering for consistency to IPMI spec. - Shorten/adjust some state strings for readability under non-verbose output. For example, "Fully Redundant (formerly "Redundancy Regained")" is now just "Fully Redundant". - Change default privilege from user to operator. o ipmimonitoring - Support -v verbose option to output sensors readings that aren't readable. - Check corner case for sensor readability. May lead to slightly different output in ipmimonitoring. For example, suppose a power supply sensor exists for a power supply that is not installed. If the sensor is enabled on the motherboard, ipmimonitoring would normally report "Nominal". If the sensor is disabled on the motherboard, ipmimonitoring would normally not output a sensor state (it would output "N/A" under verbose mode). Previously, "Nominal" would have been reported under both conditions. - Consider sensors without BMC slave addresses unreadable. May result in sensors not being output like before. - Busy sensors may result in sensors not being output rather than causing errors. - Output "Unrecognized State" if the sensor specifies a state that is unrecognized. - Output multiple bitmask strings if multiple bits are set. - Output "OK", similarly to ipmi-sensors when no bitmask strings are returned from a sensor reading. - Shorten/adjust some state strings for readability. For example, "Fully Redundant (formerly "Redundancy Regained")" is now just "Fully Redundant". - Change default privilege from user to operator. o ipmipower - Removed many early experimental features from ipmipower so ipmipower is more like other tools. Removed ipmi-version, cipher-suite-id, privilege-level, and authentication-type auto discovery. Removed ability to enable/disable a number of experimental features. - Changed --config to --config-file in ipmipower for consistency to other tools. Backwards compatability maintiained. - Replace --ipmi-version option with --driver-type. Backwards compatability maintained. - Removed hostname config file option. Require users to always input atleast hostname. - Changed primary config file to /etc/freeipmi.conf. Legacy config file searched for and still supported. - Prefixed config file options with 'ipmipower' for consistency to new global FreeIPMI config file. Old options still supported. o bmc-config - Support configuration of UserN:Lan_Session_Limit and UserN:Serial_Session_Limit (where N is a user id number). - By default, do not output unsupported authentication type enables when checking out the Lan_Conf_Auth section. Output unsupported authentication type enables under verbose output. - By default, do not output serial configuration parameters on checkout. Output serial configuration under verbose output. - Remove checkout of "Misc" section and "Power_Restore_Policy" field, which is now handled by ipmi-chassis-config. Backwards compatability commit and diff maintained. - Remove case sensitivity when checking a number of fields. o ipmi-chassis - Alter ipmi-chassis output to print "unknown" when field is not known. - Alter some ipmi-chassis output text to be more consistent to IPMI spec. - Hide configuration options now supported in ipmi-chassis-config. o ipmi-fru - Output FRU device names along with IDs in ipmi-fru. - Reduce excessive newline outputs in ipmi-fru. - Output more information by default. Change the output of verbose vs. very verbose output. o ipmi-sel - Change default privilege from user to operator. - Search of SDR records by sensor number and sensor owner id. - Support SEL Event Record debug dumping. o ipmiconsole - Support --session-timeout and --retransmission-timeout options. - Removed -C short option for consistency to other tools. - Removed hostname config file option. Require users to always input atleast hostname. - Changed primary config file to /etc/freeipmi.conf. Legacy config file searched for and still supported. - Prefixed config file options with 'ipmiconsole' for consistency to new global FreeIPMI config file. Old options still supported. o bmc-watchdog - Remove legacy 'v' option for version. Libraries --------- o libfreeipmi - Add additional IPMI commands. - Support new "connection timeout" error message. - Support new "command invalid for selected interface" error message. - Support ipmb bridging in KCS, OPENIPMI, LAN, and LAN_2_0 interfaces. - Check for additional corner cases in fiid API. - Support SUNBMC driver. o libipmimonitoring - Support new "connection timeout" error message. - Handle variety of corner case situations better, such as dealing with sensor readings that are unavailable. - Provide more information to user on unreadable/uninterpretable sensor readings. - Support SUNBMC driver. - Provide new IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS flag. - Support several new sensor interpretation rules. - Return short message strings in ipmi_monitoring_bitmask_string(). o Various naming consistency fixes to IPMI specification. o Various minor bug fixes. Contributions ------------- o Ganglia plugin scripts ganglia_ipmimonitoring.pl and ganglia_ipmi_sensors.pl. o Nagios plugin script nagios_ipmimonitoring.pl. FreeIPMI 0.6.10 - 10/13/08 -------------------------- o Fix ipmi-fru FRU parsing corner case. FreeIPMI 0.6.9 - 09/26/08 ------------------------- o Handle ipmiconsole/libipmiconsole non-default port corner cases. o Fix --debug portability. o Document new workarounds. FreeIPMI 0.6.8 - 09/22/08 ------------------------- o Handle "invalid parameters" error codes in ipmi-sensors and ipmimonitoring/libipmimonitoring to work around some motherboards. o Fix bug in ipmimonitoring sensors configuration file parsing. o Fix corner case in libipmimonitoring sdr-cache filename creation. o Fix config tool exit code corner case. FreeIPMI 0.6.7 - 09/11/08 ------------------------- o Handle "illegal sensor" error code in ipmi-sensors and ipmimonitoring/libipmimonitoring. FreeIPMI 0.6.6 - 08/26/08 ------------------------- o Output NA/Unknown for non-BMC owned sensors in ipmi-sensors. o Do not output readings for non-BMC owned sensors in ipmimonitoring. o libfreeipmi/ipmi-chassis fix invalid console redirection input check. FreeIPMI 0.6.5 - 08/02/08 ------------------------- o Fix ipmimonitoring group assignment bug. o Fix several invalid error outputs. o Fix several minor bugs. o Minor documentation cleanup. FreeIPMI 0.6.4 - 06/04/08 ------------------------- o Do not exit ipmi-sensors or ipmimonitoring for sensors that return "sensor data not present" errors. Output "NA", "Unknown", skip sensor output, etc. as needed. o Fix bug in ipmi-sensors and ipmimonitoring when dealing with optional sensor state assertions after a sensor read. o Fix bug in ipmi-sensors and ipmimonitoring when dealing with reserved fields in sensor state assertions after a sensor read. o Add workaround in ipmi-sensors and ipmimonitoring when dealing with sensors that improperly report sensor assertions after a sensor read (i.e. no assertions set when required, or invalid assertions set). o Fix minor corner cases. o Fix manpage typos. FreeIPMI 0.6.3 - 05/27/08 ------------------------- o Fix --eliminate option in ipmipower. o Fix --quiet-cache option to work with flushing cache. o Fix ipmi-sensors-config flush cache corner case. o Fix ipmi-fru output corner case. o Fix workarounds parsing bug. o Fix/clarify various manpage text. FreeIPMI 0.6.2 - 05/15/08 ------------------------- o Fix ipmi-fru output corner cases. o Fix ipmi-chassis boot-device configuration bug. o Fix ipmiconsole config file parsing corner case. o Fix ipmipower max password length corner case check. o Fix command line parsing error messages. o Remove excess error output messages. o Add missing manpage option listings. FreeIPMI 0.6.1 - 04/27/08 ------------------------- For Users --------- o Add new tool ipmi-sensors-config. o Add new tool ipmi-oem. o Support --groups (plural) for multiple groups listing in ipmi-sensors. Older --group (non-plural) option maintained for backwards compatability. o Support --list-groups and --flush in ipmimonitoring for consistency to ipmi-sensors. o Change --cache-dir to --sdr-cache-dir in ipmimonitoring for consistency to ipmi-sensors. o Change short option -f option to -n in pef-config and bmc-config for consistency to ipmi-sensors-config. The -f option is maintained for backwards compatability. o Support -e (--escape-char) for alternate escape character in ipmiconsole. o Change --wait-until-off short option from -B to -G. o Support -B in ipmipower for consistency to other tools, although -B offers no purpose in ipmipower. o Support -F in ipmipower for consistency to other tools. o Enhanced speed of ipmi-fru, by skipping unnecessary FRU data reads. o SSIF Inband driver will timeout after a certain period of time. o Support additional sensor monitoring interpretations in ipmimonitoring. o Provide more detailed error messages in config tools. o Support shared SDR caches for ipmi-sensors, ipmi-fru, ipmi-sel, ipmi-sensors-config, and ipmimonitoring. (libipmimonitoring will still use a different default cache directory.) This will require a new cache generation for these tools. o Support driver-type options for ipmipower ipmi version option. o Modified SDR caching output messages in ipmi-sensors, ipmi-sel, ipmi-fru, ipmi-sensors-config and ipmimonitoring to provide more useful information. o In ipmi-sensors, updated SDR output under verbose and very verbose output modes with: o More IPMI compliant field names. For example, 'Sensor Name' has been replaced with 'ID String'. o More correct output. For example, 'NA' will be output instead of '0.0' when a value is not truly available. Fields that don't exist will not have a default output. o Fix incorrect hysterisis calculation and output. o Fix incorrect OEM data output. o Support more SDR record types for output. o Output more SDR record information in general. o Added new freeipmi(7) and libfreeipmi(3) manpages. o Various other bug fixes, documentation fixes, and enhancements. For Developers -------------- o Many libfreeipmi API changes. Not counting specific tool changes listed above, these API changes should not affect FreeIPMI user tools. o locate/probing API revamped. o SMIC driver/api removed. o 'udm' renamed to 'api' globally. o 'ipmi_device_t' device context renamed to 'ipmi_ctx_t'. o New sdr-caching library added. o Code re-organized into subdirectories. o New header files for more ipmi spec subsections added. o Support new 'ipmi_monitoring_sdr_cache_filenames' function in libipmimonitoring. o Support IPMI_MONITORING_SENSOR_UNITS_WATTS sensor units in libipmimonitoring. o Store SDR with different format for ipmi-sensors, ipmi-fru, ipmi-sel, and ipmi-sensors-config, ipmimonitoring/libipmimonitoring for easier future extensibility. o Packet names added to IPMI dump outputs in all tools for easier packet identification in debugging. o Make IPMI dump outputs consistent across all tools. o Support driver timeout error codes in all drivers and APIs. o SDR record dumping added into all tools. o Various other bug fixes and enhancements. FreeIPMI 0.5.6 - 03/27/08 ------------------------- o Fix bmc-watchdog probing corner case. o Fix bmc-watchdog openipmi corner case. FreeIPMI 0.5.5 - 02/25/08 ------------------------- o Fix bmc-info firmware and IPMI version output. o Fix Sun endian bug workaround. o Fix FRU data output corner cases. o Fix workaround documentation. FreeIPMI 0.5.4 - 02/07/08 ------------------------- o Output addresses in hex in ipmi-locate. o Clarify device addresses in manpages. o Support --ignore-sdr-cache option in ipmi-sel and ipmi-fru. o Minor SDR caching bug fixes. o Minor ipmimonitoring corner case fixes. o Various SSIF corner case fixes. FreeIPMI 0.5.3 - 01/02/08 ------------------------- o Fix minor ipmimonitoring command line option combination bugs. o Fix several minor corner cases in ipmi-sel, ipmi-sensors, and ipmimonitoring. o Fix corner case in all tools by recognizing 127.0.0.1 as the same as localhost. o Fix documentation/manpage text/typos. FreeIPMI 0.5.2 - 12/21/07 ------------------------- o Clarify "Password Verification Timeout" troubleshooting information. o Fix ipmipower cmdline parse bug. o Support suffixes in hostrange inputs. FreeIPMI 0.5.1 - 12/07/07 ------------------------- For Users --------- o Added previously missing IPMI 2.0 (-D LAN_2_0) support into ipmi-chassis, ipmi-fru, ipmi-sensors, ipmi-sel, ipmi-raw, and ipmimonitoring. o Added more strict IPMI over LAN implementation into ipmi-chassis, ipmi-fru, ipmi-sensors, ipmi-sel, ipmi-raw, and ipmimonitoring. o OpenIPMI and KCS Inband drivers will timeout after a certain period of time, so tools will no longer hang if the BMC is non-functional. o Ported IPMI compliance workarounds from ipmipower, ipmiconsole, and ipmimonitoring into ipmi-chassis, ipmi-fru, ipmi-sensors, ipmi-sel, and ipmi-raw. o Updated all manpages with more instructions, information, examples, and trouble shooting tips. o Support --debug option under the non-debug builds. o Rewrote error messages to provide more accurate descriptions. o Removed CALLBACK and OEM privilege capabilities in most tools. o Removed the quiet and silent options from bmc-config. o Added openipmi driver to bmc-watchdog. o Added keypair command line support to pef-config. o Removed bmc-autoconfig tool. o Added more details comments and instructions to bmc-config checkout. o Converted ipmiconsole, ipmipower, and ipmimonitoring to use argp instead of getopt for consistency of usage output. o Re-word "ASUS 2.0" workaround into generic "IGNORE SOL PAYLOAD SIZE" workaround. o Support new "IGNORE SOL PORT" workaround. o Made many command line options, interactive prompt, and config file options consistent across FreeIPMI tools. Inconsistencies between dashes and underscores have been fixed in a number of places. Backwards compatability has been maintained when possible. Notable changes include: o --priv-level and --privilege options are now --privilege-level. o --auth-type options are now --authentication-type. o --reg-space or --register-space options are now --register-spacing. o --hostnames (plural) is now --hostname (not-plural). o --timeout is now --session-timeout. o --retry is now --retransmission. o All tools now use -W (--workarounds) to specify workarounds. o The "plain" authentication type is now the "straight_password_key" authentication type. o The short option -r for --register-spacing has been removed for consistency with other command line options. o Short options for most debugging options have been removed. o All -H and -h (help) options have been changed to -? for consistency in all tools. o All -v (version) options have been changed to -V for consistency with all tools. o The -T option and -I option in ipmipower have been flipped for consistency with other tools. o The -c option in ipmiconsole is now the -I option for consistency with other tools. o Short option -I changed to -D in bmc-watchdog for consistency with other tools. o The -i option in bmc-config is now the -c option. o The -k option in bmc-config and pef-config is now the -e option. o Various other minor bug fixes and enhancements. For Developers -------------- o Added IPMI 2.0 into UDM. o Added workaround support into UDM for IPMI 1.5 and IPMI 2.0. o Added IPMI 2.0 into the libipmimonitoring API. o Added scalability fixes into libipmiconsole for Conman. o Fix various library variable names and macros for consistency. Notable changes. 1) ipmi_ver_minor and ipmi_ver_major in struct ipmi_locate_info have been renamed to ipmi_version_minor and ipmi_version_major. 2) reg_space/register_space have been renamed to register_spacing globally. 3) privilege has been replaced to privilege_level globally. 4) Various library error codes have been renamed for consistency for error codes in other libraries. For example OUTMEM has been changed to OUT_OF_MEMORY globally. 5) Various error codes and messages have been renamed/redone to give more useful information. For example, IPMI_ERR_PRIVILEGE is now IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED and the error message has been updated appropriately. o Various bug fixes and enhancements. FreeIPMI 0.4.6 - 10/11/07 ------------------------- o Fix sdr cache corruption bug. FreeIPMI 0.4.5 - 10/02/07 ------------------------- o Fix command line parse issue in ipmidetect. o Fix rpm daemon install scripts for ipmidetectd. FreeIPMI 0.4.4 - 09/19/07 ------------------------- o Alter userncame-capabilities workaround to authentication-capabilities workaronds to cover more situations. o Fix libipmiconsole new console port corner case. o Fix manpage typos. FreeIPMI 0.4.3 - 08/14/07 ------------------------- o Add ASUS P5M2 workarounds in ipmipower, ipmiconsole, and ipmimonitoring. o Fix bad input assert corner cases. o Fix non-default install bug. o Fix range check in bmc-config SOL config that was inconsistent with IPMI spec. o Fix ipmipower config file logic bug. o Fix ipmipower config output logic bug. o Fix potential pre-processor compile bug. o Fix manpage typos. o Fix error output messages in bmc-config. o Fix legacy config option issues. o Fix usage help in ipmiconsole. FreeIPMI 0.4.2 - 08/02/07 ------------------------- o ipmimonitoring: Fixed free bug that can cause segfaults. o Fix SLES packaging issue. FreeIPMI 0.4.1 - 07/26/07 ------------------------- For Users --------- o Added hostrange support to ipmi-sensors, ipmi-sel, ipmi-raw, and bmc-info o Added ipmimonitoring o Added ipmidetect o Added pef-config o Added ipmi-chassis o Added ipmi-fru o Added -T option to ipmiconsole. o Re-architected workarounds options for Ipmipower due to increasing number of vendor specific workarounds implemented. -W, -S, -Z, -X, -Y options removed. New -W option implemented. o Adjust ipmipower options to follow hostrange convention of other tools. o -Q option added for ipmi-sensors and ipmi-sel. o -q option added for ipmi-sensors. o Add verbose checkout/commit progress information for large checkout(s)/commit(s). o Add sensor names to ipmi-sel output when possible. o Output more descriptive error messages in most FreeIPMI tools. o '0x' parsing support in ipmi-raw. o Sun IPMI 2.0 workarounds in ipmipower and ipmiconsole. o Various bug fixes throughout FreeIPMI. For Developers -------------- o Added SDR debugging capabilities to ipmi-sdr and ipmi-sensors. o Added libipmimonitoring o Added libipmidetect o Additional IPMI sub section support in libfreeipmi. o Re-architected UDM for more descriptive error codes. o Various bug fixes/performance fixes to libipmiconsole, libfreeipmi. FreeIPMI 0.3.3 - 05/05/07 ------------------------- o Support per-msg-auth in LAN udm and majority of FreeIPMI tools. o Support hex k-g input/output. o Fix ipmipower per-msg-auth. o Fix ipmiconsole k_g key corner case. o Fix libipmiconsole state machine corner case. o Fix OpenIPMI driver build bug. o Fix strdup corner case in bmc-config. o Allow OEM network functions. FreeIPMI 0.3.2 - 03/29/07 ------------------------- o -N option added to ipmiconsole. o -L option added to ipmiconsole. o -K option added to ipmipower and ipmiconsole. o -P option replaced w/ -W option in ipmipower. o -P option added to most tools. o Fix seg-fault in ipmiconsole. o Fix various bugs in in libipmiconsole and ipmiconsole. o Fix secure malloc bug. FreeIPMI 0.3.1 - 12/18/06 ------------------------- o FreeBSD Support o libfreeipmi: Header file include/C++ fixes. o ipmi-sensors, ipmi-sel: Fix SDR cache creation bug for /tmp. o ipmi-sensors: Fix SDR parsing corner case bugs. o ipmipower, ipmiconsole: Fix mem-leak possibility. FreeIPMI 0.3.0 - 11/13/06 ------------------------- For Users --------- o Added ipmiconsole. o IPMI 2.0 connection support added to ipmipower. o IPMI 2.0 ping support added to ipmiping. o IPMI 2.0 and Serial-Over-LAN (SOL) configuration added to bmc-config. o Added sectional input/output support to bmc-config (--listsections and --section options). o Added OpenIPMI driver support to bmc-info, ipmi-raw, ipmi-sel, ipmi-sensors. o ipmi-raw raw input/output style change to support luns and network functions. o bmc-info, ipmi-raw, ipmi-sel, ipmi-sensors out-of-band communication made more reliable. o Sensor reading added to ipmi-sel for better output o Intel 2.0 workarounds added to ipmipower. o Supermicro 2.0 workarounds added to ipmipower. o --wait-until-on, --wait-until-off, --retry-wait-timeout options added to ipmipower. o --delete-range option added to ipmi-sel o --flush-cache option added to ipmi-sel. o --sdr-cache-directory option added to ipmi-sel and ipmi-sensors. o Removed fish o Removed garpd o Various bug fixes throughout FreeIPMI. For Developers -------------- o IPMI 2.0 support added to libfreeipmi. o Added libipmiconsole. o ipmi-sensors, ipmi-sel, and bmc-config re-written in C. o Added OpenIPMI driver support to libfreeipmi. o Libfreeipmi Fiid interface re-implemented. o Libfreeipmi code significantly cleaned up. o In debug mode, packet dump, function trace, and various debugging added to libfreeipmi. freeipmi-1.6.4/README0000644002055400205540000002144713527331634014151 0ustar00achuachu00000000000000FreeIPMI - Copyright (C) 2003-2015 FreeIPMI Core Team FreeIPMI -------- FreeIPMI provides in-band and out-of-band IPMI software based on the IPMI v1.5/2.0 specification. What is IPMI? ------------- The IPMI specification defines a set of interfaces for platform management. It is utilized by a wide variety of vendors for system management on motherboards. The features of IPMI that most users will be interested in are sensor monitoring, remote power control, serial-over-LAN (SOL), and system debugging. The FreeIPMI tools and libraries listed below should provide users with the ability to access and utilize these features. Getting Started with IPMI ------------------------- IPMI can be used in-band (i.e. running on a machine locally) or out-of-band (i.e. connecting remotely). Most FreeIPMI tools can operate in-band by using one of the in-band drivers included. These in-band drivers include a userspace KCS interface driver, a SSIF driver through the Linux SSIF device (i.e. /dev/i2c-0), the OpenIPMI Linux kernel driver (i.e. /dev/ipmi0), the Sun/Solaris BMC driver (i.e. /dev/bmc), and the Intel DCMI/MEI driver (i.e. /dev/dcmi). If your system requires the use of installed drivers, those appropriate modules must be installed ahead of time. However, most systems should automatically load these drivers when appropriate. Under most scenarios, the FreeIPMI tools should automatically discover which in-band interface to use and the proper settings to use. Users may execute the tools on the command line to begin using them. Some motherboards may require you to determine driver type, addresses, paths, etc. on your own and pass them as command line options to the tools. You may use ipmi-locate(8) to help determine this information. Other tools such as dmidecode(8) may also provide this information. To use IPMI out-of-band with tools such as ipmipower(8) or ipmi-sensors(8), the remote machine's BMC must first be configured for out of band communication. Typically, this involves setting a username, password, IP address, MAC address, and a few other parameters. This can be done using the tool ipmi-config(8). Additional information on how to configure with ipmi-config(8) can be found in the ipmi-config.conf(5) manpage. Some vendors may pre-configure their motherboards with default values so that ipmi-config(8) can be used remotely to configure the machine. However, most of the time, the BMC must be configured in-band before out-of-band access can be allowed (for example, the correct IP address and MAC address must be configured). In order to remotely connect to a machine, you typically must specify the host, username, and password for the tool in order to connect. Depending on configuration settings, a K_g key, privilege level, authentication type, cipher suite id, or protocol version may need to be specified. Some vendors may have not implemented IPMI properly and a workaround must be specified into FreeIPMI to ensure the tool can execute properly. For example, a fair number of vendors have populated their FRU records with invalid checksums. To properly ignore these set of checksums a 'skipchecks' workaround has been added to ipmi-fru(8). Please see each of the tool manpages to see a list of available workarounds. Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. General Use ----------- The primary tools that most users of FreeIPMI will be interested in for system management are the following: ipmi-sensors A tool to read IPMI sensor readings to aid in system monitoring. ipmi-sel A tool to read and manage IPMI System Event Log (SEL) records to aid in system debugging. ipmipower A tool for remote power control. ipmiconsole A tool for Serial-over-Lan (SOL) console access. Many other tools and libraries are listed below that cover additional features and areas of IPMI. Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. Configuration ------------- In order to avoid typing in a long list of command line options to specify IPMI communication requirements everytime a command is executed (e.g. driver paths, usernames, passwords, etc.), an alternate set of default values can be set for most FreeIPMI tools in the FreeIPMI configuration file. See freeipmi.conf(5) for more information. HPC Support ----------- Much of FreeIPMI was written with HPC support in mind. Ipmi-config(8) comes with file input/output support so that configuration can be copied and verified across nodes in a cluster. Most tools (like ipmipower(8) and ipmi-sensors(8)) come with hostrange support so multiple hosts can be specified on the command line at the same time and IPMI can be executed against the hosts in parallel. See tool manpages for more information. Also see the document freeipmi-hostrange.txt for detailed usage and explanation. Ipmi-sensors(8) and the libipmimonitoring(3) library support the ability to interpret sensor readings as well as just reporting them. By mapping sensor readings into NOMINAL, WARNING, or CRITICAL states, it makes monitoring sensors easier across large numbers of nodes. Development ----------- For information on the libraries that can be used to program IPMI applications with, please see, please see libfreeipmi(3), libipmiconsole(3), libipmimonitoring(3), and libipmidetect(3). Or see the document freeipmi-libraries.txt. Project Tools ------------- The following tools are distributed and supported by FreeIPMI. bmc-info A tool to read information about a BMC such as device version numbers, device support, and globally unique IDs (guids). bmc-watchdog A tool/daemon to manage a BMC Watchdog. This tool is typically used for system timeout management and automatic system restarts in the event of a system crash. ipmi-chassis A tool to manage/monitor a chassis, such as chassis power, identification (i.e. LED control), and status. ipmi-fru A tool to read field replaceable unit (FRU) information from a motherboard/machine. ipmi-sel A tool to read and manage IPMI System Event Log (SEL) records. SEL records store system event information and may be useful for debugging problems. ipmi-sensors A tool to read IPMI sensor readings and sensor data repository (SDR) information. ipmipower A tool for remote power control. ipmiconsole A tool for Serial-over-Lan (SOL) console access. ipmi-config A tool to configure BMC and IPMI information. In can be used to configured usernames, passwords, networking information, security, Serial-over-LAN (SOL), Platform Event Filtering (PEF), boot devices, power restoration policy, sensor thresholds, sensor events, and many more configuration options. ipmi-raw A tool that provides hex input/output of IPMI commands. ipmi-locate A tool that can probe for information about the location of a BMC device, such as device addresses. ipmi-pet A tool to parse and interpret Platform Event Traps (PET). ipmi-dcmi A tool to perform Data Center Manageability Interface (DCMI) IPMI extension commands. Supports extensions for asset management and power usage management. bmc-device A tool to perform advanced BMC commands, such as resetting the BMC, configuring ACPI, configuring SDR/SEL time, manually generating events, re-arming sensors, and configuring manufacturer settings. ipmiping An IPMI ping tool for debugging. rmcpping A RMCP ping tool for debugging. ipmi-oem An IPMI tool for OEM specific commands. ipmidetect/ipmidetectd A tool and daemon for IPMI node detection. ipmiseld A daemon that regularly polls the SEL and stores the events to the local syslog. Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. Project Libraries ----------------- The following libraries are distributed and supported by FreeIPMI. libfreeipmi A C library that includes KCS, SSIF, OpenIPMI Linux, and Solaris BMC drivers, IPMI 1.5 and IPMI 2.0 LAN communication interfaces, IPMI packet building utilities, IPMI command utilities, and utilities for reading/interpreting/managing IPMI. This library is for programmers intimately familiar with the IPMI protocol and IPMI specification. Most users may wish to use the libraries listed below. libipmiconsole A library for Serial-over-Lan (SOL) console access. SOL console access is abstracted into a file descriptor interface, so users may read and write console data through a file descriptor. libipmimonitoring A library for sensor and system event log (SEL) monitoring that abstracts away most IPMI details. Interpretation of those sensors and events is abstracted into an API with an iterator interface. libipmidetect A library for IPMI node detection. Help, Questions, etc. --------------------- Please send comments, help, and questions to the freeipmi mailing lists, freeipmi-users@gnu.org and freeipmi-devel@gnu.org. Or see our webpage at http://www.gnu.org/software/freeipmi/. freeipmi-1.6.4/AUTHORS0000644002055400205540000000330213527331634014327 0ustar00achuachu00000000000000Maintainer: Albert Chu Developers: Albert Chu Anand Babu Anand Avati Balamurugan Ian Zimmerman Raghavendra Patch Contributions: Dmitry Frolov Ingo van Lil Levi Pearson Tom Zimmerman Phil Knirsch Jan Forch Fillod Stephane Holger Liebig Dan Lukes Arnaud Quette Diego Elio Pettenò Kaiwang Chen Jan Safranek Thomas Renninger Dave Love Dan Lukes Shashi Dande Markus Blank-Burian David Binderman Denys Vlasenko Ales Ledvinka Klaus Kaempf Dick Detweiler Dave Walker , Claudio Cesar Sanchez Tejeda Mark Rusk And probably others ... Package Maintainers: Dmitry Frolov - FreeBSD Phil Knirsch - Redhat & Fedora Jan Safranek - Redhat & Fedora Yaroslav Halchenko - Debian Contrib Contributions: Kaiwang Chen Web Site: Anand Babu Evaluation/Testing/Reverse Engineering: Joseph Ruscio Shuichi Ihara Ryan Cox and others ... freeipmi-1.6.4/ChangeLog0000644002055400205540000261432713527331634015052 0ustar00achuachu000000000000002019-08-16 Albert Chu * libfreeipmi/sdr/ipmi-sdr-cache-create.c: Workaround Dell Poweredge FC830 issue, where the last SDR entry returns errors when being read. Since it's the last entry, we assume there is a bug in the motherboard's implementation. Just forget about the last entry and move on. 2019-08-15 Albert Chu * common/toolcommon/tool-sensor-common.c: Workaround QuantaPlex T42D-2U issue, where an event only record states that it is a threshold sensor and a "other units based sensor", but does not provide any units. 2019-04-09 Albert Chu * libfreeipmi/api: Fix invalid error code return. 2019-02-08 Albert Chu * libfreeipmi/interpret: Support interpretation of power unit + transition severity sensors / events, power unit + state sensors / events. * libfreeipmi/interpret: Support intepretation of system firmware progress + device present sensors / events, system firmware progress + state sensors / events. * libfreeipmi/interpret: Support intepretation of management subsystem health + transition severity sensors / events, management subsystem health + device present sensors / events. * libfreeipmi/interpret: Support intepretation of system event + transition severity sensors / events 2019-02-07 Albert Chu * libfreeipmi/interpret: Support interpretation of drive slot + transition severity sensors / events. 2019-01-31 Albert Chu * libfreeipmi/api: Fix workaround for out of order packets with lan / rmcpplus ipmb to handle raw packets and packets with errors. 2019-01-23 Albert Chu * Document that "opensesspriv" workaround works on Dell C5220. 2019-01-17 Albert Chu * libfreeipmi/api: Add workaround for out of order packets with lan / rmcpplus ipmb. 2018-09-14 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: Add Intel S2600WP product id. * libfreeipmi/sel: Support Intel S2600WP motherboard OEM sel events. * ipmi-sensors: Support Intel S2600WP OEM sensors. 2018-12-13 Albert Chu * libipmimonitoring: Fix discrete reading working. * contrib: Fix corner case libipmimonitoring-sensors example. 2018-10-24 Albert Chu * libfreeipmi/locate/ipmi-locate-acpi-spmi.c: Fix compiler warnings. 2018-07-30 Albert Chu * Support Intel S2600GZ OEM sensors and SEL events. 2018-08-01 dann frazier * libfreeipmi/locate/ipmi-locate-acpi-spmi.c: Don't try to split the header off of the ACPI table, as it will be consumed by the SPMI table template. * libfreeipmi/locate/ipmi-locate-acpi-spmi.c: Add support for parsing SPMI tables exposed via sysfs. * libfreeipmi/locate/ipmi-locate-acpi-spmi.c: Allow sysfs SPMI parsing on ARM platforms. * libfreeipmi/locate/ipmi-locate-acpi-spmi.c: Correct order of bytes in specification_revision field of ACPI SPMI table. 2018-07-31 Albert Chu * libfreeipmi/locate/ipmi-locate-acpi-spmi.c (_ipmi_acpi_get_spmi_table): Fix corner case, break out of loop once data found. 2018-05-11 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: Add Gigabyte MG20-OP0-ZB product id and derived motherboards. * libfreeipmi/sel: Support Gigabyte MG20-OP0-ZB motherboard OEM sel events. 2018-05-11 Albert Chu * libipmiconsole/ipmiconsole.h.in: Update number of comments for clarity. * libipmimonitoring/ipmi_monitoring.h.in: Correct invalid comments return code from ipmi_monitoring_sel_iterator_next. 2018-05-03 Albert Chu and Anonymous * libfreeipmi/include/spec/ipmi-channel-spec.h, libfreeipmi/util/ipmi-channel-util.c: Update channel max from 0x7 to 0xB per ipmi errata #409. 2018-03-08 Sevag Hanssian * ipmiseld/ipmiseld.c, ipmidetectd/ipmidetectd.c, bmc-watchdog/bmc-watchdog.c: Strip path from argv[0] in syslog 2018-02-20 Jo Fahlke * ipmi-config/: Simplify legacy command scripts to not mangle shell parameters. 2018-02-16 GIRARD, MARC * libfreeipmi/api/ipmi-kcs-driver-api.c, libfreeipmi/api/ipmi-lan-session-common.c, libfreeipmi/api/ipmi-ssif-driver-api.c: When bridging, target the BMC LUN not the SMS LUN. 2018-01-18 Albert Chu * common/toolcommon/tool-common.c (ipmi_open): Fix error output corner case. Newline necessary to allow pstdout library to output buffer on error. * common/toolcommon/pstdout.c (_pstdout_print): Fix debug build corner case. 2017-11-08 Michel Ferland * ipmipower/ipmipower_arg.c: Fix invalid parsing of --wait-until-on and --wait-until-off options. 2017-10-31 Bernd Zeimetz * configure.ac: Fix cross compilation (bug #52290) 2017-09-22 Bernhard M. Wiedemann * configure.ac: Use ChangeLog date instead of build date. 2017-08-13 Albert Chu * ipmi-config/ipmi-config-category-core-lan6-conf-section.c: Add configuration support for static router ips. 2017-08-12 Albert Chu * ipmi-config/ipmi-config-category-core-lan6-conf-section.c: Support checkout of all static & dynamic address info (source, enable, status, prefix_length) 2017-08-11 Albert Chu * ipmi-config/ipmi-config-category-core-lan6-conf-section.c: Support configuring IPv6/ipv4 addressing. Fix error message outputs. * ipmi-config/ipmi-config-category-core-lan6-conf-section.c: Re-work output of IPv6 addresses, a separate key is not generated for each possible address output. 2017-08-09 Albert Chu * ipmi-config/ipmi-config-category-core-lan6-conf-section.c: Check malloc for errors. * Fix compiler warnings. * libfreeipmi/cmds/ipmi-lan-cmds.c: Fix incorrect LS vs. MS comment. * ipmi-config/: Minor code cleanup. * libfreeipmi/: Support IPv6 configuration templates and commands. 2017-07-18 Albert Chu * libipmimonitoring/ipmi_monitoring_sensor_reading.c (_store_sensor_reading): Fix several mem-leak corner cases. 2017-07-10 Albert Chu * Update various documentation for consistency, "Ipmi" to "ipmi" when appropriate, "Bmc" to "bmc", etc. 2017-07-10 Josef Ridky * man/freeipmi.7.pre.in: Lower case "Ipmi" to "ipmi". 2017-06-27 Ike Panhc * libfreeipmi/locate/ipmi-locate-dmidecode.c: Use dmi firmware in sysfs if available. mmap() does not work on DMI tables so also fallback to read if mmap() failed. 2017-04-07 LaMont Jones * ipmi-config/: Support ability to read some IPv6 config information. 2017-04-03 LaMont Jones * libfreeipmi/: Add support to read IPv6 configuration. 2017-03-20 Albert Chu * man/ipmiseld.8.pre.in: Clarify --test-run and --foreground options. * common/toolcommon/tool-daemon-common.c (daemonize_common): Clarify fopen error on daemon pidfile 2017-01-30 Albert Chu * doc/freeipmi-bugs-and-workarounds.txt: Document issue with ASROCK MT-C224. 2017-01-21 Albert Chu * man/ipmi-raw.8.pre.in: Fix formatting error. 2017-01-18 Albert Chu * man/ipmi-oem.8.pre.in: Fix cut and paste documentation error. 2017-01-17 Albert Chu * ipmi-config/: Use inet_ntop() to output IPv4 addresses instead of outputting "by hand". 2017-01-03 Albert Chu * common/toolcommon/pstdout.c (pstdout_hostnames_count): Slight logic change to differentiate between bad input and out of memory. * libfreeipmi/api/ipmi-api-util.c (api_set_api_errnum_by_errno): Recognize ENETUNREACH and EHOSTUNREACH errno's as system errors, not internal errors. 2016-12-28 Albert Chu * Globally support IPv6 address support in all tools as options, parameters, or inputs. Globally support [ADDRESS]:PORT format for IPv6 address + ports. Support additional strings indicating "localhost", such as "ipv6-localhost". 2016-12-06 LaMont Jones * ipmipower/: Initial pass at IPv6 support. 2016-12-05 Albert Chu Support IPv6 addresses in FreeIPMI * common/miscutil/fi_hostlist.h, common/miscutil/fi_hostlist.c: New files. Wrapper around hostlist.[ch]. * Update all tools to use fi_hostlist.[ch]. 2017-01-13 Albert Chu * man/bmc-config.conf.5: Fix pointer of correct manpage. 2016-12-22 Albert Chu * libfreeipmi/api/ipmi-api.c (_setup_hostname): Fix cleanup path potential memleak. 2017-01-09 Albert Chu * man/manpage-common-known-issues-ping.man: Fix spelling typo. 2016-12-13 Albert Chu * freeipmi.spec.in: Remove ExclusiveArch, as ppc now has iopl() support. https://lists.fedoraproject.org/pipermail/scm-commits/2011-October/676773.html 2016-12-09 Albert Chu * libfreeipmi/api/ipmi-lan-session-common.c (_api_lan_recvfrom): Convert from select() to poll() to avoid issues with high number of threads. (GNU issue #49813) 2016-11-02 Albert Chu * libfreeipmi/include/Makefile.am, etc/Makefile.am: Fix distcheck. 2016-10-26 Albert Chu * Support OEM sensors/sel events for SuperMicro H8SGL-F. 2016-10-26 Albert Chu * doc/freeipmi-bugs-and-workarounds.txt: Document issue with SuperMicro H8SGL-F. 2016-10-21 Albert Chu * libfreeipmi/fru/ipmi-fru-data.c (_parse_type_length): Remove unnecessary memset. 2016-10-07 Albert Chu * libipmiconsole/: Move "user_fd_retrieved" from connection struct to fds struct for clarity. 2016-10-07 Albert Chu Fix invalid clearing of ctx info in __ipmiconsole_ctx_connection_cleanup in libipmiconsole/ipmiconsole_ctx.c * libipmiconsole/ipmiconsole_ctx.c (_ipmiconsole_ctx_connection_init): Remove function. * libipmiconsole/ipmiconsole_ctx.c (ipmiconsole_ctx_connection_setup): Move remnants of _ipmiconsole_ctx_connection_init into this function. * libipmiconsole/ipmiconsole_ctx.c (__ipmiconsole_ctx_connection_cleanup): Do not call _ipmiconsole_ctx_connection_init. Clear only data __ipmiconsole_ctx_connection_cleanup should clear. 2016-10-06 Albert Chu * libfreeipmi/fru/: Revert removal of memsets libfreeipmi/fru/. Are necessary b/c fields are optional. * Revert removal of memset of config file data. Necessary b/c data may never be set by config_file_parse if file not found. 2016-10-04 Albert Chu * ipmi-oem/: Audit and fix, add +1 to string buffers, use secure_memset when appropriate. * bmc-device/: Audit and fix, remove +1 for data buffers, don't memset when unnecessary. * bmc-info/bmc-info.c (display_system_info_common): Add +1 for string buffer. * bmc-info/bmcinfo.c (get_channel_info_list) (display_channel_info): Don't memset channel array, clear values if not available. * ipmi-dcmi/ipmi-dcmi.c: Audit and fix, +1 for string buffers, use char not uint8_t for strings. * ipmi-fru/: Audit and fix, no need to memset buffers, remove +1s length on buffers. * ipmi-sensors/: Audit and fix, remove unnecessary memset. * ipmiconsole/: Audit and remove unnecessary memsets. * ipmiseld/: Audit and remove unnecessary memsets, add +1 to string buffers. * ipmipower/: Audit, remove unnecessary memsets, add +1 to string buffers, minor cleanup. * libipmimonitoring/: Audit, remove unnecessary memsets, add +1 to string buffers. * libipmiconsole/: Audit, remove unnecessary memsets, add +1 to string buffers. * ipmi-config/: Audit, remove unnecessary memsets, add +1 to string buffers, minor fixes. * Properly memset hdr buffers when outputting debug output. * Remove unnecessary memset of "prog_data" in all tools. * libfreeipmi/: Audit, remove unnecessary memsets, add +1 to string buffers, misc fixes. * Fix logic and corner cases with parse_kg. 2016-10-03 Albert Chu * libfreeipmi/fru/ipmi-fru-data.c: Remove unnecessary memsets. 2016-08-29 Albert Chu * ipmi-oem/: Add Gigabyte get/set-bmc-services commands. 2016-10-03 Albert Chu * ipmi-config/ipmi-config-category-core-lan-conf-security-keys-section.c (k_g_checkout), ipmipower/ipmipower_prompt.c (_cmd_k_g): Fix memset of buffer to correct length. * ipmi-fru/ipmi-fru-output.c (ipmi_fru_output_chassis_info_area, ipmi_fru_output_board_info_area, ipmi_fru_output_product_info_area): Remove unnecessary memsets, are performed within API functions. * ipmi-oem/ipmi-oem-dell.c (_ipmi_oem_dell_power_supply_info_sdr_callback): Memset sensor name buffer before calling ipmi_sdr_parse_entity_sensor_name. * libfreeipmi/sdr/ipmi-sdr-parse-util.c (ipmi_sdr_parse_sensor_name) (ipmi_sdr_parse_entity_sensor_name): No need to memset buf from user. 2016-09-30 Albert Chu * libfreeipmi/fiid/fiid.c: Put index into fiid_field_data so does not have to be calculated later. * libfreeipmi/fiid/fiid.c: Put start & end bytes into fiid_field_data so does not have to be calculated later. * libfreeipmi/fiid/fiid.c: Put internal hash/lookup table to remove constant iteration/loops looking for indexes, field lengths, and start & end points. 2016-09-30 Albert Chu * libfreeipmi/fiid/fiid.c (_fiid_template_check_valid_keys): Remove expensive check in production builds. The fall out by not checking will be "key not found" errors on fiid_obj_get and similar. * libfreeipmi/fiid/fiid.c (fiid_obj_template_compare): Remove unnecessary call to _fiid_template_check_valid_flags. 2016-09-29 Albert Chu * libfreeipmi/debug/ipmi-debug-lan.c (_ipmi_dump_lan_packet): Clear data on obj_session_hdr not obj_lan_msg_hdr. * ipmipower/ipmipower_powercmd.c (_recv_packet): Clear obj_lan_session_hdr_rs only if using authentication straight password key. 2016-09-29 Albert Chu * ipmipower/ipmipower_powercmd.c (_recv_packet), libfreeipmi/debug/ipmi-debug-rmcpplus.c (_dump_rmcpplus_session_trlr), libipmiconsole/ipmiconsole_processing.c (_receive_packet), libipmiconsole/ipmiconsole_packet.c (ipmiconsole_sol_packet_assemble), libipmiconsole/ipmiconsole_processing.c (_sol_bmc_to_remote_console_packet): Remove unnecessary fiid obj clear for security purposes. 2016-09-29 Albert Chu * bmc-info/bmc-info.c (display_system_info_common), bmc-device/bmc-device.c (set_system_info_common), ipmi-config/ipmi-config-category-pef-alert-string.c (alert_string_checkout), ipmi-dcmi/ipmi-dcmi.c (_sensor_info_output), ipmi-oem/ipmi-oem/ipmi-oem-dell.c (_get_dell_system_info_long_string), ipmi-oem/ipmi-oem-thirdparty.c (ipmi_oem_thirdparty_get_system_info_block_pstring, ipmi_oem_thirdparty_get_account_status): Remove unnecessary fiid object clear which is also done in unassemble deep in API. * ipmi-oem/ipmi-oem-inventec.c (_ipmi_oem_inventec_read_eeprom_at24c256n, _ipmi_oem_inventec_clear_eeprom_at24c256n), ipmi-oem/ipmi-oem-quanta.c (_ipmi_oem_quanta_read_mac_address_s99q, _ipmi_oem_quanta_write_mac_address_s99q): Remove useless fiid obj clear call. * libfreeipmi/interface/ipmi-rmcpplus-interface.c (assemble_ipmi_rmcpplus_pkt), libfreeipmi/fru/ipmi-fru.c (_read_fru_data), libfreeipmi/debug/ipmi-debug-rmcpplus.c (_dump_rmcpplus_payload_data): Remove unnecessary fiid obj clears. 2016-09-29 Albert Chu * ipmipower/ipmipower_packet.c (ipmipower_packet_store, _ipmi_1_5_packet_create, _ipmi_2_0_packet_create): Remove unnecessary fiid object clears which are already done inside the fill & unassemble functions. * libipmiconsole/ipmiconsole_packet.c (_ipmi_1_5_packet_assemble, _ipmi_2_0_packet_assemble, ipmiconsole_packet_unassemble): Remove unnecessary fiid object clears which are done inside fill & unassemble functions. * libfreeipmi/api/ipmi-lan-session-common.c (_api_lan_cmd_send, _api_lan_2_0_cmd_send, _api_lan_cmd_recv, _api_lan_2_0_cmd_recv): Remove unnecessary fiid object clears which are done inside fill & unassemble functions. 2016-09-29 Albert Chu * libfreeipmi/include/freeipmi/fiid/fiid.h, libfreeipmi/fiid/fiid.c: Support new FIID_FIELD_SECURE_MEMSET_ON_CLEAR flag. * libfreeipmi/interface/ipmi-lan-interface.c, libfreeipmi/include/freeipmi/templates/ipmi-lan-interface-templates.h: In Lan Session Header, always securely clear authentication_code. 2016-09-29 Albert Chu * Remove additions of ipmi_rmcpplus_get_random and crypt_get_random from 2016-09-26. Older versions of gcrypt do not allow multiple threads into gcry_randomize simultaneously, which could greatly hurt initialization performance in multi-threaded applications. In addition, since ipmi_get_random() is only called during initialization in all libraries/code, the somewhat slower ipmi_get_random() shouldn't affect long running performance of applications. Reconsider change again in the future. 2016-09-29 Albert Chu * libfreeipmi/fiid/fiid.c (_fiid_template_field_start) (_fiid_template_field_end, _fiid_template_field_len) (_fiid_template_block_len): Create various internal versions of functions which can be used internally to avoid duplicate API checks in _fiid_template_check_valid_keys. 2016-09-28 Albert Chu * libfreeipmi/util/ipmi-rmcpplus-util.c: Do not secure_memset buffers with usernames. Do not consider username to be secure_memset necessary. 2016-09-28 Albert Chu Cleanup over-excessive use of secure_memset, should only be used to clear buffers containing cryptographic keys (i.e. passwords). * libipmimonitoring/ipmi_monitoring.c (ipmi_monitoring_ctx_create): Remove unnecessary call to secure_memset(). * ipmipower/ipmipower_powercmd.c (_send_packet, _recv_packet): Call secure_memset only when necessary (using plain passwords). * ipmiconsole/ipmiconsole.c (main, _stdin): Remove unnecessary and excessive calls to secure_memset. * libfreeipmi/util/ipmi-rmcpplus-util.c (ipmi_calculate_rmcpplus_session_keys) (ipmi_rmcpplus_check_packet_session_authentication_code) (ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code) (ipmi_calculate_rakp_3_key_exchange_authentication_code) (ipmi_rmcpplus_check_rakp_4_integrity_check_value): Fix secure memset of invalid/unnecessary buffers. * libfreeipmi/interface/ipmi-lan-interface.c (assemble_ipmi_lan_pkt): Fix secure memset of unnecessary buffers. * libfreeipmi/interface/ipmi-rmcpplus-interface.c (_construct_session_trlr_authentication_code): Fix secure memset of unnecessary buffers. * libipmiconsole/ipmiconsole_processing.c: Remove secure memset of unnecessary buffers. * libfreeipmi/fiid/fiid.c (fiid_obj_clear, fiid_obj_clear_field): Change secure_memset to memset. Will adjust via new fiid flag in later change. 2016-09-29 Albert Chu * libipmiconsole/ipmiconsole_ctx.c (ipmiconsole_ctx_fds_cleanup): Fix error in cleanup that could lead to fd leak. 2016-07-27 Albert Chu * common/toolcommon/tool-common.h, common/toolcommon/tool-common.c (ipmi_open): Add flags option. * Use new ipmi_open() function call appropriately in all tools. * ipmi-raw/: Support new --no-session option. * libfreeipmi/api/ipmi-api.c (ipmi_cmd_raw): Fix corner case when using IPMI_FLAGS_NOSESSION. 2016-09-26 Albert Chu * ipmipower/ipmipower_powercmd.c (ipmipower_powercmd_queue): Fix initialization of variables in wrong branch. 2016-09-26 Albert Chu * libfreeipmi/util/ipmi-util.c (ipmi_get_random): Remove call to gcry_randomize. There's no guarantee gcrypt was initialized. * libfreeipmi/libcommon/ipmi-crypt.h, libfreeipmi/libcommon/ipmi-crypt.c (crypt_get_random): New function that uses gcry_randomize. * libfreeipmi/interface/ipmi-rmcpplus-interface.c (_construct_payload_confidentiality_aes_cbc_128): Use crypt_get_random appropriately. * libfreeipmi/include/freeipmi/interface/ipmi-rmcpplus-interface.h, libfreeipmi/interface/ipmi-rmcpplus-interface.c (ipmi_rmcpplus_get_random): Add new convenience function. * libfreeipmi/api/ipmi-lan-session-common.c (api_lan_2_0_open_session), libipmiconsole/ipmiconsole_ctx.c (ipmiconsole_ctx_session_setup), ipmipower/ipmipower_powercmd.c (ipmipower_powercmd_queue): Use new ipmi_rmcpplus_get_random appropriately. 2016-09-22 Albert Chu * libfreeipmi/util/ipmi-util.c (ipmi_get_random): Fix corner case where signed/unsigned ints are compared. 2016-09-22 Albert Chu * libipmiconsole/: Do not close user fd if use has retrieved it from ipmiconsole_ctx_fd. Double close can lead to race conditions. 2016-09-20 Albert Chu * libipmiconsole/: Create state variable to manage context destroy state remove corner case of potential segfault on teardown. 2016-09-06 Albert Chu * libipmiconsole/ipmiconsole_ctx.c (__ipmiconsole_ctx_connection_cleanup): Add missing call to ipmiconsole_ctx_config_cleanup. * libfreeipmi/libcommon/ipmi-crypt.c: Fix potential issue with multithreaded tracing, call gpg_strerror_r intead of gcry_strerror when tracing. 2016-08-30 Albert Chu * configure.ac; Fix output comment error. 2016-08-02 Albert Chu * ipmi-oem/: Add Gigabyte get/set-nic-mode commands. 2016-08-01 Albert Chu * common/toolcommon/tool-sensor-common.h: Increase max sensor types to 128. 2016-08-01 Thomas Grohmann * common/toolcommon/tool-sensor-common.h: Increase max record ids to 4096. 2016-07-29 Albert Chu * libfreeipmi/include/spec/: Add Gigabyte IANA manufacturer macro and Product MD90-FS0-ZB macro. * libfreeipmi/sel/: Add Gigabyte MD90-FS0-ZB OEM SEL support. 2016-07-29 Albert Chu * ipmi-oem/: Support get/set-bmc-services for Intel motherboards. 2016-07-11 Albert Chu * Document support of Intel S2600KPR. * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h, libfreeipmi/sel/ipmi-sel-string.c: Add code indicating support for Intel S2600KPR. 2016-07-11 Albert Chu * Untabify all .c, .h, and .pl files for consistency across FreeIPMI. 2016-07-05 Holger Liebig * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: Update Fujitsu Product ID range. 2016-06-21 Albert Chu * libfreeipmi/include/freeipmi/spec/oem/ipmi-oem-intel-spec.h: Add forgotten OEM macro. 2016-06-08 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h: Fix invalid completion code values for set session privilege macros. 2016-06-06 Albert Chu * ipmiconsole/ipmiconsole-argp.c, man/ipmiconsole.8.pre.in: Clarify use of --debugfile option. * ipmiconsole/: Make --debugfile option available in production builds. 2016-06-06 Albert Chu * libfreeipmi/util/ipmi-error-util.c (ipmi_completion_code_strerror_r): Remove buggy code which explains Master/Read write error from ChangeLog on 2015-09-09. 2016-05-21 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h: Add macro for maximum IANA numbers. * libfreeipmi/spec/generate-enterprise-numbers-file.sh: Automatically update iana .h file with max index. 2016-05-10 Albert Chu * bmc-device/: Support --read-fru and --device-id option. * libfreeipmi/: Add ipmi_fru_open_device_id_with_buffer function. * ipmi-fru/: Add --fru-file option. * libfreeipmi/: Add ipmi_cmd_write_fru_data function. * bmc-device/: Support --write-fru option. 2016-05-20 Albert Chu * libfreeipmi/spec/enterprise-numbers.pl: Handle header and all corner cases in enterprise-numbers records list to avoid having to hand modify. * libfreeipmi/spec/generate-enterprise-numbers-file.sh: New file to automatically download and generate C file. * libfreeipmi/spec/enterprise-numbers.pl: Remove extraneous text from manufacturer names (e.g. "formerly known as" and similar text). * libfreeipmi/spec/ipmi-iana-enterprise-numbers-spec.c: Update to newest. 2016-05-06 Albert Chu * ipmi-fru/: Rename INTERPRET_OEM_DATA to INTERPRET_OEM_DATA_KEY for consistency. 2016-05-05 Albert Chu * ipmi-config/: Set SDR quiet-cache when doing hostranged actions. * ipmi-config/: Support SDR options in ipmi-config. * Globally legacy old 'f' option for --flush-cache and 'Q' option for --quiet-cache. 2016-05-04 Albert Chu * man/ipmi-fru.8.pre.in, man/bmc-device.8.pre.in: Minor fixes 2016-03-09 Maksym Planeta * libfreeipmi/driver/ipmi-inteldcmi-driver.c, libfreeipmi/driver/ipmi-openipmi-driver.c, libfreeipmi/driver/ipmi-ssif-driver.c, libfreeipmi/driver/ipmi-sunbmc-driver.c: Set FD_CLOEXEC on device driver opened files. 2016-02-03 Albert Chu * common/miscutil/conffile.h: Increase CONFFILE_MAX_ARGLEN from 512 to 1024 to support long hostname arguments in ipmiseld config file. 2015-11-04 Albert Chu * configure.ac, freeipmi.spec.in: Add systemd support. 2015-11-02 Albert Chu * libfreeipmi/sel/ipmi-sel-string.c: Code cleanup. 2015-10-29 Albert Chu * configure.ac: Update library versions for eventually 1.5 release. 2015-10-29 Albert Chu * ipmi-oem/ipmi-oem-intelnm.c: Fix typo. * ipmi-oem/ipmi-oem-intelnm.c: Fix logic error in searching code in various "get" functions. * ipmi-oem/ipmi-oem-intelnm.c: Fix logic errors in new command additions. * libfreeipmi/cmds/ipmi-oem-intel-node-manager-cmds.c: Fix error in new templates. 2015-10-29 Albert Chu * doc/freeipmi-faq.texi: URL updates and minor doc update. 2015-10-28 Albert Chu * Add warnings to deprecated header files. * Various code cleanup. 2015-10-27 Albert Chu * libfreeipmi/include/freeipmi/templates/: Move some files to oem subdirectory. * freeipmi.spec.in: Update for new header directories. * libfreeipmi/freeipmi/spec/oem/ipmi-slave-address-oem-linux-kernel-spec.h: New file. * libfreeipmi/include/Makefile.am, libfreeipmi/include/freeipmi/freeipmi.h.in, libfreeipmi/include/freeipmi/spec/ipmi-slave-address-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-slave-address-oem-spec.h: Update for new file. * libfreeipmi/: Various code cleanup. 2015-10-21 Albert Chu * Various minor bug fixes, cleanup, and distcheck fixes. 2015-10-20 Albert Chu Re-org of OEM code for future. * libfreeipmi/include/freeipmi/sdr/, libfreeipmi/include/freeipmi/record-format: Split OEM .h files into vendor specific files. * libfreeipmi/sdr, libfreeipmi/record-format: Split OEM files into specific vendor files. * ipmi-sensors/: Split OEM files into motherboard files. * libfreeipmi/sel: Split OEM files into motherboard files. 2015-10-19 Albert Chu Re-org of OEM code for future. * libfreeipmi/include/freeipmi/spec/: Split OEM .h files into vendor specific files. * libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.c: Split OEM files into specific vendor files. 2015-10-19 Albert Chu Merge branch intelnm30 * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h, libfreeipmi/sel/ipmi-sel-string-intel-node-manager.c: Support Intel NM 3.0 SEL events. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-numbers-oem-spec.h: Add new sensor numbers. * libfreeipmi/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h, libfreeipmi/include/freeipmi/api/ipmi-oem-intel-node-manager-api.h * libfreeipmi/cmds/ipmi-oem-intel-node-manager-cmds.c, libfreeipmi/api/ipmi-oem-intel-node-manager-api.c, ipmi-oem/ipmi-oem-intelnm.c: Update for Intel NM 3.0 changes. 2015-10-16 Albert Chu * ipmi-oem/ipmi-oem-intelnm.c (ipmi_oem_intelnm_get_node_manager_statistics): Fix errors in units in output. * ipmi-oem/ipmi-oem-intelnm.c (ipmi_oem_intelnm_set_node_manager_policy): Fix error in setting logic. * libfreeipmi/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h, ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy): New function. * libfreeipmi/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h, libfreeipmi/cmds/ipmi-oem-intel-node-manager-cmds.c (fill_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy): New function. 2015-09-30 Albert Chu Merge branch intel2600v3. * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: Add Intel product id's for S2600KP, S2600WT2, S2600WTT. * libfreeipmi/sel/ipmi-sel-string-intel.c: Support Intel Node Manager SEL events on Intel S2600KP, S2600WT2, S2600WTT. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-numbers-oem-spec.h: Add sensor numbers for Intel S2600KP, S2600WT2, S2600WTT. * libfreeipmi/include/freeipmi/spec/ipmi-slave-address-oem-spec.h: Add slave addresses for Intel S2600KP, S2600WT2, S2600WTT. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h, libfreeipmi/sel/ipmi-sel-string-intel.c: Support OEM sel events for Intel S2600KP, S2600WT2, S2600WTT. * man/ipmi-sel.8.pre.in: Update motherboard support list. 2015-10-14 Albert Chu * libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.c: Fix typo taret -> target. 2015-10-14 Albert Chu * ipmi-oem/: Update get-power-supply-status2 on Supermicro based on mailing list discussion. 2015-09-30 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-slave-address-spec.h, libfreeipmi/include/freeipmi/record-format/ipmi-sel-oem-record-format.h, libfreeipmi/sel/ipmi-sel-string.c, libfreeipmi/sel/ipmi-sel-string-linux-kernel.h, libfreeipmi/sel/ipmi-sel-string-linux-kernel.c: Support Linux kernel panics in SEL. 2015-09-29 Newell Jensen * ipmi-locate/ipmi-locate.c (main), libfreeipmi/locate/ipmi-locate-smbios.c (ipmi_locate_smbios_get_device_info), libfreeipmi/locate/ipmi-locate-acpi-spmi.c (ipmi_locate_acpi_spmi_get_device_info), libfreeipmi/locate/ipmi-locate-dmidecode.c (ipmi_locate_dmidecode_get_device_info): Fix ipmi locate probing on arm32 & arm64. 2015-09-24 Newell Jensen * ipmi-locate/ipmi-locate.c (main): Fix probing issue on arm32 & arm64 systems. 2015-09-23 Albert Chu * libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h, libfreeipmi/fru/: Update FRU Multirecord Area for NVM Express record range (IPMI Errata 7). 2015-09-15 Albert Chu * ipmi-oem/: Update get-power-supply-status2 on Supermicro based on mailing list discussion. 2015-09-09 Albert Chu * ipmi-oem/: Support get-power-supply-status2 on Supermicro. * libfreeipmi/util/ipmi-error-util.c (ipmi_completion_code_strerror_r): Support Master read/write specific error codes. 2015-08-18 Craig * ipmi-sensors/ipmi-sensors-output-common.c (ipmi_sensors_get_thresholds): Handle additional corner case reading sensor thresholds. 2015-08-18 Albert Chu * ipmi-sensors/ipmi-sensors-output-common.c (ipmi_sensors_get_thresholds): Handle several additional error cases with getting sensor thresholds. 2015-07-30 Albert Chu * ipmi-config/ipmi-config/ipmi-config-category-dcmi-dcmi-conf-section.c (asset_tag_commit): Revert workaround for Supermicro motherboard. 2015-07-27 Albert Chu * ipmi-config/ipmi-config/ipmi-config-category-dcmi-dcmi-conf-section.c (asset_tag_commit): Add workaround for Supermicro motherboard. 2015-07-27 Albert Chu * ipmi-config/ipmi-config-category-chassis-boot-flags.c (_get_boot_flags): Fix debug message output error. 2015-06-24 Albert Chu * Update copyright year globally. 2015-06-01 Albert Chu * Audit and fix all strtol parse corner cases. 2015-06-01 James Buren * ipmi-config/ipmi-config-argp.c (_ipmi_config_parse_channel_number): Fix strtol parse corner case. 2015-04-02 Albert Chu * man/ipmiconsole.8.pre.in: Remove duplicate information. (bug #44698) 2015-01-06 Albert Chu * libfreeipmi/libcommon/ipmi-crypt.c (crypt_init): Only call gcry_control w/ GCRYCTL_SET_THREAD_CBS once. It appears newer version of libgcrypt cannot handle entering this function simulatenously by multiple threads, leading to segfaults. 2015-01-06 Albert Chu * common/toolcommon/tool-cmdline-common.c: Fix parsing corner case with --fanout option. 2014-12-10 Albert Chu * ipmi-config/ipmi-config-category-core-user-sections.c (_set_user_access): Workaround issue on Supermicro X10DDW-i. 2014-12-10 Albert Chu * ipmi-config/ipmi-config-category-pef-alert-policy-table.c (_set_alert_policy_table): Use convenience function ipmi_config_find_section appropriately. 2014-12-09 Albert Chu * ipmi-config/ipmi-config-category-core-lan-conf-section.c: Fix vlan_id from uint8_t to uint16_t. Found by jbd at jbdenis dot net 2014-12-09 Albert Chu * libfreeipmi/: Support Get Device SDR Info, Get Device SDR, and Reserve Device SDR Repository commands in API as needed. 2014-11-14 Albert Chu * libfreeipmi/driver/ipmi-sunbmc-driver.c, libfreeipmi/driver/ipmi-ssif-driver.c, libfreeipmi/driver/ipmi-openipmi-driver.c: Loop on select() call if interrupted by EINTR. Issue found by Robin Geyer (robin dot geyer at tu-dresden dot de) 2014-11-14 Albert Chu * bmc-info/bmc-info.c (display_system_info_common): Fix cut & paste error handling bug. 2014-11-07 Albert Chu * libfreeipmi/spec/ipmi-sensor-and-event-code-tables-spec.c: Fix typo. (Found by Werner Fischer). 2014-11-03 Albert Chu * Found by Satya Nishtala Fix typo throughout with "Tegulu" language, which should be "Telugu". Typo exists in originally FRU specification. 2014-10-30 Albert Chu * doc/freeipmi-faq.texi: Fix typo and update with examples. Add support updates. 2014-10-29 Albert Chu Merge branch ddr4 * libfreeipmi/include/freeipmi/record-format/ipmi-fru-dimmspd-record-format.h, libfreeipmi/record-format/ipmi-fru-dimmspd-record-format.c, libfreeipmi/include/freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h: Add DDR4 SPD FRU support. * libfreeipmi/include/freeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.h, libfreeipmi/spec/ipmi-jedec-manufacturer-identification-code-spec.c, libfreeipmi/spec/jedec-raw.txt, libfreeipmi/util/ipmi-jedec-manufacturer-identification-code-util.c: Update jedec manufacturer listings. * libfreeipmi/spec/ipmi-iana-enterprise-numbers-spec.c: Update IANA manufacturer listings. * ipmi-fru/: Support DDR4 module output. Add extra output to DDR3 modules. 2014-10-22 Albert Chu * ipmi-chassis/ipmi-chassis-argp.c: Options now require arguments, remove OPTION_ARG_OPTIONAL flag in parsing. * ipmi-chassis/: Add comments on legacy options. 2014-10-21 Albert Chu * ipmi-raw/: Fix corner case with empty lines when inputting commands via standard in or --file. 2014-10-14 Albert Chu * doc/freeipmi-faq.texi: Add notes on ipmitool vs ipmi-sensors "ok" reading. 2014-08-19 Mark Rusk * libfreeipmi/locate/ipmi-locate-dmidecode.c: Fix multiple UEFI bugs. Remove assumption EFI only works with IA64. Fix endline parse issue. 2014-08-14 Albert Chu * Support SSIF IPMB bridging. 2014-07-15 Markus Blank-Burian * Support Supermicro H8DGU and H8DG6 systems. 2014-07-14 Yaroslav Halchenko * Fix various typos in code and documentation. 2014-07-10 Albert Chu * man/libipmiconsole.3.pre.in: Document libipmiconsole.conf manpage. 2014-07-01 Albert Chu * libipmiconsole/ipmiconsole_processing.c (_check_payload_sizes_legitimate): Fix max_sol_character_send_size corner case calculation. Should be based on "inbound" size not "outbound" size. 2014-05-30 Shashi Dande * libfreeipmi/api/ipmi-ssif-driver-api.h, libfreeipmi/api/ipmi-ssif-driver-api.c (api_ssf_cmd): Retry reads as needed. 2014-05-07 Klaus Kaempf * ipmipower/ipmipower_ping.c: Fix compile bug. 2014-03-19 Albert Chu * ipmipower/: Support 'ipmiping' workaround. 2014-03-19 David Binderman * libfreeipmi/interpret/ipmi-interpret.c: Fix leap before you look bugs. 2014-03-13 Albert Chu * ipmi-oem/: Support Supermicro get-power-supply-status and get-pmbus-power-supply-status commands. 2014-03-12 Albert Chu * doc/freeipmi-faq.texi: Add notes on ipmi-detect for IPMI discovery. 2014-02-21 Albert Chu * libipmiconsole/ipmiconsole_processing.c (_sol_retransmission_timeout): Only increment sol packet sequence number for workaround once. 2014-02-20 Albert Chu * libipmiconsole, ipmiconsole, common/parsecommon: Support SERIAL_ALERTS_DEFERRED workaround. Support INCREMENT_SOL_PACKET_SEQUENCE workaround. 2014-02-20 Albert Chu * libfreeipmi/include/freeipmi/templates/ipmi-rmcpplus-support-and-payload-cmds-templates.h, libfreeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.c: Fix payload, two fields were flipped by accident. Make fields required and not optional. 2014-02-06 Albert Chu * Porting issues discovered by Mark Pettit http://theviewfrom8.blogspot.com/2012/11/how-to-build-freeipmi-on-mac-os-x.html basic code derived from his webpage. * libfreeipmi/driver/ipmi-semaphores.h: Union semun defined in sys/sem.h for FreeBSD and APPLE. * configure.ac, common/toolcommon/pstdout.c, common/toolcommon/tool-daemon-common.h: sighandler_t not defined in signal.h, handled appropriately. 2014-01-27 Anonymous * man/Makefile.am: Fix man pages built with cpp-4.8 2014-01-15 Albert Chu * libfreeipmi/sel/, libfreeipmi/include/freeipmi/spec/, Support OEM events for Intel Windmill motherboards in ipmi-sel. * freeipmi/record-format/ipmi-sel-oem-record-format.h: New file * libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h, libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_get_oem_sensor_type_message, ipmi_get_event_messages): Adjust API for new OEM sensors with non-standard config. * ipmi-sensors/, libipmimonitoring/: Adjust for changes in API. 2014-01-09 Albert Chu * Adjust comments/documentation for Quanta Winterfell & Wiwynn Windmill. Motherboard is Intel Windmill on all of them. 2014-01-08 Albert Chu * Adjust comments/documentation for Quanta Winterfell & Wiwynn Windmill. Motherboard in use was previously misidentified. 2014-01-07 Albert Chu Add DCMI configuration support in ipmi-config. * ipmi-config/: Add basic DCMI configuration support. * man/: Add appropriately DCMI config subsections to manpages. * libfreeipmi/: Fix various corner cases. * ipmi-config/, ipmi-sensors/: Fix various corner cases for Quanta Winterfell motherboard. * man/: Document workarounds. 2014-01-03 Albert Chu * Update copyright globally. 2014-01-03 Albert Chu * ipmi-dcmi/, man/, ipmi-config/: Fix various English and typos. 2013-12-20 Albert Chu Add 'inteldcmi' inband driver. * libfreeipmi/: Add support for "inteldcmi" in-band driver. * README, doc/, man/: Add documentation for inteldcmi driver. 2013-12-20 Albert Chu * man/freeipmi.7.pre.in, README: Fix some English. * man/libfreeipmi.3.pre.in: Add forgotten driver. 2013-12-19 Dave Love * ipmi-sensors/ipmi-sensors.c (_calculate_record_ids): Check record number against array length. * common/toolcommon/tool-sensor-common.h (MAX_SENSOR_RECORD_IDS): Increase to 1024. 2013-12-12 Albert Chu * bmc-info/: Support 'guidformat' workaround flag. * bmc-info/: Fix default GUID output format, one field appears to be output incorrectly. 2013-12-12 Albert Chu * bmc-info/: Support output of System GUID by default and support --get-system-guid option. 2013-12-12 Albert Chu * ipmi-config/: Decimal values that cannot be encoded accurately now report a clearer error message through the IPMI_CONFIG_VALIDATE_VALUE_CANNOT_BE_ENCODED_ACCURATELY validate error code. 2013-12-11 Albert Chu * ipmi-config/: Re-work error message outputs so fatal error messages are always output. 2013-12-11 Albert Chu * libfreeipmi/util/ipmi-sensor-util.c (ipmi_sensor_decode_raw_value): Fix error in input checks. 2013-12-11 Albert Chu * ipmi-config/ipmi-config-category-sensors-threshold-section.c: Fix error message cut & paste typo. 2013-12-05 Albert Chu * ipmiseld/ipmiseld.c: Fix error message typo. 2013-12-02 Albert Chu * freeipmi.spec.in: Add forgotten manpage. 2013-12-02 Albert Chu * doc/freeipmi-faq.txi: Update with new information on OS issues. 2013-12-02 Albert Chu * bmc-watchdog/bmc-watchdog.c (_fiid_obj_get_safe): New function. * bmc-watchdog/bmc-watchdog.c (_get_watchdog_timer_cmd): Use _fiid_obj_get_safe and do not exit on data not available errors. 2013-11-26 Albert Chu * doc/freeipmi-faq.txi: Update with new information. 2013-11-14 Albert Chu * libfreeipmi/sdr/ipmi-sdr-cache-create.c (ipmi_sdr_cache_create): Fix bug w/ Fujitsu SDR count workaround. 2013-11-14 Albert Chu * ipmiconsole/, libipmiconsole/: Support solchannelsupport workaround option / IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT workaround flag. 2013-11-13 Albert Chu * doc/freeipmi-bugs-issues-and-workarounds.txt, man/manpage-common-workaround-outofband-15-text.man: Document workaround for Quanta Winterfell. 2013-11-13 Albert Chu Update with Errata 5 changes to IPMI 2.0 spec. * libfreeipmi/cmds/ipmi-pef-and-alerting-cmds.c, libfreeipmi/include/freeipmi/templates/ipmi-pef-and-alerting-cmds-templates.h, ipmi-config/ipmi-config-category-pef-alert-string.c: Filter numbers are now 8 bit fields instead of 7 bit fields. * libfreeipmi/util/ipmi-cipher-suite-util.c, libfreeipmi/include/freeipmi/util/ipmi-cipher-suite-util.h: Cipher Suites 15-19 now fully confirmed, remove comments * etc/freeipmi_interpret_sensor.conf, etc/freeipmi_interpret_sel.conf, libipmimonitoring/ipmi_monitoring_bitmasks.h, libipmimonitoring/ipmi_monitoring_offsets.h, man/freeipmi_interpret_sel.conf.5.pre.in, man/freeipmi_interpret_sensor.conf.5.pre.in, libfreeipmi/interpret/ipmi-interpret-config-sel.c, libfreeipmi/interpret/ipmi-interpret-config-sensor.c, libfreeipmi/spec/ipmi-sensor-and-event-code-tables-spec.c, libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h: Support new offset for power supply sensor. * etc/freeipmi_interpret_sensor.conf, etc/freeipmi_interpret_sel.conf, libipmimonitoring/ipmi_monitoring_bitmasks.h, libipmimonitoring/ipmi_monitoring_offsets.h, man/freeipmi_interpret_sel.conf.5.pre.in, man/freeipmi_interpret_sensor.conf.5.pre.in, libfreeipmi/interpret/ipmi-interpret-config-sel.c, libfreeipmi/interpret/ipmi-interpret-config-sensor.c, libfreeipmi/spec/ipmi-sensor-and-event-code-tables-spec.c, libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h: Support new offset for os boot sensor. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-spec.h: Document legacy/new name choice. * libfreeipmi/include/freeipmi/cmds/ipmi-messaging-support-cmds.h, libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameters-spec.h, libfreeipmi/include/freeipmi/templates/ipmi-messaging-support-cmds-templates.h, libfreeipmi/include/freeipmi/api/ipmi-messaging-support-cmds-api.h, libfreeipmi/cmds/ipmi-messaging-support-cmds.c, libfreeipmi/api/ipmi-messaging-support-cmds-api.c: Support new System Info Parameters Present OS Version Number, BMC URL, and Base OS/Hypervisor URL. * bmc-info/bmc-info.c: Support Present OS Version Number, BMC URL, and Base OS/Hypervisor URL system info output. * bmc-device/: Support --set-present-os-version-number, --set-bmc-url, --set-base-os-hypervisor-url. 2013-10-30 Denys Vlasenko * libfreeipmi/util/ipmi-rmcpplus-util.c (ipmi_rmcpplus_check_rakp_4_integrity_check_value): Fix incorrect secure memset call. 2013-10-23 Denys Vlasenko * libfreeipmi/util/ipmi-rmcpplus-util.c (ipmi_calculate_sik): Fix big endian bug. 2013-09-24 Albert Chu * man/ipmi-sel.8.pre.in: Add note about very verbose output. 2013-09-23 Albert Chu * libfreeipmi/sel/ipmi-sel-string.c (_output_oem_record_data): Output record type under verbose mode. (Feature recommended by Rob Swindell - swindell at broadcom dot com). 2013-09-18 Albert Chu Merge branch intelnm20 ; Add support for Intel Node Manager 2.0. * libfreeipmi/sel/ipmi-sel-string-intel-node-manager.c: Support changes to Intel NM 2.0 events and add new Intel NM 2.0 events. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-event-reading-type-code-oem-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-sensor-numbers-oem-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-oem-spec.h, libfreeipmi/include/freeipmi/cmds/ipmi-oem-intel-node-manager-cmds.h, libfreeipmi/include/freeipmi/api/ipmi-oem-intel-node-manager-cmds-api.h, libfreeipmi/include/freeipmi/templates/ipmi-oem-intel-node-manager-cmds-templates.h libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-comp-code-oem-spec.h: Update with changes and/or additions from Intel NM 2.0 spec. * ipmi-oem/: Support changes to commands due to Intel NM 2.0 events. * ipmi-oem/ipmi-oem-intelnm.c (_ipmi_oem_intelnm_sdr_callback), ipmi-sensors/ipmi-sensors.c (_display_sensors), libfreeipmi/sel/ipmi-sel-string-intel-node-manager.c (_intel_node_manager_sdr_callback): Comment on 2.0 no longer needing SDR searching. 2013-09-13 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h: Fix invalid hex for IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION and IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_ALERT_DESTINATION. * ipmi-oem/: Enable support of IntelNM get-node-manager-alert-destination and set-node-manager-alert-destination. 2013-08-28 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-api.h: Document mapping of IPMI completion codes and RMCPPlus codes to API error codes. * Update freeipmi libraries/tools to check/use API error codes correctly. 2013-08-27 Albert Chu Merge branch configcollapse. * ipmi-config/: New tool. * bmc-config/, ipmi-pef-config/, ipmi-sensors-config/, ipmi-chassis-config/: Remove tools. * common/configtool/: Remove common files. * common/toolcommon/: Update config file parsing to recognize ipmi-config and legacy options. * doc/, man/: Update documentation appropriately for change. 2013-08-22 Albert Chu * configure.ac, NEWS: Update for release. 2013-08-13 Albert Chu * man/bmc-config.conf.5.pre.in: Fix section typos. * man/libfreeipmi.3.pre.in, man/freeipmi.7.pre.in, man/freeipmi.conf.5.pre.in: Add missing tool. 2013-08-09 Albert Chu * doc/: Update all docs w/ dates. 2013-08-02 Albert Chu * libfreeipmi/sdr/ipmi-sdr-parse-util.c (ipmi_sdr_parse_entity_sensor_name): Handle special corner case w/ double printed name. 2013-07-03 John Gilmore * Fix compiler issues w/ gcc-2.96. 2013-07-03 Albert Chu * ipmi-sensors/ipmi-sensors-output-common.c (ipmi_sensors_get_thresholds): When thresholds access reported by SDR is fixed/unreadable, the prior interpretation was that thresholds were not available. The apparent correct interpretation is that thresholds are only unreadable via the get threshold command, but thresholds can still be read in the SDR. Code has been altered to meet this assumption. Issue discovered and proper interpretation determined by Holger Liebig . 2013-06-26 Mario Jungwirth * libipmimonitoring/ipmi_monitoring.h.in: Remove invalid declaration. 2013-06-25 Albert Chu * libfreeipmi/api/ipmi-api-util.c (api_set_api_errnum_by_bad_response), libfreeipmi/api/ipmi-api.c. libfreeipmi/include/freeipmi/api/ipmi-api.h: Support new IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED error code. 2013-06-17 Albert Chu * bmc-info/bmc-info.c (display_system_info_common): Workaround issue on Bull 510 systems. 2013-06-17 Albert Chu * man/manpage-common-troubleshooting-inband-outofband.man: New common manpage. * man/: Add inband & outofband common troubleshooting to most FreeIPMI tool manpages. 2013-05-30 Ales Ledvinka * common/toolcommon/pstdout.c (pstdout_vprintf): Fix portability bug, va_list is not a pointer type. 2013-05-29 Albert Chu * man/manpage-common-time-options.man: Fix typo. * configure.ac, NEWS: Update for release. 2013-05-16 Albert Chu * libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_get_event_messages): Fix sensor event message corner case w/ OEM sensors. 2013-05-16 Albert Chu * libfreeipmi/include/freeipmi/util/ipmi-util.h, libfreeipmi/util/ipmi-util.c (ipmi_checksum_incremental, ipmi_checksum_final): New function. * libfreeipmi/util/ipmi-util.c (_checksum): New common function. * libfreeipmi/util/ipmi-util.c (ipmi_checksum): Use _checksum common function. * libfreeipmi/sdr/: Support checksums in SDR cache files to detect corruption. 2013-05-09 Albert Chu * bmc-device/bmc-device.c (get_sel_time_utc_offset): Fix output string error. 2013-05-08 Albert Chu * libfreeipmi/interface/ipmi-network.h, libfreeipmi/interface/ipmi-network.c (ipmi_network_sendto): New function. * libfreeipmi/interface/ipmi-rmcpplus-interface.c (ipmi_rmcpplus_sendto): Call ipmi_network_sendto common function. * libfreeipmi/interface/ipmi-lan-interface.c (ipmi_lan_sendto): Call ipmi_network_sendto common function, do not pad legacy byte. 2013-05-08 Albert Chu * libfreeipmi/record-format/ipmi-fru-dimmspd-record-format.c, libfreeipmi/include/freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h: Fix mistakes in tmpl_fru_dimm_spd_ddr3_record template. * ipmi-fru/ipmi-fru-output.h, ipmi-fru/ipmi-fru-output.c: Fix area length from uint8_t to unsigned int globally. * ipmi-fru/ipmi-fru-output.c (ipmi_fru_output_dimm): Fix object creation corner case. * libfreeipmi/util/ipmi-jedec-manufacturer-identification-code-util.c (ipmi_jedec_manufacturer_id_search): Fix parameter check corner case. 2013-05-08 Albert Chu * libfreeipmi/include/freeipmi/util/ipmi-timestamp-util.h, libfreeipmi/util/ipmi-timestamp-util.c (ipmi_timestamp_string): Support specific UTC offset being specified. * ipmi-fru/, bmc-device/, ipmi-sel/, ipmi-sensors/, ipmi-dcmi/, ipmi-oem/: Support new --utc-offset option. * common/toolcommon/: Support new options and config file options appropriately. * man/: Update for new option. 2013-05-07 Albert Chu Merge branch 'utcoffsetcmd' * libfreeipmi/util/ipmi-timestamp-util.c (ipmi_timestamp_string): Make default output unconverted. * libfreeipmi/util/ipmi-timestamp-util.c (ipmi_timestamp_string): Support UTC_TO_LOCALTIME and LOCALTIME_TO_UTC flag to allow user to specify if time is actually UTC. * ipmi-fru/, bmc-device/, ipmi-sel/, ipmi-sensors/, ipmi-dcmi/, ipmi-oem/: Support new --utc-to-localtime and --localtime-to-utc options. * common/toolcommon/: Support new options and config file options appropriately. * man/: Update for new options. 2013-05-06 Albert Chu * libfreeipmi/: Get SEL Time UTC Offset and Set SEL Time UTC Offset payloads. * bmc-device/: Support --get-sel-time-utc-offset and -set-sel-time-utc-offset. 2013-05-06 Peter Volkov * configure.ac: Update for autoconf 1.14. 2013-05-03 Albert Chu Merge 9651:9663 branch 'ddr3' Add support to interpret DDR3 SDRAM memory modules * libfreeipmi/include/freeipmi/record-format/ipmi-fru-dimmspd-record-format.h, libfreeipmi/record-format/ipmi-fru-dimmspd-record-format.c, libfreeipmi/include/freeipmi/templates/ipmi-fru-dimmspd-record-format-templates.h: New files. * libfreeipmi/include/freeipmi/spec/ipmi-jedec-manufacturer-identifcation-code-spec.h, libfreeipmi/spec/ipmi-jedec-manufacturer-identifcation-code-spec.c, libfreeipmi/include/freeipmi/util/ipmi-jedec-manufacturer-identifcation-code-util.h, libfreeipmi/util/ipmi-jedec-manufacturer-identifcation-code-util.c: New files. * libfreeipmi/include/freeipmi/fru/ipmi-fru.h, libfreeipmi/fru/ipmi-fru.c, libfreeipmi/fru/ipmi-fru-defs.h: Support IPMI_FRU_FLAGS_READ_RAW flag and IPMI_FRU_AREA_TYPE_RAW_DATA. * ipmi-fru/ipmi-fru.c (_print_except_default_fru_cb): Add additional bridging case. * ipmi-fru/: Support FRU output of DDR3 SDRAM dimms. 2013-05-02 Albert Chu * libfreeipmi/sel/ipmi-sel-string.c (_output_date): Fix memory buffer overrun (Bug location found by Rob Swindell - swindell at broadcom dot com). 2013-04-30 Albert Chu Merge branch 'timestampspecial' Handle special case timestamps such as 0xFFFFFFFF and timestamps < 0x2000000, per chapter 37 of IPMI specification. * libfreeipmi/include/freeipmi/spec/ipmi-timestamp-spec.h: New file. * libfreeipmi/include/freeipmi/util/ipmi-timestamp-util.h, libfreeipmi/util/ipmi-timestamp-util.c: New timestamp utility files. * ipmi-fru/, bmc-device/, ipmi-sel/, ipmi-sensors/, ipmi-dcmi/, ipmi-oem/, libfreeipmi/sel/: Use new timestamp utility function. 2013-04-29 Albert Chu Merge branch 'fru12' Update for FRU Storage Definition Revision 1.2. * libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h: Define new macro IPMI_FRU_MFG_DATE_TIME_UNSPECIFIED and IPMI_FRU_PEAK_CAPACITY_UNSPECIFIED. * ipmi-fru/ipmi-fru-output.c (ipmi_fru_output_board_info_area): Output manufacturing time as unspecified as appropriate. * ipmi-fru/ipmi-fru-output.c (ipmi_fru_output_power_supply_information): Output peak capacity as unspecified as appropriate. * libfreeipmi/include/freeipmi/spec/ipmi-fru-chassis-types-spec.h, libfreeipmi/spec/ipmi-fru-chassis-types-spec.c: Add new chassis types. * libfreeipmi/include/freeipmi/fru/ipmi-fru.h, libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h, libfreeipmi/fru/ipmi-fru.c (_read_multirecord_area_data): Update * libfreeipmi/include/freeipmi/fru/ipmi-fru.h, libfreeipmi/fru/ipmi-fru-data.c (ipmi_fru_multirecord_power_supply_information): Return low/high end input voltage ranges as signed integers. * ipmi-fru/: Output low/high end voltage ranges as signed integers. * libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h, libfreeipmi/record-format/ipmi-fru-information-record-format.c: Support tmpl_fru_extended_dc_output and tmpl_fru_extended_dc_load templates. * libfreeipmi/include/freeipmi/fru/ipmi-fru.h, libfreeipmi/fru/ipmi-fru-data.c (ipmi_fru_multirecord_extended_dc_output, ipmi_fru_multirecord_extended_dc_load): New functions. * ipmi-fru/: Support output of extended DC output and extended dc load. 2013-04-26 Albert Chu Merge branch 'sendto' Modify architecture to send IPMI 1.5 network packets via one function and IPMI 2.0 network packets via another function. IPMI 1.5 packets must be padded for legacy reasons, however IPMI 2.0 packets should not be padded. (Issue discovered by Rob Swindell - swindell at broadcom dot com). * libfreeipmi/include/freeipmi/interface/ipmi-rmcpplus-interface.h, libfreeipmi/interface/ipmi-rmcpplus-interface.c (ipmi_rmcpplus_sendto, ipmi_rmcpplus_recvfrom): New functions to handle non-legacy pad in IPMI 2.0. * libfreeipmi/interface/ipmi-network.h, libfreeipmi/interface/ipmi-network.c: New files. * libfreeipmi/interface/ipmi-lan-interface.c (ipmi_lan_recvfrom): Adjust to use new common function. * libfreeipmi/api/ipmi-lan-session-common.c (_api_lan_2_0_cmd_send): Use new ipmi_rmcpplus_sendto. * ipmipower/, libipmiconsole/ : Support sending packets via ipmi_lan_sendto or ipmi_rmcpplus_sendto. 2013-04-26 Albert Chu * Globally fix copyright years from ending in 2012 to ending in 2013. 2013-04-25 Albert Chu * libfreeipmi/interface/ipmi-rmcpplus-interface.c (_construct_payload_confidentiality_aes_cbc_128): Fix confidentiality trailer pad calculation corner case. (Bug location found by Rob Swindell - swindell at broadcom dot com). 2013-04-25 Albert Chu * Support HP Proliant DL160 G8 OEM sensors. 2013-04-24 Albert Chu * ipmi-dcmi/ipmi-dcmi.c (_sensor_info_output): Fix output calculation errors. (Bug location found by Michael Winiarski - michael dot winiarski at hp dot com). 2013-04-24 Albert Chu * libfreeipmi/cmds/ipmi-dcmi-cmds.c: Fix null terminator on tmpl_dcmi_rolling_average_time_period (Recommended fix by Michael Winiarski - michael dot winiarski at hp dot com). 2013-04-18 Albert Chu * libipmiconsole/ipmiconsole_processing.c (_process_protocol_state_activate_payload_sent): Change "BMC Error" to "SOL Inuse" error message. 2013-04-03 Albert Chu * doc/freeipmi-faq.texi: Note kernel driver issue. 2013-03-25 Peter Volkov * Fix out of trunk source build. 2013-03-11 Holger Liebig * ipmi-dcmi/: Output temperature sampling period appropriately. * libfreeipmi/cmds/ipmi-dcmi-cmds.c: Update tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs with newer optional fields. 2013-03-08 Albert Chu * Add support for Supermicro X9SCM-iiF OEM sensors/events. 2013-03-08 Albert Chu * man/ipmi-sensors.8.pre.in: Fix typo (Found by Werner Fischer). 2013-02-28 Anonymous * libfreeipmi/sel/ipmi-sel-string-intel.c (sel_string_output_intel_event_data2_event_data3): Fix string overflow. 2013-02-21 Albert Chu * Add support for Supermicro X9SPU-F-0 OEM sensors/events. * Add support for Supermicro X9DRI-LN4F+ OEM interpretations (forgotten earlier). 2013-01-22 Albert Chu * bmc-config/bmc-config.c (_bmc_config), ipmi-pef-config/ipmi-pef-config.c (_ipmi_pef_config), ipmi-chassis-config/ipmi-chassis-config.c (_ipmi_chassis_config), ipmi-sensors-config/ipmi-sensors-config.c (_ipmi_sensors_config): If only non-fatal errors occurred during operation, exit with status 1. Exit with status 2 on fatal errors. * man/manpage-common-config-diagnostics.man: New file. * man/bmc-config.8.pre.in, man/ipmi-sensors-config.8.pre.in, man/ipmi-chassis-config.8.pre.in, man/ipmi-pef-config.8.pre.in: Update for changes in exit value behavior. 2013-01-22 Albert Chu * man/manpage-common-config-tool-options.man: Add clarification about use w/ hostranges and hostrange options. 2013-01-22 Albert Chu * common/toolcommon/pstdout.h, common/toolcommon/pstdout.c (pstdout_vprintf, pstdout_vfprintf): New functions. * common/configtool/config-tool-utils.h, common/configtool/config-tool-utils.c (config_pstdout_fprintf): New function. * common/configtool/config-tool-checkout.c, common/configtool/config-tool-comment.c: Call config_pstdout_fprintf instead of pstdout_fprintf to deal with corner case when user specifys filename with --filename option in config tools. 2013-01-09 Albert Chu Fix bugs found by static code analysis done by Redhat/Fedora. * ipmidetect/ipmidetect-argp.c (_read_nodes_from_stdin): Fix potential NUL termination corner case. * libfreeipmi/sel/ipmi-sel-string-intel.c (sel_string_output_intel_event_data3_discrete_oem) (sel_string_output_intel_event_data2_event_data3): Fix potential initialization bug. * libfreeipmi/interface/rmcp-interface.c (assemble_rmcp_pkt): Fix copy and paste error output. * libfreeipmi/api/ipmi-pef-and-alerting-cmds-api.c (ipmi_cmd_alert_immediate): Fix cut and paste bug. * libfreeipmi/api/ipmi-api.c (ipmi_ctx_destroy): Fix memset size bug. * libfreeipmi/api/ipmi-lan-session-common.c (api_lan_2_0_cmd_wrapper): Add assert to protect against potential API mis-call and subsequent segfault. * libfreeipmi/util/ipmi-util.c (ipmi_get_random): Fix potential fd leak. * bmc-info/bmc-info.c (display_channel_info): Add missing break. * ipmi-pet/ipmi-pet.c (_ipmi_pet_form_sel_record): Fix unsigned vs signed int mis-assignment. * ipmiseld/ipmiseld.c (_alloc_host_data): Fix error case mem-leak. * bmc-watchdog/bmc-watchdog-argp.c (cmdline_parse): Add missing break; * ipmi-oem/ipmi-oem-intel.c (ipmi_oem_intel_set_power_restore_delay): Fix invalid shift. 2012-01-09 Albert Chu * common/miscutil/heap.c (heap_insert, heap_pop): Fix mutex unlock corner case on error cases. * common/miscutil/heap.c: Remove unused legacy code. 2012-12-05 Albert Chu * Add support for Supermicro X9DRI-LN4F+ OEM sensors/events. 2012-10-29 Albert Chu * man/: Fix typos. 2012-10-10 Albert Chu * libipmiconsole/: IPMICONSOLE_DEBUG_FILE now dumps to current working directory instead of /var/log. This is a debug feature and not a logging feature. 2012-10-09 Dave Walker , * common/toolcommon/tool-daemon-common.c (daemonize_common): Check read and write for errors. 2012-10-05 Albert Chu * libfreeipmi/, libipmiconsole/, libipmimonitoring/, common/parsecommon/, man/: Support new NO_CHECKSUM_CHECK/nochecksumcheck workaround to deal with Supermicro motherboards that incorrectly calculate packet checksums. 2012-10-04 Albert Chu Add OEM extension support for Dell Poweredge R720 * ipmi-oem/: Support Dell get-nic-selection-failover, set-nic-selection-failover, power-monitoring-over-interval, power-monitoring-interval-range, get-blade-slot-info, get-last-post-code. Support new version of active-lom-status for R720. Support Dell specific OEM completion codes. * libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h: Add updates based on Dell documentation. * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: Update for new R720. * libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_get_oem_sensor_type_message): Support Dell R720. * libfreeipmi/sel/ipmi-sel-string-dell.c: Update for new SEL events in Dell R720. Handle a few additional R610/R710 cases that were missed in earlier changes. 2012-09-27 Albert Chu * man/manpage-common-workaround-extra-text.man: Fix typo. 2012-09-21 Albert Chu * libfreeipmi/debug/ipmi-debug.c (ipmi_obj_dump): Always output SDR and SEL record data in byte array format. * libfreeipmi/fiid/fiid.c (fiid_obj_get): Fix value retrieval corner case, most notably coming up in debug output. 2012-09-20 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.h: Create payload instance macros. * libfreeipmi/cmds/ipmi-rmcpplus-support-and-payload-cmds.c (fill_cmd_activate_payload) (fill_cmd_activate_payload_sol, fill_cmd_deactivate_payload) (fill_cmd_suspend_resume_payload_encryption) (fill_cmd_get_payload_instance_info): Add payload instance parameter check. * libipmiconsole/ (ipmiconsole_ctx_set_config) (ipmiconsole_ctx_get_config): New functions. * libipmiconsole/: Support IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE configuration option. Support IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES behavior flag. * libipmiconsole/: Report BMC_BUSY if SOL activation limit reached. * ipmiconsole/: Add --sol-payload-instance and --deactivate-all-instances options. * doc/freeipmi-testing.txt, doc/freeipmi-bugs-issues-and-workarounds.txt: Update with SOL instance discoveries. 2012-09-11 Albert Chu * libipmiconsole/ipmiconsole.h.in: Fix comment English. 2012-09-07 Claudio Cesar Sanchez Tejeda * ipmiseld/ipmiseld-common.c: Fix "format not a string literal and no format arguments" issue. 2012-08-15 Albert Chu * libfreeipmi/sdr/ipmi-sdr-cache-create.c (_sdr_cache_get_record): Add workaround for Xyratex motherboard issue. * libfreeipmi/interpret/: Add sensor/sel interpretations for OS boot, System Event Transition State, Platform Alert State, Boot Error State, and OS Critical Stop State. * Globally support "noauthcodecheck" workaround to deal with issues on Xyratex HB-F8-SRAY. * Globally handle IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED error when returned from activate session to deal with issues on Xyratex HB-F8-SRAY. 2012-08-09 Albert Chu * man/ipmi-oem.8.pre.in: Clarify configuration in IntelNM. 2012-08-08 Albert Chu * doc/freeipmi-faq.texi: Add section on common differences. 2012-08-07 Albert Chu * libfreeipmi/: For consistency to other changes, rename 'fru-parse' sub-library in libfreeipmi to 'fru' library. All appropriately function names, macros, etc. updated appropriately. * ipmi-pet/, ipmi-fru/: Update appropriately. * libfreeipmi/fru/ipmi-fru.c, libfreeipmi/include/freeipmi/fru/ipmi-fru.h (ipmi_fru_read_multirecord_record_type_id): New function. Rename from ipmi_fru_read_multirecord_record_type. 2012-08-06 Albert Chu * Merge intelnm15 branch. * ipmi-oem/: Add IntelNM get-node-manager-capabilities, node-manager-policy-control, get-node-manager-policy, set-node-manager-policy, remove-node-manager-policy, get-node-manager-alert-thresholds, set-node-manager-alert-thresholds, get-node-manager-policy-suspend-periods, set-node-manager-policy-suspend-periods, set-node-manager-power-draw-range, get-node-manager-alert-destination, set-node-manager-alert-destination. * libfreeipmi/: Fix Intel NM bugs. * ipmi-pef-config/: Support volatile alert string 0 and lan alert destination 0. 2012-08-03 Albert Chu * doc/freeipmi-faq.texi: Add Wistron to OEM list. 2012-07-31 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h, ipmi-oem/: Fix macro naming. * ipmi-oem/: Support Wistron read/write/clear-proprietary-string. * ipmi-fru/: Support Wistron OEM FRU record. * libfreeipmi/fru-parse/ipmi-fru-parse.c, libfreeipmi/include/freeipmi/fru-parse/ipmi-fru-parse.h (ipmi_fru_parse_read_multirecord_record_type): New function. * libfreeipmi/include/freeipmi/record-format/ipmi-fru-oem-record-format.h: New file. 2012-07-30 Albert Chu * configure.ac: Prep for beta release. * README, man/freeipmi.7.pre.in: Update with ipmiseld information. * libfreeipmi/include/Makefile.am: Add missing files. 2012-07-27 Albert Chu * ipmi-sensors/: Support --output-sensor-thresholds. 2012-07-26 Albert Chu * man/ipmi-oem.8.pre.in: Add motherboard support information. 2012-07-24 Albert Chu * Fix error output message after confirmation from vendor on text. 2012-07-23 Albert Chu * ipmi-oem/ipmi-oem-intelnm.c: Use _ipmi_oem_intelnm_bad_completion_code in additional situation. 2012-07-19 Albert Chu * ipmi-oem/: Add intelnm get-node-manager-capabilities. * libfreeipmi/: Adjust some intel NM fields/macro names for correctness based on Intel NM spec. Fix several bugs in Intel NM implementation. 2012-07-19 Albert Chu * ipmi-oem/: Fix and support Wistron set-password-policy. 2012-07-18 Albert Chu * ipmi-oem/: Remove Wistron get-password-policy. 2012-07-16 Albert Chu * ipmi-oem/ipmi-oem-intelnm.c (_ipmi_oem_intelnm_bad_completion_code): Handle bad completion code commonly for all Intel NM. * ipmi-oem/: Support Wistron get/set-password-policy. 2012-07-13 Albert Chu * libfreeipmi/include/freeipmi/sdr/ipmi-sdr-oem.h, libfreeipmi/sdr/ipmi-sdr-oem.c: New files. * ipmi-sensors/ipmi-sensors.c, ipmi-sensors/ipmi-sensors-oem-intel-node-manager.c, ipmi-oem/ipmi-oem-intelnm.c, libfreeipmi/sel/ipmi-sel-string-intel-node-manager.c: Use new ipmi_sdr_oem_parse_intel_node_manager. * libfreeipmi/api/: Increase default ipmb timeout. 2012-07-10 Albert Chu Add new tool ipmiseld. * ipmiseld/: New tool. * common/, etc/, man/: Add new manpage entries, init scripts, config files, as needed. * man/manpage-common-troubleshooting-sel.man: Create new common SEL troubleshooting common manpage. * config/ac_ipmiseld_cache_dir.m4, config/ac_ipmiseld_config_file.m4: New files. * man/, freeipmi.spec.in, configure.ac: Update appropriately for new tool. * libfreeipmi/include/freeipmi/api/ipmi-api.h, libfreeipmi/api/ipmi-api.c: Move some internal macros to ipmi-api.h so apps know default values. 2012-07-10 Albert Chu Support OEM extensions for Wistron / Dell Poweredge C6220. * libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h: Rename several macros for use clarity. * ipmi-oem/: Add Wistron OEM extension commands. * ipmi-oem/ipmi-oem-thirdparty.h, ipmi-oem/ipmi-oem-thirdparty.c (ipmi_oem_thirdparty_get_system_info_block_pstring): New function. * ipmi-oem/ipmi-oem-dell.c (_get_dell_system_info_long_string): Use new common function ipmi_oem_thirdparty_get_system_info_block_pstring. * ipmi-sensors/: Support OEM SDR record output details. 2012-07-10 Albert Chu * Fix up 'make dist' to not distribute files generated by configure. 2012-07-09 Albert Chu * freeipmi.spec.in: Update w/ recent changes. 2012-07-06 Albert Chu * libfreeipmi/util/ipmi-sensor-util.c (ipmi_sensor_units_string): Fix units output corner case. * bmc-info/bmc-info.c (display_system_info_common): Fix not-supported completion code detection. 2012-07-05 Albert Chu * ipmi-oem/: Tweak logic of Ipmi_oem_comp_code_strerror callback. 2012-07-05 Albert Chu * Add support for assume max record sdr record count. 2012-07-03 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-oem.h: Add additional Poweredge details. 2012-06-28 Albert Chu * ipmi-oem/ipmi-oem-dell.c (ipmi_oem_dell_get_system_info): Fix error output corner case. 2012-06-26 Albert Chu * man/ipmi-oem.8.pre.in: Fix vendor specific documentation error. 2012-06-25 Albert Chu * ipmi-oem/: Move more macros to ipmi-oem-spec.h. General code cleanup. * libfreeipmi/include/freeipmi/spec/ipmi-channel-spec.h: Add additional macros. * bmc-info/, bmc-config/, ipmi-pef-config/: Use new macros appropriately. 2012-06-21 Albert Chu * common/toolcommon/tool-config-file-common.c: Fix casting bug w/ signed vs unsigned ints. * Make all verbose_count variables in tools unsigned ints. 2012-06-18 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-oem-spec.h: New file. * ipmi-oem/: Migrate various information into new ipmi-oem-spec.h file and libfreeipmi/include/spec/ipmi-system-info-parameters-oem-spec.h. * ipmipower/, libfreeipmi/sel/: Use new macros in ipmi-oem-spec.h. * ipmi-oem/ipmi-oem-thirdparty.h, ipmi-oem/ipmi-oem-thirdparty.c: New files. * ipmi-oem/ipmi-oem-inventec.c, ipmi-oem/ipmi-oem-quanta.c: Migrate some commmon functions to ipmi-oem-thirdparty.c and ipmi-oem-thirdparty.h. 2012-06-15 Albert Chu * libfreeipmi/interpret/: Support new interpretations based on sensors found on IBM X3850 X5: Version Change, System Firmware Progress Transition Severity, Button/Switch Transition Severity, Chassis Transition Severity, POST Memory Resize State, Cable/Interconnect Transition Severity, Boot Error Transition Severity, Slot Connector Transition Severity, Memory State, and Memory Transition Severity. * etc/freeipmi_interpret_sel.conf, etc/freeipmi_interpret_sensor.conf, man/: Update appropriately for changes. * etc/, man/: Add missing documentation. 2012-06-07 Albert Chu * libfreeipmi/sdr/ipmi-sdr-cache-create.c (ipmi_sdr_cache_create): Fix slight logic bug with cache_create_flags. 2012-06-06 Albert Chu * common/toolcommon/Makefile.am: Fix build bug. 2012-06-05 Albert Chu * common/miscutil/conffile.c, libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c, libfreeipmi/util/ipmi-sensor-util.c, libfreeipmi/util/ipmi-device-types-util.c, : Fix -Wformat-security warnings. 2012-06-04 Yaroslav Halchenko * man/ipmi-oem.8.pre.in: Minor tune ups. 2012-06-01 Albert Chu Merge branch intels2600jfrevision * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h, libfreeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.c: Update event messages for Intel S2600JF based on documentation changes from Intel. 2012-06-01 Albert Chu * Add support for Supermicro X9DRi-F OEM sensors/events. 2012-05-31 Albert Chu * common/toolcommon/tool-daemon-common.h, common/toolcommon/tool-daemon-common.c (daemon_sleep): New function. * bmc-watchdog/: Use new common functions. * ipmidetectd/ipmidetectd.c: Shutdown cleanly on signals. 2012-05-30 Albert Chu * man/, etc/: Add forgotten config entries. 2012-05-29 Albert Chu * man/ipmi-sel.8.pre.in: Fix typo. * common/toolcommon/tool-config-file-common.c: Fix parsing for target-slave-address. 2012-05-29 Albert Chu * common/parsecommon/parse-common.h, common/parsecommon/parse-common.c (parse_get_freeipmi_outofband_flags, parse_get_freeipmi_outofband_2_0_flags, parse_get_freeipmi_inband_flags): New functions. * bmc-watchdog/, common/toolcommon/: Use new convenience functions appropriately. 2012-05-26 Albert Chu * man/manpage-common-troubleshooting-sel.man: New file. * man/ipmi-sel.8.pre.in: Update for new common file. 2012-05-26 Albert Chu * bmc-config/, ipmi-pef-config/, ipmi-sensors-config/, ipmi-chassis-config/: Fix bug in which cipher suite ID input was not allowed. * man/manpage-common-sdr-options.man: Add extra info for sdr-cache-file option. * common/toolcommon/, man/: Undo split of SDR option "sdr-cache-directory" into separate macro/man option. * common/toolcommon/, man/: Split SDR option "sdr-cache-file" and "sdr-cache-directory" into separate macros/man files. * man/manpage-common-sdr-options-heading.man, man/manpage-common-sdr-options-file-directory.man: New files. Split off from man/manpage-common-sdr-options.man. * man/manpage-common-sdr-cache-options-heading.man, man/manpage-common-sdr-cache-file-directory.man, man/manpage-common-sdr-cache-ignore.man: New renamed files. * man/: Update manpages appropriately for new files. 2012-05-26 Albert Chu * ipmi-pet/ipmi-pet-argp.c: Fix argp output, ipmi-pet does not take hostranged arguments. * common/toolcommon/tool-cmdline-common.h: Code cleanup. 2012-05-25 Albert Chu * common/toolcommon/tool-sensor-common.h, common/toolcommon/tool-sensor-common.c (valid_sensor_types): Remove unused parameters. * ipmi-sensors/, ipmi-sel/: Update for changes. * ipmi-pet/ipmi-pet.c (_ipmi_pet): Destroy interpret_ctx during cleanup. 2012-05-24 Albert Chu * common/toolcommon/tool-sensor-common.h, common/toolcommon/tool-sensor-common.c (parse_sensor_types): New common function. * ipmi-sensors/, ipmi-sel/: Use common function appropriately. * common/toolcommon/tool-event-common.h, common/toolcommon/tool-event-common.c (event_data_info): Remove function. * ipmi-sel/: Update for changes. 2012-05-24 Albert Chu * libipmimonitoring/: Support entity sensor names flags. * contrib/libipmimonitoring/: Update with new flags options. * libfreeipmi/sdr/: Support stack of saving offsets when calls to ipmi_sdr_cache_iterate are made. 2012-05-24 Albert Chu * libipmimonitoring/ipmi_monitoring.h.in: Fix bug in ASSUME_BMC_OWNER bitmask. 2012-05-24 Albert Chu * Deprecate use of --skip-checks in ipmi-fru in favor of "skipchecks" workaround flag. * Deprecate use of --assume-system-event-records in ipmi-sel in favor of "assumesystemevent" workaround flag. 2012-05-23 Albert Chu * libfreeipmi/include/freeipmi/sel/ipmi-sel.h, libfreeipmi/sel/ipmi-sel.c (ipmi_sel_ctx_set_parameter, ipmi_sel_ctx_get_parameter): New functions. * libfreeipmi/include/freeipmi/sel/ipmi-sel.h, libfreeipmi/sel/ipmi-sel.c (ipmi_sel_ctx_set_interpret): Removed function. * ipmi-sel/, ipmi-pet/: Adjust for lib changes. * common/toolcommon/, ipmi-sensors/, libfreeipmi/sel/, libipmimonitoring/: Use ipmi_sdr_parse_sensor_name as needed. 2012-05-22 Albert Chu * libfreeipmi/interpret/: Support Supermicro OEM SEL event interpretations. * libfreeipmi/interpret/ipmi-interpret-config-sel.c, etc/freeipmi_interpret_sel.conf: Fix comment typos. * libfreeipmi/include/freeipmi/sdr/ipmi-sdr.h, libfreeipmi/sdr/ipmi-sdr-parse-util.c (ipmi_sdr_parse_sensor_name): New function. 2012-05-22 Albert Chu * libfreeipmi/include/freeipmi/sel/ipmi-sel.h, libfreeipmi/sel/: Support interpretation of event in sel library. Support %I string output. * common/toolcommon/tool-event-common.h, common/toolcommon/tool-event-common.c (event_load_event_state_config_file): New function. * Globally update tools as necessary for changes. 2012-05-22 Albert Chu * common/toolcommon/tool-sdr-cache-common.h, common/toolcommon/tool-sdr-cache-common.c (sdr_cache_setup_debug): Remove function. Fold into sdr_cache_create_and_load. * Globally update tools as necessary for changes. 2012-05-21 Albert Chu * libfreeipmi/include/freeipmi/sel/ipmi-sel.c, libfreeipmi/sel/: Support IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES flag. * Adjust tools and common/toolcommon for new option. 2012-05-21 Albert Chu Merge branch entitysensornamesredo. * libfreeipmi/include/freeipmi/sdr/, libfreeipmi/sdr/: Support new stats functions to compile useful info from the SDR. * common/toolcommon/tool-sensor-common.h, common/toolcommon/tool-sensor-common.c: Update for new SDR stats functions. * Globally update tools as necessary for changes. * libfreeipmi/include/freeipmi/util/ipmi-sensor-units-util.h, libfreeipmi/include/freeipmi/util/ipmi-sensor-units-util.c: Remove files. Collapse code into ipmi-sensor-util.h and ipmi-sensor-util.c. * libfreeipmi/include/freeipmi/sdr/ipmi-sdr.h (ipmi_sdr_parse_entity_sensor_name): New function. * libfreeipmi/sdr/ipmi-sdr-parse-util.c: New file. * libfreeipmi/include/freeipmi/spec/ipmi-entity-ids-spec.h: Support system and device relative entity instance number macros. * libfreeipmi/sel/ipmi-sel.c (ipmi_sel_ctx_create): Use ipmi_sdr_cache_sdr_version instead of ipmi_sdr_cache_first to check for open SDR for reading. * Globally update tools as necessary for new functions. * libfreeipmi/sdr/ipmi-sdr-common.h, libfreeipmi/sdr/ipmi-sdr-common.c (sdr_set_current_offset): New common function. * libfreeipmi/sdr/ipmi-sdr-cache-read.c: Adjust for new common function. * libfreeipmi/sdr/ipmi-sdr-defs.h, libfreeipmi/sdr/ipmi-sdr-common.h, libfreeipmi/sdr/ipmi-sdr-common.c (sdr_save_current_offset, sdr_reset_current_offset): New common functions. * libfreeipmi/sdr/ipmi-sdr-cache-read.c (ipmi_sdr_cache_iterate): Preserve current offset/iterator point when function was called. 2012-05-17 Albert Chu Merge from branch toolcleanup2 * Globally cleanup variables and consistency of variables. Whenever referring to the common_cmd_args use common_args. When referring to command specific structs use cmd_args. 2012-05-17 Albert Chu * common/toolcommon/: Consolidate hostrange and sdr common options into the main common_cmd_args struct. * Globally update tools for changes. * common/toolcommon/tool-common.c (ipmi_open): Fix output corner case. * common/toolcommon/tool-sensor-common.h: Pick more reasonable maxes for the MAX_SENSOR_RECORD_IDS and MAX_SENSOR_TYPES macros. 2012-05-16 Albert Chu * common/toolcommon/tool-common-sensor.h, common/toolcommon/tool-sensor-common.c (list_sensor_types): Redo to not take pstate parameter. * ipmi-sensors/, ipmi-sel/: Code cleanup with use of list_sensor_type. Call before launching threads in tools since it is identical in all outputs. * ipmi-sensors/ipmi-sensors.c (_ipmi_sensors): Fix bug in which multiple workaround flags and workaround flags with bridging could not be specified. 2012-05-16 Albert Chu * ipmi-oem/ipmi-oem.c (main), bmc-device/bmc-device.c (main): Turn on quiet caching if doing communication to multiple hosts. 2012-05-16 Albert Chu * common/toolcommon/tool-sdr-cache-common.h, common/toolcommon/tool-sdr-cache-common.c (sdr_cache_flush_cache): Do not require ipmi_sdr_ctx_t parameter, create it inside function. * Globally in tools, call sdr_cache_flush_cache() before opening ipmi_open. * Globally cleanup usage of exit codes using EXIT_FAILURE and EXIT_SUCCESS appropriately. Globally in tools cleanup general exit code. 2012-05-15 Albert Chu * ipmi-pet/: Fix bugs associated with new library checks for sdr open for reading. 2012-05-15 Albert Chu Merge branch toolcleanup * common/toolsdr/tool-sdr-cache-common.h, common/toolsdr/tool-sdr-cache-common.c: Take struct sdr_cmd_args pointer as argument instead of each desired parameter. * common/toolcommon/tool-common.h, common/toolcommon/tool-common.c (ipmi_open): Take pstdout_state_t parameter and output errors instead of returning error string in buffer. * common/toolhostrange/tool-hostrange-common.h, common/toolhostrange/tool-hostrange-common.c (pstdout_setup): Take struct hostrange_cmd_args pointer as argument instead of each desired parameter. * common/toolhostrange/tool-util-common.h, common/toolhostrange/tool-util-common.c: New files, functions split off from common/toolcommon/tool-common.h and common/toolcommon/tool-common.c. * common/daemonutil/, common/tooloem/, common/toolsdr/, common/toolevent/, common/toolsensor/, common/toolhostrange/: Merge into common/toolcommon/ library. * Update tools appropriately for changes. 2012-05-15 Albert Chu * libfreeipmi/: Rename a large number of internal functions with 'ipmi' prefixes so they are not exported by libfreeipmi. 2012-05-15 Albert Chu Merge movetolib branch * libfreeipmi/include/freeipmi/sel/ipmi-sel.h, libfreeipmi/sel/ipmi-sel-string.c (_output_event_data1_event_data2_event_data3), libfreeipmi/sel/ipmi-sel-string.c (sel_parse_format_record_string): Support new '%E' for sel string outputs. * common/toolevent/tool-event-common.c (event_output_event): Use new '%E' appropriately. 2012-05-15 Albert Chu * libipmimonitoring/ipmimonitoring.map/: Explicitly list functions to avoid errant functions being made global. 2012-05-14 Albert Chu Cleanup sel-parse sub-library * Support IPMI_SEL_PARSE_ERR_SEL_ENTRIES_NOT_LOADED error code. * Properly trace all errors when debug tracing is enabled. * Condense both sets of record parsing functions into one set. * libfreeipmi/sel-parse/ipmi-sel-parse-common.h, libfreeipmi/sel-parse/ipmi-sel-parse-common.c (sel_parse_get_previous_state_or_severity): Change to _get_previous_state_or_severity and put in libfreeipmi/sel-parse/ipmi-sel-parse-string.c. * libfreeipmi/interpret/, common/toolevent/, ipmi-sel/, ipmi-pet/: Update appropriately for changes. * Convert the 'sel-parse' library to 'sel'. * ipmi-sel/ipmi-sel.h: Rename to ipmi-sel_.h to avoid naming conflict. 2012-05-14 Albert Chu * Various code cleanup when calling ipmi_sdr_cache_iterate callbacks. 2012-05-13 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-api.h, libfreeipmi/api/ipmi-api.c (ipmi_ctx_get_target): New function. * libfreeipmi/sel-parse/ipmi-sel-parse.c (ipmi_sel_parse_ctx_create): Check that sdr is open for reading and ipmi_ctx open. * libfreeipmi/fru-parse/ipmi-fru-parse.c (ipmi_fru_parse_ctx_create): Check that ipmi_ctx is open. * libfreeipmi/sensor_read/ipmi-sensor_read.c (ipmi_sensor_read_ctx_create): Check that ipmi_ctx is open. * ipmi-sel/: Update for API changes. 2012-05-12 Albert Chu Merge sdrrearch branch. * libfreeipmi/include/freeipmi/sdr/ipmi-sdr.h, libfreeipmi/sdr: Turn sdr-cache libfreeipmi sub-library into sdr sub-library. * libfreeipmi/include/freeipmi/sdr-parse/ipmi-sdr-parse.h, libfreeipmi/sdr-parse: Remove sub-library. Fold into sdr sub-library. Support ability to call parsing functions w/o passing in sdr buffer and using internal buffer during iteration. * libfreeipmi/include/sdr/ipmi-sdr.h, libfreeipmi/sdr/ipmi-sdr-cache-read.c (ipmi_sdr_cache_iterate): New function. * common/toolsdr/tool-sdr-cache-common.h, common/toolsdr/tool-sdr-cache-common.c (sdr_cache_setup_debug): New common function for many tools. * Globally adjust tools and libraries for changes. 2012-05-11 Albert Chu * Support --target-channel-number and --target-slave-address options for all inband activities. 2012-05-10 Albert Chu Merge branch frubrudge * ipmi-fru/: If builtin FRU device has SDR entry, output SDR entry name instead of fixed string. * libfreeipmi/include/freeipmi/sdr-parse/ipmi-sdr-parse.h, libfreeipmi/sdr-parse/ipmi-sdr-parse.c (ipmi_sdr_parse_management_controller_device_locator_parameters): Support ability to parse all fields from a managemnet controller deivce locator record. * ipmi-sensors/ipmi-sensors-detailed-output.c (_detailed_output_management_controller_device_locator_record): Output more information about Management Controller Device Records. * ipmi-fru/: Support --bridge-fru option. * libfreeipmi/fru-parse/ipmi-fru-parse.c (_read_fru_data): Handle message timeout errors when bridging. * libfreeipmi/fru-parse/ipmi-fru-parse.c: Check ipmi ctx errnum before checking for bad completion codes. * common/toolcommon/, man/, etc/: Update with new option support appropriately. * libfreeipmi/api/ipmi-kcs-driver-api.c (ipmi_kcs_cmd_api_ipmb): Sleep a little bit between re-reads to limit spinning. 2012-05-10 Albert Chu * libfreeipmi/fru-parse/ipmi-fru-parse.c (_read_fru_data): Handle additional device busy errors. 2012-05-10 Albert Chu * libfreeipmi/api/ipmi-api.c: End bridging when closing ipmi session. Do not support setting bridging targets when session not open. Do not require setting both channel and rs_addr, pick appropriate default when only one is set. Do not turn on bridging if user configures defaults. * libfreeipmi/include/freeipmi/api/ipmi-api.h: Update comments. 2012-05-09 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-api.h, libfreeipmi/api/ipmi-api.c (ipmi_ctx_set_target): New function. * libfreeipmi/api/: Support ability to run bridged IPMI commands without having to call _ipmb equivalent functions. * libfreeipmi/api/: Various code cleanup. 2012-05-08 Albert Chu * libfreeipmi/include/freeipmi/templates/ipmi-oem-intel-node-manager-cmds-templates.h, libfreeipmi/cmds/ipmi-oem-intel-node-manager-cmds.c: Fix field name typo (Found by Werner Fischer). 2012-05-08 Thomas Renninger * etc/ipmidetectd.init: Fix start run levels. 2012-05-07 Albert Chu * libfreeipmi/sdr-cache/ipmi-sdr-cache-create.c (ipmi_sdr_cache_create): Fix error code return value. 2012-05-07 Albert Chu * common/toolevent/tool-event-common.c (event_output_event): Remove dead code. * sel-parse/ipmi-sel-parse-string.c (_output_event_data2_event_data3): Remove dead code. 2012-05-06 Albert Chu * Add Supermicro H8DGU-F support for ipmi-sel and interpret library. * Update docs for Supermicro H8DGU-F support. 2012-05-06 Diego Elio Pettenò * Add support for Supermicro H8DGU-F to ipmi-sensors. 2012-05-06 Albert Chu * ipmidetect/ipmidetect_.h, common/daemonutil/daemon-util.c: Remove unnecessary includes. (Found by Diego Elio Pettenò) 2012-05-05 Albert Chu * ipmiconsole/ipmiconsole-argp.c (ipmiconsole_argp_parse): Fix password length check bug. (Found by Diego Elio Pettenò) 2012-05-04 Albert Chu * common/toolcommon/, man/: Split SDR option "sdr-cache-directory" into separate macro/man option. * ipmidetectd/: Rename files for consistency to other parts of FreeIPMI. * toolevent/tool-event-common.c: Allow NULL for column_width input as long as output will be comma separated. Allow NULL for entity_id_counts if entity_sensor_names not desired. 2012-05-03 Albert Chu * ipmidetectd/ipmidetectd_config.c (_usage): Fix cut and paste typo. 2012-05-03 Albert Chu * common/daemonutil/daemon-util.h, common/daemonutil/daemonutil.c: New files and convenience library. * bmc-watchdog/, ipmidetectd/: Utilize new common library. Various code cleanup as needed. * ipmidetectd/ipmidetectd_loop.h, ipmidetectd/ipmidetectd_loop.c: Remove files. Collapse code in ipmidetectd.c. * ipmidetectd/ipmidetectd_argp.h, ipmidetectd/ipmidetectd_argp.c: New files. * ipmidetectd/: Various code re-org for consistency to rest of FreeIPMI. * ipmidetect/ipmidetect_.h, ipmidetect/ipmidetect-argp.h, ipmidetect/ipmidetect-argp.c: New files. * ipmidetect/: Various code re-org for consistency to rest of FreeIPMI. 2012-05-02 Albert Chu * man/ipmidetectd.8.pre.in: Document that errors are logged to syslog. * ipmidetectd/: Use miscutil error libraries instead of internal debug functions. * ipmidetectd/ipmidetectd_debug.h, ipmidetectd/ipmidetectd_debug.c: Remove files. 2012-05-02 Albert Chu Merge branch bmcwatchdogrearch. Rearch bmc-watchdog to use all new libraries available to it, make it more consistent to other daemons, and properly reflect features/options. * libfreeipmi/api/: Support new IPMI_ERR_DRIVER_BUSY error code to return when a driver is busy. * common/toolcommon/, bmc-watchdog/: Use miscutil common error handling functions and properly syslog some initialize errors when running as daemon. Utilize libfreeipmi api when appropriate instead of bmc-watchdog specific functions. Remove support for --logfile, all logs go to syslog now. Support --verbose-logging. Various code cleanup for consistency to rest of FreeIPMI and other changes. * etc/bmc-watchdog.logrotate, config/ac_bmc_watchdog_logfile.m4: Remove files. * freeipmi.spec.in, configure.ac, etc/Makefile.am, etc/freeipmi.conf, man/bmc-watchdog.8.pre.in, man/freeipmi.conf.5.pre.in: Update appropriately for changes. 2012-05-02 Albert Chu * man/freeipmi.conf.5.pre.in: Add ipmi-pet to list of supported tools. * man/bmc-watchdog.8.pre.in: Remove legacy information. * bmc-watchdog/bmc-watchdog.c (_set_cmd): Fix --start-if-stopped and --reset-if-running logic. 2012-04-30 Albert Chu * bmc-watchdog/bmc-watchdog.c (_bmclog_write): Call fsync to sync log errors to disk. * ipmiconsole/: Remove use of "error.h" convenience function. Convenience functions were virtually unused. 2012-04-21 Albert Chu * bmc-watchdog/bmc-watchdog.c: Handle SIGQUIT in addition to SIGTERM and SIGINT. Properly set umask before writing pidfile. Properly unlink/delete pidfile when necessary. Code cleanup. * ipmidetectd/ipmidetectd.c: Create pidfile on daemon startup. Support debugging in production build. Fix segfault corner case. Handle signals SIGINT, SIGTERM, and SIGQUIT. Code cleanup. 2012-04-19 Albert Chu Merge branch seld Create new ipmiseld daemon. * ipmiseld/: New files. * man/ipmiseld.8.pre.in, man/ipmiseld.conf.5.pre.in: New files. * etc/ipmiseld.conf, etc/ipmiseld.init: New files. * config/ac_ipmiseld_config_file.m4: New file. * configure.ac, Makefile.am, etc/Makefile.am, man/Makefile.am, freeipmi.spec.in: Update appropriately for new files and directories. * common/daemonutil: New common files for daemon common functions. * ipmidetectd/: Use new daemonutil functions when appropriate. 2012-04-19 Albert Chu Merge branch intels2600jf * ipmi-oem/: Add Intel --get-power-restore-delay, --set-power-restore-delay, --get-bmc-service-status, --set-bmc-service-status. * libfreeipmi/include/freeipmi/spec/, libfreeipmi/sel-parse/: Re-arch SEL OEM interpretations of Quanta QSSC-S4R/Appro GB812X-CN to prepare for Intel S2600JF/Appro 512X. Add QPI Interconnect specific event offset messages. * libfreeipmi/sel-parse/: Support Intel S2600JF/Appro 512X OEM SEL events. * libfreeipmi/include/: Add additions for Intel S2600JF/Appro 512x * man/: Update documentation for Intel S2600JF/Appro 512x support. 2012-04-16 Albert Chu Merge reservedmacros branch. Fix bug #36177: reserved identifier violation. See https://www.securecoding.cert.org/confluence/display/seccode/DCL37-C.+Do+not+declare+or+define+a+reserved+identifier * Rename many header guards for compliance. * Fix inconsistencies with header guards #defines and #endif comments. * Rename many macros for safety. * Fix file scope object naming issues. * Make some variables static that should be file local. 2012-03-20 Albert Chu Merge intels5000pal branch. * libfreeipmi/interpret/: Support sensor Session Audit intepretation. Convert default state of IPMI_Session_Audit_Invalid_Username_Or_Password from Critical to Warning. Support Voltage Limit sensors. Support SMI timeout on Intel S5000PAL motherboard. * man/, etc/: Upate appropriately. 2012-03-12 Albert Chu * ipmi-oem/ipmi-oem-supermicro.c (ipmi_oem_supermicro_get_bmc_services_status, ipmi_oem_supermicro_set_bmc_services_status): Fix error message output. 2012-03-06 Albert Chu * libfreeipmi/api/, libfreeipmi/cmds/: Support set sensor reading and event status command functions. * bmc-device/: Support --set-sensor-reading-and-event-status. 2012-03-06 Thomas Renninger * contrib/Makefile.am, Makefile.am, doc/Makefile.am: Fix docdir usage for newer autotools. 2012-03-06 Albert Chu * Support set sensor reading and event status command. 2012-03-05 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h: Add macros for completion code ranges. * libfreeipmi/util/ipmi-error-util.c (ipmi_completion_code_strerror_r): Use new macros. 2012-03-01 Albert Chu * ipmipower/ipmipower_connection.c (_connection_setup): Support ability to specify alternate port in hostname argument. 2012-03-01 Albert Chu Merge altport branch. * libfreeipmi/api/ipmi-api.c (_setup_hostname), libipmiconsole/ipmiconsole_defs.h, libipmiconsole/ipmiconsole.c (ipmiconsole_ctx_create), libipmiconsole/ipmiconsole_ctx.h (ipmiconsole_ctx_config_setup), libipmiconsole/ipmiconsole_ctx.c (ipmiconsole_ctx_config_setup), ipmidetectd/ipmidetectd_loop.c (_nodes_setup): Support ability to specify alternate port in hostname argument or host config. * libipmimonitoring/ipmi_monitoring_ipmi_communication.c (_ipmi_1_5_init, _ipmi_2_0_init, _outofband_init): Let various error checking fall through to lower level APIs. * man/manpage-common-outofband-hostname.man, man/manpage-common-outofband-hostname-hostranged.man, man/ipmidetectd.conf.5.pre.in: Update manpages appropriately. 2012-03-01 Albert Chu * libipmimonitoring/ipmi_monitoring_ipmi_communication.c (_ipmi_1_5_init, _ipmi_2_0_init): Properly return connection timeout error on connection timeout. * man/ipmidetectd.conf.5.pre.in: Fix some English. 2012-03-01 Albert Chu * libipmimonitoring/, libipmiconsole/: Support Cipher Suite 15, 16, and 17. 2012-02-26 Yaroslav Halchenko * man/ipmi-chassis.8.pre.in: Fix typos. 2012-02-24 Albert Chu Merge selreservation branch * libfreeipmi/: Support new functions ipmi_sel_parse_ctx_register_reservation_id() and ipmi_sel_parse_ctx_clear_reservation_id() in the sel-parse library as well as a new error return of IPMI_SEL_PARSE_ERR_RESERVATION_CANCELED. * ipmi-sel/: Support --post-clear option. 2012-02-24 Albert Chu * common/miscutil/error.h, common/miscutil/error.c (err_init_exit_value): New function. * ipmidetect/ipmidetect.c (main): Exit with value 2 on errors. * ipmipower/: Properly exit with 1 when an error occurs on IPMI errors instead of just system errors. * man/: Add exit value diagnostics information to most manpages. * ipmipower/: Code cleanup for consistency to libipmiconsole code. 2012-02-23 Albert Chu Merge sha256 branch. * Support Cipher Suite 15 and 16 globally. * Add details of Cipher Suite 18 and 19 globally. * bmc-config/bmc-config-rmcpplus-conf-privilege-section.c (bmc_config_rmcpplus_conf_privilege_section_get): Add configuration for Maximum_Privilege_Cipher_Suite_Id_15. 2012-02-22 Albert Chu * bmc-config/bmc-config-rmcpplus-conf-privilege-section.c (id_checkout): Fix cipher suite privilege configuration corner cases workaround on HP DL145. * man/manpage-common-workaround-outofband-20-text.man: Document Intel S2600JF/Appro 512X workaround. * bmc-config/bmc-config-rmcpplus-conf-privilege-section.c (_rmcpplus_cipher_suite_id_privilege_setup): Workaround cipher suite privilege configuration bug in Intel S2600JF/Appro 512X. 2012-02-22 Albert Chu * common/toolcommon/tool-cmdline-common.c (common_parse_opt), common/toolcommon/tool-config-file-common.c (_config_file_cipher_suite_id): Differentiate between invalid and unsupported cipher suites in error message output. 2012-02-21 Albert Chu * doc/freeipmi-bugs-issues-and-workarounds.txt, man/ipmi-sensors.8.pre.in: Update information concerning 'discretereading' workaround. * ipmi-sensors/: Code cleanup, rename 'reading' to 'sensor_reading' for consistency. * libfreeipmi/cmds/ipmi-lan-cmds.c: Fix packet layout for tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs. * doc/freeipmi-faq.texi: Add Powerman configuration notes for C410x. Fix various parts. 2012-02-17 Albert Chu * ipmipower/: Various code cleanup. Change "DIAG_INTR" to "DIAGNOSTIC_INTERRUPT" in code for readability. Make code consistent to other codein FreeIPMI. Add asserts as needed. * Globally: Various code cleanup. Use switch statements where it would be more appropriate for performance improvements. 2012-02-17 Albert Chu Merge dellc410x * ipmipower/: Add --oem-power-type option and support C410x OEM power type. Support ability to input power control to same host multiple times under OEM conditions. Serialize power control operations to same host. * ipmipower/ipmipower_oem.h, ipmipower/ipmipower_oem.c: New files. * ipmipower/: Various code cleanup given re-architecture. * common/miscutil/hostlist.c: Remove fprintf debug error messages from tool. * ipmi-oem/ipmi-oem-dell.c: Fix C410X corner case. 2012-02-10 Albert Chu * libfreeipmi/api/ipmi-api.c (ipmi_ctx_open_inband): Add comment about openipmi driver. 2012-02-08 Albert Chu * doc/freeipmi-coding.txt, README.build: Add configure notes. 2012-02-07 Albert Chu * libfreeipmi/sel-parse/: Support Supermicro SEL CPU Temp events. 2012-02-06 Albert Chu * man/ipmi-sel.8.pre.in: Fix option typo. 2012-01-31 Albert Chu * man/ipmi-oem.8.pre.in: Update supported motherboard information based on tests from Ryan Cox. 2012-01-30 Albert Chu * man/ipmi-oem.8.pre.in: Update supported motherboard information based on tests from Ryan Cox. 2012-01-27 Albert Chu * man/ipmi-oem.8.pre.in: Update information based on tests from Ryan Cox. 2012-01-18 Albert Chu * man/ipmi-sel.8.pre.in: Clarify usefulness of event direction. 2012-01-17 Albert Chu * ipmipower/ipmipower.h: Redo packet validation macros. * libfreeipmi/include/freeipmi/cmds/ipmi-chassis-cmds.h: Define macros for on vs off power. * ipmipower/ipmipower_powercmd.c (_process_ipmi_packets): Use new macros. 2012-01-16 Albert Chu * man/manpage-common-inband.man: Clarify argument input. 2012-01-15 Albert Chu * doc/freeipmi-faq.texi: Add some OpenIPMI linux kerneld driver notes. 2012-01-15 Albert Chu Merge branch dellsolinstancecapacity * libipmiconsole/ipmiconsole_processing.c (_check_sol_activated): Workaround bug in Dell Poweredge M605, Dell Poweredge M610, and Dell Poweredge M915 where instance count of SOL is returned as 0. 2012-01-13 Albert Chu * Audit and add asserts appropriately to large number of functions. * common/configtool/: All config tools support hostranges, so replace PSTDOUT_PRINTF with pstdout_printf, PSTDOUT_FPRINTF with pstdout_fprintf, and PSTDOUT_PERROR with pstdout_perror. 2012-01-13 Albert Chu * doc/solstatediagram.dot: SOL State Diagram documentation. 2012-01-13 Albert Chu * libipmiconsole/ipmiconsole_processing.c (_process_protocol_state_deactivate_payload_sent): Fix deactivate only corner case in which session not closed cleanly. 2012-01-12 Albert Chu Merge branch redotemplatedocs * libfreeipmi/include/freeipmi/templates/: Redo format. Update OEM motherboard lists. * libfreeipmi/include/record-format/ipmi-oem-intel-node-manager-cmds.h: Update motherboard list. * libfreeipmi/: Clean up some comments in various files. 2012-01-12 Albert Chu * libfreeipmi/sensor-read/ipmi-sensor-read.c (_sensor_reading_corner_case_checks): Handle corner case in Sun Blade 6000M2. 2012-01-11 Albert Chu Merge sunbladex6250sensor branch * libfreeipmi/sensor-read/ipmi-sensor-read.c (_sensor_reading_corner_case_checks): Handle corner case in Sun Blade x6250. * libfreeipmi/sensor-read/ipmi-sensor-read.c (_sensor_reading_corner_case_checks): Slightly alter error code return interpretations. 2012-01-10 Albert Chu * common/toolcommon/tool-config-file-common.c: Fix several config file option parsing bugs. 2012-01-10 Albert Chu * doc/freeipmi-faq.texi: Add conman configuration FAQ example. Add terminology, ganglia, nagios info. 2012-01-09 Albert Chu * doc/freeipmi-faq.texi: Add powerman configuration FAQ example. 2012-01-09 Albert Chu * Merge 8250:8352 ipmioemdellgetsysteminfo. * ipmi-oem/ipmi-oem-dell.c: Add Dell get-system-info 'slot-number', 'system-revision', 'embedded-video-status', 'idrac-info', 'idrac-ipv4-url', 'idrac-gui-webserver-control', 'cmc-ipv4-url', 'cmc-ipv6-info', 'cmc-ipv6-url' k eys. Support 12G mac addresses. Support better error messages. 2012-01-09 Albert Chu * libfreeipmi/: Add re-arm sensor events functions. * bmc-device/: Support --rearm-sensor. * README, man/freeipmi.7.pre.in: Update description of bmc-device. 2012-01-09 Albert Chu * man/ipmi-oem.8.pre.in: Add SDR caching information to specific OEM commands. 2012-01-08 Albert Chu * Update/fix various documentation and comments. 2012-01-08 Albert Chu * libfreeipmi/cmds/ipmi-sensor-cmds.c, libfreeipmi/include/freeipmi/templates/ipmi-sensor-cmds-templates.h: Re-arm Sensor Events fields are optional not required. 2012-01-08 Albert Chu * libipmiconsole/: Don't deactivate the SOL payload when it appears the SOL session has been stolen. 2012-01-07 Albert Chu Merge serialkeepalive branch * libipmiconsole/: Add SERIAL_KEEPALIVE_EMPTY flag support. * libipmiconsole/ipmiconsole_processing.c (_serial_keepalive_timeout): Fix keepalive calculation to avoid spinning. * ipmiconsole/: Add --serial-keepalive-empty support. * configure.ac: Update versioning for libipmiconsole. 2012-01-07 Albert Chu * Update/fix various documentation and comments. 2012-01-06 Albert Chu * bmc-watchdog/: Fix usage output typo. 2012-01-06 Jan Safranek * ipmidetectd/, bmc-watchdog/: Fix race in daemon setup code to function with new systemd. 2012-01-06 Albert Chu * Update/fix various documentation and comments. 2012-01-05 Albert Chu Merge 8269:8289 from c410x branch. * ipmi-oem/: Support Dell C410x OEM extension slot-power-toggle, slot-power-control, get-port-map, and set-port-map. 2011-12-22 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameters-oem-spec.h: Fix macro names. 2011-12-22 Albert Chu Merge branch qsscs4r. * libfreeipmi/sel-parse/, libfreeipmi/interpret/: Support Quanta QSSC-S4R/Appro GB812X-CN OEM SEL Events. * libfreeipmi/interpret/, ipmi-sensors/: Re-organize code for future growth. Most notably, split up OEM extensions into individual vendor files/functions. * ipmi-sensors/: Support Quanta QSSC-S4R OEM SDR records. * libfreeipmi/interpret/: Support Fan assert/deassert sensor/sel interpretations. Support Quanta QSSC-S4R OEM sensors and SEL events. 2011-12-21 Albert Chu * Update/fix/remove OEM extension download links 2011-12-20 Albert Chu * libfreeipmi/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_get_oem_specific_message): Fix bug loading incorrect tables. * libfreeipmi/sel-parse/ipmi-sel-parse-string-intel.c (ipmi_sel_parse_output_intel_event_data2_event_data), libfreeipmi/include/freeipmi/spec/ipmi-slave-address-oem-spec.h: Remove IPMI_GENERATOR_ID_OEM_INTEL_BIOS_POST macro, which was only supposed to be an example in Intel documentation. 2011-12-20 Albert Chu * Branch Release-1_1_0_branch for FreeIPMI 1.1.0 stable branch 2011-12-20 Albert Chu * Update documentation for Quanta QSSC-S4R/Appro GB812X-CN 2011-12-19 Albert Chu * libfreeipmi/fru-parse/: Support IPMI_FRU_PARSE_ERR_DEVICE_BUSY error code. * ipmi-fru/: Do not consider a busy device a fatal error. * Document Appro GB812X-CN IPMI compliance issues. 2011-12-19 Albert Chu * libfreeipmi/: Support IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE workaround flag. * ipmi-sensors/: Support 'ignoreauthcode' workaround flag. 2011-12-16 Kaiwang Chen * contrib/pet/petalert.pl, contrib/pet/README: Support and document NSCA. 2011-12-15 Albert Chu * libfreeipmi/cmds/libfreeipmi/cmds/ipmi-pef-and-alerting-cmds.c (fill_cmd_set_pef_configuration_parameters_pef_control): Fix config setting bug for Enable_PEF_Event_Messages. 2011-12-15 Kaiwang Chen * contrib/pet/README: Updated information about Poweredge 1950. 2011-12-14 Albert Chu * contrib/pet/README: Fix some text and formatting. * libfreeipmi/src/util/pimi-sensor-and-event-code-tables-util.c (_supermicro_oem_temp_level_sensor_supported): Common function for common code. 2011-12-14 Kaiwang Chen * contrib/pet/: Support 'perf' token option. 2011-12-13 Albert Chu Build system rework. * contrib/, libfreeipmi/: Remove most subdir Makefiles. * Various Makefile.am cleanup. * freeipmi.spec.in: Move libipmimonitoring contrib into devel package. 2011-12-13 Kaiwang Chen * contrib/pet/check_rmcpping, contrib/pet/ipminodes.cfg: New files. * contrib/pet/: Significant doc updates. 2011-12-13 Albert Chu * Minor documentation updates. * Minor packaging fixes to fix distcheck. 2011-12-12 Albert Chu Giant re-org of code. * Store all manpages stored in man/. * Store all /etc appropriate files in etc/. * Move common/src libs to common/. * Remove many src directories, move sources up a directory. * Various Makefile cleanups. 2011-12-12 Albert Chu * examples/: Remove directory. Move files into contrib/libipmimonitoring. * Install contribs into doc/contrib/ * freeipmi.spec.in: Fixup for recent changes. 2011-12-12 Kaiwang Chen * libfreeipmi/src/api/ipmi-api-util.c (_api_ipmi_cmd_post): Fix corner case bug. * contrib/pet/petalert.pl: Support workaround option. 2011-12-09 Albert Chu * libfreeipmi/src/api/: Fix completion code check corner case with IPMI_FLAGS_NO_LEGAL_CHECK. * libfreeipmi/: Minor code cleanup. 2011-12-09 Kaiwang Chen * libfreeipmi/src/api/: Fix bug with IPMI_FLAGS_NO_LEGAL_CHECK use. 2011-12-08 Albert Chu * Support IPMI_FLAGS_NO_LEGAL_CHECK flag in libfreeipmi. 2011-12-07 Kaiwang Chen * contrib/pet/petalert.pl: Support PET acknowledge option. 2011-12-07 Albert Chu * ipmi-pet/: Support "malformedack" workaround option. 2011-12-07 Albert Chu * common/man/: Various additions, tweaks, and modifications. 2011-12-06 Albert Chu * libfreeipmi/src/api: Re-arch LAN code to timeout on malformed packets rather than do an immediate retry. 2011-12-05 Kaiwang Chen * ipmi-pet/src/ipmi-pet.c (_ipmi_pet_parse_trap_data): Pass raw localtimestamp, not locally adjusted timestamp. 2011-12-05 Albert Chu * common/man/: Various code re-org and cleanup. * Fix up manpages for easier future maintenance. * Remove warnings when "compiling" manpages. * Fix compile warnings. * ipmi-pet/: Adjust ipmi-pet to look more like remaining FreeIPMI manpages. * Various manpage doc updates. 2011-12-05 Albert Chu * ipmi-pet/src/: Fix warning. 2011-12-02 Albert Chu * Update IANA Enterprise validity macro. 2011-12-01 Albert Chu * Various documentation updates. * Update copyright years for release in 2012. 2011-11-30 Albert Chu * Various documentation updates. 2011-11-28 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_daemon_cmd_error_exit) (_daemon_cmd_error_noexit): Do not assume semaphore deleted on EINVAL. 2011-11-18 Albert Chu * libfreeipmi/src/api/: Common function code cleanup. * libfreeipmi/src/spec/: Update iana numbers list. 2011-11-18 Albert Chu * libfreeipmi/src/api/: Remove duplicate parameter checks. Write common functions for variety of code. 2011-11-18 Albert Chu * libfreeipmi/: Add support for IPMI firmware firewall and command discovery payloads. Perform some code cleanup. 2011-11-16 Albert Chu * Continued code cleanup. Remove unnecessary null checks. Remove excessive/unnecessary initializations. Fix minor bugs. Fix code inconsistency styles. Remove unused functions. * Update additional documentation about new ipmi-pet tool. 2011-11-15 Albert Chu * Code cleanup and minor fixes. Remmove unnecessary if checks for free() globally. Remove excessive initializations. Fix minor bugs. 2011-11-15 Albert Chu * Support IPMI_FLAGS_NOSESSION in libfreeipmi. * libfreeipmi/include/freeipmi/record-format/ipmi-platform-event-trap-record-format.h: Support macros for sequence number. * Support --pet-acknowledge in ipmi-pet. 2011-11-15 Albert Chu * ipmi-pet/ipmi-pet.8.pre.in: Add examples. 2011-11-15 Kaiwang Chen * contrib/pet/petalert.pl: Support various new features. 2011-11-14 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-api.h: Update documentation. * libfreeipmi/src/api/ipmi-lan-session-common.c: Code cleanup. 2011-11-14 Kaiwang Chen * Add contrib/pet/petalert.pl script from Kaiwang Chen (kaiwang.chen AT gmail DOT com). 2011-11-14 Albert Chu * Support Supermicro X9SCM-F IANA change. 2011-11-08 Albert Chu * Support Supermicro X9SCA-F-O OEM sensors. 2011-11-08 Albert Chu Merge branch ipmipet. * ipmi-pet/: New tool. * libfreeipmi/include/freeipmi/record-format/ipmi-platform-event-trap-record-format.h: New file. * common/src/toolcommon/: Update tool common function appropriately for new tool. * common/src/toolsensor/tool-sensor-common.h, common/src/toolsensor/tool-sensor-common.c (calculate_column_widths_ignored_sdr_cache, get_entity_id_string): New functions. * common/src/toolsdr/tool-sdr-cache-common.h, common/src/toolsdr/tool-sdr-cache-common.c (ipmi_sdr_cache_search_sensor_wrapper): Write new common function. * common/src/toolevent/: New common library. * ipmi-sel/: Update to use new convenience functions. 2011-11-01 Albert Chu * ipmi-raw/src/ipmi-raw.c: Code cleanup. Output line numbers when there is an error on file/stdin input. 2011-10-31 Albert Chu * ipmi-sel/src/ipmi-sel.c (_normal_output_date_and_time) (_normal_output_not_available_date_and_time): Split into date and time specific functions. Adjust other code appropriately. 2011-10-28 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-entity-ids-spec.h, libfreeipmi/src/spec/ipmi-entity-ids-spec.c: Add new defines for non-standard entity ids to model sensor types code. * libfreeipmi/include/freeipmi/util/ipmi-entity-ids-util.h, libfreeipmi/src/util/ipmi-entity-ids-util.c: New file. * common/src/toolsensor/tool-sensor-common.c (get_entity_sensor_name_string): Use new library function. * ipmi-sel/src/ipmi-sel.c (_normal_output_sensor_name_and_type): Code cleanup, split function into _normal_output_sensor_name and _normal_output_sensor_type. Update code accordingly. * libfreeipmi/src/fru-parse/, libfreeipmi/include/freeipmi/fru-parse/ipmi-fru-parse.h: Allow creation of FRU ctx with NULL ipmi_ctx. 2011-10-27 Albert Chu * Support new --sdr-cache-file option globally. 2011-10-27 Albert Chu * common/src/toolsdr/: Code cleanup, make internal functions static. 2011-10-24 Albert Chu * libfreeipmi/src/fru-parse/ipmi-fru-parse-data.c: Add forgotten headers. * ipmi-sel/: Code cleanup, do not pass unnecessary parameters to functions. 2011-10-24 Albert Chu * Update documentation with OEM support information. 2011-10-21 Albert Chu * ipmi-raw/src/: Use unsigned int for cmd_length. * common/src/miscutil/conffile.c: Update to latest version. 2011-10-21 Albert Chu * bmc-info/: Output GUID w/ lower case hex characters, as defined in Wired for Management spec. 2011-10-20 Albert Chu * ipmi-sel/, ipmi-sensors/: Remove unnecessary includes, add appropriate ones. * bmc-info/: Various code cleanup, use macros when appropriate. 2011-10-19 Albert Chu * ipmi-raw/src/ipmi-raw.c: Check for valid netfn request input. * libfreeipmi/src/api/: Check for valid netfn request input on raw functions. 2011-10-19 Albert Chu * Global cleanup, consistently and correctly check for errors when calling strtol, strtoul, strtod, etc. 2011-10-19 Albert Chu * ipmi-raw/src/ipmi-raw-argp.c: Fix error message. Check raw byte inputs for correctness. 2011-10-19 Albert Chu * Document Intel S2600JF/Appro 512X IPMI bugs. 2011-10-18 Albert Chu * ipmi-raw/, ipmi-oem/: Fix allocation bug due to much larger _SC_ARG_MAX on RHEL6. Assume max args appropriately for each tool. * ipmi-raw/, ipmi-oem/: Output error when excess arguments specified. 2011-10-17 Albert Chu * ipmi-sel/, libfreeipmi/src/sel-parse/: Fix the assumesystemevent workaround. 2011-10-17 Albert Chu * Support Intel Node Manager sensor/SEL events for Intel S2600JF/Appro 512X. 2011-10-17 Albert Chu * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c (get_management_subsystem_health_event_data2_message): Fix corner case output bug. 2011-10-17 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-read.c (ipmi_sdr_cache_search_sensor), libfreeipmi/src/sdr-cache/ipmi-sdr-cache-defs.h: Fix corner case where invalid SDR record could be loaded if shared sensors are utilized on event only records. 2011-10-14 Albert Chu * etc/freeipmi.conf: Fix example/doc consistency. 2011-10-13 Albert Chu * ipmi-locate/src/ipmi-locate.h: Fix typo. * ipmi-locate/src/ipmi-locate-argp.c: Fix copyright year typo. * ipmi-locate/src/ipmi-locate_.h: Renamed from ipmi-locate.h. Done for code consistency to how ipmiconsole handles its ipmiconsole_.h. 2011-10-13 Albert Chu * Update copyright globally. 2011-10-06 Albert Chu * Document HP Itegrity rx3600 workaround. 2011-09-23 Albert Chu * libipmiconsole/src/Makefile.am: Fix logdir creation bug, should not hardcode /var for localstatedir. * libipmimonitoring/src/Makefile.am: Properly hide local library symbols. 2011-09-26 Diego Elio Pettenò * configure.ac, ipmi-sensors/src/Makefile.am: ipmimonitoring is generated referring to /usr/local even if configured with --prefix=/usr . This was caused by the broken expansion of the sbin path in configure.ac. To resolve the issue, this change no longer consider ipmimonitoring to be expanded by configure itself, but is rather processed at build time with sed so that make takes care of the expansion. The file is also not distributed (since it needs to be regenerated depending on configure options), but its sources are. 2011-09-23 Albert Chu * ipmipower/ipmipower.conf.5, ipmiconsole/ipmiconsole.conf.5: Remove headers. * libipmimonitoring/ipmi_monitoring_sensors.conf.5, libipmimonitoring/ipmimonitoring.conf.5, libipmimonitoring/ipmimonitoring_sensors.conf.5, libipmimonitoring/libipmimonitoring.conf.5: New files. * libipmimonitoring/ipmi_monitoring_sensors.conf.5.pre.in, libipmimonitoring/ipmimonitoring.conf.5.pre.in, libipmimonitoring/ipmimonitoring_sensors.conf.5.pre.in, libipmimonitoring/libipmimonitoring.conf.5.pre.in: Remove files. * configure.ac, libipmimonitoring/Makefile.am: Adjust. 2011-09-22 Dave Love * bmc-device/bmc-device.8.pre.in: Fix typos. 2011-09-21 Albert Chu * Remove Magnum X7SBI-LN4 sensor interpretation, not needed. * Support Supermicro X8SIE OEM sensors. 2011-09-20 Albert Chu * Fix use of new interpret library interpretation rules. * libfreeipmi/src/interpret/: Support chip set transition severity, current severity, memory redundancy, and system event state interpretations. * libfreeipmi/src/interpret/ipmi-interpret-config-sel.c (_cb_sel_parse): Fix parse corner case. 2011-09-20 Albert Chu * Support Supermicro X7DB8, X8DTN, X7SBI-LN4, X8DTL OEM sensors. 2011-09-19 Albert Chu * ipmi-dcmi/: Handle additional error codes for optional portions. 2011-09-19 Albert Chu * Support Supermicro X8DTN+-F OEM sensors. 2011-09-16 Albert Chu * ipmipower/ipmipower.conf.5.pre.in, ipmiconsole/ipmiconsole.conf.5.pre.in: Remove files. * ipmipower/ipmipower.conf.5, ipmiconsole/ipmiconsole.conf.5: New files. * configure.ac, ipmipower/Makefile.am, ipmiconsole/Makefile.am: Adjust. 2011-09-15 Albert Chu * ipmi-sensors/, libfreeipmi/src/sensor-read/, libfreeipmi/include/freeipmi/sensor-read/, common/src/parsecommon/: Support new "assumebmcowner" workaround. 2011-09-15 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in: Fix some text. Remove experimental tag from --bridge-sensors option. * libfreeipmi/src/sensor-read/ipmi-sensor-read.c: Add comments on workaround needs. 2011-09-15 Albert Chu * libipmimonitoring/: Support IGNORE_SCANNING_DISABLED workaround. 2011-09-15 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in: Update motherboards workaround may work on. 2011-09-14 Albert Chu * libfreeipmi/src/debug/ipmi-debug.c (ipmi_dump_hex): Output correct byte length of hex array. * libfreeipmi/src/api/ipmi-api.c (ipmi_cmd_raw): Fix debug dump output corner case. * libfreeipmi/src/api/ipmi-api.c (ipmi_cmd_raw_ipmb): Add debug dump support for special case drivers. 2011-09-13 Albert Chu * ipmipower/: Do not poll stdin when operating in non-interactive mode. 2011-09-13 Albert Chu * libfreeipmi/src/interpret/: Support cooling device redundancy interpretation. * man/: Update manpages for new interpret configuration options. 2011-09-12 Albert Chu * libfreeipmi/src/interpret/: Support transition severity sensor/sel interpretations for temperature, voltage, fan, and power supply sensor types. 2011-09-07 Diego Elio Pettenò * bmc-watchdog/src/bmc-watchdog.c: By writing a pidfile, init scripts can rely on that to kill or signal the running daemon instance. This is important because relying on the process name can be troublesome when using Linux Containers, for instance. 2011-09-06 Diego Elio Pettenò * libfreeipmi/src/Makefile.am: The -module option is used to tell libtool that the library is not to be used to link against, but only loaded at runtime, which is not the case for this library. 2011-08-29 Albert Chu * Support Supermicro X9SCL and X9SCM OEM sensors. 2011-08-29 Albert Chu * Merge from branch dcmiupdate. Make additions in DCMI v1.5 specification. 2011-08-25 Albert Chu * libfreeipmi/: Support IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED sensor-read workaround flag. * ipmi-sensors/: Support 'ignorescanningdisabled' workaround option. 2011-08-09 Albert Chu * bmc-watchdog/bmc-watchdog.logrotate: Reduce logrotate output spam. 2011-07-20 Arnaud Quette * ipmi-fru/src/ipmi-fru-output.c: Fix typo. 2011-07-11 Albert Chu * Support Supermicro X8SIL-F OEM Sensors. 2011-06-30 Albert Chu * ipmi-fru/src/ipmi-fru-output.c (_output_field): Remove cut and paste duplicate code. 2011-06-29 Arnaud Quette * configure.ac, Makefile.am: fix m4 macro reference for libtoolize. This allows to call the system provided 'autoreconf' instead of autogen.sh 2011-06-29 Arnaud Quette * configure.ac: fix indentation inconsistencies, remove extraneous spaces and escape single quotes that break some color highlighting systems. 2011-06-30 Arnaud Quette * configure.ac: add AM_PROG_CC_C_O, needed for per-target flags (ipmipower/src/Makefile.am and ipmipower/src/argv.c) 2011-06-29 Albert Chu * freeipmi.spec.in: Add pkg-config files. 2011-06-28 Arnaud Quette * Add pkg-config support for all FreeIPMI libraries. 2011-05-31 Albert Chu * Fix typo globally, IPMI_CMD_DCMI_GET_DCMI_CAPABILITIY_INFO to IPMI_CMD_DCMI_GET_DCMI_CAPABILITY_INFO. 2011-05-24 Holger Liebig * ipmi-dcmi/src/ipmi-dcmi.c: Fix asset tag/string identifier overwriting bug. Update to handle setting asset tag and management identifier string according to DCMI v1.5 spec. 2011-05-18 Albert Chu * bmc-config/bmc-config.8.pre.in: Add additional troubleshooting information. 2011-05-12 Holger Liebig * ipmi-dcmi/src/ipmi-dcmi-argp.c: Fix command line parsing bug. 2011-05-04 Albert Chu * Update documents and comments with additional motherboard workaround information. 2011-04-27 Albert Chu * common/src/miscutil/: Remove unnecessary locking calls. 2011-04-18 Albert Chu * libipmiconsole/: Support convenience functions for determining whether user inputs are valid or not. 2011-04-18 Albert Chu * libipmiconsole/src/ipmiconsole.h: Update comments to show support for cipher suite id 17. 2011-04-07 Albert Chu * Add Intel SR1625/S5500WB OEM SEL interpration. * libfreeipmi/src/interpret/ipmi-interpret.c: Support interpretations of OEM sensor types w/ generic event/reading type codes. 2011-04-06 Albert Chu * Add Intel SR1625 OEM sensor interpretation. 2011-04-05 Albert Chu * libfreeipmi/src/drivers/: Support SPIN_POLL option for faster inband IPMI under certain circumstances. Timeout after a consistent time rather than a poll-attempted guess. * libfreeipmi/src/api/ipmi-api.c: Adjust default polling interval for KCS. * Support "spinpoll" workaround for all tools and libipmimonitoring. 2011-04-01 Albert Chu * Support additional sensor and sel interpretations. 2011-03-31 Albert Chu * Support "discretereading" in libipmimonitoring. 2011-03-29 Albert Chu * common/src/parsecommon/, ipmi-sensors/, libfreeipmi/src/sensor-read/: Support new "discretereading" workaround in ipmi-sensors. 2011-03-29 Albert Chu * doc/freeipmi-hostrange.txt: Fix some English. 2011-03-22 Albert Chu * Support package version string in libfreeipmi. 2011-03-16 Albert Chu * Support package version number macros in libfreeipmi. 2011-03-16 Albert Chu * libipmiconsole/: Slightly alter mechanism for selecting standard defaults vs. config file defaults. * libipmiconsole/: Fix bug where an empty string k_g key (e.g. "") would not overwrite the default k_g key specified in a config file. * libipmiconsole/src/ipmiconsole.c (ipmiconsole_ctx_create): Force ipmiconsole_engine_init() to be called prior to creating a context. * common/src/parsecommon/: Fix assert corner case. 2011-03-14 Albert Chu * Support library version numbers in libfreeipmi, libipmiconsole, libipmidetect, and libipmimonitoring. 2011-03-11 Albert Chu * common/src/parsecommon/parse-common.h, common/src/parsecommon/parse-common.c, common/src/toolcommon/tool-cmdline-common.c: Support ability to configure "none" workaround flags. May be useful for overriding workaround flags configured in freeipmi.conf. * common/src/toolcommon/tool-cmdline-common.c (common_parse_opt): Fix bug in which workaround flags on the command line may not overwrite config file workaround flags. * ipmipower/src/ipmipower_prompt.c (_cmd_workaround_flags): Support ability to reconfigure workaround flags to 'none' via ipmipower prompt. * ipmipower/src/ipmipower_prompt.c (_cmd_config): Fix workaround-flags config output bug. 2011-03-10 Albert Chu * bmc-info/: Handle additional error conditions within Get System Info Parameter calls. 2011-03-09 Albert Chu * libipmiconsole/src/ipmiconsole_ctx.c (__ipmiconsole_ctx_connection_cleanup): Only call the callback if an error occurred during a session submission, not if an error occurred in API land. 2011-03-08 Albert Chu * libipmiconsole/src/ipmiconsole_engine.c, libipmiconsole/src/ipmiconsole_garbage_collector.c: Add mutex/conditional to protect against theoretical race between engine and garbage collector on teardown. * configure.ac: Increment library revision. 2011-02-24 Albert Chu * ipmi-oem/src/ipmi-oem-intel.c: Fix portability bug to Solaris 10. 2011-02-21 Albert Chu * Documentation Dell Poweredge R210 OEM sensor. * libfreeipmi/src/interpret/ipmi-interpret-config-sensor.c: Fix Dell OEM default bug. 2011-02-18 Albert Chu * common/man/manpage-common-entity-sensor-names.man: Fix formatting error. 2011-02-18 Albert Chu * Overwrite symlinks during make install. 2011-02-17 Albert Chu * bmc-config/src/bmc-config-user-sections.c (username_commit): Handle corner case in which motherboard does not allow configuration of identical username. 2011-02-17 Albert Chu * Support Supermicro X7DBR-3 OEM Sensors. 2011-02-17 Albert Chu * libfreeipmi/src/interpret/: Support Dell Module/Board OEM sensor interpretation. 2011-02-17 Albert Chu * contrib/ganglia/ganglia_ipmi_sensors.pl, contrib/nagios/nagios_ipmi_sensors.pl: Do not exit out if an error occurs, an error could have occurred if one node out of a hostrange fails. 2011-02-17 Albert Chu * Support Supermicro X8DT3-LN4F motherboard. 2011-02-14 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-create.c (_sdr_cache_record_write): Fix compliance bug on HP Proliant DL585G7. 2011-02-04 Christopher Maestas and Albert Chu * contrib/ganglia/ganglia_ipmi_sensors.pl: Support new -r option. 2011-02-01 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_deamon_cmd_error_exit): Fix typo, rename to 'deamon' to 'daemon'. Fix elsewhere appropriately. * bmc-watchdog/src/bmc-watchdog.c (_daemon_setup, _daemon_cmd): Call _bmclog() and exit(1) instead instead of _err_exit(). 2011-01-28 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h: Fix spelling typo. 2011-01-28 Albert Chu * doc/freeipmi-faq.texi: Add additional info on determining if your system has IPMI support. 2011-01-27 Albert Chu * bmc-info/: Support motherboards that don't implement Get Device Guid. 2011-01-27 Albert Chu * Support Supermicro X8DTL-3F. 2011-01-27 Albert Chu Various ipmi-locate fixes based on user comments * common/man/manpage-common-troubleshooting.man: Add "driver timeout" error description. * ipmi-locate/ipmi-locate.8.pre.in: Add text on how ipmi-locate can be used. * doc/freeipmi-faq.texi: Add info on determining if your system has IPMI. * ipmi-locate/src/ipmi-locate.c: Fix error message output for clarity. 2011-01-24 Albert Chu * ipmi-sensors/, libfreeipmi/: Support ignore unrecognized events capability. 2011-01-24 Albert Chu * ipmi-oem/ipmi-oem.8.pre.in: Document what is wrtten to eeprom to clear them. 2011-01-20 Albert Chu * configure.ac, NEWS: Update for 1.0.1 release. * Fix a few more documentation typos. * doc/freeipmi-design.txt: New document. * doc/freeipmi-coding.txt: Split out information into freeipmi-design.txt, tweak text. 2011-01-19 Albert Chu * libipmiconsole/src/ipmiconsole.h: Fix comment typos/English. 2011-01-18 Albert Chu * ipmi-sensors/src/ipmimonitoring.in: Fix portability. 2011-01-18 Albert Chu * ipmipower/src/Makefile.am: Fix build error. 2011-01-18 Holger Liebig * common/src/toolhostrange/Makefile.am: Fix build error. 2011-01-18 Albert Chu * ipmi-dcmi/: Fix UTF-8 corner case. 2011-01-13 Albert Chu * ipmi-sensors/: Support --ipmimonitoring-legacy-output. 2011-01-12 Albert Chu * common/man/: Fix some manpage typos. 2011-01-11 Albert Chu * ipmi-dcmi/, libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-cmds.h, libfreeipmi/src/cmds/ipmi-dcmi-cmds.c: Update asset-tag getting and setting based on 1.1 errata. 2011-01-10 Albert Chu * ipmi-dcmi/, libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-cmds.h, libfreeipmi/src/cmds/ipmi-dcmi-cmds.c: Various DCMI updates for 1.1 spec and 1.1 errata. 2011-01-03 Albert Chu * doc/: Fix typos. * contrib/ganglia/: Fix temperature, rpm, voltage reporting corner case. 2010-12-14 Albert Chu * ipmi-oem/: Fix Intel Node Manager corner cases. 2010-12-13 Albert Chu * ipmi-oem/: Support basic Intel Node Manager commands. * libfreeipmi/: Code re-org on Intel Node Manager code. 2010-12-09 Albert Chu * ipmi-sensors/: Support Intel Node Manager sensors. 2010-12-08 Albert Chu * libfreeipmi/: Add initial Intel Node Manager support. 2010-12-02 Albert Chu * libfreeipmi/src/fru-parse/: Fix leap year calculation bug. 2010-12-01 Albert Chu * libfreeipmi/src/interpret/: Support ability to configure interpretation of out of spec sensor events and sel events. 2010-11-18 Albert Chu * bmc-config/: Re-do lan/serial_user_session_limit workaround to work for multi-channel. 2010-11-18 Albert Chu * bmc-config/: Fix bug in HP DL145 RMCPplus workaround. 2010-11-17 Albert Chu * bmc-config/: Fix bug in HP DL145 RMCPplus privilege key. 2010-11-17 Albert Chu * Remove CONFIG_ERR_NON_FATAL_ERROR_REQUIRED_FIELD_NOT_FOUND error code, does not function is initially required. * bmc-config/: Output error message directly instead of using CONFIG_ERR_NON_FATAL_ERROR_REQUIRED_FIELD_NOT_FOUND. 2010-11-17 Albert Chu * common/src/configtool/: Support new CONFIG_ERR_NON_FATAL_ERROR_REQUIRED_FIELD_NOT_FOUND error code. * bmc-config/: Fix workaround for HP DL145 RMCPplus privilege key configuration when commiting privilege changes. 2010-11-17 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-privilege-level-spec.h: Define IPMI_PRIVILEGE_LEVEL_UNSPECIFIED. 2010-11-16 Albert Chu * bmc-config/: Cleanup cipher suite id loading and caching code. * bmc-config/: Support workaround of HP DL145 RMCPplus privilege key configuration. 2010-11-16 Albert Chu * libfreeipmi/src/interpret/: Support ability to configure interpretation when no sensor event occurs, rather than assuming it is always Nominal. 2010-11-15 Albert Chu * libfreeipmi/src/interpret/: Support OEM bitmask configuration of event bitmask 0 as a special case to cover case in which sensor event bitmask is 0. * libfreeipmi/src/interpret/: Have Dell Power Optimized sensor report Nominal if no event occurs. 2010-11-15 Albert Chu * libfreeipmi/src/interpret/: Support different format for OEM configuration. Support multiple manufacturer/product ids to be specified for an interpretation. * Support Supermicro X8DTU-6+ OEM sensor interpretations. 2010-11-11 Albert Chu * Create 'ipmi-detect' symlink and manpage to link to 'ipmidetect'. * freeipmi.spec.in: Update appropriately for updates/changes. 2010-11-11 Albert Chu Branch 'reorg'. * Re-org code base for consistency in code tree. * examples/: New directory. * ipmimonitoring/src/examples/: Remove directory, move files to examples/. * libipmimonitoring/: New directory. * ipmimonitoring/src/libipmimonitoring/: Remove directory, move to libipmimonitoring/. * libipmiconsole/: New directory. * ipmiconsole/src/libipmiconsole/: Remove directory, move to libipmiconsole/. * ipmiconsole/src/ipmiconsole/: Remove directory, move source to ipmiconsole/src/. * libipmidetect/: New directory. * ipmidetect/src/libipmidetect/: Remove directory, move source to libipmidetect/. * ipmidetectd/: New directory. * ipmidetect/src/ipmidetectd/: Remove directory, move source to ipmidetectd/. * ipmidetect/src/ipmidetect/: Remove directory, move source to ipmidetect/src/. 2010-11-11 Albert Chu * Create 'ipmi-power' symlink and manpage to link to 'ipmipower'. * Create 'ipmi-ping' symlink and manpage to link to 'ipmiping'. * Create 'rcmp-ping' symlink and manpage to link to 'rcmpping'. * Create 'ipmi-console' symlink and manpage to link to 'ipmiconsole'. * freeipmi.spec.in: Update appropriately for updates/changes. 2010-11-10 Albert Chu Branch serialnulping * ipmiconsole/src/libipmiconsole/: Support serial keepalive. * ipmiconsole/: Support --serial-keepalive option. 2010-11-05 Albert Chu * common/src/toolcommon/tool-cmdline-common.h, common/src/toolcommon/tool-cmdline-common.c (verify_common_cmd_args_inband, verify_common_cmd_args_outofband): New functions. * common/src/toolcommon/tool-cmdline-common.c (verify_common_cmd_args): Re-arch to use new functions. * ipmipower/src/ipmipower_argp.c (_ipmipower_args_validate, ipmipower_argp_parse): Re-arch to use new functions and reduce duplicate code. * Globally, support special case handling if user inputs a k_g key of 0. Is possible with hex input (e.g. -k 0x00). 2010-11-05 Albert Chu * common/src/parsecommon/: New common code library. * ipmiconsole/: Support libipmiconsole.conf file. Support default of 4 threads. Increase k_g buffer size to max + 1. 2010-11-05 Albert Chu * Support Supermicro X8DTU-6+ OEM sensors. 2010-11-02 Albert Chu * ipmi-sel/: Fix output corner case for N/A outputs. 2010-10-22 Albert Chu * ipmi-sel/: Fix corner case with --output-oem-event-strings, did not work with OEM record types. 2010-10-21 Albert Chu * ipmi-sel/: Fix corner case, --output-oem-event-strings does not require --interpret-oem-data. 2010-10-21 Holger Liebig * libfreeipmi/src/sel-parse/ipmi-sel-parse-string-fujitsu.c: Fix error message corner case. 2010-10-20 Albert Chu * Code cleanup for consistency to FreeIPMI code style. * Re-work OEM SEL interpretations to not call Fujitsu Get SEL Entry Long Text for every event. * ipmi-sel/: Support --output-oem-event-string. 2010-10-20 Holger Liebig * Add initial Fujitsu OEM sensor and SEL support. 2010-10-19 Albert Chu * Rename IPMI_COMP_CODE_REQUEST_SENSOR_DATA_OR_RECORD_NOT_PRESENT to IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT globally. * libfreeipmi/src/sensor-read/: For IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT completion code, return sensor unavailable rather than sensor cannot be obtained. 2010-10-14 Albert Chu * man/: Update workaround flags options. * ipmiconsole/src/libipmiconsole/ipmiconsole.h: Fix comment typo. 2010-10-13 Albert Chu * bmc-config/: Have IPv4 parameters commented out by default. 2010-10-12 Albert Chu * libfreeipmi/: Support RMCP port configuration. * bmc-config/: Support RMCP port configuration. 2010-10-11 Albert Chu * libfreeipmi/: Support LAN ipv4 header parameters configuration. * bmc-config/: Support LAN ipv4 header parameters configuration. * bmc-config/: Move vlan output to only under verbose mode. 2010-09-23 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-create.c (_sdr_cache_get_record): Improve SDR caching speed. 2010-09-17 Albert Chu * Globally re-architect to split workaround flags into inband, outofband, and outofband 2.0 workaround flags. Re-architect will save bits for future workarounds and possible future expansion (e.g. protocol 3.0, etc.). 2010-09-15 Albert Chu * Support 'assumeio' inband workaround. 2010-09-14 Albert Chu * libfreeipmi/src/sel-parse/: Support Intel NM OEM sensor names. * Probe for Intel NM SDR entry as necessary. 2010-09-13 Albert Chu * ipmi-oem/: Move some OEM commands from Dell to Inventec. What was thought to be Dell additions was in fact not. 2010-09-13 Albert Chu * Support Intel NM SEL events for all motherboards. 2010-09-13 Albert Chu * libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_inband): Fix fallthrough error corner case. 2010-09-08 Albert Chu Merge from intels5500wb branch. * Add Intel S5500WB OEM SEL support. * Re-arch some sel-parse code for performance. * libfreeipmi/src/sel-parse/ipmi-sel-parse.c: Fix event_data1 parsing bug. * ipmi-oem/: Add Intel restore-configuration, get-smtp-config, and set-smtp-config support. * Various minor code fixes. 2010-09-07 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h: Fix macro names for consistency to other parts of FreeIPMI. * Adjust remaining code throughout for consistency. 2010-09-01 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h: Fix typo in macro. 2010-08-31 Albert Chu * ipmi-oem/: Support inventec restore-to-defaults. * Document more inventec oem additions. 2010-08-31 Albert Chu * ipmi-sensors/src/ipmi-sensors-detailed-output.c (_detailed_output_event_enable): Gracefully handle IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED error. 2010-08-25 Albert Chu * ipmi-oem/: Support Quanta get/set-nic-mode, get/set-bmc-services, get-account-status, get/set-dns-config, get/set-web-server-config, get/set-power-management-config, get/set-sol-idle-timeout, get/set-telnet-ssh-redirect-status, read/write-mac-address. * ipmi-oem/: Support get/set-telnet-ssh-redirect-status for inventec. 2010-08-24 Albert Chu * ipmi-oem/: Fix and support inventec get-account-status. * Fix typos: TS12 -> FS12 motherboard. * ipmi-oem/: Support Inventec get/set-sol-idle-timeout. Implement get/set-telnet-ssh-redirect-status. * ipmi-oem/: Fix range checking on parameter inputs. * ipmi-oem/: Fix and support Inventec get/set-dns-config. 2010-08-23 Albert Chu * ipmi-oem/: Implement inventec get-account-status, get-dns-config, and set-dns-config. Fix variable argument help output bug. 2010-08-23 Albert Chu * ipmi-dcmi/: Support --set-asset-tag, --get-management-controller-identifier-string, and --set-management-controller-identifier-string. 2010-08-23 Albert Chu * bmc-watchdog/, bmc-device/: Fix some documentation typos/inconsistencies. 2010-08-20 Albert Chu * Support DCMI 1.1 Specification. Re-org various code for consistency to DCMI 1.1 specification organization. 2010-08-20 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c (_ipmi_lan_2_0_cmd_wrapper_verify_packet): Fix error check corner case. 2010-08-18 Albert Chu * ipmi-oem/: Tweak Fujitsu get-sel-entry-long-text based on comments by Holger Liebig. Other minor tweaks for code consistency. 2010-08-18 Dan Lukes * ipmi-oem/: Fix for bugs in Fujitsu get-sel-entry-long-text OEM command. 2010-08-18 Albert Chu * libfreeipmi/src/debug/, common/man/manpage-common-cipher-suite-id-details.man: Add SHA256 support. * Variety of mods to remove compiler warnings. 2010-08-18 Holger Liebig * Add SHA256 support globally. 2010-08-17 Albert Chu * ipmi-oem/: Re-format Fujitsu get-sel-entry-long-text for consistency to remaining ipmi-oem code. Re-work to go through multiple iterations. * Add manpage entry for Fujitsu get-sel-entry-long-text OEM command. 2010-08-17 Dan Lukes * ipmi-oem/: Support Fujitsu get-sel-entry-long-text OEM command. 2010-08-13 Albert Chu * ipmi-oem/: Various code consistency cleanup. * libfreeipmi/include/freeipmi/spec/: Various filename and macro name changes for consistency to IPMI spec. * Various code cleanup. 2010-08-12 Albert Chu * ipmimonitoring/: Update examples and library comments. * ipmidetect/ipmidetectd.init: Fix for /etc/freeipmi/ 2010-08-11 Albert Chu * Move config files to /etc/freeipmi/. Support legacy config files. * Fix distcheck bugs. 2010-08-11 Albert Chu * libfreeipmi/: Support Chassis Boot Option Boot Initiator Info and Boot Initiator Mailbox. * libfreeipmi/: Re-work Chassis Boot Option configs to support valid/invalid parameter config on parameters. * ipmi-chassis-config/: Set don't clear valid bits after setting boot flags. * config/ac_ipmipower_config_file.m4: New file. * config/ac_ipmiconsole_config_file.m4: New file. * configure.ac: Calculate ipmipower.conf and ipmiconsole.conf legacy conf files via configure. * ipmipower/, ipmiconsole/: Use macros from autoconf instead of hard defined default conf locations. * ipmidetect/ipmidetect.conf: Add example file. * freeipmi.spec.in: Update appropriately for distribution changes. * Various code cleanup. 2010-08-09 Albert Chu * Convert Repo to Subversion. 2010-08-06 Albert Chu * ipmi-sel/ipmi-sel.8.pre.in, ipmi-fru/ipmi-fru.8.pre.in: Cleanup and re-format a bit. 2010-08-06 Albert Chu * Fix SOL_Retry_Count validation bug. * ipmipower/src/: Fix workaround flag config output corner case. * Support bmc-config 'solchannelassumelanchannel' workaround. * common/man/manpage-common-config-tool-options-sol-channel-number.man: Fix text. 2010-08-06 Albert Chu * freeipmi.spec.in: Update for payload dir. * Fix --enable-rawumps corner cases. * Fix SOL single-channel corner case. 2010-08-05 Albert Chu * Support --enable-rawdumps compile option. 2010-08-05 Albert Chu * common/src/configtool/: Support 'veryslowcommit' workaround in config tools for very slow BMCs. * bmc-config/: Fix multi-channel corner cases. * common/man/: Update very verbose description case in config tools. 2010-08-03 Albert Chu * ipmimonitoring/src/libipmimonitoring/, ipmi-sel/, bmc-device/: Fix corner case with time calculating and daylight savings. 2010-08-02 Albert Chu * libfreeipmi/src/api/, ipmipower/, ipmiconsole/src/libipmiconsole/: Revert OPEN_SESSION_PRIVILEGE rework done on 2010-07-13. Change is unnecessary. 2010-08-02 Albert Chu * tagged pre_multi_channel_config * libfreeipmi/src/util/ipmi-channel-util.c (ipmi_get_channel_numbers): New function. * libfreeipmi/src/util/ipmi-channel-util.c: Re-arch/cleanup for new functionality. * common/man/manpage-common-config-tool-options-verbose.man, common/man/manpage-common-config-tool-options-very-verbose.man: New files. * common/man/manpage-common-config-tool-options.man: Split out verbose option appropriately. * Adjust config tool manpages appropriately. * common/src/configtool/config-tool-checkout.c: If user specifies keypairs, don't output section comments. * common/src/configtool/: Introduce CONFIG_DO_NOT_LIST flag. Only do not show sections with this flag when --list is done. * common/src/configtool/, bmc-config/: Make verbose output only for extra sections & fields. Make very verbose output only for info on why fields were/were not readable/writeable/etc. * bmc-config/src/: Show all sections that can be checked out, including verbose ones when -v isn't specified. * bmc-config/src/: If CONFIG_DO_NOT_CHECKOUT is specified for an entire section, do not force CONFIG_DO_NOT_CHECKOUT if user specifies section on command line. Do not force CONFIG_DO_NOT_CHECKOUT if user specifies key-pair on the command line. * bmc-config/, ipmi-pef-config/: Support new configuration fields and sections for multi-channel configuration support. * Various code cleanup. * tagged post_multi_channel_config 2010-07-29 Albert Chu * Split off SOL payloads into new files and outside of SOL-Commands. 2010-07-28 Albert Chu * libfreeipmi/: Support Chassis Boot Options, Lan Configuration Parameters, Serial/Modem Configuration, SOL Configuration Parameters, System Info Parameters, and PEF Configuration Parameters Set In Progress. * Fix some template bugs/typos. 2010-07-27 Albert Chu * libfreeipmi/: Support Chassis Service Partition Selector and Chassis Service Partition Scan templates, functions, etc. * Various cleanup. 2010-07-23 Albert Chu * doc/freeipmi-faq.texi: Update with x86-64 build instructions and libgcrypt information. 2010-07-22 Albert Chu * libfreeipmi/src/sel-parse/: Workaround compliance issue in Supermicro H8QME. 2010-07-22 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Fix seg-fault corner case. * ipmimonitoring/src/libipmimonitoring/: Support ability to read SEL sensor numbers. Fix sensor number reading corner case. * ipmimonitoring/src/examples/: Output sensor number in examples. 2010-07-21 Albert Chu * libfreeipmi/src/sel-parse/: Fix corner case, do not error out if SEL is empty. 2010-07-13 Albert Chu * libfreeipmi/src/api/, ipmipower/, ipmiconsole/src/libipmiconsole/: Re-work OPEN_SESSION_PRIVILEGE workaround to handle an additional OPEN_SESSION_PRIVILEGE corner case. 2010-07-13 Albert Chu * Various documentation updates. 2010-07-12 Albert Chu * ipmi-oem/: Support Supermicro get-bmc-services-status and set-bmc-services-status. 2010-07-12 Albert Chu * Various documentation updates. 2010-07-08 Albert Chu * ipmi-oem/: Uncomment Quanta reset-to-defaults commands, is now functional w/ proper documentation. 2010-07-08 Dick Detweiler * common/src/pingtool/ping-tool-common.c (_cmdline_parse): Fix casting bug. 2010-07-08 Albert Chu * bmc-config/bmc-config.8.pre.in: Add small OEM config note. 2010-07-07 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_packet.c (ipmiconsole_packet_unassemble): On several errors, assume malformed packet, not internal error. 2010-07-07 Albert Chu & Anonymous Avocent Developer * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_sol_bmc_to_remote_console_packet, _process_protocol_state_sol_session_receive): If SOL is deactivating, don't bother sending Deactivate Payload command, simply close session. 2010-07-06 Albert Chu * configure.ac: Support --without-random-device. 2010-07-02 Albert Chu * Fix compile bug w/ macro renaming. 2010-07-01 Albert Chu * Prefix macros not intended to be used by users. 2010-06-30 Albert Chu * Support Supermicro X8DTU motherboard product id. 2010-06-30 Albert Chu * bmc-config/, ipmi-pef-config/, common/src/configtool/: Support --lan-channel-number, --serial-channel-number. 2010-06-30 Albert Chu * Fix manpage consistency throughout. 2010-06-30 Jan Safranek * ipmidetect/src/ipmidetectd/ipmidetectd_config.c: Fix parsing of unknown arguments. < 2010-06-28 Albert Chu * bmc-watchdog/: Fix "ignorestateflag" workaround for more corner cases. 2010-06-22 Albert Chu * libfreeipmi/src/util/ipmi-channel-util.c: Fix legacy corner case. 2010-06-17 Albert Chu * bmc-watchdog/: Fix --version option. 2010-06-15 Albert Chu * bmc-watchdog/: Support 'ignorestateflag' workaround. 2010-06-14 Albert Chu * libfreeipmi/include/freeipmi/templates/ipmi-messaging-support-cmds-templates.h, libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c: Modify template to ensure some fields that are required are actually optional. 2010-06-14 Albert Chu * Add 'slowcommit' workaround to config tools, to workaround BMCs that cannot take large amounts of data. 2010-06-11 Albert Chu * ipmimonitoring/: Support '%' as sensor units. 2010-06-11 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Fix units output corner case. 2010-06-11 Albert Chu * Return 'privilege level cannot be obtained' error code when rmcpplus status of 'invalid role' returned. 2010-06-11 Albert Chu * Document issues with Intel S5500WBV/Penguin Relion 700 motherboard. 2010-06-10 Albert Chu * doc/freeipmi-faq.texi: Fix URL to Conman. 2010-06-10 Albert Chu * Rename 'supermicro20b' to 'integritycheckvalue' and rework specifically on one issue, rather than a set of issues. 2010-06-09 Albert Chu * Fix ipmi-sensors output corner case in which percent was output as "% unspecified" instead of "%". 2010-06-07 Albert Chu * Fix 'supermicro20b' workaround in ipmiconsole. 2010-06-04 Albert Chu * Support 'supermicro20b' workaround in ipmipower, libipmimonitoring, and libipmiconsole. 2010-06-04 Albert Chu * Remove RAKP4 auto accept for intel20 workaround, should not accept if two part authentication cannot be completed. 2010-06-03 Albert Chu * Support supermicro20b workaround. * Document support appropriately. 2010-06-02 Albert Chu * Various documentation and comment updates. 2010-05-27 Albert Chu * Document workarounds and issues with Supermicro X8DTG motherboard. * common/man/manpage-common-troubleshooting.man: Update w/ inband troubleshooting. * common/man/manpage-common-troubleshooting-lan-only.man: New file. * ipmipower/, ipmiconsole/: Update manpages w/ lan-only troubleshooting. 2010-05-26 Frank Steiner (http://www.bio.ifi.lmu.de/~steiner/) * bmc-watchdog/freeipmi-bmc-watchdog.init: exit status from rc_ functions is not returned by init script. 2010-05-25 Albert Chu * Support Supermicro X8DTG motherboard. 2010-05-21 Albert Chu * libfreeipmi/src/interpret/: Support different SEL event interpretation on assertion vs. deassertion. Various code cleanup. * libfreeipmi/: Various code cleanup. 2010-05-17 Albert Chu * ipmi-dcmi/, libfreeipmi/: Fix copyright headers on all DCMI related files. 2010-05-14 Albert Chu * ipmi-sensors/src/ipmimonitoring: Remove. * ipmi-sensors/src/ipmimonitoring.in: New file. * configure.ac, ipmi-sensors/src/Makefile.am: Fix portability install bug. 2010-05-14 Albert Chu * ipmi-oem/src/ipmi-oem-quanta.c: Fix minor bugs. * libfreeipmi/src/interpret/: Fix bitmask corner case. * libfreeipmi/src/util/: Fix bitmask corner case. * ipmi-pef-config/: Code cleanup, use macro instead of magic number. 2010-05-13 Albert Chu * libfreeipmi/src/interpret/ipmi-interpret.c: Fix threshold sensor state interpretation corner case. 2010-05-13 Albert Chu * ipmi-oem/src/: Fix bitmask bug. * ipmi-oem/src/ipmi-oem-quanta.c: Add macro and output for Westmere-EP processor. * libfreeipmi/src/sel-parse/ipmi-sel-parse-string-quanta.c: Make DIMM output more detailed. 2010-05-12 Albert Chu * ipmimonitoring/: Various comment/documentation updates. 2010-05-11 Albert Chu * libfreeipmi/include/freeipmi/spec/: Support Quanta S99Q/Dell FS12-TY OEM commands. * ipmi-oem/: Support Quanta S99Q/Dell FS12-TY OEM commands. * libfreeipmi/src/sel-parse/: Support Quanta S99Q/Dell FS12-TY OEM SEL events. * libfreeipmi/, ipmi-oem/: Minor cleanup. 2010-05-07 Albert Chu * ipmi-oem/src/ipmi-oem-ibm.c: Fix potential corner case. 2010-05-07 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h: Fix macro typo. 2010-05-06 Albert Chu *common/src/configtool/config-tool-section.h, common/src/configtool/config-tool-section.c (config_sections_validate_keyvalue_inputs): Do not take value_input_required parameter. * bmc-config/, ipmi-pef-config/, ipmi-sensors-config/, ipmi-chassis-config/: Re-work for change in config_sections_validate_keyvalue_inputs. Do not check value inputs when --checkout is specified since it is not necessary. 2010-05-05 Dave Love > * bmc-watchdog/bmc-watchdog.8.pre.in: Fix formatting. 2010-05-04 Albert Chu * Fix make distcheck. 2010-05-03 Albert Chu * libfreeipmi/src/driver/ipmi-sunbmc-driver.c, libfreeipmi/src/driver/ipmi-openipmi-driver.c: Fix string concatentation bugs in error strings. 2010-05-03 Albert Chu Build sunbmc driver w/o bmc_intf.h being found. * COPYING.sunbmc: New file. * README.sunbmc: Removed. * libfreeipmi/src/driver/freeipmi_bmc_intf.h: New file. * libfreeipmi/src/driver/ipmi-sunbmc-driver.c: Adjusted appropriately. * configure.ac, freeipmi.spec.in, Makefile.am, doc/freeipmi-faq.texi: Adjusted appropriately. * libfreeipmi/src/driver/ipmi-sunbmc-driver.c (ipmi_sunbmc_ctx_io_init): Fix initialization corner case is putmsg interface is used over ioctl interface. * libfreeipmi/src/driver/ipmi-sunbmc-driver.c (_set_sunbmc_ctx_errnum_by_errno): Assume EINVAL errno is a system error (b/c system does not support ioctl). * libfreeipmi/src/driver/ipmi-sunbmc-driver.c (ipmi_sunbmc_ctx_errmsg): Fix string concat bug. 2010-05-03 Albert Chu * libfreeipmi/: If sunbmc driver is not supported, report "device not supported" instead of "internal error". 2010-04-30 Albert Chu * configure.ac: Update library versions appropriately. 2010-04-30 Dave Love * ipmi-pef-config/src/Makefile.am (install-exec-hook): Don't use `cp -d'. 2010-04-29 Albert Chu * doc/: Update for Quanta S99Q/Dell FS12-TY. * bmc-config/: Work around node busy issues with Quanta S99Q/Dell FS12-TY. 2010-04-28 Albert Chu * libfreeipmi/src/cmds/ipmi-lan-cmds.c (fill_cmd_set_lan_configuration_parameters_bad_password_threshold): Fix error check. 2010-04-28 Albert Chu * Rename dimm macros specifically for motherboard they work on. * Support Inventec 5442/Dell Xanadu III error codes and Dimms. 2010-04-27 Albert Chu * Rename "Xanadu2" to "Xanadu II" globally in documents, comments, and codeto be consistent to Dell product name. * Document/support Inventec 5442/Dell Xanadu III. 2010-03-22 Albert Chu * Various code cleanup, organizational cleanup, fix rpm building, etc. 2010-03-19 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Support SEL monitoring. * ipmimonitoring/src/libipmimonitoring/: Support event/reading type code in sensor iterator. * ipmimonitoring/src/examples/: Add SEL monitoring example. * Various code cleanup. * Minor bug fixes. 2010-03-10 Albert Chu Merge sel_interpret_branch. * Add interpret sel support in interpret library to libfreeipmi. * libfreeipmi/src/sel-parse/: Do not require valid ipmi_ctx. Functions performing ipmi communication will simply error. * ipmi-sel/: Support --output-event-state option. * Consistently name interpret 'sensors' to 'sensor'. * Minor cleanup and minor fixes. 2010-03-08 Albert Chu * libfreeipmi/src/interpret/ipmi-interpret.c (_get_sensor_state): Return UNKNOWN state if invalid sensor bitmask returned. 2010-03-03 Albert Chu * ipmi-sel/: Fix possible HP workaround bug. 2010-03-02 Albert Chu * ipmi-oem/: Fix column output for IBM get-led. 2010-03-02 Albert Chu * Fix Posix time portability globally. 2010-03-02 Albert Chu * ipmi-sel/: Support --date-range and --exclude-date-range. 2010-03-02 Albert Chu * ipmi-oem/: Uncomment IBM Get LED, verified. Sensor search bug fix. 2010-03-01 Albert Chu * ipmi-oem/: Fix IBM Get LED. 2010-02-27 Albert Chu * ipmi-oem/: Add Dell Get Active LOM Status support. 2010-02-25 Albert Chu * ipmi-oem/: Add IBM get-led base code. 2010-02-21 Albert Chu * ipmi-sel/, common/src/toolcommon/: Support --output-manufacturer-id. Alter OEM record output to align with columns by outputting "N/A" in appropriate fields and putting manufacturer ID in event output. 2010-02-19 Albert Chu * ipmi-sensors/: Ensure multiple event output strings separated by space in simple output. 2010-02-18 Albert Chu * ipmi-sensors/: Code cleanup. 2010-02-17 Albert Chu * ipmi-sensors/, common/src/toolsensor/, man/: Support numeric input for --sensor-types and --exclude-sensor-types. * common/src/, ipmi-sel/: Support --sensor-types and --exclude-sensor-types options. 2010-02-16 Albert Chu From pre_ipmimonitoring_to_ipmi_sensors_branch * ipmi-sensors/ipmimonitoring.8: New file. * ipmi-sensors/src/ipmimonitoring: New file. * ipmimonitoring/ipmimonitoring.8.pre.in: Remove file. * ipmimonitoring/src/ipmimonitoring/: Remove ipmimonitoring. * ipmimonitoring/src/examples/: Add ipmimonitoring-sensors example. * common/src/toolcommon/: Make ipmimonitoring config file options backwards compatible to ipmi-sensors. * common/src/toolsensor/: Code cleanup given changes. * etc/, doc/, man/: Update appropriately for changes. * configure.ac: Update appropriately for changes. 2010-02-16 Albert Chu * ipmi-sensors/src/ipmi-sensors-simple-output.c (_simple_output_full_record): Fix comma separated output corner case. 2010-02-12 Albert Chu * ipmi-sensors-config/ipmi-sensors-config.8.pre.in, libfreeipmi/libfreeipmi.3.pre.in: Fix typos, pef-config to ipmi-pef-config. * doc/freeipmi-hostrange.txt: Add some option info. 2010-02-11 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c (_ipmi_lan_2_0_cmd_wrapper_verify_packet): Fix session sequence number wrap around corner case. 2010-02-11 Albert Chu * ipmimonitoring/src/libipmimonitoring: Fix sensor naming. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_bitmasks.h: New file. * freeipmi.spec.in: Update appropriately. 2010-02-10 Albert Chu * ipmimonitoring/libipmimonitoring.3.pre.in: Update for recent changes. * ipmimonitoring/src/libipmimonitoring/: Code cleanup. 2010-02-09 Albert Chu * common/src/toolsensor/, ipmi-sensors/, ipmimonitoring/, ipmi-sel/: Various code cleanup. * common/src/toolhostrange/pstdout.h, common/src/toolhostrange/pstdout.c: For wrapper pstdout's use normal printf/fprintf/perror if library not initialzed. * COPYING.ZRESEARCH: Update to GPLv3. 2010-02-09 Albert Chu * contrib/ganglia/: Update appropriately for changes. * contrib/ganglia/ganglia_ipmi_sensors.pl: Updated for new output format and options. Support ability to monitor sensor state. Support -T and -t options to allow option to monitor only sensor state or sensor readings. * contrib/ganglia/ganglia_ipmimonitoring.pl: Remove file. Superseded by changes in ganglia_ipmi_sensors.pl. * contrib/nagios/nagios_ipmi_sensors.pl: New file. * contrib/nagios/nagios_ipmimonitoring.pl: Remove file. Superseded by nagios_ipmi_sensors.pl. 2010-02-08 Albert Chu Continue update to GPLv3 globally. * Replace LLNL tool COPYING files w/ GPLv3 COPYING file. * DISCLAIMER.rmcpping, DISCLAIMER.rmcpping.UC, COPYING.rmcpping: Remove files, "rmcpping" is a part of "ipmiping." * Update LLNL ipmi tool project headers. * Fix LLNL ipmi tool project head typos. * common/man/: Update manpages w/ GPLv3 info. * common/man/manpage-common-gpl-freeipmi-text.man: New file. * Fix other miscallaneous header files. 2010-02-08 Albert Chu * ipmi-locate/: Support --defaults option. 2010-02-08 Albert Chu * doc/: Fix Linux vs. GNU/Linux usage. 2010-02-05 Albert Chu Begin update to GPLv3 globally. * Replace COPYING w/ GPLv3 COPYING file. * Update all FreeIPMI core team code header files. * Fix up some header file inconsistencies. 2010-02-05 Albert Chu * ipmimonitoring/: Rename a number of functions to specify that they are sensor monitoring functions. This is to prepare for future API additions for SEL monitoring. 2010-02-03 Albert Chu * libfreeipmi/src/interpret/: Fix OEM parsing issue. * libfreeipmi/src/interpret/: Support Supermicro OEM by default. * ipmi-sensors/: Support OEM interpretations in ipmi-sensors. * libfreeipmi/src/interpret/: Add Dell OEM interpretations. 2010-02-02 Albert Chu * libfreeipmi/src/interpret/, libfreeipmi/include/freeipmi/interpret/, ipmimonitoring/: Support OEM sensor interpretations. * common/src/miscutil/conffile.c, common/src/miscutil/conffile.h: Update to support infinite option arguments. 2010-02-01 Albert Chu * ipmiconsole/ipmiconsole.8.pre.in: Format change. * ipmimonitoring/src/ipmimonitoring/: Update for newer sensor types. * ipmimonitoring/src/ipmimonitoring/: Various cleanup. * ipmimonitoring/: Support OEM bitmask types. 2010-01-29 Albert Chu * ipmimonitoring/src/libipmimonitoring/ (ipmi_monitoring_read_sensor_bitmask_strings): New function. * ipmimonitoring/src/libipmimonitoring/ (ipmi_monitoring_sensor_bitmask_string): Removed function. * ipmimonitoring/src/ipmimonitoring/: Update appropriately for API change. 2010-01-29 Albert Chu * ipmi-sensors/src/ipmi-sensors-detailed-output.c (_detailed_output_event_enable): Fix mem-leak. * libfreeipmi/include/util/ipmi-sensor-util.h, libfreeipmi/src/util/ipmi-sensor-util.c, * libfreeipmi/include/util/ipmi-sensor-and-event-code-tables.h, libfreeipmi/src/util/ipmi-sensor-and-event-code-tables.c, (ipmi_get_sensor_event_messages, ipmi_get_event_messages): Rename ipmi_get_sensor_event_messages to ipmi_get_event_messages. Add IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING bitmask. * libfreeipmi/include/util/ipmi-sensor-and-event-code-tables.h, libfreeipmi/src/util/ipmi-sensor-and-event-code-tables.c (ipmi_get_oem_event_bitmask_message): Renamed from ipmi_get_oem_sensor_event_bitmask_message. * ipmi-sensors/: Update appropriately. 2010-01-29 Albert Chu * libfreeipmi/include/util/ipmi-sensor-util.h, libfreeipmi/src/util/ipmi-sensor-util.c (ipmi_get_sensor_event_messages): New function. * ipmi-sensors/: Use ipmi_get_sensor_event_messages(). 2010-01-27 Albert Chu * ipmi-sensors/: Support --output-sensor-state and --sensor-state-config-file. * man/freeipmi.conf.5.pre.in: Fix language consistency. * libfreeipmi/include/freeipmi/interpret/ipmi-interpret.h, libfreeipmi/src/interpret/ipmi-interpret-defs.h: Support IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA flag. 2010-01-25 Albert Chu * doc/freeipmi-coding.txt: Fix typos. 2010-01-21 Albert Chu * README, man/freeipmi.7.pre.in: Additional general information added. 2010-01-21 Albert Chu * ipmi-pef-config/ipmi-pef-config.8.pre.in: Fix typo. 2010-01-20 Albert Chu * ipmi-sensors/: Support --output-event-bitmask option. * ipmi-sensors/: Re-org and cleanup code significantly. 2010-01-19 Albert Chu * libfreeipmi/include/freeipmi/spec/: Update macros based on Dell docs. * ipmi-oem/: Update code appropriately. * ipmi-oem/: Change get-power-headroom-info to get-power-head-room for consistency to Dell docs. Backwards compatability maintained. 2010-01-18 Andrew Wansink and Albert Chu * Fix portability issues to Solaris w/ MAXHOSTNAMELEN definition. 2010-01-15 Albert Chu * libfreeipmi/src/sel-parse/ipmi-sel-parse-string-sun.h, libfreeipmi/src/sel-parse/ipmi-sel-parse-string-sun.c: New files. * libfreeipmi/src/sel-parse/ipmi-sel-parse-string.c: Support Sun interpretations. * ipmi-sel/ipmi-sel.8.pre.in: Update motherboard list. * doc/freeipmi-faq.texi: Update vendor list. 2010-01-14 Klaus Kaempf * libfreeipmi/src/cmds/ipmi-messaging-support-cmds.c (fill_cmd_set_system_info_parameters_primary_operating_system_name): Fix cut and paste typo. 2010-01-08 Albert Chu * ipmi-sensors/, ipmimonitoring/: Fix manpage examples. 2010-01-08 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h: Add Sun manufacturer and product IDs. 2010-01-08 Albert Chu Merge lib_interpret_branch * ipmimonitoring/src/libipmimonitoring/: Support IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST error code. Remove unused IPMI_MONITORING_ERR_CONFIG_FILE_PARSE error code. * Add interpret sub library to libfreeipmi. * ipmimonitoring/src/libipmimonitoring/: Re-adjust library to use interpret sub-library instead of internal. Maintain backwards compatability to original config file. * freeipmi.spec.in: Update appropriately for changes. 2010-01-07 Albert Chu * doc/freeipmi-coding.txt: Update text. 2009-12-28 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.h: Fix tabbing. * doc/freeipmi-libraries.txt, libfreeipmi/libfreeipmi.3.pre.in: Remove dcmi sub-library, was removed. 2009-12-24 Albert Chu * doc/freeipmi-oem-documentation-requirements.txt: Update. 2009-12-23 Albert Chu * doc/freeipmi-oem-documentation-requirements.txt: Update. 2009-12-23 Albert Chu * Globally fix copyright years for 2010. 2009-12-23 Albert Chu * ipmi-oem/: Support dell get-chassis-identify-status. * ipmi-oem/: Support 'guid', 'chassis-service-tag', 'chassis-related-service-tag', 'board-revision' for Dell get-system-info. 2009-12-23 Albert Chu * ipmi-oem/ipmi-oem.8.pre.in: Fix grammer typo. 2009-12-22 sandeep patra * ipmi-pef-config/src/Makefile.am: Fix portability bug to cygwin. 2009-12-22 Albert Chu * doc/freeipmi-faq.texi: Add operating sytems section. 2009-12-21 Albert Chu * ipmi-sensors/: Output Entity String along with "Container Entity ID" or "FRU Entity ID". 2009-12-21 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h: Update appropriately w/ Dell docs given. * libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameter-oem-spec.h: Update appropriately w/ Dell docs given. * ipmi-oem/: Update commands, output, comments, etc. w/ Dell docs given. 2009-12-17 Holger Liebig * ipmi-oem/src/ipmi-oem-fujitsu.c: Correct ambiguities from the official documentation. 2009-12-17 Albert Chu * ipmi-dcmi/src/ipmi-dcmi.c (_get_power_limit, set_power_limit): Implement workaround to deal w/ DCMI interpretation issue. 2009-12-17 Albert Chu * man/freeipmi.7.pre.in, common/man/manpage-common-workaround-heading-text.man, README: Add some workaround information. * doc/freeipmi-bugs-issues-and-workarounds.txt: Rework some text. 2009-12-16 Albert Chu * doc/freeipmi-bugs-issues-and-workarounds.txt: Document workaround/interpretation issue in DCMI. * ipmi-dcmi/src/ipmi-dcmi.c (_get_power_limit, get_power_limit, set_power_limit): Implement workaround to deal w/ DCMI interpretation issue. * ipmi-dcmi/: Support --interpret-oem-data option. * ipmi-dcmi/, common/src/toolcommon/tool-config-file-common.h, common/src/toolcommon/tool-config-file-common.c, man/freeipmi.conf.5.pre.in, etc/freeipmi.conf: Support --interpret-oem-data config file option. * libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-oem-cmds.h: New file. 2009-12-16 Albert Chu * doc/freeipmi-bugs-and-workarounds.txt: Rename to freeipmi-bugs-issues-and-workarounds.txt. * doc/freeipmi-bugs-issues-and-workarounds.txt: Update w/ "interpretation" issues. * ipmpower/, ipmiconsole/src/libipmiconsole/, libfreeipmi/src/api/: More accurately comment on IPMI compliance issue. * freeipmi.spec.in: Update appropriately for doc change. 2009-12-16 Albert Chu * common/src/miscutil/hostlist.c, common/src/miscutil/hostlist.h: Update newest lib versions. 2009-12-15 Albert Chu * doc/freeipmi-coding.txt: Add section on OEM extensions. 2009-12-15 Albert Chu * common/src/tooloem/: New convenience lib. * ipmi-fru/, ipmi-sensors/, ipmi-sel/: Use new convenience lib for common actions of --interpret-oem-data. * common/man/manpage-common-interpret-oem-data.man: Slightly modify statement. * ipmi-dcmi/ipmi-dcmi.8.pre.in: Fix text for exception actions. * ipmi-dcmi/src/ipmi-dcmi.c (_get_power_limit, set_power_limit): Output error messages for special completion codes. 2009-12-15 Holger Liebig * libfreeipmi/src/cmds/ipmi-dcmi-cmds.c, libfreeipmi/include/freeipmi/templates/ipmi-dcmi-cmds-templates.h: Fix incorrect correction_time_limit field sizes. * libfreeipmi/include/freeipmi/spec/ipmi-netfn-spec.h (IPMI_NET_FN_GROUP_EXTENSION, IPMI_NET_FN_OEM_GROUP): Fix macro checks. 2009-12-14 Albert Chu * ipmi-raw/ipmi-raw.8.pre.in: Fix spelling typo. * man/freeipmi.7.pre.in: Fix punctuation typo. * common/man/manpage-common-hostranged-text-threads.man: New file. * common/man/manpage-common-hostranged-text-shell.man: Collapse text into manpage-common-hostranged-text-main.man. Remove file. * Add new documentation to manpages as needed. * ipmipower/ipmipower.8.pre.in: Document how ipmipower is different than other tools in parallelism. 2009-12-14 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-dcmi-cmds.h: Add macros for OEM min/max exception actions. * ipmi-dcmi/src/ipmi-dcmi-argp.c: Fix command line parsing of --activate-deactivate-power-limit. 2009-12-14 Holger Liebig * libfreeipmi/src/cmds/ipmi-dcmi-cmds.c, libfreeipmi/include/freeipmi/templates/ipmi-dcmi-cmds-templates.h: Fix invalid tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs template. * ipmi-dcmi/src/ipmi-dcmi.c (get_asset_tag, _sensor_info_output, get_power_limit, _output_power_statistics): Fix output bugs and typos. 2009-12-14 Albert Chu * common/src/toolhostrange/tool-hostrange-common.c (eliminate_nodes, pstdout_setup): Fix corner case where eliminate option leads to 0 hosts. * Adjust all tools appropriately for change. * ipmidetect/src/ipmidetectd/ipmidetectd_loop.c (_fds_setup): Setup listening socket to be able to more quickly reuse local addresses. * ipmipower/, ipmiconsole/src/libipmiconsole/, ipmidetectd/: Adjust workaround to deal with OSes that will return ECONNRESET or ECONNREFUSED if the IPMI port cannot be reached. * ipmipower/, ipmiconsole/src/libipmiconsole/, ipmidetectd/: Adjust workaround to deal with OSes that will return ECONNRESET or ECONNREFUSED if the IPMI port cannot be reached to not use select(). 2009-12-13 Albert Chu * libfreeipmi/src/util/ipmi-sensor-units-util.c (ipmi_sensor_units_string): Fix output corner case. 2009-12-12 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c: Header file cleanup. * common/src/toolsensor/, common/src/toolcommon/: Adjust macros for cygwin. * ipmipower/, ipmiconsole/src/libipmiconsole/, ipmidetectd/: Adjust workaround to deal with OSes that will return ECONNRESET or ECONNREFUSED if the IPMI port cannot be reached. * Fix compiler warnings. 2009-12-11 Holger Liebig and Albert Chu * ipmipower/, common/src/pingtool/, ipmidetect/src/ipmidetectd/, ipmiconsole/src/libipmiconsole/, libfreeipmi/src/api/: Support workaround to deal with OSes that will return ECONNRESET or ECONNREFUSED if the IPMI port cannot be reached. 2009-12-11 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c (_ipmi_lan_cmd_recv, _ipmi_lan_2_0_cmd_recv): Do not pass from parameter if not necessary. 2009-12-11 Albert Chu Fix up cygwin portability issues. * common/src/portability/freeipmi-portability.h: Do not define log2 if it's already defined. * libfreeipmi/src/driver/ipmi-openipmi-driver.c: Define __USE_LINUX_IOCTL_DEFS as needed. 2009-12-11 Holger Liebig * libfreeipmi/src/locate/ipmi-locate-util.c (locate_set_locate_errnum_by_errno), libfreeipmi/src/sdr-cache/ipmi-sdr-cache-util.c (sdr_cache_set_sdr_cache_errnum_by_errno): Fix logic bugs. 2009-12-11 Albert Chu * doc/freeipmi-faq.texi: Update special section. 2009-12-10 Albert Chu Merge changes from ipmimonitoring_rearch_branch * ipmimonitoring/: Rearch to support more sensor types. 2009-12-10 Albert Chu * libfreeipmi/include/freeipmi/record-format/ipmi-sdr-record-format.h: Cleanup linearization macros. 2009-12-10 Albert Chu * ipmipower/ipmipower.8.pre.in, ipmiconsole/ipmiconsole.8.pre.in: Remove legacy comments. * doc/freeipmi-faq.texi: Add "special" note. * bmc-info/bmc-info.8.pre.in: Fix formatting. 2009-12-10 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-messaging-support-cmds.h: Fix typing inconsistency. * common/src/portability/freeipmi-portability.h: Fix whitespace formatting. 2009-12-09 Albert Chu * ipmi-sel/src/ipmi-sel.c (_normal_output_event): Remove legacy special/unique checks that are no longer needed. * ipmipower/src/ipmipower.c: Fix whitespace. 2009-12-09 Albert Chu * doc/freeipmi-bugs-and-workarounds.txt: Update w/ more stuff. * doc/freeipmi-oem-documentation-requirements.txt: Minor updates. * libfreeipmi/src/sel-parse/ipmi-sel-parse-string.c: Fix whitespace. * libfreeipmi/include/freeipmi/sel-parse/ipmi-sel-parse.h: Fix API documentation. 2009-12-08 Albert Chu * ipmiconsole/, ipmipower/, libfreeipmi/: Support ability to report incompatible crypt library. 2009-12-08 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (ipmiconsole_engine_setup): Fix error message. * doc/freeipmi-testing.txt: Update w/ nice to have sel test. * doc/freeipmi-coding.txt: Update w/ config tools info. 2009-12-07 Albert Chu * ipmi-sel/src/ipmi-sel.c (_display_sel_records): Tweak column size slightly for common scenario. * ipmi-sel/src/ipmi-sel.c (_display_sel_records): Fix output corner case when --ignore-sdr-cache is specified. * doc/freeipmi-testing.txt: Update w/ nice to have sel test. * doc/freeipmi-coding.txt: Update w/ workaround info. 2009-12-07 Albert Chu * ipmi-sensors/src/ipmi-sensors-detailed-output.c (_output_device_type_and_modifier): Fix output corner case. 2009-12-07 Albert Chu * Tagged Release-0_8_0_base. * Branched Release-0_8_0_branch. 2009-12-07 Albert Chu * common/src/: Fix various memleaks. 2009-12-05 Albert Chu * bmc-config/, ipmi-pef-config/, ipmi-chassis-config/, ipmi-sensors-config/: Minor re-arch/code cleanup. 2009-12-04 Albert Chu * doc/freeipmi-bugs-and-workings.txt: Add alert policy workaround for Fujitsu. * ipmi-pef-config/: Support workaround for Alert Policy Config on Fujitsu motherboards. 2009-12-04 Albert Chu * Update comp code macros to more closely match IPMI spec. * Various doc updates. 2009-12-02 Albert Chu * ipmi-oem/: Comment out inventec firmware update support until Dell can verify. 2009-12-02 Albert Chu * Tagged Release-0_8_0_beta7. 2009-12-02 Albert Chu * Fix comments. * ipmi-oem/: Re-architect for oem command specific completion codes. 2009-12-01 Albert Chu * ipmi-oem/: Support inventec firmware update. 2009-11-30 Albert Chu * ipmi-oem/: Complete Fujitsu OEM commands. * ipmi-oem/: Code cleanup. * ipmi-oem/: Rename "get/set-nic-status" to "get/set-nic-mode" for consistency to OEM doc. 2009-11-26 Albert Chu * ipmi-oem/: add flags for future use needs. 2009-11-26 Albert Chu * libfreeipmi/: Fix templates given dcmi reorg. 2009-11-25 Cyril Brulebois * Fix portability issue for kfreebsd. 2009-11-25 Albert Chu * libfreeipmi/: Re-org dcmi to be organized like oem extensions instead of in separate directory. * freeipmi.spec.in: Update for change. 2009-11-24 Albert Chu * libfreeipmi/: Support reading raw readings from sensor-read library. * freeipmi.spec.in: Add missing docs. * libfreeipmi/: Increase KCS retry/timeout for ipmb messages. * libfreeipmi/: Fix error message output corner case. 2009-11-24 Albert Chu * ipmi-oem/: Fix Fujitsu OEM command. 2009-11-24 Albert Chu * Support debug dumping in openipmi driver for ipmb requests. 2009-11-23 Albert Chu * ipmi-oem/: Support additional Fujitsu OEM commands. * libfreeipmi/src/util/ipmi-sensor-units-util.c: Make interesting output combination cleaner. 2009-11-23 Albert Chu * Tagged Release-0_8_0_beta6. 2009-11-22 Albert Chu * libfreeipmi/: Various code cleanup. Support raw ipmb. * ipmi-raw/: Support bridging. 2009-11-19 Albert Chu * Continue code cleanup. * ipmi-sensors/: Fix output corner case. 2009-11-18 Albert Chu * libfreeipmi/: Support sensor bridging across different channels. * libfreeipmi/src/debug/: Fix rmcpplus ipmb output corner case. * libfreeipmi/src/api/: Fix ipmi 2.0 ipmb bridging. 2009-11-17 Albert Chu * ipmi-sensors/: Fix debug output typos. 2009-11-16 Albert Chu * Tagged Release-0_8_0_beta5. 2009-11-14 Yaroslav Halchenko * ipmi-sensors/: Fix output typo "Nominal reading" -> "Nominal Reading". 2009-11-13 Albert Chu * ipmi-oem/: Support Fujitsu OEM commands from online documentation. 2009-11-13 Albert Chu * Fix documentation typos. 2009-11-12 Yaroslav Halchenko * Fix manpage comments. 2009-11-10 Albert Chu * common/src/toolhostrange/, contrib/: Update copyrights. 2009-11-06 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_ipmi_retransmission_timeout): On excessive retransmissions, error with "connection timeout" if we are at the beginning of the protocol. * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_check_try_new_port): Add special case. If reported console port is the wrong endian, flip it back to the right endian. * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_process_protocol_state_close_session_sent): Fix corner case dealing with console port change. 2009-11-06 Albert Chu * Document SOL bugs on Supermicro X8DTH-iF. 2009-11-06 Albert Chu * ipmi-pef-config/: Support hex codes for event filter sensor types. 2009-11-06 Albert Chu * ipmi-pef-config/ipmi-pef-config.8.pre.in: Fix typo. 2009-11-04 Albert Chu * Support "skip sol activation status" workaround for ipmiconsole/libipmiconsole. 2009-11-04 Albert Chu * Cleanup documents and code, i.e. != e.g. * Add more documentation. 2009-11-03 Albert Chu * libfreeipmi/include/freeipmi/sdr-cache/, libfreeipmi/src/sdr-cache/: Remove ability to check for duplicate sensor numbers, is invalid b/c of different slave addresses. 2009-11-02 Albert Chu * Tagged Release-0_8_0_beta4. 2009-11-02 Albert Chu * doc/freeipmi-oem-documentation-requirements.txt: New doc. 2009-10-28 Albert Chu * Fix corner case. 2009-10-26 Albert Chu * Various code cleanup. * common/src/toolcommon/tool-cmdline-common.h, common/src/toolcommon/tool-cmdline-common.c: Return errors on bad workaround flags. Split out tool specific workaround flags. * ipmi-fru/, ipmi-sel/: Make tool specific workaround flags. 2009-10-23 Albert Chu * ipmiconsole/src/ipmiconsole/: Output escape menu with appropriate escape char. 2009-10-23 Albert Chu * Tagged Release-0_8_0_beta3. 2009-10-22 Albert Chu * Fix Netbsd portability bugs discovered by John Heasley . * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (ipmiconsole_engine_thread_create): Fix pthread corner case found by John Heasley . 2009-10-15 Albert Chu * libfreeipmi/src/sel-parse/: Fix/enhance Dell SEL event interpretations. 2009-10-14 Albert Chu * ipmi-sensors/, ipmimonitoring/, common/src/toolcommon/, etc/: Fix config file parsing or documentation bugs. 2009-10-14 Albert Chu * common/src/toolhostrange/pstdout.c (_pstdout_output_consolidated_finish): Fix typo. * common/src/toolhostrange/pstdout.c: Up output buffer size. 2009-10-13 Albert Chu * ipmi-sel/, ipmi-fru/: Add motherboard documentation. 2009-10-13 Albert Chu * ipmi-sel/: Change verbosity defaults. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_event_message_separator): New function. * libfreeipmi/src/sel-parse/: Use ipmi_event_message_separator appropriately for event messages. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c: Tweak message outputs appropriately for consistency and correctness. * Tagged Release-0_8_0_beta2. 2009-10-12 Albert Chu * ipmi-sel/: Support --tail option. 2009-10-05 Albert Chu * Support shared sensors w/ event only sdr records. * doc/: Various tweaks. 2009-10-05 Albert Chu * Tagged Release-0_8_0_beta1. 2009-10-05 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-bmc-watchdog-timer-cmds.h: Fix macro calculation bug. 2009-10-02 Albert Chu * Change --show-sensor-type back to --no-sensor-type-output. Adjust for logical change in option. * ipmi-sel/, common/src/toolsensor/: Fix column alignmnent corner case. * ipmi-sel/: Collapse event and event detail into one column. * ipmi-sel/, libfreeipmi/src/sel-parse/: Fix record id column alignment. 2009-10-01 Jan Safranek * Fix LSB compliance issues with bmc-watchdog and ipmidetectd init scripts, logrotate, and sysconfig file naming. 2009-10-01 Albert Chu * Change --no-sensor-type-output to --show-sensor-type. Adjust for logical change in option. * Support --no-header-output option in ipmi-sel, ipmi-sensors, and ipmimonitoring. * ipmi-sel/, libfreeipmi/src/sel-parse/: Tweak output. 2009-09-30 Albert Chu * Change --no-sensor-type to --no-sensor-type-output. * common/man/: Various cleanup. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c: Make FRU state event data 2 output more detailed. * freeipmi.spec.in: Add ipmidetectd.conf. 2009-09-29 Albert Chu * Suppoert --no-sensor-type in ipmi-sel, ipmi-sensors, and ipmimonitoring. * libfreeipmi/src/fru-parse/: Handle no information corner case. 2009-09-28 Albert Chu * libfreeipmi/src/sensor-read/ipmi-sensor-read.c: Fix error return code corner case. 2009-09-26 Albert Chu * libfreeipmi/src/sel-parse/: Code cleanup, split out OEM interpretations into vendor specific files. 2009-09-24 Albert Chu * Fix make distcheck. 2009-09-24 Jan Safranek * bmc-watchdog/freeipmi-bmc-watchdog.init, ipmidetectd/freeipmi-ipmidetectd.init: Various fixes to make init scripts LSB compliant. * ipmidetect/ipmidetectd.conf: New file. 2009-09-24 Albert Chu * ipmidetect/freeipmi-ipmidetectd.init, bmc-watchdog/freeipmi-bmc-watchdog.init: untabify, cleanup formatting. 2009-09-23 Albert Chu * ipmi-oem/: Support get/set power management on inventec. * ipmi-oem/: Support get/set leds on sun. * ipmi-oem/: Various cleanup. * ipmi-sensors/, libfreeipmi/: Make generic device locator and management controller sdr records have entity instance and type. Adjust code in sdr-parse appropriately, adjust ipmi-sensors appropriately. * ipmi-oem/, common/src/toolsensor/: Support Sun LED get/set. 2009-09-22 Albert Chu * ipmi-dcmi/: Fix output corner case. * libfreeipmi/src/dcmi/: Fix get sensor info corner case. * libfreeipmi/src/sel-parse/: Add inventec port80 code event interpretation. * ipmi-oem/: Add set-system-guid for inventec. Add set-asset-tag for dell. * ipmi-oem/: Add set-fcb-version for dell. Add get/set board id. * ipmi-oem/: Add get/set web-server-config for inventec. * ipmi-oem/: Add get/set authentication config for inventec. 2009-09-21 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-device-types-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-device-types-oem-spec.h: New files. * libfreeipmi/src/spec/ipmi-sensor-and-event-code-tables-spec.c, libfreeipmi/src/spc/ipmi-sensor-and-event-code-tables-oem-spec.c: New files. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h: Make string arrays of offsets public. * libfreeipmi/src/spec/ipmi-device-types-spec.c: New files. * libfreeipmi/include/freeipmi/util/ipmi-device-types-util.h, libfreeipmi/src/util/ipmi-device-types-util.c: New files * ipmi-sensors/src/: Support device type and device modifier string outputs. Support oem outputs in generic device locators. 2009-09-18 Albert Chu * libfreeipmi/src/utils/ipmi-sensor-and-event-code-tables-util.c: Fix corner case in system firmware progress error data2 output. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h: Add event data2 and data3 macros. * libfreeipmi/src/sel-parse/: Fix Dell OEM interpretations. * Various code cleanup. 2009-09-17 Albert Chu * ipmi-oem/: Add inventec restore-to-defaults. * ipmi-oem/: Add inventec read/clear eeprom support. 2009-09-16 Albert Chu * common/man/manpage-common-legacy-output.man: Update text. * ipmi-sensors/, ipmimonitoring/: Support --shared-sensors option. 2009-09-16 Albert Chu * ipmi-sensors/, ipmimonitoring/, ipmi-sel/, libfreeipmi/: Rename sensor "group" to sensor "type" globally for consistency to IPMi spec. 2009-09-15 Albert Chu * bmc-device/: Add error check for generator id input. 2009-09-14 Albert Chu * bmc-device/: Support --platform-event option. * Manpage additions. 2009-09-11 Albert Chu * libfreeipmi/src/sel-parse/ipmi-sel-parse-string.c: Fix and add new Dell interpretations based on Dell specs. 2009-09-10 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-cmd-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-chassis-boot-options-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-lan-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-pef-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-serial-modem-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-sol-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameter-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-netfn-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-system-info-parameter-spec.h: Rename from ipmi-system-info-parameter-spec.h (plural parameters). * libfreeipmi/include/freeipmi/spec/ipmi-product-id-spec.h: New file, rename from ipmi-oem-spec.h. * Various code cleanup using new macros. 2009-09-09 Albert Chu * ipmidetectd/ipmidetectd.conf.5.pre.in: Fix typo. * libfreeipmi/include/freeipmi/spec/ipmi-slave-address-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-numbers-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-spec.h: New file. * Various code cleanup using new macros. * ipmimonitoring/: Update for consistency. Update w/ ipmi errata additions. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c: Update for errata changes. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-and-event-code-tables-oem-spec.h: New file. 2009-09-08 Albert Chu * Rename ipmi-vendor-spec.h to ipmi-oem-spec.h. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-oem-spec.h: New file. * libfreeipmi/include/freeipmi/spec/ipmi-event-reading-type-code-oem-spec.h: New file. * Various code cleanup using new macros. 2009-09-04 Albert Chu * Various code cleanup. 2009-09-03 Albert Chu * libfreeipmi/include/freeipmi/util/ipmi-iana-enterprise-numbers-util.h, libfreeipmi/src/util/ipmi-iana-enterprise-numbers-util.c: New files. * libfreeipmi/, bmc-info/, ipmi-sensors/, ipmi-fru/: Use new utility function appropriately. * libfreeipmi/: Add supermicro iana support. * libfreeipmi/, ipmi-sensors/: Support Supermicro oem sensors. 2009-09-02 Albert Chu * Code cleanup, "macroize" a lot of code. 2009-09-01 Albert Chu * Update IANA enterprise numbers array. * libfreeipmi/include/freeipmi/spec/ipmi-vendor-spec.h: New file. * Update code to use macros from vendor spec. * Add and use macros for ipmi 1.5 and ipmi 2.0. * Macroize system event record code. * Macroize event type codes. * Adjust ipmimonitoring event type codes appropriately. * Macroize sensor types throughout. 2009-08-31 Albert Chu * Document workarounds necessary for newer Supermicro motherboards. Various commenting cleanup. 2009-08-27 Albert Chu * libfreeipmi/src/sel-parse/: Add additional Dell OEM interpretations. 2009-08-26 Albert Chu * libfreeipmi/src/sel-parse/: Add additional Dell OEM interpretations. * ipmi-sel/, libfreeipmi/src/sel-parse/: Support ipmi version in OEM interpretations. 2009-08-25 Albert Chu * ipmi-oem/: Fix Dell power capacity output. 2009-08-25 Albert Chu * ipmi-sel/: Rename --delete-all to --clear for consistency to IPMI spec. * libfreeipmi/src/sel-parse/: Cleanup OEM code. * ipmi-sensors/: Cleanup OEM code. 2009-08-24 Albert Chu * ipmi-oem/: Fix Dell active directory output. Support type configuration. * ipmi-oem/: Output potential key=value pair inputs when user does not specify any. 2009-08-24 Albert Chu * bmc-info/: Re-work format of interpret-oem-data output. * bmc-device/: Add --set-system-firmware-version, --set-system-name, --set-primary-operating-system-name, and --set-operating-system-name support. 2009-08-21 Albert Chu * ipmi-sel/: Support --assume-system-event-records. * bmc-config/, ipmi-pef-config/: Report some fatal errors under non-veborse mode. 2009-08-21 Albert Chu * libfreeipmi/, ipmipower/, common/man/: Support 'authcap' workaround for motherboard that do not properly report authentication support. 2009-08-21 Albert Chu * ipmi-sel/, libfreeipmi/src/sel-parse/: Support Dell OEM sel event. * ipmi-raw/: Change default privilege from user to admin. * etc/freeipmi.conf: Document correct default privileges. 2009-08-20 Albert Chu * ipmi-oem/: Support supermicro get extra firmware info. 2009-08-19 Albert Chu * freeipmi.spec.in: Update URL to gnu.org. * ipmi-oem/: Complete get active directory config. * ipmi-oem/: Complete set active directory config. 2009-08-18 Albert Chu * ipmi-oem/: Redo Dell additions due to extra info given from Dell. * ipmi-oem/: Redo "api" to set various dell configurations. * ipmi-oem/: Begin active directory config support. 2009-08-17 Albert Chu * Collapse get authentication capabilities v1.5 and v2.0 into one template, function, packet, etc. throughout. * Collapse set user password v1.5 and v2.0 into one template, function, packet, etc. throughout. * Various minor code cleanup. 2009-08-13 Albert Chu * ipmi-oem/: Redo Dell additions due to extra info given from Dell. 2009-08-13 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-create.c (ipmi_sdr_cache_create): Add workaround for Fujitsu RX 100. 2009-08-10 Albert Chu * libfreeipmi/src/fru-parse/ipmi-fru-parse.c (ipmi_fru_parse_next): Fix parsing corner case. 2009-08-10 Albert Chu * common/src/toolsdr/tool-sdr-cache-common.c (sdr_cache_create): Fix output corner case. 2009-08-08 Albert Chu * ipmi-oem/: Code cleanup. * common/src/configtool/: Support invalid/unsupported data non-fatal error. 2009-08-07 Albert Chu * ipmi-oem/: Support verbose option. * ipmi-oem/: Suppor dell get/set services commands. 2009-08-06 Albert Chu * ipmi-oem/: Support Dell reset-to-defaults command. * common/src/debugutil/, libfreeipmi/: Properly handle group extensions in debug output. Support better OEM debug output. * ipmi-oem/: Support special "list" OEM ID. 2009-08-06 Albert Chu * bmc-config/src/bmc-config-lan-conf-user-security.h, bmc-config/src/bmc-config-lan-conf-user-security.c: New files. * bmc-config/src/: Support Bad Password Threshold configuration. * libfreeipmi/: Support 'change bits' flag in set user access command. * common/src/configtool/: Allow empty strings as valid empty on command line. 2009-08-05 Albert Chu * libfreeipmi/: Update Full Sensor Record for errata 372 changes. * libfreeipmi/: Support session handle in close session (errata 387). * libfreeipmi/include/freeipmi/spec/ipmi-netfn-spec.h: Add Group Extension codes, OEM Group codes, Group Extension Identification, and extra macros. * libfreeipmi/src/dcmi/, common/src/debugutil/: Update to use new macros appropriately and output more correct output. * libfreeipmi/src/util/: Update sensor and event code tables for new errata. * ipmi-sel/, libfreeipmi/src/sel-parse/: Handle unique corner case output of new sensor type events from errata. * libfreeipmi/include/freeipmi/cmds/, libfreeipmi/src/cmds/, ipmi-chassis-config/: Support new boot flag options. * libfreeipmi/: Supporte HMAC-SHA256 macros. * libfreeipmi/include/freeipmi/spec/: Update entity ids from errata. * libfreeipmi/: Support LAN config bad password threshold. 2009-08-04 Albert Chu * bmc-config/: Fix bmc-config corner case, assume LAN channel is SOL Payload Channel cannot be read. * ipmi-oem/: Support Dell OEM for power capacity management. 2009-08-04 Albert Chu * ipmi-oem/: Support Dell OEM for avg and peak power history. 2009-08-03 Albert Chu * ipmi-oem/: Support Dell OEM to read NIC MAC addresses. * ipmi-oem/: Support Dell power supply info OEM command. * libfreeipmi/src/sel-parse/, ipmi-sel/: Add additional Inventec OEM interpretations. * ipmi-oem/: Support Dell instantaneous power and Dell headroom OEM commands. 2009-08-02 Albert Chu * ipmi-oem/: Support 'list' command to all OEM IDs. 2009-08-01 Albert Chu * common/src/configtool/config-tool-utils.h, common/src/configtool/config-tool-utils.c (config_is_non_fatal_error): New function. * bmc-config/, common/src/configtool/, ipmi-pef-config/, ipmi-chassis-config/: Use config_is_non_fatal_error appropriately. 2009-07-31 Albert Chu * ipmi-oem/: Support Dell get/set NIC selection. 2009-07-31 Albert Chu * libfreeipmi/, ipmi-sensors/, ipmi-sel/, bmc-info/: Collapse API "BAD_COMPLETION_CODE" variants into single "BAD_COMPLETION_CODE" error code. * common/src/configtool/: Output "Not Supported" for fields that are not supported. * Various code cleanup. 2009-07-30 Albert Chu * bmc-config/: Configure "Password" before "Enable_User" for security. * bmc-config/: Workaround Dell Poweredge lan_conf_auth settings. 2009-07-30 Albert Chu * bmc-config/: Fix Lan Session Limit corner case. * bmc-config/: Workaround Dell Poweredge enable user bug. 2009-07-29 Albert Chu * bmc-info/: Support Dell Poweredge R610 Aux Info. 2009-07-25 Albert Chu * ipmi-oem/: Support Dell get/set sol inactivity timeout. 2009-07-25 Albert Chu * ipmi-oem/: Support get/set-bmc-services. 2009-07-24 Albert Chu * common/man/manpage-common-oem-interpretation.man: New file. * bmc-info/, ipmi-sel/: Begin documentation of motherboards supported through --interpret-oem-data. * libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h, libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c: Make parameter types consistent to rest of FreeIPMI. * libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h, libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_get_oem_generic_event_message, ipmi_get_oem_sensor_type_code_message): New functions. * ipmi-sensors/, ipmi-sel/: Support Dell Poweredge R610 sensors. * Add documentation throughout on what motherboards are OEM supported. 2009-07-16 Albert Chu * ipmi-oem/: Support Dell get-fcb-version command. * ipmi-oem/: Re-arch dell oem options. 2009-07-13 Albert Chu * ipmi-oem/: Support Dell get-product-name command. 2009-07-09 Fillod Stephane , Albert Chu * configure.ac, libfreeipmi/: Support --without-encryption build option. 2009-07-09 Fillod Stephane * configure.ac: Fix macro name typo. * configure.ac, common/src/portability/freeipmi-portability.h: Add portability for cbrt. * common/src/toolcommon/tool-cmdline-common.c (verify_common_cmd_args): Do not check for execute permissions on driver device. 2009-07-08 Albert Chu * libfreeipmi/: Get Device ID response field "auxiliary_firmware_revision_information" is optional. * libfreeipmi/: Support IPMI_FLAGS_NO_VALID_CHECK flags. Support new functions ipmi_ctx_get_flags and ipmi_ctx_set_flags. * libfreeipmi/src/sensor-read/: Probably support workarounds w/ IPMI_FLAGS_NO_VALID_CHECK. 2009-07-06 Albert Chu * libfreeipmi/src/sel-parse/: Add Inventec 5441 Memory Error OEM interpretation. * ipmi-sel/src/: Alter event data output conditions. * libfreeipmi/src/sel-parse/: Do not output oem codes when they are unspecified (i.e. 0xFF). 2009-07-01 Albert Chu * libfreeipmi/src/sensor-read/ipmi-sensor-read.c (_sensor_reading_corner_case_checks): Accept IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED as an ok error code. * libfreeipmi/src/api/ipmi-lan-session-common.c: Fix potential segfault corner cases. * libfreeipmi/src/sel-parse/: Alter date output format to be consistent to other tools. 2009-06-30 Albert Chu * ipmi-oem/: Support dell oem commands. * libfreeipmi/include/freeipmi/spec/ipmi-netfn-spec.h: Fix IPMI_NET_FN_RQ_VALID and IPMI_NET_FN_RS_VALID to allow OEM network functions. * libfreeipmi/src/api/: Support debug hex output for openipmi/sunbmc on raw commands. * tagged post_dell_oem 2009-06-29 Albert Chu * tagged pre_dell_oem * libfreeipmi/: Add generic get/set system_info, pef_configuration_parameters, lan_configuration_parameters, serial_configuration_parameters, and sol_configuration_parameters functions. Allowing OEM parameter selectors for potential OEM configuration. 2009-06-26 Albert Chu * libfreeipmi/: Add get/set bmc global enables support. * bmc-device/: Support --get-bmc-global-enables. * libfreeipmi/include/freeipmi/templates/: Add additional documentation. Add forgotten templates. 2009-06-24 Albert Chu * tagged pre_ipmipower_err_handling * ipmipower/src/ipmipower_error.h, ipmipower/src/ipmipower_error.c: New files. * ipmipower/src/ierror.h, ipmipower/src/ierror.c: Remove files. * ipmipower/: Various re-arch to make tool more like other FreeIPMI tools. Use new debug libs. * tagged post_ipmipower_err_handling 2009-06-24 Albert Chu * ipmipower/src/ipmipower.h: Fix assert bug. 2009-06-24 Albert Chu * common/src/toolsensor/, ipmimonitoring/, ipmi-sel/: Support of --entity-sensor-names option. * ipmi-sensors/: Clarify Entity-ID output. * common/man/manpage-common-entity-sensor-names.man: New file. * common/src/toolcommon/: Support entity-sensor-names in config file. * Various code cleanup. 2009-06-23 Albert Chu * doc/freeipmi-testing.txt: New file. 2009-06-23 Albert Chu * bmc-info/: Support --get-system-info option. When options dictate it, output system info. * common/src/toolsensor/, ipmi-sensors/: Begin support of --entity-sensor-names option. 2009-06-23 Albert Chu * libfreeipmi/include/freeipmi/util/ipmi-sensors-util.h, libfreeipmi/src/util/ipmi-sensors-util.c (ipmi_sensor_decode_tolerance, ipmi_sensor_decode_accuracy, ipmi_sensor_decode_resolution): New functions. * libfreeipmi/include/freeipmi/sdr-parse/ipmi-sdr-parse.h, libfreeipmi/src/sdr-parse/ipmi-sdr-parse.c (ipmi_sdr_parse_tolerance, ipmi_sdr_parse_accuracy): New functions. * ipmi-sensors/: Support accuracy, resolution, and tolerance output. 2009-06-22 Albert Chu * libfreeipmi/src/sel-parse/: Use short messages not long ones. * ipmimonitoring/: Remove short option 'i' for --ignore-not-interpretable-sensors. * ipmi-sensors/, common/src/toolcommon/: Add --ignore-not-available-sensors option. * ipmimonitoring/ipmimonitoring.8.pre.in: Note different between --ignore-not-interpretable-sensors and --ignore-na-sensors in ipmi-sensors. * libfreeipmi/include/freeipmi/sdr-parse/, libfreeipmi/src/sdr-parse/ (ipmi_sdr_parse_sensor_reading_ranges_specified): New function. * ipmi-sensors/: Do not output Nominal, Normal Min., Normal Max. reading unless SDR flags indicate unavailable. * libfreeipmi/include/freeipmi/sdr-parse/, libfreeipmi/src/sdr-parse/ (ipmi_sdr_parse_sensor_direction): New function. * ipmi-sensors/: Output sensor direction under very verbose output. 2009-06-21 Albert Chu * ipmi-oem/src/: Add options output into --list output, remove description output. * libfreeipmi/: Make ipmi_entity_ids_pretty array. 2009-06-20 Albert Chu * libfreeipmi/src/fru-parse/: Handle FRU parsing corner case. * libfreeipmi/: Add get system guid command. Add system info commands. * libfreeipmi/: Make configuration parameter data fields optional. * bmc-config/, ipmi-pef-config/, common/src/configtool/: Code cleanup. * libfreeipmi/: Add master write read support. * Various code cleanup. 2009-06-19 Albert Chu * libfreeipmi/src/fru-parse/: Handle FRU read corner case. 2009-06-19 Albert Chu * ipmi-sensors/src/ipmi-sensors.c: Software sensors output "N/A" instead of "Unknown" now. * libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h, libfreeipmi/src/util/ipmi-error-util.c: Add "Send Message" specific completion codes. * libfreeipmi/src/sensor-read/: Consider "message timeout" errors a "sensor reading unavailable" error so tools can continue on. * libfreeipmi/src/api/: Consider multiple additional error codes/completion codes for "message timeout" error code instead of "ipmi" error. 2009-06-18 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-api.h, libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_find_inband): New function. * common/src/toolcommon/tool-common.c, ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_ipmi_communication.c: Use new ipmi_ctx_find_inband call. * Update some documentation. 2009-06-17 Albert Chu * libfreeipmi/include/freeipmi/util/ipmi-outofband-util.h, libfreeipmi/src/util/ipmi-outofband-util.c: New files. * libfreeipmi/include/freeipmi/util/, libfreeipmi/src/util/, ipmipower/, ipmiconsole/, libfreeipmi/src/api/: Support common session sequence number checking functions, authentication capabilities checks, and open session response checks. * Various code cleanup. 2009-06-11 Albert Chu * libfreeipmi/src/sel-parse/: Re-architect code to allow --display and --display-range command to work much more quickly. * ipmi-sel/src/: Update appropriately for API changes. 2009-06-11 Albert Chu * common/man/manpage-common-workaround-sol-only-text.man: Add new motherboard to solpayloadsize workaround. 2009-06-11 Albert Chu * Continue unassemble rework. * tagged pre_fiid_required_rearch * Support FIID_FIELD_MAKES_PACKET_VALID flag in fiid. Add FIID_FIELD_MAKES_PACKET_VALID to all respective fields in reponse packets. * tagged post_fiid_required_rearch * Slighlty rework FIID_FIELD_MAKES_PACKET_VALID to mean "sufficient" if set, not "if only" set. * tagged pre_fiid_required_rearch2 * Rework fiid to make FIID_FIELD_MAKES_PACKET_VALID to FIID_FIELD_MAKES_PACKET_SUFFICIENT. Add new API functions appropriately. * Adjust interfaces to check for packet sufficiency, not validity. * tagged post_fiid_required_rearch2 * Add packet payload validity checks to ipmipower, ipmiconsole, libfreeipmi API. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue): Fix Sun 2.0/Open Session Privilege workaround. * libfreeipmi/src/api/ipmi-api-util.c (api_ipmi_cmd_ipmb), ipmipower/, ipmiconsole/: Add packet validity checks. * Various code cleanup and minor bug fixes. * tagged post_unassemble_rearch 2009-06-10 Albert Chu * tagged pre_unassemble_rearch * Re-work all 'unassemble' code to return 1 if packet was fully parsed vs. not fully parsed. * libfreeipmi/src/debug/: Handle more corner cases. Handle ability to dump data under more bad situations. Consolidate and cleanup code. 2009-06-10 Albert Chu * common/man/manpage-common-workaround-text.man: Add additional motherboard details. 2009-06-10 Albert Chu * ipmiconsole/src/ipmiconsole/ipmiconsole.c: Consider IPMICONSOLE_ERR_BMC_IMPLEMENTATION as a non-fatal error too. 2009-06-09 Albert Chu * libfreeipmi/src/sensor-read/ipmi-sensor-read.c (_sensor_reading_corner_case_checks): Ignore IPMI_COMP_CODE_COMMAND_CANNOT_RESPOND get sensor reading errors. 2009-06-09 Dave Love * common/man/manpage-common-workaround-sol-only-text.man, common/man/manpage-common-workaround-text.man: Add additional motherboard details. 2009-06-09 Albert Chu * Perform "open session privilege" workaround when specifying "Sun 2.0" workaround. 2009-06-09 Albert Chu * common/src/toolcommon/tool-common.c (ipmi_open): Fix workaround flags setting. 2009-06-09 Albert Chu * libfreeipmi/src/api/ipmi-api.c: Fix assert corner case. 2009-06-08 Albert Chu * ipmipower/src/ipmipower_wrappers.h, ipmipower/src/ipmipower_wrappers.c: Removed files. * ipmipower/src/: Cleanup, do not use wrappers. Output errors correctly. * tagged post_wrapper_cleanup 2009-06-05 Albert Chu Variety of code cleanup. * libfreeipmi/src/api/ipmi-lan-session-common.c, ipmipower/src/: Re-architect code such that packets only check fields that are necessary. Re-architect code to handle packet "processing" outside of "verification" functions. * Update comments with key-word "Compliance" when related to IPMI compliance issues. * libfreeipmi/src/api/: Re-architect to not retransmit close session commands when closing a session. * ipmiconsole/src/libipmiconsole/: Remove use of fiid wrappers. * ipmiconsole/src/libipmiconsole/ipmiconsole_fiid_wrappers.h, ipmiconsole/src/libipmiconsole/ipmiconsole_fiid_wrappers.c: Remove files. * tagged pre_wrapper_cleanup * ipmipower/src/wrappers.h, ipmipower/src/wrappers.c: Removed files. * ipmipower/src/ipmipower_util.h, ipmipower/src/ipmipower_util.c: New files. * ipmipower/src/: Cleanup, do not use wrappers. Output error outputs consistently to other tools. * ipmipower/src/, libfreeipmi/src/api/, ipmiconsole/src/libipmiconsole/: Properly iterate over sendto/recvfrom when ok errors occur. * ipmiconsole/src/libipmiconsole/: Properly iterate over poll when ok errors occur. 2009-06-04 Albert Chu * freeipmi.spec.in: Add dcmi additions. * libfreeipmi/src/debug/ipmi-debug-kcs.c: Renamed to ipmi-debug-inband.c. * libfreeipmi/ (ipmi_debug_ssif_packet): New function. * libfreeipmi/: Support more detailed SSIF packet dumps. 2009-06-04 Albert Chu * Due to a CVS crash on Savannah on 2009-05-31, redo a number of changes from 2009-05-28. It is possible tags listed below on 2009-05-28 are no longer valid. 2009-06-04 Albert Chu * libfreeipmi/include/freeipmi/templates/ipmi-dcmi-templates.h: Add forgotten file. 2009-05-28 Albert Chu * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (_convert_to_ipmimonitoring_options): Fix sunbmc corner case. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_ipmi_communication.c (_inband_init): Check workaround flags appropriately. * common/src/toolcommon/tool-common.c (ipmi_open), ipmimonitoring/src/ipmimonitoring/: Fix in-band communication bug when workaround flags for non-inband are specified. 2009-05-28 Albert Chu * tagged finished_remove_legacy * Revert removal of options and legacy support. Went too aggressive. * tagged unfinished_remove_legacy * common/src/toolcommon/tool-cmdline-common.h: Code cleanup, remove excess macros. * tagged redo_remove * "Re-claim" short options in ipmipower, ipmi-chassis, ipmi-raw, ipmi-sel, ipmiconsole. * tagged redo_remove_done * ipmiconsole/src/ipmiconsole/: Remove legacy 'c' short option. * ipmipower/ipmipower.8.pre.in.: Remove short options. 2009-05-27 Albert Chu * tagged pre_remove_many_short_options * "Re-claim" short options in ipmipower, ipmi-chassis, ipmi-raw, ipmi-sel, ipmiconsole. * tagged post_remove_many_short_options * tagged pre_remove_legacy_options * Remove general legacy options. * Remove some legacy options from ipmipower and ipmimonitoring. * tagged post_remove_legacy_options * ipmiconsole/src/ipmiconsole/ipmiconsole_.h: Fix comment. * tagged pre_remove_legacy_config * common/src/toolcommon/tool-config-file-common.c: Remove some legacy options. * tagged post_remove_legacy_config * ipmipower/src/ipmipower/ipmipower_prompt.c: Remove more backwards compatability interactive mode options. * bmc-watchdog/src/: Remove legacy short options. 2009-05-26 Albert Chu * libfreeipmi/include/freeipmi/dcmi/ipmi-dcmi.h, libfreeipmi/include/freeipmi/templates/ipmi-dcmi-templates.h, libfreeipmi/src/dcmi/ipmi-dcmi.c: New files. * libfreeipmi/include/freeipmi/freeipmi.h: Update appropriately for new support. * doc/freeipmi-libraries.txt, libfreeipmi/libfreeipmi.3.pre.in: Update with dcmi sub-lib info. * ipmi-dcmi/: New tool. * common/src/debugutil/: Support DCMI in debug output. * etc/, man/, common/src/toolcommon/: Support DCMI in config file. * COPYING.ipmi-dcmi, DISCLAIMER.ipmi-dcmi: New files. 2009-05-26 Albert Chu * ipmi-sensors/, ipmimonitoring/: Support "all" and "none" for command line record-ids and groups options. * ipmi-sel/: Support --exclude-display and --exclude-display-range. 2009-05-26 Albert Chu * ipmi-sensors/, ipmimonitoring/, common/: Give --record-ids "priority" over --groups. Re-org code, cleanup code, redo documentation to indicate this fact. * common/src/toolsensor/tool-sensor-common.c (calculate_record_ids): Allow mix-and-matching, where --exclude-groups can work with --record-ids and --exclude-record-ids can work with --groups. * common/src/toolsensor/: Code cleanup. 2009-05-25 Albert Chu * ipmi-sensors/, ipmimonitoring/: Support short options for --exclude-groups and --exclude-record-ids. * common/man/: update manpages appropriately. 2009-05-22 Albert Chu * common/src/toolcommon/, ipmi-sensors/, ipmimonitoring/src/ipmimonitoring/: Support --exclude-groups and --exclude-record-ids. * common/src/toolsensor/, ipmi-sensors/, ipmimonitoring/src/ipmimonitoring/: Move common sensor code into common/src/toolsensor/. * Globally fix unsigned int/int macro issues. 2009-05-20 Albert Chu * bmc-info/, common/src/toolcommon/: Support --interpret-oem-data. * ipmi-fru/, common/src/toolcommon/, libfreeipmi/include/freeipmi/fru-parse/, libfreeipmi/src/fru-parse/: Support --interpret-oem-data. 2009-05-20 Albert Chu Code cleanup. * libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h: Add macros. * ipmi-sel/, libfreeipmi/src/sel-parse/: bmc-watchdog/, libfreeipmi/src/util/: Use IANA macros. * libfreeipmi/include/freeipmi/cmds/, libfreeipmi/include/freeipmi/templates/, libfreeipmi/src/cmds/, bmc-info/: Remove OEM-isms out of library and into bmc-info. 2009-05-20 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Support IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_SENSORS flag. * libfreeipmi/include/freeipmi/sel-parse/, libfreeipmi/src/sel-parse/: IPMI_SEL_PARSE_STRING_FLAGS_INTERPRET_OEM_DATA. * common/src/toolcommon, ipmi-sel/, ipmi-sensors/, ipmimonitoring/src/ipmimonitoring/: Support --interpret-oem-data option. * common/man/manpage-common-interpret-oem-data.man: new file. * ipmi-sel/src/, libfreeipmi/src/sel-parse/: Support Inventec 5441 OEM Sel interpretations 2009-05-19 Albert Chu * common/src/toolcommon/tool-common.c: Attempt OpenIPMI and SunBMC drivers first, since they cannot be discovered via probing, and to avoid accidently using the KCS driver first. 2009-05-18 Albert Chu * bmc-config/src/bmc-config-channel-common.c (_get_key_info, _set_key_info): Fix set volatile vs. set non-volatile bug. 2009-05-18 Albert Chu * Fix API change resulting bugs. 2009-05-15 Albert Chu * Remove use of 'alloca', check return unlink, close, munmap as needed or leave comments as to why return code not checked. 2009-05-15 Albert Chu * Various signed/unsigned cleanup. Ensure right signs used consistently. * libfreeipmi/src/libcommon/ipmi-crypt.c, libfreeipmi/src/driver/ipmi-kcs-driver.c, libfreeipmi/src/driver/ipmi-ssif-driver.c: Handle integer overflow conditions. * Various code cleanup. * tagged post_int_overflow 2009-05-14 Albert Chu * libfreeipmi/src/fiid/: Use unsigned ints for indexing. * tagged pre_int_overflow * libfreeipmi/src/fiid/fiid.c: Handle int/unsigned int overflow conditions. Fix corner case, allow fields to be up to 256 chars, not up to 255 chars. Fix signed/unsigned bugs. * libfreeipmi/src/interface/ipmi-rmpplus-interface.c (assemble_ipmi_rmcpplus_pkt), libfreeipmi/src/interface/ipmi-kcs-interface.c (assemble_ipmi_kcs_pkt), libfreeipmi/src/interface/ipmi-lan-interface.c (ipmi_lan_sendto, assemble_ipmi_lan_pkt): Handle int/unsigned int overflow conditions. * Various code cleanup. 2009-05-12 Albert Chu * doc/: Update faq. 2009-05-11 Albert Chu * Code cleanup. 2009-05-08 Albert Chu * bmc-device/, bmc-info/: Continue to cleanup output format. * bmc-device/: Fix --get-mca-auxiliary-log-status bug. * ipmi-sensors/, ipmi-sel/, ipmi-pef-config/: Make --info/--sdr-info commands have consistent output format. * ipmi-sensors/, ipmi-sel/: Add allocation info output to --info/--sdr-info output. * bmc-info/: Don't output "GUID : " when specifying --get-device-guid. 2009-05-07 Albert Chu * ipmi-chassis/src/: Output text more consistently to IPMI spec. Output format more cleanly. Output all frields from --get-chassis-status. * libfreeipmi/src/cmds/ipmi-device-global-cmds.c: Fix template field names "info" -> "information". * bmc-info/: Output text more consistently to IPMI spec. Output all field information. Output GUID by default. Change --guid to --get-device-guid. Support --get-device-id and --get-channel-info. Add extra output info to channel output. * Additional code cleanup. 2009-05-06 Albert Chu * libfreeipmi/include/freeipm/: Add various header comments. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c: Make functions return > 0 value instead of ENOSPC if buffer too small. * libfreeipmi/include/freeipmi/util/ipmi-channel-util.h, libfreeipmi/include/freeipmi/util/ipmi-channel-util.c: New files. * libfreeipmi/include/freeipmi/api/ipmi-messaging-support-cmds-api.h, libfreeipmi/src/api/ipmi-messaging-support-cmds-api.c (ipmi_get_channel_number): Moved into util. 2009-05-05 Albert Chu * bmc-device/bmc-device.8.pre.in: Add more examples and fix typos. * bmc-watchdog/, ipmi-chassis/, libfreeipmi/include/freeipmi/cmds/: Check interval ranges on inputs. * common/src/toolcommon/, ipmimonitoring/src/libipmimonitoring/: Check for valid record_id inputs. * ipmimonitoring/src/libipmimonitoring/: Check for valid sensor group inputs. * ipmi-fru/: Check for valid range of device id input. * bmc-device/, ipmi-chassis/: Verify sane inputs on 'set' options that have multiple configurable settings. * Various code cleanup. 2009-05-04 Albert Chu * ipmi-chassis/: Code cleanup for consistency to other tools. * ipmimonitoring/src/ipmimonitoring/: Fix --legacy-output. 2009-05-04 Albert Chu * Various code cleanup. * tagged post_void_lib_cleanup 2009-05-03 Albert Chu * Various code cleanup. * tagged pre_void_lib_cleanup * Cleanup libfreeipmi, use void * instead of uint8_t * or char * when appropriate. * Various code cleanup. 2009-05-03 Albert Chu * ipmi-raw/, ipmi-oem/: Fix glibc portability bugs. * ipmi-oem/: Fix debug output corner case. 2009-05-02 Albert Chu * Fix coverity discovered errors. 2009-05-01 Albert Chu * Continued lib cleanup. * ipmipower/src/ipmipower_util.h, ipmipower/src/ipmipower_util.c: Removed files. * ipmiconsole/src/, ipmipower/src/: Various cleanup. * common/src/configtool/, bmc-config/, ipmi-pef-config/: Rename config_section_update_keyvalue_output_int to config_section_update_keyvalue_output_unsigned_int. * tagged post_int_cleanup 2009-04-30 Albert Chu * Cleanup APIs. Return 'int' instead of 'int32_t'. Make "uint32_t" an "unsigned int" when buffers are passed to API functions. * libfreeipmi/: Rework ipmi_rmcpplus_calculate_payload_type() with in/out parameter. * ipmiconsole/src/libipmiconsole/: Update for API change. * bmc-config/, ipmi-pef-config/, ipmi-chassis-config/, common/src/configtool/config-tool-pef-conf-section.c: Fix read only/write only completion code check usage. * common/src/pingtool/, ipmiping/, rmcpping/: API cleanup. * Various other code cleanup. 2009-04-29 Albert Chu * Cleanup APIs. Return 'int' instead of 'int8_t' when size of integer is clearly irrelevant. * Fix function name inconsistencies. 2009-04-28 Albert Chu * tagged pre_int_cleanup * Cleanup APIs. Return 'int' instead of 'int8_t' when size of integer is clearly irrelevant. 2009-04-28 Albert Chu * libfreeipmi/: ipmi_get_channel_number now takes a parameter for the returned channel number. * ipmi-oem/, bmc-device/, bmc-config/, pef-config/: Adjust for API changes. * Various code cleanup. 2009-04-27 Albert Chu * libfreeipmi/include/freeipmi/: Code cleanup. 2009-04-23 Albert Chu * ipmipower/: Support identify-on, identify-off, identify-status in interactive mode of ipmipower. * freeipmi.spec.in: Update for fru-parse. 2009-04-22 Albert Chu * ipmi-oem/ipmi-oem.8.pre.in: Update inventec text. * ipmi-chassis/src/ipmi-chassis (get_chassis_status): Fix output corner cases. * ipmi-chassis/: Rename --get-status to --get-chassis-status and --get-capabilities to --get-chassis-capabilities. 2009-04-21 Albert Chu * libfreeipmi/include/freeipmi/spec/ipmi-entity-ids-spec.h, libfreeipmi/src/spec/ipmi-entity-ids-spec.c: New files. * ipmi-sensors/: Output Entity IDs under verbose instead of very verbose mode. Output Entity ID type if available. 2009-04-21 Albert Chu * ipmimonitoring/src/ipmimonitoring/: Have default output same sensors as in ipmi-sensors, including those that can't be interpreted. Support --ignore-non-interpretable-sensors. * ipmimonitoring/src/libipmimonitoring/: Rename IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_UNREADABLE_SENSORS to IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS.. 2009-04-20 Albert Chu * ipmi-fru/src/ipmi-fru.c: Fix multirecord output. 2009-04-17 Albert Chu From branch fru_lib_branch. * libfreeipmi/: Support new ipmi_dump_hex() debug function. * libfreeipmi/: Include new fru-parse subsection to libfreeipmi library. * libfreeipmi/src/cmds/: Check for valid FRU device id input. * ipmi-fru/src/ipmi-fru-output.h, ipmi-fru/src/ipmi-fru-output.c: New files. * ipmi-fru/src/ipmi-fru-util.h, ipmi-fru/src/ipmi-fru-util.c, ipmi-fru/src/ipmi-fru-info-area.h, ipmi-fru/src/ipmi-fru-info-area.c, ipmi-fru/src/ipmi-fru-multirecord-area.h, ipmi-fru/src/ipmi-fru-multirecord-area.c: Removed files. * ipmi-fru/: Use new fru-parse library. Check for valid device id input. * Update documentation and manpages appropriately. * Various code cleanup. Fix various compiler warnings. 2009-04-14 Albert Chu * bmc-config/src/bmc-config-user-sections.c (password20_checkout): Fix diff check. * bmc-config/: Collapse "Password20" into "Password" field so Password field supports both IPMI 1.5 and IPMI 2.0. 2009-04-09 Albert Chu * Minor code cleanup. 2009-04-09 Albert Chu * bmc-info/src/: Output Device ID, manufacturer ID, and product ID as integer. 2009-04-08 Albert Chu * ipmi-fru/src/ipmi-fru-info-area.c (ipmi_fru_output_chassis_info_area): Output unknown chassis area and continue to parse, instead of bailing out. 2009-04-08 Albert Chu * common/src/configtool/, bmc-config/: Support ability to report Not Supported on commit. 2009-04-08 Albert Chu * common/man/manpage-common-workaround-sol-only-text.man common/man/manpage-common-workaround-text.man common/src/toolcommon/tool-cmdline-common.c common/src/toolcommon/tool-cmdline-common.h common/src/toolcommon/tool-common.c ipmiconsole/src/ipmiconsole/ipmiconsole.c ipmiconsole/src/libipmiconsole/ipmiconsole.h ipmiconsole/src/libipmiconsole/ipmiconsole_defs.h ipmiconsole/src/libipmiconsole/ipmiconsole_packet.c ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.h ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_defs.h ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_ipmi_communication.c libfreeipmi/include/freeipmi/api/ipmi-api.h libfreeipmi/src/api/ipmi-api.c libfreeipmi/src/api/ipmi-lan-session-common.c: Support Inventec open session privilege workaround. Document that SOL Payload Size workaround also needed. Return Password Invalid error when "invalid integrity check value" returned from RAKP4. 2009-04-07 Albert Chu * libfreeipmi/src/debug/ipmi-debug.c (ipmi_obj_dump): Special case always dump payload data and user name in byte array format. 2009-04-07 Albert Chu * ipmi-oem/src/ipmi-oem-argp.c, ipmi-raw/src/ipmi-raw.c: Fix glibc 2.8 portability compile issue. 2009-04-03 Albert Chu * ipmi-oem/ipmi-oem.8.pre.in: Update text. 2009-04-02 Albert Chu * common/src/toolsensor/, ipmi-sensors/, ipmimonitoring/: Shorten width of output by shortening headers. * Fix some --legacy-output issues. 2009-03-31 Albert Chu * libfreeipmi/src/debug/ipmi-debug.c: Always output "raw_data" fields as byte arrays. 2009-03-30 Albert Chu * Remove "experimental" note about SUNBMC driver. 2009-03-27 Albert Chu * ipmi-oem/: Code cleanup. 2009-03-26 Albert Chu * libfreeipmi/src/debug/: Fix output bug. * bmc-info/: Output firmware revision with two chars as needed. * libfreeipmi/: Cleanup sel-parse library. Add parsing via record bufs functions. 2009-03-23 Albert Chu * Rename pef-config to ipmi-pef-config. * freeipmi.spec.in: Fix build issues. 2009-03-21 Albert Chu * ipmi-oem/: Support inventenc get-mad-address and set-mac-address. 2009-03-19 Albert Chu * Support verbose_count config file option. * common/src/toolcommon/tool-config-file-common.c: Fix potential config file bug by clearing stack data. 2009-03-19 Albert Chu * ipmi-oem/: Support inventec get-nic-status and set-nic-status OEM commands. 2009-03-19 Albert Chu * libfreeipmi/src/debug/ipmi-debug.c (ipmi_obj_dump): Output w/ %u instead of %d. * libfreeipmi/src/api/ipmi-kcs-driver-api.c (ipmi_kcs_cmd_raw_api): Fix debug dump bug. 2009-03-18 Albert Chu * freeipmi/templates/ipmi-pef-and-alerting-cmds-templates.h, freeipmi/templates/ipmi-rmcpplus-support-and-payload-cmds-templates.h, freeipmi/templates/ipmi-sdr-repository-cmds-templates.h, freeipmi/templates/ipmi-sel-cmds-templates.h, freeipmi/templates/ipmi-sensor-cmds-templates.h, freeipmi/templates/ipmi-serial-modem-cmds-templates.h, freeipmi/templates/ipmi-sol-cmds-templates.h, freeipmi/templates/rmcp-cmds-templates.h, freeipmi/templates/ipmi-ipmb-interface-templates.h, freeipmi/templates/ipmi-kcs-interface-templates.h, freeipmi/templates/ipmi-lan-interface-templates.h, freeipmi/templates/ipmi-rmcpplus-interface-templates.h, freeipmi/templates/rmcp-interface-templates.h, freeipmi/templates/ipmi-cipher-suite-record-format-templates.h, freeipmi/templates/ipmi-fru-information-record-format-templates.h, freeipmi/templates/ipmi-sdr-record-format-templates.h, freeipmi/templates/ipmi-sel-record-format-templates.h: New files. * Various code cleanup. 2009-03-17 Albert Chu * common/man/manpage-common-sdr-options.man: Fix typo. * libfreeipmi/include/freeipmi/templates/ipmi-bmc-watchdog-timer-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-chassis-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-device-global-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-event-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-fru-inventory-device-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-lan-cmds-templates.h, libfreeipmi/include/freeipmi/templates/ipmi-messaging-support-cmds-templates.h: New files. 2009-03-17 Albert Chu * common/src/toolcommon/, etc/, man/, ipmi-sel/, ipmi-sensors/, ipmimonitoring/: Add forgotton config file options. * common/src/toolsensor/, ipmi-sensors/, ipmimonitoring/, common/src/toolcommon/: Rename --sensor to --record-ids. * Various code cleanup. 2009-03-16 Albert Chu * libfreeipmi/src/spec/ipmi-sensor-units-spec.c: Fix some sensor units abbreviations. * common/man/manpage-common-sensor-common.man, common/man/manpage-common-non-abbreviated-units.man, common/man/manpage-common-comma-separated-output.man, common/man/manpage-common-legacy-output.man: New files. * Cleanup up manpages. * ipmi-sel/, ipmi-sensors/, ipmimonitoring/: Support --comma-separated-output. * common/src/configtool/, bmc-config/, ipmi-chassis-config/, ipmi-sensors-config/, pef-config/: Support ability to report Read Only error on commit. * bmc-config/bmc-config.8.pre.in: Add Dell issue. 2009-03-13 Albert Chu * Change __PRETTY_FUNCTION__ -> __FUNCTION__ for portability. * ipmi-sensors/, ipmimonitoring/: Collapse some code using common sensor code in common/src/toolcommon. * ipmi-sel/, libfreeipmi/src/sel-parse/: Fix output corner case where "N/A ; text" could show up. * ipmi-sel/: Apply column alignment code to ipmi-sel for cleaner output. * ipmi-sel/: Support -vvv option. * common/src/toolsensor/, ipmimonitoring/, ipmi-sel/, ipmi-sensors/: Support --non-abbreviated-units option. 2009-03-12 Albert Chu * ipmi-sensors/, ipmimonitoring/: Collapse some code using common sensor code in common/src/toolcommon. * Reorganization common/src/ with new convenience libs stored int toolsdr/ and toolsensor/. * Various code cleanup. 2009-03-11 Albert Chu * ipmi-sensors/, ipmimonitoring/src/ipmimonitoring/: Align columns more intelligently based on max expected field sizes. * ipmi-sensors/, ipmimonitoring/: Default to abbreviated units. * common/src/toolcommon/tool-sensor-common.h, common/src/toolcommon/tool-sensor-common.c: New files. * ipmi-sensors/, ipmimonitoring/: Collapse some code using common sensor code. * ipmi-sensors/src/ipmi-sensors-argp.c (_ipmi_sensors_args_validate): Check for "oem_reserved" sensor group. 2009-03-10 Albert Chu * config/ac_dont_check_for_root.m4: New file. * configure.ac, common/src/tool-common.c (ipmi_is_root): Support option to not check for root in FreeIPMI tools. 2009-03-09 Jan Forch * libfreeipmi/src/api/ipmi-api.c (_setup_hostname), common/src/toolcommon/tool-sdr-cache-common.c (_get_home_directory): Fix Solaris porting bugs. 2009-03-09 Albert Chu * libfreeipmi/src/util/ipmi-sensor-units-util.c: Support percentage sign. 2009-03-07 Albert Chu * ipmi-sensors-config/, ipmi-sensors/: Support rates and modifiers for units. * libfreeipmi/src/sel-parse/: Support rates and modifiers for units. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-units-spec.h: Fix field check macros. * ipmi-sel/: Support output corner case. Widen column width for event output. 2009-03-06 Albert Chu * ipmi-sel/, ipmi-sensors/, ipmimontoring/: Make sensor group size 24 columns. * ipmi-sel/: Fix formatting bug due to non-memsetted buffer. * libfreeipmi/src/sdr-parse/: Support sensor_units_percentage in sensor_units parsing. * libfreeipmi/include/freeipmi/util/ipmi-sensor-units-util.h, libfreeipmi/src/util/ipmi-sensor-units-util.c: New files. 2009-03-06 Albert Chu * common/src/toolcommon/tool-fiid-util.h, common/src/toolcommon/tool-fiid-util.c: Removed files. * Adjust tools to use new fiid functions/macros appropriately. * libfreeipmi/include/freeipmi/fiid/fiid.h, libfreeipmi/src/fiid/fiid.c (FIID_TEMPLATE_FIELD_LOOKUP, FIID_TEMPLATE_COMPARE, FIID_OBJ_TEMPLATE_COMPARE, FIID_OBJ_PACKET_VALID, FIID_OBJ_FIELD_LOOKUP): New functions. * Use new macros as needed. * Remove pointless use of fiid_obj_field_len in certain functions. * Make parameters const char * instead of char * when appropriate for API functions. * ipmi-sel/, ipmi-sensors/, ipmimontoring/: Collapse sensor group size from 24 columns to 18. 2009-03-05 Albert Chu * common/src/toolcommon/tool-fiid-util.h: Remove some macros. * common/src/toolcommon/tool-fiid-util.c: New file. * libfreeipmi/include/freeipmi/fiid/fiid.h, libfreeipmi/src/fiid/fiid.c (FIID_OBJ_GET): New function. * Adjust tools to use new fiid functions/macros appropriately. 2009-03-04 Albert Chu * Various code consistency style cleanup. * common/src/toolcommon/tool-common.c (ipmi_open): Check for IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED for nice output. 2009-03-03 Albert Chu * Fix spacing, tabbing, and indentation throughout code for consistency. Add copyright to appropriate files. Remove unnecessary extern "C" declarations. Variety of code cleanup. 2009-03-01 Albert Chu * common/src/toolcommon/tool-fiid-util.h: Remove some macros. * Adjust tools to use fiid library directly. 2009-02-26 Albert Chu * common/src/toolcommon/tool-fiid-util.h: Remove some macros. * Adjust tools to use fiid library directly. 2009-02-24 Albert Chu * ipmi-sensors-config/src/ipmi-sensors-config-sensor-event-enable-common.c (_set_sensor_event_enable): Fix bit setting bug. 2009-02-24 Albert Chu * common/src/toolcommon/tool-fiid-util.h: Remove some macros. * Adjust tools to use fiid library directly. 2009-02-24 Albert Chu * ipmi-sel/ipmi-sel.8.pre.in: Note 1-Jan-1970 information. 2009-02-23 Albert Chu * ipmiconsole/src/libipmiconsole/: Add extra debug messages. Add extra header file documentation. 2009-02-23 Albert Chu * ipmi-chassis-config/src/ipmi-chassis-config-map.c: Fix typo "FLOOPY" to "FLOPPY". 2009-02-23 Albert Chu Merge changes from libfreeipmi_cleanup_branch. * libfreeipmi/: Massive code cleanup; * libfreeipmi/src/drivers/: Add 'errormsg' functions. * libfreeipmi/src/api/ipmi-ctx.h, libfreeipmi/src/api/ipmi-err-wrappers-api.h, libfreeipmi/src/api/ipmi-err-wrappers-api.c, libfreeipmi/src/api/ipmi-fiid-wrappers-api.h, libfreeipmi/src/api/ipmi-fiid-wrappers-api.c: Removed files. * libfreeipmi/src/api/ipmi-api-trace.h, libfreeipmi/src/api/ipmi-api-util.c, libfreeipmi/src/api/ipmi-api-util.c, libfreeipmi/src/locate/ipmi-locate-trace.h, libfreeipmi/src/locate/ipmi-locate-util.c, libfreeipmi/src/locate/ipmi-locate-util.c, libfreeipmi/src/sdr-parse/ipmi-sdr-parse-trace.h, libfreeipmi/src/sdr-parse/ipmi-sdr-parse-util.h, libfreeipmi/src/sdr-parse/ipmi-sdr-parse-util.c, libfreeipmi/src/sel-parse/ipmi-sel-parse-trace.h, libfreeipmi/src/sel-parse/ipmi-sel-parse-util.h, libfreeipmi/src/sel-parse/ipmi-sel-parse-util.c, libfreeipmi/src/sensor-read/ipmi-sensor-read-trace.h, libfreeipmi/src/sensor-read/ipmi-sensor-read-util.h, libfreeipmi/src/sensor-read/ipmi-sensor-read-util.c, libfreeipmi/src/api/ipmi-api-defs-trace.h, libfreeipmi/src/driver/ipmi-driver-trace.h, libfreeipmi/src/libcommon/ipmi-fill-util.h, libfreeipmi/src/libcommon/ipmi-fiid-util.h, libfreeipmi/src/libcommon/ipmi-fiid-util.c: New files. * libfreeipmi/src/libcommon/ipmi-err-wrappers.h: Remove all unnecessary macros. * libfreeipmi/src/libcommon/ipmi-trace.h: Renamed from libfreeipmi/src/libcommon/ipmi-err-wrappers.h. * libfreeipmi/src/api/: Remove use of IPMI_ERR_LIBRARY_ERROR, replace with IPMI_ERR_INTERNAL_ERROR. * Rename all "IPMI_*_CTX_ERR" error codes to "IPMI_*_ERR" for consistency throughout libs. * libfreeipmi/src/locate/: Rework to use context style API. * common/src/toolcommon/, bmc-watchdog, ipmi-locate/: Adjust for new locate API. * common/src/toolcommon/tool-fiid-wrapers.h: Renamed to tool-fiid-util.h for consistency. Rename all macros. * Update all tools appropriately for cleanup changes. 2009-02-05 Albert Chu * libfreeipmi/src/api/ipmi-err-wrappers-api.c: New file. * libfreeipmi/src/api/ipmi-fiid-wrappers-api.c: New file. * Continue code cleanup. 2009-02-04 Albert Chu * Various code cleanup. 2009-02-03 Albert Chu * Various code cleanup. 2009-02-03 Albert Chu From branch sdr_parse_branch. * libfreeipmi/: Include new sdr-parse subsection to libfreeipmi library. * ipmi-sensors/, ipmi-fru/, ipmi-sensors-config/: Use new sdr-parse library. * ipmimonitoring/src/libipmimonitoring/: Use new sdr-parse library. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_fiid_wrapppers.h, ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_fiid_wrapppers.c: Remove files. * libfreeipmi/src/sel-parse/: Use new sdr-parse library. * libfreeipmi/src/sensor-read/: Use new sdr-parse library. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c: Removed unused functions. * Update documentation and manpages appropriately. * Various code cleanup. 2009-02-02 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Code cleanup. 2009-01-30 Albert Chu * common/src/toolcommon/tool-sdr-common.c: Check return value from fiid_obj_get. * ipmimonitoring/src/libipmimonitoring/: Code cleanup. 2009-01-30 Albert Chu From branch sensors_read_branch. * libfreeipmi/: Include new sensor-read subsection to libfreeipmi library. * ipmi-sensors/src/ipmi-sensors-reading.h, ipmi-sensors/src/ipmi-sensors-reading.c: Removed files. * ipmi-sensors/: Use new sensor-read library. * ipmimonitoring/src/libipmimonitoring/: Use new sensor-read library. * Update documentation and manpages appropriately. 2009-01-28 Albert Chu * ipmi-fru/, ipmi-sensors/, libfreeipmi/src/sel-parse/, bmc-info/: Output manufacturer name as well as ID in output. * ipmi-fru/: Output with 'h' suffix instead of '0x' prefix for consistency to other tools. 2009-01-27 Albert Chu * libfreeipmi/src/spec/ipmi-iana-enterprise-numbers-spec.c, libfreeipmi/include/freeipmi/spec/ipmi-iana-enterprise-numbers-spec.h: New files. * libfreeipmi/src/spec/enterprise-numbers.pl: Script to generate ipmi-iana-enterprise-numbers-spec.c. * libfreeipmi/src/spec/enterprise-numbers.txt: Currently used database used to generate enterprise numbers. * bmc-info/src/bmc-info.c (display_get_device_id): Output manufacturer name as well as ID. 2009-01-26 Albert Chu * Suppot --config-file option in all tools. 2009-01-26 Albert Chu * ipmi-sel/, ipmimonitoring/, ipmi-sensors/: Fix new output corner cases. Support --legacy-output in config file. 2009-01-23 Albert Chu * ipmi-sensors/, ipmimonitoring/: Revert no-event output back to "OK". * Support "errormsg" functions libfreeipmi API and fiid. * ipmimonitoring/src/ipmimonitoring/: Output groups/check groups based on ipmi_sensor_types array. 2009-01-22 Albert Chu * ipmi-sel/: Make output formatted for consistency to ipmi-sensors and ipmimonitoring. * ipmi-sensors/: Also output analog data format name in very verbose output. * Various code cleanup. 2009-01-21 Albert Chu * ipmi-sensors/, ipmimonitoring/: Output units in non-abbreviated form by default. Update manpages for output updates. * contrib/ganglia/, contrib/nagios/: Make scripts use --legacy-output to continue working with ipmi-sensors and ipmimonitoring. * ipmi-sensors/, ipmimonitoring/: Use %u instead of %d where appropriate. * ipmi-sensors/: Output name of linearization on very verbose output. 2009-01-21 Albert Chu * ipmimonitoring/src/libipmimonitoring/ (ipmi_monitoring_sensor_readings_by_record_id_callback, ipmi_monitoring_sensor_readings_by_sensor_group_callback): Remove functions. Absorb callback routines into ipmi_monitoring_sensor_readings_by_record_id and ipmi_monitoring_sensor_readings_by_sensor_group. * ipmimonitoring/src/libipmimonitoring/: Rename most *iterator* functions to *read* functions. Remove most *callback* functions. Absorb *callback* functionality into *read* functions. * ipmimonitoring/src/libipmimonitoring/: Remove IPMI_MONITORING_ERR_NOT_IN_CALLBACK error code. * ipmimonitoring/src/libipmimonitoring/: Remove IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER16_BITMASK sensor reading type. * ipmimonitoring/src/libipmimonitoring/: Support ipmi_monitoring_read_sensor_bitmask(). Every sensor technically has a bitmask that can be returned. Do not differentiate between "primary" sensor reading. * ipmimonitoring/src/ipmimonitoring/: Update appropriately for changes. * ipmimonitoring/src/ipmimonitoring/: Update output for consistency to ipmi-sensors. Support --legacy-output option. 2009-01-21 Albert Chu * man/freeipmi.7.pre.in: Fix some text. 2009-01-16 Albert Chu * configure.ac: Fix CFLAGS environment variable overwriting bug. * ipmimonitoring/src/libipmimonitoring/: Support threshold bitmask type. 2009-01-15 Albert Chu * ipmimonitoring/src/ipmimonitoring/: Begin support of --legacy-output option. 2009-01-15 Albert Chu * Support --legacy-output option for ipmi-sensors. * ipmi-sensors/src/ipmi-sensors-very-verbose-display.c: Consolidate "verbose output" into this file. * ipmi-sensors/src/ipmi-sensors-verbose-display.h, ipmi-sensors/src/ipmi-sensors-verbose-display.c: Remove files. * ipmi-sensors/src/ipmi-sensors-very-verbose-display.h, ipmi-sensors/src/ipmi-sensors-very-verbose-display.c: Renamed ipmi-sensors/src/ipmi-sensors-detailed-output.h and ipmi-sensors/src/ipmi-sensors-detailed-output.c respectively. * ipmi-sensors/src/ipmi-sensors-simple-display.h, ipmi-sensors/src/ipmi-sensors-simple-display.c: Renamed ipmi-sensors/src/ipmi-sensors-simple-output.h and ipmi-sensors/src/ipmi-sensors-simple-output.c respectively. * ipmi-sensors/src/ipmi-sensors-output-common.h, ipmi-sensors/src/ipmi-sensors-output-common.c: Renamed ipmi-sensors/src/ipmi-sensors-output-common.h and ipmi-sensors/src/ipmi-sensors-output-common.c respectively. * ipmi-sensors/: Change various output for readability and parsability. * ipmi-sensors/src/: Various code cleanup. 2009-01-15 Albert Chu * ipmimonitoring/src/ipmimonitoring/: Ensure consistency in units output to other tools. 2009-01-14 Albert Chu * ipmi-sensors/src/: Don't output fields not related to non-threshold sensors. 2009-01-14 Albert Chu * ipmimonitoring/src/ipmimonitoring: For consistency to library and other software, fix sensor group name outputs. 2009-01-14 Albert Chu * Output and parse "Record ID" instead of "Record_ID" consistently. * ipmi-sel/: For consistency to ipmimonitoring, output Sensor Name before Sensor Group. * ipmimonitoring/src/ipmimonitoring/: Fix header typo. 2009-01-14 Dave Love * bmc-watchdog/freeipmi-bmc-watchdog.init: Make SuSE-compatible, like the other init scripts. 2009-01-13 Albert Chu * libfreeipmi/src/sel-parse/ipmi-sel-parse.c (ipmi_sel_parse_read_channel_number): Check event format version appropriately. * ipmi-sel/src/: Cleanup. * Globally add "table of contents" into manpages to illustrate amount of text in the manpage so users (will hopefully) know what is available in the manpage and how to look for howto information in freeipmi(7). 2009-01-12 Albert Chu * ipmi-sel/: Support --system-event-only and --oem-event-only options. * Fix copyright dates globally. 2009-01-09 Albert Chu * ipmi-sel/: Support very verbose output. 2009-01-08 Albert Chu * libfreeipmi/src/sel-parse/: Various bug fixes. Offer more output options. * ipmi-sel/: Support --verbose output. Alter default output format. 2009-01-07 Albert Chu * libfreeipmi/src/sel-parse/: Support LEGACY string output option. * ipmi-sel/: Support --legacy-output option. 2009-01-07 Albert Chu * libfreeipmi/include/freeipmi/record-format/ipmi-sel-record-format.h: Cleanup macro names and add new macros as needed. * common/src/tool-sensor-common.h, common/src/tool-sensor-common.c (sensor_classify): Removed function. * libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h, libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c (ipmi_event_reading_type_code_class): New function. * ipmi-sensors/, ipmi-sensors-config/, ipmi-sel/: Update as necessary for change from sensor_classify to ipmi_event_reading_type_code_class. * common/src/tool-sensor-common.h, common/src/tool-sensor-common.c (sensor_group): Removed function. * libfreeipmi/include/freeipmi/util/ipmi-sensor-util.h, libfreeipmi/src/util/ipmi-sensor-util.c (ipmi_get_sensor_type_string): New function. * ipmi-sensors/, ipmi-sensors-config/, ipmi-sel/: Update as necessary for change from sensor_classify to ipmi_get_sensor_type_string. * common/src/tool-sensor-common.h, common/src/tool-sensor-common.c: Removed files. * ipmi-sensors/, ipmi-sensors-config/, ipmi-sel/: Handle corner case if ipmi_get_sensor_type_string returns NULL (i.e. sensor_type unrecognized). * common/src/tool-fiid-wrappers.h (_FIID_OBJ_GET_WITH_RETURN_VALUE): Rename to _FIID_OBJ_GET_WITH_RV and make interface consistent to others. * ipmi-sensors/, ipmi-sensors-config/, bmc-info/, ipmi-chassis/, ipmi-chassis-config/: Adjust for macro name change. * ipmi-sel/: Remove optional hex dump to file. * libfreeipmi/: Include new sel-parse subsection to libfreeipmi library. * ipmi-sel/src/ipmi-sel-entry.h, ipmi-sel-entry.c: Removed files. * ipmi-sel/: Use new sel-parse library for SEL parsing/output. * Update documentation and manpages appropriately. 2009-01-05 Albert Chu * libfreeipmi/: Add new IPMI_ERR_NOT_FOUND error code to libfreeipmi api sub library. * libfreeipmi/src/api/ipmi-messaging-support-cmds-api.c (ipmi_get_channel_number): Fix error code corner case bug. 2009-01-05 Albert Chu * bmc-config/src/bmc-config-user-sections.c (_channel_info): Fix Enable_user checkout corner case bug. * Minor documentation cleanup. 2008-12-23 Albert Chu * ipmi-oem/src/ipmi-oem.h, ipmi-oem/src/ipmi-oem-argp.h: Fix memory allocation bug. 2008-12-18 Albert Chu * Global cleanup, specify static functions appropriately. 2008-12-18 Albert Chu * ipmi-sel/src/ipmi-sel-entry.c (_get_sel_system_event_record): Fix possible output error corner case. * ipmi-sel/src/ipmi-sel-argp.c (cmdline_parse): Check that record ID inputs are not illegal record_id values. * ipmi-sensors/src/ipmi-sensors-argp.c, ipmimonitoring/src/ipmimonitoring/ipmimonitoring-argp.c: Check that inputted record IDs are not illegal record ID values. 2008-12-17 Albert Chu * Minor documentation updates. 2008-12-17 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Adjust callback function to return integer for whether libipmimonitoring should continue or not. * ipmimonitoring/src/ipmimonitoring/: Adjust code to use callback functionality to display sensor readings as they are read/analyzed. 2008-12-16 Albert Chu * ipmimonitoring/src/libipmimonitoring/: Support callback function routines in sensor monitoring/reading. * configure.ac: Update lib version appropriately. 2008-12-16 Albert Chu * ipmi-sel/src/ipmi-sel.c (_hex_display_sel_records): Carry over previous fixes into this function. 2008-12-15 Albert Chu * ipmi-fru/src/ipmi-fru.c (_output_fru): Cleanup output. 2008-12-15 Albert Chu * libfreeipmi/src/debug/ipmi-debug-kcs.c: New file. * libfreeipmi/include/freeipmi/debug/ipmi-debug.h, libfreeipmi/src/api/ipmi-api.c, libfreeipmi/src/api/ipmi-kcs-interface-api.c: Support detailed KCS debug output. * libfreeipmi/src/debug/ipmi-debug-lan.c (_ipmi_dump_lan_packet), libfreeipmi/src/debug/ipmi-debug-rmcpplus.c (_dump_rmcpplus_payload_data): Fix dump corner case. 2008-12-12 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c (ipmi_lan_2_0_open_session): Fix Intel 2.0 workarounds. * ipmipower/src/ipmipower_check.c (ipmipower_check_integrity_pad), ipmiconsole/src/libipmiconsole/ipmiconsole_checks.c (ipmiconsole_check_integrity_pad): Fix integrity check corner case for certain cipher suite IDs. * ipmiconsole/ipmiconsole.8.pre.in: Add ipmiconsole troubleshooting notes. * ipmi-chassis/src/ipmi-chassis.h: Change -I (--identify) option to -i so it does not conflict with -I from --cipher-suite-id option. * ipmi-fru/src/ipmi-fru-util.c (ipmi-fru/src/ipmi-fru-util.c): Output failed checksums by default. 2008-12-11 Albert Chu * libfreeipmi/include/freeipmi/record-format/ipmi-sdr-record-format.h: Add record type names. Rename several macros for consistency to IPMI spec. * ipmi-sensors/: Output record type names along with hex codes. * libfreeipmi/, common/src/toolcommon/, ipmi-sensors/, ipmi-sel/, ipmi-sensors-config/, ipmimonitoring/: Update macros as necessary. * ipmi-sensors/: Output hex code along with group name in verbose and very verbose modes. 2008-12-09 Albert Chu * libfreeipmi/src/api/ipmi-lan-session-common.c (ipmi_lan_2_0_open_session): Fix Intel 2.0 workarounds. * bmc-config/src/bmc-config-user-sections.c (enable_user_commit): Fix workaround for enabling a user. * libfreeipmi/src/api/ipmi-lan-session-common.c (_ipmi_lan_2_0_cmd_wrapper_verify_packet): Fix ipmi 2.0 error handling corner case for some motherboards. * libfreeipmi/src/api/ipmi-lan-session-common.c (ipmi_lan_2_0_open_session): Fix ipmi Intel 2.0 workaround. 2008-12-09 Albert Chu * ipmi-oem/: Add supermicro reset-intrusion oem command. Add --list option support. 2008-12-09 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, ipmiconsole/src/libipmiconsole/ipmiconsole_defs.h, ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_process_protocol_state_activate_payload): Add workaround for state machine cycle possibility. 2008-12-08 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_packet.c (ipmiconsole_ipmi_packet_assemble): Add workaround for Intel IPMI 2.0 situation. * common/man/manpage-common-workaround-sol-only-text.man, common/man/manpage-common-workaround-text.man: Change text for workaround changes. 2008-12-05 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_packet.c (ipmiconsole_ipmi_packet_assemble): Fix Intel 2.0 workaround. 2008-12-04 Albert Chu * common/man/manpage-common-workaround-sol-only-text.man, common/man/manpage-common-workaround-text.man: Cleanup text. 2008-12-04 Diego "Flameeyes" Petten * ipmi-oem/, ipmi-raw/: Fix portability for glibc 2.8. Remove use of ARG_MAX and replace with sysconf call to _SC_ARG_MAX. 2008-12-04 Albert Chu * bmc-config/: Add documentation on . 2008-12-04 Dave Love * freeipmi.spec.in: Require /sbin/chkconfig, not chkconfig, to work on SuSE. 2008-12-03 Albert Chu * bmc-config/src/: Document various issues w/ comments. * common/src/configtool/: Support CONFIG_USERNAME_NOT_SET_YET config flag. * bmc-config/src/: Support CONFIG_USERNAME_NOT_SET_YET in various fields due to checkout issues with Sun X4140. 2008-12-01 Albert Chu * ipmimonitoring/ipmi_monitoring_sensors.conf.5.pre.in: Fix typos. 2008-11-27 Albert Chu * ipmi-sel/src/ipmi-sel-entry.c (ipmi_sel_get_entry): Fix output corner case. * ipmimonitoring/: Add system ACPI power state and button switch interpretations. Add forgotten bitmasks. Fix config file option names. * ipmimonitoring/: Add new interpretations, button switch state, entity presence device install, processor state. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c/: Fix event message data2 output corner cases. 2008-11-26 Albert Chu * ipmimonitoring/: Additional documentation updates. * ipmi-sensors/src/ipmi-sensors-reading.c (sensor_reading): Output 'NA' is sensor scanning is disabled. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_get_sensor_reading): Return 'unreadable sensor' for sensors where sensor scanning is disabled. * ipmimonitoring/: Add new interpretations, power supply state, drive slot state, drive slot predictive failure. * ipmiconsole/src/ipmiconsole.c (main): Fix workaround bug. * common/src/toolcommon/tool-cmdline-common.h, common/src/toolcommon/tool-cmdline-common.c (parse_workaround_flags), common/src/toolcommon/tool-common.c (ipmi_open), ipmiconsole/src/ipmiconsole/ipmiconsole.c (main), ipmipower/src/, libfreeipmi/include/freeipmi/api/ipmi-api.h, libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_outofband_2_0), ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (_grab_ipmimonitoring_options): Remove workaround flags unused in libfreeipmi. Make tool specific workarounds specific to tools. * ipmi-sel/src/: When retrieving SEL entries, always try to obtain a reservation ID. 2008-11-25 Albert Chu * ipmimonitoring/ipmi_monitoring_sensors.conf.5.pre.in, ipmimonitoring/ipmimonitoring_sensors.conf.5.pre.in, ipmimonitoring/ipmimonitoring.conf.5.pre.in, ipmimonitoring/libipmimonitoring.conf.5.pre.in, : New files. * ipmimonitoring/ipmimonitoring.8.pre.in, ipmimonitoring/libipmimonitoring.3.pre.in: Update for new manpage. * configure.ac, freeipmi.spec.in, ipmimonitoring/Makefile.am: Adjust for new manpage. 2008-11-24 Albert Chu * ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_get_thresholds): Fix workaround for motherboards w/o get sensor thresholds command support. * ipmimonitoring/: Add fan transition availability interpretation. * ipmimonitoring/: Documentation additions and cleanup. * libfreeipmi/include/freeipmi/spec/ipmi-sensor-types-spec.h, libfreeipmi/src/spec/ipmi-sensor-types-spec.c, libfreeipmi/include/freeipmi/cmds/ipmi-pef-and-alerting-cmds.h, pef-config/src/pef-config-map.c: Fix typos in sensor types macros and strings. * ipmi-sensors/src: Fix corner cases in groups verification/selection. * configure.ac: Update library revisions appropriately. 2008-11-20 Albert Chu * ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_get_thresholds): Fix non-recoverable thresholds output corner case. * ipmi-sensors/src/ipmi-sensors-simple-display.c (sensors_display_simple_full_record): Output something other than critical thresholds if critical thresholds are not available. 2008-11-20 Albert Chu * common/src/toolcommon/tool-fiid-wrappers.h (_FIID_OBJ_SET): New macro. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_thresholds_raw): New function. * ipmi-sensors/src/ipmi-sensors-display-common.c (_get_sdr_sensor_thresholds): New function. * ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_get_thresholds): Workaround motherboards w/o get sensor thresholds command support. * ipmi-sensors-config/src/ipmi-sensors-config-threshold-section.c (threshold_checkout): Workaround motherboards w/o get sensor thresholds command support. * doc/freeipmi-bugs-and-workarounds.txt: Document new workaround. 2008-11-19 Albert Chu * ipmimonitoring/: Add power unit device install interpretation. * ipmimonitoring/src/ipmimonitoring/ipmi_monitoring_sensor_config.c: Fix invalid config option names for slot device installs sensors. * ipmimonitoring/ipmimonitoring.8.pre.in: Add extra documentation. 2008-11-19 Albert Chu * bmc-info/src/bmc-info.c (display_get_device_id): Optionally display auxiliary information. 2008-11-17 Albert Chu * ipmi-raw/src/ipmi-raw-argp.c, ipmi-raw/ipmi-raw.8.pre.in: Clarify usage. * common/src/toolcommon/tool-cmdline-common.c (cmdline_config_file_parse): Fix corner case parsing bug. 2008-11-10 Albert Chu * ipmi-sensors/src/ipmi-sensors-verbose-display.c (_output_verbose_header), ipmi-sensors/src/ipmi-sensors-very-verbose-display.c (_output_very_verbose_header): Fix semantic issue with verbose output by clearly outputting sensor owner ID vs. slave address/system software ID. 2008-11-07 Albert Chu * bmc-device/bmc-device.8.pre.in: Fix typo. * ipmimonitoring/ipmimonitoring.8.pre.in: Fix typo. 2008-11-07 Albert Chu * Fix compiler warnings. 2008-11-07 Albert Chu * Tagged Release-0_7_0_base. * Branched Release-0_7_0_branch. 2008-10-01 Albert Chu * ipmiconsole/ipmiconsole.8.pre.in: Add special workaround notes. 2008-09-30 Albert Chu * ipmi-fru/src/ipmi-fru-multirecord-area.c: Fix record length check bug. 2008-09-30 Albert Chu * Tagged Release-0_7_0_beta0. 2008-09-30 Albert Chu * Various doc updates. 2008-09-29 Albert Chu * README.build: New file. * Makefile.am, freeipmi.spec.in: Add new file. 2008-09-25 Albert Chu * Document sr1520ml server workarounds. 2008-09-25 Albert Chu * freeipmi.spec.in: Fix freeipmi.conf permissions. * Document Intel x38ml workarounds. * Update workaround text/docs. 2008-09-25 Dmitry Frolov * doc/freeipmi-faq.texi: Add FreeBSD information. 2008-09-24 Albert Chu * ipmiconsole/src/libipmiconsole/: Fix incorrect port usage on non-default port conditions. 2008-09-24 Albert Chu * common/src/toolhostrange/tool-hostrange-common.c (pstdout_setup): Fix potential segfault scenario. * common/src/toolhostrange/tool-hostrange-common.c (pstdout_setup): Fix --eliminate corner case when one host is specified. 2008-09-23 Albert Chu * Fix parallel build bugs due to cycles in Makefile dependencies. * common/src/toolhostrange/: Split off tool hostrange into separate lib from common/src/toolcommon/. * Fix minor bugs. 2008-09-23 Dmitry Frolov * libfreeipmi/src/debug/ipmi-debug.c (ipmi_obj_dump): Fix printf portability. 2008-09-23 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_check_try_new_port): Fix corner case. 2008-09-22 Albert Chu * common/src/configtool/config-tool-commit.c (config_commit_section): Fix return code corner case. 2008-09-19 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sdr_cache.c (_ipmi_monitoring_sdr_cache_filename): Fix filename corner case. 2008-09-19 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensors_config.c (_cb_sensor_state_parse): Fix corner case. 2008-09-17 Albert Chu * Fix distcheck globally. * ipmi-sensors/, ipmimonitoring/: Code cleanup. * configure.ac: update for beta release. 2008-09-16 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-defs.h: Fix potential portability issue. * libfreeipmi/src/fiid/fiid.c: Add template checks for valid key name and key length. Add template checks for valid flags. 2008-09-13 Albert Chu * ipmi-sensors/, ipmimonitoring/: Handle sensor completion code of IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE and IPMI_COMP_CODE_REQUEST_INVALID_DATA_FIELD as special case. 2008-09-10 Albert Chu * ipmi-sensors/, ipmimonitoring/: Handle sensor completion code of IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE as a special case. 2008-09-02 Dmitry Frolov * configure.ac, all Makefile.am: Fix porting for BSD. 2008-08-29 Albert Chu * common/src/toolcommon/tool-config-file-common.c: Fix typo in option name. * etc/freeipmi.conf: Add missing options. 2008-08-28 Albert Chu * libfreeipmi/src/record-format/ipmi-sdr-record-format.c: Fix field names. * ipmi-sensors/, common/src/toolcommon/: Adjust for new field names. * common/src/toolcommon/, ipmi-sensors/: Add additional output in very verbose mode. 2008-08-27 Albert Chu * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_sensor_owner_lun): New function. * ipmi-sensors/: Add channel and lun info to verbose output. * ipmi-sensors/, ipmimonitoring/: Only call bridging if specified channel is IPMB. * libfreeipmi/src/api/ipmi-sensors-cmds-api.c, libfreeipmi/include/freeipmi/ipmi-sensors-cmds-api.h (ipmi_cmd_get_sensor_reading_ipmb): Take lun parameter. * ipmi-sensors/, ipmimonitoring/: Pass SDR lun as well as slave address for ipmb bridging. * ipmimonitoring/: Add fan redundancy interpretation. * ipmimonitoring/: Support alternate sensors config file. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_create_directory): New function. * common/src/toolcommon/tool-sdr-cache-common.c: Code cleanup. * ipmimonitoring/src/ipmimonitoring/: Code cleanup. * libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c, libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables.h (ipmi_get_sensor_type_code_message_short, ipmi_get_generic_event_message_short): New functions. * ipmi-sensors/, ipmimonitoring/: Use short message versions instead of long message versions under non-verbose output. * Tweak documentation. 2008-08-26 Albert Chu * ipmimonitoring/: Support power supply redundancy interpretation. Support voltage assertion interpretation. * libfreeipmi/src/api/ipmi-kcs-interface-api.c: Re-read if get message queue is empty error. * ipmi-sensors/, ipmimonitoring/: Continue on if a message timeout occured. It is not a fatal error. * libfreeipmi/src/debug/ (ipmi_obj_debug_ipmb): Fix output corner case. * Tweak documentation. 2008-08-25 Albert Chu * ipmi-sel/src/: Support debug dumping of SEL Event Records. Handle sensor finding corner case on Supermicro. * ipmi-sensors/src/: Include sensor owner id type in slave address output. 2008-08-25 Albert Chu * tagged ipmi_chassis_boot_flags_valid_remove_pre * ipmi-chassis-config/: Do not allow configuration of boot_flags_valid and its bit clearing. Always set boot_flags_valid to 1 (i.e. "Yes"). * ipmi-chassis-config/src/ipmi-chassis-config-boot-flags-valid-bit-clearing.h, ipmi-chassis-config/src/ipmi-chassis-config-boot-flags-valid-bit-clearing.c: Removed files. * tagged ipmi_chassis_boot_flags_valid_remove_post 2008-08-25 Albert Chu * ipmi-chassis-config/: Remove ipmi chassis boot flags workaround. 2008-08-25 Albert Chu * merge in ipmb_branch * libfreeipmi/include/freeipmi/cmds/ipmi-event-commands.h, libfreeipmi/src/cmds/ipmi-event-cmds.c, libfreeipmi/src/api/ipmi-event-cmds.c, libfreeipmi/include/freeipmi/api/ipmi-event-cmds-api.h: New files. * libfreeipmi/include/freeipmi/util/ipmi-ipmb-util.h, libfreeipmi/src/util/ipmi-ipmb-util.c: New files. * libfreeipmi/include/freeipmi/freeipmi.h: Update for new files. * libfreeipmi/src/api/ipmi-api.c, libfreeipmi/include/freeipmi/api/ipmi-api.h (ipmi_cmd_ipmb): New function. * libfreeipmi/include/freeipmi/util/ipmi-error-util.c, libfreeipmi/include/freeipmi/spec/ipmi-comp-code-spec.h: Support error codes for get message command. * libfreeipmi/src/api/ipmi-kcs-interface-api.h, libfreeipmi/src/api/ipmi-kcs-interface-api.c (ipmi_kcs_cmd_api_ipmb): New function. * libfreeipmi/include/freeipmi/driver/ipmi-openipmi-driver.h, libfreeipmi/src/driver/ipmi-openipmi-driver.c (ipmi_openipmi_cmd_ipmb): New function. * libfreeipmi/src/api/ipmi-openipmi-interface-api.h, libfreeipmi/src/api/ipmi-openipmi-interface-api.c (ipmi_openipmi_cmd_api_ipmb): New function. * libfreeipmi/src/api/ipmi-lan-session-common.h, libfreeipmi/src/api/ipmi-lan-session-common.c (ipmi_lan_cmd_wrapper_ipmb, ipmi_lan_2_0_cmd_wrapper_ipmb): New functions. * libfreeipmi/src/debug/ipmi-debug.c, libfreeipmi/src/debug/ipmi-debug-lan.c, libfreeipmi/src/debug/ipmi-debug-rmcpplus.c, libfreeipmi/include/freeipmi/debug/ipmi-debug.h (ipmi_dump_obj_ipmb, ipmi_dump_lan_packet_ipmb, ipmi_dump_rmcpplus_packet_ipmb): New functions. * libfreeipmi/src/api/ipmi-api.c, libfreeipmi/src/api/ipmi-ctx.h: Support ipmb debugging. * ipmi-sensors/: Support ipmb bridging. Support --bridge-sensors option. Change default privilege to operator. Output "Unknown State" if an unrecognized bit is set. Output busy sensors as "Unknown". * ipmimonitoring/src/libipmimonitoring/: Support IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS flag. * ipmimonitoring/: Output "Unknown State" if an unrecognized bit is set. Handle and recognize busy sensors. Support --bridge-sensors option. Change default privilege to operator. * common/src/toolcommon/tool-config-file-common.h, common/src/toolcommon/tool-config-file-common.c: Support config file configuration of --bridge-sensors. Various code cleanup and minor enhancements. * libfreeipmi/src/api/: Create and support new error message IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE. 2008-08-22 Albert Chu * tagged ipmi_chassi_boot_flags_workaround_pre * ipmi-chassis-config/: Support workaround for boot flags. * tagged ipmi_chassi_boot_flags_workaround_post 2008-08-18 Albert Chu * libfreeipmi/include/freeipmi/ipmi-ipmb-interface.h, libfreeipmi/src/interface/ipmi-ipmb-interface.c: New files. * libfreeipmi/include/freeipmi/freeipmi.h: Update for new .h file. * Update Makefiles as needed for new files. 2008-08-15 Albert Chu * libfreeipmi/: Support various new ipmi cmds from messaging support section. 2008-08-15 Albert Chu * libfreeipmi/: Support get system interface capabilities and get bt interface capabilities commands, templates, and api calls. * bmc-device/: Support --get-ssif-interface-capabilities, --get-kcs-interface-capabilities, --get-bt-interface-capabilities. 2008-08-15 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_get_sensor_reading): If sensor slave address is not BMC, considering sensor unavailable. * libfreeipmi/include/freeipmi/sdr-cache/ipmi-sdr-cache.h, libfreeipmi/src/sdr-cache/ipmi-sdr-cache-read.c (ipmi_sdr_cache_search_sensor_number): Rename to ipmi_sdr_cache_search_sensor. Search for sensor via sensor owner id and sensor number. * ipmi-sel/src/ipmi-sel-entry.c (_find_sdr_record, _get_sel_system_event_record): Find sensor via sensor number and id. * libfreeipmi/include/freeipmi/spec/ipmi-slave-address-spec.h: Rename IPMI_LAN_SLAVE_ADDRESS_BMC to IPMI_SLAVE_ADDRESS_BMC (support IPMI_LAN_SLAVE_ADDRESS_BMC w/ legacy macro). * General code cleanup. 2008-08-14 Albert Chu * ipmi-sensors/src/: If sensor slave address is not BMC, do not read/output sensor reading. 2008-08-14 Albert Chu * libfreeipmi/include/freeipmi/interface/ipmi-lan-interface.h, libfreeipmi/src/interface/ipmi-lan-interface.c (fill_lan_msg_hdr): Take rs_addr argument. * Adjust calls to fill_lan_msg_hdr globally as needed. 2008-08-12 Albert Chu * Tagged sunbmc_pre_experimental * Document that sunbmc driver is experimental. * Tagged sunbmc_post_experimental 2008-08-12 Albert Chu Add Solaris BMC interface. * libfreeipmi/include/freeipmi/driver/ipmi-sunbmc-driver.h: New file. * libfreeipmi/src/driver/ipmi-sunbmc-driver.c: New file. * libfreeipmi/src/api/ipmi-sunbmc-driver-api.h, libfreeipmi/src/api/ipmi-sunbmc-driver-api.c: New files. * libfreeipmi/include/freeipmi/ipmi-api.h, libfreeipmi/src/api/ipmi-ctx.h, libfreeipmi/src/api/ipmi-api.c, libfreeipmi/src/api/ipmi-err-wrappers-api.h: Support IPMI_DEVICE_SUNBMC. * libfreeipmi/include/freeipmi/freeipmi.h: add libfreeipmi/include/freeipmi/driver/ipmi-sunbmc-driver.h. * configure.ac: check for sys/stropts.h, sys/int_types.h, bmc_intf.h. * common/src/toolcommon/tool-cmdline-common.h, common/src/toolcommon/tool-cmdline-common.c, common/src/toolcommon/tool-common.c.: Add Sun BMC driver cmdline support. * README, man/freeipmi.7.pre.in, common/man/manpage-common-driver.man: Update with sunbmc. * ipmimonitoring/, bmc-watchdog/: Support sunbmc driver. * README.sunbmc: New file. * doc/freeipmi-faq.texi: Update w/ SUNBMC driver compilation support. * freeipmi.spec.in: Add README.sunbmc. 2008-08-11 Albert Chu * man/freeipmi.conf.5.pre.in: Fix text. * ipmi-locate/src/ipmi-locate.c: Fix output format. 2008-08-10 Albert Chu * bmc-config/, ipmi-chassis-config/, ipmi-sensors-config/, pef-config/: Support hostrange config file options. * common/src/toolcommon/tool-config-file-common.h, common/src/toolcommon/tool-config-file-common.c: Support tool specific out of band configuration. * Globally update documentation and tools as needed. 2008-08-08 Albert Chu * Documentation cleanup. 2008-08-08 Albert Chu Merge contents from chassis_config_branch. * ipmi-chassis-config/Makefile.am, ipmi-chassis-config/ipmi-chassis-config.8.pre.in, ipmi-chassis-config/src/Makefile.am, ipmi-chassis-config/src/ipmi-chassis-config.h, ipmi-chassis-config/src/ipmi-chassis-config.c, ipmi-chassis-config/src/ipmi-chassis-config-argp.h, ipmi-chassis-config/src/ipmi-chassis-config-argp.c, ipmi-chassis-config/src/ipmi-chassis-config-boot-flags.h, ipmi-chassis-config/src/ipmi-chassis-config-boot-flags.c, ipmi-chassis-config/src/ipmi-chassis-config-boot-flags-valid-bit-clearing.h, ipmi-chassis-config/src/ipmi-chassis-config-boot-flags-valid-bit-clearing.c, ipmi-chassis-config/src/ipmi-chassis-config-front-panel-buttons.h, ipmi-chassis-config/src/ipmi-chassis-config-front-panel-buttons.c, ipmi-chassis-config/src/ipmi-chassis-config-power-conf.h, ipmi-chassis-config/src/ipmi-chassis-config-power-conf.c, ipmi-chassis-config/src/ipmi-chassis-config-validate.h, ipmi-chassis-config/src/ipmi-chassis-config-validate.c, ipmi-chassis-config/src/ipmi-chassis-config-map.h, ipmi-chassis-config/src/ipmi-chassis-config-map.c, ipmi-chassis-config/src/ipmi-chassis-config-sections.h, ipmi-chassis-config/src/ipmi-chassis-config-sections.c: New files. * common/src/configtool/config-tool-common.h, common/src/configtool/config-tool-section.h, common/src/configtool/config-tool-section.c, common/src/configtool/config-tool-commit.c, (config_section_create, config_commit_section): Add sectional pre and post commit callback definitions and functions. * common/src/configtool/config-tool-checkout.c (config_checkout_section): Support multiline descriptions. * bmc-config/src/, pef-config/src/, ipmi-sensors-config/src/: Update for function call changes. * libfreeipmi/include/freeipmi/cmds/ipmi-chassis-cmds.h, libfreeipmi/src/cmds/ipmi-chassis-cmds.c (fill_set_front_panel_enables, tmpl_cmd_set_front_panel_enables_rq, tmpl_cmd_set_front_panel_enables_rs, fill_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing, tmpl_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing_rq, tmpl_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing_rs): Support new templates and functions. * libfreeipmi/include/freeipmi/api/ipmi-chassis-cmds-api.h, libfreeipmi/src/cmds/ipmi-chassis-cmds-api.c (ipmi_cmd_set_front_panel_enables, ipmi_cmd_set_system_boot_options_boot_BMC_boot_flag_valid_bit_clearing ipmi_cmd_get_system_boot_options_BMC_boot_flag_valid_bit_clearing): New functions. * bmc-config/src/: Remove default checkout of "Power_Restore_Policy". * ipmi-chassis/: Hide legacy chassis configuration commands/options. * configure.ac, Makefile.am, freeipmi.spec.in: Update as needed for new files. * bmc-config/bmc-config.8.pre.in, pef-config/pef-config.8.pre.in, ipmi-sensors-config/ipmi-sensors-config.8.pre.in, ipmi-chassis/ipmi-chassis.8.pre.in, README, NEWS, mans/freeipmi.7.pre.in, doc/freeipmi-faq.texi, doc/freeipmi-coding.txt, doc/freeipmi-hostrange.txt: Update appropriately with documentation updates. * libfreeipmi/src/cmds/ipmi-chassis-cmds.c (fill_cmd_set_system_boot_options_boot_flags), libfreeipmi/src/api/ipmi-chassis-cmds-api.c (ipmi_cmd_set_system_boot_options_boot_flags): Fix input parameter check. * Various code cleanup. 2008-08-05 Albert Chu * bmc-config/: Support configurable Lan_Session_Limit and Serial_Session_Limit. Update documentation as needed. 2008-08-02 Albert Chu * Various documentation and manpage updates. 2008-08-01 Albert Chu * ipmi-sensors-config/src/: Complete sensor event enable/disable support. * ipmimonitoring/: Support cable interconnect and boot error interpretations. * ipmi-sensors-config/src/: Support cable interconnect and boot error config. 2008-07-31 Albert Chu * ipmi-sensors-config/src/: Begin specific event enable support. * common/src/configtool/config-tool-checkout.c: Fix checkout corner case. Support different length lines in checkout. * bmc-config/, pef-config/, ipmi-sensors-config/: Support config tool API change. 2008-07-30 Albert Chu * ipmi-sensors-config/src/: Variety of code cleanup. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_assertion_supported, sdr_cache_get_deassertion_supported, sdr_cache_get_threshold_assertion_supported, sdr_cache_get_threshold_deassertion_supported): New function.s * libfreeipmi/src/record-format/ipmi-sdr-record-format.c, libfreeipmi/include/freeipmi/record-format/ipmi-sdr-record-format.h: Add tmpl_sdr_compact_sensor_record_non_threshold_based_sensors and tmpl_sdr_compact_sensor_record_threshold_based_sensors templates. * libfreeipmi/src/debug/ipmi-debug-sdr.c (ipmi_dump_sdr_record): Support new compact record formats. 2008-07-20 Albert Chu * ipmi-sensors-config/ipmi-sensors-config.8.pre.in: Update text. * configure.ac: Update lib versions. 2008-07-19 Albert Chu * ipmi-sensors-config/src/ipmi-sensors-config-sensor-event-enable-common.h, ipmi-sensors-config/src/ipmi-sensors-config-sensor-event-enable-common.c: New files. * ipmi-sensors-config/: Support all event messages enable and sensor scanning enable/disable. 2008-07-16 Albert Chu * ipmi-sensors-config/: Remove discrete sensor hysteresis support. Makes no sense. * ipmi-sensors-config/src/ipmi-sensors-config-utils.h, ipmi-sensors-config/src/ipmi-sensors-config-utils.c (create_section_name): New function. * ipmi-sensors-config/src/ipmi-sensors-config-utils.h, ipmi-sensors-config/src/ipmi-sensors-config-utils.c (convert_id_string): Rename to _convert_id_string, make static. * ipmi-sensors-config/src/ipmi-sensors-config-threshold-section.c, ipmi-sensors-config/src/ipmi-sensors-config-threshold-section.h: Use create_section_name appropriately. 2008-07-15 Albert Chu * ipmi-sensors-config/src/ipmi-sensors-config-threshold-section.c: Cleanup to prepare for hysteresis configuration support. * ipmi-sensors-config/: Support threshold hysteresis configuration. * ipmi-sensors-config/src/ipmi-sensors-config-discrete-section.h, ipmi-sensors-config/src/ipmi-sensors-config-discrete-section.c: New files. * ipmi-sensors-config/: Support hysteresis configuration on discrete sensors. * common/src/config-checkout.c (config_checkout_section): Fix corner case. 2008-07-14 Albert Chu * ipmimonitoring/: Fix up -v output formatting. * common/src/configtool/config-tool-argp.c: Fix -v option support. * common/man/manpage-common-config-tool-options.man: Fix man options. * bmc-config/: Output authentication type enables and serial conf, but only under verbose mode. 2008-07-13 Albert Chu * tagged pre_remove_serial_bmc_config * bmc-config/: remove checkout of serial config sections/fields. * tagged post_remove_serial_bmc_config * ipmi-sensors/src/: Limit output in verbose and very verbose when data is clearly irrelevant. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (run_cmd_args): Similar to ipmi-sensors, output "OK" if a bitmask sensor reading has no bits set. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_threshold_sensor_reading): Check for valid analog data format as well as linearization. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_get_sensor_reading): Check for reading state in sensor reading. * ipmimonitoring/src/libipmimonitoring/: Support "connection timeout" error message. * ipmimonitoring/: Support -v verbose option. 2008-07-12 Albert Chu * Update bmc-config, pef-config, ipmi-sensors-config with some config text. 2008-07-11 Albert Chu * ipmi-sensors/src/: Output multiple event messages on multiple lines under verbose mode. Retrieve hysteresis only from IPMI cmd, not from SDR. Support output of event enable information in very verbose mode. * common/src/miscutil/hostlist.c: update to newest lib version. * common/src/configtool/config-tool-common.h (IPMI_CTX_ERRNUM_IS_FATAL_ERROR): New macro. * bmc-config/, pef-config/, ipmi-sensors-config/, common/src/configtool/config-tool-pef-conf-section.c: Utilize IPMI_CTX_ERRNUM_IS_FATAL_ERROR to check if an error from an IPMI API cmd call is really non-fatal. * ipmi-sensors/src/: Limit output in verbose and very verbose when data is clearly irrelevant. 2008-07-10 Albert Chu * ipmi-sensors/src/ipmi-sensors-reading.c (_get_threshold_message_list, _get_generic_event_message_list, _get_sensor_specific_event_message_list): Fix cleanup corner case. 2008-07-10 Albert Chu * ipmipower/ipmipower.8.pre.in: Add default info. * man/freeipmi.conf.5.pre.in: Add default config file path info. * etc/: New dir. * etc/freeipmi.conf: New default freeipmi.conf file. * configure.ac, freeipmi.spec.in: Update appropriately for new files. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_sensor_capabilities): New function. * ipmi-sensors/src/ipmi-sensors-very-verbose-display.c (_output_very_verbose_hysteresis): Before issuing hysteresis command, check if hysteresis can even be read. * ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_get_thresholds): Before issuing threshold reading commands, check if threshold can even be read. * ipmi-sensors/src/ipmi-sensors-reading.c (sensor_reading): Check for unavailable sensor readings. * ipmi-sensors/src/ipmi-sensors-reading.c (_get_na_message_list): New function. * ipmi-sensors/src/ipmi-sensors-reading.c (sensor_reading): If sensor is not linear or has invalid analog_data_format, still try to get proper event message list before falling through. 2008-07-09 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-sensor-cmds.h, libfreeipmi/src/cmds/ipmi-sensor-cmds.c, libfreeipmi/include/api/ipmi-sensor-cmds-api.h, libfreeipmi/src/api/ipmi-sensor-cmds-api.c: Support Get/Set event enable commands. * Globally rename "sensor_state" to "sensor_event_bitmask" for consistency to get/set enable commands and for clarification from ipmimonitoring's "sensor_state". * ipmi-sensors/: Re-order hysteresis output with positive first, for consistency to IPMI spec. Gather hysteresis values from IPMI command when available. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_hysteresis_real): Removed function. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_get_hysteresis_integeer): Renamed to sdr_cache_get_hysteresis. 2008-07-08 Albert Chu * ipmi-sel/, bmc-device/: Move --get-time and --set-time from ipmi-sel to --get-sel-time and --set-sel-time in bmc-device. * libfreeipmi/include/freeipmi/api/ipmi-sdr-repository-cmds-api.h, libfreeipmi/include/freeipmi/cmds/ipmi-sdr-repository-cmds.h, libfreeipmi/src/api/ipmi-sdr-repository-cmds-api.c, libfreeipmi/src/cmds/ipmi-sdr-repository-cmds.c: Support get/set SDR repository time commands. * bmc-device/: Support --get-sdr-repository-time and --set-sdr-repository-time. * libfreeipmi/include/freeipmi/cmds/ipmi-sel-cmds.h, libfreeipmi/src/cmds/ipmi-sel-cmds.c, libfreeipmi/include/api/ipmi-sel-cmds-api.h, libfreeipmi/src/api/ipmi-sel-cmds-api.c: Support Get Auxiliary Log status IPMI command. * bmc-device/: Support --get-mca-auxiliary-log-status. * libfreeipmi/: various minor code cleanup. * libfreeipmi/include/freeipmi/cmds/ipmi-sensor-cmds.h, libfreeipmi/src/cmds/ipmi-sensor-cmds.c, libfreeipmi/include/api/ipmi-sensor-cmds-api.h, libfreeipmi/src/api/ipmi-sensor-cmds-api.c: Support Get/Set hysteresis commands. 2008-07-07 Albert Chu * libfreeipmi/include/freeipmi/api/ipmi-lan-cmds-api.h, libfreeipmi/include/freeipmi/cmds/ipmi-lan-cmds.h, libfreeipmi/src/api/ipmi-lan-cmds-api.c, libfreeipmi/src/cmds/ipmi-lan-cmds.c: Support get IP/UDP/RMCP statistics command. * libfreeipmi/src/api/ipmi-lan-cmds-api.c (ipmi_cmd_suspend_bmc_arps): Fix parameter corner case check. * bmc-device/: Support --get-lan-statistics and --clear-lan-statistics. * bmc-device/: Various minor cleanup. 2008-07-07 Albert Chu Support --sdr-cache-recreate globally. * common/src/toolcommon/tool-cmdline-common.h, common/src/toolcommon/tool-cmdline-common.c: Support new --sdr-cache-recreate option. * common/man/manpage-common-sdr-options.man: Document new --sdr-cache-recreate option. * common/src/toolcommon/tool-sdr-cache-common.h, common/src/toolcommon/tool-sdr-cache-common.c (sdr_cache_create, sdr_cache_create_and_load): Add support for --sdr-cache-recreate. * ipmi-sensors/src/ipmi-sensors.c, ipmi-sel/src/ipmi-sel.c, ipmi-fru/src/ipmi-fru.c, ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c, ipmi-sensors-config/src/ipmi-sensors-config.c: Update for new sdr_cache_create_and_load call. * contrib/ganglia/ganglia_ipmi_sensors.pl, contrib/ganglia/ganglia_ipmimonitoring.pl, contrib/nagios/nagios_ipmimonitoring.pl: Use --sdr-cache-recreate when appropriate. * freeipmi.spec.in: Fix build problem. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (run_cmd_args): Preserve old output format when no messages can be output. * ipmi-chassis/: Document power-on-hours typically abbreviated to POH. 2008-07-07 Albert Chu * bmc-config/src/bmc-config.c, pef-config/src/pef-config.c, ipmi-sensors-config/src/ipmi-sensors-config.c: Fix error message output corner cases. 2008-07-03 Albert Chu * configure.ac: Check for stristr. * common/src/portability/freeipmi-portability.h, common/src/portability/freeipmi-portability.c (freeipmi_stristr): New function. * bmc-config/src/: Use stristr when appropriate. 2008-07-03 Albert Chu * ipmi-chassis/ipmi-chassis.8.pre.in: Update some text. * libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h: Add "NO_CHANGE" macros. * bmc-device/: Support --get-acpi-power-state. * libfreeipmi/src/api/ipmi-device-global-cmds.c (ipmi_cmd_set_acpi_power_state): Fix parameter check bug. * bmc-device/: Support --set-acpi-power-state. * bmc-config/src/: Output lan authentication enables fields dependent on authentication support fields. * configure.ac: Get getpwuid_r portability bug. 2008-07-01 Albert Chu * bmc-device/bmc-device.8.pre.in: Tweak text. * libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h, libfreeipmi/src/cmds/ipmi-device-global-cmds.c, libfreeipmi/include/api/ipmi-device-global-cmds-api.h, libfreeipmi/src/api/ipmi-device-global-cmds-api.c: Support Get Self Test Results IPMI command. * bmc-device/: Support get self test results. * libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h, libfreeipmi/src/cmds/ipmi-device-global-cmds.c, libfreeipmi/include/api/ipmi-device-global-cmds-api.h, libfreeipmi/src/api/ipmi-device-global-cmds-api.c: Support Set and Get ACPI power state commands. 2008-06-22 Albert Chu * man/: New dir. Move manpages from doc/ into man/. 2008-06-21 Albert Chu * doc/freeipmi-faq.texi: Add various HPC notes. * Fix compiler warnings. 2008-06-21 Albert Chu * Audit and cleanup header file usage throughout (i.e. use correct #ifs, proper commenting for GNU style, etc.). 2008-06-20 Albert Chu * common/src/portability/: New directory. * common/src/: Moved to portability files to common/src/portability/. * common/src/toolcommon/: New directory. * common/src/: Moved to toolcommon files to common/src/toolcommon/. * common/src/miscutil/: New directory. * common/src/: Moved to miscutil files to common/src/miscutil/. * Adjust all tools and libs appropriately for path changes and naming changes. * Variety of Makefile cleanup. 2008-06-19 Albert Chu * common/src/pingtool/: New directory. * common/src/ping-tool-common.h, common/src/ping-tool-common.c: Moved to common/src/pingtool/. * common/src/configtool/: New directory. * common/src/: Moved to config tool files to common/src/configtool/. * common/src/debugutil/: New directory. * common/src/debug-common.h, common/src/debug-common.c: Rename to debug-util.h and debug-util.c respectively. Rename library to libdebugutil. * Adjust all tools and libs appropriately for path changes and naming changes. * Makefile.am: Remove freeipmi.spec.in and autogen.sh from EXTRA_DIST. * common/doc: Move to common/man. * Adjust all manpages appropriately. * common/src/freeipmi-portability.h, common/src/freeipmi-portability.c: Fix portability of asprintf. 2008-06-19 Albert Chu * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (ipmimonitoring.c): Output multiple strings if multiple bitmasks set. * common/src/hostrange.h, common/src/hostrange.c: Rename to tool-hostrange-common.h and tool-hostrange-common.c. * common/src/ipmi-ping.h, common/src/ipmi-ping.c: Rename to ping-tool-common.h and ping-tool-common.c. * common/src/Makefile.am: Merge hostrange lib into toolcommon lib. Link libmiscutils.la into libtoolcommon.la. Link libfreeipmiportability.la into libtoolcommon.la. rename libipmiping.la to libpingtoolcommon.la for consistency. Link libfreeipmiportability.la into libpingtoolcommon.la. Link libtoolcommon into libconfigtoolcommon. Link libipmidetect and libfreeipmi into libtoolcommon. Link libfreeipmi into libpingtoolcommon. * Adjust all tool Makefiles appropriately for lib changes. * General Makefile cleanup. 2008-06-18 Albert Chu Support hostranges on bmc-config, ipmi-sensors-config, and pef-config. * common/src/config-tool-argp.c, common/src/config-tool-argp.h, common/src/config-tool-checkout.c, common/src/config-tool-checkout.h, common/src/config-tool-comment.c, common/src/config-tool-comment.h, common/src/config-tool-commit.c, common/src/config-tool-commit.h, common/src/config-tool-common.h, common/src/config-tool-diff.c, common/src/config-tool-diff.h, common/src/config-tool-parse.c, common/src/config-tool-parse.h, common/src/config-tool-pef-conf-section.c, common/src/config-tool-pef-conf-section.h: Support hostranges. * bmc-config/src/, ipmi-sensors-config/src/, pef-config/src/: Support hostranges. * doc/freeipmi-hostrange.txt, common/doc/manpage-common-config-tool-general-use.man, bmc-config/bmc-config.8.pre.in, ipmi-sensors-config/ipmi-sensors-config.8.pre.in, pef-config/pef-config.8.pre.in: Update appropriately for hostrange support in config tools. Misc fallout from above changes. * common/src/pstdout.h, common/src/pstdout.c (PSTDOUT_PRINTF, PSTDOUT_FPRINTF, PSTDOUT_PERROR): new functions. * common/src/tool-sdr-cache-common.c: Use PSTDOUT_PRINTF, PSTDOUT_FPRINTF, PSTDOUT_PERROR appropriately. * common/src/tool-fiid-wrappers.h (_FIID_OBJ_GET_DATA): Remove __len in parameters. * bmc-info/, ipmi-fru/: Adjust for _FIID_OBJ_GET_DATA change. * common/src/config-tool-fiid.h, common/src/config-tool-fiid.c: Removed files. * common/src/config-tool-pef-conf-section.c: Adjust for removed wrapper functions. * common/src/config-tool-commit.h, common/src/config-tool-commit.c (config_commit_section, config_commit): Remove fp argument. * common/src/pstdout.c (_pstdout_printf): Resolve return value corner case. * common/src/pstdout.h: Update comments on pstdout_printf, pstdout_fprintf, and pstdout_perror. 2008-06-16 Albert Chu * ipmi-sensors-config/ipmi-sensors-config.8.pre.in: Fix manpage output text ordering. 2008-06-13 Albert Chu * common/src/tool-common.c (ipmi_open): Add/fix conditions under which "nice" error message output occurs. 2008-06-08 Albert Chu * common/src/tool-sdr-cache-common.c (_get_home_directory): Fix getpwuid_r usage. * configure.ac: Fix getpwuid_r detection. 2008-06-07 Albert Chu Port for Solaris. * README.argp: New file. * common/src/freeipmi-portability.h, common/src/freeipmi-portability.c: Handle mempcpy and strchrnul portability. * config/ac_lsh_gcc_attributes.m4: New file. * common/src/freeipmi-argp.h common/src/freeipmi-argp-ba.c common/src/freeipmi-argp-eexst.c common/src/freeipmi-argp-fmtstream.c common/src/freeipmi-argp-fmtstream.h common/src/freeipmi-argp-help.c common/src/freeipmi-argp-namefrob.h common/src/freeipmi-argp-parse.c common/src/freeipmi-argp-pv.c common/src/freeipmi-argp-pvh.c: New files. * common/src/Makefile.am: Update for libfreeipmiportability for new freeipmi-argp lib. * configure.ac: Update with lib argp checking and argp.h. * Update all tools and libraries to load argp.h or freeipmi-argp.h respectively. * Update all Makefile's to include libfreeipmiportability as needed. * Include alloca.h in all files as needed. * common/src/pstdout.c: Rename internal variables stdout and stderr to p_stdout and p_stderr as needed. * configure.ac: Add sys/sockio.h check. * common/src/ipmi-ping.c: Include sys/sockio.h. * configure.ac: Check for 5 vs 4 argument getpwuid_r. * common/src/tool-sdr-cache-common.c (_get_home_directory): Use 5 or 4 argument getpwuid_r appropriately. * Globally remove "-x c" and "-o" options from cpp lines. * configure.ac: Search for cpp. * Globally change 'cpp' call to $(CPP). * Remove default -Wall compilation. * Cleanup Makefiles for portable use. * configure.ac, libfreeipmi/src/driver/ipmi-openipmi-driver.c: Check and load sys/ioccom.h as needed. * configure.ac: Check if -lsocket lib is needed. * common/src/freeipmi-portability.h: Define timeradd and timersub if they don't exist on the system. * configure.ac, libfreeipmi/src/driver/ipmi-kcs-driver.c: Check and handle iopl() as needed. * configure.ac, common/src/freeipmi-portability.h, common/src/freeipmi-portability.c: Check for an port asprintf as needed. * configure.ac, common/src/freeipmi-portability.h, common/src/freeipmi-portability.c: Check for and port strsep as needed. * configure.ac, common/src/freeipmi-portability.h: Check for and deal with __FUNCTION__ portability. * ipmi-sensors/src/ipmi-sensors-reading.c: include freeipmi-portability.h to deal with asprintf. * ipmi-raw/src/ipmi-raw.c: include freeipmi-portability.h to deal with strsep. * libfreeipmi/src/driver/ipmi-inband.h: Removed file. Move macros into ipmi-kcs-driver.c. * ipmipower/src/wrappers.h, ipmipower/src/wrappers.c: Remove some unused wrapper functions. * ipmpower/src/wrappers.c: include freeipmi-portability.h to deal with timersub() portability. * configure.ac, common/src/ipmi-ping.c, ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, ipmidetect/src/ipmidetectd/ipmidetectd_loop.c, ipmipower/src/ipmipower_connection.c: Check and use hstrerror appropriately. * ipmiconsole/src/libipmiconsole/: include sys/types.h for UINT_MAX. * Globally make everyone load freeipmi-portability.h. * General cleanup for portability, do not load unnecessary .h files, remove unneeded .h files, etc. * General cleanup, make Makefile's consistent to one another, etc. 2008-06-05 Albert Chu * README, doc/freeipmi.7.pre.in: Remove 'Linux' from reference to OpenIPMI (OpenIPMI is on BSD too). 2008-06-05 Albert Chu * configure.ac: Tweak gethostbyname_r logic. 2008-06-04 Albert Chu * config/ac_gethostbyname_r.m4: Remove file. * configure.ac: Add alternate gethostbyname_r checks that work on Solaris. Remove legacy check for program_invocation_short_name. 2008-06-04 Albert Chu * ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_get_thresholds): Special case completion code IPMI_COMP_CODE_REQUEST_SENSOR_DATA_OR_RECORD_NOT_PRESENT as an "ok" error. 2008-06-03 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, libfreeipmi/src/api/ipmi-api.c: Support 5 argument gethostbyname_r. 2008-06-03 Albert Chu * common/src/freeipmi-portability.h, common/src/freeipmi-portability.c (freeipmi_gethostbyname_r): Change compile rules. Compile only if known gethostbyname_r isn't found. * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, libfreeipmi/src/api/ipmi-api.c: Call freeipmi_gethostbyname_r appropriately. 2008-06-03 Albert Chu * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (run_cmd_args): If receive parameters error on ipmi_monitoring_bitmask_string() call, assume bogus bitmask returned from remote machine. 2008-06-03 Albert Chu * ipmi-sensors/src/ipmi-sensors-reading.c: Fix compiler warning. Fix error return bug. 2008-06-03 Albert Chu * libfreeipmi/src/cmds/ipmi-sensor-cmds.c: Make "sensor_state", "sensor_state1", "sensor_state2", and "reserved2". * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c: Adjust for change. * ipmi-sensors/src/ipmi-sensors-reading.c: Adjust for change. 2008-06-03 Albert Chu * ipmi-sensors/src/ipmi-sensors-reading.c: Code cleanup. * common/src/tool-fiid-wrappers.h (_FIID_OBJ_LEN_BYTES): Remove macro. 2008-06-02 Albert Chu * common/src/tool-common.c (ipmi_open): Code cleanup. 2008-06-02 Albert Chu * ipmi-sensors/src/ipmi-sensors-reading.c: Support optional sensor state fields as stated in IPMI spec. Support workaround for Dell no sensor-state returned issue. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c: Support workaround for Dell no sensor-state returned issue. 2008-06-02 Albert Chu * doc/freeipmi-bugs-and-workarounds.txt: Add info on Dell sensor issue. * libfreeipmi/src/cmds/ipmi-sensor-cmds.c: Fix declarations. Some required fields are actually optional. * common/src/tool-fiid-wrappers.h (_FIID_OBJ_LEN_BYTES): New macro. * common/src/tool-fiid-wrappers.h, libfreeipmi/src/libcommon/ipmi-fiid-wrappers.h, libfreeipmi/src/api/ipmi-fiid-wrappers-api.h: Check for good return value from fiid_obj_get() calls. * libfreeipmi/src/fiid/fiid.c (fiid_obj_copy): Fix errnum return corner case. 2008-06-02 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_get_sensor_reading): Change internal API so that return value -1 = error, 0 = unreadable sensor reading, 1 = sensor reading success. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_threshold_sensor_reading, _digital_sensor_reading, _specific_sensor_reading): Re-work with new interface call to _get_sensor_reading. 2008-06-02 Albert Chu * ipmi-sensors/src/ipmi-sensors-reading.c (_get_sensor_specific_event_message_list, _get_generic_event_message_list, _get_threshold_message_list), ipmi-sensors/src/ipmi-sensors-display-common.c (ipmi_sensors_output_event_message_list): Change internal API so that NULL event_message_list means "Unknown" reading. Event message list creation responsible for storing "OK" event message when appropriate. * ipmi-sensors/src/ipmi-sensors-reading.c (sensor_rading): Do not exit on an error of IPMI_COMP_CODE_REQUEST_SENSOR_DATA_OR_RECORD_NOT_PRESENT. * ipmi-sensors/src/ipmi-sensors-simple-display.c (sensors_display_simple_full_record): Fix output formatting. 2008-05-29 Albert Chu * libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_inband): Fix driver device corner case. * ipmi-sensors/, ipmimonitoring/: Fix config file groups. 2008-05-29 Albert Chu * bmc-watchdog/: Minor fixes. * Various minor doc updates. 2008-05-28 Albert Chu * bmc-watchdog/: Code cleanup. * common/src/tool-cmdline-common.c, common/src/tool-config-file-common.c: driver address input cannot be 0. * bmc-watchdog/src/bmc-watchdog.h, bmc-watchdog/src/bmc-watchdog-argp.h, bmc-watchdog/src/bmc-watchdog-argp.c: New files. * bmc-watchdog/: Support config file. Use argp. * bmc-watchdog/, common/src/tool-cmdline-common.c, common/src/tool-config-file-common.c: Support bmc-watchdog specific options. * config/ac_bmc_watchdog_logfile.m4: New file. * bmc-watchdog/: Use BMC_WATCHDOG_LOGFILE_DEFAULT. 2008-05-27 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in: Fix typo. * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c, ipmi-sensors/: Add config file support for ipmi-sensors specific options. * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c, ipmimonitoring/: Add config file support for ipmimonitoring specific options. * doc/freeipmi.conf.5.pre.in: Update appropriately. 2008-05-27 Albert Chu * ipmi-fru/src/ipmi-fru-multirecord-area.c (output_management_access_record): Fix output corner case. * doc/: Tweaks. * ipmi-sensors/, ipmimonitoring/: Variable name consistency cleanup. 2008-05-27 Albert Chu * ipmi-fru/src/ipmi-fru-util.c (ipmi_fru_output_type_length_field): Fix output corner case. * ipmi-fru/: Adjust verbose vs default output. 2008-05-26 Albert Chu * ipmi-fru/src/ipmi-fru.c (_output_fru): Change output to always output device id first. 2008-05-24 Albert Chu * doc/, common/doc/: Document Sun Fire X4150 and X4450 workarounds. 2008-05-24 Albert Chu * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c, ipmi-fru/: Add config file option for --skip-checks. * doc/freeipmi.conf.5.pre.in: Update appropriately for additions. 2008-05-23 Albert Chu * common/doc/manpage-common-workaround-heading-text.man: Tweak description. * bmc-config/, pef-config/, ipmi-sensors-config/: Add config file support. * doc/freeipmi.conf.5.pre.in: Update appropriately for additions. * common/doc/manpage-common-known-issues.man: Update with config file info. * contrib/: Update instructions with config file information. 2008-05-22 Albert Chu * common/src/tool-config-file-common.c: Minor tweaks. * common/doc/: More manpage updates. * ipmimonitoring/, ipmi-fru/, ipmi-sel/, ipmi-sensors/, ipmi-oem/, ipmi-chassis/, bmc-info/, bmc-device/, ipmi-raw/: Add config file support. * doc/freeipmi.conf.5.pre.in: Update appropriately for additions. * bmc-watchdog/: Tweak error messages to be consistent to other tools. 2008-05-21 Albert Chu * common/doc/manpage-common-ignore-sdr-cache.man: Fix option description typo. * common/src/tool-sdr-cache-common.c (sdr_cache_flush_cache), ipmimonitoring/, ipmi-fru/, ipmi-sel/, ipmi-sensors/, ipmi-sensors-config/: Fix --quiet-cache to work with flush option. * ipmipower/src/ipmipower_config.h, ipmipower/src/ipmipower_config.c: Rename to ipmipower_arg.h and ipmipower_arg.c for consistency to other tools. Rename functions appropriately. 2008-05-21 Albert Chu * doc/freeipmi.conf.5.pre.in: New file. * freeipmi.spec.in, configure.ac, doc/Makefile.am: Adjust for new manpage. * doc/freeipmi.7.pre.in: Fix typo. * ipmiconsole/, ipmipower/: Adjust manpages appropriately. Fix some typos along the way. * Globally clarify that --disable-auto-probe is for in-band only. 2008-05-21 Albert Chu * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c: Final initial tweaks. Add ipmiconsole support. * ipmiconsole/: Support config file via common lib. * common/src/conffile.c: Update lib. * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c: Add SDR and Hostrange configuration. * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c: Rename 'sdr_cache_dir' to 'sdr_cache_directory' globally for consistency. Rename 'hostrange_output' to just 'output' for consistency. Remove excessive use of "wanted" suffix in variables. * Adjust for variable name changes appropriately in all tools. Remove excessive use of "wanted" suffix in variables. * common/src/tool-cmdline-common.c (verify_hostrange_cmd_args): Check that user did not specify both buffer and consolidate options. * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c: Add ipmiipmipower support. * ipmiipmipower/: Support config file via common lib. 2008-05-20 Albert Chu * ipmi-sensors-config/ipmi-sensors-config.8.pre.in: Add forgotten manpage sdr options. * ipmi-sensors/src/ipmi-sensors-util.h, ipmi-sensors/src/ipmi-sensors-util.c: New files. * ipmi-sensors/src/ipmi-sensors-argp.c (_ipmi_sensors_args_validate): New function. Check for valid groups input. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (run_cmd_args): Special case error message when you input bad record id. * common/src/conffile.h, common/src/conffile.c: Update lib. * common/src/tool-config-file-common.h, common/src/tool-config-file-common.c, config/ac_freeipmi_config_file.m4: New files. * Adjust --no-probing to --disable-auto-probe. * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c (cmdline_config_file_parse): New function. Add new --config-file option support. * ipmipower/, ipmiconsole/: Use new generic config-file option. * General cmdline parsing cleanup throughout. * common/doc/manpage-common-config-file.man: New file. * ipmipower/, ipmiconsole/: Document --config-file option. * config/ac_ipmipower_config_file.m4: Remove file. * configure.ac: Remove ipmipower config file option. 2008-05-20 Albert Chu * ipmi-sensors-config/src/ipmi-sensors-config.c (_ipmi_sensors_config): Fix flush corner case. * common/src/tool-cmdline-common.c: Add driver_device path check. Cleanup argp_usage() usage. Cleanup integer conversion code. * More general code cleanup. 2008-05-20 Albert Chu * ipmiconsole/, ipmipower/: Remove hostname config-file option. Require users to always input atleast the hostname. * common/src/, ipmi-sel/, ipmi-fru/, ipmi-sensors/, ipmimonitoring/, ipmi-sensors-config/: Remove useless sdr_cache_dir_wanted flag. * common/src/tool-cmdline-common.c (verify_sdr_cmd_args, sdr_parse_opt): Move sdr cache dir check into verify checks. * common/src/tool-cmdline-common.c, common/src/tool-cmdline-common.h: Replace common_cmd_args 'flags' with 'debug' flag. * common/src/tool-cmdline-common.c: Adjust for above change. * Adjust all tools for use of logical debug flag. 2008-05-19 Albert Chu * Make all argp docs/version/naming consistent. Make description consistent between tool and manpages. * common/src: Rename config lib to config-tool lib, to differentiate from config file lib later on. 2008-05-19 Albert Chu * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c: Fix option ordering. Fix --timeout legacy support. Support outofband only driver type parsing. * ipmipower/src/: Use common parsing code not internal parsing code. Use common parsing args. More code cleanup. * bmc-config/src/bmc-config-argp.h: Remove extraneous headers. * common/src/config-argp.h, common/src/config-argp.c: New files. * bmc-config/, pef-config/, ipmi-sensors-config/: Use common config argp parsing and verfication. 2008-05-18 Albert Chu * ipmipower/: More code cleanup. 2008-05-17 Albert Chu * ipmipower/: More code cleanup. * README, doc/freeipmi.7.pre.in: Note Linux SSIF driver. 2008-05-16 Albert Chu * ipmipower/src/: Fix --eliminate option. Use common ipmi_disable_coredump. 2008-05-16 Albert Chu * ipmipower/src/: Fix wait time length bug. Remove 0 backoff count support. Removed various extraneous min/max checks. Fix various signed/unsigned config issues. Remove debug logging facilities. Re-work config file parsing to parse before cmdline parsing. Re-work various code to support later move to generic argp. * libfreeipmi/src/api/ipmi-ctx.h, common/src/tool-cmdline-common.c, common/src/tool-cmdline-common.h: Fix signed/unsigned config issues. * ipmipower/ipmipower.8.pre.in: Fix incorrect descriptions. * common/doc/manpage-common-outofband-retransmission-timeout.man: Note value cannot be larger than session timeout. * Re-arch most tools to verify tool specific args within tool_config_argp_parse instead of inside main. * common/src/tool-cmdline-common.c, common/src/tool-cmdline-common.h: Cleanup. Remove unused macros. Make fixes in preparation for config file support. 2008-05-15 Albert Chu * common/doc/manpage-common-outofband-timeout.man: Fix text. * common/doc/manpage-common-outofband-timeout.man: Split into manpage-common-outofband-session-timeout.man and manpage-common-outofband-retransmission-timeout.man. * Adjust all manpages appropriately for change. * ipmipower/: Use common manpages as appropriate. * ipmiconsole/src/ipmiconsole/: Support --session-timeout and --retransmission-timeout options. * common/doc/manpage-common-cipher-suite-id.man: Split into manpage-common-cipher-suite-id-main.man and manpage-common-cipher-suite-id-details.man. * Adjust all manpages appropriately for change. * ipmiconsole/: Use common manpages as appropriate. * common/src/tool-cmdline-common.c (common_parse_opt): Check that session timeout and retransmission timeout are not zero. * common/src/tool-cmdline-common.c (verify_common_cmd_args): Check that retransmission timeout is not larger than session timeout. * ipmipower/: Various cmdline input changes to make ipmipower more like other tools. 2008-05-15 Albert Chu * common/src/tool-cmdline-common.c (parse_workaround_flags): Fix parsing bug. * libfreeipmi/src/api/ipmi-lan-session-common.c, libfreeipmi/src/api/ipmi-api.c, libfreeipmi/include/freeipmi/api/ipmi-api.h, ipmipower/src/, common/src/tool-common.c, common/doc/manpage-common-troubleshooting.man: Add new "connection timeout" error message. 2008-05-15 Albert Chu * ipmi-fru/src/: Remove excess newline outputs. * ipmipower/src/ipmipower_privilege_level.h, ipmipower/src/ipmipower_privilege_level.c, ipmipower/src/ipmipower_workarounds.h, ipmipower/src/ipmipower_workarounds.c, ipmipower/src/ipmipower_cipher_suite_id.h, ipmipower/src/ipmipower_cipher_suite_id.c: Removed files. * ipmipower/src/: Remove need for internal privilege_level_t, workaround flags, and cipher_suite_id_t type and macros. * ipmipower/: Continue cleanup/fixes. 2008-05-15 Albert Chu * common/doc/manpage-common-workaround-text.man: Add information on types of errors users may see if their machine has an issue that may be worked around with a workaround. 2008-05-15 Lisa Camesano * common/doc/manpage-common-workaround-text.man: Update with Sun workaround information. 2008-05-14 Albert Chu * ipmipower/: Continue cleanup/fixes. * tagged pre_get_channel_cipher_remove * ipmipower/: Remove check of cipher suite id support via get channel cipher suites command. Error case now falls through to open session request. * tagged post_get_channel_cipher_remove * ipmipower/src/: Remove need for internal driver_type_t and authentication_type_t type. Adjust to use libfreeipmi macros. * ipmipower/src/ipmipower_driver_type.h, ipmipower/src/ipmipower_driver_type.c, ipmipower/src/ipmipower_authentication_type.h, ipmipower/src/ipmipower_authentication_type.c: Removed files. * ipmipower/src/: Continue general cleanup. * common/src/tool-cmdline-common.h: Add IPMI_DEVICE strings. 2008-05-13 Albert Chu * ipmi-chassis/src/: General cleanup. Make error messages consistent. Use consistent code to other tools. Return exit code 1 as appropriate. Re-order commands for consistency to specification. Output "unknown" if output type is not known. * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c (init_common_cmd_args): Remove function to create new init_common_cmd_args_user, init_common_cmd_args_operator, and init_common_cmd_args_admin functions. * bmc-device/: Make default privilege admin. * ipmi-sel/: Make default privilege operator. * Adjust tools to use new cmdline parse common functions. * libfreeipmi/src/cmds/ipmi-chassis-cmds.c, libfreeipmi/include/freeipmi/cmds/ipmi-chassis-cmds.h, ipmi-chassis/src/: Audit and rename many macros, fiid fields, etc. for consistency to the IPMI specification. Support legacy options as needed. * ipmpower/src/: Remove pinning of memory. * ipmipower/: Removed cipher-suite-id auto discovery. Removed privilege-level auto discovery. General code cleanup. 2008-05-13 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-chassis-cmds.h: Fix boot device flags. 2008-05-13 Albert Chu * ipmi-fru/src/ipmi-fru.c (_output_fru, run_cmd_args): Output FRU device names along with IDs. 2008-05-13 Albert Chu * ipmi-fru/src/ipmi-fru-util.c (_get_type_length_bytes): Fix corner case when handling binary data on type/length output. * libfreeipmi/include/freeipmi/record-format/ipmi-fru-information-record-format.h: Fix incorrect bit mask. 2008-05-12 Albert Chu * common/src/tool-cmdline-common.c, common/src/tool-cmdline-common.h: Add --privilege to legacy privilege options available. * Update intel 2.0 workaround comments and documentation globally. * ipmipower/: Removed ipmi-version auto discovery. Removed authentication-type auto discovery. * ipmipower/: Convert --ipmi-version to --driver-type. * ipmipower/src/ipmipower_ipmi_version.h, ipmipower/src/ipmipower_ipmi_version.c: Renamed to ipmipower_driver_type.h and ipmipower_driver_type.c respectively. Adjust code appropriately for --ipmi-version to --driver-type change. * ipmipower/src/ipmipower_config.c (ipmipower_config_check_values): Fix password length corner case check. * Minor code cleanup. 2008-05-09 Albert Chu * ipmiconsole/src/ipmiconsole/ipmiconsole_config.c (_cb_hostname): Fix length check. * ipmiconsole/src/ipmiconsole/: Re-arch to make config and argument parsing like other tools. 2008-05-09 Albert Chu * ipmimonitoring/: Add missing option. * ipmipower/: Remove unused code. * ipmi-locate/src/ipmi-locate.c: Make error output message consistent to others. * Various minor cleanup. 2008-05-09 Albert Chu * libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_outofband, ipmi_ctx_open_outofband_2_0): Add checks for hostname length. 2008-05-08 Albert Chu * ipmi-sel/, ipmi-sensors/, ipmimonitoring/: Fix invalid input corner cases. * common/src/hostlist.c: Remove internal lib error messages. 2008-05-08 Albert Chu * libfreeipmi/: Change IPMI_ERR_OUTOFRANGE to IPMI_ERR_ERRNUMRANGE for consistency to other libraries. 2008-05-06 Albert Chu * ipmidetect/: Fix manpage dates. * common/doc/manpage-common-hostranged-text-shell.man, common/doc/manpage-common-hostranged-text-options.man: New files. * common/doc/manpage-common-hostranged-text-main.man: Adjust with more generic text. * common/doc/Makefile.am: Update for new files. * Adjust manpages appropriately for new common hostranged manpage info. 2008-05-05 Albert Chu * ipmi-sel/: Support --get-time and --set-time options. 2008-05-04 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-sel-cmds.h, libfreeipmi/src/cmds/ipmi-sel-cmds.c, libfreeipmi/include/freeipmi/api/ipmi-sel-cmds-api.h, libfreeipmi/src/api/ipmi-sel-cmds-api.c: Support get and set sel time. 2008-05-03 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h, libfreeipmi/src/cmds/ipmi-device-global-cmds.c, libfreeipmi/include/freeipmi/api/ipmi-device-global-cmds-api.h, libfreeipmi/src/api/ipmi-device-global-cmds-api.c: Support cold and warm reset. * bmc-device/: New tool. * configure.ac, Makefile.am, freeipmi.spec.in, doc/freeipmi.7.in, README: Update appropriately for new tool. 2008-05-02 Albert Chu * libfreeipmi/include/freeipmi/cmds/ipmi-device-global-cmds.h, libfreeipmi/src/cmds/ipmi-device-global-cmds.c, libfreeipmi/include/freeipmi/api/ipmi-device-global-cmds-api.h, libfreeipmi/src/api/ipmi-device-global-cmds-api.c: Support get device guid command. * bmc-info/: Add support for --guid. * README, doc/freeipmi.7.in, bmc-info/bmc-info.8.pre.in: Update bmc-info tool description. * libfreeipmi/src/cmds/ipmi-device-global-cmds.c (tmpl_cmd_get_device_id_rs): Rename ipmi_version field names to be consistent to rest of freeipmi. * bmc-info/, pef-config/, ipmi-sel/: Only output bcd encoded fields w/ %x if the field is > 4 bits. Otherise %d is fine. 2008-05-01 Albert Chu * contrib/ganglia/Makefile.am: Fix make dist. * contrib/nagios/Makefile.am, contrib/nagios/README, contrib/nagios/nagios_ipmimonitoring.pl: New files. 2008-04-30 Albert Chu * ipmimonitoring/ipmimonitoring.8.pre.in: Add missing options. 2008-04-30 Albert Chu * contrib/ganglia/ganglia_ipmi_sensors.pl: Additional options added. Fix code. * contrib/ganglia/ganglia_ipmimonitoring.pl: New file. * contrib/ganglia/README: Update appropriately. 2008-04-29 Albert Chu * common/doc/manpage-common-hostranged-always-prefix.man: New file. * common/src/pstdout.c, common/src/hostrange.h, common/src/hostrange.c, common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c: Support --always-prefix option. * bmc-info/, ipmi-chassis/, ipmi-fru/, ipmi-oem/, ipmi-raw/, ipmi-sel/, ipmi-sensors/, ipmimonitoring/, ipmipower/: Support --always-prefix option. * contrib/, contrib/Makefile.am, contrib/ganglia/, contrib/ganglia/Makefile.am, contrib/ganglia/README contrib/ganglia/ganglia_ipmi_sensors.pl: New files and directories. * Makefile.am, configure.ac: Updated appropriately. 2008-04-27 Albert Chu * configure.ac: Update from 0.6.0 to 0.7.0. 2008-04-27 Albert Chu * common/doc/Makefile.am: Fix make dist. 2008-04-27 Albert Chu * Tagged Release-0_6_0_base. * Branched Release-0_6_0_branch. 2008-04-24 Albert Chu * ipmipower/: Interactive command order cleanup. * doc/: Various minor updates. 2008-04-23 Albert Chu * common/doc/manpage-common-general-options-header.man, common/doc/manpage-common-hostranged-options-header.man: New files. * common/doc/manpage-common-sdr-options.man, common/doc/manpage-common-config-tool-options.man: Add option-section text. * For better readability, sub-divide options into sections in most manpages. * ipmi-locate/src/ipmi-locate.c: Check for root after parsing args. * Add and fix synopsis in all manpages appropriately for consistency. * ipmiconsole/, ipmipower/: Order options/config code more consistently to other tools. 2008-04-23 Albert Chu * common/doc/manpage-common-homepage.man: New file. * Add webpage to all manpages and documentation. * Adjust all Makefile.am's appropriately. * bmc-config/bmc-config.conf.5.in: Rename to bmc-config.conf.5.pre.in. Minor doc tweaks. * configure.ac: Adjust bmc-config.conf.5 manpage appropriately. * Globally change "User Commands" to "System Commands" as needed. 2008-04-21 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.c: Fix error message typo. 2008-04-18 Tiziano Muller * ipmimonitoring/src/ipmimonitoring/Makefile.am: Fix compile issue when specifying LDFLAGS="-Wl,--as-needed". 2008-04-18 Albert Chu * ipmipower/src/ipmipower_ipmi_version.c (ipmipower_ipmi_version_index): Support "driver type" input like 'lan', 'lan_2_0'. * ipmiping/ipmiping.8.pre.in: Clarify ipmi version option more. * configure.ac: Prepare for beta release. * Tagged Release-0_6_0_beta2. 2008-04-17 Albert Chu * libfreeipmi/src/api: Make debug dump output consistent to other tools w/ hostname prefix on lan debug output. * ipmipower/, ipmiconsole/: Revert change with no-prefix when doing lan debug output to only one host. * libfreeipmi/include/freeipmi/sdr-cache/ipmi-sdr-cache.h, libfreeipmi/src/sdr-cache/ipmi-sdr-cache.c (ipmi_sdr_cache_ctx_get_debug_prefix, ipmi_sdr_cache_ctx_set_debug_prefix): New functions. * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-defs.h: Add debug_prefix into ctx. * libfreeipmi/src/sdr-cache/ipmi-sdr-cache.c: Init and cleanup debug_prefix appropriately. * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-create.c, libfreeipmi/src/sdr-cache/ipmi-sdr-cache-read.c: Use new debug prefix in debug outputs. * ipmimonitoring/, ipmi-sensors/, ipmi-sel/, ipmi-fru/, ipmi-sensors-config/: Set debug prefix appropriately. * common/src/ipmi-ping.h, common/src/ipmi-ping.c: Pass destination to create and parse functions. * ipmiping/, rmcpping/: Prefix debug output appropriately. * common/src/debug-common.h, common/src/debug-common.c: New files. * ipmipower/, ipmiping/, rmcpping/, bmc-watchdog/, ipmiconsole/, libfreeipmi/: Use debug common functions to generate consistent headers for all tools. * ipmipower/: Convert all err_* calls to ierr_* calls. * ipmiping/ipmiping.8.pre.in: Clarify ipmi version option. * ipmiconsole/: Various cleanup. * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.h (ipmiconsole_ctx_connection_cleanup): Rename to __ipmiconsole_ctx_connection_cleanup. * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c, ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.h (ipmiconsole_ctx_connection_cleanup_session_submitted, ipmiconsole_ctx_connection_cleanup_session_not_submitted): New functions. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c: Update appropriately for function name changes. * ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit, ipmiconsole_engine_submit_block): Fix assert corner case. 2008-04-16 Albert Chu * bmc-watchdog/, rmcpping/src/, ipmiping/src/, ipmipower/src/, ipmiconsole/src/libipmiconsole/: Make debug dump output consistent to other tools by calling ipmi_cmd_str appropriately, outputing "request" vs "response", "ipmi 1.5" vs. "ipmi 2.0", output w/ headers, etc. * libfreeipmi/src/api: Store hostname to ctx. 2008-04-15 Albert Chu * General documentation manpage audit/updates. 2008-04-14 Albert Chu * General documentation manpage audit/updates. * Minor code cleanup through. 2008-04-11 Albert Chu * ipmidetect/src/ipmidetectd/hash.h, ipmidetect/src/ipmidetectd/hash.c, ipmidetect/src/ipmidetectd/thread.h, ipmidetect/src/ipmidetectd/thread.c: Move to common/src and into the miscutils library. * ipmidetect/src/ipmidetectd/Makefile.am, common/src/Makefile.am: Update appropriately. * ipmidetect/src/ipmidetect, ipmidetect/src/ipmidetectd/, ipmiconsole/src/ipmiconsole: Move common error.h and error.c into common/src. * ipmidetect/src/ipmidetectd/Makefile.am, ipmidetect/src/ipmidetect/Makefile.am, ipmiconsole/src/ipmiconsole/Makefile.am, common/src/Makefile.am: Adjust appropriately. * ipmipower/src/error.h, ipmipower/src/error.c: Rename to ierror.h and ierror.c to differentiate itself from the common error.h and error.c. Adjust all function names accordingly. 2008-04-10 Albert Chu * README, doc/freeipmi.7.pre.in: Add info on libraries. * General documentation manpage audit/updates. 2008-04-09 Albert Chu * configure.ac: Prepare for beta release. * Tagged Release-0_6_0_beta1. 2008-04-08 Albert Chu * doc/: More minor updates. * Various manpage cleanup and extra documentation. * ipmi-oem/: Change "cmd" to "command" everywhere. * libfreeipmi/, ipmidetect/, ipmimonitoring, ipmipower/, ipmiconsole/, ipmiping/, rmcpping/, doc/, configure.ac: Use .pre.in instead of just .in for manpages for consistency. * common/doc/manpage-common-reporting-bugs.man, common/doc/manpage-common-gpl-library-text.man, common/doc/manpage-common-gpl-program-text.man: New files. * Update manpages appropriately for report-bugs common manpage and gpl info. * Add copyrights to all manpages appropriately. * Remove "ORIGIN" and "AUTHORS" from most manpages. * common/doc/manpage-common-config-tool-general-use.man, common/doc/manpage-common-config-tool-options.man: New files. * bmc-config/, pef-config/, ipmi-sensors-config/: Use new common config-tool manpage text. * common/doc/manpage-common-known-issues-ping.man, common/doc/manpage-common-ping-options.man, common/doc/manpage-common-ping-origin.man: New files. * ipmiping/, rmcpping/: Use new common manpage text. 2008-04-07 Albert Chu * ipmimonitoring/: Support WATTS sensor unit type. * bmc-config/bmc-config.8.pre.in: Fix options in example. * bmc-config/bmc-config.conf.5.in: Anonymous -> NULL. * ipmimonitoring/: Support entity presence, management subsystem, battery, and fru state sensor interpretations. General code cleanup. * ipmi-sensors/ipmi-sensors.8.pre.in: Add ipmimonitoring note. * ipmi-sel/ipmi-sel.8.pre.in: Add some text on SEL records. * README: Update as generic info, not just a GPL notice. * doc/freeipmi.7.in: New generic overview manpage. * libfreeipmi/libfreeipmi.3.in: New generic library overview manpage. * doc/Makefile.am, freeipmi.spec.in, configure.ac: Update for new manpages. * common/doc: Fix make dist bug. * Add freeipmi(7) to "SEE ALSO" on all appropriate manpages. * Various manpage and doc fixes. * Fix compiler warnings. 2008-04-05 Albert Chu * ipmipower/: Finish -B support. * ipmipower/: Add -F support. * doc/freeipmi-hostranged.txt: Update appropriately. * ipmi-sensors-config/: Put undefined threshold support in verbose output only. * ipmi-sensors-config/: Fix readable sensors corner case. 2008-04-04 Albert Chu * ipmipower/: Support -B option for consistency to other tools, although -B does nothing. Change original -B option to -G. * common/doc/manpage-common-hostranged-text-options.man: Move option text into manpage-common-hostranged-text-main.man. * common/doc/manpage-common-hostranged-text-options.man: Rename to manpage-common-hostranged-text-localhost.man and only mention localhost information. * Update manpages appropriately. 2008-04-04 Albert Chu * ipmi-sensors-config/ipmi-sensors-config.8.pre.in: Add notes about ipmi-sensors and ipmimonitoring. * bmc-config/: Fix some comments. * common/doc/manpage-common-known-issues.man: New file. * common/doc/Makefile.am: Update for new file. * Update numerous webpages with new known-issues info. * configure.ac: Prepare for beta release. * Tagged Release-0_6_0_beta0. 2008-04-03 Albert Chu * ipmi-sensors/src/ipmi-sensors-very-verbose-display.c (_output_very_verbose_header), ipmi-sensors/src/ipmi-sensors-verbose-display.c (_output_verbose_header): Output sensor owner ids as needed. 2008-04-02 Albert Chu * ipmiconsole/ipmiconsole.8.pre.in: Modify escape sequence main text to mention -e option. * freeipmi.spec.in: Update w/ missing files. * bmc-watchdog/Makefile.am: Fix install bug. * common/src/config-common.h, common/src/config-checkout.c, common/src/config-commit.c: Suppoert new CONFIG_UNDEFINED flag. * ipmi-sensors-config/src/ipmi-sensors-config-threshold-section.c: Unreadable thresholds are now output as being undefined. * ipmi-sensors/, ipmimonitoring/: Support reading of sensors with sensor_owner_id not reserved. * ipmimonitoring/: Support drive slot device install interpretation. 2008-04-01 Albert Chu * ipmiconsole/: Support adjustable escape char option in ipmiconsole. 2008-03-28 Albert Chu * Fix nroff syntax in many manpages. * More copyright changes/fixes/updates/header additions everywhere. * ipmi-oem/: Minor cleanup. 2008-03-27 Albert Chu * ipmi-oem/: Add ipmi-oem command. * Tons of copyright changes/fixes/updates/header additions everywhere. 2008-03-27 Albert Chu * bmc-watchdog/src/bmc-watchdog.c: Fix compile bugs. * ipmi-raw/src/ipmi-raw-argp.c: Fix error check corner case. 2008-03-23 Albert Chu * common/doc/manpage-common-workaround-text.man, common/doc/manpage-common-workaround-text.man, doc/freeipmi-bugs-and-workarounds.txt: Add new motherboard for asus workarounds. 2008-03-19 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_init_ipmi): Fix probing issue. * bmc-watchdog/src/bmc-watchdog.c (_cmd): Fix openipmi corner case. 2008-03-06 Albert Chu * common/doc: Minor updates. * doc/freeipmi-bugs-and-workarounds.txt: New doc. 2008-02-23 Albert Chu * ipmi-fru/: Re-work to avoid excessive IPMI transactions. 2008-02-22 Albert Chu * ipmi-fru/src/ipmi-fru-util.c: Fix bad return types. 2008-02-22 Albert Chu * ipmi-fru/ipmi-fru.8.pre.in: Fix typos. * ipmi-fru/src/ipmi-fru-util.c: Fix typo. * ipmi-fru/src/ipmi-fru-util.c (_sixbitascii_to_ascii): Fix conversion corner cas. 2008-02-21 Albert Chu * common/doc/manpage-common-workaround-text.man: Add forgotten Sun Fire 4100 workaround. * doc/freeipmi-coding.txt: Add chunk on workarounds implemenation. * libfreeipmi/src/api/ipmi-lan-session-common.c (ipmi_lan_open_session): Fix sun workaround bug. 2008-02-19 Albert Chu * common/src/config-commit.c (config_commit_section): Fix bug. 2008-02-18 Albert Chu * freeipmi.spec.in: Add ipmi-sensors-config. 2008-02-18 Albert Chu Merge contents from sensors_config_branch. * common/doc/manpage-common-outofband-username-operator.man, common/doc/manpage-common-privilege-level-operator.man: New files. * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c: Support operator privilege defaults. * bmc-config/src/, pef-config/src/: Adjust architecture for common config code. * libfreeipmi/include/freeipmi/cmds/ipmi-sensor-cmds.h, libfreeipmi/src/cmds/ipmi-sensor-cmds.c (fill_cmd_set_sensor_thresholds): New function. * libfreeipmi/include/freeipmi/api/ipmi-sensor-cmds-api.h, libfreeipmi/src/api/ipmi-sensor-cmds-api.c (ipmi_cmd_set_sensor_thresholds): New function. * common/src/tool-sdr-cache-common.c: Remove pstate asserts. Support NULL pstate input to all functions. * common/src/config-common.h: Create macro for max section name length. * bmc-config/, pef-config/: use new macro for max section name length. * libfreeipmi/include/freeipmi/record-format/ipmi-sdr-record-format.h, libfreeipmi/src/record-format/ipmi-sdr-record-format.c: Add two new templates, tmpl_sdr_full_sensor_record_non_threshold_based_sensors and tmpl_sdr_full_sensor_record_threshold_based_sensors. * libfreeipmi/src/debug/ipmi-debug-sdr.c (ipmi_dump_sdr_record): Support more detailed templates. * libfreeipmi/include/fiid/fiid.h, libfreeipmi/src/fiid/fiid.c (fiid_obj_copy): New function. * common/src/tool-sdr-cache-common.h, common/src/tool-sdr-cache-common.c (sdr_cache_get_threshold_settable): New function. * libfreeipmi/include/freeipmi/util/ipmi-sensor-util.h, libfreeipmi/src/util/ipmi-sensor-util.c (ipmi_sensor_decode_raw_value): New function. * common/src/config-common.h, common/src/config-commit.c: Support new CONFIG_READABLE_ONLY flag. New CONFIG_VALIDATE_OUT_OF_RANGE validation return value. * common/src/config-section.h, common/src/config-section.c (config_section_update_keyvalue_output_double): New function. * common/src/config-common.h: Change validate callback to take a void *arg. * common/src/config-section.h, common/src/config-section.c, bmc-config/, pef-config/: Adjust for validate callback change. * common/src/config-section.c, common/src/config-validate.c: Adjust for new CONFIG_VALIDATE_OUT_OF_RANGE value. * bmc-config/, pef-config/: Change -f to -n option. Support -f legacy. * libfreeipmi/include/freeipmi/util/ipmi-sensor-util.h, libfreeipmi/src/util/ipmi-sensor-util.c (ipmi_sensor_decode_raw_value): New function. * ipmi-sensors-config/: New tool. * Makefile.am, configure.ac: Adjust for new tool. * Various minor code cleanup/fixes. * Update docs appropriately for new tool. 2008-02-15 Albert Chu * libfreeipmi/src/driver/ipmi-ssif-driver.c (_ipmi_i2c_smbus_access): Support SSIF driver timeout. * libfreeipmi/src/driver/: Support driver timeout error codes. * libfreeipmi/src/driver/ipmi-openipmi-driver.c: Remove semaphore unused code code. * ipmimonitoring/src/libipmimonitoring/: Classify driver timeout as a system error. * libfreeipmi/: Fix corner cases when inband drivers read 0 bytes of data. 2008-02-15 Albert Chu * bmc-info/src/bmc-info.c (display_get_device_id): Fix version output. 2008-02-15 Albert Chu * libfreeipmi/src/interface/ipmi-lan-interface.c (ipmi_lan_recvfrom): Fix bug. 2008-01-29 Albert Chu * common/src/hostlist.h, common/src/hostlist.c: Update to newest library to fix warnings. * Variety of code cleanup and minor bug fixes based static code analyzer. 2008-01-28 Albert Chu * Minor bug fixes throughout. 2008-01-25 Albert Chu * pef-config/pef-config.8.pre.in: Add general text. 2008-01-24 Albert Chu * pef-config/src/pef-config-wrapper.h, pef-config/src/pef-config-wrapper.c: Remove useless files. * pef-config/src/: Adjust files appropriately. * pef-config/src/pef-config.c, bmc-config/src/bmc-config.c: Make function static. * common/src/tool-sdr-cache-common.c: Fix compile issue. Re-work to work with NULL pstate. 2008-01-24 Albert Chu * pef-config/pef-config.8.pre.in: Add "GENERAL USE" section. Fix some typos. * bmc-config/bmc-config.8.pre.in: Fix some typos. * pef-config/src/pef-config-argp.c: Fix doc typo. 2008-01-24 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache-create.c (ipmi_sdr_cache_create): Fix record count corner case. 2008-01-23 Albert Chu * common/doc/manpage-common-ignore-sdr-cache.man: New file. * common/src/tool-cmdline-common.h, common/src/tool-cmdline-common.c: Add --ignore-sdr-cache support. * ipmi-fru/, ipmi-sel/: Support --ignore-sdr-cache option. * Adjust argp option groups in all tools. 2008-01-22 Albert Chu * ipmimonitoring/src/: Various consistency to other tools fixes. 2008-01-22 Albert Chu * common/src/tool-common.c (ipmi_open): Try devices more intelligently. * libfreeipmi/include/freeipmi/locate/ipmi-locate.h, libfreeipmi/src/locate/ipmi-locate.c (ipmi_locate_discover_device_info): New function. * libfreeipmi/src/locate/ipmi-locate.c (_ipmi_locate_get_device_info): Add flag to try/not-try defaults. 2008-01-22 Albert Chu * libfreeipmi/src/api/ipmi-api.c (ipmi_ctx_open_inband): Remove legacy requirement for required SSIF driver path. 2008-01-22 Albert Chu * common/doc/manpage-common-inband.man: Tweak english. 2008-01-22 Albert Chu * libfreeipmi/src/sdr-cache/ipmi-sdr-cache.c: Fix "parmaeters" typo. 2008-01-22 A Balamurugan * common/doc/manpage-common-inband.man: updated. * ipmi-locate/src/ipmi-locate.c: displays device-address with hex prefix. 2008-01-16 Albert Chu * libfreeipmi/src/driver/ipmi-ssif-driver.c: Add more debugging. Remove inlineness for debugging. 2008-01-09 Albert Chu * freeipmi.spec.in: Obsolete older freeipmi-ipmimonitoring subpackage. 2008-01-03 Albert Chu * libfreeipmi/src/sdr-cache/: Use macros instead of hard coded index numbers. * ipmi-locate/ipmi-locate.8.pre.in, ipmi-chassis/ipmi-chassis.8.pre.in: Update description. * ipmi-sensors/src/: Change "Sensor ID String" output to just "ID String" for consistency to IPMI spec. * freeipmi.spec.in: Update for sdr-cache dir. 2008-01-02 Albert Chu * doc/freeipmi-faq.texi: Fix some english. * libfreeipmi/src/api/ipmi-lan-session-common.c: Remove left over debug statement. * ipmi-locate/ipmi-locate.8: Rename to ipmi-locate.8.pre.in. Use common/doc manpages. Remove unsupported options. * ipmi-locate/Makefile.am, configure.ac; Support ipmi-locate.8.pre.in appropriately. * bmc-info/bmc-info.8.pre.in, ipmi-chassis/ipmi-chassis.8.pre.in, ipmi-fru/ipmi-fru.8.pre.in, ipmi-raw/ipmi-raw.8.pre.in, bmc-config/bmc-config.8.pre.in, pef-config/pef-config.8.pre.in, ipmi-locate/ipmi-locate.8.pre.in, ipmi-sel/ipmi-sel.8.pre.in, ipmi-sensors/ipmi-sensors.8.pre.in: Update/tweak names and descriptions. 2007-12-31 Albert Chu * common/doc/manpage-common-workaround-heading-text.man: Fix typo. * ipmi-raw/ipmi-raw.8.pre.in: Fix examples text. 2007-12-30 Albert Chu * ipmi-sensors/src/ipmi-sensors.c (_sensors_list_specified): Removed function. * ipmi-sensors/src/ipmi-sensors.c (_output_sensor): New function. * ipmi-sensors/src/ipmi-sensors.c (_display_sensors): Re-work for better efficiency. * libfreeipmi/include/freeipmi/ipmi-sdr-cache.h, libfreeipmi/src/sdr-cache/ipmi-sdr-cache.c (ipmi_sdr_cache_search_sensor_number): New function. * ipmi-sel/src/ipmi-sel-entry.c (_find_sdr_record): Use ipmi_sdr_cache_search_sensor_number appropriately. * doc/: Various minor updates. 2007-12-29 Albert Chu * libfreeipmi/src/sdr-cache/, libfreeipmi/include/sdr-cache/: Support sdr cache ctx flags. Support SDR debug dumping. * common/src/tool-sdr-cache-common.c, common/src/tool-sdr-cache-common.h: Support SDR debug dumping appropriately. * ipmimonitoring/: Support SDR debug dumping appropriately. * libfreeipmi/include/freeipmi/spec/ipmi-cmd-spec.h: Fix spelling of macros. Add new macros appropriately. * Update spelling of command names globally as necessary. * libfreeipmi/include/freeipmi/util/ipmi-util.h, libfreeipmi/src/util/ipmi-util.c (ipmi_cmd_str): New function. * libfreeipmi/include/freeipmi/debug/ipmi-debug.h, libfreeipmi/src/debug/ipmi-debug.c (ipmi_obj_dump): Removed function. * libfreeipmi/include/freeipmi/debug/ipmi-debug.h, libfreeipmi/src/debug/ipmi-debug.c (ipmi_obj_dump_perror): Renamed to ipmi_obj_dump. * libfreeipmi/include/freeipmi/debug/ipmi-debug.h, libfreeipmi/src/debug/ipmi-debug.c (ipmi_dump_lan_packet, ipmi_dump_rmcp_packet, ipmi_dump_rmcpplus_packet): Add trlr output. * libfreeipmi/include/freeipmi/debug/ipmi-debug.h, libfreeipmi/src/debug/ipmi-debug.c: Make char * input parameters const char *. * libfreeipmi/src/api: Support headers in packet dumps describing the packet specifically rather than through generic headers. * Adjust all calls to debug functions appropriately. * Fix various compiler warnings. 2007-12-29 Albert Chu * pef-config/src/Makefile.am: Remove linking to libsdr.la. 2007-12-29 Albert Chu Merge from sdr_lib_rearch_branch, SDR library rearchitecture. * ipmimonitoring/src/libipmimonitoring/: Remove struct ipmi_monitoring_communication which is no longer needed. Adjust for direct use of ipmi_ctx_t as needed. * ipmimonitoring/src/libipmisdrcache/: Support ipmi error code. * ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache.h: Add comments on API. * ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_defs.h, ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_common.h, ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_common.c, ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_create.c, ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_delete.c, ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache_read.c: New files. Split off code into appropriate files. * libfreeipmi/src/api/ipmi-sensor-cmds-api.c, libfreeipmi/include/freeipmi/api/ipmi-sensor-cmds-api.h (ipmi_cmd_get_sensor_reading): New function. * ipmimonitoring/src/libipmimonitoring/, ipmimonitoring/src/libipmisdrcache/: Re-work APIs to move all sdr cache creation into libipmisdrcache and out of ipmimonitoring. * ipmimonitoring/src/ipmimonitoring/: Make options in ipmimonitoring more consistent to ipmi-sensors. * ipmimonitoring/src/libipmisdrcache/: Move into libfreeipmi/include/freeipmi/sdr-cache/ and libfreeipmi/src/sdr-cache/. * libfreeipmi/src/libcommon/: Add sdr-cache equivalent error wrappers. * libfreeipmi/src/sdr-cache/: Use wrappers appropriately. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.c ipmimonitoring/include/freeipmi/sdr-cache/ipmi_monitoring.h: New function. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sdr_cache.c (_ipmi_monitoring_sdr_cache_filename): Handle user specified filename formats. * common/src/tool-sdr-cache-common.h, common/src/tool-sdr-cache-common.c, common/src/tool-sensor-common.h, common/src/tool-sensor-common.c, common/src/tool-fiid-wrappers.h: New files. * common/src/ipmi-sdr-cache-utils.h, common/src/ipmi-sdr-cache-utils.c, common/src/ipmi-sdr-cache-reads.h, common/src/ipmi-sdr-cache-reads.c, common/src/ipmi-sdr-cache-writes.h, common/src/ipmi-sdr-cache-writes.c, common/src/ipmi-sdr-cache.h, common/src/ipmi-sdr-cache.c, common/src/ipmi-sdr-cache_defs.h, common/src/ipmi-sensor-common.h, common/src/ipmi-sensor-common.c: Removed files. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sdr_cache.c: Remove /tmp debug cache location. * ipmimonitoring/src/ipmimonitoring/: Adjust to use new sdr cache library and match ipmi-sensors behavior more. * ipmi-fru/src/: Adjust to use new sdr cache library. General code cleanup. * ipmi-fru/src/ipmi-fru-fiid.h: Remove file. * ipmi-sel/src/: Adjust to use new sdr cache library. Fix thread safety issues. General code cleanup. * ipmi-sel/src/ipmi-sel-wrappers.h, ipmi-sel/src/ipmi-sel-wrappers.c: Renamed to ipmi-sel-entry.h and ipmi-sel-entry.c. * libfreeipmi/include/freeipmi/spec/ipmi-system-software-id-spec.h, libfreeipmi/include/freeipmi/spec/ipmi-event-reading-type-code-spec.h: New files. * libfreeipmi/src/record-format/ipmi-sdr-record-format.c: Fix field names in some sdr records. * ipmi-sensors/src/: Adjust to use new sdr cache library. General code cleanup. Minor bug fixes. Minor output adjustments. * ipmi-sensors/src/ipmi-sensors-reading.h, ipmi-sensors/src/ipmi-sensors-reading.c: New files. * Check error return on asprintf globally. * ipmi-chassis/src/, bmc-info/src/: Use new tool fiid wrappers. * Adjust Makefile.am, configure.ac, documentation and code respectively for fall out from above changes. 2007-12-26 Albert Chu * libfreeipmi/src/spec/ipmi-sensor-types-spec.c: Fix typo. 2007-12-25 Albert Chu * common/doc/manpage-common-outofband-timeout.man: Fix option name typos. * Variety of code cleanup. 2007-12-24 Albert Chu * ipmi-sensors/: Support --groups option. * ipmi-sensors/: Fix corner case output w/ --list-groups. * common/src/string-utils.h, common/src/string-utils.c: Rename to ipmi-sdr-cache-utils.h and ipmi-sdr-cache-utils.c since no code other than the sdr cache common code uses the files. 2007-12-24 Albert Chu * ipmi-sel/: Fix several corner case outputs. 2007-12-24 Albert Chu * ipmi-sensors/src/ipmi-sensors-argp.c, ipmi-sensors/src/ipmi-sensors.h, ipmi-sel/src/ipmi-sel-argp.c, ipmi-sel/src/ipmi-sel.h: Cleanup arg parsing. 2007-12-23 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in, ipmimonitoring/ipmimonitoring.8.pre.in: Minor doc fixes/updates. * common/src/tool-common.c (ipmi_open): Check for "127.0.0.1" as well as "localhost". 2007-12-21 Albert Chu * common/doc/manpage-common-troubleshooting.man: Remove "Please try ..." in a few troubleshooting sections, since it makes no sense in some. 2007-12-21 Albert Chu * common/src/hostlist.c: Update to newest library to support suffixes on hostranges. 2007-12-19 Albert Chu * ipmipower/src/ipmipower_config.c (cmdline_parse): Fix cmdline parsing bug. 2007-12-19 Albert Chu * common/doc/manpage-common-troubleshooting.man: Tweak "password verification timeout" troubleshooting. 2007-12-18 Albert Chu * freeipmi.spec.in: Use %{version} instead of @VERSION@. 2007-12-14 Albert Chu * freeipmi.spec.in: Fix for libfreeipmi reorg. 2007-12-14 Albert Chu Major code reorganization and code cleanup from branch libfreeipmi_rearch_branch. * configure.ac: Require automake 1.9, support long filenames. * config/: New directory. Move .m4 files in this directory. * autogen.sh, configure.ac: Update for new config directory. * common/src/ipmi-sensor-api.c (system_software_type_desc): Removed unused array of strings. * common/src/ipmi-sensor-api.c: Add debugging via debug parameter. Use internal wrapper functions rather than library wrapper functions. * ipmi-sensors/: Adjust code for sensor-api change. * pef-config/: Remove linking to libsensor.la. * configure.ac, freeipmi.spec.in, common/src/err-wrappers.h, common/src/fiid-wrappers.h, common/src/udm-err-wrappers.h, common/src/udm-fiid-wrappers.h: Remove --enable-syslog support. * common/src/err-wrappers.h, common/src/fiid-wrappers.h, common/src/udm-err-wrappers.h, common/src/udm-fiid-wrappers.h: Update error logging routines with more details. Add additional error logging routines. Fix several logging bugs. Remove unused wrappers. * libfreeipmi/src/ipmi-kcs-aci.c, libfreeipmi/src/ipmi-openipmi-api.c, libfreeipmi/src/ipmi-ssif-api.c: Use error logging routines. * libfreeipmi/include/freeipmi/ipmi-locate.h, libfreeipmi/src/ipmi-locate.c, libfreeipmi/src/ipmi-locate-acpi-spmi.c, libfreeipmi/src/ipmi-locate-defaults.c, libfreeipmi/src/ipmi-locate-dmidecode.c, libfreeipmi/src/ipmi-locate-pci.c, libfreeipmi/src/ipmi-locate-smbios.c: Re-work locate API with error code returns. Use new error logging routines appropriately. * bmc-watchdog/src/, ipmi-locate/src/, libfreeipmi/src/udm/: Re-work to use new locate API. * libfreeipmi/src/ipmi-semaphores.h, libfreeipmi/src/ipmi-semaphores.c: Remove unused code. Re-work for better erorr reporting/logging. * libfreeipmi/include/freeipmi/ipmi-smic-api.h, libfreeipmi/src/ipmi-smic-api.c: Removed files. * libfreeipmi/: Adjust remaining code for removal of smic api. * configure.ac: Update libfreeipmi version. * ipmi-sel/src/ipmi-sel-wrapper.c: Use fiid wrappers appropriately. * bmc-info/src/bmc-info.c: Fix code logic to remove mem-leaks. * common/src/config-util.h, common/src/config-util.c: Renamed to config-utils.h and config-utils.c for consistency. * ipmi-sensors/src/ipmi-sensors-util.h, ipmi-sensors/src/ipmi-sensors-util.c: Removed files. Move code into other respective files. * ipmiping/src/ipmiping.c (_fiid_obj_get), rmcpping/src/rmcpping.c (_fiid_obj_get): Fix error message output. * ipmi-chassis/src/ipmi-chassis.c: Add _FIID_OBJ_DESTROY macro. * libfreeipmi/include/freeipmi/ipmi-ipmb-interface.h: Renamed to ipmi-ipmb-lun-spec.h. * libfreeipmi/include/freeipmi/ipmi-kcs-api.h, libfreeipmi/include/freeipmi/ipmi-ssif-api.h, libfreeipmi/include/ipmi-openipmi-api.h, libfreeipmi/src/ipmi-kcs-api.c, libfreeipmi/src/ipmi-ssif-api.c, libfreeipmi/src/ipmi-openipmi-api.c, libfreeipmi/src/udm/ipmi-kcs-api-udm.c, libfreeipmi/src/udm/ipmi-kcs-api-udm.h, libfreeipmi/src/udm/ipmi-ssif-api-udm.c, libfreeipmi/src/udm/ipmi-ssif-api-udm.h, libfreeipmi/src/udm/ipmi-openipmi-api-udm.c, libfreeipmi/src/udm/ipmi-openipmi-api-udm.h: Renamed to ipmi-kcs-driver.h, ipmi-ssif-driver.h, ipmi-openipmi-driver.h, ipmi-kcs-driver.c, ipmi-ssif-driver.c, ipmi-openipmi-driver.c, ipmi-kcs-driver-udm.c, ipmi-kcs-driver-udm.h, ipmi-ssif-driver-udm.c, ipmi-ssif-driver-udm.h, ipmi-openipmi-driver-udm.c, ipmi-openipmi-driver-udm.h respectively. * libfreeipmi/include/freeipmi/ipmi-lan.h: Move everything into ipmi-lan-interface.h. Remove file. * libfreeipmi/src/ipmi-lan.c: Move everything into ipmi-lan-interface.c. Remove file. * libfreeipmi/include/freeipmi/ipmi-rmcpplus.h: Move everything into ipmi-rmcpplus-interface.h. Remove file. * libfreeipmi/src/ipmi-rmcpplus.c: Move everything into ipmi-rmcpplus-interface.c. Remove file. * libfreeipmi/src/ipmi-kcs.c, libfreeipmi/include/freeipmi/ipmi-kcs.h: Rename to ipmi-kcs-interface.c and ipmi-kcs-interface.h respectively. * libfreeipmi/src/ipmi-rmcpplus-debug.c: Rename to libfreeipmi/src/ipmi-debug-rmcpplus.c. * libfreeipmi/src/ipmi-debug-lan.c, libfreeipmi/src/ipmi-debug-rmcp.c, libfreeipmi/src/ipmi-debug-common.c, libfreeipmi/src/ipmi-debug-common.h: New files, split off from ipmi-debug.c. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-utils.h: New file, split off from ipmi-cipher-suite-spec.h. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-utils.c: New file, split off from ipmi-cipher-suite-spec.c. * libfreeipmi/include/freeipmi/ipmi-sel-record-types.h (IPMI_SEL_RECORD_TYPE_IS_EVENT, IPMI_SEL_RECORD_TYPE_IS_TIMESTAMPED_OEM, IPMI_SEL_RECORD_TYPE_IS_NON_TIMESTAMPED_OEM): Add new macros. * libfreeipmi/include/freeipmi/ipmi-sel-record-types.h, libfreeipmi/src/ipmi-sel-record-types.c (ipmi_get_sel_record_type): Removed function. * ipmi-sel/src/ipmi-sel-wrapper.c (_get_sel_record_type): New function. * ipm-sel/src/ipmi-sel-wrapper.c (_get_sel_system_event_record): Use _get_sel_record_type. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h, libfreeipmi/include/freeipmi/ipmi-sel-record-types.h, libfreeipmi/include/freeipmi/ipmi-sdr-record-types.h, libfreeipmi/src/ipmi-cipher-suite-spec.c, libfreeipmi/src/ipmi-sel-record-format.c, libfreeipmi/src/ipmi-sdr-record-format.c: Rename to ipmi-cipher-suite-record-format.h, ipmi-sel-record-format.h, ipmi-sdr-record-format.h, ipmi-cipher-suite-record-format.c, ipmi-sel-record-format.c, ipmi-sdr-record-format.c respectively. * libfreeipmi/include/freeipmi/ipmi-error.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r, ipmi_strerror_cmd_r, rmcpplus_status_strerror_r): Renamed to ipmi_completion_code_strerror_r, ipmi_completion_code_strerror_cmd_r, and ipmi_rmcpplus_status_strerror_r respectively. * libfreeipmi/include/freeipmi/rmcp-interface.h, libfreeipmi/include/freeipmi/rmcp-cmds.h, libfreeipmi/src/rmcp-interface.c, libfreeipmi/src/rmcp-cmds.c: New files, split off from rmcp.h and rmcp.c. * libfreeipmi/include/freeipmi/rmcp.h, libfreeipmi/src/rmcp.c: Remove files. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband, ipmi_open_outofband_2_0): Remove pointless driver type argument. * libfreeipmi/: Rework UDM interface to take ipmi_ctx_t instead of ipmi_device_t which didn't make any sense. * common/src/err-wrappers.h, common/src/fiid-wrappers.h, common/src/udm-err-wrappers.h, common/src/udm-fiid-wrappers.h: Renamed to ipmi-err-wrappers.h, ipmi-fiid-wrappers.h, ipmi-err-wrappers-udm.h, and ipmi-fiid-wrappers.h respectively. Moved into libfreeipmi/ appropriately. * ipmi-sensors/src/: Rename files for consistency to code organization in other tools. * libfreeipmi/src/driver/, libfreeipmi/src/locate/, libfreeipmi/src/debug/: New directories. Move respective sub-library code into those directories. * libfreeipmi/include/driver/, libfreeipmi/include/locate/, libfreeipmi/include/debug/: New directories. Move respective sub-library headers into those directories. * libfreeipmi/src/ipmi-common.h, libfreeipmi/src/ipmi-common.c: Removed files. Move some functionality into ipmi-debug-common.h and ipmi-debug-common.c. Use some library functionality in common/src/ in other circumstances. * libfreeipmi/src/udm/, libfreeipmi/include/udm/: Rename to 'api' instead of non-meaningful 'udm'. * libfreeipmi/include/freeipmi/api/api.h: Removed file. Moved includes to freeipmi.h. * libfreeipmi/include/freeipmi/ipmi-crypt.h: Move to libfreeipmi/src. * libfreeipmi/include/freeipmi/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_ipv4_address_string2int, ipmi_mac_address_string2int): Move to common/src/config-util.h and common/src/config-util.c. Rename to config_ipv4_address_string2int and config_mac_address_string2int respectively. * libfreeipmi/: Rename 'utils' files to 'util' files. * common/src/common-utils.h, common/src/common-utils.c: Rename to string-utils.h and string-utils.c respectively. * common/src/md2.h, common/src/md2.c, common/src/md5.c, common/src/md5.h: Move to libfreeipmi/src and rename to ipmi-md2.h, ipmi-md2.c, ipmi-md5.h, ipmi-md5.c respectively. * libfreeipmi/include/freeipmi/ipmi-error.h: Rename to libfreeipmi/include/freeipmi/ipmi-error-util.h. * common/src/xmalloc.h, common/src/xmalloc.c: Remove files. Most code uses normal malloc instead of xmalloc. * ipmiconsole/src/libipmiconsole/cbuf.h, ipmiconsole/src/libipmiconsole/cbuf.c: Renamed to scbuf.h and scbuf.c since it different than cbuf. * common/src: Remove separate libcbuf library. Put cbuf back into llnlcommon library. * common/src/cmdline-parse-common.h, common/src/cmdline-parse-common.c: Rename to common/src/tool-cmdline-common.h and common/src/tool-cmdline-common.c. Merge into toolcommon utility library. * common/src/ipmi-sdr-cache.c: Remove bit-ops library need. * common/src/config-util.c: Remove bit-ops library need. * common/src/bit-ops.h, common/src/bit-ops.c: Moved into libfreeipmi/src and renamed ipmi-bit-ops.h and ipmi-bit-ops.c. * common/src: Rename libllnlcommon to just libcommon. * libfreeipmi/src/util/: New directories. Move respective sub-library code into those directories. * libfreeipmi/include/util/: New directories. Move respective sub-library headers into those directories. * common/src/ipmi-sensor-api.h, common/src/ipmi-sensor-api.c: Renamed to ipmi-sensor-common.h and ipmi-sensor-common.c. * libfreeipmi/src/api/ipmi-lan-session-util.h, libfreipmi/src/api/ipmi-lan-session-util.c: Renamed to ipmi-lan-session-common.h ipmi-lan-session-common.c. * common/src/: Merge libpstdout into libhostrange. * libfreeipmi/src/libcommon/: New directory. Move respective sub-library headers into those directories. * libfreeipmi/include/interface/, libfreeipmi/src/interface/: New directories. Move respective sub-library headers into those directories. * libfreeipmi/include/freeipmi/ipmi-fru-information-storage-definition.h: Split into ipmi-fru-information-record-format.h, ipmi-fru-chassis-types-spec.h, and ipmi-fru-language-codes-spec.h. * libfreeipmi/src/ipmi-fru-information-storage-definition.c: Split into ipmi-fru-information-record-format.c, ipmi-fru-chassis-types-spec.c, and ipmi-fru-language-codes-spec.c. * libfreeipmi/include/freeipmi/record-format/, libfreeipmi/src/record-format/: New directories. Move respective sub-library code into those directories. * libfreeipmi/include/freeipmi/ipmi-sensor-and-event-code-tables.h: Renamed to libfreeipmi/include/freeipmi/util/ipmi-sensor-and-event-code-tables-util.h. * libfreeipmi/src/ipmi-sensor-and-event-code-tables.c: Renamed to libfreeipmi/src/util/ipmi-sensor-and-event-code-tables-util.c. * libfreeipmi/include/freeipmi/spec/, libfreeipmi/src/spec/: New directories. Move respective sub-library code into those directories. * libfreeipmi/include/freeipmi/cmds/, libfreeipmi/src/cmds/: New directories. Move respective sub-library code into those directories. * Adjust remaining code and Makefiles for file name changes, new files, new functions, function name changes, and removals. * Various minor fixes and code cleanup. 2007-12-05 Albert Chu * Tagged Release-0_5_0_base. * Branched Release-0_5_0_branch. 2007-12-02 Albert Chu * INSTALL: Overwrite ancient copy with GNU generic copy. 2007-11-30 Albert Chu * configure.ac: Prepare for beta release. * Tagged Release-0_5_0_beta3. 2007-11-28 Albert Chu * libfreeipmi/src/ipmi-ssif-api.c, libfreeipmi/src/ipmi-kcs-api.c: Fix logic bugs. 2007-11-27 Albert Chu * freeipmi.spec.in: Fix changelog typo. * doc/freeipmi-coding.txt: Various fixes. 2007-11-24 Albert Chu * common/doc/manpage-common-outofband-hostname-hostranged.man: Fix english. 2007-11-24 Albert Chu * libfreeipmi/src/ipmi-kcs-api.c (_ipmi_kcs_cmd_write), libfreeipmi/src/ipmi-ssif-api.c (_ipmi_ssif_cmd_write): Fix error handling mem-leak corner case. * configure.ac: Prepare for beta release. * Tagged Release-0_5_0_beta2. 2007-11-24 Dmitry Frolov * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c: Fix FreeBSD port compile bug. 2007-11-22 Albert Chu * common/src/ipmi-sdr-cache.c, common/src/ipmi-sdr-cache-reads.c, common/src/ipmi-sdr-cache-writes.c: Remove unneeded includes. 2007-11-21 Albert Chu * libfreeipmi/src/ipmi-openipmi-api.c: Adjust INTERNAL errors to SYSTEM errors appropriately. * libfreeipmi/src/ipmi-ssif-api.c, libfreeipmi/src/ipmi-kcs-api.c: General code cleanup/fixes. 2007-11-20 Albert Chu * doc/freeipmi-coding.txt: Fix ipmi-pef typo. 2007-11-20 Albert Chu * configure.ac: Prepare for beta release. * Tagged Release-0_5_0_beta1. 2007-11-20 Dmitry Frolov * libfreeipmi/src/ipmi-kcs-api.c (ipmi_kcs_ctx_io_init): Fix FreeBSD port bug. 2007-11-19 Albert Chu AUTHORS: Add Phil Knirsch. NEWS: Various tweaks. 2007-11-19 Albert Chu * freeipmi.spec.in: Remove ipmimonitoring subpackage. Move into core package. * libfreeipmi/include/freeipmi/ipmi-ssif-api.h: Add IPMI_SSIF_CTX_ERR_SYSTEM_ERROR error code. * libfreeipmi/src/ipmi-kcs-api.c, libfreeipmi/src/ipmi-ssif-api.c: Adjust INTERNAL errors to SYSTEM errors appropriately. * configure.ac: Prepare for beta release. * NEWS: Update * Tagged Release-0_5_0_beta0. 2007-11-19 Phil Knirsch * bmc-watchdog/freeipmi-bmc-watchdog.sysconfig: Added missing -d command option. * bmc-config/src/bmc-config-argp.c (bmc_config_args_validate), pef-config/src/pef-config-argp.c (pef_config_args_validate): Fix incorrect use of open with O_CREATE and without mode. * ipmidetect/freeipmi-ipmidetectd.init: Do not start by default after installation. Added a Short Description and made the Description more meaningful. Use correct lock file in /var/lock/subsys/. * freeipmi.spec: Use a valid Fedora license. Fix the groups for all [sub]packages. Add necessary prereqs where necessary (due to scripts). Limit build to ix86, x86_64, ia64 and alpha (due to iopl missing on other archs). Disable build of static libs (Fedora guideline). Use absolute path for ldconfig. Add /sbin/ldconfig post and postun scripts due to libs. Move all development libs to the -devel package ( libipmimonitoring.so). 2007-11-02 Albert Chu * doc/freeipmi-faq.texi: Minor updates. 2007-11-02 Albert Chu * configure.ac: Prepare for alpha release. * NEWS: Update * Tagged Release-0_5_0_alpha0. 2007-10-18 Albert Chu * Fix copyright on LLNL created tools/projects. 2007-10-17 Albert Chu * Fix copyright dates on LLNL created tools/projects. * DISCLAIMER.bmc-watchdog, DISCLAIMER.ipmipower, DISCLAIMER.ipmiping, DISCLAIMER.rmcpping, DISCLAIMER.ipmiconsole, DISCLAIMER.ipmimonitoring, DISCLAIMER.pstdout, DISCLAIMER.ipmidetect, DISCLAIMER.ipmi-fru: Update with new DISCLAIMER. * DISCLAIMER.bmc-watchdog.UC, DISCLAIMER.ipmipower.UC, DISCLAIMER.ipmiping.UC, DISCLAIMER.rmcpping.UC, DISCLAIMER.ipmiconsole.UC, DISCLAIMER.ipmimonitoring.UC, DISCLAIMER.pstdout.UC, DISCLAIMER.ipmidetect.UC, DISCLAIMER.ipmi-fru.UC: New files of old DISCLAIMERs. * Makefile.am, freeipmi.spec.in: Update with new DISCLAIMER files. * Fix FSF address in LLNL copyrighted files. 2007-10-15 Dmitry Frolov * ipmimonitoring/src/libipmimonitoring/Makefile.am, ipmimonitoring/src/ipmimonitoring/Makefile.am, ipmidetect/src/libipmidetect/Makefile.am, ipmidetect/src/ipmidetectd/Makefile.am, ipmidetect/src/ipmidetect/Makefile.am: Fix FreeBSD port issues. 2007-10-10 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in: Added verbose and very verbose option information. * ipmi-sel/ipmi-sel.8.pre.in: Add info on SEL default output. 2007-10-09 Albert Chu * ipmi-sensors/, ipmi-sel/, ipmi-fru/: Fix corner case. There is no need to open an IPMI connection when the user only wants to flush a cache. * libfreeipmi/src/ipmi-sdr-record-types.c, common/src/ipmi-sdr-cache.h: Fix oem data length bug. Max length of OEM data in a OEM record is 56 bytes (448 bits) not 55 bytes (440 bits). * common/src/ipmi-sdr-cache-reads.c (_get_oem_data_count): Fix potential corner case. * common/src/ipmi-sdr-cache-reads.c (_get_oem_data, _read_sdr_oem_record): Remove improper cast which can cause corruption. * common/src/ipmi-sdr-cache.c: Don't use hard coded buffer length values, use appropriate macros. * common/src/ipmi-sdr-cache.c, common/src/ipmi-sdr-cache.h: Do not specify max length as 17 for sensor names and devices names, max length is 16 and an extra +1 is used for the string nul character. 2007-10-08 Albert Chu * common/src/ipmi-sensor-api.c (_get_threshold_message_list, _get_generic_event_message_list, _get_event_message_list): Catch strdup/malloc errors appropriately. * common/src/ipmi-sensor-api.h common/src/ipmi-sensor-api.c (sensor_reading_cleanup): New function. * ipmi-sensors/src/ipmi-sensors.c (display_group_sensors, display_sensor_list, display_sensors): Appropriately free memory after use. * common/src/pstdout.c (_pstdout_print): Fix potential vsnprintf corner case. 2007-10-04 Albert Chu * common/src/ipmi-sdr-cache.c (_fread_record): Fix free corruption bug. * common/src/ipmi-sdr-cache.h, common/src/ipmi-sdr-cache.c: Add SDR_CACHE_CTX_ERR_CACHE_EMPTY error code. * common/src/ipmi-sdr-cache.c (sdr_cache_load): Fix possible corner case. * ipmi-sensors/src/ipmi-sensors.c (display_group_sensors, display_sensor_list, display_sensors): Remove unused code. 2007-10-02 Albert Chu * ipmidetect/src/ipmidetect/ipmidetect.c (_cmdline_parse): Fix bug in command line option parsing. 2007-10-01 Albert Chu * freeipmi.spec.in: Add daemon scripts for ipmidetectd. 2007-09-28 Albert Chu * bmc-config/, pef-config/, common/src/, libfreeipmi/srd/udm/: Minor bug fixes. 2007-09-27 Albert Chu * common/src/config-pef-conf-section.h, common/src/config-pef-conf-section.c: New files. * bmc-config/src/bmc-config-wrapper.h, bmc-config/src/bmc-config-wrapper.c: Remove files. * bmc-config/, pef-config/: Continued common code re-architecture and subsequent code cleanup. * libfreeipmi/: Change user_name and password parameters to char instead of uint8_t *. * ipmipower/, ipmiconsole/: Adjust for pointer signedness changes. 2007-09-26 Albert Chu * common/src/config-fiid.h, common/src/config-fiid.c: New files. * bmc-config/, pef-config/: Continued common code re-architecture and subsequent code cleanup. 2007-09-25 Albert Chu * bmc-config/, pef-config/: Continued common code re-architecture and subsequent code cleanup. 2007-09-24 Albert Chu * doc/freeipmi-coding.txt: Update. * common/src/config-checkout.h, common/src/config-checkout.c, common/src/config-commit.h, common/src/config-commit.c, common/src/config-diff.h, common/src/config-diff.c, common/src/config-parse.h, common/src/config-parse.c, common/src/config-section.h, common/src/config-section.c: New files. * bmc-config/, pef-config/: Continued common code re-architecture and subsequent code cleanup. Remove files obsoleted by new common code. 2007-09-23 Albert Chu * bmc-config/, pef-config/: Continued common code re-architecture and subsequent code cleanup. 2007-09-22 Albert Chu * common/src/config-common.h, common/src/config-comment.h, common/src/config-comment.c, common/src/config-util.h, common/src/config-util.c, common/src/config-validate.h, common/src/config-validate.c: New files. * common/src/format-text.h, common/src/format-text.c: Remove files. * bmc-config/, pef-config/: Use new common code. Various code cleanup. * bmc-config/: Rename numerous files for code consistency to other projects. 2007-09-20 Albert Chu * bmc-config/, pef-config/: Change -k keypair option to -e due to added IPMI 2.0 support. Add consistency to argp architecture. 2007-09-19 Albert Chu * pef-config/src/pef-config-commit.c: Fix keypair support. 2007-09-18 Albert Chu * pef-config/pef-config.8.pre.in: Fix incorrect --commit short option documentation (reported by Manu Sharma). * bmc-config/: Make --commit short option consistent to pef-config. 2007-09-17 Albert Chu * bmc-config/, pef-config/: Re-arch section comments again. Add serial section comments. * pef-config/: Support keypairs. * bmc-config/, pef-config/: General code cleanup to make code more similar to between tools for later code merging. * bmc-config/bmc-config.8.pre.in, pef-config/pef-config.8.pre.in: Add note that commit keypairs will overwrite file keypairs. 2007-09-15 Albert Chu * NEWS: Update. 2007-09-11 Albert Chu * libfreeipmi/, common/src/, ipmiconsole/: Support new ignore SOL port workaround. 2007-09-11 Albert Chu * common/src/format-text.h, common/src/format-text.c, bmc-config/: Re-do text formatting for section comments. * freeipmi.spec.in: Add texinfo buildrequires. 2007-09-07 Albert Chu * ipmiconsole/ipmiconsole.8.pre.in: Fix text. * common/src/format-text.h, common/src/format-text.c: New files. * bmc-config/: Begin supporting comments in the checkout. Update bmc-config manpage. 2007-09-06 Albert Chu * bmc-config/src/bmc-config-sections.h, pef-config/src/pef-config-sections.h: Add section_name parameter to comment callback. * ipmi-sensors, ipmi-sel, ipmi-fru: Fix seg-fault possibility corner case. * ipmipower/: Remove debug statement. Output debug command in prompt menus. * common/src/cmdline-parse-common.h (parse_authentication_type): Fix parsing bug. 2007-09-05 Albert Chu * ipmiconsole/src/libipmiconsole/: Move behavior_flags into engine_config. * bmc-config/src/bmc-config-commit.c (bmc_commit_file): Output invalid commit error message by default, not in verbose mode. * bmc-config/, configure.ac, freeipmi.spec.in: Remove bmc-autoconfig. * Update FSF address throughout. Make address consistent throughout for easier search/replace later. * Various manpage and documentation updates. * bmc-config/src/bmc-user-sections.c (bmc_user_section_get): Comment out username for user id 1, since that typically isn't modifiable. * bmc-config/, pef-config/: Re-architect sections for support of section comments. 2007-09-04 Albert Chu * ipmiconsole/src/libipmiconsole/: Move workaround_flags from protocol_config to ipmi_config. Move LOCK_MEMORY from a security flags to an engine_flag. Rename security flags to behavior flags. * ipmiconsole/ipmiconsole.8.pre.in: Add encryption documentation info on the cipher suite id. * bmc-config/bmc-config.8.pre.in: Re-order documentation. 2007-09-01 Albert Chu * ipmiconsole/src/libipmiconsole/: Adjust callback parameters for more generic use. * configure.ac: Check for threads support in gcrypt. 2007-08-31 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit_block): Fix fd leak corner case. 2007-08-30 Albert Chu * libfreeipmi/, ipmiconsole/, common/doc: Change ASUS ipmi 2.0 workaround to be a more generic "ignore sol payload size". * Fix consistency issue with macro names between libraries. * Various manpage groff/text formatting fixes. * common/doc/manpage-common-workaround-outofband-2-0-only-text.man: Rename to manpage-common-workaround-sol-only-text.man due to usage. * ipmiconsole/ipmiconsole.8.pre.in: Fix for file name change. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (main): Tear down SOL sessions cleanly by default. * ipmiconsole/src/libipmiconsole/ipmiconsole_garbage_collector.c (ipmiconsole_garbage_collector): Fix destructor corner case. 2007-08-29 Albert Chu * ipmiconsole/src/libipmiconsole/: Begin support errnum locking and required retrieval of error code. 2007-08-28 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.h, ipmiconsole/src/libipmiconsole/ipmiconsole_ctx.c: New files. * ipmiconsole/src/libipmiconsole: Continue re-factoring re-organization. Support ipmiconsole_engine_config structure. Support non-blocking callbacks. * General code cleanup throughout. 2007-08-24 Albert Chu * Document motherboard P5MT-R Asus 'authcap' workarounds. * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_process_ctxs): Fix new console port corner case. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.h: For consistency with remaining code, rename "context" to "ctx" as needed. * ipmiconsole/src/libipmiconsole/, ipmimonitoring/src/libipmimonitoring/: Adjust remaining text appropriately for name change. * ipmiconsole/src/libipmiconsole/ipmiconsole.h: Change IPMICONSOLE_CTX_STATUS_ERROR to IPMICONSOLE_CTX_STATUS_SOL_ERROR and create new IPMICONSOLE_CTX_STATUS_ERROR to indicate status retrieval error. * ipmiconsole/src/libipmiconsole/ipmiconsole.h: Change context status from defines to an enumeration. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_ctx_status): Adjust API to return a context enumeration instead of an integer. * ipmiconsole/src/libipmiconsole/: Adjust remaining code appropriately for above changes. * libfreeipmi/: Support timeout mechanisms for KCS and OpenIPMI drivers so tools don't hang. * common/src/udm-err-wrappers.h: Add udm errors for kcs and openipmi system errors. * ipmiconsole/src/libipmiconsole/: Re-factor code for better data management. 2007-08-23 Albert Chu * ipmiconsole/src/ipmiconsole/ipmiconsole_config.c: Add back 'c' option for backwards compatability. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (main): Fix debug output typo. * ipmiconsole/src/libipmiconsole/: General code cleanup. * Globally change "usercap" workaround to "authcap" to work around all authentication capabilities checks. * Fix RHEL5 compiler warnings. 2007-08-22 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_garbage_collector.h, ipmiconsole/src/libipmiconsole/ipmiconsole_garbage_collector.c: New files. * ipmiconsole/src/libipmiconsole/: Begin changing semantics of ipmiconsole_ctx_destroy() and handling of file descriptors. Now ipmiconsole_ctx_destroy() will kill user managed file descriptors. Support garbage collector thread and move context destruction from API land to engine land. Minor bug fixes and code cleanup. * tag post_ipmiconsole_ctx_destroy_semantic_change * ipmiconsole/src/libipmiconsole/ipmiconsole_util.h, ipmiconsole/src/libipmiconsole/ipmiconsole_util.c: New files. * ipmiconsole/src/libipmiconsole/: General code cleanup using new ipmiconsole_set_closeonexec util function. 2007-08-21 Albert Chu * libfreeipmi/include/freeipmi/fiid.h: Add more comments. * ipmiconsole/src/libipmiconsole/: Add comments. Fix various issues including file descriptor POLLNVAL corner case and potential SIGPIPE corner case. General code cleanup. * tag pre_ipmiconsole_ctx_destroy_semantic_change 2007-08-20 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit, ipmiconsole_ctx_create): Rename IPMICONSOLE_CONTEXT_STATUS_NONE to IPMICONSOLE_CONTEXT_STATUS_NOT_SUBMITTED. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit): Split back into ipmiconsole_engine_submit and ipmiconsole_engine_submit_block. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit, ipmiconsole_engine_submit_block): Collapse IPMICONSOLE_ERR_CTX_ALREADY_SUBMITTED into IPMICONSOLE_ERR_CTX_IS_SUBMITTED. * ipmiconsole/: Change IPMICONSOLE_ERR_INTERNAL_BMC_SETTINGS_INVALID to IPMICONSOLE_ERR_BMC_IMPLEMENTATION. Adjust some error code return values accordingly. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c: Re-order error codes. * ipmiconsole/src/libipmiconsole/: Support new engine flag IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED. 2007-08-17 Albert Chu * ipmiconsole/: Fix documentation/comments. Continued library fixes. Support IPMICONSOLE_ENGINE_CLOSE_FD flag. Support new IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES error code. Set close-on-exec on all file descriptors. Fix race conditions and logic bugs. 2007-08-16 Albert Chu * common/doc/manpage-common-troubleshooting.man: Clean up text. * ipmimonitoring/ipmimonitoring.8.pre.in: Add ipmimonitoring specific troubleshooting. * ipmiconsole/src/libipmiconsole/: Significant code cleanup, race condition fixes, scalability fixes, logic fixes, bug fixes. 2007-08-15 Albert Chu * ipmiconsole/src/libipmiconsole/: Re-do enginecomm code to be specific to submission blocking. Re-work logic to close file descriptors after blocking is completed to save two file descriptors per context. * Various manpage updates. * common/doc/manpage-common-troubleshooting.man: New file. * Update various manpages with troubleshooting information. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit): Add back blocking flag parameter. * ipmiconsole/: Adjust remaining code appropriately. 2007-08-14 Albert Chu * bmc-config/: Support no checkout for sections. Do not checkout section pef_conf by default. * pef-config/: Support same architecture as bmc-config for consistency. 2007-08-14 Albert Chu * bmc-config/src/bmc-config-sections.c (bmc_config_section_set_value): Add error messages. * bmc-config/src/: Re-add pef commit/diff support for legacy config files. Do not checkout pef config by default. 2007-08-14 Anand Babu * bmc-autoconfig.8.in: updated and moved from bmc-autoconfig.8. 2007-08-13 Albert Chu * common/doc/: Fix potential pre-processor bugs. * ipmiconsole/, libfreeipmi/, ipmimonitoring, common/: Add ASUS IPMI 2.0 workarounds. * ipmiconsole/ipmiconsole.8.in: Add some troubleshooting notes. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.h: Fix comments. * common/src/tool-common.c (parse_kg): Support odd-lengthed hex codes. 2007-08-11 Albert Chu * configure.ac: Up lib versions appropriately. 2007-08-10 Albert Chu * libfreeipmi/src/udm: Re-do UDM workarounds to be generic, not specific to lan, lan 2.0, or inband. * common/: Adjust for workaround flags change. * libfreeipmi/, ipmipower/, ipmiconsole/, ipmimonitoring/, common/: Support ASUS P5m2 workaround. 2007-08-10 Albert Chu * common/src/tool-common.h, common/src/tool-common.c (check_kg_len): New function. * common/src/cmdline-parse-common.c, ipmipower/, ipmiconsole/, ipmimonitoring/: Use check_kg_len function appropriately for k_g len checks. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c: Remove SOL_NOT_RESPONDING error code and error message. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c, ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c: Rename IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS to IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS_SENT. Add new error code IPMICONSOLE_ERR_EXCESS_ERRORS_RECEIVED. * ipmiconsole/src/ipmiconsole.c (main): Support more error codes under clean output conditions. 2007-08-09 Albert Chu * ipmiconsole/src/ipmiconsole.h: Add additional comments. * common/src/tool-common.c (parse_kg): Check for proper inputted hex digits. Alter function to return k_g key length. * ipmipower/, bmc-config/, ipmiconsole/, common/src: Adjust tools for use of new parse_kg function and do not assume k_g key of length 20. * ipmipower/src/ipmipower_config.c (_cb_k_g): Fix configuration logic error. * ipmipower/src/ipmipower_prompt.c (_cmd_config): Fix config output display error. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit): Move blocking support from parameter to flag in protocol_config of the context. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_teardown), ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (ipmiconsole_engine_cleanup): Add option to not cleanup SOL sessions on engine teardown. * ipmiconsole/src/ipmiconsole/ipmiconsole.c: Adjust for API change. * ipmiconsole/src/libipmiconsole/: Rename BMC_SETTINGS_INVALID to INTERNAL_BMC_SETTINGS_INVALID. * doc/freeipmi-libraries.txt: Update. 2007-08-08 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (ipmiconsole_engine_cleanup): Skip majority of code if engine was never initialized. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (main): Cleanup use of ipmiconsole_ctx_destroy() so use is easier to understand. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c, ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c: Create new IPMICONSOLE_ERR_BMC_SETTINGS_INVALID error code. Replace several of the IPMICONSOLE_ERR_BMC_ERROR errnums with this new code. 2007-08-07 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit, ipmiconsole_engine_submit_block): Collapse both functions into one function, with a flag for blocking or non-blocking. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (main): Adjust for API change appropriately. * ipmiconsole/src/libipmiconsole/ipmiconsole.h (ipmiconsole_ctx_fd, ipmiconsole_engine_teardown): Fix comments. * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c, ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c: Creat new IPMICONSOLE_ERR_EXCESSIVE_RETRANSMISSIONS error code. Replace several of the IPMICONSOLE_ERR_BMC_ERROR errnums with this new code. 2007-08-07 Albert Chu * bmc-config/src/bmc-config-value.h, bmc-config/src/bmc-config-validate.c (number_range_one_byte_non_zero): New function. * bmc-config/src/bmc-sol-conf-section.c (bmc_sol_conf_section_get): Adjust character_accumulate_interval field to only support non-zero input. Zero is a reserved number. 2007-08-06 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c (__guaranteed_memset), common/src/secure.c (secure_memset), common/src/cmdline-parse-common.c (__secure_memset): Fix secure/guaranteed memset corner case. 2007-08-06 Albert Chu * ac_ipmi_monitoring_sdr_cache_dir.m4, ac_ipmi_monitoring_sensor_config_file.m4, ac_ipmidetect_config_file.m4, ac_ipmidetectd_config_file.m4, ac_ipmipower_config_file.m4: Replace hard-coded /etc and /var with ${sysconfdir} and ${localstatedir} respecively. Remove option to specify config files. Location of config files is now controlled through setting of --localstatedir and --sysconfidr. * ipmimonitoring/Makefile.am: Install w/ correct ./configure location. * freeipmi.spec.in: Use %{_localstatedir} instead of /var. * bmc-watchdog/Makefile.am: Fix distcheck. 2007-08-06 Albert Chu * ipmimonitoring/src/ipmimonitoring.c (cmdline_parse): Fix parsingcorner case. 2007-08-06 Albert Chu * ipmidetect/ipmidetect.conf.5.in, ipmidetect/ipmidetectd.8.in, ipmidetect/ipmidetectd.conf.5.in, ac_ipmidetect_config_file.m4, ipmidetect/src/ipmidetect/ipmidetect.c: Fix inconsistency w/ "CONF_FILE" vs. "CONFIG_FILE_DEFAULT" leading to invalid manpages. 2007-08-02 Albert Chu * tagged post-udm-2-0-merge 2007-08-02 Albert Chu Merge from udm_ipmi_2_0_branch. Re-org UDM and add IPMI 2.0 device support to UDM. * common/src/udm-err-wrappers.h (__UDM_BAD_COMPLETION_CODE_TO_UDM_ERRNUM): Rename to UDM_BAD_COMPLETION_CODE_TO_UDM_ERRNUM. * common/src/udm-fiid-wrappers.h (UDM_FIID_OBJ_SET, UDM_FIID_OBJ_SET_CLEANUP, UDM_FIID_OBJ_GET_DATA_LEN, UDM_FIID_OBJ_GET_DATA_LEN_CLEANUP): New macros. * libfreeipmi/include/freeipmi/udm/freeipmi/udm/ipmi-kcs-api-udm.h, freeipmi/udm/ipmi-lan-interface-udm.h, freeipmi/udm/ipmi-openipmi-api-udm.h, freeipmi/udm/ipmi-ssif-api-udm.h: Moved files to libfreeipmi/src/udm. No longer distribute as part of libfreeipmi. * libfreeipmi/include/Makefile.am, libfreeipmi/src/udm/Makefile.am, libfreeipmi/include/udm/udm.h: Update with .h file move changes. * libfreeipmi/include/freeipmi/udm/ipmi-messaging-support-cmds-udm.h, libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_cmd_get_channel_authentication_capabilities_v20): New function. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h: Add new IPMI 2.0 UDM error codes. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband_2_0): New function. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c: Split off lan session code to new files. * libfreeipmi/src/udm/ipmi-lan-session-util.h, libfreeipmi/src/udm/ipmi-lan-session-util.c: New files. Support both IPMI 1.5 and IPMI 2.0 session code. Add session id and sequence number checking which was previously ignored. * libfreeipmi/src/udm/ipmi-udm-device.h: Update w/ IPMI 2.0 needs in device structure. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_udm_errmsg, _ipmi_outofband_free, ipmi_cmd, ipmi_cmd_raw): Add IPMI 2.0 support. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_2_0_cmd, ipmi_lan_2_0_cmd_raw): New functions. * libfreeipmi/src/udm/ipmi-udm.c (__guaranteed_memset): New function. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_device_destroy): Do guaranteed memset on destroy. * common/doc/argp-common-driver.man: New file. * common/doc/argp-common-inband.man: Split out driver option. * common/doc/argp-common-outofband.man, common/doc/argp-common-outofband-hostranged.man: Add K_g options. * common/doc/Makefile.am: Update appropriately for new files. * common/src/argp-common.c, common/src/argp-common.h: Update for IPMI 2.0 options. * common/src/tool-common.c (ipmi_device_open): Add IPMI 2.0 support. * bmc-config/, bmc-info/, ipmi-chassis/, ipmi-fru/, ipmi-sel/, ipmi-sensors/, pef-config/: Update manpages and command line option code. * ipmimonitoring/src/libipmimonitoring: Re-architect to use UDM and support IPMI 2.0. * ipmimonitoring/src/ipmimonitoring.c: Re-work as needed. Add Workaround Support * libfreeipmi/: Support workarounds for various vendor compliance issues. * common/src/udm-fiid-wrappers.h: Add new wrappers as needed. * common/doc/argp-common-workaround-flags.man, argp-common-workaround-heading-text.man, argp-common-workaround-inband-text.man, argp-common-workaround-outofband-text.man, argp-common-workaround-outofband-2-0-text.man: New files. * common/src/argp-common.h, common/src/argp-common.c: Support workaround flags. * common/src/argp-common.h, common/src/argp-common.c (parse_outofband_workaround_flags, parse_outofband_2_0_workaround_flags, parse_inband_workaround_flags): New functions. * bmc-config/, bmc-info/, ipmi-chassis/, ipmi-fru/, ipmi-sel/, ipmi-sensors/, pef-config/: Update manpages and command line option code. * ipmipower/, ipmiconsole/: Use common workaround parses in argp-common. * ipmimonitoring/: Add workaround support. * doc/Makefile.am: Updated appropriately. Unify code. * Adjust command line options between tools/programs to match more consistently. * Adjust error code macros and error messages between libraries to match more consistently. Argp * Use argp instead of getopt in ipmipower, ipmiconsole, and ipmimonitoring for consistency. Usage/help/documentation * Globally cleaned up usage output, help output, manpages, etc. Attempt to use more "common" manpages out of common/doc. Make descriptions more consistent across tools. Misc: * Support most debugging options by default, not in a debug-only build. * Globally remove IPMI_MAX_AUTHENTICATION_CODE_LENGTH. Use IPMI_1_5_MAX_PASSWORD_LENGTH and IPMI_2_0_MAX_PASSWORD_LENGTH as needed. * common/src/argp-common.h, common/src/argp-common.c: General cleanup to allow for more common code use. * bmc-watchdog/: Support OpenIPMI driver. * Globally try to make error messages in all libs and tools more useful. * common/src/argp-common.h, common/src/argp-common.c, common/doc/: Rename "argp" common to "cmdline-parse" common, since it is more generic that just argp. Adjust in rest of FreeIPMI appropriately. * General code cleanup throughout. 2007-08-02 Albert Chu * tagged pre-udm-2-0-merge 2007-08-02 Troy Telford * freeipmi.spec.in: Fixed SLES packaging issue. 2007-07-31 Albert Chu * freeipmi.spec.in: Put version into source path. 2007-07-27 Albert Chu * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (main, _cmdline_parse): Fix potential free() bug. * common/src/hostrange.c (pstdout_setup): Add assert. 2007-07-26 Albert Chu * common/src/ipmi-sdr-cache.c (sdr_cache_load): Fix corner case bug. * freeipmi.spec.in: Fix buildroot typo. 2007-07-18 Albert Chu * ipmi-chassis/ipmi-chassis.8.pre.in: Fix default priv level typo. * ipmi-sensors/ipmi-sensors.8.pre.in: Fix formatting typo. * ipmi-sel/ipmi-sel.8.pre.in: Fix examples. * ipmimonitoring/ipmimonitoring.8.in: Fix option instructions. * bmc-config/bmc-config.8.pre.in: Fix examples. 2007-07-17 Albert Chu * Various manpage typo fixes. 2007-07-13 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c: Remove duplicate error code definition. 2007-07-12 Albert Chu * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (main): Fix free bug. 2007-07-11 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_checks.c (ipmiconsole_check_outbound_sequence_number): Remove left over debugging. * ipmipower/ipmipower.conf.5.in: Update w/ forgotten options. * ipmiconsole/ipmiconsole.conf.5.in: Update w/ forgotten options. 2007-07-09 Dmitry Frolov * acx_pthread.m4, common/src/freeipmi-portability.h, ipmidetect/Makefile.am, ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_ipmi_communication.c: FreeBSD port fixes. * ac_ipmi_monitoring_sdr_cache_dir.m4: Fix typo. 2007-07-06 Albert Chu * ipmi-chassis/ipmi-chassis.8.pre.in, ipmi-chassis/src/ipmi-chassis-argp.c: Change -I option to -i. 2007-07-03 Albert Chu * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_cmd, ipmi_lan_cmd_raw): Fix return code bug. * libfreeipmi/src/udm/ipmi-udm.c, libfreeipmi/include/freeipmi/udm/ipmi-udm.h, common/src/udm-err-wrappers.h (__UDM_BAD_COMPLETION_CODE_TO_UDM_ERRNUM): Remove IPMI_ERR_BAD_COMPLETION_CODE_NODE_BUSY completion code. Replace with more generic IPMI_ERR_BMC_BUSY error code. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h (IPMI_CIPHER_SUITE_ID_SUPPORTED): Fix warning. 2007-07-02 Albert Chu * doc/freeipmi-faq.texi, doc/freeipmi-hostrange.txt: Update w/ some forgotten 0.4.0 stuff. 2007-07-02 Albert Chu * Tagged Release-0_4_0_base. * Branched Release-0_4_0_branch. 2007-07-02 Albert Chu * configure.ac: Update version for release. 2007-06-29 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (ipmiconsole_engine_setup): Fix bad debug output corner case. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_teardown_initiate): New function. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_poll_setup, _ipmiconsole_engine): Re-arch teardown to be quicker by initializing close_session prior to the processing of contexts. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c: Support console_engine_ctxs_notifier pipes. Allows for the engine poll() call to be "interrupted" so engine can react more quickly to calls from user space. 2007-06-28 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.h: Add/fix comments for clarification. * ipmiconsole/src/libipmiconsole: Add flag to close the user_fd within the library if it has never been retrieved by the user. * ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit, ipmiconsole_engine_submit_block, ipmiconsole_ctx_destroy): Fix locking corner cases and bugs. 2007-06-27 Albert Chu * ipmi-fru/: New project. * COPYING.ipmi-fru, DISCLAIMER.ipmi-fru: New files. * libfreeipmi/include/freeipmi/udm/ipmi-fru-inventory-device-cmds-udm.h libfreeipmi/include/freeipmi/ipmi-fru-inventory-device-cmds.h libfreeipmi/include/freeipmi/ipmi-fru-information-storage-definition.h libfreeipmi/src/udm/ipmi-fru-inventory-device-cmds-udm.c libfreeipmi/src/ipmi-fru-inventory-device-cmds.c libfreeipmi/src/ipmi-fru-information-storage-definition.c: New files. * configure.ac, Makefile.am, freeipmi.spec.in: Update appropriately for new projct and new files. * libfreeipmi/src/ipmi-error.c (ipmi_strerror_r), libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h: Add FRU completion codes/strings. 2007-06-27 Albert Chu * libfreeipmi/src/ipmi-lan.c, libfreeipmi/include/freeipmi/ipmi-lan.h (fill_lan_session_hdr): Rename inbound_sequence_number to session_sequence_number for consistency. * ipmidetect/ipmidetectd.8.in: Fix typos from manpage cut and paste. * ipmidetect/: Fix cut and paste typo in GPL release headers. 2007-06-26 Albert Chu * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_open_session): Call get authentication capabilities with configured privilege, not user. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_cmd_raw): Add forgotten permsgauth support. Move sequence number increments to cleanup section. 2007-06-25 Albert Chu * common/src/ipmi-sdr-cache-reads.c (GET_UINT_VALUE_BY_KEY, _get_uint_value_by_key): New macros/functions. * common/src/ipmi-sdr-cache-reads.c (sdr_cache_read_repository_info_timestamp): Read 32 bit fields w/ uint not int. 2007-06-20 Albert Chu * libfreeipmi/src/udm/: Remove unused obj_lan_msg_trlr from ipmi_device struct. Re-organize code to follow struct a bit better. * libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds-udm.h (ipmi_cmd_close_session): New function. * libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds-udm.h (ipmi_cmd_get_channel_authentication_capabilities, ipmi_cmd_get_session_challenge, ipmi_cmd_activate_session, ipmi_cmd_set_session_privilege_level): Re-work APIs to be consistent with rest of UDM library. * libfreeipmi/include/freeipmi/udm/ipmi-messaging-support-cmds-udm.h, libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_lan_open_session, ipmi_lan_close_session): Move to libfreeipmi/src/udm/ipmi-lan-interface-udm.c. Re-work to use modified new API in ipmi-messaging-support-cmds-udm.[ch]. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h (ipmi_open_inband, ipmi_open_outofband): Add missing parameter name. * Fix minor code comment typos. 2007-06-19 Albert Chu * freeipmi.spec.in: Follow on fixes from Phil Knirsch's. * various doc updates. * doc/freeipmi-libraries.txt: New file. * freeipmi.spec.in, doc/Makefile.am: Updated for new file. 2007-06-13 Albert Chu Merge in Fedora build requirements from Phil Knirsch * bmc-watchdog/freeipmi-bmc-watchdog.sysconfig: New file. * bmc-watchdog/freeipmi-bmc-watchdog.init, bmc-watchdog/: Adjust for new sysconfig file. * freeipmi.spec.in: Merge in Fedora build requirements. 2007-06-13 Albert Chu * freeipmi.spec.in: Remove readline-devel and guile-devel build requirements. * common/src/udm-err-wrappers.h (__OPENIPMI_SYSLOG): Fix typo. * common/src/freeipmi-portability.h: Add back portability macro. 2007-06-12 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c: Adjust UDM error messages. 2007-06-09 Albert Chu * pef-config/src/pef-config-map.h (sensor_type_string, sensor_type_number): Add forgotten function prototypes. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_errmsg): Remove error message possibility, should not be possible. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h: Add new error codes. * cmmon/src/udm-err-wrappers.h, libfreeipmi/src/udm/: Support new error codes. 2007-06-08 Tom Zimmerman * pef-config/: Add sensor names for input/output for sensor_type config. * libfreeipmi/include/freeipmi/ipmi-pef-and-alerting-cmds.h: Add event sensor type definitions. * pef-config/pef-config.8.pre.in: Updated appropriately. 2007-06-06 Albert Chu * libfreeipmi/include/freeipmi/fiid.h, libfreeipmi/src/fiid.c (fiid_iterator_destroy): Make void return function. * libfreeipmi/include/freeipmi/fiid.h, libfreeipmi/src/fiid.c: General code cleanup and commenting. 2007-06-05 Albert Chu * libfreeipmi/include/freeipmi/fiid.h, libfreeipmi/src/fiid.c (fiid_template_make, __fiid_template_make): Removed functions. * libfreeipmi/src/fiid.c (fiid_template_field_lookup): Fix parameter check bugs. * libfreeipmi/include/freeipmi/fiid.h, libfreeipmi/src/fiid.c (fiid_obj_destroy): Make void return function. * common/src/fiid-wrappers.h (FIID_OBJ_DESTROY, UDM_FIID_OBJ_DESTROY): Adjust appropriately for change. * common/src/fiid-wrappers.h (FIID_OBJ_DESTROY_NO_RETURN, UDM_FIID_OBJ_DESTROY_NO_RETURN): Remove functions, they are no longer necessary. * libfreeipmi/, pef-config/, ipmi-chassis/, ipmiconsole/, ipmimonitoring/, ipmiping/, rmcpping/: Adjust for macro and function changes. * libfreeipmi/include/freeipmi/fiid.h, libfreeipmi/src/fiid.c: General code cleanup and commenting. 2007-06-05 Albert Chu * libfreeipmi/include/freeipmi/ipmi-chassis-boot-options-param-spec.h: Renamed to libfreeipmi/include/freeipmi/ipmi-chassis-boot-options-parameter-spec.h. Adjusted with 2007-06-02 param -> parameter changes. * libfreeipmi/include/Makefile.am: Update appropriately for change. * libfreeipmi/include/freeipmi/freeipmi.h: Add ipmi-chassis-boot-options-parameter-spec.h. * libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/ipmi-chassis-cmds-udm.c: Change param -> parameter globally. * libfreeipmi/src/ipmi-chassis-cmds-udm.c: Remove use of ERR_EINVAL. Fix tabbing. * libfreeipmi/include/freeipmi/udm/ipmi-chassis-cmds-udm.h, libfreeipmi/include/freeipmi/udm/ipmi-chassis-cmds-udm.h (ipmi_cmd_chassis_identify): Fix API. Use fill_cmd_chassis_identify correctly. * libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_chassis_identify): Fix parameter check. * libfreeipmi/src/udm/ipmi-chassis-cmds-udm.c (ipmi_cmd_set_system_boot_options_boot_info_acknowledge, ipmi_cmd_set_system_boot_options_boot_flags): Add parameter checks. * libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_set_system_boot_options_boot_flags): Fix parentheses usage. Fix parameter setting order. * libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/udm/ipmi-chassis-cmds-udm.c: Fix includes. * ipmi-chassis/src/ipmi-chassis.h: Fix brace consistency. * ipmi-chassis/src/ipmi-chassis-argp.c: Fix help output. Fix --get-boot-flags option bug. Use common arg macros. Add --debug option. Add hostrange options. Fix some tabbing/spacing of code. Consistently use "if (" instead of "if(". Fix compiler warnings. * ipmi-chassis/src/ipmi-chassis.c: Replace use of UDM_FIID_OBJ_DESTROY_NO_RETURN with FIID_OBJ_DESTROY_NO_RETURN. Consistently use "if (" instead of "if(". * ipmi-chassis/src/ipmi-chassis.c (_FIID_OBJ_GET_BLOCK): Removed macro. * ipmi-chassis/src/ipmi-chassis.c (_FIID_OBJ_GET_WITH_RETURN_VALUE, _FIID_OBJ_GET): Use 'obj' intead of 'bytes'. Use correct strerror function. Remove unnecessary set rv = -1. * ipmi-chassis/src/ipmi-chassis.c (set_boot_flags): Cleanup variable declarations. * ipmi-chassis/src/ipmi-chassis.c (get_chassis_status, get_boot_flags): Fix spacing of output. * ipmi-chassis/src/ipmi-chassis.c: Fix incorrect display of ipmi_device_strerror messages. Remove checks for bad comp_code. Fix tabbling/spacing. General code cleanup. Output better error messages for all fiid_obj_create calls. Replace fprintf to stdout with printf. * ipmi-chassis/src/ipmi-chassis-argp.c (parse_opt): Fix invalid use of strtol. * ipmi-chassis/src/ipmi-chassis-argp.c (boot_flag_parse_opt, ipmi_chassis_argp_parse): Move initialization code from boot_flag_parse_opt to ipmi_chassis_argp_parse. * ipmi-chassis/src/ipmi-chassis.c (get_chassis_status): Don't output "none" if there is nothing to output. * ipmi-chassis/src/ipmi-chassis.c (set_boot_flags): Remove set in progress for now since no other IPMI tools currently use it. Fix cleanup logic. * ipmi-chassis/ipmi-chassis.8.pre.in: Use macros appropriately. * AUTHORS: Add Ragha. * libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r): Add get/set system boot options error code/strings. * ipmi-chassis/src/ipmi-chassis-argp.h, ipmi-chassis/src/ipmi-chassis-argp.c (ipmi_chassis_args_validate): New function. * ipmi-chassis/src/ipmi-chassis.c (main): Call ipmi_chassis_args_validate. * ipmi-chassis/src/ipmi-chassis-argp.c, ipmi-chassis/ipmi-chassis.8.pre.in: Change 'C' option to 'O' and 'B' to 'L' to not conflict with other options. * ipmi-chassis/src/ipmi-chassis.h: Remove cmd_set_capabilities, which isn't used. * ipmi-chassis/src/ipmi-chassis-argp.c (parse_opt), ipmi-chassis/src/ipmi-chassis.c (chassis_identify): Fix chassis identify usage. * ipmi-chassis/src/ipmi-chassis-argp.c, ipmi-chassis/ipmi-chassis.8.pre.in: Put periods on ends of help messages. * libfreeipmi/src/ipmi-chassis-cmds.c (tmpl_cmd_get_chassis_status_rs): Revert to old strings. * ipmi-chassis/src/ipmi-chassis.c (get_chassis_status): Use old strings. * libfreeipmi/src/ipmi-capabilities-cmds.c (tmpl_cmd_get_chassis_capabilities_rs): Revert to old strings. * ipmi-capabilities/src/ipmi-capabilities.c (get_capabilities_status): Use old strings. * ipmi-chassis/ipmi-chassis.8.pre.in, ipmi-chassis/src/ipmi-chassis-argp.c: Fix help info language. Fix help info ordering. Document missing options. Change 'list' option to -X option to 'list-supported-policies.' Exit when > 1 cmd is input, don't just return -1. Cleanup error messages. 2007-06-05 Raghavendra * ipmi-chassis/src/ipmi-chassis.c: Implemented Chassis Commands. * ipmi-chassis/src/ipmi-chassis.h: Updated for Chassis support. * libfreeipmi/include/freeipmi/ipmi-cmd-spec.h: Added new commands. * libfreeipmi/include/freeipmi/ipmi-chassis-cmds.h: Added Macros related to ipmi-chassis. * libfreeipmi/src/ipmi-chassis-cmds.c: Added Ipmi command templates related to ipmi-chassis. * libfreeipmi/src/udm/ipmi-chassis-cmds-udm.c: Added Library functions related to ipmi-chassis. * libfreeipmi/include/freeipmi/udm/ipmi-chassis-cmds-udm.h: Macros related to ipmi-chassis. * libfreeipmi/include/Makefile.am: Added an entry for freeipmi/ipmi-chassis-boot-options-param-spec.h. * libfreeipmi/include/freeipmi/ipmi-chassis-boot-options-param-spec.h: New file. 2007-06-04 Albert Chu * libfreeipmi/include/freeipmi/ipmi-error.h (IPMI_ERR_STR_MAX_LEN): Define with number rather than hex. 2007-06-02 Albert Chu Massive code cleanup. * configure.ac: Update lib versions for 0.4.0. * common/src/ipmi-common.h: Move portability related things to freeipmi-portability.h. * Globally re-adjust headers accordingly for above change. * Cleanup compile warnings. * common/src/freeipmi-portability.h, common/src/freeipmi-portability.c (freeipmi_error): Remove function, it and error() are no longer used. * common/src/freeipmi-portability.h: Remove libintl portability. Remove true/false/bool portability. Remove EBADMSG portability. Remove program_invocation_short_name portability. * ipmi-sel/, ipmi-raw/: Remove use of program_invocation_short_name. * bmc-config/: Replace use of true/false with 1/0. * configure.ac: Remove check for error(). * libfreeipmi/src/ipmi-common.h, libfreeipmi/src/ipmi-common.c: New files. * common/src/ipmi-common.h, common/src/ipmi-common.c: Move lib specific utility functions to libfreeipmi ipmi-common.[ch]. * common/src/ipmi-common.h, common/src/ipmi-common.c: Rename to tool-common.h and tool-common.c. * Readjust Makefiles and code appropriately for new files. * common/src/tool-common.h, common/src/tool-common.c (ipmi_device_open): New function. * bmc-config/, bmc-info/, ipmi-raw/, ipmi-sel/, ipmi-sensors/, pef-config/: Use new common function for device opening. * libfreeipmi/udm/ipmi-udm.c (ipmi_open_inband): Fix logic errors. * common/src/eliminate.h, common/src/eliminate.c: Renamed to hostrange.h and hostrange.c. * common/src/hostrange.h, common/src/hostrange.c (pstdout_setup): New function. * bmc-info/, ipmi-sel/, ipmi-sensors/, ipmimonitoring/, ipmi-raw/: Use new pstdout_setup common function for pstdout setup. * common/src/ipmi-sdr-cache.h, common/src/ipmi-sdr-cache.c (sdr_cache_create_and_load): New function. * ipmi-sel/, ipmi-sensors/: Use new common function. * libfreeipmi/include/freeipmi/ipmi-lan-param-spec.h, libfreeipmi/include/freeipmi/ipmi-pef-param-spec.h, libfreeipmi/include/freeipmi/ipmi-serial-modem-param-spec.h, libfreeipmi/include/freeipmi/ipmi-sol-param-spec.h: Renamed to libfreeipmi/include/freeipmi/ipmi-lan-parameter-spec.h, libfreeipmi/include/freeipmi/ipmi-pef-parameter-spec.h, libfreeipmi/include/freeipmi/ipmi-serial-modem-parameter-spec.h, libfreeipmi/include/freeipmi/ipmi-sol-parameter-spec.h respecitvely. * Globally rename fields/varaibles from "param" to "parameter" for naming consistency. * ipmi-chassis/: Pstdout-ized. 2007-06-01 Albert Chu * common/src/fiid-wrappers.h: Remove duplicate macros. * REDESIGN: Move notes into TODO. Remove file. * Various minor doc updates. * common/doc/argp-common-sdr-options.man: New file. * ipmi-sel/ipmi-sel.8.pre.in, ipmi-sensors/ipmi-sensors.8.pre.in: Use common sdr options. * common/src/arg-common.h, common/src/arg-common.c (sdr_parse_opt, init_sdr_cmd_args, free_sdr_cmd_args): New functions. * ipmi-sel/, ipmi-sensors/: Use new common SDR arg parsing. * Fix argp ordering in remaining tools. 2007-05-31 Albert Chu * tagged pre_freeipmi_udm_re_arch * Merge in freeipmi_udm_re_arch_final branch tag with UDM re-architecture with more detailed error code returns to the user. * tagged post_freeipmi_udm_re_arch 2007-05-29 Albert Chu * ipmiconsole/src/libipmiconsole/: Support new ipmiconsole_ctx_status function. 2007-05-29 Tom Zimmerman * pef-config/src/pef-config-alert-policy-table.c (pef_config_alert_policy_table_section_get): Fix instructions typo. 2007-05-24 Albert Chu * ipmiconsole/: Finish up some sun 2.0 workarounds. 2007-05-24 Albert Chu * ipmipower/: Begin work on sun20 workaround. * ipmiconsole/: Begin work on sun 2.0 workarounds. Support additional error outputs. 2007-05-23 Albert Chu * ipmipower/: Add 'endianbug' workaround for Sun machines. * common/src/ipmi-sdr-cache.c (_get_sdr_sensor_record): Fix SDR reservation bugs. * common/src/ipmi-sdr-cache.c (_get_sdr_generic_device_locator_record): Fix channel_number reading bug. 2007-05-22 Albert Chu * doc/freeipmi-hostrange.txt: Fix some typos. 2007-05-21 Albert Chu * pef-config/src/pef-config-sections.c (pef_config_sections_list_create): Re-order sections. * pef-config/: Various minor bug fixes. * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c (tmpl_cmd_set_pef_configuration_alert_policy_table_rq, fill_cmd_set_pef_configuration_parameter_alert_policy_table): Fix fill bugs. 2007-05-20 Albert Chu * doc/freeipmi-coding.txt: Update. * pef-config/src/pef-config-alert-policy-table.c (pef_config_alert_policy_table_section_get): Add lan channel number to help for channel number. * pef-config/src/pef-config-alert-policy-table.c: Fix diff callback bugs. * REDESIGN: Add notes for future. * pef-config/: Add Alert String support. 2007-05-19 Albert Chu * doc/freeipmi-coding.txt: Talk about bmc-config and ipmi-pef design considerations. * ipmi-pef/src/ipmi-pef-event-filter-table.c: Major code cleanup. * ipmi-pef/ipmi-pef.8.pre.in: Updated appropriately. * pef-config/: Converted from ipmi-pef. Update all build files and docs appropriately. * pef-config/src/pef-config-sections.c (pef_config_sections_list_create): Fix alert policy table bug. 2007-05-18 Albert Chu * ipmi-pef/: Fix incorrect naming of "policy number" for "entry number" globally. * ipmi-pef/src/ipmi-pef-alert-destination.c, ipmi-pef/src/ipmi-pef-alert-destination.h: Renamed to ipmi-pef/src/ipmi-pef-lan-alert-destination.c and ipmi-pef/src/ipmi-pef-lan-alert-destination.h. * ipmi-pef/: Change "alert_destinations" and "lan_alert_destination" in appropriate locations to clarification. * ipmi-pef/src/ipmi-pef-wrapper.h, ipmi-pef/src/ipmi-pef-wrapper.c (get_bmc_lan_conf_community_string, set_bmc_lan_conf_community_string, get_bmc_lan_conf_destination_type, set_bmc_lan_conf_destination_type, get_bmc_lan_conf_destination_addresses, set_bmc_lan_conf_destination_addresses, get_bmc_pef_conf_alert_policy_table, set_bmc_pef_conf_alert_policy_table, get_bmc_pef_conf_event_filter_table, set_bmc_pef_conf_event_filter_table): New functions. * libfreeipmi/: Reword "event_specific_alert_string_lookup" to "event_specific_alert_string" based on spec wording. * ipmi-pef/: Continued work to rearchitect into bmc-config like architecture. Add alert policy checkout sections. Add event filter table sections. Reword "event_specific_alert_string_lookup" to "event_specific_alert_string" everywhere. * ipmi-pef/src/ipmi-pef-validate.h, ipmi-pef/src/ipmi-pef-validate.c (number_range_four_bits, number_range_seven_bits, number_range_three_bits, number_range_two_bytes, filter_type_validate, event_severity_validate, policy_type_validate, alert_gateway_validate, alert_destination_type_validate): New functions. * bmc-config/src/bmc-config-validate.h, bmc-config/src/bmc-config-validate.c (number_range_two_bytes): New function. * bmc-config/src/bmc-sol-conf-section.c (port_validate): Use number_range_two_bytes function. * ipmi-pef/src/ipmi-pef-pef-conf-section.h, ipmi-pef/src/ipmi-pef-pef-conf-section.c: Transfer pef conf section from bmc-config. * ipmi-pef/src/ipmi-pef-wrapper.h, ipmi-pef/src/ipmi-pef-wrapper.c: Transfer pef wrapper functions from bmc-config. * bmc-config/src/bmc-config-argp.c (_create_sectionstr): Fix variable name. * tagged pre_ipmi_pef_major_rearch * bmc-config/: Remove pef related sections. * ipmi-pef/: Complete bmc-config style input/output. * tagged post_ipmi_pef_major_rearch 2007-05-17 Albert Chu * ipmi-pef/src/ipmi-pef-validate.h, ipmi-pef/src/ipmi-pef-validate.c: New files. * ipmi-pef/: Add initial community string and alert destination sectional support. * ipmi-pef/, bmc-config/: Various filename and function name changes for code and filename consistency between the two tools. 2007-05-17 Tom Zimmerman * common/src/bit-ops.h: Fix macro bug. * ipmi-pef/src/ipmi-pef-wrapper.c (get_lan_alert_destination): Fix buffer length bug. * libfreeipmi/src/ipmi-lan-cmds.c (fill_cmd_set_lan_configuration_parameters_destination_type, tmpl_cmd_set_lan_configuration_parameters_destination_type_rq, tmpl_cmd_get_lan_configuration_parameters_destination_type_rs): Fix template field ordering bug. 2007-05-17 Albert Chu * ipmi-pef/src/ipmi-pef-map.h, ipmi-pef/src/ipmi-pef-map.c, ipmi-pef/src/ipmi-pef-keys.h, ipmi-pef/src/ipmi-pef-common: New files. * ipmi-pef/: Code and makefiles adjusted for new headers and files. * ipmi-pef/src/ipmi-pef-utils.c: Add forgotten config header and checks. * bmc-config/src/bmc-config.c (_bmc_config_state_data_init): Initialize forgotten field. * bmc-config/src/bmc-config.c (main): Initialize progname field. * ipmi-pef/: Cache lan_channel_number, number_of_lan_destinations, number_of_alert_policy_entries, number_of_event_filters in state_data. Adjust functions appropriately for this. Initialize state_data appropriately. Fix help message descriptions. Begin to re-architect args to more resemble bmc-config's. Add args validation function ipmi_pef_args_validate. Begin to re-architect main code structure to more like bmc-config's. Remove get_pef_info() wrapper function. General code cleanup. * ipmi-pef/src/ipmi-pef-info.h, ipmi-pef/src/ipmi-pef-info.c, ipmi-pef/src/ipmi-pef-commit.h, ipmi-pef/src/ipmi-pef-commit.c, ipmi-pef/src/ipmi-pef-checkout.h, ipmi-pef/src/ipmi-pef-checkout.c: New files. * bmc-config/src/bmc-sections.c (bmc_config_sections_create), bmc-config/src/bmc-user-sections.c (bmc_user_section_get): Alter indexing method. * ipmi-pef/src/ipmi-pef-community-string.c, ipmi-pef/src/ipmi-pef-alert-destination.c, ipmi-pef/src/ipmi-pef-alert-policy-table.c, ipmi-pef/src/ipmi-pef-event-filter-table.c, ipmi-pef/src/ipmi-pef-diff.c, ipmi-pef/src/ipmi-pef-parser.c, ipmi-pef/src/ipmi-pef-sections.c, ipmi-pef/src/ipmi-pef-community-string.h, ipmi-pef/src/ipmi-pef-alert-destination.h, ipmi-pef/src/ipmi-pef-alert-policy-table.h, ipmi-pef/src/ipmi-pef-event-filter-table.h, ipmi-pef/src/ipmi-pef-diff.h, ipmi-pef/src/ipmi-pef-parser.h, ipmi-pef/src/ipmi-pef-sections.h: New files. * ipmi-pef/: Change "lan_destinations" and "lan_alert_destinations" to "alert_destinations" globally for consistency. * bmc-config/src/bmc-sections.h, bmc-config/src/bmc-sections.c (bmc_sections_list): Correct return type. 2007-05-16 Albert Chu * ipmi-pef/: Fix string parsing bugs in alert policy table. Fix event trigger output corner case. Fix build dependency bug. Add -e option. Force user to specify section. Check for out of mem errors. Fix some mapping corner cases. Fix error handling and incorrect logic in mapping to strings functions. General code cleanup. Begin re-architect to bmc-config style design. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_config.c (ipmi_monitoring_sensor_config), ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache.c (_destroy_ctx): Fix mem-leaks. * doc/freeipmi.texi, doc/gpl.texi, doc/version-doc.texi, doc/authors.texi, doc/fdl.texi, THANKS: Removed. * freeipmi.spec.in, doc/Makefile.am, Makefile.am: Updated appropriately. * various minor doc updates 2007-05-15 Albert Chu * ipmi-pef/: Do initial support of lan channels and community string support. Fix thread safety problems. Add -v and -f option. Re-adjust options to emulate bmc-config options. Fix mem-leaks. Fix and add numerous error messages. Commit community string via file too. Remove ability to set community string on command line. Fix various bugs. Fix output alignment. 2007-05-15 Albert Chu * common/doc/argp-common-privlevel-admin.man, common/doc/argp-common-privlevel-user.man: New files. * common/doc/Makefile.am: Updated appropriately for new files. * common/doc/argp-common-privlevel.man: Removed file. * common/src/arg-common.h: Modify mechanism by which common args are shared so some tools can have a default privilege of admin. * ipmi-sensors/, ipmi-sel/, bmc-info/, bmc-config/, ipmi-raw/, ipmi-pef/: Update to use new common macros and includes. Default privilege of ipmi-pef and ipmi-chassis is now admin. * various minor doc updates. 2007-05-16 A Balamurugan * ipmi-pef/src/ipmi-pef.c (checkout_pef_lad): added comments. 2007-05-15 A Balamurugan * ipmi-pef/src/ipmi-pef-utils.c (destination_type_to_string, string_to_destination_type, alert_acknowledge_to_string, string_to_alert_acknowledge, alert_acknowledge_timeout_to_string, string_to_alert_acknowledge_timeout, alert_retries_to_string, string_to_alert_retries, gateway_selector_to_string, string_to_gateway_selector, alert_ip_address_to_string, string_to_alert_ip_address, alert_mac_address_to_string, string_to_alert_mac_address): new functions. * ipmi-pef/src/ipmi-pef-wrapper.c (_record_string_to_lad, get_number_of_lan_destinations, get_lan_alert_destination, get_lad_list, set_lan_alert_destination): new functions. * ipmi-pef/src/ipmi-pef.c (checkout_pef_lad, commit_pef_lad): new functions. * ipmi-pef/src/ipmi-pef.c (run_cmd_args): added support to lan alert destination checkout/commit. 2007-05-15 Tom Zimmerman * ipmi-pef/src/ipmi-pef-utils.c: Fix #define typo. 2007-05-15 A Balamurugan * ipmi-pef/src/ipmi-pef-utils.h: fixed ENABLE_FILTER_KEY_STRING typo. * ipmi-pef/src/ipmi-pef-wrapper.c (_record_string_to_apt, get_apt_list, set_alert_policy_table): new functions. * ipmi-pef/src/ipmi-pef.c (checkout_pef_apt, commit_pef_apt): new functions. * ipmi-pef/src/ipmi-pef.c (run_cmd_args): modified according to command line argument changes. 2007-05-15 A Balamurugan * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c (fill_cmd_set_pef_configuration_parameters_alert_strings): uses macro IPMI_PEF_ALERT_STRINGS_BLOCK_SIZE_VALID. * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_alert_policy_table): fix to check obj_cmd_rs. * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_alert_policy_table): fix to check obj_cmd_rs. * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_alert_string_keys, ipmi_cmd_set_pef_configuration_parameters_alert_strings): new functions. 2007-05-14 Albert Chu * ipmimonitoring/src/ipmimonitoring.c (main): Fix error message typo. 2007-05-13 Albert Chu * common/src/ipmi-sdr-api.h, common/src/ipmi-sdr-api.c: Renamed to ipmi-sdr-cache.h and ipmi-sdr-cache.c. Rearchitect sdr API to return better error codes, be thread safe, and avoid potential mem-leaks. Fix various minor bugs found along the way. * ipmi-sel/, ipmi-senors/: Update appropriately. 2007-05-13 Albert Chu * libfreeipmi/src/ipmi-sdr-record-types.c: Modify field for tmpl_sdr_fru_device_locator_record to a more appropriate name. * common/src/ipmi-sdr-cache-writes.c (_write_sdr_fru_device_locator_record), common/src/ipmi-sdr-cache-reads.c (_read_sdr_fru_device_locator_record), common/src/ipmi-sdr-api.h: Support logical devices and fru ids in sdr cache. 2007-05-09 Albert Chu * ipmi-sel/ipmi-sel.8.pre.in, ipmi-sensors/ipmi-sensors.8.pre.in: Fix some SDR text. * Various manpage updates. 2007-05-08 Albert Chu * Fix typos in header file comments in libfreeipmi/include/freeipmi/udm/. * ipmi-sel/src/ipmi-sel-argp.c (ipmi_sel_argp_parse): Fix forgotten initialization. 2007-05-07 Albert Chu Fix bugs found by Levi Pearson * ipmipower/src/ipmipower_prompt.c (_cmd_k_g), common/src/ipmi-common.c (format_kg): Fix k_g buf length bugs. 2007-05-07 Raghavendra * ipmiconsole/src/ipmiconsole/Makefile.am: Fix include path compile issue. 2007-05-07 Tom Zimmerman * ipmi-pef/src/ipmi-pef-wrapper.c (get_pef_info): Fix field name typo. 2007-05-05 Albert Chu * doc/freeipmi-coding.txt, doc/freeipmi-hostrange.txt: Update text. * ipmipower/: Support an additional "password verification timeout" error code. * doc/freeipmi-faq.texi: Update text. * /: Various minor doc updates. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (_ipmimonitoring): Tweak output format. * ipmimonitoring/: Minor manpage text fixes. 2007-05-04 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_ctx_create): Change API to support k_g len. * ipmiconsole/src/libipmiconsole/ipmiconsole.c (_check_for_authentication_support): Fix state machine corner case. * ipmiconsole/src/ipmiconsole_config.c (_cmdline_parse): Fix -K corner case. * ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse): Fix -K corner case. * libfreeipmi/src/ipmi-utils.c (ipmi_check_cmd, ipmi_check_completion_code): check obj-cmd w/ fiid_obj_valid(). * doc/freeipmi-coding.txt, doc/freeipmi-hostrange.txt: new docs. * doc/Makefile.am, freeipmi.spec.in: Update for new docs. 2007-05-04 Levi Pearson * ipmiconsole/: Support hex keys in ipmiconsole and libipmiconsole. 2007-05-03 Levi Pearson * bmc-config/src/bmc-serial-conf-section.c (connect_mode_checkout): Fix strdup bug. * bmc-config/src/bmc-lan-conf-security-keys-section.c (k_g_checkout, k_g_commit, k_g_diff, k_g_validate): Support hex code input/output for K-g. * common/src/ipmi-common.c, common/src/ipmi-common.h (parse_kg, format_kg): Add const to appropriate parameters. 2007-05-03 Albert Chu * libfreeipmi/src/ipmi-kcs-api.c, libfreeipmi/src/ipmi-ssif-api.c, libfreeipmi/include/freeipmi/ipmi-kcs-api.h, libfreeipmi/include/freeipmi/ipmi-ssif-api.h: Include/fix error return conditions. Add new error codes. 2007-05-02 Albert Chu * ipmimonitoring/src/ipmimonitoring.c: Change default output. 2007-04-30 Albert Chu * ipmipower/: Don't bother to obscure ipmipower error messages. 2007-04-29 Albert Chu * ipmipower/ipmipower.8.in: Fix text. * ipmiconsole/ipmiconsole.8.in: Fix some text. * ipmimonitoring/src/libipmimonitoring/libipmimonitoring.c (ipmi_monitoring_bitmask_string): Fix corner case. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (_ipmimonitoring): Fix corner case. Output strings for bitmask readings. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.h: Fix bitmask values. Don't know what I was doing before. 2007-04-28 Albert Chu * doc/: Remove a whole bunch of unnecessary stuff. * freeipmi.spec.in, configure.ac: Adjust appropriately. * ipmi-raw/: Parse '0x' in hex codes too. Fix seg-fault corner case. (bug #19645) * common/src/pstdout.c (_pstdout_output_buffer_data, _pstdout_output_finish): Alter default output of buffered hostrange output. * bmc-info/, ipmi-raw/, ipmi-sel/, ipmi-sensors/, ipmimonitoring/: Alter default output of buffered hostrange output. * ipmipower/: Remove -o option. Change -C option to -X option. Add -C option for consolidated output like other tools. Add -E option to eliminate undetected nodes. Fix conf file inconsistencies. * ipmimonitoring/src/libipmisdrcache/ipmi_sdr_cache.c (ipmi_sdr_cache_open): Fix errno corner case. * ipmi-sensors/: Add -q option. * docs/: Various minor cleanup and wording fixes. 2007-04-27 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_defs.h: Fix k_g corner case. * libfreeipmi/src/ipmi-dmidecode-locate.c: Get rid of leftover debugging. * ipmimonitoring/: Support -s and -g in ipmimonitoring. 2007-04-27 Levi Pearson * common/src/ipmi-common.h, common/src/ipmi-common.c (parse_kg, format_kg): New functions. * ipmipower/: Support hex keys for K_g. 2007-04-27 Albert Chu * libfreeipm/, common/src, ipmi-sel/, ipmi-sensors: Rename "logical_fru" to "fru" for consistency with the ipmi spec. * ipmi-sel/src/ipmi-sel-wrappers.c (_get_sel_system_event_record): Output sensor names when they are available. * ipmi-sensors/ipmi-sensors.8.pre.in: Update -s option info. * ipmimonitoring/src/libipmimonitoring/: Bug fixes and code cleanup. * ipmimonitoring/: Support -q option in ipmimonitoring. * common/doc/argp-common-hostranged-text.man, ipmimonitoring/ipmimonitoring.8.in: Add extra hostrange output info. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_cmd): Check checksums before other stuff. 2007-04-26 Albert Chu * ipmimonitoring/ipmimonitoring.8.in, ipmidetect/ipmidetectd.8.in, ipmiconsole/ipmiconsole.8.in: Fix manpage output bug. * ipmimonitoring/ipmimonitoring.8.in: Reword some text. * ipmipower/ipmipower8.in, ipmiconsole/ipmiconsole.8.in, ipmimonitoring/libipmimonitoring.3.in: Update some text. * ac_ipmi_monitoring_sensor_config_file.m4: Fix filename typo. * doc/freeipmi-faq.texi: Fix some wording. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c (_cmdline_parse, main): Don't clear all args, just the username and password. * ipmimonitoring/: Add hostrange support to ipmimonitoring. Add -r option. Add -c option and alternate cache dir support. * Fix various warnings. 2007-04-25 Albert Chu * configure.ac: Add pre-req header checks for linux/ipmi.h. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_config.c, ipmipower/src/ipmipower.c: Change '_set' parameters to '_set_on_cmdline'. * ipmiconsole/src/ipmiconsole/ipmiconsole_config.h, ipmiconsole/src/ipmiconsole/ipmiconsole_config.c: Change '_set' parameters to '_set_on_cmdline'. 2007-04-24 Albert Chu * common/src/pstdout.c (_pstdout_print, _pstdout_print_wrapper, _pstdout_output_finish): Add race protections w/ no_more_external_output flag. * common/src/pstdout.c (_pstdout_print_wrapper, pstdout_printf, pstdout_fprintf, pstdout_perror, _pstdout_output_finish): Adjust calls appropriately. * common/src/pstdout.c (_pstdout_state_init): Init mutex. * common/src/pstdout.c (_pstdout_sigint_finish_output): Output information on which threads were canceled early. 2007-04-18 Albert Chu * libfreeipmi/include/freeipmi/ipmi-netfn-spec.h: Allow OEM network functions. * ipmipower/src/ipmipower_powercmd.c (_check_activate_session_authentication_type): Workaround permsgauth issue. * ipmipower/ipmipower.8.in: Update workaround issue. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send, ipmi_lan_cmd), libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_lan_open_session), libfreeipmi/src/udm/ipmi-udm-device.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband, _ipmi_outofband_close): Support permsgauth in udm. 2007-04-17 Albert Chu * libfreeipmi/: Support lan config get authentication type support. 2007-04-16 Albert Chu * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.c (ipmi_monitoring_sensor_readings_by_record_id, ipmi_monitoring_sensor_readings_by_sensor_group), ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sdr_cache.c (ipmi_monitoring_sdr_cache_unload): Fix sdr cache loading/unloading corner case. 2007-04-07 Albert Chu * bmc-config/src/bmc-lan-conf-alert-section.h, bmc-config/src/bmc-lan-conf-alert-section.c: New files. * bmc-config/src/bmc-lan-conf-section.c: Split off alert config into a different section. * bmc-config/src/Makefile.am: Adjust appropriately. * bmc-config/src/bmc-checkout.c (bmc_checkout_file), bmc-config/src/bmc-commit.c (bmc_commit_file): Add verbose progress information. 2007-04-06 Albert Chu * bmc-config/: Add alert config to bmc-config and fix various corner cases. 2007-04-05 Albert Chu * libfreeipmi/include/freeipmi/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c, (fill_cmd_set_lan_configuration_parameters_community_string, fill_cmd_set_lan_configuration_parameters_destination_type, fill_cmd_set_lan_configuration_parameters_destination_addresses): New functions. * libfreeipmi/include/freeipmi/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c, : Add templates for tmpl_cmd_set_lan_configuration_parameters_community_string_rq, tmpl_cmd_set_lan_configuration_parameters_destination_type_rq, tmpl_cmd_set_lan_configuration_parameters_destination_addresses_rq, tmpl_cmd_get_lan_configuration_parameters_community_string_rs, tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs, tmpl_cmd_get_lan_configuration_parameters_destination_type_rs, tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs. * libfreeipmi/include/freeipmi/udm/ipmi-lan-cmds-udm.h (ipmi_cmd_set_lan_configuration_parameters_community_string, ipmi_cmd_set_lan_configuration_parameters_destination_type, ipmi_cmd_set_lan_configuration_parameters_destination_addresses, ipmi_cmd_get_lan_configuration_parameters_community_string, ipmi_cmd_get_lan_configuration_parameters_number_of_destinations, ipmi_cmd_get_lan_configuration_parameters_destination_type, ipmi_cmd_get_lan_configuration_parameters_destination_addresses): New functions. * libfreeipmi/include/freeipmi/ipmi-lan-cmds.h: Add new defines for new lan cmds support. * libfreeipmi/include/freeipmi/ipmi-lan-param-spec.h: Fix typo. * bmc-config/src/bmc-config-api.h, bmc-config/src/bmc-config-api.c, bmc-config/src/bmc-lan-conf-section.c: Add community string config support. 2007-03-30 Albert Chu * ipmiconsole/: Add --deactivate option and SOL deactivate only support. * NEWS: Update w/ more 0.4.0 stuff. 2007-03-29 Albert Chu * ipmipower/src/ipmipower_workarounds.h, ipmipower/src/ipmipower_workarounds.c: New files. * ipmipower/: Re-architected workaround options. * configure.ac: Increment ipmiconsole revision to sync w/ 0.3.2 release. 2007-03-28 Albert Chu * common/src/argp-common.c (__secure_memset): New function. * common/src/argp-common.c (common_parse_opt): Clear password. * bmc-info/, bmc-config/, ipmi-chassis/, ipmi-pef/, ipmi-raw/, ipmi-sel/, ipmi-sensors/: Don't clear out all argv data. Only password. * ipmipower/, ipmiconsole/: Don't clear out all argv data, only important stuff. 2007-03-25 Albert Chu * doc/freeipmi-faq.texi: Updated. 2007-03-24 Albert Chu * doc/freeipmi.texi, doc/freeipmi-faq.texi: Updated. * ipmiconsole/ipmiconsole.8.in: Fix option name typo. 2007-03-23 Albert Chu * common/doc/argp-common-hostranged-options.man, common/src/pstdout.h: Change default pstdout fanout to 64. 2007-03-21 Albert Chu * ipmiconsole/ipmiconsole.8.in: Fix typo. 2007-03-20 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_ipmiconsole_cleanup_ctx_session, ipmiconsole_engine_submit_ctx), ipmiconsole/src/libipmiconsole/ipmiconsole.c (ipmiconsole_engine_submit): Fix possible session_submit race. It has never been hit, but is possible. * ipmiconsole/src/libipmiconsole/ipmiconsole.c, ipmiconsole/src/libipmiconsole/ipmiconsole.h, ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_sol_bmc_to_remote_console_packet): Add SOL stolen error code. * ipmiconsole/: Support blocking engine submission. Make it the default behavior for the ipmiconsole tool. 2007-03-16 Anand Babu * bmc-config/src/bmc-lan-conf-misc-section.c: Fixed incorrect return status check. * bmc-watchdog/Makefile.am: replaced "$(top_srcdir)/install-sh" with "$(INSTALL)" and "$(DESTDIR)/" with "$(DESTDIR)". * ipmiconsole/src/libipmiconsole/Makefile.am: like wise. * freeipmi/ipmidetect/Makefile.am: like wise. * ipmimonitoring/src/libipmimonitoring/Makefile.am: like wise. * ipmimonitoring/Makefile.am: replaced install-data-local target with automake style macros. * Other changes are just compiler warning fixes like unused variable or referenced without initialization warning. 2007-03-15 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_processing.c (_process_ctx): Fix output corner case. Fix comment typo. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (_set_mode_raw): Use TCSADRAIN instead of TCSAFLUSH to not automatically flush stdin if data exists on it. * ipmiconsole/src/ipmiconsole/ipmiconsole.c (main): Remove unused code. 2007-03-11 Albert Chu * libfreeipmi/src/ipmi-locate-dmidecode.c: Replace u8, u16, u32, u64 typedefs with others, to protect against the possibility we collide with libc typedefs of the same name. 2007-03-08 Albert Chu * ipmimonitoring/src/ipmi_monitoring.h, ipmimonitoring/src/ipmi_monitoring.c, ipmimonitoring/src/ipmi_monitoring_defs.h: Do not lock memory by default. * ipmiconsole/: Do not lock memory by default. Adjust -L option appropriately. 2007-03-07 Albert Chu * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_ipmiconsole_init_ctx_session): Return out of memory error on cbuf_create error. * ipmipower/ipmipower.8.in, ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse): Change -U option to -Z. * ipmipower/ipmipower.8.in, ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse), ipmiconsole/ipmiconsole.8.in, ipmiconsole/src/ipmiconsole/ipmiconsole_config.c (_cmdline_parse): Add -K option. 2007-03-06 Albert Chu * ipmiconsole/ipmiconsole.8.in, ipmiconsole/ipmiconsole.conf.5.in, ipmiconsole/src/ipmiconsole/ipmiconsole_config.h, ipmiconsole/src/ipmiconsole/ipmiconsole_config.c, ipmiconsole/src/ipmiconsole/ipmiconsole.c: Add -N option support. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_ipmiconsole_cleanup_ctx_session): Remove unnecessary conditional. * ipmiconsole/src/libipmiconsole/ipmiconsole_engine.c (_ipmiconsole_cleanup_ctx_session, _ipmiconsole_init_ctx_session): Fix mem initialization bug. * ipmiconsole/src/libipmiconsole/cbuf.h, ipmiconsole/src/libipmiconsole/cbuf.c: New files for ipmiconsole secure mallocs. * ipmiconsole/src/libipmiconsole/Makefile.am: Add cbuf.h and cbuf.c for new build. * common/src/cbuf.c: Remove secure malloc code. * common/src/Makefile.am: Split off cbuf into a separate lib. * ipmipower/src/Makefile.am, bmc-info/src/Makefile.am, ipmi-sensor/src/Makefile.am, ipmi-sel/src/Makefile.am, ipmi-raw/src/Makefile.am: Use new cbuf common lib. * ipmiconsole/src/libipmiconsole/: Support optional secure mallocs. * ipmiconsole/ipmiconsole.8.in, ipmiconsole/ipmiconsole.conf.5.in, ipmiconsole/src/ipmiconsole/: Add -L option support. 2007-03-03 Albert Chu * Makefile.am: Add freeipmi.spec to dist. 2007-03-01 Albert Chu * tagged pre_hostrange_support Support hostrange support in FreeIPMI tools * COPYING.pstdout, DISCLAIMER.pstdout, COPYING.ipmidetect, DISCLAIMER.ipmidetect, common/src/pstdout.h, common/src/pstdout.c, common/src/eliminate.h, common/src/eliminate.c, ipmidetect/: New files. * common/src/argp-common.h, common/src/argp-common.c, common/doc/: Add common manpage and command line parsing for hostranges. * bmc-info/, ipmi-sel/, ipmi-sensors/, ipmi-raw/: Rework for hostrange support. * freeipmi.spec.in: Add new ipmidetect subpackage. * common/src/hostlist.h, common/src/hostlist.c: New files for llnlcommon lib moved from ipmipower/src/hostlist.h and ipmipower/src/hostlist.c respectively. * common/src/Makefile.am, ipmipower/src/Makefile.am: Adjust for new hostlist file locations appropriately. * freeipmi.spec.in: Updated for ipmidetect. * Makefile.am: Updated for new files appropriately. * tagged post_hostrange_support 2007-02-27 Albert Chu * ac_ipmipower_config_file.m4: New file. * configure.ac, ipmipower/ipmipower.conf.5.in, ipmipower/src/ipmipower_config.c, ipmipower/src/ipmipower.h: Support autoconfed ipmipower config file path. 2007-02-22 A Balamurugan * ipmi-pef/src/ipmi-pef-utils.c (policy_type_to_string, string_to_policy_type, policy_enabled_to_string, string_to_policy_enabled, policy_number_to_string, string_to_policy_number, destination_selector_to_string, string_to_destination_selector, channel_number_to_string, string_to_channel_number, alert_string_set_selector_to_string, string_to_alert_string_set_selector, event_specific_alert_string_lookup_to_string, string_to_event_specific_alert_string_lookup): new functions. * ipmi-pef/src/ipmi-pef-wrapper.c (get_number_of_alert_policy_entries, get_alert_policy_table): new functions. * ipmi-pef/src/ipmi-pef.c (checkout_alert_policy_table): new functions. * ipmi-pef/src/ipmi-pef.c (checkout_pef_evt): included alert policy table data. * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c, libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c: renamed fiid entries "policy_number.policy" to "policy_number.policy_type" and, "alert_string_key.event_specific_alert_string" to "alert_string_key.event_specific_alert_string_lookup". 2007-02-21 A Balamurugan * libfreeipmi/include/freeipmi/ipmi-pef-and-alerting-cmds.h: added table policy table macros. * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c: added fiids tmpl_cmd_set_pef_configuration_parameters_alert_policy_table_rq and tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs, and function fill_cmd_set_pef_configuration_parameters_alert_policy_table(). * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_alert_policy_table, ipmi_cmd_get_pef_configuration_parameters_alert_policy_table): new functions. 2007-02-18 A Balamurugan * configure.ac: fix of automake init. * common/src/common-utils.c (remove_newline,strsep_noempty): new functions. * ipmi-pef/src/Makefile.am: updated. * ipmi-pef/src/ipmi-pef-utils.[ch]: new files. * ipmi-pef/src/ipmi-pef-wrapper.c, ipmi-pef/src/ipmi-pef.c: changes made for new configuration format. 2007-02-17 Albert Chu * freeipmi.spec.in: Put ipmi_monitoring.h into the ipmimonitoring subpackage. General cleanup. * common/src/argp-common.c (common_parse_opt): Check for NULL on strdup. 2007-02-16 Albert Chu * ipmiconsole/src/ipmiconsole/Makefile.am: Remove unnecessary compile option. * freeipmi.spec.in: Split of ipmimonitoring into a subpackage. Add ipmi-chassis. * configure.ac: Fix make dist issue w/ long filenames. * ipmimonitoring/src/libipmimonitoring/: Fix flag bitmask bugs. Add support for unlocked memory flag. Fix build dependency bug. * ipmimonitoring/src/ipmimonitoring/ipmimonitoring.c: Adjust code appropriately for library changes. 2007-02-15 Albert Chu * DISCLAIMER.ZRESEARCH: Removed. * Makefile.am, freeipmi.spec.in: Removed DISCLAIMER.ZRESEARCH. 2007-02-14 Albert Chu * ipmimonitoring/libipmimonitoring/Makefile.am, ipmimonitoring/libipmisdrcache/Makefile.am, ipmiconsole/libipmiconsole/Makefile.am: Compile with -D_REENTRANT. 2007-02-09 Anand V. Avati * ipmi-chassis/ipmi-chassis.8.pre.in: added missing file * ipmi-chassis/src/*: intermediary commit with bugfixes 2007-02-09 Anand V. Avati ipmi-chassis - intermediate commit with --get-capabilities support * ipmi-chassis/*: command line tool for IPMI chassis functionality * configure.ac: updated * Makefile.am: updated * libfreeipmi/src/ipmi-chassis-cmds.c: * libfreeipmi/src/udm/ipmi-chassis-cmds.c: added missing commands * libfreeipmi/include/freeipmi/ipmi-chassis-cmds.h: * libfreeipmi/include/freeipmi/udm/ipmi-chassis-cmds-udm.h: prototyped missing commands 2007-02-06 Albert Chu * ipmimonitoring/src/libipmisdrcache/Makefile.am: Don't install libipmisdrcache. 2007-02-05 Albert Chu * freeipmi.spec.in: Add ipmimonitoring sdr cache directory. 2007-02-05 A Balamurugan * ipmi-pef/src/ipmi-pef.h: new file. * ipmi-pef/src/Makefile.am: updated. * ipmi-pef/src/ipmi-pef-argp.[ch], ipmi-pef/src/ipmi-pef.c: removed globals. 2007-02-05 Albert Chu * freeipmi.spec.in: Add ipmimonitoring docs. 2007-02-02 Albert Chu * ipmi-sel/ipmi-sel.8.pre.in, ipmi-sensors/ipmi-sensors.8.pre.in: Fix typos. * ipmi-sel/src/ipmi-sel-argp.c, ipmi-sensors/src/ipmi-sensors-argp.c: Fix argp options order. 2007-02-01 Albert Chu * ipmi-raw/src/ipmi-raw.c (string2bytes, ipmi_raw_stream): Pass state_data to string2bytes from ipmi_raw_stream. Fix memory management issue. 2007-01-31 Albert Chu * common/src/ipmi-common.c, common/src/ipmi-common.h (ipmi_disable_coredump): New function. * bmc-config/src/bmc-config.c, bmc-info/src/bmc-info.c, ipmi-pef/src/ipmi-pef.c, ipmi-sel/src/ipmi-sel.c, ipmi-sensors/src/ipmi-sensors.c (_disable_coredump, main): Use new common function. Remove unnecessary includes. * ipmi-locate/src/ipmi-locate.c (main): Cleanup for consistency with other tools. * Makefile.am: Add COPYING.ipmimonitoring and DISCLAIMER.ipmimonitoring to dist. * ipmimonitoring/src/libipmimonitoring/ipmi_monitoring.c (ipmi_monitoring_bitmask_string), ipmimonitoring/src/libipmimonitoring/ipmi_monitoring_sensor_reading.c (_get_digital_sensor_bitmask_type): Fix warnings. * ipmi-sel/src/ipmi-sel-wrapper.h, ipmi-sel/src/ipmi-sel-wrapper.c (get_sel_record): Cleaned up API. * ipmi-sel/src/ipmi-sel-wrapper.h, ipmi-sel/src/ipmi-sel-wrapper.c (destroy_sel_record): New function. * ipmi-sel/src/ipmi-sel.c (display_sel_records): Use adjusted API. * bmc-config/src/: Re-architect to remove globals. 2007-01-30 Albert Chu * bmc-config/: Continue re-architecture w/ state data. 2007-01-29 Albert Chu * COPYING.ipmimonitoring, DISCLAIMER.ipmimonitoring, configure.ac, Makefile.am, freeipmi.spec.in, ipmimonitoring/: Add ipmimonitoring code. * ipmiconsole/src/libipmiconsole/Makefile.am: Remove unneeded compile options. 2007-01-26 Albert Chu * bmc-config/: Re-architect for most of bmc-config to support fatal and non-fatal errors, necessary for later hostrange support. Fixed various bugs along the way. * bmc-config/src/bmc-validate.h, bmc-config/src/bmc-validate.c: New files. * bmc-config/src/: Use new common validate functions throughout code. Various continued code cleanup. 2007-01-24 Albert Chu * bmc-config/: Continue cleanup and re-architecture. * bmc-config/src/bmc-argp.h: Renamed to bmc-config-argp.h for consistency. * bmc-config/src/bmc-argp.c: Renamed to bmc-config-argp.c for consistency. 2007-01-23 Albert Chu * bmc-config/src/bmc-types.h: Move to bmc-config.h. File is now removed. * bmc-config/src/bmc-lan-channel-section.h, bmc-config/src/bmc-lan-conf-auth-section.h, bmc-config/src/bmc-lan-conf-misc-section.h, bmc-config/src/bmc-lan-conf-section.h, bmc-config/src/bmc-lan-conf-security-keys-section.h, bmc-config/src/bmc-user-sections.h, bmc-config/src/bmc-rmcpplus-conf-privilege-section.h, bmc-config/src/bmc-serial-channel-section.h, bmc-config/src/bmc-serial-conf-section.h, bmc-config/src/bmc-pef-conf-section.h, bmc-config/src/bmc-sol-conf-section.h, bmc-config/src/bmc-misc-section.h: New files. * bmc-config/src/bmc-argp.h: Renamed to bmc-config-argp.h for consistency. * bmc-config/src/bmc-argpc.: Renamed to bmc-config-argp.c for consistency. * libfreeipmi/include/freeipmi/ipmi-error.h: Add forgotten include. * bmc-config/: Continue cleanup and re-architecture. 2007-01-22 Albert Chu * ipmi-raw/: Cleanup/re-architect for later hostrange support. * bmc-info/src/bmc-info.h, ipmi-sensors/src/ipmi-sensors.h, ipmi-sel/src/ipmi-sel.h: New files. * bmc-info/src/Makefile.am, ipmi-sensors/src/Makefile.am, ipmi-sel/src/Makefile.am: Update for new files respectively. * bmc-info/, ipmi-sensors/, ipmi-raw/ ipmi-sel/: Continue cleanup/re-architecture. * common/src/argp-common.h: Add missing header file. * bmc-config/src/bmc-argp.h, bmc-config/src/bmc-checkout.h, bmc-config/src/bmc-commit.h, bmc-config/src/bmc-parser.h: New files. * bmc-config/: Cleanup for consistency w/ other tools. 2007-01-21 Albert Chu * bmc-info/src/bmc-info.c: Rename 'flags' to 'debug_flags'. * ipmi-sel/, ipmi-sensors/: Cleanup/re-architect for later hostrange support. 2007-01-20 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c, libfreeipmi/include/freeipmi/udm/ipmi-udm.h (ipmi_open_outofband): Make char parameters const. * bmc-info/src/bmc-info.c (main): Fix corner case. 2007-01-20 Dmitry Frolov * libfreeipmi/src/ipmi-openipmi-api.c: Fix typo. 2007-01-12 Albert Chu * bmc-info/src/bmc-info.c: Cleanup/re-architect for later hostrange support. * bmc-config/src/bmc-config.c, bmc-info/src/bmc-info.c, ipmi-pef/src/ipmi-pef.c, ipmi-raw/src/ipmi-raw.c, ipmi-sel/src/ipmi-sel.c, ipmi-sensors/src/ipmi-sensors.c (_disable_coredump): Make function static. 2007-01-09 Albert Chu * bmc-info/src/bmc-info.c (display_channel_info): Fix protocol type output bug. 2007-01-08 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c (IPMI_SESSION_TIMEOUT): Change default to 20 seconds. 2006-12-29 Albert Chu * ipmi-pef/src/ipmi-pef.c, ipmi-sel/src/ipmi-sel.c, ipmi-sensors/src/ipmi-sensors.c: Remove unused exit_status global. 2006-12-28 Albert Chu * ipmipower/ipmipower.8.in: Add some extra powerman info. 2006-12-15 Albert Chu * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h, libfreeipmi/include/freeipmi/ipmi-device-global-cmds.h, libfreeipmi/include/freeipmi/udm/ipmi-udm.h: Include stdint.h. * ipmiconsole/src/libipmiconsole/ipmiconsole.h: Add g++ compatibility definitions. * Globally remove HAVE_STDINT_H. * libfreeipmi/include/: Various header file cleanup. * Applied FreeBSD OpenIPMI support patch from Dmitry Frolov . * configure.ac: Search for linux/ipmi.h and sys/ipmi.h. * libfreeipmi/src/ipmi-openipmi-api.c: Load and use appropriate headers when available. * ipmi-sensors/src/ipmi-sensors.c (init_sdr_cache, run_cmd_args), ipmi-sensors/src/ipmi-sensors-argp.h, ipmi-sensors/src/ipmi-sensors-argp.c (parse_opt, ipmi_sensors_argp_parse): Support -Q option. * ipmi-sel/src/ipmi-sel.c (init_sdr_cache, run_cmd_args), ipmi-sel/src/ipmi-sel-argp.h, ipmi-sel/src/ipmi-sel-argp.c (parse_opt, ipmi_sel_argp_parse): Support -Q option. * ipmi-sensors/ipmi-sensors.8.pre.in, ipmi-sel/ipmi-sel.8.pre.in: Updated with -Q option. 2006-12-15 Anand Babu * libfreeipmi/include/: g++ compatibility definitions. 2006-12-12 Albert Chu * Applied FreeBSD support patch from Dmitry Frolov . * freeipmi.spec.in: Added zresearch copying and disclaimer files. 2006-12-08 Anand Babu * common/src/ipmi-sdr-api.c: fixes the "SDR cache creation under /tmp" bug reported by Tejram Meena . * ipmi-sensors/src/ipmi-sensors.c: give proper error message when cache creation fails. * DISCLAIMER.ZRESEARCH and COPYING.ZRESEARCH: newly added. * libfreeipmi/src/ipmi-rmcpplus-debug.c (ipmi_dump_rmcpplus_packet): initialized certain variables to zero to avoid GCC warning. 2006-12-07 Albert Chu * common/src/argp-common.h, common/src/argp-common.c, common/doc/argp-common-outofband.man: Support -P option. Remove optional argument of -p due to parsing issues. * ipmipower/ipmipower.8.in, ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse, _usage): Replace -P option with -W option. Support new -P password prompt option. * ipmiconsole/ipmiconsole.8.in, ipmiconsole/src/ipmiconsole_config.c (_cmdline_parse, _usage): Support -P option. * ipmiconsole/libipmiconsole.3.in: New file. * configure.ac, ipmiconsole/Makefile.am, freeipmi.spec.in: Support new manpage. 2006-12-06 Albert Chu * ipmipower/src/error.c (dbg): Do not compile if debugging is not compiled in. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue), ipmipower/src/ipmipower_util.c (get_rand): Errors from ipmi_get_random should be error outputs, not debug outputs. * ipmiconsole/ipmiconsole.8.in: Fix typo in bmc-config manpage section. 2006-11-16 Albert Chu * common/src/list.c (list_alloc_aux, list_free_aux): Fix potential mem-leak issue. 2006-11-14 Albert Chu * common/src/ipmi-sensor-api.c (get_sensor_reading): Narrow corner case fixes from 2006-11-13. 2006-11-13 Albert Chu * common/src/ipmi-sdr-api.h, common/src/ipmi-sdr-api.c, ipmi-sel/src/ipmi-sel.c, ipmi-sensors/src/ipmi-sensors.c: Add SDR debugging. 2006-11-13 Albert Chu * configure.ac: We are now at 0.4.beta0. * ipmi-sensors/src/Makefile.am: Add libsdr and libsensor dependency check. * common/src/ipmi-sdr-api.c (_get_sdr_full_record): Fix corner case. * common/src/ipmi-sensor-api.c (get_sensor_reading): Fix corner cases. * include/freeipmi/ipmi-sdr-record-types.h: Add additional analog format define. 2006-11-09 Anand Babu * doc/freeipmi.texi, doc/freeipmi-faq.texi: updated copying section as per latest GNU Evaluation Team's recommendation. * doc/permissions.texi: removed. 2006-11-06 Albert Chu * doc/freeipmi.texi, doc/freeipmi-faq.texi: Various updates. 2006-11-06 Albert Chu * NEWS: Split news for users and developers. * commons/rc/Makefile.am: Dist missing .h files. 2006-11-06 Anand V. Avati * bmc-config/src/bmc-config-api.c: free fiid_obj after using to get max_channel_users_id * bmc-config/src/bmc-config.c: free argugments.filename if exists after using it * common/src/ipmi-sdr-api.c: use getpwuid_r in _get_home_directory() instead of getpwuid to avoid mem leak * ipmi-sel/src/ipmi-sel.c: free sdr_record_list in run_cmd_args after its use 2006-11-06 Albert Chu * Tagged Release-0_3_0_base. * Branched Release-0_3_0_branch. 2006-11-05 Albert Chu * ipmipower/src: Move common files to common/src. * common/src/Makefile.am, ipmipower/src/Makefile.am: Update for new common files library. * ipmiconsole/: New library and code. * doc/freeipmi.texi, Makefile.am, configure.ac, freeipmi.spec.in: Updated appropriately for new ipmiconsole code. 2006-11-03 Albert Chu * ipmipower/src/Makefile.am, ipmiping/src/Makefile.am, rmcpping/src/Makefile.am, bmc-watchdog/src/Makefile.am, bmc-info/src/Makefile.am, doc/examples/Makefile.am, ipmi-locate/src/Makefile.am, ipmi-pef/src/Makefile.am, ipmi-raw/src/Makefile.am, ipmi-sel/src/Makefile.am, ipmi-sensors/src/Makefile.am: Cleanup. 2006-11-02 Albert Chu * ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in: Fix manpage typos. * doc/freeipmi.texi: Update with new ipmipower options. * NEWS: Updated with 0.3.0 additions. * AUTHORS: Added Anand Avati. * doc/freeipmi-faq.texi: Added LLNL as co-maintainer. 2006-11-02 A Balamurugan * doc/freeipmi.texi, ipmi-sel/ipmi-sel.8.pre.in, ipmi-sensors/ipmi-sensors.8.pre.in: updated for --sdr-cache-directory argument addition. 2006-11-02 A Balamurugan * common/src/ipmi-sdr-api.c (get_sdr_cache_filename, flush_sdr_cache_file): added user defined sdr cache directory. * ipmi-sel/src/ipmi-sel.c (init_sdr_cache, run_cmd_args): updated according to above function call changes. * ipmi-sel/src/ipmi-sensors.c (init_sdr_cache, run_cmd_args): like wise. * ipmi-sel/src/ipmi-sel-argp.c, ipmi-sensors/src/ipmi-sensors-argp.c: added --sdr-cache-directory argument. Fixed bug #18034. 2006-11-02 Anand Babu * doc/freeipmi.texi: added cross reference for bmc-config command line options under bmc-autoconfig section. 2006-11-01 A Balamurugan * ipmi-pef/src/Makefile.am: updated. * ipmi-pef/src/ipmi-pef-argp.[ch]: added --checkout and --commit options. * ipmi-pef/src/ipmi-pef-wrapper.[ch] (get_event_filter_table, set_event_filter_table, get_number_of_event_filters, get_evt_list): new functions. * ipmi-pef/src/ipmi-pef.c (checkout_pef_evt, commit_pef_evt): new functions. * ipmi-pef/src/ipmi-pef.c (run_cmd_args): updated. * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_event_filter_table): ipmi_cmd_set_event_filter_table() renamed. * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c (ipmi_cmd_set_pef_configuration_parameters_event_filter_table_data1_): ipmi_cmd_set_filter_table_data1_() renamed. 2006-10-22 Anand V. Avati * common/src/argp-common.c: -p takes optional password argument. If not given, does getpass() 2006-10-20 Albert Chu * ipmipower/: Added support for --wait-until-on option. * ipmipower/src/ipmipower_prompt.c (_cmd_power): Support range of hosts that can be passed to power operations. 2006-10-16 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): Fix segfault corner case. 2006-10-14 Albert Chu * freeipmi.spec.in: Add ipmi-pef. 2006-10-06 A Balamurugan * ipmi-pef/Makefile.am, ipmi-pef/ipmi-pef.8.pre.in, ipmi-pef/src/Makefile.am, ipmi-pef/src/ipmi-pef-argp.[ch], ipmi-pef/src/ipmi-pef-wrapper.[ch], ipmi-pef/src/ipmi-pef.c: new files. * Makefile.am, configure.ac: updated. 2006-10-02 Albert Chu * bmc-config/src/: Fix non-return value calls to strdup. 2006-09-26 Anand V. Avati * bmc-config/bmc-autoconfig: command line arguments are now handled (passwd on to bmc-config) 2006-09-19 Albert Chu * ipmi-sel/: Fix trigger reading output. Add SDR flush cache option. * ipmi-sel/ipmi-sel.8.pre.in, doc/freeipmi.texi: Update with new option appropriately. 2006-09-14 Albert Chu * ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse): Add missing -q parse option. * configure.ac: Define HAVE_GETOPT_LONG if found. * libfreeipmi/src/ipmi-sensor-types-spec.c: Rename "Board" to "Module/Board" to match spec. 2006-09-10 Dmitry Frolov * FreeIPMI 0.3.X FreeBSD support added. 2006-09-13 Albert Chu * bmc-config/src: Remove "No_Access" support for lan channel and serial channel configuration. It is not a valid privilege for setting/getting. 2006-09-09 Albert Chu * ipmipower/: Added support for --retry-wait-timeout option. 2006-09-08 Albert Chu * bmc-config/src/bmc-config-api.c: Fix rmcpplus cipher suite privilege interpretation issue. * bmc-config/src/bmc-user-sections.c (get_user_section): Remove checkout of "Lan_Session_Limit" and "Serial_Session_Limit" keys until a solution can be determined for how to retrieve the current session limit. * doc/freeipmi.texi: Adjust bmc config output appropriately. * ipmipower/: Add support for --wait-until-off option. 2006-09-06 Albert Chu * bmc-config/src/bmc-user-sections (enable_user_diff): Implement appropriately for errata 3 changes. * bmc-config/src/bmc-pef-conf-section.c (pef_control_commit): Fix bug. 2006-09-05 Albert Chu * bmc-config/src/bmc-user-sections.c (enable_user_checkout): Slightly alter logic. 2006-09-05 Ingo van Lil (inguin@gmx.de) * bmc-config/src/bmc-misc-section.c (bmc_misc_section_get): Set flag to BMC_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY. * bmc-config/src/bmc-sol-conf-section.c (character_accumulate_interval_commit, character_send_threshold_commit, sol_retry_count_commit, sol_retry_interval_commit): Fix commit bug. * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c: Fix misnamed fields in tmpl_cmd_set_pef_configuration_parameters_pef_startup_delay_rq. 2006-09-04 Albert Chu Various compile warning fixes. 2006-09-04 Ingo van Lil (inguin@gmx.de) * libfreeipmi/src/udm/ipmi-pef-and-alerting-cmds-udm.c: Fix incorrect NetFNs. * libfreeipmi/src/ipmi-pef-and-alerting-cmds.c: Fix parameter revision inconsistency with other templates. 2006-08-31 Albert Chu * ipmipower/src/ipmipower_powercmd.c (_check_open_session_error): Fix corner cases. * libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r): Update w/ new completion codes based on IPMI 2.0 Errata 3. * libfreeipmi/src/ipmi-sensor-and-event-code-tables.c (ipmi_sensor_type_code_13_desc): Updated with new strings. * libfreeipmi/include/ipmi-messaging-support-cmds.h, libfreeipmi/src/ipmi-messaging-support-cmds.c: Support user id enabled/disabled detection in get user access command. * bmc-config/src/: Support enable user id checkout due to errata change to get user access command. 2006-08-30 Albert Chu * ipmipower/src/ipmipower_check.c (ipmipower_check_open_session_response_privilege): Fix privilege check corner case. 2006-08-27 A Balamurugan * common/src/common-utils.[ch], common/src/ipmi-sdr-cache-reads.[ch], common/src/ipmi-sdr-cache-writes.[ch]: new files. * common/src/ipmi-sdr-api.c: reworked according to new sdr cache format. * common/src/Makefile.am: updated. * libfreeipmi/src/ipmi-ssif-api.c: fixed IPMI_SSIF_MULTI_PART_WRITE_END_SMBUS_CMD value to 0x08. * ipmi-sensors/src/sensors-very-verbose-display.c (sensors_display_very_verbose_oem_record): displays oem_data of oem_data_length. * ipmi-sensors/src/ipmi-sensors-utils.c (str2long, str2ulong, str2int, str2uint): moved to common/src/common-utils.[ch] 2006-08-13 Albert Chu * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_process_pending): Fix corner case. Do not modify timeout if no pending commands exist. * ipmipower/src/ipmipower_prompt.c (ipmipower_prompt_process_cmdline): Fix tabbing. * doc/freeipmi.texi: Update with new bmc-config options and ipmi-sensors info. 2006-08-12 Albert Chu * bmc-config/: Support multiple invocations for --section option. * bmc-config/: Support --listsections option. 2006-08-11 Albert Chu * ipmipower/src/ipmipower_config.c (ipmipower_config_setup): Call secure_malloc only if in non-debug mode. * bmc-config/: Support --section option. 2006-08-10 Albert Chu * ipmipower/src/ipmi-wrappers.h, ipmipower/src/ipmi-wrappers.c (Fiid_obj_clear): Return void instead of int8_t. * ipmipower/src/ipmi-wrappers.h, ipmipower/src/ipmi-wrappers.c (Fiid_obj_set_data): New function. * ipmipower/src/ipmi-wrappers.h, ipmipower/src/ipmi-wrappers.c (Fiid_obj_clear_field): Return void instead of int8_t. * ipmipower/src/ipmipower_check.c (ipmipower_check_rakp_2_key_exchange_authentication_code): Add supermicro IPMI 2.0 workarounds. 2006-08-09 Albert Chu * bmc-config/src/: Change section names with "LAN" to "Lan" for backwards consistency. * bmc-config/src/bmc-commit.c (bmc_commit_file): Add section to error output. * libfreeipmi/src/ipmi-messaging-support-cmds.c (fill_cmd_set_channel_access), libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_cmd_set_channel_access): Fix parameter check bug. * Makefile.am: Fix distcheck. * ipmi-sensors/src/Makefile.am: Fix install bug. * freeipmi.spec.in: Fix packaging bug. bmc-config various fixes * bmc-config/src/: Support multiple -k values on the command line; * bmc-config/src/: Globally check value of malloc, calloc, and strdup. Re-support -k and -f options on the command line at the same time. * bmc-config/src/bmc-commit.c (bmc_keypair_feed): New function. * bmc-config/src/bmc-commit.c (bmc_commit_file): Support keypairs and filenames both on the commandline. * bmc-config/src/bmc-argp.c (args_validate): Fix check of only one of -k and -f for when you --commit. 2006-08-08 Albert Chu ipmi-sensors and ipmi-sel convenience code cleanup and re-org in preparation for code fixes in ipmi-sel. * ipmi-sensors/src/ipmi-sdr-api.h, ipmi-sensors/src/ipmi-sdr-api.c: Move to common/src/ as common lib: * ipmi-sensors/src/Makefile.am, common/src/Makefile.am: Adjust appropriately for use. * common/src/ipmi-sensor-api.c, common/src/ipmi-sensor-api.h, common/src/ipmi-sdr-api.h, common/src/ipmi-sdr-api.c: Move SDR related defines and functions from ipmi-sensor-api.[ch] to ipmi-sdr-api.[ch]. General code cleanup throughout. * common/src/ipmi-sdr-api.c: Globally add more debugging info. * common/src/ipmi-sdr-api.c (get_sdr_cache_filename): Fix sdr cache filename corner case which can exist in environments with NFS mounted home directories. * libfreeipmi/src/ipmi-locate-acpi-spmi.c (ipmi_physical_address_valid): New function. * libfreeipmi/src/ipmi-locate-acpi-spmi.c (ipmi_ioremap): Use ipmi_physical_address_valid appropriately. * ipmipower/: Begin support of --supermicro-2-0-session option. 2006-08-07 Albert Chu * ipmi-sensors/ipmi-sensors.8.pre.in: Add debug flag option. * ipmi-sensors/src/ipmi-sensors.c (main): Add OPENIPMI driver support. * ipmi-sensors/src/sensors-simple-display.c (sensors_display_simple_event_only_record): Removed unused function. * ipmi-sensors/src/ipmi-sensors-argp.c, ipmi-sensors/src/ipmi-sensors-argp.h, ipmi-sensors/src/ipmi-sensors-utils.c, ipmi-sensors/src/ipmi-sensors-utils.h, ipmi-sensors/src/ipmi-sensors.c: Fix unsigned int use bug that broke --sensors option. Use unsigned ints for sensors list and sensors list length. * ipmi-sensors/src/ipmi-sensors.c (display_sensor_list, display_group_sensors): Don't get sensor reading unless it's required by output choice. * configure.ac, Makefile.am, freeipmi.spec.in, fish/: Remove fish and all fish related code. * bmc-config/src/bmc-user-sections.c: Replace "LAN" with "Lan" for consistency and backwards compatability. 2006-08-08 A Balamurugan * ipmi-sensors/src/sensors-simple-display.c (sensors_display_simple_full_record): displays 2 decimals for double values. * ipmi-sensors/src/sensors-verbose-display.c (sensors_display_verbose_compact_record): fixed invalid value display bug. * ipmi-sensors/src/sensors-very-verbose-display.c (sensors_display_very_verbose_compact_record): like wise. 2006-08-08 A Balamurugan * ipmi-sensors/src/ipmi-sensors-utils.c (round_double2): fixed a bug. * ipmi-sensors/src/sensors-simple-display.c: included ipmi-sensors-utils.h. 2006-08-08 A Balamurugan * ipmi-sensors/src/ipmi-sdr-api.c (load_sdr_cache): fixed improper count calculation. * ipmi-sensors/src/ipmi-sensors-utils.[ch] (round_double2): new function. * ipmi-sensors/src/sensors-simple-display.c (sensors_display_simple_full_record, sensors_display_simple_compact_record): numbers are rounded to 2 decimal places. 2006-08-07 A Balamurugan * ipmi-sensors/Makefile.am, ipmi-sensors/ipmi-sensors.8.pre.in, ipmi-sensors/src/Makefile.am, ipmi-sensors/src/ipmi-sdr-api.[ch], ipmi-sensors/src/ipmi-sensors-argp.[ch], ipmi-sensors/src/ipmi-sensors-utils.[ch], ipmi-sensors/src/ipmi-sensors.c, ipmi-sensors/src/sensors-simple-display.[ch], ipmi-sensors/src/sensors-verbose-display.[ch], ipmi-sensors/src/sensors-very-verbose-display.[ch]: new files. * Makefile.am, configure.ac: updated for initial C version of ipmi-sensors. 2006-08-04 Albert Chu * common/src/ipmi-sensor-api.c (ipmi_get_threshold_message_list): Redo due to interpretation of get sensor reading command. * bmc-config/src/bmc-commit.c (bmc_commit_file): Continue committing fields in the same section even if a previous one fails. 2006-08-03 Albert Chu Revert section failure flag implementation from 2006-08-02 in favor of a different solution. * bmc-config/src/bmc-sections.h: Remove flags BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE. * bmc-config/src/bmc-user-sections.c (username_checkout): Remove userpassword test for section checkoutability. * bmc-config/src/bmc-user-sections.c (get_user_section): Remove BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE support. * bmc-config/src/bmc-checkout.c (bmc_checkout_file): Remove BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE flag support. Alter bmc-config commit behavior * bmc-config/src/bmc-commit.c (bmc_commit_file): Continue committing fields even if a previous one fails. Misc * freeipmi.spec.in: Update for librrary version and autoconfig. * bmc-config/src/bmc-sections.h: Clean up junk. 2006-08-02 Albert Chu Don't checkout user id sections if a particular user id isn't supported. * bmc-config/src/bmc-config-api.c (get_bmc_username): Copy "NULL" after the IPMI call to ensure the username is readable. * bmc-config/src/bmc-sections.h: New flags BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE. * bmc-config/src/bmc-user-sections.c (username_checkout): Add userpassword test for section checkoutability. * bmc-config/src/bmc-user-sections.c (password20_checkout): Use userid in check password call. * bmc-config/src/bmc-user-sections.c (get_user_section): Support BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE. * bmc-config/src/bmc-checkout.c (bmc_checkout_file): Support BMC_SECTION_FAILURE_FLAG and BMC_NO_CHECKOUT_ON_EARLIER_SECTION_FAILURE flag. Misc * freeipmi.spec.in: Fix for new library version and bmc-autoconfig. * bmc-config/src/bmc-sections.h: Remove junk code. 2006-08-02 Albert Chu * bmc-config/src/bmc-commit.c (bmc_commit_file): Output message on error. * bmc-config/src/bmc-lan-conf-section.c (bmc_lan_conf_section_get): Fix Vlan ID string. * libfreeipmi/src/ipmi-openipmi-api.c: Minor code cleanup. 2006-08-01 Albert Chu * fish/src/fish-argp.c (fi_argp_parse), fish/src/ipmi-wrapper.c (fi_ipmi_close, fi_ipmi_close, fi_get_ipmi_device), fish/src/scm-procedures.c (ex_ipmi_open): Minor temporary fixes to make ipmi-sensors work again. 2006-07-30 Albert Chu * freeipmi.spec.in: Re-architect packages. 2006-07-29 Albert Chu * libfreeipmi/src/ipmi-ssif-api.c (_ipmi_ssif_cmd_write, _ipmi_ssif_cmd_read, ipmi_ssif_cmd): New functions. * bmc-watchdog/src/: Support ssif driver, --driver-type option, --driver-address option, and --driver-device option. * bmc-watchdog/bmc-watchdog.8.in, doc/freeipmi.texi: Updated with new options. * libfreeipmi/, bmc-watchdog/: Change locate structure bmc_i2c_dev_name to driver_device and base_address to driver_address globally for consistency. Adjust kcs, ssif, openipmi apis for consistency. 2006-07-28 Albert Chu Various cleanup * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_dump, _ipmi_lan_dump_rq): Rework request dump output, since calculations won't have a trailer. * libfreeipmi/src/ipmi-kcs-api.c: Add forgotten headers. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Fix ssif memcopying bug. * libfreeipmi/srd/udm/ipmi-udm-device.h: Remove locate_info. Not necessary to store in device. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Adjust for device structure change. Add OpenIPMI as a possibly driver to use with FreeIPMI * libfreeipmi/src/ipmi-openipmi-api.c, libfreeipmi/include/freeipmi/ipmi-openipmi-api.h, libfreeipmi/srd/udm/ipmi-openipmi-api-udm.c, libfreeipmi/include/freeipmi/udm/ipmi-openipmi-api-udm.h: New files. * libfreeipmi/src/Makefile.am, libfreeipmi/src/udm/Makefile.am, libfreeipmi/include/Makefile.am: Adjust for new files appropriately. * libfreeipmi/src/udm/ipmi-udm-device.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband, ipmi_close_device, _ipmi_inband_close, _ipmi_inband_free, ipmi_cmd_raw, ipmi_cmd): Add openipmi driver support. * libfreeipmi/src/ipmi-locate-acpi-spmi.c: Up interface count. * common/doc/argp-common-inband.man, common/src/argp-common.h, common/src/argp-common.c: Support openipmi driver type. * bmc-config/, bmc-info/, fish/, ipmi-raw/, ipmi-sel/: Support openipmi driver. Add more debugging * common/src/err-wrappers.h (ERR_LOG): New debugging macro. * libfreeipmi/src/ipmi-kcs-api.c, libfreeipmi/src/ipmi-ssif-api.c, libfreeipmi/src/ipmi-openipmi-api.c: Employ new debugging macro. 2006-07-27 Albert Chu Convert mode parameters to flag parameters * libfreeipmi/src/udm/ipmi-udm-device.h, libfreeipmi/include/freeipmi/udm/ipmi-udm.h: Convert parameter mode into flags parameter. Adjust definitions appropriately. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband, ipmi_open_inband): Adjust for use of flags parameter. * bmc-config/, bmc-info/, doc/udm-test/, fish/src/, ipmi-raw/, ipmi-sel/: Adjust for new flag use appropriately. * libfreeipmi/include/freeipmi/ipmi-kcs-api.h, libfreeipmi/include/freeipmi/ipmi-ssif-api.h: Convert parameter mode into flags parameter. Adjust definitions appropriately. * libfreeipmi/src/ipmi-kcs-api.c, libfreeipmi/src/ipmi-ssif-api.c: Adjust for flags changes appropriately. * bmc-watchdog/: Adjust for flags changes appropriately. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Adjust for use of kcs and ssif flags. Add support for debug dump. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h (IPMI_FLAGS_DEBUG_DUMP): New define. * libfreeipmi/src/ipmi-lan-interface-udm.c (_ipmi_lan_dump, _ipmi_lan_dump_rq, _ipmi_lan_dump_rs): New functions. * libfreeipmi/src/ipmi-udm.c (ipmi_cmd), libfreeipmi/src/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send, _ipmi_lan_cmd_recv): Add debug dump support. * common/src/argp-common.h, common/src/argp-common.c: Support debug option. * bmc-config/: Remove internal debug flag option. Convert to use argp-common debug option. * bmc-config/, bmc-info/, fish/, ipmi-raw/, ipmi-sel/: When debugging is turned on, turn on dump output. * common/doc/argp-common-debug.man: New file. * common/doc/Makefile.am: Update for new file. * bmc-config/, bmc-info/, ipmi-sel/, ipmi-raw/, fish/: Update manpages with debug option. 2006-07-27 A Balamurugan * fish/src/ipmi-wrapper.c (fi_ipmi_open): fixed improper argument passing to ipmi_open_inband(). 2006-07-27 A Balamurugan * libfreeipmi/include/freeipmi/ipmi-locate.h: removed locate_driver in struct ipmi_locate_info. * ipmi-locate/src/ipmi-locate.c (display_ipmi_locate_info), libfreeipmi/src/ipmi-locate-dmidecode.c (dmi_table), libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Adjusted struct ipmi_locate_info change accordingly. 2006-07-27 A Balamurugan * ipmi-locate/src/ipmi-locate.c (display_ipmi_locate_info): displays 'DMIDECODE' locate_driver_type. 2006-07-27 A Balamurugan * bmc-config/bmc-config.8.pre.in: removed unclosed double quote. * ipmi-locate/src/ipmi-locate.c: Fixed bug in return value check of ipmi_locate_*_get_dev_info calls. * libfreeipmi/src/ipmi-locate.c (ipmi_locate): clears linfo before calling probing functions. 2006-07-27 Albert Chu * fish/scripts/bmc-autoconfig/: Removed all files. * bmc-config/bmc-autoconfig/Makefile.am: Use $(localstatedir) * libfreeipmi/src/udm/Makefile.am: Dist ipmi-udm-device.h. * libfreeipmi/Makefile.am: Fix ipckey installation. * bmc-watchdog/Makefile.am: Fix distcheck. 2006-07-27 Anand V. Avati * bmc-config/bmc-autoconfig: moved from fish/scripts/bmc-autoconfig * bmc-config/bmc-autoconfig/bmc-autoconfig.8: man page for bmc-autoconfig 2006-07-26 Albert Chu * common/src/argp-common.c (init_common_cmd_args): Make default authentication type MD5 * common/doc/argp-common-authtype.man: Make default authentication type MD5. * common/doc/argp-common-inband.man: Add register spacing option. Various cleanup. * libfreeipmi/include/freeipmi/ipmi-locate.h (IPMI_INTERFACE_MAX, IPMI_INTERFACE_LAST): Removed macro. * libfreeipmi/src/ipmi-locate-acpi-spmi.c (ipmi_acpi_get_spmi_table): Adjust appropriately. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h (IPMI_POLL_INTERVAL_USECS): Removed macros. * libfreeipmi/src/udm/ipmi-udm.c: Move necessary macros here. * libfreeipmi/include/freeipmi/ipmi-smic-interface.h: Remove file. * libfreeipmi/src/ipmi-smic-interface.c: Bring in appropriate macros. * libfreeipmi/include/freeipmi/ipmi-smic-api.h: New file. * libfreeipmi/src/ipmi-smic-interface.c: Rename to ipmi-smic-api.c. * libfreeipmi/: Adjust appropriate Makefiles files. * doc/authors.texi, doc/freeipmi.texi, ipmiping/ipmiping.8.in, rmcpping/rmcpping.8.in: Fixes and updates. Add backwards compatability fixes in bmc-config. * bmc-config/src/bmc-sections.h (BMC_DO_NOT_CHECKOUT): New flag. * bmc-config/src/bmc-user-sections.c (get_user_section): Support new LAN_Enable_Restrict_to_Callback key and Serial_Enable_Restrict_to_Callback key for backwards compatability. Both cannot be checked out. * bmc-config/src/bmc-checkout.c (bmc_checkout_file): Support BMC_DO_NOT_CHECKOUT flag. * bmc-config/src/bmc-serial-conf-section.c (bmc_serial_conf_section_get): Support new Call_Retry_Time key for backwards compatability. It cannot be checked out. 2006-07-25 Albert Chu * common/src/err-wrappers.h (__IPMI_TRACE_ERRMSG_CLEANUP): New macro. * common/src/err-wrappers.h (ERR_IPMI_CMD_CLEANUP): Add errmsg support. * doc/freeipmi-faq.texi: Minor tweaks and updates. * configure.ac: Update lib version. * common/src/argp-common.h, common/src/argp-common.c (common_parse_opt): Make default authentication type MD5. Remove OEM authentication type. * bmc-config/src/bmc-sol-conf-section.c (bmc_sol_conf_section_get): Have SOL port commented out on checkout by default. 2006-07-24 Albert Chu * bmc-config/src/bmc-user-section.c (get_user_section, enable_user_checkout): Comment out the "Enable User" option as default behavior. * bmc-config/src/bmc-user-section.c (get_user_section): Remove "Clear_Password" key. * bmc-config/src/bmc-user-section.c (clear_password_checkout, clear_password_commit, clear_password_diff, clear_password_validate): Remove functions. * libfreeipmi/src/ipmi-locate.c (ipmi_locate): Add back ipmi_locate_defaults_get_dev_info() to things to try list. * bmc-config/src/bmc-config-api.c (set_bmc_enable_user): Add workaround for return of 0xC7 issue. 2006-07-24 A Balamurugan * ipmi-locate/src/ipmi-locate.c (dmidecode_probe_display): modified according to api change. 2006-07-23 A Balamurugan * ipmi-locate/src/ipmi-locate.c (dmidecode_probe_display): new function. * ipmi-locate/src/ipmi-locate.c (main): uses dmidecode probing. * libfreeipmi/include/freeipmi/ipmi-slave-address-spec.h: uses 0x42 as IPMI_SSIF_SMBUS_SLAVE_ADDRESS. * libfreeipmi/src/ipmi-locate.c (ipmi_locate): removed ipmi_locate_defaults_get_dev_info() in things_to_try list. 2006-07-23 Albert Chu * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband, ipmi_open_outofband): Re-work API style to be consistent. Pass hostname to outofband function rahter than sockaddr. * libfreeipmi/src/udm/ipmi-lan-interface.c: Adjust code appropriately. * doc/examples/, bmc-config/, bmc-info/, ipmi-raw/, ipmi-sel/: Adjust appropriately for API changes. * ac_gethostbyname_r.m4: New file. * configure.ac: Add gethostbyname check. * ipmi-sel/src/ipmi-sel-wrapper.c (_parse_sel_record), libfreeipmi/src/ipmi-locate-defaults.c (ipmi_locate_defaults_get_dev_info): Fix compiler warnings. 2006-07-22 Albert Chu Hide struct ipmi_device from users in the libfreeipmi API. * libfreeipmi/src/udm/ipmi-udm-device.h: New file. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h: Remove struct ipmi_device. Typedef new ipmi_device_t. Modify udm functions to return ipmi_device_t. * libfreeipmi/: Globally readjust code to take new ipmi_device_t, check magic numbers, use struct appropriately. * fish/, bmc-info/, bmc-config/, ipmi-sel/, ipmi-raw/: Readjust code appropriately. Remove ipmi_locate_info_t typedef. Replace with struct pointer globally. Re-adjust struct and API to return structure as parameter, rather than pointer. * libfreeipmi/include/freeipmi/ipmi-locate.h, libfreeipmi/src/ipmi-locate.c (ipmi_locate_destroy): Remove function. * libfreeipmi/include/freeipmi/ipmi-locate.h: Adjust function prototypes. * libfreeipmi/src/ipmi-locate.c, libfreeipmi/src/ipmi-locate-acpi-spmi.c, libfreeipmi/src/ipmi-locate-defaults.c, libfreeipmi/src/ipmi-locate-dmidecode.c, libfreeipmi/src/ipmi-locate-pci.c, libfreeipmi/src/ipmi-locate-smbios.c: Adjust code appropriately. * libfreeipmi/src/udm/: Adjust code appropriately. * bmc-watchdog/, ipmi-locate/: Adjust code appropriately. 2006-07-21 Albert Chu * bmc-config/src/bmc-config.c (main): Close ipmi. * bmc-config/src/: Globally alter calls to "fi_" functions, since fish is no longer used. * bmc-config/src/bmc-ipmi-wrapper.h, bmc-config/src/bmc-ipmi-wrapper.c (fi_get_ipmi_device, fi_ipmi_open, fi_ipmi_close, get_channel_info_list, get_sdr_cache_filename, get_lan_channel_number_known, get_serial_channel_number_known, display_get_device_id, ipmi_ping): Remove functions and related structs. * bmc-config/src/bmc-ipmi-wrapper.h, bmc-config/src/bmc-ipmi-wrapper.c (get_lan_channel_number, get_serial_channel_number, get_sol_channel_number): Take ipmi_device_t as an argument. * bmc-config/src: Adjust remaining code appropriately. * bmc-config/src/bmc-rmcpplus-conf-privilege-section.c (bmc_rmcpplus_conf_privilege_section_get): Remove duplicate entry. * bmc-config/bmc-config.conf.5.in: Updated with ipmi 2.0 stuff. Cleanup fish by removing dead code. * fish/src/ipmi-wrapper.h, fish/src/ipmi-wrapper.c (get_lan_channel_number_known, get_serial_channel_number_known, display_get_device_id, display_channel_info, get_channel_info_list): Remove functions. * fish/extensions/bmc-info.scm, fish/extensions/bmc-config.scm, fish/extensions/bc-user-section.scm, fish/extensions/bc-common.scm, fish/extensions/bc-lan-conf-auth-section.scm, fish/extensions/bc-lan-conf-misc-section.scm, fish/extensions/bc-lan-conf-section.scm, fish/extensions/bc-lan-conf-security-keys-section.scm, fish/extensions/bc-lan-serial-channel-section.scm, fish/extensions/bc-misc-section.scm, fish/extensions/bc-pef-conf-section.scm, fish/extensions/bc-rmcpplus-conf-privilege-section.scm, fish/extensions/bc-section.scm, fish/extensions/bc-serial-conf-section.scm, fish/extensions/bc-sol-conf-section.scm, fish/extensions/sel.scm: Removed files. * fish/extensions/Makefile.am: Adjust appropriately. * fish/src/scm-procedures.h, fish/src/scm-procedures.c (ex_cmd_get_device_id_display): Remove functions. * fish/src/extension.c (install_new_procedures): Remove appropriate scheme hooks. * fish/bmc-config.conf.5.in: Remove file. Other cleanup * common/src/ipmi-common.h, common/src/ipmi-common.c (ipmi_open_free_udp_port, ipmi_error): Removed functions. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): Adjust appropriately. * fish/src/common.h, fish/src/ipmi-wrapper.c (ipmi_ping): Adjust appropriately. * fish/src/scm-procedures.h, fish/src/scm-procedures.c (ex_get_bmc_info): Remove function. * bmc-info/src/bmc-info.c (display_get_device_id), fish/src/scm-procedures.c (ex_get_sdr_repository_info, ex_get_pef_info): Adjust appropriately for ipmi_error() removal . * libfreeipmi/src/ipmi-sol-cmds.c: Fix tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs template bug. * common/src/argp-common.h, bmc-config/src/bmc-argp.c, ipmi-raw/src/ipmi-raw-argp.c: Fix help output ordering. * libfreeipmi/src/udm/ipmi-rmcpplus-support-and-payload-cmds-udm.c (ipmi_cmd_set_user_payload_access, ipmi_cmd_get_user_payload_access): Add dev checks. BMC-Config fixes galore * Globally use libfreeipmi/include definitions, not hardcoded values. * Globally fix indenting/code style to match rest of FreeIPMI. * bmc-config/src/bmc-sol-conf-section.c (character_accumulate_interval_validate): Fix range check. * Globally support keyvalue flags. * bmc-config/src/bmc-checkout.c (bmc_checkout_file): Use flags to automatically comment out certain keys. * bmc-config/src/bmc-user-sections.c (password20_checkout): Ensure Password20 is a reasonable checkoutable value. * bmc-config/src/bmc-types.h, bmc-config/src/bmc-argp.c: Support debug option. * bmc-config/src/bmc-parser.c (bmc_parser): Output debugging on debugging only. * bmc-config/src/bmc-util.c: Remove file. * bmc-config/src/bmc-map.h, bmc-config/src/bmc-map.c: New files. * bmc-config/src/Makefile.am: Adjust appropriately. * bmc-config/src: Use new common map functions. * bmc-config/src/bmc-common.h: Fix autoconf and header use. * bmc-config/src/: Use headers consistently across files. * bmc-config/src/bmc-misc-section.c, bmc-config/src/bmc-lan-channel-section.c, bmc-config/src/bmc-serial-channel-section.c, bmc-config/src/bmc-map.c: Fix strings for backwards compatability. 2006-07-20 Albert Chu * fish/extensions/sensors-simple-display.scm (sensors-display-simple): Don't output event sensors. * common/src/ipmi-sensor-api.c (get_sensor_reading): Output debug info when a record isn't supported for sensor readings. 2006-07-21 A Balamurugan * libfreeipmi/src/udm/ipmi-ssif-api-udm.c (ipmi_ssif_cmd_udm): fixed bug of calling ipmi_ssif_read(). 2006-07-20 Albert Chu * common/src/ipmi-sensor-api.c, common/src/ipmi-sel-api.c, ipmi-sel/src/ipmi-sel-wrapper.c: Fix compile bugs. * libfreeipmi/src/ipmi-sensor-cmds.c (ipmi_get_threshold_message): Fix backwards logic bug. * fish/extensions/sensors-simple-display.scm (sensors-display-simple-full-record), fish/extensions/sensors-verbose-display.scm (sensors-display-verbose-full-record), fish/extensions/sensors-very-verbose-display.scm (sensors-display-very-verbose-full-record): Fix output bug. * fish/src/scm-procedures.h: Remove lingering sel code. Remove ipmi-sel API common lib . * common/src/ipmi-sel-api.h, common/src/ipmi-sel-api.c: Remove files. * ipmi-sel/src/ipmi-sel-wrappers.h, ipmi-sel/src/ipmi-sel-wrappers.c: Merge in code for ipmi-sel API appropriately. * common/src/Makefile.am, ipmi-sel/src/Makefile.am: Adjust appropriately. * fish/src/Makefile.am, fish/src/common.h, fish/src/ipmi-wrappers.h, fish/src/ipmi-wrappers.c, bmc-config/src/bmc-common.h, bmc-config/src/bmc-ipmi-wrapper.h: Adjust appropriately. 2006-07-19 Albert Chu * libfreeipmi/include/freeipmi/ipmi-sensor-event-messages.h: Renamed ipmi-sensor-and-event-code-tables.h and code adjusted appropriately. * libfreeipmi/src/ipmi-sensor-event-messages.c: Renamed ipmi-sensor-and-event-code-tables.c. * libfreeipmi/include/freeipmi/freeipmi.h, libfreeipmi/include/Makefile.am, libfreeipmi/src/Makefile.am: Adjusted appropriately. Fix threshold event message output bug. * libfreeipmi/include/freeipmi/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-sensor-cmds.c (ipmi_get_threshold_message): New function. * common/src/ipmi-sensor-api.c (ipmi_get_threshold_message_list): New function. * common/src/ipmi-sensor-api.c (get_sensor_reading): Use new function to output appropriate threshold strings. 2006-07-19 A Balamurugan * libfreeipmi/src/ipmi-locate.c (ipmi_locate): fixed bug of NULL pointer operation. 2006-07-19 A Balamurugan * libfreeipmi/src/ipmi-locate-dmidecode.c (ipmi_locate_dmidecode_get_dev_info): fixed bug of invalid handle of return value. 2006-07-19 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Remove "driver_device" input requirement for KCS w/o probing. * ipmi-sel/src/ipmi-sel-argp.c: Change conflicting command line option key. 2006-07-18 Albert Chu * bmc-config/src/bmc-config.c (_disable_coredump), bmc-info/src/bmc-info.c (_disable_coredump), ipmi-raw/src/ipmi-raw.c (_disable_coredump), ipmi-sel/src/ipmi-sel.c (_disable_coredump): New function. * bmc-config/src/bmc-config.c (main), bmc-info/src/bmc-info.c (main), ipmi-raw/src/ipmi-raw.c (main), ipmi-sel/src/ipmi-sel.c (main): Fix bug #17104, do not core dump by default. * bmc-config/src/bmc-config.c (main), bmc-info/src/bmc-info.c (main), ipmi-sel/src/ipmi-sel.c (main): Fix non-debug compile bugs. * bmc-config/src/bmc-config.c (ipmi_core_init): Exit on inband errors, don't return -1. * bmc-config/src/bmc-config.c (ipmi_core_init, main), bmc-info/src/bmc-info.c (main), ipmi-raw/src/ipmi-raw.c (main), ipmi-sel/src/ipmi-sel.c (main): Fix bug #17143, bad output for inband permission denied. * libfreeipmi/src/ipmi-locate.c, libfreeipmi/src/ipmi-locate-smbios.c, libfreeipmi/src/ipmi-rmcpplus-interface.c, libfreeipmi/src/ipmi-rmcpplus-utils.c, ipmipower/src/ipmipower_packet.c, ipmipower/src/ipmipower_powercmd.c, fish/src/bmc-conf2.c, bmc-config/src/bmc-config-api.c: Fix compile warnings. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_recv): Fix retransmission timing bug (#17103). * fish/bmc-config.8.pre.in, fish/ipmi-sel.8.pre.in, fish/src/bmc-conf2.h, fish/src/bmc-conf2.c: Removed files. * fish/src/scm-procedures.c, fish/src/extension.c, fish/src/common.h, fish/Makefile.am: Adjust appropriately. * fish/src/scm-procedures.c, fish/src/extensions.c: Remove remaining ipmi-sel related code. * libfreeipmi/src/ipmi-semaphores.h: Remove out of band keys. * libfreeipmi/src/ipmi-semaphores.h, libfreeipmi/src/ipmi-semaphores.c (ipmi_mutex_init): Calculate key internally, not through passed in key. * libfreeipmi/src/ipmi-kcs-api.c (ipmi_kcs_ctx_create), libfreeipmi/src/ipmi-ssif-api.c (ipmi_ssif_ctx_create): Adjust for ipmi_mutex_init change. * libfreeipmi/src/Makefile.am, libfreeipmi/src/ipmi-semaphores.c (ipmi_mutex_init): Workaround lack of ipckey file when doing debug work out of the build directory. Remove packet_retry from UDM lan. Replace with session timeout (bug #17102). * common/src/argp-common.h, common/src/argp-common.c (common_parse_opt, init_common_cmd_args): Remove support for packet retry, support session timeout. * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): Adjust for use with session timeout. Adjust udm device_t structure for use. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_session_timed_out, _calculate_timeout): New functions. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send, _ipmi_lan_cmd_recv, ipmi_lan_cmd, ipmi_lan_cmd_raw): Add support for session timeout. * bmc-config/src/bmc-config.c (ipmi_core_init), bmc-info/src/bmc-info.c (main), fish/src/ipmi-wrapper.c (fi_ipmi_open), fish/src/scm-procedures.c (ex_ipmi_open), ipmi-raw/src/ipmi-raw.c (main), ipmi-sel/src/ipmi-sel.c (main): Adjust for change in ipmi_open_outofband. 2006-07-18 A Balamurugan * libfreeipmi/src/ipmi-locate-dmidecode.c (dmi_table): initialize reg_space and bmc_i2c_dev_name to default value when device is SSIF. 2006-07-17 Albert Chu * bmc-config/src/bmc-user-sections.c, bmc-lan-conf-security-keys-section.c: Fix various gcc 4.0 warnings. 2006-07-14 Albert Chu * bmc-config/src/bmc-lan-channel-section.c, bmc-config/src/bmc-serial-channel-section.c: Globally replace "available always" with "always available" to match IPMI spec. * bmc-config/src/bmc-lan-conf-auth-section.c: Globally replace "Auth_Straight" with "Auth_Type_Straight" and "Auth_OEM" with "Auth_Type_OEM" for consistency. * bmc-config/src/bmc-misc-section.c (bmc_misc_section_get): Rename section "Misc" for consistency and backwards compatability. * bmc-config/src/bmc-user-section.c (username_validate, username_diff): Accept username "Anonymous" for userid 1 for backwards compatability. * bmc-config/src/bmc-user-sections.c (password_diff, password20_diff): Fix diff reporting bug. * bmc-config/src/bmc-serial-conf-section.c (serial_conf_commit): Fix seg-fault. * bmc-watchdog/src/bmc-watchdog.c (_cmdline_parse): Use base '0' on strtol. * bmc-config/src/bmc-sol-conf-section.c (sol_privilege_level_validate): Fix comparison bug. * bmc-config/src/bmc-checkout.c (bmc_checkout_file): Only output description if checkout is successful. Do not output FATAL message unless verbose turned on. * bmc-config/src/bmc-config-api.c (get_k_r, get_k_g): Fix memcpy bugs. 2006-07-14 A Balamurugan * common/src/argp-common.c: initialize errno before calling strtol(). * ipmi-sel/src/ipmi-sel-argp.c: like wise. * fish/src/scm-procedures.c (ex_string2number): new function. * fish/src/extension.c: added fi-string->number primitive procedure. * fish/extensions/bc-common.scm, fish/extensions/bmc-info.scm, fish/extensions/pef.scm, fish/extensions/sensors-common.scm: uses fi-string->number. * fish/extensions/sel.scm: uses fi-string->number and fixes of error messages. * libfreeipmi/src/ipmi-locate-dmidecode.c: new file. * libfreeipmi/src/ipmi-locate.c: uses dmidecode probing. * libfreeipmi/include/freeipmi/ipmi-locate.h: like wise. * libfreeipmi/src/Makefile.am: updated. 2006-07-13 Albert Chu * configure.ac, libfreeipmi/src/Makefile.am: Move IPMI_IPCKEY out of autoconf and into libfreeipmi CFLAG definition. * bmc-config/bmc-config.8.pre.in: Add note about required ADMIN privleges. * common/src/argp-common.c (common_parse_opt): Fix error output messages. (bug #17091) * common/src/argp-common.c (init_common_cmd_args): Set packet retry and timeout to 0 as default. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): If packet retry and timeout are 0, set to default of 10 retries and 1000 milliseconds. Re-architect to allow ADMIN to be the default privilege for bmc-config (bug #17098). * common/doc/argp-common.man: Removed file. * common/doc/argp-common-inband.man, common/doc/argp-common-outofband.man, common/doc/argp-common-authtype.man, common/doc/argp-common-privlevel.man, common/doc/argp-common-misc.man: New files. * common/doc/Makefile.am: Update for new files. * bmc-config/bmc-config.8.pre.in, bmc-info/bmc-info.8.pre.in, ipmi-raw/ipmi-raw.8.pre.in, ipmi-sel/ipmi-sel.8.pre.in, fish/fish.8.pre.in, fish/bmc-config.8.pre.in, fish/ipmi-sel.8.pre.in, fish/ipmi-sensors.8.pre.in: Adjust for change to new argp common manpage files. Use non-default manpage for priv level on bmc-config.8. * argp-common.h (ARGP_COMMON_OPTIONS): Split into 4 new defines ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND, ARGP_COMMON_OPTIONS_AUTHTYPE, and ARGP_COMMON_OPTIONS_PRIVLEVEL. * bmc-config/src/bmc-argp.c: Use new defines. Make priv-level default ADMIN. * bmc-config/src/bmc-config.c (main): Set appropriate default values. Clear out command line options (bug #16856) * bmc-config/src/bmc-config.c (main), bmc-info/src/bmc-info.c (main), ipmi-raw/src/ipmi-raw.c (main), ipmi-sel/src/ipmi-sel.c (main): Clear out command line options after they are parsed. Support register spacing commandline arguments (bug #16294) * common/src/argp-common.h: Add option and support for value. * common/src/argp-common.c (common_parse_opt): Support parsing. * common/src/argp-common.c (init_common_cmd_args): Support default value. * ipmi-sel/src/ipmi-sel.c (main), ipmi-raw/src/ipmi-raw.c (main), bmc-info/src/bmc-info.c (main), bmc-config/src/bmc-config.c (ipmi_core_init): Support register spacing argument. Fix compile warnings * bmc-config/src/bmc-diff.h: New file * bmc-config/src/Makefile.am: Add bmc-diff.h. * bmc-config/src/bmc-config-api.c: Include bmc-ipmi-wrapper.h. * bmc-config/src/bmc-user-sections.c, bmc-config/src/bmc-lan-channel-section.c, bmc-config/src/bmc-serial-channel-section.c, bmc-config/src/bmc-lan-conf-section.c, bmc-config/src/bmc-lan-conf-auth-section.c, bmc-config/src/bmc-lan-conf-security-keys-section.c, bmc-config/src/bmc-rmcpplus-conf-privilege-section.c, bmc-config/src/bmc-serial-conf-section.c, bmc-config/src/bmc-serial-channel-section.c, bmc-config/src/bmc-sol-conf-section.c, bmc-config/src/bmc-misc-section.c: Include bmc-diff.h * bmc-config/src/bmc-user-sections.c (username_diff): Fix segfault bug. * bmc-config/src/bmc-user-sections.c (get_user_section): Include SOL Payload Access config. * bmc-config/src/bmc-lan-conf-section.c (vlan_id_validate): Fix range issue on compre. 2006-07-12 Albert Chu Rework udm raw functions to take lun and netfn parameters and have API similar to rest of FreeIPMI (bug #16283). * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c (ipmi_cmd_raw): Add lun and netfn parameters. Adjust parameter checks appropriately. Adjust function call style. * libfreeipmi/src/udm/ipmi-kcs-api-udm.c (ipmi_kcs_cmd_raw_udm), libfreeipmi/src/udm/ipmi-ssif-api-udm.c (ipmi_ssif_cmd_raw_udm), libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_cmd_raw_udm): Adjust appropriately for changes. Adjust function call style. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_raw_send_parse, _ipmi_lan_raw_create_cmd, _ipmi_lan_raw_recv_parse): Remove functions. * ipmi-raw/ipmi-raw.8.pre.in: Update for lun and netfn input. * ipmi-raw/src/ipmi-raw.c (main): Check for hex byte lengths. Adjust to read and pass in lun and netfn. Adjust for function call change. Cleanup error output calls. 2006-07-12 Albert Chu Fix lan retransmission issues. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send_orig, _ipmi_lan_cmd_recv_orig, ipmi_lan_cmd_orig): Removed functions. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (ipmi_lan_cmd): Fix sequence numbering bug. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_raw_create_cmd, ipmi_lan_cmd_raw): Support packet retransmissions. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_raw_send, _ipmi_lan_cmd_raw_recv): Removed functions. * common/src/argp-common.h: Adjust output of command line help. * common/src/argp-common.c (init_common_cmd_args): Give legit default values for lan timeout and retransmission. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_recv, ipmi_lan_cmd): Fix lan retransmission bugs. 2006-07-12 A Balamurugan * common/src/argp-common.c: --driver-address, --packet-retry-timeout and --packet-retry-max options accept arg value in decimal, octal and hex. fixed bug #16291. * common/src/Makefile.am: updated. 2006-07-06 A Balamurugan * fish/scripts/bmc-config/Makefile.am, fish/scripts/bmc-config/bmc-config.in: removed. * Makefile.am, configure.ac, fish/Makefile.am, fish/scripts/Makefile.am: updated. * bmc-config/Makefile.am, bmc-config/bmc-config.8.pre.in, bmc-config/bmc-config.conf.5.in, bmc-config/src/Makefile.am, bmc-config/src/bmc-argp.c, bmc-config/src/bmc-checkout.c, bmc-config/src/bmc-commit.c, bmc-config/src/bmc-common.h, bmc-config/src/bmc-config-api.[ch], bmc-config/src/bmc-config.[ch], bmc-config/src/bmc-diff.c, bmc-config/src/bmc-ipmi-wrapper.[ch], bmc-config/src/bmc-lan-channel-section.c, bmc-config/src/bmc-lan-conf-auth-section.c, bmc-config/src/bmc-lan-conf-misc-section.c, bmc-config/src/bmc-lan-conf-section.c, bmc-config/src/bmc-lan-conf-security-keys-section.c, bmc-config/src/bmc-misc-section.c, bmc-config/src/bmc-parser.c, bmc-config/src/bmc-pef-conf-section.c, bmc-config/src/bmc-rmcpplus-conf-privilege-section.c, bmc-config/src/bmc-sections.[ch], bmc-config/src/bmc-serial-channel-section.c, bmc-config/src/bmc-serial-conf-section.c, bmc-config/src/bmc-sol-conf-section.c, bmc-config/src/bmc-types.h, bmc-config/src/bmc-user-sections.c, bmc-config/src/bmc-util.c: new files. now bmc-config is in C. 2006-07-05 A Balamurugan * fish/scripts/sel/Makefile.am, fish/scripts/sel/ipmi-sel.in: removed * configure.ac, fish/Makefile.am, fish/scripts/Makefile.am, ipmi-sel/ipmi-sel.8.pre.in, ipmi-sel/src/Makefile.am: updated for ipmi-sel C version. 2006-07-05 A Balamurugan * ipmi-sel/src/ipmi-sel-argp.[ch]: added --delete-range option. * ipmi-sel/src/ipmi-sel.c: like wise. 2006-06-30 A Balamurugan * ipmi-sel/src/Makefile.am: updated * ipmi-sel/src/ipmi-sel-argp.c (stripwhite, get_token, validate_delete_list_string, get_delete_record_count, get_delete_record_list): new static functions * ipmi-sel/src/ipmi-sel-argp.c, ipmi-sel/src/ipmi-sel-wrapper.c, ipmi-sel/src/ipmi-sel.c: added --delete and --delete-all option support 2006-06-27 Albert Chu * ipmi-sel/ipmi-sel.8.pre.in: Fix output typo. 2006-06-27 A Balamurugan * Makefile.am, configure.ac: added support for C version of ipmi-sel tool. * ipmi-sel/Makefile.am, ipmi-sel/ipmi-sel.8.pre.in, ipmi-sel/src/Makefile.am, ipmi-sel/src/ipmi-sel-argp.c, ipmi-sel/src/ipmi-sel-argp.h, ipmi-sel/src/ipmi-sel-wrapper.c, ipmi-sel/src/ipmi-sel-wrapper.h, ipmi-sel/src/ipmi-sel.c: new files. 2006-06-27 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c, libfreeipmi/src/ipmi-lan-interface.h (ipmi_lan_sendto, ipmi_lan_recvfrom): Fix parameters to match sendto and recvfrom syscalls. * libfreeipmi/include/freeipmi/ipmi-ssif-api.h, libfreeipmi/src/ipmi-ssif-api.c: Move definitions from .h file to .c file. 2006-06-26 Albert Chu * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_recv): Fix compile bug. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send_orig, _ipmi_lan_cmd_recv_orig): Comment out. * ipmipower/src/fd.c, ipmipower/src/ipmipower_util.c, ipmipower/src/secure.c: Fix compile warnings. * configure.ac: Fix IPMI_IPCKEY definition bug. * fish/src/Makefile.am: Fix duplicate IPMI_IPCKEY definition. * freeipmi.spec.in: Fix chkconfig bug. 2006-06-26 A Balamurugan * libfreeipmi/include/freeipmi/ipmi-ssif-api.h: cleanup. * libfreeipmi/src/ipmi-ssif-api.c (ipmi_i2c_smbus_access): cleanup. * libfreeipmi/src/ipmi-ssif-api.c (ipmi_ssif_single_part_write, ipmi_ssif_multi_part_write, _ipmi_ssif_read): new static functions. * libfreeipmi/src/ipmi-ssif-api.c (ipmi_ssif_ctx_io_init, ipmi_ssif_write, ipmi_ssif_read): uses new static functions. 2006-06-26 A Balamurugan * libfreeipmi/include/freeipmi/udm/ipmi-udm.h, libfreeipmi/src/udm/ipmi-udm.c: added support to packet_retry_max and retry_timeout. * common/src/argp-common.[ch]: like wise. * bmc-info/src/bmc-info.c: like wise. * fish/extensions/bc-common.scm: like wise. * fish/extensions/bmc-info.scm: like wise. * fish/extensions/pef.scm: like wise. * fish/extensions/sel.scm: like wise. * fish/extensions/sensors-common.scm: like wise. * fish/extensions/sensors.scm: like wise. * fish/src/ipmi-wrapper.c (fi_ipmi_open): like wise. * fish/src/scm-procedures.c (ex_ipmi_open): like wise. * ipmi-raw/src/ipmi-raw-argp.c: like wise. * ipmi-raw/src/ipmi-raw.c: like wise. * common/doc/argp-common.man: updated. * doc/examples/udm-test.c: updated. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_send, _ipmi_lan_cmd_recv, ipmi_lan_cmd): added packet retransmission support. 2006-06-26 Anand Babu * garpd: forked as a separate project. Not relevant here. * configure.ac: ipckey definition move here. removed garpd references. libfreeipmi/src/Makefile.am: removed CPP defn of IPCKEY. * Makefile.am: removed garpd references. * src/Makefile.am: uses configure.ac defns of IPCKEY. * doc/freeipmi.tex: likewise. * freeipmi.spec.in: likewise. * fish/extensions/sensors-common.scm: fi-sensors-get-default-cache-filename no longer used. Removed. * fish/src/extension.c: likewise. * fish/src/scm-procedures.c,h: likewise. * fish/src/fish.h: FI_DEFAULT_SDR_REPOSITORY_CACHE_FILENAME definition removed. 2006-06-19 Albert Chu * ipmipower/src/secure.h, ipmipower/src/secure.c, ipmipower/src/timeval.h, ipmipower/src/timeval.c: New files. * ipmipower/src/hostlist.h, ipmipower/src/hostlist.c, ipmipower/src/conffile.h, ipmipower/src/conffile.c, ipmipower/src/cbuf.h, ipmipower/src/cbuf.c: Update to latest library version. * ipmipower/src/ipmipower_util.h, ipmipower/src/ipmipower_util.c (Secure_memset, Secure_malloc, Secure_free, millisec_add, millisec_diff, millisec_gt): Removed functions. * ipmipower/src/ipmipower_powercmd.c, ipmipower/src/ipmipower_ping.c, ipmipower/src/ipmipower_config.c, ipmipower/src/ipmipower.c: Adjust to use new functions in secure.[ch] and timeval.[ch]. * ipmipower/src/Makefile.am: Add new files. * ipmipower/src: General code cleanup. 2006-06-16 Albert Chu * ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse): Add comments about arg clearing. 2006-06-06 Albert Chu * Document workaround notes to in-band tools about IBM e325. 2006-06-05 Albert Chu * libfreeipmi/src/ipmi-rmcpplus-interface.c (_construct_session_trlr_authentication_code): Fix MD5 hashing bug. 2006-05-26 Albert Chu * freeipmi.spec.in: Make bmc-watchdog init.d non-replaceable if modified. 2006-05-25 Albert Chu * libfreeipmi/: Security modifications added. 2006-05-24 Albert Chu * ipmipower/, libfreeipmi/: Several security modifications added. * libfreeipmi/src/ipmi-locate-acpi-spmi.c (ipmi_acpi_get_firmware_table): Fix double free bug. * Fix gcc warnings. 2006-05-22 Albert Chu * libfreeipmi/src/ipmi-locate-acpi-spmi.c (ipmi_acpi_get_spmi_table): Fix logic bug. * libfreeipmi/src/fiid.c (fiid_obj_clear, fiid_obj_clear_field): Implement with guaranteed memset. * libfreeipmi/src/freeipmi.map: New file. * libfreeipmi/src/Makefile.am, configure.ac: Hide non-API symbols. * common/src/Makefile.am: Fix build as necessary. 2006-05-19 Albert Chu * bmc-watchdog/src/Makefile.am, bmc-watchdog/src/bmc-watchdog.c: Adjust for changes from 05-18-06. * libfreeipmi/src/ipmi-locate-smbios.c (ipmi_smbios_reg_space): EINVAL return rather than exit. 2006-05-18 A Balamurugan * bmc-watchdog/Makefile.am, fish/src/Makefile.am, libfreeipmi/Makefile.am, libfreeipmi/src/Makefile.am, libfreeipmi/src/ipmi-semaphores.h: Fix of hardcoded paths of some files. Thanks for the patch to Claudio Fontana . 2006-05-16 Albert Chu * freeipmi.spec.in: Add version to changelog. 2006-05-15 Albert Chu * freeipmi.spec.in: Updated with changes from Ben Woodard (woodard at redhat dot com) for Fedora inclusion. * freeipmi.spec.in: Cleaned up some english and updated with changes since 0.2.0. * bmc-watchdog/: Various follow on adjustments. 2006-05-12 Albert Chu * libfreeipmi/include/freeipmi/ipmi-sensor-types-spec.h: Correct #defines. * libfreeipmi/include/freeipmi/ipmi-sdr-record-types.h: Fix redefine bug. 2006-05-11 Albert Chu * libfreeipmi/src/ipmi-sdr-record-types.c, common/src/ipmi-sensor-api.c: Change "sensor_owner_id.id" to "sensor_owner_id". 2006-05-10 Albert Chu * libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/include/freeipmi/ipmi-sensor-utils.h (ipmi_sensor_decode_value): Adjust parameter types for consistency across the library. Add linearization function decoding. * libfreeipmi/src/ipmi-sensor-units-spec.c, libfreeipmi/include/freeipmi/ipmi-sensor-units-spec.h: Added rate units. * libfreeipmi/include/freeipmi/ipmi-sdr-record-types.h: Add analog data format, lineraization, and modifier unit defines. * common/src/ipmi-sensors-api.c (ipmi_sensor_get_decode_parameters): Fix linearization bug. 2006-05-09 Albert Chu * libfreeipmi/src/ipmi-sdr-record-types.c, libfreeipni/include/freeipmi/ipmi-sdr-record-types.h: Updated #defines for consistency with rest ot the library, added missing record types. * common/src/: Updated with name changes appropriately. 2006-05-08 Albert Chu * libfreeipmi/include/freeipmi/ipmi-sdr-repository-cmds.h: Add first and last record id defines. 2006-05-05 Albert Chu * libfreeipmi/: Change all templates and use of "ls_byte" and "ms_byte" to a single template variable. * fish/, bmc-watchdog/: Adjust appropriately. 2006-05-03 Albert Chu * libfreeipmi/src/ipmi-sensor-event-messages.c: Fix message string typo. 2006-05-01 Albert Chu * ipmipower/src/ipmipower_check.c (ipmipower_check_rakp_2_key_exchange_authentication_code): Fix code consistency issue. 2006-04-26 Albert Chu * ipmipower/src/ipmipower_check.c (ipmipower_check_authentication_code, ipmipower_check_payload_pad): Fix check bugs. 2006-04-25 Albert Chu * libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h: Fix password length macros. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h: Add macros to check for cipher support in libfreeipmi. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.c (ipmi_cipher_suite_id_to_algorithms): Adjust with macro change. * libfreeipmi/src/ipmi-messaging-support-cmds.c (fill_cmd_set_user_password, fill_cmd_set_user_password_v20), libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_cmd_set_user_password): Fix up use of password length macros. 2006-04-20 Albert Chu * ipmipower/: Remove support of --no-get-channel-cipher-suites. * ipmipower/: Send Get Channel Cipher command with IPMI 2.0 headers rather than IPMI 1.5 headers. * libfreeipmi/, ipmipower/: Fix cipher suite record parsing. 2006-04-19 Albert Chu * libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_rmcpplus_calculate_payload_type), libfreeipmi/src/ipmi-utils.c (ipmi_is_ipmi_1_5_packet, ipmi_is_ipmi_2_0_packet): Fix parse bugs. * libfreeipmi/include/freeipmi/ipmi-rmcpplus.h, libfreeipmi/src/ipmi-rmcpplus.c (ipmi_rmcpplus_init): New function. * libfreeipmi/: Rename ipmi-rmcpplus-crypt.c to ipmi-crypt.c and ipmi-rmcpplus-crypt.h to ipmi-crypt.h. * libfreeipmi/, ipmipower/: Adjust for modifications. * libfreeipmi/src/ipmi-rmcpplus-support-and-payload-cmds.c: Fix activate payload response bit shit bug. * libfreeipmi/src/ipmi-rmcpplus-debug.c: Fix various mem-leak possibilities. * libfreeipmi/src/ipmi-rmcpplus-interface.c (_construct_session_trlr_pad): Fix padding corner case. 2006-04-18 Albert Chu * libfreeipmi/src/ipmi-sol-cmds.c: Fix critical BMC to Remote Console SOL parsing bug. 2006-04-14 Albert Chu * ipmiping/src/ipmiping.c (parsepacket): Fix warning. * fish/: Attempt to configure based on SOL Payload Channel. 2006-04-13 Albert Chu * fish/src/extension.c (install_new_procedures): Fix function name typo. * libfreeipmi/src/ipmi-utils.c (ipmi_check_completion_code): Fix compile bug. * freeipmi.spec.in: Fix package requirement gcrypt -> libgcrypt. * libfreeipmi/src/ipmi-rmcpplus-support-and-payload-cmds.c: Add forgotten reserved fields to tmpl_get_channel_payload_support_rs. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_dump): Fix compiler warning. * ipmipower/: Re-architect to include set session privilege command in ipmi 2.0 stream. Cleanup code in general. * Globally cleanup template variable names to maintain consistency with "tmpl_cmd" vs "tmpl" prefixed variable names. 2006-04-12 Albert Chu * ipmipower/: Add work to support both interpretations of the "cipher suite id privilege level". * ipmipower/: Add one more intel IPMI 2.0 workaround. * ipmipower/: Add --no-get-channel-cipher-suites workaround. * libfreeipmi/src/ipmi-message-support-cmds.c (fill_cmd_set_channel_security_keys), fish/: Fixes added to support K-R and K-G checkout and configuration. * ipmipower/: Check k_g status during authentication capabilities stage. * ipmiping/: Support k_g output on verbose. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Return error on rakp2 or rakp4 hash errors. * fish/src/scm-procedures.c (ex_set_bmc_user_sol_payload_access): Fix enable/disable bug. 2006-04-11 Albert Chu * libfreeipmi/src/ipmi-rmcpplus.c (fill_rmcpplus_rakp_message_1): Fix compliance bug. * libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h, libfreeipmi/src/ipmi-messaging-support-cmds.c (fill_cmd_set_user_password_v20), libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c: Support password size parameter. * fish/: Support 'Password20' bmc-config option. * ipmipower/: Remove --cipher-suite-records-all-oem option. Migrate workaround into --intel-2-0-session option. Implement additional username padding workarounds for Intel. * libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c (ipmi_cmd_get_session_challenge, ipmi_cmd_activate_session, ipmi_cmd_set_session_privilege_level): Fix errno codes. * ipmipower/: Version auto picks ipmi 1.5 over ipmi 2.0. * common/src/Makefile.am, common/src/ipmi-sdr-repository-cache-api.h, common/src/ipmi-sdr-repository-cache-api.c: Remove sdr repository cache api. * fish/src/bmc-conf2.c (get_k_g, get_k_r): Fix return code bug. 2006-04-09 Albert Chu * libfreeipmi/, fish/, common/: Split record_count of sdr info into ls byte and ms byte like IPMI spec. 2006-04-07 Albert Chu * libfreeipmi/src/ipmi-sdr-repository-cmds.c: Adjust get sdr max record data length. * libfreeipmi/src/ipmi-sdr-record-types.c, libfreeipmi/include/freeipmi/ipmi-sdr-record-types.h, common/src/ipmi-sensor-api.c, common/src/ipmi-sdr-repository-cache-api.c: Fix up template names. 2006-04-06 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_init_ipmi): Check kcs context errnum rather than errno. * libfreeipmi/src/ipmi-udm.c, libfreeipmi/include/freeipmi/ipmi-udm.h: Remove template pointers. * libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/include/freeipmi/ipmi-sol-cmds.h: Various code cleanup. * bmc-info/doc/Makefile.am, bmc-info/doc/bmc-info.8.pre.in, ipmi-raw/doc/Makefile.am, ipmi-raw/doc/ipmi-raw.8.pre.in: Removed files. Moved Makefile.am info and manpages one directory up to be consistent to rest of library. 2006-04-05 Albert Chu * libfreeipmi/src/udm/ipmi-sensor-cmds-udm.c (ipmi_cmd_get_sensor_thresholds): Fix function call cut and paste typo. * common/src/ipmi-sel-api.c (_get_event_message): Fix output bug. 2006-04-04 Albert Chu * libfreeipmi/include/freeipmi/ipmi-sol-cmds.h: Add SOL sequence number max definition. 2006-04-04 Albert Chu * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_inband): Fix no-probing bug. 2006-04-03 Anand Babu * libfreeipmi/src/ipmi-locate-smbios.c: check if record length >= 16. It was > 16 before. Found while running on IBM e325. 2006-04-04 Albert Chu * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_powercmd.c: Remove all use of "error_occurred" flag. The flag is no longer necessary. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Fix check ordering bug. 2006-04-03 Anand Babu * doc/freeipmi-faq.texi: Updated x86-64 platform related questions. * doc/freeipmi.texi: Updated. * fish/bmc-config.8.pre.in: Updated. * freeipmi/fish/extensions/bc-common.scm: verbose flag. Closing bug #16113. * fish/extensions/bmc-config.scm: like wise. * fish/extensions/bc-section.scm: "Not supported" message printed only when verbose. 2006-04-03 Albert Chu * libfreeipmi/include/freeipmi/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_is_ipmi_1_5_packet, ipmi_is_ipmi_2_0_packet): New functions. * libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h, libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_rmcpplus_calculate_payload_type): New function. 2006-03-31 Albert Chu * libfreeipmi/: New ipmi_kcs_cmd() for kcs api. Adjust UDM functions appropriately. * bmc-watchdog/: Implement with KCS api. * libfreeipmi/src/ipmi-semaphores.c (ipmi_mutex_init): Fix errno setting corner case. 2006-03-30 Albert Chu * ipmipower/src/ipmipower_powercmd.c (_send_packet): Remove 'is_retry' parameter which wasn't used. Adjusted calls to _send_packet appropriately. 2006-03-29 Albert Chu * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_process_pending): Poll based on the minimum timeout remaining, not the maximum. 2006-03-28 Albert Chu * ipmiping/ipmiping.8.in, rmcpping/rmcpping.8.in: Add note about local ping. 2006-03-27 Albert Chu * ipmipower/src/ipmipower_wrappers.c (Ipmi_dump_lan_packet, Ipmi_dump_rmcp_packet, Ipmi_dump_rmcpplus_packet): Output debugging on error, do not exit. * ipmipower/src/ipmipower_check.c (ipmipower_check_outbound_sequence_number): Fix ipmi 2.0 corner cases on wrap around. 2006-03-24 Albert Chu * libfreeipmi/: Added appropriate fixes for ipmi 2.0 to handle null passwords. * freeipmi.spec.in: Fix directory name bug. * ipmipower/src: Add privilege check on open session response packet. 2006-03-24 Anand Babu * fish/extensions/sensors-common.scm: fixed bug #16093 - ipmi-sensors help outputs with wrong program name. 2006-03-24 Albert Chu * libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_decode_value), libfreeipmi/include/freeipmi/ipmi-sensor-utils.h: Add and use new analog data format definition validator. * ipmipower/: Alter --intel-2-0-session-activation to --intel-2-0-session. Support additional workarounds with HMAC-MD5-128 authentication on Intel machines. 2006-03-23 Albert Chu * libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h: Support 20 byte passwords in ipmi 2.0 version of Set User Password. * libfreeipmi/include/freeipmi/udm/, libfreeipmi/src/udm/, fish/, ipmipower/: Support 20 byte ipmi 2.0 passwords. * fish/src/bmc-conf2.c (check_bmc_user_password): Fix logic bug. * fish/src/bmc-conf2.c (check_bmc_user_password), libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r): Support set user password completion codes. * ipmipower/ipmipower.8.in: Add workaround note about long passwords on Intel machines. * libfreeipmi/: Re-work privilege level validation macros. Re-do parameters of fill_lan_session_hdr() and fill_rmcpplus_session_hdr(). 2006-03-22 Albert Chu * libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h (ipmi_calculate_rmcpplus_session_keys): Support both k_g and user password. * ipmipower/: Change -k option -m option. Add new -k option to support global BMC key k_g. * fish/: Various bug fixes for SOL and RMCPPLUS Privilege level configurations. * libfreeipmi/, fish/: Support max length of 20 bytes for K_R and K_G desribed in IPMI 2.0 errata. 2006-03-21 Albert Chu * libfreeipmi/src/ipmi-cipher-suite-spec.c (ipmi_cipher_suite_id_to_algorithms): Fix bug. * libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_calculate_sik, ipmi_calculate_rmcpplus_session_keys): Handle name only lookup flag in sik calculations. Fix several corner cases and cleaned up code. * libfreeipmi/src/ipmi-rmcpplus-utils.c (_calculate_k_rakp_hmac): Fix K calculation bug. * libfreeipmi/src/ipmi-rmcpplus-interface.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h: Fix spelling typo in IPMI_MAX_PASSWORD_LENGTH definition. Define and use new IPMI_2_0_MAX_PASSWORD_LENGTH definition. * libfreeipmi/src/ipmi-rmcpplus-interface.c (_construct_session_trlr_authentication_code), libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_rmcpplus_check_packet_session_authentication_code): Fix MD5_128 authentication code calculation bug. * ipmipower/: Support additional cipher algorithms. Fix several bugs. * fish/: Fix various bmc-config bugs. 2006-03-20 Albert Chu * libfreeipmi/src/ipmi-rmcpplus-debug.c (ipmi_dump_rmcpplus_packet): Output packet raw data if it cannot be unassembled. * ipmipower/, libfreeipmi/: Change open_session_rq to open_session_request and open_session_rs to open_session_response to match IPMI spec. * libfreeipmi/include/Makefile.am: Add forgotten header file. * libfreeipmi/src/ipmi-cipher-suite-spec.c, libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h, ipmipower/src/ipmipower_powercmd.c: Fix various "CIHPER" typos. * ipmipower/src/ipmipower_powercmd.c (_calculate_cipher_suite_ids): Fix parse bugs. * libfreeipmi/src/ipmi-rmcpplus.c, libfreeipmi/src/ipmi-cipher-suite-spec.c: Fix oem_iana length error. * fish/extensions/bc-common.scm: Add Rmcpplus Conf Privilege for Callback. * ipmipower/: Add cipher suite id support. Add --cipher-suite-records-all-oem workaround for incorrectly formmatted cipher suite records. Add --intel-2-0-session-activation workaround. Thanks to the ipmitool folks for figuring out how to deal with the RAKP4 issue. * fish/, ipmipower/, libfreeipmi/: Fix various compiler warnings and bugs. 2006-03-17 Albert Chu * libfreeipmi/src/ipmi-debug.c, libfreeipmi/include/freeipmi/ipmi-debug.h: Remove ipmi_debug. * libfreeipmi/src/ipmi-rmcpplus-interface.c, libfreeipmi/src/ipmi-rmcpplus-debug.c: Add SOL payload type support. * libfreeipmi/src/ipmi-rmcpplus-interface.c, libfreeipmi/src/ipmi-rmcpplus-debug.c: General cleanup. * libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/include/freeipmi/ipmi-sol-cmds.h (fill_sol_payload_data): New function. * fish/: Add temporary workaround for configuration of K_G and K_R. 2006-03-16 Albert Chu * libfreeipmi/, fish/: Support SOL_Payload_Access configuration for each user in bmc-config. * fish/extensions/bmc-config.scm, fish/extensions/bc-section.scm, fish/extensions/bc-user-section.scm: Support a 5th user in bmc-config. 2006-03-15 Albert Chu * libfreeipmi/: Minor rmcpplus code cleanup. * ipmipower/: Add architectural support for other IPMI 2.0 cipher suites. Cipher suites other than 0 must still be tested. * fish/: Add initial K_R and K_G bmc-config support to bmc-config. * libfreeipmi/include/freeipmi/ipmi-rmcpplus-crypt.h (ipmi_crypt_init): Add prototype. * libfreeipmi/src/ipmi-rmcpplus-crypt.c (_ipmi_init_crypt): Rename to ipmi_crypt_init. Un-static function. Force user to call before using rmcpplus. * libfreeipmi/src/ipmi-rmcpplus-crypt.c, ipmipower/src/ipmipower.c: Adjust for API change. 2006-03-14 Albert Chu * ipmipower/src/ipmipower_cipher_suite.h, ipmipower/src/ipmipower_cipher_suite.c: New files. * ipmipower/src/ipmipower.h: New cipher suite id definitions. * ipmipower/: Support command line, config file, and prompt configuration of the cipher suite id. * ipmipower/: Support auto detection of IPMI cipher suites. 2006-03-13 Albert Chu * libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h (ipmi_calculate_keys): Renamed to ipmi_calculate_rmcpplus_session_keys. * libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_calculate_rmcpplus_session_keys): Modified for session keys only, not pre-session/rakp keys. * libfreeipmi/src/ipmi-error.c (ipmi_strerror_r), libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h: Additional commands supported. Cleanup. * libfreeipmi/src/ipmi-utils.c (ipmi_check_completion_code): Add syslog and trace debugging. * libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h, libfreeipmi/src/ipmi-messaging-support-cmds.c (fill_cmd_set_channel_security_keys), libfreeipmi/src/ipmi-messaging-support-cmds.c (ipmi_cmd_set_channel_security_keys): Set Channel Security Keys command support. * libfreeipmi/src/ipmi-cipher-suite-spec.c, libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h: Support cipher suite record format templates. * ipmipower/src/ipmipower_wrappers.h, ipmipower/src/ipmipower_wrappers.c (Fiid_obj_set_all): New function. * ipmipower/src/ipmipower_wrappers.c (Fiid_obj_get_data, Fiid_obj_get): Use fiid strerror to output more detailed error message. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h: Support record format defines. * ipmipower/: Support Get Channel Cipher Suites command interating multiple times and parsing out all supported cipher suite ids from the remote machine. * libfreeipmi/, fish/: Rename vlan_id_ls and vlan_id_ms to vlan_id_ls_byte and vlan_id_ms_byte for consistency with other portions of FreeIPMI. 2006-03-12 Albert Chu * fish/extension/bc-rmcpplus-conf-privilege-section.scm: New file. * fish/: Add rmcpplus cipher id configuration. * ipmipower/: Globally change "chassis_status" -> "get_chassis_status" to match ipmi spec. General code cleanup. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_errmsg): Support RAKP error messages. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Support RAKP error messages. 2006-03-11 Albert Chu * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Add additional checks for authentication_type returned from activate session response. * ipmipower/src/ipmipower_packet.h, ipmipower/src/ipmipower_packet.c (ipmipower_packet_response_data): Removed function. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_errmsg): Adjust for function removal. * ipmipower/src/ipmipower_wrappers.h, ipmipower/src/ipmipower_wrappers.c (Fiid_obj_get_data): New function. * libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h (ipmi_rmcpplus_check_session_trlr): Renamed to ipmi_rmcpplus_check_packet_session_authentication_code for consistency. * ipmipower/src/ipmipower_powercmd.c (_recv_packet), ipmipower/src/ipmipower_check.h, ipmipower/src/ipmipower_check.c: Completely redo packet checking for IPMI 1.5. Add full checks for IPMI 2.0. 2006-03-10 Albert Chu * libfreeipmi/src/ipmi-lan-utils.c, libfreeipmi/include/freeipmi/ipmi-lan-utils.h (ipmi_lan_check_checksum): Renamed to ipmi_lan_check_packet_checksum. * ipmiping/src/ipmiping.c (parsepacket), ipmipower/src/ipmipower_powercmd.c (_recv_packet): Adjust for ipmi_lan_check_checksum function name change. * libfreeipmi/src/ipmi-lan-utils.c, libfreeipmi/include/freeipmi/ipmi-lan-utils.h (ipmi_lan_check_checksum): New function. * libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h (ipmi_rmcpplus_check_session_id): New function. * ipmipower/src/ipmipower_powercmd.c (_bad_packet): Removed function. Put code into _recv_packet(). * ipmipower/src/ipmipower_packet.c (_recv_packet): Re-worked for IPMI 2.0 checks. * ipmipower/src/error.c: Increase ERROR_BUFLEN. Remove include of hprintf.h. * ipmipower/src/error.c (cbuf_printf): Remove use of hvsprintf. * ipmipower/src/hprintf.h, ipmipower/src/hprintf.c: Removed files. * ipmipower/src/ipmipower_powercmd (_recv_packet): Began work to check IPMI 2.0 response packets for correctness. * Various gcc compiler warning fixes. * libfreeipmi/src/ipmi-lan-utils.c, libfreeipmi/include/freeipmi/ipmi-lan-utils.h (ipmi_lan_check_session_authentication_code): Renamed to ipmi_lan_check_packet_session_authentication_code. * libfreeipmi/src/udm/ipmi-lan-interface-udm.c (_ipmi_lan_cmd_recv), ipmipower/src/ipmipower_powercmd.c (_recv_packet): Adjust for ipmi_lan_check_checksum function name change. * libfreeipmi/src/ipmi-lan-utils.c, libfreeipmi/include/freeipmi/ipmi-lan-utils.h (ipmi_lan_check_session_authentication_code): New function. * libfreeipmi/src/fiid.c (fiid_obj_packet_valid): Fix corner case. 2006-03-10 Anand Babu * configure.ac: Applied Anand Avati's patch to check installed Guile's version. Replaced gh_enter with scm_boot_guile. gh_* are depricated in Guile 1.8. 2006-03-10 Albert Chu * libfreeipmi/src/ipmi-cipher-suite-spec.c: New file. 2006-03-09 Albert Chu * ipmipower/: Remove randomized initial outbound sequence number. Add support of IPMI 2.0 for chassis status and chassis control. Add sequence number support for IPMI 2.0 session packets. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h: Add cipher suite combination validity checks. * libfreeipmi/src/ipmi-rmcpplus-utils.c (_calculate_k_rakp_none): Removed function. * libfreeipmi/src/ipmi-rmcpplus-utils.c (ipmi_calculate_sik, _ipmi_calculate_k): Fix parameter checks to return errors for invalid cipher combinations. * libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.c (ipmi_rmcpplus_check_rakp_message_2_key_exchange_authentication_code, ipmi_calculate_rakp_3_key_exchange_authentication_code): Rename variables to match ipmi spec. * libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h (tmpl_cmd_get_channel_cipher_suites_rs): New template supported. * ipmipower/src/ipmipower_packet.c (_ipmi_1_5_packet_create, _ipmi_2_0_packet_create): New functions. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_create): Use new functions and cleanup code a lot. * libfreeipmi/include/freeipmi/ipmi-lan-param-spec.h, libfreeipmi/include/freeipmi/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c (fill_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels): Support rmcpplus lan configuration commands. * libfreeipmi/include/freeipmi/udm/ipmi-lan-cmds-udm.h, libfreeipmi/src/ipmi-lan-cmds-udm.c (ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels, ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support, ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries, ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels): New functions. * ipmipower/src/ipmipower_packet.h, ipmipower/src/ipmipower_packet.c (ipmipower_packet_store): Return -1 if packet is unparsable. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Return 0 if packet is unparsable and should be ignored. 2006-03-08 Albert Chu * libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h (fill_cmd_get_channel_cipher_suites): Support Get Channel Cipher Suites command. * libfreeipmi/include/freeipmi/ipmi-cipher-suite-spec.h: New file. * libfreeipmi/include/Makefile.am, libfreeipmi/include/freeipmi/freeipmi.h: Support new .h file. * ipmipower/: Begin crude intial support of IPMI 2.0 by adding IPMI 2.0 Get Authentication Capabilities, Get Channel Cipher Suites, Open Session, and RAKP protocol into protocol state machine. Change -R option to -M option. Add new -R option support protocol selection by user. * libfreeipmi/src/ipmi-rmcpplus-interface.c (assemble_ipmi_rmcpplus_pkt, unassemble_ipmi_rmcpplus_pkt): Fix session trailer assembly bug. 2006-03-07 Albert Chu * libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r): Support for more commands under the rmcpplus support and payload commands section. General code cleanup. * libfreeipmi/include/freeipmi/ipmi-rmcpplus-support-and-payload-cmds.h, libfreeipmi/src/ipmi-rmcpplus-support-and-payload-cmds.c: New templates and functions to support commands under this chapter of the IPMI spec. * common/src/Makefile.am, libfreeipmi/include/Makefile.am: Fix distcheck bugs. * Globally fix gcc 4.0 warnings. * libfreeipmi/include/freeipmi/ipmi-sol-cmds.h, fish/extensions/bc-common.scm (sol-bit-rates), fish/extensions/bc-sol-conf-section.scm: Support bit-rate '0' which means "Use Serial Bit rate". * libfreeipmi/src/ipmi-messaging-support-cmds.c: Fix out of order bug with template fields in tmpl_cmd_get_channel_authentication_capabilities_v20_rs. * ipmiping/src/ipmiping.c (parsepacket): Fix output to match earlier output. 2006-03-06 Albert Chu Collective fixes from branch al_ipmi_2_0_branch at tag al_ipmi_2_0_branch_final. See ChangeLog in branch for detailed day by day changes. LIBFREEIPMI * libfreeipmi/include/freeipmi/ipmi-rmcpplus.h, libfreeipmi/src/ipmi-rmcpplus.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-crypt.h, libfreeipmi/src/ipmi-rmcpplus-crypt.c, libfreeipmi/src/ipmi-rmcpplus-debug.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-interface.h, libfreeipmi/src/ipmi-rmcpplus-interface.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-utils.h libfreeipmi/src/ipmi-rmcpplus-support-and-payload-cmds.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-support-and-payload-cmds.h, libfreeipmi/src/ipmi-rmcpplus-utils.c, libfreeipmi/include/freeipmi/ipmi-rmcpplus-status-spec.h: New files. * libfreeipmi/include/freeipmi/ipmi-debug.h (ipmi_dump_rmcpplus_packet): New function. * libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-error.c (rmcpplus_status_strerror_r): New function. * libfreeipmi/include/freeipmi/ipmi-authentication-type-spec.h: Added IPMI_AUTHENTICATION_TYPE_RMCPPLUS, IPMI_1_5_AUTHENTICATION_TYPE_VALID, and IPMI_2_0_AUTHENTICATION_TYPE_VALID. Adjusted IPMI_AUTHENTICATION_TYPE_VALID appropriately for ipmi 2.0. * libfreeipmi/include/freeipmi/ipmi-privilege-level-spec.h: Added IPMI_1_5_PRIVILEGE_LEVEL_VALID and IPMI_2_0_PRIVILEGE_LEVEL. Adjusted IPMI_PRIVILEGE_LEVEL_VALID appropriately for ipmi 2.0. * libfreeipmi/src/ipmi-lan.c (_ipmi_lan_pkt_rq_min_size,unassemble_ipmi_lan_pkt), libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): Use new IPMI_1_5_SESSION_AUTHENTICATION_TYPE_VALID macro. * libfreeipmi/src/udm/ipmi-udm.c (ipmi_open_outofband): libfreeipmi/src/ipmi-messagging-support-cmds.c (fill_cmd_get_channel_authentication_capabilities, fill_cmd_activate_session, fill_cmd_set_channel_access, fill_cmd_set_session_privilege_level), Use new IPMI_1_5_PRIVILEGE_LEVEL_VALID. * libfreeipmi/include/freeipmi/freeipmi.h: Added ipmi-rmcpplus.h, ipmi-rmcpplus-crypt.h, ipmi-rmcpplus-interface.h, ipmi-rmcpplus-support-and-payload-cmds.h, ipmi-rmcpplus-utils.h, ipmi-rmcpplus-status-spec.h. * libfreeipmi/src/ipmi-utils.c (ipmi_get_random_seed): Utilize #define checks for /dev/urandom and /dev/random. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_get_random): New function. * libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/include/freeipmi/ipmi-sol-cmds.h: Support SOL payloads. Support missing SOL configuration parameters. * libfreeipmi/src/udm/ipmi-sol-cmds-udm.c, libfreeipmi/include/freeipmi/ipmi-sol-cmds-udm.h: Support missing SOL configuration parameters. * libfreeipmi/src/ipmi-error.c, libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h: Support new completion codes and error strings. RMCPPING and IPMIPING * libfreeipmi/src/ipmi-messaging-support-cmds.h, libfreeipmi/src/ipmi-messaging-support-cmds.c (IPMI_GET_IPMI_V20_EXTENDED_DATA, IPMI_GET_IPMI_V15_DATA, IPMI_GET_IPMI_DATA_VALID, tmpl_cmd_get_channel_auth_caps_v20_rq, tmpl_cmd_get_channel_auth_caps_v20_rs, fill_cmd_get_channel_auth_caps_v20): New templates and functions. * ipmiping/src/ipmiping.c, rmcpping/src/rmcpping.c, libfreeipmi/src/ipmi-ping.h, libfreeipmi/src/ipmi-ping.c, rmcpping/rmcpping.8.in, ipmiping/ipmiping.8.in: Added support for ipmi 2.0 ping. * libfreeipmi/src/ipmi-ping.c (_get_rand): Removed function. * libfreeipmi/src/ipmi-ping.c (_main_loop): Use ipmi_get_random rather than _get_rand. IPMIPOWER * ipmipower/src/ipmipower_utils.c (get_rand): Utilize ipmi_get_random. FISH * fish/extensions/bmc-config.scm: Support SOL configuration. * fish/extensions/bc-sol-conf-section.scm: New file. AUTOCONF/AUTOMAKE * configure.ac: Add libgcrypt check. * libfreeipmi/src/Makefile.am, libfreeipmi/include/Makefile.am: Added appropriate new files and libraries. MISC * freeipmi.spec.in: Add gcrypt dependencies. 2006-03-05 Albert Chu * libfreeipmi/include/freeipmi/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r): Update completion code error codes and strings based on updated IPMI 2.0 spec. * libfreeipmi/include/freeipmi/ipmi-ssif-interface.h, libfreeipmi/src/ipmi-ssif-interface.c: Renamed to ipmi-ssif-api.h and ipmi-ssif-api.c respectively. * libfreeipmi/include/freeipmi/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface.c: Renamed to ipmi-kcs-api.h and ipmi-kcs-api.c respectively. * libfreeipmi/include/freeipmi/udm/ipmi-ssif-interface-udm.h, libfreeipmi/src/udm/ipmi-ssif-interface-udm.c: Renamed to ipmi-ssif-api-udm.h and ipmi-ssif-api-udm.c respectively. * libfreeipmi/include/freeipmi/udm/ipmi-kcs-interface-udm.h, libfreeipmi/src/udm/ipmi-kcs-interface-udm.c: Renamed to ipmi-kcs-api-udm.h and ipmi-kcs-api-udm.c respectively. * common/src/err-wrappers.h (ERR_NULL_RETURN): Fix bug. * libfreeipmi/include/freeipmi/freeipmi.h: Move all udm stuff to libfreeipmi/include/freeipmi/udm/udm.h. * libfreeipmi/include/freeipmi/ipmi-slave-address-spec.h: New file. * libfreeipmi/include/freeipmi/ipmi-ssif-api.h, libfreeipmi/include/freeipmi/ipmi-lan.h: Remove defines duplicated by ipmi-slave-address-spec.h. * libfreeipmi/include/freeipmi/ipmi-lan.h (IPMI_LAN_RQ_SEQ_INC): Removed macro. * libfreeipmi/: Adjust makefiles and code appropriately for new includes and defines. * Attempted to convert "addr" abbreviation to "address" globally. * ipmipower/src/ipmipower_auth.h, ipmipower/src/ipmipower_auth.c: Renamed to ipmipower_authentication.h and ipmipower_authentication.c respectively. * ipmipower/: Various code cleanup. Various minor re-architecture of code to eventually support ipmi 2.0. 2006-03-04 Albert Chu * common/src/err-wrappers.h; New macros for errno returns. * common/, libfreeipmi/: Use new macros. Some general code cleanup and bug fixing. 2006-03-03 Albert Chu * libfreeipmi/src/fiid.c, libfreeipmi/include/freeipmi/fiid.h (fidd_template_compare): New function. * libfreeipmi/include/freeipmi/ipmi-debug.h: Export unexecpted data template. * libfreeipmi/include/Makefile.am: Add freeipmi.h. * libfreeipmi/include/freeipmi/ipmi-debug.h: Move defines into ipmi-debug.c. * common/src/md2.h, common/src/md2.c, common/src/md5.h, common/src/md5.c: 'LEN' -> 'LENGTH'. * libfreeipmi/: Adjust code for #define changes. * freeipmi.spec.in: Add %dir directives for /usr/include/freeipmi and /usr/include/freeipmi/udm. * libfreeipmi/: Various variable name changes for consistency. Several function parameter ordering changes for consistency. * configure.ac: Autoconfed getopt.h. * bmc-watchdog/src/bmc-watchdog.c, common/src/ipmi-ping.c, garpd/src/garpd.c, ipmipower/src/ipmipower_config.c: Check for HAVE_GETOPT_H. 2006-03-02 Anand Babu * doc/freeipmi.texi: fixed syntax errors that prevented PDF creation. * doc/authors.texi: fixed email address to evade spammers. 2006-03-02 Albert Chu * Globally rename ipmi_lan_check_session_authcode to ipmi_lan_check_session_authentication_code. * libfreeipmi/src/fiid.c (_fiid_obj_block_len): Removed function. * libfreeipmi/src/fiid.c, libfreeipmi/include/freeipmi/fiid.h (fiid_obj_block_len, fiid_obj_block_len_bytes): New functions. * common/src/fiid-wrappers.h (FIID_OBJ_BLOCK_LEN, FIID_OBJ_BLOCK_LEN_BYTES, FIID_OBJ_BLOCK_LEN_BYTES_CLEANUP, FIID_OBJ_DUP, FIID_OBJ_DUP_CLEANUP, FIID_OBJ_TEMPLATE_COMPARE_CLEANUP): New wrappers. 2006-03-01 Albert Chu * libfreeipmi/: Clear objects before setting in all fill functions. 2006-02-28 Albert Chu * libfreeipmi/include/freeipmi/ipmi-lan-interface.h, libfreeipmi/src/ipmi-lan-interface.c: Split off some code into ipmi-lan.h, ipmi-lan.c, ipmi-lan-utils.h, and ipmi-lan-utils.c. * libfreeipmi/include/freeipmi/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface.c: Split off some code into ipmi-kcs.h and ipmi-kcs.c. * libfreeipmi/src/rmcp.c, libfreeipmi/include/freeipmi/rmcp.h (ipmi_rmcp_check_message_tag): Reverse parameters for consistency to other functions. * libfreeipmi/src/rmcp.h, libfreeipmi/src/rmcp.c: Split off some code into rmcp-utils.h and rmcp-utils.c. * libfreeipmi/src/ipmi-messaging-support-cmds.h (IPMI_MAX_AUTHENTICATION_CODE_LENGTH): Move define to ipmi-lan.h. * Globally re-adjust code for new files, includes, and define locations. * libfreeipmi/src/ipmi-error.c, libfreeipmi/include/freeipmi/ipmi-error.h (ipmi_kcs_strstatus_r): Moved to ipmi-kcs-interface.c. * libfreeipmi/include/freeipmi/ipmi-kcs-interface.h, libfreeipmi/include/freeipmi/ipmi-ssif-interface.h: Cleaned up by moving #defines into ipmi-kcs-interface.c and ipmi-ssif-interface.c. 2006-02-28 Albert Chu * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_completion_code_check): Rename to ipmi_check_completion_code_success for consistency with other functions. * libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h (ipmi_check_comp_code): Renamed to ipmi_check_completion_code. * libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h (ipmi_check_completion_code, ipmi_check_cmd): Moved to ipmi-utils.c and ipmi-utils.h respectively. * common/src/err-wrappers.h: Adjust for function name changes. * libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/include/freeipmi/ipmi-sensor-utils.h (ipmi_sensor_decode_value, ipmi_sensor_get_decode_params): Modify to return error values. * libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/include/freeipmi/ipmi-sensor-utils.h (ipmi_sensor_get_decode_params): Rename to ipmi_sensor_get_decode_parameters. * common/src/ipmi-sensor-api.c, ipmiping/src/ipmiping.c, fish/src/bmc-conf2.c: Adjust for function name and parameter changes. * libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/include/freeipmi/ipmi-sensor-utils.h (ipmi_sensor_get_decode_parameters): Move to ipmi-sensors-api.c and ipmi-sensors-api.h respectively. 2006-02-27 Albert Chu * libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-error.c (ipmi_strerror_r, ipmi_strerror_cmd_r): common/src/ipmi-common.h, common/src/ipmi-common.c (ipmi_error): Support netfn input parameter for command error codes/strings. * common/src/, bmc-info/, bmc-watchdog/: Adjust code appropriately to use new functions. * libfreeipmi/include/freeipmi/ipmi-messaging-support-cmds.h: Split off channel, privilege level, and authentication type defines into ipmi-channel-spec.h, ipmi-privilege-level-spec.h, and ipmi-authentication-type-spec.h respectively. Fix defines and validity checks for channels. * libfreeipmi/: Adjust for new include files. * bmc-info/src/bmc-info.c (display_channel_info, get_channel_info_list), fish/src/ipmi-wrapper.h, fish/src/ipmi-wrapper.c (get_channel_info_list, : Use new defines and checkers appropriately. 2006-02-26 Albert Chu * libfreeipmi/include/freeipmi/udm, libfreeipmi/src/udm: Partition off .c and .h files for udm into subdirectories. * Globally adjust makefiles and includes to work off new include locations. * Remove '2' suffix from all UDM functions. * libfreeipmi/src/ipmi-sdr-repository-cache-api.c, libfreeipmi/src/ipmi-sel-api.c, libfreeipmi/src/ipmi-sensor-api.c, libfreeipmi/include/freeipmi/ipmi-sdr-repository-cache-api.h, libfreeipmi/include/freeipmi/ipmi-sel-api.h, libfreeipmi/include/freeipmi/ipmi-sensor-api.h, libfreeipmi/src/fiid-wrappers.h, libfreeipmi/src/err-wrappers.h, libfreeipmi/src/freeipmi-portability.h, libfreeipmi/src/freeipmi-portability.c: Move to common/src/ as convenience libraries and headers. * fish/, libfreeipmi/: Adjust makefiles and code appropriately for new location of includes and convenience libraries. * common/src/ipmi-sel-api.c, bmc-info/src/bmc-info.c, fish/src/common.h, ipmi-locate/src/ipmi-locate.c, ipmi-raw/src/ipmi-raw.c, libfreeipmi/src/udm/ipmi-messaging-support-cmds-udm.c::Fix include typo with sys/time.h and time.h. 2006-02-25 Albert Chu * libfreeipmi/include/, libfreeipmi/include/freeipmi: Move distributed files into libfreeipmi/include/freeipmi. * Globally re-work includes to work off "freeipmi/X" .h files. * libfreeipmi/src/freeipmi-build.h: Removed file. 2006-02-24 Albert Chu * Continue include reorganization to prepare for libfreeipmi rearchitecture. * common/src/argp-common.c, common/src/ipmi-ping.c, bmc-info/src/bmc-info.c, bmc-info/src/bmc-info-argp.c, bmc-watchdog/src/bmc-watchdog.c, doc/examples/udm-test.c, ipmi-locate/src/ipmi-locate.c, ipmiping/src/ipmiping.c, ipmipower/src/ipmipower_wrappers.h, ipmipower/src/ipmipower.h, rmcpping/src/rmcpping.c, ipmi-raw/src/ipmi-raw.c, ipmi-raw/src/ipmi-raw-argp.c, fish/src/common.h: Remove need for freeipmi-build.h. * common/src/argp-common.h, common/src/md2.h, common/src/md5.h: Fix up includes. * libfreeipmi/src/libfreeipmi.c: Renamed to freeipmi-portability.c. * libfreeipmi/src/Makefile.am: Adjust for file name change. 2006-02-24 Albert Chu * libfreeipmi/src/ipmi-locate-acpi-spmi.h, libfreeipmi/src/ipmi-locate-smbios.h: Remove files. Move #defines into ipmi-locate-acpi-spmi.c and ipmi-locate-smbios.c respectively. * libfreeipmi/src/fiid.c, libfreeipmi/src/ipmi-debug.c, libfreeipmi/src/ipmi-error.c, libfreeipmi/src/ipmi-semaphores.c, libfreeipmi/src/ipmi-locate-defaults.c, libfreeipmi/src/ipmi-locate-smbios.c, libfreeipmi/src/ipmi-locate-acpi-spmi.c, libfreeipmi/src/ipmi-locate-pci.c, libfreeipmi/src/ipmi-sensor-types-spec.c, libfreeipmi/src/ipmi-sensor-event-messages.c, libfreeipmi/src/ipmi-sensor-units-spec.c, libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/src/ipmi-bmc-watchdog-timer-cmds.c, libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/ipmi-device-global-cmds.c, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-messaging-support-cmds.c, libfreeipmi/src/ipmi-pef-and-alerting-cmds.c, libfreeipmi/src/ipmi-sdr-repository-cmds.c, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sensor-cmds.c, libfreeipmi/src/ipmi-serial-modem-cmds.c, libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/src/ipmi-bmc-watchdog-timer-cmds-udm.c, libfreeipmi/src/ipmi-chassis-cmds-udm.c, libfreeipmi/src/ipmi-device-global-cmds-udm.c, libfreeipmi/src/ipmi-lan-cmds-udm.c, libfreeipmi/src/ipmi-messaging-support-cmds-udm.c, libfreeipmi/src/ipmi-pef-and-alerting-cmds-udm.c, libfreeipmi/src/ipmi-sdr-repository-cmds-udm.c, libfreeipmi/src/ipmi-sel-cmds-udm.c, libfreeipmi/src/ipmi-sensor-cmds-udm.c, libfreeipmi/src/ipmi-serial-modem-cmds-udm.c, libfreeipmi/src/ipmi-sol-cmds-udm.c, libfreeipmi/src/ipmi-sdr-record-types.c, libfreeipmi/src/ipmi-sdr-repository-cache-api.c, libfreeipmi/src/ipmi-sensor-api.c, libfreeipmi/src/ipmi-sel-api.c, libfreeipmi/src/ipmi-kcs-interface.c, libfreeipmi/src/ipmi-kcs-interface-udm.c, libfreeipmi/src/ipmi-lan-interface.c, libfreeipmi/src/ipmi-lan-interface-udm.c, libfreeipmi/src/ipmi-smic-interface.c, libfreeipmi/src/ipmi-ssif-interface.c, libfreeipmi/src/ipmi-ssif-interface-udm.c: Remove need for freeipmi-build.h. * libfreeipmi/src/fiid.h, libfreeipmi/src/ipmi-debug.h, libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-semaphores.h, libfreeipmi/src/ipmi-locate-defaults.h, libfreeipmi/src/ipmi-locate-smbios.h, libfreeipmi/src/ipmi-locate-acpi-spmi.h, libfreeipmi/src/ipmi-locate-pci.h, libfreeipmi/src/ipmi-sensor-types-spec.h, libfreeipmi/src/ipmi-sensor-event-messages.h, libfreeipmi/src/ipmi-sensor-units-spec.h, libfreeipmi/src/ipmi-sensor-utils.h, libfreeipmi/src/ipmi-bmc-watchdog-timer-cmds.h, libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-device-global-cmds.h, libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-messaging-support-cmds.h, libfreeipmi/src/ipmi-pef-and-alerting-cmds.h, libfreeipmi/src/ipmi-sdr-repository-cmds.h, libfreeipmi/src/ipmi-sel-cmds.h, libfreeipmi/src/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-serial-modem-cmds.h, libfreeipmi/src/ipmi-sol-cmds.h, libfreeipmi/src/ipmi-bmc-watchdog-timer-cmds-udm.h, libfreeipmi/src/ipmi-chassis-cmds-udm.h, libfreeipmi/src/ipmi-device-global-cmds-udm.h, libfreeipmi/src/ipmi-lan-cmds-udm.h, libfreeipmi/src/ipmi-messaging-support-cmds-udm.h, libfreeipmi/src/ipmi-pef-and-alerting-cmds-udm.h, libfreeipmi/src/ipmi-sdr-repository-cmds-udm.h, libfreeipmi/src/ipmi-sel-cmds-udm.h, libfreeipmi/src/ipmi-sensor-cmds-udm.h, libfreeipmi/src/ipmi-serial-modem-cmds-udm.h, libfreeipmi/src/ipmi-sol-cmds-udm.h, libfreeipmi/src/ipmi-sdr-record-types.h, libfreeipmi/src/ipmi-sdr-repository-cache-api.h, libfreeipmi/src/ipmi-sensor-api.h, libfreeipmi/src/ipmi-sel-api.h libfreeipmi/src/ipmi-ipmb-interface.h, libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface-udm.h, libfreeipmi/src/ipmi-lan-interface.h, libfreeipmi/src/ipmi-lan-interface-udm.h, libfreeipmi/src/ipmi-smic-interface.h, libfreeipmi/src/ipmi-ssif-interface.h, libfreeipmi/src/ipmi-ssif-interface-udm.h: Fix includes. * libfreeipmi/src/Makefile.am: Cleanup. * libfreeipmi/src/freeipmi-portability.h: New file. 2006-02-23 Albert Chu * libfreeipmi/src/ipmi-udm.c (ipmi_open_inband): Fix seg-fault corner case and mem-leak corner case. * ipmi-locate/src/ipmi-locate.c: Fix various mem-leaks. * libfreeipmi/src/ipmi-locate-acpi-spmi.c, libfreeipmi/src/ipmi-locate-acpi-spmi.h, libfreeipmi/src/ipmi-locate-pci.c, libfreeipmi/src/ipmi-locate-pci.h, libfreeipmi/src/ipmi-locate-smbios.c, libfreeipmi/src/ipmi-locate-smbios.h, libfreeipmi/src/ipmi-locate-defaults.c, and libfreeipmi/src/ipmi-locate-defaults.h: Redo locate function interfaces. * libfreeipmi/src/ipmi-locate-pci.h, libfreeipmi/src/ipmi-locate-defaults.h: Remove files. * libfreeipmi/, ipmi-locate/: Adjust for function style changes appropriately. 2006-02-23 Albert Chu * libfreeipmi/src/ipmi-md2.h, libfreeipmi/src/ipmi-md2.c, libfreeipmi/src/ipmi-md5.h, libfreeipmi/src/ipmi-md5.c: Moved into common/src into md2.h, md2.c, md5.h, and md5.c respectively. * libfreeipmi/src/rmcp.h, libfreeipmi/src/rmcp.c (ipmi_rmcp_message_tag_chk): Rename to ipmi_rmcp_check_message_tag. * libfreeipmi/src/rmcp.h: RMCP_PRI_RMCP_PORT renamed to RMCP_PRIMARY_RMCP_PORT and RMCP_SEC_RMCP_PORT renamed to RMCP_SECONDARY_RMCP_PORT. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_chksum): Renamed to ipmi_checksum. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_comp_test): Renamed to ipmi_completion_code_check. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_check_chksum): Renamed to ipmi_lan_check_checksum. * libfreeipmi/src/ipmi-lan-interface.c: Globally use "checksum" instead of "chksum" in templates and code. * libfreeipmi/src/ipmi-debug.c (_dprintf, _write): Move into common/src/ipmi-common.h and ipmi-common.c. * libfreeipmi/src/ipmi-debug.c (ipmi_smic_print_flags, ipmi_kcs_print_flags): Move to ipmi-smic-interface.c and ipmi-kcs-interface.c appropriately. * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c: Split into ipmi-sensor-types-spec.h, ipmi-sensor-types-spec.c, ipmi-sensor-units-spec.h, ipmi-sensor-units-spec.c. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_open_free_udp_port): Move to ipmi-common.h and ipmi-common.c. * libfreeipmi/src/ipmi-utils.c, libfreeipmi/src/rmcp.c: Begin putting specific includes into .c files so freeipmi-build.h need is limited. * libfreeipmi/src/acpi-spmi-locate.c, libfreeipmi/src/acpi-spmi-locate.h, libfreeipmi/src/pci-locate.c, libfreeipmi/src/pci-locate.h, libfreeipmi/src/smbios-locate.c, libfreeipmi/src/smbios-locate.h, libfreeipmi/src/defaults-locate.h, libfreeipmi/src/defaults-locate.c: Renamed to ipmi-locate-acpi-spmi.c, ipmi-locate-acpi-spmi.h, ipmi-locate-pci.c, ipmi-locate-pci.h, ipmi-locate-smbios.c, ipmi-locate-smbios.h, ipmi-locate-defaults.c, and ipmi-locate-defaults.h. Adjusted function naming appropriately. Added parameter checks and various minor code cleanup. * common/, ipmiping/, fish/, ipmipower/, libfreeipmi/: Adjust makefiles and code for various location changes, include changes, define, or function name changes. 2006-02-23 Albert Chu * libfreeipmi/src/ipmi-sensor-event-messages.h, libfreeipmi/src/ipmi-sensor-event-messages.c: Re-organized for generic use. * libfreeipmi/src/ipmi-sensor-event-messages.h, libfreeipmi/src/ipmi-sensor-event-messages.c (ipmi_get_generic_event_message_list, ipmi_get_event_message_list): Move to ipmi-sensors-api.h and ipmi-sensors-api.c. These are convenience functions specifically for the sensors api, not generic functions. * libfreeipmi/src/bit-ops.h, libfreeipmi/src/bit-ops.c: Moved files into convenience libraries in common/src. * libfreeipmi/src/freeipmi.h, libfreeipmi/src/Makefile.am, common/src/Makefile.am, fish/src/Makefile.am: Adjusted appropriately for bit-ops.h and bit-ops.c reorganization. * libfreeipmi/src/xmalloc.h, libfreeipmi/src/xmalloc.c: Remove "ipmi_" prefix on functions. * libfreeipmi/: Adjust code appropriately for function name changes. * libfreeipmi/src/xmalloc.h, libfreeipmi/src/xmalloc.c: Moved files into convenience libraries in common/src. * libfreeipmi/src/freeipmi.h, libfreeipmi/src/Makefile.am, common/src/Makefile.am: Adjusted appropriately for xmalloc.h and xmalloc.c reorganization. * libfreeipmi/src/ipmi-inband.h: New file. * libfreeipmi/src/freeipmi-build.h: New file. * libfreeipmi/src/freeipmi.h: Remove code moved to new files. * libfreeipmi/src/freeipmi-build.h: Split off build specific stuff from freeipmi.h. * Globally remove -DFREEIPMI_BUILD and -DFREEIPMI_LIBRARY from Makefiles. * Globally replace "freeipmi.h" with "freeipmi-build.h" until .h file reorganization is done later on. * libfreeipmi/src/Makefile.am, libfreeipmi/src/freeipmi-build.h: Split off ipmi-semaphores.h to non-disted. * libfreeipmi/, fish/: Adjusted includes appropriately. * libfreeipmi/src/acpi-spmi-locate.c (ipmi_acpi_get_rsdp, ipmi_acpi_get_firmware_table): Remove strdupa calls, which are meaningless. * libfreeipmi/src/freeipmi-build.h (strdupa, strndupa): Removed macros. * libfreeipmi/src/freeipmi-build.h: Moved all bool, true, false macros/definitions to ipmi-common.h. Move WORDSIZE code to ipmi-common.h. * libfreeipmi/: Several typo/logic bug fixes. 2006-02-21 Albert Chu * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c: Fix string arrays and definitions to match IPMI spec and make similar to the rest of libfreeipmi. Make abbreviations match standards. * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c (ipmi_is_oem_reserved_sensor_type): Removed function. * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c (ipmi_sensor_classify, ipmi_get_sensor_group): Move to ipmi-sensor-api.h and ipmi-sensor-api.c. These functions do not match against a part of the IPMI spec and are convenience functions. * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c: Renamed ipmi_sensor_units_short to ipmi_sensor_units_abbreviated. 2006-02-20 Albert Chu * libfreeipmi/src/ipmi-sdr-repository-cmds-udm.h, libfreeipmi/src/ipmi-sdr-repository-cmds-udm.c (ipmi_cmd_get_sdr_chunk2): Renamed ipmi_cmd_get_sdr2. Adjusted to fit UDM model. * libfreeipmi/src/ipmi-sdr-repository-cmds-udm.c (ipmi_cmd_get_sensor_record_header2): Removed function. * libfreeipmi/src/ipmi-sdr-repository-cmds-udm.c (ipmi_cmd_get_sdr2): Renamed to get_sdr_sensor_record and put into ipmi-sensor-api.h and ipmi-sensor-api.c. Adjusted based on above changes. * libfreeipmi/: Various minor code cleanup. 2006-02-19 Albert Chu * libfreeipmi/: Continued code cleanup. 2006-02-18 Albert Chu * libfreeipmi/src/fiid-wrappers.h: New file. * libfreeipmi/src/err-wrappers.h: New file. * libfreeipmi/src/fiid.h: Remove old macros. * libfreeipmi/src/ipmi-error.h: Remove old macros. * libfreeipmi/: Cleanup using new FIID macros, ERR macros, and general cleanup. 2006-02-17 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_check_session_authcode): Fix parameter check. * Globally change "passwd" to "password". * libfreeipmi/src/ipmi-msg-interface-desc.h, libfreeipmi/src/ipmi-msg-interface-desc.c: Removed files. * libfreeipmi/src/ipmi-sensor-api.c (get_system_software_type): New function. * libfreeipmi/src/ipmi-sensor-api.c (get_sensor_reading): Use get_system_software_type. * libfreeipmi/src/fiid.h: Begin work to localize FIID macros internal only to hte library. * bmc-info/src/bmc-info.c (_FIID_OBJ_GET): New macro. Used throughout bmc-info.c. 2006-02-17 Albert Chu * libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/ipmi-watchdog.c: Renamed to ipmi-bmc-watchdog-timer-cmds.h and ipmi-bmc-watchdog-timer-cmds.c respectively. Cleanup definitions. * libfreeipmi/src/ipmi-serial-cmds, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-serial-cmds-udm.h, libfreeipmi/src/ipmi-serial-cmds-udm.c: Renamed to ipmi-serial-modem-cmds.h, ipmi-serial-modem-cmds.c, ipmi-serial-modem-cmds-udm.h, and ipmi-serial-modem-cmds-udm.c respectively. * libfreeipmi/src/ipmi-serial-modem-param-spec.h: Cleanup definitions. * libfreeipmi/src/ipmi-dev-global-cmds, libfreeipmi/src/ipmi-dev-global-cmds.c, libfreeipmi/src/ipmi-dev-global-cmds-udm.h, libfreeipmi/src/ipmi-dev-global-cmds-udm.c: Renamed to ipmi-device-global-cmds.h, ipmi-device-global-cmds.c, ipmi-device-global-cmds-udm.h, and ipmi-device-global-cmds-udm.c respectively. * libfreeipmi/src/ipmi-msg-support-cmds, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-msg-support-cmds-udm.h, libfreeipmi/src/ipmi-msg-support-cmds-udm.c: Renamed to ipmi-messaging-support-cmds.h, ipmi-messaging-support-cmds.c, ipmi-messaging-support-cmds-udm.h, and ipmi-messaging-support-cmds-udm.c respectively. * libfreeipmi/src/ipmi-sdr-repo-cmds, libfreeipmi/src/ipmi-sdr-repo-cmds.c, libfreeipmi/src/ipmi-sdr-repo-cmds-udm.h, libfreeipmi/src/ipmi-sdr-repo-cmds-udm.c: Renamed to ipmi-sdr-repository-cmds.h, ipmi-sdr-repository-cmds.c, ipmi-sdr-repository-cmds-udm.h, and ipmi-sdr-repository-cmds-udm.c respectively. * libfreeipmi/src/ipmi-sdr-repo-cache, libfreeipmi/src/ipmi-sdr-repo-cache.c: Renamed to ipmi-sdr-repository-cache-api.h and ipmi-sdr-repository-cache-api.c respectively. * libfreeipmi/, fish/, bmc-watchdog/: Adjust code appropriately. * libfreeipmi/src/ipmi-sdr-repository-cache-api.h, libfreeipmi/src/ipmi-sdr-repository-cache-api.c (ipmi_is_sensor_reading_available, ipmi_sdr_repository_cache_sensor_classify, ipmi_sdr_repository_cache_get_sensor_group, ipmi_sdr_repository_cache_get_sensor_name): Remove legacy utility functions. 2006-02-17 Albert Chu * libfreeipmi/src/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-sensor-cmds.c: Code cleanup. * libfreeipmi/, fish/: Adjust code appropriately. * tagged freeipmi_0_3_0_libfreeipmi_template_function_cleanup * merged in freeipmi_0_3_0_libfreeipmi_template_function_cleanup from freeipmi_0_3_0_devel_branch. 2006-02-16 Albert Chu * libfreeipmi/src/ipmi-pef-cmds.h, libfreeipmi/src/ipmi-pef-cmds.c: Code cleanup. * libfreeipmi/src/ipmi-pef-param-spec.h: Add new entries. * libfreeipmi/, fish/: Adjust code appropriately. * libfreeipmi/src/ipmi-pef-cmds.h, libfreeipmi/src/ipmi-pef-cmds.c, libfreeipmi/src/ipmi-sol-cmds.h, libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-serial-cmds.h: Alter naming convention. * libfreeipmi/src/ipmi-sdr-repo-cmds.h, libfreeipmi/src/ipmi-sdr-repo-cmds.c: Code cleanup. * libfreeipmi/, fish/: Adjust code appropriately. * libfreeipmi/src/ipmi-sel-cmds.h, libfreeipmi/src/ipmi-sel-cmds.c: Code cleanup. * libfreeipmi/, fish/: Adjust code appropriately. * libfreeipmi/src/ipmi-sdr-record-types.c: Cleanup templates. * libfreeipmi/, fish/: Adjust code appropriately. * libfreeipmi/src/ipmi-sel-record-types.c: Cleanup templates. * libfreeipmi/src/ipmi-sel-record-types.h, libfreeipmi/src/ipmi-sel-record-types.c, libfreeipmi/src/ipmi-sel-api.h, libfreeipmi/src/ipmi-sel-api.c: Reorganize code. * libfreeipmi/, fish/: Adjust code appropriately. 2006-02-15 Albert Chu * libfreeipmi/, ipmipower/, fish/: Continued lan-cmds and msg-support-cmds cleanup. * libfreeipmi/src/ipmi-lan-interface.c (unassemble_ipmi_lan_pkt), libfreeipmi/src/ipmi-debug.c (ipmi_dump_lan_packet): Fix unassembly bug. * libfreeipmi/src/ipmi-dev-global-cmds.h, libfreeipmi/src/ipmi-dev-global-cmds.c: Cleanup. * fish/, bmc-info/, libfreeipmi/: Adjust code appropriately. * libfreeipmi/src/ipmi-comp-code-spec.h, libfreeipmi/src/ipmi-error.c: Add new reset watchdog timer error codes and error strings. * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-chassis-cmds.c: Code cleanup. * libfreeipmi/, ipmipower/: Adjusted code appropriately. * libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-serial-cmds.c: Support variable length configuration templates. Code cleanup. * libfreeipmi/, fish/: Adjusted code appropriately. * libfreeipmi/src/ipmi-comp-code-spec.h: Add completion codes for lan, serial-modem, pef, and sol configuration commands. * libfreeipmi/src/ipmi-error.c: Add error messages for lan, serial-modem, pef, and sol configuration commands. * libfreeipmi/src/ipmi-cmd-spec.h: Add SOL commands. * libfreeipmi/src/ipmi-sol-param-spec.h: New file. * libfreeipmi/src/ipmi-sol-cmds.h, libfreeipmi/src/ipmi-sol-cmds.c: Code cleanup. * libfreeipmi/ : Adjust code appropriately. 2006-02-14 Albert Chu * libfreeipmi/src/rmcp.c (tmpl_cmd_asf_presence_pong): Add security extensions bit field. * libfreeipmi/src/rmcp.h, libfreeipmi/src/rmcp.c: Code cleanup. * rmcpping/, ipmipower/, fish/: Adjust code appropriately. * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c: Support variable length configuration templates. Code cleanup. * fish/, libfreeipmi/, bmc-watchdog/: Adjust code appropriately. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_ipv4_address_string2int, ipmi_mac_address_string2int): New functions. * fish/src/bmc-conf2.c (set_bmc_lan_conf_ip_address, set_bmc_lan_conf_mac_address): Use new function. * libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/ipmi-watchdog.c: Code cleanup. * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c: Code cleanup. * libfreeipmi/src/ipmi-msg-support-cmds.h: Consolidate the multiple user name, password, challenge string, and auth-code defines. Cleanup auth-type defines. * libfreeipmi/, ipmiping/, ipmipower/, fish/: Adjust code appropriately. 2006-02-13 Albert Chu * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_chksum_test): Removed function. * libfreeipmi/src/rmcp.h, libfreeipmi/src/rmcp.c: Rename tmpl_hdr_rmcp to tmpl_rmcp_hdr. * Push naming consistency across code: - fill_hdr_session -> fill_lan_session_hdr - obj_msg_hdr -> obj_lan_msg_hdr - obj_msg_trlr -> obj_lan_msg_trlr - tmpl_msg_hdr -> tmpl_lan_msg_hdr - tmpl_msg_trlr -> tmpl_lan_msg_trlr - tmpl_hdr_rmcp -> tmpl_rmcp_hdr - obj_hdr_rmcp -> obj_rmcp_hdr - "hdr_rmcp" -> "rmcp_hdr" * libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/ipmi-sessions.c (check_hdr_session_session_seq_num, check_hdr_session_session_id): Rename to ipmi_lan_check_session_seq_num, ipmi_lan_check_session_id. * libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/ipmi-sessions.c, libfreeipmi/src/ipmi-lan-interface-udm.c, ipmipower/src/ipmipower_powercmd.c (check_hdr_session_authcode): Rename to ipmi_lan_check_session_authcode. * libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/ipmi-sessions.c: Removed files. Moved all code into ipmi-lan-interface.h and ipmi-lan-interface.c. * libfreeipmi/src/freeipmi.h: Remove ipmi-sessions.h. * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-lan-cmds-udm.h, libfreeipmi/src/ipmi-lan-cmds-udm.c: Code cleanup. Make code more consistent with IPMI spec. * fish/src/bmc-conf2.c, fish/src/scm-procedures.c, fish/src/extensions.c, fish/extensions/bc-lan-conf-section.scm, fish/extensions/bc-lan-conf-misc-section.scm: Adjust for code changes. * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c: Code cleanup. Make function name consistent with rest of library. * libfreeipmi/src/ipmi-msg-support-cmds-udm.c: Adjust for code changes. * libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/ipmi-watchdog.c: Code cleanup. * libfreeipmi/src/bmc-watchdog.c: Adjust for code changes. * libfreeipmi/src/rmcp.c: Code cleanup. 2006-02-13 Albert Chu Collective fixes from branch al_fiid_rearchitect_branch at tag al_fiid_rearchitect_branch_final. See ChangeLog in branch for detailed day by day changes. * libfreeipmi/src/fiid.h, libfreeipmi/src/fiid.c: Re-implemented with new, more abstract interface. * libfreeipmi/src/bit-ops.c (bits_extract, bits_merge): Add parameter checks. * libfreeipmi/src/bit-ops.c (bits_merge): Fix bit shifting bug. * libfreeipmi/src/ipmi-chassis-cmds.c: Support optional fields with get chassis status response and chassis identify request. * libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/ipmi-sessions.c, libfreeipmi/src/ipmi-lan-interface.c: Support optional auth_code in LAN sessio header through one template. * libfreeipmi/src/ipmi-lan-interface-udm.c: Use interface assemble/unassembly functions rather than UDM functions. * Support new fiid interface globally. 2006-02-13 Albert Chu * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_read): Fix logic bug. * tagged al_libfreeipmi_cleanup_branch_final_merge_complete. * libfreeipmi/src/ipmi-udm.c (ipmi_inband_close, ipmi_cmd): SSIF interface bug fixes. * libfreeipmi/src/ipmi-udm.h: Remove unecessary struct members. * tagged al_libfreeipmi_cleanup_branch_final_merge_complete_2. 2006-02-13 Albert Chu * Bring in cleanup changes from al_libfreeipmi_cleanup_branch at tag al_libfreeipmi_cleanup_branch_final. * libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-types.c: Remove old unused arrays. * libfreeipmi/src/ipmi-sensor-types.c (ipmi_sensor_threshold_health_check, ipmi_sensor_discrete_health_check): Removed functions. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c, libfreeipmi/src/ipmi-lan-interface.c: Replace ipmi_chksum_t definition with int8_t. * libfreeipmi/src/rmcp.c (ipmi_rmcp_ping), fish/src/ipmi-wrapper.c (ipmi_rmcp_ping): Moved function from libfreeipmi into fish because it is really a convenience function. * libfreeipmi/src/ipmi-interface.h, libfreeipmi/src/ipmi-msg-support-cmds.h: Move #defines from ipmi-interface.h to ipmi-msg-support-cmds.h. * libfreeipmi/src/ipmi-chassis-cmds-udm.c, libfreeipmi/src/ipmi-chassis-cmds-udm.h, libfreeipmi/src/ipmi-dev-global-cmds-udm.c, libfreeipmi/src/ipmi-dev-global-cmds-udm.h, libfreeipmi/src/ipmi-lan-cmds-udm.c, libfreeipmi/src/ipmi-lan-cmds-udm.h, libfreeipmi/src/ipmi-msg-support-cmds-udm.c, libfreeipmi/src/ipmi-msg-support-cmds-udm.h, libfreeipmi/src/ipmi-pef-cmds-udm.c, libfreeipmi/src/ipmi-pef-cmds-udm.h, libfreeipmi/src/ipmi-sdr-repo-cmds-udm.c, libfreeipmi/src/ipmi-sdr-repo-cmds-udm.h, libfreeipmi/src/ipmi-sel-cmds-udm.c, libfreeipmi/src/ipmi-sel-cmds-udm.h, libfreeipmi/src/ipmi-sensor-cmds-udm.c, libfreeipmi/src/ipmi-sensor-cmds-udm.h, libfreeipmi/src/ipmi-serial-cmds-udm.c, libfreeipmi/src/ipmi-serial-cmds-udm.h, libfreeipmi/src/ipmi-sol-cmds-udm.c, libfreeipmi/src/ipmi-sol-cmds-udm.h, libfreeipmi/src/ipmi-lan-interface-udm.c, libfreeipmi/src/ipmi-lan-interface-udm.h, libfreeipmi/src/ipmi-ssif-interface-udm.c, libfreeipmi/src/ipmi-ssif-interface-udm.h, libfreeipmi/src/ipmi-kcs-interface-udm.c, libfreeipmi/src/ipmi-kcs-interface-udm.h: New files. * libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-dev-global-cmds.c, libfreeipmi/src/ipmi-dev-global-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-pef-cmds.c, libfreeipmi/src/ipmi-pef-cmds.h, libfreeipmi/src/ipmi-sdr-repo-cmds.c, libfreeipmi/src/ipmi-sdr-repo-cmds.h, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sel-cmds.h, libfreeipmi/src/ipmi-sensor-cmds.c, libfreeipmi/src/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/src/ipmi-sol-cmds.h: libfreeipmi/src/ipmi-lan-interface.c, libfreeipmi/src/ipmi-lan-interface.h, libfreeipmi/src/ipmi-ssif-interface.c, libfreeipmi/src/ipmi-ssif-interface.h, libfreeipmi/src/ipmi-kcs-interface.c, libfreeipmi/src/ipmi-kcs-interface.h: Split off UDM code into specific UDM files. * libfreeipmi/src/ipmi-udm.h, libfreeipmi/src/ipmi-udm.c: Rename ipmi-interface.h and ipmi-interface.c appropriately. * libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-lan-cmds.h: Add forgotten templates. * libfreeipmi/src/ipmi-msg-support-cmds.h: Add forgotten function prototypes. * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-lan-interface.h, libfreeipmi/src/ipmi-lan-interface.c: Remove old functions. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c, libfreeipmi/src/acpi-spmi-locate.c (ipmi_ioremap, ipmi_iounmap, ipmi_get_physical_mem_data): Move from ipmi-utils.h and ipmi-utils.c into acpi-spmi-locate.c. * libfreeipmi/src/ipmi-debug.h, libfreeipmi/src/ipmi-debug.c (fiid_obj_dump_setup, fiid_obj_dump_perror, fiid_obj_dump, fiid_obj_dump_lan, fiid_obj_dump_rmcp): Rename functions to ipmi_dump_setup, ipmi_obj_dump_perror, ipmi_obj_dump, ipmi_dump_lan_packet, and ipmi_dump_rmcp_packet respectively. * Support function re-naming throughout code. * libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface.c: Modify KCS interface. * libfreeipmi/src/ipmi-udm.c, libfreeipmi/src/ipmi-kcs-interface-udm.c: Support new KCS interface. * libfreeipmi/src/ipmi-ssif-interface.h, libfreeipmi/src/ipmi-ssif-interface.c: Modify SSIF interface. * libfreeipmi/src/ipmi-udm.c, libfreeipmi/src/ipmi-ssif-interface-udm.c: Support new SSIF interface. 2006-02-13 Albert Chu * rmcpping/, ipmiping/, ipmipower/, bmc-watchdog/, common/, doc/examples: Fix remaining copyright notices. * tagged freeipmi_0_3_0_devel_branch and freeipmi_0_3_0_devel_branch_base. 2006-02-12 Anand Babu * Copyright notices: Updated new FSF's address. 2006-02-10 Anand Babu * Tagged Release-0_2_0. 2006-02-10 A Balamurugan * doc/freeipmi.texi: updated. * fish/bmc-config.8.pre.in: updated. 2006-02-10 A Balamurugan * ipmi-raw/src/ipmi-raw.c: bug fix of command hex bytes execution. 2006-02-09 A Balamurugan * doc/examples/Makefile.am: fix for bug #15689, to build non-inst examples. * doc/examples/udm-test.c: updated. 2006-02-09 A Balamurugan * freeipmi.spec.in: updated. * doc/examples/Makefile.am: updated. 2006-02-09 A Balamurugan * doc/examples/ipmi-lan-test.c: removed. * doc/examples/Makefile.example: updated. * doc/examples/udm-test.c: updated. 2006-02-09 Albert Chu * configure.ac: Increment libfreeipmi version with release coming up. 2006-02-09 A Balamurugan * libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-pef-cmds.c, libfreeipmi/src/ipmi-sel-api.c, libfreeipmi/src/ipmi-sensor-api.c: fixed compiler warnings. 2006-02-09 Albert Chu * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-pef-cmds.h, libfreeipmi/src/ipmi-sdr-repo-cmds.h, libfreeipmi/src/ipmi-sel-cmds.h, libfreeipmi/src/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-sol-cmds.h: Add mising fill functions. 2006-02-09 A Balamurugan * ipmi-raw/doc/ipmi-raw.8.pre.in: updated. * ipmi-raw/src/ipmi-raw-argp.[ch]: added --file argument and command hex bytes as argument. fixed bug #15599 and bug #15600. * ipmi-raw/src/ipmi-raw.c: updated. 2006-02-09 Albert Chu * libfreeipmi/src/ipmi-lan-cmds.c (fill_lan_set_arp, fill_lan_set_gratuitous_arp_interval, fill_lan_set_auth_type_enables, fill_lan_set_ip_addr_source, fill_lan_set_ip_addr, fill_lan_set_vlan_id, fill_lan_set_vlan_priority, fill_lan_set_subnet_mask, fill_lan_set_mac_addr, fill_get_lan_conf_param, fill_suspend_bmc_arps), libfreeipmi/src/ipmi-pef-cmds.c (fill_kcs_alert_immediate, fill_kcs_get_pef_conf_param, fill_kcs_set_pef_control, fill_kcs_set_global_action_control, fill_kcs_set_startup_delay, fill_kcs_set_alert_startup_delay, fill_kcs_set_num_event_filters, fill_kcs_set_filter_table_entry, fill_kcs_set_filter_table_data1, fill_kcs_set_num_alert_policies, fill_kcs_set_alert_string_keys, fill_kcs_arm_pef_postpone_timer, fill_kcs_set_last_processed_event, fill_kcs_pet_ack), libfreeipmi/src/ipmi-sel-cmds.c (fill_kcs_get_sel_entry, fill_kcs_delete_sel_entry, fill_kcs_clear_sel), libfreeipmi/src/ipmi-sensor-cmds.c (fill_kcs_get_threshold_reading, fill_kcs_get_discrete_reading, fill_kcs_get_sensor_thresholds), libfreeipmi/src/ipmi-serial-cmds.c (fill_set_serial_connmode, fill_set_serial_page_blackout_interval, fill_set_serial_retry_time, fill_set_serial_comm_bits, fill_get_serial_conf_param), libfreeipmi/src/ipmi-sol-cmds.c (fill_sol_conf_sol_enable_disable, fill_get_sol_conf_param): Fix function prototype consistency issue. * libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-pef-cmds.c, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sensor-cmds.c, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-sol-cmds.c: Adjust function calls for new prototypes appropriately. 2006-02-08 Albert Chu * libfreeipmi/src/ipmi-sensor-event-messages.c: Move strings into arrays as much as possible. * libfreeipmi/src/ipmi-sensor-types.c: Add forgotten string. * libfreeipmi/src/libfreeipmi/src/ipmi-sensor-event-messages.c: Add new/modified event message strings from errata. * libfreeipmi/src/ipmi-sensor-event-messages.c (get_0D_event_message, get_1B_event_message, get_1D_event_data2_message, get_1D_event_data3_message, get_28_event_data3_message, get_28_event_data2_message): New functions. * libfreeipmi/src/ipmi-sensor-event-messages.c (get_0C_event_message, get_1D_event_message, get_20_event_message, get_28_event_message): Adjust offsets. * libfreeipmi/src/ipmi-sensor-event-messages.c (ipmi_get_event_data3_message, ipmi_get_event_data2_message, ipmi_get_event_message): Add new functions. * libfreeipmi/src/ipmi-chassis-cmds.c: Support new options in tmpl_cmd_get_chassis_status_rs from ipmi 2.0 errata. 2006-02-07 Albert Chu * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_is_root): Removed function. * libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-error.c (ipmi_error): Removed function. * common/src/ipmi-common.h, common/src/ipmi-common.c: New files. * common/src/Makefile.am, bmc-info/src/Makefile.am, ipmi-raw/src/Makefile.am, ipmi-locate/src/Makefile.am, bmc-info/src/bmc-info.c, ipmi-raw/src/ipmi-raw.c, ipmi-locate/src/ipmi-locate.c, fish/src/Makefile.am, fish/src/common.h: Support and make use of new common lib. * libfreeipmi/src/ipmi-sha1.h, libfreeipmi/src/ipmi-sha1.c, libfreeipmi/src/ipmi-hmac.h, libfreeipmi/src/ipmi-hmac.c: Removed files. * libfreeipmi/src/Makefile.am, libfreeipmi/src/freeipmi.h: Remove appropriate files. * libfreeipmi/src/ipmi-cmd-spec.h, libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-pef-cmds.h: Move non-cmd-spec #defines out of ipmi-cmd-spec.h. * fish/src/bmc-conf2.c, fish/src/scm-procedures.c: Adjust code appropriately. * libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-kcs-interface.h: Move kcs error codes from ipmi-error.h to ipmi-kcs-interface.h. * libfreeipmi/src/ipmi-error.c (ipmi_kcs_strstatus_r): Use new definition strings. * libfreeipmi/src/ipmi-sensor-types.h: Remove commented out code. * libfreeipmi/src/ipmi-sensor-types.c: Fix typos. * libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-utils.c (ipmi_input_timeout, ipmi_get_random_seed): Removed functions. * libfreeipmi/src/ipmi-sensor-utils.h, libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_decode_value_old, ipmi_sensor_get_decode_params_old): Removed functions. * libfreeipmi/src/ipmi-sensor-utils.h: Fix "is_signed" typoed parameter. 2006-02-06 Anand Babu * configure.ac: Closes bug #15550 "configure guile warning misleading". guile.m4 installed by guile development library was used to check guile installation recursively. Thanks to Keith Owens from SGI for reporting this bug. 2006-02-06 Albert Chu * libfreeipmi/src/ipmi-ssif-interface.c (ipmi_ssif_cmd2): Fix ssif read bug. * libfreeipmi/src/ipmi-netfn-spec.c: Removed file. * libfreeipmi/src/ipmi-netfn-spec.h: Removed pre 0.1.0 remnant code. * doc/examples/Makefile.am: Fix distcheck. * common/src/Makefile.am: Make libargpcommon.la library. * bmc-info/src/Makefile.am, ipmi-raw/src/Makefile.am: Use new util library. * common/src/arg-common.c: Use config.h for #includes. * common/src/Makefile.am, ipmiping/src/Makefile.am, rmcpping/src/Makefile.am: Linking cleanup. 2006-02-05 Albert Chu * libfreeipmi/src/ipmi-msg-interface-desc.h: Remove duplicate code. Comp Code cleanup. * libfreeipmi/src/ipmi-comp-code-spec.h: New file. 2006-02-04 Albert Chu * libfreeipmi/src/acpi-spmi-locate.c (ipmi_acpi_get_spmi_table): Fix parameter overwriting bug. 2006-02-03 Albert Chu * fish/src/ipmi-wrapper.c (ipmi_ping): Remove incorrect warning message. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_info2, ipmi_cmd_get_channel_access2, ipmi_cmd_get_user_access2, ipmi_cmd_set_user_access2, ipmi_cmd_set_user_password2, ipmi_cmd_get_user_name2, ipmi_cmd_set_user_name2, ipmi_cmd_set_channel_access2): Fix parameter checks. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd2): Fix kcs read bug. 2006-02-02 Albert Chu * libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_get_decode_params_old, ipmi_sensor_get_decode_params), libfreeipmi/src/ipmi-sol-cmds.c (ipmi_cmd_sol_conf_get_sol_enable2, ipmi_cmd_sol_conf_sol_enable_disable2, fill_get_sol_conf_param, fill_sol_conf_sol_enable_disable), libfreeipmi/src/ipmi-pef-cmds.c (fill_kcs_alert_immediate, fill_kcs_get_pef_conf_param, fill_kcs_set_pef_control, fill_kcs_set_global_action_control, fill_kcs_set_startup_delay, fill_kcs_set_alert_startup_delay, fill_kcs_set_filter_table_entry, fill_kcs_set_num_event_filters, fill_kcs_set_filter_table_data1, fill_kcs_set_num_alert_policies, fill_kcs_get_pef_caps, fill_kcs_arm_pef_postpone_timer, fill_kcs_set_last_processed_event, fill_kcs_get_last_proessed_event, ipmi_cmd_set_pef_control2, ipmi_cmd_set_global_action_control2, ipmi_cmd_set_startup_delay2, ipmi_cmd_set_num_event_filters2, ipmi_cmd_set_alert_startup_delay2, ipmi_cmd_set_filter_table_entry2, ipmi_cmd_set_filter_table_data1_2, ipmi_cmd_set_num_alert_policies2, ipmi_cmd_alert_immediate2, ipmi_cmd_get_pef_alert_string2, ipmi_cmd_get_pef_alert_string_keys2, ipmi_cmd_get_pef_num_alert_policies2, ipmi_cmd_get_pef_num_alert_strings2, ipmi_cmd_get_pef_filter_data1_2, ipmi_cmd_get_pef_control2, ipmi_cmd_get_pef_global_action_control2, ipmi_cmd_get_pef_startup_delay2, ipmi_cmd_get_pef_alert_startup_delay2, ipmi_cmd_get_pef_num_event_filters2, ipmi_cmd_get_pef_filter_table_entry2, ipmi_cmd_get_pef_caps2, ipmi_cmd_arm_pef_postpone_timer2, ipmi_cmd_set_last_processed_event2, ipmi_cmd_get_last_processed_event2, ipmi_cmd_pet_ack2), libfreeipmi/src/ipmi-sensor-types.c (ipmi_sensor_threshold_health_check, ipmi_sensor_discrete_health_check), libfreeipmi/src/ipmi-sensor-cmds.c (fill_kcs_get_threshold_reading, fill_kcs_get_discrete_reading, ipmi_cmd_get_threshold_reading2, ipmi_cmd_get_discrete_reading2, ipmi_cmd_get_sensor_thresholds2), libfreeipmi/src/ipmi-sel-record-types.c (get_sel_system_event_record, get_sel_record, get_sel_non_timestamped_oem_record, get_sel_timestamped_oem_record), libfreeipmi/src/ipmi-sel-record-types.c (get_sel_timestamped_oem_record, get_sel_non_timestamped_oem_record), libfreeipmi/src/ipmi-sel-cmds.c (fill_kcs_reserve_sel, fill_kcs_get_sel_entry, fill_kcs_delete_sel_entry, fill_kcs_clear_sel, ipmi_cmd_get_sel_info2, ipmi_cmd_get_sel_alloc_info2, ipmi_cmd_reserve_sel2, ipmi_cmd_get_sel_entry2, ipmi_cmd_delete_sel_entry2, ipmi_cmd_clear_sel2), libfreeipmi/src/ipmi-serial-cmds.c (ipmi_cmd_set_serial_connmode2 ipmi_cmd_set_serial_page_blackout_interval ipmi_cmd_set_serial_retry_time2 ipmi_cmd_set_serial_comm_bits2 ipmi_cmd_get_serial_connmode2 ipmi_cmd_get_serial_page_blackout2 ipmi_cmd_get_serial_retry_time2 ipmi_cmd_get_serial_comm_bits2), libfreeipmi/src/ipmi-sel-api.c (ipmi_sel_get_first_entry, ipmi_sel_get_next_entry, get_sel_info), libfreeipmi/src/ipmi-sensor-api.c (get_sensor_reading, get_sdr_record, get_sdr_oem_record, get_sdr_management_controller_device_locator_record, get_sdr_logical_fru_device_locator_record, get_sdr_generic_device_locator_record, get_sdr_entity_association_record, get_sdr_event_only_record, get_sdr_compact_record, get_sdr_full_record): Fix parameter checks. * libfreeipmi/src/ipmi-pef-cmds.c (fill_kcs_alert_immediate, fill_kcs_get_pef_conf_param, fill_kcs_set_pef_control, fill_kcs_set_global_action_control, fill_kcs_set_startup_delay, fill_kcs_set_alert_startup_delay, fill_kcs_set_filter_table_entry, fill_kcs_set_num_event_filters, fill_kcs_set_filter_table_data1, fill_kcs_set_num_alert_policies, fill_kcs_get_pef_caps, fill_kcs_arm_pef_postpone_timer, fill_kcs_set_last_processed_event, fill_kcs_get_last_proessed_event): Make non-static. * libfreeipmi/src/ipmi-pef-cmds.c: Fix templates with duplicate field names. * libfreeipmi/src/ipmi-sensor-event-messages.c (get_2A_event_data2_message): Fix typo. * libfreeipmi/src/ipmi-sensor-api.h, libfreeipmi/src/ipmi-sensor-api.c (get_sdr_record, get_sensor_reading): Make return type int8_t. * libfreeipmi/src/ipmi-sensor-api.c (get_sdr_event_only_record): Fix incorrect template usage typo. 2006-02-01 Albert Chu * libfreeipmi/src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_info_write, ipmi_sdr_records_write, ipmi_sdr_cache_create): Fix parameter checks. * libfreeipmi/src/ipmi-sdr-repo-cmds.c (fill_kcs_get_repo_info, fill_kcs_reserve_repo, fill_kcs_get_repo_alloc_info, fill_kcs_get_sdr_chunk, ipmi_cmd_get_sdr_repo_info2, ipmi_cmd_get_sdr_repo_alloc_info2, ipmi_cmd_reserve_sdr_repo2, ipmi_cmd_get_sensor_record_header2, ipmi_cmd_get_sdr_chunk2, ipmi_cmd_get_sdr2): Fix parameter checks. * libfreeipmi/src/ipmi-sdr-repo-cmds.c (ipmi_cmd_get_sensor_record_header2, ipmi_cmd_get_sdr_chunk2): Use fiid_template_free. 2006-02-01 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_cmd_activate_session, ipmi_lan_open_session, fill_kcs_get_user_name): Fix parameter checks. * libfreeipmi/src/ipmi-chassis-cmds.h (IPMI_CHASSIS_FORCE_IDENTIFY_VALID): New macro. * libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_chassis_identify): Fix parameter checks. * libfreeipmi/src/fiid.c (__fiid_template_make): Fix string copy corner case. * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c (ipmi_cmd_lan_set_auth_type_enables2, fill_lan_set_auth_type_enables): Make functions pristine to IPMI spec. * fish/src/bmc-conf2.c (_fill_lan_set_auth_type_enables): New function. * fish/src/bmc-conf2.c (set_bmc_lan_conf_auth_type_enables): Use convenience template. * libfreeipmi/src/ipmi-lan-cmds.c (fill_lan_set_ip_addr_source, fill_lan_set_ip_addr, fill_lan_set_vlan_id, fill_suspend_bmc_arps, ipmi_cmd_lan_set_arp2, ipmi_lan_set_gratuitous_arp_interval2, ipmi_cmd_lan_set_auth_type_enables2, ipmi_cmd_lan_set_ip_addr_source2, ipmi_cmd_lan_set_ip_addr2, ipmi_cmd_lan_set_default_gw_ip_addr2, ipmi_cmd_lan_set_backup_gw_ip_addr2, ipmi_cmd_lan_set_backup_gw_ip_addr2, ipmi_cmd_lan_set_vlan_priority2, ipmi_cmd_lan_set_subnet_mask2, ipmi_cmd_lan_set_mac_addr2, ipmi_cmd_lan_set_default_gw_mac_addr2, ipmi_cmd_lan_set_backup_gw_mac_addr2, ipmi_cmd_lan_get_arp2, ipmi_cmd_lan_get_gratuitous_arp_interval2, ipmi_cmd_lan_get_auth_type_enables2, ipmi_cmd_lan_get_ip_addr_source2, ipmi_cmd_lan_get_ip_addr2, ipmi_cmd_lan_get_default_gw_ip_addr2, ipmi_cmd_lan_get_backup_gw_ip_addr2, ipmi_cmd_lan_get_subnet_mask2, ipmi_cmd_lan_get_mac_addr2, ipmi_cmd_lan_get_default_gw_mac_addr2, ipmi_cmd_lan_get_backup_gw_mac_addr2, ipmi_cmd_lan_get_vlan_id2, ipmi_cmd_lan_get_vlan_priority2, ipmi_cmd_suspend_bmc_arps2) ): Fix parameter checks. * libfreeipmi/src/ipmi-lan-cmds.h (IPMI_ENABLE_BMC_GENERATED_GRATUITOUS_ARPS_VALID, IPMI_ENABLE_BMC_GENERATED_ARP_RESPONSES_VALID, IPMI_IP_ADDR_SOURCE_VALID, IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID, IPMI_BMC_GENERATED_ARP_RESPONSE_VALID): New macros. * libfreeipmi/src/ipmi-lan-cmds.c (tmpl_set_lan_conf_param_vlan_id_rq, tmpl_set_lan_conf_param_vlan_priority_rq): Fix field naming bugs. 2006-01-31 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd2): Remove debugging statements. * libfreeipmi/src/ipmi-lan-interface.c (get_rq_checksum1, get_rq_checksum1, get_rq_checksum2, get_rs_checksum2, fill_lan_msg_hdr2, fill_lan_msg_trlr2, fill_hdr_session2, _ipmi_lan_pkt_rq_size2, _ipmi_lan_pkt_rs_size2, unassemble_ipmi_lan_pkt2, ipmi_lan_validate_checksum, ipmi_lan_cmd_raw_send): Fix parameter checks. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_kcs_set_channel_access, fill_kcs_set_user_name, fill_kcs_get_user_name, fill_kcs_set_user_password, fill_kcs_set_user_access, fill_kcs_get_user_access, fill_kcs_get_channel_access, fill_kcs_get_channel_info, ipmi_cmd_set_channel_access2, ipmi_cmd_set_user_name2, ipmi_cmd_get_user_name2, ipmi_cmd_set_user_password2, ipmi_cmd_set_user_access2, ipmi_cmd_get_user_access2, ipmi_cmd_get_channel_access2, ipmi_cmd_get_channel_info2): Fix consistency issue with fill function parameters. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_open_session2): Fix parameter checks. * libfreeipmi/src/ipmi-lan-interface.c (get_rq_checksum2, get_rs_checksum2, ipmi_lan_cmd_raw2): Use fiid_template_free(). * libfreeipmi/src/ipmi-lan-interface.c (fill_hdr_session2): Fix endian bugs. * libfreeipmi/src/ipmi-semaphores.h (IPMI_MUTEX_LOCK, IPMI_MUTEX_UNLOCK): Revert fixes from 2005-08-30. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd_raw2): Code cleanup. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd_raw2): Fix buffer overflow bug. * ipmi-raw/src/ipmi-raw.c (main): Fix output bug. 2006-01-30 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_init_ipmi): Re-add error output message. * bmc-watchdog/src/bmc-watchdog.c (_FIID_OBJ_GET): Cleaned up code. * bmc-watchdog/src/bmc-watchdog.c: Remove all #if 0'd code. * libfreeipmi/src/ipmi-interface.c (ipmi_cmd): Add parameter checks. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_get_channel_number2): Add parameter check. * libfreeipmi/src/ipmi-dev-global-cmds.c (fill_cmd_get_dev_id): Add parameter check. * libfreeipmi/src/acpi-spmi-locate.c (ipmi_acpi_get_spmi_table): Add parameter checks. * bmc-watchdog/src/bmc-watchdog.c (_cmd): Fix debug output messages. * bmc-watchdog/src/bmc-watchdog.c (_daemon_cmd): Fix corner case. * bmc-watchdog/src/bmc-watchdog.c (_daemon_setup): Fix infinite loop bug. 2006-01-29 Albert Chu * libfreeipmi/src/ipmi-sessions.c (check_hdr_session_seq_num, check_hdr_session_session_id): Fix typecast typos. * libfreeipmi/src/ipmi-sessions.c (check_hdr_session_authcode): Fix parameter check. Fix corner case bugs. * ipmipower/src/ipmipower_checkc.c (_check_network_function): Fix debug output message. * libfreeipmi/src/ipmi-lan-interface.c (_ipmi_lan_pkt_size, _ipmi_lan_pkt_rq_size): Make functions static. * libfreeipmi/src/ipmi-lan-interface.c (_ipmi_lan_pkt_size): Add parameter check. * libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface (assemble_ipmi_kcs_pkt, unassemble_ipmi_kcs_pkt), libfreeipmi/src/rmcp.h, libfreeipmi/src/rmcp.c (assemble_rmcp_pkt, unassemble_rmcp_pkt: Change return type to int32_t for consistency. * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_set_power_restore_policy): Fix prototype for consistency. Add parameter check. Add prototype to .h file. * libfreeipmi/src/ipmi-ping.h, libfreeipmi/src/ipmi-ping.c: Removed files. * libfreeipmi/src/Makefile.am: Remove ipmi-ping.h and ipmi-ping.c. * common/src/ipmi-ping.h, common/src/ipmi-ping.c: New files. * common/src/Makefile.am, rmcpping/src/Makefile.am, ipmiping/src/Makefile.am: Support new ping common lib. 2006-01-28 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_check_net_fn), libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_check_cmd, ipmi_check_comp_code, ipmi_lan_check_rq_seq): Fix typecast typos. * libfreeipmi/src/ipmi-interface.c (ipmi_outofband_free, ipmi_inband_free, ipmi_open_outofband): Fix corner cases. * ipmiping/src/ipmiping.c (parsepacket): Remove unnecessary code. * rmcpping/src/rmcpping.c, ipmiping/src/ipmiping.c: Code cleanup. * libfreeipmi/src/ipmi-ipmb-interface.h (IPMI_BMC_LUN_VALID): New macro. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_check_net_fn): Use new IPMI_BMC_LUN_VALID macro. * ipmiping/src/ipmiping.c (parsepacket): Add additional debugging. * ipmipower/src/ipmipower_wrappers.h, ipmipower/src/ipmipower_wrappers.c (Fiid_obj_dump_rmcp): New function. * ipmipower/src/ipmipower_ping.c (ipmipower_ping_process_pings): Use fiid wrapper macros. * libfreeipmi/src/ipmi-chassis-cmds.h (fill_cmd_get_chassis_status, fill_cmd_chassis_ctrl): Add function prototypes. * ipmipower/src/ipmipower_packet.c: Remove unnecessary function prototypes. * libfreeipmi/src/ipmi-chassis-cmds.h (IPMI_CHASSIS_CTRL_VALID): New macro. * libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_chassis_ctrl): Use IPMI_CHASSIS_CTRL_VALID. Fix ipmipower issues discovered by Keith Owens @ SGI. * ipmipower/ipmipower.8.in: Document additional machine compliance bug found with. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Fix segfault corner case. * ipmipower/src/: Fix gcc 4.0 warnings. 2006-01-26 A Balamurugan * libfreeipmi/src/ipmi-interface.c (ipmi_cmd_raw): fixed improper behavior bug. 2006-01-24 A Balamurugan * fish/scripts/bmc-autoconfig/bmc-autoconfig: improved. 2006-01-24 A Balamurugan * fish/scripts/bmc-autoconfig/bmc-config-template: new file. * fish/scripts/bmc-autoconfig/Makefile.am: updated. * fish/scripts/bmc-autoconfig/bmc-autoconfig: improved. 2006-01-24 A Balamurugan * fish/scripts/bmc-autoconfig/bmc-autoconfig: checks of template file existence. 2006-01-24 Albert Chu * libfreeipmi/src/ipmi-sessions.c (fill_hdr_session): Cleanup code logic. * libfreeipmi/src/ipmi-netfn-spec.h: Add IPMI_NET_FN_VALID macro. * libfreeipmi/src/ipmi-lan-interface.c (fill_lan_msg_hdr, ipmi_lan_check_net_fn): Use new macro. 2006-01-23 A Balamurugan * fish/src/scm-procedures.c (ex_sel_get_first_entry_raw, ex_sel_get_next_entry_raw, ex_sel_get_first_entry_hex, ex_sel_get_next_entry_hex, ex_sel_get_info_binary, ex_sel_get_first_entry, ex_sel_get_next_entry, ex_sel_delete_entry, ex_sel_clear, ex_sel_get_clear_status): display appropriate error/warning messages. 2006-01-23 Albert Chu * rmcpping/src/rmcpping.c (createpacket, parsepacket): Fix typos. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_check.c (_check_session_id), ipmipower/src/ipmipower_config.c (ipmipower_config_setup, ipmipower_config_cmdline_parse, ipmipower_config_conffile_parse), ipmipower/src/ipmipower_prompt.c (_cmd_advanced, _cmd_config, ipmipower_prompt_process_cmdline): Support new --accept-session-id-zero option. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_powercmd.c (_recv_packet), ipmipower/src/ipmipower_config.c (ipmipower_config_setup, ipmipower_config_cmdline_parse, ipmipower_config_conffile_parse), ipmipower/src/ipmipower_prompt.c (_cmd_advanced, _cmd_config, ipmipower_prompt_process_cmdline): Support new --check-unexpected-authcode option. * ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in: Document new options. 2006-01-22 A Balamurugan * fish/src/scm-procedures.c (ex_sel_get_first_entry_raw, ex_sel_get_next_entry_raw, ex_sel_get_first_entry_hex, ex_sel_get_next_entry_hex, ex_sel_get_info_binary, ex_sel_get_first_entry, ex_sel_get_next_entry, ex_sel_delete_entry, ex_sel_clear, ex_sel_get_clear_status): display appropriate error/warning messages. * libfreeipmi/src/ipmi-sel-api.c (ipmi_sel_get_first_entry, ipmi_sel_get_next_entry, get_sel_info): set error.warning messages. * libfreeipmi/src/ipmi-sensor-api.c (get_sdr_record, get_sensor_reading): like wise. 2006-01-20 Anand Babu * Applied Anand Avati's patch for compiler warining fixes (gcc-4.0 is aggressive about issuing warinings for bad code) and 64/32-bit porting fixes. Avati also identified a bug in ipmi-raw.c. Following files are affected: bmc-info/src/bmc-info.c bmc-watchdog/src/bmc-watchdog.c fish/src/bmc-conf2.c fish/src/ipmi-wrapper.c fish/src/scm-procedures.c ipmi-locate/src/ipmi-locate.c ipmiping/src/ipmiping.c ipmipower/src/ipmipower_check.c ipmipower/src/ipmipower_connection.c ipmipower/src/ipmipower_packet.c ipmipower/src/ipmipower_ping.c ipmipower/src/ipmipower_powercmd.c ipmipower/src/ipmipower_prompt.c ipmipower/src/wrappers.c libfreeipmi/src/acpi-spmi-locate.c libfreeipmi/src/fiid.c libfreeipmi/src/freeipmi.h libfreeipmi/src/ipmi-chassis-cmds.c libfreeipmi/src/ipmi-debug.c libfreeipmi/src/ipmi-dev-global-cmds.c libfreeipmi/src/ipmi-kcs-interface.c libfreeipmi/src/ipmi-lan-cmds.c libfreeipmi/src/ipmi-lan-interface.c libfreeipmi/src/ipmi-lan-interface.h libfreeipmi/src/ipmi-md2.c libfreeipmi/src/ipmi-md5.c libfreeipmi/src/ipmi-msg-support-cmds.c libfreeipmi/src/ipmi-pef-cmds.c libfreeipmi/src/ipmi-sdr-repo-cache.c libfreeipmi/src/ipmi-sdr-repo-cmds.c libfreeipmi/src/ipmi-sel-api.c libfreeipmi/src/ipmi-sel-cmds.c libfreeipmi/src/ipmi-sel-record-types.c libfreeipmi/src/ipmi-sensor-api.c libfreeipmi/src/ipmi-sensor-cmds.c libfreeipmi/src/ipmi-sensor-event-messages.c libfreeipmi/src/ipmi-sensor-types.c libfreeipmi/src/ipmi-sensor-utils.c libfreeipmi/src/ipmi-serial-cmds.c libfreeipmi/src/ipmi-sessions.c libfreeipmi/src/ipmi-sol-cmds.c libfreeipmi/src/ipmi-ssif-interface.c libfreeipmi/src/ipmi-watchdog.c libfreeipmi/src/rmcp.c rmcpping/src/rmcpping.c 2006-01-20 Albert Chu * libfreeipmi/src/ipmi-error.c, libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-sel-cmds.h: Fix consistency issue with declaration of error codes. Fix error message to be consistent with IPMI specification. 2006-01-19 A Balamurugan * doc/freeipmi.texi: updated. 2006-01-19 A Balamurugan * doc/freeipmi.texi: updated. * ipmi-raw/src/ipmi-raw.c (string2bytes): fixed logical/invalid pointer operation bug. 2006-01-09 Anand Babu * libfreeipmi/src/ipmi-kcs-interface.[c,h]: ipmi_kcs_get_mutex_semid, ipmi_kcs_io_init, ipmi_kcs_open, ipmi_kcs_write_interruptible, ipmi_kcs_cmd, ipmi_kcs_cmd_interruptible - obsolete API removed. Use UDM API instead. 2006-01-11 A Balamurugan * libfreeipmi/src/ipmi-chassis-cmds.[c,h]: removed kcs command functions. * libfreeipmi/src/ipmi-lan-cmds.[c,h]: like wise. * libfreeipmi/src/ipmi-serial-cmds.[c,h]: like wise. * libfreeipmi/src/ipmi-sol-cmds.[c,h]: like wise. 2006-01-06 A Balamurugan * libfreeipmi/src/ipmi-dev-global-cmds.c: removed kcs command functions. * libfreeipmi/src/ipmi-msg-support-cmds.c: like wise. * libfreeipmi/src/ipmi-pef-cmds.c: like wise. * libfreeipmi/src/ipmi-sdr-repo-cmds.c: like wise. * libfreeipmi/src/ipmi-sel-cmds.c: like wise. * libfreeipmi/src/ipmi-sensor-cmds.c: like wise. * libfreeipmi/src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_info_write, ipmi_sdr_records_write, ipmi_sdr_cache_create): uses udm functions. * bmc-watchdog/src/bmc-watchdog.c: updated. 2006-01-05 A Balamurugan * bmc-info/src/bmc-info.c: generates core when seg-faults. * fish/src/fish.c: like wise. * ipmi-raw/src/ipmi-raw.c: like wise. * ipmi-locate/src/ipmi-locate.c: shows default values for ipmi devices. * libfreeipmi/src/defaults-locate.c (defaults_get_dev_info): improved. 2006-01-04 Anand Babu * bmc-watchdog/src/bmc-watchdog.c: Now uses UDM interface. * libfreeipmi/src/ipmi-error.h: ERR_UNLOCK new macro. Similar to ERR, but additionally unlocks the semaphore. * libfreeipmi/src/ipmi-interface.c: ipmi_open_inband function returns EBUSY if already opened. Also now accepts reg_space argument. Introduced a generic locking layer for all drivers. Added interruptible support through IPMI_MODE_NONBLOCK argument to open function. * libfreeipmi/src/ipmi-kcs-interface.c,.h: big cleanup. Locking now handled by generic UDM layer. How ever locking for old APIs retained. Still lot more can be cleaned up if Albert gives OK. * libfreeipmi/src/ipmi-locate.c: ipmi_locate initializes interface_type and device name before probing. * libfreeipmi/src/ipmi-semaphores.c,.h: One locking interface for all inband drivers. Previously it was per-driver. * libfreeipmi/src/ipmi-ssif-interface.c: ipmi_ssif_io_exit fixed as ipmi_ssif_exit. * libfreeipmi/src/defaults-locate.c: handle case for enum IPMI_INTERFACE_LAN too. * bmc-info/src/bmc-info.c: reg_space argument added. * fish/src/ipmi-wrapper.c: like wise. * ipmi-raw/src/ipmi-raw.c: like wise. Removed calls all references to obsolete ipmi_enable_old_kcs_init function. 2006-01-03 Anand Babu * configure.ac: changed versioning nomenclature. Up version to 0.2.beta1. Automake pre-req minimum is now 1.8. * doc/Makefile.am: build fixes for freeipmi-faq.texi. * doc/freeipmi.texi: now includes version-doc.texi. * doc/freeipmi-faq.texi: now includes version-faq.texi. 2006-01-03 A Balamurugan * fish/src/ipmi-wrapper.c (get_lan_channel_number, get_serial_channel_number): uses udm enabled function. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_get_channel_number2): new function. 2006-01-03 A Balamurugan * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd_raw_send, ipmi_lan_cmd_raw2): fixed bugs. 2006-01-03 Albert Chu * freeipmi.spec.in: Updated with appropriate new files. * doc/freeipmi-faq.texi: Fixed some typos, added a little more info. 2006-01-02 Anand Babu * doc/freeipmi-faq.texi: FAQ by Albert Chu . 2005-12-30 Anand Babu * common: Added proper makefiles for this tree. * ipmi-raw/doc/ipmi-raw.8.pre.in: removed comment line that conflicted with some versions of cpp. * Tagged Release-0_2_0-beta0 2005-12-30 A Balamurugan * fish/bmc-config.8.pre.in: fish/bmc-config.8.in is renamed and updated. * fish/fish.8.pre.in: fish/fish.8.in is renamed and updated. * fish/ipmi-sel.8.pre.in: fish/ipmi-sel.8.in is renamed and updated. * fish/ipmi-sensors.8.pre.in: fish/ipmi-sensors.8.in is renamed and updated. * ipmi-raw/doc/ipmi-raw.8.pre.in: ipmi-raw/ipmi-raw.8 is renamed and moved and updated. * configure.ac, bmc-info/doc/Makefile.am, bmc-info/doc/bmc-info.8.pre.in, fish/Makefile.am, ipmi-raw/Makefile.am: updated. 2005-12-29 Anand Babu * bmc-info/doc/Makefile.am: Man pages are now pre-processed to include common arguments file using cpp. (man.N.pre.in --autoconf--> man.N.pre --cpp--> man.N). * bmc-info/doc/bmc-info.8.in: Replaced by bmc-info.8.pre.in * configure.ac: produces bmc-info.8.pre. 2005-12-28 A Balamurugan * common/doc/argp-common.man: added new file. * bmc-info/doc/Makefile.am: updated. 2005-12-28 A Balamurugan * fish/bmc-info.8.in, fish/scripts/bmc-info/Makefile.am, fish/scripts/bmc-info/bmc-info.in: removed. * bmc-info/Makefile.am, bmc-info/doc/Makefile.am, bmc-info/doc/bmc-info.8.in, bmc-info/src/Makefile.am, bmc-info/src/bmc-info-argp.c, bmc-info/src/bmc-info-argp.h, bmc-info/src/bmc-info.c: now bmc-info is in C. * Makefile.am, configure.ac, fish/Makefile.am, fish/scripts/Makefile.am: updated. 2005-12-28 A Balamurugan * fish/extensions/bc-common.scm, fish/extensions/pef.scm, fish/extensions/sel.scm, fish/extensions/sensors-common.scm: fixed argument parsing bug. * libfreeipmi/src/ipmi-interface.c (ipmi_cmd): accepts lun, net_fn as arguments. * libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/ipmi-dev-global-cmds.c, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-pef-cmds.c, libfreeipmi/src/ipmi-sdr-repo-cmds.c, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sensor-cmds.c, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-sol-cmds.c: adopts changes in ipmi_cmd(). 2005-12-27 A Balamurugan * fish/src/ipmi-wrapper.c (fi_ipmi_open): initialize dev before calling udm open functions. * ipmi-raw/src/ipmi-raw.c: like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_io_init): like wise. * libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband,ipmi_open_inband): no memset of dev arguments. 2005-12-27 Albert Chu * libfreeipmi/src/freeipmi.h (ERR, ERR_OUT, ERR_EXIT): Revert changes from 2005-12-20. Remembered why they were removed in the first place. * libfreeipmi/src/ipmi-debug.c (_set_prefix_str, _output_str, _output_byte_array): Make functions static. Modified setup and output logic. * libfreeipmi/src/ipmi-debug.h, libfreeipmi/src/ipmi-debug.c (fiid_obj_dump_setup): New function. * libfreeipmi/src/ipmi-debug.c (fiid_obj_dump_rmcp, fiid_obj_dump_lan, fiid_obj_dump_perror): Fix up for setup changes. 2005-12-26 A Balamurugan * fish/src/ipmi-wrapper.c (fi_ipmi_open): autoprobe inband devices when no driver from command line. * ipmi-raw/src/ipmi-raw.c: like wise. 2005-12-26 A Balamurugan * fish/src/ipmi-wrapper.c (fi_ipmi_open): updated to new command line arguments. * ipmi-raw/src/ipmi-raw.c: like wise. * libfreeipmi/src/ipmi-interface.c (ipmi_open_inband): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (): like wise. 2005-12-25 A Balamurugan * common/src/argp-common.[ch]: New files. * ipmi-locate/src/common.h: Removed. * doc/examples/udm-test.c: uses argp-common.[ch]. * fish/extensions/bc-common.scm: Added more command line options. * fish/extensions/bmc-config.scm: like wise. * fish/extensions/bmc-info.scm: like wise. * fish/extensions/pef.scm: like wise. * fish/extensions/sel.scm: like wise. * fish/extensions/sensors-common.scm: like wise. * fish/extensions/sensors.scm: like wise. * fish/src/Makefile.am: Updated. * fish/src/extension.c: Removed ex_set_sms_io_base and ex_set_driver_poll_interval. * fish/src/fish-argp.c: uses argp-common.[ch]. Removed fi_set_sms_io_base() and set_driver_poll_interval(). * fish/src/scm-procedures.c: Removed ex_set_sms_io_base() and ex_set_driver_poll_interval(). Improved ex_ipmi_open(). * ipmi-locate/src/Makefile.am: Updated. * ipmi-locate/src/ipmi-locate-argp.c: Improved. * ipmi-locate/src/ipmi-locate.c: like wise. * ipmi-raw/src/Makefile.am: Updated. * ipmi-raw/src/ipmi-raw-argp.c: uses argp-common.[ch]. * ipmi-raw/src/ipmi-raw.c: like wise. 2005-12-20 Albert Chu * libfreeipmi/src/freeipmi.h (ERR, ERR_OUT, ERR_EXIT): Define even if FREEIPMI_LIBRARY is not defined. 2005-12-18 A Balamurugan * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd_raw2): Rewritten. * libfreeipmi/src/ipmi-ssif-interface.c (ipmi_ssif_cmd_raw2): like wise. 2005-12-17 A Balamurugan * ipmi-locate/src/ipmi-locate.c: Fixed a bug which uses unallocated memory. 2005-12-17 A Balamurugan * ipmi-locate/ipmi-locate.8: Added man page. 2005-12-17 A Balamurugan * ipmi-locate: New tool to probe and display ipmi devices. * configure.ac: Updated. * Makefile.am: Updated. 2005-12-17 A Balamurugan * libfreeipmi/src/ipmi-interface.c (ipmi_open_inband,ipmi_cmd,ipmi_cmd_raw,ipmi_inband_close): Added SSIF inband support in UDM. * libfreeipmi/src/ipmi-ssif-interface.c (ipmi_ssif_cmd2,ipmi_ssif_cmd_raw2): Added functions. 2005-12-16 A Balamurugan * fish/src/fish-argp.c (fi_set_arguments): new function. * fish/src/ipmi-wrapper.c (get_ipmi_host_ip_address): Improved. * fish/src/scm-procedures.c (ex_ipmi_open): Improved. 2005-12-16 A Balamurugan * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd2): added debugging code when invalid packet data is received. 2005-12-16 Anand Babu * lot of .c,.h files: Applying Anand Avati's patch for ISO C99: 7.18 Integer types compliance. This also closes Bastian Blank 's bug #11210 overview: Uses nonstandard datatypes. 2005-12-14 A Balamurugan * fish/extensions/bc-common.scm: Fixed command line argument parsing bug. * fish/extensions/bmc-info.scm: like wise. * fish/extensions/pef.scm: like wise. * fish/extensions/sel.scm: like wise. * fish/extensions/sensors-common.scm: like wise. * libfreeipmi/src/ipmi-sensor-event-messages.c (get_01_generic_event_message, get_02_generic_event_message, get_03_generic_event_message, get_04_generic_event_message, get_05_generic_event_message, get_06_generic_event_message, get_07_generic_event_message, get_08_generic_event_message, get_09_generic_event_message, get_0A_generic_event_message, get_0B_generic_event_message, get_0C_generic_event_message, get_01_event_message, get_02_event_message, get_03_event_message, get_04_event_message, get_05_event_message, get_06_event_message, get_07_event_message, get_08_event_message, get_09_event_message, get_0C_event_message, get_0F_event_message, get_10_event_message, get_11_event_message, get_12_event_message, get_13_event_message, get_14_event_message, get_19_event_message, get_1D_event_message, get_1E_event_message, get_1F_event_message, get_20_event_message, get_21_event_message, get_22_event_message, get_23_event_message, get_24_event_message, get_25_event_message, get_27_event_message, get_28_event_message, get_29_event_message, get_2A_event_message, get_2B_event_message, get_2C_event_message, get_05_event_data2_message, get_0F_event_data2_message, get_10_event_data2_message, get_12_event_data2_message, get_19_event_data2_message, get_21_event_data2_message, get_23_event_data2_message, get_2A_event_data2_message, get_2B_event_data2_message, get_2C_event_data2_message, get_08_event_data3_message, get_0C_event_data3_message, get_10_event_data3_message, get_19_event_data3_message, get_21_event_data3_message, get_2A_event_data3_message): Become static functions. 2005-12-13 Anand Babu * libfreeipmi/src/fiid.c: fiid_obj_alloc -> fiid_obj_calloc. Updated across the codebase. fiid_obj_alloc and fiid_obj_malloc is now a macro to fiid_obj_calloc. *fish/src/extension.c: once again replaced the depricated gh_ functions to make hook using scm functions. But this time, I use scm_permanent_object to prevent the GC from freeing the hook variable. This should fix the bug. fish/src/scm-procedures.c: merged the changes from old commit that replaced gh_ with scm_ functions. 2005-12-12 Albert Chu * configure.ac: Revert 2005-12-11 changes. * libfreeipmi/src/fiid.h (FIID_OBJ_GET_DATA): New macro. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd_raw2): Fix compile warning. 2005-12-11 Anand Babu * libfreeipmi/src/defaults-locate.c,h: new files. Re-implemented defaults as a fake driver. * libfreeipmi/src/ipmi-locate.c: Changed the driver probing order to smbios, acpi, pci and defaults. Added locate_driver_type field to locate_info to identify which driver probed the data for us. 2005-12-08 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_session_challenge2), libfreeipmi/src/ipmi-lan-interface.c (fill_hdr_session2): Revert buffer length changes from earlier. Ends up not being necessary. 2005-12-08 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_session_challenge2): Fix buffer length copying bug. * libfreeipmi/src/ipmi-lan-interface.c (fill_hdr_session2): Fix buffer length copying bugs. Fixed incorrect MD2/MD5 calculation bugs. 2005-12-08 A Balamurugan * ipmi-raw/Makefile.am: New file. * ipmi-raw/ipmi-raw.8: New file. * ipmi-raw/src/Makefile.am: New file. * ipmi-raw/src/ipmi-raw-argp.[ch]: New files. * ipmi-raw/src/ipmi-raw.c: New file. * Makefile.am: Updated. * configure.ac: Updated. * libfreeipmi/src/ipmi-interface.c (ipmi_cmd_raw): Updated. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd_raw2): Added new function. 2005-12-08 Albert Chu * libfreeipmi/src/ipmi-debug.c (ipmi_debug): Fix several compile bugs when compiling with syslogging or tracing. 2005-12-08 Anand Babu * libfreeipmi/src/ipmi-locate.c (ipmi_locate): Now returns default settings as a last resort. * libfreeipmi/src/ipmi-ssif-interface.h: Added IPMI_SSIF_SMBUS_SLAVE_ADDR definition. 2005-12-05 Anand Babu * fish/extensions/sel.scm: Anand Avati's patch for bug [#14926 fish assumes user has a home directory]. * libfreeipmi/src/freeipmi.h: More tests for sys/io.h header inclusing. Closing bug [#11209 overview: Uses ys/io.h]. 2005-12-05 Albert Chu * libfreeipmi/src/fiid.h, libfreeipmi/src/fiid.c (fiid_obj_get_data): Add len parameter for data buffer. * fish/src, libfreeipmi/src: Various changes to support change in fiid_obj_get_data, in particular passing lengths of buffers to various functions. 2005-12-02 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (unassemble_ipmi_lan_pkt), libfreeipmi/src/ipmi-debug.c (fiid_obj_dump_lan): Fill in lan trailer even when packet is shorter than expected. 2005-12-01 Albert Chu * fish/bmc-config.conf.5.in: Fixed typos. 2005-11-21 Albert Chu * libfreeipmi/src/ipmi-lan-interface.h (IPMI_LAN_PKT_RQ_CHKSUM2_BLOCK_LEN, IPMI_LAN_PKT_RS_CHKSUM2_BLOCK_LEN): Fixed bug in macros that incorrectly calculated chksum data lengths. Bugs never occurred in libfreeipmi b/c buffers were memset and the chksums were adding pointless 0's. 2005-11-17 Albert Chu Merge in rmcpping/ipmiping changes from branch al_ipmi_2_0_branch that aren't IPMI 2.0 related. * ipmiping/src/ipmiping.c, rmcpping/src/rmcpping.c, libfreeipmi/src/ipmi-ping.h, libfreeipmi/src/ipmi-ping.c: Various changes to support new -s option and randomized starting sequence numbers. * configure.ac: Add checks of /dev/urandom and /dev/random. * ipmiping/ipmiping.8.in, rmcpping/rmcpping.8.in: Document new options and info. 2005-11-17 Albert Chu * ipmipower/src/ipmipower.c (main): Fix compiler warning. 2005-11-17 Anand Babu * fish/extensions/sel.scm: Anand Avati's patch for --delete-event-id option. Closing * freeipmi/doc/freeipmi.texi: doc for --delete-event-id option. * fish/ipmi-sel.8.in: like wise. 2005-11-16 Albert Chu * libfreeipmi/src/rmcp.c (unassemble_rmcp_pkt), libfreeipmi/src/ipmi-lan-interface.c (assemble_ipmi_lan_pkt, assemble_ipmi_lan_pkt2, unassemble_ipmi_lan_pkt): Clean up code to minimize looping through templates. 2005-11-15 Albert Chu * libfreeipmi/src/ipmi-debug.h, libfreeipmi/src/ipmi-debug.c (ipmi_debug): New function. 2005-11-14 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_open_session): Revert some 2005-08-27 changes. Replace password with auth_code_data and auth_code_data_len parameters for consistency with other function calls. Fix segfaulting corner case. 2005-11-14 Anand Babu * fish/extensions/sel.scm: Anand Avati's patch for --delete-range option. * freeipmi/doc/freeipmi.texi: doc for --delete-range option. * fish/ipmi-sel.8.in: like wise. 2005-11-11 Albert Chu * fish/src/extensions.c, fish/src/scm-procedures.c: Revert changes made on 11/06/05. Changes cause many things to break under RHEL3/RHEL4. * libfreeipmi/src/ipmi-lan-interface.c (fill_hdr_session2): Fix compiler warnings. * freeipmi.spec.in: Add guile dependency. 2005-11-10 Albert Chu * ipmipower/src/ipmi-privilege.h, ipmipower/src/ipmi-privilege.c: New files. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower.c (main), ipmipower/src/ipmipower_config.c (ipmipower_config_setup, ipmipower_config_cmdline_parse, _cb_privilege, _cb_outputtype), ipmipower/src/ipmipower_output.c (ipmipower_outputs), ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue, _process_ipmi_packets), ipmipower/src/ipmipower_prompt.c (_cmd_advanced, _cmd_power, _cmd_privilege, _cmd_config): Support new --privilege option and equivalent interactive mode and config file options. * ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in: Document support for privilege option. * ipmipower/src/ipmipower_auth.c (ipmipower_ipmi_auth_type): Fix error output typo. * ipmipower/src/Makefile.am: Add ipmipower-privilege.h and ipmipower-privilege.c. * ipmipower/src/ipmipower.h: Fix potential macro bugs. * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-hmac.h, libfreeipmi/src/ipmi-interface.h, libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-watchdog.h: Fix potential macro bugs. * freeipmi.spec.in: Update with new files. 2005-11-09 Albert Chu * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_config.c (ipmipower_config_setup, ipmipower_config_cmdline_parse, ipmipower_config_conffile_parse), ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets), ipmipower/src/ipmipower_prompt.c (_cmd_advanced, _cmd_config): Support new --force-permsg-auth option and equivalent interactive mode and config file options. * ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in: Document support for force-permsg-auth. * ipmipower/ipmipower.8.in: Add forgotten documentation of on-if-off option in interactive mode. 2005-11-09 Albert Chu Merge in various changes from branch al_ipmi_2_0_branch that aren't IPMI 2.0 related. * libfreeipmi/src/fiid.h: New FIID_OBJ_MEMSET and FIID_OBJ_SET_DATA macros. * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-chassis-cmds.c: Support IPMI Chassis Identify command. * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-chassis-cmds.c (fill_cmd_chassis_identify): New function. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower.c (_setup), ipmipower/src/ipmipower_check.c (_check_outbound_seq_num_), ipmipower/src/ipmipower_packet.c (ipmipower_packet_create), ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue, _recv_packet): Support a randomized initial outbound sequence number. * ipmipower/src/ipmipower_powercmd.c (_send_packet): Always increment ipmi_send_count and session_inbound_count. * ipmipower/src/ipmipower_powercmd.c (_retry_packets): Fix up comments due to fixes above. * ipmipower/src/ipmipower_util.h, ipmipower/src/ipmipower_util.c (get_rand): New function. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_check.c (_check_requester_seq_num), ipmipower/src/ipmipower_connection.c (_connection_setup), ipmipower/src/ipmipower_packet.c (ipmipower_packet_create), ipmipower/src/ipmipower_powercmd.c (_send_packet): Support randomized initial requester sequence numbers. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_connection.c (_connection_setup), ipmipower/src/ipmipower_ping.c (ipmipower_ping_process_pings): Support randomized initial rmcpping sequence numbers. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_check.c (_check_outbound_seq_num), : Rework to use IPMI spec sequence check algorithm. * ipmipower/src/ipmipower_check.h, ipmipower/src/ipmipower_check.c (ipmipower_check_packet): Re-work API to pass flags back to caller with test results. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue, _send_packet, _recv_packet, _bad_packet): Fixed various code due to above changes to ipmipower_check_packet. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue, _process_ipmi_packets, _retry_packets): Don't retransmit on a close-session timeout. There's no need to and it may not work. * ipmipower/ipmipower.8.in, ipmipower/src/ipmipower_check.c, ipmipower/src/ipmipower_powercmd.c: Add additional comments, notes, and details on IPMI compliance workarounds. * ipmipower/: Various minor code cleanup. 2005-11-08 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.h: Add IPMI_CHANNEL_CURRENT_CHANNEL. * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c (fill_cmd_get_channel_auth_caps): Require user to pass in BMC channel number. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_get_channel_auth_caps, ipmi_lan_get_channel_auth_caps2), ipmiping/src/ipmiping.c (createpacket), ipmipower/src/ipmipower_packet.c (ipmipower_packet_create): Support change in API. 2005-11-07 Albert Chu * libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-lan-interface.h, libfreeipmi/src/msg-support-cmds.h, libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/rmcp.h: Remove all #if 0'd out code that was still lingering from late 2003 development. * fish/scripts/bmc-autoconfig/Makefile.am: Dist out bmc-autoconfig. 2005-11-06 Anand Babu * fish/src/extension.c: Depricated Guile APIs are with newer ones. scm_create_hook with (scm_c_define (scm_make_hook)), gh_new_procedure with scm_c_define_gsubr, gh_str02scm with scm_makfrom0str, gh_list with scm_listify, gh_list_p by SCM_NFALSEP, gh_append2 with (scm_append (scm_listify)), gh_cons with scm_cons, gh_ulong2scm with scm_ulong2num, gh_long2scm with scm_long2num, gh_scm2bool with SCM_NFALSEP, gh_bool2scm with SCM_BOOL, gh_double2scm with scm_make_real, gh_char2scm with SCM_MAKE_CHAR. * doc/version.texi: Autogenerated by Automake's mdate-sh. You may need a fresh checkout if you see version.texi missing error during compilation. 2005-10-29 A Balamurugan * fish/extensions/bc-common.scm: Allows anyone of checkout, commit, diff options. * fish/scripts/bmc-autoconfig/bmc-autoconfig: Improved. 2005-10-28 Albert chu * ipmipower/ipmipower.8.in: Fixed some wording for -a option. 2005-10-26 A Balamurugan * fish/extensions/pef.scm: Code cleanup. * fish/scripts/bmc-autoconfig/Makefile.am: Fixed a bug which deletes source file. * fish/src/bmc-conf2.c (set_bmc_username, set_bmc_enable_user, set_bmc_user_password, set_bmc_user_lan_channel_access, set_bmc_user_serial_channel_access, set_bmc_lan_channel_volatile_access, set_bmc_lan_channel_non_volatile_access, set_bmc_lan_conf_ip_addr_source, set_bmc_lan_conf_ip_addr, set_bmc_lan_conf_mac_addr, set_bmc_lan_conf_subnet_mask, set_bmc_lan_conf_default_gw_ip_addr, set_bmc_lan_conf_default_gw_mac_addr, set_bmc_lan_conf_backup_gw_ip_addr, set_bmc_lan_conf_backup_gw_mac_addr, set_bmc_lan_conf_vlan_id, set_bmc_lan_conf_vlan_priority, set_bmc_lan_conf_auth_type_enables, set_bmc_lan_conf_arp_control, set_bmc_lan_conf_gratuitous_arp, set_bmc_serial_channel_volatile_access, set_bmc_serial_channel_non_volatile_access, set_bmc_serial_conf_conn_mode, set_bmc_serial_conf_page_blackout_interval, set_bmc_serial_conf_call_retry_time, set_bmc_serial_conf_ipmi_msg_comm_settings, set_bmc_power_restore_policy, get_bmc_username, get_bmc_user_lan_channel_access, get_bmc_user_serial_channel_access, get_bmc_lan_channel_volatile_access, get_bmc_lan_channel_non_volatile_access, get_bmc_lan_conf_ip_addr_source, get_bmc_lan_conf_ip_addr, get_bmc_lan_conf_mac_addr, get_bmc_lan_conf_subnet_mask, get_bmc_lan_conf_default_gw_ip_addr, get_bmc_lan_conf_default_gw_mac_addr, get_bmc_lan_conf_backup_gw_ip_addr, get_bmc_lan_conf_backup_gw_mac_addr, get_bmc_lan_conf_auth_type_enables, get_bmc_lan_conf_arp_control, get_bmc_lan_conf_gratuitous_arp, get_bmc_serial_channel_volatile_access, get_bmc_serial_channel_non_volatile_access, get_bmc_serial_conf_conn_mode, get_bmc_serial_conf_page_blackout_interval, get_bmc_serial_conf_call_retry_time, get_bmc_serial_conf_ipmi_msg_comm_settings, get_bmc_power_restore_policy, get_bmc_lan_conf_vlan_id, get_bmc_lan_conf_vlan_priority, check_bmc_user_password): UDM enabled. * libfreeipmi/src/ipmi-lan-cmds.c (ipmi_cmd_lan_set_backup_gw_mac_addr2): Fixed function name typo error. 2005-10-16 A Balamurugan * fish/extensions/bmc-config.scm: Fixed bug in pef_conf_s. 2005-10-16 A Balamurugan * libfreeipmi/src/ipmi-sensor-api.c (get_sdr_record): Better error handling. * fish/src/bmc-conf2.c (set_pef_control, set_pef_global_action_control, set_pef_startup_delay, set_pef_alert_startup_delay, get_pef_control, get_pef_global_action_control, get_pef_startup_delay, get_pef_alert_startup_delay): New functions. * fish/src/extension.c (install_new_procedures): New exports fi-set-bmc-pef-conf-pef-control, fi-set-bmc-pef-conf-pef-global-action-control, fi-set-bmc-pef-conf-pef-startup-delay, fi-set-bmc-pef-conf-pef-alert-startup-delay, fi-get-bmc-pef-conf-pef-control, fi-get-bmc-pef-conf-pef-global-action-control, fi-get-bmc-pef-conf-pef-startup-delay and fi-get-bmc-pef-conf-pef-alert-startup-delay. * fish/src/scm-procedures.c (ex_set_bmc_pef_conf_pef_control, ex_set_bmc_pef_conf_pef_global_action_control, ex_set_bmc_pef_conf_pef_startup_delay, ex_set_bmc_pef_conf_pef_alert_startup_delay, ex_get_bmc_pef_conf_pef_control, ex_get_bmc_pef_conf_pef_global_action_control, ex_get_bmc_pef_conf_pef_startup_delay, ex_get_bmc_pef_conf_pef_alert_startup_delay): New functions. * fish/extensions/bc-section.scm: Added pef_conf section. * fish/extensions/bmc-config.scm: Added pef_conf support. * fish/extensions/Makefile.am: Updated. 2005-10-13 Anand Babu * fish/scripts/bmc-autoconfig/bmc-autoconfig: texi documentation and bug fixes to bmc auto configuration wizzard. Thanks to Anand Avati 2005-10-12 Anand Babu * fish/scripts/bmc-autoconfig/bmc-autoconfig: new bmc configuration wizzard. Thanks to Anand Avati 2005-10-12 A Balamurugan * libfreeipmi/src/ipmi-sensor-api.c (get_sdr_record): Now ignores ipmi_cmd_get_sensor_thresholds2() command error. 2005-10-09 A Balamurugan * freeipmi/libfreeipmi/src/ipmi-pef-cmds.c (ipmi_cmd_get_pef_num_alert_strings2): New function. * freeipmi/fish/src/extension.c (fi-get-pef-info): New export. * freeipmi/fish/src/scm-procedures.c (ex_get_pef_info): New function. * freeipmi/fish/extensions/sensors-common.scm (sensors-argp): Bug fix in verbose option parsing. * freeipmi/fish/extensions/sensors.scm (sensors-display-sensors): Bug fix in parsed command line args handling. * freeipmi/fish/extensions/pef.scm: New file. * freeipmi/fish/extensions/init.scm: Updated. * freeipmi/fish/extensions/Makefile.am: like wise. * freeipmi/fish/scripts/Makefile.am: like wise. * freeipmi/fish/scripts/pef/ipmi-pef.in: New file. * freeipmi/fish/scripts/pef/Makefile.am: like wise. * freeipmi/configure.ac: Updated. 2005-10-08 A Balamurugan * freeipmi/libfreeipmi/src/freeipmi.h: Enables static function definitions only if config.h file exists. * freeipmi/libfreeipmi/src/ipmi-error.c (ipmi_strerror_r, ipmi_strerror_cmd_r, ipmi_kcs_strstatus_r): Improved. * freeipmi/libfreeipmi/src/ipmi-error.c (ipmi_error): New function. * freeipmi/libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_auth_caps2, ipmi_cmd_get_session_challenge2): Fixed serious bug which makes function failure. * freeipmi/libfreeipmi/src/ipmi-sdr-repo-cmds.c (ipmi_cmd_get_sdr_repo_info2, ipmi_cmd_get_sdr_repo_alloc_info2, ipmi_cmd_reserve_sdr_repo2): Renamed. * freeipmi/libfreeipmi/src/ipmi-sel-api.c (ipmi_sel_get_first_entry, ipmi_sel_get_next_entry, get_sel_info): UDM enabled. * freeipmi/libfreeipmi/src/ipmi-sel-api.c (get_sel_system_event_record, get_sel_timestamped_oem_record, get_sel_non_timestamped_oem_record, get_sel_record): Moved to ipmi-sel-record-types.c. * freeipmi/libfreeipmi/src/ipmi-sel-record-types.c (ipmi_sel_get_first_entry, ipmi_sel_get_next_entry): Moved to ipmi-sel-api.c. * freeipmi/libfreeipmi/src/ipmi-sensor-api.c (get_sdr_record, get_sensor_reading): UDM enabled. * freeipmi/libfreeipmi/src/ipmi-utils.c (ipmi_comp_test): Sets errno when failure. * freeipmi/fish/src/extension.c (install_new_procedures): Removed fi-sdr-get-repo-info and fi-sel-get-info procedure exports. * freeipmi/fish/src/interpreter.c (dynamic_command_handler): Simplified. * freeipmi/fish/src/ipmi-wrapper.c (fi_get_seld): New function. * freeipmi/fish/src/ipmi-wrapper.c (fi_ipmi_open): Uses ipmi_error(). * freeipmi/fish/src/scm-procedures.c (ex_sdr_get_repo_info, ex_sel_get_info): Removed. * freeipmi/fish/src/scm-procedures.c (ex_sel_get_first_entry_raw, ex_sel_get_next_entry_raw, ex_sel_get_first_entry_hex, ex_sel_get_next_entry_hex, ex_sel_get_info_binary, ex_sel_get_first_entry, ex_sel_get_next_entry, ex_sel_delete_entry, ex_sel_clear, ex_sel_get_clear_status, ex_get_sdr_record, ex_get_sensor_reading, ex_get_sdr_repo_info): Uses UDM enabled functions. * freeipmi/fish/src/scm-procedures.c (ex_get_bmc_info): Uses ipmi_error(). * freeipmi/fish/extensions/bc-common.scm: Better command line argument parsing.. * freeipmi/fish/extensions/bmc-config.scm: Initial work of UDM support. * freeipmi/fish/extensions/bmc-info.scm: Fixed fish register command bug. * freeipmi/fish/extensions/sel.scm: UDM enabled. * freeipmi/fish/extensions/sensors-common.scm: Better command line argument parsing. * freeipmi/fish/extensions/sensors.scm: UDM enabled. * freeipmi/fish/extensions/utils.scm: Simplified list->sentence and list->strlist procedures. * freeipmi/fish/scripts/bmc-config/bmc-config.in: Simplified. * freeipmi/fish/scripts/sel/ipmi-sel.in: Simplified. * freeipmi/fish/scripts/sensors/ipmi-sensors.in: Simplified. 2005-10-06 A Balamurugan * libfreeipmi/src/ipmi-chassis-cmds.c (ipmi_cmd_set_power_restore_policy2, ipmi_cmd_get_chassis_status2): Functions does not allocate obj_cmd_rs. * libfreeipmi/src/ipmi-dev-global-cmds.c (ipmi_cmd_get_dev_id): like wise. * ibfreeipmi/src/ipmi-lan-cmds.c (ipmi_cmd_lan_set_arp2, ipmi_lan_set_gratuitous_arp_interval2, ipmi_cmd_lan_set_auth_type_enables2, ipmi_cmd_lan_set_ip_addr_source2, ipmi_cmd_lan_set_ip_addr2, ipmi_cmd_lan_set_default_gw_ip_addr2, ipmi_cmd_lan_set_backup_gw_ip_addr2, ipmi_cmd_lan_set_vlan_id2, ipmi_cmd_lan_set_vlan_priority2, ipmi_cmd_lan_set_subnet_mask2, ipmi_cmd_lan_set_mac_addr2, ipmi_cmd_lan_set_default_gw_mac_addr2, ipmi_cmd_lan_set_hackup_gw_mac_addr2, ipmi_cmd_lan_get_arp2, ipmi_cmd_lan_get_gratuitous_arp_interval2, ipmi_cmd_lan_get_auth_type_enables2, ipmi_cmd_lan_get_ip_addr_source2, ipmi_cmd_lan_get_ip_addr2, ipmi_cmd_lan_get_default_gw_ip_addr2, ipmi_cmd_lan_get_backup_gw_ip_addr2, ipmi_cmd_lan_get_subnet_mask2, ipmi_cmd_lan_get_mac_addr2, ipmi_cmd_lan_get_default_gw_mac_addr2, ipmi_cmd_lan_get_backup_gw_mac_addr2, ipmi_cmd_suspend_bmc_arps2, ipmi_cmd_lan_get_vlan_id2, ipmi_cmd_lan_get_vlan_priority2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_auth_caps2, ipmi_cmd_get_session_challenge2, ipmi_cmd_activate_session2, ipmi_cmd_set_session_priv_level2, ipmi_lan_open_session2, ipmi_lan_close_session2, ipmi_cmd_set_channel_access2, ipmi_cmd_set_user_name2, ipmi_cmd_get_user_name2, ipmi_cmd_set_user_password2, ipmi_cmd_set_user_access2, ipmi_cmd_get_user_access2, ipmi_cmd_get_channel_access2, ipmi_cmd_get_channel_info2): like wise. * libfreeipmi/src/ipmi-sdr-repo-cmds.c (ipmi_cmd_get_repo_info2, ipmi_cmd_get_repo_alloc_info2, ipmi_cmd_reserve_repo2, ipmi_cmd_get_sdr2): like wise. * libfreeipmi/src/ipmi-sel-cmds.c (ipmi_cmd_get_sel_info2, ipmi_cmd_get_sel_alloc_info2, ipmi_cmd_reserve_sel2, ipmi_cmd_get_sel_entry2, ipmi_cmd_delete_sel_entry2, ipmi_cmd_clear_sel2): like wise. * libfreeipmi/src/ipmi-sensor-cmds.c (ipmi_cmd_get_threshold_reading2, ipmi_cmd_get_discrete_reading2, ipmi_cmd_get_sensor_thresholds2): like wise. * libfreeipmi/src/ipmi-serial-cmds.c (ipmi_cmd_set_serial_connmode2, ipmi_cmd_set_serial_page_blackout_interval2, ipmi_cmd_set_serial_retry_time2, ipmi_cmd_set_serial_comm_bits2, ipmi_cmd_get_serial_connmode2, ipmi_cmd_get_serial_page_blackout2, ipmi_cmd_get_serial_retry_time2, ipmi_cmd_get_serial_comm_bits2): like wise. * libfreeipmi/src/ipmi-sol-cmds.c (ipmi_cmd_sol_conf_sol_enable_disable2, ipmi_cmd_sol_conf_sol_enable2, ipmi_cmd_sol_conf_sol_disable2, ipmi_cmd_sol_conf_get_sol_enable2): like wise. * freeipmi/libfreeipmi/src/ipmi-pef-cmds.c (ipmi_cmd_set_pef_control2, ipmi_cmd_set_global_action_control2, ipmi_cmd_set_startup_delay2, ipmi_cmd_set_alert_startup_delay2, ipmi_cmd_set_num_event_filters2, ipmi_cmd_set_filter_table_entry2, ipmi_cmd_set_filter_table_data1_2, ipmi_cmd_set_num_alert_policies2, ipmi_cmd_alert_immediate2, ipmi_cmd_get_pef_alert_string2, ipmi_cmd_get_pef_alert_string_keys2, ipmi_cmd_get_pef_num_alert_policies2, ipmi_cmd_get_pef_filter_data1_2, ipmi_cmd_get_pef_control2, ipmi_cmd_get_pef_global_action_control2, ipmi_cmd_get_pef_startup_delay2, ipmi_cmd_get_pef_alert_startup_delay2, ipmi_cmd_get_pef_num_event_filters2, ipmi_cmd_get_pef_filter_table_entry2, ipmi_cmd_get_pef_caps2, ipmi_cmd_arm_pef_postpone_timer2, ipmi_cmd_set_last_processed_event2, ipmi_cmd_get_last_processed_event2, ipmi_cmd_pet_ack2): new functions. * freeipmi/libfreeipmi/src/fiid.h (fiid_obj_alloca): New macro. * freeipmi/libfreeipmi/src/ipmi-interface.c (ipmi_outofband_free, ipmi_inband_free): New functions. * freeipmi/libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband, ipmi_open_inband, ipmi_outofband_close, ipmi_inband_close): Improved. * freeipmi/libfreeipmi/src/ipmi-kcs-interface.c (ipmi_enable_old_kcs_init): New function. * freeipmi/libfreeipmi/src/freeipmi.h: Updated. * freeipmi/libfreeipmi/src/bit-ops.[ch]: #include cleanup. * freeipmi/libfreeipmi/src/fiid.c: like wise. * freeipmi/libfreeipmi/src/ipmi-debug.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-error.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-hmac.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-lan-interface.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-locate.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-md2.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-md5.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-msg-interface-desc.c: like wise. * freeipmi/libfreeipmi/src/ipmi-netfn-spec.c: like wise. * freeipmi/libfreeipmi/src/ipmi-ping.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sdr-record-types.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sdr-repo-cache.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sel-record-types.c: like wise. * freeipmi/libfreeipmi/src/ipmi-semaphores.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sensor-api.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sensor-event-messages.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sensor-types.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sensor-utils.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sessions.c: like wise. * freeipmi/libfreeipmi/src/ipmi-sha1.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-smic-interface.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-ssif-interface.c: like wise. * freeipmi/libfreeipmi/src/ipmi-utils.[ch]: like wise. * freeipmi/libfreeipmi/src/ipmi-watchdog.c: like wise. * freeipmi/libfreeipmi/src/libfreeipmi.c: like wise. * freeipmi/libfreeipmi/src/pci-locate.c: like wise. * freeipmi/libfreeipmi/src/rmcp.[ch]: like wise. * freeipmi/libfreeipmi/src/smbios-locate.c: like wise. * freeipmi/libfreeipmi/src/xmalloc.[ch]: like wise. * freeipmi/doc/examples/udm-test.c: Updated. * freeipmi/fish/src/common.h: New file. * freeipmi/fish/src/fish-argp.[ch]: New files. * freeipmi/fish/src/extension.c (install_new_procedures): Added fi-ipmi-open, fi-ipmi-close, fi-cmd-get-dev-id-display procedures. Removed fi-set-sock-timeout!, fi-get-sock-timeout and fi-kcs-get-dev-id-display procedures. * freeipmi/fish/src/fish.[ch]: Major code cleanup. * freeipmi/fish/src/interpreter.c: Code cleanup. * freeipmi/fish/src/ipmi-wrapper.[ch]: Major code cleanup. * freeipmi/fish/src/ipmi-wrapper.c (fi_get_ipmi_device, fi_ipmi_open, fi_ipmi_close): New functions. * freeipmi/fish/src/Makefile.am: Updated. * freeipmi/fish/src/scm-procedures.c (ex_get_sock_timeout, ex_set_sock_timeout, ex_kcs_get_dev_id_display): Removed. * freeipmi/fish/src/scm-procedures.c (ex_cmd_get_dev_id_display, ex_get_bmc_info, ex_ipmi_open, ex_ipmi_close): New functions. * freeipmi/fish/src/bmc-conf2.c: #include cleanup. * freeipmi/fish/src/fi-commands.c: like wise. * freeipmi/fish/src/fi-utils.c: like wise. * freeipmi/fish/src/fi-utils.h: like wise. * freeipmi/fish/src/guile-wrapper.c: like wise. * freeipmi/fish/src/xmalloc.[ch]: like wise. * freeipmi/fish/Makefile.am: Updated. * freeipmi/fish/extensions/bmc-info.scm: Rewritten. * freeipmi/fish/extensions/discovery.scm: Updated. * freeipmi/fish/extensions/Makefile.am: Updated. * freeipmi/fish/scripts/bmc-info/bmc-info.in: Rewritten. 2005-10-04 Albert Chu * freeipmi.spec.in: Update with new files. 2005-10-01 A Balamurugan * libfreeipmi/src/ipmi-chassis-cmds.c (ipmi_cmd_set_power_restore_policy2, ipmi_cmd_get_chassis_status2): New functions. * libfreeipmi/src/ipmi-dev-global-cmds.c (ipmi_cmd_get_dev_id): Improved. * ibfreeipmi/src/ipmi-lan-cmds.c (ipmi_cmd_lan_set_arp2, ipmi_lan_set_gratuitous_arp_interval2, ipmi_cmd_lan_set_auth_type_enables2, ipmi_cmd_lan_set_ip_addr_source2, ipmi_cmd_lan_set_ip_addr2, ipmi_cmd_lan_set_default_gw_ip_addr2, ipmi_cmd_lan_set_backup_gw_ip_addr2, ipmi_cmd_lan_set_vlan_id2, ipmi_cmd_lan_set_vlan_priority2, ipmi_cmd_lan_set_subnet_mask2, ipmi_cmd_lan_set_mac_addr2, ipmi_cmd_lan_set_default_gw_mac_addr2, ipmi_cmd_lan_set_hackup_gw_mac_addr2, ipmi_cmd_lan_get_arp2, ipmi_cmd_lan_get_gratuitous_arp_interval2, ipmi_cmd_lan_get_auth_type_enables2, ipmi_cmd_lan_get_ip_addr_source2, ipmi_cmd_lan_get_ip_addr2, ipmi_cmd_lan_get_default_gw_ip_addr2, ipmi_cmd_lan_get_backup_gw_ip_addr2, ipmi_cmd_lan_get_subnet_mask2, ipmi_cmd_lan_get_mac_addr2, ipmi_cmd_lan_get_default_gw_mac_addr2, ipmi_cmd_lan_get_backup_gw_mac_addr2, ipmi_cmd_suspend_bmc_arps2, ipmi_cmd_lan_get_vlan_id2, ipmi_cmd_lan_get_vlan_priority2): New functions. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_set_channel_access2, ipmi_cmd_set_user_name2, ipmi_cmd_get_user_name2, ipmi_cmd_set_user_password2, ipmi_cmd_set_user_access2, ipmi_cmd_get_user_access2, ipmi_cmd_get_channel_access2, ipmi_cmd_get_channel_info2): New functions. * libfreeipmi/src/ipmi-sdr-repo-cmds.c (ipmi_cmd_get_repo_info2, ipmi_cmd_get_repo_alloc_info2, ipmi_cmd_reserve_repo2, ipmi_cmd_get_sdr2): New functions. * libfreeipmi/src/ipmi-sel-cmds.c (ipmi_cmd_get_sel_info2, ipmi_cmd_get_sel_alloc_info2, ipmi_cmd_reserve_sel2, ipmi_cmd_get_sel_entry2, ipmi_cmd_delete_sel_entry2, ipmi_cmd_clear_sel2): New functions. * libfreeipmi/src/ipmi-sensor-cmds.c (ipmi_cmd_get_threshold_reading2, ipmi_cmd_get_discrete_reading2, ipmi_cmd_get_sensor_thresholds2): New functions. * libfreeipmi/src/ipmi-serial-cmds.c (ipmi_cmd_set_serial_connmode2, ipmi_cmd_set_serial_page_blackout_interval2, ipmi_cmd_set_serial_retry_time2, ipmi_cmd_set_serial_comm_bits2, ipmi_cmd_get_serial_connmode2, ipmi_cmd_get_serial_page_blackout2, ipmi_cmd_get_serial_retry_time2, ipmi_cmd_get_serial_comm_bits2): New functions. * libfreeipmi/src/ipmi-sol-cmds.c (ipmi_cmd_sol_conf_sol_enable_disable2, ipmi_cmd_sol_conf_sol_enable2, ipmi_cmd_sol_conf_sol_disable2, ipmi_cmd_sol_conf_get_sol_enable2): New functions. 2005-10-01 A Balamurugan * libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband): Improved. * libfreeipmi/src/ipmi-interface.h: Removed initial_outbound_seq_num and added challenge_string, tmpl_msg_trlr_ptr and obj_msg_trlr in ipmi_device_t. * libfreeipmi/src/ipmi-lan-interface.c (get_rq_checksum1, get_rs_checksum1, get_rq_checksum2, get_rs_checksum2, fill_lan_msg_hdr2, fill_lan_msg_trlr2, fill_hdr_session2, _ipmi_lan_pkt_rq_size2, _ipmi_lan_pkt_rs_size2, assemble_ipmi_lan_pkt2, unassemble_ipmi_lan_pkt2, ipmi_lan_validate_checksum): New functions. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd2): Improved. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_auth_caps2, ipmi_cmd_get_session_challenge2, ipmi_cmd_activate_session2, ipmi_cmd_set_session_priv_level2, ipmi_lan_open_session2, ipmi_lan_close_session2): Improved. 2005-09-27 Anand Babu * libfreeipmi/src/ipmi-msg-support-cmds.c: all ipmi_comp_test failures now sets errno properly. Thanks to James Laros for reporting this bug. 2005-09-26 Albert Chu * ipmipower/ipmipower.8.in: Added note about ipmipower's cluster focus because it keeps on coming up in conversations. 2005-09-11 A Balamurugan * doc/version.texi: Updated. * libfreeipmi/src/fiid.c (fiid_obj_dup): Fixed a bug in error condition. * libfreeipmi/src/ipmi-interface.h: Modifed ipmi_device_t structure. * libfreeipmi/src/ipmi-interface.c (ipmi_open): Removed. * libfreeipmi/src/ipmi-dev-global-cmds.c (ipmi_cmd_get_dev_id): Modified for change in ipmi_device_t structure. * libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband): like wise. * libfreeipmi/src/ipmi-interface.c (ipmi_open_inband): like wise. * libfreeipmi/src/ipmi-interface.c (ipmi_inband_close): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_get_status): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_wait_for_ibf_clear): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_wait_for_obf_set): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_read_byte): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_read_next): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_start_write): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_write_byte): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_end_write): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_get_abort): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd2): like wise. * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_auth_caps2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_session_challenge2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_activate_session2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_set_session_priv_level2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_open_session2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_close_session2): like wise. 2005-09-08 A Balamurugan * doc/examples/udm-test.c (parse_opt): Fixed a bug in argument parsing. 2005-09-07 A Balamurugan * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_channel_auth_caps2): Fixed a bug which not set LUN and FN. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_get_session_challenge2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_activate_session2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_cmd_set_session_priv_level2): like wise. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_close_session2): like wise. 2005-09-06 A Balamurugan * doc/examples/udm-test.c: Renamed ipmi-lan-test-udm.c file. * doc/examples/Makefile.am: Updated. * doc/examples/Makefile.example: Updated. * libfreeipmi/src/xmalloc.[c,h] (ipmi_xfree): Its a macro now. * libfreeipmi/src/ipmi-interface.c (ipmi_open_inband): net_fn and lun are set by ipmi_cmd_COMMAND functions. * libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband): like wise. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_io_init): Updated. * libfreeipmi/src/ipmi-dev-global-cmds.c (ipmi_cmd_get_dev_id): Rewritten. * libfreeipmi/src/fiid.c (fiid_obj_len_bytes): Fixed bug calling BITS_ROUND_BYTES macro. * libfreeipmi/src/fiid.c (fiid_obj_field_end_bytes): like wise. * libfreeipmi/src/fiid.c (fiid_obj_field_len_bytes): like wise. * libfreeipmi/src/fiid.c (fiid_obj_block_len_bytes): like wise. * libfreeipmi/src/fiid.c (fiid_obj_block_len): Now returns absolute value. * libfreeipmi/src/fiid.c (fiid_obj_alloc): Now returns fiid_obj_t type pointer. * libfreeipmi/src/fiid.c (fiid_obj_memset): like wise. * libfreeipmi/src/fiid.c (fiid_obj_dup): New function. * libfreeipmi/src/fiid.h (FIID_OBJ_ALLOCA): Checks error condition. 2005-08-31 A Balamurugan * libfreeipmi/src/xmalloc.c (ipmi_xmalloc): Returns zero initialized allocated buffer. * libfreeipmi/src/xmalloc.c (fixup_null_alloc): like wise. 2005-08-30 A Balamurugan * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd2): Fixed bug in error condition check. 2005-08-30 A Balamurugan * libfreeipmi/src/ipmi-semaphores.h (IPMI_MUTEX_LOCK): Continues only for non-zero semid. * libfreeipmi/src/ipmi-semaphores.h (IPMI_MUTEX_UNLOCK): like wise. 2005-08-30 A Balamurugan * libfreeipmi/src/ipmi-interface.c (ipmi_open_outofband): It doesn't call ipmi_open(). * libfreeipmi/src/ipmi-interface.c (ipmi_open_inband): Improved. * libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd2): Rewritten. 2005-08-29 A Balamurugan * libfreeipmi/src/ipmi-interface.c (ipmi_inband_close): Fixed portability bug. 2005-08-27 A Balamurugan * doc/version.texi: New file. * doc/examples/ipmi-lan-test-udm.c: New file. * libfreeipmi/src/ipmi-interface.[c,h]: New files. Implements unified driver model. * bmc-watchdog/src/bmc-watchdog.c (_get_port_and_reg_space): Uses ipmi_driver_type_t enum. * doc/freeipmi.texi: Removed profiling support for sensors node. * doc/examples/Makefile.am: Updated. * doc/examples/ipmi-lan-test.c: Updated. * fish/src/extension.c: Removed fi-kcs-get-poll-count procedure. * fish/src/ipmi-wrapper.c: Removed auth_code_len in ipmi_lan_open_session(). * fish/src/scm-procedures.[c,h]: Removed function ex_kcs_get_poll_count(). * libfreeipmi/src/Makefile.am: Updated. * libfreeipmi/src/acpi-spmi-locate.[c,h]: Uses ipmi_interface_type_t enum. * libfreeipmi/src/fiid.c (fiid_obj_free): Uses ipmi_xfree(). * libfreeipmi/src/fiid.h (FIID_OBJ_ALLOC): Updated - fiid_obj_alloc accepts tmpl directly now. * libfreeipmi/src/freeipmi.h: Updated. * libfreeipmi/src/ipmi-dev-global-cmds.[c,h]: Added new function ipmi_cmd_get_dev_id(). * libfreeipmi/src/ipmi-kcs-interface.[c,h]: Now ipmi_kcs_get_status(), ipmi_kcs_wait_for_ibf_clear(), ipmi_kcs_wait_for_obf_set(), ipmi_kcs_read_byte(), ipmi_kcs_read_next(), ipmi_kcs_start_write(), ipmi_kcs_write_byte(), ipmi_kcs_end_write(), ipmi_kcs_get_abort(), ipmi_kcs_test_if_state(), ipmi_kcs_clear_obf(), ipmi_kcs_read(), ipmi_kcs_write() and ipmi_kcs_write_interruptible() use ipmi_device_t. Updated ipmi_kcs_open(). Added ipmi_kcs_cmd2() and ipmi_kcs_cmd2(). Removed ipmi_kcs_get_poll_count(). * libfreeipmi/src/ipmi-lan-interface.[c,h]: Added New function ipmi_lan_cmd2(). * libfreeipmi/src/ipmi-locate.[c,h]: Uses ipmi_interface_type_t enum. * libfreeipmi/src/ipmi-msg-support-cmds.[c,h]: Added New functions ipmi_cmd_get_channel_auth_caps2(), ipmi_cmd_get_session_challenge2(), ipmi_cmd_activate_session2(), ipmi_cmd_set_session_priv_level2(), ipmi_lan_open_session2() and ipmi_lan_close_session2(). * libfreeipmi/src/pci-locate.[c,h]: Uses ipmi_interface_type_t enum. * libfreeipmi/src/smbios-locate.[c,h]: Added fiid template for smbios ipmi-device-info record. Uses ipmi_interface_type_t enum. 2005-06-17 Anand Babu * garpd/src/garpd.c: support for interval-delay and batch-delay. --send-once support. fixed broadcast order. delay variable is now global only. Thanks to Anand Avati again. * doc/freeipmi.texi: updated documentation. * garpd/garpd.8: like wise. 2005-06-09 Albert Chu * freeipmi.spec.in: Updated for garpd. 2005-06-08 Anand Babu * garpd: Integrated Anand Avati's Gratuitous ARP Daemon (garpd) project. Thanks Anand. * doc/freeipmi.texi: Added texinfo documentation for garpd. * libfreeipmi/src/ipmi-utils.c: added ipmi_get_random_seed function. * fish/ipmi-sel.8.in, fish/ipmi-sel.8.in, fish/fish.8.in, fish/bmc-info.8.in, fish/bmc-config.8.in: Man section update. 2005-05-09 Albert Chu * freeipmi.spec.in: Updated for recent changes to install. 2005-04-23 A Balamurugan * doc/examples/hello-sensors.c: file is removed. * doc/examples/Makefile.am: updated. * doc/examples/Makefile.example: updated. 2005-04-22 A Balamurugan * libfreeipmi/src/acpi-spmi-locate.c (ipmi_acpi_get_firmware_table): fixed unaligned access warnings. 2005-04-13 A Balamurugan * bmc-watchdog/src/bmc-watchdog.c (_get_port_and_reg_space): removed status variable * fish/src/fish.c (inner_main): like wise * libfreeipmi/src/acpi-spmi-locate.[ch] (acpi_spmi_get_dev_info): like wise * libfreeipmi/src/ipmi-locate.[ch] (ipmi_locate): like wise * libfreeipmi/src/pci-locate.[ch] (pci_get_dev_info): like wise * libfreeipmi/src/smbios-locate.[ch] (smbios_get_dev_info): like wise 2005-03-20 Anand Babu * fish/src/fish.c (inner_main): Check return value of ipmi_open_free_udp_port. 2005-03-18 Albert Chu Added support for vlan configuration in bmc-config. * libfreeipmi/src/ipmi-lan-param-spec.h: Add vlan lan conf definitions. * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c: Define new templates tmpl_set_lan_conf_param_vlan_id_rq, tmpl_set_lan_conf_param_vlan_priority_rq, tmpl_get_lan_conf_param_vlan_id_rs, and tmpl_get_lan_conf_param_vlan_priority_rs. * libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-cmds.c (fill_lan_set_vlan_id, ipmi_lan_set_vlan_id, fill_lan_set_vlan_priority, ipmi_lan_set_vlan_priority, ipmi_lan_get_vlan_id, ipmi_lan_get_vlan_priority): New functions. * fish/extensions/bc-lan-conf-section.scm (checkout-vlan-id-enable, commit-vlan-id-enable, checkout-vlan-id, commit-vlan-id, checkout-vlan-priority, commit-vlan-priority): New functions. Added additional entries to lan-conf-keys-validator. * fish/extensions/bmc-config.scm: Added new vlan entries to lan_conf_s. * fish/src/bmc-conf2.h, fish/src/bmc-conf2.c (set_bmc_lan_conf_vlan_id, set_bmc_lan_conf_vlan_priority, get_bmc_lan_conf_vlan_id, get_bmc_lan_conf_vlan_priority): New functions. * fish/src/extension.c (fi-set-bmc-lan-conf-vlan-id, fi-set-bmc-lan-conf-vlan-priority, fi-get-bmc-lan-conf-vlan-id, fi-get-bmc-lan-conf-vlan-priority): Define new procedures. * fish/src/scm-procedures.h, fish/src/scm-procedures.c (ex_set_bmc_lan_conf_vlan_id, ex_set_bmc_lan_conf_vlan_priority, ex_get_bmc_lan_conf_vlan_id, ex_get_bmc_lan_conf_vlan_priority): New functions. Misc * freeipmi.spec.in: Updated to reflect renaming of sel and sensors tools. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Add workaround for per-msg authentication issues found on some Dell motherboards. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Add workaround for sequence numbering bugs found in some mBMC modules. * ipmipower/src/ipmipower_checks.c (_check_outbound_seq_num): Add additional debug info. * ipmipower/src/ipmipower_powercmd.c (_retry_packets): Fix corner case in permission checks. * ipmipower/ipmipower.8.in: Add some more trouble-shooting tips. 2005-03-16 A Balamurugan * fish/extensions/sensors.scm: added ipmi-sensors-conf.scm * libfreeipmi/src/ipmi-sensor-api.c: added templates l_tmpl_get_sensor_threshold_reading_rs and l_tmpl_get_sensor_discrete_reading_rs in get_sensor_reading(). * libfreeipmi/src/ipmi-sensor-cmds.c: changed to bit level state in templates tmpl_get_sensor_threshold_reading_rs and tmpl_get_sensor_discrete_reading_rs. 2005-03-12 Anand Babu * fish/bmc-config.8.in: Now generated by automake. PACKAGE_VERSION, PACKAGE_BUGADDR and ISODATE are updated. Moved to man section 8 from 1. * fish/bmc-config.conf.5.in: Like wise. * fish/bmc-info.8.in: Like wise * fish/fish.8.in: Like wise. * fish/ipmi-sel.8.in: Like wise. Added ipmi prefix. * fish/ipmi-sensors.8.in. Like wise. Added ipmi prefix. * fish/extensions/ipmi-sensors-conf.scm. Added ipmi prefix. * doc/freeipmi.texi: Updated name change. 2005-03-11 Anand Babu * fish/extensions/bc-section.scm (checkout-section-values, diff-section-values): Closed [bugs #12279] error on checkout. bmc-config now throws more appropriate error message. 2005-03-01 Anand Babu * configure.ac: Added check for guile version. Minimum tested required version is 1.6.4. * bmc-watchdog/Makefile.am: Replaced "mkinstalldir" with "install-sh -d". "mkinstalldir" script is obsolete and non-portable. * fish/scripts/sel/ipmi-sel.in: Renamed "sel.in" to "ipmi-sel.in". * fish/scripts/sensors/ipmi-sensors.in: Renamed "sensors.in" to "ipmi-sensors.in". * Makefile.am: Updated for sel and sensors name change. * fish/scripts/sel/Makefile.am: Like wise. * fish/scripts/sensors/Makefile.am: Like wise. 2005-02-23 Anand Babu * CVS: New branch Release-0_1_3-branch with root tag Release-0_1_3. 2005-02-23 A Balamurugan * fish/extensions/sdr.scm: improved record fetching message * fish/extensions/sensors-simple-display.scm, fish/extensions/sensors-verbose-display.scm, fish/extensions/sensors-very-verbose-display.scm: now displays multiple event messages * fish/src/scm-procedures.c: removed short_event_message, status and event_message becomes event_message_list in ex_get_sensor_reading() * libfreeipmi/src/ipmi-sensor-api.c: now get_sensor_reading() returns multiple event messages. * libfreeipmi/src/ipmi-sensor-cmds.c: modified template tmpl_get_sensor_threshold_reading_rs. * libfreeipmi/src/ipmi-sensor-event-messages.[ch]: added new functions ipmi_get_generic_event_message_list() and ipmi_get_event_message_list(). * ipmi-sensor-utils.[ch]: removed function convert_sensor_state_to_offset(). 2005-02-23 Anand Babu Thanks tp Julian Elischer for reporting static compilation problem. * fish/src/fish.c: Replaced open_free_udp_port with libfreeipmi's ipmi_open_free_udp_port API. * src/guile-wrapper.c: Renamed gh_standard_handler to fish_exception_handler. (this caused static compilation problem) * fish/src/fi-utils.c: fi_load now uses fish exception handler. Removed open_free_udp_port function. (this caused static compilation problem). * fish/src/fi-commands.c : command_eval_scheme_str now uses fish exception handler. command_load_scheme_file now uses fi_load API. * doc/examples/ipmi-lan-test.c: Updated API change. 2005-02-18 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_get_port): Renamed to _get_port_and_reg_space. * bmc-watchdog/src/bmc-watchdog.c (_get_port_and_reg_space): Fixed logic errors due to changes in libfreeipmi. * bmc-watchdog/bmc-watchdog.8.in: Updated appropriately. 2005-02-13 Anand Babu * ipmi-ssif-interface.c (ipmi_ssif_exit): New function. 2005-02-13 Albert Chu * libfreeipmi/src/ipmi-sha1.c (_f, _K): Added error checking and modified else condition to remove potential compiler warnings. 2005-02-13 Anand Babu * ipmi-ssif-interface.[c,h]: Newly added. SSIF driver. * ROADMAP: dropped Tyan IPMI-1.5 proprietary SOL plan. IPMI-2.0 will soon become a standard as most vendors including Tyan are getting ready with IPMI-2.0 release. * /libfreeipmi/src/ipmi-locate.h: ipmi_locate_info structrue now includes i2c device name pointer. * /libfreeipmi/src/ipmi-hmac.c: Initialized h_info to NULL to avoid compiler warning. * THANKS: Added Amitoj Singh and Don Holmgren for their help with SSIF driver. 2005-02-07 A Balamurugan * ROADMAP: updated * TODO: updated * fish/extensions/bmc-config.scm: fixed a bug; calling non-existing primitive procedure * fish/src/bmc-conf2.c: renamed "Anonymous" to "NULL" for user1. * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-pef-cmds.c: fixed compiler warnings * libfreeipmi/src/ipmi-sensor-utils.[ch]: added new function convert_sensor_state_to_offset() * fish/extensions/sensors-very-verbose-display.scm, fish/src/scm-procedures.c, libfreeipmi/src/ipmi-sensor-api.[ch]: renamed is_signed to analog_data_format globally. fixed logical errors in sensor event message decoding. Thanks to Albert Chu for reporting these bugs. 2005-02-04 Albert Chu * freeipmi.spec.in: Add syslogging and tracing to debug rpm. * libfreeipmi/src/ipmi-sha1.h, libfreeipmi/src/ipmi-sha1.c, libfreeipmi/src/ipmi-hmac.h, libfreeipmi/src/ipmi-hmac.c: New files. * libfreeipmi/src/freeipmi.h, libfreeipmi/src/Makefile.am: Add new sha1 and hmac files appropriately. 2005-01-31 Albert Chu * ipmipower/ipmipower.8.in: Added information about auth authentication, which didn't seem to get checked in on 2004-11-15. 2005-01-26 Albert Chu Various code cleanup and minor fixes to ipmipower. * ipmipower/src/ipmipower.c (_poll_loop): Don't re-malloc on each iteration. * ipmipower/src/ipmipower.c (_secure_setup): Renamed to _security_initialization. * ipmipower/src/ipmipower.c (_cleanup): Add logging on cleaning. * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Remove check for non-null password when checking if remote machine supports null usernames. * ipmipower/src/ipmipower.h: Added new sockets_to_close list in struct ipmipower_powercmd. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_setup, ipmipower_powercmd_queue, ipmipower_powercmd_process_queue, _retry_packets, _send_packet, _destroy_ipmipower_powercmd): Move sockets_to_close from global list to per ipmipower_powercmd struct list. This change allows sockets to be closed earlier, so more file descriptors and ports are available more quickly to ipmipower. * ipmipower/src/ipmipower_check.c (_check_session_id): Fix corner case with output of debugging message. 2005-01-25 Albert Chu * ipmipower/ipmipower.8.in: Add note that a null username means the anonymous username. * ipmiping/src/ipmiping.c (parsepacket): Output anonymous, null, null-username info on verbose mode. * freeipmi.spec.in: Add support for building debug rpms. 2005-01-24 Anand Babu * libfreeipmi/src/ipmi-utils.c (ipmi_ioremap): open with O_SYNC. * libfreeipmi/src/smbios-locate.c: like wise in map_physmem. smbios_get_dev_info function now properly assigns SSIF smbus slave addr and address space id. 2005-01-24 Albert Chu * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Change priority ordering of auto authentication type selection. 2005-01-21 Albert Chu * ipmipower/src/ipmipower_check.c (_check_session_id): Added workaround for BMCs that return bad session ids. * ipmipower/src/ipmipower_config.c (ipmipower_config_check_values), ipmipower/src/ipmipower_prompt.c (_cmd_username, _cmd_authtype): Remove non-null username check with auth-type none. * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Remove NULL username requirement for auth-type none. * freeipmi.spec: Add bmc-config.5 manpage. 2005-01-18 A Balamurugan * fish/src/extension.c: removed bmc-conf-utils.h include. 2005-01-18 A Balamurugan * ROADMAP: updated * TODO: updated * doc/examples/hello-sensors.c: modified * fish/extensions/Makefile.am: updated * fish/extensions/bc-lan-conf-auth-section.scm: updated * fish/extensions/bc-lan-conf-misc-section.scm: updated * fish/extensions/bc-lan-conf-section.scm: updated * fish/extensions/bc-lan-serial-channel-section.scm: updated * fish/extensions/bc-misc-section.scm: updated * fish/extensions/bc-serial-conf-section.scm: updated * fish/extensions/bc-user-section.scm: updated * fish/extensions/bmc-config.scm: moved bc2.scm to bmc-config.scm * fish/extensions/sdr.scm: new file * fish/extensions/sensors-alias.scm: new file * fish/extensions/sensors-common.scm: new files * fish/extensions/sensors-conf.scm: rewritten * fish/extensions/sensors-simple-display.scm: new file * fish/extensions/sensors-utils.scm: file is removed * fish/extensions/sensors-verbose-display.scm: new file * fish/extensions/sensors-very-verbose-display.scm: new file * fish/extensions/sensors.scm: rewritten * fish/scripts/sensors/sensors.in: rewritten * fish/src/Makefile.am: updated * fish/src/bmc-conf-checkout.[ch]: files are removed * fish/src/bmc-conf-commit.[ch]: files are removed * fish/src/bmc-conf-key-utils.[ch]: files are removed * fish/src/bmc-conf-utils.[ch]: files are removed * fish/src/extension.c: removed old bmc-config and sensors procedures, and added new sensors procedures. * fish/src/fi-utils.[ch]: rewritten get_global_extensions_directory(), get_local_extensions_directory() and fi_load(). * fish/src/fish.c: rewritten running_for_first_time() * fish/src/fish.h: added FI_SDR_CACHE_DIR and FI_SDR_CACHE_FILENAME_PREFIX. * fish/src/ipmi-wrapper-sel.[ch]: files are removed * fish/src/ipmi-wrapper-sensor.[ch]: files are removed * fish/src/ipmi-wrapper.[ch]: added functions get_ipmi_host_ip_address() and get_sdr_cache_filename(). * fish/src/scm-procedures.[ch]: removed old bmc-config and sensors functions, and added new sensors functions. * libfreeipmi/src/Makefile.am: updated * libfreeipmi/src/freeipmi.h: updated * libfreeipmi/src/ipmi-sdr-record-types.[ch]: renamed tmpl_sdr_oem_sensor_record to tmpl_sdr_oem_record. added new template tmpl_sdr_sensor_record_header. * libfreeipmi/src/ipmi-sdr-repo-cache.[ch]: member cache_curr_rec_id of sdr_repo_cache_t renamed to cache_curr_rec_no. * libfreeipmi/src/ipmi-sdr-repo-cmds.[ch]: removed fiid template tmpl_sdr_sensor_record_header. * libfreeipmi/src/ipmi-sel-api.[ch]: new files * libfreeipmi/src/ipmi-sensor-api.[ch]: new files * libfreeipmi/src/ipmi-sensor-cmds.c: renamed fiid member status_reading_availablity to status_reading_availability. template tmpl_get_sensor_discrete_reading_rs is rewritten. * libfreeipmi/src/ipmi-sensor-event-messages.[ch]: added new functions get_01_generic_event_message(), get_02_generic_event_message(), get_03_generic_event_message(), get_04_generic_event_message(), get_05_generic_event_message(), get_06_generic_event_message(), get_07_generic_event_message(), get_08_generic_event_message(), get_09_generic_event_message(), get_0A_generic_event_message(), get_0B_generic_event_message(), get_0C_generic_event_message(), ipmi_get_generic_event_message() 2005-01-14 Anand Babu * libfreeipmi/src/acpi-spmi-locate.[c,h]: Newly added. ACPI-Tables user space device driver to locate IPMI SPMI table. Jointly developed by Bala and me. * libfreeipmi/src/smbios-locate.[c,h]: Moved from smbios.c,h. * libfreeipmi/src/pci-locate.[c,h]: Moved from pcilocate.c,h. * libfreeipmi/src/ipmi-locate.[c,h]: Moved from ipmi-probe.c,h. New interface type definitions. * libfreeipmi/src/ipmi-utils.c: New functions - ipmi_ioremap, ipmi_iounmap and ipmi_get_physical_mem_data. * bmc-watchdog/src/bmc-watchdog.c: Now uses ipmi_locate_t interface and the new model accepts reg-space in bytes directly. _REG_SPACE_VALID macro removed. * freeipmi/fish/src/fish.c: like wise. * libfreeipmi/src/ipmi-kcs-interface.c: Removed ipmi_kcs_reg_space function. ipmi_kcs_io_init now accepts reg_space in bytes instead of reg_space_boundary in bits. * libfreeipmi/src/ipmi-kcs-interface.h: Removed reg-space related definitions. Its now a job of ipmi-locate sub-system. 2005-01-09 Anand Babu * fish/src/fi-commands.c: replaced error(..) with perror,exit. error() is not really portable. * fish/src/fi-utils.c: likewise. * fish/src/fish.c: likewise. * fish/src/xmalloc.c: like wise. * fish/src/xmalloc.h: likewise. 2004-12-20 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_get_channel_number): New function. * libfreeipmi/src/ipmi-msg-support-cmds.c (_search_for_medium_channel_number): New function. * fish/src/ipmi-wrapper.h, fish/src/ipmi-wrapper.c (get_lan_channel_number, get_serial_channel_number): Use new ipmi_get_channel_number function. * bmc-watchdog/src/bmc-watchdog.c (_get_lan_channel_number): Removed function. * bmc-wathcdog/src/bmc-watchdog.c (_suspend_bmc_arps_cmd): Use new ipmi_get_channel_number function. * libfreeipmi/src/ipmi-dev-global-cmds.h, libfreeipmi/src/ipmi-dev-global-cmds.c (ipmi_kcs_get_dev_id): Remove pointless obj_hdr_rs parameter. * libfreeipmi/src/ipmi-dev-global-cmds.h, libfreeipmi/src/ipmi-dev-global-cmds.c (fill_cmd_get_dev_id, ipmi_kcs_get_dev_id): Clean up parameter types and parameter names to be consistent with much of the rest of libfreeipmi. * fish/src/scm-procedures.c (ex_kcs_get_dev_id_display): Fix for interface change. * libfreeipmi/src/ipmi-msg-support-cmds.h: Added IPMI_CHANNEL_NUMBER_VALID macro. * libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-serial-cmds.c: Added appropriate channel number checks in fill functions with channel_number parameters. Check for errors in many functions that call fill functions. 2004-12-17 Albert Chu Added additional autodetection due to privilege level errors. * ipmipower/src/ipmipower.h: Add privilege field to ipmipower_powercmd struct. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue): Initialize new privilege field. * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Add appropriate code logic for this new autodetection feature. * ipmipower/src/ipmipower.h (ipmipower_packet_create): Where appropriate, use privilege field of ipmipower_powercmd_t. Fix err_exit() corner case, where ending debug output is not output. * ipmipower/src/error.h, ipmipower/src/error.c (err_cbuf_dump_file_stream, err_cbuf_dump_file_descriptor): New functions. * ipmipower/src/error.c (err_exit): Dump cbuf contents appropriately if about to exit. * ipmipower/src/ipmipower.c (_setup), ipmipower/src/ipmipower_prompt.c (_cmd_log, _cmd_logfile, ipmipower_prompt_process_cmdline): Add appropriate calls to err_cbuf_dump_file_stream and err_cbuf_dump_file_descriptor. 2004-12-16 Albert Chu * libfreeipmi/src/ipmi-md2.c (ipmi_md2_finish), libfreeipmi/src/ipmi-md5.c (ipmi_md5_finish): Clear magic number, which will force caller to re-initialize context. * libfreeipmi/src/ipmi-md2.h, libfreeipmi/src/ipmi-md2.c, libfreeipmi/src/ipmi-md5.h, libfreeipmi/src/ipmi-md5.c: Fixed headers. These were originally a part of ipmipower first. Its a legal thing. 2004-12-15 Albert Chu * ipmipower/src/ipmipower.h (AUTH_TYPE_VALID_OR_AUTO): New macro. * ipmipower/src/ipmipower_auth.c (ipmipower_auth_string): Fix corner case. 2004-12-13 Albert Chu * libfreeipmi/src/fiid.h, libfreeipmi/src/fiid.c (fiid_obj_memset_field): New function. * libfreeipmi/src/fiid.c, libfreeipmi/src/fiid.c (fiid_obj_set_data): Add data_length parameter. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_kcs_set_user_name, fill_kcs_set_user_password ): Fixed additional corner cases affecting functionality of bmc-config on different systems. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_cmd_get_session_challenge): Fixed potential bugs due to style similarities to above fixes. * libfreeipmi/src/ipmi-sessions.c (fill_hdr_session): Fixed potential bugs due to style similarities to above fixes. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_cmd_activate_session): Fix for interface change. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_kcs_set_user_name, ipmi_kcs_set_user_password): Fix for interface changes. * libfreeipmi/src/ipmi-msg-support-cmds.h (ipmi_kcs_set_user_password): Fix interface for naming consistency. * libfreeipmi/src/fiid.c (fiid_obj_field_start_bytes): Fix error check bug. * libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_decode_value): Remove useless line that could break builds on debug conditions. 2004-12-11 Anand Babu * libfreeipmi/src/ipmi-msg-support-cmds.c: rqSeq'ing starts even before session establishment. So ipmi_lan_get_channel_auth_caps, ipmi_lan_get_session_challenge, ipmi_lan_activate_session and ipmi_lan_open_session all takes rq_seq argument. * libfreeipmi/src/ipmi-lan-interface.h: new IPMI_LAN_RQ_SEQ_INC macro. * fish/src/ipmi-wrapper.c: rq_seq argument. * doc/examples/ipmi-lan-test.c: new lan bmc-info command example. * doc/examples/Makefile.example: facelift. * libfreeipmi/src/ipmi-utils.c: new utility procedure open_free_udp_port (). 2004-12-09 Albert Chu * fish/extensions/bc-lan-conf-misc-section.scm: List 500 ms interval length for gratuitous arp interval. * fish/bmc-config.conf.5: New file. * fish/Makefile.am: added new manpage. * fish/src/ipmi-wrapper-sensor.c (display_verbose_current-generic_discrete_sensor_full_record, display_verbose_current_discrete_sensor_full_record): Filled in code for functions. 2004-12-08 Albert Chu * fish/src/ipmi-wrapper-sensor.c (display_current_discrete_sensor_full_record): Don't output thresholds for this non-threshold sensor. 2004-12-07 Albert Chu * libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface.c: Globally rename IPMI_KCS_REG_SPACE_32BIT_BOUND to IPMI_KCS_REG_SPACE_4BYTE_BOUND for consistency. * libfreeipmi/src/ipmi-msg-support-cmds.h: Add forgotten tmpl_get_channel_access_rq definition. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_kcs_set_user_name): Don't segfault on NULL username. * libfreeipmi/src/ipmi-msg-support-cmds.c (fill_kcs_set_user_password): Don't segfault on NULL password. * libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_decode_value): Change is_signed parameter to analog_data_format and calculate sensor reading based on analog data format rather than binary signed or unsigned parameter. * libfreeipmi/src/ipmi-sensor-utils.c (ipmi_sensor_get_decode_params): Change is_signed parameter to analog_data_format and read analog_data_format by fiid_obj_get. * fish/src/ipmi-wrapper-sensor.c: Globally rename "is_signed" to "analog_data_format". * bmc-watchdog/src/bmc-watchdog.c (_get_port, _usage, _cmdline_parse): Support --reg-space option. * bmc-watchdog/bmc-watchdog.8.in: Update with new register spacing option. 2004-12-06 Albert Chu * fish/extensions/bc2.scm: Turn on "Enable_User" option. * fish/extensions/bc-user-section.scm (checkout-enable-user): Return empty string instead of false. * fish/extensions/bc-user-section.scm (diff-enable-user): New function. 2004-12-04 Anand Babu * CVS: tagged before commit checkpoint-pre-kcs-api-change. * configure.ac: Next version number would be 0.2.0. But lot more work to be done before that. * libfreeipmi/src/ipmi-kcs-interface.c: kcs init function accepts reg_space argument. All functions uses the sms_io_base KCS port address set through kcs init function. This has resulted in API changes across the freeipmi source. List of modified files are bmc-watchdog/src/bmc-watchdog.c fish/src/bmc-conf-checkout.c fish/src/bmc-conf-commit.c fish/src/bmc-conf-utils.c fish/src/bmc-conf2.c fish/src/fish.c fish/src/ipmi-wrapper-sel.c fish/src/ipmi-wrapper-sensor.c fish/src/ipmi-wrapper.c fish/src/scm-procedures.c libfreeipmi/src/ipmi-chassis-cmds.c libfreeipmi/src/ipmi-chassis-cmds.h libfreeipmi/src/ipmi-dev-global-cmds.c libfreeipmi/src/ipmi-dev-global-cmds.h libfreeipmi/src/ipmi-lan-cmds.c libfreeipmi/src/ipmi-lan-cmds.h libfreeipmi/src/ipmi-pef-cmds.c libfreeipmi/src/ipmi-sdr-repo-cache.c libfreeipmi/src/ipmi-sdr-repo-cache.h libfreeipmi/src/ipmi-sdr-repo-cmds.c libfreeipmi/src/ipmi-sdr-repo-cmds.h libfreeipmi/src/ipmi-sel-cmds.c libfreeipmi/src/ipmi-sel-cmds.h libfreeipmi/src/ipmi-sel-record-types.c libfreeipmi/src/ipmi-sel-record-types.h libfreeipmi/src/ipmi-sensor-cmds.c libfreeipmi/src/ipmi-sensor-cmds.h libfreeipmi/src/ipmi-serial-cmds.c libfreeipmi/src/ipmi-serial-cmds.h libfreeipmi/src/ipmi-sol-cmds.c. * libfreeipmi/src/ipmi-msg-support-cmds.c: Now uses fiid_obj_get/set and some code cleanup. * bmc-watchdog/src/bmc-watchdog.c: Supports reg_spacing. * fish/src/fish.c: Supports reg_spacing. * libfreeipmi/src/ipmi-probe.h: Added reg_space to probe info structre. * libfreeipmi/src/smbios.c: enabled reg_space extraction. 2004-12-02 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_cmdline_parse): Fix error message for invalid timer use, stop timer, or log values. * bmc-watchdog/src/bmc-watchdog.c (_timer_user_str): Return 'Reserved' instead of error message when value does not match a known value. * fish/src/ipmi-wrapper-sensor.c (display_current_threshold_sensor_full_record): Don't output lower/upper critical threshold by default, output depending on its readability. * freeipmi.spec.in: Fixed info file corner case discovered by John Goebel . 2004-12-01 A Balamurugan * libfreeipmi/src/ipmi-sensor-event-messages.[ch]: new files. * fish/extensions/sel.scm: updated. * fish/src/extension.c: removed fi-sel-display-first-entry and fi-sel-display-next-entry. * fish/src/ipmi-wrapper-sel.[ch]: rewritten. * fish/src/scm-procedures.c: updated ex_sel_get_first_entry() and ex_sel_get_next_entry(). * libfreeipmi/src/Makefile.am: updated. * libfreeipmi/src/freeipmi.h: updated. * libfreeipmi/src/ipmi-sel-record-types.c: rewritten all fiid templates. 2004-11-28 A Balamurugan * fish/src/ipmi-wrapper.c (get_lan_channel_number): now using probed channel. * fish/src/ipmi-wrapper.c (get_serial_channel_number): now using probed channel. * fish/src/ipmi-wrapper.c (display_channel_info): new function. * fish/src/ipmi-wrapper.c (display_get_dev_id): now prints channel info. * fish/src/scm-procedures.c (ex_kcs_get_dev_id_display): fixed memory leak. * libfreeipmi/src/ipmi-sdr-record-types.c: added new template tmpl_sdr_event_only_sensor_record. 2004-11-28 Anand Babu * fish/src/ipmi-wrapper.c (display_get_dev_id): bmc-info should now decode auxillary-firmware-revision for all Intel products. * ROADMAP: added new file. 2004-11-24 Albert Chu * ipmipower/ipmipower.8.in: Add information about gethostbyname() bottleneck. 2004-11-22 Albert Chu * libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-kcs-interface.c (ipmi_kcs_cmd_raw, ipmi_kcs_cmd_raw_interruptible): New functions. * ipmipower/src/ipmipower_connection.c (_connection_setup): Remove incorrect comment statement. * bmc-watchdog/src/bmc-watchdog.c (_set_cmd, _daemon_setup): Don't compare value of pre_timeout_interrupt value against initial countdown if pre-timeout interrupt is none. * ipmipower/ipmipower.8.in: Fix a minor wording mistake. 2004-11-16 Albert Chu * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Fix logic error in "auto" authentication calculation. 2004-11-15 Albert Chu Added auto authentication type to ipmipower to automatically choose the most secure authentication among those available from the remote machine. * ipmipower/src/ipmipower.h: Added AUTH_TYPE_AUTO to auth_type_t. Added authtype field to ipmipower_powercmd structure. * ipmipower/src/ipmipower_auth.c (ipmipower_auth_index, ipmipower_auth_string, ipmipower_auth_list): Added "auto" authtype support. * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Calculate best authentication available under "auto" authtype. Store authentication type code in authtype field of ipmipower_powercmd struct. * ipmipower/src/ipmipower_powercmd.c (_recv_packet), ipmipower/src/ipmipower_packet.c (ipmipower_packet_create): Use authtype field of ipmipower_powercmd_t pointer rather than calling ipmipower_ipmi_auth_type. * ipmipower/src/ipmipower_config.c (ipmipower_config_setup): Make "auto" the default. * ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in: Added "auto" as available authentication type. 2004-11-15 Albert Chu * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_get_channel_auth_caps, ipmi_lan_get_session_challenge, ipmi_lan_activate_session, ipmi_lan_set_session_priv_level, ipmi_lan_close_session): Remove check for completion code after call to ipmi_lan_cmd(). Check should be done by caller and handled as it feels necessary. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_open_session): Check for completion code errors. * configure.ac: Added --enable-syslog option. * libfreeipmi/src/ipmi-utils.c (ipmi_comp_test): Remove syslogging as default behavior. * libfreeipmi/src/ipmi-error.h (__IPMI_TRACE, __IPMI_SYSLOG): New macros. * libfreeipmi/src/ipmi-error.h (ERR, ERR_EXIT): Cleaned up macros. Disable syslogging as default behavior. * fish/src/ipmi-wrapper.c (lan_close_session): Check completion code. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_output.c, ipmipower/ipmipower.8.in, ipmipower/ipmipower.conf.5.in, ipmipower/src/ipmipower.c: Changed "hostlist" output type to "hostrange" type. Globally reworded documentation and variable names around this change. * ipmipower/ipmipower.8.in: Added IPMI over LAN and TROUBLESHOOTING sections. Cleaned up various wording. * ipmipower/ipmipower.conf.5.in, bmc-watchdog/bmc-watchdog.8.in, ipmiping/ipmiping.8.in, rmcpping/rmcpping.8.in: Cleaned up some wording and updated ORIGIN to be consistent to other LLNL projects. * README: This isn't the fish project, its the FreeIPMI project :-) 2004-11-09 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd): Make ipmi_lan_cmd() consistent to style of ipmi_kcs_cmd() by requiring caller to check completion code. * libfreeipmi/src/ipmi-msg-support-cmds.c (ipmi_lan_get_channel_auth_caps, ipmi_lan_get_session_challenge, ipmi_lan_activate_session, ipmi_lan_set_session_priv_level, ipmi_lan_close_session): Add check for completion code after call to ipmi_lan_cmd(). 2004-11-04 Ian Zimmerman * libfreeipmi/src/ipmi-pef-cmds.c: Yet more PEF routines. 2004-11-03 Ian Zimmerman * libfreeipmi/src/ipmi-pef-cmds.c: Lots of new PEF routines added. 2004-11-02 Ian Zimmerman * configure.ac: fail configure if fish is being built but readline is not found. If fish is not being built, don't check for readline or guile at all. 2004-11-02 Albert Chu * freeipmi.spec.in: Various fixes for potential build issues. Added THANKS file. 2004-10-29 Ian Zimmerman * libfreeipmi/src/ipmi-pef-cmds.c: More PEF commands added. (ipmi_kcs_get_pef_alert_string): And more of the same. 2004-10-28 Albert Chu * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_cmd): Fixed initialization bug found by Andrew Cress . 2004-10-28 Anand Babu * bmc-watchdog/src/bmc-watchdog.c fish/src/fi-commands.c fish/src/fi-utils.c fish/src/fi-utils.h fish/src/fish.c fish/src/ipmi-wrapper-sensor.c fish/src/ipmi-wrapper.c fish/src/scm-procedures.c fish/src/xmalloc.h ipmipower/src/ipmipower_output.c ipmipower/src/wrappers.c ipmipower/src/wrappers.h libfreeipmi/src/freeipmi.h libfreeipmi/src/ipmi-kcs-interface.c libfreeipmi/src/ipmi-lan-interface.c libfreeipmi/src/ipmi-msg-support-cmds.c libfreeipmi/src/ipmi-sdr-repo-cache.c libfreeipmi/src/ipmi-semaphores.h libfreeipmi/src/ipmi-smic-interface.c libfreeipmi/src/ipmi-utils.c libfreeipmi/src/ipmi-watchdog.c libfreeipmi/src/libfreeipmi.c libfreeipmi/src/rmcp.c: Applied patch for FreeBSD port by Dmitry Frolov . Tested on FreeBSD 5.3-BETA7. * doc/freeipmi.texi: Updated doc on installation under FreeBSD. * THANKS: Added Dimitry Frolov and other contributors. * AUTHORS: Added package maintainers section. 2004-10-27 Ian Zimmerman * libfreeipmi/src/ipmi-pef-cmds.c: more PEF commands. 2004-10-26 Ian Zimmerman * libfreeipmi/src/ipmi-pef-param-spec.h: New file. * libfreeipmi/src/Makefile.am, libfreeipmi/src/freeipmi.h, libfreeipmi/src/ipmi-pef-cmds.h, libfreeipmi/src/ipmi-pef-cmds.c: added first batch of low level PEF functions. 2004-10-25 Albert Chu * freeipmi.spec.in: Additional file packaging changes based on recent changes to doc installation. * bmc-watchdog/bmc-watchdog.8.in: Modified for changes made by Ian to _get_port(). 2004-10-25 Ian Zimmerman * bmc-watchdog/src/bmc-watchdog.c (_get_port): probe for KCS IO port, don't use hardcoded default. 2004-10-25 A Balamurugan * fish/src/ipmi-wrapper-sensor.c: now sensors normal output shows upper/lower critical threshold instead of normal min/max. * libfreeipmi/src/ipmi-sdr-record-types.[ch]: added new template tmpl_generic_device_locator_sensor_record. 2004-10-25 Ian Zimmerman * configure.ac, Makefile.am: make it possible to disable fish building. 2004-10-24 Ian Zimmerman * configure.ac: bump version number to 0.1.3. * ipmipower/Makefile.am, bmc-watchdog/Makefile.am, ipmiping/Makefile.am, rmcpping/Makefile.am: don't put configured manpages into distribution. 2004-10-19 Ian Zimmerman * NEWS: insert a meaningless blurb to shut up lintian. 2004-10-16 Anand Babu * libfreeipmi/src/fiid.h: fiid_template_t and fiid_tmpl_t are now constants. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_cmd_template): modified return type accordingly. * libfreeipmi/src/ipmi-debug.c (fiid_obj_dump_perror): fixed typecast warnings. * doc/freeipmi.texi: Added "Auth_Type_None conflict" section to bmc-config known issues. 2004-10-14 Ian Zimmerman * configure.ac, bmc-watchdog/Makefile.am, fish/Makefile.am, ipmiping/Makefile.am, ipmipower/Makefile.am, rmcpping/Makefile.am, doc/Makefile.am: reflect the fact that manpage templates have moved from the doc directory to be next to the binaries they describe. * configure.ac, fish/src/Makefile.am: Do not link everything with ncurses and readline, just fish. 2004-10-14 Anand Babu * freeipmi/libfreeipmi/src/ipmi-semaphores.h: Portability fixes - careful macro checks for union semun. * freeipmi/libfreeipmi/src/xmalloc.h: Removed error.h and error prototype. 2004-10-14 Albert Chu * configure.ac: Remove --enable-rpm-install option. * freeipmi.spec.in: Remove use of --enable-rpm-install. Added and removed package documents appropriately based on recent document changes. Make install using DESTDIR. * bmc-watchdog/bmc-watchdog.log: Removed file. * bmc-watchdog/Makefile.am: Use init.d rather than rc.d/init.d for portability. Remove install of bmc-watchdog.log, just make /var/log/freeipmi directory. * bmc-watchdog/Makefile.am, libfreeipmi/Makefile.am: Remove use of RPM_INSTALL flag. 2004-10-13 Ian Zimmerman * doc/examples/Makefile.am (Examplesdir): use $(docdir)/examples for installation. * doc/Makefile.am: export docdir variable. 2004-10-11 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_pre_interrupt_timeout_str): Renamed to _pre_timeout_interrupt_str to match code style in rest of program. Output of NMI modified to more closely match IPMI specification. * bmc-watchdog/src/bmc-watchdog.c (_get_cmd): Updated call to _pre_timeout_interrupt_str appropriately. 2004-10-11 Anand Babu * CVS tagged as release-0_1_0-tag. 2004-10-08 A Balamurugan * bmc-watchdog/src/bmc-watchdog.c: fixed compiler warnings 2004-10-08 Anand Babu * authors.texi, fdl.texi, freeipmi.texi, gpl.texi, permissions.texi, version.texi.in: newly added - GNU FreeIPMI User's Guide. * authors.texinfo, fish.texinfo, freeipmi-hg.texinfo, gpl.texinfo: removed. * ipmi-over-ts2000.texi ipmi-network-layout.fig ipmi-network-layout.xcf freeipmi-hackers-intro.sxi: additional documentation added with (cvs add -kb) binary sticky flag. * fish/src/ipmi-wrapper-sensor.c: commented unused variables. * ipmipower/src/wrappers.c (_checkfill): fixed unused-warning. * ipmipower/src/ipmipower_check.c (_check_command): initialized "expected_cmd" to -1. * ipmipower/src/conffile.c (conffile_parse): initialized "len" to -1. * doc/Makefile.am: new entries to handle additional documentation and PDF creation. * TODO: cleanup and reformating. * configure.ac: now becomes 0.1.0. 2004-10-08 A Balamurugan * bmc-watchdog/src/bmc-watchdog.c: Fixed compatibility issues with GCC 2.96 * libfreeipmi/src/ipmi-ping.c: like wise 2004-10-07 Albert Chu * doc/bmc-watchdog.8.in: Fixed typo, 0x0CA2 to 0xCA2. 2004-10-04 Albert Chu Removed --permsgauth_hosts command line option in ipmipower. * doc/ipmipower.8.in, doc/ipmipower.conf.5.in: Removed all references to permsgauth_hosts command line, interactive command, and configuration file options. Slight re-word of information in KNOWN ISSUES. * ipmipower/src/ipmipower.h: Removed MSG_TYPE_PERMSGAUTH_REQUIRED and MSG_TYPE_PERMSGAUTH_DISABLED definitions. Removed permsgauth_hosts, permsgauth_hosts_count, and permsgauth_hosts_set in ipmipower_config. Added permsgauth_enabled to ipmipower_powercmd. * ipmipower/src/ipmipower_config.c (ipmipower_config_setup, ipmipower_config_cmdline_parse, ipmipower_config_conffile_parse, ipmipower_config_check_values): Removed all configuration regarding permsgauth_hosts command line and configuration file options. * ipmipower/src/ipmipower_output.c: Removed permsgauth output messages. * ipmipower/src/ipmipower_packet.c (ipmipower_packet_create): Base authentication on permsgauth_enabled flag. * ipmipower/src/ipmipower_powercmd.c (ipmipower_powercmd_queue): Initialize permsgauth_enabled. * ipmipower/src/ipmipower_powercmd.c (_recv_packet): Base authentication on permsgauth_enabled flag. * ipmipower/src/ipmipower_powercmd.c (_process_ipmi_packets): Set permsgauth_enabled flag based on result of Get Authentication Capabilities response. * ipmipower/src/ipmipower_prompt.c (_cmd_permsgauth_hosts): Removed function. * ipmipower/src/ipmipower_prompt.c (_cmd_advanced, _cmd_config, ipmipower_prompt_process_cmdline): Removed all reference to permsgauth_hosts interactive command. 2004-09-29 A Balamurugan * libfreeipmi/src/ipmi-sensor-cmds.c: added optional ignore byte in template tmpl_get_sensor_threshold_reading_rs. 2004-09-27 Albert Chu * freeipmi.spec.in: Fixed up administration issues with the post install script. 2004-09-22 A Balamurugan * fish/extensions/bc-section.scm: bug #10446, skip unsupported fields, is fixed. 2004-09-17 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_get_port), doc/bmc-watchdog.8.in: Make default port 0xCA2 based on IPMI spec. * bmc-watchdog/src/bmc-watchdog.c (_get_port): Fix bug with --io-port option. * doc/bmc-watchdog.8.in: Added examples. * bmc-watchdog/bmc-watchdog: Modified default rc script to reset a machine instead of generate an INIT. This is the more common use of the bmc-watchdog. * doc/ipmipower.8.in: Fixed up examples. 2004-09-15 Albert Chu * ipmipower/src/ipmipower_output.c: Fixed output message. 2004-09-14 Albert Chu * doc/bmc-watchdog.8.in, doc/ipmipower.8.in, doc/ipmipower.conf.5.in: Fixed wording and a few typos. 2004-09-09 A Balamurugan * fish/extensions/bc-common.scm: now bmc-config --diff checks user password. * fish/extensions/bc-lan-conf-auth-section.scm: like wise * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-lan-conf-section.scm: like wise * fish/extensions/bc-lan-serial-channel-section.scm: like wise * fish/extensions/bc-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise * fish/extensions/bc-user-section.scm: like wise * fish/src/bmc-conf2.[ch]: added new function check_bmc_user_password(). * fish/src/extension.c: added new primitive procedure fi-check-bmc-user-password. * fish/src/scm-procedures.c: added new function ex_check_bmc_user_password(). 2004-09-07 A Balamurugan * fish/extensions/utils.scm: renamed (simple->string) to (any->string) * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise * fish/extensions/bc-user-section.scm: like wise 2004-09-02 A Balamurugan * fish/extensions/bc-lan-conf-auth-section.scm: added code to support empty values. * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-lan-conf-section.scm: like wise * fish/extensions/bc-lan-serial-channel-section.scm: like wise * fish/extensions/bc-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise * fish/extensions/bc-user-section.scm: like wise * fish/extensions/utils.scm: (simple->string) primitive procedure supports list. * fish/src/scm-procedures.c: fixed bug toggling user input in ex_set_bmc_lan_channel_volatile_access(), ex_set_bmc_lan_channel_non_volatile_access(), ex_set_bmc_serial_channel_volatile_access() and ex_set_bmc_serial_channel_non_volatile_access() 2004-08-24 Albert Chu * libfreeipmi/src/ipmi-sensor-cmds.c (ipmi_kcs_get_sensor_thresholds): Fix typo. 2004-08-23 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_bmclog): Fix typo. 2004-08-20 A Balamurugan * fish/extensions/bc-common.scm: added new primitive procedure (get-doc-string) * fish/extensions/bc-lan-conf-auth-section.scm: added doc string * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-lan-conf-section.scm: like wise * fish/extensions/bc-lan-serial-channel-section.scm: like wise * fish/extensions/bc-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise * fish/extensions/bc-user-section.scm: like wise 2004-08-20 Anand Babu * CVS tagged as release-0_1_0_alpha6-tag 2004-08-20 A Balamurugan * doc/sel.1: added examples 2004-08-20 Anand Babu * fish/extensions/sel.scm (sel-main): fixed bug in parsing hex dump optional argument. Argument to value should not be quoted. 2004-08-20 Ian Zimmerman * doc/sel.1: document new options -x, --hex-dump and -i, --info. * fish/extensions/sel.scm (sel-hex-dump): Use sel-display-info. (sel-display-info): New function. (sel-display-flags): New function. * fish/src/extension.c (install_new_procedures): New function ex_sel_get_info_binary. * fish/src/scm-procedures.h (ex_sel_get_info_binary): New function. * fish/src/scm-procedures.c (ex_sel_get_info_binary): New function. * fish/src/ipmi-wrapper-sel.h (struct sel_info): Make all fields unsigned long for easier conversion to Scheme. 2004-08-20 A Balamurugan * doc/bmc-config.1: man page updated. * fish/extensions/bc-common.scm: added new primitive procedure (make-section) * fish/extensions/bc-section.scm: added new primitive procedure (diff-section-values) and (diff-section) * fish/extensions/bc2.scm: updated. added support for --key-pair and --diff 2004-08-19 Ian Zimmerman * fish/extensions/sel.scm (sel-main): add --info option. 2004-08-19 A Balamurugan * fish/src/ipmi-wrapper-sensor.c: modified display_current_threshold_sensor_full_record() and display_verbose_current_threshold_sensor_full_record(). 2004-08-18 Ian Zimmerman * libfreeipmi/src/pcilocate.c (pci_get_dev_info): Fix a typo causing warning in the stubbed out branch. * fish/extensions/sel.scm (sel-main): Add call to fi-sel-get-info. * fish/src/extension.c (install_new_procedures): Register fi-sel-get-info. * fish/src/scm-procedures.h (ex_sel_get_info): Declare new function. * fish/src/scm-procedures.c (ex_sel_get_info): Add function. * fish/src/ipmi-wrapper-sel.c (get_sel_info): Add function. * fish/src/ipmi-wrapper-sel.h (struct sel_info): Add this structure and enum for the flags field. (get_sel_info): declare new function. 2004-08-18 A Balamurugan * TODO: added new todo's. * fish/src/ipmi-wrapper-sensor.c: now sensor status are relavent to threshold state. * libfreeipmi/src/ipmi-sensor-cmds.c: added ipmi_kcs_get_sensor_thresholds(). * libfreeipmi/src/ipmi-sensor-types.c: updated ipmi_sensor_threshold_health_check(). 2004-08-17 Ian Zimmerman * fish/extensions/sel.scm (sel-display-help): add --hex-dump option to usage messages. (sel-main): actually implement --hex-dump * fish/src/extension.c (install_new_procedures): install ex_sel_*_{raw,hex}. * fish/src/scm-procedures.h: declare ex_sel_*_hex. * fish/src/scm-procedures.c (ex_sel_get_first_entry_hex): new function. (ex_sel_get_next_entry_hex): new function. 2004-08-16 Ian Zimmerman * fish/src/scm-procedures.c (ex_sel_get_next_entry_raw): Fix index out of bounds. * fish/src/scm-procedures.h: add prototypes for ex_sel_get_next_entry_raw and ex_sel_get_first_entry_raw. * fish/src/scm-procedures.c (ex_sel_get_next_entry_raw): new function. (ex_sel_get_first_entry_raw): new function. 2004-08-10 Ian Zimmerman * fish/src/scm-procedures.c (ex_sel_display_first_entry): use SEL_RECORD_SIZE constant instead of hardcoding. (hex_dump_record_data): new function. * fish/src/ipmi-wrapper-sel.h: #define SEL_RECORD_SIZE * TODO: Add gh -> scm conversion task. 2004-08-16 A Balamurugan * fish/extensions/bc-common.scm: code cleanups * fish/extensions/bc-section.scm: like wise * fish/scripts/bmc-config/bmc-config.in: now uses new bmc-config 2004-08-05 Ian Zimmerman * configure.ac: Bump version for snapshot release. 2004-07-28 A Balamurugan * fish/extensions/bc-common.scm: added new procedure (file-exists?) * fish/extensions/bc-section.scm: code cleanup and updated procedures * fish/extensions/bc2.scm: like wise 2004-07-26 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_bmclog, _init_bmc_watchdog): Fixed --no-logging option. 2004-07-17 A Balamurugan * fish/extensions/bc-common.scm: added primitives for checkout support * fish/extensions/bc-lan-conf-auth-section.scm: like wise * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-lan-conf-section.scm: like wise * fish/extensions/bc-lan-serial-channel-section.scm: like wise * fish/extensions/bc-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise * fish/extensions/bc-user-section.scm: like wise * fish/src/bmc-conf2.[ch]: added new functions get_bmc_user_access(), get_bmc_channel_access(), get_bmc_chassis_status(), get_bmc_username(), get_bmc_user_lan_channel_access(), get_bmc_user_serial_channel_access(), get_bmc_lan_channel_volatile_access(), get_bmc_lan_channel_non_volatile_access(), get_bmc_lan_conf_ip_addr_source(), get_bmc_lan_conf_ip_addr(), get_bmc_lan_conf_mac_addr(), get_bmc_lan_conf_subnet_mask(), get_bmc_lan_conf_default_gw_ip_addr(), get_bmc_lan_conf_default_gw_mac_addr(), get_bmc_lan_conf_backup_gw_ip_addr(), get_bmc_lan_conf_backup_gw_mac_addr(), get_bmc_lan_conf_auth_type_enables(), get_bmc_lan_conf_arp_control(), get_bmc_lan_conf_gratuitous_arp(), get_bmc_serial_channel_volatile_access(), get_bmc_serial_channel_non_volatile_access(), get_bmc_serial_conf_conn_mode(), get_bmc_serial_conf_page_blackout_interval(), get_bmc_serial_conf_call_retry_time(), get_bmc_serial_conf_ipmi_msg_comm_settings() and get_bmc_power_restore_policy() * fish/src/extension.c: added new primitives fi-get-bmc-username, fi-get-bmc-user-lan-channel-access, fi-get-bmc-user-serial-channel-access, fi-get-bmc-lan-channel-volatile-access, fi-get-bmc-lan-channel-non-volatile-access, fi-get-bmc-lan-conf-ip-address-source, fi-get-bmc-lan-conf-ip-address, fi-get-bmc-lan-conf-mac-address, fi-get-bmc-lan-conf-subnet-mask, fi-get-bmc-lan-conf-default-gateway-ip-address, fi-get-bmc-lan-conf-default-gateway-mac-address, fi-get-bmc-lan-conf-backup-gateway-ip-address, fi-get-bmc-lan-conf-backup-gateway-mac-address, fi-get-bmc-lan-conf-auth-type-callback-enables, fi-get-bmc-lan-conf-auth-type-user-enables, fi-get-bmc-lan-conf-auth-type-operator-enables, fi-get-bmc-lan-conf-auth-type-admin-enables, fi-get-bmc-lan-conf-auth-type-oem-enables, fi-get-bmc-lan-conf-arp-control, fi-get-bmc-lan-conf-gratuitous-arp, fi-get-bmc-serial-channel-volatile-access, fi-get-bmc-serial-channel-non-volatile-access, fi-get-bmc-serial-conf-conn-mode, fi-get-bmc-serial-conf-page-blackout-interval, fi-get-bmc-serial-conf-call-retry-time, fi-get-bmc-serial-conf-ipmi-msg-comm-settings and fi-get-bmc-power-restore-policy. * fish/src/scm-procedures.[ch]: added new functions ex_get_bmc_username(), ex_get_bmc_user_lan_channel_access(), ex_get_bmc_user_serial_channel_access(), ex_get_bmc_lan_channel_volatile_access(), ex_get_bmc_lan_channel_non_volatile_access(), ex_get_bmc_lan_conf_ip_addr_source(), ex_get_bmc_lan_conf_ip_addr(), ex_get_bmc_lan_conf_mac_addr(), ex_get_bmc_lan_conf_subnet_mask(), ex_get_bmc_lan_conf_default_gw_ip_addr(), ex_get_bmc_lan_conf_default_gw_mac_addr(), ex_get_bmc_lan_conf_backup_gw_ip_addr(), ex_get_bmc_lan_conf_backup_gw_mac_addr(), ex_get_bmc_lan_conf_auth_type_callback_enables(), ex_get_bmc_lan_conf_auth_type_user_enables(), ex_get_bmc_lan_conf_auth_type_operator_enables(), ex_get_bmc_lan_conf_auth_type_admin_enables(), ex_get_bmc_lan_conf_auth_type_oem_enables(), ex_get_bmc_lan_conf_arp_control(), ex_get_bmc_lan_conf_gratuitous_arp(), ex_get_bmc_serial_channel_volatile_access(), ex_get_bmc_serial_channel_non_volatile_access(), ex_get_bmc_serial_conf_conn_mode(), ex_get_bmc_serial_conf_page_blackout_interval(), ex_get_bmc_serial_conf_call_retry_time(), ex_get_bmc_serial_conf_ipmi_msg_comm_settings() and ex_get_bmc_power_restore_policy() 2004-07-13 A Balamurugan * fish/extensions/bc-common.scm: code cleanup * fish/extensions/bc-lan-conf-auth-section.scm: like wise * fish/extensions/bc-lan-conf-misc-section.scm: like wise * fish/extensions/bc-lan-conf-section.scm: like wise * fish/extensions/bc-lan-serial-channel-section.scm: like wise * fish/extensions/bc-misc-section.scm: like wise * fish/extensions/bc-section.scm: like wise * fish/extensions/bc-serial-conf-section.scm: like wise 2004-07-12 A Balamurugan * fish/extensions/bc-common.scm: new file * fish/extensions/bc-lan-conf-auth-section.scm: new file * fish/extensions/bc-lan-conf-misc-section.scm: new file * fish/extensions/bc-lan-conf-section.scm: new file * fish/extensions/bc-lan-serial-channel-section.scm: new file * fish/extensions/bc-misc-section.scm: new file * fish/extensions/bc-section.scm: new file * fish/extensions/bc-serial-conf-section.scm: new file * fish/extensions/bc-user-section.scm: new file * fish/extensions/bc2.scm: new file * fish/src/bmc-conf2.c: new file * fish/src/bmc-conf2.h: new file * fish/extensions/Makefile.am: updated * fish/extensions/init.scm: added load-entry of bmc-conf2 * fish/extensions/utils.scm: code cleanup * fish/src/Makefile.am: updated * fish/src/extension.c: added new primitive procedures fi-set-bmc-username, fi-set-bmc-enable-user, fi-set-bmc-user-password, fi-set-bmc-user-lan-channel-access, fi-set-bmc-user-serial-channel-access, fi-set-bmc-lan-channel-volatile-access, fi-set-bmc-lan-channel-non-volatile-access, fi-set-bmc-lan-conf-ip-address-source, fi-set-bmc-lan-conf-ip-address, fi-set-bmc-lan-conf-mac-address, fi-set-bmc-lan-conf-subnet-mask, fi-set-bmc-lan-conf-default-gateway-ip-address, fi-set-bmc-lan-conf-default-gateway-mac-address, fi-set-bmc-lan-conf-backup-gateway-ip-address, fi-set-bmc-lan-conf-backup-gateway-mac-address, fi-set-bmc-lan-conf-auth-type-callback-enables, fi-set-bmc-lan-conf-auth-type-user-enables, fi-set-bmc-lan-conf-auth-type-operator-enables, fi-set-bmc-lan-conf-auth-type-admin-enables, fi-set-bmc-lan-conf-auth-type-oem-enables, fi-set-bmc-lan-conf-arp-control, fi-set-bmc-lan-conf-gratuitous-arp, fi-set-bmc-serial-channel-volatile-access, fi-set-bmc-serial-channel-non-volatile-access, fi-set-bmc-serial-conf-conn-mode, fi-set-bmc-serial-conf-page-blackout-interval, fi-set-bmc-serial-conf-call-retry-time, fi-set-bmc-serial-conf-ipmi-msg-comm-settings and fi-set-bmc-power-restore-policy * fish/src/scm-procedures.[ch]: added new functions ex_set_bmc_username(), ex_set_bmc_enable_user(), ex_set_bmc_user_password(), ex_set_bmc_user_lan_channel_access(), ex_set_bmc_user_serial_channel_access(), ex_set_bmc_lan_channel_volatile_access(), ex_set_bmc_lan_channel_non_volatile_access(), ex_set_bmc_lan_conf_ip_addr_source(), ex_set_bmc_lan_conf_ip_addr(), ex_set_bmc_lan_conf_mac_addr(), ex_set_bmc_lan_conf_subnet_mask(), ex_set_bmc_lan_conf_default_gw_ip_addr(), ex_set_bmc_lan_conf_default_gw_mac_addr(), ex_set_bmc_lan_conf_backup_gw_ip_addr(), ex_set_bmc_lan_conf_backup_gw_mac_addr(), ex_set_bmc_lan_conf_auth_type_callback_enables(), ex_set_bmc_lan_conf_auth_type_user_enables(), ex_set_bmc_lan_conf_auth_type_operator_enables(), ex_set_bmc_lan_conf_auth_type_admin_enables(), ex_set_bmc_lan_conf_auth_type_oem_enables(), ex_set_bmc_lan_conf_arp_control(), ex_set_bmc_lan_conf_gratuitous_arp(), ex_set_bmc_serial_channel_volatile_access(), ex_set_bmc_serial_channel_non_volatile_access(), ex_set_bmc_serial_conf_conn_mode(), ex_set_bmc_serial_conf_page_blackout_interval(), ex_set_bmc_serial_conf_call_retry_time(), ex_set_bmc_serial_conf_ipmi_msg_comm_settings() and ex_set_bmc_power_restore_policy() 2004-07-12 Albert Chu * bmc-watchdog/Makefile.am: Fixed typo. * bmc-watchdog/src/bmc-watchdog.c (_bmclog): Fixed juvenile mistake where arguments weren't output to the bmc log. 2004-07-09 Albert Chu * freeipmi.spec.in: Renamed with_bmc_watchdog_setup conditional with_bmc_watchdog_start. Added with_bmc_watchdog_condrestart conditional. 2004-07-09 Ian Zimmerman * libfreeipmi/src/ipmi-lan-interface.c (ipmi_lan_sendto): Fix buffer overrun bug: the pad byte must _not_ be copied from caller provided buffer, because it is not there. (_pkt_len -> pkt_len). 2004-07-07 Albert Chu * bmc-watchdog/src/bmc-watchdog.c (_cmd): Removed fsync() calls. Problem was unrelated to syncing. 2004-07-07 Albert Chu Replace syslogging with a BMC-Watchdog logfile. * bmc-watchdog/src/bmc-watchdog.c (_bmclog, _bmclog_write, _cmdline_default, _init_bmc_watchdog): New functions. * bmc-watchdog/src/bmc-watchdog.c (_cmdline_parse, _usage): Rename --no-syslog to --no-logging option. Added --logfile option. * bmc-watchdog/src/bmc-watchdog.c (_init_ipmi, _daemon_init): Removed openlog() calls. * bmc-watchdog/src/bmc-watchdog.c (main, _daemon_init): Call new _init_bmc_watchdog() function. * bmc-watchdog/src/bmc-watchdog.c (main): Call new _cmdline_default() function. Close logfile_fd descriptor. * bmc-watchdog/src/bmc-watchdog.c: Globally use _bmclog() instead of _syslog(). * bmc-watchdog/src/bmc-watchdog.c (_syslog): Slightly alter code structure. * bmc-watchdog/bmc-watchdog.log: New file. * bmc-watchdog/Makefile.am: Added bmc-watchdog.log install and dist. * bmc-watchdog/src/bmc-watchdog.c (_cmd): Added fsync() call so debug output is consistent. * doc/bmc-watchdog.8.in: Updated with appropriate information for changes above. * freeipmi.spec.in: Updated with packaging requirements of files in /var. 2004-07-06 Albert Chu * doc/bmc-watchdog.8.in: Added --help and --version options. * bmc-watchdog/src/bmc-watchdog.c (_cmdline_parse, _usage): Re-worked to output bmc-watchdog command specific options when --help is listed with a command type. * bmc-watchdog/src/bmc-watchdog.c (_cmd_string): New functions. * bmc-watchdog/src/bmc-watchdog.c: Some minor code cleanup throughout the code. 2004-06-29 Albert Chu * ipmipower/src/conffile.c (_parseline): Fixed argument parsing bugs. 2004-06-25 Albert Chu Added Suspend BMC Arps functionality to BMC-Watchdog * bmc-watchdog/src/bmc-watchdog.c (_suspend_bmc_arps_cmd, _get_lan_channel_number): New Functions. * bmc-watchdog/src/bmc-watchdog.c (_usage, _cmdline_parse, _start_cmd, _daemon_setup): Added --arp-response-suspend and --gratuitous-arp-suspend support. * bmc-watchdog/src/bmc-watchdog.c (_cmd): Added netfn argument. Use netfn argument in kcs function calls. * bmc-watchdog/src/bmc-watchdog.c (_reset_watchdog_timer_cmd, _set_watchdog_timer_cmd, _get_watchdog_timer_cmd, _suspend_bmc_arps_cmd): Pass appropriate network function to _cmd(). * libfreeipmi/src/ipmi-watchdog.c: Fix typo in fiid_cmd_suspend_bmc_arp_rq template. * libfreeipmi/src/ipmi-watchdog.h,libfreeipmi/src/ipmi-watchdog.c (fill_cmd_suspend_bmc_arps): Added channel_number argument. Fill channel_argument field based on argument. * libfreeipmi/src/ipmi-watchdog.h: Added IPMI_WATCHDOG_GRATUITOUS_ARP_NO_SUSPEND, IPMI_WATCHDOG_GRATUITOUS_ARP_SUSPEND, IPMI_WATCHDOG_ARP_RESPONSE_NO_SUSPEND, IPMI_WATCHDOG_ARP_RESPONSE_SUSPEND, IPMI_WATCHDOG_GRATUITOUS_ARP_VALID, and IPMI_WATCHDOG_ARP_RESPONSE_VALID macros. * doc/bmc-watchdog.8.in: Updated with new info about suspend arps options. Misc. Fixes. * libfreeipmi/src/ipmi-error.c (_ERR_RET): Fixed return value error in macro. * TODO: Remove suspend arps note. Added note about need to reprogram _get_lan_channel_number(). 2004-06-24 Albert Chu Added Pulse Diagnostic Interrupt and Soft OS Shutdown commands * ipmipower/src/ipmipower.h: Added POWER_CMD_PULSE_DIAG_INTR and POWER_CMD_SOFT_SHUTDOWN_OS definitions. * ipmipower/src/ipmipower_config.c (_usage, ipmipower_config_cmdline_parse): Added support for --pulse and --soft options. * ipmipower/src/ipmipower_prompt.c (_cmd_help, ipmipower_prompt_process_cmdline): Added support for pulse and soft commands. * ipmipower/src/ipmipower_config.c (ipmipower_packet_create): Added support for pulse diagnostic interrupts and soft os shutdowns. * doc/ipmipower.8.in: Added information about --pulse and --soft options. * TODO: Remove pulse diag and soft shutdown todo. Misc Fixes. * ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_config.c, ipmipower/src/ipmipower_packet.c, ipmipower/src/ipmipower_powercmd.c, ipmipower/src/ipmipower_prompt.c: Changed POWER_CMD_POWER_STAT to POWER_CMD_POWER_STATUS. * ipmipower/src/ipmipower_config.c (_usage): Reworded some usage. * ipmipower/src/ipmipower_config.c (ipmipower_config_cmdline_parse): Put 'break' after usage and version. 2004-06-23 Albert Chu * ipmipower/src/ipmipower_prompt.c (_cmd_authtype): Check for username and password length rather than non-null. 2004-06-23 A Balamurugan * fish/src/ipmi-wrapper.c: now get_lan_channel_number() and get_serial_channel_number() return predefined values. 2004-06-16 A Balamurugan * fish/src/bmc-conf-commit.c: now set_user_password_commit() enables users. 2004-05-24 Albert Chu * freeipmi.spec.in: Added devel package. 2004-05-19 Albert Chu * freeipmi.spec.in: Added optional powerman restart check. 2004-05-18 A Balamurugan * doc/examples/hello-sensors.c: fixed. 2004-05-18 Albert Chu * bmc-watchdog/bmc-watchdog: Fix careless cut and paste typo. 2004-05-13 Albert Chu * bmc-watchdog/Makefile.am: Remove uninstall-extra. * autogen.sh: Change --foreign strictness to --gnu since we are now a gnu project. * COPYING, INSTALL, freeipmi.spec.in: New Files. * Makefile.am: Add COPYING and INSTALL to dist and install. Add freeipmi.spec.in to dist. * configure.ac: Generate freeipmi.spec. * doc/bmc-watchdog.8.in: Changed default io-port to corresponding value used in code. 2004-05-13 Ian Zimmerman * libfreeipmi/Makefile.am (IPCDIR), doc/examples/Makefile.am (Examplesdir), doc/Makefile.am (docdir): s/PACKAGE_NAME/PACKAGE/ * fish/src/bmc-conf-key-utils.c: make bmc_config_key_list static, it is not used outside of its defining file. * fish/src/bmc-conf-key-utils.h: remove bmc_config_key_list and make it static, it is not used outside of its defining file. * fish/src/bmc-conf-checkout.c, fish/src/bmc-conf-commit.c, fish/src/bmc-conf-utils.c, fish/src/ipmi-wrapper-sel.c, fish/src/ipmi-wrapper.c, fish/src/scm-procedures.c, libfreeipmi/src/ipmi-dev-global-cmds.c, libfreeipmi/src/ipmi-kcs-interface.c, libfreeipmi/src/ipmi-lan-interface.c, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-sdr-repo-cache.c, libfreeipmi/src/ipmi-sel-record-types.c, libfreeipmi/src/rmcp.c: add nasty autoconf dance for alloca. * configure.ac: Add AC_FUNC_ALLOCA. 2004-05-13 Albert Chu * COPYING.ipmiping, DISCLAIMER.ipmiping, COPYING.rmcpping, DISCLAIMER.rmcpping, doc/ipmiping.8.in, doc/rmcpping.8.in, libfreeipmi/src/ipmi-ping.h, libfreeipmi/src/ipmi-ping.c, ipmiping/Makefile.am, ipmiping/src/Makefile.am, ipmiping/src/ipmiping.c, rcmpping/Makefile.am, rmcpping/src/Makefile.am, rmcpping/src/rmcpping.c: New files. * TODO: Added ipmiping and rmcpping todo list. * configure.ac: Generate ipmiping and rmcpping manpages. Generate ipmiping and rmcpping makefiles. * doc/Makefile.am: Added ipmiping and rmcpping manpages. * Makefile.am: Added ipmiping and rmcpping subdirectories. Added COPYING.ipmiping, DISCLAIMER.ipmiping, COPYING.rmcpping, DISCLAIMER.rmcpping. * libfreeipmi/src/Makefile.am: Added ipmi-ping.h and ipmi-ping.c. * libfreeipmi/src/freeipmi.h: Added ipmi-ping.h. 2004-05-12 Ian Zimmerman * fish/extensions/bmc-config.scm (bmc-config-main): If an incomplete key-pair is given just display usage and exit. * fish/extensions/sensors.scm (sensors-main): use string-tokenize to split sensors list, not read. * doc/sensors.1: Document the new --all flag. Should this file be generated through make? * fish/extensions/sensors.scm (sensors-main): Add an --all flag as requested by Al to override ignore list. (sensors-display-help): Document the new --all flag. 2004-05-11 Albert Chu * ipmipower/src/ipmipower_wrappers.h: Fix #include bug found by Ian. * ipmipower/src/ipmipower_config.c: Remove _GNU_SOURCE define. * bmc-watchdog/bmc-watchdog: Set default use to SMS/OS and clear all flags in default daemon execution. * doc/bmc-watchdog.8.in: Added known issue about using something other than SMS/OS for the bmc watchdog timer use. 2004-05-11 Albert Chu Added ipmipower. * COPYING.ipmipower, DISCLAIMER.ipmipower, doc/ipmipower.8.in, doc/ipmipower.conf.5.in, ipmipower/Makefile.am, ipmipower/src/Makefile.am, ipmipower/src/argv.c, ipmipower/src/argv.h, ipmipower/src/cbuf.c, ipmipower/src/cbuf.h, ipmipower/src/conffile.c, ipmipower/src/conffile.h, ipmipower/src/error.c, ipmipower/src/error.h, ipmipower/src/fd.c, ipmipower/src/fd.h, ipmipower/src/hostlist.c, ipmipower/src/hostlist.h, ipmipower/src/hprintf.c, ipmipower/src/hprintf.h, ipmipower/src/ipmipower_auth.c, ipmipower/src/ipmipower_auth.h, ipmipower/src/ipmipower.c, ipmipower/src/ipmipower_check.c, ipmipower/src/ipmipower_check.h, ipmipower/src/ipmipower_config.c, ipmipower/src/ipmipower_config.h, ipmipower/src/ipmipower_connection.c, ipmipower/src/ipmipower_connection.h, ipmipower/src/ipmipower.h, ipmipower/src/ipmipower_output.c, ipmipower/src/ipmipower_output.h, ipmipower/src/ipmipower_packet.c, ipmipower/src/ipmipower_packet.h, ipmipower/src/ipmipower_ping.c, ipmipower/src/ipmipower_ping.h, ipmipower/src/ipmipower_powercmd.c, ipmipower/src/ipmipower_powercmd.h, ipmipower/src/ipmipower_prompt.c, ipmipower/src/ipmipower_prompt.h, ipmipower/src/ipmipower_util.c, ipmipower/src/ipmipower_util.h, ipmipower/src/ipmipower_wrappers.c, ipmipower/src/ipmipower_wrappers.h, ipmipower/src/list.c, ipmipower/src/list.h, ipmipower/src/wrappers.c, ipmipower/src/wrappers.h: New files. * doc/Makefile.am: Added ipmipower.8 and ipmipower.conf.5. * Makefile.am: Added ipmipower subdirectory. * configure.ac: Added sys/wait.h, mmap, and mlock checks. Generate ipmipower.8 and ipmipower.conf.5 manpages. Generate Makefile.am and ipmipower/src Makefiles. * TODO: Added ipmipower todo list. 2004-05-10 Ian Zimmerman * bmc-watchdog/src/bmc-watchdog.c (_set_watchdog_timer_cmd): corrected typo in BIGENDIAN case 2004-05-07 Albert Chu * configure.ac: Fixed bugs with --enable-debug option pointed out by Ian. 2004-05-07 Ian Zimmerman * fish/src/fish.c (inner_main): add call to ipmi_probe to locate kcs io registers. * libfreeipmi/src/pcilocate.c: enclose everything in a big #ifdef __linux because it uses /proc (pci_get_dev_info): reverse the semantics of pinfo->bmc_io_mapped. * fish/src/fish.c (inner_main): rename default_ variables to cmdline_ as that describes much better what they do. 2004-05-07 Albert Chu Added bmc-watchdog * COPYING.bmc-watchdog, DISCLAIMER.bmc-watchdog, doc/bmc-watchdog.8.in, bmc-watchdog/Makefile.am, bmc-watchdog/bmc-watchdog, bmc-watchdog/src/Makefile.am, bmc-watchdog/src/bmc-watchdog.c: New files. * Makefile.am: Added bmc-watchdog subdirectory. Add docs and other files to dist. * TODO: Added bmc-watchdog todo list. * configure.ac: Generate bmc-watchdog makefiles and manpage. Added --enable-debug option, getopt_long function check, and big endian check. * doc/Makefile.am: Added bmc-watchdog.8. Added Suspend BMC Arps command * libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/ipmi-watchdog.c: Added tmpl_cmd_suspend_bmc_arps_rq tmpl_cmd_suspend_bmc_arps_rs templates. * libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/ipmi-watchdog.c (fill_cmd_suspend_bmc_arps): New function. 2004-05-06 Ian Zimmerman * fish/src/fish.c (inner_main): make sure command line overrides files if they conflict * fish/src/Makefile.am: improved Al's fix to use make features instead of new shells. 2004-05-06 Albert Chu * fish/fish.spec.in, fish/fish.lsm.in, libfreeipmi/libfreeipmi.lsm.in, libfreeipmi/libfreeipmi.spec.in: Removed files. * configure.ac: Remove generation of lsm and spec files. * fish/src/Makefile.am: Added dependency check to libfreeipmi.la. * fish/src/bmc-conf-checkout.c, fish/src/bmc-conf-commit.c, fish/src/bmc-conf-key-utils.c, fish/src/bmc-conf-utils.c, fish/src/fi-commands.c, fish/src/fish.c, fish/src/interpreter.c, fish/src/ipmi-wrapper-sel.c, fish/src/ipmi-wrapper-sensor.c, fish/src/ipmi-wrapper.c, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sel-record-types.c, libfreeipmi/src/ipmi-sol-cmds.c: Changed to "freeipmi.h" to ensure use of local header. * TODO: New file. 2004-05-06 09:35 itz * autogen.sh, configure.ac: Use ancient automake to satisfy RH users. 2004-05-05 16:10 itz * fish/src/fish.c: Change "running for first time" message because it isn't right to use PACKAGE anymore. 2004-05-05 15:13 itz * aclocal.m4: Remove aclocal.m4 because it is not a real source file (generated by autogen.sh via aclocal). 2004-05-05 14:42 itz * libfreeipmi/src/ipmi-sdr-repo-cache.h: Use /var/lib/freeipmi for sdr cache, not /var/lib/libfreeipmi 2004-05-05 14:11 itz * libfreeipmi/src/ipmi-kcs-interface.c: Second fix from Al 2004-05-05 14:08 itz * libfreeipmi/src/ipmi-kcs-interface.c: Fixed error output corner case. Fixed return value bug. Unlock semaphore if a EBUSY failure occurs. 2004-05-05 14:00 itz * AUTHORS, Makefile.am, NEWS, README, aclocal.m4, autogen.sh, configure.ac, doc/BUGS, doc/Makefile.am, doc/authors.texinfo, doc/bmc-config.1, doc/bmc-info.1, doc/fish.1, doc/fish.texinfo, doc/freeipmi-hg.texinfo, doc/gpl.texinfo, doc/sel.1, doc/sensors.1, doc/examples/Makefile.am, doc/examples/Makefile.example, doc/examples/hello-sensors.c, fish/Makefile.am, fish/fish.lsm.in, fish/fish.scm, fish/fish.spec.in, fish/extensions/Makefile.am, fish/extensions/bmc-config.scm, fish/extensions/bmc-info.scm, fish/extensions/discovery.scm, fish/extensions/init.scm, fish/extensions/sel.scm, fish/extensions/sensors-conf.scm, fish/extensions/sensors-utils.scm, fish/extensions/sensors.scm, fish/extensions/shell.scm, fish/extensions/utils.scm, fish/scripts/Makefile.am, fish/scripts/bmc-config/Makefile.am, fish/scripts/bmc-config/bmc-config.in, fish/scripts/bmc-info/Makefile.am, fish/scripts/bmc-info/bmc-info.in, fish/scripts/sel/Makefile.am, fish/scripts/sel/sel.in, fish/scripts/sensors/Makefile.am, fish/scripts/sensors/sensors.in, fish/src/Makefile.am, fish/src/bmc-conf-checkout.c, fish/src/bmc-conf-checkout.h, fish/src/bmc-conf-commit.c, fish/src/bmc-conf-commit.h, fish/src/bmc-conf-key-utils.c, fish/src/bmc-conf-key-utils.h, fish/src/bmc-conf-utils.c, fish/src/bmc-conf-utils.h, fish/src/extension.c, fish/src/extension.h, fish/src/fi-commands.c, fish/src/fi-commands.h, fish/src/fi-utils.c, fish/src/fi-utils.h, fish/src/fish.c, fish/src/fish.h, fish/src/guile-wrapper.c, fish/src/guile-wrapper.h, fish/src/interpreter.c, fish/src/interpreter.h, fish/src/ipmi-wrapper-sel.c, fish/src/ipmi-wrapper-sel.h, fish/src/ipmi-wrapper-sensor.c, fish/src/ipmi-wrapper-sensor.h, fish/src/ipmi-wrapper.c, fish/src/ipmi-wrapper.h, fish/src/scm-procedures.c, fish/src/scm-procedures.h, fish/src/xmalloc.c, fish/src/xmalloc.h, libfreeipmi/Makefile.am, libfreeipmi/ipckey, libfreeipmi/libfreeipmi.lsm.in, libfreeipmi/libfreeipmi.spec.in, libfreeipmi/src/Makefile.am, libfreeipmi/src/bit-ops.c, libfreeipmi/src/bit-ops.h, libfreeipmi/src/fiid.c, libfreeipmi/src/fiid.h, libfreeipmi/src/freeipmi.h, libfreeipmi/src/ipmi-chassis-cmds.c, libfreeipmi/src/ipmi-chassis-cmds.h, libfreeipmi/src/ipmi-cmd-spec.h, libfreeipmi/src/ipmi-debug.c, libfreeipmi/src/ipmi-debug.h, libfreeipmi/src/ipmi-dev-global-cmds.c, libfreeipmi/src/ipmi-dev-global-cmds.h, libfreeipmi/src/ipmi-error.c, libfreeipmi/src/ipmi-error.h, libfreeipmi/src/ipmi-ipmb-interface.h, libfreeipmi/src/ipmi-kcs-interface.c, libfreeipmi/src/ipmi-kcs-interface.h, libfreeipmi/src/ipmi-lan-cmds.c, libfreeipmi/src/ipmi-lan-cmds.h, libfreeipmi/src/ipmi-lan-interface.c, libfreeipmi/src/ipmi-lan-interface.h, libfreeipmi/src/ipmi-lan-param-spec.h, libfreeipmi/src/ipmi-md2.c, libfreeipmi/src/ipmi-md2.h, libfreeipmi/src/ipmi-md5.c, libfreeipmi/src/ipmi-md5.h, libfreeipmi/src/ipmi-msg-interface-desc.c, libfreeipmi/src/ipmi-msg-interface-desc.h, libfreeipmi/src/ipmi-msg-support-cmds.c, libfreeipmi/src/ipmi-msg-support-cmds.h, libfreeipmi/src/ipmi-netfn-spec.c, libfreeipmi/src/ipmi-netfn-spec.h, libfreeipmi/src/ipmi-probe.c, libfreeipmi/src/ipmi-probe.h, libfreeipmi/src/ipmi-sdr-record-types.c, libfreeipmi/src/ipmi-sdr-record-types.h, libfreeipmi/src/ipmi-sdr-repo-cache.c, libfreeipmi/src/ipmi-sdr-repo-cache.h, libfreeipmi/src/ipmi-sdr-repo-cmds.c, libfreeipmi/src/ipmi-sdr-repo-cmds.h, libfreeipmi/src/ipmi-sel-cmds.c, libfreeipmi/src/ipmi-sel-cmds.h, libfreeipmi/src/ipmi-sel-record-types.c, libfreeipmi/src/ipmi-sel-record-types.h, libfreeipmi/src/ipmi-semaphores.c, libfreeipmi/src/ipmi-semaphores.h, libfreeipmi/src/ipmi-sensor-cmds.c, libfreeipmi/src/ipmi-sensor-cmds.h, libfreeipmi/src/ipmi-sensor-types.c, libfreeipmi/src/ipmi-sensor-types.h, libfreeipmi/src/ipmi-sensor-utils.c, libfreeipmi/src/ipmi-sensor-utils.h, libfreeipmi/src/ipmi-serial-cmds.c, libfreeipmi/src/ipmi-serial-cmds.h, libfreeipmi/src/ipmi-serial-modem-param-spec.h, libfreeipmi/src/ipmi-sessions.c, libfreeipmi/src/ipmi-sessions.h, libfreeipmi/src/ipmi-smic-interface.c, libfreeipmi/src/ipmi-smic-interface.h, libfreeipmi/src/ipmi-sol-cmds.c, libfreeipmi/src/ipmi-sol-cmds.h, libfreeipmi/src/ipmi-utils.c, libfreeipmi/src/ipmi-utils.h, libfreeipmi/src/ipmi-watchdog.c, libfreeipmi/src/ipmi-watchdog.h, libfreeipmi/src/libfreeipmi.c, libfreeipmi/src/pcilocate.c, libfreeipmi/src/pcilocate.h, libfreeipmi/src/rmcp.c, libfreeipmi/src/rmcp.h, libfreeipmi/src/smbios.c, libfreeipmi/src/smbios.h, libfreeipmi/src/xmalloc.c, libfreeipmi/src/xmalloc.h: First merged tree. freeipmi-1.6.4/Makefile.in0000644002055400205540000007726613527342443015350 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = . DIST_COMMON = INSTALL NEWS README AUTHORS ChangeLog \ $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/configure $(am__configure_deps) \ $(top_srcdir)/config/config.h.in $(srcdir)/freeipmi.spec.in \ $(top_srcdir)/libfreeipmi/include/freeipmi/freeipmi.h.in \ COPYING TODO config/compile config/config.guess \ config/config.sub config/install-sh config/missing \ config/ltmain.sh $(top_srcdir)/config/compile \ $(top_srcdir)/config/config.guess \ $(top_srcdir)/config/config.sub \ $(top_srcdir)/config/install-sh $(top_srcdir)/config/ltmain.sh \ $(top_srcdir)/config/missing ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) am__CONFIG_DISTCLEAN_FILES = config.status config.cache config.log \ configure.lineno config.status.lineno mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = freeipmi.spec \ libfreeipmi/include/freeipmi/freeipmi.h CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(docdir)" DATA = $(doc_DATA) RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ cscope distdir dist dist-all distcheck am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags CSCOPE = cscope DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) distdir = $(PACKAGE)-$(VERSION) top_distdir = $(distdir) am__remove_distdir = \ if test -d "$(distdir)"; then \ find "$(distdir)" -type d ! -perm -200 -exec chmod u+w {} ';' \ && rm -rf "$(distdir)" \ || { sleep 5 && rm -rf "$(distdir)"; }; \ else :; fi am__post_remove_distdir = $(am__remove_distdir) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" DIST_ARCHIVES = $(distdir).tar.gz GZIP_ENV = --best DIST_TARGETS = dist-gzip distuninstallcheck_listfiles = find . -type f -print am__distuninstallcheck_listfiles = $(distuninstallcheck_listfiles) \ | sed 's|^\./|$(prefix)/|' | grep -v '$(infodir)/dir$$' distcleancheck_listfiles = find . -type f -print ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # include directory for aclocal ACLOCAL_AMFLAGS = -I config SUBDIRS = \ doc \ etc \ common \ libfreeipmi \ libipmiconsole \ libipmimonitoring \ libipmidetect \ man \ bmc-info \ bmc-device \ bmc-watchdog \ ipmi-chassis \ ipmi-config \ ipmi-dcmi \ ipmi-fru \ ipmi-oem \ ipmi-pet \ ipmi-raw \ ipmi-sel \ ipmi-sensors \ ipmi-locate \ ipmiconsole \ ipmidetect \ ipmidetectd \ ipmiping \ ipmipower \ ipmiseld \ rmcpping \ contrib EXTRA = \ ChangeLog \ ChangeLog.0 \ AUTHORS \ COPYING \ INSTALL \ NEWS \ README \ README.argp \ README.build \ README.openipmi \ TODO \ COPYING.bmc-watchdog \ COPYING.ipmipower \ COPYING.ipmiping \ COPYING.ipmiconsole \ COPYING.ipmimonitoring \ COPYING.pstdout \ COPYING.ipmidetect \ COPYING.ipmi-fru \ COPYING.ipmi-dcmi \ COPYING.ipmiseld \ COPYING.sunbmc \ COPYING.ZRESEARCH \ DISCLAIMER.bmc-watchdog \ DISCLAIMER.ipmipower \ DISCLAIMER.ipmiping \ DISCLAIMER.ipmiconsole \ DISCLAIMER.ipmimonitoring \ DISCLAIMER.pstdout \ DISCLAIMER.ipmidetect \ DISCLAIMER.ipmi-fru \ DISCLAIMER.ipmi-dcmi \ DISCLAIMER.ipmiseld \ DISCLAIMER.bmc-watchdog.UC \ DISCLAIMER.ipmipower.UC \ DISCLAIMER.ipmiping.UC \ DISCLAIMER.ipmiconsole.UC \ DISCLAIMER.ipmimonitoring.UC \ DISCLAIMER.pstdout.UC \ DISCLAIMER.ipmidetect.UC \ DISCLAIMER.ipmi-fru.UC doc_DATA = $(EXTRA) CLEANFILES = DISTCLEANFILES = .deps/*.P EXTRA_DIST = $(EXTRA) freeipmi.spec all: all-recursive .SUFFIXES: am--refresh: Makefile @: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ echo ' cd $(srcdir) && $(AUTOMAKE) --gnu'; \ $(am__cd) $(srcdir) && $(AUTOMAKE) --gnu \ && exit 0; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ echo ' $(SHELL) ./config.status'; \ $(SHELL) ./config.status;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) $(SHELL) ./config.status --recheck $(top_srcdir)/configure: $(am__configure_deps) $(am__cd) $(srcdir) && $(AUTOCONF) $(ACLOCAL_M4): $(am__aclocal_m4_deps) $(am__cd) $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS) $(am__aclocal_m4_deps): config/config.h: config/stamp-h1 @if test ! -f $@; then rm -f config/stamp-h1; else :; fi @if test ! -f $@; then $(MAKE) $(AM_MAKEFLAGS) config/stamp-h1; else :; fi config/stamp-h1: $(top_srcdir)/config/config.h.in $(top_builddir)/config.status @rm -f config/stamp-h1 cd $(top_builddir) && $(SHELL) ./config.status config/config.h $(top_srcdir)/config/config.h.in: $(am__configure_deps) ($(am__cd) $(top_srcdir) && $(AUTOHEADER)) rm -f config/stamp-h1 touch $@ distclean-hdr: -rm -f config/config.h config/stamp-h1 freeipmi.spec: $(top_builddir)/config.status $(srcdir)/freeipmi.spec.in cd $(top_builddir) && $(SHELL) ./config.status $@ libfreeipmi/include/freeipmi/freeipmi.h: $(top_builddir)/config.status $(top_srcdir)/libfreeipmi/include/freeipmi/freeipmi.h.in cd $(top_builddir) && $(SHELL) ./config.status $@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs distclean-libtool: -rm -f libtool config.lt install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscope: cscope.files test ! -s cscope.files \ || $(CSCOPE) -b -q $(AM_CSCOPEFLAGS) $(CSCOPEFLAGS) -i cscope.files $(CSCOPE_ARGS) clean-cscope: -rm -f cscope.files cscope.files: clean-cscope cscopelist cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags -rm -f cscope.out cscope.in.out cscope.po.out cscope.files distdir: $(DISTFILES) $(am__remove_distdir) test -d "$(distdir)" || mkdir "$(distdir)" @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done -test -n "$(am__skip_mode_fix)" \ || find "$(distdir)" -type d ! -perm -755 \ -exec chmod u+rwx,go+rx {} \; -o \ ! -type d ! -perm -444 -links 1 -exec chmod a+r {} \; -o \ ! -type d ! -perm -400 -exec chmod a+r {} \; -o \ ! -type d ! -perm -444 -exec $(install_sh) -c -m a+r {} {} \; \ || chmod -R a+r "$(distdir)" dist-gzip: distdir tardir=$(distdir) && $(am__tar) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).tar.gz $(am__post_remove_distdir) dist-bzip2: distdir tardir=$(distdir) && $(am__tar) | BZIP2=$${BZIP2--9} bzip2 -c >$(distdir).tar.bz2 $(am__post_remove_distdir) dist-lzip: distdir tardir=$(distdir) && $(am__tar) | lzip -c $${LZIP_OPT--9} >$(distdir).tar.lz $(am__post_remove_distdir) dist-xz: distdir tardir=$(distdir) && $(am__tar) | XZ_OPT=$${XZ_OPT--e} xz -c >$(distdir).tar.xz $(am__post_remove_distdir) dist-tarZ: distdir tardir=$(distdir) && $(am__tar) | compress -c >$(distdir).tar.Z $(am__post_remove_distdir) dist-shar: distdir shar $(distdir) | GZIP=$(GZIP_ENV) gzip -c >$(distdir).shar.gz $(am__post_remove_distdir) dist-zip: distdir -rm -f $(distdir).zip zip -rq $(distdir).zip $(distdir) $(am__post_remove_distdir) dist dist-all: $(MAKE) $(AM_MAKEFLAGS) $(DIST_TARGETS) am__post_remove_distdir='@:' $(am__post_remove_distdir) # This target untars the dist file and tries a VPATH configuration. Then # it guarantees that the distribution is self-contained by making another # tarfile. distcheck: dist case '$(DIST_ARCHIVES)' in \ *.tar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).tar.gz | $(am__untar) ;;\ *.tar.bz2*) \ bzip2 -dc $(distdir).tar.bz2 | $(am__untar) ;;\ *.tar.lz*) \ lzip -dc $(distdir).tar.lz | $(am__untar) ;;\ *.tar.xz*) \ xz -dc $(distdir).tar.xz | $(am__untar) ;;\ *.tar.Z*) \ uncompress -c $(distdir).tar.Z | $(am__untar) ;;\ *.shar.gz*) \ GZIP=$(GZIP_ENV) gzip -dc $(distdir).shar.gz | unshar ;;\ *.zip*) \ unzip $(distdir).zip ;;\ esac chmod -R a-w $(distdir) chmod u+w $(distdir) mkdir $(distdir)/_build $(distdir)/_inst chmod a-w $(distdir) test -d $(distdir)/_build || exit 0; \ dc_install_base=`$(am__cd) $(distdir)/_inst && pwd | sed -e 's,^[^:\\/]:[\\/],/,'` \ && dc_destdir="$${TMPDIR-/tmp}/am-dc-$$$$/" \ && am__cwd=`pwd` \ && $(am__cd) $(distdir)/_build \ && ../configure --srcdir=.. --prefix="$$dc_install_base" \ $(AM_DISTCHECK_CONFIGURE_FLAGS) \ $(DISTCHECK_CONFIGURE_FLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) \ && $(MAKE) $(AM_MAKEFLAGS) dvi \ && $(MAKE) $(AM_MAKEFLAGS) check \ && $(MAKE) $(AM_MAKEFLAGS) install \ && $(MAKE) $(AM_MAKEFLAGS) installcheck \ && $(MAKE) $(AM_MAKEFLAGS) uninstall \ && $(MAKE) $(AM_MAKEFLAGS) distuninstallcheck_dir="$$dc_install_base" \ distuninstallcheck \ && chmod -R a-w "$$dc_install_base" \ && ({ \ (cd ../.. && umask 077 && mkdir "$$dc_destdir") \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" install \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" uninstall \ && $(MAKE) $(AM_MAKEFLAGS) DESTDIR="$$dc_destdir" \ distuninstallcheck_dir="$$dc_destdir" distuninstallcheck; \ } || { rm -rf "$$dc_destdir"; exit 1; }) \ && rm -rf "$$dc_destdir" \ && $(MAKE) $(AM_MAKEFLAGS) dist \ && rm -rf $(DIST_ARCHIVES) \ && $(MAKE) $(AM_MAKEFLAGS) distcleancheck \ && cd "$$am__cwd" \ || exit 1 $(am__post_remove_distdir) @(echo "$(distdir) archives ready for distribution: "; \ list='$(DIST_ARCHIVES)'; for i in $$list; do echo $$i; done) | \ sed -e 1h -e 1s/./=/g -e 1p -e 1x -e '$$p' -e '$$x' distuninstallcheck: @test -n '$(distuninstallcheck_dir)' || { \ echo 'ERROR: trying to run $@ with an empty' \ '$$(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ $(am__cd) '$(distuninstallcheck_dir)' || { \ echo 'ERROR: cannot chdir into $(distuninstallcheck_dir)' >&2; \ exit 1; \ }; \ test `$(am__distuninstallcheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left after uninstall:" ; \ if test -n "$(DESTDIR)"; then \ echo " (check DESTDIR support)"; \ fi ; \ $(distuninstallcheck_listfiles) ; \ exit 1; } >&2 distcleancheck: distclean @if test '$(srcdir)' = . ; then \ echo "ERROR: distcleancheck can only run from a VPATH build" ; \ exit 1 ; \ fi @test `$(distcleancheck_listfiles) | wc -l` -eq 0 \ || { echo "ERROR: files left in build directory after distclean:" ; \ $(distcleancheck_listfiles) ; \ exit 1; } >&2 check-am: all-am check: check-recursive all-am: Makefile $(DATA) installdirs: installdirs-recursive installdirs-am: for dir in "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -f Makefile distclean-am: clean-am distclean-generic distclean-hdr \ distclean-libtool distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-docDATA install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f $(am__CONFIG_DISTCLEAN_FILES) -rm -rf $(top_srcdir)/autom4te.cache -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: uninstall-docDATA .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am \ am--refresh check check-am clean clean-cscope clean-generic \ clean-libtool cscope cscopelist-am ctags ctags-am dist \ dist-all dist-bzip2 dist-gzip dist-lzip dist-shar dist-tarZ \ dist-xz dist-zip distcheck distclean distclean-generic \ distclean-hdr distclean-libtool distclean-tags distcleancheck \ distdir distuninstallcheck dvi dvi-am html html-am info \ info-am install install-am install-data install-data-am \ install-docDATA install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs installdirs-am maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-docDATA uninstall-extra: $(docdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/Makefile.am0000644002055400205540000000273013527331634015317 0ustar00achuachu00000000000000 # include directory for aclocal ACLOCAL_AMFLAGS = -I config SUBDIRS = \ doc \ etc \ common \ libfreeipmi \ libipmiconsole \ libipmimonitoring \ libipmidetect \ man \ bmc-info \ bmc-device \ bmc-watchdog \ ipmi-chassis \ ipmi-config \ ipmi-dcmi \ ipmi-fru \ ipmi-oem \ ipmi-pet \ ipmi-raw \ ipmi-sel \ ipmi-sensors \ ipmi-locate \ ipmiconsole \ ipmidetect \ ipmidetectd \ ipmiping \ ipmipower \ ipmiseld \ rmcpping \ contrib PACKAGE = @PACKAGE@ VERSION = @VERSION@ EXTRA = \ ChangeLog \ ChangeLog.0 \ AUTHORS \ COPYING \ INSTALL \ NEWS \ README \ README.argp \ README.build \ README.openipmi \ TODO \ COPYING.bmc-watchdog \ COPYING.ipmipower \ COPYING.ipmiping \ COPYING.ipmiconsole \ COPYING.ipmimonitoring \ COPYING.pstdout \ COPYING.ipmidetect \ COPYING.ipmi-fru \ COPYING.ipmi-dcmi \ COPYING.ipmiseld \ COPYING.sunbmc \ COPYING.ZRESEARCH \ DISCLAIMER.bmc-watchdog \ DISCLAIMER.ipmipower \ DISCLAIMER.ipmiping \ DISCLAIMER.ipmiconsole \ DISCLAIMER.ipmimonitoring \ DISCLAIMER.pstdout \ DISCLAIMER.ipmidetect \ DISCLAIMER.ipmi-fru \ DISCLAIMER.ipmi-dcmi \ DISCLAIMER.ipmiseld \ DISCLAIMER.bmc-watchdog.UC \ DISCLAIMER.ipmipower.UC \ DISCLAIMER.ipmiping.UC \ DISCLAIMER.ipmiconsole.UC \ DISCLAIMER.ipmimonitoring.UC \ DISCLAIMER.pstdout.UC \ DISCLAIMER.ipmidetect.UC \ DISCLAIMER.ipmi-fru.UC doc_DATA = $(EXTRA) CLEANFILES = DISTCLEANFILES = .deps/*.P uninstall-extra: $(docdir) EXTRA_DIST = $(EXTRA) freeipmi.spec freeipmi-1.6.4/configure0000755002055400205540000177301613527342447015213 0ustar00achuachu00000000000000#! /bin/sh # From configure.ac Id: configure.ac,v 1.208 2010-08-06 21:02:29 chu11 Exp . # Guess values for system-dependent variables and create Makefiles. # Generated by GNU Autoconf 2.69 for freeipmi 1.6.4. # # Report bugs to . # # # Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc. # # # This configure script is free software; the Free Software Foundation # gives unlimited permission to copy, distribute and modify it. ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # Use a proper internal environment variable to ensure we don't fall # into an infinite loop, continuously re-executing ourselves. if test x"${_as_can_reexec}" != xno && test "x$CONFIG_SHELL" != x; then _as_can_reexec=no; export _as_can_reexec; # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 as_fn_exit 255 fi # We don't want this to propagate to other subprocesses. { _as_can_reexec=; unset _as_can_reexec;} if test "x$CONFIG_SHELL" = x; then as_bourne_compatible="if test -n \"\${ZSH_VERSION+set}\" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on \${1+\"\$@\"}, which # is contrary to our usage. Disable this feature. alias -g '\${1+\"\$@\"}'='\"\$@\"' setopt NO_GLOB_SUBST else case \`(set -o) 2>/dev/null\` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi " as_required="as_fn_return () { (exit \$1); } as_fn_success () { as_fn_return 0; } as_fn_failure () { as_fn_return 1; } as_fn_ret_success () { return 0; } as_fn_ret_failure () { return 1; } exitcode=0 as_fn_success || { exitcode=1; echo as_fn_success failed.; } as_fn_failure && { exitcode=1; echo as_fn_failure succeeded.; } as_fn_ret_success || { exitcode=1; echo as_fn_ret_success failed.; } as_fn_ret_failure && { exitcode=1; echo as_fn_ret_failure succeeded.; } if ( set x; as_fn_ret_success y && test x = \"\$1\" ); then : else exitcode=1; echo positional parameters were not saved. fi test x\$exitcode = x0 || exit 1 test -x / || exit 1" as_suggested=" as_lineno_1=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_1a=\$LINENO as_lineno_2=";as_suggested=$as_suggested$LINENO;as_suggested=$as_suggested" as_lineno_2a=\$LINENO eval 'test \"x\$as_lineno_1'\$as_run'\" != \"x\$as_lineno_2'\$as_run'\" && test \"x\`expr \$as_lineno_1'\$as_run' + 1\`\" = \"x\$as_lineno_2'\$as_run'\"' || exit 1 test -n \"\${ZSH_VERSION+set}\${BASH_VERSION+set}\" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO ECHO=\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO\$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test \"X\`printf %s \$ECHO\`\" = \"X\$ECHO\" \\ || test \"X\`print -r -- \$ECHO\`\" = \"X\$ECHO\" ) || exit 1 test \$(( 1 + 1 )) = 2 || exit 1" if (eval "$as_required") 2>/dev/null; then : as_have_required=yes else as_have_required=no fi if test x$as_have_required = xyes && (eval "$as_suggested") 2>/dev/null; then : else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR as_found=false for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. as_found=: case $as_dir in #( /*) for as_base in sh bash ksh sh5; do # Try only shells that exist, to save several forks. as_shell=$as_dir/$as_base if { test -f "$as_shell" || test -f "$as_shell.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$as_shell"; } 2>/dev/null; then : CONFIG_SHELL=$as_shell as_have_required=yes if { $as_echo "$as_bourne_compatible""$as_suggested" | as_run=a "$as_shell"; } 2>/dev/null; then : break 2 fi fi done;; esac as_found=false done $as_found || { if { test -f "$SHELL" || test -f "$SHELL.exe"; } && { $as_echo "$as_bourne_compatible""$as_required" | as_run=a "$SHELL"; } 2>/dev/null; then : CONFIG_SHELL=$SHELL as_have_required=yes fi; } IFS=$as_save_IFS if test "x$CONFIG_SHELL" != x; then : export CONFIG_SHELL # We cannot yet assume a decent shell, so we have to provide a # neutralization value for shells without unset; and this also # works around shells that cannot unset nonexistent variables. # Preserve -v and -x to the replacement shell. BASH_ENV=/dev/null ENV=/dev/null (unset BASH_ENV) >/dev/null 2>&1 && unset BASH_ENV ENV case $- in # (((( *v*x* | *x*v* ) as_opts=-vx ;; *v* ) as_opts=-v ;; *x* ) as_opts=-x ;; * ) as_opts= ;; esac exec $CONFIG_SHELL $as_opts "$as_myself" ${1+"$@"} # Admittedly, this is quite paranoid, since all the known shells bail # out after a failed `exec'. $as_echo "$0: could not re-execute with $CONFIG_SHELL" >&2 exit 255 fi if test x$as_have_required = xno; then : $as_echo "$0: This script requires a shell more modern than all" $as_echo "$0: the shells that I found on your system." if test x${ZSH_VERSION+set} = xset ; then $as_echo "$0: In particular, zsh $ZSH_VERSION has bugs and should" $as_echo "$0: be upgraded to zsh 4.3.4 or later." else $as_echo "$0: Please tell bug-autoconf@gnu.org and $0: freeipmi-devel@gnu.org about your system, including any $0: error possibly output before this message. Then install $0: a modern shell, or manually run the script under such a $0: shell if you do have one." fi exit 1 fi fi fi SHELL=${CONFIG_SHELL-/bin/sh} export SHELL # Unset more variables known to interfere with behavior of common tools. CLICOLOR_FORCE= GREP_OPTIONS= unset CLICOLOR_FORCE GREP_OPTIONS ## --------------------- ## ## M4sh Shell Functions. ## ## --------------------- ## # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits as_lineno_1=$LINENO as_lineno_1a=$LINENO as_lineno_2=$LINENO as_lineno_2a=$LINENO eval 'test "x$as_lineno_1'$as_run'" != "x$as_lineno_2'$as_run'" && test "x`expr $as_lineno_1'$as_run' + 1`" = "x$as_lineno_2'$as_run'"' || { # Blame Lee E. McMahon (1931-1989) for sed's syntax. :-) sed -n ' p /[$]LINENO/= ' <$as_myself | sed ' s/[$]LINENO.*/&-/ t lineno b :lineno N :loop s/[$]LINENO\([^'$as_cr_alnum'_].*\n\)\(.*\)/\2\1\2/ t loop s/-\n.*// ' >$as_me.lineno && chmod +x "$as_me.lineno" || { $as_echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2; as_fn_exit 1; } # If we had to re-execute with $CONFIG_SHELL, we're ensured to have # already done that, so ensure we don't try to do so again and fall # in an infinite loop. This has already happened in practice. _as_can_reexec=no; export _as_can_reexec # Don't try to exec as it changes $[0], causing all sort of problems # (the dirname of $[0] is not the place where we might find the # original and so on. Autoconf is especially sensitive to this). . "./$as_me.lineno" # Exit status is that of the last command. exit } ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" SHELL=${CONFIG_SHELL-/bin/sh} test -n "$DJDIR" || exec 7<&0 &1 # Name of the host. # hostname on some systems (SVR3.2, old GNU/Linux) returns a bogus exit status, # so uname gets run too. ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q` # # Initializations. # ac_default_prefix=/usr/local ac_clean_files= ac_config_libobj_dir=. LIBOBJS= cross_compiling=no subdirs= MFLAGS= MAKEFLAGS= # Identity of this package. PACKAGE_NAME='freeipmi' PACKAGE_TARNAME='freeipmi' PACKAGE_VERSION='1.6.4' PACKAGE_STRING='freeipmi 1.6.4' PACKAGE_BUGREPORT='freeipmi-devel@gnu.org' PACKAGE_URL='' ac_unique_file="ChangeLog.0" # Factoring default headers for most tests. ac_includes_default="\ #include #ifdef HAVE_SYS_TYPES_H # include #endif #ifdef HAVE_SYS_STAT_H # include #endif #ifdef STDC_HEADERS # include # include #else # ifdef HAVE_STDLIB_H # include # endif #endif #ifdef HAVE_STRING_H # if !defined STDC_HEADERS && defined HAVE_MEMORY_H # include # endif # include #endif #ifdef HAVE_STRINGS_H # include #endif #ifdef HAVE_INTTYPES_H # include #endif #ifdef HAVE_STDINT_H # include #endif #ifdef HAVE_UNISTD_H # include #endif" ac_header_list= ac_subst_vars='am__EXEEXT_FALSE am__EXEEXT_TRUE LTLIBOBJS LIBOBJS pkgconfigdir WITH_PKG_CONFIG_FALSE WITH_PKG_CONFIG_TRUE LIBIPMICONSOLE_CONFIG_FILE_DEFAULT IPMISELD_CACHE_DIRECTORY IPMISELD_CONFIG_FILE_DEFAULT IPMIDETECTD_CONFIG_FILE_DEFAULT IPMIDETECT_CONFIG_FILE_DEFAULT INTERPRET_SEL_CONFIG_FILE_DEFAULT INTERPRET_SENSOR_CONFIG_FILE_DEFAULT IPMICONSOLE_CONFIG_FILE_LEGACY IPMIPOWER_CONFIG_FILE_LEGACY IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY IPMI_MONITORING_SDR_CACHE_DIR FREEIPMI_CONFIG_FILE_DEFAULT FREEIPMI_SYSCONFDIR PTHREAD_CFLAGS PTHREAD_LIBS PTHREAD_CC WITH_FREEIPMI_ARGP_FALSE WITH_FREEIPMI_ARGP_TRUE ALLOCA GCRYPT_LIBS INSTALL_IPMISDRCACHEDIR HAVE_SYSTEMD_FALSE HAVE_SYSTEMD_TRUE systemdsystemunitdir PKG_CONFIG_LIBDIR PKG_CONFIG_PATH PKG_CONFIG UNINSTALL_DAEMON_SCRIPTS INSTALL_DAEMON_SCRIPTS WITH_DEBUG WITH_GNU_LD_FALSE WITH_GNU_LD_TRUE CPP_FOR_BUILD CPP OTOOL64 OTOOL LIPO NMEDIT DSYMUTIL MANIFEST_TOOL RANLIB ac_ct_AR AR DLLTOOL OBJDUMP LN_S NM ac_ct_DUMPBIN DUMPBIN LD FGREP EGREP GREP SED LIBTOOL am__fastdepCC_FALSE am__fastdepCC_TRUE CCDEPMODE am__nodep AMDEPBACKSLASH AMDEP_FALSE AMDEP_TRUE am__quote am__include DEPDIR OBJEXT EXEEXT ac_ct_CC CPPFLAGS LDFLAGS CFLAGS CC host_os host_vendor host_cpu host build_os build_vendor build_cpu build LIBIPMIDETECT_VERSION_PATCH LIBIPMIDETECT_VERSION_MINOR LIBIPMIDETECT_VERSION_MAJOR LIBIPMIDETECT_VERSION_INFO LIBIPMIMONITORING_VERSION_PATCH LIBIPMIMONITORING_VERSION_MINOR LIBIPMIMONITORING_VERSION_MAJOR LIBIPMIMONITORING_VERSION_INFO LIBIPMICONSOLE_VERSION_PATCH LIBIPMICONSOLE_VERSION_MINOR LIBIPMICONSOLE_VERSION_MAJOR LIBIPMICONSOLE_VERSION_INFO LIBFREEIPMI_VERSION_PATCH LIBFREEIPMI_VERSION_MINOR LIBFREEIPMI_VERSION_MAJOR LIBFREEIPMI_VERSION_INFO LIBFREEIPMI_VERSION ISODATE AM_BACKSLASH AM_DEFAULT_VERBOSITY AM_DEFAULT_V AM_V am__untar am__tar AMTAR am__leading_dot SET_MAKE AWK mkdir_p MKDIR_P INSTALL_STRIP_PROGRAM STRIP install_sh MAKEINFO AUTOHEADER AUTOMAKE AUTOCONF ACLOCAL VERSION PACKAGE CYGPATH_W am__isrc INSTALL_DATA INSTALL_SCRIPT INSTALL_PROGRAM FREEIPMI_PACKAGE_VERSION_PATCH FREEIPMI_PACKAGE_VERSION_MINOR FREEIPMI_PACKAGE_VERSION_MAJOR target_alias host_alias build_alias LIBS ECHO_T ECHO_N ECHO_C DEFS mandir localedir libdir psdir pdfdir dvidir htmldir infodir docdir oldincludedir includedir localstatedir sharedstatedir sysconfdir datadir datarootdir libexecdir sbindir bindir program_transform_name prefix exec_prefix PACKAGE_URL PACKAGE_BUGREPORT PACKAGE_STRING PACKAGE_VERSION PACKAGE_TARNAME PACKAGE_NAME PATH_SEPARATOR SHELL' ac_subst_files='' ac_user_opts=' enable_option_checking enable_silent_rules enable_dependency_tracking enable_shared enable_static with_pic enable_fast_install with_gnu_ld with_sysroot enable_libtool_lock enable_trace enable_profiling enable_debug enable_rawdumps enable_init_scripts with_systemdsystemunitdir enable_ipmisdrcachedir with_encryption with_ipmi_monitoring_sdr_cache_dir with_ipmiseld_cache_dir with_dont_check_for_root with_random_device with_pkgconfig_dir ' ac_precious_vars='build_alias host_alias target_alias CC CFLAGS LDFLAGS LIBS CPPFLAGS CPP PKG_CONFIG PKG_CONFIG_PATH PKG_CONFIG_LIBDIR' # Initialize some variables set by options. ac_init_help= ac_init_version=false ac_unrecognized_opts= ac_unrecognized_sep= # The variables have the same names as the options, with # dashes changed to underlines. cache_file=/dev/null exec_prefix=NONE no_create= no_recursion= prefix=NONE program_prefix=NONE program_suffix=NONE program_transform_name=s,x,x, silent= site= srcdir= verbose= x_includes=NONE x_libraries=NONE # Installation directory options. # These are left unexpanded so users can "make install exec_prefix=/foo" # and all the variables that are supposed to be based on exec_prefix # by default will actually change. # Use braces instead of parens because sh, perl, etc. also accept them. # (The list follows the same order as the GNU Coding Standards.) bindir='${exec_prefix}/bin' sbindir='${exec_prefix}/sbin' libexecdir='${exec_prefix}/libexec' datarootdir='${prefix}/share' datadir='${datarootdir}' sysconfdir='${prefix}/etc' sharedstatedir='${prefix}/com' localstatedir='${prefix}/var' includedir='${prefix}/include' oldincludedir='/usr/include' docdir='${datarootdir}/doc/${PACKAGE_TARNAME}' infodir='${datarootdir}/info' htmldir='${docdir}' dvidir='${docdir}' pdfdir='${docdir}' psdir='${docdir}' libdir='${exec_prefix}/lib' localedir='${datarootdir}/locale' mandir='${datarootdir}/man' ac_prev= ac_dashdash= for ac_option do # If the previous option needs an argument, assign it. if test -n "$ac_prev"; then eval $ac_prev=\$ac_option ac_prev= continue fi case $ac_option in *=?*) ac_optarg=`expr "X$ac_option" : '[^=]*=\(.*\)'` ;; *=) ac_optarg= ;; *) ac_optarg=yes ;; esac # Accept the important Cygnus configure options, so we can diagnose typos. case $ac_dashdash$ac_option in --) ac_dashdash=yes ;; -bindir | --bindir | --bindi | --bind | --bin | --bi) ac_prev=bindir ;; -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*) bindir=$ac_optarg ;; -build | --build | --buil | --bui | --bu) ac_prev=build_alias ;; -build=* | --build=* | --buil=* | --bui=* | --bu=*) build_alias=$ac_optarg ;; -cache-file | --cache-file | --cache-fil | --cache-fi \ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c) ac_prev=cache_file ;; -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*) cache_file=$ac_optarg ;; --config-cache | -C) cache_file=config.cache ;; -datadir | --datadir | --datadi | --datad) ac_prev=datadir ;; -datadir=* | --datadir=* | --datadi=* | --datad=*) datadir=$ac_optarg ;; -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \ | --dataroo | --dataro | --datar) ac_prev=datarootdir ;; -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \ | --dataroot=* | --dataroo=* | --dataro=* | --datar=*) datarootdir=$ac_optarg ;; -disable-* | --disable-*) ac_useropt=`expr "x$ac_option" : 'x-*disable-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--disable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=no ;; -docdir | --docdir | --docdi | --doc | --do) ac_prev=docdir ;; -docdir=* | --docdir=* | --docdi=* | --doc=* | --do=*) docdir=$ac_optarg ;; -dvidir | --dvidir | --dvidi | --dvid | --dvi | --dv) ac_prev=dvidir ;; -dvidir=* | --dvidir=* | --dvidi=* | --dvid=* | --dvi=* | --dv=*) dvidir=$ac_optarg ;; -enable-* | --enable-*) ac_useropt=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid feature name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "enable_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--enable-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval enable_$ac_useropt=\$ac_optarg ;; -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \ | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \ | --exec | --exe | --ex) ac_prev=exec_prefix ;; -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \ | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \ | --exec=* | --exe=* | --ex=*) exec_prefix=$ac_optarg ;; -gas | --gas | --ga | --g) # Obsolete; use --with-gas. with_gas=yes ;; -help | --help | --hel | --he | -h) ac_init_help=long ;; -help=r* | --help=r* | --hel=r* | --he=r* | -hr*) ac_init_help=recursive ;; -help=s* | --help=s* | --hel=s* | --he=s* | -hs*) ac_init_help=short ;; -host | --host | --hos | --ho) ac_prev=host_alias ;; -host=* | --host=* | --hos=* | --ho=*) host_alias=$ac_optarg ;; -htmldir | --htmldir | --htmldi | --htmld | --html | --htm | --ht) ac_prev=htmldir ;; -htmldir=* | --htmldir=* | --htmldi=* | --htmld=* | --html=* | --htm=* \ | --ht=*) htmldir=$ac_optarg ;; -includedir | --includedir | --includedi | --included | --include \ | --includ | --inclu | --incl | --inc) ac_prev=includedir ;; -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \ | --includ=* | --inclu=* | --incl=* | --inc=*) includedir=$ac_optarg ;; -infodir | --infodir | --infodi | --infod | --info | --inf) ac_prev=infodir ;; -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*) infodir=$ac_optarg ;; -libdir | --libdir | --libdi | --libd) ac_prev=libdir ;; -libdir=* | --libdir=* | --libdi=* | --libd=*) libdir=$ac_optarg ;; -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \ | --libexe | --libex | --libe) ac_prev=libexecdir ;; -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \ | --libexe=* | --libex=* | --libe=*) libexecdir=$ac_optarg ;; -localedir | --localedir | --localedi | --localed | --locale) ac_prev=localedir ;; -localedir=* | --localedir=* | --localedi=* | --localed=* | --locale=*) localedir=$ac_optarg ;; -localstatedir | --localstatedir | --localstatedi | --localstated \ | --localstate | --localstat | --localsta | --localst | --locals) ac_prev=localstatedir ;; -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \ | --localstate=* | --localstat=* | --localsta=* | --localst=* | --locals=*) localstatedir=$ac_optarg ;; -mandir | --mandir | --mandi | --mand | --man | --ma | --m) ac_prev=mandir ;; -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*) mandir=$ac_optarg ;; -nfp | --nfp | --nf) # Obsolete; use --without-fp. with_fp=no ;; -no-create | --no-create | --no-creat | --no-crea | --no-cre \ | --no-cr | --no-c | -n) no_create=yes ;; -no-recursion | --no-recursion | --no-recursio | --no-recursi \ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) no_recursion=yes ;; -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \ | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \ | --oldin | --oldi | --old | --ol | --o) ac_prev=oldincludedir ;; -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \ | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \ | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*) oldincludedir=$ac_optarg ;; -prefix | --prefix | --prefi | --pref | --pre | --pr | --p) ac_prev=prefix ;; -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*) prefix=$ac_optarg ;; -program-prefix | --program-prefix | --program-prefi | --program-pref \ | --program-pre | --program-pr | --program-p) ac_prev=program_prefix ;; -program-prefix=* | --program-prefix=* | --program-prefi=* \ | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*) program_prefix=$ac_optarg ;; -program-suffix | --program-suffix | --program-suffi | --program-suff \ | --program-suf | --program-su | --program-s) ac_prev=program_suffix ;; -program-suffix=* | --program-suffix=* | --program-suffi=* \ | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*) program_suffix=$ac_optarg ;; -program-transform-name | --program-transform-name \ | --program-transform-nam | --program-transform-na \ | --program-transform-n | --program-transform- \ | --program-transform | --program-transfor \ | --program-transfo | --program-transf \ | --program-trans | --program-tran \ | --progr-tra | --program-tr | --program-t) ac_prev=program_transform_name ;; -program-transform-name=* | --program-transform-name=* \ | --program-transform-nam=* | --program-transform-na=* \ | --program-transform-n=* | --program-transform-=* \ | --program-transform=* | --program-transfor=* \ | --program-transfo=* | --program-transf=* \ | --program-trans=* | --program-tran=* \ | --progr-tra=* | --program-tr=* | --program-t=*) program_transform_name=$ac_optarg ;; -pdfdir | --pdfdir | --pdfdi | --pdfd | --pdf | --pd) ac_prev=pdfdir ;; -pdfdir=* | --pdfdir=* | --pdfdi=* | --pdfd=* | --pdf=* | --pd=*) pdfdir=$ac_optarg ;; -psdir | --psdir | --psdi | --psd | --ps) ac_prev=psdir ;; -psdir=* | --psdir=* | --psdi=* | --psd=* | --ps=*) psdir=$ac_optarg ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) silent=yes ;; -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb) ac_prev=sbindir ;; -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \ | --sbi=* | --sb=*) sbindir=$ac_optarg ;; -sharedstatedir | --sharedstatedir | --sharedstatedi \ | --sharedstated | --sharedstate | --sharedstat | --sharedsta \ | --sharedst | --shareds | --shared | --share | --shar \ | --sha | --sh) ac_prev=sharedstatedir ;; -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \ | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \ | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \ | --sha=* | --sh=*) sharedstatedir=$ac_optarg ;; -site | --site | --sit) ac_prev=site ;; -site=* | --site=* | --sit=*) site=$ac_optarg ;; -srcdir | --srcdir | --srcdi | --srcd | --src | --sr) ac_prev=srcdir ;; -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*) srcdir=$ac_optarg ;; -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \ | --syscon | --sysco | --sysc | --sys | --sy) ac_prev=sysconfdir ;; -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \ | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*) sysconfdir=$ac_optarg ;; -target | --target | --targe | --targ | --tar | --ta | --t) ac_prev=target_alias ;; -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*) target_alias=$ac_optarg ;; -v | -verbose | --verbose | --verbos | --verbo | --verb) verbose=yes ;; -version | --version | --versio | --versi | --vers | -V) ac_init_version=: ;; -with-* | --with-*) ac_useropt=`expr "x$ac_option" : 'x-*with-\([^=]*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--with-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=\$ac_optarg ;; -without-* | --without-*) ac_useropt=`expr "x$ac_option" : 'x-*without-\(.*\)'` # Reject names that are not valid shell variable names. expr "x$ac_useropt" : ".*[^-+._$as_cr_alnum]" >/dev/null && as_fn_error $? "invalid package name: $ac_useropt" ac_useropt_orig=$ac_useropt ac_useropt=`$as_echo "$ac_useropt" | sed 's/[-+.]/_/g'` case $ac_user_opts in *" "with_$ac_useropt" "*) ;; *) ac_unrecognized_opts="$ac_unrecognized_opts$ac_unrecognized_sep--without-$ac_useropt_orig" ac_unrecognized_sep=', ';; esac eval with_$ac_useropt=no ;; --x) # Obsolete; use --with-x. with_x=yes ;; -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \ | --x-incl | --x-inc | --x-in | --x-i) ac_prev=x_includes ;; -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \ | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*) x_includes=$ac_optarg ;; -x-libraries | --x-libraries | --x-librarie | --x-librari \ | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l) ac_prev=x_libraries ;; -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \ | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*) x_libraries=$ac_optarg ;; -*) as_fn_error $? "unrecognized option: \`$ac_option' Try \`$0 --help' for more information" ;; *=*) ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='` # Reject names that are not valid shell variable names. case $ac_envvar in #( '' | [0-9]* | *[!_$as_cr_alnum]* ) as_fn_error $? "invalid variable name: \`$ac_envvar'" ;; esac eval $ac_envvar=\$ac_optarg export $ac_envvar ;; *) # FIXME: should be removed in autoconf 3.0. $as_echo "$as_me: WARNING: you should use --build, --host, --target" >&2 expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null && $as_echo "$as_me: WARNING: invalid host type: $ac_option" >&2 : "${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}" ;; esac done if test -n "$ac_prev"; then ac_option=--`echo $ac_prev | sed 's/_/-/g'` as_fn_error $? "missing argument to $ac_option" fi if test -n "$ac_unrecognized_opts"; then case $enable_option_checking in no) ;; fatal) as_fn_error $? "unrecognized options: $ac_unrecognized_opts" ;; *) $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2 ;; esac fi # Check all directory arguments for consistency. for ac_var in exec_prefix prefix bindir sbindir libexecdir datarootdir \ datadir sysconfdir sharedstatedir localstatedir includedir \ oldincludedir docdir infodir htmldir dvidir pdfdir psdir \ libdir localedir mandir do eval ac_val=\$$ac_var # Remove trailing slashes. case $ac_val in */ ) ac_val=`expr "X$ac_val" : 'X\(.*[^/]\)' \| "X$ac_val" : 'X\(.*\)'` eval $ac_var=\$ac_val;; esac # Be sure to have absolute directory names. case $ac_val in [\\/$]* | ?:[\\/]* ) continue;; NONE | '' ) case $ac_var in *prefix ) continue;; esac;; esac as_fn_error $? "expected an absolute directory name for --$ac_var: $ac_val" done # There might be people who depend on the old broken behavior: `$host' # used to hold the argument of --host etc. # FIXME: To remove some day. build=$build_alias host=$host_alias target=$target_alias # FIXME: To remove some day. if test "x$host_alias" != x; then if test "x$build_alias" = x; then cross_compiling=maybe elif test "x$build_alias" != "x$host_alias"; then cross_compiling=yes fi fi ac_tool_prefix= test -n "$host_alias" && ac_tool_prefix=$host_alias- test "$silent" = yes && exec 6>/dev/null ac_pwd=`pwd` && test -n "$ac_pwd" && ac_ls_di=`ls -di .` && ac_pwd_ls_di=`cd "$ac_pwd" && ls -di .` || as_fn_error $? "working directory cannot be determined" test "X$ac_ls_di" = "X$ac_pwd_ls_di" || as_fn_error $? "pwd does not report name of working directory" # Find the source files, if location was not specified. if test -z "$srcdir"; then ac_srcdir_defaulted=yes # Try the directory containing this script, then the parent directory. ac_confdir=`$as_dirname -- "$as_myself" || $as_expr X"$as_myself" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_myself" : 'X\(//\)[^/]' \| \ X"$as_myself" : 'X\(//\)$' \| \ X"$as_myself" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_myself" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` srcdir=$ac_confdir if test ! -r "$srcdir/$ac_unique_file"; then srcdir=.. fi else ac_srcdir_defaulted=no fi if test ! -r "$srcdir/$ac_unique_file"; then test "$ac_srcdir_defaulted" = yes && srcdir="$ac_confdir or .." as_fn_error $? "cannot find sources ($ac_unique_file) in $srcdir" fi ac_msg="sources are in $srcdir, but \`cd $srcdir' does not work" ac_abs_confdir=`( cd "$srcdir" && test -r "./$ac_unique_file" || as_fn_error $? "$ac_msg" pwd)` # When building in place, set srcdir=. if test "$ac_abs_confdir" = "$ac_pwd"; then srcdir=. fi # Remove unnecessary trailing slashes from srcdir. # Double slashes in file names in object file debugging info # mess up M-x gdb in Emacs. case $srcdir in */) srcdir=`expr "X$srcdir" : 'X\(.*[^/]\)' \| "X$srcdir" : 'X\(.*\)'`;; esac for ac_var in $ac_precious_vars; do eval ac_env_${ac_var}_set=\${${ac_var}+set} eval ac_env_${ac_var}_value=\$${ac_var} eval ac_cv_env_${ac_var}_set=\${${ac_var}+set} eval ac_cv_env_${ac_var}_value=\$${ac_var} done # # Report the --help message. # if test "$ac_init_help" = "long"; then # 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 freeipmi 1.6.4 to adapt to many kinds of systems. Usage: $0 [OPTION]... [VAR=VALUE]... To assign environment variables (e.g., CC, CFLAGS...), specify them as VAR=VALUE. See below for descriptions of some of the useful variables. Defaults for the options are specified in brackets. Configuration: -h, --help display this help and exit --help=short display options specific to this package --help=recursive display the short help of all the included packages -V, --version display version information and exit -q, --quiet, --silent do not print \`checking ...' messages --cache-file=FILE cache test results in FILE [disabled] -C, --config-cache alias for \`--cache-file=config.cache' -n, --no-create do not create output files --srcdir=DIR find the sources in DIR [configure dir or \`..'] Installation directories: --prefix=PREFIX install architecture-independent files in PREFIX [$ac_default_prefix] --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX [PREFIX] By default, \`make install' will install all the files in \`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify an installation prefix other than \`$ac_default_prefix' using \`--prefix', for instance \`--prefix=\$HOME'. For better control, use the options below. Fine tuning of the installation directories: --bindir=DIR user executables [EPREFIX/bin] --sbindir=DIR system admin executables [EPREFIX/sbin] --libexecdir=DIR program executables [EPREFIX/libexec] --sysconfdir=DIR read-only single-machine data [PREFIX/etc] --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com] --localstatedir=DIR modifiable single-machine data [PREFIX/var] --libdir=DIR object code libraries [EPREFIX/lib] --includedir=DIR C header files [PREFIX/include] --oldincludedir=DIR C header files for non-gcc [/usr/include] --datarootdir=DIR read-only arch.-independent data root [PREFIX/share] --datadir=DIR read-only architecture-independent data [DATAROOTDIR] --infodir=DIR info documentation [DATAROOTDIR/info] --localedir=DIR locale-dependent data [DATAROOTDIR/locale] --mandir=DIR man documentation [DATAROOTDIR/man] --docdir=DIR documentation root [DATAROOTDIR/doc/freeipmi] --htmldir=DIR html documentation [DOCDIR] --dvidir=DIR dvi documentation [DOCDIR] --pdfdir=DIR pdf documentation [DOCDIR] --psdir=DIR ps documentation [DOCDIR] _ACEOF cat <<\_ACEOF Program names: --program-prefix=PREFIX prepend PREFIX to installed program names --program-suffix=SUFFIX append SUFFIX to installed program names --program-transform-name=PROGRAM run sed PROGRAM on installed program names System types: --build=BUILD configure for building on BUILD [guessed] --host=HOST cross-compile to build programs to run on HOST [BUILD] _ACEOF fi if test -n "$ac_init_help"; then case $ac_init_help in short | recursive ) echo "Configuration of freeipmi 1.6.4:";; esac cat <<\_ACEOF Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --enable-silent-rules less verbose build output (undo: "make V=1") --disable-silent-rules verbose build output (undo: "make V=0") --enable-dependency-tracking do not reject slow dependency extractors --disable-dependency-tracking speeds up one-time build --enable-shared[=PKGS] build shared libraries [default=yes] --enable-static[=PKGS] build static libraries [default=yes] --enable-fast-install[=PKGS] optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-trace turn on error tracing --enable-profiling turn on profiling --enable-debug turn on debugging --enable-rawdumps output raw packet dumps when debugging --disable-init-scripts don\'t install init.d startup scripts --disable-ipmisdrcachedir don\'t create ipmi sdr cache directory Optional Packages: --with-PACKAGE[=ARG] use PACKAGE [ARG=yes] --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no) --with-pic[=PKGS] try to use only PIC/non-PIC objects [default=use both] --with-gnu-ld assume the C compiler uses GNU ld [default=no] --with-sysroot=DIR Search for dependent libraries within DIR (or the compiler's sysroot if not specified). --with-systemdsystemunitdir=DIR Directory for systemd service files --without-encryption don\'t support encryption --with-ipmi-monitoring-sdr-cache-dir=PATH Specify default ipmi_monitoring sdr cache dir path --with-ipmiseld-cache-dir=PATH Specify default ipmiseld cache dir path --with-dont-check-for-root don't check for root before executing in-band IPMI communication --without-random-device don't support random devices like /dev/urandom --with-pkgconfig-dir=PATH where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig) Some influential environment variables: CC C compiler command CFLAGS C compiler flags LDFLAGS linker flags, e.g. -L if you have libraries in a nonstandard directory LIBS libraries to pass to the linker, e.g. -l CPPFLAGS (Objective) C/C++ preprocessor flags, e.g. -I if you have headers in a nonstandard directory CPP C preprocessor PKG_CONFIG path to pkg-config utility PKG_CONFIG_PATH directories to add to pkg-config's search path PKG_CONFIG_LIBDIR path overriding pkg-config's built-in search path Use these variables to override the choices made by `configure' or to help it to find libraries and programs with nonstandard names/locations. Report bugs to . _ACEOF ac_status=$? fi if test "$ac_init_help" = "recursive"; then # If there are subdirs, report their specific --help. for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue test -d "$ac_dir" || { cd "$srcdir" && ac_pwd=`pwd` && srcdir=. && test -d "$ac_dir"; } || continue ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix cd "$ac_dir" || { ac_status=$?; continue; } # Check for guested configure. if test -f "$ac_srcdir/configure.gnu"; then echo && $SHELL "$ac_srcdir/configure.gnu" --help=recursive elif test -f "$ac_srcdir/configure"; then echo && $SHELL "$ac_srcdir/configure" --help=recursive else $as_echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 fi || ac_status=$? cd "$ac_pwd" || { ac_status=$?; break; } done fi test -n "$ac_init_help" && exit $ac_status if $ac_init_version; then cat <<\_ACEOF freeipmi configure 1.6.4 generated by GNU Autoconf 2.69 Copyright (C) 2012 Free Software Foundation, Inc. This configure script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it. _ACEOF exit fi ## ------------------------ ## ## Autoconf initialization. ## ## ------------------------ ## # ac_fn_c_try_compile LINENO # -------------------------- # Try to compile conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest.$ac_objext; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_compile # ac_fn_c_try_link LINENO # ----------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_link () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack rm -f conftest.$ac_objext conftest$ac_exeext if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { test -z "$ac_c_werror_flag" || test ! -s conftest.err } && test -s conftest$ac_exeext && { test "$cross_compiling" = yes || test -x conftest$ac_exeext }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi # Delete the IPA/IPO (Inter Procedural Analysis/Optimization) information # created by the PGI compiler (conftest_ipa8_conftest.oo), as it would # interfere with the next link command; also delete a directory that is # left behind by Apple's compiler. We do this before executing the actions. rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_link # ac_fn_c_check_header_compile LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists and can be compiled using the include files in # INCLUDES, setting the cache variable VAR accordingly. ac_fn_c_check_header_compile () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_compile # ac_fn_c_try_cpp LINENO # ---------------------- # Try to preprocess conftest.$ac_ext, and return whether this succeeded. ac_fn_c_try_cpp () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_cpp conftest.$ac_ext" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_cpp conftest.$ac_ext") 2>conftest.err ac_status=$? if test -s conftest.err; then grep -v '^ *+' conftest.err >conftest.er1 cat conftest.er1 >&5 mv -f conftest.er1 conftest.err fi $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } > conftest.i && { test -z "$ac_c_preproc_warn_flag$ac_c_werror_flag" || test ! -s conftest.err }; then : ac_retval=0 else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=1 fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_cpp # ac_fn_c_try_run LINENO # ---------------------- # Try to link conftest.$ac_ext, and return whether this succeeded. Assumes # that executables *can* be run. ac_fn_c_try_run () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && { ac_try='./conftest$ac_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then : ac_retval=0 else $as_echo "$as_me: program exited with status $ac_status" >&5 $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 ac_retval=$ac_status fi rm -rf conftest.dSYM conftest_ipa8_conftest.oo eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno as_fn_set_status $ac_retval } # ac_fn_c_try_run # ac_fn_c_check_func LINENO FUNC VAR # ---------------------------------- # Tests whether FUNC exists, setting the cache variable VAR accordingly ac_fn_c_check_func () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Define $2 to an innocuous variant, in case declares $2. For example, HP-UX 11i declares gettimeofday. */ #define $2 innocuous_$2 /* System header to define __stub macros and hopefully few prototypes, which can conflict with char $2 (); below. Prefer to if __STDC__ is defined, since exists even on freestanding compilers. */ #ifdef __STDC__ # include #else # include #endif #undef $2 /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char $2 (); /* The GNU C library defines this for functions which it implements to always fail with ENOSYS. Some functions are actually named something starting with __ and the normal name is an alias. */ #if defined __stub_$2 || defined __stub___$2 choke me #endif int main () { return $2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_func # ac_fn_c_check_header_mongrel LINENO HEADER VAR INCLUDES # ------------------------------------------------------- # Tests whether HEADER exists, giving a warning if it cannot be compiled using # the include files in INCLUDES and setting the cache variable VAR # accordingly. ac_fn_c_check_header_mongrel () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack if eval \${$3+:} false; then : { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } else # Is the header compilable? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 usability" >&5 $as_echo_n "checking $2 usability... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 #include <$2> _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_header_compiler=yes else ac_header_compiler=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_compiler" >&5 $as_echo "$ac_header_compiler" >&6; } # Is the header present? { $as_echo "$as_me:${as_lineno-$LINENO}: checking $2 presence" >&5 $as_echo_n "checking $2 presence... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include <$2> _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : ac_header_preproc=yes else ac_header_preproc=no fi rm -f conftest.err conftest.i conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_header_preproc" >&5 $as_echo "$ac_header_preproc" >&6; } # So? What about this header? case $ac_header_compiler:$ac_header_preproc:$ac_c_preproc_warn_flag in #(( yes:no: ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&5 $as_echo "$as_me: WARNING: $2: accepted by the compiler, rejected by the preprocessor!" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ;; no:yes:* ) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: present but cannot be compiled" >&5 $as_echo "$as_me: WARNING: $2: present but cannot be compiled" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: check for missing prerequisite headers?" >&5 $as_echo "$as_me: WARNING: $2: check for missing prerequisite headers?" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: see the Autoconf documentation" >&5 $as_echo "$as_me: WARNING: $2: see the Autoconf documentation" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&5 $as_echo "$as_me: WARNING: $2: section \"Present But Cannot Be Compiled\"" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $2: proceeding with the compiler's result" >&5 $as_echo "$as_me: WARNING: $2: proceeding with the compiler's result" >&2;} ( $as_echo "## ------------------------------------- ## ## Report this to freeipmi-devel@gnu.org ## ## ------------------------------------- ##" ) | sed "s/^/$as_me: WARNING: /" >&2 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=\$ac_header_compiler" fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } fi eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_header_mongrel # ac_fn_c_check_decl LINENO SYMBOL VAR INCLUDES # --------------------------------------------- # Tests whether SYMBOL is declared in INCLUDES, setting cache variable VAR # accordingly. ac_fn_c_check_decl () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack as_decl_name=`echo $2|sed 's/ *(.*//'` as_decl_use=`echo $2|sed -e 's/(/((/' -e 's/)/) 0&/' -e 's/,/) 0& (/g'` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $as_decl_name is declared" >&5 $as_echo_n "checking whether $as_decl_name is declared... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { #ifndef $as_decl_name #ifdef __cplusplus (void) $as_decl_use; #else (void) $as_decl_name; #endif #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : eval "$3=yes" else eval "$3=no" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_decl # ac_fn_c_check_type LINENO TYPE VAR INCLUDES # ------------------------------------------- # Tests whether TYPE exists after having included INCLUDES, setting cache # variable VAR accordingly. ac_fn_c_check_type () { as_lineno=${as_lineno-"$1"} as_lineno_stack=as_lineno_stack=$as_lineno_stack { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $2" >&5 $as_echo_n "checking for $2... " >&6; } if eval \${$3+:} false; then : $as_echo_n "(cached) " >&6 else eval "$3=no" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof ($2)) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $4 int main () { if (sizeof (($2))) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else eval "$3=yes" fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi eval ac_res=\$$3 { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5 $as_echo "$ac_res" >&6; } eval $as_lineno_stack; ${as_lineno_stack:+:} unset as_lineno } # ac_fn_c_check_type cat >config.log <<_ACEOF This file contains any messages produced by compilers while running configure, to aid debugging if configure makes a mistake. It was created by freeipmi $as_me 1.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was $ $0 $@ _ACEOF exec 5>>config.log { cat <<_ASUNAME ## --------- ## ## Platform. ## ## --------- ## hostname = `(hostname || uname -n) 2>/dev/null | sed 1q` uname -m = `(uname -m) 2>/dev/null || echo unknown` uname -r = `(uname -r) 2>/dev/null || echo unknown` uname -s = `(uname -s) 2>/dev/null || echo unknown` uname -v = `(uname -v) 2>/dev/null || echo unknown` /usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown` /bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown` /bin/arch = `(/bin/arch) 2>/dev/null || echo unknown` /usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown` /usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown` /usr/bin/hostinfo = `(/usr/bin/hostinfo) 2>/dev/null || echo unknown` /bin/machine = `(/bin/machine) 2>/dev/null || echo unknown` /usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown` /bin/universe = `(/bin/universe) 2>/dev/null || echo unknown` _ASUNAME as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. $as_echo "PATH: $as_dir" done IFS=$as_save_IFS } >&5 cat >&5 <<_ACEOF ## ----------- ## ## Core tests. ## ## ----------- ## _ACEOF # Keep a trace of the command line. # Strip out --no-create and --no-recursion so they do not pile up. # Strip out --silent because we don't want to record it for future runs. # Also quote any args containing shell meta-characters. # Make two passes to allow for proper duplicate-argument suppression. ac_configure_args= ac_configure_args0= ac_configure_args1= ac_must_keep_next=false for ac_pass in 1 2 do for ac_arg do case $ac_arg in -no-create | --no-c* | -n | -no-recursion | --no-r*) continue ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil) continue ;; *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;; esac case $ac_pass in 1) as_fn_append ac_configure_args0 " '$ac_arg'" ;; 2) as_fn_append ac_configure_args1 " '$ac_arg'" if test $ac_must_keep_next = true; then ac_must_keep_next=false # Got value, back to normal. else case $ac_arg in *=* | --config-cache | -C | -disable-* | --disable-* \ | -enable-* | --enable-* | -gas | --g* | -nfp | --nf* \ | -q | -quiet | --q* | -silent | --sil* | -v | -verb* \ | -with-* | --with-* | -without-* | --without-* | --x) case "$ac_configure_args0 " in "$ac_configure_args1"*" '$ac_arg' "* ) continue ;; esac ;; -* ) ac_must_keep_next=true ;; esac fi as_fn_append ac_configure_args " '$ac_arg'" ;; esac done done { ac_configure_args0=; unset ac_configure_args0;} { ac_configure_args1=; unset ac_configure_args1;} # When interrupted or exit'd, cleanup temporary files, and complete # config.log. We remove comments because anyway the quotes in there # would cause problems or look ugly. # WARNING: Use '\'' to represent an apostrophe within the trap. # WARNING: Do not start the trap code with a newline, due to a FreeBSD 4.0 bug. trap 'exit_status=$? # Save into config.log some information that might help in debugging. { echo $as_echo "## ---------------- ## ## Cache variables. ## ## ---------------- ##" echo # The following way of writing the cache mishandles newlines in values, ( for ac_var in `(set) 2>&1 | sed -n '\''s/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'\''`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space='\'' '\''; set) 2>&1` in #( *${as_nl}ac_space=\ *) sed -n \ "s/'\''/'\''\\\\'\'''\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\''\\2'\''/p" ;; #( *) sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) echo $as_echo "## ----------------- ## ## Output variables. ## ## ----------------- ##" echo for ac_var in $ac_subst_vars do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo if test -n "$ac_subst_files"; then $as_echo "## ------------------- ## ## File substitutions. ## ## ------------------- ##" echo for ac_var in $ac_subst_files do eval ac_val=\$$ac_var case $ac_val in *\'\''*) ac_val=`$as_echo "$ac_val" | sed "s/'\''/'\''\\\\\\\\'\'''\''/g"`;; esac $as_echo "$ac_var='\''$ac_val'\''" done | sort echo fi if test -s confdefs.h; then $as_echo "## ----------- ## ## confdefs.h. ## ## ----------- ##" echo cat confdefs.h echo fi test "$ac_signal" != 0 && $as_echo "$as_me: caught signal $ac_signal" $as_echo "$as_me: exit $exit_status" } >&5 rm -f core *.core core.conftest.* && rm -f -r conftest* confdefs* conf$$* $ac_clean_files && exit $exit_status ' 0 for ac_signal in 1 2 13 15; do trap 'ac_signal='$ac_signal'; as_fn_exit 1' $ac_signal done ac_signal=0 # confdefs.h avoids OS command line length limits that DEFS can exceed. rm -f -r conftest* confdefs.h $as_echo "/* confdefs.h */" > confdefs.h # Predefined preprocessor variables. cat >>confdefs.h <<_ACEOF #define PACKAGE_NAME "$PACKAGE_NAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_TARNAME "$PACKAGE_TARNAME" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_VERSION "$PACKAGE_VERSION" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_STRING "$PACKAGE_STRING" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT" _ACEOF cat >>confdefs.h <<_ACEOF #define PACKAGE_URL "$PACKAGE_URL" _ACEOF # Let the site file select an alternate cache file if it wants to. # Prefer an explicitly selected file to automatically selected ones. ac_site_file1=NONE ac_site_file2=NONE if test -n "$CONFIG_SITE"; then # We do not want a PATH search for config.site. case $CONFIG_SITE in #(( -*) ac_site_file1=./$CONFIG_SITE;; */*) ac_site_file1=$CONFIG_SITE;; *) ac_site_file1=./$CONFIG_SITE;; esac elif test "x$prefix" != xNONE; then ac_site_file1=$prefix/share/config.site ac_site_file2=$prefix/etc/config.site else ac_site_file1=$ac_default_prefix/share/config.site ac_site_file2=$ac_default_prefix/etc/config.site fi for ac_site_file in "$ac_site_file1" "$ac_site_file2" do test "x$ac_site_file" = xNONE && continue if test /dev/null != "$ac_site_file" && test -r "$ac_site_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading site script $ac_site_file" >&5 $as_echo "$as_me: loading site script $ac_site_file" >&6;} sed 's/^/| /' "$ac_site_file" >&5 . "$ac_site_file" \ || { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "failed to load site script $ac_site_file See \`config.log' for more details" "$LINENO" 5; } fi done if test -r "$cache_file"; then # Some versions of bash will fail to source /dev/null (special files # actually), so we avoid doing that. DJGPP emulates it as a regular file. if test /dev/null != "$cache_file" && test -f "$cache_file"; then { $as_echo "$as_me:${as_lineno-$LINENO}: loading cache $cache_file" >&5 $as_echo "$as_me: loading cache $cache_file" >&6;} case $cache_file in [\\/]* | ?:[\\/]* ) . "$cache_file";; *) . "./$cache_file";; esac fi else { $as_echo "$as_me:${as_lineno-$LINENO}: creating cache $cache_file" >&5 $as_echo "$as_me: creating cache $cache_file" >&6;} >$cache_file fi as_fn_append ac_header_list " stdlib.h" as_fn_append ac_header_list " unistd.h" as_fn_append ac_header_list " sys/param.h" # Check that the precious variables saved in the cache have kept the same # value. ac_cache_corrupted=false for ac_var in $ac_precious_vars; do eval ac_old_set=\$ac_cv_env_${ac_var}_set eval ac_new_set=\$ac_env_${ac_var}_set eval ac_old_val=\$ac_cv_env_${ac_var}_value eval ac_new_val=\$ac_env_${ac_var}_value case $ac_old_set,$ac_new_set in set,) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;} ac_cache_corrupted=: ;; ,set) { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' was not set in the previous run" >&5 $as_echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;} ac_cache_corrupted=: ;; ,);; *) if test "x$ac_old_val" != "x$ac_new_val"; then # differences in whitespace do not lead to failure. ac_old_val_w=`echo x $ac_old_val` ac_new_val_w=`echo x $ac_new_val` if test "$ac_old_val_w" != "$ac_new_val_w"; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: \`$ac_var' has changed since the previous run:" >&5 $as_echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;} ac_cache_corrupted=: else { $as_echo "$as_me:${as_lineno-$LINENO}: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&5 $as_echo "$as_me: warning: ignoring whitespace changes in \`$ac_var' since the previous run:" >&2;} eval $ac_var=\$ac_old_val fi { $as_echo "$as_me:${as_lineno-$LINENO}: former value: \`$ac_old_val'" >&5 $as_echo "$as_me: former value: \`$ac_old_val'" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: current value: \`$ac_new_val'" >&5 $as_echo "$as_me: current value: \`$ac_new_val'" >&2;} fi;; esac # Pass precious variables to config.status. if test "$ac_new_set" = set; then case $ac_new_val in *\'*) ac_arg=$ac_var=`$as_echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;; *) ac_arg=$ac_var=$ac_new_val ;; esac case " $ac_configure_args " in *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy. *) as_fn_append ac_configure_args " '$ac_arg'" ;; esac fi done if $ac_cache_corrupted; then { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} { $as_echo "$as_me:${as_lineno-$LINENO}: error: changes in the environment can compromise the build" >&5 $as_echo "$as_me: error: changes in the environment can compromise the build" >&2;} as_fn_error $? "run \`make distclean' and/or \`rm $cache_file' and start over" "$LINENO" 5 fi ## -------------------- ## ## Main body of script. ## ## -------------------- ## ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu FREEIPMI_PACKAGE_VERSION_MAJOR=1 FREEIPMI_PACKAGE_VERSION_MINOR=6 FREEIPMI_PACKAGE_VERSION_PATCH=4 ac_aux_dir= for ac_dir in config "$srcdir"/config; do if test -f "$ac_dir/install-sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install-sh -c" break elif test -f "$ac_dir/install.sh"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/install.sh -c" break elif test -f "$ac_dir/shtool"; then ac_aux_dir=$ac_dir ac_install_sh="$ac_aux_dir/shtool install -c" break fi done if test -z "$ac_aux_dir"; then as_fn_error $? "cannot find install-sh, install.sh, or shtool in config \"$srcdir\"/config" "$LINENO" 5 fi # These three variables are undocumented and unsupported, # and are intended to be withdrawn in a future Autoconf release. # They can cause serious problems if a builder's source tree is in a directory # whose full name contains unusual characters. ac_config_guess="$SHELL $ac_aux_dir/config.guess" # Please don't use this var. ac_config_sub="$SHELL $ac_aux_dir/config.sub" # Please don't use this var. ac_configure="$SHELL $ac_aux_dir/configure" # Please don't use this var. am__api_version='1.13' # Find a good install program. We prefer a C program (faster), # so one script is as good as another. But avoid the broken or # incompatible versions: # SysV /etc/install, /usr/sbin/install # SunOS /usr/etc/install # IRIX /sbin/install # AIX /bin/install # AmigaOS /C/install, which installs bootblocks on floppy discs # AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag # AFS /usr/afsws/bin/install, which mishandles nonexistent args # SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff" # OS/2's system install, which has a completely different semantic # ./install, which can be erroneously created by make from ./install.sh. # Reject install programs that cannot install multiple files. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a BSD-compatible install" >&5 $as_echo_n "checking for a BSD-compatible install... " >&6; } if test -z "$INSTALL"; then if ${ac_cv_path_install+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. # Account for people who put trailing slashes in PATH elements. case $as_dir/ in #(( ./ | .// | /[cC]/* | \ /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* | \ ?:[\\/]os2[\\/]install[\\/]* | ?:[\\/]OS2[\\/]INSTALL[\\/]* | \ /usr/ucb/* ) ;; *) # OSF1 and SCO ODT 3.0 have their own names for install. # Don't use installbsd from OSF since it installs stuff as root # by default. for ac_prog in ginstall scoinst install; do for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext"; then if test $ac_prog = install && grep dspmsg "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # AIX install. It has an incompatible calling convention. : elif test $ac_prog = install && grep pwplus "$as_dir/$ac_prog$ac_exec_ext" >/dev/null 2>&1; then # program-specific install script used by HP pwplus--don't use. : else rm -rf conftest.one conftest.two conftest.dir echo one > conftest.one echo two > conftest.two mkdir conftest.dir if "$as_dir/$ac_prog$ac_exec_ext" -c conftest.one conftest.two "`pwd`/conftest.dir" && test -s conftest.one && test -s conftest.two && test -s conftest.dir/conftest.one && test -s conftest.dir/conftest.two then ac_cv_path_install="$as_dir/$ac_prog$ac_exec_ext -c" break 3 fi fi fi done done ;; esac done IFS=$as_save_IFS rm -rf conftest.one conftest.two conftest.dir fi if test "${ac_cv_path_install+set}" = set; then INSTALL=$ac_cv_path_install else # As a last resort, use the slow shell script. Don't cache a # value for INSTALL within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. INSTALL=$ac_install_sh fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $INSTALL" >&5 $as_echo "$INSTALL" >&6; } # Use test -z because SunOS4 sh mishandles braces in ${var-val}. # It thinks the first close brace ends the variable substitution. test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}' test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}' test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether build environment is sane" >&5 $as_echo_n "checking whether build environment is sane... " >&6; } # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[\\\"\#\$\&\'\`$am_lf]*) as_fn_error $? "unsafe absolute working directory name" "$LINENO" 5;; esac case $srcdir in *[\\\"\#\$\&\'\`$am_lf\ \ ]*) as_fn_error $? "unsafe srcdir value: '$srcdir'" "$LINENO" 5;; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$*" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$*" != "X $srcdir/configure conftest.file" \ && test "$*" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". as_fn_error $? "ls -t appears to fail. Make sure there is not a broken alias in your environment" "$LINENO" 5 fi if test "$2" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$2" = conftest.file ) then # Ok. : else as_fn_error $? "newly created file is older than distributed files! Check your system clock" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi rm -f conftest.file test "$program_prefix" != NONE && program_transform_name="s&^&$program_prefix&;$program_transform_name" # Use a double $ so make ignores it. test "$program_suffix" != NONE && program_transform_name="s&\$&$program_suffix&;$program_transform_name" # Double any \ or $. # By default was `s,x,x', remove it if useless. ac_script='s/[\\$]/&&/g;s/;s,x,x,$//' program_transform_name=`$as_echo "$program_transform_name" | sed "$ac_script"` # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: 'missing' script is too old or missing" >&5 $as_echo "$as_me: WARNING: 'missing' script is too old or missing" >&2;} fi if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. if test "$cross_compiling" != no; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a thread-safe mkdir -p" >&5 $as_echo_n "checking for a thread-safe mkdir -p... " >&6; } if test -z "$MKDIR_P"; then if ${ac_cv_path_mkdir+:} false; then : $as_echo_n "(cached) " >&6 else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/opt/sfw/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in mkdir gmkdir; do for ac_exec_ext in '' $ac_executable_extensions; do as_fn_executable_p "$as_dir/$ac_prog$ac_exec_ext" || continue case `"$as_dir/$ac_prog$ac_exec_ext" --version 2>&1` in #( 'mkdir (GNU coreutils) '* | \ 'mkdir (coreutils) '* | \ 'mkdir (fileutils) '4.1*) ac_cv_path_mkdir=$as_dir/$ac_prog$ac_exec_ext break 3;; esac done done done IFS=$as_save_IFS fi test -d ./--version && rmdir ./--version if test "${ac_cv_path_mkdir+set}" = set; then MKDIR_P="$ac_cv_path_mkdir -p" else # As a last resort, use the slow shell script. Don't cache a # value for MKDIR_P within a source directory, because that will # break other packages using the cache if that directory is # removed, or if the value is a relative name. MKDIR_P="$ac_install_sh -d" fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MKDIR_P" >&5 $as_echo "$MKDIR_P" >&6; } for ac_prog in gawk mawk nawk awk do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AWK+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AWK"; then ac_cv_prog_AWK="$AWK" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AWK="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AWK=$ac_cv_prog_AWK if test -n "$AWK"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AWK" >&5 $as_echo "$AWK" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AWK" && break done { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null # Check whether --enable-silent-rules was given. if test "${enable_silent_rules+set}" = set; then : enableval=$enable_silent_rules; fi case $enable_silent_rules in # ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=1;; esac am_make=${MAKE-make} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $am_make supports nested variables" >&5 $as_echo_n "checking whether $am_make supports nested variables... " >&6; } if ${am_cv_make_support_nested_variables+:} false; then : $as_echo_n "(cached) " >&6 else if $as_echo 'TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit' | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_make_support_nested_variables" >&5 $as_echo "$am_cv_make_support_nested_variables" >&6; } if test $am_cv_make_support_nested_variables = yes; then AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AM_BACKSLASH='\' if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." am__isrc=' -I$(srcdir)' # test to see if srcdir already configured if test -f $srcdir/config.status; then as_fn_error $? "source directory already configured; run \"make distclean\" there first" "$LINENO" 5 fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi # Define the identity of the package. PACKAGE='freeipmi' VERSION='1.6.4' cat >>confdefs.h <<_ACEOF #define PACKAGE "$PACKAGE" _ACEOF cat >>confdefs.h <<_ACEOF #define VERSION "$VERSION" _ACEOF # Some tools Automake needs. ACLOCAL=${ACLOCAL-"${am_missing_run}aclocal-${am__api_version}"} AUTOCONF=${AUTOCONF-"${am_missing_run}autoconf"} AUTOMAKE=${AUTOMAKE-"${am_missing_run}automake-${am__api_version}"} AUTOHEADER=${AUTOHEADER-"${am_missing_run}autoheader"} MAKEINFO=${MAKEINFO-"${am_missing_run}makeinfo"} # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # mkdir_p='$(MKDIR_P)' # We need awk for the "check" target. The system "awk" is bad on # some platforms. # Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AMTAR='$${TAR-tar}' # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar plaintar pax cpio none' # The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether UID '$am_uid' is supported by ustar format" >&5 $as_echo_n "checking whether UID '$am_uid' is supported by ustar format... " >&6; } if test $am_uid -le $am_max_uid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether GID '$am_gid' is supported by ustar format" >&5 $as_echo_n "checking whether GID '$am_gid' is supported by ustar format... " >&6; } if test $am_gid -le $am_max_gid; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } _am_tools=none fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to create a ustar tar archive" >&5 $as_echo_n "checking how to create a ustar tar archive... " >&6; } # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_ustar-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do { echo "$as_me:$LINENO: $_am_tar --version" >&5 ($_am_tar --version) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } && break done am__tar="$_am_tar --format=ustar -chf - "'"$$tardir"' am__tar_="$_am_tar --format=ustar -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x ustar -w "$$tardir"' am__tar_='pax -L -x ustar -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H ustar -L' am__tar_='find "$tardir" -print | cpio -o -H ustar -L' am__untar='cpio -i -H ustar -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_ustar}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file { echo "$as_me:$LINENO: tardir=conftest.dir && eval $am__tar_ >conftest.tar" >&5 (tardir=conftest.dir && eval $am__tar_ >conftest.tar) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } rm -rf conftest.dir if test -s conftest.tar; then { echo "$as_me:$LINENO: $am__untar &5 ($am__untar &5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } { echo "$as_me:$LINENO: cat conftest.dir/file" >&5 (cat conftest.dir/file) >&5 2>&5 ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&5 (exit $ac_status); } grep GrepMe conftest.dir/file >/dev/null 2>&1 && break fi done rm -rf conftest.dir if ${am_cv_prog_tar_ustar+:} false; then : $as_echo_n "(cached) " >&6 else am_cv_prog_tar_ustar=$_am_tool fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_prog_tar_ustar" >&5 $as_echo "$am_cv_prog_tar_ustar" >&6; } ac_config_headers="$ac_config_headers config/config.h" ac_config_files="$ac_config_files freeipmi.spec Makefile bmc-device/Makefile bmc-info/Makefile bmc-watchdog/Makefile common/Makefile common/debugutil/Makefile common/miscutil/Makefile common/parsecommon/Makefile common/pingtool/Makefile common/portability/Makefile common/toolcommon/Makefile contrib/Makefile doc/Makefile etc/Makefile ipmi-chassis/Makefile ipmi-config/Makefile ipmi-dcmi/Makefile ipmi-fru/Makefile ipmi-locate/Makefile ipmi-oem/Makefile ipmi-pet/Makefile ipmi-raw/Makefile ipmi-sel/Makefile ipmi-sensors/Makefile ipmiconsole/Makefile ipmidetect/Makefile ipmidetectd/Makefile ipmiping/Makefile ipmipower/Makefile ipmiseld/Makefile libfreeipmi/Makefile libfreeipmi/libfreeipmi.pc libfreeipmi/include/Makefile libfreeipmi/include/freeipmi/freeipmi.h libipmiconsole/Makefile libipmiconsole/ipmiconsole.h libipmiconsole/libipmiconsole.pc libipmidetect/Makefile libipmidetect/ipmidetect.h libipmidetect/libipmidetect.pc libipmimonitoring/Makefile libipmimonitoring/ipmi_monitoring.h libipmimonitoring/libipmimonitoring.pc man/Makefile man/bmc-device.8.pre man/bmc-info.8.pre man/bmc-watchdog.8.pre man/freeipmi.conf.5.pre man/freeipmi.7.pre man/ipmi-chassis.8.pre man/ipmi-config.8.pre man/ipmi-config.conf.5.pre man/ipmi-dcmi.8.pre man/ipmi-fru.8.pre man/ipmi-locate.8.pre man/ipmi-oem.8.pre man/ipmi-pet.8.pre man/ipmi-raw.8.pre man/ipmi-sel.8.pre man/ipmi-sensors.8.pre man/ipmiconsole.8.pre man/ipmidetect.8.pre man/ipmidetect.conf.5.pre man/ipmidetectd.8.pre man/ipmidetectd.conf.5.pre man/ipmiping.8.pre man/ipmipower.8.pre man/ipmiseld.8.pre man/ipmiseld.conf.5.pre man/libfreeipmi.3.pre man/freeipmi_interpret_sensor.conf.5.pre man/freeipmi_interpret_sel.conf.5.pre man/libipmiconsole.3.pre man/libipmiconsole.conf.5.pre man/libipmidetect.3.pre man/libipmimonitoring.3.pre man/rmcpping.8.pre rmcpping/Makefile" ISODATE=`date -u -r ChangeLog +%Y-%m-%d` # libfreeipmi libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBFREEIPMI_CURRENT=19 LIBFREEIPMI_REVISION=3 LIBFREEIPMI_AGE=2 LIBFREEIPMI_VERSION=$LIBFREEIPMI_CURRENT.$LIBFREEIPMI_REVISION.$LIBFREEIPMI_AGE LIBFREEIPMI_VERSION_INFO=$LIBFREEIPMI_CURRENT:$LIBFREEIPMI_REVISION:$LIBFREEIPMI_AGE # libfreeipmi versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. LIBFREEIPMI_VERSION_MAJOR=6 LIBFREEIPMI_VERSION_MINOR=2 LIBFREEIPMI_VERSION_PATCH=3 # libipmiconsole libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMICONSOLE_CURRENT=5 LIBIPMICONSOLE_REVISION=5 LIBIPMICONSOLE_AGE=3 LIBIPMICONSOLE_VERSION_INFO=$LIBIPMICONSOLE_CURRENT:$LIBIPMICONSOLE_REVISION:$LIBIPMICONSOLE_AGE # libipmiconsole versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMICONSOLE_VERSION_MAJOR=1 LIBIPMICONSOLE_VERSION_MINOR=2 LIBIPMICONSOLE_VERSION_PATCH=5 # libipmimonitoring libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMIMONITORING_CURRENT=6 LIBIPMIMONITORING_REVISION=8 LIBIPMIMONITORING_AGE=0 LIBIPMIMONITORING_VERSION_INFO=$LIBIPMIMONITORING_CURRENT:$LIBIPMIMONITORING_REVISION:$LIBIPMIMONITORING_AGE # libipmimonitoring versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMIMONITORING_VERSION_MAJOR=1 LIBIPMIMONITORING_VERSION_MINOR=0 LIBIPMIMONITORING_VERSION_PATCH=9 # libipmidetect libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMIDETECT_CURRENT=0 LIBIPMIDETECT_REVISION=1 LIBIPMIDETECT_AGE=0 LIBIPMIDETECT_VERSION_INFO=$LIBIPMIDETECT_CURRENT:$LIBIPMIDETECT_REVISION:$LIBIPMIDETECT_AGE # libipmidetect versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMIDETECT_VERSION_MAJOR=1 LIBIPMIDETECT_VERSION_MINOR=0 LIBIPMIDETECT_VERSION_PATCH=1 # Make sure we can run config.sub. $SHELL "$ac_aux_dir/config.sub" sun4 >/dev/null 2>&1 || as_fn_error $? "cannot run $SHELL $ac_aux_dir/config.sub" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking build system type" >&5 $as_echo_n "checking build system type... " >&6; } if ${ac_cv_build+:} false; then : $as_echo_n "(cached) " >&6 else ac_build_alias=$build_alias test "x$ac_build_alias" = x && ac_build_alias=`$SHELL "$ac_aux_dir/config.guess"` test "x$ac_build_alias" = x && as_fn_error $? "cannot guess build type; you must specify one" "$LINENO" 5 ac_cv_build=`$SHELL "$ac_aux_dir/config.sub" $ac_build_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $ac_build_alias failed" "$LINENO" 5 fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_build" >&5 $as_echo "$ac_cv_build" >&6; } case $ac_cv_build in *-*-*) ;; *) as_fn_error $? "invalid value of canonical build" "$LINENO" 5;; esac build=$ac_cv_build ac_save_IFS=$IFS; IFS='-' set x $ac_cv_build shift build_cpu=$1 build_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: build_os=$* IFS=$ac_save_IFS case $build_os in *\ *) build_os=`echo "$build_os" | sed 's/ /-/g'`;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking host system type" >&5 $as_echo_n "checking host system type... " >&6; } if ${ac_cv_host+:} false; then : $as_echo_n "(cached) " >&6 else if test "x$host_alias" = x; then ac_cv_host=$ac_cv_build else ac_cv_host=`$SHELL "$ac_aux_dir/config.sub" $host_alias` || as_fn_error $? "$SHELL $ac_aux_dir/config.sub $host_alias failed" "$LINENO" 5 fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_host" >&5 $as_echo "$ac_cv_host" >&6; } case $ac_cv_host in *-*-*) ;; *) as_fn_error $? "invalid value of canonical host" "$LINENO" 5;; esac host=$ac_cv_host ac_save_IFS=$IFS; IFS='-' set x $ac_cv_host shift host_cpu=$1 host_vendor=$2 shift; shift # Remember, the first character of IFS is used to create $*, # except with old shells: host_os=$* IFS=$ac_save_IFS case $host_os in *\ *) host_os=`echo "$host_os" | sed 's/ /-/g'`;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args. set dummy ${ac_tool_prefix}gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_CC"; then ac_ct_CC=$CC # Extract the first word of "gcc", so it can be a program name with args. set dummy gcc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="gcc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi else CC="$ac_cv_prog_CC" fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args. set dummy ${ac_tool_prefix}cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="${ac_tool_prefix}cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi fi if test -z "$CC"; then # Extract the first word of "cc", so it can be a program name with args. set dummy cc; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else ac_prog_rejected=no as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then ac_prog_rejected=yes continue fi ac_cv_prog_CC="cc" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS if test $ac_prog_rejected = yes; then # We found a bogon in the path, so make sure we never use it. set dummy $ac_cv_prog_CC shift if test $# != 0; then # We chose a different compiler from the bogus one. # However, it has the same basename, so the bogon will be chosen # first if we set CC to just the basename; use the full file name. shift ac_cv_prog_CC="$as_dir/$ac_word${1+' '}$@" fi fi fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$CC"; then if test -n "$ac_tool_prefix"; then for ac_prog in cl.exe do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$CC"; then ac_cv_prog_CC="$CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_CC="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi CC=$ac_cv_prog_CC if test -n "$CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CC" >&5 $as_echo "$CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$CC" && break done fi if test -z "$CC"; then ac_ct_CC=$CC for ac_prog in cl.exe do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_CC"; then ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_CC="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_CC=$ac_cv_prog_ac_ct_CC if test -n "$ac_ct_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_CC" >&5 $as_echo "$ac_ct_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_CC" && break done if test "x$ac_ct_CC" = x; then CC="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac CC=$ac_ct_CC fi fi fi test -z "$CC" && { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "no acceptable C compiler found in \$PATH See \`config.log' for more details" "$LINENO" 5; } # Provide some information about the compiler. $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler version" >&5 set X $ac_compile ac_compiler=$2 for ac_option in --version -v -V -qversion; do { { ac_try="$ac_compiler $ac_option >&5" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compiler $ac_option >&5") 2>conftest.err ac_status=$? if test -s conftest.err; then sed '10a\ ... rest of stderr output deleted ... 10q' conftest.err >conftest.er1 cat conftest.er1 >&5 fi rm -f conftest.er1 conftest.err $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files a.out a.out.dSYM a.exe b.out" # Try to create an executable without -o first, disregard a.out. # It will help us diagnose broken compilers, and finding out an intuition # of exeext. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler works" >&5 $as_echo_n "checking whether the C compiler works... " >&6; } ac_link_default=`$as_echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'` # The possible output files: ac_files="a.out conftest.exe conftest a.exe a_out.exe b.out conftest.*" ac_rmfiles= for ac_file in $ac_files do case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; * ) ac_rmfiles="$ac_rmfiles $ac_file";; esac done rm -f $ac_rmfiles if { { ac_try="$ac_link_default" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link_default") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # Autoconf-2.13 could set the ac_cv_exeext variable to `no'. # So ignore a value of `no', otherwise this would lead to `EXEEXT = no' # in a Makefile. We should not override ac_cv_exeext if it was cached, # so that the user can short-circuit this test for compilers unknown to # Autoconf. for ac_file in $ac_files '' do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; [ab].out ) # We found the default executable, but exeext='' is most # certainly right. break;; *.* ) if test "${ac_cv_exeext+set}" = set && test "$ac_cv_exeext" != no; then :; else ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` fi # We set ac_cv_exeext here because the later test for it is not # safe: cross compilers may not add the suffix if given an `-o' # argument, so we may need to know it at that point already. # Even if this section looks crufty: it has the advantage of # actually working. break;; * ) break;; esac done test "$ac_cv_exeext" = no && ac_cv_exeext= else ac_file='' fi if test -z "$ac_file"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error 77 "C compiler cannot create executables See \`config.log' for more details" "$LINENO" 5; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for C compiler default output file name" >&5 $as_echo_n "checking for C compiler default output file name... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_file" >&5 $as_echo "$ac_file" >&6; } ac_exeext=$ac_cv_exeext rm -f -r a.out a.out.dSYM a.exe conftest$ac_cv_exeext b.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of executables" >&5 $as_echo_n "checking for suffix of executables... " >&6; } if { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : # If both `conftest.exe' and `conftest' are `present' (well, observable) # catch `conftest.exe'. For instance with Cygwin, `ls conftest' will # work properly (i.e., refer to `conftest.exe'), while it won't with # `rm'. for ac_file in conftest.exe conftest conftest.*; do test -f "$ac_file" || continue case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM | *.o | *.obj ) ;; *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'` break;; * ) break;; esac done else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of executables: cannot compile and link See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest conftest$ac_cv_exeext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_exeext" >&5 $as_echo "$ac_cv_exeext" >&6; } rm -f conftest.$ac_ext EXEEXT=$ac_cv_exeext ac_exeext=$EXEEXT cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { FILE *f = fopen ("conftest.out", "w"); return ferror (f) || fclose (f) != 0; ; return 0; } _ACEOF ac_clean_files="$ac_clean_files conftest.out" # Check that the compiler produces executables we can run. If not, either # the compiler is broken, or we cross compile. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are cross compiling" >&5 $as_echo_n "checking whether we are cross compiling... " >&6; } if test "$cross_compiling" != yes; then { { ac_try="$ac_link" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_link") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if { ac_try='./conftest$ac_cv_exeext' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then cross_compiling=no else if test "$cross_compiling" = maybe; then cross_compiling=yes else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot run C compiled programs. If you meant to cross compile, use \`--host'. See \`config.log' for more details" "$LINENO" 5; } fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $cross_compiling" >&5 $as_echo "$cross_compiling" >&6; } rm -f conftest.$ac_ext conftest$ac_cv_exeext conftest.out ac_clean_files=$ac_clean_files_save { $as_echo "$as_me:${as_lineno-$LINENO}: checking for suffix of object files" >&5 $as_echo_n "checking for suffix of object files... " >&6; } if ${ac_cv_objext+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF rm -f conftest.o conftest.obj if { { ac_try="$ac_compile" case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_compile") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then : for ac_file in conftest.o conftest.obj conftest.*; do test -f "$ac_file" || continue; case $ac_file in *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.dSYM ) ;; *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'` break;; esac done else $as_echo "$as_me: failed program was:" >&5 sed 's/^/| /' conftest.$ac_ext >&5 { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "cannot compute suffix of object files: cannot compile See \`config.log' for more details" "$LINENO" 5; } fi rm -f conftest.$ac_cv_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_objext" >&5 $as_echo "$ac_cv_objext" >&6; } OBJEXT=$ac_cv_objext ac_objext=$OBJEXT { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether we are using the GNU C compiler" >&5 $as_echo_n "checking whether we are using the GNU C compiler... " >&6; } if ${ac_cv_c_compiler_gnu+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __GNUC__ choke me #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_compiler_gnu=yes else ac_compiler_gnu=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_cv_c_compiler_gnu=$ac_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_compiler_gnu" >&5 $as_echo "$ac_cv_c_compiler_gnu" >&6; } if test $ac_compiler_gnu = yes; then GCC=yes else GCC= fi ac_test_CFLAGS=${CFLAGS+set} ac_save_CFLAGS=$CFLAGS { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC accepts -g" >&5 $as_echo_n "checking whether $CC accepts -g... " >&6; } if ${ac_cv_prog_cc_g+:} false; then : $as_echo_n "(cached) " >&6 else ac_save_c_werror_flag=$ac_c_werror_flag ac_c_werror_flag=yes ac_cv_prog_cc_g=no CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes else CFLAGS="" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else ac_c_werror_flag=$ac_save_c_werror_flag CFLAGS="-g" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_g=yes fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_c_werror_flag=$ac_save_c_werror_flag fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_g" >&5 $as_echo "$ac_cv_prog_cc_g" >&6; } if test "$ac_test_CFLAGS" = set; then CFLAGS=$ac_save_CFLAGS elif test $ac_cv_prog_cc_g = yes; then if test "$GCC" = yes; then CFLAGS="-g -O2" else CFLAGS="-g" fi else if test "$GCC" = yes; then CFLAGS="-O2" else CFLAGS= fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $CC option to accept ISO C89" >&5 $as_echo_n "checking for $CC option to accept ISO C89... " >&6; } if ${ac_cv_prog_cc_c89+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_prog_cc_c89=no ac_save_CC=$CC cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include struct stat; /* Most of the following tests are stolen from RCS 5.7's src/conf.sh. */ struct buf { int x; }; FILE * (*rcsopen) (struct buf *, struct stat *, int); static char *e (p, i) char **p; int i; { return p[i]; } static char *f (char * (*g) (char **, int), char **p, ...) { char *s; va_list v; va_start (v,p); s = g (p, va_arg (v,int)); va_end (v); return s; } /* OSF 4.0 Compaq cc is some sort of almost-ANSI by default. It has function prototypes and stuff, but not '\xHH' hex character constants. These don't provoke an error unfortunately, instead are silently treated as 'x'. The following induces an error, until -std is added to get proper ANSI mode. Curiously '\x00'!='x' always comes out true, for an array size at least. It's necessary to write '\x00'==0 to get something that's true only with -std. */ int osf4_cc_array ['\x00' == 0 ? 1 : -1]; /* IBM C 6 for AIX is almost-ANSI by default, but it replaces macro parameters inside strings and character constants. */ #define FOO(x) 'x' int xlc6_cc_array[FOO(a) == 'x' ? 1 : -1]; int test (int i, double x); struct s1 {int (*f) (int a);}; struct s2 {int (*f) (double a);}; int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int); int argc; char **argv; int main () { return f (e, argv, 0) != argv[0] || f (e, argv, 1) != argv[1]; ; return 0; } _ACEOF for ac_arg in '' -qlanglvl=extc89 -qlanglvl=ansi -std \ -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__" do CC="$ac_save_CC $ac_arg" if ac_fn_c_try_compile "$LINENO"; then : ac_cv_prog_cc_c89=$ac_arg fi rm -f core conftest.err conftest.$ac_objext test "x$ac_cv_prog_cc_c89" != "xno" && break done rm -f conftest.$ac_ext CC=$ac_save_CC fi # AC_CACHE_VAL case "x$ac_cv_prog_cc_c89" in x) { $as_echo "$as_me:${as_lineno-$LINENO}: result: none needed" >&5 $as_echo "none needed" >&6; } ;; xno) { $as_echo "$as_me:${as_lineno-$LINENO}: result: unsupported" >&5 $as_echo "unsupported" >&6; } ;; *) CC="$CC $ac_cv_prog_cc_c89" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_prog_cc_c89" >&5 $as_echo "$ac_cv_prog_cc_c89" >&6; } ;; esac if test "x$ac_cv_prog_cc_c89" != xno; then : fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu DEPDIR="${am__leading_dot}deps" ac_config_commands="$ac_config_commands depfiles" am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for style of include used by $am_make" >&5 $as_echo_n "checking for style of include used by $am_make... " >&6; } am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $_am_result" >&5 $as_echo "$_am_result" >&6; } rm -f confinc confmf # Check whether --enable-dependency-tracking was given. if test "${enable_dependency_tracking+set}" = set; then : enableval=$enable_dependency_tracking; fi if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi if test "x$enable_dependency_tracking" != xno; then AMDEP_TRUE= AMDEP_FALSE='#' else AMDEP_TRUE='#' AMDEP_FALSE= fi depcc="$CC" am_compiler_list= { $as_echo "$as_me:${as_lineno-$LINENO}: checking dependency style of $depcc" >&5 $as_echo_n "checking dependency style of $depcc... " >&6; } if ${am_cv_CC_dependencies_compiler_type+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_CC_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n 's/^#*\([a-zA-Z0-9]*\))$/\1/p' < ./depcomp` fi am__universal=false case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_CC_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_CC_dependencies_compiler_type=none fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $am_cv_CC_dependencies_compiler_type" >&5 $as_echo "$am_cv_CC_dependencies_compiler_type" >&6; } CCDEPMODE=depmode=$am_cv_CC_dependencies_compiler_type if test "x$enable_dependency_tracking" != xno \ && test "$am_cv_CC_dependencies_compiler_type" = gcc3; then am__fastdepCC_TRUE= am__fastdepCC_FALSE='#' else am__fastdepCC_TRUE='#' am__fastdepCC_FALSE= fi if test "x$CC" != xcc; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC and cc understand -c and -o together" >&5 $as_echo_n "checking whether $CC and cc understand -c and -o together... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether cc understands -c and -o together" >&5 $as_echo_n "checking whether cc understands -c and -o together... " >&6; } fi set dummy $CC; ac_cc=`$as_echo "$2" | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` if eval \${ac_cv_prog_cc_${ac_cc}_c_o+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF # Make sure it works both with $CC and with simple cc. # We do the test twice because some compilers refuse to overwrite an # existing .o file with -o, though they will create one. ac_try='$CC -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then eval ac_cv_prog_cc_${ac_cc}_c_o=yes if test "x$CC" != xcc; then # Test first that cc exists at all. if { ac_try='cc -c conftest.$ac_ext >&5' { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; }; then ac_try='cc -c conftest.$ac_ext -o conftest2.$ac_objext >&5' rm -f conftest2.* if { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -f conftest2.$ac_objext && { { case "(($ac_try" in *\"* | *\`* | *\\*) ac_try_echo=\$ac_try;; *) ac_try_echo=$ac_try;; esac eval ac_try_echo="\"\$as_me:${as_lineno-$LINENO}: $ac_try_echo\"" $as_echo "$ac_try_echo"; } >&5 (eval "$ac_try") 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # cc works too. : else # cc exists but doesn't like -o. eval ac_cv_prog_cc_${ac_cc}_c_o=no fi fi fi else eval ac_cv_prog_cc_${ac_cc}_c_o=no fi rm -f core conftest* fi if eval test \$ac_cv_prog_cc_${ac_cc}_c_o = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } $as_echo "#define NO_MINUS_C_MINUS_O 1" >>confdefs.h fi # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $2 | sed 's/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/'` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi case `pwd` in *\ * | *\ *) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&5 $as_echo "$as_me: WARNING: Libtool does not cope well with whitespace in \`pwd\`" >&2;} ;; esac macro_version='2.4.2' macro_revision='1.3337' ltmain="$ac_aux_dir/ltmain.sh" # Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\(["`$\\]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\(["`\\]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to print strings" >&5 $as_echo_n "checking how to print strings... " >&6; } # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "" } case "$ECHO" in printf*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: printf" >&5 $as_echo "printf" >&6; } ;; print*) { $as_echo "$as_me:${as_lineno-$LINENO}: result: print -r" >&5 $as_echo "print -r" >&6; } ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: cat" >&5 $as_echo "cat" >&6; } ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for a sed that does not truncate output" >&5 $as_echo_n "checking for a sed that does not truncate output... " >&6; } if ${ac_cv_path_SED+:} false; then : $as_echo_n "(cached) " >&6 else ac_script=s/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb/ for ac_i in 1 2 3 4 5 6 7; do ac_script="$ac_script$as_nl$ac_script" done echo "$ac_script" 2>/dev/null | sed 99q >conftest.sed { ac_script=; unset ac_script;} if test -z "$SED"; then ac_path_SED_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_SED="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_SED" || continue # Check for GNU ac_path_SED and select it if it is found. # Check for GNU $ac_path_SED case `"$ac_path_SED" --version 2>&1` in *GNU*) ac_cv_path_SED="$ac_path_SED" ac_path_SED_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo '' >> "conftest.nl" "$ac_path_SED" -f conftest.sed < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_SED_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_SED="$ac_path_SED" ac_path_SED_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_SED_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_SED"; then as_fn_error $? "no acceptable sed could be found in \$PATH" "$LINENO" 5 fi else ac_cv_path_SED=$SED fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_SED" >&5 $as_echo "$ac_cv_path_SED" >&6; } SED="$ac_cv_path_SED" rm -f conftest.sed test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for grep that handles long lines and -e" >&5 $as_echo_n "checking for grep that handles long lines and -e... " >&6; } if ${ac_cv_path_GREP+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$GREP"; then ac_path_GREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in grep ggrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_GREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_GREP" || continue # Check for GNU ac_path_GREP and select it if it is found. # Check for GNU $ac_path_GREP case `"$ac_path_GREP" --version 2>&1` in *GNU*) ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'GREP' >> "conftest.nl" "$ac_path_GREP" -e 'GREP$' -e '-(cannot match)-' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_GREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_GREP="$ac_path_GREP" ac_path_GREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_GREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_GREP"; then as_fn_error $? "no acceptable grep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_GREP=$GREP fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_GREP" >&5 $as_echo "$ac_cv_path_GREP" >&6; } GREP="$ac_cv_path_GREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for egrep" >&5 $as_echo_n "checking for egrep... " >&6; } if ${ac_cv_path_EGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo a | $GREP -E '(a|b)' >/dev/null 2>&1 then ac_cv_path_EGREP="$GREP -E" else if test -z "$EGREP"; then ac_path_EGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in egrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_EGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_EGREP" || continue # Check for GNU ac_path_EGREP and select it if it is found. # Check for GNU $ac_path_EGREP case `"$ac_path_EGREP" --version 2>&1` in *GNU*) ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'EGREP' >> "conftest.nl" "$ac_path_EGREP" 'EGREP$' < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_EGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_EGREP="$ac_path_EGREP" ac_path_EGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_EGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_EGREP"; then as_fn_error $? "no acceptable egrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_EGREP=$EGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_EGREP" >&5 $as_echo "$ac_cv_path_EGREP" >&6; } EGREP="$ac_cv_path_EGREP" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for fgrep" >&5 $as_echo_n "checking for fgrep... " >&6; } if ${ac_cv_path_FGREP+:} false; then : $as_echo_n "(cached) " >&6 else if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1 then ac_cv_path_FGREP="$GREP -F" else if test -z "$FGREP"; then ac_path_FGREP_found=false # Loop through the user's path and test for each of PROGNAME-LIST as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH$PATH_SEPARATOR/usr/xpg4/bin do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_prog in fgrep; do for ac_exec_ext in '' $ac_executable_extensions; do ac_path_FGREP="$as_dir/$ac_prog$ac_exec_ext" as_fn_executable_p "$ac_path_FGREP" || continue # Check for GNU ac_path_FGREP and select it if it is found. # Check for GNU $ac_path_FGREP case `"$ac_path_FGREP" --version 2>&1` in *GNU*) ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_found=:;; *) ac_count=0 $as_echo_n 0123456789 >"conftest.in" while : do cat "conftest.in" "conftest.in" >"conftest.tmp" mv "conftest.tmp" "conftest.in" cp "conftest.in" "conftest.nl" $as_echo 'FGREP' >> "conftest.nl" "$ac_path_FGREP" FGREP < "conftest.nl" >"conftest.out" 2>/dev/null || break diff "conftest.out" "conftest.nl" >/dev/null 2>&1 || break as_fn_arith $ac_count + 1 && ac_count=$as_val if test $ac_count -gt ${ac_path_FGREP_max-0}; then # Best one so far, save it but keep looking for a better one ac_cv_path_FGREP="$ac_path_FGREP" ac_path_FGREP_max=$ac_count fi # 10*(2^10) chars as input seems more than enough test $ac_count -gt 10 && break done rm -f conftest.in conftest.tmp conftest.nl conftest.out;; esac $ac_path_FGREP_found && break 3 done done done IFS=$as_save_IFS if test -z "$ac_cv_path_FGREP"; then as_fn_error $? "no acceptable fgrep could be found in $PATH$PATH_SEPARATOR/usr/xpg4/bin" "$LINENO" 5 fi else ac_cv_path_FGREP=$FGREP fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_path_FGREP" >&5 $as_echo "$ac_cv_path_FGREP" >&6; } FGREP="$ac_cv_path_FGREP" test -z "$GREP" && GREP=grep # Check whether --with-gnu-ld was given. if test "${with_gnu_ld+set}" = set; then : withval=$with_gnu_ld; test "$withval" = no || with_gnu_ld=yes else with_gnu_ld=no fi ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ld used by $CC" >&5 $as_echo_n "checking for ld used by $CC... " >&6; } case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [\\/]* | ?:[\\/]*) re_direlt='/[^/][^/]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for GNU ld" >&5 $as_echo_n "checking for GNU ld... " >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for non-GNU ld" >&5 $as_echo_n "checking for non-GNU ld... " >&6; } fi if ${lt_cv_path_LD+:} false; then : $as_echo_n "(cached) " >&6 else if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &5 $as_echo "$LD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -z "$LD" && as_fn_error $? "no acceptable ld found in \$PATH" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: checking if the linker ($LD) is GNU ld" >&5 $as_echo_n "checking if the linker ($LD) is GNU ld... " >&6; } if ${lt_cv_prog_gnu_ld+:} false; then : $as_echo_n "(cached) " >&6 else # I'd rather use --version here, but apparently some GNU lds only accept -v. case `$LD -v 2>&1 &5 $as_echo "$lt_cv_prog_gnu_ld" >&6; } with_gnu_ld=$lt_cv_prog_gnu_ld { $as_echo "$as_me:${as_lineno-$LINENO}: checking for BSD- or MS-compatible name lister (nm)" >&5 $as_echo_n "checking for BSD- or MS-compatible name lister (nm)... " >&6; } if ${lt_cv_path_NM+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_NM" >&5 $as_echo "$lt_cv_path_NM" >&6; } if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else if test -n "$ac_tool_prefix"; then for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DUMPBIN"; then ac_cv_prog_DUMPBIN="$DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DUMPBIN="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DUMPBIN=$ac_cv_prog_DUMPBIN if test -n "$DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DUMPBIN" >&5 $as_echo "$DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$DUMPBIN" && break done fi if test -z "$DUMPBIN"; then ac_ct_DUMPBIN=$DUMPBIN for ac_prog in dumpbin "link -dump" do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DUMPBIN+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DUMPBIN"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_ct_DUMPBIN" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DUMPBIN="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DUMPBIN=$ac_cv_prog_ac_ct_DUMPBIN if test -n "$ac_ct_DUMPBIN"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DUMPBIN" >&5 $as_echo "$ac_ct_DUMPBIN" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_DUMPBIN" && break done if test "x$ac_ct_DUMPBIN" = x; then DUMPBIN=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DUMPBIN=$ac_ct_DUMPBIN fi fi case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm { $as_echo "$as_me:${as_lineno-$LINENO}: checking the name lister ($NM) interface" >&5 $as_echo_n "checking the name lister ($NM) interface... " >&6; } if ${lt_cv_nm_interface+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 (eval echo "\"\$as_me:$LINENO: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_nm_interface" >&5 $as_echo "$lt_cv_nm_interface" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # find the maximum length of command line arguments { $as_echo "$as_me:${as_lineno-$LINENO}: checking the maximum length of command line arguments" >&5 $as_echo_n "checking the maximum length of command line arguments... " >&6; } if ${lt_cv_sys_max_cmd_len+:} false; then : $as_echo_n "(cached) " >&6 else i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[ ]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac fi if test -n $lt_cv_sys_max_cmd_len ; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sys_max_cmd_len" >&5 $as_echo "$lt_cv_sys_max_cmd_len" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: none" >&5 $as_echo "none" >&6; } fi max_cmd_len=$lt_cv_sys_max_cmd_len : ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands some XSI constructs" >&5 $as_echo_n "checking whether the shell understands some XSI constructs... " >&6; } # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $xsi_shell" >&5 $as_echo "$xsi_shell" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the shell understands \"+=\"" >&5 $as_echo_n "checking whether the shell understands \"+=\"... " >&6; } lt_shell_append=no ( foo=bar; set foo baz; eval "$1+=\$2" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_shell_append" >&5 $as_echo "$lt_shell_append" >&6; } if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to $host format" >&5 $as_echo_n "checking how to convert $build file names to $host format... " >&6; } if ${lt_cv_to_host_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac fi to_host_file_cmd=$lt_cv_to_host_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_host_file_cmd" >&5 $as_echo "$lt_cv_to_host_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to convert $build file names to toolchain format" >&5 $as_echo_n "checking how to convert $build file names to toolchain format... " >&6; } if ${lt_cv_to_tool_file_cmd+:} false; then : $as_echo_n "(cached) " >&6 else #assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac fi to_tool_file_cmd=$lt_cv_to_tool_file_cmd { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_to_tool_file_cmd" >&5 $as_echo "$lt_cv_to_tool_file_cmd" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $LD option to reload object files" >&5 $as_echo_n "checking for $LD option to reload object files... " >&6; } if ${lt_cv_ld_reload_flag+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_reload_flag='-r' fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_reload_flag" >&5 $as_echo "$lt_cv_ld_reload_flag" >&6; } reload_flag=$lt_cv_ld_reload_flag case $reload_flag in "" | " "*) ;; *) reload_flag=" $reload_flag" ;; esac reload_cmds='$LD$reload_flag -o $output$reload_objs' case $host_os in cygwin* | mingw* | pw32* | cegcc*) if test "$GCC" != yes; then reload_cmds=false fi ;; darwin*) if test "$GCC" = yes; then reload_cmds='$LTCC $LTCFLAGS -nostdlib ${wl}-r -o $output$reload_objs' else reload_cmds='$LD$reload_flag -o $output$reload_objs' fi ;; esac if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}objdump", so it can be a program name with args. set dummy ${ac_tool_prefix}objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OBJDUMP"; then ac_cv_prog_OBJDUMP="$OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OBJDUMP="${ac_tool_prefix}objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OBJDUMP=$ac_cv_prog_OBJDUMP if test -n "$OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OBJDUMP" >&5 $as_echo "$OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OBJDUMP"; then ac_ct_OBJDUMP=$OBJDUMP # Extract the first word of "objdump", so it can be a program name with args. set dummy objdump; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OBJDUMP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OBJDUMP"; then ac_cv_prog_ac_ct_OBJDUMP="$ac_ct_OBJDUMP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OBJDUMP="objdump" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OBJDUMP=$ac_cv_prog_ac_ct_OBJDUMP if test -n "$ac_ct_OBJDUMP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OBJDUMP" >&5 $as_echo "$ac_ct_OBJDUMP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OBJDUMP" = x; then OBJDUMP="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OBJDUMP=$ac_ct_OBJDUMP fi else OBJDUMP="$ac_cv_prog_OBJDUMP" fi test -z "$OBJDUMP" && OBJDUMP=objdump { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to recognize dependent libraries" >&5 $as_echo_n "checking how to recognize dependent libraries... " >&6; } if ${lt_cv_deplibs_check_method+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_file_magic_cmd='$MAGIC_CMD' lt_cv_file_magic_test_file= lt_cv_deplibs_check_method='unknown' # Need to set the preceding variable on all platforms that support # interlibrary dependencies. # 'none' -- dependencies not supported. # `unknown' -- same as none, but documents that we really don't know. # 'pass_all' -- all dependencies passed with no checks. # 'test_compile' -- check by making test program. # 'file_magic [[regex]]' -- check by looking for files in library path # which responds to the $file_magic_cmd with a given extended regex. # If you have `file' or equivalent on your system and you're not sure # whether `pass_all' will *always* work, you probably want this one. case $host_os in aix[4-9]*) lt_cv_deplibs_check_method=pass_all ;; beos*) lt_cv_deplibs_check_method=pass_all ;; bsdi[45]*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib)' lt_cv_file_magic_cmd='/usr/bin/file -L' lt_cv_file_magic_test_file=/shlib/libc.so ;; cygwin*) # func_win32_libid is a shell function defined in ltmain.sh lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' ;; mingw* | pw32*) # Base MSYS/MinGW do not provide the 'file' command needed by # func_win32_libid shell function, so use a weaker test based on 'objdump', # unless we find 'file', for example because we are cross-compiling. # func_win32_libid assumes BSD nm, so disallow it if using MS dumpbin. if ( test "$lt_cv_nm_interface" = "BSD nm" && file / ) >/dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[3-9]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF-[0-9][0-9]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]' lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|PA-RISC[0-9]\.[0-9]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[3-9]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[^/]+(\.so\.[0-9]+\.[0-9]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [ML]SB (shared object|dynamic lib) M[0-9][0-9]* Version [0-9]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [0-9][0-9]*-bit [LM]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [0-9][0-9]*-bit [LM]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_deplibs_check_method" >&5 $as_echo "$lt_cv_deplibs_check_method" >&6; } file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[\1]\/[\1]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dlltool", so it can be a program name with args. set dummy ${ac_tool_prefix}dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DLLTOOL"; then ac_cv_prog_DLLTOOL="$DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DLLTOOL="${ac_tool_prefix}dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DLLTOOL=$ac_cv_prog_DLLTOOL if test -n "$DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DLLTOOL" >&5 $as_echo "$DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DLLTOOL"; then ac_ct_DLLTOOL=$DLLTOOL # Extract the first word of "dlltool", so it can be a program name with args. set dummy dlltool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DLLTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DLLTOOL"; then ac_cv_prog_ac_ct_DLLTOOL="$ac_ct_DLLTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DLLTOOL="dlltool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DLLTOOL=$ac_cv_prog_ac_ct_DLLTOOL if test -n "$ac_ct_DLLTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DLLTOOL" >&5 $as_echo "$ac_ct_DLLTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DLLTOOL" = x; then DLLTOOL="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DLLTOOL=$ac_ct_DLLTOOL fi else DLLTOOL="$ac_cv_prog_DLLTOOL" fi test -z "$DLLTOOL" && DLLTOOL=dlltool { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to associate runtime and link libraries" >&5 $as_echo_n "checking how to associate runtime and link libraries... " >&6; } if ${lt_cv_sharedlib_from_linklib_cmd+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_sharedlib_from_linklib_cmd" >&5 $as_echo "$lt_cv_sharedlib_from_linklib_cmd" >&6; } sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO if test -n "$ac_tool_prefix"; then for ac_prog in ar do # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args. set dummy $ac_tool_prefix$ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$AR"; then ac_cv_prog_AR="$AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_AR="$ac_tool_prefix$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi AR=$ac_cv_prog_AR if test -n "$AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $AR" >&5 $as_echo "$AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$AR" && break done fi if test -z "$AR"; then ac_ct_AR=$AR for ac_prog in ar do # Extract the first word of "$ac_prog", so it can be a program name with args. set dummy $ac_prog; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_AR+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_AR"; then ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_AR="$ac_prog" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_AR=$ac_cv_prog_ac_ct_AR if test -n "$ac_ct_AR"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_AR" >&5 $as_echo "$ac_ct_AR" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi test -n "$ac_ct_AR" && break done if test "x$ac_ct_AR" = x; then AR="false" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac AR=$ac_ct_AR fi fi : ${AR=ar} : ${AR_FLAGS=cru} { $as_echo "$as_me:${as_lineno-$LINENO}: checking for archiver @FILE support" >&5 $as_echo_n "checking for archiver @FILE support... " >&6; } if ${lt_cv_ar_at_file+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ar_at_file=no cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&5' { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$lt_ar_try\""; } >&5 (eval $lt_ar_try) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ar_at_file" >&5 $as_echo "$lt_cv_ar_at_file" >&6; } if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}strip", so it can be a program name with args. set dummy ${ac_tool_prefix}strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$STRIP"; then ac_cv_prog_STRIP="$STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_STRIP="${ac_tool_prefix}strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi STRIP=$ac_cv_prog_STRIP if test -n "$STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $STRIP" >&5 $as_echo "$STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_STRIP"; then ac_ct_STRIP=$STRIP # Extract the first word of "strip", so it can be a program name with args. set dummy strip; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_STRIP+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_STRIP"; then ac_cv_prog_ac_ct_STRIP="$ac_ct_STRIP" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_STRIP="strip" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_STRIP=$ac_cv_prog_ac_ct_STRIP if test -n "$ac_ct_STRIP"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_STRIP" >&5 $as_echo "$ac_ct_STRIP" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_STRIP" = x; then STRIP=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac STRIP=$ac_ct_STRIP fi else STRIP="$ac_cv_prog_STRIP" fi test -z "$STRIP" && STRIP=: if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args. set dummy ${ac_tool_prefix}ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$RANLIB"; then ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi RANLIB=$ac_cv_prog_RANLIB if test -n "$RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $RANLIB" >&5 $as_echo "$RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_RANLIB"; then ac_ct_RANLIB=$RANLIB # Extract the first word of "ranlib", so it can be a program name with args. set dummy ranlib; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_RANLIB+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_RANLIB"; then ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_RANLIB="ranlib" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB if test -n "$ac_ct_RANLIB"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_RANLIB" >&5 $as_echo "$ac_ct_RANLIB" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_RANLIB" = x; then RANLIB=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac RANLIB=$ac_ct_RANLIB fi else RANLIB="$ac_cv_prog_RANLIB" fi test -z "$RANLIB" && RANLIB=: # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Check for command to grab the raw symbol name followed by C symbol from nm. { $as_echo "$as_me:${as_lineno-$LINENO}: checking command to parse $NM output from $compiler object" >&5 $as_echo_n "checking command to parse $NM output from $compiler object... " >&6; } if ${lt_cv_sys_global_symbol_pipe+:} false; then : $as_echo_n "(cached) " >&6 else # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[BCDEGRST]' # Regexp to match symbols that can be accessed directly from C. sympat='\([_A-Za-z][_A-Za-z0-9]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[BCDT]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[ABCDGISTW]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[ABCDEGRST]' fi ;; irix* | nonstopux*) symcode='[BCDEGRST]' ;; osf*) symcode='[BCDEGQRST]' ;; solaris*) symcode='[BDRT]' ;; sco3.2v5*) symcode='[DT]' ;; sysv4.2uw2*) symcode='[DT]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[ABDT]' ;; sysv4) symcode='[DFNSTU]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[ABCDGIRSTW]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([^ ]*\)[ ]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([^ ]*\) \(lib[^ ]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([^ ]*\) \([^ ]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK '"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[ ]\($symcode$symcode*\)[ ][ ]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then # Now try to grab the symbols. nlist=conftest.nm if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist\""; } >&5 (eval $NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT_DLSYM_CONST #else # define LT_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$lt_prog_compiler_no_builtin_flag" if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&5 fi else echo "cannot find nm_test_var in $nlist" >&5 fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&5 fi else echo "$progname: failed program was:" >&5 cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done fi if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: failed" >&5 $as_echo "failed" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: ok" >&5 $as_echo "ok" >&6; } fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[@]FILE' >/dev/null; then nm_file_list_spec='@' fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sysroot" >&5 $as_echo_n "checking for sysroot... " >&6; } # Check whether --with-sysroot was given. if test "${with_sysroot+set}" = set; then : withval=$with_sysroot; else with_sysroot=no fi lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${with_sysroot}" >&5 $as_echo "${with_sysroot}" >&6; } as_fn_error $? "The sysroot must be an absolute path." "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${lt_sysroot:-no}" >&5 $as_echo "${lt_sysroot:-no}" >&6; } # Check whether --enable-libtool-lock was given. if test "${enable_libtool_lock+set}" = set; then : enableval=$enable_libtool_lock; fi test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '#line '$LINENO' "configure"' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the C compiler needs -belf" >&5 $as_echo_n "checking whether the C compiler needs -belf... " >&6; } if ${lt_cv_cc_needs_belf+:} false; then : $as_echo_n "(cached) " >&6 else ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_cc_needs_belf=yes else lt_cv_cc_needs_belf=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_cc_needs_belf" >&5 $as_echo "$lt_cv_cc_needs_belf" >&6; } if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; }; then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}mt", so it can be a program name with args. set dummy ${ac_tool_prefix}mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$MANIFEST_TOOL"; then ac_cv_prog_MANIFEST_TOOL="$MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_MANIFEST_TOOL="${ac_tool_prefix}mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi MANIFEST_TOOL=$ac_cv_prog_MANIFEST_TOOL if test -n "$MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MANIFEST_TOOL" >&5 $as_echo "$MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_MANIFEST_TOOL"; then ac_ct_MANIFEST_TOOL=$MANIFEST_TOOL # Extract the first word of "mt", so it can be a program name with args. set dummy mt; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_MANIFEST_TOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_MANIFEST_TOOL"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="$ac_ct_MANIFEST_TOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_MANIFEST_TOOL="mt" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_MANIFEST_TOOL=$ac_cv_prog_ac_ct_MANIFEST_TOOL if test -n "$ac_ct_MANIFEST_TOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_MANIFEST_TOOL" >&5 $as_echo "$ac_ct_MANIFEST_TOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_MANIFEST_TOOL" = x; then MANIFEST_TOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac MANIFEST_TOOL=$ac_ct_MANIFEST_TOOL fi else MANIFEST_TOOL="$ac_cv_prog_MANIFEST_TOOL" fi test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $MANIFEST_TOOL is a manifest tool" >&5 $as_echo_n "checking if $MANIFEST_TOOL is a manifest tool... " >&6; } if ${lt_cv_path_mainfest_tool+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&5 $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&5 if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_path_mainfest_tool" >&5 $as_echo "$lt_cv_path_mainfest_tool" >&6; } if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi case $host_os in rhapsody* | darwin*) if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}dsymutil", so it can be a program name with args. set dummy ${ac_tool_prefix}dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$DSYMUTIL"; then ac_cv_prog_DSYMUTIL="$DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_DSYMUTIL="${ac_tool_prefix}dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi DSYMUTIL=$ac_cv_prog_DSYMUTIL if test -n "$DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $DSYMUTIL" >&5 $as_echo "$DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_DSYMUTIL"; then ac_ct_DSYMUTIL=$DSYMUTIL # Extract the first word of "dsymutil", so it can be a program name with args. set dummy dsymutil; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_DSYMUTIL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_DSYMUTIL"; then ac_cv_prog_ac_ct_DSYMUTIL="$ac_ct_DSYMUTIL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_DSYMUTIL="dsymutil" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_DSYMUTIL=$ac_cv_prog_ac_ct_DSYMUTIL if test -n "$ac_ct_DSYMUTIL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_DSYMUTIL" >&5 $as_echo "$ac_ct_DSYMUTIL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_DSYMUTIL" = x; then DSYMUTIL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac DSYMUTIL=$ac_ct_DSYMUTIL fi else DSYMUTIL="$ac_cv_prog_DSYMUTIL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}nmedit", so it can be a program name with args. set dummy ${ac_tool_prefix}nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$NMEDIT"; then ac_cv_prog_NMEDIT="$NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_NMEDIT="${ac_tool_prefix}nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi NMEDIT=$ac_cv_prog_NMEDIT if test -n "$NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $NMEDIT" >&5 $as_echo "$NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_NMEDIT"; then ac_ct_NMEDIT=$NMEDIT # Extract the first word of "nmedit", so it can be a program name with args. set dummy nmedit; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_NMEDIT+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_NMEDIT"; then ac_cv_prog_ac_ct_NMEDIT="$ac_ct_NMEDIT" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_NMEDIT="nmedit" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_NMEDIT=$ac_cv_prog_ac_ct_NMEDIT if test -n "$ac_ct_NMEDIT"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_NMEDIT" >&5 $as_echo "$ac_ct_NMEDIT" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_NMEDIT" = x; then NMEDIT=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac NMEDIT=$ac_ct_NMEDIT fi else NMEDIT="$ac_cv_prog_NMEDIT" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}lipo", so it can be a program name with args. set dummy ${ac_tool_prefix}lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$LIPO"; then ac_cv_prog_LIPO="$LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_LIPO="${ac_tool_prefix}lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi LIPO=$ac_cv_prog_LIPO if test -n "$LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $LIPO" >&5 $as_echo "$LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_LIPO"; then ac_ct_LIPO=$LIPO # Extract the first word of "lipo", so it can be a program name with args. set dummy lipo; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_LIPO+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_LIPO"; then ac_cv_prog_ac_ct_LIPO="$ac_ct_LIPO" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_LIPO="lipo" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_LIPO=$ac_cv_prog_ac_ct_LIPO if test -n "$ac_ct_LIPO"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_LIPO" >&5 $as_echo "$ac_ct_LIPO" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_LIPO" = x; then LIPO=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac LIPO=$ac_ct_LIPO fi else LIPO="$ac_cv_prog_LIPO" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool", so it can be a program name with args. set dummy ${ac_tool_prefix}otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL"; then ac_cv_prog_OTOOL="$OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL="${ac_tool_prefix}otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL=$ac_cv_prog_OTOOL if test -n "$OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL" >&5 $as_echo "$OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL"; then ac_ct_OTOOL=$OTOOL # Extract the first word of "otool", so it can be a program name with args. set dummy otool; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL"; then ac_cv_prog_ac_ct_OTOOL="$ac_ct_OTOOL" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL="otool" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL=$ac_cv_prog_ac_ct_OTOOL if test -n "$ac_ct_OTOOL"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL" >&5 $as_echo "$ac_ct_OTOOL" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL" = x; then OTOOL=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL=$ac_ct_OTOOL fi else OTOOL="$ac_cv_prog_OTOOL" fi if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}otool64", so it can be a program name with args. set dummy ${ac_tool_prefix}otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$OTOOL64"; then ac_cv_prog_OTOOL64="$OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_OTOOL64="${ac_tool_prefix}otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi OTOOL64=$ac_cv_prog_OTOOL64 if test -n "$OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $OTOOL64" >&5 $as_echo "$OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_prog_OTOOL64"; then ac_ct_OTOOL64=$OTOOL64 # Extract the first word of "otool64", so it can be a program name with args. set dummy otool64; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_ac_ct_OTOOL64+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$ac_ct_OTOOL64"; then ac_cv_prog_ac_ct_OTOOL64="$ac_ct_OTOOL64" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_ac_ct_OTOOL64="otool64" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS fi fi ac_ct_OTOOL64=$ac_cv_prog_ac_ct_OTOOL64 if test -n "$ac_ct_OTOOL64"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_ct_OTOOL64" >&5 $as_echo "$ac_ct_OTOOL64" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_ct_OTOOL64" = x; then OTOOL64=":" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac OTOOL64=$ac_ct_OTOOL64 fi else OTOOL64="$ac_cv_prog_OTOOL64" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -single_module linker flag" >&5 $as_echo_n "checking for -single_module linker flag... " >&6; } if ${lt_cv_apple_cc_single_mod+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&5 $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&5 # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&5 fi rm -rf libconftest.dylib* rm -f conftest.* fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_apple_cc_single_mod" >&5 $as_echo "$lt_cv_apple_cc_single_mod" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -exported_symbols_list linker flag" >&5 $as_echo_n "checking for -exported_symbols_list linker flag... " >&6; } if ${lt_cv_ld_exported_symbols_list+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_ld_exported_symbols_list=yes else lt_cv_ld_exported_symbols_list=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_exported_symbols_list" >&5 $as_echo "$lt_cv_ld_exported_symbols_list" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking for -force_load linker flag" >&5 $as_echo_n "checking for -force_load linker flag... " >&6; } if ${lt_cv_ld_force_load+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&5 $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&5 echo "$AR cru libconftest.a conftest.o" >&5 $AR cru libconftest.a conftest.o 2>&5 echo "$RANLIB libconftest.a" >&5 $RANLIB libconftest.a 2>&5 cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&5 $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&5 elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&5 fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_ld_force_load" >&5 $as_echo "$lt_cv_ld_force_load" >&6; } case $host_os in rhapsody* | darwin1.[012]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[91]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[012]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi # On IRIX 5.3, sys/types and inttypes.h are conflicting. for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \ inttypes.h stdint.h unistd.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in dlfcn.h do : ac_fn_c_check_header_compile "$LINENO" "dlfcn.h" "ac_cv_header_dlfcn_h" "$ac_includes_default " if test "x$ac_cv_header_dlfcn_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_DLFCN_H 1 _ACEOF fi done # Set options enable_dlopen=no enable_win32_dll=no # Check whether --enable-shared was given. if test "${enable_shared+set}" = set; then : enableval=$enable_shared; p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac else enable_shared=yes fi # Check whether --enable-static was given. if test "${enable_static+set}" = set; then : enableval=$enable_static; p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac else enable_static=yes fi # Check whether --with-pic was given. if test "${with_pic+set}" = set; then : withval=$with_pic; lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac else pic_mode=default fi test -z "$pic_mode" && pic_mode=default # Check whether --enable-fast-install was given. if test "${enable_fast_install+set}" = set; then : enableval=$enable_fast_install; p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac else enable_fast_install=yes fi # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' test -z "$LN_S" && LN_S="ln -s" if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for objdir" >&5 $as_echo_n "checking for objdir... " >&6; } if ${lt_cv_objdir+:} false; then : $as_echo_n "(cached) " >&6 else rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_objdir" >&5 $as_echo "$lt_cv_objdir" >&6; } objdir=$lt_cv_objdir cat >>confdefs.h <<_ACEOF #define LT_OBJDIR "$lt_cv_objdir/" _ACEOF case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o for cc_temp in $compiler""; do case $cc_temp in compile | *[\\/]compile | ccache | *[\\/]ccache ) ;; distcc | *[\\/]distcc | purify | *[\\/]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ${ac_tool_prefix}file" >&5 $as_echo_n "checking for ${ac_tool_prefix}file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/${ac_tool_prefix}file; then lt_cv_path_MAGIC_CMD="$ac_dir/${ac_tool_prefix}file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for file" >&5 $as_echo_n "checking for file... " >&6; } if ${lt_cv_path_MAGIC_CMD+:} false; then : $as_echo_n "(cached) " >&6 else case $MAGIC_CMD in [\\/*] | ?:[\\/]*) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR ac_dummy="/usr/bin$PATH_SEPARATOR$PATH" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/file; then lt_cv_path_MAGIC_CMD="$ac_dir/file" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac fi MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $MAGIC_CMD" >&5 $as_echo "$MAGIC_CMD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else MAGIC_CMD=: fi fi fi ;; esac # Use C for the default configuration in the libtool script lt_save_CC="$CC" ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o objext=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* if test -n "$compiler"; then lt_prog_compiler_no_builtin_flag= if test "$GCC" = yes; then case $cc_basename in nvcc*) lt_prog_compiler_no_builtin_flag=' -Xcompiler -fno-builtin' ;; *) lt_prog_compiler_no_builtin_flag=' -fno-builtin' ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -fno-rtti -fno-exceptions" >&5 $as_echo_n "checking if $compiler supports -fno-rtti -fno-exceptions... " >&6; } if ${lt_cv_prog_compiler_rtti_exceptions+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_rtti_exceptions=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-fno-rtti -fno-exceptions" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_rtti_exceptions=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_rtti_exceptions" >&5 $as_echo "$lt_cv_prog_compiler_rtti_exceptions" >&6; } if test x"$lt_cv_prog_compiler_rtti_exceptions" = xyes; then lt_prog_compiler_no_builtin_flag="$lt_prog_compiler_no_builtin_flag -fno-rtti -fno-exceptions" else : fi fi lt_prog_compiler_wl= lt_prog_compiler_pic= lt_prog_compiler_static= if test "$GCC" = yes; then lt_prog_compiler_wl='-Wl,' lt_prog_compiler_static='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support lt_prog_compiler_pic='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. lt_prog_compiler_pic='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries lt_prog_compiler_pic='-DDLL_EXPORT' ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files lt_prog_compiler_pic='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. lt_prog_compiler_static= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) lt_prog_compiler_pic='-fPIC' ;; esac ;; interix[3-9]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. lt_prog_compiler_can_build_shared=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then lt_prog_compiler_pic=-Kconform_pic fi ;; *) lt_prog_compiler_pic='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 lt_prog_compiler_wl='-Xlinker ' if test -n "$lt_prog_compiler_pic"; then lt_prog_compiler_pic="-Xcompiler $lt_prog_compiler_pic" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) lt_prog_compiler_wl='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor lt_prog_compiler_static='-Bstatic' else lt_prog_compiler_static='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). lt_prog_compiler_pic='-DDLL_EXPORT' ;; hpux9* | hpux10* | hpux11*) lt_prog_compiler_wl='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) lt_prog_compiler_pic='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? lt_prog_compiler_static='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) lt_prog_compiler_wl='-Wl,' # PIC (with -KPIC) is the default. lt_prog_compiler_static='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; # Lahey Fortran 8.1. lf95*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='--shared' lt_prog_compiler_static='--static' ;; nagfor*) # NAG Fortran compiler lt_prog_compiler_wl='-Wl,-Wl,,' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; ccc*) lt_prog_compiler_wl='-Wl,' # All Alpha code is PIC. lt_prog_compiler_static='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-qpic' lt_prog_compiler_static='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [1-7].* | *Sun*Fortran*\ 8.[0-3]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='' ;; *Sun\ F* | *Sun*Fortran*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' lt_prog_compiler_wl='-Wl,' ;; *Intel*\ [CF]*Compiler*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fPIC' lt_prog_compiler_static='-static' ;; *Portland\ Group*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-fpic' lt_prog_compiler_static='-Bstatic' ;; esac ;; esac ;; newsos6) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. lt_prog_compiler_pic='-fPIC -shared' ;; osf3* | osf4* | osf5*) lt_prog_compiler_wl='-Wl,' # All OSF/1 code is PIC. lt_prog_compiler_static='-non_shared' ;; rdos*) lt_prog_compiler_static='-non_shared' ;; solaris*) lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) lt_prog_compiler_wl='-Qoption ld ';; *) lt_prog_compiler_wl='-Wl,';; esac ;; sunos4*) lt_prog_compiler_wl='-Qoption ld ' lt_prog_compiler_pic='-PIC' lt_prog_compiler_static='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then lt_prog_compiler_pic='-Kconform_pic' lt_prog_compiler_static='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_pic='-KPIC' lt_prog_compiler_static='-Bstatic' ;; unicos*) lt_prog_compiler_wl='-Wl,' lt_prog_compiler_can_build_shared=no ;; uts4*) lt_prog_compiler_pic='-pic' lt_prog_compiler_static='-Bstatic' ;; *) lt_prog_compiler_can_build_shared=no ;; esac fi case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) lt_prog_compiler_pic= ;; *) lt_prog_compiler_pic="$lt_prog_compiler_pic -DPIC" ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $compiler option to produce PIC" >&5 $as_echo_n "checking for $compiler option to produce PIC... " >&6; } if ${lt_cv_prog_compiler_pic+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic=$lt_prog_compiler_pic fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic" >&5 $as_echo "$lt_cv_prog_compiler_pic" >&6; } lt_prog_compiler_pic=$lt_cv_prog_compiler_pic # # Check to make sure the PIC flag actually works. # if test -n "$lt_prog_compiler_pic"; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler PIC flag $lt_prog_compiler_pic works" >&5 $as_echo_n "checking if $compiler PIC flag $lt_prog_compiler_pic works... " >&6; } if ${lt_cv_prog_compiler_pic_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_pic_works=no ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$lt_prog_compiler_pic -DPIC" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_pic_works=yes fi fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_pic_works" >&5 $as_echo "$lt_cv_prog_compiler_pic_works" >&6; } if test x"$lt_cv_prog_compiler_pic_works" = xyes; then case $lt_prog_compiler_pic in "" | " "*) ;; *) lt_prog_compiler_pic=" $lt_prog_compiler_pic" ;; esac else lt_prog_compiler_pic= lt_prog_compiler_can_build_shared=no fi fi # # Check to make sure the static flag actually works. # wl=$lt_prog_compiler_wl eval lt_tmp_static_flag=\"$lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler static flag $lt_tmp_static_flag works" >&5 $as_echo_n "checking if $compiler static flag $lt_tmp_static_flag works... " >&6; } if ${lt_cv_prog_compiler_static_works+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_static_works=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $lt_tmp_static_flag" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler_static_works=yes fi else lt_cv_prog_compiler_static_works=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_static_works" >&5 $as_echo "$lt_cv_prog_compiler_static_works" >&6; } if test x"$lt_cv_prog_compiler_static_works" = xyes; then : else lt_prog_compiler_static= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $compiler supports -c -o file.$ac_objext" >&5 $as_echo_n "checking if $compiler supports -c -o file.$ac_objext... " >&6; } if ${lt_cv_prog_compiler_c_o+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler_c_o=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 echo "$as_me:$LINENO: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then lt_cv_prog_compiler_c_o=yes fi fi chmod u+w . 2>&5 $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler_c_o" >&5 $as_echo "$lt_cv_prog_compiler_c_o" >&6; } hard_links="nottested" if test "$lt_cv_prog_compiler_c_o" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user { $as_echo "$as_me:${as_lineno-$LINENO}: checking if we can lock with hard links" >&5 $as_echo_n "checking if we can lock with hard links... " >&6; } hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hard_links" >&5 $as_echo "$hard_links" >&6; } if test "$hard_links" = no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&5 $as_echo "$as_me: WARNING: \`$CC' does not support \`-c -o', so \`make -j' may be unsafe" >&2;} need_locks=warn fi else need_locks=no fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $compiler linker ($LD) supports shared libraries" >&5 $as_echo_n "checking whether the $compiler linker ($LD) supports shared libraries... " >&6; } runpath_var= allow_undefined_flag= always_export_symbols=no archive_cmds= archive_expsym_cmds= compiler_needs_object=no enable_shared_with_static_runtimes=no export_dynamic_flag_spec= export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' hardcode_automatic=no hardcode_direct=no hardcode_direct_absolute=no hardcode_libdir_flag_spec= hardcode_libdir_separator= hardcode_minus_L=no hardcode_shlibpath_var=unsupported inherit_rpath=no link_all_deplibs=unknown module_cmds= module_expsym_cmds= old_archive_from_new_cmds= old_archive_from_expsyms_cmds= thread_safe_flag_spec= whole_archive_flag_spec= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list include_expsyms= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. exclude_expsyms='_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*' # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac ld_shlibs=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[2-9]*) ;; *\ \(GNU\ Binutils\)\ [3-9]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' export_dynamic_flag_spec='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then whole_archive_flag_spec="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else whole_archive_flag_spec= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [01].* | *\ 2.[0-9].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[3-9]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then allow_undefined_flag=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME archive_cmds='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else ld_shlibs=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless, # as there is no search path for DLLs. hardcode_libdir_flag_spec='-L$libdir' export_dynamic_flag_spec='${wl}--export-all-symbols' allow_undefined_flag=unsupported always_export_symbols=no enable_shared_with_static_runtimes=yes export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1 DATA/;s/^.*[ ]__nm__\([^ ]*\)[ ][^ ]*/\1 DATA/;/^I[ ]/d;/^[AITW][ ]/s/.* //'\'' | sort | uniq > $export_symbols' exclude_expsyms='[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname' if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else ld_shlibs=no fi ;; haiku*) archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' link_all_deplibs=yes ;; interix[3-9]*) hardcode_direct=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' archive_expsym_cmds='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 whole_archive_flag_spec= tmp_sharedflag='--shared' ;; xl[cC]* | bgxl[cC]* | mpixl[cC]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 whole_archive_flag_spec='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 whole_archive_flag_spec='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' compiler_needs_object=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac archive_cmds='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself whole_archive_flag_spec='--whole-archive$convenience --no-whole-archive' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then archive_expsym_cmds='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else ld_shlibs=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [01].* | *\ 2.[0-9].* | *\ 2.1[0-5].*) ld_shlibs=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac ;; sunos4*) archive_cmds='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= hardcode_direct=yes hardcode_shlibpath_var=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else ld_shlibs=no fi ;; esac if test "$ld_shlibs" = no; then runpath_var= hardcode_libdir_flag_spec= export_dynamic_flag_spec= whole_archive_flag_spec= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) allow_undefined_flag=unsupported always_export_symbols=yes archive_expsym_cmds='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. hardcode_minus_L=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. hardcode_direct=unsupported fi ;; aix[4-9]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then export_symbols_cmds='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else export_symbols_cmds='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && (substr(\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[23]|aix4.[23].*|aix[5-9]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. archive_cmds='' hardcode_direct=yes hardcode_direct_absolute=yes hardcode_libdir_separator=':' link_all_deplibs=yes file_list_spec='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[012]|aix4.[012].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 hardcode_direct=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking hardcode_minus_L=yes hardcode_libdir_flag_spec='-L$libdir' hardcode_libdir_separator= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi export_dynamic_flag_spec='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. always_export_symbols=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. allow_undefined_flag='-berok' # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" archive_expsym_cmds='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib' allow_undefined_flag="-z nodefs" archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else if ${lt_cv_aix_libpath_+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_aix_libpath_sed=' /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }' lt_cv_aix_libpath_=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test -z "$lt_cv_aix_libpath_"; then lt_cv_aix_libpath_="/usr/lib:/lib" fi fi aix_libpath=$lt_cv_aix_libpath_ fi hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. no_undefined_flag=' ${wl}-bernotok' allow_undefined_flag=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. whole_archive_flag_spec='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives whole_archive_flag_spec='$convenience' fi archive_cmds_need_lc=yes # This is similar to how AIX traditionally builds its shared libraries. archive_expsym_cmds="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' archive_expsym_cmds='' ;; m68k) archive_cmds='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes ;; esac ;; bsdi[45]*) export_dynamic_flag_spec=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported always_export_symbols=yes file_list_spec='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' archive_expsym_cmds='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, )='true' enable_shared_with_static_runtimes=yes exclude_expsyms='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' export_symbols_cmds='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[BCDGRS][ ]/s/.*[ ]\([^ ]*\)/\1,DATA/'\'' | $SED -e '\''/^[AITW][ ]/s/.*[ ]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib old_postinstall_cmds='chmod 644 $oldlib' postlink_cmds='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper hardcode_libdir_flag_spec=' ' allow_undefined_flag=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. archive_cmds='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. old_archive_from_new_cmds='true' # FIXME: Should let the user specify the lib program. old_archive_cmds='lib -OUT:$oldlib$oldobjs$old_deplibs' enable_shared_with_static_runtimes=yes ;; esac ;; darwin* | rhapsody*) archive_cmds_need_lc=no hardcode_direct=no hardcode_automatic=yes hardcode_shlibpath_var=unsupported if test "$lt_cv_ld_force_load" = "yes"; then whole_archive_flag_spec='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' else whole_archive_flag_spec='' fi link_all_deplibs=yes allow_undefined_flag="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all archive_cmds="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" module_cmds="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" archive_expsym_cmds="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" module_expsym_cmds="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" else ld_shlibs=no fi ;; dgux*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; hpux9*) if test "$GCC" = yes; then archive_cmds='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else archive_cmds='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes export_dynamic_flag_spec='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) archive_cmds='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) archive_cmds='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) { $as_echo "$as_me:${as_lineno-$LINENO}: checking if $CC understands -b" >&5 $as_echo_n "checking if $CC understands -b... " >&6; } if ${lt_cv_prog_compiler__b+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_prog_compiler__b=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -b" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&5 $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then lt_cv_prog_compiler__b=yes fi else lt_cv_prog_compiler__b=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_prog_compiler__b" >&5 $as_echo "$lt_cv_prog_compiler__b" >&6; } if test x"$lt_cv_prog_compiler__b" = xyes; then archive_cmds='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi ;; esac fi if test "$with_gnu_ld" = no; then hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir' hardcode_libdir_separator=: case $host_cpu in hppa*64*|ia64*) hardcode_direct=no hardcode_shlibpath_var=no ;; *) hardcode_direct=yes hardcode_direct_absolute=yes export_dynamic_flag_spec='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. hardcode_minus_L=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then archive_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether the $host_os linker accepts -exported_symbol" >&5 $as_echo_n "checking whether the $host_os linker accepts -exported_symbol... " >&6; } if ${lt_cv_irix_exported_symbol+:} false; then : $as_echo_n "(cached) " >&6 else save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int foo (void) { return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : lt_cv_irix_exported_symbol=yes else lt_cv_irix_exported_symbol=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS="$save_LDFLAGS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_irix_exported_symbol" >&5 $as_echo "$lt_cv_irix_exported_symbol" >&6; } if test "$lt_cv_irix_exported_symbol" = yes; then archive_expsym_cmds='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else archive_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: inherit_rpath=yes link_all_deplibs=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi hardcode_libdir_flag_spec='-R$libdir' hardcode_direct=yes hardcode_shlibpath_var=no ;; newsos6) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: hardcode_shlibpath_var=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then hardcode_direct=yes hardcode_shlibpath_var=no hardcode_direct_absolute=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' export_dynamic_flag_spec='${wl}-E' else case $host_os in openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*) archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-R$libdir' ;; *) archive_cmds='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' hardcode_libdir_flag_spec='${wl}-rpath,$libdir' ;; esac fi else ld_shlibs=no fi ;; os2*) hardcode_libdir_flag_spec='-L$libdir' hardcode_minus_L=yes allow_undefined_flag=unsupported archive_cmds='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' old_archive_from_new_cmds='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi archive_cmds_need_lc='no' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' hardcode_libdir_separator=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then allow_undefined_flag=' ${wl}-expect_unresolved ${wl}\*' archive_cmds='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir' else allow_undefined_flag=' -expect_unresolved \*' archive_cmds='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' archive_expsym_cmds='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly hardcode_libdir_flag_spec='-rpath $libdir' fi archive_cmds_need_lc='no' hardcode_libdir_separator=: ;; solaris*) no_undefined_flag=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' archive_cmds='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' archive_cmds='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' archive_cmds='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi hardcode_libdir_flag_spec='-R$libdir' hardcode_shlibpath_var=no case $host_os in solaris2.[0-5] | solaris2.[0-5].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then whole_archive_flag_spec='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else whole_archive_flag_spec='-z allextract$convenience -z defaultextract' fi ;; esac link_all_deplibs=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. archive_cmds='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi hardcode_libdir_flag_spec='-L$libdir' hardcode_direct=yes hardcode_minus_L=yes hardcode_shlibpath_var=no ;; sysv4) case $host_vendor in sni) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. archive_cmds='$LD -G -o $lib $libobjs $deplibs $linker_flags' reload_cmds='$CC -r -o $output$reload_objs' hardcode_direct=no ;; motorola) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_direct=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' hardcode_shlibpath_var=no ;; sysv4.3*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no export_dynamic_flag_spec='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_shlibpath_var=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes ld_shlibs=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[01].[10]* | unixware7* | sco3.2v5.0.[024]*) no_undefined_flag='${wl}-z,text' archive_cmds_need_lc=no hardcode_shlibpath_var=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. no_undefined_flag='${wl}-z,text' allow_undefined_flag='${wl}-z,nodefs' archive_cmds_need_lc=no hardcode_shlibpath_var=no hardcode_libdir_flag_spec='${wl}-R,$libdir' hardcode_libdir_separator=':' link_all_deplibs=yes export_dynamic_flag_spec='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then archive_cmds='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else archive_cmds='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' archive_expsym_cmds='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) archive_cmds='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' hardcode_libdir_flag_spec='-L$libdir' hardcode_shlibpath_var=no ;; *) ld_shlibs=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) export_dynamic_flag_spec='${wl}-Blargedynsym' ;; esac fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ld_shlibs" >&5 $as_echo "$ld_shlibs" >&6; } test "$ld_shlibs" = no && can_build_shared=no with_gnu_ld=$with_gnu_ld # # Do we need to explicitly link libc? # case "x$archive_cmds_need_lc" in x|xyes) # Assume -lc should be added archive_cmds_need_lc=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $archive_cmds in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether -lc should be explicitly linked in" >&5 $as_echo_n "checking whether -lc should be explicitly linked in... " >&6; } if ${lt_cv_archive_cmds_need_lc+:} false; then : $as_echo_n "(cached) " >&6 else $RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_compile\""; } >&5 (eval $ac_compile) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$lt_prog_compiler_wl pic_flag=$lt_prog_compiler_pic compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$allow_undefined_flag allow_undefined_flag= if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1\""; } >&5 (eval $archive_cmds 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } then lt_cv_archive_cmds_need_lc=no else lt_cv_archive_cmds_need_lc=yes fi allow_undefined_flag=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_archive_cmds_need_lc" >&5 $as_echo "$lt_cv_archive_cmds_need_lc" >&6; } archive_cmds_need_lc=$lt_cv_archive_cmds_need_lc ;; esac fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking dynamic linker characteristics" >&5 $as_echo_n "checking dynamic linker characteristics... " >&6; } if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([A-Za-z]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[lt_foo]++; } if (lt_freq[lt_foo] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([A-Za-z]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[4-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[01] | aix4.[01].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([^/]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[45]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api" ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([a-zA-Z]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | $GREP ';[c-zC-Z]:/' >/dev/null; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib" sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[23].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[01]* | freebsdelf3.[01]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[2-9]* | freebsdelf3.[2-9]* | \ freebsd4.[0-5] | freebsdelf4.[0-5] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[3-9]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH if ${lt_cv_shlibpath_overrides_runpath+:} false; then : $as_echo_n "(cached) " >&6 else lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$lt_prog_compiler_wl\"; \ LDFLAGS=\"\$LDFLAGS $hardcode_libdir_flag_spec\"" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : if ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null; then : lt_cv_shlibpath_overrides_runpath=yes fi fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LDFLAGS=$save_LDFLAGS libdir=$save_libdir fi shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \$2)); skip = 1; } { if (!skip) print \$0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[89] | openbsd2.[89].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $dynamic_linker" >&5 $as_echo "$dynamic_linker" >&6; } test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to hardcode library paths into programs" >&5 $as_echo_n "checking how to hardcode library paths into programs... " >&6; } hardcode_action= if test -n "$hardcode_libdir_flag_spec" || test -n "$runpath_var" || test "X$hardcode_automatic" = "Xyes" ; then # We can hardcode non-existent directories. if test "$hardcode_direct" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, )" != no && test "$hardcode_minus_L" != no; then # Linking always hardcodes the temporary library directory. hardcode_action=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. hardcode_action=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. hardcode_action=unsupported fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $hardcode_action" >&5 $as_echo "$hardcode_action" >&6; } if test "$hardcode_action" = relink || test "$inherit_rpath" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes fi ;; *) ac_fn_c_check_func "$LINENO" "shl_load" "ac_cv_func_shl_load" if test "x$ac_cv_func_shl_load" = xyes; then : lt_cv_dlopen="shl_load" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for shl_load in -ldld" >&5 $as_echo_n "checking for shl_load in -ldld... " >&6; } if ${ac_cv_lib_dld_shl_load+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char shl_load (); int main () { return shl_load (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_shl_load=yes else ac_cv_lib_dld_shl_load=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_shl_load" >&5 $as_echo "$ac_cv_lib_dld_shl_load" >&6; } if test "x$ac_cv_lib_dld_shl_load" = xyes; then : lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld" else ac_fn_c_check_func "$LINENO" "dlopen" "ac_cv_func_dlopen" if test "x$ac_cv_func_dlopen" = xyes; then : lt_cv_dlopen="dlopen" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -ldl" >&5 $as_echo_n "checking for dlopen in -ldl... " >&6; } if ${ac_cv_lib_dl_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dl_dlopen=yes else ac_cv_lib_dl_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dl_dlopen" >&5 $as_echo "$ac_cv_lib_dl_dlopen" >&6; } if test "x$ac_cv_lib_dl_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dlopen in -lsvld" >&5 $as_echo_n "checking for dlopen in -lsvld... " >&6; } if ${ac_cv_lib_svld_dlopen+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsvld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dlopen (); int main () { return dlopen (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_svld_dlopen=yes else ac_cv_lib_svld_dlopen=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_svld_dlopen" >&5 $as_echo "$ac_cv_lib_svld_dlopen" >&6; } if test "x$ac_cv_lib_svld_dlopen" = xyes; then : lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld" else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for dld_link in -ldld" >&5 $as_echo_n "checking for dld_link in -ldld... " >&6; } if ${ac_cv_lib_dld_dld_link+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-ldld $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char dld_link (); int main () { return dld_link (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_dld_dld_link=yes else ac_cv_lib_dld_dld_link=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_dld_dld_link" >&5 $as_echo "$ac_cv_lib_dld_dld_link" >&6; } if test "x$ac_cv_lib_dld_dld_link" = xyes; then : lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld" fi fi fi fi fi fi ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a program can dlopen itself" >&5 $as_echo_n "checking whether a program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self=no ;; esac else : # compilation failed lt_cv_dlopen_self=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self" >&5 $as_echo "$lt_cv_dlopen_self" >&6; } if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether a statically linked program can dlopen itself" >&5 $as_echo_n "checking whether a statically linked program can dlopen itself... " >&6; } if ${lt_cv_dlopen_self_static+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : lt_cv_dlopen_self_static=cross else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF #line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; } _LT_EOF if { { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_link\""; } >&5 (eval $ac_link) 2>&5 ac_status=$? $as_echo "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5 test $ac_status = 0; } && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&5 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlneed_uscore) lt_cv_dlopen_self_static=yes ;; x$lt_dlunknown|x*) lt_cv_dlopen_self_static=no ;; esac else : # compilation failed lt_cv_dlopen_self_static=no fi fi rm -fr conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lt_cv_dlopen_self_static" >&5 $as_echo "$lt_cv_dlopen_self_static" >&6; } fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi striplib= old_striplib= { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether stripping libraries is possible" >&5 $as_echo_n "checking whether stripping libraries is possible... " >&6; } if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } ;; esac fi # Report which library types will actually be built { $as_echo "$as_me:${as_lineno-$LINENO}: checking if libtool supports shared libraries" >&5 $as_echo_n "checking if libtool supports shared libraries... " >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: result: $can_build_shared" >&5 $as_echo "$can_build_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build shared libraries" >&5 $as_echo_n "checking whether to build shared libraries... " >&6; } test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[4-9]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_shared" >&5 $as_echo "$enable_shared" >&6; } { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to build static libraries" >&5 $as_echo_n "checking whether to build static libraries... " >&6; } # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes { $as_echo "$as_me:${as_lineno-$LINENO}: result: $enable_static" >&5 $as_echo "$enable_static" >&6; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu CC="$lt_save_CC" ac_config_commands="$ac_config_commands libtool" # Only expand once: ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu { $as_echo "$as_me:${as_lineno-$LINENO}: checking how to run the C preprocessor" >&5 $as_echo_n "checking how to run the C preprocessor... " >&6; } # On Suns, sometimes $CPP names a directory. if test -n "$CPP" && test -d "$CPP"; then CPP= fi if test -z "$CPP"; then if ${ac_cv_prog_CPP+:} false; then : $as_echo_n "(cached) " >&6 else # Double quotes because CPP needs to be expanded for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp" do ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : break fi done ac_cv_prog_CPP=$CPP fi CPP=$ac_cv_prog_CPP else ac_cv_prog_CPP=$CPP fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP" >&5 $as_echo "$CPP" >&6; } ac_preproc_ok=false for ac_c_preproc_warn_flag in '' yes do # Use a header file that comes with gcc, so configuring glibc # with a fresh cross-compiler works. # Prefer to if __STDC__ is defined, since # exists even on freestanding compilers. # On the NeXT, cc -E runs the code through the compiler's parser, # not just through cpp. "Syntax error" is here to catch this case. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __STDC__ # include #else # include #endif Syntax error _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : else # Broken: fails on valid input. continue fi rm -f conftest.err conftest.i conftest.$ac_ext # OK, works on sane cases. Now check whether nonexistent headers # can be detected and how. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : # Broken: success on invalid input. continue else # Passes both tests. ac_preproc_ok=: break fi rm -f conftest.err conftest.i conftest.$ac_ext done # Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped. rm -f conftest.i conftest.err conftest.$ac_ext if $ac_preproc_ok; then : else { { $as_echo "$as_me:${as_lineno-$LINENO}: error: in \`$ac_pwd':" >&5 $as_echo "$as_me: error: in \`$ac_pwd':" >&2;} as_fn_error $? "C preprocessor \"$CPP\" fails sanity check See \`config.log' for more details" "$LINENO" 5; } fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu # Extract the first word of "cpp", so it can be a program name with args. set dummy cpp; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_CPP_FOR_BUILD+:} false; then : $as_echo_n "(cached) " >&6 else case $CPP_FOR_BUILD in [\\/]* | ?:[\\/]*) ac_cv_path_CPP_FOR_BUILD="$CPP_FOR_BUILD" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_CPP_FOR_BUILD="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi CPP_FOR_BUILD=$ac_cv_path_CPP_FOR_BUILD if test -n "$CPP_FOR_BUILD"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $CPP_FOR_BUILD" >&5 $as_echo "$CPP_FOR_BUILD" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -z "${CPP_FOR_BUILD}"; then as_fn_error $? "cannot find cpp" "$LINENO" 5 fi if test "$with_gnu_ld" = "yes"; then WITH_GNU_LD_TRUE= WITH_GNU_LD_FALSE='#' else WITH_GNU_LD_TRUE='#' WITH_GNU_LD_FALSE= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ${MAKE-make} sets \$(MAKE)" >&5 $as_echo_n "checking whether ${MAKE-make} sets \$(MAKE)... " >&6; } set x ${MAKE-make} ac_make=`$as_echo "$2" | sed 's/+/p/g; s/[^a-zA-Z0-9_]/_/g'` if eval \${ac_cv_prog_make_${ac_make}_set+:} false; then : $as_echo_n "(cached) " >&6 else cat >conftest.make <<\_ACEOF SHELL = /bin/sh all: @echo '@@@%%%=$(MAKE)=@@@%%%' _ACEOF # GNU make sometimes prints "make[1]: Entering ...", which would confuse us. case `${MAKE-make} -f conftest.make 2>/dev/null` in *@@@%%%=?*=@@@%%%*) eval ac_cv_prog_make_${ac_make}_set=yes;; *) eval ac_cv_prog_make_${ac_make}_set=no;; esac rm -f conftest.make fi if eval test \$ac_cv_prog_make_${ac_make}_set = yes; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } SET_MAKE= else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } SET_MAKE="MAKE=${MAKE-make}" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether ln -s works" >&5 $as_echo_n "checking whether ln -s works... " >&6; } LN_S=$as_ln_s if test "$LN_S" = "ln -s"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no, using $LN_S" >&5 $as_echo "no, using $LN_S" >&6; } fi # Check whether --enable-trace was given. if test "${enable_trace+set}" = set; then : enableval=$enable_trace; fi if test "x${enable_trace}" = "xyes" ; then $as_echo "#define IPMI_TRACE 1" >>confdefs.h elif test "x${enable_trace}" = "x" ; then enable_trace=no fi # Check whether --enable-profiling was given. if test "${enable_profiling+set}" = set; then : enableval=$enable_profiling; fi if test "x${enable_profiling}" = "x" ; then enable_profiling=no fi # Check whether --enable-debug was given. if test "${enable_debug+set}" = set; then : enableval=$enable_debug; fi if test "x${enable_debug}" = "xyes"; then if test "$GCC" = "yes" && test "x${enable_profiling}" = "xyes"; then CFLAGS="$CFLAGS -ggdb -Wall -pg" elif test "$GCC" = "yes" && test "x${enable_profiling}" = "xno"; then CFLAGS="$CFLAGS -ggdb -Wall" elif test "$ac_cv_prog_cc_g" = "yes"; then CFLAGS="$CFLAGS -g" fi WITH_DEBUG=1 else if test "x${enable_debug}" = "x" ; then enable_debug=no fi $as_echo "#define NDEBUG 1" >>confdefs.h WITH_DEBUG=0 fi # Check whether --enable-rawdumps was given. if test "${enable_rawdumps+set}" = set; then : enableval=$enable_rawdumps; fi if test "x${enable_rawdumps}" = "xyes"; then $as_echo "#define WITH_RAWDUMPS 1" >>confdefs.h fi INSTALL_DAEMON_SCRIPTS=install-init-scripts UNINSTALL_DAEMON_SCRIPTS=uninstall-init-scripts # Check whether --enable-init-scripts was given. if test "${enable_init_scripts+set}" = set; then : enableval=$enable_init_scripts; fi if test x"$enable_init_scripts" = xno; then INSTALL_DAEMON_SCRIPTS= fi # Check for systemd if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then if test -n "$ac_tool_prefix"; then # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args. set dummy ${ac_tool_prefix}pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi PKG_CONFIG=$ac_cv_path_PKG_CONFIG if test -n "$PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PKG_CONFIG" >&5 $as_echo "$PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi fi if test -z "$ac_cv_path_PKG_CONFIG"; then ac_pt_PKG_CONFIG=$PKG_CONFIG # Extract the first word of "pkg-config", so it can be a program name with args. set dummy pkg-config; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_path_ac_pt_PKG_CONFIG+:} false; then : $as_echo_n "(cached) " >&6 else case $ac_pt_PKG_CONFIG in [\\/]* | ?:[\\/]*) ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path. ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_path_ac_pt_PKG_CONFIG="$as_dir/$ac_word$ac_exec_ext" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS ;; esac fi ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG if test -n "$ac_pt_PKG_CONFIG"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_pt_PKG_CONFIG" >&5 $as_echo "$ac_pt_PKG_CONFIG" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test "x$ac_pt_PKG_CONFIG" = x; then PKG_CONFIG="" else case $cross_compiling:$ac_tool_warned in yes:) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: using cross tools not prefixed with host triplet" >&5 $as_echo "$as_me: WARNING: using cross tools not prefixed with host triplet" >&2;} ac_tool_warned=yes ;; esac PKG_CONFIG=$ac_pt_PKG_CONFIG fi else PKG_CONFIG="$ac_cv_path_PKG_CONFIG" fi fi if test -n "$PKG_CONFIG"; then _pkg_min_version=0.9.0 { $as_echo "$as_me:${as_lineno-$LINENO}: checking pkg-config is at least version $_pkg_min_version" >&5 $as_echo_n "checking pkg-config is at least version $_pkg_min_version... " >&6; } if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } PKG_CONFIG="" fi fi if test x"$PKG_CONFIG" = x; then : PKG_CONFIG=false fi # Check whether --with-systemdsystemunitdir was given. if test "${with_systemdsystemunitdir+set}" = set; then : withval=$with_systemdsystemunitdir; else with_systemdsystemunitdir=$($PKG_CONFIG --variable=systemdsystemunitdir systemd) fi if test x"$with_systemdsystemunitdir" != xno; then : systemdsystemunitdir=$with_systemdsystemunitdir fi if test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno; then HAVE_SYSTEMD_TRUE= HAVE_SYSTEMD_FALSE='#' else HAVE_SYSTEMD_TRUE='#' HAVE_SYSTEMD_FALSE= fi if test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno; then INSTALL_DAEMON_SCRIPTS=install-systemd-scripts UNINSTALL_DAEMON_SCRIPTS=uninstall-systemd-scripts fi # Check whether --enable-ipmisdrcachedir was given. if test "${enable_ipmisdrcachedir+set}" = set; then : enableval=$enable_ipmisdrcachedir; fi INSTALL_IPMISDRCACHEDIR=install-ipmisdrcachedir if test x"$enable_ipmisdrcachedir" = xno; then INSTALL_IPMISDRCACHEDIR= fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for encryption support" >&5 $as_echo_n "checking for encryption support... " >&6; } # Check whether --with-encryption was given. if test "${with_encryption+set}" = set; then : withval=$with_encryption; case "$withval" in no) ac_with_encryption=no ;; yes) ac_with_encryption=yes ;; *) ac_with_encryption=yes ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_with_encryption=yes}" >&5 $as_echo "${ac_with_encryption=yes}" >&6; } if test x"${ac_with_encryption}" = xyes; then $as_echo "#define WITH_ENCRYPTION 1" >>confdefs.h fi if test x"${ac_with_encryption}" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gcry_md_open in -lgcrypt" >&5 $as_echo_n "checking for gcry_md_open in -lgcrypt... " >&6; } if ${ac_cv_lib_gcrypt_gcry_md_open+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgcrypt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gcry_md_open (); int main () { return gcry_md_open (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gcrypt_gcry_md_open=yes else ac_cv_lib_gcrypt_gcry_md_open=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gcrypt_gcry_md_open" >&5 $as_echo "$ac_cv_lib_gcrypt_gcry_md_open" >&6; } if test "x$ac_cv_lib_gcrypt_gcry_md_open" = xyes; then : have_gcrypt=yes else have_gcrypt=no fi if test "x${have_gcrypt}" = "xno"; then as_fn_error $? "libgcrypt required to build libfreeipmi" "$LINENO" 5 { $as_echo "$as_me:${as_lineno-$LINENO}: Note: libgpg-error required for libgcrypt" >&5 $as_echo "$as_me: Note: libgpg-error required for libgcrypt" >&6;} fi for ac_header in gcrypt.h do : ac_fn_c_check_header_mongrel "$LINENO" "gcrypt.h" "ac_cv_header_gcrypt_h" "$ac_includes_default" if test "x$ac_cv_header_gcrypt_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GCRYPT_H 1 _ACEOF have_gcrypt_header=yes else have_gcrypt_header=no fi done if test "x${have_gcrypt_header}" = "xno"; then as_fn_error $? "gcrypt.h not found" "$LINENO" 5 fi ac_fn_c_check_decl "$LINENO" "GCRYCTL_SET_THREAD_CBS" "ac_cv_have_decl_GCRYCTL_SET_THREAD_CBS" "#include " if test "x$ac_cv_have_decl_GCRYCTL_SET_THREAD_CBS" = xyes; then : have_gcrypt_threads=yes else have_gcrypt_threads=no fi if test "x${have_gcrypt_threads}" = "xno"; then as_fn_error $? "libgcrypt with threads support required for libfreeipmi" "$LINENO" 5 fi GCRYPT_LIBS=-lgcrypt fi ac_fn_c_check_func "$LINENO" "getopt_long" "ac_cv_func_getopt_long" if test "x$ac_cv_func_getopt_long" = xyes; then : have_getopt_long=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for getopt_long in -lgnugetopt" >&5 $as_echo_n "checking for getopt_long in -lgnugetopt... " >&6; } if ${ac_cv_lib_gnugetopt_getopt_long+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lgnugetopt $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char getopt_long (); int main () { return getopt_long (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_gnugetopt_getopt_long=yes else ac_cv_lib_gnugetopt_getopt_long=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_gnugetopt_getopt_long" >&5 $as_echo "$ac_cv_lib_gnugetopt_getopt_long" >&6; } if test "x$ac_cv_lib_gnugetopt_getopt_long" = xyes; then : have_getopt_long=yes else as_fn_error $? "getopt_long not found." "$LINENO" 5 fi fi if test "x${have_getopt_long}" = "xyes"; then $as_echo "#define HAVE_GETOPT_LONG 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether byte ordering is bigendian" >&5 $as_echo_n "checking whether byte ordering is bigendian... " >&6; } if ${ac_cv_c_bigendian+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_bigendian=unknown # See if we're dealing with a universal compiler. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __APPLE_CC__ not a universal capable compiler #endif typedef int dummy; _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # Check for potential -arch flags. It is not universal unless # there are at least two -arch flags with different values. ac_arch= ac_prev= for ac_word in $CC $CFLAGS $CPPFLAGS $LDFLAGS; do if test -n "$ac_prev"; then case $ac_word in i?86 | x86_64 | ppc | ppc64) if test -z "$ac_arch" || test "$ac_arch" = "$ac_word"; then ac_arch=$ac_word else ac_cv_c_bigendian=universal break fi ;; esac ac_prev= elif test "x$ac_word" = "x-arch"; then ac_prev=arch fi done fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_c_bigendian = unknown; then # See if sys/param.h defines the BYTE_ORDER macro. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if ! (defined BYTE_ORDER && defined BIG_ENDIAN \ && defined LITTLE_ENDIAN && BYTE_ORDER && BIG_ENDIAN \ && LITTLE_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { #if BYTE_ORDER != BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # See if defines _LITTLE_ENDIAN or _BIG_ENDIAN (e.g., Solaris). cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if ! (defined _LITTLE_ENDIAN || defined _BIG_ENDIAN) bogus endian macros #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : # It does; now see whether it defined to _BIG_ENDIAN or not. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #ifndef _BIG_ENDIAN not big endian #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_bigendian=yes else ac_cv_c_bigendian=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test $ac_cv_c_bigendian = unknown; then # Compile a test program. if test "$cross_compiling" = yes; then : # Try to guess by grepping values from an object file. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ short int ascii_mm[] = { 0x4249, 0x4765, 0x6E44, 0x6961, 0x6E53, 0x7953, 0 }; short int ascii_ii[] = { 0x694C, 0x5454, 0x656C, 0x6E45, 0x6944, 0x6E61, 0 }; int use_ascii (int i) { return ascii_mm[i] + ascii_ii[i]; } short int ebcdic_ii[] = { 0x89D3, 0xE3E3, 0x8593, 0x95C5, 0x89C4, 0x9581, 0 }; short int ebcdic_mm[] = { 0xC2C9, 0xC785, 0x95C4, 0x8981, 0x95E2, 0xA8E2, 0 }; int use_ebcdic (int i) { return ebcdic_mm[i] + ebcdic_ii[i]; } extern int foo; int main () { return use_ascii (foo) == use_ebcdic (foo); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : if grep BIGenDianSyS conftest.$ac_objext >/dev/null; then ac_cv_c_bigendian=yes fi if grep LiTTleEnDian conftest.$ac_objext >/dev/null ; then if test "$ac_cv_c_bigendian" = unknown; then ac_cv_c_bigendian=no else # finding both strings is unlikely to happen, but who knows? ac_cv_c_bigendian=unknown fi fi fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int main () { /* Are we little or big endian? From Harbison&Steele. */ union { long int l; char c[sizeof (long int)]; } u; u.l = 1; return u.c[sizeof (long int) - 1] == 1; ; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_bigendian=no else ac_cv_c_bigendian=yes fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_bigendian" >&5 $as_echo "$ac_cv_c_bigendian" >&6; } case $ac_cv_c_bigendian in #( yes) $as_echo "#define WORDS_BIGENDIAN 1" >>confdefs.h ;; #( no) ;; #( universal) $as_echo "#define AC_APPLE_UNIVERSAL_BUILD 1" >>confdefs.h ;; #( *) as_fn_error $? "unknown endianness presetting ac_cv_c_bigendian=no (or yes) will help" "$LINENO" 5 ;; esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking for an ANSI C-conforming const" >&5 $as_echo_n "checking for an ANSI C-conforming const... " >&6; } if ${ac_cv_c_const+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ int main () { #ifndef __cplusplus /* Ultrix mips cc rejects this sort of thing. */ typedef int charset[2]; const charset cs = { 0, 0 }; /* SunOS 4.1.1 cc rejects this. */ char const *const *pcpcc; char **ppc; /* NEC SVR4.0.2 mips cc rejects this. */ struct point {int x, y;}; static struct point const zero = {0,0}; /* AIX XL C 1.02.0.0 rejects this. It does not let you subtract one const X* pointer from another in an arm of an if-expression whose if-part is not a constant expression */ const char *g = "string"; pcpcc = &g + (g ? g-g : 0); /* HPUX 7.0 cc rejects these. */ ++pcpcc; ppc = (char**) pcpcc; pcpcc = (char const *const *) ppc; { /* SCO 3.2v4 cc rejects this sort of thing. */ char tx; char *t = &tx; char const *s = 0 ? (char *) 0 : (char const *) 0; *t++ = 0; if (s) return 0; } { /* Someone thinks the Sun supposedly-ANSI compiler will reject this. */ int x[] = {25, 17}; const int *foo = &x[0]; ++foo; } { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */ typedef const int *iptr; iptr p = 0; ++p; } { /* AIX XL C 1.02.0.0 rejects this sort of thing, saying "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */ struct s { int j; const int *ap[3]; } bx; struct s *b = &bx; b->j = 5; } { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */ const int foo = 10; if (!foo) return 0; } return !cs[0] && !zero.x; #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_const=yes else ac_cv_c_const=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_const" >&5 $as_echo "$ac_cv_c_const" >&6; } if test $ac_cv_c_const = no; then $as_echo "#define const /**/" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for inline" >&5 $as_echo_n "checking for inline... " >&6; } if ${ac_cv_c_inline+:} false; then : $as_echo_n "(cached) " >&6 else ac_cv_c_inline=no for ac_kw in inline __inline__ __inline; do cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifndef __cplusplus typedef int foo_t; static $ac_kw foo_t static_foo () {return 0; } $ac_kw foo_t foo () {return 0; } #endif _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_c_inline=$ac_kw fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext test "$ac_cv_c_inline" != no && break done fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_inline" >&5 $as_echo "$ac_cv_c_inline" >&6; } case $ac_cv_c_inline in inline | yes) ;; *) case $ac_cv_c_inline in no) ac_val=;; *) ac_val=$ac_cv_c_inline;; esac cat >>confdefs.h <<_ACEOF #ifndef __cplusplus #define inline $ac_val #endif _ACEOF ;; esac ac_fn_c_check_type "$LINENO" "size_t" "ac_cv_type_size_t" "$ac_includes_default" if test "x$ac_cv_type_size_t" = xyes; then : else cat >>confdefs.h <<_ACEOF #define size_t unsigned int _ACEOF fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for __attribute__" >&5 $as_echo_n "checking for __attribute__... " >&6; } if ${lsh_cv_c_attribute+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { static void foo(void) __attribute__ ((noreturn)); static void __attribute__ ((noreturn)) foo(void) { exit(1); } ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : lsh_cv_c_attribute=yes else lsh_cv_c_attribute=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $lsh_cv_c_attribute" >&5 $as_echo "$lsh_cv_c_attribute" >&6; } if test "x$lsh_cv_c_attribute" = "xyes"; then $as_echo "#define HAVE_GCC_ATTRIBUTE 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ANSI C header files" >&5 $as_echo_n "checking for ANSI C header files... " >&6; } if ${ac_cv_header_stdc+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include #include int main () { ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_stdc=yes else ac_cv_header_stdc=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext if test $ac_cv_header_stdc = yes; then # SunOS 4.x string.h does not declare mem*, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "memchr" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "free" >/dev/null 2>&1; then : else ac_cv_header_stdc=no fi rm -f conftest* fi if test $ac_cv_header_stdc = yes; then # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi. if test "$cross_compiling" = yes; then : : else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #if ((' ' & 0x0FF) == 0x020) # define ISLOWER(c) ('a' <= (c) && (c) <= 'z') # define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c)) #else # define ISLOWER(c) \ (('a' <= (c) && (c) <= 'i') \ || ('j' <= (c) && (c) <= 'r') \ || ('s' <= (c) && (c) <= 'z')) # define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c)) #endif #define XOR(e, f) (((e) && !(f)) || (!(e) && (f))) int main () { int i; for (i = 0; i < 256; i++) if (XOR (islower (i), ISLOWER (i)) || toupper (i) != TOUPPER (i)) return 2; return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : else ac_cv_header_stdc=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_stdc" >&5 $as_echo "$ac_cv_header_stdc" >&6; } if test $ac_cv_header_stdc = yes; then $as_echo "#define STDC_HEADERS 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether time.h and sys/time.h may both be included" >&5 $as_echo_n "checking whether time.h and sys/time.h may both be included... " >&6; } if ${ac_cv_header_time+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #include int main () { if ((struct tm *) 0) return 0; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_time=yes else ac_cv_header_time=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_time" >&5 $as_echo "$ac_cv_header_time" >&6; } if test $ac_cv_header_time = yes; then $as_echo "#define TIME_WITH_SYS_TIME 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for sys/wait.h that is POSIX.1 compatible" >&5 $as_echo_n "checking for sys/wait.h that is POSIX.1 compatible... " >&6; } if ${ac_cv_header_sys_wait_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include #ifndef WEXITSTATUS # define WEXITSTATUS(stat_val) ((unsigned int) (stat_val) >> 8) #endif #ifndef WIFEXITED # define WIFEXITED(stat_val) (((stat_val) & 255) == 0) #endif int main () { int s; wait (&s); s = WIFEXITED (s) ? WEXITSTATUS (s) : 1; ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : ac_cv_header_sys_wait_h=yes else ac_cv_header_sys_wait_h=no fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_header_sys_wait_h" >&5 $as_echo "$ac_cv_header_sys_wait_h" >&6; } if test $ac_cv_header_sys_wait_h = yes; then $as_echo "#define HAVE_SYS_WAIT_H 1" >>confdefs.h fi for ac_header in unistd.h fcntl.h getopt.h pthread.h strings.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/types.h error.h netdb.h sys/io.h sys/sockio.h asm/io.h sys/ioccom.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/ipmi_msgdefs.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/ipmi_msgdefs.h" "ac_cv_header_linux_ipmi_msgdefs_h" "$ac_includes_default" if test "x$ac_cv_header_linux_ipmi_msgdefs_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_IPMI_MSGDEFS_H 1 _ACEOF fi done for ac_header in linux/compiler.h do : ac_fn_c_check_header_mongrel "$LINENO" "linux/compiler.h" "ac_cv_header_linux_compiler_h" "$ac_includes_default" if test "x$ac_cv_header_linux_compiler_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_COMPILER_H 1 _ACEOF fi done for ac_header in stropts.h sys/stropts.h do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_mongrel "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default" if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_header in linux/ipmi.h do : ac_fn_c_check_header_compile "$LINENO" "linux/ipmi.h" "ac_cv_header_linux_ipmi_h" "#ifdef HAVE_LINUX_IPMI_MSGDEFS_H #include #endif #ifdef HAVE_LINUX_COMPILER_H #include #endif " if test "x$ac_cv_header_linux_ipmi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LINUX_IPMI_H 1 _ACEOF fi done for ac_header in sys/ipmi.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/ipmi.h" "ac_cv_header_sys_ipmi_h" "$ac_includes_default" if test "x$ac_cv_header_sys_ipmi_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_IPMI_H 1 _ACEOF fi done for ac_header in sys/int_types.h do : ac_fn_c_check_header_mongrel "$LINENO" "sys/int_types.h" "ac_cv_header_sys_int_types_h" "$ac_includes_default" if test "x$ac_cv_header_sys_int_types_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SYS_INT_TYPES_H 1 _ACEOF fi done for ac_header in bmc_intf.h do : ac_fn_c_check_header_mongrel "$LINENO" "bmc_intf.h" "ac_cv_header_bmc_intf_h" "$ac_includes_default" if test "x$ac_cv_header_bmc_intf_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_BMC_INTF_H 1 _ACEOF fi done for ac_header in signal.h do : ac_fn_c_check_header_mongrel "$LINENO" "signal.h" "ac_cv_header_signal_h" "$ac_includes_default" if test "x$ac_cv_header_signal_h" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGNAL_H 1 _ACEOF fi done # The Ultrix 4.2 mips builtin alloca declared by alloca.h only works # for constant arguments. Useless! { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working alloca.h" >&5 $as_echo_n "checking for working alloca.h... " >&6; } if ${ac_cv_working_alloca_h+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *p = (char *) alloca (2 * sizeof (int)); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_working_alloca_h=yes else ac_cv_working_alloca_h=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_working_alloca_h" >&5 $as_echo "$ac_cv_working_alloca_h" >&6; } if test $ac_cv_working_alloca_h = yes; then $as_echo "#define HAVE_ALLOCA_H 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for alloca" >&5 $as_echo_n "checking for alloca... " >&6; } if ${ac_cv_func_alloca_works+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #ifdef __GNUC__ # define alloca __builtin_alloca #else # ifdef _MSC_VER # include # define alloca _alloca # else # ifdef HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ void *alloca (size_t); # endif # endif # endif # endif #endif int main () { char *p = (char *) alloca (1); if (p) return 0; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_alloca_works=yes else ac_cv_func_alloca_works=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_alloca_works" >&5 $as_echo "$ac_cv_func_alloca_works" >&6; } if test $ac_cv_func_alloca_works = yes; then $as_echo "#define HAVE_ALLOCA 1" >>confdefs.h else # The SVR3 libPW and SVR4 libucb both contain incompatible functions # that cause trouble. Some versions do not even contain alloca or # contain a buggy version. If you still want to use their alloca, # use ar to extract alloca.o from them instead of compiling alloca.c. ALLOCA=\${LIBOBJDIR}alloca.$ac_objext $as_echo "#define C_ALLOCA 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether \`alloca.c' needs Cray hooks" >&5 $as_echo_n "checking whether \`alloca.c' needs Cray hooks... " >&6; } if ${ac_cv_os_cray+:} false; then : $as_echo_n "(cached) " >&6 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #if defined CRAY && ! defined CRAY2 webecray #else wenotbecray #endif _ACEOF if (eval "$ac_cpp conftest.$ac_ext") 2>&5 | $EGREP "webecray" >/dev/null 2>&1; then : ac_cv_os_cray=yes else ac_cv_os_cray=no fi rm -f conftest* fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_os_cray" >&5 $as_echo "$ac_cv_os_cray" >&6; } if test $ac_cv_os_cray = yes; then for ac_func in _getb67 GETB67 getb67; do as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define CRAY_STACKSEG_END $ac_func _ACEOF break fi done fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking stack direction for C alloca" >&5 $as_echo_n "checking stack direction for C alloca... " >&6; } if ${ac_cv_c_stack_direction+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_c_stack_direction=0 else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default int find_stack_direction (int *addr, int depth) { int dir, dummy = 0; if (! addr) addr = &dummy; *addr = addr < &dummy ? 1 : addr == &dummy ? 0 : -1; dir = depth ? find_stack_direction (addr, depth - 1) : 0; return dir + dummy; } int main (int argc, char **argv) { return find_stack_direction (0, argc + !argv + 20) < 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_c_stack_direction=1 else ac_cv_c_stack_direction=-1 fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_c_stack_direction" >&5 $as_echo "$ac_cv_c_stack_direction" >&6; } cat >>confdefs.h <<_ACEOF #define STACK_DIRECTION $ac_cv_c_stack_direction _ACEOF fi for ac_header in $ac_header_list do : as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh` ac_fn_c_check_header_compile "$LINENO" "$ac_header" "$as_ac_Header" "$ac_includes_default " if eval test \"x\$"$as_ac_Header"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_header" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getpagesize do : ac_fn_c_check_func "$LINENO" "getpagesize" "ac_cv_func_getpagesize" if test "x$ac_cv_func_getpagesize" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_GETPAGESIZE 1 _ACEOF fi done { $as_echo "$as_me:${as_lineno-$LINENO}: checking for working mmap" >&5 $as_echo_n "checking for working mmap... " >&6; } if ${ac_cv_func_mmap_fixed_mapped+:} false; then : $as_echo_n "(cached) " >&6 else if test "$cross_compiling" = yes; then : ac_cv_func_mmap_fixed_mapped=no else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ $ac_includes_default /* malloc might have been renamed as rpl_malloc. */ #undef malloc /* Thanks to Mike Haertel and Jim Avera for this test. Here is a matrix of mmap possibilities: mmap private not fixed mmap private fixed at somewhere currently unmapped mmap private fixed at somewhere already mapped mmap shared not fixed mmap shared fixed at somewhere currently unmapped mmap shared fixed at somewhere already mapped For private mappings, we should verify that changes cannot be read() back from the file, nor mmap's back from the file at a different address. (There have been systems where private was not correctly implemented like the infamous i386 svr4.0, and systems where the VM page cache was not coherent with the file system buffer cache like early versions of FreeBSD and possibly contemporary NetBSD.) For shared mappings, we should conversely verify that changes get propagated back to all the places they're supposed to be. Grep wants private fixed already mapped. The main things grep needs to know about mmap are: * does it exist and is it safe to write into the mmap'd area * how to use it (BSD variants) */ #include #include #if !defined STDC_HEADERS && !defined HAVE_STDLIB_H char *malloc (); #endif /* This mess was copied from the GNU getpagesize.h. */ #ifndef HAVE_GETPAGESIZE # ifdef _SC_PAGESIZE # define getpagesize() sysconf(_SC_PAGESIZE) # else /* no _SC_PAGESIZE */ # ifdef HAVE_SYS_PARAM_H # include # ifdef EXEC_PAGESIZE # define getpagesize() EXEC_PAGESIZE # else /* no EXEC_PAGESIZE */ # ifdef NBPG # define getpagesize() NBPG * CLSIZE # ifndef CLSIZE # define CLSIZE 1 # endif /* no CLSIZE */ # else /* no NBPG */ # ifdef NBPC # define getpagesize() NBPC # else /* no NBPC */ # ifdef PAGESIZE # define getpagesize() PAGESIZE # endif /* PAGESIZE */ # endif /* no NBPC */ # endif /* no NBPG */ # endif /* no EXEC_PAGESIZE */ # else /* no HAVE_SYS_PARAM_H */ # define getpagesize() 8192 /* punt totally */ # endif /* no HAVE_SYS_PARAM_H */ # endif /* no _SC_PAGESIZE */ #endif /* no HAVE_GETPAGESIZE */ int main () { char *data, *data2, *data3; const char *cdata2; int i, pagesize; int fd, fd2; pagesize = getpagesize (); /* First, make a file with some known garbage in it. */ data = (char *) malloc (pagesize); if (!data) return 1; for (i = 0; i < pagesize; ++i) *(data + i) = rand (); umask (0); fd = creat ("conftest.mmap", 0600); if (fd < 0) return 2; if (write (fd, data, pagesize) != pagesize) return 3; close (fd); /* Next, check that the tail of a page is zero-filled. File must have non-zero length, otherwise we risk SIGBUS for entire page. */ fd2 = open ("conftest.txt", O_RDWR | O_CREAT | O_TRUNC, 0600); if (fd2 < 0) return 4; cdata2 = ""; if (write (fd2, cdata2, 1) != 1) return 5; data2 = (char *) mmap (0, pagesize, PROT_READ | PROT_WRITE, MAP_SHARED, fd2, 0L); if (data2 == MAP_FAILED) return 6; for (i = 0; i < pagesize; ++i) if (*(data2 + i)) return 7; close (fd2); if (munmap (data2, pagesize)) return 8; /* Next, try to mmap the file at a fixed address which already has something else allocated at it. If we can, also make sure that we see the same garbage. */ fd = open ("conftest.mmap", O_RDWR); if (fd < 0) return 9; if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE, MAP_PRIVATE | MAP_FIXED, fd, 0L)) return 10; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data2 + i)) return 11; /* Finally, make sure that changes to the mapped area do not percolate back to the file as seen by read(). (This is a bug on some variants of i386 svr4.0.) */ for (i = 0; i < pagesize; ++i) *(data2 + i) = *(data2 + i) + 1; data3 = (char *) malloc (pagesize); if (!data3) return 12; if (read (fd, data3, pagesize) != pagesize) return 13; for (i = 0; i < pagesize; ++i) if (*(data + i) != *(data3 + i)) return 14; close (fd); return 0; } _ACEOF if ac_fn_c_try_run "$LINENO"; then : ac_cv_func_mmap_fixed_mapped=yes else ac_cv_func_mmap_fixed_mapped=no fi rm -f core *.core core.conftest.* gmon.out bb.out conftest$ac_exeext \ conftest.$ac_objext conftest.beam conftest.$ac_ext fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_func_mmap_fixed_mapped" >&5 $as_echo "$ac_cv_func_mmap_fixed_mapped" >&6; } if test $ac_cv_func_mmap_fixed_mapped = yes; then $as_echo "#define HAVE_MMAP 1" >>confdefs.h fi rm -f conftest.mmap conftest.txt for ac_func in vprintf do : ac_fn_c_check_func "$LINENO" "vprintf" "ac_cv_func_vprintf" if test "x$ac_cv_func_vprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_VPRINTF 1 _ACEOF ac_fn_c_check_func "$LINENO" "_doprnt" "ac_cv_func__doprnt" if test "x$ac_cv_func__doprnt" = xyes; then : $as_echo "#define HAVE_DOPRNT 1" >>confdefs.h fi fi done for ac_func in strchr strndup strchrnul strsep stristr do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in memcpy mempcpy memset mlock do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in getline getprogname do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in strerror strerror_r do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in flockfile fputs_unlocked fwrite_unlocked do : as_ac_var=`$as_echo "ac_cv_func_$ac_func" | $as_tr_sh` ac_fn_c_check_func "$LINENO" "$ac_func" "$as_ac_var" if eval test \"x\$"$as_ac_var"\" = x"yes"; then : cat >>confdefs.h <<_ACEOF #define `$as_echo "HAVE_$ac_func" | $as_tr_cpp` 1 _ACEOF fi done for ac_func in iopl do : ac_fn_c_check_func "$LINENO" "iopl" "ac_cv_func_iopl" if test "x$ac_cv_func_iopl" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_IOPL 1 _ACEOF fi done for ac_func in asprintf do : ac_fn_c_check_func "$LINENO" "asprintf" "ac_cv_func_asprintf" if test "x$ac_cv_func_asprintf" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_ASPRINTF 1 _ACEOF fi done for ac_func in cbrt do : ac_fn_c_check_func "$LINENO" "cbrt" "ac_cv_func_cbrt" if test "x$ac_cv_func_cbrt" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_CBRT 1 _ACEOF fi done ac_fn_c_check_type "$LINENO" "sighandler_t" "ac_cv_type_sighandler_t" "#include " if test "x$ac_cv_type_sighandler_t" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_SIGHANDLER_T 1 _ACEOF fi # At least on freebsd, putc_unlocked is a macro, so the standard # AC_CHECK_FUNCS doesn't work well. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { putc_unlocked('x', stdout) ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : cat >>confdefs.h <<_ACEOF #define HAVE_PUTC_UNLOCKED 1 _ACEOF fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exp10 in -lm" >&5 $as_echo_n "checking for exp10 in -lm... " >&6; } if ${ac_cv_lib_m_exp10+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char exp10 (); int main () { return exp10 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_exp10=yes else ac_cv_lib_m_exp10=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_exp10" >&5 $as_echo "$ac_cv_lib_m_exp10" >&6; } if test "x$ac_cv_lib_m_exp10" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for exp2 in -lm" >&5 $as_echo_n "checking for exp2 in -lm... " >&6; } if ${ac_cv_lib_m_exp2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char exp2 (); int main () { return exp2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_exp2=yes else ac_cv_lib_m_exp2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_exp2" >&5 $as_echo "$ac_cv_lib_m_exp2" >&6; } if test "x$ac_cv_lib_m_exp2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for log2 in -lm" >&5 $as_echo_n "checking for log2 in -lm... " >&6; } if ${ac_cv_lib_m_log2+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lm $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char log2 (); int main () { return log2 (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_m_log2=yes else ac_cv_lib_m_log2=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_m_log2" >&5 $as_echo "$ac_cv_lib_m_log2" >&6; } if test "x$ac_cv_lib_m_log2" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBM 1 _ACEOF LIBS="-lm $LIBS" fi ac_fn_c_check_func "$LINENO" "socket" "ac_cv_func_socket" if test "x$ac_cv_func_socket" = xyes; then : else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for socket in -lsocket" >&5 $as_echo_n "checking for socket in -lsocket... " >&6; } if ${ac_cv_lib_socket_socket+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lsocket $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char socket (); int main () { return socket (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_socket_socket=yes else ac_cv_lib_socket_socket=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_socket_socket" >&5 $as_echo "$ac_cv_lib_socket_socket" >&6; } if test "x$ac_cv_lib_socket_socket" = xyes; then : cat >>confdefs.h <<_ACEOF #define HAVE_LIBSOCKET 1 _ACEOF LIBS="-lsocket $LIBS" fi fi ac_fn_c_check_func "$LINENO" "gethostbyname_r" "ac_cv_func_gethostbyname_r" if test "x$ac_cv_func_gethostbyname_r" = xyes; then : have_gethostbyname_r=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for gethostbyname_r in -lnsl" >&5 $as_echo_n "checking for gethostbyname_r in -lnsl... " >&6; } if ${ac_cv_lib_nsl_gethostbyname_r+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char gethostbyname_r (); int main () { return gethostbyname_r (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_gethostbyname_r=yes else ac_cv_lib_nsl_gethostbyname_r=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_gethostbyname_r" >&5 $as_echo "$ac_cv_lib_nsl_gethostbyname_r" >&6; } if test "x$ac_cv_lib_nsl_gethostbyname_r" = xyes; then : LIBS="$LIBS -lnsl" have_gethostbyname_r=yes else have_gethostbyname_r=no fi fi if test "x${have_gethostbyname_r}" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *name; struct hostent *he; struct hostent_data data; (void) gethostbyname_r(name, he, &data); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_which_gethostbyname_r=three else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *name; struct hostent *he, *res; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_which_gethostbyname_r=six else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { char *name; struct hostent *he; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_which_gethostbyname_r=five else ac_cv_func_which_gethostbyname_r=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x${ac_cv_func_which_gethostbyname_r}" = "xsix"; then $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_6 /**/" >>confdefs.h elif test "x${ac_cv_func_which_gethostbyname_r}" = "xfive"; then $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_5 /**/" >>confdefs.h elif test "x${ac_cv_func_which_gethostbyname_r}" = "xthree"; then $as_echo "#define HAVE_FUNC_GETHOSTBYNAME_R_3 /**/" >>confdefs.h fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for thread-safe gethostbyname()" >&5 $as_echo_n "checking for thread-safe gethostbyname()... " >&6; } have_thread_safe_gethostbyname=no case "$host_os" in *freebsd*) cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #if __FreeBSD_version < 505000 #error "gethostbyname() is not thread-safe" #endif _ACEOF if ac_fn_c_try_cpp "$LINENO"; then : have_thread_safe_gethostbyname=yes fi rm -f conftest.err conftest.i conftest.$ac_ext ;; esac if test "x$have_thread_safe_gethostbyname" = "xyes"; then $as_echo "#define HAVE_THREAD_SAFE_GETHOSTBYNAME 1" >>confdefs.h { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi ac_fn_c_check_func "$LINENO" "hstrerror" "ac_cv_func_hstrerror" if test "x$ac_cv_func_hstrerror" = xyes; then : have_hstrerror=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for hstrerror in -lnsl" >&5 $as_echo_n "checking for hstrerror in -lnsl... " >&6; } if ${ac_cv_lib_nsl_hstrerror+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-lnsl $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char hstrerror (); int main () { return hstrerror (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_nsl_hstrerror=yes else ac_cv_lib_nsl_hstrerror=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_nsl_hstrerror" >&5 $as_echo "$ac_cv_lib_nsl_hstrerror" >&6; } if test "x$ac_cv_lib_nsl_hstrerror" = xyes; then : have_hstrerror=yes else have_hstrerror=no fi fi if test "x$have_hstrerror" = "xyes"; then $as_echo "#define HAVE_HSTRERROR 1" >>confdefs.h fi ac_fn_c_check_func "$LINENO" "getpwuid_r" "ac_cv_func_getpwuid_r" if test "x$ac_cv_func_getpwuid_r" = xyes; then : have_getpwuid_r=yes else as_fn_error $? "getpwuid_r cannot be found" "$LINENO" 5 fi if test "x${have_getpwuid_r}" = "xyes"; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uid_t uid; struct passwd pwd; struct passwd *result; char buffer[1]; int bufsize; (void) getpwuid_r (uid, &pwd, buffer, bufsize, &result); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_which_getpwuid_r=five else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include #include int main () { uid_t uid; struct passwd pwd; char buffer[1]; int bufsize; (void) getpwuid_r (uid, &pwd, buffer, bufsize); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_func_which_getpwuid_r=four else ac_cv_func_which_getpwuid_r=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test "x${ac_cv_func_which_getpwuid_r}" = "xfive"; then $as_echo "#define HAVE_FUNC_GETPWUID_R_5 /**/" >>confdefs.h elif test "x${ac_cv_func_which_getpwuid_r}" = "xfour"; then $as_echo "#define HAVE_FUNC_GETPWUID_R_4 /**/" >>confdefs.h else as_fn_error $? "getpwuid_r cannot be compiled" "$LINENO" 5 fi fi ac_fn_c_check_func "$LINENO" "argp_parse" "ac_cv_func_argp_parse" if test "x$ac_cv_func_argp_parse" = xyes; then : have_argp=yes else { $as_echo "$as_me:${as_lineno-$LINENO}: checking for argp_parse in -largp" >&5 $as_echo_n "checking for argp_parse in -largp... " >&6; } if ${ac_cv_lib_argp_argp_parse+:} false; then : $as_echo_n "(cached) " >&6 else ac_check_lib_save_LIBS=$LIBS LIBS="-largp $LIBS" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char argp_parse (); int main () { return argp_parse (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ac_cv_lib_argp_argp_parse=yes else ac_cv_lib_argp_argp_parse=no fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS=$ac_check_lib_save_LIBS fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_lib_argp_argp_parse" >&5 $as_echo "$ac_cv_lib_argp_argp_parse" >&6; } if test "x$ac_cv_lib_argp_argp_parse" = xyes; then : have_argp=yes; LIBS="-largp $LIBS" else have_argp=no fi fi if test "x$have_argp" = "xyes"; then ac_fn_c_check_header_mongrel "$LINENO" "argp.h" "ac_cv_header_argp_h" "$ac_includes_default" if test "x$ac_cv_header_argp_h" = xyes; then : $as_echo "#define HAVE_ARGP_H 1" >>confdefs.h else as_fn_error $? "argp header cannot be found" "$LINENO" 5 fi else cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { #if defined(__FreeBSD__) || defined(__APPLE__) uncompilable junk syntax %$ # @ #endif ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : else as_fn_error $? "argp library not found. argp-standalone required." "$LINENO" 5 fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext fi if test "$have_argp" = "no"; then WITH_FREEIPMI_ARGP_TRUE= WITH_FREEIPMI_ARGP_FALSE='#' else WITH_FREEIPMI_ARGP_TRUE='#' WITH_FREEIPMI_ARGP_FALSE= fi cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { printf("%s\n", __FUNCTION__); ; return 0; } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : $as_echo "#define HAVE_FUNCTION_MACRO 1" >>confdefs.h fi rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu acx_pthread_ok=no # We used to check for pthread.h first, but this fails if pthread.h # requires special compiler flags (e.g. on True64 or Sequent). # It gets checked for in the link test anyway. # First of all, check if the user has set any of the PTHREAD_LIBS, # etcetera environment variables, and if threads linking works using # them: if test x"$PTHREAD_LIBS$PTHREAD_CFLAGS" != x; then save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS" >&5 $as_echo_n "checking for pthread_join in LIBS=$PTHREAD_LIBS with CFLAGS=$PTHREAD_CFLAGS... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ /* Override any GCC internal prototype to avoid an error. Use char because int might match the return type of a GCC builtin and then its argument prototype would still apply. */ #ifdef __cplusplus extern "C" #endif char pthread_join (); int main () { return pthread_join (); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test x"$acx_pthread_ok" = xno; then PTHREAD_LIBS="" PTHREAD_CFLAGS="" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" fi # We must check for the threads library under a number of different # names; the ordering is very important because some systems # (e.g. DEC) have both -lpthread and -lpthreads, where one of the # libraries is broken (non-POSIX). # Create a list of thread flags to try. Items starting with a "-" are # C compiler flags, and other items are library names, except for "none" # which indicates that we try without any flags at all. acx_pthread_flags="pthreads none -Kthread -kthread lthread -pthread -pthreads -mthreads pthread --thread-safe -mt" # The ordering *is* (sometimes) important. Some notes on the # individual items follow: # pthreads: AIX (must check this before -lpthread) # none: in case threads are in libc; should be tried before -Kthread and # other compiler flags to prevent continual compiler warnings # -Kthread: Sequent (threads in libc, but -Kthread needed for pthread.h) # -kthread: FreeBSD kernel threads (preferred to -pthread since SMP-able) # lthread: LinuxThreads port on FreeBSD (also preferred to -pthread) # -pthread: Linux/gcc (kernel threads), BSD/gcc (userland threads) # -pthreads: Solaris/gcc # -mthreads: Mingw32/gcc, Lynx/gcc # -mt: Sun Workshop C (may only link SunOS threads [-lthread], but it # doesn't hurt to check since this sometimes defines pthreads too; # also defines -D_REENTRANT) # pthread: Linux, etcetera # --thread-safe: KAI C++ case "${host_cpu}-${host_os}" in *solaris*) # On Solaris (at least, for some versions), libc contains stubbed # (non-functional) versions of the pthreads routines, so link-based # tests will erroneously succeed. (We need to link with -pthread or # -lpthread.) (The stubs are missing pthread_cleanup_push, or rather # a function called by this macro, so we could check for that, but # who knows whether they'll stub that too in a future libc.) So, # we'll just look for -pthreads and -lpthread first: acx_pthread_flags="-pthread -pthreads pthread -mt $acx_pthread_flags" ;; *linux*|*k*bsd*) # achu # # libipmiconsole is a library, not an application, so move pthread # earlier to override just building with the -pthread # flag # acx_pthread_flags="pthreads pthread none -Kthread -kthread lthread -pthread -pthreads -mthreads --thread-safe -mt" ;; esac if test x"$acx_pthread_ok" = xno; then for flag in $acx_pthread_flags; do case $flag in none) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work without any flags" >&5 $as_echo_n "checking whether pthreads work without any flags... " >&6; } ;; -*) { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether pthreads work with $flag" >&5 $as_echo_n "checking whether pthreads work with $flag... " >&6; } PTHREAD_CFLAGS="$flag" ;; *) { $as_echo "$as_me:${as_lineno-$LINENO}: checking for the pthreads library -l$flag" >&5 $as_echo_n "checking for the pthreads library -l$flag... " >&6; } PTHREAD_LIBS="-l$flag" ;; esac save_LIBS="$LIBS" save_CFLAGS="$CFLAGS" LIBS="$PTHREAD_LIBS $LIBS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Check for various functions. We must include pthread.h, # since some functions may be macros. (On the Sequent, we # need a special flag -Kthread to make this header compile.) # We check for pthread_join because it is in -lpthread on IRIX # while pthread_create is in libc. We check for pthread_attr_init # due to DEC craziness with -lpthreads. We check for # pthread_cleanup_push because it is one of the few pthread # functions on Solaris that doesn't have a non-functional libc stub. # We try pthread_create on general principles. cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { pthread_t th; pthread_join(th, 0); pthread_attr_init(0); pthread_cleanup_push(0, 0); pthread_create(0,0,0,0); pthread_cleanup_pop(0); ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : acx_pthread_ok=yes fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" { $as_echo "$as_me:${as_lineno-$LINENO}: result: $acx_pthread_ok" >&5 $as_echo "$acx_pthread_ok" >&6; } if test "x$acx_pthread_ok" = xyes; then break; fi PTHREAD_LIBS="" PTHREAD_CFLAGS="" done fi # Various other checks: if test "x$acx_pthread_ok" = xyes; then save_LIBS="$LIBS" LIBS="$PTHREAD_LIBS $LIBS" save_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS $PTHREAD_CFLAGS" # Detect AIX lossage: threads are created detached by default # and the JOINABLE attribute has a nonstandard name (UNDETACHED). { $as_echo "$as_me:${as_lineno-$LINENO}: checking for joinable pthread attribute" >&5 $as_echo_n "checking for joinable pthread attribute... " >&6; } cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_JOINABLE; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ok=PTHREAD_CREATE_JOINABLE else ok=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext if test x"$ok" = xunknown; then cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ #include int main () { int attr=PTHREAD_CREATE_UNDETACHED; ; return 0; } _ACEOF if ac_fn_c_try_link "$LINENO"; then : ok=PTHREAD_CREATE_UNDETACHED else ok=unknown fi rm -f core conftest.err conftest.$ac_objext \ conftest$ac_exeext conftest.$ac_ext fi if test x"$ok" != xPTHREAD_CREATE_JOINABLE; then $as_echo "#define PTHREAD_CREATE_JOINABLE \$ok" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ok}" >&5 $as_echo "${ok}" >&6; } if test x"$ok" = xunknown; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: we do not know how to create joinable pthreads" >&5 $as_echo "$as_me: WARNING: we do not know how to create joinable pthreads" >&2;} fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking if more special flags are required for pthreads" >&5 $as_echo_n "checking if more special flags are required for pthreads... " >&6; } flag=no case "${host_cpu}-${host_os}" in *-aix* | *-freebsd*) flag="-D_THREAD_SAFE";; *solaris* | alpha*-osf*) flag="-D_REENTRANT";; esac { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${flag}" >&5 $as_echo "${flag}" >&6; } if test "x$flag" != xno; then PTHREAD_CFLAGS="$flag $PTHREAD_CFLAGS" fi LIBS="$save_LIBS" CFLAGS="$save_CFLAGS" # More AIX lossage: must compile with cc_r # Extract the first word of "cc_r", so it can be a program name with args. set dummy cc_r; ac_word=$2 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5 $as_echo_n "checking for $ac_word... " >&6; } if ${ac_cv_prog_PTHREAD_CC+:} false; then : $as_echo_n "(cached) " >&6 else if test -n "$PTHREAD_CC"; then ac_cv_prog_PTHREAD_CC="$PTHREAD_CC" # Let the user override the test. else as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for ac_exec_ext in '' $ac_executable_extensions; do if as_fn_executable_p "$as_dir/$ac_word$ac_exec_ext"; then ac_cv_prog_PTHREAD_CC="cc_r" $as_echo "$as_me:${as_lineno-$LINENO}: found $as_dir/$ac_word$ac_exec_ext" >&5 break 2 fi done done IFS=$as_save_IFS test -z "$ac_cv_prog_PTHREAD_CC" && ac_cv_prog_PTHREAD_CC="${CC}" fi fi PTHREAD_CC=$ac_cv_prog_PTHREAD_CC if test -n "$PTHREAD_CC"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: $PTHREAD_CC" >&5 $as_echo "$PTHREAD_CC" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi else PTHREAD_CC="$CC" fi # Finally, execute ACTION-IF-FOUND/ACTION-IF-NOT-FOUND: if test x"$acx_pthread_ok" = xyes; then $as_echo "#define HAVE_PTHREAD 1" >>confdefs.h : else acx_pthread_ok=no as_fn_error $? "Posix threads required to build libipmiconsole" "$LINENO" 5 fi ac_ext=c ac_cpp='$CPP $CPPFLAGS' ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5' ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5' ac_compiler_gnu=$ac_cv_c_compiler_gnu FREEIPMI_SYSCONFDIR=${sysconfdir}/freeipmi/ # Must expand nested unquoting FREEIPMI_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi.conf`" FREEIPMI_CONFIG_FILE_DEFAULT_TMP2="`echo $FREEIPMI_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" FREEIPMI_CONFIG_FILE_DEFAULT="`eval echo $FREEIPMI_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define FREEIPMI_CONFIG_FILE_DEFAULT "$FREEIPMI_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ FREEIPMI_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/freeipmi.conf`" FREEIPMI_CONFIG_FILE_LEGACY_TMP2="`echo $FREEIPMI_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" FREEIPMI_CONFIG_FILE_LEGACY="`eval echo $FREEIPMI_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define FREEIPMI_CONFIG_FILE_LEGACY "$FREEIPMI_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting IPMI_MONITORING_SDR_CACHE_DIR_TMP1="`eval echo ${localstatedir}/cache/ipmimonitoringsdrcache`" IPMI_MONITORING_SDR_CACHE_DIR_TMP2="`echo $IPMI_MONITORING_SDR_CACHE_DIR_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMI_MONITORING_SDR_CACHE_DIR="`eval echo $IPMI_MONITORING_SDR_CACHE_DIR_TMP2`" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipmi_monitoring sdr cache dir default path" >&5 $as_echo_n "checking for ipmi_monitoring sdr cache dir default path... " >&6; } # Check whether --with-ipmi-monitoring-sdr-cache-dir was given. if test "${with_ipmi_monitoring_sdr_cache_dir+set}" = set; then : withval=$with_ipmi_monitoring_sdr_cache_dir; case "$withval" in no) ;; yes) ;; *) IPMI_MONITORING_SDR_CACHE_DIR=$withval esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPMI_MONITORING_SDR_CACHE_DIR" >&5 $as_echo "$IPMI_MONITORING_SDR_CACHE_DIR" >&6; } cat >>confdefs.h <<_ACEOF #define IPMI_MONITORING_SDR_CACHE_DIR "$IPMI_MONITORING_SDR_CACHE_DIR" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmi_monitoring_sensors.conf`" IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP2="`echo $IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY="`eval echo $IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY "$IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIPOWER_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmipower.conf`" IPMIPOWER_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIPOWER_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIPOWER_CONFIG_FILE_LEGACY="`eval echo $IPMIPOWER_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMIPOWER_CONFIG_FILE_LEGACY "$IPMIPOWER_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMICONSOLE_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmiconsole.conf`" IPMICONSOLE_CONFIG_FILE_LEGACY_TMP2="`echo $IPMICONSOLE_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMICONSOLE_CONFIG_FILE_LEGACY="`eval echo $IPMICONSOLE_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMICONSOLE_CONFIG_FILE_LEGACY "$IPMICONSOLE_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi_interpret_sensor.conf`" INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP2="`echo $INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" INTERPRET_SENSOR_CONFIG_FILE_DEFAULT="`eval echo $INTERPRET_SENSOR_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define INTERPRET_SENSOR_CONFIG_FILE_DEFAULT "$INTERPRET_SENSOR_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/freeipmi_interpret_sel.conf`" INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP2="`echo $INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" INTERPRET_SEL_CONFIG_FILE_DEFAULT="`eval echo $INTERPRET_SEL_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define INTERPRET_SEL_CONFIG_FILE_DEFAULT "$INTERPRET_SEL_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting IPMIDETECT_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmidetect.conf`" IPMIDETECT_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMIDETECT_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECT_CONFIG_FILE_DEFAULT="`eval echo $IPMIDETECT_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMIDETECT_CONFIG_FILE_DEFAULT "$IPMIDETECT_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIDETECT_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmidetect.conf`" IPMIDETECT_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIDETECT_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECT_CONFIG_FILE_LEGACY="`eval echo $IPMIDETECT_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMIDETECT_CONFIG_FILE_LEGACY "$IPMIDETECT_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmidetectd.conf`" IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECTD_CONFIG_FILE_DEFAULT="`eval echo $IPMIDETECTD_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMIDETECTD_CONFIG_FILE_DEFAULT "$IPMIDETECTD_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting # Legacy - don't store in /etc/freeipmi/ IPMIDETECTD_CONFIG_FILE_LEGACY_TMP1="`eval echo ${sysconfdir}/ipmidetectd.conf`" IPMIDETECTD_CONFIG_FILE_LEGACY_TMP2="`echo $IPMIDETECTD_CONFIG_FILE_LEGACY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMIDETECTD_CONFIG_FILE_LEGACY="`eval echo $IPMIDETECTD_CONFIG_FILE_LEGACY_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMIDETECTD_CONFIG_FILE_LEGACY "$IPMIDETECTD_CONFIG_FILE_LEGACY" _ACEOF # Must expand nested unquoting IPMISELD_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/ipmiseld.conf`" IPMISELD_CONFIG_FILE_DEFAULT_TMP2="`echo $IPMISELD_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMISELD_CONFIG_FILE_DEFAULT="`eval echo $IPMISELD_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define IPMISELD_CONFIG_FILE_DEFAULT "$IPMISELD_CONFIG_FILE_DEFAULT" _ACEOF # Must expand nested unquoting IPMISELD_CACHE_DIRECTORY_TMP1="`eval echo ${localstatedir}/cache/ipmiseld/`" IPMISELD_CACHE_DIRECTORY_TMP2="`echo $IPMISELD_CACHE_DIRECTORY_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" IPMISELD_CACHE_DIRECTORY="`eval echo $IPMISELD_CACHE_DIRECTORY_TMP2`" { $as_echo "$as_me:${as_lineno-$LINENO}: checking for ipmiseld cache dir default path" >&5 $as_echo_n "checking for ipmiseld cache dir default path... " >&6; } # Check whether --with-ipmiseld-cache-dir was given. if test "${with_ipmiseld_cache_dir+set}" = set; then : withval=$with_ipmiseld_cache_dir; case "$withval" in no) ;; yes) ;; *) IPMISELD_CACHE_DIRECTORY=$withval esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $IPMISELD_CACHE_DIRECTORY" >&5 $as_echo "$IPMISELD_CACHE_DIRECTORY" >&6; } cat >>confdefs.h <<_ACEOF #define IPMISELD_CACHE_DIRECTORY "$IPMISELD_CACHE_DIRECTORY" _ACEOF # Must expand nested unquoting LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP1="`eval echo $FREEIPMI_SYSCONFDIR/libipmiconsole.conf`" LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP2="`echo $LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP1 | sed 's/^NONE/$ac_default_prefix/'`" LIBIPMICONSOLE_CONFIG_FILE_DEFAULT="`eval echo $LIBIPMICONSOLE_CONFIG_FILE_DEFAULT_TMP2`" cat >>confdefs.h <<_ACEOF #define LIBIPMICONSOLE_CONFIG_FILE_DEFAULT "$LIBIPMICONSOLE_CONFIG_FILE_DEFAULT" _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether tools should check for root before executing in-band IPMI communication" >&5 $as_echo_n "checking whether tools should check for root before executing in-band IPMI communication... " >&6; } # Check whether --with-dont-check-for-root was given. if test "${with_dont_check_for_root+set}" = set; then : withval=$with_dont_check_for_root; case "$withval" in yes) ac_dont_check_for_root=yes ;; no) ac_dont_check_for_root=no ;; *) ac_dont_check_for_root=yes ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_dont_check_for_root=no}" >&5 $as_echo "${ac_dont_check_for_root=no}" >&6; } if test "$ac_dont_check_for_root" = "yes"; then $as_echo "#define IPMI_DONT_CHECK_FOR_ROOT 1" >>confdefs.h fi ac_fn_c_check_decl "$LINENO" "program_invocation_name" "ac_cv_have_decl_program_invocation_name" "#include " if test "x$ac_cv_have_decl_program_invocation_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_NAME $ac_have_decl _ACEOF ac_fn_c_check_decl "$LINENO" "program_invocation_short_name" "ac_cv_have_decl_program_invocation_short_name" "#include " if test "x$ac_cv_have_decl_program_invocation_short_name" = xyes; then : ac_have_decl=1 else ac_have_decl=0 fi cat >>confdefs.h <<_ACEOF #define HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME $ac_have_decl _ACEOF { $as_echo "$as_me:${as_lineno-$LINENO}: checking for random device support" >&5 $as_echo_n "checking for random device support... " >&6; } # Check whether --with-random-device was given. if test "${with_random_device+set}" = set; then : withval=$with_random_device; case "$withval" in no) ac_with_random_device=no ;; yes) ac_with_random_device=yes ;; *) ac_with_random_device=yes ;; esac fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: ${ac_with_random_device=yes}" >&5 $as_echo "${ac_with_random_device=yes}" >&6; } if test x"${ac_with_random_device}" = xyes; then { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/urandom" >&5 $as_echo_n "checking for /dev/urandom... " >&6; } if ${ac_cv_file__dev_urandom+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/urandom"; then ac_cv_file__dev_urandom=yes else ac_cv_file__dev_urandom=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_urandom" >&5 $as_echo "$ac_cv_file__dev_urandom" >&6; } if test "x$ac_cv_file__dev_urandom" = xyes; then : $as_echo "#define HAVE_DEVURANDOM 1" >>confdefs.h fi { $as_echo "$as_me:${as_lineno-$LINENO}: checking for /dev/random" >&5 $as_echo_n "checking for /dev/random... " >&6; } if ${ac_cv_file__dev_random+:} false; then : $as_echo_n "(cached) " >&6 else test "$cross_compiling" = yes && as_fn_error $? "cannot check for file existence when cross compiling" "$LINENO" 5 if test -r "/dev/random"; then ac_cv_file__dev_random=yes else ac_cv_file__dev_random=no fi fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_cv_file__dev_random" >&5 $as_echo "$ac_cv_file__dev_random" >&6; } if test "x$ac_cv_file__dev_random" = xyes; then : $as_echo "#define HAVE_DEVRANDOM 1" >>confdefs.h fi fi pkgconfigdir='${libdir}/pkgconfig' { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to install pkg-config *.pc files" >&5 $as_echo_n "checking whether to install pkg-config *.pc files... " >&6; } # Check whether --with-pkgconfig-dir was given. if test "${with_pkgconfig_dir+set}" = set; then : withval=$with_pkgconfig_dir; case "${withval}" in yes|auto) ;; no) pkgconfigdir="" ;; *) pkgconfigdir="${withval}" ;; esac fi if test -n "${pkgconfigdir}"; then { $as_echo "$as_me:${as_lineno-$LINENO}: result: using ${pkgconfigdir}" >&5 $as_echo "using ${pkgconfigdir}" >&6; } else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; } fi if test -n "${pkgconfigdir}"; then WITH_PKG_CONFIG_TRUE= WITH_PKG_CONFIG_FALSE='#' else WITH_PKG_CONFIG_TRUE='#' WITH_PKG_CONFIG_FALSE= fi cat >confcache <<\_ACEOF # This file is a shell script that caches the results of configure # tests run on this system so they can be shared between configure # scripts and configure runs, see configure's option --config-cache. # It is not useful on other systems. If it contains results you don't # want to keep, you may remove or edit it. # # config.status only pays attention to the cache file if you give it # the --recheck option to rerun configure. # # `ac_cv_env_foo' variables (set or unset) will be overridden when # loading this file, other *unset* `ac_cv_foo' will be assigned the # following values. _ACEOF # The following way of writing the cache mishandles newlines in values, # but we know of no workaround that is simple, portable, and efficient. # So, we kill variables containing newlines. # Ultrix sh set writes to stderr and can't be redirected directly, # and sets the high bit in the cache file unless we assign to the vars. ( for ac_var in `(set) 2>&1 | sed -n 's/^\([a-zA-Z_][a-zA-Z0-9_]*\)=.*/\1/p'`; do eval ac_val=\$$ac_var case $ac_val in #( *${as_nl}*) case $ac_var in #( *_cv_*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: cache variable $ac_var contains a newline" >&5 $as_echo "$as_me: WARNING: cache variable $ac_var contains a newline" >&2;} ;; esac case $ac_var in #( _ | IFS | as_nl) ;; #( BASH_ARGV | BASH_SOURCE) eval $ac_var= ;; #( *) { eval $ac_var=; unset $ac_var;} ;; esac ;; esac done (set) 2>&1 | case $as_nl`(ac_space=' '; set) 2>&1` in #( *${as_nl}ac_space=\ *) # `set' does not quote correctly, so add quotes: double-quote # substitution turns \\\\ into \\, and sed turns \\ into \. sed -n \ "s/'/'\\\\''/g; s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p" ;; #( *) # `set' quotes correctly as required by POSIX, so do not add quotes. sed -n "/^[_$as_cr_alnum]*_cv_[_$as_cr_alnum]*=/p" ;; esac | sort ) | sed ' /^ac_cv_env_/b end t clear :clear s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/ t end s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/ :end' >>confcache if diff "$cache_file" confcache >/dev/null 2>&1; then :; else if test -w "$cache_file"; then if test "x$cache_file" != "x/dev/null"; then { $as_echo "$as_me:${as_lineno-$LINENO}: updating cache $cache_file" >&5 $as_echo "$as_me: updating cache $cache_file" >&6;} if test ! -f "$cache_file" || test -h "$cache_file"; then cat confcache >"$cache_file" else case $cache_file in #( */* | ?:*) mv -f confcache "$cache_file"$$ && mv -f "$cache_file"$$ "$cache_file" ;; #( *) mv -f confcache "$cache_file" ;; esac fi fi else { $as_echo "$as_me:${as_lineno-$LINENO}: not updating unwritable cache $cache_file" >&5 $as_echo "$as_me: not updating unwritable cache $cache_file" >&6;} fi fi rm -f confcache test "x$prefix" = xNONE && prefix=$ac_default_prefix # Let make expand exec_prefix. test "x$exec_prefix" = xNONE && exec_prefix='${prefix}' DEFS=-DHAVE_CONFIG_H ac_libobjs= ac_ltlibobjs= U= for ac_i in : $LIBOBJS; do test "x$ac_i" = x: && continue # 1. Remove the extension, and $U if already installed. ac_script='s/\$U\././;s/\.o$//;s/\.obj$//' ac_i=`$as_echo "$ac_i" | sed "$ac_script"` # 2. Prepend LIBOBJDIR. When used with automake>=1.10 LIBOBJDIR # will be set to the directory where LIBOBJS objects are built. as_fn_append ac_libobjs " \${LIBOBJDIR}$ac_i\$U.$ac_objext" as_fn_append ac_ltlibobjs " \${LIBOBJDIR}$ac_i"'$U.lo' done LIBOBJS=$ac_libobjs LTLIBOBJS=$ac_ltlibobjs { $as_echo "$as_me:${as_lineno-$LINENO}: checking that generated files are newer than configure" >&5 $as_echo_n "checking that generated files are newer than configure... " >&6; } if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi { $as_echo "$as_me:${as_lineno-$LINENO}: result: done" >&5 $as_echo "done" >&6; } if test -n "$EXEEXT"; then am__EXEEXT_TRUE= am__EXEEXT_FALSE='#' else am__EXEEXT_TRUE='#' am__EXEEXT_FALSE= fi if test -z "${AMDEP_TRUE}" && test -z "${AMDEP_FALSE}"; then as_fn_error $? "conditional \"AMDEP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${am__fastdepCC_TRUE}" && test -z "${am__fastdepCC_FALSE}"; then as_fn_error $? "conditional \"am__fastdepCC\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_GNU_LD_TRUE}" && test -z "${WITH_GNU_LD_FALSE}"; then as_fn_error $? "conditional \"WITH_GNU_LD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${HAVE_SYSTEMD_TRUE}" && test -z "${HAVE_SYSTEMD_FALSE}"; then as_fn_error $? "conditional \"HAVE_SYSTEMD\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_FREEIPMI_ARGP_TRUE}" && test -z "${WITH_FREEIPMI_ARGP_FALSE}"; then as_fn_error $? "conditional \"WITH_FREEIPMI_ARGP\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi if test -z "${WITH_PKG_CONFIG_TRUE}" && test -z "${WITH_PKG_CONFIG_FALSE}"; then as_fn_error $? "conditional \"WITH_PKG_CONFIG\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi : "${CONFIG_STATUS=./config.status}" ac_write_fail=0 ac_clean_files_save=$ac_clean_files ac_clean_files="$ac_clean_files $CONFIG_STATUS" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $CONFIG_STATUS" >&5 $as_echo "$as_me: creating $CONFIG_STATUS" >&6;} as_write_fail=0 cat >$CONFIG_STATUS <<_ASEOF || as_write_fail=1 #! $SHELL # Generated by $as_me. # Run this file to recreate the current configuration. # Compiler output produced by configure, useful for debugging # configure, is in config.log if it exists. debug=false ac_cs_recheck=false ac_cs_silent=false SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$CONFIG_STATUS <<\_ASEOF || as_write_fail=1 ## -------------------- ## ## M4sh Initialization. ## ## -------------------- ## # Be more Bourne compatible DUALCASE=1; export DUALCASE # for MKS sh if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then : emulate sh NULLCMD=: # Pre-4.2 versions of Zsh do word splitting on ${1+"$@"}, which # is contrary to our usage. Disable this feature. alias -g '${1+"$@"}'='"$@"' setopt NO_GLOB_SUBST else case `(set -o) 2>/dev/null` in #( *posix*) : set -o posix ;; #( *) : ;; esac fi as_nl=' ' export as_nl # Printing a long string crashes Solaris 7 /usr/bin/printf. as_echo='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo as_echo=$as_echo$as_echo$as_echo$as_echo$as_echo$as_echo # Prefer a ksh shell builtin over an external printf program on Solaris, # but without wasting forks for bash or zsh. if test -z "$BASH_VERSION$ZSH_VERSION" \ && (test "X`print -r -- $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='print -r --' as_echo_n='print -rn --' elif (test "X`printf %s $as_echo`" = "X$as_echo") 2>/dev/null; then as_echo='printf %s\n' as_echo_n='printf %s' else if test "X`(/usr/ucb/echo -n -n $as_echo) 2>/dev/null`" = "X-n $as_echo"; then as_echo_body='eval /usr/ucb/echo -n "$1$as_nl"' as_echo_n='/usr/ucb/echo -n' else as_echo_body='eval expr "X$1" : "X\\(.*\\)"' as_echo_n_body='eval arg=$1; case $arg in #( *"$as_nl"*) expr "X$arg" : "X\\(.*\\)$as_nl"; arg=`expr "X$arg" : ".*$as_nl\\(.*\\)"`;; esac; expr "X$arg" : "X\\(.*\\)" | tr -d "$as_nl" ' export as_echo_n_body as_echo_n='sh -c $as_echo_n_body as_echo' fi export as_echo_body as_echo='sh -c $as_echo_body as_echo' fi # The user is always right. if test "${PATH_SEPARATOR+set}" != set; then PATH_SEPARATOR=: (PATH='/bin;/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 && { (PATH='/bin:/bin'; FPATH=$PATH; sh -c :) >/dev/null 2>&1 || PATH_SEPARATOR=';' } fi # IFS # We need space, tab and new line, in precisely that order. Quoting is # there to prevent editors from complaining about space-tab. # (If _AS_PATH_WALK were called with IFS unset, it would disable word # splitting by setting IFS to empty value.) IFS=" "" $as_nl" # Find who we are. Look in the path if we contain no directory separator. as_myself= case $0 in #(( *[\\/]* ) as_myself=$0 ;; *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break done IFS=$as_save_IFS ;; esac # We did not find ourselves, most probably we were run as `sh COMMAND' # in which case we are not to be found in the path. if test "x$as_myself" = x; then as_myself=$0 fi if test ! -f "$as_myself"; then $as_echo "$as_myself: error: cannot find myself; rerun with an absolute file name" >&2 exit 1 fi # Unset variables that we do not need and which cause bugs (e.g. in # pre-3.0 UWIN ksh). But do not cause bugs in bash 2.01; the "|| exit 1" # suppresses any "Segmentation fault" message there. '((' could # trigger a bug in pdksh 5.2.14. for as_var in BASH_ENV ENV MAIL MAILPATH do eval test x\${$as_var+set} = xset \ && ( (unset $as_var) || exit 1) >/dev/null 2>&1 && unset $as_var || : done PS1='$ ' PS2='> ' PS4='+ ' # NLS nuisances. LC_ALL=C export LC_ALL LANGUAGE=C export LANGUAGE # CDPATH. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH # as_fn_error STATUS ERROR [LINENO LOG_FD] # ---------------------------------------- # Output "`basename $0`: error: ERROR" to stderr. If LINENO and LOG_FD are # provided, also output the error to LOG_FD, referencing LINENO. Then exit the # script with STATUS, using 1 if that was 0. as_fn_error () { as_status=$1; test $as_status -eq 0 && as_status=1 if test "$4"; then as_lineno=${as_lineno-"$3"} as_lineno_stack=as_lineno_stack=$as_lineno_stack $as_echo "$as_me:${as_lineno-$LINENO}: error: $2" >&$4 fi $as_echo "$as_me: error: $2" >&2 as_fn_exit $as_status } # as_fn_error # as_fn_set_status STATUS # ----------------------- # Set $? to STATUS, without forking. as_fn_set_status () { return $1 } # as_fn_set_status # as_fn_exit STATUS # ----------------- # Exit the shell with STATUS, even in a "trap 0" or "set -e" context. as_fn_exit () { set +e as_fn_set_status $1 exit $1 } # as_fn_exit # as_fn_unset VAR # --------------- # Portably unset VAR. as_fn_unset () { { eval $1=; unset $1;} } as_unset=as_fn_unset # as_fn_append VAR VALUE # ---------------------- # Append the text in VALUE to the end of the definition contained in VAR. Take # advantage of any shell optimizations that allow amortized linear growth over # repeated appends, instead of the typical quadratic growth present in naive # implementations. if (eval "as_var=1; as_var+=2; test x\$as_var = x12") 2>/dev/null; then : eval 'as_fn_append () { eval $1+=\$2 }' else as_fn_append () { eval $1=\$$1\$2 } fi # as_fn_append # as_fn_arith ARG... # ------------------ # Perform arithmetic evaluation on the ARGs, and store the result in the # global $as_val. Take advantage of shells that can avoid forks. The arguments # must be portable across $(()) and expr. if (eval "test \$(( 1 + 1 )) = 2") 2>/dev/null; then : eval 'as_fn_arith () { as_val=$(( $* )) }' else as_fn_arith () { as_val=`expr "$@" || test $? -eq 1` } fi # as_fn_arith if expr a : '\(a\)' >/dev/null 2>&1 && test "X`expr 00001 : '.*\(...\)'`" = X001; then as_expr=expr else as_expr=false fi if (basename -- /) >/dev/null 2>&1 && test "X`basename -- / 2>&1`" = "X/"; then as_basename=basename else as_basename=false fi if (as_dir=`dirname -- /` && test "X$as_dir" = X/) >/dev/null 2>&1; then as_dirname=dirname else as_dirname=false fi as_me=`$as_basename -- "$0" || $as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \ X"$0" : 'X\(//\)$' \| \ X"$0" : 'X\(/\)' \| . 2>/dev/null || $as_echo X/"$0" | sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/ q } /^X\/\(\/\/\)$/{ s//\1/ q } /^X\/\(\/\).*/{ s//\1/ q } s/.*/./; q'` # Avoid depending upon Character Ranges. as_cr_letters='abcdefghijklmnopqrstuvwxyz' as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ' as_cr_Letters=$as_cr_letters$as_cr_LETTERS as_cr_digits='0123456789' as_cr_alnum=$as_cr_Letters$as_cr_digits ECHO_C= ECHO_N= ECHO_T= case `echo -n x` in #((((( -n*) case `echo 'xy\c'` in *c*) ECHO_T=' ';; # ECHO_T is single tab character. xy) ECHO_C='\c';; *) echo `echo ksh88 bug on AIX 6.1` > /dev/null ECHO_T=' ';; esac;; *) ECHO_N='-n';; esac rm -f conf$$ conf$$.exe conf$$.file if test -d conf$$.dir; then rm -f conf$$.dir/conf$$.file else rm -f conf$$.dir mkdir conf$$.dir 2>/dev/null fi if (echo >conf$$.file) 2>/dev/null; then if ln -s conf$$.file conf$$ 2>/dev/null; then as_ln_s='ln -s' # ... but there are two gotchas: # 1) On MSYS, both `ln -s file dir' and `ln file dir' fail. # 2) DJGPP < 2.04 has no symlinks; `ln -s' creates a wrapper executable. # In both cases, we have to default to `cp -pR'. ln -s conf$$.file conf$$.dir 2>/dev/null && test ! -f conf$$.exe || as_ln_s='cp -pR' elif ln conf$$.file conf$$ 2>/dev/null; then as_ln_s=ln else as_ln_s='cp -pR' fi else as_ln_s='cp -pR' fi rm -f conf$$ conf$$.exe conf$$.dir/conf$$.file conf$$.file rmdir conf$$.dir 2>/dev/null # as_fn_mkdir_p # ------------- # Create "$as_dir" as a directory, including parents if necessary. as_fn_mkdir_p () { case $as_dir in #( -*) as_dir=./$as_dir;; esac test -d "$as_dir" || eval $as_mkdir_p || { as_dirs= while :; do case $as_dir in #( *\'*) as_qdir=`$as_echo "$as_dir" | sed "s/'/'\\\\\\\\''/g"`;; #'( *) as_qdir=$as_dir;; esac as_dirs="'$as_qdir' $as_dirs" as_dir=`$as_dirname -- "$as_dir" || $as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$as_dir" : 'X\(//\)[^/]' \| \ X"$as_dir" : 'X\(//\)$' \| \ X"$as_dir" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$as_dir" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` test -d "$as_dir" && break done test -z "$as_dirs" || eval "mkdir $as_dirs" } || test -d "$as_dir" || as_fn_error $? "cannot create directory $as_dir" } # as_fn_mkdir_p if mkdir -p . 2>/dev/null; then as_mkdir_p='mkdir -p "$as_dir"' else test -d ./-p && rmdir ./-p as_mkdir_p=false fi # as_fn_executable_p FILE # ----------------------- # Test if FILE is an executable regular file. as_fn_executable_p () { test -f "$1" && test -x "$1" } # as_fn_executable_p as_test_x='test -x' as_executable_p=as_fn_executable_p # Sed expression to map a string onto a valid CPP name. as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'" # Sed expression to map a string onto a valid variable name. as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'" exec 6>&1 ## ----------------------------------- ## ## Main body of $CONFIG_STATUS script. ## ## ----------------------------------- ## _ASEOF test $as_write_fail = 0 && chmod +x $CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Save the log message, to keep $0 and so on meaningful, and to # report actual input values of CONFIG_FILES etc. instead of their # values after options handling. ac_log=" This file was extended by freeipmi $as_me 1.6.4, which was generated by GNU Autoconf 2.69. Invocation command line was CONFIG_FILES = $CONFIG_FILES CONFIG_HEADERS = $CONFIG_HEADERS CONFIG_LINKS = $CONFIG_LINKS CONFIG_COMMANDS = $CONFIG_COMMANDS $ $0 $@ on `(hostname || uname -n) 2>/dev/null | sed 1q` " _ACEOF case $ac_config_files in *" "*) set x $ac_config_files; shift; ac_config_files=$*;; esac case $ac_config_headers in *" "*) set x $ac_config_headers; shift; ac_config_headers=$*;; esac cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # Files that config.status was made for. config_files="$ac_config_files" config_headers="$ac_config_headers" config_commands="$ac_config_commands" _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 ac_cs_usage="\ \`$as_me' instantiates files and other configuration actions from templates according to the current configuration. Unless the files and actions are specified as TAGs, all are instantiated by default. Usage: $0 [OPTION]... [TAG]... -h, --help print this help, then exit -V, --version print version number and configuration settings, then exit --config print configuration, then exit -q, --quiet, --silent do not print progress messages -d, --debug don't remove temporary files --recheck update $as_me by reconfiguring in the same conditions --file=FILE[:TEMPLATE] instantiate the configuration file FILE --header=FILE[:TEMPLATE] instantiate the configuration header FILE Configuration files: $config_files Configuration headers: $config_headers Configuration commands: $config_commands Report bugs to ." _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`" ac_cs_version="\\ freeipmi config.status 1.6.4 configured by $0, generated by GNU Autoconf 2.69, with options \\"\$ac_cs_config\\" Copyright (C) 2012 Free Software Foundation, Inc. This config.status script is free software; the Free Software Foundation gives unlimited permission to copy, distribute and modify it." ac_pwd='$ac_pwd' srcdir='$srcdir' INSTALL='$INSTALL' MKDIR_P='$MKDIR_P' AWK='$AWK' test -n "\$AWK" || AWK=awk _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # The default lists apply if the user does not specify any file. ac_need_defaults=: while test $# != 0 do case $1 in --*=?*) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg=`expr "X$1" : 'X[^=]*=\(.*\)'` ac_shift=: ;; --*=) ac_option=`expr "X$1" : 'X\([^=]*\)='` ac_optarg= ac_shift=: ;; *) ac_option=$1 ac_optarg=$2 ac_shift=shift ;; esac case $ac_option in # Handling of the options. -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r) ac_cs_recheck=: ;; --version | --versio | --versi | --vers | --ver | --ve | --v | -V ) $as_echo "$ac_cs_version"; exit ;; --config | --confi | --conf | --con | --co | --c ) $as_echo "$ac_cs_config"; exit ;; --debug | --debu | --deb | --de | --d | -d ) debug=: ;; --file | --fil | --fi | --f ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; '') as_fn_error $? "missing file argument" ;; esac as_fn_append CONFIG_FILES " '$ac_optarg'" ac_need_defaults=false;; --header | --heade | --head | --hea ) $ac_shift case $ac_optarg in *\'*) ac_optarg=`$as_echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"` ;; esac as_fn_append CONFIG_HEADERS " '$ac_optarg'" ac_need_defaults=false;; --he | --h) # Conflict between --help and --header as_fn_error $? "ambiguous option: \`$1' Try \`$0 --help' for more information.";; --help | --hel | -h ) $as_echo "$ac_cs_usage"; exit ;; -q | -quiet | --quiet | --quie | --qui | --qu | --q \ | -silent | --silent | --silen | --sile | --sil | --si | --s) ac_cs_silent=: ;; # This is an error. -*) as_fn_error $? "unrecognized option: \`$1' Try \`$0 --help' for more information." ;; *) as_fn_append ac_config_targets " $1" ac_need_defaults=false ;; esac shift done ac_configure_extra_args= if $ac_cs_silent; then exec 6>/dev/null ac_configure_extra_args="$ac_configure_extra_args --silent" fi _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 if \$ac_cs_recheck; then set X $SHELL '$0' $ac_configure_args \$ac_configure_extra_args --no-create --no-recursion shift \$as_echo "running CONFIG_SHELL=$SHELL \$*" >&6 CONFIG_SHELL='$SHELL' export CONFIG_SHELL exec "\$@" fi _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 exec 5>>config.log { echo sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX ## Running $as_me. ## _ASBOX $as_echo "$ac_log" } >&5 _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 # # INIT-COMMANDS # AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir" # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' macro_version='`$ECHO "$macro_version" | $SED "$delay_single_quote_subst"`' macro_revision='`$ECHO "$macro_revision" | $SED "$delay_single_quote_subst"`' enable_shared='`$ECHO "$enable_shared" | $SED "$delay_single_quote_subst"`' enable_static='`$ECHO "$enable_static" | $SED "$delay_single_quote_subst"`' pic_mode='`$ECHO "$pic_mode" | $SED "$delay_single_quote_subst"`' enable_fast_install='`$ECHO "$enable_fast_install" | $SED "$delay_single_quote_subst"`' SHELL='`$ECHO "$SHELL" | $SED "$delay_single_quote_subst"`' ECHO='`$ECHO "$ECHO" | $SED "$delay_single_quote_subst"`' PATH_SEPARATOR='`$ECHO "$PATH_SEPARATOR" | $SED "$delay_single_quote_subst"`' host_alias='`$ECHO "$host_alias" | $SED "$delay_single_quote_subst"`' host='`$ECHO "$host" | $SED "$delay_single_quote_subst"`' host_os='`$ECHO "$host_os" | $SED "$delay_single_quote_subst"`' build_alias='`$ECHO "$build_alias" | $SED "$delay_single_quote_subst"`' build='`$ECHO "$build" | $SED "$delay_single_quote_subst"`' build_os='`$ECHO "$build_os" | $SED "$delay_single_quote_subst"`' SED='`$ECHO "$SED" | $SED "$delay_single_quote_subst"`' Xsed='`$ECHO "$Xsed" | $SED "$delay_single_quote_subst"`' GREP='`$ECHO "$GREP" | $SED "$delay_single_quote_subst"`' EGREP='`$ECHO "$EGREP" | $SED "$delay_single_quote_subst"`' FGREP='`$ECHO "$FGREP" | $SED "$delay_single_quote_subst"`' LD='`$ECHO "$LD" | $SED "$delay_single_quote_subst"`' NM='`$ECHO "$NM" | $SED "$delay_single_quote_subst"`' LN_S='`$ECHO "$LN_S" | $SED "$delay_single_quote_subst"`' max_cmd_len='`$ECHO "$max_cmd_len" | $SED "$delay_single_quote_subst"`' ac_objext='`$ECHO "$ac_objext" | $SED "$delay_single_quote_subst"`' exeext='`$ECHO "$exeext" | $SED "$delay_single_quote_subst"`' lt_unset='`$ECHO "$lt_unset" | $SED "$delay_single_quote_subst"`' lt_SP2NL='`$ECHO "$lt_SP2NL" | $SED "$delay_single_quote_subst"`' lt_NL2SP='`$ECHO "$lt_NL2SP" | $SED "$delay_single_quote_subst"`' lt_cv_to_host_file_cmd='`$ECHO "$lt_cv_to_host_file_cmd" | $SED "$delay_single_quote_subst"`' lt_cv_to_tool_file_cmd='`$ECHO "$lt_cv_to_tool_file_cmd" | $SED "$delay_single_quote_subst"`' reload_flag='`$ECHO "$reload_flag" | $SED "$delay_single_quote_subst"`' reload_cmds='`$ECHO "$reload_cmds" | $SED "$delay_single_quote_subst"`' OBJDUMP='`$ECHO "$OBJDUMP" | $SED "$delay_single_quote_subst"`' deplibs_check_method='`$ECHO "$deplibs_check_method" | $SED "$delay_single_quote_subst"`' file_magic_cmd='`$ECHO "$file_magic_cmd" | $SED "$delay_single_quote_subst"`' file_magic_glob='`$ECHO "$file_magic_glob" | $SED "$delay_single_quote_subst"`' want_nocaseglob='`$ECHO "$want_nocaseglob" | $SED "$delay_single_quote_subst"`' DLLTOOL='`$ECHO "$DLLTOOL" | $SED "$delay_single_quote_subst"`' sharedlib_from_linklib_cmd='`$ECHO "$sharedlib_from_linklib_cmd" | $SED "$delay_single_quote_subst"`' AR='`$ECHO "$AR" | $SED "$delay_single_quote_subst"`' AR_FLAGS='`$ECHO "$AR_FLAGS" | $SED "$delay_single_quote_subst"`' archiver_list_spec='`$ECHO "$archiver_list_spec" | $SED "$delay_single_quote_subst"`' STRIP='`$ECHO "$STRIP" | $SED "$delay_single_quote_subst"`' RANLIB='`$ECHO "$RANLIB" | $SED "$delay_single_quote_subst"`' old_postinstall_cmds='`$ECHO "$old_postinstall_cmds" | $SED "$delay_single_quote_subst"`' old_postuninstall_cmds='`$ECHO "$old_postuninstall_cmds" | $SED "$delay_single_quote_subst"`' old_archive_cmds='`$ECHO "$old_archive_cmds" | $SED "$delay_single_quote_subst"`' lock_old_archive_extraction='`$ECHO "$lock_old_archive_extraction" | $SED "$delay_single_quote_subst"`' CC='`$ECHO "$CC" | $SED "$delay_single_quote_subst"`' CFLAGS='`$ECHO "$CFLAGS" | $SED "$delay_single_quote_subst"`' compiler='`$ECHO "$compiler" | $SED "$delay_single_quote_subst"`' GCC='`$ECHO "$GCC" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_pipe='`$ECHO "$lt_cv_sys_global_symbol_pipe" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_cdecl='`$ECHO "$lt_cv_sys_global_symbol_to_cdecl" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address" | $SED "$delay_single_quote_subst"`' lt_cv_sys_global_symbol_to_c_name_address_lib_prefix='`$ECHO "$lt_cv_sys_global_symbol_to_c_name_address_lib_prefix" | $SED "$delay_single_quote_subst"`' nm_file_list_spec='`$ECHO "$nm_file_list_spec" | $SED "$delay_single_quote_subst"`' lt_sysroot='`$ECHO "$lt_sysroot" | $SED "$delay_single_quote_subst"`' objdir='`$ECHO "$objdir" | $SED "$delay_single_quote_subst"`' MAGIC_CMD='`$ECHO "$MAGIC_CMD" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_no_builtin_flag='`$ECHO "$lt_prog_compiler_no_builtin_flag" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_pic='`$ECHO "$lt_prog_compiler_pic" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_wl='`$ECHO "$lt_prog_compiler_wl" | $SED "$delay_single_quote_subst"`' lt_prog_compiler_static='`$ECHO "$lt_prog_compiler_static" | $SED "$delay_single_quote_subst"`' lt_cv_prog_compiler_c_o='`$ECHO "$lt_cv_prog_compiler_c_o" | $SED "$delay_single_quote_subst"`' need_locks='`$ECHO "$need_locks" | $SED "$delay_single_quote_subst"`' MANIFEST_TOOL='`$ECHO "$MANIFEST_TOOL" | $SED "$delay_single_quote_subst"`' DSYMUTIL='`$ECHO "$DSYMUTIL" | $SED "$delay_single_quote_subst"`' NMEDIT='`$ECHO "$NMEDIT" | $SED "$delay_single_quote_subst"`' LIPO='`$ECHO "$LIPO" | $SED "$delay_single_quote_subst"`' OTOOL='`$ECHO "$OTOOL" | $SED "$delay_single_quote_subst"`' OTOOL64='`$ECHO "$OTOOL64" | $SED "$delay_single_quote_subst"`' libext='`$ECHO "$libext" | $SED "$delay_single_quote_subst"`' shrext_cmds='`$ECHO "$shrext_cmds" | $SED "$delay_single_quote_subst"`' extract_expsyms_cmds='`$ECHO "$extract_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds_need_lc='`$ECHO "$archive_cmds_need_lc" | $SED "$delay_single_quote_subst"`' enable_shared_with_static_runtimes='`$ECHO "$enable_shared_with_static_runtimes" | $SED "$delay_single_quote_subst"`' export_dynamic_flag_spec='`$ECHO "$export_dynamic_flag_spec" | $SED "$delay_single_quote_subst"`' whole_archive_flag_spec='`$ECHO "$whole_archive_flag_spec" | $SED "$delay_single_quote_subst"`' compiler_needs_object='`$ECHO "$compiler_needs_object" | $SED "$delay_single_quote_subst"`' old_archive_from_new_cmds='`$ECHO "$old_archive_from_new_cmds" | $SED "$delay_single_quote_subst"`' old_archive_from_expsyms_cmds='`$ECHO "$old_archive_from_expsyms_cmds" | $SED "$delay_single_quote_subst"`' archive_cmds='`$ECHO "$archive_cmds" | $SED "$delay_single_quote_subst"`' archive_expsym_cmds='`$ECHO "$archive_expsym_cmds" | $SED "$delay_single_quote_subst"`' module_cmds='`$ECHO "$module_cmds" | $SED "$delay_single_quote_subst"`' module_expsym_cmds='`$ECHO "$module_expsym_cmds" | $SED "$delay_single_quote_subst"`' with_gnu_ld='`$ECHO "$with_gnu_ld" | $SED "$delay_single_quote_subst"`' allow_undefined_flag='`$ECHO "$allow_undefined_flag" | $SED "$delay_single_quote_subst"`' no_undefined_flag='`$ECHO "$no_undefined_flag" | $SED "$delay_single_quote_subst"`' hardcode_libdir_flag_spec='`$ECHO "$hardcode_libdir_flag_spec" | $SED "$delay_single_quote_subst"`' hardcode_libdir_separator='`$ECHO "$hardcode_libdir_separator" | $SED "$delay_single_quote_subst"`' hardcode_direct='`$ECHO "$hardcode_direct" | $SED "$delay_single_quote_subst"`' hardcode_direct_absolute='`$ECHO "$hardcode_direct_absolute" | $SED "$delay_single_quote_subst"`' hardcode_minus_L='`$ECHO "$hardcode_minus_L" | $SED "$delay_single_quote_subst"`' hardcode_shlibpath_var='`$ECHO "$hardcode_shlibpath_var" | $SED "$delay_single_quote_subst"`' hardcode_automatic='`$ECHO "$hardcode_automatic" | $SED "$delay_single_quote_subst"`' inherit_rpath='`$ECHO "$inherit_rpath" | $SED "$delay_single_quote_subst"`' link_all_deplibs='`$ECHO "$link_all_deplibs" | $SED "$delay_single_quote_subst"`' always_export_symbols='`$ECHO "$always_export_symbols" | $SED "$delay_single_quote_subst"`' export_symbols_cmds='`$ECHO "$export_symbols_cmds" | $SED "$delay_single_quote_subst"`' exclude_expsyms='`$ECHO "$exclude_expsyms" | $SED "$delay_single_quote_subst"`' include_expsyms='`$ECHO "$include_expsyms" | $SED "$delay_single_quote_subst"`' prelink_cmds='`$ECHO "$prelink_cmds" | $SED "$delay_single_quote_subst"`' postlink_cmds='`$ECHO "$postlink_cmds" | $SED "$delay_single_quote_subst"`' file_list_spec='`$ECHO "$file_list_spec" | $SED "$delay_single_quote_subst"`' variables_saved_for_relink='`$ECHO "$variables_saved_for_relink" | $SED "$delay_single_quote_subst"`' need_lib_prefix='`$ECHO "$need_lib_prefix" | $SED "$delay_single_quote_subst"`' need_version='`$ECHO "$need_version" | $SED "$delay_single_quote_subst"`' version_type='`$ECHO "$version_type" | $SED "$delay_single_quote_subst"`' runpath_var='`$ECHO "$runpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_var='`$ECHO "$shlibpath_var" | $SED "$delay_single_quote_subst"`' shlibpath_overrides_runpath='`$ECHO "$shlibpath_overrides_runpath" | $SED "$delay_single_quote_subst"`' libname_spec='`$ECHO "$libname_spec" | $SED "$delay_single_quote_subst"`' library_names_spec='`$ECHO "$library_names_spec" | $SED "$delay_single_quote_subst"`' soname_spec='`$ECHO "$soname_spec" | $SED "$delay_single_quote_subst"`' install_override_mode='`$ECHO "$install_override_mode" | $SED "$delay_single_quote_subst"`' postinstall_cmds='`$ECHO "$postinstall_cmds" | $SED "$delay_single_quote_subst"`' postuninstall_cmds='`$ECHO "$postuninstall_cmds" | $SED "$delay_single_quote_subst"`' finish_cmds='`$ECHO "$finish_cmds" | $SED "$delay_single_quote_subst"`' finish_eval='`$ECHO "$finish_eval" | $SED "$delay_single_quote_subst"`' hardcode_into_libs='`$ECHO "$hardcode_into_libs" | $SED "$delay_single_quote_subst"`' sys_lib_search_path_spec='`$ECHO "$sys_lib_search_path_spec" | $SED "$delay_single_quote_subst"`' sys_lib_dlsearch_path_spec='`$ECHO "$sys_lib_dlsearch_path_spec" | $SED "$delay_single_quote_subst"`' hardcode_action='`$ECHO "$hardcode_action" | $SED "$delay_single_quote_subst"`' enable_dlopen='`$ECHO "$enable_dlopen" | $SED "$delay_single_quote_subst"`' enable_dlopen_self='`$ECHO "$enable_dlopen_self" | $SED "$delay_single_quote_subst"`' enable_dlopen_self_static='`$ECHO "$enable_dlopen_self_static" | $SED "$delay_single_quote_subst"`' old_striplib='`$ECHO "$old_striplib" | $SED "$delay_single_quote_subst"`' striplib='`$ECHO "$striplib" | $SED "$delay_single_quote_subst"`' LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$1 _LTECHO_EOF' } # Quote evaled strings. for var in SHELL \ ECHO \ PATH_SEPARATOR \ SED \ GREP \ EGREP \ FGREP \ LD \ NM \ LN_S \ lt_SP2NL \ lt_NL2SP \ reload_flag \ OBJDUMP \ deplibs_check_method \ file_magic_cmd \ file_magic_glob \ want_nocaseglob \ DLLTOOL \ sharedlib_from_linklib_cmd \ AR \ AR_FLAGS \ archiver_list_spec \ STRIP \ RANLIB \ CC \ CFLAGS \ compiler \ lt_cv_sys_global_symbol_pipe \ lt_cv_sys_global_symbol_to_cdecl \ lt_cv_sys_global_symbol_to_c_name_address \ lt_cv_sys_global_symbol_to_c_name_address_lib_prefix \ nm_file_list_spec \ lt_prog_compiler_no_builtin_flag \ lt_prog_compiler_pic \ lt_prog_compiler_wl \ lt_prog_compiler_static \ lt_cv_prog_compiler_c_o \ need_locks \ MANIFEST_TOOL \ DSYMUTIL \ NMEDIT \ LIPO \ OTOOL \ OTOOL64 \ shrext_cmds \ export_dynamic_flag_spec \ whole_archive_flag_spec \ compiler_needs_object \ with_gnu_ld \ allow_undefined_flag \ no_undefined_flag \ hardcode_libdir_flag_spec \ hardcode_libdir_separator \ exclude_expsyms \ include_expsyms \ file_list_spec \ variables_saved_for_relink \ libname_spec \ library_names_spec \ soname_spec \ install_override_mode \ finish_eval \ old_striplib \ striplib; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in reload_cmds \ old_postinstall_cmds \ old_postuninstall_cmds \ old_archive_cmds \ extract_expsyms_cmds \ old_archive_from_new_cmds \ old_archive_from_expsyms_cmds \ archive_cmds \ archive_expsym_cmds \ module_cmds \ module_expsym_cmds \ export_symbols_cmds \ prelink_cmds \ postlink_cmds \ postinstall_cmds \ postuninstall_cmds \ finish_cmds \ sys_lib_search_path_spec \ sys_lib_dlsearch_path_spec; do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[\\\\\\\`\\"\\\$]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done ac_aux_dir='$ac_aux_dir' xsi_shell='$xsi_shell' lt_shell_append='$lt_shell_append' # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile' _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # Handling of arguments. for ac_config_target in $ac_config_targets do case $ac_config_target in "config/config.h") CONFIG_HEADERS="$CONFIG_HEADERS config/config.h" ;; "freeipmi.spec") CONFIG_FILES="$CONFIG_FILES freeipmi.spec" ;; "Makefile") CONFIG_FILES="$CONFIG_FILES Makefile" ;; "bmc-device/Makefile") CONFIG_FILES="$CONFIG_FILES bmc-device/Makefile" ;; "bmc-info/Makefile") CONFIG_FILES="$CONFIG_FILES bmc-info/Makefile" ;; "bmc-watchdog/Makefile") CONFIG_FILES="$CONFIG_FILES bmc-watchdog/Makefile" ;; "common/Makefile") CONFIG_FILES="$CONFIG_FILES common/Makefile" ;; "common/debugutil/Makefile") CONFIG_FILES="$CONFIG_FILES common/debugutil/Makefile" ;; "common/miscutil/Makefile") CONFIG_FILES="$CONFIG_FILES common/miscutil/Makefile" ;; "common/parsecommon/Makefile") CONFIG_FILES="$CONFIG_FILES common/parsecommon/Makefile" ;; "common/pingtool/Makefile") CONFIG_FILES="$CONFIG_FILES common/pingtool/Makefile" ;; "common/portability/Makefile") CONFIG_FILES="$CONFIG_FILES common/portability/Makefile" ;; "common/toolcommon/Makefile") CONFIG_FILES="$CONFIG_FILES common/toolcommon/Makefile" ;; "contrib/Makefile") CONFIG_FILES="$CONFIG_FILES contrib/Makefile" ;; "doc/Makefile") CONFIG_FILES="$CONFIG_FILES doc/Makefile" ;; "etc/Makefile") CONFIG_FILES="$CONFIG_FILES etc/Makefile" ;; "ipmi-chassis/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-chassis/Makefile" ;; "ipmi-config/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-config/Makefile" ;; "ipmi-dcmi/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-dcmi/Makefile" ;; "ipmi-fru/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-fru/Makefile" ;; "ipmi-locate/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-locate/Makefile" ;; "ipmi-oem/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-oem/Makefile" ;; "ipmi-pet/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-pet/Makefile" ;; "ipmi-raw/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-raw/Makefile" ;; "ipmi-sel/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-sel/Makefile" ;; "ipmi-sensors/Makefile") CONFIG_FILES="$CONFIG_FILES ipmi-sensors/Makefile" ;; "ipmiconsole/Makefile") CONFIG_FILES="$CONFIG_FILES ipmiconsole/Makefile" ;; "ipmidetect/Makefile") CONFIG_FILES="$CONFIG_FILES ipmidetect/Makefile" ;; "ipmidetectd/Makefile") CONFIG_FILES="$CONFIG_FILES ipmidetectd/Makefile" ;; "ipmiping/Makefile") CONFIG_FILES="$CONFIG_FILES ipmiping/Makefile" ;; "ipmipower/Makefile") CONFIG_FILES="$CONFIG_FILES ipmipower/Makefile" ;; "ipmiseld/Makefile") CONFIG_FILES="$CONFIG_FILES ipmiseld/Makefile" ;; "libfreeipmi/Makefile") CONFIG_FILES="$CONFIG_FILES libfreeipmi/Makefile" ;; "libfreeipmi/libfreeipmi.pc") CONFIG_FILES="$CONFIG_FILES libfreeipmi/libfreeipmi.pc" ;; "libfreeipmi/include/Makefile") CONFIG_FILES="$CONFIG_FILES libfreeipmi/include/Makefile" ;; "libfreeipmi/include/freeipmi/freeipmi.h") CONFIG_FILES="$CONFIG_FILES libfreeipmi/include/freeipmi/freeipmi.h" ;; "libipmiconsole/Makefile") CONFIG_FILES="$CONFIG_FILES libipmiconsole/Makefile" ;; "libipmiconsole/ipmiconsole.h") CONFIG_FILES="$CONFIG_FILES libipmiconsole/ipmiconsole.h" ;; "libipmiconsole/libipmiconsole.pc") CONFIG_FILES="$CONFIG_FILES libipmiconsole/libipmiconsole.pc" ;; "libipmidetect/Makefile") CONFIG_FILES="$CONFIG_FILES libipmidetect/Makefile" ;; "libipmidetect/ipmidetect.h") CONFIG_FILES="$CONFIG_FILES libipmidetect/ipmidetect.h" ;; "libipmidetect/libipmidetect.pc") CONFIG_FILES="$CONFIG_FILES libipmidetect/libipmidetect.pc" ;; "libipmimonitoring/Makefile") CONFIG_FILES="$CONFIG_FILES libipmimonitoring/Makefile" ;; "libipmimonitoring/ipmi_monitoring.h") CONFIG_FILES="$CONFIG_FILES libipmimonitoring/ipmi_monitoring.h" ;; "libipmimonitoring/libipmimonitoring.pc") CONFIG_FILES="$CONFIG_FILES libipmimonitoring/libipmimonitoring.pc" ;; "man/Makefile") CONFIG_FILES="$CONFIG_FILES man/Makefile" ;; "man/bmc-device.8.pre") CONFIG_FILES="$CONFIG_FILES man/bmc-device.8.pre" ;; "man/bmc-info.8.pre") CONFIG_FILES="$CONFIG_FILES man/bmc-info.8.pre" ;; "man/bmc-watchdog.8.pre") CONFIG_FILES="$CONFIG_FILES man/bmc-watchdog.8.pre" ;; "man/freeipmi.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/freeipmi.conf.5.pre" ;; "man/freeipmi.7.pre") CONFIG_FILES="$CONFIG_FILES man/freeipmi.7.pre" ;; "man/ipmi-chassis.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-chassis.8.pre" ;; "man/ipmi-config.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-config.8.pre" ;; "man/ipmi-config.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-config.conf.5.pre" ;; "man/ipmi-dcmi.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-dcmi.8.pre" ;; "man/ipmi-fru.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-fru.8.pre" ;; "man/ipmi-locate.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-locate.8.pre" ;; "man/ipmi-oem.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-oem.8.pre" ;; "man/ipmi-pet.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-pet.8.pre" ;; "man/ipmi-raw.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-raw.8.pre" ;; "man/ipmi-sel.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-sel.8.pre" ;; "man/ipmi-sensors.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmi-sensors.8.pre" ;; "man/ipmiconsole.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmiconsole.8.pre" ;; "man/ipmidetect.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmidetect.8.pre" ;; "man/ipmidetect.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/ipmidetect.conf.5.pre" ;; "man/ipmidetectd.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmidetectd.8.pre" ;; "man/ipmidetectd.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/ipmidetectd.conf.5.pre" ;; "man/ipmiping.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmiping.8.pre" ;; "man/ipmipower.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmipower.8.pre" ;; "man/ipmiseld.8.pre") CONFIG_FILES="$CONFIG_FILES man/ipmiseld.8.pre" ;; "man/ipmiseld.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/ipmiseld.conf.5.pre" ;; "man/libfreeipmi.3.pre") CONFIG_FILES="$CONFIG_FILES man/libfreeipmi.3.pre" ;; "man/freeipmi_interpret_sensor.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/freeipmi_interpret_sensor.conf.5.pre" ;; "man/freeipmi_interpret_sel.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/freeipmi_interpret_sel.conf.5.pre" ;; "man/libipmiconsole.3.pre") CONFIG_FILES="$CONFIG_FILES man/libipmiconsole.3.pre" ;; "man/libipmiconsole.conf.5.pre") CONFIG_FILES="$CONFIG_FILES man/libipmiconsole.conf.5.pre" ;; "man/libipmidetect.3.pre") CONFIG_FILES="$CONFIG_FILES man/libipmidetect.3.pre" ;; "man/libipmimonitoring.3.pre") CONFIG_FILES="$CONFIG_FILES man/libipmimonitoring.3.pre" ;; "man/rmcpping.8.pre") CONFIG_FILES="$CONFIG_FILES man/rmcpping.8.pre" ;; "rmcpping/Makefile") CONFIG_FILES="$CONFIG_FILES rmcpping/Makefile" ;; "depfiles") CONFIG_COMMANDS="$CONFIG_COMMANDS depfiles" ;; "libtool") CONFIG_COMMANDS="$CONFIG_COMMANDS libtool" ;; *) as_fn_error $? "invalid argument: \`$ac_config_target'" "$LINENO" 5;; esac done # If the user did not use the arguments to specify the items to instantiate, # then the envvar interface is used. Set only those that are not. # We use the long form for the default assignment because of an extremely # bizarre bug on SunOS 4.1.3. if $ac_need_defaults; then test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands fi # Have a temporary directory for convenience. Make it in the build tree # simply because there is no reason against having it here, and in addition, # creating and moving files from /tmp can sometimes cause problems. # Hook for its removal unless debugging. # Note that there is a small window in which the directory will not be cleaned: # after its creation but before its name has been assigned to `$tmp'. $debug || { tmp= ac_tmp= trap 'exit_status=$? : "${ac_tmp:=$tmp}" { test ! -d "$ac_tmp" || rm -fr "$ac_tmp"; } && exit $exit_status ' 0 trap 'as_fn_exit 1' 1 2 13 15 } # Create a (secure) tmp directory for tmp files. { tmp=`(umask 077 && mktemp -d "./confXXXXXX") 2>/dev/null` && test -d "$tmp" } || { tmp=./conf$$-$RANDOM (umask 077 && mkdir "$tmp") } || as_fn_error $? "cannot create a temporary directory in ." "$LINENO" 5 ac_tmp=$tmp # Set up the scripts for CONFIG_FILES section. # No need to generate them if there are no CONFIG_FILES. # This happens for instance with `./config.status config.h'. if test -n "$CONFIG_FILES"; then ac_cr=`echo X | tr X '\015'` # On cygwin, bash can eat \r inside `` if the user requested igncr. # But we know of no other shell where ac_cr would be empty at this # point, so we can use a bashism as a fallback. if test "x$ac_cr" = x; then eval ac_cr=\$\'\\r\' fi ac_cs_awk_cr=`$AWK 'BEGIN { print "a\rb" }' /dev/null` if test "$ac_cs_awk_cr" = "a${ac_cr}b"; then ac_cs_awk_cr='\\r' else ac_cs_awk_cr=$ac_cr fi echo 'BEGIN {' >"$ac_tmp/subs1.awk" && _ACEOF { echo "cat >conf$$subs.awk <<_ACEOF" && echo "$ac_subst_vars" | sed 's/.*/&!$&$ac_delim/' && echo "_ACEOF" } >conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_num=`echo "$ac_subst_vars" | grep -c '^'` ac_delim='%!_!# ' for ac_last_try in false false false false false :; do . ./conf$$subs.sh || as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 ac_delim_n=`sed -n "s/.*$ac_delim\$/X/p" conf$$subs.awk | grep -c X` if test $ac_delim_n = $ac_delim_num; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_STATUS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done rm -f conf$$subs.sh cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 cat >>"\$ac_tmp/subs1.awk" <<\\_ACAWK && _ACEOF sed -n ' h s/^/S["/; s/!.*/"]=/ p g s/^[^!]*!// :repl t repl s/'"$ac_delim"'$// t delim :nl h s/\(.\{148\}\)..*/\1/ t more1 s/["\\]/\\&/g; s/^/"/; s/$/\\n"\\/ p n b repl :more1 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t nl :delim h s/\(.\{148\}\)..*/\1/ t more2 s/["\\]/\\&/g; s/^/"/; s/$/"/ p b :more2 s/["\\]/\\&/g; s/^/"/; s/$/"\\/ p g s/.\{148\}// t delim ' >$CONFIG_STATUS || ac_write_fail=1 rm -f conf$$subs.awk cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 _ACAWK cat >>"\$ac_tmp/subs1.awk" <<_ACAWK && for (key in S) S_is_set[key] = 1 FS = "" } { line = $ 0 nfields = split(line, field, "@") substed = 0 len = length(field[1]) for (i = 2; i < nfields; i++) { key = field[i] keylen = length(key) if (S_is_set[key]) { value = S[key] line = substr(line, 1, len) "" value "" substr(line, len + keylen + 3) len += length(value) + length(field[++i]) substed = 1 } else len += 1 + keylen } print line } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 if sed "s/$ac_cr//" < /dev/null > /dev/null 2>&1; then sed "s/$ac_cr\$//; s/$ac_cr/$ac_cs_awk_cr/g" else cat fi < "$ac_tmp/subs1.awk" > "$ac_tmp/subs.awk" \ || as_fn_error $? "could not setup config files machinery" "$LINENO" 5 _ACEOF # VPATH may cause trouble with some makes, so we remove sole $(srcdir), # ${srcdir} and @srcdir@ entries from VPATH if srcdir is ".", strip leading and # trailing colons and then remove the whole line if VPATH becomes empty # (actually we leave an empty line to preserve line numbers). if test "x$srcdir" = x.; then ac_vpsub='/^[ ]*VPATH[ ]*=[ ]*/{ h s/// s/^/:/ s/[ ]*$/:/ s/:\$(srcdir):/:/g s/:\${srcdir}:/:/g s/:@srcdir@:/:/g s/^:*// s/:*$// x s/\(=[ ]*\).*/\1/ G s/\n// s/^[^=]*=[ ]*$// }' fi cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 fi # test -n "$CONFIG_FILES" # Set up the scripts for CONFIG_HEADERS section. # No need to generate them if there are no CONFIG_HEADERS. # This happens for instance with `./config.status Makefile'. if test -n "$CONFIG_HEADERS"; then cat >"$ac_tmp/defines.awk" <<\_ACAWK || BEGIN { _ACEOF # Transform confdefs.h into an awk script `defines.awk', embedded as # here-document in config.status, that substitutes the proper values into # config.h.in to produce config.h. # Create a delimiter string that does not exist in confdefs.h, to ease # handling of long lines. ac_delim='%!_!# ' for ac_last_try in false false :; do ac_tt=`sed -n "/$ac_delim/p" confdefs.h` if test -z "$ac_tt"; then break elif $ac_last_try; then as_fn_error $? "could not make $CONFIG_HEADERS" "$LINENO" 5 else ac_delim="$ac_delim!$ac_delim _$ac_delim!! " fi done # For the awk script, D is an array of macro values keyed by name, # likewise P contains macro parameters if any. Preserve backslash # newline sequences. ac_word_re=[_$as_cr_Letters][_$as_cr_alnum]* sed -n ' s/.\{148\}/&'"$ac_delim"'/g t rset :rset s/^[ ]*#[ ]*define[ ][ ]*/ / t def d :def s/\\$// t bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3"/p s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2"/p d :bsnl s/["\\]/\\&/g s/^ \('"$ac_word_re"'\)\(([^()]*)\)[ ]*\(.*\)/P["\1"]="\2"\ D["\1"]=" \3\\\\\\n"\\/p t cont s/^ \('"$ac_word_re"'\)[ ]*\(.*\)/D["\1"]=" \2\\\\\\n"\\/p t cont d :cont n s/.\{148\}/&'"$ac_delim"'/g t clear :clear s/\\$// t bsnlc s/["\\]/\\&/g; s/^/"/; s/$/"/p d :bsnlc s/["\\]/\\&/g; s/^/"/; s/$/\\\\\\n"\\/p b cont ' >$CONFIG_STATUS || ac_write_fail=1 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 for (key in D) D_is_set[key] = 1 FS = "" } /^[\t ]*#[\t ]*(define|undef)[\t ]+$ac_word_re([\t (]|\$)/ { line = \$ 0 split(line, arg, " ") if (arg[1] == "#") { defundef = arg[2] mac1 = arg[3] } else { defundef = substr(arg[1], 2) mac1 = arg[2] } split(mac1, mac2, "(") #) macro = mac2[1] prefix = substr(line, 1, index(line, defundef) - 1) if (D_is_set[macro]) { # Preserve the white space surrounding the "#". print prefix "define", macro P[macro] D[macro] next } else { # Replace #undef with comments. This is necessary, for example, # in the case of _POSIX_SOURCE, which is predefined and required # on some systems where configure will not decide to define it. if (defundef == "undef") { print "/*", prefix defundef, macro, "*/" next } } } { print } _ACAWK _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 as_fn_error $? "could not setup config headers machinery" "$LINENO" 5 fi # test -n "$CONFIG_HEADERS" eval set X " :F $CONFIG_FILES :H $CONFIG_HEADERS :C $CONFIG_COMMANDS" shift for ac_tag do case $ac_tag in :[FHLC]) ac_mode=$ac_tag; continue;; esac case $ac_mode$ac_tag in :[FHL]*:*);; :L* | :C*:*) as_fn_error $? "invalid tag \`$ac_tag'" "$LINENO" 5;; :[FH]-) ac_tag=-:-;; :[FH]*) ac_tag=$ac_tag:$ac_tag.in;; esac ac_save_IFS=$IFS IFS=: set x $ac_tag IFS=$ac_save_IFS shift ac_file=$1 shift case $ac_mode in :L) ac_source=$1;; :[FH]) ac_file_inputs= for ac_f do case $ac_f in -) ac_f="$ac_tmp/stdin";; *) # Look for the file first in the build tree, then in the source tree # (if the path is not absolute). The absolute path cannot be DOS-style, # because $ac_f cannot contain `:'. test -f "$ac_f" || case $ac_f in [\\/$]*) false;; *) test -f "$srcdir/$ac_f" && ac_f="$srcdir/$ac_f";; esac || as_fn_error 1 "cannot find input file: \`$ac_f'" "$LINENO" 5;; esac case $ac_f in *\'*) ac_f=`$as_echo "$ac_f" | sed "s/'/'\\\\\\\\''/g"`;; esac as_fn_append ac_file_inputs " '$ac_f'" done # Let's still pretend it is `configure' which instantiates (i.e., don't # use $as_me), people would be surprised to read: # /* config.h. Generated by config.status. */ configure_input='Generated from '` $as_echo "$*" | sed 's|^[^:]*/||;s|:[^:]*/|, |g' `' by configure.' if test x"$ac_file" != x-; then configure_input="$ac_file. $configure_input" { $as_echo "$as_me:${as_lineno-$LINENO}: creating $ac_file" >&5 $as_echo "$as_me: creating $ac_file" >&6;} fi # Neutralize special characters interpreted by sed in replacement strings. case $configure_input in #( *\&* | *\|* | *\\* ) ac_sed_conf_input=`$as_echo "$configure_input" | sed 's/[\\\\&|]/\\\\&/g'`;; #( *) ac_sed_conf_input=$configure_input;; esac case $ac_tag in *:-:* | *:-) cat >"$ac_tmp/stdin" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; esac ;; esac ac_dir=`$as_dirname -- "$ac_file" || $as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$ac_file" : 'X\(//\)[^/]' \| \ X"$ac_file" : 'X\(//\)$' \| \ X"$ac_file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$ac_file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir="$ac_dir"; as_fn_mkdir_p ac_builddir=. case "$ac_dir" in .) ac_dir_suffix= ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_dir_suffix=/`$as_echo "$ac_dir" | sed 's|^\.[\\/]||'` # A ".." for each directory in $ac_dir_suffix. ac_top_builddir_sub=`$as_echo "$ac_dir_suffix" | sed 's|/[^\\/]*|/..|g;s|/||'` case $ac_top_builddir_sub in "") ac_top_builddir_sub=. ac_top_build_prefix= ;; *) ac_top_build_prefix=$ac_top_builddir_sub/ ;; esac ;; esac ac_abs_top_builddir=$ac_pwd ac_abs_builddir=$ac_pwd$ac_dir_suffix # for backward compatibility: ac_top_builddir=$ac_top_build_prefix case $srcdir in .) # We are building in place. ac_srcdir=. ac_top_srcdir=$ac_top_builddir_sub ac_abs_top_srcdir=$ac_pwd ;; [\\/]* | ?:[\\/]* ) # Absolute name. ac_srcdir=$srcdir$ac_dir_suffix; ac_top_srcdir=$srcdir ac_abs_top_srcdir=$srcdir ;; *) # Relative name. ac_srcdir=$ac_top_build_prefix$srcdir$ac_dir_suffix ac_top_srcdir=$ac_top_build_prefix$srcdir ac_abs_top_srcdir=$ac_pwd/$srcdir ;; esac ac_abs_srcdir=$ac_abs_top_srcdir$ac_dir_suffix case $ac_mode in :F) # # CONFIG_FILE # case $INSTALL in [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;; *) ac_INSTALL=$ac_top_build_prefix$INSTALL ;; esac ac_MKDIR_P=$MKDIR_P case $MKDIR_P in [\\/$]* | ?:[\\/]* ) ;; */*) ac_MKDIR_P=$ac_top_build_prefix$MKDIR_P ;; esac _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 # If the template does not know about datarootdir, expand it. # FIXME: This hack should be removed a few years after 2.60. ac_datarootdir_hack=; ac_datarootdir_seen= ac_sed_dataroot=' /datarootdir/ { p q } /@datadir@/p /@docdir@/p /@infodir@/p /@localedir@/p /@mandir@/p' case `eval "sed -n \"\$ac_sed_dataroot\" $ac_file_inputs"` in *datarootdir*) ac_datarootdir_seen=yes;; *@datadir@*|*@docdir@*|*@infodir@*|*@localedir@*|*@mandir@*) { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&5 $as_echo "$as_me: WARNING: $ac_file_inputs seems to ignore the --datarootdir setting" >&2;} _ACEOF cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_datarootdir_hack=' s&@datadir@&$datadir&g s&@docdir@&$docdir&g s&@infodir@&$infodir&g s&@localedir@&$localedir&g s&@mandir@&$mandir&g s&\\\${datarootdir}&$datarootdir&g' ;; esac _ACEOF # Neutralize VPATH when `$srcdir' = `.'. # Shell code in configure.ac might set extrasub. # FIXME: do we really want to maintain this feature? cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1 ac_sed_extra="$ac_vpsub $extrasub _ACEOF cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1 :t /@[a-zA-Z_][a-zA-Z_0-9]*@/!b s|@configure_input@|$ac_sed_conf_input|;t t s&@top_builddir@&$ac_top_builddir_sub&;t t s&@top_build_prefix@&$ac_top_build_prefix&;t t s&@srcdir@&$ac_srcdir&;t t s&@abs_srcdir@&$ac_abs_srcdir&;t t s&@top_srcdir@&$ac_top_srcdir&;t t s&@abs_top_srcdir@&$ac_abs_top_srcdir&;t t s&@builddir@&$ac_builddir&;t t s&@abs_builddir@&$ac_abs_builddir&;t t s&@abs_top_builddir@&$ac_abs_top_builddir&;t t s&@INSTALL@&$ac_INSTALL&;t t s&@MKDIR_P@&$ac_MKDIR_P&;t t $ac_datarootdir_hack " eval sed \"\$ac_sed_extra\" "$ac_file_inputs" | $AWK -f "$ac_tmp/subs.awk" \ >$ac_tmp/out || as_fn_error $? "could not create $ac_file" "$LINENO" 5 test -z "$ac_datarootdir_hack$ac_datarootdir_seen" && { ac_out=`sed -n '/\${datarootdir}/p' "$ac_tmp/out"`; test -n "$ac_out"; } && { ac_out=`sed -n '/^[ ]*datarootdir[ ]*:*=/p' \ "$ac_tmp/out"`; test -z "$ac_out"; } && { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&5 $as_echo "$as_me: WARNING: $ac_file contains a reference to the variable \`datarootdir' which seems to be undefined. Please make sure it is defined" >&2;} rm -f "$ac_tmp/stdin" case $ac_file in -) cat "$ac_tmp/out" && rm -f "$ac_tmp/out";; *) rm -f "$ac_file" && mv "$ac_tmp/out" "$ac_file";; esac \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 ;; :H) # # CONFIG_HEADER # if test x"$ac_file" != x-; then { $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" } >"$ac_tmp/config.h" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 if diff "$ac_file" "$ac_tmp/config.h" >/dev/null 2>&1; then { $as_echo "$as_me:${as_lineno-$LINENO}: $ac_file is unchanged" >&5 $as_echo "$as_me: $ac_file is unchanged" >&6;} else rm -f "$ac_file" mv "$ac_tmp/config.h" "$ac_file" \ || as_fn_error $? "could not create $ac_file" "$LINENO" 5 fi else $as_echo "/* $configure_input */" \ && eval '$AWK -f "$ac_tmp/defines.awk"' "$ac_file_inputs" \ || as_fn_error $? "could not create -" "$LINENO" 5 fi # Compute "$ac_file"'s index in $config_headers. _am_arg="$ac_file" _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`$as_dirname -- "$_am_arg" || $as_expr X"$_am_arg" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$_am_arg" : 'X\(//\)[^/]' \| \ X"$_am_arg" : 'X\(//\)$' \| \ X"$_am_arg" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$_am_arg" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'`/stamp-h$_am_stamp_count ;; :C) { $as_echo "$as_me:${as_lineno-$LINENO}: executing $ac_file commands" >&5 $as_echo "$as_me: executing $ac_file commands" >&6;} ;; esac case $ac_file$ac_mode in "depfiles":C) test x"$AMDEP_TRUE" != x"" || { # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`$as_dirname -- "$mf" || $as_expr X"$mf" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$mf" : 'X\(//\)[^/]' \| \ X"$mf" : 'X\(//\)$' \| \ X"$mf" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$mf" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`$as_dirname -- "$file" || $as_expr X"$file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \ X"$file" : 'X\(//\)[^/]' \| \ X"$file" : 'X\(//\)$' \| \ X"$file" : 'X\(/\)' \| . 2>/dev/null || $as_echo X"$file" | sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/ q } /^X\(\/\/\)[^/].*/{ s//\1/ q } /^X\(\/\/\)$/{ s//\1/ q } /^X\(\/\).*/{ s//\1/ q } s/.*/./; q'` as_dir=$dirpart/$fdir; as_fn_mkdir_p # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ;; "libtool":C) # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. # The names of the tagged configurations supported by this script. available_tags="" # ### BEGIN LIBTOOL CONFIG # Which release of libtool.m4 was used? macro_version=$macro_version macro_revision=$macro_revision # Whether or not to build shared libraries. build_libtool_libs=$enable_shared # Whether or not to build static libraries. build_old_libs=$enable_static # What type of objects to build. pic_mode=$pic_mode # Whether or not to optimize for fast installation. fast_install=$enable_fast_install # Shell to use when invoking shell scripts. SHELL=$lt_SHELL # An echo program that protects backslashes. ECHO=$lt_ECHO # The PATH separator for the build system. PATH_SEPARATOR=$lt_PATH_SEPARATOR # The host system. host_alias=$host_alias host=$host host_os=$host_os # The build system. build_alias=$build_alias build=$build build_os=$build_os # A sed program that does not truncate output. SED=$lt_SED # Sed that helps us avoid accidentally triggering echo(1) options like -n. Xsed="\$SED -e 1s/^X//" # A grep program that handles long lines. GREP=$lt_GREP # An ERE matcher. EGREP=$lt_EGREP # A literal string matcher. FGREP=$lt_FGREP # A BSD- or MS-compatible name lister. NM=$lt_NM # Whether we need soft or hard links. LN_S=$lt_LN_S # What is the maximum length of a command? max_cmd_len=$max_cmd_len # Object file suffix (normally "o"). objext=$ac_objext # Executable file suffix (normally ""). exeext=$exeext # whether the shell understands "unset". lt_unset=$lt_unset # turn spaces into newlines. SP2NL=$lt_lt_SP2NL # turn newlines into spaces. NL2SP=$lt_lt_NL2SP # convert \$build file names to \$host format. to_host_file_cmd=$lt_cv_to_host_file_cmd # convert \$build files to toolchain format. to_tool_file_cmd=$lt_cv_to_tool_file_cmd # An object symbol dumper. OBJDUMP=$lt_OBJDUMP # Method to check whether dependent libraries are shared objects. deplibs_check_method=$lt_deplibs_check_method # Command to use when deplibs_check_method = "file_magic". file_magic_cmd=$lt_file_magic_cmd # How to find potential files when deplibs_check_method = "file_magic". file_magic_glob=$lt_file_magic_glob # Find potential files using nocaseglob when deplibs_check_method = "file_magic". want_nocaseglob=$lt_want_nocaseglob # DLL creation program. DLLTOOL=$lt_DLLTOOL # Command to associate shared and link libraries. sharedlib_from_linklib_cmd=$lt_sharedlib_from_linklib_cmd # The archiver. AR=$lt_AR # Flags to create an archive. AR_FLAGS=$lt_AR_FLAGS # How to feed a file listing to the archiver. archiver_list_spec=$lt_archiver_list_spec # A symbol stripping program. STRIP=$lt_STRIP # Commands used to install an old-style archive. RANLIB=$lt_RANLIB old_postinstall_cmds=$lt_old_postinstall_cmds old_postuninstall_cmds=$lt_old_postuninstall_cmds # Whether to use a lock for old archive extraction. lock_old_archive_extraction=$lock_old_archive_extraction # A C compiler. LTCC=$lt_CC # LTCC compiler flags. LTCFLAGS=$lt_CFLAGS # Take the output of nm and produce a listing of raw symbols and C names. global_symbol_pipe=$lt_lt_cv_sys_global_symbol_pipe # Transform the output of nm in a proper C declaration. global_symbol_to_cdecl=$lt_lt_cv_sys_global_symbol_to_cdecl # Transform the output of nm in a C name address pair. global_symbol_to_c_name_address=$lt_lt_cv_sys_global_symbol_to_c_name_address # Transform the output of nm in a C name address pair when lib prefix is needed. global_symbol_to_c_name_address_lib_prefix=$lt_lt_cv_sys_global_symbol_to_c_name_address_lib_prefix # Specify filename containing input files for \$NM. nm_file_list_spec=$lt_nm_file_list_spec # The root where to search for dependent libraries,and in which our libraries should be installed. lt_sysroot=$lt_sysroot # The name of the directory that contains temporary libtool files. objdir=$objdir # Used to examine libraries when file_magic_cmd begins with "file". MAGIC_CMD=$MAGIC_CMD # Must we lock files when doing compilation? need_locks=$lt_need_locks # Manifest tool. MANIFEST_TOOL=$lt_MANIFEST_TOOL # Tool to manipulate archived DWARF debug symbol files on Mac OS X. DSYMUTIL=$lt_DSYMUTIL # Tool to change global to local symbols on Mac OS X. NMEDIT=$lt_NMEDIT # Tool to manipulate fat objects and archives on Mac OS X. LIPO=$lt_LIPO # ldd/readelf like tool for Mach-O binaries on Mac OS X. OTOOL=$lt_OTOOL # ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4. OTOOL64=$lt_OTOOL64 # Old archive suffix (normally "a"). libext=$libext # Shared library suffix (normally ".so"). shrext_cmds=$lt_shrext_cmds # The commands to extract the exported symbol list from a shared archive. extract_expsyms_cmds=$lt_extract_expsyms_cmds # Variables whose values should be saved in libtool wrapper scripts and # restored at link time. variables_saved_for_relink=$lt_variables_saved_for_relink # Do we need the "lib" prefix for modules? need_lib_prefix=$need_lib_prefix # Do we need a version for libraries? need_version=$need_version # Library versioning type. version_type=$version_type # Shared library runtime path variable. runpath_var=$runpath_var # Shared library path variable. shlibpath_var=$shlibpath_var # Is shlibpath searched before the hard-coded library search path? shlibpath_overrides_runpath=$shlibpath_overrides_runpath # Format of library name prefix. libname_spec=$lt_libname_spec # List of archive names. First name is the real one, the rest are links. # The last name is the one that the linker finds with -lNAME library_names_spec=$lt_library_names_spec # The coded name of the library, if different from the real name. soname_spec=$lt_soname_spec # Permission mode override for installation of shared libraries. install_override_mode=$lt_install_override_mode # Command to use after installation of a shared archive. postinstall_cmds=$lt_postinstall_cmds # Command to use after uninstallation of a shared archive. postuninstall_cmds=$lt_postuninstall_cmds # Commands used to finish a libtool library installation in a directory. finish_cmds=$lt_finish_cmds # As "finish_cmds", except a single script fragment to be evaled but # not shown. finish_eval=$lt_finish_eval # Whether we should hardcode library paths into libraries. hardcode_into_libs=$hardcode_into_libs # Compile-time system search path for libraries. sys_lib_search_path_spec=$lt_sys_lib_search_path_spec # Run-time system search path for libraries. sys_lib_dlsearch_path_spec=$lt_sys_lib_dlsearch_path_spec # Whether dlopen is supported. dlopen_support=$enable_dlopen # Whether dlopen of programs is supported. dlopen_self=$enable_dlopen_self # Whether dlopen of statically linked programs is supported. dlopen_self_static=$enable_dlopen_self_static # Commands to strip libraries. old_striplib=$lt_old_striplib striplib=$lt_striplib # The linker used to build libraries. LD=$lt_LD # How to create reloadable object files. reload_flag=$lt_reload_flag reload_cmds=$lt_reload_cmds # Commands used to build an old-style archive. old_archive_cmds=$lt_old_archive_cmds # A language specific compiler. CC=$lt_compiler # Is the compiler the GNU compiler? with_gcc=$GCC # Compiler flag to turn off builtin functions. no_builtin_flag=$lt_lt_prog_compiler_no_builtin_flag # Additional compiler flags for building library objects. pic_flag=$lt_lt_prog_compiler_pic # How to pass a linker flag through the compiler. wl=$lt_lt_prog_compiler_wl # Compiler flag to prevent dynamic linking. link_static_flag=$lt_lt_prog_compiler_static # Does compiler simultaneously support -c and -o options? compiler_c_o=$lt_lt_cv_prog_compiler_c_o # Whether or not to add -lc for building shared libraries. build_libtool_need_lc=$archive_cmds_need_lc # Whether or not to disallow shared libs when runtime libs are static. allow_libtool_libs_with_static_runtimes=$enable_shared_with_static_runtimes # Compiler flag to allow reflexive dlopens. export_dynamic_flag_spec=$lt_export_dynamic_flag_spec # Compiler flag to generate shared objects directly from archives. whole_archive_flag_spec=$lt_whole_archive_flag_spec # Whether the compiler copes with passing no objects directly. compiler_needs_object=$lt_compiler_needs_object # Create an old-style archive from a shared archive. old_archive_from_new_cmds=$lt_old_archive_from_new_cmds # Create a temporary old-style archive to link instead of a shared archive. old_archive_from_expsyms_cmds=$lt_old_archive_from_expsyms_cmds # Commands used to build a shared archive. archive_cmds=$lt_archive_cmds archive_expsym_cmds=$lt_archive_expsym_cmds # Commands used to build a loadable module if different from building # a shared archive. module_cmds=$lt_module_cmds module_expsym_cmds=$lt_module_expsym_cmds # Whether we are building with GNU ld or not. with_gnu_ld=$lt_with_gnu_ld # Flag that allows shared libraries with undefined symbols to be built. allow_undefined_flag=$lt_allow_undefined_flag # Flag that enforces no undefined symbols. no_undefined_flag=$lt_no_undefined_flag # Flag to hardcode \$libdir into a binary during linking. # This must work even if \$libdir does not exist hardcode_libdir_flag_spec=$lt_hardcode_libdir_flag_spec # Whether we need a single "-rpath" flag with a separated argument. hardcode_libdir_separator=$lt_hardcode_libdir_separator # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary. hardcode_direct=$hardcode_direct # Set to "yes" if using DIR/libNAME\${shared_ext} during linking hardcodes # DIR into the resulting binary and the resulting library dependency is # "absolute",i.e impossible to change by setting \${shlibpath_var} if the # library is relocated. hardcode_direct_absolute=$hardcode_direct_absolute # Set to "yes" if using the -LDIR flag during linking hardcodes DIR # into the resulting binary. hardcode_minus_L=$hardcode_minus_L # Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR # into the resulting binary. hardcode_shlibpath_var=$hardcode_shlibpath_var # Set to "yes" if building a shared library automatically hardcodes DIR # into the library and all subsequent libraries and executables linked # against it. hardcode_automatic=$hardcode_automatic # Set to yes if linker adds runtime paths of dependent libraries # to runtime path list. inherit_rpath=$inherit_rpath # Whether libtool must link a program against all its dependency libraries. link_all_deplibs=$link_all_deplibs # Set to "yes" if exported symbols are required. always_export_symbols=$always_export_symbols # The commands to list exported symbols. export_symbols_cmds=$lt_export_symbols_cmds # Symbols that should not be listed in the preloaded symbols. exclude_expsyms=$lt_exclude_expsyms # Symbols that must always be exported. include_expsyms=$lt_include_expsyms # Commands necessary for linking programs (against libraries) with templates. prelink_cmds=$lt_prelink_cmds # Commands necessary for finishing linking programs. postlink_cmds=$lt_postlink_cmds # Specify filename containing input files. file_list_spec=$lt_file_list_spec # How to hardcode a shared library path into an executable. hardcode_action=$hardcode_action # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac ltmain="$ac_aux_dir/ltmain.sh" # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) if test x"$xsi_shell" = xyes; then sed -e '/^func_dirname ()$/,/^} # func_dirname /c\ func_dirname ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ } # Extended-shell func_dirname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_basename ()$/,/^} # func_basename /c\ func_basename ()\ {\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_dirname_and_basename ()$/,/^} # func_dirname_and_basename /c\ func_dirname_and_basename ()\ {\ \ case ${1} in\ \ */*) func_dirname_result="${1%/*}${2}" ;;\ \ * ) func_dirname_result="${3}" ;;\ \ esac\ \ func_basename_result="${1##*/}"\ } # Extended-shell func_dirname_and_basename implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_stripname ()$/,/^} # func_stripname /c\ func_stripname ()\ {\ \ # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are\ \ # positional parameters, so assign one to ordinary parameter first.\ \ func_stripname_result=${3}\ \ func_stripname_result=${func_stripname_result#"${1}"}\ \ func_stripname_result=${func_stripname_result%"${2}"}\ } # Extended-shell func_stripname implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_long_opt ()$/,/^} # func_split_long_opt /c\ func_split_long_opt ()\ {\ \ func_split_long_opt_name=${1%%=*}\ \ func_split_long_opt_arg=${1#*=}\ } # Extended-shell func_split_long_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_split_short_opt ()$/,/^} # func_split_short_opt /c\ func_split_short_opt ()\ {\ \ func_split_short_opt_arg=${1#??}\ \ func_split_short_opt_name=${1%"$func_split_short_opt_arg"}\ } # Extended-shell func_split_short_opt implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_lo2o ()$/,/^} # func_lo2o /c\ func_lo2o ()\ {\ \ case ${1} in\ \ *.lo) func_lo2o_result=${1%.lo}.${objext} ;;\ \ *) func_lo2o_result=${1} ;;\ \ esac\ } # Extended-shell func_lo2o implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_xform ()$/,/^} # func_xform /c\ func_xform ()\ {\ func_xform_result=${1%.*}.lo\ } # Extended-shell func_xform implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_arith ()$/,/^} # func_arith /c\ func_arith ()\ {\ func_arith_result=$(( $* ))\ } # Extended-shell func_arith implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_len ()$/,/^} # func_len /c\ func_len ()\ {\ func_len_result=${#1}\ } # Extended-shell func_len implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$lt_shell_append" = xyes; then sed -e '/^func_append ()$/,/^} # func_append /c\ func_append ()\ {\ eval "${1}+=\\${2}"\ } # Extended-shell func_append implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: sed -e '/^func_append_quoted ()$/,/^} # func_append_quoted /c\ func_append_quoted ()\ {\ \ func_quote_for_eval "${2}"\ \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"\ } # Extended-shell func_append_quoted implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([a-zA-Z_]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: Unable to substitute extended shell functions in $ofile" >&5 $as_echo "$as_me: WARNING: Unable to substitute extended shell functions in $ofile" >&2;} fi mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ;; esac done # for ac_tag as_fn_exit 0 _ACEOF ac_clean_files=$ac_clean_files_save test $ac_write_fail = 0 || as_fn_error $? "write failure creating $CONFIG_STATUS" "$LINENO" 5 # configure is writing to config.log, and then calls config.status. # config.status does its own redirection, appending to config.log. # Unfortunately, on DOS this fails, as config.log is still kept open # by configure, so config.status won't be able to write to it; its # output is simply discarded. So we exec the FD to /dev/null, # effectively closing config.log, so it can be properly (re)opened and # appended to by config.status. When coming back to configure, we # need to make the FD available again. if test "$no_create" != yes; then ac_cs_success=: ac_config_status_args= test "$silent" = yes && ac_config_status_args="$ac_config_status_args --quiet" exec 5>/dev/null $SHELL $CONFIG_STATUS $ac_config_status_args || ac_cs_success=false exec 5>>config.log # Use ||, not &&, to avoid exiting from the if with $? = 1, which # would make configure fail if this is the last instruction. $ac_cs_success || as_fn_exit 1 fi if test -n "$ac_unrecognized_opts" && test "$enable_option_checking" != no; then { $as_echo "$as_me:${as_lineno-$LINENO}: WARNING: unrecognized options: $ac_unrecognized_opts" >&5 $as_echo "$as_me: WARNING: unrecognized options: $ac_unrecognized_opts" >&2;} fi freeipmi-1.6.4/configure.ac0000644002055400205540000006002713527342050015546 0ustar00achuachu00000000000000dnl Process this file with autoconf to produce a configure script. AC_INIT([freeipmi],[1.6.4],[freeipmi-devel@gnu.org]) AC_REVISION([$Id: configure.ac,v 1.208 2010-08-06 21:02:29 chu11 Exp $]) AC_CONFIG_MACRO_DIR([config]) FREEIPMI_PACKAGE_VERSION_MAJOR=1 FREEIPMI_PACKAGE_VERSION_MINOR=6 FREEIPMI_PACKAGE_VERSION_PATCH=4 AC_SUBST(FREEIPMI_PACKAGE_VERSION_MAJOR) AC_SUBST(FREEIPMI_PACKAGE_VERSION_MINOR) AC_SUBST(FREEIPMI_PACKAGE_VERSION_PATCH) dnl We require a modern autoconf and automake AC_PREREQ([2.57]) AC_CONFIG_AUX_DIR([config]) dnl Locate the sources. AC_CONFIG_SRCDIR([ChangeLog.0]) AM_INIT_AUTOMAKE([tar-ustar subdir-objects 1.9]) dnl create a config.h file AC_CONFIG_HEADERS([config/config.h]) dnl define output files AC_CONFIG_FILES([ freeipmi.spec Makefile bmc-device/Makefile bmc-info/Makefile bmc-watchdog/Makefile common/Makefile common/debugutil/Makefile common/miscutil/Makefile common/parsecommon/Makefile common/pingtool/Makefile common/portability/Makefile common/toolcommon/Makefile contrib/Makefile doc/Makefile etc/Makefile ipmi-chassis/Makefile ipmi-config/Makefile ipmi-dcmi/Makefile ipmi-fru/Makefile ipmi-locate/Makefile ipmi-oem/Makefile ipmi-pet/Makefile ipmi-raw/Makefile ipmi-sel/Makefile ipmi-sensors/Makefile ipmiconsole/Makefile ipmidetect/Makefile ipmidetectd/Makefile ipmiping/Makefile ipmipower/Makefile ipmiseld/Makefile libfreeipmi/Makefile libfreeipmi/libfreeipmi.pc libfreeipmi/include/Makefile libfreeipmi/include/freeipmi/freeipmi.h libipmiconsole/Makefile libipmiconsole/ipmiconsole.h libipmiconsole/libipmiconsole.pc libipmidetect/Makefile libipmidetect/ipmidetect.h libipmidetect/libipmidetect.pc libipmimonitoring/Makefile libipmimonitoring/ipmi_monitoring.h libipmimonitoring/libipmimonitoring.pc man/Makefile man/bmc-device.8.pre man/bmc-info.8.pre man/bmc-watchdog.8.pre man/freeipmi.conf.5.pre man/freeipmi.7.pre man/ipmi-chassis.8.pre man/ipmi-config.8.pre man/ipmi-config.conf.5.pre man/ipmi-dcmi.8.pre man/ipmi-fru.8.pre man/ipmi-locate.8.pre man/ipmi-oem.8.pre man/ipmi-pet.8.pre man/ipmi-raw.8.pre man/ipmi-sel.8.pre man/ipmi-sensors.8.pre man/ipmiconsole.8.pre man/ipmidetect.8.pre man/ipmidetect.conf.5.pre man/ipmidetectd.8.pre man/ipmidetectd.conf.5.pre man/ipmiping.8.pre man/ipmipower.8.pre man/ipmiseld.8.pre man/ipmiseld.conf.5.pre man/libfreeipmi.3.pre man/freeipmi_interpret_sensor.conf.5.pre man/freeipmi_interpret_sel.conf.5.pre man/libipmiconsole.3.pre man/libipmiconsole.conf.5.pre man/libipmidetect.3.pre man/libipmimonitoring.3.pre man/rmcpping.8.pre rmcpping/Makefile]) ISODATE=`date -u -r ChangeLog +%Y-%m-%d` AC_SUBST([ISODATE]) # libfreeipmi libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBFREEIPMI_CURRENT=19 LIBFREEIPMI_REVISION=3 LIBFREEIPMI_AGE=2 LIBFREEIPMI_VERSION=$LIBFREEIPMI_CURRENT.$LIBFREEIPMI_REVISION.$LIBFREEIPMI_AGE AC_SUBST([LIBFREEIPMI_VERSION]) LIBFREEIPMI_VERSION_INFO=$LIBFREEIPMI_CURRENT:$LIBFREEIPMI_REVISION:$LIBFREEIPMI_AGE AC_SUBST([LIBFREEIPMI_VERSION_INFO]) # libfreeipmi versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. LIBFREEIPMI_VERSION_MAJOR=6 LIBFREEIPMI_VERSION_MINOR=2 LIBFREEIPMI_VERSION_PATCH=3 AC_SUBST(LIBFREEIPMI_VERSION_MAJOR) AC_SUBST(LIBFREEIPMI_VERSION_MINOR) AC_SUBST(LIBFREEIPMI_VERSION_PATCH) # libipmiconsole libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMICONSOLE_CURRENT=5 LIBIPMICONSOLE_REVISION=5 LIBIPMICONSOLE_AGE=3 LIBIPMICONSOLE_VERSION_INFO=$LIBIPMICONSOLE_CURRENT:$LIBIPMICONSOLE_REVISION:$LIBIPMICONSOLE_AGE AC_SUBST([LIBIPMICONSOLE_VERSION_INFO]) # libipmiconsole versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMICONSOLE_VERSION_MAJOR=1 LIBIPMICONSOLE_VERSION_MINOR=2 LIBIPMICONSOLE_VERSION_PATCH=5 AC_SUBST(LIBIPMICONSOLE_VERSION_MAJOR) AC_SUBST(LIBIPMICONSOLE_VERSION_MINOR) AC_SUBST(LIBIPMICONSOLE_VERSION_PATCH) # libipmimonitoring libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMIMONITORING_CURRENT=6 LIBIPMIMONITORING_REVISION=8 LIBIPMIMONITORING_AGE=0 LIBIPMIMONITORING_VERSION_INFO=$LIBIPMIMONITORING_CURRENT:$LIBIPMIMONITORING_REVISION:$LIBIPMIMONITORING_AGE AC_SUBST([LIBIPMIMONITORING_VERSION_INFO]) # libipmimonitoring versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMIMONITORING_VERSION_MAJOR=1 LIBIPMIMONITORING_VERSION_MINOR=0 LIBIPMIMONITORING_VERSION_PATCH=9 AC_SUBST(LIBIPMIMONITORING_VERSION_MAJOR) AC_SUBST(LIBIPMIMONITORING_VERSION_MINOR) AC_SUBST(LIBIPMIMONITORING_VERSION_PATCH) # libipmidetect libtool versioning # # If the library source code has changed at all since the last update, # then increment c:r: c:r+1:). # # If any interfaces have been added, removed, or changed since the # last update, increment current, and set revision to 0. # # If any interfaces have been added since the last public release, # then increment age. # # If any interfaces have been removed or changed since the last public # release, then set age to 0. # LIBIPMIDETECT_CURRENT=0 LIBIPMIDETECT_REVISION=1 LIBIPMIDETECT_AGE=0 LIBIPMIDETECT_VERSION_INFO=$LIBIPMIDETECT_CURRENT:$LIBIPMIDETECT_REVISION:$LIBIPMIDETECT_AGE AC_SUBST([LIBIPMIDETECT_VERSION_INFO]) # libipmidetect versioning macros # # MAJOR - Incremented when interfaces are changed or removed. # Interfaces may be binary incompatible. When incremented, MINOR and # PATCH are zeroed. # MINOR - Incremented when interfaces are added. Interfaces are # binary compatible with older minor versions. When incremented, # PATCH is zeroed. # PATCH - Incremented when interfaces are not changed. Typically # incremented due to bug fixes or minor features. Interfaces are # forward and backward compatible to other PATCH versions. # LIBIPMIDETECT_VERSION_MAJOR=1 LIBIPMIDETECT_VERSION_MINOR=0 LIBIPMIDETECT_VERSION_PATCH=1 AC_SUBST(LIBIPMIDETECT_VERSION_MAJOR) AC_SUBST(LIBIPMIDETECT_VERSION_MINOR) AC_SUBST(LIBIPMIDETECT_VERSION_PATCH) AC_CANONICAL_HOST dnl Checks for programs. AC_PROG_INSTALL AC_PROG_CC dnl Needed for per-target flags AM_PROG_CC_C_O AC_PROG_LIBTOOL AC_PROG_CPP AC_PATH_PROG([CPP_FOR_BUILD], [cpp]) if test -z "${CPP_FOR_BUILD}"; then AC_MSG_ERROR([cannot find cpp]) fi AC_SUBST([CPP_FOR_BUILD]) AM_CONDITIONAL(WITH_GNU_LD, test "$with_gnu_ld" = "yes") AC_PROG_MAKE_SET AC_PROG_LN_S dnl Enable error tracing. Lower level calls will spit error messages dnl on to the console AC_ARG_ENABLE([trace], AC_HELP_STRING([--enable-trace], [turn on error tracing])) if test "x${enable_trace}" = "xyes" ; then AC_DEFINE([IPMI_TRACE],[1],[Define to turn on error tracing]) elif test "x${enable_trace}" = "x" ; then enable_trace=no fi AC_ARG_ENABLE([profiling], AC_HELP_STRING([--enable-profiling], [turn on profiling])) if test "x${enable_profiling}" = "x" ; then enable_profiling=no fi dnl Turn off all optimizations when debugging AC_ARG_ENABLE(debug, AC_HELP_STRING([--enable-debug], [turn on debugging])) if test "x${enable_debug}" = "xyes"; then if test "$GCC" = "yes" && test "x${enable_profiling}" = "xyes"; then CFLAGS="$CFLAGS -ggdb -Wall -pg" elif test "$GCC" = "yes" && test "x${enable_profiling}" = "xno"; then CFLAGS="$CFLAGS -ggdb -Wall" elif test "$ac_cv_prog_cc_g" = "yes"; then CFLAGS="$CFLAGS -g" fi WITH_DEBUG=1 else if test "x${enable_debug}" = "x" ; then enable_debug=no fi AC_DEFINE([NDEBUG], [1], [Define to 1 for a production release]) WITH_DEBUG=0 fi AC_SUBST(WITH_DEBUG) dnl Allow advanced developers to compile with raw dumping AC_ARG_ENABLE(rawdumps, AC_HELP_STRING([--enable-rawdumps], [output raw packet dumps when debugging])) if test "x${enable_rawdumps}" = "xyes"; then AC_DEFINE([WITH_RAWDUMPS], [1], [Define if you want raw dumps]) fi INSTALL_DAEMON_SCRIPTS=install-init-scripts UNINSTALL_DAEMON_SCRIPTS=uninstall-init-scripts dnl Option to disable installing init.d scripts AC_ARG_ENABLE(init-scripts, AC_HELP_STRING([--disable-init-scripts], [don\'t install init.d startup scripts])) if test x"$enable_init_scripts" = xno; then INSTALL_DAEMON_SCRIPTS= fi AC_SUBST(INSTALL_DAEMON_SCRIPTS) AC_SUBST(UNINSTALL_DAEMON_SCRIPTS) # Check for systemd RRA_WITH_SYSTEMD_UNITDIR if test -n "$with_systemdsystemunitdir" -a x"$with_systemdsystemunitdir" != xno; then INSTALL_DAEMON_SCRIPTS=install-systemd-scripts UNINSTALL_DAEMON_SCRIPTS=uninstall-systemd-scripts fi AC_SUBST(INSTALL_DAEMON_SCRIPTS) AC_SUBST(UNINSTALL_DAEMON_SCRIPTS) dnl Option to disable creating ipmi sdr cache directory AC_ARG_ENABLE([ipmisdrcachedir], AC_HELP_STRING([--disable-ipmisdrcachedir], [don\'t create ipmi sdr cache directory])) INSTALL_IPMISDRCACHEDIR=install-ipmisdrcachedir if test x"$enable_ipmisdrcachedir" = xno; then INSTALL_IPMISDRCACHEDIR= fi AC_SUBST(INSTALL_IPMISDRCACHEDIR) dnl Option to disable encryption in FreeIPMI dnl dnl May be useful/needed for embedded systems w/ IPMI in band only and dnl don\'t want to link to additional encryption libraries not on the dnl system. If turned off and users use encryption features (i.e. in IPMI 2.0), dnl errors will be returned from the underlying subsystems. dnl dnl Default to it being on AC_MSG_CHECKING([for encryption support]) AC_ARG_WITH([encryption], AC_HELP_STRING([--without-encryption], [don\'t support encryption]), [ case "$withval" in no) ac_with_encryption=no ;; yes) ac_with_encryption=yes ;; *) ac_with_encryption=yes ;; esac ]) AC_MSG_RESULT([${ac_with_encryption=yes}]) if test x"${ac_with_encryption}" = xyes; then AC_DEFINE([WITH_ENCRYPTION], [1], [Define if you want encryption]) fi dnl Checks for libraries. dnl don\'t include lib if LAN not desired if test x"${ac_with_encryption}" = xyes; then AC_CHECK_LIB([gcrypt], [gcry_md_open], [have_gcrypt=yes], [have_gcrypt=no]) if test "x${have_gcrypt}" = "xno"; then AC_MSG_ERROR([libgcrypt required to build libfreeipmi]) AC_MSG_NOTICE([Note: libgpg-error required for libgcrypt]) fi AC_CHECK_HEADERS([gcrypt.h], [have_gcrypt_header=yes], [have_gcrypt_header=no]) if test "x${have_gcrypt_header}" = "xno"; then AC_MSG_ERROR([gcrypt.h not found]) fi AC_CHECK_DECL([GCRYCTL_SET_THREAD_CBS], [have_gcrypt_threads=yes], [have_gcrypt_threads=no], [#include ]) if test "x${have_gcrypt_threads}" = "xno"; then AC_MSG_ERROR([libgcrypt with threads support required for libfreeipmi]) fi GCRYPT_LIBS=-lgcrypt fi AC_SUBST(GCRYPT_LIBS) dnl FreeBSD < 5 has getopt_long in a separate gnugetopt library AC_CHECK_FUNC([getopt_long], [have_getopt_long=yes], AC_CHECK_LIB([gnugetopt], [getopt_long], [have_getopt_long=yes], AC_MSG_ERROR([getopt_long not found.]))) if test "x${have_getopt_long}" = "xyes"; then AC_DEFINE(HAVE_GETOPT_LONG, 1, [define if you found getopt_long]) fi dnl Checks for typedefs, structures, and compiler characteristics. AC_C_BIGENDIAN AC_C_CONST AC_C_INLINE AC_TYPE_SIZE_T LSH_GCC_ATTRIBUTES dnl Checks for header files. AC_HEADER_STDC AC_HEADER_TIME AC_HEADER_SYS_WAIT dnl achu: note "strings.h" plural AC_CHECK_HEADERS([unistd.h fcntl.h getopt.h pthread.h strings.h]) AC_CHECK_HEADERS([linux/types.h error.h netdb.h sys/io.h sys/sockio.h asm/io.h sys/ioccom.h]) AC_CHECK_HEADERS([linux/ipmi_msgdefs.h]) AC_CHECK_HEADERS([linux/compiler.h]) AC_CHECK_HEADERS([stropts.h sys/stropts.h]) AC_CHECK_HEADERS([linux/ipmi.h], [], [], [#ifdef HAVE_LINUX_IPMI_MSGDEFS_H #include #endif #ifdef HAVE_LINUX_COMPILER_H #include #endif ]) AC_CHECK_HEADERS([sys/ipmi.h]) AC_CHECK_HEADERS([sys/int_types.h]) AC_CHECK_HEADERS([bmc_intf.h]) AC_CHECK_HEADERS([signal.h]) dnl Checks for library functions. AC_FUNC_ALLOCA AC_FUNC_MMAP AC_FUNC_VPRINTF dnl There is no strndup() and getline() on FreeBSD dnl stristr may not exist at all on *nix libc. Maybe only in script-lands?? AC_CHECK_FUNCS([strchr strndup strchrnul strsep stristr]) AC_CHECK_FUNCS([memcpy mempcpy memset mlock]) AC_CHECK_FUNCS([getline getprogname]) AC_CHECK_FUNCS([strerror strerror_r]) AC_CHECK_FUNCS([flockfile fputs_unlocked fwrite_unlocked]) AC_CHECK_FUNCS([iopl]) AC_CHECK_FUNCS([asprintf]) AC_CHECK_FUNCS([cbrt]) dnl sighandler_t apparently not defined in Apple/OS X AC_CHECK_TYPES([sighandler_t], [], [], [[#include ]]) # At least on freebsd, putc_unlocked is a macro, so the standard # AC_CHECK_FUNCS doesn't work well. AC_TRY_LINK([#include ], [putc_unlocked('x', stdout)], [AC_DEFINE_UNQUOTED(HAVE_PUTC_UNLOCKED, [1], [Define to 1 if you have putc_unlocked])]) dnl FreeBSD has no exp10() nor log2(), FreeBSD < 5 has no exp2() AC_CHECK_LIB([m], [exp10]) AC_CHECK_LIB([m], [exp2]) AC_CHECK_LIB([m], [log2]) dnl Solaris needs -lsocket AC_CHECK_FUNC([socket], , AC_CHECK_LIB([socket], [socket])) dnl dnl achu: Most parts of this gethostbyname_r testing is from the dnl original done by Caolan McNamara . That one dnl had trouble dealing with libnsl and Solaris. So I had to re-write dnl it a bit. dnl dnl See original: http://www.csn.ul.ie/~caolan/publink/gethostbyname_r dnl AC_CHECK_FUNC([gethostbyname_r], [have_gethostbyname_r=yes], AC_CHECK_LIB([nsl], [gethostbyname_r], [LIBS="$LIBS -lnsl" have_gethostbyname_r=yes], [have_gethostbyname_r=no])) if test "x${have_gethostbyname_r}" = "xyes"; then AC_TRY_LINK( [ #include ], [ char *name; struct hostent *he; struct hostent_data data; (void) gethostbyname_r(name, he, &data); ], [ac_cv_func_which_gethostbyname_r=three], [ AC_TRY_LINK( [ #include ], [ char *name; struct hostent *he, *res; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &res, &h_errnop); ], [ac_cv_func_which_gethostbyname_r=six], [ AC_TRY_LINK( [ #include ], [ char *name; struct hostent *he; char buffer[2048]; int buflen = 2048; int h_errnop; (void) gethostbyname_r(name, he, buffer, buflen, &h_errnop); ], [ac_cv_func_which_gethostbyname_r=five], [ac_cv_func_which_gethostbyname_r=no]) ]) ]) dnl define HAVE_FUNC_GETHOSTBYNAME_R_6 if gethostbyname_r needs 6 arguments (e.g linux) dnl define HAVE_FUNC_GETHOSTBYNAME_R_5 if gethostbyname_r needs 5 arguments (e.g. solaris) dnl define HAVE_FUNC_GETHOSTBYNAME_R_3 if gethostbyname_r needs 3 arguments (e.g. osf/1) if test "x${ac_cv_func_which_gethostbyname_r}" = "xsix"; then AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_6, [], [Define gethostbyname_r with 6 args]) elif test "x${ac_cv_func_which_gethostbyname_r}" = "xfive"; then AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_5, [], [Define gethostbyname_r with 5 args]) elif test "x${ac_cv_func_which_gethostbyname_r}" = "xthree"; then AC_DEFINE(HAVE_FUNC_GETHOSTBYNAME_R_3, [], [Define gethostbyname_r with 3 args]) fi fi dnl Check for thread-safe gethostbyname() for internal portable freeipmi_gethostbyname_r AC_MSG_CHECKING([for thread-safe gethostbyname()]) have_thread_safe_gethostbyname=no case "$host_os" in *freebsd*) AC_TRY_CPP([ #include #if __FreeBSD_version < 505000 #error "gethostbyname() is not thread-safe" #endif ], [have_thread_safe_gethostbyname=yes]) ;; esac if test "x$have_thread_safe_gethostbyname" = "xyes"; then AC_DEFINE([HAVE_THREAD_SAFE_GETHOSTBYNAME], [1], [Define if you have thread-safe gethostbyname() implementation]) AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi AC_CHECK_FUNC([hstrerror], [have_hstrerror=yes], AC_CHECK_LIB([nsl], [hstrerror], [have_hstrerror=yes], [have_hstrerror=no])) if test "x$have_hstrerror" = "xyes"; then AC_DEFINE([HAVE_HSTRERROR], [1], [Define if you have hstrerror]) fi AC_CHECK_FUNC([getpwuid_r], [have_getpwuid_r=yes], AC_MSG_ERROR([getpwuid_r cannot be found])) if test "x${have_getpwuid_r}" = "xyes"; then AC_TRY_LINK( [ #include #include ], [ uid_t uid; struct passwd pwd; struct passwd *result; char buffer[1]; int bufsize; (void) getpwuid_r (uid, &pwd, buffer, bufsize, &result); ], [ac_cv_func_which_getpwuid_r=five], [ AC_TRY_LINK( [ #include #include ], [ uid_t uid; struct passwd pwd; char buffer[1]; int bufsize; (void) getpwuid_r (uid, &pwd, buffer, bufsize); ], [ac_cv_func_which_getpwuid_r=four], [ac_cv_func_which_getpwuid_r=no]) ]) dnl define HAVE_FUNC_GETPWUID_R_5 if getpwuid_r needs 5 arguments (e.g. linux) dnl define HAVE_FUNC_GETPWUID_R_4 if getpwuid_r needs 4 arguments (e.g. solaris) if test "x${ac_cv_func_which_getpwuid_r}" = "xfive"; then AC_DEFINE(HAVE_FUNC_GETPWUID_R_5, [], [Define getpwuid_r with 5 args]) elif test "x${ac_cv_func_which_getpwuid_r}" = "xfour"; then AC_DEFINE(HAVE_FUNC_GETPWUID_R_4, [], [Define getpwuid_r with 4 args]) else AC_MSG_ERROR([getpwuid_r cannot be compiled]) fi fi dnl FreeBSD has argp as a separate library dnl CAVEAT: argp-standalone library exports it's own strndup() function, dnl not conforming to strndup(3). If we have no strndup() in libc (as dnl in FreeBSD), and strndup() check is placed after argp check, argp's dnl strndup() will be detected, which is wrong. So place argp check _after_ dnl strndup() check. dnl dnl Solaris has no argp library AC_CHECK_FUNC([argp_parse], [have_argp=yes], AC_CHECK_LIB([argp], [argp_parse], [have_argp=yes; LIBS="-largp $LIBS"], [have_argp=no])) if test "x$have_argp" = "xyes"; then AC_CHECK_HEADER([argp.h], AC_DEFINE([HAVE_ARGP_H], [1], [Define if you have argp.h]), AC_MSG_ERROR([argp header cannot be found])) else dnl FreeBSD and Apple has the argp-standalone package. If we're on dnl FreeBSD or Apple make them install the argp-standalone. Otherwise dnl the code will fall through and compile the internal FreeIPMI-argp AC_TRY_COMPILE([#include ], [ #if defined(__FreeBSD__) || defined(__APPLE__) uncompilable junk syntax %$ # @ #endif ], , AC_MSG_ERROR([argp library not found. argp-standalone required.])) fi AM_CONDITIONAL(WITH_FREEIPMI_ARGP, test "$have_argp" = "no") AC_TRY_COMPILE([#include ], [printf("%s\n", __FUNCTION__);], [AC_DEFINE([HAVE_FUNCTION_MACRO], [1], [Define is you have __FUNCTION__])]) ACX_PTHREAD([], AC_MSG_ERROR([Posix threads required to build libipmiconsole])) dnl Misc checks and build options FREEIPMI_SYSCONFDIR=${sysconfdir}/freeipmi/ AC_SUBST(FREEIPMI_SYSCONFDIR) AC_FREEIPMI_CONFIG_FILE AC_IPMI_MONITORING_SDR_CACHE_DIR dnl legacy AC_IPMI_MONITORING_SENSOR_CONFIG_FILE dnl legacy AC_IPMIPOWER_CONFIG_FILE dnl legacy AC_IPMICONSOLE_CONFIG_FILE AC_INTERPRET_SENSOR_CONFIG_FILE AC_INTERPRET_SEL_CONFIG_FILE AC_IPMIDETECT_CONFIG_FILE AC_IPMIDETECTD_CONFIG_FILE AC_IPMISELD_CONFIG_FILE AC_IPMISELD_CACHE_DIRECTORY AC_LIBIPMICONSOLE_CONFIG_FILE AC_DONT_CHECK_FOR_ROOT dnl Checks for things needed in lib argp AC_CHECK_DECLS([program_invocation_name, program_invocation_short_name], [], [], [[#include ]]) dnl Check for variables dnl Macro definitions dnl Check for random number paths dnl Option to disable checking for /dev/urandom and /dev/random dnl dnl May be useful for cross compile distros where checking for dnl specific files is illegal. dnl AC_MSG_CHECKING([for random device support]) AC_ARG_WITH([random-device], AC_HELP_STRING([--without-random-device], [don't support random devices like /dev/urandom]), [ case "$withval" in no) ac_with_random_device=no ;; yes) ac_with_random_device=yes ;; *) ac_with_random_device=yes ;; esac ]) AC_MSG_RESULT([${ac_with_random_device=yes}]) if test x"${ac_with_random_device}" = xyes; then AC_CHECK_FILE([/dev/urandom], AC_DEFINE([HAVE_DEVURANDOM], [1], [Define that you found /dev/urandom])) AC_CHECK_FILE([/dev/random], AC_DEFINE([HAVE_DEVRANDOM], [1], [Define that you found /dev/random])) fi dnl Option to install pkg-config support files pkgconfigdir='${libdir}/pkgconfig' AC_MSG_CHECKING(whether to install pkg-config *.pc files) AC_ARG_WITH(pkgconfig-dir, AS_HELP_STRING([--with-pkgconfig-dir=PATH], [where to install pkg-config *.pc files (EPREFIX/lib/pkgconfig)]), [ case "${withval}" in yes|auto) ;; no) pkgconfigdir="" ;; *) pkgconfigdir="${withval}" ;; esac ], []) if test -n "${pkgconfigdir}"; then AC_MSG_RESULT(using ${pkgconfigdir}) else AC_MSG_RESULT(no) fi AM_CONDITIONAL(WITH_PKG_CONFIG, test -n "${pkgconfigdir}") AC_SUBST(pkgconfigdir) AC_OUTPUT freeipmi-1.6.4/aclocal.m40000644002055400205540000127033013527342441015125 0ustar00achuachu00000000000000# generated automatically by aclocal 1.13.4 -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. m4_ifndef([AC_CONFIG_MACRO_DIRS], [m4_defun([_AM_CONFIG_MACRO_DIRS], [])m4_defun([AC_CONFIG_MACRO_DIRS], [_AM_CONFIG_MACRO_DIRS($@)])]) m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl m4_if(m4_defn([AC_AUTOCONF_VERSION]), [2.69],, [m4_warning([this file was generated for autoconf 2.69. You have another version of autoconf. It may work, but is not guaranteed to. If you have problems, you may need to regenerate the build system entirely. To do so, use the procedure documented by the package, typically 'autoreconf'.])]) # libtool.m4 - Configure libtool for the host system. -*-Autoconf-*- # # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. m4_define([_LT_COPYING], [dnl # Copyright (C) 1996, 1997, 1998, 1999, 2000, 2001, 2003, 2004, 2005, # 2006, 2007, 2008, 2009, 2010, 2011 Free Software # Foundation, Inc. # Written by Gordon Matzigkeit, 1996 # # This file is part of GNU Libtool. # # GNU Libtool is free software; you can redistribute it and/or # modify it under the terms of the GNU General Public License as # published by the Free Software Foundation; either version 2 of # the License, or (at your option) any later version. # # As a special exception to the GNU General Public License, # if you distribute this file as part of a program or library that # is built using GNU Libtool, you may include this file under the # same distribution terms that you use for the rest of that program. # # GNU Libtool is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with GNU Libtool; see the file COPYING. If not, a copy # can be downloaded from http://www.gnu.org/licenses/gpl.html, or # obtained by writing to the Free Software Foundation, Inc., # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. ]) # serial 57 LT_INIT # LT_PREREQ(VERSION) # ------------------ # Complain and exit if this libtool version is less that VERSION. m4_defun([LT_PREREQ], [m4_if(m4_version_compare(m4_defn([LT_PACKAGE_VERSION]), [$1]), -1, [m4_default([$3], [m4_fatal([Libtool version $1 or higher is required], 63)])], [$2])]) # _LT_CHECK_BUILDDIR # ------------------ # Complain if the absolute build directory name contains unusual characters m4_defun([_LT_CHECK_BUILDDIR], [case `pwd` in *\ * | *\ *) AC_MSG_WARN([Libtool does not cope well with whitespace in `pwd`]) ;; esac ]) # LT_INIT([OPTIONS]) # ------------------ AC_DEFUN([LT_INIT], [AC_PREREQ([2.58])dnl We use AC_INCLUDES_DEFAULT AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT])dnl AC_BEFORE([$0], [LT_LANG])dnl AC_BEFORE([$0], [LT_OUTPUT])dnl AC_BEFORE([$0], [LTDL_INIT])dnl m4_require([_LT_CHECK_BUILDDIR])dnl dnl Autoconf doesn't catch unexpanded LT_ macros by default: m4_pattern_forbid([^_?LT_[A-Z_]+$])dnl m4_pattern_allow([^(_LT_EOF|LT_DLGLOBAL|LT_DLLAZY_OR_NOW|LT_MULTI_MODULE)$])dnl dnl aclocal doesn't pull ltoptions.m4, ltsugar.m4, or ltversion.m4 dnl unless we require an AC_DEFUNed macro: AC_REQUIRE([LTOPTIONS_VERSION])dnl AC_REQUIRE([LTSUGAR_VERSION])dnl AC_REQUIRE([LTVERSION_VERSION])dnl AC_REQUIRE([LTOBSOLETE_VERSION])dnl m4_require([_LT_PROG_LTMAIN])dnl _LT_SHELL_INIT([SHELL=${CONFIG_SHELL-/bin/sh}]) dnl Parse OPTIONS _LT_SET_OPTIONS([$0], [$1]) # This can be used to rebuild libtool when needed LIBTOOL_DEPS="$ltmain" # Always use our own libtool. LIBTOOL='$(SHELL) $(top_builddir)/libtool' AC_SUBST(LIBTOOL)dnl _LT_SETUP # Only expand once: m4_define([LT_INIT]) ])# LT_INIT # Old names: AU_ALIAS([AC_PROG_LIBTOOL], [LT_INIT]) AU_ALIAS([AM_PROG_LIBTOOL], [LT_INIT]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PROG_LIBTOOL], []) dnl AC_DEFUN([AM_PROG_LIBTOOL], []) # _LT_CC_BASENAME(CC) # ------------------- # Calculate cc_basename. Skip known compiler wrappers and cross-prefix. m4_defun([_LT_CC_BASENAME], [for cc_temp in $1""; do case $cc_temp in compile | *[[\\/]]compile | ccache | *[[\\/]]ccache ) ;; distcc | *[[\\/]]distcc | purify | *[[\\/]]purify ) ;; \-*) ;; *) break;; esac done cc_basename=`$ECHO "$cc_temp" | $SED "s%.*/%%; s%^$host_alias-%%"` ]) # _LT_FILEUTILS_DEFAULTS # ---------------------- # It is okay to use these file commands and assume they have been set # sensibly after `m4_require([_LT_FILEUTILS_DEFAULTS])'. m4_defun([_LT_FILEUTILS_DEFAULTS], [: ${CP="cp -f"} : ${MV="mv -f"} : ${RM="rm -f"} ])# _LT_FILEUTILS_DEFAULTS # _LT_SETUP # --------- m4_defun([_LT_SETUP], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_REQUIRE([_LT_PREPARE_SED_QUOTE_VARS])dnl AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH])dnl _LT_DECL([], [PATH_SEPARATOR], [1], [The PATH separator for the build system])dnl dnl _LT_DECL([], [host_alias], [0], [The host system])dnl _LT_DECL([], [host], [0])dnl _LT_DECL([], [host_os], [0])dnl dnl _LT_DECL([], [build_alias], [0], [The build system])dnl _LT_DECL([], [build], [0])dnl _LT_DECL([], [build_os], [0])dnl dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl dnl AC_REQUIRE([AC_PROG_LN_S])dnl test -z "$LN_S" && LN_S="ln -s" _LT_DECL([], [LN_S], [1], [Whether we need soft or hard links])dnl dnl AC_REQUIRE([LT_CMD_MAX_LEN])dnl _LT_DECL([objext], [ac_objext], [0], [Object file suffix (normally "o")])dnl _LT_DECL([], [exeext], [0], [Executable file suffix (normally "")])dnl dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl m4_require([_LT_PATH_CONVERSION_FUNCTIONS])dnl m4_require([_LT_CMD_RELOAD])dnl m4_require([_LT_CHECK_MAGIC_METHOD])dnl m4_require([_LT_CHECK_SHAREDLIB_FROM_LINKLIB])dnl m4_require([_LT_CMD_OLD_ARCHIVE])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_WITH_SYSROOT])dnl _LT_CONFIG_LIBTOOL_INIT([ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes INIT. if test -n "\${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi ]) if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi _LT_CHECK_OBJDIR m4_require([_LT_TAG_COMPILER])dnl case $host_os in aix3*) # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi ;; esac # Global variables: ofile=libtool can_build_shared=yes # All known linkers require a `.a' archive for static linking (except MSVC, # which needs '.lib'). libext=a with_gnu_ld="$lt_cv_prog_gnu_ld" old_CC="$CC" old_CFLAGS="$CFLAGS" # Set sane defaults for various variables test -z "$CC" && CC=cc test -z "$LTCC" && LTCC=$CC test -z "$LTCFLAGS" && LTCFLAGS=$CFLAGS test -z "$LD" && LD=ld test -z "$ac_objext" && ac_objext=o _LT_CC_BASENAME([$compiler]) # Only perform the check for file, if the check method requires it test -z "$MAGIC_CMD" && MAGIC_CMD=file case $deplibs_check_method in file_magic*) if test "$file_magic_cmd" = '$MAGIC_CMD'; then _LT_PATH_MAGIC fi ;; esac # Use C for the default configuration in the libtool script LT_SUPPORTED_TAG([CC]) _LT_LANG_C_CONFIG _LT_LANG_DEFAULT_CONFIG _LT_CONFIG_COMMANDS ])# _LT_SETUP # _LT_PREPARE_SED_QUOTE_VARS # -------------------------- # Define a few sed substitution that help us do robust quoting. m4_defun([_LT_PREPARE_SED_QUOTE_VARS], [# Backslashify metacharacters that are still active within # double-quoted strings. sed_quote_subst='s/\([["`$\\]]\)/\\\1/g' # Same as above, but do not quote variable references. double_quote_subst='s/\([["`\\]]\)/\\\1/g' # Sed substitution to delay expansion of an escaped shell variable in a # double_quote_subst'ed string. delay_variable_subst='s/\\\\\\\\\\\$/\\\\\\$/g' # Sed substitution to delay expansion of an escaped single quote. delay_single_quote_subst='s/'\''/'\'\\\\\\\'\''/g' # Sed substitution to avoid accidental globbing in evaled expressions no_glob_subst='s/\*/\\\*/g' ]) # _LT_PROG_LTMAIN # --------------- # Note that this code is called both from `configure', and `config.status' # now that we use AC_CONFIG_COMMANDS to generate libtool. Notably, # `config.status' has no value for ac_aux_dir unless we are using Automake, # so we pass a copy along to make sure it has a sensible value anyway. m4_defun([_LT_PROG_LTMAIN], [m4_ifdef([AC_REQUIRE_AUX_FILE], [AC_REQUIRE_AUX_FILE([ltmain.sh])])dnl _LT_CONFIG_LIBTOOL_INIT([ac_aux_dir='$ac_aux_dir']) ltmain="$ac_aux_dir/ltmain.sh" ])# _LT_PROG_LTMAIN # So that we can recreate a full libtool script including additional # tags, we accumulate the chunks of code to send to AC_CONFIG_COMMANDS # in macros and then make a single call at the end using the `libtool' # label. # _LT_CONFIG_LIBTOOL_INIT([INIT-COMMANDS]) # ---------------------------------------- # Register INIT-COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL_INIT], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_INIT], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_INIT]) # _LT_CONFIG_LIBTOOL([COMMANDS]) # ------------------------------ # Register COMMANDS to be passed to AC_CONFIG_COMMANDS later. m4_define([_LT_CONFIG_LIBTOOL], [m4_ifval([$1], [m4_append([_LT_OUTPUT_LIBTOOL_COMMANDS], [$1 ])])]) # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS]) # _LT_CONFIG_SAVE_COMMANDS([COMMANDS], [INIT_COMMANDS]) # ----------------------------------------------------- m4_defun([_LT_CONFIG_SAVE_COMMANDS], [_LT_CONFIG_LIBTOOL([$1]) _LT_CONFIG_LIBTOOL_INIT([$2]) ]) # _LT_FORMAT_COMMENT([COMMENT]) # ----------------------------- # Add leading comment marks to the start of each line, and a trailing # full-stop to the whole comment if one is not present already. m4_define([_LT_FORMAT_COMMENT], [m4_ifval([$1], [ m4_bpatsubst([m4_bpatsubst([$1], [^ *], [# ])], [['`$\]], [\\\&])]m4_bmatch([$1], [[!?.]$], [], [.]) )]) # _LT_DECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION], [IS-TAGGED?]) # ------------------------------------------------------------------- # CONFIGNAME is the name given to the value in the libtool script. # VARNAME is the (base) name used in the configure script. # VALUE may be 0, 1 or 2 for a computed quote escaped value based on # VARNAME. Any other value will be used directly. m4_define([_LT_DECL], [lt_if_append_uniq([lt_decl_varnames], [$2], [, ], [lt_dict_add_subkey([lt_decl_dict], [$2], [libtool_name], [m4_ifval([$1], [$1], [$2])]) lt_dict_add_subkey([lt_decl_dict], [$2], [value], [$3]) m4_ifval([$4], [lt_dict_add_subkey([lt_decl_dict], [$2], [description], [$4])]) lt_dict_add_subkey([lt_decl_dict], [$2], [tagged?], [m4_ifval([$5], [yes], [no])])]) ]) # _LT_TAGDECL([CONFIGNAME], VARNAME, VALUE, [DESCRIPTION]) # -------------------------------------------------------- m4_define([_LT_TAGDECL], [_LT_DECL([$1], [$2], [$3], [$4], [yes])]) # lt_decl_tag_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_tag_varnames], [_lt_decl_filter([tagged?], [yes], $@)]) # _lt_decl_filter(SUBKEY, VALUE, [SEPARATOR], [VARNAME1..]) # --------------------------------------------------------- m4_define([_lt_decl_filter], [m4_case([$#], [0], [m4_fatal([$0: too few arguments: $#])], [1], [m4_fatal([$0: too few arguments: $#: $1])], [2], [lt_dict_filter([lt_decl_dict], [$1], [$2], [], lt_decl_varnames)], [3], [lt_dict_filter([lt_decl_dict], [$1], [$2], [$3], lt_decl_varnames)], [lt_dict_filter([lt_decl_dict], $@)])[]dnl ]) # lt_decl_quote_varnames([SEPARATOR], [VARNAME1...]) # -------------------------------------------------- m4_define([lt_decl_quote_varnames], [_lt_decl_filter([value], [1], $@)]) # lt_decl_dquote_varnames([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_dquote_varnames], [_lt_decl_filter([value], [2], $@)]) # lt_decl_varnames_tagged([SEPARATOR], [VARNAME1...]) # --------------------------------------------------- m4_define([lt_decl_varnames_tagged], [m4_assert([$# <= 2])dnl _$0(m4_quote(m4_default([$1], [[, ]])), m4_ifval([$2], [[$2]], [m4_dquote(lt_decl_tag_varnames)]), m4_split(m4_normalize(m4_quote(_LT_TAGS)), [ ]))]) m4_define([_lt_decl_varnames_tagged], [m4_ifval([$3], [lt_combine([$1], [$2], [_], $3)])]) # lt_decl_all_varnames([SEPARATOR], [VARNAME1...]) # ------------------------------------------------ m4_define([lt_decl_all_varnames], [_$0(m4_quote(m4_default([$1], [[, ]])), m4_if([$2], [], m4_quote(lt_decl_varnames), m4_quote(m4_shift($@))))[]dnl ]) m4_define([_lt_decl_all_varnames], [lt_join($@, lt_decl_varnames_tagged([$1], lt_decl_tag_varnames([[, ]], m4_shift($@))))dnl ]) # _LT_CONFIG_STATUS_DECLARE([VARNAME]) # ------------------------------------ # Quote a variable value, and forward it to `config.status' so that its # declaration there will have the same value as in `configure'. VARNAME # must have a single quote delimited value for this to work. m4_define([_LT_CONFIG_STATUS_DECLARE], [$1='`$ECHO "$][$1" | $SED "$delay_single_quote_subst"`']) # _LT_CONFIG_STATUS_DECLARATIONS # ------------------------------ # We delimit libtool config variables with single quotes, so when # we write them to config.status, we have to be sure to quote all # embedded single quotes properly. In configure, this macro expands # each variable declared with _LT_DECL (and _LT_TAGDECL) into: # # ='`$ECHO "$" | $SED "$delay_single_quote_subst"`' m4_defun([_LT_CONFIG_STATUS_DECLARATIONS], [m4_foreach([_lt_var], m4_quote(lt_decl_all_varnames), [m4_n([_LT_CONFIG_STATUS_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAGS # ---------------- # Output comment and list of tags supported by the script m4_defun([_LT_LIBTOOL_TAGS], [_LT_FORMAT_COMMENT([The names of the tagged configurations supported by this script])dnl available_tags="_LT_TAGS"dnl ]) # _LT_LIBTOOL_DECLARE(VARNAME, [TAG]) # ----------------------------------- # Extract the dictionary values for VARNAME (optionally with TAG) and # expand to a commented shell variable setting: # # # Some comment about what VAR is for. # visible_name=$lt_internal_name m4_define([_LT_LIBTOOL_DECLARE], [_LT_FORMAT_COMMENT(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [description])))[]dnl m4_pushdef([_libtool_name], m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [libtool_name])))[]dnl m4_case(m4_quote(lt_dict_fetch([lt_decl_dict], [$1], [value])), [0], [_libtool_name=[$]$1], [1], [_libtool_name=$lt_[]$1], [2], [_libtool_name=$lt_[]$1], [_libtool_name=lt_dict_fetch([lt_decl_dict], [$1], [value])])[]dnl m4_ifval([$2], [_$2])[]m4_popdef([_libtool_name])[]dnl ]) # _LT_LIBTOOL_CONFIG_VARS # ----------------------- # Produce commented declarations of non-tagged libtool config variables # suitable for insertion in the LIBTOOL CONFIG section of the `libtool' # script. Tagged libtool config variables (even for the LIBTOOL CONFIG # section) are produced by _LT_LIBTOOL_TAG_VARS. m4_defun([_LT_LIBTOOL_CONFIG_VARS], [m4_foreach([_lt_var], m4_quote(_lt_decl_filter([tagged?], [no], [], lt_decl_varnames)), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var)])])]) # _LT_LIBTOOL_TAG_VARS(TAG) # ------------------------- m4_define([_LT_LIBTOOL_TAG_VARS], [m4_foreach([_lt_var], m4_quote(lt_decl_tag_varnames), [m4_n([_LT_LIBTOOL_DECLARE(_lt_var, [$1])])])]) # _LT_TAGVAR(VARNAME, [TAGNAME]) # ------------------------------ m4_define([_LT_TAGVAR], [m4_ifval([$2], [$1_$2], [$1])]) # _LT_CONFIG_COMMANDS # ------------------- # Send accumulated output to $CONFIG_STATUS. Thanks to the lists of # variables for single and double quote escaping we saved from calls # to _LT_DECL, we can put quote escaped variables declarations # into `config.status', and then the shell code to quote escape them in # for loops in `config.status'. Finally, any additional code accumulated # from calls to _LT_CONFIG_LIBTOOL_INIT is expanded. m4_defun([_LT_CONFIG_COMMANDS], [AC_PROVIDE_IFELSE([LT_OUTPUT], dnl If the libtool generation code has been placed in $CONFIG_LT, dnl instead of duplicating it all over again into config.status, dnl then we will have config.status run $CONFIG_LT later, so it dnl needs to know what name is stored there: [AC_CONFIG_COMMANDS([libtool], [$SHELL $CONFIG_LT || AS_EXIT(1)], [CONFIG_LT='$CONFIG_LT'])], dnl If the libtool generation code is destined for config.status, dnl expand the accumulated commands and init code now: [AC_CONFIG_COMMANDS([libtool], [_LT_OUTPUT_LIBTOOL_COMMANDS], [_LT_OUTPUT_LIBTOOL_COMMANDS_INIT])]) ])#_LT_CONFIG_COMMANDS # Initialize. m4_define([_LT_OUTPUT_LIBTOOL_COMMANDS_INIT], [ # The HP-UX ksh and POSIX shell print the target directory to stdout # if CDPATH is set. (unset CDPATH) >/dev/null 2>&1 && unset CDPATH sed_quote_subst='$sed_quote_subst' double_quote_subst='$double_quote_subst' delay_variable_subst='$delay_variable_subst' _LT_CONFIG_STATUS_DECLARATIONS LTCC='$LTCC' LTCFLAGS='$LTCFLAGS' compiler='$compiler_DEFAULT' # A function that is used when there is no print builtin or printf. func_fallback_echo () { eval 'cat <<_LTECHO_EOF \$[]1 _LTECHO_EOF' } # Quote evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_quote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED \\"\\\$sed_quote_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done # Double-quote double-evaled strings. for var in lt_decl_all_varnames([[ \ ]], lt_decl_dquote_varnames); do case \`eval \\\\\$ECHO \\\\""\\\\\$\$var"\\\\"\` in *[[\\\\\\\`\\"\\\$]]*) eval "lt_\$var=\\\\\\"\\\`\\\$ECHO \\"\\\$\$var\\" | \\\$SED -e \\"\\\$double_quote_subst\\" -e \\"\\\$sed_quote_subst\\" -e \\"\\\$delay_variable_subst\\"\\\`\\\\\\"" ;; *) eval "lt_\$var=\\\\\\"\\\$\$var\\\\\\"" ;; esac done _LT_OUTPUT_LIBTOOL_INIT ]) # _LT_GENERATED_FILE_INIT(FILE, [COMMENT]) # ------------------------------------ # Generate a child script FILE with all initialization necessary to # reuse the environment learned by the parent script, and make the # file executable. If COMMENT is supplied, it is inserted after the # `#!' sequence but before initialization text begins. After this # macro, additional text can be appended to FILE to form the body of # the child script. The macro ends with non-zero status if the # file could not be fully written (such as if the disk is full). m4_ifdef([AS_INIT_GENERATED], [m4_defun([_LT_GENERATED_FILE_INIT],[AS_INIT_GENERATED($@)])], [m4_defun([_LT_GENERATED_FILE_INIT], [m4_require([AS_PREPARE])]dnl [m4_pushdef([AS_MESSAGE_LOG_FD])]dnl [lt_write_fail=0 cat >$1 <<_ASEOF || lt_write_fail=1 #! $SHELL # Generated by $as_me. $2 SHELL=\${CONFIG_SHELL-$SHELL} export SHELL _ASEOF cat >>$1 <<\_ASEOF || lt_write_fail=1 AS_SHELL_SANITIZE _AS_PREPARE exec AS_MESSAGE_FD>&1 _ASEOF test $lt_write_fail = 0 && chmod +x $1[]dnl m4_popdef([AS_MESSAGE_LOG_FD])])])# _LT_GENERATED_FILE_INIT # LT_OUTPUT # --------- # This macro allows early generation of the libtool script (before # AC_OUTPUT is called), incase it is used in configure for compilation # tests. AC_DEFUN([LT_OUTPUT], [: ${CONFIG_LT=./config.lt} AC_MSG_NOTICE([creating $CONFIG_LT]) _LT_GENERATED_FILE_INIT(["$CONFIG_LT"], [# Run this file to recreate a libtool stub with the current configuration.]) cat >>"$CONFIG_LT" <<\_LTEOF lt_cl_silent=false exec AS_MESSAGE_LOG_FD>>config.log { echo AS_BOX([Running $as_me.]) } >&AS_MESSAGE_LOG_FD lt_cl_help="\ \`$as_me' creates a local libtool stub from the current configuration, for use in further configure time tests before the real libtool is generated. Usage: $[0] [[OPTIONS]] -h, --help print this help, then exit -V, --version print version number, then exit -q, --quiet do not print progress messages -d, --debug don't remove temporary files Report bugs to ." lt_cl_version="\ m4_ifset([AC_PACKAGE_NAME], [AC_PACKAGE_NAME ])config.lt[]dnl m4_ifset([AC_PACKAGE_VERSION], [ AC_PACKAGE_VERSION]) configured by $[0], generated by m4_PACKAGE_STRING. Copyright (C) 2011 Free Software Foundation, Inc. This config.lt script is free software; the Free Software Foundation gives unlimited permision to copy, distribute and modify it." while test $[#] != 0 do case $[1] in --version | --v* | -V ) echo "$lt_cl_version"; exit 0 ;; --help | --h* | -h ) echo "$lt_cl_help"; exit 0 ;; --debug | --d* | -d ) debug=: ;; --quiet | --q* | --silent | --s* | -q ) lt_cl_silent=: ;; -*) AC_MSG_ERROR([unrecognized option: $[1] Try \`$[0] --help' for more information.]) ;; *) AC_MSG_ERROR([unrecognized argument: $[1] Try \`$[0] --help' for more information.]) ;; esac shift done if $lt_cl_silent; then exec AS_MESSAGE_FD>/dev/null fi _LTEOF cat >>"$CONFIG_LT" <<_LTEOF _LT_OUTPUT_LIBTOOL_COMMANDS_INIT _LTEOF cat >>"$CONFIG_LT" <<\_LTEOF AC_MSG_NOTICE([creating $ofile]) _LT_OUTPUT_LIBTOOL_COMMANDS AS_EXIT(0) _LTEOF chmod +x "$CONFIG_LT" # configure is writing to config.log, but config.lt does its own redirection, # appending to config.log, which fails on DOS, as config.log is still kept # open by configure. Here we exec the FD to /dev/null, effectively closing # config.log, so it can be properly (re)opened and appended to by config.lt. lt_cl_success=: test "$silent" = yes && lt_config_lt_args="$lt_config_lt_args --quiet" exec AS_MESSAGE_LOG_FD>/dev/null $SHELL "$CONFIG_LT" $lt_config_lt_args || lt_cl_success=false exec AS_MESSAGE_LOG_FD>>config.log $lt_cl_success || AS_EXIT(1) ])# LT_OUTPUT # _LT_CONFIG(TAG) # --------------- # If TAG is the built-in tag, create an initial libtool script with a # default configuration from the untagged config vars. Otherwise add code # to config.status for appending the configuration named by TAG from the # matching tagged config vars. m4_defun([_LT_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_CONFIG_SAVE_COMMANDS([ m4_define([_LT_TAG], m4_if([$1], [], [C], [$1]))dnl m4_if(_LT_TAG, [C], [ # See if we are running on zsh, and set the options which allow our # commands through without removal of \ escapes. if test -n "${ZSH_VERSION+set}" ; then setopt NO_GLOB_SUBST fi cfgfile="${ofile}T" trap "$RM \"$cfgfile\"; exit 1" 1 2 15 $RM "$cfgfile" cat <<_LT_EOF >> "$cfgfile" #! $SHELL # `$ECHO "$ofile" | sed 's%^.*/%%'` - Provide generalized library-building support services. # Generated automatically by $as_me ($PACKAGE$TIMESTAMP) $VERSION # Libtool was configured on host `(hostname || uname -n) 2>/dev/null | sed 1q`: # NOTE: Changes made to this file will be lost: look at ltmain.sh. # _LT_COPYING _LT_LIBTOOL_TAGS # ### BEGIN LIBTOOL CONFIG _LT_LIBTOOL_CONFIG_VARS _LT_LIBTOOL_TAG_VARS # ### END LIBTOOL CONFIG _LT_EOF case $host_os in aix3*) cat <<\_LT_EOF >> "$cfgfile" # AIX sometimes has problems with the GCC collect2 program. For some # reason, if we set the COLLECT_NAMES environment variable, the problems # vanish in a puff of smoke. if test "X${COLLECT_NAMES+set}" != Xset; then COLLECT_NAMES= export COLLECT_NAMES fi _LT_EOF ;; esac _LT_PROG_LTMAIN # We use sed instead of cat because bash on DJGPP gets confused if # if finds mixed CR/LF and LF-only lines. Since sed operates in # text mode, it properly converts lines to CR/LF. This bash problem # is reportedly fixed, but why not run on old versions too? sed '$q' "$ltmain" >> "$cfgfile" \ || (rm -f "$cfgfile"; exit 1) _LT_PROG_REPLACE_SHELLFNS mv -f "$cfgfile" "$ofile" || (rm -f "$ofile" && cp "$cfgfile" "$ofile" && rm -f "$cfgfile") chmod +x "$ofile" ], [cat <<_LT_EOF >> "$ofile" dnl Unfortunately we have to use $1 here, since _LT_TAG is not expanded dnl in a comment (ie after a #). # ### BEGIN LIBTOOL TAG CONFIG: $1 _LT_LIBTOOL_TAG_VARS(_LT_TAG) # ### END LIBTOOL TAG CONFIG: $1 _LT_EOF ])dnl /m4_if ], [m4_if([$1], [], [ PACKAGE='$PACKAGE' VERSION='$VERSION' TIMESTAMP='$TIMESTAMP' RM='$RM' ofile='$ofile'], []) ])dnl /_LT_CONFIG_SAVE_COMMANDS ])# _LT_CONFIG # LT_SUPPORTED_TAG(TAG) # --------------------- # Trace this macro to discover what tags are supported by the libtool # --tag option, using: # autoconf --trace 'LT_SUPPORTED_TAG:$1' AC_DEFUN([LT_SUPPORTED_TAG], []) # C support is built-in for now m4_define([_LT_LANG_C_enabled], []) m4_define([_LT_TAGS], []) # LT_LANG(LANG) # ------------- # Enable libtool support for the given language if not already enabled. AC_DEFUN([LT_LANG], [AC_BEFORE([$0], [LT_OUTPUT])dnl m4_case([$1], [C], [_LT_LANG(C)], [C++], [_LT_LANG(CXX)], [Go], [_LT_LANG(GO)], [Java], [_LT_LANG(GCJ)], [Fortran 77], [_LT_LANG(F77)], [Fortran], [_LT_LANG(FC)], [Windows Resource], [_LT_LANG(RC)], [m4_ifdef([_LT_LANG_]$1[_CONFIG], [_LT_LANG($1)], [m4_fatal([$0: unsupported language: "$1"])])])dnl ])# LT_LANG # _LT_LANG(LANGNAME) # ------------------ m4_defun([_LT_LANG], [m4_ifdef([_LT_LANG_]$1[_enabled], [], [LT_SUPPORTED_TAG([$1])dnl m4_append([_LT_TAGS], [$1 ])dnl m4_define([_LT_LANG_]$1[_enabled], [])dnl _LT_LANG_$1_CONFIG($1)])dnl ])# _LT_LANG m4_ifndef([AC_PROG_GO], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_GO. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_GO], [AC_LANG_PUSH(Go)dnl AC_ARG_VAR([GOC], [Go compiler command])dnl AC_ARG_VAR([GOFLAGS], [Go compiler flags])dnl _AC_ARG_VAR_LDFLAGS()dnl AC_CHECK_TOOL(GOC, gccgo) if test -z "$GOC"; then if test -n "$ac_tool_prefix"; then AC_CHECK_PROG(GOC, [${ac_tool_prefix}gccgo], [${ac_tool_prefix}gccgo]) fi fi if test -z "$GOC"; then AC_CHECK_PROG(GOC, gccgo, gccgo, false) fi ])#m4_defun ])#m4_ifndef # _LT_LANG_DEFAULT_CONFIG # ----------------------- m4_defun([_LT_LANG_DEFAULT_CONFIG], [AC_PROVIDE_IFELSE([AC_PROG_CXX], [LT_LANG(CXX)], [m4_define([AC_PROG_CXX], defn([AC_PROG_CXX])[LT_LANG(CXX)])]) AC_PROVIDE_IFELSE([AC_PROG_F77], [LT_LANG(F77)], [m4_define([AC_PROG_F77], defn([AC_PROG_F77])[LT_LANG(F77)])]) AC_PROVIDE_IFELSE([AC_PROG_FC], [LT_LANG(FC)], [m4_define([AC_PROG_FC], defn([AC_PROG_FC])[LT_LANG(FC)])]) dnl The call to [A][M_PROG_GCJ] is quoted like that to stop aclocal dnl pulling things in needlessly. AC_PROVIDE_IFELSE([AC_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([A][M_PROG_GCJ], [LT_LANG(GCJ)], [AC_PROVIDE_IFELSE([LT_PROG_GCJ], [LT_LANG(GCJ)], [m4_ifdef([AC_PROG_GCJ], [m4_define([AC_PROG_GCJ], defn([AC_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([A][M_PROG_GCJ], [m4_define([A][M_PROG_GCJ], defn([A][M_PROG_GCJ])[LT_LANG(GCJ)])]) m4_ifdef([LT_PROG_GCJ], [m4_define([LT_PROG_GCJ], defn([LT_PROG_GCJ])[LT_LANG(GCJ)])])])])]) AC_PROVIDE_IFELSE([AC_PROG_GO], [LT_LANG(GO)], [m4_define([AC_PROG_GO], defn([AC_PROG_GO])[LT_LANG(GO)])]) AC_PROVIDE_IFELSE([LT_PROG_RC], [LT_LANG(RC)], [m4_define([LT_PROG_RC], defn([LT_PROG_RC])[LT_LANG(RC)])]) ])# _LT_LANG_DEFAULT_CONFIG # Obsolete macros: AU_DEFUN([AC_LIBTOOL_CXX], [LT_LANG(C++)]) AU_DEFUN([AC_LIBTOOL_F77], [LT_LANG(Fortran 77)]) AU_DEFUN([AC_LIBTOOL_FC], [LT_LANG(Fortran)]) AU_DEFUN([AC_LIBTOOL_GCJ], [LT_LANG(Java)]) AU_DEFUN([AC_LIBTOOL_RC], [LT_LANG(Windows Resource)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_CXX], []) dnl AC_DEFUN([AC_LIBTOOL_F77], []) dnl AC_DEFUN([AC_LIBTOOL_FC], []) dnl AC_DEFUN([AC_LIBTOOL_GCJ], []) dnl AC_DEFUN([AC_LIBTOOL_RC], []) # _LT_TAG_COMPILER # ---------------- m4_defun([_LT_TAG_COMPILER], [AC_REQUIRE([AC_PROG_CC])dnl _LT_DECL([LTCC], [CC], [1], [A C compiler])dnl _LT_DECL([LTCFLAGS], [CFLAGS], [1], [LTCC compiler flags])dnl _LT_TAGDECL([CC], [compiler], [1], [A language specific compiler])dnl _LT_TAGDECL([with_gcc], [GCC], [0], [Is the compiler the GNU compiler?])dnl # If no C compiler was specified, use CC. LTCC=${LTCC-"$CC"} # If no C compiler flags were specified, use CFLAGS. LTCFLAGS=${LTCFLAGS-"$CFLAGS"} # Allow CC to be a program name with arguments. compiler=$CC ])# _LT_TAG_COMPILER # _LT_COMPILER_BOILERPLATE # ------------------------ # Check for compiler boilerplate output or warnings with # the simple compiler test code. m4_defun([_LT_COMPILER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_compile_test_code" >conftest.$ac_ext eval "$ac_compile" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_compiler_boilerplate=`cat conftest.err` $RM conftest* ])# _LT_COMPILER_BOILERPLATE # _LT_LINKER_BOILERPLATE # ---------------------- # Check for linker boilerplate output or warnings with # the simple link test code. m4_defun([_LT_LINKER_BOILERPLATE], [m4_require([_LT_DECL_SED])dnl ac_outfile=conftest.$ac_objext echo "$lt_simple_link_test_code" >conftest.$ac_ext eval "$ac_link" 2>&1 >/dev/null | $SED '/^$/d; /^ *+/d' >conftest.err _lt_linker_boilerplate=`cat conftest.err` $RM -r conftest* ])# _LT_LINKER_BOILERPLATE # _LT_REQUIRED_DARWIN_CHECKS # ------------------------- m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[ case $host_os in rhapsody* | darwin*) AC_CHECK_TOOL([DSYMUTIL], [dsymutil], [:]) AC_CHECK_TOOL([NMEDIT], [nmedit], [:]) AC_CHECK_TOOL([LIPO], [lipo], [:]) AC_CHECK_TOOL([OTOOL], [otool], [:]) AC_CHECK_TOOL([OTOOL64], [otool64], [:]) _LT_DECL([], [DSYMUTIL], [1], [Tool to manipulate archived DWARF debug symbol files on Mac OS X]) _LT_DECL([], [NMEDIT], [1], [Tool to change global to local symbols on Mac OS X]) _LT_DECL([], [LIPO], [1], [Tool to manipulate fat objects and archives on Mac OS X]) _LT_DECL([], [OTOOL], [1], [ldd/readelf like tool for Mach-O binaries on Mac OS X]) _LT_DECL([], [OTOOL64], [1], [ldd/readelf like tool for 64 bit Mach-O binaries on Mac OS X 10.4]) AC_CACHE_CHECK([for -single_module linker flag],[lt_cv_apple_cc_single_mod], [lt_cv_apple_cc_single_mod=no if test -z "${LT_MULTI_MODULE}"; then # By default we will add the -single_module flag. You can override # by either setting the environment variable LT_MULTI_MODULE # non-empty at configure time, or by adding -multi_module to the # link flags. rm -rf libconftest.dylib* echo "int foo(void){return 1;}" > conftest.c echo "$LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o libconftest.dylib \ -dynamiclib -Wl,-single_module conftest.c 2>conftest.err _lt_result=$? # If there is a non-empty error log, and "single_module" # appears in it, assume the flag caused a linker warning if test -s conftest.err && $GREP single_module conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD # Otherwise, if the output was created with a 0 exit code from # the compiler, it worked. elif test -f libconftest.dylib && test $_lt_result -eq 0; then lt_cv_apple_cc_single_mod=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -rf libconftest.dylib* rm -f conftest.* fi]) AC_CACHE_CHECK([for -exported_symbols_list linker flag], [lt_cv_ld_exported_symbols_list], [lt_cv_ld_exported_symbols_list=no save_LDFLAGS=$LDFLAGS echo "_main" > conftest.sym LDFLAGS="$LDFLAGS -Wl,-exported_symbols_list,conftest.sym" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [lt_cv_ld_exported_symbols_list=yes], [lt_cv_ld_exported_symbols_list=no]) LDFLAGS="$save_LDFLAGS" ]) AC_CACHE_CHECK([for -force_load linker flag],[lt_cv_ld_force_load], [lt_cv_ld_force_load=no cat > conftest.c << _LT_EOF int forced_loaded() { return 2;} _LT_EOF echo "$LTCC $LTCFLAGS -c -o conftest.o conftest.c" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS -c -o conftest.o conftest.c 2>&AS_MESSAGE_LOG_FD echo "$AR cru libconftest.a conftest.o" >&AS_MESSAGE_LOG_FD $AR cru libconftest.a conftest.o 2>&AS_MESSAGE_LOG_FD echo "$RANLIB libconftest.a" >&AS_MESSAGE_LOG_FD $RANLIB libconftest.a 2>&AS_MESSAGE_LOG_FD cat > conftest.c << _LT_EOF int main() { return 0;} _LT_EOF echo "$LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a" >&AS_MESSAGE_LOG_FD $LTCC $LTCFLAGS $LDFLAGS -o conftest conftest.c -Wl,-force_load,./libconftest.a 2>conftest.err _lt_result=$? if test -s conftest.err && $GREP force_load conftest.err; then cat conftest.err >&AS_MESSAGE_LOG_FD elif test -f conftest && test $_lt_result -eq 0 && $GREP forced_load conftest >/dev/null 2>&1 ; then lt_cv_ld_force_load=yes else cat conftest.err >&AS_MESSAGE_LOG_FD fi rm -f conftest.err libconftest.a conftest conftest.c rm -rf conftest.dSYM ]) case $host_os in rhapsody* | darwin1.[[012]]) _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;; darwin1.*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; darwin*) # darwin 5.x on # if running on 10.5 or later, the deployment target defaults # to the OS version, if on x86, and 10.4, the deployment # target defaults to 10.4. Don't you love it? case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in 10.0,*86*-darwin8*|10.0,*-darwin[[91]]*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; 10.[[012]]*) _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;; 10.*) _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;; esac ;; esac if test "$lt_cv_apple_cc_single_mod" = "yes"; then _lt_dar_single_mod='$single_module' fi if test "$lt_cv_ld_exported_symbols_list" = "yes"; then _lt_dar_export_syms=' ${wl}-exported_symbols_list,$output_objdir/${libname}-symbols.expsym' else _lt_dar_export_syms='~$NMEDIT -s $output_objdir/${libname}-symbols.expsym ${lib}' fi if test "$DSYMUTIL" != ":" && test "$lt_cv_ld_force_load" = "no"; then _lt_dsymutil='~$DSYMUTIL $lib || :' else _lt_dsymutil= fi ;; esac ]) # _LT_DARWIN_LINKER_FEATURES([TAG]) # --------------------------------- # Checks for linker and compiler features on darwin m4_defun([_LT_DARWIN_LINKER_FEATURES], [ m4_require([_LT_REQUIRED_DARWIN_CHECKS]) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported if test "$lt_cv_ld_force_load" = "yes"; then _LT_TAGVAR(whole_archive_flag_spec, $1)='`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience ${wl}-force_load,$conv\"; done; func_echo_all \"$new_convenience\"`' m4_case([$1], [F77], [_LT_TAGVAR(compiler_needs_object, $1)=yes], [FC], [_LT_TAGVAR(compiler_needs_object, $1)=yes]) else _LT_TAGVAR(whole_archive_flag_spec, $1)='' fi _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)="$_lt_dar_allow_undefined" case $cc_basename in ifort*) _lt_dar_can_shared=yes ;; *) _lt_dar_can_shared=$GCC ;; esac if test "$_lt_dar_can_shared" = "yes"; then output_verbose_link_cmd=func_echo_all _LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring $_lt_dar_single_mod${_lt_dsymutil}" _LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring ${_lt_dar_single_mod}${_lt_dar_export_syms}${_lt_dsymutil}" _LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}" m4_if([$1], [CXX], [ if test "$lt_cv_apple_cc_single_mod" != "yes"; then _LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dsymutil}" _LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}" fi ],[]) else _LT_TAGVAR(ld_shlibs, $1)=no fi ]) # _LT_SYS_MODULE_PATH_AIX([TAGNAME]) # ---------------------------------- # Links a minimal program and checks the executable # for the system default hardcoded library path. In most cases, # this is /usr/lib:/lib, but when the MPI compilers are used # the location of the communication and MPI libs are included too. # If we don't find anything, use the default library path according # to the aix ld manual. # Store the results from the different compilers for each TAGNAME. # Allow to override them for all tags through lt_cv_aix_libpath. m4_defun([_LT_SYS_MODULE_PATH_AIX], [m4_require([_LT_DECL_SED])dnl if test "${lt_cv_aix_libpath+set}" = set; then aix_libpath=$lt_cv_aix_libpath else AC_CACHE_VAL([_LT_TAGVAR([lt_cv_aix_libpath_], [$1])], [AC_LINK_IFELSE([AC_LANG_PROGRAM],[ lt_aix_libpath_sed='[ /Import File Strings/,/^$/ { /^0/ { s/^0 *\([^ ]*\) *$/\1/ p } }]' _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -H conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` # Check for a 64-bit object if we didn't find anything. if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])=`dump -HX64 conftest$ac_exeext 2>/dev/null | $SED -n -e "$lt_aix_libpath_sed"` fi],[]) if test -z "$_LT_TAGVAR([lt_cv_aix_libpath_], [$1])"; then _LT_TAGVAR([lt_cv_aix_libpath_], [$1])="/usr/lib:/lib" fi ]) aix_libpath=$_LT_TAGVAR([lt_cv_aix_libpath_], [$1]) fi ])# _LT_SYS_MODULE_PATH_AIX # _LT_SHELL_INIT(ARG) # ------------------- m4_define([_LT_SHELL_INIT], [m4_divert_text([M4SH-INIT], [$1 ])])# _LT_SHELL_INIT # _LT_PROG_ECHO_BACKSLASH # ----------------------- # Find how we can fake an echo command that does not interpret backslash. # In particular, with Autoconf 2.60 or later we add some code to the start # of the generated configure script which will find a shell with a builtin # printf (which we can use as an echo command). m4_defun([_LT_PROG_ECHO_BACKSLASH], [ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO AC_MSG_CHECKING([how to print strings]) # Test print first, because it will be a builtin if present. if test "X`( print -r -- -n ) 2>/dev/null`" = X-n && \ test "X`print -r -- $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='print -r --' elif test "X`printf %s $ECHO 2>/dev/null`" = "X$ECHO"; then ECHO='printf %s\n' else # Use this function as a fallback that always works. func_fallback_echo () { eval 'cat <<_LTECHO_EOF $[]1 _LTECHO_EOF' } ECHO='func_fallback_echo' fi # func_echo_all arg... # Invoke $ECHO with all args, space-separated. func_echo_all () { $ECHO "$*" } case "$ECHO" in printf*) AC_MSG_RESULT([printf]) ;; print*) AC_MSG_RESULT([print -r]) ;; *) AC_MSG_RESULT([cat]) ;; esac m4_ifdef([_AS_DETECT_SUGGESTED], [_AS_DETECT_SUGGESTED([ test -n "${ZSH_VERSION+set}${BASH_VERSION+set}" || ( ECHO='\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\' ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO ECHO=$ECHO$ECHO$ECHO$ECHO$ECHO$ECHO PATH=/empty FPATH=/empty; export PATH FPATH test "X`printf %s $ECHO`" = "X$ECHO" \ || test "X`print -r -- $ECHO`" = "X$ECHO" )])]) _LT_DECL([], [SHELL], [1], [Shell to use when invoking shell scripts]) _LT_DECL([], [ECHO], [1], [An echo program that protects backslashes]) ])# _LT_PROG_ECHO_BACKSLASH # _LT_WITH_SYSROOT # ---------------- AC_DEFUN([_LT_WITH_SYSROOT], [AC_MSG_CHECKING([for sysroot]) AC_ARG_WITH([sysroot], [ --with-sysroot[=DIR] Search for dependent libraries within DIR (or the compiler's sysroot if not specified).], [], [with_sysroot=no]) dnl lt_sysroot will always be passed unquoted. We quote it here dnl in case the user passed a directory name. lt_sysroot= case ${with_sysroot} in #( yes) if test "$GCC" = yes; then lt_sysroot=`$CC --print-sysroot 2>/dev/null` fi ;; #( /*) lt_sysroot=`echo "$with_sysroot" | sed -e "$sed_quote_subst"` ;; #( no|'') ;; #( *) AC_MSG_RESULT([${with_sysroot}]) AC_MSG_ERROR([The sysroot must be an absolute path.]) ;; esac AC_MSG_RESULT([${lt_sysroot:-no}]) _LT_DECL([], [lt_sysroot], [0], [The root where to search for ]dnl [dependent libraries, and in which our libraries should be installed.])]) # _LT_ENABLE_LOCK # --------------- m4_defun([_LT_ENABLE_LOCK], [AC_ARG_ENABLE([libtool-lock], [AS_HELP_STRING([--disable-libtool-lock], [avoid locking (might break parallel builds)])]) test "x$enable_libtool_lock" != xno && enable_libtool_lock=yes # Some flags need to be propagated to the compiler or linker for good # libtool support. case $host in ia64-*-hpux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.$ac_objext` in *ELF-32*) HPUX_IA64_MODE="32" ;; *ELF-64*) HPUX_IA64_MODE="64" ;; esac fi rm -rf conftest* ;; *-*-irix6*) # Find out which ABI we are using. echo '[#]line '$LINENO' "configure"' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then if test "$lt_cv_prog_gnu_ld" = yes; then case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -melf32bsmip" ;; *N32*) LD="${LD-ld} -melf32bmipn32" ;; *64-bit*) LD="${LD-ld} -melf64bmip" ;; esac else case `/usr/bin/file conftest.$ac_objext` in *32-bit*) LD="${LD-ld} -32" ;; *N32*) LD="${LD-ld} -n32" ;; *64-bit*) LD="${LD-ld} -64" ;; esac fi fi rm -rf conftest* ;; x86_64-*kfreebsd*-gnu|x86_64-*linux*|ppc*-*linux*|powerpc*-*linux*| \ s390*-*linux*|s390*-*tpf*|sparc*-*linux*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *32-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_i386_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_i386" ;; ppc64-*linux*|powerpc64-*linux*) LD="${LD-ld} -m elf32ppclinux" ;; s390x-*linux*) LD="${LD-ld} -m elf_s390" ;; sparc64-*linux*) LD="${LD-ld} -m elf32_sparc" ;; esac ;; *64-bit*) case $host in x86_64-*kfreebsd*-gnu) LD="${LD-ld} -m elf_x86_64_fbsd" ;; x86_64-*linux*) LD="${LD-ld} -m elf_x86_64" ;; ppc*-*linux*|powerpc*-*linux*) LD="${LD-ld} -m elf64ppc" ;; s390*-*linux*|s390*-*tpf*) LD="${LD-ld} -m elf64_s390" ;; sparc*-*linux*) LD="${LD-ld} -m elf64_sparc" ;; esac ;; esac fi rm -rf conftest* ;; *-*-sco3.2v5*) # On SCO OpenServer 5, we need -belf to get full-featured binaries. SAVE_CFLAGS="$CFLAGS" CFLAGS="$CFLAGS -belf" AC_CACHE_CHECK([whether the C compiler needs -belf], lt_cv_cc_needs_belf, [AC_LANG_PUSH(C) AC_LINK_IFELSE([AC_LANG_PROGRAM([[]],[[]])],[lt_cv_cc_needs_belf=yes],[lt_cv_cc_needs_belf=no]) AC_LANG_POP]) if test x"$lt_cv_cc_needs_belf" != x"yes"; then # this is probably gcc 2.8.0, egcs 1.0 or newer; no need for -belf CFLAGS="$SAVE_CFLAGS" fi ;; *-*solaris*) # Find out which ABI we are using. echo 'int i;' > conftest.$ac_ext if AC_TRY_EVAL(ac_compile); then case `/usr/bin/file conftest.o` in *64-bit*) case $lt_cv_prog_gnu_ld in yes*) case $host in i?86-*-solaris*) LD="${LD-ld} -m elf_x86_64" ;; sparc*-*-solaris*) LD="${LD-ld} -m elf64_sparc" ;; esac # GNU ld 2.21 introduced _sol2 emulations. Use them if available. if ${LD-ld} -V | grep _sol2 >/dev/null 2>&1; then LD="${LD-ld}_sol2" fi ;; *) if ${LD-ld} -64 -r -o conftest2.o conftest.o >/dev/null 2>&1; then LD="${LD-ld} -64" fi ;; esac ;; esac fi rm -rf conftest* ;; esac need_locks="$enable_libtool_lock" ])# _LT_ENABLE_LOCK # _LT_PROG_AR # ----------- m4_defun([_LT_PROG_AR], [AC_CHECK_TOOLS(AR, [ar], false) : ${AR=ar} : ${AR_FLAGS=cru} _LT_DECL([], [AR], [1], [The archiver]) _LT_DECL([], [AR_FLAGS], [1], [Flags to create an archive]) AC_CACHE_CHECK([for archiver @FILE support], [lt_cv_ar_at_file], [lt_cv_ar_at_file=no AC_COMPILE_IFELSE([AC_LANG_PROGRAM], [echo conftest.$ac_objext > conftest.lst lt_ar_try='$AR $AR_FLAGS libconftest.a @conftest.lst >&AS_MESSAGE_LOG_FD' AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -eq 0; then # Ensure the archiver fails upon bogus file names. rm -f conftest.$ac_objext libconftest.a AC_TRY_EVAL([lt_ar_try]) if test "$ac_status" -ne 0; then lt_cv_ar_at_file=@ fi fi rm -f conftest.* libconftest.a ]) ]) if test "x$lt_cv_ar_at_file" = xno; then archiver_list_spec= else archiver_list_spec=$lt_cv_ar_at_file fi _LT_DECL([], [archiver_list_spec], [1], [How to feed a file listing to the archiver]) ])# _LT_PROG_AR # _LT_CMD_OLD_ARCHIVE # ------------------- m4_defun([_LT_CMD_OLD_ARCHIVE], [_LT_PROG_AR AC_CHECK_TOOL(STRIP, strip, :) test -z "$STRIP" && STRIP=: _LT_DECL([], [STRIP], [1], [A symbol stripping program]) AC_CHECK_TOOL(RANLIB, ranlib, :) test -z "$RANLIB" && RANLIB=: _LT_DECL([], [RANLIB], [1], [Commands used to install an old-style archive]) # Determine commands to create old-style static archives. old_archive_cmds='$AR $AR_FLAGS $oldlib$oldobjs' old_postinstall_cmds='chmod 644 $oldlib' old_postuninstall_cmds= if test -n "$RANLIB"; then case $host_os in openbsd*) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB -t \$tool_oldlib" ;; *) old_postinstall_cmds="$old_postinstall_cmds~\$RANLIB \$tool_oldlib" ;; esac old_archive_cmds="$old_archive_cmds~\$RANLIB \$tool_oldlib" fi case $host_os in darwin*) lock_old_archive_extraction=yes ;; *) lock_old_archive_extraction=no ;; esac _LT_DECL([], [old_postinstall_cmds], [2]) _LT_DECL([], [old_postuninstall_cmds], [2]) _LT_TAGDECL([], [old_archive_cmds], [2], [Commands used to build an old-style archive]) _LT_DECL([], [lock_old_archive_extraction], [0], [Whether to use a lock for old archive extraction]) ])# _LT_CMD_OLD_ARCHIVE # _LT_COMPILER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [OUTPUT-FILE], [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------------------- # Check whether the given compiler option works AC_DEFUN([_LT_COMPILER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no m4_if([$4], , [ac_outfile=conftest.$ac_objext], [ac_outfile=$4]) echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="$3" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. # The option is referenced via a variable to avoid confusing sed. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' >conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if test ! -s conftest.er2 || diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi fi $RM conftest* ]) if test x"[$]$2" = xyes; then m4_if([$5], , :, [$5]) else m4_if([$6], , :, [$6]) fi ])# _LT_COMPILER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_COMPILER_OPTION], [_LT_COMPILER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_COMPILER_OPTION], []) # _LT_LINKER_OPTION(MESSAGE, VARIABLE-NAME, FLAGS, # [ACTION-SUCCESS], [ACTION-FAILURE]) # ---------------------------------------------------- # Check whether the given linker option works AC_DEFUN([_LT_LINKER_OPTION], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_SED])dnl AC_CACHE_CHECK([$1], [$2], [$2=no save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS $3" echo "$lt_simple_link_test_code" > conftest.$ac_ext if (eval $ac_link 2>conftest.err) && test -s conftest$ac_exeext; then # The linker can only warn and ignore the option if not recognized # So say no if there are warnings if test -s conftest.err; then # Append any errors to the config.log. cat conftest.err 1>&AS_MESSAGE_LOG_FD $ECHO "$_lt_linker_boilerplate" | $SED '/^$/d' > conftest.exp $SED '/^$/d; /^ *+/d' conftest.err >conftest.er2 if diff conftest.exp conftest.er2 >/dev/null; then $2=yes fi else $2=yes fi fi $RM -r conftest* LDFLAGS="$save_LDFLAGS" ]) if test x"[$]$2" = xyes; then m4_if([$4], , :, [$4]) else m4_if([$5], , :, [$5]) fi ])# _LT_LINKER_OPTION # Old name: AU_ALIAS([AC_LIBTOOL_LINKER_OPTION], [_LT_LINKER_OPTION]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_LINKER_OPTION], []) # LT_CMD_MAX_LEN #--------------- AC_DEFUN([LT_CMD_MAX_LEN], [AC_REQUIRE([AC_CANONICAL_HOST])dnl # find the maximum length of command line arguments AC_MSG_CHECKING([the maximum length of command line arguments]) AC_CACHE_VAL([lt_cv_sys_max_cmd_len], [dnl i=0 teststring="ABCD" case $build_os in msdosdjgpp*) # On DJGPP, this test can blow up pretty badly due to problems in libc # (any single argument exceeding 2000 bytes causes a buffer overrun # during glob expansion). Even if it were fixed, the result of this # check would be larger than it should be. lt_cv_sys_max_cmd_len=12288; # 12K is about right ;; gnu*) # Under GNU Hurd, this test is not required because there is # no limit to the length of command line arguments. # Libtool will interpret -1 as no limit whatsoever lt_cv_sys_max_cmd_len=-1; ;; cygwin* | mingw* | cegcc*) # On Win9x/ME, this test blows up -- it succeeds, but takes # about 5 minutes as the teststring grows exponentially. # Worse, since 9x/ME are not pre-emptively multitasking, # you end up with a "frozen" computer, even though with patience # the test eventually succeeds (with a max line length of 256k). # Instead, let's just punt: use the minimum linelength reported by # all of the supported platforms: 8192 (on NT/2K/XP). lt_cv_sys_max_cmd_len=8192; ;; mint*) # On MiNT this can take a long time and run out of memory. lt_cv_sys_max_cmd_len=8192; ;; amigaos*) # On AmigaOS with pdksh, this test takes hours, literally. # So we just punt and use a minimum line length of 8192. lt_cv_sys_max_cmd_len=8192; ;; netbsd* | freebsd* | openbsd* | darwin* | dragonfly*) # This has been around since 386BSD, at least. Likely further. if test -x /sbin/sysctl; then lt_cv_sys_max_cmd_len=`/sbin/sysctl -n kern.argmax` elif test -x /usr/sbin/sysctl; then lt_cv_sys_max_cmd_len=`/usr/sbin/sysctl -n kern.argmax` else lt_cv_sys_max_cmd_len=65536 # usable default for all BSDs fi # And add a safety zone lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` ;; interix*) # We know the value 262144 and hardcode it with a safety zone (like BSD) lt_cv_sys_max_cmd_len=196608 ;; os2*) # The test takes a long time on OS/2. lt_cv_sys_max_cmd_len=8192 ;; osf*) # Dr. Hans Ekkehard Plesser reports seeing a kernel panic running configure # due to this test when exec_disable_arg_limit is 1 on Tru64. It is not # nice to cause kernel panics so lets avoid the loop below. # First set a reasonable default. lt_cv_sys_max_cmd_len=16384 # if test -x /sbin/sysconfig; then case `/sbin/sysconfig -q proc exec_disable_arg_limit` in *1*) lt_cv_sys_max_cmd_len=-1 ;; esac fi ;; sco3.2v5*) lt_cv_sys_max_cmd_len=102400 ;; sysv5* | sco5v6* | sysv4.2uw2*) kargmax=`grep ARG_MAX /etc/conf/cf.d/stune 2>/dev/null` if test -n "$kargmax"; then lt_cv_sys_max_cmd_len=`echo $kargmax | sed 's/.*[[ ]]//'` else lt_cv_sys_max_cmd_len=32768 fi ;; *) lt_cv_sys_max_cmd_len=`(getconf ARG_MAX) 2> /dev/null` if test -n "$lt_cv_sys_max_cmd_len"; then lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 4` lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \* 3` else # Make teststring a little bigger before we do anything with it. # a 1K string should be a reasonable start. for i in 1 2 3 4 5 6 7 8 ; do teststring=$teststring$teststring done SHELL=${SHELL-${CONFIG_SHELL-/bin/sh}} # If test is not a shell built-in, we'll probably end up computing a # maximum length that is only half of the actual maximum length, but # we can't tell. while { test "X"`env echo "$teststring$teststring" 2>/dev/null` \ = "X$teststring$teststring"; } >/dev/null 2>&1 && test $i != 17 # 1/2 MB should be enough do i=`expr $i + 1` teststring=$teststring$teststring done # Only check the string length outside the loop. lt_cv_sys_max_cmd_len=`expr "X$teststring" : ".*" 2>&1` teststring= # Add a significant safety factor because C++ compilers can tack on # massive amounts of additional arguments before passing them to the # linker. It appears as though 1/2 is a usable value. lt_cv_sys_max_cmd_len=`expr $lt_cv_sys_max_cmd_len \/ 2` fi ;; esac ]) if test -n $lt_cv_sys_max_cmd_len ; then AC_MSG_RESULT($lt_cv_sys_max_cmd_len) else AC_MSG_RESULT(none) fi max_cmd_len=$lt_cv_sys_max_cmd_len _LT_DECL([], [max_cmd_len], [0], [What is the maximum length of a command?]) ])# LT_CMD_MAX_LEN # Old name: AU_ALIAS([AC_LIBTOOL_SYS_MAX_CMD_LEN], [LT_CMD_MAX_LEN]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_SYS_MAX_CMD_LEN], []) # _LT_HEADER_DLFCN # ---------------- m4_defun([_LT_HEADER_DLFCN], [AC_CHECK_HEADERS([dlfcn.h], [], [], [AC_INCLUDES_DEFAULT])dnl ])# _LT_HEADER_DLFCN # _LT_TRY_DLOPEN_SELF (ACTION-IF-TRUE, ACTION-IF-TRUE-W-USCORE, # ACTION-IF-FALSE, ACTION-IF-CROSS-COMPILING) # ---------------------------------------------------------------- m4_defun([_LT_TRY_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "$cross_compiling" = yes; then : [$4] else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF [#line $LINENO "configure" #include "confdefs.h" #if HAVE_DLFCN_H #include #endif #include #ifdef RTLD_GLOBAL # define LT_DLGLOBAL RTLD_GLOBAL #else # ifdef DL_GLOBAL # define LT_DLGLOBAL DL_GLOBAL # else # define LT_DLGLOBAL 0 # endif #endif /* We may have to define LT_DLLAZY_OR_NOW in the command line if we find out it does not work in some platform. */ #ifndef LT_DLLAZY_OR_NOW # ifdef RTLD_LAZY # define LT_DLLAZY_OR_NOW RTLD_LAZY # else # ifdef DL_LAZY # define LT_DLLAZY_OR_NOW DL_LAZY # else # ifdef RTLD_NOW # define LT_DLLAZY_OR_NOW RTLD_NOW # else # ifdef DL_NOW # define LT_DLLAZY_OR_NOW DL_NOW # else # define LT_DLLAZY_OR_NOW 0 # endif # endif # endif # endif #endif /* When -fvisbility=hidden is used, assume the code has been annotated correspondingly for the symbols needed. */ #if defined(__GNUC__) && (((__GNUC__ == 3) && (__GNUC_MINOR__ >= 3)) || (__GNUC__ > 3)) int fnord () __attribute__((visibility("default"))); #endif int fnord () { return 42; } int main () { void *self = dlopen (0, LT_DLGLOBAL|LT_DLLAZY_OR_NOW); int status = $lt_dlunknown; if (self) { if (dlsym (self,"fnord")) status = $lt_dlno_uscore; else { if (dlsym( self,"_fnord")) status = $lt_dlneed_uscore; else puts (dlerror ()); } /* dlclose (self); */ } else puts (dlerror ()); return status; }] _LT_EOF if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext} 2>/dev/null; then (./conftest; exit; ) >&AS_MESSAGE_LOG_FD 2>/dev/null lt_status=$? case x$lt_status in x$lt_dlno_uscore) $1 ;; x$lt_dlneed_uscore) $2 ;; x$lt_dlunknown|x*) $3 ;; esac else : # compilation failed $3 fi fi rm -fr conftest* ])# _LT_TRY_DLOPEN_SELF # LT_SYS_DLOPEN_SELF # ------------------ AC_DEFUN([LT_SYS_DLOPEN_SELF], [m4_require([_LT_HEADER_DLFCN])dnl if test "x$enable_dlopen" != xyes; then enable_dlopen=unknown enable_dlopen_self=unknown enable_dlopen_self_static=unknown else lt_cv_dlopen=no lt_cv_dlopen_libs= case $host_os in beos*) lt_cv_dlopen="load_add_on" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ;; mingw* | pw32* | cegcc*) lt_cv_dlopen="LoadLibrary" lt_cv_dlopen_libs= ;; cygwin*) lt_cv_dlopen="dlopen" lt_cv_dlopen_libs= ;; darwin*) # if libdl is installed we need to link against it AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"],[ lt_cv_dlopen="dyld" lt_cv_dlopen_libs= lt_cv_dlopen_self=yes ]) ;; *) AC_CHECK_FUNC([shl_load], [lt_cv_dlopen="shl_load"], [AC_CHECK_LIB([dld], [shl_load], [lt_cv_dlopen="shl_load" lt_cv_dlopen_libs="-ldld"], [AC_CHECK_FUNC([dlopen], [lt_cv_dlopen="dlopen"], [AC_CHECK_LIB([dl], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-ldl"], [AC_CHECK_LIB([svld], [dlopen], [lt_cv_dlopen="dlopen" lt_cv_dlopen_libs="-lsvld"], [AC_CHECK_LIB([dld], [dld_link], [lt_cv_dlopen="dld_link" lt_cv_dlopen_libs="-ldld"]) ]) ]) ]) ]) ]) ;; esac if test "x$lt_cv_dlopen" != xno; then enable_dlopen=yes else enable_dlopen=no fi case $lt_cv_dlopen in dlopen) save_CPPFLAGS="$CPPFLAGS" test "x$ac_cv_header_dlfcn_h" = xyes && CPPFLAGS="$CPPFLAGS -DHAVE_DLFCN_H" save_LDFLAGS="$LDFLAGS" wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $export_dynamic_flag_spec\" save_LIBS="$LIBS" LIBS="$lt_cv_dlopen_libs $LIBS" AC_CACHE_CHECK([whether a program can dlopen itself], lt_cv_dlopen_self, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self=yes, lt_cv_dlopen_self=yes, lt_cv_dlopen_self=no, lt_cv_dlopen_self=cross) ]) if test "x$lt_cv_dlopen_self" = xyes; then wl=$lt_prog_compiler_wl eval LDFLAGS=\"\$LDFLAGS $lt_prog_compiler_static\" AC_CACHE_CHECK([whether a statically linked program can dlopen itself], lt_cv_dlopen_self_static, [dnl _LT_TRY_DLOPEN_SELF( lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=yes, lt_cv_dlopen_self_static=no, lt_cv_dlopen_self_static=cross) ]) fi CPPFLAGS="$save_CPPFLAGS" LDFLAGS="$save_LDFLAGS" LIBS="$save_LIBS" ;; esac case $lt_cv_dlopen_self in yes|no) enable_dlopen_self=$lt_cv_dlopen_self ;; *) enable_dlopen_self=unknown ;; esac case $lt_cv_dlopen_self_static in yes|no) enable_dlopen_self_static=$lt_cv_dlopen_self_static ;; *) enable_dlopen_self_static=unknown ;; esac fi _LT_DECL([dlopen_support], [enable_dlopen], [0], [Whether dlopen is supported]) _LT_DECL([dlopen_self], [enable_dlopen_self], [0], [Whether dlopen of programs is supported]) _LT_DECL([dlopen_self_static], [enable_dlopen_self_static], [0], [Whether dlopen of statically linked programs is supported]) ])# LT_SYS_DLOPEN_SELF # Old name: AU_ALIAS([AC_LIBTOOL_DLOPEN_SELF], [LT_SYS_DLOPEN_SELF]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN_SELF], []) # _LT_COMPILER_C_O([TAGNAME]) # --------------------------- # Check to see if options -c and -o are simultaneously supported by compiler. # This macro does not hard code the compiler like AC_PROG_CC_C_O. m4_defun([_LT_COMPILER_C_O], [m4_require([_LT_DECL_SED])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_CACHE_CHECK([if $compiler supports -c -o file.$ac_objext], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=no $RM -r conftest 2>/dev/null mkdir conftest cd conftest mkdir out echo "$lt_simple_compile_test_code" > conftest.$ac_ext lt_compiler_flag="-o out/conftest2.$ac_objext" # Insert the option either (1) after the last *FLAGS variable, or # (2) before a word containing "conftest.", or (3) at the end. # Note that $ac_compile itself does not contain backslashes and begins # with a dollar sign (not a hyphen), so the echo should work correctly. lt_compile=`echo "$ac_compile" | $SED \ -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [[^ ]]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` (eval echo "\"\$as_me:$LINENO: $lt_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&AS_MESSAGE_LOG_FD echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings $ECHO "$_lt_compiler_boilerplate" | $SED '/^$/d' > out/conftest.exp $SED '/^$/d; /^ *+/d' out/conftest.err >out/conftest.er2 if test ! -s out/conftest.er2 || diff out/conftest.exp out/conftest.er2 >/dev/null; then _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes fi fi chmod u+w . 2>&AS_MESSAGE_LOG_FD $RM conftest* # SGI C++ compiler will create directory out/ii_files/ for # template instantiation test -d out/ii_files && $RM out/ii_files/* && rmdir out/ii_files $RM out/* && rmdir out cd .. $RM -r conftest $RM conftest* ]) _LT_TAGDECL([compiler_c_o], [lt_cv_prog_compiler_c_o], [1], [Does compiler simultaneously support -c and -o options?]) ])# _LT_COMPILER_C_O # _LT_COMPILER_FILE_LOCKS([TAGNAME]) # ---------------------------------- # Check to see if we can do hard links to lock some files if needed m4_defun([_LT_COMPILER_FILE_LOCKS], [m4_require([_LT_ENABLE_LOCK])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl _LT_COMPILER_C_O([$1]) hard_links="nottested" if test "$_LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)" = no && test "$need_locks" != no; then # do not overwrite the value of need_locks provided by the user AC_MSG_CHECKING([if we can lock with hard links]) hard_links=yes $RM conftest* ln conftest.a conftest.b 2>/dev/null && hard_links=no touch conftest.a ln conftest.a conftest.b 2>&5 || hard_links=no ln conftest.a conftest.b 2>/dev/null && hard_links=no AC_MSG_RESULT([$hard_links]) if test "$hard_links" = no; then AC_MSG_WARN([`$CC' does not support `-c -o', so `make -j' may be unsafe]) need_locks=warn fi else need_locks=no fi _LT_DECL([], [need_locks], [1], [Must we lock files when doing compilation?]) ])# _LT_COMPILER_FILE_LOCKS # _LT_CHECK_OBJDIR # ---------------- m4_defun([_LT_CHECK_OBJDIR], [AC_CACHE_CHECK([for objdir], [lt_cv_objdir], [rm -f .libs 2>/dev/null mkdir .libs 2>/dev/null if test -d .libs; then lt_cv_objdir=.libs else # MS-DOS does not allow filenames that begin with a dot. lt_cv_objdir=_libs fi rmdir .libs 2>/dev/null]) objdir=$lt_cv_objdir _LT_DECL([], [objdir], [0], [The name of the directory that contains temporary libtool files])dnl m4_pattern_allow([LT_OBJDIR])dnl AC_DEFINE_UNQUOTED(LT_OBJDIR, "$lt_cv_objdir/", [Define to the sub-directory in which libtool stores uninstalled libraries.]) ])# _LT_CHECK_OBJDIR # _LT_LINKER_HARDCODE_LIBPATH([TAGNAME]) # -------------------------------------- # Check hardcoding attributes. m4_defun([_LT_LINKER_HARDCODE_LIBPATH], [AC_MSG_CHECKING([how to hardcode library paths into programs]) _LT_TAGVAR(hardcode_action, $1)= if test -n "$_LT_TAGVAR(hardcode_libdir_flag_spec, $1)" || test -n "$_LT_TAGVAR(runpath_var, $1)" || test "X$_LT_TAGVAR(hardcode_automatic, $1)" = "Xyes" ; then # We can hardcode non-existent directories. if test "$_LT_TAGVAR(hardcode_direct, $1)" != no && # If the only mechanism to avoid hardcoding is shlibpath_var, we # have to relink, otherwise we might link with an installed library # when we should be linking with a yet-to-be-installed one ## test "$_LT_TAGVAR(hardcode_shlibpath_var, $1)" != no && test "$_LT_TAGVAR(hardcode_minus_L, $1)" != no; then # Linking always hardcodes the temporary library directory. _LT_TAGVAR(hardcode_action, $1)=relink else # We can link without hardcoding, and we can hardcode nonexisting dirs. _LT_TAGVAR(hardcode_action, $1)=immediate fi else # We cannot hardcode anything, or else we can only hardcode existing # directories. _LT_TAGVAR(hardcode_action, $1)=unsupported fi AC_MSG_RESULT([$_LT_TAGVAR(hardcode_action, $1)]) if test "$_LT_TAGVAR(hardcode_action, $1)" = relink || test "$_LT_TAGVAR(inherit_rpath, $1)" = yes; then # Fast installation is not supported enable_fast_install=no elif test "$shlibpath_overrides_runpath" = yes || test "$enable_shared" = no; then # Fast installation is not necessary enable_fast_install=needless fi _LT_TAGDECL([], [hardcode_action], [0], [How to hardcode a shared library path into an executable]) ])# _LT_LINKER_HARDCODE_LIBPATH # _LT_CMD_STRIPLIB # ---------------- m4_defun([_LT_CMD_STRIPLIB], [m4_require([_LT_DECL_EGREP]) striplib= old_striplib= AC_MSG_CHECKING([whether stripping libraries is possible]) if test -n "$STRIP" && $STRIP -V 2>&1 | $GREP "GNU strip" >/dev/null; then test -z "$old_striplib" && old_striplib="$STRIP --strip-debug" test -z "$striplib" && striplib="$STRIP --strip-unneeded" AC_MSG_RESULT([yes]) else # FIXME - insert some real tests, host_os isn't really good enough case $host_os in darwin*) if test -n "$STRIP" ; then striplib="$STRIP -x" old_striplib="$STRIP -S" AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) fi ;; *) AC_MSG_RESULT([no]) ;; esac fi _LT_DECL([], [old_striplib], [1], [Commands to strip libraries]) _LT_DECL([], [striplib], [1]) ])# _LT_CMD_STRIPLIB # _LT_SYS_DYNAMIC_LINKER([TAG]) # ----------------------------- # PORTME Fill in your ld.so characteristics m4_defun([_LT_SYS_DYNAMIC_LINKER], [AC_REQUIRE([AC_CANONICAL_HOST])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_OBJDUMP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CHECK_SHELL_FEATURES])dnl AC_MSG_CHECKING([dynamic linker characteristics]) m4_if([$1], [], [ if test "$GCC" = yes; then case $host_os in darwin*) lt_awk_arg="/^libraries:/,/LR/" ;; *) lt_awk_arg="/^libraries:/" ;; esac case $host_os in mingw* | cegcc*) lt_sed_strip_eq="s,=\([[A-Za-z]]:\),\1,g" ;; *) lt_sed_strip_eq="s,=/,/,g" ;; esac lt_search_path_spec=`$CC -print-search-dirs | awk $lt_awk_arg | $SED -e "s/^libraries://" -e $lt_sed_strip_eq` case $lt_search_path_spec in *\;*) # if the path contains ";" then we assume it to be the separator # otherwise default to the standard path separator (i.e. ":") - it is # assumed that no part of a normal pathname contains ";" but that should # okay in the real world where ";" in dirpaths is itself problematic. lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED 's/;/ /g'` ;; *) lt_search_path_spec=`$ECHO "$lt_search_path_spec" | $SED "s/$PATH_SEPARATOR/ /g"` ;; esac # Ok, now we have the path, separated by spaces, we can step through it # and add multilib dir if necessary. lt_tmp_lt_search_path_spec= lt_multi_os_dir=`$CC $CPPFLAGS $CFLAGS $LDFLAGS -print-multi-os-directory 2>/dev/null` for lt_sys_path in $lt_search_path_spec; do if test -d "$lt_sys_path/$lt_multi_os_dir"; then lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path/$lt_multi_os_dir" else test -d "$lt_sys_path" && \ lt_tmp_lt_search_path_spec="$lt_tmp_lt_search_path_spec $lt_sys_path" fi done lt_search_path_spec=`$ECHO "$lt_tmp_lt_search_path_spec" | awk ' BEGIN {RS=" "; FS="/|\n";} { lt_foo=""; lt_count=0; for (lt_i = NF; lt_i > 0; lt_i--) { if ($lt_i != "" && $lt_i != ".") { if ($lt_i == "..") { lt_count++; } else { if (lt_count == 0) { lt_foo="/" $lt_i lt_foo; } else { lt_count--; } } } } if (lt_foo != "") { lt_freq[[lt_foo]]++; } if (lt_freq[[lt_foo]] == 1) { print lt_foo; } }'` # AWK program above erroneously prepends '/' to C:/dos/paths # for these hosts. case $host_os in mingw* | cegcc*) lt_search_path_spec=`$ECHO "$lt_search_path_spec" |\ $SED 's,/\([[A-Za-z]]:\),\1,g'` ;; esac sys_lib_search_path_spec=`$ECHO "$lt_search_path_spec" | $lt_NL2SP` else sys_lib_search_path_spec="/lib /usr/lib /usr/local/lib" fi]) library_names_spec= libname_spec='lib$name' soname_spec= shrext_cmds=".so" postinstall_cmds= postuninstall_cmds= finish_cmds= finish_eval= shlibpath_var= shlibpath_overrides_runpath=unknown version_type=none dynamic_linker="$host_os ld.so" sys_lib_dlsearch_path_spec="/lib /usr/lib" need_lib_prefix=unknown hardcode_into_libs=no # when you set need_version to no, make sure it does not cause -set_version # flags to be left without arguments need_version=unknown case $host_os in aix3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix $libname.a' shlibpath_var=LIBPATH # AIX 3 has no versioning support, so we append a major version to the name. soname_spec='${libname}${release}${shared_ext}$major' ;; aix[[4-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no hardcode_into_libs=yes if test "$host_cpu" = ia64; then # AIX 5 supports IA64 library_names_spec='${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext}$versuffix $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH else # With GCC up to 2.95.x, collect2 would create an import file # for dependence libraries. The import file would start with # the line `#! .'. This would cause the generated library to # depend on `.', always an invalid library. This was fixed in # development snapshots of GCC prior to 3.0. case $host_os in aix4 | aix4.[[01]] | aix4.[[01]].*) if { echo '#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ >= 97)' echo ' yes ' echo '#endif'; } | ${CC} -E - | $GREP yes > /dev/null; then : else can_build_shared=no fi ;; esac # AIX (on Power*) has no versioning support, so currently we can not hardcode correct # soname into executable. Probably we can add versioning support to # collect2, so additional links can be useful in future. if test "$aix_use_runtimelinking" = yes; then # If using run time linking (on AIX 4.2 or later) use lib.so # instead of lib.a to let people know that these are not # typical AIX shared libraries. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' else # We preserve .a as extension for shared libraries through AIX4.2 # and later when we are not doing run time linking. library_names_spec='${libname}${release}.a $libname.a' soname_spec='${libname}${release}${shared_ext}$major' fi shlibpath_var=LIBPATH fi ;; amigaos*) case $host_cpu in powerpc) # Since July 2007 AmigaOS4 officially supports .so libraries. # When compiling the executable, add -use-dynld -Lsobjs: to the compileline. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' ;; m68k) library_names_spec='$libname.ixlibrary $libname.a' # Create ${libname}_ixlibrary.a entries in /sys/libs. finish_eval='for lib in `ls $libdir/*.ixlibrary 2>/dev/null`; do libname=`func_echo_all "$lib" | $SED '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM /sys/libs/${libname}_ixlibrary.a; $show "cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a"; cd /sys/libs && $LN_S $lib ${libname}_ixlibrary.a || exit 1; done' ;; esac ;; beos*) library_names_spec='${libname}${shared_ext}' dynamic_linker="$host_os ld.so" shlibpath_var=LIBRARY_PATH ;; bsdi[[45]]*) version_type=linux # correct to gnu/linux during the next big refactor need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/shlib /usr/lib /usr/X11/lib /usr/contrib/lib /lib /usr/local/lib" sys_lib_dlsearch_path_spec="/shlib /usr/lib /usr/local/lib" # the default ld.so.conf also contains /usr/contrib/lib and # /usr/X11R6/lib (/usr/X11 is a link to /usr/X11R6), but let us allow # libtool to hard-code these into programs ;; cygwin* | mingw* | pw32* | cegcc*) version_type=windows shrext_cmds=".dll" need_version=no need_lib_prefix=no case $GCC,$cc_basename in yes,*) # gcc library_names_spec='$libname.dll.a' # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname~ chmod a+x \$dldir/$dlname~ if test -n '\''$stripme'\'' && test -n '\''$striplib'\''; then eval '\''$striplib \$dldir/$dlname'\'' || exit \$?; fi' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes case $host_os in cygwin*) # Cygwin DLLs use 'cyg' prefix rather than 'lib' soname_spec='`echo ${libname} | sed -e 's/^lib/cyg/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"]) ;; mingw* | cegcc*) # MinGW DLLs use traditional 'lib' prefix soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; pw32*) # pw32 DLLs use 'pw' prefix rather than 'lib' library_names_spec='`echo ${libname} | sed -e 's/^lib/pw/'``echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' ;; esac dynamic_linker='Win32 ld.exe' ;; *,cl*) # Native MSVC libname_spec='$name' soname_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext}' library_names_spec='${libname}.dll.lib' case $build_os in mingw*) sys_lib_search_path_spec= lt_save_ifs=$IFS IFS=';' for lt_path in $LIB do IFS=$lt_save_ifs # Let DOS variable expansion print the short 8.3 style file name. lt_path=`cd "$lt_path" 2>/dev/null && cmd //C "for %i in (".") do @echo %~si"` sys_lib_search_path_spec="$sys_lib_search_path_spec $lt_path" done IFS=$lt_save_ifs # Convert to MSYS style. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | sed -e 's|\\\\|/|g' -e 's| \\([[a-zA-Z]]\\):| /\\1|g' -e 's|^ ||'` ;; cygwin*) # Convert to unix form, then to dos form, then back to unix form # but this time dos style (no spaces!) so that the unix form looks # like /cygdrive/c/PROGRA~1:/cygdr... sys_lib_search_path_spec=`cygpath --path --unix "$LIB"` sys_lib_search_path_spec=`cygpath --path --dos "$sys_lib_search_path_spec" 2>/dev/null` sys_lib_search_path_spec=`cygpath --path --unix "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` ;; *) sys_lib_search_path_spec="$LIB" if $ECHO "$sys_lib_search_path_spec" | [$GREP ';[c-zC-Z]:/' >/dev/null]; then # It is most probably a Windows format PATH. sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e 's/;/ /g'` else sys_lib_search_path_spec=`$ECHO "$sys_lib_search_path_spec" | $SED -e "s/$PATH_SEPARATOR/ /g"` fi # FIXME: find the short name or the path components, as spaces are # common. (e.g. "Program Files" -> "PROGRA~1") ;; esac # DLL is installed to $(libdir)/../bin by postinstall_cmds postinstall_cmds='base_file=`basename \${file}`~ dlpath=`$SHELL 2>&1 -c '\''. $dir/'\''\${base_file}'\''i; echo \$dlname'\''`~ dldir=$destdir/`dirname \$dlpath`~ test -d \$dldir || mkdir -p \$dldir~ $install_prog $dir/$dlname \$dldir/$dlname' postuninstall_cmds='dldll=`$SHELL 2>&1 -c '\''. $file; echo \$dlname'\''`~ dlpath=$dir/\$dldll~ $RM \$dlpath' shlibpath_overrides_runpath=yes dynamic_linker='Win32 link.exe' ;; *) # Assume MSVC wrapper library_names_spec='${libname}`echo ${release} | $SED -e 's/[[.]]/-/g'`${versuffix}${shared_ext} $libname.lib' dynamic_linker='Win32 ld.exe' ;; esac # FIXME: first we should search . and the directory the executable is in shlibpath_var=PATH ;; darwin* | rhapsody*) dynamic_linker="$host_os dyld" version_type=darwin need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${major}$shared_ext ${libname}$shared_ext' soname_spec='${libname}${release}${major}$shared_ext' shlibpath_overrides_runpath=yes shlibpath_var=DYLD_LIBRARY_PATH shrext_cmds='`test .$module = .yes && echo .so || echo .dylib`' m4_if([$1], [],[ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/local/lib"]) sys_lib_dlsearch_path_spec='/usr/local/lib /lib /usr/lib' ;; dgux*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname$shared_ext' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; freebsd* | dragonfly*) # DragonFly does not have aout. When/if they implement a new # versioning mechanism, adjust this. if test -x /usr/bin/objformat; then objformat=`/usr/bin/objformat` else case $host_os in freebsd[[23]].*) objformat=aout ;; *) objformat=elf ;; esac fi version_type=freebsd-$objformat case $version_type in freebsd-elf*) library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' need_version=no need_lib_prefix=no ;; freebsd-*) library_names_spec='${libname}${release}${shared_ext}$versuffix $libname${shared_ext}$versuffix' need_version=yes ;; esac shlibpath_var=LD_LIBRARY_PATH case $host_os in freebsd2.*) shlibpath_overrides_runpath=yes ;; freebsd3.[[01]]* | freebsdelf3.[[01]]*) shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; freebsd3.[[2-9]]* | freebsdelf3.[[2-9]]* | \ freebsd4.[[0-5]] | freebsdelf4.[[0-5]] | freebsd4.1.1 | freebsdelf4.1.1) shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; *) # from 4.6 on, and DragonFly shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; esac ;; gnu*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; haiku*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no dynamic_linker="$host_os runtime_loader" library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}${major} ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LIBRARY_PATH shlibpath_overrides_runpath=yes sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib' hardcode_into_libs=yes ;; hpux9* | hpux10* | hpux11*) # Give a soname corresponding to the major version so that dld.sl refuses to # link against other versions. version_type=sunos need_lib_prefix=no need_version=no case $host_cpu in ia64*) shrext_cmds='.so' hardcode_into_libs=yes dynamic_linker="$host_os dld.so" shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' if test "X$HPUX_IA64_MODE" = X32; then sys_lib_search_path_spec="/usr/lib/hpux32 /usr/local/lib/hpux32 /usr/local/lib" else sys_lib_search_path_spec="/usr/lib/hpux64 /usr/local/lib/hpux64" fi sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; hppa*64*) shrext_cmds='.sl' hardcode_into_libs=yes dynamic_linker="$host_os dld.sl" shlibpath_var=LD_LIBRARY_PATH # How should we handle SHLIB_PATH shlibpath_overrides_runpath=yes # Unless +noenvvar is specified. library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' sys_lib_search_path_spec="/usr/lib/pa20_64 /usr/ccs/lib/pa20_64" sys_lib_dlsearch_path_spec=$sys_lib_search_path_spec ;; *) shrext_cmds='.sl' dynamic_linker="$host_os dld.sl" shlibpath_var=SHLIB_PATH shlibpath_overrides_runpath=no # +s is required to enable SHLIB_PATH library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' ;; esac # HP-UX runs *really* slowly unless shared libraries are mode 555, ... postinstall_cmds='chmod 555 $lib' # or fails outright, so override atomically: install_override_mode=555 ;; interix[[3-9]]*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='Interix 3.x ld.so.1 (PE, like ELF)' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; irix5* | irix6* | nonstopux*) case $host_os in nonstopux*) version_type=nonstopux ;; *) if test "$lt_cv_prog_gnu_ld" = yes; then version_type=linux # correct to gnu/linux during the next big refactor else version_type=irix fi ;; esac need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${release}${shared_ext} $libname${shared_ext}' case $host_os in irix5* | nonstopux*) libsuff= shlibsuff= ;; *) case $LD in # libtool.m4 will add one of these switches to LD *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= libmagic=32-bit;; *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 libmagic=N32;; *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 libmagic=64-bit;; *) libsuff= shlibsuff= libmagic=never-match;; esac ;; esac shlibpath_var=LD_LIBRARY${shlibsuff}_PATH shlibpath_overrides_runpath=no sys_lib_search_path_spec="/usr/lib${libsuff} /lib${libsuff} /usr/local/lib${libsuff}" sys_lib_dlsearch_path_spec="/usr/lib${libsuff} /lib${libsuff}" hardcode_into_libs=yes ;; # No shared lib support for Linux oldld, aout, or coff. linux*oldld* | linux*aout* | linux*coff*) dynamic_linker=no ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' finish_cmds='PATH="\$PATH:/sbin" ldconfig -n $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no # Some binutils ld are patched to set DT_RUNPATH AC_CACHE_VAL([lt_cv_shlibpath_overrides_runpath], [lt_cv_shlibpath_overrides_runpath=no save_LDFLAGS=$LDFLAGS save_libdir=$libdir eval "libdir=/foo; wl=\"$_LT_TAGVAR(lt_prog_compiler_wl, $1)\"; \ LDFLAGS=\"\$LDFLAGS $_LT_TAGVAR(hardcode_libdir_flag_spec, $1)\"" AC_LINK_IFELSE([AC_LANG_PROGRAM([],[])], [AS_IF([ ($OBJDUMP -p conftest$ac_exeext) 2>/dev/null | grep "RUNPATH.*$libdir" >/dev/null], [lt_cv_shlibpath_overrides_runpath=yes])]) LDFLAGS=$save_LDFLAGS libdir=$save_libdir ]) shlibpath_overrides_runpath=$lt_cv_shlibpath_overrides_runpath # This implies no fast_install, which is unacceptable. # Some rework will be needed to allow for fast_install # before this can be enabled. hardcode_into_libs=yes # Add ABI-specific directories to the system library path. sys_lib_dlsearch_path_spec="/lib64 /usr/lib64 /lib /usr/lib" # Append ld.so.conf contents to the search path if test -f /etc/ld.so.conf; then lt_ld_extra=`awk '/^include / { system(sprintf("cd /etc; cat %s 2>/dev/null", \[$]2)); skip = 1; } { if (!skip) print \[$]0; skip = 0; }' < /etc/ld.so.conf | $SED -e 's/#.*//;/^[ ]*hwcap[ ]/d;s/[:, ]/ /g;s/=[^=]*$//;s/=[^= ]* / /g;s/"//g;/^$/d' | tr '\n' ' '` sys_lib_dlsearch_path_spec="$sys_lib_dlsearch_path_spec $lt_ld_extra" fi # We used to test for /lib/ld.so.1 and disable shared libraries on # powerpc, because MkLinux only supported shared libraries with the # GNU dynamic linker. Since this was broken with cross compilers, # most powerpc-linux boxes support dynamic linking these days and # people can always --disable-shared, the test was removed, and we # assume the GNU/Linux dynamic linker is in use. dynamic_linker='GNU/Linux ld.so' ;; netbsd*) version_type=sunos need_lib_prefix=no need_version=no if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' dynamic_linker='NetBSD (a.out) ld.so' else library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major ${libname}${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' dynamic_linker='NetBSD ld.elf_so' fi shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes ;; newsos6) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes ;; *nto* | *qnx*) version_type=qnx need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes dynamic_linker='ldqnx.so' ;; openbsd*) version_type=sunos sys_lib_dlsearch_path_spec="/usr/lib" need_lib_prefix=no # Some older versions of OpenBSD (3.3 at least) *do* need versioned libs. case $host_os in openbsd3.3 | openbsd3.3.*) need_version=yes ;; *) need_version=no ;; esac library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/sbin" ldconfig -m $libdir' shlibpath_var=LD_LIBRARY_PATH if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then case $host_os in openbsd2.[[89]] | openbsd2.[[89]].*) shlibpath_overrides_runpath=no ;; *) shlibpath_overrides_runpath=yes ;; esac else shlibpath_overrides_runpath=yes fi ;; os2*) libname_spec='$name' shrext_cmds=".dll" need_lib_prefix=no library_names_spec='$libname${shared_ext} $libname.a' dynamic_linker='OS/2 ld.exe' shlibpath_var=LIBPATH ;; osf3* | osf4* | osf5*) version_type=osf need_lib_prefix=no need_version=no soname_spec='${libname}${release}${shared_ext}$major' library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH sys_lib_search_path_spec="/usr/shlib /usr/ccs/lib /usr/lib/cmplrs/cc /usr/lib /usr/local/lib /var/shlib" sys_lib_dlsearch_path_spec="$sys_lib_search_path_spec" ;; rdos*) dynamic_linker=no ;; solaris*) version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes # ldd complains unless libraries are executable postinstall_cmds='chmod +x $lib' ;; sunos4*) version_type=sunos library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${shared_ext}$versuffix' finish_cmds='PATH="\$PATH:/usr/etc" ldconfig $libdir' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes if test "$with_gnu_ld" = yes; then need_lib_prefix=no fi need_version=yes ;; sysv4 | sysv4.3*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH case $host_vendor in sni) shlibpath_overrides_runpath=no need_lib_prefix=no runpath_var=LD_RUN_PATH ;; siemens) need_lib_prefix=no ;; motorola) need_lib_prefix=no need_version=no shlibpath_overrides_runpath=no sys_lib_search_path_spec='/lib /usr/lib /usr/ccs/lib' ;; esac ;; sysv4*MP*) if test -d /usr/nec ;then version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='$libname${shared_ext}.$versuffix $libname${shared_ext}.$major $libname${shared_ext}' soname_spec='$libname${shared_ext}.$major' shlibpath_var=LD_LIBRARY_PATH fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) version_type=freebsd-elf need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext} $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=yes hardcode_into_libs=yes if test "$with_gnu_ld" = yes; then sys_lib_search_path_spec='/usr/local/lib /usr/gnu/lib /usr/ccs/lib /usr/lib /lib' else sys_lib_search_path_spec='/usr/ccs/lib /usr/lib' case $host_os in sco3.2v5*) sys_lib_search_path_spec="$sys_lib_search_path_spec /lib" ;; esac fi sys_lib_dlsearch_path_spec='/usr/lib' ;; tpf*) # TPF is a cross-target only. Preferred cross-host = GNU/Linux. version_type=linux # correct to gnu/linux during the next big refactor need_lib_prefix=no need_version=no library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' shlibpath_var=LD_LIBRARY_PATH shlibpath_overrides_runpath=no hardcode_into_libs=yes ;; uts4*) version_type=linux # correct to gnu/linux during the next big refactor library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}' soname_spec='${libname}${release}${shared_ext}$major' shlibpath_var=LD_LIBRARY_PATH ;; *) dynamic_linker=no ;; esac AC_MSG_RESULT([$dynamic_linker]) test "$dynamic_linker" = no && can_build_shared=no variables_saved_for_relink="PATH $shlibpath_var $runpath_var" if test "$GCC" = yes; then variables_saved_for_relink="$variables_saved_for_relink GCC_EXEC_PREFIX COMPILER_PATH LIBRARY_PATH" fi if test "${lt_cv_sys_lib_search_path_spec+set}" = set; then sys_lib_search_path_spec="$lt_cv_sys_lib_search_path_spec" fi if test "${lt_cv_sys_lib_dlsearch_path_spec+set}" = set; then sys_lib_dlsearch_path_spec="$lt_cv_sys_lib_dlsearch_path_spec" fi _LT_DECL([], [variables_saved_for_relink], [1], [Variables whose values should be saved in libtool wrapper scripts and restored at link time]) _LT_DECL([], [need_lib_prefix], [0], [Do we need the "lib" prefix for modules?]) _LT_DECL([], [need_version], [0], [Do we need a version for libraries?]) _LT_DECL([], [version_type], [0], [Library versioning type]) _LT_DECL([], [runpath_var], [0], [Shared library runtime path variable]) _LT_DECL([], [shlibpath_var], [0],[Shared library path variable]) _LT_DECL([], [shlibpath_overrides_runpath], [0], [Is shlibpath searched before the hard-coded library search path?]) _LT_DECL([], [libname_spec], [1], [Format of library name prefix]) _LT_DECL([], [library_names_spec], [1], [[List of archive names. First name is the real one, the rest are links. The last name is the one that the linker finds with -lNAME]]) _LT_DECL([], [soname_spec], [1], [[The coded name of the library, if different from the real name]]) _LT_DECL([], [install_override_mode], [1], [Permission mode override for installation of shared libraries]) _LT_DECL([], [postinstall_cmds], [2], [Command to use after installation of a shared archive]) _LT_DECL([], [postuninstall_cmds], [2], [Command to use after uninstallation of a shared archive]) _LT_DECL([], [finish_cmds], [2], [Commands used to finish a libtool library installation in a directory]) _LT_DECL([], [finish_eval], [1], [[As "finish_cmds", except a single script fragment to be evaled but not shown]]) _LT_DECL([], [hardcode_into_libs], [0], [Whether we should hardcode library paths into libraries]) _LT_DECL([], [sys_lib_search_path_spec], [2], [Compile-time system search path for libraries]) _LT_DECL([], [sys_lib_dlsearch_path_spec], [2], [Run-time system search path for libraries]) ])# _LT_SYS_DYNAMIC_LINKER # _LT_PATH_TOOL_PREFIX(TOOL) # -------------------------- # find a file program which can recognize shared library AC_DEFUN([_LT_PATH_TOOL_PREFIX], [m4_require([_LT_DECL_EGREP])dnl AC_MSG_CHECKING([for $1]) AC_CACHE_VAL(lt_cv_path_MAGIC_CMD, [case $MAGIC_CMD in [[\\/*] | ?:[\\/]*]) lt_cv_path_MAGIC_CMD="$MAGIC_CMD" # Let the user override the test with a path. ;; *) lt_save_MAGIC_CMD="$MAGIC_CMD" lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR dnl $ac_dummy forces splitting on constant user-supplied paths. dnl POSIX.2 word splitting is done only on the output of word expansions, dnl not every word. This closes a longstanding sh security hole. ac_dummy="m4_if([$2], , $PATH, [$2])" for ac_dir in $ac_dummy; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f $ac_dir/$1; then lt_cv_path_MAGIC_CMD="$ac_dir/$1" if test -n "$file_magic_test_file"; then case $deplibs_check_method in "file_magic "*) file_magic_regex=`expr "$deplibs_check_method" : "file_magic \(.*\)"` MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if eval $file_magic_cmd \$file_magic_test_file 2> /dev/null | $EGREP "$file_magic_regex" > /dev/null; then : else cat <<_LT_EOF 1>&2 *** Warning: the command libtool uses to detect shared libraries, *** $file_magic_cmd, produces output that libtool cannot recognize. *** The result is that libtool may fail to recognize shared libraries *** as such. This will affect the creation of libtool libraries that *** depend on shared libraries, but programs linked with such libtool *** libraries will work regardless of this problem. Nevertheless, you *** may want to report the problem to your system manager and/or to *** bug-libtool@gnu.org _LT_EOF fi ;; esac fi break fi done IFS="$lt_save_ifs" MAGIC_CMD="$lt_save_MAGIC_CMD" ;; esac]) MAGIC_CMD="$lt_cv_path_MAGIC_CMD" if test -n "$MAGIC_CMD"; then AC_MSG_RESULT($MAGIC_CMD) else AC_MSG_RESULT(no) fi _LT_DECL([], [MAGIC_CMD], [0], [Used to examine libraries when file_magic_cmd begins with "file"])dnl ])# _LT_PATH_TOOL_PREFIX # Old name: AU_ALIAS([AC_PATH_TOOL_PREFIX], [_LT_PATH_TOOL_PREFIX]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_PATH_TOOL_PREFIX], []) # _LT_PATH_MAGIC # -------------- # find a file program which can recognize a shared library m4_defun([_LT_PATH_MAGIC], [_LT_PATH_TOOL_PREFIX(${ac_tool_prefix}file, /usr/bin$PATH_SEPARATOR$PATH) if test -z "$lt_cv_path_MAGIC_CMD"; then if test -n "$ac_tool_prefix"; then _LT_PATH_TOOL_PREFIX(file, /usr/bin$PATH_SEPARATOR$PATH) else MAGIC_CMD=: fi fi ])# _LT_PATH_MAGIC # LT_PATH_LD # ---------- # find the pathname to the GNU or non-GNU linker AC_DEFUN([LT_PATH_LD], [AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PROG_ECHO_BACKSLASH])dnl AC_ARG_WITH([gnu-ld], [AS_HELP_STRING([--with-gnu-ld], [assume the C compiler uses GNU ld @<:@default=no@:>@])], [test "$withval" = no || with_gnu_ld=yes], [with_gnu_ld=no])dnl ac_prog=ld if test "$GCC" = yes; then # Check if gcc -print-prog-name=ld gives a path. AC_MSG_CHECKING([for ld used by $CC]) case $host in *-*-mingw*) # gcc leaves a trailing carriage return which upsets mingw ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;; *) ac_prog=`($CC -print-prog-name=ld) 2>&5` ;; esac case $ac_prog in # Accept absolute paths. [[\\/]]* | ?:[[\\/]]*) re_direlt='/[[^/]][[^/]]*/\.\./' # Canonicalize the pathname of ld ac_prog=`$ECHO "$ac_prog"| $SED 's%\\\\%/%g'` while $ECHO "$ac_prog" | $GREP "$re_direlt" > /dev/null 2>&1; do ac_prog=`$ECHO $ac_prog| $SED "s%$re_direlt%/%"` done test -z "$LD" && LD="$ac_prog" ;; "") # If it fails, then pretend we aren't using GCC. ac_prog=ld ;; *) # If it is relative, then search for the first ld in PATH. with_gnu_ld=unknown ;; esac elif test "$with_gnu_ld" = yes; then AC_MSG_CHECKING([for GNU ld]) else AC_MSG_CHECKING([for non-GNU ld]) fi AC_CACHE_VAL(lt_cv_path_LD, [if test -z "$LD"; then lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then lt_cv_path_LD="$ac_dir/$ac_prog" # Check to see if the program is GNU ld. I'd rather use --version, # but apparently some variants of GNU ld only accept -v. # Break only if it was the GNU/non-GNU ld that we prefer. case `"$lt_cv_path_LD" -v 2>&1 &1 /dev/null 2>&1; then lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL' lt_cv_file_magic_cmd='func_win32_libid' else # Keep this pattern in sync with the one in func_win32_libid. lt_cv_deplibs_check_method='file_magic file format (pei*-i386(.*architecture: i386)?|pe-arm-wince|pe-x86-64)' lt_cv_file_magic_cmd='$OBJDUMP -f' fi ;; cegcc*) # use the weaker test based on 'objdump'. See mingw*. lt_cv_deplibs_check_method='file_magic file format pe-arm-.*little(.*architecture: arm)?' lt_cv_file_magic_cmd='$OBJDUMP -f' ;; darwin* | rhapsody*) lt_cv_deplibs_check_method=pass_all ;; freebsd* | dragonfly*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then case $host_cpu in i*86 ) # Not sure whether the presence of OpenBSD here was a mistake. # Let's accept both of them until this is cleared up. lt_cv_deplibs_check_method='file_magic (FreeBSD|OpenBSD|DragonFly)/i[[3-9]]86 (compact )?demand paged shared library' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=`echo /usr/lib/libc.so.*` ;; esac else lt_cv_deplibs_check_method=pass_all fi ;; gnu*) lt_cv_deplibs_check_method=pass_all ;; haiku*) lt_cv_deplibs_check_method=pass_all ;; hpux10.20* | hpux11*) lt_cv_file_magic_cmd=/usr/bin/file case $host_cpu in ia64*) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|ELF-[[0-9]][[0-9]]) shared object file - IA64' lt_cv_file_magic_test_file=/usr/lib/hpux32/libc.so ;; hppa*64*) [lt_cv_deplibs_check_method='file_magic (s[0-9][0-9][0-9]|ELF[ -][0-9][0-9])(-bit)?( [LM]SB)? shared object( file)?[, -]* PA-RISC [0-9]\.[0-9]'] lt_cv_file_magic_test_file=/usr/lib/pa20_64/libc.sl ;; *) lt_cv_deplibs_check_method='file_magic (s[[0-9]][[0-9]][[0-9]]|PA-RISC[[0-9]]\.[[0-9]]) shared library' lt_cv_file_magic_test_file=/usr/lib/libc.sl ;; esac ;; interix[[3-9]]*) # PIC code is broken on Interix 3.x, that's why |\.a not |_pic\.a here lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|\.a)$' ;; irix5* | irix6* | nonstopux*) case $LD in *-32|*"-32 ") libmagic=32-bit;; *-n32|*"-n32 ") libmagic=N32;; *-64|*"-64 ") libmagic=64-bit;; *) libmagic=never-match;; esac lt_cv_deplibs_check_method=pass_all ;; # This must be glibc/ELF. linux* | k*bsd*-gnu | kopensolaris*-gnu) lt_cv_deplibs_check_method=pass_all ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ > /dev/null; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so|_pic\.a)$' fi ;; newos6*) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (executable|dynamic lib)' lt_cv_file_magic_cmd=/usr/bin/file lt_cv_file_magic_test_file=/usr/lib/libnls.so ;; *nto* | *qnx*) lt_cv_deplibs_check_method=pass_all ;; openbsd*) if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|\.so|_pic\.a)$' else lt_cv_deplibs_check_method='match_pattern /lib[[^/]]+(\.so\.[[0-9]]+\.[[0-9]]+|_pic\.a)$' fi ;; osf3* | osf4* | osf5*) lt_cv_deplibs_check_method=pass_all ;; rdos*) lt_cv_deplibs_check_method=pass_all ;; solaris*) lt_cv_deplibs_check_method=pass_all ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX* | sysv4*uw2*) lt_cv_deplibs_check_method=pass_all ;; sysv4 | sysv4.3*) case $host_vendor in motorola) lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[ML]]SB (shared object|dynamic lib) M[[0-9]][[0-9]]* Version [[0-9]]' lt_cv_file_magic_test_file=`echo /usr/lib/libc.so*` ;; ncr) lt_cv_deplibs_check_method=pass_all ;; sequent) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method='file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB (shared object|dynamic lib )' ;; sni) lt_cv_file_magic_cmd='/bin/file' lt_cv_deplibs_check_method="file_magic ELF [[0-9]][[0-9]]*-bit [[LM]]SB dynamic lib" lt_cv_file_magic_test_file=/lib/libc.so ;; siemens) lt_cv_deplibs_check_method=pass_all ;; pc) lt_cv_deplibs_check_method=pass_all ;; esac ;; tpf*) lt_cv_deplibs_check_method=pass_all ;; esac ]) file_magic_glob= want_nocaseglob=no if test "$build" = "$host"; then case $host_os in mingw* | pw32*) if ( shopt | grep nocaseglob ) >/dev/null 2>&1; then want_nocaseglob=yes else file_magic_glob=`echo aAbBcCdDeEfFgGhHiIjJkKlLmMnNoOpPqQrRsStTuUvVwWxXyYzZ | $SED -e "s/\(..\)/s\/[[\1]]\/[[\1]]\/g;/g"` fi ;; esac fi file_magic_cmd=$lt_cv_file_magic_cmd deplibs_check_method=$lt_cv_deplibs_check_method test -z "$deplibs_check_method" && deplibs_check_method=unknown _LT_DECL([], [deplibs_check_method], [1], [Method to check whether dependent libraries are shared objects]) _LT_DECL([], [file_magic_cmd], [1], [Command to use when deplibs_check_method = "file_magic"]) _LT_DECL([], [file_magic_glob], [1], [How to find potential files when deplibs_check_method = "file_magic"]) _LT_DECL([], [want_nocaseglob], [1], [Find potential files using nocaseglob when deplibs_check_method = "file_magic"]) ])# _LT_CHECK_MAGIC_METHOD # LT_PATH_NM # ---------- # find the pathname to a BSD- or MS-compatible name lister AC_DEFUN([LT_PATH_NM], [AC_REQUIRE([AC_PROG_CC])dnl AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM, [if test -n "$NM"; then # Let the user override the test. lt_cv_path_NM="$NM" else lt_nm_to_check="${ac_tool_prefix}nm" if test -n "$ac_tool_prefix" && test "$build" = "$host"; then lt_nm_to_check="$lt_nm_to_check nm" fi for lt_tmp_nm in $lt_nm_to_check; do lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do IFS="$lt_save_ifs" test -z "$ac_dir" && ac_dir=. tmp_nm="$ac_dir/$lt_tmp_nm" if test -f "$tmp_nm" || test -f "$tmp_nm$ac_exeext" ; then # Check to see if the nm accepts a BSD-compat flag. # Adding the `sed 1q' prevents false positives on HP-UX, which says: # nm: unknown option "B" ignored # Tru64's nm complains that /dev/null is an invalid object file case `"$tmp_nm" -B /dev/null 2>&1 | sed '1q'` in */dev/null* | *'Invalid file or object type'*) lt_cv_path_NM="$tmp_nm -B" break ;; *) case `"$tmp_nm" -p /dev/null 2>&1 | sed '1q'` in */dev/null*) lt_cv_path_NM="$tmp_nm -p" break ;; *) lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but continue # so that we can try to find one that supports BSD flags ;; esac ;; esac fi done IFS="$lt_save_ifs" done : ${lt_cv_path_NM=no} fi]) if test "$lt_cv_path_NM" != "no"; then NM="$lt_cv_path_NM" else # Didn't find any BSD compatible name lister, look for dumpbin. if test -n "$DUMPBIN"; then : # Let the user override the test. else AC_CHECK_TOOLS(DUMPBIN, [dumpbin "link -dump"], :) case `$DUMPBIN -symbols /dev/null 2>&1 | sed '1q'` in *COFF*) DUMPBIN="$DUMPBIN -symbols" ;; *) DUMPBIN=: ;; esac fi AC_SUBST([DUMPBIN]) if test "$DUMPBIN" != ":"; then NM="$DUMPBIN" fi fi test -z "$NM" && NM=nm AC_SUBST([NM]) _LT_DECL([], [NM], [1], [A BSD- or MS-compatible name lister])dnl AC_CACHE_CHECK([the name lister ($NM) interface], [lt_cv_nm_interface], [lt_cv_nm_interface="BSD nm" echo "int some_variable = 0;" > conftest.$ac_ext (eval echo "\"\$as_me:$LINENO: $ac_compile\"" >&AS_MESSAGE_LOG_FD) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: $NM \\\"conftest.$ac_objext\\\"\"" >&AS_MESSAGE_LOG_FD) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&AS_MESSAGE_LOG_FD (eval echo "\"\$as_me:$LINENO: output\"" >&AS_MESSAGE_LOG_FD) cat conftest.out >&AS_MESSAGE_LOG_FD if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" fi rm -f conftest*]) ])# LT_PATH_NM # Old names: AU_ALIAS([AM_PROG_NM], [LT_PATH_NM]) AU_ALIAS([AC_PROG_NM], [LT_PATH_NM]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_PROG_NM], []) dnl AC_DEFUN([AC_PROG_NM], []) # _LT_CHECK_SHAREDLIB_FROM_LINKLIB # -------------------------------- # how to determine the name of the shared library # associated with a specific link library. # -- PORTME fill in with the dynamic library characteristics m4_defun([_LT_CHECK_SHAREDLIB_FROM_LINKLIB], [m4_require([_LT_DECL_EGREP]) m4_require([_LT_DECL_OBJDUMP]) m4_require([_LT_DECL_DLLTOOL]) AC_CACHE_CHECK([how to associate runtime and link libraries], lt_cv_sharedlib_from_linklib_cmd, [lt_cv_sharedlib_from_linklib_cmd='unknown' case $host_os in cygwin* | mingw* | pw32* | cegcc*) # two different shell functions defined in ltmain.sh # decide which to use based on capabilities of $DLLTOOL case `$DLLTOOL --help 2>&1` in *--identify-strict*) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib ;; *) lt_cv_sharedlib_from_linklib_cmd=func_cygming_dll_for_implib_fallback ;; esac ;; *) # fallback: assume linklib IS sharedlib lt_cv_sharedlib_from_linklib_cmd="$ECHO" ;; esac ]) sharedlib_from_linklib_cmd=$lt_cv_sharedlib_from_linklib_cmd test -z "$sharedlib_from_linklib_cmd" && sharedlib_from_linklib_cmd=$ECHO _LT_DECL([], [sharedlib_from_linklib_cmd], [1], [Command to associate shared and link libraries]) ])# _LT_CHECK_SHAREDLIB_FROM_LINKLIB # _LT_PATH_MANIFEST_TOOL # ---------------------- # locate the manifest tool m4_defun([_LT_PATH_MANIFEST_TOOL], [AC_CHECK_TOOL(MANIFEST_TOOL, mt, :) test -z "$MANIFEST_TOOL" && MANIFEST_TOOL=mt AC_CACHE_CHECK([if $MANIFEST_TOOL is a manifest tool], [lt_cv_path_mainfest_tool], [lt_cv_path_mainfest_tool=no echo "$as_me:$LINENO: $MANIFEST_TOOL '-?'" >&AS_MESSAGE_LOG_FD $MANIFEST_TOOL '-?' 2>conftest.err > conftest.out cat conftest.err >&AS_MESSAGE_LOG_FD if $GREP 'Manifest Tool' conftest.out > /dev/null; then lt_cv_path_mainfest_tool=yes fi rm -f conftest*]) if test "x$lt_cv_path_mainfest_tool" != xyes; then MANIFEST_TOOL=: fi _LT_DECL([], [MANIFEST_TOOL], [1], [Manifest tool])dnl ])# _LT_PATH_MANIFEST_TOOL # LT_LIB_M # -------- # check for math library AC_DEFUN([LT_LIB_M], [AC_REQUIRE([AC_CANONICAL_HOST])dnl LIBM= case $host in *-*-beos* | *-*-cegcc* | *-*-cygwin* | *-*-haiku* | *-*-pw32* | *-*-darwin*) # These system don't have libm, or don't need it ;; *-ncr-sysv4.3*) AC_CHECK_LIB(mw, _mwvalidcheckl, LIBM="-lmw") AC_CHECK_LIB(m, cos, LIBM="$LIBM -lm") ;; *) AC_CHECK_LIB(m, cos, LIBM="-lm") ;; esac AC_SUBST([LIBM]) ])# LT_LIB_M # Old name: AU_ALIAS([AC_CHECK_LIBM], [LT_LIB_M]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_CHECK_LIBM], []) # _LT_COMPILER_NO_RTTI([TAGNAME]) # ------------------------------- m4_defun([_LT_COMPILER_NO_RTTI], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= if test "$GCC" = yes; then case $cc_basename in nvcc*) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -Xcompiler -fno-builtin' ;; *) _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' ;; esac _LT_COMPILER_OPTION([if $compiler supports -fno-rtti -fno-exceptions], lt_cv_prog_compiler_rtti_exceptions, [-fno-rtti -fno-exceptions], [], [_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)="$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1) -fno-rtti -fno-exceptions"]) fi _LT_TAGDECL([no_builtin_flag], [lt_prog_compiler_no_builtin_flag], [1], [Compiler flag to turn off builtin functions]) ])# _LT_COMPILER_NO_RTTI # _LT_CMD_GLOBAL_SYMBOLS # ---------------------- m4_defun([_LT_CMD_GLOBAL_SYMBOLS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_PROG_CC])dnl AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([LT_PATH_NM])dnl AC_REQUIRE([LT_PATH_LD])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_TAG_COMPILER])dnl # Check for command to grab the raw symbol name followed by C symbol from nm. AC_MSG_CHECKING([command to parse $NM output from $compiler object]) AC_CACHE_VAL([lt_cv_sys_global_symbol_pipe], [ # These are sane defaults that work on at least a few old systems. # [They come from Ultrix. What could be older than Ultrix?!! ;)] # Character class describing NM global symbol codes. symcode='[[BCDEGRST]]' # Regexp to match symbols that can be accessed directly from C. sympat='\([[_A-Za-z]][[_A-Za-z0-9]]*\)' # Define system-specific variables. case $host_os in aix*) symcode='[[BCDT]]' ;; cygwin* | mingw* | pw32* | cegcc*) symcode='[[ABCDGISTW]]' ;; hpux*) if test "$host_cpu" = ia64; then symcode='[[ABCDEGRST]]' fi ;; irix* | nonstopux*) symcode='[[BCDEGRST]]' ;; osf*) symcode='[[BCDEGQRST]]' ;; solaris*) symcode='[[BDRT]]' ;; sco3.2v5*) symcode='[[DT]]' ;; sysv4.2uw2*) symcode='[[DT]]' ;; sysv5* | sco5v6* | unixware* | OpenUNIX*) symcode='[[ABDT]]' ;; sysv4) symcode='[[DFNSTU]]' ;; esac # If we're using GNU nm, then use its standard symbol codes. case `$NM -V 2>&1` in *GNU* | *'with BFD'*) symcode='[[ABCDGIRSTW]]' ;; esac # Transform an extracted symbol line into a proper C declaration. # Some systems (esp. on ia64) link data and code symbols differently, # so use this general approach. lt_cv_sys_global_symbol_to_cdecl="sed -n -e 's/^T .* \(.*\)$/extern int \1();/p' -e 's/^$symcode* .* \(.*\)$/extern char \1;/p'" # Transform an extracted symbol line into symbol name and symbol address lt_cv_sys_global_symbol_to_c_name_address="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p'" lt_cv_sys_global_symbol_to_c_name_address_lib_prefix="sed -n -e 's/^: \([[^ ]]*\)[[ ]]*$/ {\\\"\1\\\", (void *) 0},/p' -e 's/^$symcode* \([[^ ]]*\) \(lib[[^ ]]*\)$/ {\"\2\", (void *) \&\2},/p' -e 's/^$symcode* \([[^ ]]*\) \([[^ ]]*\)$/ {\"lib\2\", (void *) \&\2},/p'" # Handle CRLF in mingw tool chain opt_cr= case $build_os in mingw*) opt_cr=`$ECHO 'x\{0,1\}' | tr x '\015'` # option cr in regexp ;; esac # Try without a prefix underscore, then with it. for ac_symprfx in "" "_"; do # Transform symcode, sympat, and symprfx into a raw symbol and a C symbol. symxfrm="\\1 $ac_symprfx\\2 \\2" # Write the raw and C identifiers. if test "$lt_cv_nm_interface" = "MS dumpbin"; then # Fake it for dumpbin and say T for any non-static function # and D for any global variable. # Also find C++ and __fastcall symbols from MSVC++, # which start with @ or ?. lt_cv_sys_global_symbol_pipe="$AWK ['"\ " {last_section=section; section=\$ 3};"\ " /^COFF SYMBOL TABLE/{for(i in hide) delete hide[i]};"\ " /Section length .*#relocs.*(pick any)/{hide[last_section]=1};"\ " \$ 0!~/External *\|/{next};"\ " / 0+ UNDEF /{next}; / UNDEF \([^|]\)*()/{next};"\ " {if(hide[section]) next};"\ " {f=0}; \$ 0~/\(\).*\|/{f=1}; {printf f ? \"T \" : \"D \"};"\ " {split(\$ 0, a, /\||\r/); split(a[2], s)};"\ " s[1]~/^[@?]/{print s[1], s[1]; next};"\ " s[1]~prfx {split(s[1],t,\"@\"); print t[1], substr(t[1],length(prfx))}"\ " ' prfx=^$ac_symprfx]" else lt_cv_sys_global_symbol_pipe="sed -n -e 's/^.*[[ ]]\($symcode$symcode*\)[[ ]][[ ]]*$ac_symprfx$sympat$opt_cr$/$symxfrm/p'" fi lt_cv_sys_global_symbol_pipe="$lt_cv_sys_global_symbol_pipe | sed '/ __gnu_lto/d'" # Check to see that the pipe works correctly. pipe_works=no rm -f conftest* cat > conftest.$ac_ext <<_LT_EOF #ifdef __cplusplus extern "C" { #endif char nm_test_var; void nm_test_func(void); void nm_test_func(void){} #ifdef __cplusplus } #endif int main(){nm_test_var='a';nm_test_func();return(0);} _LT_EOF if AC_TRY_EVAL(ac_compile); then # Now try to grab the symbols. nlist=conftest.nm if AC_TRY_EVAL(NM conftest.$ac_objext \| "$lt_cv_sys_global_symbol_pipe" \> $nlist) && test -s "$nlist"; then # Try sorting and uniquifying the output. if sort "$nlist" | uniq > "$nlist"T; then mv -f "$nlist"T "$nlist" else rm -f "$nlist"T fi # Make sure that we snagged all the symbols we need. if $GREP ' nm_test_var$' "$nlist" >/dev/null; then if $GREP ' nm_test_func$' "$nlist" >/dev/null; then cat <<_LT_EOF > conftest.$ac_ext /* Keep this code in sync between libtool.m4, ltmain, lt_system.h, and tests. */ #if defined(_WIN32) || defined(__CYGWIN__) || defined(_WIN32_WCE) /* DATA imports from DLLs on WIN32 con't be const, because runtime relocations are performed -- see ld's documentation on pseudo-relocs. */ # define LT@&t@_DLSYM_CONST #elif defined(__osf__) /* This system does not cope well with relocations in const data. */ # define LT@&t@_DLSYM_CONST #else # define LT@&t@_DLSYM_CONST const #endif #ifdef __cplusplus extern "C" { #endif _LT_EOF # Now generate the symbol file. eval "$lt_cv_sys_global_symbol_to_cdecl"' < "$nlist" | $GREP -v main >> conftest.$ac_ext' cat <<_LT_EOF >> conftest.$ac_ext /* The mapping between symbol names and symbols. */ LT@&t@_DLSYM_CONST struct { const char *name; void *address; } lt__PROGRAM__LTX_preloaded_symbols[[]] = { { "@PROGRAM@", (void *) 0 }, _LT_EOF $SED "s/^$symcode$symcode* \(.*\) \(.*\)$/ {\"\2\", (void *) \&\2},/" < "$nlist" | $GREP -v main >> conftest.$ac_ext cat <<\_LT_EOF >> conftest.$ac_ext {0, (void *) 0} }; /* This works around a problem in FreeBSD linker */ #ifdef FREEBSD_WORKAROUND static const void *lt_preloaded_setup() { return lt__PROGRAM__LTX_preloaded_symbols; } #endif #ifdef __cplusplus } #endif _LT_EOF # Now try linking the two files. mv conftest.$ac_objext conftstm.$ac_objext lt_globsym_save_LIBS=$LIBS lt_globsym_save_CFLAGS=$CFLAGS LIBS="conftstm.$ac_objext" CFLAGS="$CFLAGS$_LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)" if AC_TRY_EVAL(ac_link) && test -s conftest${ac_exeext}; then pipe_works=yes fi LIBS=$lt_globsym_save_LIBS CFLAGS=$lt_globsym_save_CFLAGS else echo "cannot find nm_test_func in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot find nm_test_var in $nlist" >&AS_MESSAGE_LOG_FD fi else echo "cannot run $lt_cv_sys_global_symbol_pipe" >&AS_MESSAGE_LOG_FD fi else echo "$progname: failed program was:" >&AS_MESSAGE_LOG_FD cat conftest.$ac_ext >&5 fi rm -rf conftest* conftst* # Do not use the global_symbol_pipe unless it works. if test "$pipe_works" = yes; then break else lt_cv_sys_global_symbol_pipe= fi done ]) if test -z "$lt_cv_sys_global_symbol_pipe"; then lt_cv_sys_global_symbol_to_cdecl= fi if test -z "$lt_cv_sys_global_symbol_pipe$lt_cv_sys_global_symbol_to_cdecl"; then AC_MSG_RESULT(failed) else AC_MSG_RESULT(ok) fi # Response file support. if test "$lt_cv_nm_interface" = "MS dumpbin"; then nm_file_list_spec='@' elif $NM --help 2>/dev/null | grep '[[@]]FILE' >/dev/null; then nm_file_list_spec='@' fi _LT_DECL([global_symbol_pipe], [lt_cv_sys_global_symbol_pipe], [1], [Take the output of nm and produce a listing of raw symbols and C names]) _LT_DECL([global_symbol_to_cdecl], [lt_cv_sys_global_symbol_to_cdecl], [1], [Transform the output of nm in a proper C declaration]) _LT_DECL([global_symbol_to_c_name_address], [lt_cv_sys_global_symbol_to_c_name_address], [1], [Transform the output of nm in a C name address pair]) _LT_DECL([global_symbol_to_c_name_address_lib_prefix], [lt_cv_sys_global_symbol_to_c_name_address_lib_prefix], [1], [Transform the output of nm in a C name address pair when lib prefix is needed]) _LT_DECL([], [nm_file_list_spec], [1], [Specify filename containing input files for $NM]) ]) # _LT_CMD_GLOBAL_SYMBOLS # _LT_COMPILER_PIC([TAGNAME]) # --------------------------- m4_defun([_LT_COMPILER_PIC], [m4_require([_LT_TAG_COMPILER])dnl _LT_TAGVAR(lt_prog_compiler_wl, $1)= _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)= m4_if([$1], [CXX], [ # C++ specific cases for pic, static, wl, etc. if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; *djgpp*) # DJGPP does not support shared libraries at all _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac else case $host_os in aix[[4-9]]*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; chorus*) case $cc_basename in cxch68*) # Green Hills C++ Compiler # _LT_TAGVAR(lt_prog_compiler_static, $1)="--no_auto_instantiation -u __main -u __premain -u _abort -r $COOL_DIR/lib/libOrb.a $MVME_DIR/lib/CC/libC.a $MVME_DIR/lib/classix/libcx.s.a" ;; esac ;; mingw* | cygwin* | os2* | pw32* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; dgux*) case $cc_basename in ec++*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; ghcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; freebsd* | dragonfly*) # FreeBSD uses GNU C++ ;; hpux9* | hpux10* | hpux11*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' if test "$host_cpu" != ia64; then _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' fi ;; aCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac ;; *) ;; esac ;; interix*) # This is c89, which is MS Visual C++ (no shared libs) # Anyone wants to do a port? ;; irix5* | irix6* | nonstopux*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' # CC pic flag -KPIC is the default. ;; *) ;; esac ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # KAI C++ Compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; ecpc* ) # old Intel C++ for x86_64 which still supported -KPIC. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; icpc* ) # Intel C++, used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; pgCC* | pgcpp*) # Portland Group C++ compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; cxx*) # Compaq C++ # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xlc* | xlC* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL 8.0, 9.0 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; esac ;; esac ;; lynxos*) ;; m88k*) ;; mvs*) case $cc_basename in cxx*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-W c,exportall' ;; *) ;; esac ;; netbsd*) ;; *qnx* | *nto*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='--backend -Wl,' ;; RCC*) # Rational C++ 2.4.1 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; cxx*) # Digital/Compaq C++ _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # Make sure the PIC flag is empty. It appears that all Alpha # Linux and Compaq Tru64 Unix objects are PIC. _LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; *) ;; esac ;; psos*) ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' ;; *) ;; esac ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; lcc*) # Lucid _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' ;; *) ;; esac ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) case $cc_basename in CC*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' ;; *) ;; esac ;; vxworks*) ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ], [ if test "$GCC" = yes; then _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' case $host_os in aix*) # All AIX code is PIC. if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; m68k) # FIXME: we need at least 68020 code to build shared libraries, but # adding the `-m68020' flag to GCC prevents building anything better, # like `-m68040'. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 -malways-restore-a4' ;; esac ;; beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*) # PIC is the default for these OSes. ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). # Although the cygwin gcc ignores -fPIC, still need this for old-style # (--disable-auto-import) libraries m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; darwin* | rhapsody*) # PIC is the default on this platform # Common symbols not allowed in MH_DYLIB files _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fno-common' ;; haiku*) # PIC is the default for Haiku. # The "-static" flag exists, but is broken. _LT_TAGVAR(lt_prog_compiler_static, $1)= ;; hpux*) # PIC is the default for 64-bit PA HP-UX, but not for 32-bit # PA HP-UX. On IA64 HP-UX, PIC is the default but the pic flag # sets the default TLS model and affects inlining. case $host_cpu in hppa*64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac ;; interix[[3-9]]*) # Interix 3.x gcc -fpic/-fPIC options generate broken code. # Instead, we relocate shared libraries at runtime. ;; msdosdjgpp*) # Just because we use GCC doesn't mean we suddenly get shared libraries # on systems that don't support them. _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no enable_shared=no ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(lt_prog_compiler_pic, $1)=-Kconform_pic fi ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' ;; esac case $cc_basename in nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Xlinker ' if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_TAGVAR(lt_prog_compiler_pic, $1)="-Xcompiler $_LT_TAGVAR(lt_prog_compiler_pic, $1)" fi ;; esac else # PORTME Check for flag to pass linker flags through the system compiler. case $host_os in aix*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' if test "$host_cpu" = ia64; then # AIX 5 now supports IA64 processor _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' else _LT_TAGVAR(lt_prog_compiler_static, $1)='-bnso -bI:/lib/syscalls.exp' fi ;; mingw* | cygwin* | pw32* | os2* | cegcc*) # This hack is so that the source file can tell whether it is being # built for inclusion in a dll (and should export symbols for example). m4_if([$1], [GCJ], [], [_LT_TAGVAR(lt_prog_compiler_pic, $1)='-DDLL_EXPORT']) ;; hpux9* | hpux10* | hpux11*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC is the default for IA64 HP-UX and 64-bit HP-UX, but # not for PA HP-UX. case $host_cpu in hppa*64*|ia64*) # +Z the default ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)='+Z' ;; esac # Is there a better lt_prog_compiler_static that works with the bundled CC? _LT_TAGVAR(lt_prog_compiler_static, $1)='${wl}-a ${wl}archive' ;; irix5* | irix6* | nonstopux*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # PIC (with -KPIC) is the default. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in # old Intel for x86_64 which still supported -KPIC. ecc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # icc used to be incompatible with GCC. # ICC 10 doesn't accept -KPIC any more. icc* | ifort*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; # Lahey Fortran 8.1. lf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='--shared' _LT_TAGVAR(lt_prog_compiler_static, $1)='--static' ;; nagfor*) # NAG Fortran compiler _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,-Wl,,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; pgcc* | pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group compilers (*not* the Pentium gcc compiler, # which looks to be a dead project) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; ccc*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All Alpha code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; xl* | bgxl* | bgf* | mpixl*) # IBM XL C 8.0/Fortran 10.1, 11.1 on PPC and BlueGene _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-qpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-qstaticlink' ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ Ceres\ Fortran* | *Sun*Fortran*\ [[1-7]].* | *Sun*Fortran*\ 8.[[0-3]]*) # Sun Fortran 8.3 passes all unrecognized flags to the linker _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='' ;; *Sun\ F* | *Sun*Fortran*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' ;; *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' ;; *Intel*\ [[CF]]*Compiler*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-static' ;; *Portland\ Group*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fpic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; esac ;; esac ;; newsos6) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *nto* | *qnx*) # QNX uses GNU C++, but need to define -shared option too, otherwise # it will coredump. _LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC -shared' ;; osf3* | osf4* | osf5*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' # All OSF/1 code is PIC. _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; rdos*) _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' ;; solaris*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' case $cc_basename in f77* | f90* | f95* | sunf77* | sunf90* | sunf95*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ';; *) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,';; esac ;; sunos4*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Qoption ld ' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-PIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4 | sysv4.2uw2* | sysv4.3*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; sysv4*MP*) if test -d /usr/nec ;then _LT_TAGVAR(lt_prog_compiler_pic, $1)='-Kconform_pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' fi ;; sysv5* | unixware* | sco3.2v5* | sco5v6* | OpenUNIX*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; unicos*) _LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,' _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; uts4*) _LT_TAGVAR(lt_prog_compiler_pic, $1)='-pic' _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic' ;; *) _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no ;; esac fi ]) case $host_os in # For platforms which do not support PIC, -DPIC is meaningless: *djgpp*) _LT_TAGVAR(lt_prog_compiler_pic, $1)= ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)="$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])" ;; esac AC_CACHE_CHECK([for $compiler option to produce PIC], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)], [_LT_TAGVAR(lt_cv_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_prog_compiler_pic, $1)]) _LT_TAGVAR(lt_prog_compiler_pic, $1)=$_LT_TAGVAR(lt_cv_prog_compiler_pic, $1) # # Check to make sure the PIC flag actually works. # if test -n "$_LT_TAGVAR(lt_prog_compiler_pic, $1)"; then _LT_COMPILER_OPTION([if $compiler PIC flag $_LT_TAGVAR(lt_prog_compiler_pic, $1) works], [_LT_TAGVAR(lt_cv_prog_compiler_pic_works, $1)], [$_LT_TAGVAR(lt_prog_compiler_pic, $1)@&t@m4_if([$1],[],[ -DPIC],[m4_if([$1],[CXX],[ -DPIC],[])])], [], [case $_LT_TAGVAR(lt_prog_compiler_pic, $1) in "" | " "*) ;; *) _LT_TAGVAR(lt_prog_compiler_pic, $1)=" $_LT_TAGVAR(lt_prog_compiler_pic, $1)" ;; esac], [_LT_TAGVAR(lt_prog_compiler_pic, $1)= _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no]) fi _LT_TAGDECL([pic_flag], [lt_prog_compiler_pic], [1], [Additional compiler flags for building library objects]) _LT_TAGDECL([wl], [lt_prog_compiler_wl], [1], [How to pass a linker flag through the compiler]) # # Check to make sure the static flag actually works. # wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) eval lt_tmp_static_flag=\"$_LT_TAGVAR(lt_prog_compiler_static, $1)\" _LT_LINKER_OPTION([if $compiler static flag $lt_tmp_static_flag works], _LT_TAGVAR(lt_cv_prog_compiler_static_works, $1), $lt_tmp_static_flag, [], [_LT_TAGVAR(lt_prog_compiler_static, $1)=]) _LT_TAGDECL([link_static_flag], [lt_prog_compiler_static], [1], [Compiler flag to prevent dynamic linking]) ])# _LT_COMPILER_PIC # _LT_LINKER_SHLIBS([TAGNAME]) # ---------------------------- # See if the linker supports building shared libraries. m4_defun([_LT_LINKER_SHLIBS], [AC_REQUIRE([LT_PATH_LD])dnl AC_REQUIRE([LT_PATH_NM])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_DECL_SED])dnl m4_require([_LT_CMD_GLOBAL_SYMBOLS])dnl m4_require([_LT_TAG_COMPILER])dnl AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) m4_if([$1], [CXX], [ _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] case $host_os in aix[[4-9]]*) # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global defined # symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi ;; pw32*) _LT_TAGVAR(export_symbols_cmds, $1)="$ltdll_cmds" ;; cygwin* | mingw* | cegcc*) case $cc_basename in cl*) _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] ;; esac ;; *) _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' ;; esac ], [ runpath_var= _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_cmds, $1)= _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED '\''s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(old_archive_from_new_cmds, $1)= _LT_TAGVAR(old_archive_from_expsyms_cmds, $1)= _LT_TAGVAR(thread_safe_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= # include_expsyms should be a list of space-separated symbols to be *always* # included in the symbol list _LT_TAGVAR(include_expsyms, $1)= # exclude_expsyms can be an extended regexp of symbols to exclude # it will be wrapped by ` (' and `)$', so one must not match beginning or # end of line. Example: `a|bc|.*d.*' will exclude the symbols `a' and `bc', # as well as any symbol that contains `d'. _LT_TAGVAR(exclude_expsyms, $1)=['_GLOBAL_OFFSET_TABLE_|_GLOBAL__F[ID]_.*'] # Although _GLOBAL_OFFSET_TABLE_ is a valid symbol C name, most a.out # platforms (ab)use it in PIC code, but their linkers get confused if # the symbol is explicitly referenced. Since portable code cannot # rely on this symbol name, it's probably fine to never include it in # preloaded symbol tables. # Exclude shared library initialization/finalization symbols. dnl Note also adjust exclude_expsyms for C++ above. extract_expsyms_cmds= case $host_os in cygwin* | mingw* | pw32* | cegcc*) # FIXME: the MSVC++ port hasn't been tested in a loooong time # When not using gcc, we currently assume that we are using # Microsoft Visual C++. if test "$GCC" != yes; then with_gnu_ld=no fi ;; interix*) # we just hope/assume this is gcc and not c89 (= MSVC++) with_gnu_ld=yes ;; openbsd*) with_gnu_ld=no ;; esac _LT_TAGVAR(ld_shlibs, $1)=yes # On some targets, GNU ld is compatible enough with the native linker # that we're better off using the native interface for both. lt_use_gnu_ld_interface=no if test "$with_gnu_ld" = yes; then case $host_os in aix*) # The AIX port of GNU ld has always aspired to compatibility # with the native linker. However, as the warning in the GNU ld # block says, versions before 2.19.5* couldn't really create working # shared libraries, regardless of the interface used. case `$LD -v 2>&1` in *\ \(GNU\ Binutils\)\ 2.19.5*) ;; *\ \(GNU\ Binutils\)\ 2.[[2-9]]*) ;; *\ \(GNU\ Binutils\)\ [[3-9]]*) ;; *) lt_use_gnu_ld_interface=yes ;; esac ;; *) lt_use_gnu_ld_interface=yes ;; esac fi if test "$lt_use_gnu_ld_interface" = yes; then # If archive_cmds runs LD, not CC, wlarc should be empty wlarc='${wl}' # Set some defaults for GNU ld with shared library support. These # are reset later if shared libraries are not supported. Putting them # here allows them to be overridden if necessary. runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # ancient GNU ld didn't support --whole-archive et. al. if $LD --help 2>&1 | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi supports_anon_versioning=no case `$LD -v 2>&1` in *GNU\ gold*) supports_anon_versioning=yes ;; *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.10.*) ;; # catch versions < 2.11 *\ 2.11.93.0.2\ *) supports_anon_versioning=yes ;; # RH7.3 ... *\ 2.11.92.0.12\ *) supports_anon_versioning=yes ;; # Mandrake 8.2 ... *\ 2.11.*) ;; # other 2.11 versions *) supports_anon_versioning=yes ;; esac # See if GNU ld supports shared libraries. case $host_os in aix[[3-9]]*) # On AIX/PPC, the GNU linker is very broken if test "$host_cpu" != ia64; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: the GNU linker, at least up to release 2.19, is reported *** to be unable to reliably create shared libraries on AIX. *** Therefore, libtool is disabling shared libraries support. If you *** really care for shared libraries, you may want to install binutils *** 2.20 or above, or modify your PATH so that a non-GNU linker is found. *** You will then need to restart the configuration process. _LT_EOF fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; cygwin* | mingw* | pw32* | cegcc*) # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1 DATA/;s/^.*[[ ]]__nm__\([[^ ]]*\)[[ ]][[^ ]]*/\1 DATA/;/^I[[ ]]/d;/^[[AITW]][[ ]]/s/.* //'\'' | sort | uniq > $export_symbols' _LT_TAGVAR(exclude_expsyms, $1)=['[_]+GLOBAL_OFFSET_TABLE_|[_]+GLOBAL__[FID]_.*|[_]+head_[A-Za-z0-9_]+_dll|[A-Za-z0-9_]+_dll_iname'] if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared $output_objdir/$soname.def $libobjs $deplibs $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; gnu* | linux* | tpf* | k*bsd*-gnu | kopensolaris*-gnu) tmp_diet=no if test "$host_os" = linux-dietlibc; then case $cc_basename in diet\ *) tmp_diet=yes;; # linux-dietlibc with static linking (!diet-dyn) esac fi if $LD --help 2>&1 | $EGREP ': supported targets:.* elf' > /dev/null \ && test "$tmp_diet" = no then tmp_addflag=' $pic_flag' tmp_sharedflag='-shared' case $cc_basename,$host_cpu in pgcc*) # Portland Group C compiler _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag' ;; pgf77* | pgf90* | pgf95* | pgfortran*) # Portland Group f77 and f90 compilers _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' tmp_addflag=' $pic_flag -Mnomain' ;; ecc*,ia64* | icc*,ia64*) # Intel C compiler on ia64 tmp_addflag=' -i_dynamic' ;; efc*,ia64* | ifort*,ia64*) # Intel Fortran compiler on ia64 tmp_addflag=' -i_dynamic -nofor_main' ;; ifc* | ifort*) # Intel Fortran compiler tmp_addflag=' -nofor_main' ;; lf95*) # Lahey Fortran 8.1 _LT_TAGVAR(whole_archive_flag_spec, $1)= tmp_sharedflag='--shared' ;; xl[[cC]]* | bgxl[[cC]]* | mpixl[[cC]]*) # IBM XL C 8.0 on PPC (deal with xlf below) tmp_sharedflag='-qmkshrobj' tmp_addflag= ;; nvcc*) # Cuda Compiler Driver 2.2 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes ;; esac case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C 5.9 _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes tmp_sharedflag='-G' ;; *Sun\ F*) # Sun Fortran 8.3 tmp_sharedflag='-G' ;; esac _LT_TAGVAR(archive_cmds, $1)='$CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC '"$tmp_sharedflag""$tmp_addflag"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi case $cc_basename in xlf* | bgf* | bgxlf* | mpixlf*) # IBM XL Fortran 10.1 on PPC cannot create shared libs itself _LT_TAGVAR(whole_archive_flag_spec, $1)='--whole-archive$convenience --no-whole-archive' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$LD -shared $libobjs $deplibs $linker_flags -soname $soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $LD -shared $libobjs $deplibs $linker_flags -soname $soname -version-script $output_objdir/$libname.ver -o $lib' fi ;; esac else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable $libobjs $deplibs $linker_flags -o $lib' wlarc= else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' fi ;; solaris*) if $LD -v 2>&1 | $GREP 'BFD 2\.8' > /dev/null; then _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: The releases 2.8.* of the GNU linker cannot reliably *** create shared libraries on Solaris systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.9.1 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF elif $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; sysv5* | sco3.2v5* | sco5v6* | unixware* | OpenUNIX*) case `$LD -v 2>&1` in *\ [[01]].* | *\ 2.[[0-9]].* | *\ 2.1[[0-5]].*) _LT_TAGVAR(ld_shlibs, $1)=no cat <<_LT_EOF 1>&2 *** Warning: Releases of the GNU linker prior to 2.16.91.0.3 can not *** reliably create shared libraries on SCO systems. Therefore, libtool *** is disabling shared libraries support. We urge you to upgrade GNU *** binutils to release 2.16.91.0.3 or newer. Another option is to modify *** your PATH or compiler configuration so that the native linker is *** used, and then restart. _LT_EOF ;; *) # For security reasons, it is highly recommended that you always # use absolute paths for naming shared libraries, and exclude the # DT_RUNPATH tag from executables and libraries. But doing so # requires that you compile everything twice, which is a pain. if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; sunos4*) _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bshareable -o $lib $libobjs $deplibs $linker_flags' wlarc= _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac if test "$_LT_TAGVAR(ld_shlibs, $1)" = no; then runpath_var= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else # PORTME fill in a description of your system's linker (not GNU ld) case $host_os in aix3*) _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(archive_expsym_cmds, $1)='$LD -o $output_objdir/$soname $libobjs $deplibs $linker_flags -bE:$export_symbols -T512 -H512 -bM:SRE~$AR $AR_FLAGS $lib $output_objdir/$soname' # Note: this linker hardcodes the directories in LIBPATH if there # are no directories specified by -L. _LT_TAGVAR(hardcode_minus_L, $1)=yes if test "$GCC" = yes && test -z "$lt_prog_compiler_static"; then # Neither direct hardcoding nor static linking is supported with a # broken collect2. _LT_TAGVAR(hardcode_direct, $1)=unsupported fi ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else # If we're using GNU nm, then we don't want the "-C" option. # -C means demangle to AIX nm, but means don't demangle with GNU nm # Also, AIX nm treats weak defined symbols like other global # defined symbols, whereas GNU nm marks them as "W". if $NM -V 2>&1 | $GREP 'GNU' > /dev/null; then _LT_TAGVAR(export_symbols_cmds, $1)='$NM -Bpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B") || (\$ 2 == "W")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' else _LT_TAGVAR(export_symbols_cmds, $1)='$NM -BCpg $libobjs $convenience | awk '\''{ if (((\$ 2 == "T") || (\$ 2 == "D") || (\$ 2 == "B")) && ([substr](\$ 3,1,1) != ".")) { print \$ 3 } }'\'' | sort -u > $export_symbols' fi aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then aix_use_runtimelinking=yes break fi done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GCC" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi ;; esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; amigaos*) case $host_cpu in powerpc) # see comment about AmigaOS4 .so support _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='' ;; m68k) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/a2ixlibrary.data~$ECHO "#define NAME $libname" > $output_objdir/a2ixlibrary.data~$ECHO "#define LIBRARY_ID 1" >> $output_objdir/a2ixlibrary.data~$ECHO "#define VERSION $major" >> $output_objdir/a2ixlibrary.data~$ECHO "#define REVISION $revision" >> $output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd $output_objdir && a2ixlibrary -32)' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac ;; bsdi[[45]]*) _LT_TAGVAR(export_dynamic_flag_spec, $1)=-rdynamic ;; cygwin* | mingw* | pw32* | cegcc*) # When not using gcc, we currently assume that we are using # Microsoft Visual C++. # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. case $cc_basename in cl*) # Native MSVC _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then sed -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else sed -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes _LT_TAGVAR(exclude_expsyms, $1)='_NULL_IMPORT_DESCRIPTOR|_IMPORT_DESCRIPTOR_.*' _LT_TAGVAR(export_symbols_cmds, $1)='$NM $libobjs $convenience | $global_symbol_pipe | $SED -e '\''/^[[BCDGRS]][[ ]]/s/.*[[ ]]\([[^ ]]*\)/\1,DATA/'\'' | $SED -e '\''/^[[AITW]][[ ]]/s/.*[[ ]]//'\'' | sort | uniq > $export_symbols' # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # Assume MSVC wrapper _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $lib $libobjs $compiler_flags `func_echo_all "$deplibs" | $SED '\''s/ -lc$//'\''` -link -dll~linknames=' # The linker will automatically build a .lib file if we build a DLL. _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' # FIXME: Should let the user specify the lib program. _LT_TAGVAR(old_archive_cmds, $1)='lib -OUT:$oldlib$oldobjs$old_deplibs' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 2.2.[012] allows us to include c++rt0.o to get C++ constructor # support. Future versions do this automatically, but an explicit c++rt0.o # does not break anything, and helps significantly (at the cost of a little # extra space). freebsd2.2*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags /usr/lib/c++rt0.o' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # Unfortunately, older versions of FreeBSD 2 do not have this feature. freebsd2.*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; # FreeBSD 3 and greater uses gcc -shared to do shared libraries. freebsd* | dragonfly*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; hpux9*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $libobjs $deplibs $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$LD -b +b $install_libdir -o $output_objdir/$soname $libobjs $deplibs $linker_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; hpux10*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags' fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes fi ;; hpux11*) if test "$GCC" = yes && test "$with_gnu_ld" = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags' ;; esac else case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $libobjs $deplibs $compiler_flags' ;; *) m4_if($1, [], [ # Older versions of the 11.00 compiler do not understand -b yet # (HP92453-01 A.11.01.20 doesn't, HP92453-01 B.11.X.35175-35176.GP does) _LT_LINKER_OPTION([if $CC understands -b], _LT_TAGVAR(lt_cv_prog_compiler__b, $1), [-b], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags'], [_LT_TAGVAR(archive_cmds, $1)='$LD -b +h $soname +b $install_libdir -o $lib $libobjs $deplibs $linker_flags'])], [_LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $libobjs $deplibs $compiler_flags']) ;; esac fi if test "$with_gnu_ld" = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # hardcode_minus_L: Not really in the search PATH, # but as the default location of the library. _LT_TAGVAR(hardcode_minus_L, $1)=yes ;; esac fi ;; irix5* | irix6* | nonstopux*) if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' # Try to use the -exported_symbol ld option, if it does not # work, assume that -exports_file does not work either and # implicitly export all symbols. # This should be the same for all languages, so no per-tag cache variable. AC_CACHE_CHECK([whether the $host_os linker accepts -exported_symbol], [lt_cv_irix_exported_symbol], [save_LDFLAGS="$LDFLAGS" LDFLAGS="$LDFLAGS -shared ${wl}-exported_symbol ${wl}foo ${wl}-update_registry ${wl}/dev/null" AC_LINK_IFELSE( [AC_LANG_SOURCE( [AC_LANG_CASE([C], [[int foo (void) { return 0; }]], [C++], [[int foo (void) { return 0; }]], [Fortran 77], [[ subroutine foo end]], [Fortran], [[ subroutine foo end]])])], [lt_cv_irix_exported_symbol=yes], [lt_cv_irix_exported_symbol=no]) LDFLAGS="$save_LDFLAGS"]) if test "$lt_cv_irix_exported_symbol" = yes; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations ${wl}-exports_file ${wl}$export_symbols -o $lib' fi else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -exports_file $export_symbols -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes _LT_TAGVAR(link_all_deplibs, $1)=yes ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' # a.out else _LT_TAGVAR(archive_cmds, $1)='$LD -shared -o $lib $libobjs $deplibs $linker_flags' # ELF fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; newsos6) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *nto* | *qnx*) ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes if test -z "`echo __ELF__ | $CC -E - | $GREP __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags ${wl}-retain-symbols-file,$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' else case $host_os in openbsd[[01]].* | openbsd2.[[0-7]] | openbsd2.[[0-7]].*) _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' ;; esac fi else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; os2*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(archive_cmds, $1)='$ECHO "LIBRARY $libname INITINSTANCE" > $output_objdir/$libname.def~$ECHO "DESCRIPTION \"$libname\"" >> $output_objdir/$libname.def~echo DATA >> $output_objdir/$libname.def~echo " SINGLE NONSHARED" >> $output_objdir/$libname.def~echo EXPORTS >> $output_objdir/$libname.def~emxexp $libobjs >> $output_objdir/$libname.def~$CC -Zdll -Zcrtdll -o $lib $libobjs $deplibs $compiler_flags $output_objdir/$libname.def' _LT_TAGVAR(old_archive_from_new_cmds, $1)='emximp -o $output_objdir/$libname.a $output_objdir/$libname.def' ;; osf3*) if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; osf4* | osf5*) # as osf3* with the addition of -msym flag if test "$GCC" = yes; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $pic_flag $libobjs $deplibs $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' else _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $libobjs $deplibs $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done; printf "%s\\n" "-hidden">> $lib.exp~ $CC -shared${allow_undefined_flag} ${wl}-input ${wl}$lib.exp $compiler_flags $libobjs $deplibs -soname $soname `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~$RM $lib.exp' # Both c and cxx compiler support -rpath directly _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' fi _LT_TAGVAR(archive_cmds_need_lc, $1)='no' _LT_TAGVAR(hardcode_libdir_separator, $1)=: ;; solaris*) _LT_TAGVAR(no_undefined_flag, $1)=' -z defs' if test "$GCC" = yes; then wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag ${wl}-z ${wl}text ${wl}-M ${wl}$lib.exp ${wl}-h ${wl}$soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' else case `$CC -V 2>&1` in *"Compilers 5.0"*) wlarc='' _LT_TAGVAR(archive_cmds, $1)='$LD -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $LD -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $linker_flags~$RM $lib.exp' ;; *) wlarc='${wl}' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h $soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} -M $lib.exp -h $soname -o $lib $libobjs $deplibs $compiler_flags~$RM $lib.exp' ;; esac fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. GCC discards it without `$wl', # but is careful enough not to reorder. # Supported since Solaris 2.6 (maybe 2.5.1?) if test "$GCC" = yes; then _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' else _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' fi ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes ;; sunos4*) if test "x$host_vendor" = xsequent; then # Use $CC to link under sequent, because it throws in some extra .o # files that make .init and .fini sections work. _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h $soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$LD -assert pure-text -Bstatic -o $lib $libobjs $deplibs $linker_flags' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4) case $host_vendor in sni) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=yes # is this really true??? ;; siemens) ## LD is ld it makes a PLAMLIB ## CC just makes a GrossModule. _LT_TAGVAR(archive_cmds, $1)='$LD -G -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(reload_cmds, $1)='$CC -r -o $output$reload_objs' _LT_TAGVAR(hardcode_direct, $1)=no ;; motorola) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_direct, $1)=no #Motorola manual says yes, but my tests say they lie ;; esac runpath_var='LD_RUN_PATH' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; sysv4.3*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)='-Bexport' ;; sysv4*MP*) if test -d /usr/nec; then _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var=LD_RUN_PATH hardcode_runpath_var=yes _LT_TAGVAR(ld_shlibs, $1)=yes fi ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' if test "$GCC" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' else _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' fi ;; uts4*) _LT_TAGVAR(archive_cmds, $1)='$LD -G -h $soname -o $lib $libobjs $deplibs $linker_flags' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(ld_shlibs, $1)=no ;; esac if test x$host_vendor = xsni; then case $host in sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Blargedynsym' ;; esac fi fi ]) AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(with_gnu_ld, $1)=$with_gnu_ld _LT_DECL([], [libext], [0], [Old archive suffix (normally "a")])dnl _LT_DECL([], [shrext_cmds], [1], [Shared library suffix (normally ".so")])dnl _LT_DECL([], [extract_expsyms_cmds], [2], [The commands to extract the exported symbol list from a shared archive]) # # Do we need to explicitly link libc? # case "x$_LT_TAGVAR(archive_cmds_need_lc, $1)" in x|xyes) # Assume -lc should be added _LT_TAGVAR(archive_cmds_need_lc, $1)=yes if test "$enable_shared" = yes && test "$GCC" = yes; then case $_LT_TAGVAR(archive_cmds, $1) in *'~'*) # FIXME: we may have to deal with multi-command sequences. ;; '$CC '*) # Test whether the compiler implicitly links with -lc since on some # systems, -lgcc has to come before -lc. If gcc already passes -lc # to ld, don't add -lc before -lgcc. AC_CACHE_CHECK([whether -lc should be explicitly linked in], [lt_cv_]_LT_TAGVAR(archive_cmds_need_lc, $1), [$RM conftest* echo "$lt_simple_compile_test_code" > conftest.$ac_ext if AC_TRY_EVAL(ac_compile) 2>conftest.err; then soname=conftest lib=conftest libobjs=conftest.$ac_objext deplibs= wl=$_LT_TAGVAR(lt_prog_compiler_wl, $1) pic_flag=$_LT_TAGVAR(lt_prog_compiler_pic, $1) compiler_flags=-v linker_flags=-v verstring= output_objdir=. libname=conftest lt_save_allow_undefined_flag=$_LT_TAGVAR(allow_undefined_flag, $1) _LT_TAGVAR(allow_undefined_flag, $1)= if AC_TRY_EVAL(_LT_TAGVAR(archive_cmds, $1) 2\>\&1 \| $GREP \" -lc \" \>/dev/null 2\>\&1) then lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=no else lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1)=yes fi _LT_TAGVAR(allow_undefined_flag, $1)=$lt_save_allow_undefined_flag else cat conftest.err 1>&5 fi $RM conftest* ]) _LT_TAGVAR(archive_cmds_need_lc, $1)=$lt_cv_[]_LT_TAGVAR(archive_cmds_need_lc, $1) ;; esac fi ;; esac _LT_TAGDECL([build_libtool_need_lc], [archive_cmds_need_lc], [0], [Whether or not to add -lc for building shared libraries]) _LT_TAGDECL([allow_libtool_libs_with_static_runtimes], [enable_shared_with_static_runtimes], [0], [Whether or not to disallow shared libs when runtime libs are static]) _LT_TAGDECL([], [export_dynamic_flag_spec], [1], [Compiler flag to allow reflexive dlopens]) _LT_TAGDECL([], [whole_archive_flag_spec], [1], [Compiler flag to generate shared objects directly from archives]) _LT_TAGDECL([], [compiler_needs_object], [1], [Whether the compiler copes with passing no objects directly]) _LT_TAGDECL([], [old_archive_from_new_cmds], [2], [Create an old-style archive from a shared archive]) _LT_TAGDECL([], [old_archive_from_expsyms_cmds], [2], [Create a temporary old-style archive to link instead of a shared archive]) _LT_TAGDECL([], [archive_cmds], [2], [Commands used to build a shared archive]) _LT_TAGDECL([], [archive_expsym_cmds], [2]) _LT_TAGDECL([], [module_cmds], [2], [Commands used to build a loadable module if different from building a shared archive.]) _LT_TAGDECL([], [module_expsym_cmds], [2]) _LT_TAGDECL([], [with_gnu_ld], [1], [Whether we are building with GNU ld or not]) _LT_TAGDECL([], [allow_undefined_flag], [1], [Flag that allows shared libraries with undefined symbols to be built]) _LT_TAGDECL([], [no_undefined_flag], [1], [Flag that enforces no undefined symbols]) _LT_TAGDECL([], [hardcode_libdir_flag_spec], [1], [Flag to hardcode $libdir into a binary during linking. This must work even if $libdir does not exist]) _LT_TAGDECL([], [hardcode_libdir_separator], [1], [Whether we need a single "-rpath" flag with a separated argument]) _LT_TAGDECL([], [hardcode_direct], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_direct_absolute], [0], [Set to "yes" if using DIR/libNAME${shared_ext} during linking hardcodes DIR into the resulting binary and the resulting library dependency is "absolute", i.e impossible to change by setting ${shlibpath_var} if the library is relocated]) _LT_TAGDECL([], [hardcode_minus_L], [0], [Set to "yes" if using the -LDIR flag during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_shlibpath_var], [0], [Set to "yes" if using SHLIBPATH_VAR=DIR during linking hardcodes DIR into the resulting binary]) _LT_TAGDECL([], [hardcode_automatic], [0], [Set to "yes" if building a shared library automatically hardcodes DIR into the library and all subsequent libraries and executables linked against it]) _LT_TAGDECL([], [inherit_rpath], [0], [Set to yes if linker adds runtime paths of dependent libraries to runtime path list]) _LT_TAGDECL([], [link_all_deplibs], [0], [Whether libtool must link a program against all its dependency libraries]) _LT_TAGDECL([], [always_export_symbols], [0], [Set to "yes" if exported symbols are required]) _LT_TAGDECL([], [export_symbols_cmds], [2], [The commands to list exported symbols]) _LT_TAGDECL([], [exclude_expsyms], [1], [Symbols that should not be listed in the preloaded symbols]) _LT_TAGDECL([], [include_expsyms], [1], [Symbols that must always be exported]) _LT_TAGDECL([], [prelink_cmds], [2], [Commands necessary for linking programs (against libraries) with templates]) _LT_TAGDECL([], [postlink_cmds], [2], [Commands necessary for finishing linking programs]) _LT_TAGDECL([], [file_list_spec], [1], [Specify filename containing input files]) dnl FIXME: Not yet implemented dnl _LT_TAGDECL([], [thread_safe_flag_spec], [1], dnl [Compiler flag to generate thread safe objects]) ])# _LT_LINKER_SHLIBS # _LT_LANG_C_CONFIG([TAG]) # ------------------------ # Ensure that the configuration variables for a C compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_C_CONFIG], [m4_require([_LT_DECL_EGREP])dnl lt_save_CC="$CC" AC_LANG_PUSH(C) # Source file extension for C test sources. ac_ext=c # Object file extension for compiled C test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(){return(0);}' _LT_TAG_COMPILER # Save the default compiler, since it gets overwritten when the other # tags are being tested, and _LT_TAGVAR(compiler, []) is a NOP. compiler_DEFAULT=$CC # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) LT_SYS_DLOPEN_SELF _LT_CMD_STRIPLIB # Report which library types will actually be built AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_CONFIG($1) fi AC_LANG_POP CC="$lt_save_CC" ])# _LT_LANG_C_CONFIG # _LT_LANG_CXX_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a C++ compiler are suitably # defined. These variables are subsequently used by _LT_CONFIG to write # the compiler configuration to `libtool'. m4_defun([_LT_LANG_CXX_CONFIG], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl m4_require([_LT_DECL_EGREP])dnl m4_require([_LT_PATH_MANIFEST_TOOL])dnl if test -n "$CXX" && ( test "X$CXX" != "Xno" && ( (test "X$CXX" = "Xg++" && `g++ -v >/dev/null 2>&1` ) || (test "X$CXX" != "Xg++"))) ; then AC_PROG_CXXCPP else _lt_caught_CXX_error=yes fi AC_LANG_PUSH(C++) _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(compiler_needs_object, $1)=no _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=unsupported _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for C++ test sources. ac_ext=cpp # Object file extension for compiled C++ test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the CXX compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_caught_CXX_error" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="int some_variable = 0;" # Code to be used in simple link tests lt_simple_link_test_code='int main(int, char *[[]]) { return(0); }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_LD=$LD lt_save_GCC=$GCC GCC=$GXX lt_save_with_gnu_ld=$with_gnu_ld lt_save_path_LD=$lt_cv_path_LD if test -n "${lt_cv_prog_gnu_ldcxx+set}"; then lt_cv_prog_gnu_ld=$lt_cv_prog_gnu_ldcxx else $as_unset lt_cv_prog_gnu_ld fi if test -n "${lt_cv_path_LDCXX+set}"; then lt_cv_path_LD=$lt_cv_path_LDCXX else $as_unset lt_cv_path_LD fi test -z "${LDCXX+set}" || LD=$LDCXX CC=${CXX-"c++"} CFLAGS=$CXXFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then # We don't want -fno-exception when compiling C++ code, so set the # no_builtin_flag separately if test "$GXX" = yes; then _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)=' -fno-builtin' else _LT_TAGVAR(lt_prog_compiler_no_builtin_flag, $1)= fi if test "$GXX" = yes; then # Set up default GNU C++ configuration LT_PATH_LD # Check if GNU C++ uses GNU ld as the underlying linker, since the # archiving commands below assume that GNU ld is being used. if test "$with_gnu_ld" = yes; then _LT_TAGVAR(archive_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC $pic_flag -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # If archive_cmds runs LD, not CC, wlarc should be empty # XXX I think wlarc can be eliminated in ltcf-cxx, but I need to # investigate it a little bit more. (MM) wlarc='${wl}' # ancient GNU ld didn't support --whole-archive et. al. if eval "`$CC -print-prog-name=ld` --help 2>&1" | $GREP 'no-whole-archive' > /dev/null; then _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' else _LT_TAGVAR(whole_archive_flag_spec, $1)= fi else with_gnu_ld=no wlarc= # A generic and very simple default shared library creation # command for GNU C++ for the case where it uses the native # linker, instead of GNU ld. If possible, this setting should # overridden to take advantage of the native linker features on # the platform it is being used on. _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' fi # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else GXX=no with_gnu_ld=no wlarc= fi # PORTME: fill in a description of your system's C++ link characteristics AC_MSG_CHECKING([whether the $compiler linker ($LD) supports shared libraries]) _LT_TAGVAR(ld_shlibs, $1)=yes case $host_os in aix3*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aix[[4-9]]*) if test "$host_cpu" = ia64; then # On IA64, the linker does run time linking by default, so we don't # have to do anything special. aix_use_runtimelinking=no exp_sym_flag='-Bexport' no_entry_flag="" else aix_use_runtimelinking=no # Test if we are trying to use run time linking or normal # AIX style linking. If -brtl is somewhere in LDFLAGS, we # need to do runtime linking. case $host_os in aix4.[[23]]|aix4.[[23]].*|aix[[5-9]]*) for ld_flag in $LDFLAGS; do case $ld_flag in *-brtl*) aix_use_runtimelinking=yes break ;; esac done ;; esac exp_sym_flag='-bexport' no_entry_flag='-bnoentry' fi # When large executables or shared objects are built, AIX ld can # have problems creating the table of contents. If linking a library # or program results in "error TOC overflow" add -mminimal-toc to # CXXFLAGS/CFLAGS for g++/gcc. In the cases where that is not # enough to fix the problem, add -Wl,-bbigtoc to LDFLAGS. _LT_TAGVAR(archive_cmds, $1)='' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(file_list_spec, $1)='${wl}-f,' if test "$GXX" = yes; then case $host_os in aix4.[[012]]|aix4.[[012]].*) # We only want to do this on AIX 4.2 and lower, the check # below for broken collect2 doesn't work under 4.3+ collect2name=`${CC} -print-prog-name=collect2` if test -f "$collect2name" && strings "$collect2name" | $GREP resolve_lib_name >/dev/null then # We have reworked collect2 : else # We have old collect2 _LT_TAGVAR(hardcode_direct, $1)=unsupported # It fails to find uninstalled libraries when the uninstalled # path is not listed in the libpath. Setting hardcode_minus_L # to unsupported forces relinking _LT_TAGVAR(hardcode_minus_L, $1)=yes _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)= fi esac shared_flag='-shared' if test "$aix_use_runtimelinking" = yes; then shared_flag="$shared_flag "'${wl}-G' fi else # not using gcc if test "$host_cpu" = ia64; then # VisualAge C++, Version 5.5 for AIX 5L for IA-64, Beta 3 Release # chokes on -Wl,-G. The following line is correct: shared_flag='-G' else if test "$aix_use_runtimelinking" = yes; then shared_flag='${wl}-G' else shared_flag='${wl}-bM:SRE' fi fi fi _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-bexpall' # It seems that -bexpall does not export symbols beginning with # underscore (_), so it is better to generate a list of symbols to # export. _LT_TAGVAR(always_export_symbols, $1)=yes if test "$aix_use_runtimelinking" = yes; then # Warning - without using the other runtime loading flags (-brtl), # -berok will link without error, but may produce a broken library. _LT_TAGVAR(allow_undefined_flag, $1)='-berok' # Determine the default libpath from the value encoded in an empty # executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags `if test "x${allow_undefined_flag}" != "x"; then func_echo_all "${wl}${allow_undefined_flag}"; else :; fi` '"\${wl}$exp_sym_flag:\$export_symbols $shared_flag" else if test "$host_cpu" = ia64; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $libdir:/usr/lib:/lib' _LT_TAGVAR(allow_undefined_flag, $1)="-z nodefs" _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs '"\${wl}$no_entry_flag"' $compiler_flags ${wl}${allow_undefined_flag} '"\${wl}$exp_sym_flag:\$export_symbols" else # Determine the default libpath from the value encoded in an # empty executable. _LT_SYS_MODULE_PATH_AIX([$1]) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-blibpath:$libdir:'"$aix_libpath" # Warning - without using the other run time loading flags, # -berok will link without error, but may produce a broken library. _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-bernotok' _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-berok' if test "$with_gnu_ld" = yes; then # We only use this code for GNU lds that support --whole-archive. _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' else # Exported symbols can be pulled into shared objects from archives _LT_TAGVAR(whole_archive_flag_spec, $1)='$convenience' fi _LT_TAGVAR(archive_cmds_need_lc, $1)=yes # This is similar to how AIX traditionally builds its shared # libraries. _LT_TAGVAR(archive_expsym_cmds, $1)="\$CC $shared_flag"' -o $output_objdir/$soname $libobjs $deplibs ${wl}-bnoentry $compiler_flags ${wl}-bE:$export_symbols${allow_undefined_flag}~$AR $AR_FLAGS $output_objdir/$libname$release.a $output_objdir/$soname' fi fi ;; beos*) if $LD --help 2>&1 | $GREP ': supported targets:.* elf' > /dev/null; then _LT_TAGVAR(allow_undefined_flag, $1)=unsupported # Joseph Beckenbach says some releases of gcc # support --undefined. This deserves some investigation. FIXME _LT_TAGVAR(archive_cmds, $1)='$CC -nostart $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; chorus*) case $cc_basename in *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; cygwin* | mingw* | pw32* | cegcc*) case $GXX,$cc_basename in ,cl* | no,cl*) # Native MSVC # hardcode_libdir_flag_spec is actually meaningless, as there is # no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)=' ' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=yes _LT_TAGVAR(file_list_spec, $1)='@' # Tell ltmain to make .lib files, not .a files. libext=lib # Tell ltmain to make .dll files, not .so files. shrext_cmds=".dll" # FIXME: Setting linknames here is a bad hack. _LT_TAGVAR(archive_cmds, $1)='$CC -o $output_objdir/$soname $libobjs $compiler_flags $deplibs -Wl,-dll~linknames=' _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then $SED -n -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' -e '1\\\!p' < $export_symbols > $output_objdir/$soname.exp; else $SED -e 's/\\\\\\\(.*\\\\\\\)/-link\\\ -EXPORT:\\\\\\\1/' < $export_symbols > $output_objdir/$soname.exp; fi~ $CC -o $tool_output_objdir$soname $libobjs $compiler_flags $deplibs "@$tool_output_objdir$soname.exp" -Wl,-DLL,-IMPLIB:"$tool_output_objdir$libname.dll.lib"~ linknames=' # The linker will not automatically build a static lib if we build a DLL. # _LT_TAGVAR(old_archive_from_new_cmds, $1)='true' _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes # Don't use ranlib _LT_TAGVAR(old_postinstall_cmds, $1)='chmod 644 $oldlib' _LT_TAGVAR(postlink_cmds, $1)='lt_outputfile="@OUTPUT@"~ lt_tool_outputfile="@TOOL_OUTPUT@"~ case $lt_outputfile in *.exe|*.EXE) ;; *) lt_outputfile="$lt_outputfile.exe" lt_tool_outputfile="$lt_tool_outputfile.exe" ;; esac~ func_to_tool_file "$lt_outputfile"~ if test "$MANIFEST_TOOL" != ":" && test -f "$lt_outputfile.manifest"; then $MANIFEST_TOOL -manifest "$lt_tool_outputfile.manifest" -outputresource:"$lt_tool_outputfile" || exit 1; $RM "$lt_outputfile.manifest"; fi' ;; *) # g++ # _LT_TAGVAR(hardcode_libdir_flag_spec, $1) is actually meaningless, # as there is no search path for DLLs. _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-all-symbols' _LT_TAGVAR(allow_undefined_flag, $1)=unsupported _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=yes if $LD --help 2>&1 | $GREP 'auto-import' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' # If the export-symbols file already is a .def file (1st line # is EXPORTS), use it as is; otherwise, prepend... _LT_TAGVAR(archive_expsym_cmds, $1)='if test "x`$SED 1q $export_symbols`" = xEXPORTS; then cp $export_symbols $output_objdir/$soname.def; else echo EXPORTS > $output_objdir/$soname.def; cat $export_symbols >> $output_objdir/$soname.def; fi~ $CC -shared -nostdlib $output_objdir/$soname.def $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $output_objdir/$soname ${wl}--enable-auto-image-base -Xlinker --out-implib -Xlinker $lib' else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; darwin* | rhapsody*) _LT_DARWIN_LINKER_FEATURES($1) ;; dgux*) case $cc_basename in ec++*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; ghcx*) # Green Hills C++ Compiler # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; freebsd2.*) # C++ shared libraries reported to be fairly broken before # switch to ELF _LT_TAGVAR(ld_shlibs, $1)=no ;; freebsd-elf*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; freebsd* | dragonfly*) # FreeBSD 3 and later use GNU C++ and GNU ld with standard ELF # conventions _LT_TAGVAR(ld_shlibs, $1)=yes ;; gnu*) ;; haiku*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(link_all_deplibs, $1)=yes ;; hpux9*) _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -b ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $EGREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then _LT_TAGVAR(archive_cmds, $1)='$RM $output_objdir/$soname~$CC -shared -nostdlib $pic_flag ${wl}+b ${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || mv $output_objdir/$soname $lib' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; hpux10*|hpux11*) if test $with_gnu_ld = no; then _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}+b ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: case $host_cpu in hppa*64*|ia64*) ;; *) _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' ;; esac fi case $host_cpu in hppa*64*|ia64*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no ;; *) _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(hardcode_minus_L, $1)=yes # Not in the search PATH, # but as the default # location of the library. ;; esac case $cc_basename in CC*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; aCC*) case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -b ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`($CC -b $CFLAGS -v conftest.$objext 2>&1) | $GREP "\-L"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes; then if test $with_gnu_ld = no; then case $host_cpu in hppa*64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib -fPIC ${wl}+h ${wl}$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; ia64*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+nodefaultrpath -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib $pic_flag ${wl}+h ${wl}$soname ${wl}+b ${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' ;; esac fi else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; interix[[3-9]]*) _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' # Hack: On Interix 3.x, we cannot compile PIC because of a broken gcc. # Instead, shared libraries are loaded at an image base (0x10000000 by # default) and relocated if they conflict, which is a slow very memory # consuming and fragmenting process. To avoid this, we pick a random, # 256 KiB-aligned image base between 0x50000000 and 0x6FFC0000 at link # time. Moving up from 0x10000000 also allows more sbrk(2) space. _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='sed "s,^,_," $export_symbols >$output_objdir/$soname.expsym~$CC -shared $pic_flag $libobjs $deplibs $compiler_flags ${wl}-h,$soname ${wl}--retain-symbols-file,$output_objdir/$soname.expsym ${wl}--image-base,`expr ${RANDOM-$$} % 4096 / 2 \* 262144 + 1342177280` -o $lib' ;; irix5* | irix6*) case $cc_basename in CC*) # SGI C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared -all -multigot $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' # Archives containing C++ object files must be created using # "CC -ar", where "CC" is the IRIX C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -ar -WR,-u -o $oldlib $oldobjs' ;; *) if test "$GXX" = yes; then if test "$with_gnu_ld" = no; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' else _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` -o $lib' fi fi _LT_TAGVAR(link_all_deplibs, $1)=yes ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: _LT_TAGVAR(inherit_rpath, $1)=yes ;; linux* | k*bsd*-gnu | kopensolaris*-gnu) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo $lib | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib ${wl}-retain-symbols-file,$export_symbols; mv \$templib $lib' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 | $GREP "ld"`; rm -f libconftest$shared_ext; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' # Archives containing C++ object files must be created using # "CC -Bstatic", where "CC" is the KAI C++ compiler. _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; icpc* | ecpc* ) # Intel C++ with_gnu_ld=yes # version 8.0 and above of icpc choke on multiply defined symbols # if we add $predep_objects and $postdep_objects, however 7.1 and # earlier do not add the objects themselves. case `$CC -V 2>&1` in *"Version 7."*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; *) # Version 8.0 or newer tmp_idyn= case $host_cpu in ia64*) tmp_idyn=' -i_dynamic';; esac _LT_TAGVAR(archive_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared'"$tmp_idyn"' $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-retain-symbols-file $wl$export_symbols -o $lib' ;; esac _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive$convenience ${wl}--no-whole-archive' ;; pgCC* | pgcpp*) # Portland Group C++ compiler case `$CC -V` in *pgCC\ [[1-5]].* | *pgcpp\ [[1-5]].*) _LT_TAGVAR(prelink_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $objs $libobjs $compile_deplibs~ compile_command="$compile_command `find $tpldir -name \*.o | sort | $NL2SP`"' _LT_TAGVAR(old_archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $oldobjs$old_deplibs~ $AR $AR_FLAGS $oldlib$oldobjs$old_deplibs `find $tpldir -name \*.o | sort | $NL2SP`~ $RANLIB $oldlib' _LT_TAGVAR(archive_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='tpldir=Template.dir~ rm -rf $tpldir~ $CC --prelink_objects --instantiation_dir $tpldir $predep_objects $libobjs $deplibs $convenience $postdep_objects~ $CC -shared $pic_flag $predep_objects $libobjs $deplibs `find $tpldir -name \*.o | sort | $NL2SP` $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; *) # Version 6 and above use weak symbols _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname ${wl}-retain-symbols-file ${wl}$export_symbols -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}--rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`for conv in $convenience\"\"; do test -n \"$conv\" && new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' ;; cxx*) # Compaq C++ _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $wl$soname -o $lib ${wl}-retain-symbols-file $wl$export_symbols' runpath_var=LD_RUN_PATH _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld .*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "X$list" | $Xsed' ;; xl* | mpixl* | bgxl*) # IBM XL 8.0 on PPC, with GNU ld _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}--export-dynamic' _LT_TAGVAR(archive_cmds, $1)='$CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname -o $lib' if test "x$supports_anon_versioning" = xyes; then _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $output_objdir/$libname.ver~ cat $export_symbols | sed -e "s/\(.*\)/\1;/" >> $output_objdir/$libname.ver~ echo "local: *; };" >> $output_objdir/$libname.ver~ $CC -qmkshrobj $libobjs $deplibs $compiler_flags ${wl}-soname $wl$soname ${wl}-version-script ${wl}$output_objdir/$libname.ver -o $lib' fi ;; *) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file ${wl}$export_symbols' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}--whole-archive`new_convenience=; for conv in $convenience\"\"; do test -z \"$conv\" || new_convenience=\"$new_convenience,$conv\"; done; func_echo_all \"$new_convenience\"` ${wl}--no-whole-archive' _LT_TAGVAR(compiler_needs_object, $1)=yes # Not sure whether something based on # $CC $CFLAGS -v conftest.$objext -o libconftest$shared_ext 2>&1 # would be better. output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; esac ;; esac ;; lynxos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; m88k*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; mvs*) case $cc_basename in cxx*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; netbsd*) if echo __ELF__ | $CC -E - | $GREP __ELF__ >/dev/null; then _LT_TAGVAR(archive_cmds, $1)='$LD -Bshareable -o $lib $predep_objects $libobjs $deplibs $postdep_objects $linker_flags' wlarc= _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no fi # Workaround some broken pre-1.5 toolchains output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP conftest.$objext | $SED -e "s:-lgcc -lc -lgcc::"' ;; *nto* | *qnx*) _LT_TAGVAR(ld_shlibs, $1)=yes ;; openbsd2*) # C++ shared libraries are fairly broken _LT_TAGVAR(ld_shlibs, $1)=no ;; openbsd*) if test -f /usr/libexec/ld.so; then _LT_TAGVAR(hardcode_direct, $1)=yes _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=yes _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared $pic_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-retain-symbols-file,$export_symbols -o $lib' _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-E' _LT_TAGVAR(whole_archive_flag_spec, $1)="$wlarc"'--whole-archive$convenience '"$wlarc"'--no-whole-archive' fi output_verbose_link_cmd=func_echo_all else _LT_TAGVAR(ld_shlibs, $1)=no fi ;; osf3* | osf4* | osf5*) case $cc_basename in KCC*) # Kuck and Associates, Inc. (KAI) C++ Compiler # KCC will only create a shared library if the output file # ends with ".so" (or ".sl" for HP-UX), so rename the library # to its proper name (with version) after linking. _LT_TAGVAR(archive_cmds, $1)='tempext=`echo $shared_ext | $SED -e '\''s/\([[^()0-9A-Za-z{}]]\)/\\\\\1/g'\''`; templib=`echo "$lib" | $SED -e "s/\${tempext}\..*/.so/"`; $CC $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags --soname $soname -o \$templib; mv \$templib $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Archives containing C++ object files must be created using # the KAI C++ compiler. case $host in osf3*) _LT_TAGVAR(old_archive_cmds, $1)='$CC -Bstatic -o $oldlib $oldobjs' ;; *) _LT_TAGVAR(old_archive_cmds, $1)='$CC -o $oldlib $oldobjs' ;; esac ;; RCC*) # Rational C++ 2.4.1 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; cxx*) case $host in osf3*) _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname $soname `test -n "$verstring" && func_echo_all "${wl}-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' ;; *) _LT_TAGVAR(allow_undefined_flag, $1)=' -expect_unresolved \*' _LT_TAGVAR(archive_cmds, $1)='$CC -shared${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname `test -n "$verstring" && func_echo_all "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='for i in `cat $export_symbols`; do printf "%s %s\\n" -exported_symbol "\$i" >> $lib.exp; done~ echo "-hidden">> $lib.exp~ $CC -shared$allow_undefined_flag $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags -msym -soname $soname ${wl}-input ${wl}$lib.exp `test -n "$verstring" && $ECHO "-set_version $verstring"` -update_registry ${output_objdir}/so_locations -o $lib~ $RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-rpath $libdir' ;; esac _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. # # There doesn't appear to be a way to prevent this compiler from # explicitly linking system object files so we need to strip them # from the output so that they don't get included in the library # dependencies. output_verbose_link_cmd='templist=`$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP "ld" | $GREP -v "ld:"`; templist=`func_echo_all "$templist" | $SED "s/\(^.*ld.*\)\( .*ld.*$\)/\1/"`; list=""; for z in $templist; do case $z in conftest.$objext) list="$list $z";; *.$objext);; *) list="$list $z";;esac; done; func_echo_all "$list"' ;; *) if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(allow_undefined_flag, $1)=' ${wl}-expect_unresolved ${wl}\*' case $host in osf3*) _LT_TAGVAR(archive_cmds, $1)='$CC -shared -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib ${allow_undefined_flag} $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-msym ${wl}-soname ${wl}$soname `test -n "$verstring" && func_echo_all "${wl}-set_version ${wl}$verstring"` ${wl}-update_registry ${wl}${output_objdir}/so_locations -o $lib' ;; esac _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-rpath ${wl}$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=: # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no fi ;; esac ;; psos*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; sunos4*) case $cc_basename in CC*) # Sun C++ 4.x # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; lcc*) # Lucid # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # Sun C++ 4.2, 5.x and Centerline C++ _LT_TAGVAR(archive_cmds_need_lc,$1)=yes _LT_TAGVAR(no_undefined_flag, $1)=' -zdefs' _LT_TAGVAR(archive_cmds, $1)='$CC -G${allow_undefined_flag} -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G${allow_undefined_flag} ${wl}-M ${wl}$lib.exp -h$soname -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-R$libdir' _LT_TAGVAR(hardcode_shlibpath_var, $1)=no case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) # The compiler driver will combine and reorder linker options, # but understands `-z linker_flag'. # Supported since Solaris 2.6 (maybe 2.5.1?) _LT_TAGVAR(whole_archive_flag_spec, $1)='-z allextract$convenience -z defaultextract' ;; esac _LT_TAGVAR(link_all_deplibs, $1)=yes output_verbose_link_cmd='func_echo_all' # Archives containing C++ object files must be created using # "CC -xar", where "CC" is the Sun C++ compiler. This is # necessary to make sure instantiated templates are included # in the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC -xar -o $oldlib $oldobjs' ;; gcx*) # Green Hills C++ Compiler _LT_TAGVAR(archive_cmds, $1)='$CC -shared $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' # The C++ compiler must be used to create the archive. _LT_TAGVAR(old_archive_cmds, $1)='$CC $LDFLAGS -archive -o $oldlib $oldobjs' ;; *) # GNU C++ compiler with Solaris linker if test "$GXX" = yes && test "$with_gnu_ld" = no; then _LT_TAGVAR(no_undefined_flag, $1)=' ${wl}-z ${wl}defs' if $CC --version | $GREP -v '^2\.7' > /dev/null; then _LT_TAGVAR(archive_cmds, $1)='$CC -shared $pic_flag -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -shared $pic_flag -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -shared $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' else # g++ 2.7 appears to require `-G' NOT `-shared' on this # platform. _LT_TAGVAR(archive_cmds, $1)='$CC -G -nostdlib $LDFLAGS $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags ${wl}-h $wl$soname -o $lib' _LT_TAGVAR(archive_expsym_cmds, $1)='echo "{ global:" > $lib.exp~cat $export_symbols | $SED -e "s/\(.*\)/\1;/" >> $lib.exp~echo "local: *; };" >> $lib.exp~ $CC -G -nostdlib ${wl}-M $wl$lib.exp -o $lib $predep_objects $libobjs $deplibs $postdep_objects $compiler_flags~$RM $lib.exp' # Commands to make compiler produce verbose output that lists # what "hidden" libraries, object files and flags are used when # linking a shared library. output_verbose_link_cmd='$CC -G $CFLAGS -v conftest.$objext 2>&1 | $GREP -v "^Configured with:" | $GREP "\-L"' fi _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R $wl$libdir' case $host_os in solaris2.[[0-5]] | solaris2.[[0-5]].*) ;; *) _LT_TAGVAR(whole_archive_flag_spec, $1)='${wl}-z ${wl}allextract$convenience ${wl}-z ${wl}defaultextract' ;; esac fi ;; esac ;; sysv4*uw2* | sysv5OpenUNIX* | sysv5UnixWare7.[[01]].[[10]]* | unixware7* | sco3.2v5.0.[[024]]*) _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; sysv5* | sco3.2v5* | sco5v6*) # Note: We can NOT use -z defs as we might desire, because we do not # link with -lc, and that would cause any symbols used from libc to # always be unresolved, which means just about no library would # ever link correctly. If we're not using GNU ld we use -z text # though, which does catch some bad symbols but isn't as heavy-handed # as -z defs. _LT_TAGVAR(no_undefined_flag, $1)='${wl}-z,text' _LT_TAGVAR(allow_undefined_flag, $1)='${wl}-z,nodefs' _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(hardcode_shlibpath_var, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)='${wl}-R,$libdir' _LT_TAGVAR(hardcode_libdir_separator, $1)=':' _LT_TAGVAR(link_all_deplibs, $1)=yes _LT_TAGVAR(export_dynamic_flag_spec, $1)='${wl}-Bexport' runpath_var='LD_RUN_PATH' case $cc_basename in CC*) _LT_TAGVAR(archive_cmds, $1)='$CC -G ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -G ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(old_archive_cmds, $1)='$CC -Tprelink_objects $oldobjs~ '"$_LT_TAGVAR(old_archive_cmds, $1)" _LT_TAGVAR(reload_cmds, $1)='$CC -Tprelink_objects $reload_objs~ '"$_LT_TAGVAR(reload_cmds, $1)" ;; *) _LT_TAGVAR(archive_cmds, $1)='$CC -shared ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' _LT_TAGVAR(archive_expsym_cmds, $1)='$CC -shared ${wl}-Bexport:$export_symbols ${wl}-h,$soname -o $lib $libobjs $deplibs $compiler_flags' ;; esac ;; tandem*) case $cc_basename in NCC*) # NonStop-UX NCC 3.20 # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac ;; vxworks*) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; *) # FIXME: insert proper C++ library support _LT_TAGVAR(ld_shlibs, $1)=no ;; esac AC_MSG_RESULT([$_LT_TAGVAR(ld_shlibs, $1)]) test "$_LT_TAGVAR(ld_shlibs, $1)" = no && can_build_shared=no _LT_TAGVAR(GCC, $1)="$GXX" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS LDCXX=$LD LD=$lt_save_LD GCC=$lt_save_GCC with_gnu_ld=$lt_save_with_gnu_ld lt_cv_path_LDCXX=$lt_cv_path_LD lt_cv_path_LD=$lt_save_path_LD lt_cv_prog_gnu_ldcxx=$lt_cv_prog_gnu_ld lt_cv_prog_gnu_ld=$lt_save_with_gnu_ld fi # test "$_lt_caught_CXX_error" != yes AC_LANG_POP ])# _LT_LANG_CXX_CONFIG # _LT_FUNC_STRIPNAME_CNF # ---------------------- # func_stripname_cnf prefix suffix name # strip PREFIX and SUFFIX off of NAME. # PREFIX and SUFFIX must not contain globbing or regex special # characters, hashes, percent signs, but SUFFIX may contain a leading # dot (in which case that matches only a dot). # # This function is identical to the (non-XSI) version of func_stripname, # except this one can be used by m4 code that may be executed by configure, # rather than the libtool script. m4_defun([_LT_FUNC_STRIPNAME_CNF],[dnl AC_REQUIRE([_LT_DECL_SED]) AC_REQUIRE([_LT_PROG_ECHO_BACKSLASH]) func_stripname_cnf () { case ${2} in .*) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%\\\\${2}\$%%"`;; *) func_stripname_result=`$ECHO "${3}" | $SED "s%^${1}%%; s%${2}\$%%"`;; esac } # func_stripname_cnf ])# _LT_FUNC_STRIPNAME_CNF # _LT_SYS_HIDDEN_LIBDEPS([TAGNAME]) # --------------------------------- # Figure out "hidden" library dependencies from verbose # compiler output when linking a shared library. # Parse the compiler output and extract the necessary # objects, libraries and library flags. m4_defun([_LT_SYS_HIDDEN_LIBDEPS], [m4_require([_LT_FILEUTILS_DEFAULTS])dnl AC_REQUIRE([_LT_FUNC_STRIPNAME_CNF])dnl # Dependencies to place before and after the object being linked: _LT_TAGVAR(predep_objects, $1)= _LT_TAGVAR(postdep_objects, $1)= _LT_TAGVAR(predeps, $1)= _LT_TAGVAR(postdeps, $1)= _LT_TAGVAR(compiler_lib_search_path, $1)= dnl we can't use the lt_simple_compile_test_code here, dnl because it contains code intended for an executable, dnl not a library. It's possible we should let each dnl tag define a new lt_????_link_test_code variable, dnl but it's only used here... m4_if([$1], [], [cat > conftest.$ac_ext <<_LT_EOF int a; void foo (void) { a = 0; } _LT_EOF ], [$1], [CXX], [cat > conftest.$ac_ext <<_LT_EOF class Foo { public: Foo (void) { a = 0; } private: int a; }; _LT_EOF ], [$1], [F77], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer*4 a a=0 return end _LT_EOF ], [$1], [FC], [cat > conftest.$ac_ext <<_LT_EOF subroutine foo implicit none integer a a=0 return end _LT_EOF ], [$1], [GCJ], [cat > conftest.$ac_ext <<_LT_EOF public class foo { private int a; public void bar (void) { a = 0; } }; _LT_EOF ], [$1], [GO], [cat > conftest.$ac_ext <<_LT_EOF package foo func foo() { } _LT_EOF ]) _lt_libdeps_save_CFLAGS=$CFLAGS case "$CC $CFLAGS " in #( *\ -flto*\ *) CFLAGS="$CFLAGS -fno-lto" ;; *\ -fwhopr*\ *) CFLAGS="$CFLAGS -fno-whopr" ;; *\ -fuse-linker-plugin*\ *) CFLAGS="$CFLAGS -fno-use-linker-plugin" ;; esac dnl Parse the compiler output and extract the necessary dnl objects, libraries and library flags. if AC_TRY_EVAL(ac_compile); then # Parse the compiler output and extract the necessary # objects, libraries and library flags. # Sentinel used to keep track of whether or not we are before # the conftest object file. pre_test_object_deps_done=no for p in `eval "$output_verbose_link_cmd"`; do case ${prev}${p} in -L* | -R* | -l*) # Some compilers place space between "-{L,R}" and the path. # Remove the space. if test $p = "-L" || test $p = "-R"; then prev=$p continue fi # Expand the sysroot to ease extracting the directories later. if test -z "$prev"; then case $p in -L*) func_stripname_cnf '-L' '' "$p"; prev=-L; p=$func_stripname_result ;; -R*) func_stripname_cnf '-R' '' "$p"; prev=-R; p=$func_stripname_result ;; -l*) func_stripname_cnf '-l' '' "$p"; prev=-l; p=$func_stripname_result ;; esac fi case $p in =*) func_stripname_cnf '=' '' "$p"; p=$lt_sysroot$func_stripname_result ;; esac if test "$pre_test_object_deps_done" = no; then case ${prev} in -L | -R) # Internal compiler library paths should come after those # provided the user. The postdeps already come after the # user supplied libs so there is no need to process them. if test -z "$_LT_TAGVAR(compiler_lib_search_path, $1)"; then _LT_TAGVAR(compiler_lib_search_path, $1)="${prev}${p}" else _LT_TAGVAR(compiler_lib_search_path, $1)="${_LT_TAGVAR(compiler_lib_search_path, $1)} ${prev}${p}" fi ;; # The "-l" case would never come before the object being # linked, so don't bother handling this case. esac else if test -z "$_LT_TAGVAR(postdeps, $1)"; then _LT_TAGVAR(postdeps, $1)="${prev}${p}" else _LT_TAGVAR(postdeps, $1)="${_LT_TAGVAR(postdeps, $1)} ${prev}${p}" fi fi prev= ;; *.lto.$objext) ;; # Ignore GCC LTO objects *.$objext) # This assumes that the test object file only shows up # once in the compiler output. if test "$p" = "conftest.$objext"; then pre_test_object_deps_done=yes continue fi if test "$pre_test_object_deps_done" = no; then if test -z "$_LT_TAGVAR(predep_objects, $1)"; then _LT_TAGVAR(predep_objects, $1)="$p" else _LT_TAGVAR(predep_objects, $1)="$_LT_TAGVAR(predep_objects, $1) $p" fi else if test -z "$_LT_TAGVAR(postdep_objects, $1)"; then _LT_TAGVAR(postdep_objects, $1)="$p" else _LT_TAGVAR(postdep_objects, $1)="$_LT_TAGVAR(postdep_objects, $1) $p" fi fi ;; *) ;; # Ignore the rest. esac done # Clean up. rm -f a.out a.exe else echo "libtool.m4: error: problem compiling $1 test program" fi $RM -f confest.$objext CFLAGS=$_lt_libdeps_save_CFLAGS # PORTME: override above test on systems where it is broken m4_if([$1], [CXX], [case $host_os in interix[[3-9]]*) # Interix 3.5 installs completely hosed .la files for C++, so rather than # hack all around it, let's just trust "g++" to DTRT. _LT_TAGVAR(predep_objects,$1)= _LT_TAGVAR(postdep_objects,$1)= _LT_TAGVAR(postdeps,$1)= ;; linux*) case `$CC -V 2>&1 | sed 5q` in *Sun\ C*) # Sun C++ 5.9 # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; solaris*) case $cc_basename in CC* | sunCC*) # The more standards-conforming stlport4 library is # incompatible with the Cstd library. Avoid specifying # it if it's in CXXFLAGS. Ignore libCrun as # -library=stlport4 depends on it. case " $CXX $CXXFLAGS " in *" -library=stlport4 "*) solaris_use_stlport4=yes ;; esac # Adding this requires a known-good setup of shared libraries for # Sun compiler versions before 5.6, else PIC objects from an old # archive will be linked into the output, leading to subtle bugs. if test "$solaris_use_stlport4" != yes; then _LT_TAGVAR(postdeps,$1)='-library=Cstd -library=Crun' fi ;; esac ;; esac ]) case " $_LT_TAGVAR(postdeps, $1) " in *" -lc "*) _LT_TAGVAR(archive_cmds_need_lc, $1)=no ;; esac _LT_TAGVAR(compiler_lib_search_dirs, $1)= if test -n "${_LT_TAGVAR(compiler_lib_search_path, $1)}"; then _LT_TAGVAR(compiler_lib_search_dirs, $1)=`echo " ${_LT_TAGVAR(compiler_lib_search_path, $1)}" | ${SED} -e 's! -L! !g' -e 's!^ !!'` fi _LT_TAGDECL([], [compiler_lib_search_dirs], [1], [The directories searched by this compiler when creating a shared library]) _LT_TAGDECL([], [predep_objects], [1], [Dependencies to place before and after the objects being linked to create a shared library]) _LT_TAGDECL([], [postdep_objects], [1]) _LT_TAGDECL([], [predeps], [1]) _LT_TAGDECL([], [postdeps], [1]) _LT_TAGDECL([], [compiler_lib_search_path], [1], [The library search path used internally by the compiler when linking a shared library]) ])# _LT_SYS_HIDDEN_LIBDEPS # _LT_LANG_F77_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for a Fortran 77 compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_F77_CONFIG], [AC_LANG_PUSH(Fortran 77) if test -z "$F77" || test "X$F77" = "Xno"; then _lt_disable_F77=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for f77 test sources. ac_ext=f # Object file extension for compiled f77 test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the F77 compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_F77" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${F77-"f77"} CFLAGS=$FFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) GCC=$G77 if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$G77" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC="$lt_save_CC" CFLAGS="$lt_save_CFLAGS" fi # test "$_lt_disable_F77" != yes AC_LANG_POP ])# _LT_LANG_F77_CONFIG # _LT_LANG_FC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for a Fortran compiler are # suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_FC_CONFIG], [AC_LANG_PUSH(Fortran) if test -z "$FC" || test "X$FC" = "Xno"; then _lt_disable_FC=yes fi _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(allow_undefined_flag, $1)= _LT_TAGVAR(always_export_symbols, $1)=no _LT_TAGVAR(archive_expsym_cmds, $1)= _LT_TAGVAR(export_dynamic_flag_spec, $1)= _LT_TAGVAR(hardcode_direct, $1)=no _LT_TAGVAR(hardcode_direct_absolute, $1)=no _LT_TAGVAR(hardcode_libdir_flag_spec, $1)= _LT_TAGVAR(hardcode_libdir_separator, $1)= _LT_TAGVAR(hardcode_minus_L, $1)=no _LT_TAGVAR(hardcode_automatic, $1)=no _LT_TAGVAR(inherit_rpath, $1)=no _LT_TAGVAR(module_cmds, $1)= _LT_TAGVAR(module_expsym_cmds, $1)= _LT_TAGVAR(link_all_deplibs, $1)=unknown _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds _LT_TAGVAR(no_undefined_flag, $1)= _LT_TAGVAR(whole_archive_flag_spec, $1)= _LT_TAGVAR(enable_shared_with_static_runtimes, $1)=no # Source file extension for fc test sources. ac_ext=${ac_fc_srcext-f} # Object file extension for compiled fc test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # No sense in running all these tests if we already determined that # the FC compiler isn't working. Some variables (like enable_shared) # are currently assumed to apply to all compilers on this platform, # and will be corrupted by setting them based on a non-working compiler. if test "$_lt_disable_FC" != yes; then # Code to be used in simple compile tests lt_simple_compile_test_code="\ subroutine t return end " # Code to be used in simple link tests lt_simple_link_test_code="\ program t end " # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_GCC=$GCC lt_save_CFLAGS=$CFLAGS CC=${FC-"f95"} CFLAGS=$FCFLAGS compiler=$CC GCC=$ac_cv_fc_compiler_gnu _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) if test -n "$compiler"; then AC_MSG_CHECKING([if libtool supports shared libraries]) AC_MSG_RESULT([$can_build_shared]) AC_MSG_CHECKING([whether to build shared libraries]) test "$can_build_shared" = "no" && enable_shared=no # On AIX, shared libraries and static libraries use the same namespace, and # are all built from PIC. case $host_os in aix3*) test "$enable_shared" = yes && enable_static=no if test -n "$RANLIB"; then archive_cmds="$archive_cmds~\$RANLIB \$lib" postinstall_cmds='$RANLIB $lib' fi ;; aix[[4-9]]*) if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then test "$enable_shared" = yes && enable_static=no fi ;; esac AC_MSG_RESULT([$enable_shared]) AC_MSG_CHECKING([whether to build static libraries]) # Make sure either enable_shared or enable_static is yes. test "$enable_shared" = yes || enable_static=yes AC_MSG_RESULT([$enable_static]) _LT_TAGVAR(GCC, $1)="$ac_cv_fc_compiler_gnu" _LT_TAGVAR(LD, $1)="$LD" ## CAVEAT EMPTOR: ## There is no encapsulation within the following macros, do not change ## the running order or otherwise move them around unless you know exactly ## what you are doing... _LT_SYS_HIDDEN_LIBDEPS($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_SYS_DYNAMIC_LINKER($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi # test -n "$compiler" GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS fi # test "$_lt_disable_FC" != yes AC_LANG_POP ])# _LT_LANG_FC_CONFIG # _LT_LANG_GCJ_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Java Compiler compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GCJ_CONFIG], [AC_REQUIRE([LT_PROG_GCJ])dnl AC_LANG_SAVE # Source file extension for Java test sources. ac_ext=java # Object file extension for compiled Java test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="class foo {}" # Code to be used in simple link tests lt_simple_link_test_code='public class conftest { public static void main(String[[]] argv) {}; }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GCJ-"gcj"} CFLAGS=$GCJFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # GCJ did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GCJ_CONFIG # _LT_LANG_GO_CONFIG([TAG]) # -------------------------- # Ensure that the configuration variables for the GNU Go compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_GO_CONFIG], [AC_REQUIRE([LT_PROG_GO])dnl AC_LANG_SAVE # Source file extension for Go test sources. ac_ext=go # Object file extension for compiled Go test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code="package main; func main() { }" # Code to be used in simple link tests lt_simple_link_test_code='package main; func main() { }' # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC=$CC lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC=yes CC=${GOC-"gccgo"} CFLAGS=$GOFLAGS compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_TAGVAR(LD, $1)="$LD" _LT_CC_BASENAME([$compiler]) # Go did not exist at the time GCC didn't implicitly link libc in. _LT_TAGVAR(archive_cmds_need_lc, $1)=no _LT_TAGVAR(old_archive_cmds, $1)=$old_archive_cmds _LT_TAGVAR(reload_flag, $1)=$reload_flag _LT_TAGVAR(reload_cmds, $1)=$reload_cmds if test -n "$compiler"; then _LT_COMPILER_NO_RTTI($1) _LT_COMPILER_PIC($1) _LT_COMPILER_C_O($1) _LT_COMPILER_FILE_LOCKS($1) _LT_LINKER_SHLIBS($1) _LT_LINKER_HARDCODE_LIBPATH($1) _LT_CONFIG($1) fi AC_LANG_RESTORE GCC=$lt_save_GCC CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_GO_CONFIG # _LT_LANG_RC_CONFIG([TAG]) # ------------------------- # Ensure that the configuration variables for the Windows resource compiler # are suitably defined. These variables are subsequently used by _LT_CONFIG # to write the compiler configuration to `libtool'. m4_defun([_LT_LANG_RC_CONFIG], [AC_REQUIRE([LT_PROG_RC])dnl AC_LANG_SAVE # Source file extension for RC test sources. ac_ext=rc # Object file extension for compiled RC test sources. objext=o _LT_TAGVAR(objext, $1)=$objext # Code to be used in simple compile tests lt_simple_compile_test_code='sample MENU { MENUITEM "&Soup", 100, CHECKED }' # Code to be used in simple link tests lt_simple_link_test_code="$lt_simple_compile_test_code" # ltmain only uses $CC for tagged configurations so make sure $CC is set. _LT_TAG_COMPILER # save warnings/boilerplate of simple test code _LT_COMPILER_BOILERPLATE _LT_LINKER_BOILERPLATE # Allow CC to be a program name with arguments. lt_save_CC="$CC" lt_save_CFLAGS=$CFLAGS lt_save_GCC=$GCC GCC= CC=${RC-"windres"} CFLAGS= compiler=$CC _LT_TAGVAR(compiler, $1)=$CC _LT_CC_BASENAME([$compiler]) _LT_TAGVAR(lt_cv_prog_compiler_c_o, $1)=yes if test -n "$compiler"; then : _LT_CONFIG($1) fi GCC=$lt_save_GCC AC_LANG_RESTORE CC=$lt_save_CC CFLAGS=$lt_save_CFLAGS ])# _LT_LANG_RC_CONFIG # LT_PROG_GCJ # ----------- AC_DEFUN([LT_PROG_GCJ], [m4_ifdef([AC_PROG_GCJ], [AC_PROG_GCJ], [m4_ifdef([A][M_PROG_GCJ], [A][M_PROG_GCJ], [AC_CHECK_TOOL(GCJ, gcj,) test "x${GCJFLAGS+set}" = xset || GCJFLAGS="-g -O2" AC_SUBST(GCJFLAGS)])])[]dnl ]) # Old name: AU_ALIAS([LT_AC_PROG_GCJ], [LT_PROG_GCJ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_GCJ], []) # LT_PROG_GO # ---------- AC_DEFUN([LT_PROG_GO], [AC_CHECK_TOOL(GOC, gccgo,) ]) # LT_PROG_RC # ---------- AC_DEFUN([LT_PROG_RC], [AC_CHECK_TOOL(RC, windres,) ]) # Old name: AU_ALIAS([LT_AC_PROG_RC], [LT_PROG_RC]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_RC], []) # _LT_DECL_EGREP # -------------- # If we don't have a new enough Autoconf to choose the best grep # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_EGREP], [AC_REQUIRE([AC_PROG_EGREP])dnl AC_REQUIRE([AC_PROG_FGREP])dnl test -z "$GREP" && GREP=grep _LT_DECL([], [GREP], [1], [A grep program that handles long lines]) _LT_DECL([], [EGREP], [1], [An ERE matcher]) _LT_DECL([], [FGREP], [1], [A literal string matcher]) dnl Non-bleeding-edge autoconf doesn't subst GREP, so do it here too AC_SUBST([GREP]) ]) # _LT_DECL_OBJDUMP # -------------- # If we don't have a new enough Autoconf to choose the best objdump # available, choose the one first in the user's PATH. m4_defun([_LT_DECL_OBJDUMP], [AC_CHECK_TOOL(OBJDUMP, objdump, false) test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [An object symbol dumper]) AC_SUBST([OBJDUMP]) ]) # _LT_DECL_DLLTOOL # ---------------- # Ensure DLLTOOL variable is set. m4_defun([_LT_DECL_DLLTOOL], [AC_CHECK_TOOL(DLLTOOL, dlltool, false) test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program]) AC_SUBST([DLLTOOL]) ]) # _LT_DECL_SED # ------------ # Check for a fully-functional sed program, that truncates # as few characters as possible. Prefer GNU sed if found. m4_defun([_LT_DECL_SED], [AC_PROG_SED test -z "$SED" && SED=sed Xsed="$SED -e 1s/^X//" _LT_DECL([], [SED], [1], [A sed program that does not truncate output]) _LT_DECL([], [Xsed], ["\$SED -e 1s/^X//"], [Sed that helps us avoid accidentally triggering echo(1) options like -n]) ])# _LT_DECL_SED m4_ifndef([AC_PROG_SED], [ # NOTE: This macro has been submitted for inclusion into # # GNU Autoconf as AC_PROG_SED. When it is available in # # a released version of Autoconf we should remove this # # macro and use it instead. # m4_defun([AC_PROG_SED], [AC_MSG_CHECKING([for a sed that does not truncate output]) AC_CACHE_VAL(lt_cv_path_SED, [# Loop through the user's path and test for sed and gsed. # Then use that list of sed's as ones to test for truncation. as_save_IFS=$IFS; IFS=$PATH_SEPARATOR for as_dir in $PATH do IFS=$as_save_IFS test -z "$as_dir" && as_dir=. for lt_ac_prog in sed gsed; do for ac_exec_ext in '' $ac_executable_extensions; do if $as_executable_p "$as_dir/$lt_ac_prog$ac_exec_ext"; then lt_ac_sed_list="$lt_ac_sed_list $as_dir/$lt_ac_prog$ac_exec_ext" fi done done done IFS=$as_save_IFS lt_ac_max=0 lt_ac_count=0 # Add /usr/xpg4/bin/sed as it is typically found on Solaris # along with /bin/sed that truncates output. for lt_ac_sed in $lt_ac_sed_list /usr/xpg4/bin/sed; do test ! -f $lt_ac_sed && continue cat /dev/null > conftest.in lt_ac_count=0 echo $ECHO_N "0123456789$ECHO_C" >conftest.in # Check for GNU sed and select it if it is found. if "$lt_ac_sed" --version 2>&1 < /dev/null | grep 'GNU' > /dev/null; then lt_cv_path_SED=$lt_ac_sed break fi while true; do cat conftest.in conftest.in >conftest.tmp mv conftest.tmp conftest.in cp conftest.in conftest.nl echo >>conftest.nl $lt_ac_sed -e 's/a$//' < conftest.nl >conftest.out || break cmp -s conftest.out conftest.nl || break # 10000 chars as input seems more than enough test $lt_ac_count -gt 10 && break lt_ac_count=`expr $lt_ac_count + 1` if test $lt_ac_count -gt $lt_ac_max; then lt_ac_max=$lt_ac_count lt_cv_path_SED=$lt_ac_sed fi done done ]) SED=$lt_cv_path_SED AC_SUBST([SED]) AC_MSG_RESULT([$SED]) ])#AC_PROG_SED ])#m4_ifndef # Old name: AU_ALIAS([LT_AC_PROG_SED], [AC_PROG_SED]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([LT_AC_PROG_SED], []) # _LT_CHECK_SHELL_FEATURES # ------------------------ # Find out whether the shell is Bourne or XSI compatible, # or has some other useful features. m4_defun([_LT_CHECK_SHELL_FEATURES], [AC_MSG_CHECKING([whether the shell understands some XSI constructs]) # Try some XSI features xsi_shell=no ( _lt_dummy="a/b/c" test "${_lt_dummy##*/},${_lt_dummy%/*},${_lt_dummy#??}"${_lt_dummy%"$_lt_dummy"}, \ = c,a/b,b/c, \ && eval 'test $(( 1 + 1 )) -eq 2 \ && test "${#_lt_dummy}" -eq 5' ) >/dev/null 2>&1 \ && xsi_shell=yes AC_MSG_RESULT([$xsi_shell]) _LT_CONFIG_LIBTOOL_INIT([xsi_shell='$xsi_shell']) AC_MSG_CHECKING([whether the shell understands "+="]) lt_shell_append=no ( foo=bar; set foo baz; eval "$[1]+=\$[2]" && test "$foo" = barbaz ) \ >/dev/null 2>&1 \ && lt_shell_append=yes AC_MSG_RESULT([$lt_shell_append]) _LT_CONFIG_LIBTOOL_INIT([lt_shell_append='$lt_shell_append']) if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then lt_unset=unset else lt_unset=false fi _LT_DECL([], [lt_unset], [0], [whether the shell understands "unset"])dnl # test EBCDIC or ASCII case `echo X|tr X '\101'` in A) # ASCII based system # \n is not interpreted correctly by Solaris 8 /usr/ucb/tr lt_SP2NL='tr \040 \012' lt_NL2SP='tr \015\012 \040\040' ;; *) # EBCDIC based system lt_SP2NL='tr \100 \n' lt_NL2SP='tr \r\n \100\100' ;; esac _LT_DECL([SP2NL], [lt_SP2NL], [1], [turn spaces into newlines])dnl _LT_DECL([NL2SP], [lt_NL2SP], [1], [turn newlines into spaces])dnl ])# _LT_CHECK_SHELL_FEATURES # _LT_PROG_FUNCTION_REPLACE (FUNCNAME, REPLACEMENT-BODY) # ------------------------------------------------------ # In `$cfgfile', look for function FUNCNAME delimited by `^FUNCNAME ()$' and # '^} FUNCNAME ', and replace its body with REPLACEMENT-BODY. m4_defun([_LT_PROG_FUNCTION_REPLACE], [dnl { sed -e '/^$1 ()$/,/^} # $1 /c\ $1 ()\ {\ m4_bpatsubsts([$2], [$], [\\], [^\([ ]\)], [\\\1]) } # Extended-shell $1 implementation' "$cfgfile" > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: ]) # _LT_PROG_REPLACE_SHELLFNS # ------------------------- # Replace existing portable implementations of several shell functions with # equivalent extended shell implementations where those features are available.. m4_defun([_LT_PROG_REPLACE_SHELLFNS], [if test x"$xsi_shell" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_dirname], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_basename], [dnl func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_dirname_and_basename], [dnl case ${1} in */*) func_dirname_result="${1%/*}${2}" ;; * ) func_dirname_result="${3}" ;; esac func_basename_result="${1##*/}"]) _LT_PROG_FUNCTION_REPLACE([func_stripname], [dnl # pdksh 5.2.14 does not do ${X%$Y} correctly if both X and Y are # positional parameters, so assign one to ordinary parameter first. func_stripname_result=${3} func_stripname_result=${func_stripname_result#"${1}"} func_stripname_result=${func_stripname_result%"${2}"}]) _LT_PROG_FUNCTION_REPLACE([func_split_long_opt], [dnl func_split_long_opt_name=${1%%=*} func_split_long_opt_arg=${1#*=}]) _LT_PROG_FUNCTION_REPLACE([func_split_short_opt], [dnl func_split_short_opt_arg=${1#??} func_split_short_opt_name=${1%"$func_split_short_opt_arg"}]) _LT_PROG_FUNCTION_REPLACE([func_lo2o], [dnl case ${1} in *.lo) func_lo2o_result=${1%.lo}.${objext} ;; *) func_lo2o_result=${1} ;; esac]) _LT_PROG_FUNCTION_REPLACE([func_xform], [ func_xform_result=${1%.*}.lo]) _LT_PROG_FUNCTION_REPLACE([func_arith], [ func_arith_result=$(( $[*] ))]) _LT_PROG_FUNCTION_REPLACE([func_len], [ func_len_result=${#1}]) fi if test x"$lt_shell_append" = xyes; then _LT_PROG_FUNCTION_REPLACE([func_append], [ eval "${1}+=\\${2}"]) _LT_PROG_FUNCTION_REPLACE([func_append_quoted], [dnl func_quote_for_eval "${2}" dnl m4 expansion turns \\\\ into \\, and then the shell eval turns that into \ eval "${1}+=\\\\ \\$func_quote_for_eval_result"]) # Save a `func_append' function call where possible by direct use of '+=' sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1+="%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: else # Save a `func_append' function call even when '+=' is not available sed -e 's%func_append \([[a-zA-Z_]]\{1,\}\) "%\1="$\1%g' $cfgfile > $cfgfile.tmp \ && mv -f "$cfgfile.tmp" "$cfgfile" \ || (rm -f "$cfgfile" && cp "$cfgfile.tmp" "$cfgfile" && rm -f "$cfgfile.tmp") test 0 -eq $? || _lt_function_replace_fail=: fi if test x"$_lt_function_replace_fail" = x":"; then AC_MSG_WARN([Unable to substitute extended shell functions in $ofile]) fi ]) # _LT_PATH_CONVERSION_FUNCTIONS # ----------------------------- # Determine which file name conversion functions should be used by # func_to_host_file (and, implicitly, by func_to_host_path). These are needed # for certain cross-compile configurations and native mingw. m4_defun([_LT_PATH_CONVERSION_FUNCTIONS], [AC_REQUIRE([AC_CANONICAL_HOST])dnl AC_REQUIRE([AC_CANONICAL_BUILD])dnl AC_MSG_CHECKING([how to convert $build file names to $host format]) AC_CACHE_VAL(lt_cv_to_host_file_cmd, [case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_w32 ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_cygwin_to_w32 ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_w32 ;; esac ;; *-*-cygwin* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_host_file_cmd=func_convert_file_msys_to_cygwin ;; *-*-cygwin* ) lt_cv_to_host_file_cmd=func_convert_file_noop ;; * ) # otherwise, assume *nix lt_cv_to_host_file_cmd=func_convert_file_nix_to_cygwin ;; esac ;; * ) # unhandled hosts (and "normal" native builds) lt_cv_to_host_file_cmd=func_convert_file_noop ;; esac ]) to_host_file_cmd=$lt_cv_to_host_file_cmd AC_MSG_RESULT([$lt_cv_to_host_file_cmd]) _LT_DECL([to_host_file_cmd], [lt_cv_to_host_file_cmd], [0], [convert $build file names to $host format])dnl AC_MSG_CHECKING([how to convert $build file names to toolchain format]) AC_CACHE_VAL(lt_cv_to_tool_file_cmd, [#assume ordinary cross tools, or native build. lt_cv_to_tool_file_cmd=func_convert_file_noop case $host in *-*-mingw* ) case $build in *-*-mingw* ) # actually msys lt_cv_to_tool_file_cmd=func_convert_file_msys_to_w32 ;; esac ;; esac ]) to_tool_file_cmd=$lt_cv_to_tool_file_cmd AC_MSG_RESULT([$lt_cv_to_tool_file_cmd]) _LT_DECL([to_tool_file_cmd], [lt_cv_to_tool_file_cmd], [0], [convert $build files to toolchain format])dnl ])# _LT_PATH_CONVERSION_FUNCTIONS # Helper functions for option handling. -*- Autoconf -*- # # Copyright (C) 2004, 2005, 2007, 2008, 2009 Free Software Foundation, # Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 7 ltoptions.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOPTIONS_VERSION], [m4_if([1])]) # _LT_MANGLE_OPTION(MACRO-NAME, OPTION-NAME) # ------------------------------------------ m4_define([_LT_MANGLE_OPTION], [[_LT_OPTION_]m4_bpatsubst($1__$2, [[^a-zA-Z0-9_]], [_])]) # _LT_SET_OPTION(MACRO-NAME, OPTION-NAME) # --------------------------------------- # Set option OPTION-NAME for macro MACRO-NAME, and if there is a # matching handler defined, dispatch to it. Other OPTION-NAMEs are # saved as a flag. m4_define([_LT_SET_OPTION], [m4_define(_LT_MANGLE_OPTION([$1], [$2]))dnl m4_ifdef(_LT_MANGLE_DEFUN([$1], [$2]), _LT_MANGLE_DEFUN([$1], [$2]), [m4_warning([Unknown $1 option `$2'])])[]dnl ]) # _LT_IF_OPTION(MACRO-NAME, OPTION-NAME, IF-SET, [IF-NOT-SET]) # ------------------------------------------------------------ # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. m4_define([_LT_IF_OPTION], [m4_ifdef(_LT_MANGLE_OPTION([$1], [$2]), [$3], [$4])]) # _LT_UNLESS_OPTIONS(MACRO-NAME, OPTION-LIST, IF-NOT-SET) # ------------------------------------------------------- # Execute IF-NOT-SET unless all options in OPTION-LIST for MACRO-NAME # are set. m4_define([_LT_UNLESS_OPTIONS], [m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [m4_ifdef(_LT_MANGLE_OPTION([$1], _LT_Option), [m4_define([$0_found])])])[]dnl m4_ifdef([$0_found], [m4_undefine([$0_found])], [$3 ])[]dnl ]) # _LT_SET_OPTIONS(MACRO-NAME, OPTION-LIST) # ---------------------------------------- # OPTION-LIST is a space-separated list of Libtool options associated # with MACRO-NAME. If any OPTION has a matching handler declared with # LT_OPTION_DEFINE, dispatch to that macro; otherwise complain about # the unknown option and exit. m4_defun([_LT_SET_OPTIONS], [# Set options m4_foreach([_LT_Option], m4_split(m4_normalize([$2])), [_LT_SET_OPTION([$1], _LT_Option)]) m4_if([$1],[LT_INIT],[ dnl dnl Simply set some default values (i.e off) if boolean options were not dnl specified: _LT_UNLESS_OPTIONS([LT_INIT], [dlopen], [enable_dlopen=no ]) _LT_UNLESS_OPTIONS([LT_INIT], [win32-dll], [enable_win32_dll=no ]) dnl dnl If no reference was made to various pairs of opposing options, then dnl we run the default mode handler for the pair. For example, if neither dnl `shared' nor `disable-shared' was passed, we enable building of shared dnl archives by default: _LT_UNLESS_OPTIONS([LT_INIT], [shared disable-shared], [_LT_ENABLE_SHARED]) _LT_UNLESS_OPTIONS([LT_INIT], [static disable-static], [_LT_ENABLE_STATIC]) _LT_UNLESS_OPTIONS([LT_INIT], [pic-only no-pic], [_LT_WITH_PIC]) _LT_UNLESS_OPTIONS([LT_INIT], [fast-install disable-fast-install], [_LT_ENABLE_FAST_INSTALL]) ]) ])# _LT_SET_OPTIONS # _LT_MANGLE_DEFUN(MACRO-NAME, OPTION-NAME) # ----------------------------------------- m4_define([_LT_MANGLE_DEFUN], [[_LT_OPTION_DEFUN_]m4_bpatsubst(m4_toupper([$1__$2]), [[^A-Z0-9_]], [_])]) # LT_OPTION_DEFINE(MACRO-NAME, OPTION-NAME, CODE) # ----------------------------------------------- m4_define([LT_OPTION_DEFINE], [m4_define(_LT_MANGLE_DEFUN([$1], [$2]), [$3])[]dnl ])# LT_OPTION_DEFINE # dlopen # ------ LT_OPTION_DEFINE([LT_INIT], [dlopen], [enable_dlopen=yes ]) AU_DEFUN([AC_LIBTOOL_DLOPEN], [_LT_SET_OPTION([LT_INIT], [dlopen]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `dlopen' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_DLOPEN], []) # win32-dll # --------- # Declare package support for building win32 dll's. LT_OPTION_DEFINE([LT_INIT], [win32-dll], [enable_win32_dll=yes case $host in *-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-cegcc*) AC_CHECK_TOOL(AS, as, false) AC_CHECK_TOOL(DLLTOOL, dlltool, false) AC_CHECK_TOOL(OBJDUMP, objdump, false) ;; esac test -z "$AS" && AS=as _LT_DECL([], [AS], [1], [Assembler program])dnl test -z "$DLLTOOL" && DLLTOOL=dlltool _LT_DECL([], [DLLTOOL], [1], [DLL creation program])dnl test -z "$OBJDUMP" && OBJDUMP=objdump _LT_DECL([], [OBJDUMP], [1], [Object dumper program])dnl ])# win32-dll AU_DEFUN([AC_LIBTOOL_WIN32_DLL], [AC_REQUIRE([AC_CANONICAL_HOST])dnl _LT_SET_OPTION([LT_INIT], [win32-dll]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `win32-dll' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_WIN32_DLL], []) # _LT_ENABLE_SHARED([DEFAULT]) # ---------------------------- # implement the --enable-shared flag, and supports the `shared' and # `disable-shared' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_SHARED], [m4_define([_LT_ENABLE_SHARED_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([shared], [AS_HELP_STRING([--enable-shared@<:@=PKGS@:>@], [build shared libraries @<:@default=]_LT_ENABLE_SHARED_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_shared=yes ;; no) enable_shared=no ;; *) enable_shared=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_shared=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_shared=]_LT_ENABLE_SHARED_DEFAULT) _LT_DECL([build_libtool_libs], [enable_shared], [0], [Whether or not to build shared libraries]) ])# _LT_ENABLE_SHARED LT_OPTION_DEFINE([LT_INIT], [shared], [_LT_ENABLE_SHARED([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-shared], [_LT_ENABLE_SHARED([no])]) # Old names: AC_DEFUN([AC_ENABLE_SHARED], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[shared]) ]) AC_DEFUN([AC_DISABLE_SHARED], [_LT_SET_OPTION([LT_INIT], [disable-shared]) ]) AU_DEFUN([AM_ENABLE_SHARED], [AC_ENABLE_SHARED($@)]) AU_DEFUN([AM_DISABLE_SHARED], [AC_DISABLE_SHARED($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_SHARED], []) dnl AC_DEFUN([AM_DISABLE_SHARED], []) # _LT_ENABLE_STATIC([DEFAULT]) # ---------------------------- # implement the --enable-static flag, and support the `static' and # `disable-static' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_STATIC], [m4_define([_LT_ENABLE_STATIC_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([static], [AS_HELP_STRING([--enable-static@<:@=PKGS@:>@], [build static libraries @<:@default=]_LT_ENABLE_STATIC_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_static=yes ;; no) enable_static=no ;; *) enable_static=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_static=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_static=]_LT_ENABLE_STATIC_DEFAULT) _LT_DECL([build_old_libs], [enable_static], [0], [Whether or not to build static libraries]) ])# _LT_ENABLE_STATIC LT_OPTION_DEFINE([LT_INIT], [static], [_LT_ENABLE_STATIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-static], [_LT_ENABLE_STATIC([no])]) # Old names: AC_DEFUN([AC_ENABLE_STATIC], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[static]) ]) AC_DEFUN([AC_DISABLE_STATIC], [_LT_SET_OPTION([LT_INIT], [disable-static]) ]) AU_DEFUN([AM_ENABLE_STATIC], [AC_ENABLE_STATIC($@)]) AU_DEFUN([AM_DISABLE_STATIC], [AC_DISABLE_STATIC($@)]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AM_ENABLE_STATIC], []) dnl AC_DEFUN([AM_DISABLE_STATIC], []) # _LT_ENABLE_FAST_INSTALL([DEFAULT]) # ---------------------------------- # implement the --enable-fast-install flag, and support the `fast-install' # and `disable-fast-install' LT_INIT options. # DEFAULT is either `yes' or `no'. If omitted, it defaults to `yes'. m4_define([_LT_ENABLE_FAST_INSTALL], [m4_define([_LT_ENABLE_FAST_INSTALL_DEFAULT], [m4_if($1, no, no, yes)])dnl AC_ARG_ENABLE([fast-install], [AS_HELP_STRING([--enable-fast-install@<:@=PKGS@:>@], [optimize for fast installation @<:@default=]_LT_ENABLE_FAST_INSTALL_DEFAULT[@:>@])], [p=${PACKAGE-default} case $enableval in yes) enable_fast_install=yes ;; no) enable_fast_install=no ;; *) enable_fast_install=no # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for pkg in $enableval; do IFS="$lt_save_ifs" if test "X$pkg" = "X$p"; then enable_fast_install=yes fi done IFS="$lt_save_ifs" ;; esac], [enable_fast_install=]_LT_ENABLE_FAST_INSTALL_DEFAULT) _LT_DECL([fast_install], [enable_fast_install], [0], [Whether or not to optimize for fast installation])dnl ])# _LT_ENABLE_FAST_INSTALL LT_OPTION_DEFINE([LT_INIT], [fast-install], [_LT_ENABLE_FAST_INSTALL([yes])]) LT_OPTION_DEFINE([LT_INIT], [disable-fast-install], [_LT_ENABLE_FAST_INSTALL([no])]) # Old names: AU_DEFUN([AC_ENABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], m4_if([$1], [no], [disable-])[fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `fast-install' option into LT_INIT's first parameter.]) ]) AU_DEFUN([AC_DISABLE_FAST_INSTALL], [_LT_SET_OPTION([LT_INIT], [disable-fast-install]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `disable-fast-install' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_ENABLE_FAST_INSTALL], []) dnl AC_DEFUN([AM_DISABLE_FAST_INSTALL], []) # _LT_WITH_PIC([MODE]) # -------------------- # implement the --with-pic flag, and support the `pic-only' and `no-pic' # LT_INIT options. # MODE is either `yes' or `no'. If omitted, it defaults to `both'. m4_define([_LT_WITH_PIC], [AC_ARG_WITH([pic], [AS_HELP_STRING([--with-pic@<:@=PKGS@:>@], [try to use only PIC/non-PIC objects @<:@default=use both@:>@])], [lt_p=${PACKAGE-default} case $withval in yes|no) pic_mode=$withval ;; *) pic_mode=default # Look at the argument we got. We use all the common list separators. lt_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR," for lt_pkg in $withval; do IFS="$lt_save_ifs" if test "X$lt_pkg" = "X$lt_p"; then pic_mode=yes fi done IFS="$lt_save_ifs" ;; esac], [pic_mode=default]) test -z "$pic_mode" && pic_mode=m4_default([$1], [default]) _LT_DECL([], [pic_mode], [0], [What type of objects to build])dnl ])# _LT_WITH_PIC LT_OPTION_DEFINE([LT_INIT], [pic-only], [_LT_WITH_PIC([yes])]) LT_OPTION_DEFINE([LT_INIT], [no-pic], [_LT_WITH_PIC([no])]) # Old name: AU_DEFUN([AC_LIBTOOL_PICMODE], [_LT_SET_OPTION([LT_INIT], [pic-only]) AC_DIAGNOSE([obsolete], [$0: Remove this warning and the call to _LT_SET_OPTION when you put the `pic-only' option into LT_INIT's first parameter.]) ]) dnl aclocal-1.4 backwards compatibility: dnl AC_DEFUN([AC_LIBTOOL_PICMODE], []) m4_define([_LTDL_MODE], []) LT_OPTION_DEFINE([LTDL_INIT], [nonrecursive], [m4_define([_LTDL_MODE], [nonrecursive])]) LT_OPTION_DEFINE([LTDL_INIT], [recursive], [m4_define([_LTDL_MODE], [recursive])]) LT_OPTION_DEFINE([LTDL_INIT], [subproject], [m4_define([_LTDL_MODE], [subproject])]) m4_define([_LTDL_TYPE], []) LT_OPTION_DEFINE([LTDL_INIT], [installable], [m4_define([_LTDL_TYPE], [installable])]) LT_OPTION_DEFINE([LTDL_INIT], [convenience], [m4_define([_LTDL_TYPE], [convenience])]) # ltsugar.m4 -- libtool m4 base layer. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2008 Free Software Foundation, Inc. # Written by Gary V. Vaughan, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 6 ltsugar.m4 # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTSUGAR_VERSION], [m4_if([0.1])]) # lt_join(SEP, ARG1, [ARG2...]) # ----------------------------- # Produce ARG1SEPARG2...SEPARGn, omitting [] arguments and their # associated separator. # Needed until we can rely on m4_join from Autoconf 2.62, since all earlier # versions in m4sugar had bugs. m4_define([lt_join], [m4_if([$#], [1], [], [$#], [2], [[$2]], [m4_if([$2], [], [], [[$2]_])$0([$1], m4_shift(m4_shift($@)))])]) m4_define([_lt_join], [m4_if([$#$2], [2], [], [m4_if([$2], [], [], [[$1$2]])$0([$1], m4_shift(m4_shift($@)))])]) # lt_car(LIST) # lt_cdr(LIST) # ------------ # Manipulate m4 lists. # These macros are necessary as long as will still need to support # Autoconf-2.59 which quotes differently. m4_define([lt_car], [[$1]]) m4_define([lt_cdr], [m4_if([$#], 0, [m4_fatal([$0: cannot be called without arguments])], [$#], 1, [], [m4_dquote(m4_shift($@))])]) m4_define([lt_unquote], $1) # lt_append(MACRO-NAME, STRING, [SEPARATOR]) # ------------------------------------------ # Redefine MACRO-NAME to hold its former content plus `SEPARATOR'`STRING'. # Note that neither SEPARATOR nor STRING are expanded; they are appended # to MACRO-NAME as is (leaving the expansion for when MACRO-NAME is invoked). # No SEPARATOR is output if MACRO-NAME was previously undefined (different # than defined and empty). # # This macro is needed until we can rely on Autoconf 2.62, since earlier # versions of m4sugar mistakenly expanded SEPARATOR but not STRING. m4_define([lt_append], [m4_define([$1], m4_ifdef([$1], [m4_defn([$1])[$3]])[$2])]) # lt_combine(SEP, PREFIX-LIST, INFIX, SUFFIX1, [SUFFIX2...]) # ---------------------------------------------------------- # Produce a SEP delimited list of all paired combinations of elements of # PREFIX-LIST with SUFFIX1 through SUFFIXn. Each element of the list # has the form PREFIXmINFIXSUFFIXn. # Needed until we can rely on m4_combine added in Autoconf 2.62. m4_define([lt_combine], [m4_if(m4_eval([$# > 3]), [1], [m4_pushdef([_Lt_sep], [m4_define([_Lt_sep], m4_defn([lt_car]))])]]dnl [[m4_foreach([_Lt_prefix], [$2], [m4_foreach([_Lt_suffix], ]m4_dquote(m4_dquote(m4_shift(m4_shift(m4_shift($@)))))[, [_Lt_sep([$1])[]m4_defn([_Lt_prefix])[$3]m4_defn([_Lt_suffix])])])])]) # lt_if_append_uniq(MACRO-NAME, VARNAME, [SEPARATOR], [UNIQ], [NOT-UNIQ]) # ----------------------------------------------------------------------- # Iff MACRO-NAME does not yet contain VARNAME, then append it (delimited # by SEPARATOR if supplied) and expand UNIQ, else NOT-UNIQ. m4_define([lt_if_append_uniq], [m4_ifdef([$1], [m4_if(m4_index([$3]m4_defn([$1])[$3], [$3$2$3]), [-1], [lt_append([$1], [$2], [$3])$4], [$5])], [lt_append([$1], [$2], [$3])$4])]) # lt_dict_add(DICT, KEY, VALUE) # ----------------------------- m4_define([lt_dict_add], [m4_define([$1($2)], [$3])]) # lt_dict_add_subkey(DICT, KEY, SUBKEY, VALUE) # -------------------------------------------- m4_define([lt_dict_add_subkey], [m4_define([$1($2:$3)], [$4])]) # lt_dict_fetch(DICT, KEY, [SUBKEY]) # ---------------------------------- m4_define([lt_dict_fetch], [m4_ifval([$3], m4_ifdef([$1($2:$3)], [m4_defn([$1($2:$3)])]), m4_ifdef([$1($2)], [m4_defn([$1($2)])]))]) # lt_if_dict_fetch(DICT, KEY, [SUBKEY], VALUE, IF-TRUE, [IF-FALSE]) # ----------------------------------------------------------------- m4_define([lt_if_dict_fetch], [m4_if(lt_dict_fetch([$1], [$2], [$3]), [$4], [$5], [$6])]) # lt_dict_filter(DICT, [SUBKEY], VALUE, [SEPARATOR], KEY, [...]) # -------------------------------------------------------------- m4_define([lt_dict_filter], [m4_if([$5], [], [], [lt_join(m4_quote(m4_default([$4], [[, ]])), lt_unquote(m4_split(m4_normalize(m4_foreach(_Lt_key, lt_car([m4_shiftn(4, $@)]), [lt_if_dict_fetch([$1], _Lt_key, [$2], [$3], [_Lt_key ])])))))])[]dnl ]) # ltversion.m4 -- version numbers -*- Autoconf -*- # # Copyright (C) 2004 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004 # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # @configure_input@ # serial 3337 ltversion.m4 # This file is part of GNU Libtool m4_define([LT_PACKAGE_VERSION], [2.4.2]) m4_define([LT_PACKAGE_REVISION], [1.3337]) AC_DEFUN([LTVERSION_VERSION], [macro_version='2.4.2' macro_revision='1.3337' _LT_DECL(, macro_version, 0, [Which release of libtool.m4 was used?]) _LT_DECL(, macro_revision, 0) ]) # lt~obsolete.m4 -- aclocal satisfying obsolete definitions. -*-Autoconf-*- # # Copyright (C) 2004, 2005, 2007, 2009 Free Software Foundation, Inc. # Written by Scott James Remnant, 2004. # # This file is free software; the Free Software Foundation gives # unlimited permission to copy and/or distribute it, with or without # modifications, as long as this notice is preserved. # serial 5 lt~obsolete.m4 # These exist entirely to fool aclocal when bootstrapping libtool. # # In the past libtool.m4 has provided macros via AC_DEFUN (or AU_DEFUN) # which have later been changed to m4_define as they aren't part of the # exported API, or moved to Autoconf or Automake where they belong. # # The trouble is, aclocal is a bit thick. It'll see the old AC_DEFUN # in /usr/share/aclocal/libtool.m4 and remember it, then when it sees us # using a macro with the same name in our local m4/libtool.m4 it'll # pull the old libtool.m4 in (it doesn't see our shiny new m4_define # and doesn't know about Autoconf macros at all.) # # So we provide this file, which has a silly filename so it's always # included after everything else. This provides aclocal with the # AC_DEFUNs it wants, but when m4 processes it, it doesn't do anything # because those macros already exist, or will be overwritten later. # We use AC_DEFUN over AU_DEFUN for compatibility with aclocal-1.6. # # Anytime we withdraw an AC_DEFUN or AU_DEFUN, remember to add it here. # Yes, that means every name once taken will need to remain here until # we give up compatibility with versions before 1.7, at which point # we need to keep only those names which we still refer to. # This is to help aclocal find these macros, as it can't see m4_define. AC_DEFUN([LTOBSOLETE_VERSION], [m4_if([1])]) m4_ifndef([AC_LIBTOOL_LINKER_OPTION], [AC_DEFUN([AC_LIBTOOL_LINKER_OPTION])]) m4_ifndef([AC_PROG_EGREP], [AC_DEFUN([AC_PROG_EGREP])]) m4_ifndef([_LT_AC_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_AC_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_AC_SHELL_INIT], [AC_DEFUN([_LT_AC_SHELL_INIT])]) m4_ifndef([_LT_AC_SYS_LIBPATH_AIX], [AC_DEFUN([_LT_AC_SYS_LIBPATH_AIX])]) m4_ifndef([_LT_PROG_LTMAIN], [AC_DEFUN([_LT_PROG_LTMAIN])]) m4_ifndef([_LT_AC_TAGVAR], [AC_DEFUN([_LT_AC_TAGVAR])]) m4_ifndef([AC_LTDL_ENABLE_INSTALL], [AC_DEFUN([AC_LTDL_ENABLE_INSTALL])]) m4_ifndef([AC_LTDL_PREOPEN], [AC_DEFUN([AC_LTDL_PREOPEN])]) m4_ifndef([_LT_AC_SYS_COMPILER], [AC_DEFUN([_LT_AC_SYS_COMPILER])]) m4_ifndef([_LT_AC_LOCK], [AC_DEFUN([_LT_AC_LOCK])]) m4_ifndef([AC_LIBTOOL_SYS_OLD_ARCHIVE], [AC_DEFUN([AC_LIBTOOL_SYS_OLD_ARCHIVE])]) m4_ifndef([_LT_AC_TRY_DLOPEN_SELF], [AC_DEFUN([_LT_AC_TRY_DLOPEN_SELF])]) m4_ifndef([AC_LIBTOOL_PROG_CC_C_O], [AC_DEFUN([AC_LIBTOOL_PROG_CC_C_O])]) m4_ifndef([AC_LIBTOOL_SYS_HARD_LINK_LOCKS], [AC_DEFUN([AC_LIBTOOL_SYS_HARD_LINK_LOCKS])]) m4_ifndef([AC_LIBTOOL_OBJDIR], [AC_DEFUN([AC_LIBTOOL_OBJDIR])]) m4_ifndef([AC_LTDL_OBJDIR], [AC_DEFUN([AC_LTDL_OBJDIR])]) m4_ifndef([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH], [AC_DEFUN([AC_LIBTOOL_PROG_LD_HARDCODE_LIBPATH])]) m4_ifndef([AC_LIBTOOL_SYS_LIB_STRIP], [AC_DEFUN([AC_LIBTOOL_SYS_LIB_STRIP])]) m4_ifndef([AC_PATH_MAGIC], [AC_DEFUN([AC_PATH_MAGIC])]) m4_ifndef([AC_PROG_LD_GNU], [AC_DEFUN([AC_PROG_LD_GNU])]) m4_ifndef([AC_PROG_LD_RELOAD_FLAG], [AC_DEFUN([AC_PROG_LD_RELOAD_FLAG])]) m4_ifndef([AC_DEPLIBS_CHECK_METHOD], [AC_DEFUN([AC_DEPLIBS_CHECK_METHOD])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_NO_RTTI], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_NO_RTTI])]) m4_ifndef([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE], [AC_DEFUN([AC_LIBTOOL_SYS_GLOBAL_SYMBOL_PIPE])]) m4_ifndef([AC_LIBTOOL_PROG_COMPILER_PIC], [AC_DEFUN([AC_LIBTOOL_PROG_COMPILER_PIC])]) m4_ifndef([AC_LIBTOOL_PROG_LD_SHLIBS], [AC_DEFUN([AC_LIBTOOL_PROG_LD_SHLIBS])]) m4_ifndef([AC_LIBTOOL_POSTDEP_PREDEP], [AC_DEFUN([AC_LIBTOOL_POSTDEP_PREDEP])]) m4_ifndef([LT_AC_PROG_EGREP], [AC_DEFUN([LT_AC_PROG_EGREP])]) m4_ifndef([LT_AC_PROG_SED], [AC_DEFUN([LT_AC_PROG_SED])]) m4_ifndef([_LT_CC_BASENAME], [AC_DEFUN([_LT_CC_BASENAME])]) m4_ifndef([_LT_COMPILER_BOILERPLATE], [AC_DEFUN([_LT_COMPILER_BOILERPLATE])]) m4_ifndef([_LT_LINKER_BOILERPLATE], [AC_DEFUN([_LT_LINKER_BOILERPLATE])]) m4_ifndef([_AC_PROG_LIBTOOL], [AC_DEFUN([_AC_PROG_LIBTOOL])]) m4_ifndef([AC_LIBTOOL_SETUP], [AC_DEFUN([AC_LIBTOOL_SETUP])]) m4_ifndef([_LT_AC_CHECK_DLFCN], [AC_DEFUN([_LT_AC_CHECK_DLFCN])]) m4_ifndef([AC_LIBTOOL_SYS_DYNAMIC_LINKER], [AC_DEFUN([AC_LIBTOOL_SYS_DYNAMIC_LINKER])]) m4_ifndef([_LT_AC_TAGCONFIG], [AC_DEFUN([_LT_AC_TAGCONFIG])]) m4_ifndef([AC_DISABLE_FAST_INSTALL], [AC_DEFUN([AC_DISABLE_FAST_INSTALL])]) m4_ifndef([_LT_AC_LANG_CXX], [AC_DEFUN([_LT_AC_LANG_CXX])]) m4_ifndef([_LT_AC_LANG_F77], [AC_DEFUN([_LT_AC_LANG_F77])]) m4_ifndef([_LT_AC_LANG_GCJ], [AC_DEFUN([_LT_AC_LANG_GCJ])]) m4_ifndef([AC_LIBTOOL_LANG_C_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_C_CONFIG])]) m4_ifndef([_LT_AC_LANG_C_CONFIG], [AC_DEFUN([_LT_AC_LANG_C_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_CXX_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_CXX_CONFIG])]) m4_ifndef([_LT_AC_LANG_CXX_CONFIG], [AC_DEFUN([_LT_AC_LANG_CXX_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_F77_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_F77_CONFIG])]) m4_ifndef([_LT_AC_LANG_F77_CONFIG], [AC_DEFUN([_LT_AC_LANG_F77_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_GCJ_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_GCJ_CONFIG])]) m4_ifndef([_LT_AC_LANG_GCJ_CONFIG], [AC_DEFUN([_LT_AC_LANG_GCJ_CONFIG])]) m4_ifndef([AC_LIBTOOL_LANG_RC_CONFIG], [AC_DEFUN([AC_LIBTOOL_LANG_RC_CONFIG])]) m4_ifndef([_LT_AC_LANG_RC_CONFIG], [AC_DEFUN([_LT_AC_LANG_RC_CONFIG])]) m4_ifndef([AC_LIBTOOL_CONFIG], [AC_DEFUN([AC_LIBTOOL_CONFIG])]) m4_ifndef([_LT_AC_FILE_LTDLL_C], [AC_DEFUN([_LT_AC_FILE_LTDLL_C])]) m4_ifndef([_LT_REQUIRED_DARWIN_CHECKS], [AC_DEFUN([_LT_REQUIRED_DARWIN_CHECKS])]) m4_ifndef([_LT_AC_PROG_CXXCPP], [AC_DEFUN([_LT_AC_PROG_CXXCPP])]) m4_ifndef([_LT_PREPARE_SED_QUOTE_VARS], [AC_DEFUN([_LT_PREPARE_SED_QUOTE_VARS])]) m4_ifndef([_LT_PROG_ECHO_BACKSLASH], [AC_DEFUN([_LT_PROG_ECHO_BACKSLASH])]) m4_ifndef([_LT_PROG_F77], [AC_DEFUN([_LT_PROG_F77])]) m4_ifndef([_LT_PROG_FC], [AC_DEFUN([_LT_PROG_FC])]) m4_ifndef([_LT_PROG_CXX], [AC_DEFUN([_LT_PROG_CXX])]) # pkg.m4 - Macros to locate and utilise pkg-config. -*- Autoconf -*- # serial 1 (pkg-config-0.24) # # Copyright © 2004 Scott James Remnant . # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program; if not, write to the Free Software # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. # # As a special exception to the GNU General Public License, if you # distribute this file as part of a program that contains a # configuration script generated by Autoconf, you may include it under # the same distribution terms that you use for the rest of that program. # PKG_PROG_PKG_CONFIG([MIN-VERSION]) # ---------------------------------- AC_DEFUN([PKG_PROG_PKG_CONFIG], [m4_pattern_forbid([^_?PKG_[A-Z_]+$]) m4_pattern_allow([^PKG_CONFIG(_(PATH|LIBDIR|SYSROOT_DIR|ALLOW_SYSTEM_(CFLAGS|LIBS)))?$]) m4_pattern_allow([^PKG_CONFIG_(DISABLE_UNINSTALLED|TOP_BUILD_DIR|DEBUG_SPEW)$]) AC_ARG_VAR([PKG_CONFIG], [path to pkg-config utility]) AC_ARG_VAR([PKG_CONFIG_PATH], [directories to add to pkg-config's search path]) AC_ARG_VAR([PKG_CONFIG_LIBDIR], [path overriding pkg-config's built-in search path]) if test "x$ac_cv_env_PKG_CONFIG_set" != "xset"; then AC_PATH_TOOL([PKG_CONFIG], [pkg-config]) fi if test -n "$PKG_CONFIG"; then _pkg_min_version=m4_default([$1], [0.9.0]) AC_MSG_CHECKING([pkg-config is at least version $_pkg_min_version]) if $PKG_CONFIG --atleast-pkgconfig-version $_pkg_min_version; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) PKG_CONFIG="" fi fi[]dnl ])# PKG_PROG_PKG_CONFIG # PKG_CHECK_EXISTS(MODULES, [ACTION-IF-FOUND], [ACTION-IF-NOT-FOUND]) # # Check to see whether a particular set of modules exists. Similar # to PKG_CHECK_MODULES(), but does not set variables or print errors. # # Please remember that m4 expands AC_REQUIRE([PKG_PROG_PKG_CONFIG]) # only at the first occurence in configure.ac, so if the first place # it's called might be skipped (such as if it is within an "if", you # have to call PKG_CHECK_EXISTS manually # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_EXISTS], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl if test -n "$PKG_CONFIG" && \ AC_RUN_LOG([$PKG_CONFIG --exists --print-errors "$1"]); then m4_default([$2], [:]) m4_ifvaln([$3], [else $3])dnl fi]) # _PKG_CONFIG([VARIABLE], [COMMAND], [MODULES]) # --------------------------------------------- m4_define([_PKG_CONFIG], [if test -n "$$1"; then pkg_cv_[]$1="$$1" elif test -n "$PKG_CONFIG"; then PKG_CHECK_EXISTS([$3], [pkg_cv_[]$1=`$PKG_CONFIG --[]$2 "$3" 2>/dev/null` test "x$?" != "x0" && pkg_failed=yes ], [pkg_failed=yes]) else pkg_failed=untried fi[]dnl ])# _PKG_CONFIG # _PKG_SHORT_ERRORS_SUPPORTED # ----------------------------- AC_DEFUN([_PKG_SHORT_ERRORS_SUPPORTED], [AC_REQUIRE([PKG_PROG_PKG_CONFIG]) if $PKG_CONFIG --atleast-pkgconfig-version 0.20; then _pkg_short_errors_supported=yes else _pkg_short_errors_supported=no fi[]dnl ])# _PKG_SHORT_ERRORS_SUPPORTED # PKG_CHECK_MODULES(VARIABLE-PREFIX, MODULES, [ACTION-IF-FOUND], # [ACTION-IF-NOT-FOUND]) # # # Note that if there is a possibility the first call to # PKG_CHECK_MODULES might not happen, you should be sure to include an # explicit call to PKG_PROG_PKG_CONFIG in your configure.ac # # # -------------------------------------------------------------- AC_DEFUN([PKG_CHECK_MODULES], [AC_REQUIRE([PKG_PROG_PKG_CONFIG])dnl AC_ARG_VAR([$1][_CFLAGS], [C compiler flags for $1, overriding pkg-config])dnl AC_ARG_VAR([$1][_LIBS], [linker flags for $1, overriding pkg-config])dnl pkg_failed=no AC_MSG_CHECKING([for $1]) _PKG_CONFIG([$1][_CFLAGS], [cflags], [$2]) _PKG_CONFIG([$1][_LIBS], [libs], [$2]) m4_define([_PKG_TEXT], [Alternatively, you may set the environment variables $1[]_CFLAGS and $1[]_LIBS to avoid the need to call pkg-config. See the pkg-config man page for more details.]) if test $pkg_failed = yes; then AC_MSG_RESULT([no]) _PKG_SHORT_ERRORS_SUPPORTED if test $_pkg_short_errors_supported = yes; then $1[]_PKG_ERRORS=`$PKG_CONFIG --short-errors --print-errors --cflags --libs "$2" 2>&1` else $1[]_PKG_ERRORS=`$PKG_CONFIG --print-errors --cflags --libs "$2" 2>&1` fi # Put the nasty error message in config.log where it belongs echo "$$1[]_PKG_ERRORS" >&AS_MESSAGE_LOG_FD m4_default([$4], [AC_MSG_ERROR( [Package requirements ($2) were not met: $$1_PKG_ERRORS Consider adjusting the PKG_CONFIG_PATH environment variable if you installed software in a non-standard prefix. _PKG_TEXT])[]dnl ]) elif test $pkg_failed = untried; then AC_MSG_RESULT([no]) m4_default([$4], [AC_MSG_FAILURE( [The pkg-config script could not be found or is too old. Make sure it is in your PATH or set the PKG_CONFIG environment variable to the full path to pkg-config. _PKG_TEXT To get pkg-config, see .])[]dnl ]) else $1[]_CFLAGS=$pkg_cv_[]$1[]_CFLAGS $1[]_LIBS=$pkg_cv_[]$1[]_LIBS AC_MSG_RESULT([yes]) $3 fi[]dnl ])# PKG_CHECK_MODULES # PKG_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable pkgconfigdir as the location where a module # should install pkg-config .pc files. By default the directory is # $libdir/pkgconfig, but the default can be changed by passing # DIRECTORY. The user can override through the --with-pkgconfigdir # parameter. AC_DEFUN([PKG_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${libdir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([pkgconfigdir], [AS_HELP_STRING([--with-pkgconfigdir], pkg_description)],, [with_pkgconfigdir=]pkg_default) AC_SUBST([pkgconfigdir], [$with_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_INSTALLDIR # PKG_NOARCH_INSTALLDIR(DIRECTORY) # ------------------------- # Substitutes the variable noarch_pkgconfigdir as the location where a # module should install arch-independent pkg-config .pc files. By # default the directory is $datadir/pkgconfig, but the default can be # changed by passing DIRECTORY. The user can override through the # --with-noarch-pkgconfigdir parameter. AC_DEFUN([PKG_NOARCH_INSTALLDIR], [m4_pushdef([pkg_default], [m4_default([$1], ['${datadir}/pkgconfig'])]) m4_pushdef([pkg_description], [pkg-config arch-independent installation directory @<:@]pkg_default[@:>@]) AC_ARG_WITH([noarch-pkgconfigdir], [AS_HELP_STRING([--with-noarch-pkgconfigdir], pkg_description)],, [with_noarch_pkgconfigdir=]pkg_default) AC_SUBST([noarch_pkgconfigdir], [$with_noarch_pkgconfigdir]) m4_popdef([pkg_default]) m4_popdef([pkg_description]) ]) dnl PKG_NOARCH_INSTALLDIR # Copyright (C) 2002-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_AUTOMAKE_VERSION(VERSION) # ---------------------------- # Automake X.Y traces this macro to ensure aclocal.m4 has been # generated from the m4 files accompanying Automake X.Y. # (This private macro should not be called outside this file.) AC_DEFUN([AM_AUTOMAKE_VERSION], [am__api_version='1.13' dnl Some users find AM_AUTOMAKE_VERSION and mistake it for a way to dnl require some minimum version. Point them to the right macro. m4_if([$1], [1.13.4], [], [AC_FATAL([Do not call $0, use AM_INIT_AUTOMAKE([$1]).])])dnl ]) # _AM_AUTOCONF_VERSION(VERSION) # ----------------------------- # aclocal traces this macro to find the Autoconf version. # This is a private macro too. Using m4_define simplifies # the logic in aclocal, which can simply ignore this definition. m4_define([_AM_AUTOCONF_VERSION], []) # AM_SET_CURRENT_AUTOMAKE_VERSION # ------------------------------- # Call AM_AUTOMAKE_VERSION and AM_AUTOMAKE_VERSION so they can be traced. # This function is AC_REQUIREd by AM_INIT_AUTOMAKE. AC_DEFUN([AM_SET_CURRENT_AUTOMAKE_VERSION], [AM_AUTOMAKE_VERSION([1.13.4])dnl m4_ifndef([AC_AUTOCONF_VERSION], [m4_copy([m4_PACKAGE_VERSION], [AC_AUTOCONF_VERSION])])dnl _AM_AUTOCONF_VERSION(m4_defn([AC_AUTOCONF_VERSION]))]) # AM_AUX_DIR_EXPAND -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # For projects using AC_CONFIG_AUX_DIR([foo]), Autoconf sets # $ac_aux_dir to '$srcdir/foo'. In other projects, it is set to # '$srcdir', '$srcdir/..', or '$srcdir/../..'. # # Of course, Automake must honor this variable whenever it calls a # tool from the auxiliary directory. The problem is that $srcdir (and # therefore $ac_aux_dir as well) can be either absolute or relative, # depending on how configure is run. This is pretty annoying, since # it makes $ac_aux_dir quite unusable in subdirectories: in the top # source directory, any form will work fine, but in subdirectories a # relative path needs to be adjusted first. # # $ac_aux_dir/missing # fails when called from a subdirectory if $ac_aux_dir is relative # $top_srcdir/$ac_aux_dir/missing # fails if $ac_aux_dir is absolute, # fails when called from a subdirectory in a VPATH build with # a relative $ac_aux_dir # # The reason of the latter failure is that $top_srcdir and $ac_aux_dir # are both prefixed by $srcdir. In an in-source build this is usually # harmless because $srcdir is '.', but things will broke when you # start a VPATH build or use an absolute $srcdir. # # So we could use something similar to $top_srcdir/$ac_aux_dir/missing, # iff we strip the leading $srcdir from $ac_aux_dir. That would be: # am_aux_dir='\$(top_srcdir)/'`expr "$ac_aux_dir" : "$srcdir//*\(.*\)"` # and then we would define $MISSING as # MISSING="\${SHELL} $am_aux_dir/missing" # This will work as long as MISSING is not called from configure, because # unfortunately $(top_srcdir) has no meaning in configure. # However there are other variables, like CC, which are often used in # configure, and could therefore not use this "fixed" $ac_aux_dir. # # Another solution, used here, is to always expand $ac_aux_dir to an # absolute PATH. The drawback is that using absolute paths prevent a # configured tree to be moved without reconfiguration. AC_DEFUN([AM_AUX_DIR_EXPAND], [dnl Rely on autoconf to set up CDPATH properly. AC_PREREQ([2.50])dnl # expand $ac_aux_dir to an absolute path am_aux_dir=`cd $ac_aux_dir && pwd` ]) # AM_CONDITIONAL -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_CONDITIONAL(NAME, SHELL-CONDITION) # ------------------------------------- # Define a conditional. AC_DEFUN([AM_CONDITIONAL], [AC_PREREQ([2.52])dnl m4_if([$1], [TRUE], [AC_FATAL([$0: invalid condition: $1])], [$1], [FALSE], [AC_FATAL([$0: invalid condition: $1])])dnl AC_SUBST([$1_TRUE])dnl AC_SUBST([$1_FALSE])dnl _AM_SUBST_NOTMAKE([$1_TRUE])dnl _AM_SUBST_NOTMAKE([$1_FALSE])dnl m4_define([_AM_COND_VALUE_$1], [$2])dnl if $2; then $1_TRUE= $1_FALSE='#' else $1_TRUE='#' $1_FALSE= fi AC_CONFIG_COMMANDS_PRE( [if test -z "${$1_TRUE}" && test -z "${$1_FALSE}"; then AC_MSG_ERROR([[conditional "$1" was never defined. Usually this means the macro was only invoked conditionally.]]) fi])]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # There are a few dirty hacks below to avoid letting 'AC_PROG_CC' be # written in clear, in which case automake, when reading aclocal.m4, # will think it sees a *use*, and therefore will trigger all it's # C support machinery. Also note that it means that autoscan, seeing # CC etc. in the Makefile, will ask for an AC_PROG_CC use... # _AM_DEPENDENCIES(NAME) # ---------------------- # See how the compiler implements dependency checking. # NAME is "CC", "CXX", "OBJC", "OBJCXX", "UPC", or "GJC". # We try a few techniques and use that to set a single cache variable. # # We don't AC_REQUIRE the corresponding AC_PROG_CC since the latter was # modified to invoke _AM_DEPENDENCIES(CC); we would have a circular # dependency, and given that the user is not expected to run this macro, # just rely on AC_PROG_CC. AC_DEFUN([_AM_DEPENDENCIES], [AC_REQUIRE([AM_SET_DEPDIR])dnl AC_REQUIRE([AM_OUTPUT_DEPENDENCY_COMMANDS])dnl AC_REQUIRE([AM_MAKE_INCLUDE])dnl AC_REQUIRE([AM_DEP_TRACK])dnl m4_if([$1], [CC], [depcc="$CC" am_compiler_list=], [$1], [CXX], [depcc="$CXX" am_compiler_list=], [$1], [OBJC], [depcc="$OBJC" am_compiler_list='gcc3 gcc'], [$1], [OBJCXX], [depcc="$OBJCXX" am_compiler_list='gcc3 gcc'], [$1], [UPC], [depcc="$UPC" am_compiler_list=], [$1], [GCJ], [depcc="$GCJ" am_compiler_list='gcc3 gcc'], [depcc="$$1" am_compiler_list=]) AC_CACHE_CHECK([dependency style of $depcc], [am_cv_$1_dependencies_compiler_type], [if test -z "$AMDEP_TRUE" && test -f "$am_depcomp"; then # We make a subdir and do the tests there. Otherwise we can end up # making bogus files that we don't know about and never remove. For # instance it was reported that on HP-UX the gcc test will end up # making a dummy file named 'D' -- because '-MD' means "put the output # in D". rm -rf conftest.dir mkdir conftest.dir # Copy depcomp to subdir because otherwise we won't find it if we're # using a relative directory. cp "$am_depcomp" conftest.dir cd conftest.dir # We will build objects and dependencies in a subdirectory because # it helps to detect inapplicable dependency modes. For instance # both Tru64's cc and ICC support -MD to output dependencies as a # side effect of compilation, but ICC will put the dependencies in # the current directory while Tru64 will put them in the object # directory. mkdir sub am_cv_$1_dependencies_compiler_type=none if test "$am_compiler_list" = ""; then am_compiler_list=`sed -n ['s/^#*\([a-zA-Z0-9]*\))$/\1/p'] < ./depcomp` fi am__universal=false m4_case([$1], [CC], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac], [CXX], [case " $depcc " in #( *\ -arch\ *\ -arch\ *) am__universal=true ;; esac]) for depmode in $am_compiler_list; do # Setup a source with many dependencies, because some compilers # like to wrap large dependency lists on column 80 (with \), and # we should not choose a depcomp mode which is confused by this. # # We need to recreate these files for each test, as the compiler may # overwrite some of them when testing with obscure command lines. # This happens at least with the AIX C compiler. : > sub/conftest.c for i in 1 2 3 4 5 6; do echo '#include "conftst'$i'.h"' >> sub/conftest.c # Using ": > sub/conftst$i.h" creates only sub/conftst1.h with # Solaris 10 /bin/sh. echo '/* dummy */' > sub/conftst$i.h done echo "${am__include} ${am__quote}sub/conftest.Po${am__quote}" > confmf # We check with '-c' and '-o' for the sake of the "dashmstdout" # mode. It turns out that the SunPro C++ compiler does not properly # handle '-M -o', and we need to detect this. Also, some Intel # versions had trouble with output in subdirs. am__obj=sub/conftest.${OBJEXT-o} am__minus_obj="-o $am__obj" case $depmode in gcc) # This depmode causes a compiler race in universal mode. test "$am__universal" = false || continue ;; nosideeffect) # After this tag, mechanisms are not by side-effect, so they'll # only be used when explicitly requested. if test "x$enable_dependency_tracking" = xyes; then continue else break fi ;; msvc7 | msvc7msys | msvisualcpp | msvcmsys) # This compiler won't grok '-c -o', but also, the minuso test has # not run yet. These depmodes are late enough in the game, and # so weak that their functioning should not be impacted. am__obj=conftest.${OBJEXT-o} am__minus_obj= ;; none) break ;; esac if depmode=$depmode \ source=sub/conftest.c object=$am__obj \ depfile=sub/conftest.Po tmpdepfile=sub/conftest.TPo \ $SHELL ./depcomp $depcc -c $am__minus_obj sub/conftest.c \ >/dev/null 2>conftest.err && grep sub/conftst1.h sub/conftest.Po > /dev/null 2>&1 && grep sub/conftst6.h sub/conftest.Po > /dev/null 2>&1 && grep $am__obj sub/conftest.Po > /dev/null 2>&1 && ${MAKE-make} -s -f confmf > /dev/null 2>&1; then # icc doesn't choke on unknown options, it will just issue warnings # or remarks (even with -Werror). So we grep stderr for any message # that says an option was ignored or not supported. # When given -MP, icc 7.0 and 7.1 complain thusly: # icc: Command line warning: ignoring option '-M'; no argument required # The diagnosis changed in icc 8.0: # icc: Command line remark: option '-MP' not supported if (grep 'ignoring option' conftest.err || grep 'not supported' conftest.err) >/dev/null 2>&1; then :; else am_cv_$1_dependencies_compiler_type=$depmode break fi fi done cd .. rm -rf conftest.dir else am_cv_$1_dependencies_compiler_type=none fi ]) AC_SUBST([$1DEPMODE], [depmode=$am_cv_$1_dependencies_compiler_type]) AM_CONDITIONAL([am__fastdep$1], [ test "x$enable_dependency_tracking" != xno \ && test "$am_cv_$1_dependencies_compiler_type" = gcc3]) ]) # AM_SET_DEPDIR # ------------- # Choose a directory name for dependency files. # This macro is AC_REQUIREd in _AM_DEPENDENCIES. AC_DEFUN([AM_SET_DEPDIR], [AC_REQUIRE([AM_SET_LEADING_DOT])dnl AC_SUBST([DEPDIR], ["${am__leading_dot}deps"])dnl ]) # AM_DEP_TRACK # ------------ AC_DEFUN([AM_DEP_TRACK], [AC_ARG_ENABLE([dependency-tracking], [dnl AS_HELP_STRING( [--enable-dependency-tracking], [do not reject slow dependency extractors]) AS_HELP_STRING( [--disable-dependency-tracking], [speeds up one-time build])]) if test "x$enable_dependency_tracking" != xno; then am_depcomp="$ac_aux_dir/depcomp" AMDEPBACKSLASH='\' am__nodep='_no' fi AM_CONDITIONAL([AMDEP], [test "x$enable_dependency_tracking" != xno]) AC_SUBST([AMDEPBACKSLASH])dnl _AM_SUBST_NOTMAKE([AMDEPBACKSLASH])dnl AC_SUBST([am__nodep])dnl _AM_SUBST_NOTMAKE([am__nodep])dnl ]) # Generate code to set up dependency tracking. -*- Autoconf -*- # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_OUTPUT_DEPENDENCY_COMMANDS # ------------------------------ AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS], [{ # Older Autoconf quotes --file arguments for eval, but not when files # are listed without --file. Let's play safe and only enable the eval # if we detect the quoting. case $CONFIG_FILES in *\'*) eval set x "$CONFIG_FILES" ;; *) set x $CONFIG_FILES ;; esac shift for mf do # Strip MF so we end up with the name of the file. mf=`echo "$mf" | sed -e 's/:.*$//'` # Check whether this is an Automake generated Makefile or not. # We used to match only the files named 'Makefile.in', but # some people rename them; so instead we look at the file content. # Grep'ing the first line is not enough: some people post-process # each Makefile.in and add a new line on top of each file to say so. # Grep'ing the whole file is not good either: AIX grep has a line # limit of 2048, but all sed's we know have understand at least 4000. if sed -n 's,^#.*generated by automake.*,X,p' "$mf" | grep X >/dev/null 2>&1; then dirpart=`AS_DIRNAME("$mf")` else continue fi # Extract the definition of DEPDIR, am__include, and am__quote # from the Makefile without running 'make'. DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"` test -z "$DEPDIR" && continue am__include=`sed -n 's/^am__include = //p' < "$mf"` test -z "$am__include" && continue am__quote=`sed -n 's/^am__quote = //p' < "$mf"` # Find all dependency output files, they are included files with # $(DEPDIR) in their names. We invoke sed twice because it is the # simplest approach to changing $(DEPDIR) to its actual value in the # expansion. for file in `sed -n " s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \ sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g'`; do # Make sure the directory exists. test -f "$dirpart/$file" && continue fdir=`AS_DIRNAME(["$file"])` AS_MKDIR_P([$dirpart/$fdir]) # echo "creating $dirpart/$file" echo '# dummy' > "$dirpart/$file" done done } ])# _AM_OUTPUT_DEPENDENCY_COMMANDS # AM_OUTPUT_DEPENDENCY_COMMANDS # ----------------------------- # This macro should only be invoked once -- use via AC_REQUIRE. # # This code is only required when automatic dependency tracking # is enabled. FIXME. This creates each '.P' file that we will # need in order to bootstrap the dependency handling code. AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS], [AC_CONFIG_COMMANDS([depfiles], [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS], [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"]) ]) # Do all the work for Automake. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This macro actually does too much. Some checks are only needed if # your package does certain things. But this isn't really a big deal. # AM_INIT_AUTOMAKE(PACKAGE, VERSION, [NO-DEFINE]) # AM_INIT_AUTOMAKE([OPTIONS]) # ----------------------------------------------- # The call with PACKAGE and VERSION arguments is the old style # call (pre autoconf-2.50), which is being phased out. PACKAGE # and VERSION should now be passed to AC_INIT and removed from # the call to AM_INIT_AUTOMAKE. # We support both call styles for the transition. After # the next Automake release, Autoconf can make the AC_INIT # arguments mandatory, and then we can depend on a new Autoconf # release and drop the old call support. AC_DEFUN([AM_INIT_AUTOMAKE], [AC_PREREQ([2.65])dnl dnl Autoconf wants to disallow AM_ names. We explicitly allow dnl the ones we care about. m4_pattern_allow([^AM_[A-Z]+FLAGS$])dnl AC_REQUIRE([AM_SET_CURRENT_AUTOMAKE_VERSION])dnl AC_REQUIRE([AC_PROG_INSTALL])dnl if test "`cd $srcdir && pwd`" != "`pwd`"; then # Use -I$(srcdir) only when $(srcdir) != ., so that make's output # is not polluted with repeated "-I." AC_SUBST([am__isrc], [' -I$(srcdir)'])_AM_SUBST_NOTMAKE([am__isrc])dnl # test to see if srcdir already configured if test -f $srcdir/config.status; then AC_MSG_ERROR([source directory already configured; run "make distclean" there first]) fi fi # test whether we have cygpath if test -z "$CYGPATH_W"; then if (cygpath --version) >/dev/null 2>/dev/null; then CYGPATH_W='cygpath -w' else CYGPATH_W=echo fi fi AC_SUBST([CYGPATH_W]) # Define the identity of the package. dnl Distinguish between old-style and new-style calls. m4_ifval([$2], [AC_DIAGNOSE([obsolete], [$0: two- and three-arguments forms are deprecated.]) m4_ifval([$3], [_AM_SET_OPTION([no-define])])dnl AC_SUBST([PACKAGE], [$1])dnl AC_SUBST([VERSION], [$2])], [_AM_SET_OPTIONS([$1])dnl dnl Diagnose old-style AC_INIT with new-style AM_AUTOMAKE_INIT. m4_if( m4_ifdef([AC_PACKAGE_NAME], [ok]):m4_ifdef([AC_PACKAGE_VERSION], [ok]), [ok:ok],, [m4_fatal([AC_INIT should be called with package and version arguments])])dnl AC_SUBST([PACKAGE], ['AC_PACKAGE_TARNAME'])dnl AC_SUBST([VERSION], ['AC_PACKAGE_VERSION'])])dnl _AM_IF_OPTION([no-define],, [AC_DEFINE_UNQUOTED([PACKAGE], ["$PACKAGE"], [Name of package]) AC_DEFINE_UNQUOTED([VERSION], ["$VERSION"], [Version number of package])])dnl # Some tools Automake needs. AC_REQUIRE([AM_SANITY_CHECK])dnl AC_REQUIRE([AC_ARG_PROGRAM])dnl AM_MISSING_PROG([ACLOCAL], [aclocal-${am__api_version}]) AM_MISSING_PROG([AUTOCONF], [autoconf]) AM_MISSING_PROG([AUTOMAKE], [automake-${am__api_version}]) AM_MISSING_PROG([AUTOHEADER], [autoheader]) AM_MISSING_PROG([MAKEINFO], [makeinfo]) AC_REQUIRE([AM_PROG_INSTALL_SH])dnl AC_REQUIRE([AM_PROG_INSTALL_STRIP])dnl AC_REQUIRE([AC_PROG_MKDIR_P])dnl # For better backward compatibility. To be removed once Automake 1.9.x # dies out for good. For more background, see: # # AC_SUBST([mkdir_p], ['$(MKDIR_P)']) # We need awk for the "check" target. The system "awk" is bad on # some platforms. AC_REQUIRE([AC_PROG_AWK])dnl AC_REQUIRE([AC_PROG_MAKE_SET])dnl AC_REQUIRE([AM_SET_LEADING_DOT])dnl _AM_IF_OPTION([tar-ustar], [_AM_PROG_TAR([ustar])], [_AM_IF_OPTION([tar-pax], [_AM_PROG_TAR([pax])], [_AM_PROG_TAR([v7])])]) _AM_IF_OPTION([no-dependencies],, [AC_PROVIDE_IFELSE([AC_PROG_CC], [_AM_DEPENDENCIES([CC])], [m4_define([AC_PROG_CC], m4_defn([AC_PROG_CC])[_AM_DEPENDENCIES([CC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_CXX], [_AM_DEPENDENCIES([CXX])], [m4_define([AC_PROG_CXX], m4_defn([AC_PROG_CXX])[_AM_DEPENDENCIES([CXX])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJC], [_AM_DEPENDENCIES([OBJC])], [m4_define([AC_PROG_OBJC], m4_defn([AC_PROG_OBJC])[_AM_DEPENDENCIES([OBJC])])])dnl AC_PROVIDE_IFELSE([AC_PROG_OBJCXX], [_AM_DEPENDENCIES([OBJCXX])], [m4_define([AC_PROG_OBJCXX], m4_defn([AC_PROG_OBJCXX])[_AM_DEPENDENCIES([OBJCXX])])])dnl ]) AC_REQUIRE([AM_SILENT_RULES])dnl dnl The testsuite driver may need to know about EXEEXT, so add the dnl 'am__EXEEXT' conditional if _AM_COMPILER_EXEEXT was seen. This dnl macro is hooked onto _AC_COMPILER_EXEEXT early, see below. AC_CONFIG_COMMANDS_PRE(dnl [m4_provide_if([_AM_COMPILER_EXEEXT], [AM_CONDITIONAL([am__EXEEXT], [test -n "$EXEEXT"])])])dnl ]) dnl Hook into '_AC_COMPILER_EXEEXT' early to learn its expansion. Do not dnl add the conditional right here, as _AC_COMPILER_EXEEXT may be further dnl mangled by Autoconf and run in a shell conditional statement. m4_define([_AC_COMPILER_EXEEXT], m4_defn([_AC_COMPILER_EXEEXT])[m4_provide([_AM_COMPILER_EXEEXT])]) # When config.status generates a header, we must update the stamp-h file. # This file resides in the same directory as the config header # that is generated. The stamp files are numbered to have different names. # Autoconf calls _AC_AM_CONFIG_HEADER_HOOK (when defined) in the # loop where config.status creates the headers, so we can generate # our stamp files there. AC_DEFUN([_AC_AM_CONFIG_HEADER_HOOK], [# Compute $1's index in $config_headers. _am_arg=$1 _am_stamp_count=1 for _am_header in $config_headers :; do case $_am_header in $_am_arg | $_am_arg:* ) break ;; * ) _am_stamp_count=`expr $_am_stamp_count + 1` ;; esac done echo "timestamp for $_am_arg" >`AS_DIRNAME(["$_am_arg"])`/stamp-h[]$_am_stamp_count]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_SH # ------------------ # Define $install_sh. AC_DEFUN([AM_PROG_INSTALL_SH], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl if test x"${install_sh}" != xset; then case $am_aux_dir in *\ * | *\ *) install_sh="\${SHELL} '$am_aux_dir/install-sh'" ;; *) install_sh="\${SHELL} $am_aux_dir/install-sh" esac fi AC_SUBST([install_sh])]) # Copyright (C) 2003-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # Check whether the underlying file-system supports filenames # with a leading dot. For instance MS-DOS doesn't. AC_DEFUN([AM_SET_LEADING_DOT], [rm -rf .tst 2>/dev/null mkdir .tst 2>/dev/null if test -d .tst; then am__leading_dot=. else am__leading_dot=_ fi rmdir .tst 2>/dev/null AC_SUBST([am__leading_dot])]) # Check to see how 'make' treats includes. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MAKE_INCLUDE() # ----------------- # Check to see how make treats includes. AC_DEFUN([AM_MAKE_INCLUDE], [am_make=${MAKE-make} cat > confinc << 'END' am__doit: @echo this is the am__doit target .PHONY: am__doit END # If we don't find an include directive, just comment out the code. AC_MSG_CHECKING([for style of include used by $am_make]) am__include="#" am__quote= _am_result=none # First try GNU make style include. echo "include confinc" > confmf # Ignore all kinds of additional output from 'make'. case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=include am__quote= _am_result=GNU ;; esac # Now try BSD make style include. if test "$am__include" = "#"; then echo '.include "confinc"' > confmf case `$am_make -s -f confmf 2> /dev/null` in #( *the\ am__doit\ target*) am__include=.include am__quote="\"" _am_result=BSD ;; esac fi AC_SUBST([am__include]) AC_SUBST([am__quote]) AC_MSG_RESULT([$_am_result]) rm -f confinc confmf ]) # Copyright (C) 1999-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_CC_C_O # -------------- # Like AC_PROG_CC_C_O, but changed for automake. AC_DEFUN([AM_PROG_CC_C_O], [AC_REQUIRE([AC_PROG_CC_C_O])dnl AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([compile])dnl # FIXME: we rely on the cache variable name because # there is no other way. set dummy $CC am_cc=`echo $[2] | sed ['s/[^a-zA-Z0-9_]/_/g;s/^[0-9]/_/']` eval am_t=\$ac_cv_prog_cc_${am_cc}_c_o if test "$am_t" != yes; then # Losing compiler, so override with the script. # FIXME: It is wrong to rewrite CC. # But if we don't then we get into trouble of one sort or another. # A longer-term fix would be to have automake use am__CC in this case, # and then we could set am__CC="\$(top_srcdir)/compile \$(CC)" CC="$am_aux_dir/compile $CC" fi dnl Make sure AC_PROG_CC is never called again, or it will override our dnl setting of CC. m4_define([AC_PROG_CC], [m4_fatal([AC_PROG_CC cannot be called after AM_PROG_CC_C_O])]) ]) # Fake the existence of programs that GNU maintainers use. -*- Autoconf -*- # Copyright (C) 1997-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_MISSING_PROG(NAME, PROGRAM) # ------------------------------ AC_DEFUN([AM_MISSING_PROG], [AC_REQUIRE([AM_MISSING_HAS_RUN]) $1=${$1-"${am_missing_run}$2"} AC_SUBST($1)]) # AM_MISSING_HAS_RUN # ------------------ # Define MISSING if not defined so far and test if it is modern enough. # If it is, set am_missing_run to use it, otherwise, to nothing. AC_DEFUN([AM_MISSING_HAS_RUN], [AC_REQUIRE([AM_AUX_DIR_EXPAND])dnl AC_REQUIRE_AUX_FILE([missing])dnl if test x"${MISSING+set}" != xset; then case $am_aux_dir in *\ * | *\ *) MISSING="\${SHELL} \"$am_aux_dir/missing\"" ;; *) MISSING="\${SHELL} $am_aux_dir/missing" ;; esac fi # Use eval to expand $SHELL if eval "$MISSING --is-lightweight"; then am_missing_run="$MISSING " else am_missing_run= AC_MSG_WARN(['missing' script is too old or missing]) fi ]) # Helper functions for option handling. -*- Autoconf -*- # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_MANGLE_OPTION(NAME) # ----------------------- AC_DEFUN([_AM_MANGLE_OPTION], [[_AM_OPTION_]m4_bpatsubst($1, [[^a-zA-Z0-9_]], [_])]) # _AM_SET_OPTION(NAME) # -------------------- # Set option NAME. Presently that only means defining a flag for this option. AC_DEFUN([_AM_SET_OPTION], [m4_define(_AM_MANGLE_OPTION([$1]), [1])]) # _AM_SET_OPTIONS(OPTIONS) # ------------------------ # OPTIONS is a space-separated list of Automake options. AC_DEFUN([_AM_SET_OPTIONS], [m4_foreach_w([_AM_Option], [$1], [_AM_SET_OPTION(_AM_Option)])]) # _AM_IF_OPTION(OPTION, IF-SET, [IF-NOT-SET]) # ------------------------------------------- # Execute IF-SET if OPTION is set, IF-NOT-SET otherwise. AC_DEFUN([_AM_IF_OPTION], [m4_ifset(_AM_MANGLE_OPTION([$1]), [$2], [$3])]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_RUN_LOG(COMMAND) # ------------------- # Run COMMAND, save the exit status in ac_status, and log it. # (This has been adapted from Autoconf's _AC_RUN_LOG macro.) AC_DEFUN([AM_RUN_LOG], [{ echo "$as_me:$LINENO: $1" >&AS_MESSAGE_LOG_FD ($1) >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD ac_status=$? echo "$as_me:$LINENO: \$? = $ac_status" >&AS_MESSAGE_LOG_FD (exit $ac_status); }]) # Check to make sure that the build environment is sane. -*- Autoconf -*- # Copyright (C) 1996-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SANITY_CHECK # --------------- AC_DEFUN([AM_SANITY_CHECK], [AC_MSG_CHECKING([whether build environment is sane]) # Reject unsafe characters in $srcdir or the absolute working directory # name. Accept space and tab only in the latter. am_lf=' ' case `pwd` in *[[\\\"\#\$\&\'\`$am_lf]]*) AC_MSG_ERROR([unsafe absolute working directory name]);; esac case $srcdir in *[[\\\"\#\$\&\'\`$am_lf\ \ ]]*) AC_MSG_ERROR([unsafe srcdir value: '$srcdir']);; esac # Do 'set' in a subshell so we don't clobber the current shell's # arguments. Must try -L first in case configure is actually a # symlink; some systems play weird games with the mod time of symlinks # (eg FreeBSD returns the mod time of the symlink's containing # directory). if ( am_has_slept=no for am_try in 1 2; do echo "timestamp, slept: $am_has_slept" > conftest.file set X `ls -Lt "$srcdir/configure" conftest.file 2> /dev/null` if test "$[*]" = "X"; then # -L didn't work. set X `ls -t "$srcdir/configure" conftest.file` fi if test "$[*]" != "X $srcdir/configure conftest.file" \ && test "$[*]" != "X conftest.file $srcdir/configure"; then # If neither matched, then we have a broken ls. This can happen # if, for instance, CONFIG_SHELL is bash and it inherits a # broken ls alias from the environment. This has actually # happened. Such a system could not be considered "sane". AC_MSG_ERROR([ls -t appears to fail. Make sure there is not a broken alias in your environment]) fi if test "$[2]" = conftest.file || test $am_try -eq 2; then break fi # Just in case. sleep 1 am_has_slept=yes done test "$[2]" = conftest.file ) then # Ok. : else AC_MSG_ERROR([newly created file is older than distributed files! Check your system clock]) fi AC_MSG_RESULT([yes]) # If we didn't sleep, we still need to ensure time stamps of config.status and # generated files are strictly newer. am_sleep_pid= if grep 'slept: no' conftest.file >/dev/null 2>&1; then ( sleep 1 ) & am_sleep_pid=$! fi AC_CONFIG_COMMANDS_PRE( [AC_MSG_CHECKING([that generated files are newer than configure]) if test -n "$am_sleep_pid"; then # Hide warnings about reused PIDs. wait $am_sleep_pid 2>/dev/null fi AC_MSG_RESULT([done])]) rm -f conftest.file ]) # Copyright (C) 2009-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_SILENT_RULES([DEFAULT]) # -------------------------- # Enable less verbose build rules; with the default set to DEFAULT # ("yes" being less verbose, "no" or empty being verbose). AC_DEFUN([AM_SILENT_RULES], [AC_ARG_ENABLE([silent-rules], [dnl AS_HELP_STRING( [--enable-silent-rules], [less verbose build output (undo: "make V=1")]) AS_HELP_STRING( [--disable-silent-rules], [verbose build output (undo: "make V=0")])dnl ]) case $enable_silent_rules in @%:@ ((( yes) AM_DEFAULT_VERBOSITY=0;; no) AM_DEFAULT_VERBOSITY=1;; *) AM_DEFAULT_VERBOSITY=m4_if([$1], [yes], [0], [1]);; esac dnl dnl A few 'make' implementations (e.g., NonStop OS and NextStep) dnl do not support nested variable expansions. dnl See automake bug#9928 and bug#10237. am_make=${MAKE-make} AC_CACHE_CHECK([whether $am_make supports nested variables], [am_cv_make_support_nested_variables], [if AS_ECHO([['TRUE=$(BAR$(V)) BAR0=false BAR1=true V=1 am__doit: @$(TRUE) .PHONY: am__doit']]) | $am_make -f - >/dev/null 2>&1; then am_cv_make_support_nested_variables=yes else am_cv_make_support_nested_variables=no fi]) if test $am_cv_make_support_nested_variables = yes; then dnl Using '$V' instead of '$(V)' breaks IRIX make. AM_V='$(V)' AM_DEFAULT_V='$(AM_DEFAULT_VERBOSITY)' else AM_V=$AM_DEFAULT_VERBOSITY AM_DEFAULT_V=$AM_DEFAULT_VERBOSITY fi AC_SUBST([AM_V])dnl AM_SUBST_NOTMAKE([AM_V])dnl AC_SUBST([AM_DEFAULT_V])dnl AM_SUBST_NOTMAKE([AM_DEFAULT_V])dnl AC_SUBST([AM_DEFAULT_VERBOSITY])dnl AM_BACKSLASH='\' AC_SUBST([AM_BACKSLASH])dnl _AM_SUBST_NOTMAKE([AM_BACKSLASH])dnl ]) # Copyright (C) 2001-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # AM_PROG_INSTALL_STRIP # --------------------- # One issue with vendor 'install' (even GNU) is that you can't # specify the program used to strip binaries. This is especially # annoying in cross-compiling environments, where the build's strip # is unlikely to handle the host's binaries. # Fortunately install-sh will honor a STRIPPROG variable, so we # always use install-sh in "make install-strip", and initialize # STRIPPROG with the value of the STRIP variable (set by the user). AC_DEFUN([AM_PROG_INSTALL_STRIP], [AC_REQUIRE([AM_PROG_INSTALL_SH])dnl # Installed binaries are usually stripped using 'strip' when the user # run "make install-strip". However 'strip' might not be the right # tool to use in cross-compilation environments, therefore Automake # will honor the 'STRIP' environment variable to overrule this program. dnl Don't test for $cross_compiling = yes, because it might be 'maybe'. if test "$cross_compiling" != no; then AC_CHECK_TOOL([STRIP], [strip], :) fi INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s" AC_SUBST([INSTALL_STRIP_PROGRAM])]) # Copyright (C) 2006-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_SUBST_NOTMAKE(VARIABLE) # --------------------------- # Prevent Automake from outputting VARIABLE = @VARIABLE@ in Makefile.in. # This macro is traced by Automake. AC_DEFUN([_AM_SUBST_NOTMAKE]) # AM_SUBST_NOTMAKE(VARIABLE) # -------------------------- # Public sister of _AM_SUBST_NOTMAKE. AC_DEFUN([AM_SUBST_NOTMAKE], [_AM_SUBST_NOTMAKE($@)]) # Check how to create a tarball. -*- Autoconf -*- # Copyright (C) 2004-2013 Free Software Foundation, Inc. # # This file is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # _AM_PROG_TAR(FORMAT) # -------------------- # Check how to create a tarball in format FORMAT. # FORMAT should be one of 'v7', 'ustar', or 'pax'. # # Substitute a variable $(am__tar) that is a command # writing to stdout a FORMAT-tarball containing the directory # $tardir. # tardir=directory && $(am__tar) > result.tar # # Substitute a variable $(am__untar) that extract such # a tarball read from stdin. # $(am__untar) < result.tar # AC_DEFUN([_AM_PROG_TAR], [# Always define AMTAR for backward compatibility. Yes, it's still used # in the wild :-( We should find a proper way to deprecate it ... AC_SUBST([AMTAR], ['$${TAR-tar}']) # We'll loop over all known methods to create a tar archive until one works. _am_tools='gnutar m4_if([$1], [ustar], [plaintar]) pax cpio none' m4_if([$1], [v7], [am__tar='$${TAR-tar} chof - "$$tardir"' am__untar='$${TAR-tar} xf -'], [m4_case([$1], [ustar], [# The POSIX 1988 'ustar' format is defined with fixed-size fields. # There is notably a 21 bits limit for the UID and the GID. In fact, # the 'pax' utility can hang on bigger UID/GID (see automake bug#8343 # and bug#13588). am_max_uid=2097151 # 2^21 - 1 am_max_gid=$am_max_uid # The $UID and $GID variables are not portable, so we need to resort # to the POSIX-mandated id(1) utility. Errors in the 'id' calls # below are definitely unexpected, so allow the users to see them # (that is, avoid stderr redirection). am_uid=`id -u || echo unknown` am_gid=`id -g || echo unknown` AC_MSG_CHECKING([whether UID '$am_uid' is supported by ustar format]) if test $am_uid -le $am_max_uid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi AC_MSG_CHECKING([whether GID '$am_gid' is supported by ustar format]) if test $am_gid -le $am_max_gid; then AC_MSG_RESULT([yes]) else AC_MSG_RESULT([no]) _am_tools=none fi], [pax], [], [m4_fatal([Unknown tar format])]) AC_MSG_CHECKING([how to create a $1 tar archive]) # Go ahead even if we have the value already cached. We do so because we # need to set the values for the 'am__tar' and 'am__untar' variables. _am_tools=${am_cv_prog_tar_$1-$_am_tools} for _am_tool in $_am_tools; do case $_am_tool in gnutar) for _am_tar in tar gnutar gtar; do AM_RUN_LOG([$_am_tar --version]) && break done am__tar="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$$tardir"' am__tar_="$_am_tar --format=m4_if([$1], [pax], [posix], [$1]) -chf - "'"$tardir"' am__untar="$_am_tar -xf -" ;; plaintar) # Must skip GNU tar: if it does not support --format= it doesn't create # ustar tarball either. (tar --version) >/dev/null 2>&1 && continue am__tar='tar chf - "$$tardir"' am__tar_='tar chf - "$tardir"' am__untar='tar xf -' ;; pax) am__tar='pax -L -x $1 -w "$$tardir"' am__tar_='pax -L -x $1 -w "$tardir"' am__untar='pax -r' ;; cpio) am__tar='find "$$tardir" -print | cpio -o -H $1 -L' am__tar_='find "$tardir" -print | cpio -o -H $1 -L' am__untar='cpio -i -H $1 -d' ;; none) am__tar=false am__tar_=false am__untar=false ;; esac # If the value was cached, stop now. We just wanted to have am__tar # and am__untar set. test -n "${am_cv_prog_tar_$1}" && break # tar/untar a dummy directory, and stop if the command works. rm -rf conftest.dir mkdir conftest.dir echo GrepMe > conftest.dir/file AM_RUN_LOG([tardir=conftest.dir && eval $am__tar_ >conftest.tar]) rm -rf conftest.dir if test -s conftest.tar; then AM_RUN_LOG([$am__untar /dev/null 2>&1 && break fi done rm -rf conftest.dir AC_CACHE_VAL([am_cv_prog_tar_$1], [am_cv_prog_tar_$1=$_am_tool]) AC_MSG_RESULT([$am_cv_prog_tar_$1])]) AC_SUBST([am__tar]) AC_SUBST([am__untar]) ]) # _AM_PROG_TAR m4_include([config/ac_dont_check_for_root.m4]) m4_include([config/ac_freeipmi_config_file.m4]) m4_include([config/ac_freeipmi_interpret_sel_config_file.m4]) m4_include([config/ac_freeipmi_interpret_sensor_config_file.m4]) m4_include([config/ac_ipmi_monitoring_sdr_cache_dir.m4]) m4_include([config/ac_ipmi_monitoring_sensor_config_file.m4]) m4_include([config/ac_ipmiconsole_config_file.m4]) m4_include([config/ac_ipmidetect_config_file.m4]) m4_include([config/ac_ipmidetectd_config_file.m4]) m4_include([config/ac_ipmipower_config_file.m4]) m4_include([config/ac_ipmiseld_cache_dir.m4]) m4_include([config/ac_ipmiseld_config_file.m4]) m4_include([config/ac_libipmiconsole_config_file.m4]) m4_include([config/ac_lsh_gcc_attributes.m4]) m4_include([config/acx_pthread.m4]) m4_include([config/systemd.m4]) freeipmi-1.6.4/freeipmi.spec.in0000644002055400205540000004466213527331635016357 0ustar00achuachu00000000000000# # Copyright (c) 2003-2010 FreeIPMI Core Team # %define name @PACKAGE@ %define version @VERSION@ %if %{?_with_debug:1}%{!?_with_debug:0} %define release 1.debug%{?dist} %else %define release 1%{?dist} %endif Name: %{name} Version: %{version} Release: %{release} License: GPLv2+ Group: Applications/System URL: http://www.gnu.org/software/freeipmi/ Source: ftp://ftp.gnu.org/gnu/freeipmi/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libgcrypt-devel texinfo %if %{?_with_systemd:1}%{!?_with_systemd:0} BuildRequires: systemd %endif Requires(post): info Requires(preun): info Obsoletes: freeipmi-ipmimonitoring Summary: FreeIPMI %description The FreeIPMI project provides "Remote-Console" (out-of-band) and "System Management Software" (in-band) based on Intelligent Platform Management Interface specification. %package devel Summary: Development package for FreeIPMI Group: Development/System Requires: freeipmi = %{version}-%{release} %description devel Development package for FreeIPMI. This package includes the FreeIPMI header files and static libraries. %package bmc-watchdog Summary: FreeIPMI BMC watchdog Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description bmc-watchdog Provides a watchdog daemon for OS monitoring and recovery. %package ipmidetectd Summary: IPMI node detection monitoring daemon Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description ipmidetectd IPMI node detection daemon. Regularly IPMI-pings remote nodes to provide data for a number of IPMI detection tools and features. %package ipmiseld Summary: IPMI SEL syslog logging daemon Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description ipmiseld IPMI SEL syslog logging daemon. %if %{?_with_debug:1}%{!?_with_debug:0} %define _enable_debug --enable-debug --enable-trace %endif %if %{?_with_systemd:1}%{!?_with_systemd:0} %define _with_systemdsystemunitdir --with-systemdsystemunitdir=%{_unitdir} %endif %prep %setup -q %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ %{?_with_systemdsystemunitdir} \ %{?_enable_debug} --disable-static CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" make install %if %{?_with_systemd:0}%{!?_with_systemd:1} # fix coherance problems with associated script filenames mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/ # if check needed for SLES systems if [[ "%{_sysconfdir}/init.d" != "%{_initrddir}" ]] then mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/bmc-watchdog $RPM_BUILD_ROOT/%{_initrddir}/bmc-watchdog mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ipmidetectd $RPM_BUILD_ROOT/%{_initrddir}/ipmidetectd mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ipmiseld $RPM_BUILD_ROOT/%{_initrddir}/ipmiseld fi %endif rm -f %{buildroot}%{_infodir}/dir # kludge to get around rpmlint complaining about 0 length semephore file echo freeipmi > %{buildroot}%{_localstatedir}/lib/freeipmi/ipckey # Remove .la files rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT %post if [ -x /sbin/install-info ]; then #/sbin/install-info %{_infodir}/freeipmi.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir fi /sbin/ldconfig %preun if [ $1 = 0 ]; then if [ -x /sbin/install-info ]; then #/sbin/install-info --delete %{_infodir}/freeipmi.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir fi fi %postun -p /sbin/ldconfig %post bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post bmc-watchdog.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then /sbin/chkconfig --add bmc-watchdog /sbin/chkconfig bmc-watchdog off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then if %{_initrddir}/bmc-watchdog status | grep -q running; then %{_initrddir}/bmc-watchdog restart else %{_initrddir}/bmc-watchdog condrestart fi fi fi %endif %preun bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun bmc-watchdog.service %else # # Stop bmc-watchdog if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then if %{_initrddir}/bmc-watchdog status | grep -q running; then %{_initrddir}/bmc-watchdog stop fi /sbin/chkconfig --del bmc-watchdog fi fi %endif %postun bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart bmc-watchdog.service %endif %post ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post ipmidetectd.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then /sbin/chkconfig --add ipmidetectd /sbin/chkconfig ipmidetectd off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then if %{_initrddir}/ipmidetectd status | grep -q running; then %{_initrddir}/ipmidetectd restart else %{_initrddir}/ipmidetectd condrestart fi fi fi %endif %preun ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun ipmidetectd.service %else # # Stop ipmidetectd if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then if %{_initrddir}/ipmidetectd status | grep -q running; then %{_initrddir}/ipmidetectd stop fi /sbin/chkconfig --del ipmidetectd fi fi %endif %postun ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart ipmidetectd.service %endif %post ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post ipmiseld.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/ipmiseld ]; then /sbin/chkconfig --add ipmiseld /sbin/chkconfig ipmiseld off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/ipmiseld ]; then if %{_initrddir}/ipmiseld status | grep -q running; then %{_initrddir}/ipmiseld restart else %{_initrddir}/ipmiseld condrestart fi fi fi %endif %preun ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun ipmiseld.service %else # # Stop ipmiseld if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/ipmiseld ]; then if %{_initrddir}/ipmiseld status | grep -q running; then %{_initrddir}/ipmiseld stop fi /sbin/chkconfig --del ipmiseld fi fi %endif %postun ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart ipmiseld.service %endif %files %defattr(-,root,root) %dir %{_sysconfdir}/freeipmi/ %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi_interpret_sel.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi_interpret_sensor.conf %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetect.conf %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/libipmiconsole.conf %doc %{_infodir}/* %dir %{_datadir}/doc/%{name} %doc %{_datadir}/doc/%{name}/AUTHORS %doc %{_datadir}/doc/%{name}/COPYING %doc %{_datadir}/doc/%{name}/ChangeLog %doc %{_datadir}/doc/%{name}/ChangeLog.0 %doc %{_datadir}/doc/%{name}/INSTALL %doc %{_datadir}/doc/%{name}/NEWS %doc %{_datadir}/doc/%{name}/README %doc %{_datadir}/doc/%{name}/README.argp %doc %{_datadir}/doc/%{name}/README.build %doc %{_datadir}/doc/%{name}/README.openipmi %doc %{_datadir}/doc/%{name}/TODO %doc %{_datadir}/doc/%{name}/COPYING.ipmiping %doc %{_datadir}/doc/%{name}/COPYING.ipmipower %doc %{_datadir}/doc/%{name}/COPYING.ipmiconsole %doc %{_datadir}/doc/%{name}/COPYING.ipmimonitoring %doc %{_datadir}/doc/%{name}/COPYING.pstdout %doc %{_datadir}/doc/%{name}/COPYING.ipmidetect %doc %{_datadir}/doc/%{name}/COPYING.ipmi-fru %doc %{_datadir}/doc/%{name}/COPYING.ipmi-dcmi %doc %{_datadir}/doc/%{name}/COPYING.sunbmc %doc %{_datadir}/doc/%{name}/COPYING.ZRESEARCH %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiping %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmipower %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiconsole %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmimonitoring %doc %{_datadir}/doc/%{name}/DISCLAIMER.pstdout %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmidetect %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-fru %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-dcmi %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiping.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmipower.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiconsole.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmimonitoring.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.pstdout.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmidetect.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-fru.UC %doc %{_datadir}/doc/%{name}/freeipmi-coding.txt %doc %{_datadir}/doc/%{name}/freeipmi-design.txt %doc %{_datadir}/doc/%{name}/freeipmi-hostrange.txt %doc %{_datadir}/doc/%{name}/freeipmi-libraries.txt %doc %{_datadir}/doc/%{name}/freeipmi-bugs-issues-and-workarounds.txt %doc %{_datadir}/doc/%{name}/freeipmi-testing.txt %doc %{_datadir}/doc/%{name}/freeipmi-oem-documentation-requirements.txt %dir %{_datadir}/doc/%{name}/contrib %dir %{_datadir}/doc/%{name}/contrib/ganglia %doc %{_datadir}/doc/%{name}/contrib/ganglia/* %dir %{_datadir}/doc/%{name}/contrib/nagios %doc %{_datadir}/doc/%{name}/contrib/nagios/* %dir %{_datadir}/doc/%{name}/contrib/pet %doc %{_datadir}/doc/%{name}/contrib/pet/* %{_libdir}/libipmiconsole*so.* %{_libdir}/libfreeipmi*so.* %{_libdir}/libipmidetect*so.* %{_libdir}/libipmimonitoring.so.* %{_libdir}/pkgconfig/* %{_localstatedir}/lib/* %{_sbindir}/bmc-config %{_sbindir}/bmc-info %{_sbindir}/bmc-device %{_sbindir}/ipmi-config %{_sbindir}/ipmi-fru %{_sbindir}/ipmi-locate %{_sbindir}/ipmi-oem %{_sbindir}/ipmi-pef-config %{_sbindir}/pef-config %{_sbindir}/ipmi-raw %{_sbindir}/ipmi-sel %{_sbindir}/ipmi-sensors %{_sbindir}/ipmi-sensors-config %{_sbindir}/ipmiping %{_sbindir}/ipmi-ping %{_sbindir}/ipmipower %{_sbindir}/ipmi-power %{_sbindir}/rmcpping %{_sbindir}/rmcp-ping %{_sbindir}/ipmiconsole %{_sbindir}/ipmi-console %{_sbindir}/ipmimonitoring %{_sbindir}/ipmi-chassis %{_sbindir}/ipmi-chassis-config %{_sbindir}/ipmi-dcmi %{_sbindir}/ipmi-pet %{_sbindir}/ipmidetect %{_sbindir}/ipmi-detect %{_mandir}/man8/bmc-config.8* %{_mandir}/man5/bmc-config.conf.5* %{_mandir}/man8/bmc-info.8* %{_mandir}/man8/bmc-device.8* %{_mandir}/man8/ipmi-config.8* %{_mandir}/man5/ipmi-config.conf.5* %{_mandir}/man8/ipmi-fru.8* %{_mandir}/man8/ipmi-locate.8* %{_mandir}/man8/ipmi-oem.8* %{_mandir}/man8/ipmi-pef-config.8* %{_mandir}/man8/pef-config.8* %{_mandir}/man8/ipmi-raw.8* %{_mandir}/man8/ipmi-sel.8* %{_mandir}/man8/ipmi-sensors.8* %{_mandir}/man8/ipmi-sensors-config.8* %{_mandir}/man8/ipmiping.8* %{_mandir}/man8/ipmi-ping.8* %{_mandir}/man8/ipmipower.8* %{_mandir}/man8/ipmi-power.8* %{_mandir}/man5/ipmipower.conf.5* %{_mandir}/man8/rmcpping.8* %{_mandir}/man8/rmcp-ping.8* %{_mandir}/man8/ipmiconsole.8* %{_mandir}/man8/ipmi-console.8* %{_mandir}/man5/ipmiconsole.conf.5* %{_mandir}/man8/ipmimonitoring.8* %{_mandir}/man5/ipmi_monitoring_sensors.conf.5* %{_mandir}/man5/ipmimonitoring_sensors.conf.5* %{_mandir}/man5/ipmimonitoring.conf.5* %{_mandir}/man5/libipmimonitoring.conf.5* %{_mandir}/man5/freeipmi_interpret_sel.conf.5* %{_mandir}/man5/freeipmi_interpret_sensor.conf.5* %{_mandir}/man8/ipmi-chassis.8* %{_mandir}/man8/ipmi-chassis-config.8* %{_mandir}/man8/ipmi-dcmi.8* %{_mandir}/man8/ipmi-pet.8* %{_mandir}/man8/ipmidetect.8* %{_mandir}/man8/ipmi-detect.8* %{_mandir}/man5/freeipmi.conf.5* %{_mandir}/man5/ipmidetect.conf.5* %{_mandir}/man7/freeipmi.7* %{_mandir}/man5/libipmiconsole.conf.5* %dir %{_localstatedir}/cache/ipmimonitoringsdrcache %files devel %defattr(-,root,root) %dir %{_datadir}/doc/%{name}/contrib/libipmimonitoring %doc %{_datadir}/doc/%{name}/contrib/libipmimonitoring/* %{_libdir}/libipmiconsole.so %{_libdir}/libfreeipmi.so %{_libdir}/libipmidetect.so %{_libdir}/libipmimonitoring.so %dir %{_includedir}/freeipmi %dir %{_includedir}/freeipmi/api %dir %{_includedir}/freeipmi/cmds %dir %{_includedir}/freeipmi/debug %dir %{_includedir}/freeipmi/driver %dir %{_includedir}/freeipmi/fiid %dir %{_includedir}/freeipmi/fru %dir %{_includedir}/freeipmi/interface %dir %{_includedir}/freeipmi/interpret %dir %{_includedir}/freeipmi/locate %dir %{_includedir}/freeipmi/payload %dir %{_includedir}/freeipmi/record-format %dir %{_includedir}/freeipmi/record-format/oem %dir %{_includedir}/freeipmi/sdr %dir %{_includedir}/freeipmi/sdr/oem %dir %{_includedir}/freeipmi/sel %dir %{_includedir}/freeipmi/sensor-read %dir %{_includedir}/freeipmi/spec %dir %{_includedir}/freeipmi/spec/oem %dir %{_includedir}/freeipmi/templates %dir %{_includedir}/freeipmi/templates/oem %dir %{_includedir}/freeipmi/util %{_includedir}/ipmiconsole.h %{_includedir}/ipmidetect.h %{_includedir}/ipmi_monitoring*.h %{_includedir}/freeipmi/*.h %{_includedir}/freeipmi/api/*.h %{_includedir}/freeipmi/cmds/*.h %{_includedir}/freeipmi/debug/*.h %{_includedir}/freeipmi/driver/*.h %{_includedir}/freeipmi/fiid/*.h %{_includedir}/freeipmi/fru/*.h %{_includedir}/freeipmi/interface/*.h %{_includedir}/freeipmi/interpret/*.h %{_includedir}/freeipmi/locate/*.h %{_includedir}/freeipmi/payload/*.h %{_includedir}/freeipmi/record-format/*.h %{_includedir}/freeipmi/record-format/oem/*.h %{_includedir}/freeipmi/sdr/*.h %{_includedir}/freeipmi/sdr/oem/*.h %{_includedir}/freeipmi/sel/*.h %{_includedir}/freeipmi/sensor-read/*.h %{_includedir}/freeipmi/spec/*.h %{_includedir}/freeipmi/spec/oem/*.h %{_includedir}/freeipmi/templates/*.h %{_includedir}/freeipmi/templates/oem/*.h %{_includedir}/freeipmi/util/*.h %{_mandir}/man3/* %files bmc-watchdog %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/COPYING.bmc-watchdog %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog.UC %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/bmc-watchdog.service %else %config(noreplace) %{_initrddir}/bmc-watchdog %endif %config(noreplace) %{_sysconfdir}/sysconfig/bmc-watchdog %{_sbindir}/bmc-watchdog %{_mandir}/man8/bmc-watchdog.8* %files ipmidetectd %defattr(-,root,root) %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/ipmidetectd.service %else %config(noreplace) %{_initrddir}/ipmidetectd %endif %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetectd.conf %{_sbindir}/ipmidetectd %{_mandir}/man5/ipmidetectd.conf.5* %{_mandir}/man8/ipmidetectd.8* %files ipmiseld %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/COPYING.ipmiseld %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/ipmiseld.service %else %config(noreplace) %{_initrddir}/ipmiseld %endif %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmiseld.conf %{_sbindir}/ipmiseld %{_mandir}/man5/ipmiseld.conf.5* %{_mandir}/man8/ipmiseld.8* %dir %{_localstatedir}/cache/ipmiseld %changelog * Wed Nov 4 2015 Albert Chu 1.5.0 - Add systemd support. * Tue Oct 27 2015 Albert Chu 1.5.0 - Add new oem headers. * Mon Aug 26 2013 Albert Chu 1.4.1 - Add ipmi-config tool and manpage * Tue Jul 10 2012 Albert Chu 1.2.1 - Add ipmiseld daemon and subpackage. - Update paths for libfreeipmi changes. * Mon May 3 2012 Albert Chu 1.2.1 - Remove bmc-watchdog logrotate file. * Mon Dec 12 2011 Albert Chu 1.1.1 - Add contrib and ipmi-pet files. - Make main package own logdir. * Wed Jun 29 2011 Albert Chu 1.0.4 - Add pkgconfig files. * Fri Nov 5 2010 Albert Chu 0.9.0 - Add interpret sub-library. - Support new config files. - Support /etc/freeipmi/ config dir. - Support new ipmi_monitoring*.h files. - Support new manpages. - Support new compatability symlinks/manpages. * Wed Sep 30 2009 Albert Chu 0.8.0 - Update for dcmi. - Update for renaming of pef-config. - Update for new .h files. - Add new ipmimonitoring config manpages. - Add ipmidetectd.conf * Tue Sep 29 2008 Albert Chu 0.7.0 - Add README.build * Tue Aug 12 2008 Albert Chu 0.7.0 - Add README.sunbmc * Mon Aug 04 2008 Albert Chu 0.7.0 - Add ipmi-chassis-config. * Thu Jul 10 2008 Albert Chu 0.7.0 - Add freeipmi.conf default file. - Make 0644 perms default for config files. * Sat May 21 2008 Albert Chu 0.7.0 - Add freeipmi.conf.5. * Sat May 3 2008 Albert Chu 0.7.0 - Add bmc-device. * Mon Apr 7 2008 Albert Chu 0.6.0 - Add freeipmi.7 and libfreeipmi.3 manpage. * Wed Apr 2 2008 Albert Chu 0.6.0 - Add freeipmi-bugs-and-workarounds.txt. * Tue Mar 27 2008 Albert Chu 0.6.0 - Add ipmi-oem tool and manpage. * Mon Feb 18 2008 Albert Chu 0.6.0 - Add ipmi-sensors-config tool and manpage. * Wed Jan 9 2008 Albert Chu 0.6.0 - Obsolete old subpackage freeipmi-ipmimonitoring. * Tue Dec 18 2007 Albert Chu 0.6.0 - Use %{version} instead of @VERSION@ for substitution in paths. * Fri Dec 14 2007 Albert Chu 0.6.0 - Update packaging for libfreeipmi reorganization * Wed Nov 19 2007 Albert Chu 0.5.0 - Remove ipmimonitoring subpackage. Merge into head package. * Wed Nov 19 2007 Phil Knirsch 0.5.0 - More fixes for Fedora Review: o Added ExclusiveArch due to missing lopl (#368541) - Several fixes due to Fedora package review: o Fixed Group for all subpackages o Added missng Requires(Post|Preun) for several packages o Removed static libraries and .la files o Fixed open bug (missing mode for O_CREATE) o Fixed incorrect options for bmc-watchdog daemon - Specfile cleanup for Fedora inclusion - Fixed several rpmlint warnings and errors: o Moved all devel libs to proper package * Wed Aug 01 2007 Troy Telford 0.4.0 - Some package cleanup so it builds on SLES * Wed Jun 13 2007 Phil Knirsch 0.4.beta0-1 - Some package cleanup and split of configuration and initscript * Fri Feb 28 2007 Albert Chu 0.4.beta0-1 - Add ipmidetectd subpackage. * Fri Feb 16 2007 Albert Chu 0.4.beta0-1 - Add ipmimonitoring subpackage. * Sun Jul 30 2006 Albert Chu 0.3.beta0-1 - Re-architect for 0.3.X * Mon May 15 2006 Albert Chu 0.3.beta0-1 - Fixed up spec file to pass rpmlint freeipmi-1.6.4/COPYING0000644002055400205540000010451313527331634014320 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/TODO0000644002055400205540000003466513527331634013767 0ustar00achuachu00000000000000*** - priority for future major release XXX - priority for future minor release ooo - priority code cleanup that should be done branches to merge ----------------- to test ------- ipmi-oem get/set bmc services for intels2600jf FreeIPMI FAQ/documentation -------------------------- FreeIPMI general ---------------- - oem extensions - test/check handle firmware versions - document firmware versions in docs/ or mans/? - configuration option (e.g. via config file) to point manufacturer ids/product ids to "motherboard" - so no need to recompile when getting new product ids from people - build system - single Makefile, so parallel build faster? - consider moving #defines to #enums globally for easier debugging w/ gdb - event handling api/mechanism - loop/try again on NODE_BUSY errors (***) - treat more like network busy than error? - option for alternate behavior? - update text documents to texinfo (ooo) - OEM extensions generalized - generalize "+" syntax in ipmipower to all FreeIPMI tools? - or use extra option? - audit/cleanup memsets, use sizeof() when appropriate - audit, loop on select/poll if EINTR everywhere - dynamically loadable modules for SEL OEM extensions? - sensor & FRU & etc. too? - NLS/gettext support FreeIPMI new stuff ------------------ - ASF - maybe support base protocol stuff like rmcp? - picmg hpm/hpmi.1 standard - defines ipmi firmware update stuff - http://www.picmg.org/v2internal/specifications.htm - pmbus.org - doable via FreeIPMI? Can pass through Smbus to PmBus to do power control monitoring? - server simulator - support testing at scale - test larger set of corner cases, possibilities, workarounds, etc. - different SDR combos - different SEL entries - all permutations of sensors, etc. - config tools for (***) - intel node manager (***) - maybe not? Intel NM does not configure via a standard checkout/commit fashion. Policies are created, then removed. In addition, policies must be disabled before they can be reconfigured. some of these mechanisms could be hidden (i.e. if user changed any configuration, disable policy, then re-configure it, then re-enable it), but some would require blatant assumptions, such as number of policies to output into the --checkout .conf file. - firmware firewall - other config options in ipmi-oem - inventec mac/shared nic stuff - will reboot BMC, is big problem - fru library like libipmimonitoring - ipmi proxy - capture lan and do inband, maybe useful if you have dedicated port that can't be seen by the network, and you don't have enough switch ports to have both plugged up to the network. - OCP IPMI extensions - FRU record - command extensions FreeIPMI maybe stuff -------------------- redo ipmipower/ipmiconole using phi accrual failure detector algorithm? library general --------------- - merge all libs into one? would aid debian packaging. - make package layout simpler? - make .so-naming consistent? - merge all except libipmidetect? libfreeipmi ----------- - forwarded command support (errata 35b) - support serial interface? - have funcs that return buflen return ssize_t?, input should be size_t and void *? like read(), write()? - xRC4 - on Quanta S99Q/Dell FS12-TY - Began on branches/xrc, from the branch ChangeLog - xRC has been dropped for the time being. After researching xRC, ultimately the current architecture of all of FreeIPMI is ill-suited for it. As a stream based encryption, too much architecture of FreeIPMI has been based on individual packets being sent/recved/encrypted/decrypted independently of each other. Most of xRC implementation is doable with some hacks. For example, the initialization vector and data offsets could be passed as in/out parameters to the assemble/disassemble packet functions. The Krc could be re-generated as needed if the initialization vector had been noticed to change (or data offset == 0). However, the deal break was an "out-of-band" requirement for implementation of the suspend/resume payload encryption. In particular, if a packet from the BMC that had a new initialization vector was dropped on the network, the client would need to send a "suspend/resume payload encryption" packet to tell the BMC to start over again before doing a resend. Architecturally, this was the part that would have been VERY difficult to implement across FreeIPMI as the client would suddenly be required to understand the assemble/disassemble subtleties underneath and send the packet on its own. libfreeipmi-fiid ---------------- - rearch for speed to not use strings, use macros + strings in internal. So something like: {1, FOO_MACRO, "FIELD_NAME", FLAGS} so avoid string compares for get/set/compare/etc., but have available for debug output. libfreeipmi-driver ------------------ - kcs/ssif/etc - how to deal with servers w/ multiple BMCs (***) - need knew inband option on tools? - ssif userspace implementation - see ipmiutil for example libfreeipmi-api --------------- --fail-if-ipmi-not-detected - would need inband flag - discover vs. not-discover on locate - Ultimately impossible to do correctly, vendor need not store anything in acpi/smbios/etc. - User can use ipmi-locate if they really want to probe? libfreeipmi-interpret --------------------- - handle sensor/sel events outside of spec - configurable in some way? - some vendors have extra bits not in spec - handle sensor/sel events differently for different sensors on same motherboard - e.g. SENSORFAULT | State Deasserted SENSOROK | State Asserted - need mechanism to specify record ids/sensor number/entity/generator? - some sensor interpretations dependent on sensor number, way to add? - QSSCS4R SMI Timeout & Power Throttled sensors - same event-type/sensor-type/etc., but different interpretation?? libfreeipmi-sdr --------------- libfreeipmi-fru --------------- libfreeipmi-sel --------------- - cleanup parsing functions libipmiconsole -------------- - "learn" workarounds function - to figure out workaround flags for user support simultaneous SOL sessions - very hard, almost impossible to do?? - "check" function, to see if session currently running - engine_submit() - try and move initialization/setup code into engine to reduce time spent in engine_submit(), this is the core loop used by conman and other console software. (***) - use conditional signals w/ garbage collector - should work, it's not like the poll loop from before - buffer character input chars and send in chunks as necessary (nagle like) - perhaps ~100ms of character data to reduce packets send? - as far as I can tell, most ssh implementations send 1 char at a time, to most users that libipmiconsole will get similar interaction. libipmimonitoring ----------------- - select sensors via sensor name? - deal w/ motherboards with slightly different SDRs - but some mobos have sensor name == each other, so what is the purpose? - would need to also add sensor number with it?? - also to deal w/ probability SDR's change on some mobos - how specify record ids w/ sharing - entity sensor names tools common ------------ - entity ids 0x41, 0x42, are "identical" to other entries - should map them together for --entity-id-names output in ipmi-sensors and ipmi-sel? - hostrange exclude hosts option - not really necessary in FreeIPMI? in pdsh, the reason you really need this is because you can do -a (all) or -g (genders attribute/netgroups attribute). - if user inputs hostname of localhost, do inband not outofband? - config via environment variables too - like config file? - config file - support workarounds/etc. for heterogenous clusters - maybe? - workaround-flags BLAH hosts[1-3] - workaround-flags FOO hosts[5-9] - read/store username/password/k_g out of file encrypted so it's not sitting there in the clear - convenience function to loop infinite times necessary to expand (***) hostrange until done. - i.e. node[0-4]-[3-10] - hack is in ipmipower right now for 2s, no where else supported ipmi-sensors ------------ - split vendor files into motherboard files? Is getting big. - option to check sensor thresholds manually instead of event bitmask - some mobos seem to set flags incorrectly - column for sensor number? - useful for shared sensor output? - how to select specific shared sensor on commad line, can't do normally (***) - i.e. perhaps need to do record-id and something else, like -r 5.2 to indicate record id 5 and offset 2. - issue for libipmimonitoring too? - remove shared sensor option - make default like it should be - this really ties to many other shared sensor issues - do not error out on unexpected sensor_read errors, move on? (***) - i.e. unexpected completion code error? - require rework of sensor-read lib? How detect session timeout, etc. - make 'discretereading' on by default? - it does not appear that to be illegal by IPMI spec. ipmi-sel -------- - binary search like mechanism to make --display faster - support kernel panic OEM event 0xF0 - can't make work, is just my motherboard? Or perhaps specific panics, not test panics? - redhat doesn't enable by default, probably don't need to worry about this much - see http://cateee.net/lkddb/web-lkddb/IPMI_PANIC_STRING.html - see http://www.cyberciti.biz/tips/compiling-linux-kernel-module.html - non-uncommon for motherboards to output events both directions of crossing threshold. Can be confusing b/c assert/deassert not output by default. Should alter output in these cases? - --delete-date-range (***) - ganglia plugin? - nagios plugin? ipmipower -------- - mechanism to parallelize oem extension options ranges. (***) - i.e. on myhost+[0-3]. Simultaneous power off slots 0-3. - perhaps --serialize-same-host option - Will require larger re-architecture, create additional sockets per power control attempt. The constant sockets created in the ipmipower_connection structs limit this for the time being. ipmi-fru -------- - write FRU data option - for OEM integrators - or should be in bmc-device? bmc-device -------- - set bmc global enables - really should be done by firmware or distro - or only as needed in ipmi-oem per vendor need? - (NOT CONFIRMED) get auxiliary log status - set sensor reading (***) bmc-watchdog ------------ Log to normal syslog, not to bmc log - legacy from when bmc-wachdog in cron, not daemon, and would log every bmc reset cleanup to finally use libfreeipmi or common tool functions ipmiconsole ----------- - support other escape codes like w/ &D - support F1-F12 suggested by user ipmi-config ------------ - make tools prefix sections w/ appropriate prefixes to allow for checking of what sections should be used?? - i.e. BMC, CHASSIS, PEF, etc. - probably not, too much backwords compatability crap to handle. Also would make code ugly as hell to make all duplicate sections. should do database of what sections go to what categories - core: support ipv4 mapped ipv6 addresses? - until in spec, no point, maybe deal in ipmi-oem? - chassis, pef & sensors: conf.5 manpage - chassis: (NEVER TESTED) panel button config - need hardware w/ this - chassis: (NEVER TESTED) device instance selector - sensors: instructions for each section?? - sensors: when value cannot be encodd accurately, report numbers that can work ipmi-oem -------- dell poweredge lcd support? ipmiseld -------- send e-mail on alert noticed/received? contributions ------------- - perl extensions - api support? - raw support? - python extensions - api support? - raw support? - zenoss plugin - powerman - let ipmipower return error messages to user in some way - intead of "command completed successfully" all the time RELEASE TODOS - Do on every release ----------------------------------- Email freeipmi-users && freeipmi-devel Email info-gnu@gnu.org Update savannah announcements Update freshmeat.net Update freeipmi webpage Update opendesktop.org page Update ohloh page Update to softpedia?? Update fsf directory info. Upload to ftp.gluster.com Upload to ftp.gnu.org Workaround for CVE perl -pe 's/perm -777 -exec chmod a\+rwx/perm -755 -exec chmod 755 /' Makefile.in > Makefile.in.new Workaround for CVE 2012-3386 perl -pe 's/chmod a\+w \$\(distdir\)/chmod u\+w \$\(distdir\)/' Makefile.in > Makefile.in.new info-gnu@gnu.org template e-mail FreeIPMI X.X.X has been released. It can be downloaded at: http://www.gnu.org/software/freeipmi/download.html What is IPMI? The Intelligent Platform Management Interface (IPMI) specification defines a set of interfaces for platform management. It is implemented by a large number of hardware manufacturers to support system management on motherboards. The features of IPMI that most users will be interested in are sensor monitoring (e.g. CPU temperatures, fan speeds), remote power control, and serial-over-LAN (SOL). What is FreeIPMI? FreeIPMI provides in-band and out-of-band IPMI software based on the IPMI v1.5/2.0 specification. FreeIPMI provides tools and libraries for users to access and read IPMI sensor readings, system event log (SEL) entries, serial-over-LAN (SOL), remote power control functions, field replaceable unit (FRU) device information, and more. More information about FreeIPMI can be found at the FreeIPMI webpage at: http://www.gnu.org/software/freeipmi/index.html Release X.X.X Changes --------------------- To do this: 1. The file to be distributed (for example, foo.tar.gz). 2. Detached GPG binary signature for (1), (for example, foo.tar.gz.sig). gpg -b foo.tar.gz 3. A clearsigned directive file, (for example, foo.tar.gz.directive.asc). Format is: version: 1.1 directory: freeipmi filename: freeipmi-0.X.X.tar.gz comment: FreeIPMI 0.X.X gpg --clearsign foo.tar.gz.directive 4. Upload the file(s) via anonymous ftp to ftp-upload.gnu.org. If the upload is destined for ftp.gnu.org, place the file(s) in the /incoming/ftp directory. If the upload is destined for alpha.gnu.org, place the file(s) in the /incoming/alpha directory. Uploads are processed every five minutes. Uploads that are in progress while the upload processing script is running are handled properly, so do not worry about the timing of your upload. Uploaded files that belong to an incomplete triplet are deleted automatically after 24 hours. Your designated upload email addresses (see Automated Upload Registration) are sent a message if there are any problems processing an upload for your package. You also receive a message when your upload has been successfully processed. freeipmi-1.6.4/ChangeLog.00000644002055400205540000013114313527331634015174 0ustar00achuachu000000000000002004-05-04 Albert Chu * src/ipmi-kcs-interface.c (ipmi_kcs_write_interruptible, ipmi_kcs_cmd_interruptible): Fixed error output corner case. * src/ipmi-kcs-interfa.ce (ipmi_kcs_write, ipmi_kcs_write_interruptible): Fixed return value bug. Unlock semaphore if a EBUSY failure occurs. 2004-04-30 A Balamurugan * src/ipmi-lan-param-spec.h: new file. * src/ipmi-serial-modem-param-spec.h: new file. * src/Makefile.am: updated. * src/freeipmi.h: updated. * src/ipmi-cmd-spec.h: code cleanup. * src/ipmi-lan-cmds.[ch]: like wise. * src/ipmi-serial-cmds.[ch]: like wise. 2004-04-27 Anand Babu CVS tagged as release-0_1_0_alpha5-tag 2004-04-27 Albert Chu * libfreeipmi.spec.in: Fixed packaging issues. 2004-04-22 Anand Babu CVS tagged as release-0_1_0_alpha5_qa3-tag 2004-04-19 Albert Chu * src/ipmi-msg-support-cmds.c (fill_cmd_activate_session): Fixed endian bug. 2004-04-15 Anand Babu CVS tagged as release-0_1_0_alpha5_qa2-tag 2004-04-10 Anand Babu * configure.ac: Mysteriously --enable-trace code dissappeared. Added again. * src/ipmi-error.h: ERR macros - check for IPMI_TRACE definition. 2004-04-06 Albert Chu * src/ipmi-error.h (ERR_EXIT), src/ipmi-utils.c (ipmi_comp_test): Use LOG_FAC & LOG_MAKEPRI with syslog. * src/ipmi-chassis-cmds.h (fill_cmd_set_power_restore_policy): Added prototype. * src/ipmi-chassis-cmds.c (fill_cmd_set_power_restore_policy, fill_cmd_get_chassis_status, fill_cmd_chassis_ctrl): Fixed function names. Were previously incorrect or non-consistent with other parts of the library. * src/ipmi-chassis-cmds.c (ipmi_set_power_restore_policy, ipmi_get_chassis_status): Updated with function name changes. 2004-04-05 Anand Babu * src/ipmi-error.h: Pass facility argument via LOG_FAC macro to LOG_MAKEPRI. * src/xmalloc.c: Like wise. 2004-04-05 Albert Chu * src/ipmi-error.h (ERR, ERR_EXIT): Fixed errno output bug and syslog parameter bug. * src/ipmi-utils.c (ipmi_comp_test): Fixed syslog parameter bug. 2004-04-05 Anand Babu * configure.ac: added --enable-trace option. * src/ipmi-error.h (ERR): display error info only when IPMI_TRACE is on. 2004-04-05 Anand Babu * src/ipmi-semaphores.h: cleaned up few MACROs. * TODO: garbaged done tasks. * THANKS: updated. 2004-04-01 Albert Chu * src/xmalloc.c: Fixed one additional xmalloc to ipmi_xmalloc bug. 2004-04-01 A Balamurugan * src/ipmi-sensor-types.c: added event-reading-code-desc for 4,5,7,9,10 and 12. Bug #8406 fixed by passing double variables to ipmi_sensor_threshold_health_check() * src/ipmi-utils.c: added new function ipmi_is_root(). 2004-04-01 Albert Chu * Globally renamed xmalloc to ipmi_xmalloc, xcalloc to ipmi_xcalloc, xrealloc to ipmi_xrealloc, xstrdup to ipmi_xstrdup, and xfree to ipmi_xfree. * libfreeipmi.spec.in: Updated for release changes. 2004-04-01 Albert Chu * src/ipmi-sdr-repo-cache.h: Gave IPMI_DEFAULT_SDR_REPO_CACHE_FILENAME different filename value. * src/ipmi-semaphore.h: Gave IPMI_IPCKEY different filename value. * libfreeipmi.spec.in: Updated for release changes. 2004-03-31 Albert Chu * libfreeipmi.spec.in: Updated for new release. 2004-03-31 Anand Babu * ipckey: new dummy file to install as ftok lock. * src/ipmi-semaphores.[c,h]: locking and synchrinization core. * src/ipmi-kcs-interface.c: Now supports locking and synchronization transparently. CVS tagged as release-0_1_0_alpha5_qa1-tag 2004-03-31 A Balamurugan * src/fiid.c: new function fiid_obj_set_data(). * src/ipmi-msg-support-cmds.c: updated fill_kcs_set_user_name() and fill_kcs_set_user_password(). 2004-03-31 A Balamurugan * src/fiid.c: fixed a bug in fiid_obj_get_data(). 2004-03-30 A Balamurugan * src/fiid.c: added new function fiid_obj_get_data(). * src/ipmi-kcs-interface.c: fixed a bug in ipmi_kcs_cmd(). * src/ipmi-sdr-repo-cache.c: updated ipmi_sdr_repo_info_write() and ipmi_sdr_records_write(). * src/ipmi-sel-record-types.c: updated ipmi_sel_get_first_entry() and ipmi_sel_get_next_entry(). * src/ipmi-chassis-cmds.[ch]: complete rewritten with ipmi_kcs_cmd(). * src/ipmi-lan-cmds.[ch]: like wise * src/ipmi-msg-support-cmds.[ch]: like wise * src/ipmi-sdr-repo-cmds.[ch]: like wise * src/ipmi-sel-cmds.[ch]: like wise * src/ipmi-sensor-cmds.[ch]: like wise * src/ipmi-serial-cmds.[ch]: like wise * src/ipmi-sol-cmds.[ch]: like wise 2004-03-30 Albert Chu * src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_cache_get_sensor_name): New function. 2004-03-30 A Balamurugan * src/ipmi-sensor-types.c: added new functions ipmi_sensor_threshold_health_check() and ipmi_sensor_discrete_health_check(). 2004-03-30 Anand Babu * src/ipmi-kcs-interface.c (ipmi_kcs_cmd): new procedure. * src/ipmi-dev-global-cmds.c (ipmi_kcs_get_dev_id): rewritten to use ipmi_kcs_cmd. 2004-03-29 A Balamurugan * src/ipmi-sensor-types.c: renamed IPMI_SENSOR_CLASS_DIGITAL_DISCRETE to IPMI_SENSOR_CLASS_GENERIC_DISCRETE and IPMI_SENSOR_CLASS_DISCRETE to IPMI_SENSOR_CLASS_SENSOR_SPECIFIC_DISCRETE. 2004-03-29 Albert Chu * src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_cache_seek): Modified seek algorithm to not re-start at the beginning of the cache if it can be avoided. * src/ipmi-sensor-types.c (ipmi_sensor_classify): Remove changes from 2004-03-26 and go back to original code. Code was used differently than macro names indicated. 2004-03-29 A Balamurugan * src/ipmi-sensor-types.c: updated struct ipmi_sensor_type_slot_connector. 2004-03-29 Anand Babu * src/fiid.h (FIID_OBJ_GET): fixed a critical type casting bug. * src/ipmi-dev-global-cmds.c: new definitions for product IDs and manifacturer IDs. New device info response template for Intel products. 2004-03-29 A Balamurugan * src/ipmi-sel-cmds.c: added new functions ipmi_kcs_delete_sel_entry() and ipmi_kcs_clear_sel(). 2004-03-28 A Balamurugan * src/ipmi-msg-interface-desc.c: new file. * src/Makefile.am: updated * src/freeipmi.h: updated * src/ipmi-msg-interface-desc.h: added enum system_software_type. * src/ipmi-sdr-repo-cache.c: now ipmi_is_sensor_reading_available() returns false if system_software_id > 0x47. * src/ipmi-sensor-types.c: added ipmi_sensor_type_threshold_desc 2004-03-26 Albert Chu * src/ipmi-kcs-interface.c (unassemble_ipmi_kcs_pkt): Fix bug in function. Function now handles packets that may be smaller than the user expected. * src/ipmi-sensor-cmds.c: Removed reserved3 field from tmpl_get_sensor_threshold_reading_rs. This field is optionally returned, not required to be returned. * src/ipmi-sensor-types.c (ipmi_sensor_classify): Fix bug in class calculation. * src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_cache_sensor_classify): Use correct template based on type. 2004-03-26 Anand Babu * src/fiid.h (FIID_OBJ_GET): fixed ptr argument bug. * src/ipmi-dev-global-cmds.c (ipmi_kcs_get_dev_id): fixed ERR checks. * src/ipmi-dev-global-cmds.c: prototype updated. * Makefile.am: rewrote support for doc/examples. 2004-03-25 A Balamurugan * src/ipmi-sel-cmds.c: modified function ipmi_kcs_get_sel_entry(). * src/ipmi-sel-record-types.c: added new function ipmi_sel_get_first_entry() and ipmi_sel_get_next_entry(). 2004-03-25 Albert Chu * src/ipmi-sdr-repo-cache.h: Removed filename from sdr_repo_cache_t structure. Added IPMI_DEFAULT_SDR_REPO_CACHE_FILENAME. * src/ipmi-sdr-repo-cache.h, src/ipmi-sdr-repo-cache.c (ipmi_sdr_repo_cache_load): Added filename parameter to function. * src/ipmi-sdr-repo-cache.h, src/ipmi-sdr-repo-cache.c: Added corner case checks to all functions. Modified return to int from u_int8_t in many situations, because return type may be negative. 2004-03-24 A Balamurugan * src/ipmi-sel-record-types.c: added new function ipmi_get_sel_record_type(), template tmpl_sel_record_header and enum ipmi_sel_record_type. 2004-03-23 Albert Chu * doc/examples/hello-sensors.c (display_verbose_current_digital_discrete_sensor_compact_record, display_verbose_current_discrete_sensor_compact_record): Fixed minor bug in which string name was printed from the wrong address. 2004-03-23 Anand Babu * doc/examples/hello-sensors.c: Added Bala's Sensors subsystem example code. * doc/examples/Makefile: Added a generic make file. * doc/Makefile.am: recognize examples folder. Changed $(prefix)/doc to $(datadir)/doc now. 2004-03-23 A Balamurugan * src/ipmi-msg-support-cmds.h: added new macro IPMI_PASSWORD_OPERATION_TEST_FAILED. 2004-03-22 Albert Chu * libfreeipmi.spec.in: Updated release. 2004-03-21 A Balamurugan * src/ipmi-chassis-cmds.c: added new function ipmi_get_chassis_status(). * src/ipmi-msg-support-cmds.c: modified function ipmi_kcs_set_channel_access(). 2004-03-20 Albert Chu * src/rmcp.c (unassemble_rmcp_pkt): Remove packet size too big check. * src/ipmi-sessions.c (check_hdr_session_authcode): Fixed numerous bugs. * src/ipmi-debuc.c (fiid_obj_dump_lan, fiid_obj_dump_rmcp), src/ipmi-lan-interface.c (unassemble_ipmi_lan_pkt), src/rmcp.c (unassemble_rmcp_pkt): Fix unsigned integer arithmetic bug. 2004-03-19 Albert Chu * src/fiid.h, src/fiid.c (fiid_obj_memset): New function. * src/ipmi-msg-support-cmds.h: Added IPMI_AUTH_STATUS_ANONYMOUS_LOGIN_DISABLED, IPMI_AUTH_STATUS_NULL_USERNAMES_DISABLED, and IPMI_AUTH_STATUS_NON_NULL_USERNAMES_DISABLED macros. IPMI_AUTH_STATUS_ANONYMOUS_LOGIN_ENABLED, IPMI_AUTH_STATUS_NULL_USERNAMES_ENABLED, and IPMI_AUTH_STATUS_NON_NULL_USERNAMES_ENABLED macros are now bit values rather than masks. * src/ipmi-sessions.c (check_hdr_session_authcode): Rewritten. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (fill_cmd_get_session_challenge): Added username_len parameter. 2004-03-17 Albert Chu * src/ipmi-watchdog.c: Re-order template fields and function parameter order to be consistent with other parts of libfreeipmi. * src/rmcp.c (unassemble_rmcp_pkt): Fixed several corner cases. * src/ipmi-debug.h, src/ipmi-debug.c (fiid_obj_dump_rmcp): New function. * src/fiid.c (fiid_obj_free): Fixed bug in which memory was not being freed correctly. * src/ipmi-msg-support-cmds.c (ipmi_lan_open_session): Fix bug in which u_int32_t * unsafely cast to u_int64_t * with fiid_obj_get. 2004-03-16 Albert Chu * src/ipmi-kcs-interface.c (ipmi_kcs_read): Modified to return number of bytes read. * src/ipmi-kcs-interface.c (ipmi_kcs_write): Modified to return number of bytes written. Added corner case checks. 2004-03-15 Albert Chu * src/ipmi-watchdog.h: Changed "ENABLED" and "DISABLED" into "ENABLE" and "DISABLE" to be consistent with other .h files. 2004-03-15 Albert Chu * src/ipmi-kcs-interface.c (assemble_ipmi_kcs_pkt): Return length of packet assembled rather than 0 on success. * src/rmcp.c (assemble_rmcp_pkt): Return length of package assembled rather than 0 on success. * src/rmcp.c (ipmi_rmcp_ping): Modify error checks when calling assemble_rmcp_pkt. * src/ipmi-dev-glovbal-cmds.c (ipmi_kcs_get_dev_id): Modify error checks when calling assemble_ipmi_kcs_pkt. 2004-03-11 Albert Chu * src/ipmi-watchdog.h, src/ipmi-watchdog.c: New files. * src/ipmi-debug.h: Removed hex_dump prototype. * src/freeipmi.h: Added ipmi-watchdog.h. * src/Makefile.am: Added ipmi-watchdog.h and ipmi-watchdog.c. 2004-03-10 Albert Chu * src/ipmi-error.h, src/ipmi-error.c (ipmi_strerror_cmd_r): New function. * src/ipmi-error.h, src/ipmi-error.c (ipmi_strerror_r): Modifed function parameters to be more consistent with the libc strerror_r. The new ipmi_strerror_cmd_r function takes the place of the old ipmi_strerror_r. * src/ipmi-utils.c (ipmi_comp_test): Modified to use new ipmi_strerror_cmd_r. 2004-03-10 A Balamurugan * src/ipmi-sensor-utils.c: now ipmi_sensor_decode_value() decodes -ve values. 2004-03-09 Albert Chu * src/ipmi-msg-support-cmds.h: Flipped value of IPMI_USER_LEVEL_AUTHENTICATION_ENABLE, IPMI_USER_LEVEL_AUTHENTICATION_DISABLE, IPMI_PER_MESSAGE_AUTHENTICATION_ENABLE, IPMI_PER_MESSAGE_AUTHENTICATION_DISABLE, IPMI_PEF_ALERTING_ENABLE, and IPMI_PEF_ALERTING_DISABLE. The values were backwards from the IPMI 1.5 specification. * src/ipmi-debug.c (fiid_obj_dump_lan): Fixed bug in which dumps were not output based on authcode. * src/ipmi-lan-interface.c (unassemble_ipmi_lan_pkt): Fixed bug in which incorrectly sized messages were never unassembled. * src/ipmi-utils.h (FREEIPMI_MIN): New macro. 2004-03-09 Anand Babu * src/ipmi-smic-interface.[ch]: new SMIC driver. * src/ipmi-debug.c (ipmi_smic_print_flags): new function. * src/ipmi-kcs-interface.c: renamed get_kcs_poll_count () to ipmi_kcs_get_poll_count (). Fixed few naming conventions and variable types. 2004-03-06 Anand Babu CVS tagged as release-0_1_0_alpha4_qa0-tag 2004-03-06 A Balamurugan * src/ipmi-msg-support-cmds.c: new function ipmi_kcs_get_channel_info() for command Get-Channel-Info. 2004-03-04 A Balamurugan * src/ipmi-sdr-repo-cache.c: renamed ipmi_sdr_cache_init() to ipmi_sdr_cache_create(). added function ipmi_sdr_repo_cache_get_sensor_group(). * src/ipmi-sensor-types.c: added function ipmi_get_sensor_group(). * src/ipmi-sensor-utils.c: ipmi_sensor_decode_value() and ipmi_sensor_get_decode_params() now handles negative values. 2004-03-03 A Balamurugan * src/ipmi-sensor-types.c: added new element 'Unknown' in ipmi_sensor_types. 2004-03-02 Anand Babu * src/ipmi-utils.h: added bool type with safe macro checks. * src/ipmi-sensor-types.[ch]: fixed unresolved symbol problem and naming conventions for ipmi_sensor_types and ipmi_sensor_units* definitions. * src/ipmi-kcs-interface.c: removed init_kcs_poll_count function. kcs_poll_count is a readonly counter. * src/ipmi-sensor-types.[c,h]: whole bunch of new definitions and tables for discrete and digital-descrete sensors. 2004-03-02 A Balamurugan * src/ipmi-sdr-repo-cache.[ch]: new file for SDR Repository Cache supported functions. * src/ipmi-sensor-utils.[ch]: new file for sensor utility functions. * src/ipmi-error.h: in macros ERR(expr) and ERR_EXIT(expr) changed sprintf to snprintf * src/ipmi-sensor-types.c: added functions ipmi_sensor_classify() and ipmi_is_oem_reserved_sensor_type(). 2004-03-02 Albert Chu * src/ipmi-sessions.h (IPMI_SESSION_AUTH_TYPE_VALID): Fix corner case. * src/ipmi-msg-support-cmds.h (IPMI_PRIV_LEVEL_VALID): New macro. * src/ipmi-msg-support-cmds.c (fill_cmd_get_channel_auth_caps): Added max_priv_level parameter. * src/ipmi-msg-support-cmds.c (ipmi_lan_get_channel_auth_caps): Modify for change to fill_cmd_get_channel_auth_caps. * src/ipmi-msg-support-cmds.c (fill_cmd_get_session_challenge): Fix several corner cases. * src/ipmi-msg-support-cmds.c (fill_cmd_activate_session): Use new IPMI_PRIV_LEVEL_VALID macro. Fix several corner cases. * src/ipmi-msg-support-cmds.c (fill_cmd_set_session_priv_level): Use new IPMI_PRIV_LEVEL_VALID macro. 2004-03-01 Albert Chu * src/ipmi-debug.c (_set_prefix_str, _output_str, _output_byte_array): New functions. * src/ipmi-debug (fiid_obj_dump_perror, fiid_obj_dump_lan): Use new functions _set_prefix_str, _output_str, and _output_byte_array. Fix several output bugs. * src/ipmi-lan-interface.c (ipmi_lan_check_net_fn, ipmi_lan_check_rq_seq): Fix input corner case. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_check_cmd, ipmi_check_comp_code): New functions. 2004-02-29 Albert Chu * src/ipmi-debug.h, src/ipmi-debug.c (fiid_obj_dump_perror, fiid_obj_dump_lan): New functions. * src/ipmi-debug.c (fiid_obj_dump): Output to appropriate file descriptor. Use fiid_obj_dump_perror. * src/ipmi-lan-interface.c (assemble_ipmi_lan_pkt): Fixed a few corner case bugs. * src/ipmi-error.h (ERR_OUT): New macro. 2004-02-28 Albert Chu * src/ipmi-lan-interface.c (assemble_ipmi_lan_pkt): Use memcpy instead of strcpy b/c passwords need not be one word. * src/ipmi-lan-interface.h, src/ipmi-lan-interface.c (ipmi_lan_check_rq_seq, ipmi_lan_check_net_fn, ipmi_lan_check_chksum): New functions. * src/ipmi-lan-interface.h, src/ipmi-lan-interface.c (ipmi_lan_cmd): Changed auth_code parameter type from char to u_int8_t. Renamed auth_code parameter to auth_code_data. Added auth_code_data_len parameter. Modified to support more authentication types. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_lan_get_hannel_auth_caps, ipmi_lan_get_session_challenge, ipmi_lan_activate_session, ipmi_lan_set_session_priv_level, ipmi_lan_open_session, ipmi_lan_close_session): Changed auth_code parameter type from char to u_int8_t. Renamed auth_code parameter to auth_code_data. Added auth_code_data_len parameter. * src/ipmi-msg-support-cmds.c (ipmi_lan_get_channel_auth_caps, ipmi_lan_get_session_challenge, ipmi_lan_activate_session, ipmi_lan_set_session_priv_level, ipmi_lan_open_session, ipmi_lan_close_session): Modified to support change to ipmi_lan_cmd(). * src/ipmi-utils.h, src/ipmi-utils.c (ipmi_lan_chksum_test): Removed function. * src/ipmi-lan-interface.c (ipmi_lan_cmd): Use ipmi_lan_recvfrom properly. Use new ipmi_lan_check_chksum() function. 2004-02-27 Albert Chu * src/ipmi-debug.c: Removed various unused and now unnecessary functions and macros. * src/ipmi-sessions.h, src/ipmi-sessions.c (check_hdr_session_authcode, check_hdr_session_session_seq_num, check_hdr_session_session_id): New functions. * src/ipmi-lan-interface.c (unassemble_ipmi_lan_pkt): Fix md2/md5 checksum calculations bug. Add support for tmpl_hdr_session_auth_calc template. 2004-02-24 Anand Babu * src/ipmi-sensor-types.c: sensor_unit_type_code_short_str new short type codes. 2004-02-21 Albert Chu * src/ipmi-sessions.h: Added IPMI_SESSION_AUTH_TYPE_VALID macro. * src/ipmi-sessions.h, src/ipmi-sessions.c: Added tmpl_hdr_session_auth_calc template. * src/ipmi-sessions.h, src/ipmi-sessions.c (fill_hdr_session): Changed auth_code parameter type from char to u_int8_t. Renamed auth_code parameter to auth_code_data. Added auth_code_data_len parameter. Use new IPMI_SESSION_AUTH_TYPE_VALID macro. Added support for new tmpl_hdr_session_auth_calc template. * src/ipmi-lan-interface.h: Removed IPMI_LAN_PKT_SIZE, IPMI_LAN_PKT_RQ_SIZE, and IPMI_LAN_PKT_RS_SIZE macros. Modified IPMI_LAN_PKT_RQ_CHKSUM2_BLOCK_INDX and IPMI_LAN_PKT_RS_CHKSUM2_BLOCK_INDX to calculate block indexes dependent on the authentication type. * src/ipmi-lan-interface.h, src/ipmi-lan-interface.c (assemble_ipmi_lan_pkt): Changed return type from int8_t to int32_t. * src/ipmi-lan-interface.c (_ipmi_lan_pkt_size, _ipmi_lan_pkt_rq_size, _ipmi_lan_pkt_rs_size): New functions. * src/ipmi-lan-interface.c (assemble_ipmi_lan_pkt, unassemble_ipmi_lan_pkt): Re-worked to support tmpl_hdr_session_auth_calc session header template and varying authentication types, including none, md2, and m5, instead of just straight passwd key. * src/ipmi-lan-interface.c (ipmi_lan_cmd): Re-worked to use new functions. Will now only work with authentication type none or straight passwd key. * src/ipmi-error.h (ERR): Add newlines to error outputs. * src/ipmi-error.c (ERR_EXIT): New macro. * src/ipmi-md5.c (_ipmi_md5_append_padding_and_length): Changed "else if" to "else" that caused compiler warning. * src/ipmi-utils.h, src/ipmi-utils.c (ipmi_lan_chksum_test): Added auth_type parameter. * src/ipmi-utils.c (ipmi_lan_chksum_test): Modified to support checksum checks of multiple authentication types. 2004-02-18 Anand Babu * QA-RELEASE: freeipmi-0.1.0-alpha3-qa0 release. Will TAG CVS after passing QA. Downloads will be available from ftp://ftp.californiadigital.com/pub/freeipmi/ 2004-02-17 Albert Chu * Tagged current repository state libfreeipmi-0-0-0-0-alpha2. * libfreeipmi.spec.in: Updated release and changed refresh to autogen. Added /usr/doc files. * BUGS: New file. 2004-02-16 A Balamurugan * src/bits-ops.c: bits_merge msb/lsb bug fixed. * src/ipmi-lan-cmds.c: modified fiid template for kcs_lan_set_auth_type_enables. * src/ipmi-msg-support-cmds.c: fixed wrong command macro to IPMI_CMD_GET_USER_ACCESS_CMD in ipmi_kcs_get_user_access(). * src/ipmi-msg-support-cmds.h: added macros IPMI_PRIV_LEVEL_NO_ACCESS, IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE and IPMI_CHANNEL_ACCESS_GET_VOLATILE. * src/ipmi-serial-cmds.h: added missing 'parameter_selector' in tmpl_set_serial_conf_param_connmode_rq, tmpl_set_serial_conf_param_pageblackout_rq, tmpl_set_serial_conf_param_retry_rq and tmpl_set_serial_conf_param_commbits_rq. * src/ipmi-serial-cmds.h: added macros IPMI_SERIAL_CONF_GET_PARAMETER and IPMI_SERIAL_CONF_GET_PARAMETER_REVISION. 2004-02-15 Anand Babu * src/ipmi-kcs-interface.c: changed return type to int from void for ipmi_kcs_io_init (). 2004-02-13 A Balamurugan * src/ipmi-kcs-interface.c: add new ipmi_kcs_sleep_usecs and kcs_poll_count control variables. Add new functions init_kcs_poll_count(), get_kcs_poll_count() and fill_hdr_ipmi_kcs(). 2004-02-13 Ian Zimmerman * src/Makefile.am: add new files ipmi-serial-cmds.[ch] * src/ipmi-serial-cmds.c: new file * src/ipmi-serial-cmds.h: new file * src/ipmi-msg-support.c, src/ipmi-msg-support.h: add new commands to be used in bmcconfig * src/ipmi-lan-cmds.c, src/ipmi-lan-cmds.h: add new commands to be used in bmcconfig 2004-02-13 Albert Chu * src/ipmi-md2.h, src/ipmi-md2.c, src/ipmi-md5.h, src/ipmi-md5.c: New files. * src/freeipmi.h, src/Makefile.am: Updated for new files. 2004-02-11 Anand Babu * ipmi-sensor-types.c: new file. Sensor type strings. 2004-02-10 Anand Babu * src/fiid.[c,h]: fiid_obj_alloc now uses xcalloc. new FIID_OBJ_SET/GET, FIID_OBJ_ALLOC, FIID_OBJ_ALLOCA macros. fiid_obj_t becomes fiid_template_t and fiid_obj_t redefined as u_int8_t *. new function fiid_obj_field_lookup. Patch from Bala - added functions/macros to create dynamic fiid templates fiid_template_make(), __fiid_template_make(), fiid_template_free(). * src/ipmi-lan-interface.c: rewritten from scratch - easier, cleaner and layered. Now supports new fiid model. * src/ipmi-dev-global-cmds.c: ported to fiid model. * src/rmcp.h: removed obsolete macros. New function ipmi_comp_test. * src/rmcp.c: rewritten to support new fiid model + enhancements. * src/ipmi-debug.c: removed struct based display routines. Needs more discusion on the mailing list. * src/ipmi-msg-cmds.h: removed from CVS - dependent on struct fields. Framework has changed, new implementation will go into appropriate files. More discussion on the mailing list. * src/smbios.h, src/smbios.c: uniform naming convention changes. * src/ipmi-utils.c: ipmi_lan_chksum_test now valides both chksum1 and chksum2. ipmi_strerr_r now accepts fiid_obj_t and returns comp_code. New function ipmi_input_timeout. * src/xmalloc.c: syslog upon allocation failure and set errno to ENOMEM. new xfree call. * src/ipmi-error.h: libfreeipmi only ERR macro to log and return upon failure. * src/ipmi-sdr-record-types.[c,h]: New file - SDR record types. Patch from Bala * src/ipmi-sdr-repo-cmds.[c,h]: New file - SDR commands - Get Repository Info, Get SDR Repository Allocation Info, Reserve SDR Repository and Get SDR. Patch from Bala . Replaced function prefix from ipmi_sdr_ to ipmi_kcs_. * src/ipmi-sensor-cmds.[c,h]: New file - Sensor commands - Get Device SDR Info, Get Device SDR, Reserve Device SDR Repository, Get Sensor Reading Factors, Set Sensor Hysteresis, Get Sensor Hysteresis, Set Sensor Threshold, Sensor Threshold, Set Sensor Event Enable, Get Sensor Event Status, Sensor Reading, Sensor Type, Get Sensor Type. Patch from Bala . Replaced function prefix from ipmi_snsr_ to ipmi_kcs_ * src/ipmi-sensor-types.h: New file - Sensor types and Sensor unit types. Patch from Bala . * src/ipmi-sel-cmds.[c,h]: New file - SEL subsystem. Patch from Bala . * src/ipmi-sel-record-types.[c,h]: New file - SEL subsystem. Patch from Bala . * src/ipmi-msg-support-cmds.c: completly rewritten from scratch. All new APIs and functionalities. * src/smbios.c: copy_impi_dev_info(...) initialized *result to NULL. * TODO: updated * AUTHORS: added Ian Zimmerman and Balamurugan 2003-12-24 Anand Babu * src/ipmi-kcs-interface.c, src/ipmi-dev-global-cmds.c, src/fiid.c: fixed serious bugs. All lengths are represented as bytes at the top level. bit-level len is abstracted. 2003-12-23 Anand Babu * src/ipmi-kcs-interface.c: fixed fiid_alloc allocation size bug reported by Ian . * src/ipmi-dev-global-cmds.c: fixed memory freeing bug reported by Al * src/smbios.c, src/smbios.h: integrated Ian's SMBIOS probe functionality. * libfreeipmi: merged with old savannah code base. LAN-fiid in next commit. 2003-12-21 Anand Babu * src/fiid.c: new FreeIPMI Interface Definition framework jointly developed by Bala and myself. * src/bit-ops.[c,h]: rich set of BIT manipulation macros and functions. * src/ipmi-kcs-interface.c: ported to new FIID framework. Now accepts port from user. * src/ipmi-dev-global-cmds.c: ported to new FIID framework. 2003-12-14 Anand Babu * src/ipmi-kcs-interface.c, src/ipmi-kcs-interface.c: new kcs init macro. New _INB, _OUTB portable macros. Complete interface change to accept port probed by the driver dynamically. * src/ipmi-debug.c: new function to print kcs register state. * src/ipmi-lan-interface.c: replaced alloca with xmalloc. alloca is also ok as long as we do not allocate beyond the stack rlimit. Portability is not a big concern, __builtin_alloca works with little performance penalty. * src/xmalloc.c: split into header and source. * src/freeipmi.h: includes system.h and xmalloc.h 2003-12-08 Anand Babu * src/ipmi-kcs-interface.c, src/ipmi-kcs-interface.c: new user-space inband KCS driver. * src/ipmi-error.h: new kcs status code definitions. * src/ipmi-error.c: new kcs status code str error function. Split ERR_RET macro to _ERR and _ERR_RET. Fixed "unspecified control code" return 0 bug. 2003-12-03 Albert Chu * src/ipmi-lan-interface.h, src/ipmi-lan-interface.c (assemble_ipmi_lan_pre_session_rq_pkt, assemble_ipmi_lan_rq_pkt): net_fn_t parameter type split into u_int8_t net_fn and u_int8_t lun parameters. Added net_fn parameter check. * src/ipmi-msg-cmds.h: Made all macros upper case and prefixed with "IPMI_" to avoid potential name space pollution. * src/rmcp.h: Made all macros upper case and prefixed with "RMCP_" to avoid potential name space pollution. Renamed many macros based on the wierdness of the resulting macro name. * src/ipmi-msg-support-cmds.h: Modified struct ipmi_cmd_get_channel_auth_caps_rs "anonymous_login:3" field to be three one-bit fields. * src/ipmi-msg-cmds.h (IPMI_ANONYMOUS_LOGIN_ENABLED, IPMI_NULL_USERNAMES_ENABLED, IPMI_NON_NULL_USERNAMES_ENABLED): Modified for change in struct ipmi_cmd_get_channel_auth_caps_rs. 2003-12-02 Anand Babu * src/ipmi-lan-core.c, src/ipmi-lan-core.h: removed. Related code moved to ipmi-lan-interface.{c,h}. * src/ipmi-msg-support.h: moved net_fn_t to ipmi-netfn-spec.h. Renamed ipmi_msg_rq and ipmi_msg_rs as ipmi_lan_msg_rq and ipmi_lan_msg_rs to ipmi_lan_interface.{c,h}. Removed ipmi_session_t and ipmi_lan_msg_rq_t headers from all commands. Replaced struct anonymous_login with u_int8_t:3 for packing. Added anonymous_login_status macro definitions. All functions and structs will deal only the command part from now on. * src/ipmi-chassis-cmds.h: Removed ipmi_session_t and ipmi_lan_msg_rq_t headers from all commands. * src/ipmi-kcs-interface.c, src/ipmi-kcs-interface.c: new BMC SMS interface for inband userspace communication. * src/ipmi-sessions.c, src/ipmi-sessions.h: moved sessions related code from ipmi-msg-support-cmds.h * src/ipmi-utils.c: 2 new functions ipmi_lan_pre_session_chksum_test, ipmi_lan_chksum_test. * src/ipmi-debug.c: broken. Needs rework for the new interface. * src/rmcp.c: swapped msg_tag and presence_pong. * refresh: renamed to autogen.sh. Thanks to Ben Woodard . 2003-11-28 Albert Chu * src/rmcp.h: Added RMCP_ASF_PRESENCE_PONG_MESSAGE_TAG_MAX macro. Added several more helper macros. * src/rmcp.h, src/rmcp.c (rmcp_asf_presence_ping): Added message_tag parameter. Parameter check also ensures tag is within range. * src/rmcp.h, src/rmcp.c (rmcp_hdr): New function. * src/rmcp.c (rmcp_ipmi_hdr, rmcp_asf_hdr): Modified functions to use new rmcp_hdr function. * Tagged current repository state libfreeipmi-0-0-0-0-alpha1. 2003-11-26 Albert Chu * src/ipmi-debug.c (rmcp_hdr_dump): Added missing dump fields. * src/ipmi-debug.c: Cast all checksum output to unsigned char, to avoid sign extended output. 2003-11-26 Albert Chu * libfreeipmi.spec.in: Made release 0.alpha0. * Tagged current repository state libfreeipmi-0-0-0-0-alpha0. 2003-11-25 Albert Chu * src/ipmi-debug.c: Removed IPMI_DEBUG_FD_OK macro and all fd parameter checks. File descriptor error checks will now fall through to write(). 2003-11-24 Albert Chu Various Cleanup fixes * src/ipmi-msg-cmds.h (check_slave_netfn_checksum, check_data_checksum): Added (u_int8_t *) cast to remove compiler warnings. * src/ipmi-debug.h: Renamed IPMI_DEBUG_DEFAULT_FILE to IPMI_DEBUG_DEFAULT_FD and use STDERR_FILENO instead of 2. Added include of unistd.h for STDERR_FILENO definition. * src/ipmi-debug.c: Globally fixed debugging output alignment issues and output issues. * src/ipmi-chassis-cmds.h, src/ipmi-chassis-cmds.c, src/ipmi-msg-cmds.h, src/ipmi-debug.h, src/ipmi-debug.c: "chassis status" command is actually called "get chassis status" in the ipmi specification. Globally renamed everything around this fact. 2003-11-21 Albert Chu RMCP Changes * src/rmcp.h, src/rmcp.c (rmcp_ipmi_hdr, rmcp_asf_hdr): New functions, for consistency with ipmi functions. * src/rmcp.h: Modified struct rmcp_hdr to be more consistent with style of other packet structures. Removed numerous macros that should not longer be used because of new rmcp_ipmi_hdr and rmcp_asf_hdr functions. Modified RMCP_HDR_MSG_CLASS_BIT_RMCP_NORMAL and RMCP_HDR_MSG_CLASS_BIT_RMCP_ACK constants for consistency. Added numerous new macros to be consistent with style in ipmi-msg-cmds.h. Packing fixes * src/rmcp.h, src/ipmi-chassis-cmds.h, src/ipmi-msg-support-cmds.h: Added #pragma pack(0) to the bottom of the structure definitions. Misc * configure.ac: Added checks for sys/bitypes.h and sys/inttypes.h. 2003-11-20 Albert Chu LAN Core fixes * src/ipmi-lan-core.c (ipmi_sendto, ipmi_recvfrom): Fixed bug in which IPMI Lan packet padding incorrectly used. * src/ipmi-lan-core.c (ipmi_sendto, ipmi_recvfrom): Return length of ipmi buffer sent or received, not the combined length of the rmcp buffer and ipmi buffer. Checksums * src/ipmi-utils.h, src/ipmi-utils.c (ipmi_chksum_test): New function. * src/ipmi-utils.c (ipmi_chksum): Added parameter checks. Removed inline function declaration. * src/ipmi-msg-cmds.h: Added checksum macros. Misc * src/rmcp.c (rmcp_asf_presence_ping): Wrapped RMCP_ASF_IANA_ENTERPRISE_NUM within htonl, because rmcp is supposed to be big endian. * libfreeipmi.spec.in: Made initial changes to make this spec file work. 2003-11-19 Albert Chu * src/ipmi-debug.h, src/ipmi-debug.c: Added verbose flags to functions to indicate raw or verbose dumps. Internally, many changes were made to the code and most of the file was re-written. * src/ipmi-msg-cmds.h: New file with all ipmi message command macros. * src/ipmi-msg-support-cmds.h, src/ipmi-chassis-cmds.h: Moved macros to ipmi-msg-cmds.h. * src/freeipmi.h: Added ipmi-msg-cmds.h. * src/Makefile.am: Added ipmi-msg-cmds.h. * src/ipmi-lan-core.h, src/ipmi-lan-core.c (ipmi_sendto, ipmi_recvfrom): Changed socklen_t to unsigned int, to fix potential port issues. * TODO: Updated TODO list. * acinclude.m4: Added TYPE_SOCKLEN_T check. * configure.ac: Added socklen_t, stdarg.h, and varargs.h checks. 2003-11-18 Albert Chu Debug fixes * src/ipmi-debug.h: Added IPMI_DEBUG_DEFAULT_FILE constant. * src/ipmi-debug.c (_dprintf, _write): New functions. * src/ipmi-debug.h, src/ipmi-debug.c: Added fd argument to all functions to specify fd to write to. Rewrote all functions to use _dprintf to write debug data to file descriptor rather than stderr. Lan core fixes * src/ipmi-lan-core.c (ipmi_sendto_host): Added parameter check. * src/ipmi-lan-core.c (ipmi_recvfrom): Added parameter checks, buffer overflow checks, error check on alloca, and corner case check on recvfrom. IPMI packet creation fixes/changes * src/ipmi-msg-support.h: Split anonymous_login field in struct ipmi_get_channel_auth_caps_rs into bit fields for specific status info. * src/ipmi-debug.c (ipmi_get_channel_auth_caps_rs_dump): Updated for above changes. * src/ipmi-chassis-cmds.h: Renamed all chassis status response macros to more readable and make more sense. Removed the ipmi_chassis_status_restore_policy macro. Renamed IPMI_CHASSIS_STATUS_RESTORE_POLICY_POWER_ON to IPMI_CHASSIS_STATUS_RESTORE_POLICY_POWER_UP. * src/ipmi-msg-support-cmds.h: Added get_channel_auth_caps response macros. * src/ipmi-msg-support-cmds.h: Added generic response message macros. Misc * src/ipmi-msg-support.h: Renamed _IPMI_MESG_SUPPORT_CMDS_H to _IPMI_MSG_SUPPORT_CMDS_H. * src/ipmi-sessions.h: Renamed _IPMI_MESG_SUPPORT_CMDS_H to _IPMI_SESSIONS_H. * configure.ac: Added --enable-debug option. 2003-11-17 Albert Chu * refresh: Added libtoolize into the configuration. * config.sub, config.guess, depcomp, install-sh, ltmain.sh, missing, mkinstalldirs: Removed files, they are handled by the update to refresh. * src/ipmi-chassis-cmds.h: Added IPMI_CHASSIS_STATUS_RESTORE_POLICY constants, as per sectoin 22.2 of the IPMI v1.5 specification. Added macros to get and test all of the status information from a chassis status response. * AUTHORS: Garlic with a 'K' :P 2003-11-17 Anand Babu * TODO: updated ab's section * AUTHORS: Added Jim Garlick * INSTALL: added ./refresh execution * THANKS: added LLNL * Makefile.in, src/Makefile.in, config.h.in, doc/Makefile.in, configure, aclocal.m4: removed from CVS * doc/libfreeipmi.texinfo: moved to freeipmi-hg.texinfo and cleaned up * doc/authors.texinfo: new * doc/gpl.texinfo: removed * www: updated http://www.nongnu.org/freeipmi/ home page 2003-11-17 Albert Chu * src/ipmi-debug.h, src/ipmi-debug.c: New files. * src/ipmi-msg-support-cmds.h: Split max_priv_level field in struct ipmi_get_channel_auth_caps_rq and new_priv_level field in struct ipmi_set_session_priv_level_rs into privilege and reserved fields, to be more consistent with other privilege field definitions in other packet types. * src/ipmi-chassis-cmds.h: Renamed fields in struct ipmi_chassis_status_rs. * src/ipmi-msg-support-msgs.h: Renamed fields in struct ipmi_get_channel_auth_caps_rs. * src/rmcp.h, src/rmcp.c (display_rmcp_asf_presence_pong, display_rmcp_hdr): Removed functions, replaced with debug functions in ipmi-debug.h and ipmi-debug.c. * src/rmcp.h: Renamed reserved field to reserved1, renamed reserved_1 field to reserved2, and modified supported_entities field in struct rmcp_asf_presence_pong to have consistent style to ipmi packet structures. * src/rmcp.h, src/rmcp.c (rmcp_asf_presence_ping): Changed return type to int and checked for proper parameters. * src/rmcp.c: Removed inclusion of error.h and netinet/in.h. Added inclusion of errno.h. * src/freeipmi.h: Add new header file. Added missing ipmi-netfn-spec.h header file. 2003-11-16 Albert Chu * src/ipmi-msg-support-cmds.h: Renamed struct ipmi_rq_msg seq field to rq_seq, to have consistent naming with ipmi_rs_msg rq_seq field. * src/ipmi-chassis-cmds.h, src/ipmi-chassis-cmds.c (ipmi_chassis_ctrl_rq, ipmi_chassis_status_rq): Made field name changes. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_get_channel_auth_caps_rq, ipmi_get_session_challenge_rq, ipmi_activate_session_rq, ipmi_set_session_priv_level_rq, ipmi_close_session_rq): Made field name changes. * src/ipmi-msg-support-cmds.h: Modified struct ipmi_get_channel_auth_caps_rs auth_status field to explicitly list all status bit types. Modified oem_id field to be a array of u_int8_t types instead of a u_int32_t type aligned on 24 bits. Created an IPMI_OEM_ID_LEN macro for the oem_id length. 2003-11-16 Albert Chu IPMI packet creation fixes * src/ipmi-chassis-cmds.h, src/ipmi-chassis-cmds.c (ipmi_chassis_status_rq): Fixed bug with lun parameter being set incorrectly. * src/ipmi-chassis-cmds.h, src/ipmi-chassis-cmds.c (ipmi_chassis_ctrl_rq, ipmi_chassis_status_rq): Changed return code from u_int8_t to int. Return -1 on parameter errors and set errno appropriately. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_get_channel_auth_caps_rq, ipmi_get_session_challenge_rq, ipmi_activate_session_rq, ipmi_set_session_priv_level_rq, ipmi_close_session_rq): Changed return code from u_int8_t to int. Return -1 on parameter errors and set errno appropriately. Error handling fixes * src/ipmi-errno.h, src/ipmi-errno.c: Renamed to ipmi-error.h and ipmi-error.c respectively. * src/ipmi-error.h: Removed ipmi_errno_t type. * src/ipmi-error.c: Removed ipmi_errno global variable * src/ipmi-error.c (ERANGE_CHECK): Fixed bug with ERANGE_CHECK macro, which incorrectly returns ERANGE, should actually set errno then return -1. Removed ERANGE_CHECK macro and moved code in ERR_RET since it was only used in there. * src/ipmi-error.c (ERR_RET): Fixed bug, should use strlen on errdesc string length, not errstr buffer. * src/ipmi-error.c (ipmi_strerror_r): Fixed bug which incorrecly returned EINVAL on error, should set errno to EINVAL and return -1. Use ERR_RET on completion code error string to avoid buffer overflow. Misc * src/ipmi-msg-support-cmds.h, src/ipmi-netfn-spec.h: Moved network function codes from ipmi-msg-support.h to new ipmi-netfn-spec.h. * src/ipmi-msg-support-cmds.h, src/ipmi-chassis-cmds.h: Moved chassis control macros from ipmi-msg-support-cmds.h to ipmi-chassis-cmds.h. * src/ipmi-msg-support-cmds.h: IPMI_SESSION_AUTH_TYPE_NONE defined twice, removed one of them. * srd/freeipmi.h: Updated with new header files. 2003-11-15 Albert Chu Fixed ipmi_sendto framework as discussed in e-mails * src/ipmi-lan-core.h, src/ipmi-lan-core.c (ipmi_sendto): Changed API to more resemble sendto. Removed sockaddr_in construction code. Added parameter checks and error check on alloca. Modified call to sendto and return value based on varying sendto return values. * src/ipmi-lan-core.h, src/ipmi-lan-core.c (ipmi_sendto_host): New function to handle old ipmi_sendto functionality. IPMI packet creation fixes * src/ipmi-chassis-cmds.h, src/ipmi-chassis-cmds.c (ipmi_chassis_ctrl_rq): Added auth_code_len parameter to function. Memcpy auth_code buffer based on new parameter. Added Chassis Status Command * src/ipmi-msg-support-cmds.h: Added ipmi_chassis_status_rq_t and ipmi_chassis_status_rs_t types * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_set_chassis_status_rq): New function. Misc * src/ipmi-chassis-cmds.h: Added #pragma pack(1). * src/ipmi-msg-support-cmds.h: Removed htonl on IPMI_INITIAL_OUTBOUND_SEQ_NUM. Removed htonl comments. * src/ipmi-chassis-cmds.c, src/ipmi-msg-support-cmds.c: Removed #include , no longer necessary due to above change. 2003-11-14 Albert Chu IPMI packet creation fixes * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_get_channel_auth_caps_rq, ipmi_get_session_challenge_rq, ipmi_activate_session_rq): Added rq_seq parameter to function. Set requester sequence number fields to rq_seq parameter rather 0x00. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_get_session_challenge_rq): Added username_len parameter. Memcpy username buffer based on new parameter. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_activate_session_rq, ipmi_set_session_priv_level_rq, ipmi_chassis_ctrl_rq, ipmi_close_session_rq): Added auth_code_len parameter to function. Memcpy auth_code buffer based on new parameter. * src/ipmi-msg-support-cmds.h, src/ipmi-msg-support-cmds.c (ipmi_activate_session_rq): Added challenge_str_len parameter. Memcpy challenge_str buffer based on new parameter. Minor fixes * src/rmcp.c (display_rmcp_hdr): Added dump of reserved field. * src/ipmi-msg-support-cmds.h: Modified IPMI_INITIAL_OUTBOUND_SEQ_NUM to explicitly be a 32 bit number, because outbound sequence numbers are 32 bits. Misc * AUTHORS: Added me :-) 2003-11-14 Anand Babu * src/ipmi-chassis.c: new file, moved chassis control command and defns to here. * src/ipmi-msg-support-cmds.c: rs_lun is now passed as arg. Fixed inbound_seq_num bug. Thanks to Albert Chu for reporting varoious enhancements and bugs. Macro IPMI_DEFAULT_LUN removed. Use IPMI_BMC_IPMB_LUN_BMC instead. * src/ipmi-ipmb-interface.h: new file, added new IPMI definitions. 2003-11-10 Anand Babu * src/ipmi-lan-core.c: rewrote ipmi_sendto and ipmi_recvfrom. * src/ipmi-msg-support-cmds.h: rmcp_hdr_t separated from all structures. Also structures are checksum friendly. * src/ipmi-msg-support-cmds.c: new functions - ipmi_get_channel_auth_caps_rq, ipmi_get_session_challenge_rq, ipmi_activate_session_rq, ipmi_set_session_priv_level_rq, ipmi_chassis_ctrl_rq, close_session_rq and corresponding request/response structures/macros. * src/rmcp.h: new macro for rmcp header values. * src/freeipmi.h: #pragma pack(1) moved to respective files, where ever required. Removed verbose flag handling, we need to be thread safe. * src/ipmi-errno.h: added new command specific codes. Removed FI_PERROR. * src/ipmi-cmd-spec.h: added new definitions for network functions * libfreeipmi: this checkin freezes core framework for LAN for now. Major facelift through out the code and are not logged here. 2003-10-28 Anand Babu * src/lfi-utils.[c,h]: removed * src/ipmi-utils.[c,h]: replaced lfi-utils * src/ipmi-cmd-spec.h: new file, IPMI command definitions * src/ipmi-errno.[c,h]: new file, IPMI error handler * src/ipmi-msg-support-cmds.[c,h]: new file, IPMI message support functions * src/ipmi-lan-core.[c,h]: new file, core lan functions 2003-09-22 Anand Babu * libfreeipmi: checking into savannah.gnu.org 2002-10-09 Anand Babu * libfreeipmi: initial version. --------------------------------------------------------------------- Do not add anything here. All your logs should be added to beginning of the file. GUIDELINES: * RUN 'make distclean' BEFORE YOU COMMIT. * CHANGELOG HEADER FORMAT EXAMPLE: EXAMPLE BEGIN 2002-10-29 Anand Babu * ChangeLog: added guidelines EXAMPLE END freeipmi-1.6.4/README.argp0000644002055400205540000000036013527331634015070 0ustar00achuachu00000000000000Local FreeIPMI argp modified from argp-standalone-1.3. Many configure.ac autoconfing for the local argp library taken from argp-standalone as well. argp-standalone taken from glibc from Neil Moller. http://www.lysator.liu.se/~nisse/misc/ freeipmi-1.6.4/README.build0000644002055400205540000000667413527331634015254 0ustar00achuachu00000000000000Building/Install from source ---------------------------- The instructions below (modified from the INSTALL file) should work for most people. 1. `cd' to the directory containing the package's source code and type `./configure' to configure the package for your system. Running `configure' takes awhile. While running, it prints some messages telling which features it is checking for. If your system requires additional packages and/or libraries in order for FreeIPMI to be built, appropriate messages should be displayed. These packages and/or libraries should be installed and `./configure' should be executed again. 2. Once `./configure' has succeeded, type `make' to compile the package. 3. Type `make install' to install the programs and any data files and documentation. You may need to be root in order for files to be installed into the proper locations on your system. By default files will typically be installed in /usr/local (binaries in /usr/local/bin, libraries in /usr/local/lib, configuration files in /usr/local/etc/, etc.). To install into the more common locations such as /usr/bin, /usr/lib/, /etc, etc. the options passed into `./configure' must be adjusted. The following set of options and settings are suitable for most Linux systems. --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --mandir=/usr/share/man Your mileage may vary depending on your system. If you install the binaries or libraries in non-standard locations (e.g. /usr/local or /opt), you may have to update other system configuration to find the files and libraries. For example, in Linux you may need to update your PATH or LD_LIBRARY_PATH environment variables. Or you may need to update your /etc/ld.so.conf files and run ldconfig(8) to find libraries globally. This is highly dependent on your operating system. Building RPMs ------------- For most people you can build RPMs one of two ways. From the source: rpmbuild -ta freeipmi-X.Y.Z.tar.gz From the source rpm: rpmbuild --rebuild freeipmi-X.Y.Z-1.src.rpm Depending on your default RPM build environment, you may need to be root in order for RPMs to be stored in the default locations. After the RPMs are built, you may install them the normal way: rpm -i freeipmi-X.Y.Z.ARCH.rpm Additional configure options ---------------------------- The following configure options are available to users for more unique compilation requirements and environments. --without-encryption This option disables compilation of encryption support in FreeIPMI. Most notably, this disables encryption support when doing out of band IPMI 2.0 communication. This option may be particularly useful in embedded environments that do not have the libraries needed to compile encryption support. --with-dont-check-for-root When running tools inband, root access is normally required. In some systems, this may not be desired. This options removes the check for root access in FreeIPMI tools. --without-random-device This option disables checks and use of /dev/urandom and /dev/random. This may be required for embededded systems without these devices. --with-pkgconfig-dir This option can configure an alternate default pkgconfig directory. --with-bmc-watchdog-logfile This option can configure an alternate default bmc-watchdog log directory. --with-ipmi-monitoring-sdr-cache-dir This option can configure an alternate default libipmimonitoring SDR cache directory. freeipmi-1.6.4/README.openipmi0000644002055400205540000000102013527331634015751 0ustar00achuachu00000000000000The Linux OpenIPMI driver is often loaded via the /etc/init.d/ipmi setup script. If your distribution/environment does not have this script, the following script can be used to load/unload the driver. #!/bin/sh /sbin/modprobe ipmi_devintf maj=`cat /proc/devices | awk '/ipmidev/{print $1}'` if [ -c /dev/ipmi0 ] then rm -f /dev/ipmi0 /bin/mknod /dev/ipmi0 c $maj 0 else /bin/mknod /dev/ipmi0 c $maj 0 fi /sbin/modprobe ipmi_si # do stuff /sbin/rmmod ipmi_si /sbin/rmmod ipmi_devintf /sbin/rmmod ipmi_msghandler freeipmi-1.6.4/COPYING.bmc-watchdog0000644002055400205540000010451313527331634016656 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmipower0000644002055400205540000010451313527331634016332 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmiping0000644002055400205540000010451313527331634016133 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmiconsole0000644002055400205540000010451313527331634016640 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmimonitoring0000644002055400205540000010451313527331634017363 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.pstdout0000644002055400205540000010451313527331634016021 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmidetect0000644002055400205540000010451313527331634016446 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmi-fru0000644002055400205540000010451313527331634016047 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmi-dcmi0000644002055400205540000010451313527331634016167 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.ipmiseld0000644002055400205540000010451313527331634016125 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/COPYING.sunbmc0000644002055400205540000000322013527331634015577 0ustar00achuachu00000000000000The file libfreeipmi/driver/freeipmi_bmc_intf.h is from ipmitool (http://sourceforge.net/projects/ipmitool) and comes with the following license. ---- Copyright (c) 2003 Sun Microsystems, 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: Redistribution of source code must retain the above copyright notice, this list of conditions and the following disclaimer. Redistribution 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 Sun Microsystems, Inc. or the names of contributors may be used to endorse or promote products derived from this software without specific prior written permission. This software is provided "AS IS," without a warranty of any kind. ALL EXPRESS OR IMPLIED CONDITIONS, REPRESENTATIONS AND WARRANTIES, INCLUDING ANY IMPLIED WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR NON-INFRINGEMENT, ARE HEREBY EXCLUDED. SUN MICROSYSTEMS, INC. ("SUN") AND ITS LICENSORS SHALL NOT BE LIABLE FOR ANY DAMAGES SUFFERED BY LICENSEE AS A RESULT OF USING, MODIFYING OR DISTRIBUTING THIS SOFTWARE OR ITS DERIVATIVES. IN NO EVENT WILL SUN OR ITS LICENSORS BE LIABLE FOR ANY LOST REVENUE, PROFIT OR DATA, OR FOR DIRECT, INDIRECT, SPECIAL, CONSEQUENTIAL, INCIDENTAL OR PUNITIVE DAMAGES, HOWEVER CAUSED AND REGARDLESS OF THE THEORY OF LIABILITY, ARISING OUT OF THE USE OF OR INABILITY TO USE THIS SOFTWARE, EVEN IF SUN HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. ---- freeipmi-1.6.4/COPYING.ZRESEARCH0000644002055400205540000010451313527331634015645 0ustar00achuachu00000000000000 GNU GENERAL PUBLIC LICENSE Version 3, 29 June 2007 Copyright (C) 2007 Free Software Foundation, Inc. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The GNU General Public License is a free, copyleft license for software and other kinds of works. The licenses for most software and other practical works are designed to take away your freedom to share and change the works. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change all versions of a program--to make sure it remains free software for all its users. We, the Free Software Foundation, use the GNU General Public License for most of our software; it applies also to any other work released this way by its authors. You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for them if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs, and that you know you can do these things. To protect your rights, we need to prevent others from denying you these rights or asking you to surrender the rights. Therefore, you have certain responsibilities if you distribute copies of the software, or if you modify it: responsibilities to respect the freedom of others. For example, if you distribute copies of such a program, whether gratis or for a fee, you must pass on to the recipients the same freedoms that you received. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. Developers that use the GNU GPL protect your rights with two steps: (1) assert copyright on the software, and (2) offer you this License giving you legal permission to copy, distribute and/or modify it. For the developers' and authors' protection, the GPL clearly explains that there is no warranty for this free software. For both users' and authors' sake, the GPL requires that modified versions be marked as changed, so that their problems will not be attributed erroneously to authors of previous versions. Some devices are designed to deny users access to install or run modified versions of the software inside them, although the manufacturer can do so. This is fundamentally incompatible with the aim of protecting users' freedom to change the software. The systematic pattern of such abuse occurs in the area of products for individuals to use, which is precisely where it is most unacceptable. Therefore, we have designed this version of the GPL to prohibit the practice for those products. If such problems arise substantially in other domains, we stand ready to extend this provision to those domains in future versions of the GPL, as needed to protect the freedom of users. Finally, every program is threatened constantly by software patents. States should not allow patents to restrict development and use of software on general-purpose computers, but in those that do, we wish to avoid the special danger that patents applied to a free program could make it effectively proprietary. To prevent this, the GPL assures that patents cannot be used to render the program non-free. The precise terms and conditions for copying, distribution and modification follow. TERMS AND CONDITIONS 0. Definitions. "This License" refers to version 3 of the GNU General Public License. "Copyright" also means copyright-like laws that apply to other kinds of works, such as semiconductor masks. "The Program" refers to any copyrightable work licensed under this License. Each licensee is addressed as "you". "Licensees" and "recipients" may be individuals or organizations. To "modify" a work means to copy from or adapt all or part of the work in a fashion requiring copyright permission, other than the making of an exact copy. The resulting work is called a "modified version" of the earlier work or a work "based on" the earlier work. A "covered work" means either the unmodified Program or a work based on the Program. To "propagate" a work means to do anything with it that, without permission, would make you directly or secondarily liable for infringement under applicable copyright law, except executing it on a computer or modifying a private copy. Propagation includes copying, distribution (with or without modification), making available to the public, and in some countries other activities as well. To "convey" a work means any kind of propagation that enables other parties to make or receive copies. Mere interaction with a user through a computer network, with no transfer of a copy, is not conveying. An interactive user interface displays "Appropriate Legal Notices" to the extent that it includes a convenient and prominently visible feature that (1) displays an appropriate copyright notice, and (2) tells the user that there is no warranty for the work (except to the extent that warranties are provided), that licensees may convey the work under this License, and how to view a copy of this License. If the interface presents a list of user commands or options, such as a menu, a prominent item in the list meets this criterion. 1. Source Code. The "source code" for a work means the preferred form of the work for making modifications to it. "Object code" means any non-source form of a work. A "Standard Interface" means an interface that either is an official standard defined by a recognized standards body, or, in the case of interfaces specified for a particular programming language, one that is widely used among developers working in that language. The "System Libraries" of an executable work include anything, other than the work as a whole, that (a) is included in the normal form of packaging a Major Component, but which is not part of that Major Component, and (b) serves only to enable use of the work with that Major Component, or to implement a Standard Interface for which an implementation is available to the public in source code form. A "Major Component", in this context, means a major essential component (kernel, window system, and so on) of the specific operating system (if any) on which the executable work runs, or a compiler used to produce the work, or an object code interpreter used to run it. The "Corresponding Source" for a work in object code form means all the source code needed to generate, install, and (for an executable work) run the object code and to modify the work, including scripts to control those activities. However, it does not include the work's System Libraries, or general-purpose tools or generally available free programs which are used unmodified in performing those activities but which are not part of the work. For example, Corresponding Source includes interface definition files associated with source files for the work, and the source code for shared libraries and dynamically linked subprograms that the work is specifically designed to require, such as by intimate data communication or control flow between those subprograms and other parts of the work. The Corresponding Source need not include anything that users can regenerate automatically from other parts of the Corresponding Source. The Corresponding Source for a work in source code form is that same work. 2. Basic Permissions. All rights granted under this License are granted for the term of copyright on the Program, and are irrevocable provided the stated conditions are met. This License explicitly affirms your unlimited permission to run the unmodified Program. The output from running a covered work is covered by this License only if the output, given its content, constitutes a covered work. This License acknowledges your rights of fair use or other equivalent, as provided by copyright law. You may make, run and propagate covered works that you do not convey, without conditions so long as your license otherwise remains in force. You may convey covered works to others for the sole purpose of having them make modifications exclusively for you, or provide you with facilities for running those works, provided that you comply with the terms of this License in conveying all material for which you do not control copyright. Those thus making or running the covered works for you must do so exclusively on your behalf, under your direction and control, on terms that prohibit them from making any copies of your copyrighted material outside their relationship with you. Conveying under any other circumstances is permitted solely under the conditions stated below. Sublicensing is not allowed; section 10 makes it unnecessary. 3. Protecting Users' Legal Rights From Anti-Circumvention Law. No covered work shall be deemed part of an effective technological measure under any applicable law fulfilling obligations under article 11 of the WIPO copyright treaty adopted on 20 December 1996, or similar laws prohibiting or restricting circumvention of such measures. When you convey a covered work, you waive any legal power to forbid circumvention of technological measures to the extent such circumvention is effected by exercising rights under this License with respect to the covered work, and you disclaim any intention to limit operation or modification of the work as a means of enforcing, against the work's users, your or third parties' legal rights to forbid circumvention of technological measures. 4. Conveying Verbatim Copies. You may convey verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice; keep intact all notices stating that this License and any non-permissive terms added in accord with section 7 apply to the code; keep intact all notices of the absence of any warranty; and give all recipients a copy of this License along with the Program. You may charge any price or no price for each copy that you convey, and you may offer support or warranty protection for a fee. 5. Conveying Modified Source Versions. You may convey a work based on the Program, or the modifications to produce it from the Program, in the form of source code under the terms of section 4, provided that you also meet all of these conditions: a) The work must carry prominent notices stating that you modified it, and giving a relevant date. b) The work must carry prominent notices stating that it is released under this License and any conditions added under section 7. This requirement modifies the requirement in section 4 to "keep intact all notices". c) You must license the entire work, as a whole, under this License to anyone who comes into possession of a copy. This License will therefore apply, along with any applicable section 7 additional terms, to the whole of the work, and all its parts, regardless of how they are packaged. This License gives no permission to license the work in any other way, but it does not invalidate such permission if you have separately received it. d) If the work has interactive user interfaces, each must display Appropriate Legal Notices; however, if the Program has interactive interfaces that do not display Appropriate Legal Notices, your work need not make them do so. A compilation of a covered work with other separate and independent works, which are not by their nature extensions of the covered work, and which are not combined with it such as to form a larger program, in or on a volume of a storage or distribution medium, is called an "aggregate" if the compilation and its resulting copyright are not used to limit the access or legal rights of the compilation's users beyond what the individual works permit. Inclusion of a covered work in an aggregate does not cause this License to apply to the other parts of the aggregate. 6. Conveying Non-Source Forms. You may convey a covered work in object code form under the terms of sections 4 and 5, provided that you also convey the machine-readable Corresponding Source under the terms of this License, in one of these ways: a) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by the Corresponding Source fixed on a durable physical medium customarily used for software interchange. b) Convey the object code in, or embodied in, a physical product (including a physical distribution medium), accompanied by a written offer, valid for at least three years and valid for as long as you offer spare parts or customer support for that product model, to give anyone who possesses the object code either (1) a copy of the Corresponding Source for all the software in the product that is covered by this License, on a durable physical medium customarily used for software interchange, for a price no more than your reasonable cost of physically performing this conveying of source, or (2) access to copy the Corresponding Source from a network server at no charge. c) Convey individual copies of the object code with a copy of the written offer to provide the Corresponding Source. This alternative is allowed only occasionally and noncommercially, and only if you received the object code with such an offer, in accord with subsection 6b. d) Convey the object code by offering access from a designated place (gratis or for a charge), and offer equivalent access to the Corresponding Source in the same way through the same place at no further charge. You need not require recipients to copy the Corresponding Source along with the object code. If the place to copy the object code is a network server, the Corresponding Source may be on a different server (operated by you or a third party) that supports equivalent copying facilities, provided you maintain clear directions next to the object code saying where to find the Corresponding Source. Regardless of what server hosts the Corresponding Source, you remain obligated to ensure that it is available for as long as needed to satisfy these requirements. e) Convey the object code using peer-to-peer transmission, provided you inform other peers where the object code and Corresponding Source of the work are being offered to the general public at no charge under subsection 6d. A separable portion of the object code, whose source code is excluded from the Corresponding Source as a System Library, need not be included in conveying the object code work. A "User Product" is either (1) a "consumer product", which means any tangible personal property which is normally used for personal, family, or household purposes, or (2) anything designed or sold for incorporation into a dwelling. In determining whether a product is a consumer product, doubtful cases shall be resolved in favor of coverage. For a particular product received by a particular user, "normally used" refers to a typical or common use of that class of product, regardless of the status of the particular user or of the way in which the particular user actually uses, or expects or is expected to use, the product. A product is a consumer product regardless of whether the product has substantial commercial, industrial or non-consumer uses, unless such uses represent the only significant mode of use of the product. "Installation Information" for a User Product means any methods, procedures, authorization keys, or other information required to install and execute modified versions of a covered work in that User Product from a modified version of its Corresponding Source. The information must suffice to ensure that the continued functioning of the modified object code is in no case prevented or interfered with solely because modification has been made. If you convey an object code work under this section in, or with, or specifically for use in, a User Product, and the conveying occurs as part of a transaction in which the right of possession and use of the User Product is transferred to the recipient in perpetuity or for a fixed term (regardless of how the transaction is characterized), the Corresponding Source conveyed under this section must be accompanied by the Installation Information. But this requirement does not apply if neither you nor any third party retains the ability to install modified object code on the User Product (for example, the work has been installed in ROM). The requirement to provide Installation Information does not include a requirement to continue to provide support service, warranty, or updates for a work that has been modified or installed by the recipient, or for the User Product in which it has been modified or installed. Access to a network may be denied when the modification itself materially and adversely affects the operation of the network or violates the rules and protocols for communication across the network. Corresponding Source conveyed, and Installation Information provided, in accord with this section must be in a format that is publicly documented (and with an implementation available to the public in source code form), and must require no special password or key for unpacking, reading or copying. 7. Additional Terms. "Additional permissions" are terms that supplement the terms of this License by making exceptions from one or more of its conditions. Additional permissions that are applicable to the entire Program shall be treated as though they were included in this License, to the extent that they are valid under applicable law. If additional permissions apply only to part of the Program, that part may be used separately under those permissions, but the entire Program remains governed by this License without regard to the additional permissions. When you convey a copy of a covered work, you may at your option remove any additional permissions from that copy, or from any part of it. (Additional permissions may be written to require their own removal in certain cases when you modify the work.) You may place additional permissions on material, added by you to a covered work, for which you have or can give appropriate copyright permission. Notwithstanding any other provision of this License, for material you add to a covered work, you may (if authorized by the copyright holders of that material) supplement the terms of this License with terms: a) Disclaiming warranty or limiting liability differently from the terms of sections 15 and 16 of this License; or b) Requiring preservation of specified reasonable legal notices or author attributions in that material or in the Appropriate Legal Notices displayed by works containing it; or c) Prohibiting misrepresentation of the origin of that material, or requiring that modified versions of such material be marked in reasonable ways as different from the original version; or d) Limiting the use for publicity purposes of names of licensors or authors of the material; or e) Declining to grant rights under trademark law for use of some trade names, trademarks, or service marks; or f) Requiring indemnification of licensors and authors of that material by anyone who conveys the material (or modified versions of it) with contractual assumptions of liability to the recipient, for any liability that these contractual assumptions directly impose on those licensors and authors. All other non-permissive additional terms are considered "further restrictions" within the meaning of section 10. If the Program as you received it, or any part of it, contains a notice stating that it is governed by this License along with a term that is a further restriction, you may remove that term. If a license document contains a further restriction but permits relicensing or conveying under this License, you may add to a covered work material governed by the terms of that license document, provided that the further restriction does not survive such relicensing or conveying. If you add terms to a covered work in accord with this section, you must place, in the relevant source files, a statement of the additional terms that apply to those files, or a notice indicating where to find the applicable terms. Additional terms, permissive or non-permissive, may be stated in the form of a separately written license, or stated as exceptions; the above requirements apply either way. 8. Termination. You may not propagate or modify a covered work except as expressly provided under this License. Any attempt otherwise to propagate or modify it is void, and will automatically terminate your rights under this License (including any patent licenses granted under the third paragraph of section 11). However, if you cease all violation of this License, then your license from a particular copyright holder is reinstated (a) provisionally, unless and until the copyright holder explicitly and finally terminates your license, and (b) permanently, if the copyright holder fails to notify you of the violation by some reasonable means prior to 60 days after the cessation. Moreover, your license from a particular copyright holder is reinstated permanently if the copyright holder notifies you of the violation by some reasonable means, this is the first time you have received notice of violation of this License (for any work) from that copyright holder, and you cure the violation prior to 30 days after your receipt of the notice. Termination of your rights under this section does not terminate the licenses of parties who have received copies or rights from you under this License. If your rights have been terminated and not permanently reinstated, you do not qualify to receive new licenses for the same material under section 10. 9. Acceptance Not Required for Having Copies. You are not required to accept this License in order to receive or run a copy of the Program. Ancillary propagation of a covered work occurring solely as a consequence of using peer-to-peer transmission to receive a copy likewise does not require acceptance. However, nothing other than this License grants you permission to propagate or modify any covered work. These actions infringe copyright if you do not accept this License. Therefore, by modifying or propagating a covered work, you indicate your acceptance of this License to do so. 10. Automatic Licensing of Downstream Recipients. Each time you convey a covered work, the recipient automatically receives a license from the original licensors, to run, modify and propagate that work, subject to this License. You are not responsible for enforcing compliance by third parties with this License. An "entity transaction" is a transaction transferring control of an organization, or substantially all assets of one, or subdividing an organization, or merging organizations. If propagation of a covered work results from an entity transaction, each party to that transaction who receives a copy of the work also receives whatever licenses to the work the party's predecessor in interest had or could give under the previous paragraph, plus a right to possession of the Corresponding Source of the work from the predecessor in interest, if the predecessor has it or can get it with reasonable efforts. You may not impose any further restrictions on the exercise of the rights granted or affirmed under this License. For example, you may not impose a license fee, royalty, or other charge for exercise of rights granted under this License, and you may not initiate litigation (including a cross-claim or counterclaim in a lawsuit) alleging that any patent claim is infringed by making, using, selling, offering for sale, or importing the Program or any portion of it. 11. Patents. A "contributor" is a copyright holder who authorizes use under this License of the Program or a work on which the Program is based. The work thus licensed is called the contributor's "contributor version". A contributor's "essential patent claims" are all patent claims owned or controlled by the contributor, whether already acquired or hereafter acquired, that would be infringed by some manner, permitted by this License, of making, using, or selling its contributor version, but do not include claims that would be infringed only as a consequence of further modification of the contributor version. For purposes of this definition, "control" includes the right to grant patent sublicenses in a manner consistent with the requirements of this License. Each contributor grants you a non-exclusive, worldwide, royalty-free patent license under the contributor's essential patent claims, to make, use, sell, offer for sale, import and otherwise run, modify and propagate the contents of its contributor version. In the following three paragraphs, a "patent license" is any express agreement or commitment, however denominated, not to enforce a patent (such as an express permission to practice a patent or covenant not to sue for patent infringement). To "grant" such a patent license to a party means to make such an agreement or commitment not to enforce a patent against the party. If you convey a covered work, knowingly relying on a patent license, and the Corresponding Source of the work is not available for anyone to copy, free of charge and under the terms of this License, through a publicly available network server or other readily accessible means, then you must either (1) cause the Corresponding Source to be so available, or (2) arrange to deprive yourself of the benefit of the patent license for this particular work, or (3) arrange, in a manner consistent with the requirements of this License, to extend the patent license to downstream recipients. "Knowingly relying" means you have actual knowledge that, but for the patent license, your conveying the covered work in a country, or your recipient's use of the covered work in a country, would infringe one or more identifiable patents in that country that you have reason to believe are valid. If, pursuant to or in connection with a single transaction or arrangement, you convey, or propagate by procuring conveyance of, a covered work, and grant a patent license to some of the parties receiving the covered work authorizing them to use, propagate, modify or convey a specific copy of the covered work, then the patent license you grant is automatically extended to all recipients of the covered work and works based on it. A patent license is "discriminatory" if it does not include within the scope of its coverage, prohibits the exercise of, or is conditioned on the non-exercise of one or more of the rights that are specifically granted under this License. You may not convey a covered work if you are a party to an arrangement with a third party that is in the business of distributing software, under which you make payment to the third party based on the extent of your activity of conveying the work, and under which the third party grants, to any of the parties who would receive the covered work from you, a discriminatory patent license (a) in connection with copies of the covered work conveyed by you (or copies made from those copies), or (b) primarily for and in connection with specific products or compilations that contain the covered work, unless you entered into that arrangement, or that patent license was granted, prior to 28 March 2007. Nothing in this License shall be construed as excluding or limiting any implied license or other defenses to infringement that may otherwise be available to you under applicable patent law. 12. No Surrender of Others' Freedom. If conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot convey a covered work so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not convey it at all. For example, if you agree to terms that obligate you to collect a royalty for further conveying from those to whom you convey the Program, the only way you could satisfy both those terms and this License would be to refrain entirely from conveying the Program. 13. Use with the GNU Affero General Public License. Notwithstanding any other provision of this License, you have permission to link or combine any covered work with a work licensed under version 3 of the GNU Affero General Public License into a single combined work, and to convey the resulting work. The terms of this License will continue to apply to the part which is the covered work, but the special requirements of the GNU Affero General Public License, section 13, concerning interaction through a network will apply to the combination as such. 14. Revised Versions of this License. The Free Software Foundation may publish revised and/or new versions of the GNU General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies that a certain numbered version of the GNU General Public License "or any later version" applies to it, you have the option of following the terms and conditions either of that numbered version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of the GNU General Public License, you may choose any version ever published by the Free Software Foundation. If the Program specifies that a proxy can decide which future versions of the GNU General Public License can be used, that proxy's public statement of acceptance of a version permanently authorizes you to choose that version for the Program. Later license versions may give you additional or different permissions. However, no additional obligations are imposed on any author or copyright holder as a result of your choosing to follow a later version. 15. Disclaimer of Warranty. THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 16. Limitation of Liability. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. 17. Interpretation of Sections 15 and 16. If the disclaimer of warranty and limitation of liability provided above cannot be given local legal effect according to their terms, reviewing courts shall apply local law that most closely approximates an absolute waiver of all civil liability in connection with the Program, unless a warranty or assumption of liability accompanies a copy of the Program in return for a fee. END OF TERMS AND CONDITIONS How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively state the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see . Also add information on how to contact you by electronic and paper mail. If the program does terminal interaction, make it output a short notice like this when it starts in an interactive mode: Copyright (C) This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, your program's commands might be different; for a GUI interface, you would use an "about box". You should also get your employer (if you work as a programmer) or school, if any, to sign a "copyright disclaimer" for the program, if necessary. For more information on this, and how to apply and follow the GNU GPL, see . The GNU General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Lesser General Public License instead of this License. But first, please read . freeipmi-1.6.4/DISCLAIMER.bmc-watchdog0000644002055400205540000000254013527331634017157 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmipower0000644002055400205540000000254013527331634016633 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmiping0000644002055400205540000000254013527331634016434 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmiconsole0000644002055400205540000000254013527331634017141 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmimonitoring0000644002055400205540000000254013527331634017664 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.pstdout0000644002055400205540000000254013527331634016322 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmidetect0000644002055400205540000000254013527331634016747 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmi-fru0000644002055400205540000000254013527331634016350 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmi-dcmi0000644002055400205540000000254013527331634016470 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmiseld0000644002055400205540000000254013527331634016426 0ustar00achuachu00000000000000This work was produced at the Lawrence Livermore National Laboratory (LLNL) under Contract No. DE-AC52-07NA27344 (Contract 44) between the U.S. Department of Energy (DOE) and Lawrence Livermore National Security, LLC (LLNS) for the operation of LLNL. This work was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor Lawrence Livermore National Security, LLC nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or Lawrence Livermore National Security, LLC. The views and opinions of authors expressed herein do not necessarily state or reflect those of the Untied States Government or Lawrence Livermore National Security, LLC, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution, and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.bmc-watchdog.UC0000644002055400205540000000430313527331634017464 0ustar00achuachu00000000000000Copyright (C) 2004-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-155913 This file is part of Bmc-watchdog, a base management controller (BMC) watchdog timer management tool. For details, see http://www.llnl.gov/linux/. Bmc-Watchdog is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Bmc-Watchdog is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Bmc-Watchdog; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmipower.UC0000644002055400205540000000422413527331634017142 0ustar00achuachu00000000000000Copyright (C) 2003-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-155698 This file is part of Ipmipower, a remote power control utility. For details, see http://www.llnl.gov/linux/. Ipmipower is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmipower is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmipower; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmiping.UC0000644002055400205540000000425213527331634016744 0ustar00achuachu00000000000000Copyright (C) 2003-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-155448 This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant remote systems. For details, see http://www.llnl.gov/linux/. Ipmiping is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmiping is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmiping; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmiconsole.UC0000644002055400205540000000425313527331634017452 0ustar00achuachu00000000000000Copyright (C) 2006-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-221226 This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries and utilities. For details, see http://www.llnl.gov/linux/. Ipmiconsole is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmiconsole is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmiconsole; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmimonitoring.UC0000644002055400205540000000425213527331634020174 0ustar00achuachu00000000000000Copyright (C) 2006-2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-222073 This file is part of Ipmimonitoring, an IPMI sensor monitoring library. For details, see http://www.llnl.gov/linux/. Ipmimonitoring is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmimonitoring is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmimonitoring; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.pstdout.UC0000644002055400205540000000426413527331634016635 0ustar00achuachu00000000000000Copyright (C) 2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-227589 This file is part of pstdout, a library used to launch and manage the standard output of multiple threads. For details, see http://www.llnl.gov/linux/. Pstdout is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Pstdout is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Pstdout; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmidetect.UC0000644002055400205540000000425513527331634017262 0ustar00achuachu00000000000000Copyright (C) 2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-228523 This file is part of Ipmidetect, tools and libraries for detecting IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. Ipmidetect is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmidetect is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmidetect; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/DISCLAIMER.ipmi-fru.UC0000644002055400205540000000427313527331634016663 0ustar00achuachu00000000000000Copyright (C) 2007 The Regents of the University of California. Produced at Lawrence Livermore National Laboratory. Written by Albert Chu UCRL-CODE-232183 This file is part of Ipmi-fru, a tool used for retrieving motherboard field replaceable unit (FRU) information. For details, see http://www.llnl.gov/linux/. Ipmi-fru is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. Ipmi-fru is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with Ipmi-fru; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. This notice is required to be provided under our contract with the U.S. Department of Energy (DOE). This work was produced at the University of California, Lawrence Livermore National Laboratory under Contract No. W-7405-ENG-48 with the DOE. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately-owned rights. Also, reference herein to any specific commercial products, process, or services by trade name, trademark, manufacturer or otherwise does not necessarily constitute or imply its endorsement, recommendation, or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. The precise terms and conditions for copying, distribution and modification are specified in the file "COPYING". freeipmi-1.6.4/freeipmi.spec0000644002055400205540000004465113527342460015746 0ustar00achuachu00000000000000# # Copyright (c) 2003-2010 FreeIPMI Core Team # %define name freeipmi %define version 1.6.4 %if %{?_with_debug:1}%{!?_with_debug:0} %define release 1.debug%{?dist} %else %define release 1%{?dist} %endif Name: %{name} Version: %{version} Release: %{release} License: GPLv2+ Group: Applications/System URL: http://www.gnu.org/software/freeipmi/ Source: ftp://ftp.gnu.org/gnu/freeipmi/%{name}-%{version}.tar.gz BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: libgcrypt-devel texinfo %if %{?_with_systemd:1}%{!?_with_systemd:0} BuildRequires: systemd %endif Requires(post): info Requires(preun): info Obsoletes: freeipmi-ipmimonitoring Summary: FreeIPMI %description The FreeIPMI project provides "Remote-Console" (out-of-band) and "System Management Software" (in-band) based on Intelligent Platform Management Interface specification. %package devel Summary: Development package for FreeIPMI Group: Development/System Requires: freeipmi = %{version}-%{release} %description devel Development package for FreeIPMI. This package includes the FreeIPMI header files and static libraries. %package bmc-watchdog Summary: FreeIPMI BMC watchdog Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description bmc-watchdog Provides a watchdog daemon for OS monitoring and recovery. %package ipmidetectd Summary: IPMI node detection monitoring daemon Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description ipmidetectd IPMI node detection daemon. Regularly IPMI-pings remote nodes to provide data for a number of IPMI detection tools and features. %package ipmiseld Summary: IPMI SEL syslog logging daemon Group: Applications/System Requires: freeipmi = %{version}-%{release} Requires(post): /sbin/chkconfig Requires(preun): /sbin/chkconfig %description ipmiseld IPMI SEL syslog logging daemon. %if %{?_with_debug:1}%{!?_with_debug:0} %define _enable_debug --enable-debug --enable-trace %endif %if %{?_with_systemd:1}%{!?_with_systemd:0} %define _with_systemdsystemunitdir --with-systemdsystemunitdir=%{_unitdir} %endif %prep %setup -q %build %configure --program-prefix=%{?_program_prefix:%{_program_prefix}} \ %{?_with_systemdsystemunitdir} \ %{?_enable_debug} --disable-static CFLAGS="$RPM_OPT_FLAGS" make %{?_smp_mflags} %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT DESTDIR="$RPM_BUILD_ROOT" make install %if %{?_with_systemd:0}%{!?_with_systemd:1} # fix coherance problems with associated script filenames mkdir -p $RPM_BUILD_ROOT/%{_initrddir}/ # if check needed for SLES systems if [[ "%{_sysconfdir}/init.d" != "%{_initrddir}" ]] then mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/bmc-watchdog $RPM_BUILD_ROOT/%{_initrddir}/bmc-watchdog mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ipmidetectd $RPM_BUILD_ROOT/%{_initrddir}/ipmidetectd mv $RPM_BUILD_ROOT/%{_sysconfdir}/init.d/ipmiseld $RPM_BUILD_ROOT/%{_initrddir}/ipmiseld fi %endif rm -f %{buildroot}%{_infodir}/dir # kludge to get around rpmlint complaining about 0 length semephore file echo freeipmi > %{buildroot}%{_localstatedir}/lib/freeipmi/ipckey # Remove .la files rm -rf $RPM_BUILD_ROOT/%{_libdir}/*.la %clean rm -rf $RPM_BUILD_ROOT %post if [ -x /sbin/install-info ]; then #/sbin/install-info %{_infodir}/freeipmi.info.gz %{_infodir}/dir /sbin/install-info %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir fi /sbin/ldconfig %preun if [ $1 = 0 ]; then if [ -x /sbin/install-info ]; then #/sbin/install-info --delete %{_infodir}/freeipmi.info.gz %{_infodir}/dir /sbin/install-info --delete %{_infodir}/freeipmi-faq.info.gz %{_infodir}/dir fi fi %postun -p /sbin/ldconfig %post bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post bmc-watchdog.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then /sbin/chkconfig --add bmc-watchdog /sbin/chkconfig bmc-watchdog off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then if %{_initrddir}/bmc-watchdog status | grep -q running; then %{_initrddir}/bmc-watchdog restart else %{_initrddir}/bmc-watchdog condrestart fi fi fi %endif %preun bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun bmc-watchdog.service %else # # Stop bmc-watchdog if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/bmc-watchdog ]; then if %{_initrddir}/bmc-watchdog status | grep -q running; then %{_initrddir}/bmc-watchdog stop fi /sbin/chkconfig --del bmc-watchdog fi fi %endif %postun bmc-watchdog %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart bmc-watchdog.service %endif %post ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post ipmidetectd.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then /sbin/chkconfig --add ipmidetectd /sbin/chkconfig ipmidetectd off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then if %{_initrddir}/ipmidetectd status | grep -q running; then %{_initrddir}/ipmidetectd restart else %{_initrddir}/ipmidetectd condrestart fi fi fi %endif %preun ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun ipmidetectd.service %else # # Stop ipmidetectd if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/ipmidetectd ]; then if %{_initrddir}/ipmidetectd status | grep -q running; then %{_initrddir}/ipmidetectd stop fi /sbin/chkconfig --del ipmidetectd fi fi %endif %postun ipmidetectd %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart ipmidetectd.service %endif %post ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_post ipmiseld.service %else if [ "$1" = 1 ]; then if [ -x %{_initrddir}/ipmiseld ]; then /sbin/chkconfig --add ipmiseld /sbin/chkconfig ipmiseld off fi fi if [ $1 -ge 1 ]; then if [ -x %{_initrddir}/ipmiseld ]; then if %{_initrddir}/ipmiseld status | grep -q running; then %{_initrddir}/ipmiseld restart else %{_initrddir}/ipmiseld condrestart fi fi fi %endif %preun ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_preun ipmiseld.service %else # # Stop ipmiseld if it is running # if [ "$1" = 0 ]; then if [ -x %{_initrddir}/ipmiseld ]; then if %{_initrddir}/ipmiseld status | grep -q running; then %{_initrddir}/ipmiseld stop fi /sbin/chkconfig --del ipmiseld fi fi %endif %postun ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %systemd_postun_with_restart ipmiseld.service %endif %files %defattr(-,root,root) %dir %{_sysconfdir}/freeipmi/ %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi_interpret_sel.conf %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/freeipmi_interpret_sensor.conf %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetect.conf %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/libipmiconsole.conf %doc %{_infodir}/* %dir %{_datadir}/doc/%{name} %doc %{_datadir}/doc/%{name}/AUTHORS %doc %{_datadir}/doc/%{name}/COPYING %doc %{_datadir}/doc/%{name}/ChangeLog %doc %{_datadir}/doc/%{name}/ChangeLog.0 %doc %{_datadir}/doc/%{name}/INSTALL %doc %{_datadir}/doc/%{name}/NEWS %doc %{_datadir}/doc/%{name}/README %doc %{_datadir}/doc/%{name}/README.argp %doc %{_datadir}/doc/%{name}/README.build %doc %{_datadir}/doc/%{name}/README.openipmi %doc %{_datadir}/doc/%{name}/TODO %doc %{_datadir}/doc/%{name}/COPYING.ipmiping %doc %{_datadir}/doc/%{name}/COPYING.ipmipower %doc %{_datadir}/doc/%{name}/COPYING.ipmiconsole %doc %{_datadir}/doc/%{name}/COPYING.ipmimonitoring %doc %{_datadir}/doc/%{name}/COPYING.pstdout %doc %{_datadir}/doc/%{name}/COPYING.ipmidetect %doc %{_datadir}/doc/%{name}/COPYING.ipmi-fru %doc %{_datadir}/doc/%{name}/COPYING.ipmi-dcmi %doc %{_datadir}/doc/%{name}/COPYING.sunbmc %doc %{_datadir}/doc/%{name}/COPYING.ZRESEARCH %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiping %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmipower %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiconsole %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmimonitoring %doc %{_datadir}/doc/%{name}/DISCLAIMER.pstdout %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmidetect %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-fru %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-dcmi %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiping.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmipower.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiconsole.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmimonitoring.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.pstdout.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmidetect.UC %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmi-fru.UC %doc %{_datadir}/doc/%{name}/freeipmi-coding.txt %doc %{_datadir}/doc/%{name}/freeipmi-design.txt %doc %{_datadir}/doc/%{name}/freeipmi-hostrange.txt %doc %{_datadir}/doc/%{name}/freeipmi-libraries.txt %doc %{_datadir}/doc/%{name}/freeipmi-bugs-issues-and-workarounds.txt %doc %{_datadir}/doc/%{name}/freeipmi-testing.txt %doc %{_datadir}/doc/%{name}/freeipmi-oem-documentation-requirements.txt %dir %{_datadir}/doc/%{name}/contrib %dir %{_datadir}/doc/%{name}/contrib/ganglia %doc %{_datadir}/doc/%{name}/contrib/ganglia/* %dir %{_datadir}/doc/%{name}/contrib/nagios %doc %{_datadir}/doc/%{name}/contrib/nagios/* %dir %{_datadir}/doc/%{name}/contrib/pet %doc %{_datadir}/doc/%{name}/contrib/pet/* %{_libdir}/libipmiconsole*so.* %{_libdir}/libfreeipmi*so.* %{_libdir}/libipmidetect*so.* %{_libdir}/libipmimonitoring.so.* %{_libdir}/pkgconfig/* %{_localstatedir}/lib/* %{_sbindir}/bmc-config %{_sbindir}/bmc-info %{_sbindir}/bmc-device %{_sbindir}/ipmi-config %{_sbindir}/ipmi-fru %{_sbindir}/ipmi-locate %{_sbindir}/ipmi-oem %{_sbindir}/ipmi-pef-config %{_sbindir}/pef-config %{_sbindir}/ipmi-raw %{_sbindir}/ipmi-sel %{_sbindir}/ipmi-sensors %{_sbindir}/ipmi-sensors-config %{_sbindir}/ipmiping %{_sbindir}/ipmi-ping %{_sbindir}/ipmipower %{_sbindir}/ipmi-power %{_sbindir}/rmcpping %{_sbindir}/rmcp-ping %{_sbindir}/ipmiconsole %{_sbindir}/ipmi-console %{_sbindir}/ipmimonitoring %{_sbindir}/ipmi-chassis %{_sbindir}/ipmi-chassis-config %{_sbindir}/ipmi-dcmi %{_sbindir}/ipmi-pet %{_sbindir}/ipmidetect %{_sbindir}/ipmi-detect %{_mandir}/man8/bmc-config.8* %{_mandir}/man5/bmc-config.conf.5* %{_mandir}/man8/bmc-info.8* %{_mandir}/man8/bmc-device.8* %{_mandir}/man8/ipmi-config.8* %{_mandir}/man5/ipmi-config.conf.5* %{_mandir}/man8/ipmi-fru.8* %{_mandir}/man8/ipmi-locate.8* %{_mandir}/man8/ipmi-oem.8* %{_mandir}/man8/ipmi-pef-config.8* %{_mandir}/man8/pef-config.8* %{_mandir}/man8/ipmi-raw.8* %{_mandir}/man8/ipmi-sel.8* %{_mandir}/man8/ipmi-sensors.8* %{_mandir}/man8/ipmi-sensors-config.8* %{_mandir}/man8/ipmiping.8* %{_mandir}/man8/ipmi-ping.8* %{_mandir}/man8/ipmipower.8* %{_mandir}/man8/ipmi-power.8* %{_mandir}/man5/ipmipower.conf.5* %{_mandir}/man8/rmcpping.8* %{_mandir}/man8/rmcp-ping.8* %{_mandir}/man8/ipmiconsole.8* %{_mandir}/man8/ipmi-console.8* %{_mandir}/man5/ipmiconsole.conf.5* %{_mandir}/man8/ipmimonitoring.8* %{_mandir}/man5/ipmi_monitoring_sensors.conf.5* %{_mandir}/man5/ipmimonitoring_sensors.conf.5* %{_mandir}/man5/ipmimonitoring.conf.5* %{_mandir}/man5/libipmimonitoring.conf.5* %{_mandir}/man5/freeipmi_interpret_sel.conf.5* %{_mandir}/man5/freeipmi_interpret_sensor.conf.5* %{_mandir}/man8/ipmi-chassis.8* %{_mandir}/man8/ipmi-chassis-config.8* %{_mandir}/man8/ipmi-dcmi.8* %{_mandir}/man8/ipmi-pet.8* %{_mandir}/man8/ipmidetect.8* %{_mandir}/man8/ipmi-detect.8* %{_mandir}/man5/freeipmi.conf.5* %{_mandir}/man5/ipmidetect.conf.5* %{_mandir}/man7/freeipmi.7* %{_mandir}/man5/libipmiconsole.conf.5* %dir %{_localstatedir}/cache/ipmimonitoringsdrcache %files devel %defattr(-,root,root) %dir %{_datadir}/doc/%{name}/contrib/libipmimonitoring %doc %{_datadir}/doc/%{name}/contrib/libipmimonitoring/* %{_libdir}/libipmiconsole.so %{_libdir}/libfreeipmi.so %{_libdir}/libipmidetect.so %{_libdir}/libipmimonitoring.so %dir %{_includedir}/freeipmi %dir %{_includedir}/freeipmi/api %dir %{_includedir}/freeipmi/cmds %dir %{_includedir}/freeipmi/debug %dir %{_includedir}/freeipmi/driver %dir %{_includedir}/freeipmi/fiid %dir %{_includedir}/freeipmi/fru %dir %{_includedir}/freeipmi/interface %dir %{_includedir}/freeipmi/interpret %dir %{_includedir}/freeipmi/locate %dir %{_includedir}/freeipmi/payload %dir %{_includedir}/freeipmi/record-format %dir %{_includedir}/freeipmi/record-format/oem %dir %{_includedir}/freeipmi/sdr %dir %{_includedir}/freeipmi/sdr/oem %dir %{_includedir}/freeipmi/sel %dir %{_includedir}/freeipmi/sensor-read %dir %{_includedir}/freeipmi/spec %dir %{_includedir}/freeipmi/spec/oem %dir %{_includedir}/freeipmi/templates %dir %{_includedir}/freeipmi/templates/oem %dir %{_includedir}/freeipmi/util %{_includedir}/ipmiconsole.h %{_includedir}/ipmidetect.h %{_includedir}/ipmi_monitoring*.h %{_includedir}/freeipmi/*.h %{_includedir}/freeipmi/api/*.h %{_includedir}/freeipmi/cmds/*.h %{_includedir}/freeipmi/debug/*.h %{_includedir}/freeipmi/driver/*.h %{_includedir}/freeipmi/fiid/*.h %{_includedir}/freeipmi/fru/*.h %{_includedir}/freeipmi/interface/*.h %{_includedir}/freeipmi/interpret/*.h %{_includedir}/freeipmi/locate/*.h %{_includedir}/freeipmi/payload/*.h %{_includedir}/freeipmi/record-format/*.h %{_includedir}/freeipmi/record-format/oem/*.h %{_includedir}/freeipmi/sdr/*.h %{_includedir}/freeipmi/sdr/oem/*.h %{_includedir}/freeipmi/sel/*.h %{_includedir}/freeipmi/sensor-read/*.h %{_includedir}/freeipmi/spec/*.h %{_includedir}/freeipmi/spec/oem/*.h %{_includedir}/freeipmi/templates/*.h %{_includedir}/freeipmi/templates/oem/*.h %{_includedir}/freeipmi/util/*.h %{_mandir}/man3/* %files bmc-watchdog %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/COPYING.bmc-watchdog %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog %doc %{_datadir}/doc/%{name}/DISCLAIMER.bmc-watchdog.UC %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/bmc-watchdog.service %else %config(noreplace) %{_initrddir}/bmc-watchdog %endif %config(noreplace) %{_sysconfdir}/sysconfig/bmc-watchdog %{_sbindir}/bmc-watchdog %{_mandir}/man8/bmc-watchdog.8* %files ipmidetectd %defattr(-,root,root) %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/ipmidetectd.service %else %config(noreplace) %{_initrddir}/ipmidetectd %endif %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmidetectd.conf %{_sbindir}/ipmidetectd %{_mandir}/man5/ipmidetectd.conf.5* %{_mandir}/man8/ipmidetectd.8* %files ipmiseld %defattr(-,root,root) %doc %{_datadir}/doc/%{name}/COPYING.ipmiseld %doc %{_datadir}/doc/%{name}/DISCLAIMER.ipmiseld %if %{?_with_systemd:1}%{!?_with_systemd:0} %{_unitdir}/ipmiseld.service %else %config(noreplace) %{_initrddir}/ipmiseld %endif %attr(0600,root,root) %config(noreplace) %{_sysconfdir}/freeipmi/ipmiseld.conf %{_sbindir}/ipmiseld %{_mandir}/man5/ipmiseld.conf.5* %{_mandir}/man8/ipmiseld.8* %dir %{_localstatedir}/cache/ipmiseld %changelog * Wed Nov 4 2015 Albert Chu 1.5.0 - Add systemd support. * Tue Oct 27 2015 Albert Chu 1.5.0 - Add new oem headers. * Mon Aug 26 2013 Albert Chu 1.4.1 - Add ipmi-config tool and manpage * Tue Jul 10 2012 Albert Chu 1.2.1 - Add ipmiseld daemon and subpackage. - Update paths for libfreeipmi changes. * Mon May 3 2012 Albert Chu 1.2.1 - Remove bmc-watchdog logrotate file. * Mon Dec 12 2011 Albert Chu 1.1.1 - Add contrib and ipmi-pet files. - Make main package own logdir. * Wed Jun 29 2011 Albert Chu 1.0.4 - Add pkgconfig files. * Fri Nov 5 2010 Albert Chu 0.9.0 - Add interpret sub-library. - Support new config files. - Support /etc/freeipmi/ config dir. - Support new ipmi_monitoring*.h files. - Support new manpages. - Support new compatability symlinks/manpages. * Wed Sep 30 2009 Albert Chu 0.8.0 - Update for dcmi. - Update for renaming of pef-config. - Update for new .h files. - Add new ipmimonitoring config manpages. - Add ipmidetectd.conf * Tue Sep 29 2008 Albert Chu 0.7.0 - Add README.build * Tue Aug 12 2008 Albert Chu 0.7.0 - Add README.sunbmc * Mon Aug 04 2008 Albert Chu 0.7.0 - Add ipmi-chassis-config. * Thu Jul 10 2008 Albert Chu 0.7.0 - Add freeipmi.conf default file. - Make 0644 perms default for config files. * Sat May 21 2008 Albert Chu 0.7.0 - Add freeipmi.conf.5. * Sat May 3 2008 Albert Chu 0.7.0 - Add bmc-device. * Mon Apr 7 2008 Albert Chu 0.6.0 - Add freeipmi.7 and libfreeipmi.3 manpage. * Wed Apr 2 2008 Albert Chu 0.6.0 - Add freeipmi-bugs-and-workarounds.txt. * Tue Mar 27 2008 Albert Chu 0.6.0 - Add ipmi-oem tool and manpage. * Mon Feb 18 2008 Albert Chu 0.6.0 - Add ipmi-sensors-config tool and manpage. * Wed Jan 9 2008 Albert Chu 0.6.0 - Obsolete old subpackage freeipmi-ipmimonitoring. * Tue Dec 18 2007 Albert Chu 0.6.0 - Use %{version} instead of 1.6.4 for substitution in paths. * Fri Dec 14 2007 Albert Chu 0.6.0 - Update packaging for libfreeipmi reorganization * Wed Nov 19 2007 Albert Chu 0.5.0 - Remove ipmimonitoring subpackage. Merge into head package. * Wed Nov 19 2007 Phil Knirsch 0.5.0 - More fixes for Fedora Review: o Added ExclusiveArch due to missing lopl (#368541) - Several fixes due to Fedora package review: o Fixed Group for all subpackages o Added missng Requires(Post|Preun) for several packages o Removed static libraries and .la files o Fixed open bug (missing mode for O_CREATE) o Fixed incorrect options for bmc-watchdog daemon - Specfile cleanup for Fedora inclusion - Fixed several rpmlint warnings and errors: o Moved all devel libs to proper package * Wed Aug 01 2007 Troy Telford 0.4.0 - Some package cleanup so it builds on SLES * Wed Jun 13 2007 Phil Knirsch 0.4.beta0-1 - Some package cleanup and split of configuration and initscript * Fri Feb 28 2007 Albert Chu 0.4.beta0-1 - Add ipmidetectd subpackage. * Fri Feb 16 2007 Albert Chu 0.4.beta0-1 - Add ipmimonitoring subpackage. * Sun Jul 30 2006 Albert Chu 0.3.beta0-1 - Re-architect for 0.3.X * Mon May 15 2006 Albert Chu 0.3.beta0-1 - Fixed up spec file to pass rpmlint freeipmi-1.6.4/doc/0000755002055400205540000000000013527342540014024 5ustar00achuachu00000000000000freeipmi-1.6.4/doc/Makefile.in0000644002055400205540000007133313527342444016103 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = doc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/mdate-sh $(srcdir)/version-faq.texi \ $(srcdir)/stamp-vti $(top_srcdir)/config/texinfo.tex ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = AM_V_DVIPS = $(am__v_DVIPS_@AM_V@) am__v_DVIPS_ = $(am__v_DVIPS_@AM_DEFAULT_V@) am__v_DVIPS_0 = @echo " DVIPS " $@; am__v_DVIPS_1 = AM_V_MAKEINFO = $(am__v_MAKEINFO_@AM_V@) am__v_MAKEINFO_ = $(am__v_MAKEINFO_@AM_DEFAULT_V@) am__v_MAKEINFO_0 = @echo " MAKEINFO" $@; am__v_MAKEINFO_1 = AM_V_INFOHTML = $(am__v_INFOHTML_@AM_V@) am__v_INFOHTML_ = $(am__v_INFOHTML_@AM_DEFAULT_V@) am__v_INFOHTML_0 = @echo " INFOHTML" $@; am__v_INFOHTML_1 = AM_V_TEXI2DVI = $(am__v_TEXI2DVI_@AM_V@) am__v_TEXI2DVI_ = $(am__v_TEXI2DVI_@AM_DEFAULT_V@) am__v_TEXI2DVI_0 = @echo " TEXI2DVI" $@; am__v_TEXI2DVI_1 = AM_V_TEXI2PDF = $(am__v_TEXI2PDF_@AM_V@) am__v_TEXI2PDF_ = $(am__v_TEXI2PDF_@AM_DEFAULT_V@) am__v_TEXI2PDF_0 = @echo " TEXI2PDF" $@; am__v_TEXI2PDF_1 = AM_V_texinfo = $(am__v_texinfo_@AM_V@) am__v_texinfo_ = $(am__v_texinfo_@AM_DEFAULT_V@) am__v_texinfo_0 = -q am__v_texinfo_1 = AM_V_texidevnull = $(am__v_texidevnull_@AM_V@) am__v_texidevnull_ = $(am__v_texidevnull_@AM_DEFAULT_V@) am__v_texidevnull_0 = > /dev/null am__v_texidevnull_1 = INFO_DEPS = $(srcdir)/freeipmi-faq.info TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex am__TEXINFO_TEX_DIR = $(top_srcdir)/config DVIS = freeipmi-faq.dvi PDFS = freeipmi-faq.pdf PSS = freeipmi-faq.ps HTMLS = freeipmi-faq.html TEXINFOS = freeipmi-faq.texi TEXI2DVI = texi2dvi TEXI2PDF = $(TEXI2DVI) --pdf --batch MAKEINFOHTML = $(MAKEINFO) --html AM_MAKEINFOHTMLFLAGS = $(AM_MAKEINFOFLAGS) DVIPS = dvips am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__installdirs = "$(DESTDIR)$(infodir)" "$(DESTDIR)$(docdir)" am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } DATA = $(doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ # build and install the .info pages info_TEXINFOS = freeipmi-faq.texi CLEANFILES = *~ DISTCLEANFILES = .deps/*.P EXTRA_DIST = \ freeipmi-coding.txt \ freeipmi-design.txt \ freeipmi-hostrange.txt \ freeipmi-libraries.txt \ freeipmi-testing.txt \ freeipmi-bugs-issues-and-workarounds.txt \ freeipmi-oem-documentation-requirements.txt doc_DATA = $(EXTRA_DIST) all: all-am .SUFFIXES: .SUFFIXES: .dvi .html .info .pdf .ps .texi $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu doc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu doc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs .texi.info: $(AM_V_MAKEINFO)restore=: && backupdir="$(am__leading_dot)am$$$$" && \ am__cwd=`pwd` && $(am__cd) $(srcdir) && \ rm -rf $$backupdir && mkdir $$backupdir && \ if ($(MAKEINFO) --version) >/dev/null 2>&1; then \ for f in $@ $@-[0-9] $@-[0-9][0-9] $(@:.info=).i[0-9] $(@:.info=).i[0-9][0-9]; do \ if test -f $$f; then mv $$f $$backupdir; restore=mv; else :; fi; \ done; \ else :; fi && \ cd "$$am__cwd"; \ if $(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $@ $<; \ then \ rc=0; \ $(am__cd) $(srcdir); \ else \ rc=$$?; \ $(am__cd) $(srcdir) && \ $$restore $$backupdir/* `echo "./$@" | sed 's|[^/]*$$||'`; \ fi; \ rm -rf $$backupdir; exit $$rc .texi.dvi: $(AM_V_TEXI2DVI)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2DVI) $(AM_V_texinfo) --build-dir=$(@:.dvi=.t2d) -o $@ $(AM_V_texidevnull) \ $< .texi.pdf: $(AM_V_TEXI2PDF)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ MAKEINFO='$(MAKEINFO) $(AM_MAKEINFOFLAGS) $(MAKEINFOFLAGS) -I $(srcdir)' \ $(TEXI2PDF) $(AM_V_texinfo) --build-dir=$(@:.pdf=.t2p) -o $@ $(AM_V_texidevnull) \ $< .texi.html: $(AM_V_MAKEINFO)rm -rf $(@:.html=.htp) $(AM_V_at)if $(MAKEINFOHTML) $(AM_MAKEINFOHTMLFLAGS) $(MAKEINFOFLAGS) -I $(srcdir) \ -o $(@:.html=.htp) $<; \ then \ rm -rf $@; \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ mv $(@:.html=) $@; else mv $(@:.html=.htp) $@; fi; \ else \ if test ! -d $(@:.html=.htp) && test -d $(@:.html=); then \ rm -rf $(@:.html=); else rm -Rf $(@:.html=.htp) $@; fi; \ exit 1; \ fi $(srcdir)/freeipmi-faq.info: freeipmi-faq.texi $(srcdir)/version-faq.texi freeipmi-faq.dvi: freeipmi-faq.texi $(srcdir)/version-faq.texi freeipmi-faq.pdf: freeipmi-faq.texi $(srcdir)/version-faq.texi freeipmi-faq.html: freeipmi-faq.texi $(srcdir)/version-faq.texi $(srcdir)/version-faq.texi: $(srcdir)/stamp-vti $(srcdir)/stamp-vti: freeipmi-faq.texi $(top_srcdir)/configure @(dir=.; test -f ./freeipmi-faq.texi || dir=$(srcdir); \ set `$(SHELL) $(top_srcdir)/config/mdate-sh $$dir/freeipmi-faq.texi`; \ echo "@set UPDATED $$1 $$2 $$3"; \ echo "@set UPDATED-MONTH $$2 $$3"; \ echo "@set EDITION $(VERSION)"; \ echo "@set VERSION $(VERSION)") > vti.tmp @cmp -s vti.tmp $(srcdir)/version-faq.texi \ || (echo "Updating $(srcdir)/version-faq.texi"; \ cp vti.tmp $(srcdir)/version-faq.texi) -@rm -f vti.tmp @cp $(srcdir)/version-faq.texi $@ mostlyclean-vti: -rm -f vti.tmp maintainer-clean-vti: -rm -f $(srcdir)/stamp-vti $(srcdir)/version-faq.texi .dvi.ps: $(AM_V_DVIPS)TEXINPUTS="$(am__TEXINFO_TEX_DIR)$(PATH_SEPARATOR)$$TEXINPUTS" \ $(DVIPS) $(AM_V_texinfo) -o $@ $< uninstall-dvi-am: @$(NORMAL_UNINSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(dvidir)/$$f'"; \ rm -f "$(DESTDIR)$(dvidir)/$$f"; \ done uninstall-html-am: @$(NORMAL_UNINSTALL) @list='$(HTMLS)'; test -n "$(htmldir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -rf '$(DESTDIR)$(htmldir)/$$f'"; \ rm -rf "$(DESTDIR)$(htmldir)/$$f"; \ done uninstall-info-am: @$(PRE_UNINSTALL) @if test -d '$(DESTDIR)$(infodir)' && $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' --remove '$(DESTDIR)$(infodir)/$$relfile'"; \ if install-info --info-dir="$(DESTDIR)$(infodir)" --remove "$(DESTDIR)$(infodir)/$$relfile"; \ then :; else test ! -f "$(DESTDIR)$(infodir)/$$relfile" || exit 1; fi; \ done; \ else :; fi @$(NORMAL_UNINSTALL) @list='$(INFO_DEPS)'; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ relfile_i=`echo "$$relfile" | sed 's|\.info$$||;s|$$|.i|'`; \ (if test -d "$(DESTDIR)$(infodir)" && cd "$(DESTDIR)$(infodir)"; then \ echo " cd '$(DESTDIR)$(infodir)' && rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]"; \ rm -f $$relfile $$relfile-[0-9] $$relfile-[0-9][0-9] $$relfile_i[0-9] $$relfile_i[0-9][0-9]; \ else :; fi); \ done uninstall-pdf-am: @$(NORMAL_UNINSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(pdfdir)/$$f'"; \ rm -f "$(DESTDIR)$(pdfdir)/$$f"; \ done uninstall-ps-am: @$(NORMAL_UNINSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " rm -f '$(DESTDIR)$(psdir)/$$f'"; \ rm -f "$(DESTDIR)$(psdir)/$$f"; \ done dist-info: $(INFO_DEPS) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; \ for base in $$list; do \ case $$base in \ $(srcdir)/*) base=`echo "$$base" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$base; then d=.; else d=$(srcdir); fi; \ base_i=`echo "$$base" | sed 's|\.info$$||;s|$$|.i|'`; \ for file in $$d/$$base $$d/$$base-[0-9] $$d/$$base-[0-9][0-9] $$d/$$base_i[0-9] $$d/$$base_i[0-9][0-9]; do \ if test -f $$file; then \ relfile=`expr "$$file" : "$$d/\(.*\)"`; \ test -f "$(distdir)/$$relfile" || \ cp -p $$file "$(distdir)/$$relfile"; \ else :; fi; \ done; \ done mostlyclean-aminfo: -rm -rf freeipmi-faq.t2d freeipmi-faq.t2p clean-aminfo: -test -z "freeipmi-faq.dvi freeipmi-faq.pdf freeipmi-faq.ps freeipmi-faq.html" \ || rm -rf freeipmi-faq.dvi freeipmi-faq.pdf freeipmi-faq.ps freeipmi-faq.html maintainer-clean-aminfo: @list='$(INFO_DEPS)'; for i in $$list; do \ i_i=`echo "$$i" | sed 's|\.info$$||;s|$$|.i|'`; \ echo " rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]"; \ rm -f $$i $$i-[0-9] $$i-[0-9][0-9] $$i_i[0-9] $$i_i[0-9][0-9]; \ done install-docDATA: $(doc_DATA) @$(NORMAL_INSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \ done uninstall-docDATA: @$(NORMAL_UNINSTALL) @list='$(doc_DATA)'; test -n "$(docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(docdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$(top_distdir)" distdir="$(distdir)" \ dist-info check-am: all-am check: check-am all-am: Makefile $(INFO_DEPS) $(DATA) installdirs: for dir in "$(DESTDIR)$(infodir)" "$(DESTDIR)$(docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-aminfo clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: $(DVIS) html: html-am html-am: $(HTMLS) info: info-am info-am: $(INFO_DEPS) install-data-am: install-docDATA install-info-am install-dvi: install-dvi-am install-dvi-am: $(DVIS) @$(NORMAL_INSTALL) @list='$(DVIS)'; test -n "$(dvidir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(dvidir)'"; \ $(MKDIR_P) "$(DESTDIR)$(dvidir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(dvidir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(dvidir)" || exit $$?; \ done install-exec-am: install-html: install-html-am install-html-am: $(HTMLS) @$(NORMAL_INSTALL) @list='$(HTMLS)'; list2=; test -n "$(htmldir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p" || test -d "$$p"; then d=; else d="$(srcdir)/"; fi; \ $(am__strip_dir) \ d2=$$d$$p; \ if test -d "$$d2"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(htmldir)/$$f'"; \ $(MKDIR_P) "$(DESTDIR)$(htmldir)/$$f" || exit 1; \ echo " $(INSTALL_DATA) '$$d2'/* '$(DESTDIR)$(htmldir)/$$f'"; \ $(INSTALL_DATA) "$$d2"/* "$(DESTDIR)$(htmldir)/$$f" || exit $$?; \ else \ list2="$$list2 $$d2"; \ fi; \ done; \ test -z "$$list2" || { echo "$$list2" | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(htmldir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(htmldir)" || exit $$?; \ done; } install-info: install-info-am install-info-am: $(INFO_DEPS) @$(NORMAL_INSTALL) @srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(infodir)'"; \ $(MKDIR_P) "$(DESTDIR)$(infodir)" || exit 1; \ fi; \ for file in $$list; do \ case $$file in \ $(srcdir)/*) file=`echo "$$file" | sed "s|^$$srcdirstrip/||"`;; \ esac; \ if test -f $$file; then d=.; else d=$(srcdir); fi; \ file_i=`echo "$$file" | sed 's|\.info$$||;s|$$|.i|'`; \ for ifile in $$d/$$file $$d/$$file-[0-9] $$d/$$file-[0-9][0-9] \ $$d/$$file_i[0-9] $$d/$$file_i[0-9][0-9] ; do \ if test -f $$ifile; then \ echo "$$ifile"; \ else : ; fi; \ done; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(infodir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(infodir)" || exit $$?; done @$(POST_INSTALL) @if $(am__can_run_installinfo); then \ list='$(INFO_DEPS)'; test -n "$(infodir)" || list=; \ for file in $$list; do \ relfile=`echo "$$file" | sed 's|^.*/||'`; \ echo " install-info --info-dir='$(DESTDIR)$(infodir)' '$(DESTDIR)$(infodir)/$$relfile'";\ install-info --info-dir="$(DESTDIR)$(infodir)" "$(DESTDIR)$(infodir)/$$relfile" || :;\ done; \ else : ; fi install-man: install-pdf: install-pdf-am install-pdf-am: $(PDFS) @$(NORMAL_INSTALL) @list='$(PDFS)'; test -n "$(pdfdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pdfdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pdfdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pdfdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pdfdir)" || exit $$?; done install-ps: install-ps-am install-ps-am: $(PSS) @$(NORMAL_INSTALL) @list='$(PSS)'; test -n "$(psdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(psdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(psdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(psdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(psdir)" || exit $$?; done installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-aminfo \ maintainer-clean-generic maintainer-clean-vti mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-aminfo mostlyclean-generic \ mostlyclean-libtool mostlyclean-vti pdf: pdf-am pdf-am: $(PDFS) ps: ps-am ps-am: $(PSS) uninstall-am: uninstall-docDATA uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-pdf-am uninstall-ps-am .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-aminfo clean-generic \ clean-libtool cscopelist-am ctags-am dist-info distclean \ distclean-generic distclean-libtool distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-docDATA install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-aminfo maintainer-clean-generic \ maintainer-clean-vti mostlyclean mostlyclean-aminfo \ mostlyclean-generic mostlyclean-libtool mostlyclean-vti pdf \ pdf-am ps ps-am tags-am uninstall uninstall-am \ uninstall-docDATA uninstall-dvi-am uninstall-html-am \ uninstall-info-am uninstall-pdf-am uninstall-ps-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/doc/Makefile.am0000644002055400205540000000056413527331635016070 0ustar00achuachu00000000000000# build and install the .info pages info_TEXINFOS = freeipmi-faq.texi CLEANFILES = *~ DISTCLEANFILES = .deps/*.P EXTRA_DIST = \ freeipmi-coding.txt \ freeipmi-design.txt \ freeipmi-hostrange.txt \ freeipmi-libraries.txt \ freeipmi-testing.txt \ freeipmi-bugs-issues-and-workarounds.txt \ freeipmi-oem-documentation-requirements.txt doc_DATA = $(EXTRA_DIST) freeipmi-1.6.4/doc/version-faq.texi0000644002055400205540000000014113527342465017153 0ustar00achuachu00000000000000@set UPDATED 21 August 2019 @set UPDATED-MONTH August 2019 @set EDITION 1.6.4 @set VERSION 1.6.4 freeipmi-1.6.4/doc/stamp-vti0000644002055400205540000000014113527342465015675 0ustar00achuachu00000000000000@set UPDATED 21 August 2019 @set UPDATED-MONTH August 2019 @set EDITION 1.6.4 @set VERSION 1.6.4 freeipmi-1.6.4/doc/freeipmi-faq.texi0000644002055400205540000013207513527331635017277 0ustar00achuachu00000000000000\input texinfo @c -*-texinfo-*- @c This file uses the @command command introduced in Texinfo 4.0. @c %**start of header @setfilename freeipmi-faq.info @settitle FreeIPMI - Frequently Asked Questions @finalout @c %**end of header @include version-faq.texi @copying This manual is for FreeIPMI (version @value{VERSION}, @value{UPDATED}). Copyright @copyright{} 2006-2012 FreeIPMI Core Team @quotation Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. @end quotation @end copying @dircategory Platform Management @direntry * FreeIPMI FAQ: (freeipmi-faq). FreeIPMI - Frequently Asked Questions @end direntry @ifinfo Copyright @copyright{} 2003-2012 FreeIPMI Core Team. @end ifinfo @titlepage @title FreeIPMI Frequently Asked Questions @subtitle Free Intelligent Platform Management System @subtitle Version @value{VERSION} updated on @today{} @author by Albert Chu @email{chu11@@llnl.gov} @c @author by Anand Babu @email{ab@@gnu.org.in} @page @vskip 0pt plus 1filll Copyright @copyright{} 2003-2012 FreeIPMI Core Team @insertcopying @end titlepage @node Top, What is IPMI?, (dir), (dir) @ifinfo Frequently Asked Questions on @strong{FreeIPMI} This edition of the documentation was last updated on @today{} for release @value{VERSION} of the FreeIPMI. @end ifinfo @menu * What is IPMI?:: * What is FreeIPMI?:: * How did FreeIPMI start?:: * What operating systems does FreeIPMI run on?:: * FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil:: * What is special about FreeIPMI?:: * Does my system support IPMI?:: * How do I compile FreeIPMI?:: * libgcrypt requirement:: * x86-64 Compilation:: * Installing FreeIPMI on FreeBSD:: * What are some IPMI terminology or acronyms I should be aware of?:: * What setup is needed for FreeIPMI to communicate over LAN?:: * What setup is needed for Serial over LAN (SOL) or Ipmiconsole?:: * Do I need to install or configure a driver to perform IPMI inband?:: * SSIF Driver Configuration:: * How do you setup Powerman with ipmipower?:: * How do you setup Conman with ipmiconsole or libipmiconsole?:: * How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?:: * Why are times reported by FreeIPMI tools wrong?:: * Why is the IPMI kernel driver faster than the KCS driver?:: * Why is the output from FreeIPMI different than another software?:: * Why are there so many IPMI compliance bugs?:: * How do I get around an IPMI compliance bug on my motherboard?:: * Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?:: * How do I program with the FreeIPMI libraries?:: * Where can I get additional help or support?:: @end menu @c Output the table of contents at the beginning. @contents @node What is IPMI?, What is FreeIPMI?, Top, Top @section What is IPMI? The @acronym{IPMI} specifications define standardized, abstracted interfaces to the platform management subsystem. @acronym{IPMI} includes the definition of interfaces for extending platform management between the board within the main chassis and between multiple chassis. The term platform management is used to refer to the monitoring and control functions that are built in to the platform hardware and primarily used for the purpose of monitoring the health of the system hardware. This typically includes monitoring elements such as system temperatures, voltages, fans, power supplies, bus errors, system physical security, etc. It includes automatic and manually driven recovery capabilities such as local or remote system resets and power on/off operations. It includes the logging of abnormal or out-of-range conditions for later examination and alerting where the platform issues the alert without aid of run-time software. Lastly it includes inventory information that can help identify a failed hardware unit. @node What is FreeIPMI?, How did FreeIPMI start?, What is IPMI?, Top @section What is FreeIPMI? FreeIPMI is a collection of Intelligent Platform Management @acronym{IPMI} system software. It provides in-band and out-of-band software and a development library conforming to the Intelligent Platform Management Interface (@acronym{IPMI} v1.5 and v2.0) standards. FreeIPMI also supports @acronym{IPMI}-related specifications such as the Data Center Management Interface (@acronym{DCMI}) and Intel Node Manager. @node How did FreeIPMI start?, What operating systems does FreeIPMI run on?, What is FreeIPMI?, Top @section How did FreeIPMI start? In October 2003, California Digital Corp. (CDC) was contracted by Lawrence Livermore National Laboratory (@acronym{LLNL}) for the assembly of Thunder, a 1024 node Itanium2 cluster. This led to software developers from CDC and @acronym{LLNL} merging the @acronym{IPMI} software developed by both organizations into FreeIPMI. Anand Babu, Balamurugan and Ian Zimmerman at CDC contributed the in-band @acronym{KCS} driver, @command{ipmi-sensors}, @command{ipmi-sel}, @command{bmc-info}, core portions of @command{ipmi-config}, and portions of libfreeipmi. Albert Chu and Jim Garlick at @acronym{LLNL} contributed @command{ipmipower}, @command{bmc-watchdog}, @command{ipmiping}, @command{rmcpping}, portions of libfreeipmi, and @acronym{IPMI} support in Powerman. In October 2004, FreeIPMI 0.1.0 was officially released. Since the 0.1.0 release, Z Research developers have contributed @command{ipmi-chassis}, @command{ipmi-raw}, @command{ipmi-locate}, and PEF portions of @command{ipmi-config}. @acronym{LLNL} has contributed @acronym{IPMI} 2.0 support, hostrange support, @command{ipmiconsole}, libipmiconsole, @command{ipmidetect}, @command{bmc-device}, @command{ipmi-oem}, @command{ipmi-dcmi}, libipmimonitoring, and the chassis and sensor portions of @command{ipmi-config}. (Note: The original FreeIPMI developers from California Digital Corp. are now at Zresearch Inc.) @node What operating systems does FreeIPMI run on?, FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, How did FreeIPMI start?, Top @section What operating systems does FreeIPMI run on? FreeIPMI was originally developed on GNU/Linux. It has been confirmed to be built on most major GNU/Linux distributions such as Redhat, Fedora, Suse, and Debian. FreeIPMI has been ported and confirmed to work on atleast FreeBSD, OpenBSD, Solaris, OpenSolaris, and Windows via Cygwin. We imagine it would build cleanly on other operating systems. If it doesn't, it should be easily portable to them. Please contact the maintainers on the @email{freeipmi-devel@@gnu.org} mailing lists. @node FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, What is special about FreeIPMI?, What operating systems does FreeIPMI run on?, Top @section FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil There are multiple implementations, APIs, interfaces, end user requirements, etc. that one can choose when developing @acronym{IPMI} drivers, libraries, and tools. FreeIPMI has taken some different approaches than other open-source projects. The section below points out a number of the reasons why we feel FreeIPMI is particularly special compared to the other projects. The Ipmiutil project has a good chart describing many of the differences between the projects: @uref{http://ipmiutil.sourceforge.net/docs/ipmisw-compare.htm}. @node What is special about FreeIPMI?, Does my system support IPMI?, FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, Top @section What is special about FreeIPMI? In our eyes, there are several reasons why FreeIPMI is particularly special. @enumerate @item Support for HPC, clusters, and large data centers A number of features have been added into the tools to support HPC, clusters, and/or large data centers. Much of this original support was added to support the large cluster environments at Lawrence Livermore National Laboratory (@acronym{LLNL}). Scalable parallel execution of many FreeIPMI tools (@command{ipmi-sensors}, @command{ipmi-sel}, @command{bmc-info}, etc.) across a cluster is supported through hostranged input and output. For example: @example # > bmc-info -h "pwopr[0-5]" -u XXX -p XXX --get-device-id -C ---------------- pwopr[0-1,5] ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.0c Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h ---------------- pwopr[2-4] ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.17 Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h @end example In the above example, its clear to see that pwopr[2-4] have different firmware than pwopr[0-1,5]. More information about hostrange support can be found in the document @file{freeipmi-hostrange.txt} (@uref{http://www.gnu.org/software/freeipmi/freeipmi-hostrange.txt}). @command{Ipmipower} is capable of scaling to large nodes for cluster support and is supported by Powerman (@uref{https://github.com/chaos/powerman}) for scalable power management. At @acronym{LLNL}, in conjunction with Powerman, ipmipower is used for power control on clusters ranging from sizes of 4 to 2000. It has been used to determine power status or power control @acronym{LLNL}'s largest clusters in under a second. @command{libipmiconsole} is currently supported by Conman (@uref{https://github.com/dun/conman}) and Conserver (@uref{http://www.conserver.com/}) for scalable console management. @command{Ipmi-sensors} and libipmimonitoring are capable of interpreting sensor readings as well as just reporting them. It can be used for host monitoring @acronym{IPMI} sensor severity on a cluster. By mapping sensor readings into NOMINAL, WARNING, or CRITICAL states, it makes monitoring sensors easier across large numbers of nodes. Skummee (@uref{http://sourceforge.net/projects/skummee}) currently uses libipmimonitoring to monitoring sensors on @acronym{LLNL} clusters of up to 2000 nodes in size. FreeIPMI sensor monitoring plugins for Ganglia (@uref{http://ganglia.info/}) and Nagios (@uref{http://www.nagios.org/}) have also been developed and made available for download (@uref{http://www.gnu.org/software/freeipmi/download.html}). @command{Ipmi-sel} and libipmimonitoring are capable of interpreting system event log (@acronym{SEL}) entries as well as just reporting them. It can be used for host monitoring @acronym{IPMI} event severity on a cluster. By mapping events into NOMINAL, WARNING, or CRITICAL states, it makes monitoring system events easier across large numbers of nodes. Skummee (@uref{http://sourceforge.net/projects/skummee}) currently uses libipmimonitoring to monitoring the @acronym{SEL} on @acronym{LLNL} clusters of up to 2000 nodes in size. The @command{ipmi-config} configuration file and command-line interface are used to easily copy the @acronym{BMC} configuration from one node to every other node in a cluster quickly. It has been used to modify the @acronym{BMC} configuration across large @acronym{LLNL} clusters in a few minutes. They also have the capability to verify (via the diff option) that the desired configuration has been properly stored to firmware. @command{Ipmidetect} can be used to enhance the efficiency of the hostranged input by eliminating those nodes in the cluster that have been temporarily removed for servicing. FreeIPMI is supported within Slurm for energy consumption monitoring. @item Additional @acronym{OEM} support FreeIPMI contains support for a number of @acronym{OEM} extensions and @acronym{OEM} sensors and/or events. @command{Ipmi-oem} currently supports @acronym{OEM} command extensions for motherboards made by Dell, Fujitsu, IBM, Intel, Inventec, Quanta, Sun Microsystems, Supermicro, and Wistron. @command{Ipmi-sensors} and @command{ipmi-sel} support @acronym{OEM} sensors and/or events for motherboards made from Dell, Fujitsu, HP, Intel, Inventec, Quanta, Sun Microsystems, Supermicro, and Wistron. (Some of the motherboards may have been rebranded by vendors, see manpages for official list of confirmed supported motherboards.) @item Additional flexibility and features By implementing various @acronym{IPMI} sub-sections into multiple tools, each tool is capable of providing the user with more flexibility and ultimately more features in addition to those listed above. It may not be as easy (or architecturally possible) to do in an all-in-one tool. @item Extra @acronym{IPMI} support In addition to the features listed above, FreeIPMI also supports specifications related to @acronym{IPMI}. The Data Center Management Interface, or @acronym{DCMI}, is supported via the FreeIPMI tool @command{ipmi-dcmi}. Some aspects of the Intel Power Node Manager are supported in @command{ipmi-oem}. @item Easy setup By implementing drivers in userspace libraries, there is no need to build/setup/manage any kernel modules/drivers. @item Portability Likewise, by implementing everything in userspace libraries and tools, portability to multiple operating systems and architectures should be easier. @end enumerate @node Does my system support IPMI?, How do I compile FreeIPMI?, What is special about FreeIPMI?, Top @section Does my system support IPMI? Unfortunately, there are no universally defined mechanisms for determining if a system supports @acronym{IPMI} via Inband communication. Assuming IPMI is set up correctly for over LAN communication, a fairly reliable mechanism exists out-of-band. Here are some suggestions. @enumerate @item FreeIPMI's @command{ipmi-locate} can be used to determine if @acronym{IPMI} can be found on your system. Users are cautioned though, the failure to discover @acronym{IPMI} via @command{ipmi-locate} is not sufficient to disprove that @acronym{IPMI} exists on your system. Your system may not publish such information or may expect clients to communicate at default locations. @item @command{dmidecode} may be similarly used to probe for devices that support @acronym{IPMI} on your system. You may grep for @acronym{IPMI} or specify the @acronym{IPMI} DMI type on the command line. @example # > dmidecode --type 38 # dmidecode 2.10 SMBIOS 2.5 present. Handle 0x0049, DMI type 38, 18 bytes IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x0000000000000CA2 (I/O) Register Spacing: Successive Byte Boundaries @end example @item FreeIPMI's @command{ipmi-ping} can be used to see if a machine has an IPMI service at a specific host/IP address. For more wide scale IPMI discovery, the @command{ipmi-detectd} daemon and @command{ipmi-detect} tool can be used. @end enumerate Again, the failure to find an @acronym{IPMI} supported device is not sufficient to show lack of @acronym{IPMI} support. Ultimately, some amount of information from product documents or trial and error may be necessary to determine if @acronym{IPMI} is supported on your system. @node How do I compile FreeIPMI?, libgcrypt requirement, Does my system support IPMI?, Top @section How do I compile FreeIPMI? Please see the README.build instructions provided with FreeIPMI or on the FreeIPMI website's documentation (@uref{http://www.gnu.org/software/freeipmi/README.build}). @node libgcrypt requirement, x86-64 Compilation, How do I compile FreeIPMI?, Top @section libgcrypt requirement FreeIPMI requires the libgcrypt library to be installed for a variety of encryption requirements in @acronym{IPMI} 2.0. If you are building FreeIPMI and receive a 'libgcrypt required to build libfreeipmi' error, please install libgcrypt. For Linux users, this may require the install of the libgcrypt-devel package as well. For those who do not need @acronym{IPMI} 2.0 encryption, FreeIPMI may be built without it by specifying @option{--without-encryption} when executing configure. @node x86-64 Compilation, Installing FreeIPMI on FreeBSD, libgcrypt requirement, Top @section x86-64 Compilation By default, FreeIPMI's build autotools (e.g. configure) should detect if you are on a 64 bit system and should build against 64 bit libraries. However, some multi-architecture installs (e.g. you have 32 bit and 64 bit libraries installed) may lead to builds and installs of 32 bit instead of 64 bit. For those noticing this, pass libdir appropriately to the configure script to workaround this problem. (e.g. @option{--libdir=/usr/lib64}) Example: @example # ./configure --prefix=/usr --libdir=/usr/lib64 @end example @node Installing FreeIPMI on FreeBSD, What are some IPMI terminology or acronyms I should be aware of?, x86-64 Compilation, Top @section Installing FreeIPMI on FreeBSD You can install a binary package of freeipmi or use the port, located in ports/sysutils/freeipmi, to build it from the source. See ports(7) and 'Packages and Ports' section (@uref{http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/ports.html}) in The FreeBSD Handbook. Please contact port maintainer (MAINTAINER line in the port's Makefile), if you have problems building from the port. @node What are some IPMI terminology or acronyms I should be aware of?, What setup is needed for FreeIPMI to communicate over LAN?, Installing FreeIPMI on FreeBSD, Top @section What are some IPMI terminology or acronyms I should be aware of? Good question, here are some terms and acronyms with general definition you might want to know. @table @strong @item BMC The @strong{Baseboard Management Controller} is the management chip on the system that is responsible for @acronym{IPMI}. It is common to refer to configuring the ``@acronym{BMC}'' as synonymous for configuring @acronym{IPMI}. @item inband @strong{inband} @acronym{IPMI} communication refers to communication on a system locally (i.e. not over a network). @item outofband @strong{outofband} and @strong{IPMI over LAN} refer to @acronym{IPMI} communication over a network, typically ethernet. @item SDR The @strong{Sensor Data Repository} is a database of system information that is needed by many other @acronym{IPMI} functions. It is commonly read before some @acronym{IPMI} action can be taken. For example, it contains a list of all sensors on a system, so it must be downloaded before sensors on a system can be read. In FreeIPMI, the @acronym{SDR} is cached in a common location and can be used by a number of tools, such as @command{ipmi-sensors}, @command{ipmi-sel}, and @command{ipmi-fru}. @item SEL The @strong{System Event Log} is a log of events stored on the system for later diagnostics. In FreeIPMI, @command{ipmi-sel} can be used to read the @acronym{SEL}. @item FRU The @strong{Field Replaceable Unit} is a general computing term refering to a replaceable unit of electronics. In @acronym{IPMI} it is common to refer to the ``@acronym{FRU}'' as the database of all @acronym{FRU} components on a system. In FreeIPMI, @command{ipmi-fru} can be used to read the @acronym{FRU} components on a system. @item PEF @strong{Platform Event Filtering} refers to the rules that determine when PETs are generated and where they are sent. In FreeIPMI, @acronym{PEF} can be configured via @command{ipmi-config}. @item PET @strong{Platform Event Trap} refers to a trap that can be sent by a system to an SNMP agent to indicate an event has occurred on the system. In FreeIPMI, a @acronym{PET} trap can be interpreted via @command{ipmi-pet}. @item DCMI The @strong{Data Center Management Interface} is a management interface defined by a group of vendors that use @acronym{IPMI} as the backend for their system management definition. In FreeIPMI, @command{ipmi-dcmi} can be used to read/configuring @acronym{DCMI}. @item SOL @strong{Serial over LAN} refers to the forwarding of serial system traffic over a network, typically an ethernet network. It is typically used to access a remote system console. In FreeIPMI, ipmiconsole is used to access a remote console via @acronym{SOL}. @item RMCP The @strong{Remote Management Control Protocol} protocol is another remote management protocol which @acronym{IPMI} is defined within for outofband communication. For most @acronym{IPMI} users, you will never need to know about @acronym{RMCP}. @end table @node What setup is needed for FreeIPMI to communicate over LAN?, What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, What are some IPMI terminology or acronyms I should be aware of?, Top @section What setup is needed for FreeIPMI to communicate over LAN? Please see the ipmi-config.conf(5) manpage provided with FreeIPMI for details, or you can read it on the FreeIPMI website's documentation (@uref{http://www.gnu.org/software/freeipmi/manpages/man5/ipmi-config.conf.5.html}). @node What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, Do I need to install or configure a driver to perform IPMI inband?, What setup is needed for FreeIPMI to communicate over LAN?, Top @section What setup is needed for Serial over LAN (SOL) or Ipmiconsole? The setup of Serial-over-LAN (@acronym{SOL}) and/or @command{Ipmiconsole} is highly dependent on your system. However, most motherboardss require the following: @enumerate @item Adjust the BIOS COM port for serial redirection over @acronym{SOL} instead of the normal serial port and set the appropriate baud rate. If you do not know which port is the @acronym{SOL} port, you may need to play around and guess. It is likely a non-default setting, since many manufacturers may still assume the default redirection is out of the normal serial port. If you do not have a serial port on your motherboard, this part can probably be skipped. @item Configure @acronym{IPMI} on the motherboard to use @acronym{SOL}. Many motherboards may have this enabled by default, however you may wish to verify with FreeIPMI's @command{ipmi-config}. More information can be found in the ipmi-config.conf(5) manpage on the settings. However, the key settings are to enable @acronym{SOL} on the system, enable @acronym{SOL} for individual users, and select the appropriate baud. On many motherboards, the selected baud must match what is configured in the BIOS. @item Adjust your operating systems serial console settings to use the appropriate COM port. For Linux, the following guide (@uref{http://www.vanemery.com/Linux/Serial/serial-console.html}) provides a pretty good overview of setting of a serial console on Linux. The only difference for setting up a serial console with @command{Ipmiconsole} or @acronym{SOL}, is the ttySX terminal may need to be changed. @end enumerate @node Do I need to install or configure a driver to perform IPMI inband?, SSIF Driver Configuration, What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, Top @section Do I need to install or configure a driver to perform IPMI inband? For most people the answer is no. FreeIPMI includes a userspace driver that works on most motherboards without any driver installation, loading, or configuration required. FreeIPMI also includes support of a Linux SSIF driver through the SSIF device (i.e. @file{/dev/i2c-0}), the OpenIPMI Linux kernel driver (i.e. @file{/dev/ipmi0}), the Sun/Solaris @acronym{BMC} driver (i.e. @file{/dev/bmc}), and the Intel @acronym{DCMI}/MEI driver (i.e. @file{/dev/dcmi}). If you communicate through one of these mechanisms, the appropriate drivers for them should be loaded. Most systems should automatically load the appropriate drivers you need. Under most scenarios, the FreeIPMI tools should automatically discover which in-band interface to use and the proper settings to use. Some motherboards may require you to determine alternate configurations for addresses, paths, etc. on your own and pass them as command line options to the tools. Every system is different and your situation may differ. Please see your manufacturer and operating system instructions. Special note: At the time of this writing the Intel DCMI/MEI Linux device drivers are not distributed widely. Please work with your vendor to obtain the Intel MEI and DCMI device drivers. There are some additional Linux OpenIPMI kernel driver notes here: @uref{http://www.gnu.org/software/freeipmi/README.openipmi}. @node SSIF Driver Configuration, How do you setup Powerman with ipmipower?, Do I need to install or configure a driver to perform IPMI inband?, Top @section SSIF Driver Configuration FreeIPMI's SSIF driver works on top of kernel'2 i2c device interface. Under GNU/Linux load these kernel modules: i2c-dev, i2c-i801, i2c-core before using FreeIPMI. To identify SSIF device address: Example: @example $> lspci (in the output look for this entry) 00:1f.3 SMBus: Intel Corp. 6300ESB SMBus Controller (rev 01) Subsystem: Intel Corp.: Unknown device 342f Flags: medium devsel, IRQ 17 I/O ports at 0400 [size=32] ---- $> cat /proc/bus/i2c i2c-0 smbus SMBus I801 adapter at 0400 Non-I2C SMBus adapter ---- Make sure the "0400" above matches with the "0400" address under proc. Also make sure "i2c-0" is not different. If it appears different then grep for "i2c-0" in this code "ipmitool.c" and change. "i2c-X" is the label assigned to each slave device attached on the i2c bus. BMC address Locator: Refer to the SM BIOS IPMI Device Information Record Type 38, record 06h and 08h. Use the value of record 06h as the IPMBAddress and load the SMBus controller driver at the address value read from record 08h. Usual values for record 06h -> 0x42 Usual values for record 08h -> 0x400 @end example @node How do you setup Powerman with ipmipower?, How do you setup Conman with ipmiconsole or libipmiconsole?, SSIF Driver Configuration, Top @section How do you setup Powerman with ipmipower? There are additional details in the Powerman (@uref{https://github.com/chaos/powerman}) documentation, however here are the basics. In the powerman.conf file, you want to include the @file{ipmipower.dev} device file, setup an ipmipower device in co-process mode, then configure hosts to use that device. @example include "/etc/powerman/ipmipower.dev" device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h mynodes[0-10] |&" node "mynodes[0-10]" "ipmi0" "mynodes[0-10]" @end example You may wish to add some additional ipmipower configuration on the device line: @example device "ipmi0" "ipmipower" "/usr/sbin/ipmipower --wait-until-on --wait-until-off -h mynodes[0-10] -u username -p password |&" @end example although you will probably want to do some of this configuration (especially the username and password) in @file{freeipmi.conf}. If you use an alternate set of hostnames for @acronym{IPMI} from the primary hostname, that can configured like this: @example device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h altname[0-10] |&" node "primaryname[0-10]" "ipmi0" "altname[0-10]" @end example Configuration can be trickier if you want to configure Powerman to use ipmipower with an @acronym{OEM} extension specified through @option{--oem-power-type}. Many @acronym{OEM} extensions in ipmipower must include additional arguments, which can be passed in via the node argument. In addition, while @command{ipmipower} can take a host range as an additional argument, Powerman may not. For example, the following would be suitable to configure @acronym{OEM} extension support the Dell Poweredge C410x. A specific node identifier is used to map to a specific node and additional argument (i.e. mynodes0-1 maps to mynodes0+1). @example include "/etc/powerman/ipmipower.dev" device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h mynodes[0-10]+[1-16] --oem-power-type=c410x -l admin |&" node "mynodes[0-10]-1" "ipmi0" "mynodes[0-10]+1" node "mynodes[0-10]-2" "ipmi0" "mynodes[0-10]+2" node "mynodes[0-10]-3" "ipmi0" "mynodes[0-10]+3" node "mynodes[0-10]-4" "ipmi0" "mynodes[0-10]+4" node "mynodes[0-10]-5" "ipmi0" "mynodes[0-10]+5" node "mynodes[0-10]-6" "ipmi0" "mynodes[0-10]+6" node "mynodes[0-10]-7" "ipmi0" "mynodes[0-10]+7" node "mynodes[0-10]-8" "ipmi0" "mynodes[0-10]+8" node "mynodes[0-10]-9" "ipmi0" "mynodes[0-10]+9" node "mynodes[0-10]-10" "ipmi0" "mynodes[0-10]+10" node "mynodes[0-10]-11" "ipmi0" "mynodes[0-10]+11" node "mynodes[0-10]-12" "ipmi0" "mynodes[0-10]+12" node "mynodes[0-10]-13" "ipmi0" "mynodes[0-10]+13" node "mynodes[0-10]-14" "ipmi0" "mynodes[0-10]+14" node "mynodes[0-10]-15" "ipmi0" "mynodes[0-10]+15" node "mynodes[0-10]-16" "ipmi0" "mynodes[0-10]+16" @end example As noted in the manpage, the Dell Poweredge C410x appears to have difficulty handling new slot power control requests until prior ones have completed. Users may wish to configure @command{ipmipower} with @option{--wait-until-on}, @option{--wait-until-off}, and consider using the @file{ipmipower-serial.dev} device file instead of @file{ipmipower.dev}. @node How do you setup Conman with ipmiconsole or libipmiconsole?, How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, How do you setup Powerman with ipmipower?, Top @section How do you setup Conman with ipmiconsole or libipmiconsole? There are additional details in the Conman (@uref{https://github.com/dun/conman}) documentation and manpages, however here are some basics. To configure Conman to connect via the ipmiconsole tool, Conman comes with an expect script named ipmiconsole.exp, typically installed into @file{/usr/lib/conman/exec/ipmiconsole.exp}. Consoles can be setup by adding lines to @file{conman.conf} like: @example CONSOLE name="myserver" dev="/usr/lib/conman/exec/ipmiconsole.exp myserver myusername mypassword" @end example One of the useful aspects of using the ipmiconsole.exp script is that the same configuration options you may have already configured into @file{freeipmi.conf}, may be loaded automatically when ipmiconsole is executed via this expect script. However, as can be expected, scalability may be a problem as you must launch a process for every node in your cluster. Conman is also capable of connecting to servers natively through the libipmiconsole library, so that no additional processes are launched. They can be configured as follows: @example CONSOLE name="myserver" IPMIOPTS="U:myusername,P:mypassword" dev="ipmi:myserver" @end example on some older versions of Conman, you would instead use @example CONSOLE name="myserver" IPMIOPTS="myusername,mypassword" dev="ipmi:myserver" @end example Please see the Conman documentation for current version options and additional configuration options available. Alternate defaults for libipmiconsole can also be set via the @file{libipmiconsole.conf} file. One of the additional advantages of configuring Conman to use the libipmiconsole library natively is that Conman is able to detect and manage additional @acronym{IPMI} error cases. @node How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, Why are times reported by FreeIPMI tools wrong?, How do you setup Conman with ipmiconsole or libipmiconsole?, Top @section How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI? Scripts to monitor @acronym{IPMI} via FreeIPMI in Ganglia and Nagios have been developed and are downloadable on the FreeIPMI homepage (@uref{http://www.gnu.org/software/freeipmi/download.html}). Instructions for setup can be found at the top of the scripts. @node Why are times reported by FreeIPMI tools wrong?, Why is the IPMI kernel driver faster than the KCS driver?, How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, Top @section Why are times reported by FreeIPMI tools wrong? Times reported by various FreeIPMI tools (such as @command{ipmi-sel}) are reported under the assumption that timestamps are written in localtime. This is by definition in the IPMI specification. Whether or not a system truly stored the timestamps in localtime varies on many factors, such as the vendor, BIOS, and operating system. If the times reported by the tool are off, there is a strong likelihood the time may be stored in GMT/UTC and needs to be converted into localtime. In FreeIPMI tools that have time outputs, the @option{--utc-to-localtime} option can be specified or the @option{utc-to-localtime} option can be specified in @file{freeipmi.conf}. @node Why is the IPMI kernel driver faster than the KCS driver?, Why is the output from FreeIPMI different than another software?, Why are times reported by FreeIPMI tools wrong?, Top @section Why is the IPMI kernel driver faster than the KCS driver? Internally the @acronym{IPMI} kernel driver chooses to spin while polling for a response from the base management controller (@acronym{BMC}) while the @acronym{KCS} driver elects to sleep between poll attempts. An operating system's scheduler granularity may be larger than the time it takes to perform a @acronym{IPMI} transaction, thus the wall clock time of the @acronym{KCS} driver is far worse than the @acronym{IPMI} kernel driver. FreeIPMI's @acronym{KCS} driver implements the sleep between poll attempts because it is believed to provide better overall system use. To force the @acronym{KCS} driver to have similar wall clock response time to the @acronym{IPMI} kernel driver, users can specify the 'spinpoll' workaround. @node Why is the output from FreeIPMI different than another software?, Why are there so many IPMI compliance bugs?, Why is the IPMI kernel driver faster than the KCS driver?, Top @section Why is the output from FreeIPMI different than another software? Due to minor implementation differences and or incorrect IPMI firmware, the resulting output from FreeIPMI tools can differ from other software. Here are some of the more common inconsistencies that have been seen before. More inconsistencies can be seen/fixed by specifying a number of the workarounds available to many of the FreeIPMI tools. @itemize @bullet @item In FreeIPMI's @command{ipmi-sel} and @command{ipmi-sensors} there are options for FreeIPMI to interpret the @acronym{SEL} or sensor readings and give them a NOMINAL, WARNING, or CRITICAL status. Other IPMI software may have different interpretations for their sensors and/or @acronym{SEL} readings that map to NOMINAL, WARNING, or CRITICAL differently. These interpretations are configurable in FreeIPMI via the @file{freeipmi_interpret_sel.conf} and @file{freeipmi_interpret_sensor.conf} configuration files. @item In some @acronym{IPMI} software, sensor and/or @acronym{FRU} records are bridged by default and read off satellite controllers. In FreeIPMI they are not due to the discovery that many vendors do not implement their bridging correctly or publish invalid slave addresses in the @acronym{SDR}. In order to bridge sensors the @option{--bridge-sensors} option must be specified in @command{ipmi-sensors}. In order to bridge @acronym{FRU} records, the @option{--bridge-fru} must be specified in @command{ipmi-fru}. @item In some @acronym{IPMI} software, shared sensors may be read by default. In FreeIPMI's @command{ipmi-sensors}, they are not read by default due to discovery that too many systems implement this incorrectly. Shared sensors can be read by specifying the @option{--shared-sensors} option. @item In vendor provided @acronym{IPMI} software, @acronym{OEM} specific sensors, @acronym{SEL} records, or FRU records may be output correctly because the vendor is aware of how to properly read/output @acronym{OEM} specific information. FreeIPMI may not be able to do this by default. For the motherboards in which @acronym{OEM} information is known, it can be output using the @option{--interpret-oem-data}. This option is available in @command{ipmi-sensors}, @command{ipmi-sel}, and @command{ipmi-fru}. @item In some vendor @acronym{IPMI} software, sensor ``names'' are constructured through a combination of the multiple data in the @acronym{SDR}, rather than just the device name listed in the SDR. This can lead to different sensor names listed in tools like @command{ipmi-sensors} and @command{ipmi-sel}. In both tools, this can be alleviated through the use of the @option{--entity-sensor-names} option. @item On several HP systems (observed on HP Proliant DL380 G7 and HP ProLiant ML310 G5), the SDR lists sensors using inconsistent information. Some analog sensors are listed as discrete sensors or vice versa. This inconsistency, and implementation differences between @command{ipmi-sensors} and other @acronym{IPMI} software lead to different outputs. For example, this is one such sensor that was seen in @command{ipmi-sensors}: @example 2 | Power Supply 1 | Power Supply | N/A | N/A | 'Presence detected' @end example but this same sensor was see in @command{ipmitool} as @example Power Supply 1 | 120 Watts | nc @end example In this example, @command{ipmi-sensors} did not output a Watts reading but outputs the proper "Presence Detected" state. @command{Ipmitool} outputs the correct watts reading, but outputs the invalid non-critical "nc" state. In FreeIPMI, this problem can be worked around using the 'discretereading' workaround flag. @item In FreeIPMI's @command{ipmi-fru}, all multirecord @acronym{FRU} entries are output by default. In @command{ipmitool} and perhaps other software, they are not. The resulting output from @command{ipmi-fru} is much larger than other software. To get similar output in @command{ipmitool}, the @option{-v} option must be set. @item In FreeIPMI's @command{ipmi-fru}, @acronym{FRU} record checksums are automatically checked and errors are output if a @acronym{FRU} record cannot assumed to be valid due to a failed checksum check. Other @acronym{IPMI} software has been shown to ignore the checksums and assume records are valid. If your system has invalid checksummed @acronym{FRU} entries, the 'skipchecks' workaround can be used to get around them. @item In FreeIPMI's @command{ipmi-sensors}, sensors may output an ``OK'' if no events are set. In other @acronym{IPMI} software (such as @command{ipmitool} and the command ``sdr list''), ``OK'' means that a sensor was simply read correctly. The ``OK'' may not mean that the device behind the sensor is actually functioning properly. For example, here is an output from an @command{ipmitool} sdr list entry. @example PSU 1 Status | 0x0b | ok @end example The 0x0b indicates that the power supply has errors (you normally want to see 0x00 or 0x01), however the sensor outputs ``ok'' because the sensor reading was read correctly. When using FreeIPMI's @command{ipmi-sensors}, the 0x0b is properly converted into the event messages indicating an error. @example 54 | PSU 1 Status | Power Supply | N/A | N/A | 'Presence detected' 'Power Supply Failure detected' 'Power Supply input lost (AC/DC)' @end example @end itemize @node Why are there so many IPMI compliance bugs?, How do I get around an IPMI compliance bug on my motherboard?, Why is the output from FreeIPMI different than another software?, Top @section Why are there so many IPMI compliance bugs? The @acronym{IPMI} specification is very large. At last check, the @acronym{IPMI} specification was 601 pages. This does not count the various side specifications related to @acronym{IPMI}, including @acronym{DCMI}, @acronym{PET}, @acronym{FRU}, and the various @acronym{OEM} extension specifications (e.g. Intel Node Manager). Many sections of text can be ambiguous. Many components of @acronym{IPMI} are optional and aren't required to be implemented. There is some leeway for implementation interpretation as well. Ultimately, bugs will happen. In all fairness, FreeIPMI has had bugs too. A number of the @acronym{IPMI} compliance bugs found by FreeIPMI are documented in the freeipmi-bugs-issues-and-workarounds.txt document (you can find it on the website here: @uref{http://www.gnu.org/software/freeipmi/freeipmi-bugs-issues-and-workarounds.txt}). @node How do I get around an IPMI compliance bug on my motherboard?, Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, Why are there so many IPMI compliance bugs?, Top @section How do I get around an IPMI compliance bug on my motherboard? Most of the FreeIPMI tools and libraries have flags to workaround a large number of @acronym{IPMI} compliance bugs found on motherboards. Please see the appropriate tool manpages or library header files for details on the workarounds available and for what motherboards. If you believe there is a compliance issue on your motherboard that has not yet been implemented, please contact the maintainers on the @email{freeipmi-devel@@gnu.org} mailing list. @node Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, How do I program with the FreeIPMI libraries?, How do I get around an IPMI compliance bug on my motherboard?, Top @section Why am I seeing so many 'internal IPMI error' or 'driver busy' messages? In some Linux distributions (atleast with Redhat Enterprise Linux 6.4 / RHEL 6.4 and CentOS 6.4), the distributions began compiling the IPMI kernel driver (i.e. ipmi_msghandler and ipmi_si modules) into the kernel instead of as loadable modules. This was apparently due to a need for the IPMI kernel drivers to work with ACPI. Due to compiling the IPMI kernel driver into the kernel, there is the potential for inband IPMI communication to occur in the kernel w/o any knowledge of it from outside software in userspace. Normally, the IPMI service (i.e. /etc/init.d/ipmi) is started to create a device file (i.e. /dev/ipmi0) so that userspace software will know to communicate through this device. However, some of these distros disable the ipmi service so that a device file is never created. Because of this, multiple IPMI software can communicate inband to the BMC simultaneously, subsequently racing with each other. Ultimately, this can lead to communication problems. In FreeIPMI, this is most commonly seen through 'internal IPMI error' or 'driver busy' messages. There are several possible solutions for this in FreeIPMI. If you start the ipmi service (i.e. /etc/init.d/ipmi start), a device file will be created which FreeIPMI will recognize. FreeIPMI will subsequently communicate via inband IPMI through this device file, thus eliminating racing with the IPMI occurring in the kernel. The other option is to disable the IPMI kernel thread so that FreeIPMI can perform inband communication with the BMC through its own mechanisms. The following is from the Linux kernel documentation. @example When compiled into the kernel, the parameters can be specified on the kernel command line as: ipmi_si.type=,... ipmi_si.ports=,... ipmi_si.addrs=,... ipmi_si.irqs=,... ipmi_si.trydefaults=[0|1] ipmi_si.regspacings=,,... ipmi_si.regsizes=,,... ipmi_si.regshifts=,,... ipmi_si.slave_addrs=,,... ipmi_si.force_kipmid=,,... ipmi_si.kipmid_max_busy_us=,,... ... If your IPMI interface does not support interrupts and is a KCS or SMIC interface, the IPMI driver will start a kernel thread for the interface to help speed things up. This is a low-priority kernel thread that constantly polls the IPMI driver while an IPMI operation is in progress. The force_kipmid module parameter will all the user to force this thread on or off. If you force it off and don't have interrupts, the driver will run VERY slowly. @end example @node How do I program with the FreeIPMI libraries?, Where can I get additional help or support?, Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, Top @section How do I program with the FreeIPMI libraries? If you are looking for a high level library to do Serial-over-LAN (@acronym{SOL}) or @acronym{IPMI} sensor/@acronym{SEL} monitoring, you may wish to look at the libipmiconsole and libipmimonitoring libraries. These libraries attempt to abstract a large amount of the underlying @acronym{IPMI} detail from developers. The majority of the documentation can be found in the header files. Some examples can be found in the documentation and the FreeIPMI tools that use them. The libfreeipmi library is the core library used by other FreeIPMI libraries and tools. However, it is quite detailed in regards to the @acronym{IPMI} specification and many components of the library will be quite confusing to those unfamiliar with the finer details of the @acronym{IPMI} specification. It is recommended most use the higher level libraries described above. A more detailed description of the available FreeIPMI libraries can be found in the @file{freeipmi-libraries.txt} document (you can find it on the website here: @uref{http://www.gnu.org/software/freeipmi/freeipmi-libraries.txt}). @node Where can I get additional help or support?, , How do I program with the FreeIPMI libraries?, Top @section Where can I get additional help or support? For help, please email the @email{freeipmi-users@@gnu.org} mailing list. @bye freeipmi-1.6.4/doc/freeipmi-coding.txt0000644002055400205540000003047513527331635017642 0ustar00achuachu00000000000000FreeIPMI Coding by Albert Chu chu11@llnl.gov Last Updated: February 8, 2012 These are some short descriptions on coding style, API style, other thoughts for those interested in developing for FreeIPMI. 1) Code Style ------------- The GNU coding style was selected for FreeIPMI. Please try to follow the coding style used in the rest of FreeIPMI. Here's a short example that covers the generics of the GNU coding style. int main(int argc, char **argv) { int a = 0; int b = 1; if (a == 1) printf("yoda\n"); if (a == 5 || b == 1) { printf("foobar\n"); printf("xyzzy\n"); } while (a++ < 5) printf("lala\n"); while (b++ < 7) { printf("blah\n"); printf("garble\n"); } } 2) Parameter Checking --------------------- Please carefully check the input parameters on the inputs your program and/or functions take. Minor parsing issues can lead to catastrophic mistakes in IPMI. For example, suppose you have a --power-control option that takes a number to represent a type of operation (on, off, etc.). Suppose a user inputs "--power-control=foobar". The "foobar" will be read as a '0' by strtoul(). If not properly checked, the '0' can be passed to the IPMI Chassis Control command, which uses the '0' to power off a node. In programs, when appropriate, output error messages to the user indicating that how and why the inputted parameters were incorrect. 3) Code Consistency ------------------- Please keep your code as consistent as possible to other code in FreeIPMI. That includes code indenting style, brace style, API style, and naming convention (which is discussed in more detail below). Although there may be situations that a particular API style or naming convention will make things easier for you and your code (such as shortening the name of a function, decreasing the number of parameters you need to pass to a function via a struct, etc.), we ask that your code be consistent so that it does not confuse other developers. If there is a distinct technical reason that you must use a different API style, please bring it up with the FreeIPMI authors. For example, pretty much all of the "fill" functions in libfreeipmi take the exact parameters they need to fill the fiid object which is passed along as a parameter. All parameters are passed by value, not by a pointer or other method (e.g. object, struct, etc.). Exceptions do exist. For example, fill_cmd_chassis_identify() takes parameters passed by pointer instead of passed by value. The reason is that both fields are optional and need not be filled according to the IPMI specification. The pointer gives the caller the ability to set values (by passing a valid pointer) or not (by passing NULL). 4) Libfreeipmi naming/function parameter conventions ---------------------------------------------------- The naming style in libfreeipmi was developed primarily for the purpose of readability when code is being compared to the IPMI specification. Due to the size of the IPMI spec, there will be a lot of code. In earlier versions of FreeIPMI, there was confusion on where code was located, what parameters were called, how parameters should be input, etc. due to different people using different abbreviations styles, putting functions out of order with the spec, in different files, using/not-using different bitmasks, etc. The code has been auditted and cleaned up since then. So when adding new functions/templates/parameters/files/etc. to libfreeipmi, please name them consistently to the rest of the libfreeipmi library and the IPMI specification. This includes: - naming functions/templates/parameters/files based on the spec - in most cases, not abbreviating any words (or using consistent abbreviations in the rest of the library, check first!) - matching parameter lists to the templates and in the same order - ordering functions/templates/parameters/files/etc. consistently with the spec. For example: ipmi-messaging-support-cmds.c is the file for messaging support commands, chapter 22 of the IPMI 2.0 spec. tmpl_cmd_get_channel_authentication_capabilities_rq tmpl_cmd_get_channel_authentication_capabilities_rs are the templates for the Get Channel Authentication Capapilities command. fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 3, "reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "get_ipmi_v2.0_extended_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "maximum_privilege_level", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_get_channel_authentication_capabilities_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "channel_number", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.none", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.md2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.md5", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.straight_password_key", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.oem_prop", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.reserved2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_type.ipmi_v2.0_extended_capabilities_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.anonymous_login", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.null_username", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.non_null_username", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.user_level_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.per_message_authentication", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "authentication_status.k_g", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 2, "authentication_status.reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_supports_ipmi_v1.5_connections", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "channel_supports_ipmi_v2.0_connections", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 6, "reserved", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 24, "oem_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "oem_auxiliary_data", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; The fields listed in the templates above directly match table 22-15, the Get Channel Authentication Capabilities request and response commands. int fill_cmd_get_channel_authentication_capabilities (uint8_t channel_number, uint8_t maximum_privilege_level, fiid_obj_t obj_cmd_rq); The function above matches the naming and takes exactly the parameters needed by the Get Channel Authentication Capabilities request template. The coding conditions specified above may lead to function names or function parameters names that exceed the 80 column mark or having very long parameter lists. We accept this annoyance (or poor coding style, we admit it), as we consider matching the specification as a more important need in libfreeipmi. For example: int fill_cmd_set_lan_configuration_parameters_authentication_type_enables (uint8_t channel_number, uint8_t callback_level_none, uint8_t callback_level_md2, uint8_t callback_level_md5, uint8_t callback_level_straight_password, uint8_t callback_level_oem_proprietary, uint8_t user_level_none, uint8_t user_level_md2, uint8_t user_level_md5, uint8_t user_level_straight_password, uint8_t user_level_oem_proprietary, uint8_t operator_level_none, uint8_t operator_level_md2, uint8_t operator_level_md5, uint8_t operator_level_straight_password, uint8_t operator_level_oem_proprietary, uint8_t admin_level_none, uint8_t admin_level_md2, uint8_t admin_level_md5, uint8_t admin_level_straight_password, uint8_t admin_level_oem_proprietary, uint8_t oem_level_none, uint8_t oem_level_md2, uint8_t oem_level_md5, uint8_t oem_level_straight_password, uint8_t oem_level_oem_proprietary, fiid_obj_t obj_cmd_rq); The function name and parameters look pretty long and terrible. But the names and fields exactly match the get authentication type enables fields listed in Table 23-4. There should be very little difficulty understanding what this funciton does, how it should be called, and what the parameters are if you are reading along with the spec. Because we want the code to match the IPMI spec as closely as possible, we currently accept the code inefficiencies (due to large stacks of parameters) that come with having long parameters lists and the atrocities of having gigantic 25+ parameter function calls in code. 5) Compilation and Development Notes ------------------------------------ Normally, to build and develop from the source tree you need to run: ./autogen.sh ./configure make out of the directory you are in. The following configure options can help you with many development issues: --enable-debug This option will turn on compilation of debugging symbols. More warnings may also be enabled when compiling. In addition, this option may enable a few "workarounds" to allow for easier development of code. Most notably, inband drivers may look in additional locations for an ipckey, so that inband development can be done in a local directory without a full installation. Generally speaking, if developing out of a local tree, you'll almost always want to enable this flag. --enable-profile If --enable-debug is enabled, this option will turn on compilation with profiling data. --enable-trace Compile tracing information into a significant portion of FreeIPMI code. This will result in significant amounts of extra information to be output. --enable-rawdumps Some users may be more familiar with raw IPMI packet dumps instead of the detailed field identified dumps that normally occur when running tools with --debug. In this case, --enable-rawdumps, will inform FreeIPMI to also output packets in raw form. freeipmi-1.6.4/doc/freeipmi-design.txt0000644002055400205540000005472013527331635017647 0ustar00achuachu00000000000000FreeIPMI Design by Albert Chu chu11@llnl.gov Last Updated: August 27, 2013 These are some notes on various design decisions made in FreeIPMI. 1) Fiid vs. other Marshalling/Unmarshalling Styles -------------------------------------------------- Several programmers have asked us why we have chosen a relatively unpopular/different method to marshall/unmarshall IPMI packets and build network packets. First, lets discuss several classic methods for marshalling/unmarshalling data when using structs to represent a packet. Method A: Marshall/Unmarshall "manually": ----------------------------------------- struct packet { uint8_t field_1; /* 1 bit */ uint8_t field_2; /* 3 bits */ uint8_t field_3; /* 4 bits */ int16_t field_4; /* 16 bits */ }; my_marshall_function(struct packet *pkt, char *buf, unsigned int buflen) { buf[0] |= pkt->field_1 & 0x1; buf[0] |= (pkt->field_2 << 1) & 0x0E; buf[0] |= (pkt->field_3 << 4) & 0xF0; /* assuming network byte order here */ buf[1] |= (pkt->field_4 & 0xFF00) >> 8; buf[2] |= pkt->field_4 & 0x00FF; } my_unmarshall_function(struct packet *pkt, char *buf, unsigned int buflen) { pkt->field_1 = buf[0] & 0x01; pkt->field_2 = buf[0] & 0x0E >> 1; pkt->field_3 = buf[0] & 0xF0 >> 4; #if LITTLE_ENDIAN_HOST pkt->field_4 = buf[2] | buf[1] << 8;; #else pkt->field_4 = buf[1] | buf[2] << 8;; #endif } general_usage_example() { struct packet pkt; char buf[1024]; int len; pkt.field_1 = 1; pkt.field_2 = 2; pkt.field_3 = 3; pkt.field_4 = 5; my_marshall_function(&pkt, buf, 1024); my_send_data_function(buf); len = my_receive_data_function(buf); my_unmarshall_function(&pkt, buf, len); printf("field_1 is: %d\n", pkt.field_1); } Pros: A) No need to deal with struct packing issues in the compiler. B) The struct definition describes packets closely and is relatively easy to use and understand. C) Relatively efficient. D) General usage code size is relatively small. E) General usage need not determine field type (e.g. is it an unsigned or signed integer). Cons: A) Have to deal with endian problems. B) Lots of marshalling and unmarshalling code are required for each packet type. C) Relatively difficult to deal with optional fields. (You'll need flags in the struct to indicate if a field was set/unset, or validate the fields via protocol definition knowledge.) D) Relatively difficult to deal with variable length fields. (You'll need a length parameter in the struct to indicate the length of a field.) E) Packet dumps/debugging is relatively poor (you only get hex) or you have to create debug functions to handle each packet type. F) Struct changes (e.g. due to IPMI errata changes) may break ABI if the structs are part of a public interface. Method B: Cast a buffer to a packed struct: ------------------------------------------- For Example: struct packet { uint8_t field_1 : 1; uint8_t field_2 : 3; uint8_t field_3 : 4; int16_t field_4; }; my_marshall_function(struct packet *pkt, char *buf, unsigned int buflen) { memcpy(buf, pkt, sizeof(struct packet)); #if LITTLE_ENDIAN_HOST swap(&buf[1], &buf[2]); #endif } my_unmarshall_function(struct packet *pkt, char *buf, unsigned int buflen) { *pkt = *((struct packet *)buf); #if LITTLE_ENDIAN_HOST pkt->field_4 = ntohs(pkt->field_4); #endif } general_usage_example() { struct packet pkt; char buf[1024]; int len; pkt.field_1 = 1; pkt.field_2 = 2; pkt.field_3 = 3; pkt.field_4 = 5; my_marshall_function(&pkt, buf, 1024); my_send_data_function(buf); len = my_receive_data_function(buf); my_unmarshall_function(&pkt, buf, len); printf("field_1 is: %d\n", pkt.field_1); } Pros: A) Not too much marshalling and unmarshalling code is required. B) General usage code size is relatively small. C) The struct definition describes packets exactly and is relatively easy to use and understand. D) Very efficient (little actual marshalling/unmarshalling needs to be done.) E) General usage need not determine field type (e.g. is it an unsigned or signed integer). Cons: A) Have to deal with endian problems. B) Have to deal with portability of struct packing techniques between different compilers (there are differences in compilers, but nowadays, this may be easier/more portable than I originally believed it to be). C) Difficult to deal with optional fields (no flags can be put in the struct to indicate if a field was set/unset, can only validate the fields via protocol definition knowledge.) D) No mechanism to deal with variable length fields (no length field can be put in the struct to indicate the field length.) E) Packet dumps/debugging is relatively poor (you only get hex) or you have to create debug functions to handle each packet type. F) Struct changes (e.g. due to IPMI errata changes) may break ABI if the structs are part of a public interface. Our Method C: string_name -> bitmask mapping -------------------------------------------- The "FreeIPMI Interface Definition" or 'fiid' API in libfreeipmi uses a string_name/bit_count template and an API to get and set values in a packet to handle marshalling/unmarshalling. The following are a few of the API functions used for FIID to give you an idea for the fiid API: fiid_obj_t fiid_obj_create (fiid_template_t tmpl); int32_t fiid_obj_errnum(fiid_obj_t obj); int8_t fiid_obj_clear (fiid_obj_t obj); int8_t fiid_obj_set (fiid_obj_t obj, char *field, uint64_t val); int8_t fiid_obj_get (fiid_obj_t obj, char *field, uint64_t *val); int32_t fiid_obj_get_all (fiid_obj_t obj, uint8_t *data, uint32_t data_len); int32_t fiid_obj_set_all (fiid_obj_t obj, uint8_t *data, uint32_t data_len); The following is the fiid equivalent in the previous examples: fiid_template_t tmpl_example = { {1, "field_1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, {3, "field_2", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, {4, "field_3", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, {16, "field_4", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, {0, "", 0} }; general_usage_example() { fiid_obj_t obj; char buf[1024]; int len; uint64_t val; obj = fiid_obj_create(tmpl_example); fiid_obj_set(obj, "field_1", 1); fiid_obj_set(obj, "field_2", 2); fiid_obj_set(obj, "field_3", 3); fiid_obj_set(obj, "field_4", 5); /* "marshall" the packet */ fiid_obj_get_all(obj, buf, 1024); my_send_data_function(buf); fiid_obj_clear(obj); len = my_receive_data_function(buf); /* "unmarshall" the packet */ fiid_obj_set_all(obj, buf, len); fiid_obj_get(obj, "field_1", &val); printf("field_1 is: %d\n", (int16_t)val); } The pros and cons of the fiid method are: Pros: A) No need to deal with endian problems (handled internally in the API). B) No need to deal with struct packing issues (bit shifts are handled internally in the API). C) Easier to deal with optional fields (For marshalling, don't set a field. For unmarshalling, the api can identify if a field is set or not). D) Easier to deal with variable length fields (For marshalling, set whatever length you want. For unmarshalling, the api can identify the length of the field read). E) Templates describe the packets exactly. F) Easy to do large packet dumps and debug (fields and values easily output and identified). G) Significantly reduce the amount of marshalling, unmarshalling, and debug code needed (the API handles it all already). F) Template changes (e.g. due to IPMI errata changes) shouldn't break ABI. (You can publish the template strings, need not publish the template itself.) Cons: A) Need to learn/use a reasonably large API and learn/use all the templates. B) Pretty inefficient (lots of string comparisons). C) General usage code size is increased. D) General usage must determine and cast field to appropriate type (e.g. is it an unsigned or signed integer). (Side Comments: Some other networking APIs have a similar API, but use macros/enums for the field names rather than strings. Many of the above benefits are identical, except the debug dump output capabilities are weaker in exchange for better performance. Some other networking APIs may return a type of a field (e.g. signed vs unsigned, 16bit vs 32bit, etc.). That would remove need to determine casting in general usage in exchange for larger general usage code size.) The big reasons why this was developed and chosen over traditional methods. A) The IPMI specification is very large, so reducing code size weighed in as an important factor for the FreeIPMI authors. This allowed there to be fewer marshalling/unmarshalling/debug functions. By one FreeIPMI author's counting in the specification, there are 304 different base payloads in the IPMI specification. This does not include permutations of payloads due to different versions, optional fields, headers, trailers, encryption, oem extensions, record formats data is stored in, etc. B) There are a relatively large number of optional fields and variable length fields in the IPMI specification. As stated above, the traditional struct based marshalling/unmarshalling have issues with handling these. C) The lack of IPMI compliance from vendors is a well known problem in the open-source community. The templates have saved developers countless hours of debugging time due to the easy method by which packets can be dumped with their fields and values quickly identified. It is very easy to find vendor IPMI compliance problems very quickly. Here's an example of a dump: pwopr2: : RMCP Header: pwopr2: : ------------ pwopr2: [ 6h] = version[ 8b] pwopr2: [ 0h] = reserved[ 8b] pwopr2: [ FFh] = sequence_number[ 8b] pwopr2: [ 7h] = message_class.class[ 5b] pwopr2: [ 0h] = message_class.reserved[ 2b] pwopr2: [ 0h] = message_class.ack[ 1b] pwopr2: : IPMI Session Header: pwopr2: : -------------------- pwopr2: [ 0h] = authentication_type[ 8b] pwopr2: [ 0h] = session_sequence_number[32b] pwopr2: [ 0h] = session_id[32b] pwopr2: [ 9h] = ipmi_msg_len[ 8b] pwopr2: : IPMI Message Header: pwopr2: : -------------------- pwopr2: [ 20h] = rs_addr[ 8b] pwopr2: [ 0h] = rs_lun[ 2b] pwopr2: [ 6h] = net_fn[ 6b] pwopr2: [ C8h] = checksum1[ 8b] pwopr2: [ 81h] = rq_addr[ 8b] pwopr2: [ 0h] = rq_lun[ 2b] pwopr2: [ 26h] = rq_seq[ 6b] pwopr2: : IPMI Command Data: pwopr2: : ------------------ pwopr2: [ 38h] = cmd[ 8b] pwopr2: [ Eh] = channel_number[ 4b] pwopr2: [ 0h] = reserved1[ 3b] pwopr2: [ 1h] = get_ipmi_v2.0_extended_data[ 1b] pwopr2: [ 2h] = maximum_privilege_level[ 4b] pwopr2: [ 0h] = reserved2[ 4b] pwopr2: : IPMI Trailer: pwopr2: : -------------- pwopr2: [ 1Fh] = checksum2[ 8b] 2) Non-generic error messages ----------------------------- Under some circumstances, it may be preferred to return generic error messages to the user, so that a malicious user cannot infer remote login information from different error messages returned. For example, returning a generic error message of "Permission Denied" would not give a malicious user information on whether the username or password was input incorrectly. Although implemented earlier on, the FreeIPMI authors have elected to not implement this now. There are many vendor implementations of IPMI and many configuration options (authentication mechanism, cipher suite id, username, password, K_g, privilege level) needed for proper IPMI session establishment. The number of error messages that could be mapped into a generic "Permission Denied" would make it too difficult for users to determine why they failed to connect properly. The overall worth of implementing a generic "Permission Denied" error message just doesn't seem worth it now. 3) Get Channel Authentication Capabilities Command -------------------------------------------------- The Get Channel Authentication Capabilities Command is typically the first packet sent in the IPMI session. It returns information on the remote machine's support of: A) IPMI 1.5 authentication mechanisms (e.g. md2, md5, etc.) B) IPMI 1.5 and/or IPMI 2.0 C) per msg authentication D) K_g status E) null username/non-null username/anonymous logins Currently in FreeIPMI, we check each of these values during the session setup to determine if a person can connect to the remote machine later in the protocol: A) If the user input an unsupported authentication mechanism, we return an error. B) If the user requested IPMI 2.0, but the remote machine doesn't support IPMI 2.0, we return an error. C) We determine if per msg authentication should be considered later in the protocol session. D) If the user was required/not-required to input a K_g value, we return an error appropriately. E) If the user input an unsupported username/password combination, we return an error appropriately. There is a question as to what values above, if any, need to be checked and appropriate errors returned to the user. The Get Channel Authentication Capabilities command is often implemented incorrectly by a number of vendors, so that overall benefit of checks has been put in question. The FreeIPMI authors have elected to keep all the checks for the following reasons. * 'A' and 'B' should be checked to avoid potential timeouts: - Later in the protocol, the password could be sent/hashed incorrectly, leading to a timeout because packets are not accepted by the remote machine. - If the remote machine does not support IPMI 2.0, later packets could timeout because the remote machine does not recognize the packet format. * 'C''s checks could be skipped as long as per msg authentication was not supported. * 'D''s checks could be skipped, because an improper null vs non-null K_g will be caught later during IPMI 2.0 authentication. * 'E''s checks are the most complicated. An improper null vs non-null username will be caught later during IPMI 1.5 and IPMI 2.0 authentication. An improper null vs non-null password can be caught later during IPMI 2.0 authentication, but may result in a timeout during IPMI 1.5 authentication. An argument could also be made that the speed at which an invalid username/password error is returned to a user could also give a malicious user information on the username/password of the remote BMC. In the end, the authors have felt the overall positive benefits provided by the checking of these values provides more than the negative implications. Changes in the overall industry implementation could change this viewpoint later. 4) Configuration tool callback design ------------------------------------- Ipmi-config is coded with a archicture that reads/writes each configurable field in the BMC separately. As an example, suppose we have the following BMC configuration file we'd like to commit. FieldA Value1 FieldB.1 Value2 FieldB.2 Value3 FieldB.3 Value4 FieldB.4 Value5 Suppose FieldA is read/written using a single IPMI packet and fields FieldB.1-FieldB.4 can be read/written using a single IPMI packet. In the architecture that ipmi-config is currently based on, the above would require 5 read requests to read all 5 values. It would require 1 read request for FieldA, 4 read requests for FieldB.1-FieldB.4, and 5 write requests to write the values. Obviously, this sounds like (and is!) very inefficient. The authors acknowledge that the code is very inefficient b/c it will cause an excess number of request/response packets to be generated. With a large number of inputs the Configtools can be slow. Here are some of the major reasons why this was done and is still kept. A) Due to widely varying IPMI versions and implementations, this handles the write configuration case best. Suppose FieldB.2 is only configurable on IPMI 2.0 systems but not IPMI 1.5 systems. Suppose (perhaps b/c it is optional in the IPMI specification) FieldB.3 is supported by some vendors but not other vendors. Suppose FieldB.4 is simply not implemented correctly by the vendor. This architecture allows the majority of the configuration to succeed on a specific platform, and allows the end user to know exactly what fields may or may not be configurable. If all 4 fields of FieldB.1-FieldB.4 were written at the same time, there is currently no method in the IPMI protocol to know what field was configured incorrectly and why (only a generic error of "invalid input" is returned, but you won't know which field it is). In the future, functionality could be added to retry each field separately if there was such a failure, however that would add another piece of complexity into the code we currently don't have time to add. In addition, with so many IPMI firmware implementations, it may difficult to add such functionality because of the wide array of error cases that might occur. B) There are several (and possibly more future) vendor compliance problems that can be (or will need to be) worked around. By using this architecture, each specific field can be worked around independently depending on the vendor. These workarounds need to be handled on both the read and write conditions. One of the major fallouts from this design is that if an invalid/illegal configuration exists on the motherboard by default, some configuration values may not be configurable. For example, suppose we want to write the following config to the BMC. FieldA.1 Value1 FieldA.2 Value2 FieldA.3 Value3 FieldA.4 Value4 The architecture of the config tools will read FieldA.1-FieldA.4 from the BMC, change only FieldA.1, then try to write all the fields back to the BMC. Then it would be repeated for FieldA.2, etc. However, suppose the default setting on the motherboard for FieldA.4 is illegal. Then each time we attempt to write FieldA.1, FieldA.2, and FieldA.3, an invalid input error will be returned b/c FieldA.4 is illegal. Things cannot change until FieldA.4 is modified. In a worse scenario, suppose the default setting on the motherboard is illegal for both FieldA.3 and FieldA.4. That means we will receive an invalid input error for the config of FieldA.1 through FieldA.4. Currently, this has been seen a very small minority of systems and work arounds have been added for those systems. Another similar fallout from this design is that the vendor must allow "piecemeal" configuration. In other words, the vendor must allow a subset of the fields to perhaps be configured "incorrectly" while the other subset may be configured "correctly". Some vendors require that fields be written "simultaneously", and do not support the ability to alter configuration one by one. Again, this has been seen a very small minority of systems and work arounds have been added for those systems. 5) Dealing with workarounds --------------------------- There is an admitted conflict in determining whether vendor compliance issues should be handled automatically vs. a specified workaround (e.g. on the commandline or via a flag in a library). On one hand, we would like for the tools to operate as simply for the users as possible without the need to specify strange workarounds or options on the command line. For example, we could detect vendor product-IDs early in the protocol, and if necessary for a particular vendor, turn on the workarounds. On the other hand, some workarounds cannot be detected properly all of the time. For example, the workaround may exist on one firmware release vs. another firmware release. It may exist between one product of a vendor vs. another product from the vendor. Another example, is that while we can make a pretty decent guess what the vendor intended, ultimately, there's no real way to know if the guess is correct. A number of these workarounds are due to vendor compliance problems that are sometimes so intrusive (e.g. using a different hashing algorithm for keys) they must require a workaround on the command line b/c there is really no other way to handle it. However, some could be handled seemlessly, but would require altered behavior to handle the "common case" or "lowest common denominator" of all IPMI protocols. The general rule that the FreeIPMI authors have come to is that if the workaround changes some "normal" or "good" behavior, it must require a specified workaround. Although it may/will be annoying to a number of users, I feel it is better for the long term. It can hopefully also pressure vendors into fixing their implementations. As an example, on some motherboards, we found that System Event Log (SEL) records reported an invalid sensor generator ID. We found that the reported generator ID was shifted off by one. Thus, as a workround, if a SDR entry cannot be found for a respective system event, we will also search for a SDR entry using the generator ID shifted by one. If the resulting SDR entry is found, we assume the original generator ID was just off by one and we use the located SDR record. This workaround is seemless and doesn't involve an option on the command line. In contrast, we found on some other motherboards that some SEL records report an invalid event record type. Unlike the above situation, there is no additional information from this record that can tell us how to parse the record. For the particular motheboard, these illegal SEL records were normal system event records with improperly coded record types. Therefore, we implemented a workaround called "assumesystemevent", which the user can specify to assume a valid system event record no matter what. Admittedly, the area is grey, and at some point, it's a judgement call :-) 6) Dealing with OEM extensions ------------------------------ Similar to the "Dealing with workarounds" question above, there is a similar question of how to deal with OEM extensions. Should code automatically detect the manufacturer and product to determine if OEM extensions can be handled or should be output? We would like the tools to operate as simply for the users without specifying options on the command line. However, can we trust that a vendor will implement their extensions consistently across motherboards, products, or even firmware revisions? The general decision is that there will be an option for the user to specify if they would like OEM interpreted output if available. Many FreeIPMI tools come with a --interpret-oem-data option for this situation. If a motherboard is specifically supported by FreeIPMI, the user is free to use and trust the OEM support. However, if OEM extensions happen to work for a unlisted motherboard, the user must take the output with some grain of salt. freeipmi-1.6.4/doc/freeipmi-hostrange.txt0000644002055400205540000003653513527331635020374 0ustar00achuachu00000000000000Using Hostrange Input/Output in HPC environments by Albert Chu chu11@llnl.gov Last Updated: July 19, 2016 1) Introduction with Pdsh ------------------------- Much of the hostrange input/output in FreeIPMI is modeled off the input/output in the tool pdsh (https://github.com/grondo/pdsh). Pdsh is a parallel shell utility which allows you to execute an arbitrary command across a cluster. Algorithmically, pdsh creates a sliding window of threads, each which generates a remote shell using an underlying 'rcmd" functionality (such as rcmd(3) or ssh(1)). As threads complete, the new threads launch the command on other hosts until the command has been executed on all hosts specified. It is utilized at Lawrence Livermore National Laboratory (LLNL) on clusters ranging from 4 to 3000 nodes. Commands are capable of being executed across the entire cluster in the matter of seconds rather then minutes it would take to execute serially in a shell prompt. Here's an example of pdsh at work on a small cluster. > pdsh -w "wopr[0-5]" hostname wopr0: wopr0 wopr1: wopr1 wopr2: wopr2 wopr3: wopr3 wopr5: wopr5 wopr4: wopr4 Determining the hostname of every node in your cluster isn't too useful or interesting. However, perhaps you want to determine if every node of your cluster booted with the same kernel. > pdsh -w "wopr[0-5]" uname -r wopr1: 2.6.9-65 wopr0: 2.6.9-65 wopr5: 2.6.9-65 wopr2: 2.6.9-65 wopr4: 2.6.9-65 wopr3: 2.6.9-65 Seems pretty useful. However, on larger clusters, this type of output will get pretty large, especially if the command generates greater than 1 line of output for each node. Lets say I want to determine if the same config file has been configured on every node of the cluster. > pdsh -w "wopr[0-5]" "cat /tmp/pretend_config" wopr1: foo=/usr wopr1: bar=/tmp wopr1: baz=/etc wopr1: xyzzy=static wopr1: wopr0: foo=/usr wopr0: bar=/tmp wopr0: baz=/etc wopr0: xyzzy=static wopr0: wopr2: foo=/usr wopr2: bar=/tmp wopr2: baz=/etc wopr2: xyzzy=dynamic wopr2: wopr4: foo=/usr wopr4: bar=/tmp wopr4: baz=/etc wopr4: xyzzy=static wopr4: wopr5: foo=/usr wopr5: bar=/tmp wopr5: baz=/etc wopr5: xyzzy=static wopr5: wopr3: foo=/usr wopr3: bar=/tmp wopr3: baz=/etc wopr3: xyzzy=static wopr3: As you can see, it's beginning to get pretty long and perhaps a bit hard to digest. Pdsh also comes with a tool called dshbak for buffering this output to make it more human readable. > pdsh -w "wopr[0-5]" "cat /tmp/pretend_config" | dshbak ---------------- wopr1 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=static ---------------- wopr3 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=static ---------------- wopr5 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=static ---------------- wopr2 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=dynamic ---------------- wopr4 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=static This is a much nicer output to read. However, if you have a much larger cluster (or possibly much larger output), this type of output will still be quite difficult to handle. Dshbak also comes with a consolidation function to shorten the output. > pdsh -w "wopr[0-5]" "cat /tmp/pretend_config" | dshbak -c ---------------- wopr[0-1,3-5] ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=static ---------------- wopr2 ---------------- foo=/usr bar=/tmp baz=/etc xyzzy=dynamic We see that for this particular pretend cluster config file, one node's configuration is different. Another problem that often comes up with large clusters is that nodes are removed from the cluster for servicing or are down due to hardware problems, hangs, crashes, etc. So tools like pdsh can often sit and timeout on those nodes that have problems. In the cluster used in this example, wopr6 is a node that is currently down and times out after awhile when you use pdsh. > time pdsh -w "wopr[0-6]" hostname wopr0: wopr0 wopr1: wopr1 wopr4: wopr4 wopr2: wopr2 wopr5: wopr5 wopr3: wopr3 pdsh@wopri: wopr6: mcmd: connect failed: No route to host real 0m3.007s user 0m0.003s sys 0m0.007s However, your average user may not know wopr6 is down, or does not wish to continually remove problem nodes (in this case wopr6) from the list of nodes to communicate with. The -v option in pdsh is used to selectively eliminate those nodes that are considered down by whatsup and the libnodeupdown library (https://github.com/chaos/whatsup). Whatsup currently shows that wopr6 is down. > whatsup up: 7: wopr[0-5],wopri down: 1: wopr6 So the -v option will have pdsh skip wopr6 automatically. > time pdsh -v -w "wopr[0-6]" hostname wopr1: wopr1 wopr0: wopr0 wopr2: wopr2 wopr5: wopr5 wopr4: wopr4 wopr3: wopr3 real 0m0.034s user 0m0.005s sys 0m0.012s The time differences may not seem like much difference in these examples. But think of when this is done across an extremeley large cluster (i.e. thousands of nodes). 2) Hostrange input/output in FreeIPMI ------------------------------------- Much of the hostrange input/output can be handled by running FreeIPMI tools with pdsh. However, pdsh requires that a shell be executed on the remote node. This can disrupt the CPU of running jobs on the cluster and removes the advantage that IPMI over LAN does not interrupt a CPU. Hostrange support has been added into most FreeIPMI tools. More than one node at a time can be specified on the command line using the hostrange format similar in pdsh. Using a threaded model similar to pdsh, each of the tools will create a sliding-window of threads, each executing out-of-band IPMI in parallel. The number of threads in the window can be increased or decreased using the fanout -F option. The tools now have similar functionality to pdsh, but all of the IPMI communication is done out-of-band. Ipmipower, which supported hostranges since 0.1.0, has had some of its options and output modified to to be consistent with the other tools. (Note: On our test cluster, 'pwopr' hostnames have been used instead of 'wopr' for configuring the IPMI IP addresses. We have also XXXed out our local usernames and passwords of course :-) For example: > ipmi-sensors -h "pwopr[0-5]" -u XXX -p YYY --record-ids=10 pwopr0: 10 | CPU3 Vcore | Voltage | 1.31 | V | 'OK' pwopr5: 10 | CPU3 Vcore | Voltage | 1.25 | V | 'OK' pwopr1: 10 | CPU3 Vcore | Voltage | 1.23 | V | 'OK' pwopr3: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' pwopr2: 10 | CPU3 Vcore | Voltage | 1.32 | V | 'OK' pwopr4: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' Dshback functionality has been added with the -B (--buffered) and -C (--consolidated) options. > bmc-info -h "pwopr[0-5]" -u XXX -p YYY --get-device-id -B ---------------- pwopr5 ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.0c Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h > bmc-info -h "pwopr[0-5]" -u XXX -p YYY --get-device-id -C ---------------- pwopr[0-1,5] ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.0c Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h If you have happened to install pdsh on your system, you may use dshbak instead of the -B or -C option. The -B and -C options were added since many users may have not installed pdsh. A whatsup-like tool and library have also been developed called ipmidetect. It performs a similar functionality to whatsup, but instead detects what IPMI nodes exist in the cluster for faster hostranged output. The tool requires the ipmidetectd daemon be setup and configured on the client (see ipmidetectd(8) and ipmidetectd.conf(5) for more information). The ipmidetectd daemon regularly ipmipings remote nodes. The ipmidetect tool and library will determine detected vs. undetected ipmi systems based on the most recent ipmipings received. [1] > /usr/sbin/ipmidetect detected: 6: pwopr[0-5] undetected: 1: pwopr6 For example, we re-introduce the bad 'pwopr6' node into the hostrange: > time ipmi-sensors -h "pwopr[0-6]" -u XXX -p YYY --record-ids=10 pwopr5: 10 | CPU3 Vcore | Voltage | 1.25 | V | 'OK' pwopr4: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' pwopr0: 10 | CPU3 Vcore | Voltage | 1.31 | V | 'OK' pwopr3: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' pwopr2: 10 | CPU3 Vcore | Voltage | 1.32 | V | 'OK' pwopr1: 10 | CPU3 Vcore | Voltage | 1.23 | V | 'OK' pwopr6: ipmi_ctx_open_outofband(): Connection timed out real 0m25.000s user 0m0.029s sys 0m0.003s Running with the -E option (and assuming ipmidetectd has been setup and is running) the -E option quickly eliminates pwopr6. > time ipmi-sensors -h "pwopr[0-6]" -u XXX -p YYY --record-ids=10 -E pwopr0: 10 | CPU3 Vcore | Voltage | 1.31 | V | 'OK' pwopr2: 10 | CPU3 Vcore | Voltage | 1.32 | V | 'OK' pwopr1: 10 | CPU3 Vcore | Voltage | 1.23 | V | 'OK' pwopr4: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' pwopr5: 10 | CPU3 Vcore | Voltage | 1.25 | V | 'OK' pwopr3: 10 | CPU3 Vcore | Voltage | 1.26 | V | 'OK' real 0m0.113s user 0m0.030s sys 0m0.003s Notice the large affect this has on the time for the command to complete. 3) Suggested use of hostrange input/output in FreeIPMI ------------------------------------------------------ Unlike pdsh, where you can run an arbitrary shell command, each FreeIPMI tool has a relatively fixed type of output or sets of outputs you can run. Based on the features run or the output of the command, the hostrange input/output will likely be used differently dependending with the tool. The following are some suggestions. They are the ways the author thinks most will use the hostrange input/output. ipmi-sensors: Each node of the cluster will likely have slightly different temperatures, voltages, etc. Therefore you may wish to run ipmi-sensors with the -q option to make it easier to consolidate output. > ipmi-sensors -h "pwopr[0-6]" -u XXX -p YYY -g temperature -E -C -q ---------------- pwopr[0-2,4-5] ---------------- 4 | CPU1 Temp | Temperature | 'OK' 5 | CPU2 Temp | Temperature | 'OK' 6 | CPU3 Temp | Temperature | 'OK' 7 | CPU4 Temp | Temperature | 'OK' 8 | Sys Temp | Temperature | 'OK' ---------------- pwopr3 ---------------- 4 | CPU1 Temp | Temperature | 'OK' 5 | CPU2 Temp | Temperature | 'OK' 6 | CPU3 Temp | Temperature | 'OK' 7 | CPU4 Temp | Temperature | 'OK' 8 | Sys Temp | Temperature | 'At or Below (<=) Lower Non-Recoverable Threshold' Based on what you see, you can of course dig deeper on those individual nodes. I imagine many users will want to run ipmi-sensors with the default output (each line of output is prepended with "hostname: "). In this mode, key error messages and the node it came from can be easily monitored along w/ grep and awk in scripts. The --no-header-output and --ignore-not-available-sensors options may be useful for reducing output across a lot of nodes. The --sdr-cache-recreate option may be useful to gracefully handle errors. Users may wish to use the --output-sensor-state option w/ ipmi-sensors to also output the current sensor state. This option will output NOMINAL, WARNING, and CRITICAL states which allow for easy grepping. ipmi-sel: Each node will likely have drastically different ipmi-sel output and a massive amount of it. Therefore buffered or consolidated output will not be very useful. The hostrange input is most useful for gathering the SEL output of the entire cluster quickly and out-of-band. You can then grep for some type of error condition you are specifically looking for or pipe it into a log monitoring utility. The hostrange functionality is also very useful to quickly clear the SEL logs across the entire cluster. The --no-header-output option may be useful for reducing output across a lot of nodes. The --sdr-cache-recreate option may be useful to gracefully handle errors. Users may wish to use the --output-event-state option w/ ipmi-sel to also output the current sensor state. This option will output NOMINAL, WARNING, and CRITICAL states which allow for easy grepping. bmc-info: When using hostranges, you are probably trying to verify the firmware version or hardware type for each BMC in your cluster. You probably want to run bmc-info with the consolidated output (-C) set most of the time. System GUIDs are also different between systems, so in order to limit the amount of different output, you may want to run with the --get-device-id option to limit the output. ipmi-raw: The output of ipmi-raw will likely be only 1 long line. The consolidated output is likely what you're interested in using. ipmi-config: The typical use is to run w/ --checkout to checkout a configuration, modify that file with new configuration information, then run w/ --commit to write the new configuration. I imagine most users will only run with hostrange support with the --commit option to configure multiple machines in parallel. Note that since a significant amount of configuration must be done in-band before out-of-band communication can occur (i.e. configuring IP addresses, MAC addresses), most may elect to not configure a machine out of band at all. The --diff option may be used across many machines to see if a configuration differs on any machine within a cluster. 4) Exceptions to the hostrange support in FreeIPMI -------------------------------------------------- The hostrange input/output is not been supported in a few situations. o Each BMC in the cluster must be configured with a different IP address and MAC address. So the parallelism that the hostrange input gives you effectively cannot be used when trying to use ipmi-config's --commit option to configure a cluster using one config file. Therefore we prohibit hostranged input when trying to configure these values in ipmi-config. o Ipmipower was written with a different architecture than bmc-info, ipmi-sensors, ipmi-sel, etc. because of need for it to interact with Powerman, so it cannot use the parallel stdout libraries developed. It instead emulates the --buffer-output, --consolidate-output, and --fanout functionality of the other tools. Additional Notes ---------------- [1] Why doesn't FreeIPMI just use whatsup? Whatsup defines "up" to typically mean that an OS up running healthily. IPMI can operate without the OS running, even when the node is "powered off." Therefore, an alternate tool had to be developed. A plugin for whatsup could have been developed to determine "up vs. down" using IPMI, but the authors of FreeIPMI did not want FreeIPMI to become dependent on whatsup. freeipmi-1.6.4/doc/freeipmi-libraries.txt0000644002055400205540000001220713527331635020344 0ustar00achuachu00000000000000FreeIPMI Libraries by Albert Chu chu11@llnl.gov Last Updated: May 18, 2012 The following is a short summary of the libraries and APIs available for use in FreeIPMI. libfreeipmi ----------- Libfreeipmi is the primary library that most of the FreeIPMI tools are based upon. The following describe the sub-sections of the library. api - The highest level API provided by libfreeipmi. It abstracts away the details of inband and outofband protocols from the user. It also provides useful error codes for the user to easily interpret IPMI problems. 'api' is used by most FreeIPMI tools and libraries, such as bmc-info(8), ipmi-sensors(8), and libipmimonitoring(3). cmds - Provides fiid templates and 'fill' functions for IPMI commands. Also provides macros definining common parameters for IPMI commands. The cmds are used by most other portions of libfreeipmi including the 'api' sub-section and tools such as ipmipower(8) and ipmiconsole(8). debug - Provides various packet/record dumping utility functions. Utilized by the 'api' subsection and by tools such as ipmipower(8) and ipmiconsole(8). driver - Provides APIs for in-band IPMI communication. Currently supported drivers are KCS, SSIF, OpenIPMI, and sunbmc. The 'driver' subsction is used by tools such as bmc-watchdog(8) and the 'api' sub-section. fiid - The "FreeIPMI Interface Definition" provides an API used for the construction/deconstruction of packets in libfreeipmi. The API works around fiid-templates, which are then used to create fiid-objects. Fiid-templates are used to describe packets through a string-name to bit-field mapping. The API allows users to read/write fields in an object using the string to bit-field mapping. Marshalling, packing, endian, and various other network issues are handled within 'fiid'. Fiid objects are used throughout libfreeipmi, including the 'api' sub-section, 'cmds' sub-sections, and various tools. fru - Provides an API for reading and parsing Field Replaceable Unit (FRU) records. Utilized by tools such as ipmi-fru(8). interface - Provides 'assemble' and 'disassemble' functions for building packets for individual in-band or out-of-band protocols. Also provides all necessary fiid templates, 'fill' functions, and other utility functions necessary to communicate on an IPMI interface. Utilized by the 'api' sub-section and tools such as ipmipower(8) and ipmiconsole(8). interpret - Provides an API for interpreting sensor or SEL events by mapping them into Nominal, Warning, or Critical states. Utilized by FreeIPMI tools and libraries, such as ipmi-sensors(8), ipmi-sel(8), and libipmimonitoring(3). locate - Provides an API to probe several standards to find default values for in-band IPMI communication. Utilized by the 'api' sub-section and the ipmi-locate(8) tool. payload - Provides macros, fiid-templates, and information on paylods used in IPMI. Used predominantly by ipmiconsole(8) and other serial-over-LAN (SOL) related code. record-format - Provides macros, fiid-templates, and information on records used in IPMI. Utilized by the 'fru' and 'sdr' subsection and tools like ipmi-sensors(8) and ipmi-fru(8). sdr - Provides an API for creating, caching, reading, and parsing a sensor data repository (SDR) and the SDR records within it. Utilized by tools such as ipmi-fru(8) and ipmi-sensors(8). sel - Provides an API for reading and parsing System Event Log (SEL) entries. Utilized by tools such as ipmi-sel(8). sensor-read - Provides an API for reading a sensor. Utilized by tools such as ipmi-sensors(8). spec - Provides macros and arrays for various other definitions and tables in IPMI. Utilized by tools such as ipmi-sensors(8). util - Provides various utility functions for the calculation of keys, sensor readings, etc. Utilized by most of the rest of FreeIPMI. libipmiconsole -------------- Libipmiconsole implements a high level serial-over-lan (SOL) API for remote console access. It can be used to establish and manage multiple IPMI 2.0 SOL sessions. The goal of this library is to abstract away all of the underlying IPMI/SOL details away from the user into a relatively simple file descriptor interface. libipmimonitoring ----------------- Libipmimonitoring implements a high level SEL and sensor monitoring API. An iterator interface is provided that allows the user to iterate through sensor values, groups, units, and states. libipmidetect ------------- Libipmidetect implements a high level API for determing which nodes in a cluster do or do-not support IPMI. This library is primarily useful for detecting when nodes are removed from a cluster for servicing, so that IPMI applications can avoid unnecessary timeouts. The library interacts with the ipmidetectd(8) daemon. pkg-config support ------------------ FreeIPMI provides pkg-config support for all the above libraries. You can thus use the standard configure macros: PKG_CHECK_MODULES(FREEIPMI, libfreeipmi, HAVE_LIBFREEIPMI="yes", HAVE_LIBFREEIPMI="no") Or use direct pkg-config calls: CFLAGS += $(shell pkg-config --cflags libfreeipmi) LIBS += $(shell pkg-config --libs libfreeipmi) For more information, refer to pkg-config documentation: http://www.freedesktop.org/wiki/Software/pkg-config freeipmi-1.6.4/doc/freeipmi-testing.txt0000644002055400205540000014702613527331635020055 0ustar00achuachu00000000000000FreeIPMI Testing by Albert Chu chu11@llnl.gov Last Updated: August 27, 2013 The following is a list of tests I've (semi) regularly done to measure the compliance of a motherboard to IPMI as well as FreeIPMI's compliance to the motherboard's implementation. It is not 100% thorough and will not guaranteee full compliance with the IPMI specification, but it covers a fair amount of the IPMI specification and tests a significant number of important cases. It should help uncover many of the most common IPMI compliance issues I've found. All users/vendors/manufacturers/etc. are welcome to debate me on the below as mandatory vs. optional requirements. While some of the below may technically be optional for IPMI compliance, I consider them to be practically mandatory for a functioning IPMI system supporting IPMI 1.5, IPMI 2.0, Serial-over-LAN, etc. A few tests may have "**Nice to have**" listed next to it, which indicate something that would be nice to have, but ultimately is not an IPMI compliance issue. The error messages listed in tests below highlight what I believe to be the "best" or "most likely" error messages that should be returned by the tools. It is possible that different IPMI completion codes returned by commands are acceptable, leading to different error message output in the tools. If you believe an alternate completion code (leading to an alternate error message) is acceptable, please let me know about them. Everything below assumes reasonable knowledge of IPMI and knowledge of FreeIPMI tools. Please see FreeIPMI documentation/manpages for additional information. All tool testing listed below is generally agnostic to execution in-band vs. out-of-band with obvious exceptions (e.g. testing ipmipower in-band, configuring the MAC address out-of-band, etc). Naturally, the testing below assumes the tester is not configuring/using FreeIPMI workarounds. That defeats the point of testing for IPMI compliance :-) Out of Band Configuration Definitions ------------------------------------- A number of test situations below require a particular out-of-band configuration on the remote machine. The following define a set of usernames/password combinations that will be referenced in the tests below. USERANONYMOUS - User #1 (i.e. NULL) username *without* a password. USERNULL - User #1 (i.e. NULL) username *with* a password. USER1 - A non-null username, with a password, and the highest privilege this user can authenticate at is the "user" privilege. OPERATOR1 - A non-null username, with a password, and the highest privilege this user can authenticate at is the "operator" privilege. ADMIN1 - A non-null username, with a password, and the highest privilege this user can authenticate at is the "admin" privilege. SOL1 - A non-null username, with a password, the highest privilege this user can authenticate with is identical to the SOL privilege level, and SOL payload access is enabled. ipmi-config Testing ------------------- Goal: The goal of the ipmi-config testing is to ensure that all IPMI configuration values can be read, written, and "stick" after being written. Test) Execute ipmi-config with --checkout on a default/unmodified manufacturered system. Using the --commit and --filename options, commit the checked out configuration file back to the BMC. Ensure that the default checked out configuration can be written back. If it cannot, is there a "default" configuration that is "invalid"? Test) Execute ipmi-config with --checkout, verify checked out configuration contains all appropriate configurable fields. At minimum, the fields listed below should be output: - For each "User" section: * Username * Enable_User * Password * Lan_Enable_IPMI_Msgs * Lan_Privilege_Limit * SOL_Payload_Access (if IPMI 2.0 is supported) - For the Lan_Channel section: * Volatile_Access_Mode * Volatile_Enable_Per_Message_Auth * Volatile_Channel_Privilege_Limit * Non_Volatile_Access_Mode * Non_Volatile_Enable_Per_Message_Auth * Non_Volatile_Channel_Privilege_Limit - For the Lan_Conf section: * IP_Address_Source * IP_Address * MAC_Address * Subnet_Mask * Default_Gateway_IP_Address * Default_Gateway_MAC_Address * Backup_Gateway_IP_Address * Backup_Gateway_MAC_Address - For the Lan_Conf_Auth section: * Callback_Enable_Auth_Type_None * Callback_Enable_Auth_Type_MD2 * Callback_Enable_Auth_Type_MD5 * Callback_Enable_Auth_Type_Straight_Password * User_Enable_Auth_Type_None * User_Enable_Auth_Type_MD2 * User_Enable_Auth_Type_MD5 * User_Enable_Auth_Type_Straight_Password * Operator_Enable_Auth_Type_None * Operator_Enable_Auth_Type_MD2 * Operator_Enable_Auth_Type_MD5 * Operator_Enable_Auth_Type_Straight_Password * Admin_Enable_Auth_Type_None * Admin_Enable_Auth_Type_MD2 * Admin_Enable_Auth_Type_MD5 * Admin_Enable_Auth_Type_Straight_Password o If some of these fields are not output, are the appropriate system "authentication type support" flags set properly? - For the Lan_Conf_Security_Keys section (if IPMI 2.0 is supported): * K_G - For the Lan_Conf_Misc: * Enable_Gratuitous_ARPs (if gratuitous ARPs supported) * Enable_ARP_Response (if BMC generated ARPs supported) * Gratuitous_ARP_Interval (if gratuitous ARPs supported) - For Rmcpplus_Conf_Privilege section: * Maximum_Privilege_Cipher_Suite_Id_0 * Maximum_Privilege_Cipher_Suite_Id_1 * Maximum_Privilege_Cipher_Suite_Id_2 * Maximum_Privilege_Cipher_Suite_Id_3 - For SOL_Conf section (if IPMI 2.0 is supported): * Enable_SOL * SOL_Privilege_Level * Force_SOL_Payload_Authentication * Force_SOL_Payload_Encryption * Character_Accumulate_Interval * Character_Send_Threshold * SOL_Retry_Count * SOL_Retry_Interval * Non_Volatile_Bit_Rate * Volatile_Bit_Rate Test) Using a previously checked out configuration file, modify the configuration file as follows below to try many configuration possibilities. Then for each configuration change: - Using the --diff and --filename options, verify that each field modified in the configuration file is indeed different than what is currently stored on the BMC. ipmi-config should output each difference to stdout. - Using the --commit and --filename options, commit the configuration file to the BMC. - Using the --diff and --filename options, verify that each field has been written to the BMC and there are no longer any differences ipmi-config should not output anything to stdout. - Ensure that fields can be changed once and then changed back. For example for Yes/No fields, configure a "Yes" to a "No", then back to a "Yes". Configuration changes to try: - For each "User" section: * Username o Change username to something different. o Ensure username of length 16 can be configured. * Enable_User o Can configure both Yes and No * Password o Can change username to something different. o Ensure empty password (no input) can be configured. o Ensure password of length 16 (20 if IPMI 2.0 supported) can be configured. * Lan_Enable_IPMI_Msgs o Can configure both Yes and No * Lan_Privilege_Limit o Can change privilege level to User, Operator, and Administrator * SOL_Payload_Access o Can configure both Yes and No - For the Lan_Channel section: * Volatile_Access_Mode o Can configure Disabled and Always_Available * Volatile_Enable_Per_Message_Auth o Can configure both Yes and No * Volatile_Channel_Privilege_Limit o Can configure User, Operator, and Administrator * Non_Volatile_Access_Mode o Can configure Disabled and Always_Available * Non_Volatile_Enable_Per_Message_Auth o Can configure both Yes and No * Non_Volatile_Channel_Privilege_Limit o Can configure User, Operator, and Administrator - For the Lan_Conf section: * IP_Address_Source o Can configure Static and Use_DHCP * IP_Address o Can configure a different IP address * MAC_Address o Can configure a different MAC address * Subnet_Mask o Can configure a different Subnet address * Default_Gateway_IP_Address o Can configure a different IP address * Default_Gateway_MAC_Address o Can configure a different MAC address * Backup_Gateway_IP_Address o Can configure a different IP address * Backup_Gateway_MAC_Address o Can configure a different MAC address - For the Lan_Conf_Auth section: * Callback_Enable_Auth_Type_None o Can configure both Yes and No * Callback_Enable_Auth_Type_MD2 o Can configure both Yes and No * Callback_Enable_Auth_Type_MD5 o Can configure both Yes and No * Callback_Enable_Auth_Type_Straight_Password o Can configure both Yes and No * User_Enable_Auth_Type_None o Can configure both Yes and No * User_Enable_Auth_Type_MD2 o Can configure both Yes and No * User_Enable_Auth_Type_MD5 o Can configure both Yes and No * User_Enable_Auth_Type_Straight_Password o Can configure both Yes and No * Operator_Enable_Auth_Type_None o Can configure both Yes and No * Operator_Enable_Auth_Type_MD2 o Can configure both Yes and No * Operator_Enable_Auth_Type_MD5 o Can configure both Yes and No * Operator_Enable_Auth_Type_Straight_Password o Can configure both Yes and No * Admin_Enable_Auth_Type_None o Can configure both Yes and No * Admin_Enable_Auth_Type_MD2 o Can configure both Yes and No * Admin_Enable_Auth_Type_MD5 o Can configure both Yes and No * Admin_Enable_Auth_Type_Straight_Password o Can configure both Yes and No - For the Lan_Conf_Security_Keys section (if IPMI 2.0 is supported): * K_G o Can configure a different key o Ensure empty key (no input) can be configured. - For the Lan_Conf_Misc: * Enable_Gratuitous_ARPs o Can configure both Yes and No * Enable_ARP_Response o Can configure both Yes and No * Gratuitous_ARP_Interval o Can configure a different value (e.g. 5 to 6) - For Rmcpplus_Conf_Privilege section: * Maximum_Privilege_Cipher_Suite_Id_0 o Can configure Unused, User, Operator, and Administrator. * Maximum_Privilege_Cipher_Suite_Id_1 o Can configure Unused, User, Operator, and Administrator. * Maximum_Privilege_Cipher_Suite_Id_2 o Can configure Unused, User, Operator, and Administrator. * Maximum_Privilege_Cipher_Suite_Id_3 o Can configure Unused, User, Operator, and Administrator. - For SOL_Conf section (if IPMI 2.0 is supported): * Enable_SOL o Can configure both Yes and No * SOL_Privilege_Level o Can configure User, Operator, and Administrator. * Force_SOL_Payload_Authentication o Can configure both Yes and No * Force_SOL_Payload_Encryption o Can configure both Yes and No * Character_Accumulate_Interval o Can configure a different value (e.g. 5 to 6) * Character_Send_Threshold o Can configure a different value (e.g. 5 to 6) * SOL_Retry_Count o Can configure a different value (e.g. 5 to 6) * SOL_Retry_Interval o Can configure a different value (e.g. 5 to 6) * Non_Volatile_Bit_Rate o Can configure a different bit rate (e.g. 57600 to 115200) * Volatile_Bit_Rate o Can configure a different bit rate (e.g. 57600 to 115200) Test) Start from machine where all "Non_Volatile" fields are identical to the "Volatile" fields. Checkout, modify, then commit all "Non_Volatile" fields to something different but not the "Volatile" fields. Using --diff, verify that only the "Non_Volatile" fields have changed and the "Volatile" fields have not changed. The field pairs should be different from each other. Power off the IPMI machine and power it back on. Verify that all "Volatile" fields now hold the new values stored in the "Non_Volatile" fields. The field pairs should be the same as each other. Test) Reboot the machine. Using --checkout, checkout the current configuration. Configure all fields to be the "opposite" or "different" of what they currently are (e.g. No to Yes, User to Administrator, etc.). Power off the machine and power it back on. Using the --diff option, verify that newly configured fields have been saved across a reboot. Again, configure all fields "opposite" again. Power off the machine and power it back on. Using the --diff option, verify that newly configured fields have been saved across a reboot. Test) If any parameters on the system are read only, does ipmi-config output "Read Only Field" appropriately? If not, is the field returning the proper completion code (typically 0x82)? bmc-info Testing ---------------- Goal: Ensure all important values are output and are correct. Test) Execute bmc-info with no bmc-info specific options, verify tool: - Executes without errors - All fields output are correct. Key fields to verify: * Firmware Revision * IPMI Version * Manufacturer ID o The name of the manufacter outputs e.g. "Manufacturer ID : SOME-COMPANY (1234)" vs. "Manufacturer ID : 1234" If the above is not the case, and the vendor is registered with IANA, is there a firmware bug? * Product ID * GUID * Channel Information - Medium Type o If IPMI over LAN is supported, atleast one should be == "802.3 LAN" * Channel Information - Vendor ID o Most if not all should be == "Intelligent Platform Management Interface forum (7154)" ipmi-chassis Testing -------------------- Goal: Ensure all important features function properly. Test) If the remote system supports an IPMI controllable LED: Execute ipmi-chassis with --chassis-identify=force, verify remote system: - Has LED turned on indefinitely. Execute ipmi-chassis with --chassis-identify=turn-off, verify remote system: - Has LED turned off. Execute ipmi-chassis with --chassis-identify=30, verify remote system: - Has LED turned on for approximately 30 seconds, then turns itself off. ipmi-sensors Testing -------------------- Goal: Ensure all important values are output and are correct. Test) Execute ipmi-sensors with no ipmi-sensors specific options, verify tool: - Executes without errors - All threshold and discrete sensor readings that should be output are output with a reading and/or event. * If N/A is output instead, is the sensor improperly listed a software sensor? Is the sensor disabled? Is sensor scanning disabled? Is the event-reading-type-code of the sensor correct? - All threshold values (temperature, rpm, voltage, etc.) are valid/correct values (no invalid numbers, no negative temperatures, etc.). * If not, are stored SDR values for this sensor correct? - All units are valid/correct. * If not, are stored SDR values for this sensor correct? - All groups are valid/correct. * If not, are stored SDR values for this sensor correct? Test) Execute ipmi-sensors with very verbose output (-vv), verify tool: - Executes without errors - All fields output are correct. Key fields to verify: * Sensor Number * Sensor Owner ID o BMC owned sensors should be 0x20. o The combination of Sensor Owner ID and Sensor Number should point to a unique sensor. * Entity ID o The name of the Entity ID outputs e.g. "Entity ID: system board (7)" vs. "Entity ID: 7" If the above is not the case, are all the Entity IDs valid? Do they belong in the proper ranges defined by the IPMI specification? * Lower Critical Threshold * Upper Critical Threshold * Lower Non-Critical Threshold * Upper Non-Critical Threshold * Lower Non-Recoverable Threshold * Upper Non-Recoverable Threshold o All thresholds listed are correct. Those that are not readable/relevant are output w/ "N/A". If not output with "N/A", does the BMC properly label them as readable vs. unreadable? * Assertion Event Enabled * Deassertion Event Enabled o All supported assertion and deassertion events are listed. If they are not listed, are they properly labeled as enabled/disabled in the SDR? Test) Execute ipmi-sensors in-band with the --bridge-sensors option to verify that sensors not owned by the BMC are output correctly, verify tool: - Executes without errors - All bridged sensors are output correctly. Test) Execute ipmi-sensors out-of-band with the --bridge-sensors option to verify that sensors not owned by the BMC are output correctly, verify tool: - Executes without errors - All bridged sensors are output correctly. Test) Testing Power Supply Sensors: - Use a dual power supply motherboard. - Verify ipmi-sensors lists the power supply sensors as having an event of "Presence Detected". - Unplug one of the power supplies. - Verify ipmi-sensors now lists the power supply sensor with an appropriate event message, such as "Power Supply Failure detected" or "Power Supply input lost (AC/DC)". - Plug the power supply back in. - Verify ipmi-sensors not lists the power supply sensors as having an event of "Presence Detected". Test) Testing Intrusion Sensors: - Verify ipmi-sensors lists the intrusion sensor as "OK". - Open the case/chassis/motherboard/etc. - Verify ipmi-sensors now lists the intrusion sensor with an appropriate event message, such as "General Chassis Intrusion". ipmi-sel Testing ---------------- Goal: Ensure all important values are output and are correct. Test) Execute ipmi-sel with no ipmi-sel specific options, verify tool: - Executes without errors - All dates on SEL records are correct * If not, Is the BMC time set correctly? * If not, is OS time/timezone set correctly? - Sensor names are output correctly. * If not, are the SEL records reporting the correct sensor number and/or sensor owner id? Test) Execute ipmi-sel with --display and --display-range, verify tool: - Executes without errors - Exact record ids listed in options are output. - Exact record ids output match record ids listed with default (i.e. list all records) output. * If not, are record ids stored incorrectly? Test) Execute ipmi-sel with --clear, verify tool: - Executes without errors - SEL is completely cleared. Subsequent calls to ipmi-sel result in no output and no errors. Test) **Nice to have** Execute ipmi-sel with no ipmi-sel specific options, verify tool: - Executes without errors - All columns headers and fields align properly * If not, are there SEL records that indicate events that were not listed as possible in the SDR? If so, perhaps some entries in the SDR to indicate those events are possible could be added, thus allowing the tools to output a cleaner, nicer output for the users. Test) **Nice to have** Execute ipmi-sel with no ipmi-sel specific options, verify tool: - Executes without errors - All events have an identified name in the "Name" column. In other words, there is no output like "Sensor #1". * If not, are there SDR records that identify every potential event that can occur on the motherboard. If not, perhaps some entries (most likely event-only records) in the SDR could help make the output of ipmi-sel cleaner, nicer, and better for the end user. ipmi-fru Testing ---------------- Goal: Ensure all important values are output and are correct. Test) Execute ipmi-fru with no ipmi-fru specific options, verify tool: - Executes without errors - All FRU entries are output fully - No outputs of checksum errors * If checksum errors are output, are checksums valid? - No error message outputs (keyword "Error" is output). ipmiconsole Testing ------------------- Goal: Ensure all important features function properly. Configure all BIOS settings and SOL settings to enable SOL. Enable the remote machine to accept sysrqs (in Linux, this requires configuration of console=ttySX on the kernel boot line). For purpose of this set of tests, consider this set of configuration options from ipmi-config the "pristine" SOL configuration and the SOL1 user configuration. Section UserX ## Give Username Username SOL1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Administrator ## Possible values: Yes/No SOL_Payload_Access Yes EndSection Section Rmcpplus_Conf_Privilege ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_0 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_1 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_2 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_3 Administrator EndSection Section SOL_Conf ## Possible values: Yes/No Enable_SOL Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary SOL_Privilege_Level Administrator ## Possible values: Yes/No Force_SOL_Payload_Authentication Yes ## Possible values: Yes/No Force_SOL_Payload_Encryption Yes ## Give a valid integer. Each unit is 5ms Character_Accumulate_Interval 5 ## Give a valid number Character_Send_Threshold 50 ## Give a valid integer SOL_Retry_Count 5 ## Give a valid integer. Interval unit is 10ms SOL_Retry_Interval 10 ## Possible values: Serial/9600/19200/38400/57600/115200 Non_Volatile_Bit_Rate 115200 ## Possible values: Serial/9600/19200/38400/57600/115200 Volatile_Bit_Rate 115200 ## Give a valid port number ## SOL_Payload_Port_Number 623 EndSection Test) Configure "pristine" configuration. Execute ipmiconsole, authentication with SOL1, verify tool: - Establishes a SOL session by outputting "[SOL established]" - Verify session can be exitted cleanly (by default type &.). Test) Begin with "pristine" configuration. Disable SOL Payload access for user sol1. Execute ipmiconsole, authentication with SOL1, verify tool: - Does not establish an SOL session. Most likely/best error message "SOL unavailable". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure lan_privilege_limit "user" for sol1. Execute ipmiconsole, authentication with SOL1 and privilege level user (-l user), verify tool: - Does not establish an SOL session. Most likely/best error message "privilege level insufficient". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure lan_privilege_limit "user" for sol1. Configure sol_privilege_level to "user". Execute ipmiconsole, authentication with SOL1 and privilege level user (-l user), verify tool: - Establishes a SOL session by outputting "[SOL established]" - Verify session can be exitted cleanly (by default type '&.'). Test) Begin with "pristine" configuration. Disable SOL (Enable_SOL field). Execute ipmiconsole, authentication with SOL1, verify tool: - Does not establish an SOL session. Most likely/best error message "SOL unavailable" * It is most important that the connection not succeed. Test) Establish a SOL session. While in a session, generate a break (by default generated via '&B') and ensure the remote console has received it. In Linux, if sysrqs are enabled properly, a '&B?' should output the linux sysrq menu. Test) Establish a SOL session. While in a session, reboot the remote machine, and ensure the BIOS (or EFI, etc.) can be entered and BIOS settings can be modified. Test) Establish a SOL session. While a session is currently active, in a different window, execute ipmiconsole w/ the --dont-steal option, authenticating with SOL1, verify tool: - Does not establish an SOL session. Most likely/best error message "SOL in use". The original SOL session has stayed alive. * If this does not work, does proper SOL payload activation status work? Test) Establish a SOL session. While a session is currently active, in a different window, execute ipmiconsole w/ the --deactivate option, authenticating with SOL1, verify tool: - Does not establish an SOL session. - The original SOL session has been terminated. Most likely/best error message "SOL session stolen". * If this does not work, does proper SOL payload deactivation work? Test) Establish a SOL session. While a session is currently active, in a different window, execute ipmiconsole, authenticating with SOL1, verify tool: - Establishes a SOL session by outputting "[SOL established]" - The original SOL session has been terminated, and "[SOL session stolen]" is reported. * If this does not work, does SOL properly inform "old" sessions that it is being terminated? does proper SOL payload deactivation work? Test) Establish a SOL session with SOL payload instance 1 (--sol-payload-instance=1). While a session is currently active, in a different window, execute ipmiconsole, using a different payload instance (i.e. --sol-payload-instance=2): If multiple SOL instances are support, verify tool: - Establishes a SOL session by outputting "[SOL established]" in the second session. - The original SOL session has not been terminated, and continues to work. If multiple SOL instances are not supported, verify tool: - Errors out appropriately. Most likely/best error message "BMC Busy." Test) Configure "pristine" configuration. Execute ipmiconsole, authentication with SOL1, with option -I 0 Execute ipmiconsole, authentication with SOL1, with option -I 1 Execute ipmiconsole, authentication with SOL1, with option -I 2 verify tool: - Does not establish an SOL session under each test, outputting "SOL requires encryption". * It is most important that the connection not succeed. Execute ipmiconsole w/ -I 3, authentication with SOL1, verify tool: - Establishes a SOL session by outputting "[SOL established]" Test) Begin with "pristine" configuration. Configure remote system to *not* require SOL Payload Authentication and *not* require SOL Payload Encryption. Execute ipmiconsole, authentication with SOL1, with option -I 0 Execute ipmiconsole, authentication with SOL1, with option -I 1 Execute ipmiconsole, authentication with SOL1, with option -I 2 Execute ipmiconsole, authentication with SOL1, with option -I 3 verify tool: - Establishes a SOL session by outputting "[SOL established]" under each test. ipmipower Testing ----------------- Goal: Ensure all important features function properly. Test) Begin with the remote machine currently powered off. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "off". Execute ipmipower w/ --on, authenticating with USER1, verify tool: - Returns an error of "privilege level cannot be obtained for this user" Execute ipmipower w/ --on, authenticating with OPERATOR1, verify tool: - Returns "ok" and turns on the node. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "on". Execute ipmipower w/ --off, authenticating with USER1, verify tool: - Returns an error of "privilege level cannot be obtained for this user" Execute ipmipower w/ --off, authenticating with OPERATOR1, verify tool: - Returns "ok" and turns off the node. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "off". Test) Begin with the remote machine currently powered off. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "off". Execute ipmipower w/ --on, authenticating with USER1, verify tool: - Returns an error of "privilege level cannot be obtained for this user" Execute ipmipower w/ --on, authenticating with ADMIN1, verify tool: - Returns "ok" and turns on the node. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "on". Execute ipmipower w/ --off, authenticating with USER1, verify tool: - Returns an error of "privilege level cannot be obtained for this user" Execute ipmipower w/ --off, authenticating with ADMIN1, verify tool: - Returns "ok" and turns off the node. Execute ipmipower w/ -l user and --stat, authenticating with USER1, verify tool: - Executes without errors. - Properly reports the state of the machine as "off". In-Band KCS Testing ------------------- Goal: Ensure all important features function properly. Test) Execute bmc-info in-band, verify tool: - Executes without errors. - If tool fails to execute, determine: * A) Are memory-mapped address properly stored in the SMBIOS or other locations? * B) Is KCS accessed through the default memory-mapped addresses? Out-of-Band IPMI 1.5 Testing ---------------------------- Goal: Ensure all important features function properly. For purpose of this set of tests, consider this set of configuration options from ipmi-config the "pristine" BMC configuration and user configuration. Section User1 ## Give Username ## Username NULL ## Possible values: Yes/No or blank to not set Enable_User No ## Give password or blank to clear. MAX 16 chars. Password ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit No_Access EndSection Section UserA ## Give Username Username USER1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit User EndSection Section UserB ## Give Username Username OPERATOR1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Operator EndSection Section UserC ## Give Username Username ADMIN1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Administrator EndSection Section Lan_Channel ## Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared Volatile_Access_Mode Always_Available ## Possible values: Yes/No Volatile_Enable_Per_Message_Auth Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary Volatile_Channel_Privilege_Limit Administrator ## Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared Non_Volatile_Access_Mode Always_Available ## Possible values: Yes/No Non_Volatile_Enable_Per_Message_Auth Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary Non_Volatile_Channel_Privilege_Limit Administrator EndSection Section Lan_Conf_Auth ## Possible values: Yes/No Callback_Enable_Auth_Type_None No ## Possible values: Yes/No Callback_Enable_Auth_Type_MD2 No ## Possible values: Yes/No Callback_Enable_Auth_Type_MD5 No ## Possible values: Yes/No Callback_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No User_Enable_Auth_Type_None No ## Possible values: Yes/No User_Enable_Auth_Type_MD2 No ## Possible values: Yes/No User_Enable_Auth_Type_MD5 Yes ## Possible values: Yes/No User_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Operator_Enable_Auth_Type_None No ## Possible values: Yes/No Operator_Enable_Auth_Type_MD2 No ## Possible values: Yes/No Operator_Enable_Auth_Type_MD5 Yes ## Possible values: Yes/No Operator_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Admin_Enable_Auth_Type_None No ## Possible values: Yes/No Admin_Enable_Auth_Type_MD2 No ## Possible values: Yes/No Admin_Enable_Auth_Type_MD5 Yes ## Possible values: Yes/No Admin_Enable_Auth_Type_Straight_Password No EndSection Test) Configure "pristine" configuration. Execute bmc-info, authenticating with USER1, with privilege level user (-l user) Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator) Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin) verify tool: - Executes without errors for each test. Execute bmc-info, authenticating with USER1, with privilege level operator (-l operator). Execute bmc-info, authenticating with USER1, with privilege level admin (-l admin). Execute bmc-info, authenticating with OPERATOR1, with privilege level admin (-l admin). verify tool: - Exits with error. Most likely/best error message "privilege level cannot be obtained for this user". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USERANONYMOUS (i.e. no username and no password input), verify tool: - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Execute bmc-info, authenticating with a bogus username (e.g. FOO) - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USER1, with a bad password - Exits with error. Most likely/best error message "password verification timeout". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USER1, with option -a md2 Execute bmc-info, authenticating with USER1, with option -a straight_password_key Execute bmc-info, authenticating with USER1, with option -a none verify tool: - Exits with error. Most likely/best error message "authentication type unavailable for attempted privilege level" for each test. * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure User1 to be enabled and have a privilege_limit of "user". Execute bmc-info, authenticating with USERANONYMOUS (i.e. no username and no password input), verify tool: - Executes without errors. Test) Begin with "pristine" configuration. Configure User1 to be enabled, with a password, and have a privilege_limit of "user". Execute bmc-info, authenticating with USERNULL (i.e. no username and w/ the proper password input), verify tool: - Executes without errors. Test) Begin with "pristine" configuration. Configure USER1, OPERATOR1, and ADMIN1 users to be off (i.e. Enable_User = No). Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 verify tool: - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure USER1, OPERATOR1, and ADMIN1 users IPMI messaging to be off (i.e. Lan_Enable_Ipmi_Msgs = No). Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 verify tool: - Exits with error. Most likely/best error message "password verification timeout", "session timeout", or "privilege level insufficient". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure all "Lan_Conf_Auth" fields to "Yes". Execute bmc-info, authenticating with USER1, with option -a md5 Execute bmc-info, authenticating with USER1, with option -a md2 Execute bmc-info, authenticating with USER1, with option -a straight_password_key Execute bmc-info, authenticating with USER1, with option -a none verify tool: - Executes without errors for each test. Test) Begin with "pristine" configuration. Disable the LAN Channel (Volatile_Access_Mode = Disabled) Execute bmc-info, authenticating with USER1, verify tool: - Exits with error. Most likely/best error message "connection timeout". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure LAN Channel Privilege Limit to User. Execute bmc-info, authenticating with USER1, verify tool: - Executes without errors. Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator) Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin) - Exits with error. Most likely/best error message "privilege level cannot be obtained for this user". * It is most important that the connection not succeed. Execute ipmipower, authenticating with OPERATOR1, with --on Execute ipmipower, authenticating with ADMIN1, with --on - Exits with error. Most likely/best error message "privilege level cannot be obtained for this user". * It is most important that the connection not succeed. (achu note: I do not currently possess a motherboard that passes this last test, however, I am 99% sure I've had atleast one motherboard in the past that did indeed pass this test.) Out-of-Band IPMI 2.0 Testing ---------------------------- Goal: Ensure all important features function properly. For purpose of this set of tests, consider this set of configuration options from ipmi-config the "pristine" BMC configuration and user configuration. Section User1 ## Give Username ## Username NULL ## Possible values: Yes/No or blank to not set Enable_User No ## Give password or blank to clear. MAX 16 chars. Password ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit No_Access EndSection Section UserA ## Give Username Username USER1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit User EndSection Section UserB ## Give Username Username OPERATOR1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Operator EndSection Section UserC ## Give Username Username ADMIN1 ## Possible values: Yes/No or blank to not set Enable_User Yes ## Give password or blank to clear. MAX 16 chars. Password somepassword ## Possible values: Yes/No Lan_Enable_IPMI_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Administrator EndSection Section Lan_Conf_Security_Keys ## Give string or blank to clear. Max 20 chars K_G EndSection Section Rmcpplus_Conf_Privilege ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_0 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_1 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_2 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_3 Administrator EndSection Test) Configure "pristine" configuration. Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1, with privilege level user (-l user) Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator) Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin) verify tool: - Executes without errors for each test. Execute bmc-info, authenticating with USER1, with -I 0 Execute bmc-info, authenticating with USER1, with -I 1 Execute bmc-info, authenticating with USER1, with -I 2 Execute bmc-info, authenticating with USER1, with -I 3 verify tool: - Executes without errors for each test. Execute bmc-info, authenticating with USER1, with privilege level operator (-l operator). Execute bmc-info, authenticating with USER1, with privilege level admin (-l admin). Execute bmc-info, authenticating with OPERATOR1, with privilege level admin (-l admin). verify tool: - Exits with error. Most likely/best error messages are "password invalid" or "privilege level cannot be obtained for this user". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USERANONYMOUS (i.e. no username and no password input), verify tool: - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Execute bmc-info, authenticating with a bogus username (e.g. FOO) - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USER1, with a bad password - Exits with error. Most likely/best error message "password invalid". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure User1 to be enabled and have a privilege_limit of "user". Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USERANONYMOUS (i.e. no username and no password input), verify tool: - Executes without errors. Test) Begin with "pristine" configuration. Configure User1 to be enabled, with a password, and have a privilege_limit of "user". Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USERNULL (i.e. no username and w/ the proper password input), verify tool: - Executes without errors. Test) Begin with "pristine" configuration. Configure USER1, OPERATOR1, and ADMIN1 users to be off (i.e. Enable_User = No). Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 verify tool: - Exits with error. Most likely/best error message "username invalid". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure USER1, OPERATOR1, and ADMIN1 users IPMI messaging to be off (i.e. Lan_Enable_Ipmi_Msgs = No). Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 verify tool: - Exits with error. Most likely/best error message "password invalid", "session timeout", or "privilege level insufficient". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure a non-null K_G key. Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1, without specify -k verify tool: - Exits with error. Most likely/best error message "k_g invalid". * It is most important that the connection not succeed. Execute bmc-info, authenticating with USER1, specify -k key. verify tool: - Executes without errors. Test) Begin with "pristine" configuration. Configure each field in Rmcpplus_Conf_Privilege to "User". Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 0 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 1 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 2 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 3 verify tool: - Executes without errors for each test. Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 0 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 1 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 2 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 3 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 0 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 1 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 2 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 3 verify tool: - Exits with error. Most likely/best error message "privilege level cannot be obtained for this user". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure each field in Rmcpplus_Conf_Privilege to "Unused". Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 0 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 1 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 2 Execute bmc-info, authenticating with USER1, with privilege level user (-l user), with -I 3 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 0 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 1 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 2 Execute bmc-info, authenticating with OPERATOR1, with privilege level operator (-l operator), with -I 3 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 0 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 1 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 2 Execute bmc-info, authenticating with ADMIN1, with privilege level admin (-l admin), with -I 3 verify tool: - Exits with error. Most likely/best error message "cipher suite id unavailable". * It is most important that the connection not succeed. Test) Begin with "pristine" configuration. Configure each user to have a password > 16 bytes in length. Execute all below tests with IPMI 2.0 (-D lan_2_0) Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 verify tool: - Executes without errors for each test. Test) Begin with "pristine" configuration. Configure each user to have a password > 16 bytes in length. Execute all below tests with IPMI 1.5 (-D lan) Execute bmc-info, authenticating with USER1 Execute bmc-info, authenticating with OPERATOR1 Execute bmc-info, authenticating with ADMIN1 - Exits with error. Most likely/best error message "password verification timeout". * It is most important that the connection not succeed. Misc: Bad Password Threshold ---------------------------- Goal: Ensure all important features function properly. Test) If Bad Password Thresholds are supported, configure a non-zero Bad Password Threshold. Verify that a user is disabled after the number of bad passwords crosses the threshold. Test) If Bad Password Thresholds and Attempt Count Reset Interval are supported, configure a non-zero Bad Password Threshold and non-zero Attempt Count Reset Interval. Verify that a user is diabled after the number of bad passwords crosses the threshold occurs with the Attempt Count Reset Interval. Verify that a user is NOT disabled if the number of bad passwords crosses the threshold outside of the Attempt Count Reset Interval. Test) If Bad Password Thresholds and a User Lockout Interval are supported, configure a non-zero Bad Password Threshold and non-zero User Lockout Interval. Verify that a user is diabled after the number of bad passwords crosses the threshold. Verify that a user is enabled after the User Lockout Interval has passed. Test) If a user has been disabled due to excess Bad Passwords, ensure an event message has been generated to indicate this. Misc: ARP --------- Goal: Ensure all important features function properly. Test) Configure Gratuitous ARPs On. Verify (probably with tcpdump or an equivalent network sniffer) that Gratuitous ARPs are enabled and sending gratuitouts arps on the network. Configure Gratuitous ARPs Off. Verify (probably with tcpdump or an equivalent network sniffer) that Gratuitous ARPs are no longer being sent on the network. Test) Configure ARP Responses On. Verify (probably with tcpdump or an equivalent network sniffer) that ARP Responses are enabled and sending ARP responses back from requests. Configure ARP Responses Off. Verify (probably with tcpdump or an equivalent network sniffer) that ARP Responses are disabled and not responding to ARP requests. Test) Configure both Gratuitous ARPs and ARP Responses Off Verify that IPMI over LAN still functions if you manually insert the remote MAC address into your local ARP cache. In Linux, 'arp -s ' adds the MAC address to the local ARP cache. freeipmi-1.6.4/doc/freeipmi-bugs-issues-and-workarounds.txt0000644002055400205540000017161613527331635023767 0ustar00achuachu00000000000000FreeIPMI Bugs, Issues, and Workarounds by Albert Chu chu11@llnl.gov Last Updated: August 12, 2016 The following are some short descriptions of the issues I've found while developing FreeIPMI on various motherboards. The descriptions below also describe workarounds I've had to implement to get around issues. When possible, the motherboards these issues were found on are also documented. Each of the issues below is listed under one of the following categories: [COMPLIANCE] - IPMI implementations that are out of compliance with the IPMI specification. These issues range from simple bugs in the implementation, to misinterpretation of the IPMI specification, to flag out illegal implementations. [INTERPRETATION] - Interpretation ambiguity between multiple vendors and the IPMI specification. [IMPLEMENTATION] - Implementations that are legal IPMI implementations, but implementation choices makes IPMI poorer, confusing, or more difficult to use. [FUNCTIONALITY] - Vendor appears to just have a bug For the record, I have nothing against the vendors and the products that have these issues. I am just as prone to programming bugs as they are. The IPMI specification is gigantic and mistakes will happen. I expect some design decisions were made for time to release, cost, customer needs, etc. too. This documentation is mostly for historical purposes, people searching for information, and to document the difficulty of developing portable IPMI code. ---------------------- | Inband IPMI Issues | ---------------------- ---------------------------------------------------------------------- Inband IPMI Issue #1: [COMPLIANCE] The SMBIOS/DMI tables do not properly indicate that KCS base address is IO instead of memory-mapped. Seen on: HP ProLiant DL145 G1 Resolution: Workaround option added to inform software to use memory-mapped IO. ---------------------------------------------------------------------- ----------------------------- | LAN Authentication Issues | ----------------------------- ---------------------------------------------------------------------- LAN Authentication Issue #1: [IMPLEMENTATION] BMCs would not respond to retransmissions of a Get Session Challenge Request if a previous Get Session Challenge response was lost. Seen on: Intel SR870BN4/Tiger 4 Resolution: Workaround added to send retransmitted Get Session Challenge requests from a different source port. LAN Authentication Issue #2: [COMPLIANCE] The only authentication supported by the motherboard is an OEM specific authentication. IPMI specification requires several non-OEM authentication mechanisms. Seen on: Undocumented Motherboard Resolution: None Notes: Undocumented motherboard was an early Supermicro motherboard with IPMI support, but I never documented which one (achu). LAN Authentication Issue #3: [COMPLIANCE] The initial outbound sequence number on activate session response is off by one. The activate session response packet is supposed to contain the initial outbound sequence number passed during the request. Seen on: Intel SE7520JR2 with National Semiconductor PC87431M mBMC, Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Initially, workaround was done to accept off by one sequence number. Later when packet windows were implemented, the situation was automatically handled. LAN Authentication Issue #4: [COMPLIANCE] The IPMI 2.0 packet responses for RAKP 2 have payload lengths that are off by 1 (i.e. an invalid length). Seen on: Supermicro H8QME with SIMSO daughter card Resolution: Workaround option added to inform software to handle the invalid length. Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. LAN Authentication Issue #5: [COMPLIANCE] Username capabilities and/or K_g status are not reported properly by the Get Authentication Capabilities response. Seen on: Asus P5M2, Asus P5MT-R, Asus S162-E4, Asus RX4, Sun Fire X4150, Sun Fire X4450, Intel SR1520ML, Intel X38ML Resolution: Workaround option added to inform software to ignore flags in the Get Authentication Capabilities response. LAN Authentication Issue #6: [COMPLIANCE] The IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL flag does not work in the Open Session phase of IPMI 2.0 connections. The Open Session response seems to simply return the privilege level passed in the request (i.e. the IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL flag rather than the actual highest level privilege that can be used). Seen on: Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Workaround option added to inform software to not pass IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL and pass a specific privilege level. LAN Authentication Issue #7: [COMPLIANCE] The username field is incorrectly padded during IPMI 2.0 authentication, leading to invalid keys. Seen on: Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Workaround option added to inform software to adjust the username when authenticating. LAN Authentication Issue #8: [COMPLIANCE] When the authentication algorithm is HMAC-MD5-128 and the password is greater than 16 bytes, the Intel BMC incorrectly truncates the password to 16 bytes when generating keys, leading to invalid keys. Seen on: Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Workaround option added to inform software to adjust the password when authenticating. LAN Authentication Issue #9: [COMPLIANCE] During the RAKP4 response, the integrity check value is incorrectly calculated based on the integrity algorithm instead of the authentication algorithm. Seen on: Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Workaround option added to inform software to look for and handle this situation. LAN Authentication Issue #10: [COMPLIANCE] During the RAKP3 request, the name_only_lookup field must be disabled, it cannot be enabled. Seen on: Intel SE7520AF2 with Intel Server Management Module (Professional Edition) Resolution: Workaround option added to inform software to disable the field. LAN Authentication Issue #11: [COMPLIANCE] Cipher suite IDs are are incorrectly attached to specific privilege levels rather than a maximum privilege level limit. So you can only authenticate at the configured privilege level rather than a privilege level <= to it. Seen on: Undocumented Motherboard Resolution: By passing IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL during the session establishment instead of the specific privilege level, the problem is avoided. Notes: Undocumented motherboard was an early Tyan motherboard with IPMI 2.0 support, but never documented which one (achu). LAN Authentication Issue #12: [COMPLIANCE] During a RAKP2 response, the key exchange authentication code is the wrong length. Seen on: Sun Fire 4100 with ILOM Resolution: Workaround option added to inform software to handle the invalid length. LAN Authentication Issue #13: [COMPLIANCE] The remote BMC incorrectly calculates keys using the privilege specified in the open session stage rather than the privilege used during the RAKP1 stage. This can be problematic if you specify IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL during that stage instead of a specific privilege level (i.e. operator). Seen on: Sun Fire X4150, Inventec 5441/Dell Xanadu II, Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Intel S5500WBV/Penguin Relion 700, Intel S2600JF/Appro 512X, Quanta QSSC-S4R/Appro GB812X-CN, Dell C5220 Resolution: Workaround option added to inform software to pass a specific privilege level instead of IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL. Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. Due to legacy, vendor reports will not fix on Intel S5500WBV/Penguin Relion 700 and Intel S2600JF/Appro 512X. LAN Authentication Issue #14: [COMPLIANCE] Given specific configuration of IPMI 1.5 authentication types, certain user privileges are not specified correctly during Get Authentication Capabilities and a CCh = "Invalid data field in request" is returned during Activiate Session. Seen on: Inventec 5441/Dell Xanadu II Resolution: None Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. LAN Authentication Issue #15: [COMPLIANCE] Disabling a specific cipher suite ID does not prohibit a user from continuing to use that cipher suite ID. Seen on: Supermicro X8DTG, Supermicro X8DTU, MSI MS-91D2, Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: None LAN Authentication Issue #16: [COMPLIANCE] Cipher suites 0 fails to authenticate. During the RAKP4 communication, an integrity key is returned, when it in fact should be 0 length. Seen on: Supermicro X8DTG, Supermicro X8DTU, Intel S5500WBV/Penguin Relion 700, Intel S2600JF/Appro 512X Resolution: Workaround option added to inform software to ignore the non-zero length field. Notes: Confirmed fixed in newer firmware for Supermicro X8DTG, Supermicro X8DTU, Intel S2600JF/Appro 512X. LAN Authentication Issue #17: [COMPLIANCE] Cipher suites 7 and 8 fail to establish a session. Authentication codes are not returned for session packets, therefore packets are dropped as they are viewed as malformed. Seen on: Supermicro X8DTG, Supermicro X8DTU Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro X8DTG, Supermicro X8DTU. LAN Authentication Issue #18: [COMPLIANCE] Cipher suites 11 and 12 fail to establish a session. Authentication codes returned are incorrect. Seen on: Supermicro X8DTG, Supermicro X8DTU Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro X8DTG, Supermicro X8DTU. LAN Authentication Issue #19: [IMPLEMENTATION] When attempting to authenticate with a disabled Cipher Suite ID, a 0Ah status ("Unauthorized role or privelege level requested.") is returned instead of 11h ("No Cipher Suite match with proposed security algorithms."). The resulting error message is confusing. Seen on: Supermicro X8DTG Resolution: None LAN Authentication Issue #20: [IMPLEMENTATION] When attempting to authenticate with a disabled Cipher Suite ID, a 12h status ("Illegal or Unrecognized parameter.") is returned instead of 11h ("No Cipher Suite match with proposed security algorithms."). The resulting error message is confusing. Seen on: MSI MS-91D2 Resolution: None LAN Authentication Issue #21: [COMPLIANCE] The tag bits for some of the cipher records are wrong. Seen on: Sun Fire 4100 with ILOM Resolution: Workaround added to parse unique cipher suite records. LAN Authentication Issue #22: [COMPLIANCE] The motherboard reports support of Cipher Suite ID 15, however when attemption authenticate with it, it is reported as unsupported. Seen on: Intel S2600JF/Appro 512X Resolution: None Notes: Confirmed fixed in newer firmware. LAN Authentication Issue #23: [COMPLIANCE] The motherboard allows IPMI 1.5 authentication when > 16 byte passwords are configured. It appears the motherboard allows users to authenticate using the 16 byte equivalent truncated password. This violates the text in Table 22-35, which states "A password that has been stored as a 20-byte password cannot be used for establishing an IPMI v1.5 session." Seen on: Supermicro X8DTG-D LAN Authentication Issue #24: [COMPLIANCE] When activating a session, the remote system requires that the "maximum privilege requested" specified in the request be identical to the maximum set for a user. It cannot be less than it. When this occurs, an error of 0xD4 ("Cannot execute command due to insufficient privilege level") is unexpectedly returned. Seen on: Xyratex HB-F8-SRAY Resolution: Specify specific privilege level to workaround this issue. LAN Authentication Issue #24: [COMPLIANCE] When authenticating with the 'straight password key' authentication type, all responses from a session contain an empty authentication code. Seen on: Xyratex HB-F8-SRAY Resolution: Workaround added to ignore these invalid authentication codes. LAN Authentication Issue #25: [COMPLIANCE] Cannot authenticate with a user without assigning privilege limit of Administrator. Seen on: Xyratex HB-F8-SRAY Resolution: None LAN Authentication Issue #26: [COMPLIANCE] Cannot authenticate with IPMI 1.5, authentication code generated incorrectly. Seen on: Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: Workaround added to ignore these invalid authentication codes. ---------------------------------------------------------------------- ---------------------- | LAN Session Issues | ---------------------- ---------------------------------------------------------------------- LAN Session Issue #1: [COMPLIANCE] There is no response from the IPMI close command if a RESET is executed. Seen on: Intel SR870BN4/Tiger 4 Resolution: Workaround added to close session without waiting for response. LAN Session Issue #2: [COMPLIANCE] After the IPMI session is brought up, packet responses return empty session IDs (i.e. 00000000h) to the client. Seen on: Tyan S2882 with m3289 BMC Resolution: Workaround option added to inform software to accept empty session IDs. Notes: Problem is reported to be fixed in newer firmware for Tyan S2882 with m3289 BMC. LAN Session Issue #3: [COMPLIANCE] When Per-Message Authentication is disabled, packet responses contain non-null authentication data when they should be null. Seen on: Dell PowerEdge 2850, Dell Poweredge SC1425 Resolution: Workaround option added to verify unexpected non-null authentication codes as though they were expected. Notes: Confirmed fixed in newer firmware for Dell PowerEdge 2850, Dell Poweredge SC1425. LAN Session Issue #4: [COMPLIANCE] The remote BMC will advertise that Per Message Authentication is disabled, but actually require it for the protocol. Seen on: IBM eServer 325 Resolution: Workaround option added to inform software to use Per Message Authentication no matter what is advertised by the remote BMC. Notes: Differs from Session Issue #5 below in resolution. LAN Session Issue #5: [COMPLIANCE] The remote BMC will advertise that Per Message Authentication is disabled, but actually require it for the protocol. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: Workaround added to notice this condition and re-enable Per Message Authentication. Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. LAN Session Issue #6: [COMPLIANCE] Session sequence numbers have the wrong endian during IPMI 1.5 sessions. Seen on: Sun Fire 4100 with ILOM Resolution: Workaround option added to inform software to handle incorrect endian sequence numbers. LAN Session Issue #7: [COMPLIANCE] LAN session headers contain invalid checksums. Seen on: Supermicro X9SCM-iiF, Supermicro X9DRi-F, Supermicro X9DRFR Resolution: Workaround option added to inform software to ignore bad checksums. LAN Session Issue #8: [INTERPRETATION] LAN session is restricted to callback privilege level when "user_restricted_to_callback" field is enabled. The field was initially used only for serial connections. It appears, most vendors ignore the field if a LAN connection is used. However, some vendors (such as below) honor the field. By honoring the field, a session can never be authenticated at privilege level above CALLBACK, leading to almost no IPMI commands being able to be used. Seen on: Gigabyte MD90-FS0-ZB Resolution: None LAN Session Issue #9: [COMPLIANCE] On some motherboards IPMI over LAN can be done in shared mode or dedicated mode. When operating in shared mode LAN session sequence numbers "skip" (i.e. 1, 3, 5) instead of be sequential (i.e. 1, 2, 3) as normal behavior during a specific session. The problem is not exhibited during dedicated mode. Seen on: ASROCK MT-C224 Resolution: None, the probability of a session drop is only increased because the session window is effectively cut in half. ---------------------------------------------------------------------- -------------- | SDR Issues | -------------- ---------------------------------------------------------------------- SDR Issue #1: [COMPLIANCE] The record count reported by a Get SDR Repository Info command is not consistent to the number of records that exist on the motherboard. Seen on: Fujitsu RX 100, Fujitsu RX300/200-S8 Resolution: Workaround added to recognize situation and adjust count. SDR Issue #2: [COMPLIANCE] The record ID returned from a Get SDR Record command is sometimes different from the record ID passed in. Seen on: Supermicro X6-DHR-1G with BMC2.0 daughter card Resolution: No resolution in FreeIPMI required. Resolved in IPMItool with workaround to detect issue and use input record ID instead of output record ID. SDR Issue #3: [COMPLIANCE] When reading a SDR record, sometimes records list an invalid excess number of bytes. For example, the SDR record is 15 bytes long, but a record of length 20 is indicated. Seen on: HP Proliant DL585G7 Resolution: Workaround added to adjust and handle the correct length of the record. SDR Issue #4: [COMPLIANCE] When reading SDR records, the SDR last record id record is not implemented, leading to errors when reading the SDR. Seen on: Unspecified Inspur motherboard Resolution: Workaround added to stop reading records after recognized max. SDR Issue #5: [COMPLIANCE] When reading an entire SDR record (with IPMI_SDR_READ_ENTIRE_RECORD_BYTES_TO_READ) the response returns fewer bytes than the actual length of the record. This leads to issues later during SDR caching. When reading SDR records with partial reads, things work correctly. Seen on: Xyratex HB-F8-SRAY Resolution: Workaround added to detect issue and do parital reads instead. SDR Issue #6: [COMPLIANCE] Retrieving sensors results in a "IPMI Internal Error" b/c a "Get SDR Repository Info" command is not supported on the motherboard (completion code 0xC1). Seen on: Artesyn ATCA-7367 Resolution: None SDR Issue #7: [COMPLIANCE] Retrieving sensors results in a "IPMI Internal Error" b/c a "Reserve SDR Repository" command is not supported on the motherboard (completion code 0xC1). Seen on: Artesyn ATCA-7367 Resolution: None SDR Issue #8: [IMPLEMENTATION] Atleast 1 event only record lists an event reading type code of "threshold" and the sensor type of "other units based sensor", yet event only records do not contain sensor unit information. So any event that is based on this SDR entry cannot be properly interpreted. Seen on: QuantaPlex T42D-2U Resolution: Workaround to ignore such event records SDR Issue #9: [FUNCTIONALITY] The last record entry in the SDR always returns 0xC3 when being read. Seen on: Dell Poweredge FC830 Resolution: Workaround to ignore last SDR entry ---------------------------------------------------------------------- -------------------------- | Serial-Over-LAN Issues | -------------------------- ---------------------------------------------------------------------- Serial-Over-LAN Issue #1: [COMPLIANCE] Serial breaks are not supported/do not work. Seen on: Undocumented Motherboard Resolution: None Notes: Undocumented motherboard was an early Tyan motherboard with IPMI support 2.0, but I never documented which one (achu). Serial-Over-LAN Issue #2: [COMPLIANCE] SOL payload sizes are reported incorrectly. Seen on: Asus P5M2, Asus P5MT-R, Asus S162-E4, Asus RX4, Intel SR1520ML, Intel X38ML, Inventec 5441/Dell Xanadu II, Supermicro X8DTH, Supermicro X8DTH-iF, Supermicro X8DTG, Supermicro X8DTU, Quanta QSSC-S4R/Appro GB812X-CN, Intel S5500WBV/Penguin Relion 700 Resolution: Workaround option added to inform software to ignore payload size checks and assume reasonable maximums. Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. Problem is reported to be fixed in newer firmware for Supermicro X8DTH-iF. Serial-Over-LAN Issue #3: [COMPLIANCE] A non-default SOL port is specified but not functional. Seen on: Asus P5M2, Asus P5MT-R Resolution: Workaround option added to inform software to ignore the non-default port and assume the default SOL port is still used. Serial-Over-LAN Issue #4: [COMPLIANCE] The Get Channel Payload Support command is not supported. Seen on: Sun Fire 4100 with ILOM, Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: Workaround option added to inform software to skip this point in the SOL state machine. Notes: This command is optional in the IPMI spec, it is not optional if SOL is supported. Serial-Over-LAN Issue #5: [COMPLIANCE] SOL sessions are not deactivated after a Deactivate Payload request, despite the response indicating success. This could lead to a loop that continually believes a SOL session is active, tries to deactivate it, believes it is deactivated, then checks again if it is active. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: Code added to error after a number of failed deactivations. Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. This is similar to issue #17 below. Serial-Over-LAN Issue #6: [COMPLIANCE] When a new IPMI session is started and steals the SOL session from a previous one, the initial SOL session is not sent a "SOL is deactivating" flag in a "BMC to Remote Console" packet. The initial IPMI session should eventually time out, but the closing is not clean. In some cases, the IPMI session may "stay alive" and it is only serial data that may time out, leading to a situation that may be very similar to Serial-Over-LAN Issue #8. Seen on: Supermicro H8QME with SIMSO daughter card, Inventec 5441/Dell Xanadu II, Inventec 5442/Dell Xanadu III, Dell Poweredge R610, Dell Poweredge R710, Quanta S99Q/Dell FS12-TY, Supermicro X8DTG, Supermicro X8DTU, Intel S2600JF/Appro 512X, Quanta QSSC-S4R/Appro GB812X-CN, Wistron / Dell Poweredge C6220. Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card, Inventec 5441/Dell Xanadu II, Inventec 5442/Dell Xanadu III. Serial-Over-LAN Issue #7: [IMPLEMENTATION] During a reboot, SOL packets appear to be temporarily internally dropped. This leads to a large increase in sequence numbers once the SOL session is "re-connected". While the SOL session is technically alive, the inability to predict/handle the sequence number jump makes the SOL session difficult to handle, as you cannot determine if packets are proper retransmissions or not. Seen on: Tyan S4811 with SMDC daughter card Resolution: Code added to error after a number of consecutive invalid packets are received. Serial-Over-LAN Issue #8: [IMPLEMENTATION] After a reboot, the SOL session appears to "disconnect" from the motherboard's serial chip. While the IPMI/SOL session is technically alive, and character data input from the user is accepted by the remote BMC, no character data is sent back from the remote motherboard. The SOL session is subsequently useless. Seen on: Intel SR1520ML, Intel X38ML Resolution: The SOL session must be closed and restarted. Code to implement "serial NUL pings" may aid software in detecting this situation more quickly. Serial-Over-LAN Issue #9: [COMPLIANCE] The Activate Payload requires the "BMC asserts CTS and DCD/DSR to baseboard upon activation" flag to be set, it is not optional. Seen on: Undocumented Motherboard Resolution: None Notes: Undocumented motherboard is an Intel motherboard. Serial-Over-LAN Issue #10: [IMPLEMENTATION] If the remote system requires encryption, but the user attempts to connect without encryption, an error response other than "Cannot activate payload without encryption" is returned. The resulting error message is confusing. Seen on: Inventec 5441/Dell Xanadu II Resolution: None Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. Serial-Over-LAN Issue #11: [COMPLIANCE] The Get Payload Activation Status command is not implemented correctly. The completion code CCh = "Invalid data field in request" is returned when attempted. Seen on: Supermicro X8SIL-F Resolution: Workaround option added to inform software to skip this point in the SOL state machine. Notes: Problem is reported to be fixed in newer firmware for Supermicro X8SIL-F. Serial-Over-LAN Issue #12: [COMPLIANCE] The reported SOL port is specified w/ the wrong endian. Seen on: Supermicro X8DTH-iF Resolution: Workaround option added to inform software to ignore the non-default port and assume the default SOL port is still used. Notes: Problem is reported to be fixed in newer firmware for Supermicro X8DTH-iF. Serial-Over-LAN Issue #13: [COMPLIANCE] The Get Payload Activation Status command does not correctly report if a previous SOL session was created. Seen on: Quanta S99Q/Dell FS12-TY Resolution: None Serial-Over-LAN Issue #14: [COMPLIANCE] SOL appears to be allowed regardless of SOL being enabled / disabled or a user being enabled / disabled for SOL access. Seen on: MSI MS-91D2 Resolution: None Serial-Over-LAN Issue #15: [COMPLIANCE] The Activate / Deactivate Payload commands appear to require Admin privileges, regardless of how SOL support is configured. The IPMI specification indicates privilege requirements for executing these commands depends on configuration. Seen on: MSI MS-91D2 Resolution: None Serial-Over-LAN Issue #16: [COMPLIANCE] The number of SOL payload instances that can simultaneously be activated on a motherboard is always reported as 0, suggesting that it cannot be activated. Seen on: Dell Poweredge M605, Dell Poweredge M610, Dell Poweredge M915 Resolution: Workaround added to assume the instance capacity is really 1 when it is 0. The assumption is made that the vendor does not support multiple instances, which is why it is reported as 0. Serial-Over-LAN Issue #17: [COMPLIANCE] or [IMPLEMENTATION] SOL sessions are not deactivated after a Deactivate Payload request. Despite the SOL session being active, it appears the BMC does not know it is activated, and returns "Payload already deactivated" (0x80) completion code. This could lead to a loop that continually believes a SOL session is activated when calling Activate Payload, and deactivated when calling Deactivate Payload. Seen on: Dell Poweredge M605, Dell Poweredge M610, Dell Poweredge M915 Notes: It is possible the Dell BMC does not allow a SOL payload deactivation except for the IPMI session that activated the SOL payload. While deactivation of a payload from another IPMI session is allowed in IPMI (see Table 15-2 [2]), I am not sure if it is required. So I'm listing this as [COMPLIANCE] or [IMPLEMENTATION]. This is similar to issue #5 above. Serial-Over-LAN Issue #18: [COMPLIANCE] SOL is always reported to have an active session in progress, so no SOL session can be created. This includes after a deactivate payload completes successfully. It is possible this motherboard does not support SOL. However, it should indicate that early in the session setup (perhaps via the Get Channel Payload Support request). Seen on: Xyratex HB-F8-SRAY Resolution: None Serial-Over-LAN Issue #19: [COMPLIANCE] SOL payload instances are not completely independent of each other. Deactivate of SOL payload instance #X may deactivate a different SOL payload instance #Y. Seen on: Supermicro X8DTG-D, Inventec 5442/Dell Xanadu III Resolution: None Serial-Over-LAN Issue #20: [COMPLIANCE] The Activate Payload requires Serial/modem alerts to be deferred instead of failed even though motherboards do not have serial/modem ports to communicate over. Seen on: Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: Workaround added to defer serial alerts. Serial-Over-LAN Issue #21: [COMPLIANCE] The BMC occassionally gets stuck and an increase in the SOL packet sequence number is required to get the machine unstuck. Seen on: Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: Workaround added to increase sequence number on severe situations. ---------------------------------------------------------------------- --------------------------------- | BMC/IPMI Configuration Issues | --------------------------------- ---------------------------------------------------------------------- BMC/IPMI Configuration Issue #1: [COMPLIANCE] BMC requires that a password must be passed to the Set User Password command even if you are just trying to enable/disable a user. The IPMI specification explicitly states that the password is optional when enabling/disabling a user. Seen on: Sun X4140, Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: Workaround added to detect this situation and retry with a dummy password. BMC/IPMI Configuration Issue #2: [COMPLIANCE] Users cannot be enabled/disabled via Set User Password. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #3: [COMPLIANCE] Test passwords via Set User Password not supported. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #4: [COMPLIANCE] SOL privilege level, Character Send Threshold, SOL Retry Count, and SOL Retry interval cannot be modified. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #5: [COMPLIANCE] User access parameters "Enable IPMI Msgs" and "Privilege Limit" are not changeable via Set User Access. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #6: [COMPLIANCE] [CONFIG-1] Default Channel configuration has a privilege limit of OEM even though motherboard does not support an OEM privilege. Attempts to modify sub-fields "piecemeal" within the Set Channel Access command fail a parameter out of range error (0xC9). Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #7: [COMPLIANCE] Setting a channel privilege limit (e.g. LAN channel privilege limit) does not affect authentication and/or execution of IPMI commands over LAN. Seen on: Supermicro H8QME with SIMSO daughter card, Inventec 5441/Dell Xanadu II Resolution: None Notes: Confirmed fixed in newer firmware for Supermicro H8QME with SIMSO daughter card. BMC/IPMI Configuration Issue #8: [IMPLEMENTATION] When commiting/writing large amounts of configuration data, some data does not get stored or written properly. It appears that the BMC may lose data if overwhelmed with data written to the BMC. Seen on: Supermicro H8QME with SIMSO daughter card, Quanta S99Q/Dell FS12-TY Resolution: Workaround option added to inform software to slow down writing of data. BMC/IPMI Configuration Issue #9: [COMPLIANCE] The ability to authenticate under standard IPMI 1.5 authentication types (i.e. MD5) OEM authentication to be enabled. It appears to be an internal logic error on the motherboard. Seen on: Tyan S4811 with SMDC daughter card Resolution: OEM authentication must be enabled in the BMC configuration. BMC/IPMI Configuration Issue #10: [IMPLEMENTATION] Get Username and Get User Payload commands fail with CCh = "Invalid data field in request" if a username was not set previously. Seen on: Sun X4140, Inventec 5441/Dell Xanadu II Resolution: Workaround added to notify user to configure username first. BMC/IPMI Configuration Issue #11: [IMPLEMENTATION] User access parameters "Enable IPMI Msgs" and "Privilege Limit" are not changeable via Set User Access until a username has been set. Seen on: Inventec 5441/Dell Xanadu II, Supermicro X8DTH, Intel S5500WBV/Penguin Relion 700 Resolution: Workaround added to notify user to configure username first. BMC/IPMI Configuration Issue #12: [COMPLIANCE] When disabling LAN IPMI via Set User Access "Enable IPMI Msgs", IPMI over LAN still works for a user. Seen on: Inventec 5441/Dell Xanadu II Resolution: None Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. BMC/IPMI Configuration Issue #13: [COMPLIANCE] Setting Non-volatile settings also changes Volatile settings for channel configuration via Set Channel Access. Seen on: Inventec 5441/Dell Xanadu II, Intel S5500WBV/Penguin Relion 700, Supermicro X8DTH Resolution: None BMC/IPMI Configuration Issue #14: [COMPLIANCE] ARP response configuration is not functional even though the BMC ARP response is available. Seen on: Inventec 5441/Dell Xanadu II, Dell Poweredge R610, Dell Poweredge R710 Resolution: None Notes: This command is optional in the IPMI spec, but it is not optional if ARP response is supported (see Table 23-4 [2]). Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. BMC/IPMI Configuration Issue #15: [COMPLIANCE] Setting a password using IPMI 2.0 extensions (i.e. up to 20 bytes in length) does not work. Seen on: Undocumented Motherboard Resolution: User must configure password using IPMI 1.5 formatted payloads. BMC/IPMI Configuration Issue #16: [IMPLEMENTATION] User cannot be enabled/disabled until after a non-null password has been configured. Seen on: Dell Poweredge R610, Dell Poweredge R710, Wistron / Dell Poweredge C6220. Resolution: Workaround added to re-try enable/disable user after password set. BMC/IPMI Configuration Issue #17: [COMPLIANCE] [CONFIG-1] Default Authentication Type Enables configure several OEM authentications on. However, the motherboard does not support these OEM authentications, and any "piecemeal" configuration of the remaining sub-fields results in a bad parameter completion code (0xCC). Seen on: Dell Poweredge R610, Dell Poweredge R710 Resolution: Workaround added to notice this circumstance and attempt to configure fields simultaneously. BMC/IPMI Configuration Issue #18: [IMPLEMENTATION] Read only fields return an error code of 0xD5 (request parameter not supported) instead of 0x82 (read only parameter). The resulting error message is confusing. Seen on: Dell Poweredge R610, Dell Poweredge R710 Resolution: None BMC/IPMI Configuration Issue #19: [COMPLIANCE] User IPMI messaging being enabled/disabled does not affect authentication and/or execution of IPMI commands for the user. Seen on: Dell Poweredge R610, Dell Poweredge R710 Resolution: None BMC/IPMI Configuration Issue #20: [COMPLIANCE] Configuring the Subnet Mask will also lead to the "Default Gateway IP Address" to be configured. It appears to be some type of memory corruption on the motherboard firmware. Seen on: Inventec 5441/Dell Xanadu II Resolution: None BMC/IPMI Configuration Issue #21: [IMPLEMENTATION] Several configuration fields, most notably several SOL configuration fields, are stored in volatile memory rather than non-volatile memory. These particular configuration fields were not required by IPMI to be stored in non-volatile memory, but ultimately is an issue b/c it requires users to reconfigure IPMI on every system boot. Seen on: Inventec 5441/Dell Xanadu II Resolution: None Notes: Resolved/enhanced in newer firmware for Inventec 5441/Dell Xanadu II. BMC/IPMI Configuration Issue #22: [COMPLIANCE] Gratuitous ARP configuration can be enabled, but is not available on the system. Seen on: Quanta S99Q/Dell FS12-TY Resolution: None BMC/IPMI Configuration Issue #23: [COMPLIANCE] MAC address is read only, but motherboard does not return read-only error when changing the MAC address. This leads the user to believe MAC address can be configured. Seen on: Quanta S99Q/Dell FS12-TY Resolution: None BMC/IPMI Configuration Issue #24: [COMPLIANCE] IPMI over LAN functions only if ARPs are enabled. If ARPs are disabled and you choose to store the MAC address locally in an ARP cache, IPMI over LAN will still not function. Seen on: Quanta S99Q/Dell FS12-TY Resolution: None BMC/IPMI Configuration Issue #25: [IMPLEMENTATION] A default username cannot be changed. Seen on: Supermicro X8DTG, Supermicro X8DTU, Intel S5500WBV/Penguin Relion 700 Resolution: None BMC/IPMI Configuration Issue #26: [COMPLIANCE] User access parameters configured via Set User Access do not work for some users. Seen on: Supermicro X8DTG, Supermicro X8DTU Resolution: None BMC/IPMI Configuration Issue #27: [COMPLIANCE] Cipher Suites 6, 7, 8, 11, and 12 are not available on the board, but their Cipher Suite's Maximum Privilege Level are configurable, suggesting to the user they are available. Seen on: Supermicro X8DTG, Supermicro X8DTU Resolution: None BMC/IPMI Configuration Issue #28: [COMPLIANCE] Multiple LAN Channels exist, however when asking the BMC how many SOL Channels there are, it indicates only 1. Generally speaking, this need not be a bug. However, for this particular motherboard it is. Seen on: Intel S5500WBV/Penguin Relion 700 Resolution: None BMC/IPMI Configuration Issue #29: [COMPLIANCE] The number of entries returned from a RMCP+ Messaging Cipher Suite Privilege Levels request is not valid. Not only is it not valid, the number of entries does not even match the number of entries specified by a RMCP+ Messaging Cipher Suite Entry Support Count request. Seen on: HP DL145 Resolution: Workaround added to not output a privilege if one is not available. BMC/IPMI Configuration Issue #30: [COMPLIANCE] Cipher Suite 1-16 are listed as supported instead of cipher suites 0-15. Seen on: Intel S2600JF/Appro 512X Resolution: Workaround added to detect this specific situation and adjust appropriately. Notes: Confirmed fixed in newer firmware. BMC/IPMI Configuration Issue #31: [IMPLEMENTATION] Some new IPMI configuration are not accepted by the BMC until after a system reboot is done. Seen on: Dell Poweredge R610, Dell Poweredge R710, Inventec 5441/Dell Xanadu II Resolution: None Notes: A cold reset of the BMC is sufficient to resolve this issue on Inventec 5441/Dell Xanadu II without rebooting the machine. BMC/IPMI Configuration Issue #32: [COMPLIANCE] Motherboard errors out with unspecified password when trying to set a new user password (completion code 0x8F). Seen on: Wistron / Dell Poweredge C6220 Resolution: None Notes: Motherboard has internal password requirements leading to error. BMC/IPMI Configuration Issue #33: [COMPLIANCE] When retrieving boot flags via Get System Boot Options, the response payload under IPMI 2.0 contains an extra 12 bytes of unknown/unspecified data. Seen on: HP DL380 G5 Resolution: None BMC/IPMI Configuration Issue #34: [COMPLIANCE] Many configuration options return "Parameter Not Supported" (0x80) when attempting to set a value, but do not when the parameter is being read. It is likely the firmware writers meant that the parameter was read only (0x82). Seen on: Xyratex HB-F8-SRAY Resolution: None BMC/IPMI Configuration Issue #35: [COMPLIANCE] User #1 cannot be enabled/disabled. It is permanently enabled. Seen on: Supermicro X10DDW-i Resolution: None BMC/IPMI Configuration Issue #36: [COMPLIANCE] [CONFIG-1] Default user privilege limit is RESERVED. Attempts to modify sub-fields "piecemeal" within the Set User Access command fail. Seen on: Supermicro X10DDW-i Resolution: Workaround added to work around this situation. BMC/IPMI Configuration Issue #37: [COMPLIANCE] IPMI LAN session w/ IPMI 1.5 times out after changing a user password within the LAN session. Seen on: Supermicro X9DRT-HF+ Resolution: It appeared that this motherboard was still accepting request packets using the old Password for the authentication hash but was responding with packets using the new Password for the hash. Ignoring the authentication code of response packets was sufficient to work around the problem. It was also discovered communicating with IPMI 2.0 worked and did not exhibit this problem. ---------------------------------------------------------------------- ------------------------------------------------------- | Platform Event Filtering (PEF) Configuration Issues | ------------------------------------------------------- ---------------------------------------------------------------------- Platform Event Filtering Configuration Issue #1: [IMPLEMENTATION] [CONFIG-1] Alert Policy configurations cannot be configured "piecemeal". If all fields are not configured perfectly and simultaneously, every configuration will result in a completion code of 0xCC (Invalid data field in Request). Seen on: Inventec 5441/Dell Xanadu II, Fujitsu RX 100 Resolution: Workaround added to notice this circumstance and attempt to configure fields simultaneously. ---------------------------------------------------------------------- --------------------------------------- | Field Replaceable Unit (FRU) Issues | --------------------------------------- ---------------------------------------------------------------------- Field Replaceable Unit Issue #1: [COMPLIANCE] Some FRU data has invalid checksums. Seen on: Undocumented Motherboard, Inventec 5441/Dell Xanadu II, Dell Poweredge R610, Dell Poweredge R710, Resolution: Workaround option added to inform software to not check checksums. Notes: Undocumented motherboard was an Intel Tiger motherboard, but never documented which one (achu). Field Replaceable Unit Issue #2: [IMPLEMENTATION] A FRU Chassis Info Area reports an unspecified chassis type. Seen on: Quanta S99Q/Dell FS12-TY Resolution: None ---------------------------------------------------------------------- ------------------ | Sensors Issues | ------------------ ---------------------------------------------------------------------- Sensors Issue #1: [COMPLIANCE] Some sensors don't return a sensor state (16 bit field) although only half of the sensor state (8 bit field) is optional. Seen on: Dell 2950, Inventec 5441/Dell Xanadu II Resolution: Workaround added to assume sensor state is 0 when this occurs. Sensors Issue #2: [COMPLIANCE] Some sensors return sensor states that are illegal. For example, a sensor state of 0x40 is returned, but 0x1 through 0x20 are the only legal ones. For example, this output occurs in ipmi-sensors for the SuperMicro H8SGL-F. 1411 | PS Status | Power Supply | N/A | N/A | N/A | 'Presence detected' 'Unrecognized Event = 0100h' 'Unrecognized Event = 0200h' 'Unrecognized Event = 0400h' 'Unrecognized Event = 0800h' 'Unrecognized Event = 1000h' 'Unrecognized Event = 2000h' 'Unrecognized Event = 4000h' Seen on: Dell 2950, SuperMicro X9DRI-LN4F+, SuperMicro H8SGL-F Resolution: Workaround added to ignore invalid sensor states. Sensors Issue #3: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_REQUEST_SENSOR_DATA_OR_RECORD_NOT_PRESENT (0xCB) completion codes for unknown reasons. Seen on: Dell 2950 Resolution: Workaround added to assume sensor not available. Sensors Issue #4: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE (0xCD) for unknown reasons. Seen on: Sun V20Z Resolution: Workaround added to assume sensor not available. Sensors Issue #5: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE (0xC9) completion codes for unknown reasons. Seen on: Dell 2650 Resolution: Workaround added to assume sensor not available. Sensors Issue #6: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_COMMAND_CANNOT_RESPOND (0xCE) completion codes for unknown reasons. Seen on: HP ProLiant DL145 G2 Resolution: Workaround added to assume sensor not available. Sensors Issue #7: [COMPLIANCE] The Get Sensor Event Enable command always returns "sensor scanning disabled" bit, even if sensor scanning is not disabled. Seen on: Sun X4140 Resolution: None Sensors Issue #8: [COMPLIANCE] Several sensors have invalid Entity IDs. In other words, not in the valid Entity ID range or OEM defined range. Seen on: Inventec 5441/Dell Xanadu II Resolution: None, generic unknown Entity ID type listed. Sensors Issue #9: [COMPLIANCE] Sensor bridging over IPMI 1.5 fails b/c IPMB respones have invalid authentication codes. Seen on: Inventec 5441/Dell Xanadu II, Inventec 5442/Dell Xanadu III Resolution: Workaround option added to inform software to ignore authentication codes in response packets. Notes: Confirmed fixed in newer firmware for Inventec 5442/Dell Xanadu III. Sensors Issue #10: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED (0xD5) completion codes for unknown reasons. Seen on: Sun Fire X4450 w/ ELOM 3.0.0 Resolution: Workaround added to assume sensor not available. Sensors Issue #11: [COMPLIANCE] Some sensors report invalid event bitmasks. For example, when the lower critical threshold has not been crossed, the lower critical threshold event bitmask is set. Seen on: Intel SR2500, Intel SR1500SAS, Intel S5000PAL Resolution: None Sensors Issue #12: [COMPLIANCE] Sensors on the motherboard are owned by the BMC, but the SDR reports that it is not. Thus, sensor bridging fails. Seen on: HP Proliant DL140 G1, Fujitsu RX300, Fujitsu RX300S2 Resolution: Workaround option added to inform software to assume the sensor owner is the BMC no matter what. Notes: Confirmed fixed in newer firmware for Fujitsu RX300, Fujitsu RX300S2. Sensors Issue #13: [INTERPRETATION] [IMPLEMENTATION] Sensors do not assert state bits (i.e. sensor event bitmask) consistently to indicate that a sensor is "doing good". For example, for a "Power Supply" sensor, offset 00h (i.e. state 0 or bitmask 0x0001) indicates "Presence Detected". On some motherboards this is considered to be the "good" result to see from a "Power Supply" sensor reading. On some other motherboards, the motherboards have elected to not return any offset (i.e. no states set or bitmask 0x0000) when the power supply is fine, electing to only return an offset when an actual failure occurs. Seen on: Various, this is a general issue. Resolution: None Sensors Issue #14: [IMPLEMENTATION] Event only sensors are listed in the SDR using a full or compact SDR record. Software is very likely to believe these are sensors that are readable, leading to non-optimal performance. Seen on: Various, this is a general issue. Resolution: None Sensors Issue #15: [INTERPRETATION] SDR records for some sensors list an event/reading type code for a discrete sensor, but return an analog reading from a Get Sensor Reading command. (The SDR's analog data format indicates an analog/threshold based sensor, however no threshold limits for the sensor are listed in the SDR.) This was discovered when FreeIPMI and IPMItool sensor output mismatched. In FreeIPMI, ipmi-sensors would report discrete states (e.g. "At or Below (<=) Lower Non-Critical Threshold") without an actual sensor reading (e.g. 100 Watts). In IPMItool, it would output the sensor reading (e.g. 100 Watts) but invalid/incorrect discrete states. IMO, a SDR record that indicates an analog reading w/ a discrete event/reading type code is illegal. At the minimum it makes no sense. If you report an analog reading without any treshold information, what is the use? While it is not explicitly stated in the IPMI specification, this is strongly implied to be wrong. In 42.1, it states for threshold sensors, "The Get Sensor Reading command for a threshold-based sensor contains the present 'analog' reading for the sensor along in addition to the discrete threshold comparison status bit field." Seen on: HP Proliant DL380 G7, HP ProLiant ML310 G5 Resolution: Workaround option added to inform software to read the sensor reading if there are enough hints it may be available. Sensors Issue #16: [INTERPRETATION] The analog data format lists 4 possible conditions: 00b = unsigned, 01b = 1's complement, 10b = 2's complement, 11b = does not return analog reading. This strongly suggests that any SDR entry that does not report an analog reading should set this field to 11b. However, text below this section states, "If neither thresholds nor analog reading are provided, this field should be written as 00h." Some vendors set this field to 00b for non-analog sensors, while others set it to 11b. Seen on: Various, this is a general issue. Resolution: None Sensors Issue #17: [COMPLIANCE] Some sensors report that their sensor scanning is disabled, even though the sensor is actually not. Seen on: Dell Poweredge 2900, Dell Poweredge 2950, Dell Poweredge R410, Dell Poweredge R610, HP Integrity rx3600 Resolution: Workaround option added to inform software to ignore the scanning bit and read a sensor reading regardless of the scanning bits value. Sensors Issue #18: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_UNSPECIFIED_ERROR (0xFF) completion codes for unknown reasons. Seen on: Sun Blade x6250 Resolution: Workaround added to assume sensor not available. Sensors Issue #19: [COMPLIANCE] [SENSORS-1] Some sensors return IPMI_COMP_CODE_DESTINATION_UNAVAILABLE (0xD3) completion codes for unknown reasons. Seen on: Sun Blade 6000M2 Resolution: Workaround added to assume sensor not available. Sensors Issue #20: [IMPLEMENTATION] Some sensors are given a unit modifier (i.e. A / B, or A * B) but a modifier unit of unspecified. This leads to sensors with units like: "C / unspecified". Seen on: Wistron / Dell Poweredge C6220 Resolution: Workaround added to handle corner case. Sensors Issue #21: [IMPLEMENTATION] Some SDR entries report RPM thresholds that are inconsistent and illogical. For example, a upper critical threshold will be reported that is below the nominal reading. Seen on: HP DL140 G3 and HP ML160 G6 Resolution: None ---------------------------------------------------------------------- --------------------------------- | System Event Log (SEL) Issues | --------------------------------- ---------------------------------------------------------------------- System Event Log Issue #1: [COMPLIANCE] SEL records incorrectly report the generator_id slave address. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: Workaround added to handle this as a special case and adjust the generator ID appropriately. System Event Log Issue #2: [COMPLIANCE] Different record ids (e.g. 280 vs. 281) can be used to retrieve identical SEL records. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: None System Event Log Issue #3: [COMPLIANCE] The Reserve SEL IPMI command incorrectly requires an Operator privilege Level instead of a User privilege level. Seen on: Supermicro H8QME with SIMSO daughter card Resolution: Workaround added to simply continue without a reservation ID. System Event Log Issue #4: [COMPLIANCE] The Get SEL Entry command is not supported. Seen on: HP DL 585 Resolution: None System Event Log Issue #5: [COMPLIANCE] Some SEL records report illegal record types. Seen on: HP DL 380 G5, Intel S2600JF/Appro 512X Resolution: Workaround option added to inform software to assume the record is a normal system event. System Event Log Issue #6: [IMPLEMENTATION] The SEL contains sensor numbers and sensor owner IDs which are not listed in the SDR. This can lead to an output that contains less useful information. Seen on: Inventec 5441/Dell Xanadu II, Sun Fire X4150 Resolution: None System Event Log Issue #7: [IMPLEMENTATION] SEL events showing a threshold sensor do not properly report if they are going high or going low, which can lead to confusion for users. For example, the following set of events might occur. Upper Non-critical - going high ; Sensor Reading = 242.00 W ; Threshold = 240.00 W Upper Non-critical - going high ; Sensor Reading = 180.00 W ; Threshold = 240.00 W The following would be preferred Upper Non-critical - going high ; Sensor Reading = 242.00 W ; Threshold = 240.00 W Upper Non-critical - going low ; Sensor Reading = 180.00 W ; Threshold = 240.00 W It is very likely the implementors only thought of asserting/deasserting identical events, without considerations of the actual event messages and the resulting output that can occur. Seen on: Dell Poweredge C410x Resolution: None Notes: The following SEL output in ipmitool shows how it can lead to even more confusion. Upper Non-critical going high | Reading 240 > Threshold 240 Watts Upper Non-critical going high | Reading 88 > Threshold 240 Watts It reads "88 > 240" ---------------------------------------------------------------------- ----------------------------- | BMC Watchdog Timer Issues | ----------------------------- ---------------------------------------------------------------------- BMC Watchdog Timer Issue #1: [COMPLIANCE] The timer is running/stopped flag appears to be stuck on "stopped" regardless if the timer is running or not. Functionality may be limited due to this. Seen on: Sun x4100, Sun x4200, Sun x4500 Resolution: Workaround option added to inform software to analyze countdown rather than flag for running vs stopped state. Notes: Confirmed fixed in newer firmware for Sun x4100, Sun x4200, Sun x4500. BMC Watchdog Timer Issue #2: [???] A reply from a Get Watchdog Timer command returns a packet without valid data. Seen on: Unspecified Supermicro Resolution: Handle special case and retry command. ---------------------------------------------------------------------- --------------- | DCMI Issues | --------------- ---------------------------------------------------------------------- DCMI Issue #1: [COMPLIANCE] DCMI is reported as available, when it is not. Seen on: Inventec 5441/Dell Xanadu II Resolution: None Notes: Confirmed fixed in newer firmware for Inventec 5441/Dell Xanadu II. DCMI Issue #2: [INTERPRETATION] The DCMI spec indicates a potential completion code for the "Get Power Limit" command as "No Set Power Limit" (0x80). FreeIPMI originally interpreted this to mean the "Set Power Limit" command was not available. Atleast one vendor interpreted this to mean "No Power Limit Set". One can consider this an English interpretation issue of 'No set POWER LIMIT' vs. 'No SET POWER LIMIT' (i.e. is "set" a verb or part of a proper noun referencing the DCMI command). Confounding this issue is the fact that the example implementation in Intel's DCMItool implements the former, while the DCMI Conformance test suite implements the latter. In addition to this, with the latter interpretation, it need not be an indication of an error, but rather a flag. So the rest of the packet can be completely full of legitimate data. Seen on: Various, this is a general issue. Resolution: Code added to handle both interpretations. DCMI Issue #3: [INTERPRETATION] The DCMI 1.1 Specification includes new commands to set the asset tag and management controller identifier string. The payload to write these strings is: Byte 1 - Group Extension (DCh) Byte 2 - Offset to Write Byte 3 - Bytes to Write (max 16) Byte 4-N - Data and the response is: Byte 1 - Completion Code Byte 2 - Group Extension (DCh) Byte 3 - Total Length Written The maximum size for both strings is listed at 64 bytes. In the spec, it is unclear how this payload is to be used. It is unclear if the "Total Length Written" field is similar to a posix write, where <= the bytes passed in may be written. Or is it an indication of the total length of bytes stored? The management identifier string is stated to be NUL terminated, but the asset tag is not stated with this requirement. Seen on: Various, this is a general issue. Resolution: Code assumes that all 64 bytes of the buffer must be overwritten everytime the string is modified. This seems to be the safest approach. DCMI Issue #4: [COMPLIANCE] The Set Asset Tag command does not return the length of the asset tag written. Seen on: Unspecified Supermicro Motherboard Resolution: None ---------------------------------------------------------------------- ------------------------------------ | Platform Event Trap (PET) Issues | ------------------------------------ ---------------------------------------------------------------------- Platform Event Trap Issue #1: [COMPLIANCE] Responses from a PET Acknowledge are invalid and malformed. The payload is short by one byte (i.e. does not contain a completion code). Seen on: Dell Poweredge R610 Resolution: Workaround option added to inform software to accept malformed packets. ---------------------------------------------------------------------- -------------------- | Misc IPMI Issues | -------------------- ---------------------------------------------------------------------- Misc IPMI Issue #1: [COMPLIANCE] The Get System Info Parameters command incorrectly requires administrator privileges rather than the defined user level privileges. Seen on: MSI MS-91D2 Resolution: None, user should attempt to authenticate at a higher privilege level. Misc IPMI Issue #2: [COMPLIANCE] The Get System Info Parameters command returns insufficient privilege level (0xD4) even when the privilege level is sufficient. Seen on: Supermicro X8DTL-3F, Supermicro X9DRFR Resolution: None, user should attempt to authenticate at a higher privilege level. Misc IPMI Issue #3: [COMPLIANCE] The manufacturer ID specified by the motherboard was invalid (i.e. not a valid IANA Enterprise number). Seen on: Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU Resolution: Workaround added to recognize special case IANA number as belonging to a specific manufacturer. Misc IPMI Issue #4: [INTERPRETATION] When retrieving the operating system name via Get System Info Parameters, the 'set_selector', 'encoding', or 'string_length' fields in the response is not set. It is not clear if this is an error in their packet for indicating an unsupported field or an empty field. Seen on: Bull 510 Blade. Resolution: Workaround added to bmc-info to handle special case. Misc IPMI Issue #5: [COMPLIANCE] The Get System Info Parameters command returns insufficient privilege level (0xD4) regardless of privilege level. Seen on: Intel Windmill, Quanta Winterfell, Wiwynn Windmill Resolution: None Misc IPMI Issue #6: [COMPLIANCE] The Get SDR Repository Info command returns insufficient privilege level (0xD4) regardless of privilege level. Seen on: Wiwynn Windmill Resolution: None, user should attempt to authenticate at a higher privilege level. Misc IPMI Issue #7: [COMPLIANCE] System does not support RMCP ping/pong. Seen on: Intel Windmill, Quanta Winterfell, Wiwynn Windmill ---------------------------------------------------------------------- ------------ | Appendix | ------------ [CONFIG-1] To see a discussion on why this implementation is poor, please see "Configuration tool callback design" in the freeipmi-design.txt document. [SENSORS-1] In all liklihood, these are all circumstances that the vendor wanted to say "this sensor isn't available on this motherboard". It is ironic that there are so many error codes vendors are returning for this circumstance. It's also strange that so many vendors don't set the "reading unavailable" or "sensor scanning disabled" bit when returning the Get Sensor Reading command. But I digress. I get the impression vendors try to put the same SDR on multiple motherboards, regardless of whether a motherboard can even have a sensor reading/event represented by that SDR entry, leading to the strange range of error codes. The best thing vendors could do is have an SDR for each motherboard that is actually legit. The IPMI spec strongly suggests this as well: "Sensor Data Records are data records that contain information about the type and number of sensors in the platform ..." (1.7.7). "The SDR Repository is intended to hold information indicating the set of management controllers, sensors, and FRU Devices that is expected to be in the system ... For example, suppose the baseboard had connectors for five fans, but only the first four were supposed to be populated. The SDRs for the system would report four fan sensors ..." (33) freeipmi-1.6.4/doc/freeipmi-oem-documentation-requirements.txt0000644002055400205540000001563313527331635024546 0ustar00achuachu00000000000000IPMI OEM additions/extensions documentation requirements Albert Chu chu11@llnl.gov Last Updated: January 3, 2011 The following is a list of the common OEM documentation requirements that are needed for full OEM support in FreeIPMI. IPMI OEM Command Extensions/Additions ------------------------------------- IPMI OEM command extensions/additions for setting up, controlling, configuring, monitoring, and managing the system that are not in the IPMI specification. Many times, this is needed to configure hardware or gather information for monitoring, gather information to diagnose problems, etc. Or in more general terms, OEM command extensions/additions necessary to help manage the system. Examples include: OEM commands for configuring the hardware for IPMI. For example, configuring the ethernet port to be shared or dedicated (ipmi-oem's Inventec's get/set-nic-mode commands are an example of this). OEM commands for retrieving motherboard specific information. For example, OEM commands for reading firmware versions (ipmi-oem's Supermicro extra-firmware-info command is an example of this). OEM commands for retrieving motherboard specific hardware information necessary for hardware monitoring. For example, retrieving the current health status of hardware (ipmi-oem's Fujitsu get-remote-storage-status command is an example of this). OEM commands for resetting configuration back to the manufacturer defaults (ipmi-oem's Dell reset-to-defaults command is an example of this). OEM commands for configuring any additional "features" added to IPMI by the vendor. For example, how to configure the ports, timeout, on/off of web server abilities on the BMC (ipmi-oem's Dell get/set-web-server-config commands are an example of this). IPMI OEM Parameter Extensions ----------------------------- IPMI OEM parameter extensions to IPMI for setting up, controlling, configuring, monitoring, and managing the system that are not in the IPMI specification. For example, IPMI parameter extensions for reading service tags via the Get System Info Parameters command or configuring SOL Inactivity Timeouts via the Get/Set SOL Configuration Parameters command (ipmi-oem's Dell get-system-info and get/set-sol-inactivity-timeout commands are examples of this). The following is a (likely) incomplete list of IPMI commands OEM parameter extensions may have been added to. Get/Set System Info Parameters (22.14a/22.14b) Get/Set LAN Configuration Parameters (23.1/23.2) Get/Set PEF Configuration Parameters (30.3/30.4) Get/Set SOL Configuration Parameters (26.2/26.3) Get/Set Serial Modem Configuration Parameters (25.1/25.2) Get/Set System Boot Options (28.12/28.13) IPMI OEM events offsets and event data -------------------------------------- IPMI OEM event offsets and event data to read sensors and system event log (SEL) information. The following is a (likely) incomplete list of areas where IPMI OEM extensions may have been added pertaining to event offsets and event data. OEM Event Type Codes (see Table 42-1) OEM Sensor Types and Offsets and Event Data2/3 information (see Table 42-3) OEM Entity IDs (see 43.14) OEM System Event Data2 and Data3 information for all possible events (see 29.7) IPMI OEM Records ---------------- IPMI OEM records that store motherboard information or motherboard event information. The following is a (likely) incomplete list of areas where IPMI OEM extensions may have been added pertaining to various records. OEM SEL Records (32.2 and 32.3) OEM SDR Records (43.12) OEM FRU Records (see Platform Management FRU Information Storage Definition v1.0) IPMI OEM Misc ------------- The following are miscellaneous IPMI commands or areas that may have OEM options or extensions related to setting up, controlling, configuring, monitoring, and managing the system that are not in the IPMI specification. Get Device ID Auxiliary Information (see 20.1) DCMI Get/Set Power Limit Exception Actions (See DCMI 6.6.2 and 6.6.3) Necessary Documentation Details ------------------------------- The following is a summary of documentation information detail that is necessary to add OEM extension support into FreeIPMI. A) Details on the exact bit/hex and field layout of the packet or record should be documented. For example, sometimes we are given nothing more than a hex string, e.g. "0x21 0x33 0x44 0x00 0x00 0x01" and told this will do FOO action. This isn't useful because we don't know what each byte does or what additional options are available. A specific packet/record layout similar to what is in the IPMI spec should be documented. B) Hex to string/flag mapping information in sensors, system event logs, configuration fields, etc. should be documented. For example, documentation may list: "[0:3] - FOO type" OR "event data 2 holds the FOO type" OR "event data 2 - FOO error, see FOO error doc." with nothing else. Details for how to map hex/masks to strings/flags should be documented. For example, something like: 0x1 = type 1 0x2 = type 2 0x3 = type 3 OR 0x1 = bitmask condition 1 0x2 = bitmask condition 2 0x4 = bitmask condition 3 OR 0x80 = error message 1 0x81 = error message 2 0x82 = error message 3 C) Enough detail should be documented to calculate, determine, handle errors, etc. of various packet or record fields. This is especially true when bitmasks, bit shifts, bit manipulation, multipliers, etc. are involved. For example, we may be given a code snippet such as: if (event_data2 & 0xF) printf("DIMM bank %d\n", event_data3); In the example above, there is a fair amount of detail missing: - How do you print DIMM information if "event_data2 & 0xF" isn't true? - Or is it an error condition? If so what error conditions are possible? - It seems that event_data2 holds a bitmask, what other bitmask conditions are possible? D) The units of packet or record fields should always be documented. E) The endian of multibyte fields should always be documented. F) Configuration fields should be documented as read only, write only, or read/write. G) Details for mapping between technical information and "real life" information should be documented. For example, documents may show how to map DIMM locations into DIMM 0, DIMM 1, DIMM2, DIMM 3, etc. However, no algorithm for mapping this into information physically printed on the motherboard (e.g. DIMM A1, DIMM A2, DIMM B1, DIMM B2) is not given. Without it, the information is of very little use to those using FreeIPMI to diagnose problems. Other Notes ----------- While it is possible that code would be sufficient documentation of the above, it is typically not sufficient. Code often implements a subset of the actual data/information for the needs of the particular software. For example, outputting only the information the software deems "useful" and ignoring the rest. Code is often not documented at a level that is sufficient as real documentation. In order to convert the code into code necessary for another project may require reverse engineering or guesses. freeipmi-1.6.4/doc/freeipmi-faq.info0000644002055400205540000013674313527342466017273 0ustar00achuachu00000000000000This is freeipmi-faq.info, produced by makeinfo version 5.1 from freeipmi-faq.texi. This manual is for FreeIPMI (version 1.6.4, 21 August 2019). Copyright (C) 2006-2012 FreeIPMI Core Team Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts. INFO-DIR-SECTION Platform Management START-INFO-DIR-ENTRY * FreeIPMI FAQ: (freeipmi-faq). FreeIPMI - Frequently Asked Questions END-INFO-DIR-ENTRY Copyright (C) 2003-2012 FreeIPMI Core Team.  File: freeipmi-faq.info, Node: Top, Next: What is IPMI?, Prev: (dir), Up: (dir) Frequently Asked Questions on *FreeIPMI* This edition of the documentation was last updated on August 21, 2019 for release 1.6.4 of the FreeIPMI. * Menu: * What is IPMI?:: * What is FreeIPMI?:: * How did FreeIPMI start?:: * What operating systems does FreeIPMI run on?:: * FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil:: * What is special about FreeIPMI?:: * Does my system support IPMI?:: * How do I compile FreeIPMI?:: * libgcrypt requirement:: * x86-64 Compilation:: * Installing FreeIPMI on FreeBSD:: * What are some IPMI terminology or acronyms I should be aware of?:: * What setup is needed for FreeIPMI to communicate over LAN?:: * What setup is needed for Serial over LAN (SOL) or Ipmiconsole?:: * Do I need to install or configure a driver to perform IPMI inband?:: * SSIF Driver Configuration:: * How do you setup Powerman with ipmipower?:: * How do you setup Conman with ipmiconsole or libipmiconsole?:: * How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?:: * Why are times reported by FreeIPMI tools wrong?:: * Why is the IPMI kernel driver faster than the KCS driver?:: * Why is the output from FreeIPMI different than another software?:: * Why are there so many IPMI compliance bugs?:: * How do I get around an IPMI compliance bug on my motherboard?:: * Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?:: * How do I program with the FreeIPMI libraries?:: * Where can I get additional help or support?::  File: freeipmi-faq.info, Node: What is IPMI?, Next: What is FreeIPMI?, Prev: Top, Up: Top 1 What is IPMI? =============== The IPMI specifications define standardized, abstracted interfaces to the platform management subsystem. IPMI includes the definition of interfaces for extending platform management between the board within the main chassis and between multiple chassis. The term platform management is used to refer to the monitoring and control functions that are built in to the platform hardware and primarily used for the purpose of monitoring the health of the system hardware. This typically includes monitoring elements such as system temperatures, voltages, fans, power supplies, bus errors, system physical security, etc. It includes automatic and manually driven recovery capabilities such as local or remote system resets and power on/off operations. It includes the logging of abnormal or out-of-range conditions for later examination and alerting where the platform issues the alert without aid of run-time software. Lastly it includes inventory information that can help identify a failed hardware unit.  File: freeipmi-faq.info, Node: What is FreeIPMI?, Next: How did FreeIPMI start?, Prev: What is IPMI?, Up: Top 2 What is FreeIPMI? =================== FreeIPMI is a collection of Intelligent Platform Management IPMI system software. It provides in-band and out-of-band software and a development library conforming to the Intelligent Platform Management Interface (IPMI v1.5 and v2.0) standards. FreeIPMI also supports IPMI-related specifications such as the Data Center Management Interface (DCMI) and Intel Node Manager.  File: freeipmi-faq.info, Node: How did FreeIPMI start?, Next: What operating systems does FreeIPMI run on?, Prev: What is FreeIPMI?, Up: Top 3 How did FreeIPMI start? ========================= In October 2003, California Digital Corp. (CDC) was contracted by Lawrence Livermore National Laboratory (LLNL) for the assembly of Thunder, a 1024 node Itanium2 cluster. This led to software developers from CDC and LLNL merging the IPMI software developed by both organizations into FreeIPMI. Anand Babu, Balamurugan and Ian Zimmerman at CDC contributed the in-band KCS driver, 'ipmi-sensors', 'ipmi-sel', 'bmc-info', core portions of 'ipmi-config', and portions of libfreeipmi. Albert Chu and Jim Garlick at LLNL contributed 'ipmipower', 'bmc-watchdog', 'ipmiping', 'rmcpping', portions of libfreeipmi, and IPMI support in Powerman. In October 2004, FreeIPMI 0.1.0 was officially released. Since the 0.1.0 release, Z Research developers have contributed 'ipmi-chassis', 'ipmi-raw', 'ipmi-locate', and PEF portions of 'ipmi-config'. LLNL has contributed IPMI 2.0 support, hostrange support, 'ipmiconsole', libipmiconsole, 'ipmidetect', 'bmc-device', 'ipmi-oem', 'ipmi-dcmi', libipmimonitoring, and the chassis and sensor portions of 'ipmi-config'. (Note: The original FreeIPMI developers from California Digital Corp. are now at Zresearch Inc.)  File: freeipmi-faq.info, Node: What operating systems does FreeIPMI run on?, Next: FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, Prev: How did FreeIPMI start?, Up: Top 4 What operating systems does FreeIPMI run on? ============================================== FreeIPMI was originally developed on GNU/Linux. It has been confirmed to be built on most major GNU/Linux distributions such as Redhat, Fedora, Suse, and Debian. FreeIPMI has been ported and confirmed to work on atleast FreeBSD, OpenBSD, Solaris, OpenSolaris, and Windows via Cygwin. We imagine it would build cleanly on other operating systems. If it doesn't, it should be easily portable to them. Please contact the maintainers on the mailing lists.  File: freeipmi-faq.info, Node: FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, Next: What is special about FreeIPMI?, Prev: What operating systems does FreeIPMI run on?, Up: Top 5 FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil ============================================== There are multiple implementations, APIs, interfaces, end user requirements, etc. that one can choose when developing IPMI drivers, libraries, and tools. FreeIPMI has taken some different approaches than other open-source projects. The section below points out a number of the reasons why we feel FreeIPMI is particularly special compared to the other projects. The Ipmiutil project has a good chart describing many of the differences between the projects: .  File: freeipmi-faq.info, Node: What is special about FreeIPMI?, Next: Does my system support IPMI?, Prev: FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil, Up: Top 6 What is special about FreeIPMI? ================================= In our eyes, there are several reasons why FreeIPMI is particularly special. 1. Support for HPC, clusters, and large data centers A number of features have been added into the tools to support HPC, clusters, and/or large data centers. Much of this original support was added to support the large cluster environments at Lawrence Livermore National Laboratory (LLNL). Scalable parallel execution of many FreeIPMI tools ('ipmi-sensors', 'ipmi-sel', 'bmc-info', etc.) across a cluster is supported through hostranged input and output. For example: # > bmc-info -h "pwopr[0-5]" -u XXX -p XXX --get-device-id -C ---------------- pwopr[0-1,5] ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.0c Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h ---------------- pwopr[2-4] ---------------- Device ID : 34 Device Revision : 1 Device SDRs : unsupported Firmware Revision : 1.17 Device Available : yes (normal operation) IPMI Version : 2.0 Sensor Device : supported SDR Repository Device : supported SEL Device : supported FRU Inventory Device : supported IPMB Event Receiver : unsupported IPMB Event Generator : unsupported Bridge : unsupported Chassis Device : supported Manufacturer ID : Peppercon AG (10437) Product ID : 4 Auxiliary Firmware Revision Information : 38420000h In the above example, its clear to see that pwopr[2-4] have different firmware than pwopr[0-1,5]. More information about hostrange support can be found in the document 'freeipmi-hostrange.txt' (). 'Ipmipower' is capable of scaling to large nodes for cluster support and is supported by Powerman () for scalable power management. At LLNL, in conjunction with Powerman, ipmipower is used for power control on clusters ranging from sizes of 4 to 2000. It has been used to determine power status or power control LLNL's largest clusters in under a second. 'libipmiconsole' is currently supported by Conman () and Conserver () for scalable console management. 'Ipmi-sensors' and libipmimonitoring are capable of interpreting sensor readings as well as just reporting them. It can be used for host monitoring IPMI sensor severity on a cluster. By mapping sensor readings into NOMINAL, WARNING, or CRITICAL states, it makes monitoring sensors easier across large numbers of nodes. Skummee () currently uses libipmimonitoring to monitoring sensors on LLNL clusters of up to 2000 nodes in size. FreeIPMI sensor monitoring plugins for Ganglia () and Nagios () have also been developed and made available for download (). 'Ipmi-sel' and libipmimonitoring are capable of interpreting system event log (SEL) entries as well as just reporting them. It can be used for host monitoring IPMI event severity on a cluster. By mapping events into NOMINAL, WARNING, or CRITICAL states, it makes monitoring system events easier across large numbers of nodes. Skummee () currently uses libipmimonitoring to monitoring the SEL on LLNL clusters of up to 2000 nodes in size. The 'ipmi-config' configuration file and command-line interface are used to easily copy the BMC configuration from one node to every other node in a cluster quickly. It has been used to modify the BMC configuration across large LLNL clusters in a few minutes. They also have the capability to verify (via the diff option) that the desired configuration has been properly stored to firmware. 'Ipmidetect' can be used to enhance the efficiency of the hostranged input by eliminating those nodes in the cluster that have been temporarily removed for servicing. FreeIPMI is supported within Slurm for energy consumption monitoring. 2. Additional OEM support FreeIPMI contains support for a number of OEM extensions and OEM sensors and/or events. 'Ipmi-oem' currently supports OEM command extensions for motherboards made by Dell, Fujitsu, IBM, Intel, Inventec, Quanta, Sun Microsystems, Supermicro, and Wistron. 'Ipmi-sensors' and 'ipmi-sel' support OEM sensors and/or events for motherboards made from Dell, Fujitsu, HP, Intel, Inventec, Quanta, Sun Microsystems, Supermicro, and Wistron. (Some of the motherboards may have been rebranded by vendors, see manpages for official list of confirmed supported motherboards.) 3. Additional flexibility and features By implementing various IPMI sub-sections into multiple tools, each tool is capable of providing the user with more flexibility and ultimately more features in addition to those listed above. It may not be as easy (or architecturally possible) to do in an all-in-one tool. 4. Extra IPMI support In addition to the features listed above, FreeIPMI also supports specifications related to IPMI. The Data Center Management Interface, or DCMI, is supported via the FreeIPMI tool 'ipmi-dcmi'. Some aspects of the Intel Power Node Manager are supported in 'ipmi-oem'. 5. Easy setup By implementing drivers in userspace libraries, there is no need to build/setup/manage any kernel modules/drivers. 6. Portability Likewise, by implementing everything in userspace libraries and tools, portability to multiple operating systems and architectures should be easier.  File: freeipmi-faq.info, Node: Does my system support IPMI?, Next: How do I compile FreeIPMI?, Prev: What is special about FreeIPMI?, Up: Top 7 Does my system support IPMI? ============================== Unfortunately, there are no universally defined mechanisms for determining if a system supports IPMI via Inband communication. Assuming IPMI is set up correctly for over LAN communication, a fairly reliable mechanism exists out-of-band. Here are some suggestions. 1. FreeIPMI's 'ipmi-locate' can be used to determine if IPMI can be found on your system. Users are cautioned though, the failure to discover IPMI via 'ipmi-locate' is not sufficient to disprove that IPMI exists on your system. Your system may not publish such information or may expect clients to communicate at default locations. 2. 'dmidecode' may be similarly used to probe for devices that support IPMI on your system. You may grep for IPMI or specify the IPMI DMI type on the command line. # > dmidecode --type 38 # dmidecode 2.10 SMBIOS 2.5 present. Handle 0x0049, DMI type 38, 18 bytes IPMI Device Information Interface Type: KCS (Keyboard Control Style) Specification Version: 2.0 I2C Slave Address: 0x10 NV Storage Device: Not Present Base Address: 0x0000000000000CA2 (I/O) Register Spacing: Successive Byte Boundaries 3. FreeIPMI's 'ipmi-ping' can be used to see if a machine has an IPMI service at a specific host/IP address. For more wide scale IPMI discovery, the 'ipmi-detectd' daemon and 'ipmi-detect' tool can be used. Again, the failure to find an IPMI supported device is not sufficient to show lack of IPMI support. Ultimately, some amount of information from product documents or trial and error may be necessary to determine if IPMI is supported on your system.  File: freeipmi-faq.info, Node: How do I compile FreeIPMI?, Next: libgcrypt requirement, Prev: Does my system support IPMI?, Up: Top 8 How do I compile FreeIPMI? ============================ Please see the README.build instructions provided with FreeIPMI or on the FreeIPMI website's documentation ().  File: freeipmi-faq.info, Node: libgcrypt requirement, Next: x86-64 Compilation, Prev: How do I compile FreeIPMI?, Up: Top 9 libgcrypt requirement ======================= FreeIPMI requires the libgcrypt library to be installed for a variety of encryption requirements in IPMI 2.0. If you are building FreeIPMI and receive a 'libgcrypt required to build libfreeipmi' error, please install libgcrypt. For Linux users, this may require the install of the libgcrypt-devel package as well. For those who do not need IPMI 2.0 encryption, FreeIPMI may be built without it by specifying '--without-encryption' when executing configure.  File: freeipmi-faq.info, Node: x86-64 Compilation, Next: Installing FreeIPMI on FreeBSD, Prev: libgcrypt requirement, Up: Top 10 x86-64 Compilation ===================== By default, FreeIPMI's build autotools (e.g. configure) should detect if you are on a 64 bit system and should build against 64 bit libraries. However, some multi-architecture installs (e.g. you have 32 bit and 64 bit libraries installed) may lead to builds and installs of 32 bit instead of 64 bit. For those noticing this, pass libdir appropriately to the configure script to workaround this problem. (e.g. '--libdir=/usr/lib64') Example: # ./configure --prefix=/usr --libdir=/usr/lib64  File: freeipmi-faq.info, Node: Installing FreeIPMI on FreeBSD, Next: What are some IPMI terminology or acronyms I should be aware of?, Prev: x86-64 Compilation, Up: Top 11 Installing FreeIPMI on FreeBSD ================================= You can install a binary package of freeipmi or use the port, located in ports/sysutils/freeipmi, to build it from the source. See ports(7) and 'Packages and Ports' section () in The FreeBSD Handbook. Please contact port maintainer (MAINTAINER line in the port's Makefile), if you have problems building from the port.  File: freeipmi-faq.info, Node: What are some IPMI terminology or acronyms I should be aware of?, Next: What setup is needed for FreeIPMI to communicate over LAN?, Prev: Installing FreeIPMI on FreeBSD, Up: Top 12 What are some IPMI terminology or acronyms I should be aware of? =================================================================== Good question, here are some terms and acronyms with general definition you might want to know. *BMC* The *Baseboard Management Controller* is the management chip on the system that is responsible for IPMI. It is common to refer to configuring the "BMC" as synonymous for configuring IPMI. *inband* *inband* IPMI communication refers to communication on a system locally (i.e. not over a network). *outofband* *outofband* and *IPMI over LAN* refer to IPMI communication over a network, typically ethernet. *SDR* The *Sensor Data Repository* is a database of system information that is needed by many other IPMI functions. It is commonly read before some IPMI action can be taken. For example, it contains a list of all sensors on a system, so it must be downloaded before sensors on a system can be read. In FreeIPMI, the SDR is cached in a common location and can be used by a number of tools, such as 'ipmi-sensors', 'ipmi-sel', and 'ipmi-fru'. *SEL* The *System Event Log* is a log of events stored on the system for later diagnostics. In FreeIPMI, 'ipmi-sel' can be used to read the SEL. *FRU* The *Field Replaceable Unit* is a general computing term refering to a replaceable unit of electronics. In IPMI it is common to refer to the "FRU" as the database of all FRU components on a system. In FreeIPMI, 'ipmi-fru' can be used to read the FRU components on a system. *PEF* *Platform Event Filtering* refers to the rules that determine when PETs are generated and where they are sent. In FreeIPMI, PEF can be configured via 'ipmi-config'. *PET* *Platform Event Trap* refers to a trap that can be sent by a system to an SNMP agent to indicate an event has occurred on the system. In FreeIPMI, a PET trap can be interpreted via 'ipmi-pet'. *DCMI* The *Data Center Management Interface* is a management interface defined by a group of vendors that use IPMI as the backend for their system management definition. In FreeIPMI, 'ipmi-dcmi' can be used to read/configuring DCMI. *SOL* *Serial over LAN* refers to the forwarding of serial system traffic over a network, typically an ethernet network. It is typically used to access a remote system console. In FreeIPMI, ipmiconsole is used to access a remote console via SOL. *RMCP* The *Remote Management Control Protocol* protocol is another remote management protocol which IPMI is defined within for outofband communication. For most IPMI users, you will never need to know about RMCP.  File: freeipmi-faq.info, Node: What setup is needed for FreeIPMI to communicate over LAN?, Next: What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, Prev: What are some IPMI terminology or acronyms I should be aware of?, Up: Top 13 What setup is needed for FreeIPMI to communicate over LAN? ============================================================= Please see the ipmi-config.conf(5) manpage provided with FreeIPMI for details, or you can read it on the FreeIPMI website's documentation ().  File: freeipmi-faq.info, Node: What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, Next: Do I need to install or configure a driver to perform IPMI inband?, Prev: What setup is needed for FreeIPMI to communicate over LAN?, Up: Top 14 What setup is needed for Serial over LAN (SOL) or Ipmiconsole? ================================================================= The setup of Serial-over-LAN (SOL) and/or 'Ipmiconsole' is highly dependent on your system. However, most motherboardss require the following: 1. Adjust the BIOS COM port for serial redirection over SOL instead of the normal serial port and set the appropriate baud rate. If you do not know which port is the SOL port, you may need to play around and guess. It is likely a non-default setting, since many manufacturers may still assume the default redirection is out of the normal serial port. If you do not have a serial port on your motherboard, this part can probably be skipped. 2. Configure IPMI on the motherboard to use SOL. Many motherboards may have this enabled by default, however you may wish to verify with FreeIPMI's 'ipmi-config'. More information can be found in the ipmi-config.conf(5) manpage on the settings. However, the key settings are to enable SOL on the system, enable SOL for individual users, and select the appropriate baud. On many motherboards, the selected baud must match what is configured in the BIOS. 3. Adjust your operating systems serial console settings to use the appropriate COM port. For Linux, the following guide () provides a pretty good overview of setting of a serial console on Linux. The only difference for setting up a serial console with 'Ipmiconsole' or SOL, is the ttySX terminal may need to be changed.  File: freeipmi-faq.info, Node: Do I need to install or configure a driver to perform IPMI inband?, Next: SSIF Driver Configuration, Prev: What setup is needed for Serial over LAN (SOL) or Ipmiconsole?, Up: Top 15 Do I need to install or configure a driver to perform IPMI inband? ===================================================================== For most people the answer is no. FreeIPMI includes a userspace driver that works on most motherboards without any driver installation, loading, or configuration required. FreeIPMI also includes support of a Linux SSIF driver through the SSIF device (i.e. '/dev/i2c-0'), the OpenIPMI Linux kernel driver (i.e. '/dev/ipmi0'), the Sun/Solaris BMC driver (i.e. '/dev/bmc'), and the Intel DCMI/MEI driver (i.e. '/dev/dcmi'). If you communicate through one of these mechanisms, the appropriate drivers for them should be loaded. Most systems should automatically load the appropriate drivers you need. Under most scenarios, the FreeIPMI tools should automatically discover which in-band interface to use and the proper settings to use. Some motherboards may require you to determine alternate configurations for addresses, paths, etc. on your own and pass them as command line options to the tools. Every system is different and your situation may differ. Please see your manufacturer and operating system instructions. Special note: At the time of this writing the Intel DCMI/MEI Linux device drivers are not distributed widely. Please work with your vendor to obtain the Intel MEI and DCMI device drivers. There are some additional Linux OpenIPMI kernel driver notes here: .  File: freeipmi-faq.info, Node: SSIF Driver Configuration, Next: How do you setup Powerman with ipmipower?, Prev: Do I need to install or configure a driver to perform IPMI inband?, Up: Top 16 SSIF Driver Configuration ============================ FreeIPMI's SSIF driver works on top of kernel'2 i2c device interface. Under GNU/Linux load these kernel modules: i2c-dev, i2c-i801, i2c-core before using FreeIPMI. To identify SSIF device address: Example: $> lspci (in the output look for this entry) 00:1f.3 SMBus: Intel Corp. 6300ESB SMBus Controller (rev 01) Subsystem: Intel Corp.: Unknown device 342f Flags: medium devsel, IRQ 17 I/O ports at 0400 [size=32] ---- $> cat /proc/bus/i2c i2c-0 smbus SMBus I801 adapter at 0400 Non-I2C SMBus adapter ---- Make sure the "0400" above matches with the "0400" address under proc. Also make sure "i2c-0" is not different. If it appears different then grep for "i2c-0" in this code "ipmitool.c" and change. "i2c-X" is the label assigned to each slave device attached on the i2c bus. BMC address Locator: Refer to the SM BIOS IPMI Device Information Record Type 38, record 06h and 08h. Use the value of record 06h as the IPMBAddress and load the SMBus controller driver at the address value read from record 08h. Usual values for record 06h -> 0x42 Usual values for record 08h -> 0x400  File: freeipmi-faq.info, Node: How do you setup Powerman with ipmipower?, Next: How do you setup Conman with ipmiconsole or libipmiconsole?, Prev: SSIF Driver Configuration, Up: Top 17 How do you setup Powerman with ipmipower? ============================================ There are additional details in the Powerman () documentation, however here are the basics. In the powerman.conf file, you want to include the 'ipmipower.dev' device file, setup an ipmipower device in co-process mode, then configure hosts to use that device. include "/etc/powerman/ipmipower.dev" device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h mynodes[0-10] |&" node "mynodes[0-10]" "ipmi0" "mynodes[0-10]" You may wish to add some additional ipmipower configuration on the device line: device "ipmi0" "ipmipower" "/usr/sbin/ipmipower --wait-until-on --wait-until-off -h mynodes[0-10] -u username -p password |&" although you will probably want to do some of this configuration (especially the username and password) in 'freeipmi.conf'. If you use an alternate set of hostnames for IPMI from the primary hostname, that can configured like this: device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h altname[0-10] |&" node "primaryname[0-10]" "ipmi0" "altname[0-10]" Configuration can be trickier if you want to configure Powerman to use ipmipower with an OEM extension specified through '--oem-power-type'. Many OEM extensions in ipmipower must include additional arguments, which can be passed in via the node argument. In addition, while 'ipmipower' can take a host range as an additional argument, Powerman may not. For example, the following would be suitable to configure OEM extension support the Dell Poweredge C410x. A specific node identifier is used to map to a specific node and additional argument (i.e. mynodes0-1 maps to mynodes0+1). include "/etc/powerman/ipmipower.dev" device "ipmi0" "ipmipower" "/usr/sbin/ipmipower -h mynodes[0-10]+[1-16] --oem-power-type=c410x -l admin |&" node "mynodes[0-10]-1" "ipmi0" "mynodes[0-10]+1" node "mynodes[0-10]-2" "ipmi0" "mynodes[0-10]+2" node "mynodes[0-10]-3" "ipmi0" "mynodes[0-10]+3" node "mynodes[0-10]-4" "ipmi0" "mynodes[0-10]+4" node "mynodes[0-10]-5" "ipmi0" "mynodes[0-10]+5" node "mynodes[0-10]-6" "ipmi0" "mynodes[0-10]+6" node "mynodes[0-10]-7" "ipmi0" "mynodes[0-10]+7" node "mynodes[0-10]-8" "ipmi0" "mynodes[0-10]+8" node "mynodes[0-10]-9" "ipmi0" "mynodes[0-10]+9" node "mynodes[0-10]-10" "ipmi0" "mynodes[0-10]+10" node "mynodes[0-10]-11" "ipmi0" "mynodes[0-10]+11" node "mynodes[0-10]-12" "ipmi0" "mynodes[0-10]+12" node "mynodes[0-10]-13" "ipmi0" "mynodes[0-10]+13" node "mynodes[0-10]-14" "ipmi0" "mynodes[0-10]+14" node "mynodes[0-10]-15" "ipmi0" "mynodes[0-10]+15" node "mynodes[0-10]-16" "ipmi0" "mynodes[0-10]+16" As noted in the manpage, the Dell Poweredge C410x appears to have difficulty handling new slot power control requests until prior ones have completed. Users may wish to configure 'ipmipower' with '--wait-until-on', '--wait-until-off', and consider using the 'ipmipower-serial.dev' device file instead of 'ipmipower.dev'.  File: freeipmi-faq.info, Node: How do you setup Conman with ipmiconsole or libipmiconsole?, Next: How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, Prev: How do you setup Powerman with ipmipower?, Up: Top 18 How do you setup Conman with ipmiconsole or libipmiconsole? ============================================================== There are additional details in the Conman () documentation and manpages, however here are some basics. To configure Conman to connect via the ipmiconsole tool, Conman comes with an expect script named ipmiconsole.exp, typically installed into '/usr/lib/conman/exec/ipmiconsole.exp'. Consoles can be setup by adding lines to 'conman.conf' like: CONSOLE name="myserver" dev="/usr/lib/conman/exec/ipmiconsole.exp myserver myusername mypassword" One of the useful aspects of using the ipmiconsole.exp script is that the same configuration options you may have already configured into 'freeipmi.conf', may be loaded automatically when ipmiconsole is executed via this expect script. However, as can be expected, scalability may be a problem as you must launch a process for every node in your cluster. Conman is also capable of connecting to servers natively through the libipmiconsole library, so that no additional processes are launched. They can be configured as follows: CONSOLE name="myserver" IPMIOPTS="U:myusername,P:mypassword" dev="ipmi:myserver" on some older versions of Conman, you would instead use CONSOLE name="myserver" IPMIOPTS="myusername,mypassword" dev="ipmi:myserver" Please see the Conman documentation for current version options and additional configuration options available. Alternate defaults for libipmiconsole can also be set via the 'libipmiconsole.conf' file. One of the additional advantages of configuring Conman to use the libipmiconsole library natively is that Conman is able to detect and manage additional IPMI error cases.  File: freeipmi-faq.info, Node: How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, Next: Why are times reported by FreeIPMI tools wrong?, Prev: How do you setup Conman with ipmiconsole or libipmiconsole?, Up: Top 19 How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI? =========================================================================== Scripts to monitor IPMI via FreeIPMI in Ganglia and Nagios have been developed and are downloadable on the FreeIPMI homepage (). Instructions for setup can be found at the top of the scripts.  File: freeipmi-faq.info, Node: Why are times reported by FreeIPMI tools wrong?, Next: Why is the IPMI kernel driver faster than the KCS driver?, Prev: How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?, Up: Top 20 Why are times reported by FreeIPMI tools wrong? ================================================== Times reported by various FreeIPMI tools (such as 'ipmi-sel') are reported under the assumption that timestamps are written in localtime. This is by definition in the IPMI specification. Whether or not a system truly stored the timestamps in localtime varies on many factors, such as the vendor, BIOS, and operating system. If the times reported by the tool are off, there is a strong likelihood the time may be stored in GMT/UTC and needs to be converted into localtime. In FreeIPMI tools that have time outputs, the '--utc-to-localtime' option can be specified or the 'utc-to-localtime' option can be specified in 'freeipmi.conf'.  File: freeipmi-faq.info, Node: Why is the IPMI kernel driver faster than the KCS driver?, Next: Why is the output from FreeIPMI different than another software?, Prev: Why are times reported by FreeIPMI tools wrong?, Up: Top 21 Why is the IPMI kernel driver faster than the KCS driver? ============================================================ Internally the IPMI kernel driver chooses to spin while polling for a response from the base management controller (BMC) while the KCS driver elects to sleep between poll attempts. An operating system's scheduler granularity may be larger than the time it takes to perform a IPMI transaction, thus the wall clock time of the KCS driver is far worse than the IPMI kernel driver. FreeIPMI's KCS driver implements the sleep between poll attempts because it is believed to provide better overall system use. To force the KCS driver to have similar wall clock response time to the IPMI kernel driver, users can specify the 'spinpoll' workaround.  File: freeipmi-faq.info, Node: Why is the output from FreeIPMI different than another software?, Next: Why are there so many IPMI compliance bugs?, Prev: Why is the IPMI kernel driver faster than the KCS driver?, Up: Top 22 Why is the output from FreeIPMI different than another software? =================================================================== Due to minor implementation differences and or incorrect IPMI firmware, the resulting output from FreeIPMI tools can differ from other software. Here are some of the more common inconsistencies that have been seen before. More inconsistencies can be seen/fixed by specifying a number of the workarounds available to many of the FreeIPMI tools. * In FreeIPMI's 'ipmi-sel' and 'ipmi-sensors' there are options for FreeIPMI to interpret the SEL or sensor readings and give them a NOMINAL, WARNING, or CRITICAL status. Other IPMI software may have different interpretations for their sensors and/or SEL readings that map to NOMINAL, WARNING, or CRITICAL differently. These interpretations are configurable in FreeIPMI via the 'freeipmi_interpret_sel.conf' and 'freeipmi_interpret_sensor.conf' configuration files. * In some IPMI software, sensor and/or FRU records are bridged by default and read off satellite controllers. In FreeIPMI they are not due to the discovery that many vendors do not implement their bridging correctly or publish invalid slave addresses in the SDR. In order to bridge sensors the '--bridge-sensors' option must be specified in 'ipmi-sensors'. In order to bridge FRU records, the '--bridge-fru' must be specified in 'ipmi-fru'. * In some IPMI software, shared sensors may be read by default. In FreeIPMI's 'ipmi-sensors', they are not read by default due to discovery that too many systems implement this incorrectly. Shared sensors can be read by specifying the '--shared-sensors' option. * In vendor provided IPMI software, OEM specific sensors, SEL records, or FRU records may be output correctly because the vendor is aware of how to properly read/output OEM specific information. FreeIPMI may not be able to do this by default. For the motherboards in which OEM information is known, it can be output using the '--interpret-oem-data'. This option is available in 'ipmi-sensors', 'ipmi-sel', and 'ipmi-fru'. * In some vendor IPMI software, sensor "names" are constructured through a combination of the multiple data in the SDR, rather than just the device name listed in the SDR. This can lead to different sensor names listed in tools like 'ipmi-sensors' and 'ipmi-sel'. In both tools, this can be alleviated through the use of the '--entity-sensor-names' option. * On several HP systems (observed on HP Proliant DL380 G7 and HP ProLiant ML310 G5), the SDR lists sensors using inconsistent information. Some analog sensors are listed as discrete sensors or vice versa. This inconsistency, and implementation differences between 'ipmi-sensors' and other IPMI software lead to different outputs. For example, this is one such sensor that was seen in 'ipmi-sensors': 2 | Power Supply 1 | Power Supply | N/A | N/A | 'Presence detected' but this same sensor was see in 'ipmitool' as Power Supply 1 | 120 Watts | nc In this example, 'ipmi-sensors' did not output a Watts reading but outputs the proper "Presence Detected" state. 'Ipmitool' outputs the correct watts reading, but outputs the invalid non-critical "nc" state. In FreeIPMI, this problem can be worked around using the 'discretereading' workaround flag. * In FreeIPMI's 'ipmi-fru', all multirecord FRU entries are output by default. In 'ipmitool' and perhaps other software, they are not. The resulting output from 'ipmi-fru' is much larger than other software. To get similar output in 'ipmitool', the '-v' option must be set. * In FreeIPMI's 'ipmi-fru', FRU record checksums are automatically checked and errors are output if a FRU record cannot assumed to be valid due to a failed checksum check. Other IPMI software has been shown to ignore the checksums and assume records are valid. If your system has invalid checksummed FRU entries, the 'skipchecks' workaround can be used to get around them. * In FreeIPMI's 'ipmi-sensors', sensors may output an "OK" if no events are set. In other IPMI software (such as 'ipmitool' and the command "sdr list"), "OK" means that a sensor was simply read correctly. The "OK" may not mean that the device behind the sensor is actually functioning properly. For example, here is an output from an 'ipmitool' sdr list entry. PSU 1 Status | 0x0b | ok The 0x0b indicates that the power supply has errors (you normally want to see 0x00 or 0x01), however the sensor outputs "ok" because the sensor reading was read correctly. When using FreeIPMI's 'ipmi-sensors', the 0x0b is properly converted into the event messages indicating an error. 54 | PSU 1 Status | Power Supply | N/A | N/A | 'Presence detected' 'Power Supply Failure detected' 'Power Supply input lost (AC/DC)'  File: freeipmi-faq.info, Node: Why are there so many IPMI compliance bugs?, Next: How do I get around an IPMI compliance bug on my motherboard?, Prev: Why is the output from FreeIPMI different than another software?, Up: Top 23 Why are there so many IPMI compliance bugs? ============================================== The IPMI specification is very large. At last check, the IPMI specification was 601 pages. This does not count the various side specifications related to IPMI, including DCMI, PET, FRU, and the various OEM extension specifications (e.g. Intel Node Manager). Many sections of text can be ambiguous. Many components of IPMI are optional and aren't required to be implemented. There is some leeway for implementation interpretation as well. Ultimately, bugs will happen. In all fairness, FreeIPMI has had bugs too. A number of the IPMI compliance bugs found by FreeIPMI are documented in the freeipmi-bugs-issues-and-workarounds.txt document (you can find it on the website here: ).  File: freeipmi-faq.info, Node: How do I get around an IPMI compliance bug on my motherboard?, Next: Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, Prev: Why are there so many IPMI compliance bugs?, Up: Top 24 How do I get around an IPMI compliance bug on my motherboard? ================================================================ Most of the FreeIPMI tools and libraries have flags to workaround a large number of IPMI compliance bugs found on motherboards. Please see the appropriate tool manpages or library header files for details on the workarounds available and for what motherboards. If you believe there is a compliance issue on your motherboard that has not yet been implemented, please contact the maintainers on the mailing list.  File: freeipmi-faq.info, Node: Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, Next: How do I program with the FreeIPMI libraries?, Prev: How do I get around an IPMI compliance bug on my motherboard?, Up: Top 25 Why am I seeing so many 'internal IPMI error' or 'driver busy' messages? =========================================================================== In some Linux distributions (atleast with Redhat Enterprise Linux 6.4 / RHEL 6.4 and CentOS 6.4), the distributions began compiling the IPMI kernel driver (i.e. ipmi_msghandler and ipmi_si modules) into the kernel instead of as loadable modules. This was apparently due to a need for the IPMI kernel drivers to work with ACPI. Due to compiling the IPMI kernel driver into the kernel, there is the potential for inband IPMI communication to occur in the kernel w/o any knowledge of it from outside software in userspace. Normally, the IPMI service (i.e. /etc/init.d/ipmi) is started to create a device file (i.e. /dev/ipmi0) so that userspace software will know to communicate through this device. However, some of these distros disable the ipmi service so that a device file is never created. Because of this, multiple IPMI software can communicate inband to the BMC simultaneously, subsequently racing with each other. Ultimately, this can lead to communication problems. In FreeIPMI, this is most commonly seen through 'internal IPMI error' or 'driver busy' messages. There are several possible solutions for this in FreeIPMI. If you start the ipmi service (i.e. /etc/init.d/ipmi start), a device file will be created which FreeIPMI will recognize. FreeIPMI will subsequently communicate via inband IPMI through this device file, thus eliminating racing with the IPMI occurring in the kernel. The other option is to disable the IPMI kernel thread so that FreeIPMI can perform inband communication with the BMC through its own mechanisms. The following is from the Linux kernel documentation. When compiled into the kernel, the parameters can be specified on the kernel command line as: ipmi_si.type=,... ipmi_si.ports=,... ipmi_si.addrs=,... ipmi_si.irqs=,... ipmi_si.trydefaults=[0|1] ipmi_si.regspacings=,,... ipmi_si.regsizes=,,... ipmi_si.regshifts=,,... ipmi_si.slave_addrs=,,... ipmi_si.force_kipmid=,,... ipmi_si.kipmid_max_busy_us=,,... ... If your IPMI interface does not support interrupts and is a KCS or SMIC interface, the IPMI driver will start a kernel thread for the interface to help speed things up. This is a low-priority kernel thread that constantly polls the IPMI driver while an IPMI operation is in progress. The force_kipmid module parameter will all the user to force this thread on or off. If you force it off and don't have interrupts, the driver will run VERY slowly.  File: freeipmi-faq.info, Node: How do I program with the FreeIPMI libraries?, Next: Where can I get additional help or support?, Prev: Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?, Up: Top 26 How do I program with the FreeIPMI libraries? ================================================ If you are looking for a high level library to do Serial-over-LAN (SOL) or IPMI sensor/SEL monitoring, you may wish to look at the libipmiconsole and libipmimonitoring libraries. These libraries attempt to abstract a large amount of the underlying IPMI detail from developers. The majority of the documentation can be found in the header files. Some examples can be found in the documentation and the FreeIPMI tools that use them. The libfreeipmi library is the core library used by other FreeIPMI libraries and tools. However, it is quite detailed in regards to the IPMI specification and many components of the library will be quite confusing to those unfamiliar with the finer details of the IPMI specification. It is recommended most use the higher level libraries described above. A more detailed description of the available FreeIPMI libraries can be found in the 'freeipmi-libraries.txt' document (you can find it on the website here: ).  File: freeipmi-faq.info, Node: Where can I get additional help or support?, Prev: How do I program with the FreeIPMI libraries?, Up: Top 27 Where can I get additional help or support? ============================================== For help, please email the mailing list.  Tag Table: Node: Top689 Node: What is IPMI?2246 Node: What is FreeIPMI?3388 Node: How did FreeIPMI start?3921 Node: What operating systems does FreeIPMI run on?5286 Node: FreeIPMI vs OpenIPMI vs Ipmitool vs Ipmiutil6038 Node: What is special about FreeIPMI?6843 Node: Does my system support IPMI?13900 Node: How do I compile FreeIPMI?15893 Node: libgcrypt requirement16254 Node: x86-64 Compilation16893 Node: Installing FreeIPMI on FreeBSD17577 Node: What are some IPMI terminology or acronyms I should be aware of?18217 Node: What setup is needed for FreeIPMI to communicate over LAN?21242 Node: What setup is needed for Serial over LAN (SOL) or Ipmiconsole?21834 Node: Do I need to install or configure a driver to perform IPMI inband?23738 Node: SSIF Driver Configuration25451 Node: How do you setup Powerman with ipmipower?27047 Node: How do you setup Conman with ipmiconsole or libipmiconsole?30337 Node: How do you setup Ganglia or Nagios to monitor IPMI sensors via FreeIPMI?32341 Node: Why are times reported by FreeIPMI tools wrong?32982 Node: Why is the IPMI kernel driver faster than the KCS driver?33968 Node: Why is the output from FreeIPMI different than another software?34968 Node: Why are there so many IPMI compliance bugs?40363 Node: How do I get around an IPMI compliance bug on my motherboard?41461 Node: Why am I seeing so many 'internal IPMI error' or 'driver busy' messages?42274 Node: How do I program with the FreeIPMI libraries?45400 Node: Where can I get additional help or support?46743  End Tag Table freeipmi-1.6.4/etc/0000755002055400205540000000000013527342540014032 5ustar00achuachu00000000000000freeipmi-1.6.4/etc/Makefile.in0000644002055400205540000004303713527342444016111 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = etc DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ EXTRA_DIST = \ bmc-watchdog.init \ ipmidetectd.init \ ipmiseld.init \ bmc-watchdog.service \ ipmidetectd.service \ ipmiseld.service \ bmc-watchdog.sysconfig \ ipmidetect.conf \ ipmidetectd.conf \ ipmiseld.conf \ freeipmi.conf \ freeipmi_interpret_sel.conf \ freeipmi_interpret_sensor.conf \ libipmiconsole.conf all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu etc/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu etc/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-local .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am \ install-data-local install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-local install-data-local: $(INSTALL_DAEMON_SCRIPTS) $(INSTALL) -m 755 -d $(DESTDIR)$(FREEIPMI_SYSCONFDIR) $(INSTALL) -m 644 $(srcdir)/freeipmi.conf $(DESTDIR)$(FREEIPMI_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/freeipmi_interpret_sel.conf $(DESTDIR)$(INTERPRET_SEL_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/freeipmi_interpret_sensor.conf $(DESTDIR)$(INTERPRET_SENSOR_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmidetect.conf $(DESTDIR)$(IPMIDETECT_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmidetectd.conf $(DESTDIR)$(IPMIDETECTD_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmiseld.conf $(DESTDIR)$(IPMISELD_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/libipmiconsole.conf $(DESTDIR)$(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT) install-init-scripts: install-sysconfig $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.init $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog $(INSTALL) -m 755 $(srcdir)/ipmidetectd.init $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd $(INSTALL) -m 755 $(srcdir)/ipmiseld.init $(DESTDIR)$(sysconfdir)/init.d/ipmiseld install-systemd-scripts: install-sysconfig $(INSTALL) -m 755 -d $(DESTDIR)$(systemdsystemunitdir) $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.service $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service $(INSTALL) -m 755 $(srcdir)/ipmidetectd.service $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service $(INSTALL) -m 755 $(srcdir)/ipmiseld.service $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service install-sysconfig: $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/sysconfig $(INSTALL) -m 444 $(srcdir)/bmc-watchdog.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog uninstall-local: $(UNINSTALL_DAEMON_SCRIPTS) $(RM) -f $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog $(RM) -f $(DESTDIR)$(FREEIPMI_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(INTERPRET_SEL_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(INTERPRET_SENSOR_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMIDETECT_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMIDETECTD_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMISELD_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT) uninstall-init-scripts: $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/ipmiseld uninstall-systemd-scripts: $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/etc/Makefile.am0000644002055400205540000000554413527331635016101 0ustar00achuachu00000000000000EXTRA_DIST = \ bmc-watchdog.init \ ipmidetectd.init \ ipmiseld.init \ bmc-watchdog.service \ ipmidetectd.service \ ipmiseld.service \ bmc-watchdog.sysconfig \ ipmidetect.conf \ ipmidetectd.conf \ ipmiseld.conf \ freeipmi.conf \ freeipmi_interpret_sel.conf \ freeipmi_interpret_sensor.conf \ libipmiconsole.conf install-data-local: $(INSTALL_DAEMON_SCRIPTS) $(INSTALL) -m 755 -d $(DESTDIR)$(FREEIPMI_SYSCONFDIR) $(INSTALL) -m 644 $(srcdir)/freeipmi.conf $(DESTDIR)$(FREEIPMI_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/freeipmi_interpret_sel.conf $(DESTDIR)$(INTERPRET_SEL_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/freeipmi_interpret_sensor.conf $(DESTDIR)$(INTERPRET_SENSOR_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmidetect.conf $(DESTDIR)$(IPMIDETECT_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmidetectd.conf $(DESTDIR)$(IPMIDETECTD_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/ipmiseld.conf $(DESTDIR)$(IPMISELD_CONFIG_FILE_DEFAULT) $(INSTALL) -m 644 $(srcdir)/libipmiconsole.conf $(DESTDIR)$(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT) install-init-scripts: install-sysconfig $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/init.d $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.init $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog $(INSTALL) -m 755 $(srcdir)/ipmidetectd.init $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd $(INSTALL) -m 755 $(srcdir)/ipmiseld.init $(DESTDIR)$(sysconfdir)/init.d/ipmiseld install-systemd-scripts: install-sysconfig $(INSTALL) -m 755 -d $(DESTDIR)$(systemdsystemunitdir) $(INSTALL) -m 755 $(srcdir)/bmc-watchdog.service $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service $(INSTALL) -m 755 $(srcdir)/ipmidetectd.service $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service $(INSTALL) -m 755 $(srcdir)/ipmiseld.service $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service install-sysconfig: $(INSTALL) -m 755 -d $(DESTDIR)$(sysconfdir)/sysconfig $(INSTALL) -m 444 $(srcdir)/bmc-watchdog.sysconfig $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog uninstall-local: $(UNINSTALL_DAEMON_SCRIPTS) $(RM) -f $(DESTDIR)$(sysconfdir)/sysconfig/bmc-watchdog $(RM) -f $(DESTDIR)$(FREEIPMI_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(INTERPRET_SEL_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(INTERPRET_SENSOR_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMIDETECT_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMIDETECTD_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(IPMISELD_CONFIG_FILE_DEFAULT) $(RM) -f $(DESTDIR)$(LIBIPMICONSOLE_CONFIG_FILE_DEFAULT) uninstall-init-scripts: $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/bmc-watchdog $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/ipmidetectd $(RM) -f $(DESTDIR)$(sysconfdir)/init.d/ipmiseld uninstall-systemd-scripts: $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/bmc-watchdog.service $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmidetectd.service $(RM) -f $(DESTDIR)$(systemdsystemunitdir)/ipmiseld.service freeipmi-1.6.4/etc/bmc-watchdog.init0000755002055400205540000000532613527331635017272 0ustar00achuachu00000000000000#!/bin/sh # # chkconfig: - 99 01 # description: bmc-watchdog startup script # ### BEGIN INIT INFO # Provides: bmc-watchdog # Required-Start: $network $remote_fs $syslog # Required-Stop: $network $remote_fs $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Start and stop bmc-watchdog # Description: BMC watchdog timer daemon ### END INIT INFO DAEMON=/usr/sbin/bmc-watchdog PIDFILE=/var/run/bmc-watchdog.pid LOCKFILE=/var/lock/subsys/bmc-watchdog CONFFILE=/etc/sysconfig/bmc-watchdog [ -f $DAEMON ] || exit 5 if [ -r $CONFFILE ]; then . $CONFFILE fi # Load Redhat or Suse appropriate libs if [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions Xstart() { # Default deamon mode # # timer use = SMS/OS # pre-timeout interrupt = none # action = reset # -F, -P, -L, -S, -O - clear flags # initial-countdown = 900 seconds (15 mins) # reset-period = 60 seconds daemon -20 $DAEMON $OPTIONS RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE } Xstop() { killproc bmc-watchdog RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE } Xstatus() { status bmc-watchdog RETVAL=$? return $RETVAL } Xcondrestart() { if test -e $LOCKFILE; then $0 stop $0 start RETVAL=$? fi } Xexit() { exit $RETVAL } elif [ -f /etc/rc.status ] ; then . /etc/rc.status Xstart() { startproc -20 $DAEMON $OPTIONS rc_status -v RETVAL=$? return $RETVAL } Xstop() { killproc -TERM $DAEMON rc_status -v RETVAL=$? return $RETVAL } Xstatus() { echo -n "Checking for bmc-watchdog: " checkproc $DAEMON rc_status -v RETVAL=$? return $RETVAL } Xcondrestart() { $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status RETVAL=$? return $RETVAL } Xexit() { rc_exit } else echo "Unknown distribution type" exit 1 fi RETVAL=0 case "$1" in start) echo -n "Starting bmc-watchdog: " Xstatus >/dev/null 2>&1 && exit 0 Xstart ;; stop) echo -n "Shutting down bmc-watchdog: " Xstop ;; restart) $0 stop $0 start RETVAL=$? ;; status) Xstatus ;; condrestart|try-restart|force-reload) Xcondrestart ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}" exit 2 esac exit $RETVAL freeipmi-1.6.4/etc/ipmidetectd.init0000644002055400205540000000451113527331635017216 0ustar00achuachu00000000000000#!/bin/sh # $Id: ipmidetectd.init,v 1.1 2009-10-01 18:09:57 chu11 Exp $ # # chkconfig: - 70 40 # description: ipmidetectd startup script # ### BEGIN INIT INFO # Provides: ipmidetectd # Required-Start: $network $remote_fs $syslog # Required-Stop: $network $remote_fs $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Start and stop ipmidetectd # Description: IPMI node detection monitoring daemon ### END INIT INFO IPMIDETECTD=/usr/sbin/ipmidetectd IPMIDETECTD_CONF=/etc/freeipmi/ipmidetectd.conf LOCKFILE=/var/lock/subsys/ipmidetectd [ -f $IPMIDETECTD ] || exit 5 [ -f $IPMIDETECTD_CONF ] || exit 6 # Load Redhat or Suse appropriate libs if [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions Xstart() { daemon $IPMIDETECTD RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE } Xstop() { killproc ipmidetectd -TERM RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE } Xstatus() { status ipmidetectd RETVAL=$? return $RETVAL } Xcondrestart() { if test -e $LOCKFILE; then $0 stop $0 start RETVAL=$? fi } Xexit() { exit $RETVAL } elif [ -f /etc/rc.status ] ; then . /etc/rc.status Xstart() { startproc $IPMIDETECTD rc_status -v } Xstop() { killproc -TERM $IPMIDETECTD rc_status -v } Xstatus() { echo -n "Checking for ipmidetectd: " checkproc $IPMIDETECTD rc_status -v } Xcondrestart() { $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status } Xexit() { rc_exit } else echo "Unknown distribution type" exit 1 fi RETVAL=0 case "$1" in start) echo -n "Starting ipmidetectd: " Xstatus >/dev/null 2>&1 && exit 0 Xstart ;; stop) echo -n "Shutting down ipmidetectd: " Xstop ;; restart) $0 stop $0 start RETVAL=$? ;; status) Xstatus ;; condrestart|try-restart|force-reload) Xcondrestart ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}" exit 2 esac exit $RETVAL freeipmi-1.6.4/etc/ipmiseld.init0000644002055400205540000000441013527331635016527 0ustar00achuachu00000000000000#!/bin/sh # $Id: ipmiseld.init,v 1.1 2009-10-01 18:09:57 chu11 Exp $ # # chkconfig: - 70 40 # description: ipmiseld startup script # ### BEGIN INIT INFO # Provides: ipmiseld # Required-Start: $network $remote_fs $syslog # Required-Stop: $network $remote_fs $syslog # Default-Start: 3 5 # Default-Stop: 0 1 2 6 # Short-Description: Start and stop ipmidetectd # Description: IPMI SEL sylog logging daemon ### END INIT INFO IPMISELD=/usr/sbin/ipmiseld IPMISELD_CONF=/etc/freeipmi/ipmiseld.conf LOCKFILE=/var/lock/subsys/ipmiseld [ -f $IPMISELD ] || exit 5 [ -f $IPMISELD_CONF ] || exit 6 # Load Redhat or Suse appropriate libs if [ -f /etc/rc.d/init.d/functions ] ; then . /etc/rc.d/init.d/functions Xstart() { daemon $IPMISELD RETVAL=$? echo [ $RETVAL -eq 0 ] && touch $LOCKFILE } Xstop() { killproc ipmiseld -TERM RETVAL=$? echo [ $RETVAL -eq 0 ] && rm -f $LOCKFILE } Xstatus() { status ipmiseld RETVAL=$? return $RETVAL } Xcondrestart() { if test -e $LOCKFILE; then $0 stop $0 start RETVAL=$? fi } Xexit() { exit $RETVAL } elif [ -f /etc/rc.status ] ; then . /etc/rc.status Xstart() { startproc $IPMISELD rc_status -v } Xstop() { killproc -TERM $IPMISELD rc_status -v } Xstatus() { echo -n "Checking for ipmiseld: " checkproc $IPMISELD rc_status -v } Xcondrestart() { $0 status if test $? = 0; then $0 restart else rc_reset fi rc_status } Xexit() { rc_exit } else echo "Unknown distribution type" exit 1 fi RETVAL=0 case "$1" in start) echo -n "Starting ipmiseld: " Xstatus >/dev/null 2>&1 && exit 0 Xstart ;; stop) echo -n "Shutting down ipmiseld: " Xstop ;; restart) $0 stop $0 start RETVAL=$? ;; status) Xstatus ;; condrestart|try-restart|force-reload) Xcondrestart ;; *) echo "Usage: $0 {start|stop|restart|status|condrestart|try-restart|force-reload}" exit 2 esac exit $RETVAL freeipmi-1.6.4/etc/bmc-watchdog.service0000644002055400205540000000036513527331635017762 0ustar00achuachu00000000000000[Unit] Description=BMC Watchdog Timer Daemon After=network.target [Service] Type=forking PIDFile=/run/bmc-watchdog.pid EnvironmentFile=-/etc/sysconfig/bmc-watchdog ExecStart=/usr/sbin/bmc-watchdog $OPTIONS [Install] WantedBy=multi-user.target freeipmi-1.6.4/etc/ipmidetectd.service0000644002055400205540000000025413527331635017713 0ustar00achuachu00000000000000[Unit] Description=IPMI Node Detection Monitoring Daemon After=network.target [Service] Type=forking ExecStart=/usr/sbin/ipmidetectd [Install] WantedBy=multi-user.target freeipmi-1.6.4/etc/ipmiseld.service0000644002055400205540000000024213527331635017223 0ustar00achuachu00000000000000[Unit] Description=IPMI SEL syslog logging daemon After=network.target [Service] Type=forking ExecStart=/usr/sbin/ipmiseld [Install] WantedBy=multi-user.target freeipmi-1.6.4/etc/bmc-watchdog.sysconfig0000644002055400205540000000272613527331635020331 0ustar00achuachu00000000000000# # This configuration file controls the behaviour of the bmc-watchdog daemon # from FreeIPMI. # # -u INT, --timer-use=INT # Set timer use. The timer use value can be set to one of the # following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS # OS, 5 = OEM. # # -p INT, --pre-timeout-interrupt=INT # Set pre-timeout interrupt. The pre timeout interrupt can be set # to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messag- # ing Interrupt. # # -a INT, --timeout-action=INT # Set timeout action. The timeout action can be set to one of the # following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 = # Power Cycle. # # -F, --clear-bios-frb2 # Clear BIOS FRB2 Timer Use Flag. # # -P, --clear-bios-post # Clear BIOS POST Timer Use Flag. # # -L, --clear-os-load # Clear OS Load Timer Use Flag. # # -S, --clear-sms-os # Clear SMS/OS Timer Use Flag. # # -O, --clear-oem # Clear OEM Timer Use Flag. # # -i SECS, --initial-countdown=SECS # Set initial countdown in seconds. # # -e, --reset-period # Time interval to wait before resetting timer. The default is 60 # seconds. # # For the remaining options, consult man bmc-watchdog # OPTIONS="-d -u 4 -p 0 -a 1 -F -P -L -S -O -i 900 -e 60" freeipmi-1.6.4/etc/ipmidetect.conf0000644002055400205540000000077113527331635017040 0ustar00achuachu00000000000000########################################################################################################## # # IPMIdetect configuration file. # # For more information on the fields below, please see the manpage # ipmidetect.conf(5). # # P.S. If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # # hostnames ... # # port # # timeout_len freeipmi-1.6.4/etc/ipmidetectd.conf0000644002055400205540000000111413527331635017174 0ustar00achuachu00000000000000########################################################################################################## # # IPMIdetectd configuration file. # # For more information on the fields below, please see the manpage # ipmidetectd.conf(5). # # P.S. If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # # ipmiping_period 15000 # # ipmidetectd_server_port 9225 # # host # # host # # host # # host # # host freeipmi-1.6.4/etc/ipmiseld.conf0000644002055400205540000000327613527331635016522 0ustar00achuachu00000000000000########################################################################################################## # # IPMIseld configuration file. # # For more information on the fields below, please see the manpage # ipmiseld.conf(5). # # P.S. If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # # driver-type KCS # # disable-auto-probe DISABLE # # driver-address 0xCA2 # # driver-device /my/device/path # # register-spacing 1 # # target-channel-number 0 # # target-slave-address 0x20 # # hostname myhost(s) # # username myusername # # password mypassword # # k_g mykey # ## session-timeout specified in milliseconds # session-timeout 20000 # ## retransmission-timeout specified in milliseconds # retransmission-timeout 1000 # # authentication-type MD5 # # cipher-suite-id 3 # # privilege-level ADMIN # # workaround-flags workaround1 workaround2 workaround3 # # verbose-count 0 # # sensor-types temperature fan # # exclude-sensor-types temperature fan # # system-event-only DISABLE # # oem-event-only DISABLE # # event-state-config-file /my/event.conf # # interpret-oem-data DISABLE # # entity-sensor-names DISABLE # # non-abbreviated-units DISABLE # # event-state-filter nominal # # warning-threshold 80 # # clear-threshold 0 # # system-event-format "SEL System Event: %s, %I, %E" # # oem-timestamped-event-format "SEL OEM Event: %I, %o" # # oem-non-timestamped-event-format "SEL OEM Event: %I, %o" # # poll-interval 300 # # log-facility LOG_DAEMON # # log-priority LOG_ERR # # cache-directory /my/cache # # ignore-sdr DISABLE # # re-download-sdr DISABLE # # clear-sel DISABLE # # threadpool-count 8 freeipmi-1.6.4/etc/freeipmi.conf0000644002055400205540000003377213527331635016520 0ustar00achuachu00000000000000##################################################################################################### # # FreeIPMI configuration # # The FreeIPMI configuration file can be used to set alternate default # values to many FreeIPMI tools so values don't have to be configured on # the command line. This allows users to avoid typing in a long list of # command line options everytime a command is executed. It can also be # used to hide usernames, passwords, and other sensitive information # from the ps(1) command. # # For more information on the fields below, please see the manpage # freeipmi.conf(5). # # Albert Chu # . # # P.S. If you configure different values, remember to uncomment the line :-) # ##################################################################################################### # # General Options # # The following options are options generally available to all tools, # although specific options may be ignored by some. # # driver-type KCS # # disable-auto-probe DISABLE # # driver-address 0xCA2 # # driver-device /my/device/path # # register-spacing 1 # # target-channel-number 0 # # target-slave-address 0x20 # # username myusername # # password mypassword # # k_g mykey # ## session-timeout specified in milliseconds # session-timeout 20000 # ## retransmission-timeout specified in milliseconds # retransmission-timeout 1000 # # authentication-type MD5 # # cipher-suite-id 3 # # privilege-level ADMIN # # workaround-flags workaround1 workaround2 workaround3 # ##################################################################################################### # # SDR OPTIONS # # The following options are specific to tools that use the sensor data # repository (SDR). They will be ignored by all other tools. # # quiet-cache DISABLE # # sdr-cache-directory /my/sdr/path # ##################################################################################################### # # TIME OPTIONS # # The following options are specific to tools that may output time # values. They will be ignored by all other tools. # # utc-to-localtime DISABLE # # localtime-to-utc DISABLE # # utc-offset 0 # ##################################################################################################### # # HOSTRANGED OPTIONS # # The following options are specific to tools that support hostranged # output. They will be ignored by all other tools. # # buffer-output DISABLE # # consolidate-output DISABLE # # fanout 64 # # eliminate DISABLE # # always-prefix DISABLE # ##################################################################################################### # # BMC-CONFIG OPTIONS # # The following options are specific to bmc-config(8). They will be # ignored by other tools. # # bmc-config-username myusername # # bmc-config-password mypassword # # bmc-config-k_g mykey # # bmc-config-authentication-type MD5 # # bmc-config-cipher-suite-id 3 # # bmc-config-privilege-level ADMIN # # bmc-config-workaround-flags workaround1 workaround2 workaround3 # # bmc-config-verbose-count 0 # ##################################################################################################### # # BMC-DEVICE OPTIONS # # The following options are specific to bmc-device(8). They will be # ignored by other tools. # # bmc-device-username myusername # # bmc-device-password mypassword # # bmc-device-k_g mykey # # bmc-device-authentication-type MD5 # # bmc-device-cipher-suite-id 3 # # bmc-device-privilege-level ADMIN # # bmc-device-workaround-flags workaround1 workaround2 workaround3 # ##################################################################################################### # # BMC-INFO OPTIONS # # The following options are specific to bmc-info(8). They will be # ignored by other tools. # # bmc-info-username myusername # # bmc-info-password mypassword # # bmc-info-k_g mykey # # bmc-info-authentication-type MD5 # # bmc-info-cipher-suite-id 3 # # bmc-info-privilege-level USER # # bmc-info-workaround-flags workaround1 workaround2 workaround3 # # bmc-info-interpret-oem-data DISABLE # ##################################################################################################### # # BMC-WATCHDOG OPTIONS # # The following options are specific to bmc-watchdog(8). They will be # ignored by other tools. # # bmc-watchdog-workaround-flags workaround1 workaround2 workaround3 # # bmc-watchdog-verbose-logging DISABLE # # bmc-watchdog-no-logging DISABLE # ##################################################################################################### # # IPMI-CHASSIS OPTIONS # # The following options are specific to ipmi-chassis(8). They will be # ignored by other tools. # # ipmi-chassis-username myusername # # ipmi-chassis-password mypassword # # ipmi-chassis-k_g mykey # # ipmi-chassis-authentication-type MD5 # # ipmi-chassis-cipher-suite-id 3 # # ipmi-chassis-privilege-level ADMIN # # ipmi-chassis-workaround-flags workaround1 workaround2 workaround3 # ##################################################################################################### # # IPMI-CHASSIS-CONFIG OPTIONS # # The following options are specific to ipmi-chassis-config(8). They will be # ignored by other tools. # # ipmi-chassis-config-username myusername # # ipmi-chassis-config-password mypassword # # ipmi-chassis-config-k_g mykey # # ipmi-chassis-config-authentication-type MD5 # # ipmi-chassis-config-cipher-suite-id 3 # # ipmi-chassis-config-privilege-level ADMIN # # ipmi-chassis-config-workaround-flags workaround1 workaround2 workaround3 # # ipmi-chassis-config-verbose-count 0 # ##################################################################################################### # # IPMI-DCMI OPTIONS # # The following options are specific to ipmi-dcmi(8). They will be # ignored by other tools. # # ipmi-dcmi-username myusername # # ipmi-dcmi-password mypassword # # ipmi-dcmi-k_g mykey # # ipmi-dcmi-authentication-type MD5 # # ipmi-dcmi-cipher-suite-id 3 # # ipmi-dcmi-privilege-level ADMIN # # ipmi-dcmi-workaround-flags workaround1 workaround2 workaround3 # # ipmi-dcmi-interpret-oem-data DISABLE # ##################################################################################################### # # IPMI-FRU OPTIONS # # The following options are specific to ipmi-fru(8). They will be # ignored by other tools. # # ipmi-fru-username myusername # # ipmi-fru-password mypassword # # ipmi-fru-k_g mykey # # ipmi-fru-authentication-type MD5 # # ipmi-fru-cipher-suite-id 3 # # ipmi-fru-privilege-level USER # # ipmi-fru-workaround-flags workaround1 workaround2 workaround3 # # ipmi-fru-verbose-count 0 # # ipmi-fru-bridge-fru DISABLE # # ipmi-fru-interpret-oem-data DISABLE # ##################################################################################################### # # IPMI-OEM OPTIONS # # The following options are specific to ipmi-oem(8). They will be # ignored by other tools. # # ipmi-oem-username myusername # # ipmi-oem-password mypassword # # ipmi-oem-k_g mykey # # ipmi-oem-authentication-type MD5 # # ipmi-oem-cipher-suite-id 3 # # ipmi-oem-privilege-level ADMIN # # ipmi-oem-workaround-flags workaround1 workaround2 workaround3 # # ipmi-oem-verbose-count 0 # ##################################################################################################### # # IPMI-PEF-CONFIG OPTIONS # # The following options are specific to ipmi-pef-config(8). They will be # ignored by other tools. # # ipmi-pef-config-username myusername # # ipmi-pef-config-password mypassword # # ipmi-pef-config-k_g mykey # # ipmi-pef-config-authentication-type MD5 # # ipmi-pef-config-cipher-suite-id 3 # # ipmi-pef-config-privilege-level ADMIN # # ipmi-pef-config-workaround-flags workaround1 workaround2 workaround3 # # ipmi-pef-config-verbose-count 0 # ##################################################################################################### # # IPMI-PET OPTIONS # # The following options are specific to ipmi-pet(8). They will be # ignored by other tools. # # ipmi-pet-username myusername # # ipmi-pet-password mypassword # # ipmi-pet-k_g mykey # # ipmi-pet-authentication-type MD5 # # ipmi-pet-cipher-suite-id 3 # # ipmi-pet-privilege-level OPERATOR # # ipmi-pet-workaround-flags workaround1 workaround2 workaround3 # # ipmi-pet-verbose-count 0 # # ipmi-pet-output-event-severity DISABLE # # ipmi-pet-output-event-state DISABLE # # ipmi-pet-event-state-config-file /my/event.conf # # ipmi-pet-interpret-oem-data DISABLE # # ipmi-pet-entity-sensor-names DISABLE # # ipmi-pet-no-sensor-type-output DISABLE # # ipmi-pet-comma-separated-output DISABLE # # ipmi-pet-no-header-output DISABLE # # ipmi-pet-non-abbreviated-units DISABLE # ##################################################################################################### # # IPMI-RAW OPTIONS # # The following options are specific to ipmi-raw(8). They will be # ignored by other tools. # # ipmi-raw-username myusername # # ipmi-raw-password mypassword # # ipmi-raw-k_g mykey # # ipmi-raw-authentication-type MD5 # # ipmi-raw-cipher-suite-id 3 # # ipmi-raw-privilege-level ADMIN # # ipmi-raw-workaround-flags workaround1 workaround2 workaround3 # ##################################################################################################### # # IPMI-SEL OPTIONS # # The following options are specific to ipmi-sel(8). They will be # ignored by other tools. # # ipmi-sel-username myusername # # ipmi-sel-password mypassword # # ipmi-sel-k_g mykey # # ipmi-sel-authentication-type MD5 # # ipmi-sel-cipher-suite-id 3 # # ipmi-sel-privilege-level OPERATOR # # ipmi-sel-workaround-flags workaround1 workaround2 workaround3 # # ipmi-sel-verbose-count 0 # # ipmi-sel-sensor-types temperature fan # # ipmi-sel-exclude-sensor-types temperature fan # # ipmi-sel-system-event-only DISABLE # # ipmi-sel-oem-event-only DISABLE # # ipmi-sel-output-manufacturer-id DISABLE # # ipmi-sel-output-event-state DISABLE # # ipmi-sel-event-state-config-file /my/event.conf # # ipmi-sel-interpret-oem-data DISABLE # # ipmi-sel-output-oem-event-strings DISABLE # # ipmi-sel-entity-sensor-names DISABLE # # ipmi-sel-no-sensor-type-output DISABLE # # ipmi-sel-comma-separated-output DISABLE # # ipmi-sel-no-header-output DISABLE # # ipmi-sel-non-abbreviated-units DISABLE # # ipmi-sel-legacy-output DISABLE # ##################################################################################################### # # IPMI-SENSORS OPTIONS # # The following options are specific to ipmi-sensors(8). They will be # ignored by other tools. # # ipmi-sensors-username myusername # # ipmi-sensors-password mypassword # # ipmi-sensors-k_g mykey # # ipmi-sensors-authentication-type MD5 # # ipmi-sensors-cipher-suite-id 3 # # ipmi-sensors-privilege-level OPERATOR # # ipmi-sensors-workaround-flags workaround1 workaround2 workaround3 # # ipmi-sensors-verbose-count 0 # # ipmi-sensors-quiet-readings DISABLE # # ipmi-sensors-record-ids 1 2 3 4 # # ipmi-sensors-exclude-record-ids 1 2 3 4 # # ipmi-sensors-sensor-types temperature fan # # ipmi-sensors-exclude-sensor-types temperature fan # # ipmi-sensors-bridge-sensors DISABLE # # ipmi-sensors-shared-sensors DISABLE # # ipmi-sensors-interpret-oem-data DISABLE # # ipmi-sensors-ignore-not-available-sensors DISABLE # # ipmi-sensors-ignore-unrecognized-events DISABLE # # ipmi-sensors-output-event-bitmask DISABLE # # ipmi-sensors-output-sensor-state DISABLE # # ipmi-sensors-sensor-state-config-file /my/sensor.conf # # ipmi-sensors-entity-sensor-names DISABLE # # ipmi-sensors-output-sensor-thresholds DISABLE # # ipmi-sensors-no-sensor-type-output DISABLE # # ipmi-sensors-comma-separated-output DISABLE # # ipmi-sensors-no-header-output DISABLE # # ipmi-sensors-non-abbreviated-units DISABLE # # ipmi-sensors-legacy-output DISABLE # # ipmi-sensors-ipmimonitoring-legacy-output DISABLE # ##################################################################################################### # # IPMI-SENSORS-CONFIG OPTIONS # # The following options are specific to ipmi-sensors-config(8). They will be # ignored by other tools. # # ipmi-sensors-config-username myusername # # ipmi-sensors-config-password mypassword # # ipmi-sensors-config-k_g mykey # # ipmi-sensors-config-authentication-type MD5 # # ipmi-sensors-config-cipher-suite-id 3 # # ipmi-sensors-config-privilege-level OPERATOR # # ipmi-sensors-config-workaround-flags workaround1 workaround2 workaround3 # # ipmi-sensors-config-verbose-count 0 # ##################################################################################################### # # IPMICONSOLE OPTIONS # # The following options are specific to ipmiconsole(8). They will be # ignored by other tools. # # ipmiconsole-username myusername # # ipmiconsole-password mypassword # # ipmiconsole-k_g mykey # # ipmiconsole-authentication-type MD5 # # ipmiconsole-cipher-suite-id 3 # # ipmiconsole-privilege-level ADMIN # # ipmiconsole-workaround-flags workaround1 workaround2 workaround3 # # ipmiconsole-escape-char & # # ipmiconsole-dont-steal DISABLE # # ipmiconsole-serial-keepalive DISABLE # # ipmiconsole-serial-keepalive-empty DISABLE # # ipmiconsole-lock-memory DISABLE # ##################################################################################################### # # IPMIPOWER OPTIONS # # The following options are specific to ipmipower(8). They will be # ignored by other tools. # # ipmipower-username myusername # # ipmipower-password mypassword # # ipmipower-k_g mykey # # ipmipower-authentication-type MD5 # # ipmipower-cipher-suite-id 3 # # ipmipower-privilege-level OPERATOR # # ipmipower-workaround-flags workaround1 workaround2 workaround3 # # ipmipower-on-if-off DISABLE # # ipmipower-wait-until-on DISABLE # # ipmipower-wait-until-off DISABLE # # ipmipower-oem-power-type oem-power-type # ## ipmipower-retransmission-wait-timeout specified in milliseconds # ipmipower-retransmission-wait-timeout 500 # # ipmipower-retransmission-backoff-count 8 # ## ipmipower-ping-interval specified in milliseconds # ipmipower-ping-interval 5000 # ## ipmipower-ping-timeout specified in milliseconds # ipmipower-ping-timeout 30000 # # ipmipower-ping-packet-count 10 # ## ipmipower-ping-percent specified in integer percentage # ipmipower-ping-percent 50 # # ipmipower-ping-consec-count 5 # ##################################################################################################### freeipmi-1.6.4/etc/freeipmi_interpret_sel.conf0000644002055400205540000016276213527331635021461 0ustar00achuachu00000000000000########################################################################################################## # # FreeIPMI Interpret SEL # # This configuration file defines how IPMI system event log entries # should be interpreted. IPMI system events specify a number of # states/thresholds when they are read. Based on those # states/thresholds we can allow tools and libraries such as # ipmi-sel(8) or libipmimonitoring(3) if a sensor reading is "good" or # "bad" via a NOMINAL, WARNING, or CRITICAL state). A different state # can be reported for an event depending on if it is asserted or # deasserted. # # Each of the states listed below are (hopefully) descriptive enough # to describe the state conditions that may be set/unset for each # sensor or event type. For more detailed information on each of the # individual states listed below, please see the IPMI Specification # "Sensor and Event Code Tables". Ipmi-sensors(8) can be used to # determine the sensor types and the states/thresholds that exist on a # system by outputting very verbose output and seeing what types of # Assertion or Deassertion events are possible. # # Each of the events below may take 1 or 2 of the following states as # input. # # Nominal - Signal Nominal reading if event tripped # Warning - Signal Warning reading if event tripped # Critical - Signal Critical reading if event tripped # # If only one state is listed, that state will be interpreted when the # event is asserted or deasserted. If two states are listed, the # first state will be interpreted when an event is asserted, and the # later will be interpreted when an event is deasserted. # # Not all IPMI sensor types and event types are currently supported. # If you would like more to be supported, please e-mail the FreeIPMI # mailing list. # # The default values selected for individual events being # tripped are based on best guesses and motherboards being analyzed. # If you think they should be changed, please e-mail the FreeIPMI # mailing list to discuss what the defaults should be. # # Most default interpretations can be determined quite easily and can # meet the needs of most users. For example, a reading of # "Performance_Met" is normally better than "Performance_Lags". # However, some states can be ambiguous and depend completely on the # manufacturer. For example, "State_Asserted" vs. "State_Deasserted" # are completely at the interpretation of the vendor. Users are # advised to adjust the interpretations below as needed. # # If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # ## IPMI_Threshold_Sensor # # Temperature, Voltage, RPM, etc. sensors # # IPMI_Threshold_Sensor_Lower_Non_Critical_Going_Low Warning Nominal # IPMI_Threshold_Sensor_Lower_Non_Critical_Going_High Nominal Nominal # IPMI_Threshold_Sensor_Lower_Critical_Going_Low Critical Warning # IPMI_Threshold_Sensor_Lower_Critical_Going_High Warning Warning # IPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_Low Critical Critical # IPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_High Critical Critical # IPMI_Threshold_Sensor_Upper_Non_Critical_Going_Low Nominal Nominal # IPMI_Threshold_Sensor_Upper_Non_Critical_Going_High Warning Nominal # IPMI_Threshold_Sensor_Upper_Critical_Going_Low Warning Warning # IPMI_Threshold_Sensor_Upper_Critical_Going_High Critical Warning # IPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_Low Critical Critical # IPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_High Critical Critical # ########################################################################################################## # ## IPMI_Temperature_State # # IPMI_Temperature_State_Deasserted Nominal # IPMI_Temperature_State_Asserted Warning # ########################################################################################################## # ## IPMI_Temperature_Limit # # IPMI_Temperature_Limit_Not_Exceeded Nominal # IPMI_Temperature_Limit_Exceeded Critical # ########################################################################################################## # ## IPMI_Temperature_Transition_Severity # # IPMI_Temperature_Transition_Severity_Transition_To_OK Nominal # IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Temperature_Transition_Severity_Monitor Warning # IPMI_Temperature_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Voltage_State # # IPMI_Voltage_State_Deasserted Nominal # IPMI_Voltage_State_Asserted Warning # ########################################################################################################## # ## IPMI_Voltage_Limit # # IPMI_Voltage_Limit_Not_Exceeded Nominal # IPMI_Voltage_Limit_Exceeded Critical # ########################################################################################################## # ## IPMI_Voltage_Performance # # IPMI_Voltage_Performance_Met Nominal Nominal # IPMI_Voltage_Performance_Lags Critical Warning # ########################################################################################################## # ## IPMI_Voltage_Transition_Severity # # IPMI_Voltage_Transition_Severity_Transition_To_OK Nominal # IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Voltage_Transition_Severity_Monitor Warning # IPMI_Voltage_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Current_Transition_Severity # # IPMI_Current_Transition_Severity_Transition_To_OK Nominal # IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Current_Transition_Severity_Monitor Warning # IPMI_Current_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Fan_State # # IPMI_Fan_State_Deasserted Nominal # IPMI_Fan_State_Asserted Warning # ########################################################################################################## # ## IPMI_Fan_Transition_Severity # # IPMI_Fan_Transition_Severity_Transition_To_OK Nominal # IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Fan_Transition_Severity_Monitor Warning # IPMI_Fan_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Fan_Device_Present # # IPMI_Fan_Device_Present_Device_Removed_Device_Absent Critical Critical # IPMI_Fan_Device_Present_Device_Inserted_Device_Present Nominal Nominal # ########################################################################################################## # ## IPMI_Fan_Transition_Availability # # IPMI_Fan_Transition_Availability_To_Running Nominal Nominal # IPMI_Fan_Transition_Availability_To_In_Test Warning Warning # IPMI_Fan_Transition_Availability_To_Power_Off Warning Warning # IPMI_Fan_Transition_Availability_To_On_Line Warning Warning # IPMI_Fan_Transition_Availability_To_Off_Line Warning Warning # IPMI_Fan_Transition_Availability_To_Off_Duty Warning Warning # IPMI_Fan_Transition_Availability_To_Degraded Critical Warning # IPMI_Fan_Transition_Availability_To_Power_Save Warning Warning # IPMI_Fan_Transition_Availability_Install_Error Critical Critical # ########################################################################################################## # ## IPMI_Fan_Redundancy # # IPMI_Fan_Redundancy_Fully_Redundant Nominal Nominal # IPMI_Fan_Redundancy_Redundancy_Lost Critical Warning # IPMI_Fan_Redundancy_Redundancy_Degraded Warning Warning # IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical Warning # IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical Warning # IPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources Critical Warning # IPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning Warning # IPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning Warning # ########################################################################################################## # ## IPMI_Physical_Security # # IPMI_Physical_Security_General_Chassis_Intrusion Critical # IPMI_Physical_Security_Drive_Bay_Intrusion Critical # IPMI_Physical_Security_IO_Card_Intrusion Critical # IPMI_Physical_Security_Processor_Area_Intrusion Critical # IPMI_Physical_Security_LAN_Leash_Lost Critical # IPMI_Physical_Security_Unauthorized_Dock_Undock Critical # IPMI_Physical_Security_FAN_Area_Intrusion Critical # ########################################################################################################## # ## IPMI_Platform_Security_Violation_Attempt # # IPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password Critical # IPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation Critical # IPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation Critical # ########################################################################################################## # ## IPMI_Processor # # IPMI_Processor_IERR Critical # IPMI_Processor_Thermal_Trip Critical # IPMI_Processor_FRB1_BIST_Failure Critical # IPMI_Processor_FRB2_Hang_In_POST_Failure Critical # IPMI_Processor_FRB3_Processor_Startup_Initialization_Failure Critical # IPMI_Processor_Configuration_Error Critical # IPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error Critical # IPMI_Processor_Processor_Presence_Detected Nominal # IPMI_Processor_Processor_Disabled Critical # IPMI_Processor_Terminator_Presence_Detected Critical # IPMI_Processor_Processor_Automatically_Throttled Warning # IPMI_Processor_Machine_Check_Exception Critical # IPMI_Processor_Correctable_Machine_Check_Error Warning # ########################################################################################################## # ## IPMI_Processor_State # # IPMI_Processor_State_Deasserted Nominal # IPMI_Processor_State_Asserted Critical # ########################################################################################################## # ## IPMI_Power_Supply # # IPMI_Power_Supply_Presence_Detected Nominal Nominal # IPMI_Power_Supply_Power_Supply_Failure_Detected Critical Critical # IPMI_Power_Supply_Predictive_Failure Critical Critical # IPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC Critical Warning # IPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range Critical Warning # IPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present Critical Warning # IPMI_Power_Supply_Configuration_Error Critical Critical # IPMI_Power_Supply_Power_Supply_Inactive Warning Warning # ########################################################################################################## # ## IPMI_Power_Supply_State # # IPMI_Power_Supply_State_Deasserted Nominal # IPMI_Power_Supply_State_Asserted Warning # ########################################################################################################## # ## IPMI_Power_Supply_Transition_Severity # # IPMI_Power_Supply_Transition_Severity_Transition_To_OK Nominal # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Power_Supply_Transition_Severity_Monitor Warning # IPMI_Power_Supply_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Power_Supply_Redundancy # # IPMI_Power_Supply_Redundancy_Fully_Redundant Nominal Nominal # IPMI_Power_Supply_Redundancy_Redundancy_Lost Critical Warning # IPMI_Power_Supply_Redundancy_Redundancy_Degraded Warning Warning # IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical Warning # IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical Warning # IPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources Critical Warning # IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning Warning # IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning Warning # ########################################################################################################## # ## IPMI_Power_Unit # # IPMI_Power_Unit_Power_Off_Power_Down Nominal Nominal # IPMI_Power_Unit_Power_Cycle Nominal Nominal # IPMI_Power_Unit_240VA_Power_Down Warning Nominal # IPMI_Power_Unit_Interlock_Power_Down Warning Warning # IPMI_Power_Unit_AC_Lost Critical Warning # IPMI_Power_Unit_Soft_Power_Control_Failure Critical Critical # IPMI_Power_Unit_Power_Unit_Failure_Detected Critical Critical # IPMI_Power_Unit_Predictive_Failure Critical Critical # ########################################################################################################## # ## IPMI_Power_Unit_State # # IPMI_Power_Unit_State_Deasserted Nominal # IPMI_Power_Unit_State_Asserted Warning # ########################################################################################################## # ## IPMI_Power_Unit_Transition_Severity # # IPMI_Power_Unit_Transition_Severity_Transition_To_OK Nominal # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Power_Unit_Transition_Severity_Monitor Warning # IPMI_Power_Unit_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Power_Unit_Device_Present # # IPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Power_Unit_Redundancy # # IPMI_Power_Unit_Redundancy_Fully_Redundant Nominal Nominal # IPMI_Power_Unit_Redundancy_Redundancy_Lost Critical Warning # IPMI_Power_Unit_Redundancy_Redundancy_Degraded Warning Warning # IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical Warning # IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical Warning # IPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources Critical Warning # IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning Warning # IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning Warning # ########################################################################################################## # ## IPMI_Cooling_Device_Redundancy # # IPMI_Cooling_Device_Redundancy_Fully_Redundant Nominal Nominal # IPMI_Cooling_Device_Redundancy_Redundancy_Lost Critical Warning # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded Warning Warning # IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical Warning # IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical Warning # IPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources Critical Warning # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning Warning # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning Warning # ########################################################################################################## # ## IPMI_Memory # # IPMI_Memory_Correctable_Memory_Error Warning # IPMI_Memory_Uncorrectable_Memory_Error Critical # IPMI_Memory_Parity Critical # IPMI_Memory_Memory_Scrub_Failed Critical # IPMI_Memory_Memory_Device_Disabled Critical # IPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached Warning # IPMI_Memory_Presence_Detected Nominal # IPMI_Memory_Configuration_Error Critical # IPMI_Memory_Spare Nominal # IPMI_Memory_Memory_Automatically_Throttled Warning # IPMI_Memory_Critical_Overtemperature Critical # ########################################################################################################## # ## IPMI_Memory_State # # IPMI_Memory_State_Deasserted Nominal # IPMI_Memory_State_Asserted Critical # ########################################################################################################## # ## IPMI_Memory_Transition_Severity # # IPMI_Memory_Transition_Severity_Transition_To_OK Nominal # IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Memory_Transition_Severity_Monitor Warning # IPMI_Memory_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Memory_Redundancy # # IPMI_Memory_Redundancy_Fully_Redundant Nominal Nominal # IPMI_Memory_Redundancy_Redundancy_Lost Critical Warning # IPMI_Memory_Redundancy_Redundancy_Degraded Warning Warning # IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical Warning # IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical Warning # IPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources Critical Warning # IPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning Warning # IPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning Warning # ########################################################################################################## # ## IPMI_Drive_Slot # # IPMI_Drive_Slot_Drive_Presence Nominal # IPMI_Drive_Slot_Drive_Fault Critical # IPMI_Drive_Slot_Predictive_Failure Critical # IPMI_Drive_Slot_Hot_Spare Nominal # IPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress Nominal # IPMI_Drive_Slot_In_Critical_Array Critical # IPMI_Drive_Slot_In_Failed_Array Critical # IPMI_Drive_Slot_Rebuild_Remap_In_Progress Nominal # IPMI_Drive_Slot_Rebuild_Remap_Aborted Critical # ########################################################################################################## # ## IPMI_Drive_Slot_State # # IPMI_Drive_Slot_State_Deasserted Warning # IPMI_Drive_Slot_State_Asserted Nominal # ########################################################################################################## # ## IPMI_Drive_Slot_Predictive_Failure # # IPMI_Drive_Slot_Predictive_Failure_Deasserted Nominal # IPMI_Drive_Slot_Predictive_Failure_Asserted Critical # ########################################################################################################## # ## IPMI_Drive_Slot_Transition_Severity # # IPMI_Drive_Slot_Transition_Severity_Transition_To_OK Nominal # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Drive_Slot_Transition_Severity_Monitor Warning # IPMI_Drive_Slot_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Drive_Slot_Device_Present # # IPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_POST_Memory_Resize_State # # IPMI_POST_Memory_Resize_State_Deasserted Nominal # IPMI_POST_Memory_Resize_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Firmware_Progress # # IPMI_System_Firmware_Progress_System_Firmware_Error Critical # IPMI_System_Firmware_Progress_System_Firmware_Hang Critical # IPMI_System_Firmware_Progress_System_Firmware_Progress Nominal # ########################################################################################################## # ## IPMI_System_Firmware_Progress_State # # IPMI_System_Firmware_Progress_State_Deasserted Nominal # IPMI_System_Firmware_Progress_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Firmware_Progress_Device_Present # # IPMI_System_Firmware_Progress_Device_Present_Device_Removed_Device_Absent Critical Critical # IPMI_System_Firmware_Progress_Device_Present_Device_Inserted_Device_Present Nominal Nominal # ########################################################################################################## # ## IPMI_System_Firmware_Progress_Transition_Severity # # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK Nominal # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_System_Firmware_Progress_Transition_Severity_Monitor Warning # IPMI_System_Firmware_Progress_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Event_Logging_Disabled # # IPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared Nominal # IPMI_Event_Logging_Disabled_All_Event_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_SEL_Full Critical # IPMI_Event_Logging_Disabled_SEL_Almost_Full Warning # IPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled Critical # ########################################################################################################## # ## IPMI_System_Event # # IPMI_System_Event_System_Reconfigured Warning # IPMI_System_Event_OEM_System_Boot_Event Nominal # IPMI_System_Event_Undetermined_System_Hardware_Failure Critical # IPMI_System_Event_Entry_Added_To_Auxiliary_Log Nominal # IPMI_System_Event_PEF_Action Nominal # IPMI_System_Event_Timestamp_Clock_Sync Warning # ########################################################################################################## # ## IPMI_System_Event_Transition_State # # IPMI_System_Event_Transition_State_Idle Nominal # IPMI_System_Event_Transition_State_Active Nominal # IPMI_System_Event_Transition_State_Busy Nominal # ########################################################################################################## # ## IPMI_System_Event_State # # IPMI_System_Event_State_Deasserted Nominal # IPMI_System_Event_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Event_Transition_Severity # # IPMI_System_Event_Transition_Severity_Transition_To_OK Nominal # IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_System_Event_Transition_Severity_Monitor Warning # IPMI_System_Event_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Critical_Interrupt # # IPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt Critical # IPMI_Critical_Interrupt_Bus_Timeout Critical # IPMI_Critical_Interrupt_IO_Channel_Check_NMI Critical # IPMI_Critical_Interrupt_Software_NMI Warning # IPMI_Critical_Interrupt_PCI_PERR Critical # IPMI_Critical_Interrupt_PCI_SERR Critical # IPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout Critical # IPMI_Critical_Interrupt_Bus_Correctable_Error Warning # IPMI_Critical_Interrupt_Bus_Uncorrectable_Error Critical # IPMI_Critical_Interrupt_Fatal_NMI Critical # IPMI_Critical_Interrupt_Bus_Fatal_Error Critical # IPMI_Critical_Interrupt_Bus_Degraded Warning # ########################################################################################################## # ## IPMI_Button_Switch # # IPMI_Button_Switch_Power_Button_Pressed Nominal # IPMI_Button_Switch_Sleep_Button_Pressed Nominal # IPMI_Button_Switch_Reset_Button_Pressed Nominal # IPMI_Button_Switch_FRU_Latch_Open Warning # IPMI_Button_Switch_FRU_Service_Request_Button Warning # ########################################################################################################## # ## IPMI_Button_Switch_State # # IPMI_Button_Switch_State_Deasserted Nominal # IPMI_Button_Switch_State_Asserted Nominal # ########################################################################################################## # ## IPMI_Button_Switch_Transition_Severity # # IPMI_Button_Switch_Transition_Severity_Transition_To_OK Nominal # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Button_Switch_Transition_Severity_Monitor Warning # IPMI_Button_Switch_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Module_Board_State # # IPMI_Module_Board_State_Deasserted Nominal # IPMI_Module_Board_State_Asserted Critical # ########################################################################################################## # ## IPMI_Module_Board_Device_Present # # IPMI_Module_Board_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Module_Board_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Chassis_Transition_Severity # # IPMI_Chassis_Transition_Severity_Transition_To_OK Nominal # IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Chassis_Transition_Severity_Monitor Warning # IPMI_Chassis_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Chip_Set # # IPMI_Chip_Set_Soft_Power_Control_Failure Critical # IPMI_Chip_Set_Thermal_Trip Critical # ########################################################################################################## # ## IPMI_Chip_Set_Transition_Severity # # IPMI_Chip_Set_Transition_Severity_Transition_To_OK Nominal # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Chip_Set_Transition_Severity_Monitor Warning # IPMI_Chip_Set_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Cable_Interconnect # # IPMI_Cable_Interconnect_Is_Connected Nominal # IPMI_Cable_Interconnect_Configuration_Error Critical # ########################################################################################################## # ## IPMI_Cable_Interconnect_Transition_Severity # # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK Nominal # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Cable_Interconnect_Transition_Severity_Monitor Warning # IPMI_Cable_Interconnect_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_System_Boot_Initiated # # IPMI_System_Boot_Initiated_Initiated_By_Power_Up Nominal # IPMI_System_Boot_Initiated_Initiated_By_Hard_Reset Nominal # IPMI_System_Boot_Initiated_Initiated_By_Warm_Reset Nominal # IPMI_System_Boot_Initiated_User_Requested_PXE_Boot Nominal # IPMI_System_Boot_Initiated_Automatic_Boot_To_Diagnostic Nominal # IPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Hard_Reset Warning # IPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Warm_Reset Warning # IPMI_System_Boot_Initiated_System_Restart Nominal # ########################################################################################################## # ## IPMI_Boot_Error # # IPMI_Boot_Error_No_Bootable_Media Critical # IPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive Critical # IPMI_Boot_Error_PXE_Server_Not_Found Critical # IPMI_Boot_Error_Invalid_Boot_Sector Critical # IPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source Warning # ########################################################################################################## # ## IPMI_Boot_Error_State # # IPMI_Boot_Error_State_Deasserted Nominal # IPMI_Boot_Error_State_Asserted Critical # ########################################################################################################## # ## IPMI_Boot_Error_Transition_Severity # # IPMI_Boot_Error_Transition_Severity_Transition_To_OK Nominal # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Boot_Error_Transition_Severity_Monitor Warning # IPMI_Boot_Error_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_OS_Boot # # IPMI_OS_Boot_A_Boot_Completed Nominal # IPMI_OS_Boot_C_Boot_Completed Nominal # IPMI_OS_Boot_PXE_Boot_Completed Nominal # IPMI_OS_Boot_Diagnostic_Boot_Completed Nominal # IPMI_OS_Boot_CD_ROM_Boot_Completed Nominal # IPMI_OS_Boot_ROM_Boot_Completed Nominal # IPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified Warning # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started Nominal # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed Nominal # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted Warning # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed Critical # ########################################################################################################## # ## IPMI_OS_Critical_Stop # # IPMI_OS_Critical_Stop_Critical_Stop_During_OS_Load Critical # IPMI_OS_Critical_Stop_Run_Time_Critical_Stop Critical # IPMI_OS_Critical_Stop_OS_Graceful_Stop Warning # IPMI_OS_Critical_Stop_OS_Graceful_Shutdown Warning # IPMI_OS_Critical_Stop_Soft_Shutdown_Initiated_By_PEF Warning # IPMI_OS_Critical_Stop_Agent_Not_Responding Critical # ########################################################################################################## # ## IPMI_OS_Critical_Stop_State # # IPMI_OS_Critical_Stop_State_Deasserted Nominal # IPMI_OS_Critical_Stop_State_Asserted Critical # ########################################################################################################## # ## IPMI_Slot_Connector # # IPMI_Slot_Connector_Fault_Status_Asserted Critical # IPMI_Slot_Connector_Identify_Status_Asserted Warning # IPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached Nominal # IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation Nominal # IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal Nominal # IPMI_Slot_Connector_Slot_Power_Is_Off Nominal # IPMI_Slot_Connector_Slot_Connector_Device_Removal_Request Warning # IPMI_Slot_Connector_Interlock_Asserted Warning # IPMI_Slot_Connector_Slot_Is_Disabled Warning # IPMI_Slot_Connector_Slot_Holds_Spare_Device Nominal # ########################################################################################################## # ## IPMI_Slot_Connector_Transition_Severity # # IPMI_Slot_Connector_Transition_Severity_Transition_To_OK Nominal # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Slot_Connector_Transition_Severity_Monitor Warning # IPMI_Slot_Connector_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_System_ACPI_Power_State # # IPMI_System_ACPI_Power_State_S0_G0 Nominal # IPMI_System_ACPI_Power_State_S1 Nominal # IPMI_System_ACPI_Power_State_S2 Nominal # IPMI_System_ACPI_Power_State_S3 Nominal # IPMI_System_ACPI_Power_State_S4 Nominal # IPMI_System_ACPI_Power_State_S5_G2 Nominal # IPMI_System_ACPI_Power_State_S4_S5_Soft_Off Nominal # IPMI_System_ACPI_Power_State_G3_Mechanical_Off Nominal # IPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States Nominal # IPMI_System_ACPI_Power_State_G1_Sleeping Nominal # IPMI_System_ACPI_Power_State_S5_Entered_By_Override Nominal # IPMI_System_ACPI_Power_State_Legacy_ON_State Nominal # IPMI_System_ACPI_Power_State_Legacy_OFF_State Nominal # IPMI_System_ACPI_Power_State_Unspecified Critical # IPMI_System_ACPI_Power_State_Unknown Critical # ########################################################################################################## # ## IPMI_Watchdog2 # # IPMI_Watchdog2_Timer_Expired Warning # IPMI_Watchdog2_Hard_Reset Critical # IPMI_Watchdog2_Power_Down Critical # IPMI_Watchdog2_Power_Cycle Critical # IPMI_Watchdog2_Reserved1 Nominal # IPMI_Watchdog2_Reserved2 Nominal # IPMI_Watchdog2_Reserved3 Nominal # IPMI_Watchdog2_Reserved4 Nominal # IPMI_Watchdog2_Timer_Interrupt Warning # ########################################################################################################## # ## IPMI_Platform_Alert # # IPMI_Platform_Alert_Platform_Generated_Page Nominal # IPMI_Platform_Alert_Platform_Generated_LAN_Alert Nominal # IPMI_Platform_Alert_Platform_Event_Trap_Generated Nominal # IPMI_Platform_Alert_Platform_Generated_SNMP_Trap Nominal # ########################################################################################################## # ## IPMI_Platform_Alert_State # # IPMI_Platform_Alert_State_Deasserted Nominal # IPMI_Platform_Alert_State_Asserted Critical # ########################################################################################################## # ## IPMI_Entity_Presence # # IPMI_Entity_Presence_Entity_Present Nominal # IPMI_Entity_Presence_Entity_Absent Critical # IPMI_Entity_Presence_Entity_Disabled Critical # ########################################################################################################## # ## IPMI_Entity_Presence_Device_Present # # IPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_LAN # # IPMI_LAN_Heartbeat Nominal # IPMI_LAN_Heartbeat_Lost Warning # ########################################################################################################## # ## IPMI_Management_Subsystem_Health # # IPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable Critical # IPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable Critical # IPMI_Management_Subsystem_Health_Management_Controller_Off_Line Critical # IPMI_Management_Subsystem_Health_Management_Controller_Unavailable Critical # IPMI_Management_Subsystem_Health_Sensor_Failure Critical # IPMI_Management_Subsystem_Health_FRU_Failure Critical # ########################################################################################################## # ## IPMI_Management_Subsystem_Health_Transition_Severity # # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_OK Nominal # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Monitor Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Management_Subsystem_Health_Device_Present # # IPMI_Management_Subsystem_Health_Device_Present_Device_Removed_Device_Absent Critical Critical # IPMI_Management_Subsystem_Health_Device_Present_Device_Inserted_Device_Present Nominal Nominal # ########################################################################################################## # ## IPMI_Battery # # IPMI_Battery_Battery_Low Warning # IPMI_Battery_Battery_Failed Critical # IPMI_Battery_Battery_Presence_Detected Nominal # ########################################################################################################## # ## IPMI_Session_Audit # # IPMI_Session_Audit_Session_Activated Nominal # IPMI_Session_Audit_Session_Deactivated Nominal # IPMI_Session_Audit_Invalid_Username_Or_Password Warning # IPMI_Session_Audit_Invalid_Password_Disable Critical # ########################################################################################################## # ## IPMI_Version_Change # # IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity Warning # IPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity Warning # IPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity Critical # IPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity Critical # IPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version Critical # IPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version Critical # IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful Nominal # IPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful Nominal # ########################################################################################################## # ## IPMI_FRU_State # # IPMI_FRU_State_FRU_Not_Installed Critical # IPMI_FRU_State_FRU_Inactive Critical # IPMI_FRU_State_FRU_Activation_Requested Warning # IPMI_FRU_State_FRU_Activation_In_Progress Warning # IPMI_FRU_State_FRU_Active Nominal # IPMI_FRU_State_FRU_Deactivation_Requested Warning # IPMI_FRU_State_FRU_Deactivation_In_Progress Warning # IPMI_FRU_State_FRU_Communication_Lost Critical # ########################################################################################################## # ## Intel Node Manager Exception Event / Alert Threshold Exceeded ## ## Intel S5500WB/Penguin Computing Relion 700 ## Inventec 5441/Dell Xanadu II ## Inventec 5442/Dell Xanadu III ## Quanta S99Q/Dell FS12-TY ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (S5500WB), 64 (Quanta QSSC-S4R) ## Manufacturer ID = 20569 (Inventec) ## Product ID = 51 (5441), 52 (5442) ## Manufacturer ID = 7244 (Quanta) ## Product ID = 21401 (S99Q) ## Event/Reading Type Code = 72h (Node Manager Exception Event / Alert Threshold Exceeded) ## Sensor Type = DCh (Node Manager) # # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x72 0xDC ANY 0xA0 ANY ANY Warning # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x72 0xDC ANY 0xA1 ANY ANY Warning # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x72 0xDC ANY 0xA2 ANY ANY Warning # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x72 0xDC ANY 0xA8 ANY ANY Warning # ########################################################################################################## # ## Intel Node Manager Health Event ## ## Intel S5500WB/Penguin Computing Relion 700 ## Inventec 5441/Dell Xanadu II ## Inventec 5442/Dell Xanadu III ## Quanta S99Q/Dell FS12-TY ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (S5500WB), 64 (Quanta QSSC-S4R) ## Manufacturer ID = 20569 (Inventec) ## Product ID = 51 (5441), 52 (5442) ## Manufacturer ID = 7244 (Quanta) ## Product ID = 21401 (S99Q) ## Event/Reading Type Code = 73h (Node Manager Health Event) ## Sensor Type = DCh (Node Manager) # # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x73 0xDC ANY 0xA2 ANY ANY Warning # ########################################################################################################## # ## Intel Node Manager Operational Capabilities Change Event ## ## Intel S5500WB/Penguin Computing Relion 700 ## Inventec 5441/Dell Xanadu II ## Inventec 5442/Dell Xanadu III ## Quanta S99Q/Dell FS12-TY ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (S5500WB), 64 (Quanta QSSC-S4R) ## Manufacturer ID = 20569 (Inventec) ## Product ID = 51 (5441), 52 (5442) ## Manufacturer ID = 7244 (Quanta) ## Product ID = 21401 (S99Q) ## Event/Reading Type Code = 74h (Node Manager Operational Capabilities Change Event) ## Sensor Type = DCh (Node Manager) # # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x74 0xDC ANY ANY ANY ANY Warning # ########################################################################################################## # ## Intel Node Manager Server Platform Services Firmware Health ## ## Intel S5500WB/Penguin Computing Relion 700 ## Inventec 5441/Dell Xanadu II ## Inventec 5442/Dell Xanadu III ## Quanta S99Q/Dell FS12-TY ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (S5500WB), 64 (Quanta QSSC-S4R) ## Manufacturer ID = 20569 (Inventec) ## Product ID = 51 (5441), 52 (5442) ## Manufacturer ID = 7244 (Quanta) ## Product ID = 21401 (S99Q) ## Event/Reading Type Code = 75h (Server Platform Services Firmware Health) ## Sensor Type = DCh (Node Manager) # # IPMI_OEM_Sensor_System_Event_Record 343:62+64,20569:51-52,7244:21401 0x75 0xDC ANY 0xA0 ANY ANY Warning # ########################################################################################################## # ## Intel SMI Timeout ## Intel SR1625 ## Intel S5500WB/Penguin Computing Relion 700 ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## Intel S5000PAL ## ## Intel Power Throttled ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (Intel SR1625, S5500WB), 64 (Quanta QSSC-S4R), 40 (Intel S5000PAL) ## Event/Reading Type Code = 3h (State Asserted/Deasserted) ## Sensor Type = F3h (OEM) ## EventData1 0x00 = "State Deasserted" ## EventData1 0x01 = "State Asserted" ## # # IPMI_OEM_Sensor_System_Event_Record 343:62+64+40 0x03 0xF3 ANY 0x00 ANY ANY Nominal # IPMI_OEM_Sensor_System_Event_Record 343:62+64+40 0x03 0xF3 ANY 0x01 ANY ANY Critical # ########################################################################################################## # ## Intel NMI State ## Intel S5000PAL ## ## Manufacturer ID = 343 (Intel) ## Product ID = 40 (Intel S5000PAL) ## Event/Reading Type Code = 3h (State Asserted/Deasserted) ## Sensor Type = C0h (OEM) ## EventData1 0x00 = "State Deasserted" ## EventData1 0x01 = "State Asserted" ## # # IPMI_OEM_Sensor_System_Event_Record 343:40 0x03 0xC0 ANY 0x00 ANY ANY Nominal # IPMI_OEM_Sensor_System_Event_Record 343:40 0x03 0xC0 ANY 0x01 ANY ANY Critical # ########################################################################################################## # ## Supermicro CPU Temperature Overheat ## X7DBR-3/X7DB8/X8DTN/X7SBI-LN4/X8DTH/X8DTG/X8DTU/X8DT3-LN4F/X8DTU-6+/X8DTL/X8DTL-3F ## X8SIL-F/X9SCL/X9SCM/X8DTN+-F/X8SIE/X9SCA-F-O/H8DGU-F/X9DRi-F/X9DRI-LN4F+/X9SPU-F-O ## X9SCM-iiF/H8SGL-F ## ## Manufacturer ID = 10876 (Supermicro), 10437 (Peppercon, IPMI card manufacturer), ## 47488 (Supermicro, not IANA number, special case), ## 5593 (Magnum Technologies, rebranded Supermicro board) ## Product ID = 4 (X7DBR-3, X7DB8, X8DTN, X7SBI-LN4), 43707 (X8DTH, X8DTG, X8DTU, X8DT3-LN4F), 1549 (X8DTU-6+), ## 6 (X8DTL, X8DTL-3F), 1541 (X8SIL-F), 1572 (X9SCL, X9SCM), 1551 (X8DTN+-F), 1037 (X8SIE) ## 1585 (X9SCA-F-O), 43025 (H8DGU-F), 4520 (H8DGU), 48145 (H8DG6), 1576 (X9DRi-F), 1574 (X9DRI-LN4F+), 1603 (X9SPU-F-O) ## 1600 (X9SCM-iiF), 42769 (H8SGL-F) ## Event/Reading Type Code = 70h (OEM) ## Sensor Type = C0h (OEM) ## EventData1 0x02 = "Overheat" ## ## Note: Early Supermicro motherboards used the "Peppercon" Manufacturer ID # # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x02 ANY ANY Critical ########################################################################################################## freeipmi-1.6.4/etc/freeipmi_interpret_sensor.conf0000644002055400205540000016637713527331635022215 0ustar00achuachu00000000000000########################################################################################################## # # FreeIPMI Interpret Sensor # # This configuration file defines how IPMI sensors should be # interpreted. IPMI based sensors specify a number of # states/thresholds when they are read. Based on those # states/thresholds we can allow tools and libraries such as # ipmi-sensors(8) or libipmimonitoring(3) can report if a sensor # reading is "good" or "bad" via a NOMINAL, WARNING, or CRITICAL # state. # # Each of the states listed below are (hopefully) descriptive enough # to describe the state conditions that may be set/unset for each # sensor type. For more detailed information on each of the # individual states listed below, please see the IPMI Specification # "Sensor and Event Code Tables". Ipmi-sensors(8) can be used to # determine the sensor types and the states/thresholds that exist on a # system by outputting very verbose output and seeing what types of # Assertion or Deassertion events are possible. # # The possible values for all states/thresholds below are: # # Nominal - Signal Nominal reading if state/threshold tripped # Warning - Signal Warning reading if state/threshold tripped # Critical - Signal Critical reading if state/threshold tripped # # Not all IPMI sensor types and event types are currently supported. # If you would like more to be supported, please e-mail the FreeIPMI # mailing list. # # The default values selected for individual states/thresholds being # tripped are based on best guesses and motherboards being analyzed. # If you think they should be changed, please e-mail the FreeIPMI # mailing list to discuss what the defaults should be. # # Most default interpretations can be determined quite easily and can # meet the needs of most users. For example, a reading of # "Performance_Met" is normally better than "Performance_Lags". # However, some sensors can be ambiguous and depend completely on the # manufacturer. For example, "State_Asserted" vs. "State_Deasserted" # are completely at the interpretation of the vendor. Users are # advised to adjust the interpretations below as needed. # # Every group of state conditions below includes a configuration for # "No_Event". This is the condition under which no sensor # states/events have occurred or are triggered. Under most # conditions, a mapping to "Nominal" is preferred. However, under # some circumstances, it may be useful to report something else. For # example, if a sensor on a particular motherboard is required to # report a state/event, a no sensor state condition could indicate a # broken a sensor. This is highly dependent on the motherboard. # # If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # ## IPMI_Threshold_Sensor # # Temperature, Voltage, RPM, etc. sensors # # IPMI_Threshold_Sensor_No_Event Nominal # IPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Critical_Threshold Nominal # IPMI_Threshold_Sensor_At_Or_Below_Lower_Critical_Threshold Critical # IPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Recoverable_Threshold Critical # IPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Critical_Threshold Nominal # IPMI_Threshold_Sensor_At_Or_Above_Upper_Critical_Threshold Critical # IPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Recoverable_Threshold Critical # ########################################################################################################## # ## IPMI_Temperature_State # # IPMI_Temperature_State_No_Event Nominal # IPMI_Temperature_State_Deasserted Nominal # IPMI_Temperature_State_Asserted Warning # ########################################################################################################## # ## IPMI_Temperature_Limit # # IPMI_Temperature_Limit_No_Event Nominal # IPMI_Temperature_Limit_Not_Exceeded Nominal # IPMI_Temperature_Limit_Exceeded Critical # ########################################################################################################## # ## IPMI_Temperature_Transition_Severity # # IPMI_Temperature_Transition_Severity_No_Event Nominal # IPMI_Temperature_Transition_Severity_Transition_To_OK Nominal # IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Temperature_Transition_Severity_Monitor Warning # IPMI_Temperature_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Voltage_State # # IPMI_Voltage_State_No_Event Nominal # IPMI_Voltage_State_Deasserted Nominal # IPMI_Voltage_State_Asserted Warning # ########################################################################################################## # ## IPMI_Voltage_Limit # # IPMI_Voltage_Limit_No_Event Nominal # IPMI_Voltage_Limit_Not_Exceeded Nominal # IPMI_Voltage_Limit_Exceeded Critical # ########################################################################################################## # ## IPMI_Voltage_Performance # # IPMI_Voltage_Performance_No_Event Nominal # IPMI_Voltage_Performance_Met Nominal # IPMI_Voltage_Performance_Lags Critical # ########################################################################################################## # ## IPMI_Voltage_Transition_Severity # # IPMI_Voltage_Transition_Severity_No_Event Nominal # IPMI_Voltage_Transition_Severity_Transition_To_OK Nominal # IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Voltage_Transition_Severity_Monitor Warning # IPMI_Voltage_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Current_Transition_Severity # # IPMI_Current_Transition_Severity_No_Event Nominal # IPMI_Current_Transition_Severity_Transition_To_OK Nominal # IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Current_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Current_Transition_Severity_Monitor Warning # IPMI_Current_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Fan_State # # IPMI_Fan_State_No_Event Nominal # IPMI_Fan_State_Deasserted Nominal # IPMI_Fan_State_Asserted Warning # ########################################################################################################## # ## IPMI_Fan_Transition_Severity # # IPMI_Fan_Transition_Severity_No_Event Nominal # IPMI_Fan_Transition_Severity_Transition_To_OK Nominal # IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Fan_Transition_Severity_Monitor Warning # IPMI_Fan_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Fan_Device_Present # # IPMI_Fan_Device_Present_Device_No_Event Nominal # IPMI_Fan_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Fan_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Fan_Transition_Availability # # IPMI_Fan_Transition_Availability_No_Event Nominal # IPMI_Fan_Transition_Availability_To_Running Nominal # IPMI_Fan_Transition_Availability_To_In_Test Warning # IPMI_Fan_Transition_Availability_To_Power_Off Warning # IPMI_Fan_Transition_Availability_To_On_Line Warning # IPMI_Fan_Transition_Availability_To_Off_Line Warning # IPMI_Fan_Transition_Availability_To_Off_Duty Warning # IPMI_Fan_Transition_Availability_To_Degraded Critical # IPMI_Fan_Transition_Availability_To_Power_Save Warning # IPMI_Fan_Transition_Availability_Install_Error Critical # ########################################################################################################## # ## IPMI_Fan_Redundancy # # IPMI_Fan_Redundancy_No_Event Nominal # IPMI_Fan_Redundancy_Fully_Redundant Nominal # IPMI_Fan_Redundancy_Redundancy_Lost Critical # IPMI_Fan_Redundancy_Redundancy_Degraded Warning # IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical # IPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical # IPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources Critical # IPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning # IPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning # ########################################################################################################## # ## IPMI_Physical_Security # # IPMI_Physical_Security_No_Event Nominal # IPMI_Physical_Security_General_Chassis_Intrusion Critical # IPMI_Physical_Security_Drive_Bay_Intrusion Critical # IPMI_Physical_Security_IO_Card_Intrusion Critical # IPMI_Physical_Security_Processor_Area_Intrusion Critical # IPMI_Physical_Security_LAN_Leash_Lost Critical # IPMI_Physical_Security_Unauthorized_Dock_Undock Critical # IPMI_Physical_Security_FAN_Area_Intrusion Critical # ########################################################################################################## # ## IPMI_Platform_Security_Violation_Attempt # # IPMI_Platform_Security_Violation_Attempt_No_Event Nominal # IPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password Critical # IPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password Critical # IPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation Critical # IPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation Critical # ########################################################################################################## # ## IPMI_Processor # # IPMI_Processor_No_Event Nominal # IPMI_Processor_IERR Critical # IPMI_Processor_Thermal_Trip Critical # IPMI_Processor_FRB1_BIST_Failure Critical # IPMI_Processor_FRB2_Hang_In_POST_Failure Critical # IPMI_Processor_FRB3_Processor_Startup_Initialization_Failure Critical # IPMI_Processor_Configuration_Error Critical # IPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error Critical # IPMI_Processor_Processor_Presence_Detected Nominal # IPMI_Processor_Processor_Disabled Critical # IPMI_Processor_Terminator_Presence_Detected Critical # IPMI_Processor_Processor_Automatically_Throttled Warning # IPMI_Processor_Machine_Check_Exception Critical # IPMI_Processor_Correctable_Machine_Check_Error Warning # ########################################################################################################## # ## IPMI_Processor_State # # IPMI_Processor_State_No_Event Nominal # IPMI_Processor_State_Deasserted Nominal # IPMI_Processor_State_Asserted Critical # ########################################################################################################## # ## IPMI_Power_Supply # # IPMI_Power_Supply_No_Event Nominal # IPMI_Power_Supply_Presence_Detected Nominal # IPMI_Power_Supply_Power_Supply_Failure_Detected Critical # IPMI_Power_Supply_Predictive_Failure Critical # IPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC Critical # IPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range Critical # IPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present Critical # IPMI_Power_Supply_Configuration_Error Critical # IPMI_Power_Supply_Power_Supply_Inactive Warning # ########################################################################################################## # ## IPMI_Power_Supply_State # # IPMI_Power_Supply_State_No_Event Nominal # IPMI_Power_Supply_State_Deasserted Nominal # IPMI_Power_Supply_State_Asserted Warning # ########################################################################################################## # ## IPMI_Power_Supply_Transition_Severity # # IPMI_Power_Supply_Transition_Severity_No_Event Nominal # IPMI_Power_Supply_Transition_Severity_Transition_To_OK Nominal # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Power_Supply_Transition_Severity_Monitor Warning # IPMI_Power_Supply_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Power_Supply_Redundancy # # IPMI_Power_Supply_Redundancy_No_Event Nominal # IPMI_Power_Supply_Redundancy_Fully_Redundant Nominal # IPMI_Power_Supply_Redundancy_Redundancy_Lost Critical # IPMI_Power_Supply_Redundancy_Redundancy_Degraded Warning # IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical # IPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical # IPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources Critical # IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning # IPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning # ########################################################################################################## # ## IPMI_Power_Unit # # IPMI_Power_Unit_No_Event Nominal # IPMI_Power_Unit_Power_Off_Power_Down Nominal # IPMI_Power_Unit_Power_Cycle Nominal # IPMI_Power_Unit_240VA_Power_Down Warning # IPMI_Power_Unit_Interlock_Power_Down Warning # IPMI_Power_Unit_AC_Lost Critical # IPMI_Power_Unit_Soft_Power_Control_Failure Critical # IPMI_Power_Unit_Power_Unit_Failure_Detected Critical # IPMI_Power_Unit_Predictive_Failure Critical # ########################################################################################################## # ## IPMI_Power_Unit_State # # IPMI_Power_Unit_State_No_Event Nominal # IPMI_Power_Unit_State_Deasserted Nominal # IPMI_Power_Unit_State_Asserted Warning # ########################################################################################################## # ## IPMI_Power_Unit_Transition_Severity # # IPMI_Power_Unit_Transition_Severity_No_Event Nominal # IPMI_Power_Unit_Transition_Severity_Transition_To_OK Nominal # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Power_Unit_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Power_Unit_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Power_Unit_Transition_Severity_Monitor Warning # IPMI_Power_Unit_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Power_Unit_Device_Present # # IPMI_Power_Unit_Device_Present_No_Event Nominal # IPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Power_Unit_Redundancy # # IPMI_Power_Unit_Redundancy_No_Event Nominal # IPMI_Power_Unit_Redundancy_Fully_Redundant Nominal # IPMI_Power_Unit_Redundancy_Redundancy_Lost Critical # IPMI_Power_Unit_Redundancy_Redundancy_Degraded Warning # IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical # IPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical # IPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources Critical # IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning # IPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning # ########################################################################################################## # ## IPMI_Cooling_Device_Redundancy # # IPMI_Cooling_Device_Redundancy_No_Event Nominal # IPMI_Cooling_Device_Redundancy_Fully_Redundant Nominal # IPMI_Cooling_Device_Redundancy_Redundancy_Lost Critical # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded Warning # IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical # IPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical # IPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources Critical # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning # IPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning # ########################################################################################################## # ## IPMI_Memory # # IPMI_Memory_No_Event Nominal # IPMI_Memory_Correctable_Memory_Error Warning # IPMI_Memory_Uncorrectable_Memory_Error Critical # IPMI_Memory_Parity Critical # IPMI_Memory_Memory_Scrub_Failed Critical # IPMI_Memory_Memory_Device_Disabled Critical # IPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached Warning # IPMI_Memory_Presence_Detected Nominal # IPMI_Memory_Configuration_Error Critical # IPMI_Memory_Spare Nominal # IPMI_Memory_Memory_Automatically_Throttled Warning # IPMI_Memory_Critical_Overtemperature Critical # ########################################################################################################## # ## IPMI_Memory_State # # IPMI_Memory_State_No_Event Nominal # IPMI_Memory_State_Deasserted Nominal # IPMI_Memory_State_Asserted Critical # ########################################################################################################## # ## IPMI_Memory_Transition_Severity # # IPMI_Memory_Transition_Severity_No_Event Nominal # IPMI_Memory_Transition_Severity_Transition_To_OK Nominal # IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Memory_Transition_Severity_Monitor Warning # IPMI_Memory_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Memory_Redundancy # # IPMI_Memory_Redundancy_No_Event Nominal # IPMI_Memory_Redundancy_Fully_Redundant Nominal # IPMI_Memory_Redundancy_Redundancy_Lost Critical # IPMI_Memory_Redundancy_Redundancy_Degraded Warning # IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant Critical # IPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy Critical # IPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources Critical # IPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant Warning # IPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant Warning # ########################################################################################################## # ## IPMI_Drive_Slot # # IPMI_Drive_Slot_No_Event Nominal # IPMI_Drive_Slot_Drive_Presence Nominal # IPMI_Drive_Slot_Drive_Fault Critical # IPMI_Drive_Slot_Predictive_Failure Critical # IPMI_Drive_Slot_Hot_Spare Nominal # IPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress Nominal # IPMI_Drive_Slot_In_Critical_Array Critical # IPMI_Drive_Slot_In_Failed_Array Critical # IPMI_Drive_Slot_Rebuild_Remap_In_Progress Nominal # IPMI_Drive_Slot_Rebuild_Remap_Aborted Critical # ########################################################################################################## # ## IPMI_Drive_Slot_State # # IPMI_Drive_Slot_State_No_Event Nominal # IPMI_Drive_Slot_State_Deasserted Warning # IPMI_Drive_Slot_State_Asserted Nominal # ########################################################################################################## # ## IPMI_Drive_Slot_Predictive_Failure # # IPMI_Drive_Slot_Predictive_Failure_No_Event Nominal # IPMI_Drive_Slot_Predictive_Failure_Deasserted Nominal # IPMI_Drive_Slot_Predictive_Failure_Asserted Critical # ########################################################################################################## # ## IPMI_Drive_Slot_Transition_Severity # # IPMI_Drive_Slot_Transition_Severity_No_Event Nominal # IPMI_Drive_Slot_Transition_Severity_Transition_To_OK Nominal # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Drive_Slot_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Drive_Slot_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Drive_Slot_Transition_Severity_Monitor Warning # IPMI_Drive_Slot_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Drive_Slot_Device_Present # # IPMI_Drive_Slot_Device_Present_No_Event Nominal # IPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_POST_Memory_Resize_State # # IPMI_POST_Memory_Resize_State_No_Event Nominal # IPMI_POST_Memory_Resize_State_Deasserted Nominal # IPMI_POST_Memory_Resize_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Firmware_Progress # # IPMI_System_Firmware_Progress_No_Event Nominal # IPMI_System_Firmware_Progress_System_Firmware_Error Critical # IPMI_System_Firmware_Progress_System_Firmware_Hang Critical # IPMI_System_Firmware_Progress_System_Firmware_Progress Nominal # ########################################################################################################## # ## IPMI_System_Firmware_Progress_State # # IPMI_System_Firmware_Progress_State_No_Event Nominal # IPMI_System_Firmware_Progress_State_Deasserted Nominal # IPMI_System_Firmware_Progress_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Firmware_Progress_Device_Present # # IPMI_System_Firmware_Progress_Device_Present_Device_No_Event Nominal # IPMI_System_Firmware_Progress_Device_Present_Device_Removed_Device_Absent Critical # IPMI_System_Firmware_Progress_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_System_Firmware_Progress_Transition_Severity # # IPMI_System_Firmware_Progress_Transition_Severity_No_Event Nominal # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK Nominal # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_System_Firmware_Progress_Transition_Severity_Monitor Warning # IPMI_System_Firmware_Progress_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Event_Logging_Disabled # # IPMI_Event_Logging_Disabled_No_Event Nominal # IPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared Nominal # IPMI_Event_Logging_Disabled_All_Event_Logging_Disabled Critical # IPMI_Event_Logging_Disabled_SEL_Full Critical # IPMI_Event_Logging_Disabled_SEL_Almost_Full Warning # IPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled Critical # ########################################################################################################## # ## IPMI_System_Event # # IPMI_System_Event_No_Event Nominal # IPMI_System_Event_System_Reconfigured Warning # IPMI_System_Event_OEM_System_Boot_Event Nominal # IPMI_System_Event_Undetermined_System_Hardware_Failure Critical # IPMI_System_Event_Entry_Added_To_Auxiliary_Log Nominal # IPMI_System_Event_PEF_Action Nominal # IPMI_System_Event_Timestamp_Clock_Sync Warning # ########################################################################################################## # ## IPMI_System_Event_Transition_State # # IPMI_System_Event_Transition_State_No_Event Nominal # IPMI_System_Event_Transition_State_Idle Nominal # IPMI_System_Event_Transition_State_Active Nominal # IPMI_System_Event_Transition_State_Busy Nominal # ########################################################################################################## # ## IPMI_System_Event_State # # IPMI_System_Event_State_No_Event Nominal # IPMI_System_Event_State_Deasserted Nominal # IPMI_System_Event_State_Asserted Warning # ########################################################################################################## # ## IPMI_System_Event_Transition_Severity # # IPMI_System_Event_Transition_Severity_No_Event Nominal # IPMI_System_Event_Transition_Severity_Transition_To_OK Nominal # IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_System_Event_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_System_Event_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_System_Event_Transition_Severity_Monitor Warning # IPMI_System_Event_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Critical_Interrupt # # IPMI_Critical_Interrupt_No_Event Nominal # IPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt Critical # IPMI_Critical_Interrupt_Bus_Timeout Critical # IPMI_Critical_Interrupt_IO_Channel_Check_NMI Critical # IPMI_Critical_Interrupt_Software_NMI Warning # IPMI_Critical_Interrupt_PCI_PERR Critical # IPMI_Critical_Interrupt_PCI_SERR Critical # IPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout Critical # IPMI_Critical_Interrupt_Bus_Correctable_Error Warning # IPMI_Critical_Interrupt_Bus_Uncorrectable_Error Critical # IPMI_Critical_Interrupt_Fatal_NMI Critical # IPMI_Critical_Interrupt_Bus_Fatal_Error Critical # IPMI_Critical_Interrupt_Bus_Degraded Warning # ########################################################################################################## # ## IPMI_Button_Switch # # IPMI_Button_Switch_No_Event Nominal # IPMI_Button_Switch_Power_Button_Pressed Nominal # IPMI_Button_Switch_Sleep_Button_Pressed Nominal # IPMI_Button_Switch_Reset_Button_Pressed Nominal # IPMI_Button_Switch_FRU_Latch_Open Warning # IPMI_Button_Switch_FRU_Service_Request_Button Warning # ########################################################################################################## # ## IPMI_Button_Switch_State # # IPMI_Button_Switch_State_No_Event Nominal # IPMI_Button_Switch_State_Deasserted Nominal # IPMI_Button_Switch_State_Asserted Nominal # ########################################################################################################## # ## IPMI_Button_Switch_Transition_Severity # # IPMI_Button_Switch_Transition_Severity_No_Event Nominal # IPMI_Button_Switch_Transition_Severity_Transition_To_OK Nominal # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Button_Switch_Transition_Severity_Monitor Warning # IPMI_Button_Switch_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Module_Board_State # # IPMI_Module_Board_State_No_Event Nominal # IPMI_Module_Board_State_Deasserted Nominal # IPMI_Module_Board_State_Asserted Critical # ########################################################################################################## # ## IPMI_Module_Board_Device_Present # # IPMI_Module_Board_Device_Present_No_Event Nominal # IPMI_Module_Board_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Module_Board_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Chassis_Transition_Severity # # IPMI_Chassis_Transition_Severity_No_Event Nominal # IPMI_Chassis_Transition_Severity_Transition_To_OK Nominal # IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Chassis_Transition_Severity_Monitor Warning # IPMI_Chassis_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Chip_Set_Transition_Severity # # IPMI_Chip_Set_Transition_Severity_No_Event Nominal # IPMI_Chip_Set_Transition_Severity_Transition_To_OK Nominal # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Chip_Set_Transition_Severity_Monitor Warning # IPMI_Chip_Set_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Cable_Interconnect # # IPMI_Cable_Interconnect_No_Event Nominal # IPMI_Cable_Interconnect_Is_Connected Nominal # IPMI_Cable_Interconnect_Configuration_Error Critical # ########################################################################################################## # ## IPMI_Cable_Interconnect_Transition_Severity # # IPMI_Cable_Interconnect_Transition_Severity_No_Event Nominal # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK Nominal # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Cable_Interconnect_Transition_Severity_Monitor Warning # IPMI_Cable_Interconnect_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Boot_Error # # IPMI_Boot_Error_No_Event Nominal # IPMI_Boot_Error_No_Bootable_Media Critical # IPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive Critical # IPMI_Boot_Error_PXE_Server_Not_Found Critical # IPMI_Boot_Error_Invalid_Boot_Sector Critical # IPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source Warning # ########################################################################################################## # ## IPMI_Boot_Error_State # # IPMI_Boot_Error_State_No_Event Nominal # IPMI_Boot_Error_State_Deasserted Nominal # IPMI_Boot_Error_State_Asserted Critical # ########################################################################################################## # ## IPMI_Boot_Error_Transition_Severity # # IPMI_Boot_Error_Transition_Severity_No_Event Nominal # IPMI_Boot_Error_Transition_Severity_Transition_To_OK Nominal # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Boot_Error_Transition_Severity_Monitor Warning # IPMI_Boot_Error_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_OS_Boot # # IPMI_OS_Boot_No_Event Nominal # IPMI_OS_Boot_A_Boot_Completed Nominal # IPMI_OS_Boot_C_Boot_Completed Nominal # IPMI_OS_Boot_PXE_Boot_Completed Nominal # IPMI_OS_Boot_Diagnostic_Boot_Completed Nominal # IPMI_OS_Boot_CD_ROM_Boot_Completed Nominal # IPMI_OS_Boot_ROM_Boot_Completed Nominal # IPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified Warning # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started Nominal # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed Nominal # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted Warning # IPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed Critical # ########################################################################################################## # ## IPMI_OS_Critical_Stop_State # # IPMI_OS_Critical_Stop_State_No_Event Nominal # IPMI_OS_Critical_Stop_State_Deasserted Nominal # IPMI_OS_Critical_Stop_State_Asserted Critical # ########################################################################################################## # ## IPMI_Slot_Connector # # IPMI_Slot_Connector_No_Event Nominal # IPMI_Slot_Connector_Fault_Status_Asserted Critical # IPMI_Slot_Connector_Identify_Status_Asserted Warning # IPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached Nominal # IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation Nominal # IPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal Nominal # IPMI_Slot_Connector_Slot_Power_Is_Off Nominal # IPMI_Slot_Connector_Slot_Connector_Device_Removal_Request Warning # IPMI_Slot_Connector_Interlock_Asserted Warning # IPMI_Slot_Connector_Slot_Is_Disabled Warning # IPMI_Slot_Connector_Slot_Holds_Spare_Device Nominal # ########################################################################################################## # ## IPMI_Slot_Connector_Transition_Severity # # IPMI_Slot_Connector_Transition_Severity_No_Event Nominal # IPMI_Slot_Connector_Transition_Severity_Transition_To_OK Nominal # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Slot_Connector_Transition_Severity_Monitor Warning # IPMI_Slot_Connector_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_System_ACPI_Power_State # # IPMI_System_ACPI_Power_State_No_Event Nominal # IPMI_System_ACPI_Power_State_S0_G0 Nominal # IPMI_System_ACPI_Power_State_S1 Nominal # IPMI_System_ACPI_Power_State_S2 Nominal # IPMI_System_ACPI_Power_State_S3 Nominal # IPMI_System_ACPI_Power_State_S4 Nominal # IPMI_System_ACPI_Power_State_S5_G2 Nominal # IPMI_System_ACPI_Power_State_S4_S5_Soft_Off Nominal # IPMI_System_ACPI_Power_State_G3_Mechanical_Off Nominal # IPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States Nominal # IPMI_System_ACPI_Power_State_G1_Sleeping Nominal # IPMI_System_ACPI_Power_State_S5_Entered_By_Override Nominal # IPMI_System_ACPI_Power_State_Legacy_ON_State Nominal # IPMI_System_ACPI_Power_State_Legacy_OFF_State Nominal # IPMI_System_ACPI_Power_State_Unspecified Critical # IPMI_System_ACPI_Power_State_Unknown Critical # ########################################################################################################## # ## IPMI_Watchdog2 # # IPMI_Watchdog2_No_Event Nominal # IPMI_Watchdog2_Timer_Expired Warning # IPMI_Watchdog2_Hard_Reset Critical # IPMI_Watchdog2_Power_Down Critical # IPMI_Watchdog2_Power_Cycle Critical # IPMI_Watchdog2_Reserved1 Nominal # IPMI_Watchdog2_Reserved2 Nominal # IPMI_Watchdog2_Reserved3 Nominal # IPMI_Watchdog2_Reserved4 Nominal # IPMI_Watchdog2_Timer_Interrupt Warning # ########################################################################################################## # ## IPMI_Platform_Alert_State # # IPMI_Platform_Alert_State_No_Event Nominal # IPMI_Platform_Alert_State_Deasserted Nominal # IPMI_Platform_Alert_State_Asserted Critical # ########################################################################################################## # ## IPMI_Entity_Presence # # IPMI_Entity_Presence_No_Event Nominal # IPMI_Entity_Presence_Entity_Present Nominal # IPMI_Entity_Presence_Entity_Absent Critical # IPMI_Entity_Presence_Entity_Disabled Critical # ########################################################################################################## # ## IPMI_Entity_Presence_Device_Present # # IPMI_Entity_Presence_Device_Present_No_Event Nominal # IPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Management_Subsystem_Health # # IPMI_Management_Subsystem_Health_No_Event Nominal # IPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable Critical # IPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable Critical # IPMI_Management_Subsystem_Health_Management_Controller_Off_Line Critical # IPMI_Management_Subsystem_Health_Management_Controller_Unavailable Critical # IPMI_Management_Subsystem_Health_Sensor_Failure Critical # IPMI_Management_Subsystem_Health_FRU_Failure Critical # ########################################################################################################## # ## IPMI_Management_Subsystem_Health_Transition_Severity # # IPMI_Management_Subsystem_Health_Transition_Severity_No_Event Nominal # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_OK Nominal # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_OK Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Less_Severe Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Critical_From_More_Severe Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Critical_From_Non_Recoverable Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Transition_To_Non_Recoverable Critical # IPMI_Management_Subsystem_Health_Transition_Severity_Monitor Warning # IPMI_Management_Subsystem_Health_Transition_Severity_Informational Nominal # ########################################################################################################## # ## IPMI_Management_Subsystem_Health_Device_Present # # IPMI_Management_Subsystem_Health_Device_Present_Device_No_Event Nominal # IPMI_Management_Subsystem_Health_Device_Present_Device_Removed_Device_Absent Critical # IPMI_Management_Subsystem_Health_Device_Present_Device_Inserted_Device_Present Nominal # ########################################################################################################## # ## IPMI_Battery # # IPMI_Battery_No_Event Nominal # IPMI_Battery_Battery_Low Warning # IPMI_Battery_Battery_Failed Critical # IPMI_Battery_Battery_Presence_Detected Nominal # ########################################################################################################## # ## IPMI_Session_Audit # # IPMI_Session_Audit_No_Event Nominal # IPMI_Session_Audit_Session_Activated Nominal # IPMI_Session_Audit_Session_Deactivated Nominal # IPMI_Session_Audit_Invalid_Username_Or_Password Warning # IPMI_Session_Audit_Invalid_Password_Disable Critical # ########################################################################################################## # ## IPMI_Version_Change # # IPMI_Version_Change_No_Event Nominal # IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity Warning # IPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity Warning # IPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity Critical # IPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity Critical # IPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version Critical # IPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version Critical # IPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful Nominal # IPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful Nominal # ########################################################################################################## # ## IPMI_FRU_State # # IPMI_FRU_State_No_Event Nominal # IPMI_FRU_State_FRU_Not_Installed Critical # IPMI_FRU_State_FRU_Inactive Critical # IPMI_FRU_State_FRU_Activation_Requested Warning # IPMI_FRU_State_FRU_Activation_In_Progress Warning # IPMI_FRU_State_FRU_Active Nominal # IPMI_FRU_State_FRU_Deactivation_Requested Warning # IPMI_FRU_State_FRU_Deactivation_In_Progress Warning # IPMI_FRU_State_FRU_Communication_Lost Critical # ########################################################################################################## # ## Dell Poweredge R610/R710 Power Optimized ## ## Manufacturer ID = 674 (Dell) ## Product ID = 256 (Poweredge) ## Event/Reading Type Code = 6Fh (Sensor Specific) ## Sensor Type = C0h (OEM) ## Bitmask 0x0001 = "Good" ## Bitmask 0x0002 = "Degraded, other" ## Bitmask 0x0004 = "Degraded, thermal protection" ## Bitmask 0x0008 = "Degraded, cooling capacity change" ## Bitmask 0x0010 = "Degraded, power capacity change" ## Bitmask 0x0020 = "Degraded, user defined power capacity" ## Bitmask 0x0040 = "Halted, system power exceeds capacity" ## Bitmask 0x0080 = "Degraded, system power exceeds capacity" # # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0000 Nominal # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0001 Nominal # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0002 Warning # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0004 Warning # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0008 Warning # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0010 Warning # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0020 Warning # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0040 Critical # IPMI_OEM_Bitmask 674:256 0x6F 0xC0 0x0080 Warning # ########################################################################################################## # ## Dell Poweredge R210 Module/Board OEM ## ## Manufacturer ID = 674 (Dell) ## Product ID = 256 (Poweredge) ## Event/Reading Type Code = 70h (OEM) ## Sensor Type = 15h (Module/Board) ## ## Bitmask 0x0001 = "Absent" ## Bitmask 0x0002 = "Standby" ## Bitmask 0x0004 = "IPMI Function ready" ## Bitmask 0x0008 = "Fully ready" ## Bitmask 0x0010 = "Offline" ## Bitmask 0x0020 = "Failed" ## Bitmask 0x0040 = "Active" ## Bitmask 0x0080 = "Booting" ## Bitmask 0x0100 = "Write protected" # # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0000 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0001 Critical # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0002 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0004 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0008 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0010 Warning # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0020 Critical # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0040 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0080 Nominal # IPMI_OEM_Bitmask 674:256 0x70 0x15 0x0100 Warning # ########################################################################################################## # ## Supermicro CPU Temperature Sensor ## X7DBR-3/X7DB8/X8DTN/X7SBI-LN4/X8DTH/X8DTG/X8DTU/X8DT3-LN4F/X8DTU-6+/X8DTL/X8DTL-3F ## X8SIL-F/X9SCL/X9SCM/X8DTN+-F/X8SIE/X9SCA-F-O/H8DGU-F/X9DRi-F/X9DRI-LN4F+/X9SPU-F-O ## X9SCM-iiF/H8SGL-F ## ## Manufacturer ID = 10876 (Supermicro), 10437 (Peppercon, IPMI card manufacturer), ## 47488 (Supermicro, not IANA number, special case), ## 5593 (Magnum Technologies, rebranded Supermicro board) ## Product ID = 4 (X7DBR-3, X7DB8, X8DTN, X7SBI-LN4), 43707 (X8DTH, X8DTG, X8DTU, X8DT3-LN4F), 1549 (X8DTU-6+), ## 6 (X8DTL, X8DTL-3F), 1541 (X8SIL-F), 1572 (X9SCL, X9SCM), 1551 (X8DTN+-F), 1037 (X8SIE) ## 1585 (X9SCA-F-O), 43025 (H8DGU-F), 4520 (H8DGU), 48145 (H8DG6), 1576 (X9DRi-F), 1574 (X9DRI-LN4F+), 1603 (X9SPU-F-O) ## 1600 (X9SCM-iiF), 42769 (H8SGL-F) ## Event/Reading Type Code = 70h (OEM) ## Sensor Type = C0h (OEM) ## Value 0x0000 = "Low" ## Value 0x0001 = "Medium" ## Value 0x0002 = "High" ## Value 0x0004 = "Overheat" ## Value 0x0007 = "Not Installed" ## ## Note: Early Supermicro motherboards used the "Peppercon" Manufacturer ID # # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x0000 Nominal # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x0001 Warning # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x0002 Warning # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x0004 Critical # IPMI_OEM_Value 10876:1572+1576+1574+1603+1600,10437:4,47488:43707+1549+6+1541+1572+1551+1037+1585+43025+4520+48145+42769,5593:6 0x70 0xC0 0x0007 Warning # ########################################################################################################## # ## Intel SMI Timeout ## Intel SR1625 ## Intel S5500WB/Penguin Computing Relion 700 ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## Intel S5000PAL ## ## and ## ## Intel Power Throttled ## Quanta QSSC-S4R/Appro GB812X-CN (Quanta motherboard maintains Intel manufacturer ID) ## ## Manufacturer ID = 343 (Intel) ## Product ID = 62 (Intel SR1625, S5500WB), 64 (Quanta QSSC-S4R), 40 (Intel S5000PAL) ## Event/Reading Type Code = 3h (State Asserted/Deasserted) ## Sensor Type = F3h (OEM) ## Bitmask 0x0001 = "State Deasserted" ## Bitmask 0x0002 = "State Asserted" ## # # IPMI_OEM_Bitmask 343:62+64+40 0x03 0xF3 0x0000 Nominal # IPMI_OEM_Bitmask 343:62+64+40 0x03 0xF3 0x0001 Nominal # IPMI_OEM_Bitmask 343:62+64+40 0x03 0xF3 0x0002 Critical # ########################################################################################################## # ## Intel NMI State ## ## Manufacturer ID = 343 (Intel) ## Product ID = 40 (Intel S5000PAL) ## Event/Reading Type Code = 3h (State Asserted/Deasserted) ## Sensor Type = C0h (OEM) ## Bitmask 0x0001 = "State Deasserted" ## Bitmask 0x0002 = "State Asserted" ## # # IPMI_OEM_Bitmask 343:40 0x03 0xC0 0x0000 Nominal # IPMI_OEM_Bitmask 343:40 0x03 0xC0 0x0001 Nominal # IPMI_OEM_Bitmask 343:40 0x03 0xC0 0x0002 Critical # ########################################################################################################## freeipmi-1.6.4/etc/libipmiconsole.conf0000644002055400205540000000507413527331635017722 0ustar00achuachu00000000000000########################################################################################################## # # Libipmiconsole defaults # # This configuration file defines a number of defaults for the # libipmiconsole library. The configuration of these defaults may be # useful for environments in which programs link to libipmiconsole but # do not support configuration of libipmiconsole parameters. For more # detailed descriptions and configuration information see # libipmiconsole.conf(5) or ipmiconsole.h. # # If you configure different values, remember to uncomment the line :-) # ########################################################################################################## # ## Context IPMI Config ## ## Every SOL session is housed within an libipmiconsole context. The ## following defines IPMI config default values for each context ## created. # # libipmiconsole-context-username myusername # # libipmiconsole-context-password mypassword # # libipmiconsole-context-k_g mykey # # libipmiconsole-context-privilege-level ADMIN # # libipmiconsole-context-cipher-suite-id 3 # # libipmiconsole-context-workaround-flags workaround1 workaround2 # ########################################################################################################## # ## Context Protocol Config ## ## Every SOL session is housed within an libipmiconsole context. The ## following defines protocol config default values for each context ## created. # # libipmiconsole-context-session-timeout-len 60000 # # libipmiconsole-context-retransmission-timeout-len 500 # # libipmiconsole-context-retransmission-backoff-count 2 # # libipmiconsole-context-keepalive-timeout-len 20000 # # libipmiconsole-context-retransmission-keepalive-timeout-len 5000 # # libipmiconsole-context-acceptable-packet-errors-count 16 # # libipmiconsole-context-maximum-retransmission-count 16 # ########################################################################################################## # ## Context Engine Config ## ## Every SOL session is housed within an libipmiconsole context. The ## following defines engine config default values for each context ## created. Knowledge of the libipmiconsole library may be necessary ## to understand the meaning of these settings. Please see the ## ipmiconsole.h header file for additional information on the ## library. # # libipmiconsole-context-engine-flags flag1 flag2 # # libipmiconsole-context-behavior-flags flag1 flag2 # # libipmiconsole-context-debug-flags flag1 flag2 # ########################################################################################################## freeipmi-1.6.4/common/0000755002055400205540000000000013527342541014550 5ustar00achuachu00000000000000freeipmi-1.6.4/common/Makefile.in0000644002055400205540000005170313527342443016624 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = RECURSIVE_TARGETS = all-recursive check-recursive cscopelist-recursive \ ctags-recursive dvi-recursive html-recursive info-recursive \ install-data-recursive install-dvi-recursive \ install-exec-recursive install-html-recursive \ install-info-recursive install-pdf-recursive \ install-ps-recursive install-recursive installcheck-recursive \ installdirs-recursive pdf-recursive ps-recursive \ tags-recursive uninstall-recursive am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac RECURSIVE_CLEAN_TARGETS = mostlyclean-recursive clean-recursive \ distclean-recursive maintainer-clean-recursive am__recursive_targets = \ $(RECURSIVE_TARGETS) \ $(RECURSIVE_CLEAN_TARGETS) \ $(am__extra_recursive_targets) AM_RECURSIVE_TARGETS = $(am__recursive_targets:-recursive=) TAGS CTAGS \ distdir am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DIST_SUBDIRS = $(SUBDIRS) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) am__relativize = \ dir0=`pwd`; \ sed_first='s,^\([^/]*\)/.*$$,\1,'; \ sed_rest='s,^[^/]*/*,,'; \ sed_last='s,^.*/\([^/]*\)$$,\1,'; \ sed_butlast='s,/*[^/]*$$,,'; \ while test -n "$$dir1"; do \ first=`echo "$$dir1" | sed -e "$$sed_first"`; \ if test "$$first" != "."; then \ if test "$$first" = ".."; then \ dir2=`echo "$$dir0" | sed -e "$$sed_last"`/"$$dir2"; \ dir0=`echo "$$dir0" | sed -e "$$sed_butlast"`; \ else \ first2=`echo "$$dir2" | sed -e "$$sed_first"`; \ if test "$$first2" = "$$first"; then \ dir2=`echo "$$dir2" | sed -e "$$sed_rest"`; \ else \ dir2="../$$dir2"; \ fi; \ dir0="$$dir0"/"$$first"; \ fi; \ fi; \ dir1=`echo "$$dir1" | sed -e "$$sed_rest"`; \ done; \ reldir="$$dir2" ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ SUBDIRS = \ debugutil \ miscutil \ parsecommon \ pingtool \ portability \ toolcommon all: all-recursive .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs # This directory's subdirectories are mostly independent; you can cd # into them and run 'make' without going through this Makefile. # To change the values of 'make' variables: instead of editing Makefiles, # (1) if the variable is set in 'config.status', edit 'config.status' # (which will cause the Makefiles to be regenerated when you run 'make'); # (2) otherwise, pass the desired values on the 'make' command line. $(am__recursive_targets): @fail=; \ if $(am__make_keepgoing); then \ failcom='fail=yes'; \ else \ failcom='exit 1'; \ fi; \ dot_seen=no; \ target=`echo $@ | sed s/-recursive//`; \ case "$@" in \ distclean-* | maintainer-clean-*) list='$(DIST_SUBDIRS)' ;; \ *) list='$(SUBDIRS)' ;; \ esac; \ for subdir in $$list; do \ echo "Making $$target in $$subdir"; \ if test "$$subdir" = "."; then \ dot_seen=yes; \ local_target="$$target-am"; \ else \ local_target="$$target"; \ fi; \ ($(am__cd) $$subdir && $(MAKE) $(AM_MAKEFLAGS) $$local_target) \ || eval $$failcom; \ done; \ if test "$$dot_seen" = "no"; then \ $(MAKE) $(AM_MAKEFLAGS) "$$target-am" || exit 1; \ fi; test -z "$$fail" ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-recursive TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ if ($(ETAGS) --etags-include --version) >/dev/null 2>&1; then \ include_option=--etags-include; \ empty_fix=.; \ else \ include_option=--include; \ empty_fix=; \ fi; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ test ! -f $$subdir/TAGS || \ set "$$@" "$$include_option=$$here/$$subdir/TAGS"; \ fi; \ done; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-recursive CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-recursive cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done @list='$(DIST_SUBDIRS)'; for subdir in $$list; do \ if test "$$subdir" = .; then :; else \ $(am__make_dryrun) \ || test -d "$(distdir)/$$subdir" \ || $(MKDIR_P) "$(distdir)/$$subdir" \ || exit 1; \ dir1=$$subdir; dir2="$(distdir)/$$subdir"; \ $(am__relativize); \ new_distdir=$$reldir; \ dir1=$$subdir; dir2="$(top_distdir)"; \ $(am__relativize); \ new_top_distdir=$$reldir; \ echo " (cd $$subdir && $(MAKE) $(AM_MAKEFLAGS) top_distdir="$$new_top_distdir" distdir="$$new_distdir" \\"; \ echo " am__remove_distdir=: am__skip_length_check=: am__skip_mode_fix=: distdir)"; \ ($(am__cd) $$subdir && \ $(MAKE) $(AM_MAKEFLAGS) \ top_distdir="$$new_top_distdir" \ distdir="$$new_distdir" \ am__remove_distdir=: \ am__skip_length_check=: \ am__skip_mode_fix=: \ distdir) \ || exit 1; \ fi; \ done check-am: all-am check: check-recursive all-am: Makefile installdirs: installdirs-recursive installdirs-am: install: install-recursive install-exec: install-exec-recursive install-data: install-data-recursive uninstall: uninstall-recursive install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-recursive install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-recursive clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-recursive -rm -f Makefile distclean-am: clean-am distclean-generic distclean-tags dvi: dvi-recursive dvi-am: html: html-recursive html-am: info: info-recursive info-am: install-data-am: install-dvi: install-dvi-recursive install-dvi-am: install-exec-am: install-html: install-html-recursive install-html-am: install-info: install-info-recursive install-info-am: install-man: install-pdf: install-pdf-recursive install-pdf-am: install-ps: install-ps-recursive install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-recursive -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-recursive mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-recursive pdf-am: ps: ps-recursive ps-am: uninstall-am: .MAKE: $(am__recursive_targets) install-am install-strip .PHONY: $(am__recursive_targets) CTAGS GTAGS TAGS all all-am check \ check-am clean clean-generic clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-generic distclean-libtool \ distclean-tags distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ installdirs-am maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-generic mostlyclean-libtool pdf pdf-am \ ps ps-am tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/Makefile.am0000644002055400205540000000013313527331635016603 0ustar00achuachu00000000000000SUBDIRS = \ debugutil \ miscutil \ parsecommon \ pingtool \ portability \ toolcommon freeipmi-1.6.4/common/debugutil/0000755002055400205540000000000013527342540016533 5ustar00achuachu00000000000000freeipmi-1.6.4/common/debugutil/Makefile.in0000644002055400205540000005316713527342443020616 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/debugutil DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libdebugutil_la_LIBADD = am_libdebugutil_la_OBJECTS = libdebugutil_la-debug-util.lo libdebugutil_la_OBJECTS = $(am_libdebugutil_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libdebugutil_la_SOURCES) DIST_SOURCES = $(libdebugutil_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = \ libdebugutil.la libdebugutil_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libdebugutil_la_SOURCES = \ debug-util.c \ debug-util.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/debugutil/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/debugutil/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libdebugutil.la: $(libdebugutil_la_OBJECTS) $(libdebugutil_la_DEPENDENCIES) $(EXTRA_libdebugutil_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libdebugutil_la_OBJECTS) $(libdebugutil_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libdebugutil_la-debug-util.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libdebugutil_la-debug-util.lo: debug-util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdebugutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libdebugutil_la-debug-util.lo -MD -MP -MF $(DEPDIR)/libdebugutil_la-debug-util.Tpo -c -o libdebugutil_la-debug-util.lo `test -f 'debug-util.c' || echo '$(srcdir)/'`debug-util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libdebugutil_la-debug-util.Tpo $(DEPDIR)/libdebugutil_la-debug-util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='debug-util.c' object='libdebugutil_la-debug-util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libdebugutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libdebugutil_la-debug-util.lo `test -f 'debug-util.c' || echo '$(srcdir)/'`debug-util.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/debugutil/Makefile.am0000644002055400205540000000042613527331635020574 0ustar00achuachu00000000000000noinst_LTLIBRARIES = \ libdebugutil.la libdebugutil_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libdebugutil_la_SOURCES = \ debug-util.c \ debug-util.h freeipmi-1.6.4/common/debugutil/debug-util.c0000644002055400205540000001054613527331635020751 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "debug-util.h" #include "freeipmi-portability.h" int debug_hdr_str (uint8_t packet_type, uint8_t packet_direction, unsigned int packet_flags, const char *str, char *hdrbuf, unsigned int hdrbuf_len) { char *fmt_inband = "=====================================================\n" "%s%s %s\n" "====================================================="; char *fmt_outofband = "=====================================================\n" "%s %s%s %s\n" "====================================================="; char *str_direction; char *str_prefix; int len; assert (packet_type == DEBUG_UTIL_TYPE_NONE || packet_type == DEBUG_UTIL_TYPE_INBAND || packet_type == DEBUG_UTIL_TYPE_IPMI_1_5 || packet_type == DEBUG_UTIL_TYPE_IPMI_2_0); assert (packet_direction == DEBUG_UTIL_DIRECTION_NONE || packet_direction == DEBUG_UTIL_DIRECTION_REQUEST || packet_direction == DEBUG_UTIL_DIRECTION_RESPONSE); assert (str); assert (hdrbuf); assert (hdrbuf_len); if (packet_direction == DEBUG_UTIL_DIRECTION_REQUEST) str_direction = "Request"; else if (packet_direction == DEBUG_UTIL_DIRECTION_RESPONSE) str_direction = "Response"; else str_direction = ""; if (packet_flags & DEBUG_UTIL_FLAGS_GROUP_EXTENSION) str_prefix = "Group Extension - "; else if (packet_flags & DEBUG_UTIL_FLAGS_OEM_GROUP) str_prefix = "OEM Group - "; else if (packet_flags & DEBUG_UTIL_FLAGS_OEM) str_prefix = "OEM - "; else str_prefix = ""; if (packet_type == DEBUG_UTIL_TYPE_NONE || packet_type == DEBUG_UTIL_TYPE_INBAND) len = snprintf (hdrbuf, hdrbuf_len, fmt_inband, str_prefix, str, str_direction); else { char *str_version; if (packet_type == DEBUG_UTIL_TYPE_IPMI_1_5) str_version = "IPMI 1.5"; else str_version = "IPMI 2.0"; len = snprintf (hdrbuf, hdrbuf_len, fmt_outofband, str_version, str_prefix, str, str_direction); } if (len < 0 || len >= hdrbuf_len) return (-1); return (0); } int debug_hdr_cmd (uint8_t packet_type, uint8_t packet_direction, uint8_t net_fn, uint8_t cmd, uint8_t group_extension, char *hdrbuf, unsigned int hdrbuf_len) { const char *str_cmd; unsigned int packet_flags = 0; if (IPMI_NET_FN_GROUP_EXTENSION (net_fn)) { if (group_extension == IPMI_NET_FN_GROUP_EXTENSION_IDENTIFICATION_DCMI) str_cmd = ipmi_cmd_dcmi_str (cmd); else str_cmd = "Unknown"; packet_flags = DEBUG_UTIL_FLAGS_GROUP_EXTENSION; } else if (IPMI_NET_FN_OEM_GROUP (net_fn)) { str_cmd = "Unknown"; packet_flags = DEBUG_UTIL_FLAGS_OEM_GROUP; } else if (IPMI_NET_FN_CONTROLLER_SPECIFIC_OEM_GROUP (net_fn)) { str_cmd = "Unknown"; packet_flags = DEBUG_UTIL_FLAGS_OEM; } else str_cmd = ipmi_cmd_str (net_fn, cmd); return (debug_hdr_str (packet_type, packet_direction, packet_flags, str_cmd, hdrbuf, hdrbuf_len)); } freeipmi-1.6.4/common/debugutil/debug-util.h0000644002055400205540000000424613527331635020756 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef DEBUG_UTIL_H #define DEBUG_UTIL_H #include #define DEBUG_UTIL_HDR_BUFLEN 1024 #define DEBUG_UTIL_TYPE_NONE 0x00 #define DEBUG_UTIL_TYPE_INBAND 0x01 #define DEBUG_UTIL_TYPE_IPMI_1_5 0x02 #define DEBUG_UTIL_TYPE_IPMI_2_0 0x03 #define DEBUG_UTIL_DIRECTION_NONE 0x00 #define DEBUG_UTIL_DIRECTION_REQUEST 0x01 #define DEBUG_UTIL_DIRECTION_RESPONSE 0x02 #define DEBUG_UTIL_OPEN_SESSION_STR "Open Session" #define DEBUG_UTIL_RAKP_1_STR "RAKP Message 1" #define DEBUG_UTIL_RAKP_2_STR "RAKP Message 2" #define DEBUG_UTIL_RAKP_3_STR "RAKP Message 3" #define DEBUG_UTIL_RAKP_4_STR "RAKP Message 4" #define DEBUG_UTIL_RMCPPING_STR "RMCP Ping" #define DEBUG_UTIL_RMCPPONG_STR "RMCP Pong" #define DEBUG_UTIL_FLAGS_DEFAULT 0x0000 #define DEBUG_UTIL_FLAGS_GROUP_EXTENSION 0x0001 #define DEBUG_UTIL_FLAGS_OEM_GROUP 0x0002 #define DEBUG_UTIL_FLAGS_OEM 0x0004 int debug_hdr_str (uint8_t packet_type, uint8_t packet_direction, unsigned int packet_flags, const char *str, char *hdrbuf, unsigned int hdrbuf_len); int debug_hdr_cmd (uint8_t packet_type, uint8_t packet_direction, uint8_t net_fn, uint8_t cmd, uint8_t group_extension, char *hdrbuf, unsigned int hdrbuf_len); #endif /* DEBUG_UTIL_H */ freeipmi-1.6.4/common/miscutil/0000755002055400205540000000000013527342540016400 5ustar00achuachu00000000000000freeipmi-1.6.4/common/miscutil/Makefile.in0000644002055400205540000010655113527342443020457 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/miscutil DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libmiscutil_la_LIBADD = am_libmiscutil_la_OBJECTS = libmiscutil_la-cbuf.lo \ libmiscutil_la-conffile.lo libmiscutil_la-error.lo \ libmiscutil_la-fd.lo libmiscutil_la-fi_hostlist.lo \ libmiscutil_la-hash.lo libmiscutil_la-heap.lo \ libmiscutil_la-hostlist.lo libmiscutil_la-list.lo \ libmiscutil_la-network.lo libmiscutil_la-secure.lo \ libmiscutil_la-timeval.lo libmiscutil_la-thread.lo libmiscutil_la_OBJECTS = $(am_libmiscutil_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libmiscutil_la_SOURCES) DIST_SOURCES = $(libmiscutil_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = \ libmiscutil.la libmiscutil_la_CPPFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT libmiscutil_la_SOURCES = \ cbuf.c \ cbuf.h \ conffile.c \ conffile.h \ error.c \ error.h \ fd.c \ fd.h \ fi_hostlist.c \ fi_hostlist.h \ hash.c \ hash.h \ heap.c \ heap.h \ hostlist.c \ hostlist.h \ list.c \ list.h \ network.c \ network.h \ secure.c \ secure.h \ timeval.c \ timeval.h \ thread.c \ thread.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/miscutil/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/miscutil/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libmiscutil.la: $(libmiscutil_la_OBJECTS) $(libmiscutil_la_DEPENDENCIES) $(EXTRA_libmiscutil_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libmiscutil_la_OBJECTS) $(libmiscutil_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-cbuf.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-conffile.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-error.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-fd.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-fi_hostlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-hash.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-heap.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-hostlist.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-list.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-network.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-secure.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-thread.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libmiscutil_la-timeval.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libmiscutil_la-cbuf.lo: cbuf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-cbuf.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-cbuf.Tpo -c -o libmiscutil_la-cbuf.lo `test -f 'cbuf.c' || echo '$(srcdir)/'`cbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-cbuf.Tpo $(DEPDIR)/libmiscutil_la-cbuf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='cbuf.c' object='libmiscutil_la-cbuf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-cbuf.lo `test -f 'cbuf.c' || echo '$(srcdir)/'`cbuf.c libmiscutil_la-conffile.lo: conffile.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-conffile.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-conffile.Tpo -c -o libmiscutil_la-conffile.lo `test -f 'conffile.c' || echo '$(srcdir)/'`conffile.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-conffile.Tpo $(DEPDIR)/libmiscutil_la-conffile.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='conffile.c' object='libmiscutil_la-conffile.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-conffile.lo `test -f 'conffile.c' || echo '$(srcdir)/'`conffile.c libmiscutil_la-error.lo: error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-error.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-error.Tpo -c -o libmiscutil_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-error.Tpo $(DEPDIR)/libmiscutil_la-error.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='error.c' object='libmiscutil_la-error.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-error.lo `test -f 'error.c' || echo '$(srcdir)/'`error.c libmiscutil_la-fd.lo: fd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-fd.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-fd.Tpo -c -o libmiscutil_la-fd.lo `test -f 'fd.c' || echo '$(srcdir)/'`fd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-fd.Tpo $(DEPDIR)/libmiscutil_la-fd.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fd.c' object='libmiscutil_la-fd.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-fd.lo `test -f 'fd.c' || echo '$(srcdir)/'`fd.c libmiscutil_la-fi_hostlist.lo: fi_hostlist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-fi_hostlist.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-fi_hostlist.Tpo -c -o libmiscutil_la-fi_hostlist.lo `test -f 'fi_hostlist.c' || echo '$(srcdir)/'`fi_hostlist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-fi_hostlist.Tpo $(DEPDIR)/libmiscutil_la-fi_hostlist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='fi_hostlist.c' object='libmiscutil_la-fi_hostlist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-fi_hostlist.lo `test -f 'fi_hostlist.c' || echo '$(srcdir)/'`fi_hostlist.c libmiscutil_la-hash.lo: hash.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-hash.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-hash.Tpo -c -o libmiscutil_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-hash.Tpo $(DEPDIR)/libmiscutil_la-hash.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hash.c' object='libmiscutil_la-hash.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-hash.lo `test -f 'hash.c' || echo '$(srcdir)/'`hash.c libmiscutil_la-heap.lo: heap.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-heap.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-heap.Tpo -c -o libmiscutil_la-heap.lo `test -f 'heap.c' || echo '$(srcdir)/'`heap.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-heap.Tpo $(DEPDIR)/libmiscutil_la-heap.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='heap.c' object='libmiscutil_la-heap.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-heap.lo `test -f 'heap.c' || echo '$(srcdir)/'`heap.c libmiscutil_la-hostlist.lo: hostlist.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-hostlist.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-hostlist.Tpo -c -o libmiscutil_la-hostlist.lo `test -f 'hostlist.c' || echo '$(srcdir)/'`hostlist.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-hostlist.Tpo $(DEPDIR)/libmiscutil_la-hostlist.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='hostlist.c' object='libmiscutil_la-hostlist.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-hostlist.lo `test -f 'hostlist.c' || echo '$(srcdir)/'`hostlist.c libmiscutil_la-list.lo: list.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-list.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-list.Tpo -c -o libmiscutil_la-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-list.Tpo $(DEPDIR)/libmiscutil_la-list.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='list.c' object='libmiscutil_la-list.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-list.lo `test -f 'list.c' || echo '$(srcdir)/'`list.c libmiscutil_la-network.lo: network.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-network.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-network.Tpo -c -o libmiscutil_la-network.lo `test -f 'network.c' || echo '$(srcdir)/'`network.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-network.Tpo $(DEPDIR)/libmiscutil_la-network.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='network.c' object='libmiscutil_la-network.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-network.lo `test -f 'network.c' || echo '$(srcdir)/'`network.c libmiscutil_la-secure.lo: secure.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-secure.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-secure.Tpo -c -o libmiscutil_la-secure.lo `test -f 'secure.c' || echo '$(srcdir)/'`secure.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-secure.Tpo $(DEPDIR)/libmiscutil_la-secure.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='secure.c' object='libmiscutil_la-secure.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-secure.lo `test -f 'secure.c' || echo '$(srcdir)/'`secure.c libmiscutil_la-timeval.lo: timeval.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-timeval.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-timeval.Tpo -c -o libmiscutil_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-timeval.Tpo $(DEPDIR)/libmiscutil_la-timeval.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='timeval.c' object='libmiscutil_la-timeval.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-timeval.lo `test -f 'timeval.c' || echo '$(srcdir)/'`timeval.c libmiscutil_la-thread.lo: thread.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libmiscutil_la-thread.lo -MD -MP -MF $(DEPDIR)/libmiscutil_la-thread.Tpo -c -o libmiscutil_la-thread.lo `test -f 'thread.c' || echo '$(srcdir)/'`thread.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libmiscutil_la-thread.Tpo $(DEPDIR)/libmiscutil_la-thread.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='thread.c' object='libmiscutil_la-thread.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libmiscutil_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libmiscutil_la-thread.lo `test -f 'thread.c' || echo '$(srcdir)/'`thread.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/miscutil/Makefile.am0000644002055400205540000000066213527331635020443 0ustar00achuachu00000000000000noinst_LTLIBRARIES = \ libmiscutil.la libmiscutil_la_CPPFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT libmiscutil_la_SOURCES = \ cbuf.c \ cbuf.h \ conffile.c \ conffile.h \ error.c \ error.h \ fd.c \ fd.h \ fi_hostlist.c \ fi_hostlist.h \ hash.c \ hash.h \ heap.c \ heap.h \ hostlist.c \ hostlist.h \ list.c \ list.h \ network.c \ network.h \ secure.c \ secure.h \ timeval.c \ timeval.h \ thread.c \ thread.h freeipmi-1.6.4/common/miscutil/cbuf.c0000644002055400205540000013716313527331635017501 0ustar00achuachu00000000000000/***************************************************************************** * $Id: cbuf.c,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ***************************************************************************** * Refer to "cbuf.h" for documentation on public functions. *****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #ifdef HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "cbuf.h" /***************************************************************************** * lsd_fatal_error *****************************************************************************/ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error (char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # include # include # include # define lsd_fatal_error(file, line, mesg) \ do { \ fprintf (stderr, "ERROR: [%s:%d] %s: %s\n", \ file, line, mesg, strerror (errno)); \ } while (0) # endif /* !lsd_fatal_error */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ /***************************************************************************** * lsd_nomem_error *****************************************************************************/ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error (char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /***************************************************************************** * Constants *****************************************************************************/ #define CBUF_CHUNK 1000 #define CBUF_MAGIC 0xDEADBEEF #define CBUF_MAGIC_LEN (sizeof (unsigned long)) /***************************************************************************** * Data Types *****************************************************************************/ struct cbuf { #ifndef NDEBUG unsigned long magic; /* cookie for asserting validity */ #endif /* !NDEBUG */ #ifdef WITH_PTHREADS pthread_mutex_t mutex; /* mutex to protect access to cbuf */ #endif /* WITH_PTHREADS */ int alloc; /* num bytes malloc'd/realloc'd */ int minsize; /* min bytes of data to allocate */ int maxsize; /* max bytes of data to allocate */ int size; /* num bytes of data allocated */ int used; /* num bytes of unread data */ cbuf_overwrite_t overwrite; /* overwrite option behavior */ int got_wrap; /* true if data has wrapped */ int i_in; /* index to where data is written in */ int i_out; /* index to where data is read out */ int i_rep; /* index to where data is replayable */ unsigned char *data; /* ptr to circular buffer of data */ }; typedef int (*cbuf_iof) (void *cbuf_data, void *arg, int len); /***************************************************************************** * Prototypes *****************************************************************************/ static int cbuf_find_replay_line (cbuf_t cb, int chars, int *nlines, int *nl); static int cbuf_find_unread_line (cbuf_t cb, int chars, int *nlines); static int cbuf_get_fd (void *dstbuf, int *psrcfd, int len); static int cbuf_get_mem (void *dstbuf, unsigned char **psrcbuf, int len); static int cbuf_put_fd (void *srcbuf, int *pdstfd, int len); static int cbuf_put_mem (void *srcbuf, unsigned char **pdstbuf, int len); static int cbuf_copier (cbuf_t src, cbuf_t dst, int len, int *ndropped); static int cbuf_dropper (cbuf_t cb, int len); static int cbuf_reader (cbuf_t src, int len, cbuf_iof putf, void *dst); static int cbuf_replayer (cbuf_t src, int len, cbuf_iof putf, void *dst); static int cbuf_writer (cbuf_t dst, int len, cbuf_iof getf, void *src, int *ndropped); static int cbuf_grow (cbuf_t cb, int n); static int cbuf_shrink (cbuf_t cb); #ifndef NDEBUG static int cbuf_is_valid (cbuf_t cb); #endif /* !NDEBUG */ /***************************************************************************** * Macros *****************************************************************************/ #ifndef MAX # define MAX(x,y) (((x) >= (y)) ? (x) : (y)) #endif /* !MAX */ #ifndef MIN # define MIN(x,y) (((x) <= (y)) ? (x) : (y)) #endif /* !MIN */ #ifdef WITH_PTHREADS # define cbuf_mutex_init(cb) \ do { \ int e = pthread_mutex_init (&cb->mutex, NULL); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "cbuf mutex init"); \ abort (); \ } \ } while (0) # define cbuf_mutex_lock(cb) \ do { \ int e = pthread_mutex_lock (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "cbuf mutex lock"); \ abort (); \ } \ } while (0) # define cbuf_mutex_unlock(cb) \ do { \ int e = pthread_mutex_unlock (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "cbuf mutex unlock"); \ abort (); \ } \ } while (0) # define cbuf_mutex_destroy(cb) \ do { \ int e = pthread_mutex_destroy (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "cbuf mutex destroy"); \ abort (); \ } \ } while (0) # ifndef NDEBUG static int cbuf_mutex_is_locked (cbuf_t cb); # endif /* !NDEBUG */ #else /* !WITH_PTHREADS */ # define cbuf_mutex_init(cb) # define cbuf_mutex_lock(cb) # define cbuf_mutex_unlock(cb) # define cbuf_mutex_destroy(cb) # define cbuf_mutex_is_locked(cb) (1) #endif /* !WITH_PTHREADS */ /***************************************************************************** * Functions *****************************************************************************/ cbuf_t cbuf_create (int minsize, int maxsize) { cbuf_t cb; if (minsize <= 0) { errno = EINVAL; return (NULL); } if (!(cb = malloc (sizeof (struct cbuf)))) { errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "cbuf struct")); } /* Circular buffer is empty when (i_in == i_out), * so reserve 1 byte for this sentinel. */ cb->alloc = minsize + 1; #ifndef NDEBUG /* Reserve space for the magic cookies used to protect the * cbuf data[] array from underflow and overflow. */ cb->alloc += 2 * CBUF_MAGIC_LEN; #endif /* !NDEBUG */ if (!(cb->data = malloc (cb->alloc))) { free (cb); errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "cbuf data")); } cbuf_mutex_init (cb); cb->minsize = minsize; cb->maxsize = (maxsize > minsize) ? maxsize : minsize; cb->size = minsize; cb->used = 0; cb->overwrite = CBUF_WRAP_MANY; cb->got_wrap = 0; cb->i_in = cb->i_out = cb->i_rep = 0; #ifndef NDEBUG /* C is for cookie, that's good enough for me, yeah! * The magic cookies are only defined during DEBUG code. * The first "magic" cookie is at the top of the structure. * Magic cookies are also placed at the top & bottom of the * cbuf data[] array to catch buffer underflow & overflow errors. */ cb->data += CBUF_MAGIC_LEN; /* jump forward past underflow magic */ cb->magic = CBUF_MAGIC; /* * Must use memcpy since overflow cookie may not be word-aligned. */ memcpy (cb->data - CBUF_MAGIC_LEN, (void *) &cb->magic, CBUF_MAGIC_LEN); memcpy (cb->data + cb->size + 1, (void *) &cb->magic, CBUF_MAGIC_LEN); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); cbuf_mutex_unlock (cb); #endif /* !NDEBUG */ return (cb); } void cbuf_destroy (cbuf_t cb) { assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); #ifndef NDEBUG /* The moon sometimes looks like a C, but you can't eat that. * Munch the magic cookies before freeing memory. */ cb->magic = ~CBUF_MAGIC; /* the anti-cookie! */ memcpy (cb->data - CBUF_MAGIC_LEN, (void *) &cb->magic, CBUF_MAGIC_LEN); memcpy (cb->data + cb->size + 1, (void *) &cb->magic, CBUF_MAGIC_LEN); cb->data -= CBUF_MAGIC_LEN; /* jump back to what malloc returned */ #endif /* !NDEBUG */ free (cb->data); cbuf_mutex_unlock (cb); cbuf_mutex_destroy (cb); free (cb); return; } void cbuf_flush (cbuf_t cb) { assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); /* * FIXME: Shrink buffer back to minimum size. */ cb->used = 0; cb->got_wrap = 0; cb->i_in = cb->i_out = cb->i_rep = 0; assert (cbuf_is_valid (cb)); cbuf_mutex_unlock (cb); return; } int cbuf_size (cbuf_t cb) { int size; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); size = cb->maxsize; cbuf_mutex_unlock (cb); return (size); } int cbuf_free (cbuf_t cb) { int nfree; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); nfree = cb->maxsize - cb->used; cbuf_mutex_unlock (cb); return (nfree); } int cbuf_used (cbuf_t cb) { int used; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); used = cb->used; cbuf_mutex_unlock (cb); return (used); } int cbuf_lines_used (cbuf_t cb) { int lines = -1; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); cbuf_find_unread_line (cb, cb->size, &lines); cbuf_mutex_unlock (cb); return (lines); } int cbuf_reused (cbuf_t cb) { /* If (O > R) * n = O - R * else * n = (O - 0) + ((S+1) - R). * (S+1) is used since data[] contains 'size' bytes + a 1-byte sentinel. */ int reused; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); reused = (cb->i_out - cb->i_rep + (cb->size + 1)) % (cb->size + 1); cbuf_mutex_unlock (cb); return (reused); } int cbuf_lines_reused (cbuf_t cb) { int lines = -1; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); cbuf_find_replay_line (cb, cb->size, &lines, NULL); cbuf_mutex_unlock (cb); return (lines); } int cbuf_is_empty (cbuf_t cb) { int used; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); used = cb->used; cbuf_mutex_unlock (cb); return (used == 0); } int cbuf_opt_get (cbuf_t cb, cbuf_opt_t name, int *value) { int rc = 0; assert (cb != NULL); if (value == NULL) { errno = EINVAL; return (-1); } cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); if (name == CBUF_OPT_OVERWRITE) { *value = cb->overwrite; } else { errno = EINVAL; rc = -1; } cbuf_mutex_unlock (cb); return (rc); } int cbuf_opt_set (cbuf_t cb, cbuf_opt_t name, int value) { int rc = 0; assert (cb != NULL); cbuf_mutex_lock (cb); assert (cbuf_is_valid (cb)); if (name == CBUF_OPT_OVERWRITE) { if ( (value == CBUF_NO_DROP) || (value == CBUF_WRAP_ONCE) || (value == CBUF_WRAP_MANY) ) { cb->overwrite = value; } else { errno = EINVAL; rc = -1; } } else { errno = EINVAL; rc = -1; } assert (cbuf_is_valid (cb)); cbuf_mutex_unlock (cb); return (rc); } int cbuf_drop (cbuf_t src, int len) { assert (src != NULL); if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); if (len == -1) { len = src->used; } else { len = MIN (len, src->used); } if (len > 0) { cbuf_dropper (src, len); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (len); } int cbuf_peek (cbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_reader (src, len, (cbuf_iof) cbuf_put_mem, &dstbuf); assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_read (cbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_reader (src, len, (cbuf_iof) cbuf_put_mem, &dstbuf); if (n > 0) { cbuf_dropper (src, n); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_replay (cbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_replayer (src, len, (cbuf_iof) cbuf_put_mem, &dstbuf); assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_rewind (cbuf_t src, int len) { int reused; assert (src != NULL); if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); reused = (src->i_out - src->i_rep + (src->size + 1)) % (src->size + 1); if (len == -1) { len = reused; } else { len = MIN (len, reused); } if (len > 0) { src->used += len; src->i_out = (src->i_out - len + (src->size + 1)) % (src->size + 1); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (len); } int cbuf_write (cbuf_t dst, void *srcbuf, int len, int *ndropped) { int n; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if ((srcbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } cbuf_mutex_lock (dst); assert (cbuf_is_valid (dst)); n = cbuf_writer (dst, len, (cbuf_iof) cbuf_get_mem, &srcbuf, ndropped); assert (cbuf_is_valid (dst)); cbuf_mutex_unlock (dst); return (n); } int cbuf_drop_line (cbuf_t src, int len, int lines) { int n; assert (src != NULL); if ((len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_find_unread_line (src, len, &lines); if (n > 0) { cbuf_dropper (src, n); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_peek_line (cbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_find_unread_line (src, len - 1, &lines); if (n > 0) { if (len > 0) { m = MIN (n, len - 1); if (m > 0) { pdst = dstbuf; l = cbuf_reader (src, m, (cbuf_iof) cbuf_put_mem, &pdst); assert (l == m); } assert (m < len); dstbuf[m] = '\0'; } } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_read_line (cbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_find_unread_line (src, len - 1, &lines); if (n > 0) { if (len > 0) { m = MIN (n, len - 1); if (m > 0) { pdst = dstbuf; l = cbuf_reader (src, m, (cbuf_iof) cbuf_put_mem, &pdst); assert (l == m); } assert (m < len); dstbuf[m] = '\0'; } cbuf_dropper (src, n); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_replay_line (cbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; int nl; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_find_replay_line (src, len - 1, &lines, &nl); if (n > 0) { if (len > 0) { assert ((nl == 0) || (nl == 1)); m = MIN (n, len - 1 - nl); m = MAX (m, 0); if (m > 0) { pdst = dstbuf; l = cbuf_replayer (src, m, (cbuf_iof) cbuf_put_mem, &pdst); assert (l == m); } /* Append newline if needed and space allows. */ if ((nl) && (len > 1)) { dstbuf[m++] = '\n'; } assert (m < len); dstbuf[m] = '\0'; n += nl; } } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_rewind_line (cbuf_t src, int len, int lines) { int n; assert (src != NULL); if ((len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); n = cbuf_find_replay_line (src, len, &lines, NULL); if (n > 0) { src->used += n; src->i_out = (src->i_out - n + (src->size + 1)) % (src->size + 1); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_write_line (cbuf_t dst, char *srcbuf, int *ndropped) { int len; int nfree, ncopy, n; int ndrop = 0, d; char *psrc = srcbuf; char *newline = "\n"; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (srcbuf == NULL) { errno = EINVAL; return (-1); } /* Compute number of bytes to effectively copy to dst cbuf. * Reserve space for the trailing newline if needed. */ len = ncopy = strlen (srcbuf); if ((len == 0) || (srcbuf[len - 1] != '\n')) { len++; } cbuf_mutex_lock (dst); assert (cbuf_is_valid (dst)); /* * Attempt to grow dst cbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += cbuf_grow (dst, len - nfree); } /* Determine if src will fit (or be made to fit) in dst cbuf. */ if (dst->overwrite == CBUF_NO_DROP) { if (len > dst->size - dst->used) { errno = ENOSPC; len = -1; /* cannot return while mutex locked */ } } else if (dst->overwrite == CBUF_WRAP_ONCE) { if (len > dst->size) { errno = ENOSPC; len = -1; /* cannot return while mutex locked */ } } if (len > 0) { /* * Discard data that won't fit in dst cbuf. */ if (len > dst->size) { ndrop += len - dst->size; ncopy -= ndrop; psrc += ndrop; } /* Copy data from src string to dst cbuf. */ if (ncopy > 0) { n = cbuf_writer (dst, ncopy, (cbuf_iof) cbuf_get_mem, &psrc, &d); assert (n == ncopy); ndrop += d; } /* Append newline if needed. */ if (srcbuf[len - 1] != '\n') { n = cbuf_writer (dst, 1, (cbuf_iof) cbuf_get_mem, &newline, &d); assert (n == 1); ndrop += d; } } assert (cbuf_is_valid (dst)); cbuf_mutex_unlock (dst); if (ndropped) { *ndropped = ndrop; } return (len); } int cbuf_peek_to_fd (cbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); if (len == -1) { len = src->used; } if (len > 0) { n = cbuf_reader (src, len, (cbuf_iof) cbuf_put_fd, &dstfd); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_read_to_fd (cbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); if (len == -1) { len = src->used; } if (len > 0) { n = cbuf_reader (src, len, (cbuf_iof) cbuf_put_fd, &dstfd); if (n > 0) { cbuf_dropper (src, n); } } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_replay_to_fd (cbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } cbuf_mutex_lock (src); assert (cbuf_is_valid (src)); if (len == -1) { len = src->size - src->used; } if (len > 0) { n = cbuf_replayer (src, len, (cbuf_iof) cbuf_put_fd, &dstfd); } assert (cbuf_is_valid (src)); cbuf_mutex_unlock (src); return (n); } int cbuf_write_from_fd (cbuf_t dst, int srcfd, int len, int *ndropped) { int n = 0; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if ((srcfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } cbuf_mutex_lock (dst); assert (cbuf_is_valid (dst)); if (len == -1) { /* * Try to use all of the free buffer space available for writing. * If it is all in use, try to grab another chunk. */ len = dst->size - dst->used; if (len == 0) { len = CBUF_CHUNK; } } if (len > 0) { n = cbuf_writer (dst, len, (cbuf_iof) cbuf_get_fd, &srcfd, ndropped); } assert (cbuf_is_valid (dst)); cbuf_mutex_unlock (dst); return (n); } int cbuf_copy (cbuf_t src, cbuf_t dst, int len, int *ndropped) { int n = 0; assert (src != NULL); assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (src == dst) { errno = EINVAL; return (-1); } if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } /* Lock cbufs in order of lowest memory address to prevent deadlock. */ if (src < dst) { cbuf_mutex_lock (src); cbuf_mutex_lock (dst); } else { cbuf_mutex_lock (dst); cbuf_mutex_lock (src); } assert (cbuf_is_valid (src)); assert (cbuf_is_valid (dst)); if (len == -1) { len = src->used; } if (len > 0) { n = cbuf_copier (src, dst, len, ndropped); } assert (cbuf_is_valid (src)); assert (cbuf_is_valid (dst)); cbuf_mutex_unlock (src); cbuf_mutex_unlock (dst); return (n); } int cbuf_move (cbuf_t src, cbuf_t dst, int len, int *ndropped) { int n = 0; assert (src != NULL); assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (src == dst) { errno = EINVAL; return (-1); } if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } /* Lock cbufs in order of lowest memory address to prevent deadlock. */ if (src < dst) { cbuf_mutex_lock (src); cbuf_mutex_lock (dst); } else { cbuf_mutex_lock (dst); cbuf_mutex_lock (src); } assert (cbuf_is_valid (src)); assert (cbuf_is_valid (dst)); if (len == -1) { len = src->used; } if (len > 0) { n = cbuf_copier (src, dst, len, ndropped); if (n > 0) { cbuf_dropper (src, n); } } assert (cbuf_is_valid (src)); assert (cbuf_is_valid (dst)); cbuf_mutex_unlock (src); cbuf_mutex_unlock (dst); return (n); } static int cbuf_find_replay_line (cbuf_t cb, int chars, int *nlines, int *nl) { /* Finds the specified number of lines from the replay region of the buffer. * If ([nlines] > 0), returns the number of bytes comprising the line count, * or 0 if this number of lines is not available (ie, all or none). * If ([nlines] == -1), returns the number of bytes comprising the maximum * line count bounded by the number of characters specified by [chars]. * Only complete lines (ie, those terminated by a newline) are counted, * with once exception: the most recent line of replay data is treated * as a complete line regardless of the presence of a terminating newline. * Sets the value-result parameter [nlines] to the number of lines found. * Sets [nl] to '1' if a newline is required to terminate the replay data. */ int i, n, m, l; int lines; assert (cb != NULL); assert (nlines != NULL); assert (*nlines >= -1); assert (cbuf_mutex_is_locked (cb)); n = m = l = 0; lines = *nlines; *nlines = 0; if (nl) { *nl = 0; /* init in case of early return */ } if ((lines == 0) || ((lines <= -1) && (chars <= 0))) { return (0); } if (cb->i_out == cb->i_rep) { return (0); /* no replay data available */ } if (lines > 0) { chars = -1; /* chars parm not used if lines > 0 */ } else { ++chars; /* incr to allow for preceding '\n' */ } /* Since the most recent line of replay data is considered implicitly * terminated, decrement the char count to account for the newline * if one is not present, or increment the line count if one is. * Note: cb->data[(O - 1 + (S+1)) % (S+1)] is the last replayable char. */ if (cb->data[(cb->i_out + cb->size) % (cb->size + 1)] != '\n') { if (nl) { *nl = 1; } --chars; } else { if (lines > 0) { ++lines; } --l; } i = cb->i_out; while (i != cb->i_rep) { i = (i + cb->size) % (cb->size + 1); /* (i - 1 + (S+1)) % (S+1) */ ++n; if (chars > 0) { --chars; } /* Complete lines are identified by a preceding newline. */ if (cb->data[i] == '\n') { if (lines > 0) { --lines; } m = n - 1; /* do not include preceding '\n' */ ++l; } if ((chars == 0) || (lines == 0)) { break; } } /* But the first line written in does not need a preceding newline. */ if ((!cb->got_wrap) && ((chars > 0) || (lines > 0))) { if (lines > 0) { --lines; } m = n; ++l; } if (lines > 0) { return (0); /* all or none, and not enough found */ } *nlines = l; return (m); } static int cbuf_find_unread_line (cbuf_t cb, int chars, int *nlines) { /* Finds the specified number of lines from the unread region of the buffer. * If ([nlines] > 0), returns the number of bytes comprising the line count, * or 0 if this number of lines is not available (ie, all or none). * If ([nlines] == -1), returns the number of bytes comprising the maximum * line count bounded by the number of characters specified by [chars]. * Only complete lines (ie, those terminated by a newline) are counted. * Sets the value-result parameter [nlines] to the number of lines found. */ int i, n, m, l; int lines; assert (cb != NULL); assert (nlines != NULL); assert (*nlines >= -1); assert (cbuf_mutex_is_locked (cb)); n = m = l = 0; lines = *nlines; *nlines = 0; if ((lines == 0) || ((lines <= -1) && (chars <= 0))) { return (0); } if (cb->used == 0) { return (0); /* no unread data available */ } if (lines > 0) { chars = -1; /* chars parm not used if lines > 0 */ } i = cb->i_out; while (i != cb->i_in) { ++n; if (chars > 0) { --chars; } if (cb->data[i] == '\n') { if (lines > 0) { --lines; } m = n; ++l; } if ((chars == 0) || (lines == 0)) { break; } i = (i + 1) % (cb->size + 1); } if (lines > 0) { return (0); /* all or none, and not enough found */ } *nlines = l; return (m); } static int cbuf_get_fd (void *dstbuf, int *psrcfd, int len) { /* Copies data from the file referenced by the file descriptor * pointed at by [psrcfd] into cbuf's [dstbuf]. * Returns the number of bytes read from the fd, 0 on EOF, or -1 on error. */ int n; assert (dstbuf != NULL); assert (psrcfd != NULL); assert (*psrcfd >= 0); assert (len > 0); do { n = read (*psrcfd, dstbuf, len); } while ((n < 0) && (errno == EINTR)); return (n); } static int cbuf_get_mem (void *dstbuf, unsigned char **psrcbuf, int len) { /* Copies data from the buffer pointed at by [psrcbuf] into cbuf's [dstbuf]. * Returns the number of bytes copied. */ assert (dstbuf != NULL); assert (psrcbuf != NULL); assert (*psrcbuf != NULL); assert (len > 0); memcpy (dstbuf, *psrcbuf, len); *psrcbuf += len; return (len); } static int cbuf_put_fd (void *srcbuf, int *pdstfd, int len) { /* Copies data from cbuf's [srcbuf] into the file referenced * by the file descriptor pointed at by [pdstfd]. * Returns the number of bytes written to the fd, or -1 on error. */ int n; assert (srcbuf != NULL); assert (pdstfd != NULL); assert (*pdstfd >= 0); assert (len > 0); do { n = write (*pdstfd, srcbuf, len); } while ((n < 0) && (errno == EINTR)); return (n); } static int cbuf_put_mem (void *srcbuf, unsigned char **pdstbuf, int len) { /* Copies data from cbuf's [srcbuf] into the buffer pointed at by [pdstbuf]. * Returns the number of bytes copied. */ assert (srcbuf != NULL); assert (pdstbuf != NULL); assert (*pdstbuf != NULL); assert (len > 0); memcpy (*pdstbuf, srcbuf, len); *pdstbuf += len; return (len); } static int cbuf_copier (cbuf_t src, cbuf_t dst, int len, int *ndropped) { /* Copies up to [len] bytes from the [src] cbuf into the [dst] cbuf. * Returns the number of bytes copied, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ int ncopy, nfree, nleft, nrepl, n; int i_src, i_dst; assert (src != NULL); assert (dst != NULL); assert (len > 0); assert (cbuf_mutex_is_locked (src)); assert (cbuf_mutex_is_locked (dst)); /* Bound len by the number of bytes available. */ len = MIN (len, src->used); if (len == 0) { return (0); } /* Attempt to grow dst cbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += cbuf_grow (dst, len - nfree); } /* Compute number of bytes to effectively copy to dst cbuf. */ if (dst->overwrite == CBUF_NO_DROP) { len = MIN (len, dst->size - dst->used); if (len == 0) { errno = ENOSPC; return (-1); } } else if (dst->overwrite == CBUF_WRAP_ONCE) { len = MIN (len, dst->size); } /* Compute number of bytes that will be overwritten in dst cbuf. */ if (ndropped) { *ndropped = MAX (0, len - dst->size + dst->used); } /* Compute number of bytes to physically copy to dst cbuf. This prevents * copying data that will overwritten if the cbuf wraps multiple times. */ ncopy = len; i_src = src->i_out; i_dst = dst->i_in; if (ncopy > dst->size) { n = ncopy - dst->size; i_src = (i_src + n) % (src->size + 1); ncopy -= n; } /* Copy data from src cbuf to dst cbuf. */ nleft = ncopy; while (nleft > 0) { n = MIN (((src->size + 1) - i_src), ((dst->size + 1) - i_dst)); n = MIN (n, nleft); memcpy (&dst->data[i_dst], &src->data[i_src], n); i_src = (i_src + n) % (src->size + 1); i_dst = (i_dst + n) % (dst->size + 1); nleft -= n; } /* Update dst cbuf metadata. */ if (ncopy > 0) { nrepl = (dst->i_out - dst->i_rep + (dst->size + 1)) % (dst->size + 1); dst->used = MIN (dst->used + ncopy, dst->size); assert (i_dst == (dst->i_in + ncopy) % (dst->size + 1)); dst->i_in = i_dst; if (ncopy > nfree - nrepl) { dst->got_wrap = 1; dst->i_rep = (dst->i_in + 1) % (dst->size + 1); } if (ncopy > nfree) { dst->i_out = dst->i_rep; } } return (len); } static int cbuf_dropper (cbuf_t cb, int len) { /* Discards exactly [len] bytes of unread data from [cb]. * Returns the number of bytes dropped. */ assert (cb != NULL); assert (len > 0); assert (len <= cb->used); assert (cbuf_mutex_is_locked (cb)); cb->used -= len; cb->i_out = (cb->i_out + len) % (cb->size + 1); /* Attempt to shrink cbuf if possible. */ if ((cb->size - cb->used > CBUF_CHUNK) && (cb->size > cb->minsize)) { cbuf_shrink (cb); } /* Don't call me clumsy, don't call me a fool. * When things fall down on me, I'm following the rule. */ return (len); } static int cbuf_reader (cbuf_t src, int len, cbuf_iof putf, void *dst) { /* Reads up to [len] bytes from [src] into the object pointed at by [dst]. * The I/O function [putf] specifies how data is written into [dst]. * Returns the number of bytes read, or -1 on error (with errno set). * Note that [dst] is a value-result parameter and will be "moved forward" * by the number of bytes written into it. */ int nleft, n, m; int i_src; assert (src != NULL); assert (len > 0); assert (putf != NULL); assert (dst != NULL); assert (cbuf_mutex_is_locked (src)); /* Bound len by the number of bytes available. */ len = MIN (len, src->used); if (len == 0) { return (0); } /* Copy data from src cbuf to dst obj. Do the cbuf hokey-pokey and * wrap-around the buffer at most once. Break out if putf() returns * either an ERR or a short count. */ i_src = src->i_out; nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (src->size + 1) - i_src); m = putf (&src->data[i_src], dst, n); if (m > 0) { nleft -= m; i_src = (i_src + m) % (src->size + 1); } if (n != m) { break; /* got ERR or "short" putf() */ } } /* Compute number of bytes written to dst obj. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the ERR reported by putf(). */ if (n == 0) { return (m); } return (n); } static int cbuf_replayer (cbuf_t src, int len, cbuf_iof putf, void *dst) { /* Replays up to [len] bytes from [src] into the object pointed at by [dst]. * The I/O function [putf] specifies how data is written into [dst]. * Returns the number of bytes replayed, or -1 on error (with errno set). * Note that [dst] is a value-result parameter and will be "moved forward" * by the number of bytes written into it. */ int nleft, n, m; int i_src; assert (src != NULL); assert (len > 0); assert (putf != NULL); assert (dst != NULL); assert (cbuf_mutex_is_locked (src)); /* Bound len by the number of bytes available. */ n = (src->i_out - src->i_rep + (src->size + 1)) % (src->size + 1); len = MIN (len, n); if (len == 0) { return (0); } /* Copy data from src cbuf to dst obj. Do the cbuf hokey-pokey and * wrap-around the buffer at most once. Break out if putf() returns * either an ERR or a short count. */ i_src = (src->i_out - len + (src->size + 1)) % (src->size + 1); nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (src->size + 1) - i_src); m = putf (&src->data[i_src], dst, n); if (m > 0) { nleft -= m; i_src = (i_src + m) % (src->size + 1); } if (n != m) { break; /* got ERR or "short" putf() */ } } /* Compute number of bytes written to dst obj. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the ERR reported by putf(). */ if (n == 0) { return (m); } return (n); } static int cbuf_writer (cbuf_t dst, int len, cbuf_iof getf, void *src, int *ndropped) { /* Writes up to [len] bytes from the object pointed at by [src] into [dst]. * The I/O function [getf] specifies how data is read from [src]. * Returns the number of bytes written, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. * Note that [src] is a value-result parameter and will be "moved forward" * by the number of bytes read from it. */ int nfree, nleft, nrepl, n, m; int i_dst; assert (dst != NULL); assert (len > 0); assert (getf != NULL); assert (src != NULL); assert (cbuf_mutex_is_locked (dst)); /* Attempt to grow dst cbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += cbuf_grow (dst, len - nfree); } /* Compute number of bytes to write to dst cbuf. */ if (dst->overwrite == CBUF_NO_DROP) { len = MIN (len, dst->size - dst->used); if (len == 0) { errno = ENOSPC; return (-1); } } else if (dst->overwrite == CBUF_WRAP_ONCE) { len = MIN (len, dst->size); } /* Copy data from src obj to dst cbuf. Do the cbuf hokey-pokey and * wrap-around the buffer as needed. Break out if getf() returns * either an EOF/ERR or a short count. */ i_dst = dst->i_in; nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (dst->size + 1) - i_dst); m = getf (&dst->data[i_dst], src, n); if (m > 0) { nleft -= m; i_dst = (i_dst + m) % (dst->size + 1); } if (n != m) { break; /* got EOF/ERR or "short" getf() */ } } /* Compute number of bytes written to dst cbuf. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the EOF/ERR reported by getf(). */ if (n == 0) { return (m); } /* Update dst cbuf metadata. */ if (n > 0) { nrepl = (dst->i_out - dst->i_rep + (dst->size + 1)) % (dst->size + 1); dst->used = MIN (dst->used + n, dst->size); assert (i_dst == (dst->i_in + n) % (dst->size + 1)); dst->i_in = i_dst; if (n > nfree - nrepl) { dst->got_wrap = 1; dst->i_rep = (dst->i_in + 1) % (dst->size + 1); } if (n > nfree) { dst->i_out = dst->i_rep; } } if (ndropped) { *ndropped = MAX (0, n - nfree); } return (n); } static int cbuf_grow (cbuf_t cb, int n) { /* Attempts to grow the circular buffer [cb] by at least [n] bytes. * Returns the number of bytes by which the buffer has grown (which may be * less-than, equal-to, or greater-than the number of bytes requested). */ unsigned char *data; int size_old, size_meta; int m; assert (cb != NULL); assert (n > 0); assert (cbuf_mutex_is_locked (cb)); if (cb->size == cb->maxsize) { return (0); } size_old = cb->size; size_meta = cb->alloc - cb->size; /* size of sentinel & magic cookies */ assert (size_meta > 0); /* Attempt to grow data buffer by multiples of the chunk-size. */ m = cb->alloc + n; m = m + (CBUF_CHUNK - (m % CBUF_CHUNK)); m = MIN (m, (cb->maxsize + size_meta)); assert (m > cb->alloc); data = cb->data; #ifndef NDEBUG data -= CBUF_MAGIC_LEN; /* jump back to what malloc returned */ #endif /* !NDEBUG */ if (!(data = realloc (data, m))) { /* * XXX: Set flag or somesuch to prevent regrowing when out of memory? */ return (0); /* unable to grow data buffer */ } cb->data = data; cb->alloc = m; cb->size = m - size_meta; #ifndef NDEBUG /* A round cookie with one bite out of it looks like a C. * The underflow cookie will have been copied by realloc() if needed. * But the overflow cookie must be rebaked. * Must use memcpy since overflow cookie may not be word-aligned. */ cb->data += CBUF_MAGIC_LEN; /* jump forward past underflow magic */ memcpy (cb->data + cb->size + 1, (void *) &cb->magic, CBUF_MAGIC_LEN); #endif /* !NDEBUG */ /* The memory containing replay and unread data must be contiguous modulo * the buffer size. Additional memory must be inserted between where * new data is written in (i_in) and where replay data starts (i_rep). * If replay data wraps-around the old buffer, move it to the new end * of the buffer so it wraps-around in the same manner. */ if (cb->i_rep > cb->i_in) { n = (size_old + 1) - cb->i_rep; m = (cb->size + 1) - n; memmove (cb->data + m, cb->data + cb->i_rep, n); if (cb->i_out >= cb->i_rep) { cb->i_out += m - cb->i_rep; } cb->i_rep = m; } assert (cbuf_is_valid (cb)); return (cb->size - size_old); } static int cbuf_shrink (cbuf_t cb) { /* XXX: DOCUMENT ME. */ assert (cb != NULL); assert (cbuf_mutex_is_locked (cb)); assert (cbuf_is_valid (cb)); if (cb->size == cb->minsize) { return (0); } if (cb->size - cb->used <= CBUF_CHUNK) { return (0); } /* FIXME: NOT IMPLEMENTED. */ assert (cbuf_is_valid (cb)); return (0); } #ifndef NDEBUG #ifdef WITH_PTHREADS static int cbuf_mutex_is_locked (cbuf_t cb) { /* Returns true if the mutex is locked; o/w, returns false. */ int rc; assert (cb != NULL); rc = pthread_mutex_trylock (&cb->mutex); return (rc == EBUSY ? 1 : 0); } #endif /* WITH_PTHREADS */ #endif /* !NDEBUG */ #ifndef NDEBUG static int cbuf_is_valid (cbuf_t cb) { /* Validates the data structure. All invariants should be tested here. * Returns true if everything is valid; o/w, aborts due to assertion failure. */ int nfree; assert (cb != NULL); assert (cbuf_mutex_is_locked (cb)); assert (cb->data != NULL); assert (cb->magic == CBUF_MAGIC); /* * Must use memcmp since overflow cookie may not be word-aligned. */ assert (memcmp (cb->data - CBUF_MAGIC_LEN, (void *) &cb->magic, CBUF_MAGIC_LEN) == 0); assert (memcmp (cb->data + cb->size + 1, (void *) &cb->magic, CBUF_MAGIC_LEN) == 0); assert (cb->alloc > 0); assert (cb->alloc > cb->size); assert (cb->size > 0); assert (cb->size >= cb->minsize); assert (cb->size <= cb->maxsize); assert (cb->minsize > 0); assert (cb->maxsize > 0); assert (cb->used >= 0); assert (cb->used <= cb->size); assert (cb->overwrite == CBUF_NO_DROP || cb->overwrite == CBUF_WRAP_ONCE || cb->overwrite == CBUF_WRAP_MANY); assert (cb->got_wrap || !cb->i_rep);/* i_rep = 0 if data has not wrapped */ assert (cb->i_in >= 0); assert (cb->i_in <= cb->size); assert (cb->i_out >= 0); assert (cb->i_out <= cb->size); assert (cb->i_rep >= 0); assert (cb->i_rep <= cb->size); if (cb->i_in >= cb->i_out) { assert ((cb->i_rep > cb->i_in) || (cb->i_rep <= cb->i_out)); } else /* if (cb->in < cb->i_out) */ { assert ((cb->i_rep > cb->i_in) && (cb->i_rep <= cb->i_out)); } nfree = (cb->i_out - cb->i_in - 1 + (cb->size + 1)) % (cb->size + 1); assert (cb->size - cb->used == nfree); return (1); } #endif /* !NDEBUG */ freeipmi-1.6.4/common/miscutil/cbuf.h0000644002055400205540000003222213527331635017474 0ustar00achuachu00000000000000/***************************************************************************** * $Id: cbuf.h,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef LSD_CBUF_H #define LSD_CBUF_H /***************************************************************************** * Notes *****************************************************************************/ /* * Cbuf is a circular-buffer capable of dynamically resizing itself. * Unread data in the buffer will be overwritten once the cbuf has * reached its maximum size or is unable to allocate additional memory. * * The CBUF_OPT_OVERWRITE option specifies how unread cbuf data will * be overwritten. If set to CBUF_NO_DROP, unread data will never be * overwritten; writes into the cbuf will return -1 with ENOSPC. If set * to CBUF_WRAP_ONCE, a single write operation will wrap-around the buffer * at most once, and up to cbuf_used() bytes of data may be overwritten. * If set to CBUF_WRAP_MANY, a single write operation will wrap-around the * buffer as many times as needed in order to write all of the data. * * If NDEBUG is not defined, internal debug code will be enabled. This is * intended for development use only and production code should define NDEBUG. * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find an external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an * error message to stderr. This macro may be redefined to invoke another * routine instead. * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. */ /***************************************************************************** * Data Types *****************************************************************************/ typedef struct cbuf * cbuf_t; /* circular-buffer opaque data type */ typedef enum { /* cbuf option names */ CBUF_OPT_OVERWRITE } cbuf_opt_t; typedef enum { /* CBUF_OPT_OVERWRITE values: */ CBUF_NO_DROP, /* -never drop data, ENOSPC if full */ CBUF_WRAP_ONCE, /* -drop data, wrapping at most once */ CBUF_WRAP_MANY /* -drop data, wrapping as needed */ } cbuf_overwrite_t; /***************************************************************************** * Functions *****************************************************************************/ cbuf_t cbuf_create (int minsize, int maxsize); /* * Creates and returns a new circular buffer, or lsd_nomem_error() on failure. * The buffer is initially allocated to hold [minsize] bytes of data, * but can attempt to grow up to [maxsize] bytes before overwriting data. * Set minsize = maxsize to prevent cbuf from dynamically resizing itself. * The default overwrite option behavior is CBUF_WRAP_MANY. * Abandoning a cbuf without calling cbuf_destroy() will cause a memory leak. */ void cbuf_destroy (cbuf_t cb); /* * Destroys the circular buffer [cb]. */ void cbuf_flush (cbuf_t cb); /* * Flushes all data (including replay data) in [cb]. */ int cbuf_size (cbuf_t cb); /* * Returns the maximum size of the buffer allocated to [cb] * (ie, the number of bytes it can currently hold). */ int cbuf_free (cbuf_t cb); /* * Returns the number of bytes in [cb] available for writing before unread * data is overwritten (assuming the cbuf can resize itself if needed). */ int cbuf_used (cbuf_t cb); /* * Returns the number of bytes in [cb] available for reading. */ int cbuf_lines_used (cbuf_t cb); /* * Returns the number of lines in [cb] available for reading. */ int cbuf_reused (cbuf_t cb); /* * Returns the number of bytes in [cb] available for replaying/rewinding. */ int cbuf_lines_reused (cbuf_t cb); /* * Returns the number of lines in [cb] available for replaying/rewinding. */ int cbuf_is_empty (cbuf_t cb); /* * Returns non-zero if [cb] is empty; o/w, returns zero. */ int cbuf_opt_get (cbuf_t cb, cbuf_opt_t name, int *value); /* * Gets the [name] option for [cb] and sets [value] to the result. * Returns 0 on success, or -1 on error (with errno set). */ int cbuf_opt_set (cbuf_t cb, cbuf_opt_t name, int value); /* * Sets the [name] option for [cb] to [value]. * Returns 0 on success, or -1 on error (with errno set). */ int cbuf_drop (cbuf_t src, int len); /* * Discards up to [len] bytes of unread data from [src]; * if [len] is -1, all unread data will be dropped. * Dropped data is still available via the replay buffer. * Returns the number of bytes dropped, or -1 on error (with errno set). */ int cbuf_peek (cbuf_t src, void *dstbuf, int len); /* * Reads up to [len] bytes of data from the [src] cbuf into [dstbuf], * but does not consume the data read from the cbuf. * The "peek" can be committed to the cbuf via a call to cbuf_drop(), * but the peek+drop combination is not atomic. * Returns the number of bytes read, or -1 on error (with errno set). */ int cbuf_read (cbuf_t src, void *dstbuf, int len); /* * Reads up to [len] bytes of data from the [src] cbuf into [dstbuf]. * Returns the number of bytes read, or -1 on error (with errno set). */ int cbuf_replay (cbuf_t src, void *dstbuf, int len); /* * Replays up to [len] bytes of previously read data from the [src] cbuf * into [dstbuf]. * Returns the number of bytes replayed, or -1 on error (with errno set). */ int cbuf_rewind (cbuf_t src, int len); /* * Rewinds [src] by up to [len] bytes, placing previously read data back in * the unread data buffer; if [len] is -1, all replay data will be rewound. * Returns the number of bytes rewound, or -1 on error (with errno set). */ int cbuf_write (cbuf_t dst, void *srcbuf, int len, int *ndropped); /* * Writes up to [len] bytes of data from [srcbuf] into the [dst] cbuf * according to dst's CBUF_OPT_OVERWRITE behavior. * Returns the number of bytes written, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int cbuf_drop_line (cbuf_t src, int len, int lines); /* * Discards the specified [lines] of data from [src]. If [lines] is -1, * discards the maximum number of lines comprised of up to [len] characters. * Dropped data is still available via the replay buffer. * Returns the number of bytes dropped, or -1 on error (with errno set). * Returns 0 if the number of lines is not available (ie, all or none). */ int cbuf_peek_line (cbuf_t src, char *dstbuf, int len, int lines); /* * Reads the specified [lines] of data from the [src] cbuf into [dstbuf], * but does not consume the data read from the cbuf. If [lines] is -1, * reads the maximum number of lines that [dstbuf] can hold. The buffer * will be NUL-terminated and contain at most ([len] - 1) characters. * The "peek" can be committed to the cbuf via a call to cbuf_drop(), * but the peek+drop combination is not atomic. * Returns strlen of the line(s) on success; truncation occurred if >= [len]. * Returns 0 if the number of lines is not available (ie, all or none). * Returns -1 on error (with errno set). */ int cbuf_read_line (cbuf_t src, char *dstbuf, int len, int lines); /* * Reads the specified [lines] of data from the [src] cbuf into [dstbuf]. * If [lines] is -1, reads the maximum number of lines that [dstbuf] * can hold. The buffer will be NUL-terminated and contain at most * ([len] - 1) characters. * Returns strlen of the line(s) on success; truncation occurred if >= [len], * in which case excess line data is discarded. Returns 0 if the number * of lines is not available (ie, all or none), in which case no data is * consumed. Returns -1 on error (with errno set). */ int cbuf_replay_line (cbuf_t src, char *dstbuf, int len, int lines); /* * Replays the specified [lines] of data from the [src] cbuf into [dstbuf]. * If [lines] is -1, replays the maximum number of lines that [dstbuf] * can hold. A newline will be appended to [dstbuf] if the last (ie, most * recently read) line does not contain a trailing newline. The buffer * will be NUL-terminated and contain at most ([len] - 1) characters. * Returns strlen of the line(s) on success; truncation occurred if >= [len]. * Returns 0 if the number of lines is not available (ie, all or none). * Returns -1 on error (with errno set). */ int cbuf_rewind_line (cbuf_t src, int len, int lines); /* * Rewinds [src] by the specified [lines] of data, placing previously read * data back in the unread data buffer. If [lines] is -1, rewinds the * maximum number of lines comprised of up to [len] characters. * Returns the number of bytes rewound, or -1 on error (with errno set). * Returns 0 if the number of lines is not available (ie, all or none). */ int cbuf_write_line (cbuf_t dst, char *srcbuf, int *ndropped); /* * Writes the entire NUL-terminated [srcbuf] string into the [dst] cbuf * according to dst's CBUF_OPT_OVERWRITE behavior. A newline will be * appended to the cbuf if [srcbuf] does not contain a trailing newline. * Returns the number of bytes written, or -1 or error (with errno set). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int cbuf_peek_to_fd (cbuf_t src, int dstfd, int len); /* * Reads up to [len] bytes of data from the [src] cbuf into the file * referenced by the [dstfd] file descriptor, but does not consume the * data read from the cbuf. If [len] is -1, it will be set to the number * of [src] bytes available for reading. * The "peek" can be committed to the cbuf via a call to cbuf_drop(), * but the peek+drop combination is not atomic. * Returns the number of bytes read, or -1 on error (with errno set). */ int cbuf_read_to_fd (cbuf_t src, int dstfd, int len); /* * Reads up to [len] bytes of data from the [src] cbuf into the file * referenced by the [dstfd] file descriptor. If [len] is -1, it will * be set to the number of [src] bytes available for reading. * Returns the number of bytes read, or -1 on error (with errno set). */ int cbuf_replay_to_fd (cbuf_t src, int dstfd, int len); /* * Replays up to [len] bytes of previously read data from the [src] cbuf into * the file referenced by the [dstfd] file descriptor. If [len] is -1, it * will be set to the maximum number of [src] bytes available for replay. * Returns the number of bytes replayed, or -1 on error (with errno set). */ int cbuf_write_from_fd (cbuf_t dst, int srcfd, int len, int *ndropped); /* * Writes up to [len] bytes of data from the file referenced by the * [srcfd] file descriptor into the [dst] cbuf according to dst's * CBUF_OPT_OVERWRITE behavior. If [len] is -1, it will be set to * an appropriate chunk size. * Returns the number of bytes written, 0 on EOF, or -1 on error (with errno). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int cbuf_copy (cbuf_t src, cbuf_t dst, int len, int *ndropped); /* * Copies up to [len] bytes of data from the [src] cbuf into the [dst] cbuf * according to dst's CBUF_OPT_OVERWRITE behavior. If [len] is -1, * it will be set to the number of [src] bytes available for reading. * Returns the number of bytes copied, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ int cbuf_move (cbuf_t src, cbuf_t dst, int len, int *ndropped); /* * Moves up to [len] bytes of data from the [src] cbuf into the [dst] cbuf * according to dst's CBUF_OPT_OVERWRITE behavior. If [len] is -1, * it will be set to the number of [src] bytes available for reading. * Returns the number of bytes moved, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ #endif /* !LSD_CBUF_H */ freeipmi-1.6.4/common/miscutil/conffile.c0000644002055400205540000005711713527331635020347 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: conffile.c,v 1.39 2010-02-02 00:01:53 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155699 * * This file is part of Whatsup, tools and libraries for determining up and * down nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Whatsup is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * Whatsup is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Whatsup. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include "conffile.h" #include "fd.h" #define CONFFILE_MAGIC 0x0a1b2c3d /* struct conffile * * structure for conffile handle. * - magic - magic number * - errnum - error code * - options - options array passed in conffile_parse() * - options_len - options length passed in conffile_parse() * - app_ptr - app_ptr passed in conffile_parse() * - app_data - app_data passed in conffile_parse() * - flags - flags passed in conffile_parse() * - line_num - line number, does not count continuation lines * - line_count - line number, counting continuation lines * - end_of_file - flag indicating if we've read EOF * - optionname - the current option name read from the conf file */ struct conffile { int magic; int errnum; int fd; struct conffile_option *options; int options_len; void *app_ptr; int app_data; int flags; int line_num; int line_count; int end_of_file; char optionname[CONFFILE_MAX_OPTIONNAMELEN]; }; static char *_errmsg[] = { "success", "unknown configuration option \"%s\" on line %d", "configuration option \"%s\" listed too many times", "configuration option \"%s\" listed too few times", "overflow line length on line %d", "overflow option name length on line %d", "overflow arg length on line %d", "missing argument for option \"%s\" on line %d", "too many arguments listed for option \"%s\" on line %d", "invalid argument listed for option \"%s\" on line %d", "quotation marks used improperly on line %d", "continuation character '\\' used improperly on line %d", "callback function generated error", "configuration file does not exist", "configuration file cannot be opened", "configuration file read error", "out of memory", "invalid parameters", "incorrect magic number", "null handle", "internal error", "error number out of range" }; conffile_t conffile_handle_create(void) { conffile_t cf; if ((cf = (conffile_t)malloc(sizeof(struct conffile))) == NULL) return NULL; cf->magic = CONFFILE_MAGIC; cf->errnum = CONFFILE_ERR_SUCCESS; cf->fd = -1; return cf; } int conffile_handle_destroy(conffile_t cf) { if (cf == NULL || cf->magic != CONFFILE_MAGIC) return -1; cf->magic = ~CONFFILE_MAGIC; free(cf); return 0; } int conffile_errnum(conffile_t cf) { if (cf == NULL) return CONFFILE_ERR_NULLHANDLE; else if (cf->magic != CONFFILE_MAGIC) return CONFFILE_ERR_MAGIC; else return cf->errnum; } int conffile_errmsg(conffile_t cf, char *buf, int buflen) { int rv; char errbuf[CONFFILE_MAX_ERRMSGLEN]; if (cf == NULL) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, "%s", _errmsg[CONFFILE_ERR_NULLHANDLE]); else if (cf->magic != CONFFILE_MAGIC) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, "%s", _errmsg[CONFFILE_ERR_MAGIC]); else if (cf->errnum < CONFFILE_ERR_SUCCESS || cf->errnum > CONFFILE_ERR_ERRNUMRANGE) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, "%s", _errmsg[CONFFILE_ERR_ERRNUMRANGE]); else if (cf->errnum == CONFFILE_ERR_PARSE_OPTION_UNKNOWN || cf->errnum == CONFFILE_ERR_PARSE_ARG_MISSING || cf->errnum == CONFFILE_ERR_PARSE_ARG_TOOMANY || cf->errnum == CONFFILE_ERR_PARSE_ARG_INVALID) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, _errmsg[cf->errnum], cf->optionname, cf->line_num); else if (cf->errnum == CONFFILE_ERR_PARSE_OPTION_TOOMANY || cf->errnum == CONFFILE_ERR_PARSE_OPTION_TOOFEW) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, _errmsg[cf->errnum], cf->optionname); else if (cf->errnum == CONFFILE_ERR_PARSE_OVERFLOW_LINELEN || cf->errnum == CONFFILE_ERR_PARSE_OVERFLOW_OPTIONLEN || cf->errnum == CONFFILE_ERR_PARSE_OVERFLOW_ARGLEN || cf->errnum == CONFFILE_ERR_PARSE_QUOTE || cf->errnum == CONFFILE_ERR_PARSE_CONTINUATION) rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, _errmsg[cf->errnum], cf->line_num); else rv = snprintf(errbuf, CONFFILE_MAX_ERRMSGLEN, "%s", _errmsg[cf->errnum]); if (rv >= buflen) return -1; strcpy(buf, errbuf); return 0; } int conffile_seterrnum(conffile_t cf, int errnum) { if (cf == NULL || cf->magic != CONFFILE_MAGIC) return -1; if (errnum < CONFFILE_ERR_SUCCESS || errnum > CONFFILE_ERR_ERRNUMRANGE) { cf->errnum = CONFFILE_ERR_PARAMETERS; return -1; } cf->errnum = errnum; return 0; } int conffile_line_number(conffile_t cf) { if (cf == NULL || cf->magic != CONFFILE_MAGIC) return -1; return cf->line_num; } static int _setup(conffile_t cf, const char *filename, struct conffile_option *options, int options_len, void *app_ptr, int app_data, int flags) { int i; /* If it doesn't exist for real or can't be read, we consider it * non-existant */ if (access(filename, R_OK) < 0) { cf->errnum = CONFFILE_ERR_EXIST; return -1; } if ((cf->fd = open(filename, O_RDONLY)) < 0) { cf->errnum = CONFFILE_ERR_OPEN; return -1; } cf->options = options; cf->options_len = options_len; for (i = 0; i < options_len; i++) { if (cf->options[i].count_ptr) *cf->options[i].count_ptr = 0; } cf->app_ptr = app_ptr; cf->app_data = app_data; cf->flags = flags; cf->line_num = 0; cf->line_count = 0; cf->end_of_file = 0; memset(cf->optionname, '\0', CONFFILE_MAX_OPTIONNAMELEN); cf->errnum = CONFFILE_ERR_SUCCESS; return 0; } static int _remove_trailing_whitespace(conffile_t cf, char *linebuf, int linebuflen) { char *temp; temp = linebuf + linebuflen; for (--temp; temp >= linebuf; temp--) { if (isspace(*temp)) *temp = '\0'; else break; linebuflen--; } return linebuflen; } static int _remove_comments(conffile_t cf, char *linebuf, int linebuflen) { int i, newlen, previous_is_escape = 0, comment_remaining_buf = 0; /* Cannot do check like the following: * * if (linebuf[i] == '#' && linebuf[i-1] != '\\') * * Would fail on parse situation such as the following: * * \\# * */ i = 0; newlen = linebuflen; while (i < linebuflen) { if (comment_remaining_buf) { linebuf[i] = '\0'; newlen--; } else if (linebuf[i] == '\\' && previous_is_escape == 0) previous_is_escape++; else if (linebuf[i] == '#' && previous_is_escape == 0) { linebuf[i] = '\0'; comment_remaining_buf++; newlen--; } else if (previous_is_escape > 0) previous_is_escape = 0; i++; } return newlen; } static int _readline(conffile_t cf, char *linebuf, int linebuflen) { int ret, len = 0; int continuation = 0; char buf[CONFFILE_MAX_LINELEN]; if (linebuflen < CONFFILE_MAX_LINELEN) { cf->errnum = CONFFILE_ERR_INTERNAL; return -1; } cf->line_num = cf->line_count + 1; while (1) { ret = fd_read_line(cf->fd, buf, CONFFILE_MAX_LINELEN); if (ret < 0) { cf->errnum = CONFFILE_ERR_READ; return -1; } if (ret == 0) { /* Ok to break here. All continuation characters and * comments taken care of earlier */ cf->end_of_file++; break; } /* MAX_LINELEN - 1 b/c fd_read_line guarantees null termination */ if (ret >= (CONFFILE_MAX_LINELEN-1)) { cf->errnum = CONFFILE_ERR_PARSE_OVERFLOW_LINELEN; return -1; } if ((ret + len) >= linebuflen) { cf->errnum = CONFFILE_ERR_PARSE_OVERFLOW_LINELEN; return -1; } cf->line_count++; memcpy(linebuf + len, buf, ret); len += ret; len = _remove_trailing_whitespace(cf, linebuf, len); if (len == 0) { cf->line_num = cf->line_count + 1; continue; } if ((len = _remove_comments(cf, linebuf, len)) < 0) return -1; if (len == 0) { cf->line_num = cf->line_count + 1; continue; } /* Need to call a second time, for following case * * optionname arg1 \ # my comment * * ^^^^ need to remove this whitespace */ len = _remove_trailing_whitespace(cf, linebuf, len); if (len == 0) { cf->line_num = cf->line_count + 1; continue; } if (linebuf[len-1] == '\\') { continuation++; linebuf[len-1] = '\0'; len--; continue; } else break; } return len; } static char * _move_past_whitespace(conffile_t cf, char *linebuf) { while (*linebuf != '\0' && isspace(*linebuf)) linebuf++; if (*linebuf == '\0') return NULL; return linebuf; } int _parse_args(conffile_t cf, char *linebuf, char args[CONFFILE_MAX_ARGS][CONFFILE_MAX_ARGLEN]) { int quote_flag, numargs = 0; while (1) { int arglen = 0; /* Following is needed for the following corner case * * optionname1 arg \ * * optionname2 arg * * In other words, a continuation character is used, but * there is no data on the next line. There may be * remaining whitespace. */ if ((linebuf = _move_past_whitespace(cf, linebuf)) == NULL) break; quote_flag = 0; memset(args[numargs], '\0', CONFFILE_MAX_ARGLEN); while (*linebuf != '\0' && (quote_flag == 1 || !isspace(*linebuf))) { if (*linebuf == '"') { quote_flag = !quote_flag; linebuf++; continue; } /* All continuation character parse errors should be * discovered by _readline and _remove_comments. But * we'll check again just in case. */ if (*linebuf == '\\') { linebuf++; if (*linebuf != '\\' && *linebuf != '#' && *linebuf != '"') { cf->errnum = CONFFILE_ERR_PARSE_CONTINUATION; return -1; } } args[numargs][arglen] = *linebuf; linebuf++; arglen++; /* minus one to guarantee null termination */ if (arglen == (CONFFILE_MAX_ARGLEN-1)) { cf->errnum = CONFFILE_ERR_PARSE_OVERFLOW_ARGLEN; return -1; } } if (quote_flag > 0) { cf->errnum = CONFFILE_ERR_PARSE_QUOTE; return -1; } numargs++; if (*linebuf == '\0') break; } return numargs; } static int _parseline(conffile_t cf, char *linebuf, int linebuflen) { int i, optionlen, rv, numargs = 0; char args[CONFFILE_MAX_ARGS][CONFFILE_MAX_ARGLEN]; struct conffile_option *option = NULL; struct conffile_data data; char *ptr; memset(&data, '\0', sizeof(struct conffile_data)); linebuflen = _remove_trailing_whitespace(cf, linebuf, linebuflen); if (linebuflen == 0) return 0; if ((linebuf = _move_past_whitespace(cf, linebuf)) == NULL) return 0; optionlen = 0; memset(cf->optionname, '\0', CONFFILE_MAX_OPTIONNAMELEN); while (optionlen < (CONFFILE_MAX_OPTIONNAMELEN-1) && !isspace(*linebuf) && *linebuf != '\0') { cf->optionname[optionlen++] = *linebuf; linebuf++; } /* minus one to guarantee null termination */ if (optionlen == (CONFFILE_MAX_OPTIONNAMELEN-1)) { cf->errnum = CONFFILE_ERR_PARSE_OVERFLOW_OPTIONLEN; return -1; } for (i = 0; i < cf->options_len; i++) { int rv; if (cf->flags & CONFFILE_FLAG_OPTION_CASESENSITIVE) rv = strcmp(cf->options[i].optionname, cf->optionname); else rv = strcasecmp(cf->options[i].optionname, cf->optionname); if (rv == 0) { option = &(cf->options[i]); break; } } if (option == NULL) { if (cf->flags & CONFFILE_FLAG_OPTION_IGNORE_UNKNOWN) return 0; cf->errnum = CONFFILE_ERR_PARSE_OPTION_UNKNOWN; return -1; } if (option->option_type == CONFFILE_OPTION_IGNORE) return 0; (*option->count_ptr)++; if (option->max_count > 0) { if ((*option->count_ptr) > option->max_count) { cf->errnum = CONFFILE_ERR_PARSE_OPTION_TOOMANY; return -1; } } if ((linebuf = _move_past_whitespace(cf, linebuf)) != NULL) { if ((numargs = _parse_args(cf, linebuf, args)) < 0) return -1; } /* Argument checks */ if (option->option_type == CONFFILE_OPTION_FLAG && numargs != 0) { cf->errnum = CONFFILE_ERR_PARSE_ARG_TOOMANY; return -1; } if (((option->option_type == CONFFILE_OPTION_BOOL || option->option_type == CONFFILE_OPTION_INT || option->option_type == CONFFILE_OPTION_DOUBLE || option->option_type == CONFFILE_OPTION_STRING || option->option_type == CONFFILE_OPTION_LIST_INT || option->option_type == CONFFILE_OPTION_LIST_DOUBLE || option->option_type == CONFFILE_OPTION_LIST_STRING) && numargs == 0)) { cf->errnum = CONFFILE_ERR_PARSE_ARG_MISSING; return -1; } if (((option->option_type == CONFFILE_OPTION_BOOL || option->option_type == CONFFILE_OPTION_INT || option->option_type == CONFFILE_OPTION_DOUBLE || option->option_type == CONFFILE_OPTION_STRING) && numargs > 1)) { cf->errnum = CONFFILE_ERR_PARSE_ARG_TOOMANY; return -1; } if ((option->option_type == CONFFILE_OPTION_LIST_INT || option->option_type == CONFFILE_OPTION_LIST_DOUBLE || option->option_type == CONFFILE_OPTION_LIST_STRING) && ((int)option->option_type_arg) > 0 && numargs != ((int)option->option_type_arg)) { if (numargs < ((int)option->option_type_arg)) cf->errnum = CONFFILE_ERR_PARSE_ARG_MISSING; else cf->errnum = CONFFILE_ERR_PARSE_ARG_TOOMANY; return -1; } if (option->option_type == CONFFILE_OPTION_BOOL) { if (strcmp(args[0], "1") != 0 && strcmp(args[0], "0") != 0 && strcasecmp(args[0], "y") != 0 && strcasecmp(args[0], "n") != 0 && strcasecmp(args[0], "yes") != 0 && strcasecmp(args[0], "no") != 0 && strcasecmp(args[0], "on") != 0 && strcasecmp(args[0], "off") != 0 && strcasecmp(args[0], "t") != 0 && strcasecmp(args[0], "f") != 0 && strcasecmp(args[0], "true") != 0 && strcasecmp(args[0], "false") != 0 && strcasecmp(args[0], "enable") != 0 && strcasecmp(args[0], "disable") != 0) { cf->errnum = CONFFILE_ERR_PARSE_ARG_INVALID; return -1; } } /* Calculate Data */ if (option->option_type == CONFFILE_OPTION_BOOL) { if (!strcmp(args[0], "1") || !strcasecmp(args[0], "y") || !strcasecmp(args[0], "yes") || !strcasecmp(args[0], "on") || !strcasecmp(args[0], "t") || !strcasecmp(args[0], "true") || !strcasecmp(args[0], "enable")) data.boolval = 1; else data.boolval = 0; } else if (option->option_type == CONFFILE_OPTION_INT) { errno = 0; data.intval = strtol(args[0], &ptr, 0); if (errno || (args[0] + strlen(args[0])) != ptr) { cf->errnum = CONFFILE_ERR_PARSE_ARG_INVALID; return -1; } } else if (option->option_type == CONFFILE_OPTION_DOUBLE) { errno = 0; data.doubleval = strtod(args[0], &ptr); if (errno || (args[0] + strlen(args[0])) != ptr) { cf->errnum = CONFFILE_ERR_PARSE_ARG_INVALID; return -1; } } else if (option->option_type == CONFFILE_OPTION_STRING) { strncpy(data.string, args[0], CONFFILE_MAX_ARGLEN); data.string[CONFFILE_MAX_ARGLEN - 1] = '\0'; } else if (option->option_type == CONFFILE_OPTION_LIST_INT) { int i; for (i = 0; i < numargs; i++) { errno = 0; data.intlist[i] = strtol(args[i], &ptr, 0); if (errno || (args[i] + strlen(args[i])) != ptr) { cf->errnum = CONFFILE_ERR_PARSE_ARG_INVALID; return -1; } } data.intlist_len = numargs; } else if (option->option_type == CONFFILE_OPTION_LIST_DOUBLE) { int i; for (i = 0; i < numargs; i++) { errno = 0; data.doublelist[i] = strtod(args[i], &ptr); if (errno || (args[i] + strlen(args[i])) != ptr) { cf->errnum = CONFFILE_ERR_PARSE_ARG_INVALID; return -1; } } data.doublelist_len = numargs; } else if (option->option_type == CONFFILE_OPTION_LIST_STRING) { int i; for (i = 0; i < numargs; i++) { strncpy(data.stringlist[i], args[i], CONFFILE_MAX_ARGLEN); data.stringlist[i][CONFFILE_MAX_ARGLEN - 1] = '\0'; } data.stringlist_len = numargs; } cf->errnum = CONFFILE_ERR_SUCCESS; if (option->callback_func) { rv = (option->callback_func)(cf, &data, option->optionname, option->option_type, option->option_ptr, option->option_data, cf->app_ptr, cf->app_data); if (rv < 0) { if (cf->errnum == CONFFILE_ERR_SUCCESS) cf->errnum = CONFFILE_ERR_PARSE_CALLBACK; return -1; } } return 0; } int conffile_parse(conffile_t cf, const char *filename, struct conffile_option *options, int options_len, void *app_ptr, int app_data, int flags) { int i, temp, len = 0, retval = -1; char linebuf[CONFFILE_MAX_LINELEN]; if (cf == NULL || cf->magic != CONFFILE_MAGIC) return -1; if (options == NULL || options_len <= 0) { cf->errnum = CONFFILE_ERR_PARAMETERS; return -1; } /* Ensure option array is legitimate */ for (i = 0; i < options_len; i++) { if (options[i].optionname == NULL || strlen(options[i].optionname) >= CONFFILE_MAX_OPTIONNAMELEN || options[i].option_type < CONFFILE_OPTION_IGNORE || options[i].option_type > CONFFILE_OPTION_LIST_STRING || ((options[i].option_type != CONFFILE_OPTION_IGNORE && options[i].option_type != CONFFILE_OPTION_FLAG) && options[i].callback_func == NULL) || ((options[i].option_type == CONFFILE_OPTION_LIST_INT || options[i].option_type == CONFFILE_OPTION_LIST_DOUBLE || options[i].option_type == CONFFILE_OPTION_LIST_STRING) && ((int)options[i].option_type_arg) == 0) || options[i].required_count < 0 || (options[i].option_type != CONFFILE_OPTION_IGNORE && options[i].count_ptr == NULL)) { cf->errnum = CONFFILE_ERR_PARAMETERS; return -1; } } /* Ensure flags are appropriate */ temp = flags; temp &= ~CONFFILE_FLAG_OPTION_CASESENSITIVE; temp &= ~CONFFILE_FLAG_OPTION_IGNORE_UNKNOWN; if (temp) { cf->errnum = CONFFILE_ERR_PARAMETERS; return -1; } if (_setup(cf, filename, options, options_len, app_ptr, app_data, flags) < 0) goto cleanup; while (cf->end_of_file == 0 && (len = _readline(cf, linebuf, CONFFILE_MAX_LINELEN)) > 0) { if (_parseline(cf, linebuf, len) < 0) goto cleanup; } if (len < 0) goto cleanup; cf->line_num = 0; /* Check required counts */ for (i = 0; i < cf->options_len; i++) { if (cf->options[i].count_ptr == NULL) continue; if ((*cf->options[i].count_ptr) < cf->options[i].required_count) { strcpy(cf->optionname, cf->options[i].optionname); cf->errnum = CONFFILE_ERR_PARSE_OPTION_TOOFEW; goto cleanup; } } cf->errnum = CONFFILE_ERR_SUCCESS; retval = 0; cleanup: /* ignore potential error, just return result to user */ close(cf->fd); return retval; } CONFFILE_OPTION_FUNC(conffile_empty) { return 0; } CONFFILE_OPTION_FUNC(conffile_bool) { if (option_ptr == NULL) { conffile_seterrnum(cf, CONFFILE_ERR_PARAMETERS); return -1; } *((int *)option_ptr) = data->boolval; return 0; } CONFFILE_OPTION_FUNC(conffile_int) { if (option_ptr == NULL) { conffile_seterrnum(cf, CONFFILE_ERR_PARAMETERS); return -1; } *((int *)option_ptr) = data->intval; return 0; } CONFFILE_OPTION_FUNC(conffile_double) { if (option_ptr == NULL) { conffile_seterrnum(cf, CONFFILE_ERR_PARAMETERS); return -1; } *((double *)option_ptr) = data->doubleval; return 0; } CONFFILE_OPTION_FUNC(conffile_string) { if (option_ptr == NULL || option_data <= 0) { conffile_seterrnum(cf, CONFFILE_ERR_PARAMETERS); return -1; } strncpy((char *)option_ptr, data->string, option_data); ((char *)option_ptr)[option_data - 1] = '\0'; return 0; } freeipmi-1.6.4/common/miscutil/conffile.h0000644002055400205540000003650213527331635020347 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: conffile.h,v 1.5 2010-02-03 00:43:13 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2011 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155699 * * This file is part of Whatsup, tools and libraries for determining up and * down nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Whatsup is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 2 of the License, or (at your * option) any later version. * * Whatsup is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Whatsup. If not, see . \*****************************************************************************/ #ifndef _CONFFILE_H #define _CONFFILE_H 1 /* * This is a generic configuration file parsing library. Some library * ideas were from libdotconf by Lukas Schroder . * http://www.azzit.de/dotconf/. * * This library parses configuration files in the form: * * optionname arg1 arg2 arg3 ... * * Different option names are listed on different lines. They are * separated from their arguments by whitespace. Each argument is * also separated by whitespace. Options may have a specified or * varying number of arguments, depending on the option's type * specification listed below under "OPTION TYPES" * * Comments can be listed by the '#' sign. The '#' and any characters * to the right of it are ignored. Lines can be continued on the next * line if a '\' character is the last non-whitespace character on a * line. Strings can be quoted using double quotation marks '"'. The * '#', '"', and '\' characters can be escaped using the '\' * character. * * The '#' character takes precedence over the '"' and '\' character in * parsing. For example, the following would be parse errors: * * optionname1 "#" * optionname2 arg1 # my comment \ * arg2 * * The proper way to use the # and \ character are as follows. * * optionname1 "\#" * optionname2 arg1 \ # my comment * arg2 * * A continuation character at the end of a line takes precendence * over escape characters. For example, the following results in a * parse error: * * optioname arg1 arg2 \\ * arg3 arg4 * * It is necessary to use an additional escape character, as follows * * optionname arg1 arg2 \\\ * arg3 arg4 * * The writer of the configuration file is still responsible for white * space between arguments when continuation characters are used. For * example: * * optionname arg1 arg2\ * arg3 * * This example has 2 arguments, "arg1" and "arg2arg3". * * When a parse error with quotes occurs, a PARSE_QUOTE error code is * returned. When a parse error occurs with a '\' character, a * PARSE_CONTINUATION error code is returned. A number of other error * codes can be returned. See ERROR CODES for details. * */ /* OPTION TYPES * * The following are option types an option may take. * * IGNORE - up to MAX_ARGS arguments, will not call a callback function * - useful for deprecating old configuration options * FLAG - no arguments, returns no arguments * BOOL - 1 argument, returns 1 or 0 * - true strings - "1", "y", "yes", "on", "t", "true", "enable" * - false strings- "0", "n", "no" "off", "f", "false", "disable" * INT - 1 argument, returns an integer * DOUBLE - 1 argument, returns a double * STRING - 1 argument, returns a string * LIST_INT - up to MAX_ARGS integer args * LIST_DOUBLE - up to MAX_ARGS double args * LIST_STRING - up to MAX_ARGS string args, each string up to * MAX_ARGLEN in length * * For LIST_INT, LIST_DOUBLE, and LIST_STRING, option_type_arg in * struct conffile_option can be set to the length of the list * desired, or < 0 for a variable length list. For all other option * types option_type_arg will be ignored. * * Callback functions are required for all of the above option types * except for IGNORE and FLAG * * If an argument is missing a PARSE_NO_ARG error is returned. If the * incorrect number of arguments is listed, PARSE_NUM_ARGS is * returned. If an invalid argument is listed, PARSE_INVALID_ARG is * returned. * */ #define CONFFILE_OPTION_IGNORE 0x00 #define CONFFILE_OPTION_FLAG 0x01 #define CONFFILE_OPTION_BOOL 0x02 #define CONFFILE_OPTION_INT 0x03 #define CONFFILE_OPTION_DOUBLE 0x04 #define CONFFILE_OPTION_STRING 0x05 #define CONFFILE_OPTION_LIST_INT 0x06 #define CONFFILE_OPTION_LIST_DOUBLE 0x07 #define CONFFILE_OPTION_LIST_STRING 0x08 /* LENGTHS * * The following are the maximum values and lengths throughout * the conffile parser. */ #define CONFFILE_MAX_LINELEN 32778 #define CONFFILE_MAX_OPTIONNAMELEN 256 #define CONFFILE_MAX_ARGS 64 #define CONFFILE_MAX_ARGLEN 1024 #define CONFFILE_MAX_ERRMSGLEN 1024 /* ERROR CODES * * The following are the error codes that may be returned to the user. * The error codes and strings describing the error codes can be * accessed through conffile_errnum(), conffile_errmsg(), and * conffile_errmsg(). The error code can be set using * conffile_seterrnum(). */ #define CONFFILE_ERR_SUCCESS 0x00 #define CONFFILE_ERR_PARSE_OPTION_UNKNOWN 0x01 #define CONFFILE_ERR_PARSE_OPTION_TOOMANY 0x02 #define CONFFILE_ERR_PARSE_OPTION_TOOFEW 0x03 #define CONFFILE_ERR_PARSE_OVERFLOW_LINELEN 0x04 #define CONFFILE_ERR_PARSE_OVERFLOW_OPTIONLEN 0x05 #define CONFFILE_ERR_PARSE_OVERFLOW_ARGLEN 0x06 #define CONFFILE_ERR_PARSE_ARG_MISSING 0x07 #define CONFFILE_ERR_PARSE_ARG_TOOMANY 0x08 #define CONFFILE_ERR_PARSE_ARG_INVALID 0x09 #define CONFFILE_ERR_PARSE_QUOTE 0x0a #define CONFFILE_ERR_PARSE_CONTINUATION 0x0b #define CONFFILE_ERR_PARSE_CALLBACK 0x0c #define CONFFILE_ERR_EXIST 0x0d #define CONFFILE_ERR_OPEN 0x0e #define CONFFILE_ERR_READ 0x0f #define CONFFILE_ERR_OUTMEM 0x10 #define CONFFILE_ERR_PARAMETERS 0x11 #define CONFFILE_ERR_MAGIC 0x12 #define CONFFILE_ERR_NULLHANDLE 0x13 #define CONFFILE_ERR_INTERNAL 0x14 #define CONFFILE_ERR_ERRNUMRANGE 0x15 #define CONFFILE_IS_PARSE_ERR(x) ((x) >= CONFFILE_ERR_PARSE_OPTION_UNKNOWN \ && (x) <= CONFFILE_ERR_PARSE_CALLBACK) /* FLAGS * * The following flags can be passed to conffile_parse() to alter * behavior of conffile parsing. * * OPTION_CASESENSITIVE - By default option names are case * insensitive. This flag informs the parser * to make option names case sensitive * * OPTION_IGNORE_UNKNOWN - Instead of returning a * CONFFILE_ERR_PARSE_OPTION_UNKNOWN error * when a unknown configuration file option * is found, just ignore it and move on. */ #define CONFFILE_FLAG_OPTION_CASESENSITIVE 0x00000001 #define CONFFILE_FLAG_OPTION_IGNORE_UNKNOWN 0x00000002 /* DATA TYPES */ /* conffile_t * - conffile library handle type */ typedef struct conffile *conffile_t; /* conffile_data * * This stores data from an options arguments and is passed to the * callback function so the data can be read or copied. * * Buffers will be destroyed when parsing has completed, therefore a * callback function should not save pointers, it should copy any data * it wishes to save. */ struct conffile_data { int boolval; int intval; double doubleval; char string[CONFFILE_MAX_ARGLEN]; int intlist[CONFFILE_MAX_ARGS]; int intlist_len; double doublelist[CONFFILE_MAX_ARGS]; int doublelist_len; char stringlist[CONFFILE_MAX_ARGS][CONFFILE_MAX_ARGLEN]; int stringlist_len; }; /* conffile_option_func * * This is the callback function type, functions that are called after * an option name and its potential arguments have been parsed by the * conffile parser. * * 'cf' the conffile handle * 'data' is a pointer to argument data. The data that should be * accessed depends on the option type. * 'optionname' is the option name that was just parsed. * 'option_type' is the option type specified in conffile through a * struct conffile_option type. See below. * 'option_ptr' is a pointer to data specified through a * struct conffile_option type. See below. * 'option_data' is an integer to data specified through a * struct conffile_option type. See below. * 'app_ptr' is a pointer to data specified in conffile_parse(). * 'app_data' is an integer specified in conffile_parse(). * * Typically, the option_ptr and option_data will point to a buffer * and its length to store argument data. The The callback function * then copies data into the buffer from the data pointed at by the * 'data' pointer. However, they may be used for any purpose. * * The app_ptr and app_data are passed via the conffile_parse() * function. Typically, they are used to handle contexts within * the configuration file, but they may be used for any purpose. * * The function should return 0 if the argument was read properly and * the parser should continue parsing. Return -1 if an error has * occurred and you wish the parser to quit. If an error code is set * in a callback function, using conffile_seterrnum(), that errnum * will be passed back to the original caller of conffile_parse(). If * no error code is set, ERR_CALLBACK will be passed back from * conffile_parse(). */ typedef int (*conffile_option_func)(conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data); #define CONFFILE_OPTION_FUNC(func_name) \ int \ func_name(conffile_t cf, \ struct conffile_data *data, \ char *optionname, \ int option_type, \ void *option_ptr, \ int option_data, \ void *app_ptr, \ int app_data) /* conffile_option * * An array of this structure specifies the options to be searched for * in the configuration file. * * 'optionname' is the option name that should be serached for. * 'option_type' is the option type specified in conffile. See * OPTION TYPES above. * 'option_type_arg' argument for the option type. See OPTION TYPES above. * 'callback_func' is the callback function to be called when the * option has been found. * 'max_count' is the maximum number of times this option can be * listed in the configuration file. Typically this is one. If * set to < 0, there is no maximum. * 'required_count' is the required number of times this option should * be listed in the configuration file. Typically this is 0 for not * required, or identical to 'max_count'. * 'count_ptr' points to an integer that will be incremented to the * number of times this option has been listed in the configuration * file. * 'option_ptr' is a pointer to data that will be passed to the callback * function. Typically, a buffer pointer is passed. This parameter * is optional and can be set to NULL. * 'option_data' is an integer that will be passed to the callback * function. Typically this is a buffer length. * */ struct conffile_option { char *optionname; int option_type; int option_type_arg; conffile_option_func callback_func; int max_count; int required_count; int *count_ptr; void *option_ptr; int option_data; }; /* API */ /* conffile_handle_create * * Create a conffile handle. * Returns handle on success, NULL on error. */ conffile_t conffile_handle_create(void); /* conffile_handle_destroy * * Destroy a conffile handle. * Returns 0 on success, -1 on error. */ int conffile_handle_destroy(conffile_t cf); /* conffile_errnum * * Get the most recent error code number. * Returns errnum */ int conffile_errnum(conffile_t cf); /* conffile_errmsg * * Get an error message of the most recent error. When appropriate, * the error message returned in the buffer will include information * on the optionname or line number of the parse error. Returns 0 on * success, -1 if the buffer passed in is not large enough. */ int conffile_errmsg(conffile_t cf, char *buf, int buflen); /* conffile_seterrnum * * Set the error code number in a conffile handle. This is primarily * used in an error handler or callback function to set error codes * when an error has occurred within user space parsing. Returns 0 on * success, -1 if errnum is out of range. */ int conffile_seterrnum(conffile_t cf, int errnum); /* conffile_line_number * * Returns line number currently being parsed, -1 on error. Useful * for error output messages in callback functions. */ int conffile_line_number(conffile_t cf); /* conffile_parse * * Parse a configuration file. * Returns 0 on success, -1 on error. */ int conffile_parse(conffile_t cf, const char *filename, struct conffile_option *options, int options_len, void *app_ptr, int app_data, int flags); /* conffile_empty * * An empty callback function that returns 0. */ CONFFILE_OPTION_FUNC(conffile_empty); /* conffile_bool * * Generic callback function for bools. Assumes option_ptr is a * pointer to an integer, stores the argument, and returns 0. If * option_ptr is NULL, sets errnum to ERR_PARAMETERS, and returns -1. */ CONFFILE_OPTION_FUNC(conffile_bool); /* conffile_int * * Generic callback function for ints. Assumes option_ptr is a * pointer to an integer, stores the argument, and returns 0. If * option_ptr is NULL, sets errnum to ERR_PARAMETERS, and returns -1. */ CONFFILE_OPTION_FUNC(conffile_int); /* conffile_double * * Generic callback function for doubles. Assumes option_ptr is a * pointer to a double, stores the argument, and returns 0. If * option_ptr is NULL, sets errnum to ERR_PARAMETERS, and returns -1. */ CONFFILE_OPTION_FUNC(conffile_double); /* conffile_string * * Generic callback function for strings. Assumes option_ptr is a * pointer to a char buffer and option_data is the buffer's length, * stores the argument, and returns 0. If option_ptr is NULL or * option_data is <= 0, sets errnum to ERR_PARAMETERS, and returns * -1. */ CONFFILE_OPTION_FUNC(conffile_string); #endif /* _CONFFILE_H */ freeipmi-1.6.4/common/miscutil/error.c0000644002055400205540000000547313527331635017711 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: error.c,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu . * UCRL-CODE-155989 All rights reserved. * * This file is part of Cerebro, a collection of cluster monitoring * tools and libraries. For details, see * . * * Cerebro is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with Genders; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "error.h" static char *err_prog = NULL; static int err_flags = 0; static int exit_value = EXIT_FAILURE; #define ERROR_BUFLEN 1024 void err_init(char *prog) { char *p = strrchr(prog, '/'); err_prog = p ? p + 1 : prog; } void err_init_exit_value(int val) { exit_value = val; } int err_get_flags(void) { assert(err_prog); return err_flags; } void err_set_flags(int flags) { assert(err_prog); err_flags = flags; } static void _err(int syslog_level, const char *fmt, va_list ap) { char buf[ERROR_BUFLEN]; assert(err_prog); vsnprintf(buf, ERROR_BUFLEN, fmt, ap); if (err_flags & ERROR_STDOUT) fprintf(stdout, "%s: %s\n", err_prog, buf); if (err_flags & ERROR_STDERR) fprintf(stderr, "%s: %s\n", err_prog, buf); if (err_flags & ERROR_SYSLOG) syslog(syslog_level, "%s", buf); } void err_debug(const char *fmt, ...) { va_list ap; assert(err_prog); va_start(ap, fmt); _err(LOG_DEBUG, fmt, ap); va_end(ap); } void err_output(const char *fmt, ...) { va_list ap; assert(err_prog); va_start(ap, fmt); _err(LOG_ERR, fmt, ap); va_end(ap); } void err_exit(const char *fmt, ...) { va_list ap; assert(err_prog); va_start(ap, fmt); _err(LOG_ERR, fmt, ap); va_end(ap); exit(exit_value); } freeipmi-1.6.4/common/miscutil/error.h0000644002055400205540000000472613527331635017716 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: error.h,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu . * UCRL-CODE-155989 All rights reserved. * * This file is part of Cerebro, a collection of cluster monitoring * tools and libraries. For details, see * . * * Cerebro is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * Cerebro is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with Genders; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ #ifndef _ERROR_H #define _ERROR_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #define ERROR_STDOUT 0x0001 #define ERROR_STDERR 0x0002 #define ERROR_SYSLOG 0x0004 /* * err_init * * Initialize error lib with program name. This is usually the first * thing called from main, and is simply passed argv[0]. */ void err_init(char *prog); /* * err_init_exit_value * * By default, err_exit() exits with 1. Give an alternate value to * exit with. */ void err_init_exit_value(int val); /* * err_get_flags * * Returns the currently set flags */ int err_get_flags(void); /* * err_set_flags * * Sets the error lib flags to 'flags'. */ void err_set_flags(int flags); /* * err_debug * * Output a debug message */ void err_debug(const char *fmt, ...); /* * err_output * * Output an error message */ void err_output(const char *fmt, ...); /* * err_exit * * Output an error message and exit */ void err_exit(const char *fmt, ...); #endif /* _ERROR_H */ freeipmi-1.6.4/common/miscutil/fd.c0000644002055400205540000001377113527331635017151 0ustar00achuachu00000000000000/***************************************************************************** * $Id: fd.c,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * UCRL-CODE-2002-009. * * This file is part of ConMan, a remote console management program. * For details, see . * * ConMan is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * ConMan is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with ConMan; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ***************************************************************************** * Refer to "fd.h" for documentation on public functions. *****************************************************************************/ #if HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "fd.h" /***************************************************************************** * Static Prototypes *****************************************************************************/ static int _fd_get_lock (int fd, int cmd, int type); static pid_t _fd_test_lock (int fd, int type); /***************************************************************************** * Extern I/O Functions *****************************************************************************/ ssize_t fd_read_n (int fd, void *buf, size_t n) { size_t nleft; ssize_t nread; unsigned char *p; p = buf; nleft = n; while (nleft > 0) { if ((nread = read (fd, p, nleft)) < 0) { if (errno == EINTR) continue; else return (-1); } else if (nread == 0) { /* EOF */ break; } nleft -= nread; p += nread; } return (n - nleft); } ssize_t fd_write_n (int fd, void *buf, size_t n) { size_t nleft; ssize_t nwritten; unsigned char *p; p = buf; nleft = n; while (nleft > 0) { if ((nwritten = write (fd, p, nleft)) < 0) { if (errno == EINTR) continue; else return (-1); } nleft -= nwritten; p += nwritten; } return (n); } ssize_t fd_read_line (int fd, void *buf, size_t maxlen) { ssize_t n, rc; unsigned char c, *p; n = 0; p = buf; while (n < maxlen - 1) { /* reserve space for NUL-termination */ if ((rc = read (fd, &c, 1)) == 1) { n++; *p++ = c; if (c == '\n') break; /* store newline, like fgets() */ } else if (rc == 0) { if (n == 0) /* EOF, no data read */ return (0); else /* EOF, some data read */ break; } else { if (errno == EINTR) continue; return (-1); } } *p = '\0'; /* NUL-terminate, like fgets() */ return (n); } /***************************************************************************** * Extern Locking Functions *****************************************************************************/ int fd_get_read_lock (int fd) { return (_fd_get_lock (fd, F_SETLK, F_RDLCK)); } int fd_get_readw_lock (int fd) { return (_fd_get_lock (fd, F_SETLKW, F_RDLCK)); } int fd_get_write_lock (int fd) { return (_fd_get_lock (fd, F_SETLK, F_WRLCK)); } int fd_get_writew_lock (int fd) { return (_fd_get_lock (fd, F_SETLKW, F_WRLCK)); } int fd_release_lock (int fd) { return (_fd_get_lock (fd, F_SETLK, F_UNLCK)); } pid_t fd_is_read_lock_blocked (int fd) { return (_fd_test_lock (fd, F_RDLCK)); } pid_t fd_is_write_lock_blocked (int fd) { return (_fd_test_lock (fd, F_WRLCK)); } /***************************************************************************** * Extern Attribute Functions *****************************************************************************/ int fd_set_close_on_exec (int fd) { assert (fd >= 0); if (fcntl (fd, F_SETFD, FD_CLOEXEC) < 0) return (-1); return (0); } int fd_set_nonblocking (int fd) { int fval; assert (fd >= 0); if ((fval = fcntl (fd, F_GETFL, 0)) < 0) return (-1); if (fcntl (fd, F_SETFL, fval | O_NONBLOCK) < 0) return (-1); return (0); } /***************************************************************************** * Static Functions *****************************************************************************/ static int _fd_get_lock (int fd, int cmd, int type) { struct flock lock; assert (fd >= 0); lock.l_type = type; lock.l_start = 0; lock.l_whence = SEEK_SET; lock.l_len = 0; return (fcntl (fd, cmd, &lock)); } static pid_t _fd_test_lock (int fd, int type) { struct flock lock; assert (fd >= 0); lock.l_type = type; lock.l_start = 0; lock.l_whence = SEEK_SET; lock.l_len = 0; if (fcntl (fd, F_GETLK, &lock) < 0) return (-1); if (lock.l_type == F_UNLCK) return (0); return (lock.l_pid); } freeipmi-1.6.4/common/miscutil/fd.h0000644002055400205540000000750413527331635017153 0ustar00achuachu00000000000000/***************************************************************************** * $Id: fd.h,v 1.2 2008-08-12 18:14:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * UCRL-CODE-2002-009. * * This file is part of ConMan, a remote console management program. * For details, see . * * ConMan is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * ConMan is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with ConMan; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef FD_H #define FD_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ int fd_set_close_on_exec (int fd); /* * Sets the file descriptor [fd] to be closed on exec(). * Returns 0 on success, or -1 on error. */ int fd_set_nonblocking (int fd); /* * Sets the file descriptor [fd] for non-blocking I/O. * Returns 0 on success, or -1 on error. */ int fd_get_read_lock (int fd); /* * Obtains a read lock on the file specified by [fd]. * Returns 0 on success, or -1 if prevented from obtaining the lock. */ int fd_get_readw_lock (int fd); /* * Obtains a read lock on the file specified by [fd], * blocking until one becomes available. * Returns 0 on success, or -1 on error. */ int fd_get_write_lock (int fd); /* * Obtains a write lock on the file specified by [fd]. * Returns 0 on success, or -1 if prevented from obtaining the lock. */ int fd_get_writew_lock (int fd); /* * Obtains a write lock on the file specified by [fd], * blocking until one becomes available. * Returns 0 on success, or -1 on error. */ int fd_release_lock (int fd); /* * Releases a lock held on the file specified by [fd]. * Returns 0 on success, or -1 on error. */ pid_t fd_is_read_lock_blocked (int fd); /* * Checks to see if a lock exists on [fd] that would block a request for a * read-lock (ie, if a write-lock is already being held on the file). * Returns the pid of the process holding the lock, 0 if no lock exists, * or -1 on error. */ pid_t fd_is_write_lock_blocked (int fd); /* * Checks to see if a lock exists on [fd] that would block a request for a * write-lock (ie, if any lock is already being held on the file). * Returns the pid of the process holding the lock, 0 if no lock exists, * or -1 on error. */ ssize_t fd_read_n (int fd, void *buf, size_t n); /* * Reads up to [n] bytes from [fd] into [buf]. * Returns the number of bytes read, 0 on EOF, or -1 on error. */ ssize_t fd_write_n (int fd, void *buf, size_t n); /* * Writes [n] bytes from [buf] to [fd]. * Returns the number of bytes written, or -1 on error. */ ssize_t fd_read_line (int fd, void *buf, size_t maxlen); /* * Reads at most [maxlen-1] bytes up to a newline from [fd] into [buf]. * The [buf] is guaranteed to be NUL-terminated and will contain the * newline if it is encountered within [maxlen-1] bytes. * Returns the number of bytes read, 0 on EOF, or -1 on error. */ #endif /* !FD_H */ freeipmi-1.6.4/common/miscutil/fi_hostlist.c0000644002055400205540000003224113527331635021100 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.c,v 1.3 2009-12-16 17:49:39 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "fi_hostlist.h" #include "hostlist.h" #include "network.h" #define FI_HOSTLIST_MAGIC 57006 #define FI_HOSTLIST_SEPERATOR "\t, " /* "impossible" legal hostnames to replace brackets with */ #define FI_LEFT_BRACKET "@l@" #define FI_RIGHT_BRACKET "@r@" struct fi_hostlist { #ifndef NDEBUG int magic; #endif hostlist_t hl; }; struct fi_hostlist_iterator { #ifndef NDEBUG int magic; #endif hostlist_iterator_t itr; }; /* achu: _advance_past_brackets and _next_tok ripped from hostlist.c */ static int _advance_past_brackets (char *tok, char **str) { /* if _single_ opening bracket exists b/w tok and str, push str * past first closing bracket to next seperator */ if ( memchr(tok, '[', *str - tok) != NULL && memchr(tok, ']', *str - tok) == NULL ) { char *q = strchr(*str, ']'); if (q && memchr(*str, '[', q - *str) == NULL) { *str = q + 1; return (1); } } return 0; } /* * Helper function for host list string parsing routines * Returns a pointer to the next token; additionally advance *str * to the next separator. * * next_tok was taken directly from pdsh courtesy of Jim Garlick. * (with modifications to support bracketed hostlists, i.e.: * xxx[xx,xx,xx] is a single token) * */ static char * _next_tok(char *sep, char **str) { char *tok; /* push str past any leading separators */ while (**str != '\0' && strchr(sep, **str) != '\0') (*str)++; if (**str == '\0') return NULL; /* assign token ptr */ tok = *str; /* * Advance str past any separators, but if a separator occurs between * brackets, e.g. foo[0-3,5], then advance str past closing brackets and * try again. */ do { /* push str past token and leave pointing to first separator */ while (**str != '\0' && strchr(sep, **str) == '\0') (*str)++; } while (_advance_past_brackets (tok, str)); /* nullify consecutive separators and push str beyond them */ while (**str != '\0' && strchr(sep, **str) != '\0') *(*str)++ = '\0'; return tok; } /* achu: Bulk from * * http://stackoverflow.com/questions/779875/what-is-the-function-to-replace-string-in-c * * as a starting point. Adjusting code style and library needs. */ static char * _str_replace (const char *orig, const char *replace, const char *with) { int len_replace; int len_with; int count = 0; char *new = NULL; char *tmp, *newp, *p; char *rv = NULL; assert (orig); assert (replace); assert (strlen (replace) > 0); assert (with); assert (strlen (with) > 0); len_replace = strlen (replace); len_with = strlen (with); /* count number of replacements needed */ p = (char *)orig; while ((tmp = strstr (p, replace))) { p = tmp + len_replace; count++; } /* No substitutions special case */ if (!count) { if (!(new = strdup (orig))) goto cleanup; return (new); } new = newp = (char *) malloc (strlen(orig) + (len_with - len_replace) * count + 1); if (!new) goto cleanup; /* p - points to remainder of orig */ /* newp - walks the new string buffer */ p = (char *)orig; while (count) { char *ins; int len_front; ins = strstr (p, replace); len_front = ins - p; strncpy (newp, p, len_front); newp += len_front; strncpy (newp, with, len_with); newp += len_with; p += len_front + len_replace; count--; } /* copy the rest over */ strcpy (newp, p); rv = new; cleanup: if (!rv) free (new); return (rv); } static char * _fi_unparse_string (const char *hosts) { char *str1 = NULL; char *str2 = NULL; char *rv = NULL; if (!(str1 = _str_replace (hosts, FI_LEFT_BRACKET, "["))) goto cleanup; if (!(str2 = _str_replace (str1, FI_RIGHT_BRACKET, "]"))) goto cleanup; rv = strdup (str2); cleanup: free (str1); free (str2); return (rv); } static char * _fi_preparse_host (const char *host) { char *new = NULL; char *rv = NULL; /* Handle special IPv6 address with port format, i.e. * "[Ipv6 address]:port" */ if (host_is_ipv6_with_port (host, NULL, NULL)) { unsigned int len = 0; char *pl; char *pr; /* +4 for extra 2 chars on left & right bracket, +1 for NUL char */ if (!(new = (char *) malloc (strlen (host) + 5))) goto cleanup; pl = strchr (host, '['); memcpy (new, host, pl - host); len += (pl - host); memcpy (new + len, FI_LEFT_BRACKET, strlen (FI_LEFT_BRACKET)); len += strlen (FI_LEFT_BRACKET); /* move past left bracket */ pl++; pr = strchr (pl, ']'); memcpy (new + len, pl, pr - pl); len += (pr - pl); memcpy (new + len, FI_RIGHT_BRACKET, strlen (FI_RIGHT_BRACKET)); len += strlen (FI_RIGHT_BRACKET); pr++; memcpy (new + len, pr, host + strlen (host) - pr); len += (host + strlen (host) - pr); new[len] = '\0'; } else { if (!(new = strdup (host))) goto cleanup; } rv = new; cleanup: if (!rv) free (new); return (rv); } typedef int (HostlistFn)(hostlist_t, const char *); static int _fi_hosts (const char *hosts, fi_hostlist_t fihl, HostlistFn hfn) { char *orig = NULL; char *copy = NULL; char *tok; int rv = -1; int count = 0; assert (hosts); assert (fihl); assert (hfn); if (!(orig = copy = strdup (hosts))) goto cleanup; while ((tok = _next_tok (FI_HOSTLIST_SEPERATOR, ©))) { char *tok_parsed; int ret; tok_parsed = _fi_preparse_host (tok); ret = hfn (fihl->hl, tok_parsed); free (tok_parsed); if (!ret) goto cleanup; count += ret; } rv = count; cleanup: free (orig); return (rv); } static int _fi_push_hosts (const char *hosts, fi_hostlist_t fihl) { return (_fi_hosts (hosts, fihl, hostlist_push)); } static int _fi_delete_hosts (const char *hosts, fi_hostlist_t fihl) { return (_fi_hosts (hosts, fihl, hostlist_delete)); } static fi_hostlist_t _fi_hostlist_new (void) { fi_hostlist_t fihl; if (!(fihl = (fi_hostlist_t) malloc (sizeof (struct fi_hostlist)))) return (NULL); #ifndef NDEBUG fihl->magic = FI_HOSTLIST_MAGIC; #endif fihl->hl = NULL; return (fihl); } fi_hostlist_t fi_hostlist_create (const char *hostlist) { fi_hostlist_t fihl = NULL; hostlist_t hl = NULL; fi_hostlist_t rv = NULL; if (!(hl = hostlist_create (NULL))) goto cleanup; if (!(fihl = _fi_hostlist_new ())) goto cleanup; fihl->hl = hl; if (hostlist) { if (_fi_push_hosts (hostlist, fihl) < 0) goto cleanup; } rv = fihl; cleanup: if (!rv) { if (fihl) fi_hostlist_destroy (fihl); else if (hl) hostlist_destroy (hl); } return (rv); } fi_hostlist_t fi_hostlist_copy(const fi_hostlist_t fihl) { fi_hostlist_t newfihl; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if (!(newfihl = _fi_hostlist_new())) return (NULL); if (!(newfihl->hl = hostlist_copy (fihl->hl))) { fi_hostlist_destroy (newfihl); return (NULL); } return (newfihl); } void fi_hostlist_destroy (fi_hostlist_t fihl) { if (fihl) { assert (fihl->magic == FI_HOSTLIST_MAGIC); hostlist_destroy (fihl->hl); free (fihl); } } int fi_hostlist_push (fi_hostlist_t fihl, const char *hosts) { int rv; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if ((rv = _fi_push_hosts (hosts, fihl)) < 0) return (0); return (rv); } int fi_hostlist_push_host (fi_hostlist_t fihl, const char *host) { int rv; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if ((rv = _fi_push_hosts (host, fihl)) < 0) return (0); return (rv); } int fi_hostlist_push_list (fi_hostlist_t fihl1, fi_hostlist_t fihl2) { assert (fihl1); assert (fihl1->magic == FI_HOSTLIST_MAGIC); assert (fihl2); assert (fihl2->magic == FI_HOSTLIST_MAGIC); return hostlist_push_list (fihl1->hl, fihl2->hl); } int fi_hostlist_find (fi_hostlist_t fihl, const char *hostname) { char *p; int rv; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); p = _fi_preparse_host (hostname); rv = hostlist_find (fihl->hl, p); free (p); return (rv); } int fi_hostlist_delete (fi_hostlist_t fihl, const char *hosts) { int rv; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if ((rv = _fi_delete_hosts (hosts, fihl)) < 0) return (0); return (rv); } int fi_hostlist_delete_host (fi_hostlist_t fihl, const char *hostname) { int rv; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if ((rv = _fi_delete_hosts (hostname, fihl)) < 0) return (0); return (rv); } int fi_hostlist_count (fi_hostlist_t fihl) { assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); return hostlist_count (fihl->hl); } void fi_hostlist_sort (fi_hostlist_t fihl) { assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); return hostlist_sort (fihl->hl); } void fi_hostlist_uniq (fi_hostlist_t fihl) { assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); return hostlist_uniq (fihl->hl); } typedef ssize_t (HostlistStrFn)(hostlist_t, size_t, char *); static int _fi_hostlist_string (fi_hostlist_t fihl, size_t n, char *buf, HostlistStrFn hfn) { char *tmpbuf = NULL; char *str = NULL; ssize_t rv = -1; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); assert (hfn); /* +1 to guarantee NUL byte */ if (!(tmpbuf = (char *) malloc (n + 1))) return -1; memset (tmpbuf, '\0', n + 1); if (hfn (fihl->hl, n, tmpbuf) < 0) goto cleanup; if (!(str = _fi_unparse_string (tmpbuf))) goto cleanup; if (strlen (str) > n) goto cleanup; strncpy (buf, str, n); rv = strlen (str); cleanup: free (tmpbuf); free (str); return (rv); } ssize_t fi_hostlist_ranged_string (fi_hostlist_t fihl, size_t n, char *buf) { return (_fi_hostlist_string (fihl, n, buf, hostlist_ranged_string)); } ssize_t fi_hostlist_deranged_string (fi_hostlist_t fihl, size_t n, char *buf) { return (_fi_hostlist_string (fihl, n, buf, hostlist_deranged_string)); } static fi_hostlist_iterator_t _fi_hostlist_iterator_new (void) { fi_hostlist_iterator_t fiitr; if (!(fiitr = (fi_hostlist_iterator_t) malloc (sizeof (struct fi_hostlist_iterator)))) return (NULL); #ifndef NDEBUG fiitr->magic = FI_HOSTLIST_MAGIC; #endif fiitr->itr = NULL; return (fiitr); } fi_hostlist_iterator_t fi_hostlist_iterator_create (fi_hostlist_t fihl) { hostlist_iterator_t itr; fi_hostlist_iterator_t fiitr; assert (fihl); assert (fihl->magic == FI_HOSTLIST_MAGIC); if (!(itr = hostlist_iterator_create (fihl->hl))) return (NULL); if (!(fiitr = _fi_hostlist_iterator_new ())) { hostlist_iterator_destroy (itr); return (NULL); } fiitr->itr = itr; return (fiitr); } void fi_hostlist_iterator_destroy (fi_hostlist_iterator_t fiitr) { if (fiitr) { assert (fiitr->magic == FI_HOSTLIST_MAGIC); hostlist_iterator_destroy (fiitr->itr); free (fiitr); } } void fi_hostlist_iterator_reset (fi_hostlist_iterator_t fiitr) { assert (fiitr); assert (fiitr->magic == FI_HOSTLIST_MAGIC); return hostlist_iterator_reset (fiitr->itr); } char * fi_hostlist_next (fi_hostlist_iterator_t fiitr) { char *str = NULL; char *rv = NULL; assert (fiitr); assert (fiitr->magic == FI_HOSTLIST_MAGIC); if ((str = hostlist_next (fiitr->itr))) rv = _fi_unparse_string (str); free (str); return (rv); } int fi_hostlist_remove (fi_hostlist_iterator_t fiitr) { assert (fiitr); assert (fiitr->magic == FI_HOSTLIST_MAGIC); return hostlist_remove (fiitr->itr); } freeipmi-1.6.4/common/miscutil/fi_hostlist.h0000644002055400205540000000562113527331635021107 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.h,v 1.3 2009-12-16 17:49:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* This library is a wrapper around hostlist to handle some special * case parsing in FreeIPMI. * * For instructions on usage, see hostlist.h equivalent functions. */ #ifndef _FI_HOSTLIST_H #define _FI_HOSTLIST_H typedef struct fi_hostlist * fi_hostlist_t; typedef struct fi_hostlist_iterator * fi_hostlist_iterator_t; fi_hostlist_t fi_hostlist_create (const char *hostlist); fi_hostlist_t fi_hostlist_copy (const fi_hostlist_t fihl); void fi_hostlist_destroy (fi_hostlist_t fihl); int fi_hostlist_push (fi_hostlist_t fihl, const char *hosts); int fi_hostlist_push_host (fi_hostlist_t fihl, const char *host); int fi_hostlist_push_list (fi_hostlist_t fihl1, fi_hostlist_t fihl2); int fi_hostlist_find (fi_hostlist_t fihl, const char *hostname); int fi_hostlist_delete (fi_hostlist_t fihl, const char *hosts); int fi_hostlist_delete_host (fi_hostlist_t fihl, const char *hostname); int fi_hostlist_count (fi_hostlist_t fihl); #define fi_hostlist_is_empty(__fihl) ( fi_hostlist_count(__fihl) == 0 ) void fi_hostlist_sort (fi_hostlist_t fihl); void fi_hostlist_uniq (fi_hostlist_t fihl); ssize_t fi_hostlist_ranged_string (fi_hostlist_t fihl, size_t n, char *buf); ssize_t fi_hostlist_deranged_string (fi_hostlist_t fihl, size_t n, char *buf); fi_hostlist_iterator_t fi_hostlist_iterator_create (fi_hostlist_t fihl); void fi_hostlist_iterator_destroy (fi_hostlist_iterator_t fiitr); void fi_hostlist_iterator_reset (fi_hostlist_iterator_t fiitr); char * fi_hostlist_next (fi_hostlist_iterator_t fiitr); int fi_hostlist_remove (fi_hostlist_iterator_t fiitr); #endif /* !_FI_HOSTLIST_H */ freeipmi-1.6.4/common/miscutil/hash.c0000644002055400205540000002660213527331635017500 0ustar00achuachu00000000000000/***************************************************************************** * $Id: hash.c,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2003-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License; * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA. ***************************************************************************** * Refer to "hash.h" for documentation on public functions. *****************************************************************************/ #if HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #include #include "thread.h" #include "hash.h" /***************************************************************************** * Constants *****************************************************************************/ #define HASH_ALLOC 1024 #define HASH_DEF_SIZE 1213 #define HASH_MAGIC 0xDEADBEEF /***************************************************************************** * Data Types *****************************************************************************/ struct hash_node { struct hash_node *next; /* next node in list */ void *data; /* ptr to hashed item */ const void *hkey; /* ptr to hashed item's key */ }; struct hash { int count; /* number of items in hash table */ int size; /* num slots allocated in hash table */ struct hash_node **table; /* hash table array of node ptrs */ hash_cmp_f cmp_f; /* key comparison function */ hash_del_f del_f; /* item deletion function */ hash_key_f key_f; /* key hash function */ #if WITH_PTHREADS pthread_mutex_t mutex; /* mutex to protect access to hash */ #endif /* WITH_PTHREADS */ #ifndef NDEBUG unsigned int magic; /* sentinel for asserting validity */ #endif /* NDEBUG */ }; /***************************************************************************** * Prototypes *****************************************************************************/ static struct hash_node * hash_node_alloc (void); static void hash_node_free (struct hash_node *node); /***************************************************************************** * Variables *****************************************************************************/ #if 0 static struct hash_node *hash_free_list = NULL; #if WITH_PTHREADS static pthread_mutex_t hash_free_lock = PTHREAD_MUTEX_INITIALIZER; #endif /* WITH_PTHREADS */ #endif /***************************************************************************** * Macros *****************************************************************************/ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error (char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # define lsd_fatal_error(file, line, mesg) (abort ()) # endif /* !lsd_fatal_error */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error (char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /***************************************************************************** * Functions *****************************************************************************/ hash_t hash_create (int size, hash_key_f key_f, hash_cmp_f cmp_f, hash_del_f del_f) { hash_t h; if (!cmp_f || !key_f) { errno = EINVAL; return (NULL); } if (size <= 0) { size = HASH_DEF_SIZE; } if (!(h = malloc (sizeof (*h)))) { return (lsd_nomem_error (__FILE__, __LINE__, "hash_create")); } if (!(h->table = calloc (size, sizeof (struct hash_node *)))) { free (h); return (lsd_nomem_error (__FILE__, __LINE__, "hash_create")); } h->count = 0; h->size = size; h->cmp_f = cmp_f; h->del_f = del_f; h->key_f = key_f; lsd_mutex_init (&h->mutex); assert (h->magic = HASH_MAGIC); /* set magic via assert abuse */ return (h); } void hash_destroy (hash_t h) { int i; struct hash_node *p, *q; if (!h) { errno = EINVAL; return; } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); for (i = 0; i < h->size; i++) { for (p = h->table[i]; p != NULL; p = q) { q = p->next; if (h->del_f) h->del_f (p->data); hash_node_free (p); } } assert (h->magic = ~HASH_MAGIC); /* clear magic via assert abuse */ lsd_mutex_unlock (&h->mutex); lsd_mutex_destroy (&h->mutex); free (h->table); free (h); return; } int hash_is_empty (hash_t h) { int n; if (!h) { errno = EINVAL; return (0); } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); n = h->count; lsd_mutex_unlock (&h->mutex); return (n == 0); } int hash_count (hash_t h) { int n; if (!h) { errno = EINVAL; return (0); } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); n = h->count; lsd_mutex_unlock (&h->mutex); return (n); } void * hash_find (hash_t h, const void *key) { unsigned int slot; struct hash_node *p; void *data = NULL; if (!h || !key) { errno = EINVAL; return (NULL); } errno = 0; lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); slot = h->key_f (key) % h->size; for (p = h->table[slot]; p != NULL; p = p->next) { if (!h->cmp_f (p->hkey, key)) { data = p->data; break; } } lsd_mutex_unlock (&h->mutex); return (data); } void * hash_insert (hash_t h, const void *key, void *data) { struct hash_node *p; unsigned int slot; if (!h || !key || !data) { errno = EINVAL; return (NULL); } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); slot = h->key_f (key) % h->size; for (p = h->table[slot]; p != NULL; p = p->next) { if (!h->cmp_f (p->hkey, key)) { errno = EEXIST; data = NULL; goto end; } } if (!(p = hash_node_alloc ())) { data = lsd_nomem_error (__FILE__, __LINE__, "hash_insert"); goto end; } p->hkey = key; p->data = data; p->next = h->table[slot]; h->table[slot] = p; h->count++; end: lsd_mutex_unlock (&h->mutex); return (data); } void * hash_remove (hash_t h, const void *key) { struct hash_node **pp; struct hash_node *p; unsigned int slot; void *data = NULL; if (!h || !key) { errno = EINVAL; return (NULL); } errno = 0; lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); slot = h->key_f (key) % h->size; for (pp = &(h->table[slot]); (p = *pp) != NULL; pp = &((*pp)->next)) { if (!h->cmp_f (p->hkey, key)) { data = p->data; *pp = p->next; hash_node_free (p); h->count--; break; } } lsd_mutex_unlock (&h->mutex); return (data); } int hash_delete_if (hash_t h, hash_arg_f arg_f, void *arg) { int i; struct hash_node **pp; struct hash_node *p; int n = 0; if (!h || !arg_f) { errno = EINVAL; return (-1); } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); for (i = 0; i < h->size; i++) { pp = &(h->table[i]); while ((p = *pp) != NULL) { if (arg_f (p->data, p->hkey, arg) > 0) { if (h->del_f) h->del_f (p->data); *pp = p->next; hash_node_free (p); h->count--; n++; } else { pp = &(p->next); } } } lsd_mutex_unlock (&h->mutex); return (n); } int hash_for_each (hash_t h, hash_arg_f arg_f, void *arg) { int i; struct hash_node *p; int n = 0; if (!h || !arg_f) { errno = EINVAL; return (-1); } lsd_mutex_lock (&h->mutex); assert (h->magic == HASH_MAGIC); for (i = 0; i < h->size; i++) { for (p = h->table[i]; p != NULL; p = p->next) { if (arg_f (p->data, p->hkey, arg) > 0) { n++; } } } lsd_mutex_unlock (&h->mutex); return (n); } /***************************************************************************** * Hash Functions *****************************************************************************/ unsigned int hash_key_string (const char *str) { unsigned char *p; unsigned int hval = 0; const unsigned int multiplier = 31; for (p = (unsigned char *) str; *p != '\0'; p++) { hval += (multiplier * hval) + *p; } return (hval); } /***************************************************************************** * Internal Functions *****************************************************************************/ static struct hash_node * hash_node_alloc (void) { /* Allocates a hash node from the freelist. * Memory is allocated in chunks of HASH_ALLOC. * Returns a ptr to the object, or NULL if memory allocation fails. */ #if 0 int i; #endif struct hash_node *p = NULL; assert (HASH_ALLOC > 0); #if 0 lsd_mutex_lock (&hash_free_lock); if (!hash_free_list) { if ((hash_free_list = malloc (HASH_ALLOC * sizeof (*p)))) { for (i = 0; i < HASH_ALLOC - 1; i++) hash_free_list[i].next = &hash_free_list[i+1]; hash_free_list[i].next = NULL; } } if (hash_free_list) { p = hash_free_list; hash_free_list = p->next; } else { errno = ENOMEM; } lsd_mutex_unlock (&hash_free_lock); #else if (!(p = malloc (sizeof(*p)))) errno = ENOMEM; #endif return (p); } static void hash_node_free (struct hash_node *node) { /* De-allocates the object [node], returning it to the freelist. */ assert (node != NULL); memset (node, 0, sizeof (*node)); #if 0 lsd_mutex_lock (&hash_free_lock); node->next = hash_free_list; hash_free_list = node; lsd_mutex_unlock (&hash_free_lock); #else free (node); #endif return; } freeipmi-1.6.4/common/miscutil/hash.h0000644002055400205540000001555213527331635017507 0ustar00achuachu00000000000000/***************************************************************************** * $Id: hash.h,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2003-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * This is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 2 of the License, or * (at your option) any later version. * * This is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License; * if not, write to the Free Software Foundation, Inc., 51 Franklin Street, * Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef LSD_HASH_H #define LSD_HASH_H /***************************************************************************** * Notes *****************************************************************************/ /* * If an item's key is modified after insertion, the hash will be unable to * locate it if the new key should hash to a different slot in the table. * * If NDEBUG is not defined, internal debug code will be enabled; this is * intended for development use only. Production code should define NDEBUG. * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find an external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that aborts. * This macro may be redefined to invoke another routine instead. * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. */ /***************************************************************************** * Data Types *****************************************************************************/ typedef struct hash * hash_t; /* * Hash table opaque data type. */ typedef unsigned int (*hash_key_f) (const void *key); /* * Function prototype for the hash function responsible for converting * the data's [key] into an unsigned integer hash value. */ typedef int (*hash_cmp_f) (const void *key1, const void *key2); /* * Function prototype for comparing two keys. * Returns zero if both keys are equal; o/w, returns nonzero. */ typedef void (*hash_del_f) (void *data); /* * Function prototype for de-allocating a data item stored within a hash. * This function is responsible for freeing all memory associated with * the [data] item, including any subordinate items. */ typedef int (*hash_arg_f) (void *data, const void *key, void *arg); /* * Function prototype for operating on each element in the hash table. * The function will be invoked once for each [data] item in the hash, * with the item's [key] and the specified [arg] being passed in as args. */ /***************************************************************************** * Functions *****************************************************************************/ hash_t hash_create (int size, hash_key_f key_f, hash_cmp_f cmp_f, hash_del_f del_f); /* * Creates and returns a new hash table on success. * Returns lsd_nomem_error() with errno=ENOMEM if memory allocation fails. * Returns NULL with errno=EINVAL if [keyf] or [cmpf] is not specified. * The [size] is the number of slots in the table; a larger table requires * more memory, but generally provide quicker access times. If set <= 0, * the default size is used. * The [keyf] function converts a key into a hash value. * The [cmpf] function determines whether two keys are equal. * The [delf] function de-allocates memory used by items in the hash; * if set to NULL, memory associated with these items will not be freed * when the hash is destroyed. */ void hash_destroy (hash_t h); /* * Destroys hash table [h]. If a deletion function was specified when the * hash was created, it will be called for each item contained within. * Abadoning a hash without calling hash_destroy() will cause a memory leak. */ int hash_is_empty (hash_t h); /* * Returns non-zero if hash table [h] is empty; o/w, returns zero. */ int hash_count (hash_t h); /* * Returns the number of items in hash table [h]. */ void * hash_find (hash_t h, const void *key); /* * Searches for the item corresponding to [key] in hash table [h]. * Returns a ptr to the found item's data on success. * Returns NULL with errno=0 if no matching item is found. * Returns NULL with errno=EINVAL if [key] is not specified. */ void * hash_insert (hash_t h, const void *key, void *data); /* * Inserts [data] with the corresponding [key] into hash table [h]; * note that it is permissible for [key] to be set equal to [data]. * Returns a ptr to the inserted item's data on success. * Returns NULL with errno=EEXIST if [key] already exists in the hash. * Returns NULL with errno=EINVAL if [key] or [data] is not specified. * Returns lsd_nomem_error() with errno=ENOMEM if memory allocation fails. */ void * hash_remove (hash_t h, const void *key); /* * Removes the item corresponding to [key] from hash table [h]. * Returns a ptr to the removed item's data on success. * Returns NULL with errno=0 if no matching item is found. * Returns NULL with errno=EINVAL if [key] is not specified. */ int hash_delete_if (hash_t h, hash_arg_f argf, void *arg); /* * Conditionally deletes (and de-allocates) items from hash table [h]. * The [argf] function is invoked once for each item in the hash, with * [arg] being passed in as an argument. Items for which [argf] returns * greater-than-zero are deleted. * Returns the number of items deleted. * Returns -1 with errno=EINVAL if [argf] is not specified. */ int hash_for_each (hash_t h, hash_arg_f argf, void *arg); /* * Invokes the [argf] function once for each item in hash table [h], * with [arg] being passed in as an argument. * Returns the number of items for which [argf] returns greater-than-zero. * Returns -1 with errno=EINVAL if [argf] is not specified. */ unsigned int hash_key_string (const char *str); /* * A hash_key_f function that hashes the string [str]. */ #endif /* !LSD_HASH_H */ freeipmi-1.6.4/common/miscutil/heap.c0000644002055400205540000003146313527331635017473 0ustar00achuachu00000000000000/***************************************************************************** * $Id: list.c,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #if HAVE_PTHREAD_H # include #endif /* HAVE_PTHREAD_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include "heap.h" /********************* * lsd_fatal_error * *********************/ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error(char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # include # include # include # define lsd_fatal_error(file, line, mesg) \ do { \ fprintf(stderr, "ERROR: [%s:%d] %s: %s\n", \ file, line, mesg, strerror(errno)); \ } while (0) # endif /* !lsd_fatal_error */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ /********************* * lsd_nomem_error * *********************/ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error(char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /*************** * Constants * ***************/ #define HEAP_MAGIC 0x12345678 #define HEAP_SIZE_DEFAULT 64 #define HEAP_SIZE_MINIMUM 4 /**************** * Data Types * ****************/ struct heapNode { void *data; /* node's data */ }; struct heap { unsigned int size; /* size of heap elements array */ HeapCmpF fCmp; /* function to compare data */ HeapDelF fDel; /* function to delete data */ unsigned int count; /* number of items in heap */ unsigned int heap_size; /* next power of 2 to use for size */ struct heapNode ** heaparray; /* heap array to store pointers */ #ifdef WITH_PTHREADS pthread_mutex_t mutex; /* mutex to protect access to list */ #endif /* WITH_PTHREADS */ #ifndef NDEBUG unsigned int magic; /* sentinel for asserting validity */ #endif /* !NDEBUG */ }; /************ * Macros * ************/ #ifdef WITH_PTHREADS # define heap_mutex_init(mutex) \ do { \ int e = pthread_mutex_init(mutex, NULL); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "heap mutex init"); \ abort(); \ } \ } while (0) # define heap_mutex_lock(mutex) \ do { \ int e = pthread_mutex_lock(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "heap mutex lock"); \ abort(); \ } \ } while (0) # define heap_mutex_unlock(mutex) \ do { \ int e = pthread_mutex_unlock(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "heap mutex unlock"); \ abort(); \ } \ } while (0) # define heap_mutex_destroy(mutex) \ do { \ int e = pthread_mutex_destroy(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "heap mutex destroy"); \ abort(); \ } \ } while (0) # ifndef NDEBUG static int heap_mutex_is_locked (pthread_mutex_t *mutex); # endif /* !NDEBUG */ #else /* !WITH_PTHREADS */ # define heap_mutex_init(mutex) # define heap_mutex_lock(mutex) # define heap_mutex_unlock(mutex) # define heap_mutex_destroy(mutex) # define heap_mutex_is_locked(mutex) (1) #endif /* !WITH_PTHREADS */ /*************** * Functions * ***************/ Heap heap_create (int size, HeapCmpF fCmp, HeapDelF fDel) { Heap h; if (!fCmp) { errno = EINVAL; return (NULL); } if (!(h = (struct heap *)malloc (sizeof (struct heap)))) { errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "heap create")); } if (size <= 0) h->size = HEAP_SIZE_DEFAULT; else h->size = size; h->fCmp = fCmp; h->fDel = fDel; h->count = 0; /* classic find next power of 2 algorithm */ h->heap_size = h->size - 1; h->heap_size = (h->heap_size >> 1) | h->heap_size; h->heap_size = (h->heap_size >> 2) | h->heap_size; h->heap_size = (h->heap_size >> 4) | h->heap_size; h->heap_size = (h->heap_size >> 8) | h->heap_size; h->heap_size = (h->heap_size >> 16) | h->heap_size; h->heap_size += 1; if (h->heap_size < HEAP_SIZE_MINIMUM) h->heap_size = HEAP_SIZE_MINIMUM; if (!(h->heaparray = (struct heapNode **)malloc (sizeof (struct heapNode *) * h->heap_size))) { free (h); errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "heap array create")); } memset (h->heaparray, '\0', sizeof (void *) * h->heap_size); heap_mutex_init (&h->mutex); assert(h->magic = HEAP_MAGIC); /* set magic via assert abuse */ return (h); } void heap_destroy (Heap h) { unsigned int i; assert (h != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); for (i = 0; i < h->count; i++) { if ((h->heaparray[i])->data && h->fDel) h->fDel ((h->heaparray[i])->data); free (h->heaparray[i]); } free (h->heaparray); heap_mutex_unlock (&h->mutex); heap_mutex_destroy (&h->mutex); assert (h->magic = ~HEAP_MAGIC); /* clear magic via assert abuse */ free (h); return; } int heap_is_empty (Heap h) { unsigned int n; assert (h != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); n = h->count; heap_mutex_unlock (&h->mutex); return (n == 0); } int heap_is_full (Heap h) { unsigned int n; assert (h != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); n = h->count; heap_mutex_unlock (&h->mutex); return (n == h->size); } static void * heap_node_create (Heap h, struct heapNode **pp, void *x) { struct heapNode *p; assert (h != NULL); assert (h->magic == HEAP_MAGIC); assert (heap_mutex_is_locked (&h->mutex)); assert (pp != NULL); assert (x != NULL); if (!(p = (struct heapNode *) malloc (sizeof (struct heapNode)))) { errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "heap node create")); } p->data = x; *pp = p; return (x); } static void * heap_node_destroy (Heap h, struct heapNode *p) { void *v; assert (h != NULL); assert (h->magic == HEAP_MAGIC); assert (heap_mutex_is_locked(&l->mutex)); assert (p != NULL); v = p->data; free (p); return (v); } void * heap_insert (Heap h, void *x) { unsigned int index; struct heapNode *p; void *v; assert (h != NULL); assert (x != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); if (h->count == h->size) { errno = ENOSPC; heap_mutex_unlock (&h->mutex); return (NULL); } if (!(v = heap_node_create (h, &p, x))) { heap_mutex_unlock (&h->mutex); return (NULL); } if (!h->count) { h->heaparray[0] = p; h->count++; heap_mutex_unlock (&h->mutex); return (v); } index = h->count; while (index > 0 && h->fCmp (x, h->heaparray[(index - 1)/ 2]->data) > 0) { h->heaparray[index] = h->heaparray[(index - 1) / 2]; index = (index - 1) / 2; } h->heaparray[index] = p; h->count++; heap_mutex_unlock (&h->mutex); return (v); } void * heap_pop (Heap h) { unsigned int index = 0; struct heapNode *p; void *v; assert (h != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); if (!h->count) { heap_mutex_unlock (&h->mutex); return (NULL); } v = heap_node_destroy (h, h->heaparray[0]); if (h->count == 1) { h->heaparray[0] = NULL; h->count--; heap_mutex_unlock (&h->mutex); return (v); } p = h->heaparray[h->count - 1]; while ((((2 * index) + 1) < h->count && h->fCmp (h->heaparray[(2 * index) + 1]->data, p->data) > 0) || (((2 * index) + 2) < h->count && h->fCmp (h->heaparray[(2 * index) + 2]->data, p->data) > 0)) { unsigned int tmp; if (((2 * index) + 2) < h->count) { if (h->fCmp (h->heaparray[(2 * index) + 1]->data, h->heaparray[(2 * index) + 2]->data) > 0) tmp = (2 * index) + 1; else tmp = (2 * index) + 2; } else tmp = (2 * index) + 1; h->heaparray[index] = h->heaparray[tmp]; index = tmp; } h->heaparray[index] = p; h->heaparray[h->count - 1] = NULL; h->count--; heap_mutex_unlock (&h->mutex); return (v); } void * heap_peek (Heap h) { void *v; assert (h != NULL); heap_mutex_lock (&h->mutex); assert (h->magic == HEAP_MAGIC); v = (h->count) ? h->heaparray[0]->data : NULL; heap_mutex_unlock (&h->mutex); return (v); } freeipmi-1.6.4/common/miscutil/heap.h0000644002055400205540000001352213527331635017474 0ustar00achuachu00000000000000/***************************************************************************** * $Id: list.h,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef LSD_HEAP_H #define LSD_HEAP_H /*********** * Notes * ***********/ /* API emulates Chris Dunlap's (dunlap6 at llnl dot gov) List library. * Lots of code was copied. */ /* * If NDEBUG is not defined, internal debug code will be enabled. This is * intended for development use only and production code should define NDEBUG. * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find an external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an * error message to stderr. This macro may be redefined to invoke another * routine instead. * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. */ /**************** * Data Types * ****************/ typedef struct heap * Heap; /* * Heap opaque data type. */ typedef void (*HeapDelF) (void *x); /* * Function prototype to deallocate data stored in a heap. * This function is responsible for freeing all memory associated * with an item, including all subordinate items (if applicable). */ typedef int (*HeapCmpF) (void *x, void *y); /* * Function prototype for comparing two items in a heap. * Returns less-than-zero if (xy). */ /******************************* * General-Purpose Functions * *******************************/ Heap heap_create (int size, HeapCmpF fCmp, HeapDelF fDel); /* * Creates and returns a new empty heap, or lsd_nomem_error() on failure. * The [size] is guidance on the number of slots in the heap; If set * <= 0, the default size is used. Usually, the next power of 2 * will be used for size, but with a minimum used internally. * The comparison function [fCmp] is used for comparison of items * added to the heap. This heap operates as a max heap when utilizing * the HeapCmpF. To implement a min heap, adjust the HeapCmpF function * appropriately. * The deletion function [fDel] is used to deallocate memory used by items * in the heap; if this is NULL, memory associated with these items * will not be freed when the heap is destroyed. * Note: Abandoning a heap without calling heap_destroy() will result * in a memory leak. */ void heap_destroy (Heap h); /* * Destroys heap [h], freeing memory used for heap iterators and the * heap itself; if a deletion function was specified when the heap * was created, it will be called for each item in the heap. */ int heap_is_empty (Heap h); /* * Returns non-zero if heap [h] is empty; o/w returns zero. */ int heap_is_full (Heap h); /* * Returns non-zero if heap [h] is full; o/w returns zero. */ /**************************** * Access Functions * ****************************/ void * heap_insert (Heap h, void *x); /* * Pushes data [x] onto the top of heap [h]. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * heap_pop (Heap h); /* * Pops the data item at the top of the heap [h]. * Returns the data's ptr, or NULL if the heap is empty. */ void * heap_peek (Heap h); /* * Peeks at the data item at the top of the heap [h]. * Returns the data's ptr, or NULL if the heap is empty. * Note: The item is not removed from the heap. */ #endif /* !LSD_HEAP_H */ freeipmi-1.6.4/common/miscutil/hostlist.c0000644002055400205540000021312013527331635020417 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.c,v 1.3 2009-12-16 17:49:39 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Mark Grondona * UCRL-CODE-2002-040. * * This file is part of SLURM, a resource management program. * For details, see . * * SLURM is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with SLURM; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" # if HAVE_STRING_H # include # endif # if HAVE_PTHREAD_H # include # endif #else /* !HAVE_CONFIG_H */ # include # include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include #include #include #include #include "hostlist.h" /* * lsd_fatal_error : fatal error macro */ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error(char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ #if 0 # ifndef lsd_fatal_error # define lsd_fatal_error(file, line, mesg) \ do { \ fprintf(stderr, "ERROR: [%s:%d] %s: %s\n", \ file, line, mesg, strerror(errno)); \ } while (0) # endif /* !lsd_fatal_error */ #else /* !0 */ # ifndef lsd_fatal_error # define lsd_fatal_error(file, line, mesg) # endif /* !lsd_fatal_error */ #endif /* !0 */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ /* * lsd_nomem_error */ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error(char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /* * OOM helper function * Automatically call lsd_nomem_error with appropriate args * and set errno to ENOMEM */ #define out_of_memory(mesg) \ do { \ errno = ENOMEM; \ return(lsd_nomem_error(__FILE__, __LINE__, mesg)); \ } while (0) /* * Some constants and tunables: */ /* number of elements to allocate when extending the hostlist array */ #define HOSTLIST_CHUNK 16 /* max host range: anything larger will be assumed to be an error */ #define MAX_RANGE 16384 /* 16K Hosts */ /* max host suffix value */ #define MAX_HOST_SUFFIX 1<<25 /* max number of ranges that will be processed between brackets */ #define MAX_RANGES 10240 /* 10K Ranges */ /* size of internal hostname buffer (+ some slop), hostnames will probably * be truncated if longer than MAXHOSTNAMELEN */ #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif /* max size of internal hostrange buffer */ #define MAXHOSTRANGELEN 1024 /* ----[ Internal Data Structures ]---- */ /* hostname type: A convenience structure used in parsing single hostnames */ struct hostname_components { char *hostname; /* cache of initialized hostname */ char *prefix; /* hostname prefix */ unsigned long num; /* numeric suffix */ /* string representation of numeric suffix * points into `hostname' */ char *suffix; }; typedef struct hostname_components *hostname_t; /* hostrange type: A single prefix with `hi' and `lo' numeric suffix values */ struct hostrange_components { char *prefix; /* alphanumeric prefix: */ /* beginning (lo) and end (hi) of suffix range */ unsigned long lo, hi; /* width of numeric output format * (pad with zeros up to this width) */ int width; /* If singlehost is 1, `lo' and `hi' are invalid */ unsigned singlehost:1; }; typedef struct hostrange_components *hostrange_t; /* The hostlist type: An array based list of hostrange_t's */ struct hostlist { #ifndef NDEBUG #define HOSTLIST_MAGIC 57005 int magic; #endif #if WITH_PTHREADS pthread_mutex_t mutex; #endif /* WITH_PTHREADS */ /* current number of elements available in array */ int size; /* current number of ranges stored in array */ int nranges; /* current number of hosts stored in hostlist */ int nhosts; /* pointer to hostrange array */ hostrange_t *hr; /* list of iterators */ struct hostlist_iterator *ilist; }; /* a hostset is a wrapper around a hostlist */ struct hostset { hostlist_t hl; }; struct hostlist_iterator { #ifndef NDEBUG int magic; #endif /* hostlist we are traversing */ hostlist_t hl; /* current index of iterator in hl->hr[] */ int idx; /* current hostrange object in list hl, i.e. hl->hr[idx] */ hostrange_t hr; /* current depth we've traversed into range hr */ int depth; /* next ptr for lists of iterators */ struct hostlist_iterator *next; }; /* ---- ---- */ /* ------[ static function prototypes ]------ */ static void _error(char *file, int line, char *mesg, ...); static char * _next_tok(char *, char **); static int _zero_padded(unsigned long, int); static int _width_equiv(unsigned long, int *, unsigned long, int *); static int host_prefix_end(const char *); static hostname_t hostname_create(const char *); static void hostname_destroy(hostname_t); static int hostname_suffix_is_valid(hostname_t); static int hostname_suffix_width(hostname_t); static hostrange_t hostrange_new(void); static hostrange_t hostrange_create_single(const char *); static hostrange_t hostrange_create(char *, unsigned long, unsigned long, int); static unsigned long hostrange_count(hostrange_t); static hostrange_t hostrange_copy(hostrange_t); static void hostrange_destroy(hostrange_t); static hostrange_t hostrange_delete_host(hostrange_t, unsigned long); static int hostrange_cmp(hostrange_t, hostrange_t); static int hostrange_prefix_cmp(hostrange_t, hostrange_t); static int hostrange_within_range(hostrange_t, hostrange_t); static int hostrange_width_combine(hostrange_t, hostrange_t); static int hostrange_empty(hostrange_t); static char * hostrange_pop(hostrange_t); static char * hostrange_shift(hostrange_t); static int hostrange_join(hostrange_t, hostrange_t); static hostrange_t hostrange_intersect(hostrange_t, hostrange_t); static int hostrange_hn_within(hostrange_t, hostname_t); static size_t hostrange_to_string(hostrange_t hr, size_t, char *, char *); static size_t hostrange_numstr(hostrange_t, size_t, char *); static hostlist_t hostlist_new(void); static hostlist_t _hostlist_create_bracketed(const char *, char *, char *); static int hostlist_resize(hostlist_t, size_t); static int hostlist_expand(hostlist_t); static int hostlist_push_range(hostlist_t, hostrange_t); static int hostlist_push_hr(hostlist_t, char *, unsigned long, unsigned long, int); static int hostlist_insert_range(hostlist_t, hostrange_t, int); static void hostlist_delete_range(hostlist_t, int n); static void hostlist_coalesce(hostlist_t hl); static void hostlist_collapse(hostlist_t hl); static hostlist_t _hostlist_create(const char *, char *, char *); static void hostlist_shift_iterators(hostlist_t, int, int, int); static int _attempt_range_join(hostlist_t, int); static int _is_bracket_needed(hostlist_t, int); static hostlist_iterator_t hostlist_iterator_new(void); static void _iterator_advance(hostlist_iterator_t); static void _iterator_advance_range(hostlist_iterator_t); static int hostset_find_host(hostset_t, const char *); /* ------[ macros ]------ */ #ifdef WITH_PTHREADS # define mutex_init(mutex) \ do { \ int e = pthread_mutex_init(mutex, NULL); \ if (e) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "hostlist mutex init:"); \ abort(); \ } \ } while (0) # define mutex_lock(mutex) \ do { \ int e = pthread_mutex_lock(mutex); \ if (e) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "hostlist mutex lock:"); \ abort(); \ } \ } while (0) # define mutex_unlock(mutex) \ do { \ int e = pthread_mutex_unlock(mutex); \ if (e) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "hostlist mutex unlock:"); \ abort(); \ } \ } while (0) # define mutex_destroy(mutex) \ do { \ int e = pthread_mutex_destroy(mutex); \ if (e) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "hostlist mutex destroy:"); \ abort(); \ } \ } while (0) #else /* !WITH_PTHREADS */ # define mutex_init(mutex) # define mutex_lock(mutex) # define mutex_unlock(mutex) # define mutex_destroy(mutex) #endif /* WITH_PTHREADS */ #define LOCK_HOSTLIST(_hl) \ do { \ assert(_hl != NULL); \ mutex_lock(&(_hl)->mutex); \ assert((_hl)->magic == HOSTLIST_MAGIC); \ } while (0) #define UNLOCK_HOSTLIST(_hl) \ do { \ mutex_unlock(&(_hl)->mutex); \ } while (0) #define seterrno_ret(_errno, _rc) \ do { \ errno = _errno; \ return _rc; \ } while (0) /* ------[ Function Definitions ]------ */ /* ----[ general utility functions ]---- */ /* * Varargs capable error reporting via lsd_fatal_error() */ static void _error(char *file, int line, char *msg, ...) { va_list ap; char buf[1024]; int len = 0; va_start(ap, msg); len = vsnprintf(buf, 1024, msg, ap); if ((len < 0) || (len > 1024)) buf[1023] = '\0'; lsd_fatal_error(file, line, buf); va_end(ap); return; } static int _advance_past_brackets (char *tok, char **str) { /* if _single_ opening bracket exists b/w tok and str, push str * past first closing bracket to next seperator */ if ( memchr(tok, '[', *str - tok) != NULL && memchr(tok, ']', *str - tok) == NULL ) { char *q = strchr(*str, ']'); if (q && memchr(*str, '[', q - *str) == NULL) { *str = q + 1; return (1); } } return 0; } /* * Helper function for host list string parsing routines * Returns a pointer to the next token; additionally advance *str * to the next separator. * * next_tok was taken directly from pdsh courtesy of Jim Garlick. * (with modifications to support bracketed hostlists, i.e.: * xxx[xx,xx,xx] is a single token) * */ static char * _next_tok(char *sep, char **str) { char *tok; /* push str past any leading separators */ while (**str != '\0' && strchr(sep, **str) != '\0') (*str)++; if (**str == '\0') return NULL; /* assign token ptr */ tok = *str; /* * Advance str past any separators, but if a separator occurs between * brackets, e.g. foo[0-3,5], then advance str past closing brackets and * try again. */ do { /* push str past token and leave pointing to first separator */ while (**str != '\0' && strchr(sep, **str) == '\0') (*str)++; } while (_advance_past_brackets (tok, str)); /* nullify consecutive separators and push str beyond them */ while (**str != '\0' && strchr(sep, **str) != '\0') *(*str)++ = '\0'; return tok; } /* return the number of zeros needed to pad "num" to "width" */ static int _zero_padded(unsigned long num, int width) { int n = 1; while (num /= 10L) n++; return width > n ? width - n : 0; } /* test whether two format `width' parameters are "equivalent" * The width arguments "wn" and "wm" for integers "n" and "m" * are equivalent if: * * o wn == wm OR * * o applying the same format width (either wn or wm) to both of * 'n' and 'm' will not change the zero padding of *either* 'm' nor 'n'. * * If this function returns 1 (or true), the appropriate width value * (either 'wm' or 'wn') will have been adjusted such that both format * widths are equivalent. */ static int _width_equiv(unsigned long n, int *wn, unsigned long m, int *wm) { int npad, nmpad, mpad, mnpad; if (wn == wm) return 1; npad = _zero_padded(n, *wn); nmpad = _zero_padded(n, *wm); mpad = _zero_padded(m, *wm); mnpad = _zero_padded(m, *wn); if (npad != nmpad && mpad != mnpad) return 0; if (npad != nmpad) { if (mpad == mnpad) { *wm = *wn; return 1; } else return 0; } else { /* mpad != mnpad */ if (npad == nmpad) { *wn = *wm; return 1; } else return 0; } /* not reached */ } /* ----[ hostname_t functions ]---- */ /* * return the location of the last char in the hostname prefix */ static int host_prefix_end(const char *hostname) { int idx = strlen(hostname) - 1; while (idx >= 0 && isdigit((char) hostname[idx])) idx--; return idx; } static hostname_t hostname_create_with_suffix (const char *hostname, int idx) { hostname_t hn = NULL; char *p = '\0'; assert(hostname != NULL); if (!(hn = (hostname_t) malloc(sizeof(*hn)))) out_of_memory("hostname create"); if (!(hn->hostname = strdup(hostname))) { free(hn); out_of_memory("hostname create"); } hn->num = 0; hn->prefix = NULL; hn->suffix = NULL; if (idx == strlen(hostname) - 1) { if ((hn->prefix = strdup(hostname)) == NULL) { hostname_destroy(hn); out_of_memory("hostname prefix create"); } return hn; } hn->suffix = hn->hostname + idx + 1; hn->num = strtoul(hn->suffix, &p, 10); if ((*p == '\0') && (hn->num <= MAX_HOST_SUFFIX)) { if (!(hn->prefix = malloc((idx + 2) * sizeof(char)))) { hostname_destroy(hn); out_of_memory("hostname prefix create"); } memcpy(hn->prefix, hostname, idx + 1); hn->prefix[idx + 1] = '\0'; } else { if (!(hn->prefix = strdup(hostname))) { hostname_destroy(hn); out_of_memory("hostname prefix create"); } hn->suffix = NULL; } return hn; } /* * create a hostname_t object from a string hostname */ static hostname_t hostname_create(const char *hostname) { int idx = host_prefix_end (hostname); return hostname_create_with_suffix (hostname, idx); } /* free a hostname object */ static void hostname_destroy(hostname_t hn) { if (hn == NULL) return; hn->suffix = NULL; if (hn->hostname) free(hn->hostname); if (hn->prefix) free(hn->prefix); free(hn); } /* return true if the hostname has a valid numeric suffix */ static int hostname_suffix_is_valid(hostname_t hn) { return hn->suffix != NULL; } /* return the width (in characters) of the numeric part of the hostname */ static int hostname_suffix_width(hostname_t hn) { assert(hn->suffix != NULL); return (int) strlen(hn->suffix); } /* ----[ hostrange_t functions ]---- */ /* allocate a new hostrange object */ static hostrange_t hostrange_new(void) { hostrange_t new = (hostrange_t) malloc(sizeof(*new)); if (!new) out_of_memory("hostrange create"); return new; } /* Create a hostrange_t containing a single host without a valid suffix * hr->prefix will represent the entire hostname. */ static hostrange_t hostrange_create_single(const char *prefix) { hostrange_t new; assert(prefix != NULL); if ((new = hostrange_new()) == NULL) goto error1; if ((new->prefix = strdup(prefix)) == NULL) goto error2; new->singlehost = 1; new->lo = 0L; new->hi = 0L; new->width = 0; return new; error2: free(new); error1: out_of_memory("hostrange create single"); } /* Create a hostrange object with a prefix, hi, lo, and format width */ static hostrange_t hostrange_create(char *prefix, unsigned long lo, unsigned long hi, int width) { hostrange_t new; assert(prefix != NULL); if ((new = hostrange_new()) == NULL) goto error1; if ((new->prefix = strdup(prefix)) == NULL) goto error2; new->lo = lo; new->hi = hi; new->width = width; new->singlehost = 0; return new; error2: free(new); error1: out_of_memory("hostrange create"); } /* Return the number of hosts stored in the hostrange object */ static unsigned long hostrange_count(hostrange_t hr) { assert(hr != NULL); if (hr->singlehost) return 1; else return hr->hi - hr->lo + 1; } /* Copy a hostrange object */ static hostrange_t hostrange_copy(hostrange_t hr) { assert(hr != NULL); if (hr->singlehost) return hostrange_create_single(hr->prefix); else return hostrange_create(hr->prefix, hr->lo, hr->hi, hr->width); } /* free memory allocated by the hostrange object */ static void hostrange_destroy(hostrange_t hr) { if (hr == NULL) return; if (hr->prefix) free(hr->prefix); free(hr); } /* hostrange_delete_host() deletes a specific host from the range. * If the range is split into two, the greater range is returned, * and `hi' of the lesser range is adjusted accordingly. If the * highest or lowest host is deleted from a range, NULL is returned * and the hostrange hr is adjusted properly. */ static hostrange_t hostrange_delete_host(hostrange_t hr, unsigned long n) { hostrange_t new = NULL; assert(hr != NULL); assert(n >= hr->lo && n <= hr->hi); if (n == hr->lo) hr->lo++; else if (n == hr->hi) hr->hi--; else { if (!(new = hostrange_copy(hr))) out_of_memory("hostrange copy"); hr->hi = n - 1; new->lo = n + 1; } return new; } /* hostrange_cmp() is used to sort hostrange objects. It will * sort based on the following (in order): * o result of strcmp on prefixes * o if widths are compatible, then: * sort based on lowest suffix in range * else * sort based on width */ static int hostrange_cmp(hostrange_t h1, hostrange_t h2) { int retval; assert(h1 != NULL); assert(h2 != NULL); if ((retval = hostrange_prefix_cmp(h1, h2)) == 0) retval = hostrange_width_combine(h1, h2) ? h1->lo - h2->lo : h1->width - h2->width; return retval; } /* compare the prefixes of two hostrange objects. * returns: * < 0 if h1 prefix is less than h2 OR h1 == NULL. * * 0 if h1's prefix and h2's prefix match, * UNLESS, either h1 or h2 (NOT both) do not have a valid suffix. * * > 0 if h1's prefix is greater than h2's OR h2 == NULL. */ static int hostrange_prefix_cmp(hostrange_t h1, hostrange_t h2) { int retval; if (h1 == NULL) return 1; if (h2 == NULL) return -1; retval = strcmp(h1->prefix, h2->prefix); return retval == 0 ? h2->singlehost - h1->singlehost : retval; } /* returns true if h1 and h2 would be included in the same bracketed hostlist. * h1 and h2 will be in the same bracketed list iff: * * 1. h1 and h2 have same prefix * 2. neither h1 nor h2 are singlet hosts (i.e. invalid suffix) * * (XXX: Should incompatible widths be placed in the same bracketed list? * There's no good reason not to, except maybe aesthetics) */ static int hostrange_within_range(hostrange_t h1, hostrange_t h2) { if (hostrange_prefix_cmp(h1, h2) == 0) return h1->singlehost || h2->singlehost ? 0 : 1; else return 0; } /* compare two hostrange objects to determine if they are width * compatible, returns: * 1 if widths can safely be combined * 0 if widths cannot be safely combined */ static int hostrange_width_combine(hostrange_t h0, hostrange_t h1) { assert(h0 != NULL); assert(h1 != NULL); return _width_equiv(h0->lo, &h0->width, h1->lo, &h1->width); } /* Return true if hostrange hr contains no hosts, i.e. hi < lo */ static int hostrange_empty(hostrange_t hr) { assert(hr != NULL); return ((hr->hi < hr->lo) || (hr->hi == (unsigned long) -1)); } /* return the string representation of the last host in hostrange hr * and remove that host from the range (i.e. decrement hi if possible) * * Returns NULL if malloc fails OR there are no more hosts left */ static char *hostrange_pop(hostrange_t hr) { size_t size = 0; char *host = NULL; assert(hr != NULL); if (hr->singlehost) { hr->lo++; /* effectively set count == 0 */ host = strdup(hr->prefix); } else if (hostrange_count(hr) > 0) { size = strlen(hr->prefix) + hr->width + 16; if (!(host = (char *) malloc(size * sizeof(char)))) out_of_memory("hostrange pop"); snprintf(host, size, "%s%0*lu", hr->prefix, hr->width, hr->hi--); } return host; } /* Same as hostrange_pop(), but remove host from start of range */ static char *hostrange_shift(hostrange_t hr) { size_t size = 0; char *host = NULL; assert(hr != NULL); if (hr->singlehost) { hr->lo++; if (!(host = strdup(hr->prefix))) out_of_memory("hostrange shift"); } else if (hostrange_count(hr) > 0) { size = strlen(hr->prefix) + hr->width + 16; if (!(host = (char *) malloc(size * sizeof(char)))) out_of_memory("hostrange shift"); snprintf(host, size, "%s%0*lu", hr->prefix, hr->width, hr->lo++); } return host; } /* join two hostrange objects. * * returns: * * -1 if ranges do not overlap (including incompatible zero padding) * 0 if ranges join perfectly * >0 number of hosts that were duplicated in h1 and h2 * * h2 will be coalesced into h1 if rc >= 0 * * it is assumed that h1->lo <= h2->lo, i.e. hr1 <= hr2 * */ static int hostrange_join(hostrange_t h1, hostrange_t h2) { int duplicated = -1; assert(h1 != NULL); assert(h2 != NULL); assert(hostrange_cmp(h1, h2) <= 0); if (hostrange_prefix_cmp(h1, h2) == 0 && hostrange_width_combine(h1, h2)) { if (h1->singlehost && h2->singlehost) { /* matching singlets */ duplicated = 1; } else if (h1->hi == h2->lo - 1) { /* perfect join */ h1->hi = h2->hi; duplicated = 0; } else if (h1->hi >= h2->lo) { /* some duplication */ if (h1->hi < h2->hi) { duplicated = h1->hi - h2->lo + 1; h1->hi = h2->hi; } else duplicated = hostrange_count(h2); } } return duplicated; } /* hostrange intersect returns the intersection (common hosts) * of hostrange objects h1 and h2. If there is no intersection, * NULL is returned. * * It is assumed that h1 <= h2 (i.e. h1->lo <= h2->lo) */ static hostrange_t hostrange_intersect(hostrange_t h1, hostrange_t h2) { hostrange_t new = NULL; assert(h1 != NULL); assert(h2 != NULL); if (h1->singlehost || h2->singlehost) return NULL; assert(hostrange_cmp(h1, h2) <= 0); if ((hostrange_prefix_cmp(h1, h2) == 0) && (h1->hi > h2->lo) && (hostrange_width_combine(h1, h2))) { if (!(new = hostrange_copy(h1))) return NULL; new->lo = h2->lo; new->hi = h2->hi < h1->hi ? h2->hi : h1->hi; } return new; } /* return offset of hn if it is in the hostlist or * -1 if not. */ static int hostrange_hn_within(hostrange_t hr, hostname_t hn) { int len_hr; int len_hn; int width; if (hr->singlehost) { /* * If the current hostrange [hr] is a `singlehost' (no valid * numeric suffix (lo and hi)), then the hostrange [hr] * stores just one host with name == hr->prefix. * * Thus the full hostname in [hn] must match hr->prefix, in * which case we return true. Otherwise, there is no * possibility that [hn] matches [hr]. */ if (strcmp (hn->hostname, hr->prefix) == 0) return 0; else return -1; } /* * Now we know [hr] is not a "singlehost", so hostname * better have a valid numeric suffix, or there is no * way we can match */ if (!hostname_suffix_is_valid (hn)) return -1; len_hn = strlen (hn->prefix); /* * If hostrange and hostname prefixes don't match to at least * the length of the hostname object (which will have the min * possible prefix length), then there is no way the hostname * falls within the range [hr]. */ if (strncmp (hr->prefix, hn->prefix, len_hn) != 0) return -1; /* * Now we know hostrange and hostname prefixes match up to the * length of the hostname prefix. If the hostrange and hostname * prefix lengths do not match (specifically if the hostname prefix * length is less than the hostrange prefix length) and the * hostrange prefix contains trailing digits, then it might be * the case that the hostrange was created by forcing the prefix * to contain digits a la f00[1-2]. So we try adjusting the * hostname with the longer prefix and calling this function * again with the new hostname. (Yes, this is ugly, sorry) */ len_hr = strlen (hr->prefix); width = hostname_suffix_width (hn); if ((len_hn < len_hr) && (width > 1) && (isdigit (hr->prefix [len_hr - 1])) && (hr->prefix [len_hn] == hn->suffix[0]) ) { int rc; /* * Create new hostname object with its prefix offset by one */ hostname_t h = hostname_create_with_suffix (hn->hostname, len_hn); /* * Recursive call :-o */ rc = hostrange_hn_within (hr, h); hostname_destroy (h); return rc; } /* * Finally, check whether [hn], with a valid numeric suffix, * falls within the range of [hr]. */ if (hn->num <= hr->hi && hn->num >= hr->lo) { int width = hostname_suffix_width (hn); if (!_width_equiv(hr->lo, &hr->width, hn->num, &width)) return -1; return (hn->num - hr->lo); } return -1; } /* copy a string representation of the hostrange hr into buffer buf, * writing at most n chars including NUL termination */ static size_t hostrange_to_string(hostrange_t hr, size_t n, char *buf, char *separator) { unsigned long i; int truncated = 0; int len = 0; char sep = separator == NULL ? ',' : separator[0]; if (n == 0) return 0; if (hr->singlehost) return snprintf(buf, n, "%s", hr->prefix); for (i = hr->lo; i <= hr->hi; i++) { size_t m = (n - len) <= n ? n - len : 0; /* check for < 0 */ int ret = snprintf(buf + len, m, "%s%0*lu", hr->prefix, hr->width, i); if (ret < 0 || ret >= m) { len = n; truncated = 1; break; } len+=ret; buf[len++] = sep; } if (truncated) { buf[n-1] = '\0'; return -1; } else { /* back up over final separator */ buf[--len] = '\0'; return len; } } /* Place the string representation of the numeric part of hostrange into buf * writing at most n chars including NUL termination. */ static size_t hostrange_numstr(hostrange_t hr, size_t n, char *buf) { int len = 0; assert(buf != NULL); if (hr->singlehost || n == 0) return 0; len = snprintf(buf, n, "%0*lu", hr->width, hr->lo); if ((len >= 0) && (len < n) && (hr->lo < hr->hi)) { int len2 = snprintf(buf+len, n-len, "-%0*lu", hr->width, hr->hi); if (len2 < 0) len = -1; else len += len2; } return len; } /* ----[ hostlist functions ]---- */ /* Create a new hostlist object. * Returns an empty hostlist, or NULL if memory allocation fails. */ static hostlist_t hostlist_new(void) { int i; hostlist_t new = (hostlist_t) malloc(sizeof(*new)); if (!new) goto fail1; assert(new->magic = HOSTLIST_MAGIC); mutex_init(&new->mutex); new->hr = (hostrange_t *) malloc(HOSTLIST_CHUNK * sizeof(hostrange_t)); if (!new->hr) goto fail2; /* set entries in hostrange array to NULL */ for (i = 0; i < HOSTLIST_CHUNK; i++) new->hr[i] = NULL; new->size = HOSTLIST_CHUNK; new->nranges = 0; new->nhosts = 0; new->ilist = NULL; return new; fail2: free(new); fail1: out_of_memory("hostlist_create"); } /* Resize the internal array used to store the list of hostrange objects. * * returns 1 for a successful resize, * 0 if call to _realloc fails * * It is assumed that the caller has the hostlist hl locked */ static int hostlist_resize(hostlist_t hl, size_t newsize) { int i; size_t oldsize; assert(hl != NULL); assert(hl->magic == HOSTLIST_MAGIC); oldsize = hl->size; hl->size = newsize; hl->hr = realloc((void *) hl->hr, hl->size*sizeof(hostrange_t)); if (!(hl->hr)) return 0; for (i = oldsize; i < newsize; i++) hl->hr[i] = NULL; return 1; } /* Resize hostlist by one HOSTLIST_CHUNK * Assumes that hostlist hl is locked by caller */ static int hostlist_expand(hostlist_t hl) { if (!hostlist_resize(hl, hl->size + HOSTLIST_CHUNK)) return 0; else return 1; } /* Push a hostrange object onto hostlist hl * Returns the number of hosts successfully pushed onto hl * or -1 if there was an error allocating memory */ static int hostlist_push_range(hostlist_t hl, hostrange_t hr) { hostrange_t tail; int retval; assert(hr != NULL); LOCK_HOSTLIST(hl); tail = (hl->nranges > 0) ? hl->hr[hl->nranges-1] : hl->hr[0]; if (hl->size == hl->nranges && !hostlist_expand(hl)) goto error; if (hl->nranges > 0 && hostrange_prefix_cmp(tail, hr) == 0 && tail->hi == hr->lo - 1 && hostrange_width_combine(tail, hr)) { tail->hi = hr->hi; } else { if ((hl->hr[hl->nranges++] = hostrange_copy(hr)) == NULL) goto error; } retval = hl->nhosts += hostrange_count(hr); UNLOCK_HOSTLIST(hl); return retval; error: UNLOCK_HOSTLIST(hl); return -1; } /* Same as hostlist_push_range() above, but prefix, lo, hi, and width * are passed as args */ static int hostlist_push_hr(hostlist_t hl, char *prefix, unsigned long lo, unsigned long hi, int width) { hostrange_t hr = hostrange_create(prefix, lo, hi, width); int retval = hostlist_push_range(hl, hr); hostrange_destroy(hr); return retval; } /* Insert a range object hr into position n of the hostlist hl * Assumes that hl->mutex is already held by calling process */ static int hostlist_insert_range(hostlist_t hl, hostrange_t hr, int n) { int i; hostrange_t tmp; hostlist_iterator_t hli; assert(hl != NULL); assert(hl->magic == HOSTLIST_MAGIC); assert(hr != NULL); if (n > hl->nranges) return 0; if (hl->size == hl->nranges && !hostlist_expand(hl)) return 0; /* copy new hostrange into slot "n" in array */ tmp = hl->hr[n]; hl->hr[n] = hostrange_copy(hr); /* push remaining hostrange entries up */ for (i = n + 1; i < hl->nranges + 1; i++) { hostrange_t last = hl->hr[i]; hl->hr[i] = tmp; tmp = last; } hl->nranges++; /* adjust hostlist iterators if needed */ for (hli = hl->ilist; hli; hli = hli->next) { if (hli->idx >= n) hli->hr = hli->hl->hr[++hli->idx]; } return 1; } /* Delete the range at position n in the range array * Assumes the hostlist lock is already held. */ static void hostlist_delete_range(hostlist_t hl, int n) { int i; hostrange_t old; assert(hl != NULL); assert(hl->magic == HOSTLIST_MAGIC); assert(n < hl->nranges && n >= 0); old = hl->hr[n]; for (i = n; i < hl->nranges - 1; i++) hl->hr[i] = hl->hr[i + 1]; hl->nranges--; hl->hr[hl->nranges] = NULL; hostlist_shift_iterators(hl, n, 0, 1); /* XXX caller responsible for adjusting nhosts */ /* hl->nhosts -= hostrange_count(old) */ hostrange_destroy(old); } #if WANT_RECKLESS_HOSTRANGE_EXPANSION /* The reckless hostrange expansion function. * See comment in hostlist.h:hostlist_create() for more info on * the different choices for hostlist notation. */ hostlist_t _hostlist_create(const char *hostlist, char *sep, char *r_op) { char *str, *orig; char *tok, *cur; int high, low, fmt = 0; char prefix[256] = ""; int pos = 0; int error = 0; char range_op = r_op[0];/* XXX support > 1 char range ops in future? */ hostlist_t new = hostlist_new(); orig = str = strdup(hostlist); /* return an empty list if an empty string was passed in */ if (str == NULL || strlen(str) == 0) goto done; /* Use hostlist_create_bracketed if we see "[" */ if (strchr(str, '[') != NULL) return _hostlist_create_bracketed(hostlist, sep, r_op); while ((tok = _next_tok(sep, &str)) != NULL) { /* save the current string for error messages */ cur = tok; high = low = 0; /* find end of alpha part * do this by finding last occurence of range_op in str */ pos = strlen(tok) - 1; if (strstr(tok, r_op) != '\0') { while (pos >= 0 && (char) tok[pos] != range_op) pos--; } /* now back up past any digits */ while (pos >= 0 && isdigit((char) tok[--pos])) {;} /* Check for valid x-y range (x must be a digit) * Reset pos if the range is not valid */ if (!isdigit((char) tok[++pos])) pos = strlen(tok) - 1; /* create prefix string * if prefix will be zero length, but prefix already exists * use the previous prefix and fmt */ if ((pos > 0) || (prefix[0] == '\0')) { memcpy(prefix, tok, (size_t) pos * sizeof(char)); prefix[pos] = '\0'; /* push pointer past prefix */ tok += pos; /* count number of digits for ouput fmt */ for (fmt = 0; isdigit(tok[fmt]); ++fmt) {;} if (fmt == 0) error = 1; } else tok += pos; /* get lower bound */ low = strtoul(tok, (char **) &tok, 10); if (*tok == range_op) { /* now get range upper bound */ /* push pointer past range op */ ++tok; /* find length of alpha part */ for (pos = 0; tok[pos] && !isdigit(tok[pos]); ++pos) {;} /* alpha part must match prefix or error * this could mean we've got something like "rtr1-a2" * so just record an error */ if (pos > 0) { if (pos != strlen(prefix) || strncmp(prefix, tok, pos) != 0) error = 1; } if (*tok != '\0') tok += pos; /* make sure we have digits to the end */ for (pos = 0; tok[pos] && isdigit((char) tok[pos]); ++pos) {;} if (pos > 0) { /* we have digits to process */ high = strtoul(tok, (char **) &tok, 10); } else { /* bad boy, no digits */ error = 1; } if ((low > high) || (high - low > MAX_RANGE)) error = 1; } else { /* single value */ high = 0; /* special case, ugh. */ } /* error if: * 1. we are not at end of string * 2. upper bound equals lower bound */ if (*tok != '\0' || high == low) error = 1; if (error) { /* assume this is not a range on any error */ hostlist_push_host(new, cur); } else { if (high < low) high = low; hostlist_push_hr(new, prefix, low, high, fmt); } error = 0; } done: free(orig); return new; } #else /* !WANT_RECKLESS_HOSTRANGE_EXPANSION */ hostlist_t _hostlist_create(const char *hostlist, char *sep, char *r_op) { return _hostlist_create_bracketed(hostlist, sep, r_op); } #endif /* WANT_RECKLESS_HOSTRANGE_EXPANSION */ struct _range { unsigned long lo, hi; int width; }; /* Grab a single range from str * returns 1 if str contained a valid number or range, * 0 if conversion of str to a range failed. */ static int _parse_single_range(const char *str, struct _range *range) { char *p, *q; char *orig = strdup(str); if (!orig) seterrno_ret(ENOMEM, 0); if ((p = strchr(str, '-'))) { *p++ = '\0'; if (*p == '-') /* do NOT allow negative numbers */ goto error; } range->lo = strtoul(str, &q, 10); if (q == str) goto error; range->hi = (p && *p) ? strtoul(p, &q, 10) : range->lo; if (q == p || *q != '\0') goto error; if (range->lo > range->hi) goto error; if (range->hi - range->lo + 1 > MAX_RANGE ) { _error(__FILE__, __LINE__, "Too many hosts in range `%s'", orig); free(orig); seterrno_ret(ERANGE, 0); } free(orig); range->width = strlen(str); return 1; error: _error(__FILE__, __LINE__, "Invalid range: `%s'", orig); free(orig); seterrno_ret(EINVAL, 0); } /* * Convert 'str' containing comma separated digits and ranges into an array * of struct _range types (max 'len' elements). * * Return number of ranges created, or -1 on error. */ static int _parse_range_list(char *str, struct _range *ranges, int len) { char *p; int count = 0; while (str) { if (count == len) return -1; if ((p = strchr(str, ','))) *p++ = '\0'; if (!_parse_single_range(str, &ranges[count++])) return -1; str = p; } return count; } static void _push_range_list(hostlist_t hl, char *pfx, struct _range *rng, int n) { int i; for (i = 0; i < n; i++) { hostlist_push_hr(hl, pfx, rng->lo, rng->hi, rng->width); rng++; } } static void _push_range_list_with_suffix(hostlist_t hl, char *pfx, char *sfx, struct _range *rng, int n) { int i; unsigned long j; for (i = 0; i < n; i++) { for (j = rng->lo; j <= rng->hi; j++) { char host[4096]; hostrange_t hr; snprintf (host, 4096, "%s%0*lu%s", pfx, rng->width, j, sfx); hr = hostrange_create_single (host); hostlist_push_range (hl, hr); /* * hr is copied in hostlist_push_range. Need to free here. */ hostrange_destroy (hr); } rng++; } } /* * Create a hostlist from a string with brackets '[' ']' to aid * detection of ranges and compressed lists */ static hostlist_t _hostlist_create_bracketed(const char *hostlist, char *sep, char *r_op) { hostlist_t new = hostlist_new(); struct _range ranges[MAX_RANGES]; int nr, err; char *p, *tok, *str, *orig; char cur_tok[1024]; if (hostlist == NULL) return new; if (!(orig = str = strdup(hostlist))) { hostlist_destroy(new); return NULL; } while ((tok = _next_tok(sep, &str)) != NULL) { strncpy(cur_tok, tok, 1024); if ((p = strchr(tok, '[')) != NULL) { char *q, *prefix = tok; *p++ = '\0'; if ((q = strchr(p, ']'))) { *q = '\0'; nr = _parse_range_list(p, ranges, MAX_RANGES); if (nr < 0) goto error; if (*(++q) != '\0') _push_range_list_with_suffix (new, prefix, q, ranges, nr); else _push_range_list(new, prefix, ranges, nr); } else hostlist_push_host(new, cur_tok); } else hostlist_push_host(new, cur_tok); } free(orig); return new; error: err = errno; hostlist_destroy(new); free(orig); seterrno_ret(err, NULL); } hostlist_t hostlist_create(const char *str) { return _hostlist_create(str, "\t, ", "-"); } hostlist_t hostlist_copy(const hostlist_t hl) { int i; hostlist_t new; if (hl == NULL) return NULL; LOCK_HOSTLIST(hl); if (!(new = hostlist_new())) goto done; new->nranges = hl->nranges; new->nhosts = hl->nhosts; if (new->nranges > new->size) hostlist_resize(new, new->nranges); for (i = 0; i < hl->nranges; i++) new->hr[i] = hostrange_copy(hl->hr[i]); done: UNLOCK_HOSTLIST(hl); return new; } void hostlist_destroy(hostlist_t hl) { int i; if (hl == NULL) return; LOCK_HOSTLIST(hl); while (hl->ilist) { mutex_unlock(&hl->mutex); hostlist_iterator_destroy(hl->ilist); mutex_lock(&hl->mutex); } for (i = 0; i < hl->nranges; i++) hostrange_destroy(hl->hr[i]); free(hl->hr); assert(hl->magic = 0x1); UNLOCK_HOSTLIST(hl); mutex_destroy(&hl->mutex); free(hl); } int hostlist_push(hostlist_t hl, const char *hosts) { hostlist_t new; int retval; if (hosts == NULL) return 0; new = hostlist_create(hosts); if (!new) return 0; mutex_lock(&new->mutex); retval = new->nhosts; mutex_unlock(&new->mutex); hostlist_push_list(hl, new); hostlist_destroy(new); return retval; } int hostlist_push_host(hostlist_t hl, const char *str) { hostrange_t hr; hostname_t hn; if (str == NULL) return 0; hn = hostname_create(str); if (hostname_suffix_is_valid(hn)) { hr = hostrange_create(hn->prefix, hn->num, hn->num, hostname_suffix_width(hn)); } else hr = hostrange_create_single(str); hostlist_push_range(hl, hr); hostrange_destroy(hr); hostname_destroy(hn); return 1; } int hostlist_push_list(hostlist_t h1, hostlist_t h2) { int i, n = 0; if (h2 == NULL) return 0; LOCK_HOSTLIST(h2); for (i = 0; i < h2->nranges; i++) n += hostlist_push_range(h1, h2->hr[i]); UNLOCK_HOSTLIST(h2); return n; } char *hostlist_pop(hostlist_t hl) { char *host = NULL; LOCK_HOSTLIST(hl); if (hl->nhosts > 0) { hostrange_t hr = hl->hr[hl->nranges - 1]; host = hostrange_pop(hr); hl->nhosts--; if (hostrange_empty(hr)) { hostrange_destroy(hl->hr[--hl->nranges]); hl->hr[hl->nranges] = NULL; } } UNLOCK_HOSTLIST(hl); return host; } /* find all iterators affected by a shift (or deletion) at * hl->hr[idx], depth, with the deletion of n ranges */ static void hostlist_shift_iterators(hostlist_t hl, int idx, int depth, int n) { hostlist_iterator_t i; for (i = hl->ilist; i; i = i->next) { if (n == 0) { if (i->idx == idx && i->depth >= depth) i->depth = i->depth > -1 ? i->depth - 1 : -1; } else { if (i->idx >= idx) { if ((i->idx -= n) >= 0) i->hr = i->hl->hr[i->idx]; else hostlist_iterator_reset(i); } } } } char *hostlist_shift(hostlist_t hl) { char *host = NULL; LOCK_HOSTLIST(hl); if (hl->nhosts > 0) { hostrange_t hr = hl->hr[0]; host = hostrange_shift(hr); hl->nhosts--; if (hostrange_empty(hr)) { hostlist_delete_range(hl, 0); /* hl->nranges--; */ } else hostlist_shift_iterators(hl, 0, 0, 0); } UNLOCK_HOSTLIST(hl); return host; } char *hostlist_pop_range(hostlist_t hl) { int i; char buf[MAXHOSTRANGELEN + 1]; hostlist_t hltmp; hostrange_t tail; LOCK_HOSTLIST(hl); if (hl->nranges < 1 || !(hltmp = hostlist_new())) { UNLOCK_HOSTLIST(hl); return NULL; } i = hl->nranges - 2; tail = hl->hr[hl->nranges - 1]; while (i >= 0 && hostrange_within_range(tail, hl->hr[i])) i--; for (i++; i < hl->nranges; i++) { hostlist_push_range(hltmp, hl->hr[i]); hostrange_destroy(hl->hr[i]); hl->hr[i] = NULL; } hl->nhosts -= hltmp->nhosts; hl->nranges -= hltmp->nranges; UNLOCK_HOSTLIST(hl); hostlist_ranged_string(hltmp, MAXHOSTRANGELEN, buf); hostlist_destroy(hltmp); return strdup(buf); } char *hostlist_shift_range(hostlist_t hl) { int i; char buf[1024]; hostlist_t hltmp = hostlist_new(); if (!hltmp) return NULL; LOCK_HOSTLIST(hl); if (hl->nranges == 0) { hostlist_destroy(hltmp); UNLOCK_HOSTLIST(hl); return NULL; } i = 0; do { hostlist_push_range(hltmp, hl->hr[i]); hostrange_destroy(hl->hr[i]); } while ( (++i < hl->nranges) && hostrange_within_range(hltmp->hr[0], hl->hr[i]) ); hostlist_shift_iterators(hl, i, 0, hltmp->nranges); /* shift rest of ranges back in hl */ for (; i < hl->nranges; i++) { hl->hr[i - hltmp->nranges] = hl->hr[i]; hl->hr[i] = NULL; } hl->nhosts -= hltmp->nhosts; hl->nranges -= hltmp->nranges; UNLOCK_HOSTLIST(hl); hostlist_ranged_string(hltmp, 1024, buf); hostlist_destroy(hltmp); return strdup(buf); } /* XXX: Note: efficiency improvements needed */ int hostlist_delete(hostlist_t hl, const char *hosts) { int n = 0; char *hostname = NULL; hostlist_t hltmp; if (!(hltmp = hostlist_create(hosts))) seterrno_ret(EINVAL, 0); while ((hostname = hostlist_pop(hltmp)) != NULL) { n += hostlist_delete_host(hl, hostname); free(hostname); } hostlist_destroy(hltmp); return n; } /* XXX watch out! poor implementation follows! (fix it at some point) */ int hostlist_delete_host(hostlist_t hl, const char *hostname) { int n = hostlist_find(hl, hostname); if (n >= 0) hostlist_delete_nth(hl, n); return n >= 0 ? 1 : 0; } static char * _hostrange_string(hostrange_t hr, int depth) { char buf[MAXHOSTNAMELEN + 16]; int len = snprintf(buf, MAXHOSTNAMELEN + 15, "%s", hr->prefix); if (!hr->singlehost) snprintf(buf+len, MAXHOSTNAMELEN+15 - len, "%0*lu", hr->width, hr->lo + depth); return strdup(buf); } char * hostlist_nth(hostlist_t hl, int n) { char *host = NULL; int i, count; LOCK_HOSTLIST(hl); count = 0; for (i = 0; i < hl->nranges; i++) { int num_in_range = hostrange_count(hl->hr[i]); if (n <= (num_in_range - 1 + count)) { host = _hostrange_string(hl->hr[i], n - count); break; } else count += num_in_range; } UNLOCK_HOSTLIST(hl); return host; } int hostlist_delete_nth(hostlist_t hl, int n) { int i, count; LOCK_HOSTLIST(hl); assert(n >= 0 && n <= hl->nhosts); count = 0; for (i = 0; i < hl->nranges; i++) { int num_in_range = hostrange_count(hl->hr[i]); hostrange_t hr = hl->hr[i]; if (n <= (num_in_range - 1 + count)) { unsigned long num = hr->lo + n - count; hostrange_t new; if (hr->singlehost) { /* this wasn't a range */ hostlist_delete_range(hl, i); } else if ((new = hostrange_delete_host(hr, num))) { hostlist_insert_range(hl, new, i + 1); hostrange_destroy(new); } else if (hostrange_empty(hr)) hostlist_delete_range(hl, i); goto done; } else count += num_in_range; } done: hl->nhosts--; UNLOCK_HOSTLIST(hl); return 1; } int hostlist_count(hostlist_t hl) { int retval; LOCK_HOSTLIST(hl); retval = hl->nhosts; UNLOCK_HOSTLIST(hl); return retval; } int hostlist_find(hostlist_t hl, const char *hostname) { int i, count, ret = -1; hostname_t hn; if (!hostname) return -1; hn = hostname_create(hostname); LOCK_HOSTLIST(hl); for (i = 0, count = 0; i < hl->nranges; i++) { int offset = hostrange_hn_within(hl->hr[i], hn); if (offset >= 0) { ret = count + offset; break; } else count += hostrange_count(hl->hr[i]); } UNLOCK_HOSTLIST(hl); hostname_destroy(hn); return ret; } /* hostrange compare with void * arguments to allow use with * libc qsort() */ int _cmp(const void *hr1, const void *hr2) { hostrange_t *h1 = (hostrange_t *) hr1; hostrange_t *h2 = (hostrange_t *) hr2; return hostrange_cmp((hostrange_t) * h1, (hostrange_t) * h2); } void hostlist_sort(hostlist_t hl) { hostlist_iterator_t i; LOCK_HOSTLIST(hl); if (hl->nranges <= 1) { UNLOCK_HOSTLIST(hl); return; } qsort(hl->hr, hl->nranges, sizeof(hostrange_t), &_cmp); /* reset all iterators */ for (i = hl->ilist; i; i = i->next) hostlist_iterator_reset(i); UNLOCK_HOSTLIST(hl); hostlist_coalesce(hl); } /* search through hostlist for ranges that can be collapsed * does =not= delete any hosts */ static void hostlist_collapse(hostlist_t hl) { int i; LOCK_HOSTLIST(hl); for (i = hl->nranges - 1; i > 0; i--) { hostrange_t hprev = hl->hr[i - 1]; hostrange_t hnext = hl->hr[i]; if (hostrange_prefix_cmp(hprev, hnext) == 0 && hprev->hi == hnext->lo - 1 && hostrange_width_combine(hprev, hnext)) { hprev->hi = hnext->hi; hostlist_delete_range(hl, i); } } UNLOCK_HOSTLIST(hl); } /* search through hostlist (hl) for intersecting ranges * split up duplicates and coalesce ranges where possible */ static void hostlist_coalesce(hostlist_t hl) { int i, j; hostrange_t new; LOCK_HOSTLIST(hl); for (i = hl->nranges - 1; i > 0; i--) { new = hostrange_intersect(hl->hr[i - 1], hl->hr[i]); if (new) { hostrange_t hprev = hl->hr[i - 1]; hostrange_t hnext = hl->hr[i]; j = i; if (new->hi < hprev->hi) hnext->hi = hprev->hi; hprev->hi = new->lo; hnext->lo = new->hi; if (hostrange_empty(hprev)) hostlist_delete_range(hl, i); while (new->lo <= new->hi) { hostrange_t hr = hostrange_create( new->prefix, new->lo, new->lo, new->width ); if (new->lo > hprev->hi) hostlist_insert_range(hl, hr, j++); if (new->lo < hnext->lo) hostlist_insert_range(hl, hr, j++); hostrange_destroy(hr); new->lo++; } i = hl->nranges; hostrange_destroy(new); } } UNLOCK_HOSTLIST(hl); hostlist_collapse(hl); } /* attempt to join ranges at loc and loc-1 in a hostlist */ /* delete duplicates, return the number of hosts deleted */ /* assumes that the hostlist hl has been locked by caller */ /* returns -1 if no range join occurred */ static int _attempt_range_join(hostlist_t hl, int loc) { int ndup; assert(hl != NULL); assert(hl->magic == HOSTLIST_MAGIC); assert(loc > 0); assert(loc < hl->nranges); ndup = hostrange_join(hl->hr[loc - 1], hl->hr[loc]); if (ndup >= 0) { hostlist_delete_range(hl, loc); hl->nhosts -= ndup; } return ndup; } void hostlist_uniq(hostlist_t hl) { int i = 1; hostlist_iterator_t hli; LOCK_HOSTLIST(hl); if (hl->nranges <= 1) { UNLOCK_HOSTLIST(hl); return; } qsort(hl->hr, hl->nranges, sizeof(hostrange_t), &_cmp); while (i < hl->nranges) { if (_attempt_range_join(hl, i) < 0) /* No range join occurred */ i++; } /* reset all iterators */ for (hli = hl->ilist; hli; hli = hli->next) hostlist_iterator_reset(hli); UNLOCK_HOSTLIST(hl); } ssize_t hostlist_deranged_string(hostlist_t hl, size_t n, char *buf) { int i; int len = 0; int truncated = 0; LOCK_HOSTLIST(hl); for (i = 0; i < hl->nranges; i++) { size_t m = (n - len) <= n ? n - len : 0; int ret = hostrange_to_string(hl->hr[i], m, buf + len, ","); if (ret < 0 || ret > m) { len = n; truncated = 1; break; } len+=ret; buf[len++] = ','; } UNLOCK_HOSTLIST(hl); buf[len > 0 ? --len : 0] = '\0'; if (len == n) truncated = 1; return truncated ? -1 : len; } /* return true if a bracket is needed for the range at i in hostlist hl */ static int _is_bracket_needed(hostlist_t hl, int i) { hostrange_t h1 = hl->hr[i]; hostrange_t h2 = i < hl->nranges - 1 ? hl->hr[i + 1] : NULL; return hostrange_count(h1) > 1 || hostrange_within_range(h1, h2); } /* write the next bracketed hostlist, i.e. prefix[n-m,k,...] * into buf, writing at most n chars including the terminating '\0' * * leaves start pointing to one past last range object in bracketed list, * and returns the number of bytes written into buf. * * Assumes hostlist is locked. */ static int _get_bracketed_list(hostlist_t hl, int *start, const size_t n, char *buf) { hostrange_t *hr = hl->hr; int i = *start; int m, len = 0; int bracket_needed = _is_bracket_needed(hl, i); len = snprintf(buf, n, "%s", hr[i]->prefix); if ((len < 0) || (len > n)) return n; /* truncated, buffer filled */ if (bracket_needed && len < n && len >= 0) buf[len++] = '['; do { m = (n - len) <= n ? n - len : 0; len += hostrange_numstr(hr[i], m, buf + len); if (len >= n) break; if (bracket_needed) /* Only need commas inside brackets */ buf[len++] = ','; } while (++i < hl->nranges && hostrange_within_range(hr[i], hr[i-1])); if (bracket_needed && len < n && len > 0) { /* Add trailing bracket (change trailing "," from above to "]" */ buf[len - 1] = ']'; /* NUL terminate for safety, but do not add terminator to len */ buf[len] = '\0'; } else if (len >= n) { if (n > 0) buf[n-1] = '\0'; } else { /* If len is > 0, NUL terminate (but do not add to len) */ buf[len > 0 ? len : 0] = '\0'; } *start = i; return len; } ssize_t hostlist_ranged_string(hostlist_t hl, size_t n, char *buf) { int i = 0; int len = 0; int truncated = 0; LOCK_HOSTLIST(hl); while (i < hl->nranges && len < n) { len += _get_bracketed_list(hl, &i, n - len, buf + len); if ((len > 0) && (len < n) && (i < hl->nranges)) buf[len++] = ','; } UNLOCK_HOSTLIST(hl); /* NUL terminate */ if (len >= n) { truncated = 1; if (n > 0) buf[n-1] = '\0'; } else buf[len > 0 ? len : 0] = '\0'; return truncated ? -1 : len; } /* ----[ hostlist iterator functions ]---- */ static hostlist_iterator_t hostlist_iterator_new(void) { hostlist_iterator_t i = (hostlist_iterator_t) malloc(sizeof(*i)); if (!i) return NULL; i->hl = NULL; i->hr = NULL; i->idx = 0; i->depth = -1; i->next = i; assert(i->magic = HOSTLIST_MAGIC); return i; } hostlist_iterator_t hostlist_iterator_create(hostlist_t hl) { hostlist_iterator_t i; if (!(i = hostlist_iterator_new())) out_of_memory("hostlist_iterator_create"); LOCK_HOSTLIST(hl); i->hl = hl; i->hr = hl->hr[0]; i->next = hl->ilist; hl->ilist = i; UNLOCK_HOSTLIST(hl); return i; } hostlist_iterator_t hostset_iterator_create(hostset_t set) { return hostlist_iterator_create(set->hl); } void hostlist_iterator_reset(hostlist_iterator_t i) { assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); i->idx = 0; i->hr = i->hl->hr[0]; i->depth = -1; return; } void hostlist_iterator_destroy(hostlist_iterator_t i) { hostlist_iterator_t *pi; if (i == NULL) return; assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); LOCK_HOSTLIST(i->hl); for (pi = &i->hl->ilist; *pi; pi = &(*pi)->next) { assert((*pi)->magic == HOSTLIST_MAGIC); if (*pi == i) { *pi = (*pi)->next; break; } } UNLOCK_HOSTLIST(i->hl); assert(i->magic = 0x1); free(i); } static void _iterator_advance(hostlist_iterator_t i) { assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); if (i->idx > i->hl->nranges - 1) return; if (++(i->depth) > (i->hr->hi - i->hr->lo)) { i->depth = 0; i->hr = i->hl->hr[++i->idx]; } } /* advance iterator to end of current range (meaning within "[" "]") * i.e. advance iterator past all range objects that could be represented * in on bracketed hostlist. */ static void _iterator_advance_range(hostlist_iterator_t i) { int nr, j; hostrange_t *hr; assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); nr = i->hl->nranges; hr = i->hl->hr; j = i->idx; if (++i->depth > 0) { while (++j < nr && hostrange_within_range(i->hr, hr[j])) {;} i->idx = j; i->hr = i->hl->hr[i->idx]; i->depth = 0; } } char *hostlist_next(hostlist_iterator_t i) { char *buf = NULL; char suffix[16]; int len = 0; assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); LOCK_HOSTLIST(i->hl); _iterator_advance(i); if (i->idx > i->hl->nranges - 1) { UNLOCK_HOSTLIST(i->hl); return NULL; } suffix[0] = '\0'; if (!i->hr->singlehost) snprintf (suffix, 15, "%0*lu", i->hr->width, i->hr->lo + i->depth); len = strlen (i->hr->prefix) + strlen (suffix) + 1; if (!(buf = malloc (len))) out_of_memory("hostlist_next"); buf[0] = '\0'; strcat (buf, i->hr->prefix); strcat (buf, suffix); UNLOCK_HOSTLIST(i->hl); return (buf); } char *hostlist_next_range(hostlist_iterator_t i) { char buf[MAXHOSTRANGELEN + 1]; int j; assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); LOCK_HOSTLIST(i->hl); _iterator_advance_range(i); if (i->idx > i->hl->nranges - 1) { UNLOCK_HOSTLIST(i->hl); return NULL; } j = i->idx; _get_bracketed_list(i->hl, &j, MAXHOSTRANGELEN, buf); UNLOCK_HOSTLIST(i->hl); return strdup(buf); } int hostlist_remove(hostlist_iterator_t i) { hostrange_t new; assert(i != NULL); assert(i->magic == HOSTLIST_MAGIC); LOCK_HOSTLIST(i->hl); new = hostrange_delete_host(i->hr, i->hr->lo + i->depth); if (new) { hostlist_insert_range(i->hl, new, i->idx + 1); hostrange_destroy(new); i->hr = i->hl->hr[++i->idx]; i->depth = -1; } else if (hostrange_empty(i->hr)) { hostlist_delete_range(i->hl, i->idx); } else i->depth--; i->hl->nhosts--; UNLOCK_HOSTLIST(i->hl); return 1; } /* ----[ hostset functions ]---- */ hostset_t hostset_create(const char *hostlist) { hostset_t new; if (!(new = (hostset_t) malloc(sizeof(*new)))) goto error1; if (!(new->hl = hostlist_create(hostlist))) goto error2; hostlist_uniq(new->hl); return new; error2: free(new); error1: return NULL; } hostset_t hostset_copy(const hostset_t set) { hostset_t new; if (!(new = (hostset_t) malloc(sizeof(*new)))) goto error1; if (!(new->hl = hostlist_copy(set->hl))) goto error2; return new; error2: free(new); error1: return NULL; } void hostset_destroy(hostset_t set) { if (set == NULL) return; hostlist_destroy(set->hl); free(set); } /* inserts a single range object into a hostset * Assumes that the set->hl lock is already held * Updates hl->nhosts */ static int hostset_insert_range(hostset_t set, hostrange_t hr) { int i = 0; int inserted = 0; int nhosts = 0; int ndups = 0; hostlist_t hl; hl = set->hl; if (hl->size == hl->nranges && !hostlist_expand(hl)) return 0; nhosts = hostrange_count(hr); for (i = 0; i < hl->nranges; i++) { if (hostrange_cmp(hr, hl->hr[i]) <= 0) { if ((ndups = hostrange_join(hr, hl->hr[i])) >= 0) hostlist_delete_range(hl, i); else if (ndups < 0) ndups = 0; hostlist_insert_range(hl, hr, i); /* now attempt to join hr[i] and hr[i-1] */ if (i > 0) { int m; if ((m = _attempt_range_join(hl, i)) > 0) ndups += m; } hl->nhosts += nhosts - ndups; inserted = 1; break; } } if (inserted == 0) { hl->hr[hl->nranges++] = hostrange_copy(hr); hl->nhosts += nhosts; if (hl->nranges > 1) { if ((ndups = _attempt_range_join(hl, hl->nranges - 1)) <= 0) ndups = 0; } } /* * Return the number of unique hosts inserted */ return nhosts - ndups; } int hostset_insert(hostset_t set, const char *hosts) { int i, n = 0; hostlist_t hl = hostlist_create(hosts); if (!hl) return 0; hostlist_uniq(hl); LOCK_HOSTLIST(set->hl); for (i = 0; i < hl->nranges; i++) n += hostset_insert_range(set, hl->hr[i]); UNLOCK_HOSTLIST(set->hl); hostlist_destroy(hl); return n; } /* linear search through N ranges for hostname "host" * */ static int hostset_find_host(hostset_t set, const char *host) { int i; int retval = 0; hostname_t hn; LOCK_HOSTLIST(set->hl); hn = hostname_create(host); for (i = 0; i < set->hl->nranges; i++) { if (hostrange_hn_within(set->hl->hr[i], hn) >= 0) { retval = 1; goto done; } } done: UNLOCK_HOSTLIST(set->hl); hostname_destroy(hn); return retval; } int hostset_within(hostset_t set, const char *hosts) { int nhosts, nfound; hostlist_t hl; char *hostname; assert(set->hl->magic == HOSTLIST_MAGIC); if (!(hl = hostlist_create(hosts))) return (0); nhosts = hostlist_count(hl); nfound = 0; while ((hostname = hostlist_pop(hl)) != NULL) { nfound += hostset_find_host(set, hostname); free(hostname); } hostlist_destroy(hl); return (nhosts == nfound); } int hostset_delete(hostset_t set, const char *hosts) { return hostlist_delete(set->hl, hosts); } int hostset_delete_host(hostset_t set, const char *hostname) { return hostlist_delete_host(set->hl, hostname); } char *hostset_shift(hostset_t set) { return hostlist_shift(set->hl); } char *hostset_pop(hostset_t set) { return hostlist_pop(set->hl); } char *hostset_shift_range(hostset_t set) { return hostlist_shift_range(set->hl); } char *hostset_pop_range(hostset_t set) { return hostlist_pop_range(set->hl); } int hostset_count(hostset_t set) { return hostlist_count(set->hl); } ssize_t hostset_ranged_string(hostset_t set, size_t n, char *buf) { return hostlist_ranged_string(set->hl, n, buf); } ssize_t hostset_deranged_string(hostset_t set, size_t n, char *buf) { return hostlist_deranged_string(set->hl, n, buf); } #if TEST_MAIN int hostlist_nranges(hostlist_t hl) { return hl->nranges; } int hostset_nranges(hostset_t set) { return set->hl->nranges; } /* test iterator functionality on the list of hosts represented * by list */ int iterator_test(char *list) { int j; char buf[1024]; hostlist_t hl = hostlist_create(list); hostset_t set = hostset_create(list); hostlist_iterator_t i = hostlist_iterator_create(hl); hostlist_iterator_t seti = hostset_iterator_create(set); hostlist_iterator_t i2 = hostlist_iterator_create(hl); char *host; hostlist_ranged_string(hl, 1024, buf); printf("iterator_test: hl = `%s' passed in `%s'\n", buf, list); host = hostlist_next(i); printf("first host in list hl = `%s'\n", host); free(host); /* forge ahead three hosts with i2 */ for (j = 0; j < 4; j++) { host = hostlist_next(i2); free(host); } host = hostlist_shift(hl); printf("result of shift(hl) = `%s'\n", host); free(host); host = hostlist_next(i); printf("next host in list hl = `%s'\n", host); free(host); host = hostlist_next(i2); printf("next host for i2 = `%s'\n", host); free(host); hostlist_iterator_destroy(i); hostlist_destroy(hl); hostset_destroy(set); return 1; } int main(int ac, char **av) { char buf[1024000]; int i; char *str; hostlist_t hl1, hl2, hl3; hostset_t set, set1; hostlist_iterator_t iter, iter2; if (!(hl1 = hostlist_create(ac > 1 ? av[1] : NULL))) perror("hostlist_create"); if (!(set = hostset_create(ac > 1 ? av[1] : NULL))) perror("hostlist_create"); hl3 = hostlist_create("f[0-5]"); hostlist_delete(hl3, "f[1-3]"); hostlist_ranged_string(hl3, 102400, buf); printf("after delete = `%s'\n", buf); hostlist_destroy(hl3); for (i = 2; i < ac; i++) { hostlist_push(hl1, av[i]); hostset_insert(set, av[i]); } hostlist_ranged_string(hl1, 102400, buf); printf("ranged = `%s'\n", buf); iterator_test(buf); hostlist_deranged_string(hl1, 10240, buf); printf("deranged = `%s'\n", buf); hostset_ranged_string(set, 1024, buf); printf("hostset = `%s'\n", buf); hostlist_sort(hl1); hostlist_ranged_string(hl1, 1024, buf); printf("sorted = `%s'\n", buf); hostlist_uniq(hl1); hostlist_ranged_string(hl1, 1024, buf); printf("uniqed = `%s'\n", buf); hl2 = hostlist_copy(hl1); printf("pop_range: "); while ((str = hostlist_pop_range(hl2))) { printf("`%s' ", str); free(str); } hostlist_destroy(hl2); printf("\n"); hl2 = hostlist_copy(hl1); printf("shift_range: "); while ((str = hostlist_shift_range(hl2))) { printf("`%s' ", str); free(str); } hostlist_destroy(hl2); printf("\n"); iter = hostset_iterator_create(set); iter2 = hostset_iterator_create(set); hostlist_iterator_destroy(iter2); printf("next: "); while ((str = hostlist_next(iter))) { printf("`%s' ", str); free(str); } printf("\n"); hostlist_iterator_reset(iter); printf("next_range: "); while ((str = hostlist_next_range(iter))) { printf("`%s' ", str); free(str); } printf("\n"); printf("nranges = %d\n", hostset_nranges(set)); hostset_ranged_string(set, 1024, buf); printf("set = %s\n", buf); hostset_destroy(set); hostlist_destroy(hl1); return 0; } #endif /* TEST_MAIN */ /* * vi: tabstop=4 shiftwidth=4 expandtab */ freeipmi-1.6.4/common/miscutil/hostlist.h0000644002055400205540000002725213527331635020435 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.h,v 1.3 2009-12-16 17:49:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Mark Grondona * UCRL-CODE-2002-040. * * This file is part of SLURM, a resource management program. * For details, see . * * SLURM is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * SLURM is distributed in the hope that it will be useful, but WITHOUT ANY * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more * details. * * You should have received a copy of the GNU General Public License along * with SLURM; if not, write to the Free Software Foundation, Inc., * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. \*****************************************************************************/ #ifndef _HOSTLIST_H #define _HOSTLIST_H #include /* Notes: * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find and external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an * error message to stderr. This macro may be redefined to invoke another * routine instead. e.g.: * * #define lsd_fatal_error(file,line,mesg) \ * error("%s:%s %s\n",file,line,mesg); * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. * */ /* The hostlist opaque data type * * A hostlist is a list of hostnames optimized for a prefixXXXX style * naming convention, where XXXX is a decimal, numeric suffix. */ typedef struct hostlist * hostlist_t; /* A hostset is a special case of a hostlist. It: * * 1. never contains duplicates * 2. is always sorted * (Note: sort occurs first on alphanumeric prefix -- where prefix * matches, numeric suffixes will be sorted *by value*) */ typedef struct hostset * hostset_t; /* The hostlist iterator type (may be used with a hostset as well) * used for non-destructive access to hostlist members. * */ typedef struct hostlist_iterator * hostlist_iterator_t; /* ----[ hostlist_t functions: ]---- */ /* ----[ hostlist creation and destruction ]---- */ /* * hostlist_create(): * * Create a new hostlist from a string representation. * * The string representation (str) may contain one or more hostnames or * bracketed hostlists separated by either `,' or whitespace. A bracketed * hostlist is denoted by a common prefix followed by a list of numeric * ranges contained within brackets: e.g. "tux[0-5,12,20-25]" * * Note: if this module is compiled with WANT_RECKLESS_HOSTRANGE_EXPANSION * defined, a much more loose interpretation of host ranges is used. * Reckless hostrange expansion allows all of the following (in addition to * bracketed hostlists): * * o tux0-5,tux12,tux20-25 * o tux0-tux5,tux12,tux20-tux25 * o tux0-5,12,20-25 * * If str is NULL, and empty hostlist is created and returned. * * If the create fails, hostlist_create() returns NULL. * * The returned hostlist must be freed with hostlist_destroy() * */ hostlist_t hostlist_create(const char *hostlist); /* hostlist_copy(): * * Allocate a copy of a hostlist object. Returned hostlist must be freed * with hostlist_destroy. */ hostlist_t hostlist_copy(const hostlist_t hl); /* hostlist_destroy(): * * Destroy a hostlist object. Frees all memory allocated to the hostlist. */ void hostlist_destroy(hostlist_t hl); /* ----[ hostlist list operations ]---- */ /* hostlist_push(): * * push a string representation of hostnames onto a hostlist. * * The hosts argument may take the same form as in hostlist_create() * * Returns the number of hostnames inserted into the list, * or 0 on failure. */ int hostlist_push(hostlist_t hl, const char *hosts); /* hostlist_push_host(): * * Push a single host onto the hostlist hl. * This function is more efficient than hostlist_push() for a single * hostname, since the argument does not need to be checked for ranges. * * return value is 1 for success, 0 for failure. */ int hostlist_push_host(hostlist_t hl, const char *host); /* hostlist_push_list(): * * Push a hostlist (hl2) onto another list (hl1) * * Returns 1 for success, 0 for failure. * */ int hostlist_push_list(hostlist_t hl1, hostlist_t hl2); /* hostlist_pop(): * * Returns the string representation of the last host pushed onto the list * or NULL if hostlist is empty or there was an error allocating memory. * The host is removed from the hostlist. * * Note: Caller is responsible for freeing the returned memory. */ char * hostlist_pop(hostlist_t hl); char * hostlist_nth(hostlist_t hl, int n); /* hostlist_shift(): * * Returns the string representation of the first host in the hostlist * or NULL if the hostlist is empty or there was an error allocating memory. * The host is removed from the hostlist. * * Note: Caller is responsible for freeing the returned memory. */ char * hostlist_shift(hostlist_t hl); /* hostlist_pop_range(): * * Pop the last bracketed list of hosts of the hostlist hl. * Returns the string representation in bracketed list form. * All hosts associated with the returned list are removed * from hl. * * Caller is responsible for freeing returned memory */ char * hostlist_pop_range(hostlist_t hl); /* hostlist_shift_range(): * * Shift the first bracketed hostlist (improperly: range) off the * hostlist hl. Returns the string representation in bracketed list * form. All hosts associated with the list are removed from the * hostlist. * * Caller is responsible for freeing returned memory. */ char * hostlist_shift_range(hostlist_t hl); /* hostlist_find(): * * Searches hostlist hl for the first host matching hostname * and returns position in list if found. * * Returns -1 if host is not found. * */ int hostlist_find(hostlist_t hl, const char *hostname); /* hostlist_delete(): * * Deletes all hosts in the list represented by `hosts' * * Returns the number of hosts successfully deleted */ int hostlist_delete(hostlist_t hl, const char *hosts); /* hostlist_delete_host(): * * Deletes the first host that matches `hostname' from the hostlist hl. * Note: "hostname" argument cannot contain a range of hosts * (see hostlist_delete() for this functionality.) * * Returns 1 if successful, 0 if hostname is not found in list. */ int hostlist_delete_host(hostlist_t hl, const char *hostname); /* hostlist_delete_nth(): * * Deletes the host from position n in the hostlist. * * Returns 1 if successful 0 on error. * */ int hostlist_delete_nth(hostlist_t hl, int n); /* hostlist_count(): * * Return the number of hosts in hostlist hl. */ int hostlist_count(hostlist_t hl); /* hostlist_is_empty(): return true if hostlist is empty. */ #define hostlist_is_empty(__hl) ( hostlist_count(__hl) == 0 ) /* ----[ Other hostlist operations ]---- */ /* hostlist_sort(): * * Sort the hostlist hl. * */ void hostlist_sort(hostlist_t hl); /* hostlist_uniq(): * * Sort the hostlist hl and remove duplicate entries. * */ void hostlist_uniq(hostlist_t hl); /* ----[ hostlist print functions ]---- */ /* hostlist_ranged_string(): * * Write the string representation of the hostlist hl into buf, * writing at most n chars. Returns the number of bytes written, * or -1 if truncation occurred. * * The result will be NULL terminated. * * hostlist_ranged_string() will write a bracketed hostlist representation * where possible. */ ssize_t hostlist_ranged_string(hostlist_t hl, size_t n, char *buf); ssize_t hostset_ranged_string(hostset_t hs, size_t n, char *buf); /* hostlist_deranged_string(): * * Writes the string representation of the hostlist hl into buf, * writing at most n chars. Returns the number of bytes written, * or -1 if truncation occurred. * * hostlist_deranged_string() will not attempt to write a bracketed * hostlist representation. Every hostname will be explicitly written. */ ssize_t hostlist_deranged_string(hostlist_t hl, size_t n, char *buf); ssize_t hostset_deranged_string(hostset_t hs, size_t n, char *buf); /* ----[ hostlist utility functions ]---- */ /* hostlist_nranges(): * * Return the number of ranges currently held in hostlist hl. */ int hostlist_nranges(hostlist_t hl); /* ----[ hostlist iterator functions ]---- */ /* hostlist_iterator_create(): * * Creates and returns a hostlist iterator used for non destructive * access to a hostlist or hostset. Returns NULL on failure. */ hostlist_iterator_t hostlist_iterator_create(hostlist_t hl); /* hostset_iterator_create(): * * Same as hostlist_iterator_create(), but creates a hostlist_iterator * from a hostset. */ hostlist_iterator_t hostset_iterator_create(hostset_t set); /* hostlist_iterator_destroy(): * * Destroys a hostlist iterator. */ void hostlist_iterator_destroy(hostlist_iterator_t i); /* hostlist_iterator_reset(): * * Reset an iterator to the beginning of the list. */ void hostlist_iterator_reset(hostlist_iterator_t i); /* hostlist_next(): * * Returns a pointer to the next hostname on the hostlist * or NULL at the end of the list * * The caller is responsible for freeing the returned memory. */ char * hostlist_next(hostlist_iterator_t i); /* hostlist_next_range(): * * Returns the next bracketed hostlist or NULL if the iterator i is * at the end of the list. * * The caller is responsible for freeing the returned memory. * */ char * hostlist_next_range(hostlist_iterator_t i); /* hostlist_remove(): * Removes the last host returned by hostlist iterator i * * Returns 1 for success, 0 for failure. */ int hostlist_remove(hostlist_iterator_t i); /* ----[ hostset operations ]---- */ /* hostset_create(): * * Create a new hostset object from a string representation of a list of * hosts. See hostlist_create() for valid hostlist forms. */ hostset_t hostset_create(const char *hostlist); /* hostset_copy(): * * Copy a hostset object. Returned set must be freed with hostset_destroy(). */ hostset_t hostset_copy(hostset_t set); /* hostset_destroy(): */ void hostset_destroy(hostset_t set); /* hostset_insert(): * Add a host or list of hosts into hostset "set." * * Returns number of hosts successfully added to "set" * (insertion of a duplicate is not considered successful) */ int hostset_insert(hostset_t set, const char *hosts); /* hostset_delete(): * Delete a host or list of hosts from hostset "set." * Returns number of hosts deleted from set. */ int hostset_delete(hostset_t set, const char *hosts); /* hostset_within(): * Return 1 if all hosts specified by "hosts" are within the hostset "set" * Retrun 0 if every host in "hosts" is not in the hostset "set" */ int hostset_within(hostset_t set, const char *hosts); /* hostset_shift(): * hostset equivalent to hostlist_shift() */ char * hostset_shift(hostset_t set); /* hostset_shift_range(): * hostset eqivalent to hostlist_shift_range() */ char * hostset_shift_range(hostset_t set); /* hostset_count(): * Count the number of hosts currently in hostset */ int hostset_count(hostset_t set); #endif /* !_HOSTLIST_H */ freeipmi-1.6.4/common/miscutil/list.c0000644002055400205540000005157213527331635017534 0ustar00achuachu00000000000000/***************************************************************************** * $Id: list.c,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ***************************************************************************** * Refer to "list.h" for documentation on public functions. *****************************************************************************/ #ifdef HAVE_CONFIG_H # include "config.h" #endif /* HAVE_CONFIG_H */ #if HAVE_PTHREAD_H # include #endif /* HAVE_PTHREAD_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include "list.h" /********************* * lsd_fatal_error * *********************/ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error(char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # include # include # include # define lsd_fatal_error(file, line, mesg) \ do { \ fprintf(stderr, "ERROR: [%s:%d] %s: %s\n", \ file, line, mesg, strerror(errno)); \ } while (0) # endif /* !lsd_fatal_error */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ /********************* * lsd_nomem_error * *********************/ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error(char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /*************** * Constants * ***************/ #define LIST_ALLOC 32 #define LIST_MAGIC 0xDEADBEEF /**************** * Data Types * ****************/ struct listNode { void *data; /* node's data */ struct listNode *next; /* next node in list */ }; struct listIterator { struct list *list; /* the list being iterated */ struct listNode *pos; /* the next node to be iterated */ struct listNode **prev; /* addr of 'next' ptr to prv It node */ struct listIterator *iNext; /* iterator chain for list_destroy() */ #ifndef NDEBUG unsigned int magic; /* sentinel for asserting validity */ #endif /* !NDEBUG */ }; struct list { struct listNode *head; /* head of the list */ struct listNode **tail; /* addr of last node's 'next' ptr */ struct listIterator *iNext; /* iterator chain for list_destroy() */ ListDelF fDel; /* function to delete node data */ int count; /* number of nodes in list */ #ifdef WITH_PTHREADS pthread_mutex_t mutex; /* mutex to protect access to list */ #endif /* WITH_PTHREADS */ #ifndef NDEBUG unsigned int magic; /* sentinel for asserting validity */ #endif /* !NDEBUG */ }; typedef struct listNode * ListNode; /**************** * Prototypes * ****************/ static void * list_node_create (List l, ListNode *pp, void *x); static void * list_node_destroy (List l, ListNode *pp); static List list_alloc (void); static void list_free (List l); static ListNode list_node_alloc (void); static void list_node_free (ListNode p); static ListIterator list_iterator_alloc (void); static void list_iterator_free (ListIterator i); static void * list_alloc_aux (int size, void *pfreelist); static void list_free_aux (void *x, void *pfreelist); /*************** * Variables * ***************/ static List list_free_lists = NULL; static ListNode list_free_nodes = NULL; static ListIterator list_free_iterators = NULL; #ifdef WITH_PTHREADS static pthread_mutex_t list_free_lock = PTHREAD_MUTEX_INITIALIZER; #endif /* WITH_PTHREADS */ /************ * Macros * ************/ #ifdef WITH_PTHREADS # define list_mutex_init(mutex) \ do { \ int e = pthread_mutex_init(mutex, NULL); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "list mutex init"); \ abort(); \ } \ } while (0) # define list_mutex_lock(mutex) \ do { \ int e = pthread_mutex_lock(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "list mutex lock"); \ abort(); \ } \ } while (0) # define list_mutex_unlock(mutex) \ do { \ int e = pthread_mutex_unlock(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "list mutex unlock"); \ abort(); \ } \ } while (0) # define list_mutex_destroy(mutex) \ do { \ int e = pthread_mutex_destroy(mutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error(__FILE__, __LINE__, "list mutex destroy"); \ abort(); \ } \ } while (0) # ifndef NDEBUG static int list_mutex_is_locked (pthread_mutex_t *mutex); # endif /* !NDEBUG */ #else /* !WITH_PTHREADS */ # define list_mutex_init(mutex) # define list_mutex_lock(mutex) # define list_mutex_unlock(mutex) # define list_mutex_destroy(mutex) # define list_mutex_is_locked(mutex) (1) #endif /* !WITH_PTHREADS */ /*************** * Functions * ***************/ List list_create (ListDelF f) { List l; if (!(l = list_alloc())) return(lsd_nomem_error(__FILE__, __LINE__, "list create")); l->head = NULL; l->tail = &l->head; l->iNext = NULL; l->fDel = f; l->count = 0; list_mutex_init(&l->mutex); assert(l->magic = LIST_MAGIC); /* set magic via assert abuse */ return(l); } void list_destroy (List l) { ListIterator i, iTmp; ListNode p, pTmp; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); i = l->iNext; while (i) { assert(i->magic == LIST_MAGIC); iTmp = i->iNext; assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ list_iterator_free(i); i = iTmp; } p = l->head; while (p) { pTmp = p->next; if (p->data && l->fDel) l->fDel(p->data); list_node_free(p); p = pTmp; } assert(l->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ list_mutex_unlock(&l->mutex); list_mutex_destroy(&l->mutex); list_free(l); return; } int list_is_empty (List l) { int n; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); n = l->count; list_mutex_unlock(&l->mutex); return(n == 0); } int list_count (List l) { int n; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); n = l->count; list_mutex_unlock(&l->mutex); return(n); } void * list_append (List l, void *x) { void *v; assert(l != NULL); assert(x != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_create(l, l->tail, x); list_mutex_unlock(&l->mutex); return(v); } void * list_prepend (List l, void *x) { void *v; assert(l != NULL); assert(x != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_create(l, &l->head, x); list_mutex_unlock(&l->mutex); return(v); } void * list_find_first (List l, ListFindF f, void *key) { ListNode p; void *v = NULL; assert(l != NULL); assert(f != NULL); assert(key != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); for (p=l->head; p; p=p->next) { if (f(p->data, key)) { v = p->data; break; } } list_mutex_unlock(&l->mutex); return(v); } int list_delete_all (List l, ListFindF f, void *key) { ListNode *pp; void *v; int n = 0; assert(l != NULL); assert(f != NULL); assert(key != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); pp = &l->head; while (*pp) { if (f((*pp)->data, key)) { if ((v = list_node_destroy(l, pp))) { if (l->fDel) l->fDel(v); n++; } } else { pp = &(*pp)->next; } } list_mutex_unlock(&l->mutex); return(n); } int list_for_each (List l, ListForF f, void *arg) { ListNode p; int n = 0; assert(l != NULL); assert(f != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); for (p=l->head; p; p=p->next) { n++; if (f(p->data, arg) < 0) { n = -n; break; } } list_mutex_unlock(&l->mutex); return(n); } void list_sort (List l, ListCmpF f) { /* Note: Time complexity O(n^2). */ ListNode *pp, *ppPrev, *ppPos, pTmp; ListIterator i; assert(l != NULL); assert(f != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); if (l->count > 1) { ppPrev = &l->head; pp = &(*ppPrev)->next; while (*pp) { if (f((*pp)->data, (*ppPrev)->data) < 0) { ppPos = &l->head; while (f((*pp)->data, (*ppPos)->data) >= 0) ppPos = &(*ppPos)->next; pTmp = (*pp)->next; (*pp)->next = *ppPos; *ppPos = *pp; *pp = pTmp; if (ppPrev == ppPos) ppPrev = &(*ppPrev)->next; } else { ppPrev = pp; pp = &(*pp)->next; } } l->tail = pp; for (i=l->iNext; i; i=i->iNext) { assert(i->magic == LIST_MAGIC); i->pos = i->list->head; i->prev = &i->list->head; } } list_mutex_unlock(&l->mutex); return; } void * list_push (List l, void *x) { void *v; assert(l != NULL); assert(x != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_create(l, &l->head, x); list_mutex_unlock(&l->mutex); return(v); } void * list_pop (List l) { void *v; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_destroy(l, &l->head); list_mutex_unlock(&l->mutex); return(v); } void * list_peek (List l) { void *v; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = (l->head) ? l->head->data : NULL; list_mutex_unlock(&l->mutex); return(v); } void * list_enqueue (List l, void *x) { void *v; assert(l != NULL); assert(x != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_create(l, l->tail, x); list_mutex_unlock(&l->mutex); return(v); } void * list_dequeue (List l) { void *v; assert(l != NULL); list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); v = list_node_destroy(l, &l->head); list_mutex_unlock(&l->mutex); return(v); } ListIterator list_iterator_create (List l) { ListIterator i; assert(l != NULL); if (!(i = list_iterator_alloc())) return(lsd_nomem_error(__FILE__, __LINE__, "list iterator create")); i->list = l; list_mutex_lock(&l->mutex); assert(l->magic == LIST_MAGIC); i->pos = l->head; i->prev = &l->head; i->iNext = l->iNext; l->iNext = i; assert(i->magic = LIST_MAGIC); /* set magic via assert abuse */ list_mutex_unlock(&l->mutex); return(i); } void list_iterator_reset (ListIterator i) { assert(i != NULL); assert(i->magic == LIST_MAGIC); list_mutex_lock(&i->list->mutex); assert(i->list->magic == LIST_MAGIC); i->pos = i->list->head; i->prev = &i->list->head; list_mutex_unlock(&i->list->mutex); return; } void list_iterator_destroy (ListIterator i) { ListIterator *pi; assert(i != NULL); assert(i->magic == LIST_MAGIC); list_mutex_lock(&i->list->mutex); assert(i->list->magic == LIST_MAGIC); for (pi=&i->list->iNext; *pi; pi=&(*pi)->iNext) { assert((*pi)->magic == LIST_MAGIC); if (*pi == i) { *pi = (*pi)->iNext; break; } } list_mutex_unlock(&i->list->mutex); assert(i->magic = ~LIST_MAGIC); /* clear magic via assert abuse */ list_iterator_free(i); return; } void * list_next (ListIterator i) { ListNode p; assert(i != NULL); assert(i->magic == LIST_MAGIC); list_mutex_lock(&i->list->mutex); assert(i->list->magic == LIST_MAGIC); if ((p = i->pos)) i->pos = p->next; if (*i->prev != p) i->prev = &(*i->prev)->next; list_mutex_unlock(&i->list->mutex); return(p ? p->data : NULL); } void * list_insert (ListIterator i, void *x) { void *v; assert(i != NULL); assert(x != NULL); assert(i->magic == LIST_MAGIC); list_mutex_lock(&i->list->mutex); assert(i->list->magic == LIST_MAGIC); v = list_node_create(i->list, i->prev, x); list_mutex_unlock(&i->list->mutex); return(v); } void * list_find (ListIterator i, ListFindF f, void *key) { void *v; assert(i != NULL); assert(f != NULL); assert(key != NULL); assert(i->magic == LIST_MAGIC); while ((v=list_next(i)) && !f(v,key)) {;} return(v); } void * list_remove (ListIterator i) { void *v = NULL; assert(i != NULL); assert(i->magic == LIST_MAGIC); list_mutex_lock(&i->list->mutex); assert(i->list->magic == LIST_MAGIC); if (*i->prev != i->pos) v = list_node_destroy(i->list, i->prev); list_mutex_unlock(&i->list->mutex); return(v); } int list_delete (ListIterator i) { void *v; assert(i != NULL); assert(i->magic == LIST_MAGIC); if ((v = list_remove(i))) { if (i->list->fDel) i->list->fDel(v); return(1); } return(0); } static void * list_node_create (List l, ListNode *pp, void *x) { /* Inserts data pointed to by [x] into list [l] after [pp], * the address of the previous node's "next" ptr. * Returns a ptr to data [x], or NULL if insertion fails. * This routine assumes the list is already locked upon entry. */ ListNode p; ListIterator i; assert(l != NULL); assert(l->magic == LIST_MAGIC); assert(list_mutex_is_locked(&l->mutex)); assert(pp != NULL); assert(x != NULL); if (!(p = list_node_alloc())) return(lsd_nomem_error(__FILE__, __LINE__, "list node create")); p->data = x; if (!(p->next = *pp)) l->tail = &p->next; *pp = p; l->count++; for (i=l->iNext; i; i=i->iNext) { assert(i->magic == LIST_MAGIC); if (i->prev == pp) i->prev = &p->next; else if (i->pos == p->next) i->pos = p; assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); } return(x); } static void * list_node_destroy (List l, ListNode *pp) { /* Removes the node pointed to by [*pp] from from list [l], * where [pp] is the address of the previous node's "next" ptr. * Returns the data ptr associated with list item being removed, * or NULL if [*pp] points to the NULL element. * This routine assumes the list is already locked upon entry. */ void *v; ListNode p; ListIterator i; assert(l != NULL); assert(l->magic == LIST_MAGIC); assert(list_mutex_is_locked(&l->mutex)); assert(pp != NULL); if (!(p = *pp)) return(NULL); v = p->data; if (!(*pp = p->next)) l->tail = pp; l->count--; for (i=l->iNext; i; i=i->iNext) { assert(i->magic == LIST_MAGIC); if (i->pos == p) i->pos = p->next, i->prev = pp; else if (i->prev == &p->next) i->prev = pp; assert((i->pos == *i->prev) || (i->pos == (*i->prev)->next)); } list_node_free(p); return(v); } static List list_alloc (void) { return(list_alloc_aux(sizeof(struct list), &list_free_lists)); } static void list_free (List l) { list_free_aux(l, &list_free_lists); return; } static ListNode list_node_alloc (void) { return(list_alloc_aux(sizeof(struct listNode), &list_free_nodes)); } static void list_node_free (ListNode p) { list_free_aux(p, &list_free_nodes); return; } static ListIterator list_iterator_alloc (void) { return(list_alloc_aux(sizeof(struct listIterator), &list_free_iterators)); } static void list_iterator_free (ListIterator i) { list_free_aux(i, &list_free_iterators); return; } static void * list_alloc_aux (int size, void *pfreelist) { /* Allocates an object of [size] bytes from the freelist [*pfreelist]. * Memory is added to the freelist in chunks of size LIST_ALLOC. * Returns a ptr to the object, or NULL if the memory request fails. */ #if 0 void **px; void **pfree = pfreelist; void **plast; #else void *ptr; #endif assert(sizeof(char) == 1); assert(size >= sizeof(void *)); assert(pfreelist != NULL); assert(LIST_ALLOC > 0); list_mutex_lock(&list_free_lock); #if 0 if (!*pfree) { if ((*pfree = malloc(LIST_ALLOC * size))) { px = *pfree; plast = (void **) ((char *) *pfree + ((LIST_ALLOC - 1) * size)); while (px < plast) *px = (char *) px + size, px = *px; *plast = NULL; } } if ((px = *pfree)) *pfree = *px; else errno = ENOMEM; #else if (!(ptr = malloc(size))) errno = ENOMEM; #endif list_mutex_unlock(&list_free_lock); #if 0 return(px); #else return(ptr); #endif } static void list_free_aux (void *x, void *pfreelist) { /* Frees the object [x], returning it to the freelist [*pfreelist]. */ #if 0 void **px = x; void **pfree = pfreelist; #endif assert(x != NULL); assert(pfreelist != NULL); list_mutex_lock(&list_free_lock); #if 0 *px = *pfree; *pfree = px; #else free(x); #endif list_mutex_unlock(&list_free_lock); return; } #ifndef NDEBUG #ifdef WITH_PTHREADS static int list_mutex_is_locked (pthread_mutex_t *mutex) { /* Returns true if the mutex is locked; o/w, returns false. */ int rc; assert(mutex != NULL); rc = pthread_mutex_trylock(mutex); return(rc == EBUSY ? 1 : 0); } #endif /* WITH_PTHREADS */ #endif /* !NDEBUG */ freeipmi-1.6.4/common/miscutil/list.h0000644002055400205540000002167113527331635017536 0ustar00achuachu00000000000000/***************************************************************************** * $Id: list.h,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2001-2002 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef LSD_LIST_H #define LSD_LIST_H /*********** * Notes * ***********/ /* * If NDEBUG is not defined, internal debug code will be enabled. This is * intended for development use only and production code should define NDEBUG. * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find an external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an * error message to stderr. This macro may be redefined to invoke another * routine instead. * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. */ /**************** * Data Types * ****************/ typedef struct list * List; /* * List opaque data type. */ typedef struct listIterator * ListIterator; /* * List Iterator opaque data type. */ typedef void (*ListDelF) (void *x); /* * Function prototype to deallocate data stored in a list. * This function is responsible for freeing all memory associated * with an item, including all subordinate items (if applicable). */ typedef int (*ListCmpF) (void *x, void *y); /* * Function prototype for comparing two items in a list. * Returns less-than-zero if (xy). */ typedef int (*ListFindF) (void *x, void *key); /* * Function prototype for matching items in a list. * Returns non-zero if (x==key); o/w returns zero. */ typedef int (*ListForF) (void *x, void *arg); /* * Function prototype for operating on each item in a list. * Returns less-than-zero on error. */ /******************************* * General-Purpose Functions * *******************************/ List list_create (ListDelF f); /* * Creates and returns a new empty list, or lsd_nomem_error() on failure. * The deletion function [f] is used to deallocate memory used by items * in the list; if this is NULL, memory associated with these items * will not be freed when the list is destroyed. * Note: Abandoning a list without calling list_destroy() will result * in a memory leak. */ void list_destroy (List l); /* * Destroys list [l], freeing memory used for list iterators and the * list itself; if a deletion function was specified when the list * was created, it will be called for each item in the list. */ int list_is_empty (List l); /* * Returns non-zero if list [l] is empty; o/w returns zero. */ int list_count (List l); /* * Returns the number of items in list [l]. */ /*************************** * List Access Functions * ***************************/ void * list_append (List l, void *x); /* * Inserts data [x] at the end of list [l]. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * list_prepend (List l, void *x); /* * Inserts data [x] at the beginning of list [l]. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * list_find_first (List l, ListFindF f, void *key); /* * Traverses list [l] using [f] to match each item with [key]. * Returns a ptr to the first item for which the function [f] * returns non-zero, or NULL if no such item is found. * Note: This function differs from list_find() in that it does not require * a list iterator; it should only be used when all list items are known * to be unique (according to the function [f]). */ int list_delete_all (List l, ListFindF f, void *key); /* * Traverses list [l] using [f] to match each item with [key]. * Removes all items from the list for which the function [f] returns * non-zero; if a deletion function was specified when the list was * created, it will be called to deallocate each item being removed. * Returns a count of the number of items removed from the list. */ int list_for_each (List l, ListForF f, void *arg); /* * For each item in list [l], invokes the function [f] with [arg]. * Returns a count of the number of items on which [f] was invoked. * If [f] returns <0 for a given item, the iteration is aborted and the * function returns the negative of that item's position in the list. */ void list_sort (List l, ListCmpF f); /* * Sorts list [l] into ascending order according to the function [f]. * Note: Sorting a list resets all iterators associated with the list. * Note: The sort algorithm is stable. */ /**************************** * Stack Access Functions * ****************************/ void * list_push (List l, void *x); /* * Pushes data [x] onto the top of stack [l]. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * list_pop (List l); /* * Pops the data item at the top of the stack [l]. * Returns the data's ptr, or NULL if the stack is empty. */ void * list_peek (List l); /* * Peeks at the data item at the top of the stack (or head of the queue) [l]. * Returns the data's ptr, or NULL if the stack (or queue) is empty. * Note: The item is not removed from the list. */ /**************************** * Queue Access Functions * ****************************/ void * list_enqueue (List l, void *x); /* * Enqueues data [x] at the tail of queue [l]. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * list_dequeue (List l); /* * Dequeues the data item at the head of the queue [l]. * Returns the data's ptr, or NULL if the queue is empty. */ /***************************** * List Iterator Functions * *****************************/ ListIterator list_iterator_create (List l); /* * Creates and returns a list iterator for non-destructively traversing * list [l], or lsd_nomem_error() on failure. */ void list_iterator_reset (ListIterator i); /* * Resets the list iterator [i] to start traversal at the beginning * of the list. */ void list_iterator_destroy (ListIterator i); /* * Destroys the list iterator [i]; list iterators not explicitly destroyed * in this manner will be destroyed when the list is deallocated via * list_destroy(). */ void * list_next (ListIterator i); /* * Returns a ptr to the next item's data, * or NULL once the end of the list is reached. * Example: i=list_iterator_create(i); while ((x=list_next(i))) {...} */ void * list_insert (ListIterator i, void *x); /* * Inserts data [x] immediately before the last item returned via list * iterator [i]; once the list iterator reaches the end of the list, * insertion is made at the list's end. * Returns the data's ptr, or lsd_nomem_error() if insertion failed. */ void * list_find (ListIterator i, ListFindF f, void *key); /* * Traverses the list from the point of the list iterator [i] * using [f] to match each item with [key]. * Returns a ptr to the next item for which the function [f] * returns non-zero, or NULL once the end of the list is reached. * Example: i=list_iterator_reset(i); while ((x=list_find(i,f,k))) {...} */ void * list_remove (ListIterator i); /* * Removes from the list the last item returned via list iterator [i] * and returns the data's ptr. * Note: The client is responsible for freeing the returned data. */ int list_delete (ListIterator i); /* * Removes from the list the last item returned via list iterator [i]; * if a deletion function was specified when the list was created, * it will be called to deallocate the item being removed. * Returns a count of the number of items removed from the list * (ie, '1' if the item was removed, and '0' otherwise). */ #endif /* !LSD_LIST_H */ freeipmi-1.6.4/common/miscutil/network.c0000644002055400205540000001611113527331635020240 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.c,v 1.3 2009-12-16 17:49:39 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include "fi_hostlist.h" #include "hostlist.h" #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif int host_is_ipv6_with_port (const char *host, char **addr, char **port) { char *str = NULL; int is_ipv6_with_port = 0; int rv = -1; assert (host); if (!(str = strdup (host))) goto cleanup; /* achu: * * Some of this code is from * * LaMont Jones * * In his experimental patch * * git pull https://github.com/lamontj/freeipmi-mirror.git ipmipower-ipv6 * */ if (str[0] == '[') { char *addrptr = &str[1]; char *tmp; if ((tmp = strchr (addrptr, ']'))) { *tmp = '\0'; tmp++; /* Is character after the right bracket a colon? */ if (*tmp == ':') { char *portptr; /* is everything after the colon a number? */ tmp++; portptr = tmp; while (isdigit (*tmp)) tmp++; /* are we at the end of the string? */ /* and did we find a port */ if (*tmp == '\0' && strlen (portptr)) { struct sockaddr_in6 saddr; /* is what's in between the brackets an IPv6 address? */ if (inet_pton(AF_INET6, addrptr, &saddr) == 1) { /* if yes, we've got the special IPv6/port combo */ is_ipv6_with_port = 1; if (addr) { if (!(*addr = strdup (addrptr))) goto cleanup; } if (port) { if (!(*port = strdup (portptr))) { free (*addr); goto cleanup; } } } } } } } rv = is_ipv6_with_port; cleanup: free (str); return (rv); } int host_is_host_with_port (const char *host, char **addr, char **port) { char *str = NULL; int rv = -1; int is_host_with_port = 0; int ret; assert (host); if ((ret = host_is_ipv6_with_port (host, addr, port)) < 0) goto cleanup; if (ret) { rv = ret; goto cleanup; } if (strchr (host, ':')) { struct sockaddr_in6 saddr; char *addrptr; char *portptr; char *lastcolonptr = NULL; /* remove warning */ char *tmp; /* First check, maybe it's a valid IPv6 address straight up */ if (inet_pton (AF_INET6, host, &saddr) == 1) goto out; if (!(str = strdup (host))) goto cleanup; addrptr = str; /* find last colon */ portptr = addrptr; while ((tmp = strchr (portptr, ':'))) { lastcolonptr = tmp; portptr = tmp + 1; } *lastcolonptr = '\0'; /* is everything after the colon a number? */ tmp = portptr; while (isdigit (*tmp)) tmp++; /* are we at the end of the string? */ /* and did we find a port */ if (*tmp == '\0' && strlen (portptr)) { is_host_with_port = 1; if (addr) { if (!(*addr = strdup (addrptr))) goto cleanup; } if (port) { if (!(*port = strdup (portptr))) { free (*addr); goto cleanup; } } } } out: rv = is_host_with_port; cleanup: free (str); return (rv); } int host_is_valid (const char *addr, const char *port, uint16_t *portptr) { assert (addr); /* achu: max length IPv6 is 45 chars * ABCD:ABCD:ABCD:ABCD:ABCD:ABCD:192.168.100.200 */ if (strlen (addr) > MAXHOSTNAMELEN) return (0); if (port) { char *endptr; int tmp; errno = 0; tmp = strtol (port, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0 || tmp > USHRT_MAX) return 0; if (portptr) *portptr = tmp; } return (1); } /* Note that we do not do address resolution to map hypothetical * situations (e.g. "foobar" resolves to "127.0.0.1"). We only * hardcode and check for the known popular strings. * * The reason is that most of FreeIPMI supports mapping "localhost" to * "inband" communication primarily for convenience. Programmers * don't have to handle "inband" communication differenly than * "outofband" cases. e.g. you can script/program with the hosts * "node1,node2,node3,localhost,node4" and not have to program a * special case for "inband" communication. * * If a user truly wants some funky host/string to resolve to * "localhost", we suggest they use one of the known popular strings * instead. We don't want to have to do host resolution checks for * every host/IP ever input into FreeIPMI. */ int host_is_localhost (const char *host) { assert (host); /* Ordered by my assumption of most popular */ if (!strcasecmp (host, "localhost") || !strcmp (host, "127.0.0.1") || !strcasecmp (host, "ipv6-localhost") || !strcmp (host, "::1") || !strcasecmp (host, "ip6-localhost") || !strcmp (host, "0:0:0:0:0:0:0:1")) return (1); return (0); } freeipmi-1.6.4/common/miscutil/network.h0000644002055400205540000000515513527331635020253 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: hostlist.h,v 1.3 2009-12-16 17:49:40 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /* Convenience network functions */ #ifndef _NETWORK_H #define _NETWORK_H #include /* Convenience functions */ /* Determine if host is in "[Ipv6 address]:port" format * * If true and addr and/or port are non-NULL, set addr and port * appropriately. User is required to free addr & port appropriately. */ int host_is_ipv6_with_port (const char *host, char **addr, char **port); /* Determine if host is in hostname & port format, will check for IPv6 * format [Ipv6 address]:port or normal Ipv4:port. * * If true and addr and/or port are non-NULL, set addr and port * appropriately. User is required to free addr & port appropriately. */ int host_is_host_with_port (const char *host, char **addr, char **port); /* Determine if strings returned from host_is_host_with_port() are * valid. 'addr' is required to be passed in, 'port' is optional. If * 'port' passed in and 'portptr' not NULL, set port value in * 'portptr'. Returns 1 if valid, 0 if not, -1 on error. */ int host_is_valid (const char *addr, const char *port, uint16_t *portptr); /* Determine if hostname is a "localhost" or equivalent string, * returns 1 for yes, 0 for no. No host resolution will be done, only * string matching for common strings. */ int host_is_localhost (const char *host); #endif /* !_NETWORK_H */ freeipmi-1.6.4/common/miscutil/secure.c0000644002055400205540000000765413527331635020051 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: secure.c,v 1.8 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_MMAP #include #endif /* HAVE_MMAP */ #include #include #include "secure.h" /* From David Wheeler's Secure Programming Guide */ void *secure_memset (void *s, int c, size_t n) { volatile char *p; if (!s || !n) return (NULL); p = s; while (n--) *p++=c; return (s); } void * secure_malloc (size_t len) { void *ptr; assert (len); #if defined(MAP_ANONYMOUS) && defined(MAP_LOCK) && HAVE_MMAP if ((ptr = mmap (NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS | MAP_LOCKED, -1, 0)) == MAP_FAILED) return (NULL); #elif defined(MAP_ANONYMOUS) && !defined(MAP_LOCK) if ((ptr = mmap (NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED | MAP_ANONYMOUS, -1, 0)) == MAP_FAILED) return (NULL); if (mlock (ptr, len) < 0) { munmap (ptr, len); return (NULL); } #else /* !defined(MAP_ANONYMOUS) */ if (!(ptr = malloc (len))) return (NULL); #endif /* !defined(MAP_ANONYMOUS) */ #if 0 /* The following case could be implemented, however, we don't compile * it because it can cause fd leaks. */ if ((fd = open ("/dev/zero", O_RDWR)) < 0) return (NULL); if ((ptr = mmap (NULL, len, PROT_READ | PROT_WRITE, MAP_SHARED, -1, 0)) == MAP_FAILED) { /* ignore potential error, this is error path */ close (fd); return (NULL); } if (mlock (ptr, len) < 0) { /* ignore potential error, this is error path */ munmap (ptr, len); /* ignore potential error, this is error path */ close (fd); return (NULL); } #endif /* 0 */ secure_memset (ptr, '\0', len); return (ptr); } void secure_free (void *ptr, size_t len) { assert (len); if (ptr) { secure_memset (ptr, '\0', len); #if defined(MAP_ANONYMOUS) && defined(MAP_LOCK) && HAVE_MMAP /* ignore potential error, void return func */ munmap (ptr, len); #elif defined(MAP_ANONYMOUS) && !defined(MAP_LOCK) /* ignore potential error, void return func */ /* munlock is not necessary, munmap is sufficient */ munmap (ptr, len); #else /* !defined(MAP_ANONYMOUS) */ free (ptr); #endif /* !defined(MAP_ANONYMOUS) */ } } freeipmi-1.6.4/common/miscutil/secure.h0000644002055400205540000000313713527331635020046 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: secure.h,v 1.6 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef SECURE_H #define SECURE_H #include /* From David Wheeler's Secure Programming Guide */ void *secure_memset (void *s, int c, size_t n); void *secure_malloc (size_t len); void secure_free (void *ptr, size_t len); #endif /* SECURE_H */ freeipmi-1.6.4/common/miscutil/timeval.c0000644002055400205540000001075313527331635020216 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: timeval.c,v 1.6 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "timeval.h" #define TIMEVAL_MICROSECONDS_IN_SECOND 1000000 #define TIMEVAL_MILLISECONDS_IN_SECOND 1000 #define TIMEVAL_MICROSECONDS_IN_MILLISECOND 1000 /* * Note: * * These are primarily portable versions of * * timerisset * timerclear * timercmp * timeradd * timersub * * and some additional wrapper functions for milliseconds */ void timeval_clear (struct timeval *a) { assert (a); a->tv_sec = a->tv_usec = 0; } int timeval_gt (struct timeval *a, struct timeval *b) { assert (a); assert (b); if (a->tv_sec == b->tv_sec) return (a->tv_usec > b->tv_usec); return (a->tv_sec > b->tv_sec); } int timeval_lt (struct timeval *a, struct timeval *b) { assert (a); assert (b); if (a->tv_sec == b->tv_sec) return (a->tv_usec < b->tv_usec); return (a->tv_sec < b->tv_sec); } void timeval_add (struct timeval *a, struct timeval *b, struct timeval *result) { assert (a); assert (b); assert (result); result->tv_sec = a->tv_sec + b->tv_sec; result->tv_usec = a->tv_usec + b->tv_usec; if (result->tv_usec >= TIMEVAL_MICROSECONDS_IN_SECOND) { result->tv_sec++; result->tv_usec -= TIMEVAL_MICROSECONDS_IN_SECOND; } } void timeval_sub (struct timeval *a, struct timeval *b, struct timeval *result) { assert (a); assert (b); assert (result); if (timeval_gt (a, b)) { result->tv_sec = a->tv_sec - b->tv_sec; result->tv_usec = a->tv_usec - b->tv_usec; if (result->tv_usec < 0) { result->tv_sec--; result->tv_usec += TIMEVAL_MICROSECONDS_IN_SECOND; } } else { result->tv_sec = 0; result->tv_usec = 0; } } void timeval_millisecond_init (struct timeval *a, unsigned int ms) { assert (a); timeval_clear (a); a->tv_sec = ms/TIMEVAL_MILLISECONDS_IN_SECOND; ms -= (a->tv_sec * TIMEVAL_MILLISECONDS_IN_SECOND); a->tv_usec = ms * TIMEVAL_MICROSECONDS_IN_MILLISECOND; } void timeval_add_ms (struct timeval *a, unsigned int ms, struct timeval *result) { struct timeval b; assert (a); assert (result); timeval_millisecond_init (&b, ms); timeval_add (a, &b, result); } void timeval_sub_ms (struct timeval *a, unsigned int ms, struct timeval *result) { struct timeval b; assert (a); assert (result); timeval_millisecond_init (&b, ms); timeval_sub (a, &b, result); } void timeval_millisecond_calc (struct timeval *a, unsigned int *ms) { unsigned int t; assert (a); assert (ms); t = 0; t += a->tv_sec * TIMEVAL_MILLISECONDS_IN_SECOND; t += a->tv_usec / TIMEVAL_MICROSECONDS_IN_MILLISECOND; /* Note: Must round up. Otherwise time will always "disappear". */ if (a->tv_usec % TIMEVAL_MICROSECONDS_IN_MILLISECOND) t += 1; *ms = t; } freeipmi-1.6.4/common/miscutil/timeval.h0000644002055400205540000000450513527331635020221 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: timeval.h,v 1.6 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef TIMEVAL_H #define TIMEVAL_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ void timeval_clear (struct timeval *a); int timeval_gt (struct timeval *a, struct timeval *b); int timeval_lt (struct timeval *a, struct timeval *b); void timeval_add (struct timeval *a, struct timeval *b, struct timeval *result); void timeval_sub (struct timeval *a, struct timeval *b, struct timeval *result); void timeval_millisecond_init (struct timeval *a, unsigned int ms); void timeval_add_ms (struct timeval *a, unsigned int ms, struct timeval *result); void timeval_sub_ms (struct timeval *a, unsigned int ms, struct timeval *result); void timeval_millisecond_calc (struct timeval *a, unsigned int *ms); #endif /* TIMEVAL_H */ freeipmi-1.6.4/common/miscutil/thread.c0000644002055400205540000000340113527331635020014 0ustar00achuachu00000000000000/***************************************************************************** * $Id: thread.c,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2003 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include "thread.h" #if WITH_PTHREADS #ifndef NDEBUG int lsd_mutex_is_locked (pthread_mutex_t *mutex) { /* Returns true if the mutex is locked; o/w, returns false. */ int rc; assert (mutex != NULL); rc = pthread_mutex_trylock (mutex); return (rc == EBUSY ? 1 : 0); } #endif /* !NDEBUG */ #endif /* WITH_PTHREADS */ freeipmi-1.6.4/common/miscutil/thread.h0000644002055400205540000001153313527331635020026 0ustar00achuachu00000000000000/***************************************************************************** * $Id: thread.h,v 1.2 2008-08-12 18:14:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2003 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ #ifndef LSD_THREAD_H #define LSD_THREAD_H #if WITH_PTHREADS # include # include # include #endif /* WITH_PTHREADS */ /***************************************************************************** * Macros *****************************************************************************/ #if WITH_PTHREADS # ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error (char *file, int line, char *mesg); # else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # define lsd_fatal_error(file, line, mesg) (abort ()) # endif /* !lsd_fatal_error */ # endif /* !WITH_LSD_FATAL_ERROR_FUNC */ # define lsd_mutex_init(pmutex) \ do { \ int e = pthread_mutex_init (pmutex, NULL); \ if (e != 0) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "mutex_init"); \ abort (); \ } \ } while (0) # define lsd_mutex_lock(pmutex) \ do { \ int e = pthread_mutex_lock (pmutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "mutex_lock"); \ abort (); \ } \ } while (0) # define lsd_mutex_unlock(pmutex) \ do { \ int e = pthread_mutex_unlock (pmutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "mutex_unlock"); \ abort (); \ } \ } while (0) # define lsd_mutex_destroy(pmutex) \ do { \ int e = pthread_mutex_destroy (pmutex); \ if (e != 0) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "mutex_destroy"); \ abort (); \ } \ } while (0) # ifndef NDEBUG int lsd_mutex_is_locked (pthread_mutex_t *pmutex); # endif /* !NDEBUG */ #else /* !WITH_PTHREADS */ # define lsd_mutex_init(mutex) # define lsd_mutex_lock(mutex) # define lsd_mutex_unlock(mutex) # define lsd_mutex_destroy(mutex) # define lsd_mutex_is_locked(mutex) (1) #endif /* !WITH_PTHREADS */ #endif /* !LSD_THREAD_H */ freeipmi-1.6.4/common/parsecommon/0000755002055400205540000000000013527342540017072 5ustar00achuachu00000000000000freeipmi-1.6.4/common/parsecommon/Makefile.in0000644002055400205540000005332713527342443021153 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/parsecommon DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libparsecommon_la_LIBADD = am_libparsecommon_la_OBJECTS = libparsecommon_la-parse-common.lo libparsecommon_la_OBJECTS = $(am_libparsecommon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libparsecommon_la_SOURCES) DIST_SOURCES = $(libparsecommon_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = \ libparsecommon.la libparsecommon_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libparsecommon_la_SOURCES = \ parse-common.c \ parse-common.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/parsecommon/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/parsecommon/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libparsecommon.la: $(libparsecommon_la_OBJECTS) $(libparsecommon_la_DEPENDENCIES) $(EXTRA_libparsecommon_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libparsecommon_la_OBJECTS) $(libparsecommon_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libparsecommon_la-parse-common.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libparsecommon_la-parse-common.lo: parse-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsecommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libparsecommon_la-parse-common.lo -MD -MP -MF $(DEPDIR)/libparsecommon_la-parse-common.Tpo -c -o libparsecommon_la-parse-common.lo `test -f 'parse-common.c' || echo '$(srcdir)/'`parse-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libparsecommon_la-parse-common.Tpo $(DEPDIR)/libparsecommon_la-parse-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='parse-common.c' object='libparsecommon_la-parse-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libparsecommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libparsecommon_la-parse-common.lo `test -f 'parse-common.c' || echo '$(srcdir)/'`parse-common.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/parsecommon/Makefile.am0000644002055400205540000000044013527331635021127 0ustar00achuachu00000000000000noinst_LTLIBRARIES = \ libparsecommon.la libparsecommon_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libparsecommon_la_SOURCES = \ parse-common.c \ parse-common.h freeipmi-1.6.4/common/parsecommon/parse-common.c0000644002055400205540000005412313527331635021646 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "freeipmi-portability.h" #include "parse-common.h" #define WORKAROUND_FLAG_BUFLEN 1024 int parse_inband_driver_type (const char *str) { assert (str); if (strcasecmp (str, IPMI_PARSE_DEVICE_KCS_STR) == 0) return (IPMI_DEVICE_KCS); else if (strcasecmp (str, IPMI_PARSE_DEVICE_SSIF_STR) == 0) return (IPMI_DEVICE_SSIF); /* support "open" for those that might be used to * ipmitool. */ else if (strcasecmp (str, IPMI_PARSE_DEVICE_OPENIPMI_STR) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_OPENIPMI_STR2) == 0) return (IPMI_DEVICE_OPENIPMI); /* support "bmc" for those that might be used to * ipmitool. */ else if (strcasecmp (str, IPMI_PARSE_DEVICE_SUNBMC_STR) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_SUNBMC_STR2) == 0) return (IPMI_DEVICE_SUNBMC); else if (strcasecmp (str, IPMI_PARSE_DEVICE_INTELDCMI_STR) == 0) return (IPMI_DEVICE_INTELDCMI); return (-1); } int parse_outofband_driver_type (const char *str) { assert (str); if (strcasecmp (str, IPMI_PARSE_DEVICE_LAN_STR) == 0) return (IPMI_DEVICE_LAN); /* support "lanplus" for those that might be used to ipmitool. * support typo variants to ease. */ else if (strcasecmp (str, IPMI_PARSE_DEVICE_LAN_2_0_STR) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_LAN_2_0_STR2) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_LAN_2_0_STR3) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_LAN_2_0_STR4) == 0 || strcasecmp (str, IPMI_PARSE_DEVICE_LAN_2_0_STR5) == 0) return (IPMI_DEVICE_LAN_2_0); return (-1); } int parse_driver_type (const char *str) { int ret; assert (str); if ((ret = parse_inband_driver_type (str)) < 0) ret = parse_outofband_driver_type (str); return (ret); } int parse_authentication_type (const char *str) { assert (str); if (strcasecmp (str, IPMI_PARSE_AUTHENTICATION_TYPE_NONE_STR) == 0) return (IPMI_AUTHENTICATION_TYPE_NONE); /* keep "plain" for backwards compatability */ else if (strcasecmp (str, IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR) == 0 || strcasecmp (str, IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR2) == 0) return (IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY); else if (strcasecmp (str, IPMI_PARSE_AUTHENTICATION_TYPE_MD2_STR) == 0) return (IPMI_AUTHENTICATION_TYPE_MD2); else if (strcasecmp (str, IPMI_PARSE_AUTHENTICATION_TYPE_MD5_STR) == 0) return (IPMI_AUTHENTICATION_TYPE_MD5); return (-1); } int parse_privilege_level (const char *str) { assert (str); if (strcasecmp (str, IPMI_PARSE_PRIVILEGE_LEVEL_USER_STR) == 0) return (IPMI_PRIVILEGE_LEVEL_USER); else if (strcasecmp (str, IPMI_PARSE_PRIVILEGE_LEVEL_OPERATOR_STR) == 0) return (IPMI_PRIVILEGE_LEVEL_OPERATOR); else if (strcasecmp (str, IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR) == 0 || strcasecmp (str, IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR2) == 0) return (IPMI_PRIVILEGE_LEVEL_ADMIN); return (-1); } static int _parse_workaround_flags (const char *str, unsigned int *workaround_flags_outofband, unsigned int *workaround_flags_outofband_2_0, unsigned int *workaround_flags_inband, unsigned int *workaround_flags_sdr, unsigned int *section_specific_workaround_flags, int command_line_flag) { char buf[WORKAROUND_FLAG_BUFLEN+1]; char *tok; assert (str); memset (buf, '\0', WORKAROUND_FLAG_BUFLEN+1); strncpy (buf, str, WORKAROUND_FLAG_BUFLEN); if (workaround_flags_outofband) (*workaround_flags_outofband) = 0; if (workaround_flags_outofband_2_0) (*workaround_flags_outofband_2_0) = 0; if (workaround_flags_inband) (*workaround_flags_inband) = 0; if (workaround_flags_sdr) (*workaround_flags_sdr) = 0; if (section_specific_workaround_flags) (*section_specific_workaround_flags) = 0; tok = strtok (buf, ","); while (tok) { if (command_line_flag && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_NONE_STR)) { if (workaround_flags_outofband) (*workaround_flags_outofband) = 0; if (workaround_flags_outofband_2_0) (*workaround_flags_outofband_2_0) = 0; if (workaround_flags_inband) (*workaround_flags_inband) = 0; if (workaround_flags_sdr) (*workaround_flags_sdr) = 0; if (section_specific_workaround_flags) (*section_specific_workaround_flags) = 0; break; } /* special case, may apply to outofband and outofband_2_0 */ if (!strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES_STR)) { if (workaround_flags_outofband) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES; if (workaround_flags_outofband_2_0) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES; } /* special case, may apply to outofband and outofband_2_0 */ else if (!strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK_STR)) { if (workaround_flags_outofband) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK; if (workaround_flags_outofband_2_0) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK; } else if (workaround_flags_outofband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO_STR)) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO; else if (workaround_flags_outofband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION_STR)) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION; else if (workaround_flags_outofband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE_STR)) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE; else if (workaround_flags_outofband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER_STR)) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER; else if (workaround_flags_outofband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK_STR)) (*workaround_flags_outofband) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK; #if 0 /* handled above w/ special case */ else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES; #endif else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION; else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION; else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION; else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE; else if (workaround_flags_outofband_2_0 && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE_STR)) (*workaround_flags_outofband_2_0) |= IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE; else if (workaround_flags_inband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS_STR)) (*workaround_flags_inband) |= IPMI_PARSE_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS; else if (workaround_flags_inband && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_INBAND_SPIN_POLL_STR)) (*workaround_flags_inband) |= IPMI_PARSE_WORKAROUND_FLAGS_INBAND_SPIN_POLL; else if (workaround_flags_sdr && !strcasecmp (tok, IPMI_PARSE_WORKAROUND_FLAGS_SDR_ASSUME_MAX_SDR_RECORD_COUNT_STR)) (*workaround_flags_sdr) |= IPMI_PARSE_WORKAROUND_FLAGS_SDR_ASSUME_MAX_SDR_RECORD_COUNT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SERIAL_ALERTS_DEFERRED_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SERIAL_ALERTS_DEFERRED; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_INCREMENT_SOL_PACKET_SEQUENCE_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_INCREMENT_SOL_PACKET_SEQUENCE; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHECKS_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHECKS; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SCANNING_DISABLED_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SCANNING_DISABLED; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_BMC_OWNER_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_BMC_OWNER; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SLOW_COMMIT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SLOW_COMMIT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SOL_CHANNEL_ASSUME_LAN_CHANNEL_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SOL_CHANNEL_ASSUME_LAN_CHANNEL; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_GUID_FORMAT_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_GUID_FORMAT; else if (section_specific_workaround_flags && !strcasecmp (tok, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING_STR)) (*section_specific_workaround_flags) |= IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING; else return (-1); tok = strtok (NULL, ","); } return (0); } int parse_workaround_flags (const char *str, unsigned int *workaround_flags_outofband, unsigned int *workaround_flags_outofband_2_0, unsigned int *workaround_flags_inband, unsigned int *workaround_flags_sdr, unsigned int *section_specific_workaround_flags) { return (_parse_workaround_flags (str, workaround_flags_outofband, workaround_flags_outofband_2_0, workaround_flags_inband, workaround_flags_sdr, section_specific_workaround_flags, 0)); } int parse_workaround_flags_tool (const char *str, unsigned int *workaround_flags_outofband, unsigned int *workaround_flags_outofband_2_0, unsigned int *workaround_flags_inband, unsigned int *workaround_flags_sdr, unsigned int *section_specific_workaround_flags) { return (_parse_workaround_flags (str, workaround_flags_outofband, workaround_flags_outofband_2_0, workaround_flags_inband, workaround_flags_sdr, section_specific_workaround_flags, 1)); } /* a k_g key is interpreted as ascii text unless it is prefixed with "0x", in which case is it interpreted as hexadecimal */ int parse_kg (void *out, unsigned int outlen, const char *in) { char *p, *q; unsigned int i, j; char buf[3] = { 0, 0, 0}; int rv = 0; assert (out); assert (in); assert (outlen >= IPMI_MAX_K_G_LENGTH); if (!strlen (in)) return (0); if (!strncasecmp (in, "0x", 2)) { if (strlen (in) > IPMI_MAX_K_G_LENGTH*2+2) return (-1); p = (char *)in + 2; /* wipe buffer, '\0', possibly ok */ memset (out, '\0', IPMI_MAX_K_G_LENGTH); for (i = j = 0; i < strlen (p); i+=2, j++) { if (!isxdigit (p[i]) || (p[i+1] && !isxdigit (p[i+1]))) return (-1); buf[0] = p[i]; if (p[i+1]) buf[1] = p[i+1]; else buf[1] = 0; buf[2] = '\0'; errno = 0; (((uint8_t *)out)[j]) = (uint8_t)strtoul (buf, &q, 16); if (errno || ((p[i+1] && (q != buf + 2)) || (!p[i+1] && (q != buf + 1)))) return (-1); rv++; } } else { if (strlen (in) > IPMI_MAX_K_G_LENGTH) return (-1); /* wipe buffer, '\0', possibly ok */ memset (out, '\0', IPMI_MAX_K_G_LENGTH); memcpy (out, in, strlen (in)); rv = strlen (in); } return (rv); } void parse_get_freeipmi_outofband_flags (unsigned int parse_workaround_flags_outofband, unsigned int *freeipmi_workaround_flags_outofband) { assert (freeipmi_workaround_flags_outofband); (*freeipmi_workaround_flags_outofband) = 0; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK; if (parse_workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK) (*freeipmi_workaround_flags_outofband) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK; } void parse_get_freeipmi_outofband_2_0_flags (unsigned int parse_workaround_flags_outofband_2_0, unsigned int *freeipmi_workaround_flags_outofband_2_0) { assert (freeipmi_workaround_flags_outofband_2_0); (*freeipmi_workaround_flags_outofband_2_0) = 0; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE; if (parse_workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK) (*freeipmi_workaround_flags_outofband_2_0) |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK; } void parse_get_freeipmi_inband_flags (unsigned int parse_workaround_flags_inband, unsigned int *freeipmi_workaround_flags_inband) { assert (freeipmi_workaround_flags_inband); (*freeipmi_workaround_flags_inband) = 0; if (parse_workaround_flags_inband & IPMI_PARSE_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS) (*freeipmi_workaround_flags_inband) |= IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS; if (parse_workaround_flags_inband & IPMI_PARSE_WORKAROUND_FLAGS_INBAND_SPIN_POLL) (*freeipmi_workaround_flags_inband) |= IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL; } freeipmi-1.6.4/common/parsecommon/parse-common.h0000644002055400205540000002756413527331635021664 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef PARSE_COMMON_H #define PARSE_COMMON_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #define IPMI_PARSE_DEVICE_LAN_STR "lan" #define IPMI_PARSE_DEVICE_LAN_2_0_STR "lan_2_0" #define IPMI_PARSE_DEVICE_LAN_2_0_STR2 "lan20" #define IPMI_PARSE_DEVICE_LAN_2_0_STR3 "lan_20" #define IPMI_PARSE_DEVICE_LAN_2_0_STR4 "lan2_0" #define IPMI_PARSE_DEVICE_LAN_2_0_STR5 "lanplus" #define IPMI_PARSE_DEVICE_KCS_STR "kcs" #define IPMI_PARSE_DEVICE_SSIF_STR "ssif" #define IPMI_PARSE_DEVICE_OPENIPMI_STR "openipmi" #define IPMI_PARSE_DEVICE_OPENIPMI_STR2 "open" #define IPMI_PARSE_DEVICE_SUNBMC_STR "sunbmc" #define IPMI_PARSE_DEVICE_SUNBMC_STR2 "bmc" #define IPMI_PARSE_DEVICE_INTELDCMI_STR "inteldcmi" #define IPMI_PARSE_WORKAROUND_FLAGS_DEFAULT 0x00000000 #define IPMI_PARSE_WORKAROUND_FLAGS_NONE IPMI_PARSE_WORKAROUND_FLAGS_DEFAULT #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES 0x00000001 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO 0x00000002 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION 0x00000004 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE 0x00000008 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER 0x00000010 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK 0x00000020 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK 0x00000040 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES 0x00000001 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION 0x00000002 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION 0x00000004 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION 0x00000008 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE 0x00000010 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE 0x00000020 #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK 0x00000040 #define IPMI_PARSE_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS 0x00000001 #define IPMI_PARSE_WORKAROUND_FLAGS_INBAND_SPIN_POLL 0x00000002 #define IPMI_PARSE_WORKAROUND_FLAGS_SDR_ASSUME_MAX_SDR_RECORD_COUNT 0x00000001 #define IPMI_PARSE_WORKAROUND_FLAGS_NONE_STR "none" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES_STR "authcap" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO_STR "idzero" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION_STR "forcepermsg" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE_STR "unexpectedauth" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER_STR "endianseq" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK_STR "noauthcodecheck" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK_STR "nochecksumcheck" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES_STR "authcap" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION_STR "intel20" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION_STR "supermicro20" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION_STR "sun20" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE_STR "opensesspriv" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE_STR "integritycheckvalue" #define IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK_STR "nochecksumcheck" #define IPMI_PARSE_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS_STR "assumeio" #define IPMI_PARSE_WORKAROUND_FLAGS_INBAND_SPIN_POLL_STR "spinpoll" #define IPMI_PARSE_WORKAROUND_FLAGS_SDR_ASSUME_MAX_SDR_RECORD_COUNT_STR "assumemaxsdrrecordcount" /* ipmiconsole */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE 0x00000001 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT 0x00000002 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS 0x00000004 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT 0x00000008 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SERIAL_ALERTS_DEFERRED 0x00000010 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_INCREMENT_SOL_PACKET_SEQUENCE 0x00000020 /* ipmi-fru */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHECKS 0x00000040 /* ipmi-sel */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT 0x00000080 /* ipmi-sensors */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING 0x00000100 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SCANNING_DISABLED 0x00000200 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_BMC_OWNER 0x00000400 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE 0x00000800 /* ipmi-config */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SLOW_COMMIT 0x00001000 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT 0x00002000 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SOL_CHANNEL_ASSUME_LAN_CHANNEL 0x00004000 /* bmc-watchdog */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG 0x00008000 /* ipmi-pet */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK 0x0001000 /* bmc-info */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_GUID_FORMAT 0x0002000 /* ipmipower */ #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING 0x0004000 #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE_STR "solpayloadsize" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT_STR "solport" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS_STR "solstatus" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT_STR "solchannelsupport" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SERIAL_ALERTS_DEFERRED_STR "serialalertsdeferred" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_INCREMENT_SOL_PACKET_SEQUENCE_STR "solpacketseq" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHECKS_STR "skipchecks" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT_STR "assumesystemevent" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING_STR "discretereading" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SCANNING_DISABLED_STR "ignorescanningdisabled" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_BMC_OWNER_STR "assumebmcowner" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE_STR "ignoreauthcode" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SLOW_COMMIT_STR "slowcommit" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT_STR "veryslowcommit" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SOL_CHANNEL_ASSUME_LAN_CHANNEL_STR "solchannelassumelanchannel" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG_STR "ignorestateflag" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK_STR "malformedack" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_GUID_FORMAT_STR "guidformat" #define IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING_STR "ipmiping" #define IPMI_PARSE_AUTHENTICATION_TYPE_NONE_STR "none" #define IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR "straight_password_key" #define IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR2 "plain" #define IPMI_PARSE_AUTHENTICATION_TYPE_MD2_STR "md2" #define IPMI_PARSE_AUTHENTICATION_TYPE_MD5_STR "md5" #define IPMI_PARSE_PRIVILEGE_LEVEL_USER_STR "user" #define IPMI_PARSE_PRIVILEGE_LEVEL_OPERATOR_STR "operator" #define IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR "admin" #define IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR2 "administrator" /* returns driver type on success, -1 on error */ int parse_inband_driver_type (const char *str); /* returns driver type on success, -1 on error */ int parse_outofband_driver_type (const char *str); /* returns driver type on success, -1 on error */ int parse_driver_type (const char *str); /* returns authentication type on success, -1 on error */ int parse_authentication_type (const char *str); /* returns privilege level on success, -1 on error */ int parse_privilege_level (const char *str); /* returns 0 on success, -1 on error, flags set in in/out parameters */ int parse_workaround_flags (const char *str, unsigned int *workaround_flags_outofband, unsigned int *workaround_flags_outofband_2_0, unsigned int *workaround_flags_inband, unsigned int *workaround_flags_sdr, unsigned int *tool_specific_workaround_flags); /* returns 0 on success, -1 on error, flags set in in/out parameters */ /* specifically should be called by tools for user input situations and not libraries */ int parse_workaround_flags_tool (const char *str, unsigned int *workaround_flags_outofband, unsigned int *workaround_flags_outofband_2_0, unsigned int *workaround_flags_inband, unsigned int *workaround_flags_sdr, unsigned int *tool_specific_workaround_flags); /* Turn an input string into a 20-byte binary k_g key, length written * into out on success, -1 on error */ int parse_kg (void *out, unsigned int outlen, const char *in); void parse_get_freeipmi_outofband_flags (unsigned int parse_workaround_flags_outofband, unsigned int *freeipmi_workaround_flags_outofband); void parse_get_freeipmi_outofband_2_0_flags (unsigned int parse_workaround_flags_outofband_2_0, unsigned int *freeipmi_workaround_flags_outofband_2_0); void parse_get_freeipmi_inband_flags (unsigned int parse_workaround_flags_inband, unsigned int *freeipmi_workaround_flags_inband); #endif /* PARSE_COMMON_H */ freeipmi-1.6.4/common/pingtool/0000755002055400205540000000000013527342541016403 5ustar00achuachu00000000000000freeipmi-1.6.4/common/pingtool/Makefile.in0000644002055400205540000005335213527342443020461 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/pingtool DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libpingtool_la_LIBADD = am_libpingtool_la_OBJECTS = libpingtool_la-ping-tool-common.lo libpingtool_la_OBJECTS = $(am_libpingtool_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libpingtool_la_SOURCES) DIST_SOURCES = $(libpingtool_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = \ libpingtool.la libpingtool_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_srcdir)/common/toolcommon \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libpingtool_la_SOURCES = \ ping-tool-common.c \ ping-tool-common.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/pingtool/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/pingtool/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libpingtool.la: $(libpingtool_la_OBJECTS) $(libpingtool_la_DEPENDENCIES) $(EXTRA_libpingtool_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libpingtool_la_OBJECTS) $(libpingtool_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libpingtool_la-ping-tool-common.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libpingtool_la-ping-tool-common.lo: ping-tool-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpingtool_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libpingtool_la-ping-tool-common.lo -MD -MP -MF $(DEPDIR)/libpingtool_la-ping-tool-common.Tpo -c -o libpingtool_la-ping-tool-common.lo `test -f 'ping-tool-common.c' || echo '$(srcdir)/'`ping-tool-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libpingtool_la-ping-tool-common.Tpo $(DEPDIR)/libpingtool_la-ping-tool-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ping-tool-common.c' object='libpingtool_la-ping-tool-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libpingtool_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libpingtool_la-ping-tool-common.lo `test -f 'ping-tool-common.c' || echo '$(srcdir)/'`ping-tool-common.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/pingtool/Makefile.am0000644002055400205540000000050413527331635020440 0ustar00achuachu00000000000000noinst_LTLIBRARIES = \ libpingtool.la libpingtool_la_CPPFLAGS = \ -I$(top_srcdir)/common/portability \ -I$(top_srcdir)/common/toolcommon \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libpingtool_la_SOURCES = \ ping-tool-common.c \ ping-tool-common.h freeipmi-1.6.4/common/pingtool/ping-tool-common.c0000644002055400205540000005665713527331635021772 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ping-tool-common.c,v 1.23 2010-07-08 16:46:10 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155448 * * This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant * remote systems. For details, see http://www.llnl.gov/linux/. * * Ipmiping is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiping is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiping. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include #include #include #include #include #include #if HAVE_GETOPT_H #include #endif /* HAVE_GETOPT_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include #include #include #include "freeipmi-portability.h" #include "ping-tool-common.h" /* achu: max length IPv6 is 45 chars, add +1 for NUL * ABCD:ABCD:ABCD:ABCD:ABCD:ABCD:192.168.100.200 */ #ifndef INET6_ADDRSTRLEN #define INET6_ADDRSTRLEN 46 #endif #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif #define MAXPORTBUFLEN 16 #define IPMI_PING_MAX_PKT_LEN 1024 #define IPMI_PING_MAX_ERR_LEN 1024 #define IPMI_PING_VERSION_1_5_STR "1.5" #define IPMI_PING_VERSION_2_0_STR "2.0" #define DEVURANDOM "/dev/urandom" #define DEVRANDOM "/dev/random" /* getopt */ extern char *optarg; extern int optind, opterr, optopt; /* gethostbyname */ extern int h_errno; /* cmdline options */ static int pingtool_count = -1; static int pingtool_interval = 1; static int pingtool_timeout = 5; static int pingtool_verbose = 0; static int pingtool_debug = 0; static int pingtool_version = IPMI_PING_VERSION_1_5; static int pingtool_initial_sequence_number = -1; /* globals */ static int pingtool_sockfd = 0; static char *pingtool_progname = NULL; static char *pingtool_interface = NULL; static char pingtool_dest[MAXHOSTNAMELEN+1]; static char pingtool_dest_ip[INET6_ADDRSTRLEN+1]; static struct sockaddr *pingtool_srcaddr; static socklen_t pingtool_srcaddr_len; static struct sockaddr *pingtool_destaddr; static socklen_t pingtool_destaddr_len; static struct sockaddr_in pingtool_srcaddr4; static struct sockaddr_in pingtool_destaddr4; static struct sockaddr_in6 pingtool_srcaddr6; static struct sockaddr_in6 pingtool_destaddr6; static unsigned int pingtool_pkt_sent = 0; static unsigned int pingtool_pkt_recv = 0; static Ipmi_Ping_EndResult pingtool_end_result = NULL; static void _cleanup (void) { /* ignore potential error, error path */ close (pingtool_sockfd); } static void _err_init (char *progname) { char *ptr = NULL; assert (progname); ptr = strrchr (progname, '/'); pingtool_progname = (ptr == NULL) ? progname : ptr + 1; } void ipmi_ping_err_exit (char *fmt, ...) { char buf[IPMI_PING_MAX_ERR_LEN]; va_list ap; assert (pingtool_progname); assert (fmt); va_start (ap, fmt); snprintf (buf, IPMI_PING_MAX_ERR_LEN, "%s: %s\n", pingtool_progname, fmt); vfprintf (stderr, buf, ap); va_end (ap); _cleanup (); exit (EXIT_FAILURE); } static void _strncpy (char *dest, char *src, unsigned int len) { assert (dest); assert (src); strncpy (dest, src, len); dest[len] = '0'; } static void _output_usage (const char *options) { assert (pingtool_progname); assert (options); fprintf (stderr, "%s [OPTIONS] destination\n", pingtool_progname); if (strchr (options, 'c')) fprintf (stderr, " -c count\n"); if (strchr (options, 'i')) fprintf (stderr, " -i interval in seconds\n"); if (strchr (options, 'I')) fprintf (stderr, " -I interface address or device name\n"); if (strchr (options, 't')) fprintf (stderr, " -t timeout in seconds\n"); if (strchr (options, 'v')) fprintf (stderr, " -v verbose output\n"); if (strchr (options, 'r')) fprintf (stderr, " -r protocol version\n"); if (strchr (options, 's')) fprintf (stderr, " -s starting sequence number\n"); if (strchr (options, 'd')) fprintf (stderr, " -d turn on debugging\n"); exit (EXIT_FAILURE); } static void _output_version (void) { assert (pingtool_progname); fprintf (stderr, "%s %s\n", pingtool_progname, VERSION); exit (EXIT_FAILURE); } static void _cmdline_parse (int argc, char **argv, unsigned int min_sequence_number, unsigned int max_sequence_number, const char *options) { char *endptr; int c; assert (argc >= 0); assert (argv); /* Turn off error messages */ opterr = 0; while ((c = getopt (argc, argv, options)) != -1) { switch (c) { case 'h': _output_usage (options); case 'V': _output_version (); case 'r': if (!strcmp (optarg, IPMI_PING_VERSION_1_5_STR)) pingtool_version = IPMI_PING_VERSION_1_5; else if (!strcmp (optarg, IPMI_PING_VERSION_2_0_STR)) pingtool_version = IPMI_PING_VERSION_2_0; else ipmi_ping_err_exit ("invalid version"); break; case 'c': errno = 0; pingtool_count = strtol (optarg, &endptr, 10); if (errno || endptr[0] != '\0') ipmi_ping_err_exit ("count argument invalid"); if (!pingtool_count) ipmi_ping_err_exit ("count must be > 0"); break; case 'i': errno = 0; pingtool_interval = strtol (optarg, &endptr, 10); if (errno || endptr[0] != '\0') ipmi_ping_err_exit ("interval argument invalid"); if (!pingtool_interval) ipmi_ping_err_exit ("interval must be > 0"); break; case 'I': pingtool_interface = optarg; break; case 't': errno = 0; pingtool_timeout = strtol (optarg, &endptr, 10); if (errno || endptr[0] != '\0') ipmi_ping_err_exit ("timeout argument invalid"); if (!pingtool_timeout) ipmi_ping_err_exit ("timeout must be > 0"); break; case 'v': pingtool_verbose++; break; case 's': errno = 0; pingtool_initial_sequence_number = strtol (optarg, &endptr, 10); if (errno || endptr[0] != '\0') ipmi_ping_err_exit ("initial sequence number invalid"); if (pingtool_initial_sequence_number < min_sequence_number || pingtool_initial_sequence_number > max_sequence_number) ipmi_ping_err_exit ("initial sequence number out of range"); break; case 'd': pingtool_debug++; break; default: ipmi_ping_err_exit ("Command line option error"); break; } } /* last argument is destination */ if (optind >= argc) ipmi_ping_err_exit ("destination must be specified"); _strncpy (pingtool_dest, argv[optind], MAXHOSTNAMELEN); } /* signal handlers + sleep(3) is a bad idea, so use select(3) */ static int _sleep (unsigned int len) { struct timeval tv; tv.tv_sec = len; tv.tv_usec = 0; if (select (1, NULL, NULL, NULL, &tv) < 0) ipmi_ping_err_exit ("select: %s", strerror (errno)); return (0); } static void _signal_handler (int sig) { int ret; assert (pingtool_progname); assert (pingtool_end_result); /* Must output result here, b/c who knows where in the code we are * when we caught the signal */ ret = pingtool_end_result (pingtool_progname, pingtool_dest, pingtool_pkt_sent, pingtool_pkt_recv); _cleanup (); exit (ret); } static void _setup (void) { struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; uint16_t port = RMCP_PRIMARY_RMCP_PORT; char port_str[MAXPORTBUFLEN + 1]; int ret; if (signal (SIGINT, _signal_handler) == SIG_ERR) ipmi_ping_err_exit ("signal setup failed"); memset (port_str, '\0', MAXPORTBUFLEN + 1); snprintf (port_str, MAXPORTBUFLEN, "%d", port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if ((ret = getaddrinfo (pingtool_dest, port_str, &ai_hints, &ai_res))) ipmi_ping_err_exit ("getaddrinfo: %s", gai_strerror (ret)); /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { memcpy (&pingtool_destaddr4, ai->ai_addr, ai->ai_addrlen); pingtool_destaddr4.sin_family = AF_INET; pingtool_destaddr4.sin_port = htons (RMCP_PRIMARY_RMCP_PORT); memset (pingtool_dest_ip, '\0', INET6_ADDRSTRLEN + 1); if (!inet_ntop (AF_INET, &pingtool_destaddr4.sin_addr, pingtool_dest_ip, INET6_ADDRSTRLEN)) ipmi_ping_err_exit ("inet_ntop: %s\n", strerror (errno)); pingtool_destaddr = (struct sockaddr *)&pingtool_destaddr4; pingtool_destaddr_len = sizeof (struct sockaddr_in); /* zero everywhere, secure ephemeral port */ memset (&pingtool_srcaddr4, '\0', sizeof (struct sockaddr_in)); pingtool_srcaddr4.sin_family = AF_INET; pingtool_srcaddr = (struct sockaddr *)&pingtool_srcaddr4; pingtool_srcaddr_len = sizeof (struct sockaddr_in); if (pingtool_interface) { struct in_addr in4; /* If inet_pton fails, assume its an interface name */ if (inet_pton (AF_INET, pingtool_interface, &in4) == 1) memcpy (&pingtool_srcaddr4.sin_addr, &in4, sizeof (struct in_addr)); else { /* User did not pass in IPv4 or IPv6, so assume it's an interface */ struct ifaddrs *ifaddr = NULL, *ifa = NULL; if (getifaddrs (&ifaddr) < 0) ipmi_ping_err_exit ("getifaddrs: %s", strerror (errno)); for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (!ifa->ifa_addr || !ifa->ifa_name) continue; if (!strcmp (ifa->ifa_name, pingtool_interface) && ifa->ifa_addr->sa_family == AF_INET) { struct sockaddr_in tmpaddr; /* memcpy to avoid warnings */ memcpy (&tmpaddr, ifa->ifa_addr, sizeof (struct sockaddr_in)); memcpy (&pingtool_srcaddr4.sin_addr.s_addr, &tmpaddr.sin_addr.s_addr, sizeof (pingtool_srcaddr4.sin_addr.s_addr)); break; } } if (!ifa) ipmi_ping_err_exit ("Cannot find interface: %s", pingtool_interface); freeifaddrs (ifaddr); } } } else if (ai->ai_family == AF_INET6) { memcpy (&pingtool_destaddr6, ai->ai_addr, ai->ai_addrlen); pingtool_destaddr6.sin6_family = AF_INET6; pingtool_destaddr6.sin6_port = htons (RMCP_PRIMARY_RMCP_PORT); memset (pingtool_dest_ip, '\0', INET6_ADDRSTRLEN + 1); if (!inet_ntop (AF_INET6, &pingtool_destaddr6.sin6_addr, pingtool_dest_ip, INET6_ADDRSTRLEN)) ipmi_ping_err_exit ("inet_ntop: %s\n", strerror (errno)); pingtool_destaddr = (struct sockaddr *)&pingtool_destaddr6; pingtool_destaddr_len = sizeof (struct sockaddr_in6); /* zero everywhere, secure ephemeral port */ memset (&pingtool_srcaddr6, '\0', sizeof (struct sockaddr_in6)); pingtool_srcaddr6.sin6_family = AF_INET6; pingtool_srcaddr = (struct sockaddr *)&pingtool_srcaddr6; pingtool_srcaddr_len = sizeof (struct sockaddr_in6); if (pingtool_interface) { struct ifaddrs *ifaddr = NULL, *ifa = NULL; struct in6_addr in6; int is_interfacename = 0; /* If inet_pton fails, assume its an interface name */ if (inet_pton (AF_INET6, pingtool_interface, &in6) != 1) is_interfacename = 1; if (getifaddrs (&ifaddr) < 0) ipmi_ping_err_exit ("getifaddrs: %s", strerror (errno)); for (ifa = ifaddr; ifa != NULL; ifa = ifa->ifa_next) { if (!ifa->ifa_addr || !ifa->ifa_name) continue; if (ifa->ifa_addr->sa_family == AF_INET6) { struct sockaddr_in6 tmpaddr; /* memcpy to avoid warnings */ memcpy (&tmpaddr, ifa->ifa_addr, sizeof (struct sockaddr_in6)); if ((is_interfacename && !strcmp (ifa->ifa_name, pingtool_interface)) || !memcmp (&tmpaddr.sin6_addr, &in6, sizeof (struct in6_addr))) { memcpy (&pingtool_srcaddr6.sin6_addr, &tmpaddr.sin6_addr, sizeof (pingtool_srcaddr6.sin6_addr)); memcpy (&pingtool_srcaddr6.sin6_scope_id, &tmpaddr.sin6_scope_id, sizeof (pingtool_srcaddr6.sin6_scope_id)); break; } } if (!ifa) ipmi_ping_err_exit ("Cannot find interface: %s", pingtool_interface); } freeifaddrs (ifaddr); } } else continue; if ((pingtool_sockfd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) ipmi_ping_err_exit ("socket: %s", strerror (errno)); if (bind (pingtool_sockfd, pingtool_srcaddr, pingtool_srcaddr_len) < 0) { close (pingtool_sockfd); continue; } break; } if (!ai) ipmi_ping_err_exit ("Error determining destination IP"); srand (time (NULL)); freeaddrinfo (ai_res); } static void _main_loop (Ipmi_Ping_CreatePacket create, Ipmi_Ping_ParsePacket parse, Ipmi_Ping_LatePacket late) { unsigned int sequence_number = 0; time_t last_send = 0; int ret; assert (create); assert (parse); assert (late); assert (pingtool_progname); assert (pingtool_end_result); if (pingtool_initial_sequence_number < 0) { int len; if ((len = ipmi_get_random (&pingtool_initial_sequence_number, sizeof (pingtool_initial_sequence_number))) < 0) ipmi_ping_err_exit ("ipmi_get_random: %s", strerror (errno)); if (len != sizeof (pingtool_initial_sequence_number)) ipmi_ping_err_exit ("ipmi_get_random: invalid len returned"); } sequence_number = pingtool_initial_sequence_number; printf ("%s %s (%s)\n", pingtool_progname, pingtool_dest, pingtool_dest_ip); while (pingtool_count == -1 || (pingtool_pkt_sent < pingtool_count)) { int rv, len, received = 0; uint8_t buf[IPMI_PING_MAX_PKT_LEN]; time_t now; /* wait if necessary */ now = time (NULL); if ((now - last_send) < pingtool_interval) { if (_sleep ((last_send + pingtool_interval - now)) < 0) continue; } if ((len = create (pingtool_dest, buf, IPMI_PING_MAX_PKT_LEN, sequence_number, pingtool_version, pingtool_debug)) < 0) ipmi_ping_err_exit ("_create failed: %s", strerror (errno)); rv = ipmi_lan_sendto (pingtool_sockfd, buf, len, 0, pingtool_destaddr, pingtool_destaddr_len); if (rv < 0) ipmi_ping_err_exit ("ipmi_sendto: %s", strerror (errno)); if (rv != len) ipmi_ping_err_exit ("ipmi_sendto: wrong bytes written"); last_send = time (NULL); pingtool_pkt_sent++; while (((now = time (NULL)) - last_send) < pingtool_timeout) { fd_set rset; struct timeval tv; FD_ZERO (&rset); FD_SET (pingtool_sockfd, &rset); tv.tv_sec = (last_send + pingtool_timeout - now); tv.tv_usec = 0; if ((rv = select (pingtool_sockfd+1, &rset, NULL, NULL, &tv)) < 0) ipmi_ping_err_exit ("select: %s", strerror (errno)); if (rv == 1) { struct sockaddr_in6 from6; socklen_t fromlen; char fromstr[INET6_ADDRSTRLEN+1]; fromlen = sizeof (from6); len = ipmi_lan_recvfrom (pingtool_sockfd, buf, IPMI_PING_MAX_PKT_LEN, 0, (struct sockaddr *)&from6, &fromlen); /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * port denied errors up to the client for UDP responses (i.e. you * need to timeout). But on some OSes (it seems Windows), the * behavior is to return port denied errors up to the user for UDP * responses via ECONNRESET or ECONNREFUSED. * * If this were just the case, we could return or handle errors * properly and move on. However, it's not the case. * * According to Ipmitool, on some motherboards, both the OS and the * BMC are capable of responding to an IPMI request. That means you * can get an ECONNRESET or ECONNREFUSED, then later on, get your * real IPMI response. * * Our solution is copied from Ipmitool, we'll ignore some specific * errors and try to read again. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, the recvfrom later on gets the packet we * want. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC (or IPMI disabled, etc.), just do the recvfrom again to * eventually get a timeout, which is the behavior we'd like. */ if (len < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) continue; if (len < 0) ipmi_ping_err_exit ("ipmi_recvfrom: %s", strerror (errno)); memset (fromstr, '\0', INET6_ADDRSTRLEN + 1); if (from6.sin6_family == AF_INET6) { if (!inet_ntop (AF_INET6, &from6.sin6_addr, fromstr, INET6_ADDRSTRLEN)) ipmi_ping_err_exit ("inet_ntop: %s\n", strerror (errno)); } else { /* memcpy hacks to avoid warnings, i.e. * warning: dereferencing pointer 'X' does break strict-aliasing rules */ struct sockaddr_in from4; memcpy (&from4, &from6, fromlen); if (!inet_ntop (AF_INET, &from4.sin_addr, fromstr, INET6_ADDRSTRLEN)) ipmi_ping_err_exit ("inet_ntop: %s\n", strerror (errno)); } if ((rv = parse (pingtool_dest, buf, len, fromstr, sequence_number, pingtool_verbose, pingtool_version, pingtool_debug)) < 0) ipmi_ping_err_exit ("_parse failed: %s", strerror (errno)); /* If rv == 0, the sequence numbers don't match, so * we'll wait some more for the latest packet we sent * out. */ if (!rv) continue; received++; pingtool_pkt_recv++; break; } } if (!received) late (sequence_number); sequence_number++; } ret = pingtool_end_result (pingtool_progname, pingtool_dest, pingtool_pkt_sent, pingtool_pkt_recv); _cleanup (); exit (ret); } void ipmi_ping_setup (int argc, char **argv, unsigned int min_sequence_number, unsigned int max_sequence_number, const char *options) { char *valid_options = "hVciItvrsd:"; char *ptr; char c; assert (argc >= 0); assert (argv); assert (options); /* Check for valid options */ ptr = (char *)options; while ((c = *ptr)) { if (!strchr (valid_options, c)) { fprintf (stderr, "ipmi_ping_setup: invalid options listed"); exit (EXIT_FAILURE); } ptr++; } _err_init (argv[0]); _cmdline_parse (argc, argv, min_sequence_number, max_sequence_number, options); _setup (); } void ipmi_ping_loop (Ipmi_Ping_CreatePacket create, Ipmi_Ping_ParsePacket parse, Ipmi_Ping_LatePacket late, Ipmi_Ping_EndResult end) { assert (create); assert (parse); assert (late); assert (end); pingtool_end_result = end; _main_loop (create, parse, late); return; /* NOT REACHED */ } freeipmi-1.6.4/common/pingtool/ping-tool-common.h0000644002055400205540000000733713527331635021766 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ping-tool-common.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155448 * * This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant * remote systems. For details, see http://www.llnl.gov/linux/. * * Ipmiping is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiping is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiping. If not, see . \*****************************************************************************/ #ifndef PING_TOOL_COMMON_H #define PING_TOOL_COMMON_H #define IPMI_PING_VERSION_1_5 0 #define IPMI_PING_VERSION_2_0 1 /* Ipmi_Ping_CreatePacket * - Create a ping request packet and store it in the buffer * - Return length of packet created, or -1 on error. */ typedef int (*Ipmi_Ping_CreatePacket)(const char *destination, void *buf, unsigned int buflen, unsigned int sequence_number, int version, int debug); /* Ipmi_Ping_ParsePacket * - Parse packet stored in buffer and output info about received * packet to stdout. * - Return 1 if packet matches sequence number, 0 if packet does not, * -1 on error. */ typedef int (*Ipmi_Ping_ParsePacket)(const char *destination, const void *buf, unsigned int buflen, const char *from, unsigned int sequence_number, int verbose, int version, int debug); /* Ipmi_Ping_LatePacket * - Output info about timed out packet to stdout */ typedef void (*Ipmi_Ping_LatePacket)(unsigned int sequence_number); /* Ipmi_Ping_EndResult * - Output final results to stdout and return exit code */ typedef int (*Ipmi_Ping_EndResult)(const char *progname, const char *dest, unsigned int sent_count, unsigned int recv_count); /* ipmi_ping_err_exit * - exit with GNU style exit output */ void ipmi_ping_err_exit (char *fmt, ...); /* ipmi_ping_setup * - setup ipmi ping code by parsing command line arguments */ void ipmi_ping_setup (int argc, char **argv, unsigned int min_sequence_number, unsigned int max_sequence_number, const char *options); /* ipmi_ping_loop * - handle looping ping code */ void ipmi_ping_loop (Ipmi_Ping_CreatePacket _create, Ipmi_Ping_ParsePacket _parse, Ipmi_Ping_LatePacket _late, Ipmi_Ping_EndResult _end); #endif /* PING_TOOL_COMMON_H */ freeipmi-1.6.4/common/portability/0000755002055400205540000000000013527342541017112 5ustar00achuachu00000000000000freeipmi-1.6.4/common/portability/Makefile.in0000644002055400205540000010064213527342444021164 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/portability DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libportability_la_LIBADD = am__libportability_la_SOURCES_DIST = freeipmi-portability.c \ freeipmi-portability.h freeipmi-argp.h freeipmi-argp-ba.c \ freeipmi-argp-eexst.c freeipmi-argp-fmtstream.c \ freeipmi-argp-fmtstream.h freeipmi-argp-help.c \ freeipmi-argp-namefrob.h freeipmi-argp-parse.c \ freeipmi-argp-pv.c freeipmi-argp-pvh.c @WITH_FREEIPMI_ARGP_TRUE@am__objects_1 = libportability_la-freeipmi-argp-ba.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-eexst.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-fmtstream.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-help.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-parse.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-pv.lo \ @WITH_FREEIPMI_ARGP_TRUE@ libportability_la-freeipmi-argp-pvh.lo am_libportability_la_OBJECTS = \ libportability_la-freeipmi-portability.lo $(am__objects_1) libportability_la_OBJECTS = $(am_libportability_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libportability_la_SOURCES) DIST_SOURCES = $(am__libportability_la_SOURCES_DIST) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_FREEIPMI_ARGP_TRUE@FREEIPMI_ARG_SOURCES = \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp.h \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-ba.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-eexst.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-fmtstream.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-fmtstream.h \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-help.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-namefrob.h \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-parse.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-pv.c \ @WITH_FREEIPMI_ARGP_TRUE@ freeipmi-argp-pvh.c noinst_LTLIBRARIES = \ libportability.la libportability_la_CPPFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT libportability_la_SOURCES = \ freeipmi-portability.c \ freeipmi-portability.h \ $(FREEIPMI_ARG_SOURCES) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/portability/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/portability/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libportability.la: $(libportability_la_OBJECTS) $(libportability_la_DEPENDENCIES) $(EXTRA_libportability_la_DEPENDENCIES) $(AM_V_CCLD)$(LINK) $(libportability_la_OBJECTS) $(libportability_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-ba.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-eexst.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-fmtstream.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-help.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-parse.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-pv.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-argp-pvh.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libportability_la-freeipmi-portability.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libportability_la-freeipmi-portability.lo: freeipmi-portability.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-portability.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-portability.Tpo -c -o libportability_la-freeipmi-portability.lo `test -f 'freeipmi-portability.c' || echo '$(srcdir)/'`freeipmi-portability.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-portability.Tpo $(DEPDIR)/libportability_la-freeipmi-portability.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-portability.c' object='libportability_la-freeipmi-portability.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-portability.lo `test -f 'freeipmi-portability.c' || echo '$(srcdir)/'`freeipmi-portability.c libportability_la-freeipmi-argp-ba.lo: freeipmi-argp-ba.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-ba.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-ba.Tpo -c -o libportability_la-freeipmi-argp-ba.lo `test -f 'freeipmi-argp-ba.c' || echo '$(srcdir)/'`freeipmi-argp-ba.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-ba.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-ba.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-ba.c' object='libportability_la-freeipmi-argp-ba.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-ba.lo `test -f 'freeipmi-argp-ba.c' || echo '$(srcdir)/'`freeipmi-argp-ba.c libportability_la-freeipmi-argp-eexst.lo: freeipmi-argp-eexst.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-eexst.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-eexst.Tpo -c -o libportability_la-freeipmi-argp-eexst.lo `test -f 'freeipmi-argp-eexst.c' || echo '$(srcdir)/'`freeipmi-argp-eexst.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-eexst.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-eexst.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-eexst.c' object='libportability_la-freeipmi-argp-eexst.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-eexst.lo `test -f 'freeipmi-argp-eexst.c' || echo '$(srcdir)/'`freeipmi-argp-eexst.c libportability_la-freeipmi-argp-fmtstream.lo: freeipmi-argp-fmtstream.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-fmtstream.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-fmtstream.Tpo -c -o libportability_la-freeipmi-argp-fmtstream.lo `test -f 'freeipmi-argp-fmtstream.c' || echo '$(srcdir)/'`freeipmi-argp-fmtstream.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-fmtstream.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-fmtstream.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-fmtstream.c' object='libportability_la-freeipmi-argp-fmtstream.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-fmtstream.lo `test -f 'freeipmi-argp-fmtstream.c' || echo '$(srcdir)/'`freeipmi-argp-fmtstream.c libportability_la-freeipmi-argp-help.lo: freeipmi-argp-help.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-help.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-help.Tpo -c -o libportability_la-freeipmi-argp-help.lo `test -f 'freeipmi-argp-help.c' || echo '$(srcdir)/'`freeipmi-argp-help.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-help.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-help.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-help.c' object='libportability_la-freeipmi-argp-help.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-help.lo `test -f 'freeipmi-argp-help.c' || echo '$(srcdir)/'`freeipmi-argp-help.c libportability_la-freeipmi-argp-parse.lo: freeipmi-argp-parse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-parse.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-parse.Tpo -c -o libportability_la-freeipmi-argp-parse.lo `test -f 'freeipmi-argp-parse.c' || echo '$(srcdir)/'`freeipmi-argp-parse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-parse.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-parse.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-parse.c' object='libportability_la-freeipmi-argp-parse.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-parse.lo `test -f 'freeipmi-argp-parse.c' || echo '$(srcdir)/'`freeipmi-argp-parse.c libportability_la-freeipmi-argp-pv.lo: freeipmi-argp-pv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-pv.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-pv.Tpo -c -o libportability_la-freeipmi-argp-pv.lo `test -f 'freeipmi-argp-pv.c' || echo '$(srcdir)/'`freeipmi-argp-pv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-pv.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-pv.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-pv.c' object='libportability_la-freeipmi-argp-pv.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-pv.lo `test -f 'freeipmi-argp-pv.c' || echo '$(srcdir)/'`freeipmi-argp-pv.c libportability_la-freeipmi-argp-pvh.lo: freeipmi-argp-pvh.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libportability_la-freeipmi-argp-pvh.lo -MD -MP -MF $(DEPDIR)/libportability_la-freeipmi-argp-pvh.Tpo -c -o libportability_la-freeipmi-argp-pvh.lo `test -f 'freeipmi-argp-pvh.c' || echo '$(srcdir)/'`freeipmi-argp-pvh.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libportability_la-freeipmi-argp-pvh.Tpo $(DEPDIR)/libportability_la-freeipmi-argp-pvh.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='freeipmi-argp-pvh.c' object='libportability_la-freeipmi-argp-pvh.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libportability_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libportability_la-freeipmi-argp-pvh.lo `test -f 'freeipmi-argp-pvh.c' || echo '$(srcdir)/'`freeipmi-argp-pvh.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/portability/Makefile.am0000644002055400205540000000077713527331635021163 0ustar00achuachu00000000000000if WITH_FREEIPMI_ARGP FREEIPMI_ARG_SOURCES = \ freeipmi-argp.h \ freeipmi-argp-ba.c \ freeipmi-argp-eexst.c \ freeipmi-argp-fmtstream.c \ freeipmi-argp-fmtstream.h \ freeipmi-argp-help.c \ freeipmi-argp-namefrob.h \ freeipmi-argp-parse.c \ freeipmi-argp-pv.c \ freeipmi-argp-pvh.c endif noinst_LTLIBRARIES = \ libportability.la libportability_la_CPPFLAGS = \ -D_GNU_SOURCE \ -D_REENTRANT libportability_la_SOURCES = \ freeipmi-portability.c \ freeipmi-portability.h \ $(FREEIPMI_ARG_SOURCES) freeipmi-1.6.4/common/portability/freeipmi-portability.c0000644002055400205540000002144713527331635023430 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include "freeipmi-portability.h" #ifndef HAVE_MEMPCPY /* Written by Niels Moller * * This file is hereby placed in the public domain. */ void * freeipmi_mempcpy (void *to, const void *from, size_t size) { memcpy (to, from, size); return (char *) to + size; } #endif #ifndef HAVE_STRNDUP /* Replacement for glibc strndup() */ char * freeipmi_strndup (const char *s, size_t n) { size_t len = strlen (s); char *new; if (len > n) len = n; new = (char *)malloc (len + 1); if (new == NULL) return (NULL); new[len] = '\0'; return (char *)memcpy (new, s, len); } #endif #ifndef HAVE_STRCHRNUL /* Written by Niels Moller * * This file is hereby placed in the public domain. */ char * freeipmi_strchrnul (const char *s, int c) { const char *p = s; while (*p && (*p != c)) p++; return (char *) p; } #endif #ifndef HAVE_STRSEP /* achu: ripped from wine * http://www.winehq.org/pipermail/wine-patches/2001-November/001322.html */ char * freeipmi_strsep (char **stringp, const char *delim) { char *token; if (*stringp == NULL) { /* No more tokens */ return (NULL); } token = *stringp; while (**stringp != '\0') { if (strchr (delim, **stringp) != NULL) { **stringp = '\0'; (*stringp)++; return token; } (*stringp)++; } /* There is no other token */ *stringp = NULL; return token; } #endif #ifndef HAVE_STRISTR /* achu: this is my cheap and quick implementation */ static void _to_uppercase (char *s) { while ((*s) != '\0') { if ((*s) >= 'A' && (*s) <= 'Z') (*s) = (*s) + ('a' - 'A'); s++; } } char * freeipmi_stristr (const char *s1, const char *s2) { char *s1cpy = NULL; char *s2cpy = NULL; char *ptr; char *rv = NULL; if (!s1 || !s2) goto cleanup; if (!(s1cpy = strdup (s1))) goto cleanup; if (!(s2cpy = strdup (s2))) goto cleanup; _to_uppercase (s1cpy); _to_uppercase (s2cpy); if ((ptr = strstr (s1cpy, s2cpy))) rv = ((char *)s1 + (ptr - s1cpy)); cleanup: free (s1cpy); free (s2cpy); return (rv); } #endif /* !HAVE_STRISTR */ #ifndef HAVE_GETLINE /* Replacement for glibc getline */ ssize_t freeipmi_getline (char **buf, size_t *size, FILE *fp) { ssize_t n = 0; if (buf == NULL || size == NULL) { errno = EINVAL; return (-1); } if (*buf == NULL || *size == 0) { *size = 120; *buf = (char *)malloc (*size); if (*buf == NULL) return (-1); } for (;;) { int ch; if (n + 2 > *size) { size_t newsize = *size * 2; char *newbuf = (char *)realloc (*buf, newsize); if (newbuf == NULL) return (-1); *buf = newbuf; *size = newsize; } ch = fgetc (fp); if (ch == -1) { (*buf)[n++] = '\0'; return (-1); } (*buf)[n++] = ch; if (ch == '\n') { (*buf)[n++] = '\0'; return n; } } } #endif #ifndef HAVE_ASPRINTF /* achu: ripped from IkiWiki * http://ikiwiki.info/bugs/build_in_opensolaris/ */ int freeipmi_asprintf (char **strp, const char *fmt, ...) { va_list arg; char *str; int size; int rv; va_start (arg, fmt); size = vsnprintf (NULL, 0, fmt, arg); size++; va_start (arg, fmt); str = malloc (size); if (str == NULL) { va_end (arg); /* * Strictly speaking, GNU asprintf doesn't do this, * but the caller isn't checking the return value. */ perror ("malloc"); exit (1); } rv = vsnprintf (str, size, fmt, arg); va_end (arg); *strp = str; return (rv); } #endif #ifndef HAVE_FUNC_GETHOSTBYNAME_R_6 /* * Replacement for 6-argument variant of gethostbyname_r(). This is a * slightly modified version of gethostbyname_r() by Enzo Michelangeli * from http://www.cygwin.com/ml/cygwin/2004-04/msg00532.html. * * If we have thread-safe gethostbyname() we just need to protect * static thread data from being overwritten by next call to * gethostbyname(). So mutex is not required. */ int freeipmi_gethostbyname_r (const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop) { int hsave; struct hostent *ph; #ifndef HAVE_THREAD_SAFE_GETHOSTBYNAME static pthread_mutex_t __mutex = PTHREAD_MUTEX_INITIALIZER; pthread_mutex_lock (&__mutex); /* begin critical area */ #endif hsave = h_errno; ph = gethostbyname (name); *h_errnop = h_errno; /* copy h_errno to *h_herrnop */ if (ph == NULL) { *result = NULL; } else { char **p, **q; char *pbuf; int nbytes=0; int naddr=0, naliases=0; /* determine if we have enough space in buf */ /* count how many addresses */ for (p = ph->h_addr_list; *p != 0; p++) { nbytes += ph->h_length; /* addresses */ nbytes += sizeof (*p); /* pointers */ naddr++; } nbytes += sizeof (*p); /* one more for the terminating NULL */ /* count how many aliases, and total length of strings */ for (p = ph->h_aliases; *p != 0; p++) { nbytes += (strlen (*p)+1); /* aliases */ nbytes += sizeof (*p); /* pointers */ naliases++; } nbytes += sizeof (*p); /* one more for the terminating NULL */ /* here nbytes is the number of bytes required in buffer */ /* as a terminator must be there, the minimum value is ph->h_length */ if(nbytes > buflen) { *result = NULL; #ifndef HAVE_THREAD_SAFE_GETHOSTBYNAME pthread_mutex_unlock (&__mutex); /* end critical area */ #endif return ERANGE; /* not enough space in buf!! */ } /* There is enough space. Now we need to do a deep copy! */ /* Allocation in buffer: from [0] to [(naddr-1) * sizeof (*p)]: pointers to addresses at [naddr * sizeof (*p)]: NULL from [(naddr+1) * sizeof (*p)] to [(naddr+naliases) * sizeof (*p)] : pointers to aliases at [(naddr+naliases+1) * sizeof (*p)]: NULL then naddr addresses (fixed length), and naliases aliases (asciiz). */ *ret = *ph; /* copy whole structure (not its address!) */ /* copy addresses */ q = (char **)buf; /* pointer to pointers area (type: char **) */ ret->h_addr_list = q; /* update pointer to address list */ pbuf = buf + ((naddr+naliases+2)*sizeof (*p)); /* skip that area */ for (p = ph->h_addr_list; *p != 0; p++) { memcpy (pbuf, *p, ph->h_length); /* copy address bytes */ *q++ = pbuf; /* the pointer is the one inside buf... */ pbuf += ph->h_length; /* advance pbuf */ } *q++ = NULL; /* address list terminator */ /* copy aliases */ ret->h_aliases = q; /* update pointer to aliases list */ for (p = ph->h_aliases; *p != 0; p++) { strcpy (pbuf, *p); /* copy alias strings */ *q++ = pbuf; /* the pointer is the one inside buf... */ pbuf += strlen (*p); /* advance pbuf */ *pbuf++ = 0; /* string terminator */ } *q++ = NULL; /* terminator */ strcpy (pbuf, ph->h_name); /* copy alias strings */ ret->h_name = pbuf; pbuf += strlen (ph->h_name); /* advance pbuf */ *pbuf++ = 0; /* string terminator */ *result = ret; /* and let *result point to structure */ } h_errno = hsave; /* restore h_errno */ #ifndef HAVE_THREAD_SAFE_GETHOSTBYNAME pthread_mutex_unlock (&__mutex); /* end critical area */ #endif return (*result == NULL); } #endif /* HAVE_FUNC_GETHOSTBYNAME_R_6 */ freeipmi-1.6.4/common/portability/freeipmi-portability.h0000644002055400205540000001400413527331635023424 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef FREEIPMI_PORTABILITY_H #define FREEIPMI_PORTABILITY_H #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include /* For FILE definition */ #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #if HAVE_ALLOCA_H #include #endif /* HAVE_ALLOCA_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ /* achu: I guess __func__ is the other macro people use?? */ #ifndef HAVE_FUNCTION_MACRO #define __FUNCTION__ __func__ #endif /* achu: not on Solaris */ #ifndef UINT_MAX #define UINT_MAX 4294967295U #endif #if __WORDSIZE == 64 #define FI_64 "%l" #else #define FI_64 "%ll" #endif # if ENABLE_NLS # include # define _(Text) gettext (Text) # else # define textdomain(Domain) # define _(Text) Text # endif # define N_(Text) Text #if !defined(O_SYNC) && defined(O_FSYNC) #define O_SYNC O_FSYNC #endif /* FreeBSD don't have log2(), exp10() and exp2() */ #ifndef HAVE_LOG2 /* Cygwin has a log2 macro to already handle portability */ #ifndef log2 #define log2(x) (M_LOG2E * log ((x))) #endif #endif #ifndef HAVE_EXP10 #define exp10(x) (pow (10.0, (x))) #endif #ifndef HAVE_EXP2 #define exp2(x) (pow (2.0, (x))) #endif /* uClibc may not have cbrt() */ #ifndef HAVE_CBRT #define cbrt(x) (pow((x), -3.0)) #endif /* FreeBSD don't have strdupa */ #ifndef strdupa /* Duplicate S, returning an identical alloca'd string. */ # define strdupa(s) \ ({ \ const char *__old = (s); \ size_t __len = strlen (__old) + 1; \ char *__new = (char *) alloca (__len); \ (char *) memcpy (__new, __old, __len); \ }) #endif #ifndef HAVE_MEMCPY static inline void* freeipmi_memcpy (void *dest, const void *src, size_t n) { while (0 <= --n) ((unsigned char*)dest) [n] = ((unsigned char*)src) [n]; return (dest); } #define memcpy freeipmi_memcpy #endif /* HAVE_MEMCPY */ #ifndef HAVE_MEMPCPY #define mempcpy freeipmi_mempcpy void *freeipmi_mempcpy (void *to, const void *from, size_t size); #endif /* HAVE_MEMPCPY */ #ifndef HAVE_MEMSET static inline void* freeipmi_memset (void *s, int c, size_t n) { while (0 <= --n) ((unsigned char*)s) [n] = (unsigned char) c; return (s); } #define memset freeipmi_memset #endif /* HAVE_MEMSET */ #ifndef HAVE_STRCHR static inline char* freeipmi_strchr (const char* s, int c) { while (*s != '\0') if (*s == (char)c) return s; else s++; return (NULL); } # define strchr freeipmi_strchr #endif /* HAVE_STRCHR */ /* FreeBSD don't have strndup() */ #ifndef HAVE_STRNDUP #define strndup freeipmi_strndup char *freeipmi_strndup (const char *, size_t); #endif #ifndef HAVE_STRCHRNUL #define strchrnul freeipmi_strchrnul char *freeipmi_strchrnul (const char *s, int c); #endif /* !HAVE_STRCHRNUL */ #ifndef HAVE_STRSEP #define strsep freeipmi_strsep char *freeipmi_strsep (char **stringp, const char *delim); #endif /* !HAVE_STRSEP */ #ifndef HAVE_STRISTR #define stristr freeipmi_stristr char *freeipmi_stristr (const char *s1, const char *s2); #endif /* !HAVE_STRISTR */ /* FreeBSD don't have getline() */ #ifndef HAVE_GETLINE #define getline freeipmi_getline ssize_t freeipmi_getline (char **buf, size_t *bufsize, FILE *fp); #endif #ifndef HAVE_ASPRINTF #define asprintf freeipmi_asprintf int freeipmi_asprintf (char **strp, const char *fmt, ...); #endif /* achu: timeradd and timersub not in solaris * * these definitions ripped from sys/time.h on linux. */ #ifndef timeradd # define timeradd(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec + (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec + (b)->tv_usec; \ if ((result)->tv_usec >= 1000000) \ { \ ++(result)->tv_sec; \ (result)->tv_usec -= 1000000; \ } \ } while (0) #endif /* timeradd */ #ifndef timersub # define timersub(a, b, result) \ do { \ (result)->tv_sec = (a)->tv_sec - (b)->tv_sec; \ (result)->tv_usec = (a)->tv_usec - (b)->tv_usec; \ if ((result)->tv_usec < 0) { \ --(result)->tv_sec; \ (result)->tv_usec += 1000000; \ } \ } while (0) #endif /* timersub */ #if !defined(HAVE_FUNC_GETHOSTBYNAME_R_6) && !defined(HAVE_FUNC_GETHOSTBYNAME_R_5) int freeipmi_gethostbyname_r (const char *name, struct hostent *ret, char *buf, size_t buflen, struct hostent **result, int *h_errnop); #endif /* !defined(HAVE_FUNC_GETHOSTBYNAME_R_6) && !defined(HAVE_FUNC_GETHOSTBYNAME_R_5) */ #endif /* FREEIPMI_PORTABILITY_H */ freeipmi-1.6.4/common/portability/freeipmi-argp.h0000644002055400205540000006506613527331635022031 0ustar00achuachu00000000000000/* Hierarchial argument parsing. Copyright (C) 1995, 96, 97, 98, 99, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _FREEIPMI_ARGP_H #define _FREEIPMI_ARGP_H #include #include #define __need_error_t #include #ifndef __THROW # define __THROW #endif #ifndef __const # define __const const #endif #ifndef __error_t_defined typedef int error_t; # define __error_t_defined #endif /* FIXME: What's the right way to check for __restrict? Sun's cc seems not to have it. Perhaps it's easiest to just delete the use of __restrict from the prototypes. */ #ifndef __restrict # ifndef __GNUC___ # define __restrict # endif #endif /* NOTE: We can't use the autoconf tests, since this is supposed to be an installed header file and argp's config.h is of course not installed. */ #ifndef PRINTF_STYLE # if __GNUC__ >= 2 # define PRINTF_STYLE(f, a) __attribute__ ((__format__ (__printf__, f, a))) # else # define PRINTF_STYLE(f, a) # endif #endif #ifdef __cplusplus extern "C" { #endif /* A description of a particular option. A pointer to an array of these is passed in the OPTIONS field of an argp structure. Each option entry can correspond to one long option and/or one short option; more names for the same option can be added by following an entry in an option array with options having the OPTION_ALIAS flag set. */ struct argp_option { /* The long option name. For more than one name for the same option, you can use following options with the OPTION_ALIAS flag set. */ __const char *name; /* What key is returned for this option. If > 0 and printable, then it's also accepted as a short option. */ int key; /* If non-NULL, this is the name of the argument associated with this option, which is required unless the OPTION_ARG_OPTIONAL flag is set. */ __const char *arg; /* OPTION_ flags. */ int flags; /* The doc string for this option. If both NAME and KEY are 0, This string will be printed outdented from the normal option column, making it useful as a group header (it will be the first thing printed in its group); in this usage, it's conventional to end the string with a `:'. */ __const char *doc; /* The group this option is in. In a long help message, options are sorted alphabetically within each group, and the groups presented in the order 0, 1, 2, ..., n, -m, ..., -2, -1. Every entry in an options array with if this field 0 will inherit the group number of the previous entry, or zero if it's the first one, unless its a group header (NAME and KEY both 0), in which case, the previous entry + 1 is the default. Automagic options such as --help are put into group -1. */ int group; }; /* The argument associated with this option is optional. */ #define OPTION_ARG_OPTIONAL 0x1 /* This option isn't displayed in any help messages. */ #define OPTION_HIDDEN 0x2 /* This option is an alias for the closest previous non-alias option. This means that it will be displayed in the same help entry, and will inherit fields other than NAME and KEY from the aliased option. */ #define OPTION_ALIAS 0x4 /* This option isn't actually an option (and so should be ignored by the actual option parser), but rather an arbitrary piece of documentation that should be displayed in much the same manner as the options. If this flag is set, then the option NAME field is displayed unmodified (e.g., no `--' prefix is added) at the left-margin (where a *short* option would normally be displayed), and the documentation string in the normal place. For purposes of sorting, any leading whitespace and puncuation is ignored, except that if the first non-whitespace character is not `-', this entry is displayed after all options (and OPTION_DOC entries with a leading `-') in the same group. */ #define OPTION_DOC 0x8 /* This option shouldn't be included in `long' usage messages (but is still included in help messages). This is mainly intended for options that are completely documented in an argp's ARGS_DOC field, in which case including the option in the generic usage list would be redundant. For instance, if ARGS_DOC is "FOO BAR\n-x BLAH", and the `-x' option's purpose is to distinguish these two cases, -x should probably be marked OPTION_NO_USAGE. */ #define OPTION_NO_USAGE 0x10 struct argp; /* fwd declare this type */ struct argp_state; /* " */ struct argp_child; /* " */ /* The type of a pointer to an argp parsing function. */ typedef error_t (*argp_parser_t) (int key, char *arg, struct argp_state *state); /* What to return for unrecognized keys. For special ARGP_KEY_ keys, such returns will simply be ignored. For user keys, this error will be turned into EINVAL (if the call to argp_parse is such that errors are propagated back to the user instead of exiting); returning EINVAL itself would result in an immediate stop to parsing in *all* cases. */ #define ARGP_ERR_UNKNOWN E2BIG /* Hurd should never need E2BIG. XXX */ /* Special values for the KEY argument to an argument parsing function. ARGP_ERR_UNKNOWN should be returned if they aren't understood. The sequence of keys to a parsing function is either (where each uppercased word should be prefixed by `ARGP_KEY_' and opt is a user key): INIT opt... NO_ARGS END SUCCESS -- No non-option arguments at all or INIT (opt | ARG)... END SUCCESS -- All non-option args parsed or INIT (opt | ARG)... SUCCESS -- Some non-option arg unrecognized The third case is where every parser returned ARGP_KEY_UNKNOWN for an argument, in which case parsing stops at that argument (returning the unparsed arguments to the caller of argp_parse if requested, or stopping with an error message if not). If an error occurs (either detected by argp, or because the parsing function returned an error value), then the parser is called with ARGP_KEY_ERROR, and no further calls are made. */ /* This is not an option at all, but rather a command line argument. If a parser receiving this key returns success, the fact is recorded, and the ARGP_KEY_NO_ARGS case won't be used. HOWEVER, if while processing the argument, a parser function decrements the NEXT field of the state it's passed, the option won't be considered processed; this is to allow you to actually modify the argument (perhaps into an option), and have it processed again. */ #define ARGP_KEY_ARG 0 /* There are remaining arguments not parsed by any parser, which may be found starting at (STATE->argv + STATE->next). If success is returned, but STATE->next left untouched, it's assumed that all arguments were consume, otherwise, the parser should adjust STATE->next to reflect any arguments consumed. */ #define ARGP_KEY_ARGS 0x1000006 /* There are no more command line arguments at all. */ #define ARGP_KEY_END 0x1000001 /* Because it's common to want to do some special processing if there aren't any non-option args, user parsers are called with this key if they didn't successfully process any non-option arguments. Called just before ARGP_KEY_END (where more general validity checks on previously parsed arguments can take place). */ #define ARGP_KEY_NO_ARGS 0x1000002 /* Passed in before any parsing is done. Afterwards, the values of each element of the CHILD_INPUT field, if any, in the state structure is copied to each child's state to be the initial value of the INPUT field. */ #define ARGP_KEY_INIT 0x1000003 /* Use after all other keys, including SUCCESS & END. */ #define ARGP_KEY_FINI 0x1000007 /* Passed in when parsing has successfully been completed (even if there are still arguments remaining). */ #define ARGP_KEY_SUCCESS 0x1000004 /* Passed in if an error occurs. */ #define ARGP_KEY_ERROR 0x1000005 /* An argp structure contains a set of options declarations, a function to deal with parsing one, documentation string, a possible vector of child argp's, and perhaps a function to filter help output. When actually parsing options, getopt is called with the union of all the argp structures chained together through their CHILD pointers, with conflicts being resolved in favor of the first occurrence in the chain. */ struct argp { /* An array of argp_option structures, terminated by an entry with both NAME and KEY having a value of 0. */ __const struct argp_option *options; /* What to do with an option from this structure. KEY is the key associated with the option, and ARG is any associated argument (NULL if none was supplied). If KEY isn't understood, ARGP_ERR_UNKNOWN should be returned. If a non-zero, non-ARGP_ERR_UNKNOWN value is returned, then parsing is stopped immediately, and that value is returned from argp_parse(). For special (non-user-supplied) values of KEY, see the ARGP_KEY_ definitions below. */ argp_parser_t parser; /* A string describing what other arguments are wanted by this program. It is only used by argp_usage to print the `Usage:' message. If it contains newlines, the strings separated by them are considered alternative usage patterns, and printed on separate lines (lines after the first are prefix by ` or: ' instead of `Usage:'). */ __const char *args_doc; /* If non-NULL, a string containing extra text to be printed before and after the options in a long help message (separated by a vertical tab `\v' character). */ __const char *doc; /* A vector of argp_children structures, terminated by a member with a 0 argp field, pointing to child argps should be parsed with this one. Any conflicts are resolved in favor of this argp, or early argps in the CHILDREN list. This field is useful if you use libraries that supply their own argp structure, which you want to use in conjunction with your own. */ __const struct argp_child *children; /* If non-zero, this should be a function to filter the output of help messages. KEY is either a key from an option, in which case TEXT is that option's help text, or a special key from the ARGP_KEY_HELP_ defines, below, describing which other help text TEXT is. The function should return either TEXT, if it should be used as-is, a replacement string, which should be malloced, and will be freed by argp, or NULL, meaning `print nothing'. The value for TEXT is *after* any translation has been done, so if any of the replacement text also needs translation, that should be done by the filter function. INPUT is either the input supplied to argp_parse, or NULL, if argp_help was called directly. */ char *(*help_filter) (int __key, __const char *__text, void *__input); /* If non-zero the strings used in the argp library are translated using the domain described by this string. Otherwise the currently installed default domain is used. */ const char *argp_domain; }; /* Possible KEY arguments to a help filter function. */ #define ARGP_KEY_HELP_PRE_DOC 0x2000001 /* Help text preceeding options. */ #define ARGP_KEY_HELP_POST_DOC 0x2000002 /* Help text following options. */ #define ARGP_KEY_HELP_HEADER 0x2000003 /* Option header string. */ #define ARGP_KEY_HELP_EXTRA 0x2000004 /* After all other documentation; TEXT is NULL for this key. */ /* Explanatory note emitted when duplicate option arguments have been suppressed. */ #define ARGP_KEY_HELP_DUP_ARGS_NOTE 0x2000005 #define ARGP_KEY_HELP_ARGS_DOC 0x2000006 /* Argument doc string. */ /* When an argp has a non-zero CHILDREN field, it should point to a vector of argp_child structures, each of which describes a subsidiary argp. */ struct argp_child { /* The child parser. */ __const struct argp *argp; /* Flags for this child. */ int flags; /* If non-zero, an optional header to be printed in help output before the child options. As a side-effect, a non-zero value forces the child options to be grouped together; to achieve this effect without actually printing a header string, use a value of "". */ __const char *header; /* Where to group the child options relative to the other (`consolidated') options in the parent argp; the values are the same as the GROUP field in argp_option structs, but all child-groupings follow parent options at a particular group level. If both this field and HEADER are zero, then they aren't grouped at all, but rather merged with the parent options (merging the child's grouping levels with the parents). */ int group; }; /* Parsing state. This is provided to parsing functions called by argp, which may examine and, as noted, modify fields. */ struct argp_state { /* The top level ARGP being parsed. */ __const struct argp *root_argp; /* The argument vector being parsed. May be modified. */ int argc; char **argv; /* The index in ARGV of the next arg that to be parsed. May be modified. */ int next; /* The flags supplied to argp_parse. May be modified. */ unsigned flags; /* While calling a parsing function with a key of ARGP_KEY_ARG, this is the number of the current arg, starting at zero, and incremented after each such call returns. At all other times, this is the number of such arguments that have been processed. */ unsigned arg_num; /* If non-zero, the index in ARGV of the first argument following a special `--' argument (which prevents anything following being interpreted as an option). Only set once argument parsing has proceeded past this point. */ int quoted; /* An arbitrary pointer passed in from the user. */ void *input; /* Values to pass to child parsers. This vector will be the same length as the number of children for the current parser. */ void **child_inputs; /* For the parser's use. Initialized to 0. */ void *hook; /* The name used when printing messages. This is initialized to ARGV[0], or PROGRAM_INVOCATION_NAME if that is unavailable. */ char *name; /* Streams used when argp prints something. */ FILE *err_stream; /* For errors; initialized to stderr. */ FILE *out_stream; /* For information; initialized to stdout. */ void *pstate; /* Private, for use by argp. */ }; /* Flags for argp_parse (note that the defaults are those that are convenient for program command line parsing): */ /* Don't ignore the first element of ARGV. Normally (and always unless ARGP_NO_ERRS is set) the first element of the argument vector is skipped for option parsing purposes, as it corresponds to the program name in a command line. */ #define ARGP_PARSE_ARGV0 0x01 /* Don't print error messages for unknown options to stderr; unless this flag is set, ARGP_PARSE_ARGV0 is ignored, as ARGV[0] is used as the program name in the error messages. This flag implies ARGP_NO_EXIT (on the assumption that silent exiting upon errors is bad behaviour). */ #define ARGP_NO_ERRS 0x02 /* Don't parse any non-option args. Normally non-option args are parsed by calling the parse functions with a key of ARGP_KEY_ARG, and the actual arg as the value. Since it's impossible to know which parse function wants to handle it, each one is called in turn, until one returns 0 or an error other than ARGP_ERR_UNKNOWN; if an argument is handled by no one, the argp_parse returns prematurely (but with a return value of 0). If all args have been parsed without error, all parsing functions are called one last time with a key of ARGP_KEY_END. This flag needn't normally be set, as the normal behavior is to stop parsing as soon as some argument can't be handled. */ #define ARGP_NO_ARGS 0x04 /* Parse options and arguments in the same order they occur on the command line -- normally they're rearranged so that all options come first. */ #define ARGP_IN_ORDER 0x08 /* Don't provide the standard long option --help, which causes usage and option help information to be output to stdout, and exit (0) called. */ #define ARGP_NO_HELP 0x10 /* Don't exit on errors (they may still result in error messages). */ #define ARGP_NO_EXIT 0x20 /* Use the gnu getopt `long-only' rules for parsing arguments. */ #define ARGP_LONG_ONLY 0x40 /* Turns off any message-printing/exiting options. */ #define ARGP_SILENT (ARGP_NO_EXIT | ARGP_NO_ERRS | ARGP_NO_HELP) /* Parse the options strings in ARGC & ARGV according to the options in ARGP. FLAGS is one of the ARGP_ flags above. If ARG_INDEX is non-NULL, the index in ARGV of the first unparsed option is returned in it. If an unknown option is present, ARGP_ERR_UNKNOWN is returned; if some parser routine returned a non-zero value, it is returned; otherwise 0 is returned. This function may also call exit unless the ARGP_NO_HELP flag is set. INPUT is a pointer to a value to be passed in to the parser. */ extern error_t argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input); extern error_t __argp_parse (__const struct argp *__restrict __argp, int __argc, char **__restrict __argv, unsigned __flags, int *__restrict __arg_index, void *__restrict __input); /* Global variables. */ /* If defined or set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which will print this string followed by a newline and exit (unless the ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */ extern __const char *argp_program_version; /* If defined or set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which calls this function with a stream to print the version to and a pointer to the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ extern void (*argp_program_version_hook) (FILE *__restrict __stream, struct argp_state *__restrict __state); /* If defined or set by the user program, it should point to string that is the bug-reporting address for the program. It will be printed by argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help messages), embedded in a sentence that says something like `Report bugs to ADDR.'. */ extern __const char *argp_program_bug_address; /* The exit status that argp will use when exiting due to a parsing error. If not defined or set by the user program, this defaults to EX_USAGE from . */ extern error_t argp_err_exit_status; /* Flags for argp_help. */ #define ARGP_HELP_USAGE 0x01 /* a Usage: message. */ #define ARGP_HELP_SHORT_USAGE 0x02 /* " but don't actually print options. */ #define ARGP_HELP_SEE 0x04 /* a `Try ... for more help' message. */ #define ARGP_HELP_LONG 0x08 /* a long help message. */ #define ARGP_HELP_PRE_DOC 0x10 /* doc string preceding long help. */ #define ARGP_HELP_POST_DOC 0x20 /* doc string following long help. */ #define ARGP_HELP_DOC (ARGP_HELP_PRE_DOC | ARGP_HELP_POST_DOC) #define ARGP_HELP_BUG_ADDR 0x40 /* bug report address */ #define ARGP_HELP_LONG_ONLY 0x80 /* modify output appropriately to reflect ARGP_LONG_ONLY mode. */ /* These ARGP_HELP flags are only understood by argp_state_help. */ #define ARGP_HELP_EXIT_ERR 0x100 /* Call exit(1) instead of returning. */ #define ARGP_HELP_EXIT_OK 0x200 /* Call exit(0) instead of returning. */ /* The standard thing to do after a program command line parsing error, if an error message has already been printed. */ #define ARGP_HELP_STD_ERR \ (ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) /* The standard thing to do after a program command line parsing error, if no more specific error message has been printed. */ #define ARGP_HELP_STD_USAGE \ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_SEE | ARGP_HELP_EXIT_ERR) /* The standard thing to do in response to a --help option. */ #define ARGP_HELP_STD_HELP \ (ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG | ARGP_HELP_EXIT_OK \ | ARGP_HELP_DOC | ARGP_HELP_BUG_ADDR) /* Output a usage message for ARGP to STREAM. FLAGS are from the set ARGP_HELP_*. */ extern void argp_help (__const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__restrict __name); extern void __argp_help (__const struct argp *__restrict __argp, FILE *__restrict __stream, unsigned __flags, char *__name); /* The following routines are intended to be called from within an argp parsing routine (thus taking an argp_state structure as the first argument). They may or may not print an error message and exit, depending on the flags in STATE -- in any case, the caller should be prepared for them *not* to exit, and should return an appropiate error after calling them. [argp_usage & argp_error should probably be called argp_state_..., but they're used often enough that they should be short] */ /* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are from the set ARGP_HELP_*. */ extern void argp_state_help (__const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags); extern void __argp_state_help (__const struct argp_state *__restrict __state, FILE *__restrict __stream, unsigned int __flags); /* Possibly output the standard usage message for ARGP to stderr and exit. */ extern void argp_usage (__const struct argp_state *__state); extern void __argp_usage (__const struct argp_state *__state); /* If appropriate, print the printf string FMT and following args, preceded by the program name and `:', to stderr, and followed by a `Try ... --help' message, then exit (1). */ extern void argp_error (__const struct argp_state *__restrict __state, __const char *__restrict __fmt, ...) PRINTF_STYLE(2,3); extern void __argp_error (__const struct argp_state *__restrict __state, __const char *__restrict __fmt, ...) PRINTF_STYLE(2,3); /* Similar to the standard gnu error-reporting function error(), but will respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print to STATE->err_stream. This is useful for argument parsing code that is shared between program startup (when exiting is desired) and runtime option parsing (when typically an error code is returned instead). The difference between this function and argp_error is that the latter is for *parsing errors*, and the former is for other problems that occur during parsing but don't reflect a (syntactic) problem with the input. */ extern void argp_failure (__const struct argp_state *__restrict __state, int __status, int __errnum, __const char *__restrict __fmt, ...) PRINTF_STYLE(4,5); extern void __argp_failure (__const struct argp_state *__restrict __state, int __status, int __errnum, __const char *__restrict __fmt, ...) PRINTF_STYLE(4,5); /* Returns true if the option OPT is a valid short option. */ extern int _option_is_short (__const struct argp_option *__opt); extern int __option_is_short (__const struct argp_option *__opt); /* Returns true if the option OPT is in fact the last (unused) entry in an options array. */ extern int _option_is_end (__const struct argp_option *__opt); extern int __option_is_end (__const struct argp_option *__opt); /* Return the input field for ARGP in the parser corresponding to STATE; used by the help routines. */ extern void *_argp_input (__const struct argp *__restrict __argp, __const struct argp_state *__restrict __state) ; extern void *__argp_input (__const struct argp *__restrict __argp, __const struct argp_state *__restrict __state) ; /* Used for extracting the program name from argv[0] */ extern char *_argp_basename(char *name); extern char *__argp_basename(char *name); /* Getting the program name given an argp state */ extern char * _argp_short_program_name(const struct argp_state *state); extern char * __argp_short_program_name(const struct argp_state *state); #ifdef __USE_EXTERN_INLINES # if !_LIBC # define __argp_usage argp_usage # define __argp_state_help argp_state_help # define __option_is_short _option_is_short # define __option_is_end _option_is_end # endif # ifndef ARGP_EI # define ARGP_EI extern __inline__ # endif ARGP_EI void __argp_usage (__const struct argp_state *__state) { __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); } ARGP_EI int __option_is_short (__const struct argp_option *__opt) { if (__opt->flags & OPTION_DOC) return 0; else { int __key = __opt->key; return __key > 0 && isprint (__key); } } ARGP_EI int __option_is_end (__const struct argp_option *__opt) { return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } # if !_LIBC # undef __argp_usage # undef __argp_state_help # undef __option_is_short # undef __option_is_end # endif #endif /* Use extern inlines. */ #ifdef __cplusplus } #endif #endif /* freeipmi-argp.h */ freeipmi-1.6.4/common/portability/freeipmi-argp-ba.c0000644002055400205540000000251413527331635022371 0ustar00achuachu00000000000000/* Default definition for ARGP_PROGRAM_BUG_ADDRESS. Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* If set by the user program, it should point to string that is the bug-reporting address for the program. It will be printed by argp_help if the ARGP_HELP_BUG_ADDR flag is set (as it is by various standard help messages), embedded in a sentence that says something like `Report bugs to ADDR.'. */ const char *argp_program_bug_address = 0; freeipmi-1.6.4/common/portability/freeipmi-argp-eexst.c0000644002055400205540000000241413527331635023136 0ustar00achuachu00000000000000/* Default definition for ARGP_ERR_EXIT_STATUS Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include #include "freeipmi-argp.h" /* The exit status that argp will use when exiting due to a parsing error. If not defined or set by the user program, this defaults to EX_USAGE from . */ error_t argp_err_exit_status = EX_USAGE; freeipmi-1.6.4/common/portability/freeipmi-argp-fmtstream.c0000644002055400205540000003416513527331635024020 0ustar00achuachu00000000000000/* Word-wrapping and line-truncating streams Copyright (C) 1997, 1998, 1999, 2001 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This package emulates glibc `line_wrap_stream' semantics for systems that don't have that. */ #ifdef HAVE_CONFIG_H #include #endif #include #include #include #include #include #include "freeipmi-argp-fmtstream.h" #include "freeipmi-argp-namefrob.h" #ifndef ARGP_FMTSTREAM_USE_LINEWRAP #ifndef isblank #define isblank(ch) ((ch)==' ' || (ch)=='\t') #endif #if defined _LIBC && defined USE_IN_LIBIO # include # define __vsnprintf(s, l, f, a) _IO_vsnprintf (s, l, f, a) #endif #define INIT_BUF_SIZE 200 #define PRINTF_SIZE_GUESS 150 /* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines written on it with LMARGIN spaces and limits them to RMARGIN columns total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by replacing the whitespace before them with a newline and WMARGIN spaces. Otherwise, chars beyond RMARGIN are simply dropped until a newline. Returns NULL if there was an error. */ argp_fmtstream_t __argp_make_fmtstream (FILE *stream, size_t lmargin, size_t rmargin, ssize_t wmargin) { argp_fmtstream_t fs = malloc (sizeof (struct argp_fmtstream)); if (fs) { fs->stream = stream; fs->lmargin = lmargin; fs->rmargin = rmargin; fs->wmargin = wmargin; fs->point_col = 0; fs->point_offs = 0; fs->buf = malloc (INIT_BUF_SIZE); if (! fs->buf) { free (fs); fs = 0; } else { fs->p = fs->buf; fs->end = fs->buf + INIT_BUF_SIZE; } } return fs; } #ifdef weak_alias weak_alias (__argp_make_fmtstream, argp_make_fmtstream) #endif /* Flush FS to its stream, and free it (but don't close the stream). */ void __argp_fmtstream_free (argp_fmtstream_t fs) { __argp_fmtstream_update (fs); if (fs->p > fs->buf) FWRITE_UNLOCKED (fs->buf, 1, fs->p - fs->buf, fs->stream); free (fs->buf); free (fs); } #ifdef weak_alias weak_alias (__argp_fmtstream_free, argp_fmtstream_free) #endif /* Process FS's buffer so that line wrapping is done from POINT_OFFS to the end of its buffer. This code is mostly from glibc stdio/linewrap.c. */ void __argp_fmtstream_update (argp_fmtstream_t fs) { char *buf, *nl; size_t len; /* Scan the buffer for newlines. */ buf = fs->buf + fs->point_offs; while (buf < fs->p) { size_t r; if (fs->point_col == 0 && fs->lmargin != 0) { /* We are starting a new line. Print spaces to the left margin. */ const size_t pad = fs->lmargin; if (fs->p + pad < fs->end) { /* We can fit in them in the buffer by moving the buffer text up and filling in the beginning. */ memmove (buf + pad, buf, fs->p - buf); fs->p += pad; /* Compensate for bigger buffer. */ memset (buf, ' ', pad); /* Fill in the spaces. */ buf += pad; /* Don't bother searching them. */ } else { /* No buffer space for spaces. Must flush. */ size_t i; for (i = 0; i < pad; i++) PUTC_UNLOCKED (' ', fs->stream); } fs->point_col = pad; } len = fs->p - buf; nl = memchr (buf, '\n', len); if (fs->point_col < 0) fs->point_col = 0; if (!nl) { /* The buffer ends in a partial line. */ if (fs->point_col + len < fs->rmargin) { /* The remaining buffer text is a partial line and fits within the maximum line width. Advance point for the characters to be written and stop scanning. */ fs->point_col += len; break; } else /* Set the end-of-line pointer for the code below to the end of the buffer. */ nl = fs->p; } else if (fs->point_col + (nl - buf) < (ssize_t) fs->rmargin) { /* The buffer contains a full line that fits within the maximum line width. Reset point and scan the next line. */ fs->point_col = 0; buf = nl + 1; continue; } /* This line is too long. */ r = fs->rmargin - 1; if (fs->wmargin < 0) { /* Truncate the line by overwriting the excess with the newline and anything after it in the buffer. */ if (nl < fs->p) { memmove (buf + (r - fs->point_col), nl, fs->p - nl); fs->p -= buf + (r - fs->point_col) - nl; /* Reset point for the next line and start scanning it. */ fs->point_col = 0; buf += r + 1; /* Skip full line plus \n. */ } else { /* The buffer ends with a partial line that is beyond the maximum line width. Advance point for the characters written, and discard those past the max from the buffer. */ fs->point_col += len; fs->p -= fs->point_col - r; break; } } else { /* Do word wrap. Go to the column just past the maximum line width and scan back for the beginning of the word there. Then insert a line break. */ char *p, *nextline; int i; p = buf + (r + 1 - fs->point_col); while (p >= buf && !isblank (*p)) --p; nextline = p + 1; /* This will begin the next line. */ if (nextline > buf) { /* Swallow separating blanks. */ if (p >= buf) do --p; while (p >= buf && isblank (*p)); nl = p + 1; /* The newline will replace the first blank. */ } else { /* A single word that is greater than the maximum line width. Oh well. Put it on an overlong line by itself. */ p = buf + (r + 1 - fs->point_col); /* Find the end of the long word. */ do ++p; while (p < nl && !isblank (*p)); if (p == nl) { /* It already ends a line. No fussing required. */ fs->point_col = 0; buf = nl + 1; continue; } /* We will move the newline to replace the first blank. */ nl = p; /* Swallow separating blanks. */ do ++p; while (isblank (*p)); /* The next line will start here. */ nextline = p; } /* Note: There are a bunch of tests below for NEXTLINE == BUF + LEN + 1; this case is where NL happens to fall at the end of the buffer, and NEXTLINE is in fact empty (and so we need not be careful to maintain its contents). */ if (nextline == buf + len + 1 ? fs->end - nl < fs->wmargin + 1 : nextline - (nl + 1) < fs->wmargin) { /* The margin needs more blanks than we removed. */ if (fs->end - fs->p > fs->wmargin + 1) /* Make some space for them. */ { size_t mv = fs->p - nextline; memmove (nl + 1 + fs->wmargin, nextline, mv); nextline = nl + 1 + fs->wmargin; len = nextline + mv - buf; *nl++ = '\n'; } else /* Output the first line so we can use the space. */ { if (nl > fs->buf) FWRITE_UNLOCKED (fs->buf, 1, nl - fs->buf, fs->stream); PUTC_UNLOCKED ('\n', fs->stream); len += buf - fs->buf; nl = buf = fs->buf; } } else /* We can fit the newline and blanks in before the next word. */ *nl++ = '\n'; if (nextline - nl >= fs->wmargin || (nextline == buf + len + 1 && fs->end - nextline >= fs->wmargin)) /* Add blanks up to the wrap margin column. */ for (i = 0; i < fs->wmargin; ++i) *nl++ = ' '; else for (i = 0; i < fs->wmargin; ++i) PUTC_UNLOCKED (' ', fs->stream); /* Copy the tail of the original buffer into the current buffer position. */ if (nl < nextline) memmove (nl, nextline, buf + len - nextline); len -= nextline - buf; /* Continue the scan on the remaining lines in the buffer. */ buf = nl; /* Restore bufp to include all the remaining text. */ fs->p = nl + len; /* Reset the counter of what has been output this line. If wmargin is 0, we want to avoid the lmargin getting added, so we set point_col to a magic value of -1 in that case. */ fs->point_col = fs->wmargin ? fs->wmargin : -1; } } /* Remember that we've scanned as far as the end of the buffer. */ fs->point_offs = fs->p - fs->buf; } /* Ensure that FS has space for AMOUNT more bytes in its buffer, either by growing the buffer, or by flushing it. True is returned iff we succeed. */ int __argp_fmtstream_ensure (struct argp_fmtstream *fs, size_t amount) { if ((size_t) (fs->end - fs->p) < amount) { ssize_t wrote; /* Flush FS's buffer. */ __argp_fmtstream_update (fs); wrote = FWRITE_UNLOCKED (fs->buf, 1, fs->p - fs->buf, fs->stream); if (wrote == fs->p - fs->buf) { fs->p = fs->buf; fs->point_offs = 0; } else { fs->p -= wrote; fs->point_offs -= wrote; memmove (fs->buf, fs->buf + wrote, fs->p - fs->buf); return 0; } if ((size_t) (fs->end - fs->buf) < amount) /* Gotta grow the buffer. */ { size_t new_size = fs->end - fs->buf + amount; char *new_buf = realloc (fs->buf, new_size); if (! new_buf) { __set_errno (ENOMEM); return 0; } fs->buf = new_buf; fs->end = new_buf + new_size; fs->p = fs->buf; } } return 1; } ssize_t __argp_fmtstream_printf (struct argp_fmtstream *fs, const char *fmt, ...) { size_t out; size_t avail; size_t size_guess = PRINTF_SIZE_GUESS; /* How much space to reserve. */ do { va_list args; if (! __argp_fmtstream_ensure (fs, size_guess)) return -1; va_start (args, fmt); avail = fs->end - fs->p; out = __vsnprintf (fs->p, avail, fmt, args); va_end (args); if (out >= avail) size_guess = out + 1; } while (out >= avail); fs->p += out; return out; } #ifdef weak_alias weak_alias (__argp_fmtstream_printf, argp_fmtstream_printf) #endif /* Duplicate the inline definitions in argp-fmtstream.h, for compilers * that don't do inlining. */ size_t __argp_fmtstream_write (argp_fmtstream_t __fs, __const char *__str, size_t __len) { if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len)) { memcpy (__fs->p, __str, __len); __fs->p += __len; return __len; } else return 0; } int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str) { size_t __len = strlen (__str); if (__len) { size_t __wrote = __argp_fmtstream_write (__fs, __str, __len); return __wrote == __len ? 0 : -1; } else return 0; } int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch) { if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1)) return *__fs->p++ = __ch; else return EOF; } /* Set __FS's left margin to __LMARGIN and return the old value. */ size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->lmargin; __fs->lmargin = __lmargin; return __old; } /* Set __FS's right margin to __RMARGIN and return the old value. */ size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->rmargin; __fs->rmargin = __rmargin; return __old; } /* Set FS's wrap margin to __WMARGIN and return the old value. */ size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->wmargin; __fs->wmargin = __wmargin; return __old; } /* Return the column number of the current output point in __FS. */ size_t __argp_fmtstream_point (argp_fmtstream_t __fs) { if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); return __fs->point_col >= 0 ? __fs->point_col : 0; } #endif /* !ARGP_FMTSTREAM_USE_LINEWRAP */ freeipmi-1.6.4/common/portability/freeipmi-argp-fmtstream.h0000644002055400205540000002701413527331635024020 0ustar00achuachu00000000000000/* Word-wrapping and line-truncating streams. Copyright (C) 1997, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* This package emulates glibc `line_wrap_stream' semantics for systems that don't have that. If the system does have it, it is just a wrapper for that. This header file is only used internally while compiling argp, and shouldn't be installed. */ #ifndef _FREEIPMI_ARGP_FMTSTREAM_H #define _FREEIPMI_ARGP_FMTSTREAM_H #include #include #include #if _LIBC || (defined (HAVE_FLOCKFILE) && defined(HAVE_PUTC_UNLOCKED) \ && defined (HAVE_FPUTS_UNLOCKED) && defined (HAVE_FWRITE_UNLOCKED) ) /* Use locking funxtions */ # define FLOCKFILE(f) flockfile(f) # define FUNLOCKFILE(f) funlockfile(f) # define PUTC_UNLOCKED(c, f) putc_unlocked((c), (f)) # define FPUTS_UNLOCKED(s, f) fputs_unlocked((s), (f)) # define FWRITE_UNLOCKED(b, s, n, f) fwrite_unlocked((b), (s), (n), (f)) #else /* Disable stdio locking */ # define FLOCKFILE(f) # define FUNLOCKFILE(f) # define PUTC_UNLOCKED(c, f) putc((c), (f)) # define FPUTS_UNLOCKED(s, f) fputs((s), (f)) # define FWRITE_UNLOCKED(b, s, n, f) fwrite((b), (s), (n), (f)) #endif /* No thread safe i/o */ #if (_LIBC - 0 && !defined (USE_IN_LIBIO)) \ || (defined (__GNU_LIBRARY__) && defined (HAVE_LINEWRAP_H)) /* line_wrap_stream is available, so use that. */ #define ARGP_FMTSTREAM_USE_LINEWRAP #endif #ifdef ARGP_FMTSTREAM_USE_LINEWRAP /* Just be a simple wrapper for line_wrap_stream; the semantics are *slightly* different, as line_wrap_stream doesn't actually make a new object, it just modifies the given stream (reversibly) to do line-wrapping. Since we control who uses this code, it doesn't matter. */ #include typedef FILE *argp_fmtstream_t; #define argp_make_fmtstream line_wrap_stream #define __argp_make_fmtstream line_wrap_stream #define argp_fmtstream_free line_unwrap_stream #define __argp_fmtstream_free line_unwrap_stream #define __argp_fmtstream_putc(fs,ch) putc(ch,fs) #define argp_fmtstream_putc(fs,ch) putc(ch,fs) #define __argp_fmtstream_puts(fs,str) fputs(str,fs) #define argp_fmtstream_puts(fs,str) fputs(str,fs) #define __argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs) #define argp_fmtstream_write(fs,str,len) fwrite(str,1,len,fs) #define __argp_fmtstream_printf fprintf #define argp_fmtstream_printf fprintf #define __argp_fmtstream_lmargin line_wrap_lmargin #define argp_fmtstream_lmargin line_wrap_lmargin #define __argp_fmtstream_set_lmargin line_wrap_set_lmargin #define argp_fmtstream_set_lmargin line_wrap_set_lmargin #define __argp_fmtstream_rmargin line_wrap_rmargin #define argp_fmtstream_rmargin line_wrap_rmargin #define __argp_fmtstream_set_rmargin line_wrap_set_rmargin #define argp_fmtstream_set_rmargin line_wrap_set_rmargin #define __argp_fmtstream_wmargin line_wrap_wmargin #define argp_fmtstream_wmargin line_wrap_wmargin #define __argp_fmtstream_set_wmargin line_wrap_set_wmargin #define argp_fmtstream_set_wmargin line_wrap_set_wmargin #define __argp_fmtstream_point line_wrap_point #define argp_fmtstream_point line_wrap_point #else /* !ARGP_FMTSTREAM_USE_LINEWRAP */ /* Guess we have to define our own version. */ #ifndef __const #define __const const #endif struct argp_fmtstream { FILE *stream; /* The stream we're outputting to. */ size_t lmargin, rmargin; /* Left and right margins. */ ssize_t wmargin; /* Margin to wrap to, or -1 to truncate. */ /* Point in buffer to which we've processed for wrapping, but not output. */ size_t point_offs; /* Output column at POINT_OFFS, or -1 meaning 0 but don't add lmargin. */ ssize_t point_col; char *buf; /* Output buffer. */ char *p; /* Current end of text in BUF. */ char *end; /* Absolute end of BUF. */ }; typedef struct argp_fmtstream *argp_fmtstream_t; /* Return an argp_fmtstream that outputs to STREAM, and which prefixes lines written on it with LMARGIN spaces and limits them to RMARGIN columns total. If WMARGIN >= 0, words that extend past RMARGIN are wrapped by replacing the whitespace before them with a newline and WMARGIN spaces. Otherwise, chars beyond RMARGIN are simply dropped until a newline. Returns NULL if there was an error. */ extern argp_fmtstream_t __argp_make_fmtstream (FILE *__stream, size_t __lmargin, size_t __rmargin, ssize_t __wmargin); extern argp_fmtstream_t argp_make_fmtstream (FILE *__stream, size_t __lmargin, size_t __rmargin, ssize_t __wmargin); /* Flush __FS to its stream, and free it (but don't close the stream). */ extern void __argp_fmtstream_free (argp_fmtstream_t __fs); extern void argp_fmtstream_free (argp_fmtstream_t __fs); extern ssize_t __argp_fmtstream_printf (argp_fmtstream_t __fs, __const char *__fmt, ...) PRINTF_STYLE(2,3); extern ssize_t argp_fmtstream_printf (argp_fmtstream_t __fs, __const char *__fmt, ...) PRINTF_STYLE(2,3); extern int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); extern int argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch); extern int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str); extern int argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str); extern size_t __argp_fmtstream_write (argp_fmtstream_t __fs, __const char *__str, size_t __len); extern size_t argp_fmtstream_write (argp_fmtstream_t __fs, __const char *__str, size_t __len); /* Access macros for various bits of state. */ #define argp_fmtstream_lmargin(__fs) ((__fs)->lmargin) #define argp_fmtstream_rmargin(__fs) ((__fs)->rmargin) #define argp_fmtstream_wmargin(__fs) ((__fs)->wmargin) #define __argp_fmtstream_lmargin argp_fmtstream_lmargin #define __argp_fmtstream_rmargin argp_fmtstream_rmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin /* Set __FS's left margin to LMARGIN and return the old value. */ extern size_t argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin); extern size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin); /* Set __FS's right margin to __RMARGIN and return the old value. */ extern size_t argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin); extern size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin); /* Set __FS's wrap margin to __WMARGIN and return the old value. */ extern size_t argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin); extern size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin); /* Return the column number of the current output point in __FS. */ extern size_t argp_fmtstream_point (argp_fmtstream_t __fs); extern size_t __argp_fmtstream_point (argp_fmtstream_t __fs); /* Internal routines. */ extern void _argp_fmtstream_update (argp_fmtstream_t __fs); extern void __argp_fmtstream_update (argp_fmtstream_t __fs); extern int _argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); extern int __argp_fmtstream_ensure (argp_fmtstream_t __fs, size_t __amount); #ifdef __OPTIMIZE__ /* Inline versions of above routines. */ #if !_LIBC #define __argp_fmtstream_putc argp_fmtstream_putc #define __argp_fmtstream_puts argp_fmtstream_puts #define __argp_fmtstream_write argp_fmtstream_write #define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin #define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin #define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin #define __argp_fmtstream_point argp_fmtstream_point #define __argp_fmtstream_update _argp_fmtstream_update #define __argp_fmtstream_ensure _argp_fmtstream_ensure #endif #ifndef ARGP_FS_EI #define ARGP_FS_EI extern inline #endif ARGP_FS_EI size_t __argp_fmtstream_write (argp_fmtstream_t __fs, __const char *__str, size_t __len) { if (__fs->p + __len <= __fs->end || __argp_fmtstream_ensure (__fs, __len)) { memcpy (__fs->p, __str, __len); __fs->p += __len; return __len; } else return 0; } ARGP_FS_EI int __argp_fmtstream_puts (argp_fmtstream_t __fs, __const char *__str) { size_t __len = strlen (__str); if (__len) { size_t __wrote = __argp_fmtstream_write (__fs, __str, __len); return __wrote == __len ? 0 : -1; } else return 0; } ARGP_FS_EI int __argp_fmtstream_putc (argp_fmtstream_t __fs, int __ch) { if (__fs->p < __fs->end || __argp_fmtstream_ensure (__fs, 1)) return *__fs->p++ = __ch; else return EOF; } /* Set __FS's left margin to __LMARGIN and return the old value. */ ARGP_FS_EI size_t __argp_fmtstream_set_lmargin (argp_fmtstream_t __fs, size_t __lmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->lmargin; __fs->lmargin = __lmargin; return __old; } /* Set __FS's right margin to __RMARGIN and return the old value. */ ARGP_FS_EI size_t __argp_fmtstream_set_rmargin (argp_fmtstream_t __fs, size_t __rmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->rmargin; __fs->rmargin = __rmargin; return __old; } /* Set FS's wrap margin to __WMARGIN and return the old value. */ ARGP_FS_EI size_t __argp_fmtstream_set_wmargin (argp_fmtstream_t __fs, size_t __wmargin) { size_t __old; if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); __old = __fs->wmargin; __fs->wmargin = __wmargin; return __old; } /* Return the column number of the current output point in __FS. */ ARGP_FS_EI size_t __argp_fmtstream_point (argp_fmtstream_t __fs) { if ((size_t) (__fs->p - __fs->buf) > __fs->point_offs) __argp_fmtstream_update (__fs); return __fs->point_col >= 0 ? __fs->point_col : 0; } #if !_LIBC #undef __argp_fmtstream_putc #undef __argp_fmtstream_puts #undef __argp_fmtstream_write #undef __argp_fmtstream_set_lmargin #undef __argp_fmtstream_set_rmargin #undef __argp_fmtstream_set_wmargin #undef __argp_fmtstream_point #undef __argp_fmtstream_update #undef __argp_fmtstream_ensure #endif #endif /* __OPTIMIZE__ */ #endif /* ARGP_FMTSTREAM_USE_LINEWRAP */ #endif /* freeipmi-argp-fmtstream.h */ freeipmi-1.6.4/common/portability/freeipmi-argp-help.c0000644002055400205540000016517113527331635022750 0ustar00achuachu00000000000000/* Hierarchial argument parsing help output Copyright (C) 1995,96,97,98,99,2000, 2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H #include #endif /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif #include #include #include #include #include #include /* Does any system still need malloc.h? If so, we'd need a configure test. */ #ifndef _ /* This is for other GNU distributions with internationalized messages. */ # if defined HAVE_LIBINTL_H || defined _LIBC # include # ifdef _LIBC # undef dgettext # define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES) # endif # else # define dgettext(domain, msgid) (msgid) # endif #endif #include "freeipmi-argp.h" #include "freeipmi-argp-fmtstream.h" #include "freeipmi-argp-namefrob.h" #ifndef _LIBC # ifndef __strchrnul # define __strchrnul strchrnul # endif # ifndef __mempcpy # define __mempcpy mempcpy # endif /* We need to use a different name, as __strndup is likely a macro. */ # define STRNDUP strndup # if HAVE_STRERROR # define STRERROR strerror # else # define STRERROR(x) (sys_errlist[x]) # endif #else /* _LIBC */ # define FLOCKFILE __flockfile # define FUNLOCKFILE __funlockfile # define STRNDUP __strndup # define STRERROR strerror #endif #if !_LIBC #include "freeipmi-portability.h" #endif /* !_LIBC */ /* User-selectable (using an environment variable) formatting parameters. These may be specified in an environment variable called `ARGP_HELP_FMT', with a contents like: VAR1=VAL1,VAR2=VAL2,BOOLVAR2,no-BOOLVAR2 Where VALn must be a positive integer. The list of variables is in the UPARAM_NAMES vector, below. */ /* Default parameters. */ #define DUP_ARGS 0 /* True if option argument can be duplicated. */ #define DUP_ARGS_NOTE 1 /* True to print a note about duplicate args. */ #define SHORT_OPT_COL 2 /* column in which short options start */ #define LONG_OPT_COL 6 /* column in which long options start */ #define DOC_OPT_COL 2 /* column in which doc options start */ #define OPT_DOC_COL 29 /* column in which option text starts */ #define HEADER_COL 1 /* column in which group headers are printed */ #define USAGE_INDENT 12 /* indentation of wrapped usage lines */ #define RMARGIN 79 /* right margin used for wrapping */ /* User-selectable (using an environment variable) formatting parameters. They must all be of type `int' for the parsing code to work. */ struct uparams { /* If true, arguments for an option are shown with both short and long options, even when a given option has both, e.g. `-x ARG, --longx=ARG'. If false, then if an option has both, the argument is only shown with the long one, e.g., `-x, --longx=ARG', and a message indicating that this really means both is printed below the options. */ int dup_args; /* This is true if when DUP_ARGS is false, and some duplicate arguments have been suppressed, an explanatory message should be printed. */ int dup_args_note; /* Various output columns. */ int short_opt_col; int long_opt_col; int doc_opt_col; int opt_doc_col; int header_col; int usage_indent; int rmargin; int valid; /* True when the values in here are valid. */ }; /* This is a global variable, as user options are only ever read once. */ static struct uparams uparams = { DUP_ARGS, DUP_ARGS_NOTE, SHORT_OPT_COL, LONG_OPT_COL, DOC_OPT_COL, OPT_DOC_COL, HEADER_COL, USAGE_INDENT, RMARGIN, 0 }; /* A particular uparam, and what the user name is. */ struct uparam_name { const char *name; /* User name. */ int is_bool; /* Whether it's `boolean'. */ size_t uparams_offs; /* Location of the (int) field in UPARAMS. */ }; /* The name-field mappings we know about. */ static const struct uparam_name uparam_names[] = { { "dup-args", 1, offsetof (struct uparams, dup_args) }, { "dup-args-note", 1, offsetof (struct uparams, dup_args_note) }, { "short-opt-col", 0, offsetof (struct uparams, short_opt_col) }, { "long-opt-col", 0, offsetof (struct uparams, long_opt_col) }, { "doc-opt-col", 0, offsetof (struct uparams, doc_opt_col) }, { "opt-doc-col", 0, offsetof (struct uparams, opt_doc_col) }, { "header-col", 0, offsetof (struct uparams, header_col) }, { "usage-indent", 0, offsetof (struct uparams, usage_indent) }, { "rmargin", 0, offsetof (struct uparams, rmargin) }, { 0, 0, 0 } }; /* Read user options from the environment, and fill in UPARAMS appropiately. */ static void fill_in_uparams (const struct argp_state *state) { /* FIXME: Can we get away without an explicit cast? */ const unsigned char *var = (unsigned char *) getenv ("ARGP_HELP_FMT"); #define SKIPWS(p) do { while (isspace (*p)) p++; } while (0); if (var) /* Parse var. */ while (*var) { SKIPWS (var); if (isalpha (*var)) { size_t var_len; const struct uparam_name *un; int unspec = 0, val = 0; const unsigned char *arg = var; while (isalnum (*arg) || *arg == '-' || *arg == '_') arg++; var_len = arg - var; SKIPWS (arg); if (*arg == '\0' || *arg == ',') unspec = 1; else if (*arg == '=') { arg++; SKIPWS (arg); } if (unspec) { if (var[0] == 'n' && var[1] == 'o' && var[2] == '-') { val = 0; var += 3; var_len -= 3; } else val = 1; } else if (isdigit (*arg)) { val = atoi (arg); while (isdigit (*arg)) arg++; SKIPWS (arg); } for (un = uparam_names; un->name; un++) if (strlen (un->name) == var_len && strncmp (var, un->name, var_len) == 0) { if (unspec && !un->is_bool) __argp_failure (state, 0, 0, dgettext (state->root_argp->argp_domain, "\ %.*s: ARGP_HELP_FMT parameter requires a value"), (int) var_len, var); else *(int *)((char *)&uparams + un->uparams_offs) = val; break; } if (! un->name) __argp_failure (state, 0, 0, dgettext (state->root_argp->argp_domain, "\ %.*s: Unknown ARGP_HELP_FMT parameter"), (int) var_len, var); var = arg; if (*var == ',') var++; } else if (*var) { __argp_failure (state, 0, 0, dgettext (state->root_argp->argp_domain, "Garbage in ARGP_HELP_FMT: %s"), var); break; } } } /* Returns true if OPT hasn't been marked invisible. Visibility only affects whether OPT is displayed or used in sorting, not option shadowing. */ #define ovisible(opt) (! ((opt)->flags & OPTION_HIDDEN)) /* Returns true if OPT is an alias for an earlier option. */ #define oalias(opt) ((opt)->flags & OPTION_ALIAS) /* Returns true if OPT is an documentation-only entry. */ #define odoc(opt) ((opt)->flags & OPTION_DOC) /* Returns true if OPT is the end-of-list marker for a list of options. */ #define oend(opt) __option_is_end (opt) /* Returns true if OPT has a short option. */ #define oshort(opt) __option_is_short (opt) /* The help format for a particular option is like: -xARG, -yARG, --long1=ARG, --long2=ARG Documentation... Where ARG will be omitted if there's no argument, for this option, or will be surrounded by "[" and "]" appropiately if the argument is optional. The documentation string is word-wrapped appropiately, and if the list of options is long enough, it will be started on a separate line. If there are no short options for a given option, the first long option is indented slighly in a way that's supposed to make most long options appear to be in a separate column. For example, the following output (from ps): -p PID, --pid=PID List the process PID --pgrp=PGRP List processes in the process group PGRP -P, -x, --no-parent Include processes without parents -Q, --all-fields Don't elide unusable fields (normally if there's some reason ps can't print a field for any process, it's removed from the output entirely) -r, --reverse, --gratuitously-long-reverse-option Reverse the order of any sort --session[=SID] Add the processes from the session SID (which defaults to the sid of the current process) Here are some more options: -f ZOT, --foonly=ZOT Glork a foonly -z, --zaza Snit a zar -?, --help Give this help list --usage Give a short usage message -V, --version Print program version The struct argp_option array for the above could look like: { {"pid", 'p', "PID", 0, "List the process PID"}, {"pgrp", OPT_PGRP, "PGRP", 0, "List processes in the process group PGRP"}, {"no-parent", 'P', 0, 0, "Include processes without parents"}, {0, 'x', 0, OPTION_ALIAS}, {"all-fields",'Q', 0, 0, "Don't elide unusable fields (normally" " if there's some reason ps can't" " print a field for any process, it's" " removed from the output entirely)" }, {"reverse", 'r', 0, 0, "Reverse the order of any sort"}, {"gratuitously-long-reverse-option", 0, 0, OPTION_ALIAS}, {"session", OPT_SESS, "SID", OPTION_ARG_OPTIONAL, "Add the processes from the session" " SID (which defaults to the sid of" " the current process)" }, {0,0,0,0, "Here are some more options:"}, {"foonly", 'f', "ZOT", 0, "Glork a foonly"}, {"zaza", 'z', 0, 0, "Snit a zar"}, {0} } Note that the last three options are automatically supplied by argp_parse, unless you tell it not to with ARGP_NO_HELP. */ /* Returns true if CH occurs between BEG and END. */ static int find_char (char ch, char *beg, char *end) { while (beg < end) if (*beg == ch) return 1; else beg++; return 0; } struct hol_cluster; /* fwd decl */ struct hol_entry { /* First option. */ const struct argp_option *opt; /* Number of options (including aliases). */ unsigned num; /* A pointers into the HOL's short_options field, to the first short option letter for this entry. The order of the characters following this point corresponds to the order of options pointed to by OPT, and there are at most NUM. A short option recorded in a option following OPT is only valid if it occurs in the right place in SHORT_OPTIONS (otherwise it's probably been shadowed by some other entry). */ char *short_options; /* Entries are sorted by their group first, in the order: 1, 2, ..., n, 0, -m, ..., -2, -1 and then alphabetically within each group. The default is 0. */ int group; /* The cluster of options this entry belongs to, or 0 if none. */ struct hol_cluster *cluster; /* The argp from which this option came. */ const struct argp *argp; }; /* A cluster of entries to reflect the argp tree structure. */ struct hol_cluster { /* A descriptive header printed before options in this cluster. */ const char *header; /* Used to order clusters within the same group with the same parent, according to the order in which they occurred in the parent argp's child list. */ int index; /* How to sort this cluster with respect to options and other clusters at the same depth (clusters always follow options in the same group). */ int group; /* The cluster to which this cluster belongs, or 0 if it's at the base level. */ struct hol_cluster *parent; /* The argp from which this cluster is (eventually) derived. */ const struct argp *argp; /* The distance this cluster is from the root. */ int depth; /* Clusters in a given hol are kept in a linked list, to make freeing them possible. */ struct hol_cluster *next; }; /* A list of options for help. */ struct hol { /* An array of hol_entry's. */ struct hol_entry *entries; /* The number of entries in this hol. If this field is zero, the others are undefined. */ unsigned num_entries; /* A string containing all short options in this HOL. Each entry contains pointers into this string, so the order can't be messed with blindly. */ char *short_options; /* Clusters of entries in this hol. */ struct hol_cluster *clusters; }; /* Create a struct hol from the options in ARGP. CLUSTER is the hol_cluster in which these entries occur, or 0, if at the root. */ static struct hol * make_hol (const struct argp *argp, struct hol_cluster *cluster) { char *so; const struct argp_option *o; const struct argp_option *opts = argp->options; struct hol_entry *entry; unsigned num_short_options = 0; struct hol *hol = malloc (sizeof (struct hol)); assert (hol); hol->num_entries = 0; hol->clusters = 0; if (opts) { int cur_group = 0; /* The first option must not be an alias. */ assert (! oalias (opts)); /* Calculate the space needed. */ for (o = opts; ! oend (o); o++) { if (! oalias (o)) hol->num_entries++; if (oshort (o)) num_short_options++; /* This is an upper bound. */ } hol->entries = malloc (sizeof (struct hol_entry) * hol->num_entries); hol->short_options = malloc (num_short_options + 1); assert (hol->entries && hol->short_options); /* Fill in the entries. */ so = hol->short_options; for (o = opts, entry = hol->entries; ! oend (o); entry++) { entry->opt = o; entry->num = 0; entry->short_options = so; entry->group = cur_group = o->group ? o->group : ((!o->name && !o->key) ? cur_group + 1 : cur_group); entry->cluster = cluster; entry->argp = argp; do { entry->num++; if (oshort (o) && ! find_char (o->key, hol->short_options, so)) /* O has a valid short option which hasn't already been used.*/ *so++ = o->key; o++; } while (! oend (o) && oalias (o)); } *so = '\0'; /* null terminated so we can find the length */ } return hol; } /* Add a new cluster to HOL, with the given GROUP and HEADER (taken from the associated argp child list entry), INDEX, and PARENT, and return a pointer to it. ARGP is the argp that this cluster results from. */ static struct hol_cluster * hol_add_cluster (struct hol *hol, int group, const char *header, int index, struct hol_cluster *parent, const struct argp *argp) { struct hol_cluster *cl = malloc (sizeof (struct hol_cluster)); if (cl) { cl->group = group; cl->header = header; cl->index = index; cl->parent = parent; cl->argp = argp; cl->depth = parent ? parent->depth + 1 : 0; cl->next = hol->clusters; hol->clusters = cl; } return cl; } /* Free HOL and any resources it uses. */ static void hol_free (struct hol *hol) { struct hol_cluster *cl = hol->clusters; while (cl) { struct hol_cluster *next = cl->next; free (cl); cl = next; } if (hol->num_entries > 0) { free (hol->entries); free (hol->short_options); } free (hol); } static inline int hol_entry_short_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, const char *domain, void *cookie), const char *domain, void *cookie) { unsigned nopts; int val = 0; const struct argp_option *opt, *real = entry->opt; char *so = entry->short_options; for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--) if (oshort (opt) && *so == opt->key) { if (!oalias (opt)) real = opt; if (ovisible (opt)) val = (*func)(opt, real, domain, cookie); so++; } return val; } static inline int hol_entry_long_iterate (const struct hol_entry *entry, int (*func)(const struct argp_option *opt, const struct argp_option *real, const char *domain, void *cookie), const char *domain, void *cookie) { unsigned nopts; int val = 0; const struct argp_option *opt, *real = entry->opt; for (opt = real, nopts = entry->num; nopts > 0 && !val; opt++, nopts--) if (opt->name) { if (!oalias (opt)) real = opt; if (ovisible (opt)) val = (*func)(opt, real, domain, cookie); } return val; } /* Iterator that returns true for the first short option. */ static inline int until_short (const struct argp_option *opt, const struct argp_option *real UNUSED, const char *domain UNUSED, void *cookie UNUSED) { return oshort (opt) ? opt->key : 0; } /* Returns the first valid short option in ENTRY, or 0 if there is none. */ static char hol_entry_first_short (const struct hol_entry *entry) { return hol_entry_short_iterate (entry, until_short, entry->argp->argp_domain, 0); } /* Returns the first valid long option in ENTRY, or 0 if there is none. */ static const char * hol_entry_first_long (const struct hol_entry *entry) { const struct argp_option *opt; unsigned num; for (opt = entry->opt, num = entry->num; num > 0; opt++, num--) if (opt->name && ovisible (opt)) return opt->name; return 0; } /* Returns the entry in HOL with the long option name NAME, or 0 if there is none. */ static struct hol_entry * hol_find_entry (struct hol *hol, const char *name) { struct hol_entry *entry = hol->entries; unsigned num_entries = hol->num_entries; while (num_entries-- > 0) { const struct argp_option *opt = entry->opt; unsigned num_opts = entry->num; while (num_opts-- > 0) if (opt->name && ovisible (opt) && strcmp (opt->name, name) == 0) return entry; else opt++; entry++; } return 0; } /* If an entry with the long option NAME occurs in HOL, set it's special sort position to GROUP. */ static void hol_set_group (struct hol *hol, const char *name, int group) { struct hol_entry *entry = hol_find_entry (hol, name); if (entry) entry->group = group; } /* Order by group: 0, 1, 2, ..., n, -m, ..., -2, -1. EQ is what to return if GROUP1 and GROUP2 are the same. */ static int group_cmp (int group1, int group2, int eq) { if (group1 == group2) return eq; else if ((group1 < 0 && group2 < 0) || (group1 >= 0 && group2 >= 0)) return group1 - group2; else return group2 - group1; } /* Compare clusters CL1 & CL2 by the order that they should appear in output. */ static int hol_cluster_cmp (const struct hol_cluster *cl1, const struct hol_cluster *cl2) { /* If one cluster is deeper than the other, use its ancestor at the same level, so that finding the common ancestor is straightforward. */ while (cl1->depth < cl2->depth) cl1 = cl1->parent; while (cl2->depth < cl1->depth) cl2 = cl2->parent; /* Now reduce both clusters to their ancestors at the point where both have a common parent; these can be directly compared. */ while (cl1->parent != cl2->parent) cl1 = cl1->parent, cl2 = cl2->parent; return group_cmp (cl1->group, cl2->group, cl2->index - cl1->index); } /* Return the ancestor of CL that's just below the root (i.e., has a parent of 0). */ static struct hol_cluster * hol_cluster_base (struct hol_cluster *cl) { while (cl->parent) cl = cl->parent; return cl; } /* Return true if CL1 is a child of CL2. */ static int hol_cluster_is_child (const struct hol_cluster *cl1, const struct hol_cluster *cl2) { while (cl1 && cl1 != cl2) cl1 = cl1->parent; return cl1 == cl2; } /* Given the name of a OPTION_DOC option, modifies NAME to start at the tail that should be used for comparisons, and returns true iff it should be treated as a non-option. */ /* FIXME: Can we use unsigned char * for the argument? */ static int canon_doc_option (const char **name) { int non_opt; /* Skip initial whitespace. */ while (isspace ( (unsigned char) **name)) (*name)++; /* Decide whether this looks like an option (leading `-') or not. */ non_opt = (**name != '-'); /* Skip until part of name used for sorting. */ while (**name && !isalnum ( (unsigned char) **name)) (*name)++; return non_opt; } /* Order ENTRY1 & ENTRY2 by the order which they should appear in a help listing. */ static int hol_entry_cmp (const struct hol_entry *entry1, const struct hol_entry *entry2) { /* The group numbers by which the entries should be ordered; if either is in a cluster, then this is just the group within the cluster. */ int group1 = entry1->group, group2 = entry2->group; if (entry1->cluster != entry2->cluster) { /* The entries are not within the same cluster, so we can't compare them directly, we have to use the appropiate clustering level too. */ if (! entry1->cluster) /* ENTRY1 is at the `base level', not in a cluster, so we have to compare it's group number with that of the base cluster in which ENTRY2 resides. Note that if they're in the same group, the clustered option always comes laster. */ return group_cmp (group1, hol_cluster_base (entry2->cluster)->group, -1); else if (! entry2->cluster) /* Likewise, but ENTRY2's not in a cluster. */ return group_cmp (hol_cluster_base (entry1->cluster)->group, group2, 1); else /* Both entries are in clusters, we can just compare the clusters. */ return hol_cluster_cmp (entry1->cluster, entry2->cluster); } else if (group1 == group2) /* The entries are both in the same cluster and group, so compare them alphabetically. */ { int short1 = hol_entry_first_short (entry1); int short2 = hol_entry_first_short (entry2); int doc1 = odoc (entry1->opt); int doc2 = odoc (entry2->opt); /* FIXME: Can we use unsigned char * instead? */ const char *long1 = hol_entry_first_long (entry1); const char *long2 = hol_entry_first_long (entry2); if (doc1) doc1 = canon_doc_option (&long1); if (doc2) doc2 = canon_doc_option (&long2); if (doc1 != doc2) /* `documentation' options always follow normal options (or documentation options that *look* like normal options). */ return doc1 - doc2; else if (!short1 && !short2 && long1 && long2) /* Only long options. */ return __strcasecmp (long1, long2); else /* Compare short/short, long/short, short/long, using the first character of long options. Entries without *any* valid options (such as options with OPTION_HIDDEN set) will be put first, but as they're not displayed, it doesn't matter where they are. */ { unsigned char first1 = short1 ? short1 : long1 ? *long1 : 0; unsigned char first2 = short2 ? short2 : long2 ? *long2 : 0; #ifdef _tolower int lower_cmp = _tolower (first1) - _tolower (first2); #else int lower_cmp = tolower (first1) - tolower (first2); #endif /* Compare ignoring case, except when the options are both the same letter, in which case lower-case always comes first. */ /* NOTE: The subtraction below does the right thing even with eight-bit chars: first1 and first2 are converted to int *before* the subtraction. */ return lower_cmp ? lower_cmp : first2 - first1; } } else /* Within the same cluster, but not the same group, so just compare groups. */ return group_cmp (group1, group2, 0); } /* Version of hol_entry_cmp with correct signature for qsort. */ static int hol_entry_qcmp (const void *entry1_v, const void *entry2_v) { return hol_entry_cmp (entry1_v, entry2_v); } /* Sort HOL by group and alphabetically by option name (with short options taking precedence over long). Since the sorting is for display purposes only, the shadowing of options isn't effected. */ static void hol_sort (struct hol *hol) { if (hol->num_entries > 0) qsort (hol->entries, hol->num_entries, sizeof (struct hol_entry), hol_entry_qcmp); } /* Append MORE to HOL, destroying MORE in the process. Options in HOL shadow any in MORE with the same name. */ static void hol_append (struct hol *hol, struct hol *more) { struct hol_cluster **cl_end = &hol->clusters; /* Steal MORE's cluster list, and add it to the end of HOL's. */ while (*cl_end) cl_end = &(*cl_end)->next; *cl_end = more->clusters; more->clusters = 0; /* Merge entries. */ if (more->num_entries > 0) { if (hol->num_entries == 0) { hol->num_entries = more->num_entries; hol->entries = more->entries; hol->short_options = more->short_options; more->num_entries = 0; /* Mark MORE's fields as invalid. */ } else /* Append the entries in MORE to those in HOL, taking care to only add non-shadowed SHORT_OPTIONS values. */ { unsigned left; char *so, *more_so; struct hol_entry *e; unsigned num_entries = hol->num_entries + more->num_entries; struct hol_entry *entries = malloc (num_entries * sizeof (struct hol_entry)); unsigned hol_so_len = strlen (hol->short_options); char *short_options = malloc (hol_so_len + strlen (more->short_options) + 1); __mempcpy (__mempcpy (entries, hol->entries, hol->num_entries * sizeof (struct hol_entry)), more->entries, more->num_entries * sizeof (struct hol_entry)); __mempcpy (short_options, hol->short_options, hol_so_len); /* Fix up the short options pointers from HOL. */ for (e = entries, left = hol->num_entries; left > 0; e++, left--) e->short_options += (short_options - hol->short_options); /* Now add the short options from MORE, fixing up its entries too. */ so = short_options + hol_so_len; more_so = more->short_options; for (left = more->num_entries; left > 0; e++, left--) { int opts_left; const struct argp_option *opt; e->short_options = so; for (opts_left = e->num, opt = e->opt; opts_left; opt++, opts_left--) { int ch = *more_so; if (oshort (opt) && ch == opt->key) /* The next short option in MORE_SO, CH, is from OPT. */ { if (! find_char (ch, short_options, short_options + hol_so_len)) /* The short option CH isn't shadowed by HOL's options, so add it to the sum. */ *so++ = ch; more_so++; } } } *so = '\0'; free (hol->entries); free (hol->short_options); hol->entries = entries; hol->num_entries = num_entries; hol->short_options = short_options; } } hol_free (more); } /* Inserts enough spaces to make sure STREAM is at column COL. */ static void indent_to (argp_fmtstream_t stream, unsigned col) { int needed = col - __argp_fmtstream_point (stream); while (needed-- > 0) __argp_fmtstream_putc (stream, ' '); } /* Output to STREAM either a space, or a newline if there isn't room for at least ENSURE characters before the right margin. */ static void space (argp_fmtstream_t stream, size_t ensure) { if (__argp_fmtstream_point (stream) + ensure >= __argp_fmtstream_rmargin (stream)) __argp_fmtstream_putc (stream, '\n'); else __argp_fmtstream_putc (stream, ' '); } /* If the option REAL has an argument, we print it in using the printf format REQ_FMT or OPT_FMT depending on whether it's a required or optional argument. */ static void arg (const struct argp_option *real, const char *req_fmt, const char *opt_fmt, const char *domain UNUSED, argp_fmtstream_t stream) { if (real->arg) { if (real->flags & OPTION_ARG_OPTIONAL) __argp_fmtstream_printf (stream, opt_fmt, dgettext (domain, real->arg)); else __argp_fmtstream_printf (stream, req_fmt, dgettext (domain, real->arg)); } } /* Helper functions for hol_entry_help. */ /* State used during the execution of hol_help. */ struct hol_help_state { /* PREV_ENTRY should contain the previous entry printed, or 0. */ struct hol_entry *prev_entry; /* If an entry is in a different group from the previous one, and SEP_GROUPS is true, then a blank line will be printed before any output. */ int sep_groups; /* True if a duplicate option argument was suppressed (only ever set if UPARAMS.dup_args is false). */ int suppressed_dup_arg; }; /* Some state used while printing a help entry (used to communicate with helper functions). See the doc for hol_entry_help for more info, as most of the fields are copied from its arguments. */ struct pentry_state { const struct hol_entry *entry; argp_fmtstream_t stream; struct hol_help_state *hhstate; /* True if nothing's been printed so far. */ int first; /* If non-zero, the state that was used to print this help. */ const struct argp_state *state; }; /* If a user doc filter should be applied to DOC, do so. */ static const char * filter_doc (const char *doc, int key, const struct argp *argp, const struct argp_state *state) { if (argp->help_filter) /* We must apply a user filter to this output. */ { void *input = __argp_input (argp, state); return (*argp->help_filter) (key, doc, input); } else /* No filter. */ return doc; } /* Prints STR as a header line, with the margin lines set appropiately, and notes the fact that groups should be separated with a blank line. ARGP is the argp that should dictate any user doc filtering to take place. Note that the previous wrap margin isn't restored, but the left margin is reset to 0. */ static void print_header (const char *str, const struct argp *argp, struct pentry_state *pest) { const char *tstr = dgettext (argp->argp_domain, str); const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_HEADER, argp, pest->state); if (fstr) { if (*fstr) { if (pest->hhstate->prev_entry) /* Precede with a blank line. */ __argp_fmtstream_putc (pest->stream, '\n'); indent_to (pest->stream, uparams.header_col); __argp_fmtstream_set_lmargin (pest->stream, uparams.header_col); __argp_fmtstream_set_wmargin (pest->stream, uparams.header_col); __argp_fmtstream_puts (pest->stream, fstr); __argp_fmtstream_set_lmargin (pest->stream, 0); __argp_fmtstream_putc (pest->stream, '\n'); } pest->hhstate->sep_groups = 1; /* Separate subsequent groups. */ } if (fstr != tstr) free ((char *) fstr); } /* Inserts a comma if this isn't the first item on the line, and then makes sure we're at least to column COL. If this *is* the first item on a line, prints any pending whitespace/headers that should precede this line. Also clears FIRST. */ static void comma (unsigned col, struct pentry_state *pest) { if (pest->first) { const struct hol_entry *pe = pest->hhstate->prev_entry; const struct hol_cluster *cl = pest->entry->cluster; if (pest->hhstate->sep_groups && pe && pest->entry->group != pe->group) __argp_fmtstream_putc (pest->stream, '\n'); if (cl && cl->header && *cl->header && (!pe || (pe->cluster != cl && !hol_cluster_is_child (pe->cluster, cl)))) /* If we're changing clusters, then this must be the start of the ENTRY's cluster unless that is an ancestor of the previous one (in which case we had just popped into a sub-cluster for a bit). If so, then print the cluster's header line. */ { int old_wm = __argp_fmtstream_wmargin (pest->stream); print_header (cl->header, cl->argp, pest); __argp_fmtstream_set_wmargin (pest->stream, old_wm); } pest->first = 0; } else __argp_fmtstream_puts (pest->stream, ", "); indent_to (pest->stream, col); } /* Print help for ENTRY to STREAM. */ static void hol_entry_help (struct hol_entry *entry, const struct argp_state *state, argp_fmtstream_t stream, struct hol_help_state *hhstate) { unsigned num; const struct argp_option *real = entry->opt, *opt; char *so = entry->short_options; int have_long_opt = 0; /* We have any long options. */ /* Saved margins. */ int old_lm = __argp_fmtstream_set_lmargin (stream, 0); int old_wm = __argp_fmtstream_wmargin (stream); /* PEST is a state block holding some of our variables that we'd like to share with helper functions. */ /* Decent initializers are a GNU extension, so don't use it here. */ struct pentry_state pest; pest.entry = entry; pest.stream = stream; pest.hhstate = hhstate; pest.first = 1; pest.state = state; if (! odoc (real)) for (opt = real, num = entry->num; num > 0; opt++, num--) if (opt->name && ovisible (opt)) { have_long_opt = 1; break; } /* First emit short options. */ __argp_fmtstream_set_wmargin (stream, uparams.short_opt_col); /* For truly bizarre cases. */ for (opt = real, num = entry->num; num > 0; opt++, num--) if (oshort (opt) && opt->key == *so) /* OPT has a valid (non shadowed) short option. */ { if (ovisible (opt)) { comma (uparams.short_opt_col, &pest); __argp_fmtstream_putc (stream, '-'); __argp_fmtstream_putc (stream, *so); if (!have_long_opt || uparams.dup_args) arg (real, " %s", "[%s]", state->root_argp->argp_domain, stream); else if (real->arg) hhstate->suppressed_dup_arg = 1; } so++; } /* Now, long options. */ if (odoc (real)) /* A `documentation' option. */ { __argp_fmtstream_set_wmargin (stream, uparams.doc_opt_col); for (opt = real, num = entry->num; num > 0; opt++, num--) if (opt->name && ovisible (opt)) { comma (uparams.doc_opt_col, &pest); /* Calling gettext here isn't quite right, since sorting will have been done on the original; but documentation options should be pretty rare anyway... */ __argp_fmtstream_puts (stream, dgettext (state->root_argp->argp_domain, opt->name)); } } else /* A real long option. */ { int first_long_opt = 1; __argp_fmtstream_set_wmargin (stream, uparams.long_opt_col); for (opt = real, num = entry->num; num > 0; opt++, num--) if (opt->name && ovisible (opt)) { comma (uparams.long_opt_col, &pest); __argp_fmtstream_printf (stream, "--%s", opt->name); if (first_long_opt || uparams.dup_args) arg (real, "=%s", "[=%s]", state->root_argp->argp_domain, stream); else if (real->arg) hhstate->suppressed_dup_arg = 1; } } /* Next, documentation strings. */ __argp_fmtstream_set_lmargin (stream, 0); if (pest.first) { /* Didn't print any switches, what's up? */ if (!oshort (real) && !real->name) /* This is a group header, print it nicely. */ print_header (real->doc, entry->argp, &pest); else /* Just a totally shadowed option or null header; print nothing. */ goto cleanup; /* Just return, after cleaning up. */ } else { const char *tstr = real->doc ? dgettext (state->root_argp->argp_domain, real->doc) : 0; const char *fstr = filter_doc (tstr, real->key, entry->argp, state); if (fstr && *fstr) { unsigned int col = __argp_fmtstream_point (stream); __argp_fmtstream_set_lmargin (stream, uparams.opt_doc_col); __argp_fmtstream_set_wmargin (stream, uparams.opt_doc_col); if (col > (unsigned int) (uparams.opt_doc_col + 3)) __argp_fmtstream_putc (stream, '\n'); else if (col >= (unsigned int) uparams.opt_doc_col) __argp_fmtstream_puts (stream, " "); else indent_to (stream, uparams.opt_doc_col); __argp_fmtstream_puts (stream, fstr); } if (fstr && fstr != tstr) free ((char *) fstr); /* Reset the left margin. */ __argp_fmtstream_set_lmargin (stream, 0); __argp_fmtstream_putc (stream, '\n'); } hhstate->prev_entry = entry; cleanup: __argp_fmtstream_set_lmargin (stream, old_lm); __argp_fmtstream_set_wmargin (stream, old_wm); } /* Output a long help message about the options in HOL to STREAM. */ static void hol_help (struct hol *hol, const struct argp_state *state, argp_fmtstream_t stream) { unsigned num; struct hol_entry *entry; struct hol_help_state hhstate = { 0, 0, 0 }; for (entry = hol->entries, num = hol->num_entries; num > 0; entry++, num--) hol_entry_help (entry, state, stream, &hhstate); if (hhstate.suppressed_dup_arg && uparams.dup_args_note) { const char *tstr = dgettext (state->root_argp->argp_domain, "\ Mandatory or optional arguments to long options are also mandatory or \ optional for any corresponding short options."); const char *fstr = filter_doc (tstr, ARGP_KEY_HELP_DUP_ARGS_NOTE, state ? state->root_argp : 0, state); if (fstr && *fstr) { __argp_fmtstream_putc (stream, '\n'); __argp_fmtstream_puts (stream, fstr); __argp_fmtstream_putc (stream, '\n'); } if (fstr && fstr != tstr) free ((char *) fstr); } } /* Helper functions for hol_usage. */ /* If OPT is a short option without an arg, append its key to the string pointer pointer to by COOKIE, and advance the pointer. */ static int add_argless_short_opt (const struct argp_option *opt, const struct argp_option *real, const char *domain UNUSED, void *cookie) { char **snao_end = cookie; if (!(opt->arg || real->arg) && !((opt->flags | real->flags) & OPTION_NO_USAGE)) *(*snao_end)++ = opt->key; return 0; } /* If OPT is a short option with an arg, output a usage entry for it to the stream pointed at by COOKIE. */ static int usage_argful_short_opt (const struct argp_option *opt, const struct argp_option *real, const char *domain UNUSED, void *cookie) { argp_fmtstream_t stream = cookie; const char *arg = opt->arg; int flags = opt->flags | real->flags; if (! arg) arg = real->arg; if (arg && !(flags & OPTION_NO_USAGE)) { arg = dgettext (domain, arg); if (flags & OPTION_ARG_OPTIONAL) __argp_fmtstream_printf (stream, " [-%c[%s]]", opt->key, arg); else { /* Manually do line wrapping so that it (probably) won't get wrapped at the embedded space. */ space (stream, 6 + strlen (arg)); __argp_fmtstream_printf (stream, "[-%c %s]", opt->key, arg); } } return 0; } /* Output a usage entry for the long option opt to the stream pointed at by COOKIE. */ static int usage_long_opt (const struct argp_option *opt, const struct argp_option *real, const char *domain UNUSED, void *cookie) { argp_fmtstream_t stream = cookie; const char *arg = opt->arg; int flags = opt->flags | real->flags; if (! arg) arg = real->arg; if (! (flags & OPTION_NO_USAGE)) { if (arg) { arg = dgettext (domain, arg); if (flags & OPTION_ARG_OPTIONAL) __argp_fmtstream_printf (stream, " [--%s[=%s]]", opt->name, arg); else __argp_fmtstream_printf (stream, " [--%s=%s]", opt->name, arg); } else __argp_fmtstream_printf (stream, " [--%s]", opt->name); } return 0; } /* Print a short usage description for the arguments in HOL to STREAM. */ static void hol_usage (struct hol *hol, argp_fmtstream_t stream) { if (hol->num_entries > 0) { unsigned nentries; struct hol_entry *entry; char *short_no_arg_opts = alloca (strlen (hol->short_options) + 1); char *snao_end = short_no_arg_opts; /* First we put a list of short options without arguments. */ for (entry = hol->entries, nentries = hol->num_entries ; nentries > 0 ; entry++, nentries--) hol_entry_short_iterate (entry, add_argless_short_opt, entry->argp->argp_domain, &snao_end); if (snao_end > short_no_arg_opts) { *snao_end++ = 0; __argp_fmtstream_printf (stream, " [-%s]", short_no_arg_opts); } /* Now a list of short options *with* arguments. */ for (entry = hol->entries, nentries = hol->num_entries ; nentries > 0 ; entry++, nentries--) hol_entry_short_iterate (entry, usage_argful_short_opt, entry->argp->argp_domain, stream); /* Finally, a list of long options (whew!). */ for (entry = hol->entries, nentries = hol->num_entries ; nentries > 0 ; entry++, nentries--) hol_entry_long_iterate (entry, usage_long_opt, entry->argp->argp_domain, stream); } } /* Make a HOL containing all levels of options in ARGP. CLUSTER is the cluster in which ARGP's entries should be clustered, or 0. */ static struct hol * argp_hol (const struct argp *argp, struct hol_cluster *cluster) { const struct argp_child *child = argp->children; struct hol *hol = make_hol (argp, cluster); if (child) while (child->argp) { struct hol_cluster *child_cluster = ((child->group || child->header) /* Put CHILD->argp within its own cluster. */ ? hol_add_cluster (hol, child->group, child->header, child - argp->children, cluster, argp) /* Just merge it into the parent's cluster. */ : cluster); hol_append (hol, argp_hol (child->argp, child_cluster)) ; child++; } return hol; } /* Calculate how many different levels with alternative args strings exist in ARGP. */ static size_t argp_args_levels (const struct argp *argp) { size_t levels = 0; const struct argp_child *child = argp->children; if (argp->args_doc && strchr (argp->args_doc, '\n')) levels++; if (child) while (child->argp) levels += argp_args_levels ((child++)->argp); return levels; } /* Print all the non-option args documented in ARGP to STREAM. Any output is preceded by a space. LEVELS is a pointer to a byte vector the length returned by argp_args_levels; it should be initialized to zero, and updated by this routine for the next call if ADVANCE is true. True is returned as long as there are more patterns to output. */ static int argp_args_usage (const struct argp *argp, const struct argp_state *state, char **levels, int advance, argp_fmtstream_t stream) { char *our_level = *levels; int multiple = 0; const struct argp_child *child = argp->children; const char *tdoc = dgettext (argp->argp_domain, argp->args_doc), *nl = 0; const char *fdoc = filter_doc (tdoc, ARGP_KEY_HELP_ARGS_DOC, argp, state); if (fdoc) { const char *cp = fdoc; nl = __strchrnul (cp, '\n'); if (*nl != '\0') /* This is a `multi-level' args doc; advance to the correct position as determined by our state in LEVELS, and update LEVELS. */ { int i; multiple = 1; for (i = 0; i < *our_level; i++) cp = nl + 1, nl = __strchrnul (cp, '\n'); (*levels)++; } /* Manually do line wrapping so that it (probably) won't get wrapped at any embedded spaces. */ space (stream, 1 + nl - cp); __argp_fmtstream_write (stream, cp, nl - cp); } if (fdoc && fdoc != tdoc) free ((char *)fdoc); /* Free user's modified doc string. */ if (child) while (child->argp) advance = !argp_args_usage ((child++)->argp, state, levels, advance, stream); if (advance && multiple) { /* Need to increment our level. */ if (*nl) /* There's more we can do here. */ { (*our_level)++; advance = 0; /* Our parent shouldn't advance also. */ } else if (*our_level > 0) /* We had multiple levels, but used them up; reset to zero. */ *our_level = 0; } return !advance; } /* Print the documentation for ARGP to STREAM; if POST is false, then everything preceeding a `\v' character in the documentation strings (or the whole string, for those with none) is printed, otherwise, everything following the `\v' character (nothing for strings without). Each separate bit of documentation is separated a blank line, and if PRE_BLANK is true, then the first is as well. If FIRST_ONLY is true, only the first occurrence is output. Returns true if anything was output. */ static int argp_doc (const struct argp *argp, const struct argp_state *state, int post, int pre_blank, int first_only, argp_fmtstream_t stream) { const char *text; const char *inp_text; void *input = 0; int anything = 0; size_t inp_text_limit = 0; const char *doc = dgettext (argp->argp_domain, argp->doc); const struct argp_child *child = argp->children; if (doc) { char *vt = strchr (doc, '\v'); inp_text = post ? (vt ? vt + 1 : 0) : doc; inp_text_limit = (!post && vt) ? (vt - doc) : 0; } else inp_text = 0; if (argp->help_filter) /* We have to filter the doc strings. */ { if (inp_text_limit) /* Copy INP_TEXT so that it's nul-terminated. */ inp_text = STRNDUP (inp_text, inp_text_limit); input = __argp_input (argp, state); text = (*argp->help_filter) (post ? ARGP_KEY_HELP_POST_DOC : ARGP_KEY_HELP_PRE_DOC, inp_text, input); } else text = (const char *) inp_text; if (text) { if (pre_blank) __argp_fmtstream_putc (stream, '\n'); if (text == inp_text && inp_text_limit) __argp_fmtstream_write (stream, inp_text, inp_text_limit); else __argp_fmtstream_puts (stream, text); if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream)) __argp_fmtstream_putc (stream, '\n'); anything = 1; } if (text && text != inp_text) free ((char *) text); /* Free TEXT returned from the help filter. */ if (inp_text && inp_text_limit && argp->help_filter) free ((char *) inp_text); /* We copied INP_TEXT, so free it now. */ if (post && argp->help_filter) /* Now see if we have to output a ARGP_KEY_HELP_EXTRA text. */ { text = (*argp->help_filter) (ARGP_KEY_HELP_EXTRA, 0, input); if (text) { if (anything || pre_blank) __argp_fmtstream_putc (stream, '\n'); __argp_fmtstream_puts (stream, text); free ((char *) text); if (__argp_fmtstream_point (stream) > __argp_fmtstream_lmargin (stream)) __argp_fmtstream_putc (stream, '\n'); anything = 1; } } if (child) while (child->argp && !(first_only && anything)) anything |= argp_doc ((child++)->argp, state, post, anything || pre_blank, first_only, stream); return anything; } /* Output a usage message for ARGP to STREAM. If called from argp_state_help, STATE is the relevent parsing state. FLAGS are from the set ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */ static void _help (const struct argp *argp, const struct argp_state *state, FILE *stream, unsigned flags, const char *name) { int anything = 0; /* Whether we've output anything. */ struct hol *hol = 0; argp_fmtstream_t fs; if (! stream) return; FLOCKFILE (stream); if (! uparams.valid) fill_in_uparams (state); fs = __argp_make_fmtstream (stream, 0, uparams.rmargin, 0); if (! fs) { FUNLOCKFILE (stream); return; } if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE | ARGP_HELP_LONG)) { hol = argp_hol (argp, 0); /* If present, these options always come last. */ hol_set_group (hol, "help", -1); hol_set_group (hol, "version", -1); hol_sort (hol); } if (flags & (ARGP_HELP_USAGE | ARGP_HELP_SHORT_USAGE)) /* Print a short `Usage:' message. */ { int first_pattern = 1, more_patterns; size_t num_pattern_levels = argp_args_levels (argp); char *pattern_levels = alloca (num_pattern_levels); memset (pattern_levels, 0, num_pattern_levels); do { int old_lm; int old_wm = __argp_fmtstream_set_wmargin (fs, uparams.usage_indent); char *levels = pattern_levels; if (first_pattern) __argp_fmtstream_printf (fs, "%s %s", dgettext (argp->argp_domain, "Usage:"), name); else __argp_fmtstream_printf (fs, "%s %s", dgettext (argp->argp_domain, " or: "), name); /* We set the lmargin as well as the wmargin, because hol_usage manually wraps options with newline to avoid annoying breaks. */ old_lm = __argp_fmtstream_set_lmargin (fs, uparams.usage_indent); if (flags & ARGP_HELP_SHORT_USAGE) /* Just show where the options go. */ { if (hol->num_entries > 0) __argp_fmtstream_puts (fs, dgettext (argp->argp_domain, " [OPTION...]")); } else /* Actually print the options. */ { hol_usage (hol, fs); flags |= ARGP_HELP_SHORT_USAGE; /* But only do so once. */ } more_patterns = argp_args_usage (argp, state, &levels, 1, fs); __argp_fmtstream_set_wmargin (fs, old_wm); __argp_fmtstream_set_lmargin (fs, old_lm); __argp_fmtstream_putc (fs, '\n'); anything = 1; first_pattern = 0; } while (more_patterns); } if (flags & ARGP_HELP_PRE_DOC) anything |= argp_doc (argp, state, 0, 0, 1, fs); if (flags & ARGP_HELP_SEE) { __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "\ Try `%s --help' or `%s --usage' for more information.\n"), name, name); anything = 1; } if (flags & ARGP_HELP_LONG) /* Print a long, detailed help message. */ { /* Print info about all the options. */ if (hol->num_entries > 0) { if (anything) __argp_fmtstream_putc (fs, '\n'); hol_help (hol, state, fs); anything = 1; } } if (flags & ARGP_HELP_POST_DOC) /* Print any documentation strings at the end. */ anything |= argp_doc (argp, state, 1, anything, 0, fs); if ((flags & ARGP_HELP_BUG_ADDR) && argp_program_bug_address) { if (anything) __argp_fmtstream_putc (fs, '\n'); __argp_fmtstream_printf (fs, dgettext (argp->argp_domain, "Report bugs to %s.\n"), argp_program_bug_address); anything = 1; } FUNLOCKFILE (stream); if (hol) hol_free (hol); __argp_fmtstream_free (fs); } /* Output a usage message for ARGP to STREAM. FLAGS are from the set ARGP_HELP_*. NAME is what to use wherever a `program name' is needed. */ void __argp_help (const struct argp *argp, FILE *stream, unsigned flags, char *name) { _help (argp, 0, stream, flags, name); } #ifdef weak_alias weak_alias (__argp_help, argp_help) #endif char *__argp_basename(char *name) { char *short_name = strrchr(name, '/'); return short_name ? short_name + 1 : name; } char * __argp_short_program_name(const struct argp_state *state) { if (state) return state->name; #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME return program_invocation_short_name; #elif HAVE_DECL_PROGRAM_INVOCATION_NAME return __argp_basename(program_invocation_name); #else /* !HAVE_DECL_PROGRAM_INVOCATION_NAME */ /* FIXME: What now? Miles suggests that it is better to use NULL, but currently the value is passed on directly to fputs_unlocked, so that requires more changes. */ # if __GNUC__ # warning No reasonable value to return return ""; # endif /* __GNUC__ */ #endif /* !HAVE_DECL_PROGRAM_INVOCATION_NAME */ } /* Output, if appropriate, a usage message for STATE to STREAM. FLAGS are from the set ARGP_HELP_*. */ void __argp_state_help (const struct argp_state *state, FILE *stream, unsigned flags) { if ((!state || ! (state->flags & ARGP_NO_ERRS)) && stream) { if (state && (state->flags & ARGP_LONG_ONLY)) flags |= ARGP_HELP_LONG_ONLY; _help (state ? state->root_argp : 0, state, stream, flags, __argp_short_program_name(state)); if (!state || ! (state->flags & ARGP_NO_EXIT)) { if (flags & ARGP_HELP_EXIT_ERR) exit (argp_err_exit_status); if (flags & ARGP_HELP_EXIT_OK) exit (0); } } } #ifdef weak_alias weak_alias (__argp_state_help, argp_state_help) #endif /* If appropriate, print the printf string FMT and following args, preceded by the program name and `:', to stderr, and followed by a `Try ... --help' message, then exit (1). */ void __argp_error (const struct argp_state *state, const char *fmt, ...) { if (!state || !(state->flags & ARGP_NO_ERRS)) { FILE *stream = state ? state->err_stream : stderr; if (stream) { va_list ap; FLOCKFILE (stream); FPUTS_UNLOCKED (__argp_short_program_name(state), stream); PUTC_UNLOCKED (':', stream); PUTC_UNLOCKED (' ', stream); va_start (ap, fmt); vfprintf (stream, fmt, ap); va_end (ap); PUTC_UNLOCKED ('\n', stream); __argp_state_help (state, stream, ARGP_HELP_STD_ERR); FUNLOCKFILE (stream); } } } #ifdef weak_alias weak_alias (__argp_error, argp_error) #endif /* Similar to the standard gnu error-reporting function error(), but will respect the ARGP_NO_EXIT and ARGP_NO_ERRS flags in STATE, and will print to STATE->err_stream. This is useful for argument parsing code that is shared between program startup (when exiting is desired) and runtime option parsing (when typically an error code is returned instead). The difference between this function and argp_error is that the latter is for *parsing errors*, and the former is for other problems that occur during parsing but don't reflect a (syntactic) problem with the input. */ void __argp_failure (const struct argp_state *state, int status, int errnum, const char *fmt, ...) { if (!state || !(state->flags & ARGP_NO_ERRS)) { FILE *stream = state ? state->err_stream : stderr; if (stream) { FLOCKFILE (stream); FPUTS_UNLOCKED (__argp_short_program_name(state), stream); if (fmt) { va_list ap; PUTC_UNLOCKED (':', stream); PUTC_UNLOCKED (' ', stream); va_start (ap, fmt); vfprintf (stream, fmt, ap); va_end (ap); } if (errnum) { PUTC_UNLOCKED (':', stream); PUTC_UNLOCKED (' ', stream); fputs (STRERROR (errnum), stream); } PUTC_UNLOCKED ('\n', stream); FUNLOCKFILE (stream); if (status && (!state || !(state->flags & ARGP_NO_EXIT))) exit (status); } } } #ifdef weak_alias weak_alias (__argp_failure, argp_failure) #endif freeipmi-1.6.4/common/portability/freeipmi-argp-namefrob.h0000644002055400205540000000666613527331635023621 0ustar00achuachu00000000000000/* Name frobnication for compiling argp outside of glibc Copyright (C) 1997 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #if !_LIBC /* This code is written for inclusion in gnu-libc, and uses names in the namespace reserved for libc. If we're not compiling in libc, define those names to be the normal ones instead. */ /* argp-parse functions */ #undef __argp_parse #define __argp_parse argp_parse #undef __option_is_end #define __option_is_end _option_is_end #undef __option_is_short #define __option_is_short _option_is_short #undef __argp_input #define __argp_input _argp_input /* argp-help functions */ #undef __argp_help #define __argp_help argp_help #undef __argp_error #define __argp_error argp_error #undef __argp_failure #define __argp_failure argp_failure #undef __argp_state_help #define __argp_state_help argp_state_help #undef __argp_usage #define __argp_usage argp_usage #undef __argp_basename #define __argp_basename _argp_basename #undef __argp_short_program_name #define __argp_short_program_name _argp_short_program_name /* argp-fmtstream functions */ #undef __argp_make_fmtstream #define __argp_make_fmtstream argp_make_fmtstream #undef __argp_fmtstream_free #define __argp_fmtstream_free argp_fmtstream_free #undef __argp_fmtstream_putc #define __argp_fmtstream_putc argp_fmtstream_putc #undef __argp_fmtstream_puts #define __argp_fmtstream_puts argp_fmtstream_puts #undef __argp_fmtstream_write #define __argp_fmtstream_write argp_fmtstream_write #undef __argp_fmtstream_printf #define __argp_fmtstream_printf argp_fmtstream_printf #undef __argp_fmtstream_set_lmargin #define __argp_fmtstream_set_lmargin argp_fmtstream_set_lmargin #undef __argp_fmtstream_set_rmargin #define __argp_fmtstream_set_rmargin argp_fmtstream_set_rmargin #undef __argp_fmtstream_set_wmargin #define __argp_fmtstream_set_wmargin argp_fmtstream_set_wmargin #undef __argp_fmtstream_point #define __argp_fmtstream_point argp_fmtstream_point #undef __argp_fmtstream_update #define __argp_fmtstream_update _argp_fmtstream_update #undef __argp_fmtstream_ensure #define __argp_fmtstream_ensure _argp_fmtstream_ensure #undef __argp_fmtstream_lmargin #define __argp_fmtstream_lmargin argp_fmtstream_lmargin #undef __argp_fmtstream_rmargin #define __argp_fmtstream_rmargin argp_fmtstream_rmargin #undef __argp_fmtstream_wmargin #define __argp_fmtstream_wmargin argp_fmtstream_wmargin /* normal libc functions we call */ #undef __sleep #define __sleep sleep #undef __strcasecmp #define __strcasecmp strcasecmp #undef __vsnprintf #define __vsnprintf vsnprintf #endif /* !_LIBC */ #ifndef __set_errno #define __set_errno(e) (errno = (e)) #endif freeipmi-1.6.4/common/portability/freeipmi-argp-parse.c0000644002055400205540000011750113527331635023124 0ustar00achuachu00000000000000/* Hierarchial argument parsing Copyright (C) 1995, 96, 97, 98, 99, 2000,2003 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifndef _GNU_SOURCE # define _GNU_SOURCE 1 #endif #ifdef HAVE_CONFIG_H #include #endif /* AIX requires this to be the first thing in the file. */ #ifndef __GNUC__ # if HAVE_ALLOCA_H # include # else # ifdef _AIX #pragma alloca # else # ifndef alloca /* predefined by HP cc +Olibcalls */ char *alloca (); # endif # endif # endif #endif #include #include #include #include #include #ifndef _ /* This is for other GNU distributions with internationalized messages. When compiling libc, the _ macro is predefined. */ # if defined HAVE_LIBINTL_H || defined _LIBC # include # ifdef _LIBC # undef dgettext # define dgettext(domain, msgid) __dcgettext (domain, msgid, LC_MESSAGES) # endif # else # define dgettext(domain, msgid) (msgid) # define gettext(msgid) (msgid) # endif #endif #ifndef N_ # define N_(msgid) (msgid) #endif #if _LIBC - 0 #include #else #ifdef HAVE_CTHREADS_H #include #endif #endif /* _LIBC */ #include "freeipmi-argp.h" #include "freeipmi-argp-namefrob.h" /* The meta-argument used to prevent any further arguments being interpreted as options. */ #define QUOTE "--" /* EZ alias for ARGP_ERR_UNKNOWN. */ #define EBADKEY ARGP_ERR_UNKNOWN /* Default options. */ /* When argp is given the --HANG switch, _ARGP_HANG is set and argp will sleep for one second intervals, decrementing _ARGP_HANG until it's zero. Thus you can force the program to continue by attaching a debugger and setting it to 0 yourself. */ volatile int _argp_hang; #define OPT_PROGNAME -2 #define OPT_USAGE -3 #define OPT_HANG -4 static const struct argp_option argp_default_options[] = { {"help", '?', 0, 0, N_("Give this help list"), -1}, {"usage", OPT_USAGE, 0, 0, N_("Give a short usage message"), 0 }, {"program-name",OPT_PROGNAME,"NAME", OPTION_HIDDEN, N_("Set the program name"), 0}, {"HANG", OPT_HANG, "SECS", OPTION_ARG_OPTIONAL | OPTION_HIDDEN, N_("Hang for SECS seconds (default 3600)"), 0 }, {0, 0, 0, 0, 0, 0} }; static error_t argp_default_parser (int key, char *arg, struct argp_state *state) { switch (key) { case '?': __argp_state_help (state, state->out_stream, ARGP_HELP_STD_HELP); break; case OPT_USAGE: __argp_state_help (state, state->out_stream, ARGP_HELP_USAGE | ARGP_HELP_EXIT_OK); break; case OPT_PROGNAME: /* Set the program name. */ #if HAVE_DECL_PROGRAM_INVOCATION_NAME program_invocation_name = arg; #endif /* [Note that some systems only have PROGRAM_INVOCATION_SHORT_NAME (aka __PROGNAME), in which case, PROGRAM_INVOCATION_NAME is just defined to be that, so we have to be a bit careful here.] */ /* Update what we use for messages. */ state->name = __argp_basename(arg); #if HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME program_invocation_short_name = state->name; #endif if ((state->flags & (ARGP_PARSE_ARGV0 | ARGP_NO_ERRS)) == ARGP_PARSE_ARGV0) /* Update what getopt uses too. */ state->argv[0] = arg; break; case OPT_HANG: _argp_hang = atoi (arg ? arg : "3600"); fprintf(state->err_stream, "%s: pid = %ld\n", state->name, (long) getpid()); while (_argp_hang-- > 0) __sleep (1); break; default: return EBADKEY; } return 0; } static const struct argp argp_default_argp = {argp_default_options, &argp_default_parser, NULL, NULL, NULL, NULL, "libc"}; static const struct argp_option argp_version_options[] = { {"version", 'V', 0, 0, N_("Print program version"), -1}, {0, 0, 0, 0, 0, 0 } }; static error_t argp_version_parser (int key, char *arg UNUSED, struct argp_state *state) { switch (key) { case 'V': if (argp_program_version_hook) (*argp_program_version_hook) (state->out_stream, state); else if (argp_program_version) fprintf (state->out_stream, "%s\n", argp_program_version); else __argp_error (state, dgettext (state->root_argp->argp_domain, "(PROGRAM ERROR) No version known!?")); if (! (state->flags & ARGP_NO_EXIT)) exit (0); break; default: return EBADKEY; } return 0; } static const struct argp argp_version_argp = {argp_version_options, &argp_version_parser, NULL, NULL, NULL, NULL, "libc"}; /* The state of a `group' during parsing. Each group corresponds to a particular argp structure from the tree of such descending from the top level argp passed to argp_parse. */ struct group { /* This group's parsing function. */ argp_parser_t parser; /* Which argp this group is from. */ const struct argp *argp; /* The number of non-option args sucessfully handled by this parser. */ unsigned args_processed; /* This group's parser's parent's group. */ struct group *parent; unsigned parent_index; /* And the our position in the parent. */ /* These fields are swapped into and out of the state structure when calling this group's parser. */ void *input, **child_inputs; void *hook; }; /* Call GROUP's parser with KEY and ARG, swapping any group-specific info from STATE before calling, and back into state afterwards. If GROUP has no parser, EBADKEY is returned. */ static error_t group_parse (struct group *group, struct argp_state *state, int key, char *arg) { if (group->parser) { error_t err; state->hook = group->hook; state->input = group->input; state->child_inputs = group->child_inputs; state->arg_num = group->args_processed; err = (*group->parser)(key, arg, state); group->hook = state->hook; return err; } else return EBADKEY; } struct parser { const struct argp *argp; const char *posixly_correct; /* True if there are only no-option arguments left, which are just passed verbatim with ARGP_KEY_ARG. This is set if we encounter a quote, or the end of the proper options, but may be cleared again if the user moves the next argument pointer backwards. */ int args_only; /* Describe how to deal with options that follow non-option ARGV-elements. If the caller did not specify anything, the default is REQUIRE_ORDER if the environment variable POSIXLY_CORRECT is defined, PERMUTE otherwise. REQUIRE_ORDER means don't recognize them as options; stop option processing when the first non-option is seen. This is what Unix does. This mode of operation is selected by either setting the environment variable POSIXLY_CORRECT, or using `+' as the first character of the list of option characters. PERMUTE is the default. We permute the contents of ARGV as we scan, so that eventually all the non-options are at the end. This allows options to be given in any order, even with programs that were not written to expect this. RETURN_IN_ORDER is an option available to programs that were written to expect options and other ARGV-elements in any order and that care about the ordering of the two. We describe each non-option ARGV-element as if it were the argument of an option with character code 1. Using `-' as the first character of the list of option characters selects this mode of operation. */ enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; /* A segment of non-option arguments that have been skipped for later processing, after all options. `first_nonopt' is the index in ARGV of the first of them; `last_nonopt' is the index after the last of them. If quoted or args_only is non-zero, this segment should be empty. */ /* FIXME: I'd prefer to use unsigned, but it's more consistent to use the same type as for state.next. */ int first_nonopt; int last_nonopt; /* String of all recognized short options. Needed for ARGP_LONG_ONLY. */ /* FIXME: Perhaps change to a pointer to a suitable bitmap instead? */ char *short_opts; /* For parsing combined short options. */ char *nextchar; /* States of the various parsing groups. */ struct group *groups; /* The end of the GROUPS array. */ struct group *egroup; /* An vector containing storage for the CHILD_INPUTS field in all groups. */ void **child_inputs; /* State block supplied to parsing routines. */ struct argp_state state; /* Memory used by this parser. */ void *storage; }; /* Search for a group defining a short option. */ static const struct argp_option * find_short_option(struct parser *parser, int key, struct group **p) { struct group *group; assert(key >= 0); assert(isascii(key)); for (group = parser->groups; group < parser->egroup; group++) { const struct argp_option *opts; for (opts = group->argp->options; !__option_is_end(opts); opts++) if (opts->key == key) { *p = group; return opts; } } return NULL; } enum match_result { MATCH_EXACT, MATCH_PARTIAL, MATCH_NO }; /* If defined, allow complete.el-like abbreviations of long options. */ #ifndef ARGP_COMPLETE #define ARGP_COMPLETE 0 #endif /* Matches an encountern long-option argument ARG against an option NAME. * ARG is terminated by NUL or '='. */ static enum match_result match_option(const char *arg, const char *name) { unsigned i, j; for (i = j = 0;; i++, j++) { switch(arg[i]) { case '\0': case '=': return name[j] ? MATCH_PARTIAL : MATCH_EXACT; #if ARGP_COMPLETE case '-': while (name[j] != '-') if (!name[j++]) return MATCH_NO; break; #endif default: if (arg[i] != name[j]) return MATCH_NO; } } } static const struct argp_option * find_long_option(struct parser *parser, const char *arg, struct group **p) { struct group *group; /* Partial match found so far. */ struct group *matched_group = NULL; const struct argp_option *matched_option = NULL; /* Number of partial matches. */ int num_partial = 0; for (group = parser->groups; group < parser->egroup; group++) { const struct argp_option *opts; for (opts = group->argp->options; !__option_is_end(opts); opts++) { if (!opts->name) continue; switch (match_option(arg, opts->name)) { case MATCH_NO: break; case MATCH_PARTIAL: num_partial++; matched_group = group; matched_option = opts; break; case MATCH_EXACT: /* Exact match. */ *p = group; return opts; } } } if (num_partial == 1) { *p = matched_group; return matched_option; } return NULL; } /* The next usable entries in the various parser tables being filled in by convert_options. */ struct parser_convert_state { struct parser *parser; char *short_end; void **child_inputs_end; }; /* Initialize GROUP from ARGP. If CVT->SHORT_END is non-NULL, short options are recorded in the short options string. Returns the next unused group entry. CVT holds state used during the conversion. */ static struct group * convert_options (const struct argp *argp, struct group *parent, unsigned parent_index, struct group *group, struct parser_convert_state *cvt) { const struct argp_option *opt = argp->options; const struct argp_child *children = argp->children; if (opt || argp->parser) { /* This parser needs a group. */ if (cvt->short_end) { /* Record any short options. */ for ( ; !__option_is_end (opt); opt++) if (__option_is_short(opt)) *cvt->short_end++ = opt->key; } group->parser = argp->parser; group->argp = argp; group->args_processed = 0; group->parent = parent; group->parent_index = parent_index; group->input = 0; group->hook = 0; group->child_inputs = 0; if (children) /* Assign GROUP's CHILD_INPUTS field some space from CVT->child_inputs_end.*/ { unsigned num_children = 0; while (children[num_children].argp) num_children++; group->child_inputs = cvt->child_inputs_end; cvt->child_inputs_end += num_children; } parent = group++; } else parent = 0; if (children) { unsigned index = 0; while (children->argp) group = convert_options (children++->argp, parent, index++, group, cvt); } return group; } /* Allocate and initialize the group structures, so that they are ordered as if by traversing the corresponding argp parser tree in pre-order. Also build the list of short options, if that is needed. */ static void parser_convert (struct parser *parser, const struct argp *argp) { struct parser_convert_state cvt; cvt.parser = parser; cvt.short_end = parser->short_opts; cvt.child_inputs_end = parser->child_inputs; parser->argp = argp; if (argp) parser->egroup = convert_options (argp, 0, 0, parser->groups, &cvt); else parser->egroup = parser->groups; /* No parsers at all! */ if (parser->short_opts) *cvt.short_end ='\0'; } /* Lengths of various parser fields which we will allocated. */ struct parser_sizes { /* Needed only ARGP_LONG_ONLY */ size_t short_len; /* Number of short options. */ size_t num_groups; /* Group structures we allocate. */ size_t num_child_inputs; /* Child input slots. */ }; /* For ARGP, increments the NUM_GROUPS field in SZS by the total number of argp structures descended from it, and the SHORT_LEN by the total number of short options. */ static void calc_sizes (const struct argp *argp, struct parser_sizes *szs) { const struct argp_child *child = argp->children; const struct argp_option *opt = argp->options; if (opt || argp->parser) { /* This parser needs a group. */ szs->num_groups++; if (opt) { while (__option_is_short (opt++)) szs->short_len++; } } if (child) while (child->argp) { calc_sizes ((child++)->argp, szs); szs->num_child_inputs++; } } /* Initializes PARSER to parse ARGP in a manner described by FLAGS. */ static error_t parser_init (struct parser *parser, const struct argp *argp, int argc, char **argv, int flags, void *input) { error_t err = 0; struct group *group; struct parser_sizes szs; parser->posixly_correct = getenv ("POSIXLY_CORRECT"); if (flags & ARGP_IN_ORDER) parser->ordering = RETURN_IN_ORDER; else if (flags & ARGP_NO_ARGS) parser->ordering = REQUIRE_ORDER; else if (parser->posixly_correct) parser->ordering = REQUIRE_ORDER; else parser->ordering = PERMUTE; szs.short_len = 0; szs.num_groups = 0; szs.num_child_inputs = 0; if (argp) calc_sizes (argp, &szs); if (!(flags & ARGP_LONG_ONLY)) /* We have no use for the short option array. */ szs.short_len = 0; /* Lengths of the various bits of storage used by PARSER. */ #define GLEN (szs.num_groups + 1) * sizeof (struct group) #define CLEN (szs.num_child_inputs * sizeof (void *)) #define SLEN (szs.short_len + 1) #define STORAGE(offset) ((void *) (((char *) parser->storage) + (offset))) parser->storage = malloc (GLEN + CLEN + SLEN); if (! parser->storage) return ENOMEM; parser->groups = parser->storage; parser->child_inputs = STORAGE(GLEN); memset (parser->child_inputs, 0, szs.num_child_inputs * sizeof (void *)); if (flags & ARGP_LONG_ONLY) parser->short_opts = STORAGE(GLEN + CLEN); else parser->short_opts = NULL; parser_convert (parser, argp); memset (&parser->state, 0, sizeof (struct argp_state)); parser->state.root_argp = parser->argp; parser->state.argc = argc; parser->state.argv = argv; parser->state.flags = flags; parser->state.err_stream = stderr; parser->state.out_stream = stdout; parser->state.pstate = parser; parser->args_only = 0; parser->nextchar = NULL; parser->first_nonopt = parser->last_nonopt = 0; /* Call each parser for the first time, giving it a chance to propagate values to child parsers. */ if (parser->groups < parser->egroup) parser->groups->input = input; for (group = parser->groups; group < parser->egroup && (!err || err == EBADKEY); group++) { if (group->parent) /* If a child parser, get the initial input value from the parent. */ group->input = group->parent->child_inputs[group->parent_index]; if (!group->parser && group->argp->children && group->argp->children->argp) /* For the special case where no parsing function is supplied for an argp, propagate its input to its first child, if any (this just makes very simple wrapper argps more convenient). */ group->child_inputs[0] = group->input; err = group_parse (group, &parser->state, ARGP_KEY_INIT, 0); } if (err == EBADKEY) err = 0; /* Some parser didn't understand. */ if (err) return err; if (argv[0] && !(parser->state.flags & ARGP_PARSE_ARGV0)) /* There's an argv[0]; use it for messages. */ { parser->state.name = __argp_basename(argv[0]); /* Don't parse it as an argument. */ parser->state.next = 1; } else parser->state.name = __argp_short_program_name(NULL); return 0; } /* Free any storage consumed by PARSER (but not PARSER itself). */ static error_t parser_finalize (struct parser *parser, error_t err, int arg_ebadkey, int *end_index) { struct group *group; if (err == EBADKEY && arg_ebadkey) /* Suppress errors generated by unparsed arguments. */ err = 0; if (! err) { if (parser->state.next == parser->state.argc) /* We successfully parsed all arguments! Call all the parsers again, just a few more times... */ { for (group = parser->groups; group < parser->egroup && (!err || err==EBADKEY); group++) if (group->args_processed == 0) err = group_parse (group, &parser->state, ARGP_KEY_NO_ARGS, 0); for (group = parser->egroup - 1; group >= parser->groups && (!err || err==EBADKEY); group--) err = group_parse (group, &parser->state, ARGP_KEY_END, 0); if (err == EBADKEY) err = 0; /* Some parser didn't understand. */ /* Tell the user that all arguments are parsed. */ if (end_index) *end_index = parser->state.next; } else if (end_index) /* Return any remaining arguments to the user. */ *end_index = parser->state.next; else /* No way to return the remaining arguments, they must be bogus. */ { if (!(parser->state.flags & ARGP_NO_ERRS) && parser->state.err_stream) fprintf (parser->state.err_stream, dgettext (parser->argp->argp_domain, "%s: Too many arguments\n"), parser->state.name); err = EBADKEY; } } /* Okay, we're all done, with either an error or success; call the parsers to indicate which one. */ if (err) { /* Maybe print an error message. */ if (err == EBADKEY) /* An appropriate message describing what the error was should have been printed earlier. */ __argp_state_help (&parser->state, parser->state.err_stream, ARGP_HELP_STD_ERR); /* Since we didn't exit, give each parser an error indication. */ for (group = parser->groups; group < parser->egroup; group++) group_parse (group, &parser->state, ARGP_KEY_ERROR, 0); } else /* Notify parsers of success, and propagate back values from parsers. */ { /* We pass over the groups in reverse order so that child groups are given a chance to do there processing before passing back a value to the parent. */ for (group = parser->egroup - 1 ; group >= parser->groups && (!err || err == EBADKEY) ; group--) err = group_parse (group, &parser->state, ARGP_KEY_SUCCESS, 0); if (err == EBADKEY) err = 0; /* Some parser didn't understand. */ } /* Call parsers once more, to do any final cleanup. Errors are ignored. */ for (group = parser->egroup - 1; group >= parser->groups; group--) group_parse (group, &parser->state, ARGP_KEY_FINI, 0); if (err == EBADKEY) err = EINVAL; free (parser->storage); return err; } /* Call the user parsers to parse the non-option argument VAL, at the current position, returning any error. The state NEXT pointer should point to the argument; this function will adjust it correctly to reflect however many args actually end up being consumed. */ static error_t parser_parse_arg (struct parser *parser, char *val) { /* Save the starting value of NEXT */ int index = parser->state.next; error_t err = EBADKEY; struct group *group; int key = 0; /* Which of ARGP_KEY_ARG[S] we used. */ /* Try to parse the argument in each parser. */ for (group = parser->groups ; group < parser->egroup && err == EBADKEY ; group++) { parser->state.next++; /* For ARGP_KEY_ARG, consume the arg. */ key = ARGP_KEY_ARG; err = group_parse (group, &parser->state, key, val); if (err == EBADKEY) /* This parser doesn't like ARGP_KEY_ARG; try ARGP_KEY_ARGS instead. */ { parser->state.next--; /* For ARGP_KEY_ARGS, put back the arg. */ key = ARGP_KEY_ARGS; err = group_parse (group, &parser->state, key, 0); } } if (! err) { if (key == ARGP_KEY_ARGS) /* The default for ARGP_KEY_ARGS is to assume that if NEXT isn't changed by the user, *all* arguments should be considered consumed. */ parser->state.next = parser->state.argc; if (parser->state.next > index) /* Remember that we successfully processed a non-option argument -- but only if the user hasn't gotten tricky and set the clock back. */ (--group)->args_processed += (parser->state.next - index); else /* The user wants to reparse some args, so try looking for options again. */ parser->args_only = 0; } return err; } /* Exchange two adjacent subsequences of ARGV. One subsequence is elements [first_nonopt,last_nonopt) which contains all the non-options that have been skipped so far. The other is elements [last_nonopt,next), which contains all the options processed since those non-options were skipped. `first_nonopt' and `last_nonopt' are relocated so that they describe the new indices of the non-options in ARGV after they are moved. */ static void exchange (struct parser *parser) { int bottom = parser->first_nonopt; int middle = parser->last_nonopt; int top = parser->state.next; char **argv = parser->state.argv; char *tem; /* Exchange the shorter segment with the far end of the longer segment. That puts the shorter segment into the right place. It leaves the longer segment in the right place overall, but it consists of two parts that need to be swapped next. */ while (top > middle && middle > bottom) { if (top - middle > middle - bottom) { /* Bottom segment is the short one. */ int len = middle - bottom; register int i; /* Swap it with the top part of the top segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[top - (middle - bottom) + i]; argv[top - (middle - bottom) + i] = tem; } /* Exclude the moved bottom segment from further swapping. */ top -= len; } else { /* Top segment is the short one. */ int len = top - middle; register int i; /* Swap it with the bottom part of the bottom segment. */ for (i = 0; i < len; i++) { tem = argv[bottom + i]; argv[bottom + i] = argv[middle + i]; argv[middle + i] = tem; } /* Exclude the moved top segment from further swapping. */ bottom += len; } } /* Update records for the slots the non-options now occupy. */ parser->first_nonopt += (parser->state.next - parser->last_nonopt); parser->last_nonopt = parser->state.next; } enum arg_type { ARG_ARG, ARG_SHORT_OPTION, ARG_LONG_OPTION, ARG_LONG_ONLY_OPTION, ARG_QUOTE }; static enum arg_type classify_arg(struct parser *parser, char *arg, char **opt) { if (arg[0] == '-') /* Looks like an option... */ switch (arg[1]) { case '\0': /* "-" is not an option. */ return ARG_ARG; case '-': /* Long option, or quote. */ if (!arg[2]) return ARG_QUOTE; /* A long option. */ if (opt) *opt = arg + 2; return ARG_LONG_OPTION; default: /* Short option. But if ARGP_LONG_ONLY, it can also be a long option. */ if (opt) *opt = arg + 1; if (parser->state.flags & ARGP_LONG_ONLY) { /* Rules from getopt.c: If long_only and the ARGV-element has the form "-f", where f is a valid short option, don't consider it an abbreviated form of a long option that starts with f. Otherwise there would be no way to give the -f short option. On the other hand, if there's a long option "fubar" and the ARGV-element is "-fu", do consider that an abbreviation of the long option, just like "--fu", and not "-f" with arg "u". This distinction seems to be the most useful approach. */ assert(parser->short_opts); if (arg[2] || !strchr(parser->short_opts, arg[1])) return ARG_LONG_ONLY_OPTION; } return ARG_SHORT_OPTION; } else return ARG_ARG; } /* Parse the next argument in PARSER (as indicated by PARSER->state.next). Any error from the parsers is returned, and *ARGP_EBADKEY indicates whether a value of EBADKEY is due to an unrecognized argument (which is generally not fatal). */ static error_t parser_parse_next (struct parser *parser, int *arg_ebadkey) { if (parser->state.quoted && parser->state.next < parser->state.quoted) /* The next argument pointer has been moved to before the quoted region, so pretend we never saw the quoting `--', and start looking for options again. If the `--' is still there we'll just process it one more time. */ parser->state.quoted = parser->args_only = 0; /* Give FIRST_NONOPT & LAST_NONOPT rational values if NEXT has been moved back by the user (who may also have changed the arguments). */ if (parser->last_nonopt > parser->state.next) parser->last_nonopt = parser->state.next; if (parser->first_nonopt > parser->state.next) parser->first_nonopt = parser->state.next; if (parser->nextchar) /* Deal with short options. */ { struct group *group; char c; const struct argp_option *option; char *value = NULL;; assert(!parser->args_only); c = *parser->nextchar++; option = find_short_option(parser, c, &group); if (!option) { if (parser->posixly_correct) /* 1003.2 specifies the format of this message. */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: illegal option -- %c\n"), parser->state.name, c); else fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: invalid option -- %c\n"), parser->state.name, c); *arg_ebadkey = 0; return EBADKEY; } if (!*parser->nextchar) parser->nextchar = NULL; if (option->arg) { value = parser->nextchar; parser->nextchar = NULL; if (!value && !(option->flags & OPTION_ARG_OPTIONAL)) /* We need an mandatory argument. */ { if (parser->state.next == parser->state.argc) /* Missing argument */ { /* 1003.2 specifies the format of this message. */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: option requires an argument -- %c\n"), parser->state.name, c); *arg_ebadkey = 0; return EBADKEY; } value = parser->state.argv[parser->state.next++]; } } return group_parse(group, &parser->state, option->key, value); } else /* Advance to the next ARGV-element. */ { if (parser->args_only) { *arg_ebadkey = 1; if (parser->state.next >= parser->state.argc) /* We're done. */ return EBADKEY; else return parser_parse_arg(parser, parser->state.argv[parser->state.next]); } if (parser->state.next >= parser->state.argc) /* Almost done. If there are non-options that we skipped previously, we should process them now. */ { *arg_ebadkey = 1; if (parser->first_nonopt != parser->last_nonopt) { exchange(parser); /* Start processing the arguments we skipped previously. */ parser->state.next = parser->first_nonopt; parser->first_nonopt = parser->last_nonopt = 0; parser->args_only = 1; return 0; } else /* Indicate that we're really done. */ return EBADKEY; } else /* Look for options. */ { char *arg = parser->state.argv[parser->state.next]; char *optstart; enum arg_type token = classify_arg(parser, arg, &optstart); switch (token) { case ARG_ARG: switch (parser->ordering) { case PERMUTE: if (parser->first_nonopt == parser->last_nonopt) /* Skipped sequence is empty; start a new one. */ parser->first_nonopt = parser->last_nonopt = parser->state.next; else if (parser->last_nonopt != parser->state.next) /* We have a non-empty skipped sequence, and we're not at the end-point, so move it. */ exchange(parser); assert(parser->last_nonopt == parser->state.next); /* Skip this argument for now. */ parser->state.next++; parser->last_nonopt = parser->state.next; return 0; case REQUIRE_ORDER: /* Implicit quote before the first argument. */ parser->args_only = 1; return 0; case RETURN_IN_ORDER: *arg_ebadkey = 1; return parser_parse_arg(parser, arg); default: abort(); } case ARG_QUOTE: /* Skip it, then exchange with any previous non-options. */ parser->state.next++; assert (parser->last_nonopt != parser->state.next); if (parser->first_nonopt != parser->last_nonopt) { exchange(parser); /* Start processing the skipped and the quoted arguments. */ parser->state.quoted = parser->state.next = parser->first_nonopt; /* Also empty the skipped-list, to avoid confusion if the user resets the next pointer. */ parser->first_nonopt = parser->last_nonopt = 0; } else parser->state.quoted = parser->state.next; parser->args_only = 1; return 0; case ARG_LONG_ONLY_OPTION: case ARG_LONG_OPTION: { struct group *group; const struct argp_option *option; char *value; parser->state.next++; option = find_long_option(parser, optstart, &group); if (!option) { /* NOTE: This includes any "=something" in the output. */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: unrecognized option `%s'\n"), parser->state.name, arg); *arg_ebadkey = 0; return EBADKEY; } value = strchr(optstart, '='); if (value) value++; if (value && !option->arg) /* Unexpected argument. */ { if (token == ARG_LONG_OPTION) /* --option */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: option `--%s' doesn't allow an argument\n"), parser->state.name, option->name); else /* +option or -option */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: option `%c%s' doesn't allow an argument\n"), parser->state.name, arg[0], option->name); *arg_ebadkey = 0; return EBADKEY; } if (option->arg && !value && !(option->flags & OPTION_ARG_OPTIONAL)) /* We need an mandatory argument. */ { if (parser->state.next == parser->state.argc) /* Missing argument */ { if (token == ARG_LONG_OPTION) /* --option */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: option `--%s' requires an argument\n"), parser->state.name, option->name); else /* +option or -option */ fprintf (parser->state.err_stream, dgettext(parser->state.root_argp->argp_domain, "%s: option `%c%s' requires an argument\n"), parser->state.name, arg[0], option->name); *arg_ebadkey = 0; return EBADKEY; } value = parser->state.argv[parser->state.next++]; } *arg_ebadkey = 0; return group_parse(group, &parser->state, option->key, value); } case ARG_SHORT_OPTION: parser->state.next++; parser->nextchar = optstart; return 0; default: abort(); } } } } /* Parse the options strings in ARGC & ARGV according to the argp in ARGP. FLAGS is one of the ARGP_ flags above. If END_INDEX is non-NULL, the index in ARGV of the first unparsed option is returned in it. If an unknown option is present, EINVAL is returned; if some parser routine returned a non-zero value, it is returned; otherwise 0 is returned. */ error_t __argp_parse (const struct argp *argp, int argc, char **argv, unsigned flags, int *end_index, void *input) { error_t err; struct parser parser; /* If true, then err == EBADKEY is a result of a non-option argument failing to be parsed (which in some cases isn't actually an error). */ int arg_ebadkey = 0; if (! (flags & ARGP_NO_HELP)) /* Add our own options. */ { struct argp_child *child = alloca (4 * sizeof (struct argp_child)); struct argp *top_argp = alloca (sizeof (struct argp)); /* TOP_ARGP has no options, it just serves to group the user & default argps. */ memset (top_argp, 0, sizeof (*top_argp)); top_argp->children = child; memset (child, 0, 4 * sizeof (struct argp_child)); if (argp) (child++)->argp = argp; (child++)->argp = &argp_default_argp; if (argp_program_version || argp_program_version_hook) (child++)->argp = &argp_version_argp; child->argp = 0; argp = top_argp; } /* Construct a parser for these arguments. */ err = parser_init (&parser, argp, argc, argv, flags, input); if (! err) /* Parse! */ { while (! err) err = parser_parse_next (&parser, &arg_ebadkey); err = parser_finalize (&parser, err, arg_ebadkey, end_index); } return err; } #ifdef weak_alias weak_alias (__argp_parse, argp_parse) #endif /* Return the input field for ARGP in the parser corresponding to STATE; used by the help routines. */ void * __argp_input (const struct argp *argp, const struct argp_state *state) { if (state) { struct group *group; struct parser *parser = state->pstate; for (group = parser->groups; group < parser->egroup; group++) if (group->argp == argp) return group->input; } return 0; } #ifdef weak_alias weak_alias (__argp_input, _argp_input) #endif /* Defined here, in case a user is not inlining the definitions in * argp.h */ void __argp_usage (__const struct argp_state *__state) { __argp_state_help (__state, stderr, ARGP_HELP_STD_USAGE); } int __option_is_short (__const struct argp_option *__opt) { if (__opt->flags & OPTION_DOC) return 0; else { int __key = __opt->key; /* FIXME: whether or not a particular key implies a short option * ought not to be locale dependent. */ return __key > 0 && isprint (__key); } } int __option_is_end (__const struct argp_option *__opt) { return !__opt->key && !__opt->name && !__opt->doc && !__opt->group; } freeipmi-1.6.4/common/portability/freeipmi-argp-pv.c0000644002055400205540000000245713527331635022442 0ustar00achuachu00000000000000/* Default definition for ARGP_PROGRAM_VERSION. Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* If set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which will print this this string followed by a newline and exit (unless the ARGP_NO_EXIT flag is used). Overridden by ARGP_PROGRAM_VERSION_HOOK. */ const char *argp_program_version = 0; freeipmi-1.6.4/common/portability/freeipmi-argp-pvh.c0000644002055400205540000000277013527331635022610 0ustar00achuachu00000000000000/* Default definition for ARGP_PROGRAM_VERSION_HOOK. Copyright (C) 1996, 1997, 1999, 2004 Free Software Foundation, Inc. This file is part of the GNU C Library. Written by Miles Bader . The GNU C Library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. The GNU C Library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with the GNU C Library; see the file COPYING.LIB. If not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H #include #endif #include "freeipmi-argp.h" /* If set by the user program to a non-zero value, then a default option --version is added (unless the ARGP_NO_HELP flag is used), which calls this function with a stream to print the version to and a pointer to the current parsing state, and then exits (unless the ARGP_NO_EXIT flag is used). This variable takes precedent over ARGP_PROGRAM_VERSION. */ void (*argp_program_version_hook) (FILE *stream, struct argp_state *state) = 0; freeipmi-1.6.4/common/toolcommon/0000755002055400205540000000000013527342541016736 5ustar00achuachu00000000000000freeipmi-1.6.4/common/toolcommon/Makefile.in0000644002055400205540000010770213527342444021014 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = common/toolcommon DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = LTLIBRARIES = $(noinst_LTLIBRARIES) libtoolcommon_la_LIBADD = am_libtoolcommon_la_OBJECTS = libtoolcommon_la-pstdout.lo \ libtoolcommon_la-tool-common.lo \ libtoolcommon_la-tool-config-file-common.lo \ libtoolcommon_la-tool-cmdline-common.lo \ libtoolcommon_la-tool-daemon-common.lo \ libtoolcommon_la-tool-event-common.lo \ libtoolcommon_la-tool-hostrange-common.lo \ libtoolcommon_la-tool-oem-common.lo \ libtoolcommon_la-tool-sdr-cache-common.lo \ libtoolcommon_la-tool-sensor-common.lo \ libtoolcommon_la-tool-util-common.lo libtoolcommon_la_OBJECTS = $(am_libtoolcommon_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libtoolcommon_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libtoolcommon_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libtoolcommon_la_SOURCES) DIST_SOURCES = $(libtoolcommon_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ noinst_LTLIBRARIES = \ libtoolcommon.la libtoolcommon_la_LDFLAGS = \ $(PTHREAD_LIBS) libtoolcommon_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libtoolcommon_la_SOURCES = \ pstdout.c \ pstdout.h \ tool-common.c \ tool-common.h \ tool-config-file-common.c \ tool-config-file-common.h \ tool-cmdline-common.c \ tool-cmdline-common.h \ tool-daemon-common.c \ tool-daemon-common.h \ tool-event-common.c \ tool-event-common.h \ tool-hostrange-common.c \ tool-hostrange-common.h \ tool-oem-common.c \ tool-oem-common.h \ tool-sdr-cache-common.c \ tool-sdr-cache-common.h \ tool-sensor-common.c \ tool-sensor-common.h \ tool-util-common.c \ tool-util-common.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu common/toolcommon/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu common/toolcommon/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): clean-noinstLTLIBRARIES: -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES) @list='$(noinst_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libtoolcommon.la: $(libtoolcommon_la_OBJECTS) $(libtoolcommon_la_DEPENDENCIES) $(EXTRA_libtoolcommon_la_DEPENDENCIES) $(AM_V_CCLD)$(libtoolcommon_la_LINK) $(libtoolcommon_la_OBJECTS) $(libtoolcommon_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-pstdout.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-cmdline-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-config-file-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-daemon-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-event-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-hostrange-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-oem-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-sdr-cache-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-sensor-common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libtoolcommon_la-tool-util-common.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libtoolcommon_la-pstdout.lo: pstdout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-pstdout.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-pstdout.Tpo -c -o libtoolcommon_la-pstdout.lo `test -f 'pstdout.c' || echo '$(srcdir)/'`pstdout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-pstdout.Tpo $(DEPDIR)/libtoolcommon_la-pstdout.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='pstdout.c' object='libtoolcommon_la-pstdout.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-pstdout.lo `test -f 'pstdout.c' || echo '$(srcdir)/'`pstdout.c libtoolcommon_la-tool-common.lo: tool-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-common.Tpo -c -o libtoolcommon_la-tool-common.lo `test -f 'tool-common.c' || echo '$(srcdir)/'`tool-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-common.c' object='libtoolcommon_la-tool-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-common.lo `test -f 'tool-common.c' || echo '$(srcdir)/'`tool-common.c libtoolcommon_la-tool-config-file-common.lo: tool-config-file-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-config-file-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-config-file-common.Tpo -c -o libtoolcommon_la-tool-config-file-common.lo `test -f 'tool-config-file-common.c' || echo '$(srcdir)/'`tool-config-file-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-config-file-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-config-file-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-config-file-common.c' object='libtoolcommon_la-tool-config-file-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-config-file-common.lo `test -f 'tool-config-file-common.c' || echo '$(srcdir)/'`tool-config-file-common.c libtoolcommon_la-tool-cmdline-common.lo: tool-cmdline-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-cmdline-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-cmdline-common.Tpo -c -o libtoolcommon_la-tool-cmdline-common.lo `test -f 'tool-cmdline-common.c' || echo '$(srcdir)/'`tool-cmdline-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-cmdline-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-cmdline-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-cmdline-common.c' object='libtoolcommon_la-tool-cmdline-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-cmdline-common.lo `test -f 'tool-cmdline-common.c' || echo '$(srcdir)/'`tool-cmdline-common.c libtoolcommon_la-tool-daemon-common.lo: tool-daemon-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-daemon-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-daemon-common.Tpo -c -o libtoolcommon_la-tool-daemon-common.lo `test -f 'tool-daemon-common.c' || echo '$(srcdir)/'`tool-daemon-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-daemon-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-daemon-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-daemon-common.c' object='libtoolcommon_la-tool-daemon-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-daemon-common.lo `test -f 'tool-daemon-common.c' || echo '$(srcdir)/'`tool-daemon-common.c libtoolcommon_la-tool-event-common.lo: tool-event-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-event-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-event-common.Tpo -c -o libtoolcommon_la-tool-event-common.lo `test -f 'tool-event-common.c' || echo '$(srcdir)/'`tool-event-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-event-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-event-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-event-common.c' object='libtoolcommon_la-tool-event-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-event-common.lo `test -f 'tool-event-common.c' || echo '$(srcdir)/'`tool-event-common.c libtoolcommon_la-tool-hostrange-common.lo: tool-hostrange-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-hostrange-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-hostrange-common.Tpo -c -o libtoolcommon_la-tool-hostrange-common.lo `test -f 'tool-hostrange-common.c' || echo '$(srcdir)/'`tool-hostrange-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-hostrange-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-hostrange-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-hostrange-common.c' object='libtoolcommon_la-tool-hostrange-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-hostrange-common.lo `test -f 'tool-hostrange-common.c' || echo '$(srcdir)/'`tool-hostrange-common.c libtoolcommon_la-tool-oem-common.lo: tool-oem-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-oem-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-oem-common.Tpo -c -o libtoolcommon_la-tool-oem-common.lo `test -f 'tool-oem-common.c' || echo '$(srcdir)/'`tool-oem-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-oem-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-oem-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-oem-common.c' object='libtoolcommon_la-tool-oem-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-oem-common.lo `test -f 'tool-oem-common.c' || echo '$(srcdir)/'`tool-oem-common.c libtoolcommon_la-tool-sdr-cache-common.lo: tool-sdr-cache-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-sdr-cache-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-sdr-cache-common.Tpo -c -o libtoolcommon_la-tool-sdr-cache-common.lo `test -f 'tool-sdr-cache-common.c' || echo '$(srcdir)/'`tool-sdr-cache-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-sdr-cache-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-sdr-cache-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-sdr-cache-common.c' object='libtoolcommon_la-tool-sdr-cache-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-sdr-cache-common.lo `test -f 'tool-sdr-cache-common.c' || echo '$(srcdir)/'`tool-sdr-cache-common.c libtoolcommon_la-tool-sensor-common.lo: tool-sensor-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-sensor-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-sensor-common.Tpo -c -o libtoolcommon_la-tool-sensor-common.lo `test -f 'tool-sensor-common.c' || echo '$(srcdir)/'`tool-sensor-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-sensor-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-sensor-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-sensor-common.c' object='libtoolcommon_la-tool-sensor-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-sensor-common.lo `test -f 'tool-sensor-common.c' || echo '$(srcdir)/'`tool-sensor-common.c libtoolcommon_la-tool-util-common.lo: tool-util-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libtoolcommon_la-tool-util-common.lo -MD -MP -MF $(DEPDIR)/libtoolcommon_la-tool-util-common.Tpo -c -o libtoolcommon_la-tool-util-common.lo `test -f 'tool-util-common.c' || echo '$(srcdir)/'`tool-util-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libtoolcommon_la-tool-util-common.Tpo $(DEPDIR)/libtoolcommon_la-tool-util-common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='tool-util-common.c' object='libtoolcommon_la-tool-util-common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libtoolcommon_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libtoolcommon_la-tool-util-common.lo `test -f 'tool-util-common.c' || echo '$(srcdir)/'`tool-util-common.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) installdirs: install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-noinstLTLIBRARIES cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-strip installcheck \ installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/common/toolcommon/Makefile.am0000644002055400205540000000161413527331635020776 0ustar00achuachu00000000000000noinst_LTLIBRARIES = \ libtoolcommon.la libtoolcommon_la_LDFLAGS = \ $(PTHREAD_LIBS) libtoolcommon_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libtoolcommon_la_SOURCES = \ pstdout.c \ pstdout.h \ tool-common.c \ tool-common.h \ tool-config-file-common.c \ tool-config-file-common.h \ tool-cmdline-common.c \ tool-cmdline-common.h \ tool-daemon-common.c \ tool-daemon-common.h \ tool-event-common.c \ tool-event-common.h \ tool-hostrange-common.c \ tool-hostrange-common.h \ tool-oem-common.c \ tool-oem-common.h \ tool-sdr-cache-common.c \ tool-sdr-cache-common.h \ tool-sensor-common.c \ tool-sensor-common.h \ tool-util-common.c \ tool-util-common.h freeipmi-1.6.4/common/toolcommon/pstdout.c0000644002055400205540000013025413527331635020613 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: pstdout.c,v 1.10 2010-02-10 01:27:44 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-227589 * * This file is part of pstdout, a library used to launch and manage * the standard output of multiple threads. For details, see * http://www.llnl.gov/linux/. * * Pstdout is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Pstdout is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Pstdout. If not, see . \*****************************************************************************/ /* * Notes: * * Needs to be compiled with -D_REENTRANT */ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include #include #include #include "pstdout.h" #include "cbuf.h" #include "fi_hostlist.h" #include "list.h" /* max hostrange size is typically 16 bytes * * counting the comma, a 1000 node non-expanded hostrange list could * be (16 + 1) * 1000 = 17000 bytes. * * So we round up from there to the nearest 16K */ #define PSTDOUT_BUFLEN 32768 static char * pstdout_errmsg[] = { "success", "library uninitialized", "incorrect parameters passed in", "out of memory", "unknown internal error", "error number out of range", }; static uint32_t pstdout_debug_flags = PSTDOUT_DEBUG_NONE; static uint32_t pstdout_output_flags = PSTDOUT_OUTPUT_STDOUT_DEFAULT | PSTDOUT_OUTPUT_STDERR_DEFAULT; static unsigned int pstdout_fanout = PSTDOUT_FANOUT_DEFAULT; static pthread_mutex_t pstdout_threadcount_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t pstdout_threadcount_cond = PTHREAD_COND_INITIALIZER; static int pstdout_threadcount = 0; struct pstdout_thread_data { char *hostname; pthread_t tid; pthread_attr_t attr; int exit_code; Pstdout_Thread pstdout_func; void *arg; }; struct pstdout_state { uint32_t magic; char *hostname; cbuf_t p_stdout; cbuf_t p_stderr; char *buffer_stdout; char *buffer_stderr; unsigned int buffer_stdout_len; unsigned int buffer_stderr_len; int no_more_external_output; pthread_mutex_t mutex; }; #define PSTDOUT_STATE_MAGIC 0x76309ab3 #define PSTDOUT_STATE_CBUF_MIN 32 #define PSTDOUT_STATE_CBUF_MAX 2048 int pstdout_errnum = PSTDOUT_ERR_SUCCESS; struct pstdout_consolidated_data { fi_hostlist_t h; char *output; }; static List pstdout_consolidated_stdout = NULL; static List pstdout_consolidated_stderr = NULL; static pthread_mutex_t pstdout_consolidated_stdout_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t pstdout_consolidated_stderr_mutex = PTHREAD_MUTEX_INITIALIZER; static int pstdout_initialized = 0; static pthread_mutex_t pstdout_launch_mutex = PTHREAD_MUTEX_INITIALIZER; static List pstdout_states = NULL; static pthread_mutex_t pstdout_states_mutex = PTHREAD_MUTEX_INITIALIZER; #ifndef HAVE_SIGHANDLER_T typedef void (*sighandler_t)(int); #endif /* HAVE_SIGHANDLER_T */ static struct pstdout_consolidated_data * _pstdout_consolidated_data_create(const char *hostname, const char *output) { struct pstdout_consolidated_data *cdata = NULL; assert(hostname); assert(output); if (!(cdata = (struct pstdout_consolidated_data *)malloc(sizeof(struct pstdout_consolidated_data)))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } cdata->h = NULL; cdata->output = NULL; if (!(cdata->h = fi_hostlist_create(hostname))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } if (!(cdata->output = strdup(output))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } return cdata; cleanup: if (cdata) { if (cdata->h) fi_hostlist_destroy(cdata->h); free(cdata->output); free(cdata); } return NULL; } static void _pstdout_consolidated_data_destroy(void *x) { struct pstdout_consolidated_data *cdata; assert(x); cdata = (struct pstdout_consolidated_data *)x; if (cdata->h) fi_hostlist_destroy(cdata->h); free(cdata->output); free(cdata); } static int _pstdout_consolidated_data_compare(void *x, void *y) { struct pstdout_consolidated_data *cdataX; struct pstdout_consolidated_data *cdataY; int h_countX, h_countY; assert(x); assert(y); cdataX = (struct pstdout_consolidated_data *)x; cdataY = (struct pstdout_consolidated_data *)x; assert(cdataX->h); assert(cdataY->h); h_countX = fi_hostlist_count(cdataX->h); h_countY = fi_hostlist_count(cdataY->h); if (h_countX < h_countY) return -1; if (h_countX > h_countY) return 1; return 0; } static int _pstdout_consolidated_data_find(void *x, void *key) { struct pstdout_consolidated_data *cdata; assert(x); assert(key); cdata = (struct pstdout_consolidated_data *)x; assert(cdata->output); if (!strcmp(cdata->output, (char *)key)) return 1; return 0; } static int _pstdout_consolidated_data_delete_all(void *x, void *key) { return 1; } static int _pstdout_states_delete_pointer(void *x, void *key) { if (x == key) return 1; return 0; } int pstdout_init(void) { if (!pstdout_initialized) { if (!(pstdout_consolidated_stdout = list_create((ListDelF)_pstdout_consolidated_data_destroy))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } if (!(pstdout_consolidated_stderr = list_create((ListDelF)_pstdout_consolidated_data_destroy))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } if (!(pstdout_states = list_create((ListDelF)NULL))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } pstdout_initialized++; } return 0; cleanup: if (pstdout_consolidated_stdout) list_destroy(pstdout_consolidated_stdout); if (pstdout_consolidated_stderr) list_destroy(pstdout_consolidated_stderr); if (pstdout_states) list_destroy(pstdout_states); return -1; } char * pstdout_strerror(int errnum) { if (errnum >= PSTDOUT_ERR_SUCCESS && errnum <= PSTDOUT_ERR_ERRNUMRANGE) return pstdout_errmsg[errnum]; else return pstdout_errmsg[PSTDOUT_ERR_ERRNUMRANGE]; } int pstdout_set_debug_flags(unsigned int debug_flags) { int rc, rv = -1; if (debug_flags & ~PSTDOUT_DEBUG_MASK) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (debug_flags & PSTDOUT_DEBUG_NONE && debug_flags && PSTDOUT_DEBUG_STANDARD) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if ((rc = pthread_mutex_lock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstdout_debug_flags = debug_flags; pstdout_errnum = PSTDOUT_ERR_SUCCESS; rv = 0; cleanup: if ((rc = pthread_mutex_unlock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } return rv; } int pstdout_get_debug_flags(void) { pstdout_errnum = PSTDOUT_ERR_SUCCESS; return pstdout_debug_flags; } int pstdout_set_output_flags(unsigned int output_flags) { int rc, rv = -1; if (output_flags & ~PSTDOUT_OUTPUT_MASK) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (((output_flags & PSTDOUT_OUTPUT_STDOUT_DEFAULT) && (output_flags & PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME)) || ((output_flags & PSTDOUT_OUTPUT_STDERR_DEFAULT) && (output_flags & PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME)) || (!(output_flags & PSTDOUT_OUTPUT_STDOUT_DEFAULT) && !(output_flags & PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME)) || (!(output_flags & PSTDOUT_OUTPUT_STDERR_DEFAULT) && !(output_flags & PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME))) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (((output_flags & PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME) && (output_flags & PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE)) || ((output_flags & PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME) && (output_flags & PSTDOUT_OUTPUT_STDERR_CONSOLIDATE))) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (((output_flags & PSTDOUT_OUTPUT_BUFFER_STDOUT) && (output_flags & PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE)) || ((output_flags & PSTDOUT_OUTPUT_BUFFER_STDERR) && (output_flags & PSTDOUT_OUTPUT_STDERR_CONSOLIDATE))) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if ((rc = pthread_mutex_lock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstdout_output_flags = output_flags; pstdout_errnum = PSTDOUT_ERR_SUCCESS; rv = 0; cleanup: if ((rc = pthread_mutex_unlock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } return rv; } int pstdout_get_output_flags(void) { pstdout_errnum = PSTDOUT_ERR_SUCCESS; return pstdout_output_flags; } int pstdout_set_fanout(unsigned int fanout) { int rc, rv = -1; if (!(fanout >= PSTDOUT_FANOUT_MIN && fanout <= PSTDOUT_FANOUT_MAX)) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if ((rc = pthread_mutex_lock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstdout_fanout = fanout; pstdout_errnum = PSTDOUT_ERR_SUCCESS; rv = 0; cleanup: if ((rc = pthread_mutex_unlock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } pstdout_errnum = PSTDOUT_ERR_SUCCESS; return rv; } int pstdout_get_fanout(void) { pstdout_errnum = PSTDOUT_ERR_SUCCESS; return pstdout_fanout; } int pstdout_hostnames_count(const char *hostnames) { fi_hostlist_t h = NULL; int count = 0; int rv = -1; if (!hostnames) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (!(h = fi_hostlist_create(NULL))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } if (!(count = fi_hostlist_push(h, hostnames))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "valid hostnames count == 0\n"); pstdout_errnum = PSTDOUT_ERR_PARAMETERS; goto cleanup; } rv = count; cleanup: if (h) fi_hostlist_destroy(h); return rv; } static int _pstdout_print(pstdout_state_t pstate, int internal_to_pstdout, FILE *stream, const char *format, va_list ap) { char *buf = NULL; char *linebuf = NULL; size_t buflen = PSTDOUT_BUFLEN; size_t linebuflen = PSTDOUT_BUFLEN; cbuf_t whichcbuf; uint32_t whichdefaultmask; uint32_t whichprependmask; uint32_t whichbuffermask; uint32_t whichconsolidatemask; char **whichbuffer; unsigned int *whichbufferlen; int wlen; int linelen; int pstate_mutex_locked = 0; int rc, rv = -1; assert(pstate); assert(pstate->magic == PSTDOUT_STATE_MAGIC); assert(pstate->p_stdout); assert(pstate->p_stderr); assert(stream); assert(stream == stdout || stream == stderr); assert(format); if (stream == stdout) { whichcbuf = pstate->p_stdout; whichdefaultmask = PSTDOUT_OUTPUT_STDOUT_DEFAULT; whichprependmask = PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME; whichbuffermask = PSTDOUT_OUTPUT_BUFFER_STDOUT; whichconsolidatemask = PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE; whichbuffer = &(pstate->buffer_stdout); whichbufferlen = &(pstate->buffer_stdout_len); } else { whichcbuf = pstate->p_stderr; whichdefaultmask = PSTDOUT_OUTPUT_STDERR_DEFAULT; whichprependmask = PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME; whichbuffermask = PSTDOUT_OUTPUT_BUFFER_STDERR; whichconsolidatemask = PSTDOUT_OUTPUT_STDERR_CONSOLIDATE; whichbuffer = &(pstate->buffer_stderr); whichbufferlen = &(pstate->buffer_stderr_len); } while (1) { va_list vacpy; if (!(buf = (char *)realloc(buf, buflen))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } memset(buf, '\0', PSTDOUT_BUFLEN); va_copy(vacpy, ap); wlen = vsnprintf(buf, buflen, format, vacpy); va_end(vacpy); if (wlen < buflen) break; buflen += PSTDOUT_BUFLEN; } if ((rc = pthread_mutex_lock(&(pstate->mutex)))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstate_mutex_locked++; /* Protect from racing output when we are in a Ctrl+C flushing * buffered output situation */ if (!internal_to_pstdout && pstate->no_more_external_output) goto cleanup; if (cbuf_write(whichcbuf, buf, wlen, NULL) < 0) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "cbuf_write: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } while (1) { if (!(linebuf = (char *)realloc(linebuf, linebuflen))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } memset(linebuf, '\0', PSTDOUT_BUFLEN); while ((linelen = cbuf_read_line (whichcbuf, linebuf, linebuflen, 1)) > 0) { if (linelen >= linebuflen) break; if (!pstate->hostname || ((pstdout_output_flags & whichdefaultmask) && !(pstdout_output_flags & whichbuffermask) && !(pstdout_output_flags & whichconsolidatemask))) { rv = fprintf(stream, "%s", linebuf); fflush(stream); } else if (pstdout_output_flags & whichprependmask && !(pstdout_output_flags & whichbuffermask) && !(pstdout_output_flags & whichconsolidatemask)) { rv = fprintf(stream, "%s: %s", pstate->hostname, linebuf); fflush(stream); } else if (((pstdout_output_flags & whichdefaultmask) && (pstdout_output_flags & whichbuffermask)) || (pstdout_output_flags & whichconsolidatemask)) { if (!(*whichbuffer = (char *)realloc(*whichbuffer, *whichbufferlen + linelen))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } /* Don't use snprintf, it will truncate b/c "snprintf and vsnprintf do not write more than size bytes (including the trailing '\0'). " */ memcpy(*whichbuffer + *whichbufferlen, linebuf, linelen); *whichbufferlen += linelen; rv = linelen; } else if ((pstdout_output_flags & whichprependmask) && (pstdout_output_flags & whichbuffermask)) { unsigned int hostname_len; unsigned int extra_len; /* + 2 is for the ": " */ hostname_len = strlen(pstate->hostname); extra_len = hostname_len + 2; if (!(*whichbuffer = (char *)realloc(*whichbuffer, *whichbufferlen + linelen + extra_len))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } /* Don't use snprintf, it will truncate b/c "snprintf and vsnprintf do not write more than size bytes (including the trailing '\0'). " */ memcpy(*whichbuffer + *whichbufferlen, pstate->hostname, hostname_len); memcpy(*whichbuffer + *whichbufferlen + hostname_len, ": ", 2); memcpy(*whichbuffer + *whichbufferlen + hostname_len + 2, linebuf, linelen); *whichbufferlen += linelen + extra_len; rv = linelen + extra_len; } else { pstdout_errnum = PSTDOUT_ERR_INTERNAL; return -1; } } if (linelen < 0) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "cbuf_read_line: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } if (!linelen) break; linebuflen += PSTDOUT_BUFLEN; } if (rv < 0) rv = 0; pstdout_errnum = PSTDOUT_ERR_SUCCESS; cleanup: if (pstate_mutex_locked) { if ((rc = pthread_mutex_unlock(&(pstate->mutex)))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } } free(buf); free(linebuf); return rv; } static void _pstdout_print_wrapper(pstdout_state_t pstate, int internal_to_pstdout, FILE *stream, const char *format, ...) { va_list ap; assert(pstate); assert(pstate->magic == PSTDOUT_STATE_MAGIC); assert(stream); assert(stream == stdout || stream == stderr); assert(format); va_start(ap, format); _pstdout_print(pstate, internal_to_pstdout, stderr, format, ap); va_end(ap); } int pstdout_printf(pstdout_state_t pstate, const char *format, ...) { va_list ap; int rv; if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return -1; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (!format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } va_start(ap, format); rv = _pstdout_print(pstate, 0, stdout, format, ap); va_end(ap); return rv; } int pstdout_vprintf(pstdout_state_t pstate, const char *format, va_list ap) { int rv; if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return -1; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (!format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } /* achu: va_list is defined by C standard as an object type, not * necessarily pointer type. So can't do NULL on ap type. No known * portable macro to test for validity of input. */ rv = _pstdout_print(pstate, 0, stdout, format, ap); return rv; } int pstdout_fprintf(pstdout_state_t pstate, FILE *stream, const char *format, ...) { va_list ap; int rv; if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return -1; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (!stream || !format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (stream != stdout && stream != stderr) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } va_start(ap, format); rv = _pstdout_print(pstate, 0, stream, format, ap); va_end(ap); return rv; } int pstdout_vfprintf(pstdout_state_t pstate, FILE *stream, const char *format, va_list ap) { int rv; if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return -1; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (!stream || !format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if (stream != stdout && stream != stderr) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } rv = _pstdout_print(pstate, 0, stream, format, ap); return rv; } void pstdout_perror(pstdout_state_t pstate, const char *s) { if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return; } if (!s) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return; } _pstdout_print_wrapper(pstate, 0, stderr, "%s: %s\n", s, strerror(errno)); } static int _pstdout_state_init(pstdout_state_t pstate, const char *hostname) { int rc; assert(pstate); memset(pstate, '\0', sizeof(struct pstdout_state)); pstate->magic = PSTDOUT_STATE_MAGIC; pstate->hostname = (char *)hostname; if (!(pstate->p_stdout = cbuf_create(PSTDOUT_STATE_CBUF_MIN, PSTDOUT_STATE_CBUF_MAX))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "cbuf_create: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; return -1; } if (!(pstate->p_stderr = cbuf_create(PSTDOUT_STATE_CBUF_MIN, PSTDOUT_STATE_CBUF_MAX))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "cbuf_create: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; return -1; } pstate->buffer_stdout = NULL; pstate->buffer_stdout_len = 0; pstate->buffer_stderr = NULL; pstate->buffer_stderr_len = 0; pstate->no_more_external_output = 0; if ((rc = pthread_mutex_init(&(pstate->mutex), NULL))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; return -1; } return 0; } static int _pstdout_output_buffer_data(pstdout_state_t pstate, FILE *stream, char **whichbuffer, unsigned int *whichbufferlen, uint32_t whichprependmask, uint32_t whichbuffermask, uint32_t whichconsolidatemask, List whichconsolidatedlist, pthread_mutex_t *whichconsolidatedmutex) { assert(pstate); assert(pstate->magic == PSTDOUT_STATE_MAGIC); assert(pstate->p_stdout); assert(pstate->p_stderr); assert(stream); assert(stream == stdout || stream == stderr); assert(whichbuffer); assert(whichbufferlen); assert(whichprependmask == PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME || whichprependmask == PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME); assert(whichbuffermask == PSTDOUT_OUTPUT_BUFFER_STDOUT || whichbuffermask == PSTDOUT_OUTPUT_BUFFER_STDERR); assert(whichconsolidatemask == PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE || whichconsolidatemask == PSTDOUT_OUTPUT_STDERR_CONSOLIDATE); assert(whichconsolidatedlist); assert(whichconsolidatedmutex); if ((*whichbuffer && *whichbufferlen) && (pstdout_output_flags & whichbuffermask || pstdout_output_flags & whichconsolidatemask)) { /* Need to write a '\0' */ if (!(*whichbuffer = (char *)realloc(*whichbuffer, *whichbufferlen + 1))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } (*whichbuffer)[*whichbufferlen] = '\0'; *whichbufferlen += 1; if (pstdout_output_flags & whichbuffermask) { if (!(pstdout_output_flags & whichprependmask)) { fprintf(stream, "----------------\n"); fprintf(stream, "%s\n", pstate->hostname); fprintf(stream, "----------------\n"); } fprintf(stream, "%s", *whichbuffer); fflush(stream); } else { struct pstdout_consolidated_data *cdata; int rc; if ((rc = pthread_mutex_lock(whichconsolidatedmutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } if (!(cdata = list_find_first(whichconsolidatedlist, _pstdout_consolidated_data_find, *whichbuffer))) { if (!(cdata = _pstdout_consolidated_data_create(pstate->hostname, *whichbuffer))) goto cleanup; if (!list_append(whichconsolidatedlist, cdata)) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "list_append: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; _pstdout_consolidated_data_destroy(cdata); goto cleanup; } } else { if (!fi_hostlist_push(cdata->h, pstate->hostname)) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "fi_hostlist_push: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } } if ((rc = pthread_mutex_unlock(whichconsolidatedmutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } } } return 0; cleanup: return -1; } static int _pstdout_output_finish(pstdout_state_t pstate) { int pstate_mutex_locked = 0; int rc, rv = -1; assert(pstate); assert(pstate->magic == PSTDOUT_STATE_MAGIC); assert(pstate->p_stdout); assert(pstate->p_stderr); if ((rc = pthread_mutex_lock(&(pstate->mutex)))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstate_mutex_locked++; /* If there is remaining junk in the cbufs, write a "\n" to it so we * finish off the line and get it flushed out. */ if (!cbuf_is_empty(pstate->p_stdout)) _pstdout_print_wrapper(pstate, 1, stdout, "\n"); if (!cbuf_is_empty(pstate->p_stderr)) _pstdout_print_wrapper(pstate, 1, stderr, "\n"); if (_pstdout_output_buffer_data(pstate, stdout, &(pstate->buffer_stdout), &(pstate->buffer_stdout_len), PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME, PSTDOUT_OUTPUT_BUFFER_STDOUT, PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE, pstdout_consolidated_stdout, &pstdout_consolidated_stdout_mutex) < 0) goto cleanup; if (_pstdout_output_buffer_data(pstate, stderr, &(pstate->buffer_stderr), &(pstate->buffer_stderr_len), PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME, PSTDOUT_OUTPUT_BUFFER_STDERR, PSTDOUT_OUTPUT_STDERR_CONSOLIDATE, pstdout_consolidated_stderr, &pstdout_consolidated_stderr_mutex) < 0) goto cleanup; /* Only output from internal to pstdout is allowed */ pstate->no_more_external_output = 1; rv = 0; cleanup: if (pstate_mutex_locked) { if ((rc = pthread_mutex_unlock(&(pstate->mutex)))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } } return rv; } static void _pstdout_state_cleanup(pstdout_state_t pstate) { assert(pstate); assert(pstate->magic == PSTDOUT_STATE_MAGIC); if (pstate->p_stdout) cbuf_destroy(pstate->p_stdout); if (pstate->p_stderr) cbuf_destroy(pstate->p_stderr); free(pstate->buffer_stdout); free(pstate->buffer_stderr); memset(pstate, '\0', sizeof(struct pstdout_state)); } static void * _pstdout_func_entry(void *arg) { struct pstdout_thread_data *tdata = NULL; struct pstdout_state pstate; int rc; tdata = (struct pstdout_thread_data *)arg; if (_pstdout_state_init(&pstate, tdata->hostname) < 0) goto cleanup; if ((rc = pthread_mutex_lock(&pstdout_states_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } if (!list_append(pstdout_states, &pstate)) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "list_append: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; pthread_mutex_unlock(&pstdout_states_mutex); goto cleanup; } if ((rc = pthread_mutex_unlock(&pstdout_states_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } tdata->exit_code = (tdata->pstdout_func)(&pstate, tdata->hostname, tdata->arg); if (_pstdout_output_finish(&pstate) < 0) goto cleanup; cleanup: pthread_mutex_lock(&pstdout_states_mutex); list_delete_all(pstdout_states, _pstdout_states_delete_pointer, &pstate); pthread_mutex_unlock(&pstdout_states_mutex); _pstdout_state_cleanup(&pstate); pthread_mutex_lock(&pstdout_threadcount_mutex); pstdout_threadcount--; pthread_cond_signal(&pstdout_threadcount_cond); pthread_mutex_unlock(&pstdout_threadcount_mutex); return NULL; } static int _pstdout_output_consolidated(FILE *stream, List whichconsolidatedlist, pthread_mutex_t *whichconsolidatedmutex) { struct pstdout_consolidated_data *cdata; ListIterator itr = NULL; int mutex_locked = 0; int rc, rv = -1; assert(stream); assert(stream == stdout || stream == stderr); assert(whichconsolidatedlist); assert(whichconsolidatedmutex); if ((rc = pthread_mutex_lock(whichconsolidatedmutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } mutex_locked++; list_sort(whichconsolidatedlist, _pstdout_consolidated_data_compare); if (!(itr = list_iterator_create (whichconsolidatedlist))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } while ((cdata = list_next(itr))) { char hbuf[PSTDOUT_BUFLEN + 1]; memset(hbuf, '\0', PSTDOUT_BUFLEN + 1); fi_hostlist_sort(cdata->h); if (fi_hostlist_ranged_string(cdata->h, PSTDOUT_BUFLEN, hbuf) < 0) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "fi_hostlist_ranged_string: %s\n", strerror(errno)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } fprintf(stream, "----------------\n"); fprintf(stream, "%s\n", hbuf); fprintf(stream, "----------------\n"); fprintf(stream, "%s", cdata->output); } rv = 0; cleanup: if (mutex_locked) { if ((rc = pthread_mutex_unlock(whichconsolidatedmutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } } if (itr) list_iterator_destroy(itr); return rv; } static int _pstdout_output_consolidated_finish(void) { /* Output consolidated data */ if (pstdout_output_flags & PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE) { if (_pstdout_output_consolidated(stdout, pstdout_consolidated_stdout, &pstdout_consolidated_stdout_mutex) < 0) goto cleanup; } if (pstdout_output_flags & PSTDOUT_OUTPUT_STDERR_CONSOLIDATE) { if (_pstdout_output_consolidated(stderr, pstdout_consolidated_stderr, &pstdout_consolidated_stderr_mutex) < 0) goto cleanup; } return 0; cleanup: return -1; } static int _pstdout_sigint_finish_output(void *x, void *arg) { struct pstdout_state *pstate; assert(x); pstate = (struct pstdout_state *)x; if (_pstdout_output_finish(pstate) < 0) return -1; /* The no_more_external_output flag set in _pstdout_output_finish() * protects from extraneous extra output from other threads after * this output. */ if (pstate->hostname && (pstdout_output_flags & PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME) && !(pstdout_output_flags & PSTDOUT_OUTPUT_BUFFER_STDOUT) && !(pstdout_output_flags & PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE)) { fprintf(stdout, "%s: exiting session\n", pstate->hostname); fflush(stdout); } /* Note: there isn't a race with any remaining threads and the below * output, b/c the _pstdout_output_finish() outputs buffered data or * puts the remaining data into the consolidated output list. Any extra * output from the user cannot be outputted. */ if (pstate->hostname && (pstdout_output_flags & PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME) && (pstdout_output_flags & PSTDOUT_OUTPUT_BUFFER_STDOUT)) { if ((pstate->buffer_stdout && pstate->buffer_stdout_len) || (pstate->buffer_stderr && pstate->buffer_stderr_len)) fprintf(stdout, "%s: exiting session: current output flushed\n", pstate->hostname); else fprintf(stdout, "%s: exiting session\n", pstate->hostname); fflush(stdout); } if (pstdout_output_flags & PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE) { if ((pstate->buffer_stdout && pstate->buffer_stdout_len) || (pstate->buffer_stderr && pstate->buffer_stderr_len)) fprintf(stdout, "%s: exiting session: current output consolidated\n", pstate->hostname); else fprintf(stdout, "%s: exiting session\n", pstate->hostname); } return 0; } void _pstdout_sigint(int s) { int rc; /* This is a last ditch effort, so no need to worry if we don't get * a lock or get an error or whatever. */ if ((rc = pthread_mutex_lock(&pstdout_states_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "fi_hostlist_ranged_string: %s\n", strerror(rc)); } if (list_for_each(pstdout_states, _pstdout_sigint_finish_output, NULL) < 0) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "list_for_each: %s\n", strerror(errno)); } _pstdout_output_consolidated_finish(); exit (EXIT_FAILURE); } int pstdout_launch(const char *hostnames, Pstdout_Thread pstdout_func, void *arg) { struct pstdout_thread_data **tdata = NULL; struct pstdout_state pstate; unsigned int pstate_init = 0; fi_hostlist_iterator_t hitr = NULL; fi_hostlist_t h = NULL; int h_count = 0; char *host = NULL; int exit_code = -1; sighandler_t sighandler_save = NULL; int sighandler_set = 0; int rc; int i; if (!pstdout_initialized) { pstdout_errnum = PSTDOUT_ERR_UNINITIALIZED; return -1; } if (!pstdout_func) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } if ((rc = pthread_mutex_lock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } /* Special case */ if (!hostnames) { if (_pstdout_state_init(&pstate, NULL) < 0) goto cleanup; pstate_init++; exit_code = pstdout_func(&pstate, NULL, arg); pstdout_errnum = PSTDOUT_ERR_SUCCESS; goto cleanup; } if (!(h = fi_hostlist_create(hostnames))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } h_count = fi_hostlist_count(h); /* Sanity check */ if (h_count <= 0) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "h_count = %d\n", h_count); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } /* Special case */ if (h_count == 1) { if (_pstdout_state_init(&pstate, hostnames) < 0) goto cleanup; pstate_init++; exit_code = pstdout_func(&pstate, hostnames, arg); pstdout_errnum = PSTDOUT_ERR_SUCCESS; goto cleanup; } if ((sighandler_save = signal(SIGINT, _pstdout_sigint)) == SIG_ERR) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "signal\n"); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } sighandler_set++; if (!(hitr = fi_hostlist_iterator_create(h))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } if (!(tdata = (struct pstdout_thread_data **)malloc(sizeof(struct pstdout_thread_data *) * h_count))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } memset(tdata, '\0', sizeof(struct pstdout_thread_data *) * h_count); i = 0; while ((host = fi_hostlist_next(hitr))) { if (!(tdata[i] = (struct pstdout_thread_data *)malloc(sizeof(struct pstdout_thread_data)))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } memset(tdata[i], '\0', sizeof(struct pstdout_thread_data)); if (!(tdata[i]->hostname = strdup(host))) { pstdout_errnum = PSTDOUT_ERR_OUTMEM; goto cleanup; } tdata[i]->pstdout_func = pstdout_func; tdata[i]->arg = arg; if ((rc = pthread_attr_init(&(tdata[i]->attr)))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_attr_init: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } if ((rc = pthread_attr_setdetachstate(&(tdata[i]->attr), PTHREAD_CREATE_DETACHED))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_attr_setdetachstate: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } free(host); i++; } host = NULL; fi_hostlist_iterator_destroy(hitr); hitr = NULL; fi_hostlist_destroy(h); h = NULL; /* Launch threads up to fanout */ for (i = 0; i < h_count; i++) { if ((rc = pthread_mutex_lock(&pstdout_threadcount_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } if (pstdout_threadcount == pstdout_fanout) { if ((rc = pthread_cond_wait(&pstdout_threadcount_cond, &pstdout_threadcount_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_cond_wait: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } } if ((rc = pthread_create(&(tdata[i]->tid), &(tdata[i]->attr), _pstdout_func_entry, (void *) tdata[i]))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_create: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } pstdout_threadcount++; if ((rc = pthread_mutex_unlock(&pstdout_threadcount_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } } /* Wait for Threads to finish */ if ((rc = pthread_mutex_lock(&pstdout_threadcount_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_lock: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } while (pstdout_threadcount > 0) { if ((rc = pthread_cond_wait(&pstdout_threadcount_cond, &pstdout_threadcount_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_cond_wait: %s\n", strerror(rc)); pstdout_errnum = PSTDOUT_ERR_INTERNAL; goto cleanup; } } if (_pstdout_output_consolidated_finish() < 0) goto cleanup; /* Determine exit code */ exit_code = 0; for (i = 0; i < h_count; i++) { if (tdata[i]->exit_code > exit_code) exit_code = tdata[i]->exit_code; } cleanup: /* Cannot pass NULL for key, so just pass dummy key */ list_delete_all(pstdout_consolidated_stdout, _pstdout_consolidated_data_delete_all, ""); list_delete_all(pstdout_consolidated_stderr, _pstdout_consolidated_data_delete_all, ""); if (pstate_init) _pstdout_state_cleanup(&pstate); if (tdata) { for (i = 0; i < h_count; i++) { if (tdata[i]) { free(tdata[i]->hostname); pthread_attr_destroy(&(tdata[i]->attr)); free(tdata[i]); } } free(tdata); } if (hitr) fi_hostlist_iterator_destroy(hitr); if (h) fi_hostlist_destroy(h); free(host); if ((rc = pthread_mutex_unlock(&pstdout_launch_mutex))) { if (pstdout_debug_flags & PSTDOUT_DEBUG_STANDARD) fprintf(stderr, "pthread_mutex_unlock: %s\n", strerror(rc)); /* Don't change error code, just move on */ } if (sighandler_set) signal(SIGINT, sighandler_save); return exit_code; } int PSTDOUT_PRINTF(pstdout_state_t pstate, const char *format, ...) { va_list ap; int rv; if (!format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } va_start(ap, format); if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC || !pstdout_initialized) rv = vprintf(format, ap); else rv = _pstdout_print(pstate, 0, stdout, format, ap); va_end(ap); return rv; } int PSTDOUT_FPRINTF(pstdout_state_t pstate, FILE *stream, const char *format, ...) { va_list ap; int rv; if (!stream || !format) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return -1; } va_start(ap, format); if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC || (stream != stdout && stream != stderr) || !pstdout_initialized) rv = vfprintf(stream, format, ap); else rv = _pstdout_print(pstate, 0, stream, format, ap); va_end(ap); return rv; } void PSTDOUT_PERROR(pstdout_state_t pstate, const char *s) { if (!s) { pstdout_errnum = PSTDOUT_ERR_PARAMETERS; return; } if (!pstate || pstate->magic != PSTDOUT_STATE_MAGIC || !pstdout_initialized) fprintf(stderr, "%s: %s\n", s, strerror(errno)); else _pstdout_print_wrapper(pstate, 0, stderr, "%s: %s\n", s, strerror(errno)); } freeipmi-1.6.4/common/toolcommon/pstdout.h0000644002055400205540000002360013527331635020614 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: pstdout.h,v 1.7 2010-02-10 01:27:44 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-227589 * * This file is part of pstdout, a library used to launch and manage * the standard output of multiple threads. For details, see * http://www.llnl.gov/linux/. * * Pstdout is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Pstdout is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Pstdout. If not, see . \*****************************************************************************/ #ifndef PSTDOUT_H #define PSTDOUT_H /* * Pstdout is a library/tool to launch and manage multiple threads, * each dealing with a different host. It will also manage the * "parallel" standard output from the launched threads. * * The idea for pstdout came from the pdsh and dshbak. (See * http://sourceforge.net/projects/pdsh/ or * http://www.llnl.gov/linux/pdsh/). The tool (or code in pdsh) could * not be directly used for all projects, thus this library was * developed to emulate its functionality. Some of the same basic * code/algorithms from pdsh have been re-used here. * * The general code structure using this library is as follows: * * call pstdout_init() * call pstdout_set_output_flags() if non-defaults needed * call pstdout_set_fanout() if non-defaults needed * call pstdout_lauch() to launch parallel threads * - within callback functions replace printf/fprintf/perror calls * with pstdout equivalent calls. */ #include #include /* * Error Codes */ #define PSTDOUT_ERR_SUCCESS 0 #define PSTDOUT_ERR_UNINITIALIZED 1 #define PSTDOUT_ERR_PARAMETERS 2 #define PSTDOUT_ERR_OUTMEM 3 #define PSTDOUT_ERR_INTERNAL 4 #define PSTDOUT_ERR_ERRNUMRANGE 5 /* * Debug Flags * * PSTDOUT_DEBUG_NONE - No debug output * * PSTDOUT_DEBUG_STANDARD - Output occasional debug info to stderr. */ #define PSTDOUT_DEBUG_NONE 0x00000001 #define PSTDOUT_DEBUG_STANDARD 0x00000002 #define PSTDOUT_DEBUG_MASK 0x00000003 /* * Output Flags * * PSTDOUT_OUTPUT_STDOUT_DEFAULT/PSTDOUT_OUTPUT_STDERR_DEFAULT - * Output stdout/stderr like normal * * PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME/PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME * - Prepend the hostname to each line of output. For example, * "host1: foo output". Conflicts with PSTDOUT_OUTPUT_STDOUT/STDERR_DEFAULT. * * One of PSTDOUT_OUTPUT_STDOUT_DEFAULT and * PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME must always be set. One of * PSTDOUT_OUTPUT_STDERR_DEFAULT and * PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME must always be set. * * PSTDOUT_OUTPUT_BUFFER_STDOUT/PSTDOUT_OUTPUT_BUFFER_STDERR - Do not * output stdout/stderr as each line is output. Buffer the output and * output it all at once right before the thread terminates. Can work * in conjunction with PSTDOUT_OUTPUT_STDOUT/STDERR_PREPEND_HOSTNAME. * * PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE/PSTDOUT_OUTPUT_STDERR_CONSOLIDATE * - Do not output stdout/stderr until all threads have been executed. * Consolidate output so that matching output from different nodes are * not output twice. Conflicts with * PSTDOUT_OUTPUT_STDOUT/STDERR_PREPEND_HOSTNAME and * PSTDOUT_OUTPUT_BUFFER_STDOUT/STDERR. * */ #define PSTDOUT_OUTPUT_STDOUT_DEFAULT 0x00000001 #define PSTDOUT_OUTPUT_STDERR_DEFAULT 0x00000002 #define PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME 0x00000004 #define PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME 0x00000008 #define PSTDOUT_OUTPUT_BUFFER_STDOUT 0x00000010 #define PSTDOUT_OUTPUT_BUFFER_STDERR 0x00000020 #define PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE 0x00000040 #define PSTDOUT_OUTPUT_STDERR_CONSOLIDATE 0x00000080 #define PSTDOUT_OUTPUT_MASK 0x000000FF /* * Fanout default, min, and max */ #define PSTDOUT_FANOUT_DEFAULT 64 #define PSTDOUT_FANOUT_MIN 1 #define PSTDOUT_FANOUT_MAX 1024 /* pstdout_errnum * * Will be set to the most recently set pstdout error */ extern int pstdout_errnum; /* pstdout_state_t * * Maintains parallel stdout information. Will be passed to each * thread that is launched via 'pstdout_launch' and must be passed to * each call of 'pstdout_printf', 'pstdout_fprintf' or * 'pstdout_perror'. */ typedef struct pstdout_state *pstdout_state_t; /* Pstdout_Thread * * Function prototype of the function that pstdout will launch. * Passed to 'pstdout_launch'. * * Returns the exit code for this thread. */ typedef int (*Pstdout_Thread)(pstdout_state_t pstate, const char *hostname, void *arg); /* pstdout_init * * Must be called before most pstdout API functions can be called. */ int pstdout_init(void); /* pstdout_strerror * * Returns statically defined string describing the error code. */ char *pstdout_strerror(int errnum); /* pstdout_set_debug_flags * * Set the current debug flags. * * Returns 0 on success, -1 on error */ int pstdout_set_debug_flags(unsigned int flags); /* pstdout_get_debug_flags * * Returns current debug flags. */ int pstdout_get_debug_flags(void); /* pstdout_set_output_flags * * Set the current output flags. * * Returns 0 on success, -1 on error */ int pstdout_set_output_flags(unsigned int flags); /* pstdout_get_output_flags * * Returns current output flags. */ int pstdout_get_output_flags(void); /* pstdout_set_fanout * * Set the current fanout. The fanout is the largest number of * threads that can be launched simultaneously by 'pstdout_launch'. * * Returns 0 on success, -1 on error */ int pstdout_set_fanout(unsigned int fanout); /* pstdout_get_fanout * * Returns current fanout. */ int pstdout_get_fanout(void); /* pstdout_hostnames_count * * Count the number of hosts specified by hostnames. Primarily a * utility function to allow client writers to determine what output * flags they wish to set. * * Returns number of hostnames on success, -1 on error. */ int pstdout_hostnames_count(const char *hostnames); /* pstdout_printf * * Parallel standard output. Should only be called by a thread * executed by 'pstdout_launch'. * * Returns number of characters printed, -1 on error. * * Note that the return value of number of characters printed may be * 0, because data is being buffered for output on a later * pstdout_printf call. */ int pstdout_printf(pstdout_state_t pstate, const char *format, ...); /* pstdout_vprintf * * Parallel standard output. Should only be called by a thread * executed by 'pstdout_launch'. * * Returns number of characters printed, -1 on error. * * Note that the return value of number of characters printed may be * 0, because data is being buffered for output on a later * pstdout_printf call. */ int pstdout_vprintf(pstdout_state_t pstate, const char *format, va_list ap); /* pstdout_fprintf * * Parallel file stream output. Should only be called by a thread * executed by 'pstdout_launch'. Currently will only work with stdout * and stderr. * * Returns number of characters printed, -1 on error. * * Note that the return value of number of characters printed may be * 0, because data is being buffered for output on a later * pstdout_fprintf call. */ int pstdout_fprintf(pstdout_state_t pstate, FILE *stream, const char *format, ...); /* pstdout_vfprintf * * Parallel file stream output. Should only be called by a thread * executed by 'pstdout_launch'. Currently will only work with stdout * and stderr. * * Returns number of characters printed, -1 on error. * * Note that the return value of number of characters printed may be * 0, because data is being buffered for output on a later * pstdout_fprintf call. */ int pstdout_vfprintf(pstdout_state_t pstate, FILE *stream, const char *format, va_list ap); /* pstdout_perror * * Parallel perror. Should only be called by a thread executed by * 'pstdout_launch'. */ void pstdout_perror(pstdout_state_t pstate, const char *s); /* pstdout_launch * * Primary thread launching function of the library. It will launch * no more than 'fanout' threads at the same time, launching new * threads after old ones have completed. Will handle all standard output * buffering or consolidation that is required. * * Returns: Largest exit code returned from all threads launched. */ int pstdout_launch(const char *hostnames, Pstdout_Thread pstdout_func, void *arg); /* PSTDOUT_PRINTF * * Identical to 'pstdout_printf', but will call standard printf() if an invalid * pstate is passed in (e.g. a NULL pstate) or the library is not initialized. */ int PSTDOUT_PRINTF(pstdout_state_t pstate, const char *format, ...); /* PSTDOUT_FPRINTF * * Identical to 'pstdout_fprintf', but will call standard fprintf() if * an invalid pstate or stream is passed in (e.g. a NULL pstate) or * the library is not initialized. */ int PSTDOUT_FPRINTF(pstdout_state_t pstate, FILE *stream, const char *format, ...); /* PSTDOUT_PERROR * * Identical to 'pstdout_perror', but will call standard perror() if * an invalid pstate is passed in (e.g. a NULL pstate) or the library * is not initialized. */ void PSTDOUT_PERROR(pstdout_state_t pstate, const char *s); #endif /* PSTDOUT_H */ freeipmi-1.6.4/common/toolcommon/tool-common.c0000644002055400205540000002334613527331635021357 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include "tool-common.h" #include "tool-util-common.h" #include "parse-common.h" #include "freeipmi-portability.h" #include "network.h" ipmi_ctx_t ipmi_open (const char *progname, const char *hostname, struct common_cmd_args *common_args, pstdout_state_t pstate, unsigned int flags) { ipmi_ctx_t ipmi_ctx = NULL; unsigned int workaround_flags = 0; assert (progname); assert (common_args); if (!(ipmi_ctx = ipmi_ctx_create ())) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_create: %s", strerror (errno)); goto cleanup; } if (hostname && !host_is_localhost (hostname)) { if (common_args->driver_type == IPMI_DEVICE_LAN_2_0) { parse_get_freeipmi_outofband_2_0_flags (common_args->workaround_flags_outofband_2_0, &workaround_flags); if (ipmi_ctx_open_outofband_2_0 (ipmi_ctx, hostname, common_args->username, common_args->password, (common_args->k_g_len) ? common_args->k_g : NULL, (common_args->k_g_len) ? common_args->k_g_len : 0, common_args->privilege_level, common_args->cipher_suite_id, common_args->session_timeout, common_args->retransmission_timeout, workaround_flags, flags | ((common_args->debug) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT)) < 0) { if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_USERNAME_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_K_G_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_IPMI_2_0_UNAVAILABLE || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT) PSTDOUT_FPRINTF (pstate, stderr, "%s: %s\n", progname, ipmi_ctx_errormsg (ipmi_ctx)); else PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_open_outofband_2_0: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } } else { parse_get_freeipmi_outofband_flags (common_args->workaround_flags_outofband, &workaround_flags); if (ipmi_ctx_open_outofband (ipmi_ctx, hostname, common_args->username, common_args->password, common_args->authentication_type, common_args->privilege_level, common_args->session_timeout, common_args->retransmission_timeout, workaround_flags, flags | ((common_args->debug) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT)) < 0) { if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_USERNAME_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID || ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT) PSTDOUT_FPRINTF (pstate, stderr, "%s: %s\n", progname, ipmi_ctx_errormsg (ipmi_ctx)); else PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_open_outofband: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } } } else { if (!ipmi_is_root ()) { PSTDOUT_FPRINTF (pstate, stderr, "%s: %s\n", progname, ipmi_ctx_strerror (IPMI_ERR_PERMISSION)); goto cleanup; } parse_get_freeipmi_inband_flags (common_args->workaround_flags_inband, &workaround_flags); if (common_args->driver_type == IPMI_DEVICE_UNKNOWN) { int ret; if ((ret = ipmi_ctx_find_inband (ipmi_ctx, NULL, common_args->disable_auto_probe, common_args->driver_address, common_args->register_spacing, common_args->driver_device, workaround_flags, flags | ((common_args->debug) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT))) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_find_inband: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } if (!ret) { PSTDOUT_FPRINTF (pstate, stderr, "could not find inband device\n"); goto cleanup; } } else { if (ipmi_ctx_open_inband (ipmi_ctx, common_args->driver_type, common_args->disable_auto_probe, common_args->driver_address, common_args->register_spacing, common_args->driver_device, workaround_flags, flags | ((common_args->debug) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT)) < 0) { if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_DEVICE_NOT_FOUND) PSTDOUT_FPRINTF (pstate, stderr, "%s: %s\n", progname, ipmi_ctx_errormsg (ipmi_ctx)); else PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_open_inband: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } } } if (common_args->target_channel_number_is_set || common_args->target_slave_address_is_set) { if (ipmi_ctx_set_target (ipmi_ctx, common_args->target_channel_number_is_set ? &common_args->target_channel_number : NULL, common_args->target_slave_address_is_set ? &common_args->target_slave_address : NULL) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_ctx_set_target: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } } return (ipmi_ctx); cleanup: ipmi_ctx_close (ipmi_ctx); ipmi_ctx_destroy (ipmi_ctx); return (NULL); } freeipmi-1.6.4/common/toolcommon/tool-common.h0000644002055400205540000000214213527331635021353 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_COMMON_H #define TOOL_COMMON_H #include #include #include "tool-cmdline-common.h" #include "pstdout.h" ipmi_ctx_t ipmi_open (const char *progname, const char *hostname, struct common_cmd_args *common_args, pstdout_state_t pstate, unsigned int flags); #endif /* TOOL_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-config-file-common.c0000644002055400205540000044257213527331635023545 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi-portability.h" #include "parse-common.h" #include "pstdout.h" #include "tool-config-file-common.h" #include "tool-sensor-common.h" #define CONFIG_FILE_OPTIONS_MAX 1024 struct common_cmd_args_config { char *username; int username_set; int tool_option_username_set; char *password; int password_set; int tool_option_password_set; uint8_t k_g[IPMI_MAX_K_G_LENGTH+1]; unsigned int k_g_len; int k_g_set; int tool_option_k_g_set; int authentication_type; int authentication_type_set; int tool_option_authentication_type_set; int cipher_suite_id; int cipher_suite_id_set; int tool_option_cipher_suite_id_set; int privilege_level; int privilege_level_set; int tool_option_privilege_level_set; unsigned int workaround_flags_outofband; unsigned int workaround_flags_outofband_2_0; unsigned int workaround_flags_inband; unsigned int workaround_flags_sdr; unsigned int section_specific_workaround_flags; int workaround_flags_set; int tool_option_workaround_flags_set; /* for internal parsing check */ }; static int _config_file_bool (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int *bool; assert (data); assert (optionname); assert (option_ptr); bool = (int *)option_ptr; *bool = data->boolval; return (0); } static int _config_file_uint8 (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { uint8_t *value; assert (data); assert (optionname); assert (option_ptr); value = (uint8_t *)option_ptr; if (data->intval < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } #if 0 /* Presently unused, remove to remove compiler warning, leave for potential future use */ static int _config_file_non_negative_int (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int *value; assert (data); assert (optionname); assert (option_ptr); value = (int *)option_ptr; if (data->intval < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } #endif static int _config_file_positive_int (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int *value; assert (data); assert (optionname); assert (option_ptr); value = (int *)option_ptr; if (data->intval <= 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_percent_int (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (optionname); assert (option_ptr); value = (unsigned int *)option_ptr; if (data->intval < 0 || data->intval > 100) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_unsigned_int (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (optionname); assert (option_ptr); value = (unsigned int *)option_ptr; if (data->intval < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_positive_unsigned_int (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (optionname); assert (option_ptr); value = (unsigned int *)option_ptr; if (data->intval <= 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_string (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { char **value; assert (data); assert (optionname); assert (option_ptr); value = (char **)option_ptr; if (!(*value = strdup (data->string))) { perror ("strdup"); exit (EXIT_FAILURE); } return (0); } static int _config_file_driver_type (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args *common_args; int tmp; assert (data); assert (optionname); assert (option_ptr); common_args = (struct common_cmd_args *)option_ptr; if ((tmp = parse_driver_type (data->string)) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } /* don't change default if we want outofband configuration only */ if (common_args->driver_type_outofband_only && (tmp == IPMI_DEVICE_LAN || tmp == IPMI_DEVICE_LAN_2_0)) common_args->driver_type = tmp; else common_args->driver_type = tmp; return (0); } static int _config_file_username (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_username_set) return (0); if (strlen (data->string) > IPMI_MAX_USER_NAME_LENGTH) { fprintf (stderr, "Config File Error: %s value too long\n", optionname); exit (EXIT_FAILURE); } if (!(common_cmd_args_config->username = strdup (data->string))) { perror ("strdup"); exit (EXIT_FAILURE); } common_cmd_args_config->username_set++; return (0); } static int _config_file_password (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_password_set) return (0); if (strlen (data->string) > IPMI_2_0_MAX_PASSWORD_LENGTH) { fprintf (stderr, "Config File Error: %s value too long\n", optionname); exit (EXIT_FAILURE); } if (!(common_cmd_args_config->password = strdup (data->string))) { perror ("strdup"); exit (EXIT_FAILURE); } common_cmd_args_config->password_set++; return (0); } static int _config_file_k_g (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int rv; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_k_g_set) return (0); if ((rv = parse_kg (common_cmd_args_config->k_g, IPMI_MAX_K_G_LENGTH, data->string)) < 0) { fprintf (stderr, "Config File Error: k_g input formatted incorrectly\n"); exit (EXIT_FAILURE); } if (rv > 0) common_cmd_args_config->k_g_len = rv; common_cmd_args_config->k_g_set++; return (0); } static int _config_file_authentication_type (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int tmp; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_authentication_type_set) return (0); if ((tmp = parse_authentication_type (data->string)) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->authentication_type = tmp; common_cmd_args_config->authentication_type_set++; return (0); } static int _config_file_cipher_suite_id (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_cipher_suite_id_set) return (0); if (data->intval < IPMI_CIPHER_SUITE_ID_MIN || data->intval > IPMI_CIPHER_SUITE_ID_MAX) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } if (!IPMI_CIPHER_SUITE_ID_SUPPORTED (data->intval)) { fprintf (stderr, "Config File Error: unsupported value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->cipher_suite_id = data->intval; common_cmd_args_config->cipher_suite_id_set++; return (0); } static int _config_file_privilege_level (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int tmp; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_privilege_level_set) return (0); if ((tmp = parse_privilege_level (data->string)) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->privilege_level = tmp; common_cmd_args_config->privilege_level_set++; return (0); } static int _config_file_workaround_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; unsigned int i; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->tool_option_workaround_flags_set) return (0); common_cmd_args_config->workaround_flags_outofband = 0; common_cmd_args_config->workaround_flags_outofband_2_0 = 0; common_cmd_args_config->workaround_flags_inband = 0; common_cmd_args_config->workaround_flags_sdr = 0; common_cmd_args_config->section_specific_workaround_flags = 0; for (i = 0; i < data->stringlist_len; i++) { unsigned int outofband_flags, outofband_2_0_flags, inband_flags, sdr_flags, section_flags; if (parse_workaround_flags (data->stringlist[i], &outofband_flags, &outofband_2_0_flags, &inband_flags, &sdr_flags, §ion_flags) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } if (outofband_flags || outofband_2_0_flags || inband_flags || sdr_flags || section_flags) { common_cmd_args_config->workaround_flags_outofband |= outofband_flags; common_cmd_args_config->workaround_flags_outofband_2_0 |= outofband_2_0_flags; common_cmd_args_config->workaround_flags_inband |= inband_flags; common_cmd_args_config->workaround_flags_sdr |= sdr_flags; common_cmd_args_config->section_specific_workaround_flags |= section_flags; common_cmd_args_config->workaround_flags_set++; } } return (0); } static int _config_file_tool_option_username (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (strlen (data->string) > IPMI_MAX_USER_NAME_LENGTH) { fprintf (stderr, "Config File Error: %s value too long\n", optionname); exit (EXIT_FAILURE); } if (common_cmd_args_config->username_set) free (common_cmd_args_config->username); if (!(common_cmd_args_config->username = strdup (data->string))) { perror ("strdup"); exit (EXIT_FAILURE); } common_cmd_args_config->username_set++; common_cmd_args_config->tool_option_username_set++; return (0); } static int _config_file_tool_option_password (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (strlen (data->string) > IPMI_2_0_MAX_PASSWORD_LENGTH) { fprintf (stderr, "Config File Error: %s value too long\n", optionname); exit (EXIT_FAILURE); } if (common_cmd_args_config->password_set) free (common_cmd_args_config->password); if (!(common_cmd_args_config->password = strdup (data->string))) { perror ("strdup"); exit (EXIT_FAILURE); } common_cmd_args_config->password_set++; common_cmd_args_config->tool_option_password_set++; return (0); } static int _config_file_tool_option_k_g (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int rv; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (common_cmd_args_config->k_g_set) memset (common_cmd_args_config->k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); if ((rv = parse_kg (common_cmd_args_config->k_g, IPMI_MAX_K_G_LENGTH, data->string)) < 0) { fprintf (stderr, "Config File Error: k_g input formatted incorrectly\n"); exit (EXIT_FAILURE); } if (rv > 0) common_cmd_args_config->k_g_len = rv; common_cmd_args_config->k_g_set++; common_cmd_args_config->tool_option_k_g_set++; return (0); } static int _config_file_tool_option_authentication_type (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int tmp; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if ((tmp = parse_authentication_type (data->string)) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->authentication_type = tmp; common_cmd_args_config->authentication_type_set++; common_cmd_args_config->tool_option_authentication_type_set++; return (0); } static int _config_file_tool_option_cipher_suite_id (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if (data->intval < IPMI_CIPHER_SUITE_ID_MIN || data->intval > IPMI_CIPHER_SUITE_ID_MAX || !IPMI_CIPHER_SUITE_ID_SUPPORTED (data->intval)) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->cipher_suite_id = data->intval; common_cmd_args_config->cipher_suite_id_set++; common_cmd_args_config->tool_option_cipher_suite_id_set++; return (0); } static int _config_file_tool_option_privilege_level (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; int tmp; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; if ((tmp = parse_privilege_level (data->string)) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_cmd_args_config->privilege_level = tmp; common_cmd_args_config->privilege_level_set++; common_cmd_args_config->tool_option_privilege_level_set++; return (0); } static int _config_file_tool_option_workaround_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args_config *common_cmd_args_config; unsigned int i; assert (data); assert (optionname); assert (option_ptr); common_cmd_args_config = (struct common_cmd_args_config *)option_ptr; common_cmd_args_config->workaround_flags_outofband = 0; common_cmd_args_config->workaround_flags_outofband_2_0 = 0; common_cmd_args_config->workaround_flags_inband = 0; common_cmd_args_config->workaround_flags_sdr = 0; common_cmd_args_config->section_specific_workaround_flags = 0; for (i = 0; i < data->stringlist_len; i++) { unsigned int outofband_flags, outofband_2_0_flags, inband_flags, sdr_flags, section_flags; if (parse_workaround_flags (data->stringlist[i], &outofband_flags, &outofband_2_0_flags, &inband_flags, &sdr_flags, §ion_flags) < 0) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } if (outofband_flags || outofband_2_0_flags || inband_flags || sdr_flags || section_flags) { common_cmd_args_config->workaround_flags_outofband |= outofband_flags; common_cmd_args_config->workaround_flags_outofband_2_0 |= outofband_2_0_flags; common_cmd_args_config->workaround_flags_inband |= inband_flags; common_cmd_args_config->workaround_flags_sdr |= sdr_flags; common_cmd_args_config->section_specific_workaround_flags |= section_flags; common_cmd_args_config->workaround_flags_set++; common_cmd_args_config->tool_option_workaround_flags_set++; } } return (0); } static int _config_file_utc_offset (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int *value; assert (data); assert (optionname); assert (option_ptr); value = (int *)option_ptr; if (!IPMI_UTC_OFFSET_VALID (data->intval)) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_fanout (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args *common_args; assert (data); assert (optionname); assert (option_ptr); common_args = (struct common_cmd_args *)option_ptr; if (data->intval < PSTDOUT_FANOUT_MIN || data->intval > PSTDOUT_FANOUT_MAX) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_args->fanout = data->intval; return (0); } static int _config_file_sensor_types (struct conffile_data *data, char *optionname, char sensor_types[][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int *sensor_types_length) { unsigned int i; assert (data); assert (optionname); assert (sensor_types); assert (sensor_types_length); if (data->stringlist_len > CONFIG_FILE_MAX_SENSOR_TYPES) { fprintf (stderr, "Config File Error: invalid number of arguments for %s\n", optionname); exit (EXIT_FAILURE); } for (i = 0; i < data->stringlist_len; i++) { if (strlen (data->stringlist[i]) > CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH) { fprintf (stderr, "Config File Error: invalid value '%s' for %s\n", data->stringlist[i], optionname); exit (EXIT_FAILURE); } strncpy (sensor_types[i], data->stringlist[i], CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); (*sensor_types_length)++; } return (0); } static int _config_file_ipmi_sel_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sel *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sel *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->sensor_types, &(config_file_data->sensor_types_length))); } static int _config_file_ipmi_sel_exclude_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sel *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sel *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->exclude_sensor_types, &(config_file_data->exclude_sensor_types_length))); } static int _config_file_sensor_record_ids (struct conffile_data *data, char *optionname, unsigned int *record_ids, unsigned int *record_ids_length) { unsigned int i; assert (data); assert (optionname); assert (record_ids); assert (record_ids_length); if (data->intlist_len > CONFIG_FILE_MAX_SENSOR_RECORD_IDS) { fprintf (stderr, "Config File Error: invalid number of arguments for %s\n", optionname); exit (EXIT_FAILURE); } for (i = 0; i < data->intlist_len; i++) { if (data->intlist[i] < 0 || data->intlist[i] > IPMI_SDR_RECORD_ID_LAST) { fprintf (stderr, "Config File Error: invalid value '%d' for %s\n", data->intlist[i], optionname); exit (EXIT_FAILURE); } record_ids[i] = (unsigned int)data->intlist[i]; (*record_ids_length)++; } return (0); } static int _config_file_ipmi_sensors_record_ids (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sensors *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sensors *)option_ptr; return (_config_file_sensor_record_ids (data, optionname, config_file_data->record_ids, &(config_file_data->record_ids_length))); } static int _config_file_ipmi_sensors_exclude_record_ids (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sensors *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sensors *)option_ptr; return (_config_file_sensor_record_ids (data, optionname, config_file_data->exclude_record_ids, &(config_file_data->exclude_record_ids_length))); } static int _config_file_ipmi_sensors_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sensors *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sensors *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->sensor_types, &(config_file_data->sensor_types_length))); } static int _config_file_ipmi_sensors_exclude_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmi_sensors *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmi_sensors *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->exclude_sensor_types, &(config_file_data->exclude_sensor_types_length))); } static int _config_file_ipmiconsole_escape_char (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { char *chr; assert (data); assert (optionname); assert (option_ptr); chr = (char *)option_ptr; *chr = data->string[0]; return (0); } static int _config_file_ipmiconsole_sol_payload_instance (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (optionname); assert (option_ptr); value = (unsigned int *)option_ptr; if (!IPMI_PAYLOAD_INSTANCE_VALID (data->intval)) { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } *value = data->intval; return (0); } static int _config_file_ipmipower_ipmi_version (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct common_cmd_args *common_args; int tmp; assert (data); assert (optionname); assert (option_ptr); common_args = (struct common_cmd_args *)option_ptr; if (!strcasecmp (data->string, "1.5")) tmp = IPMI_DEVICE_LAN; else if (!strcasecmp (data->string, "2.0")) tmp = IPMI_DEVICE_LAN_2_0; else { fprintf (stderr, "Config File Error: invalid value for %s\n", optionname); exit (EXIT_FAILURE); } common_args->driver_type = tmp; return (0); } static int _config_file_ipmiseld_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmiseld *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmiseld *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->sensor_types, &(config_file_data->sensor_types_length))); } static int _config_file_ipmiseld_exclude_sensor_types (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct config_file_data_ipmiseld *config_file_data; assert (data); assert (optionname); assert (option_ptr); config_file_data = (struct config_file_data_ipmiseld *)option_ptr; return (_config_file_sensor_types (data, optionname, config_file_data->exclude_sensor_types, &(config_file_data->exclude_sensor_types_length))); } static void _ignore_options (struct conffile_option *options, unsigned int options_len) { unsigned int i; assert (options); assert (options_len); for (i = 0; i < options_len; i++) options[i].option_type = CONFFILE_OPTION_IGNORE; } static void _copy_options (struct conffile_option *to_options, unsigned int to_options_len, struct conffile_option *from_options, unsigned int from_options_len) { unsigned int i; assert (to_options); assert (from_options); assert (from_options_len); /* note: can't memcpy .. sigh .. wish I did this in C++ w/ a copy constructor */ for (i = 0; i < from_options_len; i++) { to_options[to_options_len + i].optionname = from_options[i].optionname; to_options[to_options_len + i].option_type = from_options[i].option_type; to_options[to_options_len + i].option_type_arg = from_options[i].option_type_arg; to_options[to_options_len + i].callback_func = from_options[i].callback_func; to_options[to_options_len + i].max_count = from_options[i].max_count; to_options[to_options_len + i].required_count = from_options[i].required_count; to_options[to_options_len + i].count_ptr = from_options[i].count_ptr; to_options[to_options_len + i].option_ptr = from_options[i].option_ptr; to_options[to_options_len + i].option_data = from_options[i].option_data; } } int config_file_parse (const char *filename, int no_error_if_not_found, struct common_cmd_args *common_args, unsigned int support, unsigned int tool_support, void *tool_data) { struct conffile_option config_file_options[CONFIG_FILE_OPTIONS_MAX]; unsigned int config_file_options_len = 0; int driver_type_count = 0, workaround_flags_count = 0; int disable_auto_probe_count = 0, driver_address_count = 0, driver_device_count = 0, register_spacing_count = 0, target_channel_number_count = 0, target_slave_address_count = 0; int username_count = 0, password_count = 0, k_g_count = 0, session_timeout_count = 0, retransmission_timeout_count = 0, authentication_type_count = 0, cipher_suite_id_count = 0, privilege_level_count = 0; int quiet_cache_count = 0, sdr_cache_directory_count = 0; int utc_to_localtime_count = 0, localtime_to_utc_count = 0, utc_offset_count = 0; int buffer_output_count = 0, consolidate_output_count = 0, fanout_count = 0, eliminate_count = 0, always_prefix_count = 0; int bmc_device_username_count = 0, bmc_device_password_count = 0, bmc_device_k_g_count = 0, bmc_device_authentication_type_count = 0, bmc_device_cipher_suite_id_count = 0, bmc_device_privilege_level_count = 0, bmc_device_workaround_flags_count = 0; int bmc_info_username_count = 0, bmc_info_password_count = 0, bmc_info_k_g_count = 0, bmc_info_authentication_type_count = 0, bmc_info_cipher_suite_id_count = 0, bmc_info_privilege_level_count = 0, bmc_info_workaround_flags_count = 0; int bmc_watchdog_workaround_flags_count = 0; int ipmi_chassis_username_count = 0, ipmi_chassis_password_count = 0, ipmi_chassis_k_g_count = 0, ipmi_chassis_authentication_type_count = 0, ipmi_chassis_cipher_suite_id_count = 0, ipmi_chassis_privilege_level_count = 0, ipmi_chassis_workaround_flags_count = 0; int ipmi_config_username_count = 0, ipmi_config_password_count = 0, ipmi_config_k_g_count = 0, ipmi_config_authentication_type_count = 0, ipmi_config_cipher_suite_id_count = 0, ipmi_config_privilege_level_count = 0, ipmi_config_workaround_flags_count = 0; int ipmi_dcmi_username_count = 0, ipmi_dcmi_password_count = 0, ipmi_dcmi_k_g_count = 0, ipmi_dcmi_authentication_type_count = 0, ipmi_dcmi_cipher_suite_id_count = 0, ipmi_dcmi_privilege_level_count = 0, ipmi_dcmi_workaround_flags_count = 0; int ipmi_fru_username_count = 0, ipmi_fru_password_count = 0, ipmi_fru_k_g_count = 0, ipmi_fru_authentication_type_count = 0, ipmi_fru_cipher_suite_id_count = 0, ipmi_fru_privilege_level_count = 0, ipmi_fru_workaround_flags_count = 0; int ipmi_oem_username_count = 0, ipmi_oem_password_count = 0, ipmi_oem_k_g_count = 0, ipmi_oem_authentication_type_count = 0, ipmi_oem_cipher_suite_id_count = 0, ipmi_oem_privilege_level_count = 0, ipmi_oem_workaround_flags_count = 0; int ipmi_pet_username_count = 0, ipmi_pet_password_count = 0, ipmi_pet_k_g_count = 0, ipmi_pet_authentication_type_count = 0, ipmi_pet_cipher_suite_id_count = 0, ipmi_pet_privilege_level_count = 0, ipmi_pet_workaround_flags_count = 0; int ipmi_raw_username_count = 0, ipmi_raw_password_count = 0, ipmi_raw_k_g_count = 0, ipmi_raw_authentication_type_count = 0, ipmi_raw_cipher_suite_id_count = 0, ipmi_raw_privilege_level_count = 0, ipmi_raw_workaround_flags_count = 0; int ipmi_sel_username_count = 0, ipmi_sel_password_count = 0, ipmi_sel_k_g_count = 0, ipmi_sel_authentication_type_count = 0, ipmi_sel_cipher_suite_id_count = 0, ipmi_sel_privilege_level_count = 0, ipmi_sel_workaround_flags_count = 0; int ipmi_sensors_username_count = 0, ipmi_sensors_password_count = 0, ipmi_sensors_k_g_count = 0, ipmi_sensors_authentication_type_count = 0, ipmi_sensors_cipher_suite_id_count = 0, ipmi_sensors_privilege_level_count = 0, ipmi_sensors_workaround_flags_count = 0; int ipmiconsole_username_count = 0, ipmiconsole_password_count = 0, ipmiconsole_k_g_count = 0, ipmiconsole_authentication_type_count = 0, ipmiconsole_cipher_suite_id_count = 0, ipmiconsole_privilege_level_count = 0, ipmiconsole_workaround_flags_count = 0; int ipmipower_username_count = 0, ipmipower_password_count = 0, ipmipower_k_g_count = 0, ipmipower_authentication_type_count = 0, ipmipower_cipher_suite_id_count = 0, ipmipower_privilege_level_count = 0, ipmipower_workaround_flags_count = 0; struct config_file_data_bmc_info bmc_info_data; struct config_file_data_bmc_info *bmc_info_data_ptr; struct config_file_data_bmc_watchdog bmc_watchdog_data; struct config_file_data_bmc_watchdog *bmc_watchdog_data_ptr; struct config_file_data_ipmi_config ipmi_config_data; struct config_file_data_ipmi_config *ipmi_config_data_ptr; struct config_file_data_ipmi_dcmi ipmi_dcmi_data; struct config_file_data_ipmi_dcmi *ipmi_dcmi_data_ptr; struct config_file_data_ipmi_fru ipmi_fru_data; struct config_file_data_ipmi_fru *ipmi_fru_data_ptr; struct config_file_data_ipmi_oem ipmi_oem_data; struct config_file_data_ipmi_oem *ipmi_oem_data_ptr; struct config_file_data_ipmi_pet ipmi_pet_data; struct config_file_data_ipmi_pet *ipmi_pet_data_ptr; struct config_file_data_ipmi_sel ipmi_sel_data; struct config_file_data_ipmi_sel *ipmi_sel_data_ptr; struct config_file_data_ipmi_sensors ipmi_sensors_data; struct config_file_data_ipmi_sensors *ipmi_sensors_data_ptr; struct config_file_data_ipmiconsole ipmiconsole_data; struct config_file_data_ipmiconsole *ipmiconsole_data_ptr; struct config_file_data_ipmipower ipmipower_data; struct config_file_data_ipmipower *ipmipower_data_ptr; struct config_file_data_ipmiseld ipmiseld_data; struct config_file_data_ipmiseld *ipmiseld_data_ptr; struct common_cmd_args_config common_cmd_args_config; struct conffile_option inband_and_outofband_options[] = { { "driver-type", CONFFILE_OPTION_STRING, -1, _config_file_driver_type, 1, 0, &driver_type_count, common_args, 0 }, { "workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_workaround_flags, 1, 0, &workaround_flags_count, &common_cmd_args_config, 0 } }; struct conffile_option inband_options[] = { { "disable-auto-probe", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &disable_auto_probe_count, &(common_args->disable_auto_probe), 0 }, { "driver-address", CONFFILE_OPTION_INT, -1, _config_file_positive_int, 1, 0, &driver_address_count, &(common_args->driver_address), 0 }, { "driver-device", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &driver_device_count, &(common_args->driver_device), 0 }, { "register-spacing", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, ®ister_spacing_count, &(common_args->register_spacing), 0 }, { "target-channel-number", CONFFILE_OPTION_INT, -1, _config_file_uint8, 1, 0, &target_channel_number_count, &(common_args->target_channel_number), 0 }, { "target-slave-address", CONFFILE_OPTION_INT, -1, _config_file_uint8, 1, 0, &target_slave_address_count, &(common_args->target_slave_address), 0 }, }; struct conffile_option outofband_options[] = { { "username", CONFFILE_OPTION_STRING, -1, _config_file_username, 1, 0, &username_count, &common_cmd_args_config, 0, }, { "password", CONFFILE_OPTION_STRING, -1, _config_file_password, 1, 0, &password_count, &common_cmd_args_config, 0, }, { "k_g", CONFFILE_OPTION_STRING, -1, _config_file_k_g, 1, 0, &k_g_count, &common_cmd_args_config, 0, }, /* timeout maintained for backwards compatability */ { "timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &session_timeout_count, &(common_args->session_timeout), 0 }, { "session-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &session_timeout_count, &(common_args->session_timeout), 0 }, /* retry-timeout maintained for backwards compatability */ { "retry-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &retransmission_timeout_count, &(common_args->retransmission_timeout), 0 }, { "retransmission-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &retransmission_timeout_count, &(common_args->retransmission_timeout), 0 }, { "authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_authentication_type, 1, 0, &authentication_type_count, &common_cmd_args_config, 0, }, /* cipher_suite_id (underscored) maintained for backwards compatability */ { "cipher_suite_id", CONFFILE_OPTION_INT, -1, _config_file_cipher_suite_id, 1, 0, &cipher_suite_id_count, &common_cmd_args_config, 0, }, { "cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_cipher_suite_id, 1, 0, &cipher_suite_id_count, &common_cmd_args_config, 0, }, /* privilege maintained for backwards compatability */ { "privilege", CONFFILE_OPTION_STRING, -1, _config_file_privilege_level, 1, 0, &privilege_level_count, &common_cmd_args_config, 0, }, { "privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_privilege_level, 1, 0, &privilege_level_count, &common_cmd_args_config, 0, }, }; struct conffile_option sdr_options[] = { { "quiet-cache", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &quiet_cache_count, &(common_args->quiet_cache), 0 }, { "sdr-cache-directory", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &sdr_cache_directory_count, &(common_args->sdr_cache_directory), 0 }, }; struct conffile_option time_options[] = { { "utc-to-localtime", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &utc_to_localtime_count, &(common_args->utc_to_localtime), 0 }, { "localtime-to-utc", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &localtime_to_utc_count, &(common_args->localtime_to_utc), 0 }, { "utc-offset", CONFFILE_OPTION_BOOL, -1, _config_file_utc_offset, 1, 0, &utc_offset_count, &(common_args->utc_offset), 0 }, }; struct conffile_option hostrange_options[] = { { "buffer-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &buffer_output_count, &(common_args->consolidate_output), 0 }, { "consolidate-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &consolidate_output_count, &(common_args->consolidate_output), 0 }, { "fanout", CONFFILE_OPTION_INT, -1, _config_file_fanout, 1, 0, &fanout_count, common_args, 0 }, { "eliminate", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &eliminate_count, &(common_args->eliminate), 0 }, { "always-prefix", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &always_prefix_count, &(common_args->always_prefix), 0 }, }; /* * Tool Config Options */ /* * bmc-device */ struct conffile_option bmc_device_options[] = { { "bmc-device-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &bmc_device_username_count, &common_cmd_args_config, 0, }, { "bmc-device-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &bmc_device_password_count, &common_cmd_args_config, 0, }, { "bmc-device-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &bmc_device_k_g_count, &common_cmd_args_config, 0, }, { "bmc-device-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &bmc_device_authentication_type_count, &common_cmd_args_config, 0, }, { "bmc-device-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &bmc_device_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "bmc-device-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &bmc_device_privilege_level_count, &common_cmd_args_config, 0, }, { "bmc-device-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &bmc_device_workaround_flags_count, &common_cmd_args_config, 0 }, }; /* * bmc-info */ struct conffile_option bmc_info_options[] = { { "bmc-info-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &bmc_info_username_count, &common_cmd_args_config, 0, }, { "bmc-info-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &bmc_info_password_count, &common_cmd_args_config, 0, }, { "bmc-info-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &bmc_info_k_g_count, &common_cmd_args_config, 0, }, { "bmc-info-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &bmc_info_authentication_type_count, &common_cmd_args_config, 0, }, { "bmc-info-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &bmc_info_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "bmc-info-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &bmc_info_privilege_level_count, &common_cmd_args_config, 0, }, { "bmc-info-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &bmc_info_workaround_flags_count, &common_cmd_args_config, 0 }, { "bmc-info-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(bmc_info_data.interpret_oem_data_count), &(bmc_info_data.interpret_oem_data), 0, }, }; /* * bmc-watchdog */ struct conffile_option bmc_watchdog_options[] = { { "bmc-watchdog-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &bmc_watchdog_workaround_flags_count, &common_cmd_args_config, 0 }, /* deprecated */ { "bmc-watchdog-logfile", CONFFILE_OPTION_IGNORE, -1, _config_file_string, 1, 0, &(bmc_watchdog_data.logfile_count), &(bmc_watchdog_data.logfile), 0 }, { "bmc-watchdog-verbose-logging", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(bmc_watchdog_data.verbose_logging_count), &(bmc_watchdog_data.verbose_logging), 0, }, { "bmc-watchdog-no-logging", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(bmc_watchdog_data.no_logging_count), &(bmc_watchdog_data.no_logging), 0, }, }; /* * ipmi-chassis */ struct conffile_option ipmi_chassis_options[] = { { "ipmi-chassis-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_chassis_username_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_chassis_password_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_chassis_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_chassis_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_chassis_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_chassis_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-chassis-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_chassis_workaround_flags_count, &common_cmd_args_config, 0 }, }; /* * ipmi-config */ struct conffile_option ipmi_config_options[] = { { "ipmi-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, { "ipmi-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, { "ipmi-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to bmc-config */ { "bmc-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy backwards compatability to bmc-config */ { "bmc-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy backwards compatability to ipmi-chassis-config */ { "ipmi-chassis-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to pef-config */ { "pef-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy backwards compatability to pef-config */ { "pef-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy backwards compatability to ipmi-pef-config */ { "ipmi-pef-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_config_username_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_config_password_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_config_k_g_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_config_authentication_type_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_config_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_config_privilege_level_count, &common_cmd_args_config, 0, }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_config_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy backwards compatability to ipmi-sensors-config */ { "ipmi-sensors-config-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_config_data.verbose_count_count), &(ipmi_config_data.verbose_count), 0, }, }; /* * ipmi-dcmi */ struct conffile_option ipmi_dcmi_options[] = { { "ipmi-dcmi-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_dcmi_username_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_dcmi_password_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_dcmi_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_dcmi_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_dcmi_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_dcmi_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-dcmi-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_dcmi_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-dcmi-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_dcmi_data.interpret_oem_data_count), &(ipmi_dcmi_data.interpret_oem_data), 0, }, }; /* * ipmi-fru */ struct conffile_option ipmi_fru_options[] = { { "ipmi-fru-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_fru_username_count, &common_cmd_args_config, 0, }, { "ipmi-fru-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_fru_password_count, &common_cmd_args_config, 0, }, { "ipmi-fru-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_fru_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-fru-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_fru_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-fru-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_fru_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-fru-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_fru_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-fru-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_fru_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-fru-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_fru_data.verbose_count_count), &(ipmi_fru_data.verbose_count), 0, }, /* legacy - maintain for backwards compatability */ { "ipmi-fru-skip-checks", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_fru_data.skip_checks_count), &(ipmi_fru_data.skip_checks), 0, }, { "ipmi-fru-bridge-fru", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_fru_data.bridge_fru_count), &(ipmi_fru_data.bridge_fru), 0, }, { "ipmi-fru-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_fru_data.interpret_oem_data_count), &(ipmi_fru_data.interpret_oem_data), 0, }, }; /* * ipmi-oem */ struct conffile_option ipmi_oem_options[] = { { "ipmi-oem-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_oem_username_count, &common_cmd_args_config, 0, }, { "ipmi-oem-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_oem_password_count, &common_cmd_args_config, 0, }, { "ipmi-oem-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_oem_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-oem-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_oem_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-oem-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_oem_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-oem-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_oem_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-oem-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_oem_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-oem-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_oem_data.verbose_count_count), &(ipmi_oem_data.verbose_count), 0, }, }; /* * ipmi-raw */ struct conffile_option ipmi_raw_options[] = { { "ipmi-raw-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_raw_username_count, &common_cmd_args_config, 0, }, { "ipmi-raw-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_raw_password_count, &common_cmd_args_config, 0, }, { "ipmi-raw-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_raw_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-raw-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_raw_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-raw-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_raw_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-raw-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_raw_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-raw-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_raw_workaround_flags_count, &common_cmd_args_config, 0 }, }; /* * ipmi-pet */ struct conffile_option ipmi_pet_options[] = { { "ipmi-pet-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_pet_username_count, &common_cmd_args_config, 0, }, { "ipmi-pet-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_pet_password_count, &common_cmd_args_config, 0, }, { "ipmi-pet-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_pet_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-pet-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_pet_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-pet-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_pet_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-pet-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_pet_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-pet-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_pet_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-pet-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_pet_data.verbose_count_count), &(ipmi_pet_data.verbose_count), 0, }, { "ipmi-pet-output-output-event-severity", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.output_event_severity_count), &(ipmi_pet_data.output_event_severity), 0, }, { "ipmi-pet-output-output-event-state", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.output_event_state_count), &(ipmi_pet_data.output_event_state), 0, }, { "ipmi-pet-event-state-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmi_pet_data.event_state_config_file_count), &(ipmi_pet_data.event_state_config_file), 0, }, { "ipmi-pet-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.interpret_oem_data_count), &(ipmi_pet_data.interpret_oem_data), 0, }, { "ipmi-pet-entity-sensor-names", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.entity_sensor_names_count), &(ipmi_pet_data.entity_sensor_names), 0, }, { "ipmi-pet-no-sensor-type-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.no_sensor_type_output_count), &(ipmi_pet_data.no_sensor_type_output), 0, }, { "ipmi-pet-comma-separated-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.comma_separated_output_count), &(ipmi_pet_data.comma_separated_output), 0, }, { "ipmi-pet-no-header-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.no_header_output_count), &(ipmi_pet_data.no_header_output), 0, }, { "ipmi-pet-non-abbreviated-units", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_pet_data.non_abbreviated_units_count), &(ipmi_pet_data.non_abbreviated_units), 0, }, }; /* * ipmi-sel */ struct conffile_option ipmi_sel_options[] = { { "ipmi-sel-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_sel_username_count, &common_cmd_args_config, 0, }, { "ipmi-sel-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_sel_password_count, &common_cmd_args_config, 0, }, { "ipmi-sel-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_sel_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-sel-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_sel_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-sel-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_sel_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-sel-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_sel_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-sel-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_sel_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-sel-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_sel_data.verbose_count_count), &(ipmi_sel_data.verbose_count), 0, }, { "ipmi-sel-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sel_sensor_types, 1, 0, &(ipmi_sel_data.sensor_types_count), &(ipmi_sel_data), 0, }, { "ipmi-sel-exclude-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sel_exclude_sensor_types, 1, 0, &(ipmi_sel_data.exclude_sensor_types_count), &(ipmi_sel_data), 0, }, { "ipmi-sel-system-event-only", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.system_event_only_count), &(ipmi_sel_data.system_event_only), 0, }, { "ipmi-sel-oem-event-only", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.oem_event_only_count), &(ipmi_sel_data.oem_event_only), 0, }, { "ipmi-sel-output-manufacturer-id", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.output_manufacturer_id_count), &(ipmi_sel_data.output_manufacturer_id), 0, }, { "ipmi-sel-output-output-event-state", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.output_event_state_count), &(ipmi_sel_data.output_event_state), 0, }, { "ipmi-sel-event-state-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmi_sel_data.event_state_config_file_count), &(ipmi_sel_data.event_state_config_file), 0, }, /* legacy - maintain for backwards compatability */ { "ipmi-sel-assume-system-event-records", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.assume_system_event_records_count), &(ipmi_sel_data.assume_system_event_records), 0, }, { "ipmi-sel-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.interpret_oem_data_count), &(ipmi_sel_data.interpret_oem_data), 0, }, { "ipmi-sel-output-oem-event-strings", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.output_oem_event_strings_count), &(ipmi_sel_data.output_oem_event_strings), 0, }, { "ipmi-sel-entity-sensor-names", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.entity_sensor_names_count), &(ipmi_sel_data.entity_sensor_names), 0, }, { "ipmi-sel-no-sensor-type-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.no_sensor_type_output_count), &(ipmi_sel_data.no_sensor_type_output), 0, }, { "ipmi-sel-comma-separated-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.comma_separated_output_count), &(ipmi_sel_data.comma_separated_output), 0, }, { "ipmi-sel-no-header-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.no_header_output_count), &(ipmi_sel_data.no_header_output), 0, }, { "ipmi-sel-non-abbreviated-units", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.non_abbreviated_units_count), &(ipmi_sel_data.non_abbreviated_units), 0, }, { "ipmi-sel-legacy-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sel_data.legacy_output_count), &(ipmi_sel_data.legacy_output), 0, }, }; /* * ipmi-sensors */ struct conffile_option ipmi_sensors_options[] = { { "ipmi-sensors-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_sensors_username_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_sensors_password_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_sensors_k_g_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_sensors_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_sensors_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_sensors_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmi-sensors-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_sensors_workaround_flags_count, &common_cmd_args_config, 0 }, { "ipmi-sensors-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_sensors_data.verbose_count_count), &(ipmi_sensors_data.verbose_count), 0, }, { "ipmi-sensors-quiet-readings", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.quiet_readings_count), &(ipmi_sensors_data.quiet_readings), 0, }, { "ipmi-sensors-record-ids", CONFFILE_OPTION_LIST_INT, -1, _config_file_ipmi_sensors_record_ids, 1, 0, &(ipmi_sensors_data.record_ids_count), &(ipmi_sensors_data), 0, }, { "ipmi-sensors-exclude-record-ids", CONFFILE_OPTION_LIST_INT, -1, _config_file_ipmi_sensors_exclude_record_ids, 1, 0, &(ipmi_sensors_data.exclude_record_ids_count), &(ipmi_sensors_data), 0, }, /* maintained for backwards compatability */ { "ipmi-sensors-groups", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_sensor_types, 1, 0, &(ipmi_sensors_data.sensor_types_count), &(ipmi_sensors_data), 0, }, /* maintained for backwards compatability */ { "ipmi-sensors-exclude-groups", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_exclude_sensor_types, 1, 0, &(ipmi_sensors_data.exclude_sensor_types_count), &(ipmi_sensors_data), 0, }, { "ipmi-sensors-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_sensor_types, 1, 0, &(ipmi_sensors_data.sensor_types_count), &(ipmi_sensors_data), 0, }, { "ipmi-sensors-exclude-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_exclude_sensor_types, 1, 0, &(ipmi_sensors_data.exclude_sensor_types_count), &(ipmi_sensors_data), 0, }, { "ipmi-sensors-bridge-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.bridge_sensors_count), &(ipmi_sensors_data.bridge_sensors), 0, }, { "ipmi-sensors-shared-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.shared_sensors_count), &(ipmi_sensors_data.shared_sensors), 0, }, { "ipmi-sensors-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.interpret_oem_data_count), &(ipmi_sensors_data.interpret_oem_data), 0, }, { "ipmi-sensors-ignore-not-available-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.ignore_not_available_sensors_count), &(ipmi_sensors_data.ignore_not_available_sensors), 0, }, { "ipmi-sensors-ignore-unrecognized-events", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.ignore_unrecognized_events_count), &(ipmi_sensors_data.ignore_unrecognized_events), 0, }, { "ipmi-sensors-output-event-bitmask", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.output_event_bitmask_count), &(ipmi_sensors_data.output_event_bitmask), 0, }, { "ipmi-sensors-output-sensor-state", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.output_sensor_state_count), &(ipmi_sensors_data.output_sensor_state), 0, }, { "ipmi-sensors-sensor-state-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmi_sensors_data.sensor_state_config_file_count), &(ipmi_sensors_data.sensor_state_config_file), 0, }, /* legacy - ipmimonitoring option */ { "ipmi-sensors-sensor-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmi_sensors_data.sensor_state_config_file_count), &(ipmi_sensors_data.sensor_state_config_file), 0 }, { "ipmi-sensors-entity-sensor-names", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.entity_sensor_names_count), &(ipmi_sensors_data.entity_sensor_names), 0, }, { "ipmi-sensors-output-sensor-thresholds", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.output_sensor_thresholds_count), &(ipmi_sensors_data.output_sensor_thresholds), 0, }, { "ipmi-sensors-no-sensor-type-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.no_sensor_type_output_count), &(ipmi_sensors_data.no_sensor_type_output), 0, }, { "ipmi-sensors-comma-separated-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.comma_separated_output_count), &(ipmi_sensors_data.comma_separated_output), 0, }, { "ipmi-sensors-no-header-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.no_header_output_count), &(ipmi_sensors_data.no_header_output), 0, }, { "ipmi-sensors-non-abbreviated-units", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.non_abbreviated_units_count), &(ipmi_sensors_data.non_abbreviated_units), 0, }, { "ipmi-sensors-legacy-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.legacy_output_count), &(ipmi_sensors_data.legacy_output), 0, }, { "ipmi-sensors-ipmimonitoring-legacy-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.ipmimonitoring_legacy_output_count), &(ipmi_sensors_data.ipmimonitoring_legacy_output), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmi_sensors_username_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmi_sensors_password_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmi_sensors_k_g_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmi_sensors_authentication_type_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmi_sensors_cipher_suite_id_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmi_sensors_privilege_level_count, &common_cmd_args_config, 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmi_sensors_workaround_flags_count, &common_cmd_args_config, 0 }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-quiet-readings", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.quiet_readings_count), &(ipmi_sensors_data.quiet_readings), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-record-ids", CONFFILE_OPTION_LIST_INT, -1, _config_file_ipmi_sensors_record_ids, 1, 0, &(ipmi_sensors_data.record_ids_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-exclude-record-ids", CONFFILE_OPTION_LIST_INT, -1, _config_file_ipmi_sensors_exclude_record_ids, 1, 0, &(ipmi_sensors_data.exclude_record_ids_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ /* maintained for backwards compatability */ { "ipmimonitoring-groups", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_sensor_types, 1, 0, &(ipmi_sensors_data.sensor_types_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ /* maintained for backwards compatability */ { "ipmimonitoring-exclude-groups", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_exclude_sensor_types, 1, 0, &(ipmi_sensors_data.exclude_sensor_types_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_sensor_types, 1, 0, &(ipmi_sensors_data.sensor_types_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-exclude-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmi_sensors_exclude_sensor_types, 1, 0, &(ipmi_sensors_data.exclude_sensor_types_count), &(ipmi_sensors_data), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-bridge-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.bridge_sensors_count), &(ipmi_sensors_data.bridge_sensors), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-shared-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.shared_sensors_count), &(ipmi_sensors_data.shared_sensors), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.interpret_oem_data_count), &(ipmi_sensors_data.interpret_oem_data), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-ignore-non-interpretable-sensors", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.ignore_not_available_sensors_count), &(ipmi_sensors_data.ignore_not_available_sensors), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmi_sensors_data.verbose_count_count), &(ipmi_sensors_data.verbose_count), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-entity-sensor-names", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.entity_sensor_names_count), &(ipmi_sensors_data.entity_sensor_names), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-no-sensor-type-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.no_sensor_type_output_count), &(ipmi_sensors_data.no_sensor_type_output), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-comma-separated-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.comma_separated_output_count), &(ipmi_sensors_data.comma_separated_output), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-no-header-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.no_header_output_count), &(ipmi_sensors_data.no_header_output), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-non-abbreviated-units", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.non_abbreviated_units_count), &(ipmi_sensors_data.non_abbreviated_units), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-legacy-output", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmi_sensors_data.ipmimonitoring_legacy_output_count), &(ipmi_sensors_data.ipmimonitoring_legacy_output), 0, }, /* backwards compatability to ipmimonitoring */ { "ipmimonitoring-sensor-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmi_sensors_data.sensor_state_config_file_count), &(ipmi_sensors_data.sensor_state_config_file), 0 }, }; /* * ipmiconsole */ /* Notes: * * deactivate option is not useful for config files. */ struct conffile_option ipmiconsole_options[] = { { "ipmiconsole-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmiconsole_username_count, &common_cmd_args_config, 0, }, { "ipmiconsole-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmiconsole_password_count, &common_cmd_args_config, 0, }, { "ipmiconsole-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmiconsole_k_g_count, &common_cmd_args_config, 0, }, { "ipmiconsole-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmiconsole_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmiconsole-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmiconsole_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmiconsole-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmiconsole_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmiconsole-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmiconsole_workaround_flags_count, &common_cmd_args_config, 0 }, /* legacy - no ipmiconsole prefix */ { "escape-char", CONFFILE_OPTION_STRING, -1, _config_file_ipmiconsole_escape_char, 1, 0, &(ipmiconsole_data.escape_char_count), &(ipmiconsole_data.escape_char), 0 }, { "ipmiconsole-escape-char", CONFFILE_OPTION_STRING, -1, _config_file_ipmiconsole_escape_char, 1, 0, &(ipmiconsole_data.escape_char_count), &(ipmiconsole_data.escape_char), 0 }, /* legacy - no ipmiconsole prefix */ { "dont-steal", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.dont_steal_count), &(ipmiconsole_data.dont_steal), 0, }, { "ipmiconsole-dont-steal", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.dont_steal_count), &(ipmiconsole_data.dont_steal), 0, }, { "ipmiconsole-serial-keepalive", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.serial_keepalive_count), &(ipmiconsole_data.serial_keepalive), 0, }, { "ipmiconsole-serial-keepalive-empty", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.serial_keepalive_empty_count), &(ipmiconsole_data.serial_keepalive_empty), 0, }, { "ipmiconsole-sol-payload-instance", CONFFILE_OPTION_STRING, -1, _config_file_ipmiconsole_sol_payload_instance, 1, 0, &(ipmiconsole_data.sol_payload_instance_count), &(ipmiconsole_data.sol_payload_instance), 0 }, { "ipmiconsole-deactivate-all-instances", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.deactivate_all_instances_count), &(ipmiconsole_data.deactivate_all_instances), 0, }, /* legacy - no ipmiconsole prefix */ { "lock-memory", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.lock_memory_count), &(ipmiconsole_data.lock_memory), 0, }, { "ipmiconsole-lock-memory", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiconsole_data.lock_memory_count), &(ipmiconsole_data.lock_memory), 0, }, }; /* * ipmipower */ struct conffile_option ipmipower_options[] = { { "ipmipower-username", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_username, 1, 0, &ipmipower_username_count, &common_cmd_args_config, 0, }, { "ipmipower-password", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_password, 1, 0, &ipmipower_password_count, &common_cmd_args_config, 0, }, { "ipmipower-k_g", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_k_g, 1, 0, &ipmipower_k_g_count, &common_cmd_args_config, 0, }, { "ipmipower-authentication-type", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_authentication_type, 1, 0, &ipmipower_authentication_type_count, &common_cmd_args_config, 0, }, { "ipmipower-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_tool_option_cipher_suite_id, 1, 0, &ipmipower_cipher_suite_id_count, &common_cmd_args_config, 0, }, { "ipmipower-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_tool_option_privilege_level, 1, 0, &ipmipower_privilege_level_count, &common_cmd_args_config, 0, }, { "ipmipower-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_tool_option_workaround_flags, 1, 0, &ipmipower_workaround_flags_count, &common_cmd_args_config, 0 }, /* ipmi-version maintained for backwards compatability */ { "ipmi-version", CONFFILE_OPTION_STRING, -1, _config_file_ipmipower_ipmi_version, 1, 0, &driver_type_count, common_args, 0 }, /* legacy - no ipmipower prefix */ { "on-if-off", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.on_if_off_count), &(ipmipower_data.on_if_off), 0 }, { "ipmipower-on-if-off", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.on_if_off_count), &(ipmipower_data.on_if_off), 0 }, /* legacy - no ipmipower prefix */ { "wait-until-on", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.wait_until_on_count), &(ipmipower_data.wait_until_on), 0 }, { "ipmipower-wait-until-on", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.wait_until_on_count), &(ipmipower_data.wait_until_on), 0 }, /* legacy - no ipmipower prefix */ { "wait-until-off", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.wait_until_off_count), &(ipmipower_data.wait_until_off), 0 }, { "ipmipower-wait-until-off", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmipower_data.wait_until_off_count), &(ipmipower_data.wait_until_off), 0 }, { "ipmipower-oem-power-type", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmipower_data.oem_power_type_str_count), &(ipmipower_data.oem_power_type_str), 0, }, /* retry-wait-timeout for backwards comptability */ { "retry-wait-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_wait_timeout_count), &(ipmipower_data.retransmission_wait_timeout), 0 }, /* legacy - no ipmipower prefix */ { "retransmission-wait-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_wait_timeout_count), &(ipmipower_data.retransmission_wait_timeout), 0 }, { "ipmipower-retransmission-wait-timeout", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_wait_timeout_count), &(ipmipower_data.retransmission_wait_timeout), 0 }, /* retry-backoff-count for backwards compatability */ { "retry-backoff-count", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_backoff_count_count), &(ipmipower_data.retransmission_backoff_count), 0 }, /* legacy - no ipmipower prefix */ { "retransmission-backoff-count", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_backoff_count_count), &(ipmipower_data.retransmission_backoff_count), 0 }, { "ipmipower-retransmission-backoff-count", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmipower_data.retransmission_backoff_count_count), &(ipmipower_data.retransmission_backoff_count), 0 }, /* legacy - no ipmipower prefix */ { "ping-interval", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_interval_count), &(ipmipower_data.ping_interval), 0 }, { "ipmipower-ping-interval", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_interval_count), &(ipmipower_data.ping_interval), 0 }, /* legacy - no ipmipower prefix */ { "ping-timeout", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_timeout_count), &(ipmipower_data.ping_timeout), 0 }, { "ipmipower-ping-timeout", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_timeout_count), &(ipmipower_data.ping_timeout), 0 }, /* legacy - no ipmipower prefix */ { "ping-packet-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_packet_count_count), &(ipmipower_data.ping_packet_count), 0 }, { "ipmipower-ping-packet-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_packet_count_count), &(ipmipower_data.ping_packet_count), 0 }, /* legacy - no ipmipower prefix */ { "ping-percent", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_percent_count), &(ipmipower_data.ping_percent), 0 }, { "ipmipower-ping-percent", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_percent_count), &(ipmipower_data.ping_percent), 0 }, /* legacy - no ipmipower prefix */ { "ping-consec-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_consec_count_count), &(ipmipower_data.ping_consec_count), 0 }, { "ipmipower-ping-consec-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmipower_data.ping_consec_count_count), &(ipmipower_data.ping_consec_count), 0 }, }; /* * ipmiseld */ struct conffile_option ipmiseld_options[] = { { "hostname", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.hostname_count), &(ipmiseld_data.hostname), }, { "verbose-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int, 1, 0, &(ipmiseld_data.verbose_count_count), &(ipmiseld_data.verbose_count), 0, }, { "sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmiseld_sensor_types, 1, 0, &(ipmiseld_data.sensor_types_count), &(ipmiseld_data), 0, }, { "exclude-sensor-types", CONFFILE_OPTION_LIST_STRING, -1, _config_file_ipmiseld_exclude_sensor_types, 1, 0, &(ipmiseld_data.exclude_sensor_types_count), &(ipmiseld_data), 0, }, { "system-event-only", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.system_event_only_count), &(ipmiseld_data.system_event_only), 0, }, { "oem-event-only", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.oem_event_only_count), &(ipmiseld_data.oem_event_only), 0, }, { "event-state-config-file", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.event_state_config_file_count), &(ipmiseld_data.event_state_config_file), 0, }, { "interpret-oem-data", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.interpret_oem_data_count), &(ipmiseld_data.interpret_oem_data), 0, }, { "output-oem-event-strings", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.output_oem_event_strings_count), &(ipmiseld_data.output_oem_event_strings), 0, }, { "entity-sensor-names", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.entity_sensor_names_count), &(ipmiseld_data.entity_sensor_names), 0, }, { "non-abbreviated-units", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.non_abbreviated_units_count), &(ipmiseld_data.non_abbreviated_units), 0, }, { "event-state-filter", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.event_state_filter_str_count), &(ipmiseld_data.event_state_filter_str), 0, }, { "warning-threshold", CONFFILE_OPTION_INT, -1, _config_file_percent_int, 1, 0, &(ipmiseld_data.warning_threshold_count), &(ipmiseld_data.warning_threshold), 0 }, { "clear-threshold", CONFFILE_OPTION_INT, -1, _config_file_percent_int, 1, 0, &(ipmiseld_data.clear_threshold_count), &(ipmiseld_data.clear_threshold), 0 }, { "system-event-format", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.system_event_format_str_count), &(ipmiseld_data.system_event_format_str), 0, }, { "oem-timestamped-event-format", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.oem_timestamped_event_format_str_count), &(ipmiseld_data.oem_timestamped_event_format_str), 0, }, { "oem-non-timestamped-event-format", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.oem_non_timestamped_event_format_str_count), &(ipmiseld_data.oem_non_timestamped_event_format_str), 0, }, { "poll-interval", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmiseld_data.poll_interval_count), &(ipmiseld_data.poll_interval), 0 }, { "log-facility", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.log_facility_str_count), &(ipmiseld_data.log_facility_str), 0, }, { "log-priority", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.log_priority_str_count), &(ipmiseld_data.log_priority_str), 0, }, { "cache-directory", CONFFILE_OPTION_STRING, -1, _config_file_string, 1, 0, &(ipmiseld_data.cache_directory_count), &(ipmiseld_data.cache_directory), 0, }, { "ignore-sdr", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.ignore_sdr_count), &(ipmiseld_data.ignore_sdr), 0, }, { "re-download-sdr", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.re_download_sdr_count), &(ipmiseld_data.re_download_sdr), 0, }, { "clear-sel", CONFFILE_OPTION_BOOL, -1, _config_file_bool, 1, 0, &(ipmiseld_data.clear_sel_count), &(ipmiseld_data.clear_sel), 0, }, { "threadpool-count", CONFFILE_OPTION_INT, -1, _config_file_positive_unsigned_int, 1, 0, &(ipmiseld_data.threadpool_count_count), &(ipmiseld_data.threadpool_count), 0 }, }; conffile_t cf = NULL; int rv = -1; int options_len; int legacy_file_loaded = 0; assert ((!support || (((support & CONFIG_FILE_INBAND) || (support & CONFIG_FILE_OUTOFBAND) || (support & CONFIG_FILE_SDR) || (support & CONFIG_FILE_TIME) || (support & CONFIG_FILE_HOSTRANGE)) && common_args)) && (((tool_support & CONFIG_FILE_TOOL_BMC_DEVICE) && !tool_data) || ((tool_support & CONFIG_FILE_TOOL_BMC_INFO) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_BMC_WATCHDOG) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_CHASSIS) && !tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_CONFIG) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_DCMI) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_FRU) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_OEM) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_PET) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_RAW) && !tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_SEL) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMI_SENSORS) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMICONSOLE) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMIPOWER) && tool_data) || ((tool_support & CONFIG_FILE_TOOL_IPMISELD) && tool_data))); memset (config_file_options, '\0', sizeof (struct conffile_option)); /* set ignore options the tool doesn't care about */ /* * general support flags */ /* driver-type is for both inband and outofband */ options_len = sizeof (inband_and_outofband_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_INBAND) && !(support & CONFIG_FILE_OUTOFBAND)) _ignore_options (inband_and_outofband_options, options_len); _copy_options (config_file_options, config_file_options_len, inband_and_outofband_options, options_len); config_file_options_len += options_len; options_len = sizeof (inband_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_INBAND)) _ignore_options (inband_options, options_len); _copy_options (config_file_options, config_file_options_len, inband_options, options_len); config_file_options_len += options_len; options_len = sizeof (outofband_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_OUTOFBAND)) _ignore_options (outofband_options, options_len); _copy_options (config_file_options, config_file_options_len, outofband_options, options_len); config_file_options_len += options_len; options_len = sizeof (sdr_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_SDR)) _ignore_options (sdr_options, options_len); _copy_options (config_file_options, config_file_options_len, sdr_options, options_len); options_len = sizeof (time_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_TIME)) _ignore_options (time_options, options_len); _copy_options (config_file_options, config_file_options_len, time_options, options_len); config_file_options_len += options_len; options_len = sizeof (hostrange_options)/sizeof (struct conffile_option); if (!(support & CONFIG_FILE_HOSTRANGE)) _ignore_options (hostrange_options, options_len); _copy_options (config_file_options, config_file_options_len, hostrange_options, options_len); config_file_options_len += options_len; /* * tool flags */ options_len = sizeof (bmc_device_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_BMC_DEVICE)) _ignore_options (bmc_device_options, options_len); _copy_options (config_file_options, config_file_options_len, bmc_device_options, options_len); config_file_options_len += options_len; options_len = sizeof (bmc_info_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_BMC_INFO)) _ignore_options (bmc_info_options, options_len); _copy_options (config_file_options, config_file_options_len, bmc_info_options, options_len); config_file_options_len += options_len; options_len = sizeof (bmc_watchdog_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_BMC_WATCHDOG)) _ignore_options (bmc_watchdog_options, options_len); _copy_options (config_file_options, config_file_options_len, bmc_watchdog_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_chassis_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_CHASSIS)) _ignore_options (ipmi_chassis_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_chassis_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_config_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_CONFIG)) _ignore_options (ipmi_config_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_config_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_dcmi_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_DCMI)) _ignore_options (ipmi_dcmi_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_dcmi_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_fru_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_FRU)) _ignore_options (ipmi_fru_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_fru_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_oem_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_OEM)) _ignore_options (ipmi_oem_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_oem_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_pet_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_PET)) _ignore_options (ipmi_pet_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_pet_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_raw_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_RAW)) _ignore_options (ipmi_raw_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_raw_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_sel_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_SEL)) _ignore_options (ipmi_sel_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_sel_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmi_sensors_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMI_SENSORS)) _ignore_options (ipmi_sensors_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmi_sensors_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmiconsole_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMICONSOLE)) _ignore_options (ipmiconsole_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmiconsole_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmipower_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMIPOWER)) _ignore_options (ipmipower_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmipower_options, options_len); config_file_options_len += options_len; options_len = sizeof (ipmiseld_options)/sizeof (struct conffile_option); if (!(tool_support & CONFIG_FILE_TOOL_IPMISELD)) _ignore_options (ipmiseld_options, options_len); _copy_options (config_file_options, config_file_options_len, ipmiseld_options, options_len); config_file_options_len += options_len; /* clear out config file data */ memset (&bmc_info_data, '\0', sizeof (struct config_file_data_bmc_info)); memset (&bmc_watchdog_data, '\0', sizeof (struct config_file_data_bmc_watchdog)); memset (&ipmi_config_data, '\0', sizeof (struct config_file_data_ipmi_config)); memset (&ipmi_dcmi_data, '\0', sizeof (struct config_file_data_ipmi_dcmi)); memset (&ipmi_fru_data, '\0', sizeof (struct config_file_data_ipmi_fru)); memset (&ipmi_oem_data, '\0', sizeof (struct config_file_data_ipmi_oem)); memset (&ipmi_pet_data, '\0', sizeof (struct config_file_data_ipmi_pet)); memset (&ipmi_sel_data, '\0', sizeof (struct config_file_data_ipmi_sel)); memset (&ipmi_sensors_data, '\0', sizeof (struct config_file_data_ipmi_sensors)); memset (&ipmiconsole_data, '\0', sizeof (struct config_file_data_ipmiconsole)); memset (&ipmipower_data, '\0', sizeof (struct config_file_data_ipmipower)); memset (&ipmiseld_data, '\0', sizeof (struct config_file_data_ipmiseld)); memset (&common_cmd_args_config, '\0', sizeof (struct common_cmd_args_config)); if (!(cf = conffile_handle_create ())) { fprintf (stderr, "conffile_handle_create: %s\n", strerror (errno)); goto cleanup; } /* Try legacy file first */ if (!filename) { if (!conffile_parse (cf, FREEIPMI_CONFIG_FILE_LEGACY, config_file_options, config_file_options_len, NULL, 0, 0)) legacy_file_loaded++; } if (!legacy_file_loaded) { /* FREEIPMI_CONFIG_FILE_DEFAULT defined in config.h */ if (!filename) filename = FREEIPMI_CONFIG_FILE_DEFAULT; if (conffile_parse (cf, filename, config_file_options, config_file_options_len, NULL, 0, 0) < 0) { char buf[CONFFILE_MAX_ERRMSGLEN]; /* don't exit, but return (-1) */ if (conffile_errnum (cf) == CONFFILE_ERR_EXIST && no_error_if_not_found) goto cleanup; /* Its not an error if the default configuration file doesn't exist */ if (!strcmp (filename, FREEIPMI_CONFIG_FILE_DEFAULT) && conffile_errnum (cf) == CONFFILE_ERR_EXIST) goto out; if (conffile_errmsg (cf, buf, CONFFILE_MAX_ERRMSGLEN) < 0) { fprintf (stderr, "conffile_parse: %d\n", conffile_errnum (cf)); exit (EXIT_FAILURE); } else { if (CONFFILE_IS_PARSE_ERR (conffile_errnum (cf)) || conffile_errnum (cf) == CONFFILE_ERR_EXIST || conffile_errnum (cf) == CONFFILE_ERR_OPEN || conffile_errnum (cf) == CONFFILE_ERR_READ) fprintf (stderr, "Config File Error: %s\n", buf); else fprintf (stderr, "conffile_parse: %s\n", buf); exit (EXIT_FAILURE); } } } /* copy file data over to tool */ if (target_channel_number_count) common_args->target_channel_number_is_set = 1; if (target_slave_address_count) common_args->target_slave_address_is_set = 1; if (common_cmd_args_config.username_set) common_args->username = common_cmd_args_config.username; if (common_cmd_args_config.password_set) common_args->password = common_cmd_args_config.password; if (common_cmd_args_config.k_g_set) { memcpy (common_args->k_g, common_cmd_args_config.k_g, IPMI_MAX_K_G_LENGTH); common_args->k_g_len = common_cmd_args_config.k_g_len; } if (common_cmd_args_config.authentication_type_set) common_args->authentication_type = common_cmd_args_config.authentication_type; if (common_cmd_args_config.cipher_suite_id_set) common_args->cipher_suite_id = common_cmd_args_config.cipher_suite_id; if (common_cmd_args_config.privilege_level_set) common_args->privilege_level = common_cmd_args_config.privilege_level; if (common_cmd_args_config.workaround_flags_set) { common_args->workaround_flags_outofband = common_cmd_args_config.workaround_flags_outofband; common_args->workaround_flags_outofband_2_0 = common_cmd_args_config.workaround_flags_outofband_2_0; common_args->workaround_flags_inband = common_cmd_args_config.workaround_flags_inband; common_args->workaround_flags_sdr = common_cmd_args_config.workaround_flags_sdr; common_args->section_specific_workaround_flags = common_cmd_args_config.section_specific_workaround_flags; } /* copy tool specific stuff */ if (tool_support & CONFIG_FILE_TOOL_BMC_INFO) { bmc_info_data_ptr = (struct config_file_data_bmc_info *)tool_data; memcpy (bmc_info_data_ptr, &bmc_info_data, sizeof (struct config_file_data_bmc_info)); } else if (tool_support & CONFIG_FILE_TOOL_BMC_WATCHDOG) { bmc_watchdog_data_ptr = (struct config_file_data_bmc_watchdog *)tool_data; memcpy (bmc_watchdog_data_ptr, &bmc_watchdog_data, sizeof (struct config_file_data_bmc_watchdog)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_CONFIG) { ipmi_config_data_ptr = (struct config_file_data_ipmi_config *)tool_data; memcpy (ipmi_config_data_ptr, &ipmi_config_data, sizeof (struct config_file_data_ipmi_config)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_DCMI) { ipmi_dcmi_data_ptr = (struct config_file_data_ipmi_dcmi *)tool_data; memcpy (ipmi_dcmi_data_ptr, &ipmi_dcmi_data, sizeof (struct config_file_data_ipmi_dcmi)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_FRU) { ipmi_fru_data_ptr = (struct config_file_data_ipmi_fru *)tool_data; memcpy (ipmi_fru_data_ptr, &ipmi_fru_data, sizeof (struct config_file_data_ipmi_fru)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_OEM) { ipmi_oem_data_ptr = (struct config_file_data_ipmi_oem *)tool_data; memcpy (ipmi_oem_data_ptr, &ipmi_oem_data, sizeof (struct config_file_data_ipmi_oem)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_PET) { ipmi_pet_data_ptr = (struct config_file_data_ipmi_pet *)tool_data; memcpy (ipmi_pet_data_ptr, &ipmi_pet_data, sizeof (struct config_file_data_ipmi_pet)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_SEL) { ipmi_sel_data_ptr = (struct config_file_data_ipmi_sel *)tool_data; memcpy (ipmi_sel_data_ptr, &ipmi_sel_data, sizeof (struct config_file_data_ipmi_sel)); } else if (tool_support & CONFIG_FILE_TOOL_IPMI_SENSORS) { ipmi_sensors_data_ptr = (struct config_file_data_ipmi_sensors *)tool_data; memcpy (ipmi_sensors_data_ptr, &ipmi_sensors_data, sizeof (struct config_file_data_ipmi_sensors)); } else if (tool_support & CONFIG_FILE_TOOL_IPMICONSOLE) { ipmiconsole_data_ptr = (struct config_file_data_ipmiconsole *)tool_data; memcpy (ipmiconsole_data_ptr, &ipmiconsole_data, sizeof (struct config_file_data_ipmiconsole)); } else if (tool_support & CONFIG_FILE_TOOL_IPMIPOWER) { ipmipower_data_ptr = (struct config_file_data_ipmipower *)tool_data; memcpy (ipmipower_data_ptr, &ipmipower_data, sizeof (struct config_file_data_ipmipower)); } else if (tool_support & CONFIG_FILE_TOOL_IPMISELD) { ipmiseld_data_ptr = (struct config_file_data_ipmiseld *)tool_data; memcpy (ipmiseld_data_ptr, &ipmiseld_data, sizeof (struct config_file_data_ipmiseld)); } out: rv = 0; cleanup: conffile_handle_destroy (cf); return (rv); } freeipmi-1.6.4/common/toolcommon/tool-config-file-common.h0000644002055400205540000002546313527331635023546 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_CONFIG_FILE_COMMON_H #define TOOL_CONFIG_FILE_COMMON_H #if HAVE_CONFIG_H #include "config.h" #endif #include "tool-cmdline-common.h" #include "conffile.h" #define CONFIG_FILE_NONE 0x00 #define CONFIG_FILE_INBAND 0x01 #define CONFIG_FILE_OUTOFBAND 0x02 #define CONFIG_FILE_SDR 0x04 #define CONFIG_FILE_TIME 0x08 #define CONFIG_FILE_HOSTRANGE 0x10 #define CONFIG_FILE_TOOL_NONE 0x00000000 #define CONFIG_FILE_TOOL_BMC_DEVICE 0x00000001 #define CONFIG_FILE_TOOL_BMC_INFO 0x00000002 #define CONFIG_FILE_TOOL_BMC_WATCHDOG 0x00000004 #define CONFIG_FILE_TOOL_IPMI_CHASSIS 0x00000008 #define CONFIG_FILE_TOOL_IPMI_CONFIG 0x00000010 #define CONFIG_FILE_TOOL_IPMI_DCMI 0x00000020 #define CONFIG_FILE_TOOL_IPMI_FRU 0x00000040 #define CONFIG_FILE_TOOL_IPMI_OEM 0x00000080 #define CONFIG_FILE_TOOL_IPMI_PET 0x00000100 #define CONFIG_FILE_TOOL_IPMI_RAW 0x00000200 #define CONFIG_FILE_TOOL_IPMI_SEL 0x00000400 #define CONFIG_FILE_TOOL_IPMI_SENSORS 0x00000800 #define CONFIG_FILE_TOOL_IPMICONSOLE 0x00001000 #define CONFIG_FILE_TOOL_IPMIPOWER 0x00002000 #define CONFIG_FILE_TOOL_IPMISELD 0x00004000 /* achu: * * The stack on cygwin is smaller than on unixes, and the ability for * me to get a bigger stack in cygwin is difficult. The normal unix * ways (i.e. ulimit -s unlimited) don't work. Some posts online * indicate it's b/c of the way windows works with stack limits. * * So we're just going to use smaller values to deal with the problem. */ #ifdef __CYGWIN__ #define CONFIG_FILE_MAX_SENSOR_RECORD_IDS 128 #define CONFIG_FILE_MAX_SENSOR_TYPES 16 #else /* !__CYGWIN__ */ #if 0 /* record id is 16 bits - 65536 */ #define CONFIG_FILE_MAX_SENSOR_RECORD_IDS 65536 #define CONFIG_FILE_MAX_SENSOR_TYPES 256 #else /* !0 */ /* achu: pick more reasonable limits than the theoretical maxes */ #define CONFIG_FILE_MAX_SENSOR_RECORD_IDS 4096 #define CONFIG_FILE_MAX_SENSOR_TYPES 128 #endif /* !0 */ #endif /* !__CYGWIN__ */ #define CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH 256 struct config_file_data_bmc_info { int interpret_oem_data; int interpret_oem_data_count; }; struct config_file_data_bmc_watchdog { char *logfile; /* deprecated */ int logfile_count; /* deprecated */ int verbose_logging; int verbose_logging_count; int no_logging; int no_logging_count; }; struct config_file_data_ipmi_config { unsigned int verbose_count; int verbose_count_count; }; struct config_file_data_ipmi_dcmi { int interpret_oem_data; int interpret_oem_data_count; }; struct config_file_data_ipmi_fru { unsigned int verbose_count; int verbose_count_count; int skip_checks; /* legacy - parse for backwards compatability */ int skip_checks_count; /* legacy - parse for backwards compatability */ int bridge_fru; int bridge_fru_count; int interpret_oem_data; int interpret_oem_data_count; }; struct config_file_data_ipmi_oem { unsigned int verbose_count; int verbose_count_count; }; struct config_file_data_ipmi_pet { unsigned int verbose_count; int verbose_count_count; int output_event_severity; int output_event_severity_count; int output_event_state; int output_event_state_count; char *event_state_config_file; int event_state_config_file_count; int interpret_oem_data; int interpret_oem_data_count; int entity_sensor_names; int entity_sensor_names_count; int no_sensor_type_output; int no_sensor_type_output_count; int comma_separated_output; int comma_separated_output_count; int no_header_output; int no_header_output_count; int non_abbreviated_units; int non_abbreviated_units_count; }; struct config_file_data_ipmi_sel { unsigned int verbose_count; int verbose_count_count; char sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; int sensor_types_count; char exclude_sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int exclude_sensor_types_count; int system_event_only; int system_event_only_count; int oem_event_only; int oem_event_only_count; int output_manufacturer_id; int output_manufacturer_id_count; int output_event_state; int output_event_state_count; char *event_state_config_file; int event_state_config_file_count; int assume_system_event_records; /* legacy - parse for backwards compatability */ int assume_system_event_records_count; /* legacy - parse for backwards compatability */ int interpret_oem_data; int interpret_oem_data_count; int output_oem_event_strings; int output_oem_event_strings_count; int entity_sensor_names; int entity_sensor_names_count; int no_sensor_type_output; int no_sensor_type_output_count; int comma_separated_output; int comma_separated_output_count; int no_header_output; int no_header_output_count; int non_abbreviated_units; int non_abbreviated_units_count; int legacy_output; int legacy_output_count; }; struct config_file_data_ipmi_sensors { unsigned int verbose_count; int verbose_count_count; int quiet_readings; int quiet_readings_count; unsigned int record_ids[CONFIG_FILE_MAX_SENSOR_RECORD_IDS]; unsigned int record_ids_length; int record_ids_count; unsigned int exclude_record_ids[CONFIG_FILE_MAX_SENSOR_RECORD_IDS]; unsigned int exclude_record_ids_length; int exclude_record_ids_count; char sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; int sensor_types_count; char exclude_sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int exclude_sensor_types_count; int bridge_sensors; int bridge_sensors_count; int shared_sensors; int shared_sensors_count; int interpret_oem_data; int interpret_oem_data_count; int ignore_not_available_sensors; int ignore_not_available_sensors_count; int ignore_unrecognized_events; int ignore_unrecognized_events_count; int entity_sensor_names; int entity_sensor_names_count; int output_event_bitmask; int output_event_bitmask_count; int output_sensor_state; int output_sensor_state_count; char *sensor_state_config_file; int sensor_state_config_file_count; int output_sensor_thresholds; int output_sensor_thresholds_count; int no_sensor_type_output; int no_sensor_type_output_count; int comma_separated_output_count; int comma_separated_output; int no_header_output; int no_header_output_count; int non_abbreviated_units; int non_abbreviated_units_count; int legacy_output; int legacy_output_count; int ipmimonitoring_legacy_output; int ipmimonitoring_legacy_output_count; }; struct config_file_data_ipmiconsole { char escape_char; int escape_char_count; int dont_steal; int dont_steal_count; int serial_keepalive; int serial_keepalive_count; int serial_keepalive_empty; int serial_keepalive_empty_count; int sol_payload_instance; int sol_payload_instance_count; int deactivate_all_instances; int deactivate_all_instances_count; int lock_memory; int lock_memory_count; }; struct config_file_data_ipmipower { int on_if_off; int on_if_off_count; int wait_until_on; int wait_until_on_count; int wait_until_off; int wait_until_off_count; /* Parse string and let ipmipower determine if it is valid */ char *oem_power_type_str; int oem_power_type_str_count; unsigned int retransmission_wait_timeout; int retransmission_wait_timeout_count; unsigned int retransmission_backoff_count; int retransmission_backoff_count_count; unsigned int ping_interval; int ping_interval_count; unsigned int ping_timeout; int ping_timeout_count; unsigned int ping_packet_count; int ping_packet_count_count; unsigned int ping_percent; int ping_percent_count; unsigned int ping_consec_count; int ping_consec_count_count; }; struct config_file_data_ipmiseld { char *hostname; int hostname_count; unsigned int verbose_count; int verbose_count_count; char sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; int sensor_types_count; char exclude_sensor_types[CONFIG_FILE_MAX_SENSOR_TYPES][CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int exclude_sensor_types_count; int system_event_only; int system_event_only_count; int oem_event_only; int oem_event_only_count; char *event_state_config_file; int event_state_config_file_count; int interpret_oem_data; int interpret_oem_data_count; int output_oem_event_strings; int output_oem_event_strings_count; int entity_sensor_names; int entity_sensor_names_count; int non_abbreviated_units; int non_abbreviated_units_count; char *event_state_filter_str; int event_state_filter_str_count; unsigned int warning_threshold; int warning_threshold_count; unsigned int clear_threshold; int clear_threshold_count; char *system_event_format_str; int system_event_format_str_count; char *oem_timestamped_event_format_str; int oem_timestamped_event_format_str_count; char *oem_non_timestamped_event_format_str; int oem_non_timestamped_event_format_str_count; unsigned int poll_interval; int poll_interval_count; char *log_facility_str; int log_facility_str_count; char *log_priority_str; int log_priority_str_count; char *cache_directory; int cache_directory_count; int ignore_sdr; int ignore_sdr_count; int re_download_sdr; int re_download_sdr_count; int clear_sel; int clear_sel_count; unsigned int threadpool_count; int threadpool_count_count; }; int config_file_parse (const char *filename, int no_error_if_not_found, struct common_cmd_args *common_args, unsigned int support, unsigned int tool_support, void *tool_data); #endif /* TOOL_CONFIG_FILE_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-cmdline-common.c0000644002055400205540000004367713527331635023001 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #ifdef HAVE_ERROR_H #include #endif /* HAVE_ERROR_H */ #include #include #include #include "freeipmi-portability.h" #include "parse-common.h" #include "pstdout.h" #include "tool-cmdline-common.h" #include "tool-util-common.h" error_t cmdline_config_file_parse (int key, char *arg, struct argp_state *state) { struct common_cmd_args *common_args; assert (state); common_args = state->input; switch (key) { /* ARGP_CONFIG_KEY for backwards compatability */ case ARGP_CONFIG_KEY: case ARGP_CONFIG_FILE_KEY: free (common_args->config_file); if (!(common_args->config_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_KEY_ARG: break; case ARGP_KEY_END: break; default: /* don't parse anything else, fall to return (0) */ break; } return (0); } /* From David Wheeler's Secure Programming Guide */ static void * __secure_memset (void *s, int c, size_t n) { volatile char *p; if (!s || !n) return (NULL); p = s; while (n--) *p++=c; return (s); } error_t common_parse_opt (int key, char *arg, struct common_cmd_args *common_args) { char *endptr; int tmp; unsigned int outofband_flags, outofband_2_0_flags, inband_flags, sdr_flags, section_flags; int n; assert (common_args); switch (key) { /* * inband options */ case ARGP_DRIVER_TYPE_KEY: if (common_args->driver_type_outofband_only) { if ((tmp = parse_outofband_driver_type (arg)) < 0) { fprintf (stderr, "invalid driver type\n"); exit (EXIT_FAILURE); } } else { if ((tmp = parse_driver_type (arg)) < 0) { fprintf (stderr, "invalid driver type\n"); exit (EXIT_FAILURE); } } common_args->driver_type = tmp; break; /* ARGP_NO_PROBING_KEY for backwards compatability */ case ARGP_NO_PROBING_KEY: case ARGP_DISABLE_AUTO_PROBE_KEY: common_args->disable_auto_probe = 1; break; case ARGP_DRIVER_ADDRESS_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid driver address\n"); exit (EXIT_FAILURE); } common_args->driver_address = tmp; break; case ARGP_DRIVER_DEVICE_KEY: free (common_args->driver_device); if (!(common_args->driver_device = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_REGISTER_SPACING_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid register spacing\n"); exit (EXIT_FAILURE); } common_args->register_spacing = tmp; break; case ARGP_TARGET_CHANNEL_NUMBER_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0 || !IPMI_CHANNEL_NUMBER_VALID (tmp)) { fprintf (stderr, "invalid target channel numbern"); exit (EXIT_FAILURE); } common_args->target_channel_number = tmp; common_args->target_channel_number_is_set = 1; break; case ARGP_TARGET_SLAVE_ADDRESS_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "invalid target slave addressn"); exit (EXIT_FAILURE); } common_args->target_slave_address = tmp; common_args->target_slave_address_is_set = 1; break; /* * outofband options */ case ARGP_HOSTNAME_KEY: free (common_args->hostname); if (!(common_args->hostname = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_USERNAME_KEY: if (strlen (arg) > IPMI_MAX_USER_NAME_LENGTH) { fprintf (stderr, "username too long\n"); exit (EXIT_FAILURE); } else { free (common_args->username); if (!(common_args->username = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } } n = strlen (arg); __secure_memset (arg, '\0', n); break; case ARGP_PASSWORD_KEY: if (strlen (arg) > IPMI_2_0_MAX_PASSWORD_LENGTH) { fprintf (stderr, "password too long\n"); exit (EXIT_FAILURE); } else { free (common_args->password); if (!(common_args->password = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } } n = strlen (arg); __secure_memset (arg, '\0', n); break; case ARGP_PASSWORD_PROMPT_KEY: free (common_args->password); arg = getpass ("Password: "); if (arg && strlen (arg) > IPMI_2_0_MAX_PASSWORD_LENGTH) { fprintf (stderr, "password too long\n"); exit (EXIT_FAILURE); } if (!(common_args->password = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_K_G_KEY: { int rv; if (common_args->k_g_len) { memset (common_args->k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); common_args->k_g_len = 0; } if ((rv = check_kg_len (arg)) < 0) { fprintf (stderr, "k_g too long\n"); exit (EXIT_FAILURE); } if ((rv = parse_kg (common_args->k_g, IPMI_MAX_K_G_LENGTH, arg)) < 0) { fprintf (stderr, "k_g input formatted incorrectly\n"); exit (EXIT_FAILURE); } if (rv > 0) common_args->k_g_len = rv; n = strlen (arg); __secure_memset (arg, '\0', n); } break; case ARGP_K_G_PROMPT_KEY: { int rv; if (common_args->k_g_len) { memset (common_args->k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); common_args->k_g_len = 0; } arg = getpass ("K_g: "); if ((rv = check_kg_len (arg)) < 0) { fprintf (stderr, "k_g too long\n"); exit (EXIT_FAILURE); } if ((rv = parse_kg (common_args->k_g, IPMI_MAX_K_G_LENGTH, arg)) < 0) { fprintf (stderr, "k_g input formatted incorrectly\n"); exit (EXIT_FAILURE); } if (rv > 0) common_args->k_g_len = rv; } break; /* ARGP_TIMEOUT_KEY for backwards compatability */ case ARGP_TIMEOUT_KEY: case ARGP_SESSION_TIMEOUT_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid session timeout\n"); exit (EXIT_FAILURE); } common_args->session_timeout = tmp; break; /* ARGP_RETRY_TIMEOUT_KEY for backwards compatability */ case ARGP_RETRY_TIMEOUT_KEY: case ARGP_RETRANSMISSION_TIMEOUT_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid retransmission timeout\n"); exit (EXIT_FAILURE); } common_args->retransmission_timeout = tmp; break; /* ARGP_AUTH_TYPE_KEY for backwards compatability */ case ARGP_AUTH_TYPE_KEY: case ARGP_AUTHENTICATION_TYPE_KEY: if ((tmp = parse_authentication_type (arg)) < 0) { fprintf (stderr, "invalid authentication type\n"); exit (EXIT_FAILURE); } common_args->authentication_type = tmp; break; case ARGP_CIPHER_SUITE_ID_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp < IPMI_CIPHER_SUITE_ID_MIN || tmp > IPMI_CIPHER_SUITE_ID_MAX) { fprintf (stderr, "invalid cipher suite id\n"); exit (EXIT_FAILURE); } if (!IPMI_CIPHER_SUITE_ID_SUPPORTED (tmp)) { fprintf (stderr, "unsupported cipher suite id\n"); exit (EXIT_FAILURE); } common_args->cipher_suite_id = tmp; break; /* ARGP_PRIVILEGE_KEY for backwards compatability */ /* ARGP_PRIV_LEVEL_KEY for backwards compatability */ \ case ARGP_PRIVILEGE_KEY: case ARGP_PRIV_LEVEL_KEY: case ARGP_PRIVILEGE_LEVEL_KEY: if ((tmp = parse_privilege_level (arg)) < 0) { fprintf (stderr, "invalid privilege level\n"); exit (EXIT_FAILURE); } common_args->privilege_level = tmp; break; /* * misc options */ /* ARGP_CONFIG_KEY for backwards compatability */ case ARGP_CONFIG_KEY: case ARGP_CONFIG_FILE_KEY: /* ignore config option - should have been parsed earlier */ break; case ARGP_WORKAROUND_FLAGS_KEY: if (parse_workaround_flags_tool (arg, &outofband_flags, &outofband_2_0_flags, &inband_flags, &sdr_flags, §ion_flags) < 0) { fprintf (stderr, "invalid workaround flags\n"); exit (EXIT_FAILURE); } common_args->workaround_flags_outofband = outofband_flags; common_args->workaround_flags_outofband_2_0 = outofband_2_0_flags; common_args->workaround_flags_inband = inband_flags; common_args->workaround_flags_sdr = sdr_flags; common_args->section_specific_workaround_flags = section_flags; break; case ARGP_DEBUG_KEY: common_args->debug++; break; /* * sdr options */ case ARGP_FLUSH_CACHE_KEY: case ARGP_FLUSH_CACHE_LEGACY_KEY: common_args->flush_cache = 1; break; case ARGP_QUIET_CACHE_KEY: case ARGP_QUIET_CACHE_LEGACY_KEY: common_args->quiet_cache = 1; break; case ARGP_SDR_CACHE_RECREATE_KEY: common_args->sdr_cache_recreate = 1; break; case ARGP_SDR_CACHE_FILE_KEY: free (common_args->sdr_cache_file); if (!(common_args->sdr_cache_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_SDR_CACHE_DIRECTORY_KEY: free (common_args->sdr_cache_directory); if (!(common_args->sdr_cache_directory = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ARGP_IGNORE_SDR_CACHE_KEY: common_args->ignore_sdr_cache = 1; break; /* * time options */ case ARGP_UTC_TO_LOCALTIME_KEY: common_args->utc_to_localtime = 1; break; case ARGP_LOCALTIME_TO_UTC_KEY: common_args->localtime_to_utc = 1; break; case ARGP_UTC_OFFSET_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || !IPMI_UTC_OFFSET_VALID (tmp)) { fprintf (stderr, "invalid UTC offset\n"); exit (EXIT_FAILURE); } common_args->utc_offset = tmp; break; /* * hostrange options */ case ARGP_BUFFER_OUTPUT_KEY: common_args->buffer_output = 1; break; case ARGP_CONSOLIDATE_OUTPUT_KEY: common_args->consolidate_output = 1; break; case ARGP_FANOUT_KEY: errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || (tmp < PSTDOUT_FANOUT_MIN) || (tmp > PSTDOUT_FANOUT_MAX)) { fprintf (stderr, "invalid fanout\n"); exit (EXIT_FAILURE); break; } common_args->fanout = tmp; break; case ARGP_ELIMINATE_KEY: common_args->eliminate = 1; break; case ARGP_ALWAYS_PREFIX_KEY: common_args->always_prefix = 1; break; default: return (ARGP_ERR_UNKNOWN); } return (0); } static void _init_common_cmd_args (struct common_cmd_args *common_args) { assert (common_args); common_args->disable_auto_probe = 0; common_args->driver_type = IPMI_DEVICE_UNKNOWN; common_args->driver_type_outofband_only = 0; common_args->driver_address = 0; common_args->driver_device = NULL; common_args->register_spacing = 0; common_args->target_channel_number = 0; common_args->target_channel_number_is_set = 0; common_args->target_slave_address = 0; common_args->target_slave_address_is_set = 0; common_args->hostname = NULL; common_args->username = NULL; common_args->password = NULL; memset (common_args->k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); common_args->k_g_len = 0; common_args->session_timeout = 0; common_args->retransmission_timeout = 0; common_args->authentication_type = IPMI_AUTHENTICATION_TYPE_MD5; common_args->cipher_suite_id = 3; /* privilege_level set by parent function */ common_args->config_file = NULL; common_args->workaround_flags_outofband = 0; common_args->workaround_flags_outofband_2_0 = 0; common_args->workaround_flags_inband = 0; common_args->section_specific_workaround_flags = 0; common_args->debug = 0; common_args->flush_cache = 0; common_args->quiet_cache = 0; common_args->sdr_cache_recreate = 0; common_args->sdr_cache_file = NULL; common_args->sdr_cache_directory = NULL; common_args->ignore_sdr_cache = 0; common_args->utc_to_localtime = 0; common_args->localtime_to_utc = 0; common_args->utc_offset = 0; common_args->buffer_output = 0; common_args->consolidate_output = 0; common_args->fanout = 0; common_args->eliminate = 0; common_args->always_prefix = 0; } void init_common_cmd_args_user (struct common_cmd_args *common_args) { assert (common_args); _init_common_cmd_args (common_args); common_args->privilege_level = IPMI_PRIVILEGE_LEVEL_USER; } void init_common_cmd_args_operator (struct common_cmd_args *common_args) { assert (common_args); _init_common_cmd_args (common_args); common_args->privilege_level = IPMI_PRIVILEGE_LEVEL_OPERATOR; } void init_common_cmd_args_admin (struct common_cmd_args *common_args) { _init_common_cmd_args (common_args); common_args->privilege_level = IPMI_PRIVILEGE_LEVEL_ADMIN; } void verify_common_cmd_args_inband (struct common_cmd_args *common_args) { assert (common_args); if (common_args->driver_device) { if (access (common_args->driver_device, R_OK|W_OK) < 0) { fprintf (stderr, "insufficient permission on driver device '%s'\n", common_args->driver_device); exit (EXIT_FAILURE); } } } void verify_common_cmd_args_outofband (struct common_cmd_args *common_args, int check_hostname) { assert (common_args); if (check_hostname && (common_args->driver_type == IPMI_DEVICE_LAN || common_args->driver_type == IPMI_DEVICE_LAN_2_0) && !common_args->hostname) { fprintf (stderr, "hostname not specified\n"); exit (EXIT_FAILURE); } /* We default to IPMI 1.5 if the user doesn't specify LAN vs. LAN_2_0 */ if (((common_args->hostname && common_args->driver_type == IPMI_DEVICE_UNKNOWN) || common_args->driver_type == IPMI_DEVICE_LAN) && common_args->password && strlen (common_args->password) > IPMI_1_5_MAX_PASSWORD_LENGTH) { fprintf (stderr, "password too long\n"); exit (EXIT_FAILURE); } /* else, 2_0 password length was checked in argp_parse() previously */ if (common_args->retransmission_timeout > common_args->session_timeout) { fprintf (stderr, "retransmission timeout larger than session timeout\n"); exit (EXIT_FAILURE); } if (common_args->k_g_len) { unsigned int i; int all_zeroes = 1; /* Special case, check to make sure user didn't input zero as a * k_g key. */ for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++) { if (common_args->k_g[i] != 0) { all_zeroes = 0; break; } } if (all_zeroes) common_args->k_g_len = 0; } } void verify_common_cmd_args (struct common_cmd_args *common_args) { assert (common_args); verify_common_cmd_args_inband (common_args); verify_common_cmd_args_outofband (common_args, 1); if (common_args->sdr_cache_directory) { if (access (common_args->sdr_cache_directory, R_OK|W_OK|X_OK) < 0) { fprintf (stderr, "insufficient permission on SDR cache directory '%s'\n", common_args->sdr_cache_directory); exit (EXIT_FAILURE); } } if (common_args->buffer_output && common_args->consolidate_output) { fprintf (stderr, "cannot buffer and consolidate hostrange output, please select only one\n"); exit (EXIT_FAILURE); } } freeipmi-1.6.4/common/toolcommon/tool-cmdline-common.h0000644002055400205540000004205113527331635022767 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_CMDLINE_COMMON_H #define TOOL_CMDLINE_COMMON_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "parse-common.h" enum argp_common_option_keys { ARGP_DRIVER_TYPE_KEY = 'D', ARGP_NO_PROBING_KEY = 131, /* for backwards compatability */ ARGP_DISABLE_AUTO_PROBE_KEY = 130, ARGP_DRIVER_ADDRESS_KEY = 132, ARGP_DRIVER_DEVICE_KEY = 133, ARGP_TIMEOUT_KEY = 134, /* for backwards compatability */ ARGP_SESSION_TIMEOUT_KEY = 135, ARGP_RETRY_TIMEOUT_KEY = 136, /* for backwards compatability */ ARGP_RETRANSMISSION_TIMEOUT_KEY = 137, ARGP_REG_SPACE_KEY = 138, /* for backwards compatability */ ARGP_REGISTER_SPACING_KEY = 139, ARGP_TARGET_CHANNEL_NUMBER_KEY = 140, ARGP_TARGET_SLAVE_ADDRESS_KEY = 141, ARGP_HOSTNAME_KEY = 'h', ARGP_USERNAME_KEY = 'u', ARGP_PASSWORD_KEY = 'p', ARGP_PASSWORD_PROMPT_KEY = 'P', ARGP_K_G_KEY = 'k', ARGP_K_G_PROMPT_KEY = 'K', ARGP_AUTH_TYPE_KEY = 142, /* for backwards compatability */ ARGP_AUTHENTICATION_TYPE_KEY = 'a', ARGP_CIPHER_SUITE_ID_KEY = 'I', ARGP_PRIVILEGE_KEY = 143, /* for backwards compatability */ ARGP_PRIV_LEVEL_KEY = 144, /* for backwards compatability */ ARGP_PRIVILEGE_LEVEL_KEY = 'l', ARGP_CONFIG_KEY = 145, /* for backwards compatability */ ARGP_CONFIG_FILE_KEY = 146, ARGP_WORKAROUND_FLAGS_KEY = 'W', ARGP_DEBUG_KEY = 147, /* sdr options */ ARGP_FLUSH_CACHE_KEY = 148, ARGP_FLUSH_CACHE_LEGACY_KEY = 'f', ARGP_QUIET_CACHE_KEY = 149, ARGP_QUIET_CACHE_LEGACY_KEY = 'Q', ARGP_SDR_CACHE_RECREATE_KEY = 150, ARGP_SDR_CACHE_FILE_KEY = 151, ARGP_SDR_CACHE_DIRECTORY_KEY = 152, ARGP_IGNORE_SDR_CACHE_KEY = 153, /* time options */ ARGP_UTC_TO_LOCALTIME_KEY = 154, ARGP_LOCALTIME_TO_UTC_KEY = 155, ARGP_UTC_OFFSET_KEY = 156, /* hostrange options */ ARGP_BUFFER_OUTPUT_KEY = 'B', ARGP_CONSOLIDATE_OUTPUT_KEY = 'C', ARGP_FANOUT_KEY = 'F', ARGP_ELIMINATE_KEY = 'E', ARGP_ALWAYS_PREFIX_KEY = 157, }; /* * achu: * * argp's help/usage layout has various bugs when the description * buffer gets to 150 characters in length. So we're going to shorten * argp usage help output from what is in the manpages. */ #define ARGP_COMMON_OPTIONS_DRIVER \ { "driver-type", ARGP_DRIVER_TYPE_KEY, "IPMIDRIVER", 0, \ "Specify the driver type to use instead of doing an auto selection.", 0} /* no-probing is maintained for backwards compatability */ /* reg-space is maintained for backwards compatability */ #define ARGP_COMMON_OPTIONS_INBAND \ { "no-probing", ARGP_NO_PROBING_KEY, 0, OPTION_HIDDEN, \ "Do not probe in-band IPMI devices for default settings.", 1}, \ { "disable-auto-probe", ARGP_DISABLE_AUTO_PROBE_KEY, 0, 0, \ "Do not probe in-band IPMI devices for default settings.", 1}, \ { "driver-address", ARGP_DRIVER_ADDRESS_KEY, "DRIVER-ADDRESS", 0, \ "Specify the in-band driver address to be used instead of the probed value.", 2}, \ { "driver-device", ARGP_DRIVER_DEVICE_KEY, "DEVICE", 0, \ "Specify the in-band driver device path to be used instead of the probed path.", 3}, \ { "reg-space", ARGP_REG_SPACE_KEY, "REGISTER-SPACING", OPTION_HIDDEN, \ "Specify the in-band driver register spacing instead of the probed value.", 4}, \ { "register-spacing", ARGP_REGISTER_SPACING_KEY, "REGISTER-SPACING", 0, \ "Specify the in-band driver register spacing instead of the probed value.", 4}, \ { "target-channel-number", ARGP_TARGET_CHANNEL_NUMBER_KEY, "CHANNEL-NUMBER", 0, \ "Specify an in-band driver target channel number to send IPMI requests to.", 5}, \ { "target-slave-address", ARGP_TARGET_SLAVE_ADDRESS_KEY, "SLAVE-ADDRESS", 0, \ "Specify an in-band driver target slave address to send IPMI requests to.", 6} #define ARGP_COMMON_OPTIONS_OUTOFBAND \ { "hostname", ARGP_HOSTNAME_KEY, "IPMIHOST", 0, \ "Specify the remote host to communicate with.", 7}, \ ARGP_COMMON_OPTIONS_OUTOFBAND_COMMON #define ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED \ { "hostname", ARGP_HOSTNAME_KEY, "IPMIHOST", 0, \ "Specify the remote host(s) to communicate with.", 7}, \ ARGP_COMMON_OPTIONS_OUTOFBAND_COMMON /* retry-timeout is maintained for backwards compatability */ /* timeout is maintained for backwards compatability */ #define ARGP_COMMON_OPTIONS_OUTOFBAND_COMMON \ { "username", ARGP_USERNAME_KEY, "USERNAME", 0, \ "Specify the username to use when authenticating with the remote host.", 8}, \ { "password", ARGP_PASSWORD_KEY, "PASSWORD", 0, \ "Specify the password to use when authenticationg with the remote host. ", 9}, \ { "password-prompt", ARGP_PASSWORD_PROMPT_KEY, 0, 0, \ "Prompt for password to avoid possibility of listing it in process lists.", 10}, \ { "k-g", ARGP_K_G_KEY, "K_G", 0, \ "Specify the K_g BMC key to use when authenticating with the remote host for IPMI 2.0.", 11}, \ { "k-g-prompt", ARGP_K_G_PROMPT_KEY, 0, 0, \ "Prompt for k-g to avoid possibility of listing it in process lists.", 12}, \ { "timeout", ARGP_TIMEOUT_KEY, "MILLISECONDS", OPTION_HIDDEN, \ "Specify the session timeout in milliseconds.", 13}, \ { "session-timeout", ARGP_SESSION_TIMEOUT_KEY, "MILLISECONDS", 0, \ "Specify the session timeout in milliseconds.", 13}, \ { "retry-timeout", ARGP_RETRY_TIMEOUT_KEY, "MILLISECONDS", OPTION_HIDDEN, \ "Specify the packet retransmission timeout in milliseconds.", 14}, \ { "retransmission-timeout", ARGP_RETRANSMISSION_TIMEOUT_KEY, "MILLISECONDS", 0, \ "Specify the packet retransmission timeout in milliseconds.", 14} /* auth-type is maintained for backwards compatability */ #define ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE \ { "auth-type", ARGP_AUTH_TYPE_KEY, "AUTHENTICATION-TYPE", OPTION_HIDDEN, \ "Specify the IPMI 1.5 authentication type to use.", 15}, \ { "authentication-type", ARGP_AUTHENTICATION_TYPE_KEY, "AUTHENTICATION-TYPE", 0, \ "Specify the IPMI 1.5 authentication type to use.", 15} #define ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID \ { "cipher-suite-id", ARGP_CIPHER_SUITE_ID_KEY, "CIPHER-SUITE-ID", 0, \ "Specify the IPMI 2.0 cipher suite ID to use.", 16} /* privilege is maintained for backwards compatability */ /* priv-level is maintained for backwards compatability */ #define ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL \ { "privilege", ARGP_PRIVILEGE_KEY, "PRIVILEGE-LEVEL", OPTION_HIDDEN, \ "Specify the privilege level to be used. ", 17}, \ { "priv-level", ARGP_PRIV_LEVEL_KEY, "PRIVILEGE-LEVEL", OPTION_HIDDEN, \ "Specify the privilege level to be used.", 17}, \ { "privilege-level", ARGP_PRIVILEGE_LEVEL_KEY, "PRIVILEGE-LEVEL", 0, \ "Specify the privilege level to be used.", 17} #define ARGP_COMMON_OPTIONS_CONFIG_FILE \ { "config-file", ARGP_CONFIG_FILE_KEY, "FILE", 0, \ "Specify alternate configuration file.", 18} #define ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS \ { "workaround-flags", ARGP_WORKAROUND_FLAGS_KEY, "WORKAROUNDS", 0, \ "Specify workarounds to vendor compliance issues.", 19} #define ARGP_COMMON_SDR_CACHE_OPTIONS \ { "flush-cache", ARGP_FLUSH_CACHE_KEY, 0, 0, \ "Flush a cached version of the sensor data repository (SDR) cache.", 20}, \ { "quiet-cache", ARGP_QUIET_CACHE_KEY, 0, 0, \ "Do not output information about cache creation/deletion.", 21}, \ { "sdr-cache-recreate", ARGP_SDR_CACHE_RECREATE_KEY, 0, 0, \ "Recreate sensor data repository (SDR) cache if cache is out of date or invalid.", 22} /* older -f option maintained for backwards compatability */ #define ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY \ { "flush-cache", ARGP_FLUSH_CACHE_LEGACY_KEY, 0, OPTION_HIDDEN, \ "Flush a cached version of the sensor data repository (SDR) cache.", 20}, \ { "quiet-cache", ARGP_QUIET_CACHE_LEGACY_KEY, 0, OPTION_HIDDEN, \ "Do not output information about cache creation/deletion.", 21} \ #define ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY \ { "sdr-cache-file", ARGP_SDR_CACHE_FILE_KEY, "FILE", 0, \ "Specify a specific file for the sensor data repository (SDR) cache to be stored or read from.", 23}, \ { "sdr-cache-directory", ARGP_SDR_CACHE_DIRECTORY_KEY, "DIRECTORY", 0, \ "Specify an alternate directory for sensor data repository (SDR) caches to be stored or read from.", 24} #define ARGP_COMMON_SDR_CACHE_OPTIONS_IGNORE \ { "ignore-sdr-cache", ARGP_IGNORE_SDR_CACHE_KEY, 0, 0, \ "Ignore all SDR cache related processing.", 25} #define ARGP_COMMON_TIME_OPTIONS \ { "utc-to-localtime", ARGP_UTC_TO_LOCALTIME_KEY, 0, 0, \ "Assume times stored UTC, convert to localtime.", 26}, \ { "localtime-to-utc", ARGP_LOCALTIME_TO_UTC_KEY, 0, 0, \ "Assume times stored in localtime, convert to UTC.", 27}, \ { "utc-offset", ARGP_UTC_OFFSET_KEY, "SECONDS", 0, \ "Specify a specific UTC offset to be added to timestamps.", 28} #define ARGP_COMMON_HOSTRANGED_OPTIONS \ { "buffer-output", ARGP_BUFFER_OUTPUT_KEY, 0, 0, \ "Buffer hostranged output.", 29}, \ { "consolidate-output", ARGP_CONSOLIDATE_OUTPUT_KEY, 0, 0, \ "Consolidate hostranged output.", 30}, \ { "fanout", ARGP_FANOUT_KEY, "NUM", 0, \ "Specify multiple host fanout.", 31}, \ { "eliminate", ARGP_ELIMINATE_KEY, 0, 0, \ "Eliminate undetected nodes.", 32}, \ { "always-prefix", ARGP_ALWAYS_PREFIX_KEY, 0, 0, \ "Always prefix output.", 33} #define ARGP_COMMON_OPTIONS_DEBUG \ { "debug", ARGP_DEBUG_KEY, 0, 0, \ "Turn on debugging.", 34} struct common_cmd_args { /* inband options */ ipmi_driver_type_t driver_type; int driver_type_outofband_only; /* flag - set internally only */ int disable_auto_probe; unsigned int driver_address; char *driver_device; unsigned int register_spacing; uint8_t target_channel_number; int target_channel_number_is_set; /* user can input zero, so need a flag */ uint8_t target_slave_address; int target_slave_address_is_set; /* user can input zero so need a flag */ /* outofband options */ char *hostname; char *username; char *password; uint8_t k_g[IPMI_MAX_K_G_LENGTH+1]; unsigned int k_g_len; unsigned int session_timeout; unsigned int retransmission_timeout; int authentication_type; int cipher_suite_id; int privilege_level; /* * misc options */ char *config_file; unsigned int workaround_flags_outofband; unsigned int workaround_flags_outofband_2_0; unsigned int workaround_flags_inband; unsigned int workaround_flags_sdr; unsigned int section_specific_workaround_flags; int debug; /* sdr options */ int flush_cache; int quiet_cache; int sdr_cache_recreate; char *sdr_cache_file; char *sdr_cache_directory; int ignore_sdr_cache; /* time options */ int utc_to_localtime; int localtime_to_utc; int utc_offset; /* hostrange options */ int buffer_output; int consolidate_output; unsigned int fanout; int eliminate; int always_prefix; }; error_t common_parse_opt (int key, char *arg, struct common_cmd_args *common_args); void init_common_cmd_args_user (struct common_cmd_args *common_args); void init_common_cmd_args_operator (struct common_cmd_args *common_args); void init_common_cmd_args_admin (struct common_cmd_args *common_args); void verify_common_cmd_args_inband (struct common_cmd_args *common_args); void verify_common_cmd_args_outofband (struct common_cmd_args *common_args, int check_hostname); void verify_common_cmd_args (struct common_cmd_args *common_args); /* to parse only the --config-file option */ error_t cmdline_config_file_parse (int key, char *arg, struct argp_state *state); #endif /* TOOL_CMDLINE_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-daemon-common.c0000644002055400205540000000754113527331635022617 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "tool-daemon-common.h" #include "freeipmi-portability.h" #include "error.h" static char *daemon_pidfile = NULL; static sighandler_t daemon_cb = NULL; int daemonize_common (const char *pidfile) { unsigned int i; pid_t pid; int fds[2]; assert (pidfile); /* Based on code in Unix network programming by R. Stevens */ if (pipe (fds) < 0 ) err_exit ("pipe: %s", strerror (errno)); if ((pid = fork ()) < 0) err_exit ("fork: %s", strerror (errno)); if (pid) { /* parent terminates */ char buf; if (read(fds[0], &buf, 1) < 0) err_exit ("read: %s", strerror (errno)); close(fds[1]); close(fds[0]); exit (0); } setsid (); if (signal (SIGHUP, SIG_IGN) == SIG_ERR) err_exit ("signal: %s", strerror (errno)); if ((pid = fork ()) < 0) err_exit ("fork: %s", strerror (errno)); if (pid) { FILE *pf; /* Do not want pidfile writable to group/other */ umask(022); (void) unlink (pidfile); if (!(pf = fopen (pidfile, "w"))) err_exit ("Cannot open pidfile '%s': %s", pidfile, strerror (errno)); /* write the 2nd child PID to the pidfile */ fprintf (pf, "%u\n", pid); fclose (pf); exit (0); /* 1st child terminates */ } if (chdir ("/") < 0) err_exit ("chdir: %s", strerror (errno)); umask (0); if (write(fds[1], "a", 1) < 0) err_exit ("write: %s", strerror (errno)); close(fds[1]); close(fds[0]); for (i = 0; i < 64; i++) close (i); daemon_pidfile = (char *)pidfile; return (0); } static void _daemon_shutdown_signal_handler (int sig) { /* user may not have called daemonize(), perhaps running in debug mode */ if (daemon_pidfile) (void) unlink (daemon_pidfile); if (daemon_cb) daemon_cb (sig); } int daemon_signal_handler_setup (sighandler_t cb) { /* cb can NULL, for no callback */ if (signal (SIGTERM, _daemon_shutdown_signal_handler) == SIG_ERR) err_exit ("signal: %s", strerror (errno)); if (signal (SIGINT, _daemon_shutdown_signal_handler) == SIG_ERR) err_exit ("signal: %s", strerror (errno)); if (signal (SIGQUIT, _daemon_shutdown_signal_handler) == SIG_ERR) err_exit ("signal: %s", strerror (errno)); daemon_cb = cb; return (0); } int daemon_sleep (unsigned int sleep_len) { struct timeval tv; if (!sleep_len) return (0); tv.tv_sec = sleep_len; tv.tv_usec = 0; if (select (1, NULL, NULL, NULL, &tv) < 0) { if (errno != EINTR) err_exit ("select: %s", strerror (errno)); } return (0); } freeipmi-1.6.4/common/toolcommon/tool-daemon-common.h0000644002055400205540000000230713527331635022617 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_DAEMON_COMMON_H #define TOOL_DAEMON_COMMON_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #ifndef HAVE_SIGHANDLER_T typedef void (*sighandler_t)(int); #endif /* HAVE_SIGHANDLER_T */ int daemonize_common (const char *pidfile); /* can pass NULL for no callback */ int daemon_signal_handler_setup (sighandler_t cb); /* signal handlers + sleep(3) is a bad idea */ int daemon_sleep (unsigned int sleep_len); #endif /* TOOL_DAEMON_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-event-common.c0000644002055400205540000003661513527331635022501 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "tool-event-common.h" #include "tool-sdr-cache-common.h" #include "freeipmi-portability.h" #include "pstdout.h" int event_load_event_state_config_file (pstdout_state_t pstate, ipmi_interpret_ctx_t interpret_ctx, const char *event_state_config_file) { if (event_state_config_file) { if (ipmi_interpret_load_sel_config (interpret_ctx, event_state_config_file) < 0) { if (ipmi_interpret_ctx_errnum (interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST) PSTDOUT_FPRINTF (pstate, stderr, "event state config file '%s' does not exist\n", event_state_config_file); else if (ipmi_interpret_ctx_errnum (interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_PARSE) PSTDOUT_FPRINTF (pstate, stderr, "event state config file '%s' parse error\n", event_state_config_file); else PSTDOUT_FPRINTF (pstate, stderr, "ipmi_interpret_load_sel_config: %s\n", ipmi_interpret_ctx_errormsg (interpret_ctx)); return (-1); } } else { if (ipmi_interpret_load_sel_config (interpret_ctx, NULL) < 0) { if (ipmi_interpret_ctx_errnum (interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_PARSE) PSTDOUT_FPRINTF (pstate, stderr, "event state config file parse error\n"); else PSTDOUT_FPRINTF (pstate, stderr, "ipmi_interpret_load_sel_config: %s\n", ipmi_interpret_ctx_errormsg (interpret_ctx)); return (-1); } } return (0); } /* return -1 on failout error, 0 on invalid data */ static int _sel_parse_err_handle (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, int debug, const char *func) { assert (sel_ctx); assert (func); if (ipmi_sel_ctx_errnum (sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) { /* most likely bad event data from remote system or user input */ if (debug) PSTDOUT_FPRINTF (pstate, stderr, "Invalid data\n"); return (0); } PSTDOUT_FPRINTF (pstate, stderr, "%s: %s\n", func, ipmi_sel_ctx_errormsg (sel_ctx)); return (-1); } /* return -1 on failout error, 0 on invalid data, 1 otherwise */ static int _sel_parse_record_string (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int debug, unsigned int flags, char outbuf[EVENT_OUTPUT_BUFLEN + 1], int *outbuf_len, const char *fmt) { assert (sel_ctx); assert (outbuf); assert (outbuf_len); memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((*outbuf_len = ipmi_sel_parse_read_record_string (sel_ctx, fmt, sel_record, sel_record_len, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (pstate, sel_ctx, debug, "ipmi_sel_parse_format_record_string") < 0) return (-1); return (0); } return (1); } int event_output_time (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int ret; assert (sel_ctx); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, debug, flags, outbuf, &outbuf_len, "%t")) < 0) return (-1); if (!ret) return (0); if (comma_separated_output) { if (outbuf_len) PSTDOUT_PRINTF (pstate, ",%s", outbuf); else PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) PSTDOUT_PRINTF (pstate, " | %-8s", outbuf); else PSTDOUT_PRINTF (pstate, " | %-8s", EVENT_NA_STRING); } return (1); } int event_output_not_available_time (pstdout_state_t pstate, int comma_separated_output) { if (comma_separated_output) PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); else PSTDOUT_PRINTF (pstate, " | %-8s", EVENT_NA_STRING); return (1); } int event_output_sensor_name (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, struct sensor_column_width *column_width, struct common_cmd_args *common_args, int comma_separated_output, unsigned int flags) { char fmt[EVENT_FMT_BUFLEN + 1]; char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int ret; assert (sel_ctx); assert (column_width || (!column_width && comma_separated_output)); assert (common_args); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, common_args->debug, flags, outbuf, &outbuf_len, "%s")) < 0) return (-1); if (!ret) return (0); memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%s"); else { if (outbuf_len > column_width->sensor_name) column_width->sensor_name = outbuf_len; snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-%ds", column_width->sensor_name); } if (outbuf_len) PSTDOUT_PRINTF (pstate, fmt, outbuf); else PSTDOUT_PRINTF (pstate, fmt, EVENT_NA_STRING); return (1); } int event_output_not_available_sensor_name (pstdout_state_t pstate, struct sensor_column_width *column_width, int comma_separated_output) { char fmt[EVENT_FMT_BUFLEN + 1]; assert (column_width || (!column_width && comma_separated_output)); memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%s"); else snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-%ds", column_width->sensor_name); PSTDOUT_PRINTF (pstate, fmt, EVENT_NA_STRING); return (1); } int event_output_sensor_type (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, struct sensor_column_width *column_width, int comma_separated_output, int debug, unsigned int flags) { char fmt[EVENT_FMT_BUFLEN + 1]; char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int ret; assert (sel_ctx); assert (column_width || (!column_width && comma_separated_output)); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, debug, flags, outbuf, &outbuf_len, "%T")) < 0) return (-1); if (!ret) return (0); memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%s"); else { if (outbuf_len > column_width->sensor_type) column_width->sensor_type = outbuf_len; snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-%ds", column_width->sensor_type); } if (outbuf_len) PSTDOUT_PRINTF (pstate, fmt, outbuf); else PSTDOUT_PRINTF (pstate, fmt, EVENT_NA_STRING); return (1); } int event_output_not_available_sensor_type (pstdout_state_t pstate, struct sensor_column_width *column_width, int comma_separated_output) { char fmt[EVENT_FMT_BUFLEN + 1]; assert (column_width || (!column_width && comma_separated_output)); memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%s"); else snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-%ds", column_width->sensor_type); PSTDOUT_PRINTF (pstate, fmt, EVENT_NA_STRING); return (1); } int event_output_event_state (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int ret; assert (sel_ctx); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, debug, flags, outbuf, &outbuf_len, "%I")) < 0) return (-1); if (!ret) return (0); if (comma_separated_output) { if (outbuf_len) PSTDOUT_PRINTF (pstate, ",%s", outbuf); else PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) PSTDOUT_PRINTF (pstate, " | %-8s", outbuf); else PSTDOUT_PRINTF (pstate, " | %-8s", EVENT_NA_STRING); } return (1); } int event_output_event_direction (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int ret; assert (sel_ctx); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, debug, flags, outbuf, &outbuf_len, "%k")) < 0) return (-1); if (!ret) return (0); if (comma_separated_output) { if (outbuf_len) PSTDOUT_PRINTF (pstate, ",%s", outbuf); else PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) PSTDOUT_PRINTF (pstate, " | %-17s", outbuf); else PSTDOUT_PRINTF (pstate, " | %-17s", EVENT_NA_STRING); } return (1); } int event_output_not_available_event_direction (pstdout_state_t pstate, int comma_separated_output) { if (comma_separated_output) PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); else PSTDOUT_PRINTF (pstate, " | %-17s", EVENT_NA_STRING); return (1); } int event_output_event (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len = 0; int ret; assert (sel_ctx); if ((ret = _sel_parse_record_string (pstate, sel_ctx, sel_record, sel_record_len, debug, flags, outbuf, &outbuf_len, "%E")) < 0) return (-1); if (!ret) return (0); if (comma_separated_output) { if (outbuf_len) PSTDOUT_PRINTF (pstate, ",%s", outbuf); else PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) PSTDOUT_PRINTF (pstate, " | %s", outbuf); else PSTDOUT_PRINTF (pstate, " | %s", EVENT_NA_STRING); } return (1); } int event_output_not_available_event (pstdout_state_t pstate, int comma_separated_output) { if (comma_separated_output) PSTDOUT_PRINTF (pstate, ",%s", EVENT_NA_STRING); else PSTDOUT_PRINTF (pstate, " | %s", EVENT_NA_STRING); return (1); } freeipmi-1.6.4/common/toolcommon/tool-event-common.h0000644002055400205540000001107013527331635022472 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_EVENT_COMMON_H #define TOOL_EVENT_COMMON_H #include #include #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "tool-sensor-common.h" #include "pstdout.h" #define EVENT_FMT_BUFLEN 4096 #define EVENT_OUTPUT_BUFLEN 4096 #define EVENT_NA_STRING "N/A" #define EVENT_OUTPUT_SEPARATOR " ; " int event_load_event_state_config_file (pstdout_state_t pstate, ipmi_interpret_ctx_t interpret_ctx, const char *event_state_config_file); /* All functions below * return 1 on success * return (0) on non-success, data ill-formed/invalid * return (-1) on error */ int event_output_time (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags); int event_output_not_available_time (pstdout_state_t pstate, int comma_separated_output); int event_output_sensor_name (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, struct sensor_column_width *column_width, struct common_cmd_args *common_args, int comma_separated_output, unsigned int flags); int event_output_not_available_sensor_name (pstdout_state_t pstate, struct sensor_column_width *column_width, int comma_separated_output); int event_output_sensor_type (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, struct sensor_column_width *column_width, int comma_separated_output, int debug, unsigned int flags); int event_output_not_available_sensor_type (pstdout_state_t pstate, struct sensor_column_width *column_width, int comma_separated_output); int event_output_event_state (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags); int event_output_event_direction (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags); int event_output_not_available_event_direction (pstdout_state_t pstate, int comma_separated_output); int event_output_event (pstdout_state_t pstate, ipmi_sel_ctx_t sel_ctx, uint8_t *sel_record, unsigned int sel_record_len, int comma_separated_output, int debug, unsigned int flags); int event_output_not_available_event (pstdout_state_t pstate, int comma_separated_output); #endif /* TOOL_EVENT_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-hostrange-common.c0000644002055400205540000001464413527331635023350 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "freeipmi-portability.h" #include "fi_hostlist.h" #include "pstdout.h" #include "tool-hostrange-common.h" #define FI_HOSTLIST_BUFLEN 1024 static int eliminate_nodes (char **hosts) { fi_hostlist_t hl = NULL; fi_hostlist_t hlnew = NULL; fi_hostlist_iterator_t hitr = NULL; ipmidetect_t id = NULL; char *host = NULL; char hostbuf[FI_HOSTLIST_BUFLEN + 1]; int rv = -1; assert (hosts); assert (*hosts); if (!(id = ipmidetect_handle_create ())) { fprintf (stderr, "ipmidetect_handle_create\n"); goto cleanup; } if (ipmidetect_load_data (id, NULL, 0, 0) < 0) { if (ipmidetect_errnum (id) == IPMIDETECT_ERR_CONNECT || ipmidetect_errnum (id) == IPMIDETECT_ERR_CONNECT_TIMEOUT) fprintf (stderr, "Error connecting to ipmidetect daemon\n"); else fprintf (stderr, "ipmidetect_load_data: %s\n", ipmidetect_errormsg (id)); goto cleanup; } if (!(hl = fi_hostlist_create (*hosts))) { fprintf (stderr, "fi_hostlist_create: %s\n", strerror (errno)); goto cleanup; } if (!(hlnew = fi_hostlist_create (*hosts))) { fprintf (stderr, "fi_hostlist_create: %s\n", strerror (errno)); goto cleanup; } if (!(hitr = fi_hostlist_iterator_create (hl))) { fprintf (stderr, "fi_hostlist_iterator_create: %s\n", strerror (errno)); goto cleanup; } while ((host = fi_hostlist_next (hitr))) { int ret; if ((ret = ipmidetect_is_node_detected (id, host)) < 0) { if (ipmidetect_errnum (id) == IPMIDETECT_ERR_NOTFOUND) fprintf (stderr, "Node '%s' unrecognized by ipmidetect\n", host); else fprintf (stderr, "ipmidetect_is_node_detected: %s\n", ipmidetect_errormsg (id)); goto cleanup; } if (!ret) fi_hostlist_delete (hlnew, host); free (host); } host = NULL; if (!fi_hostlist_count (hlnew)) { rv = 0; goto cleanup; } memset (hostbuf, '\0', FI_HOSTLIST_BUFLEN + 1); if (fi_hostlist_ranged_string (hlnew, FI_HOSTLIST_BUFLEN, hostbuf) < 0) { fprintf (stderr, "fi_hostlist_ranged_string: truncation\n"); goto cleanup; } free (*hosts); if (!(*hosts = strdup (hostbuf))) { fprintf (stderr, "strdup: %s\n", strerror (errno)); goto cleanup; } rv = fi_hostlist_count (hlnew); cleanup: if (id) ipmidetect_handle_destroy (id); if (hitr) fi_hostlist_iterator_destroy (hitr); if (hl) fi_hostlist_destroy (hl); if (hlnew) fi_hostlist_destroy (hlnew); free (host); return (rv); } int pstdout_setup (char **hosts, struct common_cmd_args *common_args) { unsigned int output_flags = 0; int hosts_count = 0; assert (hosts); assert (common_args); if (pstdout_init () < 0) { fprintf (stderr, "pstdout_init: %s\n", pstdout_strerror (pstdout_errnum)); goto cleanup; } if (*hosts) { if ((hosts_count = pstdout_hostnames_count (*hosts)) < 0) { fprintf (stderr, "pstdout_hostnames_count: %s\n", pstdout_strerror (pstdout_errnum)); goto cleanup; } if (!hosts_count) { fprintf (stderr, "invalid number of hosts specified\n"); goto cleanup; } } else /* inband communication, hosts_count = 1 */ { hosts_count = 1; /* if always prefix - turn hostname into "localhost" for prefixing */ if (common_args->always_prefix) { if (!(*hosts = strdup ("localhost"))) { fprintf (stderr, "strdup: %s\n", strerror (errno)); goto cleanup; } } } /* if hosts_count > 1 it is always prefixed, so ignore always_prefixed flag */ if (hosts_count > 1) { if (common_args->buffer_output) output_flags = PSTDOUT_OUTPUT_STDOUT_DEFAULT | PSTDOUT_OUTPUT_BUFFER_STDOUT | PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME; else if (common_args->consolidate_output) output_flags = PSTDOUT_OUTPUT_STDOUT_DEFAULT | PSTDOUT_OUTPUT_STDOUT_CONSOLIDATE | PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME; else output_flags = PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME | PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME; if (common_args->fanout) { if (pstdout_set_fanout (common_args->fanout) < 0) { fprintf (stderr, "pstdout_set_fanout: %s\n", pstdout_strerror (pstdout_errnum)); goto cleanup; } } } else if (hosts_count == 1 && common_args->always_prefix) output_flags = PSTDOUT_OUTPUT_STDOUT_PREPEND_HOSTNAME | PSTDOUT_OUTPUT_STDERR_PREPEND_HOSTNAME; if (output_flags) { if (pstdout_set_output_flags (output_flags) < 0) { fprintf (stderr, "pstdout_set_output_flags: %s\n", pstdout_strerror (pstdout_errnum)); goto cleanup; } } if (*hosts && common_args->eliminate) { int hosts_count_new; if ((hosts_count_new = eliminate_nodes (hosts)) < 0) goto cleanup; hosts_count = hosts_count_new; } return (hosts_count); cleanup: return (-1); } freeipmi-1.6.4/common/toolcommon/tool-hostrange-common.h0000644002055400205540000000170713527331635023351 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_HOSTRANGE_COMMON_H #define TOOL_HOSTRANGE_COMMON_H #include "tool-cmdline-common.h" /* Returns number of hosts setup for, -1 on error */ int pstdout_setup (char **hosts, struct common_cmd_args *common_args); #endif /* TOOL_HOSTRANGE_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-oem-common.c0000644002055400205540000000610213527331635022124 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "tool-oem-common.h" #include "freeipmi-portability.h" #include "pstdout.h" int ipmi_get_oem_data (pstdout_state_t pstate, ipmi_ctx_t ipmi_ctx, struct ipmi_oem_data *oem_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (ipmi_ctx); assert (oem_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_device_id_rs))) { PSTDOUT_FPRINTF (pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_device_id (ipmi_ctx, obj_cmd_rs) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_cmd_get_device_id: %s\n", ipmi_ctx_errormsg (ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "manufacturer_id.id", &val) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "fiid_obj_get: 'manufacturer_id.id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } oem_data->manufacturer_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "product_id", &val) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "fiid_obj_get: 'product_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } oem_data->product_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_version_major", &val) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "fiid_obj_get: 'ipmi_version_major': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } oem_data->ipmi_version_major = val; if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_version_minor", &val) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "fiid_obj_get: 'ipmi_version_minor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } oem_data->ipmi_version_minor = val; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/common/toolcommon/tool-oem-common.h0000644002055400205540000000222213527331635022130 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_OEM_COMMON_H #define TOOL_OEM_COMMON_H #include #include #include #include "pstdout.h" struct ipmi_oem_data { uint32_t manufacturer_id; uint16_t product_id; uint8_t ipmi_version_major; uint8_t ipmi_version_minor; }; int ipmi_get_oem_data (pstdout_state_t pstate, ipmi_ctx_t ipmi_ctx, struct ipmi_oem_data *oem_data); #endif /* TOOL_OEM_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-sdr-cache-common.c0000644002055400205540000005332713527331635023210 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include #include #include #define SDR_CACHE_DIR "sdr-cache" #define SDR_CACHE_FILENAME_PREFIX "sdr-cache" #define FREEIPMI_CONFIG_DIRECTORY_MODE 0700 #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif /* MAXHOSTNAMELEN */ #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ #include "tool-sdr-cache-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-cmdline-common.h" static int _get_home_directory (pstdout_state_t pstate, char *buf, unsigned int buflen) { uid_t user_id; struct passwd pwd; #if defined(HAVE_FUNC_GETPWUID_R_5) struct passwd *pwdptr = NULL; #endif long int tbuf_len; char *tbuf = NULL; int ret; int rv = -1; assert (buf); assert (buflen); #if defined(_SC_GETPW_R_SIZE_MAX) tbuf_len = sysconf (_SC_GETPW_R_SIZE_MAX); if (tbuf_len < 0) /* Variable was not implemented */ #endif tbuf_len = 4096; /* XXX */ if (!(tbuf = malloc (tbuf_len))) { PSTDOUT_PERROR (pstate, "malloc"); goto cleanup; } user_id = getuid (); memset (&pwd, '\0', sizeof (struct passwd)); #if defined(HAVE_FUNC_GETPWUID_R_5) if (getpwuid_r (user_id, &pwd, tbuf, tbuf_len, &(pwdptr)) != 0) { PSTDOUT_PERROR (pstate, "getpwuid_r"); goto cleanup; } if (!pwdptr) { /* User not found - can't figure out cache directory */ PSTDOUT_PERROR (pstate, "getpwuid_r"); goto cleanup; } #elif defined(HAVE_FUNC_GETPWUID_R_4) /* Jan Forch - Solaris getpwuid_r returns ptr, not integer */ if (!getpwuid_r (user_id, &pwd, tbuf, tbuf_len)) { PSTDOUT_PERROR (pstate, "getpwuid_r"); goto cleanup; } #endif /* !defined(HAVE_FUNC_GETPWUID_R_4) */ if (pwd.pw_dir) { if (!access (pwd.pw_dir, R_OK|W_OK|X_OK)) { if (strlen (pwd.pw_dir) > (buflen - 1)) { PSTDOUT_FPRINTF (pstate, stderr, "internal overflow error\n"); goto cleanup; } strcpy (buf, pwd.pw_dir); rv = 0; goto cleanup; } } if ((ret = snprintf (buf, buflen, "/tmp/.%s-%s", PACKAGE_NAME, pwd.pw_name)) < 0) { PSTDOUT_PERROR (pstate, "snprintf"); goto cleanup; } if (ret >= buflen) { PSTDOUT_FPRINTF (pstate, stderr, "snprintf invalid bytes written\n"); goto cleanup; } if (access (buf, R_OK|W_OK|X_OK) < 0) { if (errno == ENOENT) { if (mkdir (buf, FREEIPMI_CONFIG_DIRECTORY_MODE) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "Cannot make cache directory: %s: %s\n", buf, strerror (errno)); goto cleanup; } } else { PSTDOUT_FPRINTF (pstate, stderr, "Cannot access cache directory: %s\n", buf); goto cleanup; } } rv = 0; cleanup: free (tbuf); return (rv); } static int _get_config_directory (pstdout_state_t pstate, const char *cache_dir, char *buf, unsigned int buflen) { char tbuf[MAXPATHLEN+1]; int ret; assert (buf); assert (buflen); memset (tbuf, '\0', MAXPATHLEN+1); if (!cache_dir) { if (_get_home_directory (pstate, tbuf, MAXPATHLEN) < 0) return (-1); } else { if (strlen (cache_dir) > (MAXPATHLEN - 1)) { PSTDOUT_FPRINTF (pstate, stderr, "internal overflow error\n"); return (-1); } strcpy (tbuf, cache_dir); if (access (tbuf, R_OK|W_OK|X_OK) < 0) { if (errno == ENOENT) { if (mkdir (tbuf, FREEIPMI_CONFIG_DIRECTORY_MODE) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "Cannot make cache directory: %s: %s\n", tbuf, strerror (errno)); return (-1); } } else { PSTDOUT_FPRINTF (pstate, stderr, "Cannot access cache directory: %s\n", tbuf); return (-1); } } } if ((ret = snprintf (buf, buflen, "%s/.%s", tbuf, PACKAGE_NAME)) < 0) { PSTDOUT_PERROR (pstate, "snprintf"); return (-1); } if (ret >= buflen) { PSTDOUT_FPRINTF (pstate, stderr, "snprintf invalid bytes written\n"); return (-1); } return (0); } static int _sdr_cache_get_cache_directory (pstdout_state_t pstate, const char *cache_dir, char *buf, unsigned int buflen) { char tbuf[MAXPATHLEN+1]; int ret; assert (buf); assert (buflen); memset (tbuf, '\0', MAXPATHLEN+1); if (_get_config_directory (pstate, cache_dir, tbuf, MAXPATHLEN) < 0) return (-1); if ((ret = snprintf (buf, buflen, "%s/%s", tbuf, SDR_CACHE_DIR)) < 0) { PSTDOUT_PERROR (pstate, "snprintf"); return (-1); } if (ret >= buflen) { PSTDOUT_FPRINTF (pstate, stderr, "snprintf invalid bytes written\n"); return (-1); } return (0); } static int _sdr_cache_get_cache_filename (pstdout_state_t pstate, const char *hostname, const struct common_cmd_args *common_args, char *buf, unsigned int buflen) { char sdrcachebuf[MAXPATHLEN+1]; char *ptr; int ret; assert (common_args); assert (buf); assert (buflen); if (!common_args->sdr_cache_file) { char hostnamebuf[MAXHOSTNAMELEN+1]; memset (hostnamebuf, '\0', MAXHOSTNAMELEN+1); if (gethostname (hostnamebuf, MAXHOSTNAMELEN) < 0) snprintf (hostnamebuf, MAXHOSTNAMELEN, "localhost"); /* shorten hostname if necessary */ if ((ptr = strchr (hostnamebuf, '.'))) *ptr = '\0'; if (_sdr_cache_get_cache_directory (pstate, common_args->sdr_cache_directory, sdrcachebuf, MAXPATHLEN) < 0) return (-1); if ((ret = snprintf (buf, buflen, "%s/%s-%s.%s", sdrcachebuf, SDR_CACHE_FILENAME_PREFIX, hostnamebuf, hostname ? hostname : "localhost")) < 0) { PSTDOUT_PERROR (pstate, "snprintf"); return (-1); } if (ret >= buflen) { PSTDOUT_FPRINTF (pstate, stderr, "snprintf invalid bytes written\n"); return (-1); } } else { if (strlen (common_args->sdr_cache_file) > (MAXPATHLEN - 1)) { PSTDOUT_FPRINTF (pstate, stderr, "internal overflow error\n"); return (-1); } if (access (common_args->sdr_cache_file, R_OK) < 0) { if (errno != ENOENT) { PSTDOUT_FPRINTF (pstate, stderr, "Cannot access cache file: %s\n", common_args->sdr_cache_file); return (-1); } else { /* File doesn't exist, do checks for directory */ char cachedirbuf[MAXPATHLEN+1]; char *cachedirptr; strcpy (cachedirbuf, common_args->sdr_cache_file); cachedirptr = dirname (cachedirbuf); if (_sdr_cache_get_cache_directory (pstate, cachedirptr, sdrcachebuf, MAXPATHLEN) < 0) return (-1); } } if ((ret = snprintf (buf, buflen, "%s", common_args->sdr_cache_file)) < 0) { PSTDOUT_PERROR (pstate, "snprintf"); return (-1); } if (ret >= buflen) { PSTDOUT_FPRINTF (pstate, stderr, "snprintf invalid bytes written\n"); return (-1); } } return (0); } static int _setup_sdr_cache_directory (pstdout_state_t pstate, const char *cache_dir) { char configbuf[MAXPATHLEN+1]; char cachebuf[MAXPATHLEN+1]; int ret; memset (configbuf, '\0', MAXPATHLEN+1); memset (cachebuf, '\0', MAXPATHLEN+1); if (_get_config_directory (pstate, cache_dir, configbuf, MAXPATHLEN) < 0) return (-1); errno = 0; ret = mkdir (configbuf, FREEIPMI_CONFIG_DIRECTORY_MODE); if (ret < 0 && errno != EEXIST) { PSTDOUT_FPRINTF (pstate, stderr, "Cannot make cache directory: %s: %s\n", configbuf, strerror (errno)); return (-1); } if (_sdr_cache_get_cache_directory (pstate, cache_dir, cachebuf, MAXPATHLEN) < 0) return (-1); errno = 0; ret = mkdir (cachebuf, FREEIPMI_CONFIG_DIRECTORY_MODE); if (ret < 0 && errno != EEXIST) { PSTDOUT_FPRINTF (pstate, stderr, "Cannot make cache directory: %s: %s\n", cachebuf, strerror (errno)); return (-1); } return (0); } void _sdr_cache_create_callback (uint8_t sdr_version, uint16_t record_count, uint32_t most_recent_addition_timestamp, uint32_t most_recent_erase_timestamp, uint16_t record_id, void *data) { int *count; assert (data); count = (int *)data; (*count)++; /* pstdout library can't handle \r, its the responsibility of * tool code to set quiet_cache if there are multiple * hosts are generating the cache at the same time. */ fprintf (stderr, "Caching SDR record %d of %d (current record ID %d) \r", *count, record_count, record_id); } static int _sdr_cache_create_directory (pstdout_state_t pstate, const char *cache_dir) { char cachedirectorybuf[MAXPATHLEN+1]; struct stat buf; if (_sdr_cache_get_cache_directory (pstate, cache_dir, cachedirectorybuf, MAXPATHLEN) < 0) return (-1); if (stat (cachedirectorybuf, &buf) < 0) { if (_setup_sdr_cache_directory (pstate, cache_dir) < 0) return (-1); } return (0); } int _sdr_cache_create (ipmi_sdr_ctx_t ctx, pstdout_state_t pstate, ipmi_ctx_t ipmi_ctx, const char *hostname, const struct common_cmd_args *common_args) { char cachefilenamebuf[MAXPATHLEN+1]; int count = 0; int cache_create_flags = 0; int rv = -1; assert (ctx); assert (ipmi_ctx); assert (common_args); if (_sdr_cache_create_directory (pstate, common_args->sdr_cache_directory) < 0) goto cleanup; memset (cachefilenamebuf, '\0', MAXPATHLEN+1); if (_sdr_cache_get_cache_filename (pstate, hostname, common_args, cachefilenamebuf, MAXPATHLEN) < 0) goto cleanup; /* pstdout library can't handle \r, its the responsibility of * tool code to set quiet_cache if there are multiple * hosts are generating the cache at the same time. */ if (!common_args->quiet_cache) fprintf (stderr, "Caching SDR repository information: %s\n", cachefilenamebuf); if (common_args->sdr_cache_recreate) cache_create_flags = IPMI_SDR_CACHE_CREATE_FLAGS_OVERWRITE; else cache_create_flags = IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT; if (common_args->workaround_flags_sdr & IPMI_PARSE_WORKAROUND_FLAGS_SDR_ASSUME_MAX_SDR_RECORD_COUNT) cache_create_flags |= IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT; if (ipmi_sdr_cache_create (ctx, ipmi_ctx, cachefilenamebuf, cache_create_flags, common_args->quiet_cache ? NULL : _sdr_cache_create_callback, common_args->quiet_cache ? NULL : (void *)&count) < 0) { /* unique output corner case */ if (count && !common_args->quiet_cache) fprintf (stderr, "\n"); PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_create: %s\n", ipmi_sdr_ctx_errormsg (ctx)); goto cleanup; } if (!common_args->quiet_cache) fprintf (stderr, "\n"); rv = 0; cleanup: if (rv < 0) ipmi_sdr_cache_delete (ctx, cachefilenamebuf); return (rv); } int sdr_cache_create_and_load (ipmi_sdr_ctx_t sdr_ctx, pstdout_state_t pstate, ipmi_ctx_t ipmi_ctx, const char *hostname, const struct common_cmd_args *common_args) { char cachefilenamebuf[MAXPATHLEN+1]; int rv = -1; assert (sdr_ctx); assert (common_args); memset (cachefilenamebuf, '\0', MAXPATHLEN+1); if (_sdr_cache_get_cache_filename (pstate, hostname, common_args, cachefilenamebuf, MAXPATHLEN) < 0) goto cleanup; /* If user specifies cache file, don't check timestamps, just load it */ if (ipmi_sdr_cache_open (sdr_ctx, common_args->sdr_cache_file ? NULL : ipmi_ctx, cachefilenamebuf) < 0) { if (ipmi_sdr_ctx_errnum (sdr_ctx) != IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST && !((ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_INVALID || ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_OUT_OF_DATE) && common_args->sdr_cache_recreate)) { if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_INVALID) { PSTDOUT_FPRINTF (pstate, stderr, "SDR Cache '%s' invalid: Please flush the cache and regenerate it\n", cachefilenamebuf); goto cleanup; } else if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_OUT_OF_DATE) { PSTDOUT_FPRINTF (pstate, stderr, "SDR Cache '%s' out of date: Please flush the cache and regenerate it\n", cachefilenamebuf); goto cleanup; } else { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_open: %s: %s\n", cachefilenamebuf, ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } } } if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST || ((ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_INVALID || ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_CACHE_OUT_OF_DATE) && common_args->sdr_cache_recreate)) { if (_sdr_cache_create (sdr_ctx, pstate, ipmi_ctx, hostname, common_args) < 0) goto cleanup; if (ipmi_sdr_cache_open (sdr_ctx, common_args->sdr_cache_file ? NULL : ipmi_ctx, cachefilenamebuf) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_open: %s: %s\n", cachefilenamebuf, ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } } if (common_args->debug) { /* Don't error out, if this fails we can still continue */ if (ipmi_sdr_ctx_set_flags (sdr_ctx, IPMI_SDR_FLAGS_DEBUG_DUMP) < 0) PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_ctx_set_flags: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); if (hostname) { if (ipmi_sdr_ctx_set_debug_prefix (sdr_ctx, hostname) < 0) PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_ctx_set_debug_prefix: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); } } rv = 0; cleanup: return (rv); } int sdr_cache_flush_cache (pstdout_state_t pstate, const char *hostname, const struct common_cmd_args *common_args) { ipmi_sdr_ctx_t ctx = NULL; char cachefilenamebuf[MAXPATHLEN+1]; int rv = -1; assert (common_args); memset (cachefilenamebuf, '\0', MAXPATHLEN+1); if (_sdr_cache_get_cache_filename (pstate, hostname, common_args, cachefilenamebuf, MAXPATHLEN) < 0) goto cleanup; if (!common_args->quiet_cache) PSTDOUT_PRINTF (pstate, "Flushing cache: %s\n", cachefilenamebuf); if (!(ctx = ipmi_sdr_ctx_create ())) { PSTDOUT_PERROR (pstate, "ipmi_sdr_ctx_create"); goto cleanup; } if (ipmi_sdr_cache_delete (ctx, cachefilenamebuf) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_delete: %s\n", ipmi_sdr_ctx_errormsg (ctx)); goto cleanup; } rv = 0; cleanup: ipmi_sdr_ctx_destroy (ctx); return (rv); } int ipmi_sdr_cache_search_sensor_wrapper (ipmi_sdr_ctx_t sdr_ctx, uint8_t sensor_number, uint8_t generator_id) { int rv; assert (sdr_ctx); if ((rv = ipmi_sdr_cache_search_sensor (sdr_ctx, sensor_number, generator_id)) < 0) { /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * The slave address is reported incorrectly by having the * generator_id be shifted over by one. This is a special "try * again" corner case. */ if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_NOT_FOUND && (generator_id == (IPMI_SLAVE_ADDRESS_BMC << 1))) { if (!ipmi_sdr_cache_search_sensor (sdr_ctx, sensor_number, (generator_id >> 1))) return (0); /* else fall through to normal error case */ } return (rv); } return (rv); } freeipmi-1.6.4/common/toolcommon/tool-sdr-cache-common.h0000644002055400205540000000322713527331635023207 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_SDR_CACHE_COMMON_H #define TOOL_SDR_CACHE_COMMON_H #include #include #include #include "tool-cmdline-common.h" #include "pstdout.h" int sdr_cache_create_and_load (ipmi_sdr_ctx_t sdr_ctx, pstdout_state_t pstate, ipmi_ctx_t ipmi_ctx, const char *hostname, const struct common_cmd_args *common_args); int sdr_cache_flush_cache (pstdout_state_t pstate, const char *hostname, const struct common_cmd_args *common_args); /* wrapper for ipmi_sdr_cache_search_sensor, handles some additional special workarounds */ int ipmi_sdr_cache_search_sensor_wrapper (ipmi_sdr_ctx_t sdr_ctx, uint8_t sensor_number, uint8_t generator_id); #endif /* TOOL_SDR_CACHE_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-sensor-common.c0000644002055400205540000007122313527331635022663 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "tool-sensor-common.h" #include "tool-sdr-cache-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #define RECORD_ID_BUFLEN 64 #define SENSOR_TYPE_BUFLEN 1024 #define SENSOR_UNITS_BUFLEN 1024 #define SENSOR_FMT_BUFLEN 1024 #define SENSOR_MODIFIER_BUFLEN 1024 #define SENSOR_CHARS_IN_ALPHA 26 #define SENSORS_SENSOR_NAME_LENGTH 16 static void _str_replace_char (char *str, char chr, char with) { char *p = NULL; char *s = NULL; assert (str); for (s = str; (p = strchr (s, chr)); s = p + 1) *p = with; } const char * get_sensor_type_output_string (unsigned int sensor_type) { const char *sensor_type_str; if ((sensor_type_str = ipmi_get_sensor_type_string (sensor_type))) return (sensor_type_str); return (UNRECOGNIZED_SENSOR_TYPE); } const char * get_oem_sensor_type_output_string (uint8_t sensor_type, uint8_t event_reading_code, uint32_t manufacturer_id, uint16_t product_id) { const char *sensor_type_str; if ((sensor_type_str = ipmi_get_oem_sensor_type_string (sensor_type, event_reading_code, manufacturer_id, product_id))) return (sensor_type_str); return (UNRECOGNIZED_SENSOR_TYPE); } static void _get_sensor_type_cmdline_string (char *sensor_type) { assert (sensor_type); _str_replace_char (sensor_type, ' ', '_'); _str_replace_char (sensor_type, '/', '_'); } static int _output_sensor_type (const char *sensor_type_str) { char *tmpstr = NULL; assert (sensor_type_str); if (!(tmpstr = (char *)strdup (sensor_type_str))) { perror ("strdup"); return (-1); } _get_sensor_type_cmdline_string (tmpstr); printf ("%s\n", tmpstr); free (tmpstr); return (0); } int parse_sensor_types (const char *special_string, char sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int *sensor_types_length, const char *arg) { char *strtmp; char *tok; assert (special_string); assert (sensor_types); assert (sensor_types_length); assert (arg); if (!(strtmp = strdup (arg))) { perror (arg); return (-1); } tok = strtok (strtmp, " ,"); while (tok && (*sensor_types_length) < MAX_SENSOR_TYPES) { if (!strcasecmp (tok, special_string)) { (*sensor_types_length) = 0; break; } strncpy (sensor_types[(*sensor_types_length)], tok, MAX_SENSOR_TYPES_STRING_LENGTH); (*sensor_types_length)++; tok = strtok (NULL, " ,"); } free (strtmp); return (0); } int list_sensor_types (void) { unsigned int i; for (i = IPMI_SENSOR_TYPE_TEMPERATURE; i <= IPMI_SENSOR_TYPE_FRU_STATE; i++) { assert (ipmi_sensor_types[i]); if (_output_sensor_type (ipmi_sensor_types[i]) < 0) return (-1); } if (_output_sensor_type (ipmi_oem_sensor_type) < 0) return (-1); return (0); } int valid_sensor_types (char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length) { unsigned int i; assert (sensor_types); assert (sensor_types_length); for (i = 0; i < sensor_types_length; i++) { int j = 0; int found = 0; int value; char *ptr = NULL; errno = 0; value = strtol (sensor_types[i], &ptr, 0); if (!errno && !ptr[0] && (IPMI_SENSOR_TYPE_VALID ((uint8_t)value) || IPMI_SENSOR_TYPE_IS_OEM ((uint8_t)value))) found++; if (!found) { while (ipmi_sensor_types[j]) { char sensor_type_cmdline[MAX_SENSOR_TYPES_STRING_LENGTH]; strcpy (sensor_type_cmdline, ipmi_sensor_types[j]); _get_sensor_type_cmdline_string (sensor_type_cmdline); if (!strcasecmp (sensor_types[i], ipmi_sensor_types[j]) || !strcasecmp (sensor_types[i], sensor_type_cmdline)) { found++; break; } j++; } } if (!found) { char sensor_type_cmdline[MAX_SENSOR_TYPES_STRING_LENGTH]; strcpy (sensor_type_cmdline, ipmi_oem_sensor_type); _get_sensor_type_cmdline_string (sensor_type_cmdline); if (!strcasecmp (sensor_types[i], ipmi_oem_sensor_type) || !strcasecmp (sensor_types[i], sensor_type_cmdline)) found++; } if (!found) { fprintf (stderr, "invalid sensor type '%s'\n", sensor_types[i]); return (-1); } } return (0); } static int _sensor_units_output_string (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char *sensor_units_buf, unsigned int sensor_units_buflen, unsigned int non_abbreviated_units_flag, int output_on_error) { uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; int sensor_units_ret = 0; int rv = -1; assert (sdr_ctx); assert (sensor_units_buf); assert (sensor_units_buflen); if (ipmi_sdr_parse_sensor_units (sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) { if (output_on_error) PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_units: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } sensor_units_ret = ipmi_sensor_units_string (sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type, sensor_units_buf, sensor_units_buflen, !non_abbreviated_units_flag); if (sensor_units_ret <= 0) snprintf (sensor_units_buf, sensor_units_buflen, "%s", ipmi_sensor_units[IPMI_SENSOR_UNIT_UNSPECIFIED]); rv = 0; cleanup: return rv; } int get_sensor_units_output_string (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char *sensor_units_buf, unsigned int sensor_units_buflen, unsigned int non_abbreviated_units_flag) { return _sensor_units_output_string (pstate, sdr_ctx, sensor_units_buf, sensor_units_buflen, non_abbreviated_units_flag, 1); } static int _sensor_type_strcmp (pstdout_state_t pstate, const char *sensor_type_str_input, uint8_t sensor_type) { const char *sensor_type_str; char *tmpstr = NULL; int rv = -1; int value; char *ptr = NULL; assert (sensor_type_str_input); errno = 0; value = strtol (sensor_type_str_input, &ptr, 0); /* should be validated earlier - this in the only check to do */ if (!errno && !ptr[0]) { if ((uint8_t)value == sensor_type) rv = 1; else rv = 0; goto cleanup; } /* Don't use get_sensor_type_output_string() - want NULL if invalid */ sensor_type_str = ipmi_get_sensor_type_string (sensor_type); if (!sensor_type_str) { rv = 0; goto cleanup; } if (!(tmpstr = strdup (sensor_type_str))) { PSTDOUT_FPRINTF (pstate, stderr, "strdup: %s\n", strerror (errno)); goto cleanup; } _get_sensor_type_cmdline_string (tmpstr); if (!strcasecmp (sensor_type_str_input, sensor_type_str) || !strcasecmp (sensor_type_str_input, tmpstr)) rv = 1; else rv = 0; cleanup: free (tmpstr); return (rv); } int sensor_type_listed (pstdout_state_t pstate, uint8_t sensor_type, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length) { unsigned int i; assert (sensor_types); assert (sensor_types_length); for (i = 0; i < sensor_types_length; i++) { int ret; if ((ret = _sensor_type_strcmp (pstate, sensor_types[i], sensor_type)) < 0) return (-1); if (ret) return (1); } return (0); } int sensor_type_listed_sdr (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length) { uint8_t record_type; uint8_t sensor_type; assert (sdr_ctx); assert (sensor_types); assert (sensor_types_length); if (ipmi_sdr_parse_record_id_and_type (sdr_ctx, NULL, 0, NULL, &record_type) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) return (0); if (ipmi_sdr_parse_sensor_type (sdr_ctx, NULL, 0, &sensor_type) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } return (sensor_type_listed (pstate, sensor_type, sensor_types, sensor_types_length)); } static void _sensor_column_width_init (struct sensor_column_width *column_width) { assert (column_width); column_width->record_id = 0; column_width->sensor_name = 0; column_width->sensor_type = 0; column_width->sensor_units = 0; } static void _sensor_column_width_finish (struct sensor_column_width *column_width) { assert (column_width); if (column_width->record_id < strlen(SENSORS_HEADER_RECORD_ID_STR)) column_width->record_id = strlen(SENSORS_HEADER_RECORD_ID_STR); if (column_width->sensor_name < strlen(SENSORS_HEADER_NAME_STR)) column_width->sensor_name = strlen(SENSORS_HEADER_NAME_STR); if (column_width->sensor_type < strlen(SENSORS_HEADER_TYPE_STR)) column_width->sensor_type = strlen(SENSORS_HEADER_TYPE_STR); if (column_width->sensor_units < strlen(SENSORS_HEADER_UNITS_STR)) column_width->sensor_units = strlen(SENSORS_HEADER_UNITS_STR); } static int _store_column_widths (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, uint8_t sensor_number, unsigned int non_abbreviated_units, unsigned int shared_sensors, unsigned int count_event_only_records, unsigned int count_device_locator_records, unsigned int count_oem_records, int entity_sensor_names, struct sensor_column_width *column_width) { char sensor_name[IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1]; char record_id_buf[RECORD_ID_BUFLEN + 1]; uint16_t record_id; uint8_t record_type; uint8_t sensor_type; uint8_t event_reading_type_code; int len; assert (sdr_ctx); assert (column_width); if (ipmi_sdr_parse_record_id_and_type (sdr_ctx, NULL, 0, &record_id, &record_type) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && (!count_event_only_records || record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) && (!count_device_locator_records || (record_type != IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD && record_type != IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD && record_type != IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD)) && (!count_oem_records || record_type != IPMI_SDR_FORMAT_OEM_RECORD)) return (0); memset (record_id_buf, '\0', RECORD_ID_BUFLEN + 1); snprintf (record_id_buf, RECORD_ID_BUFLEN, "%u", record_id); len = strlen (record_id_buf); if (len > column_width->record_id) column_width->record_id = len; /* Done, only need to calculate record id column for OEM records */ if (record_type == IPMI_SDR_FORMAT_OEM_RECORD) return (0); memset (sensor_name, '\0', IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1); if (entity_sensor_names) { if (ipmi_sdr_parse_entity_sensor_name (sdr_ctx, NULL, 0, sensor_number, !shared_sensors ? IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS : 0, sensor_name, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_PARSE_INVALID_SDR_RECORD) goto normal_sensor_name; PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_entity_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } len = strlen (sensor_name); if (len > column_width->sensor_name) column_width->sensor_name = len; } else { normal_sensor_name: if (ipmi_sdr_parse_sensor_name (sdr_ctx, NULL, 0, sensor_number, !shared_sensors ? IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS : 0, sensor_name, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } len = strlen (sensor_name); if (len > column_width->sensor_name) column_width->sensor_name = len; } if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { if (ipmi_sdr_parse_sensor_type (sdr_ctx, NULL, 0, &sensor_type) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } len = strlen (get_sensor_type_output_string (sensor_type)); if (len > column_width->sensor_type) column_width->sensor_type = len; if (ipmi_sdr_parse_event_reading_type_code (sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } if (ipmi_event_reading_type_code_class (event_reading_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { char sensor_units_buf[SENSOR_UNITS_BUFLEN + 1]; memset (sensor_units_buf, '\0', SENSOR_UNITS_BUFLEN + 1); if (_sensor_units_output_string (pstate, sdr_ctx, sensor_units_buf, SENSOR_UNITS_BUFLEN, non_abbreviated_units, 0) < 0) return (-1); len = strlen (sensor_units_buf); if (len > column_width->sensor_units) column_width->sensor_units = len; } } return (0); } static int _store_column_widths_shared (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, unsigned int non_abbreviated_units, unsigned int count_event_only_records, unsigned int count_device_locator_records, unsigned int count_oem_records, int entity_sensor_names, struct sensor_column_width *column_width) { uint8_t record_type; uint8_t share_count; uint8_t sensor_number_base; int i; assert (sdr_ctx); assert (column_width); if (ipmi_sdr_parse_record_id_and_type (sdr_ctx, NULL, 0, NULL, &record_type) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } if (record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { if (_store_column_widths (pstate, sdr_ctx, 0, non_abbreviated_units, 0, /* shared_sensors */ count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) return (-1); return (0); } if (ipmi_sdr_parse_sensor_record_sharing (sdr_ctx, NULL, 0, &share_count, NULL, NULL, NULL) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_record_sharing: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } if (share_count <= 1) { if (_store_column_widths (pstate, sdr_ctx, 0, non_abbreviated_units, 0, /* shared_sensors */ count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) return (-1); return (0); } if (ipmi_sdr_parse_sensor_number (sdr_ctx, NULL, 0, &sensor_number_base) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); return (-1); } /* IPMI spec gives the following example: * * "If the starting sensor number was 10, and the share * count was 3, then sensors 10, 11, and 12 would share * the record" */ for (i = 0; i < share_count; i++) { uint8_t sensor_number; sensor_number = sensor_number_base + i; if (_store_column_widths (pstate, sdr_ctx, sensor_number, non_abbreviated_units, 1, /* shared_sensors */ count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) return (-1); } return (0); } int calculate_column_widths (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length, unsigned int record_ids[], unsigned int record_ids_length, unsigned int non_abbreviated_units, unsigned int shared_sensors, unsigned int count_event_only_records, unsigned int count_device_locator_records, unsigned int count_oem_records, int entity_sensor_names, struct sensor_column_width *column_width) { int rv = -1; int i; assert (sdr_ctx); assert (column_width); _sensor_column_width_init (column_width); if (record_ids && record_ids_length) { for (i = 0; i < record_ids_length; i++) { if (ipmi_sdr_cache_search_record_id (sdr_ctx, record_ids[i]) < 0) { if (ipmi_sdr_ctx_errnum (sdr_ctx) == IPMI_SDR_ERR_NOT_FOUND) continue; else { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } } if (shared_sensors) { if (_store_column_widths_shared (pstate, sdr_ctx, non_abbreviated_units, count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) goto cleanup; } else { if (_store_column_widths (pstate, sdr_ctx, 0, non_abbreviated_units, 0, /* shared_sensors */ count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) goto cleanup; } } } else { uint16_t record_count; if (ipmi_sdr_cache_record_count (sdr_ctx, &record_count) < 0) { PSTDOUT_FPRINTF (pstate, stderr, "ipmi_sdr_cache_record_count: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (sdr_ctx)) { int ret; if (sensor_types && sensor_types_length) { if ((ret = sensor_type_listed_sdr (pstate, sdr_ctx, sensor_types, sensor_types_length)) < 0) goto cleanup; } else ret = 1; /* accept all */ if (ret) { if (shared_sensors) { if (_store_column_widths_shared (pstate, sdr_ctx, non_abbreviated_units, count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) goto cleanup; } else { if (_store_column_widths (pstate, sdr_ctx, 0, non_abbreviated_units, 0, /* shared_sensors */ count_event_only_records, count_device_locator_records, count_oem_records, entity_sensor_names, column_width) < 0) goto cleanup; } } } } rv = 0; _sensor_column_width_finish (column_width); cleanup: ipmi_sdr_cache_first (sdr_ctx); return (rv); } int calculate_column_widths_ignored_sdr_cache (unsigned int non_abbreviated_units, struct sensor_column_width *column_width) { assert (column_width); /* Ignoring the SDR cache? Gotta make some guesses */ column_width->sensor_name = SENSORS_SENSOR_NAME_LENGTH; column_width->sensor_type = strlen (ipmi_sensor_types[IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS]); if (non_abbreviated_units) column_width->sensor_units = strlen (ipmi_sensor_units[IPMI_SENSOR_UNIT_DEGREES_C]); else column_width->sensor_units = strlen (ipmi_sensor_units[IPMI_SENSOR_UNIT_RPM]); return (0); } freeipmi-1.6.4/common/toolcommon/tool-sensor-common.h0000644002055400205540000001155013527331635022665 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_SENSOR_COMMON_H #define TOOL_SENSOR_COMMON_H #include #include #include #include "pstdout.h" #define UNRECOGNIZED_SENSOR_TYPE "Unrecognized" #define SENSORS_HEADER_RECORD_ID_STR "ID" #define SENSORS_HEADER_NAME_STR "Name" #define SENSORS_HEADER_TYPE_STR "Type" #define SENSORS_HEADER_STATE_STR "State" #define SENSORS_HEADER_READING_STR "Reading" #define SENSORS_HEADER_UNITS_STR "Units" #define SENSORS_HEADER_EVENT_STR "Event" /* achu: * * The stack on cygwin is smaller than on unixes, and the ability for * me to get a bigger stack in cygwin is difficult. The normal unix * ways (i.e. ulimit -s unlimited) don't work. Some posts online * indicate it's b/c of the way windows works with stack limits. * * So we're just going to use smaller values to deal with the problem. */ #ifdef __CYGWIN__ #define MAX_SENSOR_RECORD_IDS 128 #define MAX_SENSOR_TYPES 16 #else /* !__CYGWIN__ */ #if 0 /* record id is 16 bits - 65536 */ #define MAX_SENSOR_RECORD_IDS 65536 #define MAX_SENSOR_TYPES 256 #else /* !0 */ /* achu: pick more reasonable limits than the theoretical maxes */ #define MAX_SENSOR_RECORD_IDS 4096 #define MAX_SENSOR_TYPES 128 #endif /* !0 */ #endif /* !__CYGWIN__ */ #define MAX_SENSOR_TYPES_STRING_LENGTH 256 #define SENSOR_PARSE_ALL_STRING "all" #define SENSOR_PARSE_NONE_STRING "none" struct sensor_column_width { int record_id; int sensor_name; int sensor_type; int sensor_units; }; const char * get_sensor_type_output_string (unsigned int sensor_type); const char * get_oem_sensor_type_output_string (uint8_t sensor_type, uint8_t event_reading_code, uint32_t manufacturer_id, uint16_t product_id); int parse_sensor_types (const char *special_string, char sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int *sensor_types_length, const char *arg); int list_sensor_types (void); /* 1 if all valid, 0 if not, -1 on error */ int valid_sensor_types (char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length); int get_sensor_units_output_string (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char *sensor_units_buf, unsigned int sensor_units_buflen, unsigned int abbreviated_units_flag); int sensor_type_listed (pstdout_state_t pstate, uint8_t sensor_type, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length); int sensor_type_listed_sdr (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length); /* use normal names, set entity_sensor_names to 0 */ int calculate_column_widths (pstdout_state_t pstate, ipmi_sdr_ctx_t sdr_ctx, char sensor_types[][MAX_SENSOR_TYPES_STRING_LENGTH+1], unsigned int sensor_types_length, unsigned int record_ids[], unsigned int record_ids_length, unsigned int non_abbreviated_units, unsigned int shared_sensors, unsigned int count_event_only_records, unsigned int count_device_locator_records, unsigned int count_oem_records, int entity_sensor_names, struct sensor_column_width *column_width); int calculate_column_widths_ignored_sdr_cache (unsigned int non_abbreviated_units, struct sensor_column_width *column_width); #endif /* TOOL_SENSOR_COMMON_H */ freeipmi-1.6.4/common/toolcommon/tool-util-common.c0000644002055400205540000000765713527331635022341 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include "tool-util-common.h" #include "freeipmi-portability.h" int ipmi_is_root () { #if IPMI_DONT_CHECK_FOR_ROOT return (1); #else /* !IPMI_DONT_CHECK_FOR_ROOT */ uid_t uid = getuid (); if (uid == 0) return (1); return (0); #endif /* !IPMI_DONT_CHECK_FOR_ROOT */ } void ipmi_disable_coredump (void) { /* Disable core dumping when not-debugging. Do not want username, * password or other important stuff to core dump. */ #ifdef NDEBUG struct rlimit resource_limit; if (!getrlimit (RLIMIT_CORE, &resource_limit)) { resource_limit.rlim_cur = 0; if (setrlimit (RLIMIT_CORE, &resource_limit) < 0) perror ("warning: setrlimit()"); } #endif /* NDEBUG */ } /* Check if kg len is decent */ int check_kg_len (const char *in) { assert (in); if (strlen (in) == 0) return (0); if (strncasecmp (in, "0x", 2) == 0) { if (strlen (in) > IPMI_MAX_K_G_LENGTH*2+2) return (-1); } else { if (strlen (in) > IPMI_MAX_K_G_LENGTH) return (-1); } return (0); } char * format_kg (char *out, unsigned int outlen, const void *k_g) { unsigned int i; int printable = 1; int foundnull = 0; char *p; const uint8_t *k_g_ptr = k_g; assert (out); assert (outlen > IPMI_MAX_K_G_LENGTH*2+2); assert (k_g); /* Are there any characters that would prevent printing this as a string on a single line? */ for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++) { if (k_g_ptr[i] == '\0') { ++foundnull; continue; } if (!(isgraph (k_g_ptr[i]) || k_g_ptr[i] == ' ') || foundnull) { printable = 0; break; } } /* print out an entirely null key in hex rather than an empty string */ if (foundnull == IPMI_MAX_K_G_LENGTH) printable = 0; /* don't print out a key starting with a literal '0x' as a string, since parse_kg will try to interpret such strings as hex */ if (k_g_ptr[0] == '0' && k_g_ptr[1] == 'x') printable = 0; if (printable) { if (outlen < IPMI_MAX_K_G_LENGTH) return (NULL); p = out; for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++) { if (k_g_ptr[i] == '\0') break; p[i] = k_g_ptr[i]; } p[i] = 0; } else { if (outlen < IPMI_MAX_K_G_LENGTH*2+3) return (NULL); p = out; p[0] = '0'; p[1] = 'x'; p+=2; for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++, p+=2) sprintf (p, "%02x", k_g_ptr[i]); } return (out); } unsigned int get_timestamp_flags (struct common_cmd_args *common_args, unsigned int defaultflags) { unsigned int timestamp_flags = defaultflags; if (common_args->utc_to_localtime) timestamp_flags |= IPMI_TIMESTAMP_FLAG_UTC_TO_LOCALTIME; if (common_args->localtime_to_utc) timestamp_flags |= IPMI_TIMESTAMP_FLAG_LOCALTIME_TO_UTC; return (timestamp_flags); } freeipmi-1.6.4/common/toolcommon/tool-util-common.h0000644002055400205540000000236113527331635022331 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef TOOL_UTIL_COMMON_H #define TOOL_UTIL_COMMON_H #include #include #include "tool-cmdline-common.h" int ipmi_is_root (); void ipmi_disable_coredump (void); /* Check if kg len is decent */ int check_kg_len (const char *in); /* Turn a 20-byte binary k_g key into an output string */ char *format_kg (char *out, unsigned int outlen, const void *k_g); unsigned int get_timestamp_flags (struct common_cmd_args *common_args, unsigned int defaultflags); #endif /* TOOL_UTIL_COMMON_H */ freeipmi-1.6.4/libipmiconsole/0000755002055400205540000000000013527342544016273 5ustar00achuachu00000000000000freeipmi-1.6.4/libipmiconsole/Makefile.in0000644002055400205540000012256413527342446020353 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libipmiconsole DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/ipmiconsole.h.in $(srcdir)/libipmiconsole.pc.in \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = ipmiconsole.h libipmiconsole.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libipmiconsole_la_DEPENDENCIES = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la am_libipmiconsole_la_OBJECTS = libipmiconsole_la-ipmiconsole.lo \ libipmiconsole_la-ipmiconsole_checks.lo \ libipmiconsole_la-ipmiconsole_ctx.lo \ libipmiconsole_la-ipmiconsole_debug.lo \ libipmiconsole_la-ipmiconsole_engine.lo \ libipmiconsole_la-ipmiconsole_garbage_collector.lo \ libipmiconsole_la-ipmiconsole_packet.lo \ libipmiconsole_la-ipmiconsole_processing.lo \ libipmiconsole_la-ipmiconsole_util.lo \ libipmiconsole_la-scbuf.lo libipmiconsole_la_OBJECTS = $(am_libipmiconsole_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libipmiconsole_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(libipmiconsole_la_CFLAGS) $(CFLAGS) \ $(libipmiconsole_la_LDFLAGS) $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libipmiconsole_la_SOURCES) DIST_SOURCES = $(libipmiconsole_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(nodist_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_PKG_CONFIG_TRUE@pkgconfig_DATA = libipmiconsole.pc @WITH_GNU_LD_TRUE@VERSION_SCRIPT = $(srcdir)/ipmiconsole.map @WITH_GNU_LD_TRUE@OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) nodist_include_HEADERS = ipmiconsole.h lib_LTLIBRARIES = libipmiconsole.la libipmiconsole_la_CFLAGS = $(PTHREAD_CFLAGS) libipmiconsole_la_CPPFLAGS = \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -DWITH_PTHREADS=1 \ -D_GNU_SOURCE \ -D_REENTRANT libipmiconsole_la_LDFLAGS = \ $(PTHREAD_LIBS) \ -version-info @LIBIPMICONSOLE_VERSION_INFO@ \ $(OTHER_FLAGS) libipmiconsole_la_LIBADD = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la libipmiconsole_la_SOURCES = \ ipmiconsole.c \ ipmiconsole_checks.c \ ipmiconsole_checks.h \ ipmiconsole_ctx.c \ ipmiconsole_ctx.h \ ipmiconsole_debug.c \ ipmiconsole_debug.h \ ipmiconsole_defs.h \ ipmiconsole_engine.c \ ipmiconsole_engine.h \ ipmiconsole_garbage_collector.c \ ipmiconsole_garbage_collector.h \ ipmiconsole_packet.c \ ipmiconsole_packet.h \ ipmiconsole_processing.c \ ipmiconsole_processing.h \ ipmiconsole_util.c \ ipmiconsole_util.h \ scbuf.c \ scbuf.h EXTRA_DIST = ipmiconsole.map all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libipmiconsole/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libipmiconsole/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ipmiconsole.h: $(top_builddir)/config.status $(srcdir)/ipmiconsole.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmiconsole.pc: $(top_builddir)/config.status $(srcdir)/libipmiconsole.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libipmiconsole.la: $(libipmiconsole_la_OBJECTS) $(libipmiconsole_la_DEPENDENCIES) $(EXTRA_libipmiconsole_la_DEPENDENCIES) $(AM_V_CCLD)$(libipmiconsole_la_LINK) -rpath $(libdir) $(libipmiconsole_la_OBJECTS) $(libipmiconsole_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_checks.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_ctx.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_engine.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_garbage_collector.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_packet.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_processing.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-ipmiconsole_util.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmiconsole_la-scbuf.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libipmiconsole_la-ipmiconsole.lo: ipmiconsole.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole.Tpo -c -o libipmiconsole_la-ipmiconsole.lo `test -f 'ipmiconsole.c' || echo '$(srcdir)/'`ipmiconsole.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole.c' object='libipmiconsole_la-ipmiconsole.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole.lo `test -f 'ipmiconsole.c' || echo '$(srcdir)/'`ipmiconsole.c libipmiconsole_la-ipmiconsole_checks.lo: ipmiconsole_checks.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_checks.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_checks.Tpo -c -o libipmiconsole_la-ipmiconsole_checks.lo `test -f 'ipmiconsole_checks.c' || echo '$(srcdir)/'`ipmiconsole_checks.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_checks.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_checks.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_checks.c' object='libipmiconsole_la-ipmiconsole_checks.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_checks.lo `test -f 'ipmiconsole_checks.c' || echo '$(srcdir)/'`ipmiconsole_checks.c libipmiconsole_la-ipmiconsole_ctx.lo: ipmiconsole_ctx.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_ctx.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_ctx.Tpo -c -o libipmiconsole_la-ipmiconsole_ctx.lo `test -f 'ipmiconsole_ctx.c' || echo '$(srcdir)/'`ipmiconsole_ctx.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_ctx.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_ctx.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_ctx.c' object='libipmiconsole_la-ipmiconsole_ctx.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_ctx.lo `test -f 'ipmiconsole_ctx.c' || echo '$(srcdir)/'`ipmiconsole_ctx.c libipmiconsole_la-ipmiconsole_debug.lo: ipmiconsole_debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_debug.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_debug.Tpo -c -o libipmiconsole_la-ipmiconsole_debug.lo `test -f 'ipmiconsole_debug.c' || echo '$(srcdir)/'`ipmiconsole_debug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_debug.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_debug.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_debug.c' object='libipmiconsole_la-ipmiconsole_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_debug.lo `test -f 'ipmiconsole_debug.c' || echo '$(srcdir)/'`ipmiconsole_debug.c libipmiconsole_la-ipmiconsole_engine.lo: ipmiconsole_engine.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_engine.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_engine.Tpo -c -o libipmiconsole_la-ipmiconsole_engine.lo `test -f 'ipmiconsole_engine.c' || echo '$(srcdir)/'`ipmiconsole_engine.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_engine.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_engine.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_engine.c' object='libipmiconsole_la-ipmiconsole_engine.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_engine.lo `test -f 'ipmiconsole_engine.c' || echo '$(srcdir)/'`ipmiconsole_engine.c libipmiconsole_la-ipmiconsole_garbage_collector.lo: ipmiconsole_garbage_collector.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_garbage_collector.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_garbage_collector.Tpo -c -o libipmiconsole_la-ipmiconsole_garbage_collector.lo `test -f 'ipmiconsole_garbage_collector.c' || echo '$(srcdir)/'`ipmiconsole_garbage_collector.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_garbage_collector.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_garbage_collector.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_garbage_collector.c' object='libipmiconsole_la-ipmiconsole_garbage_collector.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_garbage_collector.lo `test -f 'ipmiconsole_garbage_collector.c' || echo '$(srcdir)/'`ipmiconsole_garbage_collector.c libipmiconsole_la-ipmiconsole_packet.lo: ipmiconsole_packet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_packet.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_packet.Tpo -c -o libipmiconsole_la-ipmiconsole_packet.lo `test -f 'ipmiconsole_packet.c' || echo '$(srcdir)/'`ipmiconsole_packet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_packet.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_packet.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_packet.c' object='libipmiconsole_la-ipmiconsole_packet.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_packet.lo `test -f 'ipmiconsole_packet.c' || echo '$(srcdir)/'`ipmiconsole_packet.c libipmiconsole_la-ipmiconsole_processing.lo: ipmiconsole_processing.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_processing.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_processing.Tpo -c -o libipmiconsole_la-ipmiconsole_processing.lo `test -f 'ipmiconsole_processing.c' || echo '$(srcdir)/'`ipmiconsole_processing.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_processing.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_processing.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_processing.c' object='libipmiconsole_la-ipmiconsole_processing.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_processing.lo `test -f 'ipmiconsole_processing.c' || echo '$(srcdir)/'`ipmiconsole_processing.c libipmiconsole_la-ipmiconsole_util.lo: ipmiconsole_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-ipmiconsole_util.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-ipmiconsole_util.Tpo -c -o libipmiconsole_la-ipmiconsole_util.lo `test -f 'ipmiconsole_util.c' || echo '$(srcdir)/'`ipmiconsole_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-ipmiconsole_util.Tpo $(DEPDIR)/libipmiconsole_la-ipmiconsole_util.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole_util.c' object='libipmiconsole_la-ipmiconsole_util.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-ipmiconsole_util.lo `test -f 'ipmiconsole_util.c' || echo '$(srcdir)/'`ipmiconsole_util.c libipmiconsole_la-scbuf.lo: scbuf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -MT libipmiconsole_la-scbuf.lo -MD -MP -MF $(DEPDIR)/libipmiconsole_la-scbuf.Tpo -c -o libipmiconsole_la-scbuf.lo `test -f 'scbuf.c' || echo '$(srcdir)/'`scbuf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmiconsole_la-scbuf.Tpo $(DEPDIR)/libipmiconsole_la-scbuf.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='scbuf.c' object='libipmiconsole_la-scbuf.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmiconsole_la_CPPFLAGS) $(CPPFLAGS) $(libipmiconsole_la_CFLAGS) $(CFLAGS) -c -o libipmiconsole_la-scbuf.lo `test -f 'scbuf.c' || echo '$(srcdir)/'`scbuf.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_includeHEADERS install-pkgconfigDATA @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-data-hook install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS \ uninstall-pkgconfigDATA .MAKE: install-am install-data-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-hook install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-libLTLIBRARIES \ install-man install-nodist_includeHEADERS install-pdf \ install-pdf-am install-pkgconfigDATA install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS \ uninstall-pkgconfigDATA $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-data-hook: $(INSTALL_LOGDIR) install-logdir: $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)/log/ipmiconsole # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/libipmiconsole/Makefile.am0000644002055400205540000000416213527331637020333 0ustar00achuachu00000000000000if WITH_PKG_CONFIG pkgconfig_DATA = libipmiconsole.pc endif if WITH_GNU_LD VERSION_SCRIPT = $(srcdir)/ipmiconsole.map OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) endif nodist_include_HEADERS = ipmiconsole.h lib_LTLIBRARIES = libipmiconsole.la libipmiconsole_la_CFLAGS = $(PTHREAD_CFLAGS) libipmiconsole_la_CPPFLAGS = \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -DWITH_PTHREADS=1 \ -D_GNU_SOURCE \ -D_REENTRANT libipmiconsole_la_LDFLAGS = \ $(PTHREAD_LIBS) \ -version-info @LIBIPMICONSOLE_VERSION_INFO@ \ $(OTHER_FLAGS) libipmiconsole_la_LIBADD = \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la libipmiconsole_la_SOURCES = \ ipmiconsole.c \ ipmiconsole_checks.c \ ipmiconsole_checks.h \ ipmiconsole_ctx.c \ ipmiconsole_ctx.h \ ipmiconsole_debug.c \ ipmiconsole_debug.h \ ipmiconsole_defs.h \ ipmiconsole_engine.c \ ipmiconsole_engine.h \ ipmiconsole_garbage_collector.c \ ipmiconsole_garbage_collector.h \ ipmiconsole_packet.c \ ipmiconsole_packet.h \ ipmiconsole_processing.c \ ipmiconsole_processing.h \ ipmiconsole_util.c \ ipmiconsole_util.h \ scbuf.c \ scbuf.h $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-data-hook: $(INSTALL_LOGDIR) install-logdir: $(INSTALL) -m 755 -d $(DESTDIR)$(localstatedir)/log/ipmiconsole EXTRA_DIST = ipmiconsole.map freeipmi-1.6.4/libipmiconsole/ipmiconsole.h.in0000644002055400205540000011517213527331637021402 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole.h,v 1.89 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_H #define IPMICONSOLE_H #ifdef __cplusplus extern "C" { #endif #include #include /* * Libipmiconsole version * * MAJOR - Incremented when interfaces are changed or removed. * Interfaces may be binary incompatible. When incremented, MINOR * and PATCH are zeroed. * * MINOR - Incremented when interfaces are added. Interfaces are * binary compatible with older minor versions. When incremented, * PATCH is zeroed. * * PATCH - Incremented when interfaces are not changed. Typically * incremented due to bug fixes or minor features. Interfaces are * forward and backward compatible to other PATCH versions. */ #define LIBIPMICONSOLE_VERSION_MAJOR @LIBIPMICONSOLE_VERSION_MAJOR@ #define LIBIPMICONSOLE_VERSION_MINOR @LIBIPMICONSOLE_VERSION_MINOR@ #define LIBIPMICONSOLE_VERSION_PATCH @LIBIPMICONSOLE_VERSION_PATCH@ /* * IPMI Console Error Codes */ #define IPMICONSOLE_ERR_SUCCESS 0 #define IPMICONSOLE_ERR_CTX_NULL 1 #define IPMICONSOLE_ERR_CTX_INVALID 2 #define IPMICONSOLE_ERR_ALREADY_SETUP 3 #define IPMICONSOLE_ERR_NOT_SETUP 4 #define IPMICONSOLE_ERR_CTX_NOT_SUBMITTED 5 #define IPMICONSOLE_ERR_CTX_IS_SUBMITTED 6 #define IPMICONSOLE_ERR_PARAMETERS 7 #define IPMICONSOLE_ERR_HOSTNAME_INVALID 8 #define IPMICONSOLE_ERR_IPMI_2_0_UNAVAILABLE 9 #define IPMICONSOLE_ERR_CIPHER_SUITE_ID_UNAVAILABLE 10 #define IPMICONSOLE_ERR_USERNAME_INVALID 11 #define IPMICONSOLE_ERR_PASSWORD_INVALID 12 #define IPMICONSOLE_ERR_K_G_INVALID 13 #define IPMICONSOLE_ERR_PRIVILEGE_LEVEL_INSUFFICIENT 14 #define IPMICONSOLE_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED 15 #define IPMICONSOLE_ERR_SOL_UNAVAILABLE 16 #define IPMICONSOLE_ERR_SOL_INUSE 17 #define IPMICONSOLE_ERR_SOL_STOLEN 18 #define IPMICONSOLE_ERR_SOL_REQUIRES_ENCRYPTION 19 #define IPMICONSOLE_ERR_SOL_REQUIRES_NO_ENCRYPTION 20 #define IPMICONSOLE_ERR_BMC_BUSY 21 #define IPMICONSOLE_ERR_BMC_ERROR 22 #define IPMICONSOLE_ERR_BMC_IMPLEMENTATION 23 #define IPMICONSOLE_ERR_CONNECTION_TIMEOUT 24 #define IPMICONSOLE_ERR_SESSION_TIMEOUT 25 #define IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS_SENT 26 #define IPMICONSOLE_ERR_EXCESS_ERRORS_RECEIVED 27 #define IPMICONSOLE_ERR_OUT_OF_MEMORY 28 #define IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES 29 #define IPMICONSOLE_ERR_SYSTEM_ERROR 30 #define IPMICONSOLE_ERR_INTERNAL_ERROR 31 #define IPMICONSOLE_ERR_ERRNUMRANGE 32 /* * Debug Flags * * Utilized with ipmiconsole_engine_init() or with struct * ipmiconsole_engine_config below for debugging. * * When used with ipmiconsole_engine_init(), enables debugging in * libipmiconsole global activities, such as the libipmiconsole engine * threads. * * When used with struct ipmiconsole_engine_config and a context, * enables debugging specific to an IPMI connection with a specific * host. * * STDOUT - Output debugging to stdout * STDERR - Output debugging to stderr * SYSLOG - Output debugging to the Syslog * FILE - Output debugging to files in current working directory * IPMI_PACKETS - Dump IPMI Packets too * DEFAULT - Informs library to use default, may it be the internal default * or an alternate default configured via libipmiconsole.conf. */ #define IPMICONSOLE_DEBUG_STDOUT 0x00000001 #define IPMICONSOLE_DEBUG_STDERR 0x00000002 #define IPMICONSOLE_DEBUG_SYSLOG 0x00000004 #define IPMICONSOLE_DEBUG_FILE 0x00000008 #define IPMICONSOLE_DEBUG_IPMI_PACKETS 0x00000010 #define IPMICONSOLE_DEBUG_DEFAULT 0xFFFFFFFF /* * IPMI Privilege Constants * * Utilized with struct ipmiconsole_ipmi_config below to specify a * privilege level to authenticate with. */ #define IPMICONSOLE_PRIVILEGE_USER 0 #define IPMICONSOLE_PRIVILEGE_OPERATOR 1 #define IPMICONSOLE_PRIVILEGE_ADMIN 2 /* * Workaround Flags * * Utilized with struct ipmiconsole_ipmi_config below to specify * workarounds for specific motherboard manufacturers. * * AUTHENTICATION_CAPABILITIES * * This workaround flag will skip early checks for username * capabilities, authentication capabilities, and K_g support and * allow IPMI authentication to succeed. It works around multiple * issues in which the remote system does not properly report username * capabilities, authentication capabilities, or K_g status. * * INTEL_2_0_SESSION * * This workaround flag will work around several Intel IPMI 2.0 * authentication issues. The issues covered include padding of * usernames, automatic acceptance of a RAKP 4 response integrity * check when using the integrity algorithm MD5-128, and password * truncation if the authentication algorithm is HMAC-MD5-128. * * SUPERMICRO_2_0_SESSION * * This workaround option will work around several Supermicro IPMI 2.0 * authentication issues on motherboards w/ Peppercon IPMI firmware. * The issues covered include handling invalid length authentication * codes. * * SUN_2_0_SESSION * * This workaround flag will work work around several Sun IPMI 2.0 * authentication issues. The issues covered include invalid lengthed * hash keys, improperly hashed keys, and invalid cipher suite * records. This workaround automatically includes the * OPEN_SESSION_PRIVILEGE workaround. * * OPEN_SESSION_PRIVILEGE * * This workaround flag will slightly alter FreeIPMI's IPMI 2.0 * connection protocol to workaround an invalid hashing algorithm used * by the remote system. The privilege level sent during the Open * Session stage of an IPMI 2.0 connection is used for hashing keys * instead of the privilege level sent during the RAKP1 connection * stage. This workaround is automatically triggered with the * SUN_2_0_SESSION workaround. * * NON_EMPTY_INTEGRITY_CHECK_VALUE * * This workaround option will work around an invalid integrity check * value during an IPMI 2.0 session establishment when using Cipher * Suite ID 0. The integrity check value should be 0 length, however * the remote motherboard responds with a non-empty field. * * NO_CHECKSUM_CHECK * * This workaround option will work around motheboards that calculate * checksums incorrectly in IPMI command responses, but the packet is * otherwise valid. Users are cautioned on the use of this option, as * it removes some validation of packet integrity. However, it is * unlikely to be an issue in most situations. * * SERIAL_ALERTS_DEFERRED * * This workaround option will set serial alerts to be deferred * instead of have them be failures. This works around motherboards * that perform IPMI over serial along with IPMI serial over LAN. * * INCREMENT_SOL_PACKET_SEQUENCE * * This workaround option will increment the SOL payload packet * sequence number under dire circumstances. Normally SOL should * never do this, however some motherboards have shown to get "stuck" * due to an internal bug on the motherboard. This workaround can * help in getting the BMC un-stuck. * * IGNORE_SOL_PAYLOAD_SIZE * * This workaround flag will not check for valid SOL payload sizes and * assume a proper set. It works around remote systems that report * invalid IPMI 2.0 SOL payload sizes. * * IGNORE_SOL_PORT * * This workaround flag will ignore alternate SOL ports specified * during the protocol. It works around remote systems that report * invalid alternate SOL ports. * * SKIP_SOL_ACTIVATION_STATUS * * This workaround flag will not check the current activation status * of SOL during the protocol setup. It works around remote systems * that do not properly support this command. * * SKIP_CHANNEL_PAYLOAD_SUPPORT * * This workaround flag will skip the portion of the protocol that * checks if SOL is supported on the current channel. It works around * remote systems that do not properly support this command. * * DEFAULT * * Informs library to use default, may it be the internal default or * an alternate default configured via libipmiconsole.conf. * * Note: The non-logical bitmask order below is set for future * expansion and matching w/ libfreeipmi. */ #define IPMICONSOLE_WORKAROUND_AUTHENTICATION_CAPABILITIES 0x00000001 #define IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION 0x00000002 #define IPMICONSOLE_WORKAROUND_SUPERMICRO_2_0_SESSION 0x00000004 #define IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION 0x00000008 #define IPMICONSOLE_WORKAROUND_OPEN_SESSION_PRIVILEGE 0x00000010 #define IPMICONSOLE_WORKAROUND_NON_EMPTY_INTEGRITY_CHECK_VALUE 0x00000020 #define IPMICONSOLE_WORKAROUND_NO_CHECKSUM_CHECK 0x00000040 #define IPMICONSOLE_WORKAROUND_SERIAL_ALERTS_DEFERRED 0x00000080 #define IPMICONSOLE_WORKAROUND_INCREMENT_SOL_PACKET_SEQUENCE 0x00000100 #define IPMICONSOLE_WORKAROUND_IGNORE_SOL_PAYLOAD_SIZE 0x01000000 #define IPMICONSOLE_WORKAROUND_IGNORE_SOL_PORT 0x02000000 #define IPMICONSOLE_WORKAROUND_SKIP_SOL_ACTIVATION_STATUS 0x04000000 #define IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT 0x08000000 #define IPMICONSOLE_WORKAROUND_DEFAULT 0xFFFFFFFF /* * Engine Flags * * Utilized with struct ipmiconsole_engine_config below to alter * libipmiconsole engine behavior. * * CLOSE_FD * * By default, the ipmiconsole engine will not close the file * descriptor (returned by ipmiconsole_ctx_fd()) within the * ipmiconsole engine (such as a session timeout). On errors (such as * session timeout), a user will subsequently see an EOF on a read() * or an EPIPE on a write() to know an error occurred. * * This flag will inform the engine to close the file descriptor for * the user. This will change the behavior of how the user should * program with the file descriptor. For example, calls to read() and * write() would likely return with EBADF errors instead of EOF or * EPIPE errors respectively. Calls to select() may return with EBADF * errors and calls to poll() could result in POLLNVAL returned * events. * * OUTPUT_ON_SOL_ESTABLISHED * * When submitting a context to the engine non-blocking, another way * to determine if the SOL session has been established is if data has * output from the remote console and is available for you to read. * Under most circumstances, this isn't a controllable situation. * * This flag will inform the engine to output a single NUL character * ('\0') to the console once a SOL session has been established. If * the CLOSE_FD flag isn't used above, this would allow the user to * expect an EOF vs. 1 byte of data on a read() to determine if the * SOL session has failed or succeeded. The user may choose to output * the NUL anyways (it should do no harm) or simply throw out the * first byte ever read from remote console. * * LOCK_MEMORY * * Inform libipmiconsole to lock memory to prevent sensitive * information (such as usernames and passwords) to be non-swappable. * * SERIAL_KEEPALIVE * * On some motherboards, it's been observed that IPMI connections * between the IPMI client and remote BMC/server can stay alive while * the remote server's internal connection between the BMC and serial * chip can be lost. This has been observed under several situations, * such as when the remote system is rebooted or a IPMI SOL session is * stolen. * * The affect is that this loss of the serial connection will not be * noticed by the IPMI client until serial data is transfered from the * client to the BMC and a timeout (or similar error) eventually occurs. * The IPMI client must then reconnect to restablish the session. * * This is a severe problem for IPMI clients that predominantly log * serial data or display serial output without user interactivity. * From the IPMI client perspective, there is simply no output from * the serial port and no error has actually occurred. * * This option will inform the libipmiconsole engine to send serial * keepalive packets in addition to the IPMI keepalive packets that * normally keep a connection alive. The serial keepalive packets are * standard SOL payload packets, but contain a single NUL character in * them. The single NUL character is to ensure that the underlying * serial receiver is alive and functioning. Retransmission and * timeouts are handled identically to normal IPMI packets in the code * (e.g. as if somebody typed a character). The serial keepalive * packets are dispatched if a SOL packet response has not been * received within the length of time of a session timeout. * * This option is highly recommended for IPMI clients that do not have * high user interactivity, as this may discover broken connections * far more quickly. However, caution should be maintained, as the * NUL character byte may affect the remote system depending on what * input it may or may not be expecting. * * SERIAL_KEEPALIVE_EMPTY * * This option is identical to SERIAL_KEEPALIVE, except that the * serial keepalive packets are empty and without character data. On * some motherboards, this may be sufficient to deal with the "serial * keepalive" issue and character data need not be sent with each * packet. On some systems though, a SOL packet without character * data may not be ACKed, and therefore the keepalive fails. * * DEFAULT * * Informs library to use default, may it be the internal default or * an alternate default configured via libipmiconsole.conf. */ #define IPMICONSOLE_ENGINE_CLOSE_FD 0x00000001 #define IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED 0x00000002 #define IPMICONSOLE_ENGINE_LOCK_MEMORY 0x00000004 #define IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE 0x00000008 #define IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY 0x00000010 #define IPMICONSOLE_ENGINE_DEFAULT 0xFFFFFFFF /* * Behavior Flags * * Utilized with struct ipmiconsole_protocol_config below to atler * SOL connection behavior. * * ERROR_ON_SOL_INUSE * * Under most circumstances, if SOL is detected as being in use, * libipmiconsole will attempt to deactivate the earlier SOL session * and activate the SOL session under the current one. This default * behavior exists for several reasons, most notably that earlier SOL * sessions may have not been able to be deactivated properly. This * security flag changes the default behavior to return an error if * SOL is already detected as being in use. If it is detected as in * use, the errnum returned from ipmiconsole_ctx_errnum() would be * IPMICONSOLE_ERR_SOL_INUSE. * * DEACTIVATE_ONLY * * Only attempt to deactivate the SOL session. If an SOL session is * not active, do nothing. * * DEACTIVATE_ALL_INSTANCES * * When a SOL session is deactivated via the DEACTIVATE_ONLY flag, * only the currently configured SOL payload instance will be * deactivated, not any other instance. This flag will inform * libipmiconsole to deactivate all presently activated instances. * This may be useful in a few circumstances where a user might want * to deactivate all current sessions. * * DEFAULT * * Informs library to use default, may it be the internal default or * an alternate default configured via libipmiconsole.conf. */ #define IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE 0x00000001 #define IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY 0x00000002 #define IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES 0x00000004 #define IPMICONSOLE_BEHAVIOR_DEFAULT 0xFFFFFFFF /* * Context Status * * Returned by ipmiconsole_ctx_status() below. * * ERROR * * An error has occurred retrieving the status. * * NOT_SUBMITTED * * The context has not been submitted to the engine. * * SUBMITTED * * The context has been submitted to the engine. SOL has not been * established and an error has not yet occurred. * * SOL_ERROR * * The context has received an error during SOL establishment. * * SOL_ESTABLISHED * * The context has established a SOL session. * */ enum ipmiconsole_ctx_status { IPMICONSOLE_CTX_STATUS_ERROR = -1, IPMICONSOLE_CTX_STATUS_NOT_SUBMITTED = 0, IPMICONSOLE_CTX_STATUS_SUBMITTED = 1, IPMICONSOLE_CTX_STATUS_SOL_ERROR = 2, IPMICONSOLE_CTX_STATUS_SOL_ESTABLISHED = 3, }; typedef enum ipmiconsole_ctx_status ipmiconsole_ctx_status_t; /* * ipmiconsole_ipmi_config * * IPMI configuration for a connection to a remote IPMI machine. * Defaults can be modified using the libipmiconsole.conf file. * * username * * BMC username. Pass NULL ptr for default username of null * (e.g. empty) username or the configured value in * libipmiconsole.conf. Maximum length of 16 bytes. * * password * * BMC password. Pass NULL ptr for default of null (e.g. empty) * password or the configured value in libipmiconsole.conf. Maximum * length of 20 bytes. * * k_g * * BMC Key for 2-key authentication. Pass NULL ptr to use the * default of null (e.g. empty) k_g or the configured value in * libipmiconsole.conf. The null/empty k_g key equates to using the * password as the BMC key. The k_g key need not be an ascii * string. * * k_g_len * * Length of k_g. Necessary b/c k_g may contain null values in its * key. Maximum length of 20 bytes. * * privilege_level * * privilege level to authenticate with. * * Supported privilege levels: * * IPMICONSOLE_PRIVILEGE_USER * IPMICONSOLE_PRIVILEGE_OPERATOR * IPMICONSOLE_PRIVILEGE_ADMIN * * Pass < 0 for default of IPMICONSOLE_PRIVILEGE_ADMIN or the * configured value in libipmiconsole.conf * * cipher_suite_id * * Cipher suite identifier to determine authentication, integrity, * and confidentiality algorithms to use. * * Supported Cipher Suite IDs * (Key: A - Authentication Algorithm * I - Integrity Algorithm * C - Confidentiality Algorithm) * * 0 - A = None; I = None; C = None * 1 - A = HMAC-SHA1; I = None; C = None * 2 - A = HMAC-SHA1; I = HMAC-SHA1-96; C = None * 3 - A = HMAC-SHA1; I = HMAC-SHA1-96; C = AES-CBC-128 * 6 - A = HMAC-MD5; I = None; C = None * 7 - A = HMAC-MD5; I = HMAC-MD5-128; C = None * 8 - A = HMAC-MD5; I = HMAC-MD5-128; C = AES-CBC-128 * 11 - A = HMAC-MD5; I = MD5-128; C = None * 12 - A = HMAC-MD5; I = MD5-128; C = AES-CBC-128 * 15 - A = HMAC-SHA256; I = None; C = None * 16 - A = HMAC-SHA256; I = HMAC-SHA256-128; C = None * 17 - A = HMAC-SHA256; I = HMAC-SHA256-128; C = AES-CBC-128 * * Pass < 0 for default of 3 or the configured value in * libipmiconsole.conf * * workaround_flags * * Bitwise OR of flags indicating IPMI implementation changes. Some * BMCs which are non-compliant and may require a workaround flag * for correct operation. Pass IPMICONSOLE_WORKAROUND_DEFAULT for * default of 0 (i.e. no modifications to the IPMI protocol) or the * configured value in libipmiconsole.conf */ struct ipmiconsole_ipmi_config { char *username; char *password; unsigned char *k_g; unsigned int k_g_len; int privilege_level; int cipher_suite_id; unsigned int workaround_flags; }; /* * ipmiconsole_protocol_config * * Configuration information for the IPMI protocol management. * Defaults can be modified using the libipmiconsole.conf file. * * session_timeout_len * * Specifies the session timeout length in milliseconds. Pass <= 0 * for default of 60000 (60 seconds) or the configured value in * libipmiconsole.conf. * * retransmission_timeout_len * * Specifies the packet retransmission timeout length in * milliseconds. Pass <= 0 for default of 500 (0.5 seconds) or the * configured value in libipmiconsole.conf. * * retransmission_backoff_count * * Specifies the packet retransmission count until retransmission * timeout lengths will be backed off. Pass <= 0 for default of 2 * or the configured value in libipmiconsole.conf. * * keepalive_timeout_len * * Specifies the session timeout length in milliseconds until a * keepalive packet is sent. Pass <= 0 for default of 20000 (20 * seconds) or the configured value in libipmiconsole.conf. * * retransmission_keepalive_timeout_len * * Specifies the keepalive packet retransmission timeout length in * milliseconds. Pass <= 0 for default of 5000 (5 seconds) or the * configured value in libipmiconsole.conf. * * acceptable_packet_errors_count * * Specifies the maximum number of consecutive packet errors that * can be received from a remote BMC before an error is returned and * the session ended. Pass <= 0 for default of 16 or the configured * value in libipmiconsole.conf. * * Note: This has been added to the behavior of the IPMI engine due * to issues where remote BMCs can become "un-synced" with sequence * numbers due to a network kernel boot. It is possible a stream of * packets can be sent to the remote client with session sequence * numbers that are excessively outside of the acceptable window * range. * * maximum_retransmission_count * * Specifies the maximum number of retransmissions that can be sent * for any IPMI packet before an error is returned and the session * ended. Pass <= 0 for default of 16 or the configured value in * libipmiconsole.conf. * * Note: This has been added to the behavior of the IPMI engine due * to issues where remote BMCs can become "un-synced" with sequence * numbers due to a network kernel boot. It is possible for some * packets (in particular 'ping' packets to keep an IPMI session * alive) to be accepted by the remote BMC, but not SOL packets. * */ struct ipmiconsole_protocol_config { int session_timeout_len; int retransmission_timeout_len; int retransmission_backoff_count; int keepalive_timeout_len; int retransmission_keepalive_timeout_len; int acceptable_packet_errors_count; int maximum_retransmission_count; }; /* * ipmiconsole_engine_config * * Configuration information for how the engine should interact with * the user or API. Defaults can be modified using the * libipmiconsole.conf file. * * engine_flags * * Bitwise OR of flags indicating how the ipmiconsole engine should * behave for a particular context. Pass IPMICONSOLE_ENGINE_DEFAULT * for default of 0 or the configured value in libipmiconsole.conf. * * behavior_flags * * Bitwise OR of flags indicating any protocol behavior that should * be changed from the default. Pass IPMICONSOLE_BEHAVIOR_DEFAULT * for default of 0 or the configured value in libipmiconsole.conf. * * debug_flags * * Bitwise OR of flags indicating how debug output should (or should * not) be output. Pass IPMICONSOLE_DEBUG_DEFAULT for default of 0 * or the configured value in libipmiconsole.conf. * */ struct ipmiconsole_engine_config { unsigned int engine_flags; unsigned int behavior_flags; unsigned int debug_flags; }; /* * Context Config Option * * Used for setting or getting advanced configuration options. See * ipmiconsole_ctx_set_config_option() and * ipmiconsole_ctx_get_config_option(). * * SOL_PAYLOAD_INSTANCE * * The SOL payload instance number to be used. Defaults to 1 and has * range of 1 to 15. Most systems only support a single instance, * however a few allow users to access multiple. They could be used * to allow multiple users to see the same serial session, or allow * users to access different serial sessions behind a device. It is * not commonly available or necessary when communicating via SOL to a * single server. The SOL payload instance number is specified and * retrieved via a pointer to an unsigned int. * */ enum ipmiconsole_ctx_config_option { IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE = 0, }; typedef enum ipmiconsole_ctx_config_option ipmiconsole_ctx_config_option_t; #define IPMICONSOLE_THREAD_COUNT_MAX 32 typedef struct ipmiconsole_ctx *ipmiconsole_ctx_t; /* * Ipmiconsole_callback * * Function prototype for a callback function. * ipmiconsole_engine_submit() below. */ typedef void (*Ipmiconsole_callback)(void *); /* * ipmiconsole_engine_init * * Initialize the ipmiconsole engine. Engine threads will be created * which will manage SOL sessions for the user. This function must be * called before ipmi console contexts can be submitted into the * engine. This call will also parse and load alternate defaults from * the libipmiconsole.conf defaults file. * * Parameters: * * thread_count * * Number of threads the engine will support. Pass 0 for default of 4. * * debug_flags * * Bitwise OR of flags indicating how debug output should (or should * not) be output. Pass 0 for default of no debugging. * * Returns 0 on success, -1 on error. On error errno will be set to * indicate error. Possible errnos are ENOMEM if memory cannot be * allocated. */ int ipmiconsole_engine_init (unsigned int thread_count, unsigned int debug_flags); /* * ipmiconsole_engine_submit * * Submit a context to the ipmiconsole engine non-blocking. This * function can return prior to a SOL session being established. A * return value of 0 indicates the context was submitted properly. A * return value of -1 indicates an error occurred during the * submission. On an error, ipmiconsole_ctx_errnum() can be used to * determine the type of error that occured. * * After a context has been submitted, the user may determine if a SOL * session has been established several ways: * * A) Poll on the context status, retrieved via * ipmiconsole_ctx_status(). On an error, ipmiconsole_ctx_errnum() * can be used to determine the specific IPMI related error that * occurred. * * B) Poll on the context file descriptor, retrieved via * ipmiconsole_ctx_fd(). A SOL establishment error will result in an * EOF being returned on the file descriptor. A proper SOL * establishment can be determined via a readable character on the * file descriptor. The use of the OUTPUT_ON_SOL_ESTABLISHED Engine * flag above can aid in this. The CLOSE_FD Engine flag can be set to * slightly alter this behavior, please see above. On an error, * ipmiconsole_ctx_errnum() can be used to determine the specific IPMI * related error that occurred. * * C) Specify a callback function. The callback function specified as * a parameter below will be called directly after a SOL session has * been established or a session establishment error has occurred * (e.g. SOL not supported, authentication error, etc.). Within those * callback functions, ipmiconsole_ctx_status() can be used to * determine which has occurred. This callback will be called by the * engine thread, therefore users may need to protect their * application's shared data. * * Due to the non-blocking semantics of this function, it is possible * that multiple errors could occur simultaneously and the errnum * retrieved via ipmiconsole_ctx_errnum() may not be the one that * caused the SOL session to fail. However, this will not occur given * proper usage of the API. For example, if the user called * ipmiconsole_engine_submit() twice with the same context, an SOL * error in the engine background could race with the setting of the * errnum IPMICONSOLE_ERR_CTX_IS_SUBMITTED in the second call. * * Parameters: * * callback * * If specified, a callback function will be called from the engine * when a SOL session has been established or a SOL establishment * error has occurred. Will only be called under a non-blocking * engine submission via ipmiconsole_engine_submit(). Will be * called once and only once during an individual engine submission. * For example, if a SOL session is established then a later session * timeout occurs, the later session timeout will not generate a * function call to the callback. Pass NULL for no callback. * * The callback function can be called simultaneously from different * engine threads. It is the user's responsibility to protect * against any race conditions in their callback function. * * callback_arg * * Specify an arbitrary argument to be passed to the callback * routine. If the callback will be required to process the context * status, the context should be included in this argument. * * Returns 0 on success, -1 on error. ipmiconsole_ctx_errnum() can be * called to determine the cause of the error. */ int ipmiconsole_engine_submit (ipmiconsole_ctx_t c, Ipmiconsole_callback callback, void *callback_arg); /* * ipmiconsole_engine_submit_block * * Submit a context to the ipmiconsole engine and block until a SOL * session is established or an error/timeout occurs. A return value * of 0 indicates the SOL session was established and a -1 indicates * an error occurred. On an error, ipmiconsole_ctx_errnum() can be * used to determine the type of error that occured. * * Returns 0 on success, -1 on error. ipmiconsole_ctx_errnum() can be * called to determine the cause of the error. */ int ipmiconsole_engine_submit_block (ipmiconsole_ctx_t c); /* * ipmiconsole_engine_teardown * * Teardown the ipmiconsole engine. This function will destroy * all threads managed by the engine. Users are still required to * destroy remaining contexts with ipmiconsole_ctx_destroy(). * * Parameters: * * cleanup_sol_sessions * * If set to non zero, SOL sessions will be torn down cleanly. * ipmiconsole_engine_teardown() will block until all active ipmi * sessions have been closed cleanly or timed out. */ void ipmiconsole_engine_teardown (int cleanup_sol_sessions); /* * ipmiconsole_ctx_create * * Create an ipmiconsole context. The context can then be submitted * into the ipmiconsole engine (via ipmiconsole_engine_submit() or * ipmiconsole_engine_submit_block()) to establish a SOL session. The * context cannot be submitted to the ipmiconsole engine more than * once. After it has been submitted to the ipmiconsole engine, it * cannot be reused. * * Parameters: * * hostname * * Host or IP address you wish to connect to. * * ipmi_config * * IPMI configuration. See ipmiconsole_ipmi_config definition * above. * * protocol_config * * IPMI protocol configuration. See ipmiconsole_protocol_config * definition above. * * engine_config * * Ipmiconsole engine configuration. See ipmiconsole_engine_config * definition above. * * Returns ctx on success, NULL on error. On error errno will be set to * indicate error. Possible errnos are EINVAL on invalid input, * ENOMEM if memory cannot be allocated, EMFILE if process file * descriptors limits have been reached, and EAGAIN if * ipmiconsole_engine_init() has not yet been called. */ ipmiconsole_ctx_t ipmiconsole_ctx_create (const char *hostname, struct ipmiconsole_ipmi_config *ipmi_config, struct ipmiconsole_protocol_config *protocol_config, struct ipmiconsole_engine_config *engine_config); /* * ipmiconsole_ctx_set_config * * Set the value of an advanced configuration value. This * configuration value must be set prior to a context being submitted * to the ipmiconsole engine (via ipmiconsole_engine_submit() or * ipmiconsole_engine_submit_block()). After it has been submitted to * the ipmiconsole engine, it cannot be changed. * * See enum ipmiconsole_ctx_config_option above for config options and * pointer types expected by this function. * * Returns 0 on success, -1 on error. ipmiconsole_ctx_errnum() can be * called to determine the cause of the error. */ int ipmiconsole_ctx_set_config (ipmiconsole_ctx_t c, ipmiconsole_ctx_config_option_t config_option, void *config_option_value); /* * ipmiconsole_ctx_get_config * * Get the value of an advanced configuration value. * * See enum ipmiconsole_ctx_config_option above for config options and * pointer types expected by this function. * * Returns 0 on success, -1 on error. ipmiconsole_ctx_errnum() can be * called to determine the cause of the error. */ int ipmiconsole_ctx_get_config (ipmiconsole_ctx_t c, ipmiconsole_ctx_config_option_t config_option, void *config_option_value); /* * ipmiconsole_ctx_errnum * * Returns the errnum of the most recently recorded error for the * context that has not yet been read by the user. */ int ipmiconsole_ctx_errnum (ipmiconsole_ctx_t c); /* * ipmiconsole_ctx_strerror * * Returns a pointer to statically allocated string describing the * error code in errnum. */ char *ipmiconsole_ctx_strerror (int errnum); /* * ipmiconsole_ctx_errormsg * * Returns a pointer to statically allocated string describing the * most recent error for the context. */ char *ipmiconsole_ctx_errormsg (ipmiconsole_ctx_t c); /* * ipmiconsole_ctx_status * * Returns the current context status. Primarily used to determine if * a context submission (submitted non-blocking via * ipmiconsole_engine_submit()) has been established or not. Returns * IPMICONSOLE_CTX_STATUS_ERROR (-1) on error. */ ipmiconsole_ctx_status_t ipmiconsole_ctx_status (ipmiconsole_ctx_t c); /* * ipmiconsole_ctx_fd * * Returns a file descriptor for console reading and writing after it * has been submitted to the engine. Returns -1 on error. * ipmiconsole_ctx_errnum() can be called to determine the cause of * the error. * * If the user closes the file descriptor while the serial over lan * session is established, the session will be torn down in the * engine. * * If an error occurs on the engine side (for example a session * timeout) the other end of the file descriptor pair (from which this * fd is a part of) will be closed. The error can be determined via * ipmiconsole_ctx_errnum(). The user of this file descriptor will * typically see this affect via an EOF on a read() or an EPIPE on a * write(). For alternate file descriptor behavior, see ENGINE flags * above. * * If the user successfully retrieves the file descriptor via this * function, the user is required to close the file descriptor. The * ipmiconsole engine will not do so, with the exception of when the * IPMICONSOLE_ENGINE_CLOSE_FD flag is set. If the user does not * close the file descriptor, a file descriptor leak may occur. */ int ipmiconsole_ctx_fd (ipmiconsole_ctx_t c); /* * ipmiconsole_ctx_generate_break * * Generate a break on an active serial over LAN session. * * Returns 0 on success, -1 on error. ipmiconsole_ctx_errnum() can be * called to determine the cause of the error. */ int ipmiconsole_ctx_generate_break (ipmiconsole_ctx_t c); /* * ipmiconsole_ctx_destroy * * Destroy a context. May not destroy/release the context resources * immediately if the session is still being cleaned up. Will instead * be moved to garbage collection. Will not close file descriptor if * it was retrieved from ipmiconsole_ctx_fd(). User is required to * close it. */ void ipmiconsole_ctx_destroy (ipmiconsole_ctx_t c); /* * ipmiconsole_username_is_valid * * Convenience function to determine if a username is valid. Note that * a NULL pointer, which would result in libipmiconsole using a * default value, is considered an invalid input here. * * Returns 1 if username is valid, 0 if it is not. */ int ipmiconsole_username_is_valid (const char *username); /* * ipmiconsole_password_is_valid * * Convenience function to determine if a password is valid. Note * that a NULL pointer, which would result in libipmiconsole using a * default value, is considered an invalid input here. * * Returns 1 if password is valid, 0 if it is not. */ int ipmiconsole_password_is_valid (const char *password); /* * ipmiconsole_k_g_is_valid * * Convenience function to determine if a k_g is valid. Note that a * NULL pointer, which would result in libipmiconsole using a default * value, is considered an invalid input here. * * Returns 1 if k_g is valid, 0 if it is not. */ int ipmiconsole_k_g_is_valid (const unsigned char *k_g, unsigned int k_g_len); /* * ipmiconsole_privilege_level_is_valid * * Convenience function to determine if a privilege level is valid. * Note that a negative value, which would result in libipmiconsole * using a default value, is considered an invalid input here. * * Returns 1 if privilege level is valid, 0 if it is not. */ int ipmiconsole_privilege_level_is_valid (int privilege_level); /* * ipmiconsole_cipher_suite_id_is_valid * * Convenience function to determine if a cipher suite id is valid. * Note that a negative value, which would result in libipmiconsole * using a default value, is considered an invalid input here. * * Returns 1 if cipher suite id is valid, 0 if it is not. */ int ipmiconsole_cipher_suite_id_is_valid (int cipher_suite_id); /* * ipmiconsole_workaround_flags_is_valid * * Convenience function to determine if workaround flags are valid. * Note that a bitmask value of IPMICONSOLE_WORKAROUND_DEFAULT, which * would result in libipmiconsole using a default value, is considered * an invalid input here. * * Returns 1 if workaround flags are valid, 0 if they are not. */ int ipmiconsole_workaround_flags_is_valid (unsigned int workaround_flags); #ifdef __cplusplus } #endif #endif /* IPMICONSOLE_H */ freeipmi-1.6.4/libipmiconsole/libipmiconsole.pc.in0000644002055400205540000000041113527331637022231 0ustar00achuachu00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ Name: libipmiconsole Description: FreeIPMI library for serial-over-lan (SOL) remote console access Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lipmiconsole freeipmi-1.6.4/libipmiconsole/ipmiconsole.c0000644002055400205540000014566313527331637021000 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole.c,v 1.102 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #ifdef HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include #include #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_engine.h" #include "ipmiconsole_util.h" #include "freeipmi-portability.h" #include "conffile.h" #include "fi_hostlist.h" #include "network.h" #include "parse-common.h" #include "secure.h" /* * ipmi console errmsgs */ static char *ipmiconsole_errmsgs[] = { "success", /* 0 */ "ctx null", /* 1 */ "ctt invalid", /* 2 */ "engine already setup", /* 3 */ "engine not setup", /* 4 */ "ctx not submitted", /* 5 */ "ctx is submitted", /* 6 */ "invalid parameters", /* 7 */ "hostname invalid", /* 8 */ "ipmi 2.0 unavailable", /* 9 */ "cipher suite id unavailable", /* 10 */ "username invalid", /* 11 */ "password invalid", /* 12 */ "k_g invalid", /* 13 */ "privilege level insufficient", /* 14 */ "privilege level cannot be obtained for this user", /* 15 */ "SOL unavailable", /* 16 */ "SOL in use", /* 17 */ "SOL session stolen", /* 18 */ "SOL requires encryption", /* 19 */ "SOL requires no encryption", /* 20 */ "BMC Busy", /* 21 */ "BMC Error", /* 22 */ "BMC Implementation", /* 23 */ "connection timeout", /* 24 */ "session timeout", /* 25 */ "excess retransmissions sent", /* 26 */ "excess errors received", /* 27 */ "out of memory", /* 28 */ "too many open files", /* 29 */ "internal system error", /* 30 */ "internal error", /* 31 */ "errnum out of range", /* 32 */ NULL }; #define IPMICONSOLE_ENGINE_CLOSE_FD_STR "closefd" #define IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED_STR "outputonsolestablished" #define IPMICONSOLE_ENGINE_LOCK_MEMORY_STR "lockmemory" #define IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_STR "serialkeepalive" #define IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY_STR "serialkeepaliveempty" #define IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE_STR "erroronsolinuse" #define IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY_STR "deactivateonly" #define IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES_STR "deactivateallinstances" #define IPMICONSOLE_DEBUG_STDOUT_STR "stdout" #define IPMICONSOLE_DEBUG_STDERR_STR "stderr" #define IPMICONSOLE_DEBUG_SYSLOG_STR "syslog" #define IPMICONSOLE_DEBUG_FILE_STR "file" #define IPMICONSOLE_DEBUG_IPMI_PACKETS_STR "ipmipackets" struct ipmiconsole_ctx_config default_config; static int _config_file_unsigned_int_positive (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (option_ptr); value = (unsigned int *)option_ptr; if (data->intval <= 0) { IPMICONSOLE_DEBUG (("libipmiconsole config file %s invalid", optionname)); return (0); } *value = (unsigned int)data->intval; return (0); } static int _config_file_username (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { assert (data); if (strlen (data->string) > IPMI_MAX_USER_NAME_LENGTH) { IPMICONSOLE_DEBUG (("libipmiconsole config file username invalid length")); return (0); } strcpy (default_config.username, data->string); IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default username")); return (0); } static int _config_file_password (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { assert (data); if (strlen (data->string) > IPMI_2_0_MAX_PASSWORD_LENGTH) { IPMICONSOLE_DEBUG (("libipmiconsole config file password invalid length")); return (0); } strcpy (default_config.password, data->string); IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default password")); return (0); } static int _config_file_k_g (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int rv; assert (data); if ((rv = parse_kg (default_config.k_g, IPMI_MAX_K_G_LENGTH, data->string)) < 0) { IPMICONSOLE_DEBUG (("libipmiconsole config file k_g invalid format")); return (0); } if (rv > 0) default_config.k_g_len = rv; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default k_g")); return (0); } static int _config_file_privilege_level (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { int tmp; assert (data); if ((tmp = parse_privilege_level (data->string)) < 0) { IPMICONSOLE_DEBUG (("libipmiconsole config file privilege level invalid")); return (0); } default_config.privilege_level = tmp; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default privilege level")); return (0); } static int _config_file_cipher_suite_id (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { assert (data); if (data->intval < IPMI_CIPHER_SUITE_ID_MIN || data->intval > IPMI_CIPHER_SUITE_ID_MAX || !IPMI_CIPHER_SUITE_ID_SUPPORTED (data->intval)) { IPMICONSOLE_DEBUG (("libipmiconsole config file cipher suite id invalid")); return (0); } default_config.cipher_suite_id = data->intval; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default cipher suite id")); return (0); } static int _config_file_workaround_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int workaround_flags = 0; unsigned int i; assert (data); for (i = 0; i < data->stringlist_len; i++) { unsigned int outofband_2_0_flags, section_flags; if (parse_workaround_flags (data->stringlist[i], NULL, &outofband_2_0_flags, NULL, NULL, §ion_flags) < 0) { IPMICONSOLE_DEBUG (("libipmiconsole config file workaround flag invalid")); return (0); } if (outofband_2_0_flags) { if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES) workaround_flags |= IPMICONSOLE_WORKAROUND_AUTHENTICATION_CAPABILITIES; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) workaround_flags |= IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION) workaround_flags |= IPMICONSOLE_WORKAROUND_SUPERMICRO_2_0_SESSION; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION) workaround_flags |= IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE) workaround_flags |= IPMICONSOLE_WORKAROUND_OPEN_SESSION_PRIVILEGE; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE) workaround_flags |= IPMICONSOLE_WORKAROUND_NON_EMPTY_INTEGRITY_CHECK_VALUE; if (outofband_2_0_flags & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK) workaround_flags |= IPMICONSOLE_WORKAROUND_NO_CHECKSUM_CHECK; } if (section_flags) { if (section_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE) workaround_flags |= IPMICONSOLE_WORKAROUND_IGNORE_SOL_PAYLOAD_SIZE; if (section_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT) workaround_flags |= IPMICONSOLE_WORKAROUND_IGNORE_SOL_PORT; if (section_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS) workaround_flags |= IPMICONSOLE_WORKAROUND_SKIP_SOL_ACTIVATION_STATUS; if (section_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT) workaround_flags |= IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT; } } default_config.workaround_flags = workaround_flags; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default workaround flag")); return (0); } static int _config_file_engine_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int engine_flags = 0; unsigned int i; assert (data); for (i = 0; i < data->stringlist_len; i++) { if (!strcasecmp (data->stringlist[i], IPMICONSOLE_ENGINE_CLOSE_FD_STR)) engine_flags |= IPMICONSOLE_ENGINE_CLOSE_FD; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED_STR)) engine_flags |= IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_ENGINE_LOCK_MEMORY_STR)) engine_flags |= IPMICONSOLE_ENGINE_LOCK_MEMORY; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_STR)) engine_flags |= IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY_STR)) engine_flags |= IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY; else IPMICONSOLE_DEBUG (("libipmiconsole config file engine flag invalid")); } default_config.engine_flags = engine_flags; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default engine flag")); return (0); } static int _config_file_behavior_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int behavior_flags = 0; unsigned int i; assert (data); for (i = 0; i < data->stringlist_len; i++) { if (!strcasecmp (data->stringlist[i], IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE_STR)) behavior_flags |= IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY_STR)) behavior_flags |= IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES_STR)) behavior_flags |= IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES; else IPMICONSOLE_DEBUG (("libipmiconsole config file behavior flag invalid")); } default_config.behavior_flags = behavior_flags; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default behavior flag")); return (0); } static int _config_file_debug_flags (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int debug_flags = 0; unsigned int i; assert (data); for (i = 0; i < data->stringlist_len; i++) { if (!strcasecmp (data->stringlist[i], IPMICONSOLE_DEBUG_STDOUT_STR)) debug_flags |= IPMICONSOLE_DEBUG_STDOUT; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_DEBUG_STDERR_STR)) debug_flags |= IPMICONSOLE_DEBUG_STDERR; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_DEBUG_SYSLOG_STR)) debug_flags |= IPMICONSOLE_DEBUG_SYSLOG; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_DEBUG_FILE_STR)) debug_flags |= IPMICONSOLE_DEBUG_FILE; else if (!strcasecmp (data->stringlist[i], IPMICONSOLE_DEBUG_IPMI_PACKETS_STR)) debug_flags |= IPMICONSOLE_DEBUG_IPMI_PACKETS; else IPMICONSOLE_DEBUG (("libipmiconsole config file debug flag invalid")); } default_config.debug_flags = debug_flags; IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default debug flag")); return (0); } static int _config_file_sol_payload_instance (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { unsigned int *value; assert (data); assert (option_ptr); value = (unsigned int *)option_ptr; if (data->intval <= 0 || !IPMI_PAYLOAD_INSTANCE_VALID (data->intval)) { IPMICONSOLE_DEBUG (("libipmiconsole config file %s invalid", optionname)); return (0); } *value = (unsigned int)data->intval; return (0); } static int _ipmiconsole_defaults_setup (void) { int libipmiconsole_context_username_count = 0, libipmiconsole_context_password_count = 0, libipmiconsole_context_k_g_count = 0, libipmiconsole_context_privilege_level_count = 0, libipmiconsole_context_cipher_suite_id_count = 0, libipmiconsole_context_workaround_flags_count = 0, libipmiconsole_context_session_timeout_len_count = 0, libipmiconsole_context_retransmission_timeout_len_count = 0, libipmiconsole_context_retransmission_backoff_count_count = 0, libipmiconsole_context_keepalive_timeout_len_count = 0, libipmiconsole_context_retransmission_keepalive_timeout_len_count = 0, libipmiconsole_context_acceptable_packet_errors_count_count = 0, libipmiconsole_context_maximum_retransmission_count_count = 0, libipmiconsole_context_engine_flags_count = 0, libipmiconsole_context_behavior_flags_count = 0, libipmiconsole_context_debug_flags_count = 0, libipmiconsole_context_sol_payload_instance_count = 0; struct conffile_option libipmiconsole_options[] = { { "libipmiconsole-context-username", CONFFILE_OPTION_STRING, -1, _config_file_username, 1, 0, &libipmiconsole_context_username_count, NULL, 0, }, { "libipmiconsole-context-password", CONFFILE_OPTION_STRING, -1, _config_file_password, 1, 0, &libipmiconsole_context_password_count, NULL, 0, }, { "libipmiconsole-context-k_g", CONFFILE_OPTION_STRING, -1, _config_file_k_g, 1, 0, &libipmiconsole_context_k_g_count, NULL, 0, }, { "libipmiconsole-context-privilege-level", CONFFILE_OPTION_STRING, -1, _config_file_privilege_level, 1, 0, &libipmiconsole_context_privilege_level_count, NULL, 0, }, { "libipmiconsole-context-cipher-suite-id", CONFFILE_OPTION_INT, -1, _config_file_cipher_suite_id, 1, 0, &libipmiconsole_context_cipher_suite_id_count, NULL, 0, }, { "libipmiconsole-context-workaround-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_workaround_flags, 1, 0, &libipmiconsole_context_workaround_flags_count, NULL, 0, }, { "libipmiconsole-context-session-timeout-len", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_session_timeout_len_count, &(default_config.session_timeout_len), 0 }, { "libipmiconsole-context-retransmission-timeout-len", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_retransmission_timeout_len_count, &(default_config.retransmission_timeout_len), 0 }, { "libipmiconsole-context-retransmission-backoff-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_retransmission_backoff_count_count, &(default_config.retransmission_backoff_count), 0 }, { "libipmiconsole-context-keepalive-timeout-len", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_keepalive_timeout_len_count, &(default_config.keepalive_timeout_len), 0 }, { "libipmiconsole-context-retransmission-keepalive-timeout-len", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_retransmission_keepalive_timeout_len_count, &(default_config.retransmission_keepalive_timeout_len), 0 }, { "libipmiconsole-context-acceptable-packet-errors-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_acceptable_packet_errors_count_count, &(default_config.acceptable_packet_errors_count), 0 }, { "libipmiconsole-context-maximum-retransmission-count", CONFFILE_OPTION_INT, -1, _config_file_unsigned_int_positive, 1, 0, &libipmiconsole_context_maximum_retransmission_count_count, &(default_config.maximum_retransmission_count), 0 }, { "libipmiconsole-context-engine-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_engine_flags, 1, 0, &libipmiconsole_context_engine_flags_count, NULL, 0, }, { "libipmiconsole-context-behavior-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_behavior_flags, 1, 0, &libipmiconsole_context_behavior_flags_count, NULL, 0, }, { "libipmiconsole-context-debug-flags", CONFFILE_OPTION_LIST_STRING, -1, _config_file_debug_flags, 1, 0, &libipmiconsole_context_debug_flags_count, NULL, 0, }, { "libipmiconsole-context-sol-payload-instance", CONFFILE_OPTION_INT, -1, _config_file_sol_payload_instance, 1, 0, &libipmiconsole_context_sol_payload_instance_count, &(default_config.sol_payload_instance), 0 }, }; conffile_t cf = NULL; int rv = -1; int libipmiconsole_options_len; memset (&default_config, '\0', sizeof (struct ipmiconsole_ctx_config)); /* set base defaults */ default_config.privilege_level = IPMI_PRIVILEGE_LEVEL_DEFAULT; default_config.cipher_suite_id = IPMI_CIPHER_SUITE_ID_DEFAULT; default_config.session_timeout_len = IPMICONSOLE_SESSION_TIMEOUT_LENGTH_DEFAULT; default_config.retransmission_timeout_len = IPMICONSOLE_RETRANSMISSION_TIMEOUT_LENGTH_DEFAULT; default_config.retransmission_backoff_count = IPMICONSOLE_RETRANSMISSION_BACKOFF_COUNT_DEFAULT; default_config.keepalive_timeout_len = IPMICONSOLE_KEEPALIVE_TIMEOUT_LENGTH_DEFAULT; default_config.retransmission_keepalive_timeout_len = IPMICONSOLE_RETRANSMISSION_KEEPALIVE_TIMEOUT_LENGTH_DEFAULT; default_config.acceptable_packet_errors_count = IPMICONSOLE_ACCEPTABLE_PACKET_ERRORS_COUNT_DEFAULT; default_config.maximum_retransmission_count = IPMICONSOLE_MAXIMUM_RETRANSMISSION_COUNT_DEFAULT; default_config.sol_payload_instance = IPMI_PAYLOAD_INSTANCE_DEFAULT; if (!(cf = conffile_handle_create ())) { IPMICONSOLE_DEBUG (("conffile_handle_create: %s", strerror (errno))); return (-1); } libipmiconsole_options_len = sizeof (libipmiconsole_options) / sizeof (struct conffile_option); if (conffile_parse (cf, LIBIPMICONSOLE_CONFIG_FILE_DEFAULT, libipmiconsole_options, libipmiconsole_options_len, NULL, 0, 0) < 0) { char buf[CONFFILE_MAX_ERRMSGLEN]; /* Its not an error if the default configuration file doesn't exist */ if (conffile_errnum (cf) == CONFFILE_ERR_EXIST) goto out; if (conffile_errmsg (cf, buf, CONFFILE_MAX_ERRMSGLEN) < 0) { IPMICONSOLE_DEBUG (("libipmiconsole loaded alternate default debug flag")); goto cleanup; } } out: rv = 0; cleanup: conffile_handle_destroy (cf); return (rv); } int ipmiconsole_engine_init (unsigned int thread_count, unsigned int debug_flags) { struct rlimit rlim; unsigned int i; if (thread_count > IPMICONSOLE_THREAD_COUNT_MAX || (debug_flags != IPMICONSOLE_DEBUG_DEFAULT && debug_flags & ~IPMICONSOLE_DEBUG_MASK)) { errno = EINVAL; return (-1); } if (!thread_count) thread_count = IPMICONSOLE_THREAD_COUNT_DEFAULT; /* Note: Must be called first before anything else for debugging purposes */ if (ipmiconsole_debug_setup (debug_flags) < 0) goto cleanup; if (ipmiconsole_engine_is_setup ()) return (0); if (ipmiconsole_engine_setup (thread_count) < 0) goto cleanup; for (i = 0; i < thread_count; i++) { if (ipmiconsole_engine_thread_create () < 0) goto cleanup; } /* If the file descriptor increase fails, ignore it */ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0) { rlim.rlim_cur = rlim.rlim_max; setrlimit (RLIMIT_NOFILE, &rlim); } if (_ipmiconsole_defaults_setup () < 0) goto cleanup; return (0); cleanup: ipmiconsole_debug_cleanup (); ipmiconsole_engine_cleanup (0); return (-1); } int ipmiconsole_engine_submit (ipmiconsole_ctx_t c, Ipmiconsole_callback callback, void *callback_arg) { int perr; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if (!ipmiconsole_engine_is_setup ()) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_NOT_SETUP); return (-1); } if (c->session_submitted) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_IS_SUBMITTED); return (-1); } /* Set to success, so we know if an IPMI error occurred later */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); if (ipmiconsole_ctx_non_blocking_setup (c, callback, callback_arg) < 0) goto cleanup; /* session setup required before connection setup, so * connection knows if IPv4 or IPv6 used */ if (ipmiconsole_ctx_session_setup (c) < 0) goto cleanup; if (ipmiconsole_ctx_connection_setup (c) < 0) goto cleanup; if (ipmiconsole_engine_submit_ctx (c) < 0) goto cleanup; if ((perr = pthread_mutex_lock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* don't go to cleanup, b/c the engine will call * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ goto cleanup_ctx_fds_only; } /* Check for NOT_SUBMITTED, conceivably SOL_ERROR or SOL_ESTABLISHED * could already be set */ if (c->signal.status == IPMICONSOLE_CTX_STATUS_NOT_SUBMITTED) c->signal.status = IPMICONSOLE_CTX_STATUS_SUBMITTED; if ((perr = pthread_mutex_unlock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* don't go to cleanup, b/c the engine will call * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ goto cleanup_ctx_fds_only; } /* may have been set already */ c->session_submitted++; if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); c->signal.ctx_state = IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); cleanup: ipmiconsole_ctx_connection_cleanup_session_not_submitted (c); cleanup_ctx_fds_only: /* fds are the API responsibility, even though we didn't create them */ ipmiconsole_ctx_fds_cleanup (c); return (-1); } static int _ipmiconsole_blocking_notification_cleanup (ipmiconsole_ctx_t c) { int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->api_magic == IPMICONSOLE_CTX_API_MAGIC); if ((perr = pthread_mutex_lock (&(c->blocking.blocking_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (c->blocking.blocking_submit_requested) { /* ignore potential error, cleanup path */ close (c->blocking.blocking_notification[0]); /* ignore potential error, cleanup path */ close (c->blocking.blocking_notification[1]); c->blocking.blocking_notification[0] = -1; c->blocking.blocking_notification[1] = -1; c->blocking.blocking_submit_requested = 0; c->blocking.sol_session_established = 0; } if ((perr = pthread_mutex_unlock (&(c->blocking.blocking_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } static int _ipmiconsole_blocking_notification_setup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->api_magic == IPMICONSOLE_CTX_API_MAGIC); /* We're setting up, so no mutex locking needed at this point */ if (pipe (c->blocking.blocking_notification) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("pipe: %s", strerror (errno))); if (errno == EMFILE) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES); else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } c->blocking.blocking_submit_requested++; c->blocking.sol_session_established = 0; if (ipmiconsole_set_closeonexec (c, c->blocking.blocking_notification[0]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (ipmiconsole_set_closeonexec (c, c->blocking.blocking_notification[1]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } return (0); cleanup: _ipmiconsole_blocking_notification_cleanup (c); return (-1); } static int _ipmiconsole_block (ipmiconsole_ctx_t c) { fd_set rds; int n; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->api_magic == IPMICONSOLE_CTX_API_MAGIC); assert (c->blocking.blocking_submit_requested); FD_ZERO (&rds); FD_SET (c->blocking.blocking_notification[0], &rds); /* No mutex required here, just reading off the pipe, the pipe is * all controled in API land */ if ((n = select (c->blocking.blocking_notification[0] + 1, &rds, NULL, NULL, NULL)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("select: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } if (!n) { IPMICONSOLE_CTX_DEBUG (c, ("select returned 0")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (FD_ISSET (c->blocking.blocking_notification[0], &rds)) { uint8_t tmpbyte; ssize_t len; if ((len = read (c->blocking.blocking_notification[0], (void *)&tmpbyte, 1)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("read: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } if (!len) { IPMICONSOLE_CTX_DEBUG (c, ("blocking_notification closed")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (tmpbyte == IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ESTABLISHED) goto success; else if (tmpbyte == IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ERROR) goto cleanup; else if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY && tmpbyte == IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_DEACTIVATED) goto success; else { IPMICONSOLE_CTX_DEBUG (c, ("blocking_notification returned invalid data: %u", tmpbyte)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } } success: return (0); cleanup: return (-1); } int ipmiconsole_engine_submit_block (ipmiconsole_ctx_t c) { int perr; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if (!ipmiconsole_engine_is_setup ()) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_NOT_SETUP); return (-1); } if (c->session_submitted) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_IS_SUBMITTED); return (-1); } /* Set to success, so we know if an IPMI error occurred later */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); /* session setup required before connection setup, so * connection knows if IPv4 or IPv6 used */ if (ipmiconsole_ctx_session_setup (c) < 0) goto cleanup; if (ipmiconsole_ctx_connection_setup (c) < 0) goto cleanup; if (_ipmiconsole_blocking_notification_setup (c) < 0) goto cleanup; if (ipmiconsole_engine_submit_ctx (c) < 0) goto cleanup; if (_ipmiconsole_block (c) < 0) { /* don't go to cleanup, b/c the engine will call * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ goto cleanup_ctx_fds_only; } if ((perr = pthread_mutex_lock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* don't go to cleanup, b/c the engine will call * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ goto cleanup_ctx_fds_only; } /* Check for NOT_SUBMITTED, conceivably SOL_ERROR or SOL_ESTABLISHED * could already be set */ if (c->signal.status == IPMICONSOLE_CTX_STATUS_NOT_SUBMITTED) c->signal.status = IPMICONSOLE_CTX_STATUS_SUBMITTED; if ((perr = pthread_mutex_unlock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* don't go to cleanup, b/c the engine will call * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ goto cleanup_ctx_fds_only; } _ipmiconsole_blocking_notification_cleanup (c); /* may have been set already */ c->session_submitted++; if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); c->signal.ctx_state = IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); cleanup: ipmiconsole_ctx_connection_cleanup_session_not_submitted (c); cleanup_ctx_fds_only: _ipmiconsole_blocking_notification_cleanup (c); /* fds are the API responsibility, even though we didn't create them */ ipmiconsole_ctx_fds_cleanup (c); return (-1); } void ipmiconsole_engine_teardown (int cleanup_sol_sessions) { ipmiconsole_debug_cleanup (); ipmiconsole_engine_cleanup (cleanup_sol_sessions); } ipmiconsole_ctx_t ipmiconsole_ctx_create (const char *hostname, struct ipmiconsole_ipmi_config *ipmi_config, struct ipmiconsole_protocol_config *protocol_config, struct ipmiconsole_engine_config *engine_config) { ipmiconsole_ctx_t c = NULL; char *hostname_copy = NULL; char *port_copy = NULL; const char *hostname_ptr = NULL; const char *port_ptr = NULL; uint16_t port = RMCP_PRIMARY_RMCP_PORT; int ret; if (!hostname || !ipmi_config || !protocol_config || !engine_config || (ipmi_config->username && strlen (ipmi_config->username) > IPMI_MAX_USER_NAME_LENGTH) || (ipmi_config->password && strlen (ipmi_config->password) > IPMI_2_0_MAX_PASSWORD_LENGTH) || (ipmi_config->k_g && ipmi_config->k_g_len > IPMI_MAX_K_G_LENGTH) || (ipmi_config->privilege_level >= 0 && (ipmi_config->privilege_level != IPMICONSOLE_PRIVILEGE_USER && ipmi_config->privilege_level != IPMICONSOLE_PRIVILEGE_OPERATOR && ipmi_config->privilege_level != IPMICONSOLE_PRIVILEGE_ADMIN)) || (ipmi_config->cipher_suite_id >= IPMI_CIPHER_SUITE_ID_MIN && !IPMI_CIPHER_SUITE_ID_SUPPORTED (ipmi_config->cipher_suite_id)) || (ipmi_config->workaround_flags != IPMICONSOLE_WORKAROUND_DEFAULT && ipmi_config->workaround_flags & ~IPMICONSOLE_WORKAROUND_MASK) || (engine_config->engine_flags != IPMICONSOLE_ENGINE_DEFAULT && engine_config->engine_flags & ~IPMICONSOLE_ENGINE_MASK) || (engine_config->behavior_flags != IPMICONSOLE_BEHAVIOR_DEFAULT && engine_config->behavior_flags & ~IPMICONSOLE_BEHAVIOR_MASK) || (engine_config->debug_flags != IPMICONSOLE_DEBUG_DEFAULT && engine_config->debug_flags & ~IPMICONSOLE_DEBUG_MASK)) { IPMICONSOLE_DEBUG (("invalid input parameters")); errno = EINVAL; return (NULL); } /* Check for host:port or [Ipv6]:port format */ if ((ret = host_is_host_with_port (hostname, &hostname_copy, &port_copy)) < 0) { IPMICONSOLE_DEBUG (("host_is_host_with_port: %s", errno)); errno = EINVAL; return (NULL); } if (ret) { hostname_ptr = hostname_copy; port_ptr = port_copy; } else hostname_ptr = hostname; if ((ret = host_is_valid (hostname_ptr, port_ptr, &port)) < 0) { IPMICONSOLE_DEBUG (("host_is_valid: %s", errno)); errno = EINVAL; goto free_cleanup; } if (!ret) { IPMICONSOLE_DEBUG (("invalid input parameters")); errno = EINVAL; goto free_cleanup; } /* If engine is not setup, the default_config is not yet known */ if (!ipmiconsole_engine_is_setup ()) { IPMICONSOLE_DEBUG (("engine not initialized")); errno = EAGAIN; goto free_cleanup; } if ((engine_config->engine_flags != IPMICONSOLE_ENGINE_DEFAULT && engine_config->engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) || default_config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) { if (!(c = (ipmiconsole_ctx_t)secure_malloc (sizeof (struct ipmiconsole_ctx)))) { errno = ENOMEM; goto free_cleanup; } } else { if (!(c = (ipmiconsole_ctx_t)malloc (sizeof (struct ipmiconsole_ctx)))) { errno = ENOMEM; goto free_cleanup; } } /* XXX: Should move much of this to engine_submit, to make context * creation faster for console concentrators */ if (ipmiconsole_ctx_setup (c) < 0) goto cleanup; if (ipmiconsole_ctx_config_setup (c, hostname_ptr, port, ipmi_config, protocol_config, engine_config) < 0) goto cleanup; /* must be called after ipmiconsole_ctx_config_setup() */ if (ipmiconsole_ctx_debug_setup (c) < 0) goto cleanup; if (ipmiconsole_ctx_signal_setup (c) < 0) goto cleanup; if (ipmiconsole_ctx_blocking_setup (c) < 0) goto cleanup; /* only initializes value, no need to destroy/cleanup anything in here */ ipmiconsole_ctx_fds_setup (c); c->session_submitted = 0; free (hostname_copy); free (port_copy); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (c); cleanup: ipmiconsole_ctx_config_cleanup (c); ipmiconsole_ctx_debug_cleanup (c); ipmiconsole_ctx_signal_cleanup (c); ipmiconsole_ctx_blocking_cleanup (c); /* Note: use engine_config->engine_flags not c->config.engine_flags, * b/c we don't know where we failed earlier. */ if ((engine_config->engine_flags != IPMICONSOLE_ENGINE_DEFAULT && engine_config->engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) || default_config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) secure_free (c, sizeof (struct ipmiconsole_ctx)); else free (c); free_cleanup: free (hostname_copy); free (port_copy); return (NULL); } int ipmiconsole_ctx_set_config (ipmiconsole_ctx_t c, ipmiconsole_ctx_config_option_t config_option, void *config_option_value) { unsigned int *tmpptr; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if ((config_option != IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE) || !config_option_value) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PARAMETERS); return (-1); } if (c->session_submitted) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_IS_SUBMITTED); return (-1); } switch (config_option) { case IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE: tmpptr = (unsigned int *)config_option_value; if (!IPMI_PAYLOAD_INSTANCE_VALID((*tmpptr))) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PARAMETERS); return (-1); } c->config.sol_payload_instance = *(tmpptr); break; default: ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); } int ipmiconsole_ctx_get_config (ipmiconsole_ctx_t c, ipmiconsole_ctx_config_option_t config_option, void *config_option_value) { unsigned int *tmpptr; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if ((config_option != IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE) || !config_option_value) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PARAMETERS); return (-1); } switch (config_option) { case IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE: tmpptr = (unsigned int *)config_option_value; (*tmpptr) = c->config.sol_payload_instance; break; default: ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); } int ipmiconsole_ctx_errnum (ipmiconsole_ctx_t c) { if (!c) return (IPMICONSOLE_ERR_CTX_NULL); else if (c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (IPMICONSOLE_ERR_CTX_INVALID); else return (ipmiconsole_ctx_get_errnum (c)); } char * ipmiconsole_ctx_strerror (int errnum) { if (errnum >= IPMICONSOLE_ERR_SUCCESS && errnum <= IPMICONSOLE_ERR_ERRNUMRANGE) return (ipmiconsole_errmsgs[errnum]); else return (ipmiconsole_errmsgs[IPMICONSOLE_ERR_ERRNUMRANGE]); } char * ipmiconsole_ctx_errormsg (ipmiconsole_ctx_t c) { return (ipmiconsole_ctx_strerror (ipmiconsole_ctx_errnum (c))); } ipmiconsole_ctx_status_t ipmiconsole_ctx_status (ipmiconsole_ctx_t c) { int status; int perr; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (IPMICONSOLE_CTX_STATUS_ERROR); /* Do not check if the context is submitted, b/c it may not be. * * Also, do not set errnum == success for this function, it could be * returning IPMICONSOLE_CTX_STATUS_ERROR. */ if ((perr = pthread_mutex_lock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (IPMICONSOLE_CTX_STATUS_ERROR); } status = c->signal.status; if ((perr = pthread_mutex_unlock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (IPMICONSOLE_CTX_STATUS_ERROR); } return (status); } int ipmiconsole_ctx_fd (ipmiconsole_ctx_t c) { if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if (!c->session_submitted) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_NOT_SUBMITTED); return (-1); } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); c->fds.user_fd_retrieved++; return (c->fds.user_fd); } int ipmiconsole_ctx_generate_break (ipmiconsole_ctx_t c) { uint8_t tmpbyte; if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return (-1); if (!c->session_submitted) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_NOT_SUBMITTED); return (-1); } tmpbyte = IPMICONSOLE_PIPE_GENERATE_BREAK_CODE; if (write (c->fds.asynccomm[1], &tmpbyte, 1) < 0) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); } void ipmiconsole_ctx_destroy (ipmiconsole_ctx_t c) { if (!c || c->magic != IPMICONSOLE_CTX_MAGIC || c->api_magic != IPMICONSOLE_CTX_API_MAGIC) return; if (c->session_submitted) { int perr; /* achu: fds cleanup will not race with engine polling, b/c the * garbage collection will not complete until the flags set * below are set. */ ipmiconsole_ctx_fds_cleanup (c); if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); assert (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_DESTROYED); /* Be careful, if the mutex is destroyed we shouldn't unlock it. */ if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED) { c->signal.ctx_state = IPMICONSOLE_CTX_STATE_USER_DESTROYED; /* must change magic in this mutex, to avoid racing * to destroy the context. */ c->api_magic = ~IPMICONSOLE_CTX_API_MAGIC; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } else if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT) { c->signal.ctx_state = IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED; /* must change magic in this mutex, to avoid racing * to destroy the context. */ c->api_magic = ~IPMICONSOLE_CTX_API_MAGIC; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } else if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_DESTROYED) { /* Engine has torndown, clean this thing up */ ipmiconsole_ctx_config_cleanup (c); ipmiconsole_ctx_debug_cleanup (c); ipmiconsole_ctx_signal_cleanup (c); ipmiconsole_ctx_blocking_cleanup (c); ipmiconsole_ctx_cleanup (c); /* No unlocking, mutex is now destroyed */ } else { /* State IPMICONSOLE_CTX_STATE_INIT shouldn't be possible if submitted */ /* State IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED or * IPMICONSOLE_CTX_STATE_USER_DESTROYED shouldn't be possible, * api_magic != IPMICONSOLE_CTX_API_MAGIC and we shouldn't be * at this point. */ IPMICONSOLE_DEBUG (("invalid ctx_state in ipmiconsole_ctx_destroy: %d", c->signal.ctx_state)); if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } return; } /* else session never submitted, so we have to cleanup */ assert(c->signal.ctx_state == IPMICONSOLE_CTX_STATE_INIT); c->api_magic = ~IPMICONSOLE_CTX_API_MAGIC; ipmiconsole_ctx_config_cleanup (c); ipmiconsole_ctx_debug_cleanup (c); ipmiconsole_ctx_signal_cleanup (c); ipmiconsole_ctx_blocking_cleanup (c); ipmiconsole_ctx_cleanup (c); } int ipmiconsole_username_is_valid (const char *username) { if (!username) return (0); if (strlen (username) > IPMI_MAX_USER_NAME_LENGTH) return (0); return (1); } int ipmiconsole_password_is_valid (const char *password) { if (!password) return (0); if (strlen (password) > IPMI_2_0_MAX_PASSWORD_LENGTH) return (0); return (1); } int ipmiconsole_k_g_is_valid (const unsigned char *k_g, unsigned int k_g_len) { if (!k_g) return (0); if (k_g_len > IPMI_MAX_K_G_LENGTH) return (0); return (1); } int ipmiconsole_privilege_level_is_valid (int privilege_level) { if (privilege_level != IPMICONSOLE_PRIVILEGE_USER && privilege_level != IPMICONSOLE_PRIVILEGE_OPERATOR && privilege_level != IPMICONSOLE_PRIVILEGE_ADMIN) return (0); return (1); } int ipmiconsole_cipher_suite_id_is_valid (int cipher_suite_id) { if (!IPMI_CIPHER_SUITE_ID_SUPPORTED (cipher_suite_id)) return (0); return (1); } int ipmiconsole_workaround_flags_is_valid (unsigned int workaround_flags) { if (workaround_flags & ~IPMICONSOLE_WORKAROUND_MASK) return (0); return (1); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_checks.c0000644002055400205540000012335013527331637022305 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_checks.c,v 1.48 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_checks.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_packet.h" #include "freeipmi-portability.h" int ipmiconsole_check_checksum (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { fiid_obj_t obj_cmd; int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); /* IPMI Workaround * * Discovered on Supermicro X9SCM-iiF, Supermicro X9DRi-F * * Checksums are computed incorrectly. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_NO_CHECKSUM_CHECK) return (1); obj_cmd = ipmiconsole_packet_object (c, p); if ((rv = ipmi_lan_check_checksum (c->connection.obj_lan_msg_hdr_rs, obj_cmd, c->connection.obj_lan_msg_trlr_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_check_checksum: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("checksum check failed; p = %d", p)); return (rv); } int ipmiconsole_check_authentication_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, void *buf, unsigned int buflen) { char *password; int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); assert (buf); assert (buflen); if (strlen (c->config.password)) password = c->config.password; else password = NULL; if ((rv = ipmi_rmcpplus_check_packet_session_authentication_code (c->config.integrity_algorithm, buf, buflen, c->session.integrity_key_ptr, c->session.integrity_key_len, password, (password) ? strlen (password) : 0, c->connection.obj_rmcpplus_session_trlr_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_check_packet_session_authentication_code: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("authentication code check failed; p = %d", p)); return (rv); } int ipmiconsole_check_outbound_sequence_number (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint32_t session_sequence_number; uint64_t val; int rv = 0; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (FIID_OBJ_GET (c->connection.obj_rmcpplus_session_hdr_rs, "session_sequence_number", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'session_sequence_number': %s", fiid_obj_errormsg (c->connection.obj_rmcpplus_session_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } session_sequence_number = val; if ((rv = ipmi_check_session_sequence_number_2_0 (session_sequence_number, &(c->session.highest_received_sequence_number), &(c->session.previously_received_list), 0)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_check_session_sequence_number_2_0: 'session_sequence_number': %s", fiid_obj_errormsg (c->connection.obj_rmcpplus_session_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("session sequence number check failed; p = %d; session_sequence_number = %u; highest_received_sequence_number = %u", p, session_sequence_number, c->session.highest_received_sequence_number)); return (rv); } int ipmiconsole_check_session_id (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint32_t session_id, expected_session_id; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4 || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) { fiid_obj_t obj_cmd; obj_cmd = ipmiconsole_packet_object (c, p); if (FIID_OBJ_GET (obj_cmd, "remote_console_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'remote_console_session_id': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } session_id = val; expected_session_id = c->session.remote_console_session_id; } else { if (FIID_OBJ_GET (c->connection.obj_rmcpplus_session_hdr_rs, "session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'session_id': %s", fiid_obj_errormsg (c->connection.obj_rmcpplus_session_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } session_id = val; expected_session_id = c->session.remote_console_session_id; } if (session_id != expected_session_id) IPMICONSOLE_CTX_DEBUG (c, ("session id check failed; p = %d; session_id = %Xh; expected_session_id = %Xh", p, session_id, expected_session_id)); return ((session_id == expected_session_id) ? 1 : 0); } int ipmiconsole_check_network_function (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t netfn, expected_netfn; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (FIID_OBJ_GET (c->connection.obj_lan_msg_hdr_rs, "net_fn", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'net_fn': %s", fiid_obj_errormsg (c->connection.obj_lan_msg_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } netfn = val; expected_netfn = IPMI_NET_FN_APP_RS; if (netfn != expected_netfn) IPMICONSOLE_CTX_DEBUG (c, ("network function check failed; p = %d; netfn = %Xh; expected_netfn = %Xh", p, netfn, expected_netfn)); return ((netfn == expected_netfn) ? 1 : 0); } int ipmiconsole_check_command (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t cmd, expected_cmd; fiid_obj_t obj_cmd; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); obj_cmd = ipmiconsole_packet_object (c, p); if (FIID_OBJ_GET (obj_cmd, "cmd", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'cmd': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } cmd = val; switch (p) { case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS: expected_cmd = IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES; break; case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: expected_cmd = IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL; break; case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS: expected_cmd = IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT; break; case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS: expected_cmd = IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS; break; case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS: expected_cmd = IPMI_CMD_ACTIVATE_PAYLOAD; break; case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS: expected_cmd = IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION; break; case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS: expected_cmd = IPMI_CMD_DEACTIVATE_PAYLOAD; break; case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS: expected_cmd = IPMI_CMD_CLOSE_SESSION; break; default: IPMICONSOLE_CTX_DEBUG (c, ("invalid packet type: p = %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (cmd != expected_cmd) IPMICONSOLE_CTX_DEBUG (c, ("command check failed; p = %d; cmd = %Xh; expected_cmd = %Xh", p, cmd, expected_cmd)); return ((cmd == expected_cmd) ? 1 : 0); } int ipmiconsole_check_requester_sequence_number (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t req_seq, expected_req_seq; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (FIID_OBJ_GET (c->connection.obj_lan_msg_hdr_rs, "rq_seq", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'rq_seq': %s", fiid_obj_errormsg (c->connection.obj_lan_msg_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } req_seq = val; expected_req_seq = c->session.requester_sequence_number; if (req_seq != expected_req_seq) IPMICONSOLE_CTX_DEBUG (c, ("requester sequence number check failed; p = %d; req_seq = %Xh; expected_req_seq = %Xh", p, req_seq, expected_req_seq)); return ((req_seq == expected_req_seq) ? 1 : 0); } int ipmiconsole_check_completion_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t comp_code; fiid_obj_t obj_cmd; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); obj_cmd = ipmiconsole_packet_object (c, p); if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } comp_code = val; if (comp_code != IPMI_COMP_CODE_COMMAND_SUCCESS) IPMICONSOLE_CTX_DEBUG (c, ("completion code check failed; p = %d; comp_code = %Xh", p, comp_code)); return ((comp_code == IPMI_COMP_CODE_COMMAND_SUCCESS) ? 1 : 0); } int ipmiconsole_check_payload_type (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t payload_type, expected_payload_type; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4 || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (FIID_OBJ_GET (c->connection.obj_rmcpplus_session_hdr_rs, "payload_type", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'payload_type': %s", fiid_obj_errormsg (c->connection.obj_rmcpplus_session_hdr_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } payload_type = val; if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE) expected_payload_type = IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE; else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2) expected_payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2; else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) expected_payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4; else if (p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS) expected_payload_type = IPMI_PAYLOAD_TYPE_SOL; else expected_payload_type = IPMI_PAYLOAD_TYPE_IPMI; if (payload_type != expected_payload_type) IPMICONSOLE_CTX_DEBUG (c, ("payload type check failed; p = %d; payload_type = %Xh; expected_payload_type = %Xh", p, payload_type, expected_payload_type)); return ((payload_type == expected_payload_type) ? 1 : 0); } int ipmiconsole_check_message_tag (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t message_tag, expected_message_tag; fiid_obj_t obj_cmd; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4); obj_cmd = ipmiconsole_packet_object (c, p); if (FIID_OBJ_GET (obj_cmd, "message_tag", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'message_tag': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } message_tag = val; expected_message_tag = c->session.message_tag; if (message_tag != expected_message_tag) IPMICONSOLE_CTX_DEBUG (c, ("message tag check failed; p = %d", p)); return ((message_tag == expected_message_tag) ? 1 : 0); } int ipmiconsole_check_rmcpplus_status_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t rmcpplus_status_code; uint64_t val; fiid_obj_t obj_cmd; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4); obj_cmd = ipmiconsole_packet_object (c, p); if (FIID_OBJ_GET (obj_cmd, "rmcpplus_status_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'rmcpplus_status_code': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } rmcpplus_status_code = val; if (rmcpplus_status_code != RMCPPLUS_STATUS_NO_ERRORS) IPMICONSOLE_CTX_DEBUG (c, ("rmcpplus status code check failed; p = %d", p)); return ((rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS) ? 1 : 0); } int ipmiconsole_check_packet (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { fiid_obj_t obj_cmd; int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); obj_cmd = ipmiconsole_packet_object (c, p); if ((rv = fiid_obj_packet_valid (obj_cmd)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_packet_valid: %s", fiid_obj_errormsg (obj_cmd))); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("invalid packet received; p = %d", p)); return (rv); } int ipmiconsole_check_open_session_response_privilege (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE); /* IPMI Workaround * * Intel IPMI 2.0 implementations don't support the highest level privilege. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) { uint8_t maximum_privilege_level; uint64_t val; if (FIID_OBJ_GET (c->connection.obj_open_session_response, "maximum_privilege_level", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'maximum_privilege_level': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } maximum_privilege_level = val; rv = (maximum_privilege_level == c->config.privilege_level) ? 1 : 0; } else { if ((rv = ipmi_check_open_session_maximum_privilege (c->config.privilege_level, c->connection.obj_open_session_response)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_check_open_session_maximum_privilege: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("open session response privilege check failed; p = %d", p)); return (rv); } int ipmiconsole_check_rakp_2_key_exchange_authentication_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; uint8_t managed_system_guid[IPMI_MANAGED_SYSTEM_GUID_LENGTH]; int managed_system_guid_len; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; char *username; unsigned int username_len; char *password; unsigned int password_len; uint32_t managed_system_session_id; uint64_t val; int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2); /* IPMI Workaround * * Intel IPMI 2.0 implementations pad their usernames. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (strlen (c->config.username)) strcpy (username_buf, c->config.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { if (strlen (c->config.username)) username = c->config.username; else username = NULL; username_len = (username) ? strlen (username) : 0; } /* IPMI Workaround * * Supermicro IPMI 2.0 implementations may have invalid payload lengths * on the RAKP response packet. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SUPERMICRO_2_0_SESSION) { uint8_t keybuf[IPMICONSOLE_PACKET_BUFLEN]; int keybuf_len; if ((keybuf_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "key_exchange_authentication_code", keybuf, IPMICONSOLE_PACKET_BUFLEN)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && keybuf_len == 1) { if (fiid_obj_clear_field (c->connection.obj_rakp_message_2, "key_exchange_authentication_code") < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_clear_field: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } else if (c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && keybuf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (c->connection.obj_rakp_message_2, "key_exchange_authentication_code", keybuf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } else if (c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && keybuf_len == (IPMI_HMAC_MD5_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (c->connection.obj_rakp_message_2, "key_exchange_authentication_code", keybuf, IPMI_HMAC_MD5_DIGEST_LENGTH) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } } if (strlen (c->config.password)) password = c->config.password; else password = NULL; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround * * Intel IPMI 2.0 implementations improperly calculate HMAC-MD5-128 hashes * when the passwords are > 16 bytes long. The BMCs probably assume * all keys are <= 16 bytes in length. So we have to adjust. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION && c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; /* IPMI Workaround * * Discovered on Sun Fire 4100. * * The key exchange authentication code is the wrong length. We * need to shorten it. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION && c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1) { uint8_t buf[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int buf_len; /* trace, but do not return potential error */ if ((buf_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "key_exchange_authentication_code", buf, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); if (buf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { /* trace, but do not return potential error */ if (fiid_obj_clear_field (c->connection.obj_rakp_message_2, "key_exchange_authentication_code") < 0) IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_clear_field: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); if (fiid_obj_set_data (c->connection.obj_rakp_message_2, "key_exchange_authentication_code", buf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); } } if (FIID_OBJ_GET (c->connection.obj_open_session_response, "managed_system_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } managed_system_session_id = val; if ((managed_system_random_number_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (managed_system_random_number_len != IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: invalid managed system random number length: %d", managed_system_random_number_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((managed_system_guid_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "managed_system_guid", managed_system_guid, IPMI_MANAGED_SYSTEM_GUID_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'managed_system_guid': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (managed_system_guid_len != IPMI_MANAGED_SYSTEM_GUID_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: invalid managed system guid length: %d", managed_system_guid_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((rv = ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code (c->config.authentication_algorithm, password, password_len, c->session.remote_console_session_id, managed_system_session_id, c->session.remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, managed_system_random_number_len, managed_system_guid, managed_system_guid_len, c->session.name_only_lookup, c->config.privilege_level, username, username_len, c->connection.obj_rakp_message_2)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("rakp 2 key exchanged authentication code check failed; p = %d", p)); return (rv); } int ipmiconsole_check_rakp_4_integrity_check_value (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t managed_system_guid[IPMI_MANAGED_SYSTEM_GUID_LENGTH]; int managed_system_guid_len; uint32_t managed_system_session_id; uint8_t authentication_algorithm = 0; uint64_t val; int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4); /* IPMI Workaround * * Intel IPMI 2.0 implementations respond with the integrity check * value based on the integrity algorithm rather than the * authentication algorithm. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) { if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; else if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1; else if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5; else if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { /* achu: I have thus far been unable to reverse engineer this * corner case. Since we cannot provide a reasonable two * part authentication, we're going to error out. */ IPMICONSOLE_CTX_DEBUG (c, ("Intel Non-Compliance: Cannot Reverse Engineer")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_ERROR); return (0); } } else authentication_algorithm = c->config.authentication_algorithm; if (FIID_OBJ_GET (c->connection.obj_open_session_response, "managed_system_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } managed_system_session_id = val; if ((managed_system_guid_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "managed_system_guid", managed_system_guid, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'managed_system_guid': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (managed_system_guid_len != IPMI_MANAGED_SYSTEM_GUID_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: invalid managed system guid length: %d", managed_system_guid_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* IPMI Workaround (achu) * * Discovered on Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * For whatever reason, with cipher suite 0, the RAKP 4 response * returns with an Integrity Check Value when it should be empty. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_NON_EMPTY_INTEGRITY_CHECK_VALUE && !c->config.cipher_suite_id) { if (fiid_obj_clear_field (c->connection.obj_rakp_message_4, "integrity_check_value") < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_clear_field: 'integrity_check_value': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_4))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } if ((rv = ipmi_rmcpplus_check_rakp_4_integrity_check_value (authentication_algorithm, c->session.sik_key_ptr, c->session.sik_key_len, c->session.remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_session_id, managed_system_guid, managed_system_guid_len, c->connection.obj_rakp_message_4)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_check_rakp_4_integrity_check_value: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("rakp 4 integrity check value check failed; p = %d", p)); return (rv); } int ipmiconsole_check_payload_pad (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if ((rv = ipmi_rmcpplus_check_payload_pad (c->config.confidentiality_algorithm, c->connection.obj_rmcpplus_payload_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_check_payload_pad: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("payload pad check failed; p = %d", p)); return (rv); } int ipmiconsole_check_integrity_pad (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); assert (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) return (1); if ((rv = ipmi_rmcpplus_check_integrity_pad (c->connection.obj_rmcpplus_session_trlr_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_check_integrity_pad: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!rv) IPMICONSOLE_CTX_DEBUG (c, ("integrity pad check failed; p = %d", p)); return (rv); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_checks.h0000644002055400205540000000634013527331637022311 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_checks.h,v 1.13 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_CHECKS_H #define IPMICONSOLE_CHECKS_H #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" int ipmiconsole_check_checksum (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_authentication_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, void *buf, unsigned int buflen); int ipmiconsole_check_outbound_sequence_number (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_session_id (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_network_function (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_command (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_requester_sequence_number (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_completion_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_payload_type (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_message_tag (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_rmcpplus_status_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_packet (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_open_session_response_privilege (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_rakp_2_key_exchange_authentication_code (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_rakp_4_integrity_check_value (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_payload_pad (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_check_integrity_pad (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); #endif /* IPMICONSOLE_CHECKS_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_ctx.c0000644002055400205540000014626513527331637021655 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_ctx.c,v 1.57 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_util.h" #include "scbuf.h" #include "list.h" #include "secure.h" #include "timeval.h" #include "freeipmi-portability.h" extern List console_engine_ctxs_to_destroy; extern pthread_mutex_t console_engine_ctxs_to_destroy_mutex; extern struct ipmiconsole_ctx_config default_config; int ipmiconsole_ctx_setup (ipmiconsole_ctx_t c) { int perr; assert (c); /* magic may not be set yet, no assert */ memset (c, '\0', sizeof (struct ipmiconsole_ctx)); c->magic = IPMICONSOLE_CTX_MAGIC; c->api_magic = IPMICONSOLE_CTX_API_MAGIC; if ((perr = pthread_mutex_init (&(c->errnum_mutex), NULL)) != 0) { errno = perr; return (-1); } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (0); } void ipmiconsole_ctx_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* don't call ctx_set_errnum after the mutex_destroy */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CTX_INVALID); pthread_mutex_destroy (&(c->errnum_mutex)); c->magic = ~IPMICONSOLE_CTX_MAGIC; c->api_magic = ~IPMICONSOLE_CTX_API_MAGIC; if (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) secure_free (c, sizeof (struct ipmiconsole_ctx)); else free (c); } /* Wrapper for list callback on console_engine_ctxs_to_destroy */ void ipmiconsole_ctx_garbage_collection_cleanup (ipmiconsole_ctx_t c) { int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); assert (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED); /* Be careful, if the mutex is destroyed we shouldn't unlock it. */ /* Most common/reasonable state to expect under normal operations */ if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED) { ipmiconsole_ctx_config_cleanup (c); ipmiconsole_ctx_debug_cleanup (c); ipmiconsole_ctx_signal_cleanup (c); ipmiconsole_ctx_blocking_cleanup (c); ipmiconsole_ctx_cleanup (c); } /* When tearing down engine, contexts could be in garbage collection * wait b/c we're tearing down things. Move to ENGINE_DESTOYED to * allow ipmiconsole_ctx_destroy() to do final cleanup. */ else if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT) { c->signal.ctx_state = IPMICONSOLE_CTX_STATE_ENGINE_DESTROYED; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } else { IPMICONSOLE_DEBUG (("invalid ctx_state in ipmiconsole_ctx_garbage_collection_cleanup: %d", c->signal.ctx_state)); if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } } int ipmiconsole_ctx_config_setup (ipmiconsole_ctx_t c, const char *hostname, uint16_t port, struct ipmiconsole_ipmi_config *ipmi_config, struct ipmiconsole_protocol_config *protocol_config, struct ipmiconsole_engine_config *engine_config) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (hostname); assert (port); strcpy (c->config.hostname, hostname); c->config.port = port; if (ipmi_config->username) strcpy (c->config.username, ipmi_config->username); else strcpy (c->config.username, default_config.username); if (ipmi_config->password) strcpy (c->config.password, ipmi_config->password); else strcpy (c->config.password, default_config.password); /* k_g may contain nulls */ /* don't load defaults if k_g is not NULL */ if (ipmi_config->k_g) { if (ipmi_config->k_g_len) { memcpy (c->config.k_g, ipmi_config->k_g, ipmi_config->k_g_len); c->config.k_g_len = ipmi_config->k_g_len; } else { memset (c->config.k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); c->config.k_g_len = 0; } } else { memcpy (c->config.k_g, default_config.k_g, default_config.k_g_len); c->config.k_g_len = default_config.k_g_len; } if (c->config.k_g_len) { unsigned int i; int all_zeroes = 1; /* Special case, check to make sure user didn't input zero as a * k_g key. */ for (i = 0; i < IPMI_MAX_K_G_LENGTH; i++) { if (c->config.k_g[i] != 0) { all_zeroes = 0; break; } } if (all_zeroes) c->config.k_g_len = 0; } if (ipmi_config->privilege_level >= 0) { if (ipmi_config->privilege_level == IPMICONSOLE_PRIVILEGE_USER) c->config.privilege_level = IPMI_PRIVILEGE_LEVEL_USER; else if (ipmi_config->privilege_level == IPMICONSOLE_PRIVILEGE_OPERATOR) c->config.privilege_level = IPMI_PRIVILEGE_LEVEL_OPERATOR; else c->config.privilege_level = IPMI_PRIVILEGE_LEVEL_ADMIN; } else c->config.privilege_level = default_config.privilege_level; if (ipmi_config->cipher_suite_id >= IPMI_CIPHER_SUITE_ID_MIN) c->config.cipher_suite_id = ipmi_config->cipher_suite_id; else c->config.cipher_suite_id = default_config.cipher_suite_id; if (ipmi_config->workaround_flags != IPMICONSOLE_WORKAROUND_DEFAULT) c->config.workaround_flags = ipmi_config->workaround_flags; else c->config.workaround_flags = default_config.workaround_flags; if (protocol_config->session_timeout_len > 0) c->config.session_timeout_len = protocol_config->session_timeout_len; else c->config.session_timeout_len = default_config.session_timeout_len; if (protocol_config->retransmission_timeout_len > 0) c->config.retransmission_timeout_len = protocol_config->retransmission_timeout_len; else c->config.retransmission_timeout_len = default_config.retransmission_timeout_len; if (protocol_config->retransmission_backoff_count > 0) c->config.retransmission_backoff_count = protocol_config->retransmission_backoff_count; else c->config.retransmission_backoff_count = default_config.retransmission_backoff_count; if (protocol_config->keepalive_timeout_len > 0) c->config.keepalive_timeout_len = protocol_config->keepalive_timeout_len; else c->config.keepalive_timeout_len = default_config.keepalive_timeout_len; if (protocol_config->retransmission_keepalive_timeout_len > 0) c->config.retransmission_keepalive_timeout_len = protocol_config->retransmission_keepalive_timeout_len; else c->config.retransmission_keepalive_timeout_len = default_config.retransmission_keepalive_timeout_len; if (protocol_config->acceptable_packet_errors_count > 0) c->config.acceptable_packet_errors_count = protocol_config->acceptable_packet_errors_count; else c->config.acceptable_packet_errors_count = default_config.acceptable_packet_errors_count; if (protocol_config->maximum_retransmission_count > 0) c->config.maximum_retransmission_count = protocol_config->maximum_retransmission_count; else c->config.maximum_retransmission_count = default_config.maximum_retransmission_count; if (engine_config->engine_flags != IPMICONSOLE_ENGINE_DEFAULT) c->config.engine_flags = engine_config->engine_flags; else c->config.engine_flags = default_config.engine_flags; if (engine_config->behavior_flags != IPMICONSOLE_BEHAVIOR_DEFAULT) c->config.behavior_flags = engine_config->behavior_flags; else c->config.behavior_flags = default_config.behavior_flags; if (engine_config->debug_flags != IPMICONSOLE_DEBUG_DEFAULT) c->config.debug_flags = engine_config->debug_flags; else c->config.debug_flags = default_config.debug_flags; c->config.sol_payload_instance = default_config.sol_payload_instance; /* Data based on Configuration Parameters */ if (ipmi_cipher_suite_id_to_algorithms (c->config.cipher_suite_id, &(c->config.authentication_algorithm), &(c->config.integrity_algorithm), &(c->config.confidentiality_algorithm)) < 0) { IPMICONSOLE_DEBUG (("ipmi_cipher_suite_id_to_algorithms: %s", strerror (errno))); return (-1); } /* Retransmission timeout cannot be larger than the session timeout */ if (c->config.retransmission_timeout_len > c->config.session_timeout_len) { IPMICONSOLE_DEBUG (("retransmission_timeout_len (%u) > session_timeout_len (%u)", c->config.retransmission_timeout_len, c->config.session_timeout_len)); errno = EINVAL; return (-1); } /* Keepalive timeout cannot be larger than the session timeout */ if (c->config.keepalive_timeout_len > c->config.session_timeout_len) { IPMICONSOLE_DEBUG (("keepalive_timeout_len (%u) > session_timeout_len (%u)", c->config.keepalive_timeout_len, c->config.session_timeout_len)); errno = EINVAL; return (-1); } /* Retransmission timeout cannot be larger than the keepalive timeout */ if (c->config.retransmission_timeout_len > c->config.keepalive_timeout_len) { IPMICONSOLE_DEBUG (("retransmission_timeout_len (%u) > keepalive_timeout_len (%u)", c->config.retransmission_timeout_len, c->config.keepalive_timeout_len)); errno = EINVAL; return (-1); } /* Retransmission keepalive timeout cannot be larger than the keepalive timeout */ if (c->config.retransmission_keepalive_timeout_len > c->config.keepalive_timeout_len) { IPMICONSOLE_DEBUG (("retransmission_keepalive_timeout_len (%u) > keepalive_timeout_len (%u)", c->config.retransmission_keepalive_timeout_len, c->config.keepalive_timeout_len)); errno = EINVAL; return (-1); } return (0); } void ipmiconsole_ctx_config_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* nothing now, reserve for later */ } int ipmiconsole_ctx_debug_setup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->config.debug_flags & IPMICONSOLE_DEBUG_FILE) { char filename[MAXPATHLEN]; pid_t pid; pid = getpid(); snprintf (filename, MAXPATHLEN, "%s.%s.%d", IPMICONSOLE_DEBUG_FILENAME, c->config.hostname, pid); if ((c->debug.debug_fd = open (filename, O_CREAT | O_APPEND | O_WRONLY | O_EXCL, 0600)) < 0) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_CTX_DEBUG (c, ("open: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); c->config.debug_flags = 0; return (-1); } } return (0); } void ipmiconsole_ctx_debug_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->config.debug_flags & IPMICONSOLE_DEBUG_FILE && c->debug.debug_fd >= 0) { /* ignore potential error, cleanup path */ close (c->debug.debug_fd); c->debug.debug_fd = -1; } c->config.debug_flags = 0; } int ipmiconsole_ctx_signal_setup (ipmiconsole_ctx_t c) { int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((perr = pthread_mutex_init (&c->signal.status_mutex, NULL)) != 0) { errno = perr; return (-1); } c->signal.status = IPMICONSOLE_CTX_STATUS_NOT_SUBMITTED; if ((perr = pthread_mutex_init (&c->signal.mutex_ctx_state, NULL)) != 0) { errno = perr; return (-1); } c->signal.ctx_state = IPMICONSOLE_CTX_STATE_INIT; return (0); } void ipmiconsole_ctx_signal_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); pthread_mutex_destroy (&(c->signal.status_mutex)); pthread_mutex_destroy (&(c->signal.mutex_ctx_state)); } int ipmiconsole_ctx_non_blocking_setup (ipmiconsole_ctx_t c, Ipmiconsole_callback callback, void *callback_arg) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); c->non_blocking.callback = callback; c->non_blocking.callback_arg = callback_arg; return (0); } int ipmiconsole_ctx_blocking_setup (ipmiconsole_ctx_t c) { int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((perr = pthread_mutex_init (&c->blocking.blocking_mutex, NULL)) != 0) { errno = perr; return (-1); } c->blocking.blocking_submit_requested = 0; c->blocking.blocking_notification[0] = -1; c->blocking.blocking_notification[1] = -1; c->blocking.sol_session_established = 0; return (0); } void ipmiconsole_ctx_blocking_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); pthread_mutex_destroy (&(c->blocking.blocking_mutex)); } int ipmiconsole_ctx_connection_setup (ipmiconsole_ctx_t c) { struct sockaddr *srcaddr; socklen_t srcaddr_len; struct sockaddr_in srcaddr4; struct sockaddr_in6 srcaddr6; int domain; int sv[2]; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (!(c->session_submitted)); /* session info must be setup first so we know how to setup IPv4 vs IPv6 */ assert (c->session.session_info_setup); memset (&(c->connection), '\0', sizeof (struct ipmiconsole_ctx_connection)); c->connection.user_fd = -1; c->connection.ipmiconsole_fd = -1; c->connection.ipmi_fd = -1; c->connection.asynccomm[0] = -1; c->connection.asynccomm[1] = -1; /* File Descriptor User Interface */ if (socketpair (AF_UNIX, SOCK_STREAM, 0, sv) < 0) { IPMICONSOLE_DEBUG (("socketpair: %s", strerror (errno))); if (errno == EMFILE) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES); else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } c->connection.user_fd = sv[0]; c->connection.ipmiconsole_fd = sv[1]; if (ipmiconsole_set_closeonexec (c, c->connection.user_fd) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (ipmiconsole_set_closeonexec (c, c->connection.ipmiconsole_fd) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } /* Copy for API level */ c->fds.user_fd = c->connection.user_fd; c->fds.user_fd_retrieved = 0; secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; if (!(c->connection.console_remote_console_to_bmc = scbuf_create (CONSOLE_REMOTE_CONSOLE_TO_BMC_BUF_MIN, CONSOLE_REMOTE_CONSOLE_TO_BMC_BUF_MAX, secure_malloc_flag))) { IPMICONSOLE_DEBUG (("scbuf_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.console_bmc_to_remote_console = scbuf_create (CONSOLE_BMC_TO_REMOTE_CONSOLE_BUF_MIN, CONSOLE_BMC_TO_REMOTE_CONSOLE_BUF_MAX, secure_malloc_flag))) { IPMICONSOLE_DEBUG (("scbuf_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } /* Connection Data */ if (c->session.addr->sa_family == AF_INET) { memset (&srcaddr4, '\0', sizeof (struct sockaddr_in)); srcaddr4.sin_family = AF_INET; srcaddr4.sin_port = htons (0); srcaddr = (struct sockaddr *)&srcaddr4; srcaddr_len = sizeof (struct sockaddr_in); domain = AF_INET; /* to remove dereference warning on srcaddr below */ } else { memset (&srcaddr6, '\0', sizeof (struct sockaddr_in6)); srcaddr6.sin6_family = AF_INET6; srcaddr6.sin6_port = htons (0); srcaddr = (struct sockaddr *)&srcaddr6; srcaddr_len = sizeof (struct sockaddr_in6); domain = AF_INET6; /* to remove dereference warning on srcaddr below */ } if ((c->connection.ipmi_fd = socket (domain, SOCK_DGRAM, 0)) < 0) { IPMICONSOLE_DEBUG (("socket: %s", strerror (errno))); if (errno == EMFILE) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES); else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } if (ipmiconsole_set_closeonexec (c, c->connection.ipmi_fd) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (bind (c->connection.ipmi_fd, srcaddr, srcaddr_len) < 0) { IPMICONSOLE_DEBUG (("bind: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } if (!(c->connection.ipmi_from_bmc = scbuf_create (IPMI_FROM_BMC_BUF_MIN, IPMI_FROM_BMC_BUF_MAX, secure_malloc_flag))) { IPMICONSOLE_DEBUG (("scbuf_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.ipmi_to_bmc = scbuf_create (IPMI_TO_BMC_BUF_MIN, IPMI_TO_BMC_BUF_MAX, secure_malloc_flag))) { IPMICONSOLE_DEBUG (("scbuf_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } /* Pipe for non-fd communication */ if (pipe (c->connection.asynccomm) < 0) { IPMICONSOLE_DEBUG (("pipe: %s", strerror (errno))); if (errno == EMFILE) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_TOO_MANY_OPEN_FILES); else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } if (ipmiconsole_set_closeonexec (c, c->connection.asynccomm[0]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (ipmiconsole_set_closeonexec (c, c->connection.asynccomm[1]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } /* Copy for API level */ c->fds.asynccomm[0] = c->connection.asynccomm[0]; c->fds.asynccomm[1] = c->connection.asynccomm[1]; /* Fiid Objects */ if (!(c->connection.obj_rmcp_hdr_rq = fiid_obj_create (tmpl_rmcp_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcp_hdr_rs = fiid_obj_create (tmpl_rmcp_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_lan_session_hdr_rq = fiid_obj_create (tmpl_lan_session_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_lan_session_hdr_rs = fiid_obj_create (tmpl_lan_session_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_lan_msg_hdr_rq = fiid_obj_create (tmpl_lan_msg_hdr_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_lan_msg_hdr_rs = fiid_obj_create (tmpl_lan_msg_hdr_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_lan_msg_trlr_rs = fiid_obj_create (tmpl_lan_msg_trlr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcpplus_session_hdr_rq = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcpplus_session_hdr_rs = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcpplus_payload_rs = fiid_obj_create (tmpl_rmcpplus_payload))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcpplus_session_trlr_rq = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rmcpplus_session_trlr_rs = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_authentication_capabilities_rq = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_authentication_capabilities_rs = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_open_session_request = fiid_obj_create (tmpl_rmcpplus_open_session_request))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_open_session_response = fiid_obj_create (tmpl_rmcpplus_open_session_response))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rakp_message_1 = fiid_obj_create (tmpl_rmcpplus_rakp_message_1))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rakp_message_2 = fiid_obj_create (tmpl_rmcpplus_rakp_message_2))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rakp_message_3 = fiid_obj_create (tmpl_rmcpplus_rakp_message_3))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_rakp_message_4 = fiid_obj_create (tmpl_rmcpplus_rakp_message_4))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_set_session_privilege_level_rq = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_set_session_privilege_level_rs = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_channel_payload_support_rq = fiid_obj_create (tmpl_cmd_get_channel_payload_support_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_channel_payload_support_rs = fiid_obj_create (tmpl_cmd_get_channel_payload_support_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_payload_activation_status_rq = fiid_obj_create (tmpl_cmd_get_payload_activation_status_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_payload_activation_status_rs = fiid_obj_create (tmpl_cmd_get_payload_activation_status_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_activate_payload_rq = fiid_obj_create (tmpl_cmd_activate_payload_sol_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_activate_payload_rs = fiid_obj_create (tmpl_cmd_activate_payload_sol_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_sol_payload_data_rq = fiid_obj_create (tmpl_sol_payload_data_remote_console_to_bmc))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_sol_payload_data_rs = fiid_obj_create (tmpl_sol_payload_data_bmc_to_remote_console))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_channel_payload_version_rq = fiid_obj_create (tmpl_cmd_get_channel_payload_version_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_get_channel_payload_version_rs = fiid_obj_create (tmpl_cmd_get_channel_payload_version_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_deactivate_payload_rq = fiid_obj_create (tmpl_cmd_deactivate_payload_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_deactivate_payload_rs = fiid_obj_create (tmpl_cmd_deactivate_payload_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_close_session_rq = fiid_obj_create (tmpl_cmd_close_session_rq))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } if (!(c->connection.obj_close_session_rs = fiid_obj_create (tmpl_cmd_close_session_rs))) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_create: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_OUT_OF_MEMORY); goto cleanup; } return (0); cleanup: /* Previously called here, but this is now supposed to be handled in API land */ /* ipmiconsole_ctx_connection_cleanup(c) */ /* _ipmiconsole_ctx_fds_cleanup(c); */ /* _ipmiconsole_ctx_fds_setup(c); */ return (-1); } static void __ipmiconsole_ctx_connection_cleanup (ipmiconsole_ctx_t c, int session_submitted) { int blocking_requested = 0; int status_initial = 0; int secure_malloc_flag; int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; /* We have to cleanup, so in general continue on even if locking fails */ if ((perr = pthread_mutex_lock (&(c->signal.status_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); /* Don't change status if it's already been set before */ if (c->signal.status != IPMICONSOLE_CTX_STATUS_SOL_ESTABLISHED) { c->signal.status = IPMICONSOLE_CTX_STATUS_SOL_ERROR; status_initial++; } if ((perr = pthread_mutex_unlock (&(c->signal.status_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); if ((perr = pthread_mutex_lock (&(c->blocking.blocking_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); if (c->blocking.blocking_submit_requested && !c->blocking.sol_session_established) { uint8_t tmpbyte; blocking_requested++; if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY && c->session.deactivate_only_succeeded_flag) tmpbyte = IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_DEACTIVATED; else tmpbyte = IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ERROR; if (write (c->blocking.blocking_notification[1], &tmpbyte, 1) < 0) IPMICONSOLE_CTX_DEBUG (c, ("write: %s", strerror (errno))); } if ((perr = pthread_mutex_unlock (&(c->blocking.blocking_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); /* only call the callback if it's an initial SOL error and blocking * was not requested and the session was submitted. We do not want * to call the callback if an error happened in API land and we are * calling in via * ipmiconsole_ctx_connection_cleanup_session_not_submitted(). */ if (status_initial && !blocking_requested && session_submitted && c->non_blocking.callback) (*(c->non_blocking.callback))(c->non_blocking.callback_arg); /* Under default circumstances, close only the ipmiconsole_fd so * that an error will be detected by the user via a EOF on a read() * or EPIPE on a write() when reading/writing on their file * descriptor. * * On error situations (i.e. ipmiconsole_engine_submit() doesn't * return to the user w/ success), it is the responsibility of other * code to call __ipmiconsole_ctx_connection_cleanup(). * * The exception to this is when the user specifies the * IPMICONSOLE_ENGINE_CLOSE_FD flag. Then we close it here */ if (c->config.engine_flags & IPMICONSOLE_ENGINE_CLOSE_FD) { /* ignore potential error, cleanup path */ if (c->connection.user_fd >= 0) { close (c->connection.user_fd); c->fds.user_fd_retrieved = 0; } } c->connection.user_fd = -1; /* ignore potential error, cleanup path */ if (c->connection.ipmiconsole_fd >= 0) close (c->connection.ipmiconsole_fd); c->connection.ipmiconsole_fd = -1; if (c->connection.console_remote_console_to_bmc) scbuf_destroy (c->connection.console_remote_console_to_bmc, secure_malloc_flag); if (c->connection.console_bmc_to_remote_console) scbuf_destroy (c->connection.console_bmc_to_remote_console, secure_malloc_flag); /* ignore potential error, cleanup path */ if (c->connection.ipmi_fd >= 0) close (c->connection.ipmi_fd); c->connection.ipmi_fd = -1; if (c->connection.ipmi_from_bmc) scbuf_destroy (c->connection.ipmi_from_bmc, secure_malloc_flag); if (c->connection.ipmi_to_bmc) scbuf_destroy (c->connection.ipmi_to_bmc, secure_malloc_flag); /* Set to -1, closing is handled on user end when calling ipmiconsole_ctx_destroy() */ c->connection.asynccomm[0] = -1; c->connection.asynccomm[1] = -1; /* Similarly to the user_fd above, it is the responsibility of other * code to close asynccomm[0] and asynccomm[1], which is replicated * in the context. */ if (c->connection.obj_rmcp_hdr_rq) fiid_obj_destroy (c->connection.obj_rmcp_hdr_rq); if (c->connection.obj_rmcp_hdr_rs) fiid_obj_destroy (c->connection.obj_rmcp_hdr_rs); if (c->connection.obj_lan_session_hdr_rq) fiid_obj_destroy (c->connection.obj_lan_session_hdr_rq); if (c->connection.obj_lan_session_hdr_rs) fiid_obj_destroy (c->connection.obj_lan_session_hdr_rs); if (c->connection.obj_lan_msg_hdr_rq) fiid_obj_destroy (c->connection.obj_lan_msg_hdr_rq); if (c->connection.obj_lan_msg_hdr_rs) fiid_obj_destroy (c->connection.obj_lan_msg_hdr_rs); if (c->connection.obj_lan_msg_trlr_rs) fiid_obj_destroy (c->connection.obj_lan_msg_trlr_rs); if (c->connection.obj_rmcpplus_session_hdr_rq) fiid_obj_destroy (c->connection.obj_rmcpplus_session_hdr_rq); if (c->connection.obj_rmcpplus_session_hdr_rs) fiid_obj_destroy (c->connection.obj_rmcpplus_session_hdr_rs); if (c->connection.obj_rmcpplus_payload_rs) fiid_obj_destroy (c->connection.obj_rmcpplus_payload_rs); if (c->connection.obj_rmcpplus_session_trlr_rq) fiid_obj_destroy (c->connection.obj_rmcpplus_session_trlr_rq); if (c->connection.obj_rmcpplus_session_trlr_rs) fiid_obj_destroy (c->connection.obj_rmcpplus_session_trlr_rs); if (c->connection.obj_authentication_capabilities_rq) fiid_obj_destroy (c->connection.obj_authentication_capabilities_rq); if (c->connection.obj_authentication_capabilities_rs) fiid_obj_destroy (c->connection.obj_authentication_capabilities_rs); if (c->connection.obj_open_session_request) fiid_obj_destroy (c->connection.obj_open_session_request); if (c->connection.obj_open_session_response) fiid_obj_destroy (c->connection.obj_open_session_response); if (c->connection.obj_rakp_message_1) fiid_obj_destroy (c->connection.obj_rakp_message_1); if (c->connection.obj_rakp_message_2) fiid_obj_destroy (c->connection.obj_rakp_message_2); if (c->connection.obj_rakp_message_3) fiid_obj_destroy (c->connection.obj_rakp_message_3); if (c->connection.obj_rakp_message_4) fiid_obj_destroy (c->connection.obj_rakp_message_4); if (c->connection.obj_set_session_privilege_level_rq) fiid_obj_destroy (c->connection.obj_set_session_privilege_level_rq); if (c->connection.obj_set_session_privilege_level_rs) fiid_obj_destroy (c->connection.obj_set_session_privilege_level_rs); if (c->connection.obj_get_channel_payload_support_rq) fiid_obj_destroy (c->connection.obj_get_channel_payload_support_rq); if (c->connection.obj_get_channel_payload_support_rs) fiid_obj_destroy (c->connection.obj_get_channel_payload_support_rs); if (c->connection.obj_get_payload_activation_status_rq) fiid_obj_destroy (c->connection.obj_get_payload_activation_status_rq); if (c->connection.obj_get_payload_activation_status_rs) fiid_obj_destroy (c->connection.obj_get_payload_activation_status_rs); if (c->connection.obj_activate_payload_rq) fiid_obj_destroy (c->connection.obj_activate_payload_rq); if (c->connection.obj_activate_payload_rs) fiid_obj_destroy (c->connection.obj_activate_payload_rs); if (c->connection.obj_sol_payload_data_rq) fiid_obj_destroy (c->connection.obj_sol_payload_data_rq); if (c->connection.obj_sol_payload_data_rs) fiid_obj_destroy (c->connection.obj_sol_payload_data_rs); if (c->connection.obj_get_channel_payload_version_rq) fiid_obj_destroy (c->connection.obj_get_channel_payload_version_rq); if (c->connection.obj_get_channel_payload_version_rs) fiid_obj_destroy (c->connection.obj_get_channel_payload_version_rs); if (c->connection.obj_deactivate_payload_rq) fiid_obj_destroy (c->connection.obj_deactivate_payload_rq); if (c->connection.obj_deactivate_payload_rs) fiid_obj_destroy (c->connection.obj_deactivate_payload_rs); if (c->connection.obj_close_session_rq) fiid_obj_destroy (c->connection.obj_close_session_rq); if (c->connection.obj_close_session_rs) fiid_obj_destroy (c->connection.obj_close_session_rs); /* If the session was never submitted (i.e. error in API land), don't * move this around. */ /* achu: See note in ipmiconsole_defs.h about the * c->session_submitted flag. That flag is only used in API land * for the user to know if a session was submitted or not. The * session_submitted flag passed into this function is the "real" * one that is known by the engine, and is not dependent on any race * conditions with the API level. */ if (!session_submitted) return; /* Be careful, if the user requested to destroy the context, we can * destroy it here. But if we destroy it, there is no mutex to * unlock. */ /* Note: the code in __ipmiconsole_ctx_connection_cleanup() and * ipmiconsole_garbage_collector() may look like it may race and * could deadlock. (ABBA and BAAB deadlock situation). However, * the context mutex c->signal.mutex_ctx_state is accessed in * __ipmiconsole_ctx_connection_cleanup() when trying to add this item * to the console_engine_ctxs_to_destroy list. It is accessed in * ipmiconsole_garbage_collector() only on the items already in the * console_engine_ctxs_to_destroy list. So the * c->signal.mutex_ctx_state can never be raced against in these two * functions. */ if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); assert (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_INIT || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_USER_DESTROYED); if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_USER_DESTROYED) { ipmiconsole_ctx_config_cleanup (c); ipmiconsole_ctx_debug_cleanup (c); ipmiconsole_ctx_signal_cleanup (c); ipmiconsole_ctx_blocking_cleanup (c); ipmiconsole_ctx_cleanup (c); } /* Can be in INIT because of error early in setup */ else if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_INIT || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED) { void *ptr; c->signal.ctx_state = IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT; /* I suppose if we fail here, we mem-leak?? Log for now ... */ if ((perr = pthread_mutex_lock (&(console_engine_ctxs_to_destroy_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); if (!(ptr = list_append (console_engine_ctxs_to_destroy, c))) IPMICONSOLE_DEBUG (("list_append: %s", strerror (errno))); if (ptr != (void *)c) IPMICONSOLE_DEBUG (("list_append: invalid pointer: ptr=%p; c=%p", ptr, c)); if ((perr = pthread_mutex_unlock (&(console_engine_ctxs_to_destroy_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } else { IPMICONSOLE_DEBUG (("invalid ctx_state in __ipmiconsole_ctx_connection_cleanup: %d", c->signal.ctx_state)); if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } } void ipmiconsole_ctx_connection_cleanup_session_submitted (ipmiconsole_ctx_t c) { __ipmiconsole_ctx_connection_cleanup (c, 1); } void ipmiconsole_ctx_connection_cleanup_session_not_submitted (ipmiconsole_ctx_t c) { __ipmiconsole_ctx_connection_cleanup (c, 0); } int ipmiconsole_ctx_session_setup (ipmiconsole_ctx_t c) { struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; char port_str[MAXPORTBUFLEN + 1]; int ret; int rv = -1; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); c->session.console_port = c->config.port; timeval_clear (&(c->session.last_ipmi_packet_sent)); /* Note: * * Initial last_ipmi_packet_received and last_sol_packet_received to * current time, so appropriate timeouts can be calculated in the * beginning if necessary. */ if (gettimeofday (&(c->session.last_ipmi_packet_received), NULL) < 0) { IPMICONSOLE_DEBUG (("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } timeval_clear (&(c->session.last_keepalive_packet_sent)); if (gettimeofday (&(c->session.last_sol_packet_received), NULL) < 0) { IPMICONSOLE_DEBUG (("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } memset (port_str, '\0', MAXPORTBUFLEN + 1); snprintf (port_str, MAXPORTBUFLEN, "%d", c->session.console_port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if ((ret = getaddrinfo (c->config.hostname, port_str, &ai_hints, &ai_res))) { IPMICONSOLE_DEBUG (("getaddrinfo: %s", gai_strerror (ret))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_HOSTNAME_INVALID); goto cleanup; } /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { memcpy (&(c->session.addr4), ai->ai_addr, ai->ai_addrlen); c->session.addr = (struct sockaddr *)&(c->session.addr4); c->session.addr_len = sizeof (struct sockaddr_in); } else if (ai->ai_family == AF_INET6) { memcpy (&(c->session.addr6), ai->ai_addr, ai->ai_addrlen); c->session.addr = (struct sockaddr *)&(c->session.addr6); c->session.addr_len = sizeof (struct sockaddr_in6); } else continue; break; } if (!ai) { IPMICONSOLE_DEBUG (("getaddrinfo: no entry found")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_HOSTNAME_INVALID); goto cleanup; } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_START; c->session.close_session_flag = 0; c->session.try_new_port_flag = 0; c->session.deactivate_payload_instances = 0; c->session.deactivate_payload_instances_and_try_again_flag = 0; c->session.close_timeout_flag = 0; c->session.deactivate_only_succeeded_flag = 0; c->session.retransmission_count = 0; c->session.workaround_retransmission_count = 0; c->session.errors_count = 0; c->session.session_sequence_number_errors_count = 0; c->session.activate_payloads_count = 0; c->session.deactivate_active_payloads_count = 0; if (ipmi_check_session_sequence_number_2_0_init (&(c->session.highest_received_sequence_number), &(c->session.previously_received_list)) < 0) { IPMICONSOLE_DEBUG (("ipmi_check_session_sequence_number_2_0_init: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_get_random (&(c->session.message_tag), sizeof (c->session.message_tag)) < 0) { IPMICONSOLE_DEBUG (("ipmi_get_random: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (ipmi_get_random (&(c->session.requester_sequence_number), sizeof (c->session.requester_sequence_number)) < 0) { IPMICONSOLE_DEBUG (("ipmi_get_random: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } c->session.requester_sequence_number %= (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); c->session.session_sequence_number = 0; /* 0, so initial increment puts it at 1 */ c->session.name_only_lookup = IPMI_NAME_ONLY_LOOKUP; /* In IPMI 2.0, session_ids of 0 are special */ do { if (ipmi_get_random (&(c->session.remote_console_session_id), sizeof (c->session.remote_console_session_id)) < 0) { IPMICONSOLE_DEBUG (("ipmi_get_random: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } } while (!c->session.remote_console_session_id); if (ipmi_get_random (c->session.remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) < 0) { IPMICONSOLE_DEBUG (("ipmi_get_random: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } /* Keys and ptrs will be calculated during session setup. We just * memet/clear here. */ memset (c->session.sik_key, '\0', IPMI_MAX_SIK_KEY_LENGTH); c->session.sik_key_ptr = c->session.sik_key; c->session.sik_key_len = IPMI_MAX_SIK_KEY_LENGTH; memset (c->session.integrity_key, '\0', IPMI_MAX_INTEGRITY_KEY_LENGTH); c->session.integrity_key_ptr = c->session.integrity_key; c->session.integrity_key_len = IPMI_MAX_INTEGRITY_KEY_LENGTH; memset (c->session.confidentiality_key, '\0', IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH); c->session.confidentiality_key_ptr = c->session.confidentiality_key; c->session.confidentiality_key_len = IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH; /* Following 3 will be calculated during session setup. We only * memset/clear it here */ c->session.sol_instance_capacity = 0; memset (c->session.sol_instances_activated, '\0', IPMI_INSTANCES_ACTIVATED_LENGTH); c->session.sol_instances_activated_count = 0; /* this is used just to index the number of instances deactivated */ c->session.sol_instances_deactivated_count = 0; /* Calculated during the session setup. */ c->session.max_sol_character_send_size = 0; /* Serial Break Maintenance */ c->session.break_requested = 0; c->session.console_remote_console_to_bmc_bytes_before_break = 0; /* SOL Input (remote console to BMC) */ c->session.sol_input_waiting_for_ack = 0; c->session.sol_input_waiting_for_break_ack = 0; timeval_clear (&(c->session.last_sol_input_packet_sent)); c->session.sol_input_packet_sequence_number = 0; /* 0, so initial increment puts it at 1 */ memset (c->session.sol_input_character_data, '\0', IPMICONSOLE_MAX_CHARACTER_DATA+1); c->session.sol_input_character_data_len = 0; /* SOL Output (BMC to remote console) */ c->session.last_sol_output_packet_sequence_number = 0; c->session.last_sol_output_accepted_character_count = 0; c->session.session_info_setup = 1; rv = 0; cleanup: freeaddrinfo (ai_res); return (rv); } void ipmiconsole_ctx_fds_setup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* init fds to -1 b/c -1 isn't a legit fd */ c->fds.user_fd = -1; c->fds.user_fd_retrieved = 0; c->fds.asynccomm[0] = -1; c->fds.asynccomm[1] = -1; } void ipmiconsole_ctx_fds_cleanup (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* Note: Close asynccomm[0] first, so an EBADFD error occurs in the * engine. Closing asynccomm[1] first could result in a EPIPE * instead. */ if (!c->fds.user_fd_retrieved) { /* ignore potential error, cleanup path */ close (c->fds.user_fd); } /* ignore potential error, cleanup path */ close (c->fds.asynccomm[0]); /* ignore potential error, cleanup path */ close (c->fds.asynccomm[1]); c->fds.user_fd = -1; c->fds.asynccomm[0] = -1; c->fds.asynccomm[1] = -1; } int ipmiconsole_ctx_get_errnum (ipmiconsole_ctx_t c) { int perr; int errnum; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* What do we do if a mutex lock/unlock fails here? Ignore for * now. */ if ((perr = pthread_mutex_lock (&(c->errnum_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); errnum = c->errnum; c->errnum_retrieved++; if ((perr = pthread_mutex_unlock (&(c->errnum_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (errnum); } void ipmiconsole_ctx_set_errnum (ipmiconsole_ctx_t c, int errnum) { int perr; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* What do we do if a mutex lock/unlock fails here? Ignore for * now. */ if ((perr = pthread_mutex_lock (&(c->errnum_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); /* If the errnum is ERR_SUCCESS, it is not required for the user * to retrieve it */ if (c->errnum_retrieved || c->errnum == IPMICONSOLE_ERR_SUCCESS) { c->errnum = errnum; if (errnum == IPMICONSOLE_ERR_SUCCESS) c->errnum_retrieved = 1; else c->errnum_retrieved = 0; } else IPMICONSOLE_DEBUG (("could not set errnum: current = %d, desired = %d", c->errnum, errnum)); if ((perr = pthread_mutex_unlock (&(c->errnum_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_ctx.h0000644002055400205540000000631013527331637021644 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_ctx.h,v 1.18 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_CTX_H #define IPMICONSOLE_CTX_H #include "ipmiconsole.h" int ipmiconsole_ctx_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_cleanup (ipmiconsole_ctx_t c); /* Wrapper for list callback on console_engine_ctxs_to_destroy */ void ipmiconsole_ctx_garbage_collection_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_config_setup (ipmiconsole_ctx_t c, const char *hostname, uint16_t port, struct ipmiconsole_ipmi_config *ipmi_config, struct ipmiconsole_protocol_config *protocol_config, struct ipmiconsole_engine_config *engine_config); void ipmiconsole_ctx_config_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_debug_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_debug_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_signal_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_signal_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_non_blocking_setup (ipmiconsole_ctx_t c, Ipmiconsole_callback callback, void *callback_arg); int ipmiconsole_ctx_blocking_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_blocking_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_connection_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_connection_cleanup_session_submitted (ipmiconsole_ctx_t c); void ipmiconsole_ctx_connection_cleanup_session_not_submitted (ipmiconsole_ctx_t c); int ipmiconsole_ctx_session_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_fds_setup (ipmiconsole_ctx_t c); void ipmiconsole_ctx_fds_cleanup (ipmiconsole_ctx_t c); int ipmiconsole_ctx_get_errnum (ipmiconsole_ctx_t c); void ipmiconsole_ctx_set_errnum (ipmiconsole_ctx_t c, int errnum); #endif /* IPMICONSOLE_CTX_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_debug.c0000644002055400205540000002145113527331637022132 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_debug.c,v 1.21 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_debug.h" #include "freeipmi-portability.h" #include "fd.h" static uint32_t console_debug_flags = 0; static int console_debug_fd = -1; static pthread_mutex_t console_stdout_debug_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t console_stderr_debug_mutex = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t console_file_debug_mutex = PTHREAD_MUTEX_INITIALIZER; int ipmiconsole_debug_setup (uint32_t debug_flags) { assert (debug_flags == IPMICONSOLE_DEBUG_DEFAULT || !(debug_flags & ~IPMICONSOLE_DEBUG_MASK)); if (debug_flags == IPMICONSOLE_DEBUG_DEFAULT) console_debug_flags = 0; else console_debug_flags = debug_flags; if (console_debug_flags & IPMICONSOLE_DEBUG_FILE) { char filename[MAXPATHLEN]; pid_t pid; pid = getpid(); snprintf (filename, MAXPATHLEN, "%s.%d", IPMICONSOLE_DEBUG_FILENAME, pid); if ((console_debug_fd = open (filename, O_CREAT | O_APPEND | O_WRONLY | O_EXCL, 0600)) < 0) { console_debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_DEBUG (("open: %s", strerror (errno))); console_debug_flags = 0; return (-1); } } return (0); } void ipmiconsole_debug_cleanup (void) { if (console_debug_flags & IPMICONSOLE_DEBUG_FILE && console_debug_fd >= 0) { /* ignore potential error, cleanup path */ close (console_debug_fd); console_debug_fd = -1; } console_debug_flags = 0; } static void _debug (const char *fmt, va_list ap) { char errbuf[IPMICONSOLE_DEBUG_ERROR_BUFLEN]; int perr; assert (fmt); vsnprintf (errbuf, IPMICONSOLE_DEBUG_ERROR_BUFLEN, fmt, ap); if (console_debug_flags & IPMICONSOLE_DEBUG_STDOUT) { if ((perr = pthread_mutex_lock (&console_stdout_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_STDOUT; IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto try_stderr; } fprintf (stdout, "%s\r\n", errbuf); fflush (stdout); if ((perr = pthread_mutex_unlock (&console_stdout_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_STDOUT; IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto try_stderr; } } try_stderr: if (console_debug_flags & IPMICONSOLE_DEBUG_STDERR) { if ((perr = pthread_mutex_lock (&console_stderr_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_STDERR; IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto try_syslog; } fprintf (stderr, "%s\r\n", errbuf); fflush (stderr); if ((perr = pthread_mutex_unlock (&console_stderr_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_STDERR; IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto try_syslog; } } try_syslog: if (console_debug_flags & IPMICONSOLE_DEBUG_SYSLOG) syslog (LOG_DEBUG, "%s", errbuf); if (console_debug_flags & IPMICONSOLE_DEBUG_FILE) { char tbuf[IPMICONSOLE_DEBUG_ERROR_BUFLEN+2]; int tlen; tlen = snprintf (tbuf, IPMICONSOLE_DEBUG_ERROR_BUFLEN+2, "%s\n", errbuf); if ((perr = pthread_mutex_lock (&console_file_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto out; } if ((fd_write_n (console_debug_fd, tbuf, tlen)) < 0) { console_debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_DEBUG (("fd_write_n: %s", strerror (errno))); /* fall-through to try and unlock */ } if ((perr = pthread_mutex_unlock (&console_file_debug_mutex))) { console_debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto out; } } out: /* Shutup gcc */ ; } void ipmiconsole_debug (const char *fmt, ...) { va_list ap; assert (fmt); va_start (ap, fmt); _debug (fmt, ap); va_end (ap); } static void _ctx_debug (ipmiconsole_ctx_t c, const char *fmt, va_list ap) { char errbuf[IPMICONSOLE_DEBUG_ERROR_BUFLEN]; int perr; assert (fmt); vsnprintf (errbuf, IPMICONSOLE_DEBUG_ERROR_BUFLEN, fmt, ap); if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDOUT) { if ((perr = pthread_mutex_lock (&console_stdout_debug_mutex))) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_STDOUT; IPMICONSOLE_CTX_DEBUG (c, ("pthread_mutex_lock: %s", strerror (perr))); goto try_stderr; } fprintf (stdout, "%s\r\n", errbuf); fflush (stdout); if ((perr = pthread_mutex_unlock (&console_stdout_debug_mutex))) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_STDOUT; IPMICONSOLE_CTX_DEBUG (c, ("pthread_mutex_unlock: %s", strerror (perr))); goto try_stderr; } } try_stderr: if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDERR) { if ((perr = pthread_mutex_lock (&console_stderr_debug_mutex))) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_STDERR; IPMICONSOLE_CTX_DEBUG (c, ("pthread_mutex_lock: %s", strerror (perr))); goto try_syslog; } fprintf (stderr, "%s\r\n", errbuf); fflush (stderr); if ((perr = pthread_mutex_unlock (&console_stderr_debug_mutex))) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_STDERR; IPMICONSOLE_CTX_DEBUG (c, ("pthread_mutex_unlock: %s", strerror (perr))); goto try_syslog; } } try_syslog: if (c->config.debug_flags & IPMICONSOLE_DEBUG_SYSLOG) syslog (LOG_DEBUG, "%s", errbuf); if (c->config.debug_flags & IPMICONSOLE_DEBUG_FILE) { char tbuf[IPMICONSOLE_DEBUG_ERROR_BUFLEN+2]; int tlen; tlen = snprintf (tbuf, IPMICONSOLE_DEBUG_ERROR_BUFLEN+2, "%s\n", errbuf); /* Note: This is a per-ctx file descriptor, so thread syncing * isn't required */ if ((fd_write_n (c->debug.debug_fd, tbuf, tlen)) < 0) { c->config.debug_flags &= ~IPMICONSOLE_DEBUG_FILE; IPMICONSOLE_CTX_DEBUG (c, ("fd_write_n: %s", strerror (errno))); } } } void ipmiconsole_ctx_debug (ipmiconsole_ctx_t c, const char *fmt, ...) { va_list ap; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (fmt); va_start (ap, fmt); _ctx_debug (c, fmt, ap); va_end (ap); } char * __debug_msg_create (const char *fmt, ...) { char *buffer; va_list ap; assert (fmt); if (!(buffer = malloc (IPMICONSOLE_DEBUG_ERROR_BUFLEN))) return (NULL); va_start (ap, fmt); vsnprintf (buffer, IPMICONSOLE_DEBUG_ERROR_BUFLEN, fmt, ap); va_end (ap); return (buffer); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_debug.h0000644002055400205540000001321013527331637022131 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_debug.h,v 1.13 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_DEBUG_H #define IPMICONSOLE_DEBUG_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #define IPMICONSOLE_DEBUG_FILENAME "ipmiconsole_debug" #define IPMICONSOLE_DEBUG_ERROR_BUFLEN 4096 #define IPMICONSOLE_DEBUG(__msg) \ do { \ char __err[IPMICONSOLE_DEBUG_ERROR_BUFLEN + 1]; \ int __len; \ memset (__err, '\0', IPMICONSOLE_DEBUG_ERROR_BUFLEN + 1); \ __len = snprintf (__err, \ IPMICONSOLE_DEBUG_ERROR_BUFLEN, \ "(%s, %s, %d): ", \ __FILE__, \ __FUNCTION__, \ __LINE__); \ if (__len < IPMICONSOLE_DEBUG_ERROR_BUFLEN) \ { \ char *__str; \ if ((__str = __debug_msg_create __msg)) \ { \ strncat (__err, __str, IPMICONSOLE_DEBUG_ERROR_BUFLEN - __len); \ free (__str); \ } \ } \ ipmiconsole_debug (__err); \ } while(0) #define IPMICONSOLE_CTX_DEBUG(__c, __msg) \ do { \ char __err[IPMICONSOLE_DEBUG_ERROR_BUFLEN + 1]; \ int __len; \ memset (__err, '\0', IPMICONSOLE_DEBUG_ERROR_BUFLEN + 1); \ __len = snprintf (__err, \ IPMICONSOLE_DEBUG_ERROR_BUFLEN, \ "(%s, %s, %d): " \ "hostname=%s; " \ "protocol_state=%Xh: ", \ __FILE__, \ __FUNCTION__, \ __LINE__, \ (__c)->config.hostname, \ (__c)->session.protocol_state); \ if (__len < IPMICONSOLE_DEBUG_ERROR_BUFLEN) \ { \ char *__str; \ if ((__str = __debug_msg_create __msg)) \ { \ strncat (__err, __str, IPMICONSOLE_DEBUG_ERROR_BUFLEN - __len); \ free (__str); \ } \ } \ ipmiconsole_ctx_debug ((__c), __err); \ } while(0) int ipmiconsole_debug_setup (uint32_t debug_flags); void ipmiconsole_debug_cleanup (void); void ipmiconsole_debug (const char *fmt, ...); void ipmiconsole_ctx_debug (ipmiconsole_ctx_t c, const char *fmt, ...); char * __debug_msg_create (const char *fmt, ...); #endif /* IPMICONSOLE_DEBUG_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_defs.h0000644002055400205540000005573313527331637022004 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_defs.h,v 1.80 2010-06-10 22:10:12 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #ifdef HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include #include "scbuf.h" #ifndef IPMICONSOLE_DEFS_H #define IPMICONSOLE_DEFS_H #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif /* MAXHOSTNAMELEN */ #define MAXPORTBUFLEN 16 #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ typedef enum { IPMICONSOLE_PROTOCOL_STATE_START = 0x00, IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT = 0x01, IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT = 0x02, IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT = 0x03, IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT = 0x04, IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT = 0x05, IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT = 0x06, IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT = 0x07, IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT = 0x08, IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION = 0x09, IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT = 0x0A, IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT = 0x0B, IPMICONSOLE_PROTOCOL_STATE_END = 0x0C, } ipmiconsole_protocol_state_t; /* Note: Get Channel Payload Version will act as our "ping" * to keep the session state alive. */ typedef enum { IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ = 0x00, IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS = 0x01, IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST = 0x02, IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE = 0x03, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 = 0x04, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 = 0x05, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3 = 0x06, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4 = 0x07, IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ = 0x08, IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS = 0x09, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ = 0x0A, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS = 0x0B, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ = 0x0C, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS = 0x0D, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ = 0x0E, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS = 0x0F, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ = 0x10, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS = 0x11, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ = 0x12, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS = 0x13, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ = 0x14, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS = 0x15, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ = 0x16, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS = 0x17, } ipmiconsole_packet_type_t; #define IPMICONSOLE_PACKET_TYPE_REQUEST(__p) \ (((__p) == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST \ || (__p) == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 \ || (__p) == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3 \ || (__p) == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ \ || (__p) == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) ? 1 : 0) #define IPMICONSOLE_PACKET_TYPE_RESPONSE(__p) \ (((__p) == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE \ || (__p) == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 \ || (__p) == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4 \ || (__p) == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS \ || (__p) == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS) ? 1 : 0) #define IPMICONSOLE_PACKET_TYPE_VALID(__p) \ ((IPMICONSOLE_PACKET_TYPE_REQUEST (__p) \ || IPMICONSOLE_PACKET_TYPE_RESPONSE (__p)) ? 1 : 0) #define IPMICONSOLE_THREAD_COUNT_DEFAULT 4 #define IPMICONSOLE_SESSION_TIMEOUT_LENGTH_DEFAULT 60000 #define IPMICONSOLE_RETRANSMISSION_TIMEOUT_LENGTH_DEFAULT 500 #define IPMICONSOLE_RETRANSMISSION_MAX_DEFAULT 10 #define IPMICONSOLE_RETRANSMISSION_BACKOFF_COUNT_DEFAULT 2 #define IPMICONSOLE_KEEPALIVE_TIMEOUT_LENGTH_DEFAULT 20000 #define IPMICONSOLE_RETRANSMISSION_KEEPALIVE_TIMEOUT_LENGTH_DEFAULT 5000 #define IPMICONSOLE_ACCEPTABLE_PACKET_ERRORS_COUNT_DEFAULT 16 #define IPMICONSOLE_MAXIMUM_RETRANSMISSION_COUNT_DEFAULT 16 #define IPMI_PRIVILEGE_LEVEL_DEFAULT IPMI_PRIVILEGE_LEVEL_ADMIN #define IPMI_CIPHER_SUITE_ID_DEFAULT 3 #define IPMI_PAYLOAD_INSTANCE_DEFAULT 1 #define CONSOLE_REMOTE_CONSOLE_TO_BMC_BUF_MIN (1024*2) #define CONSOLE_REMOTE_CONSOLE_TO_BMC_BUF_MAX (1024*8) #define CONSOLE_BMC_TO_REMOTE_CONSOLE_BUF_MIN (1024*4) #define CONSOLE_BMC_TO_REMOTE_CONSOLE_BUF_MAX (1024*16) #define IPMI_FROM_BMC_BUF_MIN (1024*4) #define IPMI_FROM_BMC_BUF_MAX (1024*16) #define IPMI_TO_BMC_BUF_MIN (1024*2) #define IPMI_TO_BMC_BUF_MAX (1024*8) /* achu: See IPMI 2.0 spec Section 24.4, Table 24-6. The Get Payload * Activation Status Command indicates a maximum number of 16 * instances are possible. */ #define IPMI_INSTANCES_ACTIVATED_LENGTH 16 #define IPMI_MAX_SIK_KEY_LENGTH 64 #define IPMI_MAX_INTEGRITY_KEY_LENGTH 64 #define IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH 64 #define IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH 64 #define IPMI_SESSION_INITIAL_OUTBOUND_SEQUENCE_NUMBER 1 #define IPMI_SOL_SESSION_INITIAL_PACKET_SEQUENCE_NUMBER 1 /* API magic determines if the context has been destroyed by the user * and can no longer be used. However, it may not necessarily have * been garbage cleaned up by the libipmiconsole engine library. */ #define IPMICONSOLE_CTX_MAGIC 0x74AB8831 #define IPMICONSOLE_CTX_API_MAGIC 0x83FB9202 #define IPMICONSOLE_PACKET_BUFLEN 16384 #define IPMICONSOLE_MIN_CHARACTER_DATA 1 #define IPMICONSOLE_MAX_CHARACTER_DATA 255 #define IPMICONSOLE_PIPE_GENERATE_BREAK_CODE 0x01 #define IPMICONSOLE_DEBUG_MASK \ (IPMICONSOLE_DEBUG_STDOUT \ | IPMICONSOLE_DEBUG_STDERR \ | IPMICONSOLE_DEBUG_SYSLOG \ | IPMICONSOLE_DEBUG_FILE \ | IPMICONSOLE_DEBUG_IPMI_PACKETS) #define IPMICONSOLE_WORKAROUND_MASK \ (IPMICONSOLE_WORKAROUND_AUTHENTICATION_CAPABILITIES \ | IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION \ | IPMICONSOLE_WORKAROUND_SUPERMICRO_2_0_SESSION \ | IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION \ | IPMICONSOLE_WORKAROUND_OPEN_SESSION_PRIVILEGE \ | IPMICONSOLE_WORKAROUND_NON_EMPTY_INTEGRITY_CHECK_VALUE \ | IPMICONSOLE_WORKAROUND_NO_CHECKSUM_CHECK \ | IPMICONSOLE_WORKAROUND_SERIAL_ALERTS_DEFERRED \ | IPMICONSOLE_WORKAROUND_INCREMENT_SOL_PACKET_SEQUENCE \ | IPMICONSOLE_WORKAROUND_IGNORE_SOL_PAYLOAD_SIZE \ | IPMICONSOLE_WORKAROUND_IGNORE_SOL_PORT \ | IPMICONSOLE_WORKAROUND_SKIP_SOL_ACTIVATION_STATUS \ | IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT) #define IPMICONSOLE_ENGINE_MASK \ (IPMICONSOLE_ENGINE_CLOSE_FD \ | IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED \ | IPMICONSOLE_ENGINE_LOCK_MEMORY \ | IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE \ | IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY) #define IPMICONSOLE_BEHAVIOR_MASK \ (IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE \ | IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY \ | IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES) #define IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ESTABLISHED 0x1 #define IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ERROR 0x2 #define IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_DEACTIVATED 0x3 /* Protocol/User Config Data */ struct ipmiconsole_ctx_config { /* ipmi config */ char hostname[MAXHOSTNAMELEN+1]; uint16_t port; char username[IPMI_MAX_USER_NAME_LENGTH+1]; char password[IPMI_2_0_MAX_PASSWORD_LENGTH+1]; uint8_t k_g[IPMI_MAX_K_G_LENGTH+1]; unsigned int k_g_len; uint8_t privilege_level; uint8_t cipher_suite_id; unsigned int workaround_flags; /* protocol config */ unsigned int session_timeout_len; unsigned int retransmission_timeout_len; unsigned int retransmission_backoff_count; unsigned int keepalive_timeout_len; unsigned int retransmission_keepalive_timeout_len; unsigned int acceptable_packet_errors_count; unsigned int maximum_retransmission_count; /* engine config */ unsigned int engine_flags; unsigned int behavior_flags; unsigned int debug_flags; /* advanced config */ unsigned int sol_payload_instance; /* Data based on Configuration Parameters */ uint8_t authentication_algorithm; uint8_t integrity_algorithm; uint8_t confidentiality_algorithm; }; /* Sockets, pipes, objects, etc. used for data in a SOL session */ struct ipmiconsole_ctx_connection { /* File Descriptor User Interface */ int user_fd; /* never touched internally by the library ... */ int ipmiconsole_fd; scbuf_t console_remote_console_to_bmc; scbuf_t console_bmc_to_remote_console; /* Connection Data */ int ipmi_fd; scbuf_t ipmi_from_bmc; scbuf_t ipmi_to_bmc; /* Pipe for non-fd communication: from API to engine */ int asynccomm[2]; /* Fiid Objects */ fiid_obj_t obj_rmcp_hdr_rq; fiid_obj_t obj_rmcp_hdr_rs; fiid_obj_t obj_lan_session_hdr_rq; fiid_obj_t obj_lan_session_hdr_rs; fiid_obj_t obj_rmcpplus_session_hdr_rq; fiid_obj_t obj_rmcpplus_session_hdr_rs; /* fiid_obj_t obj_rmcpplus_payload_rq; */ fiid_obj_t obj_rmcpplus_payload_rs; fiid_obj_t obj_lan_msg_hdr_rq; fiid_obj_t obj_lan_msg_hdr_rs; /* fiid_obj_t obj_lan_msg_trlr_rq; */ fiid_obj_t obj_lan_msg_trlr_rs; fiid_obj_t obj_rmcpplus_session_trlr_rq; fiid_obj_t obj_rmcpplus_session_trlr_rs; fiid_obj_t obj_authentication_capabilities_rq; fiid_obj_t obj_authentication_capabilities_rs; fiid_obj_t obj_open_session_request; fiid_obj_t obj_open_session_response; fiid_obj_t obj_rakp_message_1; fiid_obj_t obj_rakp_message_2; fiid_obj_t obj_rakp_message_3; fiid_obj_t obj_rakp_message_4; fiid_obj_t obj_set_session_privilege_level_rq; fiid_obj_t obj_set_session_privilege_level_rs; fiid_obj_t obj_get_channel_payload_support_rq; fiid_obj_t obj_get_channel_payload_support_rs; fiid_obj_t obj_get_payload_activation_status_rq; fiid_obj_t obj_get_payload_activation_status_rs; fiid_obj_t obj_activate_payload_rq; fiid_obj_t obj_activate_payload_rs; fiid_obj_t obj_sol_payload_data_rq; fiid_obj_t obj_sol_payload_data_rs; fiid_obj_t obj_get_channel_payload_version_rq; fiid_obj_t obj_get_channel_payload_version_rs; fiid_obj_t obj_deactivate_payload_rq; fiid_obj_t obj_deactivate_payload_rs; fiid_obj_t obj_close_session_rq; fiid_obj_t obj_close_session_rs; }; /* * IPMI Session Information - actual data used to keep track of a SOL * session. Separated from ipmiconsole_ctx_connection above, b/c * everything below will need to be re-initialized if the session is * being reattempted under a different port. */ struct ipmiconsole_ctx_session { int16_t console_port; struct sockaddr *addr; socklen_t addr_len; struct sockaddr_in addr4; struct sockaddr_in6 addr6; /* Session timeout, retransmission timeout, keepalive timeout maintenance */ struct timeval last_ipmi_packet_sent; struct timeval last_ipmi_packet_received; struct timeval last_keepalive_packet_sent; /* Serial keepalive timeout maintenance */ struct timeval last_sol_packet_received; /* * Protocol State Machine Variables */ ipmiconsole_protocol_state_t protocol_state; int close_session_flag; int try_new_port_flag; int deactivate_payload_instances; /* if deactivate_payload_instances_and_try_again_flag set, * deactivate_payload_instances should always be set, but not vice * versa */ int deactivate_payload_instances_and_try_again_flag; int close_timeout_flag; int deactivate_only_succeeded_flag; /* * Protocol Maintenance Variables */ unsigned int retransmission_count; unsigned int workaround_retransmission_count; /* For IPMICONSOLE_WORKAROUND_INCREMENT_SOL_PACKET_SEQUENCE */ unsigned int errors_count; unsigned int session_sequence_number_errors_count; unsigned int activate_payloads_count; unsigned int deactivate_active_payloads_count; uint32_t highest_received_sequence_number; /* need to also store bytes read from a previous seq num */ uint32_t previously_received_list; uint8_t message_tag; uint8_t requester_sequence_number; uint32_t session_sequence_number; uint8_t name_only_lookup; uint32_t remote_console_session_id; uint8_t remote_console_random_number[IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH]; uint8_t sik_key[IPMI_MAX_SIK_KEY_LENGTH]; void *sik_key_ptr; unsigned int sik_key_len; uint8_t integrity_key[IPMI_MAX_INTEGRITY_KEY_LENGTH]; void *integrity_key_ptr; unsigned int integrity_key_len; uint8_t confidentiality_key[IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH]; void *confidentiality_key_ptr; unsigned int confidentiality_key_len; uint32_t sol_instance_capacity; uint8_t sol_instances_activated[IPMI_INSTANCES_ACTIVATED_LENGTH]; uint32_t sol_instances_activated_count; uint32_t sol_instances_deactivated_count; uint8_t max_sol_character_send_size; /* determine during session setup */ /* Serial Break Maintenance */ int break_requested; unsigned int console_remote_console_to_bmc_bytes_before_break; /* SOL Input (remote console to BMC) */ int sol_input_waiting_for_ack; int sol_input_waiting_for_break_ack; struct timeval last_sol_input_packet_sent; uint8_t sol_input_packet_sequence_number; uint8_t sol_input_character_data[IPMICONSOLE_MAX_CHARACTER_DATA+1]; unsigned int sol_input_character_data_len; /* SOL Output (BMC to remote console) */ uint8_t last_sol_output_packet_sequence_number; uint8_t last_sol_output_accepted_character_count; /* Flag indicating session info is setup */ int session_info_setup; }; /* Context debug stuff */ struct ipmiconsole_ctx_debug { int debug_fd; }; /* Mutexes + flags for signaling between the API and engine */ /* state of context * - INIT, user has not submitted it to the engine, user cleans up all * - can move to ENGINE_SUBMITTED state * - ENGINE_SUBMITTED, in engine being used * - can move to USER_DESTROYED if user destroys first * - can move to GARBAGE_COLLECTION_WAIT if engine finished first * - GARBAGE_COLLECTION_WAIT, waiting for user to destroy * - can move to GARBAGE_COLLECTION_USER_DESTROYED * - can move to ENGINE_DESTROYED * - GARBAGE_COLLECTION_USER_DESTROYED, user done, garbage collection * should finish up destruction * - USER_DESTROYED, user destroyed, garbage collector will clean it up * - ENGINE_DESTROYED, engine done with it, user side complete cleanup */ typedef enum { IPMICONSOLE_CTX_STATE_INIT, IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED, IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT, IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED, IPMICONSOLE_CTX_STATE_USER_DESTROYED, IPMICONSOLE_CTX_STATE_ENGINE_DESTROYED, } ipmiconsole_ctx_state; struct ipmiconsole_ctx_signal { /* Conceptually there is not a race with the status. The API initializes * the status, and the engine is the only one that modifies it. * * However, there is a tiny race in * ipmiconsole_engine_submit{_block}(). Conceptually, the status * could be set before we even initialize the status to SUBMITTED. */ pthread_mutex_t status_mutex; unsigned int status; /* ctx_state - state and mutex used to determine when the user has * destroyed the context and it is now the responsibility of the * engine/garbage-collector to cleanup, or vice versa. Need to * mutex to avoid destroy races. */ pthread_mutex_t mutex_ctx_state; ipmiconsole_ctx_state ctx_state; }; /* non-blocking potential parameters */ struct ipmiconsole_ctx_non_blocking { Ipmiconsole_callback callback; void *callback_arg; }; /* Info, pipe, and mutex for engine submission blocking */ struct ipmiconsole_ctx_blocking { /* Conceptually, it is impossible for both to ever be touched * simultaneously so a mutex may not seem necessary. * * blocking_submit_requested is initialized/set in API land, and * then later read in engine land after the context is submitted. * It is never read again in API land and never written to in engine * land. * * sol_session_established is initialied in API land, afterwards it * is only written/read in the engine after a context is submitted. * * after initialization, the API and Engine only touch their * ends of the pipe. * * However, there is a tiny race that is possible. After the * session is submitted, the blocking code in _ipmiconsole_block() * could fail, such as in the call to select(). We do not want the * engine and API to race reading/writing under this circumstance. */ pthread_mutex_t blocking_mutex; int blocking_submit_requested; int blocking_notification[2]; int sol_session_established; }; struct ipmiconsole_ctx_fds { /* Copy from ipmiconsole_ctx_session, these file descriptors are * managed exclusively by API level, not the engine. * * The need to manage asynccomm at the API level is b/c users could * access it via ipmiconsole_ctx_generate_break(). If one end of * the asynccomm is closed by the engine, it becomes difficult to * know if we can actually generate a break. * * We could manage this situation through some mutexes, but that would * slow down closing/generate-break code. We could capture EPIPE in the * API and return a "IS_CLOSING" error to the user, but that would require * the user to set SIGPIPE to SIG_IGN. Moving it to all be managed in * the API level is best. We just have to check for POLLNVAL in the * engine poll(). * */ int user_fd; int user_fd_retrieved; /* if user ever grabbed it */ int asynccomm[2]; }; struct ipmiconsole_ctx { /* Two magics - first indicates the context is still valid. Second * is pretty much a flag that indicates the context has been * "destroyed" in API land, and should no longer be used by the API. */ uint32_t magic; uint32_t api_magic; pthread_mutex_t errnum_mutex; int errnum; int errnum_retrieved; struct ipmiconsole_ctx_config config; struct ipmiconsole_ctx_debug debug; struct ipmiconsole_ctx_signal signal; struct ipmiconsole_ctx_non_blocking non_blocking; struct ipmiconsole_ctx_blocking blocking; struct ipmiconsole_ctx_session session; struct ipmiconsole_ctx_connection connection; struct ipmiconsole_ctx_fds fds; /* session_submitted - flag indicates context submitted to engine * successfully. Does not indicate any state of success/failure for * either blocking or non-blocking submissions. Primary used as a * flag so other functions such as ipmiconsole_ctx_fd() and * ipmiconsole_generate_break() know that they are capable of * moving on. * * Note, does not require a mutex. Only a flag used in API-land. * Engine threads will never touch this. */ unsigned int session_submitted; }; #endif /* IPMICONSOLE_DEFS_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_engine.c0000644002055400205540000014072113527331637022313 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_engine.c,v 1.97 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_engine.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_garbage_collector.h" #include "ipmiconsole_processing.h" #include "ipmiconsole_util.h" #include "scbuf.h" #include "freeipmi-portability.h" #include "list.h" #include "secure.h" /* * Locking notes: * * when is_count mutex is locked - thread_count_mutex can be locked, not vice versa * when is_count mutex is locked - teardown_mutex can be locked, not vice versa * when thread_count mutex is locked - ctxs_mutex can be locked, not vice versa */ static int console_engine_is_setup = 0; static pthread_mutex_t console_engine_is_setup_mutex = PTHREAD_MUTEX_INITIALIZER; static unsigned int console_engine_thread_count = 0; static pthread_mutex_t console_engine_thread_count_mutex = PTHREAD_MUTEX_INITIALIZER; static int console_engine_teardown = 0; static int console_engine_teardown_immediate = 0; static pthread_mutex_t console_engine_teardown_mutex = PTHREAD_MUTEX_INITIALIZER; static List console_engine_ctxs[IPMICONSOLE_THREAD_COUNT_MAX]; static unsigned int console_engine_ctxs_count[IPMICONSOLE_THREAD_COUNT_MAX]; static pthread_mutex_t console_engine_ctxs_mutex[IPMICONSOLE_THREAD_COUNT_MAX]; /* In the core engine code, the poll() may sit for a large number of * seconds, waiting for the next event to happen. In the meantime, a * user may have submitted a new context or wants to close the engine. * The poll() doesn't know this and will sit until it times out, * letting the user sit and wait for the engine loop to "come around * again" and start processing. This pipe can be used to "interrupt" * the poll() when the user wants to get things moving a little * faster. */ static int console_engine_ctxs_notifier[IPMICONSOLE_THREAD_COUNT_MAX][2]; static unsigned int console_engine_ctxs_notifier_num = 0; /* * The engine is capable of "being finished" with a context before the * user has called ipmiconsole_ctx_destroy(). So we need to stick the * context somewhere and garbage collect the memory back later. * * The garbage collector notifier is similar to the engine ctxs * notifier above, although the garbage collector notifier will only * be used to tell it to exit, not anything else. */ List console_engine_ctxs_to_destroy = NULL; pthread_mutex_t console_engine_ctxs_to_destroy_mutex = PTHREAD_MUTEX_INITIALIZER; int garbage_collector_notifier[2]; extern int garbage_collector_active; extern pthread_mutex_t garbage_collector_active_mutex; extern pthread_cond_t garbage_collector_active_cond; /* See comments below in _poll_setup(). */ static int dummy_fd = -1; struct _ipmiconsole_poll_data { struct pollfd *pfds; ipmiconsole_ctx_t *pfds_ctxs; unsigned int ctxs_len; unsigned int pfds_index; }; #define IPMICONSOLE_SPIN_WAIT_TIME 250000 #define IPMICONSOLE_PIPE_BUFLEN 1024 static int _ipmiconsole_garbage_collector_create (void) { pthread_t thread; pthread_attr_t attr; int perr, rv = -1; assert (!console_engine_is_setup); if ((perr = pthread_attr_init (&attr))) { IPMICONSOLE_DEBUG (("pthread_attr_init: %s", strerror (perr))); errno = perr; goto cleanup; } if ((perr = pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED))) { IPMICONSOLE_DEBUG (("pthread_attr_setdetachstate: %s", strerror (perr))); errno = perr; goto cleanup; } if ((perr = pthread_create (&thread, &attr, ipmiconsole_garbage_collector, NULL))) { IPMICONSOLE_DEBUG (("pthread_create: %s", strerror (perr))); errno = perr; goto cleanup; } /* Who cares if this fails */ if ((perr = pthread_attr_destroy (&attr))) IPMICONSOLE_DEBUG (("pthread_attr_destroy: %s", strerror (perr))); if ((perr = pthread_mutex_lock (&garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); errno = perr; goto cleanup; } while (!garbage_collector_active) { if ((perr = pthread_cond_wait (&garbage_collector_active_cond, &garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_cond_wait: %s", strerror (perr))); errno = perr; goto cleanup; } } if ((perr = pthread_mutex_unlock (&garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); errno = perr; goto cleanup; } rv = 0; cleanup: return (rv); } /* Notes: One of the reason we do not create the threads in this * function, is that it would make it more difficult to properly * "cleanup" on an error. We wouldn't know how many threads were * created, flags for setup completion may not be set yet, etc. * * Therefore ipmiconsole_engine_thread_create() is done outside of * this function and is done elsewhere. */ int ipmiconsole_engine_setup (unsigned int thread_count) { unsigned int i; int perr; assert (!console_engine_thread_count); assert (thread_count && thread_count <= IPMICONSOLE_THREAD_COUNT_MAX); if ((perr = pthread_mutex_lock (&console_engine_is_setup_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); errno = perr; return (-1); } memset (console_engine_ctxs, '\0', IPMICONSOLE_THREAD_COUNT_MAX * sizeof (List)); memset (console_engine_ctxs_count, '\0', IPMICONSOLE_THREAD_COUNT_MAX * sizeof (unsigned int)); memset (console_engine_ctxs_mutex, '\0', IPMICONSOLE_THREAD_COUNT_MAX * sizeof (pthread_mutex_t)); for (i = 0; i < IPMICONSOLE_THREAD_COUNT_MAX; i++) { console_engine_ctxs_notifier[i][0] = -1; console_engine_ctxs_notifier[i][1] = -1; } garbage_collector_notifier[0] = -1; garbage_collector_notifier[1] = -1; if (ipmi_rmcpplus_init () < 0) { if (errno == EPERM) IPMICONSOLE_DEBUG (("ipmi_rmcpplus_init: incompatible crypto library")); else IPMICONSOLE_DEBUG (("ipmi_rmcpplus_init: %s", strerror (errno))); goto cleanup; } for (i = 0; i < IPMICONSOLE_THREAD_COUNT_MAX; i++) { if (!(console_engine_ctxs[i] = list_create ((ListDelF)ipmiconsole_ctx_connection_cleanup_session_submitted))) { IPMICONSOLE_DEBUG (("list_create: %s", strerror (errno))); goto cleanup; } console_engine_ctxs_count[i] = 0; if ((perr = pthread_mutex_init (&console_engine_ctxs_mutex[i], NULL)) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_init: %s", strerror (perr))); goto cleanup; } } /* Don't create fds for all ctxs_notifier to limit fd creation */ console_engine_ctxs_notifier_num = thread_count; for (i = 0; i < console_engine_ctxs_notifier_num; i++) { if (pipe (console_engine_ctxs_notifier[i]) < 0) { IPMICONSOLE_DEBUG (("pipe: %s", strerror (errno))); goto cleanup; } if (ipmiconsole_set_closeonexec (NULL, console_engine_ctxs_notifier[i][0]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (ipmiconsole_set_closeonexec (NULL, console_engine_ctxs_notifier[i][1]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } } if (pipe (garbage_collector_notifier) < 0) { IPMICONSOLE_DEBUG (("pipe: %s", strerror (errno))); goto cleanup; } if (ipmiconsole_set_closeonexec (NULL, garbage_collector_notifier[0]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (ipmiconsole_set_closeonexec (NULL, garbage_collector_notifier[1]) < 0) { IPMICONSOLE_DEBUG (("closeonexec error")); goto cleanup; } if (!(console_engine_ctxs_to_destroy = list_create ((ListDelF)ipmiconsole_ctx_garbage_collection_cleanup))) { IPMICONSOLE_DEBUG (("list_create: %s", strerror (errno))); goto cleanup; } if ((dummy_fd = socket (AF_INET, SOCK_STREAM, 0)) < 0) { IPMICONSOLE_DEBUG (("socket: %s", strerror (errno))); goto cleanup; } if (_ipmiconsole_garbage_collector_create () < 0) goto cleanup; console_engine_is_setup++; console_engine_teardown = 0; console_engine_teardown_immediate = 0; if ((perr = pthread_mutex_unlock (&console_engine_is_setup_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); errno = perr; goto cleanup; } return (0); cleanup: for (i = 0; i < IPMICONSOLE_THREAD_COUNT_MAX; i++) { if (console_engine_ctxs[i]) { list_destroy (console_engine_ctxs[i]); pthread_mutex_destroy (&console_engine_ctxs_mutex[i]); } console_engine_ctxs[i] = NULL; /* ignore potential error, cleanup path */ close (console_engine_ctxs_notifier[i][0]); /* ignore potential error, cleanup path */ close (console_engine_ctxs_notifier[i][1]); } if (console_engine_ctxs_to_destroy) list_destroy (console_engine_ctxs_to_destroy); console_engine_ctxs_to_destroy = NULL; garbage_collector_notifier[0] = -1; garbage_collector_notifier[1] = -1; /* ignore potential error, cleanup path */ close (dummy_fd); dummy_fd = -1; if ((perr = pthread_mutex_unlock (&console_engine_is_setup_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (-1); } int ipmiconsole_engine_is_setup (void) { int is_setup, perr; if ((perr = pthread_mutex_lock (&console_engine_is_setup_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); return (-1); } is_setup = console_engine_is_setup; if ((perr = pthread_mutex_unlock (&console_engine_is_setup_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (-1); } return (is_setup); } int ipmiconsole_engine_thread_count (void) { int thread_count, perr; if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); return (-1); } if (console_engine_thread_count > INT_MAX) thread_count = INT_MAX; else thread_count = console_engine_thread_count; if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (-1); } return (thread_count); } static int _teardown_initiate (void *x, void *arg) { ipmiconsole_ctx_t c; assert (x); c = (ipmiconsole_ctx_t)x; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (!c->session.close_session_flag) c->session.close_session_flag++; return (0); } static int _poll_setup (void *x, void *arg) { ipmiconsole_ctx_t c; struct _ipmiconsole_poll_data *poll_data; assert (x); assert (arg); c = (ipmiconsole_ctx_t)x; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); poll_data = (struct _ipmiconsole_poll_data *)arg; poll_data->pfds[poll_data->pfds_index*3].fd = c->connection.ipmi_fd; poll_data->pfds[poll_data->pfds_index*3].events = 0; poll_data->pfds[poll_data->pfds_index*3].revents = 0; poll_data->pfds[poll_data->pfds_index*3].events |= POLLIN; if (!scbuf_is_empty (c->connection.ipmi_to_bmc)) poll_data->pfds[poll_data->pfds_index*3].events |= POLLOUT; /* If the session is being torn down, don't bother settings flags on * these fds. However, to avoid spinning due to an invalid fd or a * closed fd (i.e. get a POLLINVAL or POLLHUP), use the dummy_fd. */ if (!c->session.close_session_flag) { poll_data->pfds[poll_data->pfds_index*3 + 1].fd = c->connection.asynccomm[0]; poll_data->pfds[poll_data->pfds_index*3 + 1].events = 0; poll_data->pfds[poll_data->pfds_index*3 + 1].revents = 0; poll_data->pfds[poll_data->pfds_index*3 + 1].events |= POLLIN; poll_data->pfds[poll_data->pfds_index*3 + 2].fd = c->connection.ipmiconsole_fd; poll_data->pfds[poll_data->pfds_index*3 + 2].events = 0; poll_data->pfds[poll_data->pfds_index*3 + 2].revents = 0; poll_data->pfds[poll_data->pfds_index*3 + 2].events |= POLLIN; if (!scbuf_is_empty (c->connection.console_bmc_to_remote_console)) poll_data->pfds[poll_data->pfds_index*3 + 2].events |= POLLOUT; } else { poll_data->pfds[poll_data->pfds_index*3 + 1].fd = dummy_fd; poll_data->pfds[poll_data->pfds_index*3 + 1].events = 0; poll_data->pfds[poll_data->pfds_index*3 + 1].revents = 0; poll_data->pfds[poll_data->pfds_index*3 + 2].fd = dummy_fd; poll_data->pfds[poll_data->pfds_index*3 + 2].events = 0; poll_data->pfds[poll_data->pfds_index*3 + 2].revents = 0; } poll_data->pfds_ctxs[poll_data->pfds_index] = c; poll_data->pfds_index++; return (0); } /* * Return 0 on success * Return -1 on fatal error */ static int _ipmi_recvfrom (ipmiconsole_ctx_t c) { char buffer[IPMICONSOLE_PACKET_BUFLEN]; struct sockaddr_in6 from6; struct sockaddr *from = (struct sockaddr *)&from6; unsigned int fromlen = sizeof (struct sockaddr_in6); ssize_t len; int n, dropped = 0; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; do { /* For receive side, ipmi_lan_recvfrom and * ipmi_rmcpplus_recvfrom are identical. So we just use * ipmi_lan_recvfrom for both. * * In event of future change, should use util functions * ipmi_is_ipmi_1_5_packet or ipmi_is_ipmi_2_0_packet * appropriately. */ len = ipmi_lan_recvfrom (c->connection.ipmi_fd, buffer, IPMICONSOLE_PACKET_BUFLEN, 0, from, &fromlen); } while (len < 0 && errno == EINTR); /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * port denied errors up to the client for UDP responses (i.e. you * need to timeout). But on some OSes (it seems Windows), the * behavior is to return port denied errors up to the user for UDP * responses via ECONNRESET or ECONNREFUSED. * * If this were just the case, we could return or handle errors * properly and move on. However, it's not the case. * * According to Ipmitool, on some motherboards, both the OS and the * BMC are capable of responding to an IPMI request. That means you * can get an ECONNRESET or ECONNREFUSED, then later on, get your * real IPMI response. * * Our solution is copied from Ipmitool, we'll ignore some specific * errors and try to read again. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, the recvfrom later on gets the packet we * want. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC (or IPMI disabled, etc.), just do the recvfrom again to * eventually get a timeout, which is the behavior we'd like. */ if (len < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_recvfrom: connection refused: %s", strerror (errno))); return (0); } if (len < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_recvfrom: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (!len) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_recvfrom: no data", strerror (errno))); /* Note: Not a fatal error, just return*/ return (0); } /* Sanity Check */ if (from6.sin6_family == AF_INET6) { if (memcmp (&from6.sin6_addr, &(c->session.addr6.sin6_addr), sizeof (from6.sin6_addr))) { IPMICONSOLE_CTX_DEBUG (c, ("received from invalid address")); /* Note: Not a fatal error, just return */ return (0); } } else { /* memcpy hacks to avoid warnings, i.e. * warning: dereferencing pointer 'X' does break strict-aliasing rules */ struct sockaddr_in from4; memcpy (&from4, from, fromlen); if (from4.sin_addr.s_addr != c->session.addr4.sin_addr.s_addr) { IPMICONSOLE_CTX_DEBUG (c, ("received from invalid address")); /* Note: Not a fatal error, just return */ return (0); } } /* Empty the scbuf if it's not empty */ if (!scbuf_is_empty (c->connection.ipmi_from_bmc)) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_from_bmc not empty, draining")); do { char tempbuf[IPMICONSOLE_PACKET_BUFLEN]; if (scbuf_read (c->connection.ipmi_from_bmc, tempbuf, IPMICONSOLE_PACKET_BUFLEN) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_read: %s", strerror (errno))); break; } } while(!scbuf_is_empty (c->connection.ipmi_from_bmc)); } if ((n = scbuf_write (c->connection.ipmi_from_bmc, buffer, len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; len=%d", n, len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } /* * Return 0 on success * Return -1 on fatal error */ static int _ipmi_sendto (ipmiconsole_ctx_t c) { char buffer[IPMICONSOLE_PACKET_BUFLEN]; ssize_t len; int n; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((n = scbuf_read (c->connection.ipmi_to_bmc, buffer, IPMICONSOLE_PACKET_BUFLEN)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_read: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (ipmi_is_ipmi_1_5_packet (buffer, n)) { do { len = ipmi_lan_sendto (c->connection.ipmi_fd, buffer, n, 0, c->session.addr, c->session.addr_len); } while (len < 0 && errno == EINTR); } else { do { len = ipmi_rmcpplus_sendto (c->connection.ipmi_fd, buffer, n, 0, c->session.addr, c->session.addr_len); } while (len < 0 && errno == EINTR); } if (len < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_sendto: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } #if 0 /* don't check, let bad packet timeout */ if (len != n) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_lan_sendto: invalid bytes written; n=%d; len=%d", n, len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } #endif /* scbuf should be empty now */ if (!scbuf_is_empty (c->connection.ipmi_to_bmc)) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_to_bmc not empty")); /* Note: Not a fatal error, just return*/ return (0); } return (0); } /* * Return 0 on success * Return -1 on fatal error */ static int _asynccomm (ipmiconsole_ctx_t c) { uint8_t tmpbyte; ssize_t len; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((len = read (c->connection.asynccomm[0], (void *)&tmpbyte, 1)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("read: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (!len) { IPMICONSOLE_CTX_DEBUG (c, ("asynccomm closed")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* User may have requested several break conditions in a * row quickly. We assume it means just one */ if (tmpbyte == IPMICONSOLE_PIPE_GENERATE_BREAK_CODE) { if (!(c->session.break_requested)) { int bytes_before_break; c->session.break_requested++; if ((bytes_before_break = scbuf_used (c->connection.console_remote_console_to_bmc)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_used: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } c->session.console_remote_console_to_bmc_bytes_before_break = bytes_before_break; } } return (0); } /* * Return 0 on success * Return -1 on fatal error */ static int _console_read (ipmiconsole_ctx_t c) { char buffer[IPMICONSOLE_PACKET_BUFLEN]; ssize_t len; int n, dropped = 0; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (!c->session.close_session_flag); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; if ((len = read (c->connection.ipmiconsole_fd, buffer, IPMICONSOLE_PACKET_BUFLEN)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("read: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (!len) { /* Returning -1 closes the session, but really this error is ok * since the user is allowed to close the session */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); return (-1); } if ((n = scbuf_write (c->connection.console_remote_console_to_bmc, buffer, len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; len=%d", n, len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } /* * Return 0 on success * Return -1 on fatal error */ static int _console_write (ipmiconsole_ctx_t c) { char buffer[IPMICONSOLE_PACKET_BUFLEN]; ssize_t len; int n; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (!c->session.close_session_flag); /* * XXX: Shouldn't assume user will read data fast enough? I could * overrun buffers? * * Deal with it later. */ if ((n = scbuf_read (c->connection.console_bmc_to_remote_console, buffer, IPMICONSOLE_PACKET_BUFLEN)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_read: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((len = write (c->connection.ipmiconsole_fd, buffer, n)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("write: %s", strerror (errno))); if (errno == EPIPE) { /* This error is ok since the user is allowed to close the * session */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SUCCESS); } else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (len != n) { IPMICONSOLE_CTX_DEBUG (c, ("write: invalid bytes written; n=%d; len=%d", n, len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* scbuf should be empty now */ if (!scbuf_is_empty (c->connection.console_bmc_to_remote_console)) { IPMICONSOLE_CTX_DEBUG (c, ("console_bmc_to_remote_console not empty")); /* Note: Not a fatal error, just return*/ return (0); } return (0); } static int _ipmiconsole_poll (struct pollfd *ufds, unsigned int nfds, int timeout) { int n; struct timeval tv, tv_orig; struct timeval start, end, delta; assert (ufds); /* prep for EINTR handling */ if (timeout >= 0) { /* poll uses timeout in milliseconds */ tv_orig.tv_sec = (long)timeout/1000; tv_orig.tv_usec = (timeout % 1000) * 1000; if (gettimeofday(&start, NULL) < 0) { IPMICONSOLE_DEBUG (("gettimeofday: %s", strerror (errno))); return (-1); } } else { tv_orig.tv_sec = 0; tv_orig.tv_usec = 0; } /* repeat poll if interrupted */ do { n = poll(ufds, nfds, timeout); if (n < 0 && errno != EINTR) /* unrecov error */ { IPMICONSOLE_DEBUG (("poll: %s", strerror (errno))); return (-1); } if (n < 0 && timeout >= 0) /* EINTR - adjust timeout */ { if (gettimeofday(&end, NULL) < 0) { IPMICONSOLE_DEBUG (("gettimeofday: %s", strerror (errno))); return (-1); } timersub(&end, &start, &delta); /* delta = end-start */ timersub(&tv_orig, &delta, &tv); /* tv = tvsave-delta */ timeout = (tv.tv_sec * 1000) + (tv.tv_usec/1000); } } while (n < 0); return n; } static void * _ipmiconsole_engine (void *arg) { int perr, ctxs_count = 0; unsigned int index; unsigned int teardown_flag = 0; unsigned int teardown_initiated = 0; assert (arg); index = *((unsigned int *)arg); assert (index < IPMICONSOLE_THREAD_COUNT_MAX); free (arg); /* No need to exit on failure, probability is low we'll SIGPIPE anyways */ if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) IPMICONSOLE_DEBUG (("signal: %s", strerror (errno))); while (!teardown_flag || ctxs_count) { struct _ipmiconsole_poll_data poll_data; int count; unsigned int timeout_len; unsigned int i; int unlock_console_engine_ctxs_mutex_flag = 0; int spin_wait_flag = 0; char buf[IPMICONSOLE_PIPE_BUFLEN]; poll_data.pfds = NULL; poll_data.pfds_ctxs = NULL; poll_data.ctxs_len = 0; poll_data.pfds_index = 0; if ((perr = pthread_mutex_lock (&console_engine_teardown_mutex))) { /* This is one of the only truly "fatal" conditions */ IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); teardown_flag = 1; } if (console_engine_teardown_immediate) { if ((perr = pthread_mutex_unlock (&console_engine_teardown_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); break; } if (console_engine_teardown) teardown_flag = 1; if ((perr = pthread_mutex_unlock (&console_engine_teardown_mutex))) { /* This is one of the only truly "fatal" conditions */ IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); teardown_flag = 1; } /* Notes: * * We must lock the list from here till all context data and pointers * are retrieved. */ if ((perr = pthread_mutex_lock (&console_engine_ctxs_mutex[index]))) { /* This is one of the only truly "fatal" conditions */ IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); teardown_flag = 1; } /* Note: Set close_session_flag in the contexts before * ipmiconsole_process_ctxs(), so the initiation of the closing * down will begin now rather than the next iteration of the * loop. */ if (teardown_flag && !teardown_initiated) { /* XXX: Umm, if this fails, we may not be able to teardown * cleanly. Break out of the loop I guess. */ if (list_for_each (console_engine_ctxs[index], _teardown_initiate, NULL) < 0) { IPMICONSOLE_DEBUG (("list_for_each: %s", strerror (errno))); break; } teardown_initiated++; } if ((ctxs_count = ipmiconsole_process_ctxs (console_engine_ctxs[index], &timeout_len)) < 0) goto continue_loop; if (!ctxs_count && teardown_flag) continue; if (!ctxs_count) { spin_wait_flag++; goto continue_loop; } poll_data.ctxs_len = ctxs_count; /* achu: I always wonder if this poll() loop could be done far * more elegantly and efficiently without all this crazy * indexing, perhaps through a callback/event mechanism. It'd * probably be more efficient, since most callback/event based * models have min-heap like structures inside for determining * what things timed out. Overall though, I don't think the O(n) * (n being hosts/fds) processing is really that inefficient for * this particular application and is not worth going back and * changing. By going to a callback/event mechanism, there will * still be some O(n) activities within the code, so I am only * going to create a more efficient O(n) poll loop. */ /* * There are 3 pfds per ctx. One for 'ipmi_fd', 'asynccomm[0]', and 'ipmiconsole_fd'. * * There is + 1 pfds for the "console_engine_ctxs_notifier". * This will be set up manually here, and not in _poll_setup(). */ if (!(poll_data.pfds = (struct pollfd *)malloc (((poll_data.ctxs_len * 3) + 1) * sizeof (struct pollfd)))) { IPMICONSOLE_DEBUG (("malloc: %s", strerror (errno))); goto continue_loop; } if (!(poll_data.pfds_ctxs = (ipmiconsole_ctx_t *)malloc (poll_data.ctxs_len * sizeof (ipmiconsole_ctx_t)))) { IPMICONSOLE_DEBUG (("malloc: %s", strerror (errno))); goto continue_loop; } if ((count = list_for_each (console_engine_ctxs[index], _poll_setup, &poll_data)) < 0) { IPMICONSOLE_DEBUG (("list_for_each: %s", strerror (errno))); goto continue_loop; } if ((perr = pthread_mutex_unlock (&console_engine_ctxs_mutex[index]))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); unlock_console_engine_ctxs_mutex_flag++; /* Setup notifier pipe as last remaining poll data */ poll_data.pfds[(poll_data.ctxs_len * 3)].fd = console_engine_ctxs_notifier[index][0]; poll_data.pfds[(poll_data.ctxs_len * 3)].events = POLLIN; poll_data.pfds[(poll_data.ctxs_len * 3)].revents = 0; if (count != ctxs_count) { IPMICONSOLE_DEBUG (("list_for_each: invalid length returned: %d", count)); goto continue_loop; } if (poll_data.pfds_index != ctxs_count) { IPMICONSOLE_DEBUG (("invalid index set on returned: %d", poll_data.pfds_index)); goto continue_loop; } if (_ipmiconsole_poll (poll_data.pfds, (poll_data.ctxs_len * 3) + 1, timeout_len) < 0) { IPMICONSOLE_DEBUG (("poll: %s", strerror (errno))); goto continue_loop; } for (i = 0; i < poll_data.ctxs_len; i++) { if (poll_data.pfds[i*3].revents & POLLERR) { IPMICONSOLE_CTX_DEBUG (poll_data.pfds_ctxs[i], ("POLLERR")); /* See comments in _ipmi_recvfrom() regarding ECONNRESET/ECONNREFUSED */ if (_ipmi_recvfrom (poll_data.pfds_ctxs[i]) < 0) { ipmiconsole_ctx_set_errnum (poll_data.pfds_ctxs[i], IPMICONSOLE_ERR_SYSTEM_ERROR); poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (!poll_data.pfds_ctxs[i]->session.close_session_flag) { if (poll_data.pfds[i*3+1].revents & POLLNVAL) { /* This indicates the user closed the asynccomm file descriptors * which is ok. */ IPMICONSOLE_CTX_DEBUG (poll_data.pfds_ctxs[i], ("POLLNVAL")); ipmiconsole_ctx_set_errnum (poll_data.pfds_ctxs[i], IPMICONSOLE_ERR_SUCCESS); poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } if (poll_data.pfds[i*3+2].revents & POLLHUP) { /* This indicates the user closed the other end of * the socketpair so it's ok. */ IPMICONSOLE_CTX_DEBUG (poll_data.pfds_ctxs[i], ("POLLHUP")); ipmiconsole_ctx_set_errnum (poll_data.pfds_ctxs[i], IPMICONSOLE_ERR_SUCCESS); poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } if (poll_data.pfds[i*3+1].revents & POLLERR) { IPMICONSOLE_CTX_DEBUG (poll_data.pfds_ctxs[i], ("POLLERR")); ipmiconsole_ctx_set_errnum (poll_data.pfds_ctxs[i], IPMICONSOLE_ERR_INTERNAL_ERROR); poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } if (poll_data.pfds[i*3+2].revents & POLLERR) { IPMICONSOLE_CTX_DEBUG (poll_data.pfds_ctxs[i], ("POLLERR")); ipmiconsole_ctx_set_errnum (poll_data.pfds_ctxs[i], IPMICONSOLE_ERR_INTERNAL_ERROR); poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (poll_data.pfds[i*3].revents & POLLIN) { if (_ipmi_recvfrom (poll_data.pfds_ctxs[i]) < 0) { poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (poll_data.pfds[i*3].revents & POLLOUT) { if (_ipmi_sendto (poll_data.pfds_ctxs[i]) < 0) { poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (poll_data.pfds[i*3 + 1].revents & POLLIN) { if (_asynccomm (poll_data.pfds_ctxs[i]) < 0) { poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (!poll_data.pfds_ctxs[i]->session.close_session_flag) { if (poll_data.pfds[i*3+2].revents & POLLIN) { if (_console_read (poll_data.pfds_ctxs[i]) < 0) { poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } if (poll_data.pfds[i*3+2].revents & POLLOUT) { if (_console_write (poll_data.pfds_ctxs[i]) < 0) { poll_data.pfds_ctxs[i]->session.close_session_flag++; continue; } } } } /* We don't care what's read, just get it off the fd */ if (poll_data.pfds[(poll_data.ctxs_len * 3)].revents & POLLIN) { if (read (console_engine_ctxs_notifier[index][0], buf, IPMICONSOLE_PIPE_BUFLEN) < 0) IPMICONSOLE_DEBUG (("read: %s", strerror (errno))); } continue_loop: if (!unlock_console_engine_ctxs_mutex_flag) { if ((perr = pthread_mutex_unlock (&console_engine_ctxs_mutex[index]))) { /* This is one of the only truly "fatal" conditions */ IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); teardown_flag = 1; } } if (spin_wait_flag) { /* No contexts stored, either because they all died or none * have been submitted yet. Sleep a little bit to kill some * time and avoid spinning. */ /* XXX: Is this portable? */ usleep (IPMICONSOLE_SPIN_WAIT_TIME); } free (poll_data.pfds); free (poll_data.pfds_ctxs); } /* No way to return error, so just continue on even if there is a failure */ if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); console_engine_thread_count--; if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (NULL); } /* Notes: On an error, it is the responsibility of the caller to call * ipmiconsole_engine_cleanup() to destroy all previously created * threads. */ int ipmiconsole_engine_thread_create (void) { pthread_t thread; pthread_attr_t attr; unsigned int *index = NULL; int perr, rv = -1; assert (console_engine_is_setup); if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); errno = perr; return (-1); } assert (console_engine_thread_count < IPMICONSOLE_THREAD_COUNT_MAX); if ((perr = pthread_attr_init (&attr))) { IPMICONSOLE_DEBUG (("pthread_attr_init: %s", strerror (perr))); errno = perr; goto cleanup; } if ((perr = pthread_attr_setdetachstate (&attr, PTHREAD_CREATE_DETACHED))) { IPMICONSOLE_DEBUG (("pthread_attr_setdetachstate: %s", strerror (perr))); errno = perr; goto cleanup; } if (!(index = (unsigned int *)malloc (sizeof (unsigned int)))) { IPMICONSOLE_DEBUG (("malloc: %s", strerror (errno))); goto cleanup; } *index = console_engine_thread_count; if ((perr = pthread_create (&thread, &attr, _ipmiconsole_engine, index))) { IPMICONSOLE_DEBUG (("pthread_create: %s", strerror (perr))); errno = perr; goto cleanup; } /* Who cares if this fails */ if ((perr = pthread_attr_destroy (&attr))) IPMICONSOLE_DEBUG (("pthread_attr_destroy: %s", strerror (perr))); console_engine_thread_count++; rv = 0; cleanup: if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); errno = perr; return (-1); } return (rv); } int ipmiconsole_engine_submit_ctx (ipmiconsole_ctx_t c) { void *ptr; unsigned int i; int perr, ret = -1; unsigned int min_submitted = UINT_MAX; int index = 0; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (!(c->session_submitted)); assert (console_engine_is_setup); if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); return (-1); } for (i = 0; i < console_engine_thread_count; i++) { if ((perr = pthread_mutex_lock (&console_engine_ctxs_mutex[i]))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup_thread_count; } if (console_engine_ctxs_count[i] < min_submitted) { min_submitted = console_engine_ctxs_count[i]; index = i; } if ((perr = pthread_mutex_unlock (&console_engine_ctxs_mutex[i]))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup_thread_count; } } if ((perr = pthread_mutex_lock (&console_engine_ctxs_mutex[index]))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup_thread_count; } if (!(ptr = list_append (console_engine_ctxs[index], c))) { /* Note: Don't do a CTX debug, this is more of a global debug */ IPMICONSOLE_DEBUG (("list_append: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup_ctxs; } if (ptr != (void *)c) { IPMICONSOLE_DEBUG (("list_append: invalid pointer: ptr=%p; c=%p", ptr, c)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup_ctxs; } console_engine_ctxs_count[index]++; ret = 0; /* achu: * * Necessary to set this here b/c at this point in time, the context * is submitted, so the engine will be doing its own cleanup * (garbage collector, etc.). */ c->session_submitted++; if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); c->signal.ctx_state = IPMICONSOLE_CTX_STATE_ENGINE_SUBMITTED; if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); /* "Interrupt" the engine and tell it to get moving along w/ the new context */ if (write (console_engine_ctxs_notifier[index][1], "1", 1) < 0) IPMICONSOLE_DEBUG (("write: %s", strerror (errno))); cleanup_ctxs: if ((perr = pthread_mutex_unlock (&console_engine_ctxs_mutex[index]))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto cleanup_thread_count; } cleanup_thread_count: if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (ret); } int ipmiconsole_engine_cleanup (int cleanup_sol_sessions) { unsigned int i; unsigned int thread_count; int perr, rv = -1; if ((perr = pthread_mutex_lock (&console_engine_is_setup_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); return (-1); } if (!console_engine_is_setup) goto unlock_is_setup_mutex; if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto unlock_is_setup_mutex; } thread_count = console_engine_thread_count; if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto unlock_is_setup_mutex; } if (!thread_count) { rv = 0; goto engine_cleanup; } if ((perr = pthread_mutex_lock (&console_engine_teardown_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto engine_cleanup; } console_engine_teardown++; if (!cleanup_sol_sessions) console_engine_teardown_immediate++; if ((perr = pthread_mutex_unlock (&console_engine_teardown_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto engine_cleanup; } /* "Interrupt" the engine thread and tell it to get moving along */ for (i = 0; i < console_engine_ctxs_notifier_num; i++) { if (write (console_engine_ctxs_notifier[i][1], "1", 1) < 0) IPMICONSOLE_DEBUG (("write: %s", strerror (errno))); } if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto engine_cleanup; } while (console_engine_thread_count) { if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto engine_cleanup; } /* Wait awhile then try again */ /* XXX: Is this portable? */ usleep (IPMICONSOLE_SPIN_WAIT_TIME); if ((perr = pthread_mutex_lock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto engine_cleanup; } } if ((perr = pthread_mutex_unlock (&console_engine_thread_count_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto engine_cleanup; } /* "Interrupt" the garbage collector and tell it to quit */ if (write (garbage_collector_notifier[1], "1", 1) < 0) IPMICONSOLE_DEBUG (("write: %s", strerror (errno))); if ((perr = pthread_mutex_lock (&garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto engine_cleanup; } while (garbage_collector_active) { if ((perr = pthread_cond_wait (&garbage_collector_active_cond, &garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_cond_wait: %s", strerror (perr))); goto engine_cleanup; } } if ((perr = pthread_mutex_unlock (&garbage_collector_active_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto engine_cleanup; } engine_cleanup: for (i = 0; i < IPMICONSOLE_THREAD_COUNT_MAX; i++) { if (console_engine_ctxs[i]) list_destroy (console_engine_ctxs[i]); console_engine_ctxs[i] = NULL; console_engine_ctxs[i] = 0; pthread_mutex_destroy (&console_engine_ctxs_mutex[i]); /* ignore potential error, cleanup path */ close (console_engine_ctxs_notifier[i][0]); /* ignore potential error, cleanup path */ close (console_engine_ctxs_notifier[i][1]); } /* ignore potential error, cleanup path */ close (garbage_collector_notifier[0]); /* ignore potential error, cleanup path */ close (garbage_collector_notifier[1]); /* achu: The engine threads have been torn down, all the contexts * managed by those threads have been moved to * console_engine_ctxs_to_destroy, and the garbage collector has * been shut down. So we don't need to lock w/ the * console_engine_ctxs_to_destroy_mutex. * * This list destruction will cleanup everything except the minimal * data within a context for the user to destroy with * ipmiconsole_ctx_destroy. */ list_destroy (console_engine_ctxs_to_destroy); console_engine_ctxs_to_destroy = NULL; /* ignore potential error, cleanup path */ close (dummy_fd); dummy_fd = -1; console_engine_is_setup = 0; if ((perr = pthread_mutex_lock (&console_engine_teardown_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); goto unlock_is_setup_mutex; } console_engine_teardown = 0; console_engine_teardown_immediate = 0; if ((perr = pthread_mutex_unlock (&console_engine_teardown_mutex))) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); goto unlock_is_setup_mutex; } rv = 0; unlock_is_setup_mutex: if ((perr = pthread_mutex_unlock (&console_engine_is_setup_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (rv); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_engine.h0000644002055400205540000000342413527331637022316 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_engine.h,v 1.20 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_ENGINE_H #define IPMICONSOLE_ENGINE_H #include "ipmiconsole.h" int ipmiconsole_engine_setup (unsigned int thread_count); int ipmiconsole_engine_is_setup (void); int ipmiconsole_engine_thread_count (void); int ipmiconsole_engine_thread_create (void); int ipmiconsole_engine_submit_ctx (ipmiconsole_ctx_t c); int ipmiconsole_engine_cleanup (int cleanup_sol_sessions); #endif /* IPMICONSOLE_ENGINE_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_garbage_collector.c0000644002055400205540000001561713527331637024511 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_garbage_collector.c,v 1.22 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_engine.h" #include "freeipmi-portability.h" #include "list.h" extern List console_engine_ctxs_to_destroy; extern pthread_mutex_t console_engine_ctxs_to_destroy_mutex; extern int garbage_collector_notifier[2]; /* * When the engine is in teardown, there is a tiny race condition that * is possible for the garbage collector to still be running while the * engine is being torn down. This set of variables is to protect * against that situation. */ int garbage_collector_active = 0; pthread_mutex_t garbage_collector_active_mutex = PTHREAD_MUTEX_INITIALIZER; pthread_cond_t garbage_collector_active_cond = PTHREAD_COND_INITIALIZER; #define IPMICONSOLE_GARBAGE_COLLECTOR_SPIN_TIME 30 void * ipmiconsole_garbage_collector (void *arg) { int perr; assert (!garbage_collector_active); /* What do we do if a mutex lock/unlock fails here? Ignore for * now. */ if ((perr = pthread_mutex_lock (&garbage_collector_active_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); garbage_collector_active++; if ((perr = pthread_cond_signal(&garbage_collector_active_cond))) IPMICONSOLE_DEBUG (("pthread_cond_signal: %s", strerror (perr))); if ((perr = pthread_mutex_unlock (&garbage_collector_active_mutex)) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); while (1) { ListIterator itr = NULL; ipmiconsole_ctx_t c; struct timeval tv; int perr; int n; fd_set rds; FD_ZERO (&rds); FD_SET (garbage_collector_notifier[0], &rds); tv.tv_sec = IPMICONSOLE_GARBAGE_COLLECTOR_SPIN_TIME; tv.tv_usec = 0; /* What happens if anythings fails? * * Quit - well that's bad. * * Mem-leak - that's bad too. * * For now, just log. */ if ((n = select (garbage_collector_notifier[0] + 1, &rds, NULL, NULL, &tv)) < 0) { IPMICONSOLE_DEBUG (("select: %s", strerror (errno))); continue; } /* Signal from ipmiconsole_engine_teardown() to quit */ if (n && FD_ISSET (garbage_collector_notifier[0], &rds)) break; /* Note: the code in __ipmiconsole_ctx_connection_cleanup() and * ipmiconsole_garbage_collector() may look like it may race and * could deadlock. (ABBA and BAAB deadlock situation). However, * the context mutex c->signal.mutex_ctx_state is accessed in * __ipmiconsole_ctx_connection_cleanup() when trying to add this item * to the console_engine_ctxs_to_destroy list. It is accessed in * ipmiconsole_garbage_collector() only on the items already in the * console_engine_ctxs_to_destroy list. So the * c->signal.mutex_ctx_state can never be raced against in these two * functions. */ if ((perr = pthread_mutex_lock (&(console_engine_ctxs_to_destroy_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); if (!(itr = list_iterator_create (console_engine_ctxs_to_destroy))) { IPMICONSOLE_DEBUG (("list_iterator_create: %s", strerror (errno))); goto end_loop; } while ((c = (ipmiconsole_ctx_t)list_next (itr))) { if ((perr = pthread_mutex_lock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); assert (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_WAIT || c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED); if (c->signal.ctx_state == IPMICONSOLE_CTX_STATE_GARBAGE_COLLECTION_USER_DESTROYED) { /* Must unlock here, b/c will be grabbed in delete */ if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); if (!list_delete (itr)) IPMICONSOLE_DEBUG (("list_delete: %s", strerror (errno))); } else { if ((perr = pthread_mutex_unlock (&(c->signal.mutex_ctx_state))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); } } if ((perr = pthread_mutex_unlock (&(console_engine_ctxs_to_destroy_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); end_loop: if (itr) list_iterator_destroy (itr); } if ((perr = pthread_mutex_lock (&garbage_collector_active_mutex))) IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); garbage_collector_active = 0; if ((perr = pthread_cond_signal(&garbage_collector_active_cond))) IPMICONSOLE_DEBUG (("pthread_cond_signal: %s", strerror (perr))); if ((perr = pthread_mutex_unlock (&garbage_collector_active_mutex)) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); return (NULL); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_garbage_collector.h0000644002055400205540000000307513527331637024511 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_garbage_collector.h,v 1.10 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_GARBAGE_COLLECTOR_H #define IPMICONSOLE_GARBAGE_COLLECTOR_H #include "ipmiconsole.h" void *ipmiconsole_garbage_collector (void *arg); #endif /* IPMICONSOLE_GARBAGE_COLLECTOR_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_packet.c0000644002055400205540000022253613527331637022322 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_packet.c,v 1.64 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_packet.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "debug-util.h" #include "secure.h" #define IPMICONSOLE_MAX_PACKET_DUMP_HDR_LEN 1024 fiid_field_t * ipmiconsole_packet_template (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_VALID (p)); switch (p) { case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ: return (&tmpl_cmd_get_channel_authentication_capabilities_rq[0]); case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS: return (&tmpl_cmd_get_channel_authentication_capabilities_rs[0]); case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST: return (&tmpl_rmcpplus_open_session_request[0]); case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE: return (&tmpl_rmcpplus_open_session_response[0]); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1: return (&tmpl_rmcpplus_rakp_message_1[0]); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2: return (&tmpl_rmcpplus_rakp_message_2[0]); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3: return (&tmpl_rmcpplus_rakp_message_3[0]); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4: return (&tmpl_rmcpplus_rakp_message_4[0]); case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: return (&tmpl_cmd_set_session_privilege_level_rq[0]); case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: return (&tmpl_cmd_set_session_privilege_level_rs[0]); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ: return (&tmpl_cmd_get_channel_payload_support_rq[0]); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS: return (&tmpl_cmd_get_channel_payload_support_rs[0]); case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ: return (&tmpl_cmd_get_payload_activation_status_rq[0]); case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS: return (&tmpl_cmd_get_payload_activation_status_rs[0]); case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ: return (&tmpl_cmd_activate_payload_sol_rq[0]); case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS: return (&tmpl_cmd_activate_payload_sol_rs[0]); case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ: return (&tmpl_sol_payload_data_remote_console_to_bmc[0]); case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS: return (&tmpl_sol_payload_data_bmc_to_remote_console[0]); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ: return (&tmpl_cmd_get_channel_payload_version_rq[0]); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS: return (&tmpl_cmd_get_channel_payload_version_rs[0]); case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ: return (&tmpl_cmd_deactivate_payload_rq[0]); case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS: return (&tmpl_cmd_deactivate_payload_rs[0]); case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ: return (&tmpl_cmd_chassis_control_rq[0]); case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS: return (&tmpl_cmd_chassis_control_rs[0]); default: IPMICONSOLE_CTX_DEBUG (c, ("invalid packet type: %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (NULL); } return (NULL); /* NOT REACHED */ } fiid_obj_t ipmiconsole_packet_object (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_VALID (p)); switch (p) { case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ: return (c->connection.obj_authentication_capabilities_rq); case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS: return (c->connection.obj_authentication_capabilities_rs); case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST: return (c->connection.obj_open_session_request); case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE: return (c->connection.obj_open_session_response); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1: return (c->connection.obj_rakp_message_1); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2: return (c->connection.obj_rakp_message_2); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3: return (c->connection.obj_rakp_message_3); case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4: return (c->connection.obj_rakp_message_4); case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: return (c->connection.obj_set_session_privilege_level_rq); case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: return (c->connection.obj_set_session_privilege_level_rs); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ: return (c->connection.obj_get_channel_payload_support_rq); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS: return (c->connection.obj_get_channel_payload_support_rs); case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ: return (c->connection.obj_get_payload_activation_status_rq); case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS: return (c->connection.obj_get_payload_activation_status_rs); case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ: return (c->connection.obj_activate_payload_rq); case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS: return (c->connection.obj_activate_payload_rs); case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ: return (c->connection.obj_sol_payload_data_rq); case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS: return (c->connection.obj_sol_payload_data_rs); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ: return (c->connection.obj_get_channel_payload_version_rq); case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS: return (c->connection.obj_get_channel_payload_version_rs); case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ: return (c->connection.obj_deactivate_payload_rq); case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS: return (c->connection.obj_deactivate_payload_rs); case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ: return (c->connection.obj_close_session_rq); case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS: return (c->connection.obj_close_session_rs); default: IPMICONSOLE_CTX_DEBUG (c, ("invalid packet type: %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (NULL); } return (NULL); /* NOT REACHED */ } static int _packet_dump_hdr (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, char *hdr, unsigned int hdrlen) { uint8_t packet_type; uint8_t packet_direction; const char *str_cmd = NULL; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_VALID (p)); assert (hdr); assert (hdrlen); if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS) packet_type = DEBUG_UTIL_TYPE_IPMI_1_5; else packet_type = DEBUG_UTIL_TYPE_IPMI_2_0; switch (p) { case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ: case IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES); break; case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST: case IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE: str_cmd = DEBUG_UTIL_OPEN_SESSION_STR; break; case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1: str_cmd = DEBUG_UTIL_RAKP_1_STR; break; case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2: str_cmd = DEBUG_UTIL_RAKP_2_STR; break; case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3: str_cmd = DEBUG_UTIL_RAKP_3_STR; break; case IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4: str_cmd = DEBUG_UTIL_RAKP_4_STR; break; case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: case IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL); break; case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ: case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_PAYLOAD_SUPPORT); break; case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ: case IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_PAYLOAD_ACTIVATION_STATUS); break; case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ: case IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_ACTIVATE_PAYLOAD); break; case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ: str_cmd = "SOL Remote Console to BMC"; break; case IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS: str_cmd = "SOL BMC to Remote Console"; break; case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ: case IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_PAYLOAD_VERSION); break; case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ: case IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_DEACTIVATE_PAYLOAD); break; case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ: case IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_CLOSE_SESSION); break; default: IPMICONSOLE_CTX_DEBUG (c, ("invalid packet type: %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* special case: there is no "Request/Response" with SOL data */ if (p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ || p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS) packet_direction = DEBUG_UTIL_DIRECTION_NONE; else if (IPMICONSOLE_PACKET_TYPE_REQUEST (p)) packet_direction = DEBUG_UTIL_DIRECTION_REQUEST; else packet_direction = DEBUG_UTIL_DIRECTION_RESPONSE; if (debug_hdr_str (packet_type, packet_direction, DEBUG_UTIL_FLAGS_DEFAULT, str_cmd, hdr, hdrlen) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("debug_hdr_str: p = %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } int ipmiconsole_packet_dump (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, const void *buf, unsigned int buflen) { fiid_field_t *tmpl_lan_msg_hdr; fiid_field_t *tmpl_cmd; char hdr[IPMICONSOLE_MAX_PACKET_DUMP_HDR_LEN]; int fd; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_VALID (p)); assert (buf); assert (buflen); if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDOUT) fd = STDOUT_FILENO; else if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDERR) fd = STDERR_FILENO; else if (c->config.debug_flags & IPMICONSOLE_DEBUG_FILE) fd = c->debug.debug_fd; else return (0); tmpl_cmd = ipmiconsole_packet_template (c, p); if (IPMICONSOLE_PACKET_TYPE_REQUEST (p)) tmpl_lan_msg_hdr = &tmpl_lan_msg_hdr_rq[0]; else tmpl_lan_msg_hdr = &tmpl_lan_msg_hdr_rs[0]; if (_packet_dump_hdr (c, p, hdr, IPMICONSOLE_MAX_PACKET_DUMP_HDR_LEN) < 0) return (-1); /* IPMI 1.5 Style Packets */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS) { if (ipmi_dump_lan_packet (fd, c->config.hostname, hdr, NULL, buf, buflen, tmpl_lan_msg_hdr, tmpl_cmd) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_dump_lan_packet: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } else /* IPMI 2.0 Style Packets */ { /* IPMI 2.0 RAKP Session Setup Packets use no cipher * algorithms */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) { if (ipmi_dump_rmcpplus_packet (fd, c->config.hostname, hdr, NULL, IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, buf, buflen, tmpl_lan_msg_hdr, tmpl_cmd) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_dump_rmcpplus_packet: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } else { if (ipmi_dump_rmcpplus_packet (fd, c->config.hostname, hdr, NULL, c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, c->session.integrity_key_ptr, c->session.integrity_key_len, c->session.confidentiality_key_ptr, c->session.confidentiality_key_len, buf, buflen, tmpl_lan_msg_hdr, tmpl_cmd) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_dump_rmcpplus_packet: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } } return (0); } static int _packet_dump_unknown_hdr (ipmiconsole_ctx_t c, const void *buf, unsigned int buflen, char *hdr, unsigned int hdrlen) { char *fmt = "================================================\n" "%s\n" "================================================"; char *str; int ret; int len; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (buf); assert (buflen); assert (hdr); assert (hdrlen); if ((ret = ipmi_is_ipmi_1_5_packet (buf, buflen)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_is_ipmi_1_5_packet: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (ret) str = "= Unexpected IPMI 1.5 Packet ="; else { uint8_t payload_type; if (ipmi_rmcpplus_calculate_payload_type (buf, buflen, &payload_type) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_calculate_payload_type: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } switch (payload_type) { case IPMI_PAYLOAD_TYPE_SOL: str = "= Unexpected SOL Packet ="; break; case IPMI_PAYLOAD_TYPE_IPMI: str = "= Unexpected IPMI 2.0 Packet ="; break; case IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST: str = "= Unexpected Open Session Request ="; break; case IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE: str = "= Unexpected Open Session Response ="; break; case IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1: str = "= Unexpected RAKP Message 1 ="; break; case IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2: str = "= Unexpected RAKP Message 2 ="; break; case IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3: str = "= Unexpected RAKP Message 3 ="; break; case IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4: str = "= Unexpected RAKP Message 4 ="; break; default: str = "= Unexpected Packet ="; } } if ((len = snprintf (hdr, hdrlen, fmt, str)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("snprintf")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (len >= hdrlen) { IPMICONSOLE_CTX_DEBUG (c, ("snprintf truncation: len = %d", len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (len); } int ipmiconsole_packet_dump_unknown (ipmiconsole_ctx_t c, const void *buf, unsigned int buflen) { char hdr[IPMICONSOLE_MAX_PACKET_DUMP_HDR_LEN]; int fd; int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (buf); assert (buflen); if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDOUT) fd = STDOUT_FILENO; else if (c->config.debug_flags & IPMICONSOLE_DEBUG_STDERR) fd = STDERR_FILENO; else if (c->config.debug_flags & IPMICONSOLE_DEBUG_FILE) fd = c->debug.debug_fd; else return (0); if (_packet_dump_unknown_hdr (c, buf, buflen, hdr, IPMICONSOLE_MAX_PACKET_DUMP_HDR_LEN) < 0) return (-1); if ((ret = ipmi_is_ipmi_1_5_packet (buf, buflen)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_is_ipmi_1_5_packet: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (ret) { if (ipmi_dump_lan_packet (fd, c->config.hostname, hdr, NULL, buf, buflen, tmpl_lan_msg_hdr_rs, tmpl_unexpected_data) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_dump_lan_packet: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } else { if (ipmi_dump_rmcpplus_packet (fd, c->config.hostname, hdr, NULL, c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, c->session.integrity_key_ptr, c->session.integrity_key_len, c->session.confidentiality_key_ptr, c->session.confidentiality_key_len, buf, buflen, tmpl_lan_msg_hdr_rs, tmpl_unexpected_data) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_dump_rmcpplus_packet: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } return (0); } static int _ipmi_1_5_packet_assemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, uint8_t authentication_type, uint32_t inbound_sequence_number, uint32_t session_id, void *authentication_code_data, unsigned int authentication_code_data_len, uint8_t net_fn, fiid_obj_t obj_cmd_rq, void *buf, unsigned int buflen) { int pkt_len; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_REQUEST (p)); assert (buf); assert (buflen); if (fill_rmcp_hdr_ipmi (c->connection.obj_rmcp_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcp_hdr_ipmi: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_lan_session_hdr (authentication_type, inbound_sequence_number, session_id, c->connection.obj_lan_session_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_lan_session_hdr: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, IPMI_BMC_IPMB_LUN_BMC, c->session.requester_sequence_number, c->connection.obj_lan_msg_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_lan_msg_hdr: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((pkt_len = assemble_ipmi_lan_pkt (c->connection.obj_rmcp_hdr_rq, c->connection.obj_lan_session_hdr_rq, c->connection.obj_lan_msg_hdr_rq, obj_cmd_rq, authentication_code_data, authentication_code_data_len, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("assemble_ipmi_lan_pkt: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (pkt_len); } static int _ipmi_2_0_packet_assemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint32_t session_id, uint32_t session_sequence_number, void *authentication_code_data, unsigned int authentication_code_data_len, uint8_t net_fn, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, void *integrity_key, unsigned int integrity_key_len, void *confidentiality_key, unsigned int confidentiality_key_len, fiid_obj_t obj_cmd_rq, void *buf, unsigned int buflen) { int pkt_len; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_REQUEST (p)); assert (buf); assert (buflen); if (fill_rmcp_hdr_ipmi (c->connection.obj_rmcp_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcp_hdr_ipmi: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_rmcpplus_session_hdr (payload_type, payload_authenticated, payload_encrypted, 0, /* oem_iana */ 0, /* oem_payload_id */ session_id, session_sequence_number, c->connection.obj_rmcpplus_session_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcpplus_session_hdr: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, IPMI_BMC_IPMB_LUN_BMC, c->session.requester_sequence_number, c->connection.obj_lan_msg_hdr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_lan_msg_hdr: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_rmcpplus_session_trlr (c->connection.obj_rmcpplus_session_trlr_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcpplus_session_trlr: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((pkt_len = assemble_ipmi_rmcpplus_pkt (authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, authentication_code_data, authentication_code_data_len, c->connection.obj_rmcp_hdr_rq, c->connection.obj_rmcpplus_session_hdr_rq, c->connection.obj_lan_msg_hdr_rq, obj_cmd_rq, c->connection.obj_rmcpplus_session_trlr_rq, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("assemble_ipmi_rmcpplus_pkt: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (pkt_len); } int ipmiconsole_ipmi_packet_assemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, void *buf, unsigned int buflen) { char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; char *username = NULL; unsigned int username_len; char *password = NULL; unsigned int password_len; uint8_t authentication_type = 0; uint32_t session_id = 0; uint32_t managed_system_session_id = 0; uint32_t session_sequence_number = 0; uint8_t net_fn = 0; uint8_t payload_type = 0; uint8_t authentication_algorithm = 0; uint8_t integrity_algorithm = 0; void *integrity_key = NULL; unsigned int integrity_key_len = 0; uint8_t confidentiality_algorithm = 0; void *confidentiality_key = NULL; unsigned int confidentiality_key_len = 0; uint8_t payload_authenticated = 0; uint8_t payload_encrypted = 0; fiid_obj_t obj_cmd_rq = NULL; int pkt_len; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_REQUEST (p)); assert (p != IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ); assert (buf); assert (buflen); /* Determine Username */ /* IPMI Workaround * * Intel IPMI 2.0 implementations pad their usernames. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION && p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (strlen (c->config.username)) strcpy (username_buf, c->config.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { if (strlen (c->config.username)) username = c->config.username; else username = NULL; username_len = (username) ? strlen (username) : 0; } /* Determine Password */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) password = NULL; else { if (strlen (c->config.password)) password = c->config.password; else password = NULL; } password_len = (password) ? strlen (password) : 0; /* IPMI Workaround * * Intel IPMI 2.0 implementations improperly calculate HMAC-MD5-128 hashes * when the passwords are > 16 bytes long. The BMCs probably assume * all keys are <= 16 bytes in length. So we have to adjust. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION && c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; /* Determine Authentication Type */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; /* Determine Session ID */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) session_id = 0; else { if (FIID_OBJ_GET (c->connection.obj_open_session_response, "managed_system_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get: 'managed_system_session_id': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } session_id = val; } /* Determine Managed System Session ID */ if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) { if (FIID_OBJ_GET (c->connection.obj_open_session_response, "managed_system_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get: 'managed_system_session_id': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } managed_system_session_id = val; } /* Determine Sequence Number */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) session_sequence_number = 0; else session_sequence_number = c->session.session_sequence_number; /* Determine Network Function */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) net_fn = IPMI_NET_FN_APP_RQ; /* Determine Payload Type */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST) payload_type = IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST; else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1) payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1; else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3; else if (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) payload_type = IPMI_PAYLOAD_TYPE_IPMI; else if (p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ) payload_type = IPMI_PAYLOAD_TYPE_SOL; /* Determine Authentication/Integrity/Confidentiality Keys */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) { authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; integrity_algorithm = IPMI_INTEGRITY_ALGORITHM_NONE; confidentiality_algorithm = IPMI_CONFIDENTIALITY_ALGORITHM_NONE; integrity_key = NULL; integrity_key_len = 0; confidentiality_key = NULL; confidentiality_key_len = 0; } else { authentication_algorithm = c->config.authentication_algorithm; integrity_algorithm = c->config.integrity_algorithm; confidentiality_algorithm = c->config.confidentiality_algorithm; integrity_key = c->session.integrity_key_ptr; integrity_key_len = c->session.integrity_key_len; confidentiality_key = c->session.confidentiality_key_ptr; confidentiality_key_len = c->session.confidentiality_key_len; } /* Determine Payload Authenticated Flag */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3 || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) payload_authenticated = IPMI_PAYLOAD_FLAG_UNAUTHENTICATED; else payload_authenticated = IPMI_PAYLOAD_FLAG_AUTHENTICATED; /* Determine Payload Encrypted Flag */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3 || confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) payload_encrypted = IPMI_PAYLOAD_FLAG_UNENCRYPTED; else payload_encrypted = IPMI_PAYLOAD_FLAG_ENCRYPTED; /* Fill/Determine Object */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) { if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, c->config.privilege_level, IPMI_GET_IPMI_V20_EXTENDED_DATA, c->connection.obj_authentication_capabilities_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_get_channel_authentication_capabilities: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_authentication_capabilities_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST) { uint8_t privilege_level; /* * IPMI Workaround (achu) * * Forgotten Motherboard * * Cipher suite IDs are attached to specific privilege levels * rather than a maximum privilege level limit. So you can only * authenticate at the configured privilege level rather than a * privilege level <= to it. * * To deal with this situation. We send the "request highest * privilege" flag in the open session request. This should be * enough to work around this issue but still work with other * motherboards. */ /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The Intel's return IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL instead * of an actual privilege, so have to pass the actual privilege * we want to use. */ /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100, Inventec 5441/Dell Xanadu II, * Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * The remote BMC incorrectly calculates keys using the privilege * specified in the open session stage rather than the privilege * used during the RAKP1 stage. This can be problematic if you * specify IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL during that stage * instead of a real privilege level. So we must pass the actual * privilege we want to use. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION || c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION || c->config.workaround_flags & IPMICONSOLE_WORKAROUND_OPEN_SESSION_PRIVILEGE) privilege_level = c->config.privilege_level; else privilege_level = IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL; if (fill_rmcpplus_open_session (c->session.message_tag, privilege_level, c->session.remote_console_session_id, c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, c->connection.obj_open_session_request) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcpplus_open_session: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_open_session_request; } else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1) { if (fill_rmcpplus_rakp_message_1 (c->session.message_tag, managed_system_session_id, c->session.remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, c->config.privilege_level, c->session.name_only_lookup, username, username_len, c->connection.obj_rakp_message_1) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcpplus_rakp_message_1: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_rakp_message_1; } else if (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; uint8_t key_exchange_authentication_code[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int key_exchange_authentication_code_len; uint8_t name_only_lookup; /* IPMI Workaround * * Intel IPMI 2.0 implementations use this flag incorrectly. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) name_only_lookup = IPMI_USER_NAME_PRIVILEGE_LOOKUP; else name_only_lookup = c->session.name_only_lookup; if ((managed_system_random_number_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (managed_system_random_number_len != IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: invalid managed system random number length: %d", managed_system_random_number_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if ((key_exchange_authentication_code_len = ipmi_calculate_rakp_3_key_exchange_authentication_code (c->config.authentication_algorithm, password, password_len, managed_system_random_number, managed_system_random_number_len, c->session.remote_console_session_id, name_only_lookup, c->config.privilege_level, username, username_len, key_exchange_authentication_code, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_calculate_rakp_3_key_exchange_authentication_code: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (fill_rmcpplus_rakp_message_3 (c->session.message_tag, RMCPPLUS_STATUS_NO_ERRORS, managed_system_session_id, key_exchange_authentication_code, key_exchange_authentication_code_len, c->connection.obj_rakp_message_3) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_rmcpplus_rakp_message_3: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_rakp_message_3; } else if (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ) { if (fill_cmd_set_session_privilege_level (c->config.privilege_level, c->connection.obj_set_session_privilege_level_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_set_session_privilege_level: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_set_session_privilege_level_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ) { if (fill_cmd_get_channel_payload_support (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, c->connection.obj_get_channel_payload_support_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_get_channel_payload_support: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_get_channel_payload_support_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ) { if (fill_cmd_get_payload_activation_status (IPMI_PAYLOAD_TYPE_SOL, c->connection.obj_get_payload_activation_status_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_get_payload_activation_status: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_get_payload_activation_status_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ) { uint8_t sol_startup_handshake; uint8_t authentication_activation; uint8_t encryption_activation; uint8_t shared_serial_alert_behavior; /* IPMI Workaround * * Intel IPMI 2.0 specific issue. I have no idea why this is. * I took it from ipmiutil. Ipmiutil author Andrew Cress cannot * remember why this is the case either. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) sol_startup_handshake = IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_ASSERTED; else sol_startup_handshake = IPMI_SOL_STARTUP_HANDSHAKE_CTS_AND_DCD_SDR_DEASSERTED; if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_activation = IPMI_ACTIVATE_PAYLOAD_WITHOUT_AUTHENTICATION; else authentication_activation = IPMI_ACTIVATE_PAYLOAD_WITH_AUTHENTICATION; if (c->config.confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) encryption_activation = IPMI_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION; else encryption_activation = IPMI_ACTIVATE_PAYLOAD_WITH_ENCRYPTION; /* Workaround * * Discovered on Intel Windmill/Quanta Winterfell/Wiwynn Windmill * * Nodes like this to be set, I have no idea why. The boards * don't even have serial ports. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SERIAL_ALERTS_DEFERRED) shared_serial_alert_behavior = IPMI_SERIAL_MODEM_ALERTS_DEFERRED_WHILE_SOL_ACTIVE; else shared_serial_alert_behavior = IPMI_SERIAL_MODEM_ALERTS_FAIL_WHILE_SOL_ACTIVE; if (fill_cmd_activate_payload_sol (IPMI_PAYLOAD_TYPE_SOL, (uint8_t)c->config.sol_payload_instance, sol_startup_handshake, shared_serial_alert_behavior, IPMI_TEST_MODE_DEACTIVATED, authentication_activation, encryption_activation, c->connection.obj_activate_payload_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_activate_payload_sol: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_activate_payload_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ) { assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); if (fill_cmd_get_channel_payload_version (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, IPMI_PAYLOAD_TYPE_SOL, c->connection.obj_get_channel_payload_version_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_get_channel_payload_version: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_get_channel_payload_version_rq; } else if (p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) { uint8_t payload_instance; if (c->session.deactivate_payload_instances) payload_instance = c->session.sol_instances_activated[c->session.sol_instances_deactivated_count]; else payload_instance = (uint8_t)c->config.sol_payload_instance; if (fill_cmd_deactivate_payload (IPMI_PAYLOAD_TYPE_SOL, payload_instance, 0, /* achu: IPMI SPEC says: 0h for SOL */ c->connection.obj_deactivate_payload_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_deactivate_payload: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_deactivate_payload_rq; } else /* p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ */ { if (fill_cmd_close_session (session_id, NULL, c->connection.obj_close_session_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_cmd_close_session: p = %d; %s", p, strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } obj_cmd_rq = c->connection.obj_close_session_rq; } /* IPMI 1.5 Style Packets */ if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) { if ((pkt_len = _ipmi_1_5_packet_assemble (c, p, authentication_type, session_sequence_number, session_id, password, password_len, net_fn, obj_cmd_rq, buf, buflen)) < 0) return (-1); } else /* IPMI 2.0 Style Packets */ { if ((pkt_len = _ipmi_2_0_packet_assemble (c, p, payload_type, payload_authenticated, payload_encrypted, session_id, session_sequence_number, password, password_len, net_fn, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, obj_cmd_rq, buf, buflen)) < 0) return (-1); } return (pkt_len); } int ipmiconsole_sol_packet_assemble (ipmiconsole_ctx_t c, uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t generate_break, void *character_data, unsigned int character_data_len, void *buf, unsigned int buflen) { char *password = NULL; uint32_t session_id = 0; uint8_t payload_authenticated = 0; uint8_t payload_encrypted = 0; uint8_t ack; int pkt_len; uint64_t val; int rv = -1; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); assert (character_data_len <= c->session.max_sol_character_send_size); /* If the packet sequence number is 0, that means this is an ACK * only packet. So the ack_nack sequence number should be non-zero * and no character data should be sent. The accepted character * count can be 0 to indicate a NACK instead of an ACK. */ assert (packet_sequence_number || (!packet_sequence_number && packet_ack_nack_sequence_number && !character_data_len)); assert (buf); assert (buflen); if (strlen (c->config.password)) password = c->config.password; else password = NULL; if (FIID_OBJ_GET (c->connection.obj_open_session_response, "managed_system_session_id", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get: 'managed_system_session_id': %s", fiid_obj_errormsg (c->connection.obj_open_session_response))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } session_id = val; /* Determine Payload Authenticated Flag */ if (c->config.integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) payload_authenticated = IPMI_PAYLOAD_FLAG_UNAUTHENTICATED; else payload_authenticated = IPMI_PAYLOAD_FLAG_AUTHENTICATED; /* Determine Payload Encrypted Flag */ if (c->config.confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) payload_encrypted = IPMI_PAYLOAD_FLAG_UNENCRYPTED; else payload_encrypted = IPMI_PAYLOAD_FLAG_ENCRYPTED; /* Determine ACK flag */ if (!packet_sequence_number) { if (accepted_character_count) ack = IPMI_SOL_ACK; else ack = IPMI_SOL_NACK; } else /* XXX: Hopefully this is right. Specification is unclear */ ack = 0; /* Fill/Determine Object */ if (fill_sol_payload_data_remote_console_to_bmc (packet_sequence_number, packet_ack_nack_sequence_number, accepted_character_count, 0, 0, 0, 0, generate_break, 0, ack, character_data, character_data_len, c->connection.obj_sol_payload_data_rq) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fill_sol_payload_data_remote_console_to_bmc: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if ((pkt_len = _ipmi_2_0_packet_assemble (c, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ, IPMI_PAYLOAD_TYPE_SOL, payload_authenticated, payload_encrypted, session_id, c->session.session_sequence_number, password, (password) ? strlen (password) : 0, 0, c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, c->session.integrity_key_ptr, c->session.integrity_key_len, c->session.confidentiality_key_ptr, c->session.confidentiality_key_len, c->connection.obj_sol_payload_data_rq, buf, buflen)) < 0) goto cleanup; rv = pkt_len; cleanup: return (rv); } int ipmiconsole_packet_unassemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t *p, const void *buf, unsigned int buflen) { ipmiconsole_packet_type_t pkt; fiid_obj_t obj_cmd = NULL; int ret, pkt_ret = 0; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (p); assert (buf); assert (buflen); /* Calculate packet type */ if ((ret = ipmi_is_ipmi_1_5_packet (buf, buflen)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_is_ipmi_1_5_packet: %s", strerror (errno))); /* Assume malformed packet */ pkt_ret = 0; goto out; } if (ret) { if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT) pkt = IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS; else { /* Unexpected packet, throw it away */ IPMICONSOLE_CTX_DEBUG (c, ("Unexpected IPMI 1.5 Packet: protocol_state = %d", c->session.protocol_state)); pkt_ret = 0; goto out; } obj_cmd = ipmiconsole_packet_object (c, pkt); if ((pkt_ret = unassemble_ipmi_lan_pkt (buf, buflen, c->connection.obj_rmcp_hdr_rs, c->connection.obj_lan_session_hdr_rs, c->connection.obj_lan_msg_hdr_rs, obj_cmd, c->connection.obj_lan_msg_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("unassemble_ipmi_lan_pkt: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } *p = pkt; } else { uint8_t payload_type; if (ipmi_rmcpplus_calculate_payload_type (buf, buflen, &payload_type) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_rmcpplus_calculate_payload_type: %s", strerror (errno))); /* Assume malformed packet */ pkt_ret = 0; goto out; } if (payload_type == IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2 || payload_type == IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4) { if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT) pkt = IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT) pkt = IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT) pkt = IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4; else { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected IPMI 2.0 Session Setup Packet: protocol_state = %d", c->session.protocol_state)); pkt_ret = 0; goto out; } obj_cmd = ipmiconsole_packet_object (c, pkt); /* IPMI 2.0 Pre-Session Establishment Packets */ if ((pkt_ret = unassemble_ipmi_rmcpplus_pkt (IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, buf, buflen, c->connection.obj_rmcp_hdr_rs, c->connection.obj_rmcpplus_session_hdr_rs, c->connection.obj_rmcpplus_payload_rs, c->connection.obj_lan_msg_hdr_rs, obj_cmd, c->connection.obj_lan_msg_trlr_rs, c->connection.obj_rmcpplus_session_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("unassemble_ipmi_rmcpplus_pkt: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } *p = pkt; } else if (payload_type == IPMI_PAYLOAD_TYPE_IPMI || payload_type == IPMI_PAYLOAD_TYPE_SOL) { if (payload_type == IPMI_PAYLOAD_TYPE_IPMI) { if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT) pkt = IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT) pkt = IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT) pkt = IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT) pkt = IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) pkt = IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT) pkt = IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS; else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT) pkt = IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS; else { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected IPMI 2.0 IPMI Packet: protocol_state = %d", c->session.protocol_state)); pkt_ret = 0; goto out; } } else { if (c->session.protocol_state != IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected IPMI 2.0 SOL Packet: protocol_state = %d", c->session.protocol_state)); pkt_ret = 0; goto out; } pkt = IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS; } obj_cmd = ipmiconsole_packet_object (c, pkt); /* IPMI 2.0 Session Packets */ if ((pkt_ret = unassemble_ipmi_rmcpplus_pkt (c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, c->session.integrity_key_ptr, c->session.integrity_key_len, c->session.confidentiality_key_ptr, c->session.confidentiality_key_len, buf, buflen, c->connection.obj_rmcp_hdr_rs, c->connection.obj_rmcpplus_session_hdr_rs, c->connection.obj_rmcpplus_payload_rs, c->connection.obj_lan_msg_hdr_rs, obj_cmd, c->connection.obj_lan_msg_trlr_rs, c->connection.obj_rmcpplus_session_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("unassemble_ipmi_rmcpplus_pkt: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } *p = pkt; } else { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected payload_type: payload_type = %u", payload_type)); pkt_ret = 0; goto out; } } out: return (pkt_ret); } int ipmiconsole_calculate_errnum (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { fiid_obj_t obj_cmd; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (p)); if (!(obj_cmd = ipmiconsole_packet_object (c, p))) return (-1); if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) { uint8_t rmcpplus_status_code; if (FIID_OBJ_GET (obj_cmd, "rmcpplus_status_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get: 'rmcpplus_status_code': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } rmcpplus_status_code = val; if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS) { IPMICONSOLE_CTX_DEBUG (c, ("called with valid success code; p = %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION || rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_BUSY); return (0); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED || rmcpplus_status_code == RMCPPLUS_STATUS_INVALID_ROLE) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); return (0); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_NAME) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_USERNAME_INVALID); return (0); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CIPHER_SUITE_ID_UNAVAILABLE); return (0); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_INVALID_INTEGRITY_CHECK_VALUE) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PASSWORD_INVALID); return (0); } } else { uint8_t comp_code; if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get: 'comp_code': %s", fiid_obj_errormsg (obj_cmd))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } comp_code = val; if (comp_code == IPMI_COMP_CODE_COMMAND_SUCCESS) { IPMICONSOLE_CTX_DEBUG (c, ("called with valid success code; p = %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS && comp_code == IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_IPMI_2_0_UNAVAILABLE); return (0); } else if (p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS && (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION || comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED)) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_INUSE); return (0); } else if (p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS && comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_REQUIRES_NO_ENCRYPTION); return (0); } /* Workaround * * Inventec 5441/Dell Xanadu II returns * IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE, so we'll assume that * return code always means we need encryption. */ else if (p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS && (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION || comp_code == IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE)) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_REQUIRES_ENCRYPTION); return (0); } else if (p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS && comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_UNAVAILABLE); return (0); } else if (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS && (comp_code == IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER || comp_code == IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT)) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); return (0); } if (comp_code == IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PRIVILEGE_LEVEL_INSUFFICIENT); return (0); } } ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_ERROR); return (0); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_packet.h0000644002055400205540000000654513527331637022327 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_packet.h,v 1.13 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_PACKET_H #define IPMICONSOLE_PACKET_H #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" fiid_field_t *ipmiconsole_packet_template (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); fiid_obj_t ipmiconsole_packet_object (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); int ipmiconsole_packet_dump (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, const void *buf, unsigned int buflen); int ipmiconsole_packet_dump_unknown (ipmiconsole_ctx_t c, const void *buf, unsigned int buflen); int ipmiconsole_ipmi_packet_assemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p, void *buf, unsigned int buflen); int ipmiconsole_sol_packet_assemble (ipmiconsole_ctx_t c, uint8_t packet_sequence_number, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, uint8_t generate_break, void *character_data, unsigned int character_data_len, void *buf, unsigned int buflen); /* returns 1 on successful parse, 0 if not, -1 on error */ int ipmiconsole_packet_unassemble (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t *p, const void *buf, unsigned int buflen); int ipmiconsole_calculate_errnum (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p); #endif /* IPMICONSOLE_PACKET_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_processing.c0000644002055400205540000043317013527331637023225 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_processing.c,v 1.112 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_processing.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_checks.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_engine.h" #include "ipmiconsole_packet.h" #include "scbuf.h" #include "freeipmi-portability.h" #include "list.h" #include "secure.h" #include "timeval.h" /* * Returns 0 on success * Returns -1 on error */ static int _send_ipmi_packet (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { uint8_t pkt[IPMICONSOLE_PACKET_BUFLEN]; int n, pkt_len, dropped = 0; struct timeval *t; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (IPMICONSOLE_PACKET_TYPE_REQUEST (p)); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; if (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) { c->session.requester_sequence_number++; if (c->session.requester_sequence_number > IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX) c->session.requester_sequence_number = 0; } /* Note: Message Tags are 1 byte, so wraparounds are automatic */ if (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1 || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) c->session.message_tag++; if (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) { /* Sequence Numbers of 0 are considered special by IPMI 2.0 */ c->session.session_sequence_number++; if (!(c->session.session_sequence_number)) c->session.session_sequence_number++; } if ((pkt_len = ipmiconsole_ipmi_packet_assemble (c, p, pkt, IPMICONSOLE_PACKET_BUFLEN)) < 0) return (-1); if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) { if (ipmiconsole_packet_dump (c, p, pkt, pkt_len) < 0) return (-1); } if ((n = scbuf_write (c->connection.ipmi_to_bmc, pkt, pkt_len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != pkt_len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; pkt_len=%d", n, pkt_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (p != IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ) t = &(c->session.last_ipmi_packet_sent); else t = &(c->session.last_keepalive_packet_sent); if (gettimeofday (t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _send_sol_packet_with_character_data (ipmiconsole_ctx_t c, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count, int is_retransmission) { uint8_t pkt[IPMICONSOLE_PACKET_BUFLEN]; int n, pkt_len, dropped = 0; int rv = -1; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; /* * Notes: The IPMI session sequence number should be incremented. Since * the BMC accepts packets in a window. But the SOL packet sequence number * should not be incremented on a retransmission. */ /* Sequence Numbers of 0 are considered special by IPMI 2.0 */ c->session.session_sequence_number++; if (!(c->session.session_sequence_number)) c->session.session_sequence_number++; if (!is_retransmission) { int max_character_send_size; c->session.sol_input_packet_sequence_number++; if (c->session.sol_input_packet_sequence_number > IPMI_SOL_PACKET_SEQUENCE_NUMBER_MAX) /* Sequence number 0 is special, so start at 1 */ c->session.sol_input_packet_sequence_number = 1; if (!scbuf_is_empty (c->connection.console_remote_console_to_bmc)) { /* * If a serial break has occurred, we want to generate the break * after all input before the break has been dealt with and none * after the break have been sent. */ if (!c->session.console_remote_console_to_bmc_bytes_before_break) max_character_send_size = c->session.max_sol_character_send_size; else max_character_send_size = c->session.console_remote_console_to_bmc_bytes_before_break; /* Notes: Since c->session.console_remote_console_to_bmc is a circular buffer, it may * not be apparent why 'c->session.sol_input_character_data' and * 'c->session.sol_input_character_data_len' is necessary. * * The reason it is needed is because the user may have typed * additional info, thus increasing the amount of data in * 'c->session.console_remote_console_to_bmc'. We need to assure that if there is * an SOL retransmission, the character data it is sending is * perfectly identical. */ if ((n = scbuf_peek (c->connection.console_remote_console_to_bmc, c->session.sol_input_character_data, max_character_send_size)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_peek: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } c->session.sol_input_character_data_len = n; } else c->session.sol_input_character_data_len = 0; } if ((pkt_len = ipmiconsole_sol_packet_assemble (c, c->session.sol_input_packet_sequence_number, packet_ack_nack_sequence_number, accepted_character_count, 0, c->session.sol_input_character_data, c->session.sol_input_character_data_len, pkt, IPMICONSOLE_PACKET_BUFLEN)) < 0) goto cleanup; if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) { if (ipmiconsole_packet_dump (c, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ, pkt, pkt_len) < 0) goto cleanup; } if ((n = scbuf_write (c->connection.ipmi_to_bmc, pkt, pkt_len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (n != pkt_len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; pkt_len=%d", n, pkt_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (gettimeofday (&(c->session.last_sol_input_packet_sent), NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); goto cleanup; } c->session.sol_input_waiting_for_ack++; rv = 0; cleanup: return (rv); } /* * Returns 0 on success * Returns -1 on error */ static int _send_sol_packet_ack_only (ipmiconsole_ctx_t c, uint8_t packet_ack_nack_sequence_number, uint8_t accepted_character_count) { uint8_t pkt[IPMICONSOLE_PACKET_BUFLEN]; int n, pkt_len, dropped = 0; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; /* * Notes: The IPMI session sequence number should be incremented. Since * the BMC accepts packets in a window. But the SOL packet sequence number * should not be incremented on a retransmission. */ /* Sequence Numbers of 0 are considered special by IPMI 2.0 */ c->session.session_sequence_number++; if (!(c->session.session_sequence_number)) c->session.session_sequence_number++; if ((pkt_len = ipmiconsole_sol_packet_assemble (c, 0, packet_ack_nack_sequence_number, accepted_character_count, 0, NULL, 0, pkt, IPMICONSOLE_PACKET_BUFLEN)) < 0) return (-1); if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) { if (ipmiconsole_packet_dump (c, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ, pkt, pkt_len) < 0) return (-1); } if ((n = scbuf_write (c->connection.ipmi_to_bmc, pkt, pkt_len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != pkt_len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; pkt_len=%d", n, pkt_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _send_sol_packet_generate_break (ipmiconsole_ctx_t c, int is_retransmission) { uint8_t pkt[IPMICONSOLE_PACKET_BUFLEN]; int n, pkt_len, dropped = 0; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; /* * Notes: The IPMI session sequence number should be incremented. Since * the BMC accepts packets in a window. But the SOL packet sequence number * should not be incremented on a retransmission. */ /* Sequence Numbers of 0 are considered special by IPMI 2.0 */ c->session.session_sequence_number++; if (!(c->session.session_sequence_number)) c->session.session_sequence_number++; if (!is_retransmission) { c->session.sol_input_packet_sequence_number++; if (c->session.sol_input_packet_sequence_number > IPMI_SOL_PACKET_SEQUENCE_NUMBER_MAX) /* Sequence number 0 is special, so start at 1 */ c->session.sol_input_packet_sequence_number = 1; /* achu: For the time being we will not send data along with a break */ c->session.sol_input_character_data_len = 0; } if ((pkt_len = ipmiconsole_sol_packet_assemble (c, c->session.sol_input_packet_sequence_number, 0, 0, IPMI_SOL_GENERATE_BREAK, c->session.sol_input_character_data, c->session.sol_input_character_data_len, pkt, IPMICONSOLE_PACKET_BUFLEN)) < 0) return (-1); if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) { if (ipmiconsole_packet_dump (c, IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RQ, pkt, pkt_len) < 0) return (-1); } if ((n = scbuf_write (c->connection.ipmi_to_bmc, pkt, pkt_len, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != pkt_len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; pkt_len=%d", n, pkt_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (gettimeofday (&(c->session.last_sol_input_packet_sent), NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } c->session.sol_input_waiting_for_ack++; c->session.sol_input_waiting_for_break_ack++; return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _receive_ipmi_packet_data_reset (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); c->session.retransmission_count = 0; c->session.workaround_retransmission_count = 0; c->session.errors_count = 0; c->session.session_sequence_number_errors_count = 0; if (gettimeofday (&(c->session.last_ipmi_packet_received), NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _receive_sol_packet_data_reset (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (_receive_ipmi_packet_data_reset (c) < 0) return (-1); if (gettimeofday (&(c->session.last_sol_packet_received), NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _receive_keepalive_packet_data_reset (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (gettimeofday (&(c->session.last_ipmi_packet_received), NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (0); } /* * Returns 1 if packet received * Returns 0 if no packet received (whether real or dropped due to packet errors) * Returns -1 on error (whether system error or IPMI errors) */ static int _receive_packet (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t *p) { uint8_t pkt[IPMICONSOLE_PACKET_BUFLEN]; int ret, pkt_len, dropped, rv = -1; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (p); if ((pkt_len = scbuf_peek (c->connection.ipmi_from_bmc, pkt, IPMICONSOLE_PACKET_BUFLEN)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_peek: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!pkt_len) return (0); if ((dropped = scbuf_drop (c->connection.ipmi_from_bmc, pkt_len)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_drop: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (dropped != pkt_len) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_drop: invalid bytes dropped: dropped=%d pkt_len=%d", dropped, pkt_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if ((ret = ipmiconsole_packet_unassemble (c, p, pkt, pkt_len)) < 0) goto cleanup; if (!ret) { /* Assume it's an error if the packet is unparseable, not * expected, etc., but don't exit */ if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) ipmiconsole_packet_dump_unknown (c, pkt, pkt_len); c->session.errors_count++; rv = 0; goto cleanup; } assert (IPMICONSOLE_PACKET_TYPE_RESPONSE (*p)); if (c->config.debug_flags & IPMICONSOLE_DEBUG_IPMI_PACKETS) /* It's debugging, who cares if the call succeeds or fails */ ipmiconsole_packet_dump (c, *p, pkt, pkt_len); if (*p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS) { /* Notes: These checks are for IPMI 1.5 pre-session packets, so * there is no authentication code, session sequence number, or * session id to check. */ if ((ret = ipmiconsole_check_checksum (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_network_function (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_command (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_requester_sequence_number (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } /* If everything passes except the completion code, then there * is an IPMI error. */ if ((ret = ipmiconsole_check_completion_code (c, *p)) < 0) goto cleanup; if (!ret) { _receive_ipmi_packet_data_reset (c); ipmiconsole_calculate_errnum (c, *p); goto cleanup; } /* Check for valid packet after completion code */ if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE || *p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2 || *p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) { /* Notes: These are IPMI 2.0 session-setup packets, so * a number of typical checks are not required. */ /* This check isn't really necessary due to the way the * unassemble function has been programmed */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_message_tag (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } /* I don't think there is a guarantee the other data * (authentication keys, session id's, etc.) will be valid in * the responses if the status code contains an error. So * unlike the IPMI 1.5 pre-session or IPMI 2.0 session checks, * we check the status code prior to checking remaining data */ if ((ret = ipmiconsole_check_rmcpplus_status_code (c, *p)) < 0) goto cleanup; if (!ret) { _receive_ipmi_packet_data_reset (c); ipmiconsole_calculate_errnum (c, *p); goto cleanup; } /* Check for valid packet after status code */ if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if (*p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE) { if ((ret = ipmiconsole_check_open_session_response_privilege (c, *p)) < 0) goto cleanup; if (!ret) { _receive_ipmi_packet_data_reset (c); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2) { if ((ret = ipmiconsole_check_rakp_2_key_exchange_authentication_code (c, *p)) < 0) goto cleanup; if (!ret) { _receive_ipmi_packet_data_reset (c); /* IPMI Compliance Issue * * On some systems, password could be correct, but * privilege is too high. The error is b/c the * privilege error is not handled properly in the open * session stage (i.e. they tell me I can authenticate * at a high privilege level, that in reality is not * allowed). Dunno how to deal with this. */ ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_PASSWORD_INVALID); goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4) { if ((ret = ipmiconsole_check_rakp_4_integrity_check_value (c, *p)) < 0) goto cleanup; if (!ret) { _receive_ipmi_packet_data_reset (c); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_K_G_INVALID); goto cleanup; } } } else if (*p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS || *p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS || *p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS || *p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS) { /* This check isn't really necessary due to the way the * unassemble function has been programmed */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_payload_pad (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_integrity_pad (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_checksum (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_authentication_code (c, *p, pkt, pkt_len)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_outbound_sequence_number (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_network_function (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_command (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_requester_sequence_number (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } /* If everything passes except the completion code, then there * is an IPMI error. */ if ((ret = ipmiconsole_check_completion_code (c, *p)) < 0) goto cleanup; if (!ret) { if (*p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS) { /* Special case: we have raced with another IPMI session. * * See comments in _process_ctx(). */ uint8_t comp_code; uint64_t val; if (FIID_OBJ_GET (c->connection.obj_activate_payload_rs, "comp_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (c->connection.obj_activate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION || comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED || comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED || comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION || comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION) goto accept_packet; } _receive_ipmi_packet_data_reset (c); ipmiconsole_calculate_errnum (c, *p); goto cleanup; } /* Check for valid packet after completion code */ if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS) { /* This check isn't really necessary due to the way the * unassemble function has been programmed */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_payload_pad (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_integrity_pad (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_authentication_code (c, *p, pkt, pkt_len)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_outbound_sequence_number (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; c->session.session_sequence_number_errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } /* Check for valid packet after completion code */ if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS) { /* We do not care about the validity of most of this packet. If * we get it, it means we kept the session alive. We will still * call the check functions so debugging will be logged * appropriately and outbound sequence number checks can move * the window along appropriately. */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_payload_pad (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_integrity_pad (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_checksum (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_authentication_code (c, *p, pkt, pkt_len)) < 0) goto cleanup; if ((ret = ipmiconsole_check_outbound_sequence_number (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; /* This is one check we do care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_network_function (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_command (c, *p)) < 0) goto cleanup; /* This is one check we do care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_requester_sequence_number (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_completion_code (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; } else if (*p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS) { /* Generally, we *do* care about the validity of this packet, * with the exception of when we are closing the session. */ /* This check isn't really necessary due to the way the * unassemble function has been programmed */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_payload_pad (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_integrity_pad (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_checksum (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_authentication_code (c, *p, pkt, pkt_len)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_outbound_sequence_number (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; /* This is one check we always care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_network_function (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_command (c, *p)) < 0) goto cleanup; /* This is one check we always care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_requester_sequence_number (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } /* If everything passes except the completion code, then there * is an IPMI error. */ if ((ret = ipmiconsole_check_completion_code (c, *p)) < 0) goto cleanup; if (!ret) { uint8_t comp_code; uint64_t val; if (c->session.try_new_port_flag) { /* XXX: Come back later when you learn more about this * particular behavior. The specification is unclear. */ /* If we're trying a different port, this call may or may * not succeed. If the completion code is invalid, it's ok. */ goto accept_packet; } /* Special case: If the payload is already * deactivated/disabled, who cares. Either we are closing * the session and we don't care, or we are trying to * deactivate a payload that was earlier detected as being * activated but (perhaps due to a race) is not anymore. */ if (FIID_OBJ_GET (c->connection.obj_deactivate_payload_rs, "comp_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (c->connection.obj_deactivate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_ALREADY_DEACTIVATED || comp_code == IPMI_COMP_CODE_DEACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED) goto accept_packet; _receive_ipmi_packet_data_reset (c); ipmiconsole_calculate_errnum (c, *p); goto cleanup; } /* Check for valid packet after completion code */ if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; if (!c->session.close_session_flag && !ret) { c->session.errors_count++; rv = 0; goto cleanup; } } else if (*p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS) { /* Generally we do not care about the validity of this packet * b/c we are closing the session. We will still call the check * functions so debugging will be logged appropriately and * outbound sequence number checks can move the window along * appropriately. But if there is any issue along the way, goto * cleanup and close the session anyways. */ if ((ret = ipmiconsole_check_payload_type (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_payload_pad (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_integrity_pad (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_checksum (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_authentication_code (c, *p, pkt, pkt_len)) < 0) goto cleanup; if ((ret = ipmiconsole_check_outbound_sequence_number (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_session_id (c, *p)) < 0) goto cleanup; /* This is one check we do care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_network_function (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_command (c, *p)) < 0) goto cleanup; /* This is one check we do care about */ if (!ret) { c->session.errors_count++; rv = 0; goto cleanup; } if ((ret = ipmiconsole_check_requester_sequence_number (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_completion_code (c, *p)) < 0) goto cleanup; if ((ret = ipmiconsole_check_packet (c, *p)) < 0) goto cleanup; } else { IPMICONSOLE_CTX_DEBUG (c, ("invalid packet type: %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } accept_packet: /* Special case for keepalive and sol data */ if (*p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS) { if (_receive_keepalive_packet_data_reset (c) < 0) goto cleanup; } else if (*p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS) { if (_receive_sol_packet_data_reset (c) < 0) goto cleanup; } else { if (_receive_ipmi_packet_data_reset (c) < 0) goto cleanup; } rv = 1; cleanup: return (rv); } /* * Returns 1 if close session has been initiated and packet sent * Returns 0 if close session has not been initiated or packet not sent * Returns -1 on error or to quit */ static int _close_session (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.close_session_flag); /* * Close the session differently depending on the state of the session */ if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_START || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT) { /* Session has not started yet, so we can inform the state * machine to just quit */ return (-1); } /* * else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT) * * The session may or may not be up yet, depending on if the RAKP Message 4 * response has arrived. * * Code logic in _ipmi_retransmission_timeout() and _process_ctx() * will handle this situation. */ else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT) { /* Session is up, but the SOL payload is not activated, so close the session */ if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (1); } /* else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT) * * The SOL payload activation may or may not be up yet, * depending on if the Activate Payload response has arrived. * * Code logic in _ipmi_retransmission_timeout() and _process_ctx() * will handle this situation. */ else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) { /* The SOL session is setup, so deactivate the payload first */ if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } /* else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT * || c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT) * * We're happily on our way to closing, so let the state machine finish up */ return (0); } /* * Returns 1 if close session has been initiated and packet sent * Returns 0 if close session has not been initiated or packet not sent * Returns -1 on error or to quit */ static int _check_close_session (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (!c->session.close_session_flag) return (0); return (_close_session (c)); } /* * Returns 1 if session timed out * Returns 0 if session did not time out * Returns -1 on error */ static int _session_timeout (ipmiconsole_ctx_t c) { struct timeval current; struct timeval timeout; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); timeval_add_ms (&(c->session.last_ipmi_packet_received), c->config.session_timeout_len, &timeout); if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (timeval_gt (¤t, &timeout)); } /* * Returns 1 if packet timed out and packet is constructed * Returns 0 if packet did not time out * Returns -1 on error */ static int _ipmi_retransmission_timeout (ipmiconsole_ctx_t c) { struct timeval current; struct timeval timeout; unsigned int retransmission_timeout_len; unsigned int retransmission_timeout_multiplier; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state != IPMICONSOLE_PROTOCOL_STATE_START); assert (c->session.protocol_state != IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); if (c->config.retransmission_backoff_count) retransmission_timeout_multiplier = (c->session.retransmission_count / c->config.retransmission_backoff_count) + 1; else retransmission_timeout_multiplier = 1; retransmission_timeout_len = c->config.retransmission_timeout_len * retransmission_timeout_multiplier; timeval_add_ms (&(c->session.last_ipmi_packet_sent), retransmission_timeout_len, &timeout); if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (!timeval_gt (¤t, &timeout)) return (0); c->session.retransmission_count++; if (c->session.retransmission_count > c->config.maximum_retransmission_count) { IPMICONSOLE_CTX_DEBUG (c, ("closing session due to excessive retransmissions")); if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CONNECTION_TIMEOUT); else ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS_SENT); return (-1); } #if 0 IPMICONSOLE_CTX_DEBUG (c, ("retransmission: retransmission_count = %d; maximum_retransmission_count = %d; protocol_state = %d", c->session.retransmission_count, c->config.maximum_retransmission_count, c->session.protocol_state)); #endif /* Note: * * With the exception of close-session conditions, protocol * states do not have to be changed. These are retransmissions, * so the protocol state can stay the same. */ if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT) { if (c->session.close_session_flag) { /* We assume the RAKP 4 response message was lost. So the * IPMI session was never established. We just return (-1) so the * session can be closed. */ return (-1); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT) { if (c->session.close_session_flag) { /* We assume the Activate Payload response message was * lost. So the IPMI session was established but the * payload session wasn't. Therefore, we send the close * session packet to begin the teardown. */ if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT) { if (c->session.close_session_flag) { /* If we timeout on a close session packet and truly * wish to close the session, don't bother * retransmitting. The previous close session response * may have been dropped by the network. If that's the * case, any retransmitted close session responses will * fail b/c the session is already done. */ c->session.close_timeout_flag++; } } else { IPMICONSOLE_CTX_DEBUG (c, ("invalid protocol_state: %d", c->session.protocol_state)); return (-1); } return (1); } /* * Returns 1 if sol packet timed out and packet is constructed * Returns 0 if sol packet did not time out * Returns -1 on error */ static int _sol_retransmission_timeout (ipmiconsole_ctx_t c, int *dont_deactivate_flag) { struct timeval current; struct timeval timeout; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); assert (dont_deactivate_flag); (*dont_deactivate_flag) = 0; timeval_add_ms (&(c->session.last_sol_input_packet_sent), c->config.retransmission_timeout_len, &timeout); if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (!timeval_gt (¤t, &timeout)) return (0); c->session.retransmission_count++; if (c->session.retransmission_count > c->config.maximum_retransmission_count) { /* Under this scenario, we assume that SOL is not functional but * IPMI is fine. While it is unknown why SOL is not functional, * there is a good chance it is because the SOL session has been * stolen but we did not receive a flag indicating SOL is * deactivating. We don't want to deactivate the SOL payload, * because that would kill the new session's SOL. */ /* Workaround * * Discovered on Intel Windmill/Quanta Winterfell/Wiwynn Windmill * * BMC gets stuck. This seems to get it unstuck. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INCREMENT_SOL_PACKET_SEQUENCE) { c->session.workaround_retransmission_count++; if (c->session.workaround_retransmission_count < c->config.maximum_retransmission_count) { /* Only increment at most once */ if (c->session.workaround_retransmission_count == 1) { IPMICONSOLE_CTX_DEBUG (c, ("incrementing sol packet sequence number to workaround issue")); c->session.sol_input_packet_sequence_number++; if (c->session.sol_input_packet_sequence_number > IPMI_SOL_PACKET_SEQUENCE_NUMBER_MAX) /* Sequence number 0 is special, so start at 1 */ c->session.sol_input_packet_sequence_number = 1; } goto send_sol_packet; } } (*dont_deactivate_flag) = 1; IPMICONSOLE_CTX_DEBUG (c, ("closing session due to excessive sol retransmissions")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS_SENT); return (-1); } #if 0 IPMICONSOLE_CTX_DEBUG (c, ("sol retransmission: retransmission_count = %d; maximum_retransmission_count = %d; protocol_state = %d", c->session.retransmission_count, c->config.maximum_retransmission_count, c->session.protocol_state)); #endif send_sol_packet: if (!c->session.sol_input_waiting_for_break_ack) { /* Notes: If the previous sol transmission included an ACK, * it will be lost here. The BMC is responsible for retransmitting * character data for any data it was not ACKed. */ if (_send_sol_packet_with_character_data (c, 0, 0, 1) < 0) return (-1); } else { if (_send_sol_packet_generate_break (c, 1) < 0) return (-1); } return (1); } /* * Returns 1 if keepalive is necessary * Returns 0 if keepalive is not necessary * Returns -1 on error */ static int _keepalive_is_necessary (ipmiconsole_ctx_t c) { struct timeval current; struct timeval timeout; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); timeval_add_ms (&(c->session.last_ipmi_packet_received), c->config.keepalive_timeout_len, &timeout); if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (timeval_gt (¤t, &timeout)) return (1); else return (0); } /* * Returns 1 if keepalive timed out and packet is constructed * Returns 0 if keepalive did not time out * Returns -1 on error */ static int _keepalive_timeout (ipmiconsole_ctx_t c) { int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); /* * Timeout logic will send a keepalive packet if: * * A) If it is required * B) If one hasn't been sent in keepalive timeout time period */ if ((rv = _keepalive_is_necessary (c)) < 0) return (-1); if (rv) { struct timeval current; struct timeval timeout; if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } timeval_add_ms (&(c->session.last_keepalive_packet_sent), c->config.retransmission_keepalive_timeout_len, &timeout); if (timeval_gt (¤t, &timeout)) { /* Note that the protocol_state stays in SOL_SESSION */ if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RQ) < 0) return (-1); return (1); } } return (0); } /* * Returns 1 if serial keepalive is necessary * Returns 0 if serial keepalive is not necessary * Returns -1 on error */ static int _serial_keepalive_is_necessary (ipmiconsole_ctx_t c) { struct timeval current; struct timeval timeout; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); assert (c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE || c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY); timeval_add_ms (&(c->session.last_sol_packet_received), c->config.session_timeout_len, &timeout); if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } if (timeval_gt (¤t, &timeout)) return (1); else return (0); } /* * Returns 1 if serial keepalive timed out and packet is constructed * Returns 0 if serial keepalive did not time out * Returns -1 on error */ static int _serial_keepalive_timeout (ipmiconsole_ctx_t c) { int rv; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); assert (c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE || c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY); if ((rv = _serial_keepalive_is_necessary (c)) < 0) return (-1); if (rv) { /* Shouldn't reach this point unless the following is true */ if (scbuf_is_empty (c->connection.console_remote_console_to_bmc) && !c->session.break_requested && !c->session.console_remote_console_to_bmc_bytes_before_break) { struct timeval current; struct timeval timeout; if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } timeval_add_ms (&(c->session.last_sol_input_packet_sent), c->config.retransmission_timeout_len, &timeout); if (!timeval_gt (¤t, &timeout)) return (0); /* else send a keepalive */ if (c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE) { char buf[1] = { '\0' }; int secure_malloc_flag; int dropped = 0; int n; secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; if ((n = scbuf_write (c->connection.console_remote_console_to_bmc, buf, 1, &dropped, secure_malloc_flag)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (n != 1) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } } if (_send_sol_packet_with_character_data (c, 0, 0, 0) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } return (1); } } return (0); } /* * Return 0 if IPMI 2.0 is supported * Return -1 IPMI 2.0 is not supported or error */ static int _check_for_ipmi_2_0_support (ipmiconsole_ctx_t c) { int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT); if ((ret = ipmi_check_authentication_capabilities_ipmi_2_0 (c->connection.obj_authentication_capabilities_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_check_authentication_capabilities_ipmi_2_0: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!ret) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_IPMI_2_0_UNAVAILABLE); return (-1); } return (0); } /* * Return 0 if authentication is supported * Return -1 if authentication is not supported or error */ static int _check_for_authentication_support (ipmiconsole_ctx_t c) { char *tmp_username_ptr = NULL; char *tmp_password_ptr = NULL; void *tmp_k_g_ptr = NULL; int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT); /* IPMI Workaround * * Discovered on an ASUS P5M2 motherboard. * * Also seen on Intel X38ML motherboard. * * The ASUS motherboard reports incorrect settings of anonymous * vs. null vs non-null username capabilities. The workaround is to * skip all these checks. * * Discovered on an ASUS P5MT-R motherboard * * K_g status is reported incorrectly too. Again, skip the checks. */ if (!(c->config.workaround_flags & IPMICONSOLE_WORKAROUND_AUTHENTICATION_CAPABILITIES)) { if (strlen (c->config.username)) tmp_username_ptr = c->config.username; if (strlen (c->config.password)) tmp_password_ptr = c->config.password; if ((ret = ipmi_check_authentication_capabilities_username (tmp_username_ptr, tmp_password_ptr, c->connection.obj_authentication_capabilities_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_check_authentication_capabilities_username: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!ret) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_USERNAME_INVALID); return (-1); } if (c->config.k_g_len) tmp_k_g_ptr = c->config.k_g; if ((ret = ipmi_check_authentication_capabilities_k_g (tmp_k_g_ptr, c->connection.obj_authentication_capabilities_rs)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_check_authentication_capabilities_k_g: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (!ret) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_K_G_INVALID); return (-1); } } return (0); } /* * Return 0 on success * Return -1 on error */ static int _calculate_cipher_keys (ipmiconsole_ctx_t c) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; char *username; unsigned int username_len; char *password; unsigned int password_len; void *k_g; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT); assert (c->session.sik_key_ptr == c->session.sik_key); assert (c->session.sik_key_len == IPMI_MAX_SIK_KEY_LENGTH); assert (c->session.integrity_key_ptr == c->session.integrity_key); assert (c->session.integrity_key_len == IPMI_MAX_INTEGRITY_KEY_LENGTH); assert (c->session.confidentiality_key_ptr == c->session.confidentiality_key); assert (c->session.confidentiality_key_len == IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH); /* IPMI Workaround * * Intel IPMI 2.0 implementations pad their usernames. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (strlen (c->config.username)) strcpy (username_buf, c->config.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { if (strlen (c->config.username)) username = c->config.username; else username = NULL; username_len = (username) ? strlen (username) : 0; } if (strlen (c->config.password)) password = c->config.password; else password = NULL; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround * * Intel IPMI 2.0 implementations improperly calculate HMAC-MD5-128 hashes * when the passwords are > 16 bytes long. The BMCs probably assume * all keys are <= 16 bytes in length. So we have to adjust. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION && c->config.authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; if (c->config.k_g_len) k_g = c->config.k_g; else k_g = NULL; if ((managed_system_random_number_len = fiid_obj_get_data (c->connection.obj_rakp_message_2, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (c->connection.obj_rakp_message_2))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (managed_system_random_number_len != IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("invalid managed_system_random_number_len = %d", managed_system_random_number_len)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } if (ipmi_calculate_rmcpplus_session_keys (c->config.authentication_algorithm, c->config.integrity_algorithm, c->config.confidentiality_algorithm, password, password_len, k_g, (k_g) ? c->config.k_g_len : 0, c->session.remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH, c->session.name_only_lookup, c->config.privilege_level, username, username_len, &(c->session.sik_key_ptr), &(c->session.sik_key_len), &(c->session.integrity_key_ptr), &(c->session.integrity_key_len), &(c->session.confidentiality_key_ptr), &(c->session.confidentiality_key_len)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("ipmi_calculate_rmcpplus_session_keys: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return (0); } /* * Return 1 if SOL is supported * Return 0 if SOL is not supported * Return -1 on error */ static int _check_sol_supported (ipmiconsole_ctx_t c) { uint8_t standard_payload_type_1_supported; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT); /* * Note: Payload Type #1 is the SOL Payload Type. See IPMI 2.0 Spec * Section 13.27.3 and Table 13-16. */ if (FIID_OBJ_GET (c->connection.obj_get_channel_payload_support_rs, "standard_payload_type_1_supported", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'standard_payload_type_1_supported': %s", fiid_obj_errormsg (c->connection.obj_get_channel_payload_support_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } standard_payload_type_1_supported = val; return (standard_payload_type_1_supported ? 1 : 0); } /* * Return 1 if instance activated * Return 0 if instance not activated * Return -1 on error */ static int _check_sol_instance_activated (ipmiconsole_ctx_t c, uint8_t instance) { char fieldstr[64]; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT); assert (!c->session.deactivate_payload_instances); assert (!c->session.deactivate_payload_instances_and_try_again_flag); snprintf (fieldstr, 64, "instance_%d", instance); if (FIID_OBJ_GET (c->connection.obj_get_payload_activation_status_rs, fieldstr, &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: '%s': %s", fieldstr, fiid_obj_errormsg (c->connection.obj_get_payload_activation_status_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } return ((int)val); } /* * Return 1 if SOL is activated * Return 0 if SOL is not activated * Return -1 on error */ static int _check_sol_activated (ipmiconsole_ctx_t c) { uint64_t val; unsigned int i; int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT); assert (!c->session.deactivate_payload_instances); assert (!c->session.deactivate_payload_instances_and_try_again_flag); /* May not be 0, see notes in _process_ctx() */ if (c->session.sol_instance_capacity || c->session.sol_instances_activated_count || c->session.sol_instances_deactivated_count) { c->session.sol_instance_capacity = 0; memset (c->session.sol_instances_activated, '\0', IPMI_INSTANCES_ACTIVATED_LENGTH); c->session.sol_instances_activated_count = 0; c->session.sol_instances_deactivated_count = 0; } if (FIID_OBJ_GET (c->connection.obj_get_payload_activation_status_rs, "instance_capacity", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'instance_capacity': %s", fiid_obj_errormsg (c->connection.obj_get_payload_activation_status_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } c->session.sol_instance_capacity = val; /* IPMI Workaround * * Discovered on Dell Poweredge M605, Dell Poweredge M610, and Dell * Poweredge M915 * * The sol_instance_capacity is always 0. We will make the * assumption that 0 means 1, or in other words, the vendor simply * does not want to support multiple payload instances. */ if (!c->session.sol_instance_capacity) c->session.sol_instance_capacity = 1; if (c->session.sol_instance_capacity > IPMI_INSTANCES_ACTIVATED_LENGTH) { IPMICONSOLE_CTX_DEBUG (c, ("invalid instance capacity: %d", c->session.sol_instance_capacity)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_IMPLEMENTATION); return (-1); } if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY && c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES) { for (i = 0; i < c->session.sol_instance_capacity; i++) { if ((ret = _check_sol_instance_activated (c, i + 1)) < 0) return (-1); if (ret) { c->session.sol_instances_activated[c->session.sol_instances_activated_count] = i+1; c->session.sol_instances_activated_count++; } } } else { if ((ret = _check_sol_instance_activated (c, c->config.sol_payload_instance)) < 0) return (-1); if (ret) { c->session.sol_instances_activated[c->session.sol_instances_activated_count] = c->config.sol_payload_instance; c->session.sol_instances_activated_count++; } } if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE && c->session.sol_instances_activated_count) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_INUSE); return (-1); } return (c->session.sol_instances_activated_count ? 1 : 0); } /* * Return 1 if SOL is activated * Return 0 if SOL is not activated * Return -1 on error */ static int _check_sol_activated2 (ipmiconsole_ctx_t c) { uint64_t val; uint8_t comp_code; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT); if (FIID_OBJ_GET (c->connection.obj_activate_payload_rs, "comp_code", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (c->connection.obj_activate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } comp_code = val; if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ALREADY_ACTIVE_ON_ANOTHER_SESSION) { if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_INUSE); return (-1); } return (1); } if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_ACTIVATION_LIMIT_REACHED) { IPMICONSOLE_CTX_DEBUG (c, ("SOL limit reached")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_BUSY); return (-1); } if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_PAYLOAD_TYPE_IS_DISABLED) { IPMICONSOLE_CTX_DEBUG (c, ("SOL unavailable")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_UNAVAILABLE); return (-1); } if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITH_ENCRYPTION) { IPMICONSOLE_CTX_DEBUG (c, ("SOL requires no encryption")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_REQUIRES_NO_ENCRYPTION); return (-1); } if (comp_code == IPMI_COMP_CODE_ACTIVATE_PAYLOAD_CANNOT_ACTIVATE_PAYLOAD_WITHOUT_ENCRYPTION) { IPMICONSOLE_CTX_DEBUG (c, ("SOL requires encryption")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_REQUIRES_ENCRYPTION); return (-1); } return (0); } /* * Return 1 if payload sizes are ok * Return 0 if payload sizes don't make any sense * Return -1 on error */ static int _check_payload_sizes_legitimate (ipmiconsole_ctx_t c) { int sol_hdr_len; uint64_t val; uint16_t max_inbound_payload_size; uint16_t max_outbound_payload_size; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT); /* In the IPMI 2.0 Spec, Section 15.9, Table 15-2, you can see that * the accepted character count is 1 byte. Therefore, the maximum * number of serial characters that should be sent in one packet is * 255. Adding in the headers of a SOL payload packet (packet * sequence number = 1 byte, ack/nack flag = 1 byte, accepted * character count = 1 byte, operation bits = 1 byte), the * in/outbound payload sizes shouldn't be greater than 259. The * minimum must be the SOL header bytes plus 1 character byte, which * is 5. */ if (FIID_OBJ_GET (c->connection.obj_activate_payload_rs, "inbound_payload_size", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'inbound_payload_size': %s", fiid_obj_errormsg (c->connection.obj_activate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } max_inbound_payload_size = val; if (FIID_OBJ_GET (c->connection.obj_activate_payload_rs, "outbound_payload_size", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'outbound_payload_size': %s", fiid_obj_errormsg (c->connection.obj_activate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } max_outbound_payload_size = val; if ((sol_hdr_len = fiid_template_block_len_bytes (tmpl_sol_payload_data, "packet_sequence_number", "operation_status")) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_template_len_bytes: field_start=%s; field_end=%s; %s", "packet_sequence_number", "operation_status", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* IPMI Workaround * * Discovered on an ASUS P5M2 motherboard. * * Also seen on Intel X38ML motherboard. * * Also seen on Inventec 5441/Dell Xanadu II motherboard. * * Also seen on Supermicro X8DTH motherboard. * * Also seen on Supermicro X8DTH-iF motherboard. * * Motherboard reports incorrect payload sizes. Skip the check and * assume a reasonable size. * */ if (!(c->config.workaround_flags & IPMICONSOLE_WORKAROUND_IGNORE_SOL_PAYLOAD_SIZE)) { if (max_inbound_payload_size >= IPMICONSOLE_MIN_CHARACTER_DATA + sol_hdr_len && max_inbound_payload_size <= IPMICONSOLE_MAX_CHARACTER_DATA + sol_hdr_len && max_outbound_payload_size >= IPMICONSOLE_MIN_CHARACTER_DATA + sol_hdr_len && max_outbound_payload_size <= IPMICONSOLE_MAX_CHARACTER_DATA + sol_hdr_len) { c->session.max_sol_character_send_size = max_inbound_payload_size - sol_hdr_len; return (1); } } else { /* Lets try 32, seems like a decent power of two number */ /* achu: don't assume bad endian, some vendors are just outright setting bad values */ c->session.max_sol_character_send_size = 32; return (1); } IPMICONSOLE_CTX_DEBUG (c, ("payload sizes invalid: max_inbound_payload_size=%d max_outbound_payload_size=%d", max_inbound_payload_size, max_outbound_payload_size)); return (0); } /* * Return 1 if we should try a new port * Return 0 if we should not try a new port * Return -1 on error */ static int _check_try_new_port (ipmiconsole_ctx_t c) { int16_t console_port; int16_t console_port_bad_endian; uint64_t val; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT); if (FIID_OBJ_GET (c->connection.obj_activate_payload_rs, "payload_udp_port_number", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'payload_udp_port_number': %s", fiid_obj_errormsg (c->connection.obj_activate_payload_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } console_port = val; /* IPMI Workaround * * Discovered on Supermicro X8DTH-iF * * The port is stored w/ the wrong endian. If the port is the wrong * endian, lets assume they really mean to use port 623 instead of * 28418. */ console_port_bad_endian = ((RMCP_PRIMARY_RMCP_PORT & 0x00FF) << 8) | ((RMCP_PRIMARY_RMCP_PORT & 0xFF00) >> 8); if (console_port == console_port_bad_endian) console_port = RMCP_PRIMARY_RMCP_PORT; /* Note: The state machine currently gives the new console port * only 1 try. No cycling through a bunch of port options. */ if (c->session.console_port == RMCP_PRIMARY_RMCP_PORT) { if (c->session.console_port != console_port) { /* IPMI Workaround * * Discovered on an ASUS P5MT-R motherboard. * * A non-default port is specified but we shouldn't try to connect * to it. So just skip setting the new port. */ if (!(c->config.workaround_flags & IPMICONSOLE_WORKAROUND_IGNORE_SOL_PORT)) { c->session.console_port = console_port; return (1); } } } else { if (c->session.console_port != console_port) { IPMICONSOLE_CTX_DEBUG (c, ("multiple new console ports attempted")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_IMPLEMENTATION); return (-1); } } return (0); } /* * Returns 0 on success * Returns -1 on error */ static int _sol_bmc_to_remote_console_packet (ipmiconsole_ctx_t c, int *sol_deactivating_flag) { uint8_t packet_sequence_number; uint8_t packet_ack_nack_sequence_number; uint8_t accepted_character_count; #if 0 /* See below on implementation note */ uint8_t break_condition; #endif uint8_t transmit_overrun; uint8_t sol_deactivating; uint8_t nack; uint64_t val; int n, dropped, rv = -1; int secure_malloc_flag; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION); assert (sol_deactivating_flag); (*sol_deactivating_flag) = 0; secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; /* * The packet is either an ACK to a packet we sent, or * output from the console. * * If the packet contains an ACK to a packet we sent, we must first * verify that the packet sequence number matches. If it does, we * check the accepted character count. If the accepted character * count is less than the character count we sent, we adjust, * possibly read more data from the console input and send out * another SOL input packet. * * If the packet contains character data from the BMC, we accept all * of the data and send an acknowledgement of it, possibly with * additional character data. */ if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "packet_sequence_number", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'packet_sequence_number': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } packet_sequence_number = val; if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "packet_ack_nack_sequence_number", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'packet_ack_nack_sequence_number': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } packet_ack_nack_sequence_number = val; if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "accepted_character_count", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'accepted_character_count': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } accepted_character_count = val; #if 0 /* See below on implementation note */ if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "break_condition", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'break_condition': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } break_condition = val; #endif if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "transmit_overrun", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'transmit_overrun': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } transmit_overrun = val; if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "sol_deactivating", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'sol_deactivating': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } sol_deactivating = val; if (FIID_OBJ_GET (c->connection.obj_sol_payload_data_rs, "nack", &val) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("FIID_OBJ_GET: 'nack': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } nack = val; if (sol_deactivating) { IPMICONSOLE_CTX_DEBUG (c, ("SOL Deactivating")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_STOLEN); (*sol_deactivating_flag) = 1; goto cleanup; } if (transmit_overrun) IPMICONSOLE_CTX_DEBUG (c, ("Transmit overrun. Character data lost")); /* Packet contains ACK */ if (packet_ack_nack_sequence_number && c->session.sol_input_waiting_for_ack && c->session.sol_input_packet_sequence_number == packet_ack_nack_sequence_number) { if (!c->session.sol_input_waiting_for_break_ack) { /* It's ok if it's a NACK, but we'll log for debugging anyways */ if (nack == IPMI_SOL_NACK || accepted_character_count != c->session.sol_input_character_data_len) { IPMICONSOLE_CTX_DEBUG (c, ("SOL packet NACKED: accepted_character_count: accepted_character_count = %d, c->session.sol_input_character_data_len = %d\n", accepted_character_count, c->session.sol_input_character_data_len)); } if (accepted_character_count > c->session.sol_input_character_data_len) { /* Ummm, We'll assume its wrong and just lessen the * accepted character count??? */ IPMICONSOLE_CTX_DEBUG (c, ("Unexpected accepted_character_count: accepted_character_count = %d, c->session.sol_input_character_data_len = %d\n", accepted_character_count, c->session.sol_input_character_data_len)); accepted_character_count = c->session.sol_input_character_data_len; } if ((n = scbuf_drop (c->connection.console_remote_console_to_bmc, accepted_character_count)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_drop: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (c->session.console_remote_console_to_bmc_bytes_before_break) { if (accepted_character_count > c->session.console_remote_console_to_bmc_bytes_before_break) { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected accepted_character_count: accepted_character_count = %d, c->session.console_remote_console_to_bmc_bytes_before_break = %d\n", accepted_character_count, c->session.console_remote_console_to_bmc_bytes_before_break)); accepted_character_count = c->session.console_remote_console_to_bmc_bytes_before_break; } c->session.console_remote_console_to_bmc_bytes_before_break -= accepted_character_count; } c->session.sol_input_waiting_for_ack = 0; c->session.sol_input_character_data_len = 0; } else { /* achu: Note, it's possible the BMC Nacks the data. B/c we didn't send any character data long with the break */ #if 0 /* achu: On some IPMI 2.0 Tyan boards, the break seems to be * "acked" with a break condition. But upon further * reading, this may not be the appropriate interpretation. * We'll leave this code in here for historical purposes * though. */ /* Since the sequence number is acknowledged, we're going to * assume the break happened even if the break condition is * not specified */ if (break_condition != IPMI_SOL_BREAK_CONDITION_DETECTED) IPMICONSOLE_CTX_DEBUG (c, ("SOL packet w/o break condition detected")); #endif c->session.break_requested = 0; c->session.sol_input_waiting_for_ack = 0; c->session.sol_input_waiting_for_break_ack = 0; c->session.sol_input_character_data_len = 0; } } else if (packet_ack_nack_sequence_number && !c->session.sol_input_waiting_for_ack) { IPMICONSOLE_CTX_DEBUG (c, ("Unexpected ACK: packet_ack_nack_sequence_number = %d, c->session.sol_input_packet_sequence_number = %d", packet_ack_nack_sequence_number, c->session.sol_input_packet_sequence_number)); } if (packet_sequence_number) { /* There is some data for the user */ char character_data[IPMICONSOLE_MAX_CHARACTER_DATA]; int character_data_len = 0; unsigned int character_data_len_to_write = 0; unsigned int character_data_index = 0; if ((character_data_len = fiid_obj_get_data (c->connection.obj_sol_payload_data_rs, "character_data", character_data, IPMICONSOLE_MAX_CHARACTER_DATA)) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("fiid_obj_get_data: 'character_data': %s", fiid_obj_errormsg (c->connection.obj_sol_payload_data_rs))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } /* XXX: Should do > or >= check?? */ if (c->session.last_sol_output_packet_sequence_number == packet_sequence_number) { /* Retransmission from the BMC */ /* The BMC elected to transfer additional data with the * retransmission. We will give the user only the new information, * but we must ACK all of the data. */ if (character_data_len >= c->session.last_sol_output_accepted_character_count) { character_data_len_to_write = character_data_len - c->session.last_sol_output_accepted_character_count; character_data_index = c->session.last_sol_output_accepted_character_count; } } else character_data_len_to_write = character_data_len; if (character_data_len_to_write) { n = scbuf_write (c->connection.console_bmc_to_remote_console, character_data + character_data_index, character_data_len_to_write, &dropped, secure_malloc_flag); if (n < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (n != character_data_len_to_write) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d; character_data_len_to_write=%d", n, character_data_len_to_write)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); goto cleanup; } } c->session.last_sol_output_packet_sequence_number = packet_sequence_number; c->session.last_sol_output_accepted_character_count = character_data_len; /* Acknowledge this data. Send some user data if we got some.*/ if (!c->session.sol_input_waiting_for_ack && !scbuf_is_empty (c->connection.console_remote_console_to_bmc)) { if (_send_sol_packet_with_character_data (c, packet_sequence_number, character_data_len, 0) < 0) goto cleanup; } else { if (_send_sol_packet_ack_only (c, packet_sequence_number, character_data_len) < 0) goto cleanup; } } else { if (!scbuf_is_empty (c->connection.console_remote_console_to_bmc) && !c->session.sol_input_waiting_for_ack && (!c->session.break_requested || (c->session.break_requested && c->session.console_remote_console_to_bmc_bytes_before_break))) { if (_send_sol_packet_with_character_data (c, 0, 0, 0) < 0) goto cleanup; } else if (c->session.break_requested) { if (_send_sol_packet_generate_break (c, 0) < 0) goto cleanup; } } rv = 0; cleanup: return (rv); } /* * Returns 0 on success * Returns -1 on error */ static int _calculate_timeout (ipmiconsole_ctx_t c, unsigned int *timeout) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (timeout); if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) { struct timeval current; struct timeval session_timeout; struct timeval session_timeout_val; struct timeval sol_retransmission_timeout; struct timeval sol_retransmission_timeout_val; struct timeval keepalive_timeout; struct timeval keepalive_timeout_val; unsigned int session_timeout_ms; unsigned int sol_retransmission_timeout_len; unsigned int sol_retransmission_timeout_multiplier; unsigned int sol_retransmission_timeout_ms; unsigned int keepalive_timeout_ms; int rv; if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } timeval_add_ms (&c->session.last_ipmi_packet_received, c->config.session_timeout_len, &session_timeout); timeval_sub (&session_timeout, ¤t, &session_timeout_val); timeval_millisecond_calc (&session_timeout_val, &session_timeout_ms); *timeout = session_timeout_ms; if (c->session.sol_input_waiting_for_ack) { if (c->config.retransmission_backoff_count) sol_retransmission_timeout_multiplier = (c->session.retransmission_count / c->config.retransmission_backoff_count) + 1; else sol_retransmission_timeout_multiplier = 1; sol_retransmission_timeout_len = c->config.retransmission_timeout_len * sol_retransmission_timeout_multiplier; timeval_add_ms (&c->session.last_sol_input_packet_sent, sol_retransmission_timeout_len, &sol_retransmission_timeout); timeval_sub (&sol_retransmission_timeout, ¤t, &sol_retransmission_timeout_val); timeval_millisecond_calc (&sol_retransmission_timeout_val, &sol_retransmission_timeout_ms); if (sol_retransmission_timeout_ms < *timeout) *timeout = sol_retransmission_timeout_ms; } if ((rv = _keepalive_is_necessary (c)) < 0) return (-1); if (rv) { /* Time within we should retransmit the current keepalive packet */ timeval_add_ms (&c->session.last_keepalive_packet_sent, c->config.retransmission_keepalive_timeout_len, &keepalive_timeout); timeval_sub (&keepalive_timeout, ¤t, &keepalive_timeout_val); timeval_millisecond_calc (&keepalive_timeout_val, &keepalive_timeout_ms); if (keepalive_timeout_ms < *timeout) *timeout = keepalive_timeout_ms; } else { /* When a keepalive packet will be necessary again */ timeval_add_ms (&c->session.last_ipmi_packet_received, c->config.keepalive_timeout_len, &keepalive_timeout); timeval_sub (&keepalive_timeout, ¤t, &keepalive_timeout_val); timeval_millisecond_calc (&keepalive_timeout_val, &keepalive_timeout_ms); if (keepalive_timeout_ms < *timeout) *timeout = keepalive_timeout_ms; } } else { struct timeval current; struct timeval session_timeout; struct timeval session_timeout_val; struct timeval retransmission_timeout; struct timeval retransmission_timeout_val; unsigned int retransmission_timeout_len; unsigned int retransmission_timeout_multiplier; unsigned int session_timeout_ms; unsigned int retransmission_timeout_ms; if (gettimeofday (¤t, NULL) < 0) { IPMICONSOLE_CTX_DEBUG (c, ("gettimeofday: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } timeval_add_ms (&c->session.last_ipmi_packet_received, c->config.session_timeout_len, &session_timeout); timeval_sub (&session_timeout, ¤t, &session_timeout_val); timeval_millisecond_calc (&session_timeout_val, &session_timeout_ms); if (c->config.retransmission_backoff_count) retransmission_timeout_multiplier = (c->session.retransmission_count / c->config.retransmission_backoff_count) + 1; else retransmission_timeout_multiplier = 1; retransmission_timeout_len = c->config.retransmission_timeout_len * retransmission_timeout_multiplier; timeval_add_ms (&c->session.last_ipmi_packet_sent, retransmission_timeout_len, &retransmission_timeout); timeval_sub (&retransmission_timeout, ¤t, &retransmission_timeout_val); timeval_millisecond_calc (&retransmission_timeout_val, &retransmission_timeout_ms); if (retransmission_timeout_ms < session_timeout_ms) *timeout = retransmission_timeout_ms; else *timeout = session_timeout_ms; } return (0); } /* Returns 1 to continue the state machine (normally a packet was * sent), 0 if nothing was done, -1 to close the session (non-cleanly) */ static int _send_sol_character_data_or_break (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* _send_sol_packet_with_character_data() will not send more * than c->session.console_remote_console_to_bmc_bytes_before_break */ if (!scbuf_is_empty (c->connection.console_remote_console_to_bmc) && (!c->session.break_requested || (c->session.break_requested && c->session.console_remote_console_to_bmc_bytes_before_break))) { if (_send_sol_packet_with_character_data (c, 0, 0, 0) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } return (1); } if (c->session.break_requested) { if (_send_sol_packet_generate_break (c, 0) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } return (1); } return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_start (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_get_authentication_capabilities_sent (ipmiconsole_ctx_t c) { int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((ret = _check_for_ipmi_2_0_support (c)) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); if (_check_for_authentication_support (c) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_REQUEST) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_open_session_request_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_1) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_rakp_message_1_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (_calculate_cipher_keys (c) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_3) < 0) /* The session isn't setup, no need to attempt to close it cleanly */ return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_rakp_message_3_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->session.close_session_flag) { /* The session could be up, depending on timeouts, etc. but since we aren't sure, we don't attempt to close it cleanly */ return (-1); } /* if privilege_level == IPMI_PRIVILEGE_LEVEL_USER we shouldn't have * to call this, b/c it should be USER by default. But I don't * trust IPMI implementations. Do it anyways. */ if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_set_session_privilege_level_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* IPMI Workaround * * Discovered on Sun Fire 4100. * Discovered on Intel Windmill/Quanta Winterfell/Wiwynn Windmill * * The Get Channel Payload Support isn't supported. Skip this part * of the state machine and pray for the best I guess. * */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION || c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT; return (0); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_get_channel_payload_support_sent (ipmiconsole_ctx_t c) { int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((ret = _check_sol_supported (c)) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } if (!ret) { IPMICONSOLE_CTX_DEBUG (c, ("SOL unavailable")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_UNAVAILABLE); c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } /* IPMI Workaround * * Discovered on Supermicro X8SIL-F * * The Get Payload Activation Status isn't supported. Skip this * part of the state machine and pray for the best I guess. */ if (c->config.workaround_flags & IPMICONSOLE_WORKAROUND_SKIP_SOL_ACTIVATION_STATUS) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT; return (0); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_get_payload_activation_status_sent (ipmiconsole_ctx_t c) { int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((ret = _check_sol_activated (c)) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY) { if (ret) { c->session.deactivate_payload_instances++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } else { c->session.close_session_flag++; c->session.deactivate_only_succeeded_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } } if (ret) { c->session.deactivate_payload_instances++; c->session.deactivate_payload_instances_and_try_again_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT; return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_activate_payload_sent (ipmiconsole_ctx_t c) { int blocking_requested = 0; int perr, ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* Note: * * There are several possible races here. * * 1) It's possible we get a SOL packet before we get an activate * payload response. For example, the packets are received out * of order, or perhaps the activate payload response is lost on * the network. * * If this happens, SOL packets will be thrown out. We will not * accept an SOL packet until the activate payload stage has * been fully completed. * * 2) Between the activation status stage and the activate * payload stage, it's possible a different user has established * an SOL session. * * This will be checked and handled appropriately. */ if (c->session.close_session_flag) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if ((ret = _check_sol_activated2 (c)) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } if (ret) { c->session.activate_payloads_count++; /* IPMI Workaround * * Intel IPMI 2.0 implementations may not * activate payloads properly and signal that a proper * activation occurred. This leads to the state * machine looping forever: * * - Get Activation Status says SOL is not active * - Activate Payload says SOL is active * * - State machine goes back to Get Activation Status, hoping to see * an active SOL, so it can deactivate it, return error, etc. do * whatever is appropriate. * * This workaround is just so we don't loop forever and at some * point the code will return back to the user cleanly. */ /* +1 b/c one activate_payloads_count is acceptable */ if (c->session.activate_payloads_count > c->config.acceptable_packet_errors_count + 1) { IPMICONSOLE_CTX_DEBUG (c, ("closing with excessive activate payload attempts")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SOL_INUSE); c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } IPMICONSOLE_CTX_DEBUG (c, ("activate payload race")); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT; return (0); } if ((ret = _check_payload_sizes_legitimate (c)) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (!ret) { ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_IMPLEMENTATION); c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if ((ret = _check_try_new_port (c)) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (ret) { /* XXX: Supposed to deactivate? I don't know, specification is * unclear. Come back later when you figure out proper * behavior? */ IPMICONSOLE_CTX_DEBUG (c, ("new port indicated: %Xh", c->session.console_port)); c->session.try_new_port_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if ((perr = pthread_mutex_lock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } c->signal.status = IPMICONSOLE_CTX_STATUS_SOL_ESTABLISHED; if ((perr = pthread_mutex_unlock (&(c->signal.status_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if ((perr = pthread_mutex_lock (&(c->blocking.blocking_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_lock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } /* Wake up code waiting for SOL to be established */ if (c->blocking.blocking_submit_requested) { uint8_t tmpbyte; blocking_requested++; c->blocking.sol_session_established++; tmpbyte = IPMICONSOLE_BLOCKING_NOTIFICATION_SOL_SESSION_ESTABLISHED; if (write (c->blocking.blocking_notification[1], &tmpbyte, 1) < 0) { /* unlock before setting errnum */ if ((perr = pthread_mutex_unlock (&(c->blocking.blocking_mutex))) != 0) IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); IPMICONSOLE_CTX_DEBUG (c, ("write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } } if ((perr = pthread_mutex_unlock (&(c->blocking.blocking_mutex))) != 0) { IPMICONSOLE_DEBUG (("pthread_mutex_unlock: %s", strerror (perr))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION; if (c->config.engine_flags & IPMICONSOLE_ENGINE_OUTPUT_ON_SOL_ESTABLISHED) { int n; int dropped; int secure_malloc_flag; secure_malloc_flag = (c->config.engine_flags & IPMICONSOLE_ENGINE_LOCK_MEMORY) ? 1 : 0; n = scbuf_write (c->connection.console_bmc_to_remote_console, "\0", 1, &dropped, secure_malloc_flag); if (n < 0) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: %s", strerror (errno))); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (n != 1) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: invalid bytes written; n=%d", n)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (dropped) { IPMICONSOLE_CTX_DEBUG (c, ("scbuf_write: dropped data: dropped=%d", dropped)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } } /* only call callback if blocking was not requested */ if (!blocking_requested && c->non_blocking.callback) (*(c->non_blocking.callback))(c->non_blocking.callback_arg); /* It's possible the user entered some data before the SOL * session was established. We send that data now. Otherwise * we'd have to wait until the next poll() has passed to * ipmiconsole_process_ctxs() is called. */ /* The return value of _send_sol_character_data_or_break() doesn't * matter, we continue the state machine either way because ... */ if (_send_sol_character_data_or_break (c) < 0) return (-1); /* Doesn't matter if packet was sent or not. If a packet was sent, * continue the state machine. If not, the state machine still * needs to setup the appropriate timeout to wait for SOL or a send * a keepalive packet. */ return (0); } /* Returns 1 to continue the state machine (normally a packet was * sent), 0 if nothing was done, -1 to close the session (non-cleanly) */ static int _process_protocol_state_sol_session_send (ipmiconsole_ctx_t c) { int ret; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->session.sol_input_waiting_for_ack) { int dont_deactivate_flag = 0; if ((ret = _sol_retransmission_timeout (c, &dont_deactivate_flag)) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (dont_deactivate_flag) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; } else { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; } return (1); } if (ret) return (1); } else { if ((ret = _send_sol_character_data_or_break (c)) < 0) return (-1); if (ret) return (1); } /* Will handle retransmits too */ if ((ret = _keepalive_timeout (c)) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } if (ret) return (1); if (c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE || c->config.engine_flags & IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY) { /* Retransmits handled by _sol_retransmission_timeout() call above */ if ((ret = _serial_keepalive_timeout (c)) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (1); } if (ret) return (1); } return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_sol_session_receive (ipmiconsole_ctx_t c, ipmiconsole_packet_type_t p) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); /* Note: Under this protocol state, we can receive one of two * packet types. The packet will either be a SOL packet or a * IPMI "ping" packet that was used to keep the session alive. * The payload type will determine what type of packet it is. */ if (c->session.close_session_flag) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } if (p == IPMICONSOLE_PACKET_TYPE_SOL_PAYLOAD_DATA_RS) { int sol_deactivating_flag = 0; if (_sol_bmc_to_remote_console_packet (c, &sol_deactivating_flag) < 0) { c->session.close_session_flag++; /* If SOL is deactivating, there's a good chance another * session stole our SOL session. We don't want to * deactivate the SOL payload, because all that will do is * deactivate the other session's SOL. */ if (sol_deactivating_flag) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; } else { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; } return (0); } } else if (p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_VERSION_RS) { /* Don't have to do anything, yippee that the packet was received */ } else { IPMICONSOLE_CTX_DEBUG (c, ("invalid packet received: p = %d", p)); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } /* packet not sent, but state machine continues. Just tell it to * setup the appropriate timeout to wait for SOL or send a * keeaplive. */ return (0); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_deactivate_payload_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->config.behavior_flags & IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY) { c->session.sol_instances_deactivated_count++; if (c->session.sol_instances_activated_count == c->session.sol_instances_deactivated_count) { c->session.deactivate_only_succeeded_flag++; c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } else { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } } if (c->session.close_session_flag || c->session.try_new_port_flag) { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } else if (c->session.deactivate_payload_instances_and_try_again_flag) { c->session.sol_instances_deactivated_count++; if (c->session.sol_instances_activated_count == c->session.sol_instances_deactivated_count) { c->session.deactivate_payload_instances = 0; c->session.deactivate_payload_instances_and_try_again_flag = 0; c->session.deactivate_active_payloads_count++; /* IPMI Workaround * * Supermicro IPMI 2.0 implementations may not * deactivate payloads properly and signal that a proper * deactivation occurred. This leads to the state * machine looping forever: * * - Get Activation Status says SOL is activated * - Deactivate Payloads tries to deactivate SOL * - deactivation fails, but command returns success * - Activate Payload says it can't activate SOL b/c * it's already activated * * And the loop re-begins. Therefore the need for this * workaround. */ /* +1 b/c one deactivate_active_payloads_count is acceptable and expected */ if (c->session.deactivate_active_payloads_count > c->config.acceptable_packet_errors_count + 1) { /* achu: * * I've been going back and forth on what this error * code should actually be. It is conceivable that * this occurs b/c two different libipmiconsole() * threads are attempting to get the same SOL * session going, and they are "blocking" each * other. * * For now, we will assume that the above Supermicro * issue or something similar is the real problem and it * is a flaw due to the implementation of the BMC. * */ IPMICONSOLE_CTX_DEBUG (c, ("closing with excessive payload deactivations")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_BMC_IMPLEMENTATION); c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT; return (0); } else { if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RQ) < 0) { c->session.close_session_flag++; if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RQ) < 0) return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT; return (0); } c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT; return (0); } } /* Shouldn't be possible to reach this point */ IPMICONSOLE_CTX_DEBUG (c, ("deactivate payload logic bug")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* Return 0 to continue the state machine (normally a packet was * sent), -1 to close the session (non-cleanly) */ static int _process_protocol_state_close_session_sent (ipmiconsole_ctx_t c) { assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if (c->session.close_session_flag) { c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_END; return (-1); } if (c->session.close_timeout_flag) { IPMICONSOLE_CTX_DEBUG (c, ("closing session via close session packet timeout")); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_END; return (-1); } if (c->session.try_new_port_flag) { int16_t console_port; /* Yippee, we get to start over! */ assert (c->session.console_port != RMCP_PRIMARY_RMCP_PORT); console_port = c->session.console_port; /* try_new_port_flag reset in ipmiconsole_ctx_session_setup() */ if (ipmiconsole_ctx_session_setup (c) < 0) /* Session is closed, just exit on error */ return (-1); /* now reset up w/ new console port */ c->session.console_port = console_port; if (c->session.addr_len == sizeof (struct sockaddr_in)) c->session.addr4.sin_port = htons (c->session.console_port); else if (c->session.addr_len == sizeof (struct sockaddr_in6)) c->session.addr6.sin6_port = htons (c->session.console_port); else { /* Shouldn't be possible to reach here */ IPMICONSOLE_CTX_DEBUG (c, ("reset port logic bug")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } IPMICONSOLE_CTX_DEBUG (c, ("trying new port: %Xh", c->session.console_port)); if (_send_ipmi_packet (c, IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RQ) < 0) /* Session is closed, just exit on error */ return (-1); c->session.protocol_state = IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT; return (0); } /* Shouldn't be possible to reach this point */ IPMICONSOLE_CTX_DEBUG (c, ("close session logic bug")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_INTERNAL_ERROR); return (-1); } /* * This is the primary state machine for IPMI/SOL * * Return -1 if context has an error or has timed out */ static int _process_ctx (ipmiconsole_ctx_t c, unsigned int *timeout) { ipmiconsole_packet_type_t p; int ret, rv = -1; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); assert (timeout); *timeout = 0; if ((ret = _check_close_session (c)) < 0) goto close_session; if (ret) goto calculate_timeout; /* Protocol State Special Case * * Since the IPMI session has not yet begun, timeouts aren't * possible, there are no packets to read, there are no retransmissions * that may be necessary, etc. */ if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_START) { if (_process_protocol_state_start (c) < 0) goto close_session; goto calculate_timeout; } if ((ret = _session_timeout (c)) < 0) goto close_session; if (ret) { if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT) { IPMICONSOLE_CTX_DEBUG (c, ("closing connection due to connection timeout")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_CONNECTION_TIMEOUT); } else { IPMICONSOLE_CTX_DEBUG (c, ("closing session due to session timeout")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SESSION_TIMEOUT); } goto close_session; } /* Handle IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION related sends, below * we handle IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION related receives. */ if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) { /* Return values for this _process_X() function are different than * others, see comments above. */ if ((ret = _process_protocol_state_sol_session_send (c)) < 0) goto close_session; if (ret) goto calculate_timeout; } else { if ((ret = _ipmi_retransmission_timeout (c)) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if ((ret = _close_session (c)) < 0) goto close_session; if (ret) goto calculate_timeout; else goto state_machine; } if (ret) goto calculate_timeout; if (c->session.close_timeout_flag) goto state_machine; } if ((ret = _receive_packet (c, &p)) < 0) { /* Attempt to close the session cleanly */ c->session.close_session_flag++; if ((ret = _close_session (c)) < 0) goto close_session; if (ret) goto calculate_timeout; else goto state_machine; } if (!ret) { /* Notes: * * The errors_count and acceptable_packet_errors_count are * mostly to handle the corner case when the BMC gets out of * whack with its sequence numbers. This has been witnessed * when a machine is rebooted with a network booted kernel. The * SOL goes out during the network boot (according to vendors, * due to limited memory on the ethernet controller) and the SOL * output is "thrown out" by the network card. * * However, the BMC (internally) still increments its session * sequence numbers, so by the time the kernel is booted, the * session sequence numbers are way out of whack. */ if (c->session.errors_count > c->config.acceptable_packet_errors_count && !c->session.close_session_flag) { /* Attempt to close the session cleanly */ IPMICONSOLE_CTX_DEBUG (c, ("closing with excessive errors")); ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_EXCESS_ERRORS_RECEIVED); c->session.close_session_flag++; if ((ret = _close_session (c)) < 0) goto close_session; if (ret) goto calculate_timeout; else goto state_machine; } goto calculate_timeout; } /* Below here, the state machine handles packet receives */ state_machine: if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_AUTHENTICATION_CAPABILITIES_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_GET_AUTHENTICATION_CAPABILITIES_RS); if (_process_protocol_state_get_authentication_capabilities_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_OPEN_SESSION_RESPONSE); if (_process_protocol_state_open_session_request_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_2); if (_process_protocol_state_rakp_message_1_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT) { assert (c->session.close_session_flag || p == IPMICONSOLE_PACKET_TYPE_RAKP_MESSAGE_4); if (_process_protocol_state_rakp_message_3_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS); if (_process_protocol_state_set_session_privilege_level_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_CHANNEL_PAYLOAD_SUPPORT_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_GET_CHANNEL_PAYLOAD_SUPPORT_RS); if (_process_protocol_state_get_channel_payload_support_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_GET_PAYLOAD_ACTIVATION_STATUS_SENT) { assert (p == IPMICONSOLE_PACKET_TYPE_GET_PAYLOAD_ACTIVATION_STATUS_RS); if (_process_protocol_state_get_payload_activation_status_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_ACTIVATE_PAYLOAD_SENT) { assert (c->session.close_session_flag || p == IPMICONSOLE_PACKET_TYPE_ACTIVATE_PAYLOAD_RS); if (_process_protocol_state_activate_payload_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION) { /* Handle IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION related receives. Above * we handle IPMICONSOLE_PROTOCOL_STATE_SOL_SESSION related sends. */ if (_process_protocol_state_sol_session_receive (c, p) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_DEACTIVATE_PAYLOAD_SENT) { assert (c->session.close_session_flag || p == IPMICONSOLE_PACKET_TYPE_DEACTIVATE_PAYLOAD_RS); if (_process_protocol_state_deactivate_payload_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else if (c->session.protocol_state == IPMICONSOLE_PROTOCOL_STATE_CLOSE_SESSION_SENT) { assert (c->session.close_session_flag || c->session.close_timeout_flag || p == IPMICONSOLE_PACKET_TYPE_CLOSE_SESSION_RS); if (_process_protocol_state_close_session_sent (c) < 0) goto close_session; /* fallthrough to calculate_timeout */ } else { IPMICONSOLE_CTX_DEBUG (c, ("invalid protocol_state: %d", c->session.protocol_state)); goto close_session; } calculate_timeout: if (_calculate_timeout (c, timeout) < 0) goto close_session; rv = 0; close_session: return (rv); } int ipmiconsole_process_ctxs (List console_engine_ctxs, unsigned int *timeout) { ListIterator itr = NULL; ipmiconsole_ctx_t c; int ctxs_count = 0; unsigned int min_timeout = UINT_MAX; int rv = -1; assert (console_engine_ctxs); assert (timeout); *timeout = 0; if (!list_count (console_engine_ctxs)) return (0); if (!(itr = list_iterator_create (console_engine_ctxs))) { IPMICONSOLE_DEBUG (("list_iterator_create: %s", strerror (errno))); goto cleanup; } while ((c = (ipmiconsole_ctx_t)list_next (itr))) { unsigned int ctx_timeout; assert (c); assert (c->magic == IPMICONSOLE_CTX_MAGIC); if ((_process_ctx (c, &ctx_timeout)) < 0) { /* On delete, function to cleanup ctx session will be done. * Error will be seen by the user via a EOF on a read() or * EPIPE on a write(). */ if (!list_delete (itr)) { IPMICONSOLE_DEBUG (("list_delete: %s", strerror (errno))); goto cleanup; } continue; } if (ctx_timeout < min_timeout) min_timeout = ctx_timeout; ctxs_count++; } rv = ctxs_count; if (rv) *timeout = min_timeout; cleanup: if (itr) list_iterator_destroy (itr); return (rv); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_processing.h0000644002055400205540000000312313527331637023221 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_processing.h,v 1.12 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_PROCESSING_H #define IPMICONSOLE_PROCESSING_H #include "ipmiconsole.h" #include "list.h" int ipmiconsole_process_ctxs (List console_engine_ctxs, unsigned int *timeout); #endif /* IPMICONSOLE_PROCESSING_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole_util.c0000644002055400205540000000514313527331637022021 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_util.c,v 1.13 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "ipmiconsole.h" #include "ipmiconsole_defs.h" #include "ipmiconsole_util.h" #include "ipmiconsole_ctx.h" #include "ipmiconsole_debug.h" #include "ipmiconsole_engine.h" #include "freeipmi-portability.h" #include "list.h" int ipmiconsole_set_closeonexec (ipmiconsole_ctx_t c, int fd) { int closeonexec; /* User need not pass in valid context for this function */ if ((closeonexec = fcntl (fd, F_GETFD, 0)) < 0) { IPMICONSOLE_DEBUG (("fcntl: %s", strerror (errno))); if (c && c->magic == IPMICONSOLE_CTX_MAGIC) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } closeonexec |= FD_CLOEXEC; if (fcntl (fd, F_SETFD, closeonexec) < 0) { IPMICONSOLE_DEBUG (("fcntl: %s", strerror (errno))); if (c && c->magic == IPMICONSOLE_CTX_MAGIC) ipmiconsole_ctx_set_errnum (c, IPMICONSOLE_ERR_SYSTEM_ERROR); return (-1); } return (0); } freeipmi-1.6.4/libipmiconsole/ipmiconsole_util.h0000644002055400205540000000302713527331637022025 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_util.h,v 1.10 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_UTIL_H #define IPMICONSOLE_UTIL_H #include "ipmiconsole.h" int ipmiconsole_set_closeonexec (ipmiconsole_ctx_t c, int fd); #endif /* IPMICONSOLE_UTIL_H */ freeipmi-1.6.4/libipmiconsole/scbuf.c0000644002055400205540000014330713527331637017552 0ustar00achuachu00000000000000/***************************************************************************** * $Id: scbuf.c,v 1.5 2009-03-03 23:56:52 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. ***************************************************************************** * Refer to "scbuf.h" for documentation on public functions. *****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #ifdef HAVE_PTHREAD_H #include #endif /* HAVE_PTHREAD_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include "scbuf.h" #include "secure.h" /***************************************************************************** * lsd_fatal_error *****************************************************************************/ #ifdef WITH_LSD_FATAL_ERROR_FUNC # undef lsd_fatal_error extern void lsd_fatal_error (char *file, int line, char *mesg); #else /* !WITH_LSD_FATAL_ERROR_FUNC */ # ifndef lsd_fatal_error # include # include # include # define lsd_fatal_error(file, line, mesg) \ do { \ fprintf (stderr, "ERROR: [%s:%d] %s: %s\n", \ file, line, mesg, strerror (errno)); \ } while (0) # endif /* !lsd_fatal_error */ #endif /* !WITH_LSD_FATAL_ERROR_FUNC */ /***************************************************************************** * lsd_nomem_error *****************************************************************************/ #ifdef WITH_LSD_NOMEM_ERROR_FUNC # undef lsd_nomem_error extern void * lsd_nomem_error (char *file, int line, char *mesg); #else /* !WITH_LSD_NOMEM_ERROR_FUNC */ # ifndef lsd_nomem_error # define lsd_nomem_error(file, line, mesg) (NULL) # endif /* !lsd_nomem_error */ #endif /* !WITH_LSD_NOMEM_ERROR_FUNC */ /***************************************************************************** * Constants *****************************************************************************/ #define SCBUF_CHUNK 1000 #define SCBUF_MAGIC 0xDEADBEEF #define SCBUF_MAGIC_LEN (sizeof (unsigned long)) /***************************************************************************** * Data Types *****************************************************************************/ struct scbuf { #ifndef NDEBUG unsigned long magic; /* cookie for asserting validity */ #endif /* !NDEBUG */ #ifdef WITH_PTHREADS pthread_mutex_t mutex; /* mutex to protect access to scbuf */ #endif /* WITH_PTHREADS */ int alloc; /* num bytes malloc'd/realloc'd */ int minsize; /* min bytes of data to allocate */ int maxsize; /* max bytes of data to allocate */ int size; /* num bytes of data allocated */ int used; /* num bytes of unread data */ scbuf_overwrite_t overwrite; /* overwrite option behavior */ int got_wrap; /* true if data has wrapped */ int i_in; /* index to where data is written in */ int i_out; /* index to where data is read out */ int i_rep; /* index to where data is replayable */ unsigned char *data; /* ptr to circular buffer of data */ }; typedef int (*scbuf_iof) (void *scbuf_data, void *arg, int len); /***************************************************************************** * Prototypes *****************************************************************************/ static int scbuf_find_replay_line (scbuf_t cb, int chars, int *nlines, int *nl); static int scbuf_find_unread_line (scbuf_t cb, int chars, int *nlines); static int scbuf_get_fd (void *dstbuf, int *psrcfd, int len); static int scbuf_get_mem (void *dstbuf, unsigned char **psrscbuf, int len); static int scbuf_put_fd (void *srscbuf, int *pdstfd, int len); static int scbuf_put_mem (void *srscbuf, unsigned char **pdstbuf, int len); static int scbuf_copier (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag); static int scbuf_dropper (scbuf_t cb, int len); static int scbuf_reader (scbuf_t src, int len, scbuf_iof putf, void *dst); static int scbuf_replayer (scbuf_t src, int len, scbuf_iof putf, void *dst); static int scbuf_writer (scbuf_t dst, int len, scbuf_iof getf, void *src, int *ndropped, int secure_malloc_flag); static int scbuf_grow (scbuf_t cb, int n, int secure_malloc_flag); static int scbuf_shrink (scbuf_t cb); #ifndef NDEBUG static int scbuf_is_valid (scbuf_t cb); #endif /* !NDEBUG */ /***************************************************************************** * Macros *****************************************************************************/ #ifndef MAX # define MAX(x,y) (((x) >= (y)) ? (x) : (y)) #endif /* !MAX */ #ifndef MIN # define MIN(x,y) (((x) <= (y)) ? (x) : (y)) #endif /* !MIN */ #ifdef WITH_PTHREADS # define scbuf_mutex_init(cb) \ do { \ int e = pthread_mutex_init (&cb->mutex, NULL); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "scbuf mutex init"); \ abort (); \ } \ } while (0) # define scbuf_mutex_lock(cb) \ do { \ int e = pthread_mutex_lock (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "scbuf mutex lock"); \ abort (); \ } \ } while (0) # define scbuf_mutex_unlock(cb) \ do { \ int e = pthread_mutex_unlock (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "scbuf mutex unlock"); \ abort (); \ } \ } while (0) # define scbuf_mutex_destroy(cb) \ do { \ int e = pthread_mutex_destroy (&cb->mutex); \ if (e) { \ errno = e; \ lsd_fatal_error (__FILE__, __LINE__, "scbuf mutex destroy"); \ abort (); \ } \ } while (0) # ifndef NDEBUG static int scbuf_mutex_is_locked (scbuf_t cb); # endif /* !NDEBUG */ #else /* !WITH_PTHREADS */ # define scbuf_mutex_init(cb) # define scbuf_mutex_lock(cb) # define scbuf_mutex_unlock(cb) # define scbuf_mutex_destroy(cb) # define scbuf_mutex_is_locked(cb) (1) #endif /* !WITH_PTHREADS */ /***************************************************************************** * Functions *****************************************************************************/ scbuf_t scbuf_create (int minsize, int maxsize, int secure_malloc_flag) { scbuf_t cb; if (minsize <= 0) { errno = EINVAL; return (NULL); } if (secure_malloc_flag) { if (!(cb = secure_malloc (sizeof (struct scbuf)))) { errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "scbuf struct")); } } else { if (!(cb = malloc (sizeof (struct scbuf)))) { errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "scbuf struct")); } } /* Circular buffer is empty when (i_in == i_out), * so reserve 1 byte for this sentinel. */ cb->alloc = minsize + 1; #ifndef NDEBUG /* Reserve space for the magic cookies used to protect the * scbuf data[] array from underflow and overflow. */ cb->alloc += 2 * SCBUF_MAGIC_LEN; #endif /* !NDEBUG */ if (secure_malloc_flag) { if (!(cb->data = secure_malloc (cb->alloc))) { secure_free (cb, sizeof (struct scbuf)); errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "scbuf data")); } } else { if (!(cb->data = malloc (cb->alloc))) { free (cb); errno = ENOMEM; return (lsd_nomem_error (__FILE__, __LINE__, "scbuf data")); } } scbuf_mutex_init (cb); cb->minsize = minsize; cb->maxsize = (maxsize > minsize) ? maxsize : minsize; cb->size = minsize; cb->used = 0; cb->overwrite = SCBUF_WRAP_MANY; cb->got_wrap = 0; cb->i_in = cb->i_out = cb->i_rep = 0; #ifndef NDEBUG /* C is for cookie, that's good enough for me, yeah! * The magic cookies are only defined during DEBUG code. * The first "magic" cookie is at the top of the structure. * Magic cookies are also placed at the top & bottom of the * scbuf data[] array to catch buffer underflow & overflow errors. */ cb->data += SCBUF_MAGIC_LEN; /* jump forward past underflow magic */ cb->magic = SCBUF_MAGIC; /* * Must use memcpy since overflow cookie may not be word-aligned. */ memcpy (cb->data - SCBUF_MAGIC_LEN, (void *) &cb->magic, SCBUF_MAGIC_LEN); memcpy (cb->data + cb->size + 1, (void *) &cb->magic, SCBUF_MAGIC_LEN); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); scbuf_mutex_unlock (cb); #endif /* !NDEBUG */ return (cb); } void scbuf_destroy (scbuf_t cb, int secure_malloc_flag) { assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); #ifndef NDEBUG /* The moon sometimes looks like a C, but you can't eat that. * Munch the magic cookies before freeing memory. */ cb->magic = ~SCBUF_MAGIC; /* the anti-cookie! */ memcpy (cb->data - SCBUF_MAGIC_LEN, (void *) &cb->magic, SCBUF_MAGIC_LEN); memcpy (cb->data + cb->size + 1, (void *) &cb->magic, SCBUF_MAGIC_LEN); cb->data -= SCBUF_MAGIC_LEN; /* jump back to what malloc returned */ #endif /* !NDEBUG */ if (secure_malloc_flag) secure_free (cb->data, cb->alloc); else free (cb->data); scbuf_mutex_unlock (cb); scbuf_mutex_destroy (cb); if (secure_malloc_flag) secure_free (cb, sizeof (struct scbuf)); else free (cb); return; } void scbuf_flush (scbuf_t cb) { assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); /* * FIXME: Shrink buffer back to minimum size. */ cb->used = 0; cb->got_wrap = 0; cb->i_in = cb->i_out = cb->i_rep = 0; assert (scbuf_is_valid (cb)); scbuf_mutex_unlock (cb); return; } int scbuf_size (scbuf_t cb) { int size; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); size = cb->maxsize; scbuf_mutex_unlock (cb); return (size); } int scbuf_free (scbuf_t cb) { int nfree; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); nfree = cb->maxsize - cb->used; scbuf_mutex_unlock (cb); return (nfree); } int scbuf_used (scbuf_t cb) { int used; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); used = cb->used; scbuf_mutex_unlock (cb); return (used); } int scbuf_lines_used (scbuf_t cb) { int lines = -1; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); scbuf_find_unread_line (cb, cb->size, &lines); scbuf_mutex_unlock (cb); return (lines); } int scbuf_reused (scbuf_t cb) { /* If (O > R) * n = O - R * else * n = (O - 0) + ((S+1) - R). * (S+1) is used since data[] contains 'size' bytes + a 1-byte sentinel. */ int reused; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); reused = (cb->i_out - cb->i_rep + (cb->size + 1)) % (cb->size + 1); scbuf_mutex_unlock (cb); return (reused); } int scbuf_lines_reused (scbuf_t cb) { int lines = -1; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); scbuf_find_replay_line (cb, cb->size, &lines, NULL); scbuf_mutex_unlock (cb); return (lines); } int scbuf_is_empty (scbuf_t cb) { int used; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); used = cb->used; scbuf_mutex_unlock (cb); return (used == 0); } int scbuf_opt_get (scbuf_t cb, scbuf_opt_t name, int *value) { int rc = 0; assert (cb != NULL); if (value == NULL) { errno = EINVAL; return (-1); } scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); if (name == SCBUF_OPT_OVERWRITE) { *value = cb->overwrite; } else { errno = EINVAL; rc = -1; } scbuf_mutex_unlock (cb); return (rc); } int scbuf_opt_set (scbuf_t cb, scbuf_opt_t name, int value) { int rc = 0; assert (cb != NULL); scbuf_mutex_lock (cb); assert (scbuf_is_valid (cb)); if (name == SCBUF_OPT_OVERWRITE) { if ( (value == SCBUF_NO_DROP) || (value == SCBUF_WRAP_ONCE) || (value == SCBUF_WRAP_MANY) ) { cb->overwrite = value; } else { errno = EINVAL; rc = -1; } } else { errno = EINVAL; rc = -1; } assert (scbuf_is_valid (cb)); scbuf_mutex_unlock (cb); return (rc); } int scbuf_drop (scbuf_t src, int len) { assert (src != NULL); if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); if (len == -1) { len = src->used; } else { len = MIN (len, src->used); } if (len > 0) { scbuf_dropper (src, len); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (len); } int scbuf_peek (scbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_reader (src, len, (scbuf_iof) scbuf_put_mem, &dstbuf); assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_read (scbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_reader (src, len, (scbuf_iof) scbuf_put_mem, &dstbuf); if (n > 0) { scbuf_dropper (src, n); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_replay (scbuf_t src, void *dstbuf, int len) { int n; assert (src != NULL); if ((dstbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_replayer (src, len, (scbuf_iof) scbuf_put_mem, &dstbuf); assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_rewind (scbuf_t src, int len) { int reused; assert (src != NULL); if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); reused = (src->i_out - src->i_rep + (src->size + 1)) % (src->size + 1); if (len == -1) { len = reused; } else { len = MIN (len, reused); } if (len > 0) { src->used += len; src->i_out = (src->i_out - len + (src->size + 1)) % (src->size + 1); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (len); } int scbuf_write (scbuf_t dst, void *srscbuf, int len, int *ndropped, int secure_malloc_flag) { int n; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if ((srscbuf == NULL) || (len < 0)) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } scbuf_mutex_lock (dst); assert (scbuf_is_valid (dst)); n = scbuf_writer (dst, len, (scbuf_iof) scbuf_get_mem, &srscbuf, ndropped, secure_malloc_flag); assert (scbuf_is_valid (dst)); scbuf_mutex_unlock (dst); return (n); } int scbuf_drop_line (scbuf_t src, int len, int lines) { int n; assert (src != NULL); if ((len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_find_unread_line (src, len, &lines); if (n > 0) { scbuf_dropper (src, n); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_peek_line (scbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_find_unread_line (src, len - 1, &lines); if (n > 0) { if (len > 0) { m = MIN (n, len - 1); if (m > 0) { pdst = dstbuf; l = scbuf_reader (src, m, (scbuf_iof) scbuf_put_mem, &pdst); assert (l == m); } assert (m < len); dstbuf[m] = '\0'; } } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_read_line (scbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_find_unread_line (src, len - 1, &lines); if (n > 0) { if (len > 0) { m = MIN (n, len - 1); if (m > 0) { pdst = dstbuf; l = scbuf_reader (src, m, (scbuf_iof) scbuf_put_mem, &pdst); assert (l == m); } assert (m < len); dstbuf[m] = '\0'; } scbuf_dropper (src, n); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_replay_line (scbuf_t src, char *dstbuf, int len, int lines) { int n, m, l; int nl; char *pdst; assert (src != NULL); if ((dstbuf == NULL) || (len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_find_replay_line (src, len - 1, &lines, &nl); if (n > 0) { if (len > 0) { assert ((nl == 0) || (nl == 1)); m = MIN (n, len - 1 - nl); m = MAX (m, 0); if (m > 0) { pdst = dstbuf; l = scbuf_replayer (src, m, (scbuf_iof) scbuf_put_mem, &pdst); assert (l == m); } /* Append newline if needed and space allows. */ if ((nl) && (len > 1)) { dstbuf[m++] = '\n'; } assert (m < len); dstbuf[m] = '\0'; n += nl; } } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_rewind_line (scbuf_t src, int len, int lines) { int n; assert (src != NULL); if ((len < 0) || (lines < -1)) { errno = EINVAL; return (-1); } if (lines == 0) { return (0); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); n = scbuf_find_replay_line (src, len, &lines, NULL); if (n > 0) { src->used += n; src->i_out = (src->i_out - n + (src->size + 1)) % (src->size + 1); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_write_line (scbuf_t dst, char *srscbuf, int *ndropped, int secure_malloc_flag) { int len; int nfree, ncopy, n; int ndrop = 0, d; char *psrc = srscbuf; char *newline = "\n"; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (srscbuf == NULL) { errno = EINVAL; return (-1); } /* Compute number of bytes to effectively copy to dst scbuf. * Reserve space for the trailing newline if needed. */ len = ncopy = strlen (srscbuf); if ((len == 0) || (srscbuf[len - 1] != '\n')) { len++; } scbuf_mutex_lock (dst); assert (scbuf_is_valid (dst)); /* * Attempt to grow dst scbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += scbuf_grow (dst, len - nfree, secure_malloc_flag); } /* Determine if src will fit (or be made to fit) in dst scbuf. */ if (dst->overwrite == SCBUF_NO_DROP) { if (len > dst->size - dst->used) { errno = ENOSPC; len = -1; /* cannot return while mutex locked */ } } else if (dst->overwrite == SCBUF_WRAP_ONCE) { if (len > dst->size) { errno = ENOSPC; len = -1; /* cannot return while mutex locked */ } } if (len > 0) { /* * Discard data that won't fit in dst scbuf. */ if (len > dst->size) { ndrop += len - dst->size; ncopy -= ndrop; psrc += ndrop; } /* Copy data from src string to dst scbuf. */ if (ncopy > 0) { n = scbuf_writer (dst, ncopy, (scbuf_iof) scbuf_get_mem, &psrc, &d, secure_malloc_flag); assert (n == ncopy); ndrop += d; } /* Append newline if needed. */ if (srscbuf[len - 1] != '\n') { n = scbuf_writer (dst, 1, (scbuf_iof) scbuf_get_mem, &newline, &d, secure_malloc_flag); assert (n == 1); ndrop += d; } } assert (scbuf_is_valid (dst)); scbuf_mutex_unlock (dst); if (ndropped) { *ndropped = ndrop; } return (len); } int scbuf_peek_to_fd (scbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); if (len == -1) { len = src->used; } if (len > 0) { n = scbuf_reader (src, len, (scbuf_iof) scbuf_put_fd, &dstfd); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_read_to_fd (scbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); if (len == -1) { len = src->used; } if (len > 0) { n = scbuf_reader (src, len, (scbuf_iof) scbuf_put_fd, &dstfd); if (n > 0) { scbuf_dropper (src, n); } } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_replay_to_fd (scbuf_t src, int dstfd, int len) { int n = 0; assert (src != NULL); if ((dstfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } scbuf_mutex_lock (src); assert (scbuf_is_valid (src)); if (len == -1) { len = src->size - src->used; } if (len > 0) { n = scbuf_replayer (src, len, (scbuf_iof) scbuf_put_fd, &dstfd); } assert (scbuf_is_valid (src)); scbuf_mutex_unlock (src); return (n); } int scbuf_write_from_fd (scbuf_t dst, int srcfd, int len, int *ndropped, int secure_malloc_flag) { int n = 0; assert (dst != NULL); if (ndropped) { *ndropped = 0; } if ((srcfd < 0) || (len < -1)) { errno = EINVAL; return (-1); } scbuf_mutex_lock (dst); assert (scbuf_is_valid (dst)); if (len == -1) { /* * Try to use all of the free buffer space available for writing. * If it is all in use, try to grab another chunk. */ len = dst->size - dst->used; if (len == 0) { len = SCBUF_CHUNK; } } if (len > 0) { n = scbuf_writer (dst, len, (scbuf_iof) scbuf_get_fd, &srcfd, ndropped, secure_malloc_flag); } assert (scbuf_is_valid (dst)); scbuf_mutex_unlock (dst); return (n); } int scbuf_copy (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag) { int n = 0; assert (src != NULL); assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (src == dst) { errno = EINVAL; return (-1); } if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } /* Lock scbufs in order of lowest memory address to prevent deadlock. */ if (src < dst) { scbuf_mutex_lock (src); scbuf_mutex_lock (dst); } else { scbuf_mutex_lock (dst); scbuf_mutex_lock (src); } assert (scbuf_is_valid (src)); assert (scbuf_is_valid (dst)); if (len == -1) { len = src->used; } if (len > 0) { n = scbuf_copier (src, dst, len, ndropped, secure_malloc_flag); } assert (scbuf_is_valid (src)); assert (scbuf_is_valid (dst)); scbuf_mutex_unlock (src); scbuf_mutex_unlock (dst); return (n); } int scbuf_move (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag) { int n = 0; assert (src != NULL); assert (dst != NULL); if (ndropped) { *ndropped = 0; } if (src == dst) { errno = EINVAL; return (-1); } if (len < -1) { errno = EINVAL; return (-1); } if (len == 0) { return (0); } /* Lock scbufs in order of lowest memory address to prevent deadlock. */ if (src < dst) { scbuf_mutex_lock (src); scbuf_mutex_lock (dst); } else { scbuf_mutex_lock (dst); scbuf_mutex_lock (src); } assert (scbuf_is_valid (src)); assert (scbuf_is_valid (dst)); if (len == -1) { len = src->used; } if (len > 0) { n = scbuf_copier (src, dst, len, ndropped, secure_malloc_flag); if (n > 0) { scbuf_dropper (src, n); } } assert (scbuf_is_valid (src)); assert (scbuf_is_valid (dst)); scbuf_mutex_unlock (src); scbuf_mutex_unlock (dst); return (n); } static int scbuf_find_replay_line (scbuf_t cb, int chars, int *nlines, int *nl) { /* Finds the specified number of lines from the replay region of the buffer. * If ([nlines] > 0), returns the number of bytes comprising the line count, * or 0 if this number of lines is not available (ie, all or none). * If ([nlines] == -1), returns the number of bytes comprising the maximum * line count bounded by the number of characters specified by [chars]. * Only complete lines (ie, those terminated by a newline) are counted, * with once exception: the most recent line of replay data is treated * as a complete line regardless of the presence of a terminating newline. * Sets the value-result parameter [nlines] to the number of lines found. * Sets [nl] to '1' if a newline is required to terminate the replay data. */ int i, n, m, l; int lines; assert (cb != NULL); assert (nlines != NULL); assert (*nlines >= -1); assert (scbuf_mutex_is_locked (cb)); n = m = l = 0; lines = *nlines; *nlines = 0; if (nl) { *nl = 0; /* init in case of early return */ } if ((lines == 0) || ((lines <= -1) && (chars <= 0))) { return (0); } if (cb->i_out == cb->i_rep) { return (0); /* no replay data available */ } if (lines > 0) { chars = -1; /* chars parm not used if lines > 0 */ } else { ++chars; /* incr to allow for preceding '\n' */ } /* Since the most recent line of replay data is considered implicitly * terminated, decrement the char count to account for the newline * if one is not present, or increment the line count if one is. * Note: cb->data[(O - 1 + (S+1)) % (S+1)] is the last replayable char. */ if (cb->data[(cb->i_out + cb->size) % (cb->size + 1)] != '\n') { if (nl) { *nl = 1; } --chars; } else { if (lines > 0) { ++lines; } --l; } i = cb->i_out; while (i != cb->i_rep) { i = (i + cb->size) % (cb->size + 1); /* (i - 1 + (S+1)) % (S+1) */ ++n; if (chars > 0) { --chars; } /* Complete lines are identified by a preceding newline. */ if (cb->data[i] == '\n') { if (lines > 0) { --lines; } m = n - 1; /* do not include preceding '\n' */ ++l; } if ((chars == 0) || (lines == 0)) { break; } } /* But the first line written in does not need a preceding newline. */ if ((!cb->got_wrap) && ((chars > 0) || (lines > 0))) { if (lines > 0) { --lines; } m = n; ++l; } if (lines > 0) { return (0); /* all or none, and not enough found */ } *nlines = l; return (m); } static int scbuf_find_unread_line (scbuf_t cb, int chars, int *nlines) { /* Finds the specified number of lines from the unread region of the buffer. * If ([nlines] > 0), returns the number of bytes comprising the line count, * or 0 if this number of lines is not available (ie, all or none). * If ([nlines] == -1), returns the number of bytes comprising the maximum * line count bounded by the number of characters specified by [chars]. * Only complete lines (ie, those terminated by a newline) are counted. * Sets the value-result parameter [nlines] to the number of lines found. */ int i, n, m, l; int lines; assert (cb != NULL); assert (nlines != NULL); assert (*nlines >= -1); assert (scbuf_mutex_is_locked (cb)); n = m = l = 0; lines = *nlines; *nlines = 0; if ((lines == 0) || ((lines <= -1) && (chars <= 0))) { return (0); } if (cb->used == 0) { return (0); /* no unread data available */ } if (lines > 0) { chars = -1; /* chars parm not used if lines > 0 */ } i = cb->i_out; while (i != cb->i_in) { ++n; if (chars > 0) { --chars; } if (cb->data[i] == '\n') { if (lines > 0) { --lines; } m = n; ++l; } if ((chars == 0) || (lines == 0)) { break; } i = (i + 1) % (cb->size + 1); } if (lines > 0) { return (0); /* all or none, and not enough found */ } *nlines = l; return (m); } static int scbuf_get_fd (void *dstbuf, int *psrcfd, int len) { /* Copies data from the file referenced by the file descriptor * pointed at by [psrcfd] into scbuf's [dstbuf]. * Returns the number of bytes read from the fd, 0 on EOF, or -1 on error. */ int n; assert (dstbuf != NULL); assert (psrcfd != NULL); assert (*psrcfd >= 0); assert (len > 0); do { n = read (*psrcfd, dstbuf, len); } while ((n < 0) && (errno == EINTR)); return (n); } static int scbuf_get_mem (void *dstbuf, unsigned char **psrscbuf, int len) { /* Copies data from the buffer pointed at by [psrscbuf] into scbuf's [dstbuf]. * Returns the number of bytes copied. */ assert (dstbuf != NULL); assert (psrscbuf != NULL); assert (*psrscbuf != NULL); assert (len > 0); memcpy (dstbuf, *psrscbuf, len); *psrscbuf += len; return (len); } static int scbuf_put_fd (void *srscbuf, int *pdstfd, int len) { /* Copies data from scbuf's [srscbuf] into the file referenced * by the file descriptor pointed at by [pdstfd]. * Returns the number of bytes written to the fd, or -1 on error. */ int n; assert (srscbuf != NULL); assert (pdstfd != NULL); assert (*pdstfd >= 0); assert (len > 0); do { n = write (*pdstfd, srscbuf, len); } while ((n < 0) && (errno == EINTR)); return (n); } static int scbuf_put_mem (void *srscbuf, unsigned char **pdstbuf, int len) { /* Copies data from scbuf's [srscbuf] into the buffer pointed at by [pdstbuf]. * Returns the number of bytes copied. */ assert (srscbuf != NULL); assert (pdstbuf != NULL); assert (*pdstbuf != NULL); assert (len > 0); memcpy (*pdstbuf, srscbuf, len); *pdstbuf += len; return (len); } static int scbuf_copier (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag) { /* Copies up to [len] bytes from the [src] scbuf into the [dst] scbuf. * Returns the number of bytes copied, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ int ncopy, nfree, nleft, nrepl, n; int i_src, i_dst; assert (src != NULL); assert (dst != NULL); assert (len > 0); assert (scbuf_mutex_is_locked (src)); assert (scbuf_mutex_is_locked (dst)); /* Bound len by the number of bytes available. */ len = MIN (len, src->used); if (len == 0) { return (0); } /* Attempt to grow dst scbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += scbuf_grow (dst, len - nfree, secure_malloc_flag); } /* Compute number of bytes to effectively copy to dst scbuf. */ if (dst->overwrite == SCBUF_NO_DROP) { len = MIN (len, dst->size - dst->used); if (len == 0) { errno = ENOSPC; return (-1); } } else if (dst->overwrite == SCBUF_WRAP_ONCE) { len = MIN (len, dst->size); } /* Compute number of bytes that will be overwritten in dst scbuf. */ if (ndropped) { *ndropped = MAX (0, len - dst->size + dst->used); } /* Compute number of bytes to physically copy to dst scbuf. This prevents * copying data that will overwritten if the scbuf wraps multiple times. */ ncopy = len; i_src = src->i_out; i_dst = dst->i_in; if (ncopy > dst->size) { n = ncopy - dst->size; i_src = (i_src + n) % (src->size + 1); ncopy -= n; } /* Copy data from src scbuf to dst scbuf. */ nleft = ncopy; while (nleft > 0) { n = MIN (((src->size + 1) - i_src), ((dst->size + 1) - i_dst)); n = MIN (n, nleft); memcpy (&dst->data[i_dst], &src->data[i_src], n); i_src = (i_src + n) % (src->size + 1); i_dst = (i_dst + n) % (dst->size + 1); nleft -= n; } /* Update dst scbuf metadata. */ if (ncopy > 0) { nrepl = (dst->i_out - dst->i_rep + (dst->size + 1)) % (dst->size + 1); dst->used = MIN (dst->used + ncopy, dst->size); assert (i_dst == (dst->i_in + ncopy) % (dst->size + 1)); dst->i_in = i_dst; if (ncopy > nfree - nrepl) { dst->got_wrap = 1; dst->i_rep = (dst->i_in + 1) % (dst->size + 1); } if (ncopy > nfree) { dst->i_out = dst->i_rep; } } return (len); } static int scbuf_dropper (scbuf_t cb, int len) { /* Discards exactly [len] bytes of unread data from [cb]. * Returns the number of bytes dropped. */ assert (cb != NULL); assert (len > 0); assert (len <= cb->used); assert (scbuf_mutex_is_locked (cb)); cb->used -= len; cb->i_out = (cb->i_out + len) % (cb->size + 1); /* Attempt to shrink scbuf if possible. */ if ((cb->size - cb->used > SCBUF_CHUNK) && (cb->size > cb->minsize)) { scbuf_shrink (cb); } /* Don't call me clumsy, don't call me a fool. * When things fall down on me, I'm following the rule. */ return (len); } static int scbuf_reader (scbuf_t src, int len, scbuf_iof putf, void *dst) { /* Reads up to [len] bytes from [src] into the object pointed at by [dst]. * The I/O function [putf] specifies how data is written into [dst]. * Returns the number of bytes read, or -1 on error (with errno set). * Note that [dst] is a value-result parameter and will be "moved forward" * by the number of bytes written into it. */ int nleft, n, m; int i_src; assert (src != NULL); assert (len > 0); assert (putf != NULL); assert (dst != NULL); assert (scbuf_mutex_is_locked (src)); /* Bound len by the number of bytes available. */ len = MIN (len, src->used); if (len == 0) { return (0); } /* Copy data from src scbuf to dst obj. Do the scbuf hokey-pokey and * wrap-around the buffer at most once. Break out if putf() returns * either an ERR or a short count. */ i_src = src->i_out; nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (src->size + 1) - i_src); m = putf (&src->data[i_src], dst, n); if (m > 0) { nleft -= m; i_src = (i_src + m) % (src->size + 1); } if (n != m) { break; /* got ERR or "short" putf() */ } } /* Compute number of bytes written to dst obj. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the ERR reported by putf(). */ if (n == 0) { return (m); } return (n); } static int scbuf_replayer (scbuf_t src, int len, scbuf_iof putf, void *dst) { /* Replays up to [len] bytes from [src] into the object pointed at by [dst]. * The I/O function [putf] specifies how data is written into [dst]. * Returns the number of bytes replayed, or -1 on error (with errno set). * Note that [dst] is a value-result parameter and will be "moved forward" * by the number of bytes written into it. */ int nleft, n, m; int i_src; assert (src != NULL); assert (len > 0); assert (putf != NULL); assert (dst != NULL); assert (scbuf_mutex_is_locked (src)); /* Bound len by the number of bytes available. */ n = (src->i_out - src->i_rep + (src->size + 1)) % (src->size + 1); len = MIN (len, n); if (len == 0) { return (0); } /* Copy data from src scbuf to dst obj. Do the scbuf hokey-pokey and * wrap-around the buffer at most once. Break out if putf() returns * either an ERR or a short count. */ i_src = (src->i_out - len + (src->size + 1)) % (src->size + 1); nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (src->size + 1) - i_src); m = putf (&src->data[i_src], dst, n); if (m > 0) { nleft -= m; i_src = (i_src + m) % (src->size + 1); } if (n != m) { break; /* got ERR or "short" putf() */ } } /* Compute number of bytes written to dst obj. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the ERR reported by putf(). */ if (n == 0) { return (m); } return (n); } static int scbuf_writer (scbuf_t dst, int len, scbuf_iof getf, void *src, int *ndropped, int secure_malloc_flag) { /* Writes up to [len] bytes from the object pointed at by [src] into [dst]. * The I/O function [getf] specifies how data is read from [src]. * Returns the number of bytes written, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. * Note that [src] is a value-result parameter and will be "moved forward" * by the number of bytes read from it. */ int nfree, nleft, nrepl, n, m; int i_dst; assert (dst != NULL); assert (len > 0); assert (getf != NULL); assert (src != NULL); assert (scbuf_mutex_is_locked (dst)); /* Attempt to grow dst scbuf if necessary. */ nfree = dst->size - dst->used; if ((len > nfree) && (dst->size < dst->maxsize)) { nfree += scbuf_grow (dst, len - nfree, secure_malloc_flag); } /* Compute number of bytes to write to dst scbuf. */ if (dst->overwrite == SCBUF_NO_DROP) { len = MIN (len, dst->size - dst->used); if (len == 0) { errno = ENOSPC; return (-1); } } else if (dst->overwrite == SCBUF_WRAP_ONCE) { len = MIN (len, dst->size); } /* Copy data from src obj to dst scbuf. Do the scbuf hokey-pokey and * wrap-around the buffer as needed. Break out if getf() returns * either an EOF/ERR or a short count. */ i_dst = dst->i_in; nleft = len; m = 0; while (nleft > 0) { n = MIN (nleft, (dst->size + 1) - i_dst); m = getf (&dst->data[i_dst], src, n); if (m > 0) { nleft -= m; i_dst = (i_dst + m) % (dst->size + 1); } if (n != m) { break; /* got EOF/ERR or "short" getf() */ } } /* Compute number of bytes written to dst scbuf. */ n = len - nleft; assert ((n >= 0) && (n <= len)); /* * If no data has been written, return the EOF/ERR reported by getf(). */ if (n == 0) { return (m); } /* Update dst scbuf metadata. */ if (n > 0) { nrepl = (dst->i_out - dst->i_rep + (dst->size + 1)) % (dst->size + 1); dst->used = MIN (dst->used + n, dst->size); assert (i_dst == (dst->i_in + n) % (dst->size + 1)); dst->i_in = i_dst; if (n > nfree - nrepl) { dst->got_wrap = 1; dst->i_rep = (dst->i_in + 1) % (dst->size + 1); } if (n > nfree) { dst->i_out = dst->i_rep; } } if (ndropped) { *ndropped = MAX (0, n - nfree); } return (n); } static int scbuf_grow (scbuf_t cb, int n, int secure_malloc_flag) { /* Attempts to grow the circular buffer [cb] by at least [n] bytes. * Returns the number of bytes by which the buffer has grown (which may be * less-than, equal-to, or greater-than the number of bytes requested). */ unsigned char *data; unsigned char *new_data; int size_old, size_meta; int m; assert (cb != NULL); assert (n > 0); assert (scbuf_mutex_is_locked (cb)); if (cb->size == cb->maxsize) { return (0); } size_old = cb->size; size_meta = cb->alloc - cb->size; /* size of sentinel & magic cookies */ assert (size_meta > 0); /* Attempt to grow data buffer by multiples of the chunk-size. */ m = cb->alloc + n; m = m + (SCBUF_CHUNK - (m % SCBUF_CHUNK)); m = MIN (m, (cb->maxsize + size_meta)); assert (m > cb->alloc); data = cb->data; #ifndef NDEBUG data -= SCBUF_MAGIC_LEN; /* jump back to what malloc returned */ #endif /* !NDEBUG */ if (secure_malloc_flag) { if (!(new_data = secure_malloc(m))) { /* * XXX: Set flag or somesuch to prevent regrowing when out of memory? */ return (0); /* unable to grow data buffer */ } } else { if (!(data = realloc (data, m))) { /* * XXX: Set flag or somesuch to prevent regrowing when out of memory? */ return (0); /* unable to grow data buffer */ } } if (secure_malloc_flag) { secure_free(data, cb->alloc); cb->data = new_data; } else cb->data = data; cb->alloc = m; cb->size = m - size_meta; #ifndef NDEBUG /* A round cookie with one bite out of it looks like a C. * The underflow cookie will have been copied by realloc() if needed. * But the overflow cookie must be rebaked. * Must use memcpy since overflow cookie may not be word-aligned. */ cb->data += SCBUF_MAGIC_LEN; /* jump forward past underflow magic */ memcpy (cb->data + cb->size + 1, (void *) &cb->magic, SCBUF_MAGIC_LEN); #endif /* !NDEBUG */ /* The memory containing replay and unread data must be contiguous modulo * the buffer size. Additional memory must be inserted between where * new data is written in (i_in) and where replay data starts (i_rep). * If replay data wraps-around the old buffer, move it to the new end * of the buffer so it wraps-around in the same manner. */ if (cb->i_rep > cb->i_in) { n = (size_old + 1) - cb->i_rep; m = (cb->size + 1) - n; memmove (cb->data + m, cb->data + cb->i_rep, n); if (cb->i_out >= cb->i_rep) { cb->i_out += m - cb->i_rep; } cb->i_rep = m; } assert (scbuf_is_valid (cb)); return (cb->size - size_old); } static int scbuf_shrink (scbuf_t cb) { /* XXX: DOCUMENT ME. */ assert (cb != NULL); assert (scbuf_mutex_is_locked (cb)); assert (scbuf_is_valid (cb)); if (cb->size == cb->minsize) { return (0); } if (cb->size - cb->used <= SCBUF_CHUNK) { return (0); } /* FIXME: NOT IMPLEMENTED. */ assert (scbuf_is_valid (cb)); return (0); } #ifndef NDEBUG #ifdef WITH_PTHREADS static int scbuf_mutex_is_locked (scbuf_t cb) { /* Returns true if the mutex is locked; o/w, returns false. */ int rc; assert (cb != NULL); rc = pthread_mutex_trylock (&cb->mutex); return (rc == EBUSY ? 1 : 0); } #endif /* WITH_PTHREADS */ #endif /* !NDEBUG */ #ifndef NDEBUG static int scbuf_is_valid (scbuf_t cb) { /* Validates the data structure. All invariants should be tested here. * Returns true if everything is valid; o/w, aborts due to assertion failure. */ int nfree; assert (cb != NULL); assert (scbuf_mutex_is_locked (cb)); assert (cb->data != NULL); assert (cb->magic == SCBUF_MAGIC); /* * Must use memcmp since overflow cookie may not be word-aligned. */ assert (memcmp (cb->data - SCBUF_MAGIC_LEN, (void *) &cb->magic, SCBUF_MAGIC_LEN) == 0); assert (memcmp (cb->data + cb->size + 1, (void *) &cb->magic, SCBUF_MAGIC_LEN) == 0); assert (cb->alloc > 0); assert (cb->alloc > cb->size); assert (cb->size > 0); assert (cb->size >= cb->minsize); assert (cb->size <= cb->maxsize); assert (cb->minsize > 0); assert (cb->maxsize > 0); assert (cb->used >= 0); assert (cb->used <= cb->size); assert (cb->overwrite == SCBUF_NO_DROP || cb->overwrite == SCBUF_WRAP_ONCE || cb->overwrite == SCBUF_WRAP_MANY); assert (cb->got_wrap || !cb->i_rep);/* i_rep = 0 if data has not wrapped */ assert (cb->i_in >= 0); assert (cb->i_in <= cb->size); assert (cb->i_out >= 0); assert (cb->i_out <= cb->size); assert (cb->i_rep >= 0); assert (cb->i_rep <= cb->size); if (cb->i_in >= cb->i_out) { assert ((cb->i_rep > cb->i_in) || (cb->i_rep <= cb->i_out)); } else /* if (cb->in < cb->i_out) */ { assert ((cb->i_rep > cb->i_in) && (cb->i_rep <= cb->i_out)); } nfree = (cb->i_out - cb->i_in - 1 + (cb->size + 1)) % (cb->size + 1); assert (cb->size - cb->used == nfree); return (1); } #endif /* !NDEBUG */ freeipmi-1.6.4/libipmiconsole/scbuf.h0000644002055400205540000003320113527331637017546 0ustar00achuachu00000000000000/***************************************************************************** * $Id: scbuf.h,v 1.3 2009-03-03 23:56:52 chu11 Exp $ ***************************************************************************** * Copyright (C) 2002-2005 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Chris Dunlap . * * This file is from LSD-Tools, the LLNL Software Development Toolbox. * * LSD-Tools is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * LSD-Tools is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for * more details. * * You should have received a copy of the GNU General Public License along * with LSD-Tools; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. *****************************************************************************/ /* * achu: This is identical to the original cbuf code but with some * secure malloc changes. Outside of the minor code differences, * 'cbuf' has been renamed to 'scbuf' pretty much globally. */ #ifndef LSD_SCBUF_H #define LSD_SCBUF_H /***************************************************************************** * Notes *****************************************************************************/ /* * Scbuf is a circular-buffer capable of dynamically resizing itself. * Unread data in the buffer will be overwritten once the scbuf has * reached its maximum size or is unable to allocate additional memory. * * The SCBUF_OPT_OVERWRITE option specifies how unread scbuf data will * be overwritten. If set to SCBUF_NO_DROP, unread data will never be * overwritten; writes into the scbuf will return -1 with ENOSPC. If set * to SCBUF_WRAP_ONCE, a single write operation will wrap-around the buffer * at most once, and up to scbuf_used() bytes of data may be overwritten. * If set to SCBUF_WRAP_MANY, a single write operation will wrap-around the * buffer as many times as needed in order to write all of the data. * * If NDEBUG is not defined, internal debug code will be enabled. This is * intended for development use only and production code should define NDEBUG. * * If WITH_LSD_FATAL_ERROR_FUNC is defined, the linker will expect to * find an external lsd_fatal_error(file,line,mesg) function. By default, * lsd_fatal_error(file,line,mesg) is a macro definition that outputs an * error message to stderr. This macro may be redefined to invoke another * routine instead. * * If WITH_LSD_NOMEM_ERROR_FUNC is defined, the linker will expect to * find an external lsd_nomem_error(file,line,mesg) function. By default, * lsd_nomem_error(file,line,mesg) is a macro definition that returns NULL. * This macro may be redefined to invoke another routine instead. * * If WITH_PTHREADS is defined, these routines will be thread-safe. */ /***************************************************************************** * Data Types *****************************************************************************/ typedef struct scbuf * scbuf_t; /* circular-buffer opaque data type */ typedef enum { /* scbuf option names */ SCBUF_OPT_OVERWRITE } scbuf_opt_t; typedef enum { /* SCBUF_OPT_OVERWRITE values: */ SCBUF_NO_DROP, /* -never drop data, ENOSPC if full */ SCBUF_WRAP_ONCE, /* -drop data, wrapping at most once */ SCBUF_WRAP_MANY /* -drop data, wrapping as needed */ } scbuf_overwrite_t; /***************************************************************************** * Functions *****************************************************************************/ scbuf_t scbuf_create (int minsize, int maxsize, int secure_malloc_flag); /* * Creates and returns a new circular buffer, or lsd_nomem_error() on failure. * The buffer is initially allocated to hold [minsize] bytes of data, * but can attempt to grow up to [maxsize] bytes before overwriting data. * Set minsize = maxsize to prevent scbuf from dynamically resizing itself. * The default overwrite option behavior is SCBUF_WRAP_MANY. * Abandoning a scbuf without calling scbuf_destroy() will cause a memory leak. */ void scbuf_destroy (scbuf_t cb, int secure_malloc_flag); /* * Destroys the circular buffer [cb]. */ void scbuf_flush (scbuf_t cb); /* * Flushes all data (including replay data) in [cb]. */ int scbuf_size (scbuf_t cb); /* * Returns the maximum size of the buffer allocated to [cb] * (ie, the number of bytes it can currently hold). */ int scbuf_free (scbuf_t cb); /* * Returns the number of bytes in [cb] available for writing before unread * data is overwritten (assuming the scbuf can resize itself if needed). */ int scbuf_used (scbuf_t cb); /* * Returns the number of bytes in [cb] available for reading. */ int scbuf_lines_used (scbuf_t cb); /* * Returns the number of lines in [cb] available for reading. */ int scbuf_reused (scbuf_t cb); /* * Returns the number of bytes in [cb] available for replaying/rewinding. */ int scbuf_lines_reused (scbuf_t cb); /* * Returns the number of lines in [cb] available for replaying/rewinding. */ int scbuf_is_empty (scbuf_t cb); /* * Returns non-zero if [cb] is empty; o/w, returns zero. */ int scbuf_opt_get (scbuf_t cb, scbuf_opt_t name, int *value); /* * Gets the [name] option for [cb] and sets [value] to the result. * Returns 0 on success, or -1 on error (with errno set). */ int scbuf_opt_set (scbuf_t cb, scbuf_opt_t name, int value); /* * Sets the [name] option for [cb] to [value]. * Returns 0 on success, or -1 on error (with errno set). */ int scbuf_drop (scbuf_t src, int len); /* * Discards up to [len] bytes of unread data from [src]; * if [len] is -1, all unread data will be dropped. * Dropped data is still available via the replay buffer. * Returns the number of bytes dropped, or -1 on error (with errno set). */ int scbuf_peek (scbuf_t src, void *dstbuf, int len); /* * Reads up to [len] bytes of data from the [src] scbuf into [dstbuf], * but does not consume the data read from the scbuf. * The "peek" can be committed to the scbuf via a call to scbuf_drop(), * but the peek+drop combination is not atomic. * Returns the number of bytes read, or -1 on error (with errno set). */ int scbuf_read (scbuf_t src, void *dstbuf, int len); /* * Reads up to [len] bytes of data from the [src] scbuf into [dstbuf]. * Returns the number of bytes read, or -1 on error (with errno set). */ int scbuf_replay (scbuf_t src, void *dstbuf, int len); /* * Replays up to [len] bytes of previously read data from the [src] scbuf * into [dstbuf]. * Returns the number of bytes replayed, or -1 on error (with errno set). */ int scbuf_rewind (scbuf_t src, int len); /* * Rewinds [src] by up to [len] bytes, placing previously read data back in * the unread data buffer; if [len] is -1, all replay data will be rewound. * Returns the number of bytes rewound, or -1 on error (with errno set). */ int scbuf_write (scbuf_t dst, void *srscbuf, int len, int *ndropped, int secure_malloc_flag); /* * Writes up to [len] bytes of data from [srscbuf] into the [dst] scbuf * according to dst's SCBUF_OPT_OVERWRITE behavior. * Returns the number of bytes written, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int scbuf_drop_line (scbuf_t src, int len, int lines); /* * Discards the specified [lines] of data from [src]. If [lines] is -1, * discards the maximum number of lines comprised of up to [len] characters. * Dropped data is still available via the replay buffer. * Returns the number of bytes dropped, or -1 on error (with errno set). * Returns 0 if the number of lines is not available (ie, all or none). */ int scbuf_peek_line (scbuf_t src, char *dstbuf, int len, int lines); /* * Reads the specified [lines] of data from the [src] scbuf into [dstbuf], * but does not consume the data read from the scbuf. If [lines] is -1, * reads the maximum number of lines that [dstbuf] can hold. The buffer * will be NUL-terminated and contain at most ([len] - 1) characters. * The "peek" can be committed to the scbuf via a call to scbuf_drop(), * but the peek+drop combination is not atomic. * Returns strlen of the line(s) on success; truncation occurred if >= [len]. * Returns 0 if the number of lines is not available (ie, all or none). * Returns -1 on error (with errno set). */ int scbuf_read_line (scbuf_t src, char *dstbuf, int len, int lines); /* * Reads the specified [lines] of data from the [src] scbuf into [dstbuf]. * If [lines] is -1, reads the maximum number of lines that [dstbuf] * can hold. The buffer will be NUL-terminated and contain at most * ([len] - 1) characters. * Returns strlen of the line(s) on success; truncation occurred if >= [len], * in which case excess line data is discarded. Returns 0 if the number * of lines is not available (ie, all or none), in which case no data is * consumed. Returns -1 on error (with errno set). */ int scbuf_replay_line (scbuf_t src, char *dstbuf, int len, int lines); /* * Replays the specified [lines] of data from the [src] scbuf into [dstbuf]. * If [lines] is -1, replays the maximum number of lines that [dstbuf] * can hold. A newline will be appended to [dstbuf] if the last (ie, most * recently read) line does not contain a trailing newline. The buffer * will be NUL-terminated and contain at most ([len] - 1) characters. * Returns strlen of the line(s) on success; truncation occurred if >= [len]. * Returns 0 if the number of lines is not available (ie, all or none). * Returns -1 on error (with errno set). */ int scbuf_rewind_line (scbuf_t src, int len, int lines); /* * Rewinds [src] by the specified [lines] of data, placing previously read * data back in the unread data buffer. If [lines] is -1, rewinds the * maximum number of lines comprised of up to [len] characters. * Returns the number of bytes rewound, or -1 on error (with errno set). * Returns 0 if the number of lines is not available (ie, all or none). */ int scbuf_write_line (scbuf_t dst, char *srscbuf, int *ndropped, int secure_malloc_flag); /* * Writes the entire NUL-terminated [srscbuf] string into the [dst] scbuf * according to dst's SCBUF_OPT_OVERWRITE behavior. A newline will be * appended to the scbuf if [srscbuf] does not contain a trailing newline. * Returns the number of bytes written, or -1 or error (with errno set). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int scbuf_peek_to_fd (scbuf_t src, int dstfd, int len); /* * Reads up to [len] bytes of data from the [src] scbuf into the file * referenced by the [dstfd] file descriptor, but does not consume the * data read from the scbuf. If [len] is -1, it will be set to the number * of [src] bytes available for reading. * The "peek" can be committed to the scbuf via a call to scbuf_drop(), * but the peek+drop combination is not atomic. * Returns the number of bytes read, or -1 on error (with errno set). */ int scbuf_read_to_fd (scbuf_t src, int dstfd, int len); /* * Reads up to [len] bytes of data from the [src] scbuf into the file * referenced by the [dstfd] file descriptor. If [len] is -1, it will * be set to the number of [src] bytes available for reading. * Returns the number of bytes read, or -1 on error (with errno set). */ int scbuf_replay_to_fd (scbuf_t src, int dstfd, int len); /* * Replays up to [len] bytes of previously read data from the [src] scbuf into * the file referenced by the [dstfd] file descriptor. If [len] is -1, it * will be set to the maximum number of [src] bytes available for replay. * Returns the number of bytes replayed, or -1 on error (with errno set). */ int scbuf_write_from_fd (scbuf_t dst, int srcfd, int len, int *ndropped, int secure_malloc_flag); /* * Writes up to [len] bytes of data from the file referenced by the * [srcfd] file descriptor into the [dst] scbuf according to dst's * SCBUF_OPT_OVERWRITE behavior. If [len] is -1, it will be set to * an appropriate chunk size. * Returns the number of bytes written, 0 on EOF, or -1 on error (with errno). * Sets [ndropped] (if not NULL) to the number of bytes overwritten. */ int scbuf_copy (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag); /* * Copies up to [len] bytes of data from the [src] scbuf into the [dst] scbuf * according to dst's SCBUF_OPT_OVERWRITE behavior. If [len] is -1, * it will be set to the number of [src] bytes available for reading. * Returns the number of bytes copied, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ int scbuf_move (scbuf_t src, scbuf_t dst, int len, int *ndropped, int secure_malloc_flag); /* * Moves up to [len] bytes of data from the [src] scbuf into the [dst] scbuf * according to dst's SCBUF_OPT_OVERWRITE behavior. If [len] is -1, * it will be set to the number of [src] bytes available for reading. * Returns the number of bytes moved, or -1 on error (with errno set). * Sets [ndropped] (if not NULL) to the number of [dst] bytes overwritten. */ #endif /* !LSD_SCBUF_H */ freeipmi-1.6.4/libipmiconsole/ipmiconsole.map0000644002055400205540000000125513527331637021317 0ustar00achuachu00000000000000{ global: ipmiconsole_engine_init; ipmiconsole_engine_submit; ipmiconsole_engine_submit_block; ipmiconsole_engine_teardown; ipmiconsole_ctx_create; ipmiconsole_ctx_set_config; ipmiconsole_ctx_get_config; ipmiconsole_ctx_errnum; ipmiconsole_ctx_strerror; ipmiconsole_ctx_errormsg; ipmiconsole_ctx_status; ipmiconsole_ctx_fd; ipmiconsole_ctx_generate_break; ipmiconsole_ctx_destroy; ipmiconsole_username_is_valid; ipmiconsole_password_is_valid; ipmiconsole_k_g_is_valid; ipmiconsole_privilege_level_is_valid; ipmiconsole_cipher_suite_id_is_valid; ipmiconsole_workaround_flags_is_valid; local: *; }; freeipmi-1.6.4/libipmimonitoring/0000755002055400205540000000000013527342545017017 5ustar00achuachu00000000000000freeipmi-1.6.4/libipmimonitoring/Makefile.in0000644002055400205540000011537313527342446021076 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libipmimonitoring DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/ipmi_monitoring.h.in \ $(srcdir)/libipmimonitoring.pc.in $(top_srcdir)/config/depcomp \ $(include_HEADERS) $(noinst_HEADERS) ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = ipmi_monitoring.h libipmimonitoring.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libipmimonitoring_la_DEPENDENCIES = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la am_libipmimonitoring_la_OBJECTS = \ libipmimonitoring_la-ipmi_monitoring.lo \ libipmimonitoring_la-ipmi_monitoring_debug.lo \ libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo \ libipmimonitoring_la-ipmi_monitoring_parse_common.lo \ libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo \ libipmimonitoring_la-ipmi_monitoring_sel.lo \ libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo libipmimonitoring_la_OBJECTS = $(am_libipmimonitoring_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libipmimonitoring_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libipmimonitoring_la_LDFLAGS) \ $(LDFLAGS) -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libipmimonitoring_la_SOURCES) DIST_SOURCES = $(libipmimonitoring_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(include_HEADERS) $(nodist_include_HEADERS) \ $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_PKG_CONFIG_TRUE@pkgconfig_DATA = libipmimonitoring.pc @WITH_GNU_LD_TRUE@VERSION_SCRIPT = $(srcdir)/ipmimonitoring.map @WITH_GNU_LD_TRUE@OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) noinst_HEADERS = \ ipmi_monitoring_debug.h \ ipmi_monitoring_defs.h \ ipmi_monitoring_ipmi_communication.h \ ipmi_monitoring_parse_common.h \ ipmi_monitoring_sdr_cache.h \ ipmi_monitoring_sel.h \ ipmi_monitoring_sensor_reading.h nodist_include_HEADERS = \ ipmi_monitoring.h include_HEADERS = \ ipmi_monitoring_bitmasks.h \ ipmi_monitoring_offsets.h lib_LTLIBRARIES = libipmimonitoring.la libipmimonitoring_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libipmimonitoring_la_LDFLAGS = \ -version-info @LIBIPMIMONITORING_VERSION_INFO@ \ $(OTHER_FLAGS) libipmimonitoring_la_LIBADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la libipmimonitoring_la_SOURCES = \ ipmi_monitoring.c \ ipmi_monitoring_debug.c \ ipmi_monitoring_ipmi_communication.c \ ipmi_monitoring_parse_common.c \ ipmi_monitoring_sdr_cache.c \ ipmi_monitoring_sel.c \ ipmi_monitoring_sensor_reading.c IPMISDRCACHEdir = $(IPMI_MONITORING_SDR_CACHE_DIR) EXTRA_DIST = ipmimonitoring.map all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libipmimonitoring/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libipmimonitoring/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ipmi_monitoring.h: $(top_builddir)/config.status $(srcdir)/ipmi_monitoring.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmimonitoring.pc: $(top_builddir)/config.status $(srcdir)/libipmimonitoring.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libipmimonitoring.la: $(libipmimonitoring_la_OBJECTS) $(libipmimonitoring_la_DEPENDENCIES) $(EXTRA_libipmimonitoring_la_DEPENDENCIES) $(AM_V_CCLD)$(libipmimonitoring_la_LINK) -rpath $(libdir) $(libipmimonitoring_la_OBJECTS) $(libipmimonitoring_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_debug.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_ipmi_communication.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_parse_common.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sdr_cache.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sel.Plo@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sensor_reading.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libipmimonitoring_la-ipmi_monitoring.lo: ipmi_monitoring.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring.Tpo -c -o libipmimonitoring_la-ipmi_monitoring.lo `test -f 'ipmi_monitoring.c' || echo '$(srcdir)/'`ipmi_monitoring.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring.c' object='libipmimonitoring_la-ipmi_monitoring.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring.lo `test -f 'ipmi_monitoring.c' || echo '$(srcdir)/'`ipmi_monitoring.c libipmimonitoring_la-ipmi_monitoring_debug.lo: ipmi_monitoring_debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_debug.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_debug.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_debug.lo `test -f 'ipmi_monitoring_debug.c' || echo '$(srcdir)/'`ipmi_monitoring_debug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_debug.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_debug.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_debug.c' object='libipmimonitoring_la-ipmi_monitoring_debug.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_debug.lo `test -f 'ipmi_monitoring_debug.c' || echo '$(srcdir)/'`ipmi_monitoring_debug.c libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo: ipmi_monitoring_ipmi_communication.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_ipmi_communication.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo `test -f 'ipmi_monitoring_ipmi_communication.c' || echo '$(srcdir)/'`ipmi_monitoring_ipmi_communication.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_ipmi_communication.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_ipmi_communication.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_ipmi_communication.c' object='libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_ipmi_communication.lo `test -f 'ipmi_monitoring_ipmi_communication.c' || echo '$(srcdir)/'`ipmi_monitoring_ipmi_communication.c libipmimonitoring_la-ipmi_monitoring_parse_common.lo: ipmi_monitoring_parse_common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_parse_common.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_parse_common.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_parse_common.lo `test -f 'ipmi_monitoring_parse_common.c' || echo '$(srcdir)/'`ipmi_monitoring_parse_common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_parse_common.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_parse_common.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_parse_common.c' object='libipmimonitoring_la-ipmi_monitoring_parse_common.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_parse_common.lo `test -f 'ipmi_monitoring_parse_common.c' || echo '$(srcdir)/'`ipmi_monitoring_parse_common.c libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo: ipmi_monitoring_sdr_cache.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sdr_cache.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo `test -f 'ipmi_monitoring_sdr_cache.c' || echo '$(srcdir)/'`ipmi_monitoring_sdr_cache.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sdr_cache.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sdr_cache.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_sdr_cache.c' object='libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_sdr_cache.lo `test -f 'ipmi_monitoring_sdr_cache.c' || echo '$(srcdir)/'`ipmi_monitoring_sdr_cache.c libipmimonitoring_la-ipmi_monitoring_sel.lo: ipmi_monitoring_sel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_sel.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sel.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_sel.lo `test -f 'ipmi_monitoring_sel.c' || echo '$(srcdir)/'`ipmi_monitoring_sel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sel.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sel.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_sel.c' object='libipmimonitoring_la-ipmi_monitoring_sel.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_sel.lo `test -f 'ipmi_monitoring_sel.c' || echo '$(srcdir)/'`ipmi_monitoring_sel.c libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo: ipmi_monitoring_sensor_reading.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo -MD -MP -MF $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sensor_reading.Tpo -c -o libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo `test -f 'ipmi_monitoring_sensor_reading.c' || echo '$(srcdir)/'`ipmi_monitoring_sensor_reading.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sensor_reading.Tpo $(DEPDIR)/libipmimonitoring_la-ipmi_monitoring_sensor_reading.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi_monitoring_sensor_reading.c' object='libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmimonitoring_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmimonitoring_la-ipmi_monitoring_sensor_reading.lo `test -f 'ipmi_monitoring_sensor_reading.c' || echo '$(srcdir)/'`ipmi_monitoring_sensor_reading.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-includeHEADERS: $(include_HEADERS) @$(NORMAL_INSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-includeHEADERS \ install-nodist_includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-includeHEADERS uninstall-libLTLIBRARIES \ uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-includeHEADERS install-info install-info-am \ install-libLTLIBRARIES install-man \ install-nodist_includeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-includeHEADERS \ uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS \ uninstall-pkgconfigDATA $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(IPMISDRCACHEdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/libipmimonitoring/Makefile.am0000644002055400205540000000351313527331637021055 0ustar00achuachu00000000000000if WITH_PKG_CONFIG pkgconfig_DATA = libipmimonitoring.pc endif if WITH_GNU_LD VERSION_SCRIPT = $(srcdir)/ipmimonitoring.map OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) endif noinst_HEADERS = \ ipmi_monitoring_debug.h \ ipmi_monitoring_defs.h \ ipmi_monitoring_ipmi_communication.h \ ipmi_monitoring_parse_common.h \ ipmi_monitoring_sdr_cache.h \ ipmi_monitoring_sel.h \ ipmi_monitoring_sensor_reading.h nodist_include_HEADERS = \ ipmi_monitoring.h include_HEADERS = \ ipmi_monitoring_bitmasks.h \ ipmi_monitoring_offsets.h lib_LTLIBRARIES = libipmimonitoring.la libipmimonitoring_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT libipmimonitoring_la_LDFLAGS = \ -version-info @LIBIPMIMONITORING_VERSION_INFO@ \ $(OTHER_FLAGS) libipmimonitoring_la_LIBADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la libipmimonitoring_la_SOURCES = \ ipmi_monitoring.c \ ipmi_monitoring_debug.c \ ipmi_monitoring_ipmi_communication.c \ ipmi_monitoring_parse_common.c \ ipmi_monitoring_sdr_cache.c \ ipmi_monitoring_sel.c \ ipmi_monitoring_sensor_reading.c $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: IPMISDRCACHEdir = $(IPMI_MONITORING_SDR_CACHE_DIR) install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(IPMISDRCACHEdir) EXTRA_DIST = ipmimonitoring.map freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring.h.in0000644002055400205540000012134713527331637023010 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring.h,v 1.69 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_H #define IPMI_MONITORING_H #ifdef __cplusplus extern "C" { #endif /* * Libipmimonitoring version * * MAJOR - Incremented when interfaces are changed or removed. * Interfaces may be binary incompatible. When incremented, MINOR * and PATCH are zeroed. * * MINOR - Incremented when interfaces are added. Interfaces are * binary compatible with older minor versions. When incremented, * PATCH is zeroed. * * PATCH - Incremented when interfaces are not changed. Typically * incremented due to bug fixes or minor features. Interfaces are * forward and backward compatible to other PATCH versions. */ #define LIBIPMIMONITORING_VERSION_MAJOR @LIBIPMIMONITORING_VERSION_MAJOR@ #define LIBIPMIMONITORING_VERSION_MINOR @LIBIPMIMONITORING_VERSION_MINOR@ #define LIBIPMIMONITORING_VERSION_PATCH @LIBIPMIMONITORING_VERSION_PATCH@ enum ipmi_monitoring_error_codes { IPMI_MONITORING_ERR_SUCCESS = 0, IPMI_MONITORING_ERR_CTX_NULL = 1, IPMI_MONITORING_ERR_CTX_INVALID = 2, IPMI_MONITORING_ERR_PARAMETERS = 3, IPMI_MONITORING_ERR_PERMISSION = 4, IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED = 5, IPMI_MONITORING_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST = 6, IPMI_MONITORING_ERR_SEL_CONFIG_FILE_PARSE = 7, IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST = 8, IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_PARSE = 9, IPMI_MONITORING_ERR_SDR_CACHE_PERMISSION = 10, IPMI_MONITORING_ERR_SDR_CACHE_FILESYSTEM = 11, IPMI_MONITORING_ERR_HOSTNAME_INVALID = 12, IPMI_MONITORING_ERR_SENSOR_NOT_FOUND = 13, IPMI_MONITORING_ERR_NO_SEL_RECORDS = 14, IPMI_MONITORING_ERR_SEL_RECORDS_LIST_END = 15, IPMI_MONITORING_ERR_SEL_RECORD_DATA_NOT_AVAILABLE = 16, IPMI_MONITORING_ERR_NO_SENSOR_READINGS = 17, IPMI_MONITORING_ERR_SENSOR_READINGS_LIST_END = 18, IPMI_MONITORING_ERR_CONNECTION_TIMEOUT = 19, IPMI_MONITORING_ERR_SESSION_TIMEOUT = 20, IPMI_MONITORING_ERR_USERNAME_INVALID = 21, IPMI_MONITORING_ERR_PASSWORD_INVALID = 22, IPMI_MONITORING_ERR_PASSWORD_VERIFICATION_TIMEOUT = 23, IPMI_MONITORING_ERR_K_G_INVALID = 24, IPMI_MONITORING_ERR_PRIVILEGE_LEVEL_INSUFFICIENT = 25, IPMI_MONITORING_ERR_PRIVILEGEL_LEVEL_CANNOT_BE_OBTAINED = 26, IPMI_MONITORING_ERR_AUTHENTICATION_TYPE_UNAVAILABLE = 27, IPMI_MONITORING_ERR_IPMI_2_0_UNAVAILABLE = 28, IPMI_MONITORING_ERR_CIPHER_SUITE_ID_UNAVAILABLE = 29, IPMI_MONITORING_ERR_CALLBACK_ERROR = 30, IPMI_MONITORING_ERR_BMC_BUSY = 31, IPMI_MONITORING_ERR_OUT_OF_MEMORY = 32, IPMI_MONITORING_ERR_IPMI_ERROR = 33, IPMI_MONITORING_ERR_SYSTEM_ERROR = 34, IPMI_MONITORING_ERR_INTERNAL_ERROR = 35, IPMI_MONITORING_ERR_ERRNUMRANGE = 36, }; enum ipmi_monitoring_state { IPMI_MONITORING_STATE_NOMINAL = 0x00, IPMI_MONITORING_STATE_WARNING = 0x01, IPMI_MONITORING_STATE_CRITICAL = 0x02, IPMI_MONITORING_STATE_UNKNOWN = 0x03, }; enum ipmi_monitoring_sel_record_type_class { IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD = 0x00, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD = 0x01, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD = 0x02, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_UNKNOWN = 0x03, }; enum ipmi_monitoring_sensor_type { IPMI_MONITORING_SENSOR_TYPE_RESERVED = 0x00, IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE = 0x01, IPMI_MONITORING_SENSOR_TYPE_VOLTAGE = 0x02, IPMI_MONITORING_SENSOR_TYPE_CURRENT = 0x03, IPMI_MONITORING_SENSOR_TYPE_FAN = 0x04, IPMI_MONITORING_SENSOR_TYPE_PHYSICAL_SECURITY = 0x05, IPMI_MONITORING_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT = 0x06, IPMI_MONITORING_SENSOR_TYPE_PROCESSOR = 0x07, IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY = 0x08, IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT = 0x09, IPMI_MONITORING_SENSOR_TYPE_COOLING_DEVICE = 0x0A, IPMI_MONITORING_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR = 0x0B, IPMI_MONITORING_SENSOR_TYPE_MEMORY = 0x0C, IPMI_MONITORING_SENSOR_TYPE_DRIVE_SLOT = 0x0D, IPMI_MONITORING_SENSOR_TYPE_POST_MEMORY_RESIZE = 0x0E, IPMI_MONITORING_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS = 0x0F, IPMI_MONITORING_SENSOR_TYPE_EVENT_LOGGING_DISABLED = 0x10, IPMI_MONITORING_SENSOR_TYPE_WATCHDOG1 = 0x11, IPMI_MONITORING_SENSOR_TYPE_SYSTEM_EVENT = 0x12, IPMI_MONITORING_SENSOR_TYPE_CRITICAL_INTERRUPT = 0x13, IPMI_MONITORING_SENSOR_TYPE_BUTTON_SWITCH = 0x14, IPMI_MONITORING_SENSOR_TYPE_MODULE_BOARD = 0x15, IPMI_MONITORING_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR = 0x16, IPMI_MONITORING_SENSOR_TYPE_ADD_IN_CARD = 0x17, IPMI_MONITORING_SENSOR_TYPE_CHASSIS = 0x18, IPMI_MONITORING_SENSOR_TYPE_CHIP_SET = 0x19, IPMI_MONITORING_SENSOR_TYPE_OTHER_FRU = 0x1A, IPMI_MONITORING_SENSOR_TYPE_CABLE_INTERCONNECT = 0x1B, IPMI_MONITORING_SENSOR_TYPE_TERMINATOR = 0x1C, IPMI_MONITORING_SENSOR_TYPE_SYSTEM_BOOT_INITIATED = 0x1D, IPMI_MONITORING_SENSOR_TYPE_BOOT_ERROR = 0x1E, IPMI_MONITORING_SENSOR_TYPE_OS_BOOT = 0x1F, IPMI_MONITORING_SENSOR_TYPE_OS_CRITICAL_STOP = 0x20, IPMI_MONITORING_SENSOR_TYPE_SLOT_CONNECTOR = 0x21, IPMI_MONITORING_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE = 0x22, IPMI_MONITORING_SENSOR_TYPE_WATCHDOG2 = 0x23, IPMI_MONITORING_SENSOR_TYPE_PLATFORM_ALERT = 0x24, IPMI_MONITORING_SENSOR_TYPE_ENTITY_PRESENCE = 0x25, IPMI_MONITORING_SENSOR_TYPE_MONITOR_ASIC_IC = 0x26, IPMI_MONITORING_SENSOR_TYPE_LAN = 0x27, IPMI_MONITORING_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH = 0x28, IPMI_MONITORING_SENSOR_TYPE_BATTERY = 0x29, IPMI_MONITORING_SENSOR_TYPE_SESSION_AUDIT = 0x2A, IPMI_MONITORING_SENSOR_TYPE_VERSION_CHANGE = 0x2B, IPMI_MONITORING_SENSOR_TYPE_FRU_STATE = 0x2C, /* 0x2D - 0xBF - RESERVED */ /* 0xC0 - 0xFF - OEM sensor types */ IPMI_MONITORING_SENSOR_TYPE_OEM_MIN = 0xC0, IPMI_MONITORING_SENSOR_TYPE_OEM_MAX = 0xFF, IPMI_MONITORING_SENSOR_TYPE_UNKNOWN = 0xFFFF, }; enum ipmi_monitoring_sel_event_direction { IPMI_MONITORING_SEL_EVENT_DIRECTION_ASSERTION = 0x00, IPMI_MONITORING_SEL_EVENT_DIRECTION_DEASSERTION = 0x01, }; enum ipmi_monitoring_sensor_units { IPMI_MONITORING_SENSOR_UNITS_NONE = 0x00, IPMI_MONITORING_SENSOR_UNITS_CELSIUS = 0x01, IPMI_MONITORING_SENSOR_UNITS_FAHRENHEIT = 0x02, IPMI_MONITORING_SENSOR_UNITS_VOLTS = 0x03, IPMI_MONITORING_SENSOR_UNITS_AMPS = 0x04, IPMI_MONITORING_SENSOR_UNITS_RPM = 0x05, IPMI_MONITORING_SENSOR_UNITS_WATTS = 0x06, IPMI_MONITORING_SENSOR_UNITS_PERCENT = 0x07, /* 0x08 - 0xFE - reserved for ipmimonitoring */ IPMI_MONITORING_SENSOR_UNITS_UNKNOWN = 0xFF, }; enum ipmi_monitoring_sensor_reading_type { IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER8_BOOL = 0x00, IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER32 = 0x01, IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE = 0x02, /* 0x03 - 0xFE - reserved for ipmimonitoring */ IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN = 0xFF, }; enum ipmi_monitoring_driver_type { IPMI_MONITORING_DRIVER_TYPE_KCS = 0x00, IPMI_MONITORING_DRIVER_TYPE_SSIF = 0x01, IPMI_MONITORING_DRIVER_TYPE_OPENIPMI = 0x02, IPMI_MONITORING_DRIVER_TYPE_SUNBMC = 0x03, }; enum ipmi_monitoring_protocol_version { IPMI_MONITORING_PROTOCOL_VERSION_1_5 = 0x00, IPMI_MONITORING_PROTOCOL_VERSION_2_0 = 0x01, }; enum ipmi_monitoring_privilege { IPMI_MONITORING_PRIVILEGE_LEVEL_USER = 0x00, IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR = 0x01, IPMI_MONITORING_PRIVILEGE_LEVEL_ADMIN = 0x02, }; enum ipmi_monitoring_authentication_type { IPMI_MONITORING_AUTHENTICATION_TYPE_NONE = 0x00, IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY = 0x01, IPMI_MONITORING_AUTHENTICATION_TYPE_MD2 = 0x02, IPMI_MONITORING_AUTHENTICATION_TYPE_MD5 = 0x03, }; enum ipmi_monitoring_flags { IPMI_MONITORING_FLAGS_NONE = 0x00, IPMI_MONITORING_FLAGS_DEBUG = 0x01, IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS = 0x02, IPMI_MONITORING_FLAGS_LOCK_MEMORY = 0x04, }; enum ipmi_monitoring_workaround_flags { /* For use w/ IPMI_MONITORING_PROTOCOL_VERSION_1_5 */ IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_AUTHENTICATION_CAPABILITIES = 0x00000001, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_ACCEPT_SESSION_ID_ZERO = 0x00000002, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_FORCE_PERMSG_AUTHENTICATION = 0x00000004, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_CHECK_UNEXPECTED_AUTHCODE = 0x00000008, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_BIG_ENDIAN_SEQUENCE_NUMBER = 0x00000010, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_AUTH_CODE_CHECK = 0x00000020, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_CHECKSUM_CHECK = 0x00000040, /* For use w/ IPMI_MONITORING_PROTOCOL_VERSION_2_0 */ IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_AUTHENTICATION_CAPABILITIES = 0x00000001, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_INTEL_2_0_SESSION = 0x00000002, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUPERMICRO_2_0_SESSION = 0x00000004, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUN_2_0_SESSION = 0x00000008, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_OPEN_SESSION_PRIVILEGE = 0x00000010, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE = 0x00000020, IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NO_CHECKSUM_CHECK = 0x00000040, /* For use w/ an In-band driver */ IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS = 0x00000001, IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_SPIN_POLL = 0x00000002, }; /* REREAD_SDR_CACHE - Re-read the SDR cache * * INTERPRET_OEM_DATA - Attempt to interpret OEM data if read. * * ASSUME_SYSTEM_EVENT_RECORD - If an event record is illegal, assume * it is a bug in the system and actually a system event record. * * ENTITY_SENSOR_NAMES - Return sensor names with appropriate entity * id and instance prefixed when appropriate. * * ASSUME_MAX_SDR_RECORD_COUNT - If motherboard does not implement SDR * record reading properly, do not fail out. Assume a max count. */ enum ipmi_monitoring_sel_flags { IPMI_MONITORING_SEL_FLAGS_REREAD_SDR_CACHE = 0x00000001, IPMI_MONITORING_SEL_FLAGS_INTERPRET_OEM_DATA = 0x00000002, IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD = 0x00000004, IPMI_MONITORING_SEL_FLAGS_ENTITY_SENSOR_NAMES = 0x00000008, IPMI_MONITORING_SEL_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT = 0x00000010, }; /* REREAD_SDR_CACHE - Re-read the SDR cache * * IGNORE_NON_INTERPRETABLE_SENSORS - Do not read sensors that cannot be interpreted. * * BRIDGE_SENSORS - Attempt to bridge sensors not owned by the BMC * * INTERPRET_OEM_DATA - Attempt to interpret OEM data if read. * * SHARED_SENSORS - Iterate through shared sensors if found * * DISCRETE_READING - Allow sensor readings to be read even if the event/reading type * code for the sensor is not valid. This option works around * poorly defined (and arguably illegal) SDR records that list * non-discrete sensor expectations along with discrete state * conditions. * * IGNORE_SCANNING_DISABLED - Ignore the scanning bit and read sensors no matter * what. This option works around motherboards * that incorrectly indicate sensors as disabled. * * ASSUME_BMC_OWNER - Assume the BMC is the sensor owner no matter what. This option * works around motherboards that incorrectly indicate a non-BMC * sensor owner (e.g. usually bridging is required). * * ENTITY_SENSOR_NAMES - Return sensor names with appropriate entity * id and instance prefixed when appropriate. * * ASSUME_MAX_SDR_RECORD_COUNT - If motherboard does not implement SDR * record reading properly, do not fail * out. Assume a max count. */ enum ipmi_monitoring_sensor_reading_flags { IPMI_MONITORING_SENSOR_READING_FLAGS_REREAD_SDR_CACHE = 0x00000001, IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS = 0x00000002, IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS = 0x00000004, IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA = 0x00000008, IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS = 0x00000010, IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING = 0x00000020, IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_SCANNING_DISABLED = 0x00000040, IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_BMC_OWNER = 0x00000080, IPMI_MONITORING_SENSOR_READING_FLAGS_ENTITY_SENSOR_NAMES = 0x00000100, IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT = 0x00000200, IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_UNREADABLE_SENSORS = 0x00000002, /* legacy macro */ }; /* * ipmi_monitoring_ipmi_config * * Configuration information for IPMI Inband monitoring * * driver_type * * Use a specific in-band driver. * * IPMI_MONITORING_DRIVER_TYPE_KCS * IPMI_MONITORING_DRIVER_TYPE_SSIF * IPMI_MONITORING_DRIVER_TYPE_OPENIPMI * IPMI_MONITORING_DRIVER_TYPE_SUNBMC * * Pass < 0 for default of IPMI_MONITORING_DRIVER_TYPE_KCS. * * disable_auto_probe * * Flag informs the library if in-band driver information should be * probed or not. * * driver_address * * Use this specified driver address instead of a probed one. * * register_spacing * * Use this register space instead of the probed one. * * driver_device * * Use this driver device for the IPMI driver. * * Configuration information for IPMI Out-of-Band monitoring * * protocol_version * * Indicate the IPMI protocol version to use * * IPMI_MONITORING_PROTOCOL_VERSION_1_5 * IPMI_MONITORING_PROTOCOL_VERSION_2_0 * * Pass < 0 for default of IPMI_MONITORING_VERSION_1_5. * * username * * BMC username. Pass NULL ptr for NULL username. Maximum length of * 16 bytes. * * password * * BMC password. Pass NULL ptr for NULL password. Maximum length of * 16 bytes for IPMI 1.5, 20 bytes for IPMI 2.0 * * k_g * * BMC Key for 2-key authentication. Pass NULL ptr to use password * as BMC key. The k_g key need not be an ascii string. * * k_g_len * * Length of k_g. Necessary b/c k_g may contain null values or in its * hex key. Maximum length of 20 bytes. * * privilege_level * * privilege level to authenticate with. * * Supported privilege levels: * * IPMI_MONITORING_PRIVILEGE_LEVEL_USER * IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR * IPMI_MONITORING_PRIVILEGE_LEVEL_ADMIN * * Pass < 0 for default of IPMI_MONITORING_PRIVILEGE_LEVEL_USER. * * authentication_type * * authentication type to use * * IPMI_MONITORING_AUTHENTICATION_TYPE_NONE * IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY * IPMI_MONITORING_AUTHENTICATION_TYPE_MD2 * IPMI_MONITORING_AUTHENTICATION_TYPE_MD5 * * Pass < 0 for default of IPMI_MONITORING_AUTHENTICATION_TYPE_MD5. * * cipher_suite_id * * Cipher suite identifier to determine authentication, integrity, * and confidentiality algorithms to use. * * Supported Cipher Suite IDs * (Key: A - Authentication Algorithm * I - Integrity Algorithm * C - Confidentiality Algorithm) * * 0 - A = None; I = None; C = None * 1 - A = HMAC-SHA1; I = None; C = None * 2 - A = HMAC-SHA1; I = HMAC-SHA1-96; C = None * 3 - A = HMAC-SHA1; I = HMAC-SHA1-96; C = AES-CBC-128 * 6 - A = HMAC-MD5; I = None; C = None * 7 - A = HMAC-MD5; I = HMAC-MD5-128; C = None * 8 - A = HMAC-MD5; I = HMAC-MD5-128; C = AES-CBC-128 * 11 - A = HMAC-MD5; I = MD5-128; C = None * 12 - A = HMAC-MD5; I = MD5-128; C = AES-CBC-128 * 15 - A = HMAC-SHA256; I = None; C = None * 16 - A = HMAC-SHA256; I = HMAC-SHA256-128; C = None * 17 - A = HMAC-SHA256; I = HMAC-SHA256-128; C = AES-CBC-128 * * Pass < 0 for default of 3. * * session_timeout_len * * Specifies the session timeout length in milliseconds. Pass <= 0 * to default to 60000 (60 seconds). * * retransmission_timeout_len * * Specifies the packet retransmission timeout length in * milliseconds. Pass <= 0 to default to 500 (0.5 seconds). * * Configuration information for both Inband and Outofband * * workaround_flags * * Bitwise OR of flags indicating any behavior which should be * changed from the default to handle IPMI non-compliance problems. * Some BMCs which are non-compliant may require a workaround flag * for correct operation. Pass 0 for default of no modifications to * behavior. */ struct ipmi_monitoring_ipmi_config { int driver_type; int disable_auto_probe; unsigned int driver_address; unsigned int register_spacing; char *driver_device; int protocol_version; char *username; char *password; unsigned char *k_g; unsigned int k_g_len; int privilege_level; int authentication_type; int cipher_suite_id; int session_timeout_len; int retransmission_timeout_len; unsigned int workaround_flags; }; typedef struct ipmi_monitoring_ctx *ipmi_monitoring_ctx_t; /* * Ipmi_Monitoring_Callback * * If callback returns < 0, libipmimonitoring will stop reading * remaining information. */ typedef int (*Ipmi_Monitoring_Callback)(ipmi_monitoring_ctx_t c, void *callback_data); /* * ipmi_monitoring_init * * Initialize the ipmi monitoring library. Needs to be called only * once before any ipmi monitoring functions are called. Threaded * applications are responsible for calling this function before any * thread may call another function in the library. * * Returns 0 on success, -1 on error */ int ipmi_monitoring_init (unsigned int flags, int *errnum); /* * ipmi_monitoring_ctx_create * * Create an ipmi monitoring context * * Returns context on success, NULL on error */ ipmi_monitoring_ctx_t ipmi_monitoring_ctx_create (void); /* * ipmi_monitoring_ctx_destroy * * Destroy an ipmi monitoring context */ void ipmi_monitoring_ctx_destroy (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_ctx_errnum * * Returns the error code of the most recently caused error */ int ipmi_monitoring_ctx_errnum (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_ctx_strerror * * Returns a pointer to statically allocated string describing the * error code in errnum. */ char *ipmi_monitoring_ctx_strerror (int errnum); /* * ipmi_monitoring_ctx_errormsg * * Returns a pointer to statically allocated string describing the * most recently caused error. */ char *ipmi_monitoring_ctx_errormsg (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_ctx_sel_config_file * * Initialize the ipmi monitoring context with the interpretation * rules stored in a specific sel configuration file. If NULL * sel_config_file is specified, the default sel configuration * file will be read and parsed. * * If this function is never called, only the default * libipmimonitoring interpretations will be used. * * Returns 0 on success, -1 on error */ int ipmi_monitoring_ctx_sel_config_file (ipmi_monitoring_ctx_t c, const char *sel_config_file); /* * ipmi_monitoring_ctx_sensor_config_file * * Initialize the ipmi monitoring context with the interpretation * rules stored in a specific sensor configuration file. If NULL * sensor_config_file is specified, the default sensor configuration * file will be read and parsed. * * If this function is never called, only the default * libipmimonitoring interpretations will be used. * * Returns 0 on success, -1 on error */ int ipmi_monitoring_ctx_sensor_config_file (ipmi_monitoring_ctx_t c, const char *sensor_config_file); /* * ipmi_monitoring_ctx_sdr_cache_directory * * Initialize the ipmi monitoring context with a different SDR cache * directory. * * Returns 0 on success, -1 on error */ int ipmi_monitoring_ctx_sdr_cache_directory (ipmi_monitoring_ctx_t c, const char *dir); /* * ipmi_monitoring_ctx_sdr_cache_filenames * * Initialize how sdr cache filenames will be formatted when * written/read. * * The following may be included in the format. * * %L - the hostname of the local machine * %H - the remote host being monitored * * Atleast %H must be specified. * * Returns 0 on success, -1 on error */ int ipmi_monitoring_ctx_sdr_cache_filenames (ipmi_monitoring_ctx_t c, const char *format); /* * ipmi_monitoring_sel_by_record_id * * Retrieve SEL records by record ID and store them in the monitoring context. * * If 'hostname' is NULL, SEL records for the current node will be retrieved in-band. * If 'record_ids' is NULL, all records will be retrieved * If specified, callback function will be called after each record is read and parsed. * * Returns number of records retrieved on success, -1 on error. * SEL iterators below may be used after calling this function to * iterate through records. */ int ipmi_monitoring_sel_by_record_id (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, unsigned int *record_ids, unsigned int record_ids_len, Ipmi_Monitoring_Callback callback, void *callback_data); /* * ipmi_monitoring_sel_by_sensor_type * * Retrieve SEL records by sensor type and store them in the * monitoring context. See 'ipmi_monitoring_sensor_type' for possible * sensor type values. * * If 'hostname' is NULL, SEL records for the current node will be retrieved in-band. * If 'sensor_types' is NULL, all records will be retrieved. * If specified, callback function will be called after each record is read and parsed. * * Returns number of records retrieved on success, -1 on error * SEL iterators below may be used after calling this function to * iterate through records. */ int ipmi_monitoring_sel_by_sensor_type (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, unsigned int *sensor_types, unsigned int sensor_types_len, Ipmi_Monitoring_Callback callback, void *callback_data); /* * ipmi_monitoring_sel_by_date_range * * Retrieve SEL records by date range and store them in the monitoring * context. Dates may be specified in a format of MM/DD/YYYY or * MM-DD-YYYY. The month may be specified as a numeral or its * abbreviated string name. * * If 'hostname' is NULL, SEL records for the current node will be retrieved in-band. * If 'date_begin' is NULL, all records before the 'date_end' will be retrieved. * If 'date_end' is NULL, the current time is assumed. * If specified, callback function will be called after each record is read and parsed. * * Note that non-timestamped SEL records will not be retrieved at all * b/c they lack a timestamp. * * Returns number of records retrieved on success, -1 on error * SEL iterators below may be used after calling this function to * iterate through records. */ int ipmi_monitoring_sel_by_date_range (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, const char *date_begin, const char *date_end, Ipmi_Monitoring_Callback callback, void *callback_data); /* * ipmi_monitoring_sel_iterator_first * * Reset iterator to the first sel record * * Returns 0 on success, -1 on error */ int ipmi_monitoring_sel_iterator_first (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_iterator_next * * Advance iterator to the next sel record information * * Returns 1 on iterator advancing, 0 on end, -1 on error */ int ipmi_monitoring_sel_iterator_next (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_iterator_destroy * * Destroy all internally stored sel records. */ void ipmi_monitoring_sel_iterator_destroy (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_record_id * * Returns the record id of the current sel record in a callback * or the iterator, -1 on error. */ int ipmi_monitoring_sel_read_record_id (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_record_type * * Returns the sel record type of the current sel record in a * callback or the iterator, -1 on error. */ int ipmi_monitoring_sel_read_record_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_record_type_class * * Returns the sel record type class of the current sel record in a * callback or the iterator, -1 on error. See * 'ipmi_monitoring_sel_record_type_class' for possible return values. */ int ipmi_monitoring_sel_read_record_type_class (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_sel_state * * Returns the sel state of the current sel record in a callback or * the iterator, -1 on error. See 'ipmi_monitoring_state' for * possible return values. */ int ipmi_monitoring_sel_read_sel_state (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_timestamp * * Returns 0 on success, -1 on error. Returns the sel record * timestamp of the current sel record in 'timestamp'. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD or * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD class * records. */ int ipmi_monitoring_sel_read_timestamp (ipmi_monitoring_ctx_t c, unsigned int *timestamp); /* * ipmi_monitoring_sel_read_sensor_type * * Returns the sel record sensor type of the current sel record in a * callback or the iterator, -1 on error. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. See 'ipmi_monitoring_sensor_type' for possible return * values. */ int ipmi_monitoring_sel_read_sensor_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_sensor_number * * Returns the sel record sensor number of the current sel record in a * callback or the iterator, -1 on error. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. */ int ipmi_monitoring_sel_read_sensor_number (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_sensor_name * * Returns the sel record sensor name of the current sel record in a * callback or the iterator, NULL on error. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. */ char *ipmi_monitoring_sel_read_sensor_name (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_direction * * Returns the sel record event direction of the current sel record in * a callback or the iterator, -1 on error. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. See 'ipmi_monitoring_sel_event_direction' for possible * return values. */ int ipmi_monitoring_sel_read_event_direction (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_offset_type * * Returns the offset type of the current sel record in a * callback or the iterator, -1 on error. See * 'ipmi_monitoring_event_offset_type' and offsets in * ipmi_monitoring_offsets.h to determine offset conditions for a * given offset type. */ int ipmi_monitoring_sel_read_event_offset_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_offset * * Returns the offset of the current sel record in a callback or * the iterator, -1 on error. See offsets in ipmi_monitoring_offsets.h to * determine offset conditions for a given offset type. */ int ipmi_monitoring_sel_read_event_offset (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_offset_string * * Returns a string representing the event in the event offset, NULL * on error. An empty string may be returned if no event offset * string is available. */ char *ipmi_monitoring_sel_read_event_offset_string (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_type_code * * Returns the event type code of the current sel record in a callback * or the iterator, -1 on error. The event type code is is piece of * information is internal to the IPMI protocol. This may be useful * for advanced users wanting to handle OEM sel records or sensors not * covered by this library. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. */ int ipmi_monitoring_sel_read_event_type_code (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_event_data * * Returns 0 on success, -1 on error. Returns event data of the * current sel record in a callback or the iterator in 'event_data1', * 'event_data2', and 'event_data3' respectively. The event data is * is piece of information is internal to the IPMI protocol. This may * be useful for advanced users wanting to handle OEM sel records not * covered by this library. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD class * records. */ int ipmi_monitoring_sel_read_event_data (ipmi_monitoring_ctx_t c, unsigned int *event_data1, unsigned int *event_data2, unsigned int *event_data3); /* * ipmi_monitoring_sel_read_manufacturer_id * * Returns the manufacturer ID of the current sel record in a callback * or the iterator, -1 on error. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD class * records. */ int ipmi_monitoring_sel_read_manufacturer_id (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sel_read_oem_data * * Returns the OEM record data length of the current sel record in a * callback or the iterator, -1 on error. Returns OEM record data in * 'oem_data'. Valid for * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD or * IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD * class records. */ int ipmi_monitoring_sel_read_oem_data (ipmi_monitoring_ctx_t c, void *oem_data, unsigned int oem_data_len); /* * ipmi_monitoring_sensor_readings_by_record_id * * Retrieve sensor readings by sensor numbers and store them in the monitoring context. * * If 'hostname' is NULL, sensors for the current node will be retrieved in-band. * If 'record_ids' is NULL, all sensors will be retrieved * If specified, callback function will be called after each sensor is read and parsed. * * Returns number of sensors values retrieved on success, -1 on error. * Sensor iterators below may be used after calling this function to * iterate through sensors. */ int ipmi_monitoring_sensor_readings_by_record_id (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *record_ids, unsigned int record_ids_len, Ipmi_Monitoring_Callback callback, void *callback_data); /* * ipmi_monitoring_sensor_readings_by_sensor_type * * Retrieve sensor readings by sensor type and store them in the * monitoring context. See 'ipmi_monitoring_sensor_type' for possible * sensor type values. * * If 'hostname' is NULL, sensors for the current node will be retrieved in-band. * If 'sensor_types' is NULL, all sensors will be retrieved. * If specified, callback function will be called after each sensor is read and parsed. * * Returns number of sensors values retrieved on success, -1 on error * Sensor iterators below may be used after calling this function to * iterate through sensors. */ int ipmi_monitoring_sensor_readings_by_sensor_type (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *sensor_types, unsigned int sensor_types_len, Ipmi_Monitoring_Callback callback, void *callback_data); /* * ipmi_monitoring_sensor_iterator_first * * Reset iterator to the first sensor reading * * Returns 0 on success, -1 on error */ int ipmi_monitoring_sensor_iterator_first (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_iterator_next * * Advance iterator to the next set of sensors information * * Returns 0 on success, -1 on error */ int ipmi_monitoring_sensor_iterator_next (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_iterator_destroy * * Destroy all internally stored sensors readings. */ void ipmi_monitoring_sensor_iterator_destroy (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_record_id * * Returns the record id of the current sensor reading in a callback * or the iterator, -1 on error. */ int ipmi_monitoring_sensor_read_record_id (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_number * * Returns the sensor number of the current sensor reading in a * callback or the iterator, -1 on error. May be useful if * IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS has been set. */ int ipmi_monitoring_sensor_read_sensor_number (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_type * * Returns the sensor type of the current sensor reading in a callback * or the iterator, -1 on error. See 'ipmi_monitoring_sensor_type' for possible * return values. */ int ipmi_monitoring_sensor_read_sensor_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_name * * Returns a pointer to the sensor name of the current sensor reading * in a callback or the iterator, NULL on error. */ char *ipmi_monitoring_sensor_read_sensor_name (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_state * * Returns the current sensor state of the current sensor reading in a * callback or the iterator, -1 on error. See 'ipmi_monitoring_state' * for possible return values. */ int ipmi_monitoring_sensor_read_sensor_state (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_units * * Returns the sensor units type of the current sensor reading in a * callback or the iterator, -1 on error. See * 'ipmi_monitoring_sensor_units' for possible return values. */ int ipmi_monitoring_sensor_read_sensor_units (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_reading_type * * Returns the sensor reading type of the current sensor reading in a * callback or the iterator, -1 on error. See * 'ipmi_monitoring_sensor_reading_type' for possible return values. */ int ipmi_monitoring_sensor_read_sensor_reading_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_reading * * Returns a pointer to the sensor reading of the current sensor * reading in a callback or the iterator, NULL on error. It is the responsibility of * the user to cast it to the correct type based on the reading type. * Returns NULL if no reading available. */ void *ipmi_monitoring_sensor_read_sensor_reading (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_bitmask_type * * Returns the bitmask type of the current sensor reading in a * callback or the iterator, -1 on error. See * 'ipmi_monitoring_sensor_bitmask_type' and bitmasks in * ipmi_monitoring_bitmasks.h to determine bitmask conditions for a * given bitmask type. */ int ipmi_monitoring_sensor_read_sensor_bitmask_type (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_bitmask * * Returns the bitmask of the current sensor reading in a callback or * the iterator, -1 on error. See bitmasks in ipmi_monitoring_bitmasks.h to * determine bitmask conditions for a given bitmask type. */ int ipmi_monitoring_sensor_read_sensor_bitmask (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_sensor_bitmask_strings * * Returns an array of strings representing the events in the bitmask, * NULL on error. Array is NUL terminated. */ char **ipmi_monitoring_sensor_read_sensor_bitmask_strings (ipmi_monitoring_ctx_t c); /* * ipmi_monitoring_sensor_read_event_reading_type_code * * Returns the event/reading type code of the current sensor reading * in a callback or the iterator, -1 on error. The event/reading type * code is is piece of information is internal to the IPMI protocol. * This may be useful for advanced users wanting to handle OEM sensors * not covered by this library. */ int ipmi_monitoring_sensor_read_event_reading_type_code (ipmi_monitoring_ctx_t c); #ifdef __cplusplus } #endif #endif /* IPMI_MONITORING_H */ freeipmi-1.6.4/libipmimonitoring/libipmimonitoring.pc.in0000644002055400205540000000041313527331637023501 0ustar00achuachu00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ Name: libipmimonitoring Description: FreeIPMI library for IPMI system event and sensor monitoring Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lipmimonitoring freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_bitmasks.h0000644002055400205540000010167013527331637024275 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_bitmasks.h,v 1.3 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_BITMASKS_H #define IPMI_MONITORING_BITMASKS_H #ifdef __cplusplus extern "C" { #endif /* * IPMI Monitoring Sensor Bitmask Type * * Possible sensor bitmask types that may be returned for a sensor. */ enum ipmi_monitoring_sensor_bitmask_type { IPMI_MONITORING_SENSOR_BITMASK_TYPE_THRESHOLD = 0x00, IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_STATE = 0x01, IPMI_MONITORING_SENSOR_BITMASK_TYPE_STATE = 0x02, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PREDICTIVE_FAILURE = 0x03, IPMI_MONITORING_SENSOR_BITMASK_TYPE_LIMIT = 0x04, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PERFORMANCE = 0x05, IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_SEVERITY = 0x06, IPMI_MONITORING_SENSOR_BITMASK_TYPE_DEVICE_PRESENT = 0x07, IPMI_MONITORING_SENSOR_BITMASK_TYPE_DEVICE_ENABLED = 0x08, IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_AVAILABILITY = 0x09, IPMI_MONITORING_SENSOR_BITMASK_TYPE_REDUNDANCY = 0x0A, IPMI_MONITORING_SENSOR_BITMASK_TYPE_ACPI_POWER_STATE = 0x0B, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PHYSICAL_SECURITY = 0x0C, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT = 0x0D, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PROCESSOR = 0x0E, IPMI_MONITORING_SENSOR_BITMASK_TYPE_POWER_SUPPLY = 0x0F, IPMI_MONITORING_SENSOR_BITMASK_TYPE_POWER_UNIT = 0x10, IPMI_MONITORING_SENSOR_BITMASK_TYPE_COOLING_DEVICE = 0x11, IPMI_MONITORING_SENSOR_BITMASK_TYPE_OTHER_UNITS_BASED_SENSOR = 0x12, IPMI_MONITORING_SENSOR_BITMASK_TYPE_MEMORY = 0x13, IPMI_MONITORING_SENSOR_BITMASK_TYPE_DRIVE_SLOT = 0x14, IPMI_MONITORING_SENSOR_BITMASK_TYPE_POST_MEMORY_RESIZE = 0x15, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_FIRMWARE_PROGRESS = 0x16, IPMI_MONITORING_SENSOR_BITMASK_TYPE_EVENT_LOGGING_DISABLED = 0x17, IPMI_MONITORING_SENSOR_BITMASK_TYPE_WATCHDOG1 = 0x18, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_EVENT = 0x19, IPMI_MONITORING_SENSOR_BITMASK_TYPE_CRITICAL_INTERRUPT = 0x1A, IPMI_MONITORING_SENSOR_BITMASK_TYPE_BUTTON_SWITCH = 0x1B, IPMI_MONITORING_SENSOR_BITMASK_TYPE_MODULE_BOARD = 0x1C, IPMI_MONITORING_SENSOR_BITMASK_TYPE_MICROCONTROLLER_COPROCESSOR = 0x1D, IPMI_MONITORING_SENSOR_BITMASK_TYPE_ADD_IN_CARD = 0x1E, IPMI_MONITORING_SENSOR_BITMASK_TYPE_CHASSIS = 0x1F, IPMI_MONITORING_SENSOR_BITMASK_TYPE_CHIP_SET = 0x20, IPMI_MONITORING_SENSOR_BITMASK_TYPE_OTHER_FRU = 0x21, IPMI_MONITORING_SENSOR_BITMASK_TYPE_CABLE_INTERCONNECT = 0x22, IPMI_MONITORING_SENSOR_BITMASK_TYPE_TERMINATOR = 0x23, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_BOOT_INITIATED = 0x24, IPMI_MONITORING_SENSOR_BITMASK_TYPE_BOOT_ERROR = 0x25, IPMI_MONITORING_SENSOR_BITMASK_TYPE_OS_BOOT = 0x26, IPMI_MONITORING_SENSOR_BITMASK_TYPE_OS_CRITICAL_STOP = 0x27, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SLOT_CONNECTOR = 0x28, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_ACPI_POWER_STATE = 0x29, IPMI_MONITORING_SENSOR_BITMASK_TYPE_WATCHDOG2 = 0x2A, IPMI_MONITORING_SENSOR_BITMASK_TYPE_PLATFORM_ALERT = 0x2B, IPMI_MONITORING_SENSOR_BITMASK_TYPE_ENTITY_PRESENCE = 0x2C, IPMI_MONITORING_SENSOR_BITMASK_TYPE_MONITOR_ASIC_IC = 0x2D, IPMI_MONITORING_SENSOR_BITMASK_TYPE_LAN = 0x2E, IPMI_MONITORING_SENSOR_BITMASK_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH = 0x2F, IPMI_MONITORING_SENSOR_BITMASK_TYPE_BATTERY = 0x30, IPMI_MONITORING_SENSOR_BITMASK_TYPE_SESSION_AUDIT = 0x31, IPMI_MONITORING_SENSOR_BITMASK_TYPE_VERSION_CHANGE = 0x32, IPMI_MONITORING_SENSOR_BITMASK_TYPE_FRU_STATE = 0x33, IPMI_MONITORING_SENSOR_BITMASK_TYPE_OEM = 0xFE, IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN = 0xFF, }; /* * IPMI Bitmasks * * The following are the bitmask masks that can be returned. Use the * returned bitmask type to determine which set of bitmasks to use. */ enum ipmi_monitoring_sensor_bitmask_threshold { IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_LOWER_NON_CRITICAL_THRESHOLD = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_LOWER_CRITICAL_THRESHOLD = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_LOWER_NON_RECOVERABLE_THRESHOLD = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_UPPER_NON_CRITICAL_THRESHOLD = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_UPPER_CRITICAL_THRESHOLD = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_THRESHOLD_AT_OR_BELOW_UPPER_NON_RECOVERABLE_THRESHOLD = 0x0020, }; enum ipmi_monitoring_sensor_bitmask_transition { IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_IDLE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_ACTIVE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_BUSY = 0x0004, }; enum ipmi_monitoring_sensor_bitmask_state { IPMI_MONITORING_SENSOR_BITMASK_STATE_DEASSERTED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_STATE_ASSERTED = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_predictive_failure { IPMI_MONITORING_SENSOR_BITMASK_PREDICTIVE_FAILURE_DEASSERTED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PREDICTIVE_FAILURE_ASSERTED = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_limit { IPMI_MONITORING_SENSOR_BITMASK_LIMIT_NOT_EXCEEDED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_LIMIT_EXCEEDED = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_performance { IPMI_MONITORING_SENSOR_BITMASK_PERFORMANCE_MET = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PERFORMANCE_LAGS = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_transition_severity { IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_OK = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_NON_CRITICAL_FROM_OK = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_CRITICAL_FROM_LESS_SEVERE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_NON_RECOVERABLE_FROM_LESS_SEVERE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_NON_CRITICAL_FROM_MORE_SEVERE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_CRITICAL_FROM_NON_RECOVERABLE = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_NON_RECOVERABLE = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_MONITOR = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_INFORMATIONAL = 0x0100, }; enum ipmi_monitoring_sensor_bitmask_device_present { IPMI_MONITORING_SENSOR_BITMASK_DEVICE_REMOVED_DEVICE_ABSENT = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_DEVICE_INSERTED_DEVICE_PRESENT = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_device_enabled { IPMI_MONITORING_SENSOR_BITMASK_DEVICE_DISABLED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_DEVICE_ENABLED = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_transition_availability { IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_RUNNING = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_IN_TEST = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_POWER_OFF = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_ON_LINE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_OFF_LINE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_OFF_DUTY = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_DEGRADED = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_TO_POWER_SAVE = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_TRANSITION_INSTALL_ERROR = 0x0100, }; enum ipmi_monitoring_sensor_bitmask_redundancy { IPMI_MONITORING_SENSOR_BITMASK_FULLY_REDUNDANT = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_REDUNDANCY_LOST = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_REDUNDANCY_DEGRADED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_REDUNDANT = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_INSUFFICIENT_RESOURCES = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_NON_REDUNDANT_INSUFFICIENT_RESOURCES = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_REDUNDANCY_DEGRADED_FROM_FULLY_REDUNDANT = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_REDUNDANCY_DEGRADED_FROM_NON_REDUNDANT = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_acpi_power_state { IPMI_MONITORING_SENSOR_BITMASK_D0_POWER_STATE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_D1_POWER_STATE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_D2_POWER_STATE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_D3_POWER_STATE = 0x0008, }; enum ipmi_monitoring_sensor_bitmask_physical_security { IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_GENERAL_CHASSIS_INTRUSION = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_DRIVE_BAY_INTRUSION = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_IO_CARD_INTRUSION = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_PROCESSOR_AREA_INTRUSION = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_LAN_LEASH_LOST = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_UNAUTHORIZED_DOCK_UNDOCK = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_PHYSICAL_SECURITY_FAN_AREA_INTRUSION = 0x0040, }; enum ipmi_monitoring_sensor_bitmask_platform_security_violation_attempt { IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_SECURE_MODE_VIOLATION_ATTEMPT = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_USER_PASSWORD = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_ATTEMPT_SETUP_PASSWORD = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_NETWORK_BOOT_PASSWORD = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OTHER_PRE_BOOT_PASSWORD_VIOLATION = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OUT_OF_BAND_ACCESS_PASSWORD_VIOLATION = 0x0020, }; enum ipmi_monitoring_sensor_bitmask_processor { IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_IERR = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_THERMAL_TRIP = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_FRB1_BIST_FAILURE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_FRB2_HANG_IN_POST_FAILURE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_FRB3_PROCESSOR_STARTUP_INITIALIZATION_FAILURE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_CONFIGURATION_ERROR = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_SMBIOS_UNCORRECTABLE_CPU_COMPLEX_ERROR = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_PROCESSOR_PRESENCE_DETECTED = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_PROCESSOR_DISABLED = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_TERMINATOR_PRESENCE_DETECTED = 0x0200, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED = 0x0400, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_MACHINE_CHECK_EXCEPTION = 0x0800, IPMI_MONITORING_SENSOR_BITMASK_PROCESSOR_CORRECTABLE_MACHINE_CHECK_ERROR = 0x1000, }; enum ipmi_monitoring_sensor_bitmask_power_supply { IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_PRESENCE_DETECTED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_PREDICTIVE_FAILURE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_AC_DC = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_OR_OUT_OF_RANGE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_POWER_SUPPLY_INPUT_OUT_OF_RANGE_BUT_PRESENT = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_CONFIGURATION_ERROR = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_POWER_SUPPLY_POWER_SUPPLY_INACTIVE = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_power_unit { IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_POWER_OFF_POWER_DOWN = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_POWER_CYCLE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_240VA_POWER_DOWN = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_INTERLOCK_POWER_DOWN = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_AC_LOST = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_SOFT_POWER_CONTROL_FAILURE = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_POWER_UNIT_FAILURE_DETECTED = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_POWER_UNIT_PREDICTIVE_FAILURE = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_memory { IPMI_MONITORING_SENSOR_BITMASK_MEMORY_CORRECTABLE_MEMORY_ERROR = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_UNCORRECTABLE_MEMORY_ERROR = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_PARITY = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_MEMORY_SCRUB_FAILED = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_MEMORY_DEVICE_DISABLED = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_PRESENCE_DETECTED = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_CONFIGURATION_ERROR = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_SPARE = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_MEMORY_AUTOMATICALLY_THROTTLED = 0x0200, IPMI_MONITORING_SENSOR_BITMASK_MEMORY_CRITICAL_OVERTEMPERATURE = 0x0400, }; enum ipmi_monitoring_sensor_bitmask_drive_slot { IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_DRIVE_PRESENCE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_DRIVE_FAULT = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_PREDICTIVE_FAILURE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_HOT_SPARE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_CONSISTENCY_CHECK_PARITY_CHECK_IN_PROGRESS = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_IN_CRITICAL_ARRAY = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_IN_FAILED_ARRAY = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_REBUILD_REMAP_IN_PROGRESS = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_DRIVE_SLOT_REBUILD_REMAP_ABORTED = 0x0100, }; enum ipmi_monitoring_sensor_bitmask_system_firmware_progress { IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_HANG = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_PROGRESS = 0x0004, }; enum ipmi_monitoring_sensor_bitmask_event_logging_disabled { IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_EVENT_TYPE_LOGGING_DISABLED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_LOG_AREA_RESET_CLEARED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_ALL_EVENT_LOGGING_DISABLED = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_SEL_FULL = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_SEL_ALMOST_FULL = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED = 0x0040, }; enum ipmi_monitoring_sensor_bitmask_watchdog1 { IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_BIOS_WATCHDOG_RESET = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_RESET = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_SHUT_DOWN = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_POWER_DOWN = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_POWER_CYCLE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_NMI_DIAGNOSTIC_INTERRUPT = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_EXPIRED_STATUS_ONLY = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG1_OS_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NON_NMI = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_system_event { IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_SYSTEM_RECONFIGURED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_UNDETERMINED_SYSTEM_HARDWARE_FAILURE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_ENTRY_ADDED_TO_AUXILIARY_LOG = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_PEF_ACTION = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_EVENT_TIMESTAMP_CLOCK_SYNC = 0x0020, }; enum ipmi_monitoring_sensor_bitmask_critical_interrupt { IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_FRONT_PANEL_NMI_DIAGNOSTIC_INTERRUPT = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_BUS_TIMEOUT = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_IO_CHANNEL_CHECK_NMI = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_SOFTWARE_NMI = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_PCI_PERR = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_PCI_SERR = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_EISA_FAIL_SAFE_TIMEOUT = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_FATAL_NMI = 0x0200, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_BUS_FATAL_ERROR = 0x0400, IPMI_MONITORING_SENSOR_BITMASK_CRITICAL_INTERRUPT_BUS_DEGRADED = 0x0800, }; enum ipmi_monitoring_sensor_bitmask_button_switch { IPMI_MONITORING_SENSOR_BITMASK_BUTTON_SWITCH_POWER_BUTTON_PRESSED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_BUTTON_SWITCH_SLEEP_BUTTON_PRESSED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_BUTTON_SWITCH_RESET_BUTTON_PRESSED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_BUTTON_SWITCH_FRU_LATCH_OPEN = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_BUTTON_SWITCH_FRU_SERVICE_REQUEST_BUTTON = 0x0010, }; enum ipmi_monitoring_sensor_bitmask_chip_set { IPMI_MONITORING_SENSOR_BITMASK_CHIP_SET_SOFT_POWER_CONTROL_FAILURE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_CHIP_SET_THERMAL_TRIP = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_cable_interconnect { IPMI_MONITORING_SENSOR_BITMASK_CABLE_INTERCONNECT_IS_CONNECTED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_CABLE_INTERCONNECT_CONFIGURATION_ERROR = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_system_boot_initiated { IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_INITIATED_BY_POWER_UP = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_INITIATED_BY_HARD_RESET = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_INITIATED_BY_WARM_RESET = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_USER_REQUESTED_PXE_BOOT = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_AUTOMATIC_BOOT_TO_DIAGNOSTIC = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_HARD_RESET = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_WARM_RESET = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_BOOT_INITIATED_SYSTEM_RESTART = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_boot_error { IPMI_MONITORING_SENSOR_BITMASK_BOOT_ERROR_NO_BOOTABLE_MEDIA = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_BOOT_ERROR_NON_BOOTABLE_DISKETTE_LEFT_IN_DRIVE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_BOOT_ERROR_PXE_SERVER_NOT_FOUND = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_BOOT_ERROR_INVALID_BOOT_SECTOR = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_BOOT_ERROR_TIMEOUT_WAITING_FOR_USER_SELECTION_OF_BOOT_SOURCE = 0x0010, }; enum ipmi_monitoring_sensor_bitmask_os_boot { IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_A_BOOT_COMPLETED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_C_BOOT_COMPLETED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_PXE_BOOT_COMPLETED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_DIAGNOSTIC_BOOT_COMPLETED = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_CD_ROM_BOOT_COMPLETED = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_ROM_BOOT_COMPLETED = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_BOOT_COMPLETED_BOOT_DEVICE_NOT_SPECIFIED = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_STARTED = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_COMPLETED = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_ABORTED = 0x0200, IPMI_MONITORING_SENSOR_BITMASK_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_FAILED = 0x0400, }; enum ipmi_monitoring_sensor_bitmask_os_critical_stop { IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_CRITICAL_STOP_DURING_OS_LOAD = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_RUN_TIME_CRITICAL_STOP = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_OS_GRACEFUL_STOP = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_OS_GRACEFUL_SHUTDOWN = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_SOFT_SHUTDOWN_INITIATED_BY_PEF = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_OS_CRITICAL_STOP_AGENT_NOT_RESPONDING = 0x0020, }; enum ipmi_monitoring_sensor_bitmask_slot_connector { IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_FAULT_STATUS_ASSERTED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_IDENTIFY_STATUS_ASSERTED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_INSTALLED_ATTACHED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_INSTALLATION = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_REMOVAL = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_POWER_IS_OFF = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_REMOVAL_REQUEST = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_INTERLOCK_ASSERTED = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_IS_DISABLED = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_SLOT_CONNECTOR_SLOT_HOLDS_SPARE_DEVICE = 0x0200, }; enum ipmi_monitoring_sensor_bitmask_system_acpi_power_state { IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S0_G0 = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S1 = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S2 = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S3 = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S4 = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S5_G2 = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S4_S5_SOFT_OFF = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_G3_MECHANICAL_OFF = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_SLEEPING_IN_AN_S1_S2_OR_S3_STATES = 0x0100, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_G1_SLEEPING = 0x0200, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_S5_ENTERED_BY_OVERRIDE = 0x0400, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_LEGACY_ON_STATE = 0x0800, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_LEGACY_OFF_STATE = 0x1000, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_UNSPECIFIED = 0x2000, IPMI_MONITORING_SENSOR_BITMASK_SYSTEM_ACPI_POWER_STATE_UNKNOWN = 0x4000, }; enum ipmi_monitoring_sensor_bitmask_watchdog2 { IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_TIMER_EXPIRED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_HARD_RESET = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_POWER_DOWN = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_POWER_CYCLE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_RESERVED1 = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_RESERVED2 = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_RESERVED3 = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_RESERVED4 = 0x0080, IPMI_MONITORING_SENSOR_BITMASK_WATCHDOG2_TIMER_INTERRUPT = 0x0100, }; enum ipmi_monitoring_sensor_bitmask_platform_alert { IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_ALERT_PLATFORM_GENERATED_PAGE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_ALERT_PLATFORM_GENERATED_LAN_ALERT = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_ALERT_PLATFORM_EVENT_TRAP_GENERATED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_PLATFORM_ALERT_PLATFORM_GENERATED_SNMP_TRAP = 0x0008, }; enum ipmi_monitoring_sensor_bitmask_entity_presence { IPMI_MONITORING_SENSOR_BITMASK_ENTITY_PRESENCE_ENTITY_PRESENT = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_ENTITY_PRESENCE_ENTITY_ABSENT = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_ENTITY_PRESENCE_ENTITY_DISABLED = 0x0004, }; enum ipmi_monitoring_sensor_bitmask_lan { IPMI_MONITORING_SENSOR_BITMASK_LAN_HEARTBEAT_LOST = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_LAN_HEARTBEAT = 0x0002, }; enum ipmi_monitoring_sensor_bitmask_management_subsystem_health { IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_ACCESS_DEGRADED_OR_UNAVAILABLE = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_CONTROLLER_ACCESS_DEGRADED_OR_UNAVAILABLE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_OFF_LINE = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_UNAVAILABLE = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_FAILURE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_MANAGEMENT_SUBSYSTEM_HEALTH_FRU_FAILURE = 0x0020, }; enum ipmi_monitoring_sensor_bitmask_battery { IPMI_MONITORING_SENSOR_BITMASK_BATTERY_BATTERY_LOW = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_BATTERY_BATTERY_FAILED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_BATTERY_BATTERY_PRESENCE_DETECTED = 0x0004, }; enum ipmi_monitoring_sensor_bitmask_session_audit { IPMI_MONITORING_SENSOR_BITMASK_SESSION_AUDIT_SESSION_ACTIVATED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_SESSION_AUDIT_SESSION_DEACTIVATED = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_SESSION_AUDIT_INVALID_USERNAME_OR_PASSWORD = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_SESSION_AUDIT_INVALID_PASSWORD_DISABLE = 0x0008, }; enum ipmi_monitoring_sensor_bitmask_version_change { IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_HARDWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_ENTITY_IS_OF_AN_INVALID_OR_UNSUPPORTED_HARDWARE_VERSION = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_ENTITY_CONTAINS_AN_INVALID_OR_UNSUPPORTED_FIRMWARE_OR_SOFTWARE_VERSION = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_VERSION_CHANGE_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL = 0x0080, }; enum ipmi_monitoring_sensor_bitmask_fru_state { IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_NOT_INSTALLED = 0x0001, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_INACTIVE = 0x0002, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_ACTIVATION_REQUESTED = 0x0004, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_ACTIVATION_IN_PROGRESS = 0x0008, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_ACTIVE = 0x0010, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_DEACTIVATION_REQUESTED = 0x0020, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_DEACTIVATION_IN_PROGRESS = 0x0040, IPMI_MONITORING_SENSOR_BITMASK_FRU_STATE_FRU_COMMUNICATION_LOST = 0x0080, }; #ifdef __cplusplus } #endif #endif /* IPMI_MONITORING_BITMASKS_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_offsets.h0000644002055400205540000010023713527331637024127 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_offsets.h,v 1.1 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_OFFSETS_H #define IPMI_MONITORING_OFFSETS_H #ifdef __cplusplus extern "C" { #endif /* * IPMI Monitoring Event Offset Type * * Possible Event Offset types that may be returned for a * system event log entry. */ enum ipmi_monitoring_event_offset_type { IPMI_MONITORING_EVENT_OFFSET_TYPE_THRESHOLD = 0x00, IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_STATE = 0x01, IPMI_MONITORING_EVENT_OFFSET_TYPE_STATE = 0x02, IPMI_MONITORING_EVENT_OFFSET_TYPE_PREDICTIVE_FAILURE = 0x03, IPMI_MONITORING_EVENT_OFFSET_TYPE_LIMIT = 0x04, IPMI_MONITORING_EVENT_OFFSET_TYPE_PERFORMANCE = 0x05, IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_SEVERITY = 0x06, IPMI_MONITORING_EVENT_OFFSET_TYPE_DEVICE_PRESENT = 0x07, IPMI_MONITORING_EVENT_OFFSET_TYPE_DEVICE_ENABLED = 0x08, IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_AVAILABILITY = 0x09, IPMI_MONITORING_EVENT_OFFSET_TYPE_REDUNDANCY = 0x0A, IPMI_MONITORING_EVENT_OFFSET_TYPE_ACPI_POWER_STATE = 0x0B, IPMI_MONITORING_EVENT_OFFSET_TYPE_PHYSICAL_SECURITY = 0x0C, IPMI_MONITORING_EVENT_OFFSET_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT = 0x0D, IPMI_MONITORING_EVENT_OFFSET_TYPE_PROCESSOR = 0x0E, IPMI_MONITORING_EVENT_OFFSET_TYPE_POWER_SUPPLY = 0x0F, IPMI_MONITORING_EVENT_OFFSET_TYPE_POWER_UNIT = 0x10, IPMI_MONITORING_EVENT_OFFSET_TYPE_COOLING_DEVICE = 0x11, IPMI_MONITORING_EVENT_OFFSET_TYPE_OTHER_UNITS_BASED_SENSOR = 0x12, IPMI_MONITORING_EVENT_OFFSET_TYPE_MEMORY = 0x13, IPMI_MONITORING_EVENT_OFFSET_TYPE_DRIVE_SLOT = 0x14, IPMI_MONITORING_EVENT_OFFSET_TYPE_POST_MEMORY_RESIZE = 0x15, IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_FIRMWARE_PROGRESS = 0x16, IPMI_MONITORING_EVENT_OFFSET_TYPE_EVENT_LOGGING_DISABLED = 0x17, IPMI_MONITORING_EVENT_OFFSET_TYPE_WATCHDOG1 = 0x18, IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_EVENT = 0x19, IPMI_MONITORING_EVENT_OFFSET_TYPE_CRITICAL_INTERRUPT = 0x1A, IPMI_MONITORING_EVENT_OFFSET_TYPE_BUTTON_SWITCH = 0x1B, IPMI_MONITORING_EVENT_OFFSET_TYPE_MODULE_BOARD = 0x1C, IPMI_MONITORING_EVENT_OFFSET_TYPE_MICROCONTROLLER_COPROCESSOR = 0x1D, IPMI_MONITORING_EVENT_OFFSET_TYPE_ADD_IN_CARD = 0x1E, IPMI_MONITORING_EVENT_OFFSET_TYPE_CHASSIS = 0x1F, IPMI_MONITORING_EVENT_OFFSET_TYPE_CHIP_SET = 0x20, IPMI_MONITORING_EVENT_OFFSET_TYPE_OTHER_FRU = 0x21, IPMI_MONITORING_EVENT_OFFSET_TYPE_CABLE_INTERCONNECT = 0x22, IPMI_MONITORING_EVENT_OFFSET_TYPE_TERMINATOR = 0x23, IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_BOOT_INITIATED = 0x24, IPMI_MONITORING_EVENT_OFFSET_TYPE_BOOT_ERROR = 0x25, IPMI_MONITORING_EVENT_OFFSET_TYPE_OS_BOOT = 0x26, IPMI_MONITORING_EVENT_OFFSET_TYPE_OS_CRITICAL_STOP = 0x27, IPMI_MONITORING_EVENT_OFFSET_TYPE_SLOT_CONNECTOR = 0x28, IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_ACPI_POWER_STATE = 0x29, IPMI_MONITORING_EVENT_OFFSET_TYPE_WATCHDOG2 = 0x2A, IPMI_MONITORING_EVENT_OFFSET_TYPE_PLATFORM_ALERT = 0x2B, IPMI_MONITORING_EVENT_OFFSET_TYPE_ENTITY_PRESENCE = 0x2C, IPMI_MONITORING_EVENT_OFFSET_TYPE_MONITOR_ASIC_IC = 0x2D, IPMI_MONITORING_EVENT_OFFSET_TYPE_LAN = 0x2E, IPMI_MONITORING_EVENT_OFFSET_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH = 0x2F, IPMI_MONITORING_EVENT_OFFSET_TYPE_BATTERY = 0x30, IPMI_MONITORING_EVENT_OFFSET_TYPE_SESSION_AUDIT = 0x31, IPMI_MONITORING_EVENT_OFFSET_TYPE_VERSION_CHANGE = 0x32, IPMI_MONITORING_EVENT_OFFSET_TYPE_FRU_STATE = 0x33, IPMI_MONITORING_EVENT_OFFSET_TYPE_OEM = 0xFE, IPMI_MONITORING_EVENT_OFFSET_TYPE_UNKNOWN = 0xFF, }; /* * IPMI OFFSETS * * The following are the offsets that can be returned. Use the * returned offset type to determine which set of offsets to use. */ enum ipmi_monitoring_event_offset_threshold { IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_NON_CRITICAL_GOING_LOW = 0x00, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_NON_CRITICAL_GOING_HIGH = 0x01, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_CRITICAL_GOING_LOW = 0x02, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_CRITICAL_GOING_HIGH = 0x03, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_NON_RECOVERABLE_GOING_LOW = 0x04, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_LOWER_NON_RECOVERABLE_GOING_HIGH = 0x05, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_NON_CRITICAL_GOING_LOW = 0x06, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_NON_CRITICAL_GOING_HIGH = 0x07, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_CRITICAL_GOING_LOW = 0x08, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_CRITICAL_GOING_HIGH = 0x09, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_NON_RECOVERABLE_GOING_LOW = 0x0A, IPMI_MONITORING_EVENT_OFFSET_THRESHOLD_UPPER_NON_RECOVERABLE_GOING_HIGH = 0x0B, }; enum ipmi_monitoring_event_offset_transition { IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_IDLE = 0x00, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_ACTIVE = 0x01, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_BUSY = 0x02, }; enum ipmi_monitoring_event_offset_state { IPMI_MONITORING_EVENT_OFFSET_STATE_DEASSERTED = 0x00, IPMI_MONITORING_EVENT_OFFSET_STATE_ASSERTED = 0x01, }; enum ipmi_monitoring_event_offset_predictive_failure { IPMI_MONITORING_EVENT_OFFSET_PREDICTIVE_FAILURE_DEASSERTED = 0x00, IPMI_MONITORING_EVENT_OFFSET_PREDICTIVE_FAILURE_ASSERTED = 0x01, }; enum ipmi_monitoring_event_offset_limit { IPMI_MONITORING_EVENT_OFFSET_LIMIT_NOT_EXCEEDED = 0x00, IPMI_MONITORING_EVENT_OFFSET_LIMIT_EXCEEDED = 0x01, }; enum ipmi_monitoring_event_offset_performance { IPMI_MONITORING_EVENT_OFFSET_PERFORMANCE_MET = 0x00, IPMI_MONITORING_EVENT_OFFSET_PERFORMANCE_LAGS = 0x01, }; enum ipmi_monitoring_event_offset_transition_severity { IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_OK = 0x00, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_NON_CRITICAL_FROM_OK = 0x01, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_CRITICAL_FROM_LESS_SEVERE = 0x02, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_NON_RECOVERABLE_FROM_LESS_SEVERE = 0x03, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_NON_CRITICAL_FROM_MORE_SEVERE = 0x04, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_CRITICAL_FROM_NON_RECOVERABLE = 0x05, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_NON_RECOVERABLE = 0x06, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_MONITOR = 0x07, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_INFORMATIONAL = 0x08, }; enum ipmi_monitoring_event_offset_device_present { IPMI_MONITORING_EVENT_OFFSET_DEVICE_REMOVED_DEVICE_ABSENT = 0x00, IPMI_MONITORING_EVENT_OFFSET_DEVICE_INSERTED_DEVICE_PRESENT = 0x01, }; enum ipmi_monitoring_event_offset_device_enabled { IPMI_MONITORING_EVENT_OFFSET_DEVICE_DISABLED = 0x00, IPMI_MONITORING_EVENT_OFFSET_DEVICE_ENABLED = 0x01, }; enum ipmi_monitoring_event_offset_transition_availability { IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_RUNNING = 0x00, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_IN_TEST = 0x01, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_POWER_OFF = 0x02, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_ON_LINE = 0x03, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_OFF_LINE = 0x04, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_OFF_DUTY = 0x05, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_DEGRADED = 0x06, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_TO_POWER_SAVE = 0x07, IPMI_MONITORING_EVENT_OFFSET_TRANSITION_INSTALL_ERROR = 0x08, }; enum ipmi_monitoring_event_offset_redundancy { IPMI_MONITORING_EVENT_OFFSET_FULLY_REDUNDANT = 0x00, IPMI_MONITORING_EVENT_OFFSET_REDUNDANCY_LOST = 0x01, IPMI_MONITORING_EVENT_OFFSET_REDUNDANCY_DEGRADED = 0x02, IPMI_MONITORING_EVENT_OFFSET_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_REDUNDANT = 0x03, IPMI_MONITORING_EVENT_OFFSET_NON_REDUNDANT_SUFFICIENT_RESOURCES_FROM_INSUFFICIENT_RESOURCES = 0x04, IPMI_MONITORING_EVENT_OFFSET_NON_REDUNDANT_INSUFFICIENT_RESOURCES = 0x05, IPMI_MONITORING_EVENT_OFFSET_REDUNDANCY_DEGRADED_FROM_FULLY_REDUNDANT = 0x06, IPMI_MONITORING_EVENT_OFFSET_REDUNDANCY_DEGRADED_FROM_NON_REDUNDANT = 0x07, }; enum ipmi_monitoring_event_offset_acpi_power_state { IPMI_MONITORING_EVENT_OFFSET_D0_POWER_STATE = 0x00, IPMI_MONITORING_EVENT_OFFSET_D1_POWER_STATE = 0x01, IPMI_MONITORING_EVENT_OFFSET_D2_POWER_STATE = 0x02, IPMI_MONITORING_EVENT_OFFSET_D3_POWER_STATE = 0x03, }; enum ipmi_monitoring_event_offset_physical_security { IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_GENERAL_CHASSIS_INTRUSION = 0x00, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_DRIVE_BAY_INTRUSION = 0x01, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_IO_CARD_INTRUSION = 0x02, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_PROCESSOR_AREA_INTRUSION = 0x03, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_LAN_LEASH_LOST = 0x04, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_UNAUTHORIZED_DOCK_UNDOCK = 0x05, IPMI_MONITORING_EVENT_OFFSET_PHYSICAL_SECURITY_FAN_AREA_INTRUSION = 0x06, }; enum ipmi_monitoring_event_offset_platform_security_violation_attempt { IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_SECURE_MODE_VIOLATION_ATTEMPT = 0x00, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_USER_PASSWORD = 0x01, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_ATTEMPT_SETUP_PASSWORD = 0x02, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_PRE_BOOT_PASSWORD_VIOLATION_NETWORK_BOOT_PASSWORD = 0x03, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OTHER_PRE_BOOT_PASSWORD_VIOLATION = 0x04, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_SECURITY_VIOLATION_ATTEMPT_OUT_OF_BAND_ACCESS_PASSWORD_VIOLATION = 0x05, }; enum ipmi_monitoring_event_offset_processor { IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_IERR = 0x00, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_THERMAL_TRIP = 0x01, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_FRB1_BIST_FAILURE = 0x02, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_FRB2_HANG_IN_POST_FAILURE = 0x03, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_FRB3_PROCESSOR_STARTUP_INITIALIZATION_FAILURE = 0x04, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_CONFIGURATION_ERROR = 0x05, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_SMBIOS_UNCORRECTABLE_CPU_COMPLEX_ERROR = 0x06, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_PROCESSOR_PRESENCE_DETECTED = 0x07, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_PROCESSOR_DISABLED = 0x08, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_TERMINATOR_PRESENCE_DETECTED = 0x09, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_PROCESSOR_AUTOMATICALLY_THROTTLED = 0x0A, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_MACHINE_CHECK_EXCEPTION = 0x0B, IPMI_MONITORING_EVENT_OFFSET_PROCESSOR_CORRECTABLE_MACHINE_CHECK_ERROR = 0x0C, }; enum ipmi_monitoring_event_offset_power_supply { IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_PRESENCE_DETECTED = 0x00, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_POWER_SUPPLY_FAILURE_DETECTED = 0x01, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_PREDICTIVE_FAILURE = 0x02, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_AC_DC = 0x03, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_POWER_SUPPLY_INPUT_LOST_OR_OUT_OF_RANGE = 0x04, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_POWER_SUPPLY_INPUT_OUT_OF_RANGE_BUT_PRESENT = 0x05, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_CONFIGURATION_ERROR = 0x06, IPMI_MONITORING_EVENT_OFFSET_POWER_SUPPLY_POWER_SUPPLY_INACTIVE = 0x07, }; enum ipmi_monitoring_event_offset_power_unit { IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_POWER_OFF_POWER_DOWN = 0x00, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_POWER_CYCLE = 0x01, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_240VA_POWER_DOWN = 0x02, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_INTERLOCK_POWER_DOWN = 0x03, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_AC_LOST = 0x04, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_SOFT_POWER_CONTROL_FAILURE = 0x05, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_POWER_UNIT_FAILURE_DETECTED = 0x06, IPMI_MONITORING_EVENT_OFFSET_POWER_UNIT_PREDICTIVE_FAILURE = 0x07, }; enum ipmi_monitoring_event_offset_memory { IPMI_MONITORING_EVENT_OFFSET_MEMORY_CORRECTABLE_MEMORY_ERROR = 0x00, IPMI_MONITORING_EVENT_OFFSET_MEMORY_UNCORRECTABLE_MEMORY_ERROR = 0x01, IPMI_MONITORING_EVENT_OFFSET_MEMORY_PARITY = 0x02, IPMI_MONITORING_EVENT_OFFSET_MEMORY_MEMORY_SCRUB_FAILED = 0x03, IPMI_MONITORING_EVENT_OFFSET_MEMORY_MEMORY_DEVICE_DISABLED = 0x04, IPMI_MONITORING_EVENT_OFFSET_MEMORY_CORRECTABLE_MEMORY_ERROR_LOGGING_LIMIT_REACHED = 0x05, IPMI_MONITORING_EVENT_OFFSET_MEMORY_PRESENCE_DETECTED = 0x06, IPMI_MONITORING_EVENT_OFFSET_MEMORY_CONFIGURATION_ERROR = 0x07, IPMI_MONITORING_EVENT_OFFSET_MEMORY_SPARE = 0x08, IPMI_MONITORING_EVENT_OFFSET_MEMORY_MEMORY_AUTOMATICALLY_THROTTLED = 0x09, IPMI_MONITORING_EVENT_OFFSET_MEMORY_CRITICAL_OVERTEMPERATURE = 0x0A, }; enum ipmi_monitoring_event_offset_drive_slot { IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_DRIVE_PRESENCE = 0x00, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_DRIVE_FAULT = 0x01, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_PREDICTIVE_FAILURE = 0x02, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_HOT_SPARE = 0x03, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_CONSISTENCY_CHECK_PARITY_CHECK_IN_PROGRESS = 0x04, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_IN_CRITICAL_ARRAY = 0x05, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_IN_FAILED_ARRAY = 0x06, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_REBUILD_REMAP_IN_PROGRESS = 0x07, IPMI_MONITORING_EVENT_OFFSET_DRIVE_SLOT_REBUILD_REMAP_ABORTED = 0x08, }; enum ipmi_monitoring_event_offset_system_firmware_progress { IPMI_MONITORING_EVENT_OFFSET_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_ERROR = 0x00, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_HANG = 0x01, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_FIRMWARE_PROGRESS_SYSTEM_FIRMWARE_PROGRESS = 0x02, }; enum ipmi_monitoring_event_offset_event_logging_disabled { IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_CORRECTABLE_MEMORY_ERROR_LOGGING_DISABLED = 0x00, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_EVENT_TYPE_LOGGING_DISABLED = 0x01, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_LOG_AREA_RESET_CLEARED = 0x02, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_ALL_EVENT_LOGGING_DISABLED = 0x03, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_SEL_FULL = 0x04, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_SEL_ALMOST_FULL = 0x05, IPMI_MONITORING_EVENT_OFFSET_EVENT_LOGGING_DISABLED_CORRECTABLE_MACHINE_CHECK_ERROR_LOGGING_DISABLED = 0x06, }; enum ipmi_monitoring_event_offset_watchdog1 { IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_BIOS_WATCHDOG_RESET = 0x00, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_RESET = 0x01, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_SHUT_DOWN = 0x02, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_POWER_DOWN = 0x03, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_POWER_CYCLE = 0x04, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_NMI_DIAGNOSTIC_INTERRUPT = 0x05, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_EXPIRED_STATUS_ONLY = 0x06, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG1_OS_WATCHDOG_PRE_TIMEOUT_INTERRUPT_NON_NMI = 0x07, }; enum ipmi_monitoring_event_offset_system_event { IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_SYSTEM_RECONFIGURED = 0x00, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_OEM_SYSTEM_BOOT_EVENT = 0x01, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_UNDETERMINED_SYSTEM_HARDWARE_FAILURE = 0x02, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_ENTRY_ADDED_TO_AUXILIARY_LOG = 0x03, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_PEF_ACTION = 0x04, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_EVENT_TIMESTAMP_CLOCK_SYNC = 0x05, }; enum ipmi_monitoring_event_offset_critical_interrupt { IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_FRONT_PANEL_NMI_DIAGNOSTIC_INTERRUPT = 0x00, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_BUS_TIMEOUT = 0x01, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_IO_CHANNEL_CHECK_NMI = 0x02, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_SOFTWARE_NMI = 0x03, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_PCI_PERR = 0x04, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_PCI_SERR = 0x05, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_EISA_FAIL_SAFE_TIMEOUT = 0x06, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_BUS_CORRECTABLE_ERROR = 0x07, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_BUS_UNCORRECTABLE_ERROR = 0x08, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_FATAL_NMI = 0x09, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_BUS_FATAL_ERROR = 0x0A, IPMI_MONITORING_EVENT_OFFSET_CRITICAL_INTERRUPT_BUS_DEGRADED = 0x0B, }; enum ipmi_monitoring_event_offset_button_switch { IPMI_MONITORING_EVENT_OFFSET_BUTTON_SWITCH_POWER_BUTTON_PRESSED = 0x00, IPMI_MONITORING_EVENT_OFFSET_BUTTON_SWITCH_SLEEP_BUTTON_PRESSED = 0x01, IPMI_MONITORING_EVENT_OFFSET_BUTTON_SWITCH_RESET_BUTTON_PRESSED = 0x02, IPMI_MONITORING_EVENT_OFFSET_BUTTON_SWITCH_FRU_LATCH_OPEN = 0x03, IPMI_MONITORING_EVENT_OFFSET_BUTTON_SWITCH_FRU_SERVICE_REQUEST_BUTTON = 0x04, }; enum ipmi_monitoring_event_offset_chip_set { IPMI_MONITORING_EVENT_OFFSET_CHIP_SET_SOFT_POWER_CONTROL_FAILURE = 0x00, IPMI_MONITORING_EVENT_OFFSET_CHIP_SET_THERMAL_TRIP = 0x01, }; enum ipmi_monitoring_event_offset_cable_interconnect { IPMI_MONITORING_EVENT_OFFSET_CABLE_INTERCONNECT_IS_CONNECTED = 0x00, IPMI_MONITORING_EVENT_OFFSET_CABLE_INTERCONNECT_CONFIGURATION_ERROR = 0x01, }; enum ipmi_monitoring_event_offset_system_boot_initiated { IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_INITIATED_BY_POWER_UP = 0x00, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_INITIATED_BY_HARD_RESET = 0x01, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_INITIATED_BY_WARM_RESET = 0x02, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_USER_REQUESTED_PXE_BOOT = 0x03, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_AUTOMATIC_BOOT_TO_DIAGNOSTIC = 0x04, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_HARD_RESET = 0x05, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_OS_RUN_TIME_SOFTWARE_INITIATED_WARM_RESET = 0x06, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_BOOT_INITIATED_SYSTEM_RESTART = 0x07, }; enum ipmi_monitoring_event_offset_boot_error { IPMI_MONITORING_EVENT_OFFSET_BOOT_ERROR_NO_BOOTABLE_MEDIA = 0x00, IPMI_MONITORING_EVENT_OFFSET_BOOT_ERROR_NON_BOOTABLE_DISKETTE_LEFT_IN_DRIVE = 0x01, IPMI_MONITORING_EVENT_OFFSET_BOOT_ERROR_PXE_SERVER_NOT_FOUND = 0x02, IPMI_MONITORING_EVENT_OFFSET_BOOT_ERROR_INVALID_BOOT_SECTOR = 0x03, IPMI_MONITORING_EVENT_OFFSET_BOOT_ERROR_TIMEOUT_WAITING_FOR_USER_SELECTION_OF_BOOT_SOURCE = 0x04, }; enum ipmi_monitoring_event_offset_os_boot { IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_A_BOOT_COMPLETED = 0x00, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_C_BOOT_COMPLETED = 0x01, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_PXE_BOOT_COMPLETED = 0x02, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_DIAGNOSTIC_BOOT_COMPLETED = 0x03, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_CD_ROM_BOOT_COMPLETED = 0x04, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_ROM_BOOT_COMPLETED = 0x05, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_BOOT_COMPLETED_BOOT_DEVICE_NOT_SPECIFIED = 0x06, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_STARTED = 0x07, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_COMPLETED = 0x08, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_ABORTED = 0x09, IPMI_MONITORING_EVENT_OFFSET_OS_BOOT_BASE_OS_HYPERVISOR_INSTALLATION_FAILED = 0x0A, }; enum ipmi_monitoring_event_offset_os_critical_stop { IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_CRITICAL_STOP_DURING_OS_LOAD = 0x00, IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_RUN_TIME_CRITICAL_STOP = 0x01, IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_OS_GRACEFUL_STOP = 0x02, IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_OS_GRACEFUL_SHUTDOWN = 0x03, IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_SOFT_SHUTDOWN_INITIATED_BY_PEF = 0x04, IPMI_MONITORING_EVENT_OFFSET_OS_CRITICAL_STOP_AGENT_NOT_RESPONDING = 0x05, }; enum ipmi_monitoring_event_offset_slot_connector { IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_FAULT_STATUS_ASSERTED = 0x00, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_IDENTIFY_STATUS_ASSERTED = 0x01, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_INSTALLED_ATTACHED = 0x02, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_INSTALLATION = 0x03, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_CONNECTOR_READY_FOR_DEVICE_REMOVAL = 0x04, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_POWER_IS_OFF = 0x05, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_CONNECTOR_DEVICE_REMOVAL_REQUEST = 0x06, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_INTERLOCK_ASSERTED = 0x07, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_IS_DISABLED = 0x08, IPMI_MONITORING_EVENT_OFFSET_SLOT_CONNECTOR_SLOT_HOLDS_SPARE_DEVICE = 0x09, }; enum ipmi_monitoring_event_offset_system_acpi_power_state { IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S0_G0 = 0x00, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S1 = 0x01, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S2 = 0x02, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S3 = 0x03, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S4 = 0x04, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S5_G2 = 0x05, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S4_S5_SOFT_OFF = 0x06, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_G3_MECHANICAL_OFF = 0x07, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_SLEEPING_IN_AN_S1_S2_OR_S3_STATES = 0x08, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_G1_SLEEPING = 0x09, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_S5_ENTERED_BY_OVERRIDE = 0x0A, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_LEGACY_ON_STATE = 0x0B, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_LEGACY_OFF_STATE = 0x0C, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_UNSPECIFIED = 0x0D, IPMI_MONITORING_EVENT_OFFSET_SYSTEM_ACPI_POWER_STATE_UNKNOWN = 0x0E, }; enum ipmi_monitoring_event_offset_watchdog2 { IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_TIMER_EXPIRED = 0x00, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_HARD_RESET = 0x01, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_POWER_DOWN = 0x02, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_POWER_CYCLE = 0x03, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_RESERVED1 = 0x04, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_RESERVED2 = 0x05, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_RESERVED3 = 0x06, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_RESERVED4 = 0x07, IPMI_MONITORING_EVENT_OFFSET_WATCHDOG2_TIMER_INTERRUPT = 0x08, }; enum ipmi_monitoring_event_offset_platform_alert { IPMI_MONITORING_EVENT_OFFSET_PLATFORM_ALERT_PLATFORM_GENERATED_PAGE = 0x00, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_ALERT_PLATFORM_GENERATED_LAN_ALERT = 0x01, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_ALERT_PLATFORM_EVENT_TRAP_GENERATED = 0x02, IPMI_MONITORING_EVENT_OFFSET_PLATFORM_ALERT_PLATFORM_GENERATED_SNMP_TRAP = 0x03, }; enum ipmi_monitoring_event_offset_entity_presence { IPMI_MONITORING_EVENT_OFFSET_ENTITY_PRESENCE_ENTITY_PRESENT = 0x00, IPMI_MONITORING_EVENT_OFFSET_ENTITY_PRESENCE_ENTITY_ABSENT = 0x01, IPMI_MONITORING_EVENT_OFFSET_ENTITY_PRESENCE_ENTITY_DISABLED = 0x02, }; enum ipmi_monitoring_event_offset_lan { IPMI_MONITORING_EVENT_OFFSET_LAN_HEARTBEAT_LOST = 0x00, IPMI_MONITORING_EVENT_OFFSET_LAN_HEARTBEAT = 0x01, }; enum ipmi_monitoring_event_offset_management_subsystem_health { IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_ACCESS_DEGRADED_OR_UNAVAILABLE = 0x00, IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_CONTROLLER_ACCESS_DEGRADED_OR_UNAVAILABLE = 0x01, IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_OFF_LINE = 0x02, IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_MANAGEMENT_CONTROLLER_UNAVAILABLE = 0x03, IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_SENSOR_FAILURE = 0x04, IPMI_MONITORING_EVENT_OFFSET_MANAGEMENT_SUBSYSTEM_HEALTH_FRU_FAILURE = 0x05, }; enum ipmi_monitoring_event_offset_battery { IPMI_MONITORING_EVENT_OFFSET_BATTERY_BATTERY_LOW = 0x00, IPMI_MONITORING_EVENT_OFFSET_BATTERY_BATTERY_FAILED = 0x01, IPMI_MONITORING_EVENT_OFFSET_BATTERY_BATTERY_PRESENCE_DETECTED = 0x02, }; enum ipmi_monitoring_event_offset_session_audit { IPMI_MONITORING_EVENT_OFFSET_SESSION_AUDIT_SESSION_ACTIVATED = 0x00, IPMI_MONITORING_EVENT_OFFSET_SESSION_AUDIT_SESSION_DEACTIVATED = 0x01, IPMI_MONITORING_EVENT_OFFSET_SESSION_AUDIT_INVALID_USERNAME_OR_PASSWORD = 0x02, IPMI_MONITORING_EVENT_OFFSET_SESSION_AUDIT_INVALID_PASSWORD_DISABLE = 0x03, }; enum ipmi_monitoring_event_offset_version_change { IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY = 0x00, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY = 0x01, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_HARDWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY = 0x02, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_FIRMWARE_OR_SOFTWARE_INCOMPATABILITY_DETECTED_WITH_ASSOCIATED_ENTITY = 0x03, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_ENTITY_IS_OF_AN_INVALID_OR_UNSUPPORTED_HARDWARE_VERSION = 0x04, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_ENTITY_CONTAINS_AN_INVALID_OR_UNSUPPORTED_FIRMWARE_OR_SOFTWARE_VERSION = 0x05, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_HARDWARE_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL = 0x06, IPMI_MONITORING_EVENT_OFFSET_VERSION_CHANGE_SOFTWARE_OR_FW_CHANGE_DETECTED_WITH_ASSOCIATED_ENTITY_WAS_SUCCESSFUL = 0x07, }; enum ipmi_monitoring_event_offset_fru_state { IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_NOT_INSTALLED = 0x00, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_INACTIVE = 0x01, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_ACTIVATION_REQUESTED = 0x02, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_ACTIVATION_IN_PROGRESS = 0x03, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_ACTIVE = 0x04, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_DEACTIVATION_REQUESTED = 0x05, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_DEACTIVATION_IN_PROGRESS = 0x06, IPMI_MONITORING_EVENT_OFFSET_FRU_STATE_FRU_COMMUNICATION_LOST = 0x07, }; #ifdef __cplusplus } #endif #endif /* IPMI_MONITORING_OFFSETS_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_debug.h0000644002055400205540000000670313527331637023547 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_debug.h,v 1.12 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_DEBUG_H #define IPMI_MONITORING_DEBUG_H #include #include "ipmi_monitoring.h" #define IPMI_MONITORING_DEBUG_ERROR_BUFLEN 4096 #define IPMI_MONITORING_DEBUG(__msg) \ do { \ char __err[IPMI_MONITORING_DEBUG_ERROR_BUFLEN + 1]; \ int __len; \ memset (__err, '\0', IPMI_MONITORING_DEBUG_ERROR_BUFLEN + 1); \ __len = snprintf (__err, \ IPMI_MONITORING_DEBUG_ERROR_BUFLEN, \ "(%s, %s, %d): ", \ __FILE__, \ __FUNCTION__, \ __LINE__); \ if (__len < IPMI_MONITORING_DEBUG_ERROR_BUFLEN) \ { \ char *__str; \ if ((__str = __debug_msg_create __msg)) \ { \ strncat (__err, __str, IPMI_MONITORING_DEBUG_ERROR_BUFLEN - __len); \ free (__str); \ } \ } \ ipmi_monitoring_debug (__err); \ } while(0) void ipmi_monitoring_debug (const char *fmt, ...); char * __debug_msg_create (const char *fmt, ...); #endif /* IPMI_MONITORING_DEBUG_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_defs.h0000644002055400205540000002120213527331637023371 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_defs.h,v 1.41 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_DEFS_H #define IPMI_MONITORING_DEFS_H #if HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #include #include #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include #include "list.h" #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif /* MAXHOSTNAMELEN */ #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ /* +1 to avoid gcc warnings */ #define IPMI_MONITORING_SENSOR_TYPE_VALID(__val) \ (((((__val) + 1) >= (IPMI_MONITORING_SENSOR_TYPE_RESERVED + 1) \ && ((__val) - 1) <= (IPMI_MONITORING_SENSOR_TYPE_OEM_MAX - 1)) \ || ((__val) == IPMI_MONITORING_SENSOR_TYPE_UNKNOWN)) ? 1 : 0) #define IPMI_MONITORING_SENSOR_TYPE_INPUT_VALID(__val) \ ((((__val) + 1) >= (IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE + 1) \ && ((__val) - 1) <= (IPMI_MONITORING_SENSOR_TYPE_OEM_MAX - 1)) ? 1 : 0) #define IPMI_MONITORING_STATE_VALID(__val) \ (((__val) == IPMI_MONITORING_STATE_NOMINAL \ || (__val) == IPMI_MONITORING_STATE_WARNING \ || (__val) == IPMI_MONITORING_STATE_CRITICAL \ || (__val) == IPMI_MONITORING_STATE_UNKNOWN) ? 1 : 0) /* +1 to avoid gcc warnings */ #define IPMI_MONITORING_SENSOR_UNITS_VALID(__val) \ ((((__val) + 1) >= (IPMI_MONITORING_SENSOR_UNITS_NONE + 1) \ && (__val) <= IPMI_MONITORING_SENSOR_UNITS_UNKNOWN) ? 1 : 0) #define IPMI_MONITORING_SENSOR_READING_TYPE_VALID(__val) \ (((__val) == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER8_BOOL \ || (__val) == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER32 \ || (__val) == IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE \ || (__val) == IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN) ? 1 : 0) /* +1 to avoid gcc warnings */ #define IPMI_MONITORING_SENSOR_BITMASK_TYPE_VALID(__val) \ (((((__val) + 1) >= (IPMI_MONITORING_SENSOR_BITMASK_TYPE_THRESHOLD + 1) \ && (__val) <= IPMI_MONITORING_SENSOR_BITMASK_TYPE_FRU_STATE) \ || (__val) == IPMI_MONITORING_SENSOR_BITMASK_TYPE_OEM \ || (__val) == IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN) ? 1 : 0) #define IPMI_MONITORING_MAX_USER_NAME_LENGTH IPMI_MAX_USER_NAME_LENGTH #define IPMI_MONITORING_MAX_PASSWORD_LENGTH IPMI_MAX_1_5_PASSWORD_LENGTH #define IPMI_MONITORING_PRIVILEGE_LEVEL_VALID(__val) \ (((__val) == IPMI_MONITORING_PRIVILEGE_LEVEL_USER \ || (__val) == IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR \ || (__val) == IPMI_MONITORING_PRIVILEGE_LEVEL_ADMIN) ? 1 : 0) #define IPMI_MONITORING_AUTHENTICATION_TYPE_VALID(__val) \ (((__val) == IPMI_MONITORING_AUTHENTICATION_TYPE_NONE \ || (__val) == IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY \ || (__val) == IPMI_MONITORING_AUTHENTICATION_TYPE_MD2 \ || (__val) == IPMI_MONITORING_AUTHENTICATION_TYPE_MD5) ? 1 : 0) #define IPMI_MONITORING_FLAGS_MASK \ (IPMI_MONITORING_FLAGS_NONE \ | IPMI_MONITORING_FLAGS_DEBUG \ | IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS \ | IPMI_MONITORING_FLAGS_LOCK_MEMORY) #define IPMI_MONITORING_SEL_FLAGS_MASK \ (IPMI_MONITORING_SEL_FLAGS_REREAD_SDR_CACHE \ | IPMI_MONITORING_SEL_FLAGS_INTERPRET_OEM_DATA \ | IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD \ | IPMI_MONITORING_SEL_FLAGS_ENTITY_SENSOR_NAMES \ | IPMI_MONITORING_SEL_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) #define IPMI_MONITORING_SENSOR_READING_FLAGS_MASK \ (IPMI_MONITORING_SENSOR_READING_FLAGS_REREAD_SDR_CACHE \ | IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS \ | IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS \ | IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA \ | IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS \ | IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING \ | IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_SCANNING_DISABLED \ | IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_BMC_OWNER \ | IPMI_MONITORING_SENSOR_READING_FLAGS_ENTITY_SENSOR_NAMES \ | IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) #define IPMI_MONITORING_AUTHENTICATION_TYPE_DEFAULT IPMI_AUTHENTICATION_TYPE_MD5 #define IPMI_MONITORING_PRIVILEGE_LEVEL_DEFAULT IPMI_PRIVILEGE_LEVEL_USER #define IPMI_MONITORING_SESSION_TIMEOUT_LENGTH_DEFAULT 20000 #define IPMI_MONITORING_RETRANSMISSION_TIMEOUT_LENGTH_DEFAULT 500 #define IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH 32 #define IPMI_MONITORING_OEM_DATA_MAX 13 #define IPMI_MONITORING_MAGIC 0xABCD9876 #define IPMI_MONITORING_PACKET_BUFLEN 1024 struct ipmi_monitoring_sel_record { /* for all records */ int record_id; int record_type; int record_type_class; int sel_state; /* for timestamped records */ unsigned int timestamp; /* for system event records */ int sensor_type; int sensor_number; char sensor_name[IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH + 1]; int event_direction; int event_offset_type; int event_offset; char *event_offset_string; int event_type_code; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; /* for oem timestamped records */ int manufacturer_id; /* for oem timestamped & non-timestamped records */ uint8_t oem_data[IPMI_MONITORING_OEM_DATA_MAX]; unsigned int oem_data_len; }; struct ipmi_monitoring_sensor_reading { int record_id; int sensor_number; int sensor_type; char sensor_name[IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH + 1]; int sensor_state; int sensor_units; int sensor_reading_type; int sensor_bitmask_type; int sensor_bitmask; char **sensor_bitmask_strings; union { uint8_t bool_val; uint32_t integer_val; double double_val; } sensor_reading; int event_reading_type_code; }; struct ipmi_monitoring_ctx { uint32_t magic; int errnum; /* initialize this in ctx create */ ipmi_interpret_ctx_t interpret_ctx; char sdr_cache_directory[MAXPATHLEN+1]; int sdr_cache_directory_set; char sdr_cache_filename_format[MAXPATHLEN+1]; int sdr_cache_filename_format_set; /* for use by both sel and sensor codepath */ uint32_t manufacturer_id; uint16_t product_id; /* for use by both sel and sensor codepath */ ipmi_sdr_ctx_t sdr_ctx; ipmi_ctx_t ipmi_ctx; Ipmi_Monitoring_Callback callback; void *callback_data; /* for sel codepath */ ipmi_sel_ctx_t sel_parse_ctx; List sel_records; ListIterator sel_records_itr; struct ipmi_monitoring_sel_record *current_sel_record; struct ipmi_monitoring_sel_record *callback_sel_record; /* for sensor codepath */ ipmi_sensor_read_ctx_t sensor_read_ctx; List sensor_readings; ListIterator sensor_readings_itr; struct ipmi_monitoring_sensor_reading *current_sensor_reading; struct ipmi_monitoring_sensor_reading *callback_sensor_reading; }; #endif /* IPMI_MONITORING_DEFS_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_ipmi_communication.h0000644002055400205540000000367213527331637026346 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_ipmi_communication.h,v 1.12 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_IPMI_COMMUNICATION_H #define IPMI_MONITORING_IPMI_COMMUNICATION_H #include #include "ipmi_monitoring.h" int ipmi_monitoring_ipmi_communication_init (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config); void ipmi_monitoring_ipmi_ctx_error_convert (ipmi_monitoring_ctx_t c); int ipmi_monitoring_ipmi_communication_cleanup (ipmi_monitoring_ctx_t c); #endif /* IPMI_MONITORING_IPMI_COMMUNICATION_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_parse_common.h0000644002055400205540000000320413527331637025134 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_parse_common.h,v 1.1 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_PARSE_COMMON_H #define IPMI_MONITORING_PARSE_COMMON_H #include "ipmi_monitoring.h" int ipmi_monitoring_get_sensor_type (ipmi_monitoring_ctx_t c, uint8_t sensor_type); #endif /* IPMI_MONITORING_PARSE_COMMON_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sdr_cache.h0000644002055400205540000000356713527331637024401 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sdr_cache.h,v 1.11 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_SDR_CACHE_H #define IPMI_MONITORING_SDR_CACHE_H #include "ipmi_monitoring.h" int ipmi_monitoring_sdr_cache_load (ipmi_monitoring_ctx_t c, const char *hostname, unsigned int sdr_create_flags); int ipmi_monitoring_sdr_cache_unload (ipmi_monitoring_ctx_t c); int ipmi_monitoring_sdr_cache_flush (ipmi_monitoring_ctx_t c, const char *hostname); #endif /* IPMI_MONITORING_SDR_CACHE_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sel.h0000644002055400205540000000403213527331637023235 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sel.h,v 1.1 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_SEL_H #define IPMI_MONITORING_SEL_H #include "ipmi_monitoring.h" int ipmi_monitoring_sel_init (ipmi_monitoring_ctx_t c); int ipmi_monitoring_sel_cleanup (ipmi_monitoring_ctx_t c); int ipmi_monitoring_get_sel (ipmi_monitoring_ctx_t c, unsigned int sel_flags, unsigned int *record_ids, unsigned int record_ids_len, unsigned int *sensor_types, unsigned int sensor_types_len, unsigned int *date_begin, unsigned int *date_end); #endif /* IPMI_MONITORING_SEL_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sensor_reading.h0000644002055400205540000000401113527331637025451 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sensor_reading.h,v 1.15 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifndef IPMI_MONITORING_SENSOR_READING_H #define IPMI_MONITORING_SENSOR_READING_H #include "ipmi_monitoring.h" int ipmi_monitoring_sensor_reading_init (ipmi_monitoring_ctx_t c); int ipmi_monitoring_sensor_reading_cleanup (ipmi_monitoring_ctx_t c); int ipmi_monitoring_get_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, unsigned int shared_sensor_number_offset, unsigned int *sensor_types, unsigned int sensor_types_len); #endif /* IPMI_MONITORING_SENSOR_READING_H */ freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring.c0000644002055400205540000016526413527331637022404 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring.c,v 1.79 2010-08-04 20:41:36 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_ipmi_communication.h" #include "ipmi_monitoring_sdr_cache.h" #include "ipmi_monitoring_sel.h" #include "ipmi_monitoring_sensor_reading.h" #include "freeipmi-portability.h" #include "secure.h" static char *ipmi_monitoring_errmsgs[] = { "success", "ctx null", "ctx invalid", "invalid parameters", "permission denied", "library uninitialized", "sel config file does not exist", "sel config file parse error", "sensor config file does not exist", "sensor config file parse error", "sdr cache permission error", "sdr cache filesystem error", "hostname invalid", "sensor not found", "no sel records available", "end of sel records list reached", "sel record data not available", "no sensor readings available", "end of sensor readings list reached", "connection timeout", "session timeout", "invalid username", "invalid password", "password verification timeout", "k_g invalid", "privilege level insufficient", "privilege level cannot be obtained for this user", "authentication type unavailable for attempted privilege level", "ipmi 2.0 unavailable", "cipher suite id unavailable", "callback error", "BMC busy", "out of memory", "internal IPMI error", "internal system error", "internal error", "errnum out of range", NULL }; static int _ipmi_monitoring_initialized = 0; uint32_t _ipmi_monitoring_flags = 0; #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE 0x01 #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE 0x02 #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD_ACCEPTABLE 0x04 #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMP (IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE \ | IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE) #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_OEM (IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE \ | IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD_ACCEPTABLE) #define IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_ALL (IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE \ | IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE \ | IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD_ACCEPTABLE) struct ipmi_monitoring_sdr_callback { ipmi_monitoring_ctx_t c; unsigned int sensor_reading_flags; unsigned int *sensor_types; unsigned int sensor_types_len; }; int ipmi_monitoring_init (unsigned int flags, int *errnum) { if (flags & ~IPMI_MONITORING_FLAGS_MASK) { if (errnum) *errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (_ipmi_monitoring_initialized) return (0); _ipmi_monitoring_flags = flags; _ipmi_monitoring_initialized++; if (errnum) *errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } static void _destroy_sel_record (void *x) { struct ipmi_monitoring_sel_record *record; assert (x); record = (struct ipmi_monitoring_sel_record *)x; free (record->event_offset_string); free (record); } static void _destroy_sensor_reading (void *x) { struct ipmi_monitoring_sensor_reading *reading; assert (x); reading = (struct ipmi_monitoring_sensor_reading *)x; if (reading->sensor_bitmask_strings) { unsigned int i = 0; while (reading->sensor_bitmask_strings[i]) { free (reading->sensor_bitmask_strings[i]); i++; } free (reading->sensor_bitmask_strings); } free (reading); } static void _destroy_ctx (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); ipmi_interpret_ctx_destroy (c->interpret_ctx); /* Note: destroy iterator first */ if (c->sel_records_itr) { list_iterator_destroy (c->sel_records_itr); c->sel_records_itr = NULL; } if (c->sel_records) { list_destroy (c->sel_records); c->sel_records = NULL; } /* Note: destroy iterator first */ if (c->sensor_readings_itr) { list_iterator_destroy (c->sensor_readings_itr); c->sensor_readings_itr = NULL; } if (c->sensor_readings) { list_destroy (c->sensor_readings); c->sensor_readings = NULL; } c->current_sensor_reading = NULL; c->magic = ~IPMI_MONITORING_MAGIC; if (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_LOCK_MEMORY) secure_free (c, sizeof (struct ipmi_monitoring_ctx)); else free (c); } ipmi_monitoring_ctx_t ipmi_monitoring_ctx_create (void) { struct ipmi_monitoring_ctx *c = NULL; if (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_LOCK_MEMORY) { if (!(c = (ipmi_monitoring_ctx_t)secure_malloc (sizeof (struct ipmi_monitoring_ctx)))) return (NULL); /* secure_memset called in secure_malloc()*/ } else { if (!(c = (ipmi_monitoring_ctx_t)malloc (sizeof (struct ipmi_monitoring_ctx)))) return (NULL); memset (c, '\0', sizeof (struct ipmi_monitoring_ctx)); } c->magic = IPMI_MONITORING_MAGIC; if (!(c->interpret_ctx = ipmi_interpret_ctx_create ())) goto cleanup; if (!(c->sel_records = list_create ((ListDelF)_destroy_sel_record))) goto cleanup; if (!(c->sensor_readings = list_create ((ListDelF)_destroy_sensor_reading))) goto cleanup; return (c); cleanup: _destroy_ctx (c); return (NULL); } void ipmi_monitoring_ctx_destroy (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return; _destroy_ctx (c); } int ipmi_monitoring_ctx_errnum (ipmi_monitoring_ctx_t c) { if (!c) return (IPMI_MONITORING_ERR_CTX_NULL); else if (c->magic != IPMI_MONITORING_MAGIC) return (IPMI_MONITORING_ERR_CTX_INVALID); else return (c->errnum); } char * ipmi_monitoring_ctx_strerror (int errnum) { if (errnum >= IPMI_MONITORING_ERR_SUCCESS && errnum <= IPMI_MONITORING_ERR_ERRNUMRANGE) return (ipmi_monitoring_errmsgs[errnum]); else return (ipmi_monitoring_errmsgs[IPMI_MONITORING_ERR_ERRNUMRANGE]); } char * ipmi_monitoring_ctx_errormsg (ipmi_monitoring_ctx_t c) { return (ipmi_monitoring_ctx_strerror (ipmi_monitoring_ctx_errnum (c))); } static void _interpret_ctx_error_convert (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_PERMISSION) c->errnum = IPMI_MONITORING_ERR_PERMISSION; else if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST) c->errnum = IPMI_MONITORING_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST; else if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_PARSE) c->errnum = IPMI_MONITORING_ERR_SEL_CONFIG_FILE_PARSE; else if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST) c->errnum = IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST; else if (ipmi_interpret_ctx_errnum (c->interpret_ctx) == IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_PARSE) c->errnum = IPMI_MONITORING_ERR_SENSOR_CONFIG_FILE_PARSE; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; } int ipmi_monitoring_ctx_sel_config_file (ipmi_monitoring_ctx_t c, const char *sel_config_file) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (ipmi_interpret_load_sel_config (c->interpret_ctx, sel_config_file) < 0) { _interpret_ctx_error_convert (c); return (-1); } c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_ctx_sensor_config_file (ipmi_monitoring_ctx_t c, const char *sensor_config_file) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (sensor_config_file) { if (ipmi_interpret_load_sensor_config (c->interpret_ctx, sensor_config_file) < 0) { _interpret_ctx_error_convert (c); return (-1); } } else { /* legacy */ if (ipmi_interpret_load_sensor_config (c->interpret_ctx, IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY) < 0) { if (ipmi_interpret_ctx_errnum (c->interpret_ctx) != IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST) { _interpret_ctx_error_convert (c); return (-1); } } else goto out; if (ipmi_interpret_load_sensor_config (c->interpret_ctx, NULL) < 0) { _interpret_ctx_error_convert (c); return (-1); } } out: c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_ctx_sdr_cache_directory (ipmi_monitoring_ctx_t c, const char *dir) { struct stat buf; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if (!dir || (strlen (dir) > MAXPATHLEN)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (stat (dir, &buf) < 0) { if (errno == EACCES || errno == EPERM) c->errnum = IPMI_MONITORING_ERR_PERMISSION; else c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } strncpy (c->sdr_cache_directory, dir, MAXPATHLEN); c->sdr_cache_directory_set = 1; c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_ctx_sdr_cache_filenames (ipmi_monitoring_ctx_t c, const char *format) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if (!format) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (strchr (format, '/')) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (!strstr (format, "%H")) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } strncpy (c->sdr_cache_filename_format, format, MAXPATHLEN); c->sdr_cache_filename_format_set = 1; c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } static int _ipmi_monitoring_interpret_oem_data (ipmi_monitoring_ctx_t c, int enable_interpret_oem_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->interpret_ctx); assert (c->ipmi_ctx); assert (_ipmi_monitoring_initialized); if (enable_interpret_oem_data) { if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_device_id_rs))) { IPMI_MONITORING_DEBUG (("fiid_obj_create: %s", strerror(errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } if (ipmi_cmd_get_device_id (c->ipmi_ctx, obj_cmd_rs) < 0) { IPMI_MONITORING_DEBUG (("ipmi_cmd_get_device_id: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); ipmi_monitoring_ipmi_ctx_error_convert (c); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "manufacturer_id.id", &val) < 0) { IPMI_MONITORING_DEBUG (("FIID_OBJ_GET: %s", fiid_obj_errormsg (obj_cmd_rs))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } c->manufacturer_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "product_id", &val) < 0) { IPMI_MONITORING_DEBUG (("FIID_OBJ_GET: %s", fiid_obj_errormsg (obj_cmd_rs))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } c->product_id = val; if (ipmi_interpret_ctx_set_flags (c->interpret_ctx, IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_ctx_set_flags: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if (ipmi_interpret_ctx_set_manufacturer_id (c->interpret_ctx, c->manufacturer_id) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_ctx_set_manufacturer_id: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if (ipmi_interpret_ctx_set_product_id (c->interpret_ctx, c->product_id) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_ctx_set_product_id: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } } else { if (ipmi_interpret_ctx_set_flags (c->interpret_ctx, IPMI_INTERPRET_FLAGS_DEFAULT) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_ctx_set_flags: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _ipmi_monitoring_sel (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, unsigned int *record_ids, unsigned int record_ids_len, unsigned int *sensor_types, unsigned int sensor_types_len, unsigned int *date_begin, unsigned int *date_end) { unsigned int sdr_create_flags = IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (!(sel_flags & ~IPMI_MONITORING_SEL_FLAGS_MASK)); ipmi_monitoring_sel_iterator_destroy (c); if (ipmi_monitoring_ipmi_communication_init (c, hostname, config) < 0) goto cleanup; if (sel_flags & IPMI_MONITORING_SEL_FLAGS_REREAD_SDR_CACHE) { if (ipmi_monitoring_sdr_cache_flush (c, hostname) < 0) goto cleanup; } if (sel_flags & IPMI_MONITORING_SEL_FLAGS_INTERPRET_OEM_DATA) { if (_ipmi_monitoring_interpret_oem_data (c, 1) < 0) goto cleanup; } else { if (_ipmi_monitoring_interpret_oem_data (c, 0) < 0) goto cleanup; } if (sel_flags & IPMI_MONITORING_SEL_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) sdr_create_flags |= IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT; if (ipmi_monitoring_sdr_cache_load (c, hostname, sdr_create_flags) < 0) goto cleanup; if (ipmi_monitoring_sel_init (c) < 0) goto cleanup; if (ipmi_monitoring_get_sel (c, sel_flags, record_ids, record_ids_len, sensor_types, sensor_types_len, date_begin, date_end) < 0) goto cleanup; if ((rv = list_count (c->sel_records)) > 0) { if (!(c->sel_records_itr = list_iterator_create (c->sel_records))) { IPMI_MONITORING_DEBUG (("list_iterator_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } c->current_sel_record = list_next (c->sel_records_itr); } ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sel_cleanup (c); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (rv); cleanup: ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_sel_iterator_destroy (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sel_cleanup (c); return (-1); } int ipmi_monitoring_sel_by_record_id (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, unsigned int *record_ids, unsigned int record_ids_len, Ipmi_Monitoring_Callback callback, void *callback_data) { int rv; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if ((sel_flags & ~IPMI_MONITORING_SEL_FLAGS_MASK) || (record_ids && !record_ids_len)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (record_ids && record_ids_len) { unsigned int i; for (i = 0; i < record_ids_len; i++) { if (record_ids[i] > IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } } } c->callback = callback; c->callback_data = callback_data; rv = _ipmi_monitoring_sel (c, hostname, config, sel_flags, record_ids, record_ids_len, NULL, 0, NULL, NULL); c->callback_sel_record = NULL; return (rv); } int ipmi_monitoring_sel_by_sensor_type (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, unsigned int *sensor_types, unsigned int sensor_types_len, Ipmi_Monitoring_Callback callback, void *callback_data) { int rv; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if ((sel_flags & ~IPMI_MONITORING_SEL_FLAGS_MASK) || (sensor_types && !sensor_types_len)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } c->callback = callback; c->callback_data = callback_data; rv = _ipmi_monitoring_sel (c, hostname, config, sel_flags, NULL, 0, sensor_types, sensor_types_len, NULL, NULL); c->callback_sel_record = NULL; return (rv); } int _ipmi_monitoring_date_parse (ipmi_monitoring_ctx_t c, const char *date, unsigned int *date_val) { time_t t; struct tm tm; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (date); assert (date_val); /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof (struct tm)); if (!strptime (date, "%m/%d/%Y", &tm)) { if (!strptime (date, "%b/%d/%Y", &tm)) { if (!strptime (date, "%m-%d-%Y", &tm)) { if (!strptime (date, "%b-%d-%Y", &tm)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } } } } /* strptime() does not set tm_isdst. Set so mktime() will not * adjust for daylight savings time. */ tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } (*date_val) = t; return (0); } int ipmi_monitoring_sel_by_date_range (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sel_flags, const char *date_begin, const char *date_end, Ipmi_Monitoring_Callback callback, void *callback_data) { unsigned int date_begin_val; unsigned int date_end_val; int rv; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if (sel_flags & ~IPMI_MONITORING_SEL_FLAGS_MASK) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (date_begin) { if (_ipmi_monitoring_date_parse (c, date_begin, &date_begin_val) < 0) return (-1); } else date_begin_val = 0; if (date_end) { if (_ipmi_monitoring_date_parse (c, date_end, &date_end_val) < 0) return (-1); /* Date range input means beginning of begin date to end of end * date, so we might need to add seconds to the end to get to * the end of the day. */ date_end_val = date_end_val + (24 * 60 * 60); } else date_end_val = time (NULL); c->callback = callback; c->callback_data = callback_data; rv = _ipmi_monitoring_sel (c, hostname, config, sel_flags, NULL, 0, NULL, 0, &date_begin_val, &date_end_val); c->callback_sel_record = NULL; return (rv); } static int _list_delete_all (void *x, void *y) { return (1); } int ipmi_monitoring_sel_iterator_first (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!c->sel_records_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SENSOR_READINGS; return (-1); } list_iterator_reset (c->sel_records_itr); c->current_sel_record = list_next (c->sel_records_itr); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_sel_iterator_next (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!c->sel_records_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SENSOR_READINGS; return (-1); } c->current_sel_record = list_next (c->sel_records_itr); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return ((c->current_sel_record) ? 1 : 0); } void ipmi_monitoring_sel_iterator_destroy (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return; list_delete_all (c->sensor_readings, _list_delete_all, "dummyvalue"); if (c->sel_records_itr) { list_iterator_destroy (c->sel_records_itr); c->sel_records_itr = NULL; } c->current_sel_record = NULL; } static int _ipmi_monitoring_sel_record_common (ipmi_monitoring_ctx_t c, unsigned int acceptable_record_classes, struct ipmi_monitoring_sel_record **sel_record) { assert (acceptable_record_classes); assert (sel_record); if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (c->callback_sel_record) { if ((c->callback_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE)) || (c->callback_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE)) || (c->callback_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD_ACCEPTABLE))) { c->errnum = IPMI_MONITORING_ERR_SEL_RECORD_DATA_NOT_AVAILABLE; return (-1); } (*sel_record) = c->callback_sel_record; return (0); } if (!c->sel_records_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SEL_RECORDS; return (-1); } if (!c->current_sel_record) { c->errnum = IPMI_MONITORING_ERR_SEL_RECORDS_LIST_END; return (-1); } if ((c->current_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE)) || (c->current_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE)) || (c->current_sel_record->record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD && !(acceptable_record_classes & IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD_ACCEPTABLE))) { c->errnum = IPMI_MONITORING_ERR_SEL_RECORD_DATA_NOT_AVAILABLE; return (-1); } (*sel_record) = c->current_sel_record; return (0); } int ipmi_monitoring_sel_read_record_id (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_ALL, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->record_id); } int ipmi_monitoring_sel_read_record_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_ALL, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->record_type); } int ipmi_monitoring_sel_read_record_type_class (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_ALL, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->record_type_class); } int ipmi_monitoring_sel_read_sel_state (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_ALL, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->sel_state); } int ipmi_monitoring_sel_read_timestamp (ipmi_monitoring_ctx_t c, unsigned int *timestamp) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMP, &sel_record) < 0) return (-1); if (!timestamp) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } (*timestamp) = sel_record->timestamp; c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_sel_read_sensor_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->sensor_type); } int ipmi_monitoring_sel_read_sensor_number (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->sensor_number); } char * ipmi_monitoring_sel_read_sensor_name (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (NULL); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->sensor_name); } int ipmi_monitoring_sel_read_event_direction (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->event_direction); } int ipmi_monitoring_sel_read_event_offset_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->event_offset_type); } int ipmi_monitoring_sel_read_event_offset (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->event_offset); } char * ipmi_monitoring_sel_read_event_offset_string (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (NULL); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->event_offset_string); } int ipmi_monitoring_sel_read_event_type_code (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->event_type_code); } int ipmi_monitoring_sel_read_event_data (ipmi_monitoring_ctx_t c, unsigned int *event_data1, unsigned int *event_data2, unsigned int *event_data3) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); if (!event_data1 && !event_data2 && !event_data3) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (event_data1) (*event_data1) = sel_record->event_data1; if (event_data2) (*event_data2) = sel_record->event_data2; if (event_data3) (*event_data3) = sel_record->event_data3; c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_sel_read_manufacturer_id (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD_ACCEPTABLE, &sel_record) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sel_record->manufacturer_id); } int ipmi_monitoring_sel_read_oem_data (ipmi_monitoring_ctx_t c, void *oem_data, unsigned int oem_data_len) { struct ipmi_monitoring_sel_record *sel_record = NULL; if (_ipmi_monitoring_sel_record_common (c, IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_OEM, &sel_record) < 0) return (-1); if (!oem_data || !oem_data_len) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (sel_record->oem_data_len > oem_data_len) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } memcpy (oem_data, sel_record->oem_data, sel_record->oem_data_len); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return ((int)sel_record->oem_data_len); } static int _ipmi_monitoring_sensor_readings_flags_common (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags) { unsigned int sensor_read_ctx_flags = 0; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (!(sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK)); if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_REREAD_SDR_CACHE) { if (ipmi_monitoring_sdr_cache_flush (c, hostname) < 0) goto cleanup; } if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS) sensor_read_ctx_flags |= IPMI_SENSOR_READ_FLAGS_BRIDGE_SENSORS; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING) sensor_read_ctx_flags |= IPMI_SENSOR_READ_FLAGS_DISCRETE_READING; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_SCANNING_DISABLED) sensor_read_ctx_flags |= IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_BMC_OWNER) sensor_read_ctx_flags |= IPMI_SENSOR_READ_FLAGS_ASSUME_BMC_OWNER; if (sensor_read_ctx_flags) { if (ipmi_sensor_read_ctx_set_flags (c->sensor_read_ctx, sensor_read_ctx_flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sensor_read_ctx_set_flags: %s", ipmi_sensor_read_ctx_errormsg (c->sensor_read_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } } if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA) { if (_ipmi_monitoring_interpret_oem_data (c, 1) < 0) goto cleanup; } else { if (_ipmi_monitoring_interpret_oem_data (c, 0) < 0) goto cleanup; } rv = 0; cleanup: return (rv); } /* returns 1 on success, 0 on fallback and do reading, -1 on error */ static int _ipmi_monitoring_get_sensor_reading_shared (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, unsigned int *sensor_types, unsigned int sensor_types_len) { uint8_t record_type; uint8_t share_count; int i; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (!(sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK)); assert (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS); if (ipmi_sdr_parse_record_id_and_type (c->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_record_id_and_type: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) return (0); if (ipmi_sdr_parse_sensor_record_sharing (c->sdr_ctx, NULL, 0, &share_count, NULL, NULL, NULL) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_sensor_record_sharing: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (share_count <= 1) return (0); /* IPMI spec gives the following example: * * "If the starting sensor number was 10, and the share * count was 3, then sensors 10, 11, and 12 would share * the record" */ for (i = 0; i < share_count; i++) { if (ipmi_monitoring_get_sensor_reading (c, sensor_reading_flags, i, sensor_types, sensor_types_len) < 0) return (-1); } return (1); } static int _ipmi_monitoring_sensor_readings_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_monitoring_sdr_callback *sdr_callback_arg; int shared_ret = 0; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_monitoring_sdr_callback *)arg; if (sdr_callback_arg->sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS) { if ((shared_ret = _ipmi_monitoring_get_sensor_reading_shared (sdr_callback_arg->c, sdr_callback_arg->sensor_reading_flags, sdr_callback_arg->sensor_types, sdr_callback_arg->sensor_types_len)) < 0) return (-1); } if (!shared_ret) { if (ipmi_monitoring_get_sensor_reading (sdr_callback_arg->c, sdr_callback_arg->sensor_reading_flags, 0, sdr_callback_arg->sensor_types, sdr_callback_arg->sensor_types_len) < 0) return (-1); } return (0); } static int _ipmi_monitoring_sensor_readings_by_record_id (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *record_ids, unsigned int record_ids_len) { unsigned int sdr_create_flags = IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (!(sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK)); ipmi_monitoring_sensor_iterator_destroy (c); if (ipmi_monitoring_ipmi_communication_init (c, hostname, config) < 0) goto cleanup; if (ipmi_monitoring_sensor_reading_init (c) < 0) goto cleanup; if (_ipmi_monitoring_sensor_readings_flags_common (c, hostname, config, sensor_reading_flags) < 0) goto cleanup; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) sdr_create_flags |= IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT; if (ipmi_monitoring_sdr_cache_load (c, hostname, sdr_create_flags) < 0) goto cleanup; if (!record_ids) { struct ipmi_monitoring_sdr_callback sdr_callback_arg; sdr_callback_arg.c = c; sdr_callback_arg.sensor_reading_flags = sensor_reading_flags; sdr_callback_arg.sensor_types = NULL; sdr_callback_arg.sensor_types_len = 0; if (ipmi_sdr_cache_iterate (c->sdr_ctx, _ipmi_monitoring_sensor_readings_sdr_callback, &sdr_callback_arg) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_iterate: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } } else { unsigned int i; for (i = 0; i < record_ids_len; i++) { int shared_ret = 0; if (ipmi_sdr_cache_search_record_id (c->sdr_ctx, record_ids[i]) < 0) { if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_NOT_FOUND) { c->errnum = IPMI_MONITORING_ERR_SENSOR_NOT_FOUND; goto cleanup; } IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_search_record_id: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS) { if ((shared_ret = _ipmi_monitoring_get_sensor_reading_shared (c, sensor_reading_flags, NULL, 0)) < 0) goto cleanup; } if (!shared_ret) { if (ipmi_monitoring_get_sensor_reading (c, sensor_reading_flags, 0, NULL, 0) < 0) goto cleanup; } } } if ((rv = list_count (c->sensor_readings)) > 0) { if (!(c->sensor_readings_itr = list_iterator_create (c->sensor_readings))) { IPMI_MONITORING_DEBUG (("list_iterator_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } c->current_sensor_reading = list_next (c->sensor_readings_itr); } ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sensor_reading_cleanup (c); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (rv); cleanup: ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_sensor_iterator_destroy (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sensor_reading_cleanup (c); return (-1); } int ipmi_monitoring_sensor_readings_by_record_id (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *record_ids, unsigned int record_ids_len, Ipmi_Monitoring_Callback callback, void *callback_data) { int rv; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if ((sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK) || (record_ids && !record_ids_len)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (record_ids && record_ids_len) { unsigned int i; for (i = 0; i < record_ids_len; i++) { if (record_ids[i] > IPMI_SDR_RECORD_ID_LAST) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } } } c->callback = callback; c->callback_data = callback_data; c->callback_sensor_reading = NULL; rv = _ipmi_monitoring_sensor_readings_by_record_id (c, hostname, config, sensor_reading_flags, record_ids, record_ids_len); c->callback_sensor_reading = NULL; return (rv); } static int _ipmi_monitoring_sensor_readings_by_sensor_type (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *sensor_types, unsigned int sensor_types_len) { unsigned int sdr_create_flags = IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT; struct ipmi_monitoring_sdr_callback sdr_callback_arg; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (_ipmi_monitoring_initialized); assert (!(sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK)); assert (!(sensor_types && !sensor_types_len)); ipmi_monitoring_sensor_iterator_destroy (c); if (ipmi_monitoring_ipmi_communication_init (c, hostname, config) < 0) goto cleanup; if (ipmi_monitoring_sensor_reading_init (c) < 0) goto cleanup; if (_ipmi_monitoring_sensor_readings_flags_common (c, hostname, config, sensor_reading_flags) < 0) goto cleanup; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT) sdr_create_flags |= IPMI_SDR_CACHE_CREATE_FLAGS_ASSUME_MAX_SDR_RECORD_COUNT; if (ipmi_monitoring_sdr_cache_load (c, hostname, sdr_create_flags) < 0) goto cleanup; sdr_callback_arg.c = c; sdr_callback_arg.sensor_reading_flags = sensor_reading_flags; sdr_callback_arg.sensor_types = sensor_types; sdr_callback_arg.sensor_types_len = sensor_types_len; if (ipmi_sdr_cache_iterate (c->sdr_ctx, _ipmi_monitoring_sensor_readings_sdr_callback, &sdr_callback_arg) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_iterate: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if ((rv = list_count (c->sensor_readings)) > 0) { if (!(c->sensor_readings_itr = list_iterator_create (c->sensor_readings))) { IPMI_MONITORING_DEBUG (("list_iterator_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } c->current_sensor_reading = list_next (c->sensor_readings_itr); } ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sensor_reading_cleanup (c); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (rv); cleanup: ipmi_monitoring_sdr_cache_unload (c); ipmi_monitoring_sensor_iterator_destroy (c); ipmi_monitoring_ipmi_communication_cleanup (c); ipmi_monitoring_sensor_reading_cleanup (c); return (-1); } int ipmi_monitoring_sensor_readings_by_sensor_type (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config, unsigned int sensor_reading_flags, unsigned int *sensor_types, unsigned int sensor_types_len, Ipmi_Monitoring_Callback callback, void *callback_data) { int rv; if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!_ipmi_monitoring_initialized) { c->errnum = IPMI_MONITORING_ERR_LIBRARY_UNINITIALIZED; return (-1); } if ((sensor_reading_flags & ~IPMI_MONITORING_SENSOR_READING_FLAGS_MASK) || (sensor_types && !sensor_types_len)) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } c->callback = callback; c->callback_data = callback_data; c->callback_sensor_reading = NULL; rv = _ipmi_monitoring_sensor_readings_by_sensor_type (c, hostname, config, sensor_reading_flags, sensor_types, sensor_types_len); c->callback_sensor_reading = NULL; return (rv); } int ipmi_monitoring_sensor_iterator_first (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!c->sensor_readings_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SENSOR_READINGS; return (-1); } list_iterator_reset (c->sensor_readings_itr); c->current_sensor_reading = list_next (c->sensor_readings_itr); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (0); } int ipmi_monitoring_sensor_iterator_next (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (!c->sensor_readings_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SENSOR_READINGS; return (-1); } c->current_sensor_reading = list_next (c->sensor_readings_itr); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return ((c->current_sensor_reading) ? 1 : 0); } void ipmi_monitoring_sensor_iterator_destroy (ipmi_monitoring_ctx_t c) { if (!c || c->magic != IPMI_MONITORING_MAGIC) return; list_delete_all (c->sensor_readings, _list_delete_all, "dummyvalue"); if (c->sensor_readings_itr) { list_iterator_destroy (c->sensor_readings_itr); c->sensor_readings_itr = NULL; } c->current_sensor_reading = NULL; } static int _ipmi_monitoring_sensor_read_common (ipmi_monitoring_ctx_t c, struct ipmi_monitoring_sensor_reading **sensor_reading) { assert (sensor_reading); if (!c || c->magic != IPMI_MONITORING_MAGIC) return (-1); if (c->callback_sensor_reading) { (*sensor_reading) = c->callback_sensor_reading; return (0); } if (!c->sensor_readings_itr) { c->errnum = IPMI_MONITORING_ERR_NO_SENSOR_READINGS; return (-1); } if (!c->current_sensor_reading) { c->errnum = IPMI_MONITORING_ERR_SENSOR_READINGS_LIST_END; return (-1); } (*sensor_reading) = c->current_sensor_reading; return (0); } int ipmi_monitoring_sensor_read_record_id (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->record_id); } int ipmi_monitoring_sensor_read_sensor_number (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_number); } int ipmi_monitoring_sensor_read_sensor_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_type); } char * ipmi_monitoring_sensor_read_sensor_name (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (NULL); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_name); } int ipmi_monitoring_sensor_read_sensor_state (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_state); } int ipmi_monitoring_sensor_read_sensor_units (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_units); } int ipmi_monitoring_sensor_read_sensor_bitmask_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_bitmask_type); } int ipmi_monitoring_sensor_read_sensor_bitmask (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_bitmask); } char ** ipmi_monitoring_sensor_read_sensor_bitmask_strings (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (NULL); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_bitmask_strings); } int ipmi_monitoring_sensor_read_sensor_reading_type (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->sensor_reading_type); } void * ipmi_monitoring_sensor_read_sensor_reading (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; void *rv = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (NULL); if (sensor_reading->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER8_BOOL) rv = &(sensor_reading->sensor_reading.bool_val); else if (sensor_reading->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER32) rv = &(sensor_reading->sensor_reading.integer_val); else if (sensor_reading->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE) rv = &(sensor_reading->sensor_reading.double_val); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (rv); } int ipmi_monitoring_sensor_read_event_reading_type_code (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *sensor_reading = NULL; if (_ipmi_monitoring_sensor_read_common (c, &sensor_reading) < 0) return (-1); c->errnum = IPMI_MONITORING_ERR_SUCCESS; return (sensor_reading->event_reading_type_code); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_debug.c0000644002055400205540000000511213527331637023533 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_debug.c,v 1.19 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_debug.h" #include "freeipmi-portability.h" #include "fd.h" extern uint32_t _ipmi_monitoring_flags; static void _debug (const char *fmt, va_list ap) { char errbuf[IPMI_MONITORING_DEBUG_ERROR_BUFLEN]; assert (fmt); vsnprintf (errbuf, IPMI_MONITORING_DEBUG_ERROR_BUFLEN, fmt, ap); if (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG) fprintf (stderr, "%s\n", errbuf); } void ipmi_monitoring_debug (const char *fmt, ...) { va_list ap; assert (fmt); va_start (ap, fmt); _debug (fmt, ap); va_end (ap); } char * __debug_msg_create (const char *fmt, ...) { char *buffer; va_list ap; assert (fmt); if (!(buffer = malloc (IPMI_MONITORING_DEBUG_ERROR_BUFLEN))) return (NULL); va_start (ap, fmt); vsnprintf (buffer, IPMI_MONITORING_DEBUG_ERROR_BUFLEN, fmt, ap); va_end (ap); return (buffer); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_ipmi_communication.c0000644002055400205540000006504713527331637026345 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_ipmi_communication.c,v 1.39 2010-06-10 22:10:12 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_ipmi_communication.h" #include "freeipmi-portability.h" #include "fi_hostlist.h" #include "network.h" extern uint32_t _ipmi_monitoring_flags; static void _ipmi_communication_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); ipmi_ctx_close (c->ipmi_ctx); ipmi_ctx_destroy (c->ipmi_ctx); c->ipmi_ctx = NULL; } static int _inband_init (ipmi_monitoring_ctx_t c, struct ipmi_monitoring_ipmi_config *config) { unsigned int workaround_flags; unsigned int flags; unsigned int workaround_flags_mask = (IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS | IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_SPIN_POLL); assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); if (config && ((config->driver_type >= 0 && (config->driver_type != IPMI_MONITORING_DRIVER_TYPE_KCS && config->driver_type != IPMI_MONITORING_DRIVER_TYPE_SSIF && config->driver_type != IPMI_MONITORING_DRIVER_TYPE_OPENIPMI && config->driver_type != IPMI_MONITORING_DRIVER_TYPE_SUNBMC)) || (config->workaround_flags & ~workaround_flags_mask))) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } workaround_flags = 0; if (config && config->workaround_flags) { if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS) workaround_flags |= IPMI_WORKAROUND_FLAGS_INBAND_ASSUME_IO_BASE_ADDRESS; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_INBAND_SPIN_POLL) workaround_flags |= IPMI_WORKAROUND_FLAGS_INBAND_SPIN_POLL; } if ((_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG) && (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS)) flags = IPMI_FLAGS_DEBUG_DUMP; else flags = IPMI_FLAGS_DEFAULT; if (!config || config->driver_type < 0) { int ret; if ((ret = ipmi_ctx_find_inband (c->ipmi_ctx, NULL, (config) ? config->disable_auto_probe : 0, (config) ? config->driver_address : 0, (config) ? config->register_spacing : 0, (config) ? config->driver_device : NULL, workaround_flags, flags)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_ctx_find_inband: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BMC_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SYSTEM_ERROR || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_DEVICE_NOT_FOUND) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_DRIVER_PATH_REQUIRED) c->errnum = IPMI_MONITORING_ERR_PARAMETERS; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_DRIVER_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (!ret) { /* SYSTEM_ERROR? or INTERNAL_ERROR? Hmmmm */ IPMI_MONITORING_DEBUG (("ipmi_ctx_find_inband: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; return (-1); } } else { unsigned int driver_type; if (config->driver_type == IPMI_MONITORING_DRIVER_TYPE_KCS) driver_type = IPMI_DEVICE_KCS; else if (config->driver_type == IPMI_MONITORING_DRIVER_TYPE_SSIF) driver_type = IPMI_DEVICE_SSIF; else if (config->driver_type == IPMI_MONITORING_DRIVER_TYPE_OPENIPMI) driver_type = IPMI_DEVICE_OPENIPMI; else driver_type = IPMI_DEVICE_SUNBMC; if (ipmi_ctx_open_inband (c->ipmi_ctx, driver_type, config->disable_auto_probe, config->driver_address, config->register_spacing, config->driver_device, workaround_flags, flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_ctx_open_inband: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BMC_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SYSTEM_ERROR || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_DEVICE_NOT_FOUND) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_DRIVER_PATH_REQUIRED) c->errnum = IPMI_MONITORING_ERR_PARAMETERS; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } } return (0); } static int _ipmi_1_5_init (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config) { uint8_t privilege_level; uint8_t authentication_type; unsigned int session_timeout_len; unsigned int retransmission_timeout_len; unsigned int workaround_flags; unsigned int flags; unsigned int workaround_flags_mask = (IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_AUTHENTICATION_CAPABILITIES | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_ACCEPT_SESSION_ID_ZERO | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_FORCE_PERMSG_AUTHENTICATION | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_CHECK_UNEXPECTED_AUTHCODE | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_BIG_ENDIAN_SEQUENCE_NUMBER | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_AUTH_CODE_CHECK | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_CHECKSUM_CHECK); assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (hostname); /* hostname, username, password length/input check handled via lib calls */ if (config && ((config->privilege_level >= 0 && (config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_USER && config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR && config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_ADMIN)) || (config->authentication_type >= 0 && (config->authentication_type != IPMI_MONITORING_AUTHENTICATION_TYPE_NONE && config->authentication_type != IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY && config->authentication_type != IPMI_MONITORING_AUTHENTICATION_TYPE_MD2 && config->authentication_type != IPMI_MONITORING_AUTHENTICATION_TYPE_MD5)) || (config->workaround_flags & ~workaround_flags_mask))) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (config && config->privilege_level >= 0) { if (config->privilege_level == IPMI_MONITORING_PRIVILEGE_LEVEL_USER) privilege_level = IPMI_PRIVILEGE_LEVEL_USER; else if (config->privilege_level == IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR) privilege_level = IPMI_PRIVILEGE_LEVEL_OPERATOR; else privilege_level = IPMI_PRIVILEGE_LEVEL_ADMIN; } else privilege_level = IPMI_MONITORING_PRIVILEGE_LEVEL_DEFAULT; if (config && config->authentication_type >= 0) { if (config->authentication_type == IPMI_MONITORING_AUTHENTICATION_TYPE_NONE) authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; else if (config->authentication_type == IPMI_MONITORING_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) authentication_type = IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY; else if (config->authentication_type == IPMI_MONITORING_AUTHENTICATION_TYPE_MD2) authentication_type = IPMI_AUTHENTICATION_TYPE_MD2; else authentication_type = IPMI_AUTHENTICATION_TYPE_MD5; } else authentication_type = IPMI_MONITORING_AUTHENTICATION_TYPE_DEFAULT; if (config && config->session_timeout_len > 0) session_timeout_len = config->session_timeout_len; else session_timeout_len = IPMI_MONITORING_SESSION_TIMEOUT_LENGTH_DEFAULT; if (config && config->retransmission_timeout_len > 0) retransmission_timeout_len = config->retransmission_timeout_len; else retransmission_timeout_len = IPMI_MONITORING_RETRANSMISSION_TIMEOUT_LENGTH_DEFAULT; if (retransmission_timeout_len > session_timeout_len) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } workaround_flags = 0; if (config && config->workaround_flags) { if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_AUTHENTICATION_CAPABILITIES) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_ACCEPT_SESSION_ID_ZERO) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_FORCE_PERMSG_AUTHENTICATION) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_CHECK_UNEXPECTED_AUTHCODE) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_BIG_ENDIAN_SEQUENCE_NUMBER) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_AUTH_CODE_CHECK) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_1_5_NO_CHECKSUM_CHECK) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK; } if ((_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG) && (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS)) flags = IPMI_FLAGS_DEBUG_DUMP; else flags = IPMI_FLAGS_DEFAULT; if (ipmi_ctx_open_outofband (c->ipmi_ctx, hostname, (config) ? config->username : NULL, (config) ? config->password : NULL, authentication_type, privilege_level, session_timeout_len, retransmission_timeout_len, workaround_flags, flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_ctx_open_outofband: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_USERNAME_INVALID) c->errnum = IPMI_MONITORING_ERR_USERNAME_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID) c->errnum = IPMI_MONITORING_ERR_PASSWORD_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT) c->errnum = IPMI_MONITORING_ERR_PRIVILEGE_LEVEL_INSUFFICIENT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED) c->errnum = IPMI_MONITORING_ERR_PRIVILEGEL_LEVEL_CANNOT_BE_OBTAINED; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE) c->errnum = IPMI_MONITORING_ERR_AUTHENTICATION_TYPE_UNAVAILABLE; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_PASSWORD_VERIFICATION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_CONNECTION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SESSION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_SESSION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BMC_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID) c->errnum = IPMI_MONITORING_ERR_HOSTNAME_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PARAMETERS) c->errnum = IPMI_MONITORING_ERR_PARAMETERS; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } return (0); } static int _ipmi_2_0_init (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config) { uint8_t privilege_level; uint8_t cipher_suite_id; unsigned int session_timeout_len; unsigned int retransmission_timeout_len; unsigned int workaround_flags; unsigned int flags; unsigned workaround_flags_mask = (IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_AUTHENTICATION_CAPABILITIES | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_INTEL_2_0_SESSION | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUPERMICRO_2_0_SESSION | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUN_2_0_SESSION | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_OPEN_SESSION_PRIVILEGE | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE | IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NO_CHECKSUM_CHECK); assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (hostname); /* hostname, username, password, k_g length/input check handled via lib calls */ if (config && ((config->privilege_level >= 0 && (config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_USER && config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR && config->privilege_level != IPMI_MONITORING_PRIVILEGE_LEVEL_ADMIN)) || (config->cipher_suite_id >= 0 && !IPMI_CIPHER_SUITE_ID_SUPPORTED (config->cipher_suite_id)) || (config->workaround_flags & ~workaround_flags_mask))) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (config && config->privilege_level >= 0) { if (config->privilege_level == IPMI_MONITORING_PRIVILEGE_LEVEL_USER) privilege_level = IPMI_PRIVILEGE_LEVEL_USER; else if (config->privilege_level == IPMI_MONITORING_PRIVILEGE_LEVEL_OPERATOR) privilege_level = IPMI_PRIVILEGE_LEVEL_OPERATOR; else privilege_level = IPMI_PRIVILEGE_LEVEL_ADMIN; } else privilege_level = IPMI_MONITORING_PRIVILEGE_LEVEL_DEFAULT; if (config && config->cipher_suite_id > 0) cipher_suite_id = config->cipher_suite_id; else cipher_suite_id = 3; if (config && config->session_timeout_len > 0) session_timeout_len = config->session_timeout_len; else session_timeout_len = IPMI_MONITORING_SESSION_TIMEOUT_LENGTH_DEFAULT; if (config && config->retransmission_timeout_len > 0) retransmission_timeout_len = config->retransmission_timeout_len; else retransmission_timeout_len = IPMI_MONITORING_RETRANSMISSION_TIMEOUT_LENGTH_DEFAULT; if (retransmission_timeout_len > session_timeout_len) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } workaround_flags = 0; if (config && config->workaround_flags) { if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_AUTHENTICATION_CAPABILITIES) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_INTEL_2_0_SESSION) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUPERMICRO_2_0_SESSION) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_SUN_2_0_SESSION) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_OPEN_SESSION_PRIVILEGE) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE; if (config->workaround_flags & IPMI_MONITORING_WORKAROUND_FLAGS_PROTOCOL_VERSION_2_0_NO_CHECKSUM_CHECK) workaround_flags |= IPMI_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK; } if ((_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG) && (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS)) flags = IPMI_FLAGS_DEBUG_DUMP; else flags = IPMI_FLAGS_DEFAULT; if (ipmi_ctx_open_outofband_2_0 (c->ipmi_ctx, hostname, (config) ? config->username : NULL, (config) ? config->password : NULL, (config) ? config->k_g : NULL, (config && config->k_g) ? config->k_g_len : 0, privilege_level, cipher_suite_id, session_timeout_len, retransmission_timeout_len, workaround_flags, flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_ctx_open_outofband_2_0: %s", ipmi_ctx_errormsg (c->ipmi_ctx))); if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_USERNAME_INVALID) c->errnum = IPMI_MONITORING_ERR_USERNAME_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID) c->errnum = IPMI_MONITORING_ERR_PASSWORD_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT) c->errnum = IPMI_MONITORING_ERR_PRIVILEGE_LEVEL_INSUFFICIENT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED) c->errnum = IPMI_MONITORING_ERR_PRIVILEGEL_LEVEL_CANNOT_BE_OBTAINED; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_K_G_INVALID) c->errnum = IPMI_MONITORING_ERR_K_G_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE) c->errnum = IPMI_MONITORING_ERR_CIPHER_SUITE_ID_UNAVAILABLE; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_PASSWORD_VERIFICATION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_2_0_UNAVAILABLE) c->errnum = IPMI_MONITORING_ERR_IPMI_2_0_UNAVAILABLE; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_CONNECTION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SESSION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_SESSION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BMC_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID) c->errnum = IPMI_MONITORING_ERR_HOSTNAME_INVALID; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PARAMETERS) c->errnum = IPMI_MONITORING_ERR_PARAMETERS; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } return (0); } static int _outofband_init (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (hostname); /* hostname length/input check in later functions */ if (config && ((config->protocol_version >= 0 && (config->protocol_version != IPMI_MONITORING_PROTOCOL_VERSION_1_5 && config->protocol_version != IPMI_MONITORING_PROTOCOL_VERSION_2_0)))) { c->errnum = IPMI_MONITORING_ERR_PARAMETERS; return (-1); } if (!config || config->protocol_version < 0 || config->protocol_version == IPMI_MONITORING_PROTOCOL_VERSION_1_5) { if (_ipmi_1_5_init (c, hostname, config) < 0) return (-1); } else { if (_ipmi_2_0_init (c, hostname, config) < 0) return (-1); } return (0); } int ipmi_monitoring_ipmi_communication_init (ipmi_monitoring_ctx_t c, const char *hostname, struct ipmi_monitoring_ipmi_config *config) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (!c->ipmi_ctx); if (!(c->ipmi_ctx = ipmi_ctx_create ())) { IPMI_MONITORING_DEBUG (("ipmi_ctx_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } if (!hostname || host_is_localhost (hostname)) { if (_inband_init (c, config) < 0) goto cleanup; } else { if (_outofband_init (c, hostname, config) < 0) goto cleanup; } return (0); cleanup: _ipmi_communication_cleanup (c); return (-1); } void ipmi_monitoring_ipmi_ctx_error_convert (ipmi_monitoring_ctx_t c) { if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_CONNECTION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SESSION_TIMEOUT) c->errnum = IPMI_MONITORING_ERR_SESSION_TIMEOUT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE || ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_BMC_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT) c->errnum = IPMI_MONITORING_ERR_PRIVILEGE_LEVEL_INSUFFICIENT; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (ipmi_ctx_errnum (c->ipmi_ctx) == IPMI_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; } int ipmi_monitoring_ipmi_communication_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); _ipmi_communication_cleanup (c); return (0); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_parse_common.c0000644002055400205540000001456013527331637025136 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_parse_common.c,v 1.1 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_defs.h" #include "freeipmi-portability.h" int ipmi_monitoring_get_sensor_type (ipmi_monitoring_ctx_t c, uint8_t sensor_type) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); switch (sensor_type) { case IPMI_SENSOR_TYPE_RESERVED: return (IPMI_MONITORING_SENSOR_TYPE_RESERVED); case IPMI_SENSOR_TYPE_TEMPERATURE: return (IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE); case IPMI_SENSOR_TYPE_VOLTAGE: return (IPMI_MONITORING_SENSOR_TYPE_VOLTAGE); case IPMI_SENSOR_TYPE_CURRENT: return (IPMI_MONITORING_SENSOR_TYPE_CURRENT); case IPMI_SENSOR_TYPE_FAN: return (IPMI_MONITORING_SENSOR_TYPE_FAN); case IPMI_SENSOR_TYPE_PHYSICAL_SECURITY: return (IPMI_MONITORING_SENSOR_TYPE_PHYSICAL_SECURITY); case IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return (IPMI_MONITORING_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT); case IPMI_SENSOR_TYPE_PROCESSOR: return (IPMI_MONITORING_SENSOR_TYPE_PROCESSOR); case IPMI_SENSOR_TYPE_POWER_SUPPLY: return (IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY); case IPMI_SENSOR_TYPE_POWER_UNIT: return (IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT); case IPMI_SENSOR_TYPE_COOLING_DEVICE: return (IPMI_MONITORING_SENSOR_TYPE_COOLING_DEVICE); case IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR: return (IPMI_MONITORING_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR); case IPMI_SENSOR_TYPE_MEMORY: return (IPMI_MONITORING_SENSOR_TYPE_MEMORY); case IPMI_SENSOR_TYPE_DRIVE_SLOT: return (IPMI_MONITORING_SENSOR_TYPE_DRIVE_SLOT); case IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE: return (IPMI_MONITORING_SENSOR_TYPE_POST_MEMORY_RESIZE); case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return (IPMI_MONITORING_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (IPMI_MONITORING_SENSOR_TYPE_EVENT_LOGGING_DISABLED); case IPMI_SENSOR_TYPE_WATCHDOG1: return (IPMI_MONITORING_SENSOR_TYPE_WATCHDOG1); case IPMI_SENSOR_TYPE_SYSTEM_EVENT: return (IPMI_MONITORING_SENSOR_TYPE_SYSTEM_EVENT); case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT: return (IPMI_MONITORING_SENSOR_TYPE_CRITICAL_INTERRUPT); case IPMI_SENSOR_TYPE_BUTTON_SWITCH: return (IPMI_MONITORING_SENSOR_TYPE_BUTTON_SWITCH); case IPMI_SENSOR_TYPE_MODULE_BOARD: return (IPMI_MONITORING_SENSOR_TYPE_MODULE_BOARD); case IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR: return (IPMI_MONITORING_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR); case IPMI_SENSOR_TYPE_ADD_IN_CARD: return (IPMI_MONITORING_SENSOR_TYPE_ADD_IN_CARD); case IPMI_SENSOR_TYPE_CHASSIS: return (IPMI_MONITORING_SENSOR_TYPE_CHASSIS); case IPMI_SENSOR_TYPE_CHIP_SET: return (IPMI_MONITORING_SENSOR_TYPE_CHIP_SET); case IPMI_SENSOR_TYPE_OTHER_FRU: return (IPMI_MONITORING_SENSOR_TYPE_OTHER_FRU); case IPMI_SENSOR_TYPE_CABLE_INTERCONNECT: return (IPMI_MONITORING_SENSOR_TYPE_CABLE_INTERCONNECT); case IPMI_SENSOR_TYPE_TERMINATOR: return (IPMI_MONITORING_SENSOR_TYPE_TERMINATOR); case IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return (IPMI_MONITORING_SENSOR_TYPE_SYSTEM_BOOT_INITIATED); case IPMI_SENSOR_TYPE_BOOT_ERROR: return (IPMI_MONITORING_SENSOR_TYPE_BOOT_ERROR); case IPMI_SENSOR_TYPE_OS_BOOT: return (IPMI_MONITORING_SENSOR_TYPE_OS_BOOT); case IPMI_SENSOR_TYPE_OS_CRITICAL_STOP: return (IPMI_MONITORING_SENSOR_TYPE_OS_CRITICAL_STOP); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (IPMI_MONITORING_SENSOR_TYPE_SLOT_CONNECTOR); case IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return (IPMI_MONITORING_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE); case IPMI_SENSOR_TYPE_WATCHDOG2: return (IPMI_MONITORING_SENSOR_TYPE_WATCHDOG2); case IPMI_SENSOR_TYPE_PLATFORM_ALERT: return (IPMI_MONITORING_SENSOR_TYPE_PLATFORM_ALERT); case IPMI_SENSOR_TYPE_ENTITY_PRESENCE: return (IPMI_MONITORING_SENSOR_TYPE_ENTITY_PRESENCE); case IPMI_SENSOR_TYPE_MONITOR_ASIC_IC: return (IPMI_MONITORING_SENSOR_TYPE_MONITOR_ASIC_IC); case IPMI_SENSOR_TYPE_LAN: return (IPMI_MONITORING_SENSOR_TYPE_LAN); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (IPMI_MONITORING_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH); case IPMI_SENSOR_TYPE_BATTERY: return (IPMI_MONITORING_SENSOR_TYPE_BATTERY); case IPMI_SENSOR_TYPE_SESSION_AUDIT: return (IPMI_MONITORING_SENSOR_TYPE_SESSION_AUDIT); case IPMI_SENSOR_TYPE_VERSION_CHANGE: return (IPMI_MONITORING_SENSOR_TYPE_VERSION_CHANGE); case IPMI_SENSOR_TYPE_FRU_STATE: return (IPMI_MONITORING_SENSOR_TYPE_FRU_STATE); } return (sensor_type); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sdr_cache.c0000644002055400205540000003041313527331637024362 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sdr_cache.c,v 1.28 2010-03-19 22:07:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_ipmi_communication.h" #include "ipmi_monitoring_sdr_cache.h" #include "freeipmi-portability.h" #define IPMI_MONITORING_SDR_CACHE_DIRECTORY IPMI_MONITORING_SDR_CACHE_DIR #define IPMI_MONITORING_SDR_CACHE_FILENAME "ipmimonitoringsdrcache" #define IPMI_MONITORING_SDR_CACHE_INBAND "localhost" extern uint32_t _ipmi_monitoring_flags; static int _ipmi_monitoring_sdr_ctx_init (ipmi_monitoring_ctx_t c, const char *hostname) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); if (!(c->sdr_ctx = ipmi_sdr_ctx_create ())) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_create: %s", strerror (errno))); if (errno == EPERM || errno == EACCES) c->errnum = IPMI_MONITORING_ERR_PERMISSION; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (_ipmi_monitoring_flags & IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS) { /* Don't error out, if this fails we can still continue */ if (ipmi_sdr_ctx_set_flags (c->sdr_ctx, IPMI_SDR_FLAGS_DEBUG_DUMP) < 0) IPMI_MONITORING_DEBUG (("ipmi_sdr_ctx_set_flags: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); if (hostname) { if (ipmi_sdr_ctx_set_debug_prefix (c->sdr_ctx, hostname) < 0) IPMI_MONITORING_DEBUG (("ipmi_sdr_ctx_set_debug_prefix: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); } } return (0); } static int _ipmi_monitoring_sdr_cache_filename (ipmi_monitoring_ctx_t c, const char *hostname, char *buf, unsigned int buflen) { char sdr_cache_filename[MAXPATHLEN+1]; char *dir; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (buf); assert (buflen); if (c->sdr_cache_directory_set) dir = c->sdr_cache_directory; else dir = IPMI_MONITORING_SDR_CACHE_DIRECTORY; if (!hostname) hostname = IPMI_MONITORING_SDR_CACHE_INBAND; memset (sdr_cache_filename, '\0', MAXPATHLEN+1); if (c->sdr_cache_filename_format_set) { int index = 0; int percent = 0; char *str; str = c->sdr_cache_filename_format; while (str && *str && index < MAXPATHLEN) { if (percent) { percent = 0; if (*str == '%') { sdr_cache_filename[index] = *str; index++; } else if (*str == 'L') { char local_hostname[MAXHOSTNAMELEN+1]; char *ptr; memset (local_hostname, '\0', MAXHOSTNAMELEN+1); if (gethostname (local_hostname, MAXHOSTNAMELEN) < 0) { IPMI_MONITORING_DEBUG (("gethostname: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; return (-1); } /* shorten hostname if necessary */ if ((ptr = strchr (local_hostname, '.'))) *ptr = '\0'; if ((index + strlen (local_hostname)) >= MAXPATHLEN) { IPMI_MONITORING_DEBUG (("_ipmi_monitoring_sdr_cache_filename: overflow")); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } strcat (&sdr_cache_filename[index], local_hostname); index += strlen (local_hostname); } else if (*str == 'H') { if ((index + strlen (hostname)) >= MAXPATHLEN) { IPMI_MONITORING_DEBUG (("_ipmi_monitoring_sdr_cache_filename: overflow")); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } strcat (&sdr_cache_filename[index], hostname); index += strlen (hostname); } else { sdr_cache_filename[index] = '%'; index++; sdr_cache_filename[index] = *str; index++; } } else if (*str == '%') percent = 1; else { sdr_cache_filename[index] = *str; index++; } str++; } } else snprintf (sdr_cache_filename, MAXPATHLEN, "%s.%s", IPMI_MONITORING_SDR_CACHE_FILENAME, hostname); snprintf (buf, buflen - 1, "%s/%s", dir, sdr_cache_filename); return (0); } static int _ipmi_monitoring_sdr_cache_retrieve (ipmi_monitoring_ctx_t c, const char *hostname, char *filename, unsigned int sdr_create_flags) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sdr_ctx); assert (c->ipmi_ctx); assert (filename && strlen (filename)); if (ipmi_sdr_cache_create (c->sdr_ctx, c->ipmi_ctx, filename, sdr_create_flags, NULL, NULL) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_create: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_FILESYSTEM) c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_FILESYSTEM; else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_PERMISSION) c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_PERMISSION; else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_IPMI_ERROR) ipmi_monitoring_ipmi_ctx_error_convert (c); else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } return (0); } static int _ipmi_monitoring_sdr_cache_delete (ipmi_monitoring_ctx_t c, const char *hostname, char *filename) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sdr_ctx); if (ipmi_sdr_cache_delete (c->sdr_ctx, filename) < 0) { if (ipmi_sdr_ctx_errnum (c->sdr_ctx) != IPMI_SDR_ERR_FILENAME_INVALID) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_delete: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_PERMISSION) c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_PERMISSION; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } } return (0); } int ipmi_monitoring_sdr_cache_load (ipmi_monitoring_ctx_t c, const char *hostname, unsigned int sdr_create_flags) { char filename[MAXPATHLEN+1]; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); memset (filename, '\0', MAXPATHLEN + 1); if (_ipmi_monitoring_sdr_cache_filename (c, hostname, filename, MAXPATHLEN + 1) < 0) goto cleanup; if (_ipmi_monitoring_sdr_ctx_init (c, hostname) < 0) goto cleanup; if (ipmi_sdr_cache_open (c->sdr_ctx, c->ipmi_ctx, filename) < 0) { if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) { if (_ipmi_monitoring_sdr_cache_retrieve (c, hostname, filename, sdr_create_flags) < 0) goto cleanup; } else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_CACHE_INVALID || ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_CACHE_OUT_OF_DATE) { if (_ipmi_monitoring_sdr_cache_delete (c, hostname, filename) < 0) goto cleanup; if (_ipmi_monitoring_sdr_cache_retrieve (c, hostname, filename, sdr_create_flags) < 0) goto cleanup; } else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_FILESYSTEM) { c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_FILESYSTEM; goto cleanup; } else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_PERMISSION) { c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_PERMISSION; goto cleanup; } else { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_open: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } /* 2nd try after the sdr was retrieved*/ if (ipmi_sdr_cache_open (c->sdr_ctx, c->ipmi_ctx, filename) < 0) { if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_FILESYSTEM) { c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_FILESYSTEM; goto cleanup; } else if (ipmi_sdr_ctx_errnum (c->sdr_ctx) == IPMI_SDR_ERR_PERMISSION) { c->errnum = IPMI_MONITORING_ERR_SDR_CACHE_PERMISSION; goto cleanup; } else { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_open: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } } } return (0); cleanup: if (strlen (filename)) ipmi_sdr_cache_delete (c->sdr_ctx, filename); ipmi_sdr_ctx_destroy (c->sdr_ctx); c->sdr_ctx = NULL; return (-1); } int ipmi_monitoring_sdr_cache_unload (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); ipmi_sdr_cache_close (c->sdr_ctx); ipmi_sdr_ctx_destroy (c->sdr_ctx); c->sdr_ctx = NULL; return (0); } int ipmi_monitoring_sdr_cache_flush (ipmi_monitoring_ctx_t c, const char *hostname) { char filename[MAXPATHLEN+1]; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); memset (filename, '\0', MAXPATHLEN + 1); if (_ipmi_monitoring_sdr_cache_filename (c, hostname, filename, MAXPATHLEN + 1) < 0) goto cleanup; if (_ipmi_monitoring_sdr_ctx_init (c, hostname) < 0) goto cleanup; if (_ipmi_monitoring_sdr_cache_delete (c, hostname, filename) < 0) goto cleanup; return (0); cleanup: ipmi_sdr_ctx_destroy (c->sdr_ctx); c->sdr_ctx = NULL; return (-1); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sel.c0000644002055400205540000010612513527331637023236 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sel.c,v 1.2 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_offsets.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_ipmi_communication.h" #include "ipmi_monitoring_parse_common.h" #include "ipmi_monitoring_sensor_reading.h" #include "freeipmi-portability.h" #define IPMI_MONITORING_SEL_EVENT_OFFSET_STRING_MAX 1024 struct sel_parse_data { ipmi_monitoring_ctx_t c; unsigned int sel_flags; unsigned int *sensor_types; unsigned int sensor_types_len; unsigned int date_begin; unsigned int date_end; }; static void _sel_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); ipmi_sel_ctx_destroy (c->sel_parse_ctx); c->sel_parse_ctx = NULL; } int ipmi_monitoring_sel_init (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (c->sdr_ctx); assert (!c->sel_parse_ctx); if (!(c->sel_parse_ctx = ipmi_sel_ctx_create (c->ipmi_ctx, c->sdr_ctx))) { IPMI_MONITORING_DEBUG (("ipmi_sel_ctx_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } return (0); cleanup: _sel_cleanup (c); return (-1); } int ipmi_monitoring_sel_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); _sel_cleanup (c); return (0); } static int _get_event_offset_type (ipmi_monitoring_ctx_t c, uint8_t event_type_code, uint8_t sdr_sensor_type) { int event_offset_type; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sel_records); if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_THRESHOLD) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_THRESHOLD; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_STATE; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_STATE; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PREDICTIVE_FAILURE; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_LIMIT; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PERFORMANCE; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_SEVERITY; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_DEVICE_PRESENT; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_DEVICE_ENABLED; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_TRANSITION_AVAILABILITY; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_REDUNDANCY; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_ACPI_POWER_STATE; else if (event_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC) { if (sdr_sensor_type == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PHYSICAL_SECURITY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PROCESSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_POWER_SUPPLY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_POWER_UNIT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_COOLING_DEVICE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_COOLING_DEVICE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OTHER_UNITS_BASED_SENSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MEMORY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_MEMORY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_DRIVE_SLOT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_POST_MEMORY_RESIZE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_FIRMWARE_PROGRESS; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_EVENT_LOGGING_DISABLED; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_WATCHDOG1) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_WATCHDOG1; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_EVENT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_CRITICAL_INTERRUPT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_BUTTON_SWITCH; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_MODULE_BOARD; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_MICROCONTROLLER_COPROCESSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_ADD_IN_CARD) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_ADD_IN_CARD; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CHASSIS) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_CHASSIS; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CHIP_SET) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_CHIP_SET; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OTHER_FRU) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OTHER_FRU; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_CABLE_INTERCONNECT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_TERMINATOR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_TERMINATOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_BOOT_INITIATED; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_BOOT_ERROR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OS_BOOT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OS_BOOT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OS_CRITICAL_STOP; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SLOT_CONNECTOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SYSTEM_ACPI_POWER_STATE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_WATCHDOG2; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PLATFORM_ALERT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_PLATFORM_ALERT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_ENTITY_PRESENCE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MONITOR_ASIC_IC) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_MONITOR_ASIC_IC; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_LAN) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_LAN; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BATTERY) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_BATTERY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SESSION_AUDIT) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_SESSION_AUDIT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_VERSION_CHANGE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_FRU_STATE) event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_FRU_STATE; /* To avoid gcc warnings, subtract -1 in comparison */ else if (sdr_sensor_type >= IPMI_SENSOR_TYPE_OEM_MIN && (sdr_sensor_type - 1) <= (IPMI_SENSOR_TYPE_OEM_MAX - 1)) { IPMI_MONITORING_DEBUG (("sensor_type '0x%X' event offset is OEM", sdr_sensor_type)); event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OEM; } else { IPMI_MONITORING_DEBUG (("sensor_type '0x%X' event offset not supported", sdr_sensor_type)); event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_UNKNOWN; } } else if (event_type_code >= IPMI_EVENT_READING_TYPE_CODE_OEM_MIN && event_type_code <= IPMI_EVENT_READING_TYPE_CODE_OEM_MAX) { IPMI_MONITORING_DEBUG (("event_type_code '0x%X' event offset is OEM", event_type_code)); event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_OEM; } else { IPMI_MONITORING_DEBUG (("event_type_code '0x%X' event offset not supported", event_type_code)); event_offset_type = IPMI_MONITORING_EVENT_OFFSET_TYPE_UNKNOWN; } return (event_offset_type); } static void _sel_parse_ctx_error_convert (ipmi_monitoring_ctx_t c) { int errnum; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (c->sel_parse_ctx); errnum = ipmi_sel_ctx_errnum (c->sel_parse_ctx); /* if callback error - assume we set as needed */ if (errnum != IPMI_SEL_ERR_CALLBACK_ERROR) { if (errnum == IPMI_SEL_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (errnum == IPMI_SEL_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (errnum == IPMI_SEL_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; } } static int _ipmi_monitoring_sel_parse_system_event_record (ipmi_monitoring_ctx_t c, struct ipmi_monitoring_sel_record *s, unsigned int sel_flags) { uint32_t timestamp; uint8_t sel_sensor_type; uint8_t sensor_number; uint8_t event_direction; uint8_t event_offset; uint8_t event_type_code; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; char event_offset_string[IPMI_MONITORING_SEL_EVENT_OFFSET_STRING_MAX + 1]; int sensor_type; unsigned int sel_string_flags; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (s); if (ipmi_sel_parse_read_timestamp (c->sel_parse_ctx, NULL, 0, ×tamp) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_timestamp: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->timestamp = timestamp; if (ipmi_sel_parse_read_sensor_type (c->sel_parse_ctx, NULL, 0, &sel_sensor_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_sensor_type: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } if ((sensor_type = ipmi_monitoring_get_sensor_type (c, sel_sensor_type)) < 0) return (-1); s->sensor_type = sensor_type; if (ipmi_sel_parse_read_sensor_number (c->sel_parse_ctx, NULL, 0, &sensor_number) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_sensor_number: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->sensor_number = sensor_number; if (ipmi_sel_parse_read_event_direction (c->sel_parse_ctx, NULL, 0, &event_direction) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_direction: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } if (event_direction == IPMI_SEL_RECORD_ASSERTION_EVENT) s->event_direction = IPMI_MONITORING_SEL_EVENT_DIRECTION_ASSERTION; else s->event_direction = IPMI_MONITORING_SEL_EVENT_DIRECTION_DEASSERTION; if (ipmi_sel_parse_read_event_data1_offset_from_event_reading_type_code (c->sel_parse_ctx, NULL, 0, &event_offset) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_data1_offset_from_event_reading_type_code: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->event_offset = event_offset; if (ipmi_sel_parse_read_event_type_code (c->sel_parse_ctx, NULL, 0, &event_type_code) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_type_code: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->event_type_code = event_type_code; if ((s->event_offset_type = _get_event_offset_type (c, event_type_code, sel_sensor_type)) < 0) return (-1); if (ipmi_sel_parse_read_event_data1 (c->sel_parse_ctx, NULL, 0, &event_data1) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_data1: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->event_data1 = event_data1; if (ipmi_sel_parse_read_event_data2 (c->sel_parse_ctx, NULL, 0, &event_data2) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_data2: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->event_data2 = event_data2; if (ipmi_sel_parse_read_event_data3 (c->sel_parse_ctx, NULL, 0, &event_data3) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_event_data3: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->event_data3 = event_data3; sel_string_flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD | IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; if (sel_flags & IPMI_MONITORING_SEL_FLAGS_ENTITY_SENSOR_NAMES) sel_string_flags |= IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES; if (ipmi_sel_parse_read_record_string (c->sel_parse_ctx, "%s", NULL, 0, s->sensor_name, IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH, sel_string_flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_string: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } memset (event_offset_string, '\0', IPMI_MONITORING_SEL_EVENT_OFFSET_STRING_MAX + 1); sel_string_flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD | IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; if ((ret = ipmi_sel_parse_read_record_string (c->sel_parse_ctx, "%e", NULL, 0, event_offset_string, IPMI_MONITORING_SEL_EVENT_OFFSET_STRING_MAX, sel_string_flags)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_string: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } if (ret) { if (!(s->event_offset_string = strdup (event_offset_string))) { IPMI_MONITORING_DEBUG (("strdup: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; return (-1); } } else { /* return empty string */ if (!(s->event_offset_string = strdup (""))) { IPMI_MONITORING_DEBUG (("strdup: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; return (-1); } } return (0); } static int _ipmi_monitoring_sel_parse_timestamped_oem_record (ipmi_monitoring_ctx_t c, struct ipmi_monitoring_sel_record *s) { uint32_t timestamp; uint32_t manufacturer_id; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (s); if (ipmi_sel_parse_read_timestamp (c->sel_parse_ctx, NULL, 0, ×tamp) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_timestamp: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->timestamp = timestamp; if (ipmi_sel_parse_read_manufacturer_id (c->sel_parse_ctx, NULL, 0, &manufacturer_id) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_manufacturer_id: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->manufacturer_id = manufacturer_id; if ((ret = ipmi_sel_parse_read_oem (c->sel_parse_ctx, NULL, 0, s->oem_data, IPMI_MONITORING_OEM_DATA_MAX)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_oem: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->oem_data_len = ret; return (0); } static int _ipmi_monitoring_sel_parse_non_timestamped_oem_record (ipmi_monitoring_ctx_t c, struct ipmi_monitoring_sel_record *s) { int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (s); if ((ret = ipmi_sel_parse_read_oem (c->sel_parse_ctx, NULL, 0, s->oem_data, IPMI_MONITORING_OEM_DATA_MAX)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_oem: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); return (-1); } s->oem_data_len = ret; return (0); } static int _store_sel_record (ipmi_monitoring_ctx_t c, unsigned int sel_flags) { struct ipmi_monitoring_sel_record *s = NULL; uint8_t sel_record[IPMI_SEL_RECORD_MAX_RECORD_LENGTH]; int sel_record_len; uint16_t record_id; uint8_t record_type; int record_type_class; unsigned int sel_state; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sel_records); if (!(s = (struct ipmi_monitoring_sel_record *)malloc (sizeof (struct ipmi_monitoring_sel_record)))) { IPMI_MONITORING_DEBUG (("malloc: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } memset (s, '\0', sizeof (struct ipmi_monitoring_sel_record)); if ((sel_record_len = ipmi_sel_parse_read_record (c->sel_parse_ctx, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } if (ipmi_sel_parse_read_record_id (c->sel_parse_ctx, NULL, 0, &record_id) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } if (ipmi_sel_parse_read_record_type (c->sel_parse_ctx, NULL, 0, &record_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errnum (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } /* IPMI Workaround * * HP DL 380 G5 * * Motherboard is reporting SEL Records of record type 0x00, which * is not a valid record type. */ if (sel_flags & IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD && !IPMI_SEL_RECORD_TYPE_VALID (record_type)) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; s->record_id = record_id; s->record_type = record_type; if (ipmi_interpret_sel (c->interpret_ctx, sel_record, sel_record_len, &sel_state) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_sel: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if (sel_state == IPMI_INTERPRET_STATE_NOMINAL) s->sel_state = IPMI_MONITORING_STATE_NOMINAL; else if (sel_state == IPMI_INTERPRET_STATE_WARNING) s->sel_state = IPMI_MONITORING_STATE_WARNING; else if (sel_state == IPMI_INTERPRET_STATE_CRITICAL) s->sel_state = IPMI_MONITORING_STATE_CRITICAL; else if (sel_state == IPMI_INTERPRET_STATE_UNKNOWN) s->sel_state = IPMI_MONITORING_STATE_UNKNOWN; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { s->record_type_class = IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD; if (_ipmi_monitoring_sel_parse_system_event_record (c, s, sel_flags) < 0) goto cleanup; } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { s->record_type_class = IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD; if (_ipmi_monitoring_sel_parse_timestamped_oem_record (c, s) < 0) goto cleanup; } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { s->record_type_class = IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD; if (_ipmi_monitoring_sel_parse_non_timestamped_oem_record (c, s) < 0) goto cleanup; } else s->record_type_class = IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_UNKNOWN; /* achu: should come before list_append to avoid having a freed entry on the list */ if (c->callback) { c->callback_sel_record = s; if ((*c->callback)(c, c->callback_data) < 0) { IPMI_MONITORING_DEBUG (("callback error")); c->errnum = IPMI_MONITORING_ERR_CALLBACK_ERROR; goto cleanup; } } if (!list_append (c->sel_records, s)) { IPMI_MONITORING_DEBUG (("list_append: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } return (0); cleanup: if (s) { free (s->event_offset_string); free (s); } return (-1); } static int _ipmi_monitoring_sel_parse_record_id (ipmi_sel_ctx_t ctx, void *callback_data) { struct sel_parse_data *spd; assert (ctx); assert (callback_data); spd = (struct sel_parse_data *)callback_data; /* all SEL records get stored */ if (_store_sel_record (spd->c, spd->sel_flags) < 0) return (-1); return (0); } static int _ipmi_monitoring_sel_parse_sensor_types (ipmi_sel_ctx_t ctx, void *callback_data) { struct sel_parse_data *spd; uint8_t record_type; int record_type_class; assert (ctx); assert (callback_data); spd = (struct sel_parse_data *)callback_data; if (ipmi_sel_parse_read_record_type (spd->c->sel_parse_ctx, NULL, 0, &record_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errnum (spd->c->sel_parse_ctx))); _sel_parse_ctx_error_convert (spd->c); return (-1); } /* IPMI Workaround * * HP DL 380 G5 * * Motherboard is reporting SEL Records of record type 0x00, which * is not a valid record type. */ if (spd->sel_flags & IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD && !IPMI_SEL_RECORD_TYPE_VALID (record_type)) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { uint8_t sel_sensor_type; unsigned int i; int sensor_type; int found = 0; if (ipmi_sel_parse_read_sensor_type (spd->c->sel_parse_ctx, NULL, 0, &sel_sensor_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_sensor_type: %s", ipmi_sel_ctx_errnum (spd->c->sel_parse_ctx))); _sel_parse_ctx_error_convert (spd->c); return (-1); } if ((sensor_type = ipmi_monitoring_get_sensor_type (spd->c, sel_sensor_type)) < 0) return (-1); for (i = 0; i < spd->sensor_types_len; i++) { if (spd->sensor_types[i] == sensor_type) { found++; break; } } if (found) { if (_store_sel_record (spd->c, spd->sel_flags) < 0) return (-1); } } return (0); } static int _ipmi_monitoring_sel_parse_date_range (ipmi_sel_ctx_t ctx, void *callback_data) { struct sel_parse_data *spd; uint8_t record_type; int record_type_class; assert (ctx); assert (callback_data); spd = (struct sel_parse_data *)callback_data; if (ipmi_sel_parse_read_record_type (spd->c->sel_parse_ctx, NULL, 0, &record_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errnum (spd->c->sel_parse_ctx))); _sel_parse_ctx_error_convert (spd->c); return (-1); } /* IPMI Workaround * * HP DL 380 G5 * * Motherboard is reporting SEL Records of record type 0x00, which * is not a valid record type. */ if (spd->sel_flags & IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD && !IPMI_SEL_RECORD_TYPE_VALID (record_type)) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD || record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { uint32_t timestamp; if (ipmi_sel_parse_read_timestamp (spd->c->sel_parse_ctx, NULL, 0, ×tamp) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse_read_timestamp: %s", ipmi_sel_ctx_errnum (spd->c->sel_parse_ctx))); _sel_parse_ctx_error_convert (spd->c); return (-1); } if (timestamp >= spd->date_begin && timestamp <= spd->date_end) { if (_store_sel_record (spd->c, spd->sel_flags) < 0) return (-1); } } return (0); } int ipmi_monitoring_get_sel (ipmi_monitoring_ctx_t c, unsigned int sel_flags, unsigned int *record_ids, unsigned int record_ids_len, unsigned int *sensor_types, unsigned int sensor_types_len, unsigned int *date_begin, unsigned int *date_end) { struct sel_parse_data spd; uint16_t *record_ids_tmp = NULL; unsigned int i; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (c->sel_parse_ctx); assert (c->sel_records); spd.c = c; spd.sel_flags = sel_flags; if (record_ids && record_ids_len) { /* ipmi_sel_parse takes uint16_t */ if (!((record_ids_tmp = malloc (sizeof (uint16_t) * record_ids_len)))) { IPMI_MONITORING_DEBUG (("malloc: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } for (i = 0; i < record_ids_len; i++) record_ids_tmp[i] = record_ids[i]; if (ipmi_sel_parse_record_ids (c->sel_parse_ctx, record_ids_tmp, record_ids_len, _ipmi_monitoring_sel_parse_record_id, &spd) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } } else if (sensor_types && sensor_types_len) { spd.sensor_types = sensor_types; spd.sensor_types_len = sensor_types_len; if (ipmi_sel_parse (c->sel_parse_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _ipmi_monitoring_sel_parse_sensor_types, &spd) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } } else if (date_begin && date_end) { spd.date_begin = (*date_begin); spd.date_end = (*date_end); if (ipmi_sel_parse (c->sel_parse_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _ipmi_monitoring_sel_parse_date_range, &spd) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } } else { if (ipmi_sel_parse (c->sel_parse_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _ipmi_monitoring_sel_parse_record_id, &spd) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (c->sel_parse_ctx))); _sel_parse_ctx_error_convert (c); goto cleanup; } } rv = 0; cleanup: free (record_ids_tmp); return (rv); } freeipmi-1.6.4/libipmimonitoring/ipmi_monitoring_sensor_reading.c0000644002055400205540000015743713527331637025471 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi_monitoring_sensor_reading.c,v 1.94 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi_monitoring.h" #include "ipmi_monitoring_bitmasks.h" #include "ipmi_monitoring_debug.h" #include "ipmi_monitoring_defs.h" #include "ipmi_monitoring_ipmi_communication.h" #include "ipmi_monitoring_parse_common.h" #include "ipmi_monitoring_sensor_reading.h" #include "freeipmi-portability.h" #define IPMI_MONITORING_SENSORS_OK_STRING "OK" static void _sensor_reading_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); ipmi_sensor_read_ctx_destroy (c->sensor_read_ctx); c->sensor_read_ctx = NULL; } int ipmi_monitoring_sensor_reading_init (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (!c->sensor_read_ctx); if (!(c->sensor_read_ctx = ipmi_sensor_read_ctx_create (c->ipmi_ctx))) { IPMI_MONITORING_DEBUG (("ipmi_sensor_read_ctx_create: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; goto cleanup; } return (0); cleanup: _sensor_reading_cleanup (c); return (-1); } int ipmi_monitoring_sensor_reading_cleanup (ipmi_monitoring_ctx_t c) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); _sensor_reading_cleanup (c); return (0); } static struct ipmi_monitoring_sensor_reading * _allocate_sensor_reading (ipmi_monitoring_ctx_t c) { struct ipmi_monitoring_sensor_reading *s = NULL; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); if (!(s = (struct ipmi_monitoring_sensor_reading *)malloc (sizeof (struct ipmi_monitoring_sensor_reading)))) { IPMI_MONITORING_DEBUG (("malloc: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; return (NULL); } memset (s, '\0', sizeof (struct ipmi_monitoring_sensor_reading)); return (s); } /* return -1 on error, 0 on no append, 1 on append */ static int _store_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, int record_id, int sensor_number, int sensor_type, char *sensor_name, int sensor_state, int sensor_units, int sensor_reading_type, int sensor_bitmask_type, uint16_t sensor_bitmask, char **sensor_bitmask_strings, void *sensor_reading, int event_reading_type_code) { struct ipmi_monitoring_sensor_reading *s = NULL; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (IPMI_MONITORING_SENSOR_TYPE_VALID (sensor_type)); assert (sensor_name); assert (IPMI_MONITORING_STATE_VALID (sensor_state)); assert (IPMI_MONITORING_SENSOR_UNITS_VALID (sensor_units)); assert (IPMI_MONITORING_SENSOR_READING_TYPE_VALID (sensor_reading_type)); assert (IPMI_MONITORING_SENSOR_BITMASK_TYPE_VALID (sensor_bitmask_type)); if ((sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS) && sensor_state == IPMI_MONITORING_STATE_UNKNOWN) return (0); if (!(s = _allocate_sensor_reading (c))) goto cleanup; s->record_id = record_id; s->sensor_number = sensor_number; s->sensor_type = sensor_type; strncpy (s->sensor_name, sensor_name, IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH); s->sensor_state = sensor_state; s->sensor_units = sensor_units; s->sensor_reading_type = sensor_reading_type; s->sensor_bitmask_type = sensor_bitmask_type; s->sensor_bitmask = sensor_bitmask; s->sensor_bitmask_strings = sensor_bitmask_strings; if (s->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER8_BOOL) s->sensor_reading.bool_val = *((uint8_t *)sensor_reading); else if (s->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER32) s->sensor_reading.integer_val = *((uint32_t *)sensor_reading); else if (s->sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE) s->sensor_reading.double_val = *((double *)sensor_reading); s->event_reading_type_code = event_reading_type_code; /* achu: should come before list_append to avoid having a freed entry on the list */ if (c->callback) { c->callback_sensor_reading = s; if ((*c->callback)(c, c->callback_data) < 0) { IPMI_MONITORING_DEBUG (("callback error")); c->errnum = IPMI_MONITORING_ERR_CALLBACK_ERROR; goto cleanup; } } if (!list_append (c->sensor_readings, s)) { IPMI_MONITORING_DEBUG (("list_append: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } return (1); cleanup: free (s); return (-1); } static int _store_unreadable_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, int record_id, int sensor_number, int sensor_type, char *sensor_name, int sensor_units, int event_reading_type_code) { struct ipmi_monitoring_sensor_reading *s = NULL; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (IPMI_MONITORING_SENSOR_TYPE_VALID (sensor_type)); assert (IPMI_MONITORING_SENSOR_UNITS_VALID (sensor_units)); if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS) return (0); if (!(s = _allocate_sensor_reading (c))) goto cleanup; s->record_id = record_id; s->sensor_number = sensor_number; s->sensor_type = sensor_type; if (sensor_name) strncpy (s->sensor_name, sensor_name, IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH); s->sensor_state = IPMI_MONITORING_STATE_UNKNOWN; s->sensor_units = sensor_units; s->sensor_reading_type = IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN; s->sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN; s->sensor_bitmask = 0; s->sensor_bitmask_strings = NULL; s->event_reading_type_code = event_reading_type_code; /* achu: should come before list_append to avoid having a freed entry on the list */ if (c->callback) { c->callback_sensor_reading = s; if ((*c->callback)(c, c->callback_data) < 0) { IPMI_MONITORING_DEBUG (("callback error")); c->errnum = IPMI_MONITORING_ERR_CALLBACK_ERROR; goto cleanup; } } if (!list_append (c->sensor_readings, s)) { IPMI_MONITORING_DEBUG (("list_append: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } return (0); cleanup: free (s); return (-1); } static int _get_sensor_state (ipmi_monitoring_ctx_t c, uint8_t event_reading_type_code, uint8_t sensor_type, uint16_t sensor_event_bitmask) { unsigned int sensor_state; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); if (ipmi_interpret_sensor (c->interpret_ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, &sensor_state) < 0) { IPMI_MONITORING_DEBUG (("ipmi_interpret_sensor: %s", ipmi_interpret_ctx_errormsg (c->interpret_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (sensor_state == IPMI_INTERPRET_STATE_NOMINAL) rv = IPMI_MONITORING_STATE_NOMINAL; else if (sensor_state == IPMI_INTERPRET_STATE_WARNING) rv = IPMI_MONITORING_STATE_WARNING; else if (sensor_state == IPMI_INTERPRET_STATE_CRITICAL) rv = IPMI_MONITORING_STATE_CRITICAL; else if (sensor_state == IPMI_INTERPRET_STATE_UNKNOWN) rv = IPMI_MONITORING_STATE_UNKNOWN; return (rv); } static void _sensor_read_ctx_error_convert (ipmi_monitoring_ctx_t c) { int errnum; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (c->sensor_read_ctx); errnum = ipmi_sensor_read_ctx_errnum (c->sensor_read_ctx); if (errnum == IPMI_SENSOR_READ_ERR_NODE_BUSY) c->errnum = IPMI_MONITORING_ERR_BMC_BUSY; else if (errnum == IPMI_SENSOR_READ_ERR_IPMI_ERROR) c->errnum = IPMI_MONITORING_ERR_IPMI_ERROR; else if (errnum == IPMI_SENSOR_READ_ERR_OUT_OF_MEMORY) c->errnum = IPMI_MONITORING_ERR_OUT_OF_MEMORY; else if (errnum == IPMI_SENSOR_READ_ERR_SYSTEM_ERROR) c->errnum = IPMI_MONITORING_ERR_SYSTEM_ERROR; else c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; } /* * return value -1 = error, 0 = unreadable sensor reading, 1 = sensor reading success * * sensor_reading_valid flag indicates if `sensor_reading` variable * contains valid reading. */ static int _get_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, unsigned int shared_sensor_number_offset, double *sensor_reading, int *sensor_reading_valid, uint16_t *sensor_event_bitmask) { uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_len; double *l_sensor_reading = NULL; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (sensor_reading); assert (sensor_reading_valid); assert (sensor_event_bitmask); if ((sdr_record_len = ipmi_sdr_cache_record_read (c->sdr_ctx, sdr_record, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_cache_record_read: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } if (ipmi_sensor_read (c->sensor_read_ctx, sdr_record, sdr_record_len, shared_sensor_number_offset, NULL, &l_sensor_reading, sensor_event_bitmask) <= 0) { int errnum = ipmi_sensor_read_ctx_errnum (c->sensor_read_ctx); IPMI_MONITORING_DEBUG (("ipmi_sensor_read: %s", ipmi_sensor_read_ctx_errormsg (c->sensor_read_ctx))); if (errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR || errnum == IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE || errnum == IPMI_SENSOR_READ_ERR_SENSOR_SCANNING_DISABLED || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NOT_OWNED_BY_BMC || errnum == IPMI_SENSOR_READ_ERR_SENSOR_CANNOT_BE_BRIDGED || errnum == IPMI_SENSOR_READ_ERR_SENSOR_IS_SYSTEM_SOFTWARE || errnum == IPMI_SENSOR_READ_ERR_SENSOR_READING_CANNOT_BE_OBTAINED) { rv = 0; goto cleanup; } _sensor_read_ctx_error_convert (c); goto cleanup; } if (l_sensor_reading) { (*sensor_reading) = (*l_sensor_reading); free (l_sensor_reading); (*sensor_reading_valid) = 1; } else (*sensor_reading_valid) = 0; rv = 1; cleanup: return (rv); } static int _get_sensor_units (ipmi_monitoring_ctx_t c, uint8_t sensor_units_percentage, uint8_t sensor_units_modifier, uint8_t sensor_units_rate, uint8_t sensor_base_unit_type, uint8_t sensor_modifier_unit_type) { assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); if (sensor_units_percentage == IPMI_SDR_PERCENTAGE_YES && sensor_units_modifier == IPMI_SDR_MODIFIER_UNIT_NONE && sensor_units_rate == IPMI_SENSOR_RATE_UNIT_NONE && sensor_base_unit_type == IPMI_SENSOR_UNIT_UNSPECIFIED) return (IPMI_MONITORING_SENSOR_UNITS_PERCENT); if (sensor_units_percentage != IPMI_SDR_PERCENTAGE_NO) { IPMI_MONITORING_DEBUG (("sensor_units_percentage 'yes' not supported")); return (IPMI_MONITORING_SENSOR_UNITS_UNKNOWN); } if (sensor_units_modifier != IPMI_SDR_MODIFIER_UNIT_NONE) { IPMI_MONITORING_DEBUG (("sensor_units_modifier '0x%X' not supported", sensor_units_modifier)); return (IPMI_MONITORING_SENSOR_UNITS_UNKNOWN); } if (sensor_units_rate != IPMI_SENSOR_RATE_UNIT_NONE) { IPMI_MONITORING_DEBUG (("sensor_units_rate '0x%X' not supported", sensor_units_rate)); return (IPMI_MONITORING_SENSOR_UNITS_UNKNOWN); } if (sensor_modifier_unit_type != IPMI_SENSOR_UNIT_UNSPECIFIED) { IPMI_MONITORING_DEBUG (("sensor_modifier_unit_type '0x%X' not supported", sensor_modifier_unit_type)); return (IPMI_MONITORING_SENSOR_UNITS_UNKNOWN); } switch (sensor_base_unit_type) { case IPMI_SENSOR_UNIT_DEGREES_C: return (IPMI_MONITORING_SENSOR_UNITS_CELSIUS); case IPMI_SENSOR_UNIT_DEGREES_F: return (IPMI_MONITORING_SENSOR_UNITS_FAHRENHEIT); case IPMI_SENSOR_UNIT_VOLTS: return (IPMI_MONITORING_SENSOR_UNITS_VOLTS); case IPMI_SENSOR_UNIT_AMPS: return (IPMI_MONITORING_SENSOR_UNITS_AMPS); case IPMI_SENSOR_UNIT_RPM: return (IPMI_MONITORING_SENSOR_UNITS_RPM); case IPMI_SENSOR_UNIT_WATTS: return (IPMI_MONITORING_SENSOR_UNITS_WATTS); } IPMI_MONITORING_DEBUG (("sensor_base_unit_type '0x%X' not supported", sensor_base_unit_type)); return (IPMI_MONITORING_SENSOR_UNITS_UNKNOWN); } static void _free_sensor_bitmask_strings (char **sensor_bitmask_strings) { if (sensor_bitmask_strings) { unsigned int i = 0; while (sensor_bitmask_strings[i]) { free (sensor_bitmask_strings[i]); i++; } free (sensor_bitmask_strings); } } static int _get_sensor_bitmask_strings (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, uint8_t event_reading_type_code, uint8_t sensor_type, uint8_t sensor_number, uint16_t sensor_event_bitmask, char ***sensor_bitmask_strings) { char **tmp_sensor_bitmask_strings = NULL; unsigned int tmp_sensor_bitmask_strings_count = 0; uint32_t manufacturer_id = 0; uint16_t product_id = 0; unsigned int flags; int rv = -1; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (sensor_bitmask_strings); flags = IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA) { manufacturer_id = c->manufacturer_id; product_id = c->product_id; flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA; } if (ipmi_get_event_messages (event_reading_type_code, sensor_type, sensor_number, sensor_event_bitmask, manufacturer_id, product_id, &tmp_sensor_bitmask_strings, &tmp_sensor_bitmask_strings_count, IPMI_MONITORING_SENSORS_OK_STRING, flags) < 0) { IPMI_MONITORING_DEBUG (("ipmi_get_event_messages: %s", strerror (errno))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; goto cleanup; } (*sensor_bitmask_strings) = tmp_sensor_bitmask_strings; rv = 0; cleanup: if (rv < 0) _free_sensor_bitmask_strings (tmp_sensor_bitmask_strings); return (rv); } static int _threshold_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, uint16_t record_id, int sensor_number_base, unsigned int shared_sensor_number_offset, uint8_t event_reading_type_code, uint8_t sdr_sensor_type, int sensor_type, char *sensor_name) { uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; double sensor_reading; int sensor_reading_valid; uint16_t sensor_event_bitmask; char **sensor_bitmask_strings = NULL; int sensor_units; int sensor_state; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (IPMI_MONITORING_SENSOR_TYPE_VALID (sensor_type)); assert (sensor_name); if (ipmi_sdr_parse_sensor_units (c->sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_sensor_units: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if ((sensor_units = _get_sensor_units (c, sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type)) < 0) return (-1); if ((ret = _get_sensor_reading (c, sensor_reading_flags, shared_sensor_number_offset, &sensor_reading, &sensor_reading_valid, &sensor_event_bitmask)) < 0) return (-1); if (!ret || sensor_reading_valid == 0) { IPMI_MONITORING_DEBUG (("cannot read sensor for record id '%u'", record_id)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_units, event_reading_type_code) < 0) return (-1); return (0); } if ((sensor_state = _get_sensor_state (c, event_reading_type_code, sdr_sensor_type, sensor_event_bitmask)) < 0) return (-1); if (_get_sensor_bitmask_strings (c, sensor_reading_flags, event_reading_type_code, sdr_sensor_type, sensor_number_base + shared_sensor_number_offset, sensor_event_bitmask, &sensor_bitmask_strings) < 0) return (-1); if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, sensor_units, IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE, IPMI_MONITORING_SENSOR_BITMASK_TYPE_THRESHOLD, sensor_event_bitmask, sensor_bitmask_strings, &sensor_reading, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } return (0); } static int _get_sensor_bitmask_type (ipmi_monitoring_ctx_t c, uint8_t event_reading_type_code, uint8_t sdr_sensor_type) { int sensor_bitmask_type; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_THRESHOLD) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_THRESHOLD; if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_STATE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_STATE; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_STATE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_STATE; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PREDICTIVE_FAILURE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PREDICTIVE_FAILURE; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_LIMIT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_LIMIT; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_PERFORMANCE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PERFORMANCE; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_SEVERITY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_SEVERITY; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_PRESENT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_DEVICE_PRESENT; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_DEVICE_ENABLED) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_DEVICE_ENABLED; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_TRANSITION_AVAILABILITY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_TRANSITION_AVAILABILITY; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_REDUNDANCY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_REDUNDANCY; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_ACPI_POWER_STATE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_ACPI_POWER_STATE; else if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_SENSOR_SPECIFIC) { if (sdr_sensor_type == IPMI_SENSOR_TYPE_PHYSICAL_SECURITY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PHYSICAL_SECURITY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PROCESSOR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PROCESSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_POWER_SUPPLY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POWER_UNIT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_POWER_UNIT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_COOLING_DEVICE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_COOLING_DEVICE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OTHER_UNITS_BASED_SENSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MEMORY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_MEMORY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_DRIVE_SLOT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_DRIVE_SLOT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_POST_MEMORY_RESIZE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_POST_MEMORY_RESIZE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_FIRMWARE_PROGRESS; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_EVENT_LOGGING_DISABLED; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_WATCHDOG1) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_WATCHDOG1; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_EVENT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_EVENT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_CRITICAL_INTERRUPT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BUTTON_SWITCH) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_BUTTON_SWITCH; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MODULE_BOARD) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_MODULE_BOARD; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_MICROCONTROLLER_COPROCESSOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_ADD_IN_CARD) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_ADD_IN_CARD; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CHASSIS) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_CHASSIS; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CHIP_SET) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_CHIP_SET; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OTHER_FRU) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OTHER_FRU; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_CABLE_INTERCONNECT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_CABLE_INTERCONNECT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_TERMINATOR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_TERMINATOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_BOOT_INITIATED) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_BOOT_INITIATED; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BOOT_ERROR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_BOOT_ERROR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OS_BOOT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OS_BOOT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_OS_CRITICAL_STOP) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OS_CRITICAL_STOP; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SLOT_CONNECTOR) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SLOT_CONNECTOR; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SYSTEM_ACPI_POWER_STATE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_WATCHDOG2; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_PLATFORM_ALERT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_PLATFORM_ALERT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_ENTITY_PRESENCE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_ENTITY_PRESENCE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MONITOR_ASIC_IC) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_MONITOR_ASIC_IC; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_LAN) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_LAN; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_BATTERY) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_BATTERY; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_SESSION_AUDIT) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_SESSION_AUDIT; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_VERSION_CHANGE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_VERSION_CHANGE; else if (sdr_sensor_type == IPMI_SENSOR_TYPE_FRU_STATE) sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_FRU_STATE; /* To avoid gcc warnings, subtract -1 in comparison */ else if (sdr_sensor_type >= IPMI_SENSOR_TYPE_OEM_MIN && (sdr_sensor_type - 1) <= (IPMI_SENSOR_TYPE_OEM_MAX - 1)) { IPMI_MONITORING_DEBUG (("sensor_type '0x%X' bitmask is OEM", sdr_sensor_type)); sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OEM; } else { IPMI_MONITORING_DEBUG (("sensor_type '0x%X' bitmask not supported", sdr_sensor_type)); sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN; } } else if (event_reading_type_code >= IPMI_EVENT_READING_TYPE_CODE_OEM_MIN && event_reading_type_code <= IPMI_EVENT_READING_TYPE_CODE_OEM_MAX) { IPMI_MONITORING_DEBUG (("event_reading_type_code '0x%X' bitmask is OEM", event_reading_type_code)); sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_OEM; } else { IPMI_MONITORING_DEBUG (("event_reading_type_code '0x%X' bitmask not supported", event_reading_type_code)); sensor_bitmask_type = IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN; } return (sensor_bitmask_type); } static int _digital_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, uint16_t record_id, uint8_t sensor_number_base, unsigned int shared_sensor_number_offset, uint8_t event_reading_type_code, uint8_t sdr_sensor_type, int sensor_type, char *sensor_name) { double sensor_reading; int sensor_reading_valid; uint16_t sensor_event_bitmask; char **sensor_bitmask_strings = NULL; int sensor_state; int sensor_bitmask_type; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code)); assert (IPMI_MONITORING_SENSOR_TYPE_VALID (sensor_type)); assert (sensor_name); if ((ret = _get_sensor_reading (c, sensor_reading_flags, shared_sensor_number_offset, &sensor_reading, &sensor_reading_valid, &sensor_event_bitmask)) < 0) return (-1); if (!ret) { IPMI_MONITORING_DEBUG (("cannot read sensor for record id '%u'", record_id)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, IPMI_MONITORING_SENSOR_UNITS_UNKNOWN, event_reading_type_code) < 0) return (-1); return (0); } if ((sensor_state = _get_sensor_state (c, event_reading_type_code, sdr_sensor_type, sensor_event_bitmask)) < 0) return (-1); if ((sensor_bitmask_type = _get_sensor_bitmask_type (c, event_reading_type_code, sdr_sensor_type)) < 0) return (-1); if (_get_sensor_bitmask_strings (c, sensor_reading_flags, event_reading_type_code, sdr_sensor_type, sensor_number_base + shared_sensor_number_offset, sensor_event_bitmask, &sensor_bitmask_strings) < 0) return (-1); if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING && sensor_reading_valid) { uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; int sensor_units; /* If units aren't legal, this isn't considered a "discrete reading" workaround situation, fallthrough to normal output */ if (ipmi_sdr_parse_sensor_units (c->sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) goto normal_reading; if ((sensor_units = _get_sensor_units (c, sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type)) < 0) goto normal_reading; if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_UNKNOWN) goto normal_reading; if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, sensor_units, IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE, sensor_bitmask_type, sensor_event_bitmask, sensor_bitmask_strings, &sensor_reading, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } } else { normal_reading: /* No actual sensor reading, only a sensor event bitmask */ if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, IPMI_MONITORING_SENSOR_UNITS_NONE, IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN, sensor_bitmask_type, sensor_event_bitmask, sensor_bitmask_strings, NULL, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } } return (0); } static int _specific_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, uint16_t record_id, uint8_t sensor_number_base, unsigned int shared_sensor_number_offset, uint8_t event_reading_type_code, uint8_t sdr_sensor_type, int sensor_type, char *sensor_name) { double sensor_reading; int sensor_reading_valid; uint16_t sensor_event_bitmask; char **sensor_bitmask_strings = NULL; int sensor_state; int sensor_bitmask_type; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (sensor_name); if ((ret = _get_sensor_reading (c, sensor_reading_flags, shared_sensor_number_offset, &sensor_reading, &sensor_reading_valid, &sensor_event_bitmask)) < 0) return (-1); if (!ret) { IPMI_MONITORING_DEBUG (("cannot read sensor for record id '%u'", record_id)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, IPMI_MONITORING_SENSOR_UNITS_UNKNOWN, event_reading_type_code) < 0) return (-1); return (0); } if ((sensor_state = _get_sensor_state (c, event_reading_type_code, sdr_sensor_type, sensor_event_bitmask)) < 0) return (-1); if ((sensor_bitmask_type = _get_sensor_bitmask_type (c, event_reading_type_code, sdr_sensor_type)) < 0) return (-1); if (_get_sensor_bitmask_strings (c, sensor_reading_flags, event_reading_type_code, sdr_sensor_type, sensor_number_base + shared_sensor_number_offset, sensor_event_bitmask, &sensor_bitmask_strings) < 0) return (-1); if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING && sensor_reading_valid) { uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; int sensor_units; /* If units aren't legal, this isn't considered a "discrete reading" workaround situation, fallthrough to normal output */ if (ipmi_sdr_parse_sensor_units (c->sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) goto normal_reading; if ((sensor_units = _get_sensor_units (c, sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type)) < 0) goto normal_reading; if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_UNKNOWN) goto normal_reading; if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, sensor_units, IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE, sensor_bitmask_type, sensor_event_bitmask, sensor_bitmask_strings, &sensor_reading, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } } else { normal_reading: /* No actual sensor reading, only a sensor event bitmask */ if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, IPMI_MONITORING_SENSOR_UNITS_NONE, IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN, sensor_bitmask_type, sensor_event_bitmask, sensor_bitmask_strings, NULL, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } } return (0); } static int _oem_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, uint16_t record_id, uint8_t sensor_number_base, unsigned int shared_sensor_number_offset, uint8_t event_reading_type_code, uint8_t sdr_sensor_type, int sensor_type, char *sensor_name) { double sensor_reading; int sensor_reading_valid; uint16_t sensor_event_bitmask; char **sensor_bitmask_strings = NULL; int sensor_state; int sensor_bitmask_type; int ret; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->sensor_readings); assert (sensor_name); if ((ret = _get_sensor_reading (c, sensor_reading_flags, shared_sensor_number_offset, &sensor_reading, &sensor_reading_valid, &sensor_event_bitmask)) < 0) return (-1); if (!ret) { IPMI_MONITORING_DEBUG (("cannot read sensor for record id '%u'", record_id)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, IPMI_MONITORING_SENSOR_UNITS_UNKNOWN, event_reading_type_code) < 0) return (-1); return (0); } if ((sensor_state = _get_sensor_state (c, event_reading_type_code, sdr_sensor_type, sensor_event_bitmask)) < 0) return (-1); if ((sensor_bitmask_type = _get_sensor_bitmask_type (c, event_reading_type_code, sdr_sensor_type)) < 0) return (-1); if (_get_sensor_bitmask_strings (c, sensor_reading_flags, event_reading_type_code, sdr_sensor_type, sensor_number_base + shared_sensor_number_offset, sensor_event_bitmask, &sensor_bitmask_strings) < 0) return (-1); /* No actual sensor reading, only a sensor event bitmask */ if ((ret = _store_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, sensor_state, IPMI_MONITORING_SENSOR_UNITS_NONE, IPMI_MONITORING_SENSOR_READING_TYPE_UNKNOWN, sensor_bitmask_type, sensor_event_bitmask, sensor_bitmask_strings, NULL, event_reading_type_code)) <= 0) { _free_sensor_bitmask_strings (sensor_bitmask_strings); if (ret < 0) return (-1); } return (0); } int ipmi_monitoring_get_sensor_reading (ipmi_monitoring_ctx_t c, unsigned int sensor_reading_flags, unsigned int shared_sensor_number_offset, unsigned int *sensor_types, unsigned int sensor_types_len) { char sensor_name[IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH]; uint16_t record_id; uint8_t record_type; uint8_t sensor_number_base; uint8_t event_reading_type_code; uint8_t sdr_sensor_type; int sensor_type; int len; unsigned int sensor_name_flags = 0; assert (c); assert (c->magic == IPMI_MONITORING_MAGIC); assert (c->ipmi_ctx); assert (c->sensor_read_ctx); assert (c->sensor_readings); assert (!sensor_types || sensor_types_len); if (ipmi_sdr_parse_record_id_and_type (c->sdr_ctx, NULL, 0, &record_id, &record_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_record_id_and_type: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { IPMI_MONITORING_DEBUG (("record_type '0x%X' not supported", record_type)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, 0, IPMI_MONITORING_SENSOR_TYPE_UNKNOWN, NULL, IPMI_MONITORING_SENSOR_UNITS_UNKNOWN, 0) < 0) return (-1); return (0); } if (ipmi_sdr_parse_sensor_number (c->sdr_ctx, NULL, 0, &sensor_number_base) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_sensor_number: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (ipmi_sdr_parse_sensor_type (c->sdr_ctx, NULL, 0, &sdr_sensor_type) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_sensor_type: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if ((sensor_type = ipmi_monitoring_get_sensor_type (c, sdr_sensor_type)) < 0) return (-1); if (sensor_types) { unsigned int i, found = 0; for (i = 0; i < sensor_types_len; i++) { if (sensor_types[i] == sensor_type) { found++; break; } } if (!found) return (0); } memset (sensor_name, '\0', IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH); if (!(sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS)) sensor_name_flags |= IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS; if (sensor_reading_flags & IPMI_MONITORING_SENSOR_READING_FLAGS_ENTITY_SENSOR_NAMES) { if ((len = ipmi_sdr_parse_entity_sensor_name (c->sdr_ctx, NULL, 0, sensor_number_base + shared_sensor_number_offset, sensor_name_flags, sensor_name, IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_entity_sensor_name: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } } else { if ((len = ipmi_sdr_parse_sensor_name (c->sdr_ctx, NULL, 0, sensor_number_base + shared_sensor_number_offset, sensor_name_flags, sensor_name, IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH)) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_sensor_name: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } } if (len >= IPMI_MONITORING_MAX_SENSOR_NAME_LENGTH) { IPMI_MONITORING_DEBUG (("sensor_name buffer short: len = %d", len)); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (ipmi_sdr_parse_event_reading_type_code (c->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { IPMI_MONITORING_DEBUG (("ipmi_sdr_parse_event_reading_type_code: %s", ipmi_sdr_ctx_errormsg (c->sdr_ctx))); c->errnum = IPMI_MONITORING_ERR_INTERNAL_ERROR; return (-1); } if (IPMI_EVENT_READING_TYPE_CODE_IS_THRESHOLD (event_reading_type_code)) { if (_threshold_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base, shared_sensor_number_offset, event_reading_type_code, sdr_sensor_type, sensor_type, sensor_name) < 0) return (-1); } else if (IPMI_EVENT_READING_TYPE_CODE_IS_GENERIC (event_reading_type_code)) { if (_digital_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base, shared_sensor_number_offset, event_reading_type_code, sdr_sensor_type, sensor_type, sensor_name) < 0) return (-1); } else if (IPMI_EVENT_READING_TYPE_CODE_IS_SENSOR_SPECIFIC (event_reading_type_code)) { if (_specific_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base, shared_sensor_number_offset, event_reading_type_code, sdr_sensor_type, sensor_type, sensor_name) < 0) return (-1); } else if (IPMI_EVENT_READING_TYPE_CODE_IS_OEM (event_reading_type_code)) { if (_oem_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base, shared_sensor_number_offset, event_reading_type_code, sdr_sensor_type, sensor_type, sensor_name) < 0) return (-1); } else { IPMI_MONITORING_DEBUG (("event_reading_type_code '0x%X' not supported", event_reading_type_code)); if (_store_unreadable_sensor_reading (c, sensor_reading_flags, record_id, sensor_number_base + shared_sensor_number_offset, sensor_type, sensor_name, IPMI_MONITORING_SENSOR_UNITS_UNKNOWN, event_reading_type_code) < 0) return (-1); } return (0); } freeipmi-1.6.4/libipmimonitoring/ipmimonitoring.map0000644002055400205540000000414713527331637022570 0ustar00achuachu00000000000000{ global: ipmi_monitoring_init; ipmi_monitoring_ctx_create; ipmi_monitoring_ctx_destroy; ipmi_monitoring_ctx_errnum; ipmi_monitoring_ctx_strerror; ipmi_monitoring_ctx_errormsg; ipmi_monitoring_ctx_sel_config_file; ipmi_monitoring_ctx_sensor_config_file; ipmi_monitoring_ctx_sdr_cache_directory; ipmi_monitoring_ctx_sdr_cache_filenames; ipmi_monitoring_sel_by_record_id; ipmi_monitoring_sel_by_sensor_type; ipmi_monitoring_sel_by_date_range; ipmi_monitoring_sel_iterator_first; ipmi_monitoring_sel_iterator_next; ipmi_monitoring_sel_iterator_destroy; ipmi_monitoring_sel_read_record_id; ipmi_monitoring_sel_read_record_type; ipmi_monitoring_sel_read_record_type_class; ipmi_monitoring_sel_read_sel_state; ipmi_monitoring_sel_read_timestamp; ipmi_monitoring_sel_read_sensor_type; ipmi_monitoring_sel_read_sensor_number; ipmi_monitoring_sel_read_sensor_name; ipmi_monitoring_sel_read_event_direction; ipmi_monitoring_sel_read_event_offset_type; ipmi_monitoring_sel_read_event_offset; ipmi_monitoring_sel_read_event_offset_string; ipmi_monitoring_sel_read_event_type_code; ipmi_monitoring_sel_read_event_data; ipmi_monitoring_sel_read_manufacturer_id; ipmi_monitoring_sel_read_oem_data; ipmi_monitoring_sensor_readings_by_record_id; ipmi_monitoring_sensor_readings_by_sensor_type; ipmi_monitoring_sensor_iterator_first; ipmi_monitoring_sensor_iterator_next; ipmi_monitoring_sensor_iterator_destroy; ipmi_monitoring_sensor_read_record_id; ipmi_monitoring_sensor_read_sensor_number; ipmi_monitoring_sensor_read_sensor_type; ipmi_monitoring_sensor_read_sensor_name; ipmi_monitoring_sensor_read_sensor_state; ipmi_monitoring_sensor_read_sensor_units; ipmi_monitoring_sensor_read_sensor_reading_type; ipmi_monitoring_sensor_read_sensor_reading; ipmi_monitoring_sensor_read_sensor_bitmask_type; ipmi_monitoring_sensor_read_sensor_bitmask; ipmi_monitoring_sensor_read_sensor_bitmask_strings; ipmi_monitoring_sensor_read_event_reading_type_code; local: *; }; freeipmi-1.6.4/libipmidetect/0000755002055400205540000000000013527342545016102 5ustar00achuachu00000000000000freeipmi-1.6.4/libipmidetect/Makefile.in0000644002055400205540000006647013527342446020164 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = libipmidetect DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/ipmidetect.h.in $(srcdir)/libipmidetect.pc.in \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = ipmidetect.h libipmidetect.pc CONFIG_CLEAN_VPATH_FILES = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" \ "$(DESTDIR)$(includedir)" LTLIBRARIES = $(lib_LTLIBRARIES) libipmidetect_la_DEPENDENCIES = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la am_libipmidetect_la_OBJECTS = libipmidetect_la-ipmidetect.lo libipmidetect_la_OBJECTS = $(am_libipmidetect_la_OBJECTS) AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = libipmidetect_la_LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC \ $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=link $(CCLD) \ $(AM_CFLAGS) $(CFLAGS) $(libipmidetect_la_LDFLAGS) $(LDFLAGS) \ -o $@ AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(libipmidetect_la_SOURCES) DIST_SOURCES = $(libipmidetect_la_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac DATA = $(pkgconfig_DATA) HEADERS = $(nodist_include_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ @WITH_PKG_CONFIG_TRUE@pkgconfig_DATA = libipmidetect.pc @WITH_GNU_LD_TRUE@VERSION_SCRIPT = $(srcdir)/ipmidetect.map @WITH_GNU_LD_TRUE@OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) nodist_include_HEADERS = ipmidetect.h lib_LTLIBRARIES = libipmidetect.la libipmidetect_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability libipmidetect_la_LDFLAGS = \ -version-info @LIBIPMIDETECT_VERSION_INFO@ \ $(OTHER_FLAGS) libipmidetect_la_LIBADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la libipmidetect_la_SOURCES = \ ipmidetect.c EXTRA_DIST = ipmidetect.map all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu libipmidetect/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu libipmidetect/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): ipmidetect.h: $(top_builddir)/config.status $(srcdir)/ipmidetect.h.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmidetect.pc: $(top_builddir)/config.status $(srcdir)/libipmidetect.pc.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ install-libLTLIBRARIES: $(lib_LTLIBRARIES) @$(NORMAL_INSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ list2=; for p in $$list; do \ if test -f $$p; then \ list2="$$list2 $$p"; \ else :; fi; \ done; \ test -z "$$list2" || { \ echo " $(MKDIR_P) '$(DESTDIR)$(libdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libdir)" || exit 1; \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(libdir)'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(libdir)"; \ } uninstall-libLTLIBRARIES: @$(NORMAL_UNINSTALL) @list='$(lib_LTLIBRARIES)'; test -n "$(libdir)" || list=; \ for p in $$list; do \ $(am__strip_dir) \ echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(libdir)/$$f'"; \ $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(libdir)/$$f"; \ done clean-libLTLIBRARIES: -test -z "$(lib_LTLIBRARIES)" || rm -f $(lib_LTLIBRARIES) @list='$(lib_LTLIBRARIES)'; \ locs=`for p in $$list; do echo $$p; done | \ sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \ sort -u`; \ test -z "$$locs" || { \ echo rm -f $${locs}; \ rm -f $${locs}; \ } libipmidetect.la: $(libipmidetect_la_OBJECTS) $(libipmidetect_la_DEPENDENCIES) $(EXTRA_libipmidetect_la_DEPENDENCIES) $(AM_V_CCLD)$(libipmidetect_la_LINK) -rpath $(libdir) $(libipmidetect_la_OBJECTS) $(libipmidetect_la_LIBADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/libipmidetect_la-ipmidetect.Plo@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< libipmidetect_la-ipmidetect.lo: ipmidetect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmidetect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT libipmidetect_la-ipmidetect.lo -MD -MP -MF $(DEPDIR)/libipmidetect_la-ipmidetect.Tpo -c -o libipmidetect_la-ipmidetect.lo `test -f 'ipmidetect.c' || echo '$(srcdir)/'`ipmidetect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/libipmidetect_la-ipmidetect.Tpo $(DEPDIR)/libipmidetect_la-ipmidetect.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetect.c' object='libipmidetect_la-ipmidetect.lo' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libipmidetect_la_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o libipmidetect_la-ipmidetect.lo `test -f 'ipmidetect.c' || echo '$(srcdir)/'`ipmidetect.c mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-pkgconfigDATA: $(pkgconfig_DATA) @$(NORMAL_INSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pkgconfigdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pkgconfigdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pkgconfigdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pkgconfigdir)" || exit $$?; \ done uninstall-pkgconfigDATA: @$(NORMAL_UNINSTALL) @list='$(pkgconfig_DATA)'; test -n "$(pkgconfigdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pkgconfigdir)'; $(am__uninstall_files_from_dir) install-nodist_includeHEADERS: $(nodist_include_HEADERS) @$(NORMAL_INSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(includedir)'"; \ $(MKDIR_P) "$(DESTDIR)$(includedir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_HEADER) $$files '$(DESTDIR)$(includedir)'"; \ $(INSTALL_HEADER) $$files "$(DESTDIR)$(includedir)" || exit $$?; \ done uninstall-nodist_includeHEADERS: @$(NORMAL_UNINSTALL) @list='$(nodist_include_HEADERS)'; test -n "$(includedir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(includedir)'; $(am__uninstall_files_from_dir) ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(LTLIBRARIES) $(DATA) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(libdir)" "$(DESTDIR)$(pkgconfigdir)" "$(DESTDIR)$(includedir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libLTLIBRARIES clean-libtool \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-nodist_includeHEADERS install-pkgconfigDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-libLTLIBRARIES install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-libLTLIBRARIES uninstall-nodist_includeHEADERS \ uninstall-pkgconfigDATA .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libLTLIBRARIES clean-libtool cscopelist-am ctags \ ctags-am distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-libLTLIBRARIES install-man \ install-nodist_includeHEADERS install-pdf install-pdf-am \ install-pkgconfigDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-libLTLIBRARIES \ uninstall-nodist_includeHEADERS uninstall-pkgconfigDATA $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/libipmidetect/Makefile.am0000644002055400205540000000162313527331637020140 0ustar00achuachu00000000000000if WITH_PKG_CONFIG pkgconfig_DATA = libipmidetect.pc endif if WITH_GNU_LD VERSION_SCRIPT = $(srcdir)/ipmidetect.map OTHER_FLAGS = -Wl,--version-script=$(VERSION_SCRIPT) endif nodist_include_HEADERS = ipmidetect.h lib_LTLIBRARIES = libipmidetect.la libipmidetect_la_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability libipmidetect_la_LDFLAGS = \ -version-info @LIBIPMIDETECT_VERSION_INFO@ \ $(OTHER_FLAGS) libipmidetect_la_LIBADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la libipmidetect_la_SOURCES = \ ipmidetect.c $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: EXTRA_DIST = ipmidetect.map freeipmi-1.6.4/libipmidetect/ipmidetect.h.in0000644002055400205540000001307513527331637021015 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.h,v 1.11 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifndef IPMIDETECT_H #define IPMIDETECT_H #include /* * Libipmidetect version * * MAJOR - Incremented when interfaces are changed or removed. * Interfaces may be binary incompatible. When incremented, MINOR * and PATCH are zeroed. * * MINOR - Incremented when interfaces are added. Interfaces are * binary compatible with older minor versions. When incremented, * PATCH is zeroed. * * PATCH - Incremented when interfaces are not changed. Typically * incremented due to bug fixes or minor features. Interfaces are * forward and backward compatible to other PATCH versions. */ #define LIBIPMIDETECT_VERSION_MAJOR @LIBIPMIDETECT_VERSION_MAJOR@ #define LIBIPMIDETECT_VERSION_MINOR @LIBIPMIDETECT_VERSION_MINOR@ #define LIBIPMIDETECT_VERSION_PATCH @LIBIPMIDETECT_VERSION_PATCH@ /* * Ipmidetect Error Codes */ #define IPMIDETECT_ERR_SUCCESS 0 #define IPMIDETECT_ERR_HANDLE_NULL 1 #define IPMIDETECT_ERR_HANDLE_INVALID 2 #define IPMIDETECT_ERR_CONNECT 3 #define IPMIDETECT_ERR_CONNECT_TIMEOUT 4 #define IPMIDETECT_ERR_HOSTNAME_INVALID 5 #define IPMIDETECT_ERR_ISLOADED 6 #define IPMIDETECT_ERR_NOTLOADED 7 #define IPMIDETECT_ERR_OVERFLOW 8 #define IPMIDETECT_ERR_PARAMETERS 9 #define IPMIDETECT_ERR_NULLPTR 10 #define IPMIDETECT_ERR_OUT_OF_MEMORY 11 #define IPMIDETECT_ERR_NOTFOUND 12 #define IPMIDETECT_ERR_CONF_PARSE 13 #define IPMIDETECT_ERR_CONF_INPUT 14 #define IPMIDETECT_ERR_CONF_INTERNAL 15 #define IPMIDETECT_ERR_INTERNAL 16 #define IPMIDETECT_ERR_ERRNUMRANGE 17 typedef struct ipmidetect *ipmidetect_t; /* * ipmidetect_handle_create * * Create an ipmidetect handle. * * Returns handle on success, NULL on error */ ipmidetect_t ipmidetect_handle_create (void); /* ipmidetect_handle_destroy * * Destroy an ipmidetect handle. * * Returns 0 on success, -1 on error */ int ipmidetect_handle_destroy (ipmidetect_t handle); /* * ipmidetect_load_data * * Loads data from the ipmidetectd daemon to determine which nodes * have been detected. * * If 'hostname' is NULL, 'port' is <= 0, or 'timeout_len' <=0, the * respective defaults will be used. * * Returns 0 on success, -1 on error */ int ipmidetect_load_data (ipmidetect_t handle, const char *hostname, int port, int timeout_len); /* * ipmidetect_errnum * * Return the most recent error number. * * Returns error number on success */ int ipmidetect_errnum (ipmidetect_t handle); /* * ipmidetect_strerror * * Return a string message describing an error number. * * Returns pointer to message on success */ char *ipmidetect_strerror (int errnum); /* * ipmidetect_errormsg * * Return a string message describing the most recent error. * * Returns pointer to message on success */ char *ipmidetect_errormsg (ipmidetect_t handle); /* * ipmidetect_perror * * Output a message to standard error */ void ipmidetect_perror (ipmidetect_t handle, const char *msg); /* * ipmidetect_get_detected_nodes_string * * Retrieve a ranged string of up nodes and store it in the buffer * * Returns 0 on success, -1 on error */ int ipmidetect_get_detected_nodes_string (ipmidetect_t handle, char *buf, int buflen); /* * ipmidetect_get_undetected_nodes_string * * Retrieve a ranged string of undetected nodes and store it in the buffer * * Returns 0 on success, -1 on error */ int ipmidetect_get_undetected_nodes_string (ipmidetect_t handle, char *buf, int buflen); /* * ipmidetect_is_node_detected * * Check if a node is detected * * Returns 1 if detected, 0 if undetected, -1 on error */ int ipmidetect_is_node_detected (ipmidetect_t handle, const char *node); /* * ipmidetect_is_node_undetected * * Check if a node is undetected * * Returns 1 if undetected, 0 if detected, -1 on error */ int ipmidetect_is_node_undetected (ipmidetect_t handle, const char *node); #endif /* IPMIDETECT_H */ freeipmi-1.6.4/libipmidetect/libipmidetect.pc.in0000644002055400205540000000037113527331637021652 0ustar00achuachu00000000000000prefix=@prefix@ exec_prefix=@exec_prefix@ includedir=@includedir@ libdir=@libdir@ Name: libipmidetect Description: FreeIPMI library to discover IPMI capable hardware Version: @PACKAGE_VERSION@ Cflags: -I${includedir} Libs: -L${libdir} -lipmidetect freeipmi-1.6.4/libipmidetect/ipmidetect.c0000644002055400205540000005031613527331637020402 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.c,v 1.21 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_STRINGS_H #include /* bzero */ #endif /* HAVE_STRINGS_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H # include #else /* !HAVE_SYS_TIME_H */ # include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmidetect.h" #include "conffile.h" #include "fd.h" #include "fi_hostlist.h" #include "freeipmi-portability.h" /* * ipmidetect_errmsg * * error messages array */ static char * ipmidetect_errmsg[] = { "success", "ipmidetect handle null", "ipmidetect handle invalid", "connection to server error", "connection to server timeout", "hostname invalid", "data already loaded", "data not loaded", "array or string not large enough to store result", "incorrect parameters", "null pointer reached in list", "out of memory", "node not found", "parse config file error", "invalid config file input", "internal config file error", "internal system error", "error number out of range", }; #define IPMIDETECT_MAGIC_NUM 0xbeefbeef #define IPMIDETECT_CONFIG_HOSTNAMES_MAX 8 #define IPMIDETECT_MAXHOSTNAMELEN 64 #define IPMIDETECT_DETECTED_NODES 1 #define IPMIDETECT_UNDETECTED_NODES 0 #define IPMIDETECT_LOAD_STATE_UNLOADED 0 #define IPMIDETECT_LOAD_STATE_SETUP 1 #define IPMIDETECT_LOAD_STATE_LOADED 2 #define IPMIDETECT_BUFLEN 1024 #define IPMIDETECT_PORT_DEFAULT 9225 #define IPMIDETECT_TIMEOUT_LEN_DEFAULT 60 #define IPMIDETECT_BACKEND_CONNECT_LEN 5 struct ipmidetect { int magic; int errnum; int load_state; fi_hostlist_t detected_nodes; fi_hostlist_t undetected_nodes; }; struct ipmidetect_config { char hostnames[IPMIDETECT_CONFIG_HOSTNAMES_MAX+1][IPMIDETECT_MAXHOSTNAMELEN+1]; unsigned int hostnames_len; int hostnames_flag; int port; int port_flag; int timeout_len; int timeout_len_flag; }; /* * _ipmidetect_handle_error_check * * standard handle error checker * * Returns 0 on success, -1 one error */ static int _ipmidetect_handle_error_check (ipmidetect_t handle) { if (!handle || handle->magic != IPMIDETECT_MAGIC_NUM) return (-1); return (0); } /* * _unloaded_handle_error_check * * standard unloaded handle error checker * * Returns -1 on error, 0 on success */ static int _unloaded_handle_error_check (ipmidetect_t handle) { if (_ipmidetect_handle_error_check (handle) < 0) return (-1); if (handle->load_state == IPMIDETECT_LOAD_STATE_LOADED) { handle->errnum = IPMIDETECT_ERR_ISLOADED; return (-1); } if (handle->load_state != IPMIDETECT_LOAD_STATE_UNLOADED) { handle->errnum = IPMIDETECT_ERR_INTERNAL; return (-1); } return (0); } /* * _loaded_handle_error_check * * standard loaded handle error checker * * Returns -1 on error, 0 on success */ static int _loaded_handle_error_check (ipmidetect_t handle) { if (_ipmidetect_handle_error_check (handle) < 0) return (-1); if (handle->load_state == IPMIDETECT_LOAD_STATE_UNLOADED) { handle->errnum = IPMIDETECT_ERR_NOTLOADED; return (-1); } if (handle->load_state != IPMIDETECT_LOAD_STATE_LOADED) { handle->errnum = IPMIDETECT_ERR_INTERNAL; return (-1); } return (0); } /* * _initialize_handle * * initialize ipmidetect handle */ static void _initialize_handle (ipmidetect_t handle) { handle->magic = IPMIDETECT_MAGIC_NUM; handle->load_state = IPMIDETECT_LOAD_STATE_UNLOADED; handle->detected_nodes = NULL; handle->undetected_nodes = NULL; } ipmidetect_t ipmidetect_handle_create () { ipmidetect_t handle; if (!(handle = (ipmidetect_t)malloc (sizeof (struct ipmidetect)))) return (NULL); _initialize_handle (handle); handle->errnum = IPMIDETECT_ERR_SUCCESS; return (handle); } /* * _free_handle_data * * free ipmidetect handle data */ static void _free_handle_data (ipmidetect_t handle) { fi_hostlist_destroy (handle->detected_nodes); fi_hostlist_destroy (handle->undetected_nodes); _initialize_handle (handle); } int ipmidetect_handle_destroy (ipmidetect_t handle) { if (_ipmidetect_handle_error_check (handle) < 0) return (-1); _free_handle_data (handle); /* "clean" magic number */ handle->magic = ~IPMIDETECT_MAGIC_NUM; free (handle); return (0); } /* * _cb_hostnames * * callback function for configuration parsing of hostnames option. * * Returns -1 on error, 0 on success */ static int _cb_hostnames (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { struct ipmidetect_config *conf = option_ptr; unsigned int i; if (!option_ptr) { conffile_seterrnum (cf, CONFFILE_ERR_PARAMETERS); return (-1); } if (data->stringlist_len > IPMIDETECT_CONFIG_HOSTNAMES_MAX) return (-1); for (i = 0; i < data->stringlist_len; i++) { if (strlen (data->stringlist[i]) > IPMIDETECT_MAXHOSTNAMELEN) return (-1); strcpy (conf->hostnames[i], data->stringlist[i]); } conf->hostnames_len = data->stringlist_len; return (0); } /* * _read_conffile * * read and parse the ipmidetect configuration file * * Returns 0 on success, -1 on error */ static int _read_conffile (ipmidetect_t handle, struct ipmidetect_config *conf) { struct conffile_option options[] = { { "hostnames", CONFFILE_OPTION_LIST_STRING, -1, _cb_hostnames, 1, 0, &(conf->hostnames_flag), conf, 0}, { "port", CONFFILE_OPTION_INT, 0, conffile_int, 1, 0, &(conf->port_flag), &(conf->port), 0}, { "timeout_len", CONFFILE_OPTION_INT, 0, conffile_int, 1, 0, &(conf->timeout_len_flag), &(conf->timeout_len), 0}, }; conffile_t cf = NULL; int num, rv = -1; int legacy_file_loaded = 0; if (!(cf = conffile_handle_create ())) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } num = sizeof (options)/sizeof (struct conffile_option); /* Try legacy file first */ if (!conffile_parse (cf, IPMIDETECT_CONFIG_FILE_LEGACY, options, num, NULL, 0, 0)) legacy_file_loaded++; if (!legacy_file_loaded) { /* IPMIDETECT_CONFIG_FILE_DEFAULT defined in config.h */ if (conffile_parse (cf, IPMIDETECT_CONFIG_FILE_DEFAULT, options, num, NULL, 0, 0) < 0) { /* Not an error if the configuration file does not exist */ if (conffile_errnum (cf) != CONFFILE_ERR_EXIST) { int errnum = conffile_errnum (cf); if (CONFFILE_IS_PARSE_ERR (errnum)) handle->errnum = IPMIDETECT_ERR_CONF_PARSE; else if (errnum == CONFFILE_ERR_OUTMEM) handle->errnum = IPMIDETECT_ERR_OUT_OF_MEMORY; else handle->errnum = IPMIDETECT_ERR_CONF_INTERNAL; goto cleanup; } } } rv = 0; cleanup: conffile_handle_destroy (cf); return (rv); } static int _low_timeout_connect (ipmidetect_t handle, const char *hostname, int port, int connect_timeout) { int ret, old_flags, fd = -1; struct sockaddr *servaddr; socklen_t servaddr_len; struct sockaddr_in servaddr4; struct sockaddr_in6 servaddr6; struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; char port_str[IPMIDETECT_BUFLEN + 1]; int rv = -1; memset (port_str, '\0', IPMIDETECT_BUFLEN + 1); snprintf (port_str, IPMIDETECT_BUFLEN, "%d", port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_STREAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if (getaddrinfo (hostname, port_str, &ai_hints, &ai_res)) { handle->errnum = IPMIDETECT_ERR_HOSTNAME_INVALID; goto cleanup; } /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { memcpy (&servaddr4, ai->ai_addr, ai->ai_addrlen); servaddr = (struct sockaddr *)&(servaddr4); servaddr_len = sizeof (struct sockaddr_in); } else if (ai->ai_family == AF_INET6) { memcpy (&servaddr6, ai->ai_addr, ai->ai_addrlen); servaddr = (struct sockaddr *)&(servaddr6); servaddr_len = sizeof (struct sockaddr_in6); } else continue; if ((fd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } break; } if (!ai) { handle->errnum = IPMIDETECT_ERR_HOSTNAME_INVALID; goto cleanup; } if ((old_flags = fcntl (fd, F_GETFL, 0)) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } if (fcntl (fd, F_SETFL, old_flags | O_NONBLOCK) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } ret = connect (fd, servaddr, servaddr_len); if (ret < 0 && errno != EINPROGRESS) { handle->errnum = IPMIDETECT_ERR_CONNECT; goto cleanup; } else if (ret < 0 && errno == EINPROGRESS) { fd_set rset, wset; struct timeval tval; FD_ZERO (&rset); FD_SET (fd, &rset); FD_ZERO (&wset); FD_SET (fd, &wset); tval.tv_sec = connect_timeout; tval.tv_usec = 0; if ((ret = select (fd+1, &rset, &wset, NULL, &tval)) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } if (!ret) { handle->errnum = IPMIDETECT_ERR_CONNECT_TIMEOUT; goto cleanup; } else { if (FD_ISSET (fd, &rset) || FD_ISSET (fd, &wset)) { int error; socklen_t len; len = sizeof (int); if (getsockopt (fd, SOL_SOCKET, SO_ERROR, &error, &len) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } if (error != 0) { if (error == ECONNREFUSED) handle->errnum = IPMIDETECT_ERR_CONNECT; else if (error == ETIMEDOUT) handle->errnum = IPMIDETECT_ERR_CONNECT_TIMEOUT; else handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } /* else no error, connected within timeout length */ } else { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } } } /* reset flags */ if (fcntl (fd, F_SETFL, old_flags) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } rv = fd; cleanup: freeaddrinfo (ai_res); /* ignore potential error, error path */ if (rv < 0) close (fd); return (rv); } static int _get_data (ipmidetect_t handle, const char *hostname, int port, int timeout_len) { struct timeval tv; int fd, rv = -1; if ((fd = _low_timeout_connect (handle, hostname, port, IPMIDETECT_BACKEND_CONNECT_LEN)) < 0) goto cleanup; /* Call gettimeofday at the latest point right before getting data. */ if (gettimeofday (&tv, NULL) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } while (1) { char buf[IPMIDETECT_BUFLEN]; char hostname[IPMIDETECT_MAXHOSTNAMELEN+1]; unsigned long int localtime; int len, num, ret; if ((len = fd_read_line (fd, buf, IPMIDETECT_BUFLEN)) < 0) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } if (!len) break; num = sscanf (buf, "%s %lu\n", hostname, &localtime); if (num != 2) { handle->errnum = IPMIDETECT_ERR_INTERNAL; goto cleanup; } if (abs (localtime - tv.tv_sec) < timeout_len) ret = fi_hostlist_push (handle->detected_nodes, hostname); else ret = fi_hostlist_push (handle->undetected_nodes, hostname); if (!ret) { handle->errnum = IPMIDETECT_ERR_OUT_OF_MEMORY; goto cleanup; } } rv = 0; cleanup: /* ignore potential error, done w/ fd */ close (fd); return (rv); } int ipmidetect_load_data (ipmidetect_t handle, const char *hostname, int port, int timeout_len) { struct ipmidetect_config conffile_config; if (_unloaded_handle_error_check (handle) < 0) goto cleanup; memset (&conffile_config, '\0', sizeof (struct ipmidetect_config)); if (_read_conffile (handle, &conffile_config) < 0) goto cleanup; if (!(handle->detected_nodes = fi_hostlist_create (NULL))) { handle->errnum = IPMIDETECT_ERR_OUT_OF_MEMORY; goto cleanup; } if (!(handle->undetected_nodes = fi_hostlist_create (NULL))) { handle->errnum = IPMIDETECT_ERR_OUT_OF_MEMORY; goto cleanup; } handle->load_state = IPMIDETECT_LOAD_STATE_SETUP; if (port <= 0) { if (conffile_config.port_flag) { if (conffile_config.port <= 0) { handle->errnum = IPMIDETECT_ERR_CONF_INPUT; goto cleanup; } port = conffile_config.port; } else port = IPMIDETECT_PORT_DEFAULT; } if (timeout_len <= 0) { if (conffile_config.timeout_len_flag) { if (conffile_config.timeout_len <= 0) { handle->errnum = IPMIDETECT_ERR_CONF_INPUT; goto cleanup; } timeout_len = conffile_config.timeout_len; } else timeout_len = IPMIDETECT_TIMEOUT_LEN_DEFAULT; } if (conffile_config.hostnames_flag) { unsigned int i; for (i = 0; i < conffile_config.hostnames_len; i++) { if (strlen (conffile_config.hostnames[i]) > 0) { if (_get_data (handle, hostname, port, timeout_len) < 0) continue; else break; } } if (i >= conffile_config.hostnames_len) { handle->errnum = IPMIDETECT_ERR_CONNECT; goto cleanup; } } else { char *hostPtr; if (hostname) hostPtr = (char *)hostname; else hostPtr = "localhost"; if (_get_data (handle, hostPtr, port, timeout_len) < 0) goto cleanup; } fi_hostlist_sort (handle->detected_nodes); fi_hostlist_sort (handle->undetected_nodes); /* loading complete */ handle->load_state = IPMIDETECT_LOAD_STATE_LOADED; handle->errnum = IPMIDETECT_ERR_SUCCESS; return (0); cleanup: _free_handle_data (handle); return (-1); } int ipmidetect_errnum (ipmidetect_t handle) { if (!handle) return (IPMIDETECT_ERR_HANDLE_NULL); else if (handle->magic != IPMIDETECT_MAGIC_NUM) return (IPMIDETECT_ERR_HANDLE_INVALID); return (handle->errnum); } char * ipmidetect_strerror (int errnum) { if (errnum < IPMIDETECT_ERR_SUCCESS || errnum > IPMIDETECT_ERR_ERRNUMRANGE) return (ipmidetect_errmsg[IPMIDETECT_ERR_ERRNUMRANGE]); return (ipmidetect_errmsg[errnum]); } char * ipmidetect_errormsg (ipmidetect_t handle) { return (ipmidetect_strerror (ipmidetect_errnum (handle))); } void ipmidetect_perror (ipmidetect_t handle, const char *msg) { char *errormsg = ipmidetect_strerror (ipmidetect_errnum (handle)); if (!msg) fprintf (stderr, "%s\n", errormsg); else fprintf (stderr, "%s: %s\n", msg, errormsg); } /* * _get_nodes_string * * common function for ipmidetect_get_detected_nodes_string and * ipmidetect_get_undetected_nodes_string * * Returns 0 on success, -1 on error */ static int _get_nodes_string (ipmidetect_t handle, char *buf, int buflen, int which) { fi_hostlist_t hl; if (_loaded_handle_error_check (handle) < 0) return (-1); if (!buf || buflen <= 0) { handle->errnum = IPMIDETECT_ERR_PARAMETERS; return (-1); } if (which == IPMIDETECT_DETECTED_NODES) hl = handle->detected_nodes; else hl = handle->undetected_nodes; if (fi_hostlist_ranged_string (hl, buflen, buf) < 0) { handle->errnum = IPMIDETECT_ERR_OVERFLOW; return (-1); } handle->errnum = IPMIDETECT_ERR_SUCCESS; return (0); } int ipmidetect_get_detected_nodes_string (ipmidetect_t handle, char *buf, int buflen) { return (_get_nodes_string (handle, buf, buflen, IPMIDETECT_DETECTED_NODES)); } int ipmidetect_get_undetected_nodes_string (ipmidetect_t handle, char *buf, int buflen) { return (_get_nodes_string (handle, buf, buflen, IPMIDETECT_UNDETECTED_NODES)); } /* * _is_node * * common function for ipmidetect_is_node_detected and * ipmidetect_is_node_undetected * * Returns bool on success, -1 on error */ static int _is_node (ipmidetect_t handle, const char *node, int which) { int temp, rv = -1; if (_loaded_handle_error_check (handle) < 0) return (-1); if (!node) { handle->errnum = IPMIDETECT_ERR_PARAMETERS; return (-1); } if (fi_hostlist_find (handle->detected_nodes, node) < 0 && fi_hostlist_find (handle->undetected_nodes, node) < 0) { handle->errnum = IPMIDETECT_ERR_NOTFOUND; return (-1); } if (which == IPMIDETECT_DETECTED_NODES) temp = fi_hostlist_find (handle->detected_nodes, node); else temp = fi_hostlist_find (handle->undetected_nodes, node); if (temp != -1) rv = 1; else rv = 0; handle->errnum = IPMIDETECT_ERR_SUCCESS; return (rv); } int ipmidetect_is_node_detected (ipmidetect_t handle, const char *node) { return (_is_node (handle, node, IPMIDETECT_DETECTED_NODES)); } int ipmidetect_is_node_undetected (ipmidetect_t handle, const char *node) { return (_is_node (handle, node, IPMIDETECT_UNDETECTED_NODES)); } freeipmi-1.6.4/libipmidetect/ipmidetect.map0000644002055400205540000000006013527331637020724 0ustar00achuachu00000000000000{ global: ipmidetect*; local: *; }; freeipmi-1.6.4/man/0000755002055400205540000000000013527342545014037 5ustar00achuachu00000000000000freeipmi-1.6.4/man/Makefile.in0000644002055400205540000010450113527342446016105 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = man DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(srcdir)/bmc-device.8.pre.in $(srcdir)/bmc-info.8.pre.in \ $(srcdir)/bmc-watchdog.8.pre.in \ $(srcdir)/freeipmi.conf.5.pre.in $(srcdir)/freeipmi.7.pre.in \ $(srcdir)/ipmi-chassis.8.pre.in $(srcdir)/ipmi-config.8.pre.in \ $(srcdir)/ipmi-config.conf.5.pre.in \ $(srcdir)/ipmi-dcmi.8.pre.in $(srcdir)/ipmi-fru.8.pre.in \ $(srcdir)/ipmi-locate.8.pre.in $(srcdir)/ipmi-oem.8.pre.in \ $(srcdir)/ipmi-pet.8.pre.in $(srcdir)/ipmi-raw.8.pre.in \ $(srcdir)/ipmi-sel.8.pre.in $(srcdir)/ipmi-sensors.8.pre.in \ $(srcdir)/ipmiconsole.8.pre.in $(srcdir)/ipmidetect.8.pre.in \ $(srcdir)/ipmidetect.conf.5.pre.in \ $(srcdir)/ipmidetectd.8.pre.in \ $(srcdir)/ipmidetectd.conf.5.pre.in \ $(srcdir)/ipmiping.8.pre.in $(srcdir)/ipmipower.8.pre.in \ $(srcdir)/ipmiseld.8.pre.in $(srcdir)/ipmiseld.conf.5.pre.in \ $(srcdir)/libfreeipmi.3.pre.in \ $(srcdir)/freeipmi_interpret_sensor.conf.5.pre.in \ $(srcdir)/freeipmi_interpret_sel.conf.5.pre.in \ $(srcdir)/libipmiconsole.3.pre.in \ $(srcdir)/libipmiconsole.conf.5.pre.in \ $(srcdir)/libipmidetect.3.pre.in \ $(srcdir)/libipmimonitoring.3.pre.in \ $(srcdir)/rmcpping.8.pre.in ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = bmc-device.8.pre bmc-info.8.pre \ bmc-watchdog.8.pre freeipmi.conf.5.pre freeipmi.7.pre \ ipmi-chassis.8.pre ipmi-config.8.pre ipmi-config.conf.5.pre \ ipmi-dcmi.8.pre ipmi-fru.8.pre ipmi-locate.8.pre \ ipmi-oem.8.pre ipmi-pet.8.pre ipmi-raw.8.pre ipmi-sel.8.pre \ ipmi-sensors.8.pre ipmiconsole.8.pre ipmidetect.8.pre \ ipmidetect.conf.5.pre ipmidetectd.8.pre ipmidetectd.conf.5.pre \ ipmiping.8.pre ipmipower.8.pre ipmiseld.8.pre \ ipmiseld.conf.5.pre libfreeipmi.3.pre \ freeipmi_interpret_sensor.conf.5.pre \ freeipmi_interpret_sel.conf.5.pre libipmiconsole.3.pre \ libipmiconsole.conf.5.pre libipmidetect.3.pre \ libipmimonitoring.3.pre rmcpping.8.pre CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } man3dir = $(mandir)/man3 am__installdirs = "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" \ "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)" man5dir = $(mandir)/man5 man7dir = $(mandir)/man7 man8dir = $(mandir)/man8 NROFF = nroff MANS = $(man3_MANS) $(man5_MANS) $(man7_MANS) $(man8_MANS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ man3_MANS = \ libipmiconsole.3 \ libipmidetect.3 \ libfreeipmi.3 \ libipmimonitoring.3 man5_MANS = \ bmc-config.conf.5 \ freeipmi.conf.5 \ freeipmi_interpret_sel.conf.5 \ freeipmi_interpret_sensor.conf.5 \ ipmi-config.conf.5 \ ipmiconsole.conf.5 \ ipmidetect.conf.5 \ ipmidetectd.conf.5 \ ipmipower.conf.5 \ ipmimonitoring_sensors.conf.5 \ ipmimonitoring.conf.5 \ ipmiseld.conf.5 \ ipmi_monitoring_sensors.conf.5 \ libipmiconsole.conf.5 \ libipmimonitoring.conf.5 man7_MANS = \ freeipmi.7 man8_MANS = \ bmc-config.8 \ bmc-device.8 \ bmc-info.8 \ bmc-watchdog.8 \ ipmi-chassis.8 \ ipmi-chassis-config.8 \ ipmi-config.8 \ ipmi-dcmi.8 \ ipmi-fru.8 \ ipmi-locate.8 \ ipmi-oem.8 \ ipmi-pef-config.8 \ ipmi-pet.8 \ ipmi-raw.8 \ ipmi-sel.8 \ ipmi-sensors.8 \ ipmi-sensors-config.8 \ ipmiconsole.8 \ ipmidetect.8 \ ipmidetectd.8 \ ipmiping.8 \ ipmipower.8 \ ipmiseld.8 \ rmcpping.8 \ ipmi-console.8 \ ipmi-detect.8 \ ipmi-ping.8 \ ipmi-power.8 \ ipmimonitoring.8 \ pef-config.8 \ rmcp-ping.8 MANS_CPP = \ bmc-device.8 \ bmc-info.8 \ bmc-watchdog.8 \ ipmi-chassis.8 \ ipmi-config.8 \ ipmi-config.conf.5 \ ipmi-dcmi.8 \ ipmi-fru.8 \ ipmi-locate.8 \ ipmi-oem.8 \ ipmi-pet.8 \ ipmi-raw.8 \ ipmi-sel.8 \ ipmi-sensors.8 \ ipmiconsole.8 \ ipmidetect.8 \ ipmidetect.conf.5 \ ipmidetectd.8 \ ipmidetectd.conf.5 \ ipmiping.8 \ ipmipower.8 \ ipmiseld.8 \ ipmiseld.conf.5 \ freeipmi.7 \ freeipmi.conf.5 \ freeipmi_interpret_sel.conf.5 \ freeipmi_interpret_sensor.conf.5 \ libipmiconsole.3 \ libipmiconsole.conf.5 \ libipmidetect.3 \ libfreeipmi.3 \ libipmimonitoring.3 \ rmcpping.8 MANS_NOCPP = \ bmc-config.8 \ bmc-config.conf.5 \ ipmi-chassis-config.8 \ ipmi-console.8 \ ipmi-detect.8 \ ipmi-pef-config.8 \ ipmi-ping.8 \ ipmi-power.8 \ ipmi-sensors-config.8 \ ipmiconsole.conf.5 \ ipmipower.conf.5 \ ipmimonitoring.8 \ ipmimonitoring_sensors.conf.5 \ ipmimonitoring.conf.5 \ ipmi_monitoring_sensors.conf.5 \ libipmimonitoring.conf.5 \ pef-config.8 \ rmcp-ping.8 MANS_COMMON = \ manpage-common-general-options-header.man \ manpage-common-driver.man \ manpage-common-inband.man \ manpage-common-outofband-hostname.man \ manpage-common-outofband-hostname-hostranged.man \ manpage-common-outofband-username-user.man \ manpage-common-outofband-username-operator.man \ manpage-common-outofband-username-admin.man \ manpage-common-outofband-password.man \ manpage-common-outofband-k-g.man \ manpage-common-outofband-session-timeout.man \ manpage-common-outofband-retransmission-timeout.man \ manpage-common-authentication-type.man \ manpage-common-cipher-suite-id-main.man \ manpage-common-cipher-suite-id-details.man \ manpage-common-privilege-level-user.man \ manpage-common-privilege-level-operator.man \ manpage-common-privilege-level-admin.man \ manpage-common-config-file.man \ manpage-common-workaround-flags.man \ manpage-common-workaround-extra-text.man \ manpage-common-workaround-heading-text.man \ manpage-common-workaround-inband-text.man \ manpage-common-workaround-outofband-common-text.man \ manpage-common-workaround-outofband-15-text.man \ manpage-common-workaround-outofband-20-text.man \ manpage-common-workaround-sdr-text.man \ manpage-common-workaround-config-tool.man \ manpage-common-debug.man \ manpage-common-misc.man \ manpage-common-hostranged-options-header.man \ manpage-common-hostranged-buffer.man \ manpage-common-hostranged-consolidate.man \ manpage-common-hostranged-fanout.man \ manpage-common-hostranged-eliminate.man \ manpage-common-hostranged-always-prefix.man \ manpage-common-hostranged-text-main.man \ manpage-common-hostranged-text-options.man \ manpage-common-hostranged-text-localhost.man \ manpage-common-hostranged-text-threads.man \ manpage-common-time-options-heading.man \ manpage-common-time-options.man \ manpage-common-sdr-cache-options-heading.man \ manpage-common-sdr-cache-options.man \ manpage-common-sdr-cache-file-directory.man \ manpage-common-sdr-cache-ignore.man \ manpage-common-troubleshooting-heading-end.man \ manpage-common-troubleshooting-heading-inband.man \ manpage-common-troubleshooting-heading-outofband.man \ manpage-common-troubleshooting-heading-start.man \ manpage-common-troubleshooting-inband.man \ manpage-common-troubleshooting-outofband.man \ manpage-common-troubleshooting-inband-outofband.man \ manpage-common-troubleshooting-sel.man \ manpage-common-diagnostics.man \ manpage-common-diagnostics-hostranged-text.man \ manpage-common-known-issues.man \ manpage-common-known-issues-ping.man \ manpage-common-reporting-bugs.man \ manpage-common-gpl-library-text.man \ manpage-common-gpl-program-text.man \ manpage-common-gpl-freeipmi-text.man \ manpage-common-ping-options.man \ manpage-common-ping-origin.man \ manpage-common-table-of-contents.man \ manpage-common-homepage.man \ manpage-common-interpret-oem-data.man \ manpage-common-oem-interpretation.man \ manpage-common-entity-sensor-names.man \ manpage-common-no-sensor-type-output.man \ manpage-common-comma-separated-output.man \ manpage-common-no-header-output.man \ manpage-common-non-abbreviated-units.man \ manpage-common-legacy-output.man CLEANFILES = $(MANS_CPP) *~ DISTCLEANFILES = $(MANS_CPP) $(MANS_CPP:%=%.pre) .deps/*.P EXTRA_DIST = \ $(MANS_COMMON) \ $(MANS_NOCPP) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu man/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu man/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): bmc-device.8.pre: $(top_builddir)/config.status $(srcdir)/bmc-device.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ bmc-info.8.pre: $(top_builddir)/config.status $(srcdir)/bmc-info.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ bmc-watchdog.8.pre: $(top_builddir)/config.status $(srcdir)/bmc-watchdog.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ freeipmi.conf.5.pre: $(top_builddir)/config.status $(srcdir)/freeipmi.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ freeipmi.7.pre: $(top_builddir)/config.status $(srcdir)/freeipmi.7.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-chassis.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-chassis.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-config.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-config.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-config.conf.5.pre: $(top_builddir)/config.status $(srcdir)/ipmi-config.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-dcmi.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-dcmi.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-fru.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-fru.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-locate.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-locate.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-oem.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-oem.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-pet.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-pet.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-raw.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-raw.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-sel.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-sel.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmi-sensors.8.pre: $(top_builddir)/config.status $(srcdir)/ipmi-sensors.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmiconsole.8.pre: $(top_builddir)/config.status $(srcdir)/ipmiconsole.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmidetect.8.pre: $(top_builddir)/config.status $(srcdir)/ipmidetect.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmidetect.conf.5.pre: $(top_builddir)/config.status $(srcdir)/ipmidetect.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmidetectd.8.pre: $(top_builddir)/config.status $(srcdir)/ipmidetectd.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmidetectd.conf.5.pre: $(top_builddir)/config.status $(srcdir)/ipmidetectd.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmiping.8.pre: $(top_builddir)/config.status $(srcdir)/ipmiping.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmipower.8.pre: $(top_builddir)/config.status $(srcdir)/ipmipower.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmiseld.8.pre: $(top_builddir)/config.status $(srcdir)/ipmiseld.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ ipmiseld.conf.5.pre: $(top_builddir)/config.status $(srcdir)/ipmiseld.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libfreeipmi.3.pre: $(top_builddir)/config.status $(srcdir)/libfreeipmi.3.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ freeipmi_interpret_sensor.conf.5.pre: $(top_builddir)/config.status $(srcdir)/freeipmi_interpret_sensor.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ freeipmi_interpret_sel.conf.5.pre: $(top_builddir)/config.status $(srcdir)/freeipmi_interpret_sel.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmiconsole.3.pre: $(top_builddir)/config.status $(srcdir)/libipmiconsole.3.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmiconsole.conf.5.pre: $(top_builddir)/config.status $(srcdir)/libipmiconsole.conf.5.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmidetect.3.pre: $(top_builddir)/config.status $(srcdir)/libipmidetect.3.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ libipmimonitoring.3.pre: $(top_builddir)/config.status $(srcdir)/libipmimonitoring.3.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ rmcpping.8.pre: $(top_builddir)/config.status $(srcdir)/rmcpping.8.pre.in cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-man3: $(man3_MANS) @$(NORMAL_INSTALL) @list1='$(man3_MANS)'; \ list2=''; \ test -n "$(man3dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man3dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man3dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.3[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man3dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man3dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man3dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man3dir)" || exit $$?; }; \ done; } uninstall-man3: @$(NORMAL_UNINSTALL) @list='$(man3_MANS)'; test -n "$(man3dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^3][0-9a-z]*$$,3,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man3dir)'; $(am__uninstall_files_from_dir) install-man5: $(man5_MANS) @$(NORMAL_INSTALL) @list1='$(man5_MANS)'; \ list2=''; \ test -n "$(man5dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man5dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man5dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.5[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man5dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man5dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man5dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man5dir)" || exit $$?; }; \ done; } uninstall-man5: @$(NORMAL_UNINSTALL) @list='$(man5_MANS)'; test -n "$(man5dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^5][0-9a-z]*$$,5,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man5dir)'; $(am__uninstall_files_from_dir) install-man7: $(man7_MANS) @$(NORMAL_INSTALL) @list1='$(man7_MANS)'; \ list2=''; \ test -n "$(man7dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man7dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man7dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.7[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man7dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man7dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man7dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man7dir)" || exit $$?; }; \ done; } uninstall-man7: @$(NORMAL_UNINSTALL) @list='$(man7_MANS)'; test -n "$(man7dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^7][0-9a-z]*$$,7,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man7dir)'; $(am__uninstall_files_from_dir) install-man8: $(man8_MANS) @$(NORMAL_INSTALL) @list1='$(man8_MANS)'; \ list2=''; \ test -n "$(man8dir)" \ && test -n "`echo $$list1$$list2`" \ || exit 0; \ echo " $(MKDIR_P) '$(DESTDIR)$(man8dir)'"; \ $(MKDIR_P) "$(DESTDIR)$(man8dir)" || exit 1; \ { for i in $$list1; do echo "$$i"; done; \ if test -n "$$list2"; then \ for i in $$list2; do echo "$$i"; done \ | sed -n '/\.8[a-z]*$$/p'; \ fi; \ } | while read p; do \ if test -f $$p; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; echo "$$p"; \ done | \ sed -e 'n;s,.*/,,;p;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,' | \ sed 'N;N;s,\n, ,g' | { \ list=; while read file base inst; do \ if test "$$base" = "$$inst"; then list="$$list $$file"; else \ echo " $(INSTALL_DATA) '$$file' '$(DESTDIR)$(man8dir)/$$inst'"; \ $(INSTALL_DATA) "$$file" "$(DESTDIR)$(man8dir)/$$inst" || exit $$?; \ fi; \ done; \ for i in $$list; do echo "$$i"; done | $(am__base_list) | \ while read files; do \ test -z "$$files" || { \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(man8dir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(man8dir)" || exit $$?; }; \ done; } uninstall-man8: @$(NORMAL_UNINSTALL) @list='$(man8_MANS)'; test -n "$(man8dir)" || exit 0; \ files=`{ for i in $$list; do echo "$$i"; done; \ } | sed -e 's,.*/,,;h;s,.*\.,,;s,^[^8][0-9a-z]*$$,8,;x' \ -e 's,\.[0-9a-z]*$$,,;$(transform);G;s,\n,.,'`; \ dir='$(DESTDIR)$(man8dir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(MANS) installdirs: for dir in "$(DESTDIR)$(man3dir)" "$(DESTDIR)$(man5dir)" "$(DESTDIR)$(man7dir)" "$(DESTDIR)$(man8dir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) -test -z "$(DISTCLEANFILES)" || rm -f $(DISTCLEANFILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-man install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-man3 install-man5 install-man7 install-man8 install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-man uninstall-man: uninstall-man3 uninstall-man5 uninstall-man7 \ uninstall-man8 .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am install-html \ install-html-am install-info install-info-am install-man \ install-man3 install-man5 install-man7 install-man8 \ install-pdf install-pdf-am install-ps install-ps-am \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags-am uninstall uninstall-am uninstall-man uninstall-man3 \ uninstall-man5 uninstall-man7 uninstall-man8 $(MANS_CPP): $(MANS_CPP:%=%.pre) $(CPP_FOR_BUILD) -nostdinc -w -C -P -I$(top_srcdir)/man $@.pre $@ # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/man/Makefile.am0000644002055400205540000001254713527331637016104 0ustar00achuachu00000000000000man3_MANS = \ libipmiconsole.3 \ libipmidetect.3 \ libfreeipmi.3 \ libipmimonitoring.3 man5_MANS = \ bmc-config.conf.5 \ freeipmi.conf.5 \ freeipmi_interpret_sel.conf.5 \ freeipmi_interpret_sensor.conf.5 \ ipmi-config.conf.5 \ ipmiconsole.conf.5 \ ipmidetect.conf.5 \ ipmidetectd.conf.5 \ ipmipower.conf.5 \ ipmimonitoring_sensors.conf.5 \ ipmimonitoring.conf.5 \ ipmiseld.conf.5 \ ipmi_monitoring_sensors.conf.5 \ libipmiconsole.conf.5 \ libipmimonitoring.conf.5 man7_MANS = \ freeipmi.7 man8_MANS = \ bmc-config.8 \ bmc-device.8 \ bmc-info.8 \ bmc-watchdog.8 \ ipmi-chassis.8 \ ipmi-chassis-config.8 \ ipmi-config.8 \ ipmi-dcmi.8 \ ipmi-fru.8 \ ipmi-locate.8 \ ipmi-oem.8 \ ipmi-pef-config.8 \ ipmi-pet.8 \ ipmi-raw.8 \ ipmi-sel.8 \ ipmi-sensors.8 \ ipmi-sensors-config.8 \ ipmiconsole.8 \ ipmidetect.8 \ ipmidetectd.8 \ ipmiping.8 \ ipmipower.8 \ ipmiseld.8 \ rmcpping.8 \ ipmi-console.8 \ ipmi-detect.8 \ ipmi-ping.8 \ ipmi-power.8 \ ipmimonitoring.8 \ pef-config.8 \ rmcp-ping.8 MANS_CPP = \ bmc-device.8 \ bmc-info.8 \ bmc-watchdog.8 \ ipmi-chassis.8 \ ipmi-config.8 \ ipmi-config.conf.5 \ ipmi-dcmi.8 \ ipmi-fru.8 \ ipmi-locate.8 \ ipmi-oem.8 \ ipmi-pet.8 \ ipmi-raw.8 \ ipmi-sel.8 \ ipmi-sensors.8 \ ipmiconsole.8 \ ipmidetect.8 \ ipmidetect.conf.5 \ ipmidetectd.8 \ ipmidetectd.conf.5 \ ipmiping.8 \ ipmipower.8 \ ipmiseld.8 \ ipmiseld.conf.5 \ freeipmi.7 \ freeipmi.conf.5 \ freeipmi_interpret_sel.conf.5 \ freeipmi_interpret_sensor.conf.5 \ libipmiconsole.3 \ libipmiconsole.conf.5 \ libipmidetect.3 \ libfreeipmi.3 \ libipmimonitoring.3 \ rmcpping.8 MANS_NOCPP = \ bmc-config.8 \ bmc-config.conf.5 \ ipmi-chassis-config.8 \ ipmi-console.8 \ ipmi-detect.8 \ ipmi-pef-config.8 \ ipmi-ping.8 \ ipmi-power.8 \ ipmi-sensors-config.8 \ ipmiconsole.conf.5 \ ipmipower.conf.5 \ ipmimonitoring.8 \ ipmimonitoring_sensors.conf.5 \ ipmimonitoring.conf.5 \ ipmi_monitoring_sensors.conf.5 \ libipmimonitoring.conf.5 \ pef-config.8 \ rmcp-ping.8 MANS_COMMON = \ manpage-common-general-options-header.man \ manpage-common-driver.man \ manpage-common-inband.man \ manpage-common-outofband-hostname.man \ manpage-common-outofband-hostname-hostranged.man \ manpage-common-outofband-username-user.man \ manpage-common-outofband-username-operator.man \ manpage-common-outofband-username-admin.man \ manpage-common-outofband-password.man \ manpage-common-outofband-k-g.man \ manpage-common-outofband-session-timeout.man \ manpage-common-outofband-retransmission-timeout.man \ manpage-common-authentication-type.man \ manpage-common-cipher-suite-id-main.man \ manpage-common-cipher-suite-id-details.man \ manpage-common-privilege-level-user.man \ manpage-common-privilege-level-operator.man \ manpage-common-privilege-level-admin.man \ manpage-common-config-file.man \ manpage-common-workaround-flags.man \ manpage-common-workaround-extra-text.man \ manpage-common-workaround-heading-text.man \ manpage-common-workaround-inband-text.man \ manpage-common-workaround-outofband-common-text.man \ manpage-common-workaround-outofband-15-text.man \ manpage-common-workaround-outofband-20-text.man \ manpage-common-workaround-sdr-text.man \ manpage-common-workaround-config-tool.man \ manpage-common-debug.man \ manpage-common-misc.man \ manpage-common-hostranged-options-header.man \ manpage-common-hostranged-buffer.man \ manpage-common-hostranged-consolidate.man \ manpage-common-hostranged-fanout.man \ manpage-common-hostranged-eliminate.man \ manpage-common-hostranged-always-prefix.man \ manpage-common-hostranged-text-main.man \ manpage-common-hostranged-text-options.man \ manpage-common-hostranged-text-localhost.man \ manpage-common-hostranged-text-threads.man \ manpage-common-time-options-heading.man \ manpage-common-time-options.man \ manpage-common-sdr-cache-options-heading.man \ manpage-common-sdr-cache-options.man \ manpage-common-sdr-cache-file-directory.man \ manpage-common-sdr-cache-ignore.man \ manpage-common-troubleshooting-heading-end.man \ manpage-common-troubleshooting-heading-inband.man \ manpage-common-troubleshooting-heading-outofband.man \ manpage-common-troubleshooting-heading-start.man \ manpage-common-troubleshooting-inband.man \ manpage-common-troubleshooting-outofband.man \ manpage-common-troubleshooting-inband-outofband.man \ manpage-common-troubleshooting-sel.man \ manpage-common-diagnostics.man \ manpage-common-diagnostics-hostranged-text.man \ manpage-common-known-issues.man \ manpage-common-known-issues-ping.man \ manpage-common-reporting-bugs.man \ manpage-common-gpl-library-text.man \ manpage-common-gpl-program-text.man \ manpage-common-gpl-freeipmi-text.man \ manpage-common-ping-options.man \ manpage-common-ping-origin.man \ manpage-common-table-of-contents.man \ manpage-common-homepage.man \ manpage-common-interpret-oem-data.man \ manpage-common-oem-interpretation.man \ manpage-common-entity-sensor-names.man \ manpage-common-no-sensor-type-output.man \ manpage-common-comma-separated-output.man \ manpage-common-no-header-output.man \ manpage-common-non-abbreviated-units.man \ manpage-common-legacy-output.man $(MANS_CPP): $(MANS_CPP:%=%.pre) $(CPP_FOR_BUILD) -nostdinc -w -C -P -I$(top_srcdir)/man $@.pre $@ CLEANFILES = $(MANS_CPP) *~ DISTCLEANFILES = $(MANS_CPP) $(MANS_CPP:%=%.pre) .deps/*.P EXTRA_DIST = \ $(MANS_COMMON) \ $(MANS_NOCPP)freeipmi-1.6.4/man/bmc-device.8.pre.in0000644002055400205540000002504313527331637017324 0ustar00achuachu00000000000000.TH BMC-DEVICE 8 "@ISODATE@" "bmc-device @PACKAGE_VERSION@" "System Commands" .SH "NAME" bmc-device \- perform advanced BMC commands .SH "SYNOPSIS" .B bmc-device [\fIOPTION\fR...] .SH "DESCRIPTION" .B bmc-device supports a variety of IPMI commands to perform advanced BMC functions. This tool is primarily used for development debugging, BMC error recovery, retrieving detailed technical information, and other advanced purposes. Most IPMI users will not need to use this tool. Some of the .B bmc-device commands are not supported on all motherboards. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-user.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "BMC-DEVICE OPTIONS" The following options are specific to .B bmc-device. .TP \fB\-\-cold\-reset\fR Perform a cold reset. .TP \fB\-\-warm\-reset\fR Perform a warm reset. .TP \fB\-\-get\-self\-test\-results\fR Output BMC self test results. .TP \fB\-\-get\-acpi\-power\-state\fR Get ACPI system and device power state. .TP \fB\-\-set\-acpi\-power\-state\fR Set ACPI power state. Must be specified to use the \fB\-\-set\-acpi\-system\-power\-state\fR, and \fB\-\-set\-acpi\-device\-power\-state\fR options listed below. .TP \fB\-\-set\-acpi\-system\-power\-state\fR=\fISYSTEM_POWER_STATE\fR Set ACPI system power state. Allowed values: S0_G0, S1, S2, S3, S4, S5_G2, S4_S5, G3, SLEEPING, G1_SLEEPING, OVERRIDE, LEGACY_ON, LEGACY_OFF, UNKNOWN. Used with the \fB\-\-set\-acpi\-power\-state\fR option. .TP \fB\-\-set\-acpi\-device\-power\-state\fR=\fIDEVICE_POWER_STATE\fR Set ACPI device power state. Allowed values: D0, D1, D2, D3, UNKNOWN. Used with the \fB\-\-set\-acpi\-power\-state\fR option. .TP \fB\-\-get\-lan\-statistics\fR Get IP, UDP, and RMCP statistics. .TP \fB\-\-clear\-lan\-statistics\fR Clear IP, UDP, and RMCP statistics. .TP \fB\-\-rearm\-sensor\fR=\fI" [ ]"\fR Re-arm a sensor. Re-arming a sensor informs the internal device to reset and re-evaluate a sensor reading and events. Most sensors are automatically re-armed, however a rare few do require manual re-arming. This option may also be useful to reset a sensor reading or event that may be stuck due to an internal hardware or firmware error. If the \fIassertion_bitmask\fR and \fIdeassertion_bitmask\fR are specified, only the specific events will be re-armed. If not specified, all possible events will be re-armed. This command requires the loading of the SDR. .TP \fB\-\-get\-sdr\-repository\-time\fR Get SDR repository time. .TP \fB\-\-set\-sdr\-repository\-time\fR=\fITIME\fR Set SDR repository time. Input format = "MM/DD/YYYY - HH:MM:SS". Note that hours are input in 24 hour form. Alternatively, the local system time can be specified with "now". .TP \fB\-\-get\-sel\-time\fR Get SEL time. .TP \fB\-\-set\-sel\-time\fR=\fITIME\fR Set SEL time. Input format = "MM/DD/YYYY - HH:MM:SS". Note that hours are input in 24 hour form. Alternatively, the local system time can be specified with "now". .TP \fB\-\-get\-sel\-time\-utc\-offset\fR Get SEL time UTC offset. .TP \fB\-\-set\-sel\-time\-utc\-offset\fR=\fIMINUTES\fR Set SEL time UTC offset. Input is in minutes difference from UTC time, ranging from -1440 to 1440 minutes. A special case value of "none" can be specified so no UTC offset is specified. .TP \fB\-\-platform\-event\fR=\fI"[generator_id] "\fR Instruct the BMC to process the specified event data. Typically, this data will be logged to the System Event Log (SEL), but depending on implementation it may be processed by other subsystems such as Platform Event Filtering (PEF). The keywords \fIassertion\fR or \fIdeassertion\fR may be used for \fIevent_direction\fR, or the numerical values may be used instead. The \fIevent_message_format_version\fR is 0x03 for IPMI 1.0 and 0x04 for IPMI 1.5. The \fIgenerator_id\fR above is optional, however it is required if generating the event via a system interface (i.e. inband). If generating the event via a system interface, the system management software generator id range is 0x41 to 6Fh. .TP \fB\-\-set\-sensor\-reading\-and\-event\-status\fR=\fI" "\fR Instruct the BMC to set a sensor reading and/or event status. How the various fields are written depends on a set of operation instructions specified. The \fIsensor_reading\fR can be written or not changed with the respective operation \fIwrite\fR and \fInochange\fR. For the \fIassertion_bitmask\fR and \fIdeassertion_bitmask\fR, the 0 bits of the bitmask can clear the bits of the status, the 1 bits of the bitmask can set the bits of the status, the entire bitmask can be written as the status, or the status cannot be changed respecitvely with the respective operations \fIclear0bits\fR, \fIset1bits\fR, \fIwrite\fR, and \fInochange\fR. The \fIevent_data1\fR byte can be written fully, written without the event offset (bits 3:0), or not be changed via the \fIwrite\fR, \fInooffsetwrite\fR, or \fInochange\fR operations. .TP \fB\-\-get\-mca\-auxiliary\-log\-status\fR Get machine check architecture (MCA) auxiliary log status information. .TP \fB\-\-get\-ssif\-interface\-capabilities\fR Get SSIF interface capabilities. .TP \fB\-\-get\-kcs\-interface\-capabilities\fR Get KCS interface capabilities. .TP \fB\-\-get\-bt\-interface\-capabilities\fR Get BT interface capabilities. .TP \fB\-\-get\-bmc\-global\-enables\fR Get BMC Global Enables. .TP \fB\-\-set\-system\-firmware\-version\fR=\fISTRING\fR Set System Firmware Version. .TP \fB\-\-set\-system\-name\fR=\fISTRING\fR Set System Name. .TP \fB\-\-set\-primary\-operating\-system\-name\fR=\fISTRING\fR Set Primary Operating System Name. .TP \fB\-\-set\-operating\-system\-name\fR=\fISTRING\fR Set Operating System Name. .TP \fB\-\-set\-present\-os\-version\-number\fR=\fISTRING\fR Set Present OS Version Number. .TP \fB\-\-set\-bmc\-url\fR=\fISTRING\fR Set BMC URL. .TP \fB\-\-set\-base\-os\-hypervisor\-url\fR=\fISTRING\fR Set Base OS/Hypervisor URL. .TP \fB\-\-read\-fru\fR=\fIFILENAME\fR Read the contents of a FRU device ID and store it in the specified file. Requires setting of a device ID via \fI\-\-device\-id\. .TP \fB\-\-write\-fru\fR=\fIFILENAME\fR Write the contents of the specified file into a FRU device id. Requires setting of a device ID via \fI\-\-device\-id\. If \fI\-\-verbose\fR is specified, progress percent will also be output. .TP \fB\-\-device\-id\fR=\fIIDNUM\fR Specify a specific FRU device ID. For use with \fI\-\-read\-fru\fR and \fI\-\-write\-fru\fR. .TP \fB\-\-verbose\fR Increase verbosity in output. #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> .SH "EXAMPLES" .B # bmc-device --cold-reset .PP Perform a cold reset. .PP .B # bmc-device -h ahost -u myusername -p mypassword --cold-reset .PP Perform a cold reset of a remote machine using IPMI over LAN. .PP .B # bmc-device -h mycluster[0-127] -u myusername -p mypassword --cold-reset .PP Perform a cold reset across a cluster using IPMI over LAN. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2008-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/bmc-info.8.pre.in0000644002055400205540000001135713527331637017023 0ustar00achuachu00000000000000.TH BMC-INFO 8 "@ISODATE@" "bmc-info @PACKAGE_VERSION@" "System Commands" .SH "NAME" bmc-info \- display BMC information .SH "SYNOPSIS" .B bmc-info [\fIOPTION\fR...] .SH "DESCRIPTION" .B Bmc-info displays BMC information, such as device version numbers, device support, and globally unique IDs (guids). #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-user.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-user.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "BMC-INFO OPTIONS" The following options are specific to .B bmc-info. .TP \fB\-\-get\-device\-id\fR Display only device ID information. .TP \fB\-\-get\-device\-guid\fR Display only device guid. .TP \fB\-\-get\-system\-guid\fR Display only system guid. .TP \fB\-\-get\-system\-info\fR Display only system info. .TP \fB\-\-get\-channel\-info\fR Display only channel information. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> .LP \fIguidformat\fR - A number of vendors send the bytes of the GUID (such as the GUID in \fB\-\-get\-device\-guid\fR or \fB\-\-get\-system\-guid\fR) in an alternate format that aligns incorrectly with IPMI, but correctly with other standards. This workaround flag will instruct \fBbmc\-info\fR to read the GUID and output the GUID based on this common alternate format. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Dell Poweredge R610, Dell Poweredge R710, Intel SR870BN4/Tiger4 .SH "EXAMPLES" .B # bmc-info .PP Get BMC information of the local machine. .PP .B # bmc-info -h ahost -u myusername -p mypassword .PP Get BMC information of a remote machine using IPMI over LAN. .PP .B # bmc-info -h mycluster[0-127] -u myusername -p mypassword .PP Get BMC information across a cluster using IPMI over LAN. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7), ipmi-config(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/bmc-watchdog.8.pre.in0000644002055400205540000003112613527331637017664 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: bmc-watchdog.8.pre.in,v 1.30 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2004-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-155913 .\" .\" This file is part of Bmc-Watchdog, a base management controller (BMC) .\" watchdog timer management tool. For details, see http://www.llnl.gov/linux/. .\" .\" Bmc-Watchdog is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Bmc-Watchdog is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Bmc-Watchdog. If not, see . .\"############################################################################ .TH bmc-watchdog 8 "@ISODATE@" "bmc-watchdog @PACKAGE_VERSION@" "System Commands" .SH "NAME" bmc-watchdog \- BMC watchdog timer daemon and control utility .SH "SYNOPSIS" .B bmc-watchdog command [\fIOPTION\fR...] [\fICOMMAND_OPTIONS\fR...] .br .SH "DESCRIPTION" .B Bmc-watchdog controls a Baseboard Management Controller (BMC) watchdog timer. The .B bmc-watchdog tool typically executes as a cronjob or daemon to manage the watchdog timer. A user must be root in order to run .B bmc-watchdog. .LP Listed below are .B bmc-watchdog details, option details, examples, and known issues. For a general introduction to FreeIPMI please see .B freeipmi(7). .SH "BMC WATCHDOG DETAILS" A BMC watchdog timer is part of the Intelligent Platform Management Interface (IPMI) specification and is only available to BMCs that are compliant with IPMI. When a BMC watchdog timer is started, it begins counting down to zero from some positive number of seconds. When the timer hits zero, the timer will execute a pre-configured pre-timeout interrupt and/or timeout action. .LP In order to stop the pre-timeout interrupt or timeout action from being executed, the watchdog timer must be periodically reset back to its initial beginning value. .LP The BMC watchdog timer automatically stops itself when the machine is rebooted. Therefore, when a machine is brought up, the BMC watchdog timer must be setup again before it can be used. .LP Typically, a BMC watchdog timer is used to automatically reset a machine that has crashed. When the operating system first starts up, the BMC timer is set to its initial countdown value. At periodic intervals, when the operating system is functioning properly, the watchdog timer can be reset by the OS or a userspace program. Thus, the timer never counts down to zero. When the system crashes, the timer cannot be reset by the OS or userspace program. Eventually, the timer will countdown to zero and reset the machine. .LP See EXAMPLES below for examples of how .B bmc-watchdog is commonly used. .SH "COMMANDS" The following commands are available to .B bmc-watchdog. .TP \fB\-s\fR, \fB\-\-set\fR Set BMC Watchdog Configuration. BMC watchdog timer configuration values can be set using the set command options listed below under SET OPTIONS. If a particular configuration parameter is not specified on the command line, the current configuration of that parameter will not be changed. .TP \fB\-g\fR, \fB\-\-get\fR Get BMC Watchdog Configuration and State. The current configuration and state is printed to standard output. .TP \fB\-r\fR, \fB\-\-reset\fR Reset BMC Watchdog Timer. .TP \fB\-t\fR, \fB\-\-start\fR Start BMC Watchdog Timer. Does nothing if the timer is currently running. Identical to \fB\-\-reset\fR command when the timer is stopped with the exception of the start command options listed below under START OPTIONS. .TP \fB\-y\fR, \fB\-\-stop\fR Stop BMC Watchdog Timer. Stops the current timer. .TP \fB\-c\fR, \fB\-\-clear\fR Clear BMC Watchdog Configuration. Clears all configuration values for the watchdog timer, except for timer use, which is kept at its current value. .TP \fB\-d\fR, \fB\-\-daemon\fR Run .B bmc-watchdog as a daemon. Configurable BMC watchdog timer options are listed below under DAEMON OPTIONS. The configuration values are set once, then the daemon will reset the timer at specified periodic intervals. The daemon can be stopped using the \fB\-\-stop\fR command, \fB\-\-clear\fR command, or by setting the stop_timer flag on the \fB\-\-set\fR command. #include <@top_srcdir@/man/manpage-common-general-options-header.man> These options are generic and can be used by any command. .TP \fB\-D\fR \fIIPMIDRIVER\fR, \fB\-\-driver\-type\fR=\fIIPMIDRIVER\fR Specify the driver type to use instead of doing an auto selection. The currently available inband drivers are KCS, SSIF, OPENIPMI, SUNBMC, and INTELDCMI. #include <@top_srcdir@/man/manpage-common-inband.man> .TP \fB\-v\fR, \fB\-\-verbose\-logging\fR Increase verbosity of logging. .TP \fB\-n\fR, \fB\-\-no\-logging\fR Turns off all logging done by .B bmc-watchdog. #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "SET OPTIONS" The following options can be used by the set command to set or clear various BMC watchdog configuration parameters. .TP \fB\-u\fR \fIINT\fR, \fB\-\-timer\-use\fR=\fIINT\fR Set timer use. The timer use value can be set to one of the following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS OS, 5 = OEM. .TP \fB\-m\fR \fIINT\fR, \fB\-\-stop\-timer\fR=\fIINT\fR Set Stop Timer Flag. A flag value of 0 stops the current BMC watchdog timer. A value of 1 doesn't turn off the current watchdog timer. .TP \fB\-l\fR \fIINT\fR, \fB\-\-log\fR=\fIINT\fR Set Log Flag. A flag value of 0 turns logging on. A value of 1 turns logging off. .TP \fB\-a\fR \fIINT\fR, \fB\-\-timeout\-action\fR=\fIINT\fR Set timeout action. The timeout action can be set to one of the following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 = Power Cycle. .TP \fB\-p\fR \fIINT\fR, \fB\-\-pre\-timeout\-interrupt\fR=\fIINT\fR Set pre-timeout interrupt. The pre timeout interrupt can be set to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messaging Interrupt. .TP \fB\-z\fR \fISECONDS\fR, \fB\-\-pre-timeout-interval=\fISECONDS\fR Set pre-timeout interval in seconds. .TP \fB\-F\fR, \fB\-\-clear-bios-frb2\fR Clear BIOS FRB2 Timer Use Flag. .TP \fB\-P\fR, \fB\-\-clear-bios-post\fR Clear BIOS POST Timer Use Flag. .TP \fB\-L\fR, \fB\-\-clear-os-load\fR Clear OS Load Timer Use Flag. .TP \fB\-S\fR, \fB\-\-clear-sms-os\fR Clear SMS/OS Timer Use Flag. .TP \fB\-O\fR, \fB\-\-clear-oem\fR Clear OEM Timer Use Flag. .TP \fB\-i\fR \fISECONDS\fR, \fB\-\-initial\-countdown\fR=\fISECONDS\fR Set initial countdown in seconds. .TP \fB\-w\fR, \fB\-\-start\-after\-set\fR Start timer after set command if timer is stopped. This is typically used when .B bmc-watchdog is used as a cronjob. This can be used to automatically start the timer after it has been set the first time. .TP \fB\-x\fR, \fB\-\-reset\-after\-set\fR Reset timer after set command if timer is running. .TP \fB\-j\fR, \fB\-\-start\-if\-stopped\fR Don't execute set command if timer is stopped, just start timer. .TP \fB\-k\fR, \fB\-\-reset\-if\-running\fR Don't execute set command if timer is running, just reset timer. This is typically used when .B bmc-watchdog is used as a cronjob. This can be used to reset the timer after it has been initially started. .SH "START OPTIONS" The following options can be used by the start command. .TP \fB\-G\fR \fIINT\fR, \fB\-\-gratuitous\-arp\fR=\fIINT\fR Suspend or don't suspend gratuitous ARPs while the BMC timer is running. A flag value of 1 suspends gratuitous ARPs. A value of 0 will not suspend gratuitous ARPs. If this option is not specified, gratuitous ARPs will not be suspended. .TP \fB\-A\fR \fIINT\fR, \fB\-\-arp\-response\fR=\fIINT\fR Suspend or don't suspend BMC-generated ARP responses while the BMC timer is running. A flag value of 1 suspends ARP responses. A value of 0 will not suspend ARP responses. If this option is not specified, ARP responses will not be suspended. .SH "DAEMON OPTIONS" The following options can be used by the daemon command to set the initial BMC watchdog configuration parameters. .TP \fB\-u\fR \fIINT\fR, \fB\-\-timer\-use\fR=\fIINT\fR Set timer use. The timer use value can be set to one of the following: 1 = BIOS FRB2, 2 = BIOS POST, 3 = OS_LOAD, 4 = SMS OS, 5 = OEM. .TP \fB\-l\fR \fIINT\fR, \fB\-\-log\fR=\fIINT\fR Set Log Flag. A flag value of 0 turns logging on. A value of 1 turns logging off. .TP \fB\-a\fR \fIINT\fR, \fB\-\-timeout\-action\fR=\fIINT\fR Set timeout action. The timeout action can be set to one of the following: 0 = No action, 1 = Hard Reset, 2 = Power Down, 3 = Power Cycle. .TP \fB\-p\fR \fIINT\fR, \fB\-\-pre\-timeout\-interrupt\fR=\fIINT\fR Set pre-timeout interrupt. The pre timeout interrupt can be set to one of the following: 0 = None, 1 = SMI, 2 = NMI, 3 = Messaging Interrupt. .TP \fB\-z\fR \fISECONDS\fR, \fB\-\-pre-timeout\-interval\fR=\fISECONDS\fR Set pre-timeout interval in seconds. .TP \fB\-F\fR, \fB\-\-clear-bios-frb2\fR Clear BIOS FRB2 Timer Use Flag. .TP \fB\-P\fR, \fB\-\-clear-bios-post\fR Clear BIOS POST Timer Use Flag. .TP \fB\-L\fR, \fB\-\-clear-os-load\fR Clear OS Load Timer Use Flag. .TP \fB\-S\fR, \fB\-\-clear-sms-os\fR Clear SMS/OS Timer Use Flag. .TP \fB\-O\fR, \fB\-\-clear-oem\fR Clear OEM Timer Use Flag. .TP \fB\-i\fR \fISECONDS\fR, \fB\-\-initial\-countdown\fR=\fISECONDS\fR Set initial countdown in seconds. .TP \fB\-G\fR \fIINT\fR, \fB\-\-gratuitous\-arp\fR=\fIINT\fR Suspend or don't suspend gratuitous ARPs while the BMC timer is running. A flag value of 1 suspends gratuitous ARPs. A value of 0 will not suspend gratuitous ARPs. If this option is not specified, gratuitous ARPs will not be suspended. .TP \fB\-A\fR \fIINT\fR, \fB\-\-arp\-response\fR=\fIINT\fR Suspend or don't suspend BMC-generated ARP responses while the BMC timer is running. A flag value of 1 suspends ARP responses. A value of 0 will not suspend ARP responses. If this option is not specified, ARP responses will not be suspended. .TP \fB\-e\fR, \fB\-\-reset\-period\fR Time interval to wait before resetting timer. The default is 60 seconds. .SH "ERRORS" Errors are logged to syslog. #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> .LP \fIignorestateflag\fR - This workaround option will ignore the BMC timer state flag (indicating if the timer is running or stopped) when running in daemon mode. On some BMCs, the flag is broken and will never report that a BMC timer is running, even if it is. The workaround will take notice of changes in the countdown seconds to determine if a timer is running or stopped. With this type of implementation, the reset-period must be large enough to ensure minor fluctuations in the countdown will not affect the workaround. Due to the implementation of this workaround, if another process stops the watchdog timer, it may be detectable. This option is confirmed to work around compliances issues on Sun x4100, x4200, and x4500. .SH "EXAMPLES" .LP Setup a .B bmc-watchdog daemon that resets the machine after 15 minutes (900 seconds) if the OS has crashed (see default bmc-watchdog rc script /etc/init.d/bmc-watchdog for a more complete example): bmc-watchdog -d -u 4 -p 0 -a 1 -i 900 #include <@top_srcdir@/man/manpage-common-diagnostics.man> .SH "KNOWN ISSUES" .B Bmc-watchdog may fail to reset the watchdog timer if it is not scheduled properly. It is always recommended that .B bmc-watchdog be executed with a high scheduling priority. .LP On some machines, the hardware based SMI Handler may disable a processor after a watchdog timer timeout if the timer use is set to something other than SMS/OS. #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2004-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/freeipmi.conf.5.pre.in0000644002055400205540000012241713527331637020052 0ustar00achuachu00000000000000.TH FREEIPMI 5 "@ISODATE@" "FreeIPMI @PACKAGE_VERSION@" "Configuration" .SH "NAME" freeipmi.conf \- specify default values to FreeIPMI .SH "DESCRIPTION" The .B FreeIPMI configuration file can be used to set alternate default values to many .B FreeIPMI tools so values don't have to be configured on the command line. This allows users to avoid typing in a long list of command line options everytime a command is executed. It can also be used to hide usernames, passwords, and other sensitive information from the .B ps(1) command. .LP Currently, the tools that can be configured with the configuration file are: .B bmc-device(8), .B bmc-info(8), .B bmc-watchdog(8), .B ipmi-chassis(8), .B ipmi-config(8), .B ipmi-fru(8), .B ipmi-oem(8), .B ipmi-pet(8), .B ipmi-raw(8), .B ipmi-sel(8), .B ipmi-sensors(8), .B ipmiconsole(8), and .B ipmipower(8). .LP By default, the configuration file is stored at @FREEIPMI_CONFIG_FILE_DEFAULT@. But users may select a different configuration file at the command line with the --config-file option. .LP Values specified on the command line override the configuration values specified in the configuration file. .SH "FORMAT" The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .LP Note that it is possible to list the username, password and other potentially sensitive information in the configuration file. If this data is stored in a configuration file, system administrators should limit access to this file. .SH "GENERAL OPTIONS" The following options are options generally available to all tools, although specific options may be ignored by some. (For example, .B ipmiconsole(8) and .B ipmipower(8) do not perform in-band communication, therefore they would ignore in-band communication options. Similarly .B bmc-watchdog(8) does not perform out-of-band communication, therefore it would ignore all out-of-band options). .TP \fBdriver\-type\fR \fIIPMIDRIVER\fR Specify the default driver type to use. .TP \fBdisable\-auto\-probe\fR \fIENABLE|DISABLE\fR Specify if IPMI devices should be probed for default settings. .TP \fBdriver\-address\fR \fIDRIVER-ADDRESS\fR Specify the default in-band driver address to use. .TP \fBdriver\-device\fR \fIDEVICE\fR Specify the default in-band driver device path to use. .TP \fBregister\-spacing\fR \fIREGISTER\-SPACING\fR Specify the default in-band driver register spacing to use. .TP \fBtarget\-channel\-number\fR \fICHANNEL\-NUMBER\FR Specify the default in-band driver target channel number. .TP \fBtarget\-slave\-address\fR \fISLAVE\-ADDRESS\FR Specify the default in-band driver target slave address. .TP \fBusername\fR \fIUSERNAME\fR Specify the default username to use. .TP \fBpassword\fR \fIPASSWORD\fR Specify the default password to use. .TP \fBk_g\fR \fIstr\fR Specify the default BMC key (K_g) to use. Prefix with '0x' to enter the key in hex. .TP \fBsession\-timeout\fR \fIMILLISECONDS\fR Specify the default session timeout length to use in milliseconds. .TP \fBretransmission\-timeout\fR \fIMILLISECONDS\fR Specify the default retransmission timeout length to use in milliseconds. .TP \fBauthentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBcipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBprivilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBworkaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use. Multiple workarounds can be specified separated by whitespace. Please see tool manpages for details about available workarounds for each tool. The following workarounds are supported: assumeio, spinpoll, idzero, forcepermsg, unexpectedauth, endianseq, noauthcodecheck, authcap, nochecksumcheck, intel20, supermicro20, sun20, opensesspriv, integritycheckvalue, assumemaxsdrrecordcount, solpayloadsize, solport, solstatus, solchannelsupport, serialalertsdeferred, solpacketseq, skipchecks, assumesystemevent, discretereading, ignorescanningdisabled, assumebmcowner, ignoreauthcode, slowcommit, veryslowcommit, solchannelassumelanchannel, ignorestateflag, malformedack, guidformat, ipmiping. .SH "SDR OPTIONS" The following options are specific to tools that use the sensor data repository (SDR). They will be ignored by all other tools. .TP \fBquiet\-cache\fR \fIENABLE|DISABLE\fR Specify if cache creation/deletion information should not be output by default. .TP \fBsdr\-cache\-directory\fR \fIDIRECTORY\fR Specify the default sdr cache directory to use. .SH "TIME OPTIONS" The following options are specific to tools that may output time values. They will be ignored by all other tools. .TP \fButc\-to\-localtime\fR \fIENABLE|DISABLE\fR Specify if time should be converted from assumed UTC to localtime by default. .TP \fBlocaltime\-to\-utc\fR \fIENABLE|DISABLE\fR Specify if time should be converted from localtime to UTC by default. .TP \fButc\-offset\-fR \fISECONDS\fR Specify a default UTC offset to be added to timestamps. .SH "HOSTRANGED OPTIONS" The following options are specific to tools that support hostranged output. They will be ignored by all other tools. .TP \fBbuffer\-output\fR \fIENABLE|DISABLE\fR Specify if hostranged output should be buffered by default. .TP \fBconsolidate\-output\fR \fIENABLE|DISABLE\fR Specify if hostranged output should be consolidated by default. .TP \fBfanout\fR \fICOUNT\fR Specify the default multiple host fanout to use. .TP \fBeliminate\fR \fIENABLE|DISABLE\fR Specify if undetected hosts should be eliminated by default. .TP \fBalways\-prefix\fR \fIENABLE|DISABLE\fR Specify if output should be always prefixed by default. .SH "BMC-DEVICE OPTIONS" The following options are specific to .B bmc-device(8). They will be ignored by other tools. .TP \fBbmc\-device\-username\fR \fIUSERNAME\fR Specify the default username to use for .B bmc-device(8). If specified, will override the general option \fBusername\fR above. .TP \fBbmc\-device\-password\fR \fIPASSWORD\fR Specify the default password to use for .B bmc-device(8). If specified, will override the general option \fBpassword\fR above. .TP \fBbmc\-device\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B bmc-device(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBbmc\-device\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B bmc-device(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBbmc\-device\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B bmc-device(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBbmc\-device\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B bmc-device(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBbmc\-device\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B bmc-device(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B bmc-device(8) manpage for available workarounds. .SH "BMC-INFO OPTIONS" The following options are specific to .B bmc-info(8). They will be ignored by other tools. .TP \fBbmc\-info\-username\fR \fIUSERNAME\fR Specify the default username to use for .B bmc-info(8). If specified, will override the general option \fBusername\fR above. .TP \fBbmc\-info\-password\fR \fIPASSWORD\fR Specify the default password to use for .B bmc-info(8). If specified, will override the general option \fBpassword\fR above. .TP \fBbmc\-info\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B bmc-info(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBbmc\-info\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B bmc-info(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBbmc\-info\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B bmc-info(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBbmc\-info\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B bmc-info(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBbmc\-info\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B bmc-info(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B bmc-info(8) manpage for available workarounds. .TP \fBbmc\-info\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B bmc-info should attempt to interpret OEM data by default or not. .SH "BMC-WATCHDOG OPTIONS" The following options are specific to .B bmc-watchdog(8). They will be ignored by other tools. .TP \fBbmc\-watchdog\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B bmc-watchdog(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B bmc-watchdog(8) manpage for available workarounds. .TP \fBbmc\-watchdog\-verbose\-logging\fR \fIENABLE|DISABLE\fR Specify if logging will be verbose by default. .TP \fBbmc\-watchdog\-no\-logging\fR \fIENABLE|DISABLE\fR Specify if logging will be disabled by default. .SH "IPMI-CHASSIS OPTIONS" The following options are specific to .B ipmi-chassis(8). They will be ignored by other tools. .TP \fBipmi\-chassis\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-chassis(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-chassis\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-chassis(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-chassis\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-chassis(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-chassis\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-chassis(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-chassis\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-chassis(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-chassis\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-chassis(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-chassis\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-chassis(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-chassis(8) manpage for available workarounds. .SH "IPMI-CONFIG OPTIONS" The following options are specific to .B ipmi-config(8). They will be ignored by other tools. .TP \fBipmi\-config\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-config(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-config\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-config(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-config\-k_g\fR \fIstr\fR Specify the default IPMI key (K_g) to use for .B ipmi-config(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-config\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-config(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-config\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-config(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-config\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-config(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-config\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-config(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-config(8) manpage for available workarounds. .TP \fBipmi\-config\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-config(8). .SH "IPMI-DCMI OPTIONS" The following options are specific to .B ipmi-dcmi(8). They will be ignored by other tools. .TP \fBipmi\-dcmi\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-dcmi(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-dcmi\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-dcmi(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-dcmi\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-dcmi(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-dcmi\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-dcmi(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-dcmi\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-dcmi(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-dcmi\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-dcmi(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-dcmi\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-dcmi(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-dcmi(8) manpage for available workarounds. .TP \fBipmi\-dcmi\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-dcmi should attempt to interpret OEM data by default or not. .SH "IPMI-FRU OPTIONS" The following options are specific to .B ipmi-fru(8). They will be ignored by other tools. .TP \fBipmi\-fru\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-fru(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-fru\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-fru(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-fru\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-fru(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-fru\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-fru(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-fru\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-fru(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-fru\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-fru(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-fru\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-fru(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-fru(8) manpage for available workarounds. .TP \fBipmi\-fru\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-fru(8). .if 0 \{ .TP \fBipmi\-fru\-skip\-checks\fR \fIENABLE|DISABLE\fR Specify if checksum checks will be skipped by default. \} .TP \fBipmi\-fru\-bridge\-fru\fR \fIENABLE|DISABLE\fR Specify if FRU entries on other controllers should be read by default or not. .TP \fBipmi\-fru\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-fru should attempt to interpret OEM data by default or not. .SH "IPMI-OEM OPTIONS" The following options are specific to .B ipmi-oem(8). They will be ignored by other tools. .TP \fBipmi\-oem\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-oem(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-oem\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-oem(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-oem\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-oem(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-oem\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-oem(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-oem\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-oem(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-oem\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-oem(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-oem\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-oem(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-oem(8) manpage for available workarounds. .TP \fBipmi\-oem\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-oem(8). .SH "IPMI-PET OPTIONS" The following options are specific to .B ipmi-pet(8). They will be ignored by other tools. .TP \fBipmi\-pet\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-pet(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-pet\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-pet(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-pet\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-pet(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-pet\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-pet(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-pet\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-pet(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-pet\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-pet(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-pet\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-pet(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-pet(8) manpage for available workarounds. .TP \fBipmi\-pet\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-pet(8). .TP \fBipmi\-pet\-output\-event\-severity\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-pet should output the event severity state by default. .TP \fBipmi\-pet\-output\-event\-state\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-pet should output the event state state by default. .TP \fBipmi\-pet\-event\-state\-config\-file\fR \fIFILE\fR Specify the default event state configuration file. .TP \fBipmi\-pet\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-pet should attempt to interpret OEM data by default or not. .TP \fBipmi\-pet\-entity\-sensor\-names\fR \fIENABLE|DISABLE\fR Specify if output of sensor names should include entity ids and instances by default or not. .TP \fBipmi\-pet\-no\-sensor\-type\-output\fR \fIENABLE|DISABLE\fR Specify if output of the sensor type should be output by default or not. .TP \fBipmi\-pet\-comma\-separated\-output\fR \fIENABLE|DISABLE\fR Specify if output should be comma separated by default or not. .TP \fBipmi\-pet\-no\-header\-output\fR \fIENABLE|DISABLE\fR Specify if column headers should be output by default or not. .TP \fBipmi\-pet\-non\-abbreviated\-units\fR \fIENABLE|DISABLE\fR Specify if output should have units abbreviated by default or not. .SH "IPMI-RAW OPTIONS" The following options are specific to .B ipmi-raw(8). They will be ignored by other tools. .TP \fBipmi\-raw\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-raw(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-raw\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-raw(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-raw\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-raw(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-raw\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-raw(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-raw\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-raw(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-raw\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-raw(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-raw\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-raw(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-raw(8) manpage for available workarounds. .SH "IPMI-SEL OPTIONS" The following options are specific to .B ipmi-sel(8). They will be ignored by other tools. .TP \fBipmi\-sel\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-sel(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-sel\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-sel(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-sel\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-sel(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-sel\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-sel(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-sel\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-sel(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-sel\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-sel(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-sel\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-sel(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-sel(8) manpage for available workarounds. .TP \fBipmi\-sel\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-sel(8). .TP \fBipmi\-sel\-types\fR \fITYPE-LIST\fR Specify default types to show SEL events for. Multiple types can be specified separated by whitespace. Users may specify sensor types by string or by number (decimal or hex). Please see .B ipmi-sel(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fBipmi\-sel\-exclude\-types\fR \fSENSOR-TYPES-LIST\fR Specify default sensor types to not show SEL events for. Multiple sensor types can be specified separated by whitespace. Users may specify sensor types by string or by number. Please see .B ipmi-sel(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fBipmi\-sel\-system\-event\-only\fR \fIENABLE|DISABLE\fR Specify if output should only include system event records. .TP \fBipmi\-sel\-oem\-event\-only\fR \fIENABLE|DISABLE\fR Specify if output should only include OEM event records. .TP \fBipmi\-sel\-output\-manufacturer\-id\fR \fIENABLE|DISABLE\fR Specify if output of OEM event records should include manufacturer ID by default or not. .TP \fBipmi\-sel\-output\-event\-state\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sel should output the event state state by default. .TP \fBipmi\-sel\-event\-state\-config\-file\fR \fIFILE\fR Specify the default event state configuration file. .if 0 \{ .TP \fBipmi\-sel\-assume\-system\-event\-records\fR \fIENABLE|DISABLE\fR Specify if system event records should be assumed when there are invalid record types. \} .TP \fBipmi\-sel\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sel should attempt to interpret OEM data by default or not. .TP \fBipmi\-sel\-output\-oem\-event\-strings\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sel should output OEM event strings by default or not. .TP \fBipmi\-sel\-entity\-sensor\-names\fR \fIENABLE|DISABLE\fR Specify if output of sensor names should include entity ids and instances by default or not. .TP \fBipmi\-sel\-no\-sensor\-type\-output\fR \fIENABLE|DISABLE\fR Specify if output of the sensor type should be output by default or not. .TP \fBipmi\-sel\-comma\-separated\-output\fR \fIENABLE|DISABLE\fR Specify if output should be comma separated by default or not. .TP \fBipmi\-sel\-no\-header\-output\fR \fIENABLE|DISABLE\fR Specify if column headers should be output by default or not. .TP \fBipmi\-sel\-non\-abbreviated\-units\fR \fIENABLE|DISABLE\fR Specify if output should have units abbreviated by default or not. .TP \fBipmi\-sel\-legacy\-output\fR \fIENABLE|DISABLE\fR Specify if output should be in legacy format by default or not. .SH "IPMI-SENSORS OPTIONS" The following options are specific to .B ipmi-sensors(8). They will be ignored by other tools. .TP \fBipmi\-sensors\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmi-sensors(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmi\-sensors\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmi-sensors(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmi\-sensors\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmi-sensors(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmi\-sensors\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmi-sensors(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmi\-sensors\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmi-sensors(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmi\-sensors\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmi-sensors(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmi\-sensors\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmi-sensors(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmi-sensors(8) manpage for available workarounds. .TP \fBipmi\-sensors\-verbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-sensors(8). .TP \fBipmi\-sensors\-quiet\-readings\fR \fIENABLE|DISABLE\fR Specify if sensor reading values and thresholds should not be output by default. .TP \fBipmi\-sensors\-record\-ids\fR \fRECORD-IDS-LIST\fR Specify default record ids to show sensor outputs for. Multiple record ids can be specified separated by whitespace. .TP \fBipmi\-sensors\-exclude\-record\-ids\fR \fRECORD-IDS-LIST\fR Specify default record ids to not show sensor outputs for. Multiple record ids can be specified separated by whitespace. .TP \fBipmi\-sensors\-types\fR \fITYPE-LIST\fR Specify default types to show sensor outputs for. Multiple types can be specified separated by whitespace. Users may specify sensor types by string or by number (decimal or hex). Please see .B ipmi-sensors(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fBipmi\-sensors\-exclude\-types\fR \fSENSOR-TYPES-LIST\fR Specify default sensor types to not show sensor outputs for. Multiple sensor types can be specified separated by whitespace. Users may specify sensor types by string or by number. Please see .B ipmi-sensors(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fBipmi\-sensors\-bridge\-sensors\fR \fIENABLE|DISABLE\fR Specify if non-BMC sensors should be bridged by default or not. .TP \fBipmi\-sensors\-shared\-sensors\fR \fIENABLE|DISABLE\fR Specify if shared sensors should be output by default or not. .TP \fBipmi\-sensors\-interpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should attempt to interpret OEM data by default or not. .TP \fBipmi\-sensors\-ignore\-not\-available\-sensors\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should ignore not-available (i.e. N/A) sensors by default. .TP \fBipmi\-sensors\-ignore\-unrecognized\-events\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should ignore unrecognized events (i.e. 'Unrecognized Event') in sensors output by default. .TP \fBipmi\-sensors\-output\-event\-bitmask\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should output event bitmasks instead of string representations by default. .TP \fBipmi\-sensors\-output\-sensor\-state\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should output the sensor state by default. .TP \fBipmi\-sensors\-sensor\-state\-config\-file\fR \fIFILE\fR Specify the default sensor state configuration file. .TP \fBipmi\-sensors\-entity\-sensor\-names\fR \fIENABLE|DISABLE\fR Specify if output of sensor names should include entity ids and instances by default or not. .TP \fBipmi\-sensors\-output\-sensor\-thresholds\fR \fIENABLE|DISABLE\fR Specify if .B ipmi-sensors should output sensor thresholds by default. .TP \fBipmi\-sensors\-no\-sensor\-type\-output\fR \fIENABLE|DISABLE\fR Specify if output of the sensor type should be output by default or not. .TP \fBipmi\-sensors\-comma\-separated\-output\fR \fIENABLE|DISABLE\fR Specify if output should be comma separated by default or not. .TP \fBipmi\-sensors\-no\-header\-output\fR \fIENABLE|DISABLE\fR Specify if column headers should be output by default or not. .TP \fBipmi\-sensors\-non\-abbreviated\-units\fR \fIENABLE|DISABLE\fR Specify if output should have units abbreviated by default or not. .TP \fBipmi\-sensors\-legacy\-output\fR \fIENABLE|DISABLE\fR Specify if output should be in legacy format by default or not. .TP \fBipmi\-sensors\-ipmimonitoring\-legacy\-output\fR \fIENABLE|DISABLE\fR Specify if output should be in .B ipmimonitoring legacy format by default or not. .SH "IPMICONSOLE OPTIONS" The following options are specific to .B ipmiconsole(8). They will be ignored by other tools. .TP \fBipmiconsole\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmiconsole(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmiconsole\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmiconsole(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmiconsole\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmiconsole(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmiconsole\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmiconsole(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmiconsole\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmiconsole(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmiconsole\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmiconsole(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmiconsole\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmiconsole(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmiconsole(8) manpage for available workarounds. .TP \fBipmiconsole\-escape\-char\fR \fICHAR\fR Specify the default escape character. .TP \fBipmiconsole\-dont\-steal\fR \fIENABLE|DISABLE\fR Specify if in use SOL sessions should not be stolen by default. .TP \fBipmiconsole\-serial\-keepalive\fR \fIENABLE|DISABLE\fR Specify if serial keepalive should be enabled by default. .TP \fBipmiconsole\-serial\-keepalive\-empty\fR \fIENABLE|DISABLE\fR Specify if serial keepalive empty should be enabled by default. .TP \fBipmiconsole\-sol\-payload\-instance\fR \fINUM\fR Specify the default SOL payload instance. .TP \fBipmiconsole\-deactivate\-all\-instances\fR \fIENABLE|DISABLE\fR Specify if SOL deactivate should deactivate all instances by default. .TP \fBipmiconsole\-lock\-memory\fR \fIENABLE|DISABLE\fR Specify if memory should be locked by default. .SH "IPMIPOWER OPTIONS" The following options are specific to .B ipmipower(8). They will be ignored by other tools. .TP \fBipmipower\-username\fR \fIUSERNAME\fR Specify the default username to use for .B ipmipower(8). If specified, will override the general option \fBusername\fR above. .TP \fBipmipower\-password\fR \fIPASSWORD\fR Specify the default password to use for .B ipmipower(8). If specified, will override the general option \fBpassword\fR above. .TP \fBipmipower\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use for .B ipmipower(8). If specified, will override the general option \fBk_g\fR above. Prefix with '0x' to enter the key in hex. .TP \fBipmipower\-authentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the default authentication type to use for .B ipmipower(8). If specified, will override the general option \fBauthentication-type\fR above. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBipmipower\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use for .B ipmipower(8). If specified, will override the general option \fBcipher-suite-id\fR above. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBipmipower\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use for .B ipmipower(8). If specified, will override the general option \fBprivilege-level\fR above. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBipmipower\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use for .B ipmipower(8). If specified, will override the general options \fBworkaround\-flags\fR above. Multiple workarounds can be specified separated by whitespace. Please see .B ipmipower(8) manpage for available workarounds. .TP \fBipmipower\-on\-if\-off\fR \fIENABLE|DISABLE\fR Specify if on-if-off functionality is enabled or disabled by default. .TP \fBipmipower\-wait\-until\-on\fR \fIENABLE|DISABLE\fR Specify if wait-until-on functionality is enabled or disabled by default. .TP \fBipmipower\-wait\-until\-off\fR \fIENABLE|DISABLE\fR Specify if wait-until-off functionality is enabled or disabled by default. .TP \fBipmipower\-oem\-power\-type\fR \fIOEM\-POWER\-TYPE\fR Specify OEM power type to be used. .TP \fBipmipower\-retransmission\-wait\-timeout\fR \fIMILLISECONDS\fR Specify the default retransmission wait timeout length to use in milliseconds. .TP \fBipmipower\-retransmission\-backoff\-count\fR \fICOUNT\fR Specify the default retransmission backoff count to use for retransmissions. .TP \fBipmipower\-ping\-interval\fR \fIMILLISECONDS\fR Specify the default ping interval length to use in milliseconds. .TP \fBipmipower\-ping\-timeout\fR \fIMILLISECONDS\fR Specify the default ping timeout length to use in milliseconds. .TP \fBipmipower\-ping\-packet\-count\fR \fICOUNT\fR Specify the default ping packet count size to use. .TP \fBipmipower\-ping\-percent\fR \fIPERCENT\fR Specify the default ping percent value to use. .TP \fBipmipower\-ping\-consec\-count\fR \fICOUNT\fR Specify the default ping consecutive count value to use. .SH "FILES" @FREEIPMI_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-freeipmi-text.man> .SH "SEE ALSO" freeipmi(7), bmc-device(8), bmc-info(8), bmc-watchdog(8), ipmi-chassis(8), ipmi-config(8), ipmi-fru(8), ipmi-oem(8), ipmi-raw(8), ipmi-sel(8), ipmi-sensors(8), ipmiconsole(8), ipmipower(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/freeipmi.7.pre.in0000644002055400205540000002271713527331637017132 0ustar00achuachu00000000000000.TH FREEIPMI 7 "@ISODATE@" "FreeIPMI @PACKAGE_VERSION@" "Overview" .SH "NAME" FreeIPMI - FreeIPMI overview .SH "Introduction" FreeIPMI provides in-band and out-of-band IPMI software based on the IPMI v1.5/2.0 specification. .SH "What is IPMI?" The IPMI specification defines a set of interfaces for platform management and is implemented by a number vendors for system management. The features of IPMI that most users will be interested in are sensor monitoring, system event monitoring, power control, and serial-over-LAN (SOL). The FreeIPMI tools and libraries listed below should provide users with the ability to access and utilize these and many other features of IPMI. .PP .SH "Getting Started with IPMI" IPMI can be used in-band (i.e. running on a machine locally) or out-of-band (i.e. connecting remotely). .PP Most FreeIPMI tools can operate in-band by using one of the in-band drivers included. These in-band drivers include a userspace KCS interface driver, a SSIF driver through the Linux SSIF device (i.e. /dev/i2c-0), the OpenIPMI Linux kernel driver (i.e. /dev/ipmi0), the Sun/Solaris BMC driver (i.e. /dev/bmc), and the Intel DCMI/MEI driver (i.e. /dev/dcmi). If your system requires the use of installed drivers, those appropriate modules must be installed ahead of time. However, most systems should automatically load these drivers when appropriate. .PP Under most scenarios, the FreeIPMI tools should automatically discover which in-band interface to use and the proper settings to use. Users may execute the tools on the command line to begin using them. Some motherboards may require you to determine driver type, addresses, paths, etc. on your own and pass them as command line options to the tools. You may use .B ipmi-locate(8) to help determine this information. Other tools such as .B dmidecode(8) may also provide this information. .PP To use IPMI out-of-band with tools such as .B ipmipower(8) or .B ipmi-sensors(8), the remote machine's BMC must first be configured for out of band communication. Typically, this involves setting a username, password, IP address, MAC address, and a few other parameters. This can be done using the tool .B ipmi-config(8). Additional information on how to configure with .B ipmi-config(8) can be found in the .B ipmi-config.conf(5) manpage. Some vendors may pre-configure their motherboards with default values so that .B ipmi-config(8) can be used remotely to configure the machine. However, most of the time, the BMC must be configured in-band before out-of-band access can be allowed (for example, the correct IP address and MAC address must be configured). .PP In order to remotely connect to a machine, you typically must specify the host, username, and password for the tool in order to connect. Depending on configuration settings, a K_g key, privilege level, authentication type, cipher suite id, or protocol version may need to be specified. .PP Some vendors may have not implemented IPMI properly and a workaround must be specified into FreeIPMI to ensure the tool can execute properly. For example, a fair number of vendors have populated their FRU records with invalid checksums. To properly ignore these set of checksums a \fIskipchecks\fR workaround has been added to .B ipmi-fru(8). Please see each of the tool manpages to see a list of available workarounds. .PP Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. .SH "General Use" The primary tools that most users of FreeIPMI will be interested in for system management are the following: .PP .B ipmi-sensors .PP A tool to read IPMI sensor readings to aid in system monitoring. .PP .B ipmi-sel .PP A tool to read and manage IPMI System Event Log (SEL) records to aid in system debugging. .PP .B ipmipower .PP A tool for remote power control. .PP .B ipmiconsole .PP A tool for Serial-over-Lan (SOL) console access. .PP Many other tools and libraries are listed below that cover additional features and areas of IPMI. .PP Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. .SH "Configuration" In order to avoid typing in a long list of command line options to specify IPMI communication requirements everytime a command is executed (e.g. driver paths, usernames, passwords, etc.), an alternate set of default values can be set for most FreeIPMI tools in the FreeIPMI configuration file. See .B freeipmi.conf(5) for more information. .SH "HPC Support" Much of FreeIPMI was written with HPC support in mind. .B Ipmi-config(8) comes with file input/output support so that configuration can be copied and verified across nodes in a cluster. Most tools (like .B ipmipower(8) and .B ipmi-sensors(8) ) come with hostrange support so multiple hosts can be specified on the command line at the same time and IPMI can be executed against the hosts in parallel. See tool manpages for more information. Also see the document \fIfreeipmi-hostrange.txt\fR for detailed usage and explanation. .B Ipmi-sensors(8) and the .B libipmimonitoring(3) library support the ability to interpret sensor readings as well as just reporting them. By mapping sensor readings into NOMINAL, WARNING, or CRITICAL states, it makes monitoring sensors easier across large numbers of nodes. .SH "Development" For information on the libraries that can be used to program IPMI applications with, please see .B libfreeipmi(3), .B libipmiconsole(3), .B libipmimonitoring(3), .B and libipmidetect(3). Or see the document \fIfreeipmi-libraries.txt\fR. .SH "Project Tools" The following tools are distributed and supported by FreeIPMI. .PP .B bmc-info .PP A tool to read information about a BMC such as device version numbers, device support, and globally unique IDs (guids). .PP .B bmc-watchdog .PP A tool/daemon to manage a BMC Watchdog. This tool is typically used for system timeout management and automatic system restarts in the event of a system crash. .PP .B ipmi-chassis .PP A tool to manage/monitor a chassis, such as chassis power, identification (i.e. LED control), and status. .PP .B ipmi-fru .PP A tool to read field replaceable unit (FRU) information from a motherboard/machine. .PP .B ipmi-sel .PP A tool to read and manage IPMI System Event Log (SEL) records. SEL records store system event information and may be useful for debugging problems. .PP .B ipmi-sensors .PP A tool to read IPMI sensor readings and sensor data repository (SDR) information. .PP .B ipmipower .PP A tool for remote power control. .PP .B ipmiconsole .PP A tool for Serial-over-Lan (SOL) console access. .PP .B ipmi-config .PP A tool to configure BMC and IPMI information. In can be used to configured usernames, passwords, networking information, security, Serial-over-LAN (SOL), Platform Event Filtering (PEF), boot devices, power restoration policy, sensor thresholds, sensor events, and many more configuration options. .PP .B ipmi-raw .PP A tool that provides hex input/output of IPMI commands. .PP .B ipmi-locate .PP A tool that can probe for information about the location of a BMC device, such as device addresses. .PP .B ipmi-pet .PP A tool to parse and interpret Platform Event Traps (PET). .PP .B ipmi-dcmi .PP A tool to perform Data Center Manageability Interface (DCMI) IPMI extension commands. Supports extensions for asset management and power usage management. .PP .B bmc-device .PP A tool to perform advanced BMC commands, such as resetting the BMC, configuring ACPI, configuring SDR/SEL time, manually generating events, re-arming sensors, and configuring manufacturer settings. .PP .B ipmiping .PP An IPMI ping tool for debugging. .PP .B rmcpping .PP A RMCP ping tool for debugging. .PP .B ipmi-oem .PP An IPMI tool for OEM specific commands. .PP .B ipmidetect/ipmidetectd .PP A tool and daemon for IPMI node detection. .PP .B ipmiseld .PP A daemon that regularly polls the SEL and stores the events to the local syslog. .PP Additional information, examples, and general trouble-shooting can be found in each of the tool manpages. .SH "Project Libraries" The following libraries are distributed and supported by FreeIPMI. .PP .B libfreeipmi .PP A C library that includes KCS, SSIF, and OpenIPMI Linux, and Solaris BMC drivers, IPMI 1.5 and IPMI 2.0 LAN communication interfaces, IPMI packet building utilities, IPMI command utilities, and utilities for reading/interpreting/managing IPMI. This library is for programmers intimately familiar with the IPMI protocol and IPMI specification. Most users may wish to use the libraries listed below. .PP .B libipmiconsole .PP A library for Serial-over-Lan (SOL) console access. SOL console access is abstracted into a file descriptor interface, so users may read and write console data through a file descriptor. .PP .B libipmimonitoring .PP A library for sensor and system event log (SEL) monitoring that abstracts away most IPMI details. Interpretation of those sensors and events is abstracted into an API with an iterator interface. .PP .B libipmidetect .PP A library for IPMI node detection. #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-freeipmi-text.man> .SH "SEE ALSO" libfreeipmi(3), libipmiconsole(3), libipmidetect(3), libipmimonitoring(3), freeipmi.conf(5), bmc-device(8), bmc-info(8), bmc-watchdog(8), ipmi-chassis(8), ipmi-config(8), ipmi-fru(8), ipmi-locate(8), ipmi-oem(8), ipmi-pet(8), ipmi-raw(8), ipmi-sel(8), ipmi-sensors(8), ipmiconsole(8), ipmidetect(8), ipmiping(8), ipmipower(8), rmcpping(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-chassis.8.pre.in0000644002055400205540000002164213527331637017720 0ustar00achuachu00000000000000.TH IPMI-CHASSIS 8 "@ISODATE@" "ipmi-chassis @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-chassis \- IPMI chassis management utility .SH "SYNOPSIS" .B ipmi-chassis [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-chassis is used for managing/monitoring an IPMI chassis, such as chassis power, indentification (i.e. LED control), and status. See OPTIONS below for all chassis management options available. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> To perform IPMI chassis configuration, please see .B ipmi-config(8). To perform some advanced chassis management, please see .B bmc-device(8). For a more powerful chassis power control utility, please see .B ipmipower(8). #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-admin.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-CHASSIS OPTIONS" The following options are specific to .B ipmi-chassis. .TP \fB\-\-get\-chassis\-capabilities\fR Get chassis capabilities. This command returns information on which main chassis management functions are available. .TP \fB\-\-get\-chassis\-status\fR Get chassis status. This command returns high level status information on the chassis. .TP \fB\-\-chassis\-control\fR=\fICONTROL\fR Control the chassis. This command provides power-up, power-down, and reset control. Supported values: POWER\-DOWN, POWER\-UP, POWER\-CYCLE, HARD\-RESET, DIAGNOSTIC\-INTERRUPT, SOFT\-SHUTDOWN. .TP \fB\-\-chassis\-identify\fR=\fIIDENTIFY\fR Set chassis identification. This command controls physical system identification, typically a LED. Supported values: TURN\-OFF to turn off identification, to turn on identification for "interval" seconds, FORCE to turn on indefinitely. .\".TP .\".\fB\-\-set\-power\-restore\-policy\fR=\fIPOLICY\fR .\".Set power restore policy. This command determines how the system or .\".chassis behaves when AC power returns after an AC power loss. .\".Supported values: LIST\-SUPPORTED\-POLICIES, ALWAYS\-ON, RESTORE, .\".ALWAYS\-OFF. See current power restore policy via the .\".\fB\-\-get\-status\fR option. .\"..TP .\".\fB\-\-set\-power\-cycle\-interval\fR=\fISECONDS\fR .\".Set power cycle interval in seconds. This interval determines the .\".time the system power will be powered down during a power cycle .\".operation initiated by a chassis control command. .TP \fB\-\-get\-system\-restart\-cause\fR Get system restart cause. .TP \fB\-\-get\-power\-on\-hours\-counter\fR Get power on hours (POH) counter. .\"..TP .\".\fB\-\-get\-boot\-flags\fR .\".Get system boot\-flags. This command returns the current boot .\".flag settings. .\"..TP .\".\fB\-\-set\-boot\-flags\fR .\".Set system boot flags. Must be specified to use the .\".\fB\-\-boot\-type\fR, .\".\fB\-\-lock\-out\-reset\-button\fR, .\".\fB\-\-blank\-screen\fR, .\".A\fB\-\-boot\-device\fR, .\".\fB\-\-lock\-keyboard\fR, .\".\fB\-\-clear\-cmos\fR, .\".\fB\-\-console\-redirection\fR, .\".\fB\-\-user\-password\-bypass\fR, .\".\fB\-\-force\-progress\-event\-traps\fR, .\".and .\".\fB\-\-firmware\-bios\-verbosity\fR .\".options listed below. .\"..TP .\".\fB\-\-boot\-type\fR=\fIBOOT_TYPE\fR .\".Set BIOS boot type to BOOT_TYPE. Supported values: .\".PC\-COMPATIBLE, EFI. Used with the .\".\fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-lock\-out\-reset\-button\fR=\fILOCK_OUT_RESET_BUTTON\fR .\".Modify lock out reset button support. Supported values: YES/NO. .\".Used with the \fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-blank\-screen\fR=\fIBLANK_SCREEN\fR .\".Modify blank screen support. Supported values: YES/NO. .\".Used with the \fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-boot\-device\fR=\fIBOOT_DEVICE\fR .\".Set device to boot from to BOOT_DEVICE. Allowed .\".values: NO-OVERRIDE, PXE, HARD-DRIVE, HARD\-DRIVE\-SAFE, DIAG, CD\-DVD, .\".BIOS, FLOPPY. Used with the \fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-lock\-keyboard\fR=\fILOCK_KEYBOARD\fR .\".Modify lock keyboard support. Supported values: YES/NO. .\".Used with the \fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-clear\-cmos\fR=\fICMOS_CLEAR\fR .\".Modify clear CMOS support. Supported values: YES/NO. Used with the .\".\fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-console\-redirection\fR=\fICONSOLE_REDIRECTION\fR .\".Set console redirection type. Supported values: DEFAULT, .\".SUPPRESS, ENABLE. Used with the .\".\fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-user\-password\-bypass\fR=\fIUSER_PASSWORD_BYPASS\fR .\".Modify user password bypass support. When enabled, the managed .\".client's BIOS boots the systema nd bypasses any user or boot password .\".that might be set in teh system. This option allows a system .\".administrator to, for example, force a system boot via PXE in an .\".unattended manner. Supported values: YES/NO. Used with the .\".\fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-force\-progress\-event\-traps\fR=\fIFORCE_PROGRESS_EVENT_TRAPS\fR .\".Modify force progress event traps support. When enabled, the BMC .\".transmits PET traps for BIOS progress events to the session that set .\".the flag. Supported values: YES/NO. Used with the .\".\fB\-\-set\-boot\-flags\fR option. .\"..TP .\".\fB\-\-firmware\-bios\-verbosity\fR=\fIFIRMWARE_BIOS_VERBOSITY\fR .\".Set firmware verbosity. Directs what appears on POST display. .\".Supported values: DEFAULT, QUIET, VERBOSE. Used with the .\".\fB\-\-set\-boot\-flags\fR option. #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> .SH "EXAMPLES" .B # ipmi-chassis --get-status .PP Get the chassis status of the local machine. .PP .B # ipmi-chassis -h ahost -u myusername -p mypassword --get-status .PP Get the chassis status of a remote machine using IPMI over LAN. .PP .B # ipmi-chassis -h mycluster[0-127] -u myusername -p mypassword --get-status .PP Get the chassis status across a cluster using IPMI over LAN. .PP .B # ipmi-chassis -h ahost -u myusername -p mypassword --chassis-control=POWER-UP .PP Power on a remote machine using IPMI over LAN. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2007-2015 FreeIPMI Core Team #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), bmc-device(8), ipmi-config(8), ipmipower(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-config.8.pre.in0000644002055400205540000004331013527331637017524 0ustar00achuachu00000000000000.TH IPMI-CONFIG 8 "@ISODATE@" "ipmi-config @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-config \- configure IPMI values .SH "SYNOPSIS" .B ipmi-config [\fIOPTION\fR...] .SH "DESCRIPTION" .B ipmi-config is used to get and set configuration parameters in IPMI. In can be used to configured usernames, passwords, networking information, security, Serial-over-LAN (SOL), Platform Event Filtering (PEF), boot devices, power restoration policy, sensor thresholds, sensor events, and many more configuration options. Some configuration is typically required before most IPMI tools can be used to access a machine remotely. By default, .B ipmi-config, will let you \fI\-\-checkout\fR or \fI\-\-commit\fR only the \fIcore\fR IPMI values necessary for IPMI configuration. For additional advanced configuration fields related to Chassis configuration (including boot options), Platform Event Filtering (PEF), or Sensors, see the \fI\-\-category\fR option below. The majority of configuration operations require ADMIN privilege when using .B ipmi-config out-of-band. Although connecting via a user with ADMIN privileges is not required for out-of-band use, the vast majority of configuration options will not be retrieved or set. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> See GENERAL USE below for a description on basic use of .B ipmi-config. #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-admin.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-CONFIG OPTIONS" The following options are used to read, write, and find differences in configuration values. .TP \fB\-g\fR \fICATEGORY\fR, \fB\-\-category\fR=\fICATEGORY\fR Specify the category or categories of configuration data to configure. Currently available choices: \fIcore\fR, \fIchassis\fR, \fIsensors\fR, \fIpef\fR, \fIdcmi\fR. Multiple categories can be separated by comma. \fIcore\fR includes all major IPMI configuration necessary to get IPMI to function on a sytem, such as configuration for users, passwords, authentication, networking, and serial-over-lan (SOL). \fIchassis\fR includes all chassis relevant configuration including boot options, front panel buttons, and power behavior. \fIdcmi\fR includes specialized functions provided by the Data Center Management Interface (DCMI). Defaults to \fIcore\fR if not specified. .TP \fB\-o\fR, \fB\-\-checkout\fR Fetch configuration information. .TP \fB\-c\fR, \fB\-\-commit\fR Update configuration information from a config file or key pairs. .TP \fB\-d\fR, \fB\-\-diff\fR Show differences between stored information and a config file or key pairs. .TP \fB\-n\fR \fIFILENAME\fR, \fB\-\-filename\fR=\fIFILENAME\fR Specify a config file for checkout/commit/diff. If specified with checkout, cannot use with multiple hosts or with \fB\-\-always\-prefix\fR. .TP \fB\-e\fR \fI"KEY=VALUE"\fR, \fB\-\-key\-pair\fR=\fI"KEY=VALUE"\fR Specify KEY=VALUE pairs for checkout/commit/diff. Specify KEY by SectionName:FieldName. This option can be used multiple times. On commit, any KEY=VALUE pairs will overwrite any pairs specified in a file with \fB\-\-filename\fR. .TP \fB\-S\fR \fISECTION\fR, \fB\-\-section\fR=\fISECTION\fR Specify a SECTION for checkout. This option can be used multiple times. The SECTION you are specifying must be within the category or categories specified with \fI\-\-category\fR. .TP \fB\-L\fR, \fB\-\-listsections\fR List available sections for checkout with respect to the category or categories under \fI\-\-category\fR. Some sections in the list may not be checked out by default and may require verbosity to be increased. .TP \fB\-v\fR, \fB\-\-verbose\fR Output verbose information. When used with \fI\-\-checkout\fR, additional uncommon sections and/or fields will be shown. In the \fIcore\fR category, this includes checking out Serial Configuration parameters, Vlan parameters, IPv4 Header parameters, RMCP port, and sections for each channel on a system, if multiple channels exist. In the \fIpef\fR category, this includes checkout out sections for each channel on a system, if multiple channels exist. .TP \fB\-vv\fR Output very verbose information. Output additional detailed information about what fields can and cannot be checked out, and sometimes the reason why. Sometimes output fields that are identified as unsupported on the motherboard. .TP \fB\-\-lan\-channel\-number\fR=\fINUMBER\fR Use an specific channel number for LAN configuration. Particularly useful if motherboard contains multiple LAN channels and a user wishes to use a specific one. .TP \fB\-\-serial\-channel\-number\fR=\fINUMBER\fR Use an specific channel number for serial configuration. Particularly useful if motherboard contains multiple serial channels and a user wishes to use a specific one. .TP \fB\-\-sol\-channel\-number\fR=\fINUMBER\fR Use an specific channel number for SOL configuration. Particularly useful if motherboard contains multiple SOL channels and a user wishes to use a specific one. #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> .SH "GENERAL USE" Most users of will want to: .LP A) Run with \fI\-\-checkout\fR to get a copy of the current configuration and store it in a file. The standard output can be redirected to a file or a file can be specified with the \fI\-\-filename\fR option. .LP B) Edit the configuration file with an editor. .LP C) Commit the configuration back using the \fI\-\-commit\fR option and specifying the configuration file with the \fI\-\-filename\fR option. The configuration can be committed to multiple hosts in parallel via the hostrange support. .LP Although not typically necessarily, some motherboards do not store configuration values in non-volatile memory. Therefore, after system reboots, some configuration values may have changed. The user may wish to run configuration tools on each boot to ensure configuration values remain. .LP Comments will be listed on occassion in checked out files with information on how to configure fields. The .B ipmi-config.conf(5) manpage also provides additional information on the meaning of different fields. .LP For users with large clusters or sets of nodes, you may wish to use the same configuration file for all nodes. The one problem with this is that the IP address and MAC address will be different on each node in your cluster and thus can't be configured through the same config file. The IP address and MAC address in your config file may be overwritten on the command line using \fI\-\-key\-pair\fR option. The following example could be used in a script to configure each node in a cluster with the same BMC config file. The script only needs to determine the correct IP address and MAC address to use. .LP .B # ipmi-config --commit -k "Lan_Conf:Ip_Address=$MY_IP" -k "Lan_Conf:Mac_Address=$MY_MAC" --filename=my_bmc.conf .SH "CORE SPECIAL CASE CONFIGURATION INFORMATION" The .B UserN:Password fields (where N is a number) cannot be checked out on some systems, therefore the checked out value will always be blank. .LP The .B UserN:Enable_User field (where N is a number) cannot be checked out on older IPMI systems, therefore the checked out value will sometime be blank. .LP The .B UserN:Lan_Session_Limit and .B UserN:Serial_Session_Limit fields (where N is a number) cannot be checked out on some systems, therefore the checked out value will always be blank. If not specified in later commits of configurations, the field may be reset to 0 due to a requirement that other fields (configured along with the session limit) will require an input value for the session limit. Under most conditions, it is not necessary to set this field and most users may choose to ignore it. This field is considered optional by IPMI standards, and may result in errors when attempting to configure it to a non-zero value. If errors to occur, setting the value back to 0 should resolve problems. .LP The fields .B Lan_Conf:IP_Address and .B Lan_Conf:MAC_Address cannot be committed in parallel via hostrange support. Each machine must be configured with a unique IP Address and MAC Address tuple, therefore we disallow this configuration in .B ipmi-config. .LP On some motherboards, .B Lan_Conf:MAC_Address may be read only and the MAC address is automatically configured. .LP On some motherboards, .B Lan_Conf:MAC_Address may be read only and the MAC address is configured via an OEM command. See .B ipmi-oem(8) to see if OEM configuration for your motherboard is supported. .LP On some motherboards, a number of user configuration fields cannot be read or configured until after a non-null username or non-null password is configured. In some of these cases, an appropriate output in the config file will indicate this situation. However, not all motherboard corner cases may be detected. Users may wish to play around with the ordering of fields to work around these problems. .LP On some motherboards, OEM Authentication in .B Lan_Conf_Auth cannot be enabled. However, the default motherboard settings have these fields enabled. Users are advised to disable all OEM Authentication in this section. .LP On some motherboards, multiple channels may exist for either LAN or Serial IPMI communication. If multiple channels exist, configuration of both channels can be viewed and ultimately configured by running \fI\-\-checkout\fR under verbose mode. Each section or key name will be suffixed appropriately with the word \fIChannel\fR and the channel number. For example, you might see a \fILan_Conf_Channel_1\fR and \fILan_Conf_Channel_3\fR, where you can configure LAN configuration on Channels 1 and 3 respectively. .LP On some motherboards, configuration changes will not be "absorbed" by the system until the motherboard is hard-reset. This can be accomplished by physically powering off and on the system (e.g. button push), or it can be accomplished through a cold-reset. A cold-reset can be executed via .B bmc-device. .SH "CHASSIS SPECIAL CASE CONFIGURATION INFORMATION" The .B Chassis_Front_Panel_Buttons:Enable_Standby_Button_For_Entering_Standy, .B Chassis_Front_Panel_Buttons:Enable_Diagnostic_Interrupt_Button .B Chassis_Front_Panel_Buttons:Enable_Reset_Button, and .B Chassis_Front_Panel_Buttons:Enable_Power_Off_Button_For_Power_Off_Only fields may not be able to be checked out on some IPMI systems, therefore the checked out value may be blank. Some of these fields may be disableable, while some are not. The .B Chassis_Power_Conf:Power_Control_Interval field cannot be checked out. Therefore the checked out value will always be blank. .SH "PEF SPECIAL CASE CONFIGURATION INFORMATION" On some motherboards, multiple channels may exist for LAN IPMI communication. If multiple channels exist, configuration of both channels can be viewed and ultimately configured by running \fI\-\-checkout\fR under verbose mode. Each section name will be suffixed appropriately with the word \fIChannel\fR and the channel number. For example, you might see a \fICommunity_String_Channel_1\fR and \fICommunity_String_Channel_3\fR, where you can configure the Community String on Channels 1 and 3 respectively. The following are the options suitable for input for Sensor_Type in PEF configuration. .TP \fBSensor_Type Options\fR Reserved, Temperature, Voltage, Current, Fan, Physical_Security, Platform_Security_Violation_Attempt, Processor, Power_Supply, Power_Unit, Cooling_Device, Other_Units_Based_Sensor, Memory, Drive_Slot, Post_Memory_Resize, System_Firmware_Progress, Event_Logging_Disabled, Watchdog1, System_Event, Critical_Interrupt, Button_Switch, Module_Board, Microcontroller_Coprocessor, Add_In_Card, Chassis, Chip_Set, Other_FRU, Cable_Interconnect, Terminator, System_Boot_Initiated, Boot_Error, OS_Boot, OS_Critical_Stop, Slot_Connector, System_ACPI_Power_State, Watchdog2, Platform_Alert, Entity_Presence, Monitor_Asic_IC, Lan, Management_Subsystem_Health, Battery, Session_Audit, Version_Change, FRU_State, and Any .SH "SENSORS SPECIAL CASE CONFIGURATION INFORMATION" Since many configurable fields involve decimal numbers, precision/floating point inaccuracies may occur when configuring new thresholds. The inaccuracies may not be apparent immediately. It is recommend users verify their changes after configuring new thresholds. #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> .LP \fIslowcommit\fR - This workaround will slow down commits to the BMC by sleeping one second between the commit of sections. It works around motherboards that have BMCs that can be overwhelmed by commits. Those hitting this issue may see commit errors or commits not being written to the BMC. Issue observed on Supermicro H8QME. .LP \fIveryslowcommit\fR - This workaround will slow down commits to the BMC by sleeping one second between the commit of every key. It works around motherboards that have BMCs that can be overwhelmed by commits. Those hitting this issue may see commit errors or commits not being written to the BMC. Issue observed on Quanta S99Q/Dell FS12-TY. .LP \fIsolchannelassumelanchannel\fR - This workaround will force .B ipmi-config to assume that the channel used SOL is identical to the channel used for LAN. On some motherboards, the SOL channel is reported incorrectly, leading to incorrect configuration. Most notably, this problem has come up when attempting to configure multiple channels. Issue observed on Intel S5500WBV/Penguin Relion 700. .SH "EXAMPLES" .B # ipmi-config --checkout .PP Output all core configuration information to the console. .B # ipmi-config --checkout --category=pef .PP Output all pef configuration information to the console. .B # ipmi-config --checkout --category=pef,chassis .PP Output all pef and chassis configuration information to the console. .PP .B # ipmi-config --checkout --filename=bmc-data1.conf .PP Store all core configuration information in bmc-data1.conf. .PP .B # ipmi-config --diff --filename=bmc-data2.conf .PP Show all difference between the current configuration and the bmc-data2.conf file. .PP .B # ipmi-config --diff --key-pair="lan_conf_misc:gratuitous_arp_interval=8" .PP Show difference with the current configuration and the 'lan_conf_misc:gratuitous_arp_interval' of value '8'. .PP .B # ipmi-config --commit --filename=bmc-data1.conf .PP Commit all configuration values from the bmc-data1.conf file. .PP .B # ipmi-config --commit --key-pair="lan_conf_misc:gratuitous_arp_interval=4" .PP Commit key 'lan_conf_misc:gratuitous_arp_interval' of value '4'. .PP .B # ipmi-config --commit --filename=bmc-data-updt.conf --key-pair="lan_conf_misc:gratuitous_arp_interval=4" .PP Commit all configuration values from bmc-data-updt.conf and key 'lan_conf_misc:gratuitous_arp_interval' of value '4'. .PP .SH "DIAGNOSTICS" Upon successful execution, exit status is 0. On non-fatal error, exit status is 1. On fatal error, exit status is 2. .LP If multiple hosts are specified for communication, the exit status is 0 if and only if all targets successfully execute. If any non-fatal error occurs, exit status is 1. If any fatal error occurs, exit status is 2. #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" ipmi-config.conf(5), freeipmi(7), bmc-device(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-config.conf.5.pre.in0000644002055400205540000006235513527331637020457 0ustar00achuachu00000000000000.TH ipmi-config.conf 5 "@ISODATE@" "ipmi-config @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-config \- IPMI configuration file details .br .SH "DESCRIPTION" Before many IPMI tools can be used over a network, a machine's Baseboard Management Controller (BMC) must be configured. The configuration can be quite daunting for those who do not know much about IPMI. This manpage hopes to provide enough information on BMC configuration so that you can configure the BMC for your system. When appropriate, typical BMC configurations will be suggested. .LP The following is an example configuration file partially generated by running the \fI\-\-checkout\fR option with the .B ipmi-config(8) command. This configuration comes from the \fIcore\fR category of configuration values (the default). This example configuration should be sufficient for most users after the appropriate local IP and MAC addresses are input. Following this example, separate sections of this manpage will discuss the different sections of the configuration file in more detail with explanations of how the BMC can be configured for different environments. .LP Note that many options may or may not be available on your particular machine. For example, Serial-Over-Lan (SOL) is available only on IPMI 2.0 machines. Therefore, if you are looking to configure an IPMI 1.5 machine, many of the SOL or IPMI 2.0 related options will be be unavailable to you. The number of configurable users may also vary for your particular machine. .LP The below configuration file and most of this manpage assume the user is interested in configuring a BMC for use with IPMI over LAN. Various configuration options from .B ipmi-config(8) have been left out or skipped because it is considered unnecessary. Future versions of this manpage will try to include more information. .LP .nf Section User1 ## Give username ## Username NULL ## Give password or leave it blank to clear password Password mypassword ## Possible values: Yes/No or blank to not set Enable_User Yes ## Possible values: Yes/No Lan_Enable_Ipmi_Msgs Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit Administrator ## Possible values: 0-17, 0 is unlimited; May be reset to 0 if not specified ## Lan_Session_Limit ## Possible values: Yes/No SOL_Payload_Access Yes EndSection Section User2 ## Give username Username user2 ## Give password or leave it blank to clear password Password userpass ## Possible values: Yes/No or blank to not set Enable_User No ## Possible values: Yes/No Lan_Enable_Ipmi_Msgs No ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Lan_Privilege_Limit No_Access ## Possible values: 0-17, 0 is unlimited; May be reset to 0 if not specified ## Lan_Session_Limit ## Possible values: Yes/No SOL_Payload_Access No EndSection Section Lan_Channel ## Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared Volatile_Access_Mode Always_Available ## Possible values: Yes/No Volatile_Enable_User_Level_Auth Yes ## Possible values: Yes/No Volatile_Enable_Per_Message_Auth Yes ## Possible values: Yes/No Volatile_Enable_Pef_Alerting No ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Volatile_Channel_Privilege_Limit Administrator ## Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared Non_Volatile_Access_Mode Always_Available ## Possible values: Yes/No Non_Volatile_Enable_User_Level_Auth Yes ## Possible values: Yes/No Non_Volatile_Enable_Per_Message_Auth Yes ## Possible values: Yes/No Non_Volatile_Enable_Pef_Alerting No ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access Non_Volatile_Channel_Privilege_Limit Administrator EndSection Section Lan_Conf ## Possible values: Unspecified/Static/Use_DHCP/Use_BIOS/Use_Others Ip_Address_Source Static ## Give valid IP Address Ip_Address 192.168.1.100 ## Give valid MAC Address Mac_Address 00:0E:0E:FF:AA:12 ## Give valid Subnet mask Subnet_Mask 255.255.255.0 ## Give valid IP Address Default_Gateway_Ip_Address 192.168.1.1 ## Give valid MAC Address Default_Gateway_Mac_Address 00:0E:0E:FF:AA:18 ## Give valid IP Address Backup_Gateway_Ip_Address 192.168.1.2 ## Give valid MAC Address Backup_Gateway_Mac_Address 00:0E:0E:FF:AA:15 EndSection Section Lan_Conf_Auth ## Possible values: Yes/No Callback_Enable_Auth_Type_None No ## Possible values: Yes/No Callback_Enable_Auth_Type_Md2 No ## Possible values: Yes/No Callback_Enable_Auth_Type_Md5 No ## Possible values: Yes/No Callback_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Callback_Enable_Auth_Type_Oem_Proprietary No ## Possible values: Yes/No User_Enable_Auth_Type_None No ## Possible values: Yes/No User_Enable_Auth_Type_Md2 Yes ## Possible values: Yes/No User_Enable_Auth_Type_Md5 Yes ## Possible values: Yes/No User_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No User_Enable_Auth_Type_Oem_Proprietary No ## Possible values: Yes/No Operator_Enable_Auth_Type_None No ## Possible values: Yes/No Operator_Enable_Auth_Type_Md2 Yes ## Possible values: Yes/No Operator_Enable_Auth_Type_Md5 Yes ## Possible values: Yes/No Operator_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Operator_Enable_Auth_Type_Oem_Proprietary No ## Possible values: Yes/No Admin_Enable_Auth_Type_None No ## Possible values: Yes/No Admin_Enable_Auth_Type_Md2 Yes ## Possible values: Yes/No Admin_Enable_Auth_Type_Md5 Yes ## Possible values: Yes/No Admin_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Admin_Enable_Auth_Type_Oem_Proprietary No ## Possible values: Yes/No Oem_Enable_Auth_Type_None No ## Possible values: Yes/No Oem_Enable_Auth_Type_Md2 No ## Possible values: Yes/No Oem_Enable_Auth_Type_Md5 No ## Possible values: Yes/No Oem_Enable_Auth_Type_Straight_Password No ## Possible values: Yes/No Oem_Enable_Auth_Type_Oem_Proprietary No EndSection Section Lan_Conf_Security_Keys ## Give string or blank to clear. Max 20 chars K_G EndSection Section Lan_Conf_Misc ## Possible values: Yes/No Enable_Gratuitous_Arps Yes ## Possible values: Yes/No Enable_Arp_Response No ## Give valid number. Intervals are 500 ms. Gratuitous_Arp_Interval 4 EndSection Section Rmcpplus_Conf_Privilege ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_0 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_1 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_2 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_3 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_4 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_5 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_6 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_7 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_8 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_9 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_10 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_11 Unused ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_12 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_13 Administrator ## Possible values: Unused/User/Operator/Administrator/OEM_Proprietary Maximum_Privilege_Cipher_Suite_Id_14 Administrator EndSection Section SOL_Conf ## Possible values: Yes/No Enable_SOL Yes ## Possible values: Callback/User/Operator/Administrator/OEM_Proprietary SOL_Privilege_Level Administrator ## Possible values: Yes/No Force_SOL_Payload_Authentication Yes ## Possible values: Yes/No Force_SOL_Payload_Encryption Yes ## Give a valid integer. Each unit is 5ms Character_Accumulate_Interval 50 ## Give a valid number Character_Send_Threshold 100 ## Give a valid integer SOL_Retry_Count 5 ## Give a valid integer. Interval unit is 10ms SOL_Retry_Interval 50 ## Possible values: Serial/9600/19200/38400/57600/115200 Non_Volatile_Bit_Rate 115200 ## Possible values: Serial/9600/19200/38400/57600/115200 Volatile_Bit_Rate 115200 EndSection .fi .SH "Section User1, User2, ..." The \fIUser\fR sections of the BMC configuration file are for username configuration for IPMI over LAN communication. The number of users available to be configured on your system will vary by manufacturer. With the exception of the Username for User1, all sections are identical. .LP The username(s) you wish to configure the BMC with are defined with \fIUsername\fR. The first username under Section User1 is typically the NULL username and cannot be modified. The password for the username can be specified with \fIPassword\fR. It can be left empty to define a NULL password. Each user you wish to enable must be enabled through the \fIEnable_User\fR configuration option. It is recommended that all usernames have non-NULL passwords or be disabled for security reasons. .LP \fILan_Enable_Ipmi_Msgs\fR is used to enable or disable IPMI over LAN access for the user. This should be set to "Yes" to allow IPMI over LAN tools to work. .LP \fILan_Privilege_Limit\fR specifies the maximum privilege level limit the user is allowed. Different IPMI commands have different privilege restrictions. For example, determining the power status of a machine only requires the "User" privilege level. However, power cycling requires the "Operator" privilege. Typically, you will want to assign atleast one user with a privilege limit of "Administrator" so that all system functions are available to atleast one user via IPMI over LAN. .LP \fILan_Session_Limit\fR specifies the number of simultaneous IPMI sessions allowed for the user. Most users will wish to set this to "0" to allow unlimited simultaneous IPMI sessions. This field is considered optional by IPMI standards, and may result in errors when attempting to configure it to a non-zero value. If errors to occur, setting the value back to 0 should resolve problems. .LP \fISOL_Payload_Access\fR specifies if a particular user is allowed to connect with Serial-Over-LAN (SOL). This should be set to "Yes" to allow this username to use SOL. .LP The example configuration above disables "User2" but enables the default "NULL" (i.e. anonymous) user. Many IPMI tools (both open-source and vendor) do not allow the user to input a username and assume the NULL username by default. If the tools you are interested in using allow usernames to be input, then it is recommended that one of the non-NULL usernames be enabled and the NULL username disabled for security reasons. It is recommeneded that you disable the NULL username in section User1, so that users are required to specify a username for IPMI over LAN communication. .LP Some motherboards may require a \fIUsername\fR to be configured prior to other fields being read/written. If this is the case, those fields will be set to \fI\fR. .SH "Section Lan_Channel" The Lan_Channel section configures a variety of IPMI over LAN configuration parameters. Both \fIVolatile\fR and \fINon_Volatile\fR configurations can be set. \fIVolatile\fR configurations are immediately configured onto the BMC and will have immediate effect on the system. \fINon_Volatile\fR configurations are only available after the next system reset. Generally, both the \fIVolatile\fR and \fINon_Volatile\fR should be configured identically. .LP The \fIAccess_Mode\fR parameter configures the availability of IPMI over LAN on the system. Typically this should be set to "Always_Available" to enable IPMI over LAN. .LP The \fIPrivilege_Limit\fR sets the maximum privilege any user of the system can have when performing IPMI over LAN. This should be set to the maximum privilege level configured to a username. Typically, this should be set to "Administrator". .LP Typically \fIUser_Level_Auth\fR and \fIPer_Message_Auth\fR should be set to "Yes" for additional security. Disabling \fIUser_Level_Auth\fR allows "User" privileged IPMI commands to be executed without authentication. Disabling \fIPer_Message_Auth\fR allows fewer individual IPMI messages to require authentication. .SH "Section Lan_Conf" Those familiar with setting up networks should find most of the fields in this section self explanatory. The example BMC configuration above illustrates the setup of a static IP address. The field \fIIP_Address_Source\fR is configured with "Static". The IP address, subnet mask, and gateway IP addresses of the machine are respecitvely configured with the \fIIP_Address\fR, \fISubnet_Mask\fR, \fIDefault_Gateway_Ip_Address\fR, and \fIBackup_Gateway_Ip_Address\fR fields. The respective MAC addresses for the IP addresses are configured under \fIMac_Address\fR, \fIDefault_Gateway_Mac_Address\fR, and \fIBackup_Gateway_Mac_Address\fR. .LP It is not required to setup the BMC \fIIP_Address\fR to be the same \fIP_Address\fR used by your operating system for that network interface. However, if you choose to use a different address, an alternate ARP configuration may need to be setup. .LP To instead setup your BMC network information via DHCP, the field \fIIP_Address_Source\fR should be configured with "Use_DHCP". .LP It is recommended that static IP addresses be configured for address resolution reasons. See .B Lan_Conf_Misc below for a more detailed explanation. .SH "Section Lan_Conf_Auth" This section determines what types of password authentication mechanisms are allowed for users at different privilege levels under the IPMI 1.5 protocol. The currently supported authentication methods for IPMI 1.5 are \fINone\fR (no username/password required), \fIStraight_Password\fR (passwords are sent in the clear), \fIMD2\fR (passwords are MD2 hashed), and \fIMD5\fR (passwords are MD5 hashed). Different usernames at different privilege levels may be allowed to authenticate differently through this configuration. For example, a username with "User" privileges may be allowed to authenticate with a straight password, but a username with "Administrator" privileges may be allowed only authenticate with MD5. .LP The above example configuration supports \fIMD2\fR and \fIMD5\fR authentication for all users at the "User", "Operator", and "Administrator" privilege levels. All authentication mechanisms have been disabled for the "Callback" privilege level. .LP Generally speaking, you do not want to allow any user to authenticate with \fINone\fR or \fIStraight_Password\fR for security reasons. \fIMD2\fR and \fIMD5\fR are digital signature algorithms that can minimally encrypt passwords. If you have chosen to support the NULL username (enabled User1) and NULL passwords (NULL password for User1), you will have to enable the \fINone\fR authentication fields above to allow users to connect via \fINone\fR. .SH "Section Lan_Conf_Security_Keys" This section supports configuration of the IPMI 2.0 (including Serial-over-LAN) K_g key. If your machine does not support IPMI 2.0, this field will not be configurable. .LP The key is used for two-key authentication in IPMI 2.0. In most tools, when doing IPMI 2.0, the K_g can be optionally specified. It is not required for IPMI 2.0 operation. .LP In the above example, we have elected to leave this field blank so the K_g key is not used. .SH "Section Lan_Conf_Misc" This section lists miscellaneous IPMI over LAN configuration options. These are optional IPMI configuration options that are not implemented on all BMCs. .LP Normally, a client cannot resolve the ethernet MAC address without the remote operating system running. However, IPMI over LAN would not work when a machine is powered off or if the IP address used by the operating system for that network interface differs from the BMC IP Address. One way to work around this is through gratuitous ARPs. Gratuitous ARPs are ARP packets generated by the BMC and sent out to advertise the BMC's IP and MAC address. Other machines on the network can store this information in their local ARP cache for later IP/hostname resolution. This would allow IPMI over LAN to work when the remote machine is powered off. The \fIEnable_Gratuitous_Arps\fR option allows you to enable or disable this feature. The \fIGratuitous_Arp_Interval\fR option allows you to configure the frequency at which gratuitous ARPs are sent onto the network. .LP Instead of gratuitous ARPs some BMCs are able to respond to ARP requests, even when powered off. If offerred, this feature can be enabled through the \fIEnable_Arp_Response\fR option. .LP Generally speaking, turning on gratuitous ARPs is acceptable. However, it will increase traffic on your network. If you are using IPMI on a large cluster, the gratuitous ARPs may easily flood your network. They should be tuned to occur less frequently or disabled. If disabled, the remote machine's MAC address should be permanently stored in the local ARP cache through .B arp(8). .LP See .B bmc-watchdog(8) for a method which allows gratuitous ARPs to be disabled when the operating system is running, but enabled when the system is down. .SH "Section Rmcpplus_Conf_Privilege" This section supports configuration of the IPMI 2.0 (including Serial-over-LAN) cipher suite IDs. If your machine does not support IPMI 2.0, the fields will not be configurable. .LP Each cipher suite ID describes a combination of an authentication algorithm, integrity algorithm, and encryption algorithm for IPMI 2.0. The authentication algorithm is used for user authentication with the BMC. The integrity algorithm is used for generating signatures on IPMI packets. The confidentiality algorithm is used for encrypting data. The configuration in this section enables certain cipher suite IDs to be enabled or disabled, and the maximum privilege level a username can authenticate with. .LP The following table shows the cipher suite ID to algorithms mapping: .LP .sp 0 - Authentication Algorithm = None; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 1 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 2 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = None .sp 3 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = AES-CBC-128 .sp 4 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-128 .sp 5 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-40 .sp 6 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 7 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = None .sp 8 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = AES-CBC-128 .sp 9 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-128 .sp 10 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-40 .sp 11 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = None .sp 12 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = AES-CBC-128 .sp 13 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-128 .sp 14 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-40 .LP Generally speaking, HMAC-SHA1 based algorithms are stronger than HMAC-MD5, which are better than MD5-128 algorithms. AES-CBC-128 confidentiality algorithms are stronger than xRC4-128 algorithms, which are better than xRC4-40 algorithms. Cipher suite ID 3 is therefore typically considered the most secure. Some users may wish to set cipher suite ID 3 to a privilege level and disable all remaining cipher suite IDs. .LP The above example configuration has decided to allow any user with "Administrator" privileges use any Cipher Suite algorithm suite which requires an authentication, integrity, and confidentiality algorithm. Typically, the maximum privilege level configured to a username should be set for atleast one cipher suite ID. Typically, this is the "Administrator" privilege. .LP A number of cipher suite IDs are optionally implemented, so the available cipher suite IDs available your system may vary. .SH "Section SOL_Conf" This section is for setting up Serial-Over-Lan (SOL) and will only be available for configuration on those machines. SOL can be enabled with the \fIEnable_SOL\fR field. The minimum privilege level required for connecting with SOL is specified by \fISOL_Privilege_Level\fR. This should be set to the maximum privilege level configured to a username that has SOL enabled. Typically, this is the "Administrator" privilege. Authentication and Encryption can be forced or not using the fields \fIForce_SOL_Payload_Authentication\fR and \fIForce_SOL_Payload_Encryption\fR respectively. It is recommended that these be set on. However, forced authentication and/or encryption support depend on the cipher suite IDs supported. .LP The \fICharacter_Accumulate_Interval\fR, \fICharacter_Send_Threshold\fR , \fISOL_Retry_Count\fR and , \fISOL_Retry_Interval\fR options are used to set SOL character output speeds. \fICharacter_Accumulate_Interval\fR determines how often serial data should be regularly sent and \fICharacter_Send_Threshold\fR indicates the character count that if passed, will force serial data to be sent. \fISOL_Retry_Count\fR indicates how many times packets must be retransmitted if acknowledgements are not received. \fISOL_Retry_Interval\fR indicates the timeout interval. Generally, the manufacturer recommended numbers will be sufficient. However, you may wish to experiment with these values for faster SOL throughput. .LP The \fINon_Volatile_Bit_Rate\fR and \fIVolatile_Bit_Rate\fR determine the baudrate the BMC should use. This should match the baudrate set in the BIOS and operating system, such as .B agetty(8). Generally speaking, both the \fIVolatile\fR and \fINon_Volatile\fR options should be set identically. .LP In addition to enabling SOL in this section, individual users most also be capable of connecting with SOL. See the section .B "Section User1, User2, ..." above for details. #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "SEE ALSO" freeipmi(7), bmc-watchdog(8), ipmi-config(8), agetty(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-dcmi.8.pre.in0000644002055400205540000002134213527331637017174 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmi-dcmi.8.pre.in,v 1.8 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" LLNL-CODE-413270 .\" .\" This file is part of Ipmi-Dcmi, tools and libraries to support the data center .\" manageability interface (DCMI). For details, see http://www.llnl.gov/linux/. .\" .\" Ipmi-Dcmi is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmi-Dcmi is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmi-Dcmi. If not, see . .\"############################################################################ .TH IPMI-DCMI 8 "@ISODATE@" "ipmi-dcmi @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-dcmi \- IPMI DCMI utility .SH "SYNOPSIS" .B ipmi-dcmi [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-dcmi is used to execute Data Center Manageability Interface (often referred to as DCM or DCMI) IPMI extension commands. DCMI extensions include support for asset management and power usage management. Most will be interested in DCMI for its power management features. By configuring an exception action, power limit, and correction time limit, power usage in a data center can be managed more affectively. Please see \fB\-\-set\-power\-limit\fR option below for more information. DCMI can also be configured using the \fIdcmi\fR category in .B ipmi-config(8). The DCMI specification encompasses many traditional IPMI features that are not implemented directly in this tool. Please see .B ipmiconsole(8) for Serial-over-LAN (SOL) support, .B ipmi-chassis(8) for power status, power control, identification, and ACPI power state information, .B ipmipower(8) for power status and power control, .B ipmi-sel(8) for System Event Log (SEL) information, .B bmc-info(8) for device and globally unique ID (guid) information, .B ipmi-sensors(8) for sensor readings, and .B ipmi-config(8) for configuration. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-admin.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-DCMI OPTIONS" The following options are specific to .B ipmi-dcmi. .TP \fB\-\-get\-dcmi\-capability\-info\fR Get DCMI capability information. .TP \fB\-\-get\-asset\-tag\fR Get asset tag. .TP \fB\-\-set\-asset\-tag\fR=\fISTRING\fR Set asset tag. .TP \fB\-\-get\-management\-controller\-identifier\-string\fR Get management controller identifier string tag. .TP \fB\-\-set\-management\-controller\-identifier\-string\fR=\fISTRING\fR Set management controller identifier string tag. .TP \fB\-\-get\-dcmi\-sensor\-info\fR Get DCMI sensor information. .TP \fB\-\-get\-system\-power\-statistics\fR Get system power statistics. .TP \fB\-\-get\-enhanced\-system\-power\-statistics\fR Get enhanced system power statistics. .TP \fB\-\-get\-power\-limit\fR Get power limit information. .TP \fB\-\-set\-power\-limit\fR Set power limit configuration. Can specify configuration via the \fB\-\-exception\-actions\fR, \fB\-\-power\-limit\-requested\fR, \fB\-\-correction\-time\-limit\fR, and \fB\-\-correction\-time\-limit\fR options listed below. If one or more options below are not specified, current configuration will be utilized. .TP \fB\-\-exception\-actions\fR=\fIBITMASK\fR Specify exception actions for set power limit configuration. Special case allowable values: NO_ACTION, HARD_POWER_OFF_SYSTEM, LOG_EVENT_TO_SEL_ONLY. Other values (e.g. 0x02 through 0x10) are OEM dependent. Used with the \fB\-\-set\-power\-limit\fR option. .TP \fB\-\-power\-limit\-requested\fR=\fIWATTS\fR Specify power limit for set power limit configuration. Input is specified in watts. Used with the \fB\-\-set\-power\-limit\fR option. .TP \fB\-\-correction\-time\-limit\fR=\fIMILLISECONDS\fR Specify correction time limit for set power limit configuration. Input is specified in milliseconds. Used with the \fB\-\-set\-power\-limit\fR option. .TP \fB\-\-statistics\-sampling\-period\fR=\fISECONDS\fR Specify management application statistics sampling period for set power limit configuration. Input is specified in seconds. Used with the \fB\-\-set\-power\-limit\fR option. .TP \fB\-\-activate\-deactivate\-power\-limit\fR=\fIOPERATION\fR Activate or deactivate power limit. Allowed values: ACTIVATE, DEACTIVATE. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Currently None .SH "EXAMPLES" .B # ipmi-dcmi --get-power-limit .PP Get power limit of the local machine. .PP .B # ipmi-dcmi -h ahost -u myusername -p mypassword --get-power-limit .PP Get power limit of a remote machine using IPMI over LAN. .PP .B # ipmi-dcmi -h mycluster[0-127] -u myusername -p mypassword --get-power-limit .PP Get power limit across a cluster using IPMI over LAN. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), ipmi-chassis(8), ipmi-config(8), ipmi-sel(8), ipmi-sensors(8), ipmiconsole(8), ipmipower(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-fru.8.pre.in0000644002055400205540000001713013527331637017054 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmi-fru.8.pre.in,v 1.47 2010-08-06 23:55:21 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmi-fru, a tool used for retrieving motherboard .\" field replaceable unit (FRU) information. For details, .\" see http://www.llnl.gov/linux/. .\" .\" Ipmi-fru is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmi-fru is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmi-fru. If not, see . .\"############################################################################# .TH IPMI-FRU 8 "@ISODATE@" "ipmi-fru @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-fru \- display FRU information .SH "SYNOPSIS" .B ipmi-fru [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-fru displays Field Replaceable Unit (FRU) Information. The FRU may hold a variety of information, such as device information, hardware information, serial numbers, and part numbers. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-user.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-user.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-FRU OPTIONS" The following options are specific to .B ipmi-fru. .TP \fB\-e\fR, \fB\-\-device-id\fR=\fIIDNUM\fR Specify a specific FRU device ID. .TP \fB\-v\fR, \fB\-\-verbose\fR Increase verbosity in output to include additional output. .if 0 \{ .TP \fB\-s\fR, \fB\-\-skip-checks\fR Skip FRU checksum checks. Some FRUs have incorrect checksums, but the FRU data is correct. Use this option to skip the checks checksum. Output may be unknown, pray for the best. This option is confirmed to work around compliances issues on Inventec 5441/Dell Xanadu II, Dell Poweredge R610, and Dell Poweredge R710 motherboards. \} .TP \fB\-\-bridge\-fru\fR By default, FRU entries on other satellite controllers will not be read by default. Bridging may not work on some interfaces/driver types. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> .TP \fB\-\-fru-file\fR=\fIFILENAME\fR Output data from the specified FRU binary file instead of reading FRU data off of a board. #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-ignore.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> .LP \fIskipchecks\fR - This workaround option will skip FRU checksum checks. Some FRUs have incorrect checksums, but the FRU data is correct. Those hitting this issue may see "checksum invalid" errors in their FRU output. Output may be unknown, pray for the best. This option is confirmed to work around compliances issues on Inventec 5441/Dell Xanadu II, Dell Poweredge R610, and Dell Poweredge R710 motherboards. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Wistron/Dell Poweredge C6220 .SH "EXAMPLES" .B # ipmi-fru .PP Get FRU information of the local machine. .PP .B # ipmi-fru --verbose .PP Get verbose FRU information of the local machine. .PP .B # ipmi-fru -h ahost -u myusername -p mypassword .PP Get FRU information of a remote machine using IPMI over LAN. .PP .B # ipmi-fru -h mycluster[0-127] -u myusername -p mypassword .PP Get FRU information across a cluster using IPMI over LAN. .PP .SH "IPMI-FRU KNOWN ISSUES" Not all language codes are supported in .B ipmi-fru. If additional language code support is required please contact the FreeIPMI maintainers. #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), ipmi-config(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-locate.8.pre.in0000644002055400205540000000171613527331637017532 0ustar00achuachu00000000000000.TH IPMI-LOCATE 8 "@ISODATE@" "IPMI Locate version @PACKAGE_VERSION@" "System Commands" .SH "NAME" IPMI \- IPMI probing utility .SH "SYNOPSIS" .B ipmi-locate [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-locate probes and displays information about a BMC device, such as device addresses or IPMI version support. .B Ipmi-locate is sometimes used to determine if IPMI can be found on your system. Users are cautioned though, the failure to discover IPMI via .B Ipmi-locate is not sufficient to disprove that IPMI exists on your system. Your system may not publish such information or may expect clients to communicate at default locations. .SH "OPTIONS" #include <@top_srcdir@/man/manpage-common-misc.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2005-2015 FreeIPMI Core Team #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-oem.8.pre.in0000644002055400205540000022157413527331637017051 0ustar00achuachu00000000000000.TH IPMI-OEM 8 "@ISODATE@" "IPMI OEM version @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-oem \- IPMI OEM utility .SH "SYNOPSIS" .B ipmi-oem [\fIOPTION\fR...] <\fIOEMID\fR> <\fIOEMCOMMAND\fR> [\fIOEMOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-oem is used to execute OEM specific IPMI commands. It is intended to provide a better user interface for OEM specific IPMI commands rather than using .B ipmi-raw(8). Please see SUPPORTED OEM IDS and COMMANDS below for a list of supported OEM specific IPMI commands. A list of supported OEM specific commands may also be generated using the \fB\-\-list\fR option. There are no guarantees that the below OEM commands will work on any particular motherboard. OEM extensions may or may not exist on particular hardware revisions and/or firmware revisions of motherboards. The extensions may or may not function for other lines of motherboards from the same manufacturer. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> .TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The required user privilege will depend on the oem commands executed. #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> .SH "IPMI-OEM OPTIONS" The following options are specific to .B ipmi-oem. .TP \fB\-L\fR, \fB\-\-list\fR List supported OEM IDs and Commands. .TP \fB\-v\fR, \fB\-\-verbose\fR Output verbose information. Additional output will depend on specific OEM ID and OEM COMMANDS specified. .SH "SUPPORTED OEM IDS and COMMANDS" The currently supported OEM IDs and COMMANDs are listed below. The special OEM ID of .B list may be passed into the list all supported OEM IDs and Commands. The special OEM command .B list may be passed to any OEM ID to list commands supported by that OEM ID. .TP .B Dell .RS .TP .B get-system-info \fIKEY\fR This OEM command can retrieve the motherboard system information. Valid keys are \fIguid\fR, \fIasset\-tag\fR, \fIservice\-tag\fR, \fIchassis\-service\-tag\fR, \fIchassis\-related\-service\-tag\fR, \fIboard\-revision\fR, \fIplatform\-model\-name\fR, \fIblade\-slot\-info\fR, \fIsystem\-revision\fR, \fIidrac\-info\fR, \fIidrac\-ipv4\-url\fR, \fIidrac\-gui\-webserver\-control\fR, \fIcmc\-info\fR, \fIcmc\-ipv4\-url\fR, \fIcmc\-ipv6\-info\fR, \fIcmc\-ipv6\-url\fR, \fImac\-addresses\fR. Command confirmed to work on Dell Poweredge 2900, 2950, R610, R710, R720, M600, M610, M610X, M910, and R905. However, individual system information options may not be readable or available on every system. .TP .B get-nic-selection This OEM command will determine the current NIC selection for IPMI as dedicated, shared, shared w/ failover to NIC2, or shared w/ failover to all. Dedicated indicates IPMI is only available on an expansion card, shared indicates IPMI is available on NIC1, shared w/ failover to NIC2 indicates IPMI is available on NIC1 w/ failover to NIC2 on NIC1's failure, and shared w/ failover to all indicates IPMI is available on NIC1 w/ failover to all other NICs in the event of NIC failure. Command confirmed to work on Dell Poweredge 2900, 2950, R610, R710, and R905. .TP .B set-nic-section \fIdedicated|shared|shared_failover_nic2|shared_failover_all\fR This OEM command will set the current NIC selection to dedicated, shared, shared_failover_nic2, or shared_failover_all. (See \fIget\-nic\-selection\fR above for description on inputs.) On older Poweredge systems, \fIshared_failover_nic2\fR may have been documented as just \fIfailover\fR. Command confirmed to work on Dell Poweredge 2900, 2950, R610, R710, and R905. .TP .B get-nic-selection-failover This OEM command will determine the current NIC selection for IPMI and the failover NIC. Command confirmed to work on Dell Poweredge R720 (Dell 12G Poweredge systems). .TP .B set-nic-section-failover \fIdedicated|lom1|lom2|lom3|lom4\fR \fInone|lom1|lom2|lom3|lom4|all\fR This OEM command will set the current NIC selection for IPMI and the failover NIC. The first option sets the IPMI NIC and the second option the failover NIC. Command confirmed to work on Dell Poweredge R720 (Dell 12G Poweredge systems). .TP .B get-active-lom-status \fI[v1|v2]\fR This OEM command will get the current NIC being used for out of band management and possibly additional information. Users may specify if version 1 or version 2 of this extension should be executed. If no version is specified, version 1 is exectued. Version 1 of this command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). Version 2 of this command confirmed to work on Dell Poweredge R720 (Dell 12G Poweredge systems). .TP .B get-ssh-config This OEM command will get the current SSH configuration on the IPMI card. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B set-ssh-config \fIKEY=VALUE ...\fR This OEM command will set the current SSH configuration on the IPMI card. The possible keys and values are \fIssh=enable|disable\fR, \fIidletimeout=seconds\fR, and \fIportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-telnet-config This OEM command will get the current telnet configuration on the IPMI card. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B set-telnet-config \fIKEY=VALUE ...\fR This OEM command will set the current Telnet configuration on the IPMI card. The possible keys and values are \fItelnet=enable|disable\fR, \fIsessiontimeout=seconds\fR, \fIportnumber=num\fR, and \fI7fls=enable|disable\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-web-server-config This OEM command will get the current web server configuration on the IPMI card. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B set-web-server-config \fIKEY=VALUE ...\fR This OEM command will set the current Web Server configuration on the IPMI card. The possible keys and values are \fIwebserver=enable|disable\fR, \fIsessiontimeout=seconds\fR, \fIhttpportnumber=num\fR, and \fIhttpsportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-active-directory-config This OEM command will get the current active directory configuration on the IPMI card. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B set-active-directory-config This OEM command will set the current Web Server configuration on the IPMI card. The possible keys and values are \fIactivedirectory=enable|disable\fR, \fItimeout=seconds\fR, .if 0 \{ \fIrootdomain=string\fR, \fIracdomain=string\fR, \fIracname=string\fR, \} \fItype=extended|standard\fR, .if 0 \{ \fIsmartcardlogon=enable|disable\fR, \fIcertificaterevocationlist=enable|disable\fR, \} \fIsso=enable|disable\fR, .if 0 \{ \fIdcfilter1=string\fR, \fIdcfilter2=string\fR, \fIdcfilter3=string\fR, \fIgcfilter1=string\fR, \fIgcfilter2=string\fR, \fIgcfilter3=string\fR, \} and \fIcertificatevalidation=enable|disable\fR. If no key=value pairs are specified, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B reset-to-defaults This OEM command will reset the BMC configuration back to default values. The command will spin until the reset is confirmed to be complete. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-power-consumption-data This OEM command can retrieve power consumption data. Command confirmed to work on Dell Poweredge R610, R710, R905, M610, M610x, and M910. .TP .B reset-power-consumption-data \fIcumulative|peak\fI This OEM command can reset the cumulative or peak power consumption data (viewed via \fBget\-power\-consumption\-data\fR). Command confirmed to work on Dell Poweredge R610, R710, R905, M610, M610x, and M910. .TP .B power-supply-info This OEM command can read and output power supply ratings and other information. This OEM command requires access to the SDR. Command confirmed to work on Dell Poweredge R610, R710, and M610. .TP .B get-instantaneous-power-consumption-data \fIpower_supply_instance\fR This OEM command can read instantaneous power consumption data. If a power supply instance number is specified, only data for that instance will be gathered. Otherwise, collective power consumption will be gathered. Command confirmed to work on Dell Poweredge R610, R710, M610, M610x, and M910. .TP .B get-power-head-room This OEM command can read power head room. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-power-consumption-statistics \fIaverage|max|min\fR This OEM command can read average, max, or min power consumption history. Command confirmed to work on Dell Poweredge R610, R710, M610, M610x, and M910. .TP .B get-power-capacity This OEM command can read the current power capacity. Command confirmed to work on Dell Poweredge R610, R710, M610, M610x, and M910. .TP .B set-power-capacity \fIpower-capacity\fR This OEM command can write the current power capacity (specified in Watts). Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-power-capacity-status This OEM command can determine if the current power capacity is enabled or disabled. Command confirmed to work on Dell Poweredge R610, R710, M610, M610x, and M910. .TP .B set-power-capacity-status \fIenable|disable\fR This OEM command can configure the current power capacity to be enabled or disabled. Command confirmed to work on Dell Poweredge R610 and R710 (Dell 11G Poweredge systems). .TP .B get-chassis-identify-status This OEM command will retrieve the current chassis identify (i.e. LED) status. Command confirmed to work on Dell Poweredge 2900, 2950, R610, R710, R905, M600, M610, M610x, and M910. .TP .B power-monitoring-over-interval \fIinterval\fR \fIsystempower|cpu1|cpu2|cpu3|cpu4|memory1|memory2|memory3|memory4|drives|fans|pciecards|gpucables\fR This OEM command will retrieve power consumption information from a specified subsystem for a specified interval time. If the interval is between 30 and 900s, the average, minimum, and maximum power value can also be retrieved. If the interval is between 5 and 30 seconds, only the average power consumption can be returned. See \fIpower\-monitoring\-interval\-range\fR below to determine legal intervals for each subsystem. Command confirmed to work on Dell Poweredge R720 (Dell 12G Poweredge systems). .TP .B power-monitoring-interval-range \fIsystempower|cpu1|cpu2|cpu3|cpu4|memory1|memory2|memory3|memory4|drives|fans|pciecards|gpucables\fR This OEM command will retrieve the monitoring intervals for a specified subsystem. Command confirmed to work on Dell Poweredge R720 (Dell 12G Poweredge systems). .if 0 \{ .TP .B get-blade-slot-id This OEM command will retrieve the current blade slot ID. Command confirmed to work on Dell Poweredge R720. \} .TP .B get-last-post-code This OEM command will retrieve the last POST code and error string for it. Command confirmed to work on Dell Poweredge R720. .TP .B slot-power-toggle \fIslot-number\fR This OEM command will perform a power toggle on a PCIe slot. The PCIe slot number can range from 1 to 16. Command confirmed to work on Dell Poweredge C410x. .TP .B slot-power-control \fIplatform\-model\fR \fIon|off|status\fR \fIslot-number\fR This OEM command will perform a power control action on a PCIe slot. This OEM extension is tied very closely to a platform, so a supported platform must be specified. The currently supported \fIplatform\-model\fR options are \fIC410x\fR. The \fIon\fR action powers on a slot, \fIoff\fR powers off a slot, and \fIstatus\fR returns if the current power is on or off. If the current power status is on, an \fIon\fR action does nothing. Similarly, if the current power status is off, an \fIoff\fR action does nothing. The \fIon\fR, \fIoff\fR, and \fIstatus\fR slot power actions are not native and are emulated through a combination of a power toggle (using \fIslot\-power\-toggle\fR above) and the reading of PCIe slot watt sensors. The PCIe slot number can range from 1 to 16. Command confirmed to work on Dell Poweredge C410x. .TP .B get-port-map This OEM command will retrieve the current iPASS mapping to PCIe controllers/slots. Command confirmed to work on Dell Poweredge C410x. .TP .B set-port-map \fIjumper|bmc\fR \fIipass\-mapping\fR \fI1:2|1:4|1:8\fR This OEM command will set an iPass mapping to PCIe controllers/slots. \fIjumper\fR or \fIbmc\fR must be specified to indicate if iPass mappings will be controlled via jumpers on the system or via a BMC/IPMI. In order for reconfiguration to be done via \fBipmi\-oem\fR, the user must select \fIbmc\fR. The \fIipass\-mapping\fR determines which iPass ports will be mapped. \fI1:2\fR, \fI1:4\fR, and \fI1:8\fR determine the mapping that should be set. See details below for specific platforms. Command confirmed to work on Dell Poweredge C410x. For the Dell Poweredge C410x, the \fIipass\-mapping\fR ranges from 1 to 4. \fI1\fR refers to iPass 1 and 5, \fI2\fR to 2 and 6, \fI3\fR to 3 and 7, and \fI4\fR to 4 and 8. For the platform \fIC410x\fR, PCIe slots 1, 2, 3, 4, 13, 14, 15, and 16 are attached to iPass 1, 2, 3, and 4. PCIe slots 5, 6, 7, 8, 9, 10, 11, and 12 are attached to iPass 5, 6, 7, and 8. For example, if \fI1:2\fR is set on \fImapping-number\fR \fI1\fR, PCIe slots 1 and 15 will be assigned to iPass 1 and slots 2 and 16 will be assigned to iPass 5. if \fI1:4\fR is chosen, PCIe slots 1, 2, 15, and 16 will be assigned to iPass 1 and iPass 5 will not be used. .RE .TP .B Fujitsu .RS .TP .B get-power-on-source This OEM command will return the reason for the most recent Power On. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-power-off-source This OEM command will return the reason for the most recent Power Off. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-remote-storage-status \fIconnection_number\fR This OEM command will return the connection and/or status of remote storage. \fIconnection_number\fR currently supports a range of 0-1. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-system-status This OEM command will return the current system status. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-eeprom-version-info \fIeeprom_number\fR This OEM command will return the current version info for various hardware elements, including firmware, SDR, and boot revision. \fIeeprom_number\fR currently supports a range of 0-1. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-identify-led This OEM command will get the current identify LED status. Command confirmed to work on Fujitsu RX100 S5. .TP .B set-identify-led \fIon|off\fR This OEM command will set the current identify LED status. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-error-led This OEM command will get the current error LED status. Command confirmed to work on Fujitsu RX100 S5. .TP .B get-sel-entry-long-text \fIsel_record_id\fR This OEM command will retrieve the Fujitsu specific string interpretation of a SEL record. This command may be useful for interpreting Fujitsu OEM hex codes found in the SEL. A specific SEL record ID must be specified. Please see .B ipmi-sel(8), for retrieving SEL records. Command confirmed to work on Fujitsu RX100 S5. .RE .TP .B GIGABYTE .RS .TP .B get-nic-mode This OEM command will determine the current NIC mode as dedicated, shared, or failover. Dedicated indicates IPMI is only available on the dedicated management port. Shared indicates IPMI is also available on one of the primary ethernet ports. Failover indicates IPMI is dedicated but can failover to another if the primary port fails. Command confirmed to work on GIGABYTE MD90-FS0-ZB. .TP .B set-nic-mode \fIdedicated|shared|failover\fR This OEM command will set the current NIC mode to dedicated, shared, or failover. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared vs failover modes.) Command confirmed to work on GIGABYTE MD90-FS0-ZB. .TP .B get-bmc-services This OEM command will display the enable/disable state of BMC services besides IPMI. Command confirmed to work on GIGABYTE MD90-FS0-ZB. .TP .B set-bmc-services \fIenable|disable\fR \fIssh|http|rpcbind|svrloc|https|avocenkvm|wbem-http|wbem-https\fR This OEM command will enable or disable BMC services besides IPMI. Command confirmed to work on GIGABYTE MD90-FS0-ZB. .RE .TP .B IBM .RS .TP .B get-led This OEM command will get the current LED status. This OEM command requires access to the SDR. Command confirmed to work on IBM x3755. .RE .TP .B Intel .RS .TP .B get-smtp-config \fI[channel\-number]\fR This OEM command will get the current SMTP configuration on the IPMI card. By default, configuration for every LAN channel will be output. If a \fIchannel\-number\fR is specified, only that specific channel number's configuration will be output. Command confirmed to work on Intel S5500WB (Penguin Computing Relion 700) and Intel S2600JF (Appro 512X). .TP .B set-smtp-config \fI[channel\-number]\fR \fIKEY=VALUE...\fR This OEM command will set the current SMTP configuration on the IPMI card. By default, configuration will be done for all LAN channels. If a \fIchannel\-number\fR is specified, only that specific channel number's configuration will be configured. The possible keys and values are \fIsmtp=enable|disable\fR, \fIsmtpserveraddress=ipaddress\fR, \fIsmtpusername=string\fR, \fIuserpassword=string\fR, \fIemailaddress=string\fR, \fIsubject=string\fR, \fImessagecontent=string\fR, \fIsenderemailaddress=string\fR, and \fIsmtphostname=string\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Intel S5500WB (Penguin Computing Relion 700) and Intel S2600JF (Appro 512X). .TP .B get-power-restore-delay This OEM command will retrieve the power on delay. The power on delay is a delay that occurs whenever the BMC turns on the system according to the Power Restore Policy setting. It does not take effect otherwise (i.e. power button or Chassis Control). Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-power-restore-delay \fIseconds\fR This OEM command will set the power on delay. (See \fIget\-power\-restore\-delay\fR above for description on power restore delay). Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B get-bmc-services This OEM command will get the current status of BMC services such as ssh, http, rmcp, and kvm. Command confirmed to work on Intel S2600WT2. .TP .B set-bmc-services \fIenable|disable\fR \fIssh|http|rmcp|kvm\fR This OEM command will enable or disable BMC services besides IPMI. Note that \fIhttp\fR refers to both http and https. Command confirmed to work on Intel S2600WT2. .TP .B restore-configuration This OEM command will restore BMC configuration values back to default values. The command will spin until the restore is confirmed to be complete. Command configured to work on Intel S5500WB (Penguin Computing Relion 700) and Intel S2600JF (Appro 512X). After running this command, the BMC must be reset to return it to functioning status. This may be accomplished by executing a cold-reset with .B bmc-device(8). .RE .TP .B IntelNM (Intel Node Manager) .LP The following OEM commands operate on Intel chipsets with Node Manager support. They all require access to the SDR. They may work on multiple vendors motherboards. .LP .RS .TP .B get-node-manager-statistics mode=globalpower|globaltemp|globalthrottling|globalvolumetricairflow|globaltempairflow|globalchassispower|policypower|policytrigger|policythrottling|hostunhandledrequests|hostresponsetime|cputhrottling|memorythrottling|hostcommfailure \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will output Intel Node Manager statistics. A \fImode\fR indicating statistics to output must be specified. The user may optionally specify a \fIdomainid\fR or \fIpolicyid\fR, although certain \fImode\fR options may require it. \fIdomainid\fR defaults to \fIplatform\fR. Command confirmed to work on Intel S5500WB (Penguin Computing Relion 700), Inventec 5441/5442 (Dell Xanadu II/III), Quanta S99Q (Dell FS12-TY), Quanta QSSC-S4R (Appro GB812X-CN), Supermicro X9DRi-F, Intel S2600JF (Appro 512X). .TP .B reset-node-manager-statistics \fI[mode=global|policy|hostunhandledrequests|hostresponsetime|cputhrottling|memorythrottling|hostcommfailure]\fR \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will reset Intel Node Manager statistics. The \fImode\fR will indicate the statistics to be reset. The user may optionally specify a \fIdomainid\fR or \fIpolicyid\fR. \fIdomainid\fR defaults to \fIplatform\fR. If a \fImode\fR is not specified, it will default to \fIglobal\fR or \fIpolicy\fR, depending on whether or not a \fIpolicyid\fR is specified. Command confirmed to work on Intel S5500WB (Penguin Computing Relion 700), Inventec 5441/5442 (Dell Xanadu II/III), Quanta S99Q (Dell FS12-TY), Quanta QSSC-S4R (Appro GB812X-CN), Supermicro X9DRi-F, Intel S2600JF (Appro 512X). .TP .B get-node-manager-capabilities \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policytrigger=none|inlettemperaturelimitpolicytrigger|missingpowerreadingtimeout|timeafterplatformresettrigger|boottimepolicy]\fR \fI[policytype=powercontrol]\fR \fI[policypowerdomain=primary|secondary]\fR This OEM command will output the current capabilities of the Intel Node manager. The user may optionally specify a \fIdomainid\fR, \fIpolicytrigger\fR, \fIpolicytype\fR, or \fIpolicypowerdomain\fR. Note that \fIpolicypowerdomain\fR is only applicabale to domain id \fIplatform\fR. If any particular option is not specified, all permutations of the remaining options will be used in an attempt to output all capabilities of the system. If the verbose option is set, additional error messages will be output as valid policies are being searched for. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B node-manager-policy-control \fI\fR \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will enable or disable the current global, domain, or policies used by the Intel Node Manager. If no \fIdomainid\fR is specified, then the Node Manager will be enabled or globally disabled. If a \fIdomainid\fR is specified, only that domain will be enabled or disabled. If both a \fIdomainid\fR and \fIpolicyid\fR are specified, only that specific policy within the domain will be specified. This OEM command will be required to enable or disable policies before many of the commands below can be used for configuration or use. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B get-node-manager-policy \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will get the current node manager policy. If no \fIdomainid\fR is specified, all policies for all domain IDs and policy Ids will be attempted to be output. If a \fIdomainid\fR is specified but a \fIpolicyid\fR is not, all policies within a domain will be attempted to be output. If the verbose option is set, additional error messages will be output as valid policies are being searched for. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-node-manager-policy \fIdomainid=platform|cpu|memory|highpowerio\fR \fIpolicyid=num\fR \fIpolicytrigger=none|inlettemperaturelimitpolicytrigger|missingpowerreadingtimeout|timeafterplatformresettrigger|boottimepolicy\fR \fIpolicytargetlimit=num\fR [platformbootingmode=performance|power] \fIcorrectiontimelimit=ms\fR \fIstatisticsreportingperiod=seconds\fR policystorage=persistent|volatile [\fIpolicytriggerlimit=num\fR] \fI[policystate=enable|disable]\fR \fI[policyexceptionaction=alert|shutdown]\fR \fI[aggressivepowercorrection=automatic|notaggressive|aggressive]\fR \fI[policypowerdomain=primary|secondary]\fR This OEM command will add or modify an indicated policy ID from the domain ID. Most of the fields above are required, although they can be listed in any order. By default any created/modified policy will be enabled, however this can be overridden by \fIpolicystate\fR. \fIpolicyexceptionaction\fR may be specified multiple times to configure multiple actions or can be skipped to configure no actions. When the \fIpolicytrigger\fR is configured as \fInone\fR, the trigger that will lead to exception actions is the value specified by the \fIpolicytargetlimit\fR. When the \fIpolicytrigger\fR is \fIinlettemperaturelimitpolicytrigger\fR, \fImissingpowerreadingtimeout\fR, or \fItimeafterplatformresettrigger\fR, the tigger that will lead to exception actions is the value specified by \fIpolicytriggerlimit\fR. When the \fIfIpolicytrigger\fR is \fIboottimepolicy\fR, a power profile will simply be maintained by the value specified by \fIpolicytargetlimit\fR. \fIaggressivepowercorrection\fR defaults to automatic. It can only be set to \fInotaggressive\fR or \fIaggressive\fR if the \fIdomainid\fR is \fIplatform\fR or \fIcpu\fR. \fIpolicystorage\fR determines if the policy being configured can survive across resets of the machine. The units of the \fIpolicytargetlimit\fR depends on the \fIpolicytrigger\fR selected. If the \fIpolicytrigger\fR is \fInone\fR, \fIinlettemperaturelimitpolicytrigger\fR, or \fItimeafterplatformresettrigger\fR, the units will be in Watts. If the \fIpolicytrigger\fR is \fImissingpowerreadingtimeout\fR, the units will be in percent, where 100 means maximum throttling. If the \fIpolicytrigger\fR is \fIboottimepolicy\fR, the units is number of CPUs. In addition, \fIplatformbootingmode\fR must be set to performance or power to indicate optimization mode. \fIpolicytriggerlimit\fR is sometimes required, given the input to \fIpolicytrigger\fR. The units of the \fIpolicytriggerlimit\fR will depend on the \fIpolicytrigger\fR selected. If the \fIpolicytrigger\fR is \fIinlettemperaturelimitpolicytrigger\fR, the units of \fRpolicytriggerlimit\fR will be in Celsius. If the \fIpolicytrigger\fR is \fImissingpowerreadingtimeout\fR or \fItimeafterplatformresettrigger\fR, the units will be in seconds. If the \fIpolicytrigger\fR is \fInone\fR or \fIboottimepolicy\fR, the \fIpolicytriggerlimit\fR is ignored internally by the Intel Node Manager and need not be specified.. Typically configuring it to 0 is more than sufficient. The \fIcorrectiontimelimit\fR specifies the time the Node Manager must take corrective actions to bring back the system within limits before taking the actions specified in \fIpolicyexceptionaction\fR. \fIstatisticsreportingperiod\fR is the number of seconds that measured power will be averaged for reporting. Please see \fBget\-node\-manager\-policy\fR to determine proper ranges for \fIpolicytargetlimit\fR, \fIcorrectiontimelimit\fR, \fIpolicytriggerlimit\fR, and \fIstatisticsreportingperiod\fR. If \fIdomainid\fR is configured as \fIplatform\fR, user may optionally set \fIpolicypowerdomain\fR to \fIprimary\fR or \fIsecondary\fR. Otherwise \fIpolicypowerdomain\fR will be ignored. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B remove-node-manager-policy \fIdomainid=platform|cpu|memory|highpowerio\fR \fIpolicyid=num\fR This OEM command will remove the indicated policy ID from the domain ID. Both the \fIdomainid\fR and \fIpolicyid\fR are required. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B get-node-manager-policy-alert-thresholds \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will get the current alert thresholds. If no \fIdomainid\fR is specified, all alert thresholds for domain IDs and policy Ids will be attempted to be output. If a \fIdomainid\fR is specified but a \fIpolicyid\fR is not, all alert thresholds within a domain will be attempted to be output. The units of the thresholds will depend on the configuration of the current policy. If the verbose option is set, additional error messages will be output as valid policies are being searched for. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-node-manager-policy-alert-thresholds \fIdomainid=platform|cpu|memory|highpowerio\fR \fIpolicyid=num\fR \fI[threshold1=num]\fR \fI[threshold2=num]\fR \fI[threshold3=num]\fR This OEM command will set the alert thresholds for a given domain ID and policy ID. Up to three thresholds can be specified, The units of the thresholds will depend on the configuration of the current policy. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B get-node-manager-policy-suspend-periods \fI[domainid=platform|cpu|memory|highpowerio]\fR \fI[policyid=num]\fR This OEM command will get the current policy suspend periods. Suspend periods will temporarily disable Intel Node Manager policies at configured times. If no \fIdomainid\fR is specified, all suspend periods for domain IDs and policy Ids will be attempted to be output. If a \fIdomainid\fR is specified but a \fIpolicyid\fR is not, all suspend periods within a domain will be attempted to be output. If the verbose option is set, additional error messages will be output as valid policies are being searched for. Suspend start and stop times are output in 24 hour format. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-node-manager-policy-suspend-periods \fIdomainid=platform|cpu|memory|highpowerio\fR \fIpolicyid=num\fR \fIsuspendperiodstart1=time\fR \fIsuspendperiodstop1=time\fR \fIsuspendperiodrepeat1=monday|tuesday|wednesday|thursday|friday|saturday|sunday\fR ... This OEM command will set the policy suspend periods for a policy. Suspend periods will temporarily disable Intel Node Manager policies at configured times. Up to 5 suspend periods can be specified by \fIsuspendperiodstartX\fR, \fIsuspendperiodstopX\fR, \fIsuspendperiodrepeatX\fR. \fIsuspendperiodstart\fR and \fIsuspendperiodstop\fR specify the start and stop time since midnight for a suspend period. The time should be specified in 24 hour format (i.e. 02:00 or 13:40). Note that suspend periods are configured in multiples of 6 minutes, therefore the stored configuration may be rounded to a slightly alternate configuration. \fIsuspendperiodrepeat\fR indicates the days in which the suspend period shall be enabled. The option can be specified multiple times to configure multiple times. Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-node-manager-power-draw-range \fIdomainid=platform|cpu|memory|highpowerio\fR \fIminpowerdrawrange=watts\fR \fImaxpowerdrawrange=watts\fR This OEM command will set the power draw range for a given domain ID. After this configuration, any policies within the domain ID that are outside of this range will be disabled as needed. The current power draw range can be read via the \fBget\-node\-manager\-capabilities\fR above. Command confirmed to work on Intel S2600JF (Appro 512X). .if 0 \{ .TP .B get-limiting-policy-id \fIdomainid=platform|cpu|memory\fR This OEM command will get the policy which is currently limiting. \} .TP .B get-node-manager-alert-destination This OEM command will get the current alert destination information. Some of the configuration information output by this command will need to be correlated to BMC device channel and PEF configuration. BMC device channel information can be viewed via .B bmc-info(8). PEF configuration can be viewed via .B ipmi-config(8). Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B set-node-manager-alert-destination \fI[channelnumber=num]\fR \fI[slaveaddress=address]\fR \fI[destinationselector=num]\fR \fI[alertstringselector=num]\fR \fI[sendalertstring=yes|no]\fR \fI[register=yes|no]\fR This OEM command will set the current alert receiver. By default, this command will attempt to register an alert (identical to \fIregister=yes\fR). When registering an alert receiver the \fIchannelnumber\fR, \fIalertstringselector\fR, and \fIsendalertstring\fR options must be specified. The \fIslaveaddress\fR or \fIdestinationselector\fR must also be specified, depending on the channel number specified. If \fIregister=no\fR, most of these options are not required. Appropriate channel number input can be determined via .B bmc-info(8). Destination selector and alert string selector information can be determined via .B ipmi-config(8). Command confirmed to work on Intel S2600JF (Appro 512X). .TP .B get-turbo-synchronization-ratio \fIactivecoresconfig=num|all\fR \fI[cpusocket=num|all]\fR This OEM command will get the current Turbo Synchronization Ratio. If \fIcpusocket\fR is not set to a specific cpu socket, all sockets will return maximum settings. .TP .B set-turbo-synchronization-ratio \fIturboratiolimit=num|default\fR \fI[cpusocket=num|all]\fR \fI[activecoresconfig=num|all]\fR, This OEM command will set the Turbo Synchronization Ratio. If \fIcpusocket\fR is not set to a specific cpu socket, it assumed to be applied to all cores. If \fIactivecore\fR is not set, it is assumed to be for all cores. .TP .B get-node-manager-version This OEM command will output the current Intel Node Manager version information. Command confirmed to work on Intel S5500WB (Penguin Computing Relion 700), Inventec 5441/5442 (Dell Xanadu II/III), Quanta S99Q (Dell FS12-TY), Quanta QSSC-S4R (Appro GB812X-CN), Intel S2600JF (Appro 512X). .RE .TP .B Inventec .RS .TP .B get-nic-mode This OEM command will determine the current NIC mode as dedicated or shared. Dedicated indicates IPMI is only available on the dedicated management port. Shared indicates IPMI is also available on one of the primary ethernet ports. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-nic-mode \fIdedicated|shared\fR This OEM command will set the current NIC mode to dedicated or shared. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) This OEM command may internally reset the BMC, making the BMC unusable for awhile. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-mac-address This command will retrieve the BMC MAC address. This is actually not an OEM command, but rather the normal IPMI MAC address command (identical to what is used in the .B ipmi-config(8) tool). This command is placed here for convenience. .TP .B set-mac-address \fIdedicated|shared\fR \fIMACADDR\fR This OEM command will set the dedicated or shared BMC MAC address. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) The BMC MAC address cannot be set through the normal IPMI MAC address command (what is used in the .B ipmi-config(8) tool). The MACADDR should be specified in XX:XX:XX:XX:XX:XX form. A shared BMC MAC address may conflict with normal communication ethernet communication on the primary ethernet port. Users may wish to configuration an alternate MAC address instead. After configuration of the MAC address, the BMC must be reset. This may be accomplished by executing a cold-reset with .B bmc-device(8). Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-bmc-services This OEM command will display the currently enabled BMC services. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-bmc-services \fIenable|disable\fR \fIall|kvm|http|ssh\fR This OEM command will enable or disable other BMC services besides IPMI. \fIall\fR can be specified to enable/disable all services, \fIkvm\fR specifies KVM and Virtual Storage, \fIhttp\fR specifies HTTP and HTTPS, and \fIssh\fR specifies both SSH and Telnet. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-authentication-config This OEM command will display additional OEM authentication settings. (See \fIset\-authentication\-config\fR below for description on outputs.) Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-authentication-config \fIKEY=VALUE ...\fR This OEM command will set additional OEM authentication settings on the IPMI card. The possible keys and values are \fImaxauthenticationfailures=count\fR, \fIlockoutwindow=seconds\fR, \fIlockouttime=seconds\fR, and \fIhttpsportnumber=num\fR. \fImaxauthenticationfailures\fR specifies the maximum number of allowed authentication failures. \fIlockoutwindow\fR specifies the window of time the authentication failure count can be reached in to disable a user. \fIlockouttime\fR specifies the time period a user is disabled if the authentication failure count is reached. Setting 0 to any of the settings will disable the lockout feature. Each time any of these settings is modified, the authentication failure count of each enabled user is reset to 0. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-account-status This OEM command will output the current account status of users on the BMC. This command is particularly usefor for determinining which users in the system may have been locked out via authentication failures configured via \fIset\-authentication\-config\fR. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-dns-config This OEM command will display additional OEM DNS settings. (See \fIset\-dns\-config\fR below for description on outputs.) Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-dns-config \fIKEY=VALUE ...\fR This OEM command will set additional OEM DNS settings on the IPMI card. The possible keys and values are \fIdnsdhcp=enable|disable\fR, \fIdnsserver1=ipaddress\fR, \fIdnsserver2=ipaddress\fR, \fIdnsregisterbmc=enable|disable\fR, \fIdnsbmchostname=string\fR, \fIdnsdomainnamedhcp=enable|disable\fR, and \fIdnsdomainname=string\fR. \fIdnsdhcp\fR specifies if the DNS server IP addresses should be assigned from the DHCP server. \fIdnsserver1\fR and \fIdnsserver2\fR specify the IP addess for server 1 and 2 respectively. These fields are read only if \fIdnsdhcp\fR and DHCP are enabled. \fIdnsregisterbmc\fR specifies if the BMC host name is registered via the DNS server. \fIdnsbmchostname\fR specifies the BMC host name. This field is read only if \fIdnsregisterbmc\fR is enabled. \fIdnsdomainnamedhcp\fR specifies if the DNS domainname should be assigned from the DHCP server. \fIdnsdomainname\fR specifies the DNS domain name string. This field is read only if \fIdnsdomainnamedhcp\fR is enabled. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-web-server-config This OEM command will get the current web server configuration on the IPMI card. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-web-server-config \fIKEY=VALUE ...\fR This OEM command will set the current web server configuration on the IPMI card. The possible keys and values are \fIwebserver=enable|disable\fR, \fIwebservertimeout=seconds\fR, \fIhttpportnumber=num\fR, and \fIhttpsportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-power-management-config This OEM command will get the current power management configuration on the IPMI card. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-power-management-config \fIKEY=VALUE ...\fR This OEM command will set the current power management configuration on the IPMI card. The possible keys and values are \fIdpnmpowermanagement=enable|disable\fR, \fIpowerstaggeringacrecovery=immediate|auto|user\fR, \fIpowerondelay=seconds\fR, and \fImaxpowerondelay=seconds\fR. \fIdpnmpowermanagement\fR enables or diables DPNM, Dynamic Power Node Management. For \fIpowerstaggeringacrecovery\fR, \fIimmediate\fR specifies no delay, \fIauto\fR generates a delay time between the minimum and maximum configured, and \fIuser\fR uses the user defined time defined by \fIpowerondelay\fR. \fIpowerondelay\fR must be within the minimum and maximum power on delay times. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-sol-idle-timeout This OEM command will get the SOL idle timeout. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-sol-idle-timeout \fIidle\-timeout\fR This OEM command will set the SOL idle timeout. The \fIidle\-timeout\fR is one-based, max of 65535, in 1 minute increments (e.g. 1 = 1 minute), 0 or "none" will configure no timeout. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-telnet-ssh-redirect-status This OEM command will get the telnet/SSH redirect status. Command confirmed to work on Inventec 5442 (Dell Xanadu III). .TP .B set-telnet-ssh-redirect-status \fIenable|disable\fR This OEM command will enable or disable telnet/SSH redirect status. Command confirmed to work on Inventec 5442 (Dell Xanadu III). .if 0 \{ .TP .B get-firmware-update-config This OEM command will get the current firmware update configuration on the IPMI card. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II). .TP .B set-firmware-update-config \fIKEY=VALUE ...\fR This OEM command will set the current firmware update configuration on the IPMI card. The possible keys and values are \fIremoteupdate=enable|disable\fR, \fIURI=tftp://...|ftp://...|http://...\fR, \fIconnectionretry=num\fR, \fIretryinterval=seconds\fR, \fIdelaytime=seconds|random\fR, \fIremoteupdate\fR enables or disables remote update capabilities. \fIURI\fR determines the location of the image file. \fIconnectionretry\fR specifies the number of retries for connecting. \fIretryinterval\fR specifies the number seconds in a retry interval. \fIdelaytime\fR specifies the number of seconds to wait before connecting. If set to zero, the connection is immeadite. If the user specifies \fIrandom\fR, a random time between 5 and 10 seconds is chosen. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). After setting these configuration parameters, typically a user will want to execute the \fIupdate-firmware\fR command listed below. \} .if 0 \{ .TP .B get-firmware-information This OEM command will get current firmware information. Command confirmed to work on Inventec 5441 (Dell Xanadu II). \} .if 0 \{ .TP .B update-firmware [config=preserve|nopreserve] This OEM command will inform the motherboard to perform a firmware update with the specified protocol and return after detecting that it has completed or an error has occurred. \fItftp\fR, \fIftp\fR, and \fIhttp\fR indicate the desired protocol to use. The parameters following it depend on the specific motherboard for availability, support, or possibly requirement. The \fIconfig=preserve|nopreserve\fR is currently supported on the Dell Xanadu II/III. If the verbose option is set, progress will be output with information that is available. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). \} .TP .B get-board-id This OEM command can get the board ID. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-board-id \fIID\fR This OEM command can set the board ID. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B get-fcb-version This OEM command can get the fan control board (FCB) version number. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-fcb-version \fImajorversion\fR \fIminorversion\fR This OEM command can set the fan control board (FCB) version number. The \fImajorversion\fR and \fIminorversion\fR must be specified in hex. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .if 0 \{ .TP .B set-asset-tag \fIasset-tag\fR This OEM command cat set the asset-tag of the motherboard. The maximum length of the asset tag is 10 bytes. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). \} .if 0 \{ .TP .B get-dhcp-retry This OEM command will retrieve DHCP retry information. Command confirmed to work on Inventec 5441/Dell Xanadu II. .TP .B set-dhcp-retry \fIretry-count\fR \fIretry-interval\fR \fIretry-timeout\fR This OEM command will set DHCP retry information. The \fIretry\-count\fR is one-based, max of 254, 0 or "none" will configure no retries, 255 or "infinite" with configure constant retries. The \fIretry\-interval\fR is one-based, in 10 second increments (e.g. 1 = 10 seconds). The \fIretry\-timeout\fR is one-based, in 1 minute increments (e.g. 1 = 1 minute). Command confirmed to work on Inventec 5441/Dell Xanadu II. \} .TP .B get-sol-inactivity-timeout This OEM command will retrieve the SOL inactivity timeout. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B set-sol-inactivity-timeout \fIinactivity\-timeout\fR This OEM command will set the SOL inactivity timeout. The \fIinactivity\-timeout\fR is one-based, max of 65535, in 1 minute increments (e.g. 1 = 1 minute), 0 or "none" will configure no timeout. Command confirmed to work on Inventec 5441/5442 (Dell Xanadu II/III). .TP .B restore-to-defaults \fIall|user|lan|sol|serial|pef\fR This OEM command will restore certain BMC configuration sections back to default values. The command will spin until the reset is confirmed to be complete. Command confirmed to work on Inventec 5442 (Dell Xanadu III). After running this command, the BMC must be reset to return it to functioning status. This may be accomplished by executing a cold-reset with .B bmc-device(8). .if 0 \{ .TP .B set-system-guid \fIsystemguid\fR This OEM command will set the system guid. Command confirmed to work on Inventec 5441 (Dell Xanadu II). \} .TP .B read-eeprom \fIat24c256n\fR This OEM command will read the specified eeprom. Command confirmed to work on Inventec 5441 (Dell Xanadu II) for \fIat24c256\fR. .TP .B clear-eeprom \fIat24c256n\fR This OEM command will clear the specified eeprom, overwriting all bytes with 0xFF. If the verbose option is set, progress percent will be output as the clearing is being done. Command confirmed to work on Inventec 5441 (Dell Xanadu II) for \fIat24c256\fR. .RE .TP .B Quanta .RS .TP .B get-nic-mode This OEM command will determine the current NIC mode as dedicated or shared. Dedicated indicates IPMI is only available on the dedicated management port. Shared indicates IPMI is also available on one of the primary ethernet ports. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-nic-mode \fIdedicated|shared\fR This OEM command will set the current NIC mode to dedicated or shared. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) This OEM command may internally reset the BMC, making the BMC unusable for awhile. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-bmc-services This OEM command will display the currently enabled BMC services. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-bmc-services \fIenable|disable\fR \fIall|kvm|http|ssh\fR This OEM command will enable or disable other BMC services besides IPMI. \fIall\fR can be specified to enable/disable all services, \fIkvm\fR specifies KVM and Virtual Storage, \fIhttp\fR specifies HTTP and HTTPS, and \fIssh\fR specifies both SSH and Telnet. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-account-status This OEM command will output the current account status of users on the BMC. This command is particularly usefor for determinining which users in the system may have been locked out via authentication failures. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-dns-config This OEM command will display additional OEM DNS settings. (See \fIset\-dns\-config\fR below for description on outputs.) Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-dns-config \fIKEY=VALUE ...\fR This OEM command will set additional OEM DNS settings on the IPMI card. The possible keys and values are \fIdnsdhcp=enable|disable\fR, \fIdnsserver1=ipaddress\fR, \fIdnsserver2=ipaddress\fR, \fIdnsregisterbmc=enable|disable\fR, \fIdnsbmchostname=string\fR, \fIdnsdomainnamedhcp=enable|disable\fR, and \fIdnsdomainname=string\fR. \fIdnsdhcp\fR specifies if the DNS server IP addresses should be assigned from the DHCP server. \fIdnsserver1\fR and \fIdnsserver2\fR specify the IP addess for server 1 and 2 respectively. These fields are read only if \fIdnsdhcp\fR and DHCP are enabled. \fIdnsregisterbmc\fR specifies if the BMC host name is registered via the DNS server. \fIdnsbmchostname\fR specifies the BMC host name. This field is read only if \fIdnsregisterbmc\fR is enabled. \fIdnsdomainnamedhcp\fR specifies if the DNS domainname should be assigned from the DHCP server. \fIdnsdomainname\fR specifies the DNS domain name string. This field is read only if \fIdnsdomainnamedhcp\fR is enabled. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-web-server-config This OEM command will get the current web server configuration on the IPMI card. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-web-server-config \fIKEY=VALUE...\fR This OEM command will set the current web server configuration on the IPMI card. The possible keys and values are \fIwebserver=enable|disable\fR, \fIwebservertimeout=seconds\fR, \fIhttpportnumber=num\fR, and \fIhttpsportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-power-management-config This OEM command will get the current power management configuration on the IPMI card. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-power-management-config \fIKEY=VALUE ...\fR This OEM command will set the current power management configuration on the IPMI card. The possible keys and values are \fIdpnmpowermanagement=enable|disable\fR, \fIpowerstaggeringacrecovery=immediate|auto|user\fR, \fIpowerondelay=seconds\fR, and \fImaxpowerondelay=seconds\fR. \fIdpnmpowermanagement\fR enables or diables DPNM, Dynamic Power Node Management. For \fIpowerstaggeringacrecovery\fR, \fIimmediate\fR specifies no delay, \fIauto\fR generates a delay time between the minimum and maximum configured, and \fIuser\fR uses the user defined time defined by \fIpowerondelay\fR. \fIpowerondelay\fR must be within the minimum and maximum power on delay times. Multiple key=value pairs may be specified. If no key=value pairs are specified, available pairs are output. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-sol-idle-timeout This OEM command will get the SOL idle timeout. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-sol-idle-timeout \fIidle\-timeout\fR This OEM command will set the SOL idle timeout. The \fIidle\-timeout\fR is one-based, max of 65535, in 1 minute increments (e.g. 1 = 1 minute), 0 or "none" will configure no timeout. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B get-telnet-ssh-redirect-status This OEM command will get the telnet/SSH redirect status. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B set-telnet-ssh-redirect-status \fIenable|disable\fR This OEM command will enable or disable telnet/SSH redirect status. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B reset-to-defaults \fIall|user|lan|sol|serial|pef\fR This OEM command will reset certain BMC configuration sections back to default values. The command will spin until the reset is confirmed to be complete. Command confirmed to work on Quanta S99Q (Dell FS12-TY). After running this command, the BMC must be reset to return it to functioning status. This may be accomplished by executing a cold-reset with .B bmc-device(8). .TP .B get-processor-information \fI[processor\-index]\fR This OEM command will determine system processor information. By default, information about each processor will be output. If a \fIprocessor\-index\fR is specified, only that specific processor will be output. Command confirmed to work on Quanta S99Q (Dell FS12-TY). .TP .B read-mac-address \fIs99q\fR \fIdedicated|shared\fR This command will read the currently configured dedicated or shared MAC address for a specified motherboard. It will read the MAC address directly from the BMC eeprom. Command confirmed to work on Quanta S99Q (Dell FS12-TY) for \fIs99q\fR. .TP .B write-mac-address \fIs99q\fR \fIdedicated|shared\fR \fIMACADDR\fR This OEM command will set the dedicated or shared BMC MAC address for a specified motherboard. It will be written directly to the BMC eeprom. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) The BMC MAC address cannot be set through the normal IPMI MAC address command (what is used in the .B ipmi-config(8) tool). The MACADDR should be specified in XX:XX:XX:XX:XX:XX form. A shared BMC MAC address may conflict with normal communication ethernet communication on the primary ethernet port. Users may wish to configuration an alternate MAC address instead. After configuration of the MAC address, the BMC must be reset. This may be accomplished by executing a cold-reset with .B bmc-device(8). Command confirmed to work on Quanta S99Q (Dell FS12-TY) for \fIs99q\fR. .RE .TP .B Sun .RS .TP .B get-led This OEM command will output current LED mode. \fIoff\fR indicates the LED is steady off, \fIon\fR indicates the LED is steady on, \fIstandby\fR indicates the LED blinks at a 100ms on, 2900ms off rate, \fIslow\fR indicates the LED is blinking at 1Hz, and \fIfast\fR indicates the LED is blinking at 4Hz. If the verbose option is set, sensor names will be output with their entity ID and instance when appropriate. (Similar to the \fI\-\-entity\-sensor\-names\fR option in .B ipmi-sensors.) This OEM command requires access to the SDR. Command confirmed to work on Sun Fire 4140 with ILOM. .TP .B set-led \fIrecord_id\fR \fIoff|on|standby|slow|fast\fR This OEM command will configure LED modes. (See \fIget\-led\fR above for description on LED modes.) This OEM command requires access to the SDR. Command confirmed to work on Sun Fire 4140 with ILOM. .RE .TP .B Supermicro .RS .TP .B extra-firmware-info This OEM command will output additional firmware version information. Command confirmed to work on Supermicro H8QME. .TP .B reset-intrusion This OEM command will reset the motherboard intrusion flag after it has been triggered. For example, in .B ipmi-sensors or .B ipmi-sel, you may notice a 'General Chassis Intrusion' if the motherboard chassis is not open, but was opened in the past. Command confirmed to work on Supermicro H8QME. .TP .B get-bmc-services-status This OEM command will determine if non-IPMI services (e.g. ssh, http, https, vnc, etc.) are currently enabled or disabled on the BMC. Command confirmed to work on Supermicro X8DTG. .TP .B set-bmc-services-status \fIenable|disable\fR This OEM command will enable or disable all non-IPMI services on the BMC. This command can be used to enable or disable non-IPMI services such as ssh, http, https, and vnc. Command confirmed to work on Supermicro X8DTG. .TP .B get-power-supply-status \fIps_num\fR This OEM command will get the status of a regular power supply. Presently, it can get the status of power supplies 1 through 3. Command confirmed to work on Supermicro X8DTU, Supermicro X8STi, and Supermicro X9DRW. .TP .B get-power-supply-status2 \fIps_num\fR This OEM command will get the status of a regular power supply. Presently, it can get the status of power supplies 1 and 2. Command confirmed to work on Supermicro X10DRU-i+. .TP .B get-pmbus-power-supply-status \fIps_num\fR This OEM command will get the status of a PMBus based power supply. Presently, it can get the status of power supplies 1 through 3. Command confirmed to work on Supermicro X8DTU, Supermicro X8STi, and Supermicro X9DRW. .RE .TP .B Wistron .RS .TP .B get-system-info \fIKEY\fR This OEM command can retrieve the motherboard system information. Valid keys are \fIasset\-tag\fR, \fIservice\-tag\fR, \fIproduct\-name\fR. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-nic-mode This OEM command will determine the current NIC mode as dedicated or shared. Dedicated indicates IPMI is only available on the dedicated management port. Shared indicates IPMI is also available on one of the primary ethernet ports. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-nic-mode \fIdedicated|shared\fR This OEM command will set the current NIC mode to dedicated or shared. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) After running this command, the BMC may need to be reset to finalize the configuration. This may be accomplished by executing a cold-reset with .B bmc-device(8). Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-shared-nic-selection This OEM command will determine the current NIC IPMI is shared with if the mode is \fIshared\fR. (See \fIget\-nic\-mode\fR above for description on dedicated vs. shared mode.) Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-shared-nic-selection \fInic1|nic2|nic3|nic4|clear\fR This OEM command will set the current NIC sharing selection. If the current NIC mode is \fIdedicated\fR it is advisable to clear this setting with the \fIclear\fR option. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-bmc-services This OEM command will display the currently enabled BMC services. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-bmc-services \fIenable|disable\fR \fIall|kvm|http|ssh|snmp|telnet\fR This OEM command will enable or disable other BMC services besides IPMI. \fIall\fR can be specified to enable/disable all services, \fIkvm\fR specifies KVM and Virtual Storage, \fIhttp\fR specifies HTTP and HTTPS. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-account-status This OEM command will output the current account status of users on the BMC. This command is particularly usefor for determinining which users in the system may have been locked out via authentication failures. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-dns-config This OEM command will display additional OEM DNS settings. (See \fIset\-dns\-config\fR below for description on outputs.) Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-dns-config \fIKEY=VALUE ...\fR This OEM command will set additional OEM DNS settings on the IPMI card. The possible keys and values are \fIdnsdhcp=enable|disable\fR, \fIdnsserver1=ipaddress\fR, \fIdnsserver2=ipaddress\fR, \fIdnsregisterbmc=enable|disable\fR, \fIdnsbmchostname=string\fR, \fIdnsdomainnamedhcp=enable|disable\fR, \fIdnsdomainname=string\fR, and \fIdnsregistrationdelay=seconds\fR. \fIdnsdhcp\fR specifies if the DNS server IP addresses should be assigned from the DHCP server. \fIdnsserver1\fR and \fIdnsserver2\fR specify the IP addess for server 1 and 2 respectively. These fields are read only if \fIdnsdhcp\fR and DHCP are enabled. \fIdnsregisterbmc\fR specifies if the BMC host name is registered via the DNS server. \fIdnsbmchostname\fR specifies the BMC host name. This field is read only if \fIdnsregisterbmc\fR is enabled. \fIdnsdomainnamedhcp\fR specifies if the DNS domainname should be assigned from the DHCP server. \fIdnsdomainname\fR specifies the DNS domain name string. This field is read only if \fIdnsdomainnamedhcp\fR is enabled. \fIdnsregistrationdelay\fR specifies the delay the BMC should take after the IPMI process is up and running. Multiple key=value pairs may be specified. If no key=value pairs are specifed, available pairs are output. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-web-server-config This OEM command will get the current web server configuration on the IPMI card. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-web-server-config \fIKEY=VALUE...\fR This OEM command will set the current web server configuration on the IPMI card. The possible keys and values are \fIwebserver=enable|disable\fR, \fIwebservertimeout=seconds\fR, \fIhttpportnumber=num\fR, and \fIhttpsportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specifed, available pairs are output. Command confirmed to work on Wistron / Dell Poweredge C6220. .if 0 \{ .TP .B get-server-services-config This OEM command will get the current server services configuration on the IPMI card. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-server-services-config \fIKEY=VALUE ...\fR This OEM command will set the current server services configuration on the IPMI card. The possible keys and values are \fIkvmportnumber=num\fR, \fItelnetportnumber=num\fR, and \fIsshportnumber=num\fR. Multiple key=value pairs may be specified. If no key=value pairs are specifed, available pairs are output. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .TP .B get-power-management-config This OEM command will get the current power management configuration on the IPMI card. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-power-management-config \fIKEY=VALUE ...\fR This OEM command will set the current power management configuration on the IPMI card. The possible keys and values are \fIpowerstaggeringacrecovery=immediate|auto|user\fR, \fIpowerondelay=seconds\fR, and \fImaxpowerondelay=seconds\fR. For \fIpowerstaggeringacrecovery\fR, \fIimmediate\fR specifies no delay, \fIauto\fR generates a delay time between the minimum and maximum configured, and \fIuser\fR uses the user defined time defined by \fIpowerondelay\fR. \fIpowerondelay\fR must be within the minimum and maximum power on delay times. Multiple key=value pairs may be specified. If no key=value pairs are specifed, available pairs are output. Command confirmed to work on Wistron / Dell Poweredge C6220. .if 0 \{ .TP .B get-firmware-information This OEM command will get current firmware information. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .if 0 \{ .TP .B user-default-setting \fIset|reset\fR This OEM command will allow users to customize BMC settings, store tham as defaults, and restore back to previous settings as desired. The user default settings include all OEM extended configuration settings (such as the ones set by \fIset\-nic\-mode\fR, \fIset\-web\-server\-config, and others above), IPMI user account settings, and IPMI lan configuration parameters. \fIset\fR sets the current settings as a new default, while \fIreset\fR resets settings to the previously configured defaults. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .TP .B get-ipv6-settings This OEM command will get the current IPv6 settings on the IPMI card. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-ipv6-settings \fIKEY=VALUE ...\fR This OEM command will set the current IPv6 settings on the IPMI card. The possible keys and values are \fIipv6=enable|disable\fR, \fIipv6address=ipaddress\fR, \fIipv6gatewayaddress=ipaddress\fR, \fIipv6prefixlength=length\fR, \fIipv6autoconfig=enable|disable\fR, \fIipv6autodns=enable|disable\fR, \fIipv6dnsserver1=ipaddress\fR, and \fIipv6dnsserver2=ipaddress\fR. If no key=value pairs are specifed, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-ipv6-trap-settings This OEM command will get the current IPv6 SNMP trap settings on the IPMI card. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-ipv6-trap-settings \fIindex\fR \fIKEY=VALUE ...\fR This OEM command will set the current IPv6 SNMP trap settings on the IPMI card. The \fIindex\fR indicates the index position for the configuration. It is followed by a set of configuration keys and values. The possible keys and values are \fIdestinationtype=pet|oem1|oem2\fR, \fIalertacktimeout=seconds\fR, \fIretries=count\fR, and \fIipv6snmptrapaddress=ipaddress\fR. If no key=value pairs are specifed, available pairs are output. Some fields may be read-only on specific Poweredge systems. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-sol-idle-timeout This OEM command will get the SOL idle timeout. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-sol-idle-timeout \fIidle\-timeout\fR This OEM command will set the SOL idle timeout. The \fIidle\-timeout\fR is one-based, max of 65535, in 1 minute increments (e.g. 1 = 1 minute), 0 or "none" will configure no timeout. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-telnet-redirect-function This OEM command will get the telnet redirect function. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-telnet-redirect-function \fIdisable|solenable|smashenable\fR This OEM command will enable or disable telnet redirect function. Command confirmed to work on Wistron / Dell Poweredge C6220. .if 0 \{ .TP .B get-ssh-redirect-function This OEM command will get the SSH redirect function. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-ssh-redirect-function \fIdisable|solenable|smashenable\fR This OEM command will enable or disable SSH redirect function. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .if 0 \{ .TP .B get-chassis-power-readings This OEM command will output the current chassis power readings. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .if 0 \{ .TP .B get-chassis-led-status This OEM command will output the current chassis identification and/or chassis fault LED status. \fIoff\fR indicates the LED is off, \fIsolid\fR indicates the LED is on and steady, \fIblink\fR indicates the LED is on and blinking. Command confirmed to work on Wistron / Dell Poweredge C6220. .\" XXX - is true, set off ifnot there? .TP .B set-chassis-led-status \fIidentify-off|identify-solid|identify-blink\fR \fIfault-off|fault-solid|fault-blink\fR This OEM command will set the chassis identification and chassis fault LEDs to a state of \fIoff\fR, \fIsolid\fR, or \fIblink\fR. If an LED is not available on the chassis, it should be set to \fIoff\fR. Command confirmed to work on Wistron / Dell Poweredge C6220. \} .TP .B get-dhcp-retry This OEM command will retrieve DHCP retry information. Wistron / Dell Poweredge C6220. .TP .B set-dhcp-retry \fIretry-count\fR \fIretry-interval\fR \fIretry-timeout\fR This OEM command will set DHCP retry information. The \fIretry\-count\fR is one-based, max of 254, 0 or "none" will configure no retries, 255 or "indefinite" will configure constant retries. The \fIretry\-interval\fR is one-based, in 10 second increments (e.g. 1 = 10 seconds). The \fIretry\-timeout\fR is one-based, in 1 minute increments (e.g. 1 = 1 minute). After running this command, the BMC may need to be reset to finalize the configuration. This may be accomplished by executing a cold-reset with .B bmc-device(8). Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B get-link-status-change-control This OEM command will get the current link status change control. If it reports "Link Down Resilience Enabled", BMC firmware will do nothing upon detecting Link Status Change until the DHCP lease is expired. If it reports "DHCP Re-Discovery Enabled", BMC firmware will perform DHCP Discovery upon detecting link status going down than back up. Command confirmed to work on Wistron / Dell Poweredge C6220.. .TP .B set-link-status-change-control \fIlink_resilience|dhcp_rediscovery\fR This OEM command will set the current NIC link status change control setting. (See \fIset\-link\-status\-change\-control\fR above for description of arguments). After running this command, the BMC may need to be reset to finalize the configuration. This may be accomplished by executing a cold-reset with .B bmc-device(8). Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-password-policy This OEM command will set the current password policy enforcement. If password policy is enabled, BMC passwords must meet the following requirements: Not contain the user's name, be 8-14 characters long, and contain three of the following four, an English uppercase character (A-Z), an English lowercase character (a-z), a digit (0-9), a special character (!, $, #, %, etc.). Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B read-proprietary-string This OEM command will read the proprietary string stored in the FRU. The proprietary string is a string the user may set for any management purpose. It can also be read via .B ipmi-fru. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B set-proprietary-string This OEM command will write the proprietary string stored in the FRU. The maximum length string is 80 characters. Command confirmed to work on Wistron / Dell Poweredge C6220. .TP .B clear-proprietary-string This OEM command will clear the proprietary string stored in the FRU. Command confirmed to work on Wistron / Dell Poweredge C6220. .if 0 \{ .\" XXX - is true, will reset BMC internally??? .TP .B reset-to-defaults \fIall|user|lan|sol|serial|pef\fR This OEM command will reset certain BMC configuration sections back to default values. The command will spin until the reset is confirmed to be complete. Command confirmed to work on Wistron / Dell Poweredge C6220. After running this command, the BMC must be reset to return it to functioning status. This may be accomplished by executing a cold-reset with .B bmc-device(8). \} .RE #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2008-2015 FreeIPMI Core Team #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), ipmi-config(8), ipmi-raw(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-pet.8.pre.in0000644002055400205540000002541213527331637017052 0ustar00achuachu00000000000000.TH IPMI-PET 8 "@ISODATE@" "IPMI-PET version @PACKAGE_VERSION@" "System Commands" .SH "NAME" IPMI \- IPMI Platform Event Trap Interpreter .SH "SYNOPSIS" .B ipmi-pet [\fIOPTION\fR...] [SPECIFIC TRAP] [VARIABLE BINDING HEX BYTES ...] .SH "DESCRIPTION" .B Ipmi-pet interprets hex bytes from a platform event trap (PET) and outputs a string representing its contents. Hex values may be input on the command line, a file via the \fB\-\-file\fR option, or via stdin if neither of the previous are specified. .B Ipmi-pet is commonly used in conjunction with an SNMP trap daemon to intrepret the results from an IPMI PET trap captured by the daemon. While .B ipmi-pet could be called directly from such a daemon, typically a script is called to parse the SNMP daemon's output and convert it into a form that can be input into .B ipmi-pet. On some systems, you may wish to also send a PET acknowledge to a remote system to inform it the trap was received and parsed. One can be sent using the \fB\-\-pet-acknowledge\fR option. While an IPMI session is not required to interpret a PET, data from the sensor data repository (SDR) is required to properly interpret sensor names and other information in the PET. IPMI session configuration below, such as driver, hostname, username, etc. should be configured to load the SDR of the host where the trap originated. If this is difficult to perform, it may be wise to cache and load a specific SDR cache using the \fB\-\-sdr\-cache\-file\fR option. If the SDR is difficult to obtain, the \fB\-\-ignore\-sdr\-cache\fR option can be specified so that an SDR will not be loaded, and an IPMI session will not be required. The PET will be interpreted as best as possible given no SDR. The \fB\-\-ignore\-sdr\-cache\fR option may affect other options such as \fB\-\-interpret\-oem\-data\fR too. Some options, such as \fB\-\-manufacturer\-id\fR and \fB\-\-product\-id\fR may alleviate some of these issues. If the SNMP daemon does not output a SNMPv1 \fIspecific trap\fR on its own, it is typically output as the last element of the OID in SNMPv2. If for some reason a \fIspecific trap\fR cannot be determined, the value of \fINA\fR may be input for the \fIspecific trap\fR to indicate it is not available. .B Ipmi-pet will output as much as possible based on the variable bindings information. Some of the specific trap information may be obtained via SDR information. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname.man> #include <@top_srcdir@/man/manpage-common-outofband-username-operator.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-operator.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-PET OPTIONS" The following options are specific to .B ipmi-pet. .TP \fB\-v\fR Output verbose output. This option will output event direction and OEM custom messages from the trap. .TP \fB\-vv\fR Output very verbose output. This option will output additional information available in the trap, such as GUID, manufacturer ID, and system ID. .TP \fB\-vvv\fR Output very very verbose output. This option will output additional information than verbose output. Most notably it will output additional hex codes to given information on ambiguous events. For example, it will output Generator ID hex codes for sensors without names. .TP \fB\-\-pet-acknowledge\fR Send PET acknowledge using inputted trap data instead of outputting data. In some circumstances, this may be useful to inform a remote system that a trap was received and parsed. If specified, a hostname must be specified via \fI\-h\fR or \fI\-\-hostname\fR to inform .B ipmi-pet where to send the acknowledge to. When this option is specified, the SDR cache is not loaded and is not required. .TP \fB\-\-file\fR=\fICMD\-FILE\fR Specify a file to read PET specific trap and variable bindings hex from instead of command line. .TP \fB\-\-output\-event\-severity\fR Output event severity in output. This will add an additional output of an event severity. The outputs may be Monitor, Information, OK, Non-critical condition, Critical condition, or Non-recoverable condition. This differs from the output of \fB\-\-output\-event\-state\fR, as event severity is not interpreted, it is a value reported in the SNMP trap. However, not all events may report a severity, or some manufacturers may not support the report of a severity. Event severity will automatically be output under verbose output. .TP \fB\-\-output\-event\-state\fR Output event state in output. This will add an additional output reporting if an event should be viewed as NOMINAL, WARNING, or CRITICAL. This differs from the output of \fB\-\-output\-event\-severity\fR, as this output is an interpreted value that will be interpreted identically to the \fB\-\-output\-event\-state\fR output in .B ipmi-sel(8). As long as an event interpretation is supported, all events will have outputted state. The event state is an interpreted value based on the configuration file @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ and the event direction. See .B freeipmi_interpret_sel.conf(5) for more information. .TP \fB\-\-event\-state\-config\-file\fR=\fIFILE\fR Specify an alternate event state configuration file. Option ignored if \fB\-\-output\-event\-state\fR not specified. .TP \fB\-\-manufacturer\-id\fR=\fINUMBER\FR Specify a specific manufacturer id to assume. Useful if you wish to specify \fB\-\-interpret\-oem\-data\fR, but the manufacturer id cannot be determined by IPMI access or is not available in the SNMP trap. The manufacturer id of a motherboard can be determined with .B bmc-info(8). If this option is specified, so must \fB\-\-product\-id\fR. .TP \fB\-\-product\-id\fR=\fINUMBER\FR Specify a specific product id to assume. Useful if you wish to specify \fB\-\-interpret\-oem\-data\fR, but the product id cannot be determined by IPMI access or is not available in the SNMP trap. The product id of a motherboard can be determined with .B bmc-info(8). If this option is specified, so must \fB\-\-manufacturer\-id\fR. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> #include <@top_srcdir@/man/manpage-common-entity-sensor-names.man> #include <@top_srcdir@/man/manpage-common-no-sensor-type-output.man> #include <@top_srcdir@/man/manpage-common-comma-separated-output.man> #include <@top_srcdir@/man/manpage-common-no-header-output.man> #include <@top_srcdir@/man/manpage-common-non-abbreviated-units.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-ignore.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> .LP \fImalformedack\fR - This workaround flag will ignore malformed PET acknowledge responses and assume any PET acknowledge response from the remote machine is valid. It works around remote systems that respond with PET acknowledge requests with invalid/malformed IPMI payloads. Those hitting this issue may see "session timeout" errors when executing a PET acknowledge. Issue observed on Dell Poweredge R610. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Currently None .SH "EXAMPLES" .PP Interpret a PET using the local SDR cache. .PP .B # ipmi-pet 356224 0x44 0x45 0x4c 0x4c 0x50 0x00 0x10 0x59 0x80 0x43 0xb2 0xc0 0x4f 0x33 0x33 0x58 0x00 0x02 0x19 0xe8 0x7e 0x26 0xff 0xff 0x20 0x20 0x04 0x20 0x73 0x18 0x00 0x80 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x19 0x00 0x00 0x02 0xa2 0x01 0x00 0xc1 .PP Interpret a PET using a remote SDR cache. .PP .B # ipmi-pet -h ahost -u myusername -p mypassword 356224 0x44 0x45 0x4c 0x4c 0x50 0x00 0x10 0x59 0x80 0x43 0xb2 0xc0 0x4f 0x33 0x33 0x58 0x00 0x02 0x19 0xe8 0x7e 0x26 0xff 0xff 0x20 0x20 0x04 0x20 0x73 0x18 0x00 0x80 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x19 0x00 0x00 0x02 0xa2 0x01 0x00 0xc1 .PP Interpret a PET using a previously stored SDR cache. .PP .B # ipmi-pet 356224 0x44 0x45 0x4c 0x4c 0x50 0x00 0x10 0x59 0x80 0x43 0xb2 0xc0 0x4f 0x33 0x33 0x58 0x00 0x02 0x19 0xe8 0x7e 0x26 0xff 0xff 0x20 0x20 0x04 0x20 0x73 0x18 0x00 0x80 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x19 0x00 0x00 0x02 0xa2 0x01 0x00 0xc1 --sdr-cache-file=/tmp/mysdrcache .PP Instead of outputting trap interpretation, send a PET acknowledge using the trap data. .PP .B # ipmi-pet -h ahost --pet-acknowledge 356224 0x44 0x45 0x4c 0x4c 0x50 0x00 0x10 0x59 0x80 0x43 0xb2 0xc0 0x4f 0x33 0x33 0x58 0x00 0x02 0x19 0xe8 0x7e 0x26 0xff 0xff 0x20 0x20 0x04 0x20 0x73 0x18 0x00 0x80 0x01 0xff 0x00 0x00 0x00 0x00 0x00 0x19 0x00 0x00 0x02 0xa2 0x01 0x00 0xc1 #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2011-2015 FreeIPMI Core Team #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), bmc-info(8), ipmi-config(8), ipmi-sel(8), freeipmi_interpret_sel.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-raw.8.pre.in0000644002055400205540000001214613527331637017053 0ustar00achuachu00000000000000.TH IPMI-RAW 8 "@ISODATE@" "IPMI Raw version @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-raw \- execute IPMI commands by hex values .SH "SYNOPSIS" .B ipmi-raw [\fIOPTION\fR...] [\fI COMMAND-HEX-BYTES\fR...] .SH "DESCRIPTION" .B Ipmi-raw is used to execute IPMI commands by hex values. Hex values may be input on the command line, a file via the \fB\-\-file\fR option, or via stdin if neither of the previous are specified. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> .TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The required user privilege will depend on the raw commands executed. #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-RAW OPTIONS" The following options are specific to .B ipmi-raw. .TP \fB\-\-file\fR=\fICMD\-FILE\fR Specify a file to read command requests from. .TP \fB\-\-no\-session\fR If performing out of band communication, do not establish an IPMI session and send raw packets without having established a session/authenticating. This option is predominantly for testing the few IPMI packets that can work outside of a session and should not be used by the majority of users. #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> .SH "EXAMPLES" .B # ipmi-raw 0 6 01 .PP Execute command 0x01 with LUN 0x0 and NETFN 0x06 on the local machine. .PP .B # ipmi-raw -h ahost -u myusername -p mypassword 0 6 01 .PP Execute command 0x01 with LUN 0x0 and NETFN 0x06 on a remote machine using IPMI over LAN. .PP .B # ipmi-raw -h mycluster[0-127] -u myusername -p mypassword 0 6 01 .PP Execute command 0x01 with LUN 0x0 and NETFN 0x06 across a cluster using IPMI over LAN. .PP .B # ipmi-raw .PP Read LUN, NETFN, command and request data from standard input. .PP .B # ipmi-raw -f command-file .PP Read LUN/FN, command and request data from given file instead of standard input. .PP .B # ipmi-raw < command-file .PP Read LUN, NETFN, command and request data from file as standard input. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2005-2015 FreeIPMI Core Team #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7), ipmi-config(8), ipmi-oem(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-sel.8.pre.in0000644002055400205540000003240513527331637017045 0ustar00achuachu00000000000000.TH IPMI-SEL 8 "@ISODATE@" "ipmi-sel @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-sel \- display SEL entries .SH "SYNOPSIS" .B ipmi-sel [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-sel is used to view and manage System Event Log (SEL) entries. SEL records store system event information and may be useful for debugging problems. .B Ipmi-sel does not inform the user if an event is particularly good or bad, just that the event occurred. Users may wish to use the \fB\-\-output\-event\-state\fR option to output the analyzed state. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> To perform some advanced SEL management, please see .B bmc-device(8). #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-user.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-operator.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-SEL OPTIONS" The following options are specific to .B ipmi-sel. .TP \fB\-v\fR Output verbose output. This option will output event direction. Event direction may be useful to differentiate severity between some events. For example, some motherboards may issue an event both when a temperature exceeds a threshold and when it goes back down below it. .TP \fB\-vv\fR Output very verbose output. This option will output additional information than verbose output. Most notably it will output additional hex codes to given information on ambiguous SEL entries, such as OEM codes. For example, it will output Generator ID hex codes for sensors without names, event type codes for OEM events, and record types for OEM records. This information may be useful if you are writing a parser outside of .B ipmi-sel to interpret OEM information. .TP \fB\-i\fR, \fB\-\-info\fR Show general information about the SEL. .TP \fB\-\-display\fR=\fIRECORD\-IDS\-LIST\fR Display SEL records by record id. Accepts space or comma separated lists. .TP \fB\-\-exclude\-display\fR=\fIRECORD\-IDS\-LIST\fR Exclude display of SEL records by record id. Accepts space or comma separated lists. .TP \fB\-\-display-range\fR=\fISTART\-END\fR Display SEL records from record id START to END. .TP \fB\-\-exclude\-display-range\fR=\fISTART\-END\fR Exclude display of SEL records from record id START to END. .TP \fB\-\-date\-range\fR=\fIDATE\-DATE\fR Display SEL records with events occurring in the specified date range. Dates may be specified in MM/DD/YYYY or MM-DD-YYYY format. The month may be specified as a numeral or its abbreviated string name. The current local system time can be specified with "now". Note that non-timestamped records will not be displayed automatically because they do not possess a timestamp. .TP \fB\-\-exclude\-date\-range\fR=\fIDATE\-DATE\fR Exclude display of SEL records with events occurring in the specified date range. Dates may be specified in MM/DD/YYYY or MM-DD-YYYY format. The month may be specified as a numeral or its abbreviated string name. The current local system time can be specified with "now". Note that non-timestamped records will be displayed automatically because they do not possess a timestamp. .TP \fB\-t\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types to show SEL events for. Multiple types can be separated by commas or spaces. A special command line type of "all", will indicate all types should be shown (may be useful for overriding configured defaults). Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR below) or by number (decimal or hex). .TP \fB\-T\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-exclude\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types to not show SEL events for. Multiple types can be separated by commas or spaces. A special command line type of "none", will indicate no types should be excluded (may be useful for overriding configured defaults). Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR below) or by number (decimal or hex). .TP \fB\-L\fR, \fB\-\-list\-sensor\-types\fR List sensor types. .TP \fB\-\-tail\fR=\fIcount\fR Display approximately the last \fIcount\fR SEL records. The display count is calculated by approximating the record ids of the last SEL records. It's correctness depends highly on the SEL implementation by the vendor. .TP \fB\-\-clear\fR Clear SEL. .TP \fB\-\-post\-clear\fR Identical to \fB\-\-clear\fR, except the SEL clearning will be performed after SEL event records are displayed. This option is useful for scripting if users intend to log SEL events to another log, then immediately clear SEL. Unlike calling \fB\-\-clear\fR in another execution of .B ipmi-sel, this option will use SEL reservations to notify the user if a SEL change has occurred while displaying and clearing the SEL. This can protect users from a race, where a new SEL event is unknowingly generated before clearing the SEL. Note that SEL reservations are optionally implemented by vendors and may not be available on all machines. .TP \fB\-\-delete\fR=\fIRECORD\-IDS\-LIST\fR Delete records by record id in the SEL. Accepts space or comma separated lists. .TP \fB\-\-delete-range\fR=\fISTART\-END\fR Delete record ids from START to END in the SEL. .TP \fB\-\-system\-event\-only\fR Output only system event records (i.e. don't output OEM records). .TP \fB\-\-oem\-event\-only\fR Output only OEM event records (i.e. don't output system event records). .TP \fB\-\-output\-manufacturer\-id\fR For OEM SEL record types, output the manufacturer ID along with event data when available. .TP \fB\-\-output\-event\-state\fR Output event state in output. This will add an additional output reporting if an event should be viewed as NOMINAL, WARNING, or CRITICAL. The event state is an interpreted value based on the configuration file @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ and the event direction. See .B freeipmi_interpret_sel.conf(5) for more information. .TP \fB\-\-event\-state\-config\-file\fR=\fIFILE\fR Specify an alternate event state configuration file. Option ignored if \fB\-\-output\-event\-state\fR not specified. .TP \fB\-\-hex\-dump\fR Hex-dump SEL entries. .if 0 \{ .TP \fB\-\-assume\-system\-event\-records\fR Some motherboards have invalid SEL record types listed, leading to errors such as 'Unknown SEL Record Type'. The records may actually be formatted correctly. Use this option to assume these invalid record types are system event records and pray for the best. This option is confirmed to work around compliances issues on HP DL 380 G5 motherboards. \} #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> .TP \fB\-\-output\-oem\-event\-strings\fR Some motherboards support an IPMI OEM extension that returns the string output for a system event. Such string output may be beneficial for determining the meaning behind OEM specific events. This option will use the OEM event string to describe all system events in the .B ipmi-sel output. This option differs from \fI\-\-interpret\-oem\-data\fR option in that all system events will output the vendor supplied event string, not just events that are OEM specific. The event string may be very different from the normal FreeIPMI event string output. If an OEM event strings is not available, the default output will be output. This option is confirmed to work for Fujitsu iRMC S1 and iRMC S2 systems. #include <@top_srcdir@/man/manpage-common-entity-sensor-names.man> #include <@top_srcdir@/man/manpage-common-no-sensor-type-output.man> #include <@top_srcdir@/man/manpage-common-comma-separated-output.man> #include <@top_srcdir@/man/manpage-common-no-header-output.man> #include <@top_srcdir@/man/manpage-common-non-abbreviated-units.man> #include <@top_srcdir@/man/manpage-common-legacy-output.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-ignore.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> .SH "IPMI-SEL TROUBLESHOOTING" #include <@top_srcdir@/man/manpage-common-troubleshooting-sel.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> .LP \fIassumesystemevent\fR - This workaround option will assume invalid SEL record types are system event records. Records may be formatted correctly but report invalid record types. Those hitting this issue may see "Unknown SEL Record Type" errors. Output may be unknown, pray for the best. This option is confirmed to work around compliances issues on HP DL 380 G5 motherboards. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Dell Poweredge 2900, Dell Poweredge 2950, Dell Poweredge R610, Dell Poweredge R710, Fujitsu iRMC S1 and iRMC S2 systems, Gigabyte MD90-FS0-ZB, Gigabyte MG20-OP0-ZB/Penguin Computing Relgion X1904GT, Intel S5500WB/Penguin Computing Relion 700, Intel S2600JF/Appro 512X, Intel S2600GZ, Intel S2600WP, Intel S5000PAL, Intel Windmill, Intel S2600KP, Intel S2600KPR, Intel S2600WT2, Intel S2600WTT, Inventec 5441/Dell Xanadu II, Inventec 5442/Dell Xanadu III, Quanta S99Q/Dell FS12-TY, Quanta QSSC-S4R/Appro GB812X-CN, Quanta Winterfell, Sun X4140 Supermicro X7DBR-3, Supermicro X7DB8, Supermicro X8DTN, Supermicro X7SBI-LN4, Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Supermicro X8DT3-LN4F, Supermicro X8DTU-6+, Supermicro X8DTL, Supermicro X8DTL-3F, Supermicro X8SIL-F, Supermicro X9SCL, Supermicro X9SCM, Supermicro X8DTN+-F, Supermicro X8SIE, Supermicro X9SCA-F-O, Supermicro H8DGU-F, Supermicro X9DRi-F, Supermicro X9DRI-LN4F+, Supermicro X9SPU-F-O, Supermicro X9SCM-iiF, Supermicro X10SLM-F, Wiwynn Windmill, Wistron/Dell Poweredge C6220. .SH "EXAMPLES" .B # ipmi-sel .PP Show all SEL records on the local machine. .PP .B # ipmi-sel -h ahost -u myusername -p mypassword .PP Show all SEL records of a remote machine using IPMI over LAN. .PP .B # ipmi-sel -h mycluster[0-127] -u myusername -p mypassword .PP Show all SEL records across a cluster using IPMI over LAN. .PP .B # ipmi-sel --delete=44,82 .PP Delete SEL records 44 and 82 on the local machine. .PP .B # ipmi-sel --delete-all .PP Delete all SEL entries on the local machine. .PP .B # ipmi-sel --delete-range=12-42 .PP Delete SEL entries in the range 12 to 42 on the local machine. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), bmc-device(8), ipmiseld(8), ipmi-config(8), freeipmi_interpret_sel.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmi-sensors.8.pre.in0000644002055400205540000003615213527331637017761 0ustar00achuachu00000000000000.TH IPMI-SENSORS 8 "@ISODATE@" "IPMI Sensors version @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmi-sensors \- display IPMI sensor information .SH "SYNOPSIS" .B ipmi-sensors [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmi-sensors displays current readings of sensors and sensor data repository (SDR) information. The default display outputs each sensor's record id, sensor name, sensor type name, sensor reading (if appropriate), and the current sensor event. More verbose information can be found using the verbose options specified below. .B Ipmi-sensors does not inform the user if a problem exists with a particular sensor because sensor readings and events are not analyzed by default. Users may wish to use the \fB\-\-output\-sensor\-state\fR option to output the analyzed sensor state. Some sensors may have a sensor reading or sensor event of "N/A" if the information is unavailable. This is typical of a sensor that is not enabled or not owned by a BMC. Please see \fB\-\-bridge\-sensors\fR option below to deal with sensors not owned by a BMC. Sensors may output a sensor event of "Unknown" if the sensor reading cannot be read. This is typical of a sensor that is busy or a reading that cannot be calculated. If sensors report "Unrecognized State", it is indicative of an unknown sensor type, typically an OEM sensor. If the sensor OEM interpretation is available, the \fB\-\-interpret\-oem\-data\fR may be able to report the appropriate sensor state. Sensors need not always report a sensor event. When a sensor event is not present, "OK" is typically reported. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> To perform IPMI sensor configuration, please see .B ipmi-config(8). To perform some advanced SDR management, please see .B bmc-device(8). #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-operator.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-operator.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMI-SENSORS OPTIONS" The following options are specific to .B ipmi-sensors. .TP \fB\-v\fR, \fB\-\-verbose\fR Output verbose sensor output. This option will output additional information about sensors such as thresholds, ranges, numbers, and event/reading type codes. .TP \fB\-vv\fR Output very verbose sensor output. This option will output more additional information than the verbose option such as information about events, other sensor types, and oem sensors. .TP \fB\-i\fR, \fB\-\-sdr\-info\fR Show sensor data repository (SDR) information .TP \fB\-q\fR, \fB\-\-quiet-readings\fR Do not output sensor reading values by default. This option is particularly useful if you want to use hostranged output across a cluster and want to consolidate the output. .TP \fB\-r\fR \fIRECORD\-IDS\-LIST\fR, \fB\-\-record\-ids\fR=\fIRECORD\-IDS\-LIST\fR Specify sensors to show by record id. Multiple record ids can be separated by commas or spaces. If both \fB\-\-record\-ids\fR and \fB\-\-sensor\-types\fR are specified, \fB\-\-record\-ids\fR takes precedence. A special command line record id of "all", will indicate all record ids should be shown (may be useful for overriding configured defaults). .TP \fB\-R\fR \fIRECORD\-IDS\-LIST\fR, \fB\-\-exclude\-record\-ids\fR=\fIRECORD\-IDS\-LIST\fR Specify sensors to not show by record id. Multiple record ids can be separated by commas or spaces. A special command line record id of "none", will indicate no record ids should be excluded (may be useful for overriding configured defaults). .TP \fB\-t\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types to show outputs for. Multiple types can be separated by commas or spaces. If both \fB\-\-record\-ids\fR and \fB\-\-sensor\-types\fR are specified, \fB\-\-record\-ids\fR takes precedence. A special command line type of "all", will indicate all types should be shown (may be useful for overriding configured defaults). Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR below) or by number (decimal or hex). .TP \fB\-T\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-exclude\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types to not show outputs for. Multiple types can be eparated by commas or spaces. A special command line type of "none", will indicate no types should be excluded (may be useful for overriding configured defaults). Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR below) or by number (decimal or hex). .TP \fB\-L\fR, \fB\-\-list\-sensor\-types\fR List sensor types. .TP \fB\-b\fR, \fB\-\-bridge\-sensors\fR By default, sensors readings are not attempted for sensors on non-BMC owners. By setting this option, sensor requests can be bridged to non-BMC owners to obtain sensor readings. Bridging may not work on some interfaces/driver types. .TP \fB\-\-shared\-sensors\fR Some sensors share the same sensor data record (SDR). This is typically utilized for system event log (SEL) entries and not for sensor readings. However, there may be some motherboards in which this format is utilized for multiple active sensors, or the user simply has interest in seeing the permutation of entries shared by a SDR entry. By setting this option, each sensor number shared by a record will be iterated over and output. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> .TP \fB\-\-ignore\-not\-available\-sensors\fR Ignore not-available (i.e. N/A) sensors in output. .TP \fB\-\-ignore\-unrecognized\-events\fR Ignore unrecognized sensor events. This will suppress output of unrecognized events, typically shown as 'Unrecognized Event = XXXXh' in output. In addition, unrecognized events will be ignored when calculating sensor state with \fI\-\-output\-sensor\-state\fR below. .TP \fB\-\-output\-event\-bitmask\fR Output event bitmask value instead of the string representation. .TP \fB\-\-output\-sensor\-state\fR Output sensor state in output. This will add an additional output reporting if a sensor is in a NOMINAL, WARNING, or CRITICAL state. The sensor state is an interpreted value based on the current sensor event. The sensor state interpretations are determined by the configuration file @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@. See .B freeipmi_interpret_sensor.conf(5) for more information. This option gives identical output to the sensor state previously output by .B ipmimonitoring(8). .TP \fB\-\-sensor\-state\-config\-file\fR=\fIFILE\fR Specify an alternate sensor state configuration file. Option ignored if \fB\-\-output\-sensor\-state\fR not specified. #include <@top_srcdir@/man/manpage-common-entity-sensor-names.man> .TP \fB\-\-output\-sensor\-thresholds\fR Output sensor thresholds in output. This will add columns to the default output for lower non-recoverable, lower critical, lower non-critical, upper non-critical, upper critical, and upper non-recoverable thresholds. #include <@top_srcdir@/man/manpage-common-no-sensor-type-output.man> #include <@top_srcdir@/man/manpage-common-comma-separated-output.man> #include <@top_srcdir@/man/manpage-common-no-header-output.man> #include <@top_srcdir@/man/manpage-common-non-abbreviated-units.man> #include <@top_srcdir@/man/manpage-common-legacy-output.man> .TP \fB\-\-ipmimonitoring\-legacy\-output\fR Output legacy format of legacy .B ipmimonitoring tool. Newer options may not be applicable to legacy output. #include <@top_srcdir@/man/manpage-common-sdr-cache-options-heading.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-options.man> #include <@top_srcdir@/man/manpage-common-sdr-cache-file-directory.man> #include <@top_srcdir@/man/manpage-common-time-options-heading.man> #include <@top_srcdir@/man/manpage-common-time-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> #include <@top_srcdir@/man/manpage-common-hostranged-fanout.man> #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-threads.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> .LP "sensor config file parse error" - A parse error was found in the sensor interpretation configuration file. Please see .B freeipmi_interpret_sensor.conf(5). #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> #include <@top_srcdir@/man/manpage-common-workaround-sdr-text.man> .LP \fIdiscretereading\fR - This workaround option will allow analog sensor readings (i.e. rpm, degrees, etc.) to be read even if the event/reading type code for the sensor is for a discrete sensor (i.e. assert vs. deassert). This option works around poorly defined (and arguably illegal) SDR records that expect analog sensor readings to be read alongside discrete sensors. This option is confirmed to work around issues on HP Proliant DL380 G7 and HP ProLiant ML310 G5 motherboards. .LP \fIignorescanningdisabled\fR - This workaround option will allow sensor readings to be read even if the sensor scanning bit indicates a sensor is disabled. This option works around motherboards that incorrectly indicate sensors as disabled. This may problem may exist on your motherboard if sensors are listed as "N/A" even if they should be available. This option is confirmed to work around issues on Dell Poweredge 2900, Dell Poweredge 2950, Dell Poweredge R410, Dell Poweredge R610, and HP Integrity rx3600 motherboards. .LP \fIassumebmcowner\fR - This workaround option will allow sensor readings to be read if the sensor owner is the BMC, but the reported sensor owner is not the BMC. Typically, sensors owned by a non-BMC sensor owner must be bridged (e.g. with the \fB\-\-bridge\-sensors\fR option), however if the non-BMC sensor owner is invalid, bridging fails. This option works around motherboards that incorrectly report an non-BMC sensor owner by always assuming the sensor owner is the BMC. This problem may exist on your motherboard if sensors are listed as "N/A" even if they should be available. This option is confirmed to work around issues on Fujitsu RX300 and Fujitsu RX300S2 motherboards. .LP \fIignoreauthcode\fR - This workaround option will allow sensor readings to be read if the remote machine is invalidly calculating authentication codes (i.e. authentication hashes) when communicating over LAN. This problem may exist on your system if the error "session timeout" errors or there is an appearance of a hang. Users are cautioned on the use of this option, as it removes an authentication check verifying the validity of a packet. However, in most organizations, this is unlikely to be a security issue. The ignoring of authentication packets is only limited to the period in which sensor readings are done, and not for any portion of the session authentication or session teardown. This option is confirmed to work on Inventec 5441/Dell Xanadu II and Inventec 5442/Dell Xanadu III. (Note: On the above systems, this issue has only been observed when the \fB\-\-bridge\-sensors\fR is used.) #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Dell Poweredge R210, Dell Poweredge R610, Dell Poweredge R710, Dell Poweredge R720, Fujitsu iRMC S1 and iRMC S2 systems, HP Proliant DL160 G8, Intel S5500WB/Penguin Computing Relion 700, Intel S2600JF/Appro 512X, Intel S2600GZ, Intel S2600WP, Intel S5000PAL, Intel Windmill, Quanta Winterfell, Supermicro X7DBR-3, Supermicro X7DB8, Supermicro X8DTN, Supermicro X7SBI-LN4, Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Supermicro X8DT3-LN4F, Supermicro X8DTU-6+, Supermicro X8DTL, Supermicro X8DTL-3F, Supermicro X8SIL-F, Supermicro X9SCL, Supermicro X9SCM, Supermicro X8DTN+-F, Supermicro X8SIE, Supermicro X9SCA-F-O, Supermicro H8DGU-F, Supermicro X9DRi-F, Supermicro X9DRI-LN4F+, Supermicro X9SPU-F-O, Supermicro X9SCM-iiF, Wiwynn Windmill, Wistron/Dell Poweredge C6220. .SH "EXAMPLES" .B # ipmi-sensors .PP Show all sensors and readings on the local machine. .PP .B # ipmi-sensors --verbose .PP Show verbose sensors and readings on the local machine. .PP .B # ipmi-sensors --record-ids="7,11,102" .PP Show sensor record ids 7, 11, and 102 on the local machine. .PP .B # ipmi-sensors --sensor-types=fan .PP Show all sensors of type fan on the local machine. .PP .B # ipmi-sensors -h ahost -u myusername -p mypassword .PP Show all sensors on a remote machine using IPMI over LAN. .PP .B # ipmi-sensors -h mycluster[0-127] -u myusername -p mypassword .PP Show all sensors across a cluster using IPMI over LAN. .PP #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> #include <@top_srcdir@/man/manpage-common-known-issues.man> .LP Some sensors may be output as not available (i.e. N/A) because the owner of the sensor is not the BMC. To attempt to bridge sensors and access sensors not on the BMC, users may wish to try the \fB\-b\fR or \fB\-\-bridge\-sensors\fR options. #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), bmc-device(8), ipmi-config(8), freeipmi_interpret_sensor.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmiconsole.8.pre.in0000644002055400205540000003424213527331637017650 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmiconsole.8.pre.in,v 1.52 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2006-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-221226 .\" .\" This file is part of Ipmiconsole, a set of IPMI 2.0 SOL librarie .\" and utilities. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiconsole is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiconsole is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiconsole. If not, see . .\"############################################################################ .TH ipmiconsole 8 "@ISODATE@" "ipmiconsole @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmiconsole \- IPMI console utility .SH "SYNOPSIS" .B ipmiconsole [\fIOPTION\fR...] .SH "DESCRIPTION" .B ipmiconsole is a Serial-over-LAN (SOL) console utility. It can be used to establish console sessions to remote machines using the IPMI 2.0 SOL protocol. .B Ipmiconsole communicates with a remote machine's Baseboard Management Controller (BMC) to establish a console session. Before any SOL communication can take place, the remote machine's BMC must be configured properly. The FreeIPMI tool .B ipmi-config(8) may be used to do this configuration. .LP Often (although not always), console redirection must be also be configured properly in the BIOS and/or operating system. Both must be configured to redirect console traffic out the appropriate COM port. Please see your motherboard and OS documentation for instructions on proper setup. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname.man> .TP \fB\-u\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must a high enough privilege to establish a SOL session and have SOL session abilities. #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> .TP \fB\-\-session-timeout\fR=\fIMILLISECONDS\fR Specify the session timeout in milliseconds. Defaults to 60000 milliseconds (60 seconds) if not specified. .TP \fB\-\-retransmission-timeout\fR=\fIMILLISECONDS\fR Specify the packet retransmission timeout in milliseconds. Defaults to 500 milliseconds (0.5 seconds) if not specified. .TP \fB\-I\fR, \fB\-\-cipher\-suite-id\fR=\fICIPHER-SUITE-ID\fR Specify the IPMI 2.0 cipher suite ID to use. The Cipher Suite ID identifies a set of authentication, integrity, and confidentiality algorithms to use for IPMI 2.0 communication. The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the confidentiality algorithm identifies the algorithm to use for payload encryption. Defaults to cipher suite ID 3 if not specified. The user should be aware that only cipher suite ids 3, 8, and 12 encrypt console payloads. Console information will be sent in the clear if an alternate cipher suite id is selected. The following cipher suite ids are currently supported: #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-admin.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMICONSOLE OPTIONS" The following options are specific to .B ipmiconsole. .TP \fB\-e\fR \fICHAR\fR, \fB\-\-escape-char\fR=\fICHAR\fR Specify an alternate escape character (default char '&'). .TP \fB\-\-dont-steal\fR Do not steal an SOL session if one is already detected as being in use. Under most circumstances, if SOL is detected as being in use, .B ipmiconsole will attempt to steal the SOL session away from the previous session. This default behavior exists for several reasons, most notably that earlier SOL sessions may have not been able to be deactivate properly. .TP \fB\-\-deactivate\fR Deactivate SOL session if one is detected as being in use and exit. .TP \fB\-\-serial\-keepalive\fR Occasionally send NUL characters to detect inactive serial connections. This option is particularly useful for those who intend to run .B ipmiconsole without much interaction, such as for logging purposes. While IPMI connections may still be alive, some motherboards have exhibited bugs in which underlying serial data can no longer be sent/received. From the viewpoint of .B ipmiconsole, data is simply not be sent out of the remote system and this problem is only detected once there is user interaction. By sending the occasional NUL character, the underlying loss of serial data transfer can be detected far more quickly. There is some risk with this option, as the NUL character byte may affect the remote system depending on what data it may or may not be expecting. .TP \fB\-\-serial\-keepalive\-empty\fR This option is identical to \fB\-\-serial\-keepalive\fR except that SOL packets will contain no NUL character data. On some motherboards, this may be sufficient to deal with a hanging IPMI session without the risk of regularly sending a NUL character byte may have. However, some systems may not ACK a SOL packet without character data in it, meaning these keepalive packets do nothing. .TP \fB\-\-sol\-payload\-instance\fR=\fINUM\fR Specify the SOL payload instance number. The default value is 1, valid values range from 1 to 15. Most systems only support a single instance, however a few allow users to access multiple. .TP \fB\-\-deactivate\-all\-instances\fR When used along with the \fB\-\-deactivate\fR option, will deactivate all active SOL instances instead of just the currently configured payload instance. .TP \fB\-\-lock-memory\fR Lock sensitive information (such as usernames and passwords) in memory. .TP \fB\-\-debugfile\fR Output debugging to files in current directory rather than to standard output. .if @WITH_DEBUG@ \{ .TP \fB\-\-noraw\fR Don't enter terminal raw mode. \} .LP .SH "ESCAPE CHARACTERS" The following escape sequences are supported. The default supported escape character is '&', but can be changed with the \fB\-e\fR option. .TP .I &? Display a list of currently available escape sequences. .TP .I &. Terminate the connection. .TP .I &B Send a "serial-break" to the remote console. .TP .I &D Send a DEL character. .TP .I && Send a single escape character. #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> .SH "IPMICONSOLE TROUBLESHOOTING" The following are common issues for error messages in .B ipmiconsole. .LP "SOL unavailable" - SOL is not configured for use on the remote BMC. It may be not configured in general or for the specific user specified. Authenticating with a different user may be sufficient, however the IPMI protocol does not reveal detail on what is not configured on the remote BMC. .LP "SOL in use" - SOL is already in use on the remote BMC. If you do not specify the .I --dont-steal option, .B ipmiconsole will attempt to steal the SOL session away from the other session. Not all BMCs support the ability to steal away a SOL session. .LP "SOL session stolen" - Your SOL session has been stolen by another session. You may wish to try and steal the session back by reconnecting. .LP "SOL requires encryption" - SOL requires a cipher suite id that includes encryption. Please try to use cipher suite id 3, 8, or 12. It may also be possible the encryption requirements are not configured correctly on the remote BMC. .LP "SOL requires no encryption" - SOL requires a cipher suite id that does not use encryption. Please try to use cipher suite id 0, 1, 2, 6, 7, or 11. It may also be possible the encryption requirements are not configured correctly on the remote BMC. .LP "BMC Implementation" - The BMC on the remote machine has a severe problem in its implementation. Please see the WORKAROUNDS section below for possible workarounds. If additional vendor workarounds are required, please contact the authors. .LP "excess retransmissions sent" - An excessive number of retransmissions of SOL packets has occurred and .B ipmiconsole has given up. This may be due to network issues or SOL issues. Some of the same issues involved with "connection timeout" or "session timeout" errors may be involved. Please try to reconnect. .LP "excess errors received" - An excessive number of SOL packet errors has occurred and .B ipmiconsole has given up. This may be due to network issues or SOL issues. Please try to reconnect. .LP "BMC Error" - This error usually means a vendor SOL implementation requires a combination of authentication, encryption, privilege, etc. that have not been met by the user's choices. Please try a combination of different cipher suites, privileges, etc. to resolve the problem. Please see the WORKAROUNDS section below for possible workarounds too. #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> .LP \fIsolpayloadsize\fR - This workaround flag will not check for valid SOL payload sizes and assume a proper set. It works around remote systems that report invalid IPMI 2.0 SOL payload sizes. Those hitting this issue may see "BMC Implementation" errors. Issue observed on Asus P5M2/RS162-E4/RX4, Intel SR1520ML/X38ML, Inventec 5441/Dell Xanadu II, Sun x4100, Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, and Quanta QSSC-S4R//Appro GB812X-CN. .LP \fIsolport\fR - This workaround flag will ignore alternate SOL ports specified during the protocol. It works around remote systems that report invalid alternate SOL ports. Those hitting this issue may see "connection timeout" errors. Issue observed on Asus P5MT-R and Supermicro X8DTH-iF. .LP \fIsolstatus\fR - This workaround flag will not check the current activation status of SOL during the protocol setup. It works around remote systems that do not properly support this command. Those hitting this issue may see "BMC Error" errors. Issue observed on Supermicro X8SIL-F. .LP \fIsolchannelsupport\fR - This workaround flag will not check if SOL is supported on the current channel. It works around remote systems that do not properly support this command. Those hitting this issue may see "BMC Error" errors. Issue observed on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill .LP \fIserialalertsdeferred\fR - This workaround option will set serial alerts to be deferred instead of have them be failures. This works around motherboards that perform IPMI over serial along with IPMI serial over LAN. Those hitting this issue may see "excess retransmissions sent" when they attempt to input data via SOL. Issue observed on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill. .LP \fIsolpacketseq\fR - This workaround option will increment the SOL payload packet sequence number under dire circumstances. Normally SOL should never do this, however some motherboards have shown to get "stuck" due to an internal bug on the motherboard. This workaround can help in getting the BMC un-stuck. Those hitting this issue may see "excess retransmissions sent" when they attempt to input data via SOL. Issue observed on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill. #include <@top_srcdir@/man/manpage-common-known-issues.man> .LP Some motherboards define an OEM SOL inactivity timeout for SOL sessions. If SOL sessions stay inactive for long periods of time, .B ipmiconsole sessions may be abruptly closed, most likely resulting in session timeout errors. Please see OEM notes for information on modifying this parameter if you wish for sessions to stay active longer. .SH "SPECIFIC HARDWARE NOTES" Intel SR1520ML/X38ML: After a reboot, the SOL session appears to "disconnect" from the motherboard but stay alive. Character data input from the .B ipmiconsole client is accepted by the remote machine, but no character data or console data is ever sent back from the remote machine. The SOL session is subsequently useless. There is currently no workaround in place to handle this. The session must be closed and restarted. .SH "EXAMPLES" .B # ipmiconsole -h ahost -u myusername -p mypassword .PP Establish a console sesssion with a remote host. .PP .if @WITH_DEBUG@ \{ This version of ipmiconsole was compiled with debugging. When compiled with debugging, .B ipmiconsole is insecure. The following were intentionally left in .B ipmiconsole for debugging purposes: .IP o 2 Core dumps are enabled. Before placing ipmiconsole in a production system, it is recommended that the program be compiled with debugging turned off. \} #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2006-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7), ipmi-config(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmidetect.8.pre.in0000644002055400205540000000767413527331637017467 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmidetect.8.pre.in,v 1.17 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmidetect, tools and libraries for detecting .\" IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmidetect is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmidetect is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmidetect. If not, see . .\"############################################################################ .TH Ipmidetect 8 "@ISODATE@" "Ipmidetect @VERSION@" "Ipmidetect" .SH "NAME" ipmidetect \- list detected and/or undetected IPMI interfaces in a cluster .SH "SYNOPSIS" .B ipmidetect [\fIOPTION\fR...] [\fINODES\fR...] .br .SH "DESCRIPTION" .B ipmidetect lists which IPMI nodes have been detected or undetected in a cluster. This information is provided by the .B libipmidetect(3) library and .B ipmidetectd(8) daemon. .LP .B ipmidetect will output the status of each IPMI node configured with .B ipmidetectd(8) unless they are specified on the command line. If the first node listed is "-", nodes will be read in from standard input. The nodes can be listed in hostrange format, comma separated lists, or space separated lists. See the section below on HOSTRANGED SUPPORT for instructions on how to list hosts in range format. The hostnames listed must be the shortened names of hostnames. .SH "OPTIONS" .TP \fB\-h\fR, \fB\-\-help\fR Print help and exit .TP \fB\-v\fR, \fB\-\-version\fR Print version and exit .TP \fB\-o\fR \fISTRING\fR, \fB\-\-hostname\fR=\fISTRING\fR server hostname (default=localhost) .TP \fB\-p\fR \fIINT\fR, \fB\-\-port\fR=\fIINT\fR server port (default=8649) .TP \fB\-d\fR, \fB\-\-detected\fR List only detected nodes .TP \fB\-u\fR, \fB\-\-undetected\fR List only undetected nodes .TP \fB\-q\fR, \fB\-\-hostrange\fR List nodes in hostrange format (default) .TP \fB\-c\fR, \fB\-\-comma\fR List nodes in comma separated list .TP \fB\-n\fR, \fB\-\-newline\fR List nodes in newline separated list .TP \fB\-s\fR, \fB\-\-space\fR List nodes in space separated list .LP #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> .SH "DIAGNOSTICS" The exit value of .B ipmidetect depends on the options performed on the command line. If the default output is used, the exit value will be 0 if the command succeeds without error. If the --detected option is used and no undetected nodes have been discovered, the exit value will be 0. If undetected nodes are found, the exit value will be 1. If the --undetected option is used and no detected nodes have been discovered, the exit value will be 0. If detected nodes are found, the exit value will be 1. On errors, the exit value will be 2. #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" libipmidetect(3), ipmidetect.conf(5), ipmidetectd(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmidetect.conf.5.pre.in0000644002055400205540000000541513527331637020377 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmidetect.conf.5.pre.in,v 1.13 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmidetect, tools and libraries for detecting .\" IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmidetect is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmidetect is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmidetect. If not, see . .\"############################################################################ .TH IPMIDETECT.CONF 5 "@ISODATE@" "LLNL" "LIBIPMIDETECT" .SH "NAME" ipmidetect.conf \- specify alternate default values for the ipmidetect library .SH "DESCRIPTION" Through a configuration file, system administrators may override the default values used in the .BR ipmidetect_load_data(3) API function. .LP The configuration file is stored at @IPMIDETECT_CONFIG_FILE_DEFAULT@. .SH "CONFIGURATION OPTIONS" The following are a list of configuration options that can be specified in the configuration file. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .TP .I hostnames host1 host2 host3 ... Specify the hostname of the server to reach. Multiple hostnames can be listed up to a maximum of 8. .TP .I port num Specify the port. .TP .I timeout_len seconds Specify the timeout length in seconds. .SH "FILES" @IPMIDETECT_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. .SH "SEE ALSO" libipmidetect(3), ipmidetect(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmidetectd.8.pre.in0000644002055400205540000000555313527331637017625 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmidetectd.8.pre.in,v 1.15 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmidetect, tools and libraries for detecting .\" IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmidetect is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmidetect is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmidetect. If not, see . .\"############################################################################# .TH ipmidetectd 8 "@ISODATE@" "ipmidetectd @VERSION@" ipmidetectd .SH "NAME" ipmidetectd \- IPMI node detection monitoring daemon .SH "SYNOPSIS" .B ipmidetectd [\fIOPTION\fR...] .br .SH "DESCRIPTION" The .B ipmidetectd daemon regularly sends out IPMI pings to determine if nodes have functioning IPMI interfaces or not. It is primarily used to determine those nodes in the cluster that are not functioning properly, allowing IPMI commands to be executed across the cluster faster by skipping those nodes that would automatically timeout. .LP The .B ipmidetectd daemon must be configured using the .B ipmidetectd configuration file. Until hosts to be pinged are configured, .B ipmidetectd will not function properly. .LP See the .BR ipmidetectd.conf(5) manpage for additional information. .SH "OPTIONS" .TP \fB\-h\fR, \fB\-\-help\fR Output help .TP \fB\-v\fR, \fB\-\-version\fR Output version .TP \fB\-c\fR \fIFILE\fR, \fB\-\-config\-file\fR Specify alternate configuration file .TP \fB\-d\fR, \fB\-\-debug\fR Turn on debugging and run daemon in foreground .SH "ERRORS" Errors are logged to syslog. .SH "FILES" @IPMIDETECTD_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" ipmidetectd.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmidetectd.conf.5.pre.in0000644002055400205540000000617213527331637020544 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmidetectd.conf.5.pre.in,v 1.15 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmidetect, tools and libraries for detecting .\" IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmidetect is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmidetect is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmidetect. If not, see . .\"############################################################################# .TH ipmidetectd.conf 5 "@ISODATE@" "ipmidetectd.conf @VERSION@" "ipmidetectd.conf" .SH "NAME" ipmidetectd.conf \- ipmidetectd configuration file .SH "DESCRIPTION" The .B ipmidetectd configuration file configures the .B ipmidetectd daemon. .LP The default configuration file loaded is @IPMIDETECTD_CONFIG_FILE_DEFAULT@. .LP The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .SH "IPMIDETECTD CONFIGURATION OPTIONS" .TP .TP .I ipmiping_period num Specify the period time in milliseconds that IPMI pings should be regularly sent out. Default is 15000. .TP .I ipmidetectd_server_port port Specify the alternate default port the ipmidetectd server should listen for requests off of. Default is 9225. .TP .I host string[:port] Specify a host or IP address the ipmidetectd daemon should send IPMI pings to. Can be specified as many times as necessary. An optional port can be specified. Can accept host ranges as input. See HOSTRANGED SUPPORT in .B ipmidetect(8) for information on ranged formats. If specifying an IPv6 address and port, use the format [ADDRESS]:PORT. .SH "FILES" @IPMIDETECTD_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. .SH "SEE ALSO" ipmidetectd(8), ipmidetect(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmiping.8.pre.in0000644002055400205540000000563613527331637017150 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmiping.8.pre.in,v 1.18 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2003-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-155448 .\" .\" This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant .\" remote systems. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiping is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiping is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiping. If not, see . .\"############################################################################ .TH IPMIPING 8 "@ISODATE@" "ipmiping @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmiping \- send IPMI Get Authentication Capabilitiy request to network hosts .SH "SYNOPSIS" .B ipmiping [\fIOPTION\fR...] destination .SH "DESCRIPTION" .B ipmiping uses the IPMI Get Channel Authentication Capabilities request datagram to elicit an IPMI Get Channel Authentication Capabilitiesl response from a remote host. The utility can be used to verify if a remote host supports IPMI. The initial starting sequence number will be randomized. .B ipmiping will return 0 to the environment if it receives atleast 1 response from the remote host. Otherwise, it exists with a value of 1. #include <@top_srcdir@/man/manpage-common-ping-options.man> .TP \fB\-r\fR \fIversion\fR Specify IPMI version. Available options are "1.5" and "2.0". Default is to use "1.5". Note that packets will always be sent with the IPMI 1.5 protocol, but IPMI 1.5 vs IPMI 2.0 relevant fields will be communicated in the Get Channel Authentication Capabilities datagram depending on user choice. #include <@top_srcdir@/man/manpage-common-known-issues-ping.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2003-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> #include <@top_srcdir@/man/manpage-common-ping-origin.man> .SH "SEE ALSO" freeipmi(7), ping(8), rmcpping(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmipower.8.pre.in0000644002055400205540000005114013527331637017336 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmipower.8.pre.in,v 1.59 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2003-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-155698 .\" .\" This file is part of Ipmipower, a remote power control utility. .\" For details, see http://www.llnl.gov/linux/. .\" .\" Ipmipower is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmipower is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmipower. If not, see . .\"############################################################################ .TH ipmipower 8 "@ISODATE@" "ipmipower @PACKAGE_VERSION@" "System Commands" .SH "NAME" ipmipower \- IPMI power control utility .SH "SYNOPSIS" .B ipmipower [\fIOPTION\fR...] .SH "DESCRIPTION" .B Ipmipower allows users to remotely power on, off, cycle, hard reset, get a power status query, perform a pulse diagnostic interrupt, or initiate a soft-shutdown of the OS via ACPI through the IPMI over LAN protocol. .LP When a power command (\fB\-\-on\fR, \fB\-\-off\fR, \fB\-\-cycle\fR, \fB\-\-reset\fR, \fB\-\-stat\fR, \fB\-\-pulse\fR, or \fB\-\-soft\fR) is specified on the command line, .B Ipmipower will attempt to run the power command on all hostnames listed on the command line then exit. .LP If no power commands are specified on the command line, .B ipmipower will run in interactive mode. Interactive mode gives the user a command line interface to enter various commands. Details of the interactive command line interface can be found below under INTERACTIVE COMMANDS. .LP #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> .TP \fB\-D\fR \fIIPMIDRIVER\fR, \fB\-\-driver\-type\fR=\fIIPMIDRIVER\fR Specify the driver type to use instead of doing an auto selection. The currently available outofband drivers are LAN and LAN_2_0, which perform IPMI 1.5 and IPMI 2.0 respectively. #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> .TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must have atleast OPERATOR privileges to run the --on, --off, --reset, --cycle, --pulse, or --soft power control commands. The user must have atleast USER privileges to determine the power status of the machine through --stat. #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> .TP \fB\-\-retransmission-timeout\fR=\fIMILLISECONDS\fR Specify the packet retransmission timeout in milliseconds. Defaults to 400 milliseconds (0.4 seconds) if not specified. #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-operator.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .if @WITH_DEBUG@ \{ .TP \fB\-\-rmcpdump\fR Turn on RMCP packet dump output. Warning, the dump output can get extremely long. \} .SH "IPMIPOWER OPTIONS" The following options are specific to .B ipmipower. .TP \fB\-n\fR, \fB\-\-on\fR Power on the target hosts. .TP \fB\-f\fR, \fB\-\-off\fR Power off the target hosts. .TP \fB\-c\fR, \fB\-\-cycle\fR Power cycle the target hosts. .TP \fB\-r\fR, \fB\-\-reset\fR Reset the target hosts. .TP \fB\-s\fR, \fB\-\-stat\fR Get power status of the target hosts. .TP \fB\-\-pulse\fR Send power diagnostic interrupt to target hosts. .TP \fB\-\-soft\fR Initiate a soft-shutdown of the OS via ACPI. .TP \fB\-\-on\-if\-off\fR The IPMI specification does not require the power cycle or hard reset commands to turn on a machine that is currently powered off. This option will force .B ipmipower to issue a power on command instead of a power cycle or hard reset command if the remote machine's power is currently off. .TP \fB\-\-wait\-until\-on\fR The IPMI specification allows power on commands to return prior to the power on actually taking place. This option will force .B ipmipower to regularly query the remote BMC and return only after the machine has powered on. .TP \fB\-\-wait\-until\-off\fR The IPMI specification allows power off commands to return prior the power off actually taking place. This option will force .B ipmipower to regularly query the remote BMC and return only after the machine has powered off. .TP \fB\-\-oem\-power\-type\fR=\fIOEM\-POWER\-TYPE\fR This option informs .B ipmipower to initiate power control operations via an IPMI OEM specific power control extension. The currently available POWERTYPEs are \fINONE\fR and \fIC410X\fR. Please see OEM POWER EXTENSIONS below for additional information. .SH "IPMIPOWER ADVANCED NETWORK OPTIONS" The following options are used to change the networking behavior of .B ipmipower. .TP \fB\-\-retransmission\-wait\-timeout\fR=\fIMILLISECONDS\fR Specify the retransmission wait timeout length in milliseconds. The retransmission wait timeout is similar to the retransmission timeout above, but is used specifically for power completion verification with the \fB\-\-wait\-until\-on\fR and \fB\-\-wait\-until\-off\fR options. Defaults to 500 milliseconds (0.5 seconds). .TP \fB\-\-retransmission\-backoff\-count\fR=\fICOUNT\fR Specify the retransmission backoff count for retransmissions. After ever COUNT retransmissions, the retransmission timeout length will be increased by another factor. Defaults to 8. .TP \fB\-\-ping\-interval\fR=\fIMILLISECONDS\fR Specify the ping interval length in milliseconds. When running in interactive mode, RMCP (Remote Management Control Protocol) discovery messages will be sent to all configured remote hosts every MILLISECONDS to confirm their support of IPMI. Power commands cannot be sent to a host until it is discovered (or re-discovered if previously lost). Defaults to 5000 milliseconds (5 seconds). Ping discovery messages can be disabled by setting this valu to 0. RMCP ping discovery messages are automatically disabled in non-interactive mode. .TP \fB\-\-ping\-timeout\fR=\fIMILLISECONDS\fR Specify the ping timeout length in milliseconds. When running in interactive mode, RMCP (Remote Management Control Protocol) messages discovery will be sent to all configured remote hosts to confirm their support of IPMI. A remote host is considered undiscovered if the host does not respond in MILLISECONDS time. Defaults to 30000 milliseconds (30 seconds). The ping timeout cannot be larger than the ping interval. .TP \fB\-\-ping\-packet\-count\fR=\fICOUNT\fR Specify the ping packet count size. Defaults to 10. See the \fB\-\-ping-percent\-fR option below for more information on this option. .TP \fB\-\-ping\-percent\fR=\fIPERCENT\fR Specify the ping percent value. Defaults to 50. Since IPMI is based on UDP, it is difficult for .B ipmipower to distinguish between a missing machine and a bad (or heavily loaded) network connection in interactive mode. when running in interactive mode. For example, suppose a link consistently drops 80% of the packets to a particular machine. The power control operation may have difficulty completing, although a recent pong response from RMCP makes .B ipmipower believe the machine is up and functioning properly. The ping packet acount and percent options are used to alleviate this problem. .B Ipmipower will monitor RMCP ping packets in packet count chunks. If .B ipmipower does not receive a response to greater than ping percent of those packets, .B ipmipower will assume the link to this node is bad and will not send power control operations to that node until the connection is determined to be reliable. This heuristic can be disabled by setting either the ping packet count or ping percent to 0. This feature is not used if ping interval is set to 0. .TP \fB\-\-ping\-consec\-count\fR=\fICOUNT\fR Specify the ping consecutive count. This is another heuristic used to determine if a node should be considered discovered, undiscovered, or with a bad connection. If a valid RMCP pong response was received for the last COUNT ping packets, a node will be considered discovered, regardless of other heuristics listed above. Defaults to 5. This heuristic can be disabled by setting this value to 0. This feature is not used if other ping features described above are disabled. .LP #include <@top_srcdir@/man/manpage-common-hostranged-options-header.man> #include <@top_srcdir@/man/manpage-common-hostranged-buffer.man> #include <@top_srcdir@/man/manpage-common-hostranged-consolidate.man> .TP \fB\-F\fR \fINUM\fR, \fB\-\-fanout\fR=\fINUM\fR Specify multiple host fanout. Indicates the maximum number of power control operations that can be executed in parallel. #include <@top_srcdir@/man/manpage-common-hostranged-eliminate.man> #include <@top_srcdir@/man/manpage-common-hostranged-always-prefix.man> .LP .SH "INTERACTIVE COMMANDS" .B Ipmipower provides the following interactive commands at the ipmipower> prompt. Before any power commands (on, off, cycle, reset, stat, pulse, or soft) can be used, hostnames must be configured into .B ipmipower, either through the command prompt or the hostname command below. The parameters and options to the commands below mirror their appropriate command line options. .TP \fBhostname\fR \fI[IPMIHOST(s)]\fR Specify a new set of hosts. No input to unconfigure all hosts. .TP \fBusername\fR \fI[USERNAME]\fR Specify a new username. No input for null username. .TP \fBpassword\fR \fI[PASSWORD]\fR Specify a new password. No input for null password. .TP \fBk_g\fR \fI[K_G]\fR Specify a new K_g BMC Key. No input for null key. Prefix with '0x' to enter a key in hexadecimal .TP \fBipmi-version\fR \fIIPMIVERSION\fR Specify the ipmi version to use. .TP \fBsession-timeout\fR \fIMILLISECONDS\fR Specify a new session timeout length. .TP \fBretransmission-timeout\fR \fIMILLISECONDS\fR Specify a new retransmiision timeout length. .TP \fBauthentication-type\fR \fIAUTHENTICATION-TYPE\fR Specify the authentication type to use. .TP \fBcipher-suite-id\fR \fICIPHER-SUITE-ID\fR Specify the cipher suite id to use. .TP \fBprivilege-level\fR \fIPRIVILEGE-LEVEL\fR Specify the privilege level to use. .TP \fBworkaround-flags\fR \fIWORKAROUNDS\fR Specify workaround flags. .TP \fBdebug\fR \fI[on|off]\fR Toggle debug output. .if @WITH_DEBUG@ \{ .TP \fBrmcpdump\fR \fI[on|off]\fR Toggle RMCP dump output. \} .TP \fBon\fR \fI[IPMIHOST(s)]\fR Turn on all configured hosts or specified hosts. .TP \fBoff\fR \fI[IPMIHOST(s)]\fR Turn off all configured hosts or specified hosts. .TP \fBcycle\fR \fI[IPMIHOST(s)]\fR Power cycle all configured hosts or specified hosts. .TP \fBreset\fR \fI[IPMIHOST(s)]\fR Reset all configured hosts or specified hosts. .TP \fBstat\fR \fI[IPMIHOST(s)]\fR Query power status for all configured hosts or specified hosts. .TP \fBpulse\fR \fI[IPMIHOST(s)]\fR Pulse diagnostic interrupt all configured hosts or specified hosts. .TP \fBsoft\fR \fI[IPMIHOST(s)]\fR Initiate a soft-shutdown for all configured hosts or specified hosts. .TP \fBidentify-on\fR \fI[IPMIHOST(s)]\fR Turn on physical system identification. .TP \fBidentify-off\fR \fI[IPMIHOST(s)]\fR Turn off physical system identification. .TP \fBidentify-status\fR \fI[IPMIHOST(s)]\fR Query physical system identification status. .TP \fBon-if-off\fR \fI[on|off]\fR Toggle on-if-off functionality. .TP \fBwait-until-on\fR \fI[on|off]\fR Toggle wait-until-on functionality. .TP \fBwait-until-off\fR \fI[on|off]\fR Toggle wait-until-off functionality. .TP \fBretransmission-wait-timeout\fR \fIMILLISECONDS\fR Specify a new retransmission wait timeout length. .TP \fBretransmission-backoff-count\fR \fICOUNT\fR Specify a new retransmission backoff count. .TP \fBping-interval\fR \fIMILLISECONDS\fR Specify a new ping interval length. .TP \fBping-timeout\fR \fIMILLISECONDS\fR Specify a new ping timeout length. .TP \fBping-packet-count\fR \fICOUNT\fR Specify a new ping packet count. .TP \fBping-percent\fR \fIPERCENT\fR Specify a new ping percent. .TP \fBping-consec-count\fR \fICOUNT\fR Specify a new ping consec count. .TP \fBbuffer-output\fR \fI[on|off]\fR Toggle buffer-output functionality. .TP \fBconsolidate-output\fR \fI[on|off]\fR Toggle consolidate-output functionality. .TP \fBfanout\fR \fICOUNT\fR Specify a fanout. .TP \fBalways-prefix\fR \fI[on|off]\fR Toggle always-prefix functionality. .TP \fBhelp\fR Output help menu. .TP \fBversion\fR Output version. .TP \fBconfig\fR Output the current configuration. .TP \fBquit\fR Quit program. .SH "OEM POWER EXTENSIONS" Some motherboards include IPMI OEM extensions for alternate power control mechanisms. For example, these power control mechanisms may allow you to power control a sub-device within the system rather than the entire system itself. .LP By specifying an OEM power type via \fB\-\-oem\-power\-type\fR on the command line or .B freeipmi.conf(5), you can instruct .B ipmipower to execute alternate power control implementations over the standard ones. Depending on the OEM extension, some power control commands may no longer be available. For example, an OEM extension may allow \fBon\fR but not \fBcycle\fR. Specific .B ipmipower options may not longer function either. .LP Some OEM extensions may require additional arguments for their power control action, such as a sub-device identifier. Additional arguments can be provided by appending a plus sign ('+') and the extra information to the end of the hostname. This can be done on the command line or in interactive mode. For example, the hostname \fImynode+18\fR would indicate the power control operation should be sent to the host \fImynode\fR, and \fI18\fR is the identifier of a possible sub-device to be power controlled. The \fI\-\-consolidate\-output\fR option is commonly disabled when using an OEM power control that requires extra arguments. .LP Because OEM power control may involve subtypes, it is possible a user may wish to power control multiple sub-devices on the same host. For example, you might specify the hosts \fImynode+1,mynode+2\fR, indicating to power control subdevice 1 and 2 on \fImynode\fR. Because many BMCs cannot handle multiple IPMI sessions, power control operations to the same host will be serialized internally by .B ipmipower. .LP The following are the current OEM power types available, along with information on the systems they work with and the power control operations available. .TP .B C410X This OEM power type supports the power control of PCIe slots on Dell Poweredge C410x systems. It supports \fBon\fR, \fBoff\fR, and \fBstat\fR. The PCIe slot number ranges from 1-16 and must always be specified when attempting to power control with this extension. For example, the hostname \fImynode+2\fR would inform .B ipmipower to operate on slot number \fI2\fR on \fImynode\fR. The C410x appears to have difficulty handling new slot power control requests until prior ones have completed. Users may wish to strongly consider using the \fB\-\-wait\-until\-on\fR and \fB\-\-wait\-until\-off\fR options if multiple slots will be power controlled in short succession. .TP .B NONE This informs .B ipmipower that no OEM power type extension is to be used and standard IPMI power control is used. This is the default. #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> .LP When multiple hosts are specified by the user, a socket will be created for each host and polled on, effectively allowing communication to all hosts in parallel. This will allow communication to large numbers of nodes far more quickly than if done in serial. The \fB\-F\fR option can configure the number of nodes that can be communicated with in parallel at the same time. #include <@top_srcdir@/man/manpage-common-hostranged-text-options.man> .SH "EXAMPLES" .LP Determine the power status of foo[0-2] with null username and password ipmipower -h foo[0-2] --stat .LP Determine the power status of foo[0-2] with non-null username and password ipmipower -h foo[0-2] -u foo -p bar --stat .LP Hard reset nodes foo[0-2] with non-null username and password ipmipower -h foo[0-2] -u foo -p bar --reset #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> .SH "IPMIPOWER TROUBLESHOOTING" When powering on a powered off machine, the client must have a means by which to resolve the MAC address of the remote machine's ethernet card. While most modern IPMI solutions support the ability to ARP and resolve addresses when the machine is powered off, some older machines do not. This is typically solved in one of two ways: .LP 1) Enable gratuitous ARPs on the remote machine. The remote machine will send out a gratuitous ARP, which advertises the ethernet IP and MAC address so that other machines on the network this information their local ARP cache. For large clusters, this method is not recommended since gratuitous ARPs can flood the network with unnecessary traffic. .LP 2) Permanently store the remote machine's MAC address in the local ARP cache. This is the more common approach on large clusters. .LP Other methods are listed in the IPMI specification. #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> .LP \fIipmiping\fR - This workaround option will inform .B ipmipower to use IPMI based ping packets instead of RMCP ping packets. Some motherboards have been observed to not implement RMCP ping/pong support despite being required by the IPMI specification. Issue observed on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-diagnostics.man> #include <@top_srcdir@/man/manpage-common-diagnostics-hostranged-text.man> .LP When operating in interactive mode, the exit value will be based on the last power operation executed. #include <@top_srcdir@/man/manpage-common-known-issues.man> .LP IPMI specifications do not require BMCs to perform a power control operation before returning a completion code to the caller. Therefore, it is possible for .B ipmipower to return power status queries opposite of what you are expecting. For example, if a "power off" operation is performed, a BMC may return a successful completion code to .B ipmipower before the "power off" operation is actually performed. Subsequent power status queries may return "on" for several seconds, until the BMC actually performs the "power off" operation. .LP .if @WITH_DEBUG@ \{ This version of ipmipower was compiled with debugging. When compiled with debugging, .B ipmipower is insecure. The following were intentionally left in .B ipmipower for debugging purposes: .LP .IP o 2 Core dumps are enabled. .IP o In interactive mode, commands may output sensitive information to stdout. .LP Before placing .B ipmipower in a production system, it is recommended that the program be compiled with debugging turned off. \} #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2003-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7), ipmi-config(8), ipmi-oem(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmiseld.8.pre.in0000644002055400205540000003356513527331637017144 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmiseld.8.pre.in,v 1.15 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" LLNL-CODE-559172 .\" .\" This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. .\" For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiseld is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiseld is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiseld. If not, see . .\"############################################################################# .TH ipmiseld 8 "@ISODATE@" "ipmiseld @VERSION@" ipmiseld .SH "NAME" ipmiseld \- IPMI SEL logging daemon .SH "SYNOPSIS" .B ipmiseld [\fIOPTION\fR...] .br .SH "DESCRIPTION" The .B ipmiseld daemon polls the system event log (SEL) of specified hosts and stores the logs into the local syslog. By default, the daemon can also make best efforts to manage the remote SEL's buffer to ensure events are never lost. Recent logging data will be cached to disk to ensure that SEL events are not missed in the event the client or server is rebooted. .LP Many of the options for this daemon are very similar to the .B ipmi-sel(8) tool. It can be configured to log the local host, a remote host, or a range of hosts to the local syslog. It can be configured via the command line arguments listed below or via the @IPMISELD_CONFIG_FILE_DEFAULT@ configuration file. #include <@top_srcdir@/man/manpage-common-table-of-contents.man> #include <@top_srcdir@/man/manpage-common-general-options-header.man> #include <@top_srcdir@/man/manpage-common-driver.man> #include <@top_srcdir@/man/manpage-common-inband.man> #include <@top_srcdir@/man/manpage-common-outofband-hostname-hostranged.man> #include <@top_srcdir@/man/manpage-common-outofband-username-user.man> #include <@top_srcdir@/man/manpage-common-outofband-password.man> #include <@top_srcdir@/man/manpage-common-outofband-k-g.man> #include <@top_srcdir@/man/manpage-common-outofband-session-timeout.man> #include <@top_srcdir@/man/manpage-common-outofband-retransmission-timeout.man> #include <@top_srcdir@/man/manpage-common-authentication-type.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-main.man> #include <@top_srcdir@/man/manpage-common-cipher-suite-id-details.man> #include <@top_srcdir@/man/manpage-common-privilege-level-operator.man> #include <@top_srcdir@/man/manpage-common-config-file.man> #include <@top_srcdir@/man/manpage-common-workaround-flags.man> #include <@top_srcdir@/man/manpage-common-debug.man> #include <@top_srcdir@/man/manpage-common-misc.man> .SH "IPMISELD OPTIONS" The following options are specific to .B ipmiseld. .TP \fB\-v\fR Log verbose information. This option will log additional information. Most notably it will output additional hex codes to given information on ambiguous SEL entries or SEL records. For example, it will output Generator ID hex codes for sensors without names. Additional non-critical SEL errors or issues will also be logged. Somewhat common errors, such as timeouts or invalid hostnames, will output with increased verbosity. .TP \fB\-t\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types of SEL events to log. By default, all sensor types are logged. A special command line type of "all", will indicate all types should be shown (may be useful for overriding configured defaults). Multiple types can be separated by commas or spaces. Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR in .B ipmi-sel(8)) or by number (decimal or hex). .TP \fB\-T\fR \fISENSOR\-TYPE\-LIST\fR, \fB\-\-exclude\-sensor\-types\fR=\fISENSOR\-TYPE\-LIST\fR Specify sensor types of SEL events to not log. By default, no sensor types are filtered. A special command line type of "none", will indicate no types should be excluded (may be useful for overriding configured defaults). Multiple types can be separated by commas or spaces. Users may specify sensor types by string (see \fB\-\-list\-sensor\-types\fR in .B ipmi-sel(8)) or by number (decimal or hex). .TP \fB\-\-system\-event\-only\fR Log only system event records (i.e. don't log OEM records). .TP \fB\-\-oem\-event\-only\fR Log only OEM event records (i.e. don't log system event records). .TP \fB\-\-event\-state\-config\-file\fR=\fIFILE\fR Specify an alternate event state configuration file. #include <@top_srcdir@/man/manpage-common-interpret-oem-data.man> #include <@top_srcdir@/man/manpage-common-entity-sensor-names.man> #include <@top_srcdir@/man/manpage-common-non-abbreviated-units.man> .TP \fB\-\-event\-state\-filter\fR=\fIFILTERSTRING\fR Specify event states to be filtered out and not logged. Possible inputs are NOMINAL, WARNING, CRITICAL, and NA. Multiple states can be listed separted by comma. The special case string of "none" will indicate no event states should be excluded (may be useful for overriding configured defaults). .TP \fB\-\-warning\-threshold\fR=\fIPERCENTINT\fR Specify SEL fullness warning threshold as an integer percentage. When the SEL is past this percentage full, a warning will be output indicating that SEL is nearly full. Specify 0 to disable warning logs. Defaults to 80. .TP \fB\-\-clear\-threshold\fR=\fIPERCENTINT\fR Specify SEL fullness clear threshold as an integer percentage. When the SEL is past this percentage full, .B ipmiseld will attempt to clear the SEL. Specify 0 to disable clearing. When the SEL is full, it will be the responsibility of the user to clear the SEL manually if clearing is disabled. Defaults to 0. If specified to a non-zero value, be careful that the clearing of the SEL could affect other applications that monitor the SEL, such as monitoring applications that use .B ipmi-sel(8) or .B libipmimonitoring(3). .TP \fB\-\-system\-event\-format\fR=\fIFORMATSTRING\fR Specify the format of the log output when a SEL system event is encountered. Defaults to "SEL System Event: %d, %t, %s, %I, %E" if logging locally, "SEL System Event(%h): %d, %t, %s, %I, %E" if logging outofband or with hostranges. See SEL LOG FORMAT STRING below for formatting details. .TP \fB\-\-oem\-timestamped\-event\-format\fR=\fIFORMATSTRING\fR Specify the format of the log output when a SEL OEM timestamped event is encountered. Defaults to "SEL OEM Event: %d, %t, %I, %o" if logging locally, "SEL OEM Event(%h): %d, %t, %I, %o" if logging outofband or with hostranges.. See SEL LOG FORMAT STRING below for formatting details. .TP \fB\-\-oem\-non\-timestamped\-event\-format\fR=\fIFORMATSTRING\fR Specify the format of the log output when a SEL OEM non-timestamped event is encountered. Defaults to "SEL OEM Event: %I, %o" if logging locally, "SEL OEM Event(%h): %I, %o" if logging outofband or with hostranges.. See SEL LOG FORMAT STRING below for formatting details. .TP \fB\-\-poll\-interval\fR=\fISECONDS\fR Specify the poll interval to check the SEL for new events. Defaults to 300 seconds (i.e. 5 minutes). .TP \fB\-\-log\-facility\fR=\fISTRING\fR Specify the log facility to use. Defaults to LOG_DAEMON. Legal inputs are LOG_DAEMON, LOG_USER, LOG_LOCAL0, LOG_LOCAL1, LOG_LOCAL2, LOG_LOCAL3, LOG_LOCAL4, LOG_LOCAL5, LOG_LOCAL6, LOG_LOCAL7. .TP \fB\-\-log\-priority\fR=\fISTRING\fR Specify the log priority to use. Defaults to LOG_ERR. Legal inputs are LOG_EMERG, LOG_ALERT, LOG_CRIT, LOG_ERR, LOG_WARNING, LOG_NOTICE, LOG_INFO, LOG_DEBUG. .TP \fB\-\-cache\-directory\fR=\fIDIRECTORY\fR Specify an alternate cache directory location for .B ipmiseld to use. The cache directory will be used to cache a wide variety of data, including the SDR and recent logging information to ensure log entries are not missed on reboots and other system failures. .TP \fB\-\-ignore\-sdr\fR Ignore SDR related processing. May lead to incomplete or less useful information being output, however it will allow functionality for systems without SDRs or when the correct SDR cannot be loaded. .TP \fB\-\-re\-download\-sdr\fR Re-download the SDR on start even if it is not out of date. This may help work around systems that do not properly timestamp SDR modification times. .TP \fB\-\-clear\-sel\fR On startup, clear any SEL being monitored. May be useful the first time running .B ipmiseld to avoid warning messages or SEL clears until a long time in the future. .TP \fB\-\-threadpool\-count\fR=\fINUM\fR Specify the number of threads for parallel SEL polling. This option is very similar to the \fB\-\-fanout\fR option in .B ipmi-sel(8) but the threads are created only once on initialization for faster processing. Defaults to 8, however the threadpool count will always be decreased if the number of nodes specified is less than the number of threads. .TP \fB\-\-test\-run\fR Do not daemonize, output the current SEL of configured hosts as a test of current settings and configuration. SEL entries will be output to stdout instead of syslog. .TP \fB\-\-foreground\fR Run daemon in the foreground. SEL entries will be output to stdout instead of syslog. .SH "SEL LOG FORMAT STRING" The output format of log messages can be adjusted via the \fB\-\-system\-event\-format\fR, \fB\-\-oem\-timestamped\-event\-format\fR and \fB\-\-oem\-non\-timestamped\-event\-format\fR options. Options such as \fB\-\-interpret\-oem\-data\fR, \fB\-\-entity\-sensor\-names\fR, and \fB\-\-non\-abbreviated\-units\fR can further adjust the output format. The following conversion directives will allow the user to output specifics of each SEL event that occurs. .sp \fIFor System, OEM timestamped, and OEM non-timestamped events\fR .sp %h - target host, useful if logging from multiple hosts .sp %i - record ID in decimal .sp %I - event state interpretation (NOMINAL, WARNING, or CRITICAL) .sp \fIFor System and OEM timestamped events\fR .sp %t - time in format H:M:S using 24 hour clock .sp %d - date in format D-M-YEAR .sp \fIFor System events\fR .sp %T - sensor type .sp %s - sensor name .sp %e - event data 1 string .sp %f - event data 2 string [2] .sp %h - event data 3 string .sp %c - combined event data 2 and event data 3 string .sp %p - event data 2 previous state string .sp %S - event data 2 severity string .sp %E - combined event data 1, 2, and 3 string .sp %k - event direction .sp \fIFor OEM timestamped events\fR .sp %m - manufacturer id .sp \fIFor OEM timestamped and OEM non-timestamped events\fR .sp %o - oem data in hex .sp %O - OEM supplied string describing the event (depends on manufacturer) #include <@top_srcdir@/man/manpage-common-hostranged-text-main.man> #include <@top_srcdir@/man/manpage-common-hostranged-text-localhost.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-start.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-heading-end.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-outofband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband.man> #include <@top_srcdir@/man/manpage-common-troubleshooting-inband-outofband.man> .SH "IPMISELD TROUBLESHOOTING" #include <@top_srcdir@/man/manpage-common-troubleshooting-sel.man> #include <@top_srcdir@/man/manpage-common-workaround-heading-text.man> #include <@top_srcdir@/man/manpage-common-workaround-inband-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-common-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-15-text.man> #include <@top_srcdir@/man/manpage-common-workaround-outofband-20-text.man> .LP \fIassumesystemevent\fR - This workaround option will assume invalid SEL record types are system event records. Records may be formatted correctly but report invalid record types. Those hitting this issue may see "Unknown SEL Record Type" errors. Output may be unknown, pray for the best. This option is confirmed to work around compliances issues on HP DL 380 G5 motherboards. #include <@top_srcdir@/man/manpage-common-workaround-extra-text.man> #include <@top_srcdir@/man/manpage-common-oem-interpretation.man> .LP Dell Poweredge 2900, Dell Poweredge 2950, Dell Poweredge R610, Dell Poweredge R710, Fujitsu iRMC S1 and iRMC S2 systems, Intel S5500WB/Penguin Computing Relion 700, Intel S2600JF/Appro 512X, Intel S5000PAL, Inventec 5441/Dell Xanadu II, Inventec 5442/Dell Xanadu III, Quanta S99Q/Dell FS12-TY, Quanta QSSC-S4R/Appro GB812X-CN, Sun X4140 Supermicro X7DBR-3, Supermicro X7DB8, Supermicro X8DTN, Supermicro X7SBI-LN4, Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Supermicro X8DT3-LN4F, Supermicro X8DTU-6+, Supermicro X8DTL, Supermicro X8DTL-3F, Supermicro X8SIL-F, Supermicro X9SCL, Supermicro X9SCM, Supermicro X8DTN+-F, Supermicro X8SIE, Supermicro X9SCA-F-O, Supermicro H8DGU-F, Supermicro X9DRi-F, Supermicro X9DRI-LN4F+, Supermicro X9SPU-F-O, Supermicro X9SCM-iiF, Wistron/Dell Poweredge C6220. #include <@top_srcdir@/man/manpage-common-known-issues.man> .SH "FILES" @IPMISELD_CONFIG_FILE_DEFAULT@ @IPMISELD_CACHE_DIRECTORY@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "SEE ALSO" freeipmi(7), ipmi-sel(8), ipmiseld.conf(5), bmc-device(8), ipmi-config(8), freeipmi_interpret_sel.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/ipmiseld.conf.5.pre.in0000644002055400205540000001700613527331637020055 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmiseld.conf.5.pre.in,v 1.15 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" LLNL-CODE-559172 .\" .\" This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. .\" For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiseld is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiseld is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiseld. If not, see . .\"############################################################################# .TH ipmiseld.conf 5 "@ISODATE@" "ipmiseld.conf @VERSION@" "ipmiseld.conf" .SH "NAME" ipmiseld.conf \- ipmiseld configuration file .SH "DESCRIPTION" The .B ipmiseld configuration file configures the .B ipmiseld daemon. .LP The default configuration file loaded is @IPMISELD_CONFIG_FILE_DEFAULT@. .LP The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .LP Note that it is possible to list the username, password and other potentially sensitive information in the configuration file. If this data is stored in a configuration file, system administrators should limit access to this file. .SH "IPMISELD CONFIGURATION OPTIONS" .TP \fBdriver\-type\fR \fIIPMIDRIVER\fR Specify the driver type to use. .TP \fBdisable\-auto\-probe\fR \fIENABLE|DISABLE\fR Specify if IPMI devices should be probed for settings. .TP \fBdriver\-address\fR \fIDRIVER-ADDRESS\fR Specify the in-band driver address to use. .TP \fBdriver\-device\fR \fIDEVICE\fR Specify the in-band driver device path to use. .TP \fBregister\-spacing\fR \fIREGISTER\-SPACING\fR Specify the in-band driver register spacing to use. .TP \fBtarget\-channel\-number\fR \fICHANNEL\-NUMBER\FR Specify the in-band driver target channel number. .TP \fBtarget\-slave\-address\fR \fISLAVE\-ADDRESS\FR Specify the in-band driver target slave address. .TP \fBhostname\fR \fIIPMIHOST1,IPMIHOST2,...\fR Specify the remote host(s) to communicate with. Multiple hostnames may be separated by comma or may be specified in a range format. .TP \fBusername\fR \fIUSERNAME\fR Specify the username to use. .TP \fBpassword\fR \fIPASSWORD\fR Specify the password to use. .TP \fBk_g\fR \fIstr\fR Specify the BMC key (K_g) to use. Prefix with '0x' to enter the key in hex. .TP \fBsession\-timeout\fR \fIMILLISECONDS\fR Specify the session timeout length to use in milliseconds. .TP \fBretransmission\-timeout\fR \fIMILLISECONDS\fR Specify the retransmission timeout length to use in milliseconds. .TP \fBauthentication\-type\fR \fIAUTHENTICATION\-TYPE\fR Specify the authentication type to use. The following authentication types are supported: NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. .TP \fBcipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the cipher suite id to use. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBprivilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the privilege type to use. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBworkaround\-flags\fR \fIWORKAROUNDS\fR Specify workaround flags to use. Multiple workarounds can be specified separated by whitespace. Please see tool manpages for details about available workarounds for each tool. The following workarounds are supported: assumeio, spinpoll, idzero, forcepermsg, unexpectedauth, endianseq, authcap, intel20, supermicro20, sun20, opensesspriv, integritycheckvalue, assumesystemevent. .TP \fBverbose\-count\fR \fICOUNT\fR Specify default verbose count to use for .B ipmi-sel(8). .TP \fIsensors\-types\fR \fITYPE-LIST\fR Specify sensor types of SEL events to log. Multiple types can be specified separated by whitespace. Users may specify sensor types by string or by number (decimal or hex). Please see .B ipmi-sel(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fIexclude\-sensor\-types\fR \fSENSOR-TYPES-LIST\fR Specify sensor types of SEL events to not log. default sensor types to not show sensor outputs for. Multiple sensor types can be specified separated by whitespace. Users may specify sensor types by string or by number. Please see .B ipmi-sel(8) \fI\-\-list\-types\fR option to see possible string input types. .TP \fBsystem\-event\-only\fR \fIENABLE|DISABLE\fR Specify if output should only include system event records. .TP \fBoem\-event\-only\fR \fIENABLE|DISABLE\fR Specify if output should only include OEM event records. .TP \fBevent\-state\-config\-file\fR \fIFILE\fR Specify the event state configuration file. .TP \fBinterpret\-oem\-data\fR \fIENABLE|DISABLE\fR Specify if .B ipmiseld should attempt to interpret OEM data or not. .TP \fBentity\-sensor\-names\fR \fIENABLE|DISABLE\fR Specify if output of sensor names should include entity ids and instances or not. .TP \fBnon\-abbreviated\-units\fR \fIENABLE|DISABLE\fR Specify if output should have units abbreviated by default or not. .TP \fBevent\-state\-filter\fR \fIFILTERSTRING\fR Specify event states to be filtered out and not logged. .TP \fB\-\-warning\-threshold\fR \fIPERCENTINT\fR Specify SEL fullness warning threshold as an integer percentage. .TP \fB\-\-clear\-threshold\fR \fIPERCENTINT\fR Specify SEL fullness clear threshold as an integer percentage. .TP \fBsystem\-event\-format\fR \fIFORMATSTRING\fR Specify the format of the log output when a SEL system event is encountered. .TP \fBoem\-timestamped\-event\-format\fR \fIFORMATSTRING\fR Specify the format of the log output when a SEL OEM timestamped event is encountered. .TP \fBoem\-non\-timestamped\-event\-format\fR \fIFORMATSTRING\fR Specify the format of the log output when a SEL OEM non-timestamped event is encountered. .TP \fBpoll\-interval\fR \fISECONDS\fR Specify the poll interval to check the SEL for new events. .TP \fBlog\-facility\fR \fISTRING\fR Specify the log facility to use. .TP \fBlog\-priority\fR \fISTRING\fR Specify the log priority to use. .TP \fBcache\-directory\fR \fIDIRECTORY\fR Specify the cache directory to use. .TP \fBignore\-sdr\fR \fIDISABLE\fR Specify if the SDR should be ignored. .TP \fBre\-download\-sdr\fR \fIDISABLE\fR Specify if the SDR should be re-downloaded on start. .TP \fBclear\-sel\fR \fIDISABLE\fR Specify if the SEL should be cleared on start. .TP \fBthreadpool\-count\fR \fINUM\fR Specify the threadpool count for parallel SEL polling. .SH "FILES" @IPMISELD_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. .SH "SEE ALSO" ipmiseld(8), ipmi-sel(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/libfreeipmi.3.pre.in0000644002055400205540000001035213527331637017605 0ustar00achuachu00000000000000.TH LIBFREEIPMI 3 "@ISODATE" "libfreeipmi @PACKAGE_VERSION@" "LIBFREEIPMI" .SH "NAME" libfreeipmi - FreeIPMI library .SH "Introduction" Libfreeipmi is the primary library that most of the FreeIPMI tools are based upon. The following describe the sub-sections of the library. .TP .B api The highest level API provided by libfreeipmi. It abstracts away the details of inband and outofband protocols from the user. It also provides useful error codes for the user to easily interpret IPMI problems. 'api' is used by most FreeIPMI tools and libraries, such as .B bmc-info(8), .B ipmi-sensors(8), and .B libipmimonitoring(3). .TP .B cmds Provides fiid templates and 'fill' functions for IPMI commands. Also provides macros definining common parameters for IPMI commands. The cmds are used by most other portions of libfreeipmi including the 'api' sub-section and tools such as .B ipmipower(8) and .B ipmiconsole(8). .TP .B debug Provides various packet/record dumping utility functions. Utilized by the 'api' subsection and by tools such as .B ipmipower(8) and .B ipmiconsole(8). .TP .B driver Provides APIs for in-band IPMI communication. Currently supported drivers are KCS, SSIF, OpenIPMI, and SUNBMC. The 'driver' subsction is used by tools such as .B bmc-watchdog(8) and the 'api' sub-section. .TP .B fiid The "FreeIPMI Interface Definition" provides an API used for the construction/deconstruction of packets in libfreeipmi. The API works around fiid-templates, which are then used to create fiid-objects. Fiid-templates are used to describe packets through a string-name to bit-field mapping. The API allows users to read/write fields in an object using the string to bit-field mapping. Marshalling, packing, endian, and various other network issues are handled within 'fiid'. Fiid objects are used throughout libfreeipmi, including the 'api' sub-section, 'cmds' sub-sections, and various tools. .TP .B fru-parse Provides an API for parsing Field Replaceable Unit (FRU) records. Utilized by tools such as ipmi-fru(8). .TP .B interface Provides 'assemble' and 'disassemble' functions for building packets for individual in-band or out-of-band protocols. Also provides all necessary fiid templates, 'fill' functions, and other utility functions necessary to communicate on an IPMI interface. Utilized by the 'api' sub-section and tools such as .B ipmipower(8) and .B ipmiconsole(8). .TP .B interpret Provides an API for interpreting sensor events by mapping them into Nominal, Warning, or Critical states. Utilized by FreeIPMI tools and libraries such as .B ipmi-sensors(8) and .B libipmimonitoring(3). .TP .B locate Provides an API to probe several standards to find default values for in-band IPMI communication. Utilized by the 'api' sub-section and the .B ipmi-locate(8) tool. .TP .B record-format Provides macros, fiid-templates, and information on records used in IPMI. Utilized by the 'sdr-cache' subsection and tools like .B ipmi-sensors(8). .TP .B sdr-cache Provides an API for creating, caching, reading, and parsing a sensor data repository (SDR). Utilized by tools such as .B ipmi-fru(8) and .B ipmi-sensors(8). .TP .B sdr-parse Provides an API for parsing SDR records. Utilized by tools such as .B ipmi-fru(8) and .B ipmi-sensors(8) .TP .B sel-parse Provides an API for reading and parsing System Event Log (SEL) entries. Utilized by tools such as .B ipmi-sel(8). .TP .B sensor-read Provides an API for reading a sensor. Utilized by tools such as .B ipmi-sensors(8). .TP .B spec Provides macros and arrays for various other definitions and tables in IPMI. Utilized by tools such as .B ipmi-sensors(8). .TP .B util Provides various utility functions for the calculation of keys, sensor readings, etc. Utilized by most of the rest of FreeIPMI. .SH "FILES" /usr/include/freeipmi.h .PP /usr/include/freeipmi/ .SH "COPYRIGHT" Copyright \(co 2003-2015 FreeIPMI Core Team. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" libipmiconsole(3), libipmidetect(3), libipmimonitoring(3), freeipmi(7), bmc-info(8), bmc-watchdog(8), ipmi-chassis(8), ipmi-config(8), ipmi-fru(8), ipmi-locate(8), ipmi-oem(8), ipmi-raw(8), ipmi-sel(8), ipmi-sensors(8), ipmiconsole(8), ipmidetect(8), ipmiping(8), ipmipower(8), rmcpping(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/freeipmi_interpret_sensor.conf.5.pre.in0000644002055400205540000014750413527331637023543 0ustar00achuachu00000000000000.TH FREEIPMI_INTERPRET_SENSOR 5 "@ISODATE@" "FreeIPMI @PACKAGE_VERSION@" "Configuration" .SH "NAME" freeipmi_interpret_sensor.conf \- specify sensor interpretation rules .SH "DESCRIPTION" The .B @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ defines how IPMI sensors should be interpreted. IPMI based sensors specify a number of states/thresholds when they are read. Based on those states/thresholds, libraries and tools such as .B libfreeipmi(3), .B libipmimonitoring(3) and .B ipmi-sensors(8) can report if a sensor reading is "good" or "bad" via a report of a NOMINAL, WARNING, or CRITICAL state. .LP Each of the states listed below are (hopefully) descriptive enough to describe the state conditions that may be set/unset for each sensor type. For more detailed information on each of the individual states listed below, please see the IPMI Specification "Sensor and Event Code Tables". .B Ipmi-sensors(8) can be used to determine the sensor types and the states/thresholds that exist on a system by outputting very verbose output and seeing what types of Assertion or Deassertion events are possible. .LP The possible values for all states/thresholds below are: .LP Nominal - Signal Nominal reading if state/threshold tripped .LP Warning - Signal Warning reading if state/treshold tripped .LP Critical - Signal Critical reading if state/threshold tripped .LP Not all IPMI sensor types and event types are currently supported. If you would like more to be supported, please e-mail the FreeIPMI mailing list. .LP The default values selected for individual states/thresholds being tripped are based on best guesses and motherboards being analyzed. If you think they should be changed, please e-mail the FreeIPMI mailing list to discuss what the defaults should be. .LP Most default interpretations can be determined quite easily and can meet the needs of most users. For example, a reading of "Performance_Met" is normally better than "Performance_Lags". However, some sensors can be ambiguous and depend completely on the manufacturer. For example, "State_Asserted" vs. "State_Deasserted" are completely at the interpretation of the vendor. Users are advised to adjust the interpretations below as needed for their machines. .LP Every group of state conditions below includes a configuration for "No_Event". This is the condition under which no sensor states/events have occurred or are triggered. Under most conditions, a mapping to "Nominal" is preferred. However, under some circumstances, it may be useful to report something else. For example, if a sensor on a particular motherboard is required to report a state/event, a no sensor state condition could indicate a broken a sensor. This is highly dependent on the motherboard. .LP .SH "FORMAT" The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .SH "OPTIONS" .TP .B IPMI_Threshold_Sensor The following states correspond to threshold sensors. This normally applies to sensors that measure non-discrete values, such as temperatures, voltages, RPM, etc. .RS .TP \fBIPMI_Threshold_Sensor_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Critical_Threshold\fR Defaults to Nominal. .TP \fBIPMI_Threshold_Sensor_At_Or_Below_Lower_Critical_Threshold\fR Defaults to Critical. .TP \fBIPMI_Threshold_Sensor_At_Or_Below_Lower_Non_Recoverable_Threshold\fR Defaults to Critical. .TP \fBIPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Critical_Threshold\fR Defaults to Nominal. .TP \fBIPMI_Threshold_Sensor_At_Or_Above_Upper_Critical_Threshold\fR Defaults to Critical. .TP \fBIPMI_Threshold_Sensor_At_Or_Above_Upper_Non_Recoverable_Threshold\fR Defaults to Critical. .RE .TP .B IPMI_Temperature_State The following states correspond to Temperature sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Temperature_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Temperature_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Temperature_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Temperature_Limit The following states correspond to Temperature sensors that report on limits. .RS .TP \fBIPMI_Temperature_Limit_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Limit_Not_Exceeded\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Limit_Exceeded\fR Defaults to Critical. .RE .TP .B IPMI_Temperature_Transition_Severity The following states correspond to Temperature sensors that report on device severity. .RS .TP \fBIPMI_Temperature_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Voltage_State The following states correspond to Voltage sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Voltage_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Voltage_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Voltage_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Voltage_Limit The following states correspond to Voltage sensors that report on limits. .RS .TP \fBIPMI_Voltage_Limit_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Limit_Not_Exceeded\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Limit_Exceeded\fR Defaults to Critical. .RE .TP .B IPMI_Voltage_Performance The following states correspond to Voltage sensors that report on performance. .RS .TP \fBIPMI_Voltage_Performance_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Performance_Met\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Performance_Lags\fR Defaults to Critical. .RE .TP .B IPMI_Voltage_Transition_Severity The following states correspond to Voltage sensors that report on device severity. .RS .TP \fBIPMI_Voltage_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Current_Transition_Severity The following states correspond to Current sensors that report on device severity. .RS .TP \fBIPMI_Current_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Current_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_State The following states correspond to Fan sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Fan_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Fan_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Fan_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Fan_Transition_Severity The following states correspond to Fan sensors that report on device severity. .RS .TP \fBIPMI_Fan_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_Device_Present The following states correspond to Fan sensors that report on device installation. .RS .TP \fBIPMI_Fan_Device_Present_Device_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Fan_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Fan_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Supply_Transition_Severity The following states correspond to Power Supply sensors that report on device severity. .RS .TP \fBIPMI_Power_Supply_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_Transition_Availability The following states correspond to Fan sensors that report on device availability. .RS .TP \fBIPMI_Fan_Transition_Availability_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Fan_Transition_Availability_To_Running\fR Defaults to Nominal. .TP \fBIPMI_Fan_Transition_Availability_To_In_Test\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Power_Off\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_To_On_Line\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Off_Line\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Off_Duty\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Degraded\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Availability_To_Power_Save\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Availability_Install_Error\fR Defaults to Critical. .RE .TP .B IPMI_Fan_Redundancy The following states correspond to Fan sensors that report on redundancy. .RS .TP \fBIPMI_Fan_Redundancy_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Fan_Redundancy_Fully_Redundant\fR Defaults to Nominal. .TP \fBIPMI_Fan_Redundancy_Redundancy_Lost\fR Defaults to Critical. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded\fR Defaults to Warning. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning. .RE .TP .B IPMI_Physical_Security The following states correspond to Physical Security sensors w/ Physical Security specific output states. .RS .TP \fBIPMI_Physical_Security_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Physical_Security_General_Chassis_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Drive_Bay_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_IO_Card_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Processor_Area_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_LAN_Leash_Lost\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Unauthorized_Dock_Undock\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_FAN_Area_Intrusion\fR Defaults to Critical. .RE .TP .B IPMI_Platform_Security_Violation_Attempt The following states correspond to Platform Violation Attempt sensors w/ Platform Security Violation Attempt specific output states. .RS .TP \fBIPMI_Platform_Security_Violation_Attempt_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation\fR Defaults to Critical. .RE .TP .B IPMI_Processor The following states correspond to Processor sensors w/ Processor specific output states. .RS .TP \fBIPMI_Processor_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Processor_IERR\fR Defaults to Critical. .TP \fBIPMI_Processor_Thermal_Trip\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB1_BIST_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB2_Hang_In_POST_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB3_Processor_Startup_Initialization_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_Configuration_Error\fR Defaults to Critical. .TP \fBIPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error\fR Defaults to Critical. .TP \fBIPMI_Processor_Processor_Presence_Detected\fR Defaults to Nominal. .TP \fBIPMI_Processor_Processor_Disabled\fR Defaults to Critical. .TP \fBIPMI_Processor_Terminator_Presence_Detected\fR Defaults to Critical. .TP \fBIPMI_Processor_Processor_Automatically_Throttled\fR Defaults to Warning. .TP \fBIPMI_Processor_Machine_Check_Exception\fR Defaults to Critical. .TP \fBIPMI_Processor_Correctable_Machine_Check_Error\fR Defaults to Warning. .RE .TP .B IPMI_Processor_State The following states correspond to Processor sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Processor_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Processor_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Processor_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Power_Supply The following states correspond to Power Supply sensors w/ Power Supply specific output states. .RS .TP \fBIPMI_Power_Supply_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Presence_Detected\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Power_Supply_Failure_Detected\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Predictive_Failure\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Configuration_Error\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Inactive\fR Defaults to Warning. .RE .TP .B IPMI_Power_Supply_State The following states correspond to Power_Supply sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Power_Supply_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_State_Deasserted\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Supply_Redundancy The following states correspond to Power Supply sensors that report on redundancy. .RS .TP \fBIPMI_Power_Supply_Redundancy_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Redundancy_Fully_Redundant\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Lost\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning. .RE .TP .B IPMI_Power_Unit The following states correspond to Power Unit sensors w/ Power Unit specific output states. .RS .TP \fBIPMI_Power_Unit_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_Power_Off_Power_Down\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_Power_Cycle\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_240VA_Power_Down\fR Defaults to Warning. .TP \fBIPMI_Power_Unit_Interlock_Power_Down\fR Defaults to Warning. .TP \fBIPMI_Power_Unit_AC_Lost\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Soft_Power_Control_Failure\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Power_Unit_Failure_Detected\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Predictive_Failure\fR Defaults to Critical. .RE .TP .B IPMI_Power_Unit_Device_Present The following states correspond to Power Unit sensors that report on device installation. .RS .TP \fBIPMI_Power_Unit_Device_Present_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Unit_Redundancy The following states correspond to Power Unit sensors that report on redundancy. .RS .TP \fBIPMI_Power_Unit_Redundancy_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_Redundancy_Fully_Redundant\fR Defaults to Nominal. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Lost\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded\fR Defaults to Warning. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning. .RE .TP .B IPMI_Cooling_Device_Redundancy The following states correspond to Cooling Device sensors that report on redundancy. .RS .TP \fBIPMI_Cooling_Device_Redundancy_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Cooling_Device_Redundancy_Fully_Redundant\fR Defaults to Nominal. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Lost\fR Defaults to Critical. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded\fR Defaults to Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning. .RE .TP .B IPMI_Memory The following states correspond to Memory sensors w/ Memory specific output states. .RS .TP \fBIPMI_Memory_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Memory_Correctable_Memory_Error\fR Defaults to Warning. .TP \fBIPMI_Memory_Uncorrectable_Memory_Error\fR Defaults to Critical. .TP \fBIPMI_Memory_Parity\fR Defaults to Critical. .TP \fBIPMI_Memory_Memory_Scrub_Failed\fR Defaults to Critical. .TP \fBIPMI_Memory_Memory_Device_Disabled\fR Defaults to Critical. .TP \fBIPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached\fR Defaults to Warning. .TP \fBIPMI_Memory_Presence_Detected\fR Defaults to Nominal. .TP \fBIPMI_Memory_Configuration_Error\fR Defaults to Critical. .TP \fBIPMI_Memory_Spare\fR Defaults to Nominal. .TP \fBIPMI_Memory_Memory_Automatically_Throttled\fR Defaults to Warning. .TP \fBIPMI_Memory_Critical_Overtemperature\fR Defaults to Critical. .RE .TP .B IPMI_Memory_State The following states correspond to Memory sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Memory_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Memory_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Memory_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Memory_Transition_Severity The following states correspond to Memory sensors that report on device severity. .RS .TP \fBIPMI_Memory_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Memory_Redundancy The following states correspond to Cooling Device sensors that report on redundancy. .RS .TP \fBIPMI_Memory_Redundancy_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Memory_Redundancy_Fully_Redundant\fR Defaults to Nominal. .TP \fBIPMI_Memory_Redundancy_Redundancy_Lost\fR Defaults to Critical. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded\fR Defaults to Warning. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning. .RE .TP .B IPMI_Drive_Slot The following states correspond to Drive Slot sensors w/ Drive Slot specific output states. .RS .TP \fBIPMI_Drive_Slot_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Drive_Presence\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Drive_Fault\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Predictive_Failure\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Hot_Spare\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_In_Critical_Array\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_In_Failed_Array\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Rebuild_Remap_In_Progress\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Rebuild_Remap_Aborted\fR Defaults to Critical. .RE .TP .B IPMI_Drive_Slot_State The following states correspond to Drive Slot sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Drive_Slot_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_State_Deasserted\fR Defaults to Warning. .TP \fBIPMI_Drive_Slot_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Drive_Slot_Predictive_Failure The following states correspond to Drive_Slot sensors that report a predictive failure assertion or deassertion. .RS .TP \fBIPMI_Drive_Slot_Predictive_Failure_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Predictive_Failure_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Predictive_Failure_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Drive_Slot_Device_Present The following states correspond to Drive Slot sensors that report on device installation. .RS .TP \fBIPMI_Drive_Slot_Device_Present_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_POST_Memory_Resize_State The following states correspond to POST Memory Resize sensors that report an assertion or deassertion. .RS .TP \fBIPMI_POST_Memory_Resize_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_POST_Memory_Resize_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_POST_Memory_Resize_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_System_Firmware_Progress The following states correspond to System Firmware Progress sensors w/ System Firmware Progress specific output states. .RS .TP \fBIPMI_System_Firmware_Progress_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Error\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Hang\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Progress\fR Defaults to Nominal. .RE .TP .B IPMI_System_Firmware_Progress_Transition_Severity The following states correspond to System Firmware Progress sensors that report on device severity. .RS .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Event_Logging_Disabled The following states correspond to Event Logging Disabled sensors w/ .RS .TP \fBIPMI_Event_Logging_Disabled_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared\fR Defaults to Nominal. .TP \fBIPMI_Event_Logging_Disabled_All_Event_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_SEL_Full\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_SEL_Almost_Full\fR Defaults to Warning. .TP \fBIPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled\fR Defaults to Critical. .RE .TP .B IPMI_System_Event The following states correspond to System Event sensors w/ System Event specific output states. .RS .TP \fBIPMI_System_Event_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Event_System_Reconfigured\fR Defaults to Warning. .TP \fBIPMI_System_Event_OEM_System_Boot_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Undetermined_System_Hardware_Failure\fR Defaults to Critical. .TP \fBIPMI_System_Event_Entry_Added_To_Auxiliary_Log\fR Defaults to Nominal. .TP \fBIPMI_System_Event_PEF_Action\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Timestamp_Clock_Sync\fR Defaults to Warning. .RE .TP .B IPMI_System_Event_Transition_State The following states correspond to System Event sensors that report a transition state. .RS .TP \fBIPMI_System_Event_Transition_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Transition_State_Active\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Transition_State_Idle\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Transition_State_Busy\fR Defaults to Nominal. .RE .TP .B IPMI_System_Event_State The following states correspond to System Event sensors that report an assertion or deassertion. .RS .TP \fBIPMI_System_Event_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Event_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_System_Event_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Critical_Interrupt The following states correspond to Critical Interrupt sensors w/ Critical Interrupt specific output states. .RS .TP \fBIPMI_Critical_Interrupt_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Timeout\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_IO_Channel_Check_NMI\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Software_NMI\fR Defaults to Warning. .TP \fBIPMI_Critical_Interrupt_PCI_PERR\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_PCI_SERR\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Correctable_Error\fR Defaults to Warning. .TP \fBIPMI_Critical_Interrupt_Bus_Uncorrectable_Error\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Fatal_NMI\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Fatal_Error\fR Defaults to Critical. \fBIPMI_Critical_Interrupt_Bus_Degraded\fR Defaults to Warning. .RE .TP .B IPMI_Button_Switch The following states correspond to Button/Switch sensors w/ Button/Switch specific output states. .RS .TP \fBIPMI_Button_Switch_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Power_Button_Pressed\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Sleep_Button_Pressed\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Reset_Button_Pressed\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_FRU_Latch_Open\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_FRU_Service_Request_Button\fR Defaults to Warning. .RE .TP .B IPMI_Button_Switch_State The following states correspond to Button/Switch sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Button_Switch_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Button_Switch_Transition_Severity The following states correspond to Button/Switch sensors that report on device severity. .RS .TP \fBIPMI_Button_Switch_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Module_Board_State The following states correspond to Module/Board sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Module_Board_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Module_Board_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Module_Board_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Module_Board_Device_Present The following states correspond to Module/Board sensors that report on device installation. .RS .TP \fBIPMI_Module_Board_Device_Present_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Module_Board_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Module_Board_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Chassis_Transition_Severity The following states correspond to Chassis sensors that report on device severity. .RS .TP \fBIPMI_Chassis_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Chip_Set_Transition_Severity The following states correspond to Chip Set sensors that report on device severity. .RS .TP \fBIPMI_Chip_Set_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Cable_Interconnect The following states correspond to Cable/Interconnect sensors w/ Cable/Interconnect specific output states. .RS .TP \fBIPMI_Cable_Interconnect_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Is_Connected\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Configuration_Error\fR Defaults to Critical. .RE .TP .B IPMI_Cable_Interconnect_Transition_Severity The following states correspond to Cable/Interconnect sensors that report on device severity. .RS .TP \fBIPMI_Cable_Interconnect_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Boot_Error The following states correspond to Boot Error sensors w/ Boot Error specific output states. .RS .TP \fBIPMI_Boot_Error_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_No_Bootable_Media\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_PXE_Server_Not_Found\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Invalid_Boot_Sector\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source\fR Defaults to Warning. .RE .TP .B IPMI_Boot_Error_State The following states correspond to Boot Error sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Boot_Error_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Boot_Error_Transition_Severity The following states correspond to Boot Error sensors that report on device severity. .RS .TP \fBIPMI_Boot_Error_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_OS_Boot The following states correspond to OS Boot sensors w/ OS Boot specific output events. .RS \fBIPMI_OS_Boot_No_Event\fR Defaults to Nominal. \fBIPMI_OS_Boot_A_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_C_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_PXE_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Diagnostic_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_CD_ROM_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_ROM_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified\fR Defaults to Warning. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started\fR Defaults to Nominal. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted\fR Defaults to Warning. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed\fR Defaults to Critical. .RE .TP .B IPMI_OS_Critical_Stop_State The following states correspond to OS Critical Stop sensors that report an assertion or deassertion. .RS .TP \fBIPMI_OS_Critical_Stop_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_OS_Critical_Stop_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_OS_Critical_Stop_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Slot_Connector The following states correspond to Slot Connector sensors w/ Slot Connector specific output states. .RS .TP \fBIPMI_Slot_Connector_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Fault_Status_Asserted\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Identify_Status_Asserted\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Power_Is_Off\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Device_Removal_Request\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Interlock_Asserted\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Is_Disabled\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Holds_Spare_Device\fR Defaults to Nominal. .RE .TP .B IPMI_Slot_Connector_Transition_Severity The following states correspond to Slot Connector sensors that report on device severity. .RS .TP \fBIPMI_Slot_Connector_Transition_Severity_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_System_ACPI_Power_State .RS .TP \fBIPMI_System_ACPI_Power_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S0_G0\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S1\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S2\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S3\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S4\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S5_G2\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S4_S5_Soft_Off\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_G3_Mechanical_Off\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_G1_Sleeping\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S5_Entered_By_Override\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Legacy_ON_State\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Legacy_OFF_State\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Unspecified\fR Defaults to Critical. .TP \fBIPMI_System_ACPI_Power_State_Unknown\fR Defaults to Critical. .RE .TP .B IPMI_Watchdog2 The following states correspond to Watchdog 2 sensors w/ Watchdog 2 specific output states. .RS .TP \fBIPMI_Watchdog2_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Timer_Expired\fR Defaults to Warning. .TP \fBIPMI_Watchdog2_Hard_Reset\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Power_Down\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Power_Cycle\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Reserved1\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved2\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved3\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved4\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Timer_Interrupt\fR Defaults to Warning. .RE .TP .B IPMI_Platform_Alert_State The following states correspond to Platform Alert sensors that report an assertion or deassertion. .RS .TP \fBIPMI_Platform_Alert_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Platform_Alert_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Platform_Alert_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Entity_Presence The following states correspond to Entity Presence sensors w/ Entity Presence specific output states. .RS .TP \fBIPMI_Entity_Presence_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Entity_Present\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Entity_Absent\fR Defaults to Critical. .TP \fBIPMI_Entity_Presence_Entity_Disabled\fR Defaults to Critical. .RE .TP .B IPMI_Entity_Presence_Device_Present The following states correspond to Entity Presence sensors that report on device installation. .RS .TP \fBIPMI_Entity_Presence_Device_Present_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Management_Subsystem_Health The following states correspond to Management Subsystem Health sensors w/ Management Subsystem Health specific output states. .RS .TP \fBIPMI_Management_Subsystem_Health_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Management_Controller_Off_Line\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Management_Controller_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Sensor_Failure\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_FRU_Failure\fR Defaults to Critical. .RE .TP .B IPMI_Battery The following states correspond to Battery sensors w/ Battery specific output states. .RS .TP \fBIPMI_Battery_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Battery_Battery_Low\fR Defaults to Warning. .TP \fBIPMI_Battery_Battery_Failed\fR Defaults to Critical. .TP \fBIPMI_Battery_Battery_Presence_Detected\fR Defaults to Nominal. .RE .TP .B IPMI_Session_Audit The following states correspond to Session Audit sensors w/ Session_Audit specific output states. .RS .TP \fBIPMI_Version_Change_No_Event\fR Defaults to Nominal. .TP \fBIPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity\fR Defaults to Warning. .TP \fBIPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity\fR Defaults to Warning. .TP \fBIPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful\fR Defaults to Nominal. .TP \fBIPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful\fR Defaults to Nominal. .RE .TP .B IPMI_FRU_State The following states correspond to FRU State sensors w/ FRU State specific output states. .RS .TP \fBIPMI_FRU_State_No_Event\fR Defaults to Nominal. .TP \fBIPMI_FRU_State_FRU_Not_Installed\fR Defaults to Critical. .TP \fBIPMI_FRU_State_FRU_Inactive\fR Defaults to Critical. .TP \fBIPMI_FRU_State_FRU_Activation_Requested\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Activation_In_Progress\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Active\fR Defaults to Nominal. .TP \fBIPMI_FRU_State_FRU_Deactivation_Requested\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Deactivation_In_Progress\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Communication_Lost\fR Defaults to Critical. .RE .TP .B IPMI_OEM The following configuration options can be used to configure OEM specific interpretations. Users should be aware that both \fBIPMI_OEM_Bitmask\fR and \fBIPMI_OEM_Value\fR can be configured for an identical \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIEvent\-Reading\-Type\-Code\fR, and \fISensor\-Type\fR combination. All interpretations rules for a specific combination are iterated through and the worst resulting sensor state is returned (i.e. Warning < Nominal, Critical < Warning). If no match is found, no sensor state is returned for the OEM sensor reading. For each of the configuration options below, \fI\fR is the numeric IANA manufacturer ID for the manufacturer in question. The \fI\fR is one or more numeric IDs representing the manufacturer's product. The \fI\fR can be listed as a single numeric number (e.g. 1234), a range of IDs separated by a dash (e.g. 12-20), or a list of specific product IDs separted by a plus (e.g. 12+19+22). Both the \fIManufacturer\-ID\fR and \fIProduct\-ID\fR can be found using .B bmc-info(8). Multiple \fI\fR and \fI\fR pairs can be input separated by commas. The \fIEvent\-Reading\-Type\-Code\fR and \fISensor\-Type\fR need not be OEM types. They may be non-OEM types and used to provide interpretation rules for sensors that may be behaving outside the standard of the IPMI specification. .RS .TP \fBIPMI_OEM_Bitmask\fR \fI\fR:\fI\fR,... \fIEvent\-Reading\-Type\-Code\fR \fISensor\-Type\fR \fISensor\-Event\-Bitmask\fR \fIState\fR \fBIPMI_OEM_Bitmask\fR can be used to configure a state interpretation for a specific \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIEvent\-Reading\-Type\-Code\fR, and \fISensor\-Type\fR combination and a specific bitmask of the \fISensor-Event\fR. The state will be accepted as the sensor interpretation if the inputted bitmask ANDed with the actual sensor event bitmask reading is true. As a special case, the state will be accepted if the inputted bitmask and the actual sensor event bitmask are both 0. In other words, if no events happened, an OEM interpretation can be configured for this case by inputing a bitmask of 0x0000. .TP \fBIPMI_OEM_Value\fR \fI\fR:\fI\fR,... \fIEvent\-Reading\-Type\-Code\fR \fISensor\-Type\fR \fISensor\-Event\-Bitmask-Value\fR \fIState\fR \fBIPMI_OEM_Value\fR can be used to configure a state interpretation for a specific \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIEvent\-Reading\-Type\-Code\fR, and \fISensor\-Type\fR combination and a specific value for the \fISensor\-Event\-Bitmask\fR. The state will be accepted as the sensor interpretation if the inputted bitmask value is equal to the actual sensor event bitmask reading. .RE .SH "FILES" @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" libfreeipmi(3), libipmimonitoring(3), ipmi-sensors(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/freeipmi_interpret_sel.conf.5.pre.in0000644002055400205540000014770013527331637023013 0ustar00achuachu00000000000000.TH FREEIPMI_INTERPRET_SEL 5 "@ISODATE@" "FreeIPMI @PACKAGE_VERSION@" "Configuration" .SH "NAME" freeipmi_interpret_sel.conf \- specify system event log (SEL) interpretation rules .SH "DESCRIPTION" The .B @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ defines how IPMI system event log entries should be interpreted. IPMI system events specify a number of states/thresholds when they are read. Based on those states/thresholds, libraries and tools such as .B libipmimonitoring(3) and .B ipmi-sel(8) can report if an event is "good" or "bad" via a report of a NOMINAL, WARNING, or CRITICAL state. A different state can be reported for an event depending on if it is asserted or deasserted. .LP Each of the states listed below are (hopefully) descriptive enough to describe the state conditions that may be set/unset for each sensor or event type. For more detailed information on each of the individual states listed below, please see the IPMI Specification "Sensor and Event Code Tables". .B Ipmi-sensors(8) can be used to determine the sensor types and the states/thresholds that exist on a system by outputting very verbose output and seeing what types of Assertion or Deassertion events are possible. .LP Each of the events below may may take 1 or 2 of the following states as input. .LP Nominal - Signal Nominal reading if event tripped .LP Warning - Signal Warning reading if event tripped .LP Critical - Signal Critical reading if event tripped .LP If only one state is listed, that state will be interpreted when the event is asserted or deasserted. If two states are listed, the first state will be interpreted when an event is asserted, and the later will be interpreted when an event is deasserted. .LP Not all IPMI sensor types and event types are currently supported. If you would like more to be supported, please e-mail the FreeIPMI mailing list. .LP The default values selected for individual events being tripped are based on best guesses and motherboards being analyzed. If you think they should be changed, please e-mail the FreeIPMI mailing list to discuss what the defaults should be. .LP Most default interpretations can be determined quite easily and can meet the needs of most users. For example, a reading of "Performance_Met" is normally better than "Performance_Lags". However, some sensors can be ambiguous and depend completely on the manufacturer. For example, "State_Asserted" vs. "State_Deasserted" are completely at the interpretation of the vendor. Users are advised to adjust the interpretations below as needed for their machines. .LP .SH "FORMAT" The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .SH "OPTIONS" .TP .B IPMI_Threshold_Sensor The following states correspond to threshold sensor events. This normally applies to events that dealing with non-discrete values, such as temperatures, voltages, RPM, etc. .RS .TP \fBIPMI_Threshold_Sensor_Lower_Non_Critical_Going_Low\fR Defaults to Warning/Nominal. .TP \fBIPMI_Threshold_Sensor_Lower_Non_Critical_Going_High\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Threshold_Sensor_Lower_Critical_Going_Low\fR Defaults to Critical/Warning. .TP \fBIPMI_Threshold_Sensor_Lower_Critical_Going_High\fR Defaults to Warning/Warning. .TP \fBIPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_Low\fR Defaults to Critical/Critical. .TP \fBIPMI_Threshold_Sensor_Lower_Non_Recoverable_Going_High\fR Defaults to Critical/Critical. .TP \fBIPMI_Threshold_Sensor_Upper_Non_Critical_Going_Low\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Threshold_Sensor_Upper_Non_Critical_Going_High\fR Defaults to Warning/Nominal. .TP \fBIPMI_Threshold_Sensor_Upper_Critical_Going_Low\fR Defaults to Warning/Warning. .TP \fBIPMI_Threshold_Sensor_Upper_Critical_Going_High\fR Defaults to Critical/Warning. .TP \fBIPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_Low\fR Defaults to Critical/Critical. .TP \fBIPMI_Threshold_Sensor_Upper_Non_Recoverable_Going_High\fR Defaults to Critical/Critical. .RE .TP .B IPMI_Temperature_State The following states correspond to Temperature sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Temperature_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Temperature_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Temperature_Limit The following states correspond to Temperature sensor events that report on limits. .RS .TP \fBIPMI_Temperature_Limit_Not_Exceeded\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Limit_Exceeded\fR Defaults to Critical. .RE .TP .B IPMI_Temperature_Transition_Severity The following states correspond to Temperature sensor events that report on transition severity. .RS .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Temperature_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Temperature_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Voltage_State The following states correspond to Voltage sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Voltage_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Voltage_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Voltage_Limit The following states correspond to Voltage sensor events that report on limits. .RS .TP \fBIPMI_Voltage_Limit_Not_Exceeded\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Limit_Exceeded\fR Defaults to Critical. .RE .TP .B IPMI_Voltage_Performance The following states correspond to Voltage sensor events that report on performance. .RS .TP \fBIPMI_Voltage_Performance_Met\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Voltage_Performance_Lags\fR Defaults to Critical/Warning. .RE .TP .B IPMI_Voltage_Transition_Severity The following states correspond to Voltage sensor events that report on device severity. .RS .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Voltage_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Voltage_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Current_Transition_Severity The following states correspond to Current sensor events that report on device severity. .RS .TP \fBIPMI_Current_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Current_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Current_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_State The following states correspond to Fan sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Fan_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Fan_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Fan_Transition_Severity The following states correspond to Fan sensor events that report on device severity. .RS .TP \fBIPMI_Fan_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Fan_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Fan_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_Device_Present The following states correspond to Fan sensor events that report on device installation. .RS .TP \fBIPMI_Fan_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Fan_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Fan_Transition_Availability The following states correspond to Fan sensor events that report on device availability. .RS .TP \fBIPMI_Fan_Transition_Availability_To_Running\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Fan_Transition_Availability_To_In_Test\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Power_Off\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_On_Line\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Off_Line\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Off_Duty\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Degraded\fR Defaults to Critical/Warning. .TP \fBIPMI_Fan_Transition_Availability_To_Power_Save\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Transition_Availability_Install_Error\fR Defaults to Critical/Critical. .RE .TP .B IPMI_Fan_Redundancy The following states correspond to Fan sensor events that report on redundancy. .RS .TP \fBIPMI_Fan_Redundancy_Fully_Redundant\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Fan_Redundancy_Redundancy_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical/Warning. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical/Warning. .TP \fBIPMI_Fan_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical/Warning. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning/Warning. .TP \fBIPMI_Fan_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Physical_Security The following states correspond to Physical Security sensor events w/ Physical Security specific output events. .RS .TP \fBIPMI_Physical_Security_General_Chassis_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Drive_Bay_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_IO_Card_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Processor_Area_Intrusion\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_LAN_Leash_Lost\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_Unauthorized_Dock_Undock\fR Defaults to Critical. .TP \fBIPMI_Physical_Security_FAN_Area_Intrusion\fR Defaults to Critical. .RE .TP .B IPMI_Platform_Security_Violation_Attempt The following states correspond to Platform Violation Attempt sensor events w/ Platform Security Violation Attempt specific output events. .RS .TP \fBIPMI_Platform_Security_Violation_Attempt_Secure_Mode_Violation_Attempt\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_User_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Attempt_Setup_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Pre_Boot_Password_Violation_Network_Boot_Password\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Other_Pre_Boot_Password_Violation\fR Defaults to Critical. .TP \fBIPMI_Platform_Security_Violation_Attempt_Out_Of_Band_Access_Password_Violation\fR Defaults to Critical. .RE .TP .B IPMI_Processor The following states correspond to Processor sensor events w/ Processor specific output events. .RS .TP \fBIPMI_Processor_IERR\fR Defaults to Critical. .TP \fBIPMI_Processor_Thermal_Trip\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB1_BIST_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB2_Hang_In_POST_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_FRB3_Processor_Startup_Initialization_Failure\fR Defaults to Critical. .TP \fBIPMI_Processor_Configuration_Error\fR Defaults to Critical. .TP \fBIPMI_Processor_SMBIOS_Uncorrectable_CPU_Complex_Error\fR Defaults to Critical. .TP \fBIPMI_Processor_Processor_Presence_Detected\fR Defaults to Nominal. .TP \fBIPMI_Processor_Processor_Disabled\fR Defaults to Critical. .TP \fBIPMI_Processor_Terminator_Presence_Detected\fR Defaults to Critical. .TP \fBIPMI_Processor_Processor_Automatically_Throttled\fR Defaults to Warning. .TP \fBIPMI_Processor_Machine_Check_Exception\fR Defaults to Critical. .TP \fBIPMI_Processor_Correctable_Machine_Check_Error\fR Defaults to Warning. .RE .TP .B IPMI_Processor_State The following states correspond to Processor sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Processor_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Processor_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Power_Supply The following states correspond to Power Supply sensor events w/ Power Supply specific output events. .RS .TP \fBIPMI_Power_Supply_Presence_Detected\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Power_Supply_Power_Supply_Failure_Detected\fR Defaults to Critical/Critical. .TP \fBIPMI_Power_Supply_Predictive_Failure\fR Defaults to Critical/Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Lost_AC_DC\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Lost_Or_Out_Of_Range\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Power_Supply_Input_Out_Of_Range_But_Present\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Configuration_Error\fR Defaults to Critical/Critical. .TP \fBIPMI_Power_Supply_Power_Supply_Inactive\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Power_Supply_State The following states correspond to Power_Supply sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Power_Supply_State_Deasserted\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Supply_Transition_Severity The following states correspond to Power Supply sensor events that report on device severity. .RS .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Power_Supply_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Power_Supply_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Supply_Redundancy The following states correspond to Power Supply sensor events that report on redundancy. .RS .TP \fBIPMI_Power_Supply_Redundancy_Fully_Redundant\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded\fR Defaults to Warning/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning/Warning. .TP \fBIPMI_Power_Supply_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Power_Unit The following states correspond to Power Unit sensor events w/ Power Unit specific output events. .RS .TP \fBIPMI_Power_Unit_Power_Off_Power_Down\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Power_Unit_Power_Cycle\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Power_Unit_240VA_Power_Down\fR Defaults to Warning/Nominal. .TP \fBIPMI_Power_Unit_Interlock_Power_Down\fR Defaults to Warning/Warning. .TP \fBIPMI_Power_Unit_AC_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Unit_Soft_Power_Control_Failure\fR Defaults to Critical/Critical. .TP \fBIPMI_Power_Unit_Power_Unit_Failure_Detected\fR Defaults to Critical/Critical. .TP \fBIPMI_Power_Unit_Predictive_Failure\fR Defaults to Critical/Critical. .RE .TP .B IPMI_Power_Unit_Device_Present The following states correspond to Power Unit sensor events that report on device installation. .RS .TP \fBIPMI_Power_Unit_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Power_Unit_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Power_Unit_Redundancy The following states correspond to Power Unit sensor events that report on redundancy. .RS .TP \fBIPMI_Power_Unit_Redundancy_Fully_Redundant\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded\fR Defaults to Warning/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning/Warning. .TP \fBIPMI_Power_Unit_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Cooling_Device_Redundancy The following states correspond to Cooling Device sensor events that report on redundancy. .RS .TP \fBIPMI_Cooling_Device_Redundancy_Fully_Redundant\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded\fR Defaults to Warning/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning/Warning. .TP \fBIPMI_Cooling_Device_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Memory The following states correspond to Memory sensor events w/ Memory specific output events. .RS .TP \fBIPMI_Memory_Correctable_Memory_Error\fR Defaults to Warning. .TP \fBIPMI_Memory_Uncorrectable_Memory_Error\fR Defaults to Critical. .TP \fBIPMI_Memory_Parity\fR Defaults to Critical. .TP \fBIPMI_Memory_Memory_Scrub_Failed\fR Defaults to Critical. .TP \fBIPMI_Memory_Memory_Device_Disabled\fR Defaults to Critical. .TP \fBIPMI_Memory_Correctable_Memory_Error_Logging_Limit_Reached\fR Defaults to Warning. .TP \fBIPMI_Memory_Presence_Detected\fR Defaults to Nominal. .TP \fBIPMI_Memory_Configuration_Error\fR Defaults to Critical. .TP \fBIPMI_Memory_Spare\fR Defaults to Nominal. .TP \fBIPMI_Memory_Memory_Automatically_Throttled\fR Defaults to Warning. .TP \fBIPMI_Memory_Critical_Overtemperature\fR Defaults to Critical. .RE .TP .B IPMI_Memory_State The following states correspond to Memory sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Memory_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Memory_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Memory_Transition_Severity The following states correspond to Memory sensor events that report on transition severity. .RS .TP \fBIPMI_Memory_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Memory_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Memory_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Memory_Redundancy The following states correspond to Memory sensor events that report on redundancy. .RS .TP \fBIPMI_Memory_Redundancy_Fully_Redundant\fR Defaults to Nominal/Nominal. .TP \fBIPMI_Memory_Redundancy_Redundancy_Lost\fR Defaults to Critical/Warning. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded\fR Defaults to Warning/Warning. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Redundant\fR Defaults to Critical/Warning. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Sufficient_Resources_From_Insufficient_Redundancy\fR Defaults to Critical/Warning. .TP \fBIPMI_Memory_Redundancy_Non_Redundant_Insufficient_Resources\fR Defaults to Critical/Warning. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded_From_Fully_Redundant\fR Defaults to Warning/Warning. .TP \fBIPMI_Memory_Redundancy_Redundancy_Degraded_From_Non_Redundant\fR Defaults to Warning/Warning. .RE .TP .B IPMI_Drive_Slot The following states correspond to Drive Slot sensor events w/ Drive Slot specific output events. .RS .TP \fBIPMI_Drive_Slot_Drive_Presence\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Drive_Fault\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Predictive_Failure\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Hot_Spare\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Consistency_Check_Parity_Check_In_Progress\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_In_Critical_Array\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_In_Failed_Array\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Rebuild_Remap_In_Progress\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Rebuild_Remap_Aborted\fR Defaults to Critical. .RE .TP .B IPMI_Drive_Slot_State The following states correspond to Drive Slot sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Drive_Slot_State_Deasserted\fR Defaults to Warning. .TP \fBIPMI_Drive_Slot_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Drive_Slot_Predictive_Failure The following states correspond to Drive_Slot sensor events that report a predictive failure assertion or deassertion. .RS .TP \fBIPMI_Drive_Slot_Predictive_Failure_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Drive_Slot_Predictive_Failure_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Drive_Slot_Device_Present The following states correspond to Drive Slot sensor events that report on device installation. .RS .TP \fBIPMI_Drive_Slot_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Drive_Slot_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_POST_Memory_Resize_State The following states correspond to POST Memory Resize sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_POST_Memory_Resize_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_POST_Memory_Resize_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_System_Firmware_Progress The following states correspond to System Firmware Progress sensor events w/ System Firmware Progress specific output events. .RS .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Error\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Hang\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_System_Firmware_Progress\fR Defaults to Nominal. .RE .TP .B IPMI_System_Firmware_Progress_Transition_Severity The following states correspond to System Firmware Progress sensor events that report on device severity. .RS .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_System_Firmware_Progress_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Event_Logging_Disabled The following states correspond to Event Logging Disabled sensor events w/ .RS .TP \fBIPMI_Event_Logging_Disabled_Correctable_Memory_Error_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_Event_Type_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_Log_Area_Reset_Cleared\fR Defaults to Nominal. .TP \fBIPMI_Event_Logging_Disabled_All_Event_Logging_Disabled\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_SEL_Full\fR Defaults to Critical. .TP \fBIPMI_Event_Logging_Disabled_SEL_Almost_Full\fR Defaults to Warning. .TP \fBIPMI_Event_Logging_Disabled_Correctable_Machine_Check_Error_Logging_Disabled\fR Defaults to Critical. .RE .TP .B IPMI_System_Event The following states correspond to System Event sensor events w/ System Event specific output events. .RS .TP \fBIPMI_System_Event_System_Reconfigured\fR Defaults to Warning. .TP \fBIPMI_System_Event_OEM_System_Boot_Event\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Undetermined_System_Hardware_Failure\fR Defaults to Critical. .TP \fBIPMI_System_Event_Entry_Added_To_Auxiliary_Log\fR Defaults to Nominal. .TP \fBIPMI_System_Event_PEF_Action\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Timestamp_Clock_Sync\fR Defaults to Warning. .RE .TP .B IPMI_System_Event_Transition_State The following states correspond to System Event sensor events that report a transition state. .RS .TP \fBIPMI_System_Event_Transition_State_Active\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Transition_State_Idle\fR Defaults to Nominal. .TP \fBIPMI_System_Event_Transition_State_Busy\fR Defaults to Nominal. .RE .TP .B IPMI_System_Event_State The following states correspond to System Event sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_System_Event_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_System_Event_State_Asserted\fR Defaults to Warning. .RE .TP .B IPMI_Critical_Interrupt The following states correspond to Critical Interrupt sensor events w/ Critical Interrupt specific output events. .RS .TP \fBIPMI_Critical_Interrupt_Front_Panel_NMI_Diagnostic_Interrupt\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Timeout\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_IO_Channel_Check_NMI\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Software_NMI\fR Defaults to Warning. .TP \fBIPMI_Critical_Interrupt_PCI_PERR\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_PCI_SERR\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_EISA_Fail_Safe_Timeout\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Correctable_Error\fR Defaults to Warning. .TP \fBIPMI_Critical_Interrupt_Bus_Uncorrectable_Error\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Fatal_NMI\fR Defaults to Critical. .TP \fBIPMI_Critical_Interrupt_Bus_Fatal_Error\fR Defaults to Critical. \fBIPMI_Critical_Interrupt_Bus_Degraded\fR Defaults to Warning. .RE .TP .B IPMI_Button_Switch The following states correspond to Button/Switch sensor events w/ Button/Switch specific output events. .RS .TP \fBIPMI_Button_Switch_Power_Button_Pressed\fR Defaults to Info. .TP \fBIPMI_Button_Switch_Sleep_Button_Pressed\fR Defaults to Info. .TP \fBIPMI_Button_Switch_Reset_Button_Pressed\fR Defaults to Info. .TP \fBIPMI_Button_Switch_FRU_Latch_Open\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_FRU_Service_Request_Button\fR Defaults to Warning. .RE .TP .B IPMI_Button_Switch_State The following states correspond to Button/Switch sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Button_Switch_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_State_Asserted\fR Defaults to Nominal. .RE .TP .B IPMI_Button_Switch_Transition_Severity The following states correspond to Button Switch sensor events that report on device severity. .RS .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Button_Switch_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Button_Switch_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Module_Board_State The following states correspond to Module/Board sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Module_Board_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Module_Board_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Module_Board_Device_Present The following states correspond to Module/Board sensor events that report on device installation. .RS .TP \fBIPMI_Module_Board_Device_Present_Device_Removed_Device_Absent\fR Defaults to Critical. .TP \fBIPMI_Module_Board_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_Chassis_Transition_Severity The following states correspond to Chassis sensor events that report on device severity. .RS .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chassis_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Chassis_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Chip_Set The following states correspond to Chip Set sensor events w/ Chip Set specific output events. .RS .TP \fBIPMI_Chip_Set_Soft_Power_Control_Failure\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Thermal_Trip\fR Defaults to Critical. .RE .TP .B IPMI_Chip_Set_Transition_Severity The following states correspond to Chip Set sensor events that report on device severity. .RS .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Chip_Set_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Chip_Set_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_Cable_Interconnect The following states correspond to Cable/Interconnect sensor events w/ Cable/Interconnect specific output events. .RS .TP \fBIPMI_Cable_Interconnect_Is_Connected\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Configuration_Error\fR Defaults to Critical. .RE .TP .B IPMI_Cable_Interconnect_Transition_Severity The following states correspond to Cable/Interconnect sensor events that report on device severity. .RS .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Cable_Interconnect_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_System_Boot_Initiated The following states correspond to System Boot Initiated sensor events w/ System Boot Initiated specific output events. .RS \fBIPMI_System_Boot_Initiated_Initiated_By_Power_Up\fR Defaults to Nominal. \fBIPMI_System_Boot_Initiated_Initiated_By_Hard_Reset\fR Defaults to Nominal. \fBIPMI_System_Boot_Initiated_Initiated_By_Warm_Reset\fR Defaults to Nominal. \fBIPMI_System_Boot_Initiated_User_Requested_PXE_Boot\fR Defaults to Nominal. \fBIPMI_System_Boot_Initiated_Automatic_Boot_To_Diagnostic\fR Defaults to Nominal. \fBIPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Hard_Reset\fR Defaults to Warning. \fBIPMI_System_Boot_Initiated_OS_Run_Time_Software_Initiated_Warm_Reset\fR Defaults to Warning. \fBIPMI_System_Boot_Initiated_System_Restart\fR Defaults to Nominal. .RE .TP .B IPMI_Boot_Error The following states correspond to Boot Error sensor events w/ Boot Error specific output events. .RS .TP \fBIPMI_Boot_Error_No_Bootable_Media\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Non_Bootable_Diskette_Left_In_Drive\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_PXE_Server_Not_Found\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Invalid_Boot_Sector\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Timeout_Waiting_For_User_Selection_Of_Boot_Source\fR Defaults to Warning. .RE .TP .B IPMI_Boot_Error_State The following states correspond to Boot Error sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Boot_Error_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Boot_Error_Transition_Severity The following states correspond to Boot Error sensor events that report on device severity. .RS .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Boot_Error_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Boot_Error_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_OS_Boot The following states correspond to OS Boot sensor events w/ OS Boot specific output events. .RS \fBIPMI_OS_Boot_A_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_C_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_PXE_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Diagnostic_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_CD_ROM_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_ROM_Boot_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Boot_Completed_Boot_Device_Not_Specified\fR Defaults to Warning. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Started\fR Defaults to Nominal. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Completed\fR Defaults to Nominal. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Aborted\fR Defaults to Warning. \fBIPMI_OS_Boot_Base_OS_Hypervisor_Installation_Failed\fR Defaults to Critical. .RE .TP .B IPMI_OS_Critical_Stop The following states correspond to OS Critical Stop sensor events w/ OS Critical Stop specific output events. .RS \fBIPMI_OS_Critical_Stop_Critical_Stop_During_OS_Load\fR Defaults to Critical. \fBIPMI_OS_Critical_Stop_Run_Time_Critical_Stop\fR Defaults to Critical. \fBIPMI_OS_Critical_Stop_OS_Graceful_Stop\fR Defaults to Warning. \fBIPMI_OS_Critical_Stop_OS_Graceful_Shutdown\fR Defaults to Warning. \fBIPMI_OS_Critical_Stop_Soft_Shutdown_Initiated_By_PEF\fR Defaults to Warning. \fBIPMI_OS_Critical_Stop_Agent_Not_Responding\fR Defaults to Critical. .RE .TP .B IPMI_OS_Critical_Stop_State The following states correspond to OS Critical Stop sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_OS_Critical_Stop_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_OS_Critical_Stop_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Slot_Connector The following states correspond to Slot Connector sensor events w/ Slot Connector specific output events. .RS .TP \fBIPMI_Slot_Connector_Fault_Status_Asserted\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Identify_Status_Asserted\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Connector_Device_Installed_Attached\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Installation\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Ready_For_Device_Removal\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Power_Is_Off\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Slot_Connector_Device_Removal_Request\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Interlock_Asserted\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Is_Disabled\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Slot_Holds_Spare_Device\fR Defaults to Nominal. .RE .TP .B IPMI_Slot_Connector_Transition_Severity The following states correspond to Slot Connector sensor events that report on device severity. .RS .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_OK\fR Defaults to Nominal. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_OK\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable_From_Less_Severe\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Critical_From_More_Severe\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Critical_From_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Transition_To_Non_Recoverable\fR Defaults to Critical. .TP \fBIPMI_Slot_Connector_Transition_Severity_Monitor\fR Defaults to Warning. .TP \fBIPMI_Slot_Connector_Transition_Severity_Informational\fR Defaults to Nominal. .RE .TP .B IPMI_System_ACPI_Power_State .RS .TP \fBIPMI_System_ACPI_Power_State_S0_G0\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S1\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S2\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S3\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S4\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S5_G2\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S4_S5_Soft_Off\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_G3_Mechanical_Off\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Sleeping_in_an_S1_S2_or_S3_States\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_G1_Sleeping\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_S5_Entered_By_Override\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Legacy_ON_State\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Legacy_OFF_State\fR Defaults to Nominal. .TP \fBIPMI_System_ACPI_Power_State_Unspecified\fR Defaults to Critical. .TP \fBIPMI_System_ACPI_Power_State_Unknown\fR Defaults to Critical. .RE .TP .B IPMI_Watchdog2 The following states correspond to Watchdog 2 sensor events w/ Watchdog 2 specific output events. .RS .TP \fBIPMI_Watchdog2_Timer_Expired\fR Defaults to Warning. .TP \fBIPMI_Watchdog2_Hard_Reset\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Power_Down\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Power_Cycle\fR Defaults to Critical. .TP \fBIPMI_Watchdog2_Reserved1\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved2\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved3\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Reserved4\fR Defaults to Nominal. .TP \fBIPMI_Watchdog2_Timer_Interrupt\fR Defaults to Warning. .RE .TP .B IPMI_Platform_Alert The following states correspond to Platform Alert sensor events w/ Platform Alert specific output events. .RS \fBIPMI_Platform_Alert_Platform_Generated_Page\fR Defaults to Nominal. \fBIPMI_Platform_Alert_Platform_Generated_LAN_Alert\fR Defaults to Nominal. \fBIPMI_Platform_Alert_Platform_Event_Trap_Generated\fR Defaults to Nominal. \fBIPMI_Platform_Alert_Platform_Generated_SNMP_Trap\fR Defaults to Nominal. .RE .TP .B IPMI_Platform_Alert_State The following states correspond to Platform Alert sensor events that report an assertion or deassertion. .RS .TP \fBIPMI_Platform_Alert_State_Deasserted\fR Defaults to Nominal. .TP \fBIPMI_Platform_Alert_State_Asserted\fR Defaults to Critical. .RE .TP .B IPMI_Entity_Presence The following states correspond to Entity Presence sensor events w/ Entity Presence specific output events. .RS .TP \fBIPMI_Entity_Presence_Entity_Present\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Entity_Absent\fR Defaults to Critical. .TP \fBIPMI_Entity_Presence_Entity_Disabled\fR Defaults to Critical. .RE .TP .B IPMI_Entity_Presence_Device_Present The following states correspond to Entity Presence sensor events that report on device installation. .RS .TP \fBIPMI_Entity_Presence_Device_Present_Device_Removed_Device_Absent\fR Defaults to Nominal. .TP \fBIPMI_Entity_Presence_Device_Present_Device_Inserted_Device_Present\fR Defaults to Nominal. .RE .TP .B IPMI_LAN The following states correspond to LAN sensor events w/ LAN specific output events. .RS \fBIPMI_LAN_Heartbeat\fR Defaults to Nominal. \fBIPMI_LAN_Heartbeat_Lost\fR Defaults to Warning. .RE .TP .B IPMI_Management_Subsystem_Health The following states correspond to Management Subsystem Health sensor events w/ Management Subsystem Health specific output events. .RS .TP \fBIPMI_Management_Subsystem_Health_Sensor_Access_Degraded_Or_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Controller_Access_Degraded_Or_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Management_Controller_Off_Line\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Management_Controller_Unavailable\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_Sensor_Failure\fR Defaults to Critical. .TP \fBIPMI_Management_Subsystem_Health_FRU_Failure\fR Defaults to Critical. .RE .TP .B IPMI_Battery The following states correspond to Battery sensor events w/ Battery specific output events. .RS .TP \fBIPMI_Battery_Battery_Low\fR Defaults to Warning. .TP \fBIPMI_Battery_Battery_Failed\fR Defaults to Critical. .TP \fBIPMI_Battery_Battery_Presence_Detected\fR Defaults to Nominal. .RE .TP .B IPMI_Session_Audit The following states correspond to Session Audit sensor events w/ Session Audit specific output events. .RS .TP \fBIPMI_Session_Audit_Session_Activated\fR Defaults to Nominal. .TP \fBIPMI_Session_Audit_Session_Deactivated\fR Defaults to Nominal. .TP \fBIIPMI_Session_Audit_Invalid_Username_Or_Password\fR Defaults to Warning. .TP \fBIPMI_Session_Audit_Invalid_Password_Disable\fR Defaults to Critical. .RE .TP .B IPMI_Version_Change_Transition_Severity The following states correspond to Version Change sensor events that Version Change specific output events. .RS .TP \fBIPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity\fR Defaults to Warning. .TP \fBIPMI_Version_Change_Firmware_Or_Software_Change_Detected_With_Associated_Entity\fR Defaults to Warning. .TP \fBIPMI_Version_Change_Hardware_Incompatability_Detected_With_Associated_Entity\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Firmware_Or_Software_Incompatability_Detected_With_Associated_Entity\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Entity_Is_Of_An_Invalid_Or_Unsupported_Hardware_Version\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Entity_Contains_An_Invalid_Or_Unsupported_Firmware_Or_Software_Version\fR Defaults to Critical. .TP \fBIPMI_Version_Change_Hardware_Change_Detected_With_Associated_Entity_Was_Successful\fR Defaults to Nominal. .TP \fBIPMI_Version_Change_Software_Or_FW_Change_Detected_With_Associated_Entity_Was_Successful\fR Defaults to Nominal. .RE .TP .B IPMI_FRU_State The following states correspond to FRU State sensor events w/ FRU State specific output events. .RS .TP \fBIPMI_FRU_State_FRU_Not_Installed\fR Defaults to Critical. .TP \fBIPMI_FRU_State_FRU_Inactive\fR Defaults to Critical. .TP \fBIPMI_FRU_State_FRU_Activation_Requested\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Activation_In_Progress\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Active\fR Defaults to Nominal. .TP \fBIPMI_FRU_State_FRU_Deactivation_Requested\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Deactivation_In_Progress\fR Defaults to Warning. .TP \fBIPMI_FRU_State_FRU_Communication_Lost\fR Defaults to Critical. .RE .TP .B IPMI_OEM The following configuration options can be used to configure OEM system event log events. Interpretations rules for a specific combination of \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, and \fIRecord-Type\fR, are iterated through and the worst resulting sensor state is returned (i.e. Warning < Nominal, Critical < Warning). If no match is found, no state is returned for the OEM event. For each of the configuration options below, \fI\fR is the numeric IANA manufacturer ID for the manufacturer in question. The \fI\fR is one or more numeric IDs representing the manufacturer's product. The \fI\fR can be listed as a single numeric number (e.g. 1234), a range of IDs separated by a dash (e.g. 12-20), or a list of specific product IDs separted by a plus (e.g. 12+19+22). Both the \fIManufacturer\-ID\fR and \fIProduct\-ID\fR can be found using .B bmc-info(8). Multiple \fI\fR and \fI\fR pairs can be input separated by commas. .RS .TP \fBIPMI_OEM_Sensor_System_Event_Record\fR \fI\fR:\fI\fR,... \fIEvent\-Reading\-Type\-Code\fR \fISensor\-Type\fR \fIEvent\-Direction\fR \fIEventData1\fR \fIEventData2\fR \fIEventData3\fR \fIState\fR \fBIPMI_OEM_System_Event_Record\fR can be used to configure a state interpretation for a specific \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIEvent\-Reading\-Type\-Code\fR, and \fISensor\-Type\fR combination, and a specific \fIEvent\-Direction\fR, \fIEventData1\fR, \fIEventData2\fR, and \fIEventData3\fR. The \fIEvent\-Direction\fR field must specify \fIAssertion\fR, \fIDeassertion\fR, or \fIANY\fR. Each of the \fIEventData\fR fields must specify a hex byte to match or the keyword \fIANY\fR to match anything. The \fIEvent\-Reading\-Type\-Code\fR and \fISensor\-Type\fR need not be OEM types. They may be non-OEM types and used to provide interpretation rules for sensors that may be behaving outside the standard of the IPMI specification. .TP \fBIPMI_OEM_Timestamped_Record\fR \fI\fR:\fI\fR,... \fIRecord\-Type\fR \fIOEMDATA1\fR \fIOEMDATA2\fR \fIOEMDATA3\fR \fIOEMDATA4\fR \fIOEMDATA5\fR \fIOEMDATA6\fR \fIState\fR \fBIPMI_OEM_Timestamped_Record\fR can be used to configure an interpretation for a specific \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIRecord\-Type\fR, and OEM data combination. The \fIRecord\-Type\fR must be a legal record type for OEM Timestamped Records (currently 0xC0-0xDF). Each of the \fIOEMDATA\fR fields must specify a hex byte to match or the keyword \fIANY\fR to match anything. .TP \fBIPMI_OEM_Non_Timestamped_Record\fR \fI\fR:\fI\fR,... \fIRecord\-Type\fR \fIOEMDATA1\fR \fIOEMDATA2\fR \fIOEMDATA3\fR \fIOEMDATA4\fR \fIOEMDATA5\fR \fIOEMDATA6\fR \fIOEMDATA7\fR \fIOEMDATA8\fR \fIOEMDATA9\fR \fIOEMDATA10\fR \fIOEMDATA11\fR \fIOEMDATA12\fR \fIOEMDATA13\fR \fIState\fR \fBIPMI_OEM_Non_Timestamped_Record\fR can be used to configure an interpretation for a specific \fIManufacturer\-ID\fR, \fIProduct\-ID\fR, \fIRecord\-Type\fR, and OEM data combination. The \fIRecord\-Type\fR must be a legal record type for OEM Non-Timestamped Records (currently 0xEO-0xFF). Each of the \fIOEMDATA\fR fields must specify a hex byte to match or the keyword \fIANY\fR to match anything. .RE .SH "FILES" @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH "COPYRIGHT" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" libfreeipmi(3), libipmimonitoring(3), ipmi-sel(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/libipmiconsole.3.pre.in0000644002055400205540000000656413527331637020340 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: libipmiconsole.3.pre.in,v 1.13 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2006-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-221226 .\" .\" This file is part of Ipmiconsole, a set of IPMI 2.0 SOL librarie .\" and utilities. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiconsole is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiconsole is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiconsole. If not, see . .\"############################################################################ .TH libipmiconsole 3 "@ISODATE@" "libipmiconsole @PACKAGE_VERSION@" "System Commands" .SH "NAME" libipmiconsole \- IPMI SOL library .SH "SYNOPSIS" .B #include .sp .BI "int ipmiconsole_engine_init(unsigned int thread_count, unsigned int debug_flags);" .sp .BI "int ipmiconsole_engine_submit(ipmiconsole_ctx_t c, Ipmiconsole_callback callback, void *callback_arg);" .sp .BI "int ipmiconsole_engine_submit_block(ipmiconsole_ctx_t c);" .sp .BI "void ipmiconsole_engine_teardown(int cleanup_sol_sessions);" .sp .BI "ipmiconsole_ctx_t ipmiconsole_ctx_create(char *hostname, struct ipmiconsole_ipmi_config *ipmi_config, struct ipmiconsole_protocol_config *protocol_config);" .sp .BI "int ipmiconsole_ctx_errnum(ipmiconsole_ctx_t c);" .sp .BI "char *ipmiconsole_ctx_strerror(int errnum);" .sp .BI "ipmiconsole_ctx_status_t ipmiconsole_ctx_status(ipmiconsole_ctx_t c);" .sp .BI "int ipmiconsole_ctx_fd(ipmiconsole_ctx_t c);" .sp .BI "int ipmiconsole_ctx_generate_break(ipmiconsole_ctx_t c);" .sp .BI "int ipmiconsole_ctx_destroy(ipmiconsole_ctx_t c);" .sp .br .SH "DESCRIPTION" .B Libipmiconsole implements a high level serial-over-lan (SOL) API for remote console access. It can be used to establish and manage multiple IPMI 2.0 SOL sessions. The goal of this library is to abstract away all of the underlying IPMI/SOL details away from the user into a relatively simple file descriptor interface. Alternate default configuration value can be set for .B libipmiconsole via the libipmiconsole.conf file. See . B libipmiconsole.conf(5) for more information. .SH "FILES" /usr/include/ipmiconsole.h @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2006-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" libipmiconsole.conf(5), ipmiconsole(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/libipmiconsole.conf.5.pre.in0000644002055400205540000001525213527331637021260 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: ipmiconsole.8.pre.in,v 1.52 2010-06-30 21:56:36 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2006-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-221226 .\" .\" This file is part of Ipmiconsole, a set of IPMI 2.0 SOL librarie .\" and utilities. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiconsole is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiconsole is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiconsole. If not, see . .\"############################################################################ .TH LIBIPMICONSOLE 5 "@ISODATE@" "FreeIPMI @PACKAGE_VERSION@" "Configuration" .SH "NAME" libipmiconsole.conf \- specify default values for libipmiconsole .SH "DESCRIPTION" The .B Libipmiconsole configuration file can be used to set alternate default values for the .B libipmiconsole library. The configuration of these defaults may be useful for environments in which programs link to libipmiconsole but do not support configuration of libipmiconsole parameters. Users should be ware that setting alternate default values into .B libipmiconsole will affect all tools that link to the library, such as the .B ipmiconsole(8) tool. For users wishing to set alternate defaults to .B ipmiconsole(8) please use the .B freeipmi.conf(5) file instead. .LP The configuration file is stored at @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@. .SH "FORMAT" The configuration options that can be specified in the configuration file are listed below. Each configuration option must be listed on a separate line. Arguments for an option are separated by any amount of whitespace. Multiple arguments are also separated by whitespace. Comments can be marked by using the pound sign ("#") character, and lines can be continued on the next using backslash ("\\"). .SH "CONTEXT IPMI CONFIG OPTIONS" Every SOL session is housed within an libipmiconsole context. The following defines IPMI config default values for each context created. .TP \fBlibipmiconsole\-context\-username\fR \fIUSERNAME\fR Specify the default username to use. .TP \fBlibipmiconsole\-context\-password\fR \fIPASSWORD\fR Specify the default password to use. .TP \fBlibipmiconsole\-context\-k_g\fR \fIstr\fR Specify the default BMC key (K_g) to use. Prefix with '0x' to enter the key in hex. .TP \fBlibipmiconsole\-context\-privilege\-level\fR \fIPRIVILEGE\-LEVEL\fR Specify the default privilege type to use. The following privilege levels are supported: USER, OPERATOR, ADMIN. .TP \fBlibipmiconsole\-context\-cipher\-suite\-id\fR \fICIPHER\-SUITE\-ID\fR Specify the default cipher suite id to use. The following cipher suite ids are supported: 0, 1, 2, 3, 6, 7, 8, 11, 12. .TP \fBlibipmiconsole\-context\-workaround\-flags\fR \fIWORKAROUNDS\fR Specify default workaround flags to use. Multiple workarounds can be specified separated by whitespace. The following workarounds are supported: authcap, intel20, supermicro20, sun20, opensesspriv, integritycheckvalue, solpayloadsize, solport, solstatus, solchannelsupport, serialalertsdeferred, solpacketseq .SH "CONTEXT PROTOCOL CONFIG OPTIONS" Every SOL session is housed within an libipmiconsole context. The following defines protocol config default values for each context created. .TP \fBlibipmiconsole\-context\-session\-timeout\-len\fR \fIMILLISECONDS\fR Specify the default session timeout length to use in milliseconds. .TP \fBlibipmiconsole\-context\-retransmission\-timeout\-len\fR \fIMILLISECONDS\fR Specify the default retransmission timeout length to use in milliseconds. .TP \fBlibipmiconsole\-context\-retransmission\-backoff\-count\fR \fINUM\fR Specify the default retransmission backoff count to use. .TP \fBlibipmiconsole\-context\-keepalive\-timeout\-len\fR \fIMILLISECONDS\fR Specify the default keepalive timeout length to use in milliseconds. .TP \fBlibipmiconsole\-context\-retransmission\-keepalive\-timeout\-len\fR \fIMILLISECONDS\fR Specify the default retransmission timeout length to use for keepalive packets in milliseconds. .TP \fBlibipmiconsole\-context\-acceptable\-packet\-errors\-count\fR \fINUM\fR Specify the default packet errors count to use. .TP \fBlibipmiconsole\-context\-maximum\-retransmission\-count\fR \fINUM\fR Specify the default maximum retransmission count to use. .SH "CONTEXT ENGINE CONFIG OPTIONS" Every SOL session is housed within an libipmiconsole context. The following defines engine config default values for each context created. Knowledge of the libipmiconsole library may be necessary to understand the meaning of these settings. Please see the .B ipmiconsole.h header file for additional information on the library. .TP \fBlibipmiconsole\-context\-engine\-flags\fR \fIFLAGS\fR Specify default engine flags to use. Multiple flags can be specified separated by whitespace. The following flags are supported: closefd, outputonsolestablished, lockmemory, serialkeepalive. .TP \fBlibipmiconsole\-context\-behavior\-flags\fR \fIFLAGS\fR Specify default behavior flags to use. Multiple flags can be specified separated by whitespace. The following flags are supported: erroronsolinuse, deactivateonly, deactivateallinstances. .TP \fBlibipmiconsole\-context\-debug\-flags\fR \fIFLAGS\fR Specify default debug flags to use. Multiple flags can be specified separated by whitespace. The following flags are supported: stdout, stderr, syslog, file, ipmipackets. .TP \fBlibipmiconsole\-context\-sol\-payload\-instance\fR \fINUM\fR Specify default SOL payload instance. Has range of 1 to 15. .SH "FILES" @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2006-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-freeipmi-text.man> .SH "SEE ALSO" freeipmi.conf(5), freeipmi(7), libipmiconsole(3), ipmiconsole(8), #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/libipmidetect.3.pre.in0000644002055400205540000000617413527331637020143 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: libipmidetect.3.pre.in,v 1.13 2010-02-08 22:02:30 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-228523 .\" .\" This file is part of Ipmidetect, tools and libraries for detecting .\" IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmidetect is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmidetect is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmidetect. If not, see . .\"############################################################################ .TH LIBIPMIDETECT 3 "@ISODATE@" "LIBIPMIDETECT @VERSION@" "LIBIPMIDETECT" .SH "NAME" libipmidetect \- a library of functions to determine if a node is detected or undetected .SH "SYNOPSIS" .B #include .sp .BI "ipmidetect_t ipmidetect_handle_create(void);" .sp .BI "int ipmidetect_handle_destroy(ipmidetect_t handle);" .sp .BI "int ipmidetect_load_data(ipmidetect_t handle, const char *hostname, int port, int timeout_len);" .sp .BI "int ipmidetect_errnum(ipmidetect_t handle);" .sp .BI "char *ipmidetect_strerror(int errnum);" .sp .BI "char *ipmidetect_errormsg(int errnum);" .sp .BI "void ipmidetect_perror(ipmidetect_t handle, const char *msg);" .sp .BI "int ipmidetect_get_detected_nodes_string(ipmidetect_t handle, char *buf, int buflen);" .sp .BI "int ipmidetect_get_undetected_nodes_string(ipmidetect_t handle, char *buf, int buflen);" .sp .BI "int ipmidetect_is_node_detected(ipmidetect_t handle, const char *node);" .sp .BI "int ipmidetect_is_node_undetected(ipmidetect_t handle, const char *node);" .br .SH "DESCRIPTION" .B Libipmidetect implements a high level API for determing which nodes in a cluster do or do-not support IPMI. This library is primarily useful for detecting whe nodes are removed from a cluster for servicing, so that IPMI applications can avoid unnecessary timeouts. The library interacts with the .B ipmidetectd(8) daemon. .SH "FILES" /usr/include/ipmidetect.h #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" ipmidetect(8), ipmidetectd(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/libipmimonitoring.3.pre.in0000644002055400205540000000573713527331637021064 0ustar00achuachu00000000000000.\"############################################################################ .\" $Id: libipmimonitoring.3.pre.in,v 1.23 2010-03-22 17:15:31 chu11 Exp $ .\"############################################################################ .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2006-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-222073 .\" .\" This file is part of Ipmimonitoring, an IPMI sensor monitoring .\" library. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmimonitoring is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmimonitoring is distributed in the hope that it will be useful, but WITHOUT ANY .\" WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS .\" FOR A PARTICULAR PURPOSE. See the GNU General Public License for more .\" details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmimonitoring. If not, see . .\"############################################################################ .TH LIBIPMIMONITORING 3 "December 2006" "LLNL" "LIBIPMIMONITORING" .SH "NAME" libipmimonitoring \- a library for IPMI system event and sensor monitoring .SH "SYNOPSIS" .B #include .br .SH "DESCRIPTION" The .B libipmimonitoring implements a high level sensor and system event monitoring API. For system events, an iterator interface is provided that allows the user to iterate through system events, types, states, and more. For sensors, an iterator and callback interface is provided that allows the user to iterate through sensor values, types, units, states, and more. .LP In order to improve efficiency, SDR data will be cached on the host. By default it is cached in @IPMI_MONITORING_SDR_CACHE_DIR@. .LP Interpretation rules for system events and sensors are guided by .B libfreeipmi(3)'s interpretation library. Configuration of the interpretation rules can be configurd via the configuration file @INTERPRET_SEL_CONFIG_FILE_DEFAULT@. and @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ See .B freeipmi_interpret_sel.conf(5) and .B freeipmi_interpret_sensor.conf(5) for more information on configuring sensor and system event interpretations. .SH "FILES" @IPMI_MONITORING_SDR_CACHE_DIR@ #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2006-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-library-text.man> .SH "SEE ALSO" freeipmi_interpret_sel.conf(5), freeipmi_interpret_sensors.conf(5) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/rmcpping.8.pre.in0000644002055400205540000000477013527331640017143 0ustar00achuachu00000000000000.\"############################################################################# .\"$Id: rmcpping.8.pre.in,v 1.15 2010-02-08 22:02:31 chu11 Exp $ .\"############################################################################# .\" Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .\" Copyright (C) 2003-2007 The Regents of the University of California. .\" Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). .\" Written by Albert Chu .\" UCRL-CODE-155448 .\" .\" This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant .\" remote systems. For details, see http://www.llnl.gov/linux/. .\" .\" Ipmiping is free software; you can redistribute it and/or modify it under .\" the terms of the GNU General Public License as published by the Free .\" Software Foundation; either version 3 of the License, or (at your option) .\" any later version. .\" .\" Ipmiping is distributed in the hope that it will be useful, but WITHOUT .\" ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or .\" FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License .\" for more details. .\" .\" You should have received a copy of the GNU General Public License along .\" with Ipmiping. If not, see . .\"############################################################################ .TH RMCPING 8 "@ISODATE@" "rmcpping @PACKAGE_VERSION@" "System Manager Commands" .SH "NAME" rmcpping \- send RMCP Ping to network hosts .SH "SYNOPSIS" .B rmcpping [\fIOPTION\fR...] destination .SH "DESCRIPTION" .B rmcpping uses the RMCP Ping request datagram to elicit an RMCP Pong response from a remote host. The utility can be used to verify if a remote host supports RMCP or IPMI. The initial starting sequence number will be randomized. .B rmcpping will return 0 to the environment if it receives atleast 1 response from the remote host. Otherwise, it exits with a value of 1. #include <@top_srcdir@/man/manpage-common-ping-options.man> #include <@top_srcdir@/man/manpage-common-known-issues-ping.man> #include <@top_srcdir@/man/manpage-common-reporting-bugs.man> .SH COPYRIGHT Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. .br Copyright (C) 2003-2007 The Regents of the University of California. #include <@top_srcdir@/man/manpage-common-gpl-program-text.man> .SH "ORIGIN" Command and manpage based off .B ping(8). .SH "SEE ALSO" freeipmi(7), ping(8), ipmiping(8) #include <@top_srcdir@/man/manpage-common-homepage.man> freeipmi-1.6.4/man/manpage-common-general-options-header.man0000644002055400205540000000021013527331637023755 0ustar00achuachu00000000000000.SH "GENERAL OPTIONS" The following options are general options for configuring IPMI communication and executing general tool commands. freeipmi-1.6.4/man/manpage-common-driver.man0000644002055400205540000000052413527331637020724 0ustar00achuachu00000000000000.TP \fB\-D\fR \fIIPMIDRIVER\fR, \fB\-\-driver\-type\fR=\fIIPMIDRIVER\fR Specify the driver type to use instead of doing an auto selection. The currently available outofband drivers are LAN and LAN_2_0, which perform IPMI 1.5 and IPMI 2.0 respectively. The currently available inband drivers are KCS, SSIF, OPENIPMI, SUNBMC, and INTELDCMI. freeipmi-1.6.4/man/manpage-common-inband.man0000644002055400205540000000156213527331637020667 0ustar00achuachu00000000000000.TP \fB\-\-disable\-auto\-probe\fR Do not probe in-band IPMI devices for default settings. .TP \fB\-\-driver\-address\fR=\fIDRIVER-ADDRESS\fR Specify the in-band driver address to be used instead of the probed value. \fIDRIVER-ADDRESS\fR should be prefixed with "0x" for a hex value and '0' for an octal value. .TP \fB\-\-driver\-device\fR=\fIDEVICE\fR Specify the in-band driver device path to be used instead of the probed path. .TP \fB\-\-register\-spacing\fR=\fIREGISTER-SPACING\fR Specify the in-band driver register spacing instead of the probed value. Argument is in bytes (i.e. 32bit register spacing = 4) .TP \fB\-\-target\-channel\-number\fR=\fICHANNEL\-NUMBER\FR Specify the in-band driver target channel number to send IPMI requests to. .TP \fB\-\-target\-slave\-address\fR=\fISLAVE\-ADDRESS\FR Specify the in-band driver target slave number to send IPMI requests to. freeipmi-1.6.4/man/manpage-common-outofband-hostname.man0000644002055400205540000000043613527331637023230 0ustar00achuachu00000000000000.TP \fB\-h\fR \fIIPMIHOST\FR, \fB\-\-hostname\fR=\fIIPMIHOST[:PORT]\fR Specify the remote host to communicate with. An optional port can be specified, which may be useful in port forwarding or similar situations. If specifying an IPv6 address and port, use the format [ADDRESS]:PORT. freeipmi-1.6.4/man/manpage-common-outofband-hostname-hostranged.man0000644002055400205540000000071013527331637025357 0ustar00achuachu00000000000000.TP \fB\-h\fR \fIIPMIHOST1,IPMIHOST2,...\fR, \fB\-\-hostname\fR=\fIIPMIHOST1[:PORT],IPMIHOST2[:PORT],...\fR Specify the remote host(s) to communicate with. Multiple hostnames may be separated by comma or may be specified in a range format; see HOSTRANGED SUPPORT below. An optional port can be specified with each host, which may be useful in port forwarding or similar situations. If specifying an IPv6 address and port, use the format [ADDRESS]:PORT. freeipmi-1.6.4/man/manpage-common-outofband-username-user.man0000644002055400205540000000043213527331637024201 0ustar00achuachu00000000000000.TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must have atleast USER privileges in order for this tool to operate fully. freeipmi-1.6.4/man/manpage-common-outofband-username-operator.man0000644002055400205540000000043613527331637025062 0ustar00achuachu00000000000000.TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must have atleast OPERATOR privileges in order for this tool to operate fully. freeipmi-1.6.4/man/manpage-common-outofband-username-admin.man0000644002055400205540000000043313527331637024314 0ustar00achuachu00000000000000.TP \fB\-u\fR \fIUSERNAME\fR, \fB\-\-username\fR=\fIUSERNAME\fR Specify the username to use when authenticating with the remote host. If not specified, a null (i.e. anonymous) username is assumed. The user must have atleast ADMIN privileges in order for this tool to operate fully. freeipmi-1.6.4/man/manpage-common-outofband-password.man0000644002055400205540000000055013527331637023251 0ustar00achuachu00000000000000.TP \fB\-p\fR \fIPASSWORD\fR, \fB\-\-password\fR=\fIPASSWORD\fR Specify the password to use when authenticationg with the remote host. If not specified, a null password is assumed. Maximum password length is 16 for IPMI 1.5 and 20 for IPMI 2.0. .TP \fB\-P\fR, \fB\-\-password-prompt\fR Prompt for password to avoid possibility of listing it in process lists. freeipmi-1.6.4/man/manpage-common-outofband-k-g.man0000644002055400205540000000067313527331637022073 0ustar00achuachu00000000000000.TP \fB\-k\fR \fIK_G\fR, \fB\-\-k-g\fR=\fIK_G\fR Specify the K_g BMC key to use when authenticating with the remote host for IPMI 2.0. If not specified, a null key is assumed. To input the key in hexadecimal form, prefix the string with '0x'. E.g., the key 'abc' can be entered with the either the string 'abc' or the string '0x616263' .TP \fB\-K\fR, \fB\-\-k-g-prompt\fR Prompt for k-g to avoid possibility of listing it in process lists. freeipmi-1.6.4/man/manpage-common-outofband-session-timeout.man0000644002055400205540000000023513527331637024556 0ustar00achuachu00000000000000.TP \fB\-\-session-timeout\fR=\fIMILLISECONDS\fR Specify the session timeout in milliseconds. Defaults to 20000 milliseconds (20 seconds) if not specified. freeipmi-1.6.4/man/manpage-common-outofband-retransmission-timeout.man0000644002055400205540000000036613527331637026160 0ustar00achuachu00000000000000.TP \fB\-\-retransmission-timeout\fR=\fIMILLISECONDS\fR Specify the packet retransmission timeout in milliseconds. Defaults to 1000 milliseconds (1 second) if not specified. The retransmission timeout cannot be larger than the session timeout. freeipmi-1.6.4/man/manpage-common-authentication-type.man0000644002055400205540000000042513527331637023427 0ustar00achuachu00000000000000.TP \fB\-a\fR \fIAUTHENTICATION\-TYPE\fR, \fB\-\-authentication\-type\fR=\fIAUTHENTICATION\-TYPE\fR Specify the IPMI 1.5 authentication type to use. The currently available authentication types are NONE, STRAIGHT_PASSWORD_KEY, MD2, and MD5. Defaults to MD5 if not specified. freeipmi-1.6.4/man/manpage-common-cipher-suite-id-main.man0000644002055400205540000000116513527331637023350 0ustar00achuachu00000000000000.TP \fB\-I\fR \fICIPHER-SUITE-ID\fR, \fB\-\-cipher\-suite-id\fR=\fICIPHER-SUITE-ID\fR Specify the IPMI 2.0 cipher suite ID to use. The Cipher Suite ID identifies a set of authentication, integrity, and confidentiality algorithms to use for IPMI 2.0 communication. The authentication algorithm identifies the algorithm to use for session setup, the integrity algorithm identifies the algorithm to use for session packet signatures, and the confidentiality algorithm identifies the algorithm to use for payload encryption. Defaults to cipher suite ID 3 if not specified. The following cipher suite ids are currently supported: freeipmi-1.6.4/man/manpage-common-cipher-suite-id-details.man0000644002055400205540000000461213527331637024051 0ustar00achuachu00000000000000.sp 0 - Authentication Algorithm = None; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 1 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 2 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = None .sp 3 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = AES-CBC-128 .\" .sp .\" 4 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-128 .\" .sp .\" 5 - Authentication Algorithm = HMAC-SHA1; Integrity Algorithm = HMAC-SHA1-96; Confidentiality Algorithm = xRC4-40 .sp 6 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = None; Confidentiality Algorithm = None .sp 7 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = None .sp 8 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = AES-CBC-128 .\" .sp .\" 9 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-128 .\" .sp .\" 10 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = HMAC-MD5-128; Confidentiality Algorithm = xRC4-40 .sp 11 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = None .sp 12 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = AES-CBC-128 .\" .sp .\" 13 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-128 .\" .sp .\" 14 - Authentication Algorithm = HMAC-MD5; Integrity Algorithm = MD5-128; Confidentiality Algorithm = xRC4-40 .\" XXX GUESS .sp 15 - Authentication Algorithm = HMAC-SHA256; Integrity Algorithm = None; Confidentiality Algorithm = None .\" XXX GUESS .sp 16 - Authentication Algorithm = HMAC-SHA256; Integrity Algorithm = HMAC_SHA256_128; Confidentiality Algorithm = None .sp 17 - Authentication Algorithm = HMAC-SHA256; Integrity Algorithm = HMAC_SHA256_128; Confidentiality Algorithm = AES-CBC-128 .\" XXX GUESS .\" .sp .\" 18 - Authentication Algorithm = HMAC-SHA256; Integrity Algorithm = HMAC_SHA256_128; Confidentiality Algorithm = xRC4-128 .\" XXX GUESS .\" .sp .\" 19 - Authentication Algorithm = HMAC-SHA256; Integrity Algorithm = HMAC_SHA256_128; Confidentiality Algorithm = xRC4-40 freeipmi-1.6.4/man/manpage-common-privilege-level-user.man0000644002055400205540000000035513527331637023502 0ustar00achuachu00000000000000.TP \fB\-l\fR \fIPRIVILEGE\-LEVEL\fR, \fB\-\-privilege\-level\fR=\fIPRIVILEGE\-LEVEL\fR Specify the privilege level to be used. The currently available privilege levels are USER, OPERATOR, and ADMIN. Defaults to USER if not specified. freeipmi-1.6.4/man/manpage-common-privilege-level-operator.man0000644002055400205540000000036113527331637024354 0ustar00achuachu00000000000000.TP \fB\-l\fR \fIPRIVILEGE\-LEVEL\fR, \fB\-\-privilege\-level\fR=\fIPRIVILEGE\-LEVEL\fR Specify the privilege level to be used. The currently available privilege levels are USER, OPERATOR, and ADMIN. Defaults to OPERATOR if not specified. freeipmi-1.6.4/man/manpage-common-privilege-level-admin.man0000644002055400205540000000035513527331637023614 0ustar00achuachu00000000000000.TP \fB\-l\fR \fIPRIVILEGE\-LEVEL\fR, \fB\-\-privilege-level\fR=\fIPRIVILEGE\-LEVEL\fR Specify the privilege level to be used. The currently available privilege levels are USER, OPERATOR, and ADMIN. Defaults to ADMIN if not specified. freeipmi-1.6.4/man/manpage-common-config-file.man0000644002055400205540000000011713527331637021611 0ustar00achuachu00000000000000.TP \fB\-\-config\-file\fR=\fIFILE\fR Specify an alternate configuration file. freeipmi-1.6.4/man/manpage-common-workaround-flags.man0000644002055400205540000000056113527331640022711 0ustar00achuachu00000000000000.TP \fB\-W\fR \fIWORKAROUNDS\fR, \fB\-\-workaround\-flags\fR=\fIWORKAROUNDS\fR Specify workarounds to vendor compliance issues. Multiple workarounds can be specified separated by commas. A special command line flag of "none", will indicate no workarounds (may be useful for overriding configured defaults). See WORKAROUNDS below for a list of available workarounds. freeipmi-1.6.4/man/manpage-common-workaround-extra-text.man0000644002055400205540000000054613527331640023725 0ustar00achuachu00000000000000.LP No IPMI 1.5 Support - Some motherboards that support IPMI 2.0 have been found to not support IPMI 1.5. Those hitting this issue may see "ipmi 2.0 unavailable" or "connection timeout" errors. This issue can be worked around by using IPMI 2.0 instead of IPMI 1.5 by specifying \fB\-\-driver\-type\fR=\fILAN_2_0\fR. Issue observed on HP Proliant DL 145. freeipmi-1.6.4/man/manpage-common-workaround-heading-text.man0000644002055400205540000000205313527331640024174 0ustar00achuachu00000000000000.SH "WORKAROUNDS" With so many different vendors implementing their own IPMI solutions, different vendors may implement their IPMI protocols incorrectly. The following describes a number of workarounds currently available to handle discovered compliance issues. When possible, workarounds have been implemented so they will be transparent to the user. However, some will require the user to specify a workaround be used via the -W option. .LP The hardware listed below may only indicate the hardware that a problem was discovered on. Newer versions of hardware may fix the problems indicated below. Similar machines from vendors may or may not exhibit the same problems. Different vendors may license their firmware from the same IPMI firmware developer, so it may be worthwhile to try workarounds listed below even if your motherboard is not listed. .LP If you believe your hardware has an additional compliance issue that needs a workaround to be implemented, please contact the FreeIPMI maintainers on or . freeipmi-1.6.4/man/manpage-common-workaround-inband-text.man0000644002055400205540000000151213527331640024027 0ustar00achuachu00000000000000.LP \fIassumeio\fR - This workaround flag will assume inband interfaces communicate with system I/O rather than being memory-mapped. This will work around systems that report invalid base addresses. Those hitting this issue may see "device not supported" or "could not find inband device" errors. Issue observed on HP ProLiant DL145 G1. .LP \fIspinpoll\fR - This workaround flag will inform some inband drivers (most notably the KCS driver) to spin while polling rather than putting the process to sleep. This may significantly improve the wall clock running time of tools because an operating system scheduler's granularity may be much larger than the time it takes to perform a single IPMI message transaction. However, by spinning, your system may be performing less useful work by not contexting out the tool for a more useful task. freeipmi-1.6.4/man/manpage-common-workaround-outofband-common-text.man0000644002055400205540000000242613527331640026050 0ustar00achuachu00000000000000.LP \fIauthcap\fR - This workaround flag will skip early checks for username capabilities, authentication capabilities, and K_g support and allow IPMI authentication to succeed. It works around multiple issues in which the remote system does not properly report username capabilities, authentication capabilities, or K_g status. Those hitting this issue may see "username invalid", "authentication type unavailable for attempted privilege level", or "k_g invalid" errors. Issue observed on Asus P5M2/P5MT-R/RS162-E4/RX4, Intel SR1520ML/X38ML, and Sun Fire 2200/4150/4450 with ELOM. .LP \fInochecksumcheck\fR - This workaround flag will tell FreeIPMI to not check the checksums returned from IPMI command responses. It works around systems that return invalid checksums due to implementation errors, but the packet is otherwise valid. Users are cautioned on the use of this option, as it removes validation of packet integrity in a number of circumstances. However, it is unlikely to be an issue in most situations. Those hitting this issue may see "connection timeout", "session timeout", or "password verification timeout" errors. On IPMI 1.5 connections, the "noauthcodecheck" workaround may also needed too. Issue observed on Supermicro X9SCM-iiF, Supermicro X9DRi-F, and Supermicro X9DRFR. freeipmi-1.6.4/man/manpage-common-workaround-outofband-15-text.man0000644002055400205540000000410313527331640024777 0ustar00achuachu00000000000000.LP \fIidzero\fR - This workaround flag will allow empty session IDs to be accepted by the client. It works around IPMI sessions that report empty session IDs to the client. Those hitting this issue may see "session timeout" errors. Issue observed on Tyan S2882 with M3289 BMC. .LP \fIunexpectedauth\fR - This workaround flag will allow unexpected non-null authcodes to be checked as though they were expected. It works around an issue when packets contain non-null authentication data when they should be null due to disabled per-message authentication. Those hitting this issue may see "session timeout" errors. Issue observed on Dell PowerEdge 2850,SC1425. Confirmed fixed on newer firmware. .LP \fIforcepermsg\fR - This workaround flag will force per-message authentication to be used no matter what is advertised by the remote system. It works around an issue when per-message authentication is advertised as disabled on the remote system, but it is actually required for the protocol. Those hitting this issue may see "session timeout" errors. Issue observed on IBM eServer 325. .LP \fIendianseq\fR - This workaround flag will flip the endian of the session sequence numbers to allow the session to continue properly. It works around IPMI 1.5 session sequence numbers that are the wrong endian. Those hitting this issue may see "session timeout" errors. Issue observed on some Sun ILOM 1.0/2.0 (depends on service processor endian). .LP \fInoauthcodecheck\fR - This workaround flag will tell FreeIPMI to not check the authentication codes returned from IPMI 1.5 command responses. It works around systems that return invalid authentication codes due to hashing or implementation errors. Users are cautioned on the use of this option, as it removes an authentication check verifying the validity of a packet. However, in most organizations, this is unlikely to be a security issue. Those hitting this issue may see "connection timeout", "session timeout", or "password verification timeout" errors. Issue observed on Xyratex FB-H8-SRAY, Intel Windmill, Quanta Winterfell, and Wiwynn Windmill. freeipmi-1.6.4/man/manpage-common-workaround-outofband-20-text.man0000644002055400205540000000463613527331640025006 0ustar00achuachu00000000000000.LP \fIintel20\fR - This workaround flag will work around several Intel IPMI 2.0 authentication issues. The issues covered include padding of usernames, and password truncation if the authentication algorithm is HMAC-MD5-128. Those hitting this issue may see "username invalid", "password invalid", or "k_g invalid" errors. Issue observed on Intel SE7520AF2 with Intel Server Management Module (Professional Edition). .LP \fIsupermicro20\fR - This workaround flag will work around several Supermicro IPMI 2.0 authentication issues on motherboards w/ Peppercon IPMI firmware. The issues covered include handling invalid length authentication codes. Those hitting this issue may see "password invalid" errors. Issue observed on Supermicro H8QME with SIMSO daughter card. Confirmed fixed on newerver firmware. .LP \fIsun20\fR - This workaround flag will work work around several Sun IPMI 2.0 authentication issues. The issues covered include invalid lengthed hash keys, improperly hashed keys, and invalid cipher suite records. Those hitting this issue may see "password invalid" or "bmc error" errors. Issue observed on Sun Fire 4100/4200/4500 with ILOM. This workaround automatically includes the "opensesspriv" workaround. .LP \fIopensesspriv\fR - This workaround flag will slightly alter FreeIPMI's IPMI 2.0 connection protocol to workaround an invalid hashing algorithm used by the remote system. The privilege level sent during the Open Session stage of an IPMI 2.0 connection is used for hashing keys instead of the privilege level sent during the RAKP1 connection stage. Those hitting this issue may see "password invalid", "k_g invalid", or "bad rmcpplus status code" errors. Issue observed on Sun Fire 4100/4200/4500 with ILOM, Inventec 5441/Dell Xanadu II, Supermicro X8DTH, Supermicro X8DTG, Intel S5500WBV/Penguin Relion 700, Intel S2600JF/Appro 512X, Quanta QSSC-S4R/Appro GB812X-CN, and Dell C5220. This workaround is automatically triggered with the "sun20" workaround. .LP \fIintegritycheckvalue\fR - This workaround flag will work around an invalid integrity check value during an IPMI 2.0 session establishment when using Cipher Suite ID 0. The integrity check value should be 0 length, however the remote motherboard responds with a non-empty field. Those hitting this issue may see "k_g invalid" errors. Issue observed on Supermicro X8DTG, Supermicro X8DTU, and Intel S5500WBV/Penguin Relion 700, and Intel S2600JF/Appro 512X. freeipmi-1.6.4/man/manpage-common-workaround-sdr-text.man0000644002055400205540000000054013527331640023364 0ustar00achuachu00000000000000.LP \fIassumemaxsdrrecordcount\fR - This workaround will inform SDR reading to stop reading after a known maximum number of SDR records have been read. This will work around systems that have mis-implemented SDR reading functions. Those hitting this issue may see "SDR record count invalid" errors. Issue observed on unspecified Inspur motherboard. freeipmi-1.6.4/man/manpage-common-workaround-config-tool.man0000644002055400205540000000125113527331640024032 0ustar00achuachu00000000000000.LP \fIslowcommit\fR - This workaround will slow down commits to the BMC by sleeping one second between the commit of sections. It works around motherboards that have BMCs that can be overwhelmed by commits. Those hitting this issue may see commit errors or commits not being written to the BMC. Issue observed on Supermicro H8QME. .LP \fIveryslowcommit\fR - This workaround will slow down commits to the BMC by sleeping one second between the commit of every key. It works around motherboards that have BMCs that can be overwhelmed by commits. Those hitting this issue may see commit errors or commits not being written to the BMC. Issue observed on Quanta S99Q/Dell FS12-TY. freeipmi-1.6.4/man/manpage-common-debug.man0000644002055400205540000000004713527331637020517 0ustar00achuachu00000000000000.TP \fB\-\-debug\fR Turn on debugging. freeipmi-1.6.4/man/manpage-common-misc.man0000644002055400205540000000026613527331637020367 0ustar00achuachu00000000000000.TP \fB\-?\fR, \fB\-\-help\fR Output a help list and exit. .TP \fB\-\-usage\fR Output a usage message and exit. .TP \fB\-V\fR, \fB\-\-version\fR Output the program version and exit. freeipmi-1.6.4/man/manpage-common-hostranged-options-header.man0000644002055400205540000000022513527331637024504 0ustar00achuachu00000000000000.SH "HOSTRANGED OPTIONS" The following options manipulate hostranged output. See HOSTRANGED SUPPORT below for additional information on hostranges. freeipmi-1.6.4/man/manpage-common-hostranged-buffer.man0000644002055400205540000000055613527331637023043 0ustar00achuachu00000000000000.TP \fB\-B\fR, \fB\-\-buffer-output\fR Buffer hostranged output. For each node, buffer standard output until the node has completed its IPMI operation. When specifying this option, data may appear to output slower to the user since the the entire IPMI operation must complete before any data can be output. See HOSTRANGED SUPPORT below for additional information. freeipmi-1.6.4/man/manpage-common-hostranged-consolidate.man0000644002055400205540000000102613527331637024067 0ustar00achuachu00000000000000.TP \fB\-C\fR, \fB\-\-consolidate-output\fR Consolidate hostranged output. The complete standard output from every node specified will be consolidated so that nodes with identical output are not output twice. A header will list those nodes with the consolidated output. When this option is specified, no output can be seen until the IPMI operations to all nodes has completed. If the user breaks out of the program early, all currently consolidated output will be dumped. See HOSTRANGED SUPPORT below for additional information. freeipmi-1.6.4/man/manpage-common-hostranged-fanout.man0000644002055400205540000000053413527331637023062 0ustar00achuachu00000000000000.TP \fB\-F\fR \fINUM\fR, \fB\-\-fanout\fR=\fINUM\fR Specify multiple host fanout. A "sliding window" (or fanout) algorithm is used for parallel IPMI communication so that slower nodes or timed out nodes will not impede parallel communication. The maximum number of threads available at the same time is limited by the fanout. The default is 64. freeipmi-1.6.4/man/manpage-common-hostranged-eliminate.man0000644002055400205540000000047413527331637023540 0ustar00achuachu00000000000000.TP \fB\-E\fR, \fB\-\-eliminate\fR Eliminate hosts determined as undetected by .B ipmidetect. This attempts to remove the common issue of hostranged execution timing out due to several nodes being removed from service in a large cluster. The .B ipmidetectd daemon must be running on the node executing the command. freeipmi-1.6.4/man/manpage-common-hostranged-always-prefix.man0000644002055400205540000000035113527331637024356 0ustar00achuachu00000000000000.TP \fB\-\-always\-prefix\fR Always prefix output, even if only one host is specified or communicating in-band. This option is primarily useful for scripting purposes. Option will be ignored if specified with the \fB\-C\fR option. freeipmi-1.6.4/man/manpage-common-hostranged-text-main.man0000644002055400205540000000177613527331637023505 0ustar00achuachu00000000000000.SH "HOSTRANGED SUPPORT" Multiple hosts can be input either as an explicit comma separated lists of hosts or a range of hostnames in the general form: prefix[n-m,l-k,...], where n < m and l < k, etc. The later form should not be confused with regular expression character classes (also denoted by []). For example, foo[19] does not represent foo1 or foo9, but rather represents a degenerate range: foo19. .LP This range syntax is meant only as a convenience on clusters with a prefixNN naming convention and specification of ranges should not be considered necessary -- the list foo1,foo9 could be specified as such, or by the range foo[1,9]. .LP Some examples of range usage follow: .nf foo[01-05] instead of foo01,foo02,foo03,foo04,foo05 foo[7,9-10] instead of foo7,foo9,foo10 foo[0-3] instead of foo0,foo1,foo2,foo3 .fi .LP As a reminder to the reader, some shells will interpret brackets ([ and ]) for pattern matching. Depending on your shell, it may be necessary to enclose ranged lists within quotes. freeipmi-1.6.4/man/manpage-common-hostranged-text-options.man0000644002055400205540000000054113527331637024241 0ustar00achuachu00000000000000.LP By default, standard output from each node specified will be output with the hostname prepended to each line. Although this output is readable in many situations, it may be difficult to read in other situations. For example, output from multiple nodes may be mixed together. The \fB\-B\fR and \fB\-C\fR options can be used to change this default. freeipmi-1.6.4/man/manpage-common-hostranged-text-localhost.man0000644002055400205540000000023313527331637024534 0ustar00achuachu00000000000000.LP In-band IPMI Communication will be used when the host "localhost" is specified. This allows the user to add the localhost into the hostranged output. freeipmi-1.6.4/man/manpage-common-hostranged-text-threads.man0000644002055400205540000000042713527331637024203 0ustar00achuachu00000000000000.LP When multiple hosts are specified by the user, a thread will be executed for each host in parallel up to the configured fanout (which can be adjusted via the \fB\-F\fR option). This will allow communication to large numbers of nodes far more quickly than if done in serial. freeipmi-1.6.4/man/manpage-common-time-options-heading.man0000644002055400205540000000066613527331640023456 0ustar00achuachu00000000000000.SH "TIME OPTIONS" By IPMI definition, all IPMI times and timestamps are stored in localtime. However, in many situations, the timestamps will not be stored in localtime. Whether or not a system truly stored the timestamps in localtime varies on many factors, such as the vendor, BIOS, and operating system. The following options will allow the user to adjust the interpretation of the stored timestamps and how they should be output. freeipmi-1.6.4/man/manpage-common-time-options.man0000644002055400205540000000061113527331640022047 0ustar00achuachu00000000000000.TP \fB\-\-utc\-to\-localtime\fR Assume all times are reported in UTC time and convert the time to localtime before being output. .TP \fB\-\-localtime\-to\-utc\fR Convert all localtime timestamps to UTC before being output. .TP \fB\-\-utc\-offset\fR=\fISECONDS\fR Specify a specific UTC offset in seconds to be added to timestamps. Value can range from -86400 to 86400 seconds. Defaults to 0. freeipmi-1.6.4/man/manpage-common-sdr-cache-options-heading.man0000644002055400205540000000035413527331637024351 0ustar00achuachu00000000000000.SH "SDR CACHE OPTIONS" This tool requires access to the sensor data repository (SDR) cache for general operation. By default, SDR data will be downloaded and cached on the local machine. The following options apply to the SDR cache. freeipmi-1.6.4/man/manpage-common-sdr-cache-options.man0000644002055400205540000000105013527331637022746 0ustar00achuachu00000000000000.TP \fB\-\-flush\-cache\fR Flush a cached version of the sensor data repository (SDR) cache. The SDR is typically cached for faster subsequent access. However, it may need to be flushed and re-generated if the SDR has been updated on a system. .TP \fB\-\-quiet\-cache\fR Do not output information about cache creation/deletion. May be useful in scripting. .TP \fB\-\-sdr\-cache\-recreate\fR If the SDR cache is out of date or invalid, automatically recreate the sensor data repository (SDR) cache. This option may be useful for scripting purposes. freeipmi-1.6.4/man/manpage-common-sdr-cache-file-directory.man0000644002055400205540000000066713527331637024211 0ustar00achuachu00000000000000.TP \fB\-\-sdr\-cache\-file\fR=\fIFILE\fR Specify a specific sensor data repository (SDR) cache file to be stored or read from. If this option is used when multiple hosts are specified, the same SDR cache file will be used for all hosts. .TP \fB\-\-sdr\-cache\-directory\fR=\fIDIRECTORY\fR Specify an alternate directory for sensor data repository (SDR) caches to be stored or read from. Defaults to the home directory if not specified. freeipmi-1.6.4/man/manpage-common-sdr-cache-ignore.man0000644002055400205540000000035613527331637022546 0ustar00achuachu00000000000000.TP \fB\-\-ignore\-sdr\-cache\fR Ignore SDR cache related processing. May lead to incomplete or less useful information being output, however it will allow functionality for systems without SDRs or when the correct SDR cannot be loaded. freeipmi-1.6.4/man/manpage-common-troubleshooting-heading-end.man0000644002055400205540000000050013527331640025005 0ustar00achuachu00000000000000.LP In addition to the troubleshooting tips below, please see WORKAROUNDS below to also if there are any vendor specific bugs that have been discovered and worked around. .LP Listed below are many of the common issues for error messages. For additional support, please e-mail the mailing list. freeipmi-1.6.4/man/manpage-common-troubleshooting-heading-inband.man0000644002055400205540000000014513527331640025477 0ustar00achuachu00000000000000.LP Inband IPMI problems are typically caused by improperly configured drivers or non-standard BMCs. freeipmi-1.6.4/man/manpage-common-troubleshooting-heading-outofband.man0000644002055400205540000000104413527331640026224 0ustar00achuachu00000000000000.LP IPMI over LAN problems involve a misconfiguration of the remote machine's BMC. Double check to make sure the following are configured properly in the remote machine's BMC: IP address, MAC address, subnet mask, username, user enablement, user privilege, password, LAN privilege, LAN enablement, and allowed authentication type(s). For IPMI 2.0 connections, double check to make sure the cipher suite privilege(s) and K_g key are configured properly. The .B ipmi-config(8) tool can be used to check and/or change these configuration settings. freeipmi-1.6.4/man/manpage-common-troubleshooting-heading-start.man0000644002055400205540000000013313527331640025376 0ustar00achuachu00000000000000.SH "GENERAL TROUBLESHOOTING" Most often, IPMI problems are due to configuration problems. freeipmi-1.6.4/man/manpage-common-troubleshooting-inband.man0000644002055400205540000000146513527331640024110 0ustar00achuachu00000000000000.LP "device not found" - The specified device could not be found. Please check configuration or inputs and try again. .LP "driver timeout" - Communication with the driver or device has timed out. Please try again. .LP "message timeout" - Communication with the driver or device has timed out. Please try again. .LP "BMC busy" - The BMC is currently busy. It may be processing information or have too many simultaneous sessions to manage. Please wait and try again. .LP "could not find inband device" - An inband device could not be found. Please check configuration or specify specific device or driver on the command line. .LP "driver timeout" - The inband driver has timed out communicating to the local BMC or service processor. The BMC or service processor may be busy or (worst case) possibly non-functioning. freeipmi-1.6.4/man/manpage-common-troubleshooting-outofband.man0000644002055400205540000000526413527331640024637 0ustar00achuachu00000000000000.LP "username invalid" - The username entered (or a NULL username if none was entered) is not available on the remote machine. It may also be possible the remote BMC's username configuration is incorrect. .LP "password invalid" - The password entered (or a NULL password if none was entered) is not correct. It may also be possible the password for the user is not correctly configured on the remote BMC. .LP "password verification timeout" - Password verification has timed out. A "password invalid" error (described above) or a generic "session timeout" (described below) occurred. During this point in the protocol it cannot be differentiated which occurred. .LP "k_g invalid" - The K_g key entered (or a NULL K_g key if none was entered) is not correct. It may also be possible the K_g key is not correctly configured on the remote BMC. .LP "privilege level insufficient" - An IPMI command requires a higher user privilege than the one authenticated with. Please try to authenticate with a higher privilege. This may require authenticating to a different user which has a higher maximum privilege. .LP "privilege level cannot be obtained for this user" - The privilege level you are attempting to authenticate with is higher than the maximum allowed for this user. Please try again with a lower privilege. It may also be possible the maximum privilege level allowed for a user is not configured properly on the remote BMC. .LP "authentication type unavailable for attempted privilege level" - The authentication type you wish to authenticate with is not available for this privilege level. Please try again with an alternate authentication type or alternate privilege level. It may also be possible the available authentication types you can authenticate with are not correctly configured on the remote BMC. .LP "cipher suite id unavailable" - The cipher suite id you wish to authenticate with is not available on the remote BMC. Please try again with an alternate cipher suite id. It may also be possible the available cipher suite ids are not correctly configured on the remote BMC. .LP "ipmi 2.0 unavailable" - IPMI 2.0 was not discovered on the remote machine. Please try to use IPMI 1.5 instead. .LP "connection timeout" - Initial IPMI communication failed. A number of potential errors are possible, including an invalid hostname specified, an IPMI IP address cannot be resolved, IPMI is not enabled on the remote server, the network connection is bad, etc. Please verify configuration and connectivity. .LP "session timeout" - The IPMI session has timed out. Please reconnect. If this error occurs often, you may wish to increase the retransmission timeout. Some remote BMCs are considerably slower than others. freeipmi-1.6.4/man/manpage-common-troubleshooting-inband-outofband.man0000644002055400205540000000024013527331640026055 0ustar00achuachu00000000000000.LP "internal IPMI error" - An IPMI error has occurred that FreeIPMI does not know how to handle. Please e-mail to report the issue. freeipmi-1.6.4/man/manpage-common-troubleshooting-sel.man0000644002055400205540000000130713527331640023433 0ustar00achuachu00000000000000Some timestamps in the SEL may report a date of 1-Jan-1970, the epoch for SEL timestamps. This timestamp is not necessarily incorrect. It usually indicates a hardware event that occurred before a timestamp in firmware has been initialized. For example, certain hardware components will have their internal clocks reset during a power cycle. .LP However, if the internal clock of the SEL appears to be regularly incorrect, you may need to set the SEL time. This can be done using .B bmc-device(8). .LP The following are common SEL related messages. .LP "sel config file parse error" - A parse error was found in the sel event interpretation configuration file. Please see .B freeipmi_interpret_sel.conf(5). freeipmi-1.6.4/man/manpage-common-diagnostics.man0000644002055400205540000000013413527331637021735 0ustar00achuachu00000000000000.SH "DIAGNOSTICS" Upon successful execution, exit status is 0. On error, exit status is 1. freeipmi-1.6.4/man/manpage-common-diagnostics-hostranged-text.man0000644002055400205540000000023613527331637025056 0ustar00achuachu00000000000000.LP If multiple hosts are specified for communication, the exit status is 0 if and only if all targets successfully execute. Otherwise the exit status is 1. freeipmi-1.6.4/man/manpage-common-known-issues.man0000644002055400205540000000137313527331637022101 0ustar00achuachu00000000000000.SH "KNOWN ISSUES" On older operating systems, if you input your username, password, and other potentially security relevant information on the command line, this information may be discovered by other users when using tools like the .B ps(1) command or looking in the /proc file system. It is generally more secure to input password information with options like the -P or -K options. Configuring security relevant information in the FreeIPMI configuration file would also be an appropriate way to hide this information. .LP In order to prevent brute force attacks, some BMCs will temporarily "lock up" after a number of remote authentication errors. You may need to wait awhile in order to this temporary "lock up" to pass before you may authenticate again. freeipmi-1.6.4/man/manpage-common-known-issues-ping.man0000644002055400205540000000056413527331637023035 0ustar00achuachu00000000000000.SH "KNOWN ISSUES" It has been observed that some remote BMCs can get "confused" and delay packet responses if duplicate packets (with duplicate sequence numbers) are sent in succession very quickly. There is no known way to cleanly deal with a "confused" BMC other than the wait awhile. .PP Unlike .B ping(8), local network devices (e.g. 127.0.0.1) cannot be "pinged". freeipmi-1.6.4/man/manpage-common-reporting-bugs.man0000644002055400205540000000013413527331637022375 0ustar00achuachu00000000000000.SH "REPORTING BUGS" Report bugs to or . freeipmi-1.6.4/man/manpage-common-gpl-library-text.man0000644002055400205540000000036413527331637022641 0ustar00achuachu00000000000000.PP This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. freeipmi-1.6.4/man/manpage-common-gpl-program-text.man0000644002055400205540000000036413527331637022644 0ustar00achuachu00000000000000.PP This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. freeipmi-1.6.4/man/manpage-common-gpl-freeipmi-text.man0000644002055400205540000000036013527331637022771 0ustar00achuachu00000000000000.PP FreeIPMI is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version. freeipmi-1.6.4/man/manpage-common-ping-options.man0000644002055400205540000000135013527331637022055 0ustar00achuachu00000000000000.SH "OPTIONS" The following options are available .TP \fB\-h\fR Output help menu. .TP \fB\-V\fR Output version. .TP \fB\-c\fR \fIcount\fR Stop after sending .I count packets. .TP \fB\-i\fR \fIinterval\fR Wait .I interval seconds between sending each packet. The default is to wait for one second between each packet. .TP \fB\-I\fR \fIinterface address\fR Set source address to specified interface address. Argument may be numeric IP address or name of device. .TP \fB\-t\fR \fItimeout\fR Time to wait for a response, in seconds. Default is five seconds. .TP \fB\-v\fR Verbose output. .TP \fB\-s\fR \fInum\fR Specify an initial starting sequence number. The default is to use a random initial sequence number. .TP \fB\-d\fR Turn on debugging. freeipmi-1.6.4/man/manpage-common-ping-origin.man0000644002055400205540000000006713527331637021655 0ustar00achuachu00000000000000.SH "ORIGIN" Command and manpage based off .B ping(8). freeipmi-1.6.4/man/manpage-common-table-of-contents.man0000644002055400205540000000032713527331637022756 0ustar00achuachu00000000000000.LP Listed below are general IPMI options, tool specific options, trouble shooting information, workaround information, examples, and known issues. For a general introduction to FreeIPMI please see .B freeipmi(7). freeipmi-1.6.4/man/manpage-common-homepage.man0000644002055400205540000000005313527331637021213 0ustar00achuachu00000000000000.PP http://www.gnu.org/software/freeipmi/ freeipmi-1.6.4/man/manpage-common-interpret-oem-data.man0000644002055400205540000000065313527331637023135 0ustar00achuachu00000000000000.TP \fB\-\-interpret\-oem\-data\fR Attempt to interpret OEM data, such as event data, sensor readings, or general extra info, etc. If an OEM interpretation is not available, the default output will be generated. Correctness of OEM interpretations cannot be guaranteed due to potential changes OEM vendors may make in products, firmware, etc. See OEM INTERPRETATION below for confirmed supported motherboard interpretations. freeipmi-1.6.4/man/manpage-common-oem-interpretation.man0000644002055400205540000000054113527331637023255 0ustar00achuachu00000000000000.SH "OEM INTERPRETATION" The following motherboards are confirmed to have atleast some support by the \fB\-\-interpret-oem-data\fR option. While highly probable the OEM data interpretations would work across other motherboards by the same manufacturer, there are no guarantees. Some of the motherboards below may be rebranded by vendors/distributors. freeipmi-1.6.4/man/manpage-common-entity-sensor-names.man0000644002055400205540000000060713527331637023357 0ustar00achuachu00000000000000.TP \fB\-\-entity\-sensor\-names\fR Output sensor names prefixed with their entity id and instance number when appropriate. This may be necessary on some motherboards to help identify what sensors are referencing. For example, a motherboard may have multiple sensors named 'TEMP'. The entity id and instance number may help clarify which sensor refers to "Processor 1" vs. "Processor 2". freeipmi-1.6.4/man/manpage-common-no-sensor-type-output.man0000644002055400205540000000056613527331637023677 0ustar00achuachu00000000000000.TP \fB\-\-no\-sensor\-type\-output\fR Do not show sensor type output for each entry. On many systems, the sensor type is redundant to the name of the sensor. This can especially be true if \fB\-\-entity\-sensor\-names\fR is specified. If the sensor name is sufficient, or if the sensor type is of no interest to the user, this option can be specified to condense output. freeipmi-1.6.4/man/manpage-common-comma-separated-output.man0000644002055400205540000000011513527331637024025 0ustar00achuachu00000000000000.TP \fB\-\-comma\-separated\-output Output fields in comma separated format. freeipmi-1.6.4/man/manpage-common-no-header-output.man0000644002055400205540000000013113527331637022623 0ustar00achuachu00000000000000.TP \fB\-\-no\-header\-output Do not output column headers. May be useful in scripting. freeipmi-1.6.4/man/manpage-common-non-abbreviated-units.man0000644002055400205540000000025113527331637023626 0ustar00achuachu00000000000000.TP \fB\-\-non\-abbreviated\-units\fR Output non-abbreviated units (e.g. 'Amps' instead of 'A'). May aid in disambiguation of units (e.g. 'C' for Celsius or Coulombs). freeipmi-1.6.4/man/manpage-common-legacy-output.man0000644002055400205540000000015513527331637022233 0ustar00achuachu00000000000000.TP \fB\-\-legacy\-output\fR Output in legacy format. Newer options may not be applicable to legacy output. freeipmi-1.6.4/man/bmc-config.80000644002055400205540000000002713527331637016133 0ustar00achuachu00000000000000.so man8/ipmi-config.8 freeipmi-1.6.4/man/bmc-config.conf.50000644002055400205540000000003413527331637017052 0ustar00achuachu00000000000000.so man5/ipmi-config.conf.5 freeipmi-1.6.4/man/ipmi-chassis-config.80000644002055400205540000000002713527331637017763 0ustar00achuachu00000000000000.so man8/ipmi-config.8 freeipmi-1.6.4/man/ipmi-console.80000644002055400205540000000002713527331637016525 0ustar00achuachu00000000000000.so man8/ipmiconsole.8 freeipmi-1.6.4/man/ipmi-detect.80000644002055400205540000000002613527331637016332 0ustar00achuachu00000000000000.so man8/ipmidetect.8 freeipmi-1.6.4/man/ipmi-pef-config.80000644002055400205540000000002713527331637017100 0ustar00achuachu00000000000000.so man8/ipmi-config.8 freeipmi-1.6.4/man/ipmi-ping.80000644002055400205540000000002413527331637016015 0ustar00achuachu00000000000000.so man8/ipmiping.8 freeipmi-1.6.4/man/ipmi-power.80000644002055400205540000000002513527331637016215 0ustar00achuachu00000000000000.so man8/ipmipower.8 freeipmi-1.6.4/man/ipmi-sensors-config.80000644002055400205540000000002713527331637020022 0ustar00achuachu00000000000000.so man8/ipmi-config.8 freeipmi-1.6.4/man/ipmiconsole.conf.50000644002055400205540000000003113527331637017364 0ustar00achuachu00000000000000.so man5/freeipmi.conf.5 freeipmi-1.6.4/man/ipmipower.conf.50000644002055400205540000000003113527331637017056 0ustar00achuachu00000000000000.so man5/freeipmi.conf.5 freeipmi-1.6.4/man/ipmimonitoring.80000644002055400205540000000003013527331637017165 0ustar00achuachu00000000000000.so man8/ipmi-sensors.8 freeipmi-1.6.4/man/ipmimonitoring_sensors.conf.50000644002055400205540000000005213527331637021666 0ustar00achuachu00000000000000.so man5/freeipmi_interpret_sensor.conf.5 freeipmi-1.6.4/man/ipmimonitoring.conf.50000644002055400205540000000005213527331637020112 0ustar00achuachu00000000000000.so man5/freeipmi_interpret_sensor.conf.5 freeipmi-1.6.4/man/ipmi_monitoring_sensors.conf.50000644002055400205540000000005213527331637022025 0ustar00achuachu00000000000000.so man5/freeipmi_interpret_sensor.conf.5 freeipmi-1.6.4/man/libipmimonitoring.conf.50000644002055400205540000000005013527331637020577 0ustar00achuachu00000000000000.so man5/ipmi_monitoring_sensors.conf.5 freeipmi-1.6.4/man/pef-config.80000644002055400205540000000003313527331640016133 0ustar00achuachu00000000000000.so man8/ipmi-pef-config.8 freeipmi-1.6.4/man/rmcp-ping.80000644002055400205540000000002413527331640016012 0ustar00achuachu00000000000000.so man8/rmcpping.8 freeipmi-1.6.4/bmc-info/0000755002055400205540000000000013527342545014756 5ustar00achuachu00000000000000freeipmi-1.6.4/bmc-info/Makefile.in0000644002055400205540000006702513527342443017032 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = bmc-info$(EXEEXT) subdir = bmc-info DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_bmc_info_OBJECTS = bmc_info-bmc-info.$(OBJEXT) \ bmc_info-bmc-info-argp.$(OBJEXT) bmc_info_OBJECTS = $(am_bmc_info_OBJECTS) bmc_info_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bmc_info_SOURCES) DIST_SOURCES = $(bmc_info_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bmc_info_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT bmc_info_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_info_SOURCES = \ bmc-info.c \ bmc-info.h \ bmc-info-argp.c \ bmc-info-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bmc-info/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bmc-info/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list bmc-info$(EXEEXT): $(bmc_info_OBJECTS) $(bmc_info_DEPENDENCIES) $(EXTRA_bmc_info_DEPENDENCIES) @rm -f bmc-info$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bmc_info_OBJECTS) $(bmc_info_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_info-bmc-info-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_info-bmc-info.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< bmc_info-bmc-info.o: bmc-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_info-bmc-info.o -MD -MP -MF $(DEPDIR)/bmc_info-bmc-info.Tpo -c -o bmc_info-bmc-info.o `test -f 'bmc-info.c' || echo '$(srcdir)/'`bmc-info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_info-bmc-info.Tpo $(DEPDIR)/bmc_info-bmc-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-info.c' object='bmc_info-bmc-info.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_info-bmc-info.o `test -f 'bmc-info.c' || echo '$(srcdir)/'`bmc-info.c bmc_info-bmc-info.obj: bmc-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_info-bmc-info.obj -MD -MP -MF $(DEPDIR)/bmc_info-bmc-info.Tpo -c -o bmc_info-bmc-info.obj `if test -f 'bmc-info.c'; then $(CYGPATH_W) 'bmc-info.c'; else $(CYGPATH_W) '$(srcdir)/bmc-info.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_info-bmc-info.Tpo $(DEPDIR)/bmc_info-bmc-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-info.c' object='bmc_info-bmc-info.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_info-bmc-info.obj `if test -f 'bmc-info.c'; then $(CYGPATH_W) 'bmc-info.c'; else $(CYGPATH_W) '$(srcdir)/bmc-info.c'; fi` bmc_info-bmc-info-argp.o: bmc-info-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_info-bmc-info-argp.o -MD -MP -MF $(DEPDIR)/bmc_info-bmc-info-argp.Tpo -c -o bmc_info-bmc-info-argp.o `test -f 'bmc-info-argp.c' || echo '$(srcdir)/'`bmc-info-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_info-bmc-info-argp.Tpo $(DEPDIR)/bmc_info-bmc-info-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-info-argp.c' object='bmc_info-bmc-info-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_info-bmc-info-argp.o `test -f 'bmc-info-argp.c' || echo '$(srcdir)/'`bmc-info-argp.c bmc_info-bmc-info-argp.obj: bmc-info-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_info-bmc-info-argp.obj -MD -MP -MF $(DEPDIR)/bmc_info-bmc-info-argp.Tpo -c -o bmc_info-bmc-info-argp.obj `if test -f 'bmc-info-argp.c'; then $(CYGPATH_W) 'bmc-info-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-info-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_info-bmc-info-argp.Tpo $(DEPDIR)/bmc_info-bmc-info-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-info-argp.c' object='bmc_info-bmc-info-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_info_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_info-bmc-info-argp.obj `if test -f 'bmc-info-argp.c'; then $(CYGPATH_W) 'bmc-info-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-info-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/bmc-info/Makefile.am0000644002055400205540000000266013527331634017013 0ustar00achuachu00000000000000sbin_PROGRAMS = bmc-info bmc_info_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT bmc_info_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_info_SOURCES = \ bmc-info.c \ bmc-info.h \ bmc-info-argp.c \ bmc-info-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/bmc-info/bmc-info.c0000644002055400205540000014665013527331634016625 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "bmc-info.h" #include "bmc-info-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-util-common.h" typedef struct channel_info { uint8_t actual_channel_number; uint8_t channel_medium_type; uint8_t channel_protocol_type; uint8_t active_session_count; uint8_t session_support; uint32_t vendor_id; } channel_info_t; #define BMC_INFO_SYSTEM_INFO_STRING_MAX 512 #define BMC_INFO_IANA_STRING_MAX 1024 #define BMC_INFO_BUFLEN 1024 typedef int (*Bmc_info_system_info_first_set)(ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); typedef int (*Bmc_info_system_info)(ipmi_ctx_t ctx, uint8_t get_parameter, uint8_t set_selector, uint8_t block_selector, fiid_obj_t obj_cmd_rs); fiid_template_t tmpl_cmd_get_device_id_sr870bn4_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "device_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "device_revision.revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* binary encoded */ { 3, "device_revision.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "device_revision.sdr_support", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 7, "firmware_revision1.major_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "firmware_revision1.device_available", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "firmware_revision2.minor_revision", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, /* BCD encoded */ { 4, "ipmi_version.ms_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "ipmi_version.ls_bits", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sensor_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sdr_repository_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.sel_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.fru_inventory_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.ipmb_event_receiver", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.ipmb_event_generator", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.bridge", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 1, "additional_device_support.chassis_device", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 20, "manufacturer_id.id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 4, "manufacturer_id.reserved1", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "product_id", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "auxiliary_firmware_revision_information.boot_code.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "auxiliary_firmware_revision_information.boot_code.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "auxiliary_firmware_revision_information.pia.major", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 8, "auxiliary_firmware_revision_information.pia.minor", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; static int display_intel_sr870bn4 (bmc_info_state_data_t *state_data, fiid_obj_t device_id_rs) { uint8_t boot_code_major, boot_code_minor, pia_major, pia_minor; uint64_t val; fiid_obj_t obj_intel_rs = NULL; int rv = -1; assert (state_data); if (!(obj_intel_rs = fiid_obj_copy (device_id_rs, tmpl_cmd_get_device_id_sr870bn4_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_copy: %s\n", fiid_obj_errormsg (device_id_rs)); goto cleanup; } if (FIID_OBJ_GET (obj_intel_rs, "auxiliary_firmware_revision_information.boot_code.major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'auxiliary_firmware_revision_information.boot_code.major': %s\n", fiid_obj_errormsg (obj_intel_rs)); goto cleanup; } boot_code_major = val; if (FIID_OBJ_GET (obj_intel_rs, "auxiliary_firmware_revision_information.boot_code.minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'auxiliary_firmware_revision_information.boot_code.minor': %s\n", fiid_obj_errormsg (obj_intel_rs)); goto cleanup; } boot_code_minor = val; if (FIID_OBJ_GET (obj_intel_rs, "auxiliary_firmware_revision_information.pia.major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'auxiliary_firmware_revision_information.pia.major': %s\n", fiid_obj_errormsg (obj_intel_rs)); goto cleanup; } pia_major = val; if (FIID_OBJ_GET (obj_intel_rs, "auxiliary_firmware_revision_information.pia.minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'auxiliary_firmware_revision_information.pia.minor': %s\n", fiid_obj_errormsg (obj_intel_rs)); goto cleanup; } pia_minor = val; pstdout_printf (state_data->pstate, "Boot Code : v%02x.%2x\n" "PIA : v%02x.%2x\n", boot_code_major, boot_code_minor, pia_major, pia_minor); rv = 0; cleanup: fiid_obj_destroy (obj_intel_rs); return (rv); } static int display_get_device_id (bmc_info_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t device_id; uint8_t revision; uint8_t major, minor; uint32_t manufacturer_id; uint16_t product_id; uint32_t auxiliary_firmware_revision_information; int flag; uint64_t val = 0; char iana_buf[BMC_INFO_IANA_STRING_MAX + 1]; int ret; int rv = -1; assert (state_data); memset (iana_buf, '\0', BMC_INFO_IANA_STRING_MAX + 1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_device_id_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_device_id (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_device_id: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "device_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'device_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } device_id = val; pstdout_printf (state_data->pstate, "Device ID : %u\n", device_id); if (FIID_OBJ_GET (obj_cmd_rs, "device_revision.revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'device_revision.revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } revision = val; pstdout_printf (state_data->pstate, "Device Revision : %u\n", revision); if (FIID_OBJ_GET (obj_cmd_rs, "device_revision.sdr_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'device_revision.sdr_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Device SDRs : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "firmware_revision1.major_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'firmware_revision1.major_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "firmware_revision2.minor_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'firmware_revision2.minor_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; /* achu: minor revision is BCD encoded and is 8 bits, output w/ %x */ pstdout_printf (state_data->pstate, "Firmware Revision : %u.%02x\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "firmware_revision1.device_available", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'firmware_revision1.device_available': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* The "yes" vs. "no" is backwards from normal logic */ pstdout_printf (state_data->pstate, "Device Available : %s\n", val ? "no (device firmware, SDR Repository update or self initilization in progress)" : "yes (normal operation)"); if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_version_major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ipmi_version_major': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_version_minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ipmi_version_minor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; /* achu: ipmi version is BCD encoded, but major/minor are only 4 bits */ pstdout_printf (state_data->pstate, "IPMI Version : %u.%u\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.sensor_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.sensor_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Sensor Device : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.sdr_repository_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.sdr_repository_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "SDR Repository Device : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.sel_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.sel_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "SEL Device : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.fru_inventory_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.fru_inventory_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "FRU Inventory Device : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.ipmb_event_receiver", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.ipmb_event_receiver': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "IPMB Event Receiver : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.ipmb_event_generator", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.ipmb_event_generator': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "IPMB Event Generator : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.bridge", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.bridge': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Bridge : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "additional_device_support.chassis_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'additional_device_support.chassis_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Chassis Device : %s\n", val ? "supported" : "unsupported"); if (FIID_OBJ_GET (obj_cmd_rs, "manufacturer_id.id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manufacturer_id.id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } manufacturer_id = val; /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, BMC_INFO_IANA_STRING_MAX); if (ret > 0) pstdout_printf (state_data->pstate, "Manufacturer ID : %s (%u)\n", iana_buf, manufacturer_id); else pstdout_printf (state_data->pstate, "Manufacturer ID : %u\n", manufacturer_id); if (FIID_OBJ_GET (obj_cmd_rs, "product_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'product_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } product_id = val; pstdout_printf (state_data->pstate, "Product ID : %u\n", product_id); /* auxiliary firmware info is optional */ if ((flag = fiid_obj_get (obj_cmd_rs, "auxiliary_firmware_revision_information", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'auxiliary_firmware_revision_information': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } auxiliary_firmware_revision_information = val; if (flag) { /* OEM Interpretation * * Intel SR870BN4/Tiger 4 */ if (state_data->prog_data->args->interpret_oem_data && manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL && product_id == IPMI_INTEL_PRODUCT_ID_SR870BN4) { if (display_intel_sr870bn4 (state_data, obj_cmd_rs) < 0) goto cleanup; } /* OEM Interpretation * * Dell Poweredge R610 * Dell Poweredge R710 */ else if (state_data->prog_data->args->interpret_oem_data && manufacturer_id == IPMI_IANA_ENTERPRISE_ID_DELL && (product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R610 || product_id == IPMI_DELL_PRODUCT_ID_POWEREDGE_R710)) { pstdout_printf (state_data->pstate, "Build Number : %u\n", auxiliary_firmware_revision_information); } else pstdout_printf (state_data->pstate, "Auxiliary Firmware Revision Information : %08Xh\n", auxiliary_firmware_revision_information); } /* output newline if we're outputting all sections */ if (!state_data->prog_data->args->get_device_id) pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int display_guid (bmc_info_state_data_t *state_data, fiid_field_t *tmpl_cmd_get_guid_rs, int (*ipmi_cmd_get_guid_func)(ipmi_ctx_t, fiid_obj_t), char *ipmi_cmd_get_guid_description, int get_guid_only_flag, char *guid_description) { uint8_t guidbuf[BMC_INFO_BUFLEN]; fiid_obj_t obj_cmd_rs = NULL; int len; int rv = -1; assert (state_data); assert (tmpl_cmd_get_guid_rs); assert (ipmi_cmd_get_guid_func); assert (ipmi_cmd_get_guid_description); assert (guid_description); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_guid_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_guid_func (state_data->ipmi_ctx, obj_cmd_rs) < 0) { if (!state_data->prog_data->args->get_device_guid && ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", ipmi_cmd_get_guid_description, ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "guid", guidbuf, BMC_INFO_BUFLEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'guid': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < IPMI_SYSTEM_GUID_LENGTH) { pstdout_fprintf (state_data->pstate, stderr, "guid length invalid: %d\n", len); goto cleanup; } if (!get_guid_only_flag) pstdout_printf (state_data->pstate, "%s : ", guid_description); /* IPMI transfers the guid in least significant bit order and the * fields are reverse from the "Wired for Management * Specification". * * For output format details see Appendix 1 "String Representation * of UUIDs" in the above document. Note that the output is * supposed to be output in most significant byte order and hex * characters are to be output lower case. */ if (!(state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_GUID_FORMAT)) pstdout_printf (state_data->pstate, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", guidbuf[15], /* time low */ guidbuf[14], guidbuf[13], guidbuf[12], guidbuf[11], /* time mid */ guidbuf[10], guidbuf[9], /* time high and version */ guidbuf[8], guidbuf[7], /* clock seq and reserved */ guidbuf[6], guidbuf[5], /* node */ guidbuf[4], guidbuf[3], guidbuf[2], guidbuf[1], guidbuf[0]); else /* It appears some vendors are not sending the GUID in the right * format, basically sending it in the format from the Wired for * Management Specification. */ pstdout_printf (state_data->pstate, "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x\n", guidbuf[3], /* time low */ guidbuf[2], guidbuf[1], guidbuf[0], guidbuf[5], /* time mid */ guidbuf[4], guidbuf[7], /* time high and version */ guidbuf[6], guidbuf[8], /* clock seq high and reserved - not little endian*/ guidbuf[9], /* clock seq low */ guidbuf[10], /* node - assume sent in correct order */ guidbuf[11], guidbuf[12], guidbuf[13], guidbuf[14], guidbuf[15]); /* output newline if we're outputting all sections */ if (!get_guid_only_flag) pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int display_get_device_guid (bmc_info_state_data_t *state_data) { return display_guid (state_data, tmpl_cmd_get_device_guid_rs, ipmi_cmd_get_device_guid, "ipmi_cmd_get_device_guid", state_data->prog_data->args->get_device_guid, "Device GUID"); } static int display_get_system_guid (bmc_info_state_data_t *state_data) { return display_guid (state_data, tmpl_cmd_get_system_guid_rs, ipmi_cmd_get_system_guid, "ipmi_cmd_get_system_guid", state_data->prog_data->args->get_system_guid, "System GUID"); } /* return 1 if supported, 0 if not */ static int display_system_info_common (bmc_info_state_data_t *state_data, fiid_field_t *tmpl_cmd_first_set, fiid_field_t *tmpl_cmd, Bmc_info_system_info_first_set func_cmd_first_set, const char *func_cmd_first_set_str, Bmc_info_system_info func_cmd, const char *func_cmd_str, const char *string_prefix) { fiid_obj_t obj_cmd_first_set_rs = NULL; fiid_obj_t obj_cmd_rs = NULL; #if 0 /* Code currently assumes ASCII, remove to remove warning */ uint8_t encoding; #endif uint8_t string_length; char string[BMC_INFO_SYSTEM_INFO_STRING_MAX + 1]; uint64_t val; uint8_t set_selector = 0; unsigned int string_count = 0; unsigned int orig_flags = 0; int ret, len; int rv = -1; assert (state_data); assert (tmpl_cmd_first_set); assert (tmpl_cmd); assert (func_cmd_first_set); assert (func_cmd_first_set_str); assert (func_cmd); assert (func_cmd_str); assert (string_prefix); assert (state_data); memset (string, '\0', BMC_INFO_SYSTEM_INFO_STRING_MAX + 1); if (!(obj_cmd_first_set_rs = fiid_obj_create (tmpl_cmd_first_set))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* IPMI Workaround * * Bull 510 Blade * * The first call to retrieve the Operating System name does not * return a set_selector, encoding, or string_length. If it does * not, we assume the string is empty. */ if (ipmi_ctx_get_flags (state_data->ipmi_ctx, &orig_flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_get_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_ctx_set_flags (state_data->ipmi_ctx, orig_flags | IPMI_FLAGS_NO_VALID_CHECK) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (func_cmd_first_set (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_first_set_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_first_set_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1 || ipmi_check_completion_code (obj_cmd_first_set_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_first_set_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1)) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", func_cmd_first_set_str, ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((ret = fiid_obj_get (obj_cmd_first_set_rs, "encoding", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'encoding': %s\n", fiid_obj_errormsg (obj_cmd_first_set_rs)); goto cleanup; } if (!ret) goto output; #if 0 /* Code currently assumes ASCII, remove to remove warning */ encoding = val; #endif if ((ret = fiid_obj_get (obj_cmd_first_set_rs, "string_length", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'string_length': %s\n", fiid_obj_errormsg (obj_cmd_first_set_rs)); goto cleanup; } if (!ret) goto output; string_length = val; /* no string */ if (!string_length) goto output; if ((len = fiid_obj_get_data (obj_cmd_first_set_rs, "string", string + string_count, BMC_INFO_SYSTEM_INFO_STRING_MAX - string_count)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'string': %s\n", fiid_obj_errormsg (obj_cmd_first_set_rs)); goto cleanup; } string_count += len; /* string_length is 8 bits, so we should not call >= 17 times, * * ceiling ( (255 - 14) / 16 ) + 1 = 17 * */ set_selector++; while (string_count < string_length && set_selector < 17) { if (func_cmd (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1)) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", func_cmd_str, ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "string", string + string_count, BMC_INFO_SYSTEM_INFO_STRING_MAX - string_count)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'string': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } string_count += len; set_selector++; } output: /* XXX: assume ascii, or if not, user has set locale properly?? */ pstdout_printf (state_data->pstate, "%s %s\n", string_prefix, string); rv = 1; cleanup: if (ipmi_ctx_set_flags (state_data->ipmi_ctx, orig_flags) < 0) pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); fiid_obj_destroy (obj_cmd_first_set_rs); fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 if supported, 0 if not */ static int display_system_info_system_firmware_version (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_system_firmware_version_first_set_rs, tmpl_cmd_get_system_info_parameters_system_firmware_version_rs, ipmi_cmd_get_system_info_parameters_system_firmware_version_first_set, "ipmi_cmd_get_system_info_parameters_system_firmware_version_first_set", ipmi_cmd_get_system_info_parameters_system_firmware_version, "ipmi_cmd_get_system_info_parameters_system_firmware_version", "System Firmware Version :"); } /* return 1 if supported, 0 if not */ static int display_system_info_system_name (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_system_name_first_set_rs, tmpl_cmd_get_system_info_parameters_system_name_rs, ipmi_cmd_get_system_info_parameters_system_name_first_set, "ipmi_cmd_get_system_info_parameters_system_name_first_set", ipmi_cmd_get_system_info_parameters_system_name, "ipmi_cmd_get_system_info_parameters_system_name", "System Name :"); } /* return 1 if supported, 0 if not */ static int display_system_info_primary_operating_system_name (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_primary_operating_system_name_first_set_rs, tmpl_cmd_get_system_info_parameters_primary_operating_system_name_rs, ipmi_cmd_get_system_info_parameters_primary_operating_system_name_first_set, "ipmi_cmd_get_system_info_parameters_primary_operating_system_name_first_set", ipmi_cmd_get_system_info_parameters_primary_operating_system_name, "ipmi_cmd_get_system_info_parameters_primary_operating_system_name", "Primary Operating System Name :"); } /* return 1 if supported, 0 if not */ static int display_system_info_operating_system_name (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_operating_system_name_first_set_rs, tmpl_cmd_get_system_info_parameters_operating_system_name_rs, ipmi_cmd_get_system_info_parameters_operating_system_name_first_set, "ipmi_cmd_get_system_info_parameters_operating_system_name_first_set", ipmi_cmd_get_system_info_parameters_operating_system_name, "ipmi_cmd_get_system_info_parameters_operating_system_name", "Operating System Name :"); } /* return 1 if supported, 0 if not */ static int display_system_info_present_os_version_number (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_present_os_version_number_first_set_rs, tmpl_cmd_get_system_info_parameters_present_os_version_number_rs, ipmi_cmd_get_system_info_parameters_present_os_version_number_first_set, "ipmi_cmd_get_system_info_parameters_present_os_version_number_first_set", ipmi_cmd_get_system_info_parameters_present_os_version_number, "ipmi_cmd_get_system_info_parameters_present_os_version_number", "Present OS Version Number :"); } /* return 1 if supported, 0 if not */ static int display_system_info_bmc_url (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_bmc_url_first_set_rs, tmpl_cmd_get_system_info_parameters_bmc_url_rs, ipmi_cmd_get_system_info_parameters_bmc_url_first_set, "ipmi_cmd_get_system_info_parameters_bmc_url_first_set", ipmi_cmd_get_system_info_parameters_bmc_url, "ipmi_cmd_get_system_info_parameters_bmc_url", "BMC URL :"); } /* return 1 if supported, 0 if not */ static int display_system_info_base_os_hypervisor_url (bmc_info_state_data_t *state_data) { assert (state_data); return display_system_info_common (state_data, tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set_rs, tmpl_cmd_get_system_info_parameters_base_os_hypervisor_url_rs, ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set, "ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url_first_set", ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url, "ipmi_cmd_get_system_info_parameters_base_os_hypervisor_url", "Base OS/Hypervisor URL :"); } static int display_system_info (bmc_info_state_data_t *state_data) { int ret; assert (state_data); if ((ret = display_system_info_system_firmware_version (state_data)) < 0) return (-1); if (!ret) return (0); if ((ret = display_system_info_system_name (state_data)) < 0) return (-1); if (!ret) goto newline_cleanup; if ((ret = display_system_info_primary_operating_system_name (state_data)) < 0) return (-1); if (!ret) goto newline_cleanup; if ((ret = display_system_info_operating_system_name (state_data)) < 0) return (-1); if (!ret) goto newline_cleanup; /* New, may not be supported */ if ((ret = display_system_info_present_os_version_number (state_data)) < 0) return (-1); if (!ret) goto newline_cleanup; /* optional - if ret == 0, can still go on */ if ((ret = display_system_info_bmc_url (state_data)) < 0) return (-1); /* optional - if ret == 0, can still go on */ if ((ret = display_system_info_base_os_hypervisor_url (state_data)) < 0) return (-1); newline_cleanup: /* output newline if we're outputting all sections */ if (!state_data->prog_data->args->get_system_info) pstdout_printf (state_data->pstate, "\n"); return (0); } static int get_channel_info_list (bmc_info_state_data_t *state_data, channel_info_t *channel_info_list) { fiid_obj_t obj_cmd_rs = NULL; unsigned int i; uint8_t ci; uint64_t val; int rv = -1; assert (state_data); assert (channel_info_list); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } for (i = IPMI_CHANNEL_NUMBER_PRIMARY_IPMB, ci = 0; i <= IPMI_CHANNEL_NUMBER_IMPLEMENTATION_SPECIFIC_MAX; i++) { if (ipmi_cmd_get_channel_info (state_data->ipmi_ctx, i, obj_cmd_rs) < 0) { channel_info_list[ci].actual_channel_number = 0; channel_info_list[ci].channel_medium_type = 0; channel_info_list[ci].channel_protocol_type = 0; channel_info_list[ci].active_session_count = 0; channel_info_list[ci].session_support = 0; channel_info_list[ci].vendor_id = 0; continue; } if (FIID_OBJ_GET (obj_cmd_rs, "actual_channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'actual_channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].actual_channel_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "channel_medium_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_medium_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].channel_medium_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "channel_protocol_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_protocol_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].channel_protocol_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "active_session_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'active_session_count': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].active_session_count = val; if (FIID_OBJ_GET (obj_cmd_rs, "session_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'session_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].session_support = val; if (FIID_OBJ_GET (obj_cmd_rs, "vendor_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'vendor_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_info_list[ci].vendor_id = val; ci++; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int display_channel_info (bmc_info_state_data_t *state_data) { channel_info_t channel_info_list[IPMI_CHANNEL_NUMBERS_MAX]; int first_newline_output = 0; unsigned int i; assert (state_data); if (get_channel_info_list (state_data, channel_info_list) < 0) return (-1); if (!state_data->prog_data->args->get_channel_info) pstdout_printf (state_data->pstate, "Channel Information\n"); for (i = 0; i < IPMI_CHANNEL_NUMBERS_MAX; i++) { char *medium_type_str = NULL; char *protocol_type_str = NULL; char *session_support_str = NULL; char iana_buf[BMC_INFO_IANA_STRING_MAX + 1]; int ret; memset (iana_buf, '\0', BMC_INFO_IANA_STRING_MAX + 1); if (IPMI_CHANNEL_MEDIUM_TYPE_IS_RESERVED (channel_info_list[i].channel_medium_type)) continue; switch (channel_info_list[i].channel_medium_type) { case IPMI_CHANNEL_MEDIUM_TYPE_IPMB: medium_type_str = "IPMB (I2C)"; break; case IPMI_CHANNEL_MEDIUM_TYPE_ICMB_10: medium_type_str = "ICMB v1.0"; break; case IPMI_CHANNEL_MEDIUM_TYPE_ICMB_09: medium_type_str = "ICMB v0.9"; break; case IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3: medium_type_str = "802.3 LAN"; break; case IPMI_CHANNEL_MEDIUM_TYPE_RS232: medium_type_str = "Asynch. Serial/Modem (RS-232)"; break; case IPMI_CHANNEL_MEDIUM_TYPE_OTHER_LAN: medium_type_str = "Other LAN"; break; case IPMI_CHANNEL_MEDIUM_TYPE_PCI_SMBUS: medium_type_str = "PCI SMBus"; break; case IPMI_CHANNEL_MEDIUM_TYPE_SMBUS_10_11: medium_type_str = "SMBus v1.0/1.1"; break; case IPMI_CHANNEL_MEDIUM_TYPE_SMBUS_20: medium_type_str = "SMBus v2.0"; break; case IPMI_CHANNEL_MEDIUM_TYPE_USB_1X: medium_type_str = "USB 1.x"; break; case IPMI_CHANNEL_MEDIUM_TYPE_USB_2X: medium_type_str = "USB 2.x"; break; case IPMI_CHANNEL_MEDIUM_TYPE_SYSTEM_INTERFACE: medium_type_str = "System Interface (KCS, SMIC, or BT)"; break; default: if (IPMI_CHANNEL_MEDIUM_TYPE_IS_OEM (channel_info_list[i].channel_medium_type)) medium_type_str = "OEM"; else medium_type_str = "unknown"; } switch (channel_info_list[i].channel_protocol_type) { case IPMI_CHANNEL_PROTOCOL_TYPE_IPMB: protocol_type_str = "IPMB-1.0"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_ICMB_10: protocol_type_str = "ICMB-1.0"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_SMBUS_1X_2X: protocol_type_str = "IPMI-SMBus"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_KCS: protocol_type_str = "KCS"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_SMIC: protocol_type_str = "SMIC"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_BT_10: protocol_type_str = "BT-10"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_BT_15: protocol_type_str = "BT-15"; break; case IPMI_CHANNEL_PROTOCOL_TYPE_TMODE: protocol_type_str = "TMODE"; break; default: if (IPMI_CHANNEL_PROTOCOL_TYPE_IS_RESERVED (channel_info_list[i].channel_protocol_type)) protocol_type_str = "Reserved"; else if (IPMI_CHANNEL_PROTOCOL_TYPE_IS_OEM (channel_info_list[i].channel_protocol_type)) protocol_type_str = "OEM"; else protocol_type_str = "unknown"; } switch (channel_info_list[i].session_support) { case IPMI_SESSION_SUPPORT_SESSION_LESS: session_support_str = "session-less"; break; case IPMI_SESSION_SUPPORT_SINGLE_SESSION: session_support_str = "single-session"; break; case IPMI_SESSION_SUPPORT_MULTI_SESSION: session_support_str = "multi-session"; break; case IPMI_SESSION_SUPPORT_SESSION_BASED: session_support_str = "session-based"; break; default: session_support_str = "unknown"; } if (!state_data->prog_data->args->get_channel_info || first_newline_output) pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, "Channel Number : %u\n", channel_info_list[i].actual_channel_number); pstdout_printf (state_data->pstate, "Medium Type : %s\n", medium_type_str); pstdout_printf (state_data->pstate, "Protocol Type : %s\n", protocol_type_str); pstdout_printf (state_data->pstate, "Active Session Count : %u\n", channel_info_list[i].active_session_count); pstdout_printf (state_data->pstate, "Session Support : %s\n", session_support_str); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (channel_info_list[i].vendor_id, iana_buf, BMC_INFO_IANA_STRING_MAX); if (ret > 0) pstdout_printf (state_data->pstate, "Vendor ID : %s (%u)\n", iana_buf, channel_info_list[i].vendor_id); else pstdout_printf (state_data->pstate, "Vendor ID : %u\n", channel_info_list[i].vendor_id); first_newline_output++; } /* don't output, we're the last output when we output "all" */ #if 0 if (!state_data->prog_data->args->get_channel_info) pstdout_printf (state_data->pstate, "\n"); #endif return (0); } static int run_cmd_args (bmc_info_state_data_t *state_data) { struct bmc_info_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (args->get_device_id) return (display_get_device_id (state_data)); if (args->get_device_guid) return (display_get_device_guid (state_data)); if (args->get_system_guid) return (display_get_system_guid (state_data)); if (args->get_system_info) return (display_system_info (state_data)); if (args->get_channel_info) return (display_channel_info (state_data)); /* else display all */ if (display_get_device_id (state_data) < 0) goto cleanup; if (display_get_device_guid (state_data) < 0) goto cleanup; if (display_get_system_guid (state_data) < 0) goto cleanup; if (display_system_info (state_data) < 0) goto cleanup; if (display_channel_info (state_data) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _bmc_info (pstdout_state_t pstate, const char *hostname, void *arg) { bmc_info_state_data_t state_data; bmc_info_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (bmc_info_prog_data_t *)arg; memset (&state_data, '\0', sizeof (bmc_info_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { bmc_info_prog_data_t prog_data; struct bmc_info_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; bmc_info_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _bmc_info, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/bmc-info/bmc-info.h0000644002055400205540000000310113527331634016611 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef BMC_INFO_H #define BMC_INFO_H #include #include "tool-cmdline-common.h" #include "pstdout.h" enum bmc_info_argp_option_keys { GET_DEVICE_ID_KEY = 160, GUID_KEY = 'g', /* legacy */ GET_DEVICE_GUID_KEY = 161, GET_SYSTEM_GUID_KEY = 162, GET_SYSTEM_INFO_KEY = 163, GET_CHANNEL_INFO_KEY = 164, INTERPRET_OEM_DATA_KEY = 165, }; struct bmc_info_arguments { struct common_cmd_args common_args; int get_device_id; int get_device_guid; int get_system_guid; int get_system_info; int get_channel_info; int interpret_oem_data; }; typedef struct bmc_info_prog_data { char *progname; struct bmc_info_arguments *args; } bmc_info_prog_data_t; typedef struct bmc_info_state_data { bmc_info_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; } bmc_info_state_data_t; #endif /* BMC_INFO_H */ freeipmi-1.6.4/bmc-info/bmc-info-argp.c0000644002055400205540000001343713527331634017550 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "bmc-info.h" #include "bmc-info-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "bmc-info - " PACKAGE_VERSION "\n" "Copyright (C) 2003-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "bmc-info - display BMC information"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, /* legacy */ { "guid", GUID_KEY, NULL, OPTION_HIDDEN, "Display only device guid.", 40}, { "get-device-id", GET_DEVICE_ID_KEY, NULL, 0, "Display only device ID information.", 41}, { "get-device-guid", GET_DEVICE_GUID_KEY, NULL, 0, "Display only device guid.", 42}, { "get-system-guid", GET_SYSTEM_GUID_KEY, NULL, 0, "Display only system guid.", 43}, { "get-system-info", GET_SYSTEM_INFO_KEY, NULL, 0, "Display only system information.", 44}, { "get-channel-info", GET_CHANNEL_INFO_KEY, NULL, 0, "Display only channel information.", 45}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 46}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct bmc_info_arguments *cmd_args; assert (state); cmd_args = state->input; switch (key) { case GET_DEVICE_ID_KEY: cmd_args->get_device_id++; break; /* legacy */ case GUID_KEY: case GET_DEVICE_GUID_KEY: cmd_args->get_device_guid++; break; case GET_SYSTEM_GUID_KEY: cmd_args->get_system_guid++; break; case GET_SYSTEM_INFO_KEY: cmd_args->get_system_info++; break; case GET_CHANNEL_INFO_KEY: cmd_args->get_channel_info++; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _bmc_info_config_file_parse (struct bmc_info_arguments *cmd_args) { struct config_file_data_bmc_info config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_bmc_info)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_BMC_INFO, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; } void bmc_info_argp_parse (int argc, char **argv, struct bmc_info_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_user (&(cmd_args->common_args)); cmd_args->get_device_id = 0; cmd_args->get_device_guid = 0; cmd_args->get_system_guid = 0; cmd_args->get_system_info = 0; cmd_args->get_channel_info = 0; cmd_args->interpret_oem_data = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _bmc_info_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); } freeipmi-1.6.4/bmc-info/bmc-info-argp.h0000644002055400205540000000157713527331634017557 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef BMC_INFO_ARGP_H #define BMC_INFO_ARGP_H #include "bmc-info.h" void bmc_info_argp_parse (int argc, char **argv, struct bmc_info_arguments *cmd_args); #endif /* BMC_INFO_ARGP_H */ freeipmi-1.6.4/bmc-device/0000755002055400205540000000000013527342546015263 5ustar00achuachu00000000000000freeipmi-1.6.4/bmc-device/Makefile.in0000644002055400205540000006743513527342443017343 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = bmc-device$(EXEEXT) subdir = bmc-device DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_bmc_device_OBJECTS = bmc_device-bmc-device.$(OBJEXT) \ bmc_device-bmc-device-argp.$(OBJEXT) bmc_device_OBJECTS = $(am_bmc_device_OBJECTS) bmc_device_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bmc_device_SOURCES) DIST_SOURCES = $(bmc_device_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bmc_device_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT bmc_device_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_device_SOURCES = \ bmc-device.c \ bmc-device.h \ bmc-device-argp.c \ bmc-device-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bmc-device/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bmc-device/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list bmc-device$(EXEEXT): $(bmc_device_OBJECTS) $(bmc_device_DEPENDENCIES) $(EXTRA_bmc_device_DEPENDENCIES) @rm -f bmc-device$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bmc_device_OBJECTS) $(bmc_device_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_device-bmc-device-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_device-bmc-device.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< bmc_device-bmc-device.o: bmc-device.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_device-bmc-device.o -MD -MP -MF $(DEPDIR)/bmc_device-bmc-device.Tpo -c -o bmc_device-bmc-device.o `test -f 'bmc-device.c' || echo '$(srcdir)/'`bmc-device.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_device-bmc-device.Tpo $(DEPDIR)/bmc_device-bmc-device.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-device.c' object='bmc_device-bmc-device.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_device-bmc-device.o `test -f 'bmc-device.c' || echo '$(srcdir)/'`bmc-device.c bmc_device-bmc-device.obj: bmc-device.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_device-bmc-device.obj -MD -MP -MF $(DEPDIR)/bmc_device-bmc-device.Tpo -c -o bmc_device-bmc-device.obj `if test -f 'bmc-device.c'; then $(CYGPATH_W) 'bmc-device.c'; else $(CYGPATH_W) '$(srcdir)/bmc-device.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_device-bmc-device.Tpo $(DEPDIR)/bmc_device-bmc-device.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-device.c' object='bmc_device-bmc-device.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_device-bmc-device.obj `if test -f 'bmc-device.c'; then $(CYGPATH_W) 'bmc-device.c'; else $(CYGPATH_W) '$(srcdir)/bmc-device.c'; fi` bmc_device-bmc-device-argp.o: bmc-device-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_device-bmc-device-argp.o -MD -MP -MF $(DEPDIR)/bmc_device-bmc-device-argp.Tpo -c -o bmc_device-bmc-device-argp.o `test -f 'bmc-device-argp.c' || echo '$(srcdir)/'`bmc-device-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_device-bmc-device-argp.Tpo $(DEPDIR)/bmc_device-bmc-device-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-device-argp.c' object='bmc_device-bmc-device-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_device-bmc-device-argp.o `test -f 'bmc-device-argp.c' || echo '$(srcdir)/'`bmc-device-argp.c bmc_device-bmc-device-argp.obj: bmc-device-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_device-bmc-device-argp.obj -MD -MP -MF $(DEPDIR)/bmc_device-bmc-device-argp.Tpo -c -o bmc_device-bmc-device-argp.obj `if test -f 'bmc-device-argp.c'; then $(CYGPATH_W) 'bmc-device-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-device-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_device-bmc-device-argp.Tpo $(DEPDIR)/bmc_device-bmc-device-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-device-argp.c' object='bmc_device-bmc-device-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_device_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_device-bmc-device-argp.obj `if test -f 'bmc-device-argp.c'; then $(CYGPATH_W) 'bmc-device-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-device-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/bmc-device/Makefile.am0000644002055400205540000000270013527331634017312 0ustar00achuachu00000000000000sbin_PROGRAMS = bmc-device bmc_device_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT bmc_device_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_device_SOURCES = \ bmc-device.c \ bmc-device.h \ bmc-device-argp.c \ bmc-device-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/bmc-device/bmc-device.c0000644002055400205540000031034213527331634017424 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "bmc-device.h" #include "bmc-device-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-sdr-cache-common.h" #include "tool-util-common.h" #include "fd.h" typedef int (*Bmc_device_system_info_first_set)(ipmi_ctx_t ctx, uint8_t set_selector, uint8_t encoding, uint8_t string_length, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); typedef int (*Bmc_device_system_info)(ipmi_ctx_t ctx, uint8_t set_selector, const void *string_block, unsigned int string_block_length, fiid_obj_t obj_cmd_rs); #define BMC_DEVICE_MIN_REARM_SENSOR_ARGS 1 #define BMC_DEVICE_MAX_REARM_SENSOR_ARGS 3 #define BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS 9 #define BMC_DEVICE_SET_SENSOR_READING_AND_EVENT_STATUS_ARGS 11 #define BMC_DEVICE_TIME_BUFLEN 512 static int cold_reset (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_cold_reset_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_cold_reset (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_cold_reset: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int warm_reset (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_warm_reset_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_warm_reset (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_warm_reset: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_self_test_results (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t self_test_result; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_self_test_results_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_self_test_results (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_self_test_results: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "self_test_result", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'self_test_result': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } self_test_result = val; if (self_test_result == IPMI_SELF_TEST_RESULT_NO_ERROR) pstdout_printf (state_data->pstate, "Self Test Result : No Error\n"); else if (self_test_result == IPMI_SELF_TEST_RESULT_SELF_TEST_FUNCTION_NOT_IMPLEMENTED_IN_THIS_CONTROLLER) pstdout_printf (state_data->pstate, "Self Test Result : Self Test function not implemented in this controller.\n"); else if (self_test_result == IPMI_SELF_TEST_RESULT_CORRUPTED_OR_INACCESSIBLE_DATA_OR_DEVICES) pstdout_printf (state_data->pstate, "Self Test Result : Corrupted or inaccessible data or devices\n"); else if (self_test_result == IPMI_SELF_TEST_RESULT_FATAL_HARDWARE_ERROR) pstdout_printf (state_data->pstate, "Self Test Result : Fatal hardware error (system should consider BMC inoperative). Controller hardware may need to be repaired or replaced.\n"); else pstdout_printf (state_data->pstate, "Self Test Result : Device-specific error: %Xh\n", self_test_result); if (self_test_result == IPMI_SELF_TEST_RESULT_CORRUPTED_OR_INACCESSIBLE_DATA_OR_DEVICES) { if (FIID_OBJ_GET (obj_cmd_rs, "controller_operation_firmware_corrupted", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'controller_operation_firmware_corrupted': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Controller operation firmware corrupted : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "controller_update_boot_block_firmware_corrupted", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'controller_update_boot_block_firmware_corrupted': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Controller update 'boot block' firmware corrupted : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "internal_use_area_of_bmc_fru_corrupted", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'internal_use_area_of_bmc_fru_corrupted': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Internal Use Area of BMC FRU corrupted : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "sdr_repository_empty", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdr_repository_empty': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "SDR Repository empty : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "ipmb_signal_lines_do_not_respond", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ipmb_signal_lines_do_not_respond': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "IPMB signal lines do not respond : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "cannot_access_bmc_fru_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'cannot_access_bmc_fru_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Cannot access BMC FRU device : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "cannot_access_sdr_repository", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'cannot_access_sdr_repository': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Cannot access SDR Repository : %s\n", val ? "failed" : "unknown"); if (FIID_OBJ_GET (obj_cmd_rs, "cannot_access_sel_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'cannot_access_sel_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Cannot access SEL device : %s\n", val ? "failed" : "unknown"); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_acpi_power_state (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t system_power_state_enumeration; uint8_t device_power_state_enumeration; uint64_t val; char *statestr = NULL; char statestrbuf[1024]; char *verbosestr = NULL; char verbosestrbuf[1024]; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_acpi_power_state_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_acpi_power_state (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_acpi_power_state: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "system_power_state_enumeration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'system_power_state_enumeration': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } system_power_state_enumeration = val; switch (system_power_state_enumeration) { case IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0: statestr = "S0/G0"; verbosestr = "working"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S1: statestr = "S1"; verbosestr = "hardware context maintained, typically equates to processor/chip set clocks stopped"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S2: statestr = "S2"; verbosestr = "typically equates to stopped clocks with processor/cache context lost"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S3: statestr = "S3"; verbosestr = "typically equates to \"suspend-to-RAM\""; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S4: statestr = "S4"; verbosestr = "typically equates to \"suspend-to-disk\""; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2: statestr = "S5/G2"; verbosestr = "soft off"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5: statestr = "S4/S5"; verbosestr = "soft off, cannot differentiate between S4 and S5"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_G3: statestr = "G3"; verbosestr = "mechanical off"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING: statestr = "SLEEPING"; verbosestr = "sleeping - cannot differentiate between S1-S3"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING: statestr = "G1 SLEEPING"; verbosestr = "sleeping - cannot differentiate between S1-S4"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE: statestr = "OVERRIDE"; verbosestr = "S5 entered by override"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON: statestr = "LEGACY_ON"; /* achu: specification text uses singular "system". I substitute in correct english. */ verbosestr = "Legacy On (indicates On for systems that don't support ACPI or have ACPI capabilities disabled:"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF: statestr = "LEGACY_OFF"; verbosestr = "Legacy Soft-Off"; break; case IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN: statestr = "UNKNOWN"; verbosestr = "power state has not been initialized, or device lost track of power state"; break; default: snprintf (statestrbuf, 1024, "UNSPECIFIED"); statestr = statestrbuf; snprintf (verbosestrbuf, 1024, "%Xh", system_power_state_enumeration); verbosestr = verbosestrbuf; break; } if (state_data->prog_data->args->verbose && verbosestr) pstdout_printf (state_data->pstate, "ACPI System Power State : %s - %s\n", statestr, verbosestr); else pstdout_printf (state_data->pstate, "ACPI System Power State : %s\n", statestr); statestr = NULL; verbosestr = NULL; if (FIID_OBJ_GET (obj_cmd_rs, "device_power_state_enumeration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'device_power_state_enumeration': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } device_power_state_enumeration = val; switch (device_power_state_enumeration) { case IPMI_ACPI_DEVICE_POWER_STATE_D0: statestr = "D0"; break; case IPMI_ACPI_DEVICE_POWER_STATE_D1: statestr = "D1"; break; case IPMI_ACPI_DEVICE_POWER_STATE_D2: statestr = "D2"; break; case IPMI_ACPI_DEVICE_POWER_STATE_D3: statestr = "D3"; break; case IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN: statestr = "UNKNOWN"; verbosestr = "power state has not been initialized, or device lost track of power state"; break; default: snprintf (statestrbuf, 1024, "UNSPECIFIED"); statestr = statestrbuf; snprintf (verbosestrbuf, 1024, "%Xh", device_power_state_enumeration); verbosestr = verbosestrbuf; break; } if (state_data->prog_data->args->verbose && verbosestr) pstdout_printf (state_data->pstate, "ACPI Device Power State : %s - %s\n", statestr, verbosestr); else pstdout_printf (state_data->pstate, "ACPI Device Power State : %s\n", statestr); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_acpi_power_state (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t system_power_state; uint8_t device_power_state; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_acpi_power_state_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } system_power_state = state_data->prog_data->args->set_acpi_power_state_args.system_power_state; device_power_state = state_data->prog_data->args->set_acpi_power_state_args.device_power_state; if (ipmi_cmd_set_acpi_power_state (state_data->ipmi_ctx, system_power_state, (system_power_state == IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE) ? IPMI_ACPI_SET_SYSTEM_POWER_STATE_DONT_SET_SYSTEM_POWER_STATE : IPMI_ACPI_SET_SYSTEM_POWER_STATE_SET_SYSTEM_POWER_STATE, device_power_state, (device_power_state == IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE) ? IPMI_ACPI_SET_DEVICE_POWER_STATE_DONT_SET_DEVICE_POWER_STATE : IPMI_ACPI_SET_DEVICE_POWER_STATE_SET_DEVICE_POWER_STATE, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_acpi_power_state: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_lan_statistics (bmc_device_state_data_t *state_data) { uint16_t ip_packets_received, received_ip_header_errors, received_ip_address_errors; uint16_t fragmented_ip_packets_received, ip_packets_transmitted, udp_packets_received; uint16_t valid_rmcp_packets_received, udp_proxy_packets_received, udp_proxy_packets_dropped; fiid_obj_t obj_cmd_rs = NULL; uint8_t lan_channel_number; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_ip_udp_rmcp_statistics_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_ip_udp_rmcp_statistics (state_data->ipmi_ctx, lan_channel_number, IPMI_DONT_CLEAR_ALL_STATISTICS, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_ip_udp_rmcp_statistics: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "ip_packets_received", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ip_packets_received': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ip_packets_received = val; pstdout_printf (state_data->pstate, "IP Packets Received : %u\n", ip_packets_received); if (FIID_OBJ_GET (obj_cmd_rs, "received_ip_header_errors", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'received_ip_header_errors': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } received_ip_header_errors = val; pstdout_printf (state_data->pstate, "Received IP Header Errors : %u\n", received_ip_header_errors); if (FIID_OBJ_GET (obj_cmd_rs, "received_ip_address_errors", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'received_ip_address_errors': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } received_ip_address_errors = val; pstdout_printf (state_data->pstate, "Received IP Address Errors : %u\n", received_ip_address_errors); if (FIID_OBJ_GET (obj_cmd_rs, "fragmented_ip_packets_received", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'fragmented_ip_packets_received': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } fragmented_ip_packets_received = val; pstdout_printf (state_data->pstate, "Fragmented IP Packets Received : %u\n", fragmented_ip_packets_received); if (FIID_OBJ_GET (obj_cmd_rs, "ip_packets_transmitted", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ip_packets_transmitted': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ip_packets_transmitted = val; pstdout_printf (state_data->pstate, "IP Packets Transmitted : %u\n", ip_packets_transmitted); if (FIID_OBJ_GET (obj_cmd_rs, "udp_packets_received", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'udp_packets_received': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } udp_packets_received = val; pstdout_printf (state_data->pstate, "UDP Packets Received : %u\n", udp_packets_received); if (FIID_OBJ_GET (obj_cmd_rs, "valid_rmcp_packets_received", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'valid_rmcp_packets_received': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } valid_rmcp_packets_received = val; pstdout_printf (state_data->pstate, "Valid RMCP Packets Received : %u\n", valid_rmcp_packets_received); if (FIID_OBJ_GET (obj_cmd_rs, "udp_proxy_packets_received", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'udp_proxy_packets_received': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } udp_proxy_packets_received = val; pstdout_printf (state_data->pstate, "UDP Proxy Packets Received : %u\n", udp_proxy_packets_received); if (FIID_OBJ_GET (obj_cmd_rs, "udp_proxy_packets_dropped", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'udp_proxy_packets_dropped': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } udp_proxy_packets_dropped = val; pstdout_printf (state_data->pstate, "UDP Proxy Packets Dropped : %u\n", udp_proxy_packets_dropped); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int clear_lan_statistics (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t lan_channel_number; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_ip_udp_rmcp_statistics_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_ip_udp_rmcp_statistics (state_data->ipmi_ctx, lan_channel_number, IPMI_CLEAR_ALL_STATISTICS, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_ip_udp_rmcp_statistics: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int parse_check_hex (bmc_device_state_data_t *state_data, char *from, char *str, unsigned int max_len_bytes) { unsigned int i; assert (state_data); assert (from); assert (str); assert (max_len_bytes); for (i = 0; from[i] != '\0'; i++) { if (i >= (max_len_bytes * 2)) { pstdout_fprintf (state_data->pstate, stderr, "invalid hex length for %s\n", str); return (-1); } if (!isxdigit (from[i])) { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for %s\n", str); return (-1); } } return (0); } static int parse_uint16 (bmc_device_state_data_t *state_data, char *from, uint16_t *to, char *str) { char *endptr; assert (state_data); assert (from); assert (to); assert (str); if (strlen (from) >= 2) { if (!strncmp (from, "0x", 2)) { if (parse_check_hex (state_data, from + 2, str, 2) < 0) return (-1); } } errno = 0; (*to) = strtol (from, &endptr, 0); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid argument for %s\n", str); return (-1); } return (0); } static int parse_hex_uint16 (bmc_device_state_data_t *state_data, char *from, uint16_t *to, char *str) { char *endptr; assert (state_data); assert (from); assert (to); assert (str); if (strlen (from) >= 2) { if (!strncmp (from, "0x", 2)) from += 2; } if (*from == '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for %s\n", str); return (-1); } if (parse_check_hex (state_data, from, str, 2) < 0) return (-1); errno = 0; (*to) = strtol (from, &endptr, 16); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for %s\n", str); return (-1); } return (0); } static int parse_int16 (bmc_device_state_data_t *state_data, char *from, int16_t *to, char *str) { char *endptr; assert (state_data); assert (from); assert (to); assert (str); if (strlen (from) >= 2) { if (!strncmp (from, "0x", 2)) { if (parse_check_hex (state_data, from + 2, str, 2) < 0) return (-1); } } errno = 0; (*to) = strtol (from, &endptr, 0); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid argument for %s\n", str); return (-1); } return (0); } static int rearm_sensor (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_rs = NULL; char *rearm_sensor_arg_cpy = NULL; char *str_args[BMC_DEVICE_MAX_REARM_SENSOR_ARGS]; unsigned int num_str_args = 0; char *str_ptr; char *lasts; uint16_t record_id; uint16_t assertion_bitmask; uint16_t deassertion_bitmask; uint16_t *assertion_bitmask_ptr; uint16_t *deassertion_bitmask_ptr; uint8_t re_arm_all_event_status_from_this_sensor; uint8_t record_type; uint8_t sensor_number; uint8_t sensor_owner_id_type = 0; uint8_t sensor_owner_id = 0; uint8_t sensor_owner_lun = 0; uint8_t channel_number = 0; uint8_t slave_address = 0; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!(rearm_sensor_arg_cpy = strdup(args->rearm_sensor_arg))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } str_ptr = strtok_r (rearm_sensor_arg_cpy, " \t\0", &lasts); while (str_ptr && num_str_args < BMC_DEVICE_MAX_REARM_SENSOR_ARGS) { str_args[num_str_args] = str_ptr; num_str_args++; str_ptr = strtok_r (NULL, " \t\0", &lasts); } if (num_str_args != BMC_DEVICE_MIN_REARM_SENSOR_ARGS && num_str_args != BMC_DEVICE_MAX_REARM_SENSOR_ARGS) { pstdout_fprintf (state_data->pstate, stderr, "Invalid number of arguments specified\n"); goto cleanup; } if (parse_uint16 (state_data, str_args[0], &record_id, "record_id") < 0) goto cleanup; if (num_str_args == BMC_DEVICE_MAX_REARM_SENSOR_ARGS) { if (parse_hex_uint16 (state_data, str_args[1], &assertion_bitmask, "assertion_bitmask") < 0) goto cleanup; if (parse_hex_uint16 (state_data, str_args[2], &deassertion_bitmask, "deassertion_bitmask") < 0) goto cleanup; re_arm_all_event_status_from_this_sensor = IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_DISABLED; assertion_bitmask_ptr = &assertion_bitmask; deassertion_bitmask_ptr = &deassertion_bitmask; } else { re_arm_all_event_status_from_this_sensor = IPMI_SENSOR_RE_ARM_ALL_EVENT_STATUS_ENABLED; assertion_bitmask_ptr = NULL; deassertion_bitmask_ptr = NULL; } if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (ipmi_sdr_cache_search_record_id (state_data->sdr_ctx, record_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { pstdout_fprintf (state_data->pstate, stderr, "Record ID points to invalid record type: %Xh\n", record_type); goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_owner_id (state_data->sdr_ctx, NULL, 0, &sensor_owner_id_type, &sensor_owner_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_owner_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_owner_lun (state_data->sdr_ctx, NULL, 0, &sensor_owner_lun, &channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_owner_lun: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } slave_address = (sensor_owner_id << 1) | sensor_owner_id_type; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_re_arm_sensor_events_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (slave_address == IPMI_SLAVE_ADDRESS_BMC) { if (ipmi_cmd_re_arm_sensor_events (state_data->ipmi_ctx, sensor_number, re_arm_all_event_status_from_this_sensor, assertion_bitmask_ptr, deassertion_bitmask_ptr, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_re_arm_sensor_events: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } else { if (ipmi_cmd_re_arm_sensor_events_ipmb (state_data->ipmi_ctx, channel_number, slave_address, sensor_owner_lun, sensor_number, re_arm_all_event_status_from_this_sensor, assertion_bitmask_ptr, deassertion_bitmask_ptr, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_re_arm_sensor_events: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } rv = 0; cleanup: free (rearm_sensor_arg_cpy); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_sdr_repository_time (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; char timestr[BMC_DEVICE_TIME_BUFLEN + 1]; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sdr_repository_time_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sdr_repository_time (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sdr_repository_time: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "time", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', BMC_DEVICE_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, BMC_DEVICE_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "SDR Repository Time : %s\n", timestr); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_sdr_repository_time (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; time_t t; struct tm tm; assert (state_data); args = state_data->prog_data->args; /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof(struct tm)); if (!strcasecmp (args->set_sdr_repository_time_arg, "now")) t = time (NULL); else { if (!strptime (args->set_sdr_repository_time_arg, "%m/%d/%Y - %H:%M:%S", &tm)) { pstdout_fprintf (state_data->pstate, stderr, "Invalid time specification '%s'.\n", args->set_sdr_repository_time_arg); goto cleanup; } /* strptime() does not set tm_isdst. Set so mktime() will not * adjust for daylight savings time. */ tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { pstdout_fprintf (state_data->pstate, stderr, "Time specification '%s' cannot be represented.\n", args->set_sdr_repository_time_arg); goto cleanup; } } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sdr_repository_time_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sdr_repository_time (state_data->ipmi_ctx, t, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sdr_repository_time: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_sel_time (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; char timestr[BMC_DEVICE_TIME_BUFLEN + 1]; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_time_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_time (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sel_time: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "time", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', BMC_DEVICE_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, BMC_DEVICE_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "SEL Time : %s\n", timestr); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_sel_time (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; time_t t; struct tm tm; assert (state_data); args = state_data->prog_data->args; /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof(struct tm)); if (!strcasecmp (args->set_sel_time_arg, "now")) t = time (NULL); else { if (!strptime (args->set_sel_time_arg, "%m/%d/%Y - %H:%M:%S", &tm)) { pstdout_fprintf (state_data->pstate, stderr, "Invalid time specification '%s'.\n", args->set_sel_time_arg); goto cleanup; } /* strptime() does not set tm_isdst. Set so mktime() will not * adjust for daylight savings time. */ tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { pstdout_fprintf (state_data->pstate, stderr, "Time specification '%s' cannot be represented.\n", args->set_sel_time_arg); goto cleanup; } } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sel_time_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sel_time (state_data->ipmi_ctx, t, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sel_time: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_sel_time_utc_offset (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int16_t offset; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_time_utc_offset_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_time_utc_offset (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sel_time_utc_offset: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "offset", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'offset': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } offset = (int16_t)val; if (offset == IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED) pstdout_printf (state_data->pstate, "SEL UTC Offset : Unspecified\n", offset); else pstdout_printf (state_data->pstate, "SEL UTC Offset : %d minutes\n", offset); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_sel_time_utc_offset (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_rs = NULL; int16_t offset; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!strcasecmp (args->set_sel_time_utc_offset_arg, "none")) offset = IPMI_SEL_TIME_UTC_OFFSET_UNSPECIFIED; else { if (parse_int16 (state_data, args->set_sel_time_utc_offset_arg, &offset, "offset") < 0) goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sel_time_utc_offset_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sel_time_utc_offset (state_data->ipmi_ctx, offset, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sel_time_utc_offset: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int parse_hex_byte (bmc_device_state_data_t *state_data, char *from, uint8_t *to, char *str) { char *endptr; assert (state_data); assert (from); assert (to); assert (str); if (strlen (from) >= 2) { if (!strncmp (from, "0x", 2)) from += 2; } if (*from == '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for %s\n", str); return (-1); } if (parse_check_hex (state_data, from, str, 1) < 0) return (-1); errno = 0; (*to) = strtol (from, &endptr, 16); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for %s\n", str); return (-1); } return (0); } static int platform_event (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_get_channel_info_rs = NULL; fiid_obj_t obj_cmd_rs = NULL; char *platform_event_arg_cpy = NULL; char *str_args[BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS]; unsigned int num_str_args = 0; char *str_ptr; char *lasts; unsigned int str_args_index = 0; uint8_t channel_medium_type; uint8_t generator_id; uint8_t *generator_id_ptr = NULL; uint8_t event_message_format_version; uint8_t sensor_type; uint8_t sensor_number; uint8_t event_type; uint8_t event_direction; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; uint64_t val; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!(platform_event_arg_cpy = strdup(args->platform_event_arg))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } str_ptr = strtok_r (platform_event_arg_cpy, " \t\0", &lasts); while (str_ptr && num_str_args < BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS) { str_args[num_str_args] = str_ptr; num_str_args++; str_ptr = strtok_r (NULL, " \t\0", &lasts); } if (num_str_args != BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS && num_str_args != (BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS - 1)) { pstdout_fprintf (state_data->pstate, stderr, "Invalid number of arguments specified\n"); goto cleanup; } if (!(obj_cmd_get_channel_info_rs = fiid_obj_create (tmpl_cmd_get_channel_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_channel_info (state_data->ipmi_ctx, IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, obj_cmd_get_channel_info_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_channel_info: %s", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_get_channel_info_rs, "channel_medium_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_medium_type': %s\n", fiid_obj_errormsg (obj_cmd_get_channel_info_rs)); goto cleanup; } channel_medium_type = val; if (channel_medium_type == IPMI_CHANNEL_MEDIUM_TYPE_SYSTEM_INTERFACE && num_str_args != BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS) { pstdout_fprintf (state_data->pstate, stderr, "Generator ID required for given system interface\n"); goto cleanup; } /* see if generator_id specified */ if (num_str_args == BMC_DEVICE_MAX_PLATFORM_EVENT_ARGS) { if (parse_hex_byte (state_data, str_args[str_args_index], &generator_id, "generator id") < 0) goto cleanup; generator_id_ptr = &generator_id; str_args_index++; } if (parse_hex_byte (state_data, str_args[str_args_index], &event_message_format_version, "event message format version") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &sensor_type, "sensor type") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &sensor_number, "sensor number") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_type, "event type") < 0) goto cleanup; str_args_index++; if (!strcasecmp (str_args[str_args_index], "assertion")) event_direction = IPMI_SEL_RECORD_ASSERTION_EVENT; else if (!strcasecmp (str_args[str_args_index], "deassertion")) event_direction = IPMI_SEL_RECORD_DEASSERTION_EVENT; else { if (parse_hex_byte (state_data, str_args[str_args_index], &event_direction, "event direction") < 0) goto cleanup; if (!IPMI_SEL_RECORD_EVENT_DIRECTION_VALID (event_direction)) { pstdout_fprintf (state_data->pstate, stderr, "invalid hex byte argument for event direction\n"); goto cleanup; } } str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data1, "event data1") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data2, "event data2") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data3, "event data3") < 0) goto cleanup; str_args_index++; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_platform_event_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_platform_event (state_data->ipmi_ctx, generator_id_ptr, event_message_format_version, sensor_type, sensor_number, event_type, event_direction, event_data1, event_data2, event_data3, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_platform_event: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: free (platform_event_arg_cpy); fiid_obj_destroy (obj_cmd_get_channel_info_rs); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_sensor_reading_and_event_status (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; fiid_obj_t obj_cmd_rs = NULL; char *set_sensor_reading_and_event_status_arg_cpy = NULL; char *str_args[BMC_DEVICE_SET_SENSOR_READING_AND_EVENT_STATUS_ARGS]; unsigned int num_str_args = 0; char *str_ptr; char *lasts; unsigned int str_args_index = 0; uint8_t sensor_number; uint8_t sensor_reading; uint8_t sensor_reading_operation; uint16_t assertion_bitmask; uint8_t assertion_bitmask_operation; uint16_t deassertion_bitmask; uint8_t deassertion_bitmask_operation; uint8_t event_data1; uint8_t event_data2; uint8_t event_data3; uint8_t event_data_operation; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!(set_sensor_reading_and_event_status_arg_cpy = strdup(args->set_sensor_reading_and_event_status_arg))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } str_ptr = strtok_r (set_sensor_reading_and_event_status_arg_cpy, " \t\0", &lasts); while (str_ptr && num_str_args < BMC_DEVICE_SET_SENSOR_READING_AND_EVENT_STATUS_ARGS) { str_args[num_str_args] = str_ptr; num_str_args++; str_ptr = strtok_r (NULL, " \t\0", &lasts); } if (num_str_args != BMC_DEVICE_SET_SENSOR_READING_AND_EVENT_STATUS_ARGS) { pstdout_fprintf (state_data->pstate, stderr, "Invalid number of arguments specified\n"); goto cleanup; } if (parse_hex_byte (state_data, str_args[str_args_index], &sensor_number, "sensor number") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &sensor_reading, "sensor reading") < 0) goto cleanup; str_args_index++; if (!strcasecmp (str_args[str_args_index], "write")) sensor_reading_operation = IPMI_SENSOR_READING_OPERATION_WRITE_GIVEN_VALUE_TO_SENSOR_READING_BYTE; else if (!strcasecmp (str_args[str_args_index], "nochange")) sensor_reading_operation = IPMI_SENSOR_READING_OPERATION_DONT_CHANGE_SENSOR_READING_BYTE; else { pstdout_fprintf (state_data->pstate, stderr, "Invalid sensor reading operation specified\n"); goto cleanup; } str_args_index++; if (parse_uint16 (state_data, str_args[str_args_index], &assertion_bitmask, "assertion bitmask") < 0) goto cleanup; str_args_index++; if (!strcasecmp (str_args[str_args_index], "clear0bits")) assertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "set1bits")) assertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "write")) assertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "nochange")) assertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS; else { pstdout_fprintf (state_data->pstate, stderr, "Invalid assertion bitmask operation specified\n"); goto cleanup; } str_args_index++; if (parse_uint16 (state_data, str_args[str_args_index], &deassertion_bitmask, "deassertion bitmask") < 0) goto cleanup; str_args_index++; if (!strcasecmp (str_args[str_args_index], "clear0bits")) deassertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_CLEAR_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "set1bits")) deassertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_SET_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "write")) deassertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_WRITE_EVENT_STATUS_BITS; else if (!strcasecmp (str_args[str_args_index], "nochange")) deassertion_bitmask_operation = IPMI_ASSERTION_DEASSERTION_EVENT_STATUS_BITS_OPERATION_DONT_CHANGE_EVENT_STATUS_BITS; else { pstdout_fprintf (state_data->pstate, stderr, "Invalid deassertion bitmask operation specified\n"); goto cleanup; } str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data1, "event data1") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data2, "event data2") < 0) goto cleanup; str_args_index++; if (parse_hex_byte (state_data, str_args[str_args_index], &event_data3, "event data3") < 0) goto cleanup; str_args_index++; if (!strcasecmp (str_args[str_args_index], "write")) event_data_operation = IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_INCLUDING_EVENT_OFFSET; else if (!strcasecmp (str_args[str_args_index], "nooffsetwrite")) event_data_operation = IPMI_EVENT_DATA_BYTES_OPERATION_WRITE_EVENT_DATA_BYTES_EXCLUDING_EVENT_OFFSET; else if (!strcasecmp (str_args[str_args_index], "nochange")) event_data_operation = IPMI_EVENT_DATA_BYTES_OPERATION_DONT_WRITE_EVENT_DATA_BYTES; else { pstdout_fprintf (state_data->pstate, stderr, "Invalid event data operation specified\n"); goto cleanup; } str_args_index++; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sensor_reading_and_event_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sensor_reading_and_event_status (state_data->ipmi_ctx, sensor_number, sensor_reading_operation, deassertion_bitmask_operation, assertion_bitmask_operation, event_data_operation, sensor_reading, assertion_bitmask, deassertion_bitmask, event_data1, event_data2, event_data3, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sensor_reading_and_event_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: free (set_sensor_reading_and_event_status_arg_cpy); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_mca_auxiliary_log_status (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; fiid_obj_t mca_obj_cmd_rs = NULL; uint32_t mca_log_entry_count; uint64_t val; char timestr[BMC_DEVICE_TIME_BUFLEN + 1]; int rv = -1; time_t t; struct tm tm; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_auxiliary_log_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_auxiliary_log_status (state_data->ipmi_ctx, IPMI_AUXILIARY_LOG_TYPE_MCA, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_auxiliary_log_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!(mca_obj_cmd_rs = fiid_obj_copy (obj_cmd_rs, tmpl_cmd_get_auxiliary_log_status_mca_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_copy: %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (FIID_OBJ_GET (mca_obj_cmd_rs, "timestamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'timestamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', BMC_DEVICE_TIME_BUFLEN + 1); /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof(struct tm)); t = val; localtime_r (&t, &tm); strftime (timestr, sizeof (timestr), "%m/%d/%Y - %H:%M:%S", &tm); pstdout_printf (state_data->pstate, "Last Entry Added to MCA Log : %s\n", timestr); if (FIID_OBJ_GET (mca_obj_cmd_rs, "mca_log_entry_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mca_log_entry_count': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } mca_log_entry_count = val; pstdout_printf (state_data->pstate, "Number of entries in MCA log : %u\n", mca_log_entry_count); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); fiid_obj_destroy (mca_obj_cmd_rs); return (rv); } static int get_ssif_interface_capabilities (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t ssif_version; uint8_t pec_support; uint8_t transaction_support; uint8_t input_message_size; uint8_t output_message_size; uint64_t val; char *str; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_interface_capabilities_ssif_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_interface_capabilities_ssif (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_interface_capabilities_ssif: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "ssif_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ssif_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ssif_version = val; /* achu: for some stupid reason 000b == "version 1" */ if (ssif_version == IPMI_SSIF_SYSTEM_INTERFACE_VERSION_1) pstdout_printf (state_data->pstate, "SSIF Version : version 1 (%Xh)\n", ssif_version); else pstdout_printf (state_data->pstate, "SSIF Version : %Xh\n", ssif_version); if (FIID_OBJ_GET (obj_cmd_rs, "pec_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pec_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pec_support = val; if (pec_support == IPMI_SSIF_SYSTEM_INTERFACE_IMPLEMENTS_PEC) str = "Yes"; else if (pec_support == IPMI_SSIF_SYSTEM_INTERFACE_DOES_NOT_SUPPORT_PEC) str = "No"; else str = "unknown"; pstdout_printf (state_data->pstate, "SSIF PEC Support : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "transaction_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'transaction_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } transaction_support = val; if (transaction_support == IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_SINGLE_PART_READS_WRITES_SUPPORTED) str = "Only single-part reads/writes supported."; else if (transaction_support == IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_AND_END_ONLY) str = "multi-part reads/writes upported. Start and End transactions only."; else if (transaction_support == IPMI_SSIF_SYSTEM_INTERFACE_TRANSACTION_SUPPORT_MULTI_PART_READS_WRITES_SUPPORTED_START_MIDDLE_END) str = "multi-part reads/writes upported. Start, Middle, and End transactions supported."; else str = "unknown"; pstdout_printf (state_data->pstate, "SSIF Transaction Support : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "input_message_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'input_message_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } input_message_size = val; pstdout_printf (state_data->pstate, "SSIF Maximum Input Message Size : %u bytes\n", input_message_size); if (FIID_OBJ_GET (obj_cmd_rs, "output_message_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'output_message_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } output_message_size = val; pstdout_printf (state_data->pstate, "SSIF Maximum Output Message Size : %u bytes\n", output_message_size); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_kcs_interface_capabilities (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t system_interface_version; uint8_t input_maximum_message_size; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_interface_capabilities_kcs_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_interface_capabilities_kcs (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_interface_capabilities_kcs: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "system_interface_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'system_interface_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } system_interface_version = val; /* achu: for some stupid reason 000b == "version 1" */ if (system_interface_version == IPMI_KCS_SYSTEM_INTERFACE_VERSION_1) pstdout_printf (state_data->pstate, "KCS Version : version 1 (%Xh)\n", system_interface_version); else pstdout_printf (state_data->pstate, "KCS Version : %Xh\n", system_interface_version); if (FIID_OBJ_GET (obj_cmd_rs, "input_maximum_message_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'input_maximum_message_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } input_maximum_message_size = val; pstdout_printf (state_data->pstate, "KCS Maximum Input Message Size : %u bytes\n", input_maximum_message_size); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_bt_interface_capabilities (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t number_of_outstanding_requests_supported; uint8_t input_buffer_size; uint8_t output_buffer_size; uint8_t bmc_request_to_response_time; uint8_t recommended_retries; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_bt_interface_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_bt_interface_capabilities (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_bt_interface_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_outstanding_requests_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_outstanding_requests_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_outstanding_requests_supported = val; pstdout_printf (state_data->pstate, "BT Number of Outstanding Requests Supported : %u\n", number_of_outstanding_requests_supported); if (FIID_OBJ_GET (obj_cmd_rs, "input_buffer_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'input_buffer_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } input_buffer_size = val; pstdout_printf (state_data->pstate, "BT Input Buffer Size : %u bytes\n", input_buffer_size); if (FIID_OBJ_GET (obj_cmd_rs, "output_buffer_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'output_buffer_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } output_buffer_size = val; pstdout_printf (state_data->pstate, "BT Output Buffer Size : %u bytes\n", output_buffer_size); if (FIID_OBJ_GET (obj_cmd_rs, "bmc_request_to_response_time", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bmc_request_to_response_time': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bmc_request_to_response_time = val; pstdout_printf (state_data->pstate, "BT Request to Response Time : %u seconds\n", bmc_request_to_response_time); if (FIID_OBJ_GET (obj_cmd_rs, "recommended_retries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'recommended_retries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } recommended_retries = val; pstdout_printf (state_data->pstate, "BT Recommended Retries : %u\n", recommended_retries); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_bmc_global_enables (bmc_device_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_bmc_global_enables_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_bmc_global_enables (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_bmc_global_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "receive_message_queue_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'receive_message_queue_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Receive Message Queue Interrupt : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "event_message_buffer_full_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_message_buffer_full_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Event Message Buffer Full : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "event_message_buffer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_message_buffer': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Event Message Buffer : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "system_event_logging", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'system_event_logging': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "System Event Logging : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "oem_0", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_0': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "OEM 0 : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "oem_1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "OEM 1 : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); if (FIID_OBJ_GET (obj_cmd_rs, "oem_2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "OEM 2 : %s\n", (val == IPMI_BMC_GLOBAL_ENABLES_ENABLED) ? "enabled" : "disabled"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_system_info_common (bmc_device_state_data_t *state_data, Bmc_device_system_info_first_set func_cmd_first_set, const char *func_cmd_first_set_str, Bmc_device_system_info func_cmd, const char *func_cmd_str, const char *string) { fiid_obj_t obj_cmd_first_set_rs = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t string_length = 0; uint8_t string_block_length = 0; uint8_t set_selector = 0; unsigned int string_count = 0; int rv = -1; assert (state_data); assert (func_cmd_first_set); assert (func_cmd_first_set_str); assert (func_cmd); assert (func_cmd_str); assert (state_data); assert (string); assert (strlen (string) <= IPMI_SYSTEM_INFO_STRING_LEN_MAX); if (!(obj_cmd_first_set_rs = fiid_obj_create (tmpl_cmd_set_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } string_length = strlen (string); if (string_length > IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX) string_block_length = IPMI_SYSTEM_INFO_FIRST_SET_STRING_LEN_MAX; else string_block_length = string_length; if (func_cmd_first_set (state_data->ipmi_ctx, set_selector, IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1, string_length, string + string_count, string_block_length, obj_cmd_first_set_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", func_cmd_first_set_str, ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } string_count += string_block_length; /* string_length is 8 bits, so we should not call >= 17 times, * * ceiling ( (255 - 14) / 16 ) + 1 = 17 * */ set_selector++; while (string_count < string_length && set_selector < 17) { if ((string_length - string_count) > IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX) string_block_length = IPMI_SYSTEM_INFO_SET_STRING_LEN_MAX; else string_block_length = string_length - string_count; if (func_cmd (state_data->ipmi_ctx, set_selector, string + string_count, string_block_length, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", func_cmd_str, ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } string_count += string_block_length; set_selector++; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_first_set_rs); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_system_firmware_version (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_system_firmware_version_first_set, "ipmi_cmd_set_system_info_parameters_system_firmware_version_first_set", ipmi_cmd_set_system_info_parameters_system_firmware_version, "ipmi_cmd_set_system_info_parameters_system_firmware_version", state_data->prog_data->args->set_system_firmware_version_arg)); } static int set_system_name (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_system_name_first_set, "ipmi_cmd_set_system_info_parameters_system_name_first_set", ipmi_cmd_set_system_info_parameters_system_name, "ipmi_cmd_set_system_info_parameters_system_name", state_data->prog_data->args->set_system_name_arg)); } static int set_primary_operating_system_name (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_primary_operating_system_name_first_set, "ipmi_cmd_set_system_info_parameters_primary_operating_system_name_first_set", ipmi_cmd_set_system_info_parameters_primary_operating_system_name, "ipmi_cmd_set_system_info_parameters_primary_operating_system_name", state_data->prog_data->args->set_primary_operating_system_name_arg)); } static int set_operating_system_name (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_operating_system_name_first_set, "ipmi_cmd_set_system_info_parameters_operating_system_name_first_set", ipmi_cmd_set_system_info_parameters_operating_system_name, "ipmi_cmd_set_system_info_parameters_operating_system_name", state_data->prog_data->args->set_operating_system_name_arg)); } static int set_present_os_version_number (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_present_os_version_number_first_set, "ipmi_cmd_set_system_info_parameters_present_os_version_number_first_set", ipmi_cmd_set_system_info_parameters_present_os_version_number, "ipmi_cmd_set_system_info_parameters_present_os_version_number", state_data->prog_data->args->set_present_os_version_number_arg)); } static int set_bmc_url (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_bmc_url_first_set, "ipmi_cmd_set_system_info_parameters_bmc_url_first_set", ipmi_cmd_set_system_info_parameters_bmc_url, "ipmi_cmd_set_system_info_parameters_bmc_url", state_data->prog_data->args->set_bmc_url_arg)); } static int set_base_os_hypervisor_url (bmc_device_state_data_t *state_data) { assert (state_data); return (set_system_info_common (state_data, ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set, "ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url_first_set", ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url, "ipmi_cmd_set_system_info_parameters_base_os_hypervisor_url", state_data->prog_data->args->set_base_os_hypervisor_url_arg)); } static int read_fru (bmc_device_state_data_t *state_data) { uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX]; unsigned int area_type = 0; unsigned int area_length = 0; unsigned int flags = 0; int fd = -1; int rv = -1; assert (state_data); if (!(state_data->fru_ctx = ipmi_fru_ctx_create (state_data->ipmi_ctx))) { pstdout_perror (state_data->pstate, "ipmi_fru_ctx_create()"); goto cleanup; } if (state_data->prog_data->args->common_args.debug) flags |= IPMI_FRU_FLAGS_DEBUG_DUMP; /* Don't care about checksum checks now */ flags |= IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS; flags |= IPMI_FRU_FLAGS_READ_RAW; if (ipmi_fru_ctx_set_flags (state_data->fru_ctx, flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_set_flags: %s\n", ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (state_data->fru_ctx))); goto cleanup; } if (ipmi_fru_open_device_id (state_data->fru_ctx, state_data->prog_data->args->device_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_open_device_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (ipmi_fru_read_data_area (state_data->fru_ctx, &area_type, &area_length, areabuf, IPMI_FRU_AREA_SIZE_MAX) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_read_data_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (area_type != IPMI_FRU_AREA_TYPE_RAW_DATA) { pstdout_printf (state_data->pstate, "FRU Error: Invalid area type returned\n"); goto out; } if (area_length) { if ((fd = open (state_data->prog_data->args->read_fru_filename, O_CREAT | O_WRONLY, 0600)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "Cannot open '%s': %s\n", state_data->prog_data->args->read_fru_filename, strerror (errno)); goto out; } if (fd_write_n (fd, areabuf, area_length) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fd_write_n: %s\n", strerror (errno)); goto out; } } else { pstdout_printf (state_data->pstate, "FRU Error: FRU area is zero length\n"); goto out; } /* Close of fru_ctx in run_cmd_args */ out: rv = 0; cleanup: ipmi_fru_close_device_id (state_data->fru_ctx); close (fd); return (rv); } static int write_fru (bmc_device_state_data_t *state_data) { uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX]; fiid_obj_t fru_get_inventory_rs = NULL; fiid_obj_t obj_cmd_rs = NULL; struct stat sbuf; unsigned int area_size; unsigned int area_offset = 0; unsigned int blocksize = 16; ssize_t len; int fd = -1; int rv = -1; int loop_errors = 0; int loop_errors_max = 5; /* arbitrarily selected */ unsigned int percent = 0; uint64_t val; assert (state_data); if (stat (state_data->prog_data->args->write_fru_filename, &sbuf) < 0) { pstdout_fprintf (state_data->pstate, stderr, "Cannot stat '%s': %s\n", state_data->prog_data->args->write_fru_filename, strerror (errno)); goto cleanup; } if (!sbuf.st_size) { pstdout_fprintf (state_data->pstate, stderr, "FRU file '%s' is empty\n", state_data->prog_data->args->write_fru_filename); goto cleanup; } if (!(fru_get_inventory_rs = fiid_obj_create (tmpl_cmd_get_fru_inventory_area_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_fru_inventory_area_info (state_data->ipmi_ctx, state_data->prog_data->args->device_id, fru_get_inventory_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_fru_inventory_area_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (fru_get_inventory_rs, "fru_inventory_area_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'fru_inventory_area_size': %s\n", fiid_obj_errormsg (fru_get_inventory_rs)); goto cleanup; } area_size = val; if (area_size != sbuf.st_size) { pstdout_fprintf (state_data->pstate, stderr, "FRU file '%s': size (%u) does not match area size (%u)\n", sbuf.st_size, area_size); goto cleanup; } if ((fd = open (state_data->prog_data->args->write_fru_filename, O_RDONLY)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "Cannot open '%s': %s\n", state_data->prog_data->args->write_fru_filename, strerror (errno)); goto cleanup; } if ((len = fd_read_n (fd, areabuf, area_size)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fd_read_n: %s\n", strerror (errno)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_write_fru_data_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (state_data->prog_data->args->verbose) fprintf (stderr, "%u%%\r", percent); while (area_offset < area_size) { unsigned int count_written; if ((area_size - area_offset) < blocksize) blocksize = area_size - area_offset; if (ipmi_cmd_write_fru_data (state_data->ipmi_ctx, state_data->prog_data->args->device_id, area_offset, areabuf + area_offset, blocksize, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { /* Assume blocksize is too large */ if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_CANNOT_RETURN_REQUESTED_NUMBER_OF_BYTES) == 1) { if (!(blocksize <= 8)) blocksize /= 2; else goto error_out; } if (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_WRITE_FRU_DATA_FRU_DEVICE_BUSY) == 1) { loop_errors++; if (loop_errors > loop_errors_max) goto error_out; } continue; } error_out: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_write_fru_data: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "count_written", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'count_written': %s\n", fiid_obj_errormsg (fru_get_inventory_rs)); goto cleanup; } count_written = val; area_offset += count_written; if (state_data->prog_data->args->verbose) { unsigned int newpercent = (unsigned int)(((double)area_offset/area_size) * 100); if (newpercent > percent) { percent = newpercent; fprintf (stderr, "%u%%\r", percent); } } } if (state_data->prog_data->args->verbose) fprintf (stderr, "100%%\r\n"); rv = 0; cleanup: fiid_obj_destroy (fru_get_inventory_rs); fiid_obj_destroy (obj_cmd_rs); close (fd); return (rv); } static int run_cmd_args (bmc_device_state_data_t *state_data) { struct bmc_device_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; assert (!args->common_args.flush_cache); if (args->cold_reset) return (cold_reset (state_data)); if (args->warm_reset) return (warm_reset (state_data)); if (args->get_self_test_results) return (get_self_test_results (state_data)); if (args->get_acpi_power_state) return (get_acpi_power_state (state_data)); if (args->set_acpi_power_state) return (set_acpi_power_state (state_data)); if (args->get_lan_statistics) return (get_lan_statistics (state_data)); if (args->clear_lan_statistics) return (clear_lan_statistics (state_data)); if (args->rearm_sensor) return (rearm_sensor (state_data)); if (args->get_sdr_repository_time) return (get_sdr_repository_time (state_data)); if (args->set_sdr_repository_time) return (set_sdr_repository_time (state_data)); if (args->get_sel_time) return (get_sel_time (state_data)); if (args->set_sel_time) return (set_sel_time (state_data)); if (args->get_sel_time_utc_offset) return (get_sel_time_utc_offset (state_data)); if (args->set_sel_time_utc_offset) return (set_sel_time_utc_offset (state_data)); if (args->platform_event) return (platform_event (state_data)); if (args->set_sensor_reading_and_event_status) return (set_sensor_reading_and_event_status (state_data)); if (args->get_mca_auxiliary_log_status) return (get_mca_auxiliary_log_status (state_data)); if (args->get_ssif_interface_capabilities) return (get_ssif_interface_capabilities (state_data)); if (args->get_kcs_interface_capabilities) return (get_kcs_interface_capabilities (state_data)); if (args->get_bt_interface_capabilities) return (get_bt_interface_capabilities (state_data)); if (args->get_bmc_global_enables) return (get_bmc_global_enables (state_data)); if (args->set_system_firmware_version) return (set_system_firmware_version (state_data)); if (args->set_system_name) return (set_system_name (state_data)); if (args->set_primary_operating_system_name) return (set_primary_operating_system_name (state_data)); if (args->set_operating_system_name) return (set_operating_system_name (state_data)); if (args->set_present_os_version_number) return (set_present_os_version_number (state_data)); if (args->set_bmc_url) return (set_bmc_url (state_data)); if (args->set_base_os_hypervisor_url) return (set_base_os_hypervisor_url (state_data)); if (args->read_fru) return (read_fru (state_data)); if (args->write_fru) return (write_fru (state_data)); rv = 0; return (rv); } static int _bmc_device (pstdout_state_t pstate, const char *hostname, void *arg) { bmc_device_state_data_t state_data; bmc_device_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (bmc_device_prog_data_t *)arg; if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (bmc_device_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; state_data.hostname = (char *)hostname; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_fru_ctx_destroy (state_data.fru_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { bmc_device_prog_data_t prog_data; struct bmc_device_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; bmc_device_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* Handle special case exceptions */ if (prog_data.args->read_fru && hosts_count > 1) { fprintf (stderr, "Cannot execute --read-fru on multiple hosts\n"); return (EXIT_FAILURE); } if (prog_data.args->write_fru && hosts_count > 1 && prog_data.args->verbose > 0) { fprintf (stderr, "Cannot execute --write-fru w/ verbosity on multiple hosts, setting verbosity to 0\n"); prog_data.args->verbose = 0; } /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _bmc_device, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/bmc-device/bmc-device.h0000644002055400205540000001023713527331634017431 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef BMC_DEVICE_H #define BMC_DEVICE_H #include #include "tool-cmdline-common.h" #include "pstdout.h" enum bmc_device_argp_option_keys { COLD_RESET_KEY = 160, WARM_RESET_KEY = 161, GET_SELF_TEST_RESULTS_KEY = 162, GET_ACPI_POWER_STATE_KEY = 163, SET_ACPI_POWER_STATE_KEY = 164, GET_LAN_STATISTICS_KEY = 165, CLEAR_LAN_STATISTICS_KEY = 166, REARM_SENSOR_KEY = 167, GET_SDR_REPOSITORY_TIME_KEY = 168, SET_SDR_REPOSITORY_TIME_KEY = 169, GET_SEL_TIME_KEY = 170, SET_SEL_TIME_KEY = 171, GET_SEL_TIME_UTC_OFFSET_KEY = 172, SET_SEL_TIME_UTC_OFFSET_KEY = 173, PLATFORM_EVENT_KEY = 174, SET_SENSOR_READING_AND_EVENT_STATUS_KEY = 175, GET_MCA_AUXILIARY_LOG_STATUS_KEY = 176, GET_SSIF_INTERFACE_CAPABILITIES_KEY = 177, GET_KCS_INTERFACE_CAPABILITIES_KEY = 178, GET_BT_INTERFACE_CAPABILITIES_KEY = 179, GET_BMC_GLOBAL_ENABLES_KEY = 180, SET_SYSTEM_FIRMWARE_VERSION_KEY = 181, SET_SYSTEM_NAME_KEY = 182, SET_PRIMARY_OPERATING_SYSTEM_NAME_KEY = 183, SET_OPERATING_SYSTEM_NAME_KEY = 184, SET_PRESENT_OS_VERSION_NUMBER_KEY = 185, SET_BMC_URL_KEY = 186, SET_BASE_OS_HYPERVISOR_URL_KEY = 187, READ_FRU_KEY = 188, WRITE_FRU_KEY = 189, DEVICE_ID_KEY = 190, VERBOSE_KEY = 191, }; enum bmc_device_set_acpi_power_state_options { SET_ACPI_SYSTEM_POWER_STATE_KEY = 200, SET_ACPI_DEVICE_POWER_STATE_KEY = 201, }; #define SYSTEM_INFO_STRING_MAX 255 struct bmc_device_set_acpi_power_state { uint8_t system_power_state; uint8_t device_power_state; }; struct bmc_device_arguments { struct common_cmd_args common_args; int cold_reset; int warm_reset; int get_self_test_results; int get_acpi_power_state; int set_acpi_power_state; struct bmc_device_set_acpi_power_state set_acpi_power_state_args; int get_lan_statistics; int clear_lan_statistics; int rearm_sensor; char *rearm_sensor_arg; int get_sdr_repository_time; int set_sdr_repository_time; char *set_sdr_repository_time_arg; int get_sel_time; int set_sel_time; char *set_sel_time_arg; int get_sel_time_utc_offset; int set_sel_time_utc_offset; char *set_sel_time_utc_offset_arg; int platform_event; char *platform_event_arg; int set_sensor_reading_and_event_status; char *set_sensor_reading_and_event_status_arg; int get_mca_auxiliary_log_status; int get_ssif_interface_capabilities; int get_kcs_interface_capabilities; int get_bt_interface_capabilities; int get_bmc_global_enables; int set_system_firmware_version; char *set_system_firmware_version_arg; int set_system_name; char *set_system_name_arg; int set_primary_operating_system_name; char *set_primary_operating_system_name_arg; int set_operating_system_name; char *set_operating_system_name_arg; int set_present_os_version_number; char *set_present_os_version_number_arg; int set_bmc_url; char *set_bmc_url_arg; int set_base_os_hypervisor_url; char *set_base_os_hypervisor_url_arg; int read_fru; char *read_fru_filename; int write_fru; char *write_fru_filename; uint8_t device_id; int device_id_set; int verbose; }; typedef struct bmc_device_prog_data { char *progname; struct bmc_device_arguments *args; } bmc_device_prog_data_t; typedef struct bmc_device_state_data { bmc_device_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; char *hostname; ipmi_sdr_ctx_t sdr_ctx; ipmi_fru_ctx_t fru_ctx; } bmc_device_state_data_t; #endif /* BMC_DEVICE_H */ freeipmi-1.6.4/bmc-device/bmc-device-argp.c0000644002055400205540000006174113527331634020361 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "bmc-device.h" #include "bmc-device-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "bmc-device - " PACKAGE_VERSION "\n" "Copyright (C) 2008-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "bmc-device - perform advanced BMC commands"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "cold-reset", COLD_RESET_KEY, NULL, 0, "Perform a cold reset.", 40}, { "warm-reset", WARM_RESET_KEY, NULL, 0, "Perform a warm reset.", 41}, { "get-self-test-results", GET_SELF_TEST_RESULTS_KEY, NULL, 0, "Output BMC self test results.", 42}, { "get-acpi-power-state", GET_ACPI_POWER_STATE_KEY, NULL, 0, "Get ACPI system and device power state.", 43}, { "set-acpi-power-state", SET_ACPI_POWER_STATE_KEY, NULL, 0, "Set ACPI power state.", 44}, { "set-acpi-system-power-state", SET_ACPI_SYSTEM_POWER_STATE_KEY, "SYSTEM_POWER_STATE", 0, "Set ACPI system power state.", 45}, { "set-acpi-device-power-state", SET_ACPI_DEVICE_POWER_STATE_KEY, "DEVICE_POWER_STATE", 0, "Set ACPI device power state.", 46}, { "get-lan-statistics", GET_LAN_STATISTICS_KEY, NULL, 0, "Get IP, UDP, and RMCP statistics.", 47}, { "clear-lan-statistics", CLEAR_LAN_STATISTICS_KEY, NULL, 0, "Clear IP, UDP, and RMCP statistics.", 48}, { "rearm-sensor", REARM_SENSOR_KEY, " [ ]", 0, "Re-arm a sensor.", 49}, { "get-sdr-repository-time", GET_SDR_REPOSITORY_TIME_KEY, 0, 0, "Get SDR repository time.", 50}, { "set-sdr-repository-time", SET_SDR_REPOSITORY_TIME_KEY, "TIME", 0, "Set SDR repository time. Input format = \"MM/DD/YYYY - HH:MM:SS\" or \"now\".", 51}, { "get-sel-time", GET_SEL_TIME_KEY, 0, 0, "Get SEL time.", 52}, { "set-sel-time", SET_SEL_TIME_KEY, "TIME", 0, "Set SEL time. Input format = \"MM/DD/YYYY - HH:MM:SS\" or \"now\".", 53}, { "get-sel-time-utc-offset", GET_SEL_TIME_UTC_OFFSET_KEY, 0, 0, "Get SEL time UTC offset.", 53}, { "set-sel-time-utc-offset", SET_SEL_TIME_UTC_OFFSET_KEY, "OFFSET", 0, "Set SEL time UTC offset. Offset in minutes or \"none\".", 54}, { "platform-event", PLATFORM_EVENT_KEY, "[generator_id] ", 0, "Instruct the BMC to process the specified event data.", 54}, { "set-sensor-reading-and-event-status", SET_SENSOR_READING_AND_EVENT_STATUS_KEY, " ", 0, "Instruct the BMC to set a sensor reading and/or event status.", 55}, { "get-mca-auxiliary-log-status", GET_MCA_AUXILIARY_LOG_STATUS_KEY, NULL, 0, "Get machine check architecture (MCA) auxiliary log status information.", 56}, { "get-ssif-interface-capabilities", GET_SSIF_INTERFACE_CAPABILITIES_KEY, NULL, 0, "Get SSIF interface capabilities.", 57}, { "get-kcs-interface-capabilities", GET_KCS_INTERFACE_CAPABILITIES_KEY, NULL, 0, "Get KCS interface capabilities.", 58}, { "get-bt-interface-capabilities", GET_BT_INTERFACE_CAPABILITIES_KEY, NULL, 0, "Get BT interface capabilities.", 59}, { "get-bmc-global-enables", GET_BMC_GLOBAL_ENABLES_KEY, NULL, 0, "Get BMC Global Enables.", 60}, { "set-system-firmware-version", SET_SYSTEM_FIRMWARE_VERSION_KEY, "STRING", 0, "Set System Firmware Version.", 61}, { "set-system-name", SET_SYSTEM_NAME_KEY, "STRING", 0, "Set System Name.", 62}, { "set-primary-operating-system-name", SET_PRIMARY_OPERATING_SYSTEM_NAME_KEY, "STRING", 0, "Set Primary Operating System Name.", 63}, { "set-operating-system-name", SET_OPERATING_SYSTEM_NAME_KEY, "STRING", 0, "Set Operating System Name.", 64}, { "set-present-os-version-number", SET_PRESENT_OS_VERSION_NUMBER_KEY, "STRING", 0, "Set Present Operating System Version Number.", 65}, { "set-bmc-url", SET_BMC_URL_KEY, "STRING", 0, "Set BMC URL.", 66}, { "set-base-os-hypervisor-url", SET_BASE_OS_HYPERVISOR_URL_KEY, "STRING", 0, "Set Base OS/Hypervisor URL.", 67}, { "read-fru", READ_FRU_KEY, "FILENAME", 0, "Read FRU device ID into specified filename.", 68}, { "write-fru", WRITE_FRU_KEY, "FILENAME", 0, "Write specified filename into FRU device ID", 69}, { "device-id", DEVICE_ID_KEY, "IDNUM", 0, "Specify device-id for --read-fru or --write-fru.", 70}, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output.", 71}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct bmc_device_arguments *cmd_args; char *endptr; int tmp; assert (state); cmd_args = state->input; switch (key) { case COLD_RESET_KEY: cmd_args->cold_reset++; break; case WARM_RESET_KEY: cmd_args->warm_reset++; break; case GET_SELF_TEST_RESULTS_KEY: cmd_args->get_self_test_results++; break; case GET_ACPI_POWER_STATE_KEY: cmd_args->get_acpi_power_state++; break; case SET_ACPI_POWER_STATE_KEY: cmd_args->set_acpi_power_state++; break; case SET_ACPI_SYSTEM_POWER_STATE_KEY: if (!strcasecmp (arg, "S0") /* acceptable here */ || !strcasecmp (arg, "G0") /* acceptable here */ || !strcasecmp (arg, "S0_G0") || !strcasecmp (arg, "S0/G0")) /* just in case */ cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S0_G0; else if (!strcasecmp (arg, "S1")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S1; else if (!strcasecmp (arg, "S2")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S2; else if (!strcasecmp (arg, "S3")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S3; else if (!strcasecmp (arg, "S4")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S4; else if (!strcasecmp (arg, "G2") /* acceptable here */ || !strcasecmp (arg, "S5_G2") || !strcasecmp (arg, "S5/G2")) /* just in case */ cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S5_G2; else if (!strcasecmp (arg, "S4_S5") || !strcasecmp (arg, "S4/S5")) /* just in case */ cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_S4_S5; else if (!strcasecmp (arg, "G3")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_G3; else if (!strcasecmp (arg, "SLEEPING")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_SLEEPING; else if (!strcasecmp (arg, "G1_SLEEPING")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_G1_SLEEPING; else if (!strcasecmp (arg, "OVERRIDE")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_OVERRIDE; else if (!strcasecmp (arg, "LEGACY_ON")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_ON; else if (!strcasecmp (arg, "LEGACY_OFF")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_LEGACY_OFF; else if (!strcasecmp (arg, "UNKNOWN")) cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_UNKNOWN; else { fprintf (stderr, "invalid value for system power state\n"); exit (EXIT_FAILURE); } break; case SET_ACPI_DEVICE_POWER_STATE_KEY: if (!strcasecmp (arg, "D0")) cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_D0; else if (!strcasecmp (arg, "D1")) cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_D1; else if (!strcasecmp (arg, "D2")) cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_D2; else if (!strcasecmp (arg, "D3")) cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_D3; else if (!strcasecmp (arg, "UNKNOWN")) cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_UNKNOWN; else { fprintf (stderr, "invalid value for device power state\n"); exit (EXIT_FAILURE); } break; case GET_LAN_STATISTICS_KEY: cmd_args->get_lan_statistics++; break; case CLEAR_LAN_STATISTICS_KEY: cmd_args->clear_lan_statistics++; break; case REARM_SENSOR_KEY: cmd_args->rearm_sensor = 1; cmd_args->rearm_sensor_arg = arg; break; case GET_SDR_REPOSITORY_TIME_KEY: cmd_args->get_sdr_repository_time = 1; break; case SET_SDR_REPOSITORY_TIME_KEY: cmd_args->set_sdr_repository_time = 1; cmd_args->set_sdr_repository_time_arg = arg; break; case GET_SEL_TIME_KEY: cmd_args->get_sel_time = 1; break; case SET_SEL_TIME_KEY: cmd_args->set_sel_time = 1; cmd_args->set_sel_time_arg = arg; break; case GET_SEL_TIME_UTC_OFFSET_KEY: cmd_args->get_sel_time_utc_offset = 1; break; case SET_SEL_TIME_UTC_OFFSET_KEY: cmd_args->set_sel_time_utc_offset = 1; cmd_args->set_sel_time_utc_offset_arg = arg; break; case PLATFORM_EVENT_KEY: cmd_args->platform_event = 1; cmd_args->platform_event_arg = arg; break; case SET_SENSOR_READING_AND_EVENT_STATUS_KEY: cmd_args->set_sensor_reading_and_event_status = 1; cmd_args->set_sensor_reading_and_event_status_arg = arg; break; case GET_MCA_AUXILIARY_LOG_STATUS_KEY: cmd_args->get_mca_auxiliary_log_status = 1; break; case GET_SSIF_INTERFACE_CAPABILITIES_KEY: cmd_args->get_ssif_interface_capabilities = 1; break; case GET_KCS_INTERFACE_CAPABILITIES_KEY: cmd_args->get_kcs_interface_capabilities = 1; break; case GET_BT_INTERFACE_CAPABILITIES_KEY: cmd_args->get_bt_interface_capabilities = 1; break; case GET_BMC_GLOBAL_ENABLES_KEY: cmd_args->get_bmc_global_enables = 1; break; case SET_SYSTEM_FIRMWARE_VERSION_KEY: cmd_args->set_system_firmware_version = 1; cmd_args->set_system_firmware_version_arg = arg; break; case SET_SYSTEM_NAME_KEY: cmd_args->set_system_name = 1; cmd_args->set_system_name_arg = arg; break; case SET_PRIMARY_OPERATING_SYSTEM_NAME_KEY: cmd_args->set_primary_operating_system_name = 1; cmd_args->set_primary_operating_system_name_arg = arg; break; case SET_OPERATING_SYSTEM_NAME_KEY: cmd_args->set_operating_system_name = 1; cmd_args->set_operating_system_name_arg = arg; break; case SET_PRESENT_OS_VERSION_NUMBER_KEY: cmd_args->set_present_os_version_number = 1; cmd_args->set_present_os_version_number_arg = arg; break; case SET_BMC_URL_KEY: cmd_args->set_bmc_url = 1; cmd_args->set_bmc_url_arg = arg; break; case SET_BASE_OS_HYPERVISOR_URL_KEY: cmd_args->set_base_os_hypervisor_url = 1; cmd_args->set_base_os_hypervisor_url_arg = arg; break; case READ_FRU_KEY: cmd_args->read_fru = 1; cmd_args->read_fru_filename = arg; break; case WRITE_FRU_KEY: cmd_args->write_fru = 1; cmd_args->write_fru_filename = arg; break; case DEVICE_ID_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid device id\n"); exit (EXIT_FAILURE); } if (tmp == IPMI_FRU_DEVICE_ID_RESERVED || tmp < IPMI_FRU_DEVICE_ID_MIN || tmp > IPMI_FRU_DEVICE_ID_MAX) { fprintf (stderr, "invalid device id\n"); exit (EXIT_FAILURE); } cmd_args->device_id = tmp; cmd_args->device_id_set = 1; break; case VERBOSE_KEY: cmd_args->verbose++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _bmc_device_config_file_parse (struct bmc_device_arguments *cmd_args) { assert (cmd_args); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_BMC_DEVICE, NULL) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } } static void _bmc_device_args_validate (struct bmc_device_arguments *cmd_args) { assert (cmd_args); if (!cmd_args->common_args.flush_cache && !cmd_args->cold_reset && !cmd_args->warm_reset && !cmd_args->get_self_test_results && !cmd_args->get_acpi_power_state && !cmd_args->set_acpi_power_state && !cmd_args->get_lan_statistics && !cmd_args->clear_lan_statistics && !cmd_args->rearm_sensor && !cmd_args->get_sdr_repository_time && !cmd_args->set_sdr_repository_time && !cmd_args->get_sel_time && !cmd_args->set_sel_time && !cmd_args->get_sel_time_utc_offset && !cmd_args->set_sel_time_utc_offset && !cmd_args->platform_event && !cmd_args->set_sensor_reading_and_event_status && !cmd_args->get_mca_auxiliary_log_status && !cmd_args->get_ssif_interface_capabilities && !cmd_args->get_kcs_interface_capabilities && !cmd_args->get_bt_interface_capabilities && !cmd_args->get_bmc_global_enables && !cmd_args->set_system_firmware_version && !cmd_args->set_system_name && !cmd_args->set_primary_operating_system_name && !cmd_args->set_operating_system_name && !cmd_args->set_present_os_version_number && !cmd_args->set_bmc_url && !cmd_args->set_base_os_hypervisor_url && !cmd_args->read_fru && !cmd_args->write_fru) { fprintf (stderr, "No command specified.\n"); exit (EXIT_FAILURE); } if ((cmd_args->common_args.flush_cache + cmd_args->cold_reset + cmd_args->warm_reset + cmd_args->get_self_test_results + cmd_args->get_acpi_power_state + cmd_args->set_acpi_power_state + cmd_args->get_lan_statistics + cmd_args->clear_lan_statistics + cmd_args->rearm_sensor + cmd_args->get_sdr_repository_time + cmd_args->set_sdr_repository_time + cmd_args->get_sel_time + cmd_args->set_sel_time + cmd_args->get_sel_time_utc_offset + cmd_args->set_sel_time_utc_offset + cmd_args->platform_event + cmd_args->set_sensor_reading_and_event_status + cmd_args->get_mca_auxiliary_log_status + cmd_args->get_ssif_interface_capabilities + cmd_args->get_kcs_interface_capabilities + cmd_args->get_bt_interface_capabilities + cmd_args->get_bmc_global_enables + cmd_args->set_system_firmware_version + cmd_args->set_system_name + cmd_args->set_primary_operating_system_name + cmd_args->set_operating_system_name + cmd_args->set_present_os_version_number + cmd_args->set_bmc_url + cmd_args->set_base_os_hypervisor_url + cmd_args->read_fru + cmd_args->write_fru) > 1) { fprintf (stderr, "Multiple commands specified.\n"); exit (EXIT_FAILURE); } if (cmd_args->set_acpi_power_state && (cmd_args->set_acpi_power_state_args.system_power_state == IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE && cmd_args->set_acpi_power_state_args.device_power_state == IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE)) { fprintf (stderr, "No acpi power state configuration changes specified\n"); exit (EXIT_FAILURE); } if (cmd_args->set_system_firmware_version && strlen (cmd_args->set_system_firmware_version_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "system firmware version string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_system_name && strlen (cmd_args->set_system_name_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "system name string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_primary_operating_system_name && strlen (cmd_args->set_primary_operating_system_name_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "primary operating system name string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_operating_system_name && strlen (cmd_args->set_operating_system_name_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "operating system name string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_present_os_version_number && strlen (cmd_args->set_present_os_version_number_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "present OS version number string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_bmc_url && strlen (cmd_args->set_bmc_url_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "BMC URL string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->set_base_os_hypervisor_url && strlen (cmd_args->set_base_os_hypervisor_url_arg) > IPMI_SYSTEM_INFO_STRING_LEN_MAX) { fprintf (stderr, "Base OS/Hypervisor URL string too long\n"); exit (EXIT_FAILURE); } if (cmd_args->read_fru) { if (!cmd_args->device_id_set) { fprintf (stderr, "Device ID not set\n"); exit (EXIT_FAILURE); } if (access (cmd_args->read_fru_filename, F_OK) == 0) { if (access (cmd_args->read_fru_filename, W_OK) < 0) { fprintf (stderr, "Cannot write to '%s': %s\n", cmd_args->read_fru_filename, strerror (errno)); exit (EXIT_FAILURE); } } else { int fd; if ((fd = open (cmd_args->read_fru_filename, O_CREAT, 0644)) < 0) { fprintf (stderr, "Cannot open '%s': %s\n", cmd_args->read_fru_filename, strerror (errno)); exit (EXIT_FAILURE); } else { /* ignore close error, don't care right now */ close (fd); if (unlink (cmd_args->read_fru_filename) < 0) { fprintf (stderr, "Cannot remove '%s': %s\n", cmd_args->read_fru_filename, strerror (errno)); exit (EXIT_FAILURE); } } } } if (cmd_args->write_fru) { if (!cmd_args->device_id_set) { fprintf (stderr, "Device ID not set\n"); exit (EXIT_FAILURE); } if (access (cmd_args->write_fru_filename, R_OK) < 0) { fprintf (stderr, "Cannot read '%s': %s\n", cmd_args->write_fru_filename, strerror (errno)); exit (EXIT_FAILURE); } } } void bmc_device_argp_parse (int argc, char **argv, struct bmc_device_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->cold_reset = 0; cmd_args->warm_reset = 0; cmd_args->get_self_test_results = 0; cmd_args->get_acpi_power_state = 0; cmd_args->set_acpi_power_state = 0; cmd_args->set_acpi_power_state_args.system_power_state = IPMI_ACPI_SYSTEM_POWER_STATE_NO_CHANGE; cmd_args->set_acpi_power_state_args.device_power_state = IPMI_ACPI_DEVICE_POWER_STATE_NO_CHANGE; cmd_args->get_lan_statistics = 0; cmd_args->clear_lan_statistics = 0; cmd_args->rearm_sensor = 0; cmd_args->rearm_sensor_arg = NULL; cmd_args->get_sdr_repository_time = 0; cmd_args->set_sdr_repository_time = 0; cmd_args->set_sdr_repository_time_arg = NULL; cmd_args->get_sel_time = 0; cmd_args->set_sel_time = 0; cmd_args->set_sel_time_arg = NULL; cmd_args->get_sel_time_utc_offset = 0; cmd_args->set_sel_time_utc_offset = 0; cmd_args->set_sel_time_utc_offset_arg = NULL; cmd_args->platform_event = 0; cmd_args->platform_event_arg = NULL; cmd_args->set_sensor_reading_and_event_status = 0; cmd_args->set_sensor_reading_and_event_status_arg = NULL; cmd_args->get_mca_auxiliary_log_status = 0; cmd_args->get_ssif_interface_capabilities = 0; cmd_args->get_kcs_interface_capabilities = 0; cmd_args->get_bt_interface_capabilities = 0; cmd_args->get_bmc_global_enables = 0; cmd_args->set_system_firmware_version = 0; cmd_args->set_system_firmware_version_arg = NULL; cmd_args->set_system_name = 0; cmd_args->set_system_name_arg = NULL; cmd_args->set_primary_operating_system_name = 0; cmd_args->set_primary_operating_system_name_arg = NULL; cmd_args->set_operating_system_name = 0; cmd_args->set_operating_system_name_arg = NULL; cmd_args->set_present_os_version_number = 0; cmd_args->set_present_os_version_number_arg = NULL; cmd_args->set_bmc_url = 0; cmd_args->set_bmc_url_arg = NULL; cmd_args->set_base_os_hypervisor_url = 0; cmd_args->set_base_os_hypervisor_url_arg = NULL; cmd_args->read_fru = 0; cmd_args->read_fru_filename = NULL; cmd_args->write_fru = 0; cmd_args->write_fru_filename = NULL; cmd_args->device_id_set = 0; cmd_args->verbose = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _bmc_device_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _bmc_device_args_validate (cmd_args); } freeipmi-1.6.4/bmc-device/bmc-device-argp.h0000644002055400205540000000161313527331634020356 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef BMC_DEVICE_ARGP_H #define BMC_DEVICE_ARGP_H #include "bmc-device.h" void bmc_device_argp_parse (int argc, char **argv, struct bmc_device_arguments *cmd_args); #endif /* BMC_DEVICE_ARGP_H */ freeipmi-1.6.4/bmc-watchdog/0000755002055400205540000000000013527342546015624 5ustar00achuachu00000000000000freeipmi-1.6.4/bmc-watchdog/Makefile.in0000644002055400205540000006760213527342443017700 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = bmc-watchdog$(EXEEXT) subdir = bmc-watchdog DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_bmc_watchdog_OBJECTS = bmc_watchdog-bmc-watchdog.$(OBJEXT) \ bmc_watchdog-bmc-watchdog-argp.$(OBJEXT) bmc_watchdog_OBJECTS = $(am_bmc_watchdog_OBJECTS) bmc_watchdog_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(bmc_watchdog_SOURCES) DIST_SOURCES = $(bmc_watchdog_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ bmc_watchdog_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DBMC_WATCHDOG_LOCALSTATEDIR='"$(localstatedir)"' bmc_watchdog_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_watchdog_SOURCES = \ bmc-watchdog.c \ bmc-watchdog.h \ bmc-watchdog-argp.c \ bmc-watchdog-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu bmc-watchdog/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu bmc-watchdog/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list bmc-watchdog$(EXEEXT): $(bmc_watchdog_OBJECTS) $(bmc_watchdog_DEPENDENCIES) $(EXTRA_bmc_watchdog_DEPENDENCIES) @rm -f bmc-watchdog$(EXEEXT) $(AM_V_CCLD)$(LINK) $(bmc_watchdog_OBJECTS) $(bmc_watchdog_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/bmc_watchdog-bmc-watchdog.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< bmc_watchdog-bmc-watchdog.o: bmc-watchdog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_watchdog-bmc-watchdog.o -MD -MP -MF $(DEPDIR)/bmc_watchdog-bmc-watchdog.Tpo -c -o bmc_watchdog-bmc-watchdog.o `test -f 'bmc-watchdog.c' || echo '$(srcdir)/'`bmc-watchdog.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_watchdog-bmc-watchdog.Tpo $(DEPDIR)/bmc_watchdog-bmc-watchdog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-watchdog.c' object='bmc_watchdog-bmc-watchdog.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_watchdog-bmc-watchdog.o `test -f 'bmc-watchdog.c' || echo '$(srcdir)/'`bmc-watchdog.c bmc_watchdog-bmc-watchdog.obj: bmc-watchdog.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_watchdog-bmc-watchdog.obj -MD -MP -MF $(DEPDIR)/bmc_watchdog-bmc-watchdog.Tpo -c -o bmc_watchdog-bmc-watchdog.obj `if test -f 'bmc-watchdog.c'; then $(CYGPATH_W) 'bmc-watchdog.c'; else $(CYGPATH_W) '$(srcdir)/bmc-watchdog.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_watchdog-bmc-watchdog.Tpo $(DEPDIR)/bmc_watchdog-bmc-watchdog.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-watchdog.c' object='bmc_watchdog-bmc-watchdog.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_watchdog-bmc-watchdog.obj `if test -f 'bmc-watchdog.c'; then $(CYGPATH_W) 'bmc-watchdog.c'; else $(CYGPATH_W) '$(srcdir)/bmc-watchdog.c'; fi` bmc_watchdog-bmc-watchdog-argp.o: bmc-watchdog-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_watchdog-bmc-watchdog-argp.o -MD -MP -MF $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Tpo -c -o bmc_watchdog-bmc-watchdog-argp.o `test -f 'bmc-watchdog-argp.c' || echo '$(srcdir)/'`bmc-watchdog-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Tpo $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-watchdog-argp.c' object='bmc_watchdog-bmc-watchdog-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_watchdog-bmc-watchdog-argp.o `test -f 'bmc-watchdog-argp.c' || echo '$(srcdir)/'`bmc-watchdog-argp.c bmc_watchdog-bmc-watchdog-argp.obj: bmc-watchdog-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT bmc_watchdog-bmc-watchdog-argp.obj -MD -MP -MF $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Tpo -c -o bmc_watchdog-bmc-watchdog-argp.obj `if test -f 'bmc-watchdog-argp.c'; then $(CYGPATH_W) 'bmc-watchdog-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-watchdog-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Tpo $(DEPDIR)/bmc_watchdog-bmc-watchdog-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='bmc-watchdog-argp.c' object='bmc_watchdog-bmc-watchdog-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(bmc_watchdog_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o bmc_watchdog-bmc-watchdog-argp.obj `if test -f 'bmc-watchdog-argp.c'; then $(CYGPATH_W) 'bmc-watchdog-argp.c'; else $(CYGPATH_W) '$(srcdir)/bmc-watchdog-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/bmc-watchdog/Makefile.am0000644002055400205540000000253713527331634017663 0ustar00achuachu00000000000000sbin_PROGRAMS = bmc-watchdog bmc_watchdog_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DBMC_WATCHDOG_LOCALSTATEDIR='"$(localstatedir)"' bmc_watchdog_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la bmc_watchdog_SOURCES = \ bmc-watchdog.c \ bmc-watchdog.h \ bmc-watchdog-argp.c \ bmc-watchdog-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/bmc-watchdog/bmc-watchdog.c0000644002055400205540000013231613527331635020332 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: bmc-watchdog.c,v 1.134 2010-06-28 20:24:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2004-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155913 * * This file is part of Bmc-watchdog, a base management controller * (BMC) watchdog timer management tool. For details, see * http://www.llnl.gov/linux/. * * Bmc-Watchdog is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Bmc-Watchdog is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Bmc-Watchdog. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include "bmc-watchdog.h" #include "bmc-watchdog-argp.h" #include "freeipmi-portability.h" #include "error.h" #include "tool-common.h" #include "tool-daemon-common.h" #include "tool-util-common.h" #define BMC_WATCHDOG_ERR_BUFLEN 1024 #define BMC_WATCHDOG_STR_BUFLEN 1024 #define BMC_WATCHDOG_PKT_BUFLEN 1024 #define BMC_WATCHDOG_RESET_PERIOD_DEFAULT 60 #define BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT 1 #define BMC_WATCHDOG_RETRY_ATTEMPTS_DEFAULT 5 #define BMC_WATCHDOG_PIDFILE BMC_WATCHDOG_LOCALSTATEDIR "/run/bmc-watchdog.pid" #define BMC_WATCHDOG_LOG_REPEAT_LIMIT 10 struct bmc_watchdog_arguments cmd_args; static ipmi_ctx_t ipmi_ctx = NULL; static unsigned int retry_wait_time = BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT; static unsigned int retry_attempts = BMC_WATCHDOG_RETRY_ATTEMPTS_DEFAULT; static char comp_code_errbuf[BMC_WATCHDOG_ERR_BUFLEN]; static int shutdown_flag = 1; /* for verbosity limiting */ static int last_ipmi_ctx_errnum = -1; static uint8_t last_cmd = -1; static uint8_t last_netfn = -1; static uint8_t last_comp_code = 0; static int repeat_ipmi_ctx_errnum = -1; static uint8_t repeat_cmd = -1; static uint8_t repeat_netfn = -1; static uint8_t repeat_comp_code = 0; static int log_repeat_count = 0; /* Must be called after cmdline parsed */ static void _init_bmc_watchdog (void) { unsigned int workaround_flags = 0; unsigned int flags = 0; if (!ipmi_is_root ()) err_exit ("Permission denied, must be root."); parse_get_freeipmi_inband_flags (cmd_args.common_args.workaround_flags_inband, &workaround_flags); flags = IPMI_FLAGS_NONBLOCKING; if (cmd_args.common_args.debug) flags |= IPMI_FLAGS_DEBUG_DUMP; if (!(ipmi_ctx = ipmi_ctx_create ())) err_exit ("ipmi_ctx_create: %s", strerror (errno)); if (cmd_args.common_args.driver_type == IPMI_DEVICE_UNKNOWN) { int ret; if ((ret = ipmi_ctx_find_inband (ipmi_ctx, NULL, cmd_args.common_args.disable_auto_probe, cmd_args.common_args.driver_address, cmd_args.common_args.register_spacing, cmd_args.common_args.driver_device, workaround_flags, flags)) < 0) err_exit ("ipmi_ctx_find_inband: %s", ipmi_ctx_errormsg (ipmi_ctx)); if (!ret) err_exit ("could not find inband device"); } else { if (ipmi_ctx_open_inband (ipmi_ctx, cmd_args.common_args.driver_type, cmd_args.common_args.disable_auto_probe, cmd_args.common_args.driver_address, cmd_args.common_args.register_spacing, cmd_args.common_args.driver_device, workaround_flags, flags) < 0) err_exit ("ipmi_ctx_open_inband: %s", ipmi_ctx_errormsg (ipmi_ctx)); } } static void _ipmi_err_exit (const char *str) { assert (str); if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) err_exit ("%s: %s", str, comp_code_errbuf); else err_exit ("%s: %s", str, ipmi_ctx_errormsg (ipmi_ctx)); } /* return 0 on success, -1 on non-critical error, exits on fatal error */ static int _fiid_obj_get_safe(fiid_obj_t obj_cmd_rs, const char *field, uint64_t *val) { uint64_t valtemp; if (FIID_OBJ_GET (obj_cmd_rs, field, &valtemp) < 0) { if (fiid_obj_errnum (obj_cmd_rs) == FIID_ERR_DATA_NOT_AVAILABLE) { err_output ("fiid_obj_get: '%s': %s", field, fiid_obj_errormsg (obj_cmd_rs)); return (-1); } err_exit ("fiid_obj_get: '%s': %s", field, fiid_obj_errormsg (obj_cmd_rs)); } (*val) = valtemp; return (0); } static void _fiid_obj_get(fiid_obj_t obj_cmd_rs, const char *field, uint64_t *val) { uint64_t valtemp; if (FIID_OBJ_GET (obj_cmd_rs, field, &valtemp) < 0) err_exit ("fiid_obj_get: '%s': %s", field, fiid_obj_errormsg (obj_cmd_rs)); (*val) = valtemp; } static int _cmd (const char *str, uint8_t netfn, uint8_t cmd, fiid_obj_t obj_cmd_rq, fiid_obj_t obj_cmd_rs) { int retry_count = 0; int ret = 0; assert (str && (netfn == IPMI_NET_FN_APP_RQ || netfn == IPMI_NET_FN_TRANSPORT_RQ) && obj_cmd_rq && obj_cmd_rs); last_ipmi_ctx_errnum = -1; last_cmd = cmd; last_netfn = netfn; last_comp_code = 0; while (1) { if ((ret = ipmi_cmd (ipmi_ctx, IPMI_BMC_IPMB_LUN_BMC, netfn, obj_cmd_rq, obj_cmd_rs)) < 0) { last_ipmi_ctx_errnum = ipmi_ctx_errnum (ipmi_ctx); if (ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_DRIVER_BUSY && ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_BMC_BUSY && ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_IPMI_ERROR) { if (cmd_args.verbose_logging) err_output ("%s: ipmi_cmd: %s", str, ipmi_ctx_errormsg (ipmi_ctx)); if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { if (ipmi_completion_code_strerror_cmd_r (obj_cmd_rs, netfn, comp_code_errbuf, BMC_WATCHDOG_ERR_BUFLEN) < 0) { uint64_t val; _fiid_obj_get (obj_cmd_rs, "comp_code", &val); last_comp_code = val; snprintf (comp_code_errbuf, BMC_WATCHDOG_ERR_BUFLEN, "Comp Code 0x%X", last_comp_code); } } return (-1); } } if (ret < 0) { if (retry_count >= retry_attempts) { err_output ("%s: BMC Timeout: %s", str, ipmi_ctx_errormsg (ipmi_ctx)); return (-1); } daemon_sleep (retry_wait_time); retry_count++; } else break; } return (0); } static int _reset_watchdog_timer_cmd (void) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_reset_watchdog_timer_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_reset_watchdog_timer_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_cmd_reset_watchdog_timer (obj_cmd_rq) < 0) err_exit ("fill_cmd_reset_watchdog_timer: %s", strerror (errno)); if (_cmd ("Reset Cmd", IPMI_NET_FN_APP_RQ, IPMI_CMD_RESET_WATCHDOG_TIMER, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _set_watchdog_timer_cmd (uint8_t timer_use, uint8_t stop_timer, uint8_t log, uint8_t timeout_action, uint8_t pre_timeout_interrupt, uint8_t pre_timeout_interval, uint8_t timer_use_expiration_flag_bios_frb2, uint8_t timer_use_expiration_flag_bios_post, uint8_t timer_use_expiration_flag_os_load, uint8_t timer_use_expiration_flag_sms_os, uint8_t timer_use_expiration_flag_oem, uint16_t initial_countdown_seconds) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint16_t initial_countdown_chunks; int rv = -1; /* IPMI specifies timeout in 100 millisecond chunks */ initial_countdown_chunks = initial_countdown_seconds * 10; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_watchdog_timer_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_watchdog_timer_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_cmd_set_watchdog_timer (timer_use, stop_timer, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, timer_use_expiration_flag_bios_frb2, timer_use_expiration_flag_bios_post, timer_use_expiration_flag_os_load, timer_use_expiration_flag_sms_os, timer_use_expiration_flag_oem, initial_countdown_chunks, obj_cmd_rq) < 0) err_exit ("fill_cmd_set_watchdog_timer: %s", strerror (errno)); if (_cmd ("Set Cmd", IPMI_NET_FN_APP_RQ, IPMI_CMD_SET_WATCHDOG_TIMER, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _get_watchdog_timer_cmd (uint8_t *timer_use, uint8_t *timer_state, uint8_t *log, uint8_t *timeout_action, uint8_t *pre_timeout_interrupt, uint8_t *pre_timeout_interval, uint8_t *timer_use_expiration_flag_bios_frb2, uint8_t *timer_use_expiration_flag_bios_post, uint8_t *timer_use_expiration_flag_os_load, uint8_t *timer_use_expiration_flag_sms_os, uint8_t *timer_use_expiration_flag_oem, uint16_t *initial_countdown_seconds, uint16_t *present_countdown_seconds) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_watchdog_timer_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_watchdog_timer_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_cmd_get_watchdog_timer (obj_cmd_rq) < 0) err_exit ("fill_cmd_get_watchdog_timer: %s", strerror (errno)); if (_cmd ("Get Cmd", IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_WATCHDOG_TIMER, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; if (timer_use) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use", &val) < 0) goto cleanup; (*timer_use) = val; } if (timer_state) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_state", &val) < 0) goto cleanup; (*timer_state) = val; } if (log) { if (_fiid_obj_get_safe (obj_cmd_rs, "log", &val) < 0) goto cleanup; (*log) = val; } if (timeout_action) { if (_fiid_obj_get_safe (obj_cmd_rs, "timeout_action", &val) < 0) goto cleanup; (*timeout_action) = val; } if (pre_timeout_interrupt) { if (_fiid_obj_get_safe (obj_cmd_rs, "pre_timeout_interrupt", &val) < 0) goto cleanup; (*pre_timeout_interrupt) = val; } if (pre_timeout_interval) { if (_fiid_obj_get_safe (obj_cmd_rs, "pre_timeout_interval", &val) < 0) goto cleanup; (*pre_timeout_interval) = val; } if (timer_use_expiration_flag_bios_frb2) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use_expiration_flag.bios_frb2", &val) < 0) goto cleanup; (*timer_use_expiration_flag_bios_frb2) = val; } if (timer_use_expiration_flag_bios_post) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use_expiration_flag.bios_post", &val) < 0) goto cleanup; (*timer_use_expiration_flag_bios_post) = val; } if (timer_use_expiration_flag_os_load) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use_expiration_flag.os_load", &val) < 0) goto cleanup; (*timer_use_expiration_flag_os_load) = val; } if (timer_use_expiration_flag_sms_os) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use_expiration_flag.sms_os", &val) < 0) goto cleanup; (*timer_use_expiration_flag_sms_os) = val; } if (timer_use_expiration_flag_oem) { if (_fiid_obj_get_safe (obj_cmd_rs, "timer_use_expiration_flag.oem", &val) < 0) goto cleanup; (*timer_use_expiration_flag_oem) = val; } if (initial_countdown_seconds) { if (_fiid_obj_get_safe (obj_cmd_rs, "initial_countdown_value", &val) < 0) goto cleanup; (*initial_countdown_seconds) = val / 10; } if (present_countdown_seconds) { if (_fiid_obj_get_safe (obj_cmd_rs, "present_countdown_value", &val) < 0) goto cleanup; (*present_countdown_seconds) = val / 10; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } /* returns -1 on error, 0 on not found, 1 on found */ static int _get_channel_number (uint8_t *channel_number) { fiid_obj_t dev_id_obj_cmd_rq = NULL; fiid_obj_t dev_id_obj_cmd_rs = NULL; fiid_obj_t channel_info_obj_cmd_rq = NULL; fiid_obj_t channel_info_obj_cmd_rs = NULL; uint32_t manufacturer_id; uint16_t product_id; unsigned int i; uint64_t val; int rv = -1; assert (channel_number); if (!(dev_id_obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_device_id_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(dev_id_obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_device_id_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_cmd_get_device_id (dev_id_obj_cmd_rq) < 0) err_exit ("fill_cmd_get_device_id: %s", strerror (errno)); if (_cmd ("Get Device Id Cmd", IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_DEVICE_ID, dev_id_obj_cmd_rq, dev_id_obj_cmd_rs) < 0) _ipmi_err_exit ("Get Device Id Error"); _fiid_obj_get (dev_id_obj_cmd_rs, "manufacturer_id.id", &val); manufacturer_id = val; _fiid_obj_get (dev_id_obj_cmd_rs, "product_id", &val); product_id = val; switch (manufacturer_id) { case IPMI_IANA_ENTERPRISE_ID_INTEL: case 0xB000157: /* Intel */ switch (product_id) { case 0x1B: (*channel_number) = 7; rv = 1; goto cleanup; } } if (!(channel_info_obj_cmd_rq = fiid_obj_create (tmpl_cmd_get_channel_info_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(channel_info_obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_info_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); /* Channel numbers range from 0 - 7 */ for (i = 0; i < 8; i++) { uint8_t channel_medium_type; if (fill_cmd_get_channel_info (i, channel_info_obj_cmd_rq) < 0) err_exit ("fill_cmd_get_channel_info: %s", strerror (errno)); if (_cmd ("Get Channel Info Cmd", IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_INFO_COMMAND, channel_info_obj_cmd_rq, channel_info_obj_cmd_rs) < 0) continue; _fiid_obj_get (channel_info_obj_cmd_rs, "channel_medium_type", &val); channel_medium_type = val; if (channel_medium_type == IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3) { _fiid_obj_get (channel_info_obj_cmd_rs, "actual_channel_number", &val); (*channel_number) = val; rv = 1; goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (dev_id_obj_cmd_rq); fiid_obj_destroy (dev_id_obj_cmd_rs); fiid_obj_destroy (channel_info_obj_cmd_rq); fiid_obj_destroy (channel_info_obj_cmd_rs); return (rv); } /* returns -1 on error, 0 can't configure, 1 on configured */ static int _suspend_bmc_arps_cmd (uint8_t gratuitous_arp, uint8_t arp_response) { fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; uint8_t channel_number = 0; int ret, rv = -1; if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_suspend_bmc_arps_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_suspend_bmc_arps_rs))) err_exit ("fiid_obj_create: %s", strerror (errno)); if ((ret = _get_channel_number (&channel_number)) < 0) goto cleanup; if (!ret) { rv = 0; goto cleanup; } if (fill_cmd_suspend_bmc_arps (channel_number, gratuitous_arp, arp_response, obj_cmd_rq) < 0) err_exit ("fill_cmd_suspend_bmc_arps: %s", strerror (errno)); if (_cmd ("Suspend Cmd", IPMI_NET_FN_TRANSPORT_RQ, IPMI_CMD_SUSPEND_BMC_ARPS, obj_cmd_rq, obj_cmd_rs) < 0) goto cleanup; rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _set_cmd (void) { uint8_t timer_use, stop_timer, timer_state, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval; uint16_t initial_countdown_seconds; if (_get_watchdog_timer_cmd (&timer_use, &timer_state, &log, &timeout_action, &pre_timeout_interrupt, &pre_timeout_interval, NULL, NULL, NULL, NULL, NULL, &initial_countdown_seconds, NULL) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); if ((!timer_state && cmd_args.start_if_stopped) || (timer_state && cmd_args.reset_if_running)) { if (_reset_watchdog_timer_cmd () < 0) _ipmi_err_exit ("Reset Watchdog Timer Error"); return; return; } timer_use = (cmd_args.timer_use) ? cmd_args.timer_use_arg : timer_use; stop_timer = (cmd_args.stop_timer) ? cmd_args.stop_timer_arg : timer_state; log = (cmd_args.log) ? cmd_args.log_arg : log; timeout_action = (cmd_args.timeout_action) ? cmd_args.timeout_action_arg : timeout_action; pre_timeout_interrupt = (cmd_args.pre_timeout_interrupt) ? cmd_args.pre_timeout_interrupt_arg : pre_timeout_interrupt; pre_timeout_interval = (cmd_args.pre_timeout_interval) ? cmd_args.pre_timeout_interval_arg : pre_timeout_interval; initial_countdown_seconds = (cmd_args.initial_countdown_seconds) ? cmd_args.initial_countdown_seconds_arg : initial_countdown_seconds; if ((pre_timeout_interrupt != IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE) && (pre_timeout_interval > initial_countdown_seconds)) err_exit ("pre-timeout interval greater than initial countdown seconds"); if (_set_watchdog_timer_cmd (timer_use, stop_timer, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, (cmd_args.clear_bios_frb2) ? 1 : 0, (cmd_args.clear_bios_post) ? 1 : 0, (cmd_args.clear_os_load) ? 1 : 0, (cmd_args.clear_sms_os) ? 1 : 0, (cmd_args.clear_oem) ? 1 : 0, initial_countdown_seconds) < 0) _ipmi_err_exit ("Set Watchdog Timer Error"); if (cmd_args.start_after_set || cmd_args.reset_after_set) { if (_get_watchdog_timer_cmd (NULL, &timer_state, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); if ((!timer_state && cmd_args.start_after_set) || (timer_state && cmd_args.reset_after_set)) { if (_reset_watchdog_timer_cmd () < 0) _ipmi_err_exit ("Reset Watchdog Timer Error"); } } return; } static char * _log_str (uint8_t log) { switch (log) { case IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE: return "Enabled"; case IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE: return "Disabled"; default: return "Internal Error, Unknown Log Value"; } return (NULL); /* NOT REACHED */ } static char * _timer_state_str (uint8_t timer_state) { switch (timer_state) { case IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_RUNNING: return "Running"; case IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_STOPPED: return "Stopped"; default: return "Internal Error, Unknown Stop Timer Value"; } return (NULL); /* NOT REACHED */ } static char * _timer_use_str (uint8_t timer_use) { switch (timer_use) { case IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2: return "BIOS FRB2"; case IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST: return "BIOS POST"; case IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD: return "OS LOAD"; case IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS: return "SMS/OS"; case IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM: return "OEM"; default: return "Reserved"; } return (NULL); /* NOT REACHED */ } static char * _pre_timeout_interrupt_str (uint8_t pre_timeout_interrupt) { switch (pre_timeout_interrupt) { case IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE: return "None"; case IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI: return "SMI"; case IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI: return "NMI / Diagnostic Interrupt"; case IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT: return "Messaging Interrupt"; default: return "Reserved"; } return (NULL); /* NOT REACHED */ } static char * _timeout_action_str (uint8_t timeout_action) { switch (timeout_action) { case IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION: return "None"; case IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET: return "Hard Reset"; case IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN: return "Power Down"; case IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE: return "Power Cycle"; default: return "Reserved"; } return (NULL); /* NOT REACHED */ } static void _get_cmd (void) { uint8_t timer_use, timer_state, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, timer_use_expiration_flag_bios_frb2, timer_use_expiration_flag_bios_post, timer_use_expiration_flag_os_load, timer_use_expiration_flag_sms_os, timer_use_expiration_flag_oem; uint16_t initial_countdown_seconds, present_countdown_seconds; if (_get_watchdog_timer_cmd (&timer_use, &timer_state, &log, &timeout_action, &pre_timeout_interrupt, &pre_timeout_interval, &timer_use_expiration_flag_bios_frb2, &timer_use_expiration_flag_bios_post, &timer_use_expiration_flag_os_load, &timer_use_expiration_flag_sms_os, &timer_use_expiration_flag_oem, &initial_countdown_seconds, &present_countdown_seconds) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); printf ("Timer Use: %s\n", _timer_use_str (timer_use)); printf ("Timer: %s\n", _timer_state_str (timer_state)); printf ("Logging: %s\n", _log_str (log)); printf ("Timeout Action: %s\n", _timeout_action_str (timeout_action)); printf ("Pre-Timeout Interrupt: %s\n", _pre_timeout_interrupt_str (pre_timeout_interrupt)); printf ("Pre-Timeout Interval: %d seconds\n", pre_timeout_interval); printf ("Timer Use BIOS FRB2 Flag: %s\n", (timer_use_expiration_flag_bios_frb2) ? "Set" : "Clear"); printf ("Timer Use BIOS POST Flag: %s\n", (timer_use_expiration_flag_bios_post) ? "Set" : "Clear"); printf ("Timer Use BIOS OS Load Flag: %s\n", (timer_use_expiration_flag_os_load) ? "Set" : "Clear"); printf ("Timer Use BIOS SMS/OS Flag: %s\n", (timer_use_expiration_flag_sms_os) ? "Set" : "Clear"); printf ("Timer Use BIOS OEM Flag: %s\n", (timer_use_expiration_flag_oem) ? "Set" : "Clear"); printf ("Initial Countdown: %d seconds\n", initial_countdown_seconds); printf ("Current Countdown: %d seconds\n", present_countdown_seconds); } static void _reset_cmd (void) { if (_reset_watchdog_timer_cmd () < 0) _ipmi_err_exit ("Reset Watchdog Timer Error"); } static void _start_cmd (void) { uint8_t timer_state; if (_get_watchdog_timer_cmd (NULL, &timer_state, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); if (!timer_state) { if (_reset_watchdog_timer_cmd () < 0) _ipmi_err_exit ("Reset Watchdog Timer Error"); } if (cmd_args.gratuitous_arp || cmd_args.arp_response) { uint8_t gratuitous_arp, arp_response; int ret; if (cmd_args.gratuitous_arp) gratuitous_arp = cmd_args.gratuitous_arp_arg; else gratuitous_arp = IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND; if (cmd_args.arp_response) arp_response = cmd_args.arp_response_arg; else arp_response = IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND; if ((ret = _suspend_bmc_arps_cmd (gratuitous_arp, arp_response)) < 0) _ipmi_err_exit ("Suspend BMC ARPs Error"); if (!ret) err_exit ("cannot suspend BMC ARPs"); } } static void _stop_cmd (void) { uint8_t timer_use, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval; uint16_t initial_countdown_seconds; if (_get_watchdog_timer_cmd (&timer_use, NULL, &log, &timeout_action, &pre_timeout_interrupt, &pre_timeout_interval, NULL, NULL, NULL, NULL, NULL, &initial_countdown_seconds, NULL) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); if (_set_watchdog_timer_cmd (timer_use, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, 0, 0, 0, 0, 0, initial_countdown_seconds) < 0) _ipmi_err_exit ("Set Watchdog Timer Error"); } static void _clear_cmd (void) { uint8_t timer_use; /* Timer use cannot be NONE, so use whatever was there before */ if (_get_watchdog_timer_cmd (&timer_use, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL) < 0) _ipmi_err_exit ("Get Watchdog Timer Error"); if (_set_watchdog_timer_cmd (timer_use, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE, IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE, IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION, IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE, 0, 0, 0, 0, 0, 0, 0) < 0) _ipmi_err_exit ("Set Watchdog Timer Error"); } static void _daemon_cmd_err (const char *str, int exit_on_fatal) { assert (str); if (!cmd_args.verbose_logging) { if (repeat_ipmi_ctx_errnum == last_ipmi_ctx_errnum && repeat_cmd == last_cmd && repeat_netfn == last_netfn && repeat_comp_code == last_comp_code) { log_repeat_count++; if (log_repeat_count < BMC_WATCHDOG_LOG_REPEAT_LIMIT) return; } } if (ipmi_ctx_errnum (ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) err_output ("%s: %s", str, comp_code_errbuf); else if (ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_DRIVER_BUSY && ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_BMC_BUSY && ipmi_ctx_errnum (ipmi_ctx) != IPMI_ERR_IPMI_ERROR) { err_output ("%s: %s", str, ipmi_ctx_errormsg (ipmi_ctx)); if (exit_on_fatal) exit (EXIT_FAILURE); } repeat_ipmi_ctx_errnum = last_ipmi_ctx_errnum; repeat_cmd = last_cmd; repeat_netfn = last_netfn; repeat_comp_code = last_comp_code; log_repeat_count = 0; } static void _daemon_cmd_err_maybe_exit (const char *str) { assert (str); _daemon_cmd_err (str, 1); } static void _daemon_cmd_err_no_exit (const char *str) { assert (str); _daemon_cmd_err (str, 0); } static void _daemon_setup (void) { uint8_t timer_use, timer_state, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval; uint32_t reset_period = BMC_WATCHDOG_RESET_PERIOD_DEFAULT; uint16_t initial_countdown_seconds; while (1) { if (_get_watchdog_timer_cmd (&timer_use, &timer_state, &log, &timeout_action, &pre_timeout_interrupt, &pre_timeout_interval, NULL, NULL, NULL, NULL, NULL, &initial_countdown_seconds, NULL) < 0) { _daemon_cmd_err_maybe_exit ("Get Watchdog Timer"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } break; } if (timer_state == IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_RUNNING) err_exit ("Error: watchdog timer must be stopped before running daemon"); timer_use = (cmd_args.timer_use) ? cmd_args.timer_use_arg : timer_use; log = (cmd_args.log) ? cmd_args.log_arg : log; timeout_action = (cmd_args.timeout_action) ? cmd_args.timeout_action_arg : timeout_action; pre_timeout_interrupt = (cmd_args.pre_timeout_interrupt) ? cmd_args.pre_timeout_interrupt_arg : pre_timeout_interrupt; pre_timeout_interval = (cmd_args.pre_timeout_interval) ? cmd_args.pre_timeout_interval_arg : pre_timeout_interval; initial_countdown_seconds = (cmd_args.initial_countdown_seconds) ? cmd_args.initial_countdown_seconds_arg : initial_countdown_seconds; if ((pre_timeout_interrupt != IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE) && (pre_timeout_interval > initial_countdown_seconds)) err_exit ("Error: pre-timeout interval greater than initial countdown seconds"); if (cmd_args.reset_period) reset_period = cmd_args.reset_period_arg; if (reset_period > initial_countdown_seconds) err_exit ("Error: reset-period interval greater than initial countdown seconds"); while (1) { if (_set_watchdog_timer_cmd (timer_use, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, (cmd_args.clear_bios_frb2) ? 1 : 0, (cmd_args.clear_bios_post) ? 1 : 0, (cmd_args.clear_os_load) ? 1 : 0, (cmd_args.clear_sms_os) ? 1 : 0, (cmd_args.clear_oem) ? 1 : 0, initial_countdown_seconds) < 0) { _daemon_cmd_err_maybe_exit ("Set Watchdog Timer"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } break; } /* Must start watchdog timer before entering loop */ while (1) { if (_reset_watchdog_timer_cmd () < 0) { _daemon_cmd_err_maybe_exit ("Reset Watchdog Timer"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } break; } if (cmd_args.gratuitous_arp || cmd_args.arp_response) { uint8_t gratuitous_arp, arp_response; if (cmd_args.gratuitous_arp) gratuitous_arp = cmd_args.gratuitous_arp_arg; else gratuitous_arp = IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND; if (cmd_args.arp_response) arp_response = cmd_args.gratuitous_arp_arg; else arp_response = IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND; while (1) { int ret; if ((ret = _suspend_bmc_arps_cmd (gratuitous_arp, arp_response)) < 0) { _daemon_cmd_err_maybe_exit ("Suspend BMC ARPs"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } if (!ret) err_output ("cannot suspend BMC ARPs"); break; } } return; } static void _signal_handler_callback (int sig) { shutdown_flag = 0; } static void _daemon_cmd (const char *progname) { uint32_t reset_period = BMC_WATCHDOG_RESET_PERIOD_DEFAULT; uint8_t timer_use, timer_state, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval; uint16_t initial_countdown_seconds; uint16_t previous_present_countdown_seconds = 0; uint16_t present_countdown_seconds; assert (progname); /* Run in foreground if debugging */ if (!cmd_args.common_args.debug) daemonize_common (BMC_WATCHDOG_PIDFILE); daemon_signal_handler_setup (_signal_handler_callback); /* move error outs to syslog from stderr */ if (!cmd_args.no_logging) err_set_flags (ERROR_SYSLOG); else err_set_flags (0); openlog (progname, LOG_ODELAY | LOG_PID, LOG_DAEMON); _init_bmc_watchdog (); _daemon_setup (); if (cmd_args.reset_period) reset_period = cmd_args.reset_period_arg; retry_wait_time = BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT; retry_attempts = BMC_WATCHDOG_RETRY_ATTEMPTS_DEFAULT; if ((retry_wait_time * retry_attempts) > reset_period) { retry_wait_time = 0; retry_attempts = 0; } else if (reset_period > retry_wait_time && reset_period < (retry_wait_time * retry_attempts)) retry_attempts = reset_period/retry_wait_time; /* IPMI Workaround * * Discovered on Sun x4100M2 and x4200M2 * * If implementing the IGNORE_STATE_FLAG workaround flag below, we * need to sleep a little bit to make sure the BMC timer has really * started. * * From 27.7 "Internal delays in the BMC may require software to * delay up to 100 ms before seeing the countdown value change and * be reflected in the Get Watchdog Timer command". */ if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG) daemon_sleep (1); while (shutdown_flag) { struct timeval start_tv, end_tv; uint32_t adjusted_period; if (gettimeofday (&start_tv, NULL) < 0) err_exit ("gettimeofday: %s", strerror (errno)); if (_get_watchdog_timer_cmd (NULL, &timer_state, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &present_countdown_seconds) < 0) { _daemon_cmd_err_no_exit ("Get Watchdog Timer"); goto sleep_now; } /* IPMI Workaround * * Discovered on Sun x4100M2 and x4200M2 * * On some BMCs, the timer state flag is not functional. Therefore, * to have an operational BMC watchdog, it must function without it. * We instead look to see if the timer is changing. */ if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG) { if (previous_present_countdown_seconds == present_countdown_seconds) { err_output ("timer stopped by another process"); return; } previous_present_countdown_seconds = present_countdown_seconds; } else { if (timer_state == IPMI_BMC_WATCHDOG_TIMER_TIMER_STATE_STOPPED) { err_output ("timer stopped by another process"); return; } } if (_reset_watchdog_timer_cmd () < 0) { _daemon_cmd_err_no_exit ("Reset Watchdog Timer"); goto sleep_now; } /* IPMI Workaround * * Discovered on Sun x4100M2 and x4200M2 * * If implementing the IGNORE_STATE_FLAG workaround flag above, * we need to reset the previous_present_countdown_seconds to * what it is after the timer reset. */ if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_STATE_FLAG) { /* From 27.7 "Internal delays in the BMC may require software to * delay up to 100 ms before seeing the countdown value change and * be reflected in the Get Watchdog Timer command". */ daemon_sleep (1); if (_get_watchdog_timer_cmd (NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &present_countdown_seconds) < 0) { _daemon_cmd_err_no_exit ("Get Watchdog Timer"); goto sleep_now; } previous_present_countdown_seconds = present_countdown_seconds; } sleep_now: if (gettimeofday (&end_tv, NULL) < 0) err_exit ("gettimeofday: %s", strerror (errno)); adjusted_period = reset_period; /* Ignore micro secs, just seconds is good enough */ if ((end_tv.tv_sec - start_tv.tv_sec) < adjusted_period) adjusted_period -= (end_tv.tv_sec - start_tv.tv_sec); daemon_sleep (adjusted_period); } /* Need to stop the timer, don't want it to keep on going. Don't * give up until its shut off. */ /* set back to defaults, no reset-period adjustment anymore */ retry_wait_time = BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT; retry_attempts = BMC_WATCHDOG_RETRY_ATTEMPTS_DEFAULT; while (1) { if (_get_watchdog_timer_cmd (&timer_use, NULL, &log, &timeout_action, &pre_timeout_interrupt, &pre_timeout_interval, NULL, NULL, NULL, NULL, NULL, &initial_countdown_seconds, NULL) < 0) { _daemon_cmd_err_no_exit ("Get Watchdog Timer"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } break; } while (1) { if (_set_watchdog_timer_cmd (timer_use, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE, log, timeout_action, pre_timeout_interrupt, pre_timeout_interval, 0, 0, 0, 0, 0, initial_countdown_seconds) < 0) { _daemon_cmd_err_no_exit ("Set Watchdog Timer"); daemon_sleep (BMC_WATCHDOG_RETRY_WAIT_TIME_DEFAULT); continue; } break; } } int main (int argc, char **argv) { err_init (argv[0]); err_set_flags (ERROR_STDERR); ipmi_disable_coredump (); bmc_watchdog_argp_parse (argc, argv, &cmd_args); /* Early initialization. Daemon must do all initialization in * daemon_init() b/c daemon_init() needs to close all formerly open * file descriptors. */ if (!cmd_args.daemon) _init_bmc_watchdog (); if (cmd_args.set) _set_cmd (); else if (cmd_args.get) _get_cmd (); else if (cmd_args.reset) _reset_cmd (); else if (cmd_args.start) _start_cmd (); else if (cmd_args.stop) _stop_cmd (); else if (cmd_args.clear) _clear_cmd (); else if (cmd_args.daemon) { if (argv[0][0] == '/') argv[0] = strrchr(argv[0], '/') + 1; _daemon_cmd (argv[0]); } else err_exit ("internal error, command not set"); ipmi_ctx_close (ipmi_ctx); ipmi_ctx_destroy (ipmi_ctx); closelog (); exit (EXIT_SUCCESS); } freeipmi-1.6.4/bmc-watchdog/bmc-watchdog.h0000644002055400205540000000645013527331635020336 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: bmc-watchdog.h,v 1.10 2010-06-17 20:49:54 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2004-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155913 * * This file is part of Bmc-watchdog, a base management controller * (BMC) watchdog timer management tool. For details, see * http://www.llnl.gov/linux/. * * Bmc-Watchdog is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Bmc-Watchdog is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Bmc-Watchdog. If not, see . \*****************************************************************************/ #ifndef BMC_WATCHDOG_H #define BMC_WATCHDOG_H #include #include "tool-cmdline-common.h" enum bmc_watchdog_argp_option_keys { SET_KEY = 's', GET_KEY = 'g', RESET_KEY = 'r', START_KEY = 't', STOP_KEY = 'y', CLEAR_KEY = 'c', DAEMON_KEY = 'd', LOGFILE_KEY = 'f', VERBOSE_LOGGING_KEY = 'v', NO_LOGGING_KEY = 'n', TIMER_USE_KEY = 'u', STOP_TIMER_KEY = 'm', LOG_KEY = 'l', TIMEOUT_ACTION_KEY = 'a', PRE_TIMEOUT_INTERRUPT_KEY = 'p', PRE_TIMEOUT_INTERVAL_KEY = 'z', CLEAR_BIOS_FRB2_KEY = 'F', CLEAR_BIOS_POST_KEY = 'P', CLEAR_OS_LOAD_KEY = 'L', CLEAR_SMS_OS_KEY = 'S', CLEAR_OEM_KEY = 'O', INITIAL_COUNTDOWN_KEY = 'i', START_AFTER_SET_KEY = 'w', RESET_AFTER_SET_KEY = 'x', START_IF_STOPPED_KEY = 'j', RESET_IF_RUNNING_KEY = 'k', GRATUITOUS_ARP_KEY = 'G', ARP_RESPONSE_KEY = 'A', RESET_PERIOD_KEY = 'e', HELP_KEY = '?', VERSION_KEY = 'V', }; struct bmc_watchdog_arguments { struct common_cmd_args common_args; int set; int get; int reset; int start; int stop; int clear; int daemon; int verbose_logging; int no_logging; int timer_use; uint8_t timer_use_arg; int stop_timer; uint8_t stop_timer_arg; int log; uint8_t log_arg; int timeout_action; uint8_t timeout_action_arg; int pre_timeout_interrupt; uint8_t pre_timeout_interrupt_arg; int pre_timeout_interval; uint8_t pre_timeout_interval_arg; int clear_bios_frb2; int clear_bios_post; int clear_os_load; int clear_sms_os; int clear_oem; int initial_countdown_seconds; uint16_t initial_countdown_seconds_arg; int start_after_set; int reset_after_set; int start_if_stopped; int reset_if_running; int gratuitous_arp; uint8_t gratuitous_arp_arg; int arp_response; uint8_t arp_response_arg; int reset_period; uint32_t reset_period_arg; int help; int version; }; #endif /* BMC_WATCHDOG_H */ freeipmi-1.6.4/bmc-watchdog/bmc-watchdog-argp.c0000644002055400205540000005731113527331634021261 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: bmc-watchdog-argp.c,v 1.25 2010-06-30 21:56:36 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2004-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155913 * * This file is part of Bmc-watchdog, a base management controller * (BMC) watchdog timer management tool. For details, see * http://www.llnl.gov/linux/. * * Bmc-Watchdog is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Bmc-Watchdog is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Bmc-Watchdog. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include "bmc-watchdog.h" #include "bmc-watchdog-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "bmc-watchdog - " PACKAGE_VERSION "\n" "Copyright (C) 2003-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "bmc-watchdog - BMC watchdog timer daemon and control utility"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_OPTIONS_DEBUG, { "set", SET_KEY, NULL, 0, "Set BMC Watchdog Config.", 40}, { "get", GET_KEY, NULL, 0, "Get BMC Watchdog Config.", 41}, { "reset", RESET_KEY, NULL, 0, "Reset BMC Watchdog Timer.", 42}, { "start", START_KEY, NULL, 0, "Start BMC Watchdog Timer.", 43}, { "stop", STOP_KEY, NULL, 0, "Stop BMC Watchdog Timer.", 44}, { "clear", CLEAR_KEY, NULL, 0, "Clear BMC Watchdog Config.", 45}, { "daemon", DAEMON_KEY, NULL, 0, "Run in daemon mode.", 46}, { "logfile", LOGFILE_KEY, "FILE", OPTION_HIDDEN, "Specify an alternate logfile.", 47}, { "verbose-logging", VERBOSE_LOGGING_KEY, 0, 0, "Increase verbosity in logging.", 48}, { "no-logging", NO_LOGGING_KEY, NULL, 0, "Turn off all syslogging.", 49}, { "timer-use", TIMER_USE_KEY, "INT", 0, "Set timer use.", 50}, { "stop-timer", STOP_TIMER_KEY, "INT", 0, "Set Stop Timer Flag.", 51}, { "log", LOG_KEY, "INT", 0, "Set Log Flag.", 52}, { "timeout-action", TIMEOUT_ACTION_KEY, "INT", 0, "Set timeout action.", 53}, { "pre-timeout-interrupt", PRE_TIMEOUT_INTERRUPT_KEY, "INT", 0, "Set pre-timeout interrupt.", 54}, { "pre-timeout-interval", PRE_TIMEOUT_INTERVAL_KEY, "SECONDS", 0, "Set pre-timeout interval in seconds.", 55}, { "clear-bios-frb2", CLEAR_BIOS_FRB2_KEY, NULL, 0, "Clear BIOS FRB2 Timer Use Flag.", 56}, { "clear-bios-post", CLEAR_BIOS_POST_KEY, NULL, 0, "Clear BIOS POST Timer Use Flag.", 57}, { "clear-os-load", CLEAR_OS_LOAD_KEY, NULL, 0, "Clear OS Load Timer Use Flag.", 58}, { "clear-sms-os", CLEAR_SMS_OS_KEY, NULL, 0, "Clear SMS/OS Timer Use Flag.", 59}, { "clear-oem", CLEAR_OEM_KEY, NULL, 0, "Clear OEM Timer Use Flag.", 60}, { "initial-countdown", INITIAL_COUNTDOWN_KEY, "SECONDS", 0, "Set initial countdown in seconds.", 61}, { "start-after-set", START_AFTER_SET_KEY, NULL, 0, "Start timer after set if timer is stopped.", 62}, { "reset-after-set", RESET_AFTER_SET_KEY, NULL, 0, "Reset timer after set if timer is running.", 63}, { "start-if-stopped", START_IF_STOPPED_KEY, NULL, 0, "Don't set if timer is stopped, just start.", 64}, { "reset-if-running", RESET_IF_RUNNING_KEY, NULL, 0, "Don't set if timer is running, just reset.", 65}, { "gratuitous-arp", GRATUITOUS_ARP_KEY, "INT", 0, "Set Gratuitous ARPs Flag.", 66}, { "arp-response", ARP_RESPONSE_KEY, "INT", 0, "Set ARP Responses Flag.", 67}, { "reset-period", RESET_PERIOD_KEY, "SECONDS", 0, "Specify time interval before resetting timer.", 68}, { "help", HELP_KEY, NULL, 0, "Output help.", 69}, { "help", HELP_KEY, NULL, 0, "Output help.", 70}, { "version", VERSION_KEY, NULL, 0, "Output version.", 71}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static char * _cmd_string (struct bmc_watchdog_arguments *cmd_args) { if (cmd_args->get) return "--get"; else if (cmd_args->set) return "--set"; else if (cmd_args->reset) return "--reset"; else if (cmd_args->start) return "--start"; else if (cmd_args->stop) return "--stop"; else if (cmd_args->clear) return "--clear"; else if (cmd_args->daemon) return "--daemon"; else return (NULL); } static void _usage (struct bmc_watchdog_arguments *cmd_args) { char *cmdstr; cmdstr = _cmd_string (cmd_args); if (!cmdstr) { fprintf (stderr, "Usage: bmc-watchdog [OPTIONS]... [COMMAND_OPTIONS]...\n\n"); fprintf (stderr, "COMMANDS:\n" " -s --set Set BMC Watchdog Config.\n" " -g --get Get BMC Watchdog Config.\n" " -r --reset Reset BMC Watchdog Timer.\n" " -t --start Start BMC Watchdog Timer.\n" " -y --stop Stop BMC Watchdog Timer.\n" " -c --clear Clear BMC Watchdog Config.\n" " -d --daemon Run in Daemon Mode.\n\n"); } else fprintf (stderr, "Usage: bmc-watchdog %s [OPTIONS]... \n\n", cmdstr); fprintf (stderr, "OPTIONS:\n" " -D IPMIDRIVER --driver-type=IPMIDRIVER Specify IPMI driver type.\n" " --disable-auto-probe Do not probe driver for default settings.\n" " --driver-address=DRIVER-ADDRESS Specify driver address.\n" " --driver-device=DEVICE Specify driver device path.\n" " --register-spacing=REGISTER-SPACING Specify driver register spacing.\n" " --config-file=FILE Specify an alternate config file\n" " -v --verbose-logging Turn on verbose logging\n" " -n --no-logging Turn off all logging\n" " -? --help Output help menu.\n" " -V --version Output version.\n"); fprintf (stderr, " --debug Turn on debugging.\n"); fprintf (stderr, "\n"); if (cmd_args->set || cmd_args->start || cmd_args->daemon) fprintf (stderr, "COMMAND SPECIFIC OPTIONS:\n"); if (cmd_args->set || cmd_args->daemon) fprintf (stderr, " -u INT --timer-use=INT Set timer use.\n" " %d = BIOS FRB2\n" " %d = BIOS POST\n" " %d = OS_LOAD\n" " %d = SMS OS\n" " %d = OEM\n" " -m INT --stop-timer=INT Set Stop Timer Flag.\n" " %d = Stop Timer\n" " %d = Don't Stop timer\n" " -l INT --log=INT Set Log Flag.\n" " %d = Enable Log\n" " %d = Disable Log\n" " -a INT --timeout-action=INT Set timeout action.\n" " %d = No action\n" " %d = Hard Reset\n" " %d = Power Down\n" " %d = Power Cycle\n" " -p INT --pre-timeout-interrupt=INT Set pre-timeout interrupt.\n" " %d = None\n" " %d = SMI\n" " %d = NMI\n" " %d = Messaging Interrupt\n" " -z SECS --pre-timeout-interval=SECS Set pre-timeout interval in seconds.\n" " -F --clear-bios-frb2 Clear BIOS FRB2 Timer Use Flag.\n" " -P --clear-bios-post Clear BIOS POST Timer Use Flag.\n" " -L --clear-os-load Clear OS Load Timer Use Flag.\n" " -S --clear-sms-os Clear SMS/OS Timer Use Flag.\n" " -O --clear-oem Clear OEM Timer Use Flag.\n" " -i SECS --initial-countdown=SECS Set initial countdown in seconds.\n", IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_FRB2, IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_BIOS_POST, IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OS_LOAD, IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_SMS_OS, IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_OEM, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_ENABLE, IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_DISABLE, IPMI_BMC_WATCHDOG_TIMER_LOG_ENABLE, IPMI_BMC_WATCHDOG_TIMER_LOG_DISABLE, IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_NO_ACTION, IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_HARD_RESET, IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_DOWN, IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_POWER_CYCLE, IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NONE, IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_SMI, IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_NMI, IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_MESSAGING_INTERRUPT); if (cmd_args->set) fprintf (stderr, " -w --start-after-set Start timer after set if timer is stopped.\n" " -x --reset-after-set Reset timer after set if timer is running.\n" " -j --start-if-stopped Don't set if timer is stopped, just start.\n" " -k --reset-if-running Don't set if timer is running, just reset.\n"); if (cmd_args->start || cmd_args->daemon) fprintf (stderr, " -G INT --gratuitous-arp=INT Set Gratuitous ARPs Flag.\n" " %d = Suspend Gratuitous ARPs\n" " %d = Do Not Suspend Gratuitous ARPs\n" " -A INT --arp-response=INT Set ARP Responses Flag.\n" " %d = Suspend ARP Responses\n" " %d = Do Not Suspend ARP Responses\n", IPMI_BMC_GENERATED_GRATUITOUS_ARP_SUSPEND, IPMI_BMC_GENERATED_GRATUITOUS_ARP_DO_NOT_SUSPEND, IPMI_BMC_GENERATED_ARP_RESPONSE_SUSPEND, IPMI_BMC_GENERATED_ARP_RESPONSE_DO_NOT_SUSPEND); if (cmd_args->daemon) fprintf (stderr, " -e SECS --reset-period=SECS Specify time interval before resetting timer.\n"); if (cmd_args->set || cmd_args->start || cmd_args->daemon) fprintf (stderr, "\n"); exit (EXIT_FAILURE); } static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct bmc_watchdog_arguments *cmd_args; char *endptr; int tmp; assert (state); cmd_args = state->input; switch (key) { case SET_KEY: cmd_args->set++; break; case GET_KEY: cmd_args->get++; break; case RESET_KEY: cmd_args->reset++; break; case START_KEY: cmd_args->start++; break; case STOP_KEY: cmd_args->stop++; break; case CLEAR_KEY: cmd_args->clear++; break; case DAEMON_KEY: cmd_args->daemon++; break; case LOGFILE_KEY: /* deprecated */ break; case VERBOSE_LOGGING_KEY: cmd_args->verbose_logging++; break; case NO_LOGGING_KEY: cmd_args->no_logging++; break; case TIMER_USE_KEY: cmd_args->timer_use++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_WATCHDOG_TIMER_TIMER_USE_VALID (tmp)) { fprintf (stderr, "invalid timer use\n"); exit (EXIT_FAILURE); } cmd_args->timer_use_arg = tmp; break; case STOP_TIMER_KEY: cmd_args->stop_timer++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_WATCHDOG_TIMER_STOP_TIMER_VALID (tmp)) { fprintf (stderr, "invalid stop timer value\n"); exit (EXIT_FAILURE); } cmd_args->stop_timer_arg = tmp; break; case LOG_KEY: cmd_args->log++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_WATCHDOG_TIMER_LOG_VALID (tmp)) { fprintf (stderr, "invalid log value\n"); exit (EXIT_FAILURE); } cmd_args->log_arg = tmp; break; case TIMEOUT_ACTION_KEY: cmd_args->timeout_action++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_WATCHDOG_TIMER_TIMEOUT_ACTION_VALID (tmp)) { fprintf (stderr, "invalid timeout action value\n"); exit (EXIT_FAILURE); } cmd_args->timeout_action_arg = tmp; break; case PRE_TIMEOUT_INTERRUPT_KEY: cmd_args->pre_timeout_interrupt++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERRUPT_VALID (tmp)) { fprintf (stderr, "invalid pre timeout interrupt value\n"); exit (EXIT_FAILURE); } cmd_args->pre_timeout_interrupt_arg = tmp; break; case PRE_TIMEOUT_INTERVAL_KEY: cmd_args->pre_timeout_interval++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid pre timeout interval\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MIN || tmp > IPMI_BMC_WATCHDOG_TIMER_PRE_TIMEOUT_INTERVAL_MAX) { fprintf (stderr, "pre timeout interval out of range\n"); exit (EXIT_FAILURE); } cmd_args->pre_timeout_interval_arg = tmp; break; case CLEAR_BIOS_FRB2_KEY: cmd_args->clear_bios_frb2++; break; case CLEAR_BIOS_POST_KEY: cmd_args->clear_bios_post++; break; case CLEAR_OS_LOAD_KEY: cmd_args->clear_os_load++; break; case CLEAR_SMS_OS_KEY: cmd_args->clear_sms_os++; break; case CLEAR_OEM_KEY: cmd_args->clear_oem++; break; case INITIAL_COUNTDOWN_KEY: cmd_args->initial_countdown_seconds++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid initial countdown\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN_SECONDS || tmp > IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX_SECONDS) { fprintf (stderr, "initial countdown out of range\n"); exit (EXIT_FAILURE); } cmd_args->initial_countdown_seconds_arg = tmp; break; case START_AFTER_SET_KEY: cmd_args->start_after_set++; break; case RESET_AFTER_SET_KEY: cmd_args->reset_after_set++; break; case START_IF_STOPPED_KEY: cmd_args->start_if_stopped++; break; case RESET_IF_RUNNING_KEY: cmd_args->reset_if_running++; break; case GRATUITOUS_ARP_KEY: cmd_args->gratuitous_arp++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_GENERATED_GRATUITOUS_ARP_VALID (tmp)) { fprintf (stderr, "invalid gratuitous arp value\n"); exit (EXIT_FAILURE); } cmd_args->gratuitous_arp_arg = tmp; break; case ARP_RESPONSE_KEY: cmd_args->arp_response++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !IPMI_BMC_GENERATED_ARP_RESPONSE_VALID (tmp)) { fprintf (stderr, "invalid arp response value\n"); exit (EXIT_FAILURE); } cmd_args->arp_response_arg = tmp; break; case RESET_PERIOD_KEY: cmd_args->reset_period++; errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid reset period\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MIN_SECONDS || tmp > IPMI_BMC_WATCHDOG_TIMER_INITIAL_COUNTDOWN_MAX_SECONDS) { fprintf (stderr, "reset period out of range\n"); exit (EXIT_FAILURE); } cmd_args->reset_period_arg = tmp; break; /* do not output default argp help, do internal help */ case HELP_KEY: cmd_args->help++; break; case VERSION_KEY: cmd_args->version++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _bmc_watchdog_config_file_parse (struct bmc_watchdog_arguments *cmd_args) { struct config_file_data_bmc_watchdog config_file_data; memset (&config_file_data, '\0', sizeof (struct config_file_data_bmc_watchdog)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND, CONFIG_FILE_TOOL_BMC_WATCHDOG, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_logging_count) cmd_args->verbose_logging = config_file_data.verbose_logging; if (config_file_data.no_logging_count) cmd_args->no_logging = config_file_data.no_logging; } static void _bmc_watchdog_args_validate (struct bmc_watchdog_arguments *cmd_args) { int count; assert (cmd_args); if (cmd_args->help) _usage (cmd_args); if (cmd_args->version) { fprintf (stderr, "%s\n", argp_program_version); exit (EXIT_FAILURE); } count = cmd_args->set + cmd_args->get + cmd_args->reset + cmd_args->start + cmd_args->stop + cmd_args->clear + cmd_args->daemon; if (!count) _usage (cmd_args); if (count > 1) { fprintf (stderr, "Only one command can be specified\n"); exit (EXIT_FAILURE); } if (((cmd_args->get || cmd_args->reset || cmd_args->start || cmd_args->stop || cmd_args->clear) && (cmd_args->timer_use || cmd_args->stop_timer || cmd_args->log || cmd_args->timeout_action || cmd_args->pre_timeout_interrupt || cmd_args->pre_timeout_interval || cmd_args->clear_bios_frb2 || cmd_args->clear_bios_post || cmd_args->clear_sms_os || cmd_args->clear_oem || cmd_args->initial_countdown_seconds || cmd_args->start_after_set || cmd_args->reset_after_set || cmd_args->reset_if_running || cmd_args->reset_period)) || (cmd_args->set && cmd_args->reset_period) || (cmd_args->daemon && (cmd_args->stop_timer || cmd_args->start_after_set || cmd_args->reset_after_set || cmd_args->reset_if_running)) || ((cmd_args->set || cmd_args->get || cmd_args->reset || cmd_args->stop || cmd_args->clear) && (cmd_args->gratuitous_arp || cmd_args->arp_response))) { char *cmdstr; cmdstr = _cmd_string (cmd_args); fprintf (stderr, "Invalid command option specified for '%s' command\n", cmdstr); exit (EXIT_FAILURE); } } void bmc_watchdog_argp_parse (int argc, char **argv, struct bmc_watchdog_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_user (&(cmd_args->common_args)); cmd_args->set = 0; cmd_args->get = 0; cmd_args->reset = 0; cmd_args->start = 0; cmd_args->stop = 0; cmd_args->clear = 0; cmd_args->daemon = 0; cmd_args->verbose_logging = 0; cmd_args->no_logging = 0; cmd_args->timer_use = 0; cmd_args->timer_use_arg = 0; cmd_args->stop_timer = 0; cmd_args->stop_timer_arg = 0; cmd_args->log = 0; cmd_args->log_arg = 0; cmd_args->timeout_action = 0; cmd_args->timeout_action_arg = 0; cmd_args->pre_timeout_interrupt = 0; cmd_args->pre_timeout_interrupt_arg = 0; cmd_args->pre_timeout_interval = 0; cmd_args->pre_timeout_interval_arg = 0; cmd_args->clear_bios_frb2 = 0; cmd_args->clear_bios_post = 0; cmd_args->clear_os_load = 0; cmd_args->clear_sms_os = 0; cmd_args->clear_oem = 0; cmd_args->initial_countdown_seconds = 0; cmd_args->initial_countdown_seconds_arg = 0; cmd_args->start_after_set = 0; cmd_args->reset_after_set = 0; cmd_args->start_if_stopped = 0; cmd_args->reset_if_running = 0; cmd_args->gratuitous_arp = 0; cmd_args->gratuitous_arp_arg = 0; cmd_args->arp_response = 0; cmd_args->arp_response_arg = 0; cmd_args->reset_period = 0; cmd_args->reset_period_arg = 0; cmd_args->help = 0; cmd_args->version = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER | ARGP_NO_HELP, NULL, &(cmd_args->common_args)); _bmc_watchdog_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER | ARGP_NO_HELP, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _bmc_watchdog_args_validate (cmd_args); } freeipmi-1.6.4/bmc-watchdog/bmc-watchdog-argp.h0000644002055400205540000000312613527331635021262 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: bmc-watchdog-argp.h,v 1.5 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2004-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155913 * * This file is part of Bmc-watchdog, a base management controller * (BMC) watchdog timer management tool. For details, see * http://www.llnl.gov/linux/. * * Bmc-Watchdog is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Bmc-Watchdog is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Bmc-Watchdog. If not, see . \*****************************************************************************/ #ifndef BMC_WATCHDOG_ARGP_H #define BMC_WATCHDOG_ARGP_H #include "bmc-watchdog.h" void bmc_watchdog_argp_parse (int argc, char **argv, struct bmc_watchdog_arguments *cmd_args); #endif /* BMC_WATCHDOG_ARGP_H */ freeipmi-1.6.4/ipmi-chassis/0000755002055400205540000000000013527342546015656 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-chassis/Makefile.in0000644002055400205540000007004513527342444017726 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-chassis$(EXEEXT) subdir = ipmi-chassis DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_chassis_OBJECTS = ipmi_chassis-ipmi-chassis.$(OBJEXT) \ ipmi_chassis-ipmi-chassis-argp.$(OBJEXT) ipmi_chassis_OBJECTS = $(am_ipmi_chassis_OBJECTS) ipmi_chassis_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_chassis_SOURCES) DIST_SOURCES = $(ipmi_chassis_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_chassis_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_chassis_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_chassis_SOURCES = \ ipmi-chassis.c \ ipmi-chassis.h \ ipmi-chassis-argp.c \ ipmi-chassis-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-chassis/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-chassis/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-chassis$(EXEEXT): $(ipmi_chassis_OBJECTS) $(ipmi_chassis_DEPENDENCIES) $(EXTRA_ipmi_chassis_DEPENDENCIES) @rm -f ipmi-chassis$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_chassis_OBJECTS) $(ipmi_chassis_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_chassis-ipmi-chassis.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_chassis-ipmi-chassis.o: ipmi-chassis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_chassis-ipmi-chassis.o -MD -MP -MF $(DEPDIR)/ipmi_chassis-ipmi-chassis.Tpo -c -o ipmi_chassis-ipmi-chassis.o `test -f 'ipmi-chassis.c' || echo '$(srcdir)/'`ipmi-chassis.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_chassis-ipmi-chassis.Tpo $(DEPDIR)/ipmi_chassis-ipmi-chassis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-chassis.c' object='ipmi_chassis-ipmi-chassis.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_chassis-ipmi-chassis.o `test -f 'ipmi-chassis.c' || echo '$(srcdir)/'`ipmi-chassis.c ipmi_chassis-ipmi-chassis.obj: ipmi-chassis.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_chassis-ipmi-chassis.obj -MD -MP -MF $(DEPDIR)/ipmi_chassis-ipmi-chassis.Tpo -c -o ipmi_chassis-ipmi-chassis.obj `if test -f 'ipmi-chassis.c'; then $(CYGPATH_W) 'ipmi-chassis.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-chassis.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_chassis-ipmi-chassis.Tpo $(DEPDIR)/ipmi_chassis-ipmi-chassis.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-chassis.c' object='ipmi_chassis-ipmi-chassis.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_chassis-ipmi-chassis.obj `if test -f 'ipmi-chassis.c'; then $(CYGPATH_W) 'ipmi-chassis.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-chassis.c'; fi` ipmi_chassis-ipmi-chassis-argp.o: ipmi-chassis-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_chassis-ipmi-chassis-argp.o -MD -MP -MF $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Tpo -c -o ipmi_chassis-ipmi-chassis-argp.o `test -f 'ipmi-chassis-argp.c' || echo '$(srcdir)/'`ipmi-chassis-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Tpo $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-chassis-argp.c' object='ipmi_chassis-ipmi-chassis-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_chassis-ipmi-chassis-argp.o `test -f 'ipmi-chassis-argp.c' || echo '$(srcdir)/'`ipmi-chassis-argp.c ipmi_chassis-ipmi-chassis-argp.obj: ipmi-chassis-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_chassis-ipmi-chassis-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Tpo -c -o ipmi_chassis-ipmi-chassis-argp.obj `if test -f 'ipmi-chassis-argp.c'; then $(CYGPATH_W) 'ipmi-chassis-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-chassis-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Tpo $(DEPDIR)/ipmi_chassis-ipmi-chassis-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-chassis-argp.c' object='ipmi_chassis-ipmi-chassis-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_chassis_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_chassis-ipmi-chassis-argp.obj `if test -f 'ipmi-chassis-argp.c'; then $(CYGPATH_W) 'ipmi-chassis-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-chassis-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-chassis/Makefile.am0000644002055400205540000000272013527331635017710 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-chassis ipmi_chassis_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_chassis_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_chassis_SOURCES = \ ipmi-chassis.c \ ipmi-chassis.h \ ipmi-chassis-argp.c \ ipmi-chassis-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-chassis/ipmi-chassis.c0000644002055400205540000015632613527331635020425 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-chassis.h" #include "ipmi-chassis-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-util-common.h" static int get_chassis_capabilities (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t fru_info_device_address; uint8_t sdr_device_address; uint8_t sel_device_address; uint8_t system_management_device_address; uint8_t bridge_device_address; int flag; uint64_t val = 0; int rv = -1; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_chassis_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_chassis_capabilities (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_chassis_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "capabilities_flags.provides_intrusion_sensor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'capabilities_flags.provides_intrusion_sensor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Intrusion sensor : %s\n", (val ? "provided" : "not provided")); if (FIID_OBJ_GET (obj_cmd_rs, "capabilities_flags.provides_front_panel_lockout", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'capabilities_flags.provides_front_panel_lockout': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Front Panel Lockout : %s\n", (val ? "provided" : "not provided")); if (FIID_OBJ_GET (obj_cmd_rs, "capabilities_flags.provides_diagnostic_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'capabilities_flags.provides_diagnostic_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Diagnostic Interrupt : %s\n", (val ? "provided" : "not provided")); if (FIID_OBJ_GET (obj_cmd_rs, "capabilities_flags.provides_power_interlock", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'capabilities_flags.provides_power_interlock': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power interlock : %s\n", (val ? "provided" : "not provided")); if (FIID_OBJ_GET (obj_cmd_rs, "fru_info_device_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'fru_info_device_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } fru_info_device_address = val; pstdout_printf (state_data->pstate, "FRU Info Device Address : %Xh %s\n", fru_info_device_address, (val ? "" : "(Unspecified)")); if (FIID_OBJ_GET (obj_cmd_rs, "sdr_device_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'sdr_device_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sdr_device_address = val; pstdout_printf (state_data->pstate, "SDR Device Address : %Xh\n", sdr_device_address); if (FIID_OBJ_GET (obj_cmd_rs, "sel_device_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'sel_device_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_device_address = val; pstdout_printf (state_data->pstate, "SEL Device Address : %Xh\n", sel_device_address); if (FIID_OBJ_GET (obj_cmd_rs, "system_management_device_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'system_management_device_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } system_management_device_address = val; pstdout_printf (state_data->pstate, "Sys Mgmt Device Address : %Xh\n", system_management_device_address); if ((flag = fiid_obj_get (obj_cmd_rs, "bridge_device_address", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'system_management_device_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bridge_device_address = val; if (flag) pstdout_printf (state_data->pstate, "Bridge Device Address : %Xh\n", bridge_device_address); else pstdout_printf (state_data->pstate, "Bridge Device Address : 20h (assuming default)\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_chassis_status (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0, temp_val; char *str; int rv = -1; int flag; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_chassis_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_chassis_status (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_chassis_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_is_on", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.power_is_on': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "System Power : %s\n", val ? "on" : "off"); if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_overload", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.power_overload': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power overload : %s\n", val ? "true" : "false"); if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.interlock", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.interlock': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Interlock : %s\n", val ? "active" : "inactive"); if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_fault", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.power_fault': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power fault : %s\n", val ? "true" : "false"); if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_control_fault", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.power_control_fault': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power control fault : %s\n", val ? "true" : "false"); if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_restore_policy", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_power_state.power_restore_policy': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } switch (val) { case IPMI_POWER_RESTORE_POLICY_POWERED_OFF_AFTER_AC_RETURNS: str = "Always off"; break; case IPMI_POWER_RESTORE_POLICY_POWER_RESTORED_TO_STATE: str = "Restore"; break; case IPMI_POWER_RESTORE_POLICY_POWERS_UP_AFTER_AC_RETURNS: str = "Always on"; break; case IPMI_POWER_RESTORE_POLICY_UNKNOWN: default: str = "unknown"; break; } pstdout_printf (state_data->pstate, "Power restore policy : %s\n", str); temp_val = IPMI_LAST_POWER_EVENT_UNKNOWN; if (FIID_OBJ_GET (obj_cmd_rs, "last_power_event.ac_failed", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'last_power_event.ac_failed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { temp_val = IPMI_LAST_POWER_EVENT_AC_FAILED; goto print; } if (FIID_OBJ_GET (obj_cmd_rs, "last_power_event.power_down_caused_by_power_overload", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'last_power_event.power_down_caused_by_power_overload': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { temp_val = IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_OVERLOAD; goto print; } if (FIID_OBJ_GET (obj_cmd_rs, "last_power_event.power_down_caused_by_power_interlock_being_activated", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'last_power_event.power_down_caused_by_power_interlock_being_activated': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { temp_val = IPMI_LAST_POWER_EVENT_POWER_DOWN_INTERLOCK_ACTIVATED; goto print; } if (FIID_OBJ_GET (obj_cmd_rs, "last_power_event.power_down_caused_by_power_fault", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'last_power_event.power_down_caused_by_power_fault': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { temp_val = IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_FAULT; goto print; } if (FIID_OBJ_GET (obj_cmd_rs, "last_power_event.power_on_entered_via_ipmi", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'last_power_event.power_on_entered_via_ipmi': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) temp_val = IPMI_LAST_POWER_EVENT_POWER_ON_VIA_IPMI; print: switch (temp_val) { case IPMI_LAST_POWER_EVENT_AC_FAILED: str = "ac failed"; break; case IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_OVERLOAD: str = "power down due to power overload"; break; case IPMI_LAST_POWER_EVENT_POWER_DOWN_INTERLOCK_ACTIVATED: str = "power down due to Activation of interlock switch"; break; case IPMI_LAST_POWER_EVENT_POWER_DOWN_POWER_FAULT: str = "power down due to power fault"; break; case IPMI_LAST_POWER_EVENT_POWER_ON_VIA_IPMI: str = "power on via ipmi command"; break; default: str = "unknown"; break; } pstdout_printf (state_data->pstate, "Last Power Event : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.chassis_intrusion_active", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.chassis_intrusion_active': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Chassis intrusion : %s\n", val ? "active" : "inactive"); if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.front_panel_lockout_active", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.front_panel_lockout_active': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Front panel lockout : %s\n", val ? "active" : "inactive"); if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.drive_fault", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.drive_fault': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Drive Fault : %s\n", val ? "true" : "false"); if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.cooling_fan_fault_detected", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.cooling_fan_fault_detected': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Cooling/fan fault : %s\n", val ? "true" : "false"); if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.chassis_identify_command_and_state_info_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.chassis_identify_command_and_state_info_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "misc_chassis_state.chassis_identify_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'misc_chassis_state.chassis_identify_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } switch (val) { case IPMI_CHASSIS_IDENTIFY_STATE_OFF: str = "off"; break; case IPMI_CHASSIS_IDENTIFY_STATE_TEMPORARY_ON: str = "Timed on"; break; case IPMI_CHASSIS_IDENTIFY_STATE_INDEFINITE_ON: str = "Indefinite on"; break; default: str = "unknown"; break; } pstdout_printf (state_data->pstate, "Chassis Identify state : %s\n", str); } if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.power_off_button_disabled", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.power_off_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) { pstdout_printf (state_data->pstate, "Power off button : %s\n", val ? "disabled" : "enabled"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.reset_button_disabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.reset_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Reset button : %s\n", val ? "disabled" : "enabled"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.diagnostic_interrupt_button_disabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.diagnostic_interrupt_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Diagnostic Interrupt button : %s\n", val ? "disabled" : "enabled"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.standby_button_disabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.standby_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Standby button : %s\n", val ? "disabled" : "enabled"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.power_off_button_disable_allowed", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.power_off_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power off button disable : %s\n", val ? "allowed" : "unallowed"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.reset_button_disable_allowed", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.reset_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Reset button disable : %s\n", val ? "allowed" : "unallowed"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.diagnostic_interrupt_button_disable_allowed", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.diagnostic_interrupt_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Diagnostic interrupt button disable : %s\n", val ? "allowed" : "unallowed"); if (FIID_OBJ_GET (obj_cmd_rs, "front_panel.standby_button_disable_allowed", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'front_panel.standby_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Standby button disable : %s\n", val ? "allowed" : "unallowed"); } pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int chassis_control (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; struct ipmi_chassis_arguments *args; args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_chassis_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_chassis_control (state_data->ipmi_ctx, args->chassis_control_arg, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_chassis_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int chassis_identify (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; struct ipmi_chassis_arguments *args; args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_chassis_identify_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_chassis_identify (state_data->ipmi_ctx, (args->chassis_identify_args.identify_interval) ? &args->chassis_identify_args.identify_interval_arg : NULL, (args->chassis_identify_args.force_identify) ? &args->chassis_identify_args.force_identify_arg : NULL, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_chassis_identify: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_power_restore_policy (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; int rv = -1; struct ipmi_chassis_arguments *args; args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_power_restore_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_power_restore_policy (state_data->ipmi_ctx, args->set_power_restore_policy_arg, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_power_restore_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (args->set_power_restore_policy_arg == IPMI_POWER_RESTORE_POLICY_NO_CHANGE) { char policy_supported[100]; memset (policy_supported, '\0', sizeof (policy_supported)); if (FIID_OBJ_GET (obj_cmd_rs, "powered_off_after_ac_mains_returns", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'powered_off_after_ac_mains_returns': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) strcat (policy_supported, "always-off "); if (FIID_OBJ_GET (obj_cmd_rs, "always_powering_up_after_ac_mains_returns", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'always_powering_up_after_ac_mains_returns': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) strcat (policy_supported, "always-on "); if (FIID_OBJ_GET (obj_cmd_rs, "restoring_power_to_state_when_ac_mains_was_lost", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'restoring_power_to_state_when_ac_mains_was_lost': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) strcat (policy_supported, "Restore"); pstdout_printf (state_data->pstate, "Policies supported : %s\n", policy_supported); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_power_cycle_interval (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; int rv = -1; struct ipmi_chassis_arguments *args; args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_power_cycle_interval_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_power_cycle_interval (state_data->ipmi_ctx, args->set_power_cycle_interval_arg, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_power_cycle_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_system_restart_cause (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; char *restart_cause_str; int rv = -1; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_restart_cause_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_restart_cause (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_restart_cause: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "restart_cause", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'restart_cause': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } switch (val) { case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_UNKNOWN: restart_cause_str = "unknown"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_CHASSIS_CONTROL_COMMAND: restart_cause_str = "Chassis control command"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PUSHBUTTON: restart_cause_str = "Reset via pushbutton"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_POWER_PUSHBUTTON: restart_cause_str = "Power up via power pushbutton"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_WATCHDOG_EXPIRATION: restart_cause_str = "Watchdog expiration"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_OEM: restart_cause_str = "OEM"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_ALWAYS_RESTORE: restart_cause_str = "Automatic power-up on AC being applied due to \"always restore\" power restore policy"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_AUTOMATIC_POWER_UP_RESTORE_PREVIOUS: restart_cause_str = "Automatic power-up on AC being applied due to \"restore previous power state\" power restore policy"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_RESET_VIA_PEF: restart_cause_str = "Reset via PEF"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_CYCLE_VIA_PEF: restart_cause_str = "Power cycle via PEF"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_SOFT_RESET: restart_cause_str = "Soft reset"; break; case IPMI_CHASSIS_SYSTEM_RESTART_CAUSE_POWER_UP_VIA_RTC: restart_cause_str = "Power up via RTC"; break; default: restart_cause_str = "unknown"; } pstdout_printf (state_data->pstate, "Restart cause : %s\n", restart_cause_str); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_power_on_hours_counter (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; uint8_t minutes_per_counter; uint32_t counter_reading, min, hrs; int rv = -1; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_power_on_hours_counter_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_power_on_hours_counter (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_power_on_hours_counter: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "minutes_per_counter", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'minutes_per_counter': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minutes_per_counter = val; if (FIID_OBJ_GET (obj_cmd_rs, "counter_reading", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'counter_reading': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } counter_reading = val; min = counter_reading / minutes_per_counter; hrs = min / 60; min = min % 60; pstdout_printf (state_data->pstate, "Power on hours : %u Hours %u Minutes\n", hrs, min); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_boot_flags (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; int rv = -1; char *str; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_boot_options_boot_flags_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_boot_options_boot_flags (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_NO_SET_SELECTOR, IPMI_SYSTEM_BOOT_OPTIONS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_boot_options_boot_flags failed: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "bios_boot_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'bios_boot_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE) str = "PC compatible boot"; else str = "Extensible firmware Interface boot"; pstdout_printf (state_data->pstate, "BIOS boot type : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_reset_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_reset_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Lock out reset buttons : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "screen_blank", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'screen_blank': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Screen blank : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "boot_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'boot_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE) str = "No override"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE) str = "Force PXE"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE) str = "Force boot from default Hard drive"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE) str = "Force boot from default Hard drive, request safe mode"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION) str = "Force boot from default Diagnostic partition"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD) str = "Force boot from default CD/DVD"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP) str = "Force boot into BIOS setup"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA) str = "Force boot from default Floppy/primary removable media"; else str = "unknown"; pstdout_printf (state_data->pstate, "Boot device selector : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "lock_keyboard", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_keyboard': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Lock keyboard : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "cmos_clear", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'cmos_clear': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Clear CMOS : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "console_redirection", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'console_redirection': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT) str = "System default"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS) str = "Suppressed"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE) str = "Enabled"; else str = "unknown"; pstdout_printf (state_data->pstate, "Console redirection control : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_sleep_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_sleep_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Lock out sleep button : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "user_password_bypass", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'user_password_bypass': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "User password bypass : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_reset_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_reset_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Lock out reset button : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "force_progress_event_traps", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'force_progress_event_traps': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Force progress event traps : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "firmware_bios_verbosity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'firmware_bios_verbosity': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET) str = "Quiet"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE) str = "Verbose"; else if (val == IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT) str = "Default"; else str = "unknown"; pstdout_printf (state_data->pstate, "Firmware BIOS verbosity level : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_via_power_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_via_power_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val == IPMI_SYSTEM_BOOT_OPTION_ENABLE) str = "Enabled"; else str = "Disabled"; pstdout_printf (state_data->pstate, "Lock out via power button : %s\n", str); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_boot_flags (ipmi_chassis_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; fiid_obj_t boot_info_ack_obj_cmd_rs = NULL; fiid_obj_t get_boot_flags_rs = NULL; uint8_t boot_info_acknowledge = IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE; uint8_t bios_boot_type, boot_flags_persistent, boot_flags_valid, lock_out_reset_button, screen_blank, boot_device, lock_keyboard, cmos_clear, console_redirection, lock_out_sleep_button, user_password_bypass, force_progress_event_traps, firmware_bios_verbosity, lock_out_via_power_button, bios_mux_control_override, bios_shared_mode_override; uint64_t val =0; int rv = -1; struct ipmi_chassis_arguments *args; args = state_data->prog_data->args; if (!(get_boot_flags_rs = fiid_obj_create (tmpl_cmd_get_system_boot_options_boot_flags_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!(boot_info_ack_obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_boot_options_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_boot_options_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_boot_options_boot_flags (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_NO_SET_SELECTOR, IPMI_SYSTEM_BOOT_OPTIONS_NO_BLOCK_SELECTOR, get_boot_flags_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_boot_options_boot_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (args->set_system_boot_options_args.bios_boot_type) { if (FIID_OBJ_GET (get_boot_flags_rs, "bios_boot_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'bios_boot_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bios_boot_type = val; } else bios_boot_type = args->set_system_boot_options_args.bios_boot_type_arg; boot_flags_persistent = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID_FOR_NEXT_BOOT; boot_flags_valid = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID; if (args->set_system_boot_options_args.lock_out_reset_button) { if (FIID_OBJ_GET (get_boot_flags_rs, "lock_out_reset_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_reset_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } lock_out_reset_button = val; } else lock_out_reset_button = args->set_system_boot_options_args.lock_out_reset_button_arg; if (args->set_system_boot_options_args.screen_blank) { if (FIID_OBJ_GET (get_boot_flags_rs, "screen_blank", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'screen_blank': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } screen_blank = val; } else screen_blank = args->set_system_boot_options_args.screen_blank_arg; if (args->set_system_boot_options_args.boot_device) { if (FIID_OBJ_GET (get_boot_flags_rs, "boot_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'boot_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } boot_device = val; } else boot_device = args->set_system_boot_options_args.boot_device_arg; if (args->set_system_boot_options_args.lock_keyboard) { if (FIID_OBJ_GET (get_boot_flags_rs, "lock_keyboard", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_keyboard': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } lock_keyboard = val; } else lock_keyboard = args->set_system_boot_options_args.lock_keyboard_arg; if (args->set_system_boot_options_args.cmos_clear) { if (FIID_OBJ_GET (get_boot_flags_rs, "cmos_clear", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'cmos_clear': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cmos_clear = val; } else cmos_clear = args->set_system_boot_options_args.cmos_clear_arg; if (args->set_system_boot_options_args.console_redirection) { if (FIID_OBJ_GET (get_boot_flags_rs, "console_redirection", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'console_redirection': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } console_redirection = val; } else console_redirection = args->set_system_boot_options_args.console_redirection_arg; if (FIID_OBJ_GET (get_boot_flags_rs, "lock_out_sleep_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_sleep_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } lock_out_sleep_button = val; if (args->set_system_boot_options_args.user_password_bypass) { if (FIID_OBJ_GET (get_boot_flags_rs, "user_password_bypass", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'user_password_bypass': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } user_password_bypass = val; } else user_password_bypass = args->set_system_boot_options_args.user_password_bypass_arg; if (args->set_system_boot_options_args.force_progress_event_traps) { if (FIID_OBJ_GET (get_boot_flags_rs, "force_progress_event_traps", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'force_progress_event_traps': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } force_progress_event_traps = val; } else force_progress_event_traps = args->set_system_boot_options_args.force_progress_event_traps_arg; if (args->set_system_boot_options_args.firmware_bios_verbosity) { if (FIID_OBJ_GET (get_boot_flags_rs, "firmware_bios_verbosity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'firmware_bios_verbosity': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } firmware_bios_verbosity = val; } else firmware_bios_verbosity = args->set_system_boot_options_args.firmware_bios_verbosity_arg; if (FIID_OBJ_GET (get_boot_flags_rs, "lock_out_via_power_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'lock_out_via_power_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } lock_out_via_power_button = val; if (FIID_OBJ_GET (get_boot_flags_rs, "bios_mux_control_override", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'bios_mux_control_override': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bios_mux_control_override = val; if (FIID_OBJ_GET (get_boot_flags_rs, "bios_shared_mode_override", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'bios_shared_mode_override': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bios_shared_mode_override = val; if (ipmi_cmd_set_system_boot_options_boot_flags (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED, bios_boot_type, boot_flags_persistent, boot_flags_valid, lock_out_reset_button, screen_blank, boot_device, lock_keyboard, cmos_clear, console_redirection, lock_out_sleep_button, user_password_bypass, force_progress_event_traps, firmware_bios_verbosity, lock_out_via_power_button, bios_mux_control_override, bios_shared_mode_override, 0, /* no device instance, legacy input */ obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sytem_boot_option_boot_flags failed: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_set_system_boot_options_boot_info_acknowledge (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, boot_info_ack_obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_system_boot_options_boot_info_acknowledge: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (get_boot_flags_rs); fiid_obj_destroy (boot_info_ack_obj_cmd_rs); fiid_obj_destroy (obj_cmd_rs); return (rv); } static int run_cmd_args (ipmi_chassis_state_data_t *state_data) { struct ipmi_chassis_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (args->get_chassis_capabilities) return (get_chassis_capabilities (state_data)); if (args->get_chassis_status) return (get_chassis_status (state_data)); if (args->chassis_control) return (chassis_control (state_data)); if (args->chassis_identify) return (chassis_identify (state_data)); /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ if (args->set_power_restore_policy) return (set_power_restore_policy (state_data)); /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ if (args->set_power_cycle_interval) return (set_power_cycle_interval (state_data)); if (args->get_system_restart_cause) return (get_system_restart_cause (state_data)); /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ if (args->set_system_boot_options) return (set_boot_flags (state_data)); if (args->get_system_boot_options) return (get_boot_flags (state_data)); if (args->get_power_on_hours_counter) return (get_power_on_hours_counter (state_data)); rv = 0; return (rv); } static int _ipmi_chassis (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_chassis_state_data_t state_data; ipmi_chassis_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (ipmi_chassis_prog_data_t *)arg; memset (&state_data, '\0', sizeof (ipmi_chassis_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_chassis_prog_data_t prog_data; struct ipmi_chassis_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_chassis_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_chassis, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-chassis/ipmi-chassis.h0000644002055400205540000000650413527331635020422 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHASSIS_H #define IPMI_CHASSIS_H #include #include "tool-cmdline-common.h" #include "pstdout.h" enum ipmi_chassis_argp_option_keys { GET_CHASSIS_CAPABILITIES_KEY = 160, GET_CHASSIS_STATUS_KEY = 161, CHASSIS_CONTROL_KEY = 162, CHASSIS_IDENTIFY_KEY = 163, GET_SYSTEM_RESTART_CAUSE_KEY = 164, GET_POWER_ON_HOURS_COUNTER_KEY = 165, SET_POWER_CYCLE_INTERVAL_KEY = 166, GET_BOOT_FLAGS_KEY = 167, SET_BOOT_FLAGS_KEY = 168, SET_BOOT_FLAGS_BOOT_TYPE_KEY = 169, SET_BOOT_FLAGS_LOCK_OUT_RESET_BUTTON_KEY = 170, SET_BOOT_FLAGS_SCREEN_BLANK_KEY = 171, SET_BOOT_FLAGS_BOOT_DEVICE_KEY = 172, SET_BOOT_FLAGS_LOCK_KEYBOARD_KEY = 173, SET_BOOT_FLAGS_CMOS_CLEAR_KEY = 174, SET_BOOT_FLAGS_CONSOLE_REDIRECTION_KEY = 175, SET_BOOT_FLAGS_USER_PASSWORD_BYPASS_KEY = 176, SET_BOOT_FLAGS_FORCE_PROGRESS_EVENT_TRAPS_KEY = 177, SET_BOOT_FLAGS_FIRMWARE_BIOS_VERBOSITY_KEY = 178, SET_POWER_RESTORE_POLICY_KEY = 179, }; struct cmd_set_system_boot_options { int bios_boot_type; uint8_t bios_boot_type_arg; int lock_out_reset_button; uint8_t lock_out_reset_button_arg; int screen_blank; uint8_t screen_blank_arg; int boot_device; uint8_t boot_device_arg; int lock_keyboard; uint8_t lock_keyboard_arg; int cmos_clear; uint8_t cmos_clear_arg; int console_redirection; uint8_t console_redirection_arg; int user_password_bypass; uint8_t user_password_bypass_arg; int force_progress_event_traps; uint8_t force_progress_event_traps_arg; int firmware_bios_verbosity; uint8_t firmware_bios_verbosity_arg; }; struct cmd_chassis_identify { int identify_interval; uint8_t identify_interval_arg; int force_identify; uint8_t force_identify_arg; }; struct ipmi_chassis_arguments { struct common_cmd_args common_args; int get_chassis_capabilities; int get_chassis_status; int chassis_control; uint8_t chassis_control_arg; int chassis_identify; struct cmd_chassis_identify chassis_identify_args; int set_power_restore_policy; uint8_t set_power_restore_policy_arg; int set_power_cycle_interval; uint8_t set_power_cycle_interval_arg; int get_system_restart_cause; int set_system_boot_options; struct cmd_set_system_boot_options set_system_boot_options_args; int get_system_boot_options; int get_power_on_hours_counter; }; typedef struct ipmi_chassis_prog_data { char *progname; struct ipmi_chassis_arguments *args; } ipmi_chassis_prog_data_t; typedef struct ipmi_chassis_state_data { ipmi_chassis_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; } ipmi_chassis_state_data_t; #endif /* IPMI_CHASSIS_H */ freeipmi-1.6.4/ipmi-chassis/ipmi-chassis-argp.c0000644002055400205540000005370213527331635021346 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include #include "ipmi-chassis.h" #include "ipmi-chassis-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-chassis - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-chassis - IPMI chassis management utility"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, /* for backwards compatability */ { "get-capabilities", GET_CHASSIS_CAPABILITIES_KEY, NULL, OPTION_HIDDEN, "Get chassis capabilities.", 40}, /* for backwards compatability */ { "get-status", GET_CHASSIS_STATUS_KEY, NULL, OPTION_HIDDEN, "Get chassis status.", 41}, { "get-chassis-capabilities", GET_CHASSIS_CAPABILITIES_KEY, NULL, 0, "Get chassis capabilities.", 40}, { "get-chassis-status", GET_CHASSIS_STATUS_KEY, NULL, 0, "Get chassis status.", 41}, { "chassis-control", CHASSIS_CONTROL_KEY, "CONTROL", 0, "Control the chassis.", 42}, { "chassis-identify", CHASSIS_IDENTIFY_KEY, "IDENTIFY", 0, "Set chassis Identification.", 43}, /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ { "set-power-restore-policy", SET_POWER_RESTORE_POLICY_KEY, "POLICY", OPTION_HIDDEN, "Set power restore policy.", 44}, { "set-power-cycle-interval", SET_POWER_CYCLE_INTERVAL_KEY, "SECONDS", OPTION_HIDDEN, "Set Power cycle interval in seconds.", 45}, { "get-system-restart-cause", GET_SYSTEM_RESTART_CAUSE_KEY, NULL, 0, "Get system restart cause.", 46}, { "set-boot-flags", SET_BOOT_FLAGS_KEY, NULL, OPTION_HIDDEN, "Set system boot flags.", 47}, { "boot-type", SET_BOOT_FLAGS_BOOT_TYPE_KEY, "BOOT_TYPE", OPTION_HIDDEN, "Set BIOS boot type to BOOT_TYPE.", 48}, { "lock-out-reset-button", SET_BOOT_FLAGS_LOCK_OUT_RESET_BUTTON_KEY, "LOCK_OUT_RESET_BUTTON", OPTION_HIDDEN, "Modify lock out reset button support.", 49}, { "blank-screen", SET_BOOT_FLAGS_SCREEN_BLANK_KEY, "BLANK_SCREEN", OPTION_HIDDEN, "Modify blank screen support.", 50}, { "boot-device", SET_BOOT_FLAGS_BOOT_DEVICE_KEY, "BOOT_DEVICE", OPTION_HIDDEN, "Set device to boot from to BOOT_DEVICE.", 51}, { "lock-keyboard", SET_BOOT_FLAGS_LOCK_KEYBOARD_KEY, "LOCK_KEYBOARD", OPTION_HIDDEN, "Modify lock keyboard support.", 52}, { "clear-cmos", SET_BOOT_FLAGS_CMOS_CLEAR_KEY, "CMOS_CLEAR", OPTION_HIDDEN, "Modify clear CMOS support.", 53}, { "console-redirection", SET_BOOT_FLAGS_CONSOLE_REDIRECTION_KEY, "CONSOLE_REDIRECTION", OPTION_HIDDEN, "Set console redirection type.", 54}, { "user-password-bypass", SET_BOOT_FLAGS_USER_PASSWORD_BYPASS_KEY, "USER_PASSWORD_BYPASS", OPTION_HIDDEN, "Modify user password bypass support.", 54}, { "force-progress-event-traps", SET_BOOT_FLAGS_FORCE_PROGRESS_EVENT_TRAPS_KEY, "FORCE_PROGRESS_EVENT_TRAPS", OPTION_HIDDEN, "Modify force progress event traps support.", 55}, { "firmware-bios-verbosity", SET_BOOT_FLAGS_FIRMWARE_BIOS_VERBOSITY_KEY, "FIRMWARE_BIOS_VERBOSITY", OPTION_HIDDEN, "Set firmware verbosity.", 56}, { "get-boot-flags", GET_BOOT_FLAGS_KEY, NULL, OPTION_HIDDEN, "Get system boot-flags.", 57}, { "get-power-on-hours-counter", GET_POWER_ON_HOURS_COUNTER_KEY, NULL, 0, "Get power on hours (POH) counter.", 58}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t boot_flag_parse (int key, char *arg, struct argp_state *state); /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ static error_t boot_flag_parse (int key, char *arg, struct argp_state *state) { struct ipmi_chassis_arguments *cmd_args; uint8_t value = 0; assert (state); cmd_args = state->input; switch (key) { case SET_BOOT_FLAGS_BOOT_TYPE_KEY: if (!strcasecmp (arg, "pc-compatible")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE; else if (!strcasecmp (arg, "efi")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI; else { fprintf (stderr, "invalid value for boot-type\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.bios_boot_type++; cmd_args->set_system_boot_options_args.bios_boot_type_arg = value; break; case SET_BOOT_FLAGS_LOCK_OUT_RESET_BUTTON_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for lock-out-reset-button\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.lock_out_reset_button++; cmd_args->set_system_boot_options_args.lock_out_reset_button_arg = value; break; case SET_BOOT_FLAGS_SCREEN_BLANK_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for blank-screen\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.screen_blank++; cmd_args->set_system_boot_options_args.screen_blank_arg = value; break; case SET_BOOT_FLAGS_BOOT_DEVICE_KEY: /* achu: many legacy inputs are preserved */ if (!strcasecmp (arg, "no-override") || !strcasecmp (arg, "none")) /* legacy */ value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE; else if (!strcasecmp (arg, "pxe")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE; else if (!strcasecmp (arg, "hard-drive") || !strcasecmp (arg, "disk")) /* legacy */ value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE; else if (!strcasecmp (arg, "hard-drive-safe") || !strcasecmp (arg, "disk-safe")) /* legacy */ value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE; else if (!strcasecmp (arg, "diag")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION; else if (!strcasecmp (arg, "cd-dvd")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD; else if (!strcasecmp (arg, "bios")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP; else if (!strcasecmp (arg, "floppy")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA; else { fprintf (stderr, "invalid value for boot-device\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.boot_device++; cmd_args->set_system_boot_options_args.boot_device_arg = value; break; case SET_BOOT_FLAGS_LOCK_KEYBOARD_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for lock-keyboard\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.lock_keyboard++; cmd_args->set_system_boot_options_args.lock_keyboard_arg = value; break; case SET_BOOT_FLAGS_CMOS_CLEAR_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for clear-cmos\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.cmos_clear++; cmd_args->set_system_boot_options_args.cmos_clear_arg = value; break; case SET_BOOT_FLAGS_CONSOLE_REDIRECTION_KEY: if (!strcasecmp (arg, "default")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_DEFAULT; else if (!strcasecmp (arg, "suppress")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS; else if (!strcasecmp (arg, "enable")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE; else { fprintf (stderr, "invalid value for console-redirection\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.console_redirection++; cmd_args->set_system_boot_options_args.console_redirection_arg = value; break; case SET_BOOT_FLAGS_USER_PASSWORD_BYPASS_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for user-password-bypass\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.user_password_bypass++; cmd_args->set_system_boot_options_args.user_password_bypass_arg = value; break; case SET_BOOT_FLAGS_FORCE_PROGRESS_EVENT_TRAPS_KEY: if (!strcasecmp (arg, "yes")) value = IPMI_SYSTEM_BOOT_OPTION_ENABLE; else if (!strcasecmp (arg, "no")) value = IPMI_SYSTEM_BOOT_OPTION_DISABLE; else { fprintf (stderr, "invalid value for force-progress-event-traps\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.force_progress_event_traps++; cmd_args->set_system_boot_options_args.force_progress_event_traps_arg = value; break; case SET_BOOT_FLAGS_FIRMWARE_BIOS_VERBOSITY_KEY: if (!strcasecmp (arg, "quiet")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET; else if (!strcasecmp (arg, "default")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT; else if (!strcasecmp (arg, "verbose")) value = IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE; else { fprintf (stderr, "invalid value for firmware verbosity\n"); exit (EXIT_FAILURE); } cmd_args->set_system_boot_options_args.firmware_bios_verbosity++; cmd_args->set_system_boot_options_args.firmware_bios_verbosity_arg = value; break; default: return (ARGP_ERR_UNKNOWN); } return (0); } static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { error_t ret; char *endptr = NULL; struct ipmi_chassis_arguments *cmd_args; int tmp; assert (state); cmd_args = state->input; switch (key) { case GET_CHASSIS_CAPABILITIES_KEY: cmd_args->get_chassis_capabilities++; break; case GET_CHASSIS_STATUS_KEY: cmd_args->get_chassis_status++; break; case CHASSIS_CONTROL_KEY: if (!strcasecmp (arg, "power-down")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_POWER_DOWN; else if (!strcasecmp (arg, "power-up")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_POWER_UP; else if (!strcasecmp (arg, "power-cycle")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_POWER_CYCLE; else if (!strcasecmp (arg, "hard-reset")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_HARD_RESET; else if (!strcasecmp (arg, "diagnostic-interrupt")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT; else if (!strcasecmp (arg, "soft-shutdown")) cmd_args->chassis_control_arg = IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN; else { fprintf (stderr, "invalid value for chassis control\n"); exit (EXIT_FAILURE); } cmd_args->chassis_control++; break; case CHASSIS_IDENTIFY_KEY: if (!strcasecmp (arg, "turn-off")) { cmd_args->chassis_identify_args.identify_interval = 1; cmd_args->chassis_identify_args.identify_interval_arg = 0; cmd_args->chassis_identify_args.force_identify = 0; } else if (!strcasecmp (arg, "force")) { cmd_args->chassis_identify_args.force_identify = 1; cmd_args->chassis_identify_args.force_identify_arg = IPMI_CHASSIS_FORCE_IDENTIFY_ON; /* Need to have identify_interval set if force_identify is set */ cmd_args->chassis_identify_args.identify_interval = 1; cmd_args->chassis_identify_args.identify_interval_arg = 0xFF; } else { errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for chassis-identify\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_CHASSIS_IDENTIFY_INTERVAL_MIN || tmp > IPMI_CHASSIS_IDENTIFY_INTERVAL_MAX) { fprintf (stderr, "chassis-identify interval out of range\n"); exit (EXIT_FAILURE); } cmd_args->chassis_identify_args.identify_interval = 1; cmd_args->chassis_identify_args.identify_interval_arg = tmp; cmd_args->chassis_identify_args.force_identify = 0; } cmd_args->chassis_identify++; break; case SET_POWER_RESTORE_POLICY_KEY: if (!strcasecmp (arg, "always-on")) cmd_args->set_power_restore_policy_arg = IPMI_POWER_RESTORE_POLICY_ALWAYS_POWER_UP_AFTER_AC_IS_LOST; else if (!strcasecmp (arg, "always-off")) cmd_args->set_power_restore_policy_arg = IPMI_POWER_RESTORE_POLICY_ALWAYS_STAY_POWERED_OFF; else if (!strcasecmp (arg, "restore")) cmd_args->set_power_restore_policy_arg = IPMI_POWER_RESTORE_POLICY_RESTORE_POWER_TO_STATE_WHEN_AC_WAS_LOST; else if (!strcasecmp (arg, "list-supported-policies")) cmd_args->set_power_restore_policy_arg = IPMI_POWER_RESTORE_POLICY_NO_CHANGE; else { fprintf (stderr, "invalid value for power restore policy\n"); exit (EXIT_FAILURE); } cmd_args->set_power_restore_policy++; break; case SET_POWER_CYCLE_INTERVAL_KEY: errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for power cycle interval\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MIN || tmp > IPMI_CHASSIS_POWER_CYCLE_INTERVAL_MAX) { fprintf (stderr, "power-cycle interval out of range\n"); exit (EXIT_FAILURE); } cmd_args->set_power_cycle_interval_arg = tmp; cmd_args->set_power_cycle_interval++; break; case GET_SYSTEM_RESTART_CAUSE_KEY: cmd_args->get_system_restart_cause++; break; case SET_BOOT_FLAGS_KEY: cmd_args->set_system_boot_options++; break; case GET_BOOT_FLAGS_KEY: cmd_args->get_system_boot_options++; break; case GET_POWER_ON_HOURS_COUNTER_KEY: cmd_args->get_power_on_hours_counter++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: /* All chassis "set" operations are legacy, see ipmi-config for chassis configuration */ ret = boot_flag_parse (key, arg, state); if (ret == ARGP_ERR_UNKNOWN) ret = common_parse_opt (key, arg, &(cmd_args->common_args)); return (ret); } return (0); } static void _ipmi_chassis_config_file_parse (struct ipmi_chassis_arguments *cmd_args) { assert (cmd_args); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_CHASSIS, NULL) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } } static void _ipmi_chassis_args_validate (struct ipmi_chassis_arguments *cmd_args) { assert (cmd_args); if (!cmd_args->get_chassis_capabilities && !cmd_args->get_chassis_status && !cmd_args->chassis_control && !cmd_args->chassis_identify && !cmd_args->set_power_restore_policy && !cmd_args->set_power_cycle_interval && !cmd_args->get_system_restart_cause && !cmd_args->set_system_boot_options && !cmd_args->get_system_boot_options && !cmd_args->get_power_on_hours_counter) { fprintf (stderr, "No command specified.\n"); exit (EXIT_FAILURE); } if ((cmd_args->get_chassis_capabilities + cmd_args->get_chassis_status + cmd_args->chassis_control + cmd_args->chassis_identify + cmd_args->set_power_restore_policy + cmd_args->set_power_cycle_interval + cmd_args->get_system_restart_cause + cmd_args->set_system_boot_options + cmd_args->get_system_boot_options + cmd_args->get_power_on_hours_counter) > 1) { fprintf (stderr, "Multiple commands specified.\n"); exit (EXIT_FAILURE); } if (cmd_args->set_system_boot_options && (!cmd_args->set_system_boot_options_args.bios_boot_type && !cmd_args->set_system_boot_options_args.lock_out_reset_button && !cmd_args->set_system_boot_options_args.screen_blank && !cmd_args->set_system_boot_options_args.boot_device && !cmd_args->set_system_boot_options_args.lock_keyboard && !cmd_args->set_system_boot_options_args.cmos_clear && !cmd_args->set_system_boot_options_args.console_redirection && !cmd_args->set_system_boot_options_args.user_password_bypass && !cmd_args->set_system_boot_options_args.force_progress_event_traps && !cmd_args->set_system_boot_options_args.firmware_bios_verbosity)) { fprintf (stderr, "No boot flags configuration changes specified\n"); exit (EXIT_FAILURE); } } void ipmi_chassis_argp_parse (int argc, char **argv, struct ipmi_chassis_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->get_chassis_capabilities = 0; cmd_args->get_chassis_status = 0; cmd_args->chassis_control = 0; cmd_args->chassis_control_arg = 0; cmd_args->chassis_identify = 0; cmd_args->chassis_identify_args.identify_interval = 0; cmd_args->chassis_identify_args.force_identify = 0; cmd_args->set_power_restore_policy = 0; cmd_args->set_power_restore_policy_arg = 0; cmd_args->set_power_cycle_interval = 0; cmd_args->set_power_cycle_interval_arg = 0; cmd_args->get_system_restart_cause = 0; cmd_args->get_power_on_hours_counter = 0; cmd_args->set_system_boot_options = 0; cmd_args->set_system_boot_options_args.bios_boot_type = 0; cmd_args->set_system_boot_options_args.lock_out_reset_button = 0; cmd_args->set_system_boot_options_args.screen_blank = 0; cmd_args->set_system_boot_options_args.boot_device = 0; cmd_args->set_system_boot_options_args.lock_keyboard = 0; cmd_args->set_system_boot_options_args.cmos_clear = 0; cmd_args->set_system_boot_options_args.console_redirection = 0; cmd_args->set_system_boot_options_args.user_password_bypass = 0; cmd_args->set_system_boot_options_args.force_progress_event_traps = 0; cmd_args->set_system_boot_options_args.firmware_bios_verbosity = 0; cmd_args->get_system_boot_options = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_chassis_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_chassis_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-chassis/ipmi-chassis-argp.h0000644002055400205540000000162713527331635021352 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CHASSIS_ARGP_H #define IPMI_CHASSIS_ARGP_H #include "ipmi-chassis.h" void ipmi_chassis_argp_parse (int argc, char **argv, struct ipmi_chassis_arguments *cmd_args); #endif /* IPMI_CHASSIS_ARGP_H */ freeipmi-1.6.4/ipmi-config/0000755002055400205540000000000013527342547015467 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-config/Makefile.in0000644002055400205540000051232513527342444017540 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-config$(EXEEXT) subdir = ipmi-config DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_config_OBJECTS = ipmi_config-ipmi-config.$(OBJEXT) \ ipmi_config-ipmi-config-argp.$(OBJEXT) \ ipmi_config-ipmi-config-category-chassis-boot-flags.$(OBJEXT) \ ipmi_config-ipmi-config-category-chassis-front-panel-buttons.$(OBJEXT) \ ipmi_config-ipmi-config-category-chassis-power-conf.$(OBJEXT) \ ipmi_config-ipmi-config-category-chassis-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-common-pef-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-channel-common.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-channel-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-conf-auth-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-conf-misc-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-lan6-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-misc-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-pef-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-serial-channel-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-serial-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-sol-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-core-user-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-dcmi-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-alert-policy-table.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-alert-string.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-community-string.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-event-filter-table.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-lan-alert-destination.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-pef-conf-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-pef-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-sensors-discrete-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-sensors-sections.$(OBJEXT) \ ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.$(OBJEXT) \ ipmi_config-ipmi-config-category-sensors-threshold-section.$(OBJEXT) \ ipmi_config-ipmi-config-category-sensors-utils.$(OBJEXT) \ ipmi_config-ipmi-config-checkout.$(OBJEXT) \ ipmi_config-ipmi-config-comment.$(OBJEXT) \ ipmi_config-ipmi-config-commit.$(OBJEXT) \ ipmi_config-ipmi-config-diff.$(OBJEXT) \ ipmi_config-ipmi-config-legacy-pef-info.$(OBJEXT) \ ipmi_config-ipmi-config-map.$(OBJEXT) \ ipmi_config-ipmi-config-parse.$(OBJEXT) \ ipmi_config-ipmi-config-section.$(OBJEXT) \ ipmi_config-ipmi-config-utils.$(OBJEXT) \ ipmi_config-ipmi-config-validate.$(OBJEXT) ipmi_config_OBJECTS = $(am_ipmi_config_OBJECTS) ipmi_config_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(sbin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_config_SOURCES) DIST_SOURCES = $(ipmi_config_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sbin_SCRIPTS = \ bmc-config \ ipmi-chassis-config \ ipmi-pef-config \ ipmi-sensors-config ipmi_config_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_config_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_config_SOURCES = \ ipmi-config.c \ ipmi-config.h \ ipmi-config-argp.c \ ipmi-config-argp.h \ ipmi-config-category-chassis-boot-flags.c \ ipmi-config-category-chassis-boot-flags.h \ ipmi-config-category-chassis-front-panel-buttons.c \ ipmi-config-category-chassis-front-panel-buttons.h \ ipmi-config-category-chassis-power-conf.c \ ipmi-config-category-chassis-power-conf.h \ ipmi-config-category-chassis-sections.c \ ipmi-config-category-chassis-sections.h \ ipmi-config-category-common-pef-conf-section.c \ ipmi-config-category-common-pef-conf-section.h \ ipmi-config-category-core-channel-common.c \ ipmi-config-category-core-channel-common.h \ ipmi-config-category-core-lan-channel-section.c \ ipmi-config-category-core-lan-channel-section.h \ ipmi-config-category-core-lan-conf-auth-section.c \ ipmi-config-category-core-lan-conf-auth-section.h \ ipmi-config-category-core-lan-conf-misc-section.c \ ipmi-config-category-core-lan-conf-misc-section.h \ ipmi-config-category-core-lan-conf-section.c \ ipmi-config-category-core-lan-conf-section.h \ ipmi-config-category-core-lan-conf-security-keys-section.c \ ipmi-config-category-core-lan-conf-security-keys-section.h \ ipmi-config-category-core-lan-conf-user-security-section.c \ ipmi-config-category-core-lan-conf-user-security-section.h \ ipmi-config-category-core-lan6-conf-section.c \ ipmi-config-category-core-lan6-conf-section.h \ ipmi-config-category-core-misc-section.c \ ipmi-config-category-core-misc-section.h \ ipmi-config-category-core-pef-conf-section.c \ ipmi-config-category-core-pef-conf-section.h \ ipmi-config-category-core-rmcpplus-conf-privilege-section.c \ ipmi-config-category-core-rmcpplus-conf-privilege-section.h \ ipmi-config-category-core-sections.c \ ipmi-config-category-core-sections.h \ ipmi-config-category-core-serial-channel-section.c \ ipmi-config-category-core-serial-channel-section.h \ ipmi-config-category-core-serial-conf-section.c \ ipmi-config-category-core-serial-conf-section.h \ ipmi-config-category-core-sol-conf-section.c \ ipmi-config-category-core-sol-conf-section.h \ ipmi-config-category-core-user-sections.c \ ipmi-config-category-core-user-sections.h \ ipmi-config-category-dcmi-dcmi-conf-section.c \ ipmi-config-category-dcmi-dcmi-conf-section.h \ ipmi-config-category-dcmi-sections.c \ ipmi-config-category-dcmi-sections.h \ ipmi-config-category-pef-alert-policy-table.c \ ipmi-config-category-pef-alert-policy-table.h \ ipmi-config-category-pef-alert-string.c \ ipmi-config-category-pef-alert-string.h \ ipmi-config-category-pef-community-string.c \ ipmi-config-category-pef-community-string.h \ ipmi-config-category-pef-event-filter-table.c \ ipmi-config-category-pef-event-filter-table.h \ ipmi-config-category-pef-lan-alert-destination.c \ ipmi-config-category-pef-lan-alert-destination.h \ ipmi-config-category-pef-pef-conf-section.c \ ipmi-config-category-pef-pef-conf-section.h \ ipmi-config-category-pef-sections.c \ ipmi-config-category-pef-sections.h \ ipmi-config-category-sensors-discrete-section.c \ ipmi-config-category-sensors-discrete-section.h \ ipmi-config-category-sensors-sections.c \ ipmi-config-category-sensors-sections.h \ ipmi-config-category-sensors-sensor-event-enable-common.c \ ipmi-config-category-sensors-sensor-event-enable-common.h \ ipmi-config-category-sensors-threshold-section.c \ ipmi-config-category-sensors-threshold-section.h \ ipmi-config-category-sensors-utils.c \ ipmi-config-category-sensors-utils.h \ ipmi-config-checkout.c \ ipmi-config-checkout.h \ ipmi-config-comment.c \ ipmi-config-comment.h \ ipmi-config-commit.c \ ipmi-config-commit.h \ ipmi-config-diff.c \ ipmi-config-diff.h \ ipmi-config-legacy-pef-info.c \ ipmi-config-legacy-pef-info.h \ ipmi-config-map.c \ ipmi-config-map.h \ ipmi-config-parse.c \ ipmi-config-parse.h \ ipmi-config-section.c \ ipmi-config-section.h \ ipmi-config-utils.c \ ipmi-config-utils.h \ ipmi-config-validate.c \ ipmi-config-validate.h CLEANFILES = \ bmc-config \ ipmi-chassis-config \ ipmi-pef-config \ ipmi-sensors-config EXTRA_DIST = \ bmc-config.in \ ipmi-chassis-config.in \ ipmi-pef-config.in \ ipmi-sensors-config.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-config/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-config/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-config$(EXEEXT): $(ipmi_config_OBJECTS) $(ipmi_config_DEPENDENCIES) $(EXTRA_ipmi_config_DEPENDENCIES) @rm -f ipmi-config$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_config_OBJECTS) $(ipmi_config_LDADD) $(LIBS) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-checkout.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-comment.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-commit.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-diff.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-map.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-parse.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-section.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-utils.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config-validate.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_config-ipmi-config.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_config-ipmi-config.o: ipmi-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config.Tpo -c -o ipmi_config-ipmi-config.o `test -f 'ipmi-config.c' || echo '$(srcdir)/'`ipmi-config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config.Tpo $(DEPDIR)/ipmi_config-ipmi-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config.c' object='ipmi_config-ipmi-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config.o `test -f 'ipmi-config.c' || echo '$(srcdir)/'`ipmi-config.c ipmi_config-ipmi-config.obj: ipmi-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config.Tpo -c -o ipmi_config-ipmi-config.obj `if test -f 'ipmi-config.c'; then $(CYGPATH_W) 'ipmi-config.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config.Tpo $(DEPDIR)/ipmi_config-ipmi-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config.c' object='ipmi_config-ipmi-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config.obj `if test -f 'ipmi-config.c'; then $(CYGPATH_W) 'ipmi-config.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config.c'; fi` ipmi_config-ipmi-config-argp.o: ipmi-config-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-argp.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-argp.Tpo -c -o ipmi_config-ipmi-config-argp.o `test -f 'ipmi-config-argp.c' || echo '$(srcdir)/'`ipmi-config-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-argp.Tpo $(DEPDIR)/ipmi_config-ipmi-config-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-argp.c' object='ipmi_config-ipmi-config-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-argp.o `test -f 'ipmi-config-argp.c' || echo '$(srcdir)/'`ipmi-config-argp.c ipmi_config-ipmi-config-argp.obj: ipmi-config-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-argp.Tpo -c -o ipmi_config-ipmi-config-argp.obj `if test -f 'ipmi-config-argp.c'; then $(CYGPATH_W) 'ipmi-config-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-argp.Tpo $(DEPDIR)/ipmi_config-ipmi-config-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-argp.c' object='ipmi_config-ipmi-config-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-argp.obj `if test -f 'ipmi-config-argp.c'; then $(CYGPATH_W) 'ipmi-config-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-argp.c'; fi` ipmi_config-ipmi-config-category-chassis-boot-flags.o: ipmi-config-category-chassis-boot-flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-boot-flags.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Tpo -c -o ipmi_config-ipmi-config-category-chassis-boot-flags.o `test -f 'ipmi-config-category-chassis-boot-flags.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-boot-flags.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-boot-flags.c' object='ipmi_config-ipmi-config-category-chassis-boot-flags.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-boot-flags.o `test -f 'ipmi-config-category-chassis-boot-flags.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-boot-flags.c ipmi_config-ipmi-config-category-chassis-boot-flags.obj: ipmi-config-category-chassis-boot-flags.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-boot-flags.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Tpo -c -o ipmi_config-ipmi-config-category-chassis-boot-flags.obj `if test -f 'ipmi-config-category-chassis-boot-flags.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-boot-flags.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-boot-flags.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-boot-flags.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-boot-flags.c' object='ipmi_config-ipmi-config-category-chassis-boot-flags.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-boot-flags.obj `if test -f 'ipmi-config-category-chassis-boot-flags.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-boot-flags.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-boot-flags.c'; fi` ipmi_config-ipmi-config-category-chassis-front-panel-buttons.o: ipmi-config-category-chassis-front-panel-buttons.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-front-panel-buttons.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Tpo -c -o ipmi_config-ipmi-config-category-chassis-front-panel-buttons.o `test -f 'ipmi-config-category-chassis-front-panel-buttons.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-front-panel-buttons.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-front-panel-buttons.c' object='ipmi_config-ipmi-config-category-chassis-front-panel-buttons.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-front-panel-buttons.o `test -f 'ipmi-config-category-chassis-front-panel-buttons.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-front-panel-buttons.c ipmi_config-ipmi-config-category-chassis-front-panel-buttons.obj: ipmi-config-category-chassis-front-panel-buttons.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-front-panel-buttons.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Tpo -c -o ipmi_config-ipmi-config-category-chassis-front-panel-buttons.obj `if test -f 'ipmi-config-category-chassis-front-panel-buttons.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-front-panel-buttons.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-front-panel-buttons.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-front-panel-buttons.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-front-panel-buttons.c' object='ipmi_config-ipmi-config-category-chassis-front-panel-buttons.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-front-panel-buttons.obj `if test -f 'ipmi-config-category-chassis-front-panel-buttons.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-front-panel-buttons.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-front-panel-buttons.c'; fi` ipmi_config-ipmi-config-category-chassis-power-conf.o: ipmi-config-category-chassis-power-conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-power-conf.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Tpo -c -o ipmi_config-ipmi-config-category-chassis-power-conf.o `test -f 'ipmi-config-category-chassis-power-conf.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-power-conf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-power-conf.c' object='ipmi_config-ipmi-config-category-chassis-power-conf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-power-conf.o `test -f 'ipmi-config-category-chassis-power-conf.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-power-conf.c ipmi_config-ipmi-config-category-chassis-power-conf.obj: ipmi-config-category-chassis-power-conf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-power-conf.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Tpo -c -o ipmi_config-ipmi-config-category-chassis-power-conf.obj `if test -f 'ipmi-config-category-chassis-power-conf.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-power-conf.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-power-conf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-power-conf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-power-conf.c' object='ipmi_config-ipmi-config-category-chassis-power-conf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-power-conf.obj `if test -f 'ipmi-config-category-chassis-power-conf.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-power-conf.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-power-conf.c'; fi` ipmi_config-ipmi-config-category-chassis-sections.o: ipmi-config-category-chassis-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Tpo -c -o ipmi_config-ipmi-config-category-chassis-sections.o `test -f 'ipmi-config-category-chassis-sections.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-sections.c' object='ipmi_config-ipmi-config-category-chassis-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-sections.o `test -f 'ipmi-config-category-chassis-sections.c' || echo '$(srcdir)/'`ipmi-config-category-chassis-sections.c ipmi_config-ipmi-config-category-chassis-sections.obj: ipmi-config-category-chassis-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-chassis-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Tpo -c -o ipmi_config-ipmi-config-category-chassis-sections.obj `if test -f 'ipmi-config-category-chassis-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-chassis-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-chassis-sections.c' object='ipmi_config-ipmi-config-category-chassis-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-chassis-sections.obj `if test -f 'ipmi-config-category-chassis-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-chassis-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-chassis-sections.c'; fi` ipmi_config-ipmi-config-category-common-pef-conf-section.o: ipmi-config-category-common-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-common-pef-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-common-pef-conf-section.o `test -f 'ipmi-config-category-common-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-common-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-common-pef-conf-section.c' object='ipmi_config-ipmi-config-category-common-pef-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-common-pef-conf-section.o `test -f 'ipmi-config-category-common-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-common-pef-conf-section.c ipmi_config-ipmi-config-category-common-pef-conf-section.obj: ipmi-config-category-common-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-common-pef-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-common-pef-conf-section.obj `if test -f 'ipmi-config-category-common-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-common-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-common-pef-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-common-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-common-pef-conf-section.c' object='ipmi_config-ipmi-config-category-common-pef-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-common-pef-conf-section.obj `if test -f 'ipmi-config-category-common-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-common-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-common-pef-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-channel-common.o: ipmi-config-category-core-channel-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-channel-common.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Tpo -c -o ipmi_config-ipmi-config-category-core-channel-common.o `test -f 'ipmi-config-category-core-channel-common.c' || echo '$(srcdir)/'`ipmi-config-category-core-channel-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-channel-common.c' object='ipmi_config-ipmi-config-category-core-channel-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-channel-common.o `test -f 'ipmi-config-category-core-channel-common.c' || echo '$(srcdir)/'`ipmi-config-category-core-channel-common.c ipmi_config-ipmi-config-category-core-channel-common.obj: ipmi-config-category-core-channel-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-channel-common.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Tpo -c -o ipmi_config-ipmi-config-category-core-channel-common.obj `if test -f 'ipmi-config-category-core-channel-common.c'; then $(CYGPATH_W) 'ipmi-config-category-core-channel-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-channel-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-channel-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-channel-common.c' object='ipmi_config-ipmi-config-category-core-channel-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-channel-common.obj `if test -f 'ipmi-config-category-core-channel-common.c'; then $(CYGPATH_W) 'ipmi-config-category-core-channel-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-channel-common.c'; fi` ipmi_config-ipmi-config-category-core-lan-channel-section.o: ipmi-config-category-core-lan-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-channel-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-channel-section.o `test -f 'ipmi-config-category-core-lan-channel-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-channel-section.c' object='ipmi_config-ipmi-config-category-core-lan-channel-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-channel-section.o `test -f 'ipmi-config-category-core-lan-channel-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-channel-section.c ipmi_config-ipmi-config-category-core-lan-channel-section.obj: ipmi-config-category-core-lan-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-channel-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-channel-section.obj `if test -f 'ipmi-config-category-core-lan-channel-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-channel-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-channel-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-channel-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-channel-section.c' object='ipmi_config-ipmi-config-category-core-lan-channel-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-channel-section.obj `if test -f 'ipmi-config-category-core-lan-channel-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-channel-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-channel-section.c'; fi` ipmi_config-ipmi-config-category-core-lan-conf-auth-section.o: ipmi-config-category-core-lan-conf-auth-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-auth-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-auth-section.o `test -f 'ipmi-config-category-core-lan-conf-auth-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-auth-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-auth-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-auth-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-auth-section.o `test -f 'ipmi-config-category-core-lan-conf-auth-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-auth-section.c ipmi_config-ipmi-config-category-core-lan-conf-auth-section.obj: ipmi-config-category-core-lan-conf-auth-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-auth-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-auth-section.obj `if test -f 'ipmi-config-category-core-lan-conf-auth-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-auth-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-auth-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-auth-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-auth-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-auth-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-auth-section.obj `if test -f 'ipmi-config-category-core-lan-conf-auth-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-auth-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-auth-section.c'; fi` ipmi_config-ipmi-config-category-core-lan-conf-misc-section.o: ipmi-config-category-core-lan-conf-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-misc-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-misc-section.o `test -f 'ipmi-config-category-core-lan-conf-misc-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-misc-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-misc-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-misc-section.o `test -f 'ipmi-config-category-core-lan-conf-misc-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-misc-section.c ipmi_config-ipmi-config-category-core-lan-conf-misc-section.obj: ipmi-config-category-core-lan-conf-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-misc-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-misc-section.obj `if test -f 'ipmi-config-category-core-lan-conf-misc-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-misc-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-misc-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-misc-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-misc-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-misc-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-misc-section.obj `if test -f 'ipmi-config-category-core-lan-conf-misc-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-misc-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-misc-section.c'; fi` ipmi_config-ipmi-config-category-core-lan-conf-section.o: ipmi-config-category-core-lan-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-section.o `test -f 'ipmi-config-category-core-lan-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-section.o `test -f 'ipmi-config-category-core-lan-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-section.c ipmi_config-ipmi-config-category-core-lan-conf-section.obj: ipmi-config-category-core-lan-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-section.obj `if test -f 'ipmi-config-category-core-lan-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-section.obj `if test -f 'ipmi-config-category-core-lan-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.o: ipmi-config-category-core-lan-conf-security-keys-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.o `test -f 'ipmi-config-category-core-lan-conf-security-keys-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-security-keys-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-security-keys-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.o `test -f 'ipmi-config-category-core-lan-conf-security-keys-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-security-keys-section.c ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.obj: ipmi-config-category-core-lan-conf-security-keys-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.obj `if test -f 'ipmi-config-category-core-lan-conf-security-keys-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-security-keys-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-security-keys-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-security-keys-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-security-keys-section.obj `if test -f 'ipmi-config-category-core-lan-conf-security-keys-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-security-keys-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-security-keys-section.c'; fi` ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.o: ipmi-config-category-core-lan-conf-user-security-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.o `test -f 'ipmi-config-category-core-lan-conf-user-security-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-user-security-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-user-security-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.o `test -f 'ipmi-config-category-core-lan-conf-user-security-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan-conf-user-security-section.c ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.obj: ipmi-config-category-core-lan-conf-user-security-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.obj `if test -f 'ipmi-config-category-core-lan-conf-user-security-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-user-security-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-user-security-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan-conf-user-security-section.c' object='ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan-conf-user-security-section.obj `if test -f 'ipmi-config-category-core-lan-conf-user-security-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan-conf-user-security-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan-conf-user-security-section.c'; fi` ipmi_config-ipmi-config-category-core-lan6-conf-section.o: ipmi-config-category-core-lan6-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan6-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan6-conf-section.o `test -f 'ipmi-config-category-core-lan6-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan6-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan6-conf-section.c' object='ipmi_config-ipmi-config-category-core-lan6-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan6-conf-section.o `test -f 'ipmi-config-category-core-lan6-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-lan6-conf-section.c ipmi_config-ipmi-config-category-core-lan6-conf-section.obj: ipmi-config-category-core-lan6-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-lan6-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-lan6-conf-section.obj `if test -f 'ipmi-config-category-core-lan6-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan6-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan6-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-lan6-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-lan6-conf-section.c' object='ipmi_config-ipmi-config-category-core-lan6-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-lan6-conf-section.obj `if test -f 'ipmi-config-category-core-lan6-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-lan6-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-lan6-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-misc-section.o: ipmi-config-category-core-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-misc-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Tpo -c -o ipmi_config-ipmi-config-category-core-misc-section.o `test -f 'ipmi-config-category-core-misc-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-misc-section.c' object='ipmi_config-ipmi-config-category-core-misc-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-misc-section.o `test -f 'ipmi-config-category-core-misc-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-misc-section.c ipmi_config-ipmi-config-category-core-misc-section.obj: ipmi-config-category-core-misc-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-misc-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Tpo -c -o ipmi_config-ipmi-config-category-core-misc-section.obj `if test -f 'ipmi-config-category-core-misc-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-misc-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-misc-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-misc-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-misc-section.c' object='ipmi_config-ipmi-config-category-core-misc-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-misc-section.obj `if test -f 'ipmi-config-category-core-misc-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-misc-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-misc-section.c'; fi` ipmi_config-ipmi-config-category-core-pef-conf-section.o: ipmi-config-category-core-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-pef-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-pef-conf-section.o `test -f 'ipmi-config-category-core-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-pef-conf-section.c' object='ipmi_config-ipmi-config-category-core-pef-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-pef-conf-section.o `test -f 'ipmi-config-category-core-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-pef-conf-section.c ipmi_config-ipmi-config-category-core-pef-conf-section.obj: ipmi-config-category-core-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-pef-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-pef-conf-section.obj `if test -f 'ipmi-config-category-core-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-pef-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-pef-conf-section.c' object='ipmi_config-ipmi-config-category-core-pef-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-pef-conf-section.obj `if test -f 'ipmi-config-category-core-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-pef-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.o: ipmi-config-category-core-rmcpplus-conf-privilege-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Tpo -c -o ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.o `test -f 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-rmcpplus-conf-privilege-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-rmcpplus-conf-privilege-section.c' object='ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.o `test -f 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-rmcpplus-conf-privilege-section.c ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.obj: ipmi-config-category-core-rmcpplus-conf-privilege-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Tpo -c -o ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.obj `if test -f 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-rmcpplus-conf-privilege-section.c' object='ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-rmcpplus-conf-privilege-section.obj `if test -f 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-rmcpplus-conf-privilege-section.c'; fi` ipmi_config-ipmi-config-category-core-sections.o: ipmi-config-category-core-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Tpo -c -o ipmi_config-ipmi-config-category-core-sections.o `test -f 'ipmi-config-category-core-sections.c' || echo '$(srcdir)/'`ipmi-config-category-core-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-sections.c' object='ipmi_config-ipmi-config-category-core-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-sections.o `test -f 'ipmi-config-category-core-sections.c' || echo '$(srcdir)/'`ipmi-config-category-core-sections.c ipmi_config-ipmi-config-category-core-sections.obj: ipmi-config-category-core-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Tpo -c -o ipmi_config-ipmi-config-category-core-sections.obj `if test -f 'ipmi-config-category-core-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-core-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-sections.c' object='ipmi_config-ipmi-config-category-core-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-sections.obj `if test -f 'ipmi-config-category-core-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-core-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-sections.c'; fi` ipmi_config-ipmi-config-category-core-serial-channel-section.o: ipmi-config-category-core-serial-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-serial-channel-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Tpo -c -o ipmi_config-ipmi-config-category-core-serial-channel-section.o `test -f 'ipmi-config-category-core-serial-channel-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-serial-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-serial-channel-section.c' object='ipmi_config-ipmi-config-category-core-serial-channel-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-serial-channel-section.o `test -f 'ipmi-config-category-core-serial-channel-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-serial-channel-section.c ipmi_config-ipmi-config-category-core-serial-channel-section.obj: ipmi-config-category-core-serial-channel-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-serial-channel-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Tpo -c -o ipmi_config-ipmi-config-category-core-serial-channel-section.obj `if test -f 'ipmi-config-category-core-serial-channel-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-serial-channel-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-serial-channel-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-channel-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-serial-channel-section.c' object='ipmi_config-ipmi-config-category-core-serial-channel-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-serial-channel-section.obj `if test -f 'ipmi-config-category-core-serial-channel-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-serial-channel-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-serial-channel-section.c'; fi` ipmi_config-ipmi-config-category-core-serial-conf-section.o: ipmi-config-category-core-serial-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-serial-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-serial-conf-section.o `test -f 'ipmi-config-category-core-serial-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-serial-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-serial-conf-section.c' object='ipmi_config-ipmi-config-category-core-serial-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-serial-conf-section.o `test -f 'ipmi-config-category-core-serial-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-serial-conf-section.c ipmi_config-ipmi-config-category-core-serial-conf-section.obj: ipmi-config-category-core-serial-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-serial-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-serial-conf-section.obj `if test -f 'ipmi-config-category-core-serial-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-serial-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-serial-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-serial-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-serial-conf-section.c' object='ipmi_config-ipmi-config-category-core-serial-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-serial-conf-section.obj `if test -f 'ipmi-config-category-core-serial-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-serial-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-serial-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-sol-conf-section.o: ipmi-config-category-core-sol-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-sol-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-sol-conf-section.o `test -f 'ipmi-config-category-core-sol-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-sol-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-sol-conf-section.c' object='ipmi_config-ipmi-config-category-core-sol-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-sol-conf-section.o `test -f 'ipmi-config-category-core-sol-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-core-sol-conf-section.c ipmi_config-ipmi-config-category-core-sol-conf-section.obj: ipmi-config-category-core-sol-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-sol-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-core-sol-conf-section.obj `if test -f 'ipmi-config-category-core-sol-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-sol-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-sol-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-sol-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-sol-conf-section.c' object='ipmi_config-ipmi-config-category-core-sol-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-sol-conf-section.obj `if test -f 'ipmi-config-category-core-sol-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-core-sol-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-sol-conf-section.c'; fi` ipmi_config-ipmi-config-category-core-user-sections.o: ipmi-config-category-core-user-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-user-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Tpo -c -o ipmi_config-ipmi-config-category-core-user-sections.o `test -f 'ipmi-config-category-core-user-sections.c' || echo '$(srcdir)/'`ipmi-config-category-core-user-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-user-sections.c' object='ipmi_config-ipmi-config-category-core-user-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-user-sections.o `test -f 'ipmi-config-category-core-user-sections.c' || echo '$(srcdir)/'`ipmi-config-category-core-user-sections.c ipmi_config-ipmi-config-category-core-user-sections.obj: ipmi-config-category-core-user-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-core-user-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Tpo -c -o ipmi_config-ipmi-config-category-core-user-sections.obj `if test -f 'ipmi-config-category-core-user-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-core-user-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-user-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-core-user-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-core-user-sections.c' object='ipmi_config-ipmi-config-category-core-user-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-core-user-sections.obj `if test -f 'ipmi-config-category-core-user-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-core-user-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-core-user-sections.c'; fi` ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.o: ipmi-config-category-dcmi-dcmi-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.o `test -f 'ipmi-config-category-dcmi-dcmi-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-dcmi-dcmi-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-dcmi-dcmi-conf-section.c' object='ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.o `test -f 'ipmi-config-category-dcmi-dcmi-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-dcmi-dcmi-conf-section.c ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.obj: ipmi-config-category-dcmi-dcmi-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.obj `if test -f 'ipmi-config-category-dcmi-dcmi-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-dcmi-dcmi-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-dcmi-dcmi-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-dcmi-dcmi-conf-section.c' object='ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-dcmi-dcmi-conf-section.obj `if test -f 'ipmi-config-category-dcmi-dcmi-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-dcmi-dcmi-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-dcmi-dcmi-conf-section.c'; fi` ipmi_config-ipmi-config-category-dcmi-sections.o: ipmi-config-category-dcmi-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-dcmi-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Tpo -c -o ipmi_config-ipmi-config-category-dcmi-sections.o `test -f 'ipmi-config-category-dcmi-sections.c' || echo '$(srcdir)/'`ipmi-config-category-dcmi-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-dcmi-sections.c' object='ipmi_config-ipmi-config-category-dcmi-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-dcmi-sections.o `test -f 'ipmi-config-category-dcmi-sections.c' || echo '$(srcdir)/'`ipmi-config-category-dcmi-sections.c ipmi_config-ipmi-config-category-dcmi-sections.obj: ipmi-config-category-dcmi-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-dcmi-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Tpo -c -o ipmi_config-ipmi-config-category-dcmi-sections.obj `if test -f 'ipmi-config-category-dcmi-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-dcmi-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-dcmi-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-dcmi-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-dcmi-sections.c' object='ipmi_config-ipmi-config-category-dcmi-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-dcmi-sections.obj `if test -f 'ipmi-config-category-dcmi-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-dcmi-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-dcmi-sections.c'; fi` ipmi_config-ipmi-config-category-pef-alert-policy-table.o: ipmi-config-category-pef-alert-policy-table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-alert-policy-table.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Tpo -c -o ipmi_config-ipmi-config-category-pef-alert-policy-table.o `test -f 'ipmi-config-category-pef-alert-policy-table.c' || echo '$(srcdir)/'`ipmi-config-category-pef-alert-policy-table.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-alert-policy-table.c' object='ipmi_config-ipmi-config-category-pef-alert-policy-table.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-alert-policy-table.o `test -f 'ipmi-config-category-pef-alert-policy-table.c' || echo '$(srcdir)/'`ipmi-config-category-pef-alert-policy-table.c ipmi_config-ipmi-config-category-pef-alert-policy-table.obj: ipmi-config-category-pef-alert-policy-table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-alert-policy-table.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Tpo -c -o ipmi_config-ipmi-config-category-pef-alert-policy-table.obj `if test -f 'ipmi-config-category-pef-alert-policy-table.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-alert-policy-table.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-alert-policy-table.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-policy-table.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-alert-policy-table.c' object='ipmi_config-ipmi-config-category-pef-alert-policy-table.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-alert-policy-table.obj `if test -f 'ipmi-config-category-pef-alert-policy-table.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-alert-policy-table.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-alert-policy-table.c'; fi` ipmi_config-ipmi-config-category-pef-alert-string.o: ipmi-config-category-pef-alert-string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-alert-string.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Tpo -c -o ipmi_config-ipmi-config-category-pef-alert-string.o `test -f 'ipmi-config-category-pef-alert-string.c' || echo '$(srcdir)/'`ipmi-config-category-pef-alert-string.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-alert-string.c' object='ipmi_config-ipmi-config-category-pef-alert-string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-alert-string.o `test -f 'ipmi-config-category-pef-alert-string.c' || echo '$(srcdir)/'`ipmi-config-category-pef-alert-string.c ipmi_config-ipmi-config-category-pef-alert-string.obj: ipmi-config-category-pef-alert-string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-alert-string.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Tpo -c -o ipmi_config-ipmi-config-category-pef-alert-string.obj `if test -f 'ipmi-config-category-pef-alert-string.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-alert-string.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-alert-string.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-alert-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-alert-string.c' object='ipmi_config-ipmi-config-category-pef-alert-string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-alert-string.obj `if test -f 'ipmi-config-category-pef-alert-string.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-alert-string.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-alert-string.c'; fi` ipmi_config-ipmi-config-category-pef-community-string.o: ipmi-config-category-pef-community-string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-community-string.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Tpo -c -o ipmi_config-ipmi-config-category-pef-community-string.o `test -f 'ipmi-config-category-pef-community-string.c' || echo '$(srcdir)/'`ipmi-config-category-pef-community-string.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-community-string.c' object='ipmi_config-ipmi-config-category-pef-community-string.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-community-string.o `test -f 'ipmi-config-category-pef-community-string.c' || echo '$(srcdir)/'`ipmi-config-category-pef-community-string.c ipmi_config-ipmi-config-category-pef-community-string.obj: ipmi-config-category-pef-community-string.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-community-string.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Tpo -c -o ipmi_config-ipmi-config-category-pef-community-string.obj `if test -f 'ipmi-config-category-pef-community-string.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-community-string.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-community-string.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-community-string.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-community-string.c' object='ipmi_config-ipmi-config-category-pef-community-string.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-community-string.obj `if test -f 'ipmi-config-category-pef-community-string.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-community-string.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-community-string.c'; fi` ipmi_config-ipmi-config-category-pef-event-filter-table.o: ipmi-config-category-pef-event-filter-table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-event-filter-table.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Tpo -c -o ipmi_config-ipmi-config-category-pef-event-filter-table.o `test -f 'ipmi-config-category-pef-event-filter-table.c' || echo '$(srcdir)/'`ipmi-config-category-pef-event-filter-table.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-event-filter-table.c' object='ipmi_config-ipmi-config-category-pef-event-filter-table.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-event-filter-table.o `test -f 'ipmi-config-category-pef-event-filter-table.c' || echo '$(srcdir)/'`ipmi-config-category-pef-event-filter-table.c ipmi_config-ipmi-config-category-pef-event-filter-table.obj: ipmi-config-category-pef-event-filter-table.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-event-filter-table.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Tpo -c -o ipmi_config-ipmi-config-category-pef-event-filter-table.obj `if test -f 'ipmi-config-category-pef-event-filter-table.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-event-filter-table.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-event-filter-table.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-event-filter-table.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-event-filter-table.c' object='ipmi_config-ipmi-config-category-pef-event-filter-table.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-event-filter-table.obj `if test -f 'ipmi-config-category-pef-event-filter-table.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-event-filter-table.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-event-filter-table.c'; fi` ipmi_config-ipmi-config-category-pef-lan-alert-destination.o: ipmi-config-category-pef-lan-alert-destination.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-lan-alert-destination.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Tpo -c -o ipmi_config-ipmi-config-category-pef-lan-alert-destination.o `test -f 'ipmi-config-category-pef-lan-alert-destination.c' || echo '$(srcdir)/'`ipmi-config-category-pef-lan-alert-destination.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-lan-alert-destination.c' object='ipmi_config-ipmi-config-category-pef-lan-alert-destination.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-lan-alert-destination.o `test -f 'ipmi-config-category-pef-lan-alert-destination.c' || echo '$(srcdir)/'`ipmi-config-category-pef-lan-alert-destination.c ipmi_config-ipmi-config-category-pef-lan-alert-destination.obj: ipmi-config-category-pef-lan-alert-destination.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-lan-alert-destination.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Tpo -c -o ipmi_config-ipmi-config-category-pef-lan-alert-destination.obj `if test -f 'ipmi-config-category-pef-lan-alert-destination.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-lan-alert-destination.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-lan-alert-destination.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-lan-alert-destination.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-lan-alert-destination.c' object='ipmi_config-ipmi-config-category-pef-lan-alert-destination.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-lan-alert-destination.obj `if test -f 'ipmi-config-category-pef-lan-alert-destination.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-lan-alert-destination.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-lan-alert-destination.c'; fi` ipmi_config-ipmi-config-category-pef-pef-conf-section.o: ipmi-config-category-pef-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-pef-conf-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-pef-pef-conf-section.o `test -f 'ipmi-config-category-pef-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-pef-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-pef-conf-section.c' object='ipmi_config-ipmi-config-category-pef-pef-conf-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-pef-conf-section.o `test -f 'ipmi-config-category-pef-pef-conf-section.c' || echo '$(srcdir)/'`ipmi-config-category-pef-pef-conf-section.c ipmi_config-ipmi-config-category-pef-pef-conf-section.obj: ipmi-config-category-pef-pef-conf-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-pef-conf-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Tpo -c -o ipmi_config-ipmi-config-category-pef-pef-conf-section.obj `if test -f 'ipmi-config-category-pef-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-pef-conf-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-pef-conf-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-pef-conf-section.c' object='ipmi_config-ipmi-config-category-pef-pef-conf-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-pef-conf-section.obj `if test -f 'ipmi-config-category-pef-pef-conf-section.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-pef-conf-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-pef-conf-section.c'; fi` ipmi_config-ipmi-config-category-pef-sections.o: ipmi-config-category-pef-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Tpo -c -o ipmi_config-ipmi-config-category-pef-sections.o `test -f 'ipmi-config-category-pef-sections.c' || echo '$(srcdir)/'`ipmi-config-category-pef-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-sections.c' object='ipmi_config-ipmi-config-category-pef-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-sections.o `test -f 'ipmi-config-category-pef-sections.c' || echo '$(srcdir)/'`ipmi-config-category-pef-sections.c ipmi_config-ipmi-config-category-pef-sections.obj: ipmi-config-category-pef-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-pef-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Tpo -c -o ipmi_config-ipmi-config-category-pef-sections.obj `if test -f 'ipmi-config-category-pef-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-pef-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-pef-sections.c' object='ipmi_config-ipmi-config-category-pef-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-pef-sections.obj `if test -f 'ipmi-config-category-pef-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-pef-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-pef-sections.c'; fi` ipmi_config-ipmi-config-category-sensors-discrete-section.o: ipmi-config-category-sensors-discrete-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-discrete-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Tpo -c -o ipmi_config-ipmi-config-category-sensors-discrete-section.o `test -f 'ipmi-config-category-sensors-discrete-section.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-discrete-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-discrete-section.c' object='ipmi_config-ipmi-config-category-sensors-discrete-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-discrete-section.o `test -f 'ipmi-config-category-sensors-discrete-section.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-discrete-section.c ipmi_config-ipmi-config-category-sensors-discrete-section.obj: ipmi-config-category-sensors-discrete-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-discrete-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Tpo -c -o ipmi_config-ipmi-config-category-sensors-discrete-section.obj `if test -f 'ipmi-config-category-sensors-discrete-section.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-discrete-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-discrete-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-discrete-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-discrete-section.c' object='ipmi_config-ipmi-config-category-sensors-discrete-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-discrete-section.obj `if test -f 'ipmi-config-category-sensors-discrete-section.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-discrete-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-discrete-section.c'; fi` ipmi_config-ipmi-config-category-sensors-sections.o: ipmi-config-category-sensors-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-sections.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Tpo -c -o ipmi_config-ipmi-config-category-sensors-sections.o `test -f 'ipmi-config-category-sensors-sections.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-sections.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-sections.c' object='ipmi_config-ipmi-config-category-sensors-sections.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-sections.o `test -f 'ipmi-config-category-sensors-sections.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-sections.c ipmi_config-ipmi-config-category-sensors-sections.obj: ipmi-config-category-sensors-sections.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-sections.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Tpo -c -o ipmi_config-ipmi-config-category-sensors-sections.obj `if test -f 'ipmi-config-category-sensors-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-sections.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sections.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-sections.c' object='ipmi_config-ipmi-config-category-sensors-sections.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-sections.obj `if test -f 'ipmi-config-category-sensors-sections.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-sections.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-sections.c'; fi` ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.o: ipmi-config-category-sensors-sensor-event-enable-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Tpo -c -o ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.o `test -f 'ipmi-config-category-sensors-sensor-event-enable-common.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-sensor-event-enable-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-sensor-event-enable-common.c' object='ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.o `test -f 'ipmi-config-category-sensors-sensor-event-enable-common.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-sensor-event-enable-common.c ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.obj: ipmi-config-category-sensors-sensor-event-enable-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Tpo -c -o ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.obj `if test -f 'ipmi-config-category-sensors-sensor-event-enable-common.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-sensor-event-enable-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-sensor-event-enable-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-sensor-event-enable-common.c' object='ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-sensor-event-enable-common.obj `if test -f 'ipmi-config-category-sensors-sensor-event-enable-common.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-sensor-event-enable-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-sensor-event-enable-common.c'; fi` ipmi_config-ipmi-config-category-sensors-threshold-section.o: ipmi-config-category-sensors-threshold-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-threshold-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Tpo -c -o ipmi_config-ipmi-config-category-sensors-threshold-section.o `test -f 'ipmi-config-category-sensors-threshold-section.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-threshold-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-threshold-section.c' object='ipmi_config-ipmi-config-category-sensors-threshold-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-threshold-section.o `test -f 'ipmi-config-category-sensors-threshold-section.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-threshold-section.c ipmi_config-ipmi-config-category-sensors-threshold-section.obj: ipmi-config-category-sensors-threshold-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-threshold-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Tpo -c -o ipmi_config-ipmi-config-category-sensors-threshold-section.obj `if test -f 'ipmi-config-category-sensors-threshold-section.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-threshold-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-threshold-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-threshold-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-threshold-section.c' object='ipmi_config-ipmi-config-category-sensors-threshold-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-threshold-section.obj `if test -f 'ipmi-config-category-sensors-threshold-section.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-threshold-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-threshold-section.c'; fi` ipmi_config-ipmi-config-category-sensors-utils.o: ipmi-config-category-sensors-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-utils.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Tpo -c -o ipmi_config-ipmi-config-category-sensors-utils.o `test -f 'ipmi-config-category-sensors-utils.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-utils.c' object='ipmi_config-ipmi-config-category-sensors-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-utils.o `test -f 'ipmi-config-category-sensors-utils.c' || echo '$(srcdir)/'`ipmi-config-category-sensors-utils.c ipmi_config-ipmi-config-category-sensors-utils.obj: ipmi-config-category-sensors-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-category-sensors-utils.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Tpo -c -o ipmi_config-ipmi-config-category-sensors-utils.obj `if test -f 'ipmi-config-category-sensors-utils.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-utils.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-utils.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Tpo $(DEPDIR)/ipmi_config-ipmi-config-category-sensors-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-category-sensors-utils.c' object='ipmi_config-ipmi-config-category-sensors-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-category-sensors-utils.obj `if test -f 'ipmi-config-category-sensors-utils.c'; then $(CYGPATH_W) 'ipmi-config-category-sensors-utils.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-category-sensors-utils.c'; fi` ipmi_config-ipmi-config-checkout.o: ipmi-config-checkout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-checkout.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-checkout.Tpo -c -o ipmi_config-ipmi-config-checkout.o `test -f 'ipmi-config-checkout.c' || echo '$(srcdir)/'`ipmi-config-checkout.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-checkout.Tpo $(DEPDIR)/ipmi_config-ipmi-config-checkout.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-checkout.c' object='ipmi_config-ipmi-config-checkout.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-checkout.o `test -f 'ipmi-config-checkout.c' || echo '$(srcdir)/'`ipmi-config-checkout.c ipmi_config-ipmi-config-checkout.obj: ipmi-config-checkout.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-checkout.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-checkout.Tpo -c -o ipmi_config-ipmi-config-checkout.obj `if test -f 'ipmi-config-checkout.c'; then $(CYGPATH_W) 'ipmi-config-checkout.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-checkout.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-checkout.Tpo $(DEPDIR)/ipmi_config-ipmi-config-checkout.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-checkout.c' object='ipmi_config-ipmi-config-checkout.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-checkout.obj `if test -f 'ipmi-config-checkout.c'; then $(CYGPATH_W) 'ipmi-config-checkout.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-checkout.c'; fi` ipmi_config-ipmi-config-comment.o: ipmi-config-comment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-comment.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-comment.Tpo -c -o ipmi_config-ipmi-config-comment.o `test -f 'ipmi-config-comment.c' || echo '$(srcdir)/'`ipmi-config-comment.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-comment.Tpo $(DEPDIR)/ipmi_config-ipmi-config-comment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-comment.c' object='ipmi_config-ipmi-config-comment.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-comment.o `test -f 'ipmi-config-comment.c' || echo '$(srcdir)/'`ipmi-config-comment.c ipmi_config-ipmi-config-comment.obj: ipmi-config-comment.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-comment.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-comment.Tpo -c -o ipmi_config-ipmi-config-comment.obj `if test -f 'ipmi-config-comment.c'; then $(CYGPATH_W) 'ipmi-config-comment.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-comment.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-comment.Tpo $(DEPDIR)/ipmi_config-ipmi-config-comment.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-comment.c' object='ipmi_config-ipmi-config-comment.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-comment.obj `if test -f 'ipmi-config-comment.c'; then $(CYGPATH_W) 'ipmi-config-comment.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-comment.c'; fi` ipmi_config-ipmi-config-commit.o: ipmi-config-commit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-commit.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-commit.Tpo -c -o ipmi_config-ipmi-config-commit.o `test -f 'ipmi-config-commit.c' || echo '$(srcdir)/'`ipmi-config-commit.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-commit.Tpo $(DEPDIR)/ipmi_config-ipmi-config-commit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-commit.c' object='ipmi_config-ipmi-config-commit.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-commit.o `test -f 'ipmi-config-commit.c' || echo '$(srcdir)/'`ipmi-config-commit.c ipmi_config-ipmi-config-commit.obj: ipmi-config-commit.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-commit.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-commit.Tpo -c -o ipmi_config-ipmi-config-commit.obj `if test -f 'ipmi-config-commit.c'; then $(CYGPATH_W) 'ipmi-config-commit.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-commit.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-commit.Tpo $(DEPDIR)/ipmi_config-ipmi-config-commit.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-commit.c' object='ipmi_config-ipmi-config-commit.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-commit.obj `if test -f 'ipmi-config-commit.c'; then $(CYGPATH_W) 'ipmi-config-commit.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-commit.c'; fi` ipmi_config-ipmi-config-diff.o: ipmi-config-diff.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-diff.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-diff.Tpo -c -o ipmi_config-ipmi-config-diff.o `test -f 'ipmi-config-diff.c' || echo '$(srcdir)/'`ipmi-config-diff.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-diff.Tpo $(DEPDIR)/ipmi_config-ipmi-config-diff.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-diff.c' object='ipmi_config-ipmi-config-diff.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-diff.o `test -f 'ipmi-config-diff.c' || echo '$(srcdir)/'`ipmi-config-diff.c ipmi_config-ipmi-config-diff.obj: ipmi-config-diff.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-diff.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-diff.Tpo -c -o ipmi_config-ipmi-config-diff.obj `if test -f 'ipmi-config-diff.c'; then $(CYGPATH_W) 'ipmi-config-diff.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-diff.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-diff.Tpo $(DEPDIR)/ipmi_config-ipmi-config-diff.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-diff.c' object='ipmi_config-ipmi-config-diff.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-diff.obj `if test -f 'ipmi-config-diff.c'; then $(CYGPATH_W) 'ipmi-config-diff.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-diff.c'; fi` ipmi_config-ipmi-config-legacy-pef-info.o: ipmi-config-legacy-pef-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-legacy-pef-info.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Tpo -c -o ipmi_config-ipmi-config-legacy-pef-info.o `test -f 'ipmi-config-legacy-pef-info.c' || echo '$(srcdir)/'`ipmi-config-legacy-pef-info.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Tpo $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-legacy-pef-info.c' object='ipmi_config-ipmi-config-legacy-pef-info.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-legacy-pef-info.o `test -f 'ipmi-config-legacy-pef-info.c' || echo '$(srcdir)/'`ipmi-config-legacy-pef-info.c ipmi_config-ipmi-config-legacy-pef-info.obj: ipmi-config-legacy-pef-info.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-legacy-pef-info.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Tpo -c -o ipmi_config-ipmi-config-legacy-pef-info.obj `if test -f 'ipmi-config-legacy-pef-info.c'; then $(CYGPATH_W) 'ipmi-config-legacy-pef-info.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-legacy-pef-info.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Tpo $(DEPDIR)/ipmi_config-ipmi-config-legacy-pef-info.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-legacy-pef-info.c' object='ipmi_config-ipmi-config-legacy-pef-info.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-legacy-pef-info.obj `if test -f 'ipmi-config-legacy-pef-info.c'; then $(CYGPATH_W) 'ipmi-config-legacy-pef-info.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-legacy-pef-info.c'; fi` ipmi_config-ipmi-config-map.o: ipmi-config-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-map.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-map.Tpo -c -o ipmi_config-ipmi-config-map.o `test -f 'ipmi-config-map.c' || echo '$(srcdir)/'`ipmi-config-map.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-map.Tpo $(DEPDIR)/ipmi_config-ipmi-config-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-map.c' object='ipmi_config-ipmi-config-map.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-map.o `test -f 'ipmi-config-map.c' || echo '$(srcdir)/'`ipmi-config-map.c ipmi_config-ipmi-config-map.obj: ipmi-config-map.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-map.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-map.Tpo -c -o ipmi_config-ipmi-config-map.obj `if test -f 'ipmi-config-map.c'; then $(CYGPATH_W) 'ipmi-config-map.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-map.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-map.Tpo $(DEPDIR)/ipmi_config-ipmi-config-map.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-map.c' object='ipmi_config-ipmi-config-map.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-map.obj `if test -f 'ipmi-config-map.c'; then $(CYGPATH_W) 'ipmi-config-map.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-map.c'; fi` ipmi_config-ipmi-config-parse.o: ipmi-config-parse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-parse.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-parse.Tpo -c -o ipmi_config-ipmi-config-parse.o `test -f 'ipmi-config-parse.c' || echo '$(srcdir)/'`ipmi-config-parse.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-parse.Tpo $(DEPDIR)/ipmi_config-ipmi-config-parse.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-parse.c' object='ipmi_config-ipmi-config-parse.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-parse.o `test -f 'ipmi-config-parse.c' || echo '$(srcdir)/'`ipmi-config-parse.c ipmi_config-ipmi-config-parse.obj: ipmi-config-parse.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-parse.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-parse.Tpo -c -o ipmi_config-ipmi-config-parse.obj `if test -f 'ipmi-config-parse.c'; then $(CYGPATH_W) 'ipmi-config-parse.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-parse.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-parse.Tpo $(DEPDIR)/ipmi_config-ipmi-config-parse.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-parse.c' object='ipmi_config-ipmi-config-parse.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-parse.obj `if test -f 'ipmi-config-parse.c'; then $(CYGPATH_W) 'ipmi-config-parse.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-parse.c'; fi` ipmi_config-ipmi-config-section.o: ipmi-config-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-section.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-section.Tpo -c -o ipmi_config-ipmi-config-section.o `test -f 'ipmi-config-section.c' || echo '$(srcdir)/'`ipmi-config-section.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-section.c' object='ipmi_config-ipmi-config-section.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-section.o `test -f 'ipmi-config-section.c' || echo '$(srcdir)/'`ipmi-config-section.c ipmi_config-ipmi-config-section.obj: ipmi-config-section.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-section.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-section.Tpo -c -o ipmi_config-ipmi-config-section.obj `if test -f 'ipmi-config-section.c'; then $(CYGPATH_W) 'ipmi-config-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-section.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-section.Tpo $(DEPDIR)/ipmi_config-ipmi-config-section.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-section.c' object='ipmi_config-ipmi-config-section.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-section.obj `if test -f 'ipmi-config-section.c'; then $(CYGPATH_W) 'ipmi-config-section.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-section.c'; fi` ipmi_config-ipmi-config-utils.o: ipmi-config-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-utils.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-utils.Tpo -c -o ipmi_config-ipmi-config-utils.o `test -f 'ipmi-config-utils.c' || echo '$(srcdir)/'`ipmi-config-utils.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-utils.Tpo $(DEPDIR)/ipmi_config-ipmi-config-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-utils.c' object='ipmi_config-ipmi-config-utils.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-utils.o `test -f 'ipmi-config-utils.c' || echo '$(srcdir)/'`ipmi-config-utils.c ipmi_config-ipmi-config-utils.obj: ipmi-config-utils.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-utils.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-utils.Tpo -c -o ipmi_config-ipmi-config-utils.obj `if test -f 'ipmi-config-utils.c'; then $(CYGPATH_W) 'ipmi-config-utils.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-utils.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-utils.Tpo $(DEPDIR)/ipmi_config-ipmi-config-utils.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-utils.c' object='ipmi_config-ipmi-config-utils.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-utils.obj `if test -f 'ipmi-config-utils.c'; then $(CYGPATH_W) 'ipmi-config-utils.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-utils.c'; fi` ipmi_config-ipmi-config-validate.o: ipmi-config-validate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-validate.o -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-validate.Tpo -c -o ipmi_config-ipmi-config-validate.o `test -f 'ipmi-config-validate.c' || echo '$(srcdir)/'`ipmi-config-validate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-validate.Tpo $(DEPDIR)/ipmi_config-ipmi-config-validate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-validate.c' object='ipmi_config-ipmi-config-validate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-validate.o `test -f 'ipmi-config-validate.c' || echo '$(srcdir)/'`ipmi-config-validate.c ipmi_config-ipmi-config-validate.obj: ipmi-config-validate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_config-ipmi-config-validate.obj -MD -MP -MF $(DEPDIR)/ipmi_config-ipmi-config-validate.Tpo -c -o ipmi_config-ipmi-config-validate.obj `if test -f 'ipmi-config-validate.c'; then $(CYGPATH_W) 'ipmi-config-validate.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-validate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_config-ipmi-config-validate.Tpo $(DEPDIR)/ipmi_config-ipmi-config-validate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-config-validate.c' object='ipmi_config-ipmi-config-validate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_config_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_config-ipmi-config-validate.obj `if test -f 'ipmi-config-validate.c'; then $(CYGPATH_W) 'ipmi-config-validate.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-config-validate.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-sbinSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-sbinSCRIPTS install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-hook uninstall-sbinPROGRAMS \ uninstall-sbinSCRIPTS bmc-config: bmc-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x bmc-config ipmi-chassis-config: ipmi-chassis-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-chassis-config ipmi-pef-config: ipmi-pef-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-pef-config ipmi-sensors-config: ipmi-sensors-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-sensors-config $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmi-pef-config $(DESTDIR)$(sbindir)/pef-config uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/pef-config # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-config/Makefile.am0000644002055400205540000001431613527331635017524 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-config sbin_SCRIPTS = \ bmc-config \ ipmi-chassis-config \ ipmi-pef-config \ ipmi-sensors-config ipmi_config_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_config_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_config_SOURCES = \ ipmi-config.c \ ipmi-config.h \ ipmi-config-argp.c \ ipmi-config-argp.h \ ipmi-config-category-chassis-boot-flags.c \ ipmi-config-category-chassis-boot-flags.h \ ipmi-config-category-chassis-front-panel-buttons.c \ ipmi-config-category-chassis-front-panel-buttons.h \ ipmi-config-category-chassis-power-conf.c \ ipmi-config-category-chassis-power-conf.h \ ipmi-config-category-chassis-sections.c \ ipmi-config-category-chassis-sections.h \ ipmi-config-category-common-pef-conf-section.c \ ipmi-config-category-common-pef-conf-section.h \ ipmi-config-category-core-channel-common.c \ ipmi-config-category-core-channel-common.h \ ipmi-config-category-core-lan-channel-section.c \ ipmi-config-category-core-lan-channel-section.h \ ipmi-config-category-core-lan-conf-auth-section.c \ ipmi-config-category-core-lan-conf-auth-section.h \ ipmi-config-category-core-lan-conf-misc-section.c \ ipmi-config-category-core-lan-conf-misc-section.h \ ipmi-config-category-core-lan-conf-section.c \ ipmi-config-category-core-lan-conf-section.h \ ipmi-config-category-core-lan-conf-security-keys-section.c \ ipmi-config-category-core-lan-conf-security-keys-section.h \ ipmi-config-category-core-lan-conf-user-security-section.c \ ipmi-config-category-core-lan-conf-user-security-section.h \ ipmi-config-category-core-lan6-conf-section.c \ ipmi-config-category-core-lan6-conf-section.h \ ipmi-config-category-core-misc-section.c \ ipmi-config-category-core-misc-section.h \ ipmi-config-category-core-pef-conf-section.c \ ipmi-config-category-core-pef-conf-section.h \ ipmi-config-category-core-rmcpplus-conf-privilege-section.c \ ipmi-config-category-core-rmcpplus-conf-privilege-section.h \ ipmi-config-category-core-sections.c \ ipmi-config-category-core-sections.h \ ipmi-config-category-core-serial-channel-section.c \ ipmi-config-category-core-serial-channel-section.h \ ipmi-config-category-core-serial-conf-section.c \ ipmi-config-category-core-serial-conf-section.h \ ipmi-config-category-core-sol-conf-section.c \ ipmi-config-category-core-sol-conf-section.h \ ipmi-config-category-core-user-sections.c \ ipmi-config-category-core-user-sections.h \ ipmi-config-category-dcmi-dcmi-conf-section.c \ ipmi-config-category-dcmi-dcmi-conf-section.h \ ipmi-config-category-dcmi-sections.c \ ipmi-config-category-dcmi-sections.h \ ipmi-config-category-pef-alert-policy-table.c \ ipmi-config-category-pef-alert-policy-table.h \ ipmi-config-category-pef-alert-string.c \ ipmi-config-category-pef-alert-string.h \ ipmi-config-category-pef-community-string.c \ ipmi-config-category-pef-community-string.h \ ipmi-config-category-pef-event-filter-table.c \ ipmi-config-category-pef-event-filter-table.h \ ipmi-config-category-pef-lan-alert-destination.c \ ipmi-config-category-pef-lan-alert-destination.h \ ipmi-config-category-pef-pef-conf-section.c \ ipmi-config-category-pef-pef-conf-section.h \ ipmi-config-category-pef-sections.c \ ipmi-config-category-pef-sections.h \ ipmi-config-category-sensors-discrete-section.c \ ipmi-config-category-sensors-discrete-section.h \ ipmi-config-category-sensors-sections.c \ ipmi-config-category-sensors-sections.h \ ipmi-config-category-sensors-sensor-event-enable-common.c \ ipmi-config-category-sensors-sensor-event-enable-common.h \ ipmi-config-category-sensors-threshold-section.c \ ipmi-config-category-sensors-threshold-section.h \ ipmi-config-category-sensors-utils.c \ ipmi-config-category-sensors-utils.h \ ipmi-config-checkout.c \ ipmi-config-checkout.h \ ipmi-config-comment.c \ ipmi-config-comment.h \ ipmi-config-commit.c \ ipmi-config-commit.h \ ipmi-config-diff.c \ ipmi-config-diff.h \ ipmi-config-legacy-pef-info.c \ ipmi-config-legacy-pef-info.h \ ipmi-config-map.c \ ipmi-config-map.h \ ipmi-config-parse.c \ ipmi-config-parse.h \ ipmi-config-section.c \ ipmi-config-section.h \ ipmi-config-utils.c \ ipmi-config-utils.h \ ipmi-config-validate.c \ ipmi-config-validate.h bmc-config: bmc-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x bmc-config ipmi-chassis-config: ipmi-chassis-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-chassis-config ipmi-pef-config: ipmi-pef-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-pef-config ipmi-sensors-config: ipmi-sensors-config.in sed -e 's:@CONFIGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmi-sensors-config $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: CLEANFILES = \ bmc-config \ ipmi-chassis-config \ ipmi-pef-config \ ipmi-sensors-config EXTRA_DIST = \ bmc-config.in \ ipmi-chassis-config.in \ ipmi-pef-config.in \ ipmi-sensors-config.in install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmi-pef-config $(DESTDIR)$(sbindir)/pef-config uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/pef-config freeipmi-1.6.4/ipmi-config/ipmi-config.c0000644002055400205540000004445413527331635020043 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-argp.h" #include "ipmi-config-checkout.h" #include "ipmi-config-commit.h" #include "ipmi-config-diff.h" #include "ipmi-config-parse.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-category-core-sections.h" #include "ipmi-config-category-chassis-sections.h" #include "ipmi-config-category-dcmi-sections.h" #include "ipmi-config-category-sensors-sections.h" #include "ipmi-config-category-pef-sections.h" #include "ipmi-config-legacy-pef-info.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-sdr-cache-common.h" #include "tool-util-common.h" static int _ipmi_config (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_config_state_data_t state_data; ipmi_config_prog_data_t *prog_data; struct ipmi_config_section *tmp_sections; int exit_code = EXIT_FAILURE; ipmi_config_err_t ret = 0; int file_opened = 0; FILE *fp = NULL; /* init NULL to remove warnings */ assert (pstate); assert (arg); prog_data = (ipmi_config_prog_data_t *)arg; assert (!(prog_data->args->category_mask & ~IPMI_CONFIG_CATEGORY_MASK_ALL)); if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_config_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; state_data.sections = NULL; state_data.sdr_ctx = NULL; if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_CORE) { if (!(tmp_sections = ipmi_config_core_sections_create (&state_data))) goto cleanup; if (ipmi_config_set_category (tmp_sections, IPMI_CONFIG_CATEGORY_MASK_CORE) < 0) goto cleanup; if (ipmi_config_section_append (&state_data.sections, tmp_sections) < 0) goto cleanup; } if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_CHASSIS) { if (!(tmp_sections = ipmi_config_chassis_sections_create (&state_data))) goto cleanup; if (ipmi_config_set_category (tmp_sections, IPMI_CONFIG_CATEGORY_MASK_CHASSIS) < 0) goto cleanup; if (ipmi_config_section_append (&state_data.sections, tmp_sections) < 0) goto cleanup; } if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_SENSORS) { if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (sdr_cache_create_and_load (state_data.sdr_ctx, NULL, state_data.ipmi_ctx, hostname, &(prog_data->args->common_args)) < 0) goto cleanup; if (!(tmp_sections = ipmi_config_sensors_sections_create (&state_data))) goto cleanup; if (ipmi_config_set_category (tmp_sections, IPMI_CONFIG_CATEGORY_MASK_SENSORS) < 0) goto cleanup; /* Many fields long in length, use average of 75 for this section */ if (ipmi_config_set_line_length (tmp_sections, 75) < 0) goto cleanup; if (ipmi_config_section_append (&state_data.sections, tmp_sections) < 0) goto cleanup; } if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_PEF) { if (!(tmp_sections = ipmi_config_pef_sections_create (&state_data))) goto cleanup; if (ipmi_config_set_category (tmp_sections, IPMI_CONFIG_CATEGORY_MASK_PEF) < 0) goto cleanup; if (ipmi_config_section_append (&state_data.sections, tmp_sections) < 0) goto cleanup; } if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_DCMI) { if (!(tmp_sections = ipmi_config_dcmi_sections_create (&state_data))) goto cleanup; if (ipmi_config_set_category (tmp_sections, IPMI_CONFIG_CATEGORY_MASK_DCMI) < 0) goto cleanup; /* Many fields long in length, use average of 60 for this section */ if (ipmi_config_set_line_length (tmp_sections, 60) < 0) goto cleanup; if (ipmi_config_section_append (&state_data.sections, tmp_sections) < 0) goto cleanup; } assert (state_data.sections); if (prog_data->args->action == IPMI_CONFIG_ACTION_CHECKOUT) { if (prog_data->args->filename) { if (prog_data->hosts_count > 1) { pstdout_fprintf (pstate, stderr, "Cannot output multiple host checkout into a single file\n"); goto cleanup; } if (!(fp = fopen (prog_data->args->filename, "w"))) { pstdout_perror (pstate, "fopen"); goto cleanup; } file_opened++; } else fp = stdout; } else if (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT || prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) { if (prog_data->args->filename && strcmp (prog_data->args->filename, "-")) { if (!(fp = fopen (prog_data->args->filename, "r"))) { pstdout_perror (pstate, "fopen"); goto cleanup; } file_opened++; } else fp = stdin; } /* parse if there is an input file or no pairs at all */ if ((prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT && prog_data->args->filename) || (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT && !prog_data->args->filename && !prog_data->args->keypairs) || (prog_data->args->action == IPMI_CONFIG_ACTION_DIFF && prog_data->args->filename) || (prog_data->args->action == IPMI_CONFIG_ACTION_DIFF && !prog_data->args->filename && !prog_data->args->keypairs)) { if (ipmi_config_parse (&state_data, fp) < 0) goto cleanup; } /* note: argp validation catches if user specified keypair and filename for a diff */ if ((prog_data->args->action == IPMI_CONFIG_ACTION_CHECKOUT || prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT || prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) && prog_data->args->keypairs) { if (ipmi_config_sections_insert_keyvalues (&state_data, prog_data->args->keypairs) < 0) goto cleanup; } if (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT || prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) { int num; if ((num = ipmi_config_sections_validate_keyvalue_inputs (&state_data)) < 0) goto cleanup; /* some errors found */ if (num) goto cleanup; } if (prog_data->args->action == IPMI_CONFIG_ACTION_CHECKOUT && prog_data->args->section_strs) { struct ipmi_config_section_str *sstr; sstr = prog_data->args->section_strs; while (sstr) { if (!ipmi_config_find_section (&state_data, sstr->section_name)) { pstdout_fprintf (pstate, stderr, "Unknown section `%s', perhaps another category must be specified (see --category)\n", sstr->section_name); goto cleanup; } sstr = sstr->next; } } /* * Special case(s) */ if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_CORE) { /* Special case: On some motherboards, the "Enable_User" must * come after the "Password" configure. So we store information * for this fact. See workaround details in user section code. */ if (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT) { struct ipmi_config_section *section; unsigned int user_count = 0; /* First, see how many user sections there are */ section = state_data.sections; while (section) { if (stristr (section->section_name, "User")) user_count++; section = section->next; } if (user_count) { unsigned int enable_user_found = 0; unsigned int datasize; section = state_data.sections; while (section) { struct ipmi_config_keyvalue *kv; if (stristr (section->section_name, "User")) { uint8_t userid; userid = atoi (section->section_name + strlen ("User")); if (userid < user_count) { if ((kv = ipmi_config_find_keyvalue (section, "Enable_User"))) enable_user_found = 1; } } section = section->next; } if (enable_user_found) { datasize = sizeof (ipmi_config_enable_user_after_password_t) * user_count; if (!(state_data.enable_user_after_password = (ipmi_config_enable_user_after_password_t *)malloc (datasize))) { pstdout_perror (pstate, "malloc"); goto cleanup; } state_data.enable_user_after_password_len = user_count; memset (state_data.enable_user_after_password, '\0', datasize); } } } /* Special case: IP addresses and MAC addresses cannot be configured * in parallel. Reject input if user attempts to configure the same * IP or MAC on multiple hosts. */ if (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT && prog_data->hosts_count > 1) { struct ipmi_config_section *section; if ((section = ipmi_config_find_section (&state_data, "Lan_Conf"))) { if (ipmi_config_find_keyvalue (section, "IP_Address")) { pstdout_fprintf (pstate, stderr, "Cannot configure Lan_Conf:IP_Address on multiple hosts\n"); goto cleanup; } if (ipmi_config_find_keyvalue (section, "MAC_Address")) { pstdout_fprintf (pstate, stderr, "Cannot configure Lan_Conf:MAC_Address on multiple hosts\n"); goto cleanup; } } } } else if (prog_data->args->category_mask & IPMI_CONFIG_CATEGORY_MASK_CHASSIS) { /* Special case: There may not be a way to checkout the front panel * buttons, so we have to store before hand it if we intend to * commit it. */ if (prog_data->args->action == IPMI_CONFIG_ACTION_COMMIT) { struct ipmi_config_section *section; section = state_data.sections; while (section) { struct ipmi_config_keyvalue *kv; if (!strcasecmp (section->section_name, "Chassis_Front_Panel_Buttons")) { if ((kv = ipmi_config_find_keyvalue (section, "Enable_Standby_Button_For_Entering_Standby"))) { state_data.front_panel_enable_standby_button_for_entering_standby_initialized++; state_data.front_panel_enable_standby_button_for_entering_standby = same (kv->value_input, "yes") ? IPMI_CHASSIS_BUTTON_ENABLE : IPMI_CHASSIS_BUTTON_DISABLE; } if ((kv = ipmi_config_find_keyvalue (section, "Enable_Diagnostic_Interrupt_Button"))) { state_data.front_panel_enable_diagnostic_interrupt_button_initialized++; state_data.front_panel_enable_diagnostic_interrupt_button = same (kv->value_input, "yes") ? IPMI_CHASSIS_BUTTON_ENABLE : IPMI_CHASSIS_BUTTON_DISABLE; } if ((kv = ipmi_config_find_keyvalue (section, "Enable_Reset_Button"))) { state_data.front_panel_enable_reset_button_initialized++; state_data.front_panel_enable_reset_button = same (kv->value_input, "yes") ? IPMI_CHASSIS_BUTTON_ENABLE : IPMI_CHASSIS_BUTTON_DISABLE; } if ((kv = ipmi_config_find_keyvalue (section, "Enable_Power_Off_Button_For_Power_Off_Only"))) { state_data.front_panel_enable_power_off_button_for_power_off_only_initialized++; state_data.front_panel_enable_power_off_button_for_power_off_only = same (kv->value_input, "yes") ? IPMI_CHASSIS_BUTTON_ENABLE : IPMI_CHASSIS_BUTTON_DISABLE; } } section = section->next; } } } if (prog_data->args->info) { ret = ipmi_config_pef_info (&state_data); goto out; } switch (prog_data->args->action) { case IPMI_CONFIG_ACTION_CHECKOUT: if (prog_data->args->section_strs) { struct ipmi_config_section_str *sstr; /* note: argp validation catches if user specified --section * and --keypair, so all_keys_if_none_specified should be '1'. */ sstr = prog_data->args->section_strs; while (sstr) { struct ipmi_config_section *s; ipmi_config_err_t this_ret; if (!(s = ipmi_config_find_section (&state_data, sstr->section_name))) { pstdout_fprintf (pstate, stderr, "## FATAL: Cannot checkout section '%s'\n", sstr->section_name); continue; } this_ret = ipmi_config_checkout_section (&state_data, s, 1, fp); if (this_ret != IPMI_CONFIG_ERR_SUCCESS) ret = this_ret; if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) break; sstr = sstr->next; } } else { int all_keys_if_none_specified = 0; if (!prog_data->args->keypairs) all_keys_if_none_specified++; ret = ipmi_config_checkout (&state_data, all_keys_if_none_specified, fp); } break; case IPMI_CONFIG_ACTION_COMMIT: ret = ipmi_config_commit (&state_data); break; case IPMI_CONFIG_ACTION_DIFF: ret = ipmi_config_diff (&state_data); break; case IPMI_CONFIG_ACTION_LIST_SECTIONS: ret = ipmi_config_output_sections_list (&state_data); break; } out: if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) { exit_code = IPMI_CONFIG_FATAL_EXIT_VALUE; goto cleanup; } if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR) { exit_code = IPMI_CONFIG_NON_FATAL_EXIT_VALUE; goto cleanup; } exit_code = EXIT_SUCCESS; cleanup: if (state_data.sdr_ctx) ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); ipmi_config_sections_destroy (state_data.sections); if (file_opened) fclose (fp); return (exit_code); } int main (int argc, char *argv[]) { ipmi_config_prog_data_t prog_data; struct ipmi_config_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_config_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; prog_data.hosts_count = hosts_count; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_config, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config.h0000644002055400205540000003154213527331635020042 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_H #define IPMI_CONFIG_H #include #include #include "tool-cmdline-common.h" #include "pstdout.h" #define IPMI_CONFIG_CIPHER_SUITE_LEN 16 enum ipmi_config_argp_option_keys { IPMI_CONFIG_ARGP_CATEGORY_KEY = 'g', IPMI_CONFIG_ARGP_CHECKOUT_KEY = 'o', IPMI_CONFIG_ARGP_COMMIT_KEY = 'c', IPMI_CONFIG_ARGP_DIFF_KEY = 'd', IPMI_CONFIG_ARGP_FILENAME_KEY_LEGACY = 'f', IPMI_CONFIG_ARGP_FILENAME_KEY = 'n', IPMI_CONFIG_ARGP_KEYPAIR_KEY = 'e', IPMI_CONFIG_ARGP_SECTIONS_KEY = 'S', IPMI_CONFIG_ARGP_LIST_SECTIONS_KEY = 'L', IPMI_CONFIG_ARGP_VERBOSE_KEY = 'v', IPMI_CONFIG_ARGP_PEF_INFO_KEY = 'i', /* legacy */ IPMI_CONFIG_ARGP_LAN_CHANNEL_NUMBER_KEY = 200, IPMI_CONFIG_ARGP_SERIAL_CHANNEL_NUMBER_KEY = 201, IPMI_CONFIG_ARGP_SOL_CHANNEL_NUMBER_KEY = 202, }; #define IPMI_CTX_ERRNUM_IS_FATAL_ERROR(__ipmi_ctx) \ (((ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_CTX_NULL \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_CTX_INVALID \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_PERMISSION \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_USERNAME_INVALID \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_PASSWORD_INVALID \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_K_G_INVALID \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_IPMI_2_0_UNAVAILABLE \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_CONNECTION_TIMEOUT \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_SESSION_TIMEOUT \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DEVICE_ALREADY_OPEN \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DEVICE_NOT_OPEN \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DEVICE_NOT_SUPPORTED \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DEVICE_NOT_FOUND \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DRIVER_TIMEOUT \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_COMMAND_INVALID_FOR_SELECTED_INTERFACE \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_BAD_RMCPPLUS_STATUS_CODE \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_OUT_OF_MEMORY \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_HOSTNAME_INVALID \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_PARAMETERS \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_DRIVER_PATH_REQUIRED \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_IPMI_ERROR \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_SYSTEM_ERROR \ || (ipmi_ctx_errnum ((__ipmi_ctx))) == IPMI_ERR_INTERNAL_ERROR) ? 1 : 0) #define IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT 0x01 #define IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY 0x02 #define IPMI_CONFIG_DO_NOT_CHECKOUT 0x04 #define IPMI_CONFIG_READABLE_ONLY 0x08 #define IPMI_CONFIG_UNDEFINED 0x10 #define IPMI_CONFIG_USERNAME_NOT_SET_YET 0x20 #define IPMI_CONFIG_DO_NOT_LIST 0x40 #define IPMI_CONFIG_USERNAME_NOT_SET_YET_STR "" #define IPMI_CONFIG_CHECKOUT_LINE_LEN 45 #define IPMI_CONFIG_PARSE_BUFLEN 4096 #define IPMI_CONFIG_OUTPUT_BUFLEN 8192 #define IPMI_CONFIG_MAX_SECTION_NAME_LEN 128 #define IPMI_CONFIG_MAX_KEY_NAME_LEN 128 #define IPMI_CONFIG_MAX_DESCRIPTION_LEN 1024 #define IPMI_CONFIG_NON_FATAL_EXIT_VALUE 1 #define IPMI_CONFIG_FATAL_EXIT_VALUE 2 #define same(a,b) (strcasecmp (a,b) == 0) typedef enum { IPMI_CONFIG_ACTION_CHECKOUT = 1, IPMI_CONFIG_ACTION_COMMIT, IPMI_CONFIG_ACTION_DIFF, IPMI_CONFIG_ACTION_LIST_SECTIONS, } ipmi_config_action_t; typedef enum { IPMI_CONFIG_ERR_FATAL_ERROR = -5, IPMI_CONFIG_ERR_NON_FATAL_ERROR = -4, IPMI_CONFIG_ERR_NON_FATAL_ERROR_READ_ONLY = -3, IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED = -2, IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG = -1, IPMI_CONFIG_ERR_SUCCESS = 0, } ipmi_config_err_t; typedef enum { IPMI_CONFIG_VALIDATE_FATAL_ERROR = -5, IPMI_CONFIG_VALIDATE_NON_FATAL_ERROR = -4, IPMI_CONFIG_VALIDATE_VALUE_CANNOT_BE_ENCODED_ACCURATELY = -3, IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE = -2, IPMI_CONFIG_VALIDATE_INVALID_VALUE = -1, IPMI_CONFIG_VALIDATE_VALID_VALUE = 0, } ipmi_config_validate_t; #define IPMI_CONFIG_IS_NON_FATAL_ERROR(__ret) \ (((__ret) == IPMI_CONFIG_ERR_NON_FATAL_ERROR \ || (__ret) == IPMI_CONFIG_ERR_NON_FATAL_ERROR_READ_ONLY \ || (__ret) == IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED \ || (__ret) == IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG) ? 1 : 0) #define IPMI_CONFIG_CATEGORY_MASK_CORE 0x0001 #define IPMI_CONFIG_CATEGORY_MASK_BMC IPMI_CONFIG_CATEGORY_MASK_CORE /* legacy name */ #define IPMI_CONFIG_CATEGORY_MASK_CHASSIS 0x0002 #define IPMI_CONFIG_CATEGORY_MASK_SENSORS 0x0004 #define IPMI_CONFIG_CATEGORY_MASK_PEF 0x0008 #define IPMI_CONFIG_CATEGORY_MASK_DCMI 0x0010 #define IPMI_CONFIG_CATEGORY_MASK_ALL 0x001F #define IPMI_CONFIG_CATEGORY_VALID(__val) \ (((__val) == IPMI_CONFIG_CATEGORY_MASK_CORE \ || (__val) == IPMI_CONFIG_CATEGORY_MASK_CHASSIS \ || (__val) == IPMI_CONFIG_CATEGORY_MASK_SENSORS \ || (__val) == IPMI_CONFIG_CATEGORY_MASK_PEF \ || (__val) == IPMI_CONFIG_CATEGORY_MASK_DCMI) ? 1 : 0) struct ipmi_config_keypair { char *section_name; char *key_name; char *value_input; struct ipmi_config_keypair *next; }; struct ipmi_config_section_str { char *section_name; struct ipmi_config_section_str *next; }; struct ipmi_config_keyvalue { struct ipmi_config_key *key; char *value_input; char *value_output; struct ipmi_config_keyvalue *next; }; /* forward declare */ struct ipmi_config_state_data; typedef struct ipmi_config_state_data ipmi_config_state_data_t; /* Fills in kv->value_output as a printable string */ typedef ipmi_config_err_t (*Key_Checkout)(ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); /* Takes kv->value_input and commits it */ typedef ipmi_config_err_t (*Key_Commit)(ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); /* Determines if an inputted value is valid */ typedef ipmi_config_validate_t (*Key_Validate)(ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); /* Sectional pre commit call */ typedef ipmi_config_err_t (*Section_Pre_Commit)(ipmi_config_state_data_t *state_data, const char *section_name); /* Sectional post commit call */ typedef ipmi_config_err_t (*Section_Post_Commit)(ipmi_config_state_data_t *state_data, const char *section_name); struct ipmi_config_key { char *key_name; char *description; unsigned int flags; Key_Checkout checkout; Key_Commit commit; Key_Validate validate; struct ipmi_config_key *next; }; struct ipmi_config_section { char *section_name; char *section_comment_section_name; char *section_comment; unsigned int flags; Section_Pre_Commit section_pre_commit; Section_Post_Commit section_post_commit; /* keys in this section */ struct ipmi_config_key *keys; /* key and values for checkout/commit/diff */ struct ipmi_config_keyvalue *keyvalues; struct ipmi_config_section *next; unsigned int category; unsigned int line_length; }; struct ipmi_config_arguments { struct common_cmd_args common_args; unsigned int category_mask; ipmi_config_action_t action; unsigned int verbose_count; char *filename; uint8_t lan_channel_number; int lan_channel_number_set; uint8_t serial_channel_number; int serial_channel_number_set; uint8_t sol_channel_number; int sol_channel_number_set; struct ipmi_config_keypair *keypairs; struct ipmi_config_section_str *section_strs; /* * Legacy options */ int info; }; typedef struct ipmi_config_prog_data { char *progname; struct ipmi_config_arguments *args; int hosts_count; } ipmi_config_prog_data_t; typedef struct ipmi_config_enable_user_after_password { int enable_user_failed; struct ipmi_config_keyvalue *kv; } ipmi_config_enable_user_after_password_t; struct ipmi_config_state_data { ipmi_config_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; struct ipmi_config_section *sections; ipmi_sdr_ctx_t sdr_ctx; /* * For Core / BMC configuration */ /* achu: workaround for OEM compliance issue, see user section */ int enable_user_after_password_len; ipmi_config_enable_user_after_password_t *enable_user_after_password; /* lamont: caching to make ipv6 go faster */ int ipv6_ipv4_support_initialized; uint8_t ipv6_ipv4_support_channel_number; uint8_t ipv6_ipv4_support_supports_ipv6_only; uint8_t ipv6_ipv4_support_supports_ipv6_and_ipv4_simultaneously; uint8_t ipv6_ipv4_support_supports_ipv6_destination_address_for_lan_alert; /* achu: caching to make lan authentication enables go faster */ int authentication_type_initialized; uint8_t authentication_type_channel_number; uint8_t authentication_type_none; uint8_t authentication_type_md2; uint8_t authentication_type_md5; uint8_t authentication_type_straight_password; uint8_t authentication_type_oem_proprietary; /* achu: caching to make rmcpplus priv go faster */ uint8_t cipher_suite_entry_count; int cipher_suite_entry_count_set; uint8_t cipher_suite_id_supported[IPMI_CONFIG_CIPHER_SUITE_LEN]; int cipher_suite_id_supported_set; uint8_t cipher_suite_priv[IPMI_CONFIG_CIPHER_SUITE_LEN]; int cipher_suite_priv_set; uint8_t cipher_suite_channel_number; /* For multi-channel settings * * base is for base section name (e.g. "Lan_Conf") * channel is for channel suffixed section name (e.g. "Lan_Conf_Channel_1") */ unsigned int lan_base_config_flags; unsigned int lan_channel_config_flags; unsigned int serial_base_config_flags; unsigned int serial_channel_config_flags; unsigned int sol_base_config_flags; unsigned int sol_channel_config_flags; /* For channel reading */ uint8_t lan_channel_numbers[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int lan_channel_numbers_count; unsigned int lan_channel_numbers_loaded; uint8_t serial_channel_numbers[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int serial_channel_numbers_count; unsigned int serial_channel_numbers_loaded; /* cache for multi-channel */ uint8_t sol_channel_numbers_lan_channel[IPMI_CHANNEL_NUMBERS_MAX]; uint8_t sol_channel_numbers_sol_channel[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int sol_channel_numbers_count; uint8_t sol_channel_numbers_unique[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int sol_channel_numbers_unique_count; unsigned int sol_channel_numbers_loaded; /* * For Chassis configuration */ /* achu: workaround for IPMI limitation */ int front_panel_enable_standby_button_for_entering_standby_initialized; uint8_t front_panel_enable_standby_button_for_entering_standby; int front_panel_enable_diagnostic_interrupt_button_initialized; uint8_t front_panel_enable_diagnostic_interrupt_button; int front_panel_enable_reset_button_initialized; uint8_t front_panel_enable_reset_button; int front_panel_enable_power_off_button_for_power_off_only_initialized; uint8_t front_panel_enable_power_off_button_for_power_off_only; }; #endif /* IPMI_CONFIG_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-argp.c0000644002055400205540000005057313527331635020771 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "ipmi-config.h" #include "ipmi-config-argp.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-config - " PACKAGE_VERSION "\n" "Copyright (C) 2003-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-config - configure BMC values"; static char cmdline_args_doc[] = ""; /* The options we understand. */ static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "category", IPMI_CONFIG_ARGP_CATEGORY_KEY, "CATEGORY", 0, "Specify category (categories) to configure. Defaults to 'core'.", 40}, { "checkout", IPMI_CONFIG_ARGP_CHECKOUT_KEY, 0, 0, "Fetch configuration information.", 41}, { "commit", IPMI_CONFIG_ARGP_COMMIT_KEY, 0, 0, "Update configuration information from a config file or key pairs.", 42}, { "diff", IPMI_CONFIG_ARGP_DIFF_KEY, 0, 0, "Show differences between stored information and a config file or key pairs.", 43}, { "filename", IPMI_CONFIG_ARGP_FILENAME_KEY, "FILENAME", 0, "Specify a config file for checkout/commit/diff.", 44}, { "key-pair", IPMI_CONFIG_ARGP_KEYPAIR_KEY, "KEY-PAIR", 0, "Specify KEY=VALUE pairs for checkout/commit/diff.", 45}, { "section", IPMI_CONFIG_ARGP_SECTIONS_KEY, "SECTION", 0, "Specify a SECTION for checkout.", 46}, { "listsections", IPMI_CONFIG_ARGP_LIST_SECTIONS_KEY, 0, 0, "List available sections for checkout.", 47}, { "verbose", IPMI_CONFIG_ARGP_VERBOSE_KEY, 0, 0, "Print additional detailed information.", 48}, { "lan-channel-number", IPMI_CONFIG_ARGP_LAN_CHANNEL_NUMBER_KEY, "NUMBER", 0, "Use a specific LAN Channel Number.", 49}, { "serial-channel-number", IPMI_CONFIG_ARGP_SERIAL_CHANNEL_NUMBER_KEY, "NUMBER", 0, "Use a specific Serial Channel Number.", 50}, { "sol-channel-number", IPMI_CONFIG_ARGP_SOL_CHANNEL_NUMBER_KEY, "NUMBER", 0, "Use a specific SOL Channel Number.", 51}, { "foobar", IPMI_CONFIG_ARGP_FILENAME_KEY_LEGACY, "FILENAME", OPTION_HIDDEN, "Specify a config file for checkout/commit/diff.", 52}, { "info", IPMI_CONFIG_ARGP_PEF_INFO_KEY, 0, OPTION_HIDDEN, "Show general information about PEF configuration.", 53}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc}; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static int _ipmi_config_category (char *arg, unsigned int *category_mask) { char *argtmp; char *tok; int rv = -1; assert (arg); assert (category_mask); (*category_mask) = 0; if (!(argtmp = strdup (arg))) { perror (arg); return (-1); } tok = strtok (argtmp, " ,"); while (tok) { if (!strcasecmp (tok, "core") || !strcasecmp (tok, "bmc")) (*category_mask) |= IPMI_CONFIG_CATEGORY_MASK_CORE; else if (!strcasecmp (tok, "chassis")) (*category_mask) |= IPMI_CONFIG_CATEGORY_MASK_CHASSIS; else if (!strcasecmp (tok, "sensors") || !strcasecmp (tok, "sensor")) /* handle common typo */ (*category_mask) |= IPMI_CONFIG_CATEGORY_MASK_SENSORS; else if (!strcasecmp (tok, "pef")) (*category_mask) |= IPMI_CONFIG_CATEGORY_MASK_PEF; else if (!strcasecmp (tok, "dcmi")) (*category_mask) |= IPMI_CONFIG_CATEGORY_MASK_DCMI; else { fprintf (stderr, "invalid category '%s' specified\n", tok); goto cleanup; } tok = strtok (NULL, " ,"); } rv = 0; cleanup: free (argtmp); return (rv); } static int _ipmi_config_parse_channel_number (char *arg, uint8_t *channel_number, int *channel_number_set) { char *endptr; int tmp; assert (arg); assert (channel_number); assert (channel_number_set); errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid channel number\n"); return (-1); } if (!IPMI_CHANNEL_NUMBER_VALID (tmp)) { fprintf (stderr, "invalid channel number\n"); return (-1); } (*channel_number) = (uint8_t)tmp; (*channel_number_set)++; return (0); } static int _ipmi_config_keypair_parse_string (const char *str, char **section_name, char **key_name, char **value) { char *str_temp = NULL; char *section_name_tok = NULL; char *key_name_tok = NULL; char *value_tok = NULL; char *ptr; char *buf; int rv = -1; assert (str); assert (section_name); assert (key_name); assert (value); *section_name = NULL; *key_name = NULL; *value = NULL; if (!(str_temp = strdup (str))) { perror ("strdup"); goto cleanup; } section_name_tok = strtok_r (str_temp, ":", &buf); key_name_tok = strtok_r (NULL, "=", &buf); value_tok = strtok_r (NULL, "\0", &buf); if (!(section_name_tok && key_name_tok)) { fprintf (stderr, "Improperly input keypair '%s'\n", str); goto cleanup; } /* get rid of spaces stuck in the string */ if (section_name_tok) section_name_tok = strtok_r (section_name_tok, " \t", &buf); if (key_name_tok) key_name_tok = strtok_r (key_name_tok, " \t", &buf); if (value_tok) value_tok = strtok_r (value_tok, " \t", &buf); if (section_name_tok) { if (!(ptr = strdup (section_name_tok))) { perror ("strdup"); goto cleanup; } *section_name = ptr; } if (key_name_tok) { if (!(ptr = strdup (key_name_tok))) { perror ("strdup"); goto cleanup; } *key_name = ptr; } if (value_tok) { if (!(ptr = strdup (value_tok))) { perror ("strdup"); goto cleanup; } *value = ptr; } else { /* values can be empty strings */ if (!(ptr = strdup (""))) { perror ("strdup"); goto cleanup; } *value = ptr; } rv = 0; cleanup: free (str_temp); if (rv < 0) { free (*section_name); *section_name = NULL; free (*key_name); *key_name = NULL; free (*value); *value = NULL; } return (rv); } static int _ipmi_config_keypair_append (struct ipmi_config_keypair **keypairs, struct ipmi_config_keypair *keypair) { assert (keypairs); assert (keypair); if (*keypairs) { struct ipmi_config_keypair *kp; kp = *keypairs; while (kp) { if (!strcasecmp (kp->section_name, keypair->section_name) && !strcasecmp (kp->key_name, keypair->key_name)) { fprintf (stderr, "Duplicate section:key pair '%s:%s' specified\n", kp->section_name, kp->key_name); return (-1); } kp = kp->next; } kp = *keypairs; while (kp->next) kp = kp->next; kp->next = keypair; } else *keypairs = keypair; return (0); } static struct ipmi_config_keypair * _ipmi_config_keypair_create (const char *section_name, const char *key_name, const char *value_input) { struct ipmi_config_keypair *keypair = NULL; assert (section_name); assert (key_name); if (!(keypair = (struct ipmi_config_keypair *)malloc (sizeof (struct ipmi_config_keypair)))) { perror ("malloc"); goto cleanup; } keypair->section_name = NULL; keypair->key_name = NULL; keypair->value_input = NULL; keypair->next = NULL; if (!(keypair->section_name = strdup (section_name))) { perror ("strdup"); goto cleanup; } if (!(keypair->key_name = strdup (key_name))) { perror ("strdup"); goto cleanup; } if (value_input) { if (!(keypair->value_input = strdup (value_input))) { perror ("strdup"); goto cleanup; } } return (keypair); cleanup: if (keypair) { free (keypair->section_name); free (keypair->key_name); free (keypair->value_input); free (keypair); } return (NULL); } static struct ipmi_config_section_str * _ipmi_config_section_str_create (const char *section_name) { struct ipmi_config_section_str *sstr = NULL; if (!(sstr = (struct ipmi_config_section_str *)malloc (sizeof (struct ipmi_config_section_str)))) { perror ("malloc"); goto cleanup; } sstr->section_name = NULL; sstr->next = NULL; if (!(sstr->section_name = strdup (section_name))) { perror ("strdup"); goto cleanup; } return (sstr); cleanup: if (sstr) { free (sstr->section_name); free (sstr); } return (NULL); } static int _ipmi_config_section_str_append (struct ipmi_config_section_str **section_strs, struct ipmi_config_section_str *section_str) { assert (section_strs); assert (section_str); if (*section_strs) { struct ipmi_config_section_str *sstr; sstr = *section_strs; while (sstr) { if (!strcasecmp (sstr->section_name, section_str->section_name)) { fprintf (stderr, "Duplicate section '%s' specified\n", sstr->section_name); return (-1); } sstr = sstr->next; } sstr = *section_strs; while (sstr->next) sstr = sstr->next; sstr->next = section_str; } else *section_strs = section_str; return (0); } /* Parse a single option. */ static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_config_arguments *cmd_args; struct ipmi_config_keypair *kp = NULL; struct ipmi_config_section_str *sstr = NULL; char *section_name = NULL; char *key_name = NULL; char *value = NULL; assert (state); cmd_args = state->input; switch (key) { case IPMI_CONFIG_ARGP_CATEGORY_KEY: if (_ipmi_config_category (arg, &(cmd_args->category_mask)) < 0) exit (EXIT_FAILURE); break; case IPMI_CONFIG_ARGP_CHECKOUT_KEY: if (!cmd_args->action) cmd_args->action = IPMI_CONFIG_ACTION_CHECKOUT; else cmd_args->action = -1; break; case IPMI_CONFIG_ARGP_COMMIT_KEY: if (!cmd_args->action) cmd_args->action = IPMI_CONFIG_ACTION_COMMIT; else cmd_args->action = -1; break; case IPMI_CONFIG_ARGP_DIFF_KEY: if (!cmd_args->action) cmd_args->action = IPMI_CONFIG_ACTION_DIFF; else cmd_args->action = -1; break; case IPMI_CONFIG_ARGP_FILENAME_KEY: case IPMI_CONFIG_ARGP_FILENAME_KEY_LEGACY: free (cmd_args->filename); if (!(cmd_args->filename = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMI_CONFIG_ARGP_KEYPAIR_KEY: if (_ipmi_config_keypair_parse_string (arg, §ion_name, &key_name, &value) < 0) exit (EXIT_FAILURE); if (!(kp = _ipmi_config_keypair_create (section_name, key_name, value))) exit (EXIT_FAILURE); if (_ipmi_config_keypair_append (&(cmd_args->keypairs), kp) < 0) exit (EXIT_FAILURE); free (section_name); free (key_name); free (value); break; case IPMI_CONFIG_ARGP_SECTIONS_KEY: if (!(sstr = _ipmi_config_section_str_create (arg))) exit (EXIT_FAILURE); if (_ipmi_config_section_str_append (&(cmd_args->section_strs), sstr) < 0) exit (EXIT_FAILURE); sstr = NULL; break; case IPMI_CONFIG_ARGP_LIST_SECTIONS_KEY: if (!cmd_args->action) cmd_args->action = IPMI_CONFIG_ACTION_LIST_SECTIONS; else cmd_args->action = -1; break; case IPMI_CONFIG_ARGP_VERBOSE_KEY: cmd_args->verbose_count++; break; case IPMI_CONFIG_ARGP_LAN_CHANNEL_NUMBER_KEY: if (_ipmi_config_parse_channel_number (arg, &(cmd_args->lan_channel_number), &(cmd_args->lan_channel_number_set)) < 0) exit (EXIT_FAILURE); break; case IPMI_CONFIG_ARGP_SERIAL_CHANNEL_NUMBER_KEY: if (_ipmi_config_parse_channel_number (arg, &(cmd_args->serial_channel_number), &(cmd_args->serial_channel_number_set)) < 0) exit (EXIT_FAILURE); break; case IPMI_CONFIG_ARGP_SOL_CHANNEL_NUMBER_KEY: if (_ipmi_config_parse_channel_number (arg, &(cmd_args->sol_channel_number), &(cmd_args->sol_channel_number_set)) < 0) exit (EXIT_FAILURE); break; case IPMI_CONFIG_ARGP_PEF_INFO_KEY: /* legacy */ cmd_args->info++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &cmd_args->common_args)); } return (0); } static void _ipmi_config_config_file_parse (struct ipmi_config_arguments *cmd_args) { struct config_file_data_ipmi_config config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_config)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_CONFIG, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; } static void _ipmi_config_args_validate (struct ipmi_config_arguments *cmd_args) { assert (cmd_args); if ((!cmd_args->action || cmd_args->action == -1) && !cmd_args->info && !cmd_args->common_args.flush_cache) { fprintf (stderr, "Exactly one of --checkout, --commit, --diff, or --listsections MUST be given\n"); exit (EXIT_FAILURE); } /* filename and keypair both given for diff */ if (cmd_args->filename && cmd_args->keypairs && cmd_args->action == IPMI_CONFIG_ACTION_DIFF) { fprintf (stderr, "Both --filename or --keypair cannot be used\n"); exit (EXIT_FAILURE); } /* only one of keypairs or section can be given for checkout */ if (cmd_args->action == IPMI_CONFIG_ACTION_CHECKOUT && (cmd_args->keypairs && cmd_args->section_strs)) { fprintf (stderr, "Only one of --filename, --keypair, and --section can be used\n"); exit (EXIT_FAILURE); } /* filename is readable if commit, writable/creatable if checkout */ if (cmd_args->filename) { switch (cmd_args->action) { case IPMI_CONFIG_ACTION_COMMIT: case IPMI_CONFIG_ACTION_DIFF: if (access (cmd_args->filename, R_OK) < 0) { fprintf (stderr, "Cannot read '%s': %s\n", cmd_args->filename, strerror (errno)); exit (EXIT_FAILURE); } break; case IPMI_CONFIG_ACTION_CHECKOUT: if (access (cmd_args->filename, F_OK) == 0) { if (access (cmd_args->filename, W_OK) < 0) { fprintf (stderr, "Cannot write to '%s': %s\n", cmd_args->filename, strerror (errno)); exit (EXIT_FAILURE); } } else { int fd; if ((fd = open (cmd_args->filename, O_CREAT, 0644)) < 0) { fprintf (stderr, "Cannot open '%s': %s\n", cmd_args->filename, strerror (errno)); exit (EXIT_FAILURE); } else { /* ignore close error, don't care right now */ close (fd); if (unlink (cmd_args->filename) < 0) { fprintf (stderr, "Cannot remove '%s': %s\n", cmd_args->filename, strerror (errno)); exit (EXIT_FAILURE); } } } break; case IPMI_CONFIG_ACTION_LIST_SECTIONS: /* do nothing - here to remove compile warning */ break; } } } void ipmi_config_argp_parse (int argc, char *argv[], struct ipmi_config_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->category_mask = IPMI_CONFIG_CATEGORY_MASK_CORE; cmd_args->action = 0; cmd_args->verbose_count = 0; cmd_args->filename = NULL; cmd_args->lan_channel_number = 0; cmd_args->lan_channel_number_set = 0; cmd_args->serial_channel_number = 0; cmd_args->serial_channel_number_set = 0; cmd_args->sol_channel_number = 0; cmd_args->sol_channel_number_set = 0; cmd_args->keypairs = NULL; cmd_args->section_strs = NULL; cmd_args->info = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_config_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_config_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-config/ipmi-config-argp.h0000644002055400205540000000161713527331635020771 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_ARGP_H #define IPMI_CONFIG_ARGP_H #include "ipmi-config.h" void ipmi_config_argp_parse (int argc, char *argv[], struct ipmi_config_arguments *args); #endif /* IPMI_CONFIG_ARGP_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-boot-flags.c0000644002055400205540000012614713527331635025344 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct boot_flags_data { uint8_t boot_flags_persistent; uint8_t bios_boot_type; uint8_t cmos_clear; uint8_t lock_keyboard; uint8_t screen_blank; uint8_t boot_device; uint8_t lock_out_reset_button; uint8_t lock_out_power_button; uint8_t lock_out_sleep_button; uint8_t firmware_bios_verbosity; uint8_t force_progress_event_traps; uint8_t user_password_bypass; uint8_t console_redirection; uint8_t bios_shared_mode_override; uint8_t bios_mux_control_override; uint8_t device_instance_selector; }; static ipmi_config_err_t _get_boot_flags (ipmi_config_state_data_t *state_data, struct boot_flags_data *data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint64_t val; assert (state_data); assert (data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_boot_options_boot_flags_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_boot_options_boot_flags (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_NO_SET_SELECTOR, IPMI_SYSTEM_BOOT_OPTIONS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_boot_options_boot_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "boot_flags_persistent", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'boot_flags_persistent': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->boot_flags_persistent = val; if (FIID_OBJ_GET (obj_cmd_rs, "bios_boot_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bios_boot_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->bios_boot_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "cmos_clear", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'cmos_clear': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->cmos_clear = val; if (FIID_OBJ_GET (obj_cmd_rs, "lock_keyboard", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lock_keyboard': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->lock_keyboard = val; if (FIID_OBJ_GET (obj_cmd_rs, "screen_blank", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'screen_blank': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->screen_blank = val; if (FIID_OBJ_GET (obj_cmd_rs, "boot_device", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'boot_device': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->boot_device = val; if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_reset_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lock_out_reset_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->lock_out_reset_button = val; if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_via_power_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lock_out_via_power_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->lock_out_power_button = val; if (FIID_OBJ_GET (obj_cmd_rs, "lock_out_sleep_button", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lock_out_sleep_button': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->lock_out_sleep_button = val; if (FIID_OBJ_GET (obj_cmd_rs, "firmware_bios_verbosity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'firmware_bios_verbosity': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->firmware_bios_verbosity = val; if (FIID_OBJ_GET (obj_cmd_rs, "force_progress_event_traps", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'force_progress_event_traps': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->force_progress_event_traps = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_password_bypass", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_password_bypass': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->user_password_bypass = val; if (FIID_OBJ_GET (obj_cmd_rs, "console_redirection", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'console_redirection': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->console_redirection = val; if (FIID_OBJ_GET (obj_cmd_rs, "bios_mux_control_override", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bios_mux_control_override': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->bios_mux_control_override = val; if (FIID_OBJ_GET (obj_cmd_rs, "bios_shared_mode_override", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bios_shared_mode_override': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->bios_shared_mode_override = val; if (FIID_OBJ_GET (obj_cmd_rs, "device_instance_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'device_instance_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->device_instance_selector = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_boot_flags (ipmi_config_state_data_t *state_data, struct boot_flags_data *data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_boot_options_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* achu (workaround) * * Some motherboards seem to require that boot_flags_valid always be * "Yes". So we'll enforce it. It also doesn't make much sense * that we ever set it to "no". */ if (ipmi_cmd_set_system_boot_options_boot_flags (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED, data->bios_boot_type, data->boot_flags_persistent, IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_VALID, data->lock_out_reset_button, data->screen_blank, data->boot_device, data->lock_keyboard, data->cmos_clear, data->console_redirection, data->lock_out_sleep_button, data->user_password_bypass, data->force_progress_event_traps, data->firmware_bios_verbosity, data->lock_out_power_button, data->bios_mux_control_override, data->bios_shared_mode_override, data->device_instance_selector, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_system_boot_options_boot_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t boot_flags_persistent_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.boot_flags_persistent ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t boot_flags_persistent_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.boot_flags_persistent = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t bios_boot_type_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, bios_boot_type_string (data.bios_boot_type)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t bios_boot_type_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.bios_boot_type = bios_boot_type_number (kv->value_input); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t cmos_clear_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.cmos_clear ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t cmos_clear_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.cmos_clear = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_keyboard_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.lock_keyboard ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_keyboard_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.lock_keyboard = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t screen_blank_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.screen_blank ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t screen_blank_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.screen_blank = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t boot_device_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, boot_device_string (data.boot_device)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t boot_device_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.boot_device = boot_device_number (kv->value_input); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t device_instance_selector_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, device_instance_selector_string (data.device_instance_selector)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t device_instance_selector_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.device_instance_selector = device_instance_selector_number (kv->value_input); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_reset_button_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.lock_out_reset_button ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_reset_button_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.lock_out_reset_button = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_power_button_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.lock_out_power_button ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_power_button_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.lock_out_power_button = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_sleep_button_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.lock_out_sleep_button ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lock_out_sleep_button_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.lock_out_sleep_button = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _set_system_boot_options_BMC_boot_flag_valid_bit_clearing (ipmi_config_state_data_t *state_data) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; fiid_obj_t obj_cmd_rs = NULL; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_boot_options_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED, IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT, IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT, IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT, IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT, IPMI_SYSTEM_BOOT_OPTION_DONT_CLEAR_VALID_BIT, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_system_boot_options_BMC_boot_flag_valid_bit_clearing: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_system_boot_options_boot_info_acknowledge (ipmi_config_state_data_t *state_data) { uint8_t boot_info_acknowledge = IPMI_SYSTEM_BOOT_OPTION_BOOT_INFO_UNACKNOWLEDGE; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; fiid_obj_t obj_cmd_rs = NULL; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_boot_options_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_system_boot_options_boot_info_acknowledge (state_data->ipmi_ctx, IPMI_SYSTEM_BOOT_OPTIONS_PARAMETER_VALID_UNLOCKED, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, &boot_info_acknowledge, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_system_boot_options_boot_info_acknowledge: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t chassis_boot_flags_post (ipmi_config_state_data_t *state_data, const char *section_name) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); /* Following should be called to ensure system keeps the * configuration permanent */ if ((ret = _set_system_boot_options_BMC_boot_flag_valid_bit_clearing (state_data)) == IPMI_CONFIG_ERR_FATAL_ERROR) { rv = ret; goto cleanup; } if (ret != IPMI_CONFIG_ERR_SUCCESS) rv = ret; /* Following should be called to inform remaining chassis subsystems * that a boot configuration change has taken place. */ if ((ret = _set_system_boot_options_boot_info_acknowledge (state_data)) == IPMI_CONFIG_ERR_FATAL_ERROR) { rv = ret; goto cleanup; } if (rv == IPMI_CONFIG_ERR_FATAL_ERROR) rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t firmware_bios_verbosity_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, firmware_bios_verbosity_string (data.firmware_bios_verbosity)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t firmware_bios_verbosity_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.firmware_bios_verbosity = firmware_bios_verbosity_number (kv->value_input); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t force_progress_event_traps_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.force_progress_event_traps ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t force_progress_event_traps_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.force_progress_event_traps = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t user_password_bypass_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.user_password_bypass ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t user_password_bypass_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.user_password_bypass = same (kv->value_input, "yes"); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t console_redirection_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, console_redirection_string (data.console_redirection)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t console_redirection_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct boot_flags_data data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); data.console_redirection = console_redirection_number (kv->value_input); if ((ret = _set_boot_flags (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } struct ipmi_config_section * ipmi_config_chassis_boot_flags_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section = NULL; char *section_comment = "The following configuration options are for configuring " "chassis boot behavior. Please note that some fields may apply to " "all future boots while some may only apply to the next system boot." "\n" "\"Boot_Flags_Persistent\" determines if flags apply to the next boot only " "or all future boots." "\n" "\"Boot_Device\" allows the user to configure which device the BIOS should " "boot off of. Most users may wish to select NO-OVERRIDE to select the " "configuration currently determined by the BIOS. Note that the configuration " "value BIOS-SETUP refers to booting *into* the BIOS Setup, not from it. FLOPPY " "may refer to any type of removable media. \"Device_Instance_Selector\" may " "be be used to select a specific device instance for booting."; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "Chassis_Boot_Flags", "Chassis_Boot_Flags", section_comment, 0, NULL, chassis_boot_flags_post))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Boot_Flags_Persistent", "Possible values: Yes/No (Yes = All Future Boots; No = Next Boot Only)", 0, boot_flags_persistent_checkout, boot_flags_persistent_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "BIOS_Boot_Type", "Possible values: PC-COMPATIBLE/EFI", 0, bios_boot_type_checkout, bios_boot_type_commit, bios_boot_type_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "CMOS_Clear", "Possible values: Yes/No (Only applies to Next Boot)", 0, cmos_clear_checkout, cmos_clear_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Lock_Keyboard", "Possible values: Yes/No (Only applies to Next Boot)", 0, lock_keyboard_checkout, lock_keyboard_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Screen_Blank", "Possible values: Yes/No (Only applies to Next Boot)", 0, screen_blank_checkout, screen_blank_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Boot_Device", "Possible values: NO-OVERRIDE/PXE/HARD-DRIVE/HARD-DRIVE-SAFE-MODE/\n" " DIAGNOSTIC_PARTITION/CD-DVD/BIOS-SETUP/REMOTE-FLOPPY\n" " PRIMARY-REMOTE-MEDIA/REMOTE-CD-DVD/REMOTE-HARD-DRIVE/FLOPPY", 0, boot_device_checkout, boot_device_commit, boot_device_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Device_Instance_Selector", "Possible values: None/Internal-{1-15}/External-{1-15} (e.g. Internal-5)", 0, device_instance_selector_checkout, device_instance_selector_commit, device_instance_selector_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Lock_Out_Reset_Button", "Possible values: Yes/No", 0, lock_out_reset_button_checkout, lock_out_reset_button_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Lock_Out_Power_Button", "Possible values: Yes/No", 0, lock_out_power_button_checkout, lock_out_power_button_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Lock_Out_Sleep_Button", "Possible values: Yes/No", 0, lock_out_sleep_button_checkout, lock_out_sleep_button_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Firmware_Bios_Verbosity", "Possible values: DEFAULT/QUIET/VERBOSE", 0, firmware_bios_verbosity_checkout, firmware_bios_verbosity_commit, firmware_bios_verbosity_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Force_Progress_Event_Traps", "Possible values: Yes/No", 0, force_progress_event_traps_checkout, force_progress_event_traps_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Password_Bypass", "Possible values: Yes/No", 0, user_password_bypass_checkout, user_password_bypass_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Console_Redirection", "Possible values: BIOS-SETTING/SUPPRESS/ENABLE", 0, console_redirection_checkout, console_redirection_commit, console_redirection_number_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-boot-flags.h0000644002055400205540000000174213527331635025342 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CHASSIS_BOOT_FLAGS_H #define IPMI_CONFIG_CATEGORY_CHASSIS_BOOT_FLAGS_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_chassis_boot_flags_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CHASSIS_BOOT_FLAGS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-front-panel-buttons.c0000644002055400205540000004220313527331635027216 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-validate.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct front_panel_buttons { uint8_t standby; uint8_t diagnostic_interrupt; uint8_t reset; uint8_t power_off; uint8_t standby_disable_allowed; uint8_t diagnostic_interrupt_disable_allowed; uint8_t reset_disable_allowed; uint8_t power_off_disable_allowed; }; #define BUTTON_ENABLED IPMI_CHASSIS_BUTTON_ENABLE #define BUTTON_DISABLED IPMI_CHASSIS_BUTTON_DISABLE #define BUTTON_UNKNOWN 0x2 #define BUTTON_DISABLE_NOT_ALLOWED IPMI_CHASSIS_BUTTON_DISABLE_NOT_ALLOWED #define BUTTON_DISABLE_ALLOWED IPMI_CHASSIS_BUTTON_DISABLE_ALLOWED #define BUTTON_DISABLE_UNKNOWN 0x2 static ipmi_config_err_t _get_front_panel_buttons (ipmi_config_state_data_t *state_data, struct front_panel_buttons *data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint64_t val; int flag; assert (state_data); assert (data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_chassis_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_chassis_status (state_data->ipmi_ctx, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_chassis_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.standby_button_disabled", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.standby_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->standby = val; else data->standby = BUTTON_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.diagnostic_interrupt_button_disabled", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.diagnostic_interrupt_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->diagnostic_interrupt = val; else data->diagnostic_interrupt = BUTTON_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.reset_button_disabled", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.reset_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->reset = val; else data->reset = BUTTON_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.power_off_button_disabled", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.power_off_button_disabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->power_off = val; else data->power_off = BUTTON_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.standby_button_disable_allowed", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.standby_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->standby_disable_allowed = val; else data->standby_disable_allowed = BUTTON_DISABLE_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.diagnostic_interrupt_button_disable_allowed", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.diagnostic_interrupt_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->diagnostic_interrupt_disable_allowed = val; else data->diagnostic_interrupt_disable_allowed = BUTTON_DISABLE_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.reset_button_disable_allowed", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.reset_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->reset_disable_allowed = val; else data->reset_disable_allowed = BUTTON_DISABLE_UNKNOWN; if ((flag = fiid_obj_get (obj_cmd_rs, "front_panel.power_off_button_disable_allowed", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'front_panel.power_off_button_disable_allowed': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) data->power_off_disable_allowed = val; else data->power_off_disable_allowed = BUTTON_DISABLE_UNKNOWN; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_front_panel_buttons (ipmi_config_state_data_t *state_data, struct front_panel_buttons *data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_front_panel_enables_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_front_panel_enables (state_data->ipmi_ctx, data->power_off, data->reset, data->diagnostic_interrupt, data->standby, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_front_panel_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t front_panel_buttons_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct front_panel_buttons data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t enabled = 0; char *enabled_str = NULL; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_front_panel_buttons (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!strcasecmp (kv->key->key_name, "Enable_Standby_Button_For_Entering_Standby")) enabled = data.standby; else if (!strcasecmp (kv->key->key_name, "Enable_Diagnostic_Interrupt_Button")) enabled = data.diagnostic_interrupt; else if (!strcasecmp (kv->key->key_name, "Enable_Reset_Button")) enabled = data.reset; else if (!strcasecmp (kv->key->key_name, "Enable_Power_Off_Button_For_Power_Off_Only")) enabled = data.power_off; else { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unrecognized section:key_name: %s:%s\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (enabled == BUTTON_ENABLED) enabled_str = "Yes"; else if (enabled == BUTTON_DISABLED) enabled_str = "No"; else enabled_str = ""; if (ipmi_config_section_update_keyvalue_output (state_data, kv, enabled_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t front_panel_buttons_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct front_panel_buttons data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t enable_or_disable; uint8_t disable_allowed; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_front_panel_buttons (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!strcasecmp (kv->key->key_name, "Enable_Standby_Button_For_Entering_Standby")) { data.standby = same (kv->value_input, "yes") ? BUTTON_ENABLED : BUTTON_DISABLED; enable_or_disable = data.standby; disable_allowed = data.standby_disable_allowed; } else if (!strcasecmp (kv->key->key_name, "Enable_Diagnostic_Interrupt_Button")) { data.diagnostic_interrupt = same (kv->value_input, "yes") ? BUTTON_ENABLED : BUTTON_DISABLED; enable_or_disable = data.diagnostic_interrupt; disable_allowed = data.diagnostic_interrupt_disable_allowed; } else if (!strcasecmp (kv->key->key_name, "Enable_Reset_Button")) { data.reset = same (kv->value_input, "yes") ? BUTTON_ENABLED : BUTTON_DISABLED; enable_or_disable = data.reset; disable_allowed = data.reset_disable_allowed; } else if (!strcasecmp (kv->key->key_name, "Enable_Power_Off_Button_For_Power_Off_Only")) { data.power_off = same (kv->value_input, "yes") ? BUTTON_ENABLED : BUTTON_DISABLED; enable_or_disable = data.power_off; disable_allowed = data.power_off_disable_allowed; } else { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unrecognized section:key_name: %s:%s\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (enable_or_disable == BUTTON_DISABLED && disable_allowed == BUTTON_DISABLE_NOT_ALLOWED) { if (state_data->prog_data->args->verbose_count > 1) pstdout_printf (state_data->pstate, "## Button disable on section:key_name '%s:%s' not allowed\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (data.standby == BUTTON_UNKNOWN) { if (state_data->front_panel_enable_standby_button_for_entering_standby_initialized) data.standby = state_data->front_panel_enable_standby_button_for_entering_standby; else data.standby = BUTTON_ENABLED; } if (data.diagnostic_interrupt == BUTTON_UNKNOWN) { if (state_data->front_panel_enable_diagnostic_interrupt_button_initialized) data.diagnostic_interrupt = state_data->front_panel_enable_diagnostic_interrupt_button; else data.diagnostic_interrupt = BUTTON_ENABLED; } if (data.reset == BUTTON_UNKNOWN) { if (state_data->front_panel_enable_reset_button_initialized) data.reset = state_data->front_panel_enable_reset_button; else data.reset = BUTTON_ENABLED; } if (data.power_off == BUTTON_UNKNOWN) { if (state_data->front_panel_enable_power_off_button_for_power_off_only_initialized) data.power_off = state_data->front_panel_enable_power_off_button_for_power_off_only; else data.power_off = BUTTON_ENABLED; } if ((ret = _set_front_panel_buttons (state_data, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } struct ipmi_config_section * ipmi_config_chassis_front_panel_buttons_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section = NULL; char *section_comment = "The following configuration options are for enabling or disabling " "button functionality on the chassis. Button may refer to a " "pushbutton, switch, or other front panel control built into the " "system chassis." "\n" "The value of the below may not be able to be checked out. Therefore " "we recommend the user configure all four fields rather than a subset " "of them, otherwise some assumptions on configure may be made."; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "Chassis_Front_Panel_Buttons", "Chassis_Front_Panel_Buttons", section_comment, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Standby_Button_For_Entering_Standby", "Possible values: Yes/No", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, front_panel_buttons_checkout, front_panel_buttons_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Diagnostic_Interrupt_Button", "Possible values: Yes/No", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, front_panel_buttons_checkout, front_panel_buttons_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Reset_Button", "Possible values: Yes/No", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, front_panel_buttons_checkout, front_panel_buttons_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Power_Off_Button_For_Power_Off_Only", "Possible values: Yes/No", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, front_panel_buttons_checkout, front_panel_buttons_commit, yes_no_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-front-panel-buttons.h0000644002055400205540000000200613527331635027220 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CHASSIS_FRONT_PANEL_BUTTONS_H #define IPMI_CONFIG_CATEGORY_CHASSIS_FRONT_PANEL_BUTTONS_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_chassis_front_panel_buttons_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CHASSIS_FRONT_PANEL_BUTTONS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-power-conf.c0000644002055400205540000002125413527331635025357 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t power_restore_policy_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t power_restore_policy; uint64_t val; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_chassis_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_chassis_status (state_data->ipmi_ctx, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_chassis_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_restore_policy", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'current_power_state.power_restore_policy': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } power_restore_policy = val; if (ipmi_config_section_update_keyvalue_output (state_data, kv, power_restore_policy_string (power_restore_policy)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t power_restore_policy_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; fiid_obj_t obj_cmd_rs = NULL; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_power_restore_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_power_restore_policy (state_data->ipmi_ctx, power_restore_policy_number (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_power_restore_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t power_cycle_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { assert (state_data); assert (section_name); assert (kv); /* achu: value cannot be checked out */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, "") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t power_cycle_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; fiid_obj_t obj_cmd_rs = NULL; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_power_cycle_interval_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_power_cycle_interval (state_data->ipmi_ctx, atoi (kv->value_input), obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_power_cycle_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_chassis_power_conf_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section = NULL; char *section_comment = "The following configuration options are for configuring " "chassis power behavior." "\n" "The \"Power_Restore_Policy\" determines the behavior of the machine " "when AC power returns after a power loss. The behavior can be set to " "always power on the machine (\"On_State_AC_Apply\"), power off the " "machine (\"Off_State_AC_Apply\"), or return the power to the state that " "existed before the power loss (\"Restore_State_AC_Apply\")." "\n" "The \"Power_Cycle_Interval\" determines the time the system will be " "powered down following a power cycle command."; if (!(section = ipmi_config_section_create (state_data, "Chassis_Power_Conf", "Chassis_Power_Conf", section_comment, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Power_Restore_Policy", "Possible values: Off_State_AC_Apply/Restore_State_AC_Apply/On_State_AC_Apply", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, power_restore_policy_checkout, power_restore_policy_commit, power_restore_policy_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Power_Cycle_Interval", "Give value in seconds", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, power_cycle_interval_checkout, power_cycle_interval_commit, number_range_one_byte_non_zero_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-power-conf.h0000644002055400205540000000174213527331635025364 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CHASSIS_POWER_CONF_H #define IPMI_CONFIG_CATEGORY_CHASSIS_POWER_CONF_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_chassis_power_conf_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CHASSIS_POWER_CONF_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-sections.c0000644002055400205540000000402413527331635025123 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-category-chassis-sections.h" #include "ipmi-config-section.h" #include "ipmi-config-category-chassis-boot-flags.h" #include "ipmi-config-category-chassis-front-panel-buttons.h" #include "ipmi-config-category-chassis-power-conf.h" #include "freeipmi-portability.h" #include "pstdout.h" struct ipmi_config_section * ipmi_config_chassis_sections_create (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *sections = NULL; struct ipmi_config_section *section = NULL; assert (state_data); if (!(section = ipmi_config_chassis_front_panel_buttons_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (!(section = ipmi_config_chassis_power_conf_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (!(section = ipmi_config_chassis_boot_flags_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; return (sections); cleanup: ipmi_config_sections_destroy (sections); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-chassis-sections.h0000644002055400205540000000172513527331635025135 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CHASSIS_SECTIONS #define IPMI_CONFIG_CATEGORY_CHASSIS_SECTIONS #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_chassis_sections_create (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CHASSIS_SECTIONS */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-common-pef-conf-section.c0000644002055400205540000010173113527331635026271 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-config-category-common-pef-conf-section.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience structs */ struct pef_control { uint8_t enable_pef; uint8_t enable_pef_event_messages; uint8_t enable_pef_startup_delay; uint8_t enable_pef_alert_startup_delay; }; struct pef_action_global_control { uint8_t enable_alert_action; uint8_t enable_power_down_action; uint8_t enable_reset_action; uint8_t enable_power_cycle_action; uint8_t enable_oem_action; uint8_t enable_diagnostic_interrupt; }; static ipmi_config_err_t _get_pef_control (ipmi_config_state_data_t *state_data, struct pef_control *pc) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (pc); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_pef_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_pef_control (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_pef_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "pef", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pc->enable_pef = val; if (FIID_OBJ_GET (obj_cmd_rs, "pef_event_messages", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_event_messages': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pc->enable_pef_event_messages = val; if (FIID_OBJ_GET (obj_cmd_rs, "pef_startup_delay", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_startup_delay': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pc->enable_pef_startup_delay = val; if (FIID_OBJ_GET (obj_cmd_rs, "pef_alert_startup_delay", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_alert_startup_delay': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pc->enable_pef_alert_startup_delay = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_pef_control (ipmi_config_state_data_t *state_data, struct pef_control *pc) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (pc); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_pef_control (state_data->ipmi_ctx, pc->enable_pef, pc->enable_pef_event_messages, pc->enable_pef_startup_delay, pc->enable_pef_alert_startup_delay, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_pef_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t enable_pef_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, pc.enable_pef ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_pef_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); pc.enable_pef = same (kv->value_input, "yes"); return (_set_pef_control (state_data, &pc)); } ipmi_config_err_t enable_pef_event_messages_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, pc.enable_pef_event_messages ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_pef_event_messages_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); pc.enable_pef_event_messages = same (kv->value_input, "yes"); return (_set_pef_control (state_data, &pc)); } ipmi_config_err_t enable_pef_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, pc.enable_pef_startup_delay ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_pef_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); pc.enable_pef_startup_delay = same (kv->value_input, "yes"); return (_set_pef_control (state_data, &pc)); } ipmi_config_err_t enable_pef_alert_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, pc.enable_pef_alert_startup_delay ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_pef_alert_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_control pc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_control (state_data, &pc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); pc.enable_pef_alert_startup_delay = same (kv->value_input, "yes"); return (_set_pef_control (state_data, &pc)); } static ipmi_config_err_t _get_pef_action_global_control (ipmi_config_state_data_t *state_data, struct pef_action_global_control *gc) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (gc); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_pef_action_global_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_pef_action_global_control (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_pef_action_global_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "alert_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_alert_action = val; if (FIID_OBJ_GET (obj_cmd_rs, "power_down_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_down_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_power_down_action = val; if (FIID_OBJ_GET (obj_cmd_rs, "reset_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'reset_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_reset_action = val; if (FIID_OBJ_GET (obj_cmd_rs, "power_cycle_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_cycle_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_power_cycle_action = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_oem_action = val; if (FIID_OBJ_GET (obj_cmd_rs, "diagnostic_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'diagnostic_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gc->enable_diagnostic_interrupt = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_pef_action_global_control (ipmi_config_state_data_t *state_data, struct pef_action_global_control *gc) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (gc); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_pef_action_global_control (state_data->ipmi_ctx, gc->enable_alert_action, gc->enable_power_down_action, gc->enable_reset_action, gc->enable_power_cycle_action, gc->enable_oem_action, gc->enable_diagnostic_interrupt, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_pef_action_global_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t enable_alert_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_alert_action ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_alert_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_alert_action = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t enable_power_down_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_power_down_action ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_power_down_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_power_down_action = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t enable_reset_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_reset_action ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_reset_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_reset_action = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t enable_power_cycle_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_power_cycle_action ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_power_cycle_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_power_cycle_action = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t enable_oem_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_oem_action ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_oem_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_oem_action = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t enable_diagnostic_interrupt_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, gc.enable_diagnostic_interrupt ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t enable_diagnostic_interrupt_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct pef_action_global_control gc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_pef_action_global_control (state_data, &gc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); gc.enable_diagnostic_interrupt = same (kv->value_input, "yes"); return (_set_pef_action_global_control (state_data, &gc)); } ipmi_config_err_t pef_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t pef_startup_delay; uint64_t val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_pef_startup_delay_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_pef_startup_delay (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_pef_startup_delay: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "pef_startup_delay", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_startup_delay': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pef_startup_delay = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, pef_startup_delay) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t pef_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_pef_startup_delay (state_data->ipmi_ctx, atoi (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_pef_startup_delay: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t pef_alert_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t pef_alert_startup_delay; uint64_t val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_pef_alert_startup_delay_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_pef_alert_startup_delay (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_pef_alert_startup_delay: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "pef_alert_startup_delay", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_alert_startup_delay': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pef_alert_startup_delay = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, pef_alert_startup_delay) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t pef_alert_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_pef_alert_startup_delay (state_data->ipmi_ctx, atoi (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_pef_alert_startup_delay: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: if (obj_cmd_rs) fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-common-pef-conf-section.h0000644002055400205540000001545713527331635026307 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_COMMON_PEF_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_COMMON_PEF_CONF_SECTION_H #include #include "ipmi-config.h" ipmi_config_err_t enable_pef_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_event_messages_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_event_messages_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_alert_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_pef_alert_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_alert_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_alert_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_power_down_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_power_down_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_reset_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_reset_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_power_cycle_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_power_cycle_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_oem_action_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_oem_action_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_diagnostic_interrupt_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t enable_diagnostic_interrupt_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t pef_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t pef_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t pef_alert_startup_delay_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t pef_alert_startup_delay_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); #endif /* IPMI_CONFIG_CATEGORY_COMMON_PEF_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-channel-common.c0000644002055400205540000006206713527331635025500 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct channel_access { uint8_t access_mode; uint8_t user_level_authentication; uint8_t per_message_authentication; uint8_t pef_alerting; uint8_t channel_privilege_limit; }; static ipmi_config_err_t _channel_info (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number) { ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (channel_number); if (stristr (section_name, "Lan")) { if ((ret = get_lan_channel_number (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } else { if ((ret = get_serial_channel_number (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _get_key_info (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, uint8_t *channel_number, uint8_t *access_type) { ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (key_name); assert (channel_number); assert (access_type); if ((ret = _channel_info (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* Must check for Non_Volatile b/c Volatile is a substring of the former */ if (stristr (key_name, "Non_Volatile")) *access_type = IPMI_CHANNEL_ACCESS_GET_NON_VOLATILE; else *access_type = IPMI_CHANNEL_ACCESS_GET_VOLATILE; return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _set_key_info (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, uint8_t *channel_number, uint8_t *access_type) { ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (key_name); assert (channel_number); assert (access_type); if ((ret = _channel_info (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* Must check for Non_Volatile b/c Volatile is a substring of the former */ if (stristr (key_name, "Non_Volatile")) *access_type = IPMI_CHANNEL_ACCESS_SET_NON_VOLATILE; else *access_type = IPMI_CHANNEL_ACCESS_SET_VOLATILE; return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _get_channel_access (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, struct channel_access *ch) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t access_type; uint64_t val; assert (state_data); assert (section_name); assert (key_name); assert (ch); if ((ret = _get_key_info (state_data, section_name, key_name, &channel_number, &access_type)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_channel_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_channel_access (state_data->ipmi_ctx, channel_number, access_type, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_channel_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_messaging_access_mode", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ipmi_messaging_access_mode': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ch->access_mode = val; /* yes/no is backwards here, see ipmi spec */ if (FIID_OBJ_GET (obj_cmd_rs, "user_level_authentication", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level_authentication': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ch->user_level_authentication = (val ? 0 : 1); /* yes/no is backwards here, see ipmi spec */ if (FIID_OBJ_GET (obj_cmd_rs, "per_message_authentication", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'per_message_authentication': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ch->per_message_authentication = (val ? 0 : 1); /* yes/no is backwards here, see ipmi spec */ if (FIID_OBJ_GET (obj_cmd_rs, "pef_alerting", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_alerting': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ch->pef_alerting = (val ? 0 : 1); if (FIID_OBJ_GET (obj_cmd_rs, "channel_privilege_level_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_privilege_level_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ch->channel_privilege_limit = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_channel_access (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, struct channel_access *ch, uint8_t *comp_code) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t set_type; uint64_t val; assert (state_data); assert (section_name); assert (key_name); assert (ch); if ((ret = _set_key_info (state_data, section_name, key_name, &channel_number, &set_type)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_channel_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* yes/no is backwards several places, see ipmi spec */ if (ipmi_cmd_set_channel_access (state_data->ipmi_ctx, channel_number, ch->access_mode, (ch->user_level_authentication ? 0 : 1), (ch->per_message_authentication ? 0 : 1), (ch->pef_alerting ? 0 : 1), set_type, ch->channel_privilege_limit, (set_type == IPMI_CHANNEL_ACCESS_SET_VOLATILE ? IPMI_PRIVILEGE_LEVEL_LIMIT_SET_VOLATILE : IPMI_PRIVILEGE_LEVEL_LIMIT_SET_NON_VOLATILE), obj_cmd_rs) < 0) { if (comp_code) { (*comp_code) = 0; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'comp_code': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*comp_code) = val; } if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_channel_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _access_mode_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, channel_access_mode_string (ch.access_mode)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _access_mode_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ch.access_mode = channel_access_mode (kv->value_input); if ((ret = _set_channel_access (state_data, section_name, kv->key->key_name, &ch, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_user_level_authentication_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* achu: Backwards values in this command are handled above */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, ch.user_level_authentication ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_user_level_authentication_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; uint8_t comp_code = 0; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ch.user_level_authentication = same (kv->value_input, "yes"); /* IPMI_COMP_CODE_REQUEST_INVALID_DATA_FIELD is special case for * this field, see IPMI spec. "Return CCh 'invalid data field' * error completion code if an attempt is made to set this bit, but * the option is not supported." */ if ((ret = _set_channel_access (state_data, section_name, kv->key->key_name, &ch, &comp_code)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG && comp_code == IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED; return (ret); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_per_message_authentication_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* achu: Backwards values in this command are handled above */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, ch.per_message_authentication ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_per_message_authentication_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ch.per_message_authentication = same (kv->value_input, "yes"); if ((ret = _set_channel_access (state_data, section_name, kv->key->key_name, &ch, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_pef_alerting_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* achu: Backwards values in this command are handled above */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, ch.pef_alerting ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _enable_pef_alerting_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ch.pef_alerting = same (kv->value_input, "yes"); if ((ret = _set_channel_access (state_data, section_name, kv->key->key_name, &ch, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _channel_privilege_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, privilege_level_string (ch.channel_privilege_limit)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _channel_privilege_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct channel_access ch; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_channel_access (state_data, section_name, kv->key->key_name, &ch)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ch.channel_privilege_limit = privilege_level_number (kv->value_input); if ((ret = _set_channel_access (state_data, section_name, kv->key->key_name, &ch, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } int ipmi_config_core_channel_common_section_get (ipmi_config_state_data_t *state_data, struct ipmi_config_section *channel_section) { assert (state_data); assert (channel_section); if (ipmi_config_section_add_key (state_data, channel_section, "Volatile_Access_Mode", "Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared", 0, _access_mode_checkout, _access_mode_commit, channel_access_mode_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Volatile_Enable_User_Level_Auth", "Possible values: Yes/No", 0, _enable_user_level_authentication_checkout, _enable_user_level_authentication_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Volatile_Enable_Per_Message_Auth", "Possible values: Yes/No", 0, _enable_per_message_authentication_checkout, _enable_per_message_authentication_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Volatile_Enable_Pef_Alerting", "Possible values: Yes/No", 0, _enable_pef_alerting_checkout, _enable_pef_alerting_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Volatile_Channel_Privilege_Limit", "Possible values: Callback/User/Operator/Administrator/OEM_Proprietary", 0, _channel_privilege_limit_checkout, _channel_privilege_limit_commit, privilege_level_number_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Non_Volatile_Access_Mode", "Possible values: Disabled/Pre_Boot_Only/Always_Available/Shared", 0, _access_mode_checkout, _access_mode_commit, channel_access_mode_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Non_Volatile_Enable_User_Level_Auth", "Possible values: Yes/No", 0, _enable_user_level_authentication_checkout, _enable_user_level_authentication_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Non_Volatile_Enable_Per_Message_Auth", "Possible values: Yes/No", 0, _enable_per_message_authentication_checkout, _enable_per_message_authentication_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Non_Volatile_Enable_Pef_Alerting", "Possible values: Yes/No", 0, _enable_pef_alerting_checkout, _enable_pef_alerting_commit, yes_no_validate) < 0) return (-1); if (ipmi_config_section_add_key (state_data, channel_section, "Non_Volatile_Channel_Privilege_Limit", "Possible values: Callback/User/Operator/Administrator/OEM_Proprietary", 0, _channel_privilege_limit_checkout, _channel_privilege_limit_commit, privilege_level_number_validate) < 0) return (-1); return (0); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-channel-common.h0000644002055400205540000000206213527331635025472 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_CHANNEL_COMMON_H #define IPMI_CONFIG_CATEGORY_CORE_CHANNEL_COMMON_H #include "ipmi-config.h" int ipmi_config_core_channel_common_section_get (ipmi_config_state_data_t *state_data, struct ipmi_config_section *channel_section); #endif /* IPMI_CONFIG_CATEGORY_CORE_CHANNEL_COMMON_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-channel-section.c0000644002055400205540000000633013527331635026413 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-category-core-channel-common.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" struct ipmi_config_section * ipmi_config_core_lan_channel_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section * section = NULL; char *section_comment = "In the Lan_Channel section, general IPMI over LAN can be enabled for " "disabled. In the below, \"Volatile\" configurations are immediately " "configured onto the BMC and will have immediate effect on the system. " "\"Non_Volatile\" configurations are only available after the next " "system reset. Generally, both the \"Volatile\" and \"Non_Volatile\" " "equivalent fields should be configured identically." "\n" "To enable IPMI over LAN, typically \"Access_Mode\" " "should be set to \"Always_Available\". " "\"Channel_Privilege_Limit\" should be set to the highest privilege " "level any username was configured with. Typically, this " "is set to \"Administrator\"." "\n" "\"User_Level_Auth\" and \"Per_Message_Auth\" are typically set to " "\"Yes\" for additional security."; char *section_name_base_str = "Lan_Channel"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_core_channel_common_section_get (state_data, section) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-channel-section.h0000644002055400205540000000226513527331635026423 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CHANNEL_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CHANNEL_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_channel_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CHANNEL_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-auth-section.c0000644002055400205540000014040313527331635026667 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-validate.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience structs */ struct bmc_authentication_level { uint8_t callback_level_none; uint8_t callback_level_md2; uint8_t callback_level_md5; uint8_t callback_level_straight_password; uint8_t callback_level_oem_proprietary; uint8_t user_level_none; uint8_t user_level_md2; uint8_t user_level_md5; uint8_t user_level_straight_password; uint8_t user_level_oem_proprietary; uint8_t operator_level_none; uint8_t operator_level_md2; uint8_t operator_level_md5; uint8_t operator_level_straight_password; uint8_t operator_level_oem_proprietary; uint8_t admin_level_none; uint8_t admin_level_md2; uint8_t admin_level_md5; uint8_t admin_level_straight_password; uint8_t admin_level_oem_proprietary; uint8_t oem_level_none; uint8_t oem_level_md2; uint8_t oem_level_md5; uint8_t oem_level_straight_password; uint8_t oem_level_oem_proprietary; }; static ipmi_config_err_t _get_authentication_type_support (ipmi_config_state_data_t *state_data, const char *section_name) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (state_data->authentication_type_initialized && state_data->authentication_type_channel_number == channel_number) goto out; state_data->authentication_type_initialized = 0; state_data->authentication_type_channel_number = 0; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_authentication_type_support_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_authentication_type_support (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_authentication_type_support: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->authentication_type_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->authentication_type_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->authentication_type_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->authentication_type_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->authentication_type_oem_proprietary = val; state_data->authentication_type_initialized++; out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_authentication_type_enables (ipmi_config_state_data_t *state_data, const char *section_name, struct bmc_authentication_level *al) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (al); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_authentication_type_enables_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_authentication_type_enables (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_authentication_type_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "callback_level.none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'callback_level.none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->callback_level_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "callback_level.md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'callback_level.md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->callback_level_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "callback_level.md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'callback_level.md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->callback_level_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "callback_level.straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'callback_level.straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->callback_level_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "callback_level.oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'callback_level.oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->callback_level_oem_proprietary = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_level.none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level.none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->user_level_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_level.md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level.md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->user_level_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_level.md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level.md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->user_level_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_level.straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level.straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->user_level_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_level.oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_level.oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->user_level_oem_proprietary = val; if (FIID_OBJ_GET (obj_cmd_rs, "operator_level.none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'operator_level.none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->operator_level_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "operator_level.md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'operator_level.md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->operator_level_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "operator_level.md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'operator_level.md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->operator_level_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "operator_level.straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'operator_level.straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->operator_level_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "operator_level.oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'operator_level.oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->operator_level_oem_proprietary = val; if (FIID_OBJ_GET (obj_cmd_rs, "admin_level.none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'admin_level.none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->admin_level_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "admin_level.md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'admin_level.md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->admin_level_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "admin_level.md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'admin_level.md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->admin_level_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "admin_level.straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'admin_level.straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->admin_level_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "admin_level.oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'admin_level.oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->admin_level_oem_proprietary = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_level.none", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_level.none': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->oem_level_none = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_level.md2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_level.md2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->oem_level_md2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_level.md5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_level.md5': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->oem_level_md5 = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_level.straight_password", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_level.straight_password': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->oem_level_straight_password = val; if (FIID_OBJ_GET (obj_cmd_rs, "oem_level.oem_proprietary", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_level.oem_proprietary': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } al->oem_level_oem_proprietary = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_authentication_type_enables (ipmi_config_state_data_t *state_data, const char *section_name, struct bmc_authentication_level *al) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (al); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables (state_data->ipmi_ctx, channel_number, al->callback_level_none, al->callback_level_md2, al->callback_level_md5, al->callback_level_straight_password, al->callback_level_oem_proprietary, al->user_level_none, al->user_level_md2, al->user_level_md5, al->user_level_straight_password, al->user_level_oem_proprietary, al->operator_level_none, al->operator_level_md2, al->operator_level_md5, al->operator_level_straight_password, al->operator_level_oem_proprietary, al->admin_level_none, al->admin_level_md2, al->admin_level_md5, al->admin_level_straight_password, al->admin_level_oem_proprietary, al->oem_level_none, al->oem_level_md2, al->oem_level_md5, al->oem_level_straight_password, al->oem_level_oem_proprietary, obj_cmd_rs) < 0) { /* * IPMI Workaround * * Dell Poweredge R610 * * Nodes come default w/ OEM authentication enables turned * on, but you cannot configure them on. So this always * leads to invalid data errors (0xCC) b/c we are * configuring one field at a time. So we will "absorb" the * OEM configuration of later fields and try again, hoping * that the user has tried to "right" the badness already * sitting on the motherboard. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { struct ipmi_config_section *section; struct ipmi_config_keyvalue *kv; section = state_data->sections; while (section) { if (!strcasecmp (section->section_name, "Lan_Conf_Auth")) break; section = section->next; } /* shouldn't be possible */ if (!section) goto cleanup; if ((kv = ipmi_config_find_keyvalue (section, "Callback_Enable_Auth_Type_OEM_Proprietary"))) al->callback_level_oem_proprietary = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "User_Enable_Auth_Type_OEM_Proprietary"))) al->user_level_oem_proprietary = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "Operator_Enable_Auth_Type_OEM_Proprietary"))) al->operator_level_oem_proprietary = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "Admin_Enable_Auth_Type_OEM_Proprietary"))) al->admin_level_oem_proprietary = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "OEM_Enable_Auth_Type_None"))) al->oem_level_none = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "OEM_Enable_Auth_Type_MD2"))) al->oem_level_md2 = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "OEM_Enable_Auth_Type_MD5"))) al->oem_level_md5 = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "OEM_Enable_Auth_Type_Straight_Password"))) al->oem_level_straight_password = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "OEM_Enable_Auth_Type_OEM_Proprietary"))) al->oem_level_oem_proprietary = same (kv->value_input, "yes"); if (ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables (state_data->ipmi_ctx, channel_number, al->callback_level_none, al->callback_level_md2, al->callback_level_md5, al->callback_level_straight_password, al->callback_level_oem_proprietary, al->user_level_none, al->user_level_md2, al->user_level_md5, al->user_level_straight_password, al->user_level_oem_proprietary, al->operator_level_none, al->operator_level_md2, al->operator_level_md5, al->operator_level_straight_password, al->operator_level_oem_proprietary, al->admin_level_none, al->admin_level_md2, al->admin_level_md5, al->admin_level_straight_password, al->admin_level_oem_proprietary, al->oem_level_none, al->oem_level_md2, al->oem_level_md5, al->oem_level_straight_password, al->oem_level_oem_proprietary, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* success!! */ goto out; } else if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_authentication_type_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static uint8_t * _authentication_level_ptr (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, struct bmc_authentication_level *al) { assert (state_data); assert (section_name); assert (key_name); assert (al); if (!strcasecmp (key_name, "Callback_Enable_Auth_Type_None")) return (&al->callback_level_none); else if (!strcasecmp (key_name, "Callback_Enable_Auth_Type_MD2")) return (&al->callback_level_md2); else if (!strcasecmp (key_name, "Callback_Enable_Auth_Type_MD5")) return (&al->callback_level_md5); else if (!strcasecmp (key_name, "Callback_Enable_Auth_Type_Straight_Password")) return (&al->callback_level_straight_password); else if (!strcasecmp (key_name, "Callback_Enable_Auth_Type_OEM_Proprietary")) return (&al->callback_level_oem_proprietary); else if (!strcasecmp (key_name, "User_Enable_Auth_Type_None")) return (&al->user_level_none); else if (!strcasecmp (key_name, "User_Enable_Auth_Type_MD2")) return (&al->user_level_md2); else if (!strcasecmp (key_name, "User_Enable_Auth_Type_MD5")) return (&al->user_level_md5); else if (!strcasecmp (key_name, "User_Enable_Auth_Type_Straight_Password")) return (&al->user_level_straight_password); else if (!strcasecmp (key_name, "User_Enable_Auth_Type_OEM_Proprietary")) return (&al->user_level_oem_proprietary); else if (!strcasecmp (key_name, "Operator_Enable_Auth_Type_None")) return (&al->operator_level_none); else if (!strcasecmp (key_name, "Operator_Enable_Auth_Type_MD2")) return (&al->operator_level_md2); else if (!strcasecmp (key_name, "Operator_Enable_Auth_Type_MD5")) return (&al->operator_level_md5); else if (!strcasecmp (key_name, "Operator_Enable_Auth_Type_Straight_Password")) return (&al->operator_level_straight_password); else if (!strcasecmp (key_name, "Operator_Enable_Auth_Type_OEM_Proprietary")) return (&al->operator_level_oem_proprietary); else if (!strcasecmp (key_name, "Admin_Enable_Auth_Type_None")) return (&al->admin_level_none); else if (!strcasecmp (key_name, "Admin_Enable_Auth_Type_MD2")) return (&al->admin_level_md2); else if (!strcasecmp (key_name, "Admin_Enable_Auth_Type_MD5")) return (&al->admin_level_md5); else if (!strcasecmp (key_name, "Admin_Enable_Auth_Type_Straight_Password")) return (&al->admin_level_straight_password); else if (!strcasecmp (key_name, "Admin_Enable_Auth_Type_OEM_Proprietary")) return (&al->admin_level_oem_proprietary); else if (!strcasecmp (key_name, "OEM_Enable_Auth_Type_None")) return (&al->oem_level_none); else if (!strcasecmp (key_name, "OEM_Enable_Auth_Type_MD2")) return (&al->oem_level_md2); else if (!strcasecmp (key_name, "OEM_Enable_Auth_Type_MD5")) return (&al->oem_level_md5); else if (!strcasecmp (key_name, "OEM_Enable_Auth_Type_Straight_Password")) return (&al->oem_level_straight_password); else if (!strcasecmp (key_name, "OEM_Enable_Auth_Type_OEM_Proprietary")) return (&al->oem_level_oem_proprietary); pstdout_fprintf (state_data->pstate, stderr, "Unknown key '%s' in section '%s'\n", key_name, section_name); return (NULL); } /* based on support flags, determine if checkout is available * - if we cannot determine support, we always checkout */ static ipmi_config_err_t _authentication_type_enable_available (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, unsigned int *available) { ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (key_name); assert (available); /* default to always allow checkout */ *available = 1; /* always output under very verbose mode */ if (state_data->prog_data->args->verbose_count > 1) return (IPMI_CONFIG_ERR_SUCCESS); if ((ret = _get_authentication_type_support (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (state_data->authentication_type_initialized) { if (stristr (key_name, "None") && !state_data->authentication_type_none) *available = 0; else if (stristr (key_name, "MD2") && !state_data->authentication_type_md2) *available = 0; else if (stristr (key_name, "MD5") && !state_data->authentication_type_md5) *available = 0; else if (stristr (key_name, "Straight_Password") && !state_data->authentication_type_straight_password) *available = 0; else if (stristr (key_name, "OEM_Proprietary") && !state_data->authentication_type_oem_proprietary) *available = 0; } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _authentication_level_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bmc_authentication_level al; ipmi_config_err_t ret; unsigned int available_flag = 1; /* default is to always allow checkout */ uint8_t *al_ptr; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_authentication_type_enables (state_data, section_name, &al)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* non-fatal error is ok here */ ret = _authentication_type_enable_available (state_data, section_name, kv->key->key_name, &available_flag); if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) return (ret); if (available_flag) { if (!(al_ptr = _authentication_level_ptr (state_data, section_name, kv->key->key_name, &al))) return (IPMI_CONFIG_ERR_FATAL_ERROR); if (ipmi_config_section_update_keyvalue_output (state_data, kv, *al_ptr ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } return (IPMI_CONFIG_ERR_NON_FATAL_ERROR); } static ipmi_config_err_t _authentication_level_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bmc_authentication_level al; ipmi_config_err_t ret; uint8_t *flag; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_authentication_type_enables (state_data, section_name, &al)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(flag = _authentication_level_ptr (state_data, section_name, kv->key->key_name, &al))) return (IPMI_CONFIG_ERR_FATAL_ERROR); *flag = same (kv->value_input, "yes"); if ((ret = _set_authentication_type_enables (state_data, section_name, &al)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); return (IPMI_CONFIG_ERR_SUCCESS); } struct ipmi_config_section * ipmi_config_core_lan_conf_auth_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "In the Lan_Conf_Auth section, allowable authentication mechanisms for " "IPMI 1.5 is configured. Most users will want to set all \"MD5\" " "authentication to \"Yes\" and the rest to \"No\". If you have " "configured a NULL username and a NULL password, you " "will also want to configure some of the \"None\" fields to \"Yes\" " "to allow \"None\" authentication to work. Some motherboards do not " "allow you to enable OEM authentication, so you may wish to set all " "OEM related fields to \"No\"."; char *section_name_base_str = "Lan_Conf_Auth"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Callback_Enable_Auth_Type_None", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Callback_Enable_Auth_Type_MD2", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Callback_Enable_Auth_Type_MD5", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Callback_Enable_Auth_Type_Straight_Password", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Callback_Enable_Auth_Type_OEM_Proprietary", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Enable_Auth_Type_None", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Enable_Auth_Type_MD2", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Enable_Auth_Type_MD5", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Enable_Auth_Type_Straight_Password", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Enable_Auth_Type_OEM_Proprietary", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Operator_Enable_Auth_Type_None", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Operator_Enable_Auth_Type_MD2", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Operator_Enable_Auth_Type_MD5", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Operator_Enable_Auth_Type_Straight_Password", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Operator_Enable_Auth_Type_OEM_Proprietary", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Admin_Enable_Auth_Type_None", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Admin_Enable_Auth_Type_MD2", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Admin_Enable_Auth_Type_MD5", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Admin_Enable_Auth_Type_Straight_Password", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Admin_Enable_Auth_Type_OEM_Proprietary", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "OEM_Enable_Auth_Type_None", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "OEM_Enable_Auth_Type_MD2", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "OEM_Enable_Auth_Type_MD5", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "OEM_Enable_Auth_Type_Straight_Password", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "OEM_Enable_Auth_Type_OEM_Proprietary", "Possible values: Yes/No", 0, _authentication_level_checkout, _authentication_level_commit, yes_no_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-auth-section.h0000644002055400205540000000230213527331635026667 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_AUTH_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_AUTH_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_conf_auth_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_AUTH_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-misc-section.c0000644002055400205540000004153413527331635026666 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct bmc_generated_arp_control { uint8_t bmc_generated_gratuitous_arps; uint8_t bmc_generated_arp_responses; }; static ipmi_config_err_t _get_bmc_generated_arp_control (ipmi_config_state_data_t *state_data, const char *section_name, struct bmc_generated_arp_control *ac) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (ac); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_bmc_generated_arp_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_bmc_generated_arp_control (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_bmc_generated_arp_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "bmc_generated_gratuitous_arps", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bmc_generated_gratuitous_arps': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ac->bmc_generated_gratuitous_arps = val; if (FIID_OBJ_GET (obj_cmd_rs, "bmc_generated_arp_responses", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bmc_generated_arp_responses': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ac->bmc_generated_arp_responses = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_bmc_generated_arp_control (ipmi_config_state_data_t *state_data, const char *section_name, struct bmc_generated_arp_control *ac) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (ac); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_bmc_generated_arp_control (state_data->ipmi_ctx, channel_number, ac->bmc_generated_gratuitous_arps, ac->bmc_generated_arp_responses, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_bmc_generated_arp_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t enable_gratuitous_arps_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bmc_generated_arp_control ac; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bmc_generated_arp_control (state_data, section_name, &ac)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, ac.bmc_generated_gratuitous_arps ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_gratuitous_arps_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bmc_generated_arp_control ac; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bmc_generated_arp_control (state_data, section_name, &ac)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ac.bmc_generated_gratuitous_arps = same (kv->value_input, "yes"); return (_set_bmc_generated_arp_control (state_data, section_name, &ac)); } static ipmi_config_err_t enable_arp_response_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bmc_generated_arp_control ac; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bmc_generated_arp_control (state_data, section_name, &ac)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, ac.bmc_generated_arp_responses ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_arp_response_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bmc_generated_arp_control ac; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bmc_generated_arp_control (state_data, section_name, &ac)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ac.bmc_generated_arp_responses = same (kv->value_input, "yes"); return (_set_bmc_generated_arp_control (state_data, section_name, &ac)); } static ipmi_config_err_t gratuitous_arp_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t gratuitous_arp_interval; uint64_t val; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_gratuitous_arp_interval_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_gratuitous_arp_interval (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_gratuitous_arp_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "gratuitous_arp_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'gratuitous_arp_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } gratuitous_arp_interval = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, gratuitous_arp_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t gratuitous_arp_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_gratuitous_arp_interval (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_gratuitous_arp_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_lan_conf_misc_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "The following miscellaneous configuration options are optionally " "implemented by the vendor. They may not be available your system and " "may not be visible below." "\n" "If set to \"Yes\", \"Enable_Gratuitous_ARPs\" will inform the BMC to " "regularly send out Gratuitous ARPs to allow other machines on a " "network resolve the BMC's MAC Address. Many users will want to set " "this to \"Yes\" because it offers the easiest way to support BMC IP " "Address resolution. However, it will increase traffic on your " "network. The \"Gratuitous_ARP_Interval\" can be used to set the " "period a Gratuitous ARP is always sent." "\n" "If set to \"Yes\", \"Enable_ARP_Response\" will inform the BMC to" "respond to ARP requests from other machines."; char *section_name_base_str = "Lan_Conf_Misc"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Gratuitous_ARPs", "Possible values: Yes/No", 0, enable_gratuitous_arps_checkout, enable_gratuitous_arps_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_ARP_Response", "Possible values: Yes/No", 0, enable_arp_response_checkout, enable_arp_response_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Gratuitous_ARP_Interval", "Possible values: 0-255, in 500ms increments (e.g. 2 = 1000ms)", 0, gratuitous_arp_interval_checkout, gratuitous_arp_interval_commit, number_range_one_byte_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-misc-section.h0000644002055400205540000000230113527331635026660 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_MISC_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_MISC_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_conf_misc_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_MISC_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-section.c0000644002055400205540000025223513527331635025737 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #define BMC_MAXIPADDRLEN 16 #define BMC_MAXMACADDRLEN 24 /* convenience struct */ struct vlan_id { uint16_t vlan_id; uint8_t vlan_id_enable; }; struct ipv4_header_parameters { uint8_t time_to_live; uint8_t flags; uint8_t type_of_service; uint8_t precedence; }; static ipmi_config_err_t ip_address_source_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t ip_address_source; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ip_address_source_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ip_address_source (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ip_address_source: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "ip_address_source", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ip_address_source': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ip_address_source = val; if (ipmi_config_section_update_keyvalue_output (state_data, kv, ip_address_source_string (ip_address_source)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ip_address_source_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ip_address_source (state_data->ipmi_ctx, channel_number, ip_address_source_number (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ip_address_source: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ip_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char ip_address_str[BMC_MAXIPADDRLEN + 1]; uint8_t ip_address_bytes[4]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ip_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ip_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "ip_address", ip_address_bytes, 4) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'ip_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (ip_address_str, '\0', BMC_MAXIPADDRLEN+1); if (!inet_ntop (AF_INET, ip_address_bytes, ip_address_str, BMC_MAXIPADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s", strerror (errno)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ip_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ip_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint32_t ip_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (ipv4_address_string2int (state_data, kv->value_input, &ip_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ip_address (state_data->ipmi_ctx, channel_number, ip_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t mac_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char mac_address_str[BMC_MAXMACADDRLEN+1]; uint8_t mac_address_bytes[6]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_mac_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_mac_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "mac_address", mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (mac_address_str, '\0', BMC_MAXMACADDRLEN+1); snprintf (mac_address_str, BMC_MAXMACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", mac_address_bytes[0], mac_address_bytes[1], mac_address_bytes[2], mac_address_bytes[3], mac_address_bytes[4], mac_address_bytes[5]); if (ipmi_config_section_update_keyvalue_output (state_data, kv, mac_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t mac_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint64_t mac_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (mac_address_string2int (state_data, kv->value_input, &mac_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_mac_address (state_data->ipmi_ctx, channel_number, mac_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t subnet_mask_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char subnet_mask_str[BMC_MAXIPADDRLEN + 1]; uint8_t subnet_mask_bytes[4]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_subnet_mask_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_subnet_mask (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_subnet_mask: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "subnet_mask", subnet_mask_bytes, 4) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'subnet_mask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (subnet_mask_str, '\0', BMC_MAXIPADDRLEN + 1); if (!inet_ntop (AF_INET, subnet_mask_bytes, subnet_mask_str, BMC_MAXIPADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s", strerror (errno)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, subnet_mask_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t subnet_mask_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint32_t subnet_mask_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (ipv4_address_string2int (state_data, kv->value_input, &subnet_mask_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_subnet_mask (state_data->ipmi_ctx, channel_number, subnet_mask_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_subnet_mask: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t default_gateway_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char ip_address_str[BMC_MAXIPADDRLEN + 1]; uint8_t ip_address_bytes[4]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_default_gateway_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_default_gateway_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_default_gateway_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "ip_address", ip_address_bytes, 4) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'ip_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (ip_address_str, '\0', BMC_MAXIPADDRLEN + 1); if (!inet_ntop (AF_INET, ip_address_bytes, ip_address_str, BMC_MAXIPADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s", strerror (errno)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ip_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t default_gateway_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint32_t ip_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (ipv4_address_string2int (state_data, kv->value_input, &ip_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_default_gateway_address (state_data->ipmi_ctx, channel_number, ip_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_default_gateway_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t default_gateway_mac_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char mac_address_str[BMC_MAXMACADDRLEN+1]; uint8_t mac_address_bytes[6]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_default_gateway_mac_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_default_gateway_mac_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_default_gateway_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "mac_address", mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (mac_address_str, '\0', BMC_MAXMACADDRLEN + 1); snprintf (mac_address_str, BMC_MAXMACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", mac_address_bytes[0], mac_address_bytes[1], mac_address_bytes[2], mac_address_bytes[3], mac_address_bytes[4], mac_address_bytes[5]); if (ipmi_config_section_update_keyvalue_output (state_data, kv, mac_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t default_gateway_mac_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint64_t mac_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (mac_address_string2int (state_data, kv->value_input, &mac_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_default_gateway_mac_address (state_data->ipmi_ctx, channel_number, mac_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_default_gateway_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t backup_gateway_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char ip_address_str[BMC_MAXIPADDRLEN + 1]; uint8_t ip_address_bytes[4]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_backup_gateway_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_backup_gateway_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_backup_gateway_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "ip_address", ip_address_bytes, 4) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'ip_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (ip_address_str, '\0', BMC_MAXIPADDRLEN+1); if (!inet_ntop (AF_INET, ip_address_bytes, ip_address_str, BMC_MAXIPADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s", strerror (errno)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ip_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t backup_gateway_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint32_t ip_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (ipv4_address_string2int (state_data, kv->value_input, &ip_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_backup_gateway_address (state_data->ipmi_ctx, channel_number, ip_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_backup_gateway_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t backup_gateway_mac_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char mac_address_str[BMC_MAXMACADDRLEN+1]; uint8_t mac_address_bytes[6]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_backup_gateway_mac_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_backup_gateway_mac_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_backup_gateway_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "mac_address", mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (mac_address_str, '\0', BMC_MAXMACADDRLEN+1); snprintf (mac_address_str, BMC_MAXMACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", mac_address_bytes[0], mac_address_bytes[1], mac_address_bytes[2], mac_address_bytes[3], mac_address_bytes[4], mac_address_bytes[5]); if (ipmi_config_section_update_keyvalue_output (state_data, kv, mac_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t backup_gateway_mac_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint64_t mac_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (mac_address_string2int (state_data, kv->value_input, &mac_address_val) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_backup_gateway_mac_address (state_data->ipmi_ctx, channel_number, mac_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_backup_gateway_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_vlan_id (ipmi_config_state_data_t *state_data, const char *section_name, struct vlan_id *vi) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (vi); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_vlan_id_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_vlan_id (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_vlan_id: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "vlan_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'vlan_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } vi->vlan_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "vlan_id_enable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'vlan_id_enable': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } vi->vlan_id_enable = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_vlan_id (ipmi_config_state_data_t *state_data, const char *section_name, struct vlan_id *vi) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (vi); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_vlan_id (state_data->ipmi_ctx, channel_number, vi->vlan_id, vi->vlan_id_enable, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_vlan_id: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t vlan_id_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct vlan_id vi; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_vlan_id (state_data, section_name, &vi)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, vi.vlan_id) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t vlan_id_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct vlan_id vi; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_vlan_id (state_data, section_name, &vi)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); vi.vlan_id = atoi (kv->value_input); return (_set_vlan_id (state_data, section_name, &vi)); } static ipmi_config_validate_t vlan_id_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 4095)); } static ipmi_config_err_t vlan_id_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct vlan_id vi; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_vlan_id (state_data, section_name, &vi)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, vi.vlan_id_enable ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t vlan_id_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct vlan_id vi; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_vlan_id (state_data, section_name, &vi)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); vi.vlan_id_enable = same (kv->value_input, "yes"); return (_set_vlan_id (state_data, section_name, &vi)); } static ipmi_config_err_t vlan_priority_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t vlan_priority; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_vlan_priority_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_vlan_priority (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_vlan_priority: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "vlan_priority", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'vlan_priority': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } vlan_priority = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, vlan_priority) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t vlan_priority_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_vlan_priority (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_vlan_priority: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_ipv4_header_parameters (ipmi_config_state_data_t *state_data, const char *section_name, struct ipv4_header_parameters *ihp) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (ihp); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv4_header_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv4_header_parameters (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv4_header_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "time_to_live", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time_to_live': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ihp->time_to_live = val; if (FIID_OBJ_GET (obj_cmd_rs, "flags", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'flags': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ihp->flags = val; if (FIID_OBJ_GET (obj_cmd_rs, "type_of_service", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'type_of_service': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ihp->type_of_service = val; if (FIID_OBJ_GET (obj_cmd_rs, "precedence", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'precedence': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ihp->precedence = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_ipv4_header_parameters (ipmi_config_state_data_t *state_data, const char *section_name, struct ipv4_header_parameters *ihp) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (ihp); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ipv4_header_parameters (state_data->ipmi_ctx, channel_number, ihp->time_to_live, ihp->flags, ihp->type_of_service, ihp->precedence, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv4_header_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv4_header_time_to_live_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_hex (state_data, kv, ihp.time_to_live) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t ipv4_header_time_to_live_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ ihp.time_to_live = strtol (kv->value_input, NULL, 0); return (_set_ipv4_header_parameters (state_data, section_name, &ihp)); } static ipmi_config_err_t ipv4_header_flags_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_hex (state_data, kv, ihp.flags) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t ipv4_header_flags_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ ihp.flags = strtol (kv->value_input, NULL, 0); return (_set_ipv4_header_parameters (state_data, section_name, &ihp)); } static ipmi_config_err_t ipv4_header_type_of_service_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_hex (state_data, kv, ihp.type_of_service) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t ipv4_header_type_of_service_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ ihp.type_of_service = strtol (kv->value_input, NULL, 0); return (_set_ipv4_header_parameters (state_data, section_name, &ihp)); } static ipmi_config_err_t ipv4_header_precedence_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_hex (state_data, kv, ihp.precedence) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t ipv4_header_precedence_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv4_header_parameters ihp; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv4_header_parameters (state_data, section_name, &ihp)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ ihp.precedence = strtol (kv->value_input, NULL, 0); return (_set_ipv4_header_parameters (state_data, section_name, &ihp)); } static ipmi_config_err_t primary_rmcp_port_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint16_t primary_rmcp_port_number; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_primary_rmcp_port_number_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_primary_rmcp_port_number (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_primary_rmcp_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "primary_rmcp_port_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'primary_rmcp_port_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } primary_rmcp_port_number = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, primary_rmcp_port_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t primary_rmcp_port_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_primary_rmcp_port_number (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_primary_rmcp_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t secondary_rmcp_port_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint16_t secondary_rmcp_port_number; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_secondary_rmcp_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "secondary_rmcp_port_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'secondary_rmcp_port_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } secondary_rmcp_port_number = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, secondary_rmcp_port_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t secondary_rmcp_port_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_secondary_rmcp_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_lan_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "In the Lan_Conf section, typical networking configuration is setup. " "Most users will choose to set \"Static\" for the \"IP_Address_Source\" " "and set the appropriate \"IP_Address\", \"MAC_Address\", " "\"Subnet_Mask\", etc. for the machine."; char *section_name_base_str = "Lan_Conf"; unsigned int verbose_option_config_flags = 0; assert (state_data); /* vlan and ipv4 header parameters not checked out by default */ if (!state_data->prog_data->args->verbose_count) verbose_option_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IP_Address_Source", "Possible values: Unspecified/Static/Use_DHCP/Use_BIOS/Use_Others", 0, ip_address_source_checkout, ip_address_source_commit, ip_address_source_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IP_Address", "Give valid IP address", 0, ip_address_checkout, ip_address_commit, ip_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "MAC_Address", "Give valid MAC address", 0, mac_address_checkout, mac_address_commit, mac_address_validate) < 0) goto cleanup; /* TODO: XXX: checking valid netmask is not same as checking valid IP? */ if (ipmi_config_section_add_key (state_data, section, "Subnet_Mask", "Give valid Subnet Mask", 0, subnet_mask_checkout, subnet_mask_commit, ip_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Default_Gateway_IP_Address", "Give valid IP address", 0, default_gateway_address_checkout, default_gateway_address_commit, ip_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Default_Gateway_MAC_Address", "Give valid MAC address", 0, default_gateway_mac_address_checkout, default_gateway_mac_address_commit, mac_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Backup_Gateway_IP_Address", "Give valid IP address", 0, backup_gateway_address_checkout, backup_gateway_address_commit, ip_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Backup_Gateway_MAC_Address", "Give valid MAC address", 0, backup_gateway_mac_address_checkout, backup_gateway_mac_address_commit, mac_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Vlan_id", "Give valid unsigned number", verbose_option_config_flags, vlan_id_checkout, vlan_id_commit, vlan_id_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Vlan_Id_Enable", "Possible values: Yes/No", verbose_option_config_flags, vlan_id_enable_checkout, vlan_id_enable_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Vlan_Priority", "Give valid unsigned number", verbose_option_config_flags, vlan_priority_checkout, vlan_priority_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv4_Header_Time_To_Live", "Give valid hex number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, ipv4_header_time_to_live_checkout, ipv4_header_time_to_live_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv4_Header_Flags", "Give valid hex number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, ipv4_header_flags_checkout, ipv4_header_flags_commit, number_range_three_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv4_Header_Type_Of_Service", "Give valid hex number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, ipv4_header_type_of_service_checkout, ipv4_header_type_of_service_commit, number_range_four_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv4_Header_Precedence", "Give valid hex number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, ipv4_header_precedence_checkout, ipv4_header_precedence_commit, number_range_three_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Primary_RMCP_Port", "Give valid number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, primary_rmcp_port_checkout, primary_rmcp_port_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Secondary_RMCP_Port", "Give valid number", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, secondary_rmcp_port_checkout, secondary_rmcp_port_commit, number_range_two_bytes_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-section.h0000644002055400205540000000224313527331635025734 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-security-keys-section.c0000644002055400205540000003131713527331635030551 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-util-common.h" static ipmi_config_err_t _get_key (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t key_type, void *key, unsigned int key_len) { fiid_obj_t obj_cmd_rs = NULL; uint8_t buf[IPMI_CONFIG_PARSE_BUFLEN]; int buf_len; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (key_type == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R || key_type == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G); assert (key); assert (key_len); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_channel_security_keys_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_channel_security_keys (state_data->ipmi_ctx, channel_number, IPMI_CHANNEL_SECURITY_KEYS_OPERATION_READ_KEY, key_type, NULL, 0, obj_cmd_rs) < 0) { if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_channel_security_keys: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((buf_len = fiid_obj_get_data (obj_cmd_rs, "key_value", buf, IPMI_CONFIG_PARSE_BUFLEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'key_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (key_len < buf_len) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_channel_security_keys: short buffer\n"); goto cleanup; } memcpy (key, buf, buf_len); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_key (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t key_type, const void *key, unsigned int key_len) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (key_type == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R || key_type == IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G); assert (key); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_channel_security_keys_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_channel_security_keys (state_data->ipmi_ctx, channel_number, IPMI_CHANNEL_SECURITY_KEYS_OPERATION_SET_KEY, key_type, key, key_len, obj_cmd_rs) < 0) { if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_channel_security_keys: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t k_r_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { uint8_t k_r[IPMI_MAX_K_R_LENGTH + 1]; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); memset (k_r, 0, IPMI_MAX_K_R_LENGTH + 1); if ((ret = _get_key (state_data, section_name, IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R, k_r, IPMI_MAX_K_R_LENGTH)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); k_r[IPMI_MAX_K_R_LENGTH] = '\0'; if (ipmi_config_section_update_keyvalue_output (state_data, kv, (char *)k_r) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t k_r_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { assert (state_data); assert (section_name); assert (kv); return (_set_key (state_data, section_name, IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_R, kv->value_input, strlen (kv->value_input))); } static ipmi_config_validate_t k_r_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (strlen (value) <= IPMI_MAX_K_R_LENGTH) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t k_g_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { uint8_t k_g[IPMI_MAX_K_G_LENGTH]; char k_g_str[IPMI_MAX_K_G_LENGTH*2+3]; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); memset (k_g, 0, IPMI_MAX_K_G_LENGTH); if ((ret = _get_key (state_data, section_name, IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G, k_g, IPMI_MAX_K_G_LENGTH)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* a printable k_g key can have two representations, so compare the * binary keys and return what the user passed in if they are the * same. */ if (state_data->prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) { uint8_t kv_k_g[IPMI_MAX_K_G_LENGTH+1]; memset (kv_k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); if (parse_kg (kv_k_g, IPMI_MAX_K_G_LENGTH, kv->value_input) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); if (!memcmp (kv_k_g, k_g, IPMI_MAX_K_G_LENGTH)) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, kv->value_input) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } /* else, fall through and return the default checked out value */ } memset (k_g_str, '\0', IPMI_MAX_K_G_LENGTH*2+3); if (!format_kg (k_g_str, IPMI_MAX_K_G_LENGTH*2+3, k_g)) return (IPMI_CONFIG_ERR_FATAL_ERROR); if (ipmi_config_section_update_keyvalue_output (state_data, kv, k_g_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t k_g_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t k_g[IPMI_MAX_K_G_LENGTH+1]; int k_g_len; assert (state_data); assert (section_name); assert (kv); memset (k_g, 0, IPMI_MAX_K_G_LENGTH + 1); if ((k_g_len = parse_kg (k_g, IPMI_MAX_K_G_LENGTH + 1, kv->value_input)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (_set_key (state_data, section_name, IPMI_CHANNEL_SECURITY_KEYS_KEY_ID_K_G, k_g, k_g_len)); } static ipmi_config_validate_t k_g_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { uint8_t k_g[IPMI_MAX_K_G_LENGTH+1]; assert (state_data); assert (section_name); assert (key_name); assert (value); if (parse_kg (k_g, IPMI_MAX_K_G_LENGTH + 1, value) < 0) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } struct ipmi_config_section * ipmi_config_core_lan_conf_security_keys_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "If your system supports IPMI 2.0 and Serial-over-LAN (SOL), a " "K_g BMC key may be configurable. The K_g key is an optional key that " "can be set for two key authentication in IPMI 2.0. It is optionally " "configured. Most users will want to set this to zero (or blank)."; char *section_name_base_str = "Lan_Conf_Security_Keys"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "K_R", "Give string or blank to clear. Max 20 chars", 0, k_r_checkout, k_r_commit, k_r_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "K_G", "Give string or blank to clear. Max 20 bytes, prefix with 0x to enter hex", 0, k_g_checkout, k_g_commit, k_g_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-security-keys-section.h0000644002055400205540000000236713527331635030561 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECURITY_KEYS_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECURITY_KEYS_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_conf_security_keys_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_SECURITY_KEYS_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-user-security-section.c0000644002055400205540000004153413527331635030556 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct bad_password_threshold { uint8_t user_disabled_event_message; uint8_t bad_password_threshold_number; uint16_t attempt_count_reset_interval; uint16_t user_lockout_interval; }; static ipmi_config_err_t _get_bad_password_threshold (ipmi_config_state_data_t *state_data, const char *section_name, struct bad_password_threshold *bpt) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (bpt); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_bad_password_threshold_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_bad_password_threshold (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_bad_password_threshold: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "user_disabled_event_message", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_disabled_event_message': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bpt->user_disabled_event_message = val; if (FIID_OBJ_GET (obj_cmd_rs, "bad_password_threshold_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bad_password_threshold_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bpt->bad_password_threshold_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "attempt_count_reset_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'attempt_count_reset_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bpt->attempt_count_reset_interval = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_lockout_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_lockout_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bpt->user_lockout_interval = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_bad_password_threshold (ipmi_config_state_data_t *state_data, const char *section_name, struct bad_password_threshold *bpt) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (bpt); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_bad_password_threshold (state_data->ipmi_ctx, channel_number, bpt->user_disabled_event_message, bpt->bad_password_threshold_number, bpt->attempt_count_reset_interval, bpt->user_lockout_interval, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_bad_password_threshold: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t bad_password_threshold_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, bpt.bad_password_threshold_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t bad_password_threshold_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); bpt.bad_password_threshold_number = atoi (kv->value_input); return (_set_bad_password_threshold (state_data, section_name, &bpt)); } static ipmi_config_err_t attempt_count_reset_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, bpt.attempt_count_reset_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t attempt_count_reset_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); bpt.attempt_count_reset_interval = atoi (kv->value_input); return (_set_bad_password_threshold (state_data, section_name, &bpt)); } static ipmi_config_err_t user_lockout_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, bpt.user_lockout_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t user_lockout_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); bpt.user_lockout_interval = atoi (kv->value_input); return (_set_bad_password_threshold (state_data, section_name, &bpt)); } static ipmi_config_err_t enable_event_message_when_user_disabled_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, bpt.user_disabled_event_message ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_event_message_when_user_disabled_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct bad_password_threshold bpt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_bad_password_threshold (state_data, section_name, &bpt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); bpt.user_disabled_event_message = same (kv->value_input, "yes"); return (_set_bad_password_threshold (state_data, section_name, &bpt)); } struct ipmi_config_section * ipmi_config_core_lan_conf_user_security_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "The following user security configuration options are optionally " "implemented by the vendor. They may not be available your system and " "may not be visible below." "\n" "The following configuration supports the ability for the BMC to " "disable a user if a number of bad passwords are entered sequentially. " "\"Bad_Password_Threshold\" determines the number of bad passwords that " "must be entered sequentially. \"Attempt_Count_Reset_Interval\" determines " "the range of time the bad passwords must occur in. \"User_Lockout_Interval\" " "determines the time a user will be locked off if the bad password " "threshold is reached. If set to \"Yes\", \"Enable_Event_Message_When_User_Disabled\" " "will inform the BMC to log an event message when a user is disabled."; char *section_name_base_str = "Lan_Conf_User_Security"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Bad_Password_Threshold", "Possible values: 0-255, 0 indicates no limit", 0, bad_password_threshold_checkout, bad_password_threshold_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Attempt_Count_Reset_Interval", "Possible values: 0-65535, in 10 second increments (e.g. 2 = 20 sec)\n" " 0 indicates no interval (i.e. don't reset counter)", 0, attempt_count_reset_interval_checkout, attempt_count_reset_interval_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "User_Lockout_Interval", "Possible values: 0-65535, in 10 second increments (e.g. 2 = 20 sec)\n" " 0 indicates no interval (i.e. don't re-enable user)", 0, user_lockout_interval_checkout, user_lockout_interval_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Event_Message_When_User_Disabled", "Possible values: Yes/No", 0, enable_event_message_when_user_disabled_checkout, enable_event_message_when_user_disabled_commit, yes_no_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan-conf-user-security-section.h0000644002055400205540000000236713527331635030564 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_USER_SECURITY_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_USER_SECURITY_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan_conf_user_security_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN_CONF_USER_SECURITY_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan6-conf-section.c0000644002055400205540000027251613527331635026031 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #ifdef INET6_ADDRSTRLEN #define BMC_MAXIPV6ADDRLEN INET6_ADDRSTRLEN #else #define BMC_MAXIPV6ADDRLEN 46 #endif #define BMC_MAXMACADDRLEN 24 struct ipv6_address_data { uint8_t source; uint8_t enable; /* not used w/ dynamic */ uint8_t address[IPMI_IPV6_BYTES]; uint8_t address_prefix_length; uint8_t address_status; }; struct router_address_configuration_control { uint8_t enable_static_router_address; uint8_t enable_dynamic_router_address; }; static uint8_t get_address_status_number (const char *string) { assert (string); if (same (string, "active")) return (IPMI_IPV6_ADDRESS_STATUS_ACTIVE); if (same (string, "disabled")) return (IPMI_IPV6_ADDRESS_STATUS_DISABLED); if (same (string, "pending")) return (IPMI_IPV6_ADDRESS_STATUS_PENDING); if (same (string, "failed")) return (IPMI_IPV6_ADDRESS_STATUS_FAILED); if (same (string, "deprecated")) return (IPMI_IPV6_ADDRESS_STATUS_DEPRECATED); if (same (string, "invalid")) return (IPMI_IPV6_ADDRESS_STATUS_INVALID); return (-1); } static char * get_address_status_string (uint8_t value) { switch (value) { case IPMI_IPV6_ADDRESS_STATUS_ACTIVE: return "Active"; case IPMI_IPV6_ADDRESS_STATUS_DISABLED: return "Disabled"; case IPMI_IPV6_ADDRESS_STATUS_PENDING: return "Pending"; case IPMI_IPV6_ADDRESS_STATUS_FAILED: return "Failed"; case IPMI_IPV6_ADDRESS_STATUS_DEPRECATED: return "Deprecated"; case IPMI_IPV6_ADDRESS_STATUS_INVALID: return "Invalid"; } return ""; } static ipmi_config_validate_t ipv6_address_prefix_length_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, IPMI_IPV6_PREFIX_LENGTH_MAX)); } static ipmi_config_validate_t ipv6_address_status_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (get_address_status_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t _get_number_of_ipv6_addresses (struct ipmi_config_state_data *state_data, const char *section_name, uint8_t *number_of_static_addresses, uint8_t *number_of_dynamic_addresses) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint64_t val; uint8_t channel_number; assert (state_data); assert (number_of_static_addresses); assert (number_of_dynamic_addresses); if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_status (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "static_address_max", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'static_address_max': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } *number_of_static_addresses = val; if (FIID_OBJ_GET (obj_cmd_rs, "dynamic_address_max", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dynamic_address_max': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } *number_of_dynamic_addresses = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_ipv6_ipv4_support (ipmi_config_state_data_t *state_data, const char *section_name) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (state_data->ipv6_ipv4_support_initialized && state_data->ipv6_ipv4_support_channel_number == channel_number) goto out; state_data->ipv6_ipv4_support_initialized = 0; state_data->ipv6_ipv4_support_channel_number = 0; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_support_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_support (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED) { state_data->ipv6_ipv4_support_supports_ipv6_only = 0; state_data->ipv6_ipv4_support_supports_ipv6_and_ipv4_simultaneously = 0; state_data->ipv6_ipv4_support_supports_ipv6_destination_address_for_lan_alert = 0; state_data->ipv6_ipv4_support_channel_number = channel_number; state_data->ipv6_ipv4_support_initialized++; goto out; } if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_support: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "supports_ipv6_only", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'supports_ipv6_only': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->ipv6_ipv4_support_supports_ipv6_only = val; if (FIID_OBJ_GET (obj_cmd_rs, "supports_ipv6_and_ipv4_simultaneously", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'supports_ipv6_and_ipv4_simultaneously': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->ipv6_ipv4_support_supports_ipv6_and_ipv4_simultaneously = val; if (FIID_OBJ_GET (obj_cmd_rs, "supports_ipv6_destination_address_for_lan_alert", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'supports_ipv6_destination_address_for_lan_alert': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } state_data->ipv6_ipv4_support_supports_ipv6_destination_address_for_lan_alert = val; state_data->ipv6_ipv4_support_channel_number = channel_number; state_data->ipv6_ipv4_support_initialized++; out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_ipv4_support_ipv6_only_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; ret = _get_ipv6_ipv4_support (state_data, section_name); if (ret != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, state_data->ipv6_ipv4_support_supports_ipv6_only ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_ipv4_support_ipv6_and_ipv4_simultaneously_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; ret = _get_ipv6_ipv4_support (state_data, section_name); if (ret != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, state_data->ipv6_ipv4_support_supports_ipv6_and_ipv4_simultaneously ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_ipv4_support_ipv6_destination_address_for_lan_alert_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; ret = _get_ipv6_ipv4_support (state_data, section_name); if (ret != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, state_data->ipv6_ipv4_support_supports_ipv6_destination_address_for_lan_alert ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_ipv4_addressing_enables_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint64_t val; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_ipv4_addressing_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "enables", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'enables': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ipv6_ipv4_addressing_enables_string (val)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_ipv4_addressing_enables_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables (state_data->ipmi_ctx, channel_number, ipv6_ipv4_addressing_enables_number (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_ipv4_addressing_enables: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_ipv6_static_address (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t set_selector, struct ipv6_address_data *ipv6_data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint64_t val; assert (state_data); assert (section_name); assert (ipv6_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_addresses_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_static_addresses (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, set_selector, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_static_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "source", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'source': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->source = val; if (FIID_OBJ_GET (obj_cmd_rs, "enable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'enable': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->enable = val; if (fiid_obj_get_data (obj_cmd_rs, "address", ipv6_data->address, IPMI_IPV6_BYTES) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "address_prefix_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'address_prefix_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->address_prefix_length = val; if (FIID_OBJ_GET (obj_cmd_rs, "address_status", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'address_status': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->address_status = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_ipv6_static_address (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t set_selector, struct ipv6_address_data *ipv6_data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (ipv6_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ipv6_static_addresses (state_data->ipmi_ctx, channel_number, set_selector, ipv6_data->source, ipv6_data->enable, ipv6_data->address, ipv6_data->address_prefix_length, ipv6_data->address_status, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_static_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } uint8_t get_static_address_source_number (const char *string) { assert (string); if (same (string, "static")) return (IPMI_IPV6_ADDRESS_SOURCE_STATIC); return (-1); } char * get_static_address_source_string (uint8_t value) { switch (value) { case IPMI_IPV6_ADDRESS_SOURCE_STATIC: return "Static"; } return ""; } static ipmi_config_err_t ipv6_static_address_source_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Source_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_static_address_source_string (ipv6_data.source)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_static_address_source_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Source_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ipv6_data.source = get_static_address_source_number (kv->value_input); return (_set_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Source_")), &ipv6_data)); } static ipmi_config_validate_t ipv6_static_address_source_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (get_static_address_source_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t ipv6_static_address_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Enable_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ipv6_data.enable ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_static_address_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Enable_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ipv6_data.enable = same (kv->value_input, "yes"); return (_set_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Enable_")), &ipv6_data)); } static ipmi_config_err_t ipv6_static_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; char address_str[BMC_MAXIPV6ADDRLEN + 1]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } memset (address_str, '\0', BMC_MAXIPV6ADDRLEN+1); if (!inet_ntop (AF_INET6, ipv6_data.address, address_str, BMC_MAXIPV6ADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } /* handle special case? !same (address_str, "::") */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_static_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t ret; struct in6_addr addr; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (inet_pton (AF_INET6, kv->value_input, &addr) != 1) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "inet_pton: %s\n", strerror (errno)); return (IPMI_CONFIG_ERR_FATAL_ERROR); } memcpy (ipv6_data.address, &addr, IPMI_IPV6_BYTES); return (_set_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_")), &ipv6_data)); } static ipmi_config_err_t ipv6_static_address_prefix_length_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Prefix_Length_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, ipv6_data.address_prefix_length) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_static_address_prefix_length_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Prefix_Length_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ipv6_data.address_prefix_length = strtol (kv->value_input, NULL, 0); return (_set_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Prefix_Length_")), &ipv6_data)); } static ipmi_config_err_t ipv6_static_address_status_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_static_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Static_Address_Status_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_address_status_string (ipv6_data.address_status)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t _get_ipv6_dynamic_address (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t set_selector, struct ipv6_address_data *ipv6_data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint64_t val; assert (state_data); assert (section_name); assert (ipv6_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_dynamic_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, set_selector, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_dynamic_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "source", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'source': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->source = val; if (fiid_obj_get_data (obj_cmd_rs, "address", ipv6_data->address, IPMI_IPV6_BYTES) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "address_prefix_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'address_prefix_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->address_prefix_length = val; if (FIID_OBJ_GET (obj_cmd_rs, "address_status", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'address_status': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ipv6_data->address_status = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static uint8_t get_dynamic_address_source_number (const char *string) { assert (string); if (same (string, "slaac")) return (IPMI_IPV6_ADDRESS_SOURCE_SLAAC); if (same (string, "dhcpv6")) return (IPMI_IPV6_ADDRESS_SOURCE_DHCPV6); return (-1); } static char * get_dynamic_address_source_string (uint8_t value) { switch (value) { case IPMI_IPV6_ADDRESS_SOURCE_SLAAC: return "SLAAC"; case IPMI_IPV6_ADDRESS_SOURCE_DHCPV6: return "DHCPv6"; } return ""; } static ipmi_config_err_t ipv6_dynamic_address_source_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_dynamic_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Dynamic_Address_Source_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_dynamic_address_source_string (ipv6_data.source)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_validate_t ipv6_dynamic_address_source_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (get_dynamic_address_source_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t ipv6_dynamic_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; char address_str[BMC_MAXIPV6ADDRLEN + 1]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_dynamic_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Dynamic_Address_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } memset (address_str, '\0', BMC_MAXIPV6ADDRLEN+1); if (!inet_ntop (AF_INET6, ipv6_data.address, address_str, BMC_MAXIPV6ADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } /* handle special case? !same (address_str, "::") */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_dynamic_address_prefix_length_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_dynamic_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Dynamic_Address_Prefix_Length_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, ipv6_data.address_prefix_length) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_dynamic_address_status_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipv6_address_data ipv6_data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipv6_dynamic_address (state_data, section_name, atoi (kv->key->key_name + strlen ("IPv6_Dynamic_Address_Status_")), &ipv6_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_address_status_string (ipv6_data.address_status)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t _get_router_address_configuration_control (ipmi_config_state_data_t *state_data, const char *section_name, struct router_address_configuration_control *racc) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint64_t val; uint8_t channel_number; assert (state_data); assert (section_name); assert (racc); if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_router_address_configuration_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "enable_static_router_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'enable_static_router_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } racc->enable_static_router_address = val; if (FIID_OBJ_GET (obj_cmd_rs, "enable_dynamic_router_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'enable_dynamic_router_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } racc->enable_dynamic_router_address = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_router_address_configuration_control (ipmi_config_state_data_t *state_data, const char *section_name, struct router_address_configuration_control *racc) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (racc); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control (state_data->ipmi_ctx, channel_number, racc->enable_static_router_address, racc->enable_dynamic_router_address, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_router_address_configuration_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_address_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct router_address_configuration_control racc; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; ret = _get_router_address_configuration_control (state_data, section_name, &racc); if (ret != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, racc.enable_static_router_address ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t ipv6_static_router_address_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct router_address_configuration_control racc; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_router_address_configuration_control (state_data, section_name, &racc)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); racc.enable_static_router_address = same (kv->value_input, "yes"); return (_set_router_address_configuration_control (state_data, section_name, &racc)); } static ipmi_config_err_t ipv6_static_router_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t address[IPMI_IPV6_BYTES]; char address_str[BMC_MAXIPV6ADDRLEN + 1]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Address_")); if (num == 1) obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address_rs); else obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address_rs); if (!obj_cmd_rs) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_ip_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); else tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_ip_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); if (tmp < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_X_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "ipv6_router_ip_address", address, IPMI_IPV6_BYTES) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'ipv6_router_ip_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (address_str, '\0', BMC_MAXIPV6ADDRLEN+1); if (!inet_ntop (AF_INET6, address, address_str, BMC_MAXIPV6ADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } /* handle special case? !same (address_str, "::") */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; struct in6_addr addr; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Address_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (inet_pton (AF_INET6, kv->value_input, &addr) != 1) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "inet_pton: %s\n", strerror (errno)); return (IPMI_CONFIG_ERR_FATAL_ERROR); } if (num == 1) tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_ip_address (state_data->ipmi_ctx, channel_number, (uint8_t *)&addr, obj_cmd_rs); else tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_ip_address (state_data->ipmi_ctx, channel_number, (uint8_t *)&addr, obj_cmd_rs); if (tmp) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_X_ip_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_mac_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char router_mac_address_str[BMC_MAXMACADDRLEN+1]; uint8_t router_mac_address_bytes[6]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Mac_Address_")); if (num == 1) obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address_rs); else obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address_rs); if (!obj_cmd_rs) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_mac_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); else tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_mac_address (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); if (tmp < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_X_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "router_mac_address", router_mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'router_mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (router_mac_address_str, '\0', BMC_MAXMACADDRLEN+1); snprintf (router_mac_address_str, BMC_MAXMACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", router_mac_address_bytes[0], router_mac_address_bytes[1], router_mac_address_bytes[2], router_mac_address_bytes[3], router_mac_address_bytes[4], router_mac_address_bytes[5]); if (ipmi_config_section_update_keyvalue_output (state_data, kv, router_mac_address_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_mac_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint64_t mac_address_val = 0; uint8_t channel_number; int num; int tmp; assert (state_data); assert (section_name); assert (kv); if (mac_address_string2int (state_data, kv->value_input, &mac_address_val) < 0) goto cleanup; /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Mac_Address_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_mac_address (state_data->ipmi_ctx, channel_number, mac_address_val, obj_cmd_rs); else tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_mac_address (state_data->ipmi_ctx, channel_number, mac_address_val, obj_cmd_rs); if (tmp) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_X_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_prefix_length_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint64_t val; uint8_t prefix_length; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Prefix_Length_")); if (num == 1) obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length_rs); else obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length_rs); if (!obj_cmd_rs) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_length (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); else tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_length (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); if (tmp < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_X_prefix_length: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "prefix_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'prefix_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } prefix_length = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, prefix_length) < 0) rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_prefix_length_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t prefix_length; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Prefix_Length_")); prefix_length = atoi (kv->value_input); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_length (state_data->ipmi_ctx, channel_number, prefix_length, obj_cmd_rs); else tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_length (state_data->ipmi_ctx, channel_number, prefix_length, obj_cmd_rs); if (tmp) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_X_prefix_length: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_prefix_value_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t prefix_value[IPMI_IPV6_BYTES]; char prefix_value_str[BMC_MAXIPV6ADDRLEN + 1]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Prefix_Value_")); if (num == 1) obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value_rs); else obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value_rs); if (!obj_cmd_rs) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (num == 1) tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_1_prefix_value (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); else tmp = ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_2_prefix_value (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs); if (tmp < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_ipv6_static_router_X_prefix_value: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "prefix_value", prefix_value, IPMI_IPV6_BYTES) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'prefix_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (prefix_value_str, '\0', BMC_MAXIPV6ADDRLEN+1); if (!inet_ntop (AF_INET6, prefix_value, prefix_value_str, BMC_MAXIPV6ADDRLEN)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } /* handle special case? !same (prefix_value_str, "::") */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, prefix_value_str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t ipv6_static_router_prefix_value_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; struct in6_addr addr; int num; int tmp; assert (state_data); assert (section_name); assert (kv); /* router 1 or 2 */ num = atoi (kv->key->key_name + strlen ("IPv6_Static_Router_Prefix_Value_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (inet_pton (AF_INET6, kv->value_input, &addr) != 1) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "inet_pton: %s\n", strerror (errno)); return (IPMI_CONFIG_ERR_FATAL_ERROR); } if (num == 1) tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_1_prefix_value (state_data->ipmi_ctx, channel_number, (uint8_t *)&addr, obj_cmd_rs); else tmp = ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_2_prefix_value (state_data->ipmi_ctx, channel_number, (uint8_t *)&addr, obj_cmd_rs); if (tmp) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_ipv6_static_router_X_prefix_value: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_lan6_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char key_name[IPMI_CONFIG_MAX_KEY_NAME_LEN]; char *section_comment = "In the Lan6_Conf section, typical networking configuration is setup. " "Most users will choose to set an address in \"IPv6_Static_Address\" " "and set the appropriate routing for the machine."; char *section_name_base_str = "Lan6_Conf"; unsigned int verbose_option_config_flags = 0; uint8_t number_of_static_addresses = 0; uint8_t number_of_dynamic_addresses = 0; ipmi_config_err_t ret; unsigned int i; assert (state_data); if (!state_data->prog_data->args->verbose_count) verbose_option_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Supports_IPv6_Only", "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_ipv4_support_ipv6_only_checkout, read_only_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Supports_IPv6_And_IPv4_Simultaneously", "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_ipv4_support_ipv6_and_ipv4_simultaneously_checkout, read_only_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Supports_IPv6_Destination_Address_For_Lan_Alert", "READ-ONLY", verbose_option_config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_ipv4_support_ipv6_destination_address_for_lan_alert_checkout, read_only_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_IPv4_Addressing_Enables", "Possible values: IPv4-Only/IPv6-Only/IPv4-and-IPv6", 0, ipv6_ipv4_addressing_enables_checkout, ipv6_ipv4_addressing_enables_commit, ipv6_ipv4_addressing_enables_validate) < 0) goto cleanup; /* Do not return error if this returns != IPMI_CONFIG_ERR_SUCCESS, * as the motherboard may report it doesn't support IPv6 above. If * this fails, we just assume all other IPv6 configuration below * isn't available. */ if ((ret = _get_number_of_ipv6_addresses (state_data, section->section_name, &number_of_static_addresses, &number_of_dynamic_addresses)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get number of addresses\n"); return (NULL); } goto done; } for (i = 0; i < number_of_static_addresses; i++) { snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Static_Address_Source_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "Possible values: Static", 0, ipv6_static_address_source_checkout, ipv6_static_address_source_commit, ipv6_static_address_source_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Static_Address_Enable_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "Possible values: Yes/No", 0, ipv6_static_address_enable_checkout, ipv6_static_address_enable_commit, yes_no_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Static_Address_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "Give valid IPv6 address", 0, ipv6_static_address_checkout, ipv6_static_address_commit, ipv6_address_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Static_Address_Prefix_Length_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "Give valid prefix length", 0, ipv6_static_address_prefix_length_checkout, ipv6_static_address_prefix_length_commit, ipv6_address_prefix_length_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Static_Address_Status_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_static_address_status_checkout, read_only_commit, ipv6_address_status_validate) < 0) goto cleanup; } for (i = 0; i < number_of_dynamic_addresses; i++) { snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Dynamic_Address_Source_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_dynamic_address_source_checkout, read_only_commit, ipv6_dynamic_address_source_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Dynamic_Address_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_dynamic_address_checkout, read_only_commit, ipv6_address_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Dynamic_Address_Prefix_Length_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_dynamic_address_prefix_length_checkout, read_only_commit, ipv6_address_prefix_length_validate) < 0) goto cleanup; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "IPv6_Dynamic_Address_Status_%u", i); if (ipmi_config_section_add_key (state_data, section, key_name, "READ-ONLY", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY, ipv6_dynamic_address_status_checkout, read_only_commit, ipv6_address_status_validate) < 0) goto cleanup; } if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Address_Enable", "Possible values: Yes/No", 0, ipv6_static_router_address_enable_checkout, ipv6_static_router_address_enable_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Address_1", "Give valid IPv6 address", 0, ipv6_static_router_address_checkout, ipv6_static_router_address_commit, ipv6_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Mac_Address_1", "Give valid IPv6 mac address", 0, ipv6_static_router_mac_address_checkout, ipv6_static_router_mac_address_commit, mac_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Prefix_Length_1", "Give valid IPv6 prefix length", 0, ipv6_static_router_prefix_length_checkout, ipv6_static_router_prefix_length_commit, ipv6_address_prefix_length_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Prefix_Value_1", "Give valid IPv6 prefix value", 0, ipv6_static_router_prefix_value_checkout, ipv6_static_router_prefix_value_commit, ipv6_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Address_2", "Give valid IPv6 address", 0, ipv6_static_router_address_checkout, ipv6_static_router_address_commit, ipv6_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Mac_Address_2", "Give valid IPv6 mac address", 0, ipv6_static_router_mac_address_checkout, ipv6_static_router_mac_address_commit, mac_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Prefix_Length_2", "Give valid IPv6 prefix length", 0, ipv6_static_router_prefix_length_checkout, ipv6_static_router_prefix_length_commit, ipv6_address_prefix_length_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "IPv6_Static_Router_Prefix_Value_2", "Give valid IPv6 prefix value", 0, ipv6_static_router_prefix_value_checkout, ipv6_static_router_prefix_value_commit, ipv6_address_validate) < 0) goto cleanup; done: return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-lan6-conf-section.h0000644002055400205540000000225113527331635026021 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_LAN6_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_LAN6_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_lan6_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_LAN6_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-misc-section.c0000644002055400205540000001464013527331635025171 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t power_restore_policy_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t power_restore_policy; uint64_t val; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_chassis_status_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_chassis_status (state_data->ipmi_ctx, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_chassis_status: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current_power_state.power_restore_policy", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'current_power_state.power_restore_policy': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } power_restore_policy = val; if (ipmi_config_section_update_keyvalue_output (state_data, kv, power_restore_policy_string (power_restore_policy)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t power_restore_policy_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; fiid_obj_t obj_cmd_rs = NULL; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_power_restore_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_power_restore_policy (state_data->ipmi_ctx, power_restore_policy_number (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_power_restore_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_misc_section_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section = NULL; char *section_comment = "The following miscellaneous configuration options are optionally " "implemented by the vendor. They may not be available your system and " "may not be visible below." "\n" "The \"Power_Restore_Policy\" determines the behavior of the machine " "when AC power returns after a power loss. The behavior can be set to " "always power on the machine (\"On_State_AC_Apply\"), power off the " "machine (\"Off_State_AC_Apply\"), or return the power to the state that " "existed before the power loss (\"Restore_State_AC_Apply\")."; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "Misc", "Misc", section_comment, IPMI_CONFIG_DO_NOT_CHECKOUT | IPMI_CONFIG_DO_NOT_LIST, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Power_Restore_Policy", "Possible values: Off_State_AC_Apply/Restore_State_AC_Apply/On_State_AC_Apply", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, power_restore_policy_checkout, power_restore_policy_commit, power_restore_policy_number_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-misc-section.h0000644002055400205540000000173613527331635025200 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_MISC_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_MISC_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_misc_section_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CORE_MISC_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-pef-conf-section.c0000644002055400205540000001630613527331635025734 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-validate.h" #include "ipmi-config-category-common-pef-conf-section.h" #include "freeipmi-portability.h" struct ipmi_config_section * ipmi_config_core_pef_conf_section_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "PEF_Conf", NULL, NULL, IPMI_CONFIG_DO_NOT_CHECKOUT | IPMI_CONFIG_DO_NOT_LIST, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF", "Possible values: Yes/No", 0, enable_pef_checkout, enable_pef_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Event_Messages", "Possible values: Yes/No", 0, enable_pef_event_messages_checkout, enable_pef_event_messages_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Startup_Delay", "Possible values: Yes/No", 0, enable_pef_startup_delay_checkout, enable_pef_startup_delay_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Alert_Startup_Delay", "Possible values: Yes/No", 0, enable_pef_alert_startup_delay_checkout, enable_pef_alert_startup_delay_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Alert_Action", "Possible values: Yes/No", 0, enable_alert_action_checkout, enable_alert_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Power_Down_Action", "Possible values: Yes/No", 0, enable_power_down_action_checkout, enable_power_down_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Reset_Action", "Possible values: Yes/No", 0, enable_reset_action_checkout, enable_reset_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Power_Cycle_Action", "Possible values: Yes/No", 0, enable_power_cycle_action_checkout, enable_power_cycle_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_OEM_Action", "Possible values: Yes/No", 0, enable_oem_action_checkout, enable_oem_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Diagnostic_Interrupt", "Possible values: Yes/No", 0, enable_diagnostic_interrupt_checkout, enable_diagnostic_interrupt_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "PEF_Startup_Delay", "Give value in seconds", 0, pef_startup_delay_checkout, pef_startup_delay_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "PEF_Alert_Startup_Delay", "Give value in seconds", 0, pef_alert_startup_delay_checkout, pef_alert_startup_delay_commit, number_range_one_byte_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-pef-conf-section.h0000644002055400205540000000175513527331635025743 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_PEF_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_PEF_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_pef_conf_section_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CORE_PEF_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-rmcpplus-conf-privilege-section.c0000644002055400205540000010527213527331635031014 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #define IPMI_CONFIG_FIELD_LENGTH_MAX 128 #define IPMI_CONFIG_PRIVILEGE_LEVEL_SUPPORTED_BUT_NOT_READABLE 0xFF #define IPMI_CONFIG_CIPHER_SUITE_INCORRECT_RANGE_LEN 16 static ipmi_config_err_t _rmcpplus_cipher_suite_id_privilege_setup (ipmi_config_state_data_t *state_data, const char *section_name) { fiid_obj_t obj_cmd_count_rs = NULL; fiid_obj_t obj_cmd_id_rs = NULL; fiid_obj_t obj_cmd_priv_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; unsigned int i; assert (state_data); assert (section_name); if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (state_data->cipher_suite_entry_count_set && state_data->cipher_suite_id_supported_set && state_data->cipher_suite_priv_set && state_data->cipher_suite_channel_number == channel_number) return (IPMI_CONFIG_ERR_SUCCESS); state_data->cipher_suite_entry_count = 0; state_data->cipher_suite_entry_count_set = 0; state_data->cipher_suite_id_supported_set = 0; state_data->cipher_suite_priv_set = 0; state_data->cipher_suite_channel_number = channel_number; memset (state_data->cipher_suite_id_supported, '\0', sizeof (state_data->cipher_suite_id_supported)); memset (state_data->cipher_suite_priv, '\0', sizeof (state_data->cipher_suite_priv)); if (!state_data->cipher_suite_entry_count_set) { if (!(obj_cmd_count_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_count_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_count_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entry_support: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_count_rs, "cipher_suite_entry_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'cipher_suite_entry_count': %s\n", fiid_obj_errormsg (obj_cmd_count_rs)); goto cleanup; } state_data->cipher_suite_entry_count = val; if (state_data->cipher_suite_entry_count > IPMI_CONFIG_CIPHER_SUITE_LEN) state_data->cipher_suite_entry_count = IPMI_CONFIG_CIPHER_SUITE_LEN; state_data->cipher_suite_entry_count_set++; } if (state_data->cipher_suite_entry_count && !state_data->cipher_suite_id_supported_set) { if (!(obj_cmd_id_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_id_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_id_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_entries: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } for (i = 0; i < state_data->cipher_suite_entry_count; i++) { char field[IPMI_CONFIG_FIELD_LENGTH_MAX + 1]; memset (field, '\0', IPMI_CONFIG_FIELD_LENGTH_MAX + 1); snprintf (field, IPMI_CONFIG_FIELD_LENGTH_MAX, "cipher_suite_id_entry_%c", 'A' + i); if (FIID_OBJ_GET (obj_cmd_id_rs, field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: '%s': %s\n", field, fiid_obj_errormsg (obj_cmd_id_rs)); goto cleanup; } state_data->cipher_suite_id_supported[i] = val; } /* IPMI Workaround (achu) * * Intel S2600JF/Appro 512X * * Motherboard incorrectly states that it supports Cipher Suites * 1-16 instead of 0-15. If this is specifically returned, adjust * appropriately. */ if (state_data->cipher_suite_entry_count == IPMI_CONFIG_CIPHER_SUITE_INCORRECT_RANGE_LEN) { int workaround_condition_not_found = 0; for (i = 0; i < state_data->cipher_suite_entry_count; i++) { if (state_data->cipher_suite_id_supported[i] != (i + 1)) { workaround_condition_not_found++; break; } } if (!workaround_condition_not_found) { for (i = 0; i < state_data->cipher_suite_entry_count; i++) state_data->cipher_suite_id_supported[i] -= 1; } } state_data->cipher_suite_id_supported_set++; } if (state_data->cipher_suite_entry_count && !state_data->cipher_suite_priv_set) { if (!(obj_cmd_priv_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_priv_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_priv_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_level: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } for (i = 0; i < IPMI_CONFIG_CIPHER_SUITE_LEN; i++) { char field[IPMI_CONFIG_FIELD_LENGTH_MAX + 1]; memset (field, '\0', IPMI_CONFIG_FIELD_LENGTH_MAX + 1); snprintf (field, IPMI_CONFIG_FIELD_LENGTH_MAX, "maximum_privilege_for_cipher_suite_%u", i + 1); if (FIID_OBJ_GET (obj_cmd_priv_rs, field, &val) < 0) { int id_found = 0; /* IPMI Workaround (achu) * * HP DL145 * * The number of entries returned from a RMCP+ Messaging * Cipher Suite Privilege Levels request is not valid. Not * only is it not valid, the number of entries does not even * match the number of entries specified by a RMCP+ * Messaging Cipher Suite Entry Support Count request. * * Instead, indicate the privilege is illegal and have * the output indicated appropriately for this * situation. */ if (fiid_obj_errnum (obj_cmd_priv_rs) == FIID_ERR_DATA_NOT_AVAILABLE) { unsigned int j; for (j = 0; j < state_data->cipher_suite_entry_count; j++) { if (state_data->cipher_suite_id_supported[j] == i) { id_found++; break; } } } if (fiid_obj_errnum (obj_cmd_priv_rs) != FIID_ERR_DATA_NOT_AVAILABLE) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: '%s': %s\n", field, fiid_obj_errormsg (obj_cmd_priv_rs)); goto cleanup; } else { if (id_found) val = IPMI_CONFIG_PRIVILEGE_LEVEL_SUPPORTED_BUT_NOT_READABLE; else val = IPMI_PRIVILEGE_LEVEL_UNSPECIFIED; } } state_data->cipher_suite_priv[i] = val; } state_data->cipher_suite_priv_set++; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_count_rs); fiid_obj_destroy (obj_cmd_id_rs); fiid_obj_destroy (obj_cmd_priv_rs); return (rv); } static ipmi_config_err_t id_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv, int id) { ipmi_config_err_t ret; uint8_t privilege; unsigned int i; int id_found = 0; assert (state_data); assert (section_name); assert (kv); if ((ret = _rmcpplus_cipher_suite_id_privilege_setup (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); for (i = 0; i < state_data->cipher_suite_entry_count; i++) { if (state_data->cipher_suite_id_supported[i] == id) { /* achu: NOT A BUG. * * IPMI spec is_supported does not map to privileges array, you want to index at [id] not [i] */ privilege = state_data->cipher_suite_priv[id]; id_found++; break; } } if (id_found) { /* achu: see HP DL145 workaround description above in * _rmcpplus_cipher_suite_id_privilege_setup() */ if (privilege != IPMI_CONFIG_PRIVILEGE_LEVEL_SUPPORTED_BUT_NOT_READABLE) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, rmcpplus_priv_string (privilege)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else { /* output empty string, will match with * IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY flag to * output commented out section. */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, "") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } return (IPMI_CONFIG_ERR_SUCCESS); } /* if ID not found, return non-fatal error, will not output at all */ return (IPMI_CONFIG_ERR_NON_FATAL_ERROR); } static ipmi_config_err_t id_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv, int id) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t privs[IPMI_CONFIG_CIPHER_SUITE_LEN]; uint8_t privilege; unsigned int i; assert (state_data); assert (section_name); assert (kv); if ((ret = _rmcpplus_cipher_suite_id_privilege_setup (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } privilege = rmcpplus_priv_number (kv->value_input); memset (privs, '\0', IPMI_CONFIG_CIPHER_SUITE_LEN); memcpy (privs, state_data->cipher_suite_priv, IPMI_CONFIG_CIPHER_SUITE_LEN); /* achu: NOT A BUG. * * IPMI spec is_supported does not map to privileges array, you want to index at [id] not a searched [i] */ privs[id] = privilege; /* IPMI Workaround (achu) * * HP DL145 * * See comments above in _rmcpplus_cipher_suite_id_privilege_setup * surrounding HP DL145 workaround. * * B/c of the issue above, there may be illegal privilege levels * sitting in the cipher_suite_priv[] array, we need to fill them in * with the values configured by users. * * If the users didn't configure all the entries, they're out of * luck, we need to return an error. */ for (i = 0; i < IPMI_CONFIG_CIPHER_SUITE_LEN; i++) { if (privs[i] == IPMI_CONFIG_PRIVILEGE_LEVEL_SUPPORTED_BUT_NOT_READABLE) { struct ipmi_config_section *section; if ((section = ipmi_config_find_section (state_data, section_name))) { char keynametmp[IPMI_CONFIG_MAX_KEY_NAME_LEN + 1]; struct ipmi_config_keyvalue *kvtmp; memset (keynametmp, '\0', IPMI_CONFIG_MAX_KEY_NAME_LEN + 1); snprintf (keynametmp, IPMI_CONFIG_MAX_KEY_NAME_LEN, "Maximum_Privilege_Cipher_Suite_Id_%u", i); if ((kvtmp = ipmi_config_find_keyvalue (section, keynametmp))) { uint8_t privilege_tmp; privilege_tmp = rmcpplus_priv_number (kvtmp->value_input); privs[i] = privilege_tmp; } else { pstdout_fprintf (state_data->pstate, stderr, "ERROR: '%s:%s' Field Required\n", section_name, keynametmp); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } } else { /* This is a fatal error, we're already in this section, * it should be findable */ pstdout_fprintf (state_data->pstate, stderr, "Cannot find section '%s'\n", section_name); goto cleanup; } } } if (ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels (state_data->ipmi_ctx, channel_number, privs[0], privs[1], privs[2], privs[3], privs[4], privs[5], privs[6], privs[7], privs[8], privs[9], privs[10], privs[11], privs[12], privs[13], privs[14], privs[15], obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_rmcpplus_messaging_cipher_suite_privilege_levels: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* achu: NOT A BUG. * * IPMI spec is_supported does not map to privileges array, you want to index at [id] not [i] */ state_data->cipher_suite_priv[id] = privilege; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t id_checkout_cb (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { uint8_t id = atoi (kv->key->key_name + strlen ("Maximum_Privilege_Cipher_Suite_Id_")); return (id_checkout (state_data, section_name, kv, id)); } static ipmi_config_err_t id_commit_cb (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t id = atoi (kv->key->key_name + strlen ("Maximum_Privilege_Cipher_Suite_Id_")); return (id_commit (state_data, section_name, kv, id)); } struct ipmi_config_section * ipmi_config_core_rmcpplus_conf_privilege_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "If your system supports IPMI 2.0 and Serial-over-LAN (SOL)," "cipher suite IDs may be configurable below. In the " "Rmcpplus_Conf_Privilege section, maximum user privilege levels " "allowed for authentication under IPMI 2.0 (including Serial-over-LAN) " "are set for each supported cipher suite ID. Each cipher suite ID " "supports different sets of authentication, integrity, and encryption " "algorithms for IPMI 2.0. Typically, the highest privilege level any " "username configured should set for support under a cipher suite ID. " "This is typically \"Administrator\"."; char *section_name_base_str = "Rmcpplus_Conf_Privilege"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_0", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_1", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_2", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_3", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_4", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_5", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_6", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_7", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_8", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_9", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_10", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_11", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_12", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_13", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_14", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_15", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; #if 0 /* achu: Can't support this config until IPMI spec is updated. Yeah, it sucks */ if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_16", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_17", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_18", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Maximum_Privilege_Cipher_Suite_Id_19", "Possible values: Unused/User/Operator/Administrator/OEM_Proprietary", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, id_checkout_cb, id_commit_cb, rmcpplus_priv_number_validate) < 0) goto cleanup; #endif return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-rmcpplus-conf-privilege-section.h0000644002055400205540000000237513527331635031021 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_RMCPPLUS_CONF_PRIVILEGE_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_RMCPPLUS_CONF_PRIVILEGE_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_rmcpplus_conf_privilege_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_RMCPPLUS_CONF_PRIVILEGE_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-sections.c0000644002055400205540000004117413527331635024425 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-category-core-sections.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-category-core-lan-channel-section.h" #include "ipmi-config-category-core-lan-conf-section.h" #include "ipmi-config-category-core-lan-conf-auth-section.h" #include "ipmi-config-category-core-lan-conf-security-keys-section.h" #include "ipmi-config-category-core-lan-conf-misc-section.h" #include "ipmi-config-category-core-lan-conf-user-security-section.h" #include "ipmi-config-category-core-lan6-conf-section.h" #include "ipmi-config-category-core-misc-section.h" #include "ipmi-config-category-core-pef-conf-section.h" #include "ipmi-config-category-core-rmcpplus-conf-privilege-section.h" #include "ipmi-config-category-core-serial-channel-section.h" #include "ipmi-config-category-core-serial-conf-section.h" #include "ipmi-config-category-core-sol-conf-section.h" #include "ipmi-config-category-core-user-sections.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t _get_number_of_users (ipmi_config_state_data_t *state_data, uint8_t *number_of_users) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint64_t val; uint8_t lan_channel_number; assert (state_data); assert (number_of_users); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* for the time being, we assume equal users per channel, so NULL for section_name */ if ((ret = get_lan_channel_number (state_data, NULL, &lan_channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_user_access (state_data->ipmi_ctx, lan_channel_number, 1, /* user_id number */ obj_cmd_rs) < 0) { if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "max_channel_user_ids", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*number_of_users) = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_sections_create (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *sections = NULL; struct ipmi_config_section *section = NULL; uint8_t number_of_users; unsigned int userindex; int channelindex; assert (state_data); if (load_lan_channel_numbers (state_data) == IPMI_CONFIG_ERR_FATAL_ERROR) return (NULL); if (load_serial_channel_numbers (state_data) == IPMI_CONFIG_ERR_FATAL_ERROR) return (NULL); if (load_sol_channel_numbers (state_data) == IPMI_CONFIG_ERR_FATAL_ERROR) return (NULL); if (_get_number_of_users (state_data, &number_of_users) != IPMI_CONFIG_ERR_SUCCESS) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get Number of Users\n"); return (NULL); } if (state_data->prog_data->args->verbose_count && state_data->lan_channel_numbers_count > 1) { state_data->lan_base_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; state_data->lan_channel_config_flags = 0; } else { state_data->lan_base_config_flags = 0; state_data->lan_channel_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; } if (state_data->prog_data->args->verbose_count && state_data->serial_channel_numbers_count > 1) { state_data->serial_base_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; state_data->serial_channel_config_flags = 0; } else { state_data->serial_base_config_flags = 0; state_data->serial_channel_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; } if (state_data->prog_data->args->verbose_count && state_data->sol_channel_numbers_unique_count > 1) { state_data->sol_base_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; state_data->sol_channel_config_flags = 0; } else { state_data->sol_base_config_flags = 0; state_data->sol_channel_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; } /* User Section(s) */ for (userindex = 0; userindex < number_of_users; userindex++) { if (!(section = ipmi_config_core_user_section_get (state_data, userindex + 1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } /* Lan_Channel Section(s) */ if (!(section = ipmi_config_core_lan_channel_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_channel_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Lan_Conf Section(s) */ if (!(section = ipmi_config_core_lan_conf_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_conf_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } #if 0 /* Lan6_Conf Section(s) */ if (!(section = ipmi_config_core_lan6_conf_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan6_conf_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } #endif /* Lan_Conf_Auth Section(s) */ if (!(section = ipmi_config_core_lan_conf_auth_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_conf_auth_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Lan_Conf_Security_Keys Section(s) */ if (!(section = ipmi_config_core_lan_conf_security_keys_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_conf_security_keys_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Lan_Conf_User_Security Section(s) */ if (!(section = ipmi_config_core_lan_conf_user_security_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_conf_user_security_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Lan_Conf_Misc Section(s) */ if (!(section = ipmi_config_core_lan_conf_misc_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_lan_conf_misc_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Rmcpplus_Conf_Privilege Section(s) */ if (!(section = ipmi_config_core_rmcpplus_conf_privilege_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_rmcpplus_conf_privilege_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Serial_Channel Section(s) */ if (!(section = ipmi_config_core_serial_channel_section_get (state_data, state_data->serial_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->serial_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->serial_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_serial_channel_section_get (state_data, state_data->serial_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Serial_Conf Section(s) */ if (!(section = ipmi_config_core_serial_conf_section_get (state_data, state_data->serial_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->serial_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->serial_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_core_serial_conf_section_get (state_data, state_data->serial_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* PEF Conf Section */ if (!(section = ipmi_config_core_pef_conf_section_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; /* SOL_Conf Section(s) */ if (!(section = ipmi_config_core_sol_conf_section_get (state_data, state_data->sol_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->sol_channel_numbers_unique_count > 1) { for (channelindex = 0; channelindex < state_data->sol_channel_numbers_unique_count; channelindex++) { if (!(section = ipmi_config_core_sol_conf_section_get (state_data, state_data->sol_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Misc Section */ if (!(section = ipmi_config_core_misc_section_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; return (sections); cleanup: ipmi_config_sections_destroy (sections); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-sections.h0000644002055400205540000000171713527331635024431 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_SECTIONS_H #define IPMI_CONFIG_CATEGORY_CORE_SECTIONS_H #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_core_sections_create (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_CORE_SECTIONS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-serial-channel-section.c0000644002055400205540000000630413527331635027121 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-category-core-channel-common.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" struct ipmi_config_section * ipmi_config_core_serial_channel_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section * section = NULL; char *section_comment = "In the Serial_Channel section, IPMI over Serial communication can be " "enabled or disabled. " "In the below, \"Volatile\" configurations are immediately " "configured onto the BMC and will have immediate effect on the system. " "\"Non_Volatile\" configurations are only available after the next " "system reset. Generally, both the \"Volatile\" and \"Non_Volatile\" " "equivalent fields should be configured identically." "\n" "Most users will only be interested in IPMI over LAN, therefore serial " "communication can be disabled. This can be done by setting " "\"Access_Mode\" to \"Disabled\"."; char *section_name_base_str = "Serial_Channel"; assert (state_data); /* * achu: section not checked out by default. */ if (!state_data->prog_data->args->verbose_count) config_flags |= IPMI_CONFIG_DO_NOT_CHECKOUT; if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count))) goto cleanup; if (ipmi_config_core_channel_common_section_get (state_data, section) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-serial-channel-section.h0000644002055400205540000000230713527331635027125 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_SERIAL_CHANNEL_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_SERIAL_CHANNEL_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_serial_channel_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_SERIAL_CHANNEL_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-serial-conf-section.c0000644002055400205540000010763413527331635026446 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience structs */ struct connection_mode { uint8_t basic_mode; uint8_t ppp_mode; uint8_t terminal_mode; uint8_t connect_mode; }; struct ipmi_messaging_comm_settings { uint8_t dtr_hangup; uint8_t flow_control; uint8_t bit_rate; }; static ipmi_config_err_t _get_connection_mode (ipmi_config_state_data_t *state_data, const char *section_name, struct connection_mode *cm) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (cm); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_serial_modem_configuration_connection_mode_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_serial_modem_configuration_connection_mode (state_data->ipmi_ctx, channel_number, IPMI_GET_SERIAL_MODEM_PARAMETER, IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR, IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_serial_modem_configuration_connection_mode: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "basic_mode", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'basic_mode': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cm->basic_mode = val; if (FIID_OBJ_GET (obj_cmd_rs, "ppp_mode", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'ppp_mode': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cm->ppp_mode = val; if (FIID_OBJ_GET (obj_cmd_rs, "terminal_mode", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'terminal_mode': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cm->terminal_mode = val; if (FIID_OBJ_GET (obj_cmd_rs, "connect_mode", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'connect_mode': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cm->connect_mode = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_connection_mode (ipmi_config_state_data_t *state_data, const char *section_name, struct connection_mode *cm) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (cm); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_serial_modem_configuration_connection_mode (state_data->ipmi_ctx, channel_number, cm->basic_mode, cm->ppp_mode, cm->terminal_mode, cm->connect_mode, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_serial_modem_configuration_connection_mode: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t enable_basic_mode_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, cm.basic_mode ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_basic_mode_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cm.basic_mode = same (kv->value_input, "yes"); return (_set_connection_mode (state_data, section_name, &cm)); } static ipmi_config_err_t enable_ppp_mode_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, cm.ppp_mode ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_ppp_mode_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cm.ppp_mode = same (kv->value_input, "yes"); return (_set_connection_mode (state_data, section_name, &cm)); } static ipmi_config_err_t enable_terminal_mode_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, cm.terminal_mode ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_terminal_mode_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cm.terminal_mode = same (kv->value_input, "yes"); return (_set_connection_mode (state_data, section_name, &cm)); } static ipmi_config_err_t connect_mode_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, connect_mode_string (cm.connect_mode)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t connect_mode_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct connection_mode cm; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_connection_mode (state_data, section_name, &cm)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cm.connect_mode = connect_mode_number (kv->value_input); return (_set_connection_mode (state_data, section_name, &cm)); } static ipmi_config_err_t page_blackout_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t page_blackout_interval; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_serial_modem_configuration_page_blackout_interval_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_serial_modem_configuration_page_blackout_interval (state_data->ipmi_ctx, channel_number, IPMI_GET_SERIAL_MODEM_PARAMETER, IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR, IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_serial_modem_configuration_page_blackout_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "page_blackout_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'page_blackout_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } page_blackout_interval = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, page_blackout_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t page_blackout_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_serial_modem_configuration_page_blackout_interval (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_serial_modem_configuration_page_blackout_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t call_retry_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t call_retry_interval; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_serial_modem_configuration_call_retry_interval_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_serial_modem_configuration_call_retry_interval (state_data->ipmi_ctx, channel_number, IPMI_GET_SERIAL_MODEM_PARAMETER, IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR, IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_serial_modem_configuration_call_retry_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "call_retry_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'call_retry_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } call_retry_interval = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, call_retry_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t call_retry_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_serial_modem_configuration_call_retry_interval (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_serial_modem_configuration_call_retry_interval: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_ipmi_messaging_comm_settings (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_messaging_comm_settings *cs) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (cs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings (state_data->ipmi_ctx, channel_number, IPMI_GET_SERIAL_MODEM_PARAMETER, IPMI_SERIAL_MODEM_CONFIGURATION_NO_SET_SELECTOR, IPMI_SERIAL_MODEM_CONFIGURATION_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_serial_modem_configuration_ipmi_messaging_comm_settings: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "dtr_hangup", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dtr_hangup': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cs->dtr_hangup = val; if (FIID_OBJ_GET (obj_cmd_rs, "flow_control", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'flow_control': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cs->flow_control = val; if (FIID_OBJ_GET (obj_cmd_rs, "bit_rate", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bit_rate': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cs->bit_rate = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_ipmi_messaging_comm_settings (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_messaging_comm_settings *cs) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (cs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_serial_modem_configuration_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_serial_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings (state_data->ipmi_ctx, channel_number, cs->dtr_hangup, cs->flow_control, cs->bit_rate, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_serial_modem_configuration_ipmi_messaging_comm_settings: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t enable_dtr_hangup_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, cs.dtr_hangup ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_dtr_hangup_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cs.dtr_hangup = same (kv->value_input, "yes"); return (_set_ipmi_messaging_comm_settings (state_data, section_name, &cs)); } static ipmi_config_err_t flow_control_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, flow_control_string (cs.flow_control)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t flow_control_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cs.flow_control = flow_control_number (kv->value_input); return (_set_ipmi_messaging_comm_settings (state_data, section_name, &cs)); } static ipmi_config_err_t bit_rate_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, bit_rate_string (cs.bit_rate)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t bit_rate_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct ipmi_messaging_comm_settings cs; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_ipmi_messaging_comm_settings (state_data, section_name, &cs)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); cs.bit_rate = bit_rate_number (kv->value_input); return (_set_ipmi_messaging_comm_settings (state_data, section_name, &cs)); } struct ipmi_config_section * ipmi_config_core_serial_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_comment = "In the Serial_Conf section, typical serial communication configuration " "is setup. Most users will only be interested in IPMI over LAN, " "therefore this section can generally be ignored."; char *section_name_base_str = "Serial_Conf"; assert (state_data); /* * achu: section not checked out by default. */ if (!state_data->prog_data->args->verbose_count) config_flags |= IPMI_CONFIG_DO_NOT_CHECKOUT; if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Basic_Mode", "Possible values: Yes/No", 0, enable_basic_mode_checkout, enable_basic_mode_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PPP_Mode", "Possible values: Yes/No", 0, enable_ppp_mode_checkout, enable_ppp_mode_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Terminal_Mode", "Possible values: Yes/No", 0, enable_terminal_mode_checkout, enable_terminal_mode_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Connect_Mode", "Possible values: Modem_Connect/Direct_Connect", 0, connect_mode_checkout, connect_mode_commit, connect_mode_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Page_Blackout_Interval", "Give a valid number", 0, page_blackout_interval_checkout, page_blackout_interval_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Call_Retry_Interval", "Give a valid number", 0, call_retry_interval_checkout, call_retry_interval_commit, number_range_one_byte_validate) < 0) goto cleanup; /* achu: For backwards compatability to ipmi-config in 0.2.0 */ if (ipmi_config_section_add_key (state_data, section, "Call_Retry_Time", "Give a valid number", IPMI_CONFIG_DO_NOT_CHECKOUT, call_retry_interval_checkout, call_retry_interval_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_DTR_Hangup", "Possible values: Yes/No", 0, enable_dtr_hangup_checkout, enable_dtr_hangup_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Flow_Control", "Possible values: No_Flow_Control/RTS_CTS/XON_XOFF", 0, flow_control_checkout, flow_control_commit, flow_control_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Bit_Rate", "Possible values: 9600/19200/38400/57600/115200", 0, bit_rate_checkout, bit_rate_commit, bit_rate_number_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-serial-conf-section.h0000644002055400205540000000226513527331635026445 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_SERIAL_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_SERIAL_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_serial_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_SERIAL_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-sol-conf-section.c0000644002055400205540000014630513527331635025762 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience structs */ struct sol_authentication { uint8_t sol_privilege_level; uint8_t force_sol_payload_authentication; uint8_t force_sol_payload_encryption; }; struct interval_and_threshold { uint8_t character_accumulate_interval; uint8_t character_send_threshold; }; struct sol_retry { uint8_t retry_count; uint8_t retry_interval; }; static ipmi_config_err_t enable_sol_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_enable_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_enable (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_enable: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sol_enable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sol_enable': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, val ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t enable_sol_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_enable (state_data->ipmi_ctx, channel_number, same (kv->value_input, "yes"), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_enable: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_sol_sol_authentication (ipmi_config_state_data_t *state_data, const char *section_name, struct sol_authentication *sa) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (sa); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_authentication_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_authentication (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_authentication: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sol_privilege_level", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sol_privilege_level': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sa->sol_privilege_level = val; if (FIID_OBJ_GET (obj_cmd_rs, "force_sol_payload_authentication", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'force_sol_payload_authentication': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sa->force_sol_payload_authentication = val; if (FIID_OBJ_GET (obj_cmd_rs, "force_sol_payload_encryption", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'force_sol_payload_encryption': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sa->force_sol_payload_encryption = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_sol_sol_authentication (ipmi_config_state_data_t *state_data, const char *section_name, struct sol_authentication *sa) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (sa); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_authentication (state_data->ipmi_ctx, channel_number, sa->sol_privilege_level, sa->force_sol_payload_authentication, sa->force_sol_payload_encryption, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_authentication: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t sol_privilege_level_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, privilege_level_string (sa.sol_privilege_level)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t sol_privilege_level_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); sa.sol_privilege_level = privilege_level_number (kv->value_input); return (_set_sol_sol_authentication (state_data, section_name, &sa)); } static ipmi_config_err_t force_sol_payload_authentication_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, sa.force_sol_payload_authentication ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t force_sol_payload_authentication_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); sa.force_sol_payload_authentication = same (kv->value_input, "yes") ? 1 : 0; return (_set_sol_sol_authentication (state_data, section_name, &sa)); } static ipmi_config_err_t force_sol_payload_encryption_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, sa.force_sol_payload_encryption ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t force_sol_payload_encryption_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sol_authentication sa; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_authentication (state_data, section_name, &sa)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); sa.force_sol_payload_encryption = same (kv->value_input, "yes") ? 1 : 0; return (_set_sol_sol_authentication (state_data, section_name, &sa)); } static ipmi_config_err_t _get_sol_character_accumulate_interval_and_send_threshold (ipmi_config_state_data_t *state_data, const char *section_name, struct interval_and_threshold *it) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (it); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_character_accumulate_interval_and_send_threshold: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "character_accumulate_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'character_accumulate_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } it->character_accumulate_interval = val; if (FIID_OBJ_GET (obj_cmd_rs, "character_send_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'character_send_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } it->character_send_threshold = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_sol_character_accumulate_interval_and_send_threshold (ipmi_config_state_data_t *state_data, const char *section_name, struct interval_and_threshold *it) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (it); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold (state_data->ipmi_ctx, channel_number, it->character_accumulate_interval, it->character_send_threshold, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_character_accumulate_interval_and_send_threshold: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t character_accumulate_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct interval_and_threshold it; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, it.character_accumulate_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t character_accumulate_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct interval_and_threshold it; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); it.character_accumulate_interval = atoi (kv->value_input); return (_set_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)); } static ipmi_config_err_t character_send_threshold_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct interval_and_threshold it; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, it.character_send_threshold) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t character_send_threshold_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct interval_and_threshold it; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); it.character_send_threshold = atoi (kv->value_input); return (_set_sol_character_accumulate_interval_and_send_threshold (state_data, section_name, &it)); } static ipmi_config_err_t _get_sol_sol_retry (ipmi_config_state_data_t *state_data, const char *section_name, struct sol_retry *sr) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (sr); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_retry_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_retry (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_retry: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "retry_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'retry_count': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sr->retry_count = val; if (FIID_OBJ_GET (obj_cmd_rs, "retry_interval", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'retry_interval': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sr->retry_interval = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_sol_sol_retry (ipmi_config_state_data_t *state_data, const char *section_name, struct sol_retry *sr) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (sr); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_retry (state_data->ipmi_ctx, channel_number, sr->retry_count, sr->retry_interval, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_retry: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t sol_retry_count_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sol_retry sr; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_retry (state_data, section_name, &sr)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, sr.retry_count) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t sol_retry_count_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sol_retry sr; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_retry (state_data, section_name, &sr)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); sr.retry_count = atoi (kv->value_input); return (_set_sol_sol_retry (state_data, section_name, &sr)); } static ipmi_config_err_t sol_retry_interval_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sol_retry sr; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_retry (state_data, section_name, &sr)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, sr.retry_interval) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t sol_retry_interval_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sol_retry sr; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sol_sol_retry (state_data, section_name, &sr)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); sr.retry_interval = atoi (kv->value_input); return (_set_sol_sol_retry (state_data, section_name, &sr)); } static ipmi_config_err_t non_volatile_bit_rate_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t bit_rate; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_non_volatile_bit_rate: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "bit_rate", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bit_rate': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bit_rate = val; if (ipmi_config_section_update_keyvalue_output (state_data, kv, sol_bit_rate_string (bit_rate)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t non_volatile_bit_rate_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate (state_data->ipmi_ctx, channel_number, sol_bit_rate_number (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_non_volatile_bit_rate: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t volatile_bit_rate_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint8_t bit_rate; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_volatile_bit_rate: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "bit_rate", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bit_rate': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } bit_rate = val; if (ipmi_config_section_update_keyvalue_output (state_data, kv, sol_bit_rate_string (bit_rate)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t volatile_bit_rate_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate (state_data->ipmi_ctx, channel_number, sol_bit_rate_number (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_volatile_bit_rate: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t sol_payload_port_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; uint16_t port_number; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_payload_port_number_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_payload_port_number (state_data->ipmi_ctx, channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_payload_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "port_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'port_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } port_number = val; if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, port_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t sol_payload_port_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_sol_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_sol_configuration_parameters_sol_payload_port_number (state_data->ipmi_ctx, channel_number, atoi (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sol_configuration_parameters_sol_payload_port_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_core_sol_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section * section = NULL; char *section_comment = "If your system supports IPMI 2.0 and Serial-over-LAN (SOL), the " "following configuration options will allow SOL configuration." "\n" "For most users that want to enable SOL, minimally \"Enable_SOL\" " "should be set to \"Yes\" and \"SOL_Privilege_Level\" should be set to " "the highest privilege level any username configured can authenticate " "with (typically \"Administrator\"). For security purposes, " "\"Force_SOL_Payload_Authentication\" and " "\"Force_SOL_Payload_Encryption\" should be set to \"Yes\", however " "forced authentication and/or encryption depends on the cipher suite " "IDs supported. The \"Non_Volatile_Bit_Rate\" " "and \"Volatile_Bit_Rate\" should both be set to the appropriate baud " "rate for your system. This is typically the same baud rate configured " "in the BIOS and/or operating system."; char *section_name_base_str = "SOL_Conf"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, section_comment, NULL, NULL, config_flags, channel_index, state_data->sol_channel_numbers_unique, state_data->sol_channel_numbers_unique_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_SOL", "Possible values: Yes/No", 0, enable_sol_checkout, enable_sol_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "SOL_Privilege_Level", "Possible values: Callback/User/Operator/Administrator/OEM_Proprietary", 0, sol_privilege_level_checkout, sol_privilege_level_commit, privilege_level_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Force_SOL_Payload_Authentication", "Possible values: Yes/No", 0, force_sol_payload_authentication_checkout, force_sol_payload_authentication_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Force_SOL_Payload_Encryption", "Possible values: Yes/No", 0, force_sol_payload_encryption_checkout, force_sol_payload_encryption_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Character_Accumulate_Interval", "Give a non-zero valid integer. Each unit is 5ms", 0, character_accumulate_interval_checkout, character_accumulate_interval_commit, number_range_one_byte_non_zero_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Character_Send_Threshold", "Give a valid number", 0, character_send_threshold_checkout, character_send_threshold_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "SOL_Retry_Count", "Give a valid integer", 0, sol_retry_count_checkout, sol_retry_count_commit, number_range_three_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "SOL_Retry_Interval", "Give a valid integer. Interval unit is 10ms", 0, sol_retry_interval_checkout, sol_retry_interval_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Non_Volatile_Bit_Rate", "Possible values: Serial/9600/19200/38400/57600/115200", 0, non_volatile_bit_rate_checkout, non_volatile_bit_rate_commit, sol_bit_rate_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Volatile_Bit_Rate", "Possible values: Serial/9600/19200/38400/57600/115200", 0, volatile_bit_rate_checkout, volatile_bit_rate_commit, sol_bit_rate_number_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "SOL_Payload_Port_Number", "Give a valid port number", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, sol_payload_port_checkout, sol_payload_port_commit, number_range_two_bytes_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-sol-conf-section.h0000644002055400205540000000224213527331635025756 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_SOL_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_CORE_SOL_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_sol_conf_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_CORE_SOL_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-user-sections.c0000644002055400205540000027662613527331635025415 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct user_access { uint8_t user_ipmi_messaging; uint8_t user_link_authentication; uint8_t user_restricted_to_callback; uint8_t privilege_limit; uint8_t session_limit; uint8_t user_id_enable_status; }; #define NODE_BUSY_RETRY_COUNT 10 static ipmi_config_err_t enable_user_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); static ipmi_config_err_t _channel_info (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, uint8_t *channel_number) { ipmi_config_err_t ret; char *ptr; assert (state_data); assert (section_name); assert (key_name); assert (channel_number); if ((ptr = stristr (key_name, "Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } if (stristr (key_name, "Lan") || stristr (key_name, "Enable_User") || stristr (key_name, "SOL")) { if ((ret = get_lan_channel_number (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } else { if ((ret = get_serial_channel_number (state_data, section_name, channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t _get_user_access (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, struct user_access *ua, unsigned int *username_not_set_yet) { uint8_t userid; uint8_t channel_number; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; int node_busy_retry_count = 0; assert (state_data); assert (section_name); assert (key_name); assert (ua); assert (!(*username_not_set_yet)); userid = atoi (section_name + strlen ("User")); if ((ret = _channel_info (state_data, section_name, key_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* * IPMI Workaround (achu) * * Quanta S99Q/Dell FS12-TY * * After committing some key user information (most notably User, * Password, or Enable_User), BMC seems to do something internally * that takes awhile. Subsequent configuration related calls * timeout with IPMI_COMP_CODE_NODE_BUSY. The loop below is to * retry appropriately to limit failures. * * I will limit this code to the sections the specific IPMI calls * that have exhibited problems, rather than all user section calls. * The calls that have had problems are: * * ipmi_cmd_get_user_access (Lan_Enable_IPMI_Msgs) * * ipmi_cmd_set_user_password (Enable_User) */ while (node_busy_retry_count < NODE_BUSY_RETRY_COUNT) { if (ipmi_cmd_get_user_access (state_data->ipmi_ctx, channel_number, userid, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BMC_BUSY && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_NODE_BUSY) == 1)) { node_busy_retry_count++; if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); continue; } /* * IPMI Workaround (achu) * * Discovered on Sun X4140 * * Get Username and Get User Payload commands fail with CCh = * "Invalid data field in request" if a username was not set * previously. * * Although not seen on the Get User Access command, we're going * to assume it's possible on some other motherboards. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) (*username_not_set_yet) = 1; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } break; } if (node_busy_retry_count >= NODE_BUSY_RETRY_COUNT) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "user_ipmi_messaging", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_ipmi_messaging': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ua->user_ipmi_messaging = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_link_authentication", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_link_authentication': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ua->user_link_authentication = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_restricted_to_callback", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_restricted_to_callback': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ua->user_restricted_to_callback = val; if (FIID_OBJ_GET (obj_cmd_rs, "user_privilege_level_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_privilege_level_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ua->privilege_limit = val; /* XXX: no way to retrieve */ ua->session_limit = 0; if (FIID_OBJ_GET (obj_cmd_rs, "user_id_enable_status", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'user_id_enable_status': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ua->user_id_enable_status = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_user_access (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, struct user_access *ua, uint8_t *comp_code) { uint8_t userid; uint8_t channel_number; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; struct ipmi_config_section *section; struct ipmi_config_keyvalue *kvtmp; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (key_name); assert (ua); /* comp_code not necessary for all functions */ userid = atoi (section_name + strlen ("User")); if ((ret = _channel_info (state_data, section_name, key_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* achu: special case, because the session limit cannot be * retrieved. So if we're committing, we have to get the session * limit value and commit it each time. */ if ((section = ipmi_config_find_section (state_data, section_name))) { char keynametmp[IPMI_CONFIG_MAX_KEY_NAME_LEN + 1]; int channel_flag = 0; int lan_flag = 0; memset (keynametmp, '\0', IPMI_CONFIG_MAX_KEY_NAME_LEN + 1); if (stristr (key_name, "Channel_")) channel_flag++; if (stristr (key_name, "Lan")) lan_flag++; if (channel_flag) snprintf (keynametmp, IPMI_CONFIG_MAX_KEY_NAME_LEN, "%s_Session_Limit_Channel_%u", (lan_flag) ? "Lan" : "Serial", channel_number); else snprintf (keynametmp, IPMI_CONFIG_MAX_KEY_NAME_LEN, "%s_Session_Limit", (lan_flag) ? "Lan" : "Serial"); if ((kvtmp = ipmi_config_find_keyvalue (section, keynametmp))) ua->session_limit = atoi (kvtmp->value_input); } else { /* This is a fatal error, we're already in this section, * it should be findable */ pstdout_fprintf (state_data->pstate, stderr, "Cannot find section '%s'\n", section_name); goto cleanup; } if (ipmi_cmd_set_user_access (state_data->ipmi_ctx, channel_number, ua->user_ipmi_messaging, ua->user_link_authentication, ua->user_restricted_to_callback, IPMI_CHANGE_BITS_YES, userid, ua->privilege_limit, ua->session_limit, obj_cmd_rs) < 0) { /* IPMI Workaround * * Supermicro X10DDW-i * * The motherboard contains an illegal starting privilege limit, * leading to an input error on this function. Grab it and try * again. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_PARAMETERS) { if ((kvtmp = ipmi_config_find_keyvalue (section, "Lan_Privilege_Limit"))) ua->privilege_limit = get_privilege_limit_number (kvtmp->value_input); if (!(ipmi_cmd_set_user_access (state_data->ipmi_ctx, channel_number, ua->user_ipmi_messaging, ua->user_link_authentication, ua->user_restricted_to_callback, IPMI_CHANGE_BITS_YES, userid, ua->privilege_limit, ua->session_limit, obj_cmd_rs) < 0)) goto out; } if (comp_code) { (*comp_code) = 0; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'comp_code': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*comp_code) = val; } if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t username_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t userid; /* achu: *2 b/c of IPMI_CONFIG_USERNAME_NOT_SET_YET_STR length */ char username[IPMI_MAX_USER_NAME_LENGTH*2+1]; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_name_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* achu: *2 b/c of IPMI_CONFIG_USERNAME_NOT_SET_YET_STR */ memset (username, '\0', IPMI_MAX_USER_NAME_LENGTH*2+1); if (ipmi_cmd_get_user_name (state_data->ipmi_ctx, userid, obj_cmd_rs) < 0) { ipmi_config_err_t ret; /* * IPMI Workaround (achu) * * Discovered on Sun X4140, Inventec 5441/Dell Xanadu II, * Inventec 5442/Dell Xanadu III, Intel S5500WBV/Penguin Relion * 700 * * Get Username and Get User Payload commands fail with CCh = * "Invalid data field in request" if a username was not set * previously. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { strcpy (username, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR); if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_name: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto got_data; } if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_name: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* achu: check user_id == 1 after ipmi call to ensure the command can succeed */ if (userid == 1) strcpy (username, "NULL"); else { if (fiid_obj_get_data (obj_cmd_rs, "user_name", username, IPMI_MAX_USER_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'user_name': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } } got_data: /* for backwards compatability with older ipmi-configs */ if (state_data->prog_data->args->action == IPMI_CONFIG_ACTION_DIFF && userid == 1 && same (kv->value_input, "anonymous")) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "anonymous") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else { if (ipmi_config_section_update_keyvalue_output (state_data, kv, username) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t username_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; fiid_obj_t obj_get_user_name_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); /* can't change userid 1 */ if (userid == 1) { /* anonymous for backwards compatability */ if (same (kv->value_input, "NULL") || same (kv->value_input, "anonymous")) return (IPMI_CONFIG_ERR_SUCCESS); else return (IPMI_CONFIG_ERR_NON_FATAL_ERROR_READ_ONLY); } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_name_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_user_name (state_data->ipmi_ctx, userid, kv->value_input, strlen (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; /* * IPMI Workaround (achu) * * Discovered on Intel S5500WBV/Penguin Relion 700 * * Set username command does not allow duplicate usernames to be * committed. * * If configured username identical to inputted one, don't * output error. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { char username[IPMI_MAX_USER_NAME_LENGTH+1]; memset (username, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (!(obj_get_user_name_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_name_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_user_name (state_data->ipmi_ctx, userid, obj_get_user_name_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_name: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto error_out; } if (fiid_obj_get_data (obj_get_user_name_cmd_rs, "user_name", username, IPMI_MAX_USER_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'user_name': %s\n", fiid_obj_errormsg (obj_get_user_name_cmd_rs)); goto cleanup; } if (!strcmp(username, kv->value_input)) goto out; } error_out: if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_name: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); fiid_obj_destroy (obj_get_user_name_cmd_rs); return (rv); } static ipmi_config_validate_t username_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { uint8_t userid; assert (state_data); assert (section_name); assert (key_name); assert (value); userid = atoi (section_name + strlen ("User")); if (userid == 1) { if (!value || same (value, "null") || same (value, "anonymous")) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); else return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } if (!value || strlen (value) > IPMI_MAX_USER_NAME_LENGTH) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } static ipmi_config_err_t _check_bmc_user_password (ipmi_config_state_data_t *state_data, uint8_t userid, char *password, uint8_t password_size, int *is_same) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (password); assert (password_size == IPMI_PASSWORD_SIZE_16_BYTES || password_size == IPMI_PASSWORD_SIZE_20_BYTES); assert (is_same); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_password_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_user_password (state_data->ipmi_ctx, userid, password_size, IPMI_PASSWORD_OPERATION_TEST_PASSWORD, password, strlen (password), obj_cmd_rs) < 0) { uint8_t comp_code; uint64_t val; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'comp_code': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } comp_code = val; if (comp_code == IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_CORRECT || comp_code == IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT) { *is_same = 0; goto done; } else { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } else *is_same = 1; done: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t password_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { char *str = ""; assert (state_data); assert (section_name); assert (kv); if (state_data->prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) { uint8_t userid; int is_same; ipmi_config_err_t ret; userid = atoi (section_name + strlen ("User")); /* special case for diff, since we can't get the password, and * return it, we'll check to see if the password is the same. * If it is, return the inputted password back for proper * diffing. */ /* Password length validated before the diff */ if (strlen (kv->value_input) > IPMI_1_5_MAX_PASSWORD_LENGTH) { if ((ret = _check_bmc_user_password (state_data, userid, kv->value_input, IPMI_PASSWORD_SIZE_20_BYTES, &is_same)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } else { if ((ret = _check_bmc_user_password (state_data, userid, kv->value_input, IPMI_PASSWORD_SIZE_16_BYTES, &is_same)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); } if (is_same) str = kv->value_input; else str = ""; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t password_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_password_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* Password length validated before the commit */ if (strlen (kv->value_input) > IPMI_1_5_MAX_PASSWORD_LENGTH) { if (ipmi_cmd_set_user_password (state_data->ipmi_ctx, userid, IPMI_PASSWORD_SIZE_20_BYTES, IPMI_PASSWORD_OPERATION_SET_PASSWORD, kv->value_input, strlen (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } else { if (ipmi_cmd_set_user_password (state_data->ipmi_ctx, userid, IPMI_PASSWORD_SIZE_16_BYTES, IPMI_PASSWORD_OPERATION_SET_PASSWORD, kv->value_input, strlen (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } if (state_data->enable_user_after_password_len && state_data->enable_user_after_password[userid-1].enable_user_failed) { ipmi_config_err_t ret; /* ignore non-fatal error, consider success */ ret = enable_user_commit (state_data, section_name, state_data->enable_user_after_password[userid-1].kv); if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) { rv = IPMI_CONFIG_ERR_FATAL_ERROR; goto cleanup; } if (ret == IPMI_CONFIG_ERR_SUCCESS) { /* now it has passed, reset to 0 just in case */ state_data->enable_user_after_password[userid-1].enable_user_failed = 0; pstdout_fprintf (state_data->pstate, stderr, "RETRY: Success on retry to commit `%s:%s'\n", section_name, state_data->enable_user_after_password[userid-1].kv->key->key_name); } } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t password_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (strlen (value) > IPMI_2_0_MAX_PASSWORD_LENGTH) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); if (strlen (value) > IPMI_1_5_MAX_PASSWORD_LENGTH) { uint8_t userid; ipmi_config_err_t ret; int is_same; userid = atoi (section_name + strlen ("User")); /* if _check_bmc_user_password() fails, that means IPMI 2.0 * isn't supported, so this password is too long */ if ((ret = _check_bmc_user_password (state_data, userid, "foobar", IPMI_PASSWORD_SIZE_20_BYTES, &is_same)) != IPMI_CONFIG_ERR_SUCCESS) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } if (strlen (value) <= IPMI_1_5_MAX_PASSWORD_LENGTH) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t password20_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { uint8_t userid; char *str = ""; ipmi_config_err_t ret; int is_same; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); /* * IPMI Workaround (achu) * * On some early Supermicro H8QME motherboards, if the username was * not yet set, a password test will automatically fail with 0xff = * "Unspecified Error". * * I don't feel I can work around this issue because 0xff is a * "really bad" error code. Had to rely on the vendor to fix this * problem. */ /* achu: password can't be checked out, but we should make sure IPMI * 2.0 exists on the system. */ if ((ret = _check_bmc_user_password (state_data, userid, "foobar", IPMI_PASSWORD_SIZE_20_BYTES, &is_same)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (state_data->prog_data->args->action == IPMI_CONFIG_ACTION_DIFF) { /* special case for diff, since we can't get the password, and * return it, we'll check to see if the password is the same. * If it is, return the inputted password back for proper * diffing. */ if ((ret = _check_bmc_user_password (state_data, userid, kv->value_input, IPMI_PASSWORD_SIZE_20_BYTES, &is_same)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (is_same) str = kv->value_input; else str = ""; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t password20_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_password_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_user_password (state_data->ipmi_ctx, userid, IPMI_PASSWORD_SIZE_20_BYTES, IPMI_PASSWORD_OPERATION_SET_PASSWORD, kv->value_input, strlen (kv->value_input), obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t password20_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (strlen (value) <= IPMI_2_0_MAX_PASSWORD_LENGTH) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } static ipmi_config_err_t enable_user_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) ua.user_id_enable_status = IPMI_USER_ID_ENABLE_STATUS_UNSPECIFIED; else return (ret); } /* * Older IPMI implementations cannot get the value, but new ones * can. If it cannot be checked out, the line will be commented out * later on. */ if (ua.user_id_enable_status == IPMI_USER_ID_ENABLE_STATUS_ENABLED) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "Yes") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else if (ua.user_id_enable_status == IPMI_USER_ID_ENABLE_STATUS_DISABLED) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else /* ua.user_id_enable_status == IPMI_USER_ID_ENABLE_STATUS_UNSPECIFIED */ { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_user_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rq = NULL; fiid_obj_t obj_cmd_rs = NULL; char password[IPMI_1_5_MAX_PASSWORD_LENGTH]; uint8_t user_status; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; int node_busy_retry_count = 0; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_password_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (same (kv->value_input, "yes")) user_status = IPMI_PASSWORD_OPERATION_ENABLE_USER; else user_status = IPMI_PASSWORD_OPERATION_DISABLE_USER; /* * IPMI Workaround (achu) * * Quanta S99Q/Dell FS12-TY * * After committing some key user information (most notably User, * Password, or Enable_User), BMC seems to do something internally * that takes awhile. Subsequent configuration related calls * timeout with IPMI_COMP_CODE_NODE_BUSY. The loop below is to * retry appropriately to limit failures. * * I will limit this code to the sections the specific IPMI calls * that have exhibited problems, rather than all user section calls. * The calls that have had problems are: * * ipmi_cmd_get_user_access (Lan_Enable_IPMI_Msgs) * * ipmi_cmd_set_user_password (Enable_User) */ while (node_busy_retry_count < NODE_BUSY_RETRY_COUNT) { memset (password, 0, IPMI_1_5_MAX_PASSWORD_LENGTH); if (ipmi_cmd_set_user_password (state_data->ipmi_ctx, userid, IPMI_PASSWORD_SIZE_16_BYTES, user_status, password, 0, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BMC_BUSY && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_NODE_BUSY) == 1)) { node_busy_retry_count++; if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); continue; } /* * IPMI Workaround * * Forgotten/Undocumented Motherboard * Sun X4140 * Intel Windmill/Quanta Winterfell/Wiwynn Windmill * * The IPMI spec says you don't have to set a password when you * enable/disable a user. But some BMCs care that you pass in * some random password length (even though the password will be * ignored) */ if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_DATA_LENGTH_INVALID) == 1)) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_USER_PASSWORD_COMMAND_PASSWORD_TEST_FAILED_PASSWORD_SIZE_INCORRECT)))) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: attempting workaround\n"); if (!(obj_cmd_rq = fiid_obj_create (tmpl_cmd_set_user_password_rq))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (fill_cmd_set_user_password (userid, IPMI_PASSWORD_SIZE_16_BYTES, user_status, password, 0, obj_cmd_rq) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fill_cmd_set_user_password: %s\n", strerror (errno)); goto cleanup; } /* Force the password to be filled in with a length */ if (fiid_obj_set_data (obj_cmd_rq, "password", password, IPMI_1_5_MAX_PASSWORD_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set_data: 'password': %s\n", fiid_obj_errormsg (obj_cmd_rq)); goto cleanup; } if (ipmi_cmd (state_data->ipmi_ctx, IPMI_BMC_IPMB_LUN_BMC, IPMI_NET_FN_APP_RQ, obj_cmd_rq, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_check_completion_code_success (obj_cmd_rs) != 1) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } /* * IPMI Workaround * * Dell Poweredge R610 * Dell Poweredge R710 * * Dell says this can only go after a set password command, and * you configure a non-null password. Save info to possibly * retry the enable_user after a password is set (if it is done * after the Enable_User config. */ else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1)) { if (state_data->enable_user_after_password_len) { state_data->enable_user_after_password[userid-1].enable_user_failed = 1; state_data->enable_user_after_password[userid-1].kv = (struct ipmi_config_keyvalue *)kv; } if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; goto cleanup; } else { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_password: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } break; } if (node_busy_retry_count >= NODE_BUSY_RETRY_COUNT) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rq); fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t lan_enable_ipmi_messaging_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_ipmi_messaging ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lan_enable_ipmi_messaging_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_ipmi_messaging = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t lan_enable_link_auth_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_link_authentication ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lan_enable_link_auth_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_link_authentication = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t lan_enable_restricted_to_callback_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_restricted_to_callback ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lan_enable_restricted_to_callback_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_restricted_to_callback = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t lan_privilege_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_privilege_limit_string (ua.privilege_limit)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lan_privilege_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.privilege_limit = get_privilege_limit_number (kv->value_input); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t lan_session_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { assert (state_data); assert (section_name); assert (kv); /* Special case: There is no way to check out this value */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, "") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t lan_session_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* Session limit field will be grabbed/set in _set_user_access */ return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t sol_payload_access_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if ((ret = _channel_info (state_data, section_name, kv->key->key_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_payload_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_user_payload_access (state_data->ipmi_ctx, channel_number, userid, obj_cmd_rs) < 0) { /* * IPMI Workaround (achu) * * Discovered on Sun X4140 * * Get Username and Get User Payload commands fail with CCh = * "Invalid data field in request" if a username was not set * previously. * * Although not seen on the Get User Access command, we're going * to assume it's possible on some other motherboards. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); goto out; } if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_payload_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* standard_payload_1 is the SOL payload type */ if (FIID_OBJ_GET (obj_cmd_rs, "standard_payload_1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'standard_payload_1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, val ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t sol_payload_access_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t userid; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t operation; assert (state_data); assert (section_name); assert (kv); userid = atoi (section_name + strlen ("User")); if ((ret = _channel_info (state_data, section_name, kv->key->key_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_user_payload_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (same (kv->value_input, "yes")) operation = IPMI_SET_USER_PAYLOAD_OPERATION_ENABLE; else operation = IPMI_SET_USER_PAYLOAD_OPERATION_DISABLE; if (ipmi_cmd_set_user_payload_access (state_data->ipmi_ctx, channel_number, userid, operation, 1, /* the sol payload */ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_user_payload_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t serial_enable_ipmi_messaging_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_ipmi_messaging ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t serial_enable_ipmi_messaging_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_ipmi_messaging = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t serial_enable_link_auth_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_link_authentication ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t serial_enable_link_auth_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_link_authentication = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t serial_enable_restricted_to_callback_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ua.user_restricted_to_callback ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t serial_enable_restricted_to_callback_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.user_restricted_to_callback = same (kv->value_input, "yes"); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t serial_privilege_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) { if (username_not_set_yet) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } else return (ret); } if (ipmi_config_section_update_keyvalue_output (state_data, kv, get_privilege_limit_string (ua.privilege_limit)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t serial_privilege_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ua.privilege_limit = get_privilege_limit_number (kv->value_input); return (_set_user_access (state_data, section_name, kv->key->key_name, &ua, NULL)); } static ipmi_config_err_t serial_session_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { assert (state_data); assert (section_name); assert (kv); /* Special case: There is no way to check out this value */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, "") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t serial_session_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct user_access ua; unsigned int username_not_set_yet = 0; ipmi_config_err_t ret; uint8_t comp_code = 0; assert (state_data); assert (section_name); assert (kv); /* ignore username_not_set_yet return value, if username_not_set_yet * conditions arise, we should get an error appriately (b/c the user * needs to configure the username first) */ if ((ret = _get_user_access (state_data, section_name, kv->key->key_name, &ua, &username_not_set_yet)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* Session limit field will be grabbed/set in _set_user_access */ /* IPMI_COMP_CODE_REQUEST_INVALID_DATA_FIELD is special case for * this field, see IPMI spec. "Return CCh 'invalid data field' * error completion code if an attempt is made to set this bit, but * the option is not supported." */ if ((ret = _set_user_access (state_data, section_name, kv->key->key_name, &ua, &comp_code)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG && comp_code == IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED; return (ret); } return (IPMI_CONFIG_ERR_SUCCESS); } struct ipmi_config_section * ipmi_config_core_user_section_get (ipmi_config_state_data_t *state_data, unsigned int userid) { struct ipmi_config_section *section = NULL; char section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; char *section_comment_text = "In the following User sections, users should configure usernames, " "passwords, and access rights for IPMI over LAN communication. " "Usernames can be set to any string with the exception of User1, which " "is a fixed to the \"anonymous\" username in IPMI." "\n" "For IPMI over LAN access for a username, set \"Enable_User\" to " "\"Yes\", \"Lan_Enable_IPMI_Msgs\" to \"Yes\", " "and \"Lan_Privilege_Limit\" to a privilege level. The " "privilege level is used to limit various IPMI operations for " "individual usernames. It is recommened that atleast one username be " "created with a privilege limit \"Administrator\", so all system " "functions are available to atleast one username via IPMI over LAN. " "For security reasons, we recommend not enabling the \"anonymous\" " "User1. For most users, \"Lan_Session_Limit\" can be set to 0 " "(or ignored) to support an unlimited number of simultaneous " "IPMI over LAN sessions. " "\n" "If your system supports IPMI 2.0 and Serial-over-LAN (SOL), a" "\"SOL_Payload_Access\" field may be listed below. " "Set the \"SOL_Payload_Access\" field to \"Yes\" or \"No\" to enable or disable " "this username's ability to access SOL." "\n" "Please do not forget to uncomment those fields, such as \"Password\", " "that may be commented out during the checkout." "\n" "Some motherboards may require a \"Username\" to be configured prior to other " "fields being read/written. If this is the case, those fields will be set to " "%s."; char section_comment[4096]; unsigned int serial_config_flags = 0; unsigned int config_flags; int index_max; int i; assert (state_data); assert (userid); snprintf (section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "User%u", userid); if (userid == 1) { snprintf (section_comment, 4096, section_comment_text, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR); if (!(section = ipmi_config_section_create (state_data, section_name, "UserX", section_comment, 0, NULL, NULL))) goto cleanup; } else { if (!(section = ipmi_config_section_create (state_data, section_name, NULL, NULL, 0, NULL, NULL))) goto cleanup; } /* serial not checked out by default */ if (!state_data->prog_data->args->verbose_count) serial_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; /* userid 1 is the NULL username, so comment it out by default */ if (ipmi_config_section_add_key (state_data, section, "Username", "Give Username", (userid == 1) ? (IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT | IPMI_CONFIG_READABLE_ONLY) : IPMI_CONFIG_USERNAME_NOT_SET_YET, username_checkout, username_commit, username_validate) < 0) goto cleanup; /* config Password before Enable_User, to remove the off-chance a * user is configured "on" before a password is set, allowing a null * connection to be established. */ if (ipmi_config_section_add_key (state_data, section, "Password", "Give password or blank to clear. MAX 16 chars (20 chars if IPMI 2.0 supported).", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, password_checkout, password_commit, password_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_User", "Possible values: Yes/No or blank to not set", IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY, enable_user_checkout, enable_user_commit, yes_no_validate) < 0) goto cleanup; /* achu: For backwards compatability to earlier ipmi-config, now "absorbed" into Password */ if (ipmi_config_section_add_key (state_data, section, "Password20", "Give password for IPMI 2.0 or blank to clear. MAX 20 chars.", IPMI_CONFIG_DO_NOT_CHECKOUT | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT, password20_checkout, password20_commit, password20_validate) < 0) goto cleanup; /* b/c loop goes from -1 and up, need to make unsigned int an int * * even if count is 0, make sure to go through loop atleast once, so * fields can fail appropriately for end user on operation * (e.g. checkout). */ if (state_data->lan_channel_numbers_count > 1) index_max = state_data->lan_channel_numbers_count; else index_max = 0; for (i = -1; i < index_max; i++) { if (i < 0) config_flags = state_data->lan_base_config_flags; else config_flags = state_data->lan_channel_config_flags; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Enable_IPMI_Msgs", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_enable_ipmi_messaging_checkout, lan_enable_ipmi_messaging_commit, yes_no_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Enable_Link_Auth", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_enable_link_auth_checkout, lan_enable_link_auth_commit, yes_no_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Enable_Restricted_to_Callback", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_enable_restricted_to_callback_checkout, lan_enable_restricted_to_callback_commit, yes_no_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; /* achu: For backwards compatability to ipmi-config in 0.2.0 */ if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Enable_Restrict_to_Callback", "Possible values: Yes/No", config_flags | IPMI_CONFIG_DO_NOT_CHECKOUT | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_enable_restricted_to_callback_checkout, lan_enable_restricted_to_callback_commit, yes_no_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Privilege_Limit", "Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_privilege_limit_checkout, lan_privilege_limit_commit, get_privilege_limit_number_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Lan_Session_Limit", "Possible values: 0-17, 0 is unlimited; May be reset to 0 if not specified", config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY | IPMI_CONFIG_USERNAME_NOT_SET_YET, lan_session_limit_checkout, lan_session_limit_commit, number_range_four_bits_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "SOL_Payload_Access", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, sol_payload_access_checkout, sol_payload_access_commit, yes_no_validate, i, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count) < 0) goto cleanup; } /* b/c loop goes from -1 and up, need to make unsigned int an int * * even if count is 0, make sure to go through loop atleast once, so * fields can fail appropriately for end user on operation * (e.g. checkout). */ if (state_data->serial_channel_numbers_count > 1) index_max = state_data->serial_channel_numbers_count; else index_max = 0; for (i = -1; i < index_max; i++) { if (i < 0) config_flags = serial_config_flags | state_data->serial_base_config_flags; else config_flags = serial_config_flags | state_data->serial_channel_config_flags; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Enable_IPMI_Msgs", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_enable_ipmi_messaging_checkout, serial_enable_ipmi_messaging_commit, yes_no_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Enable_Link_Auth", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_enable_link_auth_checkout, serial_enable_link_auth_commit, yes_no_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Enable_Restricted_to_Callback", "Possible values: Yes/No", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_enable_restricted_to_callback_checkout, serial_enable_restricted_to_callback_commit, yes_no_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; /* achu: For backwards compatability to ipmi-config in 0.2.0 */ if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Enable_Restrict_to_Callback", "Possible values: Yes/No", config_flags | IPMI_CONFIG_DO_NOT_CHECKOUT | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_enable_restricted_to_callback_checkout, serial_enable_restricted_to_callback_commit, yes_no_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Privilege_Limit", "Possible values: Callback/User/Operator/Administrator/OEM_Proprietary/No_Access", config_flags | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_privilege_limit_checkout, serial_privilege_limit_commit, get_privilege_limit_number_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; if (ipmi_config_section_multi_channel_add_key (state_data, section, "Serial_Session_Limit", "Possible values: 0-17, 0 is unlimited; May be reset to 0 if not specified", config_flags | IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY | IPMI_CONFIG_USERNAME_NOT_SET_YET, serial_session_limit_checkout, serial_session_limit_commit, number_range_one_byte_validate, i, state_data->serial_channel_numbers, state_data->serial_channel_numbers_count) < 0) goto cleanup; } return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-core-user-sections.h0000644002055400205540000000176513527331635025410 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_CORE_USER_SECTIONS_H #define IPMI_CONFIG_CATEGORY_CORE_USER_SECTIONS_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_core_user_section_get (ipmi_config_state_data_t *state_data, unsigned int userid); #endif /* IPMI_CONFIG_CATEGORY_CORE_USER_SECTIONS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-dcmi-dcmi-conf-section.c0000644002055400205540000012216213527331635026060 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* Convenience struct */ struct get_power_limit_data { uint8_t exception_actions; uint16_t power_limit_requested; uint32_t correction_time_limit; uint16_t management_application_statistics_sampling_period; }; static ipmi_config_err_t asset_tag_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char asset_tag_data[IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1]; int data_len; unsigned int offset = 0; uint8_t total_asset_tag_length = 0; uint8_t bytes_to_read = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_asset_tag_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } memset (asset_tag_data, '\0', IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1); while (1) { uint64_t val; if (!offset || ((total_asset_tag_length - offset) >= IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX)) bytes_to_read = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX; else bytes_to_read = total_asset_tag_length - offset; if (ipmi_cmd_dcmi_get_asset_tag (state_data->ipmi_ctx, offset, bytes_to_read, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_asset_tag: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_asset_tag_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_asset_tag_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } total_asset_tag_length = val; if (!total_asset_tag_length) break; if ((data_len = fiid_obj_get_data (obj_cmd_rs, "data", asset_tag_data + offset, IPMI_DCMI_MAX_ASSET_TAG_LENGTH - offset)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } offset += data_len; if (offset >= total_asset_tag_length) break; } /* Handle special case UTF-8 encoding w/ BOM prefix */ if (asset_tag_data[0] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE0 && asset_tag_data[1] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE1 && asset_tag_data[2] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE2) { /* achu: I think this is right for UTF-8 in libc and is * portable, but I would bet some systems won't like this. */ if (ipmi_config_section_update_keyvalue_output (state_data, kv, &asset_tag_data[3]) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else { if (ipmi_config_section_update_keyvalue_output (state_data, kv, asset_tag_data) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t asset_tag_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; unsigned int offset = 0; char data_buf[IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1]; unsigned int data_len; uint8_t bytes_to_write = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* achu: * * DCMI v1.1 spec is unclear if the entire buffer needs to be * written or just the amount you desire. * * DCMI v1.5 spec strongly suggests you don't write the entire * buffer due to the results of the "total_asset_tag_length_written" * field. * * "Total Asset Tag Length. This is the length in bytes of the stored * Asset Tag after the Set operation has completed. The Asset Tag * length shall be set to the sum of the offset to write plus bytes * to write. For example, if offset to write is 32 and bytes to * write is 4, the Total Asset Tag Length returned will be 36." */ data_len = strlen (kv->value_input); /* Write empty buffer */ if (!data_len) data_len = IPMI_DCMI_MAX_ASSET_TAG_LENGTH; memset (data_buf, '\0', IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1); memcpy (data_buf, kv->value_input, strlen (kv->value_input)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_asset_tag_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (1) { uint64_t val; if ((data_len - offset) >= IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX) bytes_to_write = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX; else bytes_to_write = data_len - offset; if (ipmi_cmd_dcmi_set_asset_tag (state_data->ipmi_ctx, offset, bytes_to_write, data_buf + offset, data_len, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_asset_tag: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_asset_tag_length_written", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_asset_tag_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* DCMI 1.1 spec is unclear on "total_length_written", is it the * number of bytes just written or total bytes written so far? * * DCMI 1.5 spec makes it clear that this is the number of bytes * written in total. To defend against vendor mistakes, we * handle both situations. */ if (val > bytes_to_write) offset += bytes_to_write; else offset += val; if (offset >= data_len) break; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t asset_tag_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (!value || strlen (value) > IPMI_DCMI_MAX_ASSET_TAG_LENGTH) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } static ipmi_config_err_t management_controller_identifier_string_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; char management_controller_identifier_string_data[IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1]; int data_len; unsigned int offset = 0; uint8_t total_length = 0; uint8_t bytes_to_read = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_management_controller_identifier_string_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } memset (management_controller_identifier_string_data, '\0', IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1); while (1) { uint64_t val; if (!offset || ((total_length - offset) >= IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX)) bytes_to_read = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX; else bytes_to_read = total_length - offset; if (ipmi_cmd_dcmi_get_management_controller_identifier_string (state_data->ipmi_ctx, offset, bytes_to_read, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_management_controller_identifier_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } total_length = val; if (!total_length) break; if ((data_len = fiid_obj_get_data (obj_cmd_rs, "data", management_controller_identifier_string_data + offset, IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH - offset)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } offset += data_len; if (offset >= total_length) break; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, management_controller_identifier_string_data) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t management_controller_identifier_string_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; unsigned int offset = 0; char data_buf[IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1]; unsigned int data_len; uint8_t bytes_to_write = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); /* achu: * * According to DCMI v1.5 draft * * "The presence of the null terminator among bytes to shall be * considered as indicating the last transfer of the Management * Controller Identifier string" * * So I am assuming we don't need to write the entire buffer. But * we must include the NUL byte at the end. */ /* +1 for NUL char */ data_len = strlen (kv->value_input) + 1; /* Write NUL char */ if (!data_len) data_len = 1; memset (data_buf, '\0', IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1); memcpy (data_buf, kv->value_input, strlen (kv->value_input)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_management_controller_identifier_string_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (1) { uint64_t val; if ((data_len - offset) >= IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX) bytes_to_write = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX; else bytes_to_write = data_len - offset; if (ipmi_cmd_dcmi_set_management_controller_identifier_string (state_data->ipmi_ctx, offset, bytes_to_write, data_buf + offset, data_len, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_management_controller_identifier_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_length_written", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_management_controller_identifier_string_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* DCMI 1.1 spec is unclear on "total_length_written", is it the * number of bytes just written or total bytes written so far? * * DCMI 1.5 spec makes it clear that this is the number of bytes * written in total. To defend against vendor mistakes, we * handle both situations. */ if (val > bytes_to_write) offset += bytes_to_write; else offset += val; if (offset >= data_len) break; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t management_controller_identifier_string_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); /* IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH includes NUL char, so subtract 1 in check */ if (!value || strlen (value) > (IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH - 1)) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } static ipmi_config_err_t _get_power_limit (ipmi_config_state_data_t *state_data, struct get_power_limit_data *gpld, int *no_set_power_limit_flag) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int no_set_power_limit_error_flag = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (gpld); if (no_set_power_limit_flag) (*no_set_power_limit_flag) = 0; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_power_limit_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } /* IPMI Workaround/Interpretation * * The DCMI spec indicates a potential completion code for the "Get * Power Limit" command as "No Set Power Limit" (0x80). FreeIPMI * originally interpreted this to mean the "Set Power Limit" command * was not available. Atleast one vendor interpreted this to mean * "No Power Limit Set". One can consider this an English * interpretation issue of 'No set POWER LIMIT' vs. 'No SET POWER * LIMIT' (i.e. is "set" a verb or part of a proper noun referencing * the DCMI command). Confounding this issue is the fact that the * example implementation in Intel's DCMItool implements the former, * while the DCMI Conformance test suite implements the latter. In * addition to this, with the latter interpretation, it need not be * an indication of an error, but rather a flag. So the rest of the * packet can be completely full of legitimate data. * * So how do we handle this? * * If we hit "No Set Power Limit", try to read data. If we can't * read data (b/c it's not set), fail out, but preserve the "No Set * Power Limit" error message. */ if (ipmi_cmd_dcmi_get_power_limit (state_data->ipmi_ctx, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT) == 1) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_power_limit: %s", IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT_STR); if (no_set_power_limit_flag) (*no_set_power_limit_flag) = 1; no_set_power_limit_error_flag++; goto read_data; } if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_event_filter_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } read_data: if (FIID_OBJ_GET (obj_cmd_rs, "exception_actions", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'exception_actions': %s", fiid_obj_errormsg (obj_cmd_rs)); if (no_set_power_limit_error_flag) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } gpld->exception_actions = val; if (FIID_OBJ_GET (obj_cmd_rs, "power_limit_requested", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_limit_requested': %s", fiid_obj_errormsg (obj_cmd_rs)); if (no_set_power_limit_error_flag) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } gpld->power_limit_requested = val; if (FIID_OBJ_GET (obj_cmd_rs, "correction_time_limit", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'correction_time_limit': %s", fiid_obj_errormsg (obj_cmd_rs)); if (no_set_power_limit_error_flag) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } gpld->correction_time_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "management_application_statistics_sampling_period", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'management_application_statistics_sampling_period': %s", fiid_obj_errormsg (obj_cmd_rs)); if (no_set_power_limit_error_flag) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } gpld->management_application_statistics_sampling_period = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_power_limit (ipmi_config_state_data_t *state_data, const char *section_name, struct get_power_limit_data *gpld, int no_set_power_limit_flag) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (gpld); /* IPMI Workaround/Interpretation * * The DCMI spec indicates a potential completion code for the * "Get Power Limit" command as "No Set Power Limit" (0x80). * FreeIPMI originally interpreted this to mean the "Set Power * Limit" command was not available. Atleast one vendor * interpreted this to mean "No Power Limit Set". One can * consider this an English interpretation issue of 'No set * POWER LIMIT' vs. 'No SET POWER LIMIT' (i.e. is "set" a verb * or part of a proper noun referencing the DCMI command). * Confounding this issue is the fact that the example * implementation in Intel's DCMItool implements the former, * while the DCMI Conformance test suite implements the latter. * In addition to this, with the latter interpretation, it need * not be an indication of an error, but rather a flag. So the * rest of the packet can be completely full of legitimate data. * * So we will do the following. * * If the "No Set Power Limit" completion code is returned and * we were able to read all of the fields, _get_power_limit() will * return normally, so we don't need to worry about this case. * * If the "No Set Power Limit", completion code is returned and * we were *not* able to read all of the fields, we won't have * values from "Get Power Limit" and won't know how to do the * configuration properly in "Set Power Limit". So we will * require that the user input all fields for "Set Power Limit". */ if (no_set_power_limit_flag) { struct ipmi_config_section *section; struct ipmi_config_keyvalue *kv; section = state_data->sections; while (section) { if (!strcasecmp (section_name, section->section_name)) break; section = section->next; } /* shouldn't be possible */ if (!section) goto cleanup; if ((kv = ipmi_config_find_keyvalue (section, "Policy_Type"))) gpld->power_limit_requested = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Policy_Enabled"))) gpld->correction_time_limit = strtoul (kv->value_input, NULL, 0); if ((kv = ipmi_config_find_keyvalue (section, "Management_Application_Statistics_Sampling_Period"))) gpld->management_application_statistics_sampling_period = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Exception_Actions"))) { int num = exception_actions_number (kv->value_input); if (num < 0) /* previously checked for correctness, so no error check */ gpld->exception_actions = strtol (kv->value_input, NULL, 0); else gpld->exception_actions = num; } } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_power_limit_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_set_power_limit (state_data->ipmi_ctx, gpld->exception_actions, gpld->power_limit_requested, gpld->correction_time_limit, gpld->management_application_statistics_sampling_period, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE) == 1)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; else { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; } if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE_STR); else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE_STR); else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR); else pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t power_limit_requested_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, gpld.power_limit_requested) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t power_limit_requested_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; int no_set_power_limit_flag = 0; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, &no_set_power_limit_flag)) != IPMI_CONFIG_ERR_SUCCESS) { if (no_set_power_limit_flag) return (_set_power_limit (state_data, section_name, &gpld, 1)); else return (ret); } gpld.power_limit_requested = atoi (kv->value_input); return (_set_power_limit (state_data, section_name, &gpld, 0)); } static ipmi_config_err_t correction_time_limit_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, gpld.correction_time_limit) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t correction_time_limit_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; int no_set_power_limit_flag = 0; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, &no_set_power_limit_flag)) != IPMI_CONFIG_ERR_SUCCESS) { if (no_set_power_limit_flag) return (_set_power_limit (state_data, section_name, &gpld, 1)); else return (ret); } /* already validated, no need to check for errors */ gpld.correction_time_limit = strtoul (kv->value_input, NULL, 0); return (_set_power_limit (state_data, section_name, &gpld, 0)); } static ipmi_config_err_t management_application_statistics_sampling_period_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, gpld.management_application_statistics_sampling_period) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t management_application_statistics_sampling_period_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; int no_set_power_limit_flag = 0; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, &no_set_power_limit_flag)) != IPMI_CONFIG_ERR_SUCCESS) { if (no_set_power_limit_flag) return (_set_power_limit (state_data, section_name, &gpld, 1)); else return (ret); } gpld.management_application_statistics_sampling_period = atoi (kv->value_input); return (_set_power_limit (state_data, section_name, &gpld, 0)); } static ipmi_config_err_t exception_actions_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; char *str; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, NULL)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); str = exception_actions_string (gpld.exception_actions); if (str && strlen (str)) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else { if (ipmi_config_section_update_keyvalue_output_hex (state_data, kv, gpld.exception_actions) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t exception_actions_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct get_power_limit_data gpld; int no_set_power_limit_flag = 0; int num; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_power_limit (state_data, &gpld, &no_set_power_limit_flag)) != IPMI_CONFIG_ERR_SUCCESS) { if (no_set_power_limit_flag) return (_set_power_limit (state_data, section_name, &gpld, 1)); else return (ret); } num = exception_actions_number (kv->value_input); if (num < 0) /* previously checked for correctness, so no error check */ gpld.exception_actions = strtol (kv->value_input, NULL, 0); else gpld.exception_actions = num; return (_set_power_limit (state_data, section_name, &gpld, 0)); } struct ipmi_config_section * ipmi_config_dcmi_dcmi_conf_section_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section = NULL; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "DCMI_Conf", NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Asset_Tag", "Give valid string", 0, asset_tag_checkout, asset_tag_commit, asset_tag_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Management_Controller_Identifier_String", "Give valid string", 0, management_controller_identifier_string_checkout, management_controller_identifier_string_commit, management_controller_identifier_string_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Power_Limit_Requested", "Give valid number in Watts", 0, power_limit_requested_checkout, power_limit_requested_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Correction_Time_Limit", "Give valid number in milliseconds", 0, correction_time_limit_checkout, correction_time_limit_commit, number_range_four_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Management_Application_Statistics_Sampling_Period", "Give valid number in seconds", 0, management_application_statistics_sampling_period_checkout, management_application_statistics_sampling_period_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Exception_Actions", "Give valid hex or NO_ACTION, HARD_POWER_OFF_SYSTEM, or LOG_EVENT_TO_SEL_ONLY", 0, exception_actions_checkout, exception_actions_commit, exception_actions_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-dcmi-dcmi-conf-section.h0000644002055400205540000000176113527331635026066 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_DCMI_DCMI_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_DCMI_DCMI_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_dcmi_dcmi_conf_section_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_DCMI_DCMI_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-dcmi-sections.c0000644002055400205540000000310113527331635024375 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-category-dcmi-dcmi-conf-section.h" #include "freeipmi-portability.h" #include "pstdout.h" struct ipmi_config_section * ipmi_config_dcmi_sections_create (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *sections = NULL; struct ipmi_config_section *section = NULL; assert (state_data); if (!(section = ipmi_config_dcmi_dcmi_conf_section_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; return (sections); cleanup: ipmi_config_sections_destroy (sections); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-dcmi-sections.h0000644002055400205540000000171113527331635024407 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_DCMI_SECTIONS #define IPMI_CONFIG_CATEGORY_DCMI_SECTIONS #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_dcmi_sections_create (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_DCMI_SECTIONS */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-alert-policy-table.c0000644002055400205540000007075513527331635026120 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct alert_policy_table { uint8_t policy_type; uint8_t policy_enabled; uint8_t policy_number; uint8_t destination_selector; uint8_t channel_number; uint8_t alert_string_set_selector; uint8_t event_specific_alert_string; }; static ipmi_config_err_t _get_alert_policy_table (struct ipmi_config_state_data *state_data, const char *section_name, struct alert_policy_table *apt) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t alert_policy_entry_number; assert (state_data); assert (section_name); assert (apt); alert_policy_entry_number = atoi (section_name + strlen ("Alert_Policy_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_alert_policy_table_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_alert_policy_table (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, alert_policy_entry_number, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_alert_policy_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } #if 0 if (FIID_OBJ_GET (obj_cmd_rs, "alert_policy_entry_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_policy_entry_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } #endif if (FIID_OBJ_GET (obj_cmd_rs, "policy_number.policy_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'policy_number.policy_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->policy_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_number.enabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'policy_number.enabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->policy_enabled = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_number.policy_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'policy_number.policy_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->policy_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "channel_destination.destination_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_destination.destination_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->destination_selector = val; if (FIID_OBJ_GET (obj_cmd_rs, "channel_destination.channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'channel_destination.channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->channel_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_string_key.alert_string_set_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_string_key.alert_string_set_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->alert_string_set_selector = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_string_key.event_specific_alert_string", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_string_key.event_specific_alert_string': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } apt->event_specific_alert_string = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_alert_policy_table (struct ipmi_config_state_data *state_data, const char *section_name, struct alert_policy_table *apt) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t alert_policy_entry_number; assert (state_data); assert (section_name); assert (apt); alert_policy_entry_number = atoi (section_name + strlen ("Alert_Policy_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_alert_policy_table (state_data->ipmi_ctx, alert_policy_entry_number, apt->policy_type, apt->policy_enabled, apt->policy_number, apt->destination_selector, apt->channel_number, apt->alert_string_set_selector, apt->event_specific_alert_string, obj_cmd_rs) < 0) { ipmi_config_err_t ret; /* IPMI Workaround * * Fujitsu RX 100 S5 * * Inventec 5441/Dell Xanadu II * * All fields have to be applied simultaneously, the motherboard * does not appear to like configuration of one field of a time, * always leading to invalid input errors. This isn't a * compliance issue, but makes it tough to make a portable/good * interface. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { struct ipmi_config_section *section; struct ipmi_config_keyvalue *kv; if (!(section = ipmi_config_find_section (state_data, section_name))) { /* This should be impossible */ pstdout_fprintf (state_data->pstate, stderr, "Cannot find section '%s'\n", section_name); goto cleanup; } if ((kv = ipmi_config_find_keyvalue (section, "Policy_Type"))) apt->policy_type = policy_type_number (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Policy_Enabled"))) apt->policy_enabled = same (kv->value_input, "yes"); if ((kv = ipmi_config_find_keyvalue (section, "Policy_Number"))) apt->policy_number = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Destination_Selector"))) apt->destination_selector = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Channel_Number"))) apt->channel_number = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Alert_String_Set_Selector"))) apt->alert_string_set_selector = atoi (kv->value_input); if ((kv = ipmi_config_find_keyvalue (section, "Event_Specific_Alert_String"))) apt->event_specific_alert_string = same (kv->value_input, "yes"); if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_alert_policy_table: attempting workaround\n"); if (ipmi_cmd_set_pef_configuration_parameters_alert_policy_table (state_data->ipmi_ctx, alert_policy_entry_number, apt->policy_type, apt->policy_enabled, apt->policy_number, apt->destination_selector, apt->channel_number, apt->alert_string_set_selector, apt->event_specific_alert_string, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_alert_policy_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* success */ goto out; } else if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_alert_policy_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t policy_type_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, policy_type_string (apt.policy_type)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t policy_type_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.policy_type = policy_type_number (kv->value_input); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t policy_enabled_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, apt.policy_enabled ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t policy_enabled_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.policy_enabled = same (kv->value_input, "yes"); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t policy_number_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, apt.policy_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t policy_number_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.policy_number = atoi (kv->value_input); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t destination_selector_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, apt.destination_selector) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t destination_selector_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.destination_selector = atoi (kv->value_input); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t channel_number_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, apt.channel_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t channel_number_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.channel_number = atoi (kv->value_input); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t alert_string_set_selector_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, apt.alert_string_set_selector) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_string_set_selector_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.alert_string_set_selector = atoi (kv->value_input); return (_set_alert_policy_table (state_data, section_name, &apt)); } static ipmi_config_err_t event_specific_alert_string_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, apt.event_specific_alert_string ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_specific_alert_string_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_policy_table apt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_policy_table (state_data, section_name, &apt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); apt.event_specific_alert_string = same (kv->value_input, "yes"); return (_set_alert_policy_table (state_data, section_name, &apt)); } struct ipmi_config_section * ipmi_config_pef_alert_policy_table_section_get (ipmi_config_state_data_t *state_data, unsigned int num) { struct ipmi_config_section *section = NULL; char section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; char description[IPMI_CONFIG_MAX_DESCRIPTION_LEN]; assert (state_data); assert (num); snprintf (section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "Alert_Policy_%u", num); if (!(section = ipmi_config_section_create (state_data, section_name, NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Policy_Type", "Possible values: Always_Send_To_This_Destination/Proceed_To_Next_Entry/Do_Not_Proceed_Any_More_Entries/Proceed_To_Next_Entry_Different_Channel/Proceed_To_Next_Entry_Different_Destination_Type", 0, policy_type_checkout, policy_type_commit, policy_type_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Policy_Enabled", "Possible values: Yes/No", 0, policy_enabled_checkout, policy_enabled_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Policy_Number", "Give a valid number", 0, policy_number_checkout, policy_number_commit, number_range_four_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Destination_Selector", "Give a valid number", 0, destination_selector_checkout, destination_selector_commit, number_range_four_bits_validate) < 0) goto cleanup; if (!state_data->lan_channel_numbers_loaded) { if (load_lan_channel_numbers (state_data) != IPMI_CONFIG_ERR_SUCCESS) goto cleanup; } if (state_data->lan_channel_numbers_count > 0) { char tempbuf[IPMI_CONFIG_MAX_DESCRIPTION_LEN]; int i; snprintf (description, IPMI_CONFIG_MAX_DESCRIPTION_LEN, "Give a valid number (LAN = %u", state_data->lan_channel_numbers[0]); for (i = 1; i < state_data->lan_channel_numbers_count; i++) { snprintf (tempbuf, IPMI_CONFIG_MAX_DESCRIPTION_LEN, ", %u", state_data->lan_channel_numbers[i]); strcat (description, tempbuf); } strcat (description, ")"); } else snprintf (description, IPMI_CONFIG_MAX_DESCRIPTION_LEN, "Give a valid number"); if (ipmi_config_section_add_key (state_data, section, "Channel_Number", description, 0, channel_number_checkout, channel_number_commit, number_range_four_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_String_Set_Selector", "Give a valid number", 0, alert_string_set_selector_checkout, alert_string_set_selector_commit, number_range_seven_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Specific_Alert_String", "Possible values: Yes/No", 0, event_specific_alert_string_checkout, event_specific_alert_string_commit, yes_no_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-alert-policy-table.h0000644002055400205540000000201313527331635026103 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_ALERT_POLICY_TABLE_H #define IPMI_CONFIG_CATEGORY_PEF_ALERT_POLICY_TABLE_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_alert_policy_table_section_get (ipmi_config_state_data_t *state_data, unsigned int num); #endif /* IPMI_CONFIG_CATEGORY_PEF_ALERT_POLICY_TABLE_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-alert-string.c0000644002055400205540000004364513527331635025040 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* achu: presumably there is no maximum. We could read/write blocks forever based on block numbers. However, we need to have some artificial max for the sake of ipmi-config. */ #define PEF_ALERT_STRING_MAX_LEN 64 #define PEF_ALERT_STRING_BLOCK_SIZE 16 struct alert_string_keys { uint8_t event_filter_number; uint8_t alert_string_set; }; static ipmi_config_err_t _get_alert_string_keys (ipmi_config_state_data_t *state_data, const char *section_name, struct alert_string_keys *ask) { fiid_obj_t obj_cmd_rs = NULL; uint8_t string_selector; uint64_t val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (ask); string_selector = atoi (section_name + strlen ("Alert_String_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_alert_string_keys_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_alert_string_keys (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, string_selector, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_alert_string_keys: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "filter_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'filter_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ask->event_filter_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "set_number_for_string", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'set_number_for_string': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } ask->alert_string_set = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_alert_string_keys (ipmi_config_state_data_t *state_data, const char *section_name, struct alert_string_keys *ask) { fiid_obj_t obj_cmd_rs = NULL; uint8_t string_selector; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (ask); string_selector = atoi (section_name + strlen ("Alert_String_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_alert_string_keys (state_data->ipmi_ctx, string_selector, ask->event_filter_number, ask->alert_string_set, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_alert_string_keys: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t event_filter_number_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_string_keys ask; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_string_keys (state_data, section_name, &ask)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, ask.event_filter_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_number_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_string_keys ask; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_string_keys (state_data, section_name, &ask)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ask.event_filter_number = atoi (kv->value_input); return (_set_alert_string_keys (state_data, section_name, &ask)); } static ipmi_config_err_t alert_string_set_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct alert_string_keys ask; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_string_keys (state_data, section_name, &ask)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, ask.alert_string_set) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_string_set_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct alert_string_keys ask; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_alert_string_keys (state_data, section_name, &ask)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); ask.alert_string_set = atoi (kv->value_input); return (_set_alert_string_keys (state_data, section_name, &ask)); } static ipmi_config_err_t alert_string_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { char alert_string[PEF_ALERT_STRING_MAX_LEN+1]; uint8_t string_selector; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; unsigned int blocks; unsigned int i; assert (state_data); assert (section_name); assert (kv); string_selector = atoi (section_name + strlen ("Alert_String_")); memset (alert_string, '\0', PEF_ALERT_STRING_MAX_LEN+1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_alert_strings_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!((PEF_ALERT_STRING_MAX_LEN) % PEF_ALERT_STRING_BLOCK_SIZE)) blocks = (PEF_ALERT_STRING_MAX_LEN)/PEF_ALERT_STRING_BLOCK_SIZE; else blocks = (PEF_ALERT_STRING_MAX_LEN)/PEF_ALERT_STRING_BLOCK_SIZE + 1; for (i = 0; i < blocks; i++) { int j; if (ipmi_cmd_get_pef_configuration_parameters_alert_string (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, string_selector, i + 1, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_alert_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* XXX: Be lazy for now, assume no strings will overflow * whatever is passed in, so don't check for overflow errors * from fiid_obj_get_data. */ if (fiid_obj_get_data (obj_cmd_rs, "string_data", alert_string + (i * PEF_ALERT_STRING_BLOCK_SIZE), PEF_ALERT_STRING_MAX_LEN - (i * PEF_ALERT_STRING_BLOCK_SIZE)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'string_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* Check if we've found a nul character */ for (j = 0; j < PEF_ALERT_STRING_BLOCK_SIZE; j++) { if (!((alert_string + (i * PEF_ALERT_STRING_BLOCK_SIZE))[j])) goto done; } } done: if (ipmi_config_section_update_keyvalue_output (state_data, kv, alert_string) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t alert_string_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { uint8_t string_selector; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t *alert_string_buf = NULL; unsigned int alert_string_len = 0; unsigned int alert_string_buf_len = 0; unsigned int blocks; unsigned int i; assert (state_data); assert (section_name); assert (kv); string_selector = atoi (section_name + strlen ("Alert_String_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } alert_string_len = strlen (kv->value_input); /* We need to write a nul char, so count it as part of the buflen */ alert_string_buf_len = alert_string_len + 1; if (!(alert_string_buf = (uint8_t *)malloc (alert_string_buf_len))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } memset (alert_string_buf, '\0', alert_string_buf_len); if (alert_string_len) memcpy (alert_string_buf, kv->value_input, alert_string_len); if (!((alert_string_buf_len) % PEF_ALERT_STRING_BLOCK_SIZE)) blocks = (alert_string_buf_len)/PEF_ALERT_STRING_BLOCK_SIZE; else blocks = (alert_string_buf_len)/PEF_ALERT_STRING_BLOCK_SIZE + 1; for (i = 0; i < blocks; i++) { uint8_t len_to_write; if ((alert_string_buf_len - (i * PEF_ALERT_STRING_BLOCK_SIZE)) < PEF_ALERT_STRING_BLOCK_SIZE) len_to_write = alert_string_buf_len - (i * PEF_ALERT_STRING_BLOCK_SIZE); else len_to_write = PEF_ALERT_STRING_BLOCK_SIZE; if (ipmi_cmd_set_pef_configuration_parameters_alert_strings (state_data->ipmi_ctx, string_selector, i+1, alert_string_buf + (i * PEF_ALERT_STRING_BLOCK_SIZE), len_to_write, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_alert_strings: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: free (alert_string_buf); fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t alert_string_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (strlen (value) <= PEF_ALERT_STRING_MAX_LEN) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } struct ipmi_config_section * ipmi_config_pef_alert_string_section_get (ipmi_config_state_data_t *state_data, unsigned int num) { struct ipmi_config_section *section = NULL; char buf[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; assert (state_data); snprintf (buf, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "Alert_String_%u", num); if (!(section = ipmi_config_section_create (state_data, buf, NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Number", "Give valid number", 0, event_filter_number_checkout, event_filter_number_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_String_Set", "Give valid number", 0, alert_string_set_checkout, alert_string_set_commit, number_range_seven_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_String", "Give string. Max 64 chars.", 0, alert_string_checkout, alert_string_commit, alert_string_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-alert-string.h0000644002055400205540000000206513527331635025034 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_ALERT_STRING_H #define IPMI_CONFIG_CATEGORY_PEF_ALERT_STRING_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_alert_string_section_get (ipmi_config_state_data_t *state_data, unsigned int num); #endif /* IPMI_CONFIG_CATEGORY_PEF_ALERT_STRING_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-community-string.c0000644002055400205540000001757013527331635025753 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t community_string_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { char community_string[IPMI_MAX_COMMUNITY_STRING_LENGTH+1]; fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_community_string_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_community_string (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_community_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } memset (community_string,'\0', IPMI_MAX_COMMUNITY_STRING_LENGTH+1); if (fiid_obj_get_data (obj_cmd_rs, "community_string", community_string, IPMI_MAX_COMMUNITY_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'community_string': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, community_string) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t community_string_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; assert (state_data); assert (section_name); assert (kv); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_community_string (state_data->ipmi_ctx, channel_number, kv->value_input, strlen (kv->value_input), obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_community_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_validate_t community_string_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (!value || strlen (value) > IPMI_MAX_COMMUNITY_STRING_LENGTH) return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } struct ipmi_config_section * ipmi_config_pef_community_string_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char *section_name_base_str = "Community_String"; assert (state_data); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base_str, NULL, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Community_String", "Give valid string", 0, community_string_checkout, community_string_commit, community_string_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-community-string.h0000644002055400205540000000225313527331635025750 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_COMMUNITY_STRING_H #define IPMI_CONFIG_CATEGORY_PEF_COMMUNITY_STRING_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_community_string_section_get (ipmi_config_state_data_t *state_data, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_PEF_COMMUNITY_STRING_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-event-filter-table.c0000644002055400205540000022463513527331635026116 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" /* convenience struct */ struct event_filter_table { uint8_t filter_type; uint8_t enable_filter; uint8_t event_filter_action_alert; uint8_t event_filter_action_power_off; uint8_t event_filter_action_reset; uint8_t event_filter_action_power_cycle; uint8_t event_filter_action_oem; uint8_t event_filter_action_diagnostic_interrupt; uint8_t event_filter_action_group_control_operation; uint8_t alert_policy_number; uint8_t group_control_selector; uint8_t event_severity; uint8_t generator_id_byte_1; uint8_t generator_id_byte_2; uint8_t sensor_type; uint8_t sensor_number; uint8_t event_trigger; uint16_t event_data1_offset_mask; uint8_t event_data1_and_mask; uint8_t event_data1_compare1; uint8_t event_data1_compare2; uint8_t event_data2_and_mask; uint8_t event_data2_compare1; uint8_t event_data2_compare2; uint8_t event_data3_and_mask; uint8_t event_data3_compare1; uint8_t event_data3_compare2; }; static int _ipmi_config_section_update_keyvalue_output_hex (struct ipmi_config_state_data *state_data, struct ipmi_config_keyvalue *kv, unsigned int value_output) { char buf[IPMI_CONFIG_PARSE_BUFLEN]; assert (state_data); assert (kv); sprintf (buf, "0x%02X", value_output); return (ipmi_config_section_update_keyvalue_output (state_data, kv, buf)); } static ipmi_config_err_t _get_event_filter_table (struct ipmi_config_state_data *state_data, const char *section_name, struct event_filter_table *eft) { fiid_obj_t obj_cmd_rs = NULL; uint8_t filter_number; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (eft); filter_number = atoi (section_name + strlen ("Event_Filter_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_event_filter_table_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_event_filter_table (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, filter_number, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_event_filter_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } #if 0 if (FIID_OBJ_GET (obj_cmd_rs, "filter_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'filter_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } #endif if (FIID_OBJ_GET (obj_cmd_rs, "filter_configuration.type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'filter_configuration.type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->filter_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "filter_configuration.filter", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'filter_configuration.filter': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->enable_filter = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.alert", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.alert': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_alert = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.power_off", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.power_off': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_power_off = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.reset", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.reset': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_reset = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.power_cycle", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.power_cycle': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_power_cycle = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.oem", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.oem': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_oem = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.diagnostic_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.diagnostic_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_diagnostic_interrupt = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_filter_action.group_control_operation", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_filter_action.group_control_operation': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_filter_action_group_control_operation = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_policy_number.policy_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_policy_number.policy_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->alert_policy_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_policy_number.group_control_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_policy_number.group_control_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->group_control_selector = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_severity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_severity': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_severity = val; if (FIID_OBJ_GET (obj_cmd_rs, "generator_id_byte1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'generator_id_byte1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->generator_id_byte_1 = val; if (FIID_OBJ_GET (obj_cmd_rs, "generator_id_byte2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'generator_id_byte2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->generator_id_byte_2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "sensor_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sensor_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->sensor_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "sensor_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sensor_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->sensor_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_trigger", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_trigger': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_trigger = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data1_offset_mask", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data1_offset_mask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data1_offset_mask = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data1_AND_mask", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data1_AND_mask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data1_and_mask = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data1_compare1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data1_compare1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data1_compare1 = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data1_compare2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data1_compare2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data1_compare2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data2_AND_mask", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data2_AND_mask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data2_and_mask = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data2_compare1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data2_compare1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data2_compare1 = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data2_compare2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data2_compare2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data2_compare2 = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data3_AND_mask", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data3_AND_mask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data3_and_mask = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data3_compare1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data3_compare1': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data3_compare1 = val; if (FIID_OBJ_GET (obj_cmd_rs, "event_data3_compare2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'event_data3_compare2': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } eft->event_data3_compare2 = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_event_filter_table (struct ipmi_config_state_data *state_data, const char *section_name, struct event_filter_table *eft) { fiid_obj_t obj_cmd_rs = NULL; uint8_t filter_number; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); assert (eft); filter_number = atoi (section_name + strlen ("Event_Filter_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_pef_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_pef_configuration_parameters_event_filter_table (state_data->ipmi_ctx, filter_number, eft->filter_type, eft->enable_filter, eft->event_filter_action_alert, eft->event_filter_action_power_off, eft->event_filter_action_reset, eft->event_filter_action_power_cycle, eft->event_filter_action_oem, eft->event_filter_action_diagnostic_interrupt, eft->event_filter_action_group_control_operation, eft->alert_policy_number, eft->group_control_selector, eft->event_severity, eft->generator_id_byte_1, eft->generator_id_byte_2, eft->sensor_type, eft->sensor_number, eft->event_trigger, eft->event_data1_offset_mask, eft->event_data1_and_mask, eft->event_data1_compare1, eft->event_data1_compare2, eft->event_data2_and_mask, eft->event_data2_compare1, eft->event_data2_compare2, eft->event_data3_and_mask, eft->event_data3_compare1, eft->event_data3_compare2, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_pef_configuration_parameters_event_filter_table: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t filter_type_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, filter_type_string (eft.filter_type)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t filter_type_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.filter_type = filter_type_number (kv->value_input); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t enable_filter_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.enable_filter ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t enable_filter_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.enable_filter = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_alert_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_alert ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_alert_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_alert = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_power_off_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_power_off ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_power_off_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_power_off = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_reset_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_reset ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_reset_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_reset = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_power_cycle_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_power_cycle ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_power_cycle_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_power_cycle = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_oem_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_oem ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_oem_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_oem = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_diagnostic_interrupt_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_diagnostic_interrupt ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_diagnostic_interrupt_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_diagnostic_interrupt = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_filter_action_group_control_operation_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, eft.event_filter_action_group_control_operation ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_filter_action_group_control_operation_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_filter_action_group_control_operation = same (kv->value_input, "yes"); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t alert_policy_number_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, eft.alert_policy_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_policy_number_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.alert_policy_number = atoi (kv->value_input); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t group_control_selector_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, eft.group_control_selector) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t group_control_selector_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.group_control_selector = atoi (kv->value_input); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_severity_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, event_severity_string (eft.event_severity)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_severity_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); eft.event_severity = event_severity_number (kv->value_input); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t generator_id_byte_1_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.generator_id_byte_1) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t generator_id_byte_1_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.generator_id_byte_1 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t generator_id_byte_2_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.generator_id_byte_2) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t generator_id_byte_2_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.generator_id_byte_2 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t sensor_type_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; char *str; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* If string available, output that, else output OEM code */ str = sensor_type_string (eft.sensor_type); if (str && strlen (str)) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, str) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } else { if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.sensor_type) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); } return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t sensor_type_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; int num; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); num = sensor_type_number (kv->value_input); if (num < 0) /* previously checked for correctness, so no error check */ eft.sensor_type = strtol (kv->value_input, NULL, 0); else eft.sensor_type = num; return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t sensor_number_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.sensor_number) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t sensor_number_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.sensor_number = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_trigger_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_trigger) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_trigger_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_trigger = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data1_offset_mask_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data1_offset_mask) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data1_offset_mask_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data1_offset_mask = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data1_and_mask_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data1_and_mask) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data1_and_mask_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data1_and_mask = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data1_compare1_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data1_compare1) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data1_compare1_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data1_compare1 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data1_compare2_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data1_compare2) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data1_compare2_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data1_compare2 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data2_and_mask_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data2_and_mask) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data2_and_mask_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data2_and_mask = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data2_compare1_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data2_compare1) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data2_compare1_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data2_compare1 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data2_compare2_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data2_compare2) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data2_compare2_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data2_compare2 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data3_and_mask_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data3_and_mask) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data3_and_mask_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data3_and_mask = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data3_compare1_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data3_compare1) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data3_compare1_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data3_compare1 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } static ipmi_config_err_t event_data3_compare2_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (_ipmi_config_section_update_keyvalue_output_hex (state_data, kv, eft.event_data3_compare2) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t event_data3_compare2_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { ipmi_config_err_t ret; struct event_filter_table eft; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_event_filter_table (state_data, section_name, &eft)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* previously checked for correctness, so no error check */ eft.event_data3_compare2 = strtol (kv->value_input, NULL, 0); return (_set_event_filter_table (state_data, section_name, &eft)); } struct ipmi_config_section * ipmi_config_pef_event_filter_table_section_get (ipmi_config_state_data_t *state_data, unsigned int num) { struct ipmi_config_section *section = NULL; char buf[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; assert (state_data); assert (num); snprintf (buf, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "Event_Filter_%u", num); if (!(section = ipmi_config_section_create (state_data, buf, NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Filter_Type", "Possible values: Manufacturer_Pre_Configured/Software_Configurable/Reserved1/Reserved3", 0, filter_type_checkout, filter_type_commit, filter_type_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Filter", "Possible values: Yes/No", 0, enable_filter_checkout, enable_filter_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Alert", "Possible values: Yes/No", 0, event_filter_action_alert_checkout, event_filter_action_alert_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Power_Off", "Possible values: Yes/No", 0, event_filter_action_power_off_checkout, event_filter_action_power_off_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Reset", "Possible values: Yes/No", 0, event_filter_action_reset_checkout, event_filter_action_reset_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Power_Cycle", "Possible values: Yes/No", 0, event_filter_action_power_cycle_checkout, event_filter_action_power_cycle_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Oem", "Possible values: Yes/No", 0, event_filter_action_oem_checkout, event_filter_action_oem_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Diagnostic_Interrupt", "Possible values: Yes/No", 0, event_filter_action_diagnostic_interrupt_checkout, event_filter_action_diagnostic_interrupt_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Filter_Action_Group_Control_Operation", "Possible values: Yes/No", 0, event_filter_action_group_control_operation_checkout, event_filter_action_group_control_operation_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Policy_Number", "Give a valid number", 0, alert_policy_number_checkout, alert_policy_number_commit, number_range_four_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Group_Control_Selector", "Give a valid number", 0, group_control_selector_checkout, group_control_selector_commit, number_range_three_bits_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Severity", "Possible values: Unspecified/Monitor/Information/OK/Non_Critical/Critical/Non_Recoverable", 0, event_severity_checkout, event_severity_commit, event_severity_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Generator_Id_Byte_1", "Specify a hex Slave Address or Software ID from Event Message or 0xFF to Match Any", 0, generator_id_byte_1_checkout, generator_id_byte_1_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Generator_Id_Byte_2", "Specify a hex Channel Number or LUN to match or 0xFF to Match Any", 0, generator_id_byte_2_checkout, generator_id_byte_2_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Sensor_Type", "Specify a Sensor Type, via hex or see MAN page for string options", 0, sensor_type_checkout, sensor_type_commit, sensor_type_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Sensor_Number", "Specify a Sensor Number or 0xFF to Match Any", 0, sensor_number_checkout, sensor_number_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Trigger", "Specify a Event/Reading Type Number or 0xFF to Match Any", 0, event_trigger_checkout, event_trigger_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data1_Offset_Mask", "Give a valid number", 0, event_data1_offset_mask_checkout, event_data1_offset_mask_commit, number_range_two_bytes_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data1_AND_Mask", "Give a valid number", 0, event_data1_and_mask_checkout, event_data1_and_mask_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data1_Compare1", "Give a valid number", 0, event_data1_compare1_checkout, event_data1_compare1_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data1_Compare2", "Give a valid number", 0, event_data1_compare2_checkout, event_data1_compare2_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data2_AND_Mask", "Give a valid number", 0, event_data2_and_mask_checkout, event_data2_and_mask_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data2_Compare1", "Give a valid number", 0, event_data2_compare1_checkout, event_data2_compare1_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data2_Compare2", "Give a valid number", 0, event_data2_compare2_checkout, event_data2_compare2_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data3_AND_Mask", "Give a valid number", 0, event_data3_and_mask_checkout, event_data3_and_mask_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data3_Compare1", "Give a valid number", 0, event_data3_compare1_checkout, event_data3_compare1_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Event_Data3_Compare2", "Give a valid number", 0, event_data3_compare2_checkout, event_data3_compare2_commit, number_range_one_byte_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-event-filter-table.h0000644002055400205540000000201413527331635026104 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_EVENT_FILTER_TABLE_H #define IPMI_CONFIG_CATEGORY_PEF_EVENT_FILTER_TABLE_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_event_filter_table_section_get (ipmi_config_state_data_t *state_data, unsigned int num); #endif /* IPMI_CONFIG_CATEGORY_PEF_EVENT_FILTER_TABLE_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-lan-alert-destination.c0000644002055400205540000007274013527331635026621 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #define IPMI_CONFIG_CATEGORY_PEF_MAXIPADDRLEN 16 #define IPMI_CONFIG_CATEGORY_PEF_MAXMACADDRLEN 24 /* convenience structs */ struct destination_type { uint8_t alert_destination_type; uint8_t alert_acknowledge; uint8_t alert_acknowledge_timeout; uint8_t alert_retries; }; struct destination_addresses { uint8_t alert_gateway; char alert_ip[IPMI_CONFIG_CATEGORY_PEF_MAXIPADDRLEN+1]; char alert_mac[IPMI_CONFIG_CATEGORY_PEF_MAXMACADDRLEN+1]; }; static ipmi_config_err_t _get_destination_type (ipmi_config_state_data_t *state_data, const char *section_name, struct destination_type *dt) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t destination_selector; assert (state_data); assert (section_name); assert (dt); destination_selector = atoi (section_name + strlen ("Lan_Alert_Destination_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_destination_type_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_destination_type (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, destination_selector, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_destination_type: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "destination_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'destination_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } dt->alert_destination_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_acknowledge", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_acknowledge': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } dt->alert_acknowledge = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_acknowledge_timeout", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_acknowledge_timeout': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } dt->alert_acknowledge_timeout = val; if (FIID_OBJ_GET (obj_cmd_rs, "retries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'retries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } dt->alert_retries = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_destination_type (ipmi_config_state_data_t *state_data, const char *section_name, struct destination_type *dt) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t destination_selector; assert (state_data); assert (section_name); assert (dt); destination_selector = atoi (section_name + strlen ("Lan_Alert_Destination_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_set_lan_configuration_parameters_destination_type(state_data->ipmi_ctx, channel_number, destination_selector, dt->alert_destination_type, dt->alert_acknowledge, dt->alert_acknowledge_timeout, dt->alert_retries, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_destination_type: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t alert_destination_type_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, alert_destination_type_string (dt.alert_destination_type)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_destination_type_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); dt.alert_destination_type = alert_destination_type_number (kv->value_input); return (_set_destination_type (state_data, section_name, &dt)); } static ipmi_config_err_t alert_acknowledge_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, dt.alert_acknowledge ? "Yes" : "No") < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_acknowledge_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); dt.alert_acknowledge = same (kv->value_input, "yes"); return (_set_destination_type (state_data, section_name, &dt)); } static ipmi_config_err_t alert_acknowledge_timeout_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, dt.alert_acknowledge_timeout) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_acknowledge_timeout_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); dt.alert_acknowledge_timeout = atoi (kv->value_input); return (_set_destination_type (state_data, section_name, &dt)); } static ipmi_config_err_t alert_retries_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output_unsigned_int (state_data, kv, dt.alert_retries) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_retries_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_type dt; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_type (state_data, section_name, &dt)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); dt.alert_retries = atoi (kv->value_input); return (_set_destination_type (state_data, section_name, &dt)); } ipmi_config_validate_t alert_retries_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, IPMI_ALERT_RETRIES_MAX)); } static ipmi_config_err_t _get_destination_addresses (ipmi_config_state_data_t *state_data, const char *section_name, struct destination_addresses *da) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; uint8_t alert_ip_address_bytes[4]; uint8_t alert_mac_address_bytes[6]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t destination_selector; assert (state_data); assert (section_name); assert (da); destination_selector = atoi (section_name + strlen ("Lan_Alert_Destination_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_destination_addresses_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_destination_addresses(state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, destination_selector, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_destination_addresses: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "gateway_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'gateway_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } da->alert_gateway = val; if (fiid_obj_get_data (obj_cmd_rs, "alerting_ip_address", alert_ip_address_bytes, 4) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'alerting_ip_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (da->alert_ip, '\0', IPMI_CONFIG_CATEGORY_PEF_MAXIPADDRLEN+1); snprintf (da->alert_ip, IPMI_CONFIG_CATEGORY_PEF_MAXIPADDRLEN, "%u.%u.%u.%u", alert_ip_address_bytes[0], alert_ip_address_bytes[1], alert_ip_address_bytes[2], alert_ip_address_bytes[3]); if (fiid_obj_get_data (obj_cmd_rs, "alerting_mac_address", alert_mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'alerting_mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (da->alert_mac, '\0', IPMI_CONFIG_CATEGORY_PEF_MAXMACADDRLEN+1); snprintf (da->alert_mac, IPMI_CONFIG_CATEGORY_PEF_MAXMACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", alert_mac_address_bytes[0], alert_mac_address_bytes[1], alert_mac_address_bytes[2], alert_mac_address_bytes[3], alert_mac_address_bytes[4], alert_mac_address_bytes[5]); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_destination_addresses (ipmi_config_state_data_t *state_data, const char *section_name, struct destination_addresses *da) { fiid_obj_t obj_cmd_rs = NULL; uint32_t alert_ip_address_val = 0; uint64_t alert_mac_address_val = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t channel_number; uint8_t destination_selector; assert (state_data); assert (section_name); assert (da); destination_selector = atoi (section_name + strlen ("Lan_Alert_Destination_")); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((ret = get_lan_channel_number (state_data, section_name, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipv4_address_string2int (state_data, da->alert_ip, &alert_ip_address_val) < 0) goto cleanup; if (mac_address_string2int (state_data, da->alert_mac, &alert_mac_address_val) < 0) goto cleanup; if (ipmi_cmd_set_lan_configuration_parameters_destination_addresses (state_data->ipmi_ctx, channel_number, destination_selector, da->alert_gateway, alert_ip_address_val, alert_mac_address_val, obj_cmd_rs) < 0) { if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters_destination_addresses: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t alert_gateway_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, alert_gateway_string (da.alert_gateway)) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_gateway_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); da.alert_gateway = alert_gateway_number (kv->value_input); return (_set_destination_addresses (state_data, section_name, &da)); } static ipmi_config_err_t alert_ip_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, da.alert_ip) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_ip_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* length checked earlier during validation */ strcpy (da.alert_ip, kv->value_input); return (_set_destination_addresses (state_data, section_name, &da)); } static ipmi_config_err_t alert_mac_address_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); if (ipmi_config_section_update_keyvalue_output (state_data, kv, da.alert_mac) < 0) return (IPMI_CONFIG_ERR_FATAL_ERROR); return (IPMI_CONFIG_ERR_SUCCESS); } static ipmi_config_err_t alert_mac_address_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct destination_addresses da; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_destination_addresses (state_data, section_name, &da)) != IPMI_CONFIG_ERR_SUCCESS) return (ret); /* length checked earlier during validation */ strcpy (da.alert_mac, kv->value_input); return (_set_destination_addresses (state_data, section_name, &da)); } struct ipmi_config_section * ipmi_config_pef_lan_alert_destination_section_get (ipmi_config_state_data_t *state_data, unsigned int num, unsigned int config_flags, int channel_index) { struct ipmi_config_section *section = NULL; char section_name_base[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; assert (state_data); snprintf (section_name_base, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "Lan_Alert_Destination_%u", num); if (!(section = ipmi_config_section_multi_channel_create (state_data, section_name_base, NULL, NULL, NULL, config_flags, channel_index, state_data->lan_channel_numbers, state_data->lan_channel_numbers_count))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Destination_Type", "Possible values: PET_Trap/OEM1/OEM2", 0, alert_destination_type_checkout, alert_destination_type_commit, alert_destination_type_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Acknowledge", "Possible values: Yes/No", 0, alert_acknowledge_checkout, alert_acknowledge_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Acknowledge_Timeout", "Give valid unsigned number in seconds", 0, alert_acknowledge_timeout_checkout, alert_acknowledge_timeout_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Retries", "Give valid unsigned number", 0, alert_retries_checkout, alert_retries_commit, alert_retries_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Gateway", "Possible values: Default/Backup", 0, alert_gateway_checkout, alert_gateway_commit, alert_gateway_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_IP_Address", "Give valid IP address", 0, alert_ip_address_checkout, alert_ip_address_commit, ip_address_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_MAC_Address", "Give valid MAC address", 0, alert_mac_address_checkout, alert_mac_address_commit, mac_address_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-lan-alert-destination.h0000644002055400205540000000244713527331635026623 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_LAN_ALERT_DESTINATION_H #define IPMI_CONFIG_CATEGORY_PEF_LAN_ALERT_DESTINATION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_lan_alert_destination_section_get (ipmi_config_state_data_t *state_data, unsigned int num, unsigned int config_flags, int channel_index); #endif /* IPMI_CONFIG_CATEGORY_PEF_LAN_ALERT_DESTINATION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-pef-conf-section.c0000644002055400205540000001534513527331635025560 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-validate.h" #include "ipmi-config-category-common-pef-conf-section.h" #include "freeipmi-portability.h" struct ipmi_config_section * ipmi_config_pef_pef_conf_section_get (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *section; assert (state_data); if (!(section = ipmi_config_section_create (state_data, "PEF_Conf", NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF", "Possible values: Yes/No", 0, enable_pef_checkout, enable_pef_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Event_Messages", "Possible values: Yes/No", 0, enable_pef_event_messages_checkout, enable_pef_event_messages_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Startup_Delay", "Possible values: Yes/No", 0, enable_pef_startup_delay_checkout, enable_pef_startup_delay_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_PEF_Alert_Startup_Delay", "Possible values: Yes/No", 0, enable_pef_alert_startup_delay_checkout, enable_pef_alert_startup_delay_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Alert_Action", "Possible values: Yes/No", 0, enable_alert_action_checkout, enable_alert_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Power_Down_Action", "Possible values: Yes/No", 0, enable_power_down_action_checkout, enable_power_down_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Reset_Action", "Possible values: Yes/No", 0, enable_reset_action_checkout, enable_reset_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Power_Cycle_Action", "Possible values: Yes/No", 0, enable_power_cycle_action_checkout, enable_power_cycle_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_OEM_Action", "Possible values: Yes/No", 0, enable_oem_action_checkout, enable_oem_action_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Diagnostic_Interrupt", "Possible values: Yes/No", 0, enable_diagnostic_interrupt_checkout, enable_diagnostic_interrupt_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Startup_Delay", "Give value in seconds", 0, pef_startup_delay_checkout, pef_startup_delay_commit, number_range_one_byte_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Alert_Startup_Delay", "Give value in seconds", 0, pef_alert_startup_delay_checkout, pef_alert_startup_delay_commit, number_range_one_byte_validate) < 0) goto cleanup; return (section); cleanup: if (section) ipmi_config_section_destroy (section); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-pef-conf-section.h0000644002055400205540000000175113527331635025561 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_PEF_CONF_SECTION_H #define IPMI_CONFIG_CATEGORY_PEF_PEF_CONF_SECTION_H #include "ipmi-config.h" struct ipmi_config_section * ipmi_config_pef_pef_conf_section_get (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_PEF_PEF_CONF_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-sections.c0000644002055400205540000003644313527331635024252 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "ipmi-config-category-pef-alert-policy-table.h" #include "ipmi-config-category-pef-alert-string.h" #include "ipmi-config-category-pef-community-string.h" #include "ipmi-config-category-pef-event-filter-table.h" #include "ipmi-config-category-pef-lan-alert-destination.h" #include "ipmi-config-category-pef-pef-conf-section.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t _get_number_of_lan_alert_destinations (struct ipmi_config_state_data *state_data, uint8_t *number_of_lan_alert_destinations) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint64_t val; uint8_t channel_number; assert (state_data); assert (number_of_lan_alert_destinations); /* for the time being, we assume equal destinations per channel, so NULL for section_name */ if ((ret = get_lan_channel_number (state_data, NULL, &channel_number)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_number_of_destinations_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_number_of_destinations (state_data->ipmi_ctx, channel_number, IPMI_GET_LAN_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_number_of_destinations: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_lan_destinations", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*number_of_lan_alert_destinations) = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_number_of_alert_strings (struct ipmi_config_state_data *state_data, uint8_t *number_of_alert_strings) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (number_of_alert_strings); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_alert_strings", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*number_of_alert_strings) = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_number_of_alert_policy_entries (struct ipmi_config_state_data *state_data, uint8_t *number_of_alert_policy_entries) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (number_of_alert_policy_entries); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_alert_policy_entries", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*number_of_alert_policy_entries) = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_number_of_event_filters (struct ipmi_config_state_data *state_data, uint8_t *number_of_event_filters) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (number_of_event_filters); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_event_filters", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*number_of_event_filters) = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } struct ipmi_config_section * ipmi_config_pef_sections_create (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *sections = NULL; struct ipmi_config_section *section = NULL; uint8_t number_of_lan_alert_destinations = 0; uint8_t number_of_alert_strings = 0; uint8_t number_of_alert_policy_entries = 0; uint8_t number_of_event_filters = 0; unsigned int i; int channelindex; assert (state_data); if (load_lan_channel_numbers (state_data) == IPMI_CONFIG_ERR_FATAL_ERROR) return (NULL); if (_get_number_of_lan_alert_destinations (state_data, &number_of_lan_alert_destinations) != IPMI_CONFIG_ERR_SUCCESS) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get Number of Alert Destinations\n"); return (NULL); } if (_get_number_of_alert_policy_entries (state_data, &number_of_alert_policy_entries) != IPMI_CONFIG_ERR_SUCCESS) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get Number of Alert Policy Entries\n"); return (NULL); } if (_get_number_of_alert_strings (state_data, &number_of_alert_strings) != IPMI_CONFIG_ERR_SUCCESS) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get Number of Alert Strings\n"); return (NULL); } if (_get_number_of_event_filters (state_data, &number_of_event_filters) != IPMI_CONFIG_ERR_SUCCESS) { pstdout_fprintf (state_data->pstate, stderr, "Unable to get Number of Event Filters\n"); return (NULL); } if (state_data->prog_data->args->verbose_count && state_data->lan_channel_numbers_count > 1) { state_data->lan_base_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; state_data->lan_channel_config_flags = 0; } else { state_data->lan_base_config_flags = 0; state_data->lan_channel_config_flags = IPMI_CONFIG_DO_NOT_CHECKOUT; } /* PEF_Conf Section */ if (!(section = ipmi_config_pef_pef_conf_section_get (state_data))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; /* Community_String Section(s) */ if (!(section = ipmi_config_pef_community_string_section_get (state_data, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (!(section = ipmi_config_pef_community_string_section_get (state_data, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } /* Lan_Alert_Destination Section(s) */ for (i = 0; i <= number_of_lan_alert_destinations; i++) { if (!(section = ipmi_config_pef_lan_alert_destination_section_get (state_data, i, state_data->lan_base_config_flags, -1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } if (state_data->lan_channel_numbers_count > 1) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { for (i = 0; i < number_of_lan_alert_destinations; i++) { if (!(section = ipmi_config_pef_lan_alert_destination_section_get (state_data, i + 1, state_data->lan_channel_config_flags, channelindex))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } } } /* Alert_String Section(s) */ for (i = 0; i <= number_of_alert_strings; i++) { if (!(section = ipmi_config_pef_alert_string_section_get (state_data, i))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } /* Alert_Policy Section(s) */ for (i = 0; i < number_of_alert_policy_entries; i++) { if (!(section = ipmi_config_pef_alert_policy_table_section_get (state_data, i + 1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } /* Event_Filter Section(s) */ for (i = 0; i < number_of_event_filters; i++) { if (!(section = ipmi_config_pef_event_filter_table_section_get (state_data, i + 1))) goto cleanup; if (ipmi_config_section_append (§ions, section) < 0) goto cleanup; } return (sections); cleanup: ipmi_config_sections_destroy (sections); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-pef-sections.h0000644002055400205540000000170513527331635024250 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_PEF_SECTIONS #define IPMI_CONFIG_CATEGORY_PEF_SECTIONS #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_pef_sections_create (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_PEF_SECTIONS */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-discrete-section.c0000644002055400205540000000547113527331635026606 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-category-sensors-sensor-event-enable-common.h" #include "ipmi-config-category-sensors-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" ipmi_config_err_t ipmi_config_sensors_discrete_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section **section_ptr) { struct ipmi_config_section *section = NULL; char section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN + 1]; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_ptr); memset (section_name, '\0', IPMI_CONFIG_MAX_SECTION_NAME_LEN + 1); if ((ret = ipmi_config_sensors_create_section_name (state_data, section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_config_sensors_create_section_name: %s\n", strerror (errno)); goto cleanup; } if (!(section = ipmi_config_section_create (state_data, section_name, NULL, NULL, 0, NULL, NULL))) goto cleanup; if (setup_sensor_event_enable_fields (state_data, section) < 0) goto cleanup; *section_ptr = section; return (IPMI_CONFIG_ERR_SUCCESS); cleanup: if (section) ipmi_config_section_destroy (section); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-discrete-section.h0000644002055400205540000000207313527331635026606 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_SENSORS_DISCRETE_SECTION_H #define IPMI_CONFIG_CATEGORY_SENSORS_DISCRETE_SECTION_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_sensors_discrete_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section **section_ptr); #endif /* IPMI_CONFIG_CATEGORY_SENSORS_DISCRETE_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-sections.c0000644002055400205540000001360713527331635025171 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-category-sensors-sections.h" #include "ipmi-config-category-sensors-discrete-section.h" #include "ipmi-config-category-sensors-threshold-section.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" struct ipmi_config_sensors_sdr_callback { ipmi_config_state_data_t *state_data; struct ipmi_config_section *sections; }; static int _sections_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_config_sensors_sdr_callback *sdr_callback_arg; ipmi_config_state_data_t *state_data; struct ipmi_config_section *section = NULL; uint8_t event_reading_type_code; int event_reading_type_code_class; ipmi_config_err_t ret; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_config_sensors_sdr_callback *)arg; state_data = sdr_callback_arg->state_data; /* achu: * * Technically, the IPMI spec lists that compact record formats * also support settable thresholds. However, since compact * records don't contain any information for interpreting * threshold sensors (e.g. R exponent) I don't know how they * could be of any use. No vendor that I know of supports * threshold sensors via a compact record (excluding possible * OEM ones). * * There's a part of me that believes the readable/setting * threshold masks for compact sensor records is a cut and paste * typo. It shouldn't be there. */ if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) { if (state_data->prog_data->args->verbose_count) pstdout_fprintf (state_data->pstate, stderr, "## Cannot handle SDR record format '0x%X'\n", record_type); return (0); } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, sdr_record, sdr_record_len, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unable to handle threshold sensor with compact SDR record\n"); return (0); } if ((ret = ipmi_config_sensors_threshold_section (state_data, §ion)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) return (-1); return (0); } } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if ((ret = ipmi_config_sensors_discrete_section (state_data, §ion)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) return (-1); return (0); } } else { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "## Cannot handle SDR with event reading type code '0x%X'\n", event_reading_type_code); return (0); } if (ipmi_config_section_append (&sdr_callback_arg->sections, section) < 0) return (-1); return (0); } struct ipmi_config_section * ipmi_config_sensors_sections_create (ipmi_config_state_data_t *state_data) { struct ipmi_config_sensors_sdr_callback sdr_callback_arg; assert (state_data); sdr_callback_arg.state_data = state_data; sdr_callback_arg.sections = NULL; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _sections_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } return (sdr_callback_arg.sections); cleanup: ipmi_config_sections_destroy (sdr_callback_arg.sections); return (NULL); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-sections.h0000644002055400205540000000173313527331635025173 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_SENSORS_SECTIONS_H #define IPMI_CONFIG_CATEGORY_SENSORS_SECTIONS_H #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_sensors_sections_create (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_CATEGORY_SENSORS_SECTIONS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-sensor-event-enable-common.c0000644002055400205540000020474613527331635030512 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-category-sensors-utils.h" #include "ipmi-config-utils.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" /* event field strings */ /* achu: making a generic "convert event message string into * key_name" for this tool was difficult. There are too many * conversions and exceptions to the rules (abbreviations, slashes, * spaces, hypens, spaces w/ hyphens, single quotes, double quotes, * examples, parentheses, strings that are too long, wierd * capitalization, need lower cases, etc.) that strings never * turned out right. I decided to just hard code names in at the * end of the day. */ char *threshold_event_strings[] = { "Lower_Non_Critical_Going_Low", "Lower_Non_Critical_Going_High", "Lower_Critical_Going_Low", "Lower_Critical_Going_High", "Lower_Non_Recoverable_Going_Low", "Lower_Non_Recoverable_Going_High", "Upper_Non_Critical_Going_Low", "Upper_Non_Critical_Going_High", "Upper_Critical_Going_Low", "Upper_Critical_Going_High", "Upper_Non_Recoverable_Going_Low", "Upper_Non_Recoverable_Going_High", NULL, }; char *generic_event_strings_0x02[] = { "Transition_to_Idle", "Transition_to_Active", "Transition_to_Busy", NULL, }; char *generic_event_strings_0x03[] = { "State_Deasserted", "State_Asserted", NULL, }; char *generic_event_strings_0x04[] = { "Predictive_Failure_Deasserted", "Predictive_Failure_Asserted", NULL, }; char *generic_event_strings_0x05[] = { "Limit_Not_Exceeded", "Limit_Exceeded", NULL, }; char *generic_event_strings_0x06[] = { "Performance_Met", "Performance_Lags", NULL, }; char *generic_event_strings_0x07[] = { "Transition_to_OK", "Transition_to_Non_Critical_from_OK", "Transition_to_Critical_from_Less_Severe", "Transition_to_Non_Recoverable_from_Less_Severe", "Transition_to_Non_Critical_from_More_Severe", "Transition_to_Critical_from_Non_Recoverable", "Transition_to_Non_Recoverable", "Monitor", "Informational", NULL, }; char *generic_event_strings_0x08[] = { "Device_Removed_or_Device_Absent", "Device_Inserted_or_Device_Present", NULL, }; char *generic_event_strings_0x09[] = { "Device_Disabled", "Device_Enabled", NULL, }; char *generic_event_strings_0x0A[] = { "Transition_to_Running", "Transition_to_In_Test", "Transition_to_Power_Off", "Transition_to_On_Line", "Transition_to_Off_Line", "Transition_to_Off_Duty", "Transition_to_Degraded", "Transition_to_Power_Save", "Install_Error", NULL, }; char *generic_event_strings_0x0B[] = { "Fully_Redundant", "Redundancy_Lost", "Redundancy_Degraded", "Entered_from_Redundancy_Degraded_or_Fully_Redundant", "Entered_from_Non_Redundant_Insufficient_Resources", "Non_Redundant_Insufficient_Resources", "Redundancy_Degraded_from_Fully_Redundant", "Redundancy_Degraded_from_Non_Redundant", NULL, }; char *generic_event_strings_0x0C[] = { "D0_Power_State", "D1_Power_State", "D2_Power_State", "D3_Power_State", NULL, }; char *sensor_specific_event_strings_physical_security_chassis_intrusion[] = { "General_Chassis_Intrusion", "Drive_Bay_Intrusion", "IO_Card_Area_Intrusion", "Processor_Area_Intrusion", "LAN_Leash_Lost", "Unauthorized_Dock", "FAN_Area_Intrusion", NULL, }; char *sensor_specific_event_strings_platform_security_violation_attempt[] = { "Secure_Mode_Violation_Attempt", "Pre_Boot_Password_Violation_User_Password", "Pre_Boot_Password_Violation_Attempt_Setup_Password", "Pre_Boot_Password_Violation_Network_Boot_Password", "Other_Pre_Boot_Password_Violation", "Out_of_Band_Access_Password_Violation", NULL, }; char *sensor_specific_event_strings_processor[] = { "IERR", "Thermal_Trip", "FRB1_BIST_failure", "FRB2_Hang_In_POST_Failure", "FRB3_Processor_Startup_Initialization_Failure", "Configuration_Error", "SM_BIOS_Uncorrectable_CPU_Complex_Error", "Processor_Presence_detected", "Processor_Disabled", "Terminator_Presence_Detected", "Processor_Automatically_Throttled", NULL, }; char *sensor_specific_event_strings_power_supply[] = { "Presence_Detected", "Power_Supply_Failure_Detected", "Predictive_Failure", "Power_Supply_Input_Lost_AC_DC", "Power_Supply_Input_Lost_or_Out_of_Range", "Power_Supply_Input_Out_of_Range_but_Present", "Configuration_Error", NULL, }; char *sensor_specific_event_strings_power_unit[] = { "Power_Off_or_Power_Down", "Power_Cycle", "240VA_Power_Down", "Interlock_Power_Down", "AC_Lost", "Soft_Power_Control_Failure", "Power_Unit_Failure_Detected", "Predictive_Failure", NULL, }; char *sensor_specific_event_strings_memory[] = { "Correctable_ECC", "Uncorrectable_ECC", "Parity", "Memory_Scrub_Failed", "Memory_Device_Disabled", "Correctable_ECC_Logging_Limit_Reached", "Presence_Detected", "Configuration_Error", "Spare", "Memory_Automatically_Throttled", "Critical_Overtemperature", NULL, }; char *sensor_specific_event_strings_drive_slot[] = { "Drive_Presence", "Drive_Fault", "Predictive_Failure", "Hot_Spare", "Consistency_Check_In_Progress", "In_Critical_Array", "In_Failed_Array", "Rebuild_or_Remap_In_Progress", "Rebuild_or_Remap_Aborted", NULL, }; char *sensor_specific_event_strings_system_firmware_progress[] = { "System_Firmware_Error", "System_Firmware_Hang", "System_Firmware_Progress", NULL, }; char *sensor_specific_event_strings_event_logging_disabled[] = { "Correctable_Memory_Error_Logging_Disabled", "Event_Type_Logging_Disabled", "Log_Area_Reset_or_Cleared", "All_Event_Logging_Disabled", "SEL_Full", "SEL_Almost_Full", NULL, }; char *sensor_specific_event_strings_system_event[] = { "System_Reconfigured", "OEM_System_Boot_Event", "Undetermined_System_Hardware_Failure", "Entry_Added_to_Auxiliary_Log", "PEF_Action", "Timestamp_Clock_Synch", NULL, }; char *sensor_specific_event_strings_critical_interrupt[] = { "Front_Panel_NMI_or_Diagnostic_Interrupt", "Bus_Timeout", "IO_Channel_Check_NMI", "Software_NMI", "PCI_PERR", "PCI_SERR", "EISA_Fail_Safe_Timeout", "Bus_Correctable_Error", "Bus_Uncorrectable_Error", "Fatal_NMI", "Bus_Fatal_Error", "Bus_Degraded", NULL, }; char *sensor_specific_event_strings_cable_interconnect[] = { "Cable_Interconnect_Is_Connected", "Configuration_Error_Incorrect_Cable_Connected_or_Incorrect_Interconnection", NULL, }; char *sensor_specific_event_strings_boot_error[] = { "No_Bootable_Media", "Non_Bootable_Diskette_Left_In_Drive", "PXE_Server_Not_Found", "Invalid_Boot_Sector", "Timeout_Waiting_For_User_Selection_Of_Boot_Source", NULL, }; char *sensor_specific_event_strings_slot_connector[] = { "Fault_Status_Asserted", "Identify_Status_Asserted", "Slot_Connector_Device_Installed_or_Attached", "Slot_Connector_Ready_For_Device_Installation", "Slot_Connector_Ready_For_Device_Removal", "Slot_Power_Is_Off", "Slot_Connector_Device_Removal_Request", "Interlock_Asserted", "Slot_Is_Disabled", "Slot_Holds_Spare_Device", NULL, }; /* event state 4-7 are "reserved" and useless */ char *sensor_specific_event_strings_watchdog2[] = { "Timer_Expired", "Hard_Reset", "Power_Down", "Power_Cycle", "reserved", "reserved", "reserved", "reserved", "Timer_Interrupt", NULL, }; int sensor_specific_event_strings_watchdog2_indexes[] = { 0, 1, 2, 3, 8, -1}; char *sensor_specific_event_strings_entity_presence[] = { "Entity_Present", "Entity_Absent", "Entity_Disabled", NULL, }; char *sensor_specific_event_strings_management_subsystem_health[] = { "Sensor_Access_Degraded_or_Unavailable", "Controller_Access_Degraded_or_Unavailable", "Management_Controller_Off_Line", "Management_Controller_Unavailable", "Sensor_Failure", "FRU_Failure", NULL, }; char *sensor_specific_event_strings_battery[] = { "Battery_Low", "Battery_Failed", "Battery_Presence_Detected", NULL, }; char *sensor_specific_event_strings_fru_state[] = { "FRU_Not_Installed", "FRU_Inactive", "FRU_Activation_Requested", "FRU_Activation_In_Progress", "FRU_Active", "FRU_Deactivation_Requested", "FRU_Deactivation_In_Progress", "FRU_Communication_Lost", NULL, }; /* convenience structs */ struct sensor_event_enable_data { uint8_t all_event_messages; uint8_t scanning_on_this_sensor; uint16_t assertion_bits; uint16_t deassertion_bits; }; #define KEY_NAME_MAX_LEN 1024 typedef int (*Sdr_event_flags_func)(ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *event_state_0, uint8_t *event_state_1, uint8_t *event_state_2, uint8_t *event_state_3, uint8_t *event_state_4, uint8_t *event_state_5, uint8_t *event_state_6, uint8_t *event_state_7, uint8_t *event_state_8, uint8_t *event_state_9, uint8_t *event_state_10, uint8_t *event_state_11, uint8_t *event_state_12, uint8_t *event_state_13, uint8_t *event_state_14); typedef int (*Sdr_threshold_event_flags_func)(ipmi_sdr_ctx_t ctx, const void *sdr_record, unsigned int sdr_record_len, uint8_t *lower_non_critical_going_low, uint8_t *lower_non_critical_going_high, uint8_t *lower_critical_going_low, uint8_t *lower_critical_going_high, uint8_t *lower_non_recoverable_going_low, uint8_t *lower_non_recoverable_going_high, uint8_t *upper_non_critical_going_low, uint8_t *upper_non_critical_going_high, uint8_t *upper_critical_going_low, uint8_t *upper_critical_going_high, uint8_t *upper_non_recoverable_going_low, uint8_t *upper_non_recoverable_going_high); static ipmi_config_err_t _get_sensor_event_enable (ipmi_config_state_data_t *state_data, const char *section_name, struct sensor_event_enable_data *data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t sensor_number; int field_flag; uint64_t val; assert (state_data); assert (section_name); assert (data); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_event_enable_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sensor_event_enable (state_data->ipmi_ctx, sensor_number, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_event_enable: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "all_event_messages", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'all_event_messages': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->all_event_messages = val; if (FIID_OBJ_GET (obj_cmd_rs, "scanning_on_this_sensor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'scanning_on_this_sensor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } data->scanning_on_this_sensor = val; if (data->all_event_messages == IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE) { data->assertion_bits = 0; data->deassertion_bits = 0; goto out; } if ((field_flag = fiid_obj_get (obj_cmd_rs, "assertion_event_bitmask", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'assertion_event_bitmask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* assertion event bitmask need not be returned */ if (field_flag) data->assertion_bits = val; else data->assertion_bits = 0; if ((field_flag = fiid_obj_get (obj_cmd_rs, "deassertion_event_bitmask", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'deassertion_event_bitmask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* deassertion event bitmask need not be returned */ if (field_flag) data->deassertion_bits = val; else data->deassertion_bits = 0; out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _set_sensor_event_enable (ipmi_config_state_data_t *state_data, const char *section_name, struct sensor_event_enable_data *data, uint8_t event_message_action) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t sensor_number; assert (state_data); assert (section_name); assert (data); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sensor_event_enable_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sensor_event_enable (state_data->ipmi_ctx, sensor_number, event_message_action, data->scanning_on_this_sensor, data->all_event_messages, data->assertion_bits, data->deassertion_bits, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sensor_event_enable: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t sensor_event_enable_enable_all_event_messages_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sensor_event_enable (state_data, section_name, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.all_event_messages ? "Yes" : "No") < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t sensor_event_enable_enable_all_event_messages_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sensor_event_enable (state_data, section_name, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* clear bits just in case, we're not setting anything here */ data.assertion_bits = 0; data.deassertion_bits = 0; data.all_event_messages = same (kv->value_input, "yes"); if ((ret = _set_sensor_event_enable (state_data, section_name, &data, IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t sensor_event_enable_enable_scanning_on_this_sensor_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sensor_event_enable (state_data, section_name, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, data.scanning_on_this_sensor ? "Yes" : "No") < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t sensor_event_enable_enable_scanning_on_this_sensor_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _get_sensor_event_enable (state_data, section_name, &data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* clear bits just in case, we're not setting anything here */ data.assertion_bits = 0; data.deassertion_bits = 0; data.scanning_on_this_sensor = same (kv->value_input, "yes"); if ((ret = _set_sensor_event_enable (state_data, section_name, &data, IPMI_SENSOR_EVENT_MESSAGE_ACTION_DO_NOT_CHANGE_INDIVIDUAL_ENABLES)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } int _setup_event_enable_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *key_name, uint8_t event_supported, Key_Checkout checkout_func, Key_Commit commit_func) { unsigned int flags = 0; assert (state_data); assert (section); assert (key_name); assert (checkout_func); assert (commit_func); if (event_supported || state_data->prog_data->args->verbose_count) { if (!event_supported) flags |= IPMI_CONFIG_UNDEFINED; if (ipmi_config_section_add_key (state_data, section, key_name, "Possible values: Yes/No", flags, checkout_func, commit_func, yes_no_validate) < 0) goto cleanup; } return (0); cleanup: return (-1); } static ipmi_config_err_t _threshold_event_enable_verify (ipmi_config_state_data_t *state_data, const char *section_name) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_reading_type_code; int event_reading_type_code_class; assert (state_data); assert (section_name); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Attempting to access threshold event in non-threshold sensor\n"); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t _threshold_event_enable_get_data (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv, struct sensor_event_enable_data *data, uint16_t *bits, uint8_t *bitposition) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; int found = 0; int i; assert (state_data); assert (section_name); assert (kv); assert (data); assert (bits); assert (bitposition); if ((ret = _get_sensor_event_enable (state_data, section_name, data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (stristr (kv->key->key_name, "Deassertion")) (*bits) = data->deassertion_bits; else (*bits) = data->assertion_bits; i = 0; while (threshold_event_strings[i]) { if (stristr (kv->key->key_name, threshold_event_strings[i])) { (*bitposition) = i; found++; break; } i++; } if (!found) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unrecognized section:key_name: %s:%s\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t threshold_event_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (kv); if ((ret = _threshold_event_enable_verify (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _threshold_event_enable_get_data (state_data, section_name, kv, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ((bits >> bitposition) & 0x1) ? "Yes" : "No") < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t threshold_event_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_message_action; assert (state_data); assert (section_name); assert (kv); if ((ret = _threshold_event_enable_verify (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _threshold_event_enable_get_data (state_data, section_name, kv, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* due to set sensor event enable mechanics, we need to clear the bits */ data.assertion_bits = 0; data.deassertion_bits = 0; if (stristr (kv->key->key_name, "Deassertion")) data.deassertion_bits = (0x1 << bitposition); else data.assertion_bits = (0x1 << bitposition); if (same (kv->value_input, "yes")) event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES; else event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES; if ((ret = _set_sensor_event_enable (state_data, section_name, &data, event_message_action)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static int _setup_threshold_event_enable_wrapper (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *type_str, Sdr_threshold_event_flags_func sdr_call) { uint8_t lower_non_critical_going_low = 0; uint8_t lower_non_critical_going_high = 0; uint8_t lower_critical_going_low = 0; uint8_t lower_critical_going_high = 0; uint8_t lower_non_recoverable_going_low = 0; uint8_t lower_non_recoverable_going_high = 0; uint8_t upper_non_critical_going_low = 0; uint8_t upper_non_critical_going_high = 0; uint8_t upper_critical_going_low = 0; uint8_t upper_critical_going_high = 0; uint8_t upper_non_recoverable_going_low = 0; uint8_t upper_non_recoverable_going_high = 0; char key_name[KEY_NAME_MAX_LEN]; uint16_t bitmask = 0; int rv = -1; int i; assert (state_data); assert (section); assert (type_str); assert (sdr_call); if (((*sdr_call)(state_data->sdr_ctx, NULL, 0, &lower_non_critical_going_low, &lower_non_critical_going_high, &lower_critical_going_low, &lower_critical_going_high, &lower_non_recoverable_going_low, &lower_non_recoverable_going_high, &upper_non_critical_going_low, &upper_non_critical_going_high, &upper_critical_going_low, &upper_critical_going_high, &upper_non_recoverable_going_low, &upper_non_recoverable_going_high)) < 0) goto cleanup; /* create bitmask to make things easier */ bitmask |= (lower_non_critical_going_low & 0x1); bitmask |= ((lower_non_critical_going_high & 0x1) << 1); bitmask |= ((lower_critical_going_low & 0x1) << 2); bitmask |= ((lower_critical_going_high & 0x1) << 3); bitmask |= ((lower_non_recoverable_going_low & 0x1) << 4); bitmask |= ((lower_non_recoverable_going_high & 0x1) << 5); bitmask |= ((upper_non_critical_going_low & 0x1) << 6); bitmask |= ((upper_non_critical_going_high & 0x1) << 7); bitmask |= ((upper_critical_going_low & 0x1) << 8); bitmask |= ((upper_critical_going_high & 0x1) << 9); bitmask |= ((upper_non_recoverable_going_low & 0x1) << 10); bitmask |= ((upper_non_recoverable_going_high & 0x1) << 11); i = 0; while (threshold_event_strings[i]) { snprintf (key_name, KEY_NAME_MAX_LEN, "Enable_%s_Event_%s", type_str, threshold_event_strings[i]); if (_setup_event_enable_key (state_data, section, key_name, ((bitmask >> i) & 0x1), threshold_event_enable_checkout, threshold_event_enable_commit) < 0) goto cleanup; i++; } rv = 0; cleanup: return (rv); } int _setup_threshold_event_enable (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section) { int rv = -1; assert (state_data); assert (section); if (_setup_threshold_event_enable_wrapper (state_data, section, "Assertion", &ipmi_sdr_parse_threshold_assertion_supported) < 0) goto cleanup; if (_setup_threshold_event_enable_wrapper (state_data, section, "Deassertion", &ipmi_sdr_parse_threshold_deassertion_supported) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _get_event_state_bitmask (ipmi_config_state_data_t *state_data, Sdr_event_flags_func sdr_call, uint16_t *bitmask) { uint8_t event_state_0 = 0; uint8_t event_state_1 = 0; uint8_t event_state_2 = 0; uint8_t event_state_3 = 0; uint8_t event_state_4 = 0; uint8_t event_state_5 = 0; uint8_t event_state_6 = 0; uint8_t event_state_7 = 0; uint8_t event_state_8 = 0; uint8_t event_state_9 = 0; uint8_t event_state_10 = 0; uint8_t event_state_11 = 0; uint8_t event_state_12 = 0; uint8_t event_state_13 = 0; uint8_t event_state_14 = 0; int rv = -1; assert (state_data); assert (sdr_call); assert (bitmask); if (((*sdr_call)(state_data->sdr_ctx, NULL, 0, &event_state_0, &event_state_1, &event_state_2, &event_state_3, &event_state_4, &event_state_5, &event_state_6, &event_state_7, &event_state_8, &event_state_9, &event_state_10, &event_state_11, &event_state_12, &event_state_13, &event_state_14)) < 0) goto cleanup; (*bitmask) = 0; (*bitmask) |= (event_state_0 & 0x1); (*bitmask) |= ((event_state_1 & 0x1) << 1); (*bitmask) |= ((event_state_2 & 0x1) << 2); (*bitmask) |= ((event_state_3 & 0x1) << 3); (*bitmask) |= ((event_state_4 & 0x1) << 4); (*bitmask) |= ((event_state_5 & 0x1) << 5); (*bitmask) |= ((event_state_6 & 0x1) << 6); (*bitmask) |= ((event_state_7 & 0x1) << 7); (*bitmask) |= ((event_state_8 & 0x1) << 8); (*bitmask) |= ((event_state_9 & 0x1) << 9); (*bitmask) |= ((event_state_10 & 0x1) << 10); (*bitmask) |= ((event_state_11 & 0x1) << 11); (*bitmask) |= ((event_state_12 & 0x1) << 12); (*bitmask) |= ((event_state_13 & 0x1) << 13); (*bitmask) |= ((event_state_14 & 0x1) << 14); rv = 0; cleanup: return (rv); } static ipmi_config_err_t _generic_event_enable_verify (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *event_reading_type_code_ptr) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_reading_type_code; int event_reading_type_code_class; assert (state_data); assert (section_name); assert (event_reading_type_code_ptr); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Attempting to access generic event in non-generic sensor\n"); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*event_reading_type_code_ptr) = event_reading_type_code; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static char ** _generic_event_enable_get_event_strings (ipmi_config_state_data_t *state_data, uint8_t event_reading_type_code) { assert (state_data); /* achu: I'm sorry. But these fields have no description in the * IPMI spec, so there is no macro for them. So I'm hard coding * hex in. Please see see Table 42-2 in the IPMI spec. */ switch (event_reading_type_code) { case 0x02: return (&generic_event_strings_0x02[0]); case 0x03: return (&generic_event_strings_0x03[0]); case 0x04: return (&generic_event_strings_0x04[0]); case 0x05: return (&generic_event_strings_0x05[0]); case 0x06: return (&generic_event_strings_0x06[0]); case 0x07: return (&generic_event_strings_0x07[0]); case 0x08: return (&generic_event_strings_0x08[0]); case 0x09: return (&generic_event_strings_0x09[0]); case 0x0A: return (&generic_event_strings_0x0A[0]); case 0x0B: return (&generic_event_strings_0x0B[0]); case 0x0C: return (&generic_event_strings_0x0C[0]); } return (NULL); } static ipmi_config_err_t _generic_event_enable_get_data (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv, uint8_t event_reading_type_code, struct sensor_event_enable_data *data, uint16_t *bits, uint8_t *bitposition) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; char **event_strings = NULL; int found = 0; int i; assert (state_data); assert (section_name); assert (kv); assert (data); assert (bits); assert (bitposition); if ((ret = _get_sensor_event_enable (state_data, section_name, data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (stristr (kv->key->key_name, "Deassertion")) (*bits) = data->deassertion_bits; else (*bits) = data->assertion_bits; event_strings = _generic_event_enable_get_event_strings (state_data, event_reading_type_code); if (!event_strings) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unable to handle event flags for event reading type code 0x%X\n", event_reading_type_code); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } i = 0; while (event_strings[i]) { if (stristr (kv->key->key_name, event_strings[i])) { (*bitposition) = i; found++; break; } i++; } if (!found) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unrecognized section:key_name: %s:%s\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t generic_event_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_reading_type_code; assert (state_data); assert (section_name); assert (kv); if ((ret = _generic_event_enable_verify (state_data, section_name, &event_reading_type_code)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _generic_event_enable_get_data (state_data, section_name, kv, event_reading_type_code, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ((bits >> bitposition) & 0x1) ? "Yes" : "No") < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t generic_event_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_reading_type_code; uint8_t event_message_action; assert (state_data); assert (section_name); assert (kv); if ((ret = _generic_event_enable_verify (state_data, section_name, &event_reading_type_code)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _generic_event_enable_get_data (state_data, section_name, kv, event_reading_type_code, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* due to set sensor event enable mechanics, we need to clear the bits */ data.assertion_bits = 0; data.deassertion_bits = 0; if (stristr (kv->key->key_name, "Deassertion")) data.deassertion_bits = (0x1 << bitposition); else data.assertion_bits = (0x1 << bitposition); if (same (kv->value_input, "yes")) event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES; else event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES; if ((ret = _set_sensor_event_enable (state_data, section_name, &data, event_message_action)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static int _setup_generic_event_enable_wrapper (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *type_str, Sdr_event_flags_func sdr_call, uint8_t event_reading_type_code) { char key_name[KEY_NAME_MAX_LEN]; char **event_strings = NULL; uint16_t bitmask = 0; int rv = -1; int i; assert (state_data); assert (section); assert (type_str); assert (sdr_call); if (_get_event_state_bitmask (state_data, sdr_call, &bitmask) < 0) goto cleanup; event_strings = _generic_event_enable_get_event_strings (state_data, event_reading_type_code); if (!event_strings) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unable to handle event flags for event reading type code 0x%X\n", event_reading_type_code); rv = 0; goto cleanup; } i = 0; while (event_strings[i]) { snprintf (key_name, KEY_NAME_MAX_LEN, "Enable_%s_Event_%s", type_str, event_strings[i]); if (_setup_event_enable_key (state_data, section, key_name, ((bitmask >> i) & 0x1), generic_event_enable_checkout, generic_event_enable_commit) < 0) goto cleanup; i++; } rv = 0; cleanup: return (rv); } int _setup_generic_event_enable (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, uint8_t event_reading_type_code) { int rv = -1; assert (state_data); assert (section); if (_setup_generic_event_enable_wrapper (state_data, section, "Assertion", &ipmi_sdr_parse_assertion_supported, event_reading_type_code) < 0) goto cleanup; if (_setup_generic_event_enable_wrapper (state_data, section, "Deassertion", &ipmi_sdr_parse_deassertion_supported, event_reading_type_code) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static ipmi_config_err_t _sensor_specific_event_enable_verify (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *sensor_type_ptr) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t event_reading_type_code; uint8_t sensor_type; int event_reading_type_code_class; assert (state_data); assert (section_name); assert (sensor_type_ptr); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Attempting to access sensor-specific event in non-sensor-specific sensor\n"); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } (*sensor_type_ptr) = sensor_type; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static char ** _sensor_specific_event_enable_get_event_strings (ipmi_config_state_data_t *state_data, uint8_t sensor_type) { assert (state_data); switch (sensor_type) { case IPMI_SENSOR_TYPE_PHYSICAL_SECURITY: return (&sensor_specific_event_strings_physical_security_chassis_intrusion[0]); case IPMI_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return (&sensor_specific_event_strings_platform_security_violation_attempt[0]); case IPMI_SENSOR_TYPE_PROCESSOR: return (&sensor_specific_event_strings_processor[0]); case IPMI_SENSOR_TYPE_POWER_SUPPLY: return (&sensor_specific_event_strings_power_supply[0]); case IPMI_SENSOR_TYPE_POWER_UNIT: return (&sensor_specific_event_strings_power_unit[0]); case IPMI_SENSOR_TYPE_MEMORY: return (&sensor_specific_event_strings_memory[0]); case IPMI_SENSOR_TYPE_DRIVE_SLOT: return (&sensor_specific_event_strings_drive_slot[0]); case IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return (&sensor_specific_event_strings_system_firmware_progress[0]); case IPMI_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return (&sensor_specific_event_strings_event_logging_disabled[0]); case IPMI_SENSOR_TYPE_SYSTEM_EVENT: return (&sensor_specific_event_strings_system_event[0]); case IPMI_SENSOR_TYPE_CRITICAL_INTERRUPT: return (&sensor_specific_event_strings_critical_interrupt[0]); case IPMI_SENSOR_TYPE_CABLE_INTERCONNECT: return (&sensor_specific_event_strings_cable_interconnect[0]); case IPMI_SENSOR_TYPE_BOOT_ERROR: return (&sensor_specific_event_strings_boot_error[0]); case IPMI_SENSOR_TYPE_SLOT_CONNECTOR: return (&sensor_specific_event_strings_slot_connector[0]); case IPMI_SENSOR_TYPE_WATCHDOG2: return (&sensor_specific_event_strings_watchdog2[0]); case IPMI_SENSOR_TYPE_ENTITY_PRESENCE: return (&sensor_specific_event_strings_entity_presence[0]); case IPMI_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return (&sensor_specific_event_strings_management_subsystem_health[0]); case IPMI_SENSOR_TYPE_BATTERY: return (&sensor_specific_event_strings_battery[0]); case IPMI_SENSOR_TYPE_FRU_STATE: return (&sensor_specific_event_strings_fru_state[0]); } return (NULL); } static ipmi_config_err_t _sensor_specific_event_enable_get_data (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv, uint8_t sensor_type, struct sensor_event_enable_data *data, uint16_t *bits, uint8_t *bitposition) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; char **event_strings = NULL; int found = 0; int i; assert (state_data); assert (section_name); assert (kv); assert (data); assert (bits); assert (bitposition); if ((ret = _get_sensor_event_enable (state_data, section_name, data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (stristr (kv->key->key_name, "Deassertion")) (*bits) = data->deassertion_bits; else (*bits) = data->assertion_bits; event_strings = _sensor_specific_event_enable_get_event_strings (state_data, sensor_type); if (!event_strings) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unable to handle event flags for sensor type 0x%X\n", sensor_type); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } i = 0; /* special case - event state 4-7 are "reserved" and useless */ if (sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) { while (sensor_specific_event_strings_watchdog2_indexes[i] >= 0) { if (stristr (kv->key->key_name, event_strings[sensor_specific_event_strings_watchdog2_indexes[i]])) { (*bitposition) = sensor_specific_event_strings_watchdog2_indexes[i]; found++; break; } i++; } } else { while (event_strings[i]) { if (stristr (kv->key->key_name, event_strings[i])) { (*bitposition) = i; found++; break; } i++; } } if (!found) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unrecognized section:key_name: %s:%s\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t sensor_specific_event_enable_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t sensor_type; assert (state_data); assert (section_name); assert (kv); if ((ret = _sensor_specific_event_enable_verify (state_data, section_name, &sensor_type)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _sensor_specific_event_enable_get_data (state_data, section_name, kv, sensor_type, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output (state_data, kv, ((bits >> bitposition) & 0x1) ? "Yes" : "No") < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t sensor_specific_event_enable_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { struct sensor_event_enable_data data; uint16_t bits = 0; uint8_t bitposition = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t sensor_type; uint8_t event_message_action; assert (state_data); assert (section_name); assert (kv); if ((ret = _sensor_specific_event_enable_verify (state_data, section_name, &sensor_type)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if ((ret = _sensor_specific_event_enable_get_data (state_data, section_name, kv, sensor_type, &data, &bits, &bitposition)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* due to set sensor event enable mechanics, we need to clear the bits */ data.assertion_bits = 0; data.deassertion_bits = 0; if (stristr (kv->key->key_name, "Deassertion")) data.deassertion_bits = (0x1 << bitposition); else data.assertion_bits = (0x1 << bitposition); if (same (kv->value_input, "yes")) event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_ENABLE_SELECTED_EVENT_MESSAGES; else event_message_action = IPMI_SENSOR_EVENT_MESSAGE_ACTION_DISABLE_SELECTED_EVENT_MESSAGES; if ((ret = _set_sensor_event_enable (state_data, section_name, &data, event_message_action)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static int _setup_sensor_specific_event_enable_wrapper (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *type_str, Sdr_event_flags_func sdr_call) { char key_name[KEY_NAME_MAX_LEN]; char **event_strings = NULL; uint16_t bitmask = 0; uint8_t sensor_type; int rv = -1; int i; assert (state_data); assert (section); assert (type_str); assert (sdr_call); if (_get_event_state_bitmask (state_data, sdr_call, &bitmask) < 0) goto cleanup; if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_strings = _sensor_specific_event_enable_get_event_strings (state_data, sensor_type); if (!event_strings) { if (state_data->prog_data->args->verbose_count) pstdout_printf (state_data->pstate, "## Unable to handle event flags for sensor type 0x%X\n", sensor_type); rv = 0; goto cleanup; } i = 0; /* special case - event state 4-7 are "reserved" and useless */ if (sensor_type == IPMI_SENSOR_TYPE_WATCHDOG2) { while (sensor_specific_event_strings_watchdog2_indexes[i] >= 0) { snprintf (key_name, KEY_NAME_MAX_LEN, "Enable_%s_Event_%s", type_str, event_strings[sensor_specific_event_strings_watchdog2_indexes[i]]); if (_setup_event_enable_key (state_data, section, key_name, ((bitmask >> sensor_specific_event_strings_watchdog2_indexes[i]) & 0x1), sensor_specific_event_enable_checkout, sensor_specific_event_enable_commit) < 0) goto cleanup; i++; } } else { i = 0; while (event_strings[i]) { snprintf (key_name, KEY_NAME_MAX_LEN, "Enable_%s_Event_%s", type_str, event_strings[i]); if (_setup_event_enable_key (state_data, section, key_name, ((bitmask >> i) & 0x1), sensor_specific_event_enable_checkout, sensor_specific_event_enable_commit) < 0) goto cleanup; i++; } } rv = 0; cleanup: return (rv); } int _setup_sensor_specific_event_enable (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, uint8_t event_reading_type_code) { int rv = -1; assert (state_data); assert (section); if (_setup_sensor_specific_event_enable_wrapper (state_data, section, "Assertion", &ipmi_sdr_parse_assertion_supported) < 0) goto cleanup; if (_setup_sensor_specific_event_enable_wrapper (state_data, section, "Deassertion", &ipmi_sdr_parse_deassertion_supported) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int setup_sensor_event_enable_fields (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section) { uint8_t event_message_control_support = 0; int rv = -1; assert (state_data); assert (section); if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, &event_message_control_support, NULL, NULL, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_capabilities: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* achu: I'm not quite sure what IPMI_SDR_GLOBAL_DISABLE_ONLY means. * Does it mean all sensors on the motherboard can be disabled * together? But one alone cannot? I'm going to assume that's what * it means. I'll have to come back to this if that's not the case. */ if (event_message_control_support == IPMI_SDR_PER_EVENT_ENABLE_DISABLE_SUPPORT || event_message_control_support == IPMI_SDR_ENTIRE_SENSOR_ONLY) { if (ipmi_config_section_add_key (state_data, section, "Enable_All_Event_Messages", "Possible values: Yes/No", 0, sensor_event_enable_enable_all_event_messages_checkout, sensor_event_enable_enable_all_event_messages_commit, yes_no_validate) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Enable_Scanning_On_This_Sensor", "Possible values: Yes/No", 0, sensor_event_enable_enable_scanning_on_this_sensor_checkout, sensor_event_enable_enable_scanning_on_this_sensor_commit, yes_no_validate) < 0) goto cleanup; } if (event_message_control_support == IPMI_SDR_PER_EVENT_ENABLE_DISABLE_SUPPORT) { uint8_t event_reading_type_code; int event_reading_type_code_class; if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (_setup_threshold_event_enable (state_data, section) < 0) goto cleanup; } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE) { if (_setup_generic_event_enable (state_data, section, event_reading_type_code) < 0) goto cleanup; } else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (_setup_sensor_specific_event_enable (state_data, section, event_reading_type_code) < 0) goto cleanup; } } rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-sensor-event-enable-common.h0000644002055400205540000000454413527331635030511 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_SENSORS_SENSOR_EVENT_ENABLE_COMMON_H #define IPMI_CONFIG_CATEGORY_SENSORS_SENSOR_EVENT_ENABLE_COMMON_H #include "ipmi-config.h" ipmi_config_err_t sensor_event_enable_enable_all_event_messages_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t sensor_event_enable_enable_all_event_messages_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); ipmi_config_err_t sensor_event_enable_enable_scanning_on_this_sensor_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv); ipmi_config_err_t sensor_event_enable_enable_scanning_on_this_sensor_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); int setup_sensor_event_enable_fields (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section); #endif /* IPMI_CONFIG_CATEGORY_SENSORS_SENSOR_EVENT_ENABLE_COMMON_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-threshold-section.c0000644002055400205540000014071013527331635026774 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-section.h" #include "ipmi-config-category-sensors-sensor-event-enable-common.h" #include "ipmi-config-category-sensors-utils.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" /* 3% range is what we'll go with right now */ #define THRESHOLD_RANGE_MIN_MULTIPLIER 0.97 #define THRESHOLD_RANGE_MAX_MULTIPLIER 1.03 #define UNRECOGNIZED_SENSOR_TYPE "Unrecognized" #define IPMI_CONFIG_CATEGORY_SENSORS_UNITS_BUFLEN 1024 static ipmi_config_err_t _get_sdr_decoding_data (ipmi_config_state_data_t *state_data, int8_t *r_exponent, int8_t *b_exponent, int16_t *m, int16_t *b, uint8_t *linearization, uint8_t *analog_data_format) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (r_exponent); assert (b_exponent); assert (m); assert (b); assert (linearization); assert (analog_data_format); if (ipmi_sdr_parse_sensor_decoding_data (state_data->sdr_ctx, NULL, 0, r_exponent, b_exponent, m, b, linearization, analog_data_format) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_decoding_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* if the sensor is not analog, this is most likely a bug in the * SDR, since we shouldn't be decoding a non-threshold sensor. */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (*analog_data_format)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Attempting to decode non-analog threshold\n"); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } /* if the sensor is non-linear, I just don't know what to do */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (*linearization)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Cannot decode non-linear threshold\n"); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t _decode_value (ipmi_config_state_data_t *state_data, uint8_t value_raw, double *value_calc) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (value_calc); if ((ret = _get_sdr_decoding_data (state_data, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, value_raw, value_calc) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t _decode_value_raw (ipmi_config_state_data_t *state_data, const char *threshold_input, uint8_t *threshold_raw) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; double threshold_value; char *ptr; assert (state_data); assert (threshold_input); assert (threshold_raw); if ((ret = _get_sdr_decoding_data (state_data, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } errno = 0; threshold_value = strtod (threshold_input, &ptr); if (errno || ptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "Invalid input: %s\n", threshold_input); /* fatal error, should have been validated earlier */ goto cleanup; } if (ipmi_sensor_decode_raw_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_value, threshold_raw) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_raw_value: %s\n", strerror (errno)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t threshold_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; char *readable_str; char *threshold_str; uint8_t readable; uint8_t threshold_raw; uint64_t val; double threshold_calc; uint8_t sensor_number; assert (state_data); assert (section_name); assert (kv); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_thresholds_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sensor_thresholds (state_data->ipmi_ctx, sensor_number, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; /* * IPMI Workaround (achu) * * Discovered on HP DL585 * * Seems that the HP machine doesn't support the "Get Sensor * Thresholds" command. 99% of the time if a command is invalid * on a remote machine, that's a fatal error and we should exit. * I suppose this is an exception though. We can continue on * even if this command isn't supported. The user just doesn't * get to configure these thresholds. */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_thresholds: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!strcasecmp (kv->key->key_name, "Lower_Non_Critical_Threshold")) { readable_str = "readable_thresholds.lower_non_critical_threshold"; threshold_str = "lower_non_critical_threshold"; } else if (!strcasecmp (kv->key->key_name, "Lower_Critical_Threshold")) { readable_str = "readable_thresholds.lower_critical_threshold"; threshold_str = "lower_critical_threshold"; } else if (!strcasecmp (kv->key->key_name, "Lower_Non_Recoverable_Threshold")) { readable_str = "readable_thresholds.lower_non_recoverable_threshold"; threshold_str = "lower_non_recoverable_threshold"; } else if (!strcasecmp (kv->key->key_name, "Upper_Non_Critical_Threshold")) { readable_str = "readable_thresholds.upper_non_critical_threshold"; threshold_str = "upper_non_critical_threshold"; } else if (!strcasecmp (kv->key->key_name, "Upper_Critical_Threshold")) { readable_str = "readable_thresholds.upper_critical_threshold"; threshold_str = "upper_critical_threshold"; } else if (!strcasecmp (kv->key->key_name, "Upper_Non_Recoverable_Threshold")) { readable_str = "readable_thresholds.upper_non_recoverable_threshold"; threshold_str = "upper_non_recoverable_threshold"; } else /* unknown key_name - fatal error */ goto cleanup; if (FIID_OBJ_GET (obj_cmd_rs, readable_str, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: '%s': %s\n", readable_str, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } readable = val; if (!readable) { /* Inconsistency w/ the SDR, should be readable */ if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "%s:%s - threshold not readable\n", section_name, kv->key->key_name); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, threshold_str, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: '%s': %s\n", threshold_str, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if ((ret = _decode_value (state_data, threshold_raw, &threshold_calc)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output_double (state_data, kv, threshold_calc) < 0) goto cleanup; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t threshold_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t *lower_non_critical_threshold_ptr = NULL; uint8_t *lower_critical_threshold_ptr = NULL; uint8_t *lower_non_recoverable_threshold_ptr = NULL; uint8_t *upper_non_critical_threshold_ptr = NULL; uint8_t *upper_critical_threshold_ptr = NULL; uint8_t *upper_non_recoverable_threshold_ptr = NULL; uint8_t threshold_raw; uint8_t sensor_number; assert (state_data); assert (section_name); assert (kv); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((ret = _decode_value_raw (state_data, kv->value_input, &threshold_raw)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!strcasecmp (kv->key->key_name, "Lower_Non_Critical_Threshold")) lower_non_critical_threshold_ptr = &threshold_raw; else if (!strcasecmp (kv->key->key_name, "Lower_Critical_Threshold")) lower_critical_threshold_ptr = &threshold_raw; else if (!strcasecmp (kv->key->key_name, "Lower_Non_Recoverable_Threshold")) lower_non_recoverable_threshold_ptr = &threshold_raw; else if (!strcasecmp (kv->key->key_name, "Upper_Non_Critical_Threshold")) upper_non_critical_threshold_ptr = &threshold_raw; else if (!strcasecmp (kv->key->key_name, "Upper_Critical_Threshold")) upper_critical_threshold_ptr = &threshold_raw; else if (!strcasecmp (kv->key->key_name, "Upper_Non_Recoverable_Threshold")) upper_non_recoverable_threshold_ptr = &threshold_raw; else /* unknown key_name - fatal error */ goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sensor_thresholds_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sensor_thresholds (state_data->ipmi_ctx, sensor_number, lower_non_critical_threshold_ptr, lower_critical_threshold_ptr, lower_non_recoverable_threshold_ptr, upper_non_critical_threshold_ptr, upper_critical_threshold_ptr, upper_non_recoverable_threshold_ptr, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sensor_thresholds: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t _get_hysteresis (ipmi_config_state_data_t *state_data, uint8_t sensor_number, uint8_t *positive_going_threshold_hysteresis_value, uint8_t *negative_going_threshold_hysteresis_value) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint64_t val; assert (state_data); assert (positive_going_threshold_hysteresis_value); assert (negative_going_threshold_hysteresis_value); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_hysteresis_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sensor_hysteresis (state_data->ipmi_ctx, sensor_number, IPMI_SENSOR_HYSTERESIS_MASK, obj_cmd_rs) < 0) { ipmi_config_err_t ret; if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_hysteresis: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "positive_going_threshold_hysteresis_value", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'positive_going_threshold_hysteresis_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } *positive_going_threshold_hysteresis_value = val; if (FIID_OBJ_GET (obj_cmd_rs, "negative_going_threshold_hysteresis_value", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'negative_going_threshold_hysteresis_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } *negative_going_threshold_hysteresis_value = val; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static ipmi_config_err_t hysteresis_threshold_checkout (ipmi_config_state_data_t *state_data, const char *section_name, struct ipmi_config_keyvalue *kv) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t positive_going_threshold_hysteresis_value; uint8_t negative_going_threshold_hysteresis_value; uint8_t value_raw; double value_calc; uint8_t hysteresis_support; uint8_t sensor_number; assert (state_data); assert (section_name); assert (kv); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, NULL, NULL, &hysteresis_support, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_capabilities: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* achu: shouldn't hit this, was calculated during section setup. * verbose mode should hit 'undefined' checkout */ if (hysteresis_support != IPMI_SDR_READABLE_HYSTERESIS_SUPPORT && hysteresis_support != IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((ret = _get_hysteresis (state_data, sensor_number, &positive_going_threshold_hysteresis_value, &negative_going_threshold_hysteresis_value)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (!strcasecmp (kv->key->key_name, "Positive_Going_Threshold_Hysteresis")) value_raw = positive_going_threshold_hysteresis_value; else if (!strcasecmp (kv->key->key_name, "Negative_Going_Threshold_Hysteresis")) value_raw = negative_going_threshold_hysteresis_value; else /* unknown key_name - fatal error */ goto cleanup; /* 0 means hysteresis is not used, so don't decode */ if (value_raw == 0) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "None") < 0) goto cleanup; } else { if ((ret = _decode_value (state_data, value_raw, &value_calc)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_config_section_update_keyvalue_output_double (state_data, kv, value_calc) < 0) goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } static ipmi_config_err_t hysteresis_threshold_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t positive_going_threshold_hysteresis_value; uint8_t negative_going_threshold_hysteresis_value; uint8_t value_raw; uint8_t hysteresis_support; uint8_t sensor_number; assert (state_data); assert (section_name); assert (kv); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, NULL, NULL, &hysteresis_support, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_capabilities: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* achu: shouldn't hit this, was calculated during section setup. */ if (hysteresis_support != IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((ret = _get_hysteresis (state_data, sensor_number, &positive_going_threshold_hysteresis_value, &negative_going_threshold_hysteresis_value)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } /* "None" means hysteresis is not used, so don't decode */ if (!strcasecmp (kv->value_input, "None")) value_raw = 0; else { if ((ret = _decode_value_raw (state_data, kv->value_input, &value_raw)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } } if (!strcasecmp (kv->key->key_name, "Positive_Going_Threshold_Hysteresis")) positive_going_threshold_hysteresis_value = value_raw; else if (!strcasecmp (kv->key->key_name, "Negative_Going_Threshold_Hysteresis" )) negative_going_threshold_hysteresis_value = value_raw; else /* unknown key_name - fatal error */ goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sensor_hysteresis_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_sensor_hysteresis (state_data->ipmi_ctx, sensor_number, IPMI_SENSOR_HYSTERESIS_MASK, positive_going_threshold_hysteresis_value, negative_going_threshold_hysteresis_value, obj_cmd_rs) < 0) { if (ipmi_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_sensor_hysteresis: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* achu: * * The range of potential inputs is limited by the sensor decoding * values and the "range" of values it can convert the threshold-raw * value into. Also, the threshold raw data is a 1 byte field, which * may be signed or unsigned. * * Outside of some math I currently don't want to think about, there * is really no way to determine if the raw data that is calculated by * ipmi_sensor_decode_raw_value() is within range at the end. So the * way that we'll check for a valid input range is to get the raw * value, then convert is back to a calculated value. If we get a * value that is reasonably close to what the user input, we'll * consider the input from the user legit. */ static ipmi_config_validate_t _floating_point_in_range (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value, double value_input) { ipmi_config_validate_t rv = IPMI_CONFIG_VALIDATE_FATAL_ERROR; ipmi_config_err_t ret; uint8_t threshold_raw; uint8_t sensor_number; double threshold_calc; double threshold_range_min, threshold_range_max; assert (state_data); assert (section_name); assert (key_name); assert (value); if ((ret = ipmi_config_sensors_seek_to_sdr_record (state_data, section_name)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR) rv = IPMI_CONFIG_VALIDATE_NON_FATAL_ERROR; goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((ret = _decode_value_raw (state_data, value, &threshold_raw)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR) rv = IPMI_CONFIG_VALIDATE_NON_FATAL_ERROR; goto cleanup; } if ((ret = _decode_value (state_data, threshold_raw, &threshold_calc)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR) rv = IPMI_CONFIG_VALIDATE_NON_FATAL_ERROR; goto cleanup; } threshold_range_min = threshold_calc * THRESHOLD_RANGE_MIN_MULTIPLIER; threshold_range_max = threshold_calc * THRESHOLD_RANGE_MAX_MULTIPLIER; /* achu: technically shouldn't compare doubles to constants, but I * think its ok here. */ if ((value_input >= 0.0 && (value_input < threshold_range_min || value_input > threshold_range_max)) || (value_input < 0.0 && (value_input > threshold_range_min || value_input < threshold_range_max))) rv = IPMI_CONFIG_VALIDATE_VALUE_CANNOT_BE_ENCODED_ACCURATELY; else rv = IPMI_CONFIG_VALIDATE_VALID_VALUE; cleanup: return (rv); } ipmi_config_validate_t threshold_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { double conv; char *endptr; assert (section_name); assert (key_name); assert (value); errno = 0; conv = strtod (value, &endptr); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (_floating_point_in_range (state_data, section_name, key_name, value, conv)); } ipmi_config_validate_t threshold_validate_positive (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { double conv; char *endptr; assert (section_name); assert (key_name); assert (value); errno = 0; conv = strtod (value, &endptr); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); if (conv < 0.0) return (IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE); return (_floating_point_in_range (state_data, section_name, key_name, value, conv)); } ipmi_config_validate_t hysteresis_threshold_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { double conv; char *endptr; assert (section_name); assert (key_name); assert (value); if (!strcasecmp (value, "None")) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); errno = 0; conv = strtod (value, &endptr); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); return (_floating_point_in_range (state_data, section_name, key_name, value, conv)); } ipmi_config_validate_t hysteresis_threshold_validate_positive (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { double conv; char *endptr; assert (section_name); assert (key_name); assert (value); if (!strcasecmp (value, "None")) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); errno = 0; conv = strtod (value, &endptr); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); if (conv < 0.0) return (IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE); return (_floating_point_in_range (state_data, section_name, key_name, value, conv)); } static int _setup_threshold_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *description, const char *key_name, uint8_t threshold_readable, uint8_t threshold_settable, Key_Validate threshold_validate_ptr) { unsigned int flags = 0; assert (state_data); assert (description); assert (key_name); assert (threshold_validate_ptr); if (threshold_readable || state_data->prog_data->args->verbose_count) { if (!threshold_readable) flags |= IPMI_CONFIG_UNDEFINED; if (!threshold_settable) { flags |= IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT; flags |= IPMI_CONFIG_READABLE_ONLY; } if (ipmi_config_section_add_key (state_data, section, key_name, description, flags, threshold_checkout, threshold_commit, threshold_validate_ptr) < 0) goto cleanup; } return (0); cleanup: return (-1); } static int _setup_threshold_fields (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *description, uint8_t sensor_base_unit_type) { uint8_t lower_non_critical_threshold_settable = 0; uint8_t lower_critical_threshold_settable = 0; uint8_t lower_non_recoverable_threshold_settable = 0; uint8_t upper_non_critical_threshold_settable = 0; uint8_t upper_critical_threshold_settable = 0; uint8_t upper_non_recoverable_threshold_settable = 0; uint8_t lower_non_critical_threshold_readable = 0; uint8_t lower_critical_threshold_readable = 0; uint8_t lower_non_recoverable_threshold_readable = 0; uint8_t upper_non_critical_threshold_readable = 0; uint8_t upper_critical_threshold_readable = 0; uint8_t upper_non_recoverable_threshold_readable = 0; Key_Validate threshold_validate_ptr = NULL; int rv = -1; assert (state_data); assert (section); assert (description); /* We will adjust this list as necessary later on. Many * measurements could technically be negative (e.g. temperature) * even though its unrealistic for IPMI's sake. Others, I'm just * not sure about. */ if (sensor_base_unit_type == IPMI_SENSOR_UNIT_RPM) threshold_validate_ptr = threshold_validate_positive; else threshold_validate_ptr = threshold_validate; if (ipmi_sdr_parse_threshold_readable (state_data->sdr_ctx, NULL, 0, &lower_non_critical_threshold_readable, &lower_critical_threshold_readable, &lower_non_recoverable_threshold_readable, &upper_non_critical_threshold_readable, &upper_critical_threshold_readable, &upper_non_recoverable_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_threshold_settable: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_threshold_settable (state_data->sdr_ctx, NULL, 0, &lower_non_critical_threshold_settable, &lower_critical_threshold_settable, &lower_non_recoverable_threshold_settable, &upper_non_critical_threshold_settable, &upper_critical_threshold_settable, &upper_non_recoverable_threshold_settable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_threshold_settable: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (_setup_threshold_key (state_data, section, description, "Lower_Non_Critical_Threshold", lower_non_critical_threshold_readable, lower_non_critical_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; if (_setup_threshold_key (state_data, section, description, "Lower_Critical_Threshold", lower_critical_threshold_readable, lower_critical_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; if (_setup_threshold_key (state_data, section, description, "Lower_Non_Recoverable_Threshold", lower_non_recoverable_threshold_readable, lower_non_recoverable_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; if (_setup_threshold_key (state_data, section, description, "Upper_Non_Critical_Threshold", upper_non_critical_threshold_readable, upper_non_critical_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; if (_setup_threshold_key (state_data, section, description, "Upper_Critical_Threshold", upper_critical_threshold_readable, upper_critical_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; if (_setup_threshold_key (state_data, section, description, "Upper_Non_Recoverable_Threshold", upper_non_recoverable_threshold_readable, upper_non_recoverable_threshold_settable, threshold_validate_ptr) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _setup_threshold_hysteresis_fields (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *description, uint8_t sensor_base_unit_type, uint8_t hysteresis_support) { unsigned int flags = 0; char description_hysteresis[IPMI_CONFIG_MAX_DESCRIPTION_LEN + 1]; Key_Validate hysteresis_threshold_validate_ptr = NULL; int rv = -1; assert (state_data); assert (section); assert (description); assert (hysteresis_support == IPMI_SDR_READABLE_HYSTERESIS_SUPPORT || hysteresis_support == IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT || state_data->prog_data->args->verbose_count); if (hysteresis_support == IPMI_SDR_READABLE_HYSTERESIS_SUPPORT) { flags |= IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT; flags |= IPMI_CONFIG_READABLE_ONLY; } else if (hysteresis_support == IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT) flags = 0; /* no change, can read/write */ else /* state_data->prog_data->args->verbose_count */ flags = IPMI_CONFIG_UNDEFINED; memset (description_hysteresis, '\0', IPMI_CONFIG_MAX_DESCRIPTION_LEN + 1); snprintf (description_hysteresis, IPMI_CONFIG_MAX_DESCRIPTION_LEN, "%s; 'None' to not use hysteresis", description); /* We will adjust this list as necessary later on. Many * measurements could technically be negative (e.g. temperature) * even though its unrealistic for IPMI's sake. Others, I'm just * not sure about. */ if (sensor_base_unit_type == IPMI_SENSOR_UNIT_RPM) hysteresis_threshold_validate_ptr = hysteresis_threshold_validate_positive; else hysteresis_threshold_validate_ptr = hysteresis_threshold_validate; if (ipmi_config_section_add_key (state_data, section, "Positive_Going_Threshold_Hysteresis", description_hysteresis, flags, hysteresis_threshold_checkout, hysteresis_threshold_commit, hysteresis_threshold_validate_ptr) < 0) goto cleanup; if (ipmi_config_section_add_key (state_data, section, "Negative_Going_Threshold_Hysteresis", description_hysteresis, flags, hysteresis_threshold_checkout, hysteresis_threshold_commit, hysteresis_threshold_validate_ptr) < 0) goto cleanup; rv = 0; cleanup: return (rv); } ipmi_config_err_t ipmi_config_sensors_threshold_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section **section_ptr) { struct ipmi_config_section *section = NULL; char section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN + 1]; uint8_t threshold_access_support = 0; uint8_t hysteresis_support = 0; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; uint8_t sensor_type; uint8_t sensor_units_percentage; uint8_t sensor_units_modifier; uint8_t sensor_units_rate; uint8_t sensor_base_unit_type; uint8_t sensor_modifier_unit_type; char description[IPMI_CONFIG_MAX_DESCRIPTION_LEN + 1]; char sensor_units_buf[IPMI_CONFIG_CATEGORY_SENSORS_UNITS_BUFLEN+1]; int sensor_units_ret; const char *sensor_type_str = NULL; assert (state_data); assert (section_ptr); memset (section_name, '\0', IPMI_CONFIG_MAX_SECTION_NAME_LEN + 1); if ((ret = ipmi_config_sensors_create_section_name (state_data, section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_config_sensors_create_section_name: %s\n", strerror (errno)); goto cleanup; } if (!(section = ipmi_config_section_create (state_data, section_name, NULL, NULL, 0, NULL, NULL))) goto cleanup; if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, NULL, &threshold_access_support, &hysteresis_support, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_capabilities: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_units (state_data->sdr_ctx, NULL, 0, &sensor_units_percentage, &sensor_units_modifier, &sensor_units_rate, &sensor_base_unit_type, &sensor_modifier_unit_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_unit: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } memset (sensor_units_buf, '\0', IPMI_CONFIG_CATEGORY_SENSORS_UNITS_BUFLEN + 1); sensor_units_ret = ipmi_sensor_units_string (sensor_units_percentage, sensor_units_modifier, sensor_units_rate, sensor_base_unit_type, sensor_modifier_unit_type, sensor_units_buf, IPMI_CONFIG_CATEGORY_SENSORS_UNITS_BUFLEN, 0); sensor_type_str = ipmi_get_sensor_type_string (sensor_type); memset (description, '\0', IPMI_CONFIG_MAX_DESCRIPTION_LEN + 1); if (sensor_units_ret > 0) snprintf (description, IPMI_CONFIG_MAX_DESCRIPTION_LEN, "Give valid input for sensor type = %s; units = %s", sensor_type_str ? sensor_type_str : UNRECOGNIZED_SENSOR_TYPE, sensor_units_buf); else snprintf (description, IPMI_CONFIG_MAX_DESCRIPTION_LEN, "Give valid input for sensor type = %s", sensor_type_str ? sensor_type_str : UNRECOGNIZED_SENSOR_TYPE); if (setup_sensor_event_enable_fields (state_data, section) < 0) goto cleanup; if (threshold_access_support == IPMI_SDR_READABLE_THRESHOLDS_SUPPORT || threshold_access_support == IPMI_SDR_READABLE_SETTABLE_THRESHOLDS_SUPPORT || state_data->prog_data->args->verbose_count) { if (_setup_threshold_fields (state_data, section, description, sensor_base_unit_type) < 0) goto cleanup; } if (hysteresis_support == IPMI_SDR_READABLE_HYSTERESIS_SUPPORT || hysteresis_support == IPMI_SDR_READABLE_SETTABLE_HYSTERESIS_SUPPORT || state_data->prog_data->args->verbose_count) { if (_setup_threshold_hysteresis_fields (state_data, section, description, sensor_base_unit_type, hysteresis_support) < 0) goto cleanup; } *section_ptr = section; return (IPMI_CONFIG_ERR_SUCCESS); cleanup: if (section) ipmi_config_section_destroy (section); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-threshold-section.h0000644002055400205540000000210013527331635026767 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_SENSORS_THRESHOLD_SECTION_H #define IPMI_CONFIG_CATEGORY_SENSORS_THRESHOLD_SECTION_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_sensors_threshold_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section **section_ptr); #endif /* IPMI_CONFIG_CATEGORY_SENSORS_THRESHOLD_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-utils.c0000644002055400205540000001260613527331635024500 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config-category-sensors-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" static ipmi_config_err_t _convert_id_string (ipmi_config_state_data_t *state_data, char *id_string) { char *ptr; assert (state_data); assert (id_string); /* Convert stuff to underscore. I will not convert +/-/. for now. * I think they are fine. */ while ((ptr = strchr (id_string, ' '))) *ptr = '_'; while ((ptr = strchr (id_string, '/'))) *ptr = '_'; return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t ipmi_config_sensors_create_section_name (ipmi_config_state_data_t *state_data, char *section_name, unsigned int section_name_len) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; uint16_t record_id; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); assert (section_name); assert (section_name_len); memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, &record_id, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_id_string (state_data->sdr_ctx, NULL, 0, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((ret = _convert_id_string (state_data, id_string)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "_convert_id_string: %s\n", strerror (errno)); goto cleanup; } /* We will name sections by record_id then name, since id_strings * could be identical. */ if (strlen (id_string) > 0) snprintf (section_name, section_name_len, "%u_%s", record_id, id_string); else /* I guess its conceivable the sensor won't have a name, so we * make one up. */ snprintf (section_name, section_name_len, "%u_%s", record_id, "Unknown_Sensor_Name"); rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t ipmi_config_sensors_seek_to_sdr_record (ipmi_config_state_data_t *state_data, const char *section_name) { uint16_t record_id; char *str = NULL; char *ptr; char *endptr; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); assert (section_name); if (!(str = strdup (section_name))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } if (!(ptr = strchr (str, '_'))) { pstdout_fprintf (state_data->pstate, stderr, "Invalid section_name: %s\n", section_name); goto cleanup; } *ptr = '\0'; errno = 0; record_id = strtoul (str, &endptr,0); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "Invalid section_name: %s\n", section_name); goto cleanup; } if (ipmi_sdr_cache_search_record_id (state_data->sdr_ctx, record_id) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Record_id not found: %u\n", record_id); rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: free (str); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-category-sensors-utils.h0000644002055400205540000000245313527331635024504 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CATEGORY_SENSORS_UTILS_H #define IPMI_CONFIG_CATEGORY_SENSORS_UTILS_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_sensors_create_section_name (ipmi_config_state_data_t *state_data, char *section_name, unsigned int section_name_len); ipmi_config_err_t ipmi_config_sensors_seek_to_sdr_record (ipmi_config_state_data_t *state_data, const char *section_name); #endif /* IPMI_CONFIG_CATEGORY_SENSORS_UTILS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-checkout.c0000644002055400205540000002325613527331635021643 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config-checkout.h" #include "ipmi-config-comment.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" ipmi_config_err_t ipmi_config_checkout_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, int all_keys_if_none_specified, FILE *fp) { struct ipmi_config_keyvalue *kv; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret = IPMI_CONFIG_ERR_SUCCESS; ipmi_config_err_t this_ret; unsigned int line_length; assert (state_data); assert (section); assert (fp); /* if no keyvalues specified by user, we want to checkout all keys, * so build keyvalues list appropriately */ if (all_keys_if_none_specified && !section->keyvalues) { struct ipmi_config_key *k; k = section->keys; while (k) { if (!(k->flags & IPMI_CONFIG_DO_NOT_CHECKOUT)) { if (ipmi_config_section_add_keyvalue (state_data, section, k, NULL, NULL) < 0) goto cleanup; } k = k->next; } } if (!section->keyvalues) return (IPMI_CONFIG_ERR_SUCCESS); /* no need to output if fp NULL, for example if 'diff' is calling * us. */ if (section->section_comment_section_name && section->section_comment && all_keys_if_none_specified) { if (ipmi_config_section_comments (state_data, section->section_comment_section_name, section->section_comment, fp) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "## Error: Comment output error\n"); ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } } if (!section->line_length) line_length = IPMI_CONFIG_CHECKOUT_LINE_LEN; else line_length = section->line_length; ipmi_config_pstdout_fprintf (state_data, fp, "Section %s\n", section->section_name); kv = section->keyvalues; while (kv) { int key_len = 0; if (kv->key->flags & IPMI_CONFIG_UNDEFINED) { if (ipmi_config_section_update_keyvalue_output (state_data, kv, "Undefined") < 0) this_ret = IPMI_CONFIG_ERR_FATAL_ERROR; else this_ret = IPMI_CONFIG_ERR_SUCCESS; } else { if ((this_ret = kv->key->checkout (state_data, section->section_name, kv)) == IPMI_CONFIG_ERR_FATAL_ERROR) goto cleanup; } if (IPMI_CONFIG_IS_NON_FATAL_ERROR (this_ret)) { if (state_data->prog_data->args->verbose_count > 1) { if (this_ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED) ipmi_config_pstdout_fprintf (state_data, fp, "\t## Unable to checkout %s:%s : Not Supported\n", section->section_name, kv->key->key_name); else ipmi_config_pstdout_fprintf (state_data, fp, "\t## Unable to checkout %s:%s\n", section->section_name, kv->key->key_name); } ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } else { char obuf[IPMI_CONFIG_OUTPUT_BUFLEN]; assert (kv->value_output); if (strchr (kv->key->description, '\n')) { char *cptr; cptr = kv->key->description; ipmi_config_pstdout_fprintf (state_data, fp, "\t## "); while (*cptr) { if (*cptr == '\n') ipmi_config_pstdout_fprintf (state_data, fp, "\n\t## "); else ipmi_config_pstdout_fprintf (state_data, fp, "%c", *cptr); cptr++; } ipmi_config_pstdout_fprintf (state_data, fp, "\n"); } else ipmi_config_pstdout_fprintf (state_data, fp, "\t## %s\n", kv->key->description); /* achu: Certain keys should have their checked out * value automatically commented out. Sometimes (in the * case of passwords) they cannot be checked out, so the * default is for value to be empty. We do not want the * user accidently commiting this checked out file, * which (in this example) clears the password. * * Some other keys may or may not have a value, depending on * the IPMI version or the implementation. */ /* achu: * * The pstdout library does not return string lengths like * printf/fprintf do. So we have to calculate it via * snprintf. */ if (kv->key->flags & IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT || kv->key->flags & IPMI_CONFIG_UNDEFINED || (kv->key->flags & IPMI_CONFIG_CHECKOUT_KEY_COMMENTED_OUT_IF_VALUE_EMPTY && !strlen (kv->value_output)) || (kv->key->flags & IPMI_CONFIG_USERNAME_NOT_SET_YET && !strcasecmp (kv->value_output, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR))) key_len = snprintf (obuf, IPMI_CONFIG_OUTPUT_BUFLEN, "\t## %s", kv->key->key_name); else key_len = snprintf (obuf, IPMI_CONFIG_OUTPUT_BUFLEN, "\t%s", kv->key->key_name); ipmi_config_pstdout_fprintf (state_data, fp, "%s", obuf); while (key_len <= line_length) { ipmi_config_pstdout_fprintf (state_data, fp, " "); key_len++; } ipmi_config_pstdout_fprintf (state_data, fp, " %s\n", kv->value_output); } kv = kv->next; } ipmi_config_pstdout_fprintf (state_data, fp, "EndSection\n"); rv = ret; cleanup: return (rv); } ipmi_config_err_t ipmi_config_checkout (ipmi_config_state_data_t *state_data, int all_keys_if_none_specified, FILE *fp) { struct ipmi_config_section *s; ipmi_config_err_t rv = IPMI_CONFIG_ERR_SUCCESS; ipmi_config_err_t ret; assert (state_data); assert (fp); s = state_data->sections; while (s) { if (!(s->flags & IPMI_CONFIG_DO_NOT_CHECKOUT) || !all_keys_if_none_specified) { if ((ret = ipmi_config_checkout_section (state_data, s, all_keys_if_none_specified, fp)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) { rv = IPMI_CONFIG_ERR_FATAL_ERROR; break; } rv = ret; } } s = s->next; } return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-checkout.h0000644002055400205540000000250013527331635021635 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_CHECKOUT_H #define IPMI_CONFIG_CHECKOUT_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_checkout_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, int all_keys_if_none_specified, FILE *fp); ipmi_config_err_t ipmi_config_checkout (ipmi_config_state_data_t *state_data, int all_keys_if_none_specified, FILE *fp); #endif /* IPMI_CONFIG_CHECKOUT_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-comment.c0000644002055400205540000001050713527331635021473 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #ifdef STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-config-comment.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" /* achu: There must be a library out there that can do this better, * but I can't find one. So here's my hacked up simple one. */ #define FORMAT_COMMENT_BUFLEN 4096 #define FORMAT_COMMENT_COLUMN_WIDTH 80 static int _format_comment (char *in, char *out, unsigned int outsize) { char *inbuf = NULL; char *tokbuf; char *tok; int linelen = 0; int totalwritten = 0; int rv = -1; assert (in); assert (out); assert (outsize); if (!(inbuf = strdup (in))) goto cleanup; memset (out, '\0', outsize); /* -1 b/c we care about end null */ /* +2 because "# " is two bytes */ if ((outsize - 1) <= (totalwritten + 2)) goto cleanup; sprintf (out, "# "); totalwritten += 2; linelen += 2; tok = strtok_r (inbuf, " ", &tokbuf); while (tok) { int toklen = strlen (tok); if ((linelen + toklen) > FORMAT_COMMENT_COLUMN_WIDTH) { /* +1 because "\n# " is 3 bytes*/ if ((outsize - 1) <= (totalwritten + 3)) goto cleanup; strcat (out, "\n# "); totalwritten += 3; linelen = 2; } /* +1 because of the space */ if ((outsize - 1) <= (totalwritten + toklen + 1)) goto cleanup; strcat (out, tok); strcat (out, " "); totalwritten += (toklen + 1); linelen += (toklen + 1); tok = strtok_r (NULL, " ", &tokbuf); } /* +1 for the newline at the end */ if ((outsize -1) <= (totalwritten + 1)) goto cleanup; strcat (out, "\n"); rv = 0; cleanup: free (inbuf); return (rv); } int ipmi_config_section_comments (ipmi_config_state_data_t *state_data, const char *section_name, const char *in, FILE *fp) { char section_name_buf[FORMAT_COMMENT_BUFLEN]; char buf[FORMAT_COMMENT_BUFLEN]; char *inbuf = NULL; char *tokbuf; char *tok; int rv = -1; assert (state_data); assert (section_name); assert (in); assert (fp); if (!(inbuf = strdup (in))) goto cleanup; ipmi_config_pstdout_fprintf (state_data, fp, "#\n"); /* XXX: assume no overrun */ snprintf (section_name_buf, FORMAT_COMMENT_BUFLEN, "Section %s Comments", section_name); if (_format_comment (section_name_buf, buf, FORMAT_COMMENT_BUFLEN) < 0) goto cleanup; ipmi_config_pstdout_fprintf (state_data, fp, "%s", buf); ipmi_config_pstdout_fprintf (state_data, fp, "#\n"); tok = strtok_r (inbuf, "\n", &tokbuf); while (tok) { if (_format_comment (tok, buf, FORMAT_COMMENT_BUFLEN) < 0) goto cleanup; ipmi_config_pstdout_fprintf (state_data, fp, "%s", buf); ipmi_config_pstdout_fprintf (state_data, fp, "#\n"); tok = strtok_r (NULL, "\n", &tokbuf); } rv = 0; cleanup: free (inbuf); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-comment.h0000644002055400205540000000206413527331635021477 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_COMMENT_H #define IPMI_CONFIG_COMMENT_H #include #include "ipmi-config.h" int ipmi_config_section_comments (ipmi_config_state_data_t *state_data, const char *section_name, const char *in, FILE *fp); #endif /* IPMI_CONFIG_COMMENT_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-commit.c0000644002055400205540000001637113527331635021326 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmi-config-commit.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" static ipmi_config_err_t _ipmi_config_commit_section (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section) { struct ipmi_config_keyvalue *kv; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret = IPMI_CONFIG_ERR_SUCCESS; ipmi_config_err_t this_ret; unsigned int commit_count = 0; assert (state_data); assert (section); if (section->section_pre_commit) { if ((this_ret = section->section_pre_commit (state_data, section->section_name)) == IPMI_CONFIG_ERR_FATAL_ERROR) goto cleanup; if (IPMI_CONFIG_IS_NON_FATAL_ERROR (this_ret)) { pstdout_fprintf (state_data->pstate, stderr, "ERROR: Section pre-commit `%s'\n", section->section_name); ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } } kv = section->keyvalues; while (kv) { assert (kv->value_input); if (!(kv->key->flags & IPMI_CONFIG_READABLE_ONLY) && !(kv->key->flags & IPMI_CONFIG_UNDEFINED)) { if ((this_ret = kv->key->commit (state_data, section->section_name, kv)) == IPMI_CONFIG_ERR_FATAL_ERROR) goto cleanup; if (this_ret == IPMI_CONFIG_ERR_SUCCESS) { /* Discovered on Quanta S99Q/Dell FS12-TY * * A number of values on this motherboard appear to take * a reasonable amount of time to store, causing the BMC * to return BUSY errors for a bit. In some cases, the * BMC eventually hangs or subsequent writes are * ignored. We want to try to avoid this. */ if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT) sleep (1); commit_count++; } if (IPMI_CONFIG_IS_NON_FATAL_ERROR (this_ret)) { if (this_ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_READ_ONLY) pstdout_fprintf (state_data->pstate, stderr, "ERROR: Failed to commit `%s:%s': Read Only Field\n", section->section_name, kv->key->key_name); else if (this_ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED) pstdout_fprintf (state_data->pstate, stderr, "ERROR: Failed to commit `%s:%s': Not Supported\n", section->section_name, kv->key->key_name); else if (this_ret == IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG) pstdout_fprintf (state_data->pstate, stderr, "ERROR: Failed to commit `%s:%s': Invalid/Unsupported Config\n", section->section_name, kv->key->key_name); else pstdout_fprintf (state_data->pstate, stderr, "ERROR: Failed to commit `%s:%s'\n", section->section_name, kv->key->key_name); ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } } else { pstdout_fprintf (state_data->pstate, stderr, "ERROR: `%s:%s' is not writeable\n", section->section_name, kv->key->key_name); ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } kv = kv->next; } if (commit_count && section->section_post_commit) { if ((this_ret = section->section_post_commit (state_data, section->section_name)) == IPMI_CONFIG_ERR_FATAL_ERROR) goto cleanup; if (IPMI_CONFIG_IS_NON_FATAL_ERROR (this_ret)) { pstdout_fprintf (state_data->pstate, stderr, "ERROR: Section post-commit `%s'\n", section->section_name); ret = IPMI_CONFIG_ERR_NON_FATAL_ERROR; } } rv = ret; cleanup: return (rv); } ipmi_config_err_t ipmi_config_commit (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *s; ipmi_config_err_t rv = IPMI_CONFIG_ERR_SUCCESS; ipmi_config_err_t ret; assert (state_data); s = state_data->sections; while (s) { if ((ret = _ipmi_config_commit_section (state_data, s)) != IPMI_CONFIG_ERR_SUCCESS) { if (ret == IPMI_CONFIG_ERR_FATAL_ERROR) { rv = IPMI_CONFIG_ERR_FATAL_ERROR; break; } rv = ret; } /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * Some BMCs appear to not be able to accept a high number of * commits/writes and eventually commits/writes are lost. This * workaround will slow down the commits/writes to give the BMC * a better chance to accept all changes. * * Discovered on Quanta S99Q/Dell FS12-TY * * A number of values on this motherboard appear to take * a reasonable amount of time to store, causing the BMC * to return BUSY errors for a bit. In some cases, the * BMC eventually hangs or subsequent writes are * ignored. We want to try to avoid this. */ if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SLOW_COMMIT || state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_VERY_SLOW_COMMIT) sleep (1); s = s->next; } return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-commit.h0000644002055400205540000000160713527331635021327 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_COMMIT_H #define IPMI_CONFIG_COMMIT_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_commit (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_COMMIT_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-diff.c0000644002055400205540000000474413527331635020747 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config-diff.h" #include "ipmi-config-checkout.h" #include "freeipmi-portability.h" #include "pstdout.h" ipmi_config_err_t ipmi_config_diff (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *s; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret = IPMI_CONFIG_ERR_SUCCESS; ipmi_config_err_t this_ret; assert (state_data); s = state_data->sections; while (s) { struct ipmi_config_keyvalue *kv = s->keyvalues; while (kv) { assert (kv->value_input); if ((this_ret = kv->key->checkout (state_data, s->section_name, kv)) == IPMI_CONFIG_ERR_FATAL_ERROR) goto cleanup; if (this_ret == IPMI_CONFIG_ERR_SUCCESS) { if (!same (kv->value_input, kv->value_output)) pstdout_printf (state_data->pstate, "%s:%s - input=`%s':actual=`%s'\n", s->section_name, kv->key->key_name, kv->value_input, kv->value_output); } else { pstdout_printf (state_data->pstate, "\t## ERROR: Unable to checkout %s:%s\n", s->section_name, kv->key->key_name); ret = this_ret; } kv = kv->next; } s = s->next; } rv = ret; cleanup: return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-diff.h0000644002055400205540000000157713527331635020755 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_DIFF_H #define IPMI_CONFIG_DIFF_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_diff (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_DIFF_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-legacy-pef-info.c0000644002055400205540000003245313527331635023002 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config.h" #include "ipmi-config-legacy-pef-info.h" #include "freeipmi-portability.h" #include "pstdout.h" ipmi_config_err_t ipmi_config_pef_info (ipmi_config_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; uint8_t major, minor; uint8_t number_of_event_filter_table_entries; uint8_t alert_action_support = 0; uint64_t val; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_capabilities (state_data->ipmi_ctx, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); pstdout_fprintf (state_data->pstate, stderr, "Failure Retrieving PEF info\n"); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "pef_version_major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_version_major': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "pef_version_minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'pef_version_minor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; /* achu: ipmi version is BCD encoded, but major/minor are only 4 bits */ pstdout_printf (state_data->pstate, "PEF version : %u.%u\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "action_support.alert", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.alert': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Alert action : %s\n", (val ? "supported" : "unsupported")); alert_action_support = val; if (FIID_OBJ_GET (obj_cmd_rs, "action_support.power_down", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.power_down': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power down action : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "action_support.reset", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.reset': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power reset action : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "action_support.power_cycle", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.power_cycle': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power cycle action : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "action_support.oem_action", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.oem_action': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "OEM action : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "action_support.diagnostic_interrupt", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'action_support.diagnostic_interrupt': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Diagnostic interrupt action : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "oem_event_record_filtering_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'oem_event_record_filtering_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "OEM event record filtering : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "number_of_event_filter_table_entries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_event_filter_table_entries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_event_filter_table_entries = val; pstdout_printf (state_data->pstate, "Number of Event Filter Table entries : %u\n", number_of_event_filter_table_entries); if (alert_action_support) { uint8_t number_of_event_filters; uint8_t number_of_alert_policy_entries; uint8_t number_of_alert_strings; fiid_obj_destroy (obj_cmd_rs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_event_filters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_event_filters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); pstdout_fprintf (state_data->pstate, stderr, "Failure Retrieving PEF info\n"); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_event_filters", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_event_filters': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_event_filters = val; pstdout_printf (state_data->pstate, "Number of Event Filters : %u\n", number_of_event_filters); fiid_obj_destroy (obj_cmd_rs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_alert_policy_entries: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); pstdout_fprintf (state_data->pstate, stderr, "Failure Retrieving PEF info\n"); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_alert_policy_entries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_alert_policy_entries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_alert_policy_entries = val; pstdout_printf (state_data->pstate, "Number of Alert Policy entries : %u\n", number_of_alert_policy_entries); fiid_obj_destroy (obj_cmd_rs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_pef_configuration_parameters_number_of_alert_strings_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings (state_data->ipmi_ctx, IPMI_GET_PEF_PARAMETER, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_PEF_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_pef_configuration_parameters_number_of_alert_strings: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); pstdout_fprintf (state_data->pstate, stderr, "Failure Retrieving PEF info\n"); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_alert_strings", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_alert_strings': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_alert_strings = val; pstdout_printf (state_data->pstate, "Number of Alert Strings : %u\n", number_of_alert_strings); } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-legacy-pef-info.h0000644002055400205540000000170413527331635023002 0ustar00achuachu00000000000000/* * Copyright (C) 2007-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_LEGACY_PEF_INFO_H #define IPMI_CONFIG_LEGACY_PEF_INFO_H #include "ipmi-config.h" /* Supporting legacy option */ ipmi_config_err_t ipmi_config_pef_info (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_LEGACY_PEF_INFO_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-map.c0000644002055400205540000007405613527331635020617 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "freeipmi-portability.h" int channel_access_mode (const char *string) { assert (string); if (same (string, "disabled")) return (IPMI_MESSAGING_ACCESS_MODE_DISABLED); if (same (string, "pre_boot_only")) return (IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY); if (same (string, "always_available")) return (IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE); if (same (string, "shared")) return (IPMI_MESSAGING_ACCESS_MODE_SHARED); return (-1); } char * channel_access_mode_string (uint8_t value) { switch (value) { case IPMI_MESSAGING_ACCESS_MODE_DISABLED: return "Disabled"; case IPMI_MESSAGING_ACCESS_MODE_PRE_BOOT_ONLY: return "Pre_Boot_Only"; case IPMI_MESSAGING_ACCESS_MODE_ALWAYS_AVAILABLE: return "Always_Available"; case IPMI_MESSAGING_ACCESS_MODE_SHARED: return "Shared"; } return ""; } uint8_t get_privilege_limit_number (const char *string) { assert (string); if (same (string, "callback")) return (IPMI_PRIVILEGE_LEVEL_CALLBACK); if (same (string, "user")) return (IPMI_PRIVILEGE_LEVEL_USER); if (same (string, "operator")) return (IPMI_PRIVILEGE_LEVEL_OPERATOR); if (same (string, "administrator")) return (IPMI_PRIVILEGE_LEVEL_ADMIN); if (same (string, "oem_proprietary")) return (IPMI_PRIVILEGE_LEVEL_OEM); if (same (string, "no_access")) return (IPMI_PRIVILEGE_LEVEL_NO_ACCESS); return (0); } char * get_privilege_limit_string (uint8_t value) { switch (value) { case IPMI_PRIVILEGE_LEVEL_CALLBACK: return "Callback"; case IPMI_PRIVILEGE_LEVEL_USER: return "User"; case IPMI_PRIVILEGE_LEVEL_OPERATOR: return "Operator"; case IPMI_PRIVILEGE_LEVEL_ADMIN: return "Administrator"; case IPMI_PRIVILEGE_LEVEL_OEM: return "OEM_Proprietary"; case IPMI_PRIVILEGE_LEVEL_NO_ACCESS: return "No_Access"; } return ""; } int privilege_level_number (const char *string) { assert (string); if (same (string, "callback")) return (IPMI_PRIVILEGE_LEVEL_CALLBACK); if (same (string, "user")) return (IPMI_PRIVILEGE_LEVEL_USER); if (same (string, "operator")) return (IPMI_PRIVILEGE_LEVEL_OPERATOR); if (same (string, "administrator")) return (IPMI_PRIVILEGE_LEVEL_ADMIN); if (same (string, "oem_proprietary")) return (IPMI_PRIVILEGE_LEVEL_OEM); return (-1); } char * privilege_level_string (uint8_t value) { switch (value) { case IPMI_PRIVILEGE_LEVEL_CALLBACK: return "Callback"; case IPMI_PRIVILEGE_LEVEL_USER: return "User"; case IPMI_PRIVILEGE_LEVEL_OPERATOR: return "Operator"; case IPMI_PRIVILEGE_LEVEL_ADMIN: return "Administrator"; case IPMI_PRIVILEGE_LEVEL_OEM: return "OEM_Proprietary"; } return ""; } int rmcpplus_priv_number (const char *string) { assert (string); if (same (string, "unused")) return (IPMI_PRIVILEGE_LEVEL_UNSPECIFIED); if (same (string, "callback")) return (IPMI_PRIVILEGE_LEVEL_CALLBACK); if (same (string, "user")) return (IPMI_PRIVILEGE_LEVEL_USER); if (same (string, "operator")) return (IPMI_PRIVILEGE_LEVEL_OPERATOR); if (same (string, "administrator")) return (IPMI_PRIVILEGE_LEVEL_ADMIN); if (same (string, "oem_proprietary")) return (IPMI_PRIVILEGE_LEVEL_OEM); return (-1); } char * rmcpplus_priv_string (int value) { switch (value) { case 0: return "Unused"; case IPMI_PRIVILEGE_LEVEL_CALLBACK: return "Callback"; case IPMI_PRIVILEGE_LEVEL_USER: return "User"; case IPMI_PRIVILEGE_LEVEL_OPERATOR: return "Operator"; case IPMI_PRIVILEGE_LEVEL_ADMIN: return "Administrator"; case IPMI_PRIVILEGE_LEVEL_OEM: return "OEM_Proprietary"; } return ""; } int ip_address_source_number (const char *string) { assert (string); if (same (string, "unspecified")) return (IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED); if (same (string, "static")) return (IPMI_IP_ADDRESS_SOURCE_STATIC); if (same (string, "use_dhcp")) return (IPMI_IP_ADDRESS_SOURCE_DHCP); if (same (string, "use_bios")) return (IPMI_IP_ADDRESS_SOURCE_BIOS); if (same (string, "use_others")) return (IPMI_IP_ADDRESS_SOURCE_OTHER); return (-1); } char * ip_address_source_string (uint8_t value) { switch (value) { case IPMI_IP_ADDRESS_SOURCE_UNSPECIFIED: return "Unspecified"; case IPMI_IP_ADDRESS_SOURCE_STATIC: return "Static"; case IPMI_IP_ADDRESS_SOURCE_DHCP: return "Use_DHCP"; case IPMI_IP_ADDRESS_SOURCE_BIOS: return "Use_BIOS"; case IPMI_IP_ADDRESS_SOURCE_OTHER: return "Use_Others"; } return ""; } int ipv6_ipv4_addressing_enables_number (const char *string) { assert (string); if (same (string, "IPv6_Disabled")) return (IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_DISABLED); if (same (string, "IPv6_Only")) return (IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_ONLY); if (same (string, "IPv6_and_IPv4")) return (IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_AND_IPV4); return (-1); } char * ipv6_ipv4_addressing_enables_string (uint8_t value) { switch (value) { case IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_DISABLED: return "IPv6_Disabled"; case IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_ONLY: return "IPv6_Only"; case IPMI_IPV6_IPV4_ADDRESSING_ENABLES_IPV6_AND_IPV4: return "IPv6_and_IPv4"; } return ""; } int power_restore_policy_number (const char *string) { assert (string); if (same (string, "off_state_ac_apply")) return (IPMI_POWER_RESTORE_POLICY_POWERED_OFF_AFTER_AC_RETURNS); if (same (string, "restore_state_ac_apply")) return (IPMI_POWER_RESTORE_POLICY_POWER_RESTORED_TO_STATE); if (same (string, "on_state_ac_apply")) return (IPMI_POWER_RESTORE_POLICY_POWERS_UP_AFTER_AC_RETURNS); return (-1); } char * power_restore_policy_string (uint8_t value) { switch (value) { case IPMI_POWER_RESTORE_POLICY_POWERED_OFF_AFTER_AC_RETURNS: return "Off_State_AC_Apply"; case IPMI_POWER_RESTORE_POLICY_POWER_RESTORED_TO_STATE: return "Restore_State_AC_Apply"; case IPMI_POWER_RESTORE_POLICY_POWERS_UP_AFTER_AC_RETURNS: return "On_State_AC_Apply"; } return ""; } int connect_mode_number (const char *string) { assert (string); if (same (string, "Modem_Connect")) return (IPMI_CONNECT_MODE_MODEM); if (same (string, "Direct_Connect")) return (IPMI_CONNECT_MODE_DIRECT); return (-1); } char * connect_mode_string (uint8_t value) { switch (value) { case IPMI_CONNECT_MODE_MODEM: return "Modem_Connect"; case IPMI_CONNECT_MODE_DIRECT: return "Direct_Connect"; } return ""; } int flow_control_number (const char *string) { assert (string); if (same (string, "no_flow_control")) return (IPMI_FLOW_CONTROL_NO_FLOW_CONTROL); if (same (string, "rts_cts")) return (IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL); if (same (string, "xon_xoff")) return (IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL); return (-1); } char * flow_control_string (uint8_t value) { switch (value) { case IPMI_FLOW_CONTROL_NO_FLOW_CONTROL: return "No_Flow_Control"; case IPMI_FLOW_CONTROL_RTS_CTS_FLOW_CONTROL: return "RTS_CTS"; case IPMI_FLOW_CONTROL_XON_XOFF_FLOW_CONTROL: return "XON_XOFF"; } return ""; } int bit_rate_number (const char *string) { assert (string); if (same (string, "9600")) return (IPMI_BIT_RATE_9600_BPS); if (same (string, "19200")) return (IPMI_BIT_RATE_19200_BPS); if (same (string, "38400")) return (IPMI_BIT_RATE_38400_BPS); if (same (string, "57600")) return (IPMI_BIT_RATE_57600_BPS); if (same (string, "115200")) return (IPMI_BIT_RATE_115200_BPS); return (-1); } char * bit_rate_string (uint8_t value) { switch (value) { case IPMI_BIT_RATE_9600_BPS: return "9600"; case IPMI_BIT_RATE_19200_BPS: return "19200"; case IPMI_BIT_RATE_38400_BPS: return "38400"; case IPMI_BIT_RATE_57600_BPS: return "57600"; case IPMI_BIT_RATE_115200_BPS: return "115200"; } return ""; } int sol_bit_rate_number (const char *string) { assert (string); if (same (string, "serial")) return (IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE); if (same (string, "9600")) return (IPMI_SOL_BIT_RATE_96_KBPS); if (same (string, "19200")) return (IPMI_SOL_BIT_RATE_192_KBPS); if (same (string, "38400")) return (IPMI_SOL_BIT_RATE_384_KBPS); if (same (string, "57600")) return (IPMI_SOL_BIT_RATE_576_KBPS); if (same (string, "115200")) return (IPMI_SOL_BIT_RATE_1152_KBPS); return (-1); } char * sol_bit_rate_string (uint8_t value) { switch (value) { case IPMI_SOL_BIT_RATE_SERIAL_BIT_RATE: return "Serial"; case IPMI_SOL_BIT_RATE_96_KBPS: return "9600"; case IPMI_SOL_BIT_RATE_192_KBPS: return "19200"; case IPMI_SOL_BIT_RATE_384_KBPS: return "38400"; case IPMI_SOL_BIT_RATE_576_KBPS: return "57600"; case IPMI_SOL_BIT_RATE_1152_KBPS: return "115200"; } return ""; } int alert_destination_type_number (const char *string) { assert (string); if (same (string, "pet_trap")) return (IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION); if (same (string, "oem1")) return (IPMI_DESTINATION_TYPE_OEM1); if (same (string, "oem2")) return (IPMI_DESTINATION_TYPE_OEM2); return (-1); } char * alert_destination_type_string (uint8_t value) { switch (value) { case IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION: return "PET_Trap"; case IPMI_DESTINATION_TYPE_OEM1: return "OEM1"; case IPMI_DESTINATION_TYPE_OEM2: return "OEM2"; } return ""; } int alert_gateway_number (const char *string) { assert (string); if (same (string, "default")) return (IPMI_GATEWAY_SELECTOR_DEFAULT); if (same (string, "backup")) return (IPMI_GATEWAY_SELECTOR_BACKUP); return (-1); } char * alert_gateway_string (uint8_t value) { switch (value) { case IPMI_GATEWAY_SELECTOR_DEFAULT: return "Default"; case IPMI_GATEWAY_SELECTOR_BACKUP: return "Backup"; } return ""; } int bios_boot_type_number (const char *string) { assert (string); if (same (string, "PC-COMPATIBLE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE); if (same (string, "EFI")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI); return (-1); } char * bios_boot_type_string (uint8_t value) { switch (value) { case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_PC_COMPATIBLE: return "PC-COMPATIBLE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_TYPE_EFI: return "EFI"; } return ""; } int boot_device_number (const char *string) { assert (string); if (same (string, "NO-OVERRIDE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE); if (same (string, "PXE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE); if (same (string, "HARD-DRIVE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE); if (same (string, "HARD-DRIVE-SAFE-MODE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE); if (same (string, "DIAGNOSTIC_PARTITION")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION); if (same (string, "CD-DVD")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD); if (same (string, "BIOS-SETUP")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP); if (same (string, "REMOTE-FLOPPY")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA); if (same (string, "PRIMARY-REMOTE-MEDIA")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA); if (same (string, "REMOTE-CD-DVD")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD); if (same (string, "REMOTE-HARD-DRIVE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE); if (same (string, "FLOPPY")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA); return (-1); } char * boot_device_string (uint8_t value) { switch (value) { case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_NO_OVERRIDE: return "NO-OVERRIDE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PXE: return "PXE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE: return "HARD-DRIVE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_HARD_DRIVE_SAFE_MODE: return "HARD-DRIVE-SAFE-MODE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_DIAGNOSTIC_PARTITION: return "DIAGNOSTIC_PARTITION"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_CD_DVD: return "CD-DVD"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_BIOS_SETUP: return "BIOS-SETUP"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_FLOPPY_PRIMARY_REMOVEABLE_MEDIA: return "REMOTE-FLOPPY"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_PRIMARY_REMOTE_MEDIA: return "PRIMARY-REMOTE-MEDIA"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_CD_DVD: return "REMOTE-CD-DVD"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_REMOTELY_CONNECTED_HARD_DRIVE: return "REMOTE-HARD-DRIVE"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_BOOT_DEVICE_FORCE_FLOPPY_REMOVEABLE_MEDIA: return "FLOPPY"; } return ""; } int device_instance_selector_number (const char *string) { uint8_t device_instance_selector; char *str = NULL; assert (string); if (same (string, "none")) return (0); if ((str = stristr (string, "external-"))) { device_instance_selector = atoi (str + strlen ("external-")); if (IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_VALID (device_instance_selector)) return (device_instance_selector); } if ((str = stristr (string, "internal-"))) { device_instance_selector = atoi (str + strlen ("internal-")); if (IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_RANGE_VALID (device_instance_selector)) return (device_instance_selector | IPMI_SYSTEM_BOOT_OPTION_DEVICE_INSTANCE_SELECTOR_INTERNAL_BITMASK); } return (-1); } char * device_instance_selector_string (uint8_t value) { /* achu: this is dumb, but that's the way these map functions work */ switch (value) { case 0x00: return "None"; case 0x01: return "External-1"; case 0x02: return "External-2"; case 0x03: return "External-3"; case 0x04: return "External-4"; case 0x05: return "External-5"; case 0x06: return "External-6"; case 0x07: return "External-7"; case 0x08: return "External-8"; case 0x09: return "External-9"; case 0x0A: return "External-10"; case 0x0B: return "External-11"; case 0x0C: return "External-12"; case 0x0D: return "External-13"; case 0x0E: return "External-14"; case 0x0F: return "External-15"; case 0x11: return "Internal-1"; case 0x12: return "Internal-2"; case 0x13: return "Internal-3"; case 0x14: return "Internal-4"; case 0x15: return "Internal-5"; case 0x16: return "Internal-6"; case 0x17: return "Internal-7"; case 0x18: return "Internal-8"; case 0x19: return "Internal-9"; case 0x1A: return "Internal-10"; case 0x1B: return "Internal-11"; case 0x1C: return "Internal-12"; case 0x1D: return "Internal-13"; case 0x1E: return "Internal-14"; case 0x1F: return "Internal-15"; } return ""; } int firmware_bios_verbosity_number (const char *string) { assert (string); if (same (string, "DEFAULT")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT); if (same (string, "QUIET")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET); if (same (string, "VERBOSE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE); return (-1); } char * firmware_bios_verbosity_string (uint8_t value) { switch (value) { case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_DEFAULT: return "DEFAULT"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_QUIET: return "QUIET"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_FIRMWARE_BIOS_VERBOSITY_VERBOSE: return "VERBOSE"; } return ""; } int console_redirection_number (const char *string) { assert (string); if (same (string, "BIOS-SETTING")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_BIOS_SETTING); if (same (string, "SUPPRESS")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS); if (same (string, "ENABLE")) return (IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE); return (-1); } char * console_redirection_string (uint8_t value) { switch (value) { case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_BIOS_SETTING: return "BIOS-SETTING"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_SUPPRESS: return "SUPPRESS"; case IPMI_SYSTEM_BOOT_OPTION_BOOT_FLAG_CONSOLE_REDIRECTION_ENABLE: return "ENABLE"; } return ""; } int policy_type_number (const char *string) { assert (string); if (same (string, "always_send_to_this_destination")) return (IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION); if (same (string, "proceed_to_next_entry")) return (IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY); if (same (string, "do_not_proceed_any_more_entries")) return (IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES); if (same (string, "proceed_to_next_entry_different_channel")) return (IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL); if (same (string, "proceed_to_next_entry_different_destination_type")) return (IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE); return (-1); } char * policy_type_string (uint8_t value) { switch (value) { case IPMI_ALERT_POLICY_ALWAYS_SEND_TO_THIS_DESTINATION: return "Always_Send_To_This_Destination"; break; case IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY: return "Proceed_To_Next_Entry"; break; case IPMI_ALERT_POLICY_DO_NOT_PROCEED_ANY_MORE_ENTRIES: return "Do_Not_Proceed_Any_More_Entries"; break; case IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_CHANNEL: return "Proceed_To_Next_Entry_Different_Channel"; break; case IPMI_ALERT_POLICY_PROCEED_TO_NEXT_ENTRY_DIFFERENT_DESTINATION_TYPE: return "Proceed_To_Next_Entry_Different_Destination_Type"; break; } return ""; } int filter_type_number (const char *string) { assert (string); if (same (string, "manufacturer_pre_configured")) return (IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER); if (same (string, "software_configurable")) return (IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER); if (same (string, "reserved1")) return (0x1); if (same (string, "reserved3")) return (0x3); return (-1); } char * filter_type_string (uint8_t value) { switch (value) { case IPMI_FILTER_CONFIGURATION_MANUFACTURER_PRE_CONFIGURED_FILTER: return "Manufacturer_Pre_Configured"; case IPMI_FILTER_CONFIGURATION_SOFTWARE_CONFIGURABLE_FILTER: return "Software_Configurable"; case 0x1: return "Reserved1"; case 0x3: return "Reserved3"; } return ""; } int event_severity_number (const char *string) { assert (string); if (same (string, "unspecified")) return (IPMI_EVENT_SEVERITY_UNSPECIFIED); if (same (string, "monitor")) return (IPMI_EVENT_SEVERITY_MONITOR); if (same (string, "information")) return (IPMI_EVENT_SEVERITY_INFORMATION); if (same (string, "ok")) return (IPMI_EVENT_SEVERITY_OK); if (same (string, "non_critical")) return (IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION); if (same (string, "critical")) return (IPMI_EVENT_SEVERITY_CRITICAL_CONDITION); if (same (string, "non_recoverable")) return (IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION); return (-1); } char * event_severity_string (uint8_t value) { switch (value) { case IPMI_EVENT_SEVERITY_UNSPECIFIED: return "Unspecified"; case IPMI_EVENT_SEVERITY_MONITOR: return "Monitor"; case IPMI_EVENT_SEVERITY_INFORMATION: return "Information"; case IPMI_EVENT_SEVERITY_OK: return "OK"; case IPMI_EVENT_SEVERITY_NON_CRITICAL_CONDITION: return "Non_Critical"; case IPMI_EVENT_SEVERITY_CRITICAL_CONDITION: return "Critical"; case IPMI_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION: return "Non_Recoverable"; } return ""; } int sensor_type_number (const char *string) { assert (string); if (same (string, "reserved")) return (IPMI_EVENT_SENSOR_TYPE_RESERVED); if (same (string, "temperature")) return (IPMI_EVENT_SENSOR_TYPE_TEMPERATURE); if (same (string, "voltage")) return (IPMI_EVENT_SENSOR_TYPE_VOLTAGE); if (same (string, "current")) return (IPMI_EVENT_SENSOR_TYPE_CURRENT); if (same (string, "fan")) return (IPMI_EVENT_SENSOR_TYPE_FAN); if (same (string, "physical_security")) return (IPMI_EVENT_SENSOR_TYPE_PHYSICAL_SECURITY); if (same (string, "platform_security_violation_attempt")) return (IPMI_EVENT_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT); if (same (string, "processor")) return (IPMI_EVENT_SENSOR_TYPE_PROCESSOR); if (same (string, "power_supply")) return (IPMI_EVENT_SENSOR_TYPE_POWER_SUPPLY); if (same (string, "power_unit")) return (IPMI_EVENT_SENSOR_TYPE_POWER_UNIT); if (same (string, "cooling_device")) return (IPMI_EVENT_SENSOR_TYPE_COOLING_DEVICE); if (same (string, "other_units_based_sensor")) return (IPMI_EVENT_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR); if (same (string, "memory")) return (IPMI_EVENT_SENSOR_TYPE_MEMORY); if (same (string, "drive_slot")) return (IPMI_EVENT_SENSOR_TYPE_DRIVE_SLOT); if (same (string, "post_memory_resize")) return (IPMI_EVENT_SENSOR_TYPE_POST_MEMORY_RESIZE); if (same (string, "system_firmware_progress")) return (IPMI_EVENT_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS); if (same (string, "event_logging_disabled")) return (IPMI_EVENT_SENSOR_TYPE_EVENT_LOGGING_DISABLED); if (same (string, "watchdog1")) return (IPMI_EVENT_SENSOR_TYPE_WATCHDOG1); if (same (string, "system_event")) return (IPMI_EVENT_SENSOR_TYPE_SYSTEM_EVENT); if (same (string, "critical_interrupt")) return (IPMI_EVENT_SENSOR_TYPE_CRITICAL_INTERRUPT); if (same (string, "button_switch")) return (IPMI_EVENT_SENSOR_TYPE_BUTTON_SWITCH); if (same (string, "module_board")) return (IPMI_EVENT_SENSOR_TYPE_MODULE_BOARD); if (same (string, "microcontroller_coprocessor")) return (IPMI_EVENT_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR); if (same (string, "add_in_card")) return (IPMI_EVENT_SENSOR_TYPE_ADD_IN_CARD); if (same (string, "chassis")) return (IPMI_EVENT_SENSOR_TYPE_CHASSIS); if (same (string, "chip_set")) return (IPMI_EVENT_SENSOR_TYPE_CHIP_SET); if (same (string, "other_fru")) return (IPMI_EVENT_SENSOR_TYPE_OTHER_FRU); if (same (string, "cable_interconnect")) return (IPMI_EVENT_SENSOR_TYPE_CABLE_INTERCONNECT); if (same (string, "terminator")) return (IPMI_EVENT_SENSOR_TYPE_TERMINATOR); if (same (string, "system_boot_initiated")) return (IPMI_EVENT_SENSOR_TYPE_SYSTEM_BOOT_INITIATED); if (same (string, "boot_error")) return (IPMI_EVENT_SENSOR_TYPE_BOOT_ERROR); if (same (string, "os_boot")) return (IPMI_EVENT_SENSOR_TYPE_OS_BOOT); if (same (string, "os_critical_stop")) return (IPMI_EVENT_SENSOR_TYPE_OS_CRITICAL_STOP); if (same (string, "slot_connector")) return (IPMI_EVENT_SENSOR_TYPE_SLOT_CONNECTOR); if (same (string, "system_acpi_power_state")) return (IPMI_EVENT_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE); if (same (string, "watchdog2")) return (IPMI_EVENT_SENSOR_TYPE_WATCHDOG2); if (same (string, "platform_alert")) return (IPMI_EVENT_SENSOR_TYPE_PLATFORM_ALERT); if (same (string, "entity_presence")) return (IPMI_EVENT_SENSOR_TYPE_ENTITY_PRESENCE); if (same (string, "monitor_asic_ic")) return (IPMI_EVENT_SENSOR_TYPE_MONITOR_ASIC_IC); if (same (string, "lan")) return (IPMI_EVENT_SENSOR_TYPE_LAN); if (same (string, "management_subsystem_health")) return (IPMI_EVENT_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH); if (same (string, "battery")) return (IPMI_EVENT_SENSOR_TYPE_BATTERY); if (same (string, "session_audit")) return (IPMI_EVENT_SENSOR_TYPE_SESSION_AUDIT); if (same (string, "version_change")) return (IPMI_EVENT_SENSOR_TYPE_VERSION_CHANGE); if (same (string, "fru_state")) return (IPMI_EVENT_SENSOR_TYPE_FRU_STATE); if (same (string, "any")) return (IPMI_EVENT_SENSOR_TYPE_ANY); return (-1); } char * sensor_type_string (uint8_t value) { switch (value) { case IPMI_EVENT_SENSOR_TYPE_RESERVED: return "Reserved"; case IPMI_EVENT_SENSOR_TYPE_TEMPERATURE: return "Temperature"; case IPMI_EVENT_SENSOR_TYPE_VOLTAGE: return "Voltage"; case IPMI_EVENT_SENSOR_TYPE_CURRENT: return "Current"; case IPMI_EVENT_SENSOR_TYPE_FAN: return "Fan"; case IPMI_EVENT_SENSOR_TYPE_PHYSICAL_SECURITY: return "Physical_Security"; case IPMI_EVENT_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return "Platform_Security_Violation_Attempt"; case IPMI_EVENT_SENSOR_TYPE_PROCESSOR: return "Processor"; case IPMI_EVENT_SENSOR_TYPE_POWER_SUPPLY: return "Power_Supply"; case IPMI_EVENT_SENSOR_TYPE_POWER_UNIT: return "Power_Unit"; case IPMI_EVENT_SENSOR_TYPE_COOLING_DEVICE: return "Cooling_Device"; case IPMI_EVENT_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR: return "Other_Units_Based_Sensor"; case IPMI_EVENT_SENSOR_TYPE_MEMORY: return "Memory"; case IPMI_EVENT_SENSOR_TYPE_DRIVE_SLOT: return "Drive_Slot"; case IPMI_EVENT_SENSOR_TYPE_POST_MEMORY_RESIZE: return "Post_Memory_Resize"; case IPMI_EVENT_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return "System_Firmware_Progress"; case IPMI_EVENT_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return "Event_Logging_Disabled"; case IPMI_EVENT_SENSOR_TYPE_WATCHDOG1: return "Watchdog1"; case IPMI_EVENT_SENSOR_TYPE_SYSTEM_EVENT: return "System_Event"; case IPMI_EVENT_SENSOR_TYPE_CRITICAL_INTERRUPT: return "Critical_interrupt"; case IPMI_EVENT_SENSOR_TYPE_BUTTON_SWITCH: return "Button_Switch"; case IPMI_EVENT_SENSOR_TYPE_MODULE_BOARD: return "Module_Board"; case IPMI_EVENT_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR: return "Microcontroller_Coprocessor"; case IPMI_EVENT_SENSOR_TYPE_ADD_IN_CARD: return "Add_In_Card"; case IPMI_EVENT_SENSOR_TYPE_CHASSIS: return "Chassis"; case IPMI_EVENT_SENSOR_TYPE_CHIP_SET: return "Chip_Set"; case IPMI_EVENT_SENSOR_TYPE_OTHER_FRU: return "Other_FRU"; case IPMI_EVENT_SENSOR_TYPE_CABLE_INTERCONNECT: return "Cable_Interconnect"; case IPMI_EVENT_SENSOR_TYPE_TERMINATOR: return "Terminator"; case IPMI_EVENT_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return "System_Boot_Initiated"; case IPMI_EVENT_SENSOR_TYPE_BOOT_ERROR: return "Boot_Error"; case IPMI_EVENT_SENSOR_TYPE_OS_BOOT: return "OS_Boot"; case IPMI_EVENT_SENSOR_TYPE_OS_CRITICAL_STOP: return "OS_Critical_Stop"; case IPMI_EVENT_SENSOR_TYPE_SLOT_CONNECTOR: return "Slot_Connector"; case IPMI_EVENT_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return "System_ACPI_Power_State"; case IPMI_EVENT_SENSOR_TYPE_WATCHDOG2: return "Watchdog2"; case IPMI_EVENT_SENSOR_TYPE_PLATFORM_ALERT: return "Platform_Alert"; case IPMI_EVENT_SENSOR_TYPE_ENTITY_PRESENCE: return "Entity_Presence"; case IPMI_EVENT_SENSOR_TYPE_MONITOR_ASIC_IC: return "Monitor_ASIC_IC"; case IPMI_EVENT_SENSOR_TYPE_LAN: return "LAN"; case IPMI_EVENT_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return "Management_Subsystem_Health"; case IPMI_EVENT_SENSOR_TYPE_BATTERY: return "Battery"; case IPMI_EVENT_SENSOR_TYPE_SESSION_AUDIT: return "Session_Audit"; case IPMI_EVENT_SENSOR_TYPE_VERSION_CHANGE: return "Version_Change"; case IPMI_EVENT_SENSOR_TYPE_FRU_STATE: return "FRU_State"; case IPMI_EVENT_SENSOR_TYPE_ANY: return "Any"; } return ""; } int exception_actions_number (const char *string) { assert (string); if (same (string, "NO_ACTION")) return (IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION); if (same (string, "HARD_POWER_OFF_SYSTEM")) return (IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM); if (same (string, "LOG_EVENT_TO_SEL_ONLY")) return (IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY); return (-1); } char * exception_actions_string (uint8_t value) { switch (value) { case IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION: return "NO_ACTION"; case IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM: return "HARD_POWER_OFF_SYSTEM"; case IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY: return "LOG_EVENT_TO_SEL_ONLY"; } return ""; } freeipmi-1.6.4/ipmi-config/ipmi-config-map.h0000644002055400205540000000601413527331635020611 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_MAP_H #define IPMI_CONFIG_MAP_H #include "ipmi-config.h" int channel_access_mode (const char *string); char *channel_access_mode_string (uint8_t value); uint8_t get_privilege_limit_number (const char *string); char *get_privilege_limit_string (uint8_t value); int privilege_level_number (const char *string); char *privilege_level_string (uint8_t value); int rmcpplus_priv_number (const char *string); char *rmcpplus_priv_string (int value); int ip_address_source_number (const char *source); char *ip_address_source_string (uint8_t source); int ipv6_ipv4_addressing_enables_number (const char *source); char *ipv6_ipv4_addressing_enables_string (uint8_t source); int power_restore_policy_number (const char *string); char *power_restore_policy_string (uint8_t value); int connect_mode_number (const char *string); char *connect_mode_string (uint8_t value); int flow_control_number (const char *string); char *flow_control_string (uint8_t value); int bit_rate_number (const char *string); char * bit_rate_string (uint8_t value); int sol_bit_rate_number (const char *string); char *sol_bit_rate_string (uint8_t value); int alert_destination_type_number (const char *string); char *alert_destination_type_string (uint8_t value); int alert_gateway_number (const char *string); char *alert_gateway_string (uint8_t value); int bios_boot_type_number (const char *string); char *bios_boot_type_string (uint8_t value); int boot_device_number (const char *string); char *boot_device_string (uint8_t value); int device_instance_selector_number (const char *string); char *device_instance_selector_string (uint8_t value); int firmware_bios_verbosity_number (const char *string); char *firmware_bios_verbosity_string (uint8_t value); int console_redirection_number (const char *string); char *console_redirection_string (uint8_t value); int policy_type_number (const char *string); char *policy_type_string (uint8_t value); int filter_type_number (const char *string); char *filter_type_string (uint8_t value); int event_severity_number (const char *string); char *event_severity_string (uint8_t value); int sensor_type_number (const char *string); char *sensor_type_string (uint8_t value); int exception_actions_number (const char *source); char *exception_actions_string (uint8_t source); #endif /* IPMI_CONFIG_MAP_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-parse.c0000644002055400205540000001276413527331635021152 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmi-config-parse.h" #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" ipmi_config_err_t ipmi_config_parse (ipmi_config_state_data_t *state_data, FILE *fp) { char buf[IPMI_CONFIG_PARSE_BUFLEN]; int line_num = 0; struct ipmi_config_section *section = NULL; struct ipmi_config_key *key; char *str, *tok; ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; assert (state_data); while (fgets (buf, IPMI_CONFIG_PARSE_BUFLEN, fp)) { line_num++; buf[IPMI_CONFIG_PARSE_BUFLEN-1] = '\0'; str = strtok (buf, " \t\n"); if (!str) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "%d: empty line\n", line_num); continue; } if (str[0] == '#') { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Comment on line %d\n", line_num); continue; } if (same (str, "Section")) { if (!(tok = strtok (NULL, " \t\n"))) { pstdout_fprintf (state_data->pstate, stderr, "FATAL: Error parsing line number %d\n", line_num); goto cleanup; } if (!(section = ipmi_config_find_section (state_data, tok))) { pstdout_fprintf (state_data->pstate, stderr, "Unknown section `%s'\n", tok); goto cleanup; } if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Entering section `%s'\n", section->section_name); continue; } /* same (str, "Section") */ if (same (str, "EndSection")) { if (!section) { pstdout_fprintf (state_data->pstate, stderr, "FATAL: encountered `%s' without a matching Section\n", str); goto cleanup; } if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Leaving section `%s'\n", section->section_name); section = NULL; continue; } /* same (str, "EndSection") */ if (!section) { pstdout_fprintf (state_data->pstate, stderr, "FATAL: Key `%s' not inside a valid Section\n", str); goto cleanup; } if (!(key = ipmi_config_find_key (section, str))) { pstdout_fprintf (state_data->pstate, stderr, "Unknown key `%s' in section `%s'\n", str, section->section_name); goto cleanup; } tok = strtok (NULL, " \t\n"); if (!tok) tok = ""; if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Parsed `%s:%s=%s'\n", section->section_name, key->key_name, tok); if (ipmi_config_find_keyvalue (section, key->key_name)) { pstdout_fprintf (state_data->pstate, stderr, "Key '%s' specified twice in section '%s'\n", key->key_name, section->section_name); goto cleanup; } if (ipmi_config_section_add_keyvalue (state_data, section, key, tok, NULL) < 0) goto cleanup; } rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } freeipmi-1.6.4/ipmi-config/ipmi-config-parse.h0000644002055400205540000000166213527331635021152 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_PARSE_H #define IPMI_CONFIG_PARSE_H #include "ipmi-config.h" ipmi_config_err_t ipmi_config_parse (ipmi_config_state_data_t *state_data, FILE *fp); #endif /* IPMI_CONFIG_PARSE_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-section.c0000644002055400205540000005424413527331635021503 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config-section.h" #include "ipmi-config-utils.h" #include "freeipmi-portability.h" int ipmi_config_section_append (struct ipmi_config_section **sections, struct ipmi_config_section *section) { assert (sections); assert (section); if (*sections) { struct ipmi_config_section *s = *sections; while (s->next) s = s->next; s->next = section; } else *sections = section; return (0); } void ipmi_config_sections_destroy (struct ipmi_config_section *sections) { while (sections) { struct ipmi_config_section *sections_next = sections->next; ipmi_config_section_destroy (sections); sections = sections_next; } } struct ipmi_config_section * ipmi_config_section_create (ipmi_config_state_data_t *state_data, const char *section_name, const char *section_comment_section_name, const char *section_comment, unsigned int flags, Section_Pre_Commit section_pre_commit, Section_Post_Commit section_post_commit) { struct ipmi_config_section *section = NULL; assert (state_data); assert (section_name); if (!(section = (struct ipmi_config_section *)malloc (sizeof (struct ipmi_config_section)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } section->section_name = NULL; section->section_comment_section_name = NULL; section->section_comment = NULL; section->section_pre_commit = NULL; section->section_post_commit = NULL; section->keys = NULL; section->keyvalues = NULL; section->next = NULL; if (!(section->section_name = strdup (section_name))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } if (section_comment_section_name) { if (!(section->section_comment_section_name = strdup (section_comment_section_name))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } } if (section_comment) { if (!(section->section_comment = strdup (section_comment))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } } section->flags = flags; section->section_pre_commit = section_pre_commit; section->section_post_commit = section_post_commit; section->category = 0; section->line_length = 0; return (section); cleanup: ipmi_config_section_destroy (section); return (NULL); } struct ipmi_config_section * ipmi_config_section_multi_channel_create (ipmi_config_state_data_t *state_data, const char *section_name_base_str, const char *section_comment, Section_Pre_Commit section_pre_commit, Section_Post_Commit section_post_commit, unsigned int config_flags, int channel_index, uint8_t *channel_numbers, unsigned int channel_numbers_count) { struct ipmi_config_section *section = NULL; assert (state_data); assert (section_name_base_str); assert (channel_numbers); assert (channel_index < (int)channel_numbers_count); if (channel_index < 0) { if (!(section = ipmi_config_section_create (state_data, section_name_base_str, section_name_base_str, section_comment, config_flags, section_pre_commit, section_post_commit))) goto cleanup; } else { char section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; char section_comment_section_name[IPMI_CONFIG_MAX_SECTION_NAME_LEN]; char *section_comment_section_name_ptr = NULL; snprintf (section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "%s_Channel_%u", section_name_base_str, channel_numbers[channel_index]); if (section_comment) { snprintf (section_comment_section_name, IPMI_CONFIG_MAX_SECTION_NAME_LEN, "%s_Channel_X", section_name_base_str); section_comment_section_name_ptr = section_comment_section_name; } if (!channel_index) { if (!(section = ipmi_config_section_create (state_data, section_name, section_comment_section_name_ptr, section_comment, config_flags, section_pre_commit, section_post_commit))) goto cleanup; } else { if (!(section = ipmi_config_section_create (state_data, section_name, NULL, NULL, config_flags, section_pre_commit, section_post_commit))) goto cleanup; } } return (section); cleanup: ipmi_config_section_destroy (section); return (NULL); } static void _config_key_destroy (struct ipmi_config_key *key) { if (key) { free (key->key_name); free (key->description); free (key); } } static void _config_keyvalue_destroy (struct ipmi_config_keyvalue *keyvalue) { if (keyvalue) { free (keyvalue->value_input); free (keyvalue->value_output); free (keyvalue); } } void ipmi_config_section_destroy (struct ipmi_config_section *section) { if (section) { free (section->section_name); free (section->section_comment_section_name); free (section->section_comment); while (section->keys) { struct ipmi_config_key *key_next = section->keys->next; _config_key_destroy (section->keys); section->keys = key_next; } while (section->keyvalues) { struct ipmi_config_keyvalue *keyvalue_next = section->keyvalues->next; _config_keyvalue_destroy (section->keyvalues); section->keyvalues = keyvalue_next; } free (section); } } int ipmi_config_set_category (struct ipmi_config_section *sections, unsigned int category) { struct ipmi_config_section *s; assert (sections); assert (IPMI_CONFIG_CATEGORY_VALID (category)); s = sections; while (s) { s->category = category; s = s->next; } return (0); } int ipmi_config_set_line_length (struct ipmi_config_section *sections, unsigned int line_length) { struct ipmi_config_section *s; assert (sections); s = sections; while (s) { s->line_length = line_length; s = s->next; } return (0); } int ipmi_config_section_add_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *key_name, const char *description, unsigned int flags, Key_Checkout checkout, Key_Commit commit, Key_Validate validate) { struct ipmi_config_key *k = NULL; assert (state_data); assert (section); assert (key_name); assert (description); assert (checkout); assert (commit); assert (validate); if (!(k = (struct ipmi_config_key *)malloc (sizeof (struct ipmi_config_key)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } k->key_name = NULL; k->description = NULL; k->checkout = NULL; k->commit = NULL; k->validate = NULL; k->next = NULL; if (!(k->key_name = strdup (key_name))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } if (!(k->description = strdup (description))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } k->flags = flags; k->checkout = checkout; k->commit = commit; k->validate = validate; if (section->keys) { struct ipmi_config_key *trav = section->keys; while (trav->next) trav = trav->next; trav->next = k; } else section->keys = k; return (0); cleanup: _config_key_destroy (k); return (-1); } int ipmi_config_section_multi_channel_add_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *key_name_base_str, const char *description, unsigned int flags, Key_Checkout checkout, Key_Commit commit, Key_Validate validate, int channel_index, uint8_t *channel_numbers, unsigned int channel_numbers_count) { assert (state_data); assert (section); assert (key_name_base_str); assert (description); assert (checkout); assert (commit); assert (validate); assert (channel_numbers); assert (channel_index < (int)channel_numbers_count); if (channel_index < 0) { if (ipmi_config_section_add_key (state_data, section, key_name_base_str, description, flags, checkout, commit, validate) < 0) return (-1); } else { char key_name[IPMI_CONFIG_MAX_KEY_NAME_LEN]; snprintf (key_name, IPMI_CONFIG_MAX_KEY_NAME_LEN, "%s_Channel_%u", key_name_base_str, channel_numbers[channel_index]); if (ipmi_config_section_add_key (state_data, section, key_name, description, flags, checkout, commit, validate) < 0) return (-1); } return (0); } int ipmi_config_section_add_keyvalue (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, struct ipmi_config_key *key, const char *value_input, const char *value_output) { struct ipmi_config_keyvalue *kv = NULL; assert (state_data); assert (section); assert (key); if (!(kv = malloc (sizeof (struct ipmi_config_keyvalue)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } kv->key = NULL; kv->value_input = NULL; kv->value_output = NULL; kv->next = NULL; /* back pointer */ kv->key = key; if (value_input) { if (!(kv->value_input = strdup (value_input))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } } if (value_output) { if (!(kv->value_output = strdup (value_output))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } } kv->next = NULL; if (section->keyvalues) { struct ipmi_config_keyvalue *trav = section->keyvalues; while (trav->next) trav = trav->next; trav->next = kv; } else section->keyvalues = kv; return (0); cleanup: _config_keyvalue_destroy (kv); return (-1); } int ipmi_config_section_update_keyvalue_input (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, const char *value_input) { assert (state_data); assert (keyvalue); if (value_input) { /* overwrite values, user can specify something else on the * command line */ free (keyvalue->value_input); if (!(keyvalue->value_input = strdup (value_input))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } } return (0); } int ipmi_config_section_update_keyvalue_output (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, const char *value_output) { assert (state_data); assert (keyvalue); assert (!keyvalue->value_output); if (value_output) { if (!(keyvalue->value_output = strdup (value_output))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } } return (0); } int ipmi_config_section_update_keyvalue_output_unsigned_int (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, unsigned int value_output) { char buf[IPMI_CONFIG_PARSE_BUFLEN]; assert (state_data); assert (keyvalue); assert (!keyvalue->value_output); snprintf (buf, IPMI_CONFIG_PARSE_BUFLEN, "%u", value_output); if (!(keyvalue->value_output = strdup (buf))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } return (0); } int ipmi_config_section_update_keyvalue_output_hex (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, unsigned int value_output) { char buf[IPMI_CONFIG_PARSE_BUFLEN]; assert (state_data); assert (keyvalue); assert (!keyvalue->value_output); snprintf (buf, IPMI_CONFIG_PARSE_BUFLEN, "0x%X", value_output); if (!(keyvalue->value_output = strdup (buf))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } return (0); } int ipmi_config_section_update_keyvalue_output_double (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, double value_output) { char buf[IPMI_CONFIG_PARSE_BUFLEN]; assert (state_data); assert (keyvalue); assert (!keyvalue->value_output); snprintf (buf, IPMI_CONFIG_PARSE_BUFLEN, "%f", value_output); if (!(keyvalue->value_output = strdup (buf))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } return (0); } int ipmi_config_sections_validate_keyvalue_inputs (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *s; int nonvalid_count = 0; int rv = -1; assert (state_data); s = state_data->sections; while (s) { struct ipmi_config_keyvalue *kv; kv = s->keyvalues; while (kv) { if (!kv->value_input) { pstdout_fprintf (state_data->pstate, stderr, "Value not specified for key '%s' in section '%s'\n", kv->key->key_name, s->section_name); nonvalid_count++; goto next_kv; } if (kv->value_input) { ipmi_config_validate_t v; if (!strcasecmp (kv->value_input, IPMI_CONFIG_USERNAME_NOT_SET_YET_STR)) { pstdout_fprintf (state_data->pstate, stderr, "Invalid value '%s' for key '%s' in section '%s'\n", kv->value_input, kv->key->key_name, s->section_name); nonvalid_count++; goto next_kv; } if ((v = kv->key->validate (state_data, s->section_name, kv->key->key_name, kv->value_input)) == IPMI_CONFIG_VALIDATE_FATAL_ERROR) goto cleanup; if (v == IPMI_CONFIG_VALIDATE_NON_FATAL_ERROR) { pstdout_fprintf (state_data->pstate, stderr, "Error validating value '%s' for key '%s' in section '%s'\n", kv->value_input, kv->key->key_name, s->section_name); nonvalid_count++; } if (v == IPMI_CONFIG_VALIDATE_VALUE_CANNOT_BE_ENCODED_ACCURATELY) { pstdout_fprintf (state_data->pstate, stderr, "Value '%s' for key '%s' in section '%s' cannot be encoded accurately, try another value\n", kv->value_input, kv->key->key_name, s->section_name); nonvalid_count++; } if (v == IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE) { pstdout_fprintf (state_data->pstate, stderr, "Out of Range value '%s' for key '%s' in section '%s'\n", kv->value_input, kv->key->key_name, s->section_name); nonvalid_count++; } if (v == IPMI_CONFIG_VALIDATE_INVALID_VALUE) { pstdout_fprintf (state_data->pstate, stderr, "Invalid value '%s' for key '%s' in section '%s'\n", kv->value_input, kv->key->key_name, s->section_name); nonvalid_count++; } } next_kv: kv = kv->next; } s = s->next; } rv = nonvalid_count; cleanup: return (rv); } int ipmi_config_sections_insert_keyvalues (ipmi_config_state_data_t *state_data, struct ipmi_config_keypair *keypairs) { struct ipmi_config_section *s; struct ipmi_config_key *k; struct ipmi_config_keyvalue *kv; struct ipmi_config_keypair *kp; int rv = 0; assert (state_data); assert (keypairs); kp = keypairs; while (kp) { if (!(s = ipmi_config_find_section (state_data, kp->section_name))) { pstdout_fprintf (state_data->pstate, stderr, "Unknown section `%s'\n", kp->section_name); rv = -1; goto next_keypair; } if (!(k = ipmi_config_find_key (s, kp->key_name))) { pstdout_fprintf (state_data->pstate, stderr, "Unknown key `%s' in section `%s'\n", kp->key_name, kp->section_name); rv = -1; goto next_keypair; } if ((kv = ipmi_config_find_keyvalue (s, kp->key_name))) { if (ipmi_config_section_update_keyvalue_input (state_data, kv, kp->value_input) < 0) { rv = -1; goto cleanup; } } else { if (ipmi_config_section_add_keyvalue (state_data, s, k, kp->value_input, NULL) < 0) { rv = -1; goto cleanup; } } next_keypair: kp = kp->next; } cleanup: return (rv); } ipmi_config_err_t ipmi_config_output_sections_list (ipmi_config_state_data_t *state_data) { struct ipmi_config_section *s; assert (state_data); s = state_data->sections; while (s) { if (!(s->flags & IPMI_CONFIG_DO_NOT_LIST)) pstdout_printf (state_data->pstate, "%s\n", s->section_name); s = s->next; } return (IPMI_CONFIG_ERR_SUCCESS); } freeipmi-1.6.4/ipmi-config/ipmi-config-section.h0000644002055400205540000001505413527331635021504 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_SECTION_H #define IPMI_CONFIG_SECTION_H #include "ipmi-config.h" /* XXX */ /* no ipmi_config_sections_create, responsibility of config tool to create list */ int ipmi_config_section_append (struct ipmi_config_section **sections, struct ipmi_config_section *section); void ipmi_config_sections_destroy (struct ipmi_config_section *sections); struct ipmi_config_section *ipmi_config_section_create (ipmi_config_state_data_t *state_data, const char *section_name, const char *section_comment_section_name, const char *section_comment, unsigned int flags, Section_Pre_Commit section_pre_commit, Section_Post_Commit section_post_commit); /* -1 for channel index indicates do nothing, do same as ipmi_config_section_create */ struct ipmi_config_section *ipmi_config_section_multi_channel_create (ipmi_config_state_data_t *state_data, const char *section_name_base_str, const char *section_comment, Section_Pre_Commit section_pre_commit, Section_Post_Commit section_post_commit, unsigned int config_flags, int channel_index, uint8_t *channel_numbers, unsigned int channel_numbers_count); void ipmi_config_section_destroy (struct ipmi_config_section *section); /* Why not set in ipmi_config_section_create? * * Some sections may cross categories, b/c of a legacy. Must be done * after all sections for a category are created. */ int ipmi_config_set_category (struct ipmi_config_section *sections, unsigned int category); int ipmi_config_set_line_length (struct ipmi_config_section *sections, unsigned int line_length); int ipmi_config_section_add_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *key_name, const char *description, unsigned int flags, Key_Checkout checkout, Key_Commit commit, Key_Validate validate); /* -1 for channel index indicates do nothing, do same as ipmi_config_section_add_key */ int ipmi_config_section_multi_channel_add_key (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, const char *key_name_base_str, const char *description, unsigned int flags, Key_Checkout checkout, Key_Commit commit, Key_Validate validate, int channel_index, uint8_t *channel_numbers, unsigned int channel_numbers_count); int ipmi_config_section_add_keyvalue (ipmi_config_state_data_t *state_data, struct ipmi_config_section *section, struct ipmi_config_key *key, const char *value_input, const char *value_output); int ipmi_config_section_update_keyvalue_input (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, const char *value_input); int ipmi_config_section_update_keyvalue_output (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, const char *value_output); int ipmi_config_section_update_keyvalue_output_unsigned_int (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, unsigned int value_output); int ipmi_config_section_update_keyvalue_output_hex (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, unsigned int value_output); int ipmi_config_section_update_keyvalue_output_double (ipmi_config_state_data_t *state_data, struct ipmi_config_keyvalue *keyvalue, double value_output); /* returns -1 on error, number of non-valid values otherwise */ int ipmi_config_sections_validate_keyvalue_inputs (ipmi_config_state_data_t *state_data); /* returns -1 on error, 0 on success */ int ipmi_config_sections_insert_keyvalues (ipmi_config_state_data_t *state_data, struct ipmi_config_keypair *keypairs); ipmi_config_err_t ipmi_config_output_sections_list (ipmi_config_state_data_t *state_data); #endif /* IPMI_CONFIG_SECTION_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-utils.c0000644002055400205540000004755213527331635021203 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-config-utils.h" #include "freeipmi-portability.h" #include "pstdout.h" struct ipmi_config_section * ipmi_config_find_section (ipmi_config_state_data_t *state_data, const char *section_name) { struct ipmi_config_section *s = NULL; assert (state_data); assert (section_name); s = state_data->sections; while (s) { if (!strcasecmp (section_name, s->section_name)) break; s = s->next; } return (s); } struct ipmi_config_key * ipmi_config_find_key (struct ipmi_config_section *section, const char *key_name) { struct ipmi_config_key *k = NULL; assert (section); assert (key_name); k = section->keys; while (k) { if (!strcasecmp (key_name, k->key_name)) break; k = k->next; } return (k); } struct ipmi_config_keyvalue * ipmi_config_find_keyvalue (struct ipmi_config_section *section, const char *key_name) { struct ipmi_config_keyvalue *kv = NULL; assert (section); assert (key_name); kv = section->keyvalues; while (kv) { if (!strcasecmp (key_name, kv->key->key_name)) break; kv = kv->next; } return (kv); } int ipv4_address_string2int (ipmi_config_state_data_t *state_data, const char *src, uint32_t *dest) { unsigned int b1, b2, b3, b4; uint64_t val; int ret; assert (state_data); assert (src); assert (dest); if ((ret = sscanf (src, "%u.%u.%u.%u", &b1, &b2, &b3, &b4)) < 0) { pstdout_perror (state_data->pstate, "sscanf"); return (-1); } if (ret != 4) { pstdout_fprintf (state_data->pstate, stderr, "ipv4_address_string2int: Invalid src input: %s\n", src); return (-1); } val = 0; val |= (uint64_t)b1; val |= ((uint64_t)b2 << 8); val |= ((uint64_t)b3 << 16); val |= ((uint64_t)b4 << 24); *dest = val; return (0); } int mac_address_string2int (ipmi_config_state_data_t *state_data, const char *src, uint64_t *dest) { unsigned int b1, b2, b3, b4, b5, b6; uint64_t val; int ret; assert (state_data); assert (src); assert (dest); if ((ret = sscanf (src, "%02X:%02X:%02X:%02X:%02X:%02X", &b1, &b2, &b3, &b4, &b5, &b6)) < 0) { pstdout_perror (state_data->pstate, "sscanf"); return (-1); } if (ret != 6) { pstdout_fprintf (state_data->pstate, stderr, "mac_address_string2int: Invalid src input: %s\n", src); return (-1); } val = 0; val |= (uint64_t)b1; val |= ((uint64_t)b2 << 8); val |= ((uint64_t)b3 << 16); val |= ((uint64_t)b4 << 24); val |= ((uint64_t)b5 << 32); val |= ((uint64_t)b6 << 40); *dest = val; return (0); } int ipmi_errnum_is_non_fatal (ipmi_config_state_data_t *state_data, fiid_obj_t obj_cmd_rs, ipmi_config_err_t *non_fatal_err) { assert (state_data); assert (obj_cmd_rs); assert (fiid_obj_valid (obj_cmd_rs)); assert (non_fatal_err); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG; else (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR; return (1); } return (0); } int ipmi_config_param_errnum_is_non_fatal (ipmi_config_state_data_t *state_data, fiid_obj_t obj_cmd_rs, ipmi_config_err_t *non_fatal_err) { assert (state_data); assert (obj_cmd_rs); assert (fiid_obj_valid (obj_cmd_rs)); assert (non_fatal_err); /* should all be the same, this is just to check */ assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED == IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED); assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED == IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED); assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED == IPMI_COMP_CODE_SET_BOOT_OPTIONS_PARAMETER_NOT_SUPPORTED); assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER == IPMI_COMP_CODE_SET_PEF_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER); assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER == IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER); assert (IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER == IPMI_COMP_CODE_SET_BOOT_OPTIONS_WRITE_READ_ONLY_PARAMETER); if (!IPMI_CTX_ERRNUM_IS_FATAL_ERROR (state_data->ipmi_ctx)) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_WRITE_READ_ONLY_PARAMETER) == 1) (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR_READ_ONLY; else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_LAN_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR_NOT_SUPPORTED; else if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR_INVALID_UNSUPPORTED_CONFIG; else (*non_fatal_err) = IPMI_CONFIG_ERR_NON_FATAL_ERROR; return (1); } return (0); } int ipmi_config_pstdout_fprintf (ipmi_config_state_data_t *state_data, FILE *stream, const char *format, ...) { va_list ap; int rv; assert (state_data); /* special case b/c pstdout doesn't handle non-stdout/non-stderr * assume proper checks in tools if stream != stdout || != stderr */ va_start (ap, format); if (stream == stdout || stream == stderr) rv = pstdout_vfprintf (state_data->pstate, stream, format, ap); else rv = vfprintf (stream, format, ap); va_end (ap); return rv; } ipmi_config_err_t load_lan_channel_numbers (ipmi_config_state_data_t *state_data) { int ret; assert (state_data); if ((ret = ipmi_get_channel_numbers (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, state_data->lan_channel_numbers, IPMI_CHANNEL_NUMBERS_MAX)) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (IPMI_CONFIG_ERR_NON_FATAL_ERROR); } state_data->lan_channel_numbers_count = (unsigned int)ret; state_data->lan_channel_numbers_loaded++; return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t load_serial_channel_numbers (ipmi_config_state_data_t *state_data) { int ret; assert (state_data); if ((ret = ipmi_get_channel_numbers (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_RS232, state_data->serial_channel_numbers, IPMI_CHANNEL_NUMBERS_MAX)) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (IPMI_CONFIG_ERR_NON_FATAL_ERROR); } state_data->serial_channel_numbers_count = (unsigned int)ret; state_data->serial_channel_numbers_loaded++; return (IPMI_CONFIG_ERR_SUCCESS); } static void _sol_channel_number_save (ipmi_config_state_data_t *state_data, uint8_t lan_channel_number, uint8_t sol_channel_number) { unsigned int i; int found = 0; assert (state_data); assert (state_data->sol_channel_numbers_count <= IPMI_CHANNEL_NUMBERS_MAX); for (i = 0; i < state_data->sol_channel_numbers_count; i++) { if (state_data->sol_channel_numbers_sol_channel[i] == sol_channel_number) { found++; break; } } if (!found) { state_data->sol_channel_numbers_unique[state_data->sol_channel_numbers_unique_count] = sol_channel_number; state_data->sol_channel_numbers_unique_count++; } state_data->sol_channel_numbers_lan_channel[state_data->sol_channel_numbers_count] = lan_channel_number; state_data->sol_channel_numbers_sol_channel[state_data->sol_channel_numbers_count] = sol_channel_number; state_data->sol_channel_numbers_count++; } ipmi_config_err_t _get_sol_channel_number_for_channel (ipmi_config_state_data_t *state_data, uint8_t lan_channel_number) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; fiid_obj_t obj_cmd_rs = NULL; uint64_t val; assert (state_data); if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SOL_CHANNEL_ASSUME_LAN_CHANNEL) { _sol_channel_number_save (state_data, lan_channel_number, lan_channel_number); goto out; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_sol_payload_channel_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters_sol_payload_channel (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_SOL_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { /* This parameter is optional, if its not supported, assume LAN channel */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_SET_SOL_CONFIGURATION_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1)) { _sol_channel_number_save (state_data, lan_channel_number, lan_channel_number); goto out; } if (ipmi_config_param_errnum_is_non_fatal (state_data, obj_cmd_rs, &ret)) rv = ret; if (rv == IPMI_CONFIG_ERR_FATAL_ERROR || state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters_sol_payload_channel: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "payload_channel", &val) < 0) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } _sol_channel_number_save (state_data, lan_channel_number, val); out: rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } ipmi_config_err_t load_sol_channel_numbers (ipmi_config_state_data_t *state_data) { unsigned int channelindex; assert (state_data); /* There's a lot of trickery here. Even if motherboard specifies * multiple LAN channels, they could map to a fewer number of SOL * channels. So we need to calculate the number of unique SOL * channels */ if (state_data->lan_channel_numbers_count > 0) { for (channelindex = 0; channelindex < state_data->lan_channel_numbers_count; channelindex++) { if (_get_sol_channel_number_for_channel (state_data, state_data->lan_channel_numbers[channelindex]) == IPMI_CONFIG_ERR_FATAL_ERROR) return (IPMI_CONFIG_ERR_FATAL_ERROR); } state_data->sol_channel_numbers_loaded++; } return (IPMI_CONFIG_ERR_SUCCESS); } ipmi_config_err_t get_lan_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); /* section_name can be NULL if want to force IPMI search */ assert (channel_number); /* For multi-channel cases, channel will be in the section name */ if (section_name) { char *ptr; /* Special case for Lan_Channel_Channel_X */ if ((ptr = stristr (section_name, "Channel_Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } /* For all other sections with a channel number at the end of the section name */ if ((ptr = stristr (section_name, "Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } } /* for single-channel, channel is first one found */ if (!state_data->prog_data->args->lan_channel_number_set) { if (!state_data->lan_channel_numbers_loaded) { if ((ret = load_lan_channel_numbers (state_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } } if (!state_data->lan_channel_numbers_count) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*channel_number) = state_data->lan_channel_numbers[0]; } else (*channel_number) = state_data->prog_data->args->lan_channel_number; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t get_serial_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); /* section_name can be NULL if want to force IPMI search */ assert (channel_number); /* For multi-channel cases, channel will be in the section name */ if (section_name) { char *ptr; /* Special case for Serial_Channel_Channel_X */ if ((ptr = stristr (section_name, "Channel_Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } /* For all other sections with a channel number at the end of the section name */ if ((ptr = stristr (section_name, "Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } } /* for single-channel, channel is first one found */ if (!state_data->prog_data->args->serial_channel_number_set) { if (!state_data->serial_channel_numbers_loaded) { if ((ret = load_serial_channel_numbers (state_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } } if (!state_data->serial_channel_numbers_count) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*channel_number) = state_data->serial_channel_numbers[0]; } else (*channel_number) = state_data->prog_data->args->serial_channel_number; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t get_sol_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number) { ipmi_config_err_t rv = IPMI_CONFIG_ERR_FATAL_ERROR; ipmi_config_err_t ret; assert (state_data); /* section_name can be NULL if want to force IPMI search */ assert (channel_number); /* For multi-channel cases, channel will be in the section name */ if (section_name) { char *ptr; /* Sections with a channel number at the end of the section name */ if ((ptr = stristr (section_name, "Channel_"))) { (*channel_number) = atoi (ptr + strlen ("Channel_")); return (IPMI_CONFIG_ERR_SUCCESS); } } /* for single-channel, channel is first one found */ if (!state_data->prog_data->args->sol_channel_number_set) { if (!state_data->sol_channel_numbers_loaded) { if ((ret = load_sol_channel_numbers (state_data)) != IPMI_CONFIG_ERR_SUCCESS) { rv = ret; goto cleanup; } } if (!state_data->sol_channel_numbers_count) { rv = IPMI_CONFIG_ERR_NON_FATAL_ERROR; goto cleanup; } (*channel_number) = state_data->sol_channel_numbers_unique[0]; } else (*channel_number) = state_data->prog_data->args->sol_channel_number; rv = IPMI_CONFIG_ERR_SUCCESS; cleanup: return (rv); } ipmi_config_err_t read_only_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv) { /* Read only parameter */ pstdout_fprintf (state_data->pstate, stderr, "Ignoring attempt to set read-only configuration variable.\n"); return (IPMI_CONFIG_ERR_SUCCESS); } freeipmi-1.6.4/ipmi-config/ipmi-config-utils.h0000644002055400205540000000643713527331635021205 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_UTILS_H #define IPMI_CONFIG_UTILS_H #include "ipmi-config.h" struct ipmi_config_section *ipmi_config_find_section (ipmi_config_state_data_t *state_data, const char *section_name); struct ipmi_config_key *ipmi_config_find_key (struct ipmi_config_section *section, const char *key_name); struct ipmi_config_keyvalue *ipmi_config_find_keyvalue (struct ipmi_config_section *section, const char *key_name); int ipv4_address_string2int (ipmi_config_state_data_t *state_data, const char *src, uint32_t *dest); int mac_address_string2int (ipmi_config_state_data_t *state_data, const char *src, uint64_t *dest); int ipmi_errnum_is_non_fatal (ipmi_config_state_data_t *state_data, fiid_obj_t obj_cmd_rs, ipmi_config_err_t *non_fatal_err); int ipmi_config_param_errnum_is_non_fatal (ipmi_config_state_data_t *state_data, fiid_obj_t obj_cmd_rs, ipmi_config_err_t *non_fatal_err); int ipmi_config_pstdout_fprintf (ipmi_config_state_data_t *state_data, FILE *stream, const char *format, ...); ipmi_config_err_t load_lan_channel_numbers (ipmi_config_state_data_t *state_data); ipmi_config_err_t load_serial_channel_numbers (ipmi_config_state_data_t *state_data); ipmi_config_err_t load_sol_channel_numbers (ipmi_config_state_data_t *state_data); ipmi_config_err_t get_lan_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number); ipmi_config_err_t get_serial_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number); ipmi_config_err_t get_sol_channel_number (ipmi_config_state_data_t *state_data, const char *section_name, uint8_t *channel_number); ipmi_config_err_t read_only_commit (ipmi_config_state_data_t *state_data, const char *section_name, const struct ipmi_config_keyvalue *kv); #endif /* IPMI_CONFIG_UTILS_H */ freeipmi-1.6.4/ipmi-config/ipmi-config-validate.c0000644002055400205540000004645313527331635021633 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include #include #include #include "ipmi-config.h" #include "ipmi-config-map.h" #include "ipmi-config-validate.h" #include "freeipmi-portability.h" ipmi_config_validate_t yes_no_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (!strcasecmp (value, "yes") || !strcasecmp (value, "no")) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t check_number_range (const char *value, int min, int max) { long int conv; char *endptr; assert (value); errno = 0; conv = strtol (value, &endptr, 0); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); if (conv < min || conv > max) return (IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } ipmi_config_validate_t check_number_range_unsigned (const char *value, unsigned int min, unsigned int max) { unsigned long conv; char *endptr; assert (value); errno = 0; conv = strtoul (value, &endptr, 0); if (errno || endptr[0] != '\0') return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); if (conv < min || conv > max) return (IPMI_CONFIG_VALIDATE_OUT_OF_RANGE_VALUE); return (IPMI_CONFIG_VALIDATE_VALID_VALUE); } ipmi_config_validate_t number_range_three_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 7)); } ipmi_config_validate_t number_range_four_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 15)); } ipmi_config_validate_t number_range_seven_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 127)); } ipmi_config_validate_t number_range_twelve_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 4095)); } ipmi_config_validate_t number_range_one_byte_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 255)); } ipmi_config_validate_t number_range_one_byte_non_zero_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 1, 255)); } ipmi_config_validate_t number_range_two_bytes_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range (value, 0, 65535)); } ipmi_config_validate_t number_range_four_bytes_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); return (check_number_range_unsigned (value, 0, 4294967295)); } ipmi_config_validate_t ip_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { struct in_addr a; assert (state_data); assert (section_name); assert (key_name); assert (value); if (inet_aton (value, &a)) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t ipv6_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { struct in6_addr a; assert (state_data); assert (section_name); assert (key_name); assert (value); if (inet_pton (AF_INET6, value, &a) == 1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t mac_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { unsigned int foo; assert (state_data); assert (section_name); assert (key_name); assert (value); if (sscanf (value, "%02x:%02x:%02x:%02x:%02x:%02x", &foo, &foo, &foo, &foo, &foo, &foo) == 6) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t channel_access_mode_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (channel_access_mode (value) >= 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t get_privilege_limit_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (get_privilege_limit_number (value) > 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t privilege_level_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (privilege_level_number (value) > 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t rmcpplus_priv_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (rmcpplus_priv_number (value) >= 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t ip_address_source_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (ip_address_source_number (value) >= 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t ipv6_ipv4_addressing_enables_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (ipv6_ipv4_addressing_enables_number (value) >= 0) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t power_restore_policy_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (power_restore_policy_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t connect_mode_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (connect_mode_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t flow_control_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (flow_control_number (value) > -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t bit_rate_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (bit_rate_number (value) > -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t sol_bit_rate_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (sol_bit_rate_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t alert_destination_type_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (alert_destination_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t alert_gateway_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (alert_gateway_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t bios_boot_type_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (bios_boot_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t boot_device_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (boot_device_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t device_instance_selector_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (device_instance_selector_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t firmware_bios_verbosity_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (firmware_bios_verbosity_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t console_redirection_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (console_redirection_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t alert_destination_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (alert_destination_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t alert_gateway_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (alert_gateway_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t policy_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (policy_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t filter_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (filter_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t event_severity_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); if (event_severity_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (IPMI_CONFIG_VALIDATE_INVALID_VALUE); } ipmi_config_validate_t sensor_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); /* can be string or hex code */ if (sensor_type_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (number_range_one_byte_validate (state_data, section_name, key_name, value)); } ipmi_config_validate_t exception_actions_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value) { assert (state_data); assert (section_name); assert (key_name); assert (value); /* can be string or hex code, hex code range limited */ if (exception_actions_number (value) != -1) return (IPMI_CONFIG_VALIDATE_VALID_VALUE); return (check_number_range (value, IPMI_DCMI_EXCEPTION_ACTIONS_MIN, IPMI_DCMI_EXCEPTION_ACTIONS_MAX)); } freeipmi-1.6.4/ipmi-config/ipmi-config-validate.h0000644002055400205540000003130413527331635021625 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_CONFIG_VALIDATE_H #define IPMI_CONFIG_VALIDATE_H #include "ipmi-config.h" ipmi_config_validate_t yes_no_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t check_number_range (const char *value, int min, int max); ipmi_config_validate_t check_number_range_unsigned (const char *value, unsigned int min, unsigned int max); ipmi_config_validate_t number_range_three_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_four_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_seven_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_twelve_bits_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_one_byte_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_one_byte_non_zero_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_two_bytes_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t number_range_four_bytes_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t ip_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t ipv6_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t mac_address_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t channel_access_mode_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t get_privilege_limit_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t privilege_level_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t rmcpplus_priv_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t ip_address_source_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t ipv6_ipv4_addressing_enables_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t power_restore_policy_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t connect_mode_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t flow_control_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t bit_rate_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t sol_bit_rate_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t alert_destination_type_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t alert_gateway_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t bios_boot_type_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t boot_device_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t device_instance_selector_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t firmware_bios_verbosity_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t console_redirection_number_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t alert_destination_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t alert_gateway_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t policy_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t filter_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t event_severity_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t sensor_type_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); ipmi_config_validate_t exception_actions_validate (ipmi_config_state_data_t *state_data, const char *section_name, const char *key_name, const char *value); #endif /* IPMI_CONFIG_VALIDATE_H */ freeipmi-1.6.4/ipmi-config/bmc-config.in0000755002055400205540000000010113527331635020012 0ustar00achuachu00000000000000#!/bin/sh exec @CONFIGSBINDIR@/ipmi-config --category=core "$@" freeipmi-1.6.4/ipmi-config/ipmi-chassis-config.in0000755002055400205540000000010413527331635021645 0ustar00achuachu00000000000000#!/bin/sh exec @CONFIGSBINDIR@/ipmi-config --category=chassis "$@" freeipmi-1.6.4/ipmi-config/ipmi-pef-config.in0000755002055400205540000000010013527331635020756 0ustar00achuachu00000000000000#!/bin/sh exec @CONFIGSBINDIR@/ipmi-config --category=pef "$@" freeipmi-1.6.4/ipmi-config/ipmi-sensors-config.in0000755002055400205540000000010413527331635021704 0ustar00achuachu00000000000000#!/bin/sh exec @CONFIGSBINDIR@/ipmi-config --category=sensors "$@" freeipmi-1.6.4/ipmi-dcmi/0000755002055400205540000000000013527342547015136 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-dcmi/Makefile.in0000644002055400205540000006723113527342444017210 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-dcmi$(EXEEXT) subdir = ipmi-dcmi DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_dcmi_OBJECTS = ipmi_dcmi-ipmi-dcmi.$(OBJEXT) \ ipmi_dcmi-ipmi-dcmi-argp.$(OBJEXT) ipmi_dcmi_OBJECTS = $(am_ipmi_dcmi_OBJECTS) ipmi_dcmi_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_dcmi_SOURCES) DIST_SOURCES = $(ipmi_dcmi_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_dcmi_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_dcmi_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_dcmi_SOURCES = \ ipmi-dcmi.c \ ipmi-dcmi.h \ ipmi-dcmi-argp.c \ ipmi-dcmi-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-dcmi/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-dcmi/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-dcmi$(EXEEXT): $(ipmi_dcmi_OBJECTS) $(ipmi_dcmi_DEPENDENCIES) $(EXTRA_ipmi_dcmi_DEPENDENCIES) @rm -f ipmi-dcmi$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_dcmi_OBJECTS) $(ipmi_dcmi_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_dcmi-ipmi-dcmi.o: ipmi-dcmi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_dcmi-ipmi-dcmi.o -MD -MP -MF $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Tpo -c -o ipmi_dcmi-ipmi-dcmi.o `test -f 'ipmi-dcmi.c' || echo '$(srcdir)/'`ipmi-dcmi.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Tpo $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-dcmi.c' object='ipmi_dcmi-ipmi-dcmi.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_dcmi-ipmi-dcmi.o `test -f 'ipmi-dcmi.c' || echo '$(srcdir)/'`ipmi-dcmi.c ipmi_dcmi-ipmi-dcmi.obj: ipmi-dcmi.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_dcmi-ipmi-dcmi.obj -MD -MP -MF $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Tpo -c -o ipmi_dcmi-ipmi-dcmi.obj `if test -f 'ipmi-dcmi.c'; then $(CYGPATH_W) 'ipmi-dcmi.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-dcmi.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Tpo $(DEPDIR)/ipmi_dcmi-ipmi-dcmi.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-dcmi.c' object='ipmi_dcmi-ipmi-dcmi.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_dcmi-ipmi-dcmi.obj `if test -f 'ipmi-dcmi.c'; then $(CYGPATH_W) 'ipmi-dcmi.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-dcmi.c'; fi` ipmi_dcmi-ipmi-dcmi-argp.o: ipmi-dcmi-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_dcmi-ipmi-dcmi-argp.o -MD -MP -MF $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Tpo -c -o ipmi_dcmi-ipmi-dcmi-argp.o `test -f 'ipmi-dcmi-argp.c' || echo '$(srcdir)/'`ipmi-dcmi-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Tpo $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-dcmi-argp.c' object='ipmi_dcmi-ipmi-dcmi-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_dcmi-ipmi-dcmi-argp.o `test -f 'ipmi-dcmi-argp.c' || echo '$(srcdir)/'`ipmi-dcmi-argp.c ipmi_dcmi-ipmi-dcmi-argp.obj: ipmi-dcmi-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_dcmi-ipmi-dcmi-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Tpo -c -o ipmi_dcmi-ipmi-dcmi-argp.obj `if test -f 'ipmi-dcmi-argp.c'; then $(CYGPATH_W) 'ipmi-dcmi-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-dcmi-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Tpo $(DEPDIR)/ipmi_dcmi-ipmi-dcmi-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-dcmi-argp.c' object='ipmi_dcmi-ipmi-dcmi-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_dcmi_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_dcmi-ipmi-dcmi-argp.obj `if test -f 'ipmi-dcmi-argp.c'; then $(CYGPATH_W) 'ipmi-dcmi-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-dcmi-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-dcmi/Makefile.am0000644002055400205540000000267013527331635017173 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-dcmi ipmi_dcmi_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_dcmi_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_dcmi_SOURCES = \ ipmi-dcmi.c \ ipmi-dcmi.h \ ipmi-dcmi-argp.c \ ipmi-dcmi-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-dcmi/ipmi-dcmi.c0000644002055400205540000024572013527331635017160 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-dcmi.c,v 1.15 2010-07-27 18:01:43 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmi-dcmi.h" #include "ipmi-dcmi-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-util-common.h" #define IPMI_DCMI_ROLLING_AVERAGE_TIME_PERIOD_BUFLEN 4096 #define IPMI_DCMI_MAX_RECORD_IDS_BUFLEN 1024 #define IPMI_DCMI_ERROR_BUFLEN 1024 #define IPMI_DCMI_TIME_BUFLEN 512 /* return 1 on output success, 0 on no output, -1 on error */ static int _dcmi_specification_conformance (ipmi_dcmi_state_data_t *state_data, uint8_t *parameter_revision) { fiid_obj_t obj_cmd_rs = NULL; uint8_t major, minor; uint64_t val; int rv = -1; assert (state_data); assert (parameter_revision); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "dcmi_specification_conformance.major_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dcmi_specification_conformance.major_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "dcmi_specification_conformance.minor_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dcmi_specification_conformance.minor_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; /* XXX: achu: The spec does not say how these version numbers are * formmatted. decimal? BCD? On the one hand, I think to be * consistent to the "IPMI Version" of a Get Device ID call, it * should be BCD. But, these are 8 bit fields instead of 4 bit * fields (e.g. would I output "01.00" instead of "1.0"?). So I'm * going to assume decimal for now. */ pstdout_printf (state_data->pstate, "DCMI Specification Conformance : %u.%u\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "parameter_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'parameter_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*parameter_revision) = val; rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _supported_dcmi_capabilities (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t parameter_revision; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_supported_dcmi_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "parameter_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.identification_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } parameter_revision = val; /* See errata 1.0 */ if (!(parameter_revision >= 0x02)) { if (FIID_OBJ_GET (obj_cmd_rs, "mandatory_platform_capabilities.identification_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.identification_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Identification Support : %s\n", val ? "Compliant with DCMI Specification" : "Not Compliant with DCMI Specification"); if (FIID_OBJ_GET (obj_cmd_rs, "mandatory_platform_capabilities.sel_logging", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.sel_logging': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "SEL logging : %s\n", val ? "Compliant with DCMI Specification" : "Not Compliant with DCMI Specification"); if (FIID_OBJ_GET (obj_cmd_rs, "mandatory_platform_capabilities.chassis_power", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.chassis_power': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Chassis Power : %s\n", val ? "Compliant with DCMI Specification" : "Not Compliant with DCMI Specification"); if (FIID_OBJ_GET (obj_cmd_rs, "mandatory_platform_capabilities.temperature_monitor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.temperature_monitor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Temperature Monitor : %s\n", val ? "Compliant with DCMI Specification" : "Not Compliant with DCMI Specification"); } if (FIID_OBJ_GET (obj_cmd_rs, "optional_platform_capabilities.power_management_monitoring_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'optional_platform_capabilities.power_management_monitoring_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Power Management / Monitoring Support : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.in_band_system_interface_channel_available", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.in_band_system_interface_channel_available': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "In-band System Interface Channel : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.serial_tmode_available", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.serial_tmode_available': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Serial TMODE : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.out_of_band_secondary_lan_channel_available", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.out_of_band_secondary_lan_channel_available': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Out-Of-Band Secondary LAN Channel : %s\n", val ? "Available" : "Not present"); /* See errata 1.0 */ if (!(parameter_revision >= 0x02)) { if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.out_of_band_primary_lan_channel_available", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.out_of_band_primary_lan_channel_available': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Out-Of-Band Primary LAN Channel : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.sol_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.sol_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* SOL Supported - removed "supported" */ pstdout_printf (state_data->pstate, "SOL : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "manageability_access_capabilities.vlan_capable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'manageability_access_capabilities.vlan_capable': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* VLAN Capable - removed "capable" */ pstdout_printf (state_data->pstate, "VLAN : %s\n", val ? "Available" : "Not present"); } rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _mandatory_platform_attributes (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t parameter_revision; uint16_t number_of_sel_entries; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_mandatory_platform_attributes: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "parameter_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_platform_capabilities.identification_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } parameter_revision = val; if (FIID_OBJ_GET (obj_cmd_rs, "sel_attributes.number_of_sel_entries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_attributes.number_of_sel_entries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_sel_entries = val; pstdout_printf (state_data->pstate, "Number of SEL entries : %u\n", number_of_sel_entries); /* In DCMI v1.1 */ if (parameter_revision >= 0x02) { if (FIID_OBJ_GET (obj_cmd_rs, "sel_attributes.record_level_sel_flush_upon_rollover", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_attributes.record_level_sel_flush_upon_rollover': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Record Level SEL Flush upon Rollover : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "sel_attributes.entire_sel_flush_upon_rollover", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_attributes.entire_sel_flush_upon_rollover': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Entire SEL Flush upon Rollover : %s\n", val ? "Available" : "Not present"); } if (FIID_OBJ_GET (obj_cmd_rs, "sel_attributes.sel_automatic_rollover_enabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_attributes.sel_automatic_rollover_enabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "SEL automatic rollover : %s\n", val ? "Available" : "Not present"); /* See errata 1.0 */ if (!(parameter_revision >= 0x02)) { if (FIID_OBJ_GET (obj_cmd_rs, "identification_attributes.guid_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'identification_attributes.guid_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "GUID : %s\n", val ? "Available" : "Not present"); } if (FIID_OBJ_GET (obj_cmd_rs, "identification_attributes.dhcp_host_name_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'identification_attributes.dhcp_host_name_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "DHCP Host Name : %s\n", val ? "Available" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "identification_attributes.asset_tag_support", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'identification_attributes.asset_tag_support': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Asset Tag : %s\n", val ? "Available" : "Not present"); /* See errata 1.0 */ if (!(parameter_revision >= 0x02)) { if (FIID_OBJ_GET (obj_cmd_rs, "temperature_monitoring.inlet_temperature", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'temperature_monitoring.inlet_temperature': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Inlet temperature : %s\n", val ? "At least 1 present" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "temperature_monitoring.processors_temperature", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'temperature_monitoring.processors_temperature': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Processors temperature : %s\n", val ? "At least 1 present" : "Not present"); if (FIID_OBJ_GET (obj_cmd_rs, "temperature_monitoring.baseboard_temperature", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'temperature_monitoring.baseboard_temperature': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Baseboard temperature : %s\n", val ? "At least 1 present" : "Not present"); } /* In DCMI v1.1 */ if (parameter_revision >= 0x02) { int flag; if ((flag = fiid_obj_get (obj_cmd_rs, "temperature_monitoring.sampling_period", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'temperature_monitoring.sampling_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (flag) { pstdout_printf (state_data->pstate, "Sampling frequency for Temperature Monitoring : Every %u Second(s)\n", val); } } rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _optional_platform_attributes (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t slave_address; uint8_t device_revision; uint8_t channel_number; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes (state_data->ipmi_ctx, obj_cmd_rs) < 0) { /* IPMI Workaround? * * Technically, I believe this should be mandatory, as this is * not listed as optional in the DCMI spec (enhanced system * power statistics attributes is the only one that is * optional). However, this parameter specifically lists * attributes for optional parts of DCMI. * * This has been seen as non-implemented on atleast two * motherboards (one undocumented motherboard and also the Intel * S2600JF/Appro 512X). */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1))) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_optional_platform_attributes: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "power_management_device_slave_address.slave_address", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_management_device_slave_address.slave_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } slave_address = val; pstdout_printf (state_data->pstate, "Power Management Device Slave Address : %02Xh\n", slave_address); if (FIID_OBJ_GET (obj_cmd_rs, "power_management_controller_channel_number.device_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_management_controller_channel_number.device_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } device_revision = val; /* revision is decimal? Lets assume so */ pstdout_printf (state_data->pstate, "Power Management Controller Device Revision : %u\n", device_revision); if (FIID_OBJ_GET (obj_cmd_rs, "power_management_controller_channel_number.channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_management_controller_channel_number.channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_number = val; pstdout_printf (state_data->pstate, "Power Management Controller Channel Number : %u\n", channel_number); rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _manageability_access_attributes (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t channel_number; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_manageability_access_attributes: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "mandatory_primary_lan_out_of_band_support_channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'mandatory_primary_lan_out_of_band_support_channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_number = val; if (channel_number == IPMI_DCMI_CHANNEL_NOT_SUPPORTED) pstdout_printf (state_data->pstate, "Primary LAN Out-of-band Channel Number : Not supported\n"); else pstdout_printf (state_data->pstate, "Primary LAN Out-of-band Channel Number : %u\n", channel_number); if (FIID_OBJ_GET (obj_cmd_rs, "optional_secondary_lan_out_of_band_support_channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'optional_secondary_lan_out_of_band_support_channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_number = val; if (channel_number == IPMI_DCMI_CHANNEL_NOT_SUPPORTED) pstdout_printf (state_data->pstate, "Secondary LAN Out-of-band Channel Number : Not supported\n"); else pstdout_printf (state_data->pstate, "Secondary LAN Out-of-band Channel Number : %u\n", channel_number); if (FIID_OBJ_GET (obj_cmd_rs, "optional_serial_out_of_band_tmode_capability_channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'optional_serial_out_of_band_tmode_capability_channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_number = val; if (channel_number == IPMI_DCMI_CHANNEL_NOT_SUPPORTED) pstdout_printf (state_data->pstate, "Serial Out-of-band TMODE Capability Channel Number : Not supported\n"); else pstdout_printf (state_data->pstate, "Serial Out-of-band TMODE Capability Channel Number : %u\n", channel_number); rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _get_enhanced_system_power_statistics_attributes (ipmi_dcmi_state_data_t *state_data, uint8_t *number_of_supported_rolling_average_time_periods, uint8_t *rolling_average_time_periods, unsigned int rolling_average_time_periods_buflen) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int len; int rv = -1; assert (state_data); assert (number_of_supported_rolling_average_time_periods); assert (rolling_average_time_periods); assert (rolling_average_time_periods_buflen); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes (state_data->ipmi_ctx, obj_cmd_rs) < 0) { /* this optional parameter is not supported */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1))) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_capability_info_enhanced_system_power_statistics_attributes: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_supported_rolling_average_time_periods", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_supported_rolling_average_time_periods': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*number_of_supported_rolling_average_time_periods) = val; if ((len = fiid_obj_get_data (obj_cmd_rs, "rolling_average_time_periods", rolling_average_time_periods, rolling_average_time_periods_buflen)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'rolling_average_time_periods': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if ((*number_of_supported_rolling_average_time_periods) != len) { pstdout_fprintf (state_data->pstate, stderr, "invalid number of supported rolling average time periods reported: %u vs. %u\n", (*number_of_supported_rolling_average_time_periods), len); goto cleanup; } if ((len = fiid_template_len_bytes (tmpl_dcmi_rolling_average_time_period)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_template_len_bytes: %s\n", strerror (errno)); goto cleanup; } /* an "assertion" */ if (len != 1) { pstdout_fprintf (state_data->pstate, stderr, "rolling average time period length invalid: %u\n", len); goto cleanup; } rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _get_time_duration_info (ipmi_dcmi_state_data_t *state_data, uint8_t rolling_average_time_period, uint8_t *time_duration, char **time_duration_units_str) { fiid_obj_t obj_rolling_average_time_period = NULL; uint8_t time_duration_units; uint64_t val; int rv = -1; assert (state_data); assert (time_duration); assert (time_duration_units_str); if (!(obj_rolling_average_time_period = fiid_obj_create (tmpl_dcmi_rolling_average_time_period))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (fiid_obj_set_all (obj_rolling_average_time_period, &rolling_average_time_period, 1) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set_all: %s\n", fiid_obj_errormsg (obj_rolling_average_time_period)); goto cleanup; } if (FIID_OBJ_GET (obj_rolling_average_time_period, "time_duration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time_duration': %s\n", fiid_obj_errormsg (obj_rolling_average_time_period)); goto cleanup; } (*time_duration) = val; if (FIID_OBJ_GET (obj_rolling_average_time_period, "time_duration_units", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time_duration_units': %s\n", fiid_obj_errormsg (obj_rolling_average_time_period)); goto cleanup; } time_duration_units = val; if (time_duration_units == IPMI_DCMI_TIME_DURATION_UNITS_SECONDS) (*time_duration_units_str) = "Seconds"; else if (time_duration_units == IPMI_DCMI_TIME_DURATION_UNITS_MINUTES) (*time_duration_units_str) = "Minutes"; else if (time_duration_units == IPMI_DCMI_TIME_DURATION_UNITS_HOURS) (*time_duration_units_str) = "Hours"; else (*time_duration_units_str) = "Days"; rv = 0; cleanup: fiid_obj_destroy (obj_rolling_average_time_period); return (rv); } /* return 1 on output success, 0 on no output, -1 on error */ static int _enhanced_system_power_statistics_attributes (ipmi_dcmi_state_data_t *state_data) { uint8_t rolling_average_time_periods[IPMI_DCMI_ROLLING_AVERAGE_TIME_PERIOD_BUFLEN]; uint8_t number_of_supported_rolling_average_time_periods; int i; assert (state_data); if (_get_enhanced_system_power_statistics_attributes (state_data, &number_of_supported_rolling_average_time_periods, rolling_average_time_periods, IPMI_DCMI_ROLLING_AVERAGE_TIME_PERIOD_BUFLEN) < 0) return (-1); for (i = 0; i < number_of_supported_rolling_average_time_periods; i++) { uint8_t time_duration; char *time_duration_units_str = NULL; if (_get_time_duration_info (state_data, rolling_average_time_periods[i], &time_duration, &time_duration_units_str) < 0) return (-1); pstdout_printf (state_data->pstate, "Available Rolling Average Time Period : %u %s\n", time_duration, time_duration_units_str); } return (1); } static int get_dcmi_capability_info (ipmi_dcmi_state_data_t *state_data) { uint8_t parameter_revision; int ret; assert (state_data); if ((ret = _dcmi_specification_conformance (state_data, ¶meter_revision)) < 0) return (-1); if (ret) pstdout_printf (state_data->pstate, "\n"); if ((ret = _supported_dcmi_capabilities (state_data)) < 0) return (-1); if (ret) pstdout_printf (state_data->pstate, "\n"); if ((ret = _mandatory_platform_attributes (state_data)) < 0) return (-1); if (ret) pstdout_printf (state_data->pstate, "\n"); if ((ret = _optional_platform_attributes (state_data)) < 0) return (-1); if (ret) pstdout_printf (state_data->pstate, "\n"); if ((ret = _manageability_access_attributes (state_data)) < 0) return (-1); if (parameter_revision >= 0x02) { if (ret) pstdout_printf (state_data->pstate, "\n"); if ((ret = _enhanced_system_power_statistics_attributes (state_data)) < 0) return (-1); } return (0); } static int get_asset_tag (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t asset_tag_data[IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1]; int data_len; unsigned int offset = 0; uint8_t total_asset_tag_length = 0; uint8_t bytes_to_read = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_asset_tag_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } memset (asset_tag_data, '\0', IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1); while (1) { uint64_t val; if (!offset || ((total_asset_tag_length - offset) >= IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX)) bytes_to_read = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_READ_MAX; else bytes_to_read = total_asset_tag_length - offset; if (ipmi_cmd_dcmi_get_asset_tag (state_data->ipmi_ctx, offset, bytes_to_read, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_asset_tag: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_asset_tag_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_asset_tag_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } total_asset_tag_length = val; if (!total_asset_tag_length) break; if ((data_len = fiid_obj_get_data (obj_cmd_rs, "data", asset_tag_data + offset, IPMI_DCMI_MAX_ASSET_TAG_LENGTH - offset)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } offset += data_len; if (offset >= total_asset_tag_length) break; } if (total_asset_tag_length) { /* Handle special case UTF-8 encoding w/ BOM prefix */ if (asset_tag_data[0] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE0 && asset_tag_data[1] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE1 && asset_tag_data[2] == IPMI_DCMI_ASSET_TAG_UTF8_BOM_BYTE2) /* achu: I think this is right for UTF-8 in libc and is * portable, but I would bet some systems won't like this. */ pstdout_printf (state_data->pstate, "%ls\n", &asset_tag_data[3]); else pstdout_printf (state_data->pstate, "%s\n", asset_tag_data); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_asset_tag (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; unsigned int offset = 0; char data_buf[IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1]; unsigned int data_len; uint8_t bytes_to_write = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX; int rv = -1; assert (state_data); /* achu: * * DCMI v1.1 spec is unclear if the entire buffer needs to be * written or just the amount you desire. * * DCMI v1.5 spec strongly suggests you don't write the entire * buffer due to the results of the "total_asset_tag_length_written" * field. * * "Total Asset Tag Length. This is the length in bytes of the stored * Asset Tag after the Set operation has completed. The Asset Tag * length shall be set to the sum of the offset to write plus bytes * to write. For example, if offset to write is 32 and bytes to * write is 4, the Total Asset Tag Length returned will be 36." */ data_len = strlen (state_data->prog_data->args->set_asset_tag_arg); memset (data_buf, '\0', IPMI_DCMI_MAX_ASSET_TAG_LENGTH + 1); memcpy (data_buf, state_data->prog_data->args->set_asset_tag_arg, strlen (state_data->prog_data->args->set_asset_tag_arg)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_asset_tag_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (1) { uint64_t val; if ((data_len - offset) >= IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX) bytes_to_write = IPMI_DCMI_ASSET_TAG_NUMBER_OF_BYTES_TO_WRITE_MAX; else bytes_to_write = data_len - offset; if (ipmi_cmd_dcmi_set_asset_tag (state_data->ipmi_ctx, offset, bytes_to_write, data_buf + offset, data_len, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_asset_tag: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_asset_tag_length_written", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_asset_tag_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* DCMI 1.1 spec is unclear on "total_length_written", is it the * number of bytes just written or total bytes written so far? * * DCMI 1.5 spec makes it clear that this is the number of bytes * written in total. To defend against vendor mistakes, we * handle both situations. */ if (val > bytes_to_write) offset += bytes_to_write; else offset += val; if (offset >= data_len) break; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_management_controller_identifier_string (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; char management_controller_identifier_string_data[IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1]; int data_len; unsigned int offset = 0; uint8_t total_length = 0; uint8_t bytes_to_read = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_management_controller_identifier_string_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } memset (management_controller_identifier_string_data, '\0', IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1); while (1) { uint64_t val; if (!offset || ((total_length - offset) >= IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX)) bytes_to_read = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_READ_MAX; else bytes_to_read = total_length - offset; if (ipmi_cmd_dcmi_get_management_controller_identifier_string (state_data->ipmi_ctx, offset, bytes_to_read, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_management_controller_identifier_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_length", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } total_length = val; if (!total_length) break; if ((data_len = fiid_obj_get_data (obj_cmd_rs, "data", management_controller_identifier_string_data + offset, IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH - offset)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } offset += data_len; if (offset >= total_length) break; } if (total_length) pstdout_printf (state_data->pstate, "%s\n", management_controller_identifier_string_data); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int set_management_controller_identifier_string (ipmi_dcmi_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; unsigned int offset = 0; char data_buf[IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1]; unsigned int data_len; uint8_t bytes_to_write = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX; int rv = -1; assert (state_data); /* achu: * * According to DCMI v1.5 draft * * "The presence of the null terminator among bytes to shall be * considered as indicating the last transfer of the Management * Controller Identifier string" * * So I am assuming we don't need to write the entire buffer. But * we must include the NUL byte at the end. */ /* +1 for NUL char */ data_len = strlen (state_data->prog_data->args->set_management_controller_identifier_string_arg) + 1; memset (data_buf, '\0', IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH + 1); memcpy (data_buf, state_data->prog_data->args->set_management_controller_identifier_string_arg, strlen (state_data->prog_data->args->set_management_controller_identifier_string_arg)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_management_controller_identifier_string_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (1) { uint64_t val; if ((data_len - offset) >= IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX) bytes_to_write = IPMI_DCMI_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_NUMBER_OF_BYTES_TO_WRITE_MAX; else bytes_to_write = data_len - offset; if (ipmi_cmd_dcmi_set_management_controller_identifier_string (state_data->ipmi_ctx, offset, bytes_to_write, data_buf + offset, data_len, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_management_controller_identifier_string: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_length_written", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_management_controller_identifier_string_length': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* DCMI 1.1 spec is unclear on "total_length_written", is it the * number of bytes just written or total bytes written so far? * * DCMI 1.5 spec makes it clear that this is the number of bytes * written in total. To defend against vendor mistakes, we * handle both situations. */ if (val > bytes_to_write) offset += bytes_to_write; else offset += val; if (offset >= data_len) break; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static char * _entity_string (uint8_t entity_id) { assert (IPMI_DCMI_ENTITY_ID_VALID (entity_id)); if (entity_id == IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE) return IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE_STR; else if (entity_id == IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE) return IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE_STR; else return IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE_STR; } static int _sensor_info_output (ipmi_dcmi_state_data_t *state_data, uint8_t sensor_type, uint8_t entity_id) { fiid_obj_t obj_cmd_rs = NULL; uint8_t entity_instance_start = 0x01; /* starts at 1, not 0 */ unsigned int total_entity_instances_parsed = 0; int rv = -1; assert (state_data); assert (IPMI_SENSOR_TYPE_VALID (sensor_type)); assert (IPMI_DCMI_ENTITY_ID_VALID (entity_id)); pstdout_printf (state_data->pstate, "%s SDR Record IDs\n", _entity_string (entity_id)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_dcmi_sensor_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (1) { uint64_t val; uint8_t total_number_of_available_instances; uint8_t number_of_record_ids_in_this_response; uint8_t sdr_record_ids[IPMI_DCMI_MAX_RECORD_IDS_BUFLEN]; int sdr_record_ids_len; int i; if (ipmi_cmd_dcmi_get_dcmi_sensor_info (state_data->ipmi_ctx, sensor_type, entity_id, IPMI_DCMI_ENTITY_INSTANCE_ALL, entity_instance_start, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_dcmi_sensor_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "total_number_of_available_instances", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_number_of_available_instances': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } total_number_of_available_instances = val; if (!total_number_of_available_instances) break; if (FIID_OBJ_GET (obj_cmd_rs, "number_of_record_ids_in_this_response", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_record_ids_in_this_response': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_record_ids_in_this_response = val; if (!number_of_record_ids_in_this_response) break; if ((sdr_record_ids_len = fiid_obj_get_data (obj_cmd_rs, "sdr_record_ids", sdr_record_ids, IPMI_DCMI_MAX_RECORD_IDS_BUFLEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'sdr_record_ids': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (sdr_record_ids_len % 2) { pstdout_fprintf (state_data->pstate, stderr, "invalid sdr_record_ids length returned: %u\n", sdr_record_ids_len); goto cleanup; } if (number_of_record_ids_in_this_response > (sdr_record_ids_len / 2)) { pstdout_fprintf (state_data->pstate, stderr, "invalid sdr_record_ids returned: %u > %u\n", number_of_record_ids_in_this_response, (sdr_record_ids_len / 2)); goto cleanup; } for (i = 0; i < (number_of_record_ids_in_this_response * 2); i += 2) { uint16_t record_id = 0; record_id |= sdr_record_ids[i]; record_id |= (sdr_record_ids[i+1] << 8); pstdout_printf (state_data->pstate, "%u\n", record_id); total_entity_instances_parsed++; } /* achu: entity IDs are returned sequentially? If not, I'm not * sure how this API can even work, you wouldn't know where to * start the next time around. Hopefully this is a correct * assumption */ /* HLiebig: Note: Intel simply increments the offset by 8 (max number of * SDR Id's per response. * See dcmitool from www.intel.com/go/DCMI (a modified ipmitool) */ entity_instance_start += number_of_record_ids_in_this_response; if (total_entity_instances_parsed >= total_number_of_available_instances) break; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_dcmi_sensor_info (ipmi_dcmi_state_data_t *state_data) { int rv = -1; assert (state_data); if (_sensor_info_output (state_data, IPMI_SENSOR_TYPE_TEMPERATURE, IPMI_DCMI_ENTITY_ID_INLET_TEMPERATURE) < 0) goto cleanup; pstdout_printf (state_data->pstate, "\n"); if (_sensor_info_output (state_data, IPMI_SENSOR_TYPE_TEMPERATURE, IPMI_DCMI_ENTITY_ID_CPU_TEMPERATURE) < 0) goto cleanup; pstdout_printf (state_data->pstate, "\n"); if (_sensor_info_output (state_data, IPMI_SENSOR_TYPE_TEMPERATURE, IPMI_DCMI_ENTITY_ID_BASEBOARD_TEMPERATURE) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _output_power_statistics (ipmi_dcmi_state_data_t *state_data, uint8_t mode, uint8_t mode_attributes) { fiid_obj_t obj_cmd_rs = NULL; uint16_t current_power; uint16_t minimum_power_over_sampling_duration; uint16_t maximum_power_over_sampling_duration; uint16_t average_power_over_sampling_duration; uint32_t time_stamp; uint32_t statistics_reporting_time_period; uint8_t power_measurement; uint64_t val; char timestr[IPMI_DCMI_TIME_BUFLEN + 1]; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_power_reading_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_get_power_reading (state_data->ipmi_ctx, mode, mode_attributes, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_get_power_reading: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current_power", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'current_power': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } current_power = val; if (FIID_OBJ_GET (obj_cmd_rs, "minimum_power_over_sampling_duration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'minimum_power_over_sampling_duration': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minimum_power_over_sampling_duration = val; if (FIID_OBJ_GET (obj_cmd_rs, "maximum_power_over_sampling_duration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'maximum_power_over_sampling_duration': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } maximum_power_over_sampling_duration = val; if (FIID_OBJ_GET (obj_cmd_rs, "average_power_over_sampling_duration", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'average_power_over_sampling_duration': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } average_power_over_sampling_duration = val; if (FIID_OBJ_GET (obj_cmd_rs, "time_stamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'time_stamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } time_stamp = val; if (FIID_OBJ_GET (obj_cmd_rs, "statistics_reporting_time_period", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'statistics_reporting_time_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } statistics_reporting_time_period = val; if (FIID_OBJ_GET (obj_cmd_rs, "power_reading_state.power_measurement", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'power_measurement': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } power_measurement = val; pstdout_printf (state_data->pstate, "Current Power : %u Watts\n", current_power); pstdout_printf (state_data->pstate, "Minimum Power over sampling duration : %u watts\n", minimum_power_over_sampling_duration); pstdout_printf (state_data->pstate, "Maximum Power over sampling duration : %u watts\n", maximum_power_over_sampling_duration); pstdout_printf (state_data->pstate, "Average Power over sampling duration : %u watts\n", average_power_over_sampling_duration); memset (timestr, '\0', IPMI_DCMI_TIME_BUFLEN + 1); if (ipmi_timestamp_string (time_stamp, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, IPMI_DCMI_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Time Stamp : %s\n", timestr); pstdout_printf (state_data->pstate, "Statistics reporting time period : %u milliseconds\n", statistics_reporting_time_period); pstdout_printf (state_data->pstate, "Power Measurement : %s\n", (power_measurement) ? "Active" : "Not Available"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_system_power_statistics (ipmi_dcmi_state_data_t *state_data) { assert (state_data); if (_output_power_statistics (state_data, IPMI_DCMI_POWER_READING_MODE_SYSTEM_POWER_STATISTICS, 0) < 0) return (-1); return (0); } static int get_enhanced_system_power_statistics (ipmi_dcmi_state_data_t *state_data) { uint8_t rolling_average_time_periods[IPMI_DCMI_ROLLING_AVERAGE_TIME_PERIOD_BUFLEN]; uint8_t number_of_supported_rolling_average_time_periods = 0; int i; assert (state_data); if (_get_enhanced_system_power_statistics_attributes (state_data, &number_of_supported_rolling_average_time_periods, rolling_average_time_periods, IPMI_DCMI_ROLLING_AVERAGE_TIME_PERIOD_BUFLEN) < 0) return (-1); for (i = 0; i < number_of_supported_rolling_average_time_periods; i++) { uint8_t time_duration; char *time_duration_units_str = NULL; if (_get_time_duration_info (state_data, rolling_average_time_periods[i], &time_duration, &time_duration_units_str) < 0) return (-1); pstdout_printf (state_data->pstate, "Power Statistics for Rolling Average Time Period %u %s\n", time_duration, time_duration_units_str); pstdout_printf (state_data->pstate, "\n"); if (_output_power_statistics (state_data, IPMI_DCMI_POWER_READING_MODE_ENHANCED_SYSTEM_POWER_STATISTICS, rolling_average_time_periods[i]) < 0) return (-1); } return (0); } static int _get_power_limit (ipmi_dcmi_state_data_t *state_data, uint8_t *exception_actions, uint16_t *power_limit_requested, uint32_t *correction_time_limit, uint16_t *management_application_statistics_sampling_period, uint8_t *comp_code, char *errorbuf, unsigned int errorbuflen) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int no_set_power_limit_error_flag = 0; int rv = -1; assert (state_data); assert (exception_actions); assert (power_limit_requested); assert (correction_time_limit); assert (management_application_statistics_sampling_period); assert (errorbuf); assert (errorbuflen); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_get_power_limit_rs))) { snprintf (errorbuf, errorbuflen, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } /* IPMI Workaround/Interpretation * * The DCMI spec indicates a potential completion code for the "Get * Power Limit" command as "No Set Power Limit" (0x80). FreeIPMI * originally interpreted this to mean the "Set Power Limit" command * was not available. Atleast one vendor interpreted this to mean * "No Power Limit Set". One can consider this an English * interpretation issue of 'No set POWER LIMIT' vs. 'No SET POWER * LIMIT' (i.e. is "set" a verb or part of a proper noun referencing * the DCMI command). Confounding this issue is the fact that the * example implementation in Intel's DCMItool implements the former, * while the DCMI Conformance test suite implements the latter. In * addition to this, with the latter interpretation, it need not be * an indication of an error, but rather a flag. So the rest of the * packet can be completely full of legitimate data. * * So how do we handle this? * * If we hit "No Set Power Limit", try to read data. If we can't * read data (b/c it's not set), fail out, but preserve the "No Set * Power Limit" error message. */ if (ipmi_cmd_dcmi_get_power_limit (state_data->ipmi_ctx, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && comp_code) { (*comp_code) = 0; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { snprintf (errorbuf, errorbuflen, "fiid_obj_get: 'comp_code': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*comp_code) = val; } if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT) == 1) { snprintf (errorbuf, errorbuflen, "ipmi_cmd_dcmi_get_power_limit: %s", IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT_STR); no_set_power_limit_error_flag++; goto read_data; } else snprintf (errorbuf, errorbuflen, "ipmi_cmd_dcmi_get_power_limit: %s", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } read_data: if (FIID_OBJ_GET (obj_cmd_rs, "exception_actions", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) snprintf (errorbuf, errorbuflen, "fiid_obj_get: 'exception_actions': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*exception_actions) = val; if (FIID_OBJ_GET (obj_cmd_rs, "power_limit_requested", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) snprintf (errorbuf, errorbuflen, "fiid_obj_get: 'power_limit_requested': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*power_limit_requested) = val; if (FIID_OBJ_GET (obj_cmd_rs, "correction_time_limit", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) snprintf (errorbuf, errorbuflen, "fiid_obj_get: 'correction_time_limit': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*correction_time_limit) = val; if (FIID_OBJ_GET (obj_cmd_rs, "management_application_statistics_sampling_period", &val) < 0) { if (!no_set_power_limit_error_flag || fiid_obj_errnum (obj_cmd_rs) != FIID_ERR_DATA_NOT_AVAILABLE) snprintf (errorbuf, errorbuflen, "fiid_obj_get: 'management_application_statistics_sampling_period': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*management_application_statistics_sampling_period) = val; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int get_power_limit (ipmi_dcmi_state_data_t *state_data) { uint8_t exception_actions; uint16_t power_limit_requested; uint32_t correction_time_limit; uint16_t management_application_statistics_sampling_period; char errorbuf[IPMI_DCMI_ERROR_BUFLEN + 1]; assert (state_data); memset (errorbuf, '\0', IPMI_DCMI_ERROR_BUFLEN + 1); if (_get_power_limit (state_data, &exception_actions, &power_limit_requested, &correction_time_limit, &management_application_statistics_sampling_period, NULL, /* comp_code */ errorbuf, IPMI_DCMI_ERROR_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "%s\n", errorbuf); return (-1); } /* XXX: figure out OEM specifics, and list details given manufacturer ID/product ID */ /* From Holger Liebig at Fujitsu "Regarding OEM exception action we currently do support 'continue' (0x02) and 'shutdown' (0x03) in addition to the 'hard power off'." But I don't know what the manufacturer ID and product ID are, so we leave it out for now. */ if (exception_actions == IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION) pstdout_printf (state_data->pstate, "Exception Actions : No Action (%Xh)\n", exception_actions); else if (exception_actions == IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM) pstdout_printf (state_data->pstate, "Exception Actions : Hard Power Off system (%Xh)\n", exception_actions); else if (exception_actions == IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY) pstdout_printf (state_data->pstate, "Exception Actions : Log event to SEL only (%Xh)\n", exception_actions); else if ((exception_actions >= IPMI_DCMI_EXCEPTION_ACTION_OEM_MIN) && (exception_actions <= IPMI_DCMI_EXCEPTION_ACTION_OEM_MAX)) pstdout_printf (state_data->pstate, "Exception Actions : OEM action (%Xh)\n", exception_actions); else pstdout_printf (state_data->pstate, "Exception Actions : Unknown action (%Xh)\n", exception_actions); pstdout_printf (state_data->pstate, "Power Limit Requested : %u watts\n", power_limit_requested); pstdout_printf (state_data->pstate, "Correction time limit : %u milliseconds\n", correction_time_limit); pstdout_printf (state_data->pstate, "Management application Statistics Sampling period : %u seconds\n", management_application_statistics_sampling_period); return (0); } static int set_power_limit (ipmi_dcmi_state_data_t *state_data) { struct ipmi_dcmi_arguments *args; fiid_obj_t obj_cmd_rs = NULL; uint8_t comp_code = 0; uint8_t exception_actions; uint16_t power_limit_requested; uint32_t correction_time_limit; uint16_t management_application_statistics_sampling_period; char errorbuf[IPMI_DCMI_ERROR_BUFLEN + 1]; int rv = -1; assert (state_data); assert (state_data->prog_data->args->exception_actions || state_data->prog_data->args->power_limit_requested || state_data->prog_data->args->correction_time_limit || state_data->prog_data->args->statistics_sampling_period); args = state_data->prog_data->args; memset (errorbuf, '\0', IPMI_DCMI_ERROR_BUFLEN + 1); if (_get_power_limit (state_data, &exception_actions, &power_limit_requested, &correction_time_limit, &management_application_statistics_sampling_period, &comp_code, errorbuf, IPMI_DCMI_ERROR_BUFLEN) < 0) { /* IPMI Workaround/Interpretation * * The DCMI spec indicates a potential completion code for the * "Get Power Limit" command as "No Set Power Limit" (0x80). * FreeIPMI originally interpreted this to mean the "Set Power * Limit" command was not available. Atleast one vendor * interpreted this to mean "No Power Limit Set". One can * consider this an English interpretation issue of 'No set * POWER LIMIT' vs. 'No SET POWER LIMIT' (i.e. is "set" a verb * or part of a proper noun referencing the DCMI command). * Confounding this issue is the fact that the example * implementation in Intel's DCMItool implements the former, * while the DCMI Conformance test suite implements the latter. * In addition to this, with the latter interpretation, it need * not be an indication of an error, but rather a flag. So the * rest of the packet can be completely full of legitimate data. * * So we will do the following. * * If the "No Set Power Limit" completion code is returned and * we were able to read all of the fields, _get_power_limit() will * return normally and this error fallthrough won't occur. * * If the "No Set Power Limit", completion code is returned and * we were *not* able to read all of the fields, we won't have * values from "Get Power Limit" and won't know how to do the * configuration properly in "Set Power Limit". So we will * require that the user input all fields for "Set Power Limit". */ if (comp_code == IPMI_COMP_CODE_DCMI_NO_SET_POWER_LIMIT) { if (!args->exception_actions || !args->power_limit_requested || !args->correction_time_limit || !args->statistics_sampling_period) { pstdout_fprintf (state_data->pstate, stderr, "Must specify --exception-actions, --power-limit-requested, " "--correction-time-limit, and --statistics-sampling-period\n"); goto cleanup; } } else { pstdout_fprintf (state_data->pstate, stderr, "%s\n", errorbuf); goto cleanup; } } if (!args->exception_actions) args->exception_actions_arg = exception_actions; if (!args->power_limit_requested) args->power_limit_requested_arg = power_limit_requested; if (!args->correction_time_limit) args->correction_time_limit_arg = correction_time_limit; if (!args->statistics_sampling_period) args->statistics_sampling_period_arg = management_application_statistics_sampling_period; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_set_power_limit_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_set_power_limit (state_data->ipmi_ctx, args->exception_actions_arg, args->power_limit_requested_arg, args->correction_time_limit_arg, args->statistics_sampling_period_arg, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_POWER_LIMIT_OUT_OF_RANGE_STR); else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_CORRECTION_TIME_OUT_OF_RANGE_STR); else if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE) == 1) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", IPMI_COMP_CODE_DCMI_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR); else pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_set_power_limit: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int activate_deactivate_power_limit (ipmi_dcmi_state_data_t *state_data) { struct ipmi_dcmi_arguments *args; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_dcmi_activate_deactivate_power_limit_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_dcmi_activate_deactivate_power_limit (state_data->ipmi_ctx, args->activate_deactivate_power_limit_arg, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_dcmi_activate_deactivate_power_limit: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int run_cmd_args (ipmi_dcmi_state_data_t *state_data) { struct ipmi_dcmi_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (args->get_dcmi_capability_info) return (get_dcmi_capability_info (state_data)); if (args->get_system_power_statistics) return (get_system_power_statistics (state_data)); if (args->get_enhanced_system_power_statistics) return (get_enhanced_system_power_statistics (state_data)); if (args->get_asset_tag) return (get_asset_tag (state_data)); if (args->set_asset_tag) return (set_asset_tag (state_data)); if (args->get_management_controller_identifier_string) return (get_management_controller_identifier_string (state_data)); if (args->set_management_controller_identifier_string) return (set_management_controller_identifier_string (state_data)); if (args->get_dcmi_sensor_info) return (get_dcmi_sensor_info (state_data)); if (args->get_power_limit) return (get_power_limit (state_data)); if (args->set_power_limit) return (set_power_limit (state_data)); if (args->activate_deactivate_power_limit) return (activate_deactivate_power_limit (state_data)); rv = 0; return (rv); } static int _ipmi_dcmi (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_dcmi_state_data_t state_data; ipmi_dcmi_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (ipmi_dcmi_prog_data_t *)arg; memset (&state_data, '\0', sizeof (ipmi_dcmi_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_dcmi_prog_data_t prog_data; struct ipmi_dcmi_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_dcmi_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_dcmi, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-dcmi/ipmi-dcmi.h0000644002055400205540000000630013527331635017152 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-dcmi.h,v 1.5 2010-05-17 17:42:45 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_H #define IPMI_DCMI_H #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "pstdout.h" enum ipmi_dcmi_argp_option_keys { GET_DCMI_CAPABILITY_INFO = 160, GET_ASSET_TAG = 161, SET_ASSET_TAG = 162, GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING = 163, SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING = 164, GET_DCMI_SENSOR_INFO = 165, GET_SYSTEM_POWER_STATISTICS = 166, GET_ENHANCED_SYSTEM_POWER_STATISTICS = 167, GET_POWER_LIMIT = 168, SET_POWER_LIMIT = 169, EXCEPTION_ACTIONS = 170, POWER_LIMIT_REQUESTED = 171, CORRECTION_TIME_LIMIT = 172, STATISTICS_SAMPLING_PERIOD = 173, ACTIVATE_DEACTIVATE_POWER_LIMIT = 174, INTERPRET_OEM_DATA_KEY = 175, }; struct ipmi_dcmi_arguments { struct common_cmd_args common_args; int get_dcmi_capability_info; int get_asset_tag; int set_asset_tag; char *set_asset_tag_arg; int get_management_controller_identifier_string; int set_management_controller_identifier_string; char *set_management_controller_identifier_string_arg; int get_dcmi_sensor_info; int get_system_power_statistics; int get_enhanced_system_power_statistics; int get_power_limit; int set_power_limit; int exception_actions; uint8_t exception_actions_arg; int power_limit_requested; uint16_t power_limit_requested_arg; int correction_time_limit; uint32_t correction_time_limit_arg; int statistics_sampling_period; uint16_t statistics_sampling_period_arg; int activate_deactivate_power_limit; uint8_t activate_deactivate_power_limit_arg; int interpret_oem_data; }; typedef struct ipmi_dcmi_prog_data { char *progname; struct ipmi_dcmi_arguments *args; } ipmi_dcmi_prog_data_t; typedef struct ipmi_dcmi_state_data { ipmi_dcmi_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; } ipmi_dcmi_state_data_t; #endif /* IPMI_DCMI_H */ freeipmi-1.6.4/ipmi-dcmi/ipmi-dcmi-argp.c0000644002055400205540000003624313527331635020105 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-dcmi-argp.c,v 1.10 2010-05-17 17:42:45 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include "ipmi-dcmi.h" #include "ipmi-dcmi-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-dcmi - " PACKAGE_VERSION "\n" "Copyright (C) 2009-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-dcmi - perform DCMI commands"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "get-dcmi-capability-info", GET_DCMI_CAPABILITY_INFO, NULL, 0, "Get DCMI capability information.", 40}, { "get-asset-tag", GET_ASSET_TAG, NULL, 0, "Get asset tag.", 41}, { "set-asset-tag", SET_ASSET_TAG, "STRING", 0, "Set asset tag.", 42}, { "get-management-controller-identifier-string", GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING, NULL, 0, "Get management controller identifier string.", 43}, { "set-management-controller-identifier-string", SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING, "STRING", 0, "Set management controller identifier string.", 44}, { "get-dcmi-sensor-info", GET_DCMI_SENSOR_INFO, NULL, 0, "Get DCMI sensor information.", 45}, { "get-system-power-statistics", GET_SYSTEM_POWER_STATISTICS, NULL, 0, "Get system power statistics.", 46}, { "get-enhanced-system-power-statistics", GET_ENHANCED_SYSTEM_POWER_STATISTICS, NULL, 0, "Get enhanced system power statistics.", 47}, { "get-power-limit", GET_POWER_LIMIT, NULL, 0, "Get power limit information.", 48}, { "set-power-limit", SET_POWER_LIMIT, NULL, 0, "Set power limit configuration.", 49}, { "exception-actions", EXCEPTION_ACTIONS, "BITMASK", 0, "Specify exception actions for set power limit configuration.", 50}, { "power-limit-requested", POWER_LIMIT_REQUESTED, "WATTS", 0, "Specify power limit for set power limit configuration.", 51}, { "correction-time-limit", CORRECTION_TIME_LIMIT, "MILLISECONDS", 0, "Specify correction time limit for set power limit configuration.", 52}, { "statistics-sampling-period", STATISTICS_SAMPLING_PERIOD, "SECONDS", 0, "Specify management application statistics sampling period for set power limit configuration.", 53}, { "activate-deactivate-power-limit", ACTIVATE_DEACTIVATE_POWER_LIMIT, "ACTION", 0, "Activate or deactivate power limit.", 54}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 55}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_dcmi_arguments *cmd_args; char *endptr = NULL; int tmp; long long lltmp; assert (state); cmd_args = state->input; switch (key) { case GET_DCMI_CAPABILITY_INFO: cmd_args->get_dcmi_capability_info++; break; case GET_ASSET_TAG: cmd_args->get_asset_tag++; break; case SET_ASSET_TAG: cmd_args->set_asset_tag++; cmd_args->set_asset_tag_arg = arg; /* achu: note that the check for the max asset tag length and * the management controller identifier string are different. * The spec is written such that the max length of the asset tag * is 63, while the max length of the management controller * identifier string is 64 w/ a NUL byte included. That's the * literal wording. Because that's what they're writing, that's * what I'm programming. */ if (strlen (cmd_args->set_asset_tag_arg) > IPMI_DCMI_MAX_ASSET_TAG_LENGTH) { fprintf (stderr, "asset tag invalid length\n"); exit (EXIT_FAILURE); } break; case GET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING: cmd_args->get_management_controller_identifier_string++; break; case SET_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING: cmd_args->set_management_controller_identifier_string++; cmd_args->set_management_controller_identifier_string_arg = arg; /* IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH includes NUL char, so subtract 1 in check */ if (strlen (cmd_args->set_management_controller_identifier_string_arg) > (IPMI_DCMI_MAX_MANAGEMENT_CONTROLLER_IDENTIFIER_STRING_LENGTH - 1)) { fprintf (stderr, "management controller identifier string invalid length\n"); exit (EXIT_FAILURE); } break; case GET_DCMI_SENSOR_INFO: cmd_args->get_dcmi_sensor_info++; break; case GET_SYSTEM_POWER_STATISTICS: cmd_args->get_system_power_statistics++; break; case GET_ENHANCED_SYSTEM_POWER_STATISTICS: cmd_args->get_enhanced_system_power_statistics++; break; case GET_POWER_LIMIT: cmd_args->get_power_limit++; break; case SET_POWER_LIMIT: cmd_args->set_power_limit++; break; case EXCEPTION_ACTIONS: /* special case */ if (!strcasecmp (arg, "NO_ACTION")) { cmd_args->exception_actions_arg = IPMI_DCMI_EXCEPTION_ACTION_NO_ACTION; break; } else if (!strcasecmp (arg, "HARD_POWER_OFF_SYSTEM")) { cmd_args->exception_actions_arg = IPMI_DCMI_EXCEPTION_ACTION_HARD_POWER_OFF_SYSTEM; break; } else if (!strcasecmp (arg, "LOG_EVENT_TO_SEL_ONLY")) { cmd_args->exception_actions_arg = IPMI_DCMI_EXCEPTION_ACTION_LOG_EVENT_TO_SEL_ONLY; break; } errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for exception actions\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_DCMI_EXCEPTION_ACTIONS_MIN || tmp > IPMI_DCMI_EXCEPTION_ACTIONS_MAX) { fprintf (stderr, "exception actions out of range\n"); exit (EXIT_FAILURE); } cmd_args->exception_actions_arg = tmp; cmd_args->exception_actions++; break; case POWER_LIMIT_REQUESTED: errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for power limit requested\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_DCMI_POWER_LIMIT_REQUESTED_MIN || tmp > IPMI_DCMI_POWER_LIMIT_REQUESTED_MAX) { fprintf (stderr, "power limit requested out of range\n"); exit (EXIT_FAILURE); } cmd_args->power_limit_requested_arg = tmp; cmd_args->power_limit_requested++; break; case CORRECTION_TIME_LIMIT: errno = 0; lltmp = strtoll (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for correction time limit\n"); exit (EXIT_FAILURE); } if (lltmp < IPMI_DCMI_CORRECTION_TIME_LIMIT_MIN || lltmp > IPMI_DCMI_CORRECTION_TIME_LIMIT_MAX) { fprintf (stderr, "correction time limit out of range\n"); exit (EXIT_FAILURE); } cmd_args->correction_time_limit_arg = lltmp; cmd_args->correction_time_limit++; break; case STATISTICS_SAMPLING_PERIOD: errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid value for statistics sampling period\n"); exit (EXIT_FAILURE); } if (tmp < IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MIN || tmp > IPMI_DCMI_MANAGEMENT_APPLICATION_STATISTICS_SAMPLING_PERIOD_MAX) { fprintf (stderr, "statistics sampling period out of range\n"); exit (EXIT_FAILURE); } cmd_args->statistics_sampling_period_arg = tmp; cmd_args->statistics_sampling_period++; break; case ACTIVATE_DEACTIVATE_POWER_LIMIT: if (!strcasecmp (arg, "ACTIVATE")) cmd_args->activate_deactivate_power_limit_arg = IPMI_DCMI_POWER_LIMIT_ACTIVATION_ACTIVATE_POWER_LIMIT; else if (!strcasecmp (arg, "DEACTIVATE")) cmd_args->activate_deactivate_power_limit_arg = IPMI_DCMI_POWER_LIMIT_ACTIVATION_DEACTIVATE_POWER_LIMIT; else { fprintf (stderr, "invalid value for activate/deactivate power limit\n"); exit (EXIT_FAILURE); } cmd_args->activate_deactivate_power_limit++; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_dcmi_config_file_parse (struct ipmi_dcmi_arguments *cmd_args) { struct config_file_data_ipmi_dcmi config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_dcmi)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_DCMI, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; } static void _ipmi_dcmi_args_validate (struct ipmi_dcmi_arguments *cmd_args) { assert (cmd_args); if (!cmd_args->get_dcmi_capability_info && !cmd_args->get_asset_tag && !cmd_args->set_asset_tag && !cmd_args->get_management_controller_identifier_string && !cmd_args->set_management_controller_identifier_string && !cmd_args->get_dcmi_sensor_info && !cmd_args->get_system_power_statistics && !cmd_args->get_enhanced_system_power_statistics && !cmd_args->get_power_limit && !cmd_args->set_power_limit && !cmd_args->activate_deactivate_power_limit) { fprintf (stderr, "No command specified.\n"); exit (EXIT_FAILURE); } if ((cmd_args->get_dcmi_capability_info + cmd_args->get_asset_tag + cmd_args->set_asset_tag + cmd_args->get_management_controller_identifier_string + cmd_args->set_management_controller_identifier_string + cmd_args->get_dcmi_sensor_info + cmd_args->get_system_power_statistics + cmd_args->get_enhanced_system_power_statistics + cmd_args->get_power_limit + cmd_args->set_power_limit + cmd_args->activate_deactivate_power_limit) > 1) { fprintf (stderr, "Multiple commands specified.\n"); exit (EXIT_FAILURE); } if (cmd_args->set_power_limit && (!cmd_args->exception_actions && !cmd_args->power_limit_requested && !cmd_args->correction_time_limit && !cmd_args->statistics_sampling_period)) { fprintf (stderr, "No power limit configuration changes specified\n"); exit (EXIT_FAILURE); } } void ipmi_dcmi_argp_parse (int argc, char **argv, struct ipmi_dcmi_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->get_dcmi_capability_info = 0; cmd_args->get_asset_tag = 0; cmd_args->set_asset_tag = 0; cmd_args->set_asset_tag_arg = NULL; cmd_args->get_management_controller_identifier_string = 0; cmd_args->set_management_controller_identifier_string = 0; cmd_args->set_management_controller_identifier_string_arg = NULL; cmd_args->get_dcmi_sensor_info = 0; cmd_args->get_system_power_statistics = 0; cmd_args->get_enhanced_system_power_statistics = 0; cmd_args->get_power_limit = 0; cmd_args->set_power_limit = 0; cmd_args->exception_actions = 0; cmd_args->power_limit_requested = 0; cmd_args->correction_time_limit = 0; cmd_args->statistics_sampling_period = 0; cmd_args->activate_deactivate_power_limit = 0; cmd_args->interpret_oem_data = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_dcmi_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_dcmi_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-dcmi/ipmi-dcmi-argp.h0000644002055400205540000000277113527331635020111 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-dcmi-argp.h,v 1.4 2010-05-17 17:42:45 chu11 Exp $ ***************************************************************************** * Copyright (C) 2009-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-413270 * * This file is part of Ipmi-Dcmi, tools and libraries to support the * data center manageability interface (DCMI). For details, see * http://www.llnl.gov/linux/. * * Ipmi-Dcmi is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-Dcmi is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-Dcmi. If not, see . \*****************************************************************************/ #ifndef IPMI_DCMI_ARGP_H #define IPMI_DCMI_ARGP_H #include "ipmi-dcmi.h" void ipmi_dcmi_argp_parse (int argc, char **argv, struct ipmi_dcmi_arguments *cmd_args); #endif /* IPMI_DCMI_ARGP_H */ freeipmi-1.6.4/ipmi-fru/0000755002055400205540000000000013527342547015016 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-fru/Makefile.in0000644002055400205540000007776013527342444017100 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-fru$(EXEEXT) subdir = ipmi-fru DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_fru_OBJECTS = ipmi_fru-ipmi-fru.$(OBJEXT) \ ipmi_fru-ipmi-fru-argp.$(OBJEXT) \ ipmi_fru-ipmi-fru-oem-wistron.$(OBJEXT) \ ipmi_fru-ipmi-fru-output.$(OBJEXT) ipmi_fru_OBJECTS = $(am_ipmi_fru_OBJECTS) ipmi_fru_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_fru_SOURCES) DIST_SOURCES = $(ipmi_fru_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_fru_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_fru_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_fru_SOURCES = \ ipmi-fru.c \ ipmi-fru_.h \ ipmi-fru-argp.c \ ipmi-fru-argp.h \ ipmi-fru-oem-wistron.c \ ipmi-fru-oem-wistron.h \ ipmi-fru-output.c \ ipmi-fru-output.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-fru/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-fru/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-fru$(EXEEXT): $(ipmi_fru_OBJECTS) $(ipmi_fru_DEPENDENCIES) $(EXTRA_ipmi_fru_DEPENDENCIES) @rm -f ipmi-fru$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_fru_OBJECTS) $(ipmi_fru_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_fru-ipmi-fru-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_fru-ipmi-fru-output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_fru-ipmi-fru.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_fru-ipmi-fru.o: ipmi-fru.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru.o -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru.Tpo -c -o ipmi_fru-ipmi-fru.o `test -f 'ipmi-fru.c' || echo '$(srcdir)/'`ipmi-fru.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru.c' object='ipmi_fru-ipmi-fru.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru.o `test -f 'ipmi-fru.c' || echo '$(srcdir)/'`ipmi-fru.c ipmi_fru-ipmi-fru.obj: ipmi-fru.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru.obj -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru.Tpo -c -o ipmi_fru-ipmi-fru.obj `if test -f 'ipmi-fru.c'; then $(CYGPATH_W) 'ipmi-fru.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru.c' object='ipmi_fru-ipmi-fru.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru.obj `if test -f 'ipmi-fru.c'; then $(CYGPATH_W) 'ipmi-fru.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru.c'; fi` ipmi_fru-ipmi-fru-argp.o: ipmi-fru-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-argp.o -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Tpo -c -o ipmi_fru-ipmi-fru-argp.o `test -f 'ipmi-fru-argp.c' || echo '$(srcdir)/'`ipmi-fru-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-argp.c' object='ipmi_fru-ipmi-fru-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-argp.o `test -f 'ipmi-fru-argp.c' || echo '$(srcdir)/'`ipmi-fru-argp.c ipmi_fru-ipmi-fru-argp.obj: ipmi-fru-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Tpo -c -o ipmi_fru-ipmi-fru-argp.obj `if test -f 'ipmi-fru-argp.c'; then $(CYGPATH_W) 'ipmi-fru-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-argp.c' object='ipmi_fru-ipmi-fru-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-argp.obj `if test -f 'ipmi-fru-argp.c'; then $(CYGPATH_W) 'ipmi-fru-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-argp.c'; fi` ipmi_fru-ipmi-fru-oem-wistron.o: ipmi-fru-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-oem-wistron.o -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Tpo -c -o ipmi_fru-ipmi-fru-oem-wistron.o `test -f 'ipmi-fru-oem-wistron.c' || echo '$(srcdir)/'`ipmi-fru-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-oem-wistron.c' object='ipmi_fru-ipmi-fru-oem-wistron.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-oem-wistron.o `test -f 'ipmi-fru-oem-wistron.c' || echo '$(srcdir)/'`ipmi-fru-oem-wistron.c ipmi_fru-ipmi-fru-oem-wistron.obj: ipmi-fru-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-oem-wistron.obj -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Tpo -c -o ipmi_fru-ipmi-fru-oem-wistron.obj `if test -f 'ipmi-fru-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-fru-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-oem-wistron.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-oem-wistron.c' object='ipmi_fru-ipmi-fru-oem-wistron.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-oem-wistron.obj `if test -f 'ipmi-fru-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-fru-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-oem-wistron.c'; fi` ipmi_fru-ipmi-fru-output.o: ipmi-fru-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-output.o -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-output.Tpo -c -o ipmi_fru-ipmi-fru-output.o `test -f 'ipmi-fru-output.c' || echo '$(srcdir)/'`ipmi-fru-output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-output.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-output.c' object='ipmi_fru-ipmi-fru-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-output.o `test -f 'ipmi-fru-output.c' || echo '$(srcdir)/'`ipmi-fru-output.c ipmi_fru-ipmi-fru-output.obj: ipmi-fru-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_fru-ipmi-fru-output.obj -MD -MP -MF $(DEPDIR)/ipmi_fru-ipmi-fru-output.Tpo -c -o ipmi_fru-ipmi-fru-output.obj `if test -f 'ipmi-fru-output.c'; then $(CYGPATH_W) 'ipmi-fru-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_fru-ipmi-fru-output.Tpo $(DEPDIR)/ipmi_fru-ipmi-fru-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-fru-output.c' object='ipmi_fru-ipmi-fru-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_fru_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_fru-ipmi-fru-output.obj `if test -f 'ipmi-fru-output.c'; then $(CYGPATH_W) 'ipmi-fru-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-fru-output.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-fru/Makefile.am0000644002055400205540000000302013527331635017041 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-fru ipmi_fru_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_fru_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_fru_SOURCES = \ ipmi-fru.c \ ipmi-fru_.h \ ipmi-fru-argp.c \ ipmi-fru-argp.h \ ipmi-fru-oem-wistron.c \ ipmi-fru-oem-wistron.h \ ipmi-fru-output.c \ ipmi-fru-output.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-fru/ipmi-fru.c0000644002055400205540000013400413527331635016710 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru.c,v 1.59 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include "ipmi-fru_.h" #include "ipmi-fru-argp.h" #include "ipmi-fru-output.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-util-common.h" #include "fd.h" #define IPMI_FRU_DEFAULT_DEVICE_ID_STRING "Default FRU Device" typedef int (*ipmi_fru_sdr_callback)(ipmi_fru_state_data_t *, unsigned int *, const void*, unsigned int, uint8_t, void *); struct ipmi_fru_sdr_find_data { uint8_t device_id; int found; }; struct ipmi_fru_sdr_callback { ipmi_fru_state_data_t *state_data; unsigned int *output_count; ipmi_fru_sdr_callback fru_cb; void *arg; }; static int _output_fru (ipmi_fru_state_data_t *state_data) { int ret = 0; int rv = -1; if (ipmi_fru_first (state_data->fru_ctx) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_first: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } do { uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1]; unsigned int area_type = 0; unsigned int area_length = 0; memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1); if (ipmi_fru_read_data_area (state_data->fru_ctx, &area_type, &area_length, areabuf, IPMI_FRU_AREA_SIZE_MAX) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { /* Special case, not really an "error" */ if (ipmi_fru_ctx_errnum (state_data->fru_ctx) != IPMI_FRU_ERR_NO_FRU_INFORMATION) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); } goto next; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_read_data_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (area_length) { pstdout_printf (state_data->pstate, "\n"); switch (area_type) { case IPMI_FRU_AREA_TYPE_CHASSIS_INFO_AREA: if (ipmi_fru_output_chassis_info_area (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_BOARD_INFO_AREA: if (ipmi_fru_output_board_info_area (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_PRODUCT_INFO_AREA: if (ipmi_fru_output_product_info_area (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_POWER_SUPPLY_INFORMATION: if (ipmi_fru_output_power_supply_information (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_OUTPUT: case IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_OUTPUT: if (ipmi_fru_output_dc_output (state_data, area_type, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_LOAD: case IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_LOAD: if (ipmi_fru_output_dc_load (state_data, area_type, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_MANAGEMENT_ACCESS_RECORD: if (ipmi_fru_output_management_access_record (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_BASE_COMPATABILITY_RECORD: if (ipmi_fru_output_base_compatibility_record (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_COMPATABILITY_RECORD: if (ipmi_fru_output_extended_compatibility_record (state_data, areabuf, area_length) < 0) goto cleanup; break; case IPMI_FRU_AREA_TYPE_MULTIRECORD_OEM: if (ipmi_fru_output_oem_record (state_data, areabuf, area_length) < 0) goto cleanup; break; default: pstdout_fprintf (state_data->pstate, stderr, " FRU Error: Unknown FRU Area Type Read: %02Xh\n", area_type); goto next; break; } } next: ; } while ((ret = ipmi_fru_next (state_data->fru_ctx)) == 1); if (ret < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_next: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } static int _open_and_output_fru (ipmi_fru_state_data_t *state_data, unsigned int *output_count, uint8_t device_id, const char *device_id_str) { int rv = -1; assert (state_data); assert (output_count); assert (device_id_str); if ((*output_count)) pstdout_printf (state_data->pstate, "\n"); (*output_count)++; pstdout_printf (state_data->pstate, "FRU Inventory Device: %s (ID %02Xh)\n", device_id_str, device_id); if (ipmi_fru_open_device_id (state_data->fru_ctx, device_id) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { /* Special case, not really an "error" */ if (ipmi_fru_ctx_errnum (state_data->fru_ctx) != IPMI_FRU_ERR_NO_FRU_INFORMATION) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); } goto out; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_open_device_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (_output_fru (state_data) < 0) goto cleanup; out: rv = 0; cleanup: ipmi_fru_close_device_id (state_data->fru_ctx); return (rv); } static int _use_buffer_and_output_fru (ipmi_fru_state_data_t *state_data, unsigned int *output_count, const void *frubuf, unsigned int frubuflen) { int rv = -1; assert (state_data); assert (frubuf); assert (frubuflen); if ((*output_count)) pstdout_printf (state_data->pstate, "\n"); (*output_count)++; pstdout_printf (state_data->pstate, "FRU Inventory From File: %s\n", state_data->prog_data->args->fru_file); if (ipmi_fru_open_device_id_with_buffer (state_data->fru_ctx, frubuf, frubuflen) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { /* Special case, not really an "error" */ if (ipmi_fru_ctx_errnum (state_data->fru_ctx) != IPMI_FRU_ERR_NO_FRU_INFORMATION) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); } goto out; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_open_device_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (_output_fru (state_data) < 0) goto cleanup; out: rv = 0; cleanup: ipmi_fru_close_device_id (state_data->fru_ctx); return (rv); } static int _open_and_output_fru_with_sdr (ipmi_fru_state_data_t *state_data, unsigned int *output_count, const void *sdr_record, unsigned int sdr_record_len, uint8_t device_id) { char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH+1]; int rv = -1; assert (state_data); assert (output_count); assert (sdr_record); assert (sdr_record_len); memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH+1); if (ipmi_sdr_parse_device_id_string (state_data->sdr_ctx, sdr_record, sdr_record_len, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (_open_and_output_fru (state_data, output_count, device_id, device_id_string) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _output_dimm (ipmi_fru_state_data_t *state_data, unsigned int *output_count, uint8_t device_id, const char *device_id_str) { uint8_t areabuf[IPMI_FRU_AREA_SIZE_MAX+1]; unsigned int area_type = 0; unsigned int area_length = 0; unsigned int orig_flags = 0; int block_len; int rv = -1; assert (state_data); assert (output_count); assert (device_id_str); if ((*output_count)) pstdout_printf (state_data->pstate, "\n"); (*output_count)++; pstdout_printf (state_data->pstate, "FRU Inventory Device: %s (ID %02Xh)\n", device_id_str, device_id); if (ipmi_fru_ctx_get_flags (state_data->fru_ctx, &orig_flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_get_flags: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (ipmi_fru_ctx_set_flags (state_data->fru_ctx, orig_flags | IPMI_FRU_FLAGS_READ_RAW) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_set_flags: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (ipmi_fru_open_device_id (state_data->fru_ctx, device_id) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { /* Special case, not really an "error" */ if (ipmi_fru_ctx_errnum (state_data->fru_ctx) != IPMI_FRU_ERR_NO_FRU_INFORMATION) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); } goto out; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_open_device_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto flags_cleanup; } memset (areabuf, '\0', IPMI_FRU_AREA_SIZE_MAX + 1); if (ipmi_fru_read_data_area (state_data->fru_ctx, &area_type, &area_length, areabuf, IPMI_FRU_AREA_SIZE_MAX) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { /* Special case, not really an "error" */ if (ipmi_fru_ctx_errnum (state_data->fru_ctx) != IPMI_FRU_ERR_NO_FRU_INFORMATION) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); } goto out; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_read_data_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto flags_cleanup; } if (area_type != IPMI_FRU_AREA_TYPE_RAW_DATA) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: Invalid area type returned\n"); goto out; } if ((block_len = fiid_template_block_len_bytes (tmpl_fru_dimm_spd_ddr_header, "spd_bytes_used", "reserved")) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_template_block_len_bytes: %s\n", strerror (errno)); goto flags_cleanup; } if (area_length < block_len) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_strerror (IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID)); goto out; } if (ipmi_fru_output_dimm (state_data, areabuf, area_length) < 0) goto flags_cleanup; out: rv = 0; flags_cleanup: if (ipmi_fru_ctx_set_flags (state_data->fru_ctx, orig_flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_set_flags: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); rv = -1; goto cleanup; } cleanup: ipmi_fru_close_device_id (state_data->fru_ctx); return (rv); } static int _output_dimm_with_sdr (ipmi_fru_state_data_t *state_data, unsigned int *output_count, const void *sdr_record, unsigned int sdr_record_len, uint8_t device_id) { char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH+1]; int rv = -1; assert (state_data); assert (output_count); assert (sdr_record); assert (sdr_record_len); memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH+1); if (ipmi_sdr_parse_device_id_string (state_data->sdr_ctx, sdr_record, sdr_record_len, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (_output_dimm (state_data, output_count, device_id, device_id_string) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _is_logical_fru (uint8_t device_type, uint8_t device_type_modifier) { /* achu: All this code and checks could be shortened if we abuse * knowledge of the actual values of these macros, but we list all * of this to be clear what we're doing. */ if ((device_type == IPMI_DEVICE_TYPE_EEPROM_24C01_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C02_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C04_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C08_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C16_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C17_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C32_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C64_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_IPMI_FRU_INVENTORY) || (device_type == IPMI_DEVICE_TYPE_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER && (device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_IPMI_FRU_INVENTORY_BACKWARDS_COMPATABILITY || device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_IPMI_FRU_INVENTORY))) return (1); return (0); } static int _is_dimm_fru (uint8_t device_type, uint8_t device_type_modifier) { /* achu: All this code and checks could be shortened if we abuse * knowledge of the actual values of these macros, but we list all * of this to be clear what we're doing. */ if ((device_type == IPMI_DEVICE_TYPE_EEPROM_24C01_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C01_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C02_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C02_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C04_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C04_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C08_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C08_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C16_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C16_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C17_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C17_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C32_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C32_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_EEPROM_24C64_OR_EQUIVALENT && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_EEPROM_24C64_OR_EQUIVALENT_DIMM_MEMORY_ID) || (device_type == IPMI_DEVICE_TYPE_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER && device_type_modifier == IPMI_DEVICE_TYPE_MODIFIER_FRU_INVENTORY_DEVICE_BEHIND_MANAGEMENT_CONTROLLER_DIMM_MEMORY_ID)) return (1); return (0); } static int _print_except_default_fru_cb (ipmi_fru_state_data_t *state_data, unsigned int *output_count, const void *sdr_record, unsigned int sdr_record_len, uint8_t record_type, void *arg) { int rv = -1; assert (state_data); assert (output_count); assert (sdr_record); assert (sdr_record_len); assert (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD || record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD); if (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) { uint8_t logical_physical_fru_device, logical_fru_device_device_slave_address; uint8_t device_access_address, channel_number; uint8_t device_type, device_type_modifier; if (ipmi_sdr_parse_fru_device_locator_parameters (state_data->sdr_ctx, sdr_record, sdr_record_len, &device_access_address, &logical_fru_device_device_slave_address, NULL, NULL, &logical_physical_fru_device, &channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_fru_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_device_type (state_data->sdr_ctx, sdr_record, sdr_record_len, &device_type, &device_type_modifier) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* stored in 7-bit form, unlike sensor owner ids, need to shift */ device_access_address <<= 1; if (logical_physical_fru_device && logical_fru_device_device_slave_address != IPMI_FRU_DEVICE_ID_DEFAULT) { if (device_access_address == IPMI_SLAVE_ADDRESS_BMC) { if (_is_logical_fru (device_type, device_type_modifier)) { if (_open_and_output_fru_with_sdr (state_data, output_count, sdr_record, sdr_record_len, logical_fru_device_device_slave_address) < 0) goto cleanup; } else if (_is_dimm_fru (device_type, device_type_modifier)) { if (_output_dimm_with_sdr (state_data, output_count, sdr_record, sdr_record_len, logical_fru_device_device_slave_address) < 0) goto cleanup; } } else { if (state_data->prog_data->args->bridge_fru) { if (ipmi_ctx_set_target (state_data->ipmi_ctx, &channel_number, &device_access_address) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_target: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (_is_logical_fru (device_type, device_type_modifier)) { if (_open_and_output_fru_with_sdr (state_data, output_count, sdr_record, sdr_record_len, logical_fru_device_device_slave_address) < 0) goto cleanup; } else if (_is_dimm_fru (device_type, device_type_modifier)) { if (_output_dimm_with_sdr (state_data, output_count, sdr_record, sdr_record_len, logical_fru_device_device_slave_address) < 0) goto cleanup; } if (ipmi_ctx_set_target (state_data->ipmi_ctx, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_target: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } } } } else { uint8_t device_slave_address; uint8_t channel_number; uint8_t device_capabilities_fru_inventory_device; assert (state_data->prog_data->args->bridge_fru); /* achu: Thanks to Michael L. Winiarski patch on ipmitool mailing list Was not originaly * aware that FRU could be specified via this record. */ if (ipmi_sdr_parse_management_controller_device_locator_parameters (state_data->sdr_ctx, sdr_record, sdr_record_len, &device_slave_address, &channel_number, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, &device_capabilities_fru_inventory_device, NULL, NULL, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_management_controller_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* stored in 7-bit form, unlike sensor owner ids, need to shift */ device_slave_address <<= 1; /* duplicate of base FRU Device ID 0 - skip * * Note that it is always Device ID 0 w/ management controller device locators */ if (device_slave_address == IPMI_SLAVE_ADDRESS_BMC && channel_number == IPMI_CHANNEL_NUMBER_PRIMARY_IPMB) goto out; if (!device_capabilities_fru_inventory_device) goto out; if (ipmi_ctx_set_target (state_data->ipmi_ctx, &channel_number, &device_slave_address) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_target: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* 0 is defined FRU device ID when bridging - see IPMI spec SDR record info */ if (_open_and_output_fru_with_sdr (state_data, output_count, sdr_record, sdr_record_len, 0) < 0) goto cleanup; if (ipmi_ctx_set_target (state_data->ipmi_ctx, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_target: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } out: rv = 0; cleanup: return (rv); } static int _find_device_id_fru_cb (ipmi_fru_state_data_t *state_data, unsigned int *output_count, const void *sdr_record, unsigned int sdr_record_len, uint8_t record_type, void *arg) { struct ipmi_fru_sdr_find_data *find_data; int rv = -1; assert (state_data); assert (output_count); assert (sdr_record); assert (sdr_record_len); assert (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD || record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD); assert (arg); find_data = (struct ipmi_fru_sdr_find_data *)arg; if (record_type == IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD) { uint8_t logical_physical_fru_device, logical_fru_device_device_slave_address; if (ipmi_sdr_parse_fru_device_locator_parameters (state_data->sdr_ctx, sdr_record, sdr_record_len, NULL, &logical_fru_device_device_slave_address, NULL, NULL, &logical_physical_fru_device, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_fru_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* Check 'found' flag too - some SDRs list the device 0 twice */ if (logical_physical_fru_device && find_data->device_id == logical_fru_device_device_slave_address && !find_data->found) { if (_open_and_output_fru_with_sdr (state_data, output_count, sdr_record, sdr_record_len, logical_fru_device_device_slave_address) < 0) goto cleanup; find_data->found = 1; } } rv = 0; cleanup: return (rv); } static int _loop_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *sdr_arg) { struct ipmi_fru_sdr_callback *sdr_callback_arg; ipmi_fru_state_data_t *state_data; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (sdr_arg); sdr_callback_arg = (struct ipmi_fru_sdr_callback *)sdr_arg; state_data = sdr_callback_arg->state_data; if (record_type != IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD && record_type != IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) return (0); if (!state_data->prog_data->args->bridge_fru && record_type == IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD) return (0); return (sdr_callback_arg->fru_cb (state_data, sdr_callback_arg->output_count, sdr_record, sdr_record_len, record_type, sdr_callback_arg->arg)); } static int _loop_sdr (ipmi_fru_state_data_t *state_data, unsigned int *output_count, ipmi_fru_sdr_callback fru_cb, void *fru_arg) { struct ipmi_fru_sdr_callback sdr_callback_arg; int rv = -1; assert (state_data); assert (output_count); assert (fru_cb); sdr_callback_arg.state_data = state_data; sdr_callback_arg.output_count = output_count; sdr_callback_arg.fru_cb = fru_cb; sdr_callback_arg.arg = fru_arg; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _loop_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } static int run_cmd_args (ipmi_fru_state_data_t *state_data) { struct ipmi_fru_arguments *args; struct ipmi_fru_sdr_find_data find_data; uint8_t frubuf[IPMI_FRU_AREA_SIZE_MAX]; unsigned int output_count = 0; int fd = -1; int rv = -1; assert (state_data); args = state_data->prog_data->args; assert (!args->common_args.flush_cache); if (args->common_args.ignore_sdr_cache) { /* no SDR? This is all you get :-) */ if (_open_and_output_fru (state_data, &output_count, IPMI_FRU_DEVICE_ID_DEFAULT, IPMI_FRU_DEFAULT_DEVICE_ID_STRING) < 0) goto cleanup; return (0); } else { if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; } if (args->interpret_oem_data) { if (ipmi_get_oem_data (state_data->pstate, state_data->ipmi_ctx, &state_data->oem_data) < 0) goto cleanup; if (ipmi_fru_ctx_set_manufacturer_id (state_data->fru_ctx, state_data->oem_data.manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_set_manufacturer_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (ipmi_fru_ctx_set_product_id (state_data->fru_ctx, state_data->oem_data.product_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_ctx_set_product_id: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } } if (args->device_id_set) { find_data.device_id = args->device_id; find_data.found = 0; if (_loop_sdr (state_data, &output_count, _find_device_id_fru_cb, &find_data) < 0) goto cleanup; if (!find_data.found) { if (find_data.device_id == IPMI_FRU_DEVICE_ID_DEFAULT) { if (_open_and_output_fru (state_data, &output_count, IPMI_FRU_DEVICE_ID_DEFAULT, IPMI_FRU_DEFAULT_DEVICE_ID_STRING) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "device id not found\n"); } } goto out; } else if (args->fru_file) { struct stat sbuf; ssize_t len; if (stat (state_data->prog_data->args->fru_file, &sbuf) < 0) { pstdout_fprintf (state_data->pstate, stderr, "Cannot read '%s': %s\n", state_data->prog_data->args->fru_file, strerror (errno)); goto cleanup; } if (!sbuf.st_size) { pstdout_fprintf (state_data->pstate, stderr, "FRU file '%s' is empty\n", state_data->prog_data->args->fru_file); goto cleanup; } if (sbuf.st_size > IPMI_FRU_AREA_SIZE_MAX) { pstdout_fprintf (state_data->pstate, stderr, "FRU file '%s' too large, max area size is %u < %u\n", state_data->prog_data->args->fru_file, IPMI_FRU_AREA_SIZE_MAX, sbuf.st_size); goto cleanup; } if ((fd = open (state_data->prog_data->args->fru_file, O_RDONLY)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "Cannot open '%s': %s\n", state_data->prog_data->args->fru_file, strerror (errno)); goto cleanup; } if ((len = fd_read_n (fd, frubuf, sbuf.st_size)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fd_read_n: %s\n", strerror (errno)); goto cleanup; } if (_use_buffer_and_output_fru (state_data, &output_count, frubuf, len) < 0) goto cleanup; } else { /* We always print out the default one first */ find_data.device_id = IPMI_FRU_DEVICE_ID_DEFAULT; find_data.found = 0; if (_loop_sdr (state_data, &output_count, _find_device_id_fru_cb, &find_data) < 0) goto cleanup; /* It's ok if this one isn't found in the SDR, use a generic * output */ if (!find_data.found) { if (_open_and_output_fru (state_data, &output_count, IPMI_FRU_DEVICE_ID_DEFAULT, IPMI_FRU_DEFAULT_DEVICE_ID_STRING) < 0) goto cleanup; } /* print the rest */ if (_loop_sdr (state_data, &output_count, _print_except_default_fru_cb, NULL) < 0) goto cleanup; } out: rv = 0; cleanup: close (fd); return (rv); } static int _ipmi_fru (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_fru_state_data_t state_data; ipmi_fru_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; unsigned int flags = 0; assert (pstate); assert (arg); prog_data = (ipmi_fru_prog_data_t *)arg; if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_fru_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; state_data.hostname = (char *)hostname; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (!(state_data.fru_ctx = ipmi_fru_ctx_create (state_data.ipmi_ctx))) { pstdout_perror (pstate, "ipmi_fru_ctx_create()"); goto cleanup; } if (hostname) { if (ipmi_fru_ctx_set_debug_prefix (state_data.fru_ctx, hostname) < 0) pstdout_fprintf (pstate, stderr, "ipmi_fru_ctx_set_debug_prefix: %s\n", ipmi_fru_ctx_errormsg (state_data.fru_ctx)); } if (state_data.prog_data->args->common_args.debug) flags |= IPMI_FRU_FLAGS_DEBUG_DUMP; if (state_data.prog_data->args->skip_checks) flags |= IPMI_FRU_FLAGS_SKIP_CHECKSUM_CHECKS; if (state_data.prog_data->args->interpret_oem_data) flags |= IPMI_FRU_FLAGS_INTERPRET_OEM_DATA; if (flags) { if (ipmi_fru_ctx_set_flags (state_data.fru_ctx, flags) < 0) { pstdout_fprintf (pstate, stderr, "ipmi_fru_ctx_set_flags: %s\n", ipmi_fru_ctx_strerror (ipmi_fru_ctx_errnum (state_data.fru_ctx))); goto cleanup; } } if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_fru_ctx_destroy (state_data.fru_ctx); ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_fru_prog_data_t prog_data; struct ipmi_fru_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_fru_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; /* Special case, if user specified workaround via flags instead of option */ if (prog_data.args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHECKS) prog_data.args->skip_checks = 1; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_fru, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-fru/ipmi-fru_.h0000644002055400205540000000515313527331635017056 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru_.h,v 1.17 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ /* file is named ipmi-fru_.h to differentiate itself from the * library ipmi-fru_.h. * * I am scared of the portability of the #include_next directive, so * that's why I'm doing it this way. */ /* file is "ipmi-fru_.h", so double underscore */ #ifndef IPMI_FRU__H #define IPMI_FRU__H #include #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "pstdout.h" enum ipmi_fru_argp_option_keys { DEVICE_ID_KEY = 'e', VERBOSE_KEY = 'v', /* legacy */ SKIP_CHECKS_KEY = 's', BRIDGE_FRU_KEY = 160, INTERPRET_OEM_DATA_KEY = 161, FRU_FILE_KEY = 162, }; struct ipmi_fru_arguments { struct common_cmd_args common_args; uint8_t device_id; int device_id_set; unsigned int verbose_count; /* legacy */ int skip_checks; int bridge_fru; int interpret_oem_data; char *fru_file; }; typedef struct ipmi_fru_prog_data { char *progname; struct ipmi_fru_arguments *args; } ipmi_fru_prog_data_t; typedef struct ipmi_fru_state_data { ipmi_fru_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; char *hostname; ipmi_fru_ctx_t fru_ctx; ipmi_sdr_ctx_t sdr_ctx; struct ipmi_oem_data oem_data; } ipmi_fru_state_data_t; #endif /* IPMI_FRU__H */ freeipmi-1.6.4/ipmi-fru/ipmi-fru-argp.c0000644002055400205540000001775513527331635017654 0ustar00achuachu00000000000000/***************************************************************************** \ * $Id: ipmi-fru-argp.c,v 1.33 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "ipmi-fru_.h" #include "ipmi-fru-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-fru - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.\n" "Copyright (C) 2007 The Regents of the University of California.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-fru - display FRU information."; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_IGNORE, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "device-id", DEVICE_ID_KEY, "DEVICE_ID", 0, "Specify a specific FRU device ID.", 40}, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output.", 41}, /* legacy */ { "skip-checks", SKIP_CHECKS_KEY, 0, OPTION_HIDDEN, "Skip FRU checksum checks", 42}, { "bridge-fru", BRIDGE_FRU_KEY, 0, 0, "Bridge to read FRU entries on other controllers", 43}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 44}, { "fru-file", FRU_FILE_KEY, "FILENAME", 0, "Output from specified FRU binary file.", 45}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_fru_arguments *cmd_args; char *endptr; int tmp; assert (state); cmd_args = state->input; switch (key) { case DEVICE_ID_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid device id\n"); exit (EXIT_FAILURE); } if (tmp == IPMI_FRU_DEVICE_ID_RESERVED || tmp < IPMI_FRU_DEVICE_ID_MIN || tmp > IPMI_FRU_DEVICE_ID_MAX) { fprintf (stderr, "invalid device id\n"); exit (EXIT_FAILURE); } cmd_args->device_id = tmp; cmd_args->device_id_set++; break; case VERBOSE_KEY: cmd_args->verbose_count++; break; /* legacy */ case SKIP_CHECKS_KEY: cmd_args->skip_checks = 1; break; case BRIDGE_FRU_KEY: cmd_args->bridge_fru = 1; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case FRU_FILE_KEY: cmd_args->fru_file = arg; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_fru_config_file_parse (struct ipmi_fru_arguments *cmd_args) { struct config_file_data_ipmi_fru config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_fru)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_FRU, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; /* legacy */ if (config_file_data.skip_checks_count) cmd_args->skip_checks = config_file_data.skip_checks; if (config_file_data.bridge_fru_count) cmd_args->bridge_fru = config_file_data.bridge_fru; if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; } static void _ipmi_fru_args_validate (struct ipmi_fru_arguments *cmd_args) { if (cmd_args->fru_file) { if (access (cmd_args->fru_file, R_OK) < 0) { fprintf (stderr, "Cannot read '%s': %s\n", cmd_args->fru_file, strerror (errno)); exit (EXIT_FAILURE); } } } void ipmi_fru_argp_parse (int argc, char **argv, struct ipmi_fru_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_user (&(cmd_args->common_args)); cmd_args->device_id = 0; cmd_args->device_id_set = 0; cmd_args->verbose_count = 0; /* legacy */ cmd_args->skip_checks = 0; cmd_args->bridge_fru = 0; cmd_args->interpret_oem_data = 0; cmd_args->fru_file = NULL; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_fru_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_fru_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-fru/ipmi-fru-argp.h0000644002055400205540000000306513527331635017646 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-argp.h,v 1.10 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_ARGP_H #define IPMI_FRU_ARGP_H #include "ipmi-fru_.h" void ipmi_fru_argp_parse (int argc, char **argv, struct ipmi_fru_arguments *cmd_args); #endif /* IPMI_FRU_ARGP_H */ freeipmi-1.6.4/ipmi-fru/ipmi-fru-oem-wistron.c0000644002055400205540000000556413527331635021201 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-output.c,v 1.8 2010-03-02 21:09:07 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-fru_.h" #include "ipmi-fru-oem-wistron.h" #include "freeipmi-portability.h" int ipmi_fru_oem_wistron_oem_record (ipmi_fru_state_data_t *state_data, uint8_t record_type_id, uint32_t manufacturer_id, uint8_t *oem_data, unsigned int oem_data_len) { assert (state_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (oem_data); if (state_data->oem_data.product_id == IPMI_WISTRON_PRODUCT_ID_C6220) { if (record_type_id == IPMI_FRU_OEM_WISTRON_PROPRIETARY_STRING && oem_data_len) { char string[IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX + 1]; unsigned int len; memset (string, '\0', IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX + 1); len = oem_data_len; if (len > IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX) len = IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX; memcpy (string, oem_data, len); pstdout_printf (state_data->pstate, " FRU Proprietary String: %s\n", string); return (1); } } return (0); } freeipmi-1.6.4/ipmi-fru/ipmi-fru-oem-wistron.h0000644002055400205540000000361213527331635021176 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-output.h,v 1.5 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_OEM_WISTRON_H #define IPMI_FRU_OEM_WISTRON_H #include #include "ipmi-fru_.h" /* Returns 1 on interpretation, 0 if not, -1 on error */ int ipmi_fru_oem_wistron_oem_record (ipmi_fru_state_data_t *state_data, uint8_t record_type_id, uint32_t manufacturer_id, uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_FRU_OEM_WISTRON_H */ freeipmi-1.6.4/ipmi-fru/ipmi-fru-output.c0000644002055400205540000027417213527331635020261 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-output.c,v 1.8 2010-03-02 21:09:07 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmi-fru_.h" #include "ipmi-fru-output.h" #include "ipmi-fru-oem-wistron.h" #include "tool-util-common.h" #include "freeipmi-portability.h" /* haven't seen a motherboard with more than 2-3 so far, 64 should be more than enough */ #define IPMI_FRU_CUSTOM_FIELDS 64 #define IPMI_FRU_STR_BUFLEN 1024 int _output_field (ipmi_fru_state_data_t *state_data, uint8_t language_code, ipmi_fru_field_t *field, char *str) { char strbuf[IPMI_FRU_AREA_STRING_MAX + 1]; unsigned int strbuflen = IPMI_FRU_AREA_STRING_MAX; assert (state_data); assert (field); assert (str); if (!field->type_length_field_length) return (0); memset (strbuf, '\0', IPMI_FRU_AREA_STRING_MAX + 1); if (ipmi_fru_type_length_field_to_string (state_data->fru_ctx, field->type_length_field, field->type_length_field_length, language_code, strbuf, &strbuflen) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU %s: Error '%s'\n", str, ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_type_length_field_to_string: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (strbuflen) pstdout_printf (state_data->pstate, " FRU %s: %s\n", str, strbuf); return (0); } int ipmi_fru_output_chassis_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint8_t chassis_type; ipmi_fru_field_t chassis_part_number; ipmi_fru_field_t chassis_serial_number; ipmi_fru_field_t chassis_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; unsigned int i; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_chassis_info_area (state_data->fru_ctx, areabuf, area_length, &chassis_type, &chassis_part_number, &chassis_serial_number, chassis_custom_fields, IPMI_FRU_CUSTOM_FIELDS) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Chassis Info Area Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_chassis_info_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (IPMI_FRU_CHASSIS_TYPE_VALID (chassis_type)) pstdout_printf (state_data->pstate, " FRU Chassis Type: %s\n", ipmi_fru_chassis_types[chassis_type]); else pstdout_printf (state_data->pstate, " FRU Chassis Type: %s\n", ipmi_fru_chassis_types[IPMI_FRU_CHASSIS_TYPE_UNKNOWN]); /* achu: Chassis Info Area has no language code, assume English. */ if (_output_field (state_data, IPMI_FRU_LANGUAGE_CODE_ENGLISH, &chassis_part_number, "Chassis Part Number") < 0) return (-1); if (_output_field (state_data, IPMI_FRU_LANGUAGE_CODE_ENGLISH, &chassis_serial_number, "Chassis Serial Number") < 0) return (-1); for (i = 0; i < IPMI_FRU_CUSTOM_FIELDS; i++) { if (_output_field (state_data, IPMI_FRU_LANGUAGE_CODE_ENGLISH, &chassis_custom_fields[i], "Chassis Custom Info") < 0) return (-1); } return (0); } int ipmi_fru_output_board_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint8_t language_code; uint32_t mfg_date_time; ipmi_fru_field_t board_manufacturer; ipmi_fru_field_t board_product_name; ipmi_fru_field_t board_serial_number; ipmi_fru_field_t board_part_number; ipmi_fru_field_t board_fru_file_id; ipmi_fru_field_t board_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; char mfg_date_time_buf[IPMI_FRU_STR_BUFLEN + 1]; unsigned int i; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_board_info_area (state_data->fru_ctx, areabuf, area_length, &language_code, &mfg_date_time, &board_manufacturer, &board_product_name, &board_serial_number, &board_part_number, &board_fru_file_id, board_custom_fields, IPMI_FRU_CUSTOM_FIELDS) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Board Info Area Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_board_info_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (state_data->prog_data->args->verbose_count) { if (IPMI_FRU_LANGUAGE_CODE_VALID (language_code)) pstdout_printf (state_data->pstate, " FRU Board Language: %s\n", ipmi_fru_language_codes[language_code]); else pstdout_printf (state_data->pstate, " FRU Board Language Code: %02Xh\n", language_code); } if (mfg_date_time != IPMI_FRU_MFG_DATE_TIME_UNSPECIFIED) { memset (mfg_date_time_buf, '\0', IPMI_FRU_STR_BUFLEN + 1); if (ipmi_timestamp_string (mfg_date_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", mfg_date_time_buf, IPMI_FRU_STR_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); return (-1); } pstdout_printf (state_data->pstate, " FRU Board Manufacturing Date/Time: %s\n", mfg_date_time_buf); } else pstdout_printf (state_data->pstate, " FRU Board Manufacturing Date/Time: unspecified\n"); if (_output_field (state_data, language_code, &board_manufacturer, "Board Manufacturer") < 0) return (-1); if (_output_field (state_data, language_code, &board_product_name, "Board Product Name") < 0) return (-1); if (_output_field (state_data, language_code, &board_serial_number, "Board Serial Number") < 0) return (-1); if (_output_field (state_data, language_code, &board_part_number, "Board Part Number") < 0) return (-1); if (_output_field (state_data, language_code, &board_fru_file_id, "FRU File ID") < 0) return (-1); for (i = 0; i < IPMI_FRU_CUSTOM_FIELDS; i++) { if (_output_field (state_data, language_code, &board_custom_fields[i], "Board Custom Info") < 0) return (-1); } return (0); } int ipmi_fru_output_product_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint8_t language_code; ipmi_fru_field_t product_manufacturer_name; ipmi_fru_field_t product_name; ipmi_fru_field_t product_part_model_number; ipmi_fru_field_t product_version; ipmi_fru_field_t product_serial_number; ipmi_fru_field_t product_asset_tag; ipmi_fru_field_t product_fru_file_id; ipmi_fru_field_t product_custom_fields[IPMI_FRU_CUSTOM_FIELDS]; unsigned int i; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_product_info_area (state_data->fru_ctx, areabuf, area_length, &language_code, &product_manufacturer_name, &product_name, &product_part_model_number, &product_version, &product_serial_number, &product_asset_tag, &product_fru_file_id, product_custom_fields, IPMI_FRU_CUSTOM_FIELDS) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Product Info Area Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_product_info_area: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (state_data->prog_data->args->verbose_count) { if (IPMI_FRU_LANGUAGE_CODE_VALID (language_code)) pstdout_printf (state_data->pstate, " FRU Product Language: %s\n", ipmi_fru_language_codes[language_code]); else pstdout_printf (state_data->pstate, " FRU Product Language Code: %02Xh\n", language_code); } if (_output_field (state_data, language_code, &product_manufacturer_name, "Product Manufacturer Name") < 0) return (-1); if (_output_field (state_data, language_code, &product_name, "Product Name") < 0) return (-1); if (_output_field (state_data, language_code, &product_part_model_number, "Product Part/Model Number") < 0) return (-1); if (_output_field (state_data, language_code, &product_version, "Product Version") < 0) return (-1); if (_output_field (state_data, language_code, &product_serial_number, "Product Serial Number") < 0) return (-1); if (_output_field (state_data, language_code, &product_asset_tag, "Product Asset Tag") < 0) return (-1); if (_output_field (state_data, language_code, &product_fru_file_id, "FRU File ID") < 0) return (-1); for (i = 0; i < IPMI_FRU_CUSTOM_FIELDS; i++) { if (_output_field (state_data, language_code, &product_custom_fields[i], "Product Custom Info") < 0) return (-1); } return (0); } static char * _voltage_str (uint8_t voltage) { switch (voltage) { case IPMI_FRU_VOLTAGE_12V: return "12V"; case IPMI_FRU_VOLTAGE_MINUS12V: return "-12V"; case IPMI_FRU_VOLTAGE_5V: return "5V"; case IPMI_FRU_VOLTAGE_3_3V: return "3.3V"; default: return ""; } return (NULL); /* NOT REACHED */ } int ipmi_fru_output_power_supply_information (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { unsigned int overall_capacity; unsigned int peak_va; unsigned int inrush_current; unsigned int inrush_interval; int low_end_input_voltage_range_1; int high_end_input_voltage_range_1; int low_end_input_voltage_range_2; int high_end_input_voltage_range_2; unsigned int low_end_input_frequency_range; unsigned int high_end_input_frequency_range; unsigned int ac_dropout_tolerance; unsigned int predictive_fail_support; unsigned int power_factor_correction; unsigned int autoswitch; unsigned int hot_swap_support; unsigned int tachometer_pulses_per_rotation_predictive_fail_polarity; unsigned int peak_capacity; unsigned int hold_up_time; unsigned int voltage_1; unsigned int voltage_2; unsigned int total_combined_wattage; unsigned int predictive_fail_tachometer_lower_threshold; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_multirecord_power_supply_information (state_data->fru_ctx, areabuf, area_length, &overall_capacity, &peak_va, &inrush_current, &inrush_interval, &low_end_input_voltage_range_1, &high_end_input_voltage_range_1, &low_end_input_voltage_range_2, &high_end_input_voltage_range_2, &low_end_input_frequency_range, &high_end_input_frequency_range, &ac_dropout_tolerance, &predictive_fail_support, &power_factor_correction, &autoswitch, &hot_swap_support, &tachometer_pulses_per_rotation_predictive_fail_polarity, &peak_capacity, &hold_up_time, &voltage_1, &voltage_2, &total_combined_wattage, &predictive_fail_tachometer_lower_threshold) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Power Supply Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_power_supply_information: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } pstdout_printf (state_data->pstate, " FRU Power Supply Overall Capacity: %u Watts\n", overall_capacity); pstdout_printf (state_data->pstate, " FRU Power Supply Peak VA: %u VA\n", peak_va); pstdout_printf (state_data->pstate, " FRU Power Supply Max Inrush Current: %u Amps\n", inrush_current); pstdout_printf (state_data->pstate, " FRU Power Supply Inrush Interval: %u ms\n", inrush_interval); pstdout_printf (state_data->pstate, " FRU Power Supply Low End Input Voltage 1: %d mV\n", low_end_input_voltage_range_1); pstdout_printf (state_data->pstate, " FRU Power Supply High End Input Voltage 1: %d mV\n", high_end_input_voltage_range_1); pstdout_printf (state_data->pstate, " FRU Power Supply Low End Input Voltage 2: %d mV\n", low_end_input_voltage_range_2); pstdout_printf (state_data->pstate, " FRU Power Supply High End Input Voltage 2: %d mV\n", high_end_input_voltage_range_2); pstdout_printf (state_data->pstate, " FRU Power Supply Low End Acceptable Frequency: %u Hz\n", low_end_input_frequency_range); pstdout_printf (state_data->pstate, " FRU Power Supply High End Acceptable Frequency: %u Hz\n", high_end_input_frequency_range); pstdout_printf (state_data->pstate, " FRU Power Supply A/C Dropout Tolerance: %u ms\n", ac_dropout_tolerance); pstdout_printf (state_data->pstate, " FRU Power Supply Predictive Fail Support: %s\n", (predictive_fail_support) ? "Yes" : "No"); if (predictive_fail_support) { if (tachometer_pulses_per_rotation_predictive_fail_polarity) { if (predictive_fail_tachometer_lower_threshold) pstdout_printf (state_data->pstate, " FRU Power Supply Predictive Fail: Tach output, two pulses per rotation\n"); else pstdout_printf (state_data->pstate, " FRU Power Supply Predictive Fail: Pass/Fail predictive fail pin (0 = fail)\n"); } else { if (predictive_fail_tachometer_lower_threshold) pstdout_printf (state_data->pstate, " FRU Power Supply Predictive Fail: Tach output, one pulse per rotation\n"); else pstdout_printf (state_data->pstate, " FRU Power Supply Predictive Fail: Pass/Fail predictive fail pin (1 = fail)\n"); } } pstdout_printf (state_data->pstate, " FRU Power Supply Power Factor Correction Supported: %s\n", (power_factor_correction) ? "Yes" : "No"); pstdout_printf (state_data->pstate, " FRU Power Supply AutoSwitch Supprt: %s\n", (autoswitch) ? "Yes" : "No"); pstdout_printf (state_data->pstate, " FRU Power Supply Hot Swap Support: %s\n", (hot_swap_support) ? "Yes" : "No"); if (peak_capacity != IPMI_FRU_PEAK_CAPACITY_UNSPECIFIED) pstdout_printf (state_data->pstate, " FRU Power Supply Peak Capacity: %u Watts\n", peak_capacity); else pstdout_printf (state_data->pstate, " FRU Power Supply Peak Capacity: unspecified\n", peak_capacity); pstdout_printf (state_data->pstate, " FRU Power Supply Hold Up Time: %u s\n", hold_up_time); pstdout_printf (state_data->pstate, " FRU Power Supply Voltage 1: %s\n", _voltage_str (voltage_1)); pstdout_printf (state_data->pstate, " FRU Power Supply Voltage 2: %s\n", _voltage_str (voltage_2)); pstdout_printf (state_data->pstate, " FRU Power Supply Total Combined Wattage: %u Watts\n", total_combined_wattage); return (0); } int ipmi_fru_output_dc_output (ipmi_fru_state_data_t *state_data, unsigned int area_type, const void *areabuf, unsigned int area_length) { unsigned int output_number; unsigned int standby; int nominal_voltage; int maximum_negative_voltage_deviation; int maximum_positive_voltage_deviation; unsigned int ripple_and_noise_pk_pk; unsigned int minimum_current_draw; unsigned int maximum_current_draw; assert (state_data); assert (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_OUTPUT || area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_OUTPUT); assert (areabuf); assert (area_length); if (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_OUTPUT) { if (ipmi_fru_multirecord_dc_output (state_data->fru_ctx, areabuf, area_length, &output_number, &standby, &nominal_voltage, &maximum_negative_voltage_deviation, &maximum_positive_voltage_deviation, &ripple_and_noise_pk_pk, &minimum_current_draw, &maximum_current_draw) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord DC Output Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_dc_output: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } } else { if (ipmi_fru_multirecord_extended_dc_output (state_data->fru_ctx, areabuf, area_length, &output_number, NULL, /* don't need the current_units */ &standby, &nominal_voltage, &maximum_negative_voltage_deviation, &maximum_positive_voltage_deviation, &ripple_and_noise_pk_pk, &minimum_current_draw, &maximum_current_draw) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Extended DC Output Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_extended_dc_output: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } } pstdout_printf (state_data->pstate, " FRU DC Output Output Number: %u\n", output_number); pstdout_printf (state_data->pstate, " FRU DC Output Output on Standy: %s\n", (standby) ? "Yes" : "No"); pstdout_printf (state_data->pstate, " FRU DC Output Nominal Voltage: %d mV\n", (int16_t)nominal_voltage); pstdout_printf (state_data->pstate, " FRU DC Output Maximum Negative Voltage Deviation: %d mV\n", (int16_t)maximum_negative_voltage_deviation); pstdout_printf (state_data->pstate, " FRU DC Output Maximum Positive Voltage Deviation: %d mV\n", (int16_t)maximum_positive_voltage_deviation); pstdout_printf (state_data->pstate, " FRU DC Output Ripple and Noise pk-pk: %u mV\n", ripple_and_noise_pk_pk); pstdout_printf (state_data->pstate, " FRU DC Output Minimum Current Draw: %u mA\n", minimum_current_draw); pstdout_printf (state_data->pstate, " FRU DC Output Maximum Current Draw: %u mA\n", maximum_current_draw); return (0); } int ipmi_fru_output_dc_load (ipmi_fru_state_data_t *state_data, unsigned int area_type, const void *areabuf, unsigned int area_length) { unsigned int output_number; unsigned int standby; int nominal_voltage; int specd_minimum_voltage; int specd_maximum_voltage; unsigned int specd_ripple_and_noise_pk_pk; unsigned int minimum_current_load; unsigned int maximum_current_load; assert (state_data); assert (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_LOAD || area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_EXTENDED_DC_LOAD); assert (areabuf); assert (area_length); if (area_type == IPMI_FRU_AREA_TYPE_MULTIRECORD_DC_LOAD) { if (ipmi_fru_multirecord_dc_load (state_data->fru_ctx, areabuf, area_length, &output_number, &standby, &nominal_voltage, &specd_minimum_voltage, &specd_maximum_voltage, &specd_ripple_and_noise_pk_pk, &minimum_current_load, &maximum_current_load) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord DC Load Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_dc_load: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } } else { if (ipmi_fru_multirecord_extended_dc_load (state_data->fru_ctx, areabuf, area_length, &output_number, NULL, /* don't need the current_units */ &standby, &nominal_voltage, &specd_minimum_voltage, &specd_maximum_voltage, &specd_ripple_and_noise_pk_pk, &minimum_current_load, &maximum_current_load) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Extended DC Load Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_extended_dc_load: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } } pstdout_printf (state_data->pstate, " FRU DC Load Output Number: %u\n", output_number); pstdout_printf (state_data->pstate, " FRU DC Load Nominal Voltage: %d mV\n", (int16_t)nominal_voltage); pstdout_printf (state_data->pstate, " FRU DC Load Spec'd Minimum Voltage: %d mV\n", (int16_t)specd_minimum_voltage); pstdout_printf (state_data->pstate, " FRU DC Load Spec'd Maximum Voltage: %d mV\n", (int16_t)specd_maximum_voltage); pstdout_printf (state_data->pstate, " FRU DC Load Spec'd Ripple and Noise pk-pk: %u mV\n", specd_ripple_and_noise_pk_pk); pstdout_printf (state_data->pstate, " FRU DC Load Minimum Current Load: %u mA\n", minimum_current_load); pstdout_printf (state_data->pstate, " FRU DC Load Maximum Current Load: %u mA\n", maximum_current_load); return (0); } int ipmi_fru_output_management_access_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint8_t sub_record_type; uint8_t sub_record_data[IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX + 1]; unsigned int sub_record_data_len = IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX; unsigned int i; assert (state_data); assert (areabuf); assert (area_length); memset (sub_record_data, '\0', IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX + 1); if (ipmi_fru_multirecord_management_access_record (state_data->fru_ctx, areabuf, area_length, &sub_record_type, sub_record_data, &sub_record_data_len) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Management Access Record Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_management_access_record: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_MANAGEMENT_URL) pstdout_printf (state_data->pstate, " FRU Management Access System Management URL: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_NAME) pstdout_printf (state_data->pstate, " FRU Management Access System Name: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_PING_ADDRESS) pstdout_printf (state_data->pstate, " FRU Management Access System Ping Address: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_MANAGEMENT_URL) pstdout_printf (state_data->pstate, " FRU Management Access Component Management URL: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_NAME) pstdout_printf (state_data->pstate, " FRU Management Access Component Name: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_COMPONENT_PING_ADDRESS) pstdout_printf (state_data->pstate, " FRU Management Access Component Ping Address: %s\n", (char *)sub_record_data); else if (sub_record_type == IPMI_FRU_SUB_RECORD_TYPE_SYSTEM_UNIQUE_ID) { pstdout_printf (state_data->pstate, " FRU Management Access System Unique ID:"); for (i = 0; i < sub_record_data_len; i++) { if (sub_record_data_len > 8 && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n "); pstdout_printf (state_data->pstate, " %02Xh", sub_record_data[i]); } pstdout_printf (state_data->pstate, "\n"); } else { pstdout_printf (state_data->pstate, " FRU Management Access Record: Unknown Sub Record Type:"); for (i = 0; i < sub_record_data_len; i++) { if (sub_record_data_len > 8 && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n "); pstdout_printf (state_data->pstate, " %02Xh", sub_record_data[i]); } pstdout_printf (state_data->pstate, "\n"); } return (0); } int ipmi_fru_output_base_compatibility_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint32_t manufacturer_id; unsigned int entity_id_code; unsigned int compatibility_base; unsigned int compatibility_code_start_value; uint8_t code_range_mask[IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX]; unsigned int code_range_mask_len = IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX; char iana_buf[IPMI_FRU_STR_BUFLEN + 1]; int ret; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_multirecord_base_compatibility_record (state_data->fru_ctx, areabuf, area_length, &manufacturer_id, &entity_id_code, &compatibility_base, &compatibility_code_start_value, code_range_mask, &code_range_mask_len) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Base Compatibility Record Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_base_compatibility_record: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } memset (iana_buf, '\0', IPMI_FRU_STR_BUFLEN + 1); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, IPMI_FRU_STR_BUFLEN); if (ret > 0) pstdout_printf (state_data->pstate, " FRU Base Compatibility Manufacturer ID: %s (%Xh)\n", iana_buf, manufacturer_id); else pstdout_printf (state_data->pstate, " FRU Base Compatibility Manufacturer ID: %Xh\n", manufacturer_id); pstdout_printf (state_data->pstate, " FRU Base Compatibility Entity ID: %Xh\n", entity_id_code); pstdout_printf (state_data->pstate, " FRU Base Compatibility Comptability Base: %Xh\n", compatibility_base); pstdout_printf (state_data->pstate, " FRU Base Compatibility Comptability Code Start Value: %Xh\n", compatibility_code_start_value); if (code_range_mask_len) { unsigned int i; pstdout_printf (state_data->pstate, " FRU Base Compatibility Code Mask:"); for (i = 0; i < code_range_mask_len; i++) { if (code_range_mask_len > 8 && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n "); pstdout_printf (state_data->pstate, " %02Xh", code_range_mask[i]); } pstdout_printf (state_data->pstate, "\n"); } return (0); } int ipmi_fru_output_extended_compatibility_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint32_t manufacturer_id; unsigned int entity_id_code; unsigned int compatibility_base; unsigned int compatibility_code_start_value; uint8_t code_range_mask[IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX]; unsigned int code_range_mask_len = IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX; char iana_buf[IPMI_FRU_STR_BUFLEN + 1]; int ret; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_multirecord_extended_compatibility_record (state_data->fru_ctx, areabuf, area_length, &manufacturer_id, &entity_id_code, &compatibility_base, &compatibility_code_start_value, code_range_mask, &code_range_mask_len) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord Extended Compatibility Record Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_extended_compatibility_record: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } memset (iana_buf, '\0', IPMI_FRU_STR_BUFLEN + 1); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, IPMI_FRU_STR_BUFLEN); if (ret > 0) pstdout_printf (state_data->pstate, " FRU Extended Compatibility Manufacturer ID: %s (%Xh)\n", iana_buf, manufacturer_id); else pstdout_printf (state_data->pstate, " FRU Extended Compatibility Manufacturer ID: %Xh\n", manufacturer_id); pstdout_printf (state_data->pstate, " FRU Extended Compatibility Entity ID: %Xh\n", entity_id_code); pstdout_printf (state_data->pstate, " FRU Extended Compatibility Comptability Base: %Xh\n", compatibility_base); pstdout_printf (state_data->pstate, " FRU Extended Compatibility Comptability Code Start Value: %Xh\n", compatibility_code_start_value); if (code_range_mask_len) { unsigned int i; pstdout_printf (state_data->pstate, " FRU Extended Compatibility Code Mask:"); for (i = 0; i < code_range_mask_len; i++) { if (code_range_mask_len > 8 && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n "); pstdout_printf (state_data->pstate, " %02Xh", code_range_mask[i]); } pstdout_printf (state_data->pstate, "\n"); } return (0); } int ipmi_fru_output_oem_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { uint32_t manufacturer_id; uint8_t oem_data[IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX]; unsigned int oem_data_len = IPMI_FRU_AREA_TYPE_LENGTH_FIELD_MAX; char iana_buf[IPMI_FRU_STR_BUFLEN + 1]; uint8_t record_type_id; int ret; assert (state_data); assert (areabuf); assert (area_length); if (ipmi_fru_multirecord_oem_record (state_data->fru_ctx, areabuf, area_length, &manufacturer_id, oem_data, &oem_data_len) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord OEM Record Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_oem_record: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } memset (iana_buf, '\0', IPMI_FRU_STR_BUFLEN + 1); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, IPMI_FRU_STR_BUFLEN); if (ret > 0) pstdout_printf (state_data->pstate, " FRU OEM Manufacturer ID: %s (%Xh)\n", iana_buf, manufacturer_id); else pstdout_printf (state_data->pstate, " FRU OEM Manufacturer ID: %Xh\n", manufacturer_id); if (state_data->prog_data->args->interpret_oem_data) { if (ipmi_fru_read_multirecord_record_type_id (state_data->fru_ctx, &record_type_id) < 0) { if (IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR (state_data->fru_ctx)) { pstdout_printf (state_data->pstate, " FRU Multirecord OEM Record Error: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (0); } pstdout_fprintf (state_data->pstate, stderr, "ipmi_fru_multirecord_oem_record: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); return (-1); } if (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON) { if ((ret = ipmi_fru_oem_wistron_oem_record (state_data, record_type_id, manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (0); } } if (oem_data_len) { unsigned int i; pstdout_printf (state_data->pstate, " FRU OEM Data:"); for (i = 0; i < oem_data_len; i++) { if (oem_data_len > 8 && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n "); pstdout_printf (state_data->pstate, " %02Xh", oem_data[i]); } pstdout_printf (state_data->pstate, "\n"); } return (0); } static int _ipmi_fru_output_dimm_ddr3 (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { fiid_obj_t obj_record = NULL; uint8_t total_sdram_capacity; char *total_sdram_capacity_str = NULL; uint32_t total_sdram_capacity_val = 0; uint8_t total_sdram_capacity_valid; uint8_t bank_address_bits; char *bank_address_bits_str = NULL; uint8_t module_minimum_nominal_voltage_1_5; uint8_t module_minimum_nominal_voltage_1_35; uint8_t module_minimum_nominal_voltage_1_25; uint8_t sdram_device_width; char *sdram_device_width_str = NULL; uint32_t sdram_device_width_val = 0; uint8_t sdram_device_width_valid; uint8_t number_of_ranks; char *number_of_ranks_str = NULL; uint32_t number_of_ranks_val = 0; uint8_t number_of_ranks_valid; uint8_t primary_bus_width; char *primary_bus_width_str = NULL; uint32_t primary_bus_width_val = 0; uint8_t primary_bus_width_valid; uint8_t bus_width_extension; char *bus_width_extension_str; uint32_t total_memory_capacity; char *total_memory_capacity_units_str = NULL; uint8_t die_count; char *die_count_str; uint8_t sdram_device_type; char *sdram_device_type_str; uint8_t number_of_continuation_codes_module_manufacturer; uint8_t last_non_zero_module_manufacturer; char *module_manufacturer_str; uint8_t module_manufacturing_date_year; uint8_t module_manufacturing_date_week; uint32_t module_serial_number; char module_part_number[IPMI_FRU_STR_BUFLEN + 1]; int module_part_number_len; uint16_t module_revision_code; uint8_t number_of_continuation_codes_dram_manufacturer; uint8_t last_non_zero_dram_manufacturer; char *dram_manufacturer_str; uint64_t val; int block_len; int rv = -1; assert (state_data); assert (areabuf); assert (area_length); if (!(obj_record = fiid_obj_create (tmpl_fru_dimm_spd_ddr3_record))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, area_length) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set_all: %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } if ((block_len = fiid_template_block_len_bytes (tmpl_fru_dimm_spd_ddr3_record, "spd_bytes_used", "last_non_zero_dram_manufacturer")) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_template_block_len_bytes: %s\n", strerror (errno)); goto cleanup; } if (area_length < block_len) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_strerror (IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID)); goto out; } if (FIID_OBJ_GET (obj_record, "total_sdram_capacity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_sdram_capacity': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } total_sdram_capacity = val; switch (total_sdram_capacity) { case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_256_MB: total_sdram_capacity_str = "256 Mb"; total_sdram_capacity_val = 256; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "MB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_512_MB: total_sdram_capacity_str = "512 Mb"; total_sdram_capacity_val = 512; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "MB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_1_GB: total_sdram_capacity_str = "1 Gb"; total_sdram_capacity_val = 1024; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_2_GB: total_sdram_capacity_str = "2 Gb"; total_sdram_capacity_val = 2048; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_4_GB: total_sdram_capacity_str = "4 Gb"; total_sdram_capacity_val = 4096; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_8_GB: total_sdram_capacity_str = "8 Gb"; total_sdram_capacity_val = 8192; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_TOTAL_SDRAM_CAPACITY_16_GB: total_sdram_capacity_str = "16 Gb"; total_sdram_capacity_val = 16384; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; default: total_sdram_capacity_str = "Unknown"; total_sdram_capacity_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Total SDRAM Capacity : %s\n", total_sdram_capacity_str); if (FIID_OBJ_GET (obj_record, "bank_address_bits", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bank_address_bits': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } bank_address_bits = val; switch (bank_address_bits) { case IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_3: bank_address_bits_str = "8 Banks"; break; case IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_4: bank_address_bits_str = "16 Banks"; break; case IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_5: bank_address_bits_str = "32 Banks"; break; case IPMI_FRU_DIMMSPD_BANK_ADDRESS_BITS_6: bank_address_bits_str = "64 Banks"; break; default: bank_address_bits_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Memory Banks : %s\n", bank_address_bits_str); if (FIID_OBJ_GET (obj_record, "module_minimum_nominal_voltage.1_5", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_minimum_nominal_voltage.1_5': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_minimum_nominal_voltage_1_5 = val; pstdout_printf (state_data->pstate, " FRU Module 1.5 V Nominal Voltage : %s\n", (module_minimum_nominal_voltage_1_5 == IPMI_FRU_DIMMSPD_VOLTAGE_1_5_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "module_minimum_nominal_voltage.1_35", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_minimum_nominal_voltage.1_35': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_minimum_nominal_voltage_1_35 = val; pstdout_printf (state_data->pstate, " FRU Module 1.35 V Nominal Voltage : %s\n", (module_minimum_nominal_voltage_1_35 == IPMI_FRU_DIMMSPD_VOLTAGE_1_35_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "module_minimum_nominal_voltage.1_25", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_minimum_nominal_voltage.1_25': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_minimum_nominal_voltage_1_25 = val; pstdout_printf (state_data->pstate, " FRU Module 1.25 V Nominal Voltage : %s\n", (module_minimum_nominal_voltage_1_25 == IPMI_FRU_DIMMSPD_VOLTAGE_1_25_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "sdram_device_width", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdram_device_width': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } sdram_device_width = val; switch (sdram_device_width) { case IPMI_FRU_DIMMSPD_DEVICE_WIDTH_4_BITS: sdram_device_width_str = "4 bits"; sdram_device_width_val = 4; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DEVICE_WIDTH_8_BITS: sdram_device_width_str = "8 bits"; sdram_device_width_val = 8; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DEVICE_WIDTH_16_BITS: sdram_device_width_str = "16 bits"; sdram_device_width_val = 16; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DEVICE_WIDTH_32_BITS: sdram_device_width_str = "32 bits"; sdram_device_width_val = 32; sdram_device_width_valid = 1; break; default: sdram_device_width_str = "Unknown"; sdram_device_width_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU SDRAM Device Width : %s\n", sdram_device_width_str); if (FIID_OBJ_GET (obj_record, "number_of_ranks", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_ranks': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_ranks = val; /* achu: Yeah, a lot of unnecessary code here, but gonna keep * code style pattern the same as the above. */ switch (number_of_ranks) { case IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_1: number_of_ranks_str = "1"; number_of_ranks_val = 1; number_of_ranks_valid = 1; break; case IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_2: number_of_ranks_str = "2"; number_of_ranks_val = 2; number_of_ranks_valid = 1; break; case IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_3: number_of_ranks_str = "3"; number_of_ranks_val = 3; number_of_ranks_valid = 1; break; case IPMI_FRU_DIMMSPD_NUMBER_OF_RANKS_4: number_of_ranks_str = "4"; number_of_ranks_val = 4; number_of_ranks_valid = 1; break; default: number_of_ranks_str = "Unknown"; number_of_ranks_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Number of Ranks : %s\n", number_of_ranks_str); if (FIID_OBJ_GET (obj_record, "primary_bus_width", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'primary_bus_width': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } primary_bus_width = val; switch (primary_bus_width) { case IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_8_BITS: primary_bus_width_str = "8 bits"; primary_bus_width_val = 8; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_16_BITS: primary_bus_width_str = "16 bits"; primary_bus_width_val = 16; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_32_BITS: primary_bus_width_str = "32 bits"; primary_bus_width_val = 32; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_PRIMARY_BUS_WIDTH_64_BITS: primary_bus_width_str = "64 bits"; primary_bus_width_val = 64; primary_bus_width_valid = 1; break; default: primary_bus_width_str = "Unknown"; primary_bus_width_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Primary Bus Width : %s\n", primary_bus_width_str); if (FIID_OBJ_GET (obj_record, "bus_width_extension", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bus_width_extension': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } bus_width_extension = val; switch (bus_width_extension) { case IPMI_FRU_DIMMSPD_BUS_WIDTH_EXTENSION_0_BITS: bus_width_extension_str = "0 bits"; break; case IPMI_FRU_DIMMSPD_BUS_WIDTH_EXTENSION_8_BITS: bus_width_extension_str = "8 bits"; break; default: bus_width_extension_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Bus Width Extension : %s\n", bus_width_extension_str); if (total_sdram_capacity_valid && sdram_device_width_valid && number_of_ranks_valid && primary_bus_width_valid) { /* Per JEDEC document, in section "Byte 8" * * SDRAM CAPCITY / 8 * PRIMARY BUS WIDTH / SDRAM WIDTH * RANKS */ total_memory_capacity = (total_sdram_capacity_val / 8) * (primary_bus_width_val / sdram_device_width_val) * number_of_ranks_val; pstdout_printf (state_data->pstate, " FRU Total Memory Capacity : %u %s\n", total_memory_capacity, total_memory_capacity_units_str); } else pstdout_printf (state_data->pstate, " FRU Total Memory Capacity : Unknown\n"); if (FIID_OBJ_GET (obj_record, "die_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'die_count': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } die_count = val; switch (die_count) { case IPMI_FRU_DIMMSPD_DIE_COUNT_NOT_SPECIFIED: die_count_str = "Not Specified"; break; case IPMI_FRU_DIMMSPD_DIE_COUNT_SINGLE_DIE: die_count_str = "Single die"; break; case IPMI_FRU_DIMMSPD_DIE_COUNT_2_DIE: die_count_str = "2 die"; break; case IPMI_FRU_DIMMSPD_DIE_COUNT_4_DIE: die_count_str = "4 die"; break; case IPMI_FRU_DIMMSPD_DIE_COUNT_8_DIE: die_count_str = "8 die"; break; default: die_count_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Die Count : %s\n", die_count_str); if (FIID_OBJ_GET (obj_record, "sdram_device_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdram_device_type': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } sdram_device_type = val; switch (sdram_device_type) { case IPMI_FRU_DIMMSPD_SDRAM_DEVICE_TYPE_STANDARD_MONOLITHIC_DRAM_DEVICE: sdram_device_type_str = "Standard Monolithic DRAM Device"; break; case IPMI_FRU_DIMMSPD_SDRAM_DEVICE_TYPE_NON_STANDARD_DEVICE: sdram_device_type_str = "Non-Standard Device"; break; default: sdram_device_type_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU SDRAM Device Type : %s\n", sdram_device_type_str); if (FIID_OBJ_GET (obj_record, "number_of_continuation_codes_module_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_continuation_codes_module_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_continuation_codes_module_manufacturer = val; if (FIID_OBJ_GET (obj_record, "last_non_zero_module_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'last_non_zero_module_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } last_non_zero_module_manufacturer = val; module_manufacturer_str = ipmi_jedec_manufacturer_id_search (number_of_continuation_codes_module_manufacturer, last_non_zero_module_manufacturer); if (module_manufacturer_str) pstdout_printf (state_data->pstate, " FRU Module Manufacturer : %s\n", module_manufacturer_str); else pstdout_printf (state_data->pstate, " FRU Module Manufacturer : Unrecognized\n"); if (FIID_OBJ_GET (obj_record, "module_manufacturing_date.year", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_manufacturing_date.year': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_manufacturing_date_year = val; if (FIID_OBJ_GET (obj_record, "module_manufacturing_date.week", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_manufacturing_date.week': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_manufacturing_date_week = val; pstdout_printf (state_data->pstate, " FRU Module Manufacturing Date : Year 20%02X Week %02X\n", module_manufacturing_date_year, module_manufacturing_date_week); if (FIID_OBJ_GET (obj_record, "module_serial_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_serial_number': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_serial_number = val; /* Serial number stored little endian, so output in that order */ pstdout_printf (state_data->pstate, " FRU Module Serial Number : %02X%02X%02X%02X\n", module_serial_number & 0x000000FF, (module_serial_number & 0x0000FF00) >> 8, (module_serial_number & 0x00FF0000) >> 16, (module_serial_number & 0xFF000000) >> 24); memset (module_part_number, '\0', IPMI_FRU_STR_BUFLEN + 1); if ((module_part_number_len = fiid_obj_get_data (obj_record, "module_part_number", module_part_number, IPMI_FRU_STR_BUFLEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'module_part_number': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } pstdout_printf (state_data->pstate, " FRU Module Part Number : %s\n", module_part_number); if (FIID_OBJ_GET (obj_record, "module_revision_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_revision_code': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_revision_code = val; /* Revision Code vendor defined, so just output hex */ pstdout_printf (state_data->pstate, " FRU Module Revision Code : 0x%04X\n", module_revision_code); if (FIID_OBJ_GET (obj_record, "number_of_continuation_codes_dram_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_continuation_codes_dram_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_continuation_codes_dram_manufacturer = val; if (FIID_OBJ_GET (obj_record, "last_non_zero_dram_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'last_non_zero_dram_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } last_non_zero_dram_manufacturer = val; dram_manufacturer_str = ipmi_jedec_manufacturer_id_search (number_of_continuation_codes_dram_manufacturer, last_non_zero_dram_manufacturer); if (dram_manufacturer_str) pstdout_printf (state_data->pstate, " FRU DRAM Manufacturer : %s\n", dram_manufacturer_str); else pstdout_printf (state_data->pstate, " FRU DRAM Manufacturer : Unrecognized\n"); out: rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } static int _ipmi_fru_output_dimm_ddr4 (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { fiid_obj_t obj_record = NULL; uint8_t total_sdram_capacity; char *total_sdram_capacity_str = NULL; uint32_t total_sdram_capacity_val = 0; uint8_t total_sdram_capacity_valid; uint8_t bank_address_bits; char *bank_address_bits_str = NULL; uint8_t bank_group_bits; char *bank_group_bits_str = NULL; uint8_t die_count; char *die_count_str; uint8_t sdram_package_type; char *sdram_package_type_str; uint8_t module_nominal_voltage_1_2; uint8_t module_nominal_voltage_TBD1; uint8_t module_nominal_voltage_TBD2; uint8_t sdram_device_width; char *sdram_device_width_str = NULL; uint32_t sdram_device_width_val = 0; uint8_t sdram_device_width_valid; uint8_t number_of_package_ranks_per_dimm; char *number_of_package_ranks_per_dimm_str = NULL; uint32_t number_of_package_ranks_per_dimm_val = 0; uint8_t number_of_package_ranks_per_dimm_valid; uint8_t primary_bus_width; char *primary_bus_width_str = NULL; uint32_t primary_bus_width_val = 0; uint8_t primary_bus_width_valid; uint8_t bus_width_extension; char *bus_width_extension_str; uint32_t total_memory_capacity; char *total_memory_capacity_units_str = NULL; uint8_t number_of_continuation_codes_module_manufacturer; uint8_t last_non_zero_module_manufacturer; char *module_manufacturer_str; uint8_t module_manufacturing_date_year; uint8_t module_manufacturing_date_week; uint32_t module_serial_number; char module_part_number[IPMI_FRU_STR_BUFLEN + 1]; int module_part_number_len; uint16_t module_revision_code; uint8_t number_of_continuation_codes_dram_manufacturer; uint8_t last_non_zero_dram_manufacturer; char *dram_manufacturer_str; uint8_t dram_stepping; uint64_t val; int block_len; int rv = -1; assert (state_data); assert (areabuf); assert (area_length); if (!(obj_record = fiid_obj_create (tmpl_fru_dimm_spd_ddr4_record))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, area_length) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set_all: %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } if ((block_len = fiid_template_block_len_bytes (tmpl_fru_dimm_spd_ddr4_record, "spd_bytes_used", "dram_stepping")) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_template_block_len_bytes: %s\n", strerror (errno)); goto cleanup; } if (area_length < block_len) { pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, " FRU Error: %s\n", ipmi_fru_ctx_strerror (IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID)); goto out; } if (FIID_OBJ_GET (obj_record, "total_sdram_capacity", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'total_sdram_capacity': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } total_sdram_capacity = val; switch (total_sdram_capacity) { case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_256_MB: total_sdram_capacity_str = "256 Mb"; total_sdram_capacity_val = 256; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "MB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_512_MB: total_sdram_capacity_str = "512 Mb"; total_sdram_capacity_val = 512; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "MB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_1_GB: total_sdram_capacity_str = "1 Gb"; total_sdram_capacity_val = 1024; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_2_GB: total_sdram_capacity_str = "2 Gb"; total_sdram_capacity_val = 2048; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_4_GB: total_sdram_capacity_str = "4 Gb"; total_sdram_capacity_val = 4096; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_8_GB: total_sdram_capacity_str = "8 Gb"; total_sdram_capacity_val = 8192; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_16_GB: total_sdram_capacity_str = "16 Gb"; total_sdram_capacity_val = 16384; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; case IPMI_FRU_DIMMSPD_DDR4_TOTAL_SDRAM_CAPACITY_32_GB: total_sdram_capacity_str = "32 Gb"; total_sdram_capacity_val = 32768; total_sdram_capacity_valid = 1; total_memory_capacity_units_str = "GB"; break; default: total_sdram_capacity_str = "Unknown"; total_sdram_capacity_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Total SDRAM Capacity : %s\n", total_sdram_capacity_str); if (FIID_OBJ_GET (obj_record, "bank_address_bits", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bank_address_bits': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } bank_address_bits = val; switch (bank_address_bits) { case IPMI_FRU_DIMMSPD_DDR4_BANK_ADDRESS_BITS_2: bank_address_bits_str = "4 Banks"; break; case IPMI_FRU_DIMMSPD_DDR4_BANK_ADDRESS_BITS_3: bank_address_bits_str = "8 Banks"; break; default: bank_address_bits_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Memory Banks : %s\n", bank_address_bits_str); if (FIID_OBJ_GET (obj_record, "bank_group_bits", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bank_group_bits': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } bank_group_bits = val; switch (bank_group_bits) { case IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_0: bank_group_bits_str = "0 bank groups"; break; case IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_1: bank_group_bits_str = "2 bank groups"; break; case IPMI_FRU_DIMMSPD_DDR4_BANK_GROUP_BITS_2: bank_group_bits_str = "4 bank groups"; break; default: bank_group_bits_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Memory Bank Groups : %s\n", bank_group_bits_str); if (FIID_OBJ_GET (obj_record, "die_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'die_count': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } die_count = val; switch (die_count) { case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_SINGLE_DIE: die_count_str = "Single die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_2_DIE: die_count_str = "2 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_3_DIE: die_count_str = "3 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_4_DIE: die_count_str = "4 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_5_DIE: die_count_str = "5 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_6_DIE: die_count_str = "6 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_7_DIE: die_count_str = "7 die"; break; case IPMI_FRU_DIMMSPD_DDR4_DIE_COUNT_8_DIE: die_count_str = "8 die"; break; default: die_count_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Die Count : %s\n", die_count_str); if (FIID_OBJ_GET (obj_record, "sdram_package_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdram_package_type': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } sdram_package_type = val; switch (sdram_package_type) { case IPMI_FRU_DIMMSPD_DDR4_SDRAM_PACKAGE_TYPE_MONOLITHIC_DRAM_DEVICE: sdram_package_type_str = "Monolithic DRAM Device"; break; case IPMI_FRU_DIMMSPD_DDR4_SDRAM_PACKAGE_TYPE_NON_MONOLITHIC_DRAM_DEVICE: sdram_package_type_str = "Non-Monolithic Device"; break; default: sdram_package_type_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU SDRAM Package Type : %s\n", sdram_package_type_str); if (FIID_OBJ_GET (obj_record, "module_nominal_voltage.dram_vdd.1_2_operable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_nominal_voltage.dram_vdd.1_2_operable': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_nominal_voltage_1_2 = val; pstdout_printf (state_data->pstate, " FRU Module Nominal Voltage 1.2 V : %s\n", (module_nominal_voltage_1_2 == IPMI_FRU_DIMMSPD_DDR4_VDD_1_2_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "module_nominal_voltage.dram_vdd.TBD1_operable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_nominal_voltage.dram_vdd.TBD1_operable': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_nominal_voltage_TBD1 = val; pstdout_printf (state_data->pstate, " FRU Module Nominal Voltage TBD1 V : %s\n", (module_nominal_voltage_TBD1 == IPMI_FRU_DIMMSPD_DDR4_VDD_TBD1_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "module_nominal_voltage.dram_vdd.TBD2_operable", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_nominal_voltage.dram_vdd.TBD2_operable': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_nominal_voltage_TBD2 = val; pstdout_printf (state_data->pstate, " FRU Module Nominal Voltage TBD2 V : %s\n", (module_nominal_voltage_TBD2 == IPMI_FRU_DIMMSPD_DDR4_VDD_TBD2_OPERABLE) ? "Operable" : "Not Operable"); if (FIID_OBJ_GET (obj_record, "sdram_device_width", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdram_device_width': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } sdram_device_width = val; switch (sdram_device_width) { case IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_4_BITS: sdram_device_width_str = "4 bits"; sdram_device_width_val = 4; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_8_BITS: sdram_device_width_str = "8 bits"; sdram_device_width_val = 8; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_16_BITS: sdram_device_width_str = "16 bits"; sdram_device_width_val = 16; sdram_device_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_DEVICE_WIDTH_32_BITS: sdram_device_width_str = "32 bits"; sdram_device_width_val = 32; sdram_device_width_valid = 1; break; default: sdram_device_width_str = "Unknown"; sdram_device_width_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU SDRAM Device Width : %s\n", sdram_device_width_str); if (FIID_OBJ_GET (obj_record, "number_of_package_ranks_per_dimm", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_package_ranks_per_dimm': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_package_ranks_per_dimm = val; /* achu: Yeah, a lot of unnecessary code here, but gonna keep * code style pattern the same as the above. */ switch (number_of_package_ranks_per_dimm) { case IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_1: number_of_package_ranks_per_dimm_str = "1"; number_of_package_ranks_per_dimm_val = 1; number_of_package_ranks_per_dimm_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_2: number_of_package_ranks_per_dimm_str = "2"; number_of_package_ranks_per_dimm_val = 2; number_of_package_ranks_per_dimm_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_3: number_of_package_ranks_per_dimm_str = "3"; number_of_package_ranks_per_dimm_val = 3; number_of_package_ranks_per_dimm_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_NUMBER_OF_PACKAGE_RANKS_4: number_of_package_ranks_per_dimm_str = "4"; number_of_package_ranks_per_dimm_val = 4; number_of_package_ranks_per_dimm_valid = 1; break; default: number_of_package_ranks_per_dimm_str = "Unknown"; number_of_package_ranks_per_dimm_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Number of Package Ranks : %s\n", number_of_package_ranks_per_dimm_str); if (FIID_OBJ_GET (obj_record, "primary_bus_width", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'primary_bus_width': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } primary_bus_width = val; switch (primary_bus_width) { case IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_8_BITS: primary_bus_width_str = "8 bits"; primary_bus_width_val = 8; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_16_BITS: primary_bus_width_str = "16 bits"; primary_bus_width_val = 16; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_32_BITS: primary_bus_width_str = "32 bits"; primary_bus_width_val = 32; primary_bus_width_valid = 1; break; case IPMI_FRU_DIMMSPD_DDR4_PRIMARY_BUS_WIDTH_64_BITS: primary_bus_width_str = "64 bits"; primary_bus_width_val = 64; primary_bus_width_valid = 1; break; default: primary_bus_width_str = "Unknown"; primary_bus_width_valid = 0; break; } pstdout_printf (state_data->pstate, " FRU Primary Bus Width : %s\n", primary_bus_width_str); if (FIID_OBJ_GET (obj_record, "bus_width_extension", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'bus_width_extension': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } bus_width_extension = val; switch (bus_width_extension) { case IPMI_FRU_DIMMSPD_DDR4_BUS_WIDTH_EXTENSION_0_BITS: bus_width_extension_str = "0 bits"; break; case IPMI_FRU_DIMMSPD_DDR4_BUS_WIDTH_EXTENSION_8_BITS: bus_width_extension_str = "8 bits"; break; default: bus_width_extension_str = "Unknown"; break; } pstdout_printf (state_data->pstate, " FRU Bus Width Extension : %s\n", bus_width_extension_str); if (total_sdram_capacity_valid && sdram_device_width_valid && number_of_package_ranks_per_dimm_valid && primary_bus_width_valid) { /* Per JEDEC document, in section "Byte 8" * * SDRAM CAPCITY / 8 * PRIMARY BUS WIDTH / SDRAM WIDTH * RANKS */ total_memory_capacity = (total_sdram_capacity_val / 8) * (primary_bus_width_val / sdram_device_width_val) * number_of_package_ranks_per_dimm_val; pstdout_printf (state_data->pstate, " FRU Total Memory Capacity : %u %s\n", total_memory_capacity, total_memory_capacity_units_str); } else pstdout_printf (state_data->pstate, " FRU Total Memory Capacity : Unknown\n"); if (FIID_OBJ_GET (obj_record, "number_of_continuation_codes_module_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_continuation_codes_module_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_continuation_codes_module_manufacturer = val; if (FIID_OBJ_GET (obj_record, "last_non_zero_module_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'last_non_zero_module_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } last_non_zero_module_manufacturer = val; module_manufacturer_str = ipmi_jedec_manufacturer_id_search (number_of_continuation_codes_module_manufacturer, last_non_zero_module_manufacturer); if (module_manufacturer_str) pstdout_printf (state_data->pstate, " FRU Module Manufacturer : %s\n", module_manufacturer_str); else pstdout_printf (state_data->pstate, " FRU Module Manufacturer : Unrecognized\n"); if (FIID_OBJ_GET (obj_record, "module_manufacturing_date.year", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_manufacturing_date.year': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_manufacturing_date_year = val; if (FIID_OBJ_GET (obj_record, "module_manufacturing_date.week", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_manufacturing_date.week': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_manufacturing_date_week = val; pstdout_printf (state_data->pstate, " FRU Module Manufacturing Date : Year 20%02X Week %02X\n", module_manufacturing_date_year, module_manufacturing_date_week); if (FIID_OBJ_GET (obj_record, "module_serial_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_serial_number': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_serial_number = val; /* Serial number stored little endian, so output in that order */ pstdout_printf (state_data->pstate, " FRU Module Serial Number : %02X%02X%02X%02X\n", module_serial_number & 0x000000FF, (module_serial_number & 0x0000FF00) >> 8, (module_serial_number & 0x00FF0000) >> 16, (module_serial_number & 0xFF000000) >> 24); memset (module_part_number, '\0', IPMI_FRU_STR_BUFLEN + 1); if ((module_part_number_len = fiid_obj_get_data (obj_record, "module_part_number", module_part_number, IPMI_FRU_STR_BUFLEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'module_part_number': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } pstdout_printf (state_data->pstate, " FRU Module Part Number : %s\n", module_part_number); if (FIID_OBJ_GET (obj_record, "module_revision_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'module_revision_code': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } module_revision_code = val; /* Revision Code vendor defined, so just output hex */ pstdout_printf (state_data->pstate, " FRU Module Revision Code : 0x%04X\n", module_revision_code); if (FIID_OBJ_GET (obj_record, "number_of_continuation_codes_dram_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_continuation_codes_dram_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } number_of_continuation_codes_dram_manufacturer = val; if (FIID_OBJ_GET (obj_record, "last_non_zero_dram_manufacturer", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'last_non_zero_dram_manufacturer': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } last_non_zero_dram_manufacturer = val; dram_manufacturer_str = ipmi_jedec_manufacturer_id_search (number_of_continuation_codes_dram_manufacturer, last_non_zero_dram_manufacturer); if (dram_manufacturer_str) pstdout_printf (state_data->pstate, " FRU DRAM Manufacturer : %s\n", dram_manufacturer_str); else pstdout_printf (state_data->pstate, " FRU DRAM Manufacturer : Unrecognized\n"); if (FIID_OBJ_GET (obj_record, "dram_stepping", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dram_stepping': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } dram_stepping = val; /* Revision Code vendor defined, so just output hex */ pstdout_printf (state_data->pstate, " FRU Dram Stepping : 0x%02X\n", dram_stepping); out: rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } int ipmi_fru_output_dimm (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length) { fiid_obj_t obj_record = NULL; uint8_t dram_device_type; char *dram_device_type_str = NULL; uint64_t val; int rv = -1; assert (state_data); assert (areabuf); assert (area_length); if (!(obj_record = fiid_obj_create (tmpl_fru_dimm_spd_ddr_header))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (fiid_obj_set_all (obj_record, areabuf, area_length) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set_all: %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } if (FIID_OBJ_GET (obj_record, "dram_device_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'dram_device_type': %s\n", fiid_obj_errormsg (obj_record)); goto cleanup; } dram_device_type = val; switch (dram_device_type) { case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_STANDARD_FPM_DRAM: dram_device_type_str = "Standard FPM DRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_EDO: dram_device_type_str = "EDO"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_PIPELINED_NIBBLE: dram_device_type_str = "Pipelined Nibble"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_SDRAM: dram_device_type_str = "SDRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_ROM: dram_device_type_str = "ROM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR_SGRAM: dram_device_type_str = "DDR SGRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR_SDRAM: dram_device_type_str = "DDR SDRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM: dram_device_type_str = "DDR2 SDRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM_FB_DIMM: dram_device_type_str = "DDR2 SDRAM FB-DIMM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR2_SDRAM_FB_DIMM_PROBE: dram_device_type_str = "DDR2 SDRAM FB-DIMM PROBE"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR3_SDRAM: dram_device_type_str = "DDR3 SDRAM"; break; case IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR4_SDRAM: dram_device_type_str = "DDR4 SDRAM"; break; default: dram_device_type_str = "Unrecognized"; break; } pstdout_printf (state_data->pstate, " FRU DRAM Device Type: %s\n", dram_device_type_str); if (dram_device_type == IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR3_SDRAM) { if (_ipmi_fru_output_dimm_ddr3 (state_data, areabuf, area_length) < 0) goto cleanup; } else if (dram_device_type == IPMI_FRU_DIMMSPD_DRAM_DEVICE_TYPE_DDR4_SDRAM) { if (_ipmi_fru_output_dimm_ddr4 (state_data, areabuf, area_length) < 0) goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_record); return (rv); } freeipmi-1.6.4/ipmi-fru/ipmi-fru-output.h0000644002055400205540000001256413527331635020261 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmi-fru-output.h,v 1.5 2010-02-08 22:20:58 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-232183 * * This file is part of Ipmi-fru, a tool used for retrieving * motherboard field replaceable unit (FRU) information. For details, * see http://www.llnl.gov/linux/. * * Ipmi-fru is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmi-fru is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmi-fru. If not, see . \*****************************************************************************/ #ifndef IPMI_FRU_OUTPUT_H #define IPMI_FRU_OUTPUT_H #include #include "ipmi-fru_.h" #define IPMI_FRU_ERRNUM_IS_NON_FATAL_ERROR(__ipmi_fru_ctx) \ ((ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_NO_FRU_INFORMATION \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_FRU_AREA_LENGTH_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_COMMON_HEADER_CHECKSUM_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_CHASSIS_INFO_AREA_CHECKSUM_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_BOARD_INFO_AREA_CHECKSUM_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_PRODUCT_INFO_AREA_CHECKSUM_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_MULTIRECORD_AREA_CHECKSUM_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_COMMON_HEADER_FORMAT_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_CHASSIS_INFO_AREA_FORMAT_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_BOARD_INFO_AREA_FORMAT_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_PRODUCT_INFO_AREA_FORMAT_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_MULTIRECORD_AREA_FORMAT_INVALID \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_FRU_LANGUAGE_CODE_NOT_SUPPORTED \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_FRU_INVALID_BCD_ENCODING \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_FRU_SENTINEL_VALUE_NOT_FOUND \ || ipmi_fru_ctx_errnum ((__ipmi_fru_ctx)) == IPMI_FRU_ERR_DEVICE_BUSY) ? 1 : 0) int ipmi_fru_output_chassis_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_board_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_product_info_area (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_power_supply_information (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_dc_output (ipmi_fru_state_data_t *state_data, unsigned int area_type, const void *areabuf, unsigned int area_length); int ipmi_fru_output_dc_load (ipmi_fru_state_data_t *state_data, unsigned int area_type, const void *areabuf, unsigned int area_length); int ipmi_fru_output_management_access_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_base_compatibility_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_extended_compatibility_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_oem_record (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); int ipmi_fru_output_dimm (ipmi_fru_state_data_t *state_data, const void *areabuf, unsigned int area_length); #endif /* IPMI_FRU_OUTPUT_H */ freeipmi-1.6.4/ipmi-oem/0000755002055400205540000000000013527342547015002 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-oem/Makefile.in0000644002055400205540000015723113527342444017054 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-oem$(EXEEXT) subdir = ipmi-oem DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_oem_OBJECTS = ipmi_oem-ipmi-oem.$(OBJEXT) \ ipmi_oem-ipmi-oem-argp.$(OBJEXT) \ ipmi_oem-ipmi-oem-common.$(OBJEXT) \ ipmi_oem-ipmi-oem-dell.$(OBJEXT) \ ipmi_oem-ipmi-oem-fujitsu.$(OBJEXT) \ ipmi_oem-ipmi-oem-gigabyte.$(OBJEXT) \ ipmi_oem-ipmi-oem-ibm.$(OBJEXT) \ ipmi_oem-ipmi-oem-intel.$(OBJEXT) \ ipmi_oem-ipmi-oem-intelnm.$(OBJEXT) \ ipmi_oem-ipmi-oem-inventec.$(OBJEXT) \ ipmi_oem-ipmi-oem-quanta.$(OBJEXT) \ ipmi_oem-ipmi-oem-sun.$(OBJEXT) \ ipmi_oem-ipmi-oem-supermicro.$(OBJEXT) \ ipmi_oem-ipmi-oem-thirdparty.$(OBJEXT) \ ipmi_oem-ipmi-oem-wistron.$(OBJEXT) ipmi_oem_OBJECTS = $(am_ipmi_oem_OBJECTS) ipmi_oem_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_oem_SOURCES) DIST_SOURCES = $(ipmi_oem_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_oem_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_oem_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_oem_SOURCES = \ ipmi-oem.c \ ipmi-oem.h \ ipmi-oem-argp.c \ ipmi-oem-argp.h \ ipmi-oem-common.c \ ipmi-oem-common.h \ ipmi-oem-dell.c \ ipmi-oem-dell.h \ ipmi-oem-fujitsu.c \ ipmi-oem-fujitsu.h \ ipmi-oem-gigabyte.c \ ipmi-oem-gigabyte.h \ ipmi-oem-ibm.c \ ipmi-oem-ibm.h \ ipmi-oem-intel.c \ ipmi-oem-intel.h \ ipmi-oem-intelnm.c \ ipmi-oem-intelnm.h \ ipmi-oem-inventec.c \ ipmi-oem-inventec.h \ ipmi-oem-quanta.c \ ipmi-oem-quanta.h \ ipmi-oem-sun.c \ ipmi-oem-sun.h \ ipmi-oem-supermicro.c \ ipmi-oem-supermicro.h \ ipmi-oem-thirdparty.c \ ipmi-oem-thirdparty.h \ ipmi-oem-wistron.c \ ipmi-oem-wistron.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-oem/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-oem/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-oem$(EXEEXT): $(ipmi_oem_OBJECTS) $(ipmi_oem_DEPENDENCIES) $(EXTRA_ipmi_oem_DEPENDENCIES) @rm -f ipmi-oem$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_oem_OBJECTS) $(ipmi_oem_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-dell.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-intel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-sun.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_oem-ipmi-oem.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_oem-ipmi-oem.o: ipmi-oem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem.Tpo -c -o ipmi_oem-ipmi-oem.o `test -f 'ipmi-oem.c' || echo '$(srcdir)/'`ipmi-oem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem.c' object='ipmi_oem-ipmi-oem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem.o `test -f 'ipmi-oem.c' || echo '$(srcdir)/'`ipmi-oem.c ipmi_oem-ipmi-oem.obj: ipmi-oem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem.Tpo -c -o ipmi_oem-ipmi-oem.obj `if test -f 'ipmi-oem.c'; then $(CYGPATH_W) 'ipmi-oem.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem.c' object='ipmi_oem-ipmi-oem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem.obj `if test -f 'ipmi-oem.c'; then $(CYGPATH_W) 'ipmi-oem.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem.c'; fi` ipmi_oem-ipmi-oem-argp.o: ipmi-oem-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-argp.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Tpo -c -o ipmi_oem-ipmi-oem-argp.o `test -f 'ipmi-oem-argp.c' || echo '$(srcdir)/'`ipmi-oem-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-argp.c' object='ipmi_oem-ipmi-oem-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-argp.o `test -f 'ipmi-oem-argp.c' || echo '$(srcdir)/'`ipmi-oem-argp.c ipmi_oem-ipmi-oem-argp.obj: ipmi-oem-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Tpo -c -o ipmi_oem-ipmi-oem-argp.obj `if test -f 'ipmi-oem-argp.c'; then $(CYGPATH_W) 'ipmi-oem-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-argp.c' object='ipmi_oem-ipmi-oem-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-argp.obj `if test -f 'ipmi-oem-argp.c'; then $(CYGPATH_W) 'ipmi-oem-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-argp.c'; fi` ipmi_oem-ipmi-oem-common.o: ipmi-oem-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-common.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-common.Tpo -c -o ipmi_oem-ipmi-oem-common.o `test -f 'ipmi-oem-common.c' || echo '$(srcdir)/'`ipmi-oem-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-common.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-common.c' object='ipmi_oem-ipmi-oem-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-common.o `test -f 'ipmi-oem-common.c' || echo '$(srcdir)/'`ipmi-oem-common.c ipmi_oem-ipmi-oem-common.obj: ipmi-oem-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-common.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-common.Tpo -c -o ipmi_oem-ipmi-oem-common.obj `if test -f 'ipmi-oem-common.c'; then $(CYGPATH_W) 'ipmi-oem-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-common.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-common.c' object='ipmi_oem-ipmi-oem-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-common.obj `if test -f 'ipmi-oem-common.c'; then $(CYGPATH_W) 'ipmi-oem-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-common.c'; fi` ipmi_oem-ipmi-oem-dell.o: ipmi-oem-dell.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-dell.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Tpo -c -o ipmi_oem-ipmi-oem-dell.o `test -f 'ipmi-oem-dell.c' || echo '$(srcdir)/'`ipmi-oem-dell.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-dell.c' object='ipmi_oem-ipmi-oem-dell.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-dell.o `test -f 'ipmi-oem-dell.c' || echo '$(srcdir)/'`ipmi-oem-dell.c ipmi_oem-ipmi-oem-dell.obj: ipmi-oem-dell.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-dell.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Tpo -c -o ipmi_oem-ipmi-oem-dell.obj `if test -f 'ipmi-oem-dell.c'; then $(CYGPATH_W) 'ipmi-oem-dell.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-dell.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-dell.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-dell.c' object='ipmi_oem-ipmi-oem-dell.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-dell.obj `if test -f 'ipmi-oem-dell.c'; then $(CYGPATH_W) 'ipmi-oem-dell.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-dell.c'; fi` ipmi_oem-ipmi-oem-fujitsu.o: ipmi-oem-fujitsu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-fujitsu.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Tpo -c -o ipmi_oem-ipmi-oem-fujitsu.o `test -f 'ipmi-oem-fujitsu.c' || echo '$(srcdir)/'`ipmi-oem-fujitsu.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-fujitsu.c' object='ipmi_oem-ipmi-oem-fujitsu.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-fujitsu.o `test -f 'ipmi-oem-fujitsu.c' || echo '$(srcdir)/'`ipmi-oem-fujitsu.c ipmi_oem-ipmi-oem-fujitsu.obj: ipmi-oem-fujitsu.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-fujitsu.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Tpo -c -o ipmi_oem-ipmi-oem-fujitsu.obj `if test -f 'ipmi-oem-fujitsu.c'; then $(CYGPATH_W) 'ipmi-oem-fujitsu.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-fujitsu.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-fujitsu.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-fujitsu.c' object='ipmi_oem-ipmi-oem-fujitsu.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-fujitsu.obj `if test -f 'ipmi-oem-fujitsu.c'; then $(CYGPATH_W) 'ipmi-oem-fujitsu.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-fujitsu.c'; fi` ipmi_oem-ipmi-oem-gigabyte.o: ipmi-oem-gigabyte.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-gigabyte.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Tpo -c -o ipmi_oem-ipmi-oem-gigabyte.o `test -f 'ipmi-oem-gigabyte.c' || echo '$(srcdir)/'`ipmi-oem-gigabyte.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-gigabyte.c' object='ipmi_oem-ipmi-oem-gigabyte.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-gigabyte.o `test -f 'ipmi-oem-gigabyte.c' || echo '$(srcdir)/'`ipmi-oem-gigabyte.c ipmi_oem-ipmi-oem-gigabyte.obj: ipmi-oem-gigabyte.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-gigabyte.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Tpo -c -o ipmi_oem-ipmi-oem-gigabyte.obj `if test -f 'ipmi-oem-gigabyte.c'; then $(CYGPATH_W) 'ipmi-oem-gigabyte.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-gigabyte.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-gigabyte.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-gigabyte.c' object='ipmi_oem-ipmi-oem-gigabyte.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-gigabyte.obj `if test -f 'ipmi-oem-gigabyte.c'; then $(CYGPATH_W) 'ipmi-oem-gigabyte.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-gigabyte.c'; fi` ipmi_oem-ipmi-oem-ibm.o: ipmi-oem-ibm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-ibm.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Tpo -c -o ipmi_oem-ipmi-oem-ibm.o `test -f 'ipmi-oem-ibm.c' || echo '$(srcdir)/'`ipmi-oem-ibm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-ibm.c' object='ipmi_oem-ipmi-oem-ibm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-ibm.o `test -f 'ipmi-oem-ibm.c' || echo '$(srcdir)/'`ipmi-oem-ibm.c ipmi_oem-ipmi-oem-ibm.obj: ipmi-oem-ibm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-ibm.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Tpo -c -o ipmi_oem-ipmi-oem-ibm.obj `if test -f 'ipmi-oem-ibm.c'; then $(CYGPATH_W) 'ipmi-oem-ibm.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-ibm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-ibm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-ibm.c' object='ipmi_oem-ipmi-oem-ibm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-ibm.obj `if test -f 'ipmi-oem-ibm.c'; then $(CYGPATH_W) 'ipmi-oem-ibm.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-ibm.c'; fi` ipmi_oem-ipmi-oem-intel.o: ipmi-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-intel.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Tpo -c -o ipmi_oem-ipmi-oem-intel.o `test -f 'ipmi-oem-intel.c' || echo '$(srcdir)/'`ipmi-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-intel.c' object='ipmi_oem-ipmi-oem-intel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-intel.o `test -f 'ipmi-oem-intel.c' || echo '$(srcdir)/'`ipmi-oem-intel.c ipmi_oem-ipmi-oem-intel.obj: ipmi-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-intel.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Tpo -c -o ipmi_oem-ipmi-oem-intel.obj `if test -f 'ipmi-oem-intel.c'; then $(CYGPATH_W) 'ipmi-oem-intel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-intel.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-intel.c' object='ipmi_oem-ipmi-oem-intel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-intel.obj `if test -f 'ipmi-oem-intel.c'; then $(CYGPATH_W) 'ipmi-oem-intel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-intel.c'; fi` ipmi_oem-ipmi-oem-intelnm.o: ipmi-oem-intelnm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-intelnm.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Tpo -c -o ipmi_oem-ipmi-oem-intelnm.o `test -f 'ipmi-oem-intelnm.c' || echo '$(srcdir)/'`ipmi-oem-intelnm.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-intelnm.c' object='ipmi_oem-ipmi-oem-intelnm.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-intelnm.o `test -f 'ipmi-oem-intelnm.c' || echo '$(srcdir)/'`ipmi-oem-intelnm.c ipmi_oem-ipmi-oem-intelnm.obj: ipmi-oem-intelnm.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-intelnm.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Tpo -c -o ipmi_oem-ipmi-oem-intelnm.obj `if test -f 'ipmi-oem-intelnm.c'; then $(CYGPATH_W) 'ipmi-oem-intelnm.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-intelnm.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-intelnm.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-intelnm.c' object='ipmi_oem-ipmi-oem-intelnm.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-intelnm.obj `if test -f 'ipmi-oem-intelnm.c'; then $(CYGPATH_W) 'ipmi-oem-intelnm.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-intelnm.c'; fi` ipmi_oem-ipmi-oem-inventec.o: ipmi-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-inventec.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Tpo -c -o ipmi_oem-ipmi-oem-inventec.o `test -f 'ipmi-oem-inventec.c' || echo '$(srcdir)/'`ipmi-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-inventec.c' object='ipmi_oem-ipmi-oem-inventec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-inventec.o `test -f 'ipmi-oem-inventec.c' || echo '$(srcdir)/'`ipmi-oem-inventec.c ipmi_oem-ipmi-oem-inventec.obj: ipmi-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-inventec.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Tpo -c -o ipmi_oem-ipmi-oem-inventec.obj `if test -f 'ipmi-oem-inventec.c'; then $(CYGPATH_W) 'ipmi-oem-inventec.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-inventec.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-inventec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-inventec.c' object='ipmi_oem-ipmi-oem-inventec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-inventec.obj `if test -f 'ipmi-oem-inventec.c'; then $(CYGPATH_W) 'ipmi-oem-inventec.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-inventec.c'; fi` ipmi_oem-ipmi-oem-quanta.o: ipmi-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-quanta.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Tpo -c -o ipmi_oem-ipmi-oem-quanta.o `test -f 'ipmi-oem-quanta.c' || echo '$(srcdir)/'`ipmi-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-quanta.c' object='ipmi_oem-ipmi-oem-quanta.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-quanta.o `test -f 'ipmi-oem-quanta.c' || echo '$(srcdir)/'`ipmi-oem-quanta.c ipmi_oem-ipmi-oem-quanta.obj: ipmi-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-quanta.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Tpo -c -o ipmi_oem-ipmi-oem-quanta.obj `if test -f 'ipmi-oem-quanta.c'; then $(CYGPATH_W) 'ipmi-oem-quanta.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-quanta.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-quanta.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-quanta.c' object='ipmi_oem-ipmi-oem-quanta.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-quanta.obj `if test -f 'ipmi-oem-quanta.c'; then $(CYGPATH_W) 'ipmi-oem-quanta.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-quanta.c'; fi` ipmi_oem-ipmi-oem-sun.o: ipmi-oem-sun.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-sun.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Tpo -c -o ipmi_oem-ipmi-oem-sun.o `test -f 'ipmi-oem-sun.c' || echo '$(srcdir)/'`ipmi-oem-sun.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-sun.c' object='ipmi_oem-ipmi-oem-sun.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-sun.o `test -f 'ipmi-oem-sun.c' || echo '$(srcdir)/'`ipmi-oem-sun.c ipmi_oem-ipmi-oem-sun.obj: ipmi-oem-sun.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-sun.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Tpo -c -o ipmi_oem-ipmi-oem-sun.obj `if test -f 'ipmi-oem-sun.c'; then $(CYGPATH_W) 'ipmi-oem-sun.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-sun.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-sun.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-sun.c' object='ipmi_oem-ipmi-oem-sun.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-sun.obj `if test -f 'ipmi-oem-sun.c'; then $(CYGPATH_W) 'ipmi-oem-sun.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-sun.c'; fi` ipmi_oem-ipmi-oem-supermicro.o: ipmi-oem-supermicro.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-supermicro.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Tpo -c -o ipmi_oem-ipmi-oem-supermicro.o `test -f 'ipmi-oem-supermicro.c' || echo '$(srcdir)/'`ipmi-oem-supermicro.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-supermicro.c' object='ipmi_oem-ipmi-oem-supermicro.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-supermicro.o `test -f 'ipmi-oem-supermicro.c' || echo '$(srcdir)/'`ipmi-oem-supermicro.c ipmi_oem-ipmi-oem-supermicro.obj: ipmi-oem-supermicro.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-supermicro.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Tpo -c -o ipmi_oem-ipmi-oem-supermicro.obj `if test -f 'ipmi-oem-supermicro.c'; then $(CYGPATH_W) 'ipmi-oem-supermicro.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-supermicro.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-supermicro.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-supermicro.c' object='ipmi_oem-ipmi-oem-supermicro.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-supermicro.obj `if test -f 'ipmi-oem-supermicro.c'; then $(CYGPATH_W) 'ipmi-oem-supermicro.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-supermicro.c'; fi` ipmi_oem-ipmi-oem-thirdparty.o: ipmi-oem-thirdparty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-thirdparty.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Tpo -c -o ipmi_oem-ipmi-oem-thirdparty.o `test -f 'ipmi-oem-thirdparty.c' || echo '$(srcdir)/'`ipmi-oem-thirdparty.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-thirdparty.c' object='ipmi_oem-ipmi-oem-thirdparty.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-thirdparty.o `test -f 'ipmi-oem-thirdparty.c' || echo '$(srcdir)/'`ipmi-oem-thirdparty.c ipmi_oem-ipmi-oem-thirdparty.obj: ipmi-oem-thirdparty.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-thirdparty.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Tpo -c -o ipmi_oem-ipmi-oem-thirdparty.obj `if test -f 'ipmi-oem-thirdparty.c'; then $(CYGPATH_W) 'ipmi-oem-thirdparty.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-thirdparty.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-thirdparty.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-thirdparty.c' object='ipmi_oem-ipmi-oem-thirdparty.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-thirdparty.obj `if test -f 'ipmi-oem-thirdparty.c'; then $(CYGPATH_W) 'ipmi-oem-thirdparty.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-thirdparty.c'; fi` ipmi_oem-ipmi-oem-wistron.o: ipmi-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-wistron.o -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Tpo -c -o ipmi_oem-ipmi-oem-wistron.o `test -f 'ipmi-oem-wistron.c' || echo '$(srcdir)/'`ipmi-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-wistron.c' object='ipmi_oem-ipmi-oem-wistron.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-wistron.o `test -f 'ipmi-oem-wistron.c' || echo '$(srcdir)/'`ipmi-oem-wistron.c ipmi_oem-ipmi-oem-wistron.obj: ipmi-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_oem-ipmi-oem-wistron.obj -MD -MP -MF $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Tpo -c -o ipmi_oem-ipmi-oem-wistron.obj `if test -f 'ipmi-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-wistron.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Tpo $(DEPDIR)/ipmi_oem-ipmi-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-oem-wistron.c' object='ipmi_oem-ipmi-oem-wistron.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_oem_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_oem-ipmi-oem-wistron.obj `if test -f 'ipmi-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-oem-wistron.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-oem/Makefile.am0000644002055400205540000000373613527331635017043 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-oem ipmi_oem_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_oem_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_oem_SOURCES = \ ipmi-oem.c \ ipmi-oem.h \ ipmi-oem-argp.c \ ipmi-oem-argp.h \ ipmi-oem-common.c \ ipmi-oem-common.h \ ipmi-oem-dell.c \ ipmi-oem-dell.h \ ipmi-oem-fujitsu.c \ ipmi-oem-fujitsu.h \ ipmi-oem-gigabyte.c \ ipmi-oem-gigabyte.h \ ipmi-oem-ibm.c \ ipmi-oem-ibm.h \ ipmi-oem-intel.c \ ipmi-oem-intel.h \ ipmi-oem-intelnm.c \ ipmi-oem-intelnm.h \ ipmi-oem-inventec.c \ ipmi-oem-inventec.h \ ipmi-oem-quanta.c \ ipmi-oem-quanta.h \ ipmi-oem-sun.c \ ipmi-oem-sun.h \ ipmi-oem-supermicro.c \ ipmi-oem-supermicro.h \ ipmi-oem-thirdparty.c \ ipmi-oem-thirdparty.h \ ipmi-oem-wistron.c \ ipmi-oem-wistron.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-oem/ipmi-oem.c0000644002055400205540000013233613527331635016666 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-dell.h" #include "ipmi-oem-fujitsu.h" #include "ipmi-oem-gigabyte.h" #include "ipmi-oem-ibm.h" #include "ipmi-oem-intel.h" #include "ipmi-oem-intelnm.h" #include "ipmi-oem-inventec.h" #include "ipmi-oem-quanta.h" #include "ipmi-oem-sun.h" #include "ipmi-oem-supermicro.h" #include "ipmi-oem-wistron.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-sdr-cache-common.h" #include "tool-hostrange-common.h" #include "tool-util-common.h" typedef int (*oem_callback)(ipmi_oem_state_data_t *); #define IPMI_OEM_COMMAND_FLAGS_DEFAULT 0x0000 #define IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE 0x0001 #define IPMI_OEM_COMMAND_FLAGS_HIDDEN 0x0100 struct ipmi_oem_command { char *oem_command; char *command_options; int required_oem_options; unsigned int flags; oem_callback func; }; struct ipmi_oem_id { char *oem_id; struct ipmi_oem_command *oem_commands; }; struct ipmi_oem_command oem_dell[] = { { "get-system-info", "", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_get_system_info }, { "get-nic-selection", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_nic_selection }, { "set-nic-selection", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_set_nic_selection }, { "get-nic-selection-failover", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_nic_selection_failover }, { "set-nic-selection-failover", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_set_nic_selection_failover }, { "get-active-lom-status", "[v1|v2]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_get_active_lom_status }, { "get-ssh-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_ssh_config }, { "set-ssh-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_set_ssh_config }, { "get-telnet-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_telnet_config }, { "set-telnet-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_set_telnet_config }, { "get-web-server-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_web_server_config }, { "set-web-server-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_set_web_server_config }, { "get-active-directory-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_active_directory_config }, { "set-active-directory-config", "KEY=VALUE ...", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_set_active_directory_config }, { "reset-to-defaults", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_reset_to_defaults }, { "get-power-consumption-data", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_power_consumption_data }, /* legacy */ { "get-power-info", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_dell_get_power_consumption_data }, /* legacy */ { "reset-power-info", "", 1, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_dell_reset_power_consumption_data }, { "reset-power-consumption-data", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_reset_power_consumption_data }, /* legacy */ { "get-power-supply-info", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_dell_power_supply_info }, { "power-supply-info", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_power_supply_info }, /* legacy */ { "get-instantaneous-power-consumption-info", "[power_supply_instance]", 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN | IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_get_instantaneous_power_consumption_data }, { "get-instantaneous-power-consumption-data", "[power_supply_instance]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_get_instantaneous_power_consumption_data }, /* legacy */ { "get-power-headroom-info", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN | IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_dell_get_power_head_room }, { "get-power-head-room", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_power_head_room }, { "get-power-consumption-statistics", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_power_consumption_statistics }, /* legacy */ { "get-average-power-history", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_dell_get_average_power_history }, /* legacy */ { "get-peak-power-history", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_dell_get_peak_power_history }, { "get-power-capacity", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_power_capacity }, { "set-power-capacity", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_set_power_capacity }, { "get-power-capacity-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_power_capacity_status }, { "set-power-capacity-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_set_power_capacity_status }, { "get-chassis-identify-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_chassis_identify_status, }, /* legacy */ { "get-board-id", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_get_board_id }, /* legacy */ { "set-board-id", "", 1, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_set_board_id }, /* legacy */ { "get-fcb-version", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_get_fcb_version }, /* legacy */ { "set-fcb-version", " ", 2, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_set_fcb_version }, /* legacy */ { "get-sol-inactivity-timeout", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_get_sol_inactivity_timeout }, /* legacy */ { "set-sol-inactivity-timeout", "", 1, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_set_sol_inactivity_timeout }, { "power-monitoring-over-interval", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_power_monitoring_over_interval }, { "power-monitoring-interval-range", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_power_monitoring_interval_range }, #if 0 /* cannot verify */ { "get-blade-slot-id", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_blade_slot_id }, #endif { "get-last-post-code", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_last_post_code }, { "slot-power-toggle", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_slot_power_toggle, }, { "slot-power-control", " ", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_slot_power_control, }, { "get-port-map", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_get_port_map, }, { "set-port-map", " <1:2|1:4|1:8>", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_dell_set_port_map, }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_fujitsu[] = { { "get-power-on-source", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_power_on_source }, { "get-power-off-source", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_power_off_source }, { "get-remote-storage-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_remote_storage_status }, { "get-system-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_system_status }, { "get-eeprom-version-info", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_eeprom_version_info }, { "get-identify-led", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_identify_led }, { "set-identify-led", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_set_identify_led }, { "get-error-led", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_error_led }, { "get-sel-entry-long-text", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_fujitsu_get_sel_entry_long_text }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_gigabyte[] = { { "get-nic-mode", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_gigabyte_get_nic_mode }, { "set-nic-mode", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_gigabyte_set_nic_mode }, { "get-bmc-services", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_gigabyte_get_bmc_services }, { "set-bmc-services", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_gigabyte_set_bmc_services }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_ibm[] = { { "get-led", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_ibm_get_led }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_intel[] = { { "get-smtp-config", "[channel-number]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intel_get_smtp_config }, { "set-smtp-config", "[channel-number] KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intel_set_smtp_config }, { "get-power-restore-delay", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intel_get_power_restore_delay }, { "set-power-restore-delay", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intel_set_power_restore_delay }, { "get-bmc-services", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intel_get_bmc_services }, { "set-bmc-services", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intel_set_bmc_services }, { "restore-configuration", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intel_restore_configuration }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_intelnm[] = { { "get-node-manager-statistics", "mode=globalpower|globaltemp|globalthrottling|globalvolumetricairflow|globaltempairflow|globalchassispower|policypower|policytrigger|policythrottling|hostunhandledrequests|hostresponsetime|cputhrottling|memorythrottling|hostcommfailure [domainid=platform|cpu|memory|highpowerio] [policyid=num]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_statistics }, { "reset-node-manager-statistics", "[mode=global|policy|hostunhandledrequests|hostresponsetime|cputhrottling|memorythrottling|hostcommfailure] [domainid=platform|cpu|memory|highpowerio] [policyid=num]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_reset_node_manager_statistics }, { "get-node-manager-capabilities", "[domainid=platform|cpu|memory|highpowerio] [policytrigger=none|inlettemperaturelimitpolicytrigger|missingpowerreadingtimeout|timeafterplatformresettrigger|boottimepolicy] [policytype=powercontrol] [policypowerdomain=primary|secondary]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_capabilities }, { "node-manager-policy-control", " [domainid=platform|cpu|memory|highpowerio] [policyid=num]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_node_manager_policy_control }, { "get-node-manager-policy", "[domainid=platform|cpu|memory|highpowerio] [policyid=num]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_policy }, { "set-node-manager-policy", "domainid=platform|cpu|memory|highpowerio policyid=num policytrigger=none|inlettemperaturelimitpolicytrigger|missingpowerreadingtimeout|timeafterplatformresettrigger|boottimepolicy policytargetlimit=num [platformbootingmode=performance|power] correctiontimelimit=ms statisticsreportingperiod=seconds policystorage=persistent|volatile [policytriggerlimit=num] [policystate=enable|disable] [policyexceptionaction=alert|shutdown] [aggressivepowercorrection=automatic|notaggressive|aggressive] [policypowerdomain=primary|secondary]", 7, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_node_manager_policy }, { "remove-node-manager-policy", "domainid=platform|cpu|memory|highpowerio policyid=num", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intelnm_remove_node_manager_policy }, { "get-node-manager-policy-alert-thresholds", "[domainid=platform|cpu|memory|highpowerio] [policyid=num]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds }, { "set-node-manager-policy-alert-thresholds", "domainid=platform|cpu|memory|highpowerio policyid=num [threshold1=num] [threshold2=num] [threshold3=num]", 2, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_node_manager_policy_alert_thresholds }, /* legacy */ { "get-node-manager-alert-thresholds", "[domainid=platform|cpu|memory|highpowerio] [policyid=num]", 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN | IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds }, /* legacy */ { "set-node-manager-alert-thresholds", "domainid=platform|cpu|memory|highpowerio policyid=num [threshold1=num] [threshold2=num] [threshold3=num]", 2, IPMI_OEM_COMMAND_FLAGS_HIDDEN | IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_node_manager_policy_alert_thresholds }, { "get-node-manager-policy-suspend-periods", "[domainid=platform|cpu|memory|highpowerio] [policyid=num]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_node_manager_policy_suspend_periods }, { "set-node-manager-policy-suspend-periods", "domainid=platform|cpu|memory|highpowerio policyid=num suspendperiodstartX=time suspendperiodstopX=time suspendperiodrepeatX=monday|tuesday|wednesday|thursday|friday|saturday|sunday", 2, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_node_manager_policy_suspend_periods }, { "set-node-manager-power-draw-range", "domainid=platform|cpu|memory|highpowerio minpowerdrawrange=watts maxpowerdrawrange=watts", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intelnm_set_node_manager_power_draw_range }, #if 0 { "get-limiting-policy-id", "domainid=platform|cpu|memory", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intelnm_get_limiting_policy_id }, #endif /* can't verify */ { "get-node-manager-alert-destination", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intelnm_get_node_manager_alert_destination }, { "set-node-manager-alert-destination", "[channelnumber=num] [slaveaddress=address] [destinationselector=num] [alertstringselector=num] [sendalertstring=yes|no] [register=yes|no]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_node_manager_alert_destination }, { "get-turbo-synchronization-ratio", "activecoresconfig=num|all [cpusocket=num|all]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_get_turbo_synchronization_ratio }, { "set-turbo-synchronization-ratio", "turboratiolimit=num|default [cpusocket=num|all] [activecoresconfig=num|all]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_intelnm_set_turbo_synchronization_ratio }, { "get-node-manager-version", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_intelnm_get_node_manager_version }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_inventec[] = { /* legacy */ { "get-nic-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_get_nic_mode }, /* legacy */ { "set-nic-status", "", 1, IPMI_OEM_COMMAND_FLAGS_HIDDEN, ipmi_oem_inventec_set_nic_mode }, { "get-nic-mode", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_nic_mode }, { "set-nic-mode", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_nic_mode }, { "get-mac-address", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_mac_address }, { "set-mac-address", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_mac_address }, { "get-bmc-services", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_bmc_services }, { "set-bmc-services", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_bmc_services }, { "get-authentication-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_authentication_config }, { "set-authentication-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_set_authentication_config }, { "get-account-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_account_status }, { "get-dns-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_dns_config }, { "set-dns-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_set_dns_config }, { "get-web-server-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_web_server_config }, { "set-web-server-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_set_web_server_config }, { "get-power-management-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_power_management_config }, { "set-power-management-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_set_power_management_config }, { "get-sol-idle-timeout", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_sol_idle_timeout }, { "set-sol-idle-timeout", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_sol_idle_timeout }, { "get-telnet-ssh-redirect-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_telnet_ssh_redirect_status }, { "set-telnet-ssh-redirect-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_telnet_ssh_redirect_status }, #if 0 /* waiting for verification from Dell */ { "get-firmware-update-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_firmware_update_config }, { "set-firmware-update-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_set_firmware_update_config }, #endif #if 0 /* cannot verify */ { "get-firmware-information", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_firmware_information }, #endif #if 0 /* waiting for verification from Dell */ { "update-firmware", " [config=preserve|nopreserve]", 1, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_inventec_update_firmware }, #endif { "get-board-id", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_board_id }, { "set-board-id", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_board_id }, { "get-fcb-version", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_fcb_version }, { "set-fcb-version", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_fcb_version }, #if 0 /* cannot verify */ { "set-asset-tag", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_asset_tag }, #endif #if 0 /* cannot verify */ { "get-dhcp-retry", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_dhcp_retry }, { "set-dhcp-retry", " ", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_dhcp_retry }, #endif { "get-sol-inactivity-timeout", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_get_sol_inactivity_timeout }, { "set-sol-inactivity-timeout", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_sol_inactivity_timeout }, { "restore-to-defaults", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_restore_to_defaults }, #if 0 /* cannot verify */ { "set-system-guid", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_set_system_guid }, #endif { "read-eeprom", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_read_eeprom }, { "clear-eeprom", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_inventec_clear_eeprom }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_sun[] = { { "get-led", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_sun_get_led }, { "set-led", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_sun_set_led }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_quanta[] = { { "get-nic-mode", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_nic_mode }, { "set-nic-mode", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_set_nic_mode }, { "get-bmc-services", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_bmc_services }, { "set-bmc-services", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_set_bmc_services }, { "get-account-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_account_status }, { "get-dns-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_dns_config }, { "set-dns-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_quanta_set_dns_config }, { "get-web-server-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_web_server_config }, { "set-web-server-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_quanta_set_web_server_config }, { "get-power-management-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_power_management_config }, { "set-power-management-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_quanta_set_power_management_config }, { "get-sol-idle-timeout", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_sol_idle_timeout }, { "set-sol-idle-timeout", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_set_sol_idle_timeout }, { "get-telnet-ssh-redirect-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_get_telnet_ssh_redirect_status }, { "set-telnet-ssh-redirect-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_set_telnet_ssh_redirect_status }, { "reset-to-defaults", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_reset_to_defaults }, { "get-processor-information", "[processor-index]", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_quanta_get_processor_information }, { "read-mac-address", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_read_mac_address }, { "write-mac-address", " ", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_quanta_write_mac_address }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_supermicro[] = { { "extra-firmware-info", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_extra_firmware_info }, { "reset-intrusion", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_reset_intrusion }, { "get-bmc-services-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_get_bmc_services_status }, { "set-bmc-services-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_set_bmc_services_status }, { "get-power-supply-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_get_power_supply_status }, { "get-power-supply-status2", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_get_power_supply_status2 }, { "get-pmbus-power-supply-status", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_supermicro_get_pmbus_power_supply_status }, { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_command oem_wistron[] = { { "get-system-info", "", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_get_system_info }, { "get-nic-mode", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_nic_mode }, { "set-nic-mode", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_nic_mode }, { "get-shared-nic-selection", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_shared_nic_selection }, { "set-shared-nic-selection", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_shared_nic_selection }, { "get-bmc-services", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_bmc_services }, { "set-bmc-services", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_bmc_services }, { "get-account-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_account_status }, { "get-dns-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_dns_config }, { "set-dns-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_dns_config }, { "get-web-server-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_web_server_config }, { "set-web-server-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_web_server_config }, #if 0 /* can't verify - doesn't appear to work */ { "get-server-services-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_server_services_config }, { "set-server-services-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_server_services_config }, #endif { "get-power-management-config", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_power_management_config }, { "set-power-management-config", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_power_management_config }, #if 0 /* can't verify - doesn't appear to work */ { "get-firmware-information", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_firmware_information }, #endif #if 0 /* can't verify - doesn't appear to work */ { "user-default-setting", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_user_default_setting }, #endif { "get-ipv6-settings", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_ipv6_settings }, { "set-ipv6-settings", "KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_ipv6_settings }, { "get-ipv6-trap-settings", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_ipv6_trap_settings }, { "set-ipv6-trap-settings", "index KEY=VALUE ...", 0, IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE, ipmi_oem_wistron_set_ipv6_trap_settings }, { "get-sol-idle-timeout", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_sol_idle_timeout }, { "set-sol-idle-timeout", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_sol_idle_timeout }, { "get-telnet-redirect-function", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_telnet_redirect_function }, { "set-telnet-redirect-function", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_telnet_redirect_function }, #if 0 /* can't verify - doesn't appear to work */ { "get-ssh-redirect-function", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_ssh_redirect_function }, { "set-ssh-redirect-function", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_ssh_redirect_function }, #endif #if 0 /* can't verify - doesn't appear to work */ { "get-chassis-power-readings", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_chassis_power_readings }, #endif #if 0 /* can't verify - doesn't appear to work */ { "get-chassis-led-status", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_chassis_led_status }, { "set-chassis-led-status", " ", 2, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_chassis_led_status }, #endif { "get-dhcp-retry", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_dhcp_retry }, { "set-dhcp-retry", " ", 3, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_dhcp_retry }, { "get-link-status-change-control", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_get_link_status_change_control }, { "set-link-status-change-control", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_link_status_change_control }, { "set-password-policy", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_set_password_policy }, { "read-proprietary-string", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_read_proprietary_string }, { "write-proprietary-string", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_write_proprietary_string }, { "clear-proprietary-string", NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_clear_proprietary_string }, #if 0 /* can't verify - doesn't appear to work */ { "reset-to-defaults", "", 1, IPMI_OEM_COMMAND_FLAGS_DEFAULT, ipmi_oem_wistron_reset_to_defaults }, #endif { NULL, NULL, 0, IPMI_OEM_COMMAND_FLAGS_DEFAULT, NULL }, }; struct ipmi_oem_id oem_cb[] = { { "Dell", oem_dell }, { "Fujitsu", oem_fujitsu }, { "IBM", oem_ibm }, { "GIGABYTE", oem_gigabyte }, { "Intel", oem_intel }, { "Intelnm", oem_intelnm }, { "Inventec", oem_inventec }, { "Quanta", oem_quanta }, { "Sun", oem_sun }, { "Supermicro", oem_supermicro }, { "Wistron", oem_wistron }, { NULL, NULL }, }; static int _list (void) { struct ipmi_oem_id *oem_id = oem_cb; while (oem_id && oem_id->oem_id) { struct ipmi_oem_command *oem_cmd = oem_id->oem_commands; printf ("OEM ID: %s\n", oem_id->oem_id); while (oem_cmd && oem_cmd->oem_command) { if (!(oem_cmd->flags & IPMI_OEM_COMMAND_FLAGS_HIDDEN)) { if (oem_cmd->command_options) printf (" Command: %s %s\n", oem_cmd->oem_command, oem_cmd->command_options); else printf (" Command: %s\n", oem_cmd->oem_command); } oem_cmd++; } printf ("\n"); oem_id++; } return (0); } static int _run_oem_cmd (ipmi_oem_state_data_t *state_data) { struct ipmi_oem_arguments *args; struct ipmi_oem_id *oem_id = oem_cb; int id_found = 0; int rv = -1; assert (state_data); args = state_data->prog_data->args; while (oem_id && oem_id->oem_id) { if (!strcasecmp (oem_id->oem_id, args->oem_id)) { struct ipmi_oem_command *oem_cmd = oem_id->oem_commands; int cmd_found = 0; id_found++; /* offer "help" as well as list, for those used to ipmitool */ if (!args->oem_command || !strcasecmp (args->oem_command, "list") || !strcasecmp (args->oem_command, "help")) { while (oem_cmd && oem_cmd->oem_command) { if (!(oem_cmd->flags & IPMI_OEM_COMMAND_FLAGS_HIDDEN)) { if (oem_cmd->command_options) printf ("%s Command: %s %s\n", oem_id->oem_id, oem_cmd->oem_command, oem_cmd->command_options); else printf ("%s Command: %s\n", oem_id->oem_id, oem_cmd->oem_command); } oem_cmd++; } break; } while (oem_cmd && oem_cmd->oem_command) { if (!strcasecmp (oem_cmd->oem_command, args->oem_command)) { cmd_found++; if ((oem_cmd->flags & IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE && state_data->prog_data->args->oem_options_count < oem_cmd->required_oem_options) || (!(oem_cmd->flags & IPMI_OEM_COMMAND_FLAGS_OPTIONS_COUNT_VARIABLE) && state_data->prog_data->args->oem_options_count != oem_cmd->required_oem_options)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid number of OEM option arguments\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } if (((*oem_cmd->func)(state_data)) < 0) goto cleanup; break; } oem_cmd++; } if (!cmd_found) { pstdout_fprintf (state_data->pstate, stderr, "OEM Command '%s' unknown\n", args->oem_command); goto cleanup; } break; } oem_id++; } if (!id_found) { pstdout_fprintf (state_data->pstate, stderr, "OEM Id '%s' unknown\n", args->oem_id); goto cleanup; } rv = 0; cleanup: return (rv); } static int run_cmd_args (ipmi_oem_state_data_t *state_data) { struct ipmi_oem_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; /* shouldn't be possible at this point, make sure we've already * exitted */ assert (!args->list); assert (args->oem_id); assert (strcasecmp (args->oem_id, "list")); assert (strcasecmp (args->oem_id, "help")); assert (!args->common_args.flush_cache); if (_run_oem_cmd (state_data) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _ipmi_oem (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_oem_state_data_t state_data; ipmi_oem_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (ipmi_oem_prog_data_t *)arg; if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_oem_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; state_data.hostname = (char *)hostname; /* Special case, we're going to output help info, don't do an IPMI connection */ if (prog_data->args->oem_command) { if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; } if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_oem_prog_data_t prog_data; struct ipmi_oem_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_oem_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; /* Special case, just output list, don't do anything else */ /* offer "help" as well as list, for those used to ipmitool */ if (!cmd_args.oem_id || !strcasecmp (cmd_args.oem_id, "list") || !strcasecmp (cmd_args.oem_id, "help") || cmd_args.list) { if (_list () < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_oem, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem.h0000644002055400205540000000277513527331635016676 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_H #define IPMI_OEM_H #include #include "tool-cmdline-common.h" #include "pstdout.h" /* seems like a nice size */ #define IPMI_OEM_MAX_ARGS 1024 enum ipmi_sensors_argp_option_keys { LIST_KEY = 'L', VERBOSE_KEY = 'v', }; struct ipmi_oem_arguments { struct common_cmd_args common_args; int list; unsigned int verbose_count; char *oem_id; char *oem_command; char *oem_options[IPMI_OEM_MAX_ARGS]; unsigned int oem_options_count; }; typedef struct ipmi_oem_prog_data { char *progname; struct ipmi_oem_arguments *args; } ipmi_oem_prog_data_t; typedef struct ipmi_oem_state_data { ipmi_oem_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; char *hostname; ipmi_sdr_ctx_t sdr_ctx; } ipmi_oem_state_data_t; #endif /* IPMI_OEM_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-argp.c0000644002055400205540000001425013527331635017607 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-oem - " PACKAGE_VERSION "\n" "Copyright (C) 2008-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-oem - IPMI OEM utility"; static char cmdline_args_doc[] = " [OEMOPTION...]"; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "list", LIST_KEY, 0, 0, "List supported OEM IDs and Commands.", 30}, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output. May be specified multiple times.", 31}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_oem_arguments *cmd_args; assert (state); cmd_args = state->input; switch (key) { case LIST_KEY: cmd_args->list = 1; break; case VERBOSE_KEY: cmd_args->verbose_count++; break; case ARGP_KEY_ARG: { if (!cmd_args->oem_id) { if (!(cmd_args->oem_id = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; } else if (!cmd_args->oem_command) { if (!(cmd_args->oem_command = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; } else { if (cmd_args->oem_options_count < IPMI_OEM_MAX_ARGS) { if (!(cmd_args->oem_options[cmd_args->oem_options_count] = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } cmd_args->oem_options_count++; break; } else { fprintf (stderr, "Too many arguments specified\n"); exit (EXIT_FAILURE); } } break; } case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_oem_config_file_parse (struct ipmi_oem_arguments *cmd_args) { struct config_file_data_ipmi_oem config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_oem)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_OEM, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; } void ipmi_oem_argp_parse (int argc, char **argv, struct ipmi_oem_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->list = 0; cmd_args->verbose_count = 0; cmd_args->oem_id = NULL; cmd_args->oem_command = NULL; memset (cmd_args->oem_options, '\0', sizeof (char *) * IPMI_OEM_MAX_ARGS); cmd_args->oem_options_count = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_oem_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-argp.h0000644002055400205540000000157713527331635017624 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_ARGP_H #define IPMI_OEM_ARGP_H #include "ipmi-oem.h" void ipmi_oem_argp_parse (int argc, char **argv, struct ipmi_oem_arguments *cmd_args); #endif /* IPMI_OEM_ARGP_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-common.c0000644002055400205540000003720113527331635020147 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "freeipmi-portability.h" #include "pstdout.h" int ipmi_oem_check_response_and_completion_code (ipmi_oem_state_data_t *state_data, const void *bytes_rs, unsigned int bytes_rs_len, unsigned int expected_bytes_rs_len, uint8_t cmd, uint8_t netfn, Ipmi_oem_comp_code_strerror comp_code_strerror) { const uint8_t *bytes_rs_ptr = bytes_rs; assert (state_data); assert (bytes_rs); if (bytes_rs_len < expected_bytes_rs_len) { if (bytes_rs_len >= 2 && bytes_rs_ptr[1] != IPMI_COMP_CODE_COMMAND_SUCCESS) goto output_comp_code_error; pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid response length: %u, expected %u\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, bytes_rs_len, expected_bytes_rs_len); return (-1); } output_comp_code_error: if (bytes_rs_ptr[1] != IPMI_COMP_CODE_COMMAND_SUCCESS) { char errbuf[IPMI_OEM_ERR_BUFLEN + 1]; memset (errbuf, '\0', IPMI_OEM_ERR_BUFLEN + 1); if (comp_code_strerror) { int ret; if ((ret = comp_code_strerror (state_data, bytes_rs_ptr[1], /* completion code */ cmd, netfn, errbuf, IPMI_OEM_ERR_BUFLEN)) < 0) snprintf (errbuf, IPMI_OEM_ERR_BUFLEN, "completion-code = 0x%X", bytes_rs_ptr[1]); if (!ret) goto standard_output_comp_code_error; } else { standard_output_comp_code_error: if (ipmi_completion_code_strerror_r (cmd, /* cmd */ netfn, /* network function */ bytes_rs_ptr[1], /* completion code */ errbuf, IPMI_OEM_ERR_BUFLEN) < 0) { #if 0 pstdout_perror (state_data->pstate, "ipmi_completion_code_strerror_r"); #endif snprintf (errbuf, IPMI_OEM_ERR_BUFLEN, "completion-code = 0x%X", bytes_rs_ptr[1]); } } pstdout_fprintf (state_data->pstate, stderr, "%s:%s failed: %s\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, errbuf); return (-1); } return (0); } int ipmi_oem_parse_key_value (ipmi_oem_state_data_t *state_data, unsigned int option_num, char **key, char **value) { char *tempstr = NULL; char *tempptr = NULL; char *tempkey = NULL; char *tempvalue = NULL; int rv = -1; assert (state_data); assert (key); assert (value); if (!(tempstr = strdup (state_data->prog_data->args->oem_options[option_num]))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } tempptr = strchr (tempstr, '='); if (!tempptr) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : no equal sign\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); goto cleanup; } (*tempptr) = '\0'; tempptr++; if (!(tempkey = strdup (tempstr))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } if (!(tempvalue = strdup (tempptr))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } (*key) = tempkey; (*value) = tempvalue; rv = 0; cleanup: free (tempstr); if (rv < 0) { free (tempkey); free (tempvalue); } return (rv); } int ipmi_oem_parse_enable (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *enable) { assert (state_data); assert (value); assert (enable); if (strcasecmp (value, "enable") && strcasecmp (value, "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } if (!strcasecmp (value, "enable")) (*enable) = 1; else (*enable) = 0; return (0); } int ipmi_oem_parse_1_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *value_out) { unsigned int temp; char *ptr = NULL; assert (state_data); assert (value); assert (value_out); errno = 0; temp = strtoul (value, &ptr, 10); if (errno || ptr[0] != '\0' || temp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } (*value_out) = temp; return (0); } int ipmi_oem_parse_2_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint16_t *value_out) { unsigned int temp; char *ptr = NULL; assert (state_data); assert (value); assert (value_out); errno = 0; temp = strtoul (value, &ptr, 10); if (errno || ptr[0] != '\0' || temp > USHRT_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } (*value_out) = temp; return (0); } int ipmi_oem_parse_4_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *value_out) { unsigned int temp; char *ptr = NULL; assert (state_data); assert (value); assert (value_out); errno = 0; temp = strtoul (value, &ptr, 10); if (errno || ptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } (*value_out) = temp; return (0); } int ipmi_oem_parse_unsigned_int_range (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *value_out, unsigned int min, unsigned int max) { unsigned int temp; char *ptr = NULL; assert (state_data); assert (value); assert (value_out); assert (min < max); errno = 0; temp = strtoul (value, &ptr, 10); if (errno || ptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } if (temp < min || temp > max) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } (*value_out) = temp; return (0); } int ipmi_oem_parse_ip_address (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *ip_address) { unsigned int b1, b2, b3, b4; uint32_t temp; int ret; assert (state_data); assert (value); assert (ip_address); if ((ret = sscanf (value, "%u.%u.%u.%u", &b1, &b2, &b3, &b4)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid IP address '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } if (ret != 4) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid IP address '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } temp = 0; temp |= (uint32_t)b1; temp |= ((uint32_t)b2 << 8); temp |= ((uint32_t)b3 << 16); temp |= ((uint32_t)b4 << 24); (*ip_address) = temp; return (0); } int ipmi_oem_parse_string (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *string_length, char *stringbuf, unsigned int stringbuflen) { assert (state_data); assert (value); assert (string_length); assert (stringbuf); assert (stringbuflen); if (strlen (value) > stringbuflen) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : string length too long\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); return (-1); } (*string_length) = strlen (value); /* use memcpy, do not need NULL termination */ if ((*string_length)) memcpy (stringbuf, value, (*string_length)); return (0); } int ipmi_oem_get_system_info_string (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, char *string, unsigned int string_len, unsigned int *string_len_ret) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; int len; int rv = -1; assert (state_data); assert (string); assert (string_len); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, set_selector, block_selector, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len > string_len) { pstdout_fprintf (state_data->pstate, stderr, "buffer overflow\n"); goto cleanup; } memcpy (string, &(configuration_parameter_data[0]), len); if (string_len_ret) (*string_len_ret) = len; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-common.h0000644002055400205540000001112213527331635020146 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_COMMON_H #define IPMI_OEM_COMMON_H #include "ipmi-oem.h" #define IPMI_OEM_MAX_BYTES 256 #define IPMI_OEM_ERR_BUFLEN 1024 #define IPMI_OEM_TIME_BUFLEN 1024 #define IPMI_OEM_HEX_BASE 16 #define IPMI_OEM_FMT_BUFLEN 1024 #define IPMI_OEM_STR_BUFLEN 2048 /* returns 1 if found OEM specific error message, 0 if not, -1 on error */ typedef int (*Ipmi_oem_comp_code_strerror)(ipmi_oem_state_data_t *state_data, uint8_t comp_code, uint8_t cmd, uint8_t netfn, char *errbuf, unsigned int errbuflen); int ipmi_oem_check_response_and_completion_code (ipmi_oem_state_data_t *state_data, const void *bytes_rs, unsigned int bytes_rs_len, unsigned int expected_bytes_rs_len, uint8_t cmd, uint8_t netfn, Ipmi_oem_comp_code_strerror comp_code_strerror); int ipmi_oem_parse_key_value (ipmi_oem_state_data_t *state_data, unsigned int option_num, char **key, char **value); int ipmi_oem_parse_enable (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *enable); int ipmi_oem_parse_1_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *value_out); int ipmi_oem_parse_2_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint16_t *value_out); int ipmi_oem_parse_4_byte_field (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *value_out); int ipmi_oem_parse_unsigned_int_range (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *value_out, unsigned int min, unsigned int max); int ipmi_oem_parse_port (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint16_t *port); int ipmi_oem_parse_ip_address (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint32_t *ip_address); int ipmi_oem_parse_string (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *string_length, char *stringbuf, unsigned int stringbuflen); int ipmi_oem_get_system_info_string (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, char *string, unsigned int string_len, unsigned int *string_len_ret); #endif /* IPMI_OEM_COMMON_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-dell.c0000644002055400205540000107003213527331635017577 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-dell.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #include "tool-util-common.h" /* Some slots resolve to 2.0 Watts when "off" */ #define IPMI_OEM_DELL_ZERO_DEGREE_EPSILON 2.5 /* Will call ipmi_cmd_get_system_info_parameters only once, b/c field * requested is defined by OEM to be < 16 bytes in length */ static int _get_dell_system_info_short_string (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, char *string, unsigned int string_len, unsigned int *string_len_ret) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; int len; int rv = -1; assert (state_data); assert (string); assert (string_len); assert (state_data->prog_data->args->oem_options_count == 1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* configuration_parameter_data[0] - string length * configuration_parameter_data[1-n] - string */ if (len < 1) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } if (configuration_parameter_data[0] != (len - 1)) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid string length returned: %u\n", configuration_parameter_data[0]); goto cleanup; } if (configuration_parameter_data[0]) { if (configuration_parameter_data[0] > string_len) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow\n"); goto cleanup; } memcpy (string, &(configuration_parameter_data[1]), configuration_parameter_data[0]); } if (string_len_ret) (*string_len_ret) = configuration_parameter_data[0]; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _get_dell_system_info_long_string (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, char *string, unsigned int string_len) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t set_selector = 0; uint8_t string_length = 0; unsigned int string_count = 0; uint8_t string_encoding; int len; int rv = -1; assert (state_data); assert (string); assert (string_len); assert (state_data->prog_data->args->oem_options_count == 1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 3) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } /* configuration_parameter_data[0] is the set selector, we don't care */ string_encoding = (configuration_parameter_data[1] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } string_length = configuration_parameter_data[2]; if (!string_length) goto out; /* -3 b/c of set selector, encoding, and string length bytes */ if (len - 3) { if ((len - 3) > (string_len - string_count)) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow\n"); goto cleanup; } memcpy (string + string_count, &(configuration_parameter_data[3]), (len - 3)); string_count += (len - 3); } /* string_length is 8 bits, so we should not call >= 17 times, * * ceiling ( (255 - 14) / 16 ) + 1 = 17 * */ set_selector++; while (string_count < string_length && set_selector < 17) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 2) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } /* configuration_parameter_data[0] is the set selector, we don't care */ if ((string_count + (len - 1)) > (string_len - string_count)) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow\n"); goto cleanup; } memcpy (string + string_count, &(configuration_parameter_data[1]), (len - 1)); string_count += (len - 1); set_selector++; } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _get_dell_system_info_bytes (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, uint8_t *bytes, unsigned int bytes_len, unsigned int minimum_bytes_expected, unsigned int *bytes_len_ret) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; int len; int rv = -1; assert (state_data); assert (bytes); assert (bytes_len); assert (minimum_bytes_expected); assert (state_data->prog_data->args->oem_options_count == 1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < minimum_bytes_expected) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } if (len > bytes_len) { pstdout_fprintf (state_data->pstate, stderr, "Internal buffer overflow\n"); goto cleanup; } memcpy (bytes, configuration_parameter_data, len); if (bytes_len_ret) (*bytes_len_ret) = len; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* returns 1 on success, 0 on not supported, -1 on error */ static int _get_dell_system_info_idrac_info (ipmi_oem_state_data_t *state_data, uint8_t *dhcp_or_static, char *ip_address_buf, unsigned int ip_address_buflen, char *idrac_firmware_version_buf, unsigned int idrac_firmware_version_buflen, uint8_t *idrac_type) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t idrac_info[IPMI_OEM_MAX_BYTES]; unsigned int idrac_info_len = 0; uint8_t string_encoding; int len; int rv = -1; int i; assert (state_data); assert (idrac_type); /* Dell Poweredge OEM * * From Dell Provided Source Code * * Uses Get System Info command * * iDRAC Info Parameter = 0xDD * iDRAC Info Set Selector = ... see below ... * * Parameter data response formatted: * * Each block first byte is set-selector. Not counting that, the * total block of data is. * * 1st byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 2nd byte - string length * 3rd byte - IP address format * - 0x00 - IPv4 * - 0x01 - IPv6 * 4th byte - DHCP or static * - 0x00 - dhcp * - 0x01 - static * bytes 5-20 - IP address * - achu: seems to be stored binary, not ascii. Why?? * bytes 21-40 - IDRAC firmware version * byte 41 - idrac type * - 0x08 - 10G * - 0x09 - CMC * - 0x0A - 11G monolithic * - 0x0B - 11g modular * - 0x0D - maser lite * - 0x10 - 12g monolothic * - 0x11 - 12g modular * * set selector 0 = bytes 1-16 * set selector 1 = bytes 17-32 * set selector 2 = bytes 33-41 */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } for (i = 0; i < 3; i++) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_INFO, i, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1)) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { if (!idrac_info_len) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s possibly not supported, no information available for reading\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } memcpy (&idrac_info[idrac_info_len], configuration_parameter_data + 1, /* remove set selector */ len - 1); idrac_info_len += (len - 1); } if (idrac_info_len < IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_MIN_LEN) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid data length returned: %u\n", idrac_info_len); goto cleanup; } string_encoding = (idrac_info[0] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } if (dhcp_or_static) (*dhcp_or_static) = idrac_info[3]; if (ip_address_buf && ip_address_buflen) { uint8_t ip_address_format; ip_address_format = idrac_info[2]; if (ip_address_format == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_FORMAT_IPV4) { uint32_t ip_address; ip_address = idrac_info[4]; ip_address |= (idrac_info[5] << 8); ip_address |= (idrac_info[6] << 16); ip_address |= (idrac_info[7] << 24); if (!inet_ntop (AF_INET, &ip_address, ip_address_buf, ip_address_buflen)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } } else if (ip_address_format == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_FORMAT_IPV6) { uint32_t ip_address[4]; ip_address[0] = idrac_info[4]; ip_address[0] |= (idrac_info[5] << 8); ip_address[0] |= (idrac_info[6] << 16); ip_address[0] |= (idrac_info[7] << 24); ip_address[1] = idrac_info[8]; ip_address[1] |= (idrac_info[9] << 8); ip_address[1] |= (idrac_info[10] << 16); ip_address[1] |= (idrac_info[11] << 24); ip_address[2] = idrac_info[12]; ip_address[2] |= (idrac_info[13] << 8); ip_address[2] |= (idrac_info[14] << 16); ip_address[2] |= (idrac_info[15] << 24); ip_address[3] = idrac_info[16]; ip_address[3] |= (idrac_info[17] << 8); ip_address[3] |= (idrac_info[18] << 16); ip_address[3] |= (idrac_info[19] << 24); if (!inet_ntop (AF_INET6, ip_address, ip_address_buf, ip_address_buflen)) { pstdout_fprintf (state_data->pstate, stderr, "inet_ntop: %s\n", strerror (errno)); goto cleanup; } } else memset (ip_address_buf, '\0', ip_address_buflen); } if (idrac_firmware_version_buf && idrac_firmware_version_buflen && idrac_firmware_version_buflen >= IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_FIRMWARE_VERSION_STRING_LENGTH) memcpy (idrac_firmware_version_buf, &idrac_info[20], IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_FIRMWARE_VERSION_STRING_LENGTH); (*idrac_type) = idrac_info[40]; rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _output_dell_system_info_idrac_info (ipmi_oem_state_data_t *state_data) { uint8_t dhcp_or_static; char ip_address_buf[IPMI_OEM_STR_BUFLEN + 1]; char idrac_firmware_version_buf[IPMI_OEM_STR_BUFLEN + 1]; uint8_t idrac_type; char *dhcp_or_static_str; char *idrac_type_str; int rv = -1; int ret; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); memset (ip_address_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (idrac_firmware_version_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); if ((ret = _get_dell_system_info_idrac_info (state_data, &dhcp_or_static, ip_address_buf, IPMI_OEM_STR_BUFLEN, idrac_firmware_version_buf, IPMI_OEM_STR_BUFLEN, &idrac_type)) < 0) goto cleanup; if (!ret) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_printf (state_data->pstate, "IP Address : %s\n", ip_address_buf); if (dhcp_or_static == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_CONFIG_DHCP) dhcp_or_static_str = "DHCP"; else if (dhcp_or_static == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IP_ADDRESS_CONFIG_STATIC) dhcp_or_static_str = "Static"; else dhcp_or_static_str = "Unknown"; pstdout_printf (state_data->pstate, "IP Configuration : %s\n", dhcp_or_static_str); pstdout_printf (state_data->pstate, "iDRAC Firmware Version : %s\n", idrac_firmware_version_buf); switch (idrac_type) { case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_10G: idrac_type_str = "Dell Poweredge 10G"; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_CMC: idrac_type_str = "Dell Chassis Management Controller "; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MONOLITHIC: idrac_type_str = "Dell Poweredge 11G (Monolithic)"; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MODULAR: idrac_type_str = "Dell Poweredge 11G (Modular)"; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_MASER_LITE_BMC: idrac_type_str = "Maser Lite BMC"; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MONOLITHIC: idrac_type_str = "Dell Poweredge 12G (Monolithic)"; break; case IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MODULAR: idrac_type_str = "Dell Poweredge 12G (Modular)"; break; default: idrac_type_str = "Unknown"; } pstdout_printf (state_data->pstate, "iDRAC Type : %s\n", idrac_type_str); rv = 0; cleanup: return (rv); } static int _output_dell_system_info_cmc_info (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t cmc_info[IPMI_OEM_MAX_BYTES]; unsigned int cmc_info_len = 0; uint8_t string_encoding; uint8_t ip_address_format; char *ip_address_format_str; uint8_t ip_address_source; char * ip_address_source_str; char ip_str_buf[IPMI_OEM_STR_BUFLEN + 1]; char cmc_firmware_version_buf[IPMI_OEM_STR_BUFLEN + 1]; uint8_t gui_status; char *gui_status_str; uint8_t nic_state; char *nic_state_str; uint8_t link_connect; char *link_connect_str; uint8_t cmc_failover_racreset; char *cmc_failover_racreset_str; uint8_t hardware_vendor_mode; char *hardware_vendor_mode_str; int len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Dell Poweredge OEM * * From Dell Provided Docs * * Uses Get System Info command * * CMC Info Parameter = 0xDF * CMC Info Set Selector = ... see below ... * * Parameter data response formatted: * * Each block first byte is set-selector. Not counting that, the * total block of data is. * * 1st byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 2nd byte - string length * 3rd byte - IP address format * - bit 0 - 0 = ipv4, 1 = ipv6 * - bit 7:1 - reserved * 4th byte - dhcp/static * - 0 = dhcp, 1 = static * bytes 5-20 - ip address * bytes 21-40 - cmc firmware version * bytes 41 - type (0x09 for CMC) * byte 42 - gui status * - 0 = disabled, 1 = enabled * byte 53 - nic status * - bit 0 - nic enable/disable - 0 = disabled, 1 = enabled * - bit 1 - link connect/disconnect - 0 = disconnected, 1 = connected * - bit 2 - cmc failover or racreset - 0 = not from failover, 1 = from failover * - bit 3 - hardware vendor mode - 0 = does not have hardware vendor mode, 1 = has hardware vendor mode * * set selector 0 = bytes 1-16 * set selector 1 = bytes 17-32 * set selector 2 = bytes 33-41 * set selector 3 = bytes 42-57 */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } for (i = 0; i < 4; i++) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_INFO, i, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { if (!cmc_info_len) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s possibly not supported, no information available for reading\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } memcpy (&cmc_info[cmc_info_len], configuration_parameter_data + 1, /* remove set selector */ len - 1); cmc_info_len += (len - 1); } if (cmc_info_len < IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_MIN_LEN) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid data length returned: %u\n", cmc_info_len); goto cleanup; } string_encoding = (cmc_info[0] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } ip_address_format = cmc_info[2]; switch (ip_address_format) { case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_FORMAT_IPV4: ip_address_format_str = "IPv4"; break; case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_FORMAT_IPV6: ip_address_format_str = "IPv6"; break; default: ip_address_format_str = "Unspecified"; } pstdout_printf (state_data->pstate, "IP Address Format : %s\n", ip_address_format_str); ip_address_source = cmc_info[3]; switch (ip_address_source) { case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_SOURCE_DHCP: ip_address_source_str = "DHCP"; break; case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_SOURCE_STATIC: ip_address_source_str = "Static"; break; default: ip_address_source_str = "Unspecified"; } pstdout_printf (state_data->pstate, "IP Address Source : %s\n", ip_address_source_str); memset (ip_str_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); memcpy (ip_str_buf, &cmc_info[4], IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_IP_ADDRESS_STRING_LENGTH); pstdout_printf (state_data->pstate, "IP Address : %s\n", ip_str_buf); memset (cmc_firmware_version_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); memcpy (cmc_firmware_version_buf, &cmc_info[20], IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_CMC_FIRMWARE_VERSION_STRING_LENGTH); pstdout_printf (state_data->pstate, "CMC Firmware Version : %s\n", cmc_firmware_version_buf); gui_status = cmc_info[41]; switch (gui_status) { case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_GUI_STATUS_DISABLED: gui_status_str = "Disabled"; break; case IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_GUI_STATUS_ENABLED: gui_status_str = "Enabled"; break; default: gui_status_str = "Unspecified"; } pstdout_printf (state_data->pstate, "GUI Status : %s\n", gui_status_str); nic_state = (cmc_info[42] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_BITMASK); nic_state >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_SHIFT; if (nic_state == IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_NIC_STATE_DISABLED) nic_state_str = "Disabled"; else nic_state_str = "Enabled"; pstdout_printf (state_data->pstate, "NIC State : %s\n", nic_state_str); link_connect = (cmc_info[42] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_BITMASK); link_connect >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_SHIFT; if (link_connect == IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_LINK_CONNECT_DISCONNECTED) link_connect_str = "Disconnected"; else link_connect_str = "Connected"; pstdout_printf (state_data->pstate, "Link Connect : %s\n", link_connect_str); cmc_failover_racreset = (cmc_info[42] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_BITMASK); cmc_failover_racreset >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_SHIFT; if (cmc_failover_racreset == IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_CMC_FAILOVER_RACRESET_NOT_FROM_FAILOVER) cmc_failover_racreset_str = "Not from failover"; else cmc_failover_racreset_str = "From failover"; pstdout_printf (state_data->pstate, "CMC Failover/RACreset : %s\n", cmc_failover_racreset_str); hardware_vendor_mode = (cmc_info[42] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_BITMASK); hardware_vendor_mode >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_SHIFT; if (hardware_vendor_mode == IPMI_OEM_DELL_SYSTEM_INFO_CMC_INFO_NIC_STATUS_HARDWARE_VENDOR_MODE_NO_HARDWARE_VENDOR_MODE) hardware_vendor_mode_str = "Does not have hardware vendor mode "; else hardware_vendor_mode_str = "Has hardware vendor mode"; pstdout_printf (state_data->pstate, "Hardware Vendor Mode : %s\n", hardware_vendor_mode_str); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _output_dell_system_info_cmc_ipv6_info (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t cmc_ipv6_info[IPMI_OEM_MAX_BYTES]; unsigned int cmc_ipv6_info_len = 0; uint8_t string_encoding; uint8_t ipv6_status; uint8_t autoconfiguration; char ipv6_str_buf[IPMI_OEM_STR_BUFLEN + 1]; int len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Dell Poweredge OEM * * From Dell Provided Docs * * Uses Get System Info command * * CMC IPv6 Info Parameter = 0xF2 * CMC IPv6 Info Set Selector = ... see below ... * * Parameter data response formatted: * * Each block first byte is set-selector. Not counting that, the * total block of data is. * * 1st byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 2nd byte - string length * 3rd byte - IPv6 status * - bit 0 - 0 = disabled, 1 = enabled * - bit 7:1 - reserved * 4th byte - autoconfiguration * - bit 0 - 0 = disabled, 1 = enabled * - bit 7:1 - reserved * bytes 5-16 - reserved * byte 17 - prefix length * byte 18 - string length * byte 19-57 - IPv6 address (string) * * set selector 0 = bytes 1-16 * set selector 1 = bytes 17-32 * set selector 2 = bytes 33-41 * set selector 3 = bytes 42-57 */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } for (i = 0; i < 4; i++) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_INFO, i, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { if (!cmc_ipv6_info_len) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s possibly not supported, no information available for reading\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } memcpy (&cmc_ipv6_info[cmc_ipv6_info_len], configuration_parameter_data + 1, /* remove set selector */ len - 1); cmc_ipv6_info_len += (len - 1); } if (cmc_ipv6_info_len < IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_MIN_LEN) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid data length returned: %u\n", cmc_ipv6_info_len); goto cleanup; } string_encoding = (cmc_ipv6_info[0] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } ipv6_status = (cmc_ipv6_info[2] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_BITMASK); ipv6_status >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_SHIFT; pstdout_printf (state_data->pstate, "IPv6 Status : %s\n", ipv6_status == IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_STATUS_ENABLED ? "Enabled" : "Disabled"); autoconfiguration = (cmc_ipv6_info[3] & IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_BITMASK); autoconfiguration >>= IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_SHIFT; pstdout_printf (state_data->pstate, "Autoconfiguration : %s\n", ipv6_status == IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_AUTOCONFIGURATION_ENABLED ? "Enabled" : "Disabled"); memset (ipv6_str_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); memcpy (ipv6_str_buf, &cmc_ipv6_info[18], IPMI_OEM_DELL_SYSTEM_INFO_CMC_IPV6_INFO_IPV6_ADDRESS_STRING_LENGTH); pstdout_printf (state_data->pstate, "IPv6 Address : %s\n", ipv6_str_buf); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } #if 0 /* cannot verify */ static int _output_dell_system_info_snmp_ipv6_info (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t ipv6_snmp_trap_destination_addresses[IPMI_OEM_MAX_BYTES]; unsigned int ipv6_snmp_trap_destination_addresses_len = 0; uint8_t string_encoding; uint8_t data_length; uint8_t destination_type; uint8_t alert_ack_timeout; uint8_t retries; char *destination_type_str; char ipv6_str_buf[IPMI_OEM_STR_BUFLEN + 1]; int len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Dell Poweredge OEM * * From Dell Provided Docs * * Uses Get System Info command * * IPv6 SNMP Trap Destination Addresses Parameter = 0xF0 * IPv6 SNMP Trap Destination Addresses Set Selector = ... see below ... * * Parameter data response formatted: * * Each block first byte is set-selector. Not counting that, the * total block of data is. * * 1st byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 2nd byte - string length * 3rd byte - destination type * - bit 0 - 0 = disabled, 1 = enabled * - bit 7:1 - reserved * 4th byte - alert ack timeout * - bit 0 - 0 = disabled, 1 = enabled * - bit 7:1 - reserved * 5th byte - retries * bytes 6-N - IPv6 string (max 39 bytes) * * set selector 0 = bytes 1-16 * set selector 1 = bytes 17-32 * etc. */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IPV6_SNMP_TRAP_DESTINATION_ADDRESS, 0, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s possibly not supported, no information available for reading\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } if (len < 3) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } /* configuration_parameter_data[0] is the set selector, we don't care */ string_encoding = (configuration_parameter_data[1] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } data_length = configuration_parameter_data[2]; if (!data_length) goto out; memcpy (&ipv6_snmp_trap_destination_addresses[ipv6_snmp_trap_destination_addresses_len], configuration_parameter_data + 1, /* remove set selector */ len - 1); ipv6_snmp_trap_destination_addresses_len += (len - 1); /* + 2 for string encoding and data length fields, aren't accounted * for in Dell's OEM count */ for (i = 1; i < (data_length + 2) / 16; i++) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IPV6_SNMP_TRAP_DESTINATION_ADDRESS, i, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } memcpy (&ipv6_snmp_trap_destination_addresses[ipv6_snmp_trap_destination_addresses_len], configuration_parameter_data + 1, /* remove set selector */ len - 1); ipv6_snmp_trap_destination_addresses_len += (len - 1); } if (ipv6_snmp_trap_destination_addresses_len < IPMI_OEM_DELL_SYSTEM_INFO_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_MIN_LEN) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid data length returned: %u\n", ipv6_snmp_trap_destination_addresses_len); goto cleanup; } destination_type = ipv6_snmp_trap_destination_addresses[2]; alert_ack_timeout = ipv6_snmp_trap_destination_addresses[3]; retries = ipv6_snmp_trap_destination_addresses[4]; switch (destination_type) { case IPMI_DESTINATION_TYPE_PET_TRAP_DESTINATION: destination_type_str = "PET Trap destination"; break; case IPMI_DESTINATION_TYPE_OEM1: destination_type_str = "OEM 1"; break; case IPMI_DESTINATION_TYPE_OEM2: destination_type_str = "OEM 2"; break; default: destination_type_str = "Unknown"; } pstdout_printf (state_data->pstate, "Destination Type : %u s\n", destination_type_str); pstdout_printf (state_data->pstate, "Alert Acknowledge Timeout : %u s\n", alert_ack_timeout); pstdout_printf (state_data->pstate, "Retries : %u\n", retries); memset (ipv6_str_buf, '\0', IPMI_OEM_STR_BUFLEN + 1); memcpy (ipv6_str_buf, &ipv6_snmp_trap_destination_addresses[5], (data_length - 3)); pstdout_printf (state_data->pstate, "IPv6 Address : %s\n", ipv6_str_buf); out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } #endif static int _output_dell_system_info_10g_mac_addresses (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t number_of_nics; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; int len; int i; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_NICS_MAC_ADDRESSES, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_nics = configuration_parameter_data[0]; if (!number_of_nics) { rv = 0; goto cleanup; } if ((number_of_nics * IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_LENGTH) != (len - 1)) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: number of nics = %u, bytes = %d\n", number_of_nics, len); goto cleanup; } pstdout_printf (state_data->pstate, "NIC Number\tMAC Address\n"); for (i = 0; i < number_of_nics; i++) pstdout_printf (state_data->pstate, "%u\t\t%02X:%02X:%02X:%02X:%02X:%02X\n", i, configuration_parameter_data[i*6 + 1], configuration_parameter_data[i*6 + 2], configuration_parameter_data[i*6 + 3], configuration_parameter_data[i*6 + 4], configuration_parameter_data[i*6 + 5], configuration_parameter_data[i*6 + 6]); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _output_dell_system_info_11g_or_12g_mac_addresses (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t total_bytes; int rs_len; int i; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* see info below in ipmi_oem_dell_get_system_info() for packet * format. We cannot use normal Get System Info b/c Dell hacked it * to include/support extra bytes. */ bytes_rq[0] = IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS; bytes_rq[1] = 0x00; /* get parameter */ bytes_rq[2] = IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_11G_MAC_ADDRESSES; /* parameter selector */ bytes_rq[3] = 0x00; /* set selector */ bytes_rq[4] = 0x00; /* block selector */ bytes_rq[5] = 0x00; /* offset */ bytes_rq[6] = 0x00; /* length */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_APP_RQ, /* network function */ bytes_rq, /* data */ 7, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS, IPMI_NET_FN_APP_RS, NULL) < 0) goto cleanup; total_bytes = bytes_rs[3]; if (!total_bytes) { rv = 0; goto cleanup; } #if 0 /* Apparently on some systems return a non-multiple of 8 bytes * * Just fall through and output whatever you can. */ if (total_bytes % 8) { pstdout_fprintf (state_data->pstate, stderr, "invalid total bytes of data returned: %u\n", total_bytes); goto cleanup; } #endif /* see record format below in ipmi_oem_dell_get_system_info(), record length = 8 */ pstdout_printf (state_data->pstate, "NIC Number\tMAC Address\t\tNIC Status\n"); for (i = 0; i < (total_bytes / IPMI_OEM_DELL_SYSTEM_INFO_11G_OR_12G_MAC_ADDRESS_LENGTH); i++) { uint8_t mac_type; bytes_rq[0] = IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS; bytes_rq[1] = 0x00; /* get parameter */ bytes_rq[2] = IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_11G_MAC_ADDRESSES; /* parameter selector */ bytes_rq[3] = 0x00; /* set selector */ bytes_rq[4] = 0x00; /* block selector */ bytes_rq[5] = i * IPMI_OEM_DELL_SYSTEM_INFO_11G_OR_12G_MAC_ADDRESS_LENGTH; /* offset */ bytes_rq[6] = IPMI_OEM_DELL_SYSTEM_INFO_11G_OR_12G_MAC_ADDRESS_LENGTH; /* length */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_APP_RQ, /* network function */ bytes_rq, /* data */ 7, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* 11 = IPMI_OEM_DELL_SYSTEM_INFO_11G_OR_12G_MAC_ADDRESS_LENGTH + 3 (for cmd, completion code, parameter revision) */ if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 11, IPMI_CMD_GET_SYSTEM_INFO_PARAMETERS, IPMI_NET_FN_APP_RS, NULL) < 0) goto cleanup; mac_type = (bytes_rs[3] & IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_BITMASK); mac_type >>= IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_SHIFT; if (mac_type == IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_TYPE_ETHERNET) { uint8_t nic_number; uint8_t nic_status; char *nic_status_str = NULL; nic_status = (bytes_rs[3] & IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_STATUS_BITMASK); nic_status >>= IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_STATUS_SHIFT; nic_number = (bytes_rs[4] & IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_NUMBER_BITMASK); nic_number >>= IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_NIC_NUMBER_SHIFT; switch (nic_status) { case IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_ENABLED: nic_status_str = "Enabled"; break; case IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_DISABLED: nic_status_str = "Disabled"; break; case IPMI_OEM_DELL_SYSTEM_INFO_MAC_ADDRESS_STATUS_PLAYING_DEAD: nic_status_str = "Playing Dead"; break; default: nic_status_str = "Unknown"; } pstdout_printf (state_data->pstate, "%u\t\t%02X:%02X:%02X:%02X:%02X:%02X\t%s\n", nic_number, bytes_rs[5], bytes_rs[6], bytes_rs[7], bytes_rs[8], bytes_rs[9], bytes_rs[10], nic_status_str); } } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_system_info (ipmi_oem_state_data_t *state_data) { char string[IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES+1]; unsigned int string_len = 0; uint8_t bytes[IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES+1]; unsigned int bytes_len = 0; int rv = -1; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: guid\n" "Option: asset-tag\n" "Option: service-tag\n" "Option: chassis-service-tag\n" "Option: chassis-related-service-tag\n" "Option: board-revision\n" "Option: platform-model-name\n" #if 0 /* legacy */ "Option: slot-number\n" #else "Option: blade-slot-info\n" #endif "Option: system-revision\n" "Option: embedded-video-status\n" "Option: idrac-info\n" "Option: idrac-ipv4-url\n" "Option: idrac-gui-webserver-control\n" "Option: cmc-info\n" "Option: cmc-ipv4-url\n" "Option: cmc-ipv6-info\n" "Option: cmc-ipv6-url\n" #if 0 /* cannot verify */ "Option: snmp-ipv6-info\n" #endif "Option: mac-addresses\n"); return (0); } if (state_data->prog_data->args->oem_options_count != 1) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s please specify one get-system-info KEY\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[0], "guid") && strcasecmp (state_data->prog_data->args->oem_options[0], "asset-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "service-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "chassis-service-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "chassis-related-service-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "board-revision") && strcasecmp (state_data->prog_data->args->oem_options[0], "product-name") /* legacy */ && strcasecmp (state_data->prog_data->args->oem_options[0], "platform-model-name") && strcasecmp (state_data->prog_data->args->oem_options[0], "slot-number") /* legacy */ && strcasecmp (state_data->prog_data->args->oem_options[0], "blade-slot-info") /* legacy */ && strcasecmp (state_data->prog_data->args->oem_options[0], "system-revision") && strcasecmp (state_data->prog_data->args->oem_options[0], "embedded-video-status") && strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-info") && strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-ipv4-url") && strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-gui-webserver-control") && strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-info") && strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv4-url") && strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv6-info") && strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv6-url") #if 0 /* cannot verify */ && strcasecmp (state_data->prog_data->args->oem_options[0], "snmp-ipv6-info") #endif && strcasecmp (state_data->prog_data->args->oem_options[0], "mac-addresses")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * Some from http://linux.dell.com/files/openipmi/ipmitool/ * Some from Dell Provided Source Code * Some from Dell Provided Docs * * Uses Get System Info command * * For asset-tag and service-tag, the response format is different * than product name. * * Format #1) * * guid parameter = 0xC3 * asset-tag parameter = 0xC4 * service-tag parameter = 0xC5 * chassis-service-tag parameter = 0xC6 * chassis-related-service-tag parameter = 0xC7 * board-revision parameter = 0xC8 * * Parameter data response formatted: * * 1st byte = length * ? bytes = string/buf * * Format #2) * * platform-model-name parameter = 0xD1 * blade-slot-info / slot number = 0xDC * iDRAC IPv4 URL = 0xDE * CMC IPv4 URL = 0xE0 * CMC IPv6 URL = 0xF3 * * Parameter data response formatted: * * Set Selector 0: * * 1st byte = set selector * 2nd byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 3rd byte = string length * ? bytes = string * * Set Selector > 0 * * 1st byte = set selector * ? bytes = string * * Format #3) * * iDRAC info = 0xDD * * See format in _get_dell_system_info_idrac_info(). * * Format #4) * * iDRAC GUI/Webserver Control = 0xE1 * * 1st byte - 0x00 = Disabled, 0x01 = Enabled * * Format #5) * * CMC IPv6 Info = 0xF2 * * See format in _output_dell_system_info_cmc_ipv6_info(). * * Format #6) * * IPv6 SNMP Trap Destination Addresses = 0xF0 * * See format in _output_dell_system_info_snmp_ipv6_info() * * Format #7) * * Dell 10G systems, mac-addresses = 0xCB * * Parameter data response formatted: * * 1st byte = number of NICs * ? bytes = MAC address of NICS, number of NICS * 6 total bytes * * Format #8) * * Dell 11G systems, mac-addresses = 0xDA * + 2 extra bytes * byte 5 : offset into data to read * byte 6 : length of data to read * * * Parameter data response formatted: * * if byte 5 and byte 6 are 0x00 * * 1st byte - total bytes of MAC address data * * if byte 5 and byte 6 have real offsets/lengths * * parameter revision byte = total number of bytes returned * ? bytes = record stored in following format * byte 1 - 0:3 - blade slot number * byte 1 - 4:5 - mac address type * - 0 = ethernet * - 1 = iSCSI * - 2 = ??? * - 3 = reserved * byte 1 - 6:7 - ethernet status * - 0 = enabled * - 1 = disabled * - 2 = playing dead * - 3 = reserved * byte 2 - 0:4 - NIC number * byte 2 - 5:7 - reserved * bytes 3 - 8 - MAC address * * Format #9) * * cmc info = 0xDF * * See format in _get_dell_system_info_cmc_info(). */ memset (string, '\0', IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES + 1); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "guid")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_GUID, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, &string_len) < 0) goto cleanup; if (string_len != IPMI_SYSTEM_GUID_LENGTH) { pstdout_fprintf (state_data->pstate, stderr, "Invalid GUID length returned: %s\n", string_len); goto cleanup; } pstdout_printf (state_data->pstate, "%02X%02X%02X%02X-%02X%02X-%02X%02X-%02X%02X-%02X%02X%02X%02X%02X%02X\n", (uint8_t)string[15], /* time low */ (uint8_t)string[14], (uint8_t)string[13], (uint8_t)string[12], (uint8_t)string[11], /* time mid */ (uint8_t)string[10], (uint8_t)string[9], /* time high and version */ (uint8_t)string[8], (uint8_t)string[6], /* clock seq high and reserved - comes before clock seq low */ (uint8_t)string[7], /* clock seq low */ (uint8_t)string[5], /* node */ (uint8_t)string[4], (uint8_t)string[3], (uint8_t)string[2], (uint8_t)string[1], (uint8_t)string[0]); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "asset-tag")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_ASSET_TAG, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "service-tag")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_SERVICE_TAG, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "chassis-service-tag")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CHASSIS_SERVICE_TAG, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "chassis-related-service-tag")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CHASSIS_RELATED_SERVICE_TAG, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "board-revision")) { if (_get_dell_system_info_short_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_BOARD_REVISION, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "product-name") || !strcasecmp (state_data->prog_data->args->oem_options[0], "platform-model-name")) { if (_get_dell_system_info_long_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_PLATFORM_MODEL_NAME, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "slot-number") || !strcasecmp (state_data->prog_data->args->oem_options[0], "blade-slot-info")) { if (_get_dell_system_info_long_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SLOT_NUMBER, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "system-revision")) { if (_get_dell_system_info_bytes (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_SYSTEM_REVISION, bytes, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, 1, &bytes_len) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%u\n", bytes[0]); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "embedded-video-status")) { char *embedded_video_status_str; if (_get_dell_system_info_bytes (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_EMBEDDED_VIDEO_STATUS, bytes, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, 1, &bytes_len) < 0) goto cleanup; if (bytes[0] == IPMI_OEM_DELL_SYSTEM_INFO_EMBEDDED_VIDEO_STATUS_DISABLED) embedded_video_status_str = "Disabled"; else if (bytes[0] == IPMI_OEM_DELL_SYSTEM_INFO_EMBEDDED_VIDEO_STATUS_ENABLED) embedded_video_status_str = "Enabled"; else embedded_video_status_str = "Unknown"; pstdout_printf (state_data->pstate, "%s\n", embedded_video_status_str); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-info")) { if (_output_dell_system_info_idrac_info (state_data) < 0) goto cleanup; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-ipv4-url")) { if (_get_dell_system_info_long_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_IPV4_URL, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "idrac-gui-webserver-control")) { char *idrac_web_gui_server_control_str; if (_get_dell_system_info_bytes (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_IDRAC_GUI_WEBSERVER_CONTROL, bytes, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES, 1, &bytes_len) < 0) goto cleanup; if (bytes[0] == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_WEB_GUI_SERVER_CONTROL_DISABLED) idrac_web_gui_server_control_str = "Disabled"; else if (bytes[1] == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_WEB_GUI_SERVER_CONTROL_ENABLED) idrac_web_gui_server_control_str = "Enabled"; else idrac_web_gui_server_control_str = "Unknown"; pstdout_printf (state_data->pstate, "%s\n", idrac_web_gui_server_control_str); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-info")) { if (_output_dell_system_info_cmc_info (state_data) < 0) goto cleanup; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv4-url")) { if (_get_dell_system_info_long_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV4_URL, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv6-info")) { if (_output_dell_system_info_cmc_ipv6_info (state_data) < 0) goto cleanup; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cmc-ipv6-url")) { if (_get_dell_system_info_long_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_CMC_IPV6_URL, string, IPMI_OEM_DELL_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", string); } #if 0 /* cannot verify */ else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "snmp-ipv6-info")) { if (_output_dell_system_info_snmp_ipv6_info (state_data) < 0) goto cleanup; } #endif else /* (!strcasecmp (state_data->prog_data->args->oem_options[0], "mac-addresses")) */ { uint8_t idrac_type = 0; int ret; if ((ret = _get_dell_system_info_idrac_info (state_data, NULL, NULL, 0, NULL, 0, &idrac_type)) < 0) goto cleanup; if (ret) { /* iDRAC 10g */ if (idrac_type == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_10G) { if (_output_dell_system_info_10g_mac_addresses (state_data) < 0) goto cleanup; } /* iDRAC 11g or iDRAC 12g */ else if (idrac_type == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MONOLITHIC || idrac_type == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_11G_MODULAR || idrac_type == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MONOLITHIC || idrac_type == IPMI_OEM_DELL_SYSTEM_INFO_IDRAC_INFO_IDRAC_TYPE_12G_MODULAR) { if (_output_dell_system_info_11g_or_12g_mac_addresses (state_data) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "Unrecognized iDRAC system %02Xh\n", idrac_type); goto cleanup; } } else { /* assume iDRAC 10g */ if (_output_dell_system_info_10g_mac_addresses (state_data) < 0) goto cleanup; } } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_nic_selection (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get NIC Selection Request * * 0x30 - OEM network function * 0x25 - OEM cmd * * Get NIC Selection Response * * 0x25 - OEM cmd * 0x?? - Completion Code * 0x?? - NIC selection * - 0x00 = shared * - 0x01 = shared w/ failover to NIC2 * - 0x02 = dedicated * - 0x03 = shared w/ failover to all */ bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_NIC_SELECTION; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_GET_NIC_SELECTION, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; switch (bytes_rs[2]) { case IPMI_OEM_DELL_NIC_SELECTION_SHARED: pstdout_printf (state_data->pstate, "shared\n"); break; case IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_NIC2: pstdout_printf (state_data->pstate, "shared with failover to NIC2\n"); break; case IPMI_OEM_DELL_NIC_SELECTION_DEDICATED: pstdout_printf (state_data->pstate, "dedicated\n"); break; case IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_ALL_NICS: pstdout_printf (state_data->pstate, "shared with failover to all NICs\n"); break; default: pstdout_printf (state_data->pstate, "unknown NIC selection: %Xh\n", bytes_rs[2]); break; } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_nic_selection (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated") && strcasecmp (state_data->prog_data->args->oem_options[0], "shared") && strcasecmp (state_data->prog_data->args->oem_options[0], "shared_failover_nic2") && strcasecmp (state_data->prog_data->args->oem_options[0], "shared_failover_all")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Docs * * Set NIC Selection Request * * 0x30 - OEM network function * 0x24 - OEM cmd * 0x?? - NIC selection * - 0x00 = shared * - 0x01 = shared w/ failover to NIC2 * - 0x02 = dedicated * - 0x03 = shared w/ failover to all * * Set NIC Selection Response * * 0x24 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_DELL_SET_NIC_SELECTION; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "shared")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_SHARED; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "shared_failover_nic2")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_NIC2; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_DEDICATED; else bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_SHARED_WITH_FAILOVER_TO_ALL_NICS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, /* don't care about the 3rd byte, don't know what it is used for */ IPMI_CMD_OEM_DELL_SET_NIC_SELECTION, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_nic_selection_failover (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; char *nic_str; char *failover_str; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get NIC Selection Failover Request * * 0x29 - OEM network function * 0x25 - OEM cmd * * Get NIC Selection Failover Response * * 0x29 - OEM cmd * 0x?? - Completion Code * 0x?? - NIC selection * - 0x01 = dedicated * - 0x02 = lom1 * - 0x03 = lom2 * - 0x04 = lom3 * - 0x05 = lom4 * 0x?? - NIC failover * - 0x00 = none * - 0x02 = lom1 * - 0x03 = lom2 * - 0x04 = lom3 * - 0x05 = lom4 * - 0x05 = all */ bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_NIC_SELECTION_FAILOVER; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_DELL_GET_NIC_SELECTION_FAILOVER, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; switch (bytes_rs[2]) { case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_DEDICATED: nic_str = "dedicated"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM1: nic_str = "lom1"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM2: nic_str = "lom2"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM3: nic_str = "lom3"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM4: nic_str = "lom4"; break; default: nic_str = "unknown"; break; } switch (bytes_rs[3]) { case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_NONE: failover_str = "none"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM1: failover_str = "lom1"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM2: failover_str = "lom2"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM3: failover_str = "lom3"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM4: failover_str = "lom4"; break; case IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_ALL: failover_str = "all"; break; default: failover_str = "unknown"; break; } pstdout_printf (state_data->pstate, "NIC selection : %s", nic_str); pstdout_printf (state_data->pstate, "NIC failover network : %s", failover_str); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_nic_selection_failover (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated") && strcasecmp (state_data->prog_data->args->oem_options[0], "lom1") && strcasecmp (state_data->prog_data->args->oem_options[0], "lom2") && strcasecmp (state_data->prog_data->args->oem_options[0], "lom3") && strcasecmp (state_data->prog_data->args->oem_options[0], "lom4")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "none") && strcasecmp (state_data->prog_data->args->oem_options[1], "lom1") && strcasecmp (state_data->prog_data->args->oem_options[1], "lom2") && strcasecmp (state_data->prog_data->args->oem_options[1], "lom3") && strcasecmp (state_data->prog_data->args->oem_options[1], "lom4") && strcasecmp (state_data->prog_data->args->oem_options[1], "all")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Docs * * Set NIC Selection Failover Request * * 0x28 - OEM network function * 0x24 - OEM cmd * 0x?? - NIC selection * - 0x01 = dedicated * - 0x02 = lom1 * - 0x03 = lom2 * - 0x04 = lom3 * - 0x05 = lom4 * 0x?? - NIC failover * - 0x00 = none * - 0x02 = lom1 * - 0x03 = lom2 * - 0x04 = lom3 * - 0x05 = lom4 * - 0x05 = all * * Set NIC Selection Failover Response * * 0x28 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_DELL_SET_NIC_SELECTION_FAILOVER; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_DEDICATED; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lom1")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lom2")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM2; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lom3")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM3; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "lom4") */ bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_NIC_LOM4; if (!strcasecmp (state_data->prog_data->args->oem_options[1], "none")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_NONE; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "lom1")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM1; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "lom2")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM2; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "lom3")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM3; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "lom4")) bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_LOM4; else /* !strcasecmp (state_data->prog_data->args->oem_options[1], "all") */ bytes_rq[1] = IPMI_OEM_DELL_NIC_SELECTION_FAILOVER_FAILOVER_ALL; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_DELL_SET_NIC_SELECTION_FAILOVER, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _ipmi_oem_dell_get_active_lom_status (ipmi_oem_state_data_t *state_data, uint8_t *bytes_rs, unsigned int bytes_rs_len, uint8_t sub_command) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (bytes_rs); assert (bytes_rs_len); assert (sub_command == IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_GET_STATUS || sub_command == IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_STATUS || sub_command == IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_SPEED || sub_command == IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_MODE); bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_ACTIVE_LOM_STATUS; bytes_rq[1] = sub_command; bytes_rq[2] = 0; bytes_rq[3] = 0; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, bytes_rs_len)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_DELL_GET_ACTIVE_LOM_STATUS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } /* Dell Poweredge R610/R710 (11G) */ static int _ipmi_oem_dell_get_active_lom_status_v1 (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rv = -1; assert (state_data); if (_ipmi_oem_dell_get_active_lom_status (state_data, bytes_rs, IPMI_OEM_MAX_BYTES, IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_GET_STATUS) < 0) goto cleanup; switch (bytes_rs[2]) { case IPMI_OEM_DELL_LOM_STATUS_NO_ACTIVE_LOM: pstdout_printf (state_data->pstate, "dedicated\n"); break; case IPMI_OEM_DELL_LOM_STATUS_LOM_1: pstdout_printf (state_data->pstate, "LOM 1\n"); break; case IPMI_OEM_DELL_LOM_STATUS_LOM_2: pstdout_printf (state_data->pstate, "LOM 2\n"); break; case IPMI_OEM_DELL_LOM_STATUS_LOM_3: pstdout_printf (state_data->pstate, "LOM 3\n"); break; case IPMI_OEM_DELL_LOM_STATUS_LOM_4: pstdout_printf (state_data->pstate, "LOM 4\n"); break; default: pstdout_printf (state_data->pstate, "unknown active LOM\n"); break; } rv = 0; cleanup: return (rv); } /* Dell Poweredge R720 (12G) */ static int _ipmi_oem_dell_get_active_lom_status_v2 (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t active_lom_status; char *active_lom_status_str; uint8_t link_status; char *link_status_str; uint8_t link_speed; char *link_speed_str; uint8_t link_mode; char *link_mode_str; int rv = -1; assert (state_data); if (_ipmi_oem_dell_get_active_lom_status (state_data, bytes_rs, IPMI_OEM_MAX_BYTES, IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_GET_STATUS) < 0) goto cleanup; active_lom_status = bytes_rs[2]; switch (active_lom_status) { case IPMI_OEM_DELL_LOM_STATUS_NO_ACTIVE_LOM: active_lom_status_str = "No LOM active"; break; case IPMI_OEM_DELL_LOM_STATUS_LOM_1: active_lom_status_str = "LOM 1"; break; case IPMI_OEM_DELL_LOM_STATUS_LOM_2: active_lom_status_str = "LOM 2"; break; case IPMI_OEM_DELL_LOM_STATUS_LOM_3: active_lom_status_str = "LOM 3"; break; case IPMI_OEM_DELL_LOM_STATUS_LOM_4: active_lom_status_str = "LOM 4"; break; case IPMI_OEM_DELL_LOM_STATUS_DEDICATED: active_lom_status_str = "Dedicated"; break; default: active_lom_status_str = "Unknown"; break; } if (_ipmi_oem_dell_get_active_lom_status (state_data, bytes_rs, IPMI_OEM_MAX_BYTES, IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_STATUS) < 0) goto cleanup; link_status = (bytes_rs[3] & IPMI_OEM_DELL_LOM_LINK_STATUS_BITMASK); link_status >>= IPMI_OEM_DELL_LOM_LINK_STATUS_SHIFT; switch (link_status) { case IPMI_OEM_DELL_LOM_LINK_STATUS_NO_LINK: link_status_str = "No Link"; break; case IPMI_OEM_DELL_LOM_LINK_STATUS_LINK_PRESENT: link_status_str = "Link Present"; break; default: link_status_str = "Unknown"; break; } if (_ipmi_oem_dell_get_active_lom_status (state_data, bytes_rs, IPMI_OEM_MAX_BYTES, IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_SPEED) < 0) goto cleanup; link_speed = (bytes_rs[3] & IPMI_OEM_DELL_LOM_LINK_SPEED_BITMASK); link_speed >>= IPMI_OEM_DELL_LOM_LINK_SPEED_SHIFT; switch (link_speed) { case IPMI_OEM_DELL_LOM_LINK_SPEED_10MBPS: link_speed_str = "10 Mbps"; break; case IPMI_OEM_DELL_LOM_LINK_SPEED_100MBPS: link_speed_str = "100 Mbps"; break; case IPMI_OEM_DELL_LOM_LINK_SPEED_1GBPS: link_speed_str = "1 Gbps"; break; default: link_speed_str = "Unknown"; break; } if (_ipmi_oem_dell_get_active_lom_status (state_data, bytes_rs, IPMI_OEM_MAX_BYTES, IPMI_OEM_DELL_GET_ACTIVE_LOM_STATUS_LINK_MODE) < 0) goto cleanup; link_mode = (bytes_rs[3] & IPMI_OEM_DELL_LOM_LINK_MODE_BITMASK); link_mode >>= IPMI_OEM_DELL_LOM_LINK_MODE_SHIFT; switch (link_mode) { case IPMI_OEM_DELL_LOM_LINK_MODE_HALF_DUPLEX: link_mode_str = "Half duplex"; break; case IPMI_OEM_DELL_LOM_LINK_MODE_FULL_DUPLEX: link_mode_str = "Full duplex"; break; default: link_mode_str = "Unknown"; break; } pstdout_printf (state_data->pstate, "Active LOM : %s\n", active_lom_status_str); pstdout_printf (state_data->pstate, "Link Status : %s\n", link_status_str); pstdout_printf (state_data->pstate, "Link Speed : %s\n", link_speed_str); pstdout_printf (state_data->pstate, "Link Mode : %s\n", link_mode_str); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_active_lom_status (ipmi_oem_state_data_t *state_data) { assert (state_data); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get Active LOM Status * * 0x30 - OEM network function * 0xC1 - OEM cmd * 0x?? - subcommand * - (11G/12G) - 0h - active lom * - (12G) - 1h - link status * - (12G) - 2h - link speed * - (12G) - 3h - link mode * 0x?? - reserved * 0x?? - reserved * * Get NIC Selection Response * * 0xC1 - OEM cmd * 0x?? - Completion Code * if subcommand active lom * 0x?? - 0x00 = No Lom Active (i.e. dedicated) * - 0x01 = LOM 1 * - 0x02 = LOM 2 * - 0x03 = LOM 3 * - 0x04 = LOM 4 * - 0x05 = dedicated (12G) * - 0xff = unknown * 0x?? - reserved * 0x?? - reserved * if subcommand link status * 0x?? - 0x00 = No Lom Active (i.e. dedicated) * - 0x01 = LOM 1 * - 0x02 = LOM 2 * - 0x03 = LOM 3 * - 0x04 = LOM 4 * - 0x05 = dedicated (12G) * - 0xff = unknown * 0x?? - bits 0:3 - link status * - 0 = no link * - 1 = link present * - bits 4:7 - reserved * 0x?? - reserved * if subcommand link speed * 0x?? - 0x00 = No Lom Active (i.e. dedicated) * - 0x01 = LOM 1 * - 0x02 = LOM 2 * - 0x03 = LOM 3 * - 0x04 = LOM 4 * - 0x05 = dedicated (12G) * - 0xff = unknown * 0x?? - bits 0:3 - link speed * - 00h = 10 mbps * - 01h = 100 mbps * - 02h = 1 gbps * - 0Fh = unknown * - bits 4:7 - reserved * 0x?? - reserved * if subcommand link mode * 0x?? - 0x00 = No Lom Active (i.e. dedicated) * - 0x01 = LOM 1 * - 0x02 = LOM 2 * - 0x03 = LOM 3 * - 0x04 = LOM 4 * - 0x05 = dedicated (12G) * - 0xff = unknown * 0x?? - bits 0:3 - link mode * - 00h = half duplex * - 01h = full duplex * - 0Fh = unknown * - bits 4:7 - reserved * 0x?? - reserved */ if (!state_data->prog_data->args->oem_options_count) return (_ipmi_oem_dell_get_active_lom_status_v1 (state_data)); if (strcasecmp (state_data->prog_data->args->oem_options[0], "v1") && strcasecmp (state_data->prog_data->args->oem_options[0], "v2")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "v1")) return (_ipmi_oem_dell_get_active_lom_status_v1 (state_data)); return (_ipmi_oem_dell_get_active_lom_status_v2 (state_data)); } static int _dell_reserve_extended_configuration (ipmi_oem_state_data_t *state_data, uint8_t *reservation_id) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; /* Dell OEM * * Reserve Extended Configuration Request * * 0x2E - OEM Group (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x01 - OEM cmd * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * * Reserve Extended Configuration Response * * 0x01 - OEM cmd * 0x?? - Completion Code * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * 0x?? - reservation id */ assert (state_data); assert (reservation_id); bytes_rq[0] = IPMI_CMD_OEM_DELL_RESERVED_EXTENDED_CONFIGURATION; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0xFF0000) >> 16; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_DELL_RESERVED_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; (*reservation_id) = bytes_rs[5]; rv = 0; cleanup: return (rv); } static int _dell_extended_oem_strerror (ipmi_oem_state_data_t *state_data, uint8_t comp_code, uint8_t cmd, uint8_t netfn, char *errbuf, unsigned int errbuflen) { assert (state_data); assert (comp_code != IPMI_COMP_CODE_COMMAND_SUCCESS); switch (netfn) { case IPMI_NET_FN_OEM_GROUP_RQ: case IPMI_NET_FN_OEM_GROUP_RS: switch (cmd) { case IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION: case IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION: switch (comp_code) { case IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED_STR); return (1); break; } break; } break; case IPMI_NET_FN_OEM_DELL_GENERIC_RQ: case IPMI_NET_FN_OEM_DELL_GENERIC_RS: switch (cmd) { case IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2: case IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2: switch (comp_code) { case IPMI_COMP_CODE_OEM_DELL_SUBSYSTEM_LEVEL_POWER_IS_NOT_SUPPORTED: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_DELL_SUBSYSTEM_LEVEL_POWER_IS_NOT_SUPPORTED_STR); return (1); break; } break; } break; } return (0); } static int _dell_get_extended_configuration (ipmi_oem_state_data_t *state_data, uint8_t token_id, uint8_t *token_data, unsigned int token_data_len, unsigned int expected_valid_field_mask, unsigned int *token_data_read) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t bytes_read; uint8_t expected_bytes_read; uint16_t token_len = 0; uint8_t token_version; uint16_t valid_field_mask; uint8_t reservation_id = 0; uint16_t offset = 0; int rs_len; int rv = -1; assert (state_data); assert (token_data); assert (token_data_len); assert (expected_valid_field_mask); assert (token_data_read); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get Extended Configuration Request * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x02 - OEM cmd * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * 0x?? - reservation id * 0x?? - token ID * 0x?? - index (used by index objects only) * 0x?? - data offset - LSB * 0x?? - data offset - MSB * 0x?? - bytes to read (1 based, 0xFF = all) * * Get Extended Configuration Response * * 0x02 - OEM cmd * 0x?? - Completion Code * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * 0x?? - token ID * 0x?? - index (used by index objects only) * 0x?? - bytes of data returned (1 based) * 0x??+ - token data */ while (offset < 0xFFFF) { if (_dell_reserve_extended_configuration (state_data, &reservation_id) < 0) goto cleanup; bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0xFF0000) >> 16; bytes_rq[4] = reservation_id; bytes_rq[5] = token_id; bytes_rq[6] = 0x00; bytes_rq[7] = (offset & 0x00FF); bytes_rq[8] = (offset & 0xFF00) >> 8; bytes_rq[9] = IPMI_OEM_DELL_EXTENDED_CONFIG_READ_ALL_BYTES; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 10, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* atleast 8 bytes of non-token-data + common header */ if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 8 + IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN, IPMI_CMD_OEM_DELL_GET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, _dell_extended_oem_strerror) < 0) goto cleanup; bytes_read = bytes_rs[7]; expected_bytes_read = rs_len - 8; if (bytes_read != expected_bytes_read) { pstdout_fprintf (state_data->pstate, stderr, "invalid bytes read returned: expected = %u, returned %u\n", bytes_read, expected_bytes_read); goto cleanup; } /* check token common header */ if (!offset) { token_len = bytes_rs[8]; token_len |= (bytes_rs[9] << 8); token_version = bytes_rs[10]; if (token_version != IPMI_OEM_DELL_TOKEN_VERSION) { pstdout_fprintf (state_data->pstate, stderr, "invalid token version returned: expected = %Xh, returned %Xh\n", IPMI_OEM_DELL_TOKEN_VERSION, token_version); goto cleanup; } valid_field_mask = bytes_rs[11]; valid_field_mask |= (bytes_rs[12] << 8); if (valid_field_mask != expected_valid_field_mask) { pstdout_fprintf (state_data->pstate, stderr, "invalid field mask returned: expected = %Xh, returned %Xh\n", expected_valid_field_mask, valid_field_mask); goto cleanup; } } if ((offset + bytes_read) > token_data_len) { pstdout_fprintf (state_data->pstate, stderr, "buffer overflow: offset + bytes_read = %u\n", (offset + bytes_read)); goto cleanup; } memcpy (token_data + offset, &bytes_rs[8], bytes_read); offset += bytes_read; if (token_len <= offset) break; } if (offset != token_len) { pstdout_fprintf (state_data->pstate, stderr, "invalid token length returned: expected = %u, read = %u\n", token_len, offset); goto cleanup; } (*token_data_read) = offset; rv = 0; cleanup: return (rv); } static int _dell_set_extended_configuration (ipmi_oem_state_data_t *state_data, uint8_t token_id, uint8_t *token_data, unsigned int token_data_len, unsigned int valid_field_mask) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint16_t token_len; uint8_t reservation_id = 0; uint16_t offset = 0; int rs_len; int rv = -1; assert (state_data); assert (token_data); assert (token_data_len); assert (valid_field_mask); /* Dell Poweredge OEM * * From Dell Provided Docs * * Set Extended Configuration Request * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x03 - OEM cmd * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * 0x?? - reservation id * 0x?? - token ID * 0x?? - index (used by index objects only) * 0x?? - data offset - LSB * 0x?? - data offset - MSB * 0x?? - [7:4] - reserved * - [3:0] - in progress * - 0 in progress * - 1 last token data being transfered in this request * 0x??+ - token data * * Response * * 0x03 - OEM cmd * 0x?? - Completion Code * 0x?? - Dell IANA (LSB first) * 0x?? - Dell IANA * 0x?? - Dell IANA * 0x?? - bytes written */ token_len = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + token_data_len; while (offset < 0xFFFF) { unsigned int write_length = 0; unsigned int token_write_length = 0; if (_dell_reserve_extended_configuration (state_data, &reservation_id) < 0) goto cleanup; /* bytes_written response is 1 byte, so presumably you can write * up to 255 bytes of data. However, IPMI over LAN has a max * payload length of 255 total. At this point stage of the API, * there's no way to know what is legit to use. So we round * down IPMI_OEM_DELL_TOKEN_WRITE_MAX to some reasonable * guestimate of what is good. */ bytes_rq[0] = IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_DELL & 0xFF0000) >> 16; bytes_rq[4] = reservation_id; bytes_rq[5] = token_id; bytes_rq[6] = 0x00; bytes_rq[7] = (offset & 0x00FF); bytes_rq[8] = (offset & 0xFF00) >> 8; if (!offset) { /* common header */ bytes_rq[10] = (token_len & 0x00FF); bytes_rq[11] = (token_len & 0xFF00) >> 8; bytes_rq[12] = IPMI_OEM_DELL_TOKEN_VERSION; bytes_rq[13] = (valid_field_mask & 0x00FF); bytes_rq[14] = (valid_field_mask & 0xFF00) >> 8; /* - 5 for the common header */ if ((token_data_len - offset) > (IPMI_OEM_DELL_TOKEN_WRITE_MAX - IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN)) write_length = IPMI_OEM_DELL_TOKEN_WRITE_MAX - IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN; else write_length = (token_data_len - offset); memcpy (&bytes_rq[15], token_data + offset, write_length); token_write_length = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + write_length; } else { if ((token_data_len - offset) > IPMI_OEM_DELL_TOKEN_WRITE_MAX) write_length = IPMI_OEM_DELL_TOKEN_WRITE_MAX; else write_length = (token_data_len - offset); memcpy (&bytes_rq[10], token_data + offset, write_length); token_write_length = write_length; } if (token_len <= (offset + token_write_length)) bytes_rq[9] = IPMI_OEM_DELL_EXTENDED_CONFIG_LAST_TOKEN; else bytes_rq[9] = IPMI_OEM_DELL_EXTENDED_CONFIG_IN_PROGRESS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 10 + token_write_length, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_DELL_SET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, _dell_extended_oem_strerror) < 0) goto cleanup; if (bytes_rs[5] != token_write_length) { pstdout_fprintf (state_data->pstate, stderr, "invalid data length written: expected = %u, returned %u\n", token_write_length, bytes_rs[5]); goto cleanup; } offset += bytes_rs[5]; if (token_len <= offset) break; } if (offset != token_len) { pstdout_fprintf (state_data->pstate, stderr, "invalid token length written: expected = %u, write = %u\n", token_len, offset); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_ssh_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t expected_valid_field_mask = IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ALL_FIELD_MASK; unsigned int token_data_read = 0; unsigned int expected_token_data_read = 0; uint8_t sshenable; uint8_t maxconnections; uint8_t activeconnections; uint32_t idletimeout; uint16_t portnumber; int rv = -1; /* Dell OEM * * SSH Token Data - Token ID 0Ah * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * SSH data * * byte 6 - SSHEnable * byte 7 - MaxConnections (read only) * byte 8 - ActiveConnections (read only) * byte 9 - 12 - IdleTimeout * byte 13 - 14 - PortNumber */ assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_dell_get_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_SSH_CONFIGURATION, token_data, IPMI_OEM_DELL_TOKEN_DATA_MAX, expected_valid_field_mask, &token_data_read) < 0) goto cleanup; expected_token_data_read = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + 9; if (token_data_read != expected_token_data_read) { pstdout_fprintf (state_data->pstate, stderr, "invalid token data length returned: expected = %u, returned %u\n", expected_token_data_read, token_data_read); goto cleanup; } sshenable = token_data[5]; maxconnections = token_data[6]; activeconnections = token_data[7]; idletimeout = token_data[8]; idletimeout |= (token_data[9] << 8); idletimeout |= (token_data[10] << 16); idletimeout |= (token_data[11] << 24); portnumber = token_data[12]; portnumber |= (token_data[13] << 8); pstdout_printf (state_data->pstate, "SSH : %s\n", (sshenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Max Connections : %u\n", maxconnections); pstdout_printf (state_data->pstate, "Active Connections : %u\n", activeconnections); pstdout_printf (state_data->pstate, "Idle Timeout : %u seconds\n", idletimeout); pstdout_printf (state_data->pstate, "Port Number : %u\n", portnumber); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_ssh_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t valid_field_mask = 0; uint8_t sshenable = 0; uint32_t idletimeout = 0; uint16_t portnumber = 0; int rv = -1; unsigned int i; /* Dell OEM * * SSH Token Data - Token ID 0Ah * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * SSH data * * byte 6 - SSHEnable * byte 7 - MaxConnections (read only) * byte 8 - ActiveConnections (read only) * byte 9 - 12 - IdleTimeout * byte 13 - 14 - PortNumber */ assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: ssh=enable|disable\n" "Option: idletimeout=seconds\n" "Option: portnumber=num\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "ssh")) { if (ipmi_oem_parse_enable (state_data, i, value, &sshenable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_ENABLE_FIELD_MASK; } else if (!strcasecmp (key, "idletimeout")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &idletimeout) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_IDLE_TIMEOUT_FIELD_MASK; } else if (!strcasecmp (key, "portnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &portnumber) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_SSH_CONFIGURATION_PORT_NUMBER_FIELD_MASK; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } token_data[0] = sshenable; token_data[1] = 0; /* maxconnections is read only */ token_data[2] = 0; /* activeconnections is read only */ token_data[3] = (idletimeout & 0x000000FF); token_data[4] = (idletimeout & 0x0000FF00) >> 8; token_data[5] = (idletimeout & 0x00FF0000) >> 16; token_data[6] = (idletimeout & 0xFF000000) >> 24; token_data[7] = (portnumber & 0x00FF); token_data[8] = (portnumber & 0xFF00) >> 8; if (_dell_set_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_SSH_CONFIGURATION, token_data, 9, valid_field_mask) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_telnet_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t expected_valid_field_mask = IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ALL_FIELD_MASK; unsigned int token_data_read = 0; unsigned int expected_token_data_read = 0; uint8_t telnetenable; uint8_t maxsessions; uint8_t activesessions; uint32_t sessiontimeout; uint16_t portnumber; uint8_t telnet7flsbackspace; int rv = -1; /* Dell OEM * * Telnet Token Data - Token ID 0Bh * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Telnet data * * byte 6 - telnetenable * byte 7 - maxsessions (read only) * byte 8 - activesessions (read only) * byte 9 - 12 - sessiontimeout * byte 13 - 14 - portnumber * byte 15 - telnet7flsbackspace */ assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_dell_get_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_TELNET_CONFIGURATION, token_data, IPMI_OEM_DELL_TOKEN_DATA_MAX, expected_valid_field_mask, &token_data_read) < 0) goto cleanup; expected_token_data_read = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + 10; if (token_data_read != expected_token_data_read) { pstdout_fprintf (state_data->pstate, stderr, "invalid token data length returned: expected = %u, returned %u\n", expected_token_data_read, token_data_read); goto cleanup; } telnetenable = token_data[5]; maxsessions = token_data[6]; activesessions = token_data[7]; sessiontimeout = token_data[8]; sessiontimeout |= (token_data[9] << 8); sessiontimeout |= (token_data[10] << 16); sessiontimeout |= (token_data[11] << 24); portnumber = token_data[12]; portnumber |= (token_data[13] << 8); telnet7flsbackspace = token_data[14]; pstdout_printf (state_data->pstate, "Telnet : %s\n", (telnetenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Max Sessions : %u\n", maxsessions); pstdout_printf (state_data->pstate, "Active Sessions : %u\n", activesessions); pstdout_printf (state_data->pstate, "Session Timeout : %u seconds\n", sessiontimeout); pstdout_printf (state_data->pstate, "Port Number : %u\n", portnumber); /* 7 FLS backspace is apparently an alternate backspace char * used in windows telnet implementations. */ pstdout_printf (state_data->pstate, "7 FLS Backspace : %s\n", (telnet7flsbackspace) ? "Enabled" : "Disabled"); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_telnet_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t valid_field_mask = 0; uint8_t telnetenable = 0; uint32_t sessiontimeout = 0; uint16_t portnumber = 0; uint8_t _7flsenable = 0; int rv = -1; unsigned int i; /* Dell OEM * * Telnet Token Data - Token ID 0Bh * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Telnet data * * byte 6 - telnetenable * byte 7 - maxsessions (read only) * byte 8 - activesessions (read only) * byte 9 - 12 - sessiontimeout * byte 13 - 14 - portnumber * byte 15 - telnet7flsbackspace */ assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: telnet=enable|disable\n" "Option: sessiontimeout=seconds\n" "Option: portnumber=num\n" "Option: 7fls=enable|disable"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "telnet")) { if (ipmi_oem_parse_enable (state_data, i, value, &telnetenable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_ENABLE_FIELD_MASK; } else if (!strcasecmp (key, "sessiontimeout")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &sessiontimeout) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK; } else if (!strcasecmp (key, "portnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &portnumber) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_PORT_NUMBER_FIELD_MASK; } else if (!strcasecmp (key, "7fls")) { if (ipmi_oem_parse_enable (state_data, i, value, &_7flsenable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_TELNET_CONFIGURATION_7FLS_BACKSPACE_FIELD_MASK; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } token_data[0] = telnetenable; token_data[1] = 0; /* maxsessions is read only */ token_data[2] = 0; /* activesessions is read only */ token_data[3] = (sessiontimeout & 0x000000FF); token_data[4] = (sessiontimeout & 0x0000FF00) >> 8; token_data[5] = (sessiontimeout & 0x00FF0000) >> 16; token_data[6] = (sessiontimeout & 0xFF000000) >> 24; token_data[7] = (portnumber & 0x00FF); token_data[8] = (portnumber & 0xFF00) >> 8; token_data[9] = _7flsenable; if (_dell_set_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_TELNET_CONFIGURATION, token_data, 10, valid_field_mask) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_web_server_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t expected_valid_field_mask = IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ALL_FIELD_MASK; unsigned int token_data_read = 0; unsigned int expected_token_data_read = 0; uint8_t webserverenable; uint8_t maxsessions; uint8_t activesessions; uint32_t sessiontimeout; uint16_t httpportnumber; uint16_t httpsportnumber; int rv = -1; /* Dell OEM * * Web Server Token Data - Token ID 0Ch * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Web Server data * * byte 6 - webserverenable * byte 7 - maxsessions (read only) * byte 8 - activesessions (read only) * byte 9 - 12 - sessiontimeout * byte 13 - 14 - httpportnumber * byte 15 - 16 - httpsportnumber */ assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_dell_get_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_WEB_SERVER_CONFIGURATION, token_data, IPMI_OEM_DELL_TOKEN_DATA_MAX, expected_valid_field_mask, &token_data_read) < 0) goto cleanup; expected_token_data_read = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + 11; if (token_data_read != expected_token_data_read) { pstdout_fprintf (state_data->pstate, stderr, "invalid token data length returned: expected = %u, returned %u\n", expected_token_data_read, token_data_read); goto cleanup; } webserverenable = token_data[5]; maxsessions = token_data[6]; activesessions = token_data[7]; sessiontimeout = token_data[8]; sessiontimeout |= (token_data[9] << 8); sessiontimeout |= (token_data[10] << 16); sessiontimeout |= (token_data[11] << 24); httpportnumber = token_data[12]; httpportnumber |= (token_data[13] << 8); httpsportnumber = token_data[14]; httpsportnumber |= (token_data[15] << 8); pstdout_printf (state_data->pstate, "Web Server : %s\n", (webserverenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Max Sessions : %u\n", maxsessions); pstdout_printf (state_data->pstate, "Active Sessions : %u\n", activesessions); pstdout_printf (state_data->pstate, "Session Timeout : %u seconds\n", sessiontimeout); pstdout_printf (state_data->pstate, "http Port Number : %u\n", httpportnumber); pstdout_printf (state_data->pstate, "https Port Number : %u\n", httpsportnumber); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_web_server_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t valid_field_mask = 0; uint8_t webserverenable = 0; uint32_t sessiontimeout = 0; uint16_t httpportnumber = 0; uint16_t httpsportnumber = 0; int rv = -1; unsigned int i; /* Dell OEM * * Web Server Token Data - Token ID 0Ch * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Web Server data * * byte 6 - webserverenable * byte 7 - maxsessions (read only) * byte 8 - activesessions (read only) * byte 9 - 12 - sessiontimeout * byte 13 - 14 - httpportnumber * byte 15 - 16 - httpsportnumber */ assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: webserver=enable|disable\n" "Option: sessiontimeout=seconds\n" "Option: httpportnumber=num\n" "Option: httpsportnumber=num\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "webserver")) { if (ipmi_oem_parse_enable (state_data, i, value, &webserverenable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_ENABLE_FIELD_MASK; } else if (!strcasecmp (key, "sessiontimeout")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &sessiontimeout) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_SESSION_TIMEOUT_FIELD_MASK; } else if (!strcasecmp (key, "httpportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &httpportnumber) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUMBER_FIELD_MASK; } else if (!strcasecmp (key, "httpsportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &httpsportnumber) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUMBER_FIELD_MASK; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } token_data[0] = webserverenable; token_data[1] = 0; /* maxessions is read only */ token_data[2] = 0; /* activesessions is read only */ token_data[3] = (sessiontimeout & 0x000000FF); token_data[4] = (sessiontimeout & 0x0000FF00) >> 8; token_data[5] = (sessiontimeout & 0x00FF0000) >> 16; token_data[6] = (sessiontimeout & 0xFF000000) >> 24; token_data[7] = (httpportnumber & 0x00FF); token_data[8] = (httpportnumber & 0xFF00) >> 8; token_data[9] = (httpsportnumber & 0x00FF); token_data[10] = (httpsportnumber & 0xFF00) >> 8; if (_dell_set_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_WEB_SERVER_CONFIGURATION, token_data, 11, valid_field_mask) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_active_directory_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_MAX_BYTES]; uint16_t expected_valid_field_mask = IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_ALL_FIELD_MASK; unsigned int token_data_read = 0; unsigned int min_token_data_read = 0; uint8_t ad_enable; uint32_t ad_timeout; uint8_t ad_root_domain_string_length; char ad_root_domain_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_rac_domain_string_length; char ad_rac_domain_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_rac_name_string_length; char ad_rac_name_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_type; char *ad_type_str; uint8_t scl_state; uint8_t crl_state; uint8_t ad_sso_enable; uint8_t ad_dc_filter1_string_length; char ad_dc_filter1_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_dc_filter2_string_length; char ad_dc_filter2_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_dc_filter3_string_length; char ad_dc_filter3_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter1_string_length; char ad_gc_filter1_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter2_string_length; char ad_gc_filter2_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter3_string_length; char ad_gc_filter3_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_certificate_validation_enable; unsigned int offset = 0; int rv = -1; /* Dell OEM * * Active Directory Token Data - Token ID 07h * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Active Directory Token data * * byte 6 - active directory enable * byte 7-10 - active directory timeout * byte 11 - active directory root domain string length * byte y-z (0-255) - active directory root domain string * byte x - active directory remote access controller domain string length * byte y-z (0-255) - active directory remote access controller domain string * byte x - active directory remote access controller name string length * byte y-z (0-255) - active directory remote access controller name string * byte x - active directory type (1 == extended schema, 2 == standard schema) * byte x - Smart Card Logon State (a boolean on iDRAC6, possibly not on iDRAC5??) * byte x - Certificate Revocation List State (a boolean on iDRAC6, possibly not on iDRAC5??) * byte x - active directory single sign on enable * byte x - active directory domain controller filter 1 string length * byte y-z (0-255) - active directory domain controller filter 1 string * byte x - active directory domain controller filter 2 string length * byte y-z (0-255) - active directory domain controller filter 2 string * byte x - active directory domain controller filter 3 string length * byte y-z (0-255) - active directory domain controller filter 3 string * byte x - active directory global catalog filter 1 string length * byte y-z (0-255) - active directory global catalog filter 1 string * byte x - active directory global catalog filter 2 string length * byte y-z (0-255) - active directory global catalog filter 2 string * byte x - active directory global catalog filter 3 string length * byte y-z (0-255) - active directory global catalog filter 3 string * byte x - active directory certificate validate enable */ assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (ad_root_domain_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_rac_domain_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_rac_name_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_dc_filter1_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_dc_filter2_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_dc_filter3_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_gc_filter1_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_gc_filter2_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); memset (ad_gc_filter3_string, '\0', IPMI_OEM_DELL_TOKEN_STRING_MAX+1); if (_dell_get_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_AD_CONFIGURATION, token_data, IPMI_OEM_DELL_TOKEN_DATA_MAX, expected_valid_field_mask, &token_data_read) < 0) goto cleanup; min_token_data_read = IPMI_OEM_DELL_TOKEN_DATA_COMMON_HEADER_LEN + 19; if (token_data_read < min_token_data_read) { pstdout_fprintf (state_data->pstate, stderr, "invalid token data length returned: min = %u, returned %u\n", min_token_data_read, token_data_read); goto cleanup; } offset = 5; ad_enable = token_data[offset]; offset++; ad_timeout = token_data[offset]; offset++; ad_timeout |= (token_data[offset] << 8); offset++; ad_timeout |= (token_data[offset] << 16); offset++; ad_timeout |= (token_data[offset] << 24); offset++; ad_root_domain_string_length = token_data[offset]; offset++; if (ad_root_domain_string_length) { memcpy (ad_root_domain_string, &token_data[offset], ad_root_domain_string_length); offset += ad_root_domain_string_length; } ad_rac_domain_string_length = token_data[offset]; offset++; if (ad_rac_domain_string_length) { memcpy (ad_rac_domain_string, &token_data[offset], ad_rac_domain_string_length); offset += ad_rac_domain_string_length; } ad_rac_name_string_length = token_data[offset]; offset++; if (ad_rac_name_string_length) { memcpy (ad_rac_name_string, &token_data[offset], ad_rac_name_string_length); offset += ad_rac_name_string_length; } ad_type = token_data[offset]; offset++; scl_state = token_data[offset]; offset++; crl_state = token_data[offset]; offset++; ad_sso_enable = token_data[offset]; offset++; ad_dc_filter1_string_length = token_data[offset]; offset++; if (ad_dc_filter1_string_length) { memcpy (ad_dc_filter1_string, &token_data[offset], ad_dc_filter1_string_length); offset += ad_dc_filter1_string_length; } ad_dc_filter2_string_length = token_data[offset]; offset++; if (ad_dc_filter2_string_length) { memcpy (ad_dc_filter2_string, &token_data[offset], ad_dc_filter2_string_length); offset += ad_dc_filter2_string_length; } ad_dc_filter3_string_length = token_data[offset]; offset++; if (ad_dc_filter3_string_length) { memcpy (ad_dc_filter3_string, &token_data[offset], ad_dc_filter3_string_length); offset += ad_dc_filter3_string_length; } ad_gc_filter1_string_length = token_data[offset]; offset++; if (ad_gc_filter1_string_length) { memcpy (ad_gc_filter1_string, &token_data[offset], ad_gc_filter1_string_length); offset += ad_gc_filter1_string_length; } ad_gc_filter2_string_length = token_data[offset]; offset++; if (ad_gc_filter2_string_length) { memcpy (ad_gc_filter2_string, &token_data[offset], ad_gc_filter2_string_length); offset += ad_gc_filter2_string_length; } ad_gc_filter3_string_length = token_data[offset]; offset++; if (ad_gc_filter3_string_length) { memcpy (ad_gc_filter3_string, &token_data[offset], ad_gc_filter3_string_length); offset += ad_gc_filter3_string_length; } ad_certificate_validation_enable = token_data[offset]; offset++; pstdout_printf (state_data->pstate, "Active Directory : %s\n", (ad_enable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Timeout : %u seconds\n", ad_timeout); pstdout_printf (state_data->pstate, "Root Domain : %s\n", ad_root_domain_string); pstdout_printf (state_data->pstate, "Remote Access Controller Domain : %s\n", ad_rac_domain_string); pstdout_printf (state_data->pstate, "Remote Access Controller Name : %s\n", ad_rac_name_string); if (ad_type == 1) ad_type_str = "Extended Schema"; else if (ad_type == 2) ad_type_str = "Standard Schema"; else ad_type_str = "Unknown"; pstdout_printf (state_data->pstate, "Type : %s\n", ad_type_str); pstdout_printf (state_data->pstate, "Smart Card Logon : %s\n", (scl_state) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Certificate Revocation List : %s\n", (crl_state) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Single Sign On : %s\n", (ad_sso_enable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Domain Controller Filter 1 : %s\n", ad_dc_filter1_string); pstdout_printf (state_data->pstate, "Domain Controller Filter 2 : %s\n", ad_dc_filter2_string); pstdout_printf (state_data->pstate, "Domain Controller Filter 3 : %s\n", ad_dc_filter3_string); pstdout_printf (state_data->pstate, "Global Catalog Filter 1 : %s\n", ad_gc_filter1_string); pstdout_printf (state_data->pstate, "Global Catalog Filter 2 : %s\n", ad_gc_filter2_string); pstdout_printf (state_data->pstate, "Global Catalog Filter 3 : %s\n", ad_gc_filter3_string); pstdout_printf (state_data->pstate, "Certificate Validation : %s\n", (ad_certificate_validation_enable) ? "Enabled" : "Disabled"); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_active_directory_config (ipmi_oem_state_data_t *state_data) { uint8_t token_data[IPMI_OEM_DELL_TOKEN_DATA_MAX]; uint16_t valid_field_mask = 0; uint8_t ad_enable = 0; uint32_t ad_timeout = 0; uint8_t ad_root_domain_string_length = 0; char ad_root_domain_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_rac_domain_string_length = 0; char ad_rac_domain_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_rac_name_string_length = 0; char ad_rac_name_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_type = 0; uint8_t scl_state = 0; uint8_t crl_state = 0; uint8_t ad_sso_enable = 0; uint8_t ad_dc_filter1_string_length = 0; char ad_dc_filter1_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_dc_filter2_string_length = 0; char ad_dc_filter2_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_dc_filter3_string_length = 0; char ad_dc_filter3_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter1_string_length = 0; char ad_gc_filter1_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter2_string_length = 0; char ad_gc_filter2_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_gc_filter3_string_length = 0; char ad_gc_filter3_string[IPMI_OEM_DELL_TOKEN_STRING_MAX+1]; uint8_t ad_certificate_validation_enable = 0; unsigned int offset = 0; int rv = -1; unsigned int i; /* Dell OEM * * Active Directory Token Data - Token ID 07h * * Common Header * * byte 1 - total size of token data (including common header) - LSB * byte 2 - total size of token data (including common header) - MSB * byte 3 - token version (0x01) * byte 4 - valid field mask (LSB) * byte 5 - valid field mask (MSB) * * Active Directory Token data * * byte 6 - active directory enable * byte 7-10 - active directory timeout * byte 11 - active directory root domain string length * byte y-z (0-255) - active directory root domain string * byte x - active directory remote access controller domain string length * byte y-z (0-255) - active directory remote access controller domain string * byte x - active directory remote access controller name string length * byte y-z (0-255) - active directory remote access controller name string * byte x - active directory type (1 == extended schema, 2 == standard schema) * byte x - Smart Card Logon State (a boolean on iDRAC6, possibly not on iDRAC5??) * byte x - Certificate Revocation List State (a boolean on iDRAC6, possibly not on iDRAC5??) * byte x - active directory single sign on enable * byte x - active directory domain controller filter 1 string length * byte y-z (0-255) - active directory domain controller filter 1 string * byte x - active directory domain controller filter 2 string length * byte y-z (0-255) - active directory domain controller filter 2 string * byte x - active directory domain controller filter 3 string length * byte y-z (0-255) - active directory domain controller filter 3 string * byte x - active directory global catalog filter 1 string length * byte y-z (0-255) - active directory global catalog filter 1 string * byte x - active directory global catalog filter 2 string length * byte y-z (0-255) - active directory global catalog filter 2 string * byte x - active directory global catalog filter 3 string length * byte y-z (0-255) - active directory global catalog filter 3 string * byte x - active directory certificate validate enable */ assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: activedirectory=enable|disable\n" "Option: timeout=seconds\n" "Option: type=extended|standard\n" "Option: sso=enable|disable\n" "Option: certificatevalidation=enable|disable\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "activedirectory")) { if (ipmi_oem_parse_enable (state_data, i, value, &ad_enable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ENABLE_FIELD_MASK; } else if (!strcasecmp (key, "timeout")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &ad_timeout) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TIMEOUT_FIELD_MASK; } #if 0 /* don't support for now */ else if (!strcasecmp (key, "rootdomain")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_root_domain_string_length, ad_root_domain_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_ROOT_DOMAIN_FIELD_MASK; } else if (!strcasecmp (key, "racdomain")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_rac_domain_string_length, ad_rac_domain_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_DOMAIN_FIELD_MASK; } else if (!strcasecmp (key, "racname")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_rac_name_string_length, ad_rac_name_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_RAC_NAME_FIELD_MASK; } #endif else if (!strcasecmp (key, "type")) { if (strcasecmp (value, "extended") && strcasecmp (value, "standard")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); return (-1); } if (!strcasecmp (value, "extended")) ad_type = IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_TYPE_EXTENDED; else ad_type = IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_TYPE_STANDARD; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_TYPE_FIELD_MASK; } #if 0 /* read only on iDRAC6 */ else if (!strcasecmp (key, "smartcardlogon")) { if (ipmi_oem_parse_enable (state_data, i, value, &scl_state) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_SCL_STATE_FIELD_MASK; } #endif #if 0 /* read only on iDRAC6 */ else if (!strcasecmp (key, "certificaterevocationlist")) { if (ipmi_oem_parse_enable (state_data, i, value, &crl_state) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_CRL_STATE_FIELD_MASK; } #endif else if (!strcasecmp (key, "sso")) { if (ipmi_oem_parse_enable (state_data, i, value, &ad_sso_enable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_SSO_ENABLE_FIELD_MASK; } #if 0 /* don't support for now */ else if (!strcasecmp (key, "dcfilter1")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_dc_filter1_string_length, ad_dc_filter1_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER1_FIELD_MASK; } else if (!strcasecmp (key, "dcfilter2")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_dc_filter2_string_length, ad_dc_filter2_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER2_FIELD_MASK; } else if (!strcasecmp (key, "dcfilter3")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_dc_filter3_string_length, ad_dc_filter3_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_DC_FILTER3_FIELD_MASK; } else if (!strcasecmp (key, "gcfilter1")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_gc_filter1_string_length, ad_gc_filter1_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER1_FIELD_MASK; } else if (!strcasecmp (key, "gcfilter2")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_gc_filter2_string_length, ad_gc_filter2_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER2_FIELD_MASK; } else if (!strcasecmp (key, "gcfilter3")) { if (ipmi_oem_parse_string (state_data, i, value, &ad_gc_filter3_string_length, ad_gc_filter3_string, IPMI_OEM_DELL_TOKEN_STRING_MAX) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_GC_FILTER3_FIELD_MASK; } #endif else if (!strcasecmp (key, "certificatevalidation")) { if (ipmi_oem_parse_enable (state_data, i, value, &ad_certificate_validation_enable) < 0) goto cleanup; valid_field_mask |= IPMI_OEM_DELL_EXTENDED_CONFIG_AD_CONFIGURATION_AD_CERTIFICATE_VALIDATION_ENABLE_FIELD_MASK; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } offset = 0; token_data[offset] = ad_enable; offset++; token_data[offset] = (ad_timeout & 0x000000FF); offset++; token_data[offset] = (ad_timeout & 0x0000FF00) >> 8; offset++; token_data[offset] = (ad_timeout & 0x00FF0000) >> 16; offset++; token_data[offset] = (ad_timeout & 0xFF000000) >> 24; offset++; token_data[offset] = ad_root_domain_string_length; offset++; if (ad_root_domain_string_length) { memcpy (&token_data[offset], ad_root_domain_string, ad_root_domain_string_length); offset += ad_root_domain_string_length; } token_data[offset] = ad_rac_domain_string_length; offset++; if (ad_rac_domain_string_length) { memcpy (&token_data[offset], ad_rac_domain_string, ad_rac_domain_string_length); offset += ad_rac_domain_string_length; } token_data[offset] = ad_rac_name_string_length; offset++; if (ad_rac_name_string_length) { memcpy (&token_data[offset], ad_rac_name_string, ad_rac_name_string_length); offset += ad_rac_name_string_length; } token_data[offset] = ad_type; offset++; token_data[offset] = scl_state; offset++; token_data[offset] = crl_state; offset++; token_data[offset] = ad_sso_enable; offset++; token_data[offset] = ad_dc_filter1_string_length; offset++; if (ad_dc_filter1_string_length) { memcpy (&token_data[offset], ad_dc_filter1_string, ad_dc_filter1_string_length); offset += ad_dc_filter1_string_length; } token_data[offset] = ad_dc_filter2_string_length; offset++; if (ad_dc_filter2_string_length) { memcpy (&token_data[offset], ad_dc_filter2_string, ad_dc_filter2_string_length); offset += ad_dc_filter2_string_length; } token_data[offset] = ad_dc_filter3_string_length; offset++; if (ad_dc_filter3_string_length) { memcpy (&token_data[offset], ad_dc_filter3_string, ad_dc_filter3_string_length); offset += ad_dc_filter3_string_length; } token_data[offset] = ad_gc_filter1_string_length; offset++; if (ad_gc_filter1_string_length) { memcpy (&token_data[offset], ad_gc_filter1_string, ad_gc_filter1_string_length); offset += ad_gc_filter1_string_length; } token_data[offset] = ad_gc_filter2_string_length; offset++; if (ad_gc_filter2_string_length) { memcpy (&token_data[offset], ad_gc_filter2_string, ad_gc_filter2_string_length); offset += ad_gc_filter2_string_length; } token_data[offset] = ad_gc_filter3_string_length; offset++; if (ad_gc_filter3_string_length) { memcpy (&token_data[offset], ad_gc_filter3_string, ad_gc_filter3_string_length); offset += ad_gc_filter3_string_length; } token_data[offset] = ad_certificate_validation_enable; offset++; if (_dell_set_extended_configuration (state_data, IPMI_OEM_DELL_TOKEN_ID_AD_CONFIGURATION, token_data, offset, valid_field_mask) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_reset_to_defaults (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * From Dell Provided Source Code * * Request * * 0x30 - OEM network function * 0x21 - OEM cmd * 0x00 | 0xaa - 0x00 = get status * - 0xaa = initiate reset to defaults * * Response * * 0x21 - OEM cmd * 0x?? - Completion Code * 0x00 | 0x01 - 0x00 = reset to defaults in progress * - 0x01 = reset to defaults complete */ bytes_rq[0] = IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS; bytes_rq[1] = IPMI_OEM_DELL_RESET_TO_DEFAULTS_INITIATE_RESULT_TO_DEFAULTS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; /* don't quit until it is done */ while (1) { bytes_rq[0] = IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS; bytes_rq[1] = IPMI_OEM_DELL_RESET_TO_DEFAULTS_GET_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_RESET_TO_DEFAULTS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_DELL_RESET_TO_DEFAULTS_COMPLETE) break; sleep (1); } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_power_consumption_data (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint32_t cumulative_start_time; uint32_t cumulative_reading; uint32_t peak_start_time; uint32_t peak_amp_time; uint16_t peak_amp_reading; uint32_t peak_watt_time; uint16_t peak_watt_reading; double cumulative_reading_val; double peak_amp_reading_val; char time_buf[IPMI_OEM_TIME_BUFLEN + 1]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From http://linux.dell.com/files/openipmi/ipmitool/ * From Dell Provided Docs * * Request * * 0x30 - OEM network function * 0x9c - OEM cmd * 0x07 - Entity ID * 0x01 - Entity Instance * * Response * * 0x9c - OEM cmd * 0x?? - Completion Code * bytes 2-5 - cumulative start time * bytes 6-9 - cumulative reading (in WH) * bytes 10-13 - peak start time * bytes 14-17 - peak amp time * bytes 18-21 - peak amp reading * bytes 22-25 - peak watt time * bytes 26-29 - peak watt reading */ bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_POWER_CONSUMPTION_DATA; bytes_rq[1] = IPMI_ENTITY_ID_SYSTEM_BOARD; bytes_rq[2] = 0x01; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 26, IPMI_CMD_OEM_DELL_GET_POWER_CONSUMPTION_DATA, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; cumulative_start_time = bytes_rs[2]; cumulative_start_time |= (bytes_rs[3] << 8); cumulative_start_time |= (bytes_rs[4] << 16); cumulative_start_time |= (bytes_rs[5] << 24); cumulative_reading = bytes_rs[6]; cumulative_reading |= (bytes_rs[7] << 8); cumulative_reading |= (bytes_rs[8] << 16); cumulative_reading |= (bytes_rs[9] << 24); peak_start_time = bytes_rs[10]; peak_start_time |= (bytes_rs[11] << 8); peak_start_time |= (bytes_rs[12] << 16); peak_start_time |= (bytes_rs[13] << 24); peak_amp_time = bytes_rs[14]; peak_amp_time |= (bytes_rs[15] << 8); peak_amp_time |= (bytes_rs[16] << 16); peak_amp_time |= (bytes_rs[17] << 24); peak_amp_reading = bytes_rs[18]; peak_amp_reading |= (bytes_rs[19] << 8); peak_watt_time = bytes_rs[20]; peak_watt_time |= (bytes_rs[21] << 8); peak_watt_time |= (bytes_rs[22] << 16); peak_watt_time |= (bytes_rs[23] << 24); peak_watt_reading = bytes_rs[24]; peak_watt_reading |= (bytes_rs[25] << 8); cumulative_reading_val = ((double)cumulative_reading) / 1000.0; memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (cumulative_start_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Cumulative Energy Start Time : %s\n", time_buf); pstdout_printf (state_data->pstate, "Cumulative Energy : %.2f kWh\n", cumulative_reading_val); peak_amp_reading_val = ((double)peak_amp_reading) / 10.0; memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (peak_amp_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Peak Amp Time : %s\n", time_buf); pstdout_printf (state_data->pstate, "Peak Amp : %.2f A\n", peak_amp_reading_val); memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (peak_watt_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Peak Watt Time : %s\n", time_buf); pstdout_printf (state_data->pstate, "Peak Watt : %u W\n", peak_watt_reading); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_reset_power_consumption_data (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* achu: XXX * * "both" or "all" byte doesn't appear to work, maybe in a later * firmware release? */ if (strcasecmp (state_data->prog_data->args->oem_options[0], "cumulative") && strcasecmp (state_data->prog_data->args->oem_options[0], "peak")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * From http://linux.dell.com/files/openipmi/ipmitool/ * From Dell Provided Docs * * Request * * 0x30 - OEM network function * 0x9d - OEM cmd * 0x07 - Entity ID * 0x01 - Entity Instance * 0x?? - field to clear (0x1 = cumulative, 0x2 = peak, 0x4 = all/both) * * Response * * 0x9d - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_DELL_RESET_POWER_CONSUMPTION_DATA; bytes_rq[1] = IPMI_ENTITY_ID_SYSTEM_BOARD; bytes_rq[2] = 0x01; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cumulative")) bytes_rq[3] = IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_CUMULATIVE; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "peak")) bytes_rq[3] = IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_PEAK; else bytes_rq[3] = IPMI_OEM_DELL_RESET_POWER_CONSUMPTION_DATA_ALL; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_DELL_RESET_POWER_CONSUMPTION_DATA, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _ipmi_oem_dell_power_supply_info_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { ipmi_oem_state_data_t *state_data; uint8_t entity_id; uint8_t entity_instance; uint8_t entity_instance_type; uint8_t sensor_type; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); state_data = (ipmi_oem_state_data_t *)arg; /* Dell Poweredge OEM * * Power Supply Info Request * From Dell Provided Docs * * 0x30 - OEM network function * 0xB0 - OEM cmd * 0x?? - Power Supply Entity ID * 0x?? - Power Supply Entity Instance * * Get Power Supply Info Response * * 0xB0 - OEM cmd * 0x?? - Completion Code * bytes 2-3 - rated watts * bytes 4-5 - rated amps (in 0.1 amps) * bytes 6-7 - rated volts * bytes 8-11 - component ID (internal for Dell) * bytes 12-19 - firmware version (string, non-null terminated) * bytes 20 - power supply type * - 0x00 - AC * - 0x01 - DC * bytes 21-22 - rated dc watts * bytes 23 - online status * - maps to power supply sensor events * bytes 24 - reserved */ if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) return (0); if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, sdr_record, sdr_record_len, &entity_id, &entity_instance, &entity_instance_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_id_instance_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, sdr_record, sdr_record_len, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (entity_id == IPMI_ENTITY_ID_POWER_SUPPLY && entity_instance_type == IPMI_SDR_PHYSICAL_ENTITY && sensor_type == IPMI_SENSOR_TYPE_POWER_SUPPLY) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint16_t ratedwatts; uint16_t ratedamps; uint16_t ratedvolts; uint32_t componentid; char firmwareversion[IPMI_OEM_MAX_BYTES]; uint8_t powersupplytype; uint16_t rateddcwatts; uint8_t onlinestatus; double ratedamps_val; char sensor_name_buf[IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1]; memset (firmwareversion, '\0', IPMI_OEM_MAX_BYTES); /* achu note: * * Dell code does not check for potential sdr record * sharing, so I won't either. */ memset (sensor_name_buf, '\0', IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1); if (ipmi_sdr_parse_entity_sensor_name (state_data->sdr_ctx, NULL, 0, 0, /* sensor number */ IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS, sensor_name_buf, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_SUPPLY_INFO; bytes_rq[1] = entity_id; bytes_rq[2] = entity_instance; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (-1); } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 25, IPMI_CMD_OEM_DELL_POWER_SUPPLY_INFO, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) return (-1); ratedwatts = bytes_rs[2]; ratedwatts |= (bytes_rs[3] << 8); ratedamps = bytes_rs[4]; ratedamps |= (bytes_rs[5] << 8); ratedvolts = bytes_rs[6]; ratedvolts |= (bytes_rs[7] << 8); componentid = bytes_rs[8]; componentid |= (bytes_rs[9] << 8); componentid |= (bytes_rs[10] << 16); componentid |= (bytes_rs[11] << 24); memcpy(firmwareversion, &(bytes_rs[12]), 8); powersupplytype = bytes_rs[20]; rateddcwatts = bytes_rs[21]; rateddcwatts |= (bytes_rs[22] << 8); onlinestatus = bytes_rs[23]; pstdout_printf (state_data->pstate, "Power Supply : %s\n", sensor_name_buf); pstdout_printf (state_data->pstate, "Rated Watts : %u W\n", ratedwatts); ratedamps_val = ((double)ratedamps) / 10.0; pstdout_printf (state_data->pstate, "Rated Amps : %.2f A\n", ratedamps_val); pstdout_printf (state_data->pstate, "Rated Volts : %u V\n", ratedvolts); pstdout_printf (state_data->pstate, "Rated DC Watts : %u W\n", rateddcwatts); pstdout_printf (state_data->pstate, "Power Supply Type : %s\n", (powersupplytype == IPMI_OEM_DELL_POWER_SUPPLY_INFO_DC) ? "DC" : "AC"); if (onlinestatus <= ipmi_sensor_type_power_supply_max_index) pstdout_printf (state_data->pstate, "Online Status : %s\n", ipmi_sensor_type_power_supply[onlinestatus]); else pstdout_printf (state_data->pstate, "Online Status : %02Xh\n", onlinestatus); pstdout_printf (state_data->pstate, "Firmare Version : %s\n", firmwareversion); /* internal dell componentid code */ pstdout_printf (state_data->pstate, "Dell Componentid : %u\n", componentid); pstdout_printf (state_data->pstate, "\n"); } return (0); } int ipmi_oem_dell_power_supply_info (ipmi_oem_state_data_t *state_data) { int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _ipmi_oem_dell_power_supply_info_sdr_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_instantaneous_power_consumption_data (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint16_t instantaneous_power; uint16_t instantaneous_amps; double instantaneous_amps_val; int rs_len; int rv = -1; assert (state_data); /* Dell Poweredge OEM * * From Dell Provided Source Code * From Dell Provided Docs * * Request * * 0x30 - OEM network function * 0xB3 - OEM cmd * 0x0A - Entity ID * 0x?? - Entity Instance * - 0x00 - both/all power supplies * * Response * * 0xB3 - OEM cmd * 0x?? - Completion Code * bytes 2-3 - instantaneous power * bytes 4-5 - instantaneous amps * bytes 6-8 - reserved */ bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_CONSUMPTION; bytes_rq[1] = IPMI_ENTITY_ID_POWER_SUPPLY; if (!state_data->prog_data->args->oem_options_count) bytes_rq[2] = IPMI_OEM_DELL_POWER_CONSUMPTION_ENTITY_INSTANCE_ALL; else { char *endptr = NULL; unsigned int temp; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } bytes_rq[2] = temp; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 9, IPMI_CMD_OEM_DELL_POWER_CONSUMPTION, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; instantaneous_power = bytes_rs[2]; instantaneous_power |= (bytes_rs[3] << 8); instantaneous_amps = bytes_rs[4]; instantaneous_amps |= (bytes_rs[5] << 8); instantaneous_amps_val = ((double)instantaneous_amps) / 10.0; pstdout_printf (state_data->pstate, "Instantaneous Power : %u W\n", instantaneous_power); pstdout_printf (state_data->pstate, "Instantaneous Amps : %.2f A\n", instantaneous_amps_val); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_power_head_room (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint16_t instantaneous_head_room; uint16_t peak_head_room; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Source Code * From Dell Provided Docs * * Request * * 0x30 - OEM network function * 0xBB - OEM cmd * * Response * * 0xBB - OEM cmd * 0x?? - Completion Code * bytes 2-3 - instantaneous head room in watts * bytes 4-5 - peak head room in watts * * Notes: Head room is the difference between Max potential and the * current power consumption. */ bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_POWER_HEAD_ROOM; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_DELL_GET_POWER_HEAD_ROOM, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; instantaneous_head_room = bytes_rs[2]; instantaneous_head_room |= (bytes_rs[3] << 8); peak_head_room = bytes_rs[4]; peak_head_room |= (bytes_rs[5] << 8); pstdout_printf (state_data->pstate, "Instantaneous Head Room : %u W\n", instantaneous_head_room); pstdout_printf (state_data->pstate, "Peak Head Room : %u W\n", peak_head_room); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_power_consumption_statistics (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint16_t last_minute_power = 0; uint16_t last_hour_power = 0; uint16_t last_day_power = 0; uint16_t last_week_power = 0; uint32_t last_minute_power_time = 0; uint32_t last_hour_power_time = 0; uint32_t last_day_power_time = 0; uint32_t last_week_power_time = 0; char time_buf[IPMI_OEM_TIME_BUFLEN + 1]; int len; uint8_t system_info_parameter; char *system_info_string = NULL; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* achu: handle some additional possibilities */ if (strcasecmp (state_data->prog_data->args->oem_options[0], "average") && strcasecmp (state_data->prog_data->args->oem_options[0], "avg") && strcasecmp (state_data->prog_data->args->oem_options[0], "maximum") && strcasecmp (state_data->prog_data->args->oem_options[0], "max") && strcasecmp (state_data->prog_data->args->oem_options[0], "minimum") && strcasecmp (state_data->prog_data->args->oem_options[0], "min")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Source Code * From Dell Provided Docs * * Uses Get System Info command * * Parameter data response formatted: * * For IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_AVERAGE_POWER_CONSUMPTION_STATISTICS * * bytes 1-2 - last minute average power * bytes 3-4 - last hour average power * bytes 5-6 - last day average power * bytes 7-8 - last week average power * * For IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS * and IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS * * bytes 1-2 - last minute max/min power * bytes 3-4 - last hour max/min power * bytes 5-6 - last day max/min power * bytes 7-8 - last week max/min power * bytes 9-12 - last minute max/min power time * bytes 13-16 - last hour max/min power time * bytes 17-20 - last day max/min power time * bytes 21-24 - last week max/min power time * */ if (!strcasecmp (state_data->prog_data->args->oem_options[0], "average") || !strcasecmp (state_data->prog_data->args->oem_options[0], "avg")) system_info_parameter = IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_AVERAGE_POWER_CONSUMPTION_STATISTICS; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "maximum") || !strcasecmp (state_data->prog_data->args->oem_options[0], "max")) system_info_parameter = IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS; else /* (!strcasecmp (state_data->prog_data->args->oem_options[0], "minimum") || !strcasecmp (state_data->prog_data->args->oem_options[0], "min")) */ system_info_parameter = IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, system_info_parameter, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 8) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } last_minute_power = configuration_parameter_data[0]; last_minute_power |= (configuration_parameter_data[1] << 8); last_hour_power = configuration_parameter_data[2]; last_hour_power |= (configuration_parameter_data[3] << 8); last_day_power = configuration_parameter_data[4]; last_day_power |= (configuration_parameter_data[5] << 8); last_week_power = configuration_parameter_data[6]; last_week_power |= (configuration_parameter_data[7] << 8); if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS || system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS) { last_minute_power_time = configuration_parameter_data[8]; last_minute_power_time |= (configuration_parameter_data[9] << 8); last_minute_power_time |= (configuration_parameter_data[10] << 16); last_minute_power_time |= (configuration_parameter_data[11] << 24); last_hour_power_time = configuration_parameter_data[12]; last_hour_power_time |= (configuration_parameter_data[13] << 8); last_hour_power_time |= (configuration_parameter_data[14] << 16); last_hour_power_time |= (configuration_parameter_data[15] << 24); last_day_power_time = configuration_parameter_data[16]; last_day_power_time |= (configuration_parameter_data[17] << 8); last_day_power_time |= (configuration_parameter_data[18] << 16); last_day_power_time |= (configuration_parameter_data[19] << 24); last_week_power_time = configuration_parameter_data[20]; last_week_power_time |= (configuration_parameter_data[21] << 8); last_week_power_time |= (configuration_parameter_data[22] << 16); last_week_power_time |= (configuration_parameter_data[23] << 24); } if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_AVERAGE_POWER_CONSUMPTION_STATISTICS) system_info_string = "Average"; else if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS) system_info_string = "Max"; else system_info_string = "Min"; pstdout_printf (state_data->pstate, "Last Minute %s Power : %u W\n", system_info_string, last_minute_power); if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS || system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS) { memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (last_minute_power_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Last Minute %s Power Time : %s\n", system_info_string, time_buf); } pstdout_printf (state_data->pstate, "Last Hour %s Power : %u W\n", system_info_string, last_hour_power); if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS || system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS) { memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (last_hour_power_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Last Hour %s Power Time : %s\n", system_info_string, time_buf); } pstdout_printf (state_data->pstate, "Last Day %s Power : %u W\n", system_info_string, last_day_power); if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS || system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS) { memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (last_day_power_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Last Day %s Power Time : %s\n", system_info_string, time_buf); } pstdout_printf (state_data->pstate, "Last Week %s Power : %u W\n", system_info_string, last_week_power); if (system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MAX_POWER_CONSUMPTION_STATISTICS || system_info_parameter == IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_MIN_POWER_CONSUMPTION_STATISTICS) { memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (last_week_power_time, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%D - %T", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Last Week %s Power Time : %s\n", system_info_string, time_buf); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } /* legacy */ int ipmi_oem_dell_get_average_power_history (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (!(state_data->prog_data->args->oem_options[0] = strdup ("average"))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } state_data->prog_data->args->oem_options_count++; return (ipmi_oem_dell_get_power_consumption_statistics (state_data)); } /* legacy */ int ipmi_oem_dell_get_peak_power_history (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (!(state_data->prog_data->args->oem_options[0] = strdup ("max"))) { pstdout_perror (state_data->pstate, "strdup"); return (-1); } state_data->prog_data->args->oem_options_count++; return (ipmi_oem_dell_get_power_consumption_statistics (state_data)); } static int _get_power_capacity (ipmi_oem_state_data_t *state_data, uint8_t *configuration_parameter_data, unsigned int configuration_parameter_data_len) { fiid_obj_t obj_cmd_rs = NULL; int len; int rv = -1; assert (state_data); /* Dell Poweredge OEM * * From Dell Provided Source Code * * Uses Get System Info command * * Parameter data response formatted: * * bytes 1-2 - power capacity * bytes 3 - units * - 0x00 watts (?) * - 0x01 btuphr (?) * - 0x03 percent (???) * bytes 4-5 - maximum power consumption * bytes 6-7 - minimum power consumption * bytes 8 - total number of power supplies * bytes 9-10 - available power * bytes 11 - system throttling * - 0 - Normal system operation * - 1 - System needs to be throttled * - 2 - System is overconfigured * bytes 12 - reserved * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_POWER_CAPACITY, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, configuration_parameter_data_len)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 12) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } rv = 0; cleanup: return (rv); } static int _get_power_capacity_status (ipmi_oem_state_data_t *state_data, uint8_t *power_capacity_status, uint8_t *power_capacity_is_settable) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); /* Dell Poweredge OEM * * From Dell Provided Source Code * * Power Capacity Status Request * * 0x30 - OEM network function * 0xBA - OEM cmd * 0x01 - ?? (I'm guessing a "get" option) * 0xFF - ?? (I'm guessing a "get all" bitmask) * * Power Capacity Status Response * * 0xBA - OEM cmd * 0x?? - Completion Code * 0x?? - status * - 0x01 bitmask = 0b = disabled, 1b = enabled * - 0x02 bitmask = 0b = not-settable, 1b = settable */ bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS; bytes_rq[1] = 0x01; bytes_rq[2] = 0xFF; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; if (power_capacity_status) { (*power_capacity_status) = (bytes_rs[2] & IPMI_OEM_DELL_GET_POWER_CAPACITY_STATUS_BITMASK); (*power_capacity_status) >>= IPMI_OEM_DELL_GET_POWER_CAPACITY_STATUS_SHIFT; } if (power_capacity_is_settable) { (*power_capacity_is_settable) = (bytes_rs[2] & IPMI_OEM_DELL_GET_POWER_CAPACITY_IS_SETTABLE_BITMASK); (*power_capacity_is_settable) >>= IPMI_OEM_DELL_GET_POWER_CAPACITY_IS_SETTABLE_SHIFT; } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_power_capacity (ipmi_oem_state_data_t *state_data) { uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint16_t power_capacity; #if 0 /* to remove compiler warning, unused, unclear why unused, copied logic from dell provided source */ uint8_t units; #endif uint16_t maximum_power_consumption; uint16_t minimum_power_consumption; uint8_t total_number_power_supplies; uint16_t available_power; uint8_t system_throttling; char *system_throttling_str; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_get_power_capacity (state_data, configuration_parameter_data, IPMI_OEM_MAX_BYTES) < 0) goto cleanup; power_capacity = configuration_parameter_data[0]; power_capacity |= (configuration_parameter_data[1] << 8); #if 0 /* to remove compiler warning, unused, unclear why unused, copied logic from dell provided source */ units = configuration_parameter_data[2]; #endif maximum_power_consumption = configuration_parameter_data[3]; maximum_power_consumption |= (configuration_parameter_data[4] << 8); minimum_power_consumption = configuration_parameter_data[5]; minimum_power_consumption |= (configuration_parameter_data[6] << 8); total_number_power_supplies = configuration_parameter_data[7]; available_power = configuration_parameter_data[8]; available_power |= (configuration_parameter_data[9] << 8); system_throttling = configuration_parameter_data[10]; pstdout_printf (state_data->pstate, "Power Capacity : %u W\n", power_capacity); pstdout_printf (state_data->pstate, "Minimum Power Consumption : %u W\n", minimum_power_consumption); pstdout_printf (state_data->pstate, "Maximum Power Consumption : %u W\n", maximum_power_consumption); pstdout_printf (state_data->pstate, "Total Number of Power Supplies : %u\n", total_number_power_supplies); pstdout_printf (state_data->pstate, "Available Power : %u W\n", available_power); switch (system_throttling) { case IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_NORMAL_SYSTEM_OPERATION: system_throttling_str = "Normal system operation"; break; case IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_SYSTEM_NEEDS_TO_BE_THROTTLED: system_throttling_str = "System needs to be throttled"; break; case IPMI_OEM_DELL_SYSTEM_INFO_GET_POWER_CAPACITY_SYSTEM_THROTTLING_SYSTEM_IS_OVERCONFIGURED: system_throttling_str = "System is overconfigured"; break; default: system_throttling_str = "Unknown"; } pstdout_printf (state_data->pstate, "System Throttling : %s\n", system_throttling_str); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_power_capacity (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t power_capacity_is_settable = 0; uint16_t power_capacity; uint16_t maximum_power_consumption; uint16_t minimum_power_consumption; unsigned int temp; char *endptr = NULL; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Dell Poweredge OEM * * From Dell Provided Source Code * * Uses Set System Info command * * Configuration Parameter Data formatted: * * bytes 1-2 - power capacity * bytes 3 - units * - 0x00 watts (?) * - 0x01 btuphr (?) * - 0x03 percent (???) * bytes 4-5 - maximum power consumption * bytes 6-7 - minimum power consumption * bytes 8 - total number of power supplies * bytes 9-10 - available power * bytes 11 - system throttling * bytes 12 - reserved * */ if (_get_power_capacity_status (state_data, NULL, &power_capacity_is_settable) < 0) goto cleanup; if (!power_capacity_is_settable) { pstdout_fprintf (state_data->pstate, stderr, "Power Capacity not settable\n"); goto cleanup; } if (_get_power_capacity (state_data, configuration_parameter_data, IPMI_OEM_MAX_BYTES) < 0) goto cleanup; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > USHRT_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } power_capacity = temp; maximum_power_consumption = configuration_parameter_data[3]; maximum_power_consumption |= (configuration_parameter_data[4] << 8); minimum_power_consumption = configuration_parameter_data[5]; minimum_power_consumption |= (configuration_parameter_data[6] << 8); if (power_capacity < minimum_power_consumption || power_capacity > maximum_power_consumption) { pstdout_fprintf (state_data->pstate, stderr, "Power Capacity '%u' out of range\n", power_capacity); goto cleanup; } configuration_parameter_data[0] = (power_capacity & 0x00FF); configuration_parameter_data[1] = ((power_capacity & 0xFF00) >> 8); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_set_system_info_parameters (state_data->ipmi_ctx, IPMI_SYSTEM_INFO_PARAMETER_OEM_DELL_POWER_CAPACITY, configuration_parameter_data, 12, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ((ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_DELL_NOT_LICENSED) == 1))) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_dell_get_power_capacity_status (ipmi_oem_state_data_t *state_data) { uint8_t power_capacity_status = 0; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_get_power_capacity_status (state_data, &power_capacity_status, NULL) < 0) goto cleanup; if (power_capacity_status) pstdout_printf (state_data->pstate, "enabled\n"); else pstdout_printf (state_data->pstate, "disabled\n"); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_power_capacity_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t power_capacity_is_settable = 0; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Source Code * * Power Capacity Status Request * * 0x30 - OEM network function * 0xBA - OEM cmd * 0x00 - ?? (I'm guessing a "set" option) * 0x?? - ?? (I'm guessing a bitmask) * - 0x01 bitmask = 0b = disable, 1b = enable * * Power Capacity Status Response * * 0xBA - OEM cmd * 0x?? - Completion Code */ if (_get_power_capacity_status (state_data, NULL, &power_capacity_is_settable) < 0) goto cleanup; if (!power_capacity_is_settable) { pstdout_fprintf (state_data->pstate, stderr, "Power Capacity not settable\n"); goto cleanup; } bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS; bytes_rq[1] = 0x00; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) bytes_rq[2] = IPMI_OEM_DELL_SET_POWER_CAPACITY_STATUS_ENABLE; else bytes_rq[2] = IPMI_OEM_DELL_SET_POWER_CAPACITY_STATUS_DISABLE; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_DELL_POWER_CAPACITY_STATUS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_get_chassis_identify_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t identify_status; char *identify_status_str; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Query Chassis Identify Status Request * * 0x30 - OEM network function * 0x32 - OEM cmd * * Query Chassis Identify Status Response * * 0x32 - OEM cmd * 0x?? - Completion Code * 0x?? - identify status * - 0x00 - off * - 0x01 - on */ bytes_rq[0] = IPMI_CMD_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; identify_status = bytes_rs[2]; switch (identify_status) { case IPMI_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS_OFF: identify_status_str = "Off"; break; case IPMI_OEM_DELL_QUERY_CHASSIS_IDENTIFY_STATUS_ON: identify_status_str = "On"; break; default: identify_status_str = "Unknown"; } pstdout_printf (state_data->pstate, "%s\n", identify_status_str); rv = 0; cleanup: return (rv); } int ipmi_oem_dell_power_monitoring_over_interval (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; unsigned int temp; char *endptr = NULL; unsigned int power_monitoring_averaging_interval; uint16_t average_power_consumption; uint16_t min_power_consumption; uint16_t max_power_consumption; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp < IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_MIN || temp > IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } power_monitoring_averaging_interval = temp; if (strcasecmp (state_data->prog_data->args->oem_options[1], "systempower") && strcasecmp (state_data->prog_data->args->oem_options[1], "cpu1") && strcasecmp (state_data->prog_data->args->oem_options[1], "cpu2") && strcasecmp (state_data->prog_data->args->oem_options[1], "cpu3") && strcasecmp (state_data->prog_data->args->oem_options[1], "cpu4") && strcasecmp (state_data->prog_data->args->oem_options[1], "memory1") && strcasecmp (state_data->prog_data->args->oem_options[1], "memory2") && strcasecmp (state_data->prog_data->args->oem_options[1], "memory3") && strcasecmp (state_data->prog_data->args->oem_options[1], "memory4") && strcasecmp (state_data->prog_data->args->oem_options[1], "drives") && strcasecmp (state_data->prog_data->args->oem_options[1], "fans") && strcasecmp (state_data->prog_data->args->oem_options[1], "pciecards") && strcasecmp (state_data->prog_data->args->oem_options[1], "gpucables")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Docs * * Power Monitoring Over Specified Averaging Interval Request * * 0x30 - OEM network function * 0xCC - OEM cmd * byte 3-4 - power monitoring averaging interval * 0x?? - subsystem * - 0h - system power * - 1h - cpu1 * - 2h - cpu2 * - 3h - cpu3 * - 4h - cpu4 * - 5h - memory1 * - 6h - memory2 * - 7h - memory3 * - 8h - memory4 * - 9h - drives * - ah - fans * - bh - pcie add-in cards * - ch - gpu cables * 0x?? - control switch * - 0x00 - return average, min and max power value and the * averaging interval is 30-900s * - 0x01 - only return averaged power value and the averaging * interval is 5-900s * * Power Monitoring Over Specified Averaging Interval Response * * 0xCC - OEM cmd * 0x?? - Completion Code * bytes 2-3 - average power consumption * bytes 4-5 - min power consumption * bytes 6-7 - max power consumption * bytes 8-12 - reserved */ bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2; bytes_rq[1] = (power_monitoring_averaging_interval & 0x00FF); bytes_rq[2] = (power_monitoring_averaging_interval & 0xFF00) >> 8; if (strcasecmp (state_data->prog_data->args->oem_options[0], "systempower")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_SYSTEM_POWER; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu1")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_CPU1_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu2")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_CPU2_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu3")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_CPU3_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu4")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_CPU4_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory1")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory2")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN2; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory3")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN3; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory4")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN4; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "drives")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_DRIVES; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "fans")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_FANS; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "pciecards")) bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_PCIE_ADD_IN_CARDS; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "gpucables") */ bytes_rq[3] = IPMI_OEM_DELL_POWER_MONITORING_GPU_CABLES; if (power_monitoring_averaging_interval > IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_AVG_MIN_MAX_MIN) bytes_rq[4] = IPMI_OEM_DELL_POWER_MONITORING_RETURN_AVG_MIN_MAX_POWER; else bytes_rq[4] = IPMI_OEM_DELL_POWER_MONITORING_RETURN_ONLY_AVG_POWER; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 8, IPMI_CMD_OEM_DELL_POWER_MONITORING_OVER_A_SPECIFIED_AVERAGING_INTERVAL2, IPMI_NET_FN_OEM_DELL_GENERIC_RS, _dell_extended_oem_strerror) < 0) goto cleanup; average_power_consumption = bytes_rs[2]; average_power_consumption |= (bytes_rs[3] << 8); pstdout_printf (state_data->pstate, "Average Power Consumption : %u W\n", average_power_consumption); if (power_monitoring_averaging_interval > IPMI_OEM_DELL_POWER_MONITORING_INTERVAL_AVG_MIN_MAX_MIN) { min_power_consumption = bytes_rs[4]; min_power_consumption |= (bytes_rs[5] << 8); max_power_consumption = bytes_rs[6]; max_power_consumption |= (bytes_rs[7] << 8); pstdout_printf (state_data->pstate, "Min Power Consumption : %u W\n", min_power_consumption); pstdout_printf (state_data->pstate, "Max Power Consumption : %u W\n", max_power_consumption); } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_power_monitoring_interval_range (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint16_t min_power_monitoring_averaging_interval; uint16_t max_power_monitoring_averaging_interval; uint8_t stepping_interval; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "systempower") && strcasecmp (state_data->prog_data->args->oem_options[0], "cpu1") && strcasecmp (state_data->prog_data->args->oem_options[0], "cpu2") && strcasecmp (state_data->prog_data->args->oem_options[0], "cpu3") && strcasecmp (state_data->prog_data->args->oem_options[0], "cpu4") && strcasecmp (state_data->prog_data->args->oem_options[0], "memory1") && strcasecmp (state_data->prog_data->args->oem_options[0], "memory2") && strcasecmp (state_data->prog_data->args->oem_options[0], "memory3") && strcasecmp (state_data->prog_data->args->oem_options[0], "memory4") && strcasecmp (state_data->prog_data->args->oem_options[0], "drives") && strcasecmp (state_data->prog_data->args->oem_options[0], "fans") && strcasecmp (state_data->prog_data->args->oem_options[0], "pciecards") && strcasecmp (state_data->prog_data->args->oem_options[0], "gpucables")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Docs * * Power Monitoring Over Specified Averaging Interval Request * * 0x30 - OEM network function * 0xCD - OEM cmd * 0x?? - subsystem * - 0h - system power * - 1h - cpu1 * - 2h - cpu2 * - 3h - cpu3 * - 4h - cpu4 * - 5h - memory1 * - 6h - memory2 * - 7h - memory3 * - 8h - memory4 * - 9h - drives * - ah - fans * - bh - pcie add-in cards * - ch - gpu cables * 0x?? - control switch * - 0x00 - return average, min and max power value and the * averaging interval is 30-900s * - 0x01 - only return averaged power value and the averaging * interval is 5-900s * * Power Monitoring Over Specified Averaging Interval Response * * 0xCD - OEM cmd * 0x?? - Completion Code * bytes 2-3 - min power monitoring averaging interval * bytes 4-5 - max power monitoring averaging interval * bytes 6 - stepping interval */ bytes_rq[0] = IPMI_CMD_OEM_DELL_POWER_MONITORING_AVERAGING_INTERVAL_RANGE2; if (strcasecmp (state_data->prog_data->args->oem_options[0], "systempower")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_SYSTEM_POWER; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu1")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_CPU1_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu2")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_CPU2_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu3")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_CPU3_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "cpu4")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_CPU4_SUBSYSTEM; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory1")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory2")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN2; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory3")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN3; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "memory4")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_MEMORY_POWER_OF_CPU_DOMAIN4; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "drives")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_DRIVES; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "fans")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_FANS; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "pciecards")) bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_PCIE_ADD_IN_CARDS; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "gpucables") */ bytes_rq[1] = IPMI_OEM_DELL_POWER_MONITORING_GPU_CABLES; /* achu: why would Dell allow you to input either control switch * option, makes no sense */ bytes_rq[2] = IPMI_OEM_DELL_POWER_MONITORING_RETURN_ONLY_AVG_POWER; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 7, IPMI_OEM_DELL_POWER_MONITORING_RETURN_ONLY_AVG_POWER, IPMI_NET_FN_OEM_DELL_GENERIC_RS, _dell_extended_oem_strerror) < 0) goto cleanup; min_power_monitoring_averaging_interval = bytes_rs[2]; min_power_monitoring_averaging_interval |= (bytes_rs[3] << 8); max_power_monitoring_averaging_interval = bytes_rs[4]; max_power_monitoring_averaging_interval |= (bytes_rs[5] << 8); stepping_interval = bytes_rs[6]; pstdout_printf (state_data->pstate, "Min Power Monitoring Averaging Interval : %u s\n", min_power_monitoring_averaging_interval); pstdout_printf (state_data->pstate, "Max Power Monitoring Averaging Interval : %u s\n", max_power_monitoring_averaging_interval); pstdout_printf (state_data->pstate, "Stepping Interval : %u s\n", stepping_interval); rv = 0; cleanup: return (rv); } #if 0 /* cannot verify */ int ipmi_oem_dell_get_blade_slot_id (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t sleeve_based_blade; uint8_t blade_slot_number; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get Blade Slot Id Request * * 0x30 - OEM network function * 0x18 - OEM cmd * * Get Blade Slot Id Response * * 0x18 - OEM cmd * 0x?? - Completion Code * 0x?? - bit 7 - sleeve based blade ; 0 = no, 1 = yes * - bit 6 - reserved * - bit 5:0 - blade slot number (1 based) * * For regular blades: blades are numbered like * * 1 2 3 4 5 6 7 8 * 9 10 11 12 13 14 15 16 * * For sleeve based blades, blades are numbered like * * a 1 2 3 4 5 6 7 8 * b 17 18 19 20 21 22 23 24 * c 9 10 11 12 13 14 15 16 * d 25 26 27 28 39 30 31 32 */ bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_BLADE_SLOT_ID; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_DELL_GET_BLADE_SLOT_ID, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; sleeve_based_blade = (bytes_rs[2] & IPMI_OEM_DELL_SLEEVE_BASED_BLADE_BITMASK); sleeve_based_blade >>= IPMI_OEM_DELL_SLEEVE_BASED_BLADE_SHIFT; blade_slot_number = (bytes_rs[2] & IPMI_OEM_DELL_BLADE_SLOT_NUMBER_BITMASK); blade_slot_number >>= IPMI_OEM_DELL_BLADE_SLOT_NUMBER_SHIFT; if (sleeve_based_blade == IPMI_OEM_DELL_SLEEVE_BASED_BLADE_YES) { char prefix_char; if (blade_slot_number >= IPMI_OEM_DELL_SLEEVE_A_RANGE_MIN && blade_slot_number <= IPMI_OEM_DELL_SLEEVE_A_RANGE_MAX) prefix_char = 'A'; else if (blade_slot_number >= IPMI_OEM_DELL_SLEEVE_B_RANGE_MIN && blade_slot_number <= IPMI_OEM_DELL_SLEEVE_B_RANGE_MAX) prefix_char = 'B'; else if (blade_slot_number >= IPMI_OEM_DELL_SLEEVE_C_RANGE_MIN && blade_slot_number <= IPMI_OEM_DELL_SLEEVE_C_RANGE_MAX) prefix_char = 'C'; else if (blade_slot_number >= IPMI_OEM_DELL_SLEEVE_D_RANGE_MIN && blade_slot_number <= IPMI_OEM_DELL_SLEEVE_D_RANGE_MAX) prefix_char = 'D'; else prefix_char = '\0'; /* unknown */ pstdout_printf (state_data->pstate, "%c%u\n", prefix_char, blade_slot_number); } else pstdout_printf (state_data->pstate, "%u\n", blade_slot_number); rv = 0; cleanup: return (rv); } #endif int ipmi_oem_dell_get_last_post_code (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t post_code; uint8_t string_length; char post_code_string[IPMI_OEM_STR_BUFLEN + 1]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Get Last Post Code Request * * 0x30 - OEM network function * 0x99 - OEM cmd * * Get Last Post Code Response * * 0x99 - OEM cmd * 0x?? - Completion Code * 0x?? - post code * 0x?? - string length * bytes 4-N: string */ memset (post_code_string, '\0', IPMI_OEM_STR_BUFLEN + 1); bytes_rq[0] = IPMI_CMD_OEM_DELL_GET_LAST_POST_CODE; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_DELL_GET_LAST_POST_CODE, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; post_code = bytes_rs[2]; string_length = bytes_rs[3]; if (string_length) memcpy (post_code_string, &bytes_rs[4], string_length); pstdout_printf (state_data->pstate, "Post Code %02Xh : %s\n", post_code, post_code_string); rv = 0; cleanup: return (rv); } static int _ipmi_oem_dell_do_slot_power_toggle (ipmi_oem_state_data_t *state_data, unsigned int slot_number) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (slot_number >= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN && slot_number <= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX); /* Dell Poweredge OEM * * From Dell Provided Docs * * Slot Power Control Request * * 0x30 - OEM network function * 0xF0 - OEM cmd * 0x?? - bit 0 - slot 1 * - bit 1 - slot 2 * - ... * - bit 7 - slot 8 * 0x?? - bit 0 - slot 9 * - bit 1 - slot 10 * - ... * - bit 7 - slot 16 * * only should do one slot at a time * * Slot Power Control Response * * 0xF0 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL; bytes_rq[1] = 0; bytes_rq[2] = 0; bytes_rq[1 + (slot_number - 1) / 8] = 0x1 << ((slot_number - 1) % 8); if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL, IPMI_NET_FN_OEM_DELL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_dell_slot_power_toggle (ipmi_oem_state_data_t *state_data) { char *endptr = NULL; unsigned int slot_number; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; slot_number = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (slot_number < IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN || slot_number > IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (_ipmi_oem_dell_do_slot_power_toggle (state_data, slot_number) < 0) goto cleanup; rv = 0; cleanup: return (rv); } /* achu * * Under normal circumstances we should find the proper SDR entry for * a given slot number input from the user, do a get sensor reading, * decode the raw sensor reading into a real reading, and compare to * 0.0 appropriately. * * However, for the C410x, it happens that all the SDR conversions are * simple. It's simply the raw reading * 2 to get the real reading. * So if we are checking for 0 degrees Celsius, then a raw reading of * 0 is 0 degrees Celsius. * * In order to avoid reading, parsing, etc. the SDR, we'll just call * get sensor reading w/ the known sensor number and check the raw * response. I leave the original code in b/c someday I may need to * work that code back in for different motherboards. */ #define IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE 1 int ipmi_oem_dell_slot_power_control (ipmi_oem_state_data_t *state_data) { char *endptr = NULL; unsigned int slot_number; /* See comments above w/ IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ #if IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE fiid_obj_t obj_cmd_rs = NULL; uint8_t sensor_reading; uint8_t reading_state; uint8_t sensor_scanning; uint64_t val; #else /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ ipmi_sensor_read_ctx_t sensor_read_ctx = NULL; uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_len = 0; int sensor_found = 0; double *sensor_reading = NULL; uint16_t sensor_reading_bitmask; #endif /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ int slot_power_on_flag; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); if (strcasecmp (state_data->prog_data->args->oem_options[0], "c410x")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "on") && strcasecmp (state_data->prog_data->args->oem_options[1], "off") && strcasecmp (state_data->prog_data->args->oem_options[1], "status")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } errno = 0; slot_number = strtoul (state_data->prog_data->args->oem_options[2], &endptr, 10); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } if (slot_number < IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN || slot_number > IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } /* See comments above w/ IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ #if IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_reading_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* sensor numbers for these slots range from 0x50 to 0x5F */ if (ipmi_cmd_get_sensor_reading (state_data->ipmi_ctx, IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_1_WATT + (slot_number - 1), obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_reading: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sensor_reading", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sensor_reading': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sensor_reading = val; if (FIID_OBJ_GET (obj_cmd_rs, "reading_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'reading_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } reading_state = val; if (FIID_OBJ_GET (obj_cmd_rs, "sensor_scanning", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sensor_scanning': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sensor_scanning = val; if (reading_state == IPMI_SENSOR_READING_STATE_UNAVAILABLE || sensor_scanning == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) { pstdout_fprintf (state_data->pstate, stderr, "PCIe slot sensor reading cannot be determined\n"); goto cleanup; } /* If non-zero, then it's on */ /* achu: Sometimes "off" is 2.0 Watts, which equates to a sensor reading of 1 */ if (sensor_reading > 1) slot_power_on_flag = 1; else slot_power_on_flag = 0; #else /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ if (!(sensor_read_ctx = ipmi_sensor_read_ctx_create (state_data->ipmi_ctx))) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_read_ctx_create: %s\n", strerror (errno)); goto cleanup; } if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "c410x")) { if (ipmi_sdr_cache_search_sensor (state_data->sdr_ctx, (IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_1_WATT + (slot_number - 1)), IPMI_SLAVE_ADDRESS_BMC) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) != IPMI_SDR_ERR_NOT_FOUND) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_search_sensor: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } } else sensor_found = 1; } if (!sensor_found) { pstdout_fprintf (state_data->pstate, stderr, "Sensor representing slot %u not found\n", slot_number); goto cleanup; } if ((sdr_record_len = ipmi_sdr_cache_record_read (state_data->sdr_ctx, sdr_record, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_record_read: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sensor_read (sensor_read_ctx, sdr_record, sdr_record_len, 0, NULL, &sensor_reading, &sensor_reading_bitmask) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_read: %s\n", ipmi_sensor_read_ctx_errormsg (sensor_read_ctx)); goto cleanup; } if (!sensor_reading) { pstdout_fprintf (state_data->pstate, stderr, "Failed to retrieve watt reading for PCIe slot\n"); goto cleanup; } /* If non-zero, then it's on */ if (fabs (*sensor_reading) < IPMI_OEM_DELL_ZERO_DEGREE_EPSILON) slot_power_on_flag = 0; else slot_power_on_flag = 1; #endif /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ if (!strcasecmp (state_data->prog_data->args->oem_options[1], "status")) { pstdout_printf (state_data->pstate, "%s\n", slot_power_on_flag ? "on" : "off"); goto out; } /* don't do power toggle if situation not right for it */ if ((!strcasecmp (state_data->prog_data->args->oem_options[1], "on") && slot_power_on_flag) || (!strcasecmp (state_data->prog_data->args->oem_options[1], "off") && !slot_power_on_flag)) goto out; if (_ipmi_oem_dell_do_slot_power_toggle (state_data, slot_number) < 0) goto cleanup; out: rv = 0; cleanup: /* See comments above w/ IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ #if IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE fiid_obj_destroy (obj_cmd_rs); #else /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ ipmi_sensor_read_ctx_destroy (sensor_read_ctx); free (sensor_reading); #endif /* !IPMI_OEM_DELL_SLOT_POWER_CONTROL_OPTIMIZE */ return (rv); } int ipmi_oem_dell_get_port_map (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t control_type; char *control_type_str; uint8_t ipass_mapping1; uint8_t ipass_mapping2; uint8_t ipass_mapping3; uint8_t ipass_mapping4; uint8_t slot_mapping1; uint8_t slot_mapping2; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Dell Poweredge OEM * * From Dell Provided Docs * * Port Map Configure Request * * 0x34 - OEM network function * 0xC8 - OEM cmd * 0x?? - bit 7 - get/set * - 0 - get * - 1 - set * - bit 6:4 - control type * - 1 - jumper * - 2 - bmc * - bit 3 - failover ipass mapping 1 * - 0 - 1:4 * - 1 - 1:2 * - bit 2 - failover ipass mapping 2 * - 0 - 1:4 * - 1 - 1:2 * - bit 1 - failover ipass mapping 3 * - 0 - 1:4 * - 1 - 1:2 * - bit 0 - failover ipass mapping 4 * - 0 - 1:4 * - 1 - 1:2 * 0x?? - optional byte - new port map setting * - on get, must specify byte to get equivalent byte of response * - bit 7:4 - slot mapping 1,2,3,4,13,14,15,16 * - bit 3:0 - slot mapping 5,6,7,8,9,10,11,12 * - for both * - 1 - 1:2 or 1:4 mode (indicated in previous byte) * - 2 - 1:8 mode * * Port Map Configure Response * * 0xC8 - OEM cmd * 0x?? - Completion Code * 0x?? - bit 7:4 - control type * - 1 - jumper * - 2 - bmc * - bit 3 - failover ipass mapping 1 * - 0 - 1:4 * - 1 - 1:2 * - bit 2 - failover ipass mapping 2 * - 0 - 1:4 * - 1 - 1:2 * - bit 1 - failover ipass mapping 3 * - 0 - 1:4 * - 1 - 1:2 * - bit 0 - failover ipass mapping 4 * - 0 - 1:4 * - 1 - 1:2 * 0x?? - optional byte * - bit 7:4 - slot mapping 1,2,3,4,13,14,15,16 * - bit 3:0 - slot mapping 5,6,7,8,9,10,11,12 * - for both * - 0 - 1:8 mode not supported * - 1 - 1:2 or 1:4 mode (indicated in previous byte) * - 2 - 1:8 mode */ bytes_rq[0] = IPMI_CMD_OEM_DELL_PORT_MAP; bytes_rq[1] = (IPMI_OEM_DELL_PORT_MAP_GET << IPMI_OEM_DELL_PORT_MAP_GET_SET_SHIFT); bytes_rq[2] = 0x00; /* to force proper return of data */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_DELL_PORT_MAP, IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RS, NULL) < 0) goto cleanup; control_type = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_RESPONSE_BITMASK); control_type >>= IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_REQUEST_SHIFT; ipass_mapping1 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_BITMASK); ipass_mapping1 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_SHIFT; ipass_mapping2 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_BITMASK); ipass_mapping2 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_SHIFT; ipass_mapping3 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_BITMASK); ipass_mapping3 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_SHIFT; ipass_mapping4 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_BITMASK); ipass_mapping4 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_SHIFT; slot_mapping1 = (bytes_rs[3] & IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_BITMASK); slot_mapping1 >>= IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_SHIFT; slot_mapping2 = (bytes_rs[3] & IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_BITMASK); slot_mapping2 >>= IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_SHIFT; switch (control_type) { case IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_JUMPER: control_type_str = "Jumper"; break; case IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_BMC: control_type_str = "BMC"; break; default: control_type_str = "Unknown"; } pstdout_printf (state_data->pstate, "Control Type: %s\n", control_type_str); /* If 1:8 isn't supported, must be 1:2 or 1:4 */ if (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8_NOT_SUPPORTED) slot_mapping1 = IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4; if (slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8_NOT_SUPPORTED) slot_mapping2 = IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4; if ((slot_mapping1 != IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4 && slot_mapping1 != IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) || (slot_mapping2 != IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4 && slot_mapping2 != IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8)) { pstdout_fprintf (state_data->pstate, stderr, "Unrecognized slot mapping data\n"); goto cleanup; } /* iPass 1 */ if (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 1: PCIe1 PCIe2 PCIe3 PCIe4 PCIe13 PCIe14 PCIe15 PCIe16\n"); else { if (ipass_mapping1 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 1: PCIe1 PCIe15\n"); else pstdout_printf (state_data->pstate, "iPass 1: PCIe1 PCIe2 PCIe15 PCIe16\n"); } /* iPass 2 */ if (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPASS 2:\n"); else { if (ipass_mapping2 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 2: PCIe3 PCIe13\n"); else pstdout_printf (state_data->pstate, "iPass 2: PCIe3 PCIe4 PCIe13 PCIe14\n"); } /* iPass 3 */ if (slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 3: PCIe5 PCIe6 PCIe7 PCIe8 PCIe9 PCIe10 PCIe11 PCIe12\n"); else { if (ipass_mapping3 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 3: PCIe5 PCIe11\n"); else pstdout_printf (state_data->pstate, "iPass 3: PCIe5 PCIe6 PCIe11 PCIe12\n"); } /* iPass 4 */ if (slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 4:\n"); else { if (ipass_mapping4 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 4: PCIe7 PCIe9\n"); else pstdout_printf (state_data->pstate, "iPass 4: PCIe7 PCIe8 PCIe9 PCIe10\n"); } /* iPass 5 */ if (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 5:\n"); else { if (ipass_mapping1 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 5: PCIe2 PCIe16\n"); else pstdout_printf (state_data->pstate, "iPass 5:\n"); } /* iPass 6 */ if (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPASS 6:\n"); else { if (ipass_mapping2 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 6: PCIe4 PCIe14\n"); else pstdout_printf (state_data->pstate, "iPass 6:\n"); } /* iPass 7 */ if (slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 7:\n"); else { if (ipass_mapping3 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 7: PCIe6 PCIe12\n"); else pstdout_printf (state_data->pstate, "iPass 7:\n"); } /* iPass 8 */ if (slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8) pstdout_printf (state_data->pstate, "iPass 8:\n"); else { if (ipass_mapping4 == IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2) pstdout_printf (state_data->pstate, "iPass 8: PCIe8 PCIe10\n"); else pstdout_printf (state_data->pstate, "iPass 8:\n"); } rv = 0; cleanup: return (rv); } int ipmi_oem_dell_set_port_map (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; char *endptr = NULL; unsigned int ipass_mapping; uint8_t slot_mapping; uint8_t slot_mapping_subtype_is_1_2; uint8_t control_type; uint8_t ipass_mapping1; uint8_t ipass_mapping2; uint8_t ipass_mapping3; uint8_t ipass_mapping4; uint8_t slot_mapping1; uint8_t slot_mapping2; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); if (strcasecmp (state_data->prog_data->args->oem_options[0], "jumper") && strcasecmp (state_data->prog_data->args->oem_options[0], "bmc")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } errno = 0; ipass_mapping = strtoul (state_data->prog_data->args->oem_options[1], &endptr, 10); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } if (ipass_mapping < IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_MIN || ipass_mapping > IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[2], "1:2") && strcasecmp (state_data->prog_data->args->oem_options[2], "1:4") && strcasecmp (state_data->prog_data->args->oem_options[2], "1:8")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } /* Dell Poweredge OEM * * From Dell Provided Docs * * Port Map Configure Request * * 0x34 - OEM network function * 0xC8 - OEM cmd * 0x?? - bit 7 - get/set * - 0 - get * - 1 - set * - bit 6:4 - control type * - 1 - jumper * - 2 - bmc * - bit 3 - failover ipass mapping 1 * - 0 - 1:4 * - 1 - 1:2 * - bit 2 - failover ipass mapping 2 * - 0 - 1:4 * - 1 - 1:2 * - bit 1 - failover ipass mapping 3 * - 0 - 1:4 * - 1 - 1:2 * - bit 0 - failover ipass mapping 4 * - 0 - 1:4 * - 1 - 1:2 * 0x?? - optional byte - new port map setting * - on get, must specify byte to get equivalent byte of response * - bit 7:4 - slot mapping 1,2,3,4,13,14,15,16 * - bit 3:0 - slot mapping 5,6,7,8,9,10,11,12 * - for both * - 1 - 1:2 or 1:4 mode (indicated in previous byte) * - 2 - 1:8 mode * * Port Map Configure Response * * 0xC8 - OEM cmd * 0x?? - Completion Code * 0x?? - bit 7:4 - control type * - 1 - jumper * - 2 - bmc * - bit 3 - failover ipass mapping 1 * - 0 - 1:4 * - 1 - 1:2 * - bit 2 - failover ipass mapping 2 * - 0 - 1:4 * - 1 - 1:2 * - bit 1 - failover ipass mapping 3 * - 0 - 1:4 * - 1 - 1:2 * - bit 0 - failover ipass mapping 4 * - 0 - 1:4 * - 1 - 1:2 * 0x?? - optional byte * - bit 7:4 - slot mapping 1,2,3,4,13,14,15,16 * - bit 3:0 - slot mapping 5,6,7,8,9,10,11,12 * - for both * - 0 - 1:8 mode not supported * - 1 - 1:2 or 1:4 mode (indicated in previous byte) * - 2 - 1:8 mode */ /* Get the current settings */ bytes_rq[0] = IPMI_CMD_OEM_DELL_PORT_MAP; bytes_rq[1] = (IPMI_OEM_DELL_PORT_MAP_GET << IPMI_OEM_DELL_PORT_MAP_GET_SET_SHIFT); bytes_rq[2] = 0x00; /* to force proper return of data */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_DELL_PORT_MAP, IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RS, NULL) < 0) goto cleanup; /* Figure out the old settings */ ipass_mapping1 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_BITMASK); ipass_mapping1 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_SHIFT; ipass_mapping2 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_BITMASK); ipass_mapping2 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_SHIFT; ipass_mapping3 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_BITMASK); ipass_mapping3 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_SHIFT; ipass_mapping4 = (bytes_rs[2] & IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_BITMASK); ipass_mapping4 >>= IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_SHIFT; slot_mapping1 = (bytes_rs[3] & IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_BITMASK); slot_mapping1 >>= IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_SHIFT; slot_mapping2 = (bytes_rs[3] & IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_BITMASK); slot_mapping2 >>= IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_SHIFT; /* Special case check */ if (!strcasecmp (state_data->prog_data->args->oem_options[2], "1:2")) { slot_mapping = IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4; slot_mapping_subtype_is_1_2 = 1; } else if (!strcasecmp (state_data->prog_data->args->oem_options[2], "1:4")) { slot_mapping = IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4; slot_mapping_subtype_is_1_2 = 0; } else { slot_mapping = IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8; slot_mapping_subtype_is_1_2 = 0; } if (slot_mapping == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8 && (slot_mapping1 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8_NOT_SUPPORTED || slot_mapping2 == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_8_NOT_SUPPORTED)) { pstdout_fprintf (state_data->pstate, stderr, "Platform does not support 1:8 slot mapping\n"); goto cleanup; } /* Build up the set request using the responses from the get * response and user input */ bytes_rq[0] = IPMI_CMD_OEM_DELL_PORT_MAP; bytes_rq[1] = (IPMI_OEM_DELL_PORT_MAP_SET << IPMI_OEM_DELL_PORT_MAP_GET_SET_SHIFT); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "jumper")) control_type = IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_JUMPER; else control_type = IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_BMC; bytes_rq[1] |= (control_type << IPMI_OEM_DELL_PORT_MAP_CONTROL_TYPE_REQUEST_SHIFT); if (ipass_mapping == 1 && slot_mapping == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4) { if (slot_mapping_subtype_is_1_2) ipass_mapping1 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2; else ipass_mapping1 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_4; } if (ipass_mapping == 2 && slot_mapping == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4) { if (slot_mapping_subtype_is_1_2) ipass_mapping2 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2; else ipass_mapping2 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_4; } if (ipass_mapping == 3 && slot_mapping == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4) { if (slot_mapping_subtype_is_1_2) ipass_mapping3 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2; else ipass_mapping3 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_4; } if (ipass_mapping == 4 && slot_mapping == IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_2_OR_1_4) { if (slot_mapping_subtype_is_1_2) ipass_mapping4 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_2; else ipass_mapping4 = IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_4; } bytes_rq[1] |= (ipass_mapping1 << IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_1_SHIFT); bytes_rq[1] |= (ipass_mapping2 << IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_2_SHIFT); bytes_rq[1] |= (ipass_mapping3 << IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_3_SHIFT); bytes_rq[1] |= (ipass_mapping4 << IPMI_OEM_DELL_PORT_MAP_IPASS_MAPPING_4_SHIFT); if (ipass_mapping == 1 || ipass_mapping == 2) slot_mapping1 = slot_mapping; else slot_mapping2 = slot_mapping; bytes_rq[2] = (slot_mapping1 << IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_1_SHIFT); bytes_rq[2] |= (slot_mapping2 << IPMI_OEM_DELL_PORT_MAP_SLOT_MAPPING_2_SHIFT); /* Now set the new values */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_DELL_PORT_MAP, IPMI_NET_FN_OEM_DELL_GENERIC_PORT_MAP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-dell.h0000644002055400205540000000714313527331635017606 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_DELL_H #define IPMI_OEM_DELL_H #include "ipmi-oem.h" int ipmi_oem_dell_get_system_info (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_nic_selection (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_nic_selection (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_nic_selection_failover (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_nic_selection_failover (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_active_lom_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_ssh_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_ssh_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_telnet_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_telnet_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_active_directory_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_active_directory_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_reset_to_defaults (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_power_consumption_data (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_reset_power_consumption_data (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_power_supply_info (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_instantaneous_power_consumption_data (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_power_head_room (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_power_consumption_statistics (ipmi_oem_state_data_t *state_data); /* legacy */ int ipmi_oem_dell_get_average_power_history (ipmi_oem_state_data_t *state_data); /* legacy */ int ipmi_oem_dell_get_peak_power_history (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_power_capacity (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_power_capacity (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_power_capacity_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_power_capacity_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_chassis_identify_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_power_monitoring_over_interval (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_power_monitoring_interval_range (ipmi_oem_state_data_t *state_data); #if 0 /* cannot verify */ int ipmi_oem_dell_get_blade_slot_id (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_dell_get_last_post_code (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_slot_power_toggle (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_slot_power_control (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_get_port_map (ipmi_oem_state_data_t *state_data); int ipmi_oem_dell_set_port_map (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_DELL_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-fujitsu.c0000644002055400205540000014131713527331635020354 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-fujitsu.h" #include "tool-oem-common.h" #include "tool-util-common.h" #include "freeipmi-portability.h" #include "pstdout.h" static int _ipmi_oem_get_power_source (ipmi_oem_state_data_t *state_data, uint8_t command_specifier, uint8_t *source) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (command_specifier == IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_ON_SOURCE || command_specifier == IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_OFF_SOURCE); assert (source); /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0x01 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - Command Specifier * * Response * * 0x01 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x01 - data length * 0x?? - power on/off source */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_POWER; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = command_specifier; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 7, IPMI_CMD_OEM_FUJITSU_POWER, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; (*source) = bytes_rs[6]; rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_power_on_source (ipmi_oem_state_data_t *state_data) { uint8_t source = 0; char str[IPMI_OEM_STR_BUFLEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_ipmi_oem_get_power_source (state_data, IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_ON_SOURCE, &source) < 0) goto cleanup; memset (str, '\0', IPMI_OEM_STR_BUFLEN + 1); switch (source) { case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_SOFTWARE_OR_COMMAND: snprintf (str, IPMI_OEM_STR_BUFLEN, "Software or command"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWER_SWITCH: snprintf (str, IPMI_OEM_STR_BUFLEN, "Power switch"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_POWER_FAILURE: snprintf (str, IPMI_OEM_STR_BUFLEN, "Automatic restart after power failure"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_CLOCK_OR_TIMER: snprintf (str, IPMI_OEM_STR_BUFLEN, "Clock or timer"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_FAN_FAILURE_SHUTDOWN: snprintf (str, IPMI_OEM_STR_BUFLEN, "Automatic restart after fan failure shutdown"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_AUTOMATIC_RESTART_AFTER_CRITICAL_TEMPERATURE_SHUTDOWN: snprintf (str, IPMI_OEM_STR_BUFLEN, "Automatic restart after critical temperature shutdown"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_WATCHDOG_TIMEOUT: snprintf (str, IPMI_OEM_STR_BUFLEN, "Reboot after watchdog timeout"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REMOTE_ON: snprintf (str, IPMI_OEM_STR_BUFLEN, "Remote on"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_A_CPU_ERROR: snprintf (str, IPMI_OEM_STR_BUFLEN, "Reboot after a CPU error"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_BY_HARDWARE_RESET: snprintf (str, IPMI_OEM_STR_BUFLEN, "Reboot by hardware reset"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_AFTER_WARM_START: snprintf (str, IPMI_OEM_STR_BUFLEN, "Reboot after warm start"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWERED_ON_BY_A_PCI_BUS_POWER_MANAGEMENT_EVENT: snprintf (str, IPMI_OEM_STR_BUFLEN, "Powered on by a PCI Bus Power Management Event"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_POWERED_ON_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER: /* HLiebig: capitalized "remote manager" from doc */ snprintf (str, IPMI_OEM_STR_BUFLEN, "Powered on by remote control via Remote Manager"); break; case IPMI_OEM_FUJITSU_POWER_ON_SOURCE_REBOOT_RESET_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER: /* HLiebig: capitalized "remote manager" from doc */ snprintf (str, IPMI_OEM_STR_BUFLEN, "Reboot/reset by remote control via Remote Manager"); break; default: snprintf (str, IPMI_OEM_STR_BUFLEN, "Unrecognized source: %02Xh", source); } pstdout_printf (state_data->pstate, "%s\n", str); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_power_off_source (ipmi_oem_state_data_t *state_data) { uint8_t source = 0; char str[IPMI_OEM_STR_BUFLEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_ipmi_oem_get_power_source (state_data, IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_POWER_OFF_SOURCE, &source) < 0) goto cleanup; memset (str, '\0', IPMI_OEM_STR_BUFLEN + 1); switch (source) { case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_SOFTWARE: snprintf (str, IPMI_OEM_STR_BUFLEN, "Software or command"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_POWER_SWITCH: snprintf (str, IPMI_OEM_STR_BUFLEN, "Power switch"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_AC_POWER_FAIL: snprintf (str, IPMI_OEM_STR_BUFLEN, "AC power fail"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_CLOCK_OR_TIMER: snprintf (str, IPMI_OEM_STR_BUFLEN, "Clock or timer"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FAN_FAILURE: snprintf (str, IPMI_OEM_STR_BUFLEN, "Fan failure"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_CRITICAL_TEMPERATURE: snprintf (str, IPMI_OEM_STR_BUFLEN, "Critical temperature"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FINAL_POWER_OFF_AFTER_REPEATED_WATCHDOG_TIMEOUTS: snprintf (str, IPMI_OEM_STR_BUFLEN, "Final power-off after repeated watchdog timeouts"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_FINAL_POWER_OFF_AFTER_REPEATED_CPU_ERRORS: snprintf (str, IPMI_OEM_STR_BUFLEN, "Final power-off after repeated CPU errors"); break; case IPMI_OEM_FUJITSU_POWER_OFF_SOURCE_POWERED_OFF_BY_REMOTE_CONTROL_VIA_REMOTE_MANAGER: /* HLiebig: capitalized "remote manager" from doc */ snprintf (str, IPMI_OEM_STR_BUFLEN, "Powered off by remote control via Remote Manager"); break; default: snprintf (str, IPMI_OEM_STR_BUFLEN, "Unrecognized source: %02Xh", source); } pstdout_printf (state_data->pstate, "%s\n", str); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_remote_storage_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t connection; uint8_t storage_status; uint8_t storage_type; char *storage_status_str; char *storage_type_str; long tmp; char *endptr; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; tmp = strtol (state_data->prog_data->args->oem_options[0], &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0 || tmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!(tmp >= IPMI_OEM_FUJITSU_REMOTE_STORAGE_CONNECTION_MIN && tmp <= IPMI_OEM_FUJITSU_REMOTE_STORAGE_CONNECTION_MAX)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } connection = tmp; /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x30 - OEM network function * 0x19 - OEM cmd * 0x?? - "Command Specifier" * - 0x01 - determine if storage media are connected * - 0x02 - get remote storage status * 0x?? - no apparent use * 0x?? - if command specifier == 0x01 * - 0x00 * if command specifier == 0x02 * - 0x00 - connection 0 * - 0x01 - connection 2 ("2" - is this a typo in the document??) * * Response * * 0x19 - OEM cmd * 0x?? - Completion code * 0x?? - "Command Specifier" * 0x?? - if command specifier == 0x01 * - connection status * - 0x00 = no, 0x01 = yes * - if command specifier == 0x02 * - 0x00 * 0x?? - if command specifier == 0x01 * - 0x00 * - if command specifier == 0x02 * - 0x00 * 0x?? - if command specifier == 0x01 * - 0x00 * - if command specifier == 0x02 * - remote storage status * 0x?? - if command specifier == 0x01 * - N/A - not returned?? * - if command specifier == 0x02 * - remote storage type */ /* achu: we won't bother checking if there are any remote * connections, just check the connection indicated by the user */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_GET_REMOTE_STORAGE_CONNECTION_OR_STATUS; bytes_rq[1] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_REMOTE_STORAGE_STATUS; bytes_rq[2] = 0x00; bytes_rq[3] = connection; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_FUJITSU_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_FUJITSU_GET_REMOTE_STORAGE_CONNECTION_OR_STATUS, IPMI_NET_FN_OEM_FUJITSU_GENERIC_RS, NULL) < 0) goto cleanup; storage_status = bytes_rs[4]; storage_type = bytes_rs[5]; switch (storage_status) { case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_INVALID_UNKNOWN: storage_status_str = "Invalid / unknown"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_IDLE: storage_status_str = "idle"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_ATTEMPT_PENDING: storage_status_str = "Connection Attempt pending"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTED: storage_status_str = "Connected"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_ATTEMPTS_RETRIES_EXHAUSTED_FAILED: storage_status_str = "Connection Attempts retries exhausted / failed"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_CONNECTION_LOST: storage_status_str = "Connection lost"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_STATUS_DISCONNECT_PENDING: storage_status_str = "Disconnect pending"; break; default: storage_status_str = "Unknown Storage Status"; } pstdout_printf (state_data->pstate, "Storage Status : %s\n", storage_status_str); switch (storage_type) { case IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_INVALID_UNKNOWN: storage_type_str = "Invalid / unknown"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_STORAGE_SERVER_IPMI: storage_type_str = "Storage Server / IPMI"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_APPLET: storage_type_str = "Applet"; break; case IPMI_OEM_FUJITSU_REMOTE_STORAGE_TYPE_NONE_NOT_CONNECTED: storage_type_str = "None / Not connected"; break; default: storage_type_str = "Unknown Storage Type"; } pstdout_printf (state_data->pstate, "Storage Type : %s\n", storage_type_str); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_system_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t system_status; uint8_t signaling; uint8_t post_code; uint8_t system_power; uint8_t sel_entries_available; uint8_t watchdog_active; uint8_t agent_connected; uint8_t post_state; uint8_t identify_led; /* rename from "localize" */ uint8_t css_led; uint8_t global_error_led; char *css_led_str = NULL; char *global_error_led_str = NULL; struct timeval t; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x10 - Command Specifier * 0x?? - timestamp (LSB first) * 0x?? - timestamp * 0x?? - timestamp * 0x?? - timestamp * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - System Status * bit 7 - System ON * bit 6 - * bit 5 - * bit 4 - SEL entries available * bit 3 - * bit 2 - Watchdog active * bit 1 - Agent connected * bit 0 - Post State * 0x?? - Signaling * bit 7 - Identify LED (sometimes refered as "Localize") * bit 6 - * bit 5 - * bit 4 - * bit 3 - CSS LED (Customer Self Service LED) * bit 2 - CSS LED (Customer Self Service LED) * bit 1 - Global Error LED * bit 0 - Global Error LED * 0x?? - Notifications * bit 7 - SEL Modified (New SEL Entry) * bit 6 - SEL Modified (SEL Cleared) * bit 5 - SDR Modified * bit 4 - Nonvolatile IPMI Variable Modified * bit 3 - ConfigSpace Modified * bit 2 - * bit 1 - * bit 0 - New Output on LocalView display * 0x?? - Last POST Code (Port 80) (HLiebig: renamed from "Post Code" in doc) * * achu: Docs say "timestamp is only relevant for evaluating the * Notifications Byte". I assume this is because the Notifications * timestamp indicates if things have changed in the SEL/SDR. */ if (gettimeofday (&t, NULL) < 0) { pstdout_perror (state_data->pstate, "gettimeofday"); goto cleanup; } bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SYSTEM_STATUS; bytes_rq[5] = (t.tv_sec & 0x000000FF); bytes_rq[6] = (t.tv_sec & 0x0000FF00) >> 8; bytes_rq[7] = (t.tv_sec & 0x00FF0000) >> 16; bytes_rq[8] = (t.tv_sec & 0xFF000000) >> 24; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 9, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 9, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; /* achu: the "Notifications" are dependent on the timestamp input, * we won't bother outputting them */ system_status = bytes_rs[5]; signaling = bytes_rs[6]; post_code = bytes_rs[8]; system_power = (system_status & IPMI_OEM_FUJITSU_SYSTEM_STATUS_SYSTEM_POWER_BITMASK); system_power >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_SYSTEM_POWER_SHIFT; sel_entries_available = (system_status & IPMI_OEM_FUJITSU_SYSTEM_STATUS_SEL_ENTRIES_AVAILABLE_BITMASK); sel_entries_available >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_SEL_ENTRIES_AVAILABLE_SHIFT; watchdog_active = (system_status & IPMI_OEM_FUJITSU_SYSTEM_STATUS_WATCHDOG_ACTIVE_BITMASK); watchdog_active >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_WATCHDOG_ACTIVE_SHIFT; agent_connected = (system_status & IPMI_OEM_FUJITSU_SYSTEM_STATUS_AGENT_CONNECTED_BITMASK); agent_connected >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_AGENT_CONNECTED_SHIFT; post_state = (system_status & IPMI_OEM_FUJITSU_SYSTEM_STATUS_POST_STATE_BITMASK); post_state >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_POST_STATE_SHIFT; identify_led = (signaling & IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_LOCAL_LED_BITMASK); identify_led >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_LOCAL_LED_SHIFT; css_led = (signaling & IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_CSS_LED_BITMASK); css_led >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_CSS_LED_SHIFT; global_error_led = (signaling & IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_GLOBAL_ERROR_LED_BITMASK); global_error_led >>= IPMI_OEM_FUJITSU_SYSTEM_STATUS_SIGNALING_GLOBAL_ERROR_LED_SHIFT; pstdout_printf (state_data->pstate, "System Power : %s\n", system_power ? "On" : "Off"); pstdout_printf (state_data->pstate, "SEL Entries Available : %s\n", sel_entries_available ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Watchdog Active : %s\n", watchdog_active ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Agent Connected : %s\n", agent_connected ? "Yes" : "No"); /* HLiebig: renamed from "Post State" in doc */ pstdout_printf (state_data->pstate, "System in POST : %s\n", post_state ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Identify LED : %s\n", identify_led ? "On" : "Off"); switch (css_led) { case IPMI_OEM_FUJITSU_CSS_LED_OFF: css_led_str = "Off"; break; case IPMI_OEM_FUJITSU_CSS_LED_ON: css_led_str = "On"; break; case IPMI_OEM_FUJITSU_CSS_LED_BLINK: css_led_str = "Blink"; break; default: css_led_str = "Unknown LED State"; } pstdout_printf (state_data->pstate, "CSS LED : %s\n", css_led_str); switch (global_error_led) { case IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_OFF: global_error_led_str = "Off"; break; case IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_ON: global_error_led_str = "On"; break; case IPMI_OEM_FUJITSU_GLOBAL_ERROR_LED_BLINK: global_error_led_str = "Blink"; break; default: global_error_led_str = "Unknown LED State"; } pstdout_printf (state_data->pstate, "Global Error LED : %s\n", global_error_led_str); /* HLiebig: renamed from "Post Code" in doc */ pstdout_printf (state_data->pstate, "Last POST Code (Port 80) : %02Xh\n", post_code); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_eeprom_version_info (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t eeprom_number; uint8_t status; uint8_t major_firmware_revision; uint8_t minor_firmware_revision; uint8_t aux_firmware_revision_major; uint8_t aux_firmware_revision_minor; #if 0 /* unused, remove compiler warning but leave for documentation */ uint8_t aux_firmware_revision_res; #endif char major_firmware_revision_char; uint8_t major_sdrr_revision; uint8_t minor_sdrr_revision; char major_sdrr_revision_char; uint16_t sdrr_id; uint8_t major_booter_revision; uint8_t minor_booter_revision; uint8_t aux_booter_revision_major; uint8_t aux_booter_revision_minor; long tmp; char *endptr; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; tmp = strtol (state_data->prog_data->args->oem_options[0], &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0 || tmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!(tmp >= IPMI_OEM_FUJITSU_EEPROM_NUMBER_MIN && tmp <= IPMI_OEM_FUJITSU_EEPROM_NUMBER_MAX)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } eeprom_number = tmp; /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x12 - Command Specifier * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - status * 0x00 - checksum error * 0x01 - ok * 0x?? - major fw revision - binary coded * 0x?? - minor fw revision - binary - 2 char field coded (HLiebig: listed incorrectly as BCD in doc) * 0x?? - aux fw revision (lsb first) - binary coded, major/minor/res. * 0x?? - aux fw revision * 0x?? - aux fw revision * 0x?? - major fw char - ascii char * 0x?? - major sdrr revision - binary coded (HLiebig: listed incorrectly as BCD in doc) * 0x?? - minor sdrr revision - bcd coded * 0x?? - major sdrr char - ascii char * 0x?? - sdrr-ID (lsb) - hex coded (HLiebig: listed incorrectly as binary in doc) * 0x?? - sdrr-ID (msb) - hex coded (HLiebig: listed incorrectly as binary in doc) * 0x?? - major booter revision - binary coded * 0x?? - minor booter revision - binary - 2 char field coded (HLiebig: listed incorrectly as BCD in doc) * 0x?? - aux booter revision (lsb first) - binary coded, major/minor * 0x?? - aux booter revision */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_EEPROM_VERSION_INFO; bytes_rq[5] = eeprom_number; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 6, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 21, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; status = bytes_rs[5]; if (status != IPMI_OEM_FUJITSU_EEPROM_CHECKSUM_OK) { pstdout_fprintf (state_data->pstate, stderr, "Check Error Runtime\n"); goto cleanup; } major_firmware_revision = bytes_rs[6]; minor_firmware_revision = bytes_rs[7]; aux_firmware_revision_major = bytes_rs[8]; aux_firmware_revision_minor = bytes_rs[9]; #if 0 /* unused, remove compiler warning but leave for documentation */ aux_firmware_revision_res = bytes_rs[10]; #endif major_firmware_revision_char = (char)bytes_rs[11]; major_sdrr_revision = bytes_rs[12]; minor_sdrr_revision = bytes_rs[13]; major_sdrr_revision_char = (char)bytes_rs[14]; sdrr_id = bytes_rs[15]; sdrr_id |= (bytes_rs[16] << 8); major_booter_revision = bytes_rs[17]; minor_booter_revision = bytes_rs[18]; aux_booter_revision_major = bytes_rs[19]; aux_booter_revision_minor = bytes_rs[20]; /* make sure char is atleast legit */ /* HLiebig: minor_firmware_revision listed incorrectly as BCD in doc */ if (isalnum(major_firmware_revision_char)) pstdout_printf (state_data->pstate, "Firmware Revision : %u.%02u%c (%u.%02u)\n", aux_firmware_revision_major, aux_firmware_revision_minor, major_firmware_revision_char, major_firmware_revision, minor_firmware_revision); else pstdout_printf (state_data->pstate, "Firmware Revision : %u.%02u (%u.%02u)\n", aux_firmware_revision_major, aux_firmware_revision_minor, major_firmware_revision, minor_firmware_revision); /* HLiebig: major_sdrr_revision listed incorrectly as BCD in doc */ if (isalnum (major_sdrr_revision_char)) pstdout_printf (state_data->pstate, "SDRR Revision : %u.%02X%c\n", major_sdrr_revision, minor_sdrr_revision, major_sdrr_revision_char); else pstdout_printf (state_data->pstate, "SDRR Revision : %u.%02X\n", major_sdrr_revision, minor_sdrr_revision); /* HLiebig: sdrr_id listed incorrectly as binary in doc */ pstdout_printf (state_data->pstate, "SDRR ID : %X\n", sdrr_id); /* HLiebig: minor_booter_revision listed incorrectly as BCD in doc */ pstdout_printf (state_data->pstate, "Booter Revision : %u.%02u (%u.%02u)\n", aux_booter_revision_major, aux_booter_revision_minor, major_booter_revision, minor_booter_revision); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_identify_led (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t state; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0xB1 - Command Specifier * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - led on/off state (0 == off, 1 == on) */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_IDENTIFY_LED; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; state = (bytes_rs[5] & IPMI_OEM_FUJITSU_IDENTIFY_LED_BITMASK); state >>= IPMI_OEM_FUJITSU_IDENTIFY_LED_SHIFT; if (state == IPMI_OEM_FUJITSU_IDENTIFY_LED_ON) pstdout_printf (state_data->pstate, "on\n"); else pstdout_printf (state_data->pstate, "off\n"); rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_set_identify_led (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "on") && strcasecmp (state_data->prog_data->args->oem_options[0], "off")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0xB0 - Command Specifier * 0x?? - led on/off (0 == off, 1 == on) * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_SET_IDENTIFY_LED; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "on")) bytes_rq[5] = IPMI_OEM_FUJITSU_IDENTIFY_LED_ON; else bytes_rq[5] = IPMI_OEM_FUJITSU_IDENTIFY_LED_OFF; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 6, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 5, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_error_led (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t state; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0xB3 - Command Specifier * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - error led state * * GEL - Global Error LED * CSS - Customer Self Service LED * * 0 - CSS off / GEL off * 1 - CSS off / GEL on * 2 - CSS off / GEL blink * 3 - CSS on / GEL off * 4 - CSS on / GEL on * 5 - CSS on / GEL blink * 6 - CSS blink / GEL off * 7 - CSS blink / GEL on * 8 - CSS blink / GEL blink */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_ERROR_LED; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; state = bytes_rs[5]; switch (state) { case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_OFF: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_ON: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_BLINK: pstdout_printf (state_data->pstate, "CSS LED: off\n"); break; case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_OFF: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_ON: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_BLINK: pstdout_printf (state_data->pstate, "CSS LED: on\n"); break; case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_OFF: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_ON: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_BLINK: pstdout_printf (state_data->pstate, "CSS LED: blink\n"); break; default: pstdout_printf (state_data->pstate, "Unrecognized LED state: %02Xh\n", state); goto cleanup; } switch (state) { case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_OFF: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_OFF: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_OFF: pstdout_printf (state_data->pstate, "GEL LED: off\n"); break; case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_ON: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_ON: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_ON: pstdout_printf (state_data->pstate, "GEL LED: on\n"); break; case IPMI_OEM_FUJITSU_ERROR_LED_CSS_OFF_GEL_BLINK: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_ON_GEL_BLINK: case IPMI_OEM_FUJITSU_ERROR_LED_CSS_BLINK_GEL_BLINK: pstdout_printf (state_data->pstate, "GEL LED: blink\n"); break; default: pstdout_printf (state_data->pstate, "Unrecognized LED state: %02Xh\n", state); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_oem_fujitsu_get_sel_entry_long_text (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; long value; uint16_t sel_record_id; uint16_t actual_record_id = 0; uint32_t timestamp = 0; uint8_t css = 0; uint8_t severity = 0; char time_buf[IPMI_OEM_TIME_BUFLEN + 1]; char data_buf[IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH + 1]; uint8_t data_length; uint8_t offset = 0; uint8_t component_length = 0; char *css_str = NULL; char *severity_str = NULL; char *endptr = NULL; int rv = -1; uint8_t max_read_length; struct ipmi_oem_data oem_data; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; value = strtol (state_data->prog_data->args->oem_options[0], &endptr, 0); if (errno || endptr[0] != '\0' || value < IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY || value > IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } sel_record_id = value; memset (data_buf, '\0', IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH + 1); /* HLiebig: Note: Documentation is for iRMC S2 version */ if ((ipmi_get_oem_data (state_data->pstate, state_data->ipmi_ctx, &oem_data) <= 0) || (IPMI_FUJITSU_PRODUCT_ID_IS_IRMC_S1 (oem_data.product_id))) { max_read_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_READ_LENGTH; data_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S1_MAX_DATA_LENGTH; } else { max_read_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_READ_LENGTH; data_length = IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_IRMC_S2_MAX_DATA_LENGTH; } /* Fujitsu OEM * * http://manuals.ts.fujitsu.com/file/4390/irmc_s2-ug-en.pdf * * Request * * 0x2E - OEM network function * 0xF5 - OEM cmd * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x43 - Command Specifier * 0x?? - Record ID (LSB first) * 0x?? - Record ID ; 0x0000 = "first record", 0xFFFF = "last record" * 0x?? - Offset (in response SEL text) * 0x?? - MaxResponseDataSize (size of converted SEL data 16:n in response, maximum is 100) * * Response * * 0xF5 - OEM cmd * 0x?? - Completion code * 0x?? - Fujitsu IANA (LSB first) * 0x?? - Fujitsu IANA * 0x?? - Fujitsu IANA * 0x?? - Next Record ID (LSB) * 0x?? - Next Record ID (MSB) * 0x?? - Actual Record ID (LSB) * 0x?? - Actual Record ID (MSB) * 0x?? - Record type * 0x?? - timestamp (LSB first) * 0x?? - timestamp * 0x?? - timestamp * 0x?? - timestamp * 0x?? - severity * bit 7 - CSS component * - 0 - No CSS component * - 1 - CSS component * bit 6-4 - 000 = INFORMATIONAL * 001 = MINOR * 010 = MAJOR * 011 = CRITICAL * 1xx = unknown * bit 3-0 - reserved * 0x?? - data length (of the whole text) * 0x?? - converted SEL data * - requested number of bytes starting at requested offset (MaxResponseDataSize-1 bytes of data) * 0x00 - trailing '\0' character */ bytes_rq[0] = IPMI_CMD_OEM_FUJITSU_SYSTEM; bytes_rq[1] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x0000FF); bytes_rq[2] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0x00FF00) >> 8; bytes_rq[3] = (IPMI_IANA_ENTERPRISE_ID_FUJITSU & 0xFF0000) >> 16; bytes_rq[4] = IPMI_OEM_FUJITSU_COMMAND_SPECIFIER_GET_SEL_ENTRY_LONG_TEXT; bytes_rq[5] = (sel_record_id & 0x00FF); bytes_rq[6] = (sel_record_id & 0xFF00) >> 8; /* * From Holger Liebig * * "Unfortunately due to memory constrains in the previous BMC * generation the maximum length of a single response is limited to * 64bytes, while on the current product line you should be able to * get the full 100bytes translated SEL text with a single request * at least over LAN. Maximum (non standard) KCS transfer size is * also different between current (255) and previous (64) * generation, so the code should compare the data received with the * total length reported in the response." */ /* Request partial or complete string, depending on product */ bytes_rq[8] = max_read_length; while (offset < data_length) { bytes_rq[7] = offset; /* BMC checks for boundaries, offset + len has to be <= 80 (iRMC S1) <= 100 (iRMC S2) */ if (offset + bytes_rq[8] > data_length) bytes_rq[8] = data_length - offset; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 9, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 17, IPMI_CMD_OEM_FUJITSU_SYSTEM, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; /* achu: assume a lot of this will be the same not matter how many times we loop */ if (!offset) { actual_record_id = bytes_rs[7]; actual_record_id |= (bytes_rs[8] << 8); /* use actual_record_id for subsequent requests to obtain consistent results */ bytes_rq[5] = bytes_rs[7]; bytes_rq[6] = bytes_rs[8]; timestamp = bytes_rs[10]; timestamp |= (bytes_rs[11] << 8); timestamp |= (bytes_rs[12] << 16); timestamp |= (bytes_rs[13] << 24); css = (bytes_rs[14] & IPMI_OEM_FUJITSU_CSS_BITMASK); css >>= IPMI_OEM_FUJITSU_CSS_SHIFT; severity = (bytes_rs[14] & IPMI_OEM_FUJITSU_SEVERITY_BITMASK); severity >>= IPMI_OEM_FUJITSU_SEVERITY_SHIFT; } data_length = bytes_rs[15]; /* Every response should be NUL terminated, not just the last * component. */ bytes_rs[rs_len - 1] = '\0'; /* just to be sure it's terminated */ component_length = strlen ((char *)bytes_rs + 16); /* achu: truncate if there is overflow */ if (offset + component_length > data_length) { memcpy (data_buf + offset, &bytes_rs[16], IPMI_OEM_FUJITSU_SEL_ENTRY_LONG_TEXT_MAX_DATA_LENGTH - offset); offset = data_length; } else { memcpy (data_buf + offset, &bytes_rs[16], component_length); offset += component_length; } } if (css == IPMI_OEM_FUJITSU_CSS_COMPONENT) css_str = "CSS Component"; switch (severity) { case IPMI_OEM_FUJITSU_SEVERITY_INFORMATIONAL: severity_str = "INFORMATIONAL"; break; case IPMI_OEM_FUJITSU_SEVERITY_MINOR: severity_str = "MINOR"; break; case IPMI_OEM_FUJITSU_SEVERITY_MAJOR: severity_str = "MAJOR"; break; case IPMI_OEM_FUJITSU_SEVERITY_CRITICAL: severity_str = "CRITICAL"; break; default: severity_str = "Unknown Severity"; } memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (timestamp, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%b-%d-%Y | %H:%M:%S", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } if (css_str) pstdout_printf (state_data->pstate, "%u | %s | %s ; %s ; %s\n", actual_record_id, time_buf, severity_str, data_buf, css_str); else pstdout_printf (state_data->pstate, "%u | %s | %s ; %s\n", actual_record_id, time_buf, severity_str, data_buf); rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-fujitsu.h0000644002055400205540000000276713527331635020366 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_FUJITSU_H #define IPMI_OEM_FUJITSU_H #include "ipmi-oem.h" int ipmi_oem_fujitsu_get_power_on_source (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_power_off_source (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_remote_storage_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_system_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_eeprom_version_info (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_identify_led (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_set_identify_led (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_error_led (ipmi_oem_state_data_t *state_data); int ipmi_oem_fujitsu_get_sel_entry_long_text (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_FUJITSU_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-gigabyte.c0000644002055400205540000004617413527331635020463 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-gigabyte.h" #include "freeipmi-portability.h" #include "pstdout.h" #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_0 0x5E #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_1 0x2B #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_2 0x00 #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_3 0x0C #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_4 0x02 #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_0 0x5E #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_1 0x2B #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_2 0x00 #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_3 0x0C #define IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_4 0x01 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_0 0x0A #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_1 0x3C #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_2 0x00 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_3 0x15 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_0 0x0A #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_1 0x3C #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_2 0x00 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_3 0x15 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SSH 22 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTP 80 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_RPCBIND 111 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SVRLOC 427 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTPS 443 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_AVOCENTKVM 2068 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTP 5988 #define IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTPS 5989 int ipmi_oem_gigabyte_get_nic_mode (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* From Gigabyte Provided Information * * GIGABYTE MD90-FS0-ZB * * Get NIC Mode Request * * 0x2E - OEM network function (IPMI_NET_FN_OEM_GROUP_RQ) * 0xCC - OEM cmd * 0x5E - ??? - no idea, given by vendor * 0x2B - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x0C - ??? - no idea, given by vendor * 0x02 - ??? - no idea, given by vendor * * Set NIC Mode Response * * 0xCC - OEM cmd * 0x?? - Completion Code * 0x5E - ??? - no idea, given by vendor * 0x2B - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x0C - ??? - no idea, given by vendor * 0x02 - ??? - no idea, given by vendor * 0x?? - 0x01 - dedicated * - 0x02 - shared * - 0x03 - failover */ bytes_rq[0] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION; bytes_rq[1] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_0; bytes_rq[2] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_1; bytes_rq[3] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_2; bytes_rq[4] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_3; bytes_rq[5] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_GET_NIC_MODE_BYTE_4; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 6, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 8, IPMI_CMD_OEM_GIGABYTE_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; switch (bytes_rs[7]) { case IPMI_OEM_GIGABYTE_NIC_MODE_DEDICATED: pstdout_printf (state_data->pstate, "dedicated\n"); break; case IPMI_OEM_GIGABYTE_NIC_MODE_SHARED: pstdout_printf (state_data->pstate, "shared\n"); break; case IPMI_OEM_GIGABYTE_NIC_MODE_FAILOVER: pstdout_printf (state_data->pstate, "failover\n"); break; default: pstdout_printf (state_data->pstate, "unknown NIC selection: %Xh\n", bytes_rs[7]); break; } rv = 0; cleanup: return (rv); } int ipmi_oem_gigabyte_set_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated") && strcasecmp (state_data->prog_data->args->oem_options[0], "shared") && strcasecmp (state_data->prog_data->args->oem_options[0], "failover")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* From Gigabyte Provided Information * * GIGABYTE MD90-FS0-ZB * * Set NIC Mode Request * * 0x2E - OEM network function (IPMI_NET_FN_OEM_GROUP_RQ) * 0xCC - OEM cmd * 0x5E - ??? - no idea, given by vendor * 0x2B - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x0C - ??? - no idea, given by vendor * 0x01 - ??? - no idea, given by vendor * 0x?? - 0x01 - dedicated * - 0x02 - shared * - 0x03 - failover * * Set NIC Mode Response * * 0xCC - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION; bytes_rq[1] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_0; bytes_rq[2] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_1; bytes_rq[3] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_2; bytes_rq[4] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_3; bytes_rq[5] = IPMI_CMD_OEM_GIGABYTE_CONFIGURATION_SET_NIC_MODE_BYTE_4; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) bytes_rq[6] = IPMI_OEM_GIGABYTE_NIC_MODE_DEDICATED; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "shared")) bytes_rq[6] = IPMI_OEM_GIGABYTE_NIC_MODE_SHARED; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "failover") */ bytes_rq[6] = IPMI_OEM_GIGABYTE_NIC_MODE_FAILOVER; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 7, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_GIGABYTE_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_gigabyte_get_bmc_services (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; int ports[] = { IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SSH, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTP, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_RPCBIND, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SVRLOC, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTPS, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_AVOCENTKVM, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTP, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTPS, 0 }; char *portsstr[] = { "ssh", "http", "rpcbind", "svrloc", "https", "avocentkvm", "wbem-http", "wbem-https", NULL }; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 0); /* From Gigabyte Provided Information * * GIGABYTE MD90-FS0-ZB * * Request * * 0x2E - OEM network function * 0x21 - OEM cmd * 0x0A - ??? - no idea, given by vendor * 0x3C - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x15 - ??? - no idea, given by vendor * 0x?? - lsb port number to block/unblock * 0x?? - msb port number to block/unblock * * Response * * 0x21 - OEM cmd * 0x?? - Completion Code * 0x0A - ??? - no idea, given by vendor * 0x3C - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x?? - enabled/disabled * - 0 - disabled * - 1 - enabled */ bytes_rq[0] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION2; bytes_rq[1] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_0; bytes_rq[2] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_1; bytes_rq[3] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_2; bytes_rq[4] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_GET_BMC_SERVICES_BYTE_3; i = 0; while (ports[i]) { char *outputstr = NULL; bytes_rq[5] = (ports[i] & 0x00FF); bytes_rq[6] = (ports[i] & 0xFF00) >> 8; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 7, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION2, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; if (bytes_rs[5] == IPMI_OEM_GIGABYTE_PORT_ENABLED) outputstr = "enabled"; else if (bytes_rs[5] == IPMI_OEM_GIGABYTE_PORT_DISABLED) outputstr = "disabled"; else outputstr = "unknown"; pstdout_printf (state_data->pstate, "%s: %s\n", portsstr[i], outputstr); i++; } rv = 0; cleanup: return (rv); } int ipmi_oem_gigabyte_set_bmc_services (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "ssh") && strcasecmp (state_data->prog_data->args->oem_options[1], "http") && strcasecmp (state_data->prog_data->args->oem_options[1], "rpcbind") && strcasecmp (state_data->prog_data->args->oem_options[1], "svrloc") && strcasecmp (state_data->prog_data->args->oem_options[1], "https") && strcasecmp (state_data->prog_data->args->oem_options[1], "avocentkvm") && strcasecmp (state_data->prog_data->args->oem_options[1], "wbem-http") && strcasecmp (state_data->prog_data->args->oem_options[1], "wbem-https")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* From Gigabyte Provided Information * * GIGABYTE MD90-FS0-ZB * * Request * * 0x2E - OEM network function * 0x20 - OEM cmd * 0x0A - ??? - no idea, given by vendor * 0x3C - ??? - no idea, given by vendor * 0x00 - ??? - no idea, given by vendor * 0x15 - ??? - no idea, given by vendor * 0x?? - lsb port number to block/unblock * 0x?? - msb port number to block/unblock * 0x?? - block/unblock * - 0 - block * - 1 - unblock * * Response * * 0x20 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION; bytes_rq[1] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_0; bytes_rq[2] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_1; bytes_rq[3] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_2; bytes_rq[4] = IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SET_BMC_SERVICES_BYTE_3; if (!strcasecmp (state_data->prog_data->args->oem_options[1], "ssh")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SSH & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SSH & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "http")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTP & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTP & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "rpcbind")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_RPCBIND & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_RPCBIND & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "svrloc")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SVRLOC & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_SVRLOC & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "https")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTPS & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_HTTPS & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "avocentkvm")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_AVOCENTKVM & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_AVOCENTKVM & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "wbem-http")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTP & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTP & 0xFF00) >> 8; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "wbem-https")) { bytes_rq[5] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTPS & 0x00FF); bytes_rq[6] = (IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION_WBEM_HTTPS & 0xFF00) >> 8; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) bytes_rq[7] = IPMI_OEM_GIGABYTE_UNBLOCK_PORT; else bytes_rq[7] = IPMI_OEM_GIGABYTE_BLOCK_PORT; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 8, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_GIGABYTE_PORT_CONFIGURATION, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-gigabyte.h0000644002055400205540000000213513527331635020455 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_GIGABYTE_H #define IPMI_OEM_GIGABYTE_H #include "ipmi-oem.h" int ipmi_oem_gigabyte_get_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_gigabyte_set_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_gigabyte_get_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_gigabyte_set_bmc_services (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_GIGABYTE_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-ibm.c0000644002055400205540000006561113527331635017434 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-ibm.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" /* IBM OEM SDR LED Record * * 1-2 - Record ID (standard) * 3 - Version (standard) * 4 - Record Type (0xC0 - standard) * 5 - Record Length (standard) * 6-8 - Manufacturer ID (standard) * 9 - OEM Sensor Type (oem_data) * 10-11 - ?? (oem_data) * 12-13 - LED ID (oem_data) */ #define IPMI_SDR_RECORD_OEM_IBM_LED_OEM_DATA_MIN_LENGTH 5 #define IPMI_SDR_RECORD_OEM_IBM_SENSOR_TYPE_OEM_DATA_INDEX 0 #define IPMI_SDR_RECORD_OEM_IBM_LED_ID_LS_OEM_DATA_INDEX 3 #define IPMI_SDR_RECORD_OEM_IBM_LED_ID_MS_OEM_DATA_INDEX 4 #define IPMI_SDR_RECORD_OEM_IBM_LED_SENSOR_TYPE 0xED #define IPMI_OEM_IBM_LED_NAME_COLUMN_SIZE 17 #define IPMI_OEM_IBM_LED_NAME_BUFLEN 17 #define IPMI_OEM_IBM_LED_STATE_COLUMN_SIZE 8 #define IPMI_OEM_IBM_LED_ID_STRING_BUFLEN 64 #define IPMI_OEM_IBM_LED_INFO_BUFLEN 1024 struct ipmi_oem_ibm_find_sensor_sdr_callback { ipmi_oem_state_data_t *state_data; uint8_t sensor_number; char *id_string; unsigned int id_string_len; int found; }; struct ipmi_oem_ibm_get_led_sdr_callback { ipmi_oem_state_data_t *state_data; struct sensor_column_width *column_width; struct ipmi_oem_data *oem_data; int header_output_flag; }; static int _get_led_name (ipmi_oem_state_data_t *state_data, struct ipmi_oem_data *oem_data, uint16_t led_id, char *led_name, unsigned int led_name_len) { char *led_id_str = NULL; assert (state_data); assert (oem_data); assert (led_name); assert (led_name_len); if (oem_data->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_IBM && oem_data->product_id == IPMI_IBM_PRODUCT_ID_X3455) { if (led_id == IPMI_OEM_IBM_LED_X3455_LOCATION) led_id_str = "Location"; } else if (oem_data->manufacturer_id == IPMI_IANA_ENTERPRISE_ID_IBM && oem_data->product_id == IPMI_IBM_PRODUCT_ID_X3755) { switch (led_id) { case IPMI_OEM_IBM_LED_X3755_CPU: led_id_str = "CPU"; break; case IPMI_OEM_IBM_LED_X3755_CPU1: led_id_str = "CPU1"; break; case IPMI_OEM_IBM_LED_X3755_CPU2: led_id_str = "CPU2"; break; case IPMI_OEM_IBM_LED_X3755_CPU3: led_id_str = "CPU3"; break; case IPMI_OEM_IBM_LED_X3755_CPU4: led_id_str = "CPU4"; break; case IPMI_OEM_IBM_LED_X3755_CPU1_BOARD: led_id_str = "CPU1_BOARD"; break; case IPMI_OEM_IBM_LED_X3755_CPU2_BOARD: led_id_str = "CPU2_BOARD"; break; case IPMI_OEM_IBM_LED_X3755_CPU3_BOARD: led_id_str = "CPU3_BOARD"; break; case IPMI_OEM_IBM_LED_X3755_CPU4_BOARD: led_id_str = "CPU4_BOARD"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_1: led_id_str = "DIMM 1"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_2: led_id_str = "DIMM 2"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_3: led_id_str = "DIMM 3"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_4: led_id_str = "DIMM 4"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_5: led_id_str = "DIMM 5"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_6: led_id_str = "DIMM 6"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_7: led_id_str = "DIMM 7"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_8: led_id_str = "DIMM 8"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_9: led_id_str = "DIMM 9"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_10: led_id_str = "DIMM 10"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_11: led_id_str = "DIMM 11"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_12: led_id_str = "DIMM 12"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_13: led_id_str = "DIMM 13"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_14: led_id_str = "DIMM 14"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_15: led_id_str = "DIMM 15"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_16: led_id_str = "DIMM 16"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_17: led_id_str = "DIMM 17"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_18: led_id_str = "DIMM 18"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_19: led_id_str = "DIMM 19"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_20: led_id_str = "DIMM 20"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_21: led_id_str = "DIMM 21"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_22: led_id_str = "DIMM 22"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_23: led_id_str = "DIMM 23"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_24: led_id_str = "DIMM 24"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_25: led_id_str = "DIMM 25"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_26: led_id_str = "DIMM 26"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_27: led_id_str = "DIMM 27"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_28: led_id_str = "DIMM 28"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_29: led_id_str = "DIMM 29"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_30: led_id_str = "DIMM 30"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_31: led_id_str = "DIMM 31"; break; case IPMI_OEM_IBM_LED_X3755_DIMM_32: led_id_str = "DIMM 32"; break; case IPMI_OEM_IBM_LED_X3755_FAN: led_id_str = "FAN"; break; case IPMI_OEM_IBM_LED_X3755_FAN_1: led_id_str = "Fan 1"; break; case IPMI_OEM_IBM_LED_X3755_FAN_2: led_id_str = "Fan 2"; break; case IPMI_OEM_IBM_LED_X3755_FAN_3: led_id_str = "Fan 3"; break; case IPMI_OEM_IBM_LED_X3755_FAN_4: led_id_str = "Fan 4"; break; case IPMI_OEM_IBM_LED_X3755_FAN_5: led_id_str = "Fan 5"; break; case IPMI_OEM_IBM_LED_X3755_FAN_6: led_id_str = "Fan 6"; break; case IPMI_OEM_IBM_LED_X3755_FAN_7: led_id_str = "Fan 7"; break; case IPMI_OEM_IBM_LED_X3755_FAN_8: led_id_str = "Fan 8"; break; case IPMI_OEM_IBM_LED_X3755_PCI: led_id_str = "PCI"; break; case IPMI_OEM_IBM_LED_X3755_PCI_1: led_id_str = "PCI 1"; break; case IPMI_OEM_IBM_LED_X3755_PCI_2: led_id_str = "PCI 2"; break; case IPMI_OEM_IBM_LED_X3755_PCI_3: led_id_str = "PCI 3"; break; case IPMI_OEM_IBM_LED_X3755_PCI_4: led_id_str = "PCI 4"; break; case IPMI_OEM_IBM_LED_X3755_PCI_5: led_id_str = "PCI 5"; break; case IPMI_OEM_IBM_LED_X3755_PCI_6: led_id_str = "PCI 6"; break; case IPMI_OEM_IBM_LED_X3755_SERVERAID_8K_BATT: led_id_str = "ServeRAID 8k Batt"; break; case IPMI_OEM_IBM_LED_X3755_SERVERAID_8K_ERR: led_id_str = "ServeRAID 8k Err"; break; case IPMI_OEM_IBM_LED_X3755_ALERT: led_id_str = "Alert"; break; case IPMI_OEM_IBM_LED_X3755_BK_BLUE: led_id_str = "BK_Blue"; break; case IPMI_OEM_IBM_LED_X3755_BOARD: led_id_str = "BOARD"; break; case IPMI_OEM_IBM_LED_X3755_CNFG: led_id_str = "CNFG"; break; case IPMI_OEM_IBM_LED_X3755_DASD: led_id_str = "DASD"; break; case IPMI_OEM_IBM_LED_X3755_FAULT: led_id_str = "FAULT"; break; case IPMI_OEM_IBM_LED_X3755_HTX: led_id_str = "HTX"; break; case IPMI_OEM_IBM_LED_X3755_INFO: led_id_str = "INFO"; break; case IPMI_OEM_IBM_LED_X3755_LOCATION: led_id_str = "Location"; break; case IPMI_OEM_IBM_LED_X3755_MEM: led_id_str = "MEM"; break; case IPMI_OEM_IBM_LED_X3755_NMI: led_id_str = "NMI"; break; case IPMI_OEM_IBM_LED_X3755_OVERSPEC: led_id_str = "OVERSPEC"; break; case IPMI_OEM_IBM_LED_X3755_RAID: led_id_str = "RAID"; break; case IPMI_OEM_IBM_LED_X3755_SEER: led_id_str = "SEER"; break; case IPMI_OEM_IBM_LED_X3755_SP: led_id_str = "SP"; break; case IPMI_OEM_IBM_LED_X3755_TEMP: led_id_str = "TEMP"; break; case IPMI_OEM_IBM_LED_X3755_VRM: led_id_str = "VRM"; break; case IPMI_OEM_IBM_LED_X3755_UNKNOWN1: case IPMI_OEM_IBM_LED_X3755_UNKNOWN2: case IPMI_OEM_IBM_LED_X3755_UNKNOWN3: led_id_str = "UNKNOWN"; break; } } if (led_id_str) snprintf (led_name, led_name_len, "%s", led_id_str); else snprintf (led_name, led_name_len, "LED = %04Xh", led_id); return (0); } static int _find_sensor_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_oem_ibm_find_sensor_sdr_callback *sdr_callback_arg; ipmi_oem_state_data_t *state_data; uint8_t sdr_sensor_number; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_oem_ibm_find_sensor_sdr_callback *)arg; state_data = sdr_callback_arg->state_data; /* achu: xCAT only checks for Full records, I'll check compact too though */ if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) return (0); if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, sdr_record, sdr_record_len, &sdr_sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (sdr_callback_arg->sensor_number == sdr_sensor_number) { if (ipmi_sdr_parse_id_string (state_data->sdr_ctx, sdr_record, sdr_record_len, sdr_callback_arg->id_string, sdr_callback_arg->id_string_len) < 0) return (-1); sdr_callback_arg->found = 1; return (1); } return (0); } static int _find_sensor (ipmi_oem_state_data_t *state_data, uint8_t sensor_number, char *id_string, unsigned int id_string_len) { struct ipmi_oem_ibm_find_sensor_sdr_callback sdr_callback_arg; struct common_cmd_args common_args; ipmi_sdr_ctx_t tmp_sdr_ctx = NULL; int rv = -1; assert (state_data); assert (id_string); assert (id_string_len); /* Make temporary sdr cache to search for sensor * * Redo loading of SDR cache since this is being called from a loop * using the state_data sdr_ctx. */ if (!(tmp_sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (state_data->pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } sdr_callback_arg.state_data = state_data; sdr_callback_arg.sensor_number = sensor_number; sdr_callback_arg.id_string = id_string; sdr_callback_arg.id_string_len = id_string_len; sdr_callback_arg.found = 0; /* Should not cause sdr recreation, since this is the second time we're calling it */ memcpy (&common_args, &state_data->prog_data->args->common_args, sizeof (struct common_cmd_args)); common_args.quiet_cache = 1; common_args.sdr_cache_recreate = 0; if (sdr_cache_create_and_load (tmp_sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &common_args) < 0) goto cleanup; if (ipmi_sdr_cache_iterate (tmp_sdr_ctx, _find_sensor_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (!sdr_callback_arg.found) snprintf (id_string, id_string_len, "Sensor Number = %02Xh", sensor_number); rv = 0; cleanup: ipmi_sdr_ctx_destroy (tmp_sdr_ctx); return (rv); } static int _get_led_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_oem_ibm_get_led_sdr_callback *sdr_callback_arg; ipmi_oem_state_data_t *state_data; uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t oem_data_buf[IPMI_SDR_MAX_RECORD_LENGTH]; int oem_data_buf_len; uint16_t record_id; char fmt[IPMI_OEM_FMT_BUFLEN + 1]; char led_name[IPMI_OEM_IBM_LED_NAME_BUFLEN + 1]; char led_pointer_name[IPMI_OEM_IBM_LED_NAME_BUFLEN + 1]; char id_string[IPMI_OEM_IBM_LED_ID_STRING_BUFLEN + 1]; char led_info[IPMI_OEM_IBM_LED_INFO_BUFLEN + 1]; char *led_state_str = NULL; uint8_t sensor_type; uint8_t led_id_ls; uint8_t led_id_ms; uint16_t led_id; uint8_t led_state; uint8_t led_active_type; uint16_t led_pointer_id; uint8_t sensor_number; int available_led; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_oem_ibm_get_led_sdr_callback *)arg; state_data = sdr_callback_arg->state_data; /* IBM OEM * * From xCAT (http://xcat.sourceforge.net/) * * Get Led Request * * 0x3A - OEM network function (is IPMI_NET_FN_OEM_IBM_LED_RQ) * 0xC0 - OEM cmd * 0x?? - LED ID (MS Byte) * 0x?? - LED ID (LS Byte) * * Get Led Response * * 0xC0 - OEM cmd * 0x?? - Completion Code * 0x?? - ?? * 0x?? - LED Active vs. Inactive * - non-zero = active * - 0 = inactive * 0x?? - ?? * 0x?? - LED Pointer ID (MS Byte) * 0x?? - LED Pointer ID (LS Byte) / Sensor Number * - Pointer ID means indicating problem elsewhere * 0x?? - LED Active Type * - 1 - Indicates LED Active to indicate LED Pointer ID Active * - 2 - Indicates LED Active due to Sensor w/ Sensor Number * - 3 - User manually activated LED * - 4 - BIOS or Administrator lit LED */ if (record_type != IPMI_SDR_FORMAT_OEM_RECORD) return (0); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, sdr_record, sdr_record_len, &record_id, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if ((oem_data_buf_len = ipmi_sdr_parse_oem_data (state_data->sdr_ctx, sdr_record, sdr_record_len, oem_data_buf, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_oem_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } /* If not enough data, skip it */ if (oem_data_buf_len < IPMI_SDR_RECORD_OEM_IBM_LED_OEM_DATA_MIN_LENGTH) return (0); sensor_type = oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_SENSOR_TYPE_OEM_DATA_INDEX]; /* If not LED sensor type, skip it */ if (sensor_type != IPMI_SDR_RECORD_OEM_IBM_LED_SENSOR_TYPE) return (0); /* IBM systems use inconsistent endian, guess endian by assuming * LED IDs are numerically started at 0 */ if (oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_LS_OEM_DATA_INDEX] > oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_MS_OEM_DATA_INDEX]) { led_id_ls = oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_LS_OEM_DATA_INDEX]; led_id_ms = oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_MS_OEM_DATA_INDEX]; } else { led_id_ls = oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_MS_OEM_DATA_INDEX]; led_id_ms = oem_data_buf[IPMI_SDR_RECORD_OEM_IBM_LED_ID_LS_OEM_DATA_INDEX]; } led_id = led_id_ls | (led_id_ms << 8); bytes_rq[0] = IPMI_CMD_OEM_IBM_GET_LED; bytes_rq[1] = led_id_ms; bytes_rq[2] = led_id_ls; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_IBM_LED_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (-1); } /* If get parameter out of range, assume LED ID endian wrong and try again */ if (rs_len >= 2 && bytes_rs[1] == IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) { bytes_rq[0] = IPMI_CMD_OEM_IBM_GET_LED; bytes_rq[1] = led_id_ls; bytes_rq[2] = led_id_ms; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_IBM_LED_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (-1); } } /* achu: there are probably 1 or 2 completion codes that are * acceptable to ignore and continue on, but who knows what they * are. */ /* Assume this error code means LED not available */ if (rs_len >= 2 && bytes_rs[1] == IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) available_led = 0; else { if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 8, IPMI_CMD_OEM_IBM_GET_LED, IPMI_NET_FN_OEM_IBM_LED_RS, NULL) < 0) return (-1); available_led = 1; } if (!sdr_callback_arg->header_output_flag) { memset (fmt, '\0', IPMI_OEM_FMT_BUFLEN + 1); snprintf (fmt, IPMI_OEM_FMT_BUFLEN, "%%-%ds | LED | State | LED Information\n", sdr_callback_arg->column_width->record_id); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR); sdr_callback_arg->header_output_flag++; } memset (led_name, '\0', IPMI_OEM_IBM_LED_NAME_BUFLEN + 1); memset (led_pointer_name, '\0', IPMI_OEM_IBM_LED_NAME_BUFLEN + 1); memset (id_string, '\0', IPMI_OEM_IBM_LED_ID_STRING_BUFLEN + 1); memset (led_info, '\0', IPMI_OEM_IBM_LED_INFO_BUFLEN + 1); if (_get_led_name (state_data, sdr_callback_arg->oem_data, led_id, led_name, IPMI_OEM_IBM_LED_NAME_BUFLEN) < 0) return (-1); if (available_led) { led_state = bytes_rs[3]; led_active_type = bytes_rs[7]; led_pointer_id = (bytes_rs[5] << 8) | bytes_rs[6]; sensor_number = bytes_rs[6]; if (led_state == IPMI_OEM_IBM_LED_STATE_INACTIVE) led_state_str = "Inactive"; else led_state_str = "Active"; if (led_state != IPMI_OEM_IBM_LED_STATE_INACTIVE) { /* Location LED special case */ if (!led_id) { snprintf (led_info, IPMI_OEM_IBM_LED_INFO_BUFLEN, "System Error Condition"); } else if (led_active_type == IPMI_OEM_IBM_LED_ACTIVE_BY_LED) { if (_get_led_name (state_data, sdr_callback_arg->oem_data, led_pointer_id, led_pointer_name, IPMI_OEM_IBM_LED_NAME_BUFLEN) < 0) return (-1); snprintf (led_info, IPMI_OEM_IBM_LED_INFO_BUFLEN, "'%s' Active", led_pointer_name); } else if (led_active_type == IPMI_OEM_IBM_LED_ACTIVE_BY_SENSOR) { /* achu: sensor numbers may not be unique. I'm copying * this algorithm from xCAT so I assume it's safe for * IBM machines b/c IBM lays out their SDRs in a fashion * that this search is safe and won't result in an * incorrect output. */ if (_find_sensor (state_data, sensor_number, id_string, IPMI_OEM_IBM_LED_ID_STRING_BUFLEN) < 0) return (-1); snprintf (led_info, IPMI_OEM_IBM_LED_INFO_BUFLEN, "Sensor '%s' error", id_string); } else if (led_active_type == IPMI_OEM_IBM_LED_ACTIVE_BY_USER) { snprintf (led_info, IPMI_OEM_IBM_LED_INFO_BUFLEN, "LED Activated by User"); } else if (led_active_type == IPMI_OEM_IBM_LED_ACTIVE_BY_BIOS_OR_ADMINISTRATOR) { snprintf (led_info, IPMI_OEM_IBM_LED_INFO_BUFLEN, "LED Activated by BIOS or Administrator"); } } } else led_state_str = "N/A"; snprintf (fmt, IPMI_OEM_FMT_BUFLEN, "%%-%du | %%-%ds | %%-%ds | %s\n", sdr_callback_arg->column_width->record_id, IPMI_OEM_IBM_LED_NAME_COLUMN_SIZE, IPMI_OEM_IBM_LED_STATE_COLUMN_SIZE, led_info); pstdout_printf (state_data->pstate, fmt, record_id, led_name, led_state_str, led_info); return (0); } int ipmi_oem_ibm_get_led (ipmi_oem_state_data_t *state_data) { struct ipmi_oem_ibm_get_led_sdr_callback sdr_callback_arg; struct sensor_column_width column_width; struct ipmi_oem_data oem_data; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (calculate_column_widths (state_data->pstate, state_data->sdr_ctx, NULL, 0, NULL, 0, 0, /* non_abbreviated_units */ 0, /* shared_sensors */ 0, /* count_event_only_records */ 0, /* count_device_locator_records */ 1, /* count_oem_records */ 0, /* entity_sensor_names */ &column_width) < 0) goto cleanup; if (ipmi_get_oem_data (state_data->pstate, state_data->ipmi_ctx, &oem_data) < 0) goto cleanup; sdr_callback_arg.state_data = state_data; sdr_callback_arg.column_width = &column_width; sdr_callback_arg.oem_data = &oem_data; sdr_callback_arg.header_output_flag = 0; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _get_led_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-ibm.h0000644002055400205540000000154313527331635017433 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_IBM_H #define IPMI_OEM_IBM_H #include "ipmi-oem.h" int ipmi_oem_ibm_get_led (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_IBM_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-intel.c0000644002055400205540000015736113527331635020004 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include /* UCHAR_MAX */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-intel.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #include "secure.h" /* Intel S5500WB/Penguin Computing Relion 700 * * Set Fault Indication * * "Satellite controllers on the IPMB or software can indicate to the * BMC that they have detectd a fault assertion or de-assertion using * this command. The BMC generates a composite fault state from this * information and its own internal fault state, and uses this to * drive front panel indicators. The fault indication state * contributes to the system status state, as reported by the fron * tpanel system status. ... This command also supports additional * parameters to control BMC-owned component fault LEDs associated * with teh specified fault condition." * * Set Fault Indication Request * * 0x30 - OEM network function * 0x57 - OEM cmd * 0x?? - source id * - 0x00 - unspecified source * - 0x01 - hot-swap controller 0 * - 0x02 - hot-swap controller 1 * - 0x03 - bios * 0x?? - fault type * - 0x00 - fan * - 0x01 - temp * - 0x02 - power * - 0x03 - drive slot * - 0x04 - software * - 0x05 - memory * 0x?? - state to set * - 0x00 - ok * - 0x01 - degraded * - 0x02 - non-critical * - 0x03 - critical * - 0x04 - non-recoverable * 0x?? - component fault LED group ID * - 0xFF - if not used * 0x?? - LED state * - LSbyte first, 1 bit will turn on LED. * * Set Fault Indication Response * * 0x57 - OEM cmd * 0x?? - Completion Code */ /* Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) * * Set Fan Control Configuration Command * * Should really only be used by the BIOS, documented here. * * Set Fan Control Configuration Request * * 0x?? - OEM network function not indicated * 0x89 - OEM cmd * 0x?? - fan profile to enable * - 0 - Fan profile 0 (default) * - 1 - Fan profile 1 * - 2 - Fan profile 2 * - 3 - Fan profile 3 * - 4 - Fan profile 4 * - 5 - Fan profile 5 (not valid for QSSC-S4R) * - 6 - Fan profile 6 (not valid for QSSC-S4R) * - 7 - Fan profile 7 (not valid for QSSC-S4R) * - 0xff - none specified (do not change current setting) * 0x?? - flags * - [7:3] reserved * - [2] - Memory temp sensor and memory throttling configuration status * - 0 - not started or in progress * - 1 - completed * = [1:0] Memory Throttling Mode * - 0 - Non supported * - 1 - Open-loop thermal throttlig (OTT) (not supported for QSSC-S4R) * - 2 - Close-loop thermal throttling (CLTT) * - 3 - None specified (do not change current setting) * 0x?? - Memory Device Group ID * - 0 - cpu #1 group * - 1 - cpu #2 group * - 2 - cpu #3 group * - 3 - cpu #4 group * - 0xff - none specified * * bytes 4-11 - memory device presence bit map * - 64-bit map forindicating the presence of a memory temp * sensor for devices in the specified group ID. Byte order is * LSByte first. Setting a bit to 1 indicates that the * associated device is present and its temperature shoulde be * monitored. Device enumeration corresponds to bit-position * in the bit-mask. Valid only if Memory Device Group ID field * is not set to FFh. * - For QSSC S4R - 31:0 presence of DIMM temp device * - 39:32 presence of memory buffer (Mill Brook) temp device * - 63:40 - reserved * * Set Fan Control Configuration Response * * 0x89 - OEM cmd * 0x?? - Completion Code */ static int _get_smtp_configuration_data (ipmi_oem_state_data_t *state_data, uint8_t channel_number, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, uint8_t *buf, unsigned int *buflen) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_VALID (parameter_selector)); assert (buf); assert (buflen); assert ((*buflen)); /* Intel S5500WB/Penguin Computing Relion 700 * * Get SMTP Configuration Request * * 0x32 - OEM network function * 0x38 - OEM cmd * 0x?? - channel number * 0x?? - parameter selector * 0x?? - set selector * 0x?? - block selector * * Get SMTP Configuration Response * * 0x38 - OEM cmd * 0x?? - Completion Code * 0x?? - 0x?? - configuration data */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION; bytes_rq[1] = channel_number; bytes_rq[2] = parameter_selector; bytes_rq[3] = set_selector; bytes_rq[4] = block_selector; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_CONFIG_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION, IPMI_NET_FN_OEM_INTEL_CONFIG_RS, NULL) < 0) goto cleanup; if (rs_len > 2) memcpy (buf, &bytes_rs[2], rs_len - 2); (*buflen) = rs_len - 2; rv = 0; cleanup: return (rv); } static int _get_smtp_configuration_value (ipmi_oem_state_data_t *state_data, uint8_t channel_number, uint8_t parameter_selector, uint32_t *value) { uint8_t buf[IPMI_OEM_MAX_BYTES]; unsigned int buflen = IPMI_OEM_MAX_BYTES; int rv = -1; assert (state_data); assert (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS); assert (value); if (_get_smtp_configuration_data (state_data, channel_number, parameter_selector, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_SET_SELECTOR, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_BLOCK_SELECTOR, buf, &buflen) < 0) goto cleanup; if (!buflen) { pstdout_fprintf (state_data->pstate, stderr, "zero configuration data bytes returned\n"); goto cleanup; } if ((parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS) && buflen != 1) { pstdout_fprintf (state_data->pstate, stderr, "%u configuration data bytes returned, expected 1\n", buflen); goto cleanup; } else if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS && buflen != 4) { pstdout_fprintf (state_data->pstate, stderr, "%u configuration data bytes returned, expected 4\n", buflen); goto cleanup; } if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS) (*value) = buf[0]; else /* parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS */ { /* MS byte first */ (*value) = 0; (*value) |= (buf[0] << 24); (*value) |= (buf[1] << 16); (*value) |= (buf[2] << 8); (*value) |= buf[3]; } rv = 0; cleanup: return (rv); } static int _get_smtp_configuration_string (ipmi_oem_state_data_t *state_data, uint8_t channel_number, uint8_t parameter_selector, char *string, unsigned int stringlen) { unsigned int max_blocks = 0; int rv = -1; unsigned int i; unsigned int string_count = 0; assert (state_data); assert (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME); assert (string); assert (stringlen); if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME) max_blocks = 1; else if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME) max_blocks = 2; else /* parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS */ max_blocks = 4; assert (stringlen >= (max_blocks * IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH)); for (i = 0; i < max_blocks; i++) { uint8_t buf[IPMI_OEM_MAX_BYTES]; unsigned int buflen = IPMI_OEM_MAX_BYTES; unsigned int j; int nul_found = 0; memset (buf, '\0', IPMI_OEM_MAX_BYTES); if (_get_smtp_configuration_data (state_data, channel_number, parameter_selector, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_SET_SELECTOR, i, buf, &buflen) < 0) goto cleanup; if (!buflen) { pstdout_fprintf (state_data->pstate, stderr, "zero configuration data bytes returned\n"); goto cleanup; } if ((buflen + string_count) > stringlen) { pstdout_fprintf (state_data->pstate, stderr, "buffer overflow\n"); goto cleanup; } memcpy (string + string_count, buf, buflen); string_count += buflen; /* strings are NUL terminated, so if there is a NUL found, we can break out */ for (j = 0; j < buflen; j++) { if (buf[j] == '\0') { nul_found++; break; } } if (nul_found) break; } rv = 0; cleanup: return (rv); } int ipmi_oem_intel_get_smtp_config (ipmi_oem_state_data_t *state_data) { uint8_t channel_numbers[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int channel_numbers_count = 0; int rv = -1; unsigned int i; assert (state_data); /* achu: with nothing else to go on, I'm assuming the channel number is the lan channel number */ if (state_data->prog_data->args->oem_options_count > 1) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid number of options specified\n"); goto cleanup; } if (state_data->prog_data->args->oem_options_count) { char *endptr = NULL; unsigned int temp; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > UCHAR_MAX || !temp) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } channel_numbers[0] = temp; channel_numbers_count = 1; } else { int ret; if ((ret = ipmi_get_channel_numbers (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, channel_numbers, IPMI_CHANNEL_NUMBERS_MAX)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!ret) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: no LAN channels discovered\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } channel_numbers_count = ret; } for (i = 0; i < channel_numbers_count; i++) { uint8_t smtpenable; uint32_t smtpserveraddress; char smtp_user_name[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char email_address[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char subject[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char message_content[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char sender_email_address[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char smtp_host_name[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; uint32_t value; if (channel_numbers_count > 1) pstdout_printf (state_data->pstate, "LAN Channel %u\n", channel_numbers[i]); if (_get_smtp_configuration_value (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP, &value) < 0) goto cleanup; smtpenable = (value & IPMI_OEM_INTEL_SMTP_ENABLE_BITMASK); smtpenable >>= IPMI_OEM_INTEL_SMTP_ENABLE_SHIFT; if (_get_smtp_configuration_value (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS, &value) < 0) goto cleanup; smtpserveraddress = value; memset (smtp_user_name, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME, smtp_user_name, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; memset (email_address, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS, email_address, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; memset (subject, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT, subject, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; memset (message_content, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT, message_content, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; memset (sender_email_address, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS, sender_email_address, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; memset (smtp_host_name, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); if (_get_smtp_configuration_string (state_data, channel_numbers[i], IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME, smtp_host_name, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; pstdout_printf (state_data->pstate, "SMTP : %s\n", (smtpenable == IPMI_OEM_INTEL_SMTP_ENABLE) ? "enabled" : "disabled"); pstdout_printf (state_data->pstate, "SMTP Server Address : %u.%u.%u.%u\n", (smtpserveraddress & 0x000000FF), (smtpserveraddress & 0x0000FF00) >> 8, (smtpserveraddress & 0x00FF0000) >> 16, (smtpserveraddress & 0xFF000000) >> 24); pstdout_printf (state_data->pstate, "SMTP User Name : %s\n", smtp_user_name); pstdout_printf (state_data->pstate, "Email Address : %s\n", email_address); pstdout_printf (state_data->pstate, "Subject : %s\n", subject); pstdout_printf (state_data->pstate, "Message Content : %s\n", message_content); pstdout_printf (state_data->pstate, "Sender Email Address : %s\n", sender_email_address); pstdout_printf (state_data->pstate, "SMTP Host Name : %s\n", smtp_host_name); if (channel_numbers_count > 1 && i != (channel_numbers_count - 1)) pstdout_printf (state_data->pstate, "\n"); } rv = 0; cleanup: return (rv); } static int _set_smtp_configuration_data (ipmi_oem_state_data_t *state_data, uint8_t channel_number, uint8_t parameter_selector, uint8_t set_selector, uint8_t block_selector, uint8_t *buf, unsigned int buflen) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_VALID (parameter_selector)); assert (buf); assert (buflen); assert (buflen <= (IPMI_OEM_MAX_BYTES - 5)); /* Intel S5500WB/Penguin Computing Relion 700 * * Set SMTP Configuration Request * * 0x32 - OEM network function * 0x38 - OEM cmd * 0x?? - channel number * 0x?? - parameter selector * 0x?? - set selector * 0x?? - block selector * 0x?? - 0x?? - configuration data * * Set SMTP Configuration Response * * 0x38 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_SET_SMTP_CONFIGURATION; bytes_rq[1] = channel_number; bytes_rq[2] = parameter_selector; bytes_rq[3] = set_selector; bytes_rq[4] = block_selector; memcpy (&bytes_rq[5], buf, buflen); if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_CONFIG_RQ, /* network function */ bytes_rq, /* data */ 5 + buflen, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INTEL_GET_SMTP_CONFIGURATION, IPMI_NET_FN_OEM_INTEL_CONFIG_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _set_smtp_configuration_value (ipmi_oem_state_data_t *state_data, uint8_t *channel_numbers, unsigned int channel_numbers_count, uint8_t parameter_selector, uint32_t value) { uint8_t buf[IPMI_OEM_MAX_BYTES]; unsigned int buflen = IPMI_OEM_MAX_BYTES; int rv = -1; unsigned int i; assert (state_data); assert (channel_numbers); assert (channel_numbers_count); assert (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS); if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_NUMBER_OF_DESTINATIONS) { buf[0] = value; buflen = 1; } else if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS) { /* MS byte first */ buf[0] = (value & 0xFF000000) >> 24; buf[1] = (value & 0x00FF0000) >> 16; buf[2] = (value & 0x0000FF00) >> 8; buf[3] = (value & 0x000000FF); buflen = 4; } for (i = 0; i < channel_numbers_count; i++) { if (_set_smtp_configuration_data (state_data, channel_numbers[i], parameter_selector, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_SET_SELECTOR, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_BLOCK_SELECTOR, buf, buflen) < 0) goto cleanup; } rv = 0; cleanup: return (rv); } static int _set_smtp_configuration_string (ipmi_oem_state_data_t *state_data, uint8_t *channel_numbers, unsigned int channel_numbers_count, uint8_t parameter_selector, char *key, char *string) { uint8_t buf[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX]; unsigned int max_blocks = 0; int rv = -1; unsigned int i; assert (state_data); assert (channel_numbers); assert (channel_numbers_count); assert (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS || parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME); assert (key); assert (string); switch (parameter_selector) { case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS_MAX_BLOCKS; break; case IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME: max_blocks = IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME_MAX_BLOCKS; break; } if (strlen (string) > (max_blocks * IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH)) { pstdout_fprintf (state_data->pstate, stderr, "value for key %s too long\n", key); goto cleanup; } /* One extra check w/ passwords */ if (parameter_selector == IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD && strlen (string) > IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD_LENGTH_MAX) { pstdout_fprintf (state_data->pstate, stderr, "value for key %s too long\n", key); goto cleanup; } /* according to docs, must pad 00h to max blocks */ memset (buf, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX); memcpy (buf, string, strlen (string)); for (i = 0; i < channel_numbers_count; i++) { unsigned int j; for (j = 0; j < max_blocks; j++) { if (_set_smtp_configuration_data (state_data, channel_numbers[i], parameter_selector, IPMI_OEM_INTEL_SMTP_CONFIGURATION_NO_SET_SELECTOR, j, buf + j * IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH, IPMI_OEM_INTEL_SMTP_STRING_BLOCK_LENGTH) < 0) goto cleanup; } } rv = 0; cleanup: return (rv); } int ipmi_oem_intel_set_smtp_config (ipmi_oem_state_data_t *state_data) { uint8_t channel_numbers[IPMI_CHANNEL_NUMBERS_MAX]; unsigned int channel_numbers_count = 0; uint8_t smtpenable = 0; uint32_t smtpserveraddress = 0; char smtp_user_name[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char user_password[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char email_address[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char subject[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char message_content[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char sender_email_address[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; char smtp_host_name[IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1]; int rv = -1; unsigned int i; int load_channel_numbers = 1; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: smtp=enable|disable\n" "Option: smtpserveraddress=ipaddress\n" "Option: smtpusername=string\n" "Option: userpassword=string\n" "Option: emailaddress=string\n" "Option: subject=string\n" "Option: messagecontent=string\n" "Option: senderemailaddress=string\n" "Option: smtphostname=string\n"); return (0); } /* Check if user selected a channel number */ if (state_data->prog_data->args->oem_options_count) { char *endptr = NULL; unsigned int temp; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (!(errno || endptr[0] != '\0' || temp > UCHAR_MAX || !temp)) { channel_numbers[0] = temp; channel_numbers_count = 1; load_channel_numbers = 0; } } if (load_channel_numbers) { int ret; if ((ret = ipmi_get_channel_numbers (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, channel_numbers, IPMI_CHANNEL_NUMBERS_MAX)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!ret) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_numbers: no LAN channels discovered\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } channel_numbers_count = ret; } for (i = (load_channel_numbers ? 0 : 1); i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "smtp")) { if (ipmi_oem_parse_enable (state_data, i, value, &smtpenable) < 0) goto cleanup; if (_set_smtp_configuration_value (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_ENABLE_SMTP, smtpenable) < 0) goto cleanup; } else if (!strcasecmp (key, "smtpserveraddress")) { if (ipmi_oem_parse_ip_address (state_data, i, value, &smtpserveraddress) < 0) goto cleanup; if (_set_smtp_configuration_value (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_SERVER_ADDRESS, smtpserveraddress) < 0) goto cleanup; } else if (!strcasecmp (key, "smtpusername")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, smtp_user_name, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_USER_NAME, key, smtp_user_name) < 0) goto cleanup; } else if (!strcasecmp (key, "userpassword")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, user_password, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; /* clear out buffers for security */ secure_memset (value, '\0', strlen (value)); secure_memset (state_data->prog_data->args->oem_options[i], '\0', strlen (state_data->prog_data->args->oem_options[i])); if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_USER_PASSWORD, key, user_password) < 0) goto cleanup; /* clear out buffers for security */ secure_memset (user_password, '\0', IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX + 1); } else if (!strcasecmp (key, "emailaddress")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, email_address, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_EMAIL_ADDRESS, key, email_address) < 0) goto cleanup; } else if (!strcasecmp (key, "subject")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, subject, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SUBJECT, key, subject) < 0) goto cleanup; } else if (!strcasecmp (key, "messagecontent")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, message_content, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_MESSAGE_CONTENT, key, message_content) < 0) goto cleanup; } else if (!strcasecmp (key, "senderemailaddress")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, sender_email_address, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SENDER_EMAIL_ADDRESS, key, sender_email_address) < 0) goto cleanup; } else if (!strcasecmp (key, "smtphostname")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, smtp_host_name, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_STRING_LENGTH_MAX) < 0) goto cleanup; if (_set_smtp_configuration_string (state_data, channel_numbers, channel_numbers_count, IPMI_OEM_INTEL_SMTP_CONFIGURATION_PARAMETER_SMTP_HOST_NAME, key, smtp_host_name) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_intel_get_power_restore_delay (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint16_t delay = 0; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Intel S2600JF/Appro 512X * * Request * * 0x30 - OEM network function * 0x55 - OEM cmd * * Response * * 0x55 - OEM cmd * 0x?? - Completion Code * 0x?? - delay setting (MSB) * - [7:3] - reserved * - [2:0] - most significant 3 bits * 0x?? - delay setting (LSB) * * delay setting is 11 bits total. */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_GET_POWER_RESTORE_DELAY; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_INTEL_GET_POWER_RESTORE_DELAY, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; delay = ((bytes_rs[2] & IPMI_OEM_INTEL_POWER_RESTORE_DELAY_MSB_MASK) << 8) | bytes_rs[3]; pstdout_printf (state_data->pstate, "%u\n", delay); rv = 0; cleanup: return (rv); } int ipmi_oem_intel_set_power_restore_delay (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; unsigned int tmp; char *endptr; uint16_t delay = 0; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; tmp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || tmp > IPMI_OEM_INTEL_POWER_RESTORE_DELAY_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } delay = tmp; /* Intel S2600JF/Appro 512X * * Request * * 0x30 - OEM network function * 0x54 - OEM cmd * 0x?? - delay setting (MSB) * - [7:3] - reserved * - [2:0] - most significant 3 bits * 0x?? - delay setting (LSB) * * Response * * 0x55 - OEM cmd * 0x?? - Completion Code * * delay setting is 11 bits total. */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_SET_POWER_RESTORE_DELAY; bytes_rq[1] = (delay >> 8) & IPMI_OEM_INTEL_POWER_RESTORE_DELAY_MSB_MASK; bytes_rq[2] = (delay & IPMI_OEM_INTEL_POWER_RESTORE_DELAY_LSB_MASK); if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INTEL_SET_POWER_RESTORE_DELAY, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_intel_get_bmc_services (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Intel S2600WT2 * * Request * * 0x30 - OEM network function * 0xB2 - OEM cmd * * Response * * 0xB2 - OEM cmd * 0x?? - Completion Code * 0x?? - Standard Services bit pattern * - bit 7 - SSH * bit 6 - reserved * bit 5 - HTTP/HTTPs * bit 4 - reserved * bit 3 - RMCP/RMCP+ * bit 2:0 - reserved * 0x?? - OEM specific Services bit pattern * - bit 7 - KVM * bit 6:0 - reserved */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_GET_BMC_SERVICE_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_INTEL_GET_BMC_SERVICE_STATUS, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "SSH: %s\n", (bytes_rs[2] & IPMI_OEM_INTEL_STANDARD_SERVICES_SSH) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "HTTP/HTTPS: %s\n", (bytes_rs[2] & IPMI_OEM_INTEL_STANDARD_SERVICES_HTTP) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "RMCP/RMCP+: %s\n", (bytes_rs[2] & IPMI_OEM_INTEL_STANDARD_SERVICES_RMCP) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "KVM: %s\n", (bytes_rs[3] & IPMI_OEM_INTEL_OEM_SPECIFIC_SERVICES_KVM) ? "Enabled" : "Disabled"); rv = 0; cleanup: return (rv); } int ipmi_oem_intel_set_bmc_services (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "ssh") && strcasecmp (state_data->prog_data->args->oem_options[1], "http") && strcasecmp (state_data->prog_data->args->oem_options[1], "rmcp") && strcasecmp (state_data->prog_data->args->oem_options[1], "kvm")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Intel S2600WT2 * * Request * * 0x30 - OEM network function * 0xB1 - OEM cmd * 0x?? - 00h - disable given services * 01h - enable given services * 0x?? - Standard Services bit pattern * - bit 7 - SSH * bit 6 - reserved * bit 5 - HTTP/HTTPs * bit 4 - reserved * bit 3 - RMCP/RMCP+ * bit 2:0 - reserved * 0x?? - OEM specific Services bit pattern * - bit 7 - KVM * bit 6:0 - reserved * * Response * * 0xB1 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_CONTROL_BMC_SERVICES; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) bytes_rq[1] = IPMI_OEM_INTEL_ENABLE_SERVICES; else bytes_rq[1] = IPMI_OEM_INTEL_DISABLE_SERVICES; if (!strcasecmp (state_data->prog_data->args->oem_options[1], "ssh")) { bytes_rq[2] = IPMI_OEM_INTEL_STANDARD_SERVICES_SSH; bytes_rq[3] = 0; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "http")) { bytes_rq[2] = IPMI_OEM_INTEL_STANDARD_SERVICES_HTTP; bytes_rq[3] = 0; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "rmcp")) { bytes_rq[2] = IPMI_OEM_INTEL_STANDARD_SERVICES_RMCP; bytes_rq[3] = 0; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "kvm")) { bytes_rq[2] = 0; bytes_rq[3] = IPMI_OEM_INTEL_OEM_SPECIFIC_SERVICES_KVM; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INTEL_CONTROL_BMC_SERVICES, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_intel_restore_configuration (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * * Restore Configuration Request * * 0x30 - OEM network function * 0x02 - OEM cmd * 0x43 - 'C' * 0x4C - 'L' * 0x52 - 'R' * 0x?? - Operation * - 0x00 - restore status * - 0xAA - initiate restore * * Restore Configuration Response * * 0x02 - OEM cmd * 0x?? - Completion Code * 0x?? - Restore progress * - 0x00 - restore in progress * - 0x01 - restore completed */ bytes_rq[0] = IPMI_CMD_OEM_INTEL_RESTORE_CONFIGURATION; bytes_rq[1] = 'C'; bytes_rq[2] = 'L'; bytes_rq[3] = 'R'; bytes_rq[4] = IPMI_OEM_INTEL_RESTORE_CONFIGURATION_OPERATION_INITIATE_RESTORE; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INTEL_RESTORE_CONFIGURATION, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; /* don't quit until it is done */ while (1) { bytes_rq[4] = IPMI_OEM_INTEL_RESTORE_CONFIGURATION_OPERATION_GET_RESTORE_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INTEL_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INTEL_RESTORE_CONFIGURATION, IPMI_NET_FN_OEM_INTEL_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_INTEL_RESTORE_CONFIGURATION_RESTORE_PROGRESS_RESTORE_COMPLETED) break; sleep (1); } rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-intel.h0000644002055400205540000000247613527331635020005 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTEL_H #define IPMI_OEM_INTEL_H #include "ipmi-oem.h" int ipmi_oem_intel_get_smtp_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_set_smtp_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_get_power_restore_delay (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_set_power_restore_delay (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_get_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_set_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_intel_restore_configuration (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_INTEL_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-intelnm.c0000644002055400205540000076427313527331635020345 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-intelnm.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" struct ipmi_oem_intelnm_sdr_callback { ipmi_oem_state_data_t *state_data; uint8_t *target_channel_number; uint8_t *target_slave_address; uint8_t *target_lun; int found; }; #define IPMI_OEM_INTELNM_STRING_MAX 128 static int _ipmi_oem_intelnm_parse_domainid (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *value_out) { int rv = -1; assert (state_data); assert (value); assert (value_out); if (!strcasecmp (value, "platform")) (*value_out) = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; else if (!strcasecmp (value, "cpu")) (*value_out) = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM; else if (!strcasecmp (value, "memory")) (*value_out) = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM; else if (!strcasecmp (value, "highpowerio")) (*value_out) = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM; else { if (ipmi_oem_parse_1_byte_field (state_data, option_num, value, value_out) < 0) goto cleanup; } if (!IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID ((*value_out))) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid domain id\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[option_num]); goto cleanup; } rv = 0; cleanup: return (rv); } /* achu: * * In Intel NM 2.0 specification, sensor numbers are now fixed and you * don't have to search the SDR for them. We could check version of * NM on motherboard to determine if we need to search SDR or not, but * for time being we'll stick to the search SDR method b/c it will * always work. */ static int _ipmi_oem_intelnm_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_oem_intelnm_sdr_callback *sdr_callback_arg; ipmi_oem_state_data_t *state_data; int ret; int rv = -1; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_oem_intelnm_sdr_callback *)arg; state_data = sdr_callback_arg->state_data; if (record_type != IPMI_SDR_FORMAT_OEM_RECORD) return (0); if ((ret = ipmi_sdr_oem_parse_intel_node_manager (sdr_ctx, sdr_record, sdr_record_len, sdr_callback_arg->target_slave_address, sdr_callback_arg->target_lun, sdr_callback_arg->target_channel_number, NULL, NULL, NULL, NULL)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_oem_parse_intel_node_manager: %s\n", ipmi_sdr_ctx_errormsg (sdr_ctx)); goto cleanup; } if (ret) sdr_callback_arg->found = 1; rv = ret; cleanup: return (rv); } static int _ipmi_oem_intelnm_node_manager_init (ipmi_oem_state_data_t *state_data, uint8_t *target_channel_number, uint8_t *target_slave_address, uint8_t *target_lun) { struct ipmi_oem_intelnm_sdr_callback sdr_callback_arg; int rv = -1; assert (state_data); assert (target_channel_number); assert (target_slave_address); assert (target_lun); sdr_callback_arg.state_data = state_data; sdr_callback_arg.target_channel_number = target_channel_number; sdr_callback_arg.target_slave_address = target_slave_address; sdr_callback_arg.target_lun = target_lun; sdr_callback_arg.found = 0; if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _ipmi_oem_intelnm_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (!sdr_callback_arg.found) { pstdout_fprintf (state_data->pstate, stderr, "Intel Node Manager not found\n"); goto cleanup; } /* slave address is stored as 7-bit i2c in SDR, we need the 8 bit * version for the communication */ (*target_slave_address) <<= 1; rv = 0; cleanup: return (rv); } /* returns 1 if found message to output, 0 if not, -1 on error */ static int _ipmi_oem_intelnm_bad_completion_code (ipmi_oem_state_data_t *state_data, const char *prefix, fiid_obj_t obj_cmd_rs) { uint8_t cmd; uint8_t comp_code; uint64_t val; char *str = NULL; int rv = -1; assert (state_data); assert (obj_cmd_rs); if (FIID_OBJ_GET (obj_cmd_rs, "cmd", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'cmd': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } cmd = val; if (FIID_OBJ_GET (obj_cmd_rs, "comp_code", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'comp_code': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } comp_code = val; switch (cmd) { case IPMI_CMD_OEM_INTEL_NODE_MANAGER_ENABLE_DISABLE_NODE_MANAGER_POLICY_CONTROL: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_POLICY_SUSPEND_PERIODS: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_CONFIGURATION_ACTION: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_CONFIGURATION_ACTION_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POWER_LIMIT_OUT_OF_RANGE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POWER_LIMIT_OUT_OF_RANGE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CORRECTION_TIME_OUT_OF_RANGE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CORRECTION_TIME_OUT_OF_RANGE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_VALUE_OUT_OF_RANGE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_VALUE_OUT_OF_RANGE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_STATISTICS_REPORTING_PERIOD_OUT_OF_RANGE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_VALUE_OF_AGGRESSIVE_CPU_POWER_CORRECTION_FIELD: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_VALUE_OF_AGGRESSIVE_CPU_POWER_CORRECTION_FIELD_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_REQUEST_PARAMETER_NOT_SUPPORTED: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_REQUEST_PARAMETER_NOT_SUPPORTED_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_OR_UNSUPPORTED_POLICY_TRIGGER_TYPE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_LIMIT_IN_ONE_OF_THRESHOLDS_IS_INVALID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_LIMIT_IN_ONE_OF_THRESHOLDS_IS_INVALID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NUMBER_OF_THRESHOLDS_IS_TOO_LARGE_OR_POWER_LIMITS_ARE_INVALID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_REQUEST_PARAMETER_NOT_SUPPORTED_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_ONE_OF_PERIODS_IN_THE_TABLE_IS_INCONSISTENT: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_ONE_OF_PERIODS_IN_THE_TABLE_IS_INCONSISTENT_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_SUSPEND_PERIODS: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_NUMBER_OF_POLICY_SUSPEND_PERIODS_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_NOT_SUPPORTED: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_NOT_SUPPORTED_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_ILLEGAL: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POLICY_SUSPEND_PERIODS_REQUEST_PARAMETER_ILLEGAL_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_RESET_NODE_MANAGER_STATISTICS: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_STATISTICS: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_MODE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_MODE_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_CAPABILITIES: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TRIGGER_TYPE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TRIGGER_TYPE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TYPE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TYPE_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_POWER_DRAW_RANGE: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_LIMITING_POLICY_ID: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NO_POLICY_IS_CURRENTLY_LIMITING: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_NO_POLICY_IS_CURRENTLY_LIMITING_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_TURBO_SYNCHRONIZATION_RATIO: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_TURBO_SYNCHRONIZATION_RATIO: switch (comp_code) { case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_WRONG_CPU_SOCKET_NUMBER: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_WRONG_CPU_SOCKET_NUMBER_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_COMMAND_RESPONSE_TIMEOUT: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_COMMAND_RESPONSE_TIMEOUT_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_READ_FSC_IN_THE_RESPONSE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_READ_FSC_IN_THE_RESPONSE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_WRITE_FCS_FIELD_IN_THE_RESPONSE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_BAD_WRITE_FCS_FIELD_IN_THE_RESPONSE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CPU_NOT_PRESENT: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_CPU_NOT_PRESENT_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_PLATFORM_NOT_IN_S0_S1_STATE: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_PLATFORM_NOT_IN_S0_S1_STATE_STR; break; case IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INCORRECT_ACTIVE_CORES_CONFIGURATION: str = IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INCORRECT_ACTIVE_CORES_CONFIGURATION_STR; break; default: rv = 0; goto cleanup; } break; case IPMI_CMD_OEM_INTEL_NODE_MANAGER_SET_NODE_MANAGER_ALERT_DESTINATION: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_ALERT_DESTINATION: case IPMI_CMD_OEM_INTEL_NODE_MANAGER_GET_NODE_MANAGER_VERSION: default: rv = 0; goto cleanup; } if (prefix) pstdout_fprintf (state_data->pstate, stderr, "%s : %s\n", prefix, str); else pstdout_fprintf (state_data->pstate, stderr, "%s\n", str); rv = 1; cleanup: return (rv); } int ipmi_oem_intelnm_get_node_manager_statistics (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS; int mode_specified = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; uint8_t policyid = 0; int policyid_specified = 0; uint16_t current; uint16_t minimum; uint16_t maximum; uint16_t average; uint32_t statistics_reporting_period; uint8_t policy_global_administrative_state; uint8_t policy_operational_state; uint8_t measurements_state; uint8_t policy_activation_state; uint64_t val; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "mode")) { if (strcasecmp (value, "globalpower") && strcasecmp (value, "globaltemp") && strcasecmp (value, "globalthrottling") && strcasecmp (value, "globalvolumetricairflow") && strcasecmp (value, "globaltempairflow") && strcasecmp (value, "globalchassispower") && strcasecmp (value, "policypower") && strcasecmp (value, "policytrigger") && strcasecmp (value, "policythrottling") && strcasecmp (value, "hostunhandledrequests") && strcasecmp (value, "hostresponsetime") && strcasecmp (value, "cputhrottling") && strcasecmp (value, "memorythrottling") && strcasecmp (value, "hostcommfailure")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid mode\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "globalpower")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS; else if (!strcasecmp (value, "globaltemp")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS; else if (!strcasecmp (value, "globalthrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS; else if (!strcasecmp (value, "globalvolumetricairflow")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS; else if (!strcasecmp (value, "globaltempairflow")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS; else if (!strcasecmp (value, "globalchassispower")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS; else if (!strcasecmp (value, "policypower")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS; else if (!strcasecmp (value, "policytrigger")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS; else if (!strcasecmp (value, "policythrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS; else if (!strcasecmp (value, "hostunhandledrequests")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS; else if (!strcasecmp (value, "hostresponsetime")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS; else if (!strcasecmp (value, "cputhrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS; else if (!strcasecmp (value, "memorythrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS; else /* !strcasecmp (value, "hostcommfailure") */ mode = IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS; mode_specified++; } else if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!mode_specified) { pstdout_fprintf (state_data->pstate, stderr, "mode must be specified\n"); goto cleanup; } if ((mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS) && !policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy id must be specified for given mode\n"); goto cleanup; } if ((mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS) && domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) { pstdout_fprintf (state_data->pstate, stderr, "domain id invalid for given mode\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_statistics_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_statistics (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, mode, domainid, policyid, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_statistics: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } current = val; if (FIID_OBJ_GET (obj_cmd_rs, "minimum", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'minimum': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minimum = val; if (FIID_OBJ_GET (obj_cmd_rs, "maximum", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'maximum': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } maximum = val; if (FIID_OBJ_GET (obj_cmd_rs, "average", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'average': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } average = val; if (FIID_OBJ_GET (obj_cmd_rs, "statistics_reporting_period", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'statistics_reporting_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } statistics_reporting_period = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_global_administrative_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_global_administrative_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_global_administrative_state = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_operational_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_operational_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_operational_state = val; if (FIID_OBJ_GET (obj_cmd_rs, "measurements_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'measurements_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } measurements_state = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_activation_state", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_activation_state': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_activation_state = val; if (mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_POWER_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CHASSIS_POWER_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_POWER_STATISTICS) { pstdout_printf (state_data->pstate, "Current Power : %u Watts\n", current); pstdout_printf (state_data->pstate, "Minimum Power : %u Watts\n", minimum); pstdout_printf (state_data->pstate, "Maximum Power : %u Watts\n", maximum); pstdout_printf (state_data->pstate, "Average Power : %u Watts\n", average); } else if (mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_INLET_TEMPERATURE_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_OUTLET_AIRFLOW_TEMPERATURE_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_TRIGGER_STATISTICS) { pstdout_printf (state_data->pstate, "Current Temperature : %u Celsius\n", current); pstdout_printf (state_data->pstate, "Minimum Temperature : %u Celsius\n", minimum); pstdout_printf (state_data->pstate, "Maximum Temperature : %u Celsius\n", maximum); pstdout_printf (state_data->pstate, "Average Temperature : %u Celsius\n", average); } else if (mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_PER_POLICY_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_CPU_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_MEMORY_THROTTLING_STATISTICS) { pstdout_printf (state_data->pstate, "Current Throttling Percent : %u%%\n", current); pstdout_printf (state_data->pstate, "Minimum Throttling Percent : %u%%\n", minimum); pstdout_printf (state_data->pstate, "Maximum Throttling Percent : %u%%\n", maximum); pstdout_printf (state_data->pstate, "Average Throttling Percent : %u%%\n", average); } else if (mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_RESPONSE_TIME_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_COMMUNICATION_FAILURE_STATISTICS) { /* Time is in 1/100 increments, multiply by 10 to get milliseconds */ pstdout_printf (state_data->pstate, "Current Time : %u ms\n", current * 10); pstdout_printf (state_data->pstate, "Minimum Time : %u ms\n", minimum * 10); pstdout_printf (state_data->pstate, "Maximum Time : %u ms\n", maximum * 10); pstdout_printf (state_data->pstate, "Average Time : %u ms\n", average * 10); } else if (mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS) { pstdout_printf (state_data->pstate, "Current Unhandled Requests : %u\n", current); pstdout_printf (state_data->pstate, "Maximum Unhandled Requests : %u\n", maximum); } else /* mode == IPMI_OEM_INTEL_NODE_MANAGER_STATISTICS_MODE_GLOBAL_VOLUMETRIC_AIRFLOW_STATISTICS */ { /* In units of 1/10 CFM, so divide by 10 to get CFM */ pstdout_printf (state_data->pstate, "Current CFM : %0.1f CFM\n", (double)current / 10); pstdout_printf (state_data->pstate, "Minimum CFM : %01.f CFM\n", (double)minimum / 10); pstdout_printf (state_data->pstate, "Maximum CFM : %01.f CFM\n", (double)maximum / 10); pstdout_printf (state_data->pstate, "Average CFM : %01.f CFM\n", (double)average / 10); } pstdout_printf (state_data->pstate, "Statistics Reporting Period : %u seconds\n", statistics_reporting_period); pstdout_printf (state_data->pstate, "Policy/Global Administrative State : %s\n", (policy_global_administrative_state == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_GLOBAL_ADMINISTRATIVE_STATE_ENABLED) ? "Enabled" : "Disabled"); if (policyid_specified) pstdout_printf (state_data->pstate, "Policy Operational State : %s\n", (policy_operational_state == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_OPERATIONAL_STATE_ACTIVELY_MONITORING_DEFINED_TRIGGER) ? "Active" : "Suspended"); pstdout_printf (state_data->pstate, "Measurements State : %s\n", (measurements_state == IPMI_OEM_INTEL_NODE_MANAGER_MEASUREMENTS_STATE_IN_PROGRESS) ? "In Progress" : "Suspended"); if (policyid_specified) pstdout_printf (state_data->pstate, "Policy Activation State : %s\n", (policy_activation_state == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ACTIVATION_STATE_TRIGGERED_AND_ACTIVELY_LIMITING_TARGET) ? "Triggered" : "Not Triggered"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_reset_node_manager_statistics (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t mode = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; uint8_t policyid = 0; int mode_specified = 0; int domainid_specified = 0; int policyid_specified = 0; int rv = -1; assert (state_data); if (state_data->prog_data->args->oem_options_count) { unsigned int i; for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "mode")) { if (strcasecmp (value, "global") && strcasecmp (value, "policy") && strcasecmp (value, "hostunhandledrequests") && strcasecmp (value, "hostresponsetime") && strcasecmp (value, "cputhrottling") && strcasecmp (value, "memorythrottling") && strcasecmp (value, "hostcommfailure")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid mode\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "global")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS; else if (!strcasecmp (value, "policy")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS; else if (!strcasecmp (value, "hostunhandledrequests")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_GLOBAL_HOST_UNHANDLED_REQUESTS_STATISTICS; else if (!strcasecmp (value, "hostresponsetime")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_RESPONSE_TIME_STATISTICS; else if (!strcasecmp (value, "cputhrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS; else if (!strcasecmp (value, "memorythrottling")) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS; else /* !strcasecmp (value, "hostcommfailure") */ mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS; mode_specified++; } else if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_reset_node_manager_statistics_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!mode_specified) { if (!policyid_specified) mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_RESET_GLOBAL_STATISTICS; else mode = IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS; } else { if ((mode == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_CPU_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_MEMORY_THROTTLING_STATISTICS || mode == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_HOST_COMMUNICATION_FAILURE_STATISTICS) && domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s domainid must be \"platform\" (or \"%u\") for indicated reset mode\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM); goto cleanup; } if (mode == IPMI_OEM_INTEL_NODE_MANAGER_RESET_MODE_PER_POLICY_STATISTICS && !policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s policyid must be specified for indicated reset mode\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } } if (ipmi_cmd_oem_intel_node_manager_reset_node_manager_statistics (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, mode, domainid, policyid, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_reset_node_manager_statistics: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _ipmi_oem_intelnm_get_node_manager_version_common (ipmi_oem_state_data_t *state_data, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t *node_manager_version, uint8_t *ipmi_interface_version, uint8_t *patch_version, uint8_t *major_firmware_revision, uint8_t *minor_firmware_revision) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_version_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_version (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_version: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } if (node_manager_version) { if (FIID_OBJ_GET (obj_cmd_rs, "node_manager_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'node_manager_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*node_manager_version) = val; } if (ipmi_interface_version) { if (FIID_OBJ_GET (obj_cmd_rs, "ipmi_interface_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'ipmi_interface_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*ipmi_interface_version) = val; } if (patch_version) { if (FIID_OBJ_GET (obj_cmd_rs, "patch_version", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'patch_version': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*patch_version) = val; } if (major_firmware_revision) { if (FIID_OBJ_GET (obj_cmd_rs, "major_firmware_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'major_firmware_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*major_firmware_revision) = val; } if (minor_firmware_revision) { if (FIID_OBJ_GET (obj_cmd_rs, "minor_firmware_revision", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'minor_firmware_revision': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } (*minor_firmware_revision) = val; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _ipmi_oem_intelnm_get_domain_id_str (ipmi_oem_state_data_t *state_data, uint8_t domain_id, char *domain_id_str, unsigned int domain_id_str_len) { assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); assert (domain_id_str); assert (domain_id_str_len); switch (domain_id) { case IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM: snprintf (domain_id_str, domain_id_str_len, "Entire Platform"); break; case IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM: snprintf (domain_id_str, domain_id_str_len, "CPU Subsystem"); break; case IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM: snprintf (domain_id_str, domain_id_str_len, "Memory Subsystem"); break; case IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM: snprintf (domain_id_str, domain_id_str_len, "High Power I/O Subsystem"); break; } } static char * _ipmi_oem_intelnm_get_policy_trigger_type_str (uint8_t policy_trigger_type) { char *rv = NULL; switch (policy_trigger_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER: rv = "No Policy Trigger"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER: rv = "Inlet Temperature Limit Policy Trigger"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT: rv = "Missing Power Reading Timeout"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER: rv = "Time After Platform Reset Trigger"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY: rv = "Boot Time Policy"; break; } return (rv); } static void _ipmi_oem_intelnm_get_node_manager_get_node_manager_capabilities_header (ipmi_oem_state_data_t *state_data, uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain) { char domain_id_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; char *policy_trigger_type_str = NULL; char *policy_type_str = NULL; char *policy_power_domain_str = NULL; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); assert (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID (policy_trigger_type)); assert (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_VALID (policy_type)); assert (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_VALID (policy_power_domain)); memset (domain_id_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); _ipmi_oem_intelnm_get_domain_id_str (state_data, domain_id, domain_id_str, IPMI_OEM_INTELNM_STRING_MAX); policy_trigger_type_str = _ipmi_oem_intelnm_get_policy_trigger_type_str (policy_trigger_type); switch (policy_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY: policy_type_str = "Power Control Policy"; break; } /* policy power domain only matters on domain id 0 */ if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) { if (policy_power_domain == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN) policy_power_domain_str = ", Policy Power Domain = Primary"; else /* policy_power_domain == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN */ policy_power_domain_str = ", Policy Power Domain = Secondary"; } else policy_power_domain_str = ""; pstdout_printf (state_data->pstate, "Capabilities for Domain ID = %s, Policy Trigger Type = %s, Policy Type = %s%s\n\n", domain_id_str, policy_trigger_type_str, policy_type_str, policy_power_domain_str); } /* return 1 if output something, 0 if not, -1 on error */ static int _ipmi_oem_intelnm_get_node_manager_capabilities_common (ipmi_oem_state_data_t *state_data, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_trigger_type, uint8_t policy_type, uint8_t policy_power_domain, int searching_domain_id, int searching_policy_trigger_type, int searching_policy_type, int searching_policy_power_domain) { fiid_obj_t obj_cmd_rs = NULL; uint8_t max_concurrent_settings; uint16_t max_power_thermal_time_after_reset; uint16_t min_power_thermal_time_after_reset; uint32_t min_correction_time; uint32_t max_correction_time; uint16_t min_statistics_reporting_period; uint16_t max_statistics_reporting_period; uint8_t limiting_domain_id; char limiting_domain_id_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; uint8_t limiting_based_on; char *limiting_based_on_str; uint64_t val; int rv = -1; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); assert (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_VALID (policy_trigger_type)); assert (IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_VALID (policy_type)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_capabilities_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_capabilities (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domain_id, policy_trigger_type, policy_type, policy_power_domain, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if (!state_data->prog_data->args->verbose_count) { if ((searching_domain_id && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID) == 1) || (searching_policy_trigger_type && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TRIGGER_TYPE) == 1) || (searching_policy_type && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_UNKNOWN_POLICY_TYPE) == 1)) { rv = 0; goto cleanup; } } if (searching_domain_id || searching_policy_trigger_type || searching_policy_type || searching_policy_power_domain) _ipmi_oem_intelnm_get_node_manager_get_node_manager_capabilities_header (state_data, domain_id, policy_trigger_type, policy_type, policy_power_domain); if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, "Error", obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_capabilities: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } if ((searching_domain_id || searching_policy_trigger_type || searching_policy_type || searching_policy_power_domain) && state_data->prog_data->args->verbose_count) rv = 1; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "max_concurrent_settings", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'max_concurrent_settings': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } max_concurrent_settings = val; if (FIID_OBJ_GET (obj_cmd_rs, "max_power_thermal_time_after_reset", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'max_power_thermal_time_after_reset': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } max_power_thermal_time_after_reset = val; if (FIID_OBJ_GET (obj_cmd_rs, "min_power_thermal_time_after_reset", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'min_power_thermal_time_after_reset': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } min_power_thermal_time_after_reset = val; if (FIID_OBJ_GET (obj_cmd_rs, "max_correction_time", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'max_correction_time': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } max_correction_time = val; if (FIID_OBJ_GET (obj_cmd_rs, "min_correction_time", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'min_correction_time': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } min_correction_time = val; if (FIID_OBJ_GET (obj_cmd_rs, "max_statistics_reporting_period", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'max_statistics_reporting_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } max_statistics_reporting_period = val; if (FIID_OBJ_GET (obj_cmd_rs, "min_statistics_reporting_period", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'min_statistics_reporting_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } min_statistics_reporting_period = val; if (FIID_OBJ_GET (obj_cmd_rs, "domain_limiting_scope.domain_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'domain_limiting_scope.domain_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } limiting_domain_id = val; if (FIID_OBJ_GET (obj_cmd_rs, "domain_limiting_scope.limiting_based_on", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'domain_limiting_scope.limiting_based_on': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } limiting_based_on = val; memset (limiting_domain_id_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); if (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (limiting_domain_id)) _ipmi_oem_intelnm_get_domain_id_str (state_data, limiting_domain_id, limiting_domain_id_str, IPMI_OEM_INTELNM_STRING_MAX); else snprintf (limiting_domain_id_str, IPMI_OEM_INTELNM_STRING_MAX, "Unspecified"); switch (limiting_based_on) { case IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_WALL_INPUT_POWER_PSU_INPUT_POWER: limiting_based_on_str = "Wall input power / PSU input power"; break; case IPMI_OEM_INTEL_NODE_MANAGER_LIMITING_BASED_ON_DC_POWER_PSU_OUTPUT_POWER_OR_BLADED_SYSTEM: limiting_based_on_str = "DC power - PSU output power or bladed system"; break; default: limiting_based_on_str = "Unknown"; } if (searching_domain_id || searching_policy_trigger_type || searching_policy_type || searching_policy_power_domain) _ipmi_oem_intelnm_get_node_manager_get_node_manager_capabilities_header (state_data, domain_id, policy_trigger_type, policy_type, policy_power_domain); pstdout_printf (state_data->pstate, "Max Concurrent Settings : %u\n", max_concurrent_settings); if (policy_trigger_type == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER) { char thermal_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; memset (thermal_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); if (!max_power_thermal_time_after_reset) snprintf (thermal_str, IPMI_OEM_INTELNM_STRING_MAX, "No Limit"); else snprintf (thermal_str, IPMI_OEM_INTELNM_STRING_MAX, "%u W", max_power_thermal_time_after_reset); pstdout_printf (state_data->pstate, "Max Power : %s\n", thermal_str); if (!min_power_thermal_time_after_reset) snprintf (thermal_str, IPMI_OEM_INTELNM_STRING_MAX, "No Limit"); else snprintf (thermal_str, IPMI_OEM_INTELNM_STRING_MAX, "%u W", min_power_thermal_time_after_reset); pstdout_printf (state_data->pstate, "Min Power : %s\n", thermal_str); } else if (policy_trigger_type == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER) { pstdout_printf (state_data->pstate, "Max Thermal : %u C\n", max_power_thermal_time_after_reset); pstdout_printf (state_data->pstate, "Min Thermal : %u C\n", min_power_thermal_time_after_reset); } else if (policy_trigger_type == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT || policy_trigger_type == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER) { pstdout_printf (state_data->pstate, "Max Trigger Time : %0.1f s\n", ((float)max_power_thermal_time_after_reset / 10)); pstdout_printf (state_data->pstate, "Min Trigger Time : %0.1f s\n", ((float)min_power_thermal_time_after_reset / 10)); } /* policy_trigger_type == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY not applicable */ pstdout_printf (state_data->pstate, "Max Correction Time : %u ms\n", max_correction_time); pstdout_printf (state_data->pstate, "Min Correction Time : %u ms\n", min_correction_time); pstdout_printf (state_data->pstate, "Max Statistics Reporting Period : %u s\n", max_statistics_reporting_period); pstdout_printf (state_data->pstate, "Min Statistics Reporting Period : %u s\n", min_statistics_reporting_period); pstdout_printf (state_data->pstate, "Limiting Domain : %s\n", limiting_domain_id_str); pstdout_printf (state_data->pstate, "Limiting Source : %s\n", limiting_based_on_str); rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_node_manager_capabilities (ipmi_oem_state_data_t *state_data) { uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid_defaults_1_5[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM}; unsigned int domainid_defaults_1_5_len = 1; uint8_t domainid_defaults_2_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM}; unsigned int domainid_defaults_2_0_len = 4; uint8_t policytrigger_defaults_1_5[] = {IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER}; unsigned int policytrigger_defaults_1_5_len = 2; uint8_t policytrigger_defaults_2_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY}; unsigned int policytrigger_defaults_2_0_len = 5; uint8_t policytype_defaults[] = {IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY}; unsigned int policytype_defaults_len = 1; uint8_t policypowerdomain_defaults_3_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN}; unsigned int policypowerdomain_defaults_3_0_len = 2; uint8_t policypowerdomain_legacy[] = {0}; unsigned int policypowerdomain_legacy_len = 1; uint8_t domainid_input[1]; uint8_t policytrigger_input[1]; uint8_t policytype_input[1]; uint8_t policypowerdomain_input[1]; uint8_t *domainid_array; unsigned int domainid_array_len; uint8_t *policytrigger_array; unsigned int policytrigger_array_len; uint8_t *policytype_array; unsigned int policytype_array_len; uint8_t *policypowerdomain_array; unsigned int policypowerdomain_array_len; int domainid_specified = 0; int policytrigger_specified = 0; int policytype_specified = 0; int policypowerdomain_specified = 0; unsigned int i, j, k, l; int output_newline_flag = 0; uint8_t node_manager_version; int rv = -1; int ret; assert (state_data); policytype_array = policytype_defaults; policytype_array_len = policytype_defaults_len; if (state_data->prog_data->args->oem_options_count) { for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { uint8_t domainid_tmp; if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid_tmp) < 0) goto cleanup; domainid_input[0] = domainid_tmp; domainid_array = domainid_input; domainid_array_len = 1; domainid_specified++; } else if (!strcasecmp (key, "policytrigger")) { if (strcasecmp (value, "none") && strcasecmp (value, "inlettemperaturelimitpolicytrigger") && strcasecmp (value, "inlet") /* legacy */ && strcasecmp (value, "missingpowerreadingtimeout") && strcasecmp (value, "timeafterplatformresettrigger") && strcasecmp (value, "boottimepolicy")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy trigger type\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "none")) policytrigger_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER; else if (!strcasecmp (value, "inlettemperaturelimitpolicytrigger") || !strcasecmp (value, "inlet")) /* legacy */ policytrigger_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER; else if (!strcasecmp (value, "missingpowerreadingtimeout")) policytrigger_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT; else if (!strcasecmp (value, "timeafterplatformresettrigger")) policytrigger_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER; else /* !strcasecmp (value, "boottimepolicy") */ policytrigger_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY; policytrigger_array = policytrigger_input; policytrigger_array_len = 1; policytrigger_specified++; } else if (!strcasecmp (key, "policytype")) { if (strcasecmp (value, "powercontrol")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy type\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } /* !strcasecmp (value, "powercontrol") */ policytype_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY; policytype_array = policytype_input; policytype_array_len = 1; policytype_specified++; } else if (!strcasecmp (key, "policypowerdomain")) { if (strcasecmp (value, "primary") && strcasecmp (value, "secondary")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy power domain\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "primary")) policypowerdomain_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN; else /* !strcasecmp (value, "secondary") */ policypowerdomain_input[0] = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN; policypowerdomain_array = policypowerdomain_input; policypowerdomain_array_len = 1; policypowerdomain_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (policypowerdomain_specified && ((domainid_specified && domainid_input[0] != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) || !domainid_specified)) { pstdout_fprintf (state_data->pstate, stderr, "policy power domain does not apply to all domains indicated (or defaulted to)\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (_ipmi_oem_intelnm_get_node_manager_version_common (state_data, target_channel_number, target_slave_address, target_lun, &node_manager_version, NULL, NULL, NULL, NULL) < 0) goto cleanup; if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0) { if (!domainid_specified) { domainid_array = domainid_defaults_2_0; domainid_array_len = domainid_defaults_2_0_len; } if (!policytrigger_specified) { policytrigger_array = policytrigger_defaults_2_0; policytrigger_array_len = policytrigger_defaults_2_0_len; } if (!policypowerdomain_specified) { policypowerdomain_array = policypowerdomain_defaults_3_0; policypowerdomain_array_len = policypowerdomain_defaults_3_0_len; } } else if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5) { if (!domainid_specified) { domainid_array = domainid_defaults_2_0; domainid_array_len = domainid_defaults_2_0_len; } if (!policytrigger_specified) { policytrigger_array = policytrigger_defaults_2_0; policytrigger_array_len = policytrigger_defaults_2_0_len; } policypowerdomain_array = policypowerdomain_legacy; policypowerdomain_array_len = policypowerdomain_legacy_len; } else { if (!domainid_specified) { domainid_array = domainid_defaults_1_5; domainid_array_len = domainid_defaults_1_5_len; } if (!policytrigger_specified) { policytrigger_array = policytrigger_defaults_1_5; policytrigger_array_len = policytrigger_defaults_1_5_len; } } for (i = 0; i < domainid_array_len; i++) { for (j = 0; j < policytrigger_array_len; j++) { for (k = 0; k < policytype_array_len; k++) { for (l = 0; l < policypowerdomain_array_len; l++) { if (output_newline_flag) pstdout_printf (state_data->pstate, "\n"); if ((ret = _ipmi_oem_intelnm_get_node_manager_capabilities_common (state_data, target_channel_number, target_slave_address, target_lun, domainid_array[i], policytrigger_array[j], policytype_array[k], policypowerdomain_array[l], domainid_specified ? 0 : 1, policytrigger_specified ? 0 : 1, policytype_specified ? 0 : 1, policypowerdomain_specified ? 0 : 1)) < 0) goto cleanup; if (ret > 0) output_newline_flag = 1; else output_newline_flag = 0; } } } } rv = 0; cleanup: return (rv); } int ipmi_oem_intelnm_node_manager_policy_control (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policyid = 0; int policyid_specified = 0; uint8_t policy_enable_disable; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (state_data->prog_data->args->oem_options_count > 1) { unsigned int i; for (i = 1; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!domainid_specified) { if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_ENABLE_NODE_MANAGER_POLICY_CONTROL; else policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_GLOBAL_DISABLE_NODE_MANAGER_POLICY_CONTROL; } else { if (!policyid_specified) { if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_ENABLE_NODE_MANAGER_POLITICES; else policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_DOMAIN_DISABLE_NODE_MANAGER_POLICIES; } else { if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_ENABLE_NODE_MANAGER_POLITICES; else policy_enable_disable = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLE_DISABLE_PER_POLICY_DISABLE_NODE_MANAGER_POLICIES; } } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, policy_enable_disable, domainid, policyid, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_enable_disable_node_manager_policy_control: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _ipmi_oem_intelnm_get_node_manager_policy_output_header (ipmi_oem_state_data_t *state_data, uint8_t domain_id, uint8_t policy_id) { char domain_id_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); memset (domain_id_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); _ipmi_oem_intelnm_get_domain_id_str (state_data, domain_id, domain_id_str, IPMI_OEM_INTELNM_STRING_MAX); pstdout_printf (state_data->pstate, "Capabilities for Domain ID = %s, Policy ID = %u\n\n", domain_id_str, policy_id); } /* return 1 if output something, 0 if not, -1 on error */ static int _ipmi_oem_intelnm_get_node_manager_policy_common (ipmi_oem_state_data_t *state_data, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, int searching_domain_id, int searching_policy_id) { fiid_obj_t obj_cmd_rs = NULL; uint8_t policy_enabled; uint8_t per_domain_node_manager_policy_control_enabled; uint8_t global_node_manager_policy_control_enabled; uint8_t policy_created_and_managed_by_other_management; uint8_t policy_trigger_type; uint8_t policy_type; uint8_t aggressive_cpu_power_correction; uint8_t policy_storage_option; uint8_t policy_exception_actions_send_alert; uint8_t policy_exception_actions_shutdown_system; uint8_t policy_power_domain; uint16_t policy_target_limit; uint32_t correction_time_limit; uint16_t policy_trigger_limit; uint16_t statistics_reporting_period; char *policy_trigger_type_str = NULL; char *policy_target_limit_units_str = NULL; char *policy_type_str = NULL; char *aggressive_cpu_power_correction_str = NULL; char *policy_storage_option_str = NULL; char *policy_power_domain_str = NULL; uint64_t val; int rv = -1; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_policy (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domain_id, policy_id, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if (!state_data->prog_data->args->verbose_count) { if ((searching_domain_id && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID) == 1) || (searching_policy_id && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID) == 1)) { rv = 0; goto cleanup; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_output_header (state_data, domain_id, policy_id); if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, "Error", obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } if ((searching_domain_id || searching_policy_id) && state_data->prog_data->args->verbose_count) rv = 1; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "policy_enabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_enabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_enabled = val; if (FIID_OBJ_GET (obj_cmd_rs, "per_domain_node_manager_policy_control_enabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'per_domain_node_manager_policy_control_enabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } per_domain_node_manager_policy_control_enabled = val; if (FIID_OBJ_GET (obj_cmd_rs, "global_node_manager_policy_control_enabled", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'global_node_manager_policy_control_enabled': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } global_node_manager_policy_control_enabled = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_created_and_managed_by_other_management", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_created_and_managed_by_other_management': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_created_and_managed_by_other_management = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_trigger_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_trigger_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_trigger_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_type': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_type = val; if (FIID_OBJ_GET (obj_cmd_rs, "aggressive_cpu_power_correction", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'aggressive_cpu_power_correction': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } aggressive_cpu_power_correction = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_storage_option", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_storage_option': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_storage_option = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_exception_actions.send_alert", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_exception_actions.send_alert': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_exception_actions_send_alert = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_exception_actions.shutdown_system", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_exception_actions.shutdown_system': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_exception_actions_shutdown_system = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_power_domain", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_power_domain': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_power_domain = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_target_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_target_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_target_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "correction_time_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'correction_time_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } correction_time_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "policy_trigger_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_trigger_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_trigger_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "statistics_reporting_period", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'statistics_reporting_period': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } statistics_reporting_period = val; policy_trigger_type_str = _ipmi_oem_intelnm_get_policy_trigger_type_str (policy_trigger_type); if (!policy_trigger_type_str) policy_trigger_type_str = "Unknown"; switch (policy_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TYPE_POWER_CONTROL_POLICY: policy_type_str = "Power Control Policy"; break; default: policy_type_str = "Unknown"; break; } switch (aggressive_cpu_power_correction) { case IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC: aggressive_cpu_power_correction_str = "Automatic"; break; case IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE: aggressive_cpu_power_correction_str = "Non-Aggressive"; break; case IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE: aggressive_cpu_power_correction_str = "Aggressive"; break; default: aggressive_cpu_power_correction_str = "Unknown"; break; } switch (policy_storage_option) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE: policy_storage_option_str = "Persistent Storage"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY: policy_storage_option_str = "Volatile Storage"; break; default: policy_storage_option_str = "Unknown"; break; } switch (policy_power_domain) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN: policy_power_domain_str = "Primary"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN: policy_power_domain_str = "Secondary"; break; default: policy_power_domain_str = "Unknown"; break; } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_output_header (state_data, domain_id, policy_id); pstdout_printf (state_data->pstate, "Policy : %s\n", (policy_enabled == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED) ? "enabled" : "disabled"); pstdout_printf (state_data->pstate, "Per Domain Node Manager Policy Control : %s\n", (per_domain_node_manager_policy_control_enabled == IPMI_OEM_INTEL_NODE_MANAGER_PER_DOMAIN_NODE_MANAGER_POLICY_CONTROL_ENABLED) ? "enabled" : "disabled"); pstdout_printf (state_data->pstate, "Global Node Manager Policy Control : %s\n", (global_node_manager_policy_control_enabled == IPMI_OEM_INTEL_NODE_MANAGER_GLOBAL_NODE_MANAGER_POLICY_CONTROL_ENABLED) ? "enabled" : "disabled"); pstdout_printf (state_data->pstate, "Policy Created/Managed by Other Client : %s\n", (policy_created_and_managed_by_other_management == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CREATED_AND_MANAGED_BY_OTHER_MANAGEMENT) ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy Trigger Type : %s\n", policy_trigger_type_str); pstdout_printf (state_data->pstate, "Policy Type : %s\n", policy_type_str); if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM || domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM) pstdout_printf (state_data->pstate, "Aggressive CPU Power Correction : %s\n", aggressive_cpu_power_correction_str); pstdout_printf (state_data->pstate, "Policy Storage Option: : %s\n", policy_storage_option_str); pstdout_printf (state_data->pstate, "Policy Exception Send Alert Action : %s\n", (policy_exception_actions_send_alert == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE) ? "enabled" : "disabled"); pstdout_printf (state_data->pstate, "Policy Exception Shutdown System Action : %s\n", (policy_exception_actions_shutdown_system == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE) ? "enabled" : "disabled"); if (domain_id == IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM) pstdout_printf (state_data->pstate, "Policy Power Domain : %s\n", policy_power_domain_str); switch (policy_trigger_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER: policy_target_limit_units_str = " W"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER: policy_target_limit_units_str = " W"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT: policy_target_limit_units_str = "%%"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER: policy_target_limit_units_str = " W"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY: policy_target_limit_units_str = " W"; break; default: policy_target_limit_units_str = " ?"; break; } pstdout_printf (state_data->pstate, "Policy Target Limit : %u%s\n", policy_target_limit, policy_target_limit_units_str); pstdout_printf (state_data->pstate, "Correction Time Limit : %u ms\n", correction_time_limit); switch (policy_trigger_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER: pstdout_printf (state_data->pstate, "Policy Trigger Limit : %u W\n", policy_trigger_limit); break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER: pstdout_printf (state_data->pstate, "Policy Trigger Limit : %u C\n", policy_trigger_limit); break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT: case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER: pstdout_printf (state_data->pstate, "Policy Trigger Limit : %0.1f s\n", ((float)policy_trigger_limit / 10)); break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY: default: break; } pstdout_printf (state_data->pstate, "Statistics Reporting Period : %u s\n", statistics_reporting_period); rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_node_manager_policy (ipmi_oem_state_data_t *state_data) { uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid_defaults_1_5[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM}; unsigned int domainid_defaults_1_5_len = 1; uint8_t domainid_defaults_2_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM}; unsigned int domainid_defaults_2_0_len = 4; uint8_t domainid_input[1]; uint8_t *domainid_array; unsigned int domainid_array_len; uint8_t policyid_min = 0; uint8_t policyid_max = 255; int domainid_specified = 0; int policyid_specified = 0; unsigned int i, j; int output_newline_flag = 0; uint8_t node_manager_version; int rv = -1; int ret; assert (state_data); if (state_data->prog_data->args->oem_options_count) { for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { uint8_t domainid_tmp; if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid_tmp) < 0) goto cleanup; domainid_input[0] = domainid_tmp; domainid_array = domainid_input; domainid_array_len = 1; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { uint8_t policyid_tmp; if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid_tmp) < 0) goto cleanup; policyid_min = policyid_tmp; policyid_max = policyid_tmp; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!domainid_specified) { if (_ipmi_oem_intelnm_get_node_manager_version_common (state_data, target_channel_number, target_slave_address, target_lun, &node_manager_version, NULL, NULL, NULL, NULL) < 0) goto cleanup; if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5 ||node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0) { domainid_array = domainid_defaults_2_0; domainid_array_len = domainid_defaults_2_0_len; } else { domainid_array = domainid_defaults_1_5; domainid_array_len = domainid_defaults_1_5_len; } } for (i = 0; i < domainid_array_len; i++) { for (j = policyid_min; j <= policyid_max; j++) { if (output_newline_flag) pstdout_printf (state_data->pstate, "\n"); if ((ret = _ipmi_oem_intelnm_get_node_manager_policy_common (state_data, target_channel_number, target_slave_address, target_lun, domainid_array[i], j, domainid_specified ? 0 : 1, policyid_specified ? 0 : 1)) < 0) goto cleanup; if (ret > 0) output_newline_flag = 1; else output_newline_flag = 0; } } rv = 0; cleanup: return (rv); } int ipmi_oem_intelnm_set_node_manager_policy (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policyid = 0; int policyid_specified = 0; uint8_t policytrigger = 0; int policytrigger_specified = 0; uint16_t policytargetlimit = 0; int policytargetlimit_specified = 0; uint8_t platformbootingmode = 0; int platformbootingmode_specified = 0; uint32_t correctiontimelimit = 0; int correctiontimelimit_specified = 0; uint16_t policytriggerlimit = 0; int policytriggerlimit_specified = 0; uint16_t statisticsreportingperiod = 0; int statisticsreportingperiod_specified = 0; uint8_t policystate = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED; uint8_t aggressivepowercorrection = IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC; int aggressivepowercorrection_specified = 0; uint8_t policystorage = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE; int policystorage_specified = 0; uint8_t policyexceptionaction_alert = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE; uint8_t policyexceptionaction_shutdown = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE; uint8_t policypowerdomain = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 7); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else if (!strcasecmp (key, "policytrigger")) { if (strcasecmp (value, "none") && strcasecmp (value, "inlettemperaturelimitpolicytrigger") && strcasecmp (value, "inlet") /* legacy */ && strcasecmp (value, "missingpowerreadingtimeout") && strcasecmp (value, "timeafterplatformresettrigger") && strcasecmp (value, "boottimepolicy")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy trigger type\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "none")) policytrigger = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER; else if (!strcasecmp (value, "inlettemperaturelimitpolicytrigger") || !strcasecmp (value, "inlet")) /* legacy */ policytrigger = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER; else if (!strcasecmp (value, "missingpowerreadingtimeout")) policytrigger = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT; else if (!strcasecmp (value, "timeafterplatformresettrigger")) policytrigger = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER; else /* !strcasecmp (value, "boottimepolicy") */ policytrigger = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY; policytrigger_specified++; } else if (!strcasecmp (key, "policytargetlimit") || !strcasecmp (key, "powerlimit")) /* legacy */ { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &policytargetlimit) < 0) goto cleanup; policytargetlimit_specified++; } else if (!strcasecmp (key, "platformbootingmode")) { if (strcasecmp (value, "performance") && strcasecmp (value, "power")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid platformbootingmode\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "performance")) platformbootingmode = IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_PERFORMANCE_OPTIMIZED_MODE; else /* !strcasecmp (value, "power") */ platformbootingmode = IPMI_OEM_INTEL_NODE_MANAGER_PLATFORM_BOOTING_MODE_BOOT_IN_POWER_OPTIMIZED_MODE; platformbootingmode_specified++; } else if (!strcasecmp (key, "correctiontimelimit")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &correctiontimelimit) < 0) goto cleanup; correctiontimelimit_specified++; } else if (!strcasecmp (key, "policytriggerlimit")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &policytriggerlimit) < 0) goto cleanup; policytriggerlimit_specified++; } else if (!strcasecmp (key, "statisticsreportingperiod")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &statisticsreportingperiod) < 0) goto cleanup; statisticsreportingperiod_specified++; } else if (!strcasecmp (key, "policystorage")) { if (strcasecmp (value, "persistent") && strcasecmp (value, "volatile")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy storage\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "persistent")) policystorage = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE; else policystorage = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_VOLATILE_MEMORY; policystorage_specified++; } else if (!strcasecmp (key, "policystate")) { if (strcasecmp (value, "enable") && strcasecmp (value, "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy state\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "enable")) policystate = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ENABLED; else policystate = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED; } else if (!strcasecmp (key, "policyexceptionaction")) { if (strcasecmp (value, "alert") && strcasecmp (value, "shutdown")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy exception action\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "alert")) policyexceptionaction_alert = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE; if (!strcasecmp (value, "shutdown")) policyexceptionaction_shutdown = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_ENABLE; } else if (!strcasecmp (key, "policypowerdomain")) { if (strcasecmp (value, "primary") && strcasecmp (value, "secondary")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid policy power domain\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "primary")) policypowerdomain = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_PRIMARY_SIDE_POWER_DOMAIN; else /* !strcasecmp (value, "secondary") */ policypowerdomain = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_POWER_DOMAIN_POWER_SECONDARY_SIDE_POWER_DOMAIN; } else if (!strcasecmp (key, "aggressivepowercorrection")) { if (strcasecmp (value, "automatic") && strcasecmp (value, "notaggressive") && strcasecmp (value, "aggressive")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid aggressive power correction\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "automatic")) aggressivepowercorrection = IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC; else if (!strcasecmp (value, "notaggressive")) aggressivepowercorrection = IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE; else /* !strcasecmp (value, "aggressive") */ aggressivepowercorrection = IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE; aggressivepowercorrection_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (!policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy ID must be specified\n"); goto cleanup; } if (!policytrigger_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy trigger type must be specified\n"); goto cleanup; } if (!policytargetlimit_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy target limit must be specified\n"); goto cleanup; } if (!correctiontimelimit_specified) { pstdout_fprintf (state_data->pstate, stderr, "correction time limit must be specified\n"); goto cleanup; } if (!statisticsreportingperiod_specified) { pstdout_fprintf (state_data->pstate, stderr, "statistics reporting period must be specified\n"); goto cleanup; } if (!policystorage_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy storage must be specified\n"); goto cleanup; } if ((policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER || policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT || policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER) && !policytriggerlimit_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy trigger limit must be specified for given policy trigger type\n"); goto cleanup; } if ((aggressivepowercorrection == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_NON_AGGRESSIVE || aggressivepowercorrection == IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AGGRESSIVE) && (domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM && domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM)) { pstdout_fprintf (state_data->pstate, stderr, "aggressive power correction cannot be set with given mode\n"); goto cleanup; } if (policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT) { if (policytargetlimit > 100) { pstdout_fprintf (state_data->pstate, stderr, "policy target limit out of range\n"); goto cleanup; } } if (policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_MISSING_POWER_READING_TIMEOUT || policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_TIME_AFTER_PLATFORM_RESET_TRIGGER) { /* User specifies in seconds, but we need to convert to 1/10th of seconds */ if (policytriggerlimit >= (USHRT_MAX / 10)) { pstdout_fprintf (state_data->pstate, stderr, "policy trigger limit out of range\n"); goto cleanup; } policytriggerlimit *= 10; } if (policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY) { if (!platformbootingmode_specified) { pstdout_fprintf (state_data->pstate, stderr, "platform booting mode must be specified for given policy trigger type\n"); goto cleanup; } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (policytrigger == IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_BOOT_TIME_POLICY) { if (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, policystate, policyid, policytrigger, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY, aggressivepowercorrection, policystorage, policyexceptionaction_alert, policyexceptionaction_shutdown, policypowerdomain, platformbootingmode, policytargetlimit, correctiontimelimit, policytriggerlimit, statisticsreportingperiod, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough1; } else { efallthrough1: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_boot_time_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } } else { if (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, policystate, policyid, policytrigger, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_ADD_POWER_POLICY, aggressivepowercorrection, policystorage, policyexceptionaction_alert, policyexceptionaction_shutdown, policypowerdomain, policytargetlimit, correctiontimelimit, policytriggerlimit, statisticsreportingperiod, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough2; } else { efallthrough2: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_remove_node_manager_policy (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policyid = 0; int policyid_specified = 0; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (!policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy ID must be specified\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_DISABLED, policyid, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_CONFIGURATION_ACTION_POLICY_POINTED_BY_POLICY_ID_SHALL_BE_REMOVED, /* all remaining bytes ignored, fill in with default-ish values */ IPMI_OEM_INTEL_NODE_MANAGER_AGGRESSIVE_CPU_POWER_CORRECTION_AUTOMATIC, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_STORAGE_PERSISTENT_STORAGE, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE, IPMI_OEM_INTEL_NODE_MANAGER_POLICY_EXCEPTION_ACTION_DISABLE, 0, 0, 0, 0, 0, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_output_header (ipmi_oem_state_data_t *state_data, uint8_t domain_id, uint8_t policy_id) { char domain_id_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); memset (domain_id_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); _ipmi_oem_intelnm_get_domain_id_str (state_data, domain_id, domain_id_str, IPMI_OEM_INTELNM_STRING_MAX); pstdout_printf (state_data->pstate, "Thresholds for Domain ID = %s, Policy ID = %u\n\n", domain_id_str, policy_id); } /* return 1 if output something, 0 if not, -1 on error */ static int _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_common (ipmi_oem_state_data_t *state_data, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, int searching_domain_id, int searching_policy_id) { fiid_obj_t alert_threshold_obj_cmd_rs = NULL; fiid_obj_t policy_obj_cmd_rs = NULL; uint8_t number_of_alert_thresholds = 0; uint16_t alert_threshold1 = 0; uint16_t alert_threshold2 = 0; uint16_t alert_threshold3 = 0; uint8_t policy_trigger_type = 0; char *policy_trigger_type_units_str = NULL; uint64_t val; int rv = -1; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); if (!(alert_threshold_obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domain_id, policy_id, alert_threshold_obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if (!state_data->prog_data->args->verbose_count) { if ((searching_domain_id && ipmi_check_completion_code (alert_threshold_obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID) == 1) || (searching_policy_id && ipmi_check_completion_code (alert_threshold_obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID) == 1)) { rv = 0; goto cleanup; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_output_header (state_data, domain_id, policy_id); if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, "Error", alert_threshold_obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough_alert_thresholds; } else { efallthrough_alert_thresholds: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_alert_thresholds: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } if ((searching_domain_id || searching_policy_id) && state_data->prog_data->args->verbose_count) rv = 1; goto cleanup; } if (FIID_OBJ_GET (alert_threshold_obj_cmd_rs, "number_of_alert_thresholds", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'number_of_alert_thresholds': %s\n", fiid_obj_errormsg (alert_threshold_obj_cmd_rs)); goto cleanup; } number_of_alert_thresholds = val; /* just in case */ if (number_of_alert_thresholds > IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_MAX) number_of_alert_thresholds = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_ALERT_THRESHOLDS_MAX; if (number_of_alert_thresholds) { if (number_of_alert_thresholds >= 1) { if (FIID_OBJ_GET (alert_threshold_obj_cmd_rs, "alert_threshold1", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'alert_threshold1': %s\n", fiid_obj_errormsg (alert_threshold_obj_cmd_rs)); goto cleanup; } alert_threshold1 = val; } if (number_of_alert_thresholds >= 2) { if (FIID_OBJ_GET (alert_threshold_obj_cmd_rs, "alert_threshold2", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'alert_threshold2': %s\n", fiid_obj_errormsg (alert_threshold_obj_cmd_rs)); goto cleanup; } alert_threshold2 = val; } if (number_of_alert_thresholds >= 3) { if (FIID_OBJ_GET (alert_threshold_obj_cmd_rs, "alert_threshold3", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'alert_threshold3': %s\n", fiid_obj_errormsg (alert_threshold_obj_cmd_rs)); goto cleanup; } alert_threshold3 = val; } if (!(policy_obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_policy (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domain_id, policy_id, policy_obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if (!state_data->prog_data->args->verbose_count) { if ((searching_domain_id && ipmi_check_completion_code (policy_obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID) == 1) || (searching_policy_id && ipmi_check_completion_code (policy_obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID) == 1)) { rv = 0; goto cleanup; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_output_header (state_data, domain_id, policy_id); if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, "Error", policy_obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough_policy; } else { efallthrough_policy: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_policy: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } if ((searching_domain_id || searching_policy_id) && state_data->prog_data->args->verbose_count) rv = 1; goto cleanup; } if (FIID_OBJ_GET (policy_obj_cmd_rs, "policy_trigger_type", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_trigger_type': %s\n", fiid_obj_errormsg (policy_obj_cmd_rs)); goto cleanup; } policy_trigger_type = val; switch (policy_trigger_type) { case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_NO_POLICY_TRIGGER: policy_trigger_type_units_str = "W"; break; case IPMI_OEM_INTEL_NODE_MANAGER_POLICY_TRIGGER_TYPE_INLET_TEMPERATURE_LIMIT_POLICY_TRIGGER: policy_trigger_type_units_str = "C"; break; default: policy_trigger_type_units_str = "?"; break; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_output_header (state_data, domain_id, policy_id); pstdout_printf (state_data->pstate, "Number of Alert Thresholds : %u\n", number_of_alert_thresholds); if (number_of_alert_thresholds >= 1) pstdout_printf (state_data->pstate, "Alert Threshold 1 : %u %s\n", alert_threshold1, policy_trigger_type_units_str); else pstdout_printf (state_data->pstate, "Alert Threshold 1 : N/A\n"); if (number_of_alert_thresholds >= 2) pstdout_printf (state_data->pstate, "Alert Threshold 2 : %u %s\n", alert_threshold2, policy_trigger_type_units_str); else pstdout_printf (state_data->pstate, "Alert Threshold 2 : N/A\n"); if (number_of_alert_thresholds >= 3) pstdout_printf (state_data->pstate, "Alert Threshold 3 : %u %s\n", alert_threshold3, policy_trigger_type_units_str); else pstdout_printf (state_data->pstate, "Alert Threshold 3 : N/A\n"); rv = 1; cleanup: fiid_obj_destroy (alert_threshold_obj_cmd_rs); fiid_obj_destroy (policy_obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds (ipmi_oem_state_data_t *state_data) { uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid_defaults_1_5[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM}; unsigned int domainid_defaults_1_5_len = 1; uint8_t domainid_defaults_2_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM}; unsigned int domainid_defaults_2_0_len = 4; uint8_t domainid_input[1]; uint8_t *domainid_array; unsigned int domainid_array_len; uint8_t policyid_min = 0; uint8_t policyid_max = 255; int domainid_specified = 0; int policyid_specified = 0; unsigned int i, j; int output_newline_flag = 0; uint8_t node_manager_version; int rv = -1; int ret; assert (state_data); if (state_data->prog_data->args->oem_options_count) { for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { uint8_t domainid_tmp; if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid_tmp) < 0) goto cleanup; domainid_input[0] = domainid_tmp; domainid_array = domainid_input; domainid_array_len = 1; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { uint8_t policyid_tmp; if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid_tmp) < 0) goto cleanup; policyid_min = policyid_tmp; policyid_max = policyid_tmp; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!domainid_specified) { if (_ipmi_oem_intelnm_get_node_manager_version_common (state_data, target_channel_number, target_slave_address, target_lun, &node_manager_version, NULL, NULL, NULL, NULL) < 0) goto cleanup; if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0) { domainid_array = domainid_defaults_2_0; domainid_array_len = domainid_defaults_2_0_len; } else { domainid_array = domainid_defaults_1_5; domainid_array_len = domainid_defaults_1_5_len; } } for (i = 0; i < domainid_array_len; i++) { for (j = policyid_min; j <= policyid_max; j++) { if (output_newline_flag) pstdout_printf (state_data->pstate, "\n"); if ((ret = _ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds_common (state_data, target_channel_number, target_slave_address, target_lun, domainid_array[i], j, domainid_specified ? 0 : 1, policyid_specified ? 0 : 1)) < 0) goto cleanup; if (ret > 0) output_newline_flag = 1; else output_newline_flag = 0; } } rv = 0; cleanup: return (rv); } int ipmi_oem_intelnm_set_node_manager_policy_alert_thresholds (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policyid = 0; int policyid_specified = 0; uint16_t threshold1 = 0; int threshold1_specified = 0; uint16_t threshold2 = 0; int threshold2_specified = 0; uint16_t threshold3 = 0; int threshold3_specified = 0; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 2); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else if (!strcasecmp (key, "threshold1")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &threshold1) < 0) goto cleanup; threshold1_specified++; } else if (!strcasecmp (key, "threshold2")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &threshold2) < 0) goto cleanup; threshold2_specified++; } else if (!strcasecmp (key, "threshold3")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &threshold3) < 0) goto cleanup; threshold3_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (!policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy ID must be specified\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, policyid, threshold1_specified ? &threshold1 : NULL, threshold2_specified ? &threshold2 : NULL, threshold3_specified ? &threshold3 : NULL, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_alert_thresholds: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static void _ipmi_oem_intelnm_get_node_manager_policy_suspend_periods_output_header (ipmi_oem_state_data_t *state_data, uint8_t domain_id, uint8_t policy_id) { char domain_id_str[IPMI_OEM_INTELNM_STRING_MAX + 1]; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); memset (domain_id_str, '\0', IPMI_OEM_INTELNM_STRING_MAX + 1); _ipmi_oem_intelnm_get_domain_id_str (state_data, domain_id, domain_id_str, IPMI_OEM_INTELNM_STRING_MAX); pstdout_printf (state_data->pstate, "Suspend Periods for Domain ID = %s, Policy ID = %u\n\n", domain_id_str, policy_id); } /* return 1 if output something, 0 if not, -1 on error */ static int _ipmi_oem_intelnm_get_node_manager_policy_suspend_periods_common (ipmi_oem_state_data_t *state_data, uint8_t target_channel_number, uint8_t target_slave_address, uint8_t target_lun, uint8_t domain_id, uint8_t policy_id, int searching_domain_id, int searching_policy_id) { fiid_obj_t obj_cmd_rs = NULL; uint8_t number_of_policy_suspend_periods = 0; uint8_t policy_suspend_start_time[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_stop_time[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_monday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_tuesday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_wednesday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_thursday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_friday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_saturday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_sunday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint64_t val; int rv = -1; unsigned int i; assert (state_data); assert (IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_VALID (domain_id)); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domain_id, policy_id, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if (!state_data->prog_data->args->verbose_count) { if ((searching_domain_id && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_DOMAIN_ID) == 1) || (searching_policy_id && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_OEM_INTEL_NODE_MANAGER_INVALID_POLICY_ID) == 1)) { rv = 0; goto cleanup; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_suspend_periods_output_header (state_data, domain_id, policy_id); if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, "Error", obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough_suspend_periods; } else { efallthrough_suspend_periods: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_policy_suspend_periods: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } if ((searching_domain_id || searching_policy_id) && state_data->prog_data->args->verbose_count) rv = 1; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_policy_suspend_periods", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'number_of_policy_suspend_periods': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_policy_suspend_periods = val; /* just in case */ if (number_of_policy_suspend_periods > IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX) number_of_policy_suspend_periods = IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX; if (number_of_policy_suspend_periods) { char start_time_field[IPMI_OEM_STR_BUFLEN + 1]; char stop_time_field[IPMI_OEM_STR_BUFLEN + 1]; char monday_field[IPMI_OEM_STR_BUFLEN + 1]; char tuesday_field[IPMI_OEM_STR_BUFLEN + 1]; char wednesday_field[IPMI_OEM_STR_BUFLEN + 1]; char thursday_field[IPMI_OEM_STR_BUFLEN + 1]; char friday_field[IPMI_OEM_STR_BUFLEN + 1]; char saturday_field[IPMI_OEM_STR_BUFLEN + 1]; char sunday_field[IPMI_OEM_STR_BUFLEN + 1]; for (i = 0; i < number_of_policy_suspend_periods; i++) { memset (start_time_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (stop_time_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (monday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (tuesday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (wednesday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (thursday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (friday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (saturday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); memset (sunday_field, '\0', IPMI_OEM_STR_BUFLEN + 1); snprintf (start_time_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_start_time", i + 1); snprintf (stop_time_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_stop_time", i + 1); snprintf (monday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.monday", i + 1); snprintf (tuesday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.tuesday", i + 1); snprintf (wednesday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.wednesday", i + 1); snprintf (thursday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.thursday", i + 1); snprintf (friday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.friday", i + 1); snprintf (saturday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.saturday", i + 1); snprintf (sunday_field, IPMI_OEM_STR_BUFLEN, "policy%d.suspend_period_recurrence.sunday", i + 1); if (FIID_OBJ_GET (obj_cmd_rs, start_time_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", start_time_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_start_time[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, stop_time_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", stop_time_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_stop_time[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, monday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", monday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_monday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, tuesday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", tuesday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_tuesday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, wednesday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", wednesday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_wednesday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, thursday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", thursday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_thursday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, friday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", friday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_friday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, saturday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", saturday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_saturday[i] = val; if (FIID_OBJ_GET (obj_cmd_rs, sunday_field, &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: '%s': %s\n", sunday_field, fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_suspend_period_recurrence_sunday[i] = val; } } if (searching_domain_id || searching_policy_id) _ipmi_oem_intelnm_get_node_manager_policy_suspend_periods_output_header (state_data, domain_id, policy_id); pstdout_printf (state_data->pstate, "Number of Policy Suspend Periods : %u\n", number_of_policy_suspend_periods); for (i = 0; i < IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX; i++) { if (number_of_policy_suspend_periods >= (i + 1)) { /* encoded as minutes starting from midnight divided by 6 */ if (!IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_START_TIME_VALID (policy_suspend_start_time[i])) pstdout_printf (state_data->pstate, "Policy %d Suspend Start Time : Invalid\n"); else pstdout_printf (state_data->pstate, "Policy %d Suspend Start Time : %02u:%02u\n", i + 1, (policy_suspend_start_time[i] * 6) / 60, (policy_suspend_start_time[i] * 6) % 60); if (!IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_STOP_TIME_VALID (policy_suspend_stop_time[i])) pstdout_printf (state_data->pstate, "Policy %d Suspend Stop Time : Invalid\n"); else pstdout_printf (state_data->pstate, "Policy %d Suspend Stop Time : %02u:%02u\n", i + 1, (policy_suspend_stop_time[i] * 6) / 60, (policy_suspend_stop_time[i] * 6) % 60); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Monday : %s\n", i + 1, policy_suspend_period_recurrence_monday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Tuesday : %s\n", i + 1, policy_suspend_period_recurrence_tuesday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Wednesday : %s\n", i + 1, policy_suspend_period_recurrence_wednesday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Thursday : %s\n", i + 1, policy_suspend_period_recurrence_thursday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Friday : %s\n", i + 1, policy_suspend_period_recurrence_friday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Saturday : %s\n", i + 1, policy_suspend_period_recurrence_saturday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Sunday : %s\n", i + 1, policy_suspend_period_recurrence_sunday[i] == IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD ? "Yes" : "No"); } else { pstdout_printf (state_data->pstate, "Policy %d Suspend Start Time : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Stop Time : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Monday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Tuesday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Wednesday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Thursday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Friday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Saturday : N/A\n", i + 1); pstdout_printf (state_data->pstate, "Policy %d Suspend Repeat on Sunday : N/A\n", i + 1); } } rv = 1; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_node_manager_policy_suspend_periods (ipmi_oem_state_data_t *state_data) { uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid_defaults_1_5[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM}; unsigned int domainid_defaults_1_5_len = 1; uint8_t domainid_defaults_2_0[] = {IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM, IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_HIGH_POWER_IO_SUBSYSTEM}; unsigned int domainid_defaults_2_0_len = 4; uint8_t domainid_input[1]; uint8_t *domainid_array; unsigned int domainid_array_len; uint8_t policyid_min = 0; uint8_t policyid_max = 255; int domainid_specified = 0; int policyid_specified = 0; unsigned int i, j; int output_newline_flag = 0; uint8_t node_manager_version; int rv = -1; int ret; assert (state_data); if (state_data->prog_data->args->oem_options_count) { int i; for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { uint8_t domainid_tmp; if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid_tmp) < 0) goto cleanup; domainid_input[0] = domainid_tmp; domainid_array = domainid_input; domainid_array_len = 1; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { uint8_t policyid_tmp; if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid_tmp) < 0) goto cleanup; policyid_min = policyid_tmp; policyid_max = policyid_tmp; policyid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!domainid_specified) { if (_ipmi_oem_intelnm_get_node_manager_version_common (state_data, target_channel_number, target_slave_address, target_lun, &node_manager_version, NULL, NULL, NULL, NULL) < 0) goto cleanup; if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5 || node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0) { domainid_array = domainid_defaults_2_0; domainid_array_len = domainid_defaults_2_0_len; } else { domainid_array = domainid_defaults_1_5; domainid_array_len = domainid_defaults_1_5_len; } } for (i = 0; i < domainid_array_len; i++) { for (j = policyid_min; j <= policyid_max; j++) { if (output_newline_flag) pstdout_printf (state_data->pstate, "\n"); if ((ret = _ipmi_oem_intelnm_get_node_manager_policy_suspend_periods_common (state_data, target_channel_number, target_slave_address, target_lun, domainid_array[i], j, domainid_specified ? 0 : 1, policyid_specified ? 0 : 1)) < 0) goto cleanup; if (ret > 0) output_newline_flag = 1; else output_newline_flag = 0; } } rv = 0; cleanup: return (rv); } static int _parse_suspend_period_number (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *str, unsigned int *suspend_period_number) { unsigned int temp; char *ptr = NULL; assert (state_data); assert (str); assert (suspend_period_number); errno = 0; temp = strtoul (str, &ptr, 10); if (errno || ptr[0] != '\0' || !temp || temp > IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM suspend period number '%s' in '%s', max allowed '%u'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, str, state_data->prog_data->args->oem_options[option_num], IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX); return (-1); } (*suspend_period_number) = temp; return (0); } static int _parse_suspend_period_time (ipmi_oem_state_data_t *state_data, unsigned int option_num, const char *value, uint8_t *suspend_period_time) { char buf[IPMI_OEM_STR_BUFLEN + 1]; unsigned int hours; unsigned int minutes; char *minutes_ptr = NULL; char *ptr = NULL; assert (state_data); assert (value); assert (suspend_period_time); memset (buf, '\0', IPMI_OEM_STR_BUFLEN + 1); strncpy (buf, value, IPMI_OEM_STR_BUFLEN); if (!(minutes_ptr = strchr (buf, ':'))) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid time specified '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, value); return (-1); } (*minutes_ptr) = '\0'; minutes_ptr++; errno = 0; hours = strtoul (buf, &ptr, 10); if (errno || ptr[0] != '\0' || hours > 23) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid hours specified in '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, value); return (-1); } errno = 0; minutes = strtoul (buf, &ptr, 10); if (errno || ptr[0] != '\0' || minutes > 59) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid minutes specified in '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, value); return (-1); } /* encoded by dividing minutes since midnight by 6 */ (*suspend_period_time) = ((hours * 60) + minutes) / 6; return (0); } int ipmi_oem_intelnm_set_node_manager_policy_suspend_periods (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policyid = 0; int policyid_specified = 0; uint8_t policy_suspend_start_time[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; int policy_suspend_start_time_specified[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_stop_time[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; int policy_suspend_stop_time_specified[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_monday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_tuesday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_wednesday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_thursday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_friday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_saturday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; uint8_t policy_suspend_period_recurrence_sunday[IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX]; unsigned int suspend_period_number; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 2); /* initialize */ memset (policy_suspend_start_time_specified, '\0', sizeof (int) * IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX); memset (policy_suspend_stop_time_specified, '\0', sizeof (int) * IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX); for (i = 0; i < IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX; i++) { policy_suspend_period_recurrence_monday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_tuesday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_wednesday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_thursday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_friday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_saturday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; policy_suspend_period_recurrence_sunday[i] = IPMI_OEM_INTEL_NODE_MANAGER_DO_NOT_REPEAT_THE_SUSPEND_PERIOD; } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "policyid")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &policyid) < 0) goto cleanup; policyid_specified++; } else if (!strncasecmp (key, "suspendperiodstart", 18)) { if (_parse_suspend_period_number (state_data, i, key + 18, &suspend_period_number) < 0) goto cleanup; if (_parse_suspend_period_time (state_data, i, value, &policy_suspend_start_time[suspend_period_number - 1]) < 0) goto cleanup; policy_suspend_start_time_specified[suspend_period_number - 1]++; } else if (!strncasecmp (key, "suspendperiodstop", 17)) { if (_parse_suspend_period_number (state_data, i, key + 17, &suspend_period_number) < 0) goto cleanup; if (_parse_suspend_period_time (state_data, i, value, &policy_suspend_stop_time[suspend_period_number - 1]) < 0) goto cleanup; policy_suspend_stop_time_specified[suspend_period_number - 1]++; } else if (!strncasecmp (key, "suspendperiodrepeat", 19)) { if (_parse_suspend_period_number (state_data, i, key + 19, &suspend_period_number) < 0) goto cleanup; if (strcasecmp (value, "monday") && strcasecmp (value, "tuesday") && strcasecmp (value, "wednesday") && strcasecmp (value, "thursday") && strcasecmp (value, "friday") && strcasecmp (value, "saturday") && strcasecmp (value, "sunday")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid day\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "monday")) policy_suspend_period_recurrence_monday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else if (! strcasecmp (value, "tuesday")) policy_suspend_period_recurrence_tuesday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else if (! strcasecmp (value, "wednesday")) policy_suspend_period_recurrence_wednesday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else if (! strcasecmp (value, "thursday")) policy_suspend_period_recurrence_thursday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else if (! strcasecmp (value, "friday")) policy_suspend_period_recurrence_friday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else if (! strcasecmp (value, "saturday")) policy_suspend_period_recurrence_saturday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; else /* strcasecmp (value, "sunday") */ policy_suspend_period_recurrence_sunday[suspend_period_number - 1] = IPMI_OEM_INTEL_NODE_MANAGER_REPEAT_THE_SUSPEND_PERIOD; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (!policyid_specified) { pstdout_fprintf (state_data->pstate, stderr, "policy ID must be specified\n"); goto cleanup; } /* various error checks */ for (i = 0; i < IPMI_OEM_INTEL_NODE_MANAGER_POLICY_SUSPEND_PERIODS_MAX; i++) { if ((policy_suspend_start_time_specified[i] && !policy_suspend_stop_time_specified[i]) || (!policy_suspend_start_time_specified[i] && policy_suspend_stop_time_specified[i])) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid setup, must specify start and stop suspend time for suspend policy '%u'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, i + 1); goto cleanup; } if (policy_suspend_stop_time[i] < policy_suspend_start_time[i]) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid setup, must specify stop time after start time for suspend policy '%u'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, i + 1); goto cleanup; } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* We've done error checks already, so we will use policy_suspend_start_time_specified[] as the flag * for all determinations if we pass a pointer argument or NULL */ if (ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, policyid, policy_suspend_start_time_specified[0] ? &policy_suspend_start_time[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_stop_time[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_monday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_tuesday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_wednesday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_thursday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_friday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_saturday[0] : NULL, policy_suspend_start_time_specified[0] ? &policy_suspend_period_recurrence_sunday[0] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_start_time[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_stop_time[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_monday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_tuesday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_wednesday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_thursday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_friday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_saturday[1] : NULL, policy_suspend_start_time_specified[1] ? &policy_suspend_period_recurrence_sunday[1] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_start_time[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_stop_time[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_monday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_tuesday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_wednesday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_thursday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_friday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_saturday[2] : NULL, policy_suspend_start_time_specified[2] ? &policy_suspend_period_recurrence_sunday[2] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_start_time[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_stop_time[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_monday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_tuesday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_wednesday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_thursday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_friday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_saturday[3] : NULL, policy_suspend_start_time_specified[3] ? &policy_suspend_period_recurrence_sunday[3] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_start_time[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_stop_time[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_monday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_tuesday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_wednesday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_thursday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_friday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_saturday[4] : NULL, policy_suspend_start_time_specified[4] ? &policy_suspend_period_recurrence_sunday[4] : NULL, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_policy_suspend_periods: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_set_node_manager_power_draw_range (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint16_t minpowerdrawrange = 0; int minpowerdrawrange_specified = 0; uint16_t maxpowerdrawrange = 0; int maxpowerdrawrange_specified = 0; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 3); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else if (!strcasecmp (key, "minpowerdrawrange")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &minpowerdrawrange) < 0) goto cleanup; minpowerdrawrange_specified++; } else if (!strcasecmp (key, "maxpowerdrawrange")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &maxpowerdrawrange) < 0) goto cleanup; maxpowerdrawrange_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (!minpowerdrawrange_specified) { pstdout_fprintf (state_data->pstate, stderr, "Min Power Draw Range must be specified\n"); goto cleanup; } if (!maxpowerdrawrange_specified) { pstdout_fprintf (state_data->pstate, stderr, "Max Power Draw Range must be specified\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_power_draw_range_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_set_node_manager_power_draw_range (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, minpowerdrawrange, maxpowerdrawrange, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_power_draw_range: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } #if 0 /* can't verify */ int ipmi_oem_intelnm_get_limiting_policy_id (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t domainid = IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM; int domainid_specified = 0; uint8_t policy_id; uint64_t val; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "domainid")) { if (_ipmi_oem_intelnm_parse_domainid (state_data, i, value, &domainid) < 0) goto cleanup; domainid_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!domainid_specified) { pstdout_fprintf (state_data->pstate, stderr, "domain ID must be specified\n"); goto cleanup; } if (domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_ENTIRE_PLATFORM && domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_CPU_SUBSYSTEM && domainid != IPMI_OEM_INTEL_NODE_MANAGER_DOMAIN_ID_MEMORY_SUBSYSTEM) { pstdout_fprintf (state_data->pstate, stderr, "domain ID illegal for this command\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_limiting_policy_id_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_limiting_policy_id (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, domainid, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_limiting_policy_id: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "policy_id", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'policy_id': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } policy_id = val; pstdout_printf (state_data->pstate, "Limiting Policy ID: %u\n", policy_id); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } #endif int ipmi_oem_intelnm_get_node_manager_alert_destination (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t channel_number; uint8_t alert_receiver_deactivation; uint8_t destination_selector; uint8_t alert_string_selector; uint8_t send_alert_string; uint64_t val; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_node_manager_alert_destination_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_node_manager_alert_destination (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_node_manager_alert_destination: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "channel_number", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'channel_number': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } channel_number = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_receiver_deactivation", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'alert_receiver_deactivation': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } alert_receiver_deactivation = val; if (FIID_OBJ_GET (obj_cmd_rs, "destination_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'destination_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } destination_selector = val; if (FIID_OBJ_GET (obj_cmd_rs, "alert_string_selector", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'alert_string_selector': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } alert_string_selector = val; if (FIID_OBJ_GET (obj_cmd_rs, "send_alert_string", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'send_alert_string': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } send_alert_string = val; pstdout_printf (state_data->pstate, "Channel Number : %u\n", channel_number); pstdout_printf (state_data->pstate, "Alert Receiver : %s\n", alert_receiver_deactivation == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER ? "Registered" : "Unregistered"); pstdout_printf (state_data->pstate, "Destination Selector : %u\n", destination_selector); pstdout_printf (state_data->pstate, "Alert String Selector : %u\n", alert_string_selector); pstdout_printf (state_data->pstate, "Send Alert String : %s\n", send_alert_string == IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING ? "No" : "Yes"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_set_node_manager_alert_destination (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t channelnumber= 0; int channelnumber_specified= 0; /* registerX b/c register is a C keyword */ uint8_t registerX = IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER; int registerX_specified= 0; uint8_t slaveaddress= 0; int slaveaddress_specified= 0; uint8_t destinationselector= 0; int destinationselector_specified= 0; uint8_t alertstringselector= 0; int alertstringselector_specified= 0; uint8_t sendalertstring= 0; int sendalertstring_specified= 0; int rv = -1; int ret; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "channelnumber")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &channelnumber) < 0) goto cleanup; if (!IPMI_CHANNEL_NUMBER_VALID (channelnumber)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid channel number\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } channelnumber_specified++; } else if (!strcasecmp (key, "slaveaddress")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &slaveaddress) < 0) goto cleanup; slaveaddress_specified++; } else if (!strcasecmp (key, "destinationselector")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &destinationselector) < 0) goto cleanup; destinationselector_specified++; } else if (!strcasecmp (key, "alertstringselector")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &alertstringselector) < 0) goto cleanup; alertstringselector_specified++; } else if (!strcasecmp (key, "register")) { if (strcasecmp (value, "yes") && strcasecmp (value, "no")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value - specify yes or not\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "yes")) registerX = IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER; else registerX = IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER; registerX_specified++; } else if (!strcasecmp (key, "sendalertstring")) { if (strcasecmp (value, "yes") && strcasecmp (value, "no")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value - specify yes or not\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "yes")) sendalertstring = IPMI_OEM_INTEL_NODE_MANAGER_SEND_ALERT_STRING_IDENTIFIED_BY_STRING_SELECTOR; else sendalertstring = IPMI_OEM_INTEL_NODE_MANAGER_DONT_SEND_AN_ALERT_STRING; sendalertstring_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (registerX == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_REGISTER_ALERT_RECEIVER) { if (!channelnumber_specified) { pstdout_fprintf (state_data->pstate, stderr, "channel number must be specified if registering alert receiver\n"); goto cleanup; } if (!alertstringselector_specified) { pstdout_fprintf (state_data->pstate, stderr, "alert string selector must be specified if registering alert receiver\n"); goto cleanup; } if (!sendalertstring_specified) { pstdout_fprintf (state_data->pstate, stderr, "send alert string must be specified if registering alert receiver\n"); goto cleanup; } if (!slaveaddress_specified && !destinationselector_specified) { pstdout_fprintf (state_data->pstate, stderr, "slave address or destination selector must be specified\n"); goto cleanup; } if (slaveaddress_specified && destinationselector_specified) { pstdout_fprintf (state_data->pstate, stderr, "only one of slave address and destination selector can be specified\n"); goto cleanup; } } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_node_manager_alert_destination_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (registerX == IPMI_OEM_INTEL_NODE_MANAGER_ALERT_RECEIVER_DEACTIVATION_UNREGISTER_ALERT_RECEIVER) ret = ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, 0, registerX, 0, 0, 0, obj_cmd_rs); else { if (destinationselector_specified) ret = ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, channelnumber, registerX, destinationselector, alertstringselector, sendalertstring, obj_cmd_rs); else ret = ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination_ipmb (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, channelnumber, registerX, slaveaddress, alertstringselector, sendalertstring, obj_cmd_rs); } if (ret < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_node_manager_alert_destination: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_turbo_synchronization_ratio (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t cpu_socket_number = IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS; int cpu_socket_number_specified = 0; uint8_t active_cores_configuration; int active_cores_configuration_specified = 0; uint8_t current_turbo_ratio_limit; uint8_t default_turbo_ratio_limit; uint8_t maximum_turbo_ratio_limit; uint8_t minimum_turbo_ratio_limit; uint64_t val; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "cpusocket")) { if (!strcasecmp (value, "all")) { cpu_socket_number = IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS; cpu_socket_number_specified++; } else { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &cpu_socket_number) < 0) goto cleanup; if (!IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID(cpu_socket_number)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid cpu socket number\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } cpu_socket_number_specified++; } } else if (!strcasecmp (key, "activecoresconfig")) { if (!strcasecmp (value, "all")) { active_cores_configuration = IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION; active_cores_configuration_specified++; } else { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &active_cores_configuration) < 0) goto cleanup; if (!IPMI_OEM_INTEL_NODE_MANAGER_GET_ACTIVE_CORES_CONFIGURATION_VALID(active_cores_configuration)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid active cores configuration\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } } active_cores_configuration_specified++; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!active_cores_configuration_specified) { pstdout_fprintf (state_data->pstate, stderr, "active cores configuration must be specified\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, cpu_socket_number, active_cores_configuration, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_get_turbo_synchronization_ratio: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "current_turbo_ratio_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'current_turbo_ratio_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } current_turbo_ratio_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "default_turbo_ratio_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'default_turbo_ratio_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } default_turbo_ratio_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "maximum_turbo_ratio_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'maximum_turbo_ratio_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } maximum_turbo_ratio_limit = val; if (FIID_OBJ_GET (obj_cmd_rs, "minimum_turbo_ratio_limit", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'minimum_turbo_ratio_limit': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minimum_turbo_ratio_limit = val; pstdout_printf (state_data->pstate, "Current Turbo Ratio Limit : %u\n", current_turbo_ratio_limit); pstdout_printf (state_data->pstate, "Default Turbo Ratio Limit : %u\n", default_turbo_ratio_limit); pstdout_printf (state_data->pstate, "Maximum Turbo Ratio Limit : %u\n", maximum_turbo_ratio_limit); pstdout_printf (state_data->pstate, "Minimum Turbo Ratio Limit : %u\n", minimum_turbo_ratio_limit); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_set_turbo_synchronization_ratio (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t cpu_socket_number = IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS; int cpu_socket_number_specified = 0; uint8_t active_cores_configuration; int active_cores_configuration_specified = 0; uint8_t turbo_ratio_limit; int turbo_ratio_limit_specified = 0; int rv = -1; unsigned int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "cpusocket")) { if (!strcasecmp (value, "all")) { cpu_socket_number = IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_ALL_SOCKETS; cpu_socket_number_specified++; } else { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &cpu_socket_number) < 0) goto cleanup; if (!IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID(cpu_socket_number)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid cpu socket number\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } cpu_socket_number_specified++; } } else if (!strcasecmp (key, "activecoresconfig")) { if (!strcasecmp (value, "all")) { active_cores_configuration = IPMI_OEM_INTEL_NODE_MANAGER_ACTIVE_CORES_CONFIGURATION_APPLY_SETTINGS_TO_ALL_ACTIVE_CORES_CONFIGURATION; active_cores_configuration_specified++; } else { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &active_cores_configuration) < 0) goto cleanup; if (!IPMI_OEM_INTEL_NODE_MANAGER_SET_ACTIVE_CORES_CONFIGURATION_VALID(active_cores_configuration)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid active cores configuration\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } active_cores_configuration_specified++; } } else if (!strcasecmp (key, "turboratiolimit")) { if (!strcasecmp (value, "default")) { turbo_ratio_limit = IPMI_OEM_INTEL_NODE_MANAGER_TURBO_RATIO_LIMIT_RESTORE_DEFAULT_SETTINGS; turbo_ratio_limit_specified++; } else { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &turbo_ratio_limit) < 0) goto cleanup; if (!IPMI_OEM_INTEL_NODE_MANAGER_CPU_SOCKET_VALID(turbo_ratio_limit)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid cpu socket number\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } turbo_ratio_limit_specified++; } } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid option\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } if (!turbo_ratio_limit_specified) { pstdout_fprintf (state_data->pstate, stderr, "turbo ratio limit must be specified\n"); goto cleanup; } if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio (state_data->ipmi_ctx, target_channel_number, target_slave_address, target_lun, cpu_socket_number, active_cores_configuration, turbo_ratio_limit, obj_cmd_rs) < 0) { if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE) { int eret; if ((eret = _ipmi_oem_intelnm_bad_completion_code (state_data, NULL, obj_cmd_rs)) < 0) goto cleanup; if (!eret) goto efallthrough; } else { efallthrough: pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_oem_intel_node_manager_set_turbo_synchronization_ratio: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); } goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_intelnm_get_node_manager_version (ipmi_oem_state_data_t *state_data) { uint8_t target_channel_number = 0; uint8_t target_slave_address = 0; uint8_t target_lun = 0; uint8_t node_manager_version; uint8_t ipmi_interface_version; uint8_t patch_version; uint8_t major_firmware_revision; uint8_t minor_firmware_revision; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (_ipmi_oem_intelnm_node_manager_init (state_data, &target_channel_number, &target_slave_address, &target_lun) < 0) goto cleanup; if (_ipmi_oem_intelnm_get_node_manager_version_common (state_data, target_channel_number, target_slave_address, target_lun, &node_manager_version, &ipmi_interface_version, &patch_version, &major_firmware_revision, &minor_firmware_revision) < 0) goto cleanup; if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_0) pstdout_printf (state_data->pstate, "Node Manager Version : 1.0\n"); else if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_1_5) pstdout_printf (state_data->pstate, "Node Manager Version : 1.5\n"); else if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_0) pstdout_printf (state_data->pstate, "Node Manager Version : 2.0\n"); else if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_2_5) pstdout_printf (state_data->pstate, "Node Manager Version : 2.5\n"); else if (node_manager_version == IPMI_OEM_INTEL_NODE_MANAGER_VERSION_3_0) pstdout_printf (state_data->pstate, "Node Manager Version : 3.0\n"); else pstdout_printf (state_data->pstate, "Node Manager Version : %02Xh\n", node_manager_version); if (ipmi_interface_version == IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_1_0) pstdout_printf (state_data->pstate, "IPMI Interface Version : 1.0\n"); else if (ipmi_interface_version == IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_2_0) pstdout_printf (state_data->pstate, "IPMI Interface Version : 2.0\n"); else if (ipmi_interface_version == IPMI_OEM_INTEL_NODE_MANAGER_IPMI_INTERFACE_VERSION_3_0) pstdout_printf (state_data->pstate, "IPMI Interface Version : 3.0\n"); else pstdout_printf (state_data->pstate, "IPMI Interface Version : %02Xh\n", ipmi_interface_version); pstdout_printf (state_data->pstate, "Patch Version : %u\n", patch_version); /* minor firmware revision is BCD */ pstdout_printf (state_data->pstate, "Firmware Revision : %u.%02X\n", major_firmware_revision, minor_firmware_revision); rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-intelnm.h0000644002055400205540000000465113527331635020335 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INTELNM_H #define IPMI_OEM_INTELNM_H #include "ipmi-oem.h" int ipmi_oem_intelnm_get_node_manager_statistics (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_reset_node_manager_statistics (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_node_manager_capabilities (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_node_manager_policy_control (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_node_manager_policy (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_node_manager_policy (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_remove_node_manager_policy (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_node_manager_policy_alert_thresholds (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_node_manager_policy_alert_thresholds (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_node_manager_policy_suspend_periods (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_node_manager_policy_suspend_periods (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_node_manager_power_draw_range (ipmi_oem_state_data_t *state_data); #if 0 /* can't verify */ int ipmi_oem_intelnm_get_limiting_policy_id (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_intelnm_get_node_manager_alert_destination (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_node_manager_alert_destination (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_turbo_synchronization_ratio (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_set_turbo_synchronization_ratio (ipmi_oem_state_data_t *state_data); int ipmi_oem_intelnm_get_node_manager_version (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_INTELNM_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-inventec.c0000644002055400205540000026717313527331635020507 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-inventec.h" #include "ipmi-oem-thirdparty.h" #include "freeipmi-portability.h" #include "pstdout.h" /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Copy Image Data Request * * 0x08 - network function * 0x03 - OEM cmd * 0x?? - In Progress * - 00h - data transmission is in progress * - 01h = data transmission completed * bytes 3:6 - image offset to be copied * bytes 7:N - image data to be copied * * Copy Image Data Response * * 0x03 - OEM cmd * 0x?? - Completion Code */ /* Inventec 5442/Dell Xanadu III OEM * * Following appear to be too hardware specific, just putting it here * for documentation. * * Set Fan Control Request * * 0x34 - network function * 0x61 - OEM cmd * 0x?? - fan control setting * 0:6 - cuty cycle setting, 0-100 * 7 - enabled/disabled fan control ; 0 - disable, 1 - enable * * Set Fan Control Response * * 0x61 - OEM cmd * 0x?? - Completion Code * * Get Fan Control Request * * 0x34 - network function * 0x62 - OEM cmd * * Get Fan Control Response * * 0x62 - OEM cmd * 0x?? - Completion Code * 0x?? - fan control setting * 0:6 - cuty cycle setting, 0-100 * 7 - enabled/disabled fan control ; 0 - disable, 1 - enable * * Set FSC Table Request * * 0x34 - network function * 0x63 - OEM cmd * 0x?? - FSC Table Setting * 0:6 - fan table settings * - 0x80 - 1st FSC fan table (default : 13800 RPM) * - 0x81 - 2nd FSC fan table (FACEBOOK) * - 0x82 - 3rd FSC fan table (Oscillation) * - 0x83 - 4th FSC fan table (Western Geco) * - 0x84 - 5th FSC fan table (Loki) * * Set FSC Table Response * * 0x63 - OEM cmd * 0x?? - Completion Code * * Get FSC Table Request * * 0x34 - network function * 0x64 - OEM cmd * * Get FSC Table Response * * 0x64 - OEM cmd * 0x?? - Completion Code * 0x?? - FSC Table Setting * 0:6 - fan table settings * - 0x80 - 1st FSC fan table (default : 13800 RPM) * - 0x81 - 2nd FSC fan table (FACEBOOK) * - 0x82 - 3rd FSC fan table (Oscillation) * - 0x83 - 4th FSC fan table (Western Geco) * - 0x84 - 5th FSC fan table (Loki) * * Get FCB SKU Info Request * * 0x34 - network function * 0x6A - OEM cmd * * Get FCB SKU Info Response * * 0x6A - OEM cmd * 0x?? - Completion Code * 0x?? - FCB SKU Information * * Get FCB Power Throttling Status Request * * 0x34 - network function * 0x6B - OEM cmd * * Get FCB Power Throttling Status Response * * 0x6B - OEM cmd * 0x?? - Completion Code * 0x?? - FCB Power Throttling status * * OEM Get PIC Model Request * * 0x34 - network function * 0x70 - OEM cmd * * OEM Get PIC Model Response * * 0x70 - OEM cmd * 0x?? - Completion Code * 0x?? - PIC model * 0x10 - PIC16 * 0x12 - PIC18 * * OEM Set Flash Pin Request * * 0x34 - network function * 0x71 - OEM cmd * 0x?? - Pin Number * 0x?? - Value * * OEM Set Flash Pin Response * * 0x71 - OEM cmd * 0x?? - Completion Code * * OEM Get Flash Pin Request * * 0x34 - network function * 0x72 - OEM cmd * 0x?? - Pin Number * * OEM Get Flash Pin Response * * 0x72 - OEM cmd * 0x?? - Completion Code * 0x?? - Pin Value * * OEM New Master Write Read Request * * 0x34 - network function * 0x73 - OEM cmd * 0x?? - slave address * 0x?? - read count * 3:52 - data * * OEM New Master Write Read Response * * 0x73 - OEM cmd * 0x?? - Completion Code * 2:51 - data * * Set Power Throttling Behavior Request * * 0x34 - network function * 0xB1 - OEM cmd * 0x?? - Power Throttling Enable (01h - enable) * 0x?? - Power Capping Enable (01h - enable) * 0x?? - Current Chassi Power Capping Value (low byte) * 0x?? - Current Chassis Power Capping Value (high byte) * 0x?? - Power Capping Max Value (low byte) * 0x?? - Power Capping Max Value (high byte) * * Set Power Throttling Behavior Response * * 0xB1 - OEM cmd * 0x?? - Completion Code * * Get Power Throttling Behavior Request * * 0x34 - network function * 0xB2 - OEM cmd * * Get Power Throttling Behavior Response * * 0xB2 - OEM cmd * 0x?? - Completion Code * 0x?? - Power Throttling Enable (01h - enable) * 0x?? - Power Capping Enable (01h - enable) * 0x?? - Current Chassi Power Capping Value (low byte) * 0x?? - Current Chassis Power Capping Value (high byte) * 0x?? - Power Capping Max Value (low byte) * 0x?? - Power Capping Max Value (high byte) * * Get PSU Mismatch and Type Request * * 0x34 - network function * 0xB3 - OEM cmd * * Get PSU Mismatch and Type Response * * 0xB3 - OEM cmd * 0x?? - Completion Code * 0x?? - PSU Mismatch * - 00h - mismatch * - 01h - match * 0x?? - PSU Type * - 0:3 - PSU1 type * - 4:7 - PSU2 type * 01h = 470 watt * 02h = 750 watt * 03h = 1100 watt * 04h = 1400 watt */ #define IPMI_OEM_INVENTEC_MAX_MACADDRLEN 24 #define IPMI_OEM_INVENTEC_EEPROM_AT24C256N_SLAVE_ADDRESS 0x53 #define IPMI_OEM_INVENTEC_EEPROM_AT24C256N_BUS_ID 2 #define IPMI_OEM_INVENTEC_EEPROM_AT24C256N_ADDRESS_MIN 0x0000 #define IPMI_OEM_INVENTEC_EEPROM_AT24C256N_ADDRESS_MAX 0x7FFF #define IPMI_OEM_INVENTEC_EEPROM_AT24C256N_CLEAR_BYTE 0xFF #define IPMI_OEM_BUFLEN 1024 int ipmi_oem_inventec_get_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_nic_mode (state_data)); } int ipmi_oem_inventec_set_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_nic_mode (state_data)); } int ipmi_oem_inventec_get_mac_address (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; char mac_address_str[IPMI_OEM_INVENTEC_MAX_MACADDRLEN+1]; uint8_t mac_address_bytes[6]; uint8_t lan_channel_number; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Use normal IPMI to get the MAC address. This is offered more as * a convenience to the user rather, so there is always a "get" and * a "set" command in ipmi-oem. */ if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_mac_address_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters_mac_address (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_SET_SELECTOR, IPMI_LAN_CONFIGURATION_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters_mac_address: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (obj_cmd_rs, "mac_address", mac_address_bytes, 6) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'mac_address': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (mac_address_str, '\0', IPMI_OEM_INVENTEC_MAX_MACADDRLEN+1); snprintf (mac_address_str, IPMI_OEM_INVENTEC_MAX_MACADDRLEN, "%02X:%02X:%02X:%02X:%02X:%02X", mac_address_bytes[0], mac_address_bytes[1], mac_address_bytes[2], mac_address_bytes[3], mac_address_bytes[4], mac_address_bytes[5]); pstdout_printf (state_data->pstate, "%s\n", mac_address_str); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_set_mac_address (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; unsigned int tmp; uint8_t cmd; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "shared") && strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (sscanf (state_data->prog_data->args->oem_options[1], "%02x:%02x:%02x:%02x:%02x:%02x", &tmp, &tmp, &tmp, &tmp, &tmp, &tmp) != 6) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Set MAC Address Request * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x21 | 0x23 - OEM cmd - 0x21 = dedicated, 0x23 = shared * bytes 1-17: MAC address in ASCII (including semicolons) * 0x00 - sentinel value 0x00 * * Set MAC Address Response * * 0x21 | 0x23 - OEM cmd - 0x21 = dedicated, 0x23 = shared * 0x?? - Completion Code */ if (!strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) cmd = IPMI_CMD_OEM_INVENTEC_SET_DEDICATED_MAC_ADDRESS; else cmd = IPMI_CMD_OEM_INVENTEC_SET_SHARED_MAC_ADDRESS; bytes_rq[0] = cmd; memcpy (&bytes_rq[1], state_data->prog_data->args->oem_options[1], 17); bytes_rq[18] = 0x00; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 19, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, cmd, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_get_bmc_services (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_bmc_services_v1 (state_data)); } int ipmi_oem_inventec_set_bmc_services (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); return (ipmi_oem_thirdparty_set_bmc_services_v1 (state_data)); } int ipmi_oem_inventec_get_authentication_config (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t maxauthenticationfailures; uint16_t lockoutwindow; uint16_t lockouttime; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_MAX_AUTHENTICATION_FAILURES, 0, 1, &tmpvalue) < 0) goto cleanup; maxauthenticationfailures = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_WINDOW, 0, 2, &tmpvalue) < 0) goto cleanup; lockoutwindow = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_TIME, 0, 2, &tmpvalue) < 0) goto cleanup; lockouttime = tmpvalue; pstdout_printf (state_data->pstate, "Max Authentication Failures : %u\n", maxauthenticationfailures); pstdout_printf (state_data->pstate, "Lockout Window : %u seconds\n", lockoutwindow); pstdout_printf (state_data->pstate, "Lockout Time : %u seconds\n", lockouttime); rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_set_authentication_config (ipmi_oem_state_data_t *state_data) { uint8_t maxauthenticationfailures = 0; uint16_t lockoutwindow = 0; uint16_t lockouttime = 0; int rv = -1; unsigned int i; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: maxauthenticationfailures=count\n" "Option: lockoutwindow=seconds\n" "Option: lockouttime=seconds\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "maxauthenticationfailures")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &maxauthenticationfailures) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_MAX_AUTHENTICATION_FAILURES, 0, 1, (uint32_t)maxauthenticationfailures) < 0) goto cleanup; } else if (!strcasecmp (key, "lockoutwindow")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &lockoutwindow) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_WINDOW, 0, 2, (uint32_t)lockoutwindow) < 0) goto cleanup; } else if (!strcasecmp (key, "lockouttime")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &lockouttime) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_LOCKOUT_TIME, 0, 2, (uint32_t)lockouttime) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_get_account_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_account_status (state_data)); } int ipmi_oem_inventec_get_dns_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_dns_config_v1 (state_data)); } int ipmi_oem_inventec_set_dns_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_dns_config_v1 (state_data)); } int ipmi_oem_inventec_get_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_web_server_config_v1 (state_data)); } int ipmi_oem_inventec_set_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_web_server_config_v1 (state_data)); } int ipmi_oem_inventec_get_power_management_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_power_management_config_v1 (state_data)); } int ipmi_oem_inventec_set_power_management_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_power_management_config_v1 (state_data)); } int ipmi_oem_inventec_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_sol_idle_timeout (state_data)); } int ipmi_oem_inventec_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_sol_idle_timeout (state_data)); } int ipmi_oem_inventec_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_telnet_ssh_redirect_status (state_data)); } int ipmi_oem_inventec_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_telnet_ssh_redirect_status (state_data)); } #if 0 /* waiting for verification from Dell */ int ipmi_oem_inventec_get_firmware_update_config (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t remote_update_enable; uint8_t protocol; char uri[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN + 1]; uint8_t connection_retry; uint8_t retry_interval; uint8_t delay_time; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (uri, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI + 1); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; remote_update_enable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_PROTOCOL, 0, 1, &tmpvalue) < 0) goto cleanup; protocol = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI, 0, uri, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_CONNECTION_RETRY, 0, 1, &tmpvalue) < 0) goto cleanup; connection_retry = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL, 0, 1, &tmpvalue) < 0) goto cleanup; retry_interval = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME, 0, 1, &tmpvalue) < 0) goto cleanup; delay_time = tmpvalue; pstdout_printf (state_data->pstate, "Remote Update : %s\n", remote_update_enable ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Protocol TFTP : %s\n", (protocol & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_TFTP) ? "Supported" : "Not Supported"); pstdout_printf (state_data->pstate, "Protocol FTP : %s\n", (protocol & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_FTP) ? "Supported" : "Not Supported"); pstdout_printf (state_data->pstate, "Protocol HTTP : %s\n", (protocol & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_PROTOCOL_BITMASK_HTTP) ? "Supported" : "Not Supported"); /* First char will be a separator, don't bother outputting if necessary */ if (uri[0] == 0x1C || uri[0] == 0x1D || uri[0] == 0x1E || uri[0] == 0x1F) pstdout_printf (state_data->pstate, "URI : %s\n", &uri[1]); else pstdout_printf (state_data->pstate, "URI : %s\n", uri); pstdout_printf (state_data->pstate, "Connection Retry : %u\n", connection_retry); /* is in 5 second increments */ pstdout_printf (state_data->pstate, "Retry Interval : %u seconds\n", retry_interval * IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS); if (delay_time == IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_DELAY_TIME_RANDOM) pstdout_printf (state_data->pstate, "Delay Time : random\n", delay_time); else pstdout_printf (state_data->pstate, "Delay Time : %u seconds\n", delay_time); rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_set_firmware_update_config (ipmi_oem_state_data_t *state_data) { uint8_t remote_update_enable = 0; char uri[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN + 1]; uint8_t connection_retry = 0; uint8_t retry_interval = 0; uint8_t delay_time = 0; uint32_t tmpvalue = 0; int rv = -1; unsigned int i; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: remoteupdate=enable|disable\n" "Option: URI=tftp://...|ftp://...|http://...\n" "Option: connectionretry=num\n" "Option: retryinterval=seconds\n" "Option: delaytime=seconds|random\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "remoteupdate")) { if (ipmi_oem_parse_enable (state_data, i, value, &remote_update_enable) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_REMOTE_UPDATE_ENABLE, 0, 1, (uint32_t)remote_update_enable) < 0) goto cleanup; } else if (!strcasecmp (key, "uri")) { unsigned int min_required; unsigned int value_len; if (strncasecmp (value, "tftp://", 7) && strncasecmp (value, "ftp://", 6) && strncasecmp (value, "http://", 7)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } /* has to be atleast 1 char after what the prefix */ if (!strncasecmp (value, "tftp://", 7) || !strncasecmp (value, "http://", 7)) min_required = 8; else /* !strncasecmp (value, "ftp://", 6) */ min_required = 7; /* - 1 for separator unit */ if (strlen (value) < min_required || strlen (value) > (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI_LEN - 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid URI length\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } value_len = strlen (value); /* First char should be a separator */ uri[0] = 0x1F; memcpy (&uri[1], value, value_len); if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_URI, uri, value_len + 1) < 0) goto cleanup; } else if (!strcasecmp (key, "connectionretry")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &connection_retry) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_CONNECTION_RETRY, 0, 1, (uint32_t)connection_retry) < 0) goto cleanup; } else if (!strcasecmp (key, "retryinterval")) { if (ipmi_oem_parse_unsigned_int_range (state_data, i, value, &tmpvalue, 0, UCHAR_MAX * IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS) < 0) goto cleanup; /* retry interval is in 5 second increments */ retry_interval = tmpvalue / IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL_INCREMENTS; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_RETRY_INTERVAL, 0, 1, (uint32_t)retry_interval) < 0) goto cleanup; } else if (!strcasecmp (key, "delaytime")) { if (!strcasecmp (value, "random")) delay_time = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_UPDATE_DELAY_TIME_RANDOM; else { if (ipmi_oem_parse_unsigned_int_range (state_data, i, value, &tmpvalue, 0, UCHAR_MAX - 1) < 0) goto cleanup; delay_time = tmpvalue; } if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_UPDATE, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_UPDATE_DELAY_TIME, 0, 1, (uint32_t)delay_time) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } #endif #if 0 /* cannot verify */ int ipmi_oem_inventec_get_firmware_information (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; char name[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN + 1]; char description[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN + 1]; uint8_t entity; char *entity_str = NULL; char product_info[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN + 1]; char firmware_version[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN + 1]; char branch[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN + 1]; char build_information[IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (name, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN + 1); memset (description, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN + 1); memset (product_info, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN + 1); memset (firmware_version, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN + 1); memset (branch, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN + 1); memset (build_information, '\0', IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN + 1); if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME, 0, name, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION, 0, description, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY, 0, 1, &tmpvalue) < 0) goto cleanup; entity = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO, 0, product_info, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION, 0, firmware_version, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH, 0, branch, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION, 0, build_information, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN) < 0) goto cleanup; pstdout_printf (state_data->pstate, "BMC Name : %s\n", name); pstdout_printf (state_data->pstate, "Controller Description : %s\n", description); switch (entity) { case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_BMC: entity_str = "BMC"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_SYSTEM_BIOS: entity_str = "System (BIOS)"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_PDB: entity_str = "PDB"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_FCB: entity_str = "FCB"; break; default: entity_str = "Unrecognized"; } pstdout_printf (state_data->pstate, "Controller Entity : %s\n", entity_str); pstdout_printf (state_data->pstate, "Product Info : %s\n", product_info); pstdout_printf (state_data->pstate, "Firmware Version : %s\n", firmware_version); pstdout_printf (state_data->pstate, "Branch : %s\n", branch); pstdout_printf (state_data->pstate, "Build Information : %s\n", build_information); rv = 0; cleanup: return (rv); } #endif #if 0 /* waiting for verification from Dell */ int ipmi_oem_inventec_update_firmware (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t task_id; int config_parsed = 0; uint8_t config_value = 0; int transmitting_image_output = 0; int validating_image_output = 0; int programming_output = 0; int ready_to_accept_image = 0; unsigned int rq_len = 0; int rs_len; int rv = -1; int i; /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Update Firmware Request * * 0x08 - network function * 0x01 - OEM cmd * 0x?? - interface used * - 00h - system interface (e.g. KCS) * - 01h - networking (e.g. tftp, ftp, http) * - 02h - USB MSC * 0x?? - update type * [7] - force update * - 0h - normal update, an update operation will occur only when the * BMC validate (sic) target board, target product and * version number. * - 1h - forced update, make the BMC update the image without * validate (sic) target board, target product and * version number. * [6:0] - reserved * bytes 3 - 14: install options (OEM specific) * * Update Firmware Response * * 0x01 - OEM cmd * 0x?? - Completion Code * 0x?? - Task ID */ assert (state_data); assert (state_data->prog_data->args->oem_options_count >= 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "tftp") && strcasecmp (state_data->prog_data->args->oem_options[0], "ftp") && strcasecmp (state_data->prog_data->args->oem_options[0], "http")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* start at index 1 - first option is required */ for (i = 1; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "config")) { if (strcasecmp (value, "preserve") && strcasecmp (value, "nopreserve")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } config_parsed++; /* has to be atleast 1 char after what the prefix */ if (!strcasecmp (value, "preserve")) config_value = IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_OEM_DELL_CONFIG_PRESERVE; else /* !strcasecmp (value, "nopreserve") */ config_value = IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_OEM_DELL_CONFIG_NOPRESERVE; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } /* Check for "combos" between different optional arguments */ /* achu - none yet */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_UPDATE_FIRMARE; /* what do you know, it all maps to one for now .. lucky us */ if (!strcasecmp (state_data->prog_data->args->oem_options[0], "tftp") || !strcasecmp (state_data->prog_data->args->oem_options[0], "ftp") || !strcasecmp (state_data->prog_data->args->oem_options[0], "http")) bytes_rq[1] = IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_INTERFACE_NETWORKING; bytes_rq[2] = IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_NORMAL_UPDATE; bytes_rq[2] <<= IPMI_OEM_INVENTEC_UPDATE_FIRMWARE_UPDATE_TYPE_SHIFT; rq_len = 3; if (config_parsed) { bytes_rq[3] = config_value; rq_len++; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_FIRMWARE_RQ, /* network function */ bytes_rq, /* data */ rq_len, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_UPDATE_FIRMARE, IPMI_NET_FN_FIRMWARE_RS, NULL) < 0) goto cleanup; task_id = bytes_rs[2]; /* loop until it's done */ while (1) { uint8_t update_status; /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Get Update Status Request * * 0x08 - network function * 0x02 - OEM cmd * 0x?? - Task ID * * Get Update Status Response * * 0x02 - OEM cmd * 0x?? - Completion Code * 0x?? - Status * - 00h = transmitting image * - 01h = validating image * - 02h = programming * - 03h = ready to accept image * - 80h = general error * - 81h = cannot establish connection * - 82h = path not found * - 83h = transmission abort * - 84h = checkusm error * - 85h = incorrect platform * - FFh = completed * 0x?? - Progression Indicator * - "This field is optional, if present its value indicates the * current progress of the status specified in Status byte" */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_UPDATE_STATUS; bytes_rq[1] = task_id; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_FIRMWARE_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_GET_UPDATE_STATUS, IPMI_NET_FN_FIRMWARE_RS, NULL) < 0) goto cleanup; update_status = bytes_rs[2]; if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_GENERAL_ERROR) { pstdout_fprintf (state_data->pstate, stderr, "General Error\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_CANNOT_ESTABLISH_CONNECTION) { pstdout_fprintf (state_data->pstate, stderr, "Cannot Establish Connection\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_PATH_NOT_FOUND) { pstdout_fprintf (state_data->pstate, stderr, "Path Not Found\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_TRANSMISSION_ABORT) { pstdout_fprintf (state_data->pstate, stderr, "Transmission Abort\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_CHECKSUM_ERROR) { pstdout_fprintf (state_data->pstate, stderr, "Checksum Error\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_INCORRECT_PLATFORM) { pstdout_fprintf (state_data->pstate, stderr, "Incorrect Platform\n"); goto cleanup; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_COMPLETED) break; if (state_data->prog_data->args->verbose_count) { if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_TRANSMITTING_IMAGE && !transmitting_image_output) { pstdout_printf (state_data->pstate, "Transmitting Image\n"); transmitting_image_output++; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_VALIDATING_IMAGE && !validating_image_output) { pstdout_printf (state_data->pstate, "Validating Image\n"); validating_image_output++; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_PROGRAMMING && !programming_output) { pstdout_printf (state_data->pstate, "Programming\n"); programming_output++; } else if (update_status == IPMI_OEM_INVENTEC_GET_UPDATE_STATUS_READY_TO_ACCEPT_IMAGE && !ready_to_accept_image) { pstdout_printf (state_data->pstate, "Ready to Accept Image\n"); ready_to_accept_image++; } } sleep (1); } rv = 0; cleanup: return (rv); } #endif int ipmi_oem_inventec_get_board_id (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Get Board ID Request * * 0x34 - OEM network function * 0x10 - OEM cmd * * Get Board ID Response * * 0x10 - OEM cmd * 0x?? - Completion Code * 0x?? - board id */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_BOARD_ID; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INVENTEC_GET_BOARD_ID, IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%Xh\n", bytes_rs[2]); rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_set_board_id (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t boardid; unsigned int tmp; char *endptr; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); errno = 0; tmp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, IPMI_OEM_HEX_BASE); if (errno || endptr[0] != '\0' || tmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } boardid = tmp; /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Set Board ID Request * * 0x34 - OEM network function * 0x11 - OEM cmd * 0x?? - board id * * Set Board ID Response * * 0x11 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_BOARD_ID; bytes_rq[1] = boardid; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_BOARD_ID, IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_get_fcb_version (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Get FCB FW Version Request * * 0x34 - OEM network function * 0x16 - OEM cmd * * Get FCB FW Version Response * * 0x16 - OEM cmd * 0x?? - Completion Code * 0x?? - major version (in hex) * 0x?? - minor version (in hex) */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_FCB_FW_VERSION; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_INVENTEC_GET_FCB_FW_VERSION, IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%X.%02X\n", bytes_rs[2], bytes_rs[3]); rv = 0; cleanup: return (rv); } int ipmi_oem_inventec_set_fcb_version (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t majorversion; uint8_t minorversion; unsigned int tmp; char *endptr; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); errno = 0; tmp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, IPMI_OEM_HEX_BASE); if (errno || endptr[0] != '\0' || tmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } majorversion = tmp; errno = 0; tmp = strtoul (state_data->prog_data->args->oem_options[1], &endptr, IPMI_OEM_HEX_BASE); if (errno || endptr[0] != '\0' || tmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } minorversion = tmp; /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * * Set FCB FW Version Request * * 0x34 - OEM network function * 0x15 - OEM cmd * 0x?? - major version (in hex) * 0x?? - minor version (in hex) * * Set FCB FW Version Response * * 0x15 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_FCB_FW_VERSION; bytes_rq[1] = majorversion; bytes_rq[2] = minorversion; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_FCB_FW_VERSION, IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #if 0 /* cannot verify */ int ipmi_oem_inventec_set_asset_tag (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; unsigned int asset_tag_len; unsigned int rq_len = 0; int rs_len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); asset_tag_len = strlen (state_data->prog_data->args->oem_options[0]); if (asset_tag_len > IPMI_OEM_INVENTEC_ASSET_TAG_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s OEM option argument '%s' invalid length, max %u long\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0], IPMI_OEM_INVENTEC_ASSET_TAG_MAX); goto cleanup; } /* Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * * Set Asset Tag Request * * 0x34 - OEM network function * 0x12 - OEM cmd * bytes 1-10: Asset Tag * * Set Asset Tag Response * * 0x12 - OEM cmd * 0x?? - Completion Code * 0x?? - count written */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_ASSET_TAG; rq_len++; for (i = 0; i < asset_tag_len; i++) { bytes_rq[1 + i] = state_data->prog_data->args->oem_options[0][i]; rq_len++; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RQ, /* network function */ bytes_rq, /* data */ rq_len, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_ASSET_TAG, IPMI_NET_FN_OEM_INVENTEC_SPECIFIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #endif #if 0 /* cannot verify */ int ipmi_oem_inventec_get_dhcp_retry (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; int len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Inventec 5441/Dell Xanadu II * * Uses Get/Set Lan Configuration * * parameter = 192 * * Data format * * 1st byte = retry count, 1 based, 0h = no retries, ffh = infinite * 2nd byte = retry interval, 1 based, 10 second increments * 3rd byte = retry timeout, 1 based, 1 minute increments * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY, 0, 0, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 3) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } if (configuration_parameter_data[0] == IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY_NO_RETRIES) pstdout_printf (state_data->pstate, "Retry Count : no retries\n"); else if (configuration_parameter_data[0] == IPMI_LAN_CONFIGURATION_PARAMETER_OEM_INVENTEC_DHCP_RETRY_INDEFINITE_RETRY) pstdout_printf (state_data->pstate, "Retry Count : infinite retries\n"); else pstdout_printf (state_data->pstate, "Retry Count : %u\n", configuration_parameter_data[0]); pstdout_printf (state_data->pstate, "Retry Interval : %u seconds\n", configuration_parameter_data[1] * 10); pstdout_printf (state_data->pstate, "Retry Timeout : %u minutes\n", configuration_parameter_data[2]); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_set_dhcp_retry (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); return (0); } #endif int ipmi_oem_inventec_get_sol_inactivity_timeout (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; uint16_t sol_inactivity_timeout; int len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III OEM * * Uses Get/Set SOL Configuration * * parameter = 192 * * Data format * * 1st & 2nd byte = inactivity timeout, 1 based, 1 minute * increments, LSbyte first * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_sol_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_SOL_PARAMETER, IPMI_SOL_CONFIGURATION_PARAMETER_OEM_INVENTEC_SOL_TIMEOUT, 0, 0, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 2) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } sol_inactivity_timeout = 0; sol_inactivity_timeout |= configuration_parameter_data[0]; sol_inactivity_timeout |= (configuration_parameter_data[1] << 8); if (sol_inactivity_timeout) pstdout_printf (state_data->pstate, "SOL Inactivity Timeout : %u minutes\n", sol_inactivity_timeout); else pstdout_printf (state_data->pstate, "SOL Inactivity Timeout : no timeout\n", sol_inactivity_timeout); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_set_sol_inactivity_timeout (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; uint16_t sol_inactivity_timeout = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "none")) { char *endptr = NULL; unsigned int temp; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > USHRT_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } sol_inactivity_timeout = temp; } else sol_inactivity_timeout = 0; /* Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * * From Dell Provided Docs * * Uses Get/Set SOL Configuration * parameter = 192 * * Data format * * 1st & 2nd byte = inactivity timeout, 1 based, 1 minute * increments, LSbyte first * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_sol_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } configuration_parameter_data[0] = sol_inactivity_timeout & 0x00FF; configuration_parameter_data[1] = (sol_inactivity_timeout & 0xFF00) >> 8; if (ipmi_cmd_set_sol_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_SOL_CONFIGURATION_PARAMETER_OEM_INVENTEC_SOL_TIMEOUT, configuration_parameter_data, 2, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sol_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_restore_to_defaults (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t task_id; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "all") && strcasecmp (state_data->prog_data->args->oem_options[0], "user") && strcasecmp (state_data->prog_data->args->oem_options[0], "lan") && strcasecmp (state_data->prog_data->args->oem_options[0], "sol") && strcasecmp (state_data->prog_data->args->oem_options[0], "serial") && strcasecmp (state_data->prog_data->args->oem_options[0], "pef")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Inventec 5442/Dell Xanadu III OEM * * Request Restore To Defaults * * 0x30 - OEM network function * 0x04 - OEM cmd * 0x?? - bitmask * [7:5] = 111b = restore parameters not included below * = 000b = remaining parameters stay what it is * [4] = 1b = restore PEFs to default * [3] = 1b = restore serial configuration parameters to default * [2] = 1b = restore SOL configuration parameters to default * [1] = 1b = restore LAN configuration parameters to default * [0] = 1b = restore user accounts to default * * Response Restore To Defaults * * 0x04 - OEM cmd * 0x?? - Completion Code * - 0xCC - one or more configs not supported * 0x?? - Task ID - used to get the restore status. Invalid after * 120 seconds. 00h = reserved. * * Request Get Restore Status * * 0x30 - OEM network function * 0x05 - OEM cmd * 0x?? - Task ID * * Response Get Restore Status * * 0x05 - OEM cmd * 0x?? - Completion Code * 0x?? - restore status * - 00h = restore in progress * - 01h = restore complete */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_RESTORE_TO_DEFAULTS; bytes_rq[1] = IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS; bytes_rq[1] <<= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_SHIFT; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "all")) { #if 0 /* achu: Compared to Quanta, if you set this, it doesn't work. * I have no idea why. */ bytes_rq[1] = IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW; bytes_rq[1] <<= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_RESTORE_FLAG_SHIFT; #endif bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_PEF_BITMASK; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "user")) bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lan")) bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "sol")) bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "serial")) bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "pef" */ bytes_rq[1] |= IPMI_OEM_INVENTEC_RESTORE_TO_DEFAULTS_PEF_BITMASK; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INVENTEC_RESTORE_TO_DEFAULTS, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; task_id = bytes_rs[2]; /* don't quit until it is done */ while (1) { bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_RESTORE_STATUS; bytes_rq[1] = task_id; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INVENTEC_GET_RESTORE_STATUS, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_INVENTEC_GET_RESTORE_STATUS_RESTORE_COMPLETE) break; sleep (1); } rv = 0; cleanup: return (rv); } #if 0 /* cannot verify */ int ipmi_oem_inventec_set_system_guid (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strlen (state_data->prog_data->args->oem_options[0]) != (IPMI_SYSTEM_GUID_LENGTH * 2)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s OEM option argument '%s' invalid length, must be %u long\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0], (IPMI_SYSTEM_GUID_LENGTH * 2)); goto cleanup; } for (i = 0; i < (IPMI_SYSTEM_GUID_LENGTH * 2); i++) { if (!isxdigit (state_data->prog_data->args->oem_options[0][i])) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s OEM option argument '%s' contains invalid hex code\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } } /* Inventec 5441/Dell Xanadu II OEM * * Set System GUID Request * * 0x30 - OEM network function * 0xB3 - OEM cmd * bytes 1-16: System GUID * * Set System GUID Response * * 0xB3 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_SYSTEM_GUID; for (i = 0; i < IPMI_SYSTEM_GUID_LENGTH; i++) { char strbuf[IPMI_OEM_BUFLEN]; char *endptr; long val; /* achu: there *must* be something faster than this, I just * can't find the magic lib call to do 1-char to 1-hex. All the * strxxx() functions take NUL terminated strings. */ memset (strbuf, '\0', IPMI_OEM_BUFLEN); strbuf[0] = state_data->prog_data->args->oem_options[0][i]; errno = 0; val = strtol (strbuf, &endptr, IPMI_OEM_HEX_BASE); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "strtol: invalid string '%s'\n", strbuf); goto cleanup; } bytes_rq[1 + i] |= (val & 0x0F); memset (strbuf, '\0', IPMI_OEM_BUFLEN); strbuf[0] = state_data->prog_data->args->oem_options[0][i + 1]; errno = 0; val = strtol (strbuf, &endptr, IPMI_OEM_HEX_BASE); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "strtol: invalid string '%s'\n", strbuf); goto cleanup; } bytes_rq[1 + i] |= ((val << 4) & 0xF0); } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 17, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_SYSTEM_GUID, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #endif static int _ipmi_oem_inventec_read_eeprom_at24c256n (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t data_rq[IPMI_OEM_MAX_BYTES]; uint8_t data_rs[IPMI_OEM_MAX_BYTES]; unsigned int read_count = 0; int len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Uses Master-Read Write Command * * Most addresses provided directly from Dell. * * byte 1 = 5 (channel = 0, bus id = 2, bus-type = 1 = private) * byte 2 = 0xA6 (slave address 7 bit = 0x53, lowest bit for r/w, 0b = read, 1b = write) * byte 3 = read count, we'll use 1 * byte 4/5 - address to read, msb first * * response * * byte 1 = comp-code * byte N = read data * * address ranges from 0x0000 - 0x7fff */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_master_write_read_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } while (read_count <= IPMI_OEM_INVENTEC_EEPROM_AT24C256N_ADDRESS_MAX) { data_rq[0] = (read_count & 0xFF00) >> 8; data_rq[1] = (read_count & 0x00FF); if (ipmi_cmd_master_write_read (state_data->ipmi_ctx, IPMI_BUS_TYPE_PRIVATE, IPMI_OEM_INVENTEC_EEPROM_AT24C256N_BUS_ID, 0, IPMI_OEM_INVENTEC_EEPROM_AT24C256N_SLAVE_ADDRESS, 1, data_rq, 2, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_master_write_read: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "data", data_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len) { int i; for (i = read_count; i < (read_count + len); i++) { if (i && (i % 8) == 0) pstdout_printf (state_data->pstate, "\n"); pstdout_printf (state_data->pstate, "0x%02X ", data_rs[i - read_count]); } read_count += len; } } pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_read_eeprom (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "at24c256n")) return _ipmi_oem_inventec_read_eeprom_at24c256n (state_data); pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } static int _ipmi_oem_inventec_clear_eeprom_at24c256n (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t data_rq[IPMI_OEM_MAX_BYTES]; unsigned int count = 0; unsigned int percent = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Uses Master-Read Write Command * * Most addresses provided directly from Dell. * * byte 1 = 5 (channel = 0, bus id = 2, bus-type = 1 = private) * byte 2 = 0xA6 (slave address 7 bit = 0x53, lowest bit for r/w, 0b = read, 1b = write) * byte 3 = read count, 0 to write * byte 4/5 - address to read, msb first * byte 6 - data to write * * response * * byte 1 = comp-code * byte N = read data * * address ranges from 0x0000 - 0x7fff */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_master_write_read_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (state_data->prog_data->args->verbose_count) fprintf (stderr, "%u%%\r", percent); while (count <= IPMI_OEM_INVENTEC_EEPROM_AT24C256N_ADDRESS_MAX) { data_rq[0] = (count & 0xFF00) >> 8; data_rq[1] = (count & 0x00FF); data_rq[2] = IPMI_OEM_INVENTEC_EEPROM_AT24C256N_CLEAR_BYTE; if (ipmi_cmd_master_write_read (state_data->ipmi_ctx, IPMI_BUS_TYPE_PRIVATE, IPMI_OEM_INVENTEC_EEPROM_AT24C256N_BUS_ID, 0, IPMI_OEM_INVENTEC_EEPROM_AT24C256N_SLAVE_ADDRESS, 0, data_rq, 3, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_master_write_read: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (state_data->prog_data->args->verbose_count) { if ((unsigned int)(((double)count/IPMI_OEM_INVENTEC_EEPROM_AT24C256N_ADDRESS_MAX) * 100) > percent) { fprintf (stderr, "%u%%\r", percent); percent++; } } count++; } if (state_data->prog_data->args->verbose_count) fprintf (stderr, "100%%\r\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_inventec_clear_eeprom (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "at24c256n")) return _ipmi_oem_inventec_clear_eeprom_at24c256n (state_data); pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-inventec.h0000644002055400205540000000751113527331635020500 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_INVENTEC_H #define IPMI_OEM_INVENTEC_H #include "ipmi-oem.h" int ipmi_oem_inventec_get_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_mac_address (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_mac_address (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_authentication_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_authentication_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_account_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_power_management_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_power_management_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); #if 0 /* waiting for verification from Dell */ int ipmi_oem_inventec_get_firmware_update_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_firmware_update_config (ipmi_oem_state_data_t *state_data); #endif #if 0 /* cannot verify */ int ipmi_oem_inventec_get_firmware_information (ipmi_oem_state_data_t *state_data); #endif #if 0 /* waiting for verification from Dell */ int ipmi_oem_inventec_update_firmware (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_inventec_get_board_id (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_board_id (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_get_fcb_version (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_fcb_version (ipmi_oem_state_data_t *state_data); #if 0 /* cannot verify */ int ipmi_oem_inventec_set_asset_tag (ipmi_oem_state_data_t *state_data); #endif #if 0 /* cannot verify */ int ipmi_oem_inventec_get_dhcp_retry (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_dhcp_retry (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_inventec_get_sol_inactivity_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_set_sol_inactivity_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_restore_to_defaults (ipmi_oem_state_data_t *state_data); #if 0 /* cannot verify */ int ipmi_oem_inventec_set_system_guid (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_inventec_read_eeprom (ipmi_oem_state_data_t *state_data); int ipmi_oem_inventec_clear_eeprom (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_INVENTEC_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-quanta.c0000644002055400205540000007074413527331635020161 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-quanta.h" #include "ipmi-oem-thirdparty.h" #include "freeipmi-portability.h" #include "pstdout.h" /* Quanta S99Q/Dell FS12-TY Notes * * Update Firmware Request * * 0x08 - network function * 0x01 - OEM cmd * 0x?? - Interface * - 00h - system interface (e.g. kcs) * - 01h - networking (e.g. tftp, ftp, http) * - 02h - usb msc, legacy * - 03h - USB init command * 0x?? - update type * - [7] - force update * - 0h - normal * - 1h - forced * - [6:3] - reserved * - [2:0] - entity * bytes 4:15 - install options (vendor) * * Update Firmware Response * * 0x08 - network function * 0x01 - command * 0x?? - completion code * 0x?? - task ID * * Get Update Status Request * * 0x08 - network function * 0x02 - OEM cmd * 0x?? - task ID * * Get Update Status Response * * 0x08 - network function * 0x02 - OEM cmd * 0x?? - completion code * 0x?? - status * - 00h - Transmitting Image * - 01h - Validating Image * - 02h - Programming * - 03h - Ready to Accept Image * - 04h - USB Init stage * - 05h - Connecting to server * - 80h - General error * - 81h - Cannot establish connection * - 82h - Path not found * - 83h - Transmission Abort * - 84h - Checksum error * - 85h - Incorrect Platform * - 86h - Allocate memory failed * - 87h - Virtual media detach * - FFh - Completed * 0x?? - progression indicator (optional) * * Copy Image Data Request * * 0x08 - network function * 0x03 - OEM cmd * 0x?? - In Progress * - 00h - data transmission is in progress * - 01h - data transmission completed * bytes 3:6 - image offset to be copied * bytes 7:N - image data to be copied * * Copy Image Data Response * * 0x03 - OEM cmd * 0x?? - Completion Code * * USB Firmware Update Request * * 0x08 - network function * 0x04 - OEM cmd * 0x?? - Task ID * 0x?? - Execution phases * - 00h - phase one, emulate virtual disk * - 01h - phase two, un-mount virtual disk and then start firmware update * * USB Firmware Update Response * * 0x04 - OEM cmd * 0x?? - Completion Code * * Get Sensor Temperature Reading Request * * 0x30 - network function * 0x10 - OEM cmd * 0x?? - sensor number * * Get Sensor Temperature Reading Response * * 0x10 - OEM cmd * 0x?? - Completion Code * 0x?? - sensor temperature reading * * Set Processor Information Request * * 0x30 - network function * 0x17 - OEM cmd * 0x?? - Processor Index, 1 based * 0x?? - Processor Type * bytes 4-5 - Processor frequency in MHZ (LSB first) * * Set Processor Information Response * * 0x17 - OEM cmd * 0x?? - Completion Code */ #define IPMI_OEM_QUANTA_MAC_ADDRESS_BYTES 6 #define IPMI_OEM_QUANTA_MAC_ADDRESS_BUS_ID 2 #define IPMI_OEM_QUANTA_MAC_ADDRESS_CHANNEL 0 #define IPMI_OEM_QUANTA_MAC_ADDRESS_SLAVE_ADDRESS 0x55 #define IPMI_OEM_QUANTA_MAC_ADDRESS_BASE_OFFSET 0x0000 #define IPMI_OEM_QUANTA_MAC_ADDRESS_DEDICATED_OFFSET 0x0000 #define IPMI_OEM_QUANTA_MAC_ADDRESS_SHARED_OFFSET 0x0006 int ipmi_oem_quanta_get_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_nic_mode (state_data)); } int ipmi_oem_quanta_set_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_nic_mode (state_data)); } int ipmi_oem_quanta_get_bmc_services (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_bmc_services_v1 (state_data)); } int ipmi_oem_quanta_set_bmc_services (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); return (ipmi_oem_thirdparty_set_bmc_services_v1 (state_data)); } int ipmi_oem_quanta_get_account_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_account_status (state_data)); } int ipmi_oem_quanta_get_dns_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_dns_config_v1 (state_data)); } int ipmi_oem_quanta_set_dns_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_dns_config_v1 (state_data)); } int ipmi_oem_quanta_get_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_web_server_config_v1 (state_data)); } int ipmi_oem_quanta_set_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_web_server_config_v1 (state_data)); } int ipmi_oem_quanta_get_power_management_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_power_management_config_v1 (state_data)); } int ipmi_oem_quanta_set_power_management_config (ipmi_oem_state_data_t *state_data) { assert (state_data); return (ipmi_oem_thirdparty_set_power_management_config_v1 (state_data)); } int ipmi_oem_quanta_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_sol_idle_timeout (state_data)); } int ipmi_oem_quanta_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_sol_idle_timeout (state_data)); } int ipmi_oem_quanta_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_telnet_ssh_redirect_status (state_data)); } int ipmi_oem_quanta_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_telnet_ssh_redirect_status (state_data)); } int ipmi_oem_quanta_reset_to_defaults (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t task_id; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "all") && strcasecmp (state_data->prog_data->args->oem_options[0], "user") && strcasecmp (state_data->prog_data->args->oem_options[0], "lan") && strcasecmp (state_data->prog_data->args->oem_options[0], "sol") && strcasecmp (state_data->prog_data->args->oem_options[0], "serial") && strcasecmp (state_data->prog_data->args->oem_options[0], "pef")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Quanta S99Q/Dell FS12-TY OEM * * Request Reset To Defaults * * 0x30 - OEM network function * 0x04 - OEM cmd * 0x?? - bitmask * [7:5] = 111b = restore parameters not included below * = 000b = remaining parameters stay what it is * [4] = 1b = restore PEFs to default * [3] = 1b = restore serial configuration parameters to default * [2] = 1b = restore SOL configuration parameters to default * [1] = 1b = restore LAN configuration parameters to default * [0] = 1b = restore user accounts to default * * Response Reset To Defaults * * 0x04 - OEM cmd * 0x?? - Completion Code * - 0xCC - one or more configs not supported * 0x?? - Task ID - used to get the restore status. Invalid after * 120 seconds. 00h = reserved. * * Request Get Restore Status * * 0x30 - OEM network function * 0x05 - OEM cmd * 0x?? - Task ID * * Response Get Restore Status * * 0x05 - OEM cmd * 0x?? - Completion Code * 0x?? - restore status * - 00h = restore in progress * - 01h = restore complete */ bytes_rq[0] = IPMI_CMD_OEM_QUANTA_RESET_TO_DEFAULTS; bytes_rq[1] = IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS; bytes_rq[1] <<= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "all")) { bytes_rq[1] = IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW; bytes_rq[1] <<= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT; bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_PEF_BITMASK; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "user")) bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lan")) bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "sol")) bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "serial")) bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "pef" */ bytes_rq[1] |= IPMI_OEM_QUANTA_RESET_TO_DEFAULTS_PEF_BITMASK; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_QUANTA_RESET_TO_DEFAULTS, IPMI_NET_FN_OEM_QUANTA_GENERIC_RS, NULL) < 0) goto cleanup; task_id = bytes_rs[2]; /* don't quit until it is done */ while (1) { bytes_rq[0] = IPMI_CMD_OEM_QUANTA_GET_RESTORE_STATUS; bytes_rq[1] = task_id; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_QUANTA_GET_RESTORE_STATUS, IPMI_NET_FN_OEM_QUANTA_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_QUANTA_GET_RESTORE_STATUS_RESTORE_COMPLETE) break; sleep (1); } rv = 0; cleanup: return (rv); } int ipmi_oem_quanta_get_processor_information (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t processor_index = 0; uint8_t processor_index_init = 1; uint8_t processor_index_max = 0xFF; uint8_t processor_type; char *processor_type_str = NULL; uint16_t processor_mhz; int rs_len; int rv = -1; /* Quanta S99Q/Dell FS12-TY OEM * * Request Get Processor Information * * 0x30 - OEM network function * 0x18 - OEM cmd * 0x?? - Processor Index, 1 based * * Response Get Processor Information * * 0x18 - OEM cmd * 0x?? - Completion Code * 0x?? - Processor Type * bytes 3-4 - Processor frequency in MHZ (LSB first) */ assert (state_data); if (state_data->prog_data->args->oem_options_count > 1) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid number of options specified\n"); goto cleanup; } if (state_data->prog_data->args->oem_options_count) { char *endptr = NULL; unsigned int temp; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > UCHAR_MAX || !temp) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } processor_index_init = temp; processor_index_max = processor_index_init; } for (processor_index = processor_index_init; processor_index <= processor_index_max; processor_index++) { bytes_rq[0] = IPMI_CMD_OEM_QUANTA_GET_PROCESSOR_INFORMATION; bytes_rq[1] = processor_index; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* If processor index 1 fails or user input a processor index, * fall through to normal error output below. */ if (rs_len >= 2 && (bytes_rs[1] == IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE || bytes_rs[1] == IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) && processor_index_init != processor_index_max && processor_index != 1) break; if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 5, IPMI_CMD_OEM_QUANTA_GET_PROCESSOR_INFORMATION, IPMI_NET_FN_OEM_QUANTA_GENERIC_RS, NULL) < 0) goto cleanup; processor_type = bytes_rs[2]; processor_mhz = (bytes_rs[3] | (bytes_rs[4] << 8)); if (processor_type == IPMI_OEM_QUANTA_PROCESSOR_TYPE_NO_CPU_PRESENT) pstdout_printf (state_data->pstate, "Processor %u: No CPU Present\n", processor_index); else { switch (processor_type) { case IPMI_OEM_QUANTA_PROCESSOR_TYPE_CELERON: processor_type_str = "Celeron"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_PENTIUM_3: processor_type_str = "Pentium 3"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_PENTIUM_4: processor_type_str = "Pentium 4"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_XEON: processor_type_str = "Xeon"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_PRESTONIA: processor_type_str = "Prestonia"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_NOCONA: processor_type_str = "Nocona"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_OPTERON: processor_type_str = "Opteron"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_DEMPSEY: processor_type_str = "Dempsey"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_CLOVERTOWN: processor_type_str = "Clovertown"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_TIGERTON: processor_type_str = "Tigerton"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_DUNNINGTON: processor_type_str = "Dunnington"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_HARPERTOWN: processor_type_str = "Harpertown"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_WOLFDALE_DP: /* achu: listed as "WolfDale-Dp" in spec, I don't like that output */ processor_type_str = "Wolfdale-DP"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_NEHALEM_EP: processor_type_str = "Nehalem-EP"; break; case IPMI_OEM_QUANTA_PROCESSOR_TYPE_WESTMERE_EP: processor_type_str = "Westmere-EP"; break; default: processor_type_str = "Unknown Processor"; } pstdout_printf (state_data->pstate, "Processor %u: %s %.2f Ghz\n", processor_index, processor_type_str, (double)processor_mhz / 1000); } } rv = 0; cleanup: return (rv); } static int _ipmi_oem_quanta_read_mac_address_s99q (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t data_buf[IPMI_OEM_MAX_BYTES]; uint8_t data_rq[IPMI_OEM_MAX_BYTES]; int data_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[1], "shared") && strcasecmp (state_data->prog_data->args->oem_options[1], "dedicated")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Uses Master-Read Write Command * * Most addresses provided directly from Dell. * * byte 1 = 5 (channel = 0, bus id = 2, bus-type = 1 = private) * byte 2 = 0xAA (slave address 7 bit = 0x55, lowest bit for r/w, 0b = read, 1b = write) * byte 3 = 0x0C - read count * byte 4/5 - 0x0000 - address to read, msb first * * response * * byte 1 = comp-code * byte 2-7 = dedicated MAC * byte 8-13 = shared MAC */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_master_write_read_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } data_rq[0] = (IPMI_OEM_QUANTA_MAC_ADDRESS_BASE_OFFSET & 0xFF00) >> 8; data_rq[1] = (IPMI_OEM_QUANTA_MAC_ADDRESS_BASE_OFFSET & 0x00FF); if (ipmi_cmd_master_write_read (state_data->ipmi_ctx, IPMI_BUS_TYPE_PRIVATE, IPMI_OEM_QUANTA_MAC_ADDRESS_BUS_ID, IPMI_OEM_QUANTA_MAC_ADDRESS_CHANNEL, IPMI_OEM_QUANTA_MAC_ADDRESS_SLAVE_ADDRESS, IPMI_OEM_QUANTA_MAC_ADDRESS_BYTES * 2, /* returns two MACs */ data_rq, 2, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_master_write_read: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((data_len = fiid_obj_get_data (obj_cmd_rs, "data", data_buf, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (data_len != (IPMI_OEM_QUANTA_MAC_ADDRESS_BYTES * 2)) { pstdout_fprintf (state_data->pstate, stderr, "invalid bytes returned: %u\n", data_len); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[1], "dedicated")) pstdout_printf (state_data->pstate, "%02X:%02X:%02X:%02X:%02X:%02X\n", data_buf[0], data_buf[1], data_buf[2], data_buf[3], data_buf[4], data_buf[5]); else pstdout_printf (state_data->pstate, "%02X:%02X:%02X:%02X:%02X:%02X\n", data_buf[6], data_buf[7], data_buf[8], data_buf[9], data_buf[10], data_buf[11]); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_quanta_read_mac_address (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "s99q")) return _ipmi_oem_quanta_read_mac_address_s99q (state_data); pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } static int _ipmi_oem_quanta_write_mac_address_s99q (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; unsigned int b1, b2, b3, b4, b5, b6; uint8_t data_rq[IPMI_OEM_MAX_BYTES]; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); if (strcasecmp (state_data->prog_data->args->oem_options[1], "shared") && strcasecmp (state_data->prog_data->args->oem_options[1], "dedicated")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } if (sscanf (state_data->prog_data->args->oem_options[2], "%02x:%02x:%02x:%02x:%02x:%02x", &b1, &b2, &b3, &b4, &b5, &b6) != 6) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } /* Uses Master-Read Write Command * * Most addresses provided directly from Dell. * * byte 1 = 5 (channel = 0, bus id = 2, bus-type = 1 = private) * byte 2 = 0xAA (slave address 7 bit = 0x55, lowest bit for r/w, 0b = read, 1b = write) * byte 3 = 0x00 - read count * byte 4/5 - 0x0000 | 0x0006 - address to read, msb first * - 0x0000 for dedicated * - 0x0006 for shared * * response * * byte 1 = comp-code */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_master_write_read_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[1], "dedicated")) { data_rq[0] = (IPMI_OEM_QUANTA_MAC_ADDRESS_DEDICATED_OFFSET & 0xFF00) >> 8; data_rq[1] = (IPMI_OEM_QUANTA_MAC_ADDRESS_DEDICATED_OFFSET & 0x00FF); } else { data_rq[0] = (IPMI_OEM_QUANTA_MAC_ADDRESS_SHARED_OFFSET & 0xFF00) >> 8; data_rq[1] = (IPMI_OEM_QUANTA_MAC_ADDRESS_SHARED_OFFSET & 0x00FF); } data_rq[2] = b1; data_rq[3] = b2; data_rq[4] = b3; data_rq[5] = b4; data_rq[6] = b5; data_rq[7] = b6; if (ipmi_cmd_master_write_read (state_data->ipmi_ctx, IPMI_BUS_TYPE_PRIVATE, IPMI_OEM_QUANTA_MAC_ADDRESS_BUS_ID, IPMI_OEM_QUANTA_MAC_ADDRESS_CHANNEL, IPMI_OEM_QUANTA_MAC_ADDRESS_SLAVE_ADDRESS, 0, data_rq, 8, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_master_write_read: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_quanta_write_mac_address (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "s99q")) return _ipmi_oem_quanta_write_mac_address_s99q (state_data); pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-quanta.h0000644002055400205540000000437313527331635020161 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_QUANTA_H #define IPMI_OEM_QUANTA_H #include "ipmi-oem.h" int ipmi_oem_quanta_get_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_account_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_power_management_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_power_management_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_reset_to_defaults (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_get_processor_information (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_read_mac_address (ipmi_oem_state_data_t *state_data); int ipmi_oem_quanta_write_mac_address (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_QUANTA_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-sun.c0000644002055400205540000005313013527331635017463 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-sun.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #define IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_ACCESS_ADDRESS_INDEX 5 #define IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_SLAVE_ADDRESS_INDEX 6 #define IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_OEM_INDEX 14 struct ipmi_oem_sun_get_led_sdr_callback { ipmi_oem_state_data_t *state_data; struct sensor_column_width *column_width; int header_output_flag; }; static int _sun_get_led_sdr_callback (ipmi_sdr_ctx_t sdr_ctx, uint8_t record_type, const void *sdr_record, unsigned int sdr_record_len, void *arg) { struct ipmi_oem_sun_get_led_sdr_callback *sdr_callback_arg; ipmi_oem_state_data_t *state_data; uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint16_t record_id; char fmt[IPMI_OEM_FMT_BUFLEN + 1]; char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1]; char sensor_name_buf[IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1]; char *sensor_name = NULL; uint8_t entity_instance_type; uint8_t led_mode; char *led_mode_str = NULL; assert (sdr_ctx); assert (sdr_record); assert (sdr_record_len); assert (arg); sdr_callback_arg = (struct ipmi_oem_sun_get_led_sdr_callback *)arg; state_data = sdr_callback_arg->state_data; /* Sun OEM * * From Ipmitool (http://ipmitool.sourceforge.net/) * * Get Led Request * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x21 - OEM cmd * 0x?? - Device Slave Address (in General Device Locator Record) * - Note that the IPMI command requires the entire * byte of the slave address. * 0x?? - LED Type (see below [1]) * - 0 - ok2rm * - 1 - service * - 2 - activity * - 3 - locate * 0x?? - Controller Address / Device Access Address (in General Device Locator Record) * - 0x20 if the LED is local * - Note that the IPMI command requires the entire * byte of the access address. * 0x?? - HW Info (OEM field in General Device Locator Record) * 0x?? - Force * - 0 - Go thru controller * - 1 - Directly access device * * An alternate format is described in the ipmitool comments for Sun * Blade Moduler Systems. * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x21 - OEM cmd * 0x?? - Device Slave Address (in General Device Locator Record) * 0x?? - LED Type * 0x?? - Controller Address / Device Access Address (in General Device Locator Record) * 0x?? - HW Info (OEM field in General Device Locator Record) * 0x?? - Entity ID * 0x?? - Entity Instance * - 7 bit version * 0x?? - Force * - 0 - Go thru controller * - 1 - Directly access device * * Get Led Response * * 0x21 - OEM cmd * 0x?? - Completion Code * 0x?? - LED mode * * achu notes: * * [1] - As far as I can tell, the LED type field is useless. My * assumption is that on older Sun systems, or other motherboards I * don't have access to, one can specify an LED type, which allows * you to enable/disable a particular LED amongst many. On my Sun * Fire 4140, it appears to do nothing and affect nothing. I will * add in a new option later if it becomes necessary for the user to * specify an LED type. In the meantime, I will copy the code use * in ipmitool and set this field to the OEM field. */ if (record_type != IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD) return (0); if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, sdr_record, sdr_record_len, NULL, NULL, &entity_instance_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_id_and_instance: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } /* if it isn't a physical instance, don't continue on */ if (entity_instance_type == IPMI_SDR_LOGICAL_CONTAINER_ENTITY) return (0); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, sdr_record, sdr_record_len, &record_id, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } /* achu: the sun oem commands want the full byte, not just the * sub-field, so use indexes instead of sdr-parse lib. */ bytes_rq[0] = IPMI_CMD_OEM_SUN_GET_LED; bytes_rq[1] = ((uint8_t *)sdr_record)[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_SLAVE_ADDRESS_INDEX]; bytes_rq[2] = ((uint8_t *)sdr_record)[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_OEM_INDEX]; bytes_rq[3] = ((uint8_t *)sdr_record)[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_ACCESS_ADDRESS_INDEX]; bytes_rq[4] = ((uint8_t *)sdr_record)[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_OEM_INDEX]; bytes_rq[5] = IPMI_OEM_SUN_LED_FORCE_GO_THRU_CONTROLLER; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 6, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); return (-1); } /* achu: there are probably 1 or 2 completion codes that are * acceptable to ignore and continue on, but who knows what they * are. */ if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_SUN_GET_LED, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) return (-1); if (!sdr_callback_arg->header_output_flag) { memset (fmt, '\0', IPMI_OEM_FMT_BUFLEN + 1); snprintf (fmt, IPMI_OEM_FMT_BUFLEN, "%%-%ds | %%-%ds | LED Mode\n", sdr_callback_arg->column_width->record_id, sdr_callback_arg->column_width->sensor_name); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR); sdr_callback_arg->header_output_flag++; } led_mode = bytes_rs[2]; if (state_data->prog_data->args->verbose_count) { memset (sensor_name_buf, '\0', IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1); if (ipmi_sdr_parse_entity_sensor_name (state_data->sdr_ctx, NULL, 0, 0, /* sensor number */ IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS, /* flags */ sensor_name_buf, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } sensor_name = sensor_name_buf; } else { memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_device_id_string (state_data->sdr_ctx, sdr_record, sdr_record_len, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } sensor_name = device_id_string; } switch (led_mode) { case IPMI_OEM_SUN_LED_MODE_OFF: led_mode_str = "Off"; break; case IPMI_OEM_SUN_LED_MODE_ON: led_mode_str = "On"; break; case IPMI_OEM_SUN_LED_MODE_STANDBY: led_mode_str = "Standby"; break; case IPMI_OEM_SUN_LED_MODE_SLOW: led_mode_str = "Slow"; break; case IPMI_OEM_SUN_LED_MODE_FAST: led_mode_str = "Fast"; break; default: led_mode_str = "Unknown"; } snprintf (fmt, IPMI_OEM_FMT_BUFLEN, "%%-%du | %%-%ds | %s\n", sdr_callback_arg->column_width->record_id, sdr_callback_arg->column_width->sensor_name, led_mode_str); pstdout_printf (state_data->pstate, fmt, record_id, sensor_name); return (0); } int ipmi_oem_sun_get_led (ipmi_oem_state_data_t *state_data) { struct ipmi_oem_sun_get_led_sdr_callback sdr_callback_arg; struct sensor_column_width column_width; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; if (calculate_column_widths (state_data->pstate, state_data->sdr_ctx, NULL, 0, NULL, 0, 0, /* non_abbreviated_units */ 0, /* shared_sensors */ 0, /* count_event_only_records */ 1, /* count_device_locator_records */ 0, /* count_oem_records */ state_data->prog_data->args->verbose_count, &column_width) < 0) goto cleanup; sdr_callback_arg.state_data = state_data; sdr_callback_arg.column_width = &column_width; sdr_callback_arg.header_output_flag = 0; if (ipmi_sdr_cache_iterate (state_data->sdr_ctx, _sun_get_led_sdr_callback, &sdr_callback_arg) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_iterate: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_oem_sun_set_led (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint16_t record_id; uint8_t led_mode; long value; char *ptr; uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_len = 0; uint8_t record_type; uint8_t entity_instance_type; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); errno = 0; value = strtol (state_data->prog_data->args->oem_options[0], &ptr, 10); if (errno || ptr[0] != '\0' || value < 0 || value < IPMI_SDR_RECORD_ID_FIRST || value > IPMI_SDR_RECORD_ID_LAST) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid record_id\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } record_id = value; if (strcasecmp (state_data->prog_data->args->oem_options[1], "off") && strcasecmp (state_data->prog_data->args->oem_options[1], "on") && strcasecmp (state_data->prog_data->args->oem_options[1], "standby") && strcasecmp (state_data->prog_data->args->oem_options[1], "slow") && strcasecmp (state_data->prog_data->args->oem_options[1], "fast")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[1], "off")) led_mode = IPMI_OEM_SUN_LED_MODE_OFF; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "on")) led_mode = IPMI_OEM_SUN_LED_MODE_ON; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "standby")) led_mode = IPMI_OEM_SUN_LED_MODE_STANDBY; else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "slow")) led_mode = IPMI_OEM_SUN_LED_MODE_SLOW; else /* !strcasecmp (state_data->prog_data->args->oem_options[1], "fast") */ led_mode = IPMI_OEM_SUN_LED_MODE_FAST; if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) goto cleanup; /* Sun OEM * * From Ipmitool (http://ipmitool.sourceforge.net/) * * Set Led Request * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x22 - OEM cmd * 0x?? - Device Slave Address (in General Device Locator Record) * - Note that the IPMI command requires the entire * byte of the slave address. * 0x?? - LED Type (see below [1]) * - 0 - ok2rm * - 1 - service * - 2 - activity * - 3 - locate * 0x?? - Controller Address / Device Access Address (in General Device Locator Record) * - 0x20 if the LED is local * - Note that the IPMI command requires the entire * byte of the access address. * 0x?? - HW Info (OEM field in General Device Locator Record) * 0x?? - LED Mode * 0x?? - Force * - 0 - Go thru controller * - 1 - Directly access device * 0x?? - Role * - Ipmitool comments state "Used by BMC for authorization purposes" * - achu: I have no idea what this is for, set to 0 like in code * * An alternate format is described in the ipmitool comments for Sun * Blade Moduler Systems. * * 0x2E - OEM network function (is IPMI_NET_FN_OEM_GROUP_RQ) * 0x22 - OEM cmd * 0x?? - Device Slave Address (in General Device Locator Record) * 0x?? - LED Type * 0x?? - Controller Address / Device Access Address (in General Device Locator Record) * 0x?? - HW Info (OEM field in General Device Locator Record) * 0x?? - LED Mode * 0x?? - Entity ID * 0x?? - Entity Instance * - 7 bit version * 0x?? - Force * - 0 - Go thru controller * - 1 - Directly access device * 0x?? - Role * - Ipmitool comments state "Used by BMC for authorization purposes" * - achu: I have no idea what this is for, set to 0 like in code * * Set Led Response * * 0x22 - OEM cmd * 0x?? - Completion Code * * achu notes: * * [1] - As far as I can tell, the LED type field is useless. My * assumption is that on older Sun systems, or other motherboards I * don't have access to, one can specify an LED type, which allows * you to enable/disable a particular LED amongst many. On my Sun * Fire 4140, it appears to do nothing and affect nothing. I will * add in a new option later if it becomes necessary for the user to * specify an LED type. In the meantime, I will copy the code use * in ipmitool and set this field to the OEM field. */ if (ipmi_sdr_cache_search_record_id (state_data->sdr_ctx, record_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if ((sdr_record_len = ipmi_sdr_cache_record_read (state_data->sdr_ctx, sdr_record, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_record_read: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, sdr_record, sdr_record_len, NULL, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (record_type != IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD) { pstdout_fprintf (state_data->pstate, stderr, "Record ID points to invalid record type: %Xh\n", record_type); goto cleanup; } if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, sdr_record, sdr_record_len, NULL, NULL, &entity_instance_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_id_and_instance: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (entity_instance_type != IPMI_SDR_PHYSICAL_ENTITY) { pstdout_fprintf (state_data->pstate, stderr, "Record ID points to non physical entity\n"); goto cleanup; } /* achu: the sun oem commands want the full byte, not just the * sub-field, so use indexes instead of sdr-parse lib. */ bytes_rq[0] = IPMI_CMD_OEM_SUN_SET_LED; bytes_rq[1] = sdr_record[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_SLAVE_ADDRESS_INDEX]; bytes_rq[2] = sdr_record[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_OEM_INDEX]; bytes_rq[3] = sdr_record[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_DEVICE_ACCESS_ADDRESS_INDEX]; bytes_rq[4] = sdr_record[IPMI_SDR_RECORD_GENERIC_DEVICE_LOCATOR_OEM_INDEX]; bytes_rq[5] = led_mode; bytes_rq[6] = IPMI_OEM_SUN_LED_FORCE_GO_THRU_CONTROLLER; bytes_rq[7] = 0; /* see comments above, just set to 0 */ if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_GROUP_RQ, /* network function */ bytes_rq, /* data */ 8, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_SUN_SET_LED, IPMI_NET_FN_OEM_GROUP_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-sun.h0000644002055400205540000000164113527331635017470 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_SUN_H #define IPMI_OEM_SUN_H #include "ipmi-oem.h" int ipmi_oem_sun_get_led (ipmi_oem_state_data_t *state_data); int ipmi_oem_sun_set_led (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_SUN_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-supermicro.c0000644002055400205540000005206013527331635021047 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-supermicro.h" #include "freeipmi-portability.h" #include "pstdout.h" #define IPMI_OEM_SUPERMICRO_STRING_MAX 128 int ipmi_oem_supermicro_extra_firmware_info (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint32_t firmware_major_version; uint32_t firmware_minor_version; uint32_t firmware_sub_version; uint32_t firmware_build_number; uint8_t firmware_hardware_id; char firmware_tag[IPMI_OEM_SUPERMICRO_STRING_MAX+1]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (firmware_tag, '\0', IPMI_OEM_SUPERMICRO_STRING_MAX + 1); /* Supermicro OEM * * From post by ipmitool developer. * * http://sourceforge.net/mailarchive/message.php?msg_name=49ABCCC3.4040004%40cern.ch * * Request * * 0x3C - OEM network function * 0x20 - OEM cmd * * Response * 0x20 - OEM cmd * 0x?? - Completion Code * 4 bytes - firmware major version (LSB first) * 4 bytes - firmware minor version (LSB first) * 4 bytes - firmware sub version (LSB first) * 4 bytes - firmware build number (LSB first) * 1 byte - hardware ID * ? bytes - firmware tag, null terminated string */ bytes_rq[0] = IPMI_CMD_OEM_SUPERMICRO_EXTRA_FIRMWARE_INFO; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_SUPERMICRO_PEPPERCON_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 19, IPMI_CMD_OEM_SUPERMICRO_EXTRA_FIRMWARE_INFO, IPMI_NET_FN_OEM_SUPERMICRO_PEPPERCON_RS, NULL) < 0) goto cleanup; firmware_major_version = bytes_rs[2]; firmware_major_version |= (bytes_rs[3] << 8); firmware_major_version |= (bytes_rs[4] << 16); firmware_major_version |= (bytes_rs[5] << 24); firmware_minor_version = bytes_rs[6]; firmware_minor_version |= (bytes_rs[7] << 8); firmware_minor_version |= (bytes_rs[8] << 16); firmware_minor_version |= (bytes_rs[9] << 24); firmware_sub_version = bytes_rs[10]; firmware_sub_version |= (bytes_rs[11] << 8); firmware_sub_version |= (bytes_rs[12] << 16); firmware_sub_version |= (bytes_rs[13] << 24); firmware_build_number = bytes_rs[14]; firmware_build_number |= (bytes_rs[15] << 8); firmware_build_number |= (bytes_rs[16] << 16); firmware_build_number |= (bytes_rs[17] << 24); firmware_hardware_id = bytes_rs[18]; if (rs_len > 19) memcpy (firmware_tag, &bytes_rs[19], rs_len - 19); /* assume minor version is BCD, just like in Get Device ID command */ /* assume sub version is also BCD */ pstdout_printf (state_data->pstate, "Firmware Version : %u.%02x.%02x\n", firmware_major_version, firmware_minor_version, firmware_sub_version); pstdout_printf (state_data->pstate, "Firmware Build Number : %u\n", firmware_build_number); pstdout_printf (state_data->pstate, "Firmware Hardware ID : %u\n", firmware_hardware_id); pstdout_printf (state_data->pstate, "Firmware Tag : %s\n", firmware_tag); rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_reset_intrusion (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Supermicro OEM * * 0x30 - OEM network function * 0x03 - OEM cmd */ bytes_rq[0] = IPMI_CMD_OEM_SUPERMICRO_RESET_INTRUSION; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_SUPERMICRO_RESET_INTRUSION, IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_get_bmc_services_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Supermicro OEM * * Request * * 0x30 - OEM network function * 0x70 - OEM cmd * 0xF0 - Sub-command * 0x?? - action * - 0x00 - disable * - 0x01 - enable * - 0x02 - status * * Response * * 0x70 - OEM cmd * 0x?? - Completion Code * 0x?? - if action == status * - 0x00 - disabled * - 0x01 - enabled */ bytes_rq[0] = IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION; bytes_rq[1] = IPMI_OEM_SUPERMICRO_SUB_COMMAND_BMC_SERVICES; bytes_rq[2] = IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION, IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_BMC_SERVICES_STATUS_DISABLED) pstdout_printf (state_data->pstate, "disabled\n"); else if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_BMC_SERVICES_STATUS_ENABLED) pstdout_printf (state_data->pstate, "enabled\n"); else pstdout_fprintf (state_data->pstate, stderr, "Unknown Non-IPMI Ports Status\n"); rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_set_bmc_services_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Supermicro OEM * * Request * * 0x30 - OEM network function * 0x70 - OEM cmd * 0xF0 - Sub-command * 0x?? - action * - 0x00 - disable * - 0x01 - enable * - 0x02 - status * * Response * * 0x70 - OEM cmd * 0x?? - Completion Code * 0x?? - if action == status * - 0x00 - disabled * - 0x01 - enabled */ bytes_rq[0] = IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION; bytes_rq[1] = IPMI_OEM_SUPERMICRO_SUB_COMMAND_BMC_SERVICES; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_ENABLE; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "disable") */ bytes_rq[2] = IPMI_OEM_SUPERMICRO_BMC_SERVICES_ACTION_DISABLE; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_SUPERMICRO_GENERIC_EXTENSION, IPMI_NET_FN_OEM_SUPERMICRO_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_get_power_supply_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "1") && strcasecmp (state_data->prog_data->args->oem_options[0], "2") && strcasecmp (state_data->prog_data->args->oem_options[0], "3")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Supermicro OEM * From Supermicro Engineer * * Request * * 0x06 - network function * 0x52 - cmd (master read/write) * 0x07 - (channel = 0, bus id = 3, bus type = private) * 0x?? - slave address * - 0x70 - ps 1 * - 0x72 - ps 2 * - 0x74 - ps 3 * 0x01 - read count * 0x0c - data to write ... no idea why 0x0c * * Response * * 0x52 - cmd * 0x?? - Completion Code * 0x?? - 0x01 - good * - 0x00 - bad */ bytes_rq[0] = IPMI_CMD_MASTER_WRITE_READ; bytes_rq[1] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_CHANNEL; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "1")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "2")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS2; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "3") */ bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_PS3; bytes_rq[3] = 1; bytes_rq[4] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_MAGIC; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_APP_RQ, bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_MASTER_WRITE_READ, IPMI_NET_FN_APP_RQ, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_GOOD) pstdout_printf (state_data->pstate, "good\n"); else if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS_BAD) pstdout_printf (state_data->pstate, "bad\n"); else pstdout_printf (state_data->pstate, "unknown\n"); rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_get_power_supply_status2 (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "1") && strcasecmp (state_data->prog_data->args->oem_options[0], "2")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Supermicro OEM * From Supermicro Engineer * * Request * * 0x06 - network function * 0x52 - cmd (master read/write) * 0x07 - (channel = 0, bus id = 3, bus type = private) * 0x?? - slave address * - 0xb0 - ps 1 * - 0xb2 - ps 2 * 0x02 - read count * 0x79 - data to write ... no idea why 0x0c * * Response * * 0x52 - cmd * 0x?? - Completion Code * 0x?? - 0x00 or 0x02 good, anything else bad */ bytes_rq[0] = IPMI_CMD_MASTER_WRITE_READ; bytes_rq[1] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_CHANNEL; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "1")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_PS1; else /* (!strcasecmp (state_data->prog_data->args->oem_options[0], "2")) */ bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_PS2; bytes_rq[3] = 1; bytes_rq[4] = IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_MAGIC; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_APP_RQ, bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_MASTER_WRITE_READ, IPMI_NET_FN_APP_RQ, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_GOOD1 || bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_POWER_SUPPLY_STATUS2_GOOD2) pstdout_printf (state_data->pstate, "good\n"); else pstdout_printf (state_data->pstate, "bad\n"); rv = 0; cleanup: return (rv); } int ipmi_oem_supermicro_get_pmbus_power_supply_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "1") && strcasecmp (state_data->prog_data->args->oem_options[0], "2") && strcasecmp (state_data->prog_data->args->oem_options[0], "3")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Supermicro OEM * From Supermicro Engineer * * Request * * 0x06 - network function * 0x52 - cmd (master read/write) * 0x07 - (channel = 0, bus id = 3, bus type = private) * 0x?? - slave address * - 0x78 - ps 1 * - 0x7a - ps 2 * - 0x7c - ps 3 * 0x01 - read count * 0x78 - data to write ... no idea why 0x78 * * Response * * 0x52 - cmd * 0x?? - Completion Code * 0x?? - 0x01 - good * - 0x00 - bad */ bytes_rq[0] = IPMI_CMD_MASTER_WRITE_READ; bytes_rq[1] = IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_CHANNEL; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "1")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "2")) bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS2; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "3") */ bytes_rq[2] = IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_PS3; bytes_rq[3] = 1; bytes_rq[4] = IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_MAGIC; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_APP_RQ, bytes_rq, /* data */ 5, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_MASTER_WRITE_READ, IPMI_NET_FN_APP_RQ, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_GOOD) pstdout_printf (state_data->pstate, "good\n"); else if (bytes_rs[2] == IPMI_OEM_SUPERMICRO_GET_PMBUS_POWER_SUPPLY_STATUS_BAD) pstdout_printf (state_data->pstate, "bad\n"); else pstdout_printf (state_data->pstate, "unknown\n"); rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-supermicro.h0000644002055400205540000000261613527331635021056 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_SUPERMICRO_H #define IPMI_OEM_SUPERMICRO_H #include "ipmi-oem.h" int ipmi_oem_supermicro_extra_firmware_info (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_reset_intrusion (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_get_bmc_services_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_set_bmc_services_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_get_power_supply_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_get_power_supply_status2 (ipmi_oem_state_data_t *state_data); int ipmi_oem_supermicro_get_pmbus_power_supply_status (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_SUPERMICRO_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-thirdparty.c0000644002055400205540000030367713527331635021066 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-thirdparty.h" #include "freeipmi-portability.h" #include "pstdout.h" /* Common functions for OEM extensions shared between multiple vendors * b/c they share a common third party firmware */ int ipmi_oem_thirdparty_get_system_info_block_pstring (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, char *string, unsigned int string_len) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t set_selector = 0; uint8_t string_length = 0; unsigned int string_count = 0; uint8_t string_encoding; int len; int rv = -1; assert (state_data); assert (string); assert (string_len); assert (IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK == IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_BITMASK); assert (IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT == IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_SHIFT); assert (IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1 == IPMI_OEM_WISTRON_SYSTEM_INFO_STRING_ENCODING_PRINTABLE_ASCII); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_system_info_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_GET_SYSTEM_INFO_PARAMETERS_PARAMETER_NOT_SUPPORTED) == 1) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s '%s' option not supported on this system\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 3) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } /* configuration_parameter_data[0] is the set selector, we don't care */ string_encoding = (configuration_parameter_data[1] & IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_BITMASK); string_encoding >>= IPMI_OEM_DELL_SYSTEM_INFO_STRING_ENCODING_SHIFT; if (string_encoding != IPMI_SYSTEM_INFO_ENCODING_ASCII_LATIN1) { pstdout_fprintf (state_data->pstate, stderr, "Cannot handle non-ASCII encoding: %Xh\n", configuration_parameter_data[0]); goto cleanup; } string_length = configuration_parameter_data[2]; if (!string_length) goto out; /* -3 b/c of set selector, encoding, and string length bytes */ if (len - 3) { if ((len - 3) > (string_len - string_count)) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow\n"); goto cleanup; } memcpy (string + string_count, &(configuration_parameter_data[3]), (len - 3)); string_count += (len - 3); } /* string_length is 8 bits, so we should not call >= 17 times, * * ceiling ( (255 - 14) / 16 ) + 1 = 17 * */ set_selector++; while (string_count < string_length && set_selector < 17) { if (ipmi_cmd_get_system_info_parameters (state_data->ipmi_ctx, IPMI_GET_SYSTEM_INFO_PARAMETER, parameter_selector, set_selector, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 2) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_system_info_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } /* configuration_parameter_data[0] is the set selector, we don't care */ if ((string_count + (len - 1)) > (string_len - string_count)) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow\n"); goto cleanup; } memcpy (string + string_count, &(configuration_parameter_data[1]), (len - 1)); string_count += (len - 1); set_selector++; } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _thirdparty_get_reservation (ipmi_oem_state_data_t *state_data, uint8_t *reservation_id) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * Get Reservation Request * * 0x30 - OEM network function * 0x01 - OEM cmd * * Get Reservation Response * * 0x01 - OEM cmd * 0x?? - Completion Code * 0x?? - Reservation ID */ assert (state_data); assert (reservation_id); assert (IPMI_CMD_OEM_INVENTEC_RESERVED_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_QUANTA_RESERVED_EXTENDED_CONFIGURATION); assert (IPMI_CMD_OEM_INVENTEC_RESERVED_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_WISTRON_RESERVED_EXTENDED_CONFIGURATION); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_QUANTA_GENERIC_RS); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_WISTRON_GENERIC_RS); bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_RESERVED_EXTENDED_CONFIGURATION; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_INVENTEC_RESERVED_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; (*reservation_id) = bytes_rs[2]; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_extended_config_value (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, unsigned int value_return_length, uint32_t *value) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t reservation_id; int rv = -1; assert (state_data); assert (value_return_length == 1 || value_return_length == 2 || value_return_length == 3 || value_return_length == 4); assert (value); assert (IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_QUANTA_GET_EXTENDED_CONFIGURATION); assert (IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_WISTRON_GET_EXTENDED_CONFIGURATION); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_QUANTA_GENERIC_RS); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_WISTRON_GENERIC_RS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_QUANTA_EXTENDED_CONFIG_READ_ALL_BYTES); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_WISTRON_EXTENDED_CONFIG_READ_ALL_BYTES); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * Get Extended Configuration Request * * 0x30 - OEM network function * 0x02 - OEM cmd * 0x?? - Reservation ID * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x00 - Data Offset - LSB (unused here??) * 0x00 = Data Offset - MSB (unused here??) * 0xFF - Bytes to read (0xFF = all) * * Get Extended Configuration Response * * 0x02 - OEM cmd * 0x?? - Completion Code * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x?? - number of bytes returned * bytes ... */ if (_thirdparty_get_reservation (state_data, &reservation_id) < 0) goto cleanup; bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION; bytes_rq[1] = reservation_id; bytes_rq[2] = configuration_id; bytes_rq[3] = attribute_id; bytes_rq[4] = index; bytes_rq[5] = 0x00; bytes_rq[6] = 0x00; bytes_rq[7] = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 8, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6 + value_return_length, IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; (*value) = 0; if (value_return_length == 1) (*value) = bytes_rs[6]; else if (value_return_length == 2) { (*value) = bytes_rs[6]; (*value) |= (bytes_rs[7] << 8); } else if (value_return_length == 3) { (*value) = bytes_rs[6]; (*value) |= (bytes_rs[7] << 8); (*value) |= (bytes_rs[8] << 16); } else { (*value) = bytes_rs[6]; (*value) |= (bytes_rs[7] << 8); (*value) |= (bytes_rs[8] << 16); (*value) |= (bytes_rs[9] << 24); } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_extended_config_string (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, char *buf, unsigned int buflen) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t reservation_id; int rv = -1; assert (state_data); assert (buf); assert (buflen); assert (IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_QUANTA_GET_EXTENDED_CONFIGURATION); assert (IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_WISTRON_GET_EXTENDED_CONFIGURATION); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_QUANTA_GENERIC_RS); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_WISTRON_GENERIC_RS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_QUANTA_EXTENDED_CONFIG_READ_ALL_BYTES); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_WISTRON_EXTENDED_CONFIG_READ_ALL_BYTES); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * Get Extended Configuration Request * * 0x30 - OEM network function * 0x02 - OEM cmd * 0x?? - Reservation ID * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x00 - Data Offset - LSB (unused here??) * 0x00 = Data Offset - MSB (unused here??) * 0xFF - Bytes to read (0xFF = all) * * Get Extended Configuration Response * * 0x02 - OEM cmd * 0x?? - Completion Code * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x?? - number of bytes returned * bytes ... */ if (_thirdparty_get_reservation (state_data, &reservation_id) < 0) goto cleanup; bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION; bytes_rq[1] = reservation_id; bytes_rq[2] = configuration_id; bytes_rq[3] = attribute_id; bytes_rq[4] = index; bytes_rq[5] = 0x00; bytes_rq[6] = 0x00; bytes_rq[7] = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 8, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_INVENTEC_GET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; memset (buf, '\0', buflen); if ((rs_len - 6) > 0) { uint8_t len; /* According to docs - all strings are stored as P-strings */ len = bytes_rs[6]; if (len != (rs_len - 7)) { pstdout_fprintf (state_data->pstate, stderr, "P-string length returned invalid: len = %u, rs_len = %u\n", len, rs_len); goto cleanup; } if ((rs_len - 7) > buflen) { pstdout_fprintf (state_data->pstate, stderr, "internal buffer overflow: rs_len = %u, buflen = %u\n", rs_len, buflen); goto cleanup; } memcpy (buf, &bytes_rs[7], rs_len - 7); } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_extended_config_value (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, unsigned int value_length, uint32_t value) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t reservation_id; int rv = -1; assert (state_data); assert (value_length == 1 || value_length == 2 || value_length == 3 || value_length == 4); assert (IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_QUANTA_SET_EXTENDED_CONFIGURATION); assert (IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_WISTRON_SET_EXTENDED_CONFIGURATION); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_QUANTA_GENERIC_RS); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_WISTRON_GENERIC_RS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_QUANTA_EXTENDED_CONFIG_READ_ALL_BYTES); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_WISTRON_EXTENDED_CONFIG_READ_ALL_BYTES); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * Set Extended Configuration Request * * 0x30 - OEM network function * 0x03 - OEM cmd * 0x?? - Reservation ID * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x00 - Data Offset - LSB (unused here??) * 0x00 = Data Offset - MSB (unused here??) * 0x01 - In progress bit (0x00 in progress, 0x01 - last config in this request) * bytes ... * * Set Extended Configuration Response * * 0x03 - OEM cmd * 0x?? - Completion Code * 0x?? - bytes written */ if (_thirdparty_get_reservation (state_data, &reservation_id) < 0) goto cleanup; bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION; bytes_rq[1] = reservation_id; bytes_rq[2] = configuration_id; bytes_rq[3] = attribute_id; bytes_rq[4] = index; bytes_rq[5] = 0x00; bytes_rq[6] = 0x00; bytes_rq[7] = 0x01; if (value_length == 1) bytes_rq[8] = (value & 0x000000FF); else if (value_length == 2) { bytes_rq[8] = (value & 0x000000FF); bytes_rq[9] = (value & 0x0000FF00) >> 8; } else if (value_length == 3) { bytes_rq[8] = (value & 0x000000FF); bytes_rq[9] = (value & 0x0000FF00) >> 8; bytes_rq[10] = (value & 0x00FF0000) >> 16; } else { bytes_rq[8] = (value & 0x000000FF); bytes_rq[9] = (value & 0x0000FF00) >> 8; bytes_rq[10] = (value & 0x00FF0000) >> 16; bytes_rq[11] = (value & 0xFF000000) >> 24; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 8 + value_length, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_extended_config_string (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, char *buf, unsigned int buflen) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t reservation_id; int rv = -1; assert (state_data); assert (buf); assert (IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_QUANTA_SET_EXTENDED_CONFIGURATION); assert (IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION == IPMI_CMD_OEM_WISTRON_SET_EXTENDED_CONFIGURATION); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_QUANTA_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ == IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_QUANTA_GENERIC_RS); assert (IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS == IPMI_NET_FN_OEM_WISTRON_GENERIC_RS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_QUANTA_EXTENDED_CONFIG_READ_ALL_BYTES); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_READ_ALL_BYTES == IPMI_OEM_WISTRON_EXTENDED_CONFIG_READ_ALL_BYTES); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * Set Extended Configuration Request * * 0x30 - OEM network function * 0x03 - OEM cmd * 0x?? - Reservation ID * 0x?? - Configuration ID * 0x?? - Attribute ID * 0x00 - Index * 0x00 - Data Offset - LSB (unused here??) * 0x00 = Data Offset - MSB (unused here??) * 0x01 - In progress bit (0x00 in progress, 0x01 - last config in this request) * bytes ... * * Set Extended Configuration Response * * 0x03 - OEM cmd * 0x?? - Completion Code * 0x?? - bytes written */ if (_thirdparty_get_reservation (state_data, &reservation_id) < 0) goto cleanup; bytes_rq[0] = IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION; bytes_rq[1] = reservation_id; bytes_rq[2] = configuration_id; bytes_rq[3] = attribute_id; bytes_rq[4] = index; bytes_rq[5] = 0x00; bytes_rq[6] = 0x00; bytes_rq[7] = 0x01; bytes_rq[8] = strlen (buf); if (buflen) memcpy (&bytes_rq[9], buf, buflen); if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_INVENTEC_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 9 + buflen, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_INVENTEC_SET_EXTENDED_CONFIGURATION, IPMI_NET_FN_OEM_INVENTEC_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_nic_mode (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_NIC); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_NIC); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_NIC_MODE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SELECTION); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_SHARED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_SHARED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_DEDICATED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_DEDICATED); /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * achu: For Inventec 5441/Dell Xanadu II, Dell appears to have also * implemented an additional OEM command that duplicates this * configuration. Currently, we do not implement the Dell * equivalent in ipmi-oem. It is listed below for documentation. * * Get LAN Source Request * * 0x34 - OEM network function * 0x14 - OEM cmd * * Get LAN Source Response * * 0x14 - OEM cmd * 0x?? - Completion Code * 0x?? - LAN Source Setting * - 00h = shared, 01h = dedicated */ if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE, 0, 1, &tmpvalue) < 0) goto cleanup; switch (tmpvalue) { case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED: pstdout_printf (state_data->pstate, "shared\n"); break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED: pstdout_printf (state_data->pstate, "dedicated\n"); break; default: pstdout_printf (state_data->pstate, "unknown NIC mode: %Xh\n", tmpvalue); break; } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_nic_mode (ipmi_oem_state_data_t *state_data) { uint8_t mode; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_NIC); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_NIC); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_NIC_MODE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SELECTION); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_SHARED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_SHARED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_NIC_MODE_DEDICATED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_NIC_MODE_DEDICATED); if (strcasecmp (state_data->prog_data->args->oem_options[0], "shared") && strcasecmp (state_data->prog_data->args->oem_options[0], "dedicated")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 * * achu: For Inventec 5441/Dell Xanadu II, Dell appears to have also * implemented an additional OEM command that duplicates this * configuration. Currently, we do not implement the Dell * equivalent in ipmi-oem. It is listed below for documentation. * * Set LAN Source Request * * 0x34 - OEM network function * 0x13 - OEM cmd * 0x?? - LAN Source * - 00h = shared, 01h = dedicated * * Set LAN Source Response * * 0x13 - OEM cmd * 0x?? - Completion Code * 0x?? - LAN Source Setting */ if (!strcasecmp (state_data->prog_data->args->oem_options[0], "shared")) mode = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_SHARED; else mode = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_NIC_MODE_DEDICATED; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_NIC, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_NIC_MODE, 0, 1, (uint32_t)mode) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_bmc_services_bitmask (ipmi_oem_state_data_t *state_data, uint8_t *services) { uint32_t tmpvalue; int rv = -1; assert (state_data); assert (services); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SECURITY); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SECURITY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED, 0, 1, &tmpvalue) < 0) goto cleanup; (*services) = tmpvalue; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_bmc_services_v1 (ipmi_oem_state_data_t *state_data) { uint8_t services = 0; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET); if (ipmi_oem_thirdparty_get_bmc_services_bitmask (state_data, &services) < 0) goto cleanup; if (services) { /* achu: it is not clear if only one bit or multiple bits can be * set. I'm assuming if the "all" bit is set, there is no need * to output anything else. */ if (services & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL) { pstdout_printf (state_data->pstate, "All services except IPMI disabled\n"); goto out; } if (services & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE) pstdout_printf (state_data->pstate, "KVM/Virtual Storage disabled\n"); if (services & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS) pstdout_printf (state_data->pstate, "HTTP/HTTPS disabled\n"); if (services & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET) pstdout_printf (state_data->pstate, "SSH/Telnet disabled\n"); } else pstdout_printf (state_data->pstate, "All services enabled\n"); out: rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_bmc_services_v1 (ipmi_oem_state_data_t *state_data) { int enable = 0; uint8_t services = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET == IPMI_OEM_QUANTA_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SECURITY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "all") && strcasecmp (state_data->prog_data->args->oem_options[1], "kvm") && strcasecmp (state_data->prog_data->args->oem_options[1], "http") && strcasecmp (state_data->prog_data->args->oem_options[1], "ssh")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) enable = 1; /* if all, it's an easy special case */ if (!strcasecmp (state_data->prog_data->args->oem_options[1], "all")) { if (enable) services = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL; else services = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL; } else { if (ipmi_oem_thirdparty_get_bmc_services_bitmask (state_data, &services) < 0) goto cleanup; if (enable && (services & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL)) { /* clear out "all" bit, and replace with remaining bits */ services &= (~IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL); services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE; services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS; services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET; } if (!strcasecmp (state_data->prog_data->args->oem_options[1], "kvm")) { if (enable) services &= (~IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE); else services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "http")) { if (enable) services &= (~IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS); else services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS; } else /* !strcasecmp (state_data->prog_data->args->oem_options[1], "ssh") */ { if (enable) services &= (~IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET); else services |= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH_TELNET; } } if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED, 0, 1, (uint32_t)services) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_account_status (ipmi_oem_state_data_t *state_data) { fiid_obj_t get_user_access_obj_cmd_rs = NULL; fiid_obj_t get_user_name_obj_cmd_rs = NULL; uint32_t tmpvalue; uint8_t lan_channel_number; uint8_t number_of_users; uint64_t val; unsigned int i; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED == IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT == IPMI_OEM_QUANTA_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT == IPMI_OEM_WISTRON_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT); /* achu: * * IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_NUMBER_OF_USER * returns the number of enabled/disabled users, not the total, * which is not what we need in this function. */ if (!(get_user_access_obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_access_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_user_access (state_data->ipmi_ctx, lan_channel_number, 1, /* user_id number - any will do for this call */ get_user_access_obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_access: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (get_user_access_obj_cmd_rs, "max_channel_user_ids", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "FIID_OBJ_GET: 'max_channel_user_ids': %s\n", fiid_obj_errormsg (get_user_access_obj_cmd_rs)); goto cleanup; } if (!(get_user_name_obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_user_name_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } number_of_users = val; pstdout_printf (state_data->pstate, "Username | Status\n"); for (i = 0; i < number_of_users; i++) { char user_name[IPMI_MAX_USER_NAME_LENGTH + 1]; uint8_t account_status; char *account_status_str = NULL; memset (user_name, '\0', IPMI_MAX_USER_NAME_LENGTH + 1); /* achu: * * Docs say * IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME / IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_USER_NAME * string should be returned a P-string. On Inventec * 5441/Xanadu II returned as ASCII, on Inventec 5442/Xanadu III * strings returned as P-string. On Quanta S99Q/Dell FS12-TY * reports returned as P-string. Screw all that, use normal * IPMI get username function instead. */ if (ipmi_cmd_get_user_name (state_data->ipmi_ctx, i + 1, get_user_name_obj_cmd_rs) < 0) { /* Username is not set yet */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (get_user_name_obj_cmd_rs, IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) == 1)) continue; pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_user_name: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (fiid_obj_get_data (get_user_name_obj_cmd_rs, "user_name", user_name, IPMI_MAX_USER_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'user_name': %s\n", fiid_obj_errormsg (get_user_name_obj_cmd_rs)); goto cleanup; } /* if not the first user id - but username is empty, skip output */ if (i && !strlen (user_name)) continue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_ACCOUNT_STATUS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_ACCOUNT_STATUS_ACCOUNT_STATUS, i + 1, 1, &tmpvalue) < 0) goto cleanup; account_status = tmpvalue; switch (account_status) { case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_UNSPECIFIED: account_status_str = "Unspecified"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_ENABLED: account_status_str = "Enabled"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_DISABLED: account_status_str = "Disabled"; break; case IPMI_OEM_INVENTEC_EXTENDED_CONFIG_ACCOUNT_STATUS_LOCKOUT: account_status_str = "Lockout"; break; default: account_status_str = "Unknown"; } pstdout_printf (state_data->pstate, "%-16s | %s\n", user_name, account_status_str); } rv = 0; cleanup: fiid_obj_destroy (get_user_access_obj_cmd_rs); return (rv); } int ipmi_oem_thirdparty_get_dns_config_v1 (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t dnsdhcpenable; uint32_t dnsserver1; uint32_t dnsserver2; uint8_t dnsregisterbmc; char dnsbmchostname[IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1]; uint8_t dnsdomainnamedhcpenable; char dnsdomainname[IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX == IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX == IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_DNS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1 == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2 == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME); memset (dnsbmchostname, '\0', IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1); memset (dnsdomainname, '\0', IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; dnsdhcpenable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1, 0, 4, &tmpvalue) < 0) goto cleanup; dnsserver1 = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2, 0, 4, &tmpvalue) < 0) goto cleanup; dnsserver2 = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC, 0, 1, &tmpvalue) < 0) goto cleanup; dnsregisterbmc = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME, 0, dnsbmchostname, IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; dnsdomainnamedhcpenable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME, 0, dnsdomainname, IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX) < 0) goto cleanup; pstdout_printf (state_data->pstate, "DNS DHCP : %s\n", (dnsdhcpenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS Server 1 : %u.%u.%u.%u\n", (dnsserver1 & 0x000000FF), (dnsserver1 & 0x0000FF00) >> 8, (dnsserver1 & 0x00FF0000) >> 16, (dnsserver1 & 0xFF000000) >> 24); pstdout_printf (state_data->pstate, "DNS Server 2 : %u.%u.%u.%u\n", (dnsserver2 & 0x000000FF), (dnsserver2 & 0x0000FF00) >> 8, (dnsserver2 & 0x00FF0000) >> 16, (dnsserver2 & 0xFF000000) >> 24); pstdout_printf (state_data->pstate, "DNS Register BMC : %s\n", (dnsregisterbmc) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS BMC Host Name : %s\n", dnsbmchostname); pstdout_printf (state_data->pstate, "DNS Domain Name DHCP : %s\n", (dnsdomainnamedhcpenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS Domain Name : %s\n", dnsdomainname); rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_dns_config_v1 (ipmi_oem_state_data_t *state_data) { uint8_t dnsdhcpenable = 0; uint32_t dnsserver1 = 0; uint32_t dnsserver2 = 0; uint8_t dnsregisterbmc = 0; char dnsbmchostname[IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1]; uint8_t dnsdomainnamedhcpenable = 0; char dnsdomainname[IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1]; int rv = -1; unsigned int i; assert (state_data); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX == IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX == IPMI_OEM_QUANTA_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_DNS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1 == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2 == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME); memset (dnsbmchostname, '\0', IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1); memset (dnsdomainname, '\0', IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: dnsdhcp=enable|disable\n" "Option: dnsserver1=ipaddress\n" "Option: dnsserver2=ipaddress\n" "Option: dnsregisterbmc=enable|disable\n" "Option: dnsbmchostname=string\n" "Option: dnsdomainnamedhcp=enable|disable\n" "Option: dnsdomainname=string\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "dnsdhcp")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsdhcpenable) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE, 0, 1, (uint32_t)dnsdhcpenable) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsserver1")) { if (ipmi_oem_parse_ip_address (state_data, i, value, &dnsserver1) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1, 0, 4, (uint32_t)dnsserver1) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsserver2")) { if (ipmi_oem_parse_ip_address (state_data, i, value, &dnsserver2) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2, 0, 4, (uint32_t)dnsserver2) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsregisterbmc")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsregisterbmc) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC, 0, 1, (uint32_t)dnsregisterbmc) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsbmchostname")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, dnsbmchostname, IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME, 0, dnsbmchostname, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsdomainnamedhcp")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsdomainnamedhcpenable) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE, 0, 1, (uint32_t)dnsdomainnamedhcpenable) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsdomainname")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, dnsdomainname, IPMI_OEM_INVENTEC_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME, 0, dnsdomainname, (unsigned int)string_length) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_web_server_config_v1 (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t webserverenabled; uint8_t maxwebsessions; uint8_t activewebsessions; uint32_t webservertimeout; uint16_t httpportnum; uint16_t httpsportnum; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM); /* Inventec 5441/Dell Xanadu II OEM * * achu: For Inventec 5441/Dell Xanadu II, Dell appears to have also * implemented an additional OEM command that duplicates this * configuration. Currently, we do not implement the Dell * equivalent in ipmi-oem. It is listed below for documentation. * * achu: The document states "web port" and "http port". That * probably means "http" vs. "https" port. The below documents this * typo. * * Get Web Port Num Request * * 0x34 - OEM network function * 0x03 - OEM cmd * * Get Web Port Num Response * * 0x03 - OEM cmd * 0x?? - Completion Code * 0x?? - web port num (LSB) * 0x?? - web port num (MSB) * 0x?? - http num (LSB) * 0x?? - http num (MSB) */ if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED, 0, 1, &tmpvalue) < 0) goto cleanup; webserverenabled = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_MAX_WEB_SESSIONS, 0, 1, &tmpvalue) < 0) goto cleanup; maxwebsessions = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_ACTIVE_WEB_SESSIONS, 0, 1, &tmpvalue) < 0) goto cleanup; activewebsessions = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT, 0, 4, &tmpvalue) < 0) goto cleanup; webservertimeout = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM, 0, 2, &tmpvalue) < 0) goto cleanup; httpportnum = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM, 0, 2, &tmpvalue) < 0) goto cleanup; httpsportnum = tmpvalue; pstdout_printf (state_data->pstate, "Web Server : %s\n", (webserverenabled) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "Max Web Sessions : %u\n", maxwebsessions); pstdout_printf (state_data->pstate, "Active Web Sessions : %u\n", activewebsessions); pstdout_printf (state_data->pstate, "Web Server Timeout : %u seconds\n", webservertimeout); pstdout_printf (state_data->pstate, "http Port Number : %u\n", httpportnum); pstdout_printf (state_data->pstate, "https Port Number : %u\n", httpsportnum); rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_web_server_config_v1 (ipmi_oem_state_data_t *state_data) { uint8_t webserverenabled = 0; uint32_t webservertimeout = 0; uint16_t httpportnumber = 0; uint16_t httpsportnumber = 0; int rv = -1; unsigned int i; assert (state_data); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM); /* Inventec 5441/Dell Xanadu II OEM * * achu: For Inventec 5441/Dell Xanadu II, Dell appears to have also * implemented an additional OEM command that duplicates this * configuration. Currently, we do not implement the Dell * equivalent in ipmi-oem. It is listed below for documentation. * * achu: The document states "web port" and "http port". That * probably means "http" vs. "https" port. The below documents this * typo. * * Set Web Port Num Request * * 0x34 - OEM network function * 0x02 - OEM cmd * 0x?? - web port num (LSB) * 0x?? - web port num (MSB) * 0x?? - http num (LSB) * 0x?? - http num (MSB) * * Set Web Port Num Response * * 0x02 - OEM cmd * 0x?? - Completion Code */ if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: webserver=enable|disable\n" "Option: webservertimeout=seconds\n" "Option: httpportnumber=num\n" "Option: httpsportnumber=num\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "webserver")) { if (ipmi_oem_parse_enable (state_data, i, value, &webserverenabled) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_ENABLED, 0, 1, (uint32_t)webserverenabled) < 0) goto cleanup; } else if (!strcasecmp (key, "webservertimeout")) { if (ipmi_oem_parse_4_byte_field (state_data, i, value, &webservertimeout) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_WEB_SERVER_TIMEOUT, 0, 4, webservertimeout) < 0) goto cleanup; } else if (!strcasecmp (key, "httpportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &httpportnumber) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTP_PORT_NUM, 0, 2, (uint32_t)httpportnumber) < 0) goto cleanup; } else if (!strcasecmp (key, "httpsportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &httpsportnumber) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_HTTPS_PORT_NUM, 0, 2, (uint32_t)httpsportnumber) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_power_management_config_v1 (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t powermanagementenable; uint8_t dpnmpowermanagement; uint8_t powerstaggeringacrecovery; uint16_t powerondelay; uint16_t minpowerondelay; uint16_t maxpowerondelay; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; powermanagementenable = tmpvalue; dpnmpowermanagement = (powermanagementenable & IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_BITMASK); dpnmpowermanagement >>= IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY, 0, 1, &tmpvalue) < 0) goto cleanup; powerstaggeringacrecovery = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; powerondelay = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; minpowerondelay = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; maxpowerondelay = tmpvalue; pstdout_printf (state_data->pstate, "DPNM Power Management : %s\n", (dpnmpowermanagement) ? "Enabled" : "Disabled"); if (powerstaggeringacrecovery == IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : Immediate\n"); else if (powerstaggeringacrecovery == IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : Auto\n"); else if (powerstaggeringacrecovery == IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : User Defined\n"); else pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : %Xh\n", powerstaggeringacrecovery); pstdout_printf (state_data->pstate, "Power On Delay : %u seconds\n", powerondelay); pstdout_printf (state_data->pstate, "Minimum Power On Delay : %u seconds\n", minpowerondelay); pstdout_printf (state_data->pstate, "Maximum Power On Delay : %u seconds\n", maxpowerondelay); rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_power_management_config_v1 (ipmi_oem_state_data_t *state_data) { uint8_t powermanagementenable = 0; uint8_t dpnmpowermanagement = 0; uint8_t powerstaggeringacrecovery = 0; uint16_t powerondelay = 0; uint16_t maxpowerondelay = 0; int rv = -1; unsigned int i; assert (state_data); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT == IPMI_OEM_QUANTA_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: dpnmpowermanagement=enable|disable\n" "Option: powerstaggeringacrecovery=immediate|auto|user\n" "Option: powerondelay=seconds\n" "Option: maxpowerondelay=seconds\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "dpnmpowermanagement")) { if (ipmi_oem_parse_enable (state_data, i, value, &dpnmpowermanagement) < 0) goto cleanup; powermanagementenable |= (dpnmpowermanagement << IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_MANAGEMENT_ENABLE_DPNM_SHIFT); if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_MANAGEMENT_ENABLE, 0, 1, (uint32_t)powermanagementenable) < 0) goto cleanup; } else if (!strcasecmp (key, "powerstaggeringacrecovery")) { if (strcasecmp (value, "immediate") && strcasecmp (value, "auto") && strcasecmp (value, "user")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "immediate")) powerstaggeringacrecovery = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE; else if (!strcasecmp (value, "auto")) powerstaggeringacrecovery = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO; else /* !strcasecmp (value, "user")) */ powerstaggeringacrecovery = IPMI_OEM_INVENTEC_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY, 0, 1, (uint32_t)powerstaggeringacrecovery) < 0) goto cleanup; } else if (!strcasecmp (key, "powerondelay")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &powerondelay) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY, 0, 2, (uint32_t)powerondelay) < 0) goto cleanup; } else if (!strcasecmp (key, "maxpowerondelay")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &maxpowerondelay) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY, 0, 2, (uint32_t)maxpowerondelay) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint16_t timeout; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT, 0, 2, &tmpvalue) < 0) goto cleanup; timeout = tmpvalue; pstdout_printf (state_data->pstate, "%u minutes\n", timeout); rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { uint16_t timeout; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT); if (strcasecmp (state_data->prog_data->args->oem_options[0], "none")) { unsigned int temp; char *endptr = NULL; errno = 0; temp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 10); if (errno || endptr[0] != '\0' || temp > USHRT_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } timeout = temp; } else timeout = 0; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_SOL_IDLE_TIMEOUT, 0, 2, (uint32_t)timeout) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", (tmpvalue) ? "enabled" : "disabled"); rv = 0; cleanup: return (rv); } int ipmi_oem_thirdparty_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data) { uint8_t enable = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); assert (IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL == IPMI_OEM_QUANTA_EXTENDED_CONFIGURATION_ID_SOL); assert (IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE == IPMI_OEM_QUANTA_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) enable = 1; else enable = 0; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_INVENTEC_EXTENDED_CONFIGURATION_ID_SOL, IPMI_OEM_INVENTEC_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_SSH_REDIRECT_ENABLE, 0, 1, (uint32_t)enable) < 0) goto cleanup; rv = 0; cleanup: return (rv); } freeipmi-1.6.4/ipmi-oem/ipmi-oem-thirdparty.h0000644002055400205540000001511713527331635021060 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_THIRDPARTY_H #define IPMI_OEM_THIRDPARTY_H #include "ipmi-oem.h" /* Common functions for OEM extensions shared between multiple vendors * b/c they share a common third party firmware */ /* Shared between: * Wistron/Dell Poweredge C6220 * * String format is: * * Set Selector 0: * * 1st byte = set selector * 2nd byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 3rd byte = string length * ? bytes = string * * Set Selector > 0 * * 1st byte = set selector * ? bytes = string */ int ipmi_oem_thirdparty_get_system_info_block_pstring (ipmi_oem_state_data_t *state_data, uint8_t parameter_selector, char *string, unsigned int string_len); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_extended_config_value (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, unsigned int value_return_length, uint32_t *value); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_extended_config_string (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, char *buf, unsigned int buflen); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_set_extended_config_value (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, unsigned int value_length, uint32_t value); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_set_extended_config_string (ipmi_oem_state_data_t *state_data, uint8_t configuration_id, uint8_t attribute_id, uint8_t index, char *buf, unsigned int buflen); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_nic_mode (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_bmc_services_bitmask (ipmi_oem_state_data_t *state_data, uint8_t *services); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM */ int ipmi_oem_thirdparty_get_bmc_services_v1 (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_bmc_services_v1 (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_account_status (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM */ int ipmi_oem_thirdparty_get_dns_config_v1 (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_dns_config_v1 (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM * Wistron/Dell Poweredge C6220 */ int ipmi_oem_thirdparty_get_web_server_config_v1 (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_web_server_config_v1 (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM */ int ipmi_oem_thirdparty_get_power_management_config_v1 (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_power_management_config_v1 (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM */ int ipmi_oem_thirdparty_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data); /* Shared between: * Inventec 5441/Dell Xanadu II OEM * Inventec 5442/Dell Xanadu III OEM * Quanta S99Q/Dell FS12-TY OEM */ int ipmi_oem_thirdparty_get_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_thirdparty_set_telnet_ssh_redirect_status (ipmi_oem_state_data_t *state_data); #endif /* IPMI_OEM_THIRDPARTY_H */ freeipmi-1.6.4/ipmi-oem/ipmi-oem-wistron.c0000644002055400205540000043127413527331635020374 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmi-oem.h" #include "ipmi-oem-argp.h" #include "ipmi-oem-common.h" #include "ipmi-oem-wistron.h" #include "ipmi-oem-thirdparty.h" #include "tool-util-common.h" #include "freeipmi-portability.h" #include "pstdout.h" int ipmi_oem_wistron_get_system_info (ipmi_oem_state_data_t *state_data) { char assettag[IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG_MAX_LEN + 1]; char servicetag[IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG_MAX_LEN + 1]; char productname[IPMI_OEM_WISTRON_SYSTEM_INFO_MAX_STRING_BYTES + 1]; int rv = -1; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: asset-tag\n" "Option: service-tag\n" "Option: product-name\n"); return (0); } if (state_data->prog_data->args->oem_options_count != 1) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s please specify one get-system-info KEY\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[0], "asset-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "service-tag") && strcasecmp (state_data->prog_data->args->oem_options[0], "product-name")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Wistron/Dell Poweredge C6220 * * Some from Dell Provided Docs * * Uses Get System Info command * * Format #1) * * asset-tag parameter = 196 - max length 20 bytes * service-tag parameter = 197 - max length 7 bytes * * Parameter data response formatted: * * ? bytes = string/buf * * Format #2) * * product-name parameter = 209 * * Parameter data response formatted: * * Set Selector 0: * * 1st byte = set selector * 2nd byte * - 7:4 - reserved * - 3:0 - string encoding, 0 = printable ascii * 3rd byte = string length * ? bytes = string * * Set Selector > 0 * * 1st byte = set selector * ? bytes = string */ memset (assettag, '\0', IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG_MAX_LEN + 1); memset (servicetag, '\0', IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG_MAX_LEN + 1); memset (productname, '\0', IPMI_OEM_WISTRON_SYSTEM_INFO_MAX_STRING_BYTES + 1); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "asset-tag")) { if (ipmi_oem_get_system_info_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, assettag, IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_ASSET_TAG_MAX_LEN, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", assettag); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "service-tag")) { if (ipmi_oem_get_system_info_string (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG, IPMI_SYSTEM_INFO_PARAMETERS_NO_SET_SELECTOR, IPMI_SYSTEM_INFO_PARAMETERS_NO_BLOCK_SELECTOR, servicetag, IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_SERVICE_TAG_MAX_LEN, NULL) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", servicetag); } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "product-name")) { if (ipmi_oem_thirdparty_get_system_info_block_pstring (state_data, IPMI_SYSTEM_INFO_PARAMETER_OEM_WISTRON_PRODUCT_NAME, productname, IPMI_OEM_WISTRON_SYSTEM_INFO_MAX_STRING_BYTES) < 0) goto cleanup; pstdout_printf (state_data->pstate, "%s\n", productname); } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_nic_mode (state_data)); } int ipmi_oem_wistron_set_nic_mode (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_nic_mode (state_data)); } int ipmi_oem_wistron_get_shared_nic_selection (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_NIC, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION, 0, 1, &tmpvalue) < 0) goto cleanup; switch (tmpvalue) { case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_RESERVED: pstdout_printf (state_data->pstate, "clear\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_1: pstdout_printf (state_data->pstate, "nic1\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_2: pstdout_printf (state_data->pstate, "nic2\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_3: pstdout_printf (state_data->pstate, "nic3\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_4: pstdout_printf (state_data->pstate, "nic4\n"); break; default: pstdout_printf (state_data->pstate, "unknown shared NIC selection: %Xh\n", tmpvalue); break; } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_shared_nic_selection (ipmi_oem_state_data_t *state_data) { uint8_t mode; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "nic1") && strcasecmp (state_data->prog_data->args->oem_options[0], "nic2") && strcasecmp (state_data->prog_data->args->oem_options[0], "nic3") && strcasecmp (state_data->prog_data->args->oem_options[0], "nic4") && strcasecmp (state_data->prog_data->args->oem_options[0], "clear")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "nic1")) mode = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_1; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "nic2")) mode = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_2; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "nic3")) mode = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_3; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "nic4")) mode = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_NIC_4; else mode = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION_RESERVED; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_NIC, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_NIC_SHARED_NIC_SELECTION, 0, 1, (uint32_t)mode) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_bmc_services (ipmi_oem_state_data_t *state_data) { uint8_t services = 0; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (ipmi_oem_thirdparty_get_bmc_services_bitmask (state_data, &services) < 0) goto cleanup; if (services) { /* achu: it is not clear if only one bit or multiple bits can be * set. I'm assuming if the "all" bit is set, there is no need * to output anything else. */ if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL) { pstdout_printf (state_data->pstate, "All services except IPMI disabled\n"); goto out; } if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE) pstdout_printf (state_data->pstate, "KVM/Virtual Storage disabled\n"); if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS) pstdout_printf (state_data->pstate, "HTTP/HTTPS disabled\n"); if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH) pstdout_printf (state_data->pstate, "SSH disabled\n"); if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SNMP_V2C_AGENT) pstdout_printf (state_data->pstate, "SNMP v2c agent disabled\n"); if (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_TELNET) pstdout_printf (state_data->pstate, "Telnet disabled\n"); } else pstdout_printf (state_data->pstate, "All services enabled\n"); out: rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_bmc_services (ipmi_oem_state_data_t *state_data) { int enable = 0; uint8_t services = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "all") && strcasecmp (state_data->prog_data->args->oem_options[1], "kvm") && strcasecmp (state_data->prog_data->args->oem_options[1], "http") && strcasecmp (state_data->prog_data->args->oem_options[1], "ssh") && strcasecmp (state_data->prog_data->args->oem_options[1], "snmp") && strcasecmp (state_data->prog_data->args->oem_options[1], "telnet")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) enable = 1; /* if all, it's an easy special case */ if (!strcasecmp (state_data->prog_data->args->oem_options[1], "all")) { if (enable) services = IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_ENABLE_ALL; else services = IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL; } else { if (ipmi_oem_thirdparty_get_bmc_services_bitmask (state_data, &services) < 0) goto cleanup; if (enable && (services & IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL)) { /* clear out "all" bit, and replace with remaining bits */ services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_ALL); services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE; services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS; services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH; services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SNMP_V2C_AGENT; services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_TELNET; } if (!strcasecmp (state_data->prog_data->args->oem_options[1], "kvm")) { if (enable) services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE); else services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_KVM_VIRTUAL_STORAGE; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "http")) { if (enable) services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS); else services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_HTTP_HTTPS; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "ssh")) { if (enable) services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH); else services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SSH; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "snmp")) { if (enable) services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SNMP_V2C_AGENT); else services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_SNMP_V2C_AGENT; } else if (!strcasecmp (state_data->prog_data->args->oem_options[1], "telnet")) { if (enable) services &= (~IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_TELNET); else services |= IPMI_OEM_WISTRON_EXTENDED_CONFIG_SECURITY_SERVICES_DISABLED_BITMASK_TELNET; } } if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SECURITY, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SECURITY_SERVICE_DISABLED, 0, 1, (uint32_t)services) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_account_status (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_account_status (state_data)); } int ipmi_oem_wistron_get_dns_config (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t dnsdhcpenable; uint32_t dnsserver1; uint32_t dnsserver2; uint8_t dnsregisterbmc; char dnsbmchostname[IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1]; uint8_t dnsdomainnamedhcpenable; char dnsdomainname[IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1]; uint8_t dnsregistrationdelay; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (dnsbmchostname, '\0', IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1); memset (dnsdomainname, '\0', IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; dnsdhcpenable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1, 0, 4, &tmpvalue) < 0) goto cleanup; dnsserver1 = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2, 0, 4, &tmpvalue) < 0) goto cleanup; dnsserver2 = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC, 0, 1, &tmpvalue) < 0) goto cleanup; dnsregisterbmc = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME, 0, dnsbmchostname, IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; dnsdomainnamedhcpenable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME, 0, dnsdomainname, IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTRATION_DELAY, 0, 1, &tmpvalue) < 0) goto cleanup; dnsregistrationdelay = tmpvalue; pstdout_printf (state_data->pstate, "DNS DHCP : %s\n", (dnsdhcpenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS Server 1 : %u.%u.%u.%u\n", (dnsserver1 & 0x000000FF), (dnsserver1 & 0x0000FF00) >> 8, (dnsserver1 & 0x00FF0000) >> 16, (dnsserver1 & 0xFF000000) >> 24); pstdout_printf (state_data->pstate, "DNS Server 2 : %u.%u.%u.%u\n", (dnsserver2 & 0x000000FF), (dnsserver2 & 0x0000FF00) >> 8, (dnsserver2 & 0x00FF0000) >> 16, (dnsserver2 & 0xFF000000) >> 24); pstdout_printf (state_data->pstate, "DNS Register BMC : %s\n", (dnsregisterbmc) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS BMC Host Name : %s\n", dnsbmchostname); pstdout_printf (state_data->pstate, "DNS Domain Name DHCP : %s\n", (dnsdomainnamedhcpenable) ? "Enabled" : "Disabled"); pstdout_printf (state_data->pstate, "DNS Domain Name : %s\n", dnsdomainname); pstdout_printf (state_data->pstate, "DNS Registration Delay : %u seconds\n", dnsregistrationdelay); rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_dns_config (ipmi_oem_state_data_t *state_data) { uint8_t dnsdhcpenable = 0; uint32_t dnsserver1 = 0; uint32_t dnsserver2 = 0; uint8_t dnsregisterbmc = 0; char dnsbmchostname[IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1]; uint8_t dnsdomainnamedhcpenable = 0; char dnsdomainname[IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1]; uint8_t dnsregistrationdelay = 0; int rv = -1; unsigned int i; assert (state_data); memset (dnsbmchostname, '\0', IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX + 1); memset (dnsdomainname, '\0', IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX + 1); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: dnsdhcp=enable|disable\n" "Option: dnsserver1=ipaddress\n" "Option: dnsserver2=ipaddress\n" "Option: dnsregisterbmc=enable|disable\n" "Option: dnsbmchostname=string\n" "Option: dnsdomainnamedhcp=enable|disable\n" "Option: dnsdomainname=string\n" "Option: dnsregistrationdelay=seconds\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "dnsdhcp")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsdhcpenable) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DHCP_ENABLE, 0, 1, (uint32_t)dnsdhcpenable) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsserver1")) { if (ipmi_oem_parse_ip_address (state_data, i, value, &dnsserver1) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER1, 0, 4, (uint32_t)dnsserver1) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsserver2")) { if (ipmi_oem_parse_ip_address (state_data, i, value, &dnsserver2) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_SERVER2, 0, 4, (uint32_t)dnsserver2) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsregisterbmc")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsregisterbmc) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTER_BMC, 0, 1, (uint32_t)dnsregisterbmc) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsbmchostname")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, dnsbmchostname, IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_BMC_HOST_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_BMC_HOST_NAME, 0, dnsbmchostname, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsdomainnamedhcp")) { if (ipmi_oem_parse_enable (state_data, i, value, &dnsdomainnamedhcpenable) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME_DHCP_ENABLE, 0, 1, (uint32_t)dnsdomainnamedhcpenable) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsdomainname")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, dnsdomainname, IPMI_OEM_WISTRON_EXTENDED_CONFIG_DNS_DNS_DOMAIN_NAME_MAX) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_DOMAIN_NAME, 0, dnsdomainname, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "dnsregistrationdelay")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &dnsregistrationdelay) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_DNS, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_DNS_DNS_REGISTRATION_DELAY, 0, 1, (uint32_t)dnsregistrationdelay) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Wistron/Dell Poweredge C6220 * * Web server config supports more values that v1 config, but we * split that out into server services config since they don't have * much related to "web". */ return (ipmi_oem_thirdparty_get_web_server_config_v1 (state_data)); } int ipmi_oem_wistron_set_web_server_config (ipmi_oem_state_data_t *state_data) { assert (state_data); /* Wistron/Dell Poweredge C6220 * * Web server config supports more values that v1 config, but we * split that out into server services config since they don't have * much related to "web". */ return (ipmi_oem_thirdparty_set_web_server_config_v1 (state_data)); } #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_server_services_config (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint16_t kvmportnum; uint16_t telnetportnum; uint16_t sshportnum; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_KVM_PORT_NUM, 0, 2, &tmpvalue) < 0) goto cleanup; kvmportnum = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_TELNET_PORT_NUM, 0, 2, &tmpvalue) < 0) goto cleanup; telnetportnum = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_SSH_PORT_NUM, 0, 2, &tmpvalue) < 0) goto cleanup; sshportnum = tmpvalue; pstdout_printf (state_data->pstate, "KVM Port Number : %u\n", kvmportnum); pstdout_printf (state_data->pstate, "telnet Port Number : %u\n", telnetportnum); pstdout_printf (state_data->pstate, "SSH Port Number : %u\n", sshportnum); rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_server_services_config (ipmi_oem_state_data_t *state_data) { uint16_t kvmportnumber = 0; uint16_t telnetportnumber = 0; uint16_t sshportnumber = 0; int rv = -1; unsigned int i; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: kvmportnumber=num\n" "Option: telnetportnumber=num\n" "Option: sshportnumber=num\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "kvmportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &kvmportnumber) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_KVM_PORT_NUM, 0, 2, (uint32_t)kvmportnumber) < 0) goto cleanup; } else if (!strcasecmp (key, "telnetportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &telnetportnumber) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_TELNET_PORT_NUM, 0, 2, (uint32_t)telnetportnumber) < 0) goto cleanup; } else if (!strcasecmp (key, "sshportnumber")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &sshportnumber) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_WEB_SERVER_CONFIGURATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_WEB_SERVER_CONFIGURATION_SSH_PORT_NUM, 0, 2, (uint32_t)sshportnumber) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } #endif /* 0 */ int ipmi_oem_wistron_get_power_management_config (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t powerstaggeringacrecovery; uint16_t powerondelay; uint16_t minpowerondelay; uint16_t maxpowerondelay; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY, 0, 1, &tmpvalue) < 0) goto cleanup; powerstaggeringacrecovery = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; powerondelay = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MINIMUM_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; minpowerondelay = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY, 0, 2, &tmpvalue) < 0) goto cleanup; maxpowerondelay = tmpvalue; if (powerstaggeringacrecovery == IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : Immediate\n"); else if (powerstaggeringacrecovery == IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : Auto\n"); else if (powerstaggeringacrecovery == IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED) pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : User Defined\n"); else pstdout_printf (state_data->pstate, "Power Staggering AC Recovery : %Xh\n", powerstaggeringacrecovery); pstdout_printf (state_data->pstate, "Power On Delay : %u seconds\n", powerondelay); pstdout_printf (state_data->pstate, "Minimum Power On Delay : %u seconds\n", minpowerondelay); pstdout_printf (state_data->pstate, "Maximum Power On Delay : %u seconds\n", maxpowerondelay); rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_power_management_config (ipmi_oem_state_data_t *state_data) { uint8_t powerstaggeringacrecovery = 0; uint16_t powerondelay = 0; uint16_t maxpowerondelay = 0; int rv = -1; unsigned int i; assert (state_data); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: powerstaggeringacrecovery=immediate|auto|user\n" "Option: powerondelay=seconds\n" "Option: maxpowerondelay=seconds\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "powerstaggeringacrecovery")) { if (strcasecmp (value, "immediate") && strcasecmp (value, "auto") && strcasecmp (value, "user")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (!strcasecmp (value, "immediate")) powerstaggeringacrecovery = IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_IMMEDIATE; else if (!strcasecmp (value, "auto")) powerstaggeringacrecovery = IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_AUTO; else /* !strcasecmp (value, "user")) */ powerstaggeringacrecovery = IPMI_OEM_WISTRON_EXTENDED_CONFIG_POWER_STAGGERING_AC_RECOVERY_USER_DEFINED; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_STAGGERING_AC_RECOVERY, 0, 1, (uint32_t)powerstaggeringacrecovery) < 0) goto cleanup; } else if (!strcasecmp (key, "powerondelay")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &powerondelay) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_POWER_ON_DELAY, 0, 2, (uint32_t)powerondelay) < 0) goto cleanup; } else if (!strcasecmp (key, "maxpowerondelay")) { if (ipmi_oem_parse_2_byte_field (state_data, i, value, &maxpowerondelay) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_POWER_MANAGEMENT, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_POWER_MANAGEMENT_MAXIMUM_POWER_ON_DELAY, 0, 2, (uint32_t)maxpowerondelay) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_firmware_information (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; char name[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN + 1]; char description[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN + 1]; uint8_t entity; char *entity_str = NULL; char product_info[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN + 1]; char firmware_version[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN + 1]; char branch[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN + 1]; char build_information[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (name, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN + 1); memset (description, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN + 1); memset (product_info, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN + 1); memset (firmware_version, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN + 1); memset (branch, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN + 1); memset (build_information, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN + 1); if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME, 0, name, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_NAME_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION, 0, description, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_DESCRIPTION_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_ENTITY, 0, 1, &tmpvalue) < 0) goto cleanup; entity = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO, 0, product_info, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_PRODUCT_INFO_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION, 0, firmware_version, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_FIRMWARE_VERSION_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH, 0, branch, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BRANCH_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION, 0, build_information, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_BUILD_INFORMATION_LEN) < 0) goto cleanup; pstdout_printf (state_data->pstate, "BMC Name : %s\n", name); pstdout_printf (state_data->pstate, "Controller Description : %s\n", description); switch (entity) { case IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_BMC: entity_str = "BMC"; break; case IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_SYSTEM_BIOS: entity_str = "System (BIOS)"; break; case IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_PDB: entity_str = "PDB"; break; case IPMI_OEM_WISTRON_EXTENDED_CONFIG_FIRMWARE_INFORMATION_ENTITY_FCB: entity_str = "FCB"; break; default: entity_str = "Unrecognized"; } pstdout_printf (state_data->pstate, "Controller Entity : %s\n", entity_str); pstdout_printf (state_data->pstate, "Product Info : %s\n", product_info); pstdout_printf (state_data->pstate, "Firmware Version : %s\n", firmware_version); pstdout_printf (state_data->pstate, "Branch : %s\n", branch); pstdout_printf (state_data->pstate, "Build Information : %s\n", build_information); rv = 0; cleanup: return (rv); } #endif #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_user_default_setting (ipmi_oem_state_data_t *state_data) { uint8_t setting; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "set") && strcasecmp (state_data->prog_data->args->oem_options[0], "reset")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "set")) setting = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING_SET_DEFAULT; else setting = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING_RESTORE_DEFAULT; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_FIRMWARE_INFORMATION, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_FIRMWARE_INFORMATION_USER_DEFAULT_SETTING, 0, 1, (uint32_t)setting) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #endif int ipmi_oem_wistron_get_ipv6_settings (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint8_t ipv6enable; char ipv6address[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN + 1]; char ipv6gatewayipaddress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN + 1]; uint8_t ipv6prefixlength; uint8_t ipv6autoconfig; char ipv6linklocaladdress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN + 1]; uint8_t ipv6autodns; char ipv6dnsserver1[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN + 1]; char ipv6dnsserver2[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (ipv6address, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN + 1); memset (ipv6gatewayipaddress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN + 1); memset (ipv6linklocaladdress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN + 1); memset (ipv6dnsserver1, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN + 1); memset (ipv6dnsserver2, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN + 1); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE, 0, 1, &tmpvalue) < 0) goto cleanup; ipv6enable = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS, 0, ipv6address, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS, 0, ipv6gatewayipaddress, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_PREFIX_LENGTH, 0, 1, &tmpvalue) < 0) goto cleanup; ipv6prefixlength = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG, 0, 1, &tmpvalue) < 0) goto cleanup; ipv6autoconfig = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS, 0, ipv6linklocaladdress, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS, 0, 1, &tmpvalue) < 0) goto cleanup; ipv6autodns = tmpvalue; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1, 0, ipv6dnsserver1, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2, 0, ipv6dnsserver2, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN) < 0) goto cleanup; pstdout_printf (state_data->pstate, "IPv6 Enable : %s\n", (ipv6enable == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE_FALSE) ? "false" : "true"); pstdout_printf (state_data->pstate, "IPv6 Address : %s\n", ipv6address); pstdout_printf (state_data->pstate, "IPv6 Gateway IP Address : %s\n", ipv6gatewayipaddress); pstdout_printf (state_data->pstate, "IPv6 Prefix Length : %u\n", ipv6prefixlength); pstdout_printf (state_data->pstate, "IPv6 Auto Config : %s\n", (ipv6autoconfig == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG_ENABLE_FALSE) ? "false" : "true"); pstdout_printf (state_data->pstate, "IPv6 Link Local Address : %s\n", ipv6linklocaladdress); pstdout_printf (state_data->pstate, "IPv6 Auto DNS : %s\n", (ipv6autodns == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS_ENABLE_FALSE) ? "false" : "true"); pstdout_printf (state_data->pstate, "IPv6 DNS Server 1 : %s\n", ipv6dnsserver1); pstdout_printf (state_data->pstate, "IPv6 DNS Server 2 : %s\n", ipv6dnsserver2); rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_ipv6_settings (ipmi_oem_state_data_t *state_data) { uint8_t tmpenablevalue; uint8_t ipv6enable; char ipv6address[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN + 1]; char ipv6gatewayipaddress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN + 1]; uint8_t ipv6prefixlength; uint8_t ipv6autoconfig; char ipv6linklocaladdress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN + 1]; uint8_t ipv6autodns; char ipv6dnsserver1[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN + 1]; char ipv6dnsserver2[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN + 1]; int rv = -1; unsigned int i; assert (state_data); memset (ipv6address, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN + 1); memset (ipv6gatewayipaddress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN + 1); memset (ipv6linklocaladdress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_LINK_LOCAL_ADDRESS_LEN + 1); memset (ipv6dnsserver1, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN + 1); memset (ipv6dnsserver2, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN + 1); if (!state_data->prog_data->args->oem_options_count) { pstdout_printf (state_data->pstate, "Option: ipv6=enable|disable\n" "Option: ipv6address=ipaddress\n" "Option: ipv6gatewayaddress=ipaddress\n" "Option: ipv6prefixlength=length\n" "Option: ipv6autoconfig=enable|disable\n" "Option: ipv6autodns=enable|disable\n" "Option: ipv6dnsserver1=ipaddress\n" "Option: ipv6dnsserver2=ipaddress\n"); return (0); } for (i = 0; i < state_data->prog_data->args->oem_options_count; i++) { char *key = NULL; char *value = NULL; if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "ipv6")) { if (ipmi_oem_parse_enable (state_data, i, value, &tmpenablevalue) < 0) goto cleanup; if (tmpenablevalue) ipv6enable = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE_TRUE; else ipv6enable = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE_FALSE; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ENABLE, 0, 1, (uint32_t)ipv6enable) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6address")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, ipv6address, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_ADDRESS, 0, ipv6address, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6gatewayipaddress")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, ipv6gatewayipaddress, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_GATEWAY_IP_ADDRESS, 0, ipv6gatewayipaddress, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6prefixlength")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &ipv6prefixlength) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_PREFIX_LENGTH, 0, 1, (uint32_t)ipv6prefixlength) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6autoconfig")) { if (ipmi_oem_parse_enable (state_data, i, value, &tmpenablevalue) < 0) goto cleanup; if (tmpenablevalue) ipv6autoconfig = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG_ENABLE_TRUE; else ipv6autoconfig = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG_ENABLE_FALSE; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTOCONFIG, 0, 1, (uint32_t)ipv6autoconfig) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6autodns")) { if (ipmi_oem_parse_enable (state_data, i, value, &tmpenablevalue) < 0) goto cleanup; if (tmpenablevalue) ipv6autodns = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS_ENABLE_TRUE; else ipv6autodns = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS_ENABLE_FALSE; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_AUTO_DNS, 0, 1, (uint32_t)ipv6autodns) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6dnsserver1")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, ipv6dnsserver1, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER1, 0, ipv6dnsserver1, (unsigned int)string_length) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6dnsserver2")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, ipv6dnsserver2, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SETTING_IPV6_DNS_SERVER2, 0, ipv6dnsserver2, (unsigned int)string_length) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_ipv6_trap_settings (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; uint32_t ipv6snmptrapdestinationsetting; uint8_t destination_type; uint8_t alertacktimeout; uint8_t retries; char ipv6snmptrapaddress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN + 1]; uint8_t numberofdestinations; int rv = -1; int i; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); memset (ipv6snmptrapaddress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN + 1); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, 0, 1, &tmpvalue) < 0) goto cleanup; numberofdestinations = tmpvalue; for (i = 0; i < numberofdestinations; i++) { if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, i, 3, &tmpvalue) < 0) goto cleanup; ipv6snmptrapdestinationsetting = tmpvalue; /* achu: this is stupid, why do they return these 3 values in * one int? Why couldn't this be three fields. */ destination_type = (ipv6snmptrapdestinationsetting & 0x000000FF); alertacktimeout = (ipv6snmptrapdestinationsetting & 0x0000FF00) >> 8; retries = (ipv6snmptrapdestinationsetting & 0x00FF0000) >> 16; if (ipmi_oem_thirdparty_get_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS, i, ipv6snmptrapaddress, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN) < 0) goto cleanup; switch (destination_type) { case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_PET: pstdout_printf (state_data->pstate, "%d: Alert Destination Type : PET Trap\n", i); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM1: pstdout_printf (state_data->pstate, "%d: Alert Destination Type : OEM1\n", i); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM2: pstdout_printf (state_data->pstate, "%d: Alert Destination Type : OEM2\n", i); break; default: pstdout_printf (state_data->pstate, "%d: Alert Destination Type : Unknown (%Xh)\n", i, destination_type); break; } pstdout_printf (state_data->pstate, "%d: Alert Acknowledge Timeout : %u seconds\n", i, alertacktimeout); pstdout_printf (state_data->pstate, "%d: Alert Retries : %u\n", i, retries); pstdout_printf (state_data->pstate, "%d: IPv6 SNMP Trap Destination IP Address : %s\n", i, ipv6snmptrapaddress); } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_ipv6_trap_settings (ipmi_oem_state_data_t *state_data) { uint32_t tmpvalue; char *endptr = NULL; unsigned int indextmp; uint8_t index; uint32_t ipv6snmptrapdestinationsetting; uint8_t destination_type; uint8_t alertacktimeout; uint8_t retries; char ipv6snmptrapaddress[IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN + 1]; uint8_t numberofdestinations; int rv = -1; unsigned int i; char *key = NULL; char *value = NULL; assert (state_data); memset (ipv6snmptrapaddress, '\0', IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN + 1); if (!state_data->prog_data->args->oem_options_count || state_data->prog_data->args->oem_options_count == 1) { pstdout_printf (state_data->pstate, "Option: destinationtype=pet|oem1|oem2\n" "Option: alertacktimeout=seconds\n" "Option: retries=count\n" "Option: ipv6snmptrapaddress=ipaddress\n"); return (0); } /* first field is the index, get that first */ errno = 0; indextmp = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 0); if (errno || endptr[0] != '\0' || indextmp > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } index = indextmp; /* now compare to the number of destinations */ if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, 0, 1, &tmpvalue) < 0) goto cleanup; numberofdestinations = tmpvalue; if (index >= numberofdestinations) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : index out of range\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); return (-1); } for (i = 1; i < state_data->prog_data->args->oem_options_count; i++) { if (ipmi_oem_parse_key_value (state_data, i, &key, &value) < 0) goto cleanup; if (!strcasecmp (key, "destinationtype")) { if (!strcasecmp (value, "pet")) destination_type = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_PET; else if (!strcasecmp (value, "oem1")) destination_type = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM1; else if (!strcasecmp (value, "oem2")) destination_type = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING_DESTINATION_TYPE_OEM2; else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid value\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, &tmpvalue) < 0) goto cleanup; ipv6snmptrapdestinationsetting = tmpvalue; ipv6snmptrapdestinationsetting &= (0x00FFFF00); ipv6snmptrapdestinationsetting |= destination_type; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, (uint32_t)ipv6snmptrapdestinationsetting) < 0) goto cleanup; } else if (!strcasecmp (key, "alertacktimeout")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &alertacktimeout) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, &tmpvalue) < 0) goto cleanup; ipv6snmptrapdestinationsetting = tmpvalue; ipv6snmptrapdestinationsetting &= (0x00FF00FF); ipv6snmptrapdestinationsetting |= (alertacktimeout << 8); if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, (uint32_t)ipv6snmptrapdestinationsetting) < 0) goto cleanup; } else if (!strcasecmp (key, "retries")) { if (ipmi_oem_parse_1_byte_field (state_data, i, value, &retries) < 0) goto cleanup; if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, &tmpvalue) < 0) goto cleanup; ipv6snmptrapdestinationsetting = tmpvalue; ipv6snmptrapdestinationsetting &= (0x0000FFFF); ipv6snmptrapdestinationsetting |= (retries << 16); if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_SETTING, index, 3, (uint32_t)ipv6snmptrapdestinationsetting) < 0) goto cleanup; } else if (!strcasecmp (key, "ipv6snmptrapaddress")) { uint8_t string_length = 0; if (ipmi_oem_parse_string (state_data, i, value, &string_length, ipv6snmptrapaddress, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS_LEN) < 0) goto cleanup; if (ipmi_oem_thirdparty_set_extended_config_string (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_IPV6_TRAP_SETTING, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_IPV6_SNMP_TRAP_DESTINATION_ADDRESS, index, ipv6snmptrapaddress, (unsigned int)string_length) < 0) goto cleanup; } else { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : invalid key\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[i]); goto cleanup; } free (key); free (value); } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (ipmi_oem_thirdparty_get_sol_idle_timeout (state_data)); } int ipmi_oem_wistron_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (ipmi_oem_thirdparty_set_sol_idle_timeout (state_data)); } static int _wistron_get_telnet_ssh_redirect_function (ipmi_oem_state_data_t *state_data, uint8_t attribute_id) { uint32_t tmpvalue; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); assert (attribute_id == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION || attribute_id == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_DISABLE == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_DISABLE); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED); if (ipmi_oem_thirdparty_get_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SOL, attribute_id, 0, 1, &tmpvalue) < 0) goto cleanup; switch (tmpvalue) { case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_DISABLE: pstdout_printf (state_data->pstate, "disabled\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED: pstdout_printf (state_data->pstate, "SOL enabled\n"); break; case IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED: pstdout_printf (state_data->pstate, "SMASH enabled\n"); break; default: pstdout_printf (state_data->pstate, "unknown redirect: %Xh\n", tmpvalue); break; } rv = 0; cleanup: return (rv); } static int _wistron_set_telnet_ssh_redirect_function (ipmi_oem_state_data_t *state_data, uint8_t attribute_id) { uint8_t tmpvalue = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); assert (attribute_id == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION || attribute_id == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_DISABLE == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_DISABLE); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED); assert (IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED == IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED); if (strcasecmp (state_data->prog_data->args->oem_options[0], "disable") && strcasecmp (state_data->prog_data->args->oem_options[0], "solenable") && strcasecmp (state_data->prog_data->args->oem_options[0], "smashenable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) tmpvalue = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_DISABLE; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "solenable")) tmpvalue = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SOL_ENABLED; else tmpvalue = IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION_SMASH_ENABLED; if (ipmi_oem_thirdparty_set_extended_config_value (state_data, IPMI_OEM_WISTRON_EXTENDED_CONFIGURATION_ID_SOL, attribute_id, 0, 1, (uint32_t)tmpvalue) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_get_telnet_redirect_function (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (_wistron_get_telnet_ssh_redirect_function (state_data, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION)); } int ipmi_oem_wistron_set_telnet_redirect_function (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (_wistron_set_telnet_ssh_redirect_function (state_data, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_TELNET_REDIRECT_FUNCTION_SELECTION)); } #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_ssh_redirect_function (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->oem_options_count); return (_wistron_get_telnet_ssh_redirect_function (state_data, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION)); } int ipmi_oem_wistron_set_ssh_redirect_function (ipmi_oem_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); return (_wistron_set_telnet_ssh_redirect_function (state_data, IPMI_OEM_WISTRON_EXTENDED_ATTRIBUTE_ID_SOL_SSH_REDIRECT_FUNCTION_SELECTION)); } #endif /* 0 */ #if 0 static int _wistron_oem_strerror (ipmi_oem_state_data_t *state_data, uint8_t comp_code, uint8_t cmd, uint8_t netfn, char *errbuf, unsigned int errbuflen) { assert (state_data); assert (comp_code != IPMI_COMP_CODE_COMMAND_SUCCESS); switch (netfn) { case IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ: case IPMI_NET_FN_OEM_WISTRON_GENERIC_RS: switch (cmd) { case IPMI_CMD_OEM_WISTRON_GET_CHASSIS_LED_STATUS: switch (comp_code) { case IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER_STR); return (1); break; case IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTON_GET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS_STR); return (1); break; } break; case IPMI_CMD_OEM_WISTRON_SET_CHASSIS_LED_STATUS: switch (comp_code) { case IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_NOT_YET_RECEIVED_ANY_INFORMATION_FROM_SATELLITE_CONTROLLER_STR); return (1); break; case IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_NOT_REPORTING_FOR_MORE_THAN_10_CONSECUTIVE_SECONDS_STR); return (1); break; case IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_DOES_NOT_SUPPORT_CHASSIS_LED_REQUESTED: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTON_SET_CHASSIS_LED_STATUS_SATELLITE_CONTROLLER_DOES_NOT_SUPPORT_CHASSIS_LED_REQUESTED_STR); return (1); break; } break; case IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS: switch (comp_code) { case IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_BMC_HAS_NOT_YET_RECEIVED_ANY_COMMANDS_FROM_SC: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_BMC_HAS_NOT_YET_RECEIVED_ANY_COMMANDS_FROM_SC_STR); return (1); break; case IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_SC_HAS_TIMEDOUT: snprintf (errbuf, errbuflen, "%s", IPMI_COMP_CODE_OEM_WISTRON_GET_CHASSIS_POWER_READINGS_SC_HAS_TIMEDOUT_STR); return (1); break; } break; } break; } return (0); } #endif /* 0 */ #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_chassis_power_readings (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint32_t ipmitimestamp; uint8_t totalpowerconsumption_supported; uint8_t coolingpowerconsumption_supported; uint16_t totalpowerconsumption; uint16_t coolingpowerconsumption; char time_buf[IPMI_OEM_TIME_BUFLEN + 1]; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Wistron/Dell Poweredge C6220 OEM * * Get Chassis Power Reading Request * * 0x30 - OEM network function * 0x2E - OEM cmd * * Get Chassis Power Reading Response * * 0x2E - OEM cmd * 0x?? - Completion code * bytes 2-5 - IPMI Timestamp when statistics collected * byte 6 - support bitmask * - 0 - chassis total power consumption available * - 1 - chassis cooling power consumption available * - 2-7 - reserved * bytes 7-8 - chassis total power consumption in watts (LSB first) * bytes 9-10 - chassis cooling power consumption in watts (LSB first) * bytes 11-14 - reserved */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } /* don't care about reserved bytes, saying only require 11 bytes */ if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 11, IPMI_CMD_OEM_WISTRON_GET_CHASSIS_POWER_READINGS, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, _wistron_oem_strerror) < 0) goto cleanup; ipmitimestamp = bytes_rs[2]; ipmitimestamp |= (bytes_rs[3] << 8); ipmitimestamp |= (bytes_rs[4] << 16); ipmitimestamp |= (bytes_rs[5] << 24); totalpowerconsumption_supported = bytes_rs[6] & IPMI_OEM_WISTRON_CHASSIS_TOTAL_POWER_CONSUMPTION_AVAILABLE_BITMASK; totalpowerconsumption_supported >>= IPMI_OEM_WISTRON_CHASSIS_TOTAL_POWER_CONSUMPTION_AVAILABLE_SHIFT; coolingpowerconsumption_supported = bytes_rs[6] & IPMI_OEM_WISTRON_CHASSIS_COOLING_POWER_CONSUMPTION_AVAILABLE_BITMASK; coolingpowerconsumption_supported >>= IPMI_OEM_WISTRON_CHASSIS_COOLING_POWER_CONSUMPTION_AVAILABLE_SHIFT; totalpowerconsumption = bytes_rs[7]; totalpowerconsumption |= (bytes_rs[8] << 8); coolingpowerconsumption = bytes_rs[9]; coolingpowerconsumption |= (bytes_rs[10] << 8); memset (time_buf, '\0', IPMI_OEM_TIME_BUFLEN + 1); if (ipmi_timestamp_string (ipmitimestamp, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%b-%d-%Y | %H:%M:%S", time_buf, IPMI_OEM_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "IPMI Timestamp of Collection : %s\n", time_buf); if (totalpowerconsumption_supported) pstdout_printf (state_data->pstate, "Chassis Total Power Consumption : %u Watts\n", totalpowerconsumption); if (coolingpowerconsumption_supported) pstdout_printf (state_data->pstate, "Chassis Cooling Power Consumption : %u Watts\n", coolingpowerconsumption); rv = 0; cleanup: return (rv); } #endif /* 0 */ #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_chassis_led_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; uint8_t chassis_identification_led_supported; uint8_t chassis_fault_led_supported; uint8_t chassis_identification_led_status; uint8_t chassis_fault_led_status; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Wistron/Dell Poweredge C6220 OEM * * Get Chassis LED Status Request * * 0x30 - OEM network function * 0x1C - OEM cmd * * Get Chassis LED Status Response * * 0x1C - OEM cmd * 0x?? - Completion code * 0x01 - SC-BMC Communication Protocol Version * 0x?? - LED Support * 0 bit = chassis identification LED controlled by SC (0 = not supported, 1 = supported) * 1 bit = fault LED controlled by SC (0 = not supported, 1 = supported) * 2-7 = reserved * 0x?? - Chassis Identification LED Status * - 0 - off, 1 solid, 2 blink * 0x?? - Chassis Fault LED Status * - 0 - off, 1 solid, 2 blink */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_GET_CHASSIS_LED_STATUS; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 6, IPMI_CMD_OEM_WISTRON_GET_CHASSIS_LED_STATUS, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, _wistron_oem_strerror) < 0) goto cleanup; chassis_identification_led_supported = bytes_rs[3] & IPMI_OEM_WISTRON_CHASSIS_IDENTIFICATION_LED_CONTROLLED_BY_SC_BITMASK; chassis_identification_led_supported >>= IPMI_OEM_WISTRON_CHASSIS_IDENTIFICATION_LED_CONTROLLED_BY_SC_SHIFT; chassis_fault_led_supported = bytes_rs[3] & IPMI_OEM_WISTRON_CHASSIS_FAULT_LED_CONTROLLED_BY_SC_BITMASK; chassis_fault_led_supported >>= IPMI_OEM_WISTRON_CHASSIS_FAULT_LED_CONTROLLED_BY_SC_SHIFT; chassis_identification_led_status = bytes_rs[4]; chassis_fault_led_status = bytes_rs[5]; if (chassis_identification_led_supported) { switch (chassis_identification_led_status) { case IPMI_OEM_WISTRON_CHASSIS_LED_OFF: pstdout_printf (state_data->pstate, "Chassis Identification LED Status : Off\n"); break; case IPMI_OEM_WISTRON_CHASSIS_LED_SOLID_ON: pstdout_printf (state_data->pstate, "Chassis Identification LED Status : Solid\n"); break; case IPMI_OEM_WISTRON_CHASSIS_LED_BLINK_ON: pstdout_printf (state_data->pstate, "Chassis Identification LED Status : Blink\n"); break; default: pstdout_printf (state_data->pstate, "Chassis Identification LED Status : Unspecified (%Xh)\n", chassis_identification_led_status); break; } } if (chassis_fault_led_supported) { switch (chassis_fault_led_status) { case IPMI_OEM_WISTRON_CHASSIS_LED_OFF: pstdout_printf (state_data->pstate, "Chassis Fault LED Status : Off\n"); break; case IPMI_OEM_WISTRON_CHASSIS_LED_SOLID_ON: pstdout_printf (state_data->pstate, "Chassis Fault LED Status : Solid\n"); break; case IPMI_OEM_WISTRON_CHASSIS_LED_BLINK_ON: pstdout_printf (state_data->pstate, "Chassis Fault LED Status : Blink\n"); break; default: pstdout_printf (state_data->pstate, "Chassis Fault LED Status : Unspecified (%Xh)\n", chassis_fault_led_status); break; } } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_set_chassis_led_status (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 2); if (strcasecmp (state_data->prog_data->args->oem_options[0], "identify-off") && strcasecmp (state_data->prog_data->args->oem_options[0], "identify-solid") && strcasecmp (state_data->prog_data->args->oem_options[0], "identify-blink")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } if (strcasecmp (state_data->prog_data->args->oem_options[1], "fault-off") && strcasecmp (state_data->prog_data->args->oem_options[1], "fault-solid") && strcasecmp (state_data->prog_data->args->oem_options[1], "fault-blink")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } /* Wistron/Dell Poweredge C6220 OEM * * Set Chassis LED Status Request * * 0x30 - OEM network function * 0x1B - OEM cmd * 0x01 - SC-BMC Communication Protocol Version * 0x?? - Chassis Identification LED Status * - 0 - off, 1 solid, 2 blink * 0x?? - Chassis Fault LED Status * - 0 - off, 1 solid, 2 blink * * Set Chassis LED Status Response * * 0x1C - OEM cmd * 0x?? - Completion code */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_SET_CHASSIS_LED_STATUS; bytes_rq[1] = IPMI_OEM_WISTRON_SC_BMC_COMMUNICATION_PROTOCOL_VERSION; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "identify-off")) bytes_rq[2] = IPMI_OEM_WISTRON_CHASSIS_LED_OFF; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "identify-solid")) bytes_rq[2] = IPMI_OEM_WISTRON_CHASSIS_LED_SOLID_ON; else bytes_rq[2] = IPMI_OEM_WISTRON_CHASSIS_LED_BLINK_ON; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "fault-off")) bytes_rq[3] = IPMI_OEM_WISTRON_CHASSIS_LED_OFF; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "fault-solid")) bytes_rq[3] = IPMI_OEM_WISTRON_CHASSIS_LED_SOLID_ON; else bytes_rq[3] = IPMI_OEM_WISTRON_CHASSIS_LED_BLINK_ON; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 4, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_WISTRON_SET_CHASSIS_LED_STATUS, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, _wistron_oem_strerror) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #endif int ipmi_oem_wistron_get_dhcp_retry (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; int len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Wistron 5441/Dell Poweredge C6220 * * Uses Get/Set Lan Configuration * * parameter = 192 * * Data format * * 1st byte = retry count, 1 based, 0h = no retries, ffh = infinite * 2nd byte = retry interval, 1 based, 10 second increments * 3rd byte = retry timeout, 1 based, 1 minute increments * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY, 0, 0, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (len < 3) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } if (configuration_parameter_data[0] == IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_NO_RETRIES) pstdout_printf (state_data->pstate, "Retry Count : no retries\n"); else if (configuration_parameter_data[0] == IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_INDEFINITE_RETRY) pstdout_printf (state_data->pstate, "Retry Count : infinite retries\n"); else pstdout_printf (state_data->pstate, "Retry Count : %u\n", configuration_parameter_data[0]); pstdout_printf (state_data->pstate, "Retry Interval : %u seconds\n", configuration_parameter_data[1] * 10); pstdout_printf (state_data->pstate, "Retry Timeout : %u minutes\n", configuration_parameter_data[2]); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_wistron_set_dhcp_retry (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; char *endptr = NULL; unsigned int value; uint8_t retry_count; uint8_t retry_interval; uint8_t retry_timeout; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 3); if (!strcasecmp (state_data->prog_data->args->oem_options[0], "none")) retry_count = IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_NO_RETRIES; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "indefinite")) retry_count = IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY_INDEFINITE_RETRY; else { errno = 0; value = strtoul (state_data->prog_data->args->oem_options[0], &endptr, 0); if (errno || endptr[0] != '\0' || value > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } retry_count = value; } errno = 0; value = strtoul (state_data->prog_data->args->oem_options[1], &endptr, 0); if (errno || endptr[0] != '\0' || value > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[1]); goto cleanup; } retry_interval = value; errno = 0; value = strtoul (state_data->prog_data->args->oem_options[2], &endptr, 0); if (errno || endptr[0] != '\0' || value > UCHAR_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[2]); goto cleanup; } retry_timeout = value; /* Wistron 5441/Dell Poweredge C6220 * * Uses Get/Set Lan Configuration * * parameter = 192 * * Data format * * 1st byte = retry count, 1 based, 0h = no retries, ffh = infinite * 2nd byte = retry interval, 1 based, 10 second increments * 3rd byte = retry timeout, 1 based, 1 minute increments * */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } configuration_parameter_data[0] = retry_count; configuration_parameter_data[1] = retry_interval; configuration_parameter_data[2] = retry_timeout; if (ipmi_cmd_set_lan_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_DHCP_RETRY, configuration_parameter_data, 3, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_wistron_get_link_status_change_control (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; uint8_t status; int len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Wistron 5441/Dell Poweredge C6220 * * Uses Get/Set Lan Configuration * * parameter = 193 * * Data format * * 1st byte = 7b - 1b = link down resilience enabled * 0b = dhcp re-discovery enabled * default = 0b * 0:6 - reserved */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_cmd_get_lan_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_GET_LAN_PARAMETER, IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL, 0, 0, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if ((len = fiid_obj_get_data (obj_cmd_rs, "configuration_parameter_data", configuration_parameter_data, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get_data: 'configuration_parameter_data': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (!len) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_lan_configuration_parameters: invalid buffer length returned: %d\n", len); goto cleanup; } status = (configuration_parameter_data[0] & IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_BITMASK); status >>= IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_SHIFT; if (status == IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_LINK_DOWN_RESILIENCE_ENABLED) pstdout_printf (state_data->pstate, "Link Down Resilience Enabled\n"); else pstdout_printf (state_data->pstate, "DHCP Re-Discovery Enabled\n"); rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_wistron_set_link_status_change_control (ipmi_oem_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t configuration_parameter_data[IPMI_OEM_MAX_BYTES]; uint8_t lan_channel_number; uint8_t status; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "link_resilience") && strcasecmp (state_data->prog_data->args->oem_options[0], "dhcp_rediscovery")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Wistron 5441/Dell Poweredge C6220 * * Uses Get/Set Lan Configuration * * parameter = 193 * * Data format * * 1st byte = 7b - 1b = link down resilience enabled * 0b = dhcp re-discovery enabled * default = 0b * 0:6 - reserved */ if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_set_lan_configuration_parameters_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_get_channel_number (state_data->ipmi_ctx, IPMI_CHANNEL_MEDIUM_TYPE_LAN_802_3, &lan_channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_channel_number: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (!strcasecmp (state_data->prog_data->args->oem_options[0], "link_resilience")) status = IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_LINK_DOWN_RESILIENCE_ENABLED; else status = IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_DHCP_RE_DISCOVERY_ENABLED; configuration_parameter_data[0] = 0; configuration_parameter_data[0] |= (status << IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL_SHIFT); if (ipmi_cmd_set_lan_configuration_parameters (state_data->ipmi_ctx, lan_channel_number, IPMI_LAN_CONFIGURATION_PARAMETER_OEM_WISTRON_LINK_STATUS_CHANGE_CONTROL, configuration_parameter_data, 1, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_set_lan_configuration_parameters: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } int ipmi_oem_wistron_set_password_policy (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "enable") && strcasecmp (state_data->prog_data->args->oem_options[0], "disable")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Set Password Policy Request * * 0x30 - OEM network function * 0x51 - OEM cmd * 0x?? - 0x00 = disabled * - 0x01 = enabled * * Set Password Policy Response * * 0x51 - OEM cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_SET_PASSWORD_POLICY; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "enable")) bytes_rq[1] = IPMI_OEM_WISTRON_PASSWORD_POLICY_ENABLE; else bytes_rq[1] = IPMI_OEM_WISTRON_PASSWORD_POLICY_DISABLE; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_WISTRON_SET_PASSWORD_POLICY, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_read_proprietary_string (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; char string[IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX + 1]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Read Proprietary String Request * * 0x08 - network function (firmware) * 0x0B - OEM cmd * 0x?? - offset of the string * 0x?? - byte cont * * Read Proprietary String Response * * 0x0B - cmd * 0x?? - Completion Code * 0x?? - offset of the string * 0x?? - byte cont * 0x??-0x?? - proprietary string */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_READ_PROPRIETARY_STRING; bytes_rq[1] = 0; bytes_rq[2] = IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_FIRMWARE_RQ, /* network function */ bytes_rq, /* data */ 3, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 4, IPMI_CMD_OEM_WISTRON_READ_PROPRIETARY_STRING, IPMI_NET_FN_FIRMWARE_RS, NULL) < 0) goto cleanup; /* no string */ if (!bytes_rs[3]) goto out; if (bytes_rs[3] > IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX) { pstdout_fprintf (state_data->pstate, stderr, "invalid length string returned\n"); goto cleanup; } memset (string, '\0', IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX + 1); memcpy (string, &bytes_rs[4], bytes_rs[3]); pstdout_printf (state_data->pstate, "%s\n", string); out: rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_write_proprietary_string (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; unsigned int i; unsigned int len; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); /* Write Proprietary String Request * * 0x08 - network function (firmware) * 0x0C - OEM cmd * 0x?? - offset of the string * 0x?? - byte cont * 0x?? - 0x?? - string * * Write Proprietary String Response * * 0x0C - cmd * 0x?? - Completion Code */ if (strlen (state_data->prog_data->args->oem_options[0]) > IPMI_OEM_WISTRON_PROPRIETARY_STRING_MAX) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s' : string too long\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } len = strlen (state_data->prog_data->args->oem_options[0]); for (i = 0; i < ((len - 1) / IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK) + 1; i++) { bytes_rq[0] = IPMI_CMD_OEM_WISTRON_WRITE_PROPRIETARY_STRING; bytes_rq[1] = i * IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK; if (len > ((i + 1) * IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK)) bytes_rq[2] = IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK; else bytes_rq[2] = len - (i * IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK); memcpy (&bytes_rq[3], state_data->prog_data->args->oem_options[0] + (i * IPMI_OEM_WISTRON_PROPRIETARY_STRING_BLOCK), bytes_rq[2]); if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_FIRMWARE_RQ, /* network function */ bytes_rq, /* data */ 3 + bytes_rq[2], /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_WISTRON_WRITE_PROPRIETARY_STRING, IPMI_NET_FN_FIRMWARE_RS, NULL) < 0) goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_oem_wistron_clear_proprietary_string (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; int rs_len; int rv = -1; assert (state_data); assert (!state_data->prog_data->args->oem_options_count); /* Clear Proprietary String Request * * 0x08 - network function (firmware) * 0x0D - OEM cmd * * Clear Proprietary String Response * * 0x0D - cmd * 0x?? - Completion Code */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_CLEAR_PROPRIETARY_STRING; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_FIRMWARE_RQ, /* network function */ bytes_rq, /* data */ 1, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 2, IPMI_CMD_OEM_WISTRON_READ_PROPRIETARY_STRING, IPMI_NET_FN_FIRMWARE_RS, NULL) < 0) goto cleanup; rv = 0; cleanup: return (rv); } #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_reset_to_defaults (ipmi_oem_state_data_t *state_data) { uint8_t bytes_rq[IPMI_OEM_MAX_BYTES]; uint8_t bytes_rs[IPMI_OEM_MAX_BYTES]; uint8_t task_id; int rs_len; int rv = -1; assert (state_data); assert (state_data->prog_data->args->oem_options_count == 1); if (strcasecmp (state_data->prog_data->args->oem_options[0], "all") && strcasecmp (state_data->prog_data->args->oem_options[0], "user") && strcasecmp (state_data->prog_data->args->oem_options[0], "lan") && strcasecmp (state_data->prog_data->args->oem_options[0], "sol") && strcasecmp (state_data->prog_data->args->oem_options[0], "serial") && strcasecmp (state_data->prog_data->args->oem_options[0], "pef")) { pstdout_fprintf (state_data->pstate, stderr, "%s:%s invalid OEM option argument '%s'\n", state_data->prog_data->args->oem_id, state_data->prog_data->args->oem_command, state_data->prog_data->args->oem_options[0]); goto cleanup; } /* Wistron/Dell Poweredge C6220 * * Request Reset To Defaults * * 0x30 - OEM network function * 0x04 - OEM cmd * 0x?? - bitmask * [7:5] = 111b = restore parameters not included below * = 000b = remaining parameters stay what it is * [4] = 1b = restore PEFs to default * [3] = 1b = restore serial configuration parameters to default * [2] = 1b = restore SOL configuration parameters to default * [1] = 1b = restore LAN configuration parameters to default * [0] = 1b = restore user accounts to default * 0x?? - 0xFF - restore all satellite controller settings to default * * Response Reset To Defaults * * 0x04 - OEM cmd * 0x?? - Completion Code * - 0xCC - one or more configs not supported * 0x?? - Task ID - used to get the restore status. Invalid after * 120 seconds. 00h = reserved. * * Request Get Restore Status * * 0x30 - OEM network function * 0x05 - OEM cmd * 0x?? - Task ID * * Response Get Restore Status * * 0x05 - OEM cmd * 0x?? - Completion Code * 0x?? - restore status * - 00h = restore in progress * - 01h = restore complete * * Notes: If do not want to reset any user settings, but want to * reset satellite controller settings, BMC is not responsible and a * task ID will not be returned. */ bytes_rq[0] = IPMI_CMD_OEM_WISTRON_RESET_TO_DEFAULTS; bytes_rq[1] = IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_REMAINING_PARAMETERS_STAY_WHAT_IT_IS; bytes_rq[1] <<= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT; if (!strcasecmp (state_data->prog_data->args->oem_options[0], "all")) { bytes_rq[1] = IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_RESTORE_PARAMETERS_NOT_INCLUDED_BELOW; bytes_rq[1] <<= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_RESTORE_FLAG_SHIFT; bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_PEF_BITMASK; } else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "user")) bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_USER_ACCOUNTS_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "lan")) bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_LAN_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "sol")) bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SOL_CONFIGURATION_BITMASK; else if (!strcasecmp (state_data->prog_data->args->oem_options[0], "serial")) bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_SERIAL_CONFIGURATION_BITMASK; else /* !strcasecmp (state_data->prog_data->args->oem_options[0], "pef" */ bytes_rq[1] |= IPMI_OEM_WISTRON_RESET_TO_DEFAULTS_PEF_BITMASK; /* We are only resetting user components, don't care about satellite controllers */ #if 0 /* achu: guess shouldn't set? */ bytes_rq[2] = 0; #endif if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_WISTRON_RESET_TO_DEFAULTS, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, NULL) < 0) goto cleanup; task_id = bytes_rs[2]; /* don't quit until it is done */ while (1) { bytes_rq[0] = IPMI_CMD_OEM_WISTRON_GET_RESTORE_STATUS; bytes_rq[1] = task_id; if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, 0, /* lun */ IPMI_NET_FN_OEM_WISTRON_GENERIC_RQ, /* network function */ bytes_rq, /* data */ 2, /* num bytes */ bytes_rs, IPMI_OEM_MAX_BYTES)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_oem_check_response_and_completion_code (state_data, bytes_rs, rs_len, 3, IPMI_CMD_OEM_WISTRON_GET_RESTORE_STATUS, IPMI_NET_FN_OEM_WISTRON_GENERIC_RS, NULL) < 0) goto cleanup; if (bytes_rs[2] == IPMI_OEM_WISTRON_GET_RESTORE_STATUS_RESTORE_COMPLETE) break; sleep (1); } rv = 0; cleanup: return (rv); } #endif freeipmi-1.6.4/ipmi-oem/ipmi-oem-wistron.h0000644002055400205540000001053413527331635020371 0ustar00achuachu00000000000000/* * Copyright (C) 2008-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_OEM_WISTRON_H #define IPMI_OEM_WISTRON_H #include "ipmi-oem.h" int ipmi_oem_wistron_get_system_info (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_nic_mode (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_shared_nic_selection (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_shared_nic_selection (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_bmc_services (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_account_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_dns_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_web_server_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_web_server_config (ipmi_oem_state_data_t *state_data); #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_server_services_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_server_services_config (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_wistron_get_power_management_config (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_power_management_config (ipmi_oem_state_data_t *state_data); #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_firmware_information (ipmi_oem_state_data_t *state_data); #endif #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_user_default_setting (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_wistron_get_ipv6_settings (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_ipv6_settings (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_ipv6_trap_settings (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_ipv6_trap_settings (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_sol_idle_timeout (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_telnet_redirect_function (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_telnet_redirect_function (ipmi_oem_state_data_t *state_data); #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_ssh_redirect_function (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_ssh_redirect_function (ipmi_oem_state_data_t *state_data); #endif #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_chassis_power_readings (ipmi_oem_state_data_t *state_data); #endif #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_get_chassis_led_status (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_chassis_led_status (ipmi_oem_state_data_t *state_data); #endif int ipmi_oem_wistron_get_dhcp_retry (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_dhcp_retry (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_get_link_status_change_control (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_link_status_change_control (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_set_password_policy (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_read_proprietary_string (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_write_proprietary_string (ipmi_oem_state_data_t *state_data); int ipmi_oem_wistron_clear_proprietary_string (ipmi_oem_state_data_t *state_data); #if 0 /* can't verify - doesn't appear to work */ int ipmi_oem_wistron_reset_to_defaults (ipmi_oem_state_data_t *state_data); #endif #endif /* IPMI_OEM_WISTRON_H */ freeipmi-1.6.4/ipmi-pet/0000755002055400205540000000000013527342547015012 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-pet/Makefile.in0000644002055400205540000006666113527342445017073 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-pet$(EXEEXT) subdir = ipmi-pet DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_pet_OBJECTS = ipmi_pet-ipmi-pet.$(OBJEXT) \ ipmi_pet-ipmi-pet-argp.$(OBJEXT) ipmi_pet_OBJECTS = $(am_ipmi_pet_OBJECTS) ipmi_pet_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_pet_SOURCES) DIST_SOURCES = $(ipmi_pet_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_pet_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_pet_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_pet_SOURCES = \ ipmi-pet.c \ ipmi-pet.h \ ipmi-pet-argp.c \ ipmi-pet-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-pet/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-pet/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-pet$(EXEEXT): $(ipmi_pet_OBJECTS) $(ipmi_pet_DEPENDENCIES) $(EXTRA_ipmi_pet_DEPENDENCIES) @rm -f ipmi-pet$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_pet_OBJECTS) $(ipmi_pet_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_pet-ipmi-pet-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_pet-ipmi-pet.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_pet-ipmi-pet.o: ipmi-pet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_pet-ipmi-pet.o -MD -MP -MF $(DEPDIR)/ipmi_pet-ipmi-pet.Tpo -c -o ipmi_pet-ipmi-pet.o `test -f 'ipmi-pet.c' || echo '$(srcdir)/'`ipmi-pet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_pet-ipmi-pet.Tpo $(DEPDIR)/ipmi_pet-ipmi-pet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-pet.c' object='ipmi_pet-ipmi-pet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_pet-ipmi-pet.o `test -f 'ipmi-pet.c' || echo '$(srcdir)/'`ipmi-pet.c ipmi_pet-ipmi-pet.obj: ipmi-pet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_pet-ipmi-pet.obj -MD -MP -MF $(DEPDIR)/ipmi_pet-ipmi-pet.Tpo -c -o ipmi_pet-ipmi-pet.obj `if test -f 'ipmi-pet.c'; then $(CYGPATH_W) 'ipmi-pet.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-pet.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_pet-ipmi-pet.Tpo $(DEPDIR)/ipmi_pet-ipmi-pet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-pet.c' object='ipmi_pet-ipmi-pet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_pet-ipmi-pet.obj `if test -f 'ipmi-pet.c'; then $(CYGPATH_W) 'ipmi-pet.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-pet.c'; fi` ipmi_pet-ipmi-pet-argp.o: ipmi-pet-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_pet-ipmi-pet-argp.o -MD -MP -MF $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Tpo -c -o ipmi_pet-ipmi-pet-argp.o `test -f 'ipmi-pet-argp.c' || echo '$(srcdir)/'`ipmi-pet-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Tpo $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-pet-argp.c' object='ipmi_pet-ipmi-pet-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_pet-ipmi-pet-argp.o `test -f 'ipmi-pet-argp.c' || echo '$(srcdir)/'`ipmi-pet-argp.c ipmi_pet-ipmi-pet-argp.obj: ipmi-pet-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_pet-ipmi-pet-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Tpo -c -o ipmi_pet-ipmi-pet-argp.obj `if test -f 'ipmi-pet-argp.c'; then $(CYGPATH_W) 'ipmi-pet-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-pet-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Tpo $(DEPDIR)/ipmi_pet-ipmi-pet-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-pet-argp.c' object='ipmi_pet-ipmi-pet-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_pet_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_pet-ipmi-pet-argp.obj `if test -f 'ipmi-pet-argp.c'; then $(CYGPATH_W) 'ipmi-pet-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-pet-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-pet/Makefile.am0000644002055400205540000000257613527331635017054 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-pet ipmi_pet_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_pet_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_pet_SOURCES = \ ipmi-pet.c \ ipmi-pet.h \ ipmi-pet-argp.c \ ipmi-pet-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-pet/ipmi-pet.c0000644002055400205540000021226513527331635016706 0ustar00achuachu00000000000000/* * Copyright (C) 2011-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmi-pet.h" #include "ipmi-pet-argp.h" #include "freeipmi-portability.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-event-common.h" #include "tool-hostrange-common.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #include "tool-util-common.h" #define IPMI_PET_GUID_HEADER "GUID" #define IPMI_PET_MANUFACTURER_ID_HEADER "Manufacturer ID" #define IPMI_PET_SYSTEM_ID_HEADER "System ID" #define IPMI_PET_EVENT_SEVERITY_HEADER "Severity" struct ipmi_pet_input { uint32_t specific_trap; int specific_trap_na_specified; uint8_t variable_bindings[IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH]; unsigned int variable_bindings_length; }; struct ipmi_pet_trap_data { uint8_t sensor_type; int sensor_type_cant_be_determined; uint8_t event_type; int event_type_cant_be_determined; uint8_t event_direction; uint8_t event_offset; uint8_t guid[IPMI_SYSTEM_GUID_LENGTH]; uint16_t sequence_number; uint32_t localtimestamp_raw; uint32_t localtimestamp; int16_t utcoffset; uint8_t event_source_type; uint8_t event_severity; uint8_t sensor_device; uint8_t sensor_number; uint8_t entity; uint8_t entity_instance; uint8_t event_data[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_LENGTH]; uint8_t language_code; uint32_t manufacturer_id; uint16_t system_id; uint8_t oem_custom[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_LENGTH]; unsigned int oem_custom_length; }; static int _ipmi_pet_init (ipmi_pet_state_data_t *state_data) { struct ipmi_pet_arguments *args; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (!args->common_args.ignore_sdr_cache) { if (calculate_column_widths (NULL, state_data->sdr_ctx, NULL, 0, NULL, 0, state_data->prog_data->args->non_abbreviated_units, (args->entity_sensor_names) ? 1 : 0, /* shared_sensors */ 1, /* count_event_only_records */ 0, /* count_device_locator_records */ 0, /* count_oem_records */ args->entity_sensor_names, &(state_data->column_width)) < 0) goto cleanup; } else { if (calculate_column_widths_ignored_sdr_cache (state_data->prog_data->args->non_abbreviated_units, &(state_data->column_width)) < 0) goto cleanup; } if (args->interpret_oem_data && !args->common_args.ignore_sdr_cache) { if (ipmi_get_oem_data (NULL, state_data->ipmi_ctx, &state_data->oem_data) < 0) goto cleanup; } rv = 0; cleanup: return (rv); } static int _ipmi_pet_oem_setup (ipmi_pet_state_data_t *state_data, struct ipmi_pet_trap_data *data) { struct ipmi_pet_arguments *args; int rv = -1; assert (state_data); assert (data); args = state_data->prog_data->args; if (args->interpret_oem_data) { uint32_t manufacturer_id; uint16_t product_id; /* Three ways to get manufacturer-id/product-id (in order of preference). * * 1) User input - takes highest priority * * 2) Trap data - takes priority over IPMI connection because * maybe running on alternate machine. But only use/assume if * manufacturer_id/product_id looks ok. * * 3) IPMI connection */ if (args->manufacturer_id_set && args->product_id_set) { manufacturer_id = args->manufacturer_id; product_id = args->product_id; } else { /* achu: I assume vendors that don't support will likely * fill in manufacturer_id with something bogus */ if (IPMI_IANA_ENTERPRISE_ID_RECOGNIZED (data->manufacturer_id)) { manufacturer_id = data->manufacturer_id; product_id = data->system_id; } else if (!args->common_args.ignore_sdr_cache) { manufacturer_id = state_data->oem_data.manufacturer_id; product_id = state_data->oem_data.product_id; } else { /* Eventually will lead to output of number for * manufacturer id instead of string */ manufacturer_id = data->manufacturer_id; product_id = data->system_id; } } if (ipmi_sel_ctx_set_manufacturer_id (state_data->sel_ctx, manufacturer_id) < 0) { fprintf (stderr, "ipmi_sel_ctx_set_manufacturer_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (ipmi_sel_ctx_set_product_id (state_data->sel_ctx, product_id) < 0) { fprintf (stderr, "ipmi_sel_ctx_set_product_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (args->output_event_state) { if (ipmi_interpret_ctx_set_manufacturer_id (state_data->interpret_ctx, manufacturer_id) < 0) { fprintf (stderr, "ipmi_interpret_ctx_set_manufacturer_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } if (ipmi_interpret_ctx_set_product_id (state_data->interpret_ctx, product_id) < 0) { fprintf (stderr, "ipmi_interpret_ctx_set_product_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } } } rv = 0; cleanup: return (rv); } static int _ipmi_pet_parse_trap_data (ipmi_pet_state_data_t *state_data, struct ipmi_pet_input *input, struct ipmi_pet_trap_data *data) { int rv = -1; int i; assert (state_data); assert (input); assert (data); if (!input->specific_trap_na_specified) { uint32_t value; value = input->specific_trap & IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_SENSOR_TYPE_MASK; value >>= IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_SENSOR_TYPE_SHIFT; data->sensor_type = value; value = input->specific_trap & IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_TYPE_MASK; value >>= IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_TYPE_SHIFT; data->event_type = value; value = input->specific_trap & IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_DIRECTION_MASK; value >>= IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_DIRECTION_SHIFT; data->event_direction = value; value = input->specific_trap & IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_MASK; value >>= IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_SHIFT; data->event_offset = value; } for (i = 0; i < IPMI_SYSTEM_GUID_LENGTH; i++) data->guid[i] = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_GUID_INDEX_START + i]; data->sequence_number = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_START]; data->sequence_number <<= 8; data->sequence_number |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SEQUENCE_NUMBER_INDEX_START + 1]; data->localtimestamp_raw = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_START]; data->localtimestamp_raw <<= 8; data->localtimestamp_raw |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_START + 1]; data->localtimestamp_raw <<= 8; data->localtimestamp_raw |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_START + 2]; data->localtimestamp_raw <<= 8; data->localtimestamp_raw |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_INDEX_START + 3]; data->localtimestamp = data->localtimestamp_raw; if (data->localtimestamp != IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_UNSPECIFIED) { struct tm tm; time_t t; data->utcoffset = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_INDEX_START]; data->utcoffset <<= 8; data->utcoffset |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_INDEX_START + 1]; /* utcoffset signed & unspecified 0xffff, cast to remove warnings */ if ((uint16_t)data->utcoffset != IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_UTC_OFFSET_UNSPECIFIED) { /* utcoffset is in minutes, multiply by 60 to get seconds */ data->localtimestamp += data->utcoffset * 60; } /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof(struct tm)); /* In PET, epoch is 0:00 hrs 1/1/98 * * So convert into ansi epoch */ tm.tm_year = 98; /* years since 1900 */ tm.tm_mon = 0; /* months since January */ tm.tm_mday = 1; /* 1-31 */ tm.tm_hour = 0; tm.tm_min = 0; tm.tm_sec = 0; tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { fprintf (stderr, "Invalid timestamp indicated\n"); goto cleanup; } data->localtimestamp += (uint32_t)t; } data->event_source_type = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SOURCE_TYPE_INDEX]; data->event_severity = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_INDEX]; data->sensor_device = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_DEVICE_INDEX]; data->sensor_number = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SENSOR_NUMBER_INDEX]; data->entity = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INDEX]; data->entity_instance = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INSTANCE_INDEX]; for (i = 0; i < IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_LENGTH; i++) data->event_data[i] = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_DATA_INDEX_START + i]; data->language_code = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LANGUAGE_CODE_INDEX]; data->manufacturer_id = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_START]; data->manufacturer_id <<= 8; data->manufacturer_id |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_START + 1]; data->manufacturer_id <<= 8; data->manufacturer_id |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_START + 2]; data->manufacturer_id <<= 8; data->manufacturer_id |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_MANUFACTURER_ID_INDEX_START + 3]; data->system_id = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SYSTEM_ID_INDEX_START]; data->system_id <<= 8; data->system_id |= input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_SYSTEM_ID_INDEX_START + 1]; for (i = 0; (IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_INDEX_START + i) < input->variable_bindings_length; i++) { data->oem_custom[i] = input->variable_bindings[IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_OEM_CUSTOM_FIELDS_INDEX_START + i]; data->oem_custom_length++; } rv = 0; cleanup: return (rv); } static int _ipmi_pet_form_sel_record (ipmi_pet_state_data_t *state_data, struct ipmi_pet_trap_data *data, uint8_t *sel_record, unsigned int sel_record_len) { fiid_obj_t sel_system_event_record = NULL; int rv = -1; int len; assert (state_data); assert (data); assert (sel_record); assert (sel_record_len); if (!(sel_system_event_record = fiid_obj_create (tmpl_sel_system_event_record))) { fprintf (stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } /* Don't care about this field, just set 0 */ if (fiid_obj_set (sel_system_event_record, "record_id", 0) < 0) { fprintf (stderr, "fiid_obj_set: 'record_id': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "record_type", IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD) < 0) { fprintf (stderr, "fiid_obj_set: 'record_type': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "timestamp", data->localtimestamp) < 0) { fprintf (stderr, "fiid_obj_set: 'timestamp': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } /* Need just the high order bit here */ if (fiid_obj_set (sel_system_event_record, "generator_id.id_type", (data->sensor_device >> 7)) < 0) { fprintf (stderr, "fiid_obj_set: 'generator_id.id_type': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "generator_id.id", data->sensor_device) < 0) { fprintf (stderr, "fiid_obj_set: 'generator_id.id': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } /* Don't care about this field, just set 0 */ if (fiid_obj_set (sel_system_event_record, "ipmb_device_lun", 0) < 0) { fprintf (stderr, "fiid_obj_set: 'ipmb_device_lun': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } /* Don't care about this field, just set 0 */ if (fiid_obj_set (sel_system_event_record, "reserved", 0) < 0) { fprintf (stderr, "fiid_obj_set: 'reserved': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } /* Don't care about this field, just set 0 */ if (fiid_obj_set (sel_system_event_record, "channel_number", 0) < 0) { fprintf (stderr, "fiid_obj_set: 'channel_number': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_message_format_version", IPMI_V1_5_EVENT_MESSAGE_FORMAT) < 0) { fprintf (stderr, "fiid_obj_set: 'event_message_format_version': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "sensor_type", data->sensor_type_cant_be_determined ? IPMI_SENSOR_TYPE_RESERVED : data->sensor_type) < 0) { fprintf (stderr, "fiid_obj_set: 'sensor_type': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "sensor_number", data->sensor_number) < 0) { fprintf (stderr, "fiid_obj_set: 'sensor_number': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_type_code", data->event_type_cant_be_determined ? IPMI_EVENT_READING_TYPE_CODE_UNSPECIFIED : data->event_type) < 0) { fprintf (stderr, "fiid_obj_set: 'event_type_code': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_dir", data->event_direction) < 0) { fprintf (stderr, "fiid_obj_set: 'event_dir': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_data1", data->event_data[0]) < 0) { fprintf (stderr, "fiid_obj_set: 'event_data1': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_data2", data->event_data[1]) < 0) { fprintf (stderr, "fiid_obj_set: 'event_data2': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (fiid_obj_set (sel_system_event_record, "event_data3", data->event_data[2]) < 0) { fprintf (stderr, "fiid_obj_set: 'event_data3': %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if ((len = fiid_obj_get_all (sel_system_event_record, sel_record, sel_record_len)) < 0) { fprintf (stderr, "fiid_obj_get_all: %s\n", fiid_obj_errormsg (sel_system_event_record)); goto cleanup; } if (len != IPMI_SEL_RECORD_MAX_RECORD_LENGTH) { fprintf (stderr, "Invalid length SEL record: %u\n", sel_record_len); goto cleanup; } rv = 0; cleanup: fiid_obj_destroy (sel_system_event_record); return (rv); } static int _ipmi_pet_output_headers (ipmi_pet_state_data_t *state_data) { assert (state_data); if (!state_data->prog_data->args->no_header_output && !state_data->output_headers) { if (state_data->prog_data->args->comma_separated_output) { if (state_data->prog_data->args->no_sensor_type_output) printf ("Date,Time,%s", SENSORS_HEADER_NAME_STR); else printf ("Date,Time,%s,%s", SENSORS_HEADER_NAME_STR, SENSORS_HEADER_TYPE_STR); if (state_data->prog_data->args->verbose_count >= 2) printf (",%s,%s,%s", IPMI_PET_GUID_HEADER, IPMI_PET_MANUFACTURER_ID_HEADER, IPMI_PET_SYSTEM_ID_HEADER); if (state_data->prog_data->args->output_event_severity || state_data->prog_data->args->verbose_count >= 1) printf (",%s", IPMI_PET_EVENT_SEVERITY_HEADER); if (state_data->prog_data->args->output_event_state) printf (",%s", SENSORS_HEADER_STATE_STR); if (state_data->prog_data->args->verbose_count >= 1) printf (",Event Direction"); printf (",Event\n"); } else { char fmt[EVENT_FMT_BUFLEN+1]; memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (state_data->prog_data->args->no_sensor_type_output) { snprintf (fmt, EVENT_FMT_BUFLEN, "Date | Time | %%-%ds", state_data->column_width.sensor_name); printf (fmt, SENSORS_HEADER_NAME_STR); } else { snprintf (fmt, EVENT_FMT_BUFLEN, "Date | Time | %%-%ds | %%-%ds", state_data->column_width.sensor_name, state_data->column_width.sensor_type); printf (fmt, SENSORS_HEADER_NAME_STR, SENSORS_HEADER_TYPE_STR); } if (state_data->prog_data->args->verbose_count >= 2) printf (" | %-36s | %-25s | %s", IPMI_PET_GUID_HEADER, IPMI_PET_MANUFACTURER_ID_HEADER, IPMI_PET_SYSTEM_ID_HEADER); if (state_data->prog_data->args->output_event_severity || state_data->prog_data->args->verbose_count >= 1) printf (" | %-25s", IPMI_PET_EVENT_SEVERITY_HEADER); if (state_data->prog_data->args->output_event_state) printf (" | %s ", SENSORS_HEADER_STATE_STR); if (state_data->prog_data->args->verbose_count >= 1) printf (" | Event Direction "); printf (" | Event\n"); } state_data->output_headers++; } return (0); } /* return (-1), real error */ static int _sel_parse_err_handle (ipmi_pet_state_data_t *state_data, char *func) { assert (state_data); assert (func); if (ipmi_sel_ctx_errnum (state_data->sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid PET data input\n"); return (0); } fprintf (stderr, "%s: %s\n", func, ipmi_sel_ctx_errormsg (state_data->sel_ctx)); return (-1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_date (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; assert (state_data); assert (sel_record); assert (sel_record_len); memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%d", sel_record, sel_record_len, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_format_record_string") < 0) return (-1); return (0); } if (state_data->prog_data->args->comma_separated_output) { if (outbuf_len) printf ("%s", outbuf); else printf ("%s", EVENT_NA_STRING); } else { if (outbuf_len) printf ("%-11s", outbuf); else printf ("%-11s", EVENT_NA_STRING); } return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_not_available_date (ipmi_pet_state_data_t *state_data) { assert (state_data); if (state_data->prog_data->args->comma_separated_output) printf ("%s", EVENT_NA_STRING); else printf ("%-11s", EVENT_NA_STRING); return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_time (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { assert (state_data); assert (sel_record); assert (sel_record_len); return (event_output_time (NULL, state_data->sel_ctx, sel_record, sel_record_len, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_not_available_time (ipmi_pet_state_data_t *state_data) { assert (state_data); return (event_output_not_available_time (NULL, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_sensor_name (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { assert (state_data); assert (sel_record); assert (sel_record_len); return (event_output_sensor_name (NULL, state_data->sel_ctx, sel_record, sel_record_len, &state_data->column_width, &state_data->prog_data->args->common_args, state_data->prog_data->args->comma_separated_output, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_sensor_type (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->no_sensor_type_output); assert (sel_record); assert (sel_record_len); return (event_output_sensor_type (NULL, state_data->sel_ctx, sel_record, sel_record_len, &state_data->column_width, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_not_available_sensor_type (ipmi_pet_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->no_sensor_type_output); return (event_output_not_available_sensor_type (NULL, &state_data->column_width, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_guid_manufacturer_id_system_id (ipmi_pet_state_data_t *state_data, struct ipmi_pet_trap_data *data) { char fmt[EVENT_FMT_BUFLEN + 1]; char outbuf[EVENT_OUTPUT_BUFLEN+1]; int iana_available; assert (state_data); assert (data); assert (state_data->prog_data->args->verbose_count >= 2); /* Output format for guid from "Wired for Management Specification", * Appendex 1 "String Representation of UUIDs" in the above * document. Note that the output is supposed to be output in most * significant byte order. */ memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%02x%%02x%%02x%%02x-%%02x%%02x-%%02x%%02x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x"); else snprintf (fmt, EVENT_FMT_BUFLEN, " | %%02x%%02x%%02x%%02x-%%02x%%02x-%%02x%%02x-%%02x%%02x-%%02x%%02x%%02x%%02x%%02x%%02x"); printf (fmt, data->guid[0], /* time low */ data->guid[1], data->guid[2], data->guid[3], data->guid[4], /* time mid */ data->guid[5], data->guid[6], /* time high and version */ data->guid[7], data->guid[8], /* clock seq high and reserved - comes before clock seq low */ data->guid[9], /* clock seq low */ data->guid[10], /* node */ data->guid[11], data->guid[12], data->guid[13], data->guid[14], data->guid[15]); /* if iana_available == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN + 1); iana_available = ipmi_iana_enterprise_numbers_string (data->manufacturer_id, outbuf, EVENT_OUTPUT_BUFLEN); memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (iana_available > 0) { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%s,%%u"); else snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-25s | %%-9u"); printf (fmt, outbuf, data->system_id); } else { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, ",%%u,%%u"); else snprintf (fmt, EVENT_FMT_BUFLEN, " | %%-25u | %%-9u"); printf (fmt, data->manufacturer_id, data->system_id); } return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_event_severity (ipmi_pet_state_data_t *state_data, uint8_t event_severity, unsigned int flags) { char *str = NULL; assert (state_data); assert (state_data->prog_data->args->output_event_severity || state_data->prog_data->args->verbose_count >= 1); switch (event_severity) { case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_UNSPECIFIED: str = EVENT_NA_STRING; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_MONITOR: str = "Monitor"; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_INFORMATION: str = "Information"; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_OK: str = "Ok"; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_NON_CRITICAL_CONDITION: str = "Non-critical condition"; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_CRITICAL_CONDITION: str = "Critical condition"; break; case IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_EVENT_SEVERITY_NON_RECOVERABLE_CONDITION: str = "Non-recoverable condition"; break; default: str = "Unspecified"; break; } if (state_data->prog_data->args->comma_separated_output) printf (",%s", str); else printf (" | %-25s", str); return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_event_state (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { assert (state_data); assert (sel_record); assert (sel_record_len); assert (state_data->prog_data->args->output_event_state); return (event_output_event_state (NULL, state_data->sel_ctx, sel_record, sel_record_len, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_event_direction (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags) { assert (state_data); assert (sel_record); assert (sel_record_len); assert (state_data->prog_data->args->verbose_count >= 1); return (event_output_event_direction (NULL, state_data->sel_ctx, sel_record, sel_record_len, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_not_available_event_direction (ipmi_pet_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); return (event_output_not_available_event_direction (NULL, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_event (ipmi_pet_state_data_t *state_data, uint8_t *sel_record, unsigned int sel_record_len, unsigned int flags, struct ipmi_pet_trap_data *data) { assert (state_data); assert (sel_record); assert (sel_record_len); assert (data); return (event_output_event (NULL, state_data->sel_ctx, sel_record, sel_record_len, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_not_available_event (ipmi_pet_state_data_t *state_data) { assert (state_data); return (event_output_not_available_event (NULL, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _output_oem_custom (ipmi_pet_state_data_t *state_data, struct ipmi_pet_trap_data *data) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; unsigned int outbuflen = 0; unsigned int index = 0; int rv = -1; assert (state_data); assert (data); assert (state_data->prog_data->args->verbose_count >= 1); memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN + 1); while (index < data->oem_custom_length && data->oem_custom[index] != IPMI_FRU_SENTINEL_VALUE) { char tmpbuf[EVENT_OUTPUT_BUFLEN+1]; unsigned int tmpbuflen = EVENT_OUTPUT_BUFLEN; uint8_t type_length; uint8_t type_code; uint8_t number_of_data_bytes; memset (tmpbuf, '\0', EVENT_OUTPUT_BUFLEN + 1); type_length = data->oem_custom[index]; type_code = (type_length & IPMI_FRU_TYPE_LENGTH_TYPE_CODE_MASK) >> IPMI_FRU_TYPE_LENGTH_TYPE_CODE_SHIFT; number_of_data_bytes = type_length & IPMI_FRU_TYPE_LENGTH_NUMBER_OF_DATA_BYTES_MASK; /* Special Case: This shouldn't be a length of 0x01 (see type/length * byte format in FRU Information Storage Definition). */ if (type_code == IPMI_FRU_TYPE_LENGTH_TYPE_CODE_LANGUAGE_CODE && number_of_data_bytes == 0x01) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid OEM custom data: length invalid\n"); break; } if ((index + 1 + number_of_data_bytes) > data->oem_custom_length) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid OEM custom data: length exceeds input\n"); break; } if (ipmi_fru_type_length_field_to_string (state_data->fru_ctx, &data->oem_custom[index], number_of_data_bytes + 1, data->language_code, tmpbuf, &tmpbuflen) < 0) { if (ipmi_fru_ctx_errnum (state_data->fru_ctx) == IPMI_FRU_ERR_FRU_INFORMATION_INCONSISTENT || ipmi_fru_ctx_errnum (state_data->fru_ctx) == IPMI_FRU_ERR_FRU_LANGUAGE_CODE_NOT_SUPPORTED || ipmi_fru_ctx_errnum (state_data->fru_ctx) == IPMI_FRU_ERR_FRU_INVALID_BCD_ENCODING) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid OEM Custom Field: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); break; } fprintf (stderr, "ipmi_fru_type_length_field_to_string: %s\n", ipmi_fru_ctx_errormsg (state_data->fru_ctx)); goto cleanup; } if (tmpbuflen) { if (outbuflen) { if ((outbuflen + 3) > EVENT_OUTPUT_BUFLEN) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "OEM Custom Overflow\n"); break; } strcat (outbuf, " ; "); outbuflen += 3; } if ((outbuflen + tmpbuflen) > EVENT_OUTPUT_BUFLEN) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "OEM Custom Overflow\n"); break; } strcat (outbuf, tmpbuf); outbuflen += tmpbuflen; } index += 1; /* type/length byte */ index += number_of_data_bytes; } if (outbuflen) printf (" ; %s", outbuf); rv = 1; cleanup: return (rv); } static int _ipmi_pet_process (ipmi_pet_state_data_t *state_data, struct ipmi_pet_input *input) { struct ipmi_pet_arguments *args; struct ipmi_pet_trap_data data; fiid_obj_t sel_system_event_record_event_fields = NULL; uint8_t event_offset_test; uint8_t sel_record[IPMI_SEL_RECORD_MAX_RECORD_LENGTH]; unsigned int flags = 0; uint64_t val; int sel_record_len; int ret; int rv = -1; assert (state_data); assert (input); memset (&data, '\0', sizeof (struct ipmi_pet_trap_data)); args = state_data->prog_data->args; if (_ipmi_pet_parse_trap_data (state_data, input, &data) < 0) goto cleanup; /* call after parse trap data */ if (_ipmi_pet_oem_setup (state_data, &data) < 0) goto cleanup; if (input->specific_trap_na_specified) { if (!args->common_args.ignore_sdr_cache) { uint8_t record_type; if (ipmi_sdr_cache_search_sensor_wrapper (state_data->sdr_ctx, data.sensor_number, data.sensor_device) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) != IPMI_SDR_ERR_NOT_FOUND) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } else goto cant_be_determined; } if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { fprintf (stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (record_type != IPMI_SDR_FORMAT_FULL_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD && record_type != IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) goto cant_be_determined; if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &data.sensor_type) < 0) { fprintf (stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &data.event_type) < 0) { fprintf (stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } } else { cant_be_determined: /* Can't determine this stuff */ data.event_type_cant_be_determined = 1; data.sensor_type_cant_be_determined = 1; } } /* To get very consistent output to ipmi-sel, we will actually stuff * the above data into a SEL system event, and use that for * outputting information. */ if (_ipmi_pet_form_sel_record (state_data, &data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH) < 0) goto cleanup; if (input->specific_trap_na_specified || data.event_offset != IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_UNSPECIFIED) { if (!(sel_system_event_record_event_fields = fiid_obj_create (tmpl_sel_system_event_record_event_fields))) { fprintf (stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if ((sel_record_len = fiid_obj_set_all (sel_system_event_record_event_fields, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH)) < 0) { fprintf (stderr, "fiid_obj_set_all: %s\n", fiid_obj_errormsg (sel_system_event_record_event_fields)); goto cleanup; } if (FIID_OBJ_GET (sel_system_event_record_event_fields, "offset_from_event_reading_type_code", &val) < 0) { fprintf (stderr, "fiid_obj_get: 'offset_from_event_reading_type_code': %s\n", fiid_obj_errormsg (sel_system_event_record_event_fields)); goto cleanup; } event_offset_test = val; /* determine event_offset from event data1 */ if (input->specific_trap_na_specified) data.event_offset = event_offset_test; else { /* If the event offset specified in the specific trap does not * match the event_data1 data, not much I can really do, one of them is valid and one isn't. * For now, just document bug. */ if (data.event_offset != event_offset_test) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid PET data input: event_offset and event_data1 inconsistent\n"); } } } if (data.entity != IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_UNSPECIFIED && !args->common_args.ignore_sdr_cache) { uint8_t entity_id, entity_instance; if (ipmi_sdr_cache_search_sensor (state_data->sdr_ctx, data.sensor_number, data.sensor_device) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) != IPMI_SDR_ERR_NOT_FOUND) { fprintf (stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } else goto cant_do_entity_id_check; } if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, NULL, 0, &entity_id, &entity_instance, NULL) < 0) { fprintf (stderr, "ipmi_sdr_parse_entity_id_instance_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (entity_id != data.entity) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid PET data input: entity id inconsistent to SDR data\n"); } if (data.entity_instance != IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_ENTITY_INSTANCE_UNSPECIFIED) { if (entity_instance != data.entity_instance) { if (state_data->prog_data->args->common_args.debug) fprintf (stderr, "Invalid PET data input: entity instance inconsistent to SDR data\n"); } } } cant_do_entity_id_check: flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD; flags |= IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; flags |= IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING; if (state_data->prog_data->args->verbose_count >= 3) flags |= IPMI_SEL_STRING_FLAGS_VERBOSE; if (state_data->prog_data->args->entity_sensor_names) flags |= IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES; if (state_data->prog_data->args->non_abbreviated_units) flags |= IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS; if (state_data->prog_data->args->interpret_oem_data) flags |= IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA; if (data.localtimestamp != IPMI_PLATFORM_EVENT_TRAP_VARIABLE_BINDINGS_LOCAL_TIMESTAMP_UNSPECIFIED) { if ((ret = _output_date (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _output_time (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } else { if ((ret = _output_not_available_date (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _output_not_available_time (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; } if ((ret = _output_sensor_name (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if (!state_data->prog_data->args->no_sensor_type_output) { if (data.sensor_type_cant_be_determined) { if ((ret = _output_not_available_sensor_type (state_data)) < 0) goto cleanup; } else { if ((ret = _output_sensor_type (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; } if (!ret) goto newline_out; } if (state_data->prog_data->args->verbose_count >= 2) { if ((ret = _output_guid_manufacturer_id_system_id (state_data, &data)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->output_event_severity || state_data->prog_data->args->verbose_count >= 1) { if ((ret = _output_event_severity (state_data, data.event_severity, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->output_event_state) { if ((ret = _output_event_state (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->verbose_count >= 1) { if (input->specific_trap_na_specified && args->common_args.ignore_sdr_cache) { if ((ret = _output_not_available_event_direction (state_data)) < 0) goto cleanup; } else { if ((ret = _output_event_direction (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags)) < 0) goto cleanup; } if (!ret) goto newline_out; } if (data.event_offset != IPMI_PLATFORM_EVENT_TRAP_SPECIFIC_TRAP_EVENT_OFFSET_UNSPECIFIED) { if (data.event_type_cant_be_determined) { if ((ret = _output_not_available_event (state_data)) < 0) goto cleanup; } else { if ((ret = _output_event (state_data, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH, flags, &data)) < 0) goto cleanup; } } else { if ((ret = _output_not_available_event (state_data)) < 0) goto cleanup; } if (!ret) goto newline_out; if (state_data->prog_data->args->verbose_count >= 1) { if ((ret = _output_oem_custom (state_data, &data)) < 0) goto cleanup; if (!ret) goto newline_out; } newline_out: printf ("\n"); rv = 0; cleanup: fiid_obj_destroy (sel_system_event_record_event_fields); return (rv); } /* returns -1 on fatal error, 0 on non-fatal error, 1 on success */ static int _ipmi_pet_parse (ipmi_pet_state_data_t *state_data, const char *line, struct ipmi_pet_input *input, unsigned int line_count) { const char delim[] = " \t\f\v\r\n"; char *str = NULL; char *ptr = NULL; char *token = NULL; int specific_trap_parsed = 0; int rv = -1; assert (state_data); assert (line); assert (input); assert (line_count); if (!(str = (char *) strdup (line))) { perror ("strdup"); goto cleanup; } ptr = str; memset (input, '\0', sizeof (struct ipmi_pet_input)); while (1) { unsigned int i; unsigned long uvalue; long value; char *endptr = NULL; token = strsep (&ptr, delim); if (!token) break; if (!strcmp (token, "")) continue; if (!specific_trap_parsed) { if (!strcasecmp (token, "NA")) { input->specific_trap_na_specified = 1; specific_trap_parsed++; continue; } errno = 0; uvalue = strtoul (token, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid specific trap argument on line %u\n", line_count); rv = 0; goto cleanup; } input->specific_trap = uvalue; specific_trap_parsed++; continue; } if (strlen (token) >= 2) { if (!strncmp (token, "0x", 2)) token+=2; } if (*token == '\0') { fprintf (stderr, "invalid variable binding hex byte argument on line %u\n", line_count); rv = 0; goto cleanup; } for (i = 0; token[i] != '\0'; i++) { if (i >= 2) { fprintf (stderr, "invalid variable binding hex byte argument on line %u\n", line_count); rv = 0; goto cleanup; } if (!isxdigit (token[i])) { fprintf (stderr, "invalid variable binding hex byte argument on line %u\n", line_count); rv = 0; goto cleanup; } } if (input->variable_bindings_length < IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH) { errno = 0; value = strtol (token, &endptr, 16); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid variable binding hex byte argument on line %u\n", line_count); rv = 0; goto cleanup; } input->variable_bindings[input->variable_bindings_length++] = (uint8_t) value; } else { fprintf (stderr, "Too many arguments specified on line %u\n", line_count); rv = 0; goto cleanup; } } if (!(input->variable_bindings_length >= IPMI_PLATFORM_EVENT_TRAP_MIN_VARIABLE_BINDINGS_LENGTH && input->variable_bindings_length <= IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH)) { fprintf (stderr, "Invalid number of variable binding bytes on line %u\n", line_count); rv = 0; goto cleanup; } rv = 1; cleanup: free (str); return (rv); } static int _ipmi_pet_acknowledge (ipmi_pet_state_data_t *state_data, FILE *stream) { struct ipmi_pet_arguments *args; struct ipmi_pet_input input; struct ipmi_pet_trap_data data; uint32_t event_data; fiid_obj_t obj_cmd_rs = NULL; char *line = NULL; unsigned int ctx_flags_orig; int rv = -1; assert (state_data); assert (state_data->ipmi_ctx); assert (state_data->prog_data->args->pet_acknowledge); assert ((state_data->prog_data->args->variable_bindings_length && !stream) || (!state_data->prog_data->args->variable_bindings_length && stream)); args = state_data->prog_data->args; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_pet_acknowledge_rs))) { perror ("fiid_obj_create"); goto cleanup; } if (args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK) { if (ipmi_ctx_get_flags (state_data->ipmi_ctx, &ctx_flags_orig) < 0) { fprintf (stderr, "ipmi_ctx_get_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_ctx_set_flags (state_data->ipmi_ctx, ctx_flags_orig | IPMI_FLAGS_NO_LEGAL_CHECK) < 0) { fprintf (stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } if (args->variable_bindings_length) { if (!(args->variable_bindings_length >= IPMI_PLATFORM_EVENT_TRAP_MIN_VARIABLE_BINDINGS_LENGTH && args->variable_bindings_length <= IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH)) { fprintf (stderr, "Invalid number of variable binding bytes\n"); goto cleanup; } input.specific_trap = args->specific_trap; input.specific_trap_na_specified = args->specific_trap_na_specified; memcpy (input.variable_bindings, args->variable_bindings, args->variable_bindings_length); input.variable_bindings_length = args->variable_bindings_length; if (_ipmi_pet_parse_trap_data (state_data, &input, &data) < 0) goto cleanup; event_data = data.event_data[2]; event_data <<= 8; event_data |= data.event_data[1]; event_data <<= 8; event_data |= data.event_data[0]; if (ipmi_cmd_pet_acknowledge (state_data->ipmi_ctx, data.sequence_number, data.localtimestamp_raw, data.event_source_type, data.sensor_device, data.sensor_number, event_data, obj_cmd_rs) < 0) { fprintf (stderr, "ipmi_cmd_pet_acknowledge: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } else { size_t n = 0; unsigned int line_count = 0; int ret; while (1) { if (getline (&line, &n, stream) < 0) { /* perror ("getline()"); */ break; } line_count++; if ((ret = _ipmi_pet_parse (state_data, line, &input, line_count)) < 0) goto cleanup; if (!ret) goto end_loop; if (_ipmi_pet_parse_trap_data (state_data, &input, &data) < 0) goto cleanup; event_data = data.event_data[2]; event_data <<= 8; event_data |= data.event_data[1]; event_data <<= 8; event_data |= data.event_data[0]; if (ipmi_cmd_pet_acknowledge (state_data->ipmi_ctx, data.sequence_number, data.localtimestamp_raw, data.event_source_type, data.sensor_device, data.sensor_number, event_data, obj_cmd_rs) < 0) { fprintf (stderr, "ipmi_cmd_pet_acknowledge: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } end_loop: free (line); line = NULL; n = 0; } } if (args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_MALFORMED_ACK) { if (ipmi_ctx_set_flags (state_data->ipmi_ctx, ctx_flags_orig) < 0) { fprintf (stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); free (line); return (rv); } static int _ipmi_pet_cmdline (ipmi_pet_state_data_t *state_data) { struct ipmi_pet_arguments *args; struct ipmi_pet_input input; int rv = -1; assert (state_data); assert (state_data->prog_data->args->specific_trap_set); assert (state_data->prog_data->args->variable_bindings); assert (state_data->prog_data->args->variable_bindings_length); args = state_data->prog_data->args; if (!(args->variable_bindings_length >= IPMI_PLATFORM_EVENT_TRAP_MIN_VARIABLE_BINDINGS_LENGTH && args->variable_bindings_length <= IPMI_PLATFORM_EVENT_TRAP_MAX_VARIABLE_BINDINGS_LENGTH)) { fprintf (stderr, "Invalid number of variable binding bytes\n"); goto cleanup; } if (_ipmi_pet_init (state_data) < 0) goto cleanup; if (_ipmi_pet_output_headers (state_data) < 0) goto cleanup; input.specific_trap = args->specific_trap; input.specific_trap_na_specified = args->specific_trap_na_specified; memcpy (input.variable_bindings, args->variable_bindings, args->variable_bindings_length); input.variable_bindings_length = args->variable_bindings_length; if (_ipmi_pet_process (state_data, &input) < 0) goto cleanup; rv = 0; cleanup: return (rv); } static int _ipmi_pet_stream (ipmi_pet_state_data_t *state_data, FILE *stream) { char *line = NULL; size_t n = 0; unsigned int line_count = 0; int rv = -1; int ret; assert (state_data); assert (stream); if (_ipmi_pet_init (state_data) < 0) goto cleanup; while (1) { struct ipmi_pet_input input; if (getline (&line, &n, stream) < 0) { /* perror ("getline()"); */ break; } line_count++; /* On invalid inputs, we could exit. However, we assume the * user is inputting a large stream of traps, possibly after * parsing it from a log or something. So we just output an * error and continue on with trap interpretations when there is * an invalid input. */ if ((ret = _ipmi_pet_parse (state_data, line, &input, line_count)) < 0) goto cleanup; if (!ret) goto end_loop; if (_ipmi_pet_output_headers (state_data) < 0) goto cleanup; if (_ipmi_pet_process (state_data, &input) < 0) goto cleanup; end_loop: free (line); line = NULL; n = 0; } rv = 0; cleanup: free (line); return (rv); } static int run_cmd_args (ipmi_pet_state_data_t *state_data) { struct ipmi_pet_arguments *args; FILE *infile = NULL; int rv = -1; assert (state_data); args = state_data->prog_data->args; assert (!args->common_args.flush_cache); if (args->variable_bindings_length) { if (args->pet_acknowledge) { if (_ipmi_pet_acknowledge (state_data, NULL) < 0) goto cleanup; } else { if (_ipmi_pet_cmdline (state_data) < 0) goto cleanup; } return (0); } if (args->cmd_file) { if (!(infile = fopen (args->cmd_file, "r"))) { perror ("fopen()"); goto cleanup; } } else infile = stdin; if (args->pet_acknowledge) { if (_ipmi_pet_acknowledge (state_data, infile) < 0) goto cleanup; } else { if (_ipmi_pet_stream (state_data, infile) < 0) goto cleanup; } rv = 0; cleanup: if (infile && infile != stdin) fclose (infile); return (rv); } static int _ipmi_pet (ipmi_pet_prog_data_t *prog_data) { ipmi_pet_state_data_t state_data; int exit_code = EXIT_FAILURE; assert (prog_data); if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (NULL, prog_data->args->common_args.hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_pet_state_data_t)); state_data.prog_data = prog_data; state_data.hostname = prog_data->args->common_args.hostname; if (!prog_data->args->common_args.ignore_sdr_cache && !prog_data->args->pet_acknowledge) { if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, prog_data->args->common_args.hostname, &(prog_data->args->common_args), NULL, 0))) goto cleanup; } if (prog_data->args->pet_acknowledge) { if (!(state_data.ipmi_ctx = ipmi_ctx_create ())) { perror ("ipmi_ctx_create()"); goto cleanup; } if (ipmi_ctx_open_outofband (state_data.ipmi_ctx, state_data.hostname, NULL, NULL, IPMI_AUTHENTICATION_TYPE_NONE, /* doesn't matter, just anything legal */ IPMI_PRIVILEGE_LEVEL_USER, /* doesn't matter, just anything legal */ 0, 0, 0, IPMI_FLAGS_NOSESSION | (prog_data->args->common_args.debug ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT)) < 0) { if (ipmi_ctx_errnum (state_data.ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID) fprintf (stderr, "%s: %s\n", prog_data->progname, ipmi_ctx_errormsg (state_data.ipmi_ctx)); else fprintf (stderr, "ipmi_ctx_open_outofband: %s\n", ipmi_ctx_errormsg (state_data.ipmi_ctx)); goto cleanup; } } if (!prog_data->args->common_args.ignore_sdr_cache && !prog_data->args->pet_acknowledge) { if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { perror ("ipmi_sdr_ctx_create()"); goto cleanup; } if (!prog_data->args->pet_acknowledge) { if (sdr_cache_create_and_load (state_data.sdr_ctx, NULL, state_data.ipmi_ctx, state_data.hostname, &state_data.prog_data->args->common_args) < 0) goto cleanup; } } else state_data.sdr_ctx = NULL; if (!(state_data.sel_ctx = ipmi_sel_ctx_create (NULL, state_data.sdr_ctx))) { perror ("ipmi_sel_ctx_create()"); goto cleanup; } if (state_data.prog_data->args->common_args.debug && prog_data->args->common_args.hostname) { if (ipmi_sel_ctx_set_debug_prefix (state_data.sel_ctx, prog_data->args->common_args.hostname) < 0) fprintf (stderr, "ipmi_sel_ctx_set_debug_prefix: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); } /* Only for outputting type/length fields */ if (!(state_data.fru_ctx = ipmi_fru_ctx_create (NULL))) { perror ("ipmi_fru_ctx_create()"); goto cleanup; } if (prog_data->args->output_event_state) { unsigned int flags = 0; if (!(state_data.interpret_ctx = ipmi_interpret_ctx_create ())) { perror ("ipmi_interpret_ctx_create()"); goto cleanup; } if (event_load_event_state_config_file (NULL, state_data.interpret_ctx, prog_data->args->event_state_config_file) < 0) goto cleanup; if (prog_data->args->interpret_oem_data) flags |= IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA; if (flags) { if (ipmi_interpret_ctx_set_flags (state_data.interpret_ctx, flags) < 0) { fprintf (stderr, "ipmi_interpret_ctx_set_flags: %s\n", ipmi_interpret_ctx_errormsg (state_data.interpret_ctx)); goto cleanup; } } if (ipmi_sel_ctx_set_parameter (state_data.sel_ctx, IPMI_SEL_PARAMETER_INTERPRET_CONTEXT, &(state_data.interpret_ctx)) < 0) { fprintf (stderr, "ipmi_sel_ctx_set_interpret: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); goto cleanup; } } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_fru_ctx_destroy (state_data.fru_ctx); ipmi_interpret_ctx_destroy (state_data.interpret_ctx); ipmi_sel_ctx_destroy (state_data.sel_ctx); ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_pet_prog_data_t prog_data; struct ipmi_pet_arguments cmd_args; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_pet_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; return (_ipmi_pet (&prog_data)); } freeipmi-1.6.4/ipmi-pet/ipmi-pet.h0000644002055400205540000000510213527331635016701 0ustar00achuachu00000000000000/* * Copyright (C) 2011-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PET_H #define IPMI_PET_H #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" /* seems like a nice size */ #define IPMI_PET_MAX_ARGS 1024 enum ipmi_pet_argp_option_keys { VERBOSE_KEY = 'v', PET_ACKNOWLEDGE_KEY = 160, CMD_FILE_KEY = 161, OUTPUT_EVENT_SEVERITY_KEY = 162, OUTPUT_EVENT_STATE_KEY = 163, EVENT_STATE_CONFIG_FILE_KEY = 164, MANUFACTURER_ID_KEY = 165, PRODUCT_ID_KEY = 166, INTERPRET_OEM_DATA_KEY = 167, ENTITY_SENSOR_NAMES_KEY = 168, NO_SENSOR_TYPE_OUTPUT_KEY = 169, COMMA_SEPARATED_OUTPUT_KEY = 170, NO_HEADER_OUTPUT_KEY = 171, NON_ABBREVIATED_UNITS_KEY = 172, }; struct ipmi_pet_arguments { struct common_cmd_args common_args; unsigned int verbose_count; int pet_acknowledge; char *cmd_file; int output_event_severity; int output_event_state; char *event_state_config_file; uint32_t manufacturer_id; int manufacturer_id_set; uint16_t product_id; int product_id_set; int interpret_oem_data; int entity_sensor_names; int no_sensor_type_output; int comma_separated_output; int no_header_output; int non_abbreviated_units; uint32_t specific_trap; int specific_trap_na_specified; int specific_trap_set; uint8_t variable_bindings[IPMI_PET_MAX_ARGS]; unsigned int variable_bindings_length; }; typedef struct ipmi_pet_prog_data { char *progname; struct ipmi_pet_arguments *args; } ipmi_pet_prog_data_t; typedef struct ipmi_pet_state_data { ipmi_pet_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; char *hostname; ipmi_sdr_ctx_t sdr_ctx; ipmi_sel_ctx_t sel_ctx; ipmi_fru_ctx_t fru_ctx; ipmi_interpret_ctx_t interpret_ctx; int output_headers; struct sensor_column_width column_width; struct ipmi_oem_data oem_data; } ipmi_pet_state_data_t; #endif /* IPMI_PET_H */ freeipmi-1.6.4/ipmi-pet/ipmi-pet-argp.c0000644002055400205540000003106313527331635017630 0ustar00achuachu00000000000000/* * Copyright (C) 2011-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include #include "ipmi-pet.h" #include "ipmi-pet-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-pet - " PACKAGE_VERSION "\n" "Copyright (C) 2011-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-pet - IPMI Platform Event Trap Interpreter"; static char cmdline_args_doc[] = "[SPECIFIC TRAP] [VARIABLE BINDING HEX BYTES ...]"; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_OPTIONS_DEBUG, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output.", 40}, { "pet-acknowledge", PET_ACKNOWLEDGE_KEY, 0, 0, "Send PET acknowledge using inputted trap data instead of outputting data.", 41}, { "file", CMD_FILE_KEY, "CMD-FILE", 0, "Specify a file to read PET bytes from.", 42}, { "output-event-severity", OUTPUT_EVENT_SEVERITY_KEY, 0, 0, "Output event severity in output.", 43}, { "output-event-state", OUTPUT_EVENT_STATE_KEY, 0, 0, "Output event state in output.", 44}, { "event-state-config-file", EVENT_STATE_CONFIG_FILE_KEY, "FILE", 0, "Specify an alternate event state configuration file.", 45}, { "manufacturer-id", MANUFACTURER_ID_KEY, "NUMBER", 0, "Specify a specific manufacturer id to assume.", 46}, { "product-id", PRODUCT_ID_KEY, "NUMBER", 0, "Specify a specific product id to assume.", 47}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 48}, { "entity-sensor-names", ENTITY_SENSOR_NAMES_KEY, NULL, 0, "Output sensor names with entity ids and instances.", 49}, { "no-sensor-type-output", NO_SENSOR_TYPE_OUTPUT_KEY, 0, 0, "Do not show sensor type output.", 50}, { "comma-separated-output", COMMA_SEPARATED_OUTPUT_KEY, 0, 0, "Output fields in comma separated format.", 51}, { "no-header-output", NO_HEADER_OUTPUT_KEY, 0, 0, "Do not output column headers.", 52}, { "non-abbreviated-units", NON_ABBREVIATED_UNITS_KEY, 0, 0, "Output non-abbreviated units (e.g. 'Amps' instead of 'A').", 53}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_pet_arguments *cmd_args; char *endptr; unsigned long tmp; assert (state); cmd_args = state->input; switch (key) { case VERBOSE_KEY: cmd_args->verbose_count++; break; case PET_ACKNOWLEDGE_KEY: cmd_args->pet_acknowledge++; break; case CMD_FILE_KEY: if (!(cmd_args->cmd_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case OUTPUT_EVENT_SEVERITY_KEY: cmd_args->output_event_severity = 1; break; case OUTPUT_EVENT_STATE_KEY: cmd_args->output_event_state = 1; break; case EVENT_STATE_CONFIG_FILE_KEY: if (!(cmd_args->event_state_config_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case MANUFACTURER_ID_KEY: errno = 0; tmp = strtoul (arg, &endptr, 10); if (errno || endptr[0] != '\0' || !tmp) { fprintf (stderr, "invalid manufacturer id: %lu\n", tmp); exit (EXIT_FAILURE); } cmd_args->manufacturer_id = tmp; cmd_args->manufacturer_id_set = 1; break; case PRODUCT_ID_KEY: errno = 0; tmp = strtoul (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp > USHRT_MAX) { fprintf (stderr, "invalid product id: %lu\n", tmp); exit (EXIT_FAILURE); } cmd_args->product_id = tmp; cmd_args->product_id_set = 1; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case ENTITY_SENSOR_NAMES_KEY: cmd_args->entity_sensor_names = 1; break; case NO_SENSOR_TYPE_OUTPUT_KEY: cmd_args->no_sensor_type_output = 1; break; case COMMA_SEPARATED_OUTPUT_KEY: cmd_args->comma_separated_output = 1; break; case NO_HEADER_OUTPUT_KEY: cmd_args->no_header_output = 1; break; case NON_ABBREVIATED_UNITS_KEY: cmd_args->non_abbreviated_units = 1; break; case ARGP_KEY_ARG: { unsigned int i; unsigned long uvalue; long value; char *endptr = NULL; if (!cmd_args->specific_trap_set) { if (!strcasecmp (arg, "NA")) { cmd_args->specific_trap_na_specified = 1; cmd_args->specific_trap_set = 1; break; } errno = 0; uvalue = strtoul (arg, &endptr, 0); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid specific trap argument\n"); exit (EXIT_FAILURE); } cmd_args->specific_trap = uvalue; cmd_args->specific_trap_set = 1; break; } if (strlen (arg) >= 2) { if (!strncmp (arg, "0x", 2)) arg+=2; } if (*arg == '\0') { fprintf (stderr, "invalid variable binding hex byte argument\n"); exit (EXIT_FAILURE); } for (i = 0; arg[i] != '\0'; i++) { if (i >= 2) { fprintf (stderr, "invalid variable binding hex byte argument\n"); exit (EXIT_FAILURE); } if (!isxdigit (arg[i])) { fprintf (stderr, "invalid variable binding hex byte argument\n"); exit (EXIT_FAILURE); } } if (cmd_args->variable_bindings_length < IPMI_PET_MAX_ARGS) { errno = 0; value = strtol (arg, &endptr, 16); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid variable binding hex byte argument\n"); exit (EXIT_FAILURE); } cmd_args->variable_bindings[cmd_args->variable_bindings_length++] = (uint8_t) value; } else { fprintf (stderr, "Too many arguments specified\n"); exit (EXIT_FAILURE); } break; } case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_pet_config_file_parse (struct ipmi_pet_arguments *cmd_args) { struct config_file_data_ipmi_pet config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_pet)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR, CONFIG_FILE_TOOL_IPMI_PET, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; if (config_file_data.output_event_severity_count) cmd_args->output_event_severity = config_file_data.output_event_severity; if (config_file_data.output_event_state_count) cmd_args->output_event_state = config_file_data.output_event_state; if (config_file_data.event_state_config_file_count) cmd_args->event_state_config_file = config_file_data.event_state_config_file; if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; if (config_file_data.entity_sensor_names_count) cmd_args->entity_sensor_names = config_file_data.entity_sensor_names; if (config_file_data.no_sensor_type_output_count) cmd_args->no_sensor_type_output = config_file_data.no_sensor_type_output; if (config_file_data.comma_separated_output_count) cmd_args->comma_separated_output = config_file_data.comma_separated_output; if (config_file_data.no_header_output_count) cmd_args->no_header_output = config_file_data.no_header_output; if (config_file_data.non_abbreviated_units_count) cmd_args->non_abbreviated_units = config_file_data.non_abbreviated_units; } static void _ipmi_pet_args_validate (struct ipmi_pet_arguments *cmd_args) { assert (cmd_args); if (cmd_args->pet_acknowledge && !cmd_args->common_args.hostname) { fprintf (stderr, "Must specify hostname if PET acknowledge specified\n"); exit (EXIT_FAILURE); } if ((cmd_args->manufacturer_id_set && !cmd_args->product_id_set) || (!cmd_args->manufacturer_id_set && cmd_args->product_id_set)) { fprintf (stderr, "Must specify both manufacturer id and product id\n"); exit (EXIT_FAILURE); } } void ipmi_pet_argp_parse (int argc, char **argv, struct ipmi_pet_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_operator (&(cmd_args->common_args)); cmd_args->verbose_count = 0; cmd_args->pet_acknowledge = 0; cmd_args->cmd_file = NULL; cmd_args->output_event_severity = 0; cmd_args->output_event_state = 0; cmd_args->event_state_config_file = NULL; cmd_args->manufacturer_id = 0; cmd_args->manufacturer_id_set = 0; cmd_args->product_id = 0; cmd_args->product_id_set = 0; cmd_args->interpret_oem_data = 0; cmd_args->entity_sensor_names = 0; cmd_args->no_sensor_type_output = 0; cmd_args->comma_separated_output = 0; cmd_args->no_header_output = 0; cmd_args->non_abbreviated_units = 0; cmd_args->specific_trap = 0; cmd_args->specific_trap_na_specified = 0; cmd_args->specific_trap_set = 0; memset (cmd_args->variable_bindings, '\0', sizeof (uint8_t) * IPMI_PET_MAX_ARGS); cmd_args->variable_bindings_length = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_pet_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_pet_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-pet/ipmi-pet-argp.h0000644002055400205540000000155013527331635017633 0ustar00achuachu00000000000000/* * Copyright (C) 2011-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_PET_ARGP_H #define IPMI_PET_ARGP_H void ipmi_pet_argp_parse (int argc, char **argv, struct ipmi_pet_arguments *cmd_args); #endif /* IPMI_PET_ARGP_H */ freeipmi-1.6.4/ipmi-raw/0000755002055400205540000000000013527342547015013 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-raw/Makefile.in0000644002055400205540000006702513527342445017067 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-raw$(EXEEXT) subdir = ipmi-raw DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_raw_OBJECTS = ipmi_raw-ipmi-raw.$(OBJEXT) \ ipmi_raw-ipmi-raw-argp.$(OBJEXT) ipmi_raw_OBJECTS = $(am_ipmi_raw_OBJECTS) ipmi_raw_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_raw_SOURCES) DIST_SOURCES = $(ipmi_raw_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_raw_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_raw_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_raw_SOURCES = \ ipmi-raw.c \ ipmi-raw.h \ ipmi-raw-argp.c \ ipmi-raw-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-raw/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-raw/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-raw$(EXEEXT): $(ipmi_raw_OBJECTS) $(ipmi_raw_DEPENDENCIES) $(EXTRA_ipmi_raw_DEPENDENCIES) @rm -f ipmi-raw$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_raw_OBJECTS) $(ipmi_raw_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_raw-ipmi-raw-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_raw-ipmi-raw.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_raw-ipmi-raw.o: ipmi-raw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_raw-ipmi-raw.o -MD -MP -MF $(DEPDIR)/ipmi_raw-ipmi-raw.Tpo -c -o ipmi_raw-ipmi-raw.o `test -f 'ipmi-raw.c' || echo '$(srcdir)/'`ipmi-raw.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_raw-ipmi-raw.Tpo $(DEPDIR)/ipmi_raw-ipmi-raw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-raw.c' object='ipmi_raw-ipmi-raw.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_raw-ipmi-raw.o `test -f 'ipmi-raw.c' || echo '$(srcdir)/'`ipmi-raw.c ipmi_raw-ipmi-raw.obj: ipmi-raw.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_raw-ipmi-raw.obj -MD -MP -MF $(DEPDIR)/ipmi_raw-ipmi-raw.Tpo -c -o ipmi_raw-ipmi-raw.obj `if test -f 'ipmi-raw.c'; then $(CYGPATH_W) 'ipmi-raw.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-raw.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_raw-ipmi-raw.Tpo $(DEPDIR)/ipmi_raw-ipmi-raw.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-raw.c' object='ipmi_raw-ipmi-raw.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_raw-ipmi-raw.obj `if test -f 'ipmi-raw.c'; then $(CYGPATH_W) 'ipmi-raw.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-raw.c'; fi` ipmi_raw-ipmi-raw-argp.o: ipmi-raw-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_raw-ipmi-raw-argp.o -MD -MP -MF $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Tpo -c -o ipmi_raw-ipmi-raw-argp.o `test -f 'ipmi-raw-argp.c' || echo '$(srcdir)/'`ipmi-raw-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Tpo $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-raw-argp.c' object='ipmi_raw-ipmi-raw-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_raw-ipmi-raw-argp.o `test -f 'ipmi-raw-argp.c' || echo '$(srcdir)/'`ipmi-raw-argp.c ipmi_raw-ipmi-raw-argp.obj: ipmi-raw-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_raw-ipmi-raw-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Tpo -c -o ipmi_raw-ipmi-raw-argp.obj `if test -f 'ipmi-raw-argp.c'; then $(CYGPATH_W) 'ipmi-raw-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-raw-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Tpo $(DEPDIR)/ipmi_raw-ipmi-raw-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-raw-argp.c' object='ipmi_raw-ipmi-raw-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_raw_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_raw-ipmi-raw-argp.obj `if test -f 'ipmi-raw-argp.c'; then $(CYGPATH_W) 'ipmi-raw-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-raw-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-raw/Makefile.am0000644002055400205540000000266013527331635017047 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-raw ipmi_raw_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_raw_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_raw_SOURCES = \ ipmi-raw.c \ ipmi-raw.h \ ipmi-raw-argp.c \ ipmi-raw-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-raw/ipmi-raw.c0000644002055400205540000002554713527331635016715 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-raw.h" #include "ipmi-raw-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-util-common.h" static int ipmi_raw_cmdline (ipmi_raw_state_data_t *state_data) { struct ipmi_raw_arguments *args; uint8_t *bytes_rq = NULL; unsigned int send_len; uint8_t *bytes_rs = NULL; int rs_len; int rv = -1; int i; assert (state_data); assert (state_data->prog_data->args->cmd); assert (state_data->prog_data->args->cmd_length); args = state_data->prog_data->args; bytes_rq = args->cmd; send_len = args->cmd_length; if (send_len <= 2) { pstdout_fprintf (state_data->pstate, stderr, "Invalid number of hex bytes\n"); goto cleanup; } if (!IPMI_NET_FN_RQ_VALID (bytes_rq[1])) { pstdout_fprintf (state_data->pstate, stderr, "Invalid netfn value\n"); goto cleanup; } if (!(bytes_rs = calloc (IPMI_RAW_MAX_ARGS, sizeof (uint8_t)))) { pstdout_perror (state_data->pstate, "calloc"); goto cleanup; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, bytes_rq[0], bytes_rq[1], &bytes_rq[2], send_len - 2, bytes_rs, IPMI_RAW_MAX_ARGS)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } pstdout_printf (state_data->pstate, "rcvd: "); for (i = 0; i < rs_len; i++) pstdout_printf (state_data->pstate, "%02X ", bytes_rs[i]); pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: free (bytes_rs); return (rv); } static int string2bytes (ipmi_raw_state_data_t *state_data, const char *line, unsigned char **buf, unsigned int *len, unsigned int line_count) { const char delim[] = " \t\f\v\r\n"; char *str = NULL; char *ptr = NULL; char *endptr = NULL; char *token = NULL; int delimbytes = 0; int count = 0; unsigned int i = 0; unsigned int l = 0; long value = 0; int rv = -1; assert (state_data); assert (line); assert (buf); assert (len); assert (line_count); *buf = NULL; *len = 0; for (i = 0, delimbytes = 0; line[i]; i++) { if (strchr ((const char*)delim, line[i])) delimbytes++; } /* Check for empty line */ if (delimbytes >= strlen (line)) { *len = count; return (0); } if (!(*buf = calloc ((strlen (line) - delimbytes), 1))) { pstdout_perror (state_data->pstate, "calloc"); goto cleanup; } if (!(str = (char *) strdup (line))) { pstdout_perror (state_data->pstate, "strdup"); goto cleanup; } ptr = str; while (1) { token = strsep (&ptr, delim); if (!token) break; if (!strcmp (token, "")) continue; l = strlen (token); if (l >= 2) { if (!strncmp (token, "0x", 2)) { token+=2; if (*token == '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid input line: %u\n", line_count); goto cleanup; } l = strlen (token); } } if (l > 2) { pstdout_fprintf (state_data->pstate, stderr, "invalid input line: %u\n", line_count); goto cleanup; } for (i = 0; i < l; i++) { if (!isxdigit (token[i])) { pstdout_fprintf (state_data->pstate, stderr, "invalid input line: %u\n", line_count); goto cleanup; } } errno = 0; value = strtol (token, &endptr, 16); if (errno || endptr[0] != '\0') { pstdout_fprintf (state_data->pstate, stderr, "invalid input line: %u\n", line_count); goto cleanup; } (*buf)[count++] = (unsigned char) value; } *len = count; rv = 0; cleanup: if (rv < 0) { free (*buf); *buf = NULL; *len = 0; } free (str); return (rv); } static int ipmi_raw_stream (ipmi_raw_state_data_t *state_data, FILE *stream) { char *line = NULL; unsigned int line_count = 0; size_t n = 0; uint8_t *bytes_rq = NULL; unsigned int send_len; uint8_t *bytes_rs = NULL; int rs_len; int i; int rv = -1; assert (state_data); assert (stream); while (1) { if (getline (&line, &n, stream) < 0) { /* perror ("getline()"); */ break; } line_count++; /* On invalid inputs, we exit instead of goto end loop. * * We could continue and read the next line, but the assumption * is that the user is writing a script of some sort to perform * a set of tasks. We do not want to continue the set of tasks * if one in the middle is invalid. */ if (string2bytes (state_data, line, &bytes_rq, &send_len, line_count) < 0) goto cleanup; /* Check for empty line */ if (!send_len) continue; if (send_len <= 2) { pstdout_fprintf (state_data->pstate, stderr, "Invalid number of hex bytes on line %d\n", line_count); goto end_loop; } if (!IPMI_NET_FN_RQ_VALID (bytes_rq[1])) { pstdout_fprintf (state_data->pstate, stderr, "Invalid netfn value on line %d\n", line_count); goto end_loop; } if (!(bytes_rs = calloc (IPMI_RAW_MAX_ARGS, sizeof (uint8_t)))) { pstdout_perror (state_data->pstate, "calloc"); goto cleanup; } if ((rs_len = ipmi_cmd_raw (state_data->ipmi_ctx, bytes_rq[0], bytes_rq[1], &bytes_rq[2], send_len - 2, bytes_rs, IPMI_RAW_MAX_ARGS)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_raw: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto end_loop; } pstdout_printf (state_data->pstate, "rcvd: "); for (i = 0; i < rs_len; i++) pstdout_printf (state_data->pstate, "%02X ", bytes_rs[i]); pstdout_printf (state_data->pstate, "\n"); end_loop: free (line); line = NULL; free (bytes_rq); bytes_rq = NULL; free (bytes_rs); bytes_rs = NULL; send_len = 0; n = 0; } rv = 0; cleanup: free (line); free (bytes_rq); free (bytes_rs); return (rv); } int run_cmd_args (ipmi_raw_state_data_t *state_data) { struct ipmi_raw_arguments *args; FILE *infile = NULL; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (args->cmd_length) { if (ipmi_raw_cmdline (state_data) < 0) goto cleanup; return (0); } if (args->cmd_file) { if (!(infile = fopen (args->cmd_file, "r"))) { pstdout_perror (state_data->pstate, "fopen()"); goto cleanup; } } else infile = stdin; if (ipmi_raw_stream (state_data, infile) < 0) goto cleanup; rv = 0; cleanup: if (infile && infile != stdin) fclose (infile); return (rv); } static int _ipmi_raw (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_raw_state_data_t state_data; ipmi_raw_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; assert (pstate); assert (arg); prog_data = (ipmi_raw_prog_data_t *)arg; memset (&state_data, '\0', sizeof (ipmi_raw_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, state_data.prog_data->args->no_session ? IPMI_FLAGS_NOSESSION : 0))) goto cleanup; if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_raw_prog_data_t prog_data; struct ipmi_raw_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_raw_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_raw, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-raw/ipmi-raw.h0000644002055400205540000000306013527331635016704 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RAW_H #define IPMI_RAW_H #include #include "tool-cmdline-common.h" #include "pstdout.h" /* IPMI 2.0 Payload is 2 bytes, so we'll assume that size * 2 for good measure */ #define IPMI_RAW_MAX_ARGS (65536*2) enum ipmi_raw_argp_option_keys { CHANNEL_NUMBER_KEY = 160, /* legacy */ SLAVE_ADDRESS_KEY = 161, /* legacy */ CMD_FILE_KEY = 162, NO_SESSION_KEY = 163, }; struct ipmi_raw_arguments { struct common_cmd_args common_args; char *cmd_file; int no_session; uint8_t cmd[IPMI_RAW_MAX_ARGS]; unsigned int cmd_length; }; typedef struct ipmi_raw_prog_data { char *progname; struct ipmi_raw_arguments *args; } ipmi_raw_prog_data_t; typedef struct ipmi_raw_state_data { ipmi_raw_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; } ipmi_raw_state_data_t; #endif /* IPMI_RAW_H */ freeipmi-1.6.4/ipmi-raw/ipmi-raw-argp.c0000644002055400205540000001544713527331635017642 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include "ipmi-raw.h" #include "ipmi-raw-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-raw - " PACKAGE_VERSION "\n" "Copyright (C) 2005-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-raw - execute IPMI commands by hex values"; static char cmdline_args_doc[] = "[ COMMAND-HEX-BYTES]"; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, /* legacy - overriden by general option in inband options */ { "channel-number", CHANNEL_NUMBER_KEY, "NUMBER", OPTION_HIDDEN, "Specify an alternate channel number to bridge raw commands to.", 40}, /* legacy - overriden by general option in inband options */ { "slave-address", SLAVE_ADDRESS_KEY, "ADDRESS", OPTION_HIDDEN, "Specify an alternate slave address to bridge raw commands to.", 41}, { "file", CMD_FILE_KEY, "CMD-FILE", 0, "Specify a file to read command requests from.", 42}, { "no-session", NO_SESSION_KEY, NULL, 0, "Do not establish an IPMI session if doing out of band IPMI.", 43}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_raw_arguments *cmd_args; error_t ret; char *endptr; assert (state); cmd_args = state->input; switch (key) { case CHANNEL_NUMBER_KEY: ret = common_parse_opt (ARGP_TARGET_CHANNEL_NUMBER_KEY, arg, &(cmd_args->common_args)); if (ret == ARGP_ERR_UNKNOWN) return (ret); break; case SLAVE_ADDRESS_KEY: ret = common_parse_opt (ARGP_TARGET_SLAVE_ADDRESS_KEY, arg, &(cmd_args->common_args)); if (ret == ARGP_ERR_UNKNOWN) return (ret); break; case CMD_FILE_KEY: if (!(cmd_args->cmd_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case NO_SESSION_KEY: cmd_args->no_session = 1; break; case ARGP_KEY_ARG: { unsigned int i; long value; if (strlen (arg) >= 2) { if (!strncmp (arg, "0x", 2)) arg+=2; } if (*arg == '\0') { fprintf (stderr, "invalid hex byte argument\n"); exit (EXIT_FAILURE); } for (i = 0; arg[i] != '\0'; i++) { if (i >= 2) { fprintf (stderr, "invalid hex byte argument\n"); exit (EXIT_FAILURE); } if (!isxdigit (arg[i])) { fprintf (stderr, "invalid hex byte argument\n"); exit (EXIT_FAILURE); } } if (cmd_args->cmd_length < IPMI_RAW_MAX_ARGS) { errno = 0; value = strtol (arg, &endptr, 16); if (errno || endptr[0] != '\0') { fprintf (stderr, "invalid hex byte argument\n"); exit (EXIT_FAILURE); } cmd_args->cmd[cmd_args->cmd_length++] = (uint8_t) value; } else { fprintf (stderr, "Too many arguments specified\n"); exit (EXIT_FAILURE); } break; } case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_raw_config_file_parse (struct ipmi_raw_arguments *cmd_args) { assert (cmd_args); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_RAW, NULL) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } } void ipmi_raw_argp_parse (int argc, char **argv, struct ipmi_raw_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); cmd_args->cmd_file = NULL; cmd_args->no_session = 0; memset (cmd_args->cmd, '\0', sizeof (uint8_t) * IPMI_RAW_MAX_ARGS); cmd_args->cmd_length = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_raw_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); } freeipmi-1.6.4/ipmi-raw/ipmi-raw-argp.h0000644002055400205540000000157713527331635017646 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_RAW_ARGP_H #define IPMI_RAW_ARGP_H #include "ipmi-raw.h" void ipmi_raw_argp_parse (int argc, char **argv, struct ipmi_raw_arguments *cmd_args); #endif /* IPMI_RAW_ARGP_H */ freeipmi-1.6.4/ipmi-sel/0000755002055400205540000000000013527342547015005 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-sel/Makefile.in0000644002055400205540000006743013527342445017061 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-sel$(EXEEXT) subdir = ipmi-sel DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_sel_OBJECTS = ipmi_sel-ipmi-sel.$(OBJEXT) \ ipmi_sel-ipmi-sel-argp.$(OBJEXT) ipmi_sel_OBJECTS = $(am_ipmi_sel_OBJECTS) ipmi_sel_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_sel_SOURCES) DIST_SOURCES = $(ipmi_sel_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_sel_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_sel_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_sel_SOURCES = \ ipmi-sel.c \ ipmi-sel_.h \ ipmi-sel-argp.c \ ipmi-sel-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-sel/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-sel/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-sel$(EXEEXT): $(ipmi_sel_OBJECTS) $(ipmi_sel_DEPENDENCIES) $(EXTRA_ipmi_sel_DEPENDENCIES) @rm -f ipmi-sel$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_sel_OBJECTS) $(ipmi_sel_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sel-ipmi-sel-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sel-ipmi-sel.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_sel-ipmi-sel.o: ipmi-sel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sel-ipmi-sel.o -MD -MP -MF $(DEPDIR)/ipmi_sel-ipmi-sel.Tpo -c -o ipmi_sel-ipmi-sel.o `test -f 'ipmi-sel.c' || echo '$(srcdir)/'`ipmi-sel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sel-ipmi-sel.Tpo $(DEPDIR)/ipmi_sel-ipmi-sel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sel.c' object='ipmi_sel-ipmi-sel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sel-ipmi-sel.o `test -f 'ipmi-sel.c' || echo '$(srcdir)/'`ipmi-sel.c ipmi_sel-ipmi-sel.obj: ipmi-sel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sel-ipmi-sel.obj -MD -MP -MF $(DEPDIR)/ipmi_sel-ipmi-sel.Tpo -c -o ipmi_sel-ipmi-sel.obj `if test -f 'ipmi-sel.c'; then $(CYGPATH_W) 'ipmi-sel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sel.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sel-ipmi-sel.Tpo $(DEPDIR)/ipmi_sel-ipmi-sel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sel.c' object='ipmi_sel-ipmi-sel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sel-ipmi-sel.obj `if test -f 'ipmi-sel.c'; then $(CYGPATH_W) 'ipmi-sel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sel.c'; fi` ipmi_sel-ipmi-sel-argp.o: ipmi-sel-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sel-ipmi-sel-argp.o -MD -MP -MF $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Tpo -c -o ipmi_sel-ipmi-sel-argp.o `test -f 'ipmi-sel-argp.c' || echo '$(srcdir)/'`ipmi-sel-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Tpo $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sel-argp.c' object='ipmi_sel-ipmi-sel-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sel-ipmi-sel-argp.o `test -f 'ipmi-sel-argp.c' || echo '$(srcdir)/'`ipmi-sel-argp.c ipmi_sel-ipmi-sel-argp.obj: ipmi-sel-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sel-ipmi-sel-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Tpo -c -o ipmi_sel-ipmi-sel-argp.obj `if test -f 'ipmi-sel-argp.c'; then $(CYGPATH_W) 'ipmi-sel-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sel-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Tpo $(DEPDIR)/ipmi_sel-ipmi-sel-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sel-argp.c' object='ipmi_sel-ipmi-sel-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sel_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sel-ipmi-sel-argp.obj `if test -f 'ipmi-sel-argp.c'; then $(CYGPATH_W) 'ipmi-sel-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sel-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-sel/Makefile.am0000644002055400205540000000317713527331635017045 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-sel ipmi_sel_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_sel_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_sel_SOURCES = \ ipmi-sel.c \ ipmi-sel_.h \ ipmi-sel-argp.c \ ipmi-sel-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-sel/ipmi-sel.c0000644002055400205540000023345113527331635016674 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmi-sel_.h" #include "ipmi-sel-argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-event-common.h" #include "tool-hostrange-common.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #include "tool-util-common.h" #define IPMI_SEL_TIME_BUFLEN 512 static int _display_sel_info (ipmi_sel_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t major, minor; uint16_t entries, free_space; uint64_t val; char timestr[IPMI_SEL_TIME_BUFLEN + 1]; int rv = -1; uint8_t allocation_supported = 0; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_info (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sel_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sel_version_major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_version_major': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "sel_version_minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sel_version_minor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; /* achu: ipmi version is BCD encoded, but major/minor are only 4 bits */ pstdout_printf (state_data->pstate, "SEL version : %u.%u\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "entries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'entries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } entries = val; pstdout_printf (state_data->pstate, "Number of log entries : %u\n", entries); if (FIID_OBJ_GET (obj_cmd_rs, "free_space", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'free_space': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } free_space = val; pstdout_printf (state_data->pstate, "Free space remaining : %u bytes\n", free_space); if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_addition_timestamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'most_recent_addition_timestamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', IPMI_SEL_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, IPMI_SEL_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Recent addition timestamp : %s\n", timestr); if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_erase_timestamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'most_recent_erase_timestamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', IPMI_SEL_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, IPMI_SEL_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Recent erase timestamp : %s\n", timestr); if (FIID_OBJ_GET (obj_cmd_rs, "get_sel_allocation_info_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'get_sel_allocation_info_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Get SEL Allocation Information Command : %s\n", (val ? "supported" : "unsupported")); allocation_supported = val; if (FIID_OBJ_GET (obj_cmd_rs, "reserve_sel_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'reserve_sel_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Reserve SEL Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "partial_add_sel_entry_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'partial_add_sel_entry_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Partial Add SEL Entry Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "delete_sel_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'delete_sel_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Delete SEL Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "overflow_flag", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'overflow_flag': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* "Events have been dropped due to lack of space in the SEL" */ pstdout_printf (state_data->pstate, "Events dropped due to lack of space : %s\n", (val ? "Yes" : "No")); if (allocation_supported) { uint16_t number_of_possible_allocation_units; uint16_t allocation_unit_size; uint16_t number_of_free_allocation_units; uint16_t largest_free_block; uint8_t maximum_record_size; fiid_obj_destroy (obj_cmd_rs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_allocation_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_allocation_info (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sel_allocation_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_possible_allocation_units", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_possible_allocation_units': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_possible_allocation_units = val; if (FIID_OBJ_GET (obj_cmd_rs, "allocation_unit_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'allocation_unit_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } allocation_unit_size = val; if (FIID_OBJ_GET (obj_cmd_rs, "number_of_free_allocation_units", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_free_allocation_units': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_free_allocation_units = val; if (FIID_OBJ_GET (obj_cmd_rs, "largest_free_block", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'largest_free_block': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } largest_free_block = val; if (FIID_OBJ_GET (obj_cmd_rs, "maximum_record_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'maximum_record_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } maximum_record_size = val; if (!number_of_possible_allocation_units) pstdout_printf (state_data->pstate, "Number of possible allocation units : unspecified\n"); else pstdout_printf (state_data->pstate, "Number of possible allocation units : %u\n", number_of_possible_allocation_units); if (!allocation_unit_size) pstdout_printf (state_data->pstate, "Allocation unit size : unspecified\n"); else pstdout_printf (state_data->pstate, "Allocation unit size : %u bytes\n", allocation_unit_size); pstdout_printf (state_data->pstate, "Number of free allocation units : %u\n", number_of_free_allocation_units); pstdout_printf (state_data->pstate, "Largest free block : %u allocation units\n", largest_free_block); pstdout_printf (state_data->pstate, "Maximum record size : %u allocation units\n", maximum_record_size); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _clear_entries (ipmi_sel_state_data_t *state_data) { int rv = -1; assert (state_data); if (ipmi_sel_clear_sel (state_data->sel_ctx) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_clear_sel: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } static int _delete_entry (ipmi_sel_state_data_t *state_data, uint16_t record_id, int ignore_missing_sel_entries) { int rv = -1; assert (state_data); assert (record_id); if (ipmi_sel_delete_sel_entry (state_data->sel_ctx, record_id) < 0) { if (!(ignore_missing_sel_entries && (ipmi_sel_ctx_errnum (state_data->sel_ctx) == IPMI_SEL_ERR_NOT_FOUND))) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_delete_sel_entry: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } rv = 0; cleanup: return (rv); } static int _delete_records (ipmi_sel_state_data_t *state_data) { struct ipmi_sel_arguments *args; unsigned int i; assert (state_data); args = state_data->prog_data->args; for (i = 0; i < args->delete_record_list_length; i++) { if (_delete_entry (state_data, args->delete_record_list[i], 0) < 0) return (-1); } return (0); } static int _delete_range (ipmi_sel_state_data_t *state_data) { struct ipmi_sel_arguments *args; unsigned int i; assert (state_data); args = state_data->prog_data->args; for (i = args->delete_range1; i <= args->delete_range2; i++) { if (_delete_entry (state_data, i, 1) < 0) return (-1); } return (0); } /* return (-1), real error */ static int _sel_parse_err_handle (ipmi_sel_state_data_t *state_data, char *func) { assert (state_data); assert (func); if (ipmi_sel_ctx_errnum (state_data->sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) { /* maybe a bad SEL entry returned from remote system, don't error out */ if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Invalid SEL entry read\n"); return (0); } pstdout_fprintf (state_data->pstate, stderr, "%s: %s\n", func, ipmi_sel_ctx_errormsg (state_data->sel_ctx)); return (-1); } static int _hex_output (ipmi_sel_state_data_t *state_data) { uint8_t record_data[IPMI_SEL_RECORD_MAX_RECORD_LENGTH]; int record_data_len; int rv = -1; assert (state_data); if ((record_data_len = ipmi_sel_parse_read_record (state_data->sel_ctx, record_data, IPMI_SEL_RECORD_MAX_RECORD_LENGTH)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record") < 0) goto cleanup; goto out; } if (state_data->prog_data->args->common_args.debug && record_data_len < IPMI_SEL_RECORD_MAX_RECORD_LENGTH) { pstdout_fprintf (state_data->pstate, stderr, "Invalid length SEL entry read: %d\n", record_data_len); goto out; } pstdout_printf (state_data->pstate, "RID:[%02X][%02X] " "RT:[%02X] " "TS:[%02X][%02X][%02X][%02X] " "GID:[%02X][%02X] " "ER:[%02X] " "ST:[%02X] " "SN:[%02X] " "EDIR:[%02X] " "ED1: [%02X] " "ED2: [%02X] " "ED3: [%02X]\n", record_data[0], record_data[1], record_data[2], record_data[3], record_data[4], record_data[5], record_data[6], record_data[7], record_data[8], record_data[9], record_data[10], record_data[11], record_data[12], record_data[13], record_data[14], record_data[15]); out: rv = 0; cleanup: return (rv); } static int _legacy_normal_output (ipmi_sel_state_data_t *state_data, uint8_t record_type) { char fmtbuf[EVENT_FMT_BUFLEN+1]; char outbuf[EVENT_OUTPUT_BUFLEN+1]; char *fmt; int outbuf_len; unsigned int flags; int record_type_class; int rv = -1; assert (state_data); assert (state_data->prog_data->args->legacy_output); flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD; flags |= IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; flags |= IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING; flags |= IPMI_SEL_STRING_FLAGS_LEGACY; /* IPMI Workaround * * HP DL 380 G5 * Intel S2600JF/Appro 512X * * Motherboard is reporting invalid SEL Records types (0x00 on HP DL * 380 G5, 0x03 on Intel S2600JF/Appro 512X) */ if (state_data->prog_data->args->assume_system_event_records && (!IPMI_SEL_RECORD_TYPE_VALID (record_type))) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { uint8_t event_type_code; uint8_t event_data2_flag; uint8_t event_data3_flag; uint8_t event_data2; uint8_t event_data3; if (ipmi_sel_parse_read_event_type_code (state_data->sel_ctx, NULL, 0, &event_type_code) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_event_type_code") < 0) goto cleanup; goto out; } if (ipmi_sel_parse_read_event_data1_event_data2_flag (state_data->sel_ctx, NULL, 0, &event_data2_flag) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_event_data1_event_data2_flag") < 0) goto cleanup; goto out; } if (ipmi_sel_parse_read_event_data1_event_data3_flag (state_data->sel_ctx, NULL, 0, &event_data3_flag) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_event_data1_event_data3_flag") < 0) goto cleanup; goto out; } if (ipmi_sel_parse_read_event_data2 (state_data->sel_ctx, NULL, 0, &event_data2) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_event_data2") < 0) goto cleanup; goto out; } if (ipmi_sel_parse_read_event_data3 (state_data->sel_ctx, NULL, 0, &event_data3) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_event_data3") < 0) goto cleanup; goto out; } strcpy (fmtbuf, "%i:%d %t:%T %s:%e"); /* achu: special case, legacy output didn't support previous/severity output and would not output 0xFF for discrete events. */ if (!(((ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) && event_data2_flag == IPMI_SEL_EVENT_DATA_PREVIOUS_STATE_OR_SEVERITY) || ((ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD || ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) && event_data2_flag == IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE && event_data2 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT))) { if (event_data2_flag != IPMI_SEL_EVENT_DATA_UNSPECIFIED_BYTE) strcat (fmtbuf, ":%f"); } if (!((ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD || ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE || ipmi_event_reading_type_code_class (event_type_code) == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) && event_data3_flag == IPMI_SEL_EVENT_DATA_SENSOR_SPECIFIC_EVENT_EXTENSION_CODE && event_data3 == IPMI_SEL_RECORD_UNSPECIFIED_EVENT)) { if (event_data3_flag != IPMI_SEL_EVENT_DATA_UNSPECIFIED_BYTE) strcat (fmtbuf, ":%h"); } fmt = fmtbuf; } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) fmt = "%i:%d %t:%m:%o"; else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) fmt = "%i:o"; else { pstdout_fprintf (state_data->pstate, stderr, "Unknown SEL Record Type: %Xh\n", record_type); goto out; } memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, fmt, NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) goto cleanup; goto out; } if (outbuf_len) pstdout_printf (state_data->pstate, "%s\n", outbuf); out: rv = 0; cleanup: return (rv); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_record_id (ipmi_sel_state_data_t *state_data, unsigned int flags) { char fmt[EVENT_FMT_BUFLEN + 1]; char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; assert (state_data); assert (!state_data->prog_data->args->legacy_output); memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%i", NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, EVENT_FMT_BUFLEN, "%%s"); else snprintf (fmt, EVENT_FMT_BUFLEN, "%%-%ds", state_data->column_width.record_id); if (outbuf_len) pstdout_printf (state_data->pstate, fmt, outbuf); else pstdout_printf (state_data->pstate, fmt, EVENT_NA_STRING); return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_date (ipmi_sel_state_data_t *state_data, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; assert (state_data); assert (!state_data->prog_data->args->legacy_output); memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%d", NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } if (state_data->prog_data->args->comma_separated_output) { if (outbuf_len) pstdout_printf (state_data->pstate, ",%s", outbuf); else pstdout_printf (state_data->pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) pstdout_printf (state_data->pstate, " | %-11s", outbuf); else pstdout_printf (state_data->pstate, " | %-11s", EVENT_NA_STRING); } return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_not_available_date (ipmi_sel_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s", EVENT_NA_STRING); else pstdout_printf (state_data->pstate, " | %-11s", EVENT_NA_STRING); return (1); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_time (ipmi_sel_state_data_t *state_data, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); return (event_output_time (state_data->pstate, state_data->sel_ctx, NULL, 0, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_not_available_time (ipmi_sel_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); return (event_output_not_available_time (state_data->pstate, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_sensor_name (ipmi_sel_state_data_t *state_data, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); return (event_output_sensor_name (state_data->pstate, state_data->sel_ctx, NULL, 0, &state_data->column_width, &state_data->prog_data->args->common_args, state_data->prog_data->args->comma_separated_output, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_not_available_sensor_name (ipmi_sel_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); return (event_output_not_available_sensor_name (state_data->pstate, &state_data->column_width, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_sensor_type (ipmi_sel_state_data_t *state_data, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->no_sensor_type_output); assert (!state_data->prog_data->args->legacy_output); return (event_output_sensor_type (state_data->pstate, state_data->sel_ctx, NULL, 0, &state_data->column_width, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_not_available_sensor_type (ipmi_sel_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->no_sensor_type_output); assert (!state_data->prog_data->args->legacy_output); return (event_output_not_available_sensor_type (state_data->pstate, &state_data->column_width, state_data->prog_data->args->comma_separated_output)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_event_state (ipmi_sel_state_data_t *state_data, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); assert (state_data->prog_data->args->output_event_state); return (event_output_event_state (state_data->pstate, state_data->sel_ctx, NULL, 0, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_event_direction (ipmi_sel_state_data_t *state_data, unsigned int flags) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); assert (state_data->prog_data->args->verbose_count >= 1); return (event_output_event_direction (state_data->pstate, state_data->sel_ctx, NULL, 0, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_not_available_event_direction (ipmi_sel_state_data_t *state_data) { assert (state_data); assert (!state_data->prog_data->args->legacy_output); assert (state_data->prog_data->args->verbose_count >= 1); return (event_output_not_available_event_direction (state_data->pstate, state_data->prog_data->args->comma_separated_output)); } /* return length written into buffer on success (may be zero) * return (-1) on error */ static int _output_oem_event_strings (ipmi_sel_state_data_t *state_data, char *outbuf, unsigned int outbuflen, unsigned int flags) { unsigned int len; int ret; assert (state_data); assert (!state_data->prog_data->args->legacy_output); if ((ret = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%O", NULL, 0, outbuf, outbuflen, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } len = strlen (outbuf); /* we don't count N/A as a valid string to be returned */ if (len && strcmp (outbuf, EVENT_NA_STRING)) return (ret); return (0); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_event (ipmi_sel_state_data_t *state_data, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len = 0; assert (state_data); assert (!state_data->prog_data->args->legacy_output); if (state_data->prog_data->args->output_oem_event_strings) { memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = _output_oem_event_strings (state_data, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) return (-1); if (outbuf_len) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s", outbuf); else pstdout_printf (state_data->pstate, " | %s", outbuf); return (1); } } return (event_output_event (state_data->pstate, state_data->sel_ctx, NULL, 0, state_data->prog_data->args->comma_separated_output, state_data->prog_data->args->common_args.debug, flags)); } /* return 1 on success * return (0) on non-success, but don't fail * return (-1) on error */ static int _normal_output_oem_data (ipmi_sel_state_data_t *state_data, int record_has_manufacturer_id, unsigned int flags) { char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len = 0; assert (state_data); assert (!state_data->prog_data->args->legacy_output); if (state_data->prog_data->args->output_oem_event_strings) { memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = _output_oem_event_strings (state_data, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) return (-1); } if (!outbuf_len) { memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if (state_data->prog_data->args->output_manufacturer_id && record_has_manufacturer_id) { if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%m ; %o", NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } } else { if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%o", NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } } } if (state_data->prog_data->args->comma_separated_output) { if (outbuf_len) pstdout_printf (state_data->pstate, ",%s", outbuf); else pstdout_printf (state_data->pstate, ",%s", EVENT_NA_STRING); } else { if (outbuf_len) pstdout_printf (state_data->pstate, " | %s", outbuf); else pstdout_printf (state_data->pstate, " | %s", EVENT_NA_STRING); } return (1); } static int _normal_output (ipmi_sel_state_data_t *state_data, uint8_t record_type) { char fmt[EVENT_FMT_BUFLEN + 1]; unsigned int flags; int record_type_class; int rv = -1; int ret; assert (state_data); assert (!state_data->prog_data->args->legacy_output); if (!state_data->prog_data->args->no_header_output && !state_data->output_headers) { if (state_data->prog_data->args->comma_separated_output) { if (state_data->prog_data->args->no_sensor_type_output) pstdout_printf (state_data->pstate, "%s,Date,Time,%s", SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR); else pstdout_printf (state_data->pstate, "%s,Date,Time,%s,%s", SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR, SENSORS_HEADER_TYPE_STR); if (state_data->prog_data->args->output_event_state) pstdout_printf (state_data->pstate, ",%s", SENSORS_HEADER_STATE_STR); if (state_data->prog_data->args->verbose_count >= 1) pstdout_printf (state_data->pstate, ",Event Direction"); pstdout_printf (state_data->pstate, ",Event"); pstdout_printf (state_data->pstate, "\n"); } else { memset (fmt, '\0', EVENT_FMT_BUFLEN + 1); if (state_data->prog_data->args->no_sensor_type_output) { snprintf (fmt, EVENT_FMT_BUFLEN, "%%-%ds | Date | Time | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR); } else { snprintf (fmt, EVENT_FMT_BUFLEN, "%%-%ds | Date | Time | %%-%ds | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name, state_data->column_width.sensor_type); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR, SENSORS_HEADER_TYPE_STR); } if (state_data->prog_data->args->output_event_state) pstdout_printf (state_data->pstate, " | %s ", SENSORS_HEADER_STATE_STR); if (state_data->prog_data->args->verbose_count >= 1) pstdout_printf (state_data->pstate, " | Event Direction "); pstdout_printf (state_data->pstate, " | Event"); pstdout_printf (state_data->pstate, "\n"); } state_data->output_headers++; } flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD; flags |= IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; flags |= IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING; if (state_data->prog_data->args->verbose_count >= 2) flags |= IPMI_SEL_STRING_FLAGS_VERBOSE; if (state_data->prog_data->args->entity_sensor_names) flags |= IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES; if (state_data->prog_data->args->non_abbreviated_units) flags |= IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS; if (state_data->prog_data->args->interpret_oem_data) flags |= IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA; if (state_data->prog_data->args->common_args.utc_to_localtime) flags |= IPMI_SEL_STRING_FLAGS_UTC_TO_LOCALTIME; if (state_data->prog_data->args->common_args.localtime_to_utc) flags |= IPMI_SEL_STRING_FLAGS_LOCALTIME_TO_UTC; /* IPMI Workaround * * HP DL 380 G5 * Intel S2600JF/Appro 512X * * Motherboard is reporting invalid SEL Records types (0x00 on HP DL * 380 G5, 0x03 on Intel S2600JF/Appro 512X) */ if (state_data->prog_data->args->assume_system_event_records && (!IPMI_SEL_RECORD_TYPE_VALID (record_type))) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { if ((ret = _normal_output_record_id (state_data, flags)) < 0) goto cleanup; if (!ret) goto out; if ((ret = _normal_output_date (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_time (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_sensor_name (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if (!state_data->prog_data->args->no_sensor_type_output) { if ((ret = _normal_output_sensor_type (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->output_event_state) { if ((ret = _normal_output_event_state (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->verbose_count >= 1) { if ((ret = _normal_output_event_direction (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if ((ret = _normal_output_event (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if ((ret = _normal_output_record_id (state_data, flags)) < 0) goto cleanup; if (!ret) goto out; if ((ret = _normal_output_date (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_time (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_not_available_sensor_name (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; if (!state_data->prog_data->args->no_sensor_type_output) { if ((ret = _normal_output_not_available_sensor_type (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->output_event_state) { if ((ret = _normal_output_event_state (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->verbose_count >= 1) { if ((ret = _normal_output_not_available_event_direction (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; } if ((ret = _normal_output_oem_data (state_data, 1, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { if ((ret = _normal_output_record_id (state_data, flags)) < 0) goto cleanup; if (!ret) goto out; if ((ret = _normal_output_not_available_date (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_not_available_time (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; if ((ret = _normal_output_not_available_sensor_name (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; if (!state_data->prog_data->args->no_sensor_type_output) { if ((ret = _normal_output_not_available_sensor_type (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->output_event_state) { if ((ret = _normal_output_event_state (state_data, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } if (state_data->prog_data->args->verbose_count >= 1) { if ((ret = _normal_output_not_available_event_direction (state_data)) < 0) goto cleanup; if (!ret) goto newline_out; } if ((ret = _normal_output_oem_data (state_data, 0, flags)) < 0) goto cleanup; if (!ret) goto newline_out; } else { pstdout_fprintf (state_data->pstate, stderr, "Unknown SEL Record Type: %Xh\n", record_type); goto out; } newline_out: pstdout_printf (state_data->pstate, "\n"); out: rv = 0; cleanup: return (rv); } static int _sel_parse_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmi_sel_state_data_t *state_data; uint8_t record_type; int record_type_class; int rv = -1; assert (ctx); assert (callback_data); state_data = (ipmi_sel_state_data_t *)callback_data; if (state_data->prog_data->args->exclude_display || state_data->prog_data->args->exclude_display_range) { uint16_t record_id; if (ipmi_sel_parse_read_record_id (state_data->sel_ctx, NULL, 0, &record_id) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_id") < 0) goto cleanup; goto out; } if (state_data->prog_data->args->exclude_display) { unsigned int i; /* achu: I know it's slow, shouldn't be that big of a deal in the grand scheme */ for (i = 0; i < state_data->prog_data->args->exclude_display_record_list_length; i++) { if (state_data->prog_data->args->exclude_display_record_list[i] == record_id) goto out; } } else { if (record_id >= state_data->prog_data->args->exclude_display_range1 && record_id <= state_data->prog_data->args->exclude_display_range2) goto out; } } if (state_data->prog_data->args->sensor_types_length || state_data->prog_data->args->exclude_sensor_types_length) { uint8_t sensor_type; int flag; if (ipmi_sel_parse_read_sensor_type (state_data->sel_ctx, NULL, 0, &sensor_type) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_type") < 0) goto cleanup; goto out; } if (state_data->prog_data->args->sensor_types_length) { if ((flag = sensor_type_listed (state_data->pstate, sensor_type, state_data->prog_data->args->sensor_types, state_data->prog_data->args->sensor_types_length)) < 0) goto cleanup; if (!flag) goto out; } if (state_data->prog_data->args->exclude_sensor_types_length) { if ((flag = sensor_type_listed (state_data->pstate, sensor_type, state_data->prog_data->args->exclude_sensor_types, state_data->prog_data->args->exclude_sensor_types_length)) < 0) goto cleanup; if (flag) goto out; } } if (ipmi_sel_parse_read_record_type (state_data->sel_ctx, NULL, 0, &record_type) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_record_type") < 0) goto cleanup; goto out; } /* IPMI Workaround * * HP DL 380 G5 * Intel S2600JF/Appro 512X * * Motherboard is reporting invalid SEL Records types (0x00 on HP DL * 380 G5, 0x03 on Intel S2600JF/Appro 512X) */ if (state_data->prog_data->args->assume_system_event_records && (!IPMI_SEL_RECORD_TYPE_VALID (record_type))) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (state_data->prog_data->args->system_event_only && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) goto out; if (state_data->prog_data->args->oem_event_only && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) goto out; if ((state_data->prog_data->args->date_range || state_data->prog_data->args->exclude_date_range) && (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD || record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD)) { uint32_t timestamp; if (ipmi_sel_parse_read_timestamp (state_data->sel_ctx, NULL, 0, ×tamp) < 0) { if (_sel_parse_err_handle (state_data, "ipmi_sel_parse_read_timestamp") < 0) goto cleanup; goto out; } if (state_data->prog_data->args->date_range) { if (timestamp < state_data->prog_data->args->date_range1 || timestamp > state_data->prog_data->args->date_range2) goto out; } if (state_data->prog_data->args->exclude_date_range) { if (timestamp >= state_data->prog_data->args->exclude_date_range1 && timestamp <= state_data->prog_data->args->exclude_date_range2) goto out; } } /* Special case, if there is no timestamp, filter it out */ if (state_data->prog_data->args->date_range && record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { if (state_data->prog_data->args->date_range) goto out; } if (state_data->prog_data->args->hex_dump) { if (_hex_output (state_data) < 0) goto cleanup; } else { if (state_data->prog_data->args->legacy_output) { if (_legacy_normal_output (state_data, record_type) < 0) goto cleanup; } else { if (_normal_output (state_data, record_type) < 0) goto cleanup; } } out: rv = 0; cleanup: return (rv); } static int _sel_record_id_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmi_sel_state_data_t *state_data; char outbuf[EVENT_OUTPUT_BUFLEN+1]; int outbuf_len; int rv = -1; assert (ctx); assert (callback_data); state_data = (ipmi_sel_state_data_t *)callback_data; /* won't bother with exclude or record-type only options */ memset (outbuf, '\0', EVENT_OUTPUT_BUFLEN+1); if ((outbuf_len = ipmi_sel_parse_read_record_string (state_data->sel_ctx, "%i", NULL, 0, outbuf, EVENT_OUTPUT_BUFLEN, 0)) < 0) { if (ipmi_sel_ctx_errnum (state_data->sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) goto out; goto cleanup; } if (outbuf_len > state_data->column_width.record_id) state_data->column_width.record_id = outbuf_len; out: rv = 0; cleanup: return (rv); } static int _sel_record_id_first_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmi_sel_state_data_t *state_data; int rv = -1; assert (ctx); assert (callback_data); state_data = (ipmi_sel_state_data_t *)callback_data; if (ipmi_sel_parse_read_record_id (ctx, NULL, 0, &state_data->first_record_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse_read_record_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } static int _sel_record_id_last_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmi_sel_state_data_t *state_data; int rv = -1; assert (ctx); assert (callback_data); state_data = (ipmi_sel_state_data_t *)callback_data; if (ipmi_sel_parse_read_record_id (ctx, NULL, 0, &state_data->last_record_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse_read_record_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } rv = 0; cleanup: return (rv); } static int _display_sel_records (ipmi_sel_state_data_t *state_data) { struct ipmi_sel_arguments *args; fiid_obj_t obj_cmd_rs = NULL; int rv = -1; uint64_t val; assert (state_data); args = state_data->prog_data->args; if (!args->legacy_output) { if (ipmi_sel_ctx_set_separator (state_data->sel_ctx, EVENT_OUTPUT_SEPARATOR) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } if (args->post_clear) { if (ipmi_sel_ctx_register_reservation_id (state_data->sel_ctx, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_ctx_register_reservation_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } if (!args->legacy_output) { if (!args->common_args.ignore_sdr_cache) { if (calculate_column_widths (state_data->pstate, state_data->sdr_ctx, NULL, 0, NULL, 0, state_data->prog_data->args->non_abbreviated_units, (args->entity_sensor_names) ? 1 : 0, /* shared_sensors */ 1, /* count_event_only_records */ 0, /* count_device_locator_records */ 0, /* count_oem_records */ args->entity_sensor_names, &(state_data->column_width)) < 0) goto cleanup; /* Unlike sensors output, SEL entries are not predictable, * events can happen w/ sensor numbers and sensor types that are * not listed in the SDR. So I can't perfectly predict the * largest column size (w/o going through the SEL atleast once). * * Ultimately, there is some balance that must be done to: * * A) make sure the output looks good * * B) not have a ridiculously sized sensor type column that * makes the output look bad. * * The following is the fudging I have elected to do */ /* Fudging #1 - "System Firmware Progress" is a relatively * common sensor event that isn't mentioned in the SDR. * * However, it's a pretty big string and can lead to a big * column size. So I will only assume it can happen if there * are sensor types in the SDR that are atleast 2 chars less * than this string. * * I think this is a pretty good guess. "System Firmware * Progress" is a sensor that seems to exist more on the * major tier 1 vendor motherboards that also include * additional "fancy" sensors such as "Event Logging * Disabled" (2 shorter in string length) or "System ACPI * Power State" (1 shorter in string length). * * The non-tier 1 vendors tend not to include such fancy * sensors on their motherboards, limiting themselves to the * standard temp, voltage, fan, etc. so the probability of * hitting "System Firmware Progress" is lower. */ if (state_data->column_width.sensor_type >= (strlen (ipmi_sensor_types[IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS]) - 2)) { if (state_data->column_width.sensor_type < strlen (ipmi_sensor_types[IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS])) state_data->column_width.sensor_type = strlen (ipmi_sensor_types[IPMI_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS]); } } else { if (calculate_column_widths_ignored_sdr_cache (state_data->prog_data->args->non_abbreviated_units, &(state_data->column_width)) < 0) goto cleanup; } /* Record IDs for SEL entries are calculated a bit differently */ if (state_data->prog_data->args->display) { uint16_t max_record_id = 0; int i; for (i = 0; i < state_data->prog_data->args->display_record_list_length; i++) { if (state_data->prog_data->args->display_record_list[i] > max_record_id) max_record_id = state_data->prog_data->args->display_record_list[i]; } if (ipmi_sel_parse_record_ids (state_data->sel_ctx, &max_record_id, 1, _sel_record_id_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse_record_ids: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } else if (state_data->prog_data->args->display_range) { /* assume biggest record is is the last specified */ if (ipmi_sel_parse (state_data->sel_ctx, state_data->prog_data->args->display_range2, state_data->prog_data->args->display_range2, _sel_record_id_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } else { /* assume biggest record id is the last one */ if (ipmi_sel_parse (state_data->sel_ctx, IPMI_SEL_RECORD_ID_LAST, IPMI_SEL_RECORD_ID_LAST, _sel_record_id_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } } if (args->interpret_oem_data || args->output_oem_event_strings) { if (ipmi_get_oem_data (state_data->pstate, state_data->ipmi_ctx, &state_data->oem_data) < 0) goto cleanup; if (ipmi_sel_ctx_set_manufacturer_id (state_data->sel_ctx, state_data->oem_data.manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_ctx_set_manufacturer_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (ipmi_sel_ctx_set_product_id (state_data->sel_ctx, state_data->oem_data.product_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_ctx_set_product_id: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (ipmi_sel_ctx_set_ipmi_version (state_data->sel_ctx, state_data->oem_data.ipmi_version_major, state_data->oem_data.ipmi_version_minor) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_ctx_set_ipmi_version: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (args->output_event_state) { if (ipmi_interpret_ctx_set_manufacturer_id (state_data->interpret_ctx, state_data->oem_data.manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_interpret_ctx_set_manufacturer_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } if (ipmi_interpret_ctx_set_product_id (state_data->interpret_ctx, state_data->oem_data.product_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_interpret_ctx_set_product_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } } } if (state_data->prog_data->args->display) { if (ipmi_sel_parse_record_ids (state_data->sel_ctx, state_data->prog_data->args->display_record_list, state_data->prog_data->args->display_record_list_length, _sel_parse_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse_record_ids: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } else if (state_data->prog_data->args->display_range) { if (ipmi_sel_parse (state_data->sel_ctx, state_data->prog_data->args->display_range1, state_data->prog_data->args->display_range2, _sel_parse_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } else if (state_data->prog_data->args->tail) { uint16_t entries; uint16_t range_begin; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_info (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sel_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "entries", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'entries': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } entries = val; /* Special case, display all records */ if (entries <= state_data->prog_data->args->tail_count) { if (ipmi_sel_parse (state_data->sel_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _sel_parse_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } goto out; } if (ipmi_sel_parse (state_data->sel_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_FIRST, _sel_record_id_first_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } if (ipmi_sel_parse (state_data->sel_ctx, IPMI_SEL_RECORD_ID_LAST, IPMI_SEL_RECORD_ID_LAST, _sel_record_id_last_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } /* Assume entries distributed evenly throughout SEL */ if ((state_data->last_record_id - state_data->first_record_id + 1) < entries) { /* Assume SEL record IDs separated by 1 */ if ((state_data->prog_data->args->tail_count + 1) >= state_data->last_record_id) range_begin = IPMI_SEL_RECORD_ID_FIRST; else range_begin = state_data->last_record_id - state_data->prog_data->args->tail_count + 1; } else { uint16_t spacing; spacing = (state_data->last_record_id - state_data->first_record_id + 1) / entries; if ((state_data->prog_data->args->tail_count * spacing + 1) >= state_data->last_record_id) range_begin = IPMI_SEL_RECORD_ID_FIRST; else range_begin = state_data->last_record_id - (state_data->prog_data->args->tail_count * spacing) + 1; } if (ipmi_sel_parse (state_data->sel_ctx, range_begin, IPMI_SEL_RECORD_ID_LAST, _sel_parse_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } fiid_obj_destroy (obj_cmd_rs); obj_cmd_rs = NULL; } else { if (ipmi_sel_parse (state_data->sel_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _sel_parse_callback, state_data) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_parse: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } if (args->post_clear) { if (ipmi_sel_clear_sel (state_data->sel_ctx) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sel_clear_sel: %s\n", ipmi_sel_ctx_errormsg (state_data->sel_ctx)); goto cleanup; } } out: rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int run_cmd_args (ipmi_sel_state_data_t *state_data) { struct ipmi_sel_arguments *args; assert (state_data); args = state_data->prog_data->args; assert (!args->common_args.flush_cache); if (args->info) return (_display_sel_info (state_data)); if (args->clear) return (_clear_entries (state_data)); if (args->delete) return (_delete_records (state_data)); if (args->delete_range) return (_delete_range (state_data)); /* else default to displaying records */ if (_display_sel_records (state_data) < 0) return (-1); return (0); } static int _ipmi_sel (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_sel_state_data_t state_data; ipmi_sel_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; unsigned int sel_flags = 0; assert (pstate); assert (arg); prog_data = (ipmi_sel_prog_data_t *)arg; assert (!prog_data->args->list_sensor_types); if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_sel_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; state_data.hostname = (char *)hostname; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; /* need to create/open cache before creating sel_ctx */ if (!prog_data->args->info && !prog_data->args->list_sensor_types && !prog_data->args->clear && !prog_data->args->delete && !prog_data->args->delete_range && !prog_data->args->common_args.ignore_sdr_cache) { if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (sdr_cache_create_and_load (state_data.sdr_ctx, state_data.pstate, state_data.ipmi_ctx, state_data.hostname, &state_data.prog_data->args->common_args) < 0) goto cleanup; } else state_data.sdr_ctx = NULL; if (!(state_data.sel_ctx = ipmi_sel_ctx_create (state_data.ipmi_ctx, state_data.sdr_ctx))) { pstdout_perror (pstate, "ipmi_sel_ctx_create()"); goto cleanup; } if (state_data.prog_data->args->common_args.debug) sel_flags |= IPMI_SEL_FLAGS_DEBUG_DUMP; if (state_data.prog_data->args->assume_system_event_records) sel_flags |= IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS; if (sel_flags) { /* Don't error out, if this fails we can still continue */ if (ipmi_sel_ctx_set_flags (state_data.sel_ctx, sel_flags) < 0) pstdout_fprintf (pstate, stderr, "ipmi_sel_ctx_set_flags: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); } if (state_data.prog_data->args->common_args.debug && hostname) { if (ipmi_sel_ctx_set_debug_prefix (state_data.sel_ctx, hostname) < 0) pstdout_fprintf (pstate, stderr, "ipmi_sel_ctx_set_debug_prefix: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); } if (prog_data->args->output_event_state) { unsigned int interpret_flags = 0; if (!(state_data.interpret_ctx = ipmi_interpret_ctx_create ())) { pstdout_perror (pstate, "ipmi_interpret_ctx_create()"); goto cleanup; } if (event_load_event_state_config_file (pstate, state_data.interpret_ctx, prog_data->args->event_state_config_file) < 0) goto cleanup; if (prog_data->args->assume_system_event_records) interpret_flags |= IPMI_INTERPRET_FLAGS_SEL_ASSUME_SYSTEM_EVENT_RECORDS; if (prog_data->args->interpret_oem_data) interpret_flags |= IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA; if (interpret_flags) { if (ipmi_interpret_ctx_set_flags (state_data.interpret_ctx, interpret_flags) < 0) { pstdout_fprintf (pstate, stderr, "ipmi_interpret_ctx_set_flags: %s\n", ipmi_interpret_ctx_errormsg (state_data.interpret_ctx)); goto cleanup; } } if (ipmi_sel_ctx_set_parameter (state_data.sel_ctx, IPMI_SEL_PARAMETER_INTERPRET_CONTEXT, &(state_data.interpret_ctx)) < 0) { pstdout_fprintf (pstate, stderr, "ipmi_sel_ctx_set_parameter: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); goto cleanup; } } if (prog_data->args->common_args.utc_offset) { if (ipmi_sel_ctx_set_parameter (state_data.sel_ctx, IPMI_SEL_PARAMETER_UTC_OFFSET, &(prog_data->args->common_args.utc_offset)) < 0) { pstdout_fprintf (pstate, stderr, "ipmi_sel_ctx_set_parameter: %s\n", ipmi_sel_ctx_errormsg (state_data.sel_ctx)); goto cleanup; } } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_sel_ctx_destroy (state_data.sel_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_sel_prog_data_t prog_data; struct ipmi_sel_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_sel_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; /* Special case, just output list, don't do anything else */ if (prog_data.args->list_sensor_types) { if (list_sensor_types () < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } /* Special case, if user specified workaround via flags instead of option */ if (prog_data.args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT) prog_data.args->assume_system_event_records = 1; if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_sel, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-sel/ipmi-sel_.h0000644002055400205540000001050313527331635017027 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* file is named ipmi-sel_.h to differentiate itself from the * library ipmi-sel.h. * * I am scared of the portability of the #include_next directive, so * that's why I'm doing it this way. */ /* file is "ipmi-sel_.h", so double underscore */ #ifndef IPMI_SEL__H #define IPMI_SEL__H #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "tool-sensor-common.h" #include "pstdout.h" #define IPMI_SEL_MAX_RECORD 4096 enum ipmi_sel_argp_option_keys { VERBOSE_KEY = 'v', INFO_KEY = 'i', DISPLAY_KEY = 160, EXCLUDE_DISPLAY_KEY = 161, DISPLAY_RANGE_KEY = 162, EXCLUDE_DISPLAY_RANGE_KEY = 163, DATE_RANGE_KEY = 164, EXCLUDE_DATE_RANGE_KEY = 165, SENSOR_TYPES_KEY = 't', EXCLUDE_SENSOR_TYPES_KEY = 'T', LIST_SENSOR_TYPES_KEY = 'L', TAIL_KEY = 166, CLEAR_KEY = 167, POST_CLEAR_KEY = 168, DELETE_ALL_KEY = 169, /* legacy */ DELETE_KEY = 170, DELETE_RANGE_KEY = 171, SYSTEM_EVENT_ONLY_KEY = 172, OEM_EVENT_ONLY_KEY = 173, OUTPUT_MANUFACTURER_ID_KEY = 174, OUTPUT_EVENT_STATE_KEY = 175, EVENT_STATE_CONFIG_FILE_KEY = 176, HEX_DUMP_KEY = 177, ASSUME_SYSTEM_EVENT_RECORDS_KEY = 178, /* legacy */ INTERPRET_OEM_DATA_KEY = 179, OUTPUT_OEM_EVENT_STRINGS_KEY = 180, ENTITY_SENSOR_NAMES_KEY = 181, NO_SENSOR_TYPE_OUTPUT_KEY = 182, COMMA_SEPARATED_OUTPUT_KEY = 183, NO_HEADER_OUTPUT_KEY = 184, NON_ABBREVIATED_UNITS_KEY = 185, LEGACY_OUTPUT_KEY = 186, }; struct ipmi_sel_arguments { struct common_cmd_args common_args; unsigned int verbose_count; int info; int display; uint16_t display_record_list[IPMI_SEL_MAX_RECORD]; unsigned int display_record_list_length; int exclude_display; uint16_t exclude_display_record_list[IPMI_SEL_MAX_RECORD]; unsigned int exclude_display_record_list_length; int display_range; uint16_t display_range1; uint16_t display_range2; int exclude_display_range; uint16_t exclude_display_range1; uint16_t exclude_display_range2; int date_range; uint32_t date_range1; uint32_t date_range2; int exclude_date_range; uint32_t exclude_date_range1; uint32_t exclude_date_range2; char sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; char exclude_sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int list_sensor_types; int tail; uint16_t tail_count; int clear; int post_clear; int delete; uint16_t delete_record_list[IPMI_SEL_MAX_RECORD]; unsigned int delete_record_list_length; int delete_range; uint16_t delete_range1; uint16_t delete_range2; int system_event_only; int oem_event_only; int output_manufacturer_id; int output_event_state; char *event_state_config_file; int hex_dump; int assume_system_event_records; /* legacy */ int interpret_oem_data; int output_oem_event_strings; int entity_sensor_names; int no_sensor_type_output; int comma_separated_output; int no_header_output; int non_abbreviated_units; int legacy_output; }; typedef struct ipmi_sel_prog_data { char *progname; struct ipmi_sel_arguments *args; } ipmi_sel_prog_data_t; typedef struct ipmi_sel_state_data { ipmi_sel_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; char *hostname; ipmi_sdr_ctx_t sdr_ctx; ipmi_sel_ctx_t sel_ctx; ipmi_interpret_ctx_t interpret_ctx; int output_headers; struct sensor_column_width column_width; struct ipmi_oem_data oem_data; /* for tail usage */ uint16_t first_record_id; uint16_t last_record_id; } ipmi_sel_state_data_t; #endif /* IPMI_SEL__H */ freeipmi-1.6.4/ipmi-sel/ipmi-sel-argp.c0000644002055400205540000006415113527331635017622 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmi-sel_.h" #include "ipmi-sel-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmi-sel - " PACKAGE_VERSION "\n" "Copyright (C) 2003-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-sel - display SEL entries"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_IGNORE, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output.", 40}, { "info", INFO_KEY, 0, 0, "Show general information about the SEL.", 41}, { "display", DISPLAY_KEY, "RECORD-IDS-LIST", 0, "Display SEL records by record ids.", 42}, { "exclude-display", EXCLUDE_DISPLAY_KEY, "RECORD-IDS-LIST", 0, "Exclude display of SEL records by record ids.", 43}, { "display-range", DISPLAY_RANGE_KEY, "START-END", 0, "Display SEL records from record id START to END.", 44}, { "exclude-display-range", EXCLUDE_DISPLAY_RANGE_KEY, "START-END", 0, "Exclude display of SEL records from record id START to END.", 45}, { "date-range", DATE_RANGE_KEY, "MM/DD/YYYY-MM/DD/YYYY", 0, "Display SEL records in the specified date range.", 46}, { "exclude-date-range", EXCLUDE_DATE_RANGE_KEY, "MM/DD/YYYY-MM/DD/YYYY", 0, "Exclude display of SEL records in the specified date range.", 47}, { "sensor-types", SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Show sensors of a specific type.", 46}, { "exclude-sensor-types", EXCLUDE_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Do not show sensors of a specific type.", 47}, { "list-sensor-types", LIST_SENSOR_TYPES_KEY, 0, 0, "List sensor types.", 48}, { "tail", TAIL_KEY, "COUNT", 0, "Display approximately the last count SEL records.", 49}, { "clear", CLEAR_KEY, 0, 0, "Clear SEL.", 50}, { "post-clear", POST_CLEAR_KEY, 0, 0, "Clear SEL after displaying SEL records.", 51}, /* legacy */ { "delete-all", DELETE_ALL_KEY, 0, OPTION_HIDDEN, "Delete all SEL records.", 52}, { "delete", DELETE_KEY, "RECORD-IDS-LIST", 0, "Delete SEL records by record ids.", 53}, { "delete-range", DELETE_RANGE_KEY, "START-END", 0, "Delete record ids from START to END in the SEL.", 54}, { "system-event-only", SYSTEM_EVENT_ONLY_KEY, 0, 0, "Output only system event records (i.e. don't output OEM records).", 55}, { "oem-event-only", OEM_EVENT_ONLY_KEY, 0, 0, "Output only OEM event records.", 56}, { "output-manufacturer-id", OUTPUT_MANUFACTURER_ID_KEY, 0, 0, "Output manufacturer ID on OEM event records when available.", 57}, { "output-event-state", OUTPUT_EVENT_STATE_KEY, 0, 0, "Output event state in output.", 58}, { "event-state-config-file", EVENT_STATE_CONFIG_FILE_KEY, "FILE", 0, "Specify an alternate event state configuration file.", 59}, { "hex-dump", HEX_DUMP_KEY, 0, 0, "Hex-dump SEL records.", 60}, /* legacy */ { "assume-system-event-records", ASSUME_SYSTEM_EVENT_RECORDS_KEY, 0, OPTION_HIDDEN, "Assume invalid record types are system event records.", 61}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 62}, { "output-oem-event-strings", OUTPUT_OEM_EVENT_STRINGS_KEY, NULL, 0, "Attempt to output OEM event strings.", 63}, { "entity-sensor-names", ENTITY_SENSOR_NAMES_KEY, NULL, 0, "Output sensor names with entity ids and instances.", 64}, { "no-sensor-type-output", NO_SENSOR_TYPE_OUTPUT_KEY, 0, 0, "Do not show sensor type output.", 65}, { "comma-separated-output", COMMA_SEPARATED_OUTPUT_KEY, 0, 0, "Output fields in comma separated format.", 66}, { "no-header-output", NO_HEADER_OUTPUT_KEY, 0, 0, "Do not output column headers.", 67}, { "non-abbreviated-units", NON_ABBREVIATED_UNITS_KEY, 0, 0, "Output non-abbreviated units (e.g. 'Amps' instead of 'A').", 68}, { "legacy-output", LEGACY_OUTPUT_KEY, 0, 0, "Output in legacy format.", 69}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static void _read_record_list (int *flag, uint16_t *record_list, unsigned int *record_list_length, char *arg) { char *endptr; char *tok; int value; assert (flag); assert (record_list); assert (record_list_length); assert (arg); (*flag) = 1; tok = strtok (arg, " ,"); while (tok && (*record_list_length) < IPMI_SEL_MAX_RECORD) { errno = 0; value = strtol (tok, &endptr, 10); if (errno || endptr[0] != '\0' || value < 0 || value <= IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY || value >= IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { fprintf (stderr, "invalid record number: %d\n", value); exit (EXIT_FAILURE); } record_list[(*record_list_length)] = value; (*record_list_length)++; tok = strtok (NULL, " ,"); } } static void _read_record_id_range (int *flag, uint16_t *range1, uint16_t *range2, char *arg) { char *endptr; char *range_str = NULL; char *start_ptr = NULL; char *range1_str = NULL; char *range2_str = NULL; int value = 0; assert (flag); assert (range1); assert (range2); assert (arg); (*flag) = 1; if (!(range_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } if (!(start_ptr = strchr (range_str, '-'))) { /* invalid input */ fprintf (stderr, "invalid range input\n"); exit (EXIT_FAILURE); } if (!(range2_str = strdup (start_ptr + 1))) { perror ("strdup"); exit (EXIT_FAILURE); } *start_ptr = '\0'; range1_str = range_str; errno = 0; value = strtol (range1_str, &endptr, 10); if (errno || endptr[0] != '\0' || value < 0 || value <= IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY || value >= IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { fprintf (stderr, "invalid range record number: %d\n", value); exit (EXIT_FAILURE); } (*range1) = value; errno = 0; value = strtol (range2_str, &endptr, 10); if (errno || endptr[0] != '\0' || value < 0 || value <= IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY || value >= IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { fprintf (stderr, "invalid range record number: %d\n", value); exit (EXIT_FAILURE); } (*range2) = value; if ((*range2) < (*range1)) { fprintf (stderr, "invalid END range\n"); exit (EXIT_FAILURE); } free (range1_str); free (range2_str); } static void _read_date_range (int *flag, uint32_t *range1, uint32_t *range2, char *arg) { char *range_str = NULL; char *split_ptr = NULL; char *range1_str = NULL; char *range2_str = NULL; char *ptr = NULL; unsigned int dash_count = 0; time_t t; struct tm tm; assert (flag); assert (range1); assert (range2); assert (arg); (*flag) = 1; if (!(range_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } /* Count number of dashes, to see what format user input */ ptr = range_str; do { ptr = strchr (ptr, '-'); if (ptr) { ptr++; dash_count++; } } while (ptr); if (dash_count == 1) split_ptr = strchr (range_str, '-'); else if (dash_count == 3) { /* one date input w/ dashes, one with slashes */ char *ptr1, *ptr2; ptr1 = strchr (range_str, '/'); ptr2 = strchr (range_str, '-'); /* determine if MM/DD/YYYY is first or second date listed */ if (ptr1 < ptr2) split_ptr = strchr (range_str, '-'); else { ptr = range_str; ptr = strchr (ptr, '-'); ptr++; ptr = strchr (ptr, '-'); ptr++; split_ptr = strchr (ptr, '-'); } } else if (dash_count == 5) { /* find the middle dash */ ptr = range_str; ptr = strchr (ptr, '-'); ptr++; ptr = strchr (ptr, '-'); ptr++; split_ptr = strchr (ptr, '-'); } else { fprintf (stderr, "invalid range input\n"); exit (EXIT_FAILURE); } if (*(split_ptr + 1) == '\0') { fprintf (stderr, "invalid range input\n"); exit (EXIT_FAILURE); } if (!(range2_str = strdup (split_ptr + 1))) { perror ("strdup"); exit (EXIT_FAILURE); } *split_ptr = '\0'; range1_str = range_str; /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof (struct tm)); if (!strcasecmp (range1_str, "now")) t = time (NULL); else { if (!strptime (range1_str, "%m/%d/%Y", &tm)) { if (!strptime (range1_str, "%b/%d/%Y", &tm)) { if (!strptime (range1_str, "%m-%d-%Y", &tm)) { if (!strptime (range1_str, "%b-%d-%Y", &tm)) { fprintf (stderr, "Invalid time specification '%s'.\n", range1_str); exit (EXIT_FAILURE); } } } } /* strptime() does not set tm_isdst. Set so mktime() will not * adjust for daylight savings time. */ tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { fprintf (stderr, "Time specification '%s' cannot be represented.\n", range1_str); exit (EXIT_FAILURE); } } (*range1) = (uint32_t)t; /* Posix says individual calls need not clear/set all portions of * 'struct tm', thus passing 'struct tm' between functions could * have issues. So we need to memset. */ memset (&tm, '\0', sizeof (struct tm)); if (!strcasecmp (range2_str, "now")) t = time (NULL); else { if (!strptime (range2_str, "%m/%d/%Y", &tm)) { if (!strptime (range2_str, "%b/%d/%Y", &tm)) { if (!strptime (range2_str, "%m-%d-%Y", &tm)) { if (!strptime (range2_str, "%b-%d-%Y", &tm)) { fprintf (stderr, "Invalid time specification '%s'.\n", range2_str); exit (EXIT_FAILURE); } } } } /* strptime() does not set tm_isdst. Set so mktime() will not * adjust for daylight savings time. */ tm.tm_isdst = -1; if ((t = mktime (&tm)) == (time_t)-1) { fprintf (stderr, "Time specification '%s' cannot be represented.\n", range2_str); exit (EXIT_FAILURE); } } (*range2) = (uint32_t)t; if ((*range2) < (*range1)) { fprintf (stderr, "invalid range\n"); exit (EXIT_FAILURE); } /* Date range input means beginning of range1 date to end of range2 date * so we might need to add seconds to the end of the range2 date. */ if (strcasecmp (range2_str, "now")) (*range2) = (*range2) + (24 * 60 * 60); free (range1_str); free (range2_str); } static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_sel_arguments *cmd_args; char *endptr; int value; assert (state); cmd_args = state->input; switch (key) { case VERBOSE_KEY: cmd_args->verbose_count++; break; case INFO_KEY: cmd_args->info = 1; break; case DISPLAY_KEY: _read_record_list (&(cmd_args->display), cmd_args->display_record_list, &(cmd_args->display_record_list_length), arg); break; case EXCLUDE_DISPLAY_KEY: _read_record_list (&(cmd_args->exclude_display), cmd_args->exclude_display_record_list, &(cmd_args->exclude_display_record_list_length), arg); break; case DISPLAY_RANGE_KEY: _read_record_id_range (&(cmd_args->display_range), &(cmd_args->display_range1), &(cmd_args->display_range2), arg); break; case EXCLUDE_DISPLAY_RANGE_KEY: _read_record_id_range (&(cmd_args->exclude_display_range), &(cmd_args->exclude_display_range1), &(cmd_args->exclude_display_range2), arg); break; case DATE_RANGE_KEY: _read_date_range (&(cmd_args->date_range), &(cmd_args->date_range1), &(cmd_args->date_range2), arg); break; case EXCLUDE_DATE_RANGE_KEY: _read_date_range (&(cmd_args->exclude_date_range), &(cmd_args->exclude_date_range1), &(cmd_args->exclude_date_range2), arg); break; case SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_ALL_STRING, cmd_args->sensor_types, &(cmd_args->sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case EXCLUDE_SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_NONE_STRING, cmd_args->exclude_sensor_types, &(cmd_args->exclude_sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case LIST_SENSOR_TYPES_KEY: cmd_args->list_sensor_types = 1; break; case TAIL_KEY: errno = 0; value = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || value <= 0 || value <= IPMI_SEL_GET_RECORD_ID_FIRST_ENTRY || value >= IPMI_SEL_GET_RECORD_ID_LAST_ENTRY) { fprintf (stderr, "invalid record count: %d\n", value); exit (EXIT_FAILURE); } cmd_args->tail = 1; cmd_args->tail_count = value; break; case CLEAR_KEY: case DELETE_ALL_KEY: /* legacy */ cmd_args->clear = 1; break; case POST_CLEAR_KEY: cmd_args->post_clear = 1; break; case DELETE_KEY: _read_record_list (&(cmd_args->delete), cmd_args->delete_record_list, &(cmd_args->delete_record_list_length), arg); break; case DELETE_RANGE_KEY: _read_record_id_range (&(cmd_args->delete_range), &(cmd_args->delete_range1), &(cmd_args->delete_range2), arg); break; case SYSTEM_EVENT_ONLY_KEY: cmd_args->system_event_only = 1; break; case OEM_EVENT_ONLY_KEY: cmd_args->oem_event_only = 1; break; case OUTPUT_MANUFACTURER_ID_KEY: cmd_args->output_manufacturer_id = 1; break; case OUTPUT_EVENT_STATE_KEY: cmd_args->output_event_state = 1; break; case EVENT_STATE_CONFIG_FILE_KEY: if (!(cmd_args->event_state_config_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case HEX_DUMP_KEY: cmd_args->hex_dump = 1; break; /* legacy */ case ASSUME_SYSTEM_EVENT_RECORDS_KEY: cmd_args->assume_system_event_records = 1; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case OUTPUT_OEM_EVENT_STRINGS_KEY: cmd_args->output_oem_event_strings = 1; break; case ENTITY_SENSOR_NAMES_KEY: cmd_args->entity_sensor_names = 1; break; case NO_SENSOR_TYPE_OUTPUT_KEY: cmd_args->no_sensor_type_output = 1; break; case COMMA_SEPARATED_OUTPUT_KEY: cmd_args->comma_separated_output = 1; break; case NO_HEADER_OUTPUT_KEY: cmd_args->no_header_output = 1; break; case NON_ABBREVIATED_UNITS_KEY: cmd_args->non_abbreviated_units = 1; break; case LEGACY_OUTPUT_KEY: cmd_args->legacy_output = 1; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_sel_config_file_parse (struct ipmi_sel_arguments *cmd_args) { struct config_file_data_ipmi_sel config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_sel)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_SEL, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; if (config_file_data.sensor_types_count && config_file_data.sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.sensor_types_length; i++) strncpy (cmd_args->sensor_types[i], config_file_data.sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->sensor_types_length = config_file_data.sensor_types_length; } if (config_file_data.exclude_sensor_types_count && config_file_data.exclude_sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.exclude_sensor_types_length; i++) strncpy (cmd_args->exclude_sensor_types[i], config_file_data.exclude_sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->exclude_sensor_types_length = config_file_data.exclude_sensor_types_length; } if (config_file_data.system_event_only_count) cmd_args->system_event_only = config_file_data.system_event_only; if (config_file_data.oem_event_only_count) cmd_args->oem_event_only = config_file_data.oem_event_only; if (config_file_data.output_manufacturer_id_count) cmd_args->output_manufacturer_id = config_file_data.output_manufacturer_id; if (config_file_data.output_event_state_count) cmd_args->output_event_state = config_file_data.output_event_state; if (config_file_data.event_state_config_file_count) cmd_args->event_state_config_file = config_file_data.event_state_config_file; /* legacy */ if (config_file_data.assume_system_event_records_count) cmd_args->assume_system_event_records = config_file_data.assume_system_event_records; if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; if (config_file_data.output_oem_event_strings_count) cmd_args->output_oem_event_strings = config_file_data.output_oem_event_strings; if (config_file_data.entity_sensor_names_count) cmd_args->entity_sensor_names = config_file_data.entity_sensor_names; if (config_file_data.no_sensor_type_output_count) cmd_args->no_sensor_type_output = config_file_data.no_sensor_type_output; if (config_file_data.comma_separated_output_count) cmd_args->comma_separated_output = config_file_data.comma_separated_output; if (config_file_data.no_header_output_count) cmd_args->no_header_output = config_file_data.no_header_output; if (config_file_data.non_abbreviated_units_count) cmd_args->non_abbreviated_units = config_file_data.non_abbreviated_units; if (config_file_data.legacy_output_count) cmd_args->legacy_output = config_file_data.legacy_output; } static void _ipmi_sel_args_validate (struct ipmi_sel_arguments *cmd_args) { assert (cmd_args); if (cmd_args->sensor_types_length) { if (valid_sensor_types (cmd_args->sensor_types, cmd_args->sensor_types_length) < 0) exit (EXIT_FAILURE); } if (cmd_args->exclude_sensor_types_length) { if (valid_sensor_types (cmd_args->exclude_sensor_types, cmd_args->exclude_sensor_types_length) < 0) exit (EXIT_FAILURE); } } void ipmi_sel_argp_parse (int argc, char **argv, struct ipmi_sel_arguments *cmd_args) { unsigned int i; assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_operator (&(cmd_args->common_args)); cmd_args->verbose_count = 0; cmd_args->info = 0; cmd_args->display = 0; memset (cmd_args->display_record_list, '\0', sizeof (uint16_t) * IPMI_SEL_MAX_RECORD); cmd_args->display_record_list_length = 0; cmd_args->exclude_display = 0; memset (cmd_args->exclude_display_record_list, '\0', sizeof (uint16_t) * IPMI_SEL_MAX_RECORD); cmd_args->exclude_display_record_list_length = 0; cmd_args->display_range = 0; cmd_args->display_range1 = 0; cmd_args->display_range2 = 0; cmd_args->exclude_display_range = 0; cmd_args->exclude_display_range1 = 0; cmd_args->exclude_display_range2 = 0; cmd_args->date_range = 0; cmd_args->date_range1 = 0; cmd_args->date_range2 = 0; cmd_args->exclude_date_range = 0; cmd_args->exclude_date_range1 = 0; cmd_args->exclude_date_range2 = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->sensor_types_length = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->exclude_sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->exclude_sensor_types_length = 0; cmd_args->list_sensor_types = 0; cmd_args->tail = 0; cmd_args->tail_count = 0; cmd_args->clear = 0; cmd_args->post_clear = 0; cmd_args->delete = 0; memset (cmd_args->delete_record_list, '\0', sizeof (uint16_t) * IPMI_SEL_MAX_RECORD); cmd_args->delete_record_list_length = 0; cmd_args->delete_range = 0; cmd_args->delete_range1 = 0; cmd_args->delete_range2 = 0; cmd_args->system_event_only = 0; cmd_args->oem_event_only = 0; cmd_args->output_manufacturer_id = 0; cmd_args->output_event_state = 0; cmd_args->event_state_config_file = NULL; cmd_args->hex_dump = 0; /* legacy */ cmd_args->assume_system_event_records = 0; cmd_args->interpret_oem_data = 0; cmd_args->output_oem_event_strings = 0; cmd_args->entity_sensor_names = 0; cmd_args->no_sensor_type_output = 0; cmd_args->comma_separated_output = 0; cmd_args->no_header_output = 0; cmd_args->non_abbreviated_units = 0; cmd_args->legacy_output = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_sel_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_sel_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-sel/ipmi-sel-argp.h0000644002055400205540000000160013527331635017615 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SEL_ARGP_H #define IPMI_SEL_ARGP_H #include "ipmi-sel_.h" void ipmi_sel_argp_parse (int argc, char **argv, struct ipmi_sel_arguments *cmd_args); #endif /* IPMI_SEL_ARGP_H */ freeipmi-1.6.4/ipmi-sensors/0000755002055400205540000000000013527342550015710 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-sensors/Makefile.in0000644002055400205540000022364713527342445017776 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-sensors$(EXEEXT) subdir = ipmi-sensors DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_sensors_OBJECTS = ipmi_sensors-ipmi-sensors.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-argp.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-detailed-output.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel-node-manager.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-inventec.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-inventec-5441.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-inventec-5442.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-quanta.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-quanta-s99q.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-wistron.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-oem-wistron-c6220.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-output-common.$(OBJEXT) \ ipmi_sensors-ipmi-sensors-simple-output.$(OBJEXT) ipmi_sensors_OBJECTS = $(am_ipmi_sensors_OBJECTS) ipmi_sensors_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } SCRIPTS = $(sbin_SCRIPTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_sensors_SOURCES) DIST_SOURCES = $(ipmi_sensors_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ sbin_SCRIPTS = ipmimonitoring ipmi_sensors_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_sensors_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_sensors_SOURCES = \ ipmi-sensors.c \ ipmi-sensors.h \ ipmi-sensors-argp.c \ ipmi-sensors-argp.h \ ipmi-sensors-detailed-output.c \ ipmi-sensors-detailed-output.h \ ipmi-sensors-oem-intel.c \ ipmi-sensors-oem-intel.h \ ipmi-sensors-oem-intel-node-manager.c \ ipmi-sensors-oem-intel-node-manager.h \ ipmi-sensors-oem-intel-s5500wb.c \ ipmi-sensors-oem-intel-s5500wb.h \ ipmi-sensors-oem-intel-s2600jf.c \ ipmi-sensors-oem-intel-s2600jf.h \ ipmi-sensors-oem-intel-s2600wp.c \ ipmi-sensors-oem-intel-s2600wp.h \ ipmi-sensors-oem-intel-quanta-qssc-s4r.c \ ipmi-sensors-oem-intel-quanta-qssc-s4r.h \ ipmi-sensors-oem-inventec.c \ ipmi-sensors-oem-inventec.h \ ipmi-sensors-oem-inventec-5441.c \ ipmi-sensors-oem-inventec-5441.h \ ipmi-sensors-oem-inventec-5442.c \ ipmi-sensors-oem-inventec-5442.h \ ipmi-sensors-oem-quanta.c \ ipmi-sensors-oem-quanta.h \ ipmi-sensors-oem-quanta-s99q.c \ ipmi-sensors-oem-quanta-s99q.h \ ipmi-sensors-oem-wistron.c \ ipmi-sensors-oem-wistron.h \ ipmi-sensors-oem-wistron-c6220.c \ ipmi-sensors-oem-wistron-c6220.h \ ipmi-sensors-output-common.c \ ipmi-sensors-output-common.h \ ipmi-sensors-simple-output.c \ ipmi-sensors-simple-output.h CLEANFILES = ipmimonitoring EXTRA_DIST = ipmimonitoring.in all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-sensors/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-sensors/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-sensors$(EXEEXT): $(ipmi_sensors_OBJECTS) $(ipmi_sensors_DEPENDENCIES) $(EXTRA_ipmi_sensors_DEPENDENCIES) @rm -f ipmi-sensors$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_sensors_OBJECTS) $(ipmi_sensors_LDADD) $(LIBS) install-sbinSCRIPTS: $(sbin_SCRIPTS) @$(NORMAL_INSTALL) @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ if test -f "$$d$$p"; then echo "$$d$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n' \ -e 'h;s|.*|.|' \ -e 'p;x;s,.*/,,;$(transform)' | sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1; } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) { files[d] = files[d] " " $$1; \ if (++n[d] == $(am__install_max)) { \ print "f", d, files[d]; n[d] = 0; files[d] = "" } } \ else { print "f", d "/" $$4, $$1 } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_SCRIPT) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_SCRIPT) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinSCRIPTS: @$(NORMAL_UNINSTALL) @list='$(sbin_SCRIPTS)'; test -n "$(sbindir)" || exit 0; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 's,.*/,,;$(transform)'`; \ dir='$(DESTDIR)$(sbindir)'; $(am__uninstall_files_from_dir) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_sensors-ipmi-sensors.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_sensors-ipmi-sensors.o: ipmi-sensors.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors.Tpo -c -o ipmi_sensors-ipmi-sensors.o `test -f 'ipmi-sensors.c' || echo '$(srcdir)/'`ipmi-sensors.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors.c' object='ipmi_sensors-ipmi-sensors.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors.o `test -f 'ipmi-sensors.c' || echo '$(srcdir)/'`ipmi-sensors.c ipmi_sensors-ipmi-sensors.obj: ipmi-sensors.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors.Tpo -c -o ipmi_sensors-ipmi-sensors.obj `if test -f 'ipmi-sensors.c'; then $(CYGPATH_W) 'ipmi-sensors.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors.c' object='ipmi_sensors-ipmi-sensors.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors.obj `if test -f 'ipmi-sensors.c'; then $(CYGPATH_W) 'ipmi-sensors.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors.c'; fi` ipmi_sensors-ipmi-sensors-argp.o: ipmi-sensors-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-argp.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Tpo -c -o ipmi_sensors-ipmi-sensors-argp.o `test -f 'ipmi-sensors-argp.c' || echo '$(srcdir)/'`ipmi-sensors-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-argp.c' object='ipmi_sensors-ipmi-sensors-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-argp.o `test -f 'ipmi-sensors-argp.c' || echo '$(srcdir)/'`ipmi-sensors-argp.c ipmi_sensors-ipmi-sensors-argp.obj: ipmi-sensors-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Tpo -c -o ipmi_sensors-ipmi-sensors-argp.obj `if test -f 'ipmi-sensors-argp.c'; then $(CYGPATH_W) 'ipmi-sensors-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-argp.c' object='ipmi_sensors-ipmi-sensors-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-argp.obj `if test -f 'ipmi-sensors-argp.c'; then $(CYGPATH_W) 'ipmi-sensors-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-argp.c'; fi` ipmi_sensors-ipmi-sensors-detailed-output.o: ipmi-sensors-detailed-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-detailed-output.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Tpo -c -o ipmi_sensors-ipmi-sensors-detailed-output.o `test -f 'ipmi-sensors-detailed-output.c' || echo '$(srcdir)/'`ipmi-sensors-detailed-output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-detailed-output.c' object='ipmi_sensors-ipmi-sensors-detailed-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-detailed-output.o `test -f 'ipmi-sensors-detailed-output.c' || echo '$(srcdir)/'`ipmi-sensors-detailed-output.c ipmi_sensors-ipmi-sensors-detailed-output.obj: ipmi-sensors-detailed-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-detailed-output.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Tpo -c -o ipmi_sensors-ipmi-sensors-detailed-output.obj `if test -f 'ipmi-sensors-detailed-output.c'; then $(CYGPATH_W) 'ipmi-sensors-detailed-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-detailed-output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-detailed-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-detailed-output.c' object='ipmi_sensors-ipmi-sensors-detailed-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-detailed-output.obj `if test -f 'ipmi-sensors-detailed-output.c'; then $(CYGPATH_W) 'ipmi-sensors-detailed-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-detailed-output.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel.o: ipmi-sensors-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel.o `test -f 'ipmi-sensors-oem-intel.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel.c' object='ipmi_sensors-ipmi-sensors-oem-intel.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel.o `test -f 'ipmi-sensors-oem-intel.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel.c ipmi_sensors-ipmi-sensors-oem-intel.obj: ipmi-sensors-oem-intel.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel.obj `if test -f 'ipmi-sensors-oem-intel.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel.c' object='ipmi_sensors-ipmi-sensors-oem-intel.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel.obj `if test -f 'ipmi-sensors-oem-intel.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel-node-manager.o: ipmi-sensors-oem-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-node-manager.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-node-manager.o `test -f 'ipmi-sensors-oem-intel-node-manager.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-node-manager.c' object='ipmi_sensors-ipmi-sensors-oem-intel-node-manager.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-node-manager.o `test -f 'ipmi-sensors-oem-intel-node-manager.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-node-manager.c ipmi_sensors-ipmi-sensors-oem-intel-node-manager.obj: ipmi-sensors-oem-intel-node-manager.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-node-manager.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-node-manager.obj `if test -f 'ipmi-sensors-oem-intel-node-manager.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-node-manager.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-node-manager.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-node-manager.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-node-manager.c' object='ipmi_sensors-ipmi-sensors-oem-intel-node-manager.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-node-manager.obj `if test -f 'ipmi-sensors-oem-intel-node-manager.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-node-manager.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-node-manager.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.o: ipmi-sensors-oem-intel-s5500wb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.o `test -f 'ipmi-sensors-oem-intel-s5500wb.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s5500wb.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s5500wb.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.o `test -f 'ipmi-sensors-oem-intel-s5500wb.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s5500wb.c ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.obj: ipmi-sensors-oem-intel-s5500wb.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.obj `if test -f 'ipmi-sensors-oem-intel-s5500wb.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s5500wb.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s5500wb.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s5500wb.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s5500wb.obj `if test -f 'ipmi-sensors-oem-intel-s5500wb.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s5500wb.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s5500wb.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.o: ipmi-sensors-oem-intel-s2600jf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.o `test -f 'ipmi-sensors-oem-intel-s2600jf.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s2600jf.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s2600jf.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.o `test -f 'ipmi-sensors-oem-intel-s2600jf.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s2600jf.c ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.obj: ipmi-sensors-oem-intel-s2600jf.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.obj `if test -f 'ipmi-sensors-oem-intel-s2600jf.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s2600jf.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s2600jf.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s2600jf.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600jf.obj `if test -f 'ipmi-sensors-oem-intel-s2600jf.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s2600jf.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s2600jf.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.o: ipmi-sensors-oem-intel-s2600wp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.o `test -f 'ipmi-sensors-oem-intel-s2600wp.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s2600wp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s2600wp.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.o `test -f 'ipmi-sensors-oem-intel-s2600wp.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-s2600wp.c ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.obj: ipmi-sensors-oem-intel-s2600wp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.obj `if test -f 'ipmi-sensors-oem-intel-s2600wp.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s2600wp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s2600wp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-s2600wp.c' object='ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-s2600wp.obj `if test -f 'ipmi-sensors-oem-intel-s2600wp.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-s2600wp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-s2600wp.c'; fi` ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.o: ipmi-sensors-oem-intel-quanta-qssc-s4r.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.o `test -f 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-quanta-qssc-s4r.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-quanta-qssc-s4r.c' object='ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.o `test -f 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c' || echo '$(srcdir)/'`ipmi-sensors-oem-intel-quanta-qssc-s4r.c ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.obj: ipmi-sensors-oem-intel-quanta-qssc-s4r.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.obj `if test -f 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-intel-quanta-qssc-s4r.c' object='ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-intel-quanta-qssc-s4r.obj `if test -f 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-intel-quanta-qssc-s4r.c'; fi` ipmi_sensors-ipmi-sensors-oem-inventec.o: ipmi-sensors-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec.o `test -f 'ipmi-sensors-oem-inventec.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec.c' object='ipmi_sensors-ipmi-sensors-oem-inventec.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec.o `test -f 'ipmi-sensors-oem-inventec.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec.c ipmi_sensors-ipmi-sensors-oem-inventec.obj: ipmi-sensors-oem-inventec.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec.obj `if test -f 'ipmi-sensors-oem-inventec.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec.c' object='ipmi_sensors-ipmi-sensors-oem-inventec.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec.obj `if test -f 'ipmi-sensors-oem-inventec.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec.c'; fi` ipmi_sensors-ipmi-sensors-oem-inventec-5441.o: ipmi-sensors-oem-inventec-5441.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec-5441.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5441.o `test -f 'ipmi-sensors-oem-inventec-5441.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec-5441.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec-5441.c' object='ipmi_sensors-ipmi-sensors-oem-inventec-5441.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5441.o `test -f 'ipmi-sensors-oem-inventec-5441.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec-5441.c ipmi_sensors-ipmi-sensors-oem-inventec-5441.obj: ipmi-sensors-oem-inventec-5441.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec-5441.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5441.obj `if test -f 'ipmi-sensors-oem-inventec-5441.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec-5441.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec-5441.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5441.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec-5441.c' object='ipmi_sensors-ipmi-sensors-oem-inventec-5441.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5441.obj `if test -f 'ipmi-sensors-oem-inventec-5441.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec-5441.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec-5441.c'; fi` ipmi_sensors-ipmi-sensors-oem-inventec-5442.o: ipmi-sensors-oem-inventec-5442.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec-5442.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5442.o `test -f 'ipmi-sensors-oem-inventec-5442.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec-5442.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec-5442.c' object='ipmi_sensors-ipmi-sensors-oem-inventec-5442.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5442.o `test -f 'ipmi-sensors-oem-inventec-5442.c' || echo '$(srcdir)/'`ipmi-sensors-oem-inventec-5442.c ipmi_sensors-ipmi-sensors-oem-inventec-5442.obj: ipmi-sensors-oem-inventec-5442.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-inventec-5442.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5442.obj `if test -f 'ipmi-sensors-oem-inventec-5442.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec-5442.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec-5442.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-inventec-5442.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-inventec-5442.c' object='ipmi_sensors-ipmi-sensors-oem-inventec-5442.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-inventec-5442.obj `if test -f 'ipmi-sensors-oem-inventec-5442.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-inventec-5442.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-inventec-5442.c'; fi` ipmi_sensors-ipmi-sensors-oem-quanta.o: ipmi-sensors-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-quanta.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-quanta.o `test -f 'ipmi-sensors-oem-quanta.c' || echo '$(srcdir)/'`ipmi-sensors-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-quanta.c' object='ipmi_sensors-ipmi-sensors-oem-quanta.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-quanta.o `test -f 'ipmi-sensors-oem-quanta.c' || echo '$(srcdir)/'`ipmi-sensors-oem-quanta.c ipmi_sensors-ipmi-sensors-oem-quanta.obj: ipmi-sensors-oem-quanta.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-quanta.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-quanta.obj `if test -f 'ipmi-sensors-oem-quanta.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-quanta.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-quanta.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-quanta.c' object='ipmi_sensors-ipmi-sensors-oem-quanta.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-quanta.obj `if test -f 'ipmi-sensors-oem-quanta.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-quanta.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-quanta.c'; fi` ipmi_sensors-ipmi-sensors-oem-quanta-s99q.o: ipmi-sensors-oem-quanta-s99q.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-quanta-s99q.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-quanta-s99q.o `test -f 'ipmi-sensors-oem-quanta-s99q.c' || echo '$(srcdir)/'`ipmi-sensors-oem-quanta-s99q.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-quanta-s99q.c' object='ipmi_sensors-ipmi-sensors-oem-quanta-s99q.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-quanta-s99q.o `test -f 'ipmi-sensors-oem-quanta-s99q.c' || echo '$(srcdir)/'`ipmi-sensors-oem-quanta-s99q.c ipmi_sensors-ipmi-sensors-oem-quanta-s99q.obj: ipmi-sensors-oem-quanta-s99q.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-quanta-s99q.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-quanta-s99q.obj `if test -f 'ipmi-sensors-oem-quanta-s99q.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-quanta-s99q.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-quanta-s99q.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-quanta-s99q.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-quanta-s99q.c' object='ipmi_sensors-ipmi-sensors-oem-quanta-s99q.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-quanta-s99q.obj `if test -f 'ipmi-sensors-oem-quanta-s99q.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-quanta-s99q.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-quanta-s99q.c'; fi` ipmi_sensors-ipmi-sensors-oem-wistron.o: ipmi-sensors-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-wistron.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-wistron.o `test -f 'ipmi-sensors-oem-wistron.c' || echo '$(srcdir)/'`ipmi-sensors-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-wistron.c' object='ipmi_sensors-ipmi-sensors-oem-wistron.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-wistron.o `test -f 'ipmi-sensors-oem-wistron.c' || echo '$(srcdir)/'`ipmi-sensors-oem-wistron.c ipmi_sensors-ipmi-sensors-oem-wistron.obj: ipmi-sensors-oem-wistron.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-wistron.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-wistron.obj `if test -f 'ipmi-sensors-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-wistron.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-wistron.c' object='ipmi_sensors-ipmi-sensors-oem-wistron.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-wistron.obj `if test -f 'ipmi-sensors-oem-wistron.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-wistron.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-wistron.c'; fi` ipmi_sensors-ipmi-sensors-oem-wistron-c6220.o: ipmi-sensors-oem-wistron-c6220.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-wistron-c6220.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-wistron-c6220.o `test -f 'ipmi-sensors-oem-wistron-c6220.c' || echo '$(srcdir)/'`ipmi-sensors-oem-wistron-c6220.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-wistron-c6220.c' object='ipmi_sensors-ipmi-sensors-oem-wistron-c6220.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-wistron-c6220.o `test -f 'ipmi-sensors-oem-wistron-c6220.c' || echo '$(srcdir)/'`ipmi-sensors-oem-wistron-c6220.c ipmi_sensors-ipmi-sensors-oem-wistron-c6220.obj: ipmi-sensors-oem-wistron-c6220.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-oem-wistron-c6220.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Tpo -c -o ipmi_sensors-ipmi-sensors-oem-wistron-c6220.obj `if test -f 'ipmi-sensors-oem-wistron-c6220.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-wistron-c6220.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-wistron-c6220.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-oem-wistron-c6220.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-oem-wistron-c6220.c' object='ipmi_sensors-ipmi-sensors-oem-wistron-c6220.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-oem-wistron-c6220.obj `if test -f 'ipmi-sensors-oem-wistron-c6220.c'; then $(CYGPATH_W) 'ipmi-sensors-oem-wistron-c6220.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-oem-wistron-c6220.c'; fi` ipmi_sensors-ipmi-sensors-output-common.o: ipmi-sensors-output-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-output-common.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Tpo -c -o ipmi_sensors-ipmi-sensors-output-common.o `test -f 'ipmi-sensors-output-common.c' || echo '$(srcdir)/'`ipmi-sensors-output-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-output-common.c' object='ipmi_sensors-ipmi-sensors-output-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-output-common.o `test -f 'ipmi-sensors-output-common.c' || echo '$(srcdir)/'`ipmi-sensors-output-common.c ipmi_sensors-ipmi-sensors-output-common.obj: ipmi-sensors-output-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-output-common.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Tpo -c -o ipmi_sensors-ipmi-sensors-output-common.obj `if test -f 'ipmi-sensors-output-common.c'; then $(CYGPATH_W) 'ipmi-sensors-output-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-output-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-output-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-output-common.c' object='ipmi_sensors-ipmi-sensors-output-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-output-common.obj `if test -f 'ipmi-sensors-output-common.c'; then $(CYGPATH_W) 'ipmi-sensors-output-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-output-common.c'; fi` ipmi_sensors-ipmi-sensors-simple-output.o: ipmi-sensors-simple-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-simple-output.o -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Tpo -c -o ipmi_sensors-ipmi-sensors-simple-output.o `test -f 'ipmi-sensors-simple-output.c' || echo '$(srcdir)/'`ipmi-sensors-simple-output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-simple-output.c' object='ipmi_sensors-ipmi-sensors-simple-output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-simple-output.o `test -f 'ipmi-sensors-simple-output.c' || echo '$(srcdir)/'`ipmi-sensors-simple-output.c ipmi_sensors-ipmi-sensors-simple-output.obj: ipmi-sensors-simple-output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_sensors-ipmi-sensors-simple-output.obj -MD -MP -MF $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Tpo -c -o ipmi_sensors-ipmi-sensors-simple-output.obj `if test -f 'ipmi-sensors-simple-output.c'; then $(CYGPATH_W) 'ipmi-sensors-simple-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-simple-output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Tpo $(DEPDIR)/ipmi_sensors-ipmi-sensors-simple-output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-sensors-simple-output.c' object='ipmi_sensors-ipmi-sensors-simple-output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_sensors_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_sensors-ipmi-sensors-simple-output.obj `if test -f 'ipmi-sensors-simple-output.c'; then $(CYGPATH_W) 'ipmi-sensors-simple-output.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-sensors-simple-output.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) $(SCRIPTS) installdirs: for dir in "$(DESTDIR)$(sbindir)" "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: -test -z "$(CLEANFILES)" || rm -f $(CLEANFILES) distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-sbinSCRIPTS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS \ install-sbinSCRIPTS install-strip installcheck installcheck-am \ installdirs maintainer-clean maintainer-clean-generic \ mostlyclean mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags tags-am uninstall \ uninstall-am uninstall-sbinPROGRAMS uninstall-sbinSCRIPTS ipmimonitoring: ipmimonitoring.in sed -e 's:@IPMIMONITORINGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmimonitoring $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-sensors/Makefile.am0000644002055400205540000000535613527331635017757 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-sensors sbin_SCRIPTS = ipmimonitoring ipmi_sensors_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_sensors_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_sensors_SOURCES = \ ipmi-sensors.c \ ipmi-sensors.h \ ipmi-sensors-argp.c \ ipmi-sensors-argp.h \ ipmi-sensors-detailed-output.c \ ipmi-sensors-detailed-output.h \ ipmi-sensors-oem-intel.c \ ipmi-sensors-oem-intel.h \ ipmi-sensors-oem-intel-node-manager.c \ ipmi-sensors-oem-intel-node-manager.h \ ipmi-sensors-oem-intel-s5500wb.c \ ipmi-sensors-oem-intel-s5500wb.h \ ipmi-sensors-oem-intel-s2600jf.c \ ipmi-sensors-oem-intel-s2600jf.h \ ipmi-sensors-oem-intel-s2600wp.c \ ipmi-sensors-oem-intel-s2600wp.h \ ipmi-sensors-oem-intel-quanta-qssc-s4r.c \ ipmi-sensors-oem-intel-quanta-qssc-s4r.h \ ipmi-sensors-oem-inventec.c \ ipmi-sensors-oem-inventec.h \ ipmi-sensors-oem-inventec-5441.c \ ipmi-sensors-oem-inventec-5441.h \ ipmi-sensors-oem-inventec-5442.c \ ipmi-sensors-oem-inventec-5442.h \ ipmi-sensors-oem-quanta.c \ ipmi-sensors-oem-quanta.h \ ipmi-sensors-oem-quanta-s99q.c \ ipmi-sensors-oem-quanta-s99q.h \ ipmi-sensors-oem-wistron.c \ ipmi-sensors-oem-wistron.h \ ipmi-sensors-oem-wistron-c6220.c \ ipmi-sensors-oem-wistron-c6220.h \ ipmi-sensors-output-common.c \ ipmi-sensors-output-common.h \ ipmi-sensors-simple-output.c \ ipmi-sensors-simple-output.h ipmimonitoring: ipmimonitoring.in sed -e 's:@IPMIMONITORINGSBINDIR@:$(sbindir):' $< > $@ chmod +x ipmimonitoring $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: CLEANFILES = ipmimonitoring EXTRA_DIST = ipmimonitoring.in freeipmi-1.6.4/ipmi-sensors/ipmi-sensors.c0000644002055400205540000016326313527331635020521 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-argp.h" #include "ipmi-sensors-simple-output.h" #include "ipmi-sensors-detailed-output.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "ipmi-sensors-output-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-common.h" #include "tool-cmdline-common.h" #include "tool-hostrange-common.h" #include "tool-oem-common.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #include "tool-util-common.h" #define IPMI_SENSORS_MESSAGE_LENGTH 1024 #define IPMI_SENSORS_TIME_BUFLEN 512 static int _sdr_repository_info (ipmi_sensors_state_data_t *state_data) { fiid_obj_t obj_cmd_rs = NULL; uint8_t major, minor; uint16_t record_count, free_space; uint64_t val; char timestr[IPMI_SENSORS_TIME_BUFLEN + 1]; char *str; int rv = -1; uint8_t allocation_supported = 0; assert (state_data); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sdr_repository_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sdr_repository_info (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sdr_repository_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "sdr_version_major", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdr_version_major': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } major = val; if (FIID_OBJ_GET (obj_cmd_rs, "sdr_version_minor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'sdr_version_minor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } minor = val; pstdout_printf (state_data->pstate, "SDR version : %u.%u\n", major, minor); if (FIID_OBJ_GET (obj_cmd_rs, "record_count", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'record_count': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } record_count = val; pstdout_printf (state_data->pstate, "SDR record count : %u\n", record_count); if (FIID_OBJ_GET (obj_cmd_rs, "free_space", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'free_space': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } free_space = val; pstdout_printf (state_data->pstate, "Free space remaining : %u bytes\n", free_space); if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_addition_timestamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'most_recent_addition_timestamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', IPMI_SENSORS_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, IPMI_SENSORS_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Most recent addition timestamp : %s\n", timestr); if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_erase_timestamp", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'most_recent_erase_timestamp': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } memset (timestr, '\0', IPMI_SENSORS_TIME_BUFLEN + 1); if (ipmi_timestamp_string ((uint32_t)val, state_data->prog_data->args->common_args.utc_offset, get_timestamp_flags (&(state_data->prog_data->args->common_args), IPMI_TIMESTAMP_FLAG_DEFAULT), "%m/%d/%Y - %H:%M:%S", timestr, IPMI_SENSORS_TIME_BUFLEN) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_timestamp_string: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Most recent erase timestamp : %s\n", timestr); if (FIID_OBJ_GET (obj_cmd_rs, "get_sdr_repository_allocation_info_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'get_sdr_repository_allocation_info_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Get SDR Repository Allocation Information Command : %s\n", (val ? "supported" : "unsupported")); allocation_supported = val; if (FIID_OBJ_GET (obj_cmd_rs, "reserve_sdr_repository_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'reserve_sdr_repository_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Reserve SDR Repository Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "partial_add_sdr_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'partial_add_sdr_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Partial Add SDR Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "delete_sdr_command_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'delete_sdr_command_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } pstdout_printf (state_data->pstate, "Delete SDR Command : %s\n", (val ? "supported" : "unsupported")); if (FIID_OBJ_GET (obj_cmd_rs, "modal_non_modal_sdr_repository_update_operation_supported", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'modal_non_modal_sdr_repository_update_operation_supported': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } switch (val) { case IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_UNSPECIFIED: str = "unspecified"; break; case IPMI_SDR_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED: str = "non-Modal supported"; break; case IPMI_SDR_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED: str = "modal supported"; break; case IPMI_SDR_MODAL_NON_MODAL_REPOSITORY_UPDATE_OP_SUPPORTED: str = "both supported"; break; default: str = "unknown"; } pstdout_printf (state_data->pstate, "Modal/non-modal SDR Repository Update operation : %s\n", str); if (FIID_OBJ_GET (obj_cmd_rs, "overflow_flag", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'overflow_flag': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } /* "SDR could not be written due to lack of space in the SDR Repository" */ pstdout_printf (state_data->pstate, "SDR could not be written due to lack of space : %s\n", (val ? "Yes" : "No")); if (allocation_supported) { uint16_t number_of_possible_allocation_units; uint16_t allocation_unit_size; uint16_t number_of_free_allocation_units; uint16_t largest_free_block; uint8_t maximum_record_size; fiid_obj_destroy (obj_cmd_rs); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sdr_repository_allocation_info_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sdr_repository_allocation_info (state_data->ipmi_ctx, obj_cmd_rs) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sdr_repository_allocation_info: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "number_of_possible_allocation_units", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_possible_allocation_units': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_possible_allocation_units = val; if (FIID_OBJ_GET (obj_cmd_rs, "allocation_unit_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'allocation_unit_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } allocation_unit_size = val; if (FIID_OBJ_GET (obj_cmd_rs, "number_of_free_allocation_units", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'number_of_free_allocation_units': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } number_of_free_allocation_units = val; if (FIID_OBJ_GET (obj_cmd_rs, "largest_free_block", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'largest_free_block': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } largest_free_block = val; if (FIID_OBJ_GET (obj_cmd_rs, "maximum_record_size", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'maximum_record_size': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } maximum_record_size = val; if (!number_of_possible_allocation_units) pstdout_printf (state_data->pstate, "Number of possible allocation units : unspecified\n"); else pstdout_printf (state_data->pstate, "Number of possible allocation units : %u\n", number_of_possible_allocation_units); if (!allocation_unit_size) pstdout_printf (state_data->pstate, "Allocation unit size : unspecified\n"); else pstdout_printf (state_data->pstate, "Allocation unit size : %u bytes\n", allocation_unit_size); pstdout_printf (state_data->pstate, "Number of free allocation units : %u\n", number_of_free_allocation_units); pstdout_printf (state_data->pstate, "Largest free block : %u allocation units\n", largest_free_block); pstdout_printf (state_data->pstate, "Maximum record size : %u allocation units\n", maximum_record_size); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _output_setup (ipmi_sensors_state_data_t *state_data) { assert (state_data); if (!state_data->prog_data->args->verbose_count) return (ipmi_sensors_simple_output_setup (state_data)); return (0); } static int _calculate_record_ids (ipmi_sensors_state_data_t *state_data, unsigned int output_record_ids[MAX_SENSOR_RECORD_IDS], unsigned int *output_record_ids_length) { uint16_t record_count; uint16_t record_id; unsigned int i; unsigned int j; assert (state_data); assert (output_record_ids); assert (output_record_ids_length); memset (output_record_ids, '\0', sizeof (unsigned int) * MAX_SENSOR_RECORD_IDS); (*output_record_ids_length) = 0; if (ipmi_sdr_cache_record_count (state_data->sdr_ctx, &record_count) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_record_count: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } /* * achu: This code could be done far more concisely, but it got * confusing and hard to understand. We will divide this up into * simple chunks, if the user specified neither record_ids and * types, record_ids, or types. record_ids take precedence over * types, and exclude_record_ids takes precedence over * exclude_types. */ if (!state_data->prog_data->args->record_ids_length && !state_data->prog_data->args->sensor_types_length) { for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (state_data->sdr_ctx)) { if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, &record_id, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (state_data->prog_data->args->exclude_record_ids_length) { int found_exclude = 0; for (j = 0; j < state_data->prog_data->args->exclude_record_ids_length; j++) { if (record_id == state_data->prog_data->args->exclude_record_ids[j]) { found_exclude++; break; } } if (found_exclude) continue; } if (state_data->prog_data->args->exclude_sensor_types_length) { int flag; if ((flag = sensor_type_listed_sdr (state_data->pstate, state_data->sdr_ctx, state_data->prog_data->args->exclude_sensor_types, state_data->prog_data->args->exclude_sensor_types_length)) < 0) return (-1); if (flag) continue; } output_record_ids[(*output_record_ids_length)] = record_id; (*output_record_ids_length)++; if ((*output_record_ids_length) >= MAX_SENSOR_RECORD_IDS) { pstdout_fprintf (state_data->pstate, stderr, "Too many sensors found on system; limit is %u\n", MAX_SENSOR_RECORD_IDS); return (-1); } } } else if (state_data->prog_data->args->record_ids_length) { for (i = 0; i < state_data->prog_data->args->record_ids_length; i++) { if (state_data->prog_data->args->exclude_record_ids_length) { int found_exclude = 0; for (j = 0; j < state_data->prog_data->args->exclude_record_ids_length; j++) { if (state_data->prog_data->args->record_ids[i] == state_data->prog_data->args->exclude_record_ids[j]) { found_exclude++; break; } } if (found_exclude) continue; } if (ipmi_sdr_cache_search_record_id (state_data->sdr_ctx, state_data->prog_data->args->record_ids[i]) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) == IPMI_SDR_ERR_NOT_FOUND) { pstdout_printf (state_data->pstate, "Sensor Record ID '%d' not found\n", state_data->prog_data->args->record_ids[i]); return (-1); } else { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_search_record_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } } if (state_data->prog_data->args->exclude_sensor_types_length) { int flag; if ((flag = sensor_type_listed_sdr (state_data->pstate, state_data->sdr_ctx, state_data->prog_data->args->exclude_sensor_types, state_data->prog_data->args->exclude_sensor_types_length)) < 0) return (-1); if (flag) continue; } output_record_ids[(*output_record_ids_length)] = state_data->prog_data->args->record_ids[i]; (*output_record_ids_length)++; if ((*output_record_ids_length) >= MAX_SENSOR_RECORD_IDS) { pstdout_fprintf (state_data->pstate, stderr, "Too many sensors specified; limit is %u\n", MAX_SENSOR_RECORD_IDS); return (-1); } } } else /* state_data->prog_data->args->sensor_types_length */ { for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (state_data->sdr_ctx)) { int flag; if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, &record_id, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if ((flag = sensor_type_listed_sdr (state_data->pstate, state_data->sdr_ctx, state_data->prog_data->args->sensor_types, state_data->prog_data->args->sensor_types_length)) < 0) return (-1); if (!flag) continue; if (state_data->prog_data->args->exclude_record_ids) { int found_exclude = 0; for (j = 0; j < state_data->prog_data->args->exclude_record_ids_length; j++) { if (record_id == state_data->prog_data->args->exclude_record_ids[j]) { found_exclude++; break; } } if (found_exclude) continue; } if (state_data->prog_data->args->exclude_sensor_types_length) { if ((flag = sensor_type_listed_sdr (state_data->pstate, state_data->sdr_ctx, state_data->prog_data->args->exclude_sensor_types, state_data->prog_data->args->exclude_sensor_types_length)) < 0) return (-1); if (flag) continue; } output_record_ids[(*output_record_ids_length)] = record_id; (*output_record_ids_length)++; if ((*output_record_ids_length) >= MAX_SENSOR_RECORD_IDS) { pstdout_fprintf (state_data->pstate, stderr, "Too many sensors found on system; limit is %u\n", MAX_SENSOR_RECORD_IDS); return (-1); } } } return (0); } /* Return 1 if generated message, 0 if not, -1 on error */ static int _intel_nm_oem_event_message (ipmi_sensors_state_data_t *state_data, uint8_t sensor_reading_raw, char ***event_message_list, unsigned int *event_message_list_len) { uint8_t sensor_type; uint8_t sensor_number; uint8_t event_reading_type_code; int rv = -1; assert (state_data); assert (event_message_list); assert (event_message_list_len); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->intel_node_manager.node_manager_data_found); if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (event_reading_type_code == IPMI_EVENT_READING_TYPE_CODE_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT && sensor_type == IPMI_SENSOR_TYPE_OEM_INTEL_NODE_MANAGER && state_data->intel_node_manager.nm_operational_capabilities_sensor_number == sensor_number) { uint8_t policy_interface_capability; uint8_t monitoring_capability; uint8_t power_limiting_capability; char policy_interface_capability_str[IPMI_SENSORS_MESSAGE_LENGTH + 1]; char monitoring_capability_str[IPMI_SENSORS_MESSAGE_LENGTH + 1]; char power_limiting_capability_str[IPMI_SENSORS_MESSAGE_LENGTH + 1]; char **tmp_event_message_list = NULL; memset (policy_interface_capability_str, '\0', IPMI_SENSORS_MESSAGE_LENGTH + 1); memset (monitoring_capability_str, '\0', IPMI_SENSORS_MESSAGE_LENGTH + 1); memset (power_limiting_capability_str, '\0', IPMI_SENSORS_MESSAGE_LENGTH + 1); policy_interface_capability = (sensor_reading_raw & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_BITMASK); policy_interface_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POLICY_INTERFACE_CAPABILITY_SHIFT; monitoring_capability = (sensor_reading_raw & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_BITMASK); monitoring_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_MONITORING_CAPABILITY_SHIFT; power_limiting_capability = (sensor_reading_raw & IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_BITMASK); power_limiting_capability >>= IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_EVENT_DATA1_POWER_LIMITING_CAPABILITY_SHIFT; snprintf (policy_interface_capability_str, IPMI_SENSORS_MESSAGE_LENGTH, "Policy Interface Capability %s", (policy_interface_capability == IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_AVAILABLE) ? "Available" : "Not Available"); snprintf (monitoring_capability_str, IPMI_SENSORS_MESSAGE_LENGTH, "Monitoring Capability %s", (monitoring_capability == IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_AVAILABLE) ? "Available" : "Not Available"); snprintf (power_limiting_capability_str, IPMI_SENSORS_MESSAGE_LENGTH, "Power Limiting Capability %s", (power_limiting_capability == IPMI_OEM_INTEL_NODE_MANAGER_OPERATIONAL_CAPABILITIES_CHANGE_EVENT_AVAILABLE) ? "Available" : "Not Available"); if (!(tmp_event_message_list = (char **) malloc (sizeof (char *) * 4))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } if (!(tmp_event_message_list[0] = strdup (policy_interface_capability_str))) { pstdout_perror (state_data->pstate, "strdup"); free (tmp_event_message_list); goto cleanup; } if (!(tmp_event_message_list[1] = strdup (monitoring_capability_str))) { pstdout_perror (state_data->pstate, "strdup"); free (tmp_event_message_list[0]); free (tmp_event_message_list); goto cleanup; } if (!(tmp_event_message_list[2] = strdup (power_limiting_capability_str))) { pstdout_perror (state_data->pstate, "strdup"); free (tmp_event_message_list[1]); free (tmp_event_message_list[0]); free (tmp_event_message_list); goto cleanup; } tmp_event_message_list[3] = NULL; (*event_message_list) = tmp_event_message_list; (*event_message_list_len) = 3; rv = 1; } else rv = 0; cleanup: return (rv); } static int _get_event_message (ipmi_sensors_state_data_t *state_data, uint16_t sensor_event_bitmask, char ***event_message_list, unsigned int *event_message_list_len) { uint8_t sensor_type; uint8_t sensor_number; uint8_t event_reading_type_code; uint32_t manufacturer_id = 0; uint16_t product_id = 0; unsigned int flags = IPMI_GET_EVENT_MESSAGES_FLAGS_DEFAULT; int rv = -1; assert (state_data); assert (event_message_list); assert (event_message_list_len); if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_SENSOR_READING; if (!state_data->prog_data->args->verbose_count) flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT; if (state_data->prog_data->args->interpret_oem_data) { manufacturer_id = state_data->oem_data.manufacturer_id; product_id = state_data->oem_data.product_id; flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA; } if (state_data->prog_data->args->ignore_unrecognized_events) flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_IGNORE_UNRECOGNIZED_EVENTS; if (ipmi_get_event_messages (event_reading_type_code, sensor_type, sensor_number, sensor_event_bitmask, manufacturer_id, product_id, event_message_list, event_message_list_len, IPMI_SENSORS_NO_EVENT_STRING, flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_event_messages: %s\n", strerror (errno)); goto cleanup; } rv = 0; cleanup: return (rv); } static int _output_sensor (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number_base, uint8_t shared_sensor_number_offset) { uint8_t sdr_record[IPMI_SDR_MAX_RECORD_LENGTH]; int sdr_record_len = 0; uint8_t sensor_reading_raw = 0; double *sensor_reading = NULL; uint16_t sensor_event_bitmask = 0; char **event_message_list = NULL; int event_message_output_type = IPMI_SENSORS_EVENT_NORMAL; unsigned int event_message_list_len = 0; int rv = -1; assert (state_data); if ((sdr_record_len = ipmi_sdr_cache_record_read (state_data->sdr_ctx, sdr_record, IPMI_SDR_MAX_RECORD_LENGTH)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_record_read: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sensor_read (state_data->sensor_read_ctx, sdr_record, sdr_record_len, shared_sensor_number_offset, &sensor_reading_raw, &sensor_reading, &sensor_event_bitmask) <= 0) { int errnum = ipmi_sensor_read_ctx_errnum (state_data->sensor_read_ctx); if (errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Sensor reading cannot be calculated: %s\n", ipmi_sensor_read_ctx_errormsg (state_data->sensor_read_ctx)); goto get_events; } if (errnum == IPMI_SENSOR_READ_ERR_SENSOR_IS_SYSTEM_SOFTWARE || errnum == IPMI_SENSOR_READ_ERR_SENSOR_READING_UNAVAILABLE || errnum == IPMI_SENSOR_READ_ERR_SENSOR_SCANNING_DISABLED || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_ANALOG || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NON_LINEAR || errnum == IPMI_SENSOR_READ_ERR_SENSOR_NOT_OWNED_BY_BMC || errnum == IPMI_SENSOR_READ_ERR_SENSOR_CANNOT_BE_BRIDGED) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Sensor reading/event bitmask not available: %s\n", ipmi_sensor_read_ctx_errormsg (state_data->sensor_read_ctx)); if (state_data->prog_data->args->ignore_not_available_sensors) { rv = 0; goto cleanup; } event_message_output_type = IPMI_SENSORS_EVENT_NA; goto output; } if (errnum == IPMI_SENSOR_READ_ERR_SENSOR_READING_CANNOT_BE_OBTAINED || errnum == IPMI_SENSOR_READ_ERR_NODE_BUSY) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Sensor reading/event_bitmask retrieval error: %s\n", ipmi_sensor_read_ctx_errormsg (state_data->sensor_read_ctx)); event_message_output_type = IPMI_SENSORS_EVENT_UNKNOWN; goto output; } if (errnum == IPMI_SENSOR_READ_ERR_INVALID_SDR_RECORD_TYPE) { /* Fall through to output. detailed-output will output SDR * information if it pleases, simple-output will ignore this * SDR type. */ goto output; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_read: %s\n", ipmi_sensor_read_ctx_errormsg (state_data->sensor_read_ctx)); goto cleanup; } get_events: if (!state_data->prog_data->args->output_event_bitmask || state_data->prog_data->args->legacy_output) { int event_msg_generated = 0; /* OEM Interpretation * * Handle Intel Node Manager special case */ if (state_data->prog_data->args->interpret_oem_data && ((state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL && (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S5500WB || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600JF || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600WP || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R)) || (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC && (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5442)) || (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA && state_data->oem_data.product_id == IPMI_QUANTA_PRODUCT_ID_S99Q)) && state_data->intel_node_manager.node_manager_data_found) { if ((event_msg_generated = _intel_nm_oem_event_message (state_data, sensor_reading_raw, &event_message_list, &event_message_list_len)) < 0) goto cleanup; } if (!event_msg_generated) { if (_get_event_message (state_data, sensor_event_bitmask, &event_message_list, &event_message_list_len) < 0) goto cleanup; } } output: if (state_data->prog_data->args->verbose_count) rv = ipmi_sensors_detailed_output (state_data, sensor_number_base + shared_sensor_number_offset, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len); else rv = ipmi_sensors_simple_output (state_data, sensor_number_base + shared_sensor_number_offset, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len); cleanup: free (sensor_reading); if (event_message_list) { unsigned int j; for (j = 0; j < event_message_list_len; j++) free (event_message_list[j]); free (event_message_list); } return (rv); } static int _display_sensors (ipmi_sensors_state_data_t *state_data) { struct ipmi_sensors_arguments *args = NULL; unsigned int output_record_ids[MAX_SENSOR_RECORD_IDS]; unsigned int output_record_ids_length = 0; unsigned int i; unsigned int ctx_flags_orig; int rv = -1; assert (state_data); args = state_data->prog_data->args; if (args->interpret_oem_data) { if (ipmi_get_oem_data (state_data->pstate, state_data->ipmi_ctx, &state_data->oem_data) < 0) goto cleanup; /* OEM Interpretation * * Intel Node Manager * * For Intel Chips, not just Intel Motherboards. Confirmed for: * * Intel S5500WB/Penguin Computing Relion 700 * Intel S2600JF/Appro 512X * Intel S2600WP * Inventec 5441/Dell Xanadu II * Inventec 5442/Dell Xanadu III * Quanta S99Q/Dell FS12-TY * Quanta QSSC-S4R/Appro GB812X-CN (maintains Intel manufacturer ID) * * Below confirms the Intel Node Manager exists. We must do * this before reading the sensor to determime what type of * sensor it is via the sensor number. */ if ((state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL && (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S5500WB || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600JF || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600WP || state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R)) || (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC && (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5441 || state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5442)) || (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA && state_data->oem_data.product_id == IPMI_QUANTA_PRODUCT_ID_S99Q)) { uint16_t record_count; int ret; if (ipmi_sdr_cache_record_count (state_data->sdr_ctx, &record_count) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_record_count: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* achu: * * In Intel NM 2.0 specification, sensor numbers are now fixed and you * don't have to search the SDR for them. We could check version of * NM on motherboard to determine if we need to search SDR or not, but * for time being we'll stick to the search SDR method b/c it will * always work. */ for (i = 0; i < record_count; i++, ipmi_sdr_cache_next (state_data->sdr_ctx)) { if ((ret = ipmi_sdr_oem_parse_intel_node_manager (state_data->sdr_ctx, NULL, 0, NULL, NULL, NULL, &state_data->intel_node_manager.nm_health_event_sensor_number, &state_data->intel_node_manager.nm_exception_event_sensor_number, &state_data->intel_node_manager.nm_operational_capabilities_sensor_number, &state_data->intel_node_manager.nm_alert_threshold_exceeded_sensor_number)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_oem_parse_intel_node_manager: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ret) { state_data->intel_node_manager.node_manager_data_found = 1; break; } } if (ipmi_sdr_cache_first (state_data->sdr_ctx) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_first: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } } if (args->output_sensor_state) { if (ipmi_interpret_ctx_set_manufacturer_id (state_data->interpret_ctx, state_data->oem_data.manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_interpret_ctx_set_manufacturer_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } if (ipmi_interpret_ctx_set_product_id (state_data->interpret_ctx, state_data->oem_data.product_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_interpret_ctx_set_product_id: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); goto cleanup; } } } if (_output_setup (state_data) < 0) goto cleanup; if (_calculate_record_ids (state_data, output_record_ids, &output_record_ids_length) < 0) return (-1); if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE) { if (ipmi_ctx_get_flags (state_data->ipmi_ctx, &ctx_flags_orig) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_get_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } if (ipmi_ctx_set_flags (state_data->ipmi_ctx, ctx_flags_orig | IPMI_FLAGS_IGNORE_AUTHENTICATION_CODE) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } for (i = 0; i < output_record_ids_length; i++) { uint8_t record_type; uint8_t sensor_number_base = 0; if (ipmi_sdr_cache_search_record_id (state_data->sdr_ctx, output_record_ids[i]) < 0) { /* at this point shouldn't have record id not found error */ pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_cache_search_record_id: 0x%02X %s\n", output_record_ids[i], ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD || record_type == IPMI_SDR_FORMAT_EVENT_ONLY_RECORD) { if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number_base) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } } if (state_data->prog_data->args->shared_sensors) { uint8_t share_count; int i; if (record_type != IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD) goto fallthrough; if (ipmi_sdr_parse_sensor_record_sharing (state_data->sdr_ctx, NULL, 0, &share_count, NULL, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_record_sharing: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (share_count <= 1) goto fallthrough; /* IPMI spec gives the following example: * * "If the starting sensor number was 10, and the share * count was 3, then sensors 10, 11, and 12 would share * the record" */ for (i = 0; i < share_count; i++) { if (_output_sensor (state_data, sensor_number_base, i) < 0) goto cleanup; } } else { fallthrough: if (_output_sensor (state_data, sensor_number_base, 0) < 0) goto cleanup; } } if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_AUTH_CODE) { if (ipmi_ctx_set_flags (state_data->ipmi_ctx, ctx_flags_orig) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_ctx_set_flags: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); goto cleanup; } } rv = 0; cleanup: return (rv); } static int run_cmd_args (ipmi_sensors_state_data_t *state_data) { struct ipmi_sensors_arguments *args; assert (state_data); args = state_data->prog_data->args; assert (!args->common_args.flush_cache); if (args->sdr_info) return (_sdr_repository_info (state_data)); if (sdr_cache_create_and_load (state_data->sdr_ctx, state_data->pstate, state_data->ipmi_ctx, state_data->hostname, &state_data->prog_data->args->common_args) < 0) return (-1); if (_display_sensors (state_data) < 0) return (-1); return (0); } static int _ipmi_sensors (pstdout_state_t pstate, const char *hostname, void *arg) { ipmi_sensors_state_data_t state_data; ipmi_sensors_prog_data_t *prog_data; int exit_code = EXIT_FAILURE; unsigned int sensor_read_flags = 0; assert (pstate); assert (arg); prog_data = (ipmi_sensors_prog_data_t *)arg; assert (!prog_data->args->list_sensor_types); if (prog_data->args->common_args.flush_cache) { if (sdr_cache_flush_cache (pstate, hostname, &prog_data->args->common_args) < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } memset (&state_data, '\0', sizeof (ipmi_sensors_state_data_t)); state_data.prog_data = prog_data; state_data.pstate = pstate; state_data.hostname = (char *)hostname; if (!(state_data.ipmi_ctx = ipmi_open (prog_data->progname, hostname, &(prog_data->args->common_args), state_data.pstate, 0))) goto cleanup; if (!(state_data.sdr_ctx = ipmi_sdr_ctx_create ())) { pstdout_perror (pstate, "ipmi_sdr_ctx_create()"); goto cleanup; } if (!(state_data.sensor_read_ctx = ipmi_sensor_read_ctx_create (state_data.ipmi_ctx))) { pstdout_perror (pstate, "ipmi_sensor_read_ctx_create()"); goto cleanup; } if (state_data.prog_data->args->bridge_sensors) sensor_read_flags |= IPMI_SENSOR_READ_FLAGS_BRIDGE_SENSORS; if (state_data.prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING) sensor_read_flags |= IPMI_SENSOR_READ_FLAGS_DISCRETE_READING; if (state_data.prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SCANNING_DISABLED) sensor_read_flags |= IPMI_SENSOR_READ_FLAGS_IGNORE_SCANNING_DISABLED; if (state_data.prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_BMC_OWNER) sensor_read_flags |= IPMI_SENSOR_READ_FLAGS_ASSUME_BMC_OWNER; if (sensor_read_flags) { /* Don't error out, if this fails we can still continue */ if (ipmi_sensor_read_ctx_set_flags (state_data.sensor_read_ctx, sensor_read_flags) < 0) pstdout_fprintf (pstate, stderr, "ipmi_sensor_read_ctx_set_flags: %s\n", ipmi_sensor_read_ctx_strerror (ipmi_sensor_read_ctx_errnum (state_data.sensor_read_ctx))); } if (prog_data->args->output_sensor_state) { if (!(state_data.interpret_ctx = ipmi_interpret_ctx_create ())) { pstdout_perror (pstate, "ipmi_interpret_ctx_create()"); goto cleanup; } if (prog_data->args->sensor_state_config_file) { if (ipmi_interpret_load_sensor_config (state_data.interpret_ctx, prog_data->args->sensor_state_config_file) < 0) { if (ipmi_interpret_ctx_errnum (state_data.interpret_ctx) == IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_DOES_NOT_EXIST) pstdout_fprintf (pstate, stderr, "sensor state config file '%s' does not exist\n", prog_data->args->sensor_state_config_file); else if (ipmi_interpret_ctx_errnum (state_data.interpret_ctx) == IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_PARSE) pstdout_fprintf (pstate, stderr, "sensor state config file '%s' parse error\n", prog_data->args->sensor_state_config_file); else pstdout_fprintf (pstate, stderr, "ipmi_interpret_load_sensor_config: %s\n", ipmi_interpret_ctx_errormsg (state_data.interpret_ctx)); goto cleanup; } } else { if (ipmi_interpret_load_sensor_config (state_data.interpret_ctx, NULL) < 0) { if (ipmi_interpret_ctx_errnum (state_data.interpret_ctx) == IPMI_INTERPRET_ERR_SENSOR_CONFIG_FILE_PARSE) pstdout_fprintf (pstate, stderr, "sensor state config file parse error\n"); else pstdout_fprintf (pstate, stderr, "ipmi_interpret_load_sensor_config: %s\n", ipmi_interpret_ctx_errormsg (state_data.interpret_ctx)); goto cleanup; } } if (prog_data->args->interpret_oem_data || prog_data->args->ignore_unrecognized_events) { unsigned int flags = 0; if (prog_data->args->interpret_oem_data) flags |= IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA; if (prog_data->args->ignore_unrecognized_events) flags |= IPMI_INTERPRET_FLAGS_IGNORE_UNRECOGNIZED_EVENTS; if (ipmi_interpret_ctx_set_flags (state_data.interpret_ctx, flags) < 0) { pstdout_fprintf (pstate, stderr, "ipmi_interpret_ctx_set_flags: %s\n", ipmi_interpret_ctx_errormsg (state_data.interpret_ctx)); goto cleanup; } } } if (run_cmd_args (&state_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_sdr_ctx_destroy (state_data.sdr_ctx); ipmi_sensor_read_ctx_destroy (state_data.sensor_read_ctx); ipmi_interpret_ctx_destroy (state_data.interpret_ctx); ipmi_ctx_close (state_data.ipmi_ctx); ipmi_ctx_destroy (state_data.ipmi_ctx); return (exit_code); } int main (int argc, char **argv) { ipmi_sensors_prog_data_t prog_data; struct ipmi_sensors_arguments cmd_args; int hosts_count; int rv; ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmi_sensors_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; /* Special case, just output list, don't do anything else */ if (prog_data.args->list_sensor_types) { if (list_sensor_types () < 0) return (EXIT_FAILURE); return (EXIT_SUCCESS); } if ((hosts_count = pstdout_setup (&(prog_data.args->common_args.hostname), &(prog_data.args->common_args))) < 0) return (EXIT_FAILURE); if (!hosts_count) return (EXIT_SUCCESS); /* We don't want caching info to output when are doing ranged output */ if (hosts_count > 1) prog_data.args->common_args.quiet_cache = 1; if ((rv = pstdout_launch (prog_data.args->common_args.hostname, _ipmi_sensors, &prog_data)) < 0) { fprintf (stderr, "pstdout_launch: %s\n", pstdout_strerror (pstdout_errnum)); return (EXIT_FAILURE); } return (rv); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors.h0000644002055400205540000000757213527331635020526 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_H #define IPMI_SENSORS_H #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "tool-sensor-common.h" #include "pstdout.h" enum ipmi_sensors_argp_option_keys { VERBOSE_KEY = 'v', SDR_INFO_KEY = 'i', QUIET_READINGS_KEY = 'q', SENSORS_KEY = 's', /* legacy */ RECORD_IDS_KEY = 'r', EXCLUDE_RECORD_IDS_KEY = 'R', GROUP_KEY = 160, /* legacy */ GROUPS_KEY = 'g', /* legacy */ EXCLUDE_GROUPS_KEY = 161, /* legacy */ LIST_GROUPS_KEY = 162, /* legacy */ SENSOR_TYPE_KEY = 163, SENSOR_TYPES_KEY = 't', EXCLUDE_SENSOR_TYPES_KEY = 'T', LIST_SENSOR_TYPES_KEY = 'L', BRIDGE_SENSORS_KEY = 'b', SHARED_SENSORS_KEY = 164, INTERPRET_OEM_DATA_KEY = 165, IGNORE_NOT_AVAILABLE_SENSORS_KEY = 166, IGNORE_UNRECOGNIZED_EVENTS_KEY = 167, OUTPUT_EVENT_BITMASK_KEY = 168, OUTPUT_SENSOR_STATE_KEY = 169, SENSOR_STATE_CONFIG_FILE_KEY = 170, ENTITY_SENSOR_NAMES_KEY = 171, OUTPUT_SENSOR_THRESHOLDS_KEY = 172, NO_SENSOR_TYPE_OUTPUT_KEY = 173, COMMA_SEPARATED_OUTPUT_KEY = 174, NO_HEADER_OUTPUT_KEY = 175, NON_ABBREVIATED_UNITS_KEY = 176, LEGACY_OUTPUT_KEY = 177, IPMIMONITORING_LEGACY_OUTPUT_KEY = 178, }; struct ipmi_sensors_arguments { struct common_cmd_args common_args; unsigned int verbose_count; int sdr_info; int quiet_readings; unsigned int record_ids[MAX_SENSOR_RECORD_IDS]; unsigned int record_ids_length; unsigned int exclude_record_ids[MAX_SENSOR_RECORD_IDS]; unsigned int exclude_record_ids_length; char sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; char exclude_sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int list_sensor_types; int bridge_sensors; int shared_sensors; int interpret_oem_data; int ignore_not_available_sensors; int ignore_unrecognized_events; int output_event_bitmask; int output_sensor_state; char *sensor_state_config_file; int entity_sensor_names; int output_sensor_thresholds; int no_sensor_type_output; int comma_separated_output; int no_header_output; int non_abbreviated_units; int legacy_output; int ipmimonitoring_legacy_output; }; typedef struct ipmi_sensors_prog_data { char *progname; struct ipmi_sensors_arguments *args; } ipmi_sensors_prog_data_t; struct ipmi_sensors_interpret_oem_data_intel_node_manager { int node_manager_data_found; uint8_t nm_health_event_sensor_number; uint8_t nm_exception_event_sensor_number; uint8_t nm_operational_capabilities_sensor_number; uint8_t nm_alert_threshold_exceeded_sensor_number; }; typedef struct ipmi_sensors_state_data { ipmi_sensors_prog_data_t *prog_data; ipmi_ctx_t ipmi_ctx; pstdout_state_t pstate; char *hostname; ipmi_sdr_ctx_t sdr_ctx; ipmi_sensor_read_ctx_t sensor_read_ctx; ipmi_interpret_ctx_t interpret_ctx; int output_headers; struct sensor_column_width column_width; struct ipmi_oem_data oem_data; struct ipmi_sensors_interpret_oem_data_intel_node_manager intel_node_manager; } ipmi_sensors_state_data_t; #endif /* IPMI_SENSORS_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-argp.c0000644002055400205540000004722513527331635021447 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-argp.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" #include "tool-sensor-common.h" const char *argp_program_version = "ipmi-sensors - " PACKAGE_VERSION "\n" "Copyright (C) 2003-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-sensors - displays IPMI sensor information"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_SDR_CACHE_OPTIONS, ARGP_COMMON_SDR_CACHE_OPTIONS_FILE_DIRECTORY, ARGP_COMMON_SDR_CACHE_OPTIONS_LEGACY, ARGP_COMMON_TIME_OPTIONS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "verbose", VERBOSE_KEY, 0, 0, "Increase verbosity in output. May be specified multiple times.", 40}, { "sdr-info", SDR_INFO_KEY, 0, 0, "Show sendor data repository (SDR) information.", 41}, { "quiet-readings", QUIET_READINGS_KEY, 0, 0, "Do not output sensor readings or thresholds on simple output.", 42}, /* for backwards compatability */ { "sensors", SENSORS_KEY, "SENSORS-LIST", OPTION_HIDDEN, "Show sensors by record id. Accepts space or comma separated lists", 43}, { "record-ids", RECORD_IDS_KEY, "RECORD-IDS-LIST", 0, "Show specific sensors by record id. Accepts space or comma separated lists", 44}, { "exclude-record-ids", EXCLUDE_RECORD_IDS_KEY, "RECORD-IDS-LIST", 0, "Do not show specific sensors by record id. Accepts space or comma separated lists", 45}, /* maintain "group" options for backwards compatability */ { "group", GROUP_KEY, "GROUP-NAME", OPTION_HIDDEN, "Show sensors belonging to a specific group.", 46}, /* maintain "group" options for backwards compatability */ { "groups", GROUPS_KEY, "GROUPS-LIST", OPTION_HIDDEN, "Show sensors belonging to a specific group.", 47}, /* maintain "group" options for backwards compatability */ { "exclude-groups", EXCLUDE_GROUPS_KEY, "GROUPS-LIST", OPTION_HIDDEN, "Do not show sensors belonging to a specific group.", 48}, /* maintain "group" options for backwards compatability */ { "list-groups", LIST_GROUPS_KEY, 0, OPTION_HIDDEN, "List sensor groups.", 49}, /* for backwards compatability */ { "sensor-type", SENSOR_TYPE_KEY, "SENSOR-TYPE-NAME", OPTION_HIDDEN, "Show sensors of a specific type.", 50}, { "sensor-types", SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Show sensors of a specific type.", 51}, { "exclude-sensor-types", EXCLUDE_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Do not show sensors of a specific type.", 52}, { "list-sensor-types", LIST_SENSOR_TYPES_KEY, 0, 0, "List sensor types.", 53}, { "bridge-sensors", BRIDGE_SENSORS_KEY, NULL, 0, "Bridge addresses to read non-BMC owned sensors.", 54}, { "shared-sensors", SHARED_SENSORS_KEY, NULL, 0, "Iterate over shared sensors in a single record.", 55}, { "interpret-oem-data", INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 56}, { "ignore-not-available-sensors", IGNORE_NOT_AVAILABLE_SENSORS_KEY, NULL, 0, "Ignore not-available (i.e. N/A) sensors.", 57}, { "ignore-unrecognized-events", IGNORE_UNRECOGNIZED_EVENTS_KEY, NULL, 0, "Ignore unrecognized events (i.e. 'Unrecognized Event') in sensors output.", 58}, { "output-event-bitmask", OUTPUT_EVENT_BITMASK_KEY, NULL, 0, "Output event bitmask value instead of the string representation.", 59}, { "output-sensor-state", OUTPUT_SENSOR_STATE_KEY, NULL, 0, "Output sensor state in output.", 60}, { "sensor-state-config-file", SENSOR_STATE_CONFIG_FILE_KEY, "FILE", 0, "Specify an alternate sensor state configuration file.", 61}, /* ipmimonitoring legacy support */ { "sensor-config-file", SENSOR_STATE_CONFIG_FILE_KEY, "FILE", OPTION_HIDDEN, "Specify an alternate sensor state configuration file.", 62}, { "entity-sensor-names", ENTITY_SENSOR_NAMES_KEY, NULL, 0, "Output sensor names with entity ids and instances.", 63}, { "output-sensor-thresholds", OUTPUT_SENSOR_THRESHOLDS_KEY, NULL, 0, "Output sensor thresholds in output.", 64}, { "no-sensor-type-output", NO_SENSOR_TYPE_OUTPUT_KEY, 0, 0, "Do not show sensor type output.", 65}, { "comma-separated-output", COMMA_SEPARATED_OUTPUT_KEY, 0, 0, "Output fields in comma separated format.", 66}, { "no-header-output", NO_HEADER_OUTPUT_KEY, 0, 0, "Do not output column headers.", 67}, { "non-abbreviated-units", NON_ABBREVIATED_UNITS_KEY, 0, 0, "Output non-abbreviated units (e.g. 'Amps' insetead of 'A').", 68}, { "legacy-output", LEGACY_OUTPUT_KEY, 0, 0, "Output in legacy format.", 69}, /* ipmimonitoring legacy support */ { "ipmimonitoring-legacy-output", IPMIMONITORING_LEGACY_OUTPUT_KEY, 0, 0, "Output in ipmimonitoring legacy format.", 70}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_sensors_arguments *cmd_args; char *endptr; char *tok; int value; assert (state); cmd_args = state->input; switch (key) { case VERBOSE_KEY: cmd_args->verbose_count++; break; case SDR_INFO_KEY: cmd_args->sdr_info = 1; break; /* maintain -s and "--sensors" for backwards compatability */ case QUIET_READINGS_KEY: cmd_args->quiet_readings = 1; break; case SENSORS_KEY: case RECORD_IDS_KEY: tok = strtok (arg, " ,"); while (tok && cmd_args->record_ids_length < MAX_SENSOR_RECORD_IDS) { if (!strcasecmp (tok, SENSOR_PARSE_ALL_STRING)) { cmd_args->record_ids_length = 0; break; } errno = 0; value = strtol (tok, &endptr, 10); if (errno || endptr[0] != '\0' || value < 0 || value < IPMI_SDR_RECORD_ID_FIRST || value > IPMI_SDR_RECORD_ID_LAST) { fprintf (stderr, "invalid sensor record id: %d\n", value); exit (EXIT_FAILURE); } cmd_args->record_ids[cmd_args->record_ids_length] = value; cmd_args->record_ids_length++; tok = strtok (NULL, " ,"); } break; case EXCLUDE_RECORD_IDS_KEY: tok = strtok (arg, " ,"); while (tok && cmd_args->exclude_record_ids_length < MAX_SENSOR_RECORD_IDS) { if (!strcasecmp (tok, SENSOR_PARSE_NONE_STRING)) { cmd_args->exclude_record_ids_length = 0; break; } errno = 0; value = strtol (tok, &endptr, 10); if (errno || endptr[0] != '\0' || value < 0 || value < IPMI_SDR_RECORD_ID_FIRST || value > IPMI_SDR_RECORD_ID_LAST) { fprintf (stderr, "invalid sensor record id: %d\n", value); exit (EXIT_FAILURE); } cmd_args->exclude_record_ids[cmd_args->exclude_record_ids_length] = value; cmd_args->exclude_record_ids_length++; tok = strtok (NULL, " ,"); } break; case GROUP_KEY: /* legacy */ case SENSOR_TYPE_KEY: strncpy (cmd_args->sensor_types[cmd_args->sensor_types_length], arg, MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->sensor_types_length++; break; case GROUPS_KEY: /* legacy */ case SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_ALL_STRING, cmd_args->sensor_types, &(cmd_args->sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case EXCLUDE_GROUPS_KEY: /* legacy */ case EXCLUDE_SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_NONE_STRING, cmd_args->exclude_sensor_types, &(cmd_args->exclude_sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case LIST_GROUPS_KEY: /* legacy */ case LIST_SENSOR_TYPES_KEY: cmd_args->list_sensor_types = 1; break; case BRIDGE_SENSORS_KEY: cmd_args->bridge_sensors = 1; break; case SHARED_SENSORS_KEY: cmd_args->shared_sensors = 1; break; case INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case IGNORE_NOT_AVAILABLE_SENSORS_KEY: cmd_args->ignore_not_available_sensors = 1; break; case IGNORE_UNRECOGNIZED_EVENTS_KEY: cmd_args->ignore_unrecognized_events = 1; break; case OUTPUT_EVENT_BITMASK_KEY: cmd_args->output_event_bitmask = 1; break; case OUTPUT_SENSOR_STATE_KEY: cmd_args->output_sensor_state = 1; break; case SENSOR_STATE_CONFIG_FILE_KEY: if (!(cmd_args->sensor_state_config_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case ENTITY_SENSOR_NAMES_KEY: cmd_args->entity_sensor_names = 1; break; case OUTPUT_SENSOR_THRESHOLDS_KEY: cmd_args->output_sensor_thresholds = 1; break; case NO_SENSOR_TYPE_OUTPUT_KEY: cmd_args->no_sensor_type_output = 1; break; case COMMA_SEPARATED_OUTPUT_KEY: cmd_args->comma_separated_output = 1; break; case NO_HEADER_OUTPUT_KEY: cmd_args->no_header_output = 1; break; case NON_ABBREVIATED_UNITS_KEY: cmd_args->non_abbreviated_units = 1; break; case LEGACY_OUTPUT_KEY: cmd_args->legacy_output = 1; break; case IPMIMONITORING_LEGACY_OUTPUT_KEY: cmd_args->ipmimonitoring_legacy_output = 1; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmi_sensors_config_file_parse (struct ipmi_sensors_arguments *cmd_args) { struct config_file_data_ipmi_sensors config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmi_sensors)); if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND | CONFIG_FILE_SDR | CONFIG_FILE_TIME | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMI_SENSORS, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; if (config_file_data.quiet_readings_count) cmd_args->quiet_readings = config_file_data.quiet_readings; if (config_file_data.record_ids_count && config_file_data.record_ids_length) { unsigned int i; assert (MAX_SENSOR_RECORD_IDS == CONFIG_FILE_MAX_SENSOR_RECORD_IDS); for (i = 0; i < config_file_data.record_ids_length; i++) cmd_args->record_ids[i] = config_file_data.record_ids[i]; cmd_args->record_ids_length = config_file_data.record_ids_length; } if (config_file_data.exclude_record_ids_count && config_file_data.exclude_record_ids_length) { unsigned int i; assert (MAX_SENSOR_RECORD_IDS == CONFIG_FILE_MAX_SENSOR_RECORD_IDS); for (i = 0; i < config_file_data.exclude_record_ids_length; i++) cmd_args->exclude_record_ids[i] = config_file_data.exclude_record_ids[i]; cmd_args->exclude_record_ids_length = config_file_data.exclude_record_ids_length; } if (config_file_data.sensor_types_count && config_file_data.sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.sensor_types_length; i++) strncpy (cmd_args->sensor_types[i], config_file_data.sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->sensor_types_length = config_file_data.sensor_types_length; } if (config_file_data.exclude_sensor_types_count && config_file_data.exclude_sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.exclude_sensor_types_length; i++) strncpy (cmd_args->exclude_sensor_types[i], config_file_data.exclude_sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->exclude_sensor_types_length = config_file_data.exclude_sensor_types_length; } if (config_file_data.bridge_sensors_count) cmd_args->bridge_sensors = config_file_data.bridge_sensors; if (config_file_data.shared_sensors_count) cmd_args->shared_sensors = config_file_data.shared_sensors; if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; if (config_file_data.ignore_not_available_sensors_count) cmd_args->ignore_not_available_sensors = config_file_data.ignore_not_available_sensors; if (config_file_data.ignore_unrecognized_events_count) cmd_args->ignore_unrecognized_events = config_file_data.ignore_unrecognized_events; if (config_file_data.output_event_bitmask_count) cmd_args->output_event_bitmask = config_file_data.output_event_bitmask; if (config_file_data.output_sensor_state_count) cmd_args->output_sensor_state = config_file_data.output_sensor_state; if (config_file_data.sensor_state_config_file_count) cmd_args->sensor_state_config_file = config_file_data.sensor_state_config_file; if (config_file_data.entity_sensor_names_count) cmd_args->entity_sensor_names = config_file_data.entity_sensor_names; if (config_file_data.output_sensor_thresholds_count) cmd_args->output_sensor_thresholds = config_file_data.output_sensor_thresholds; if (config_file_data.no_sensor_type_output_count) cmd_args->no_sensor_type_output = config_file_data.no_sensor_type_output; if (config_file_data.comma_separated_output_count) cmd_args->comma_separated_output = config_file_data.comma_separated_output; if (config_file_data.no_header_output_count) cmd_args->no_header_output = config_file_data.no_header_output; if (config_file_data.non_abbreviated_units_count) cmd_args->non_abbreviated_units = config_file_data.non_abbreviated_units; if (config_file_data.legacy_output_count) cmd_args->legacy_output = config_file_data.legacy_output; if (config_file_data.ipmimonitoring_legacy_output_count) cmd_args->ipmimonitoring_legacy_output = config_file_data.ipmimonitoring_legacy_output; } static void _ipmi_sensors_args_validate (struct ipmi_sensors_arguments *cmd_args) { assert (cmd_args); if (cmd_args->sensor_types_length) { if (valid_sensor_types (cmd_args->sensor_types, cmd_args->sensor_types_length) < 0) exit (EXIT_FAILURE); } if (cmd_args->exclude_sensor_types_length) { if (valid_sensor_types (cmd_args->exclude_sensor_types, cmd_args->exclude_sensor_types_length) < 0) exit (EXIT_FAILURE); } } void ipmi_sensors_argp_parse (int argc, char **argv, struct ipmi_sensors_arguments *cmd_args) { unsigned int i; assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_operator (&(cmd_args->common_args)); cmd_args->verbose_count = 0; cmd_args->sdr_info = 0; cmd_args->quiet_readings = 0; memset (cmd_args->record_ids, '\0', sizeof (unsigned int) * MAX_SENSOR_RECORD_IDS); cmd_args->record_ids_length = 0; memset (cmd_args->exclude_record_ids, '\0', sizeof (unsigned int) * MAX_SENSOR_RECORD_IDS); cmd_args->exclude_record_ids_length = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->sensor_types_length = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->exclude_sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->exclude_sensor_types_length = 0; cmd_args->list_sensor_types = 0; cmd_args->bridge_sensors = 0; cmd_args->shared_sensors = 0; cmd_args->interpret_oem_data = 0; cmd_args->ignore_not_available_sensors = 0; cmd_args->ignore_unrecognized_events = 0; cmd_args->output_event_bitmask = 0; cmd_args->output_sensor_state = 0; cmd_args->sensor_state_config_file = NULL; cmd_args->entity_sensor_names = 0; cmd_args->output_sensor_thresholds = 0; cmd_args->no_sensor_type_output = 0; cmd_args->comma_separated_output = 0; cmd_args->no_header_output = 0; cmd_args->non_abbreviated_units = 0; cmd_args->legacy_output = 0; cmd_args->ipmimonitoring_legacy_output = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmi_sensors_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmi_sensors_args_validate (cmd_args); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-argp.h0000644002055400205540000000162713527331635021450 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_ARGP_H #define IPMI_SENSORS_ARGP_H #include "ipmi-sensors.h" void ipmi_sensors_argp_parse (int argc, char **argv, struct ipmi_sensors_arguments *cmd_args); #endif /* IPMI_SENSORS_ARGP_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-detailed-output.c0000644002055400205540000026055013527331635023625 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel.h" #include "ipmi-sensors-oem-inventec.h" #include "ipmi-sensors-oem-quanta.h" #include "ipmi-sensors-oem-wistron.h" #include "ipmi-sensors-output-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #define ALL_EVENT_MESSAGES_DISABLED "All Event Messages Disabled" #define SENSOR_SCANNING_DISABLED "Sensor Scanning Disabled" #define IPMI_SENSORS_DEVICE_TYPE_BUFLEN 1024 #define IPMI_SENSORS_IANA_LEN 1024 static char * _get_record_type_string (ipmi_sensors_state_data_t *state_data, uint8_t record_type) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); switch (record_type) { case IPMI_SDR_FORMAT_FULL_SENSOR_RECORD: return "Full Sensor Record"; case IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD: return "Compact Sensor Record"; case IPMI_SDR_FORMAT_EVENT_ONLY_RECORD: return "Event-Only Record"; case IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD: return "Entity Association Record"; case IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD: return "Device-relative Entity Association Record"; case IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD: return "Generic Device Locator Record"; case IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD: return "FRU Device Locator Record"; case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD: return "Management Controller Device Locator Record"; case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD: return "Management Controller Confirmation Record"; case IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD: return "BMC Message Channel Info Record"; case IPMI_SDR_FORMAT_OEM_RECORD: return "OEM Record"; default: break; } return "Unknown Record"; } static int _abbreviated_units_flag (ipmi_sensors_state_data_t *state_data) { assert (state_data); if (state_data->prog_data->args->legacy_output) return (0); return (state_data->prog_data->args->non_abbreviated_units); } static int _detailed_output_record_type_and_id (ipmi_sensors_state_data_t *state_data) { uint16_t record_id; uint8_t record_type; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, &record_id, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Record ID: %u\n", record_id); if (state_data->prog_data->args->verbose_count >= 2) { char *record_type_str = _get_record_type_string (state_data, record_type); pstdout_printf (state_data->pstate, "Record Type: %s (%Xh)\n", record_type_str, record_type); } return (0); } static int _detailed_output_entity_id_and_instance (ipmi_sensors_state_data_t *state_data, char *entity_id_prefix, uint8_t entity_id, uint8_t entity_instance) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); if (IPMI_ENTITY_ID_VALID (entity_id)) pstdout_printf (state_data->pstate, "%s%sEntity ID: %s (%u)\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", ipmi_entity_ids[entity_id], entity_id); else if (IPMI_ENTITY_ID_IS_CHASSIS_SPECIFIC (entity_id)) pstdout_printf (state_data->pstate, "%s%sEntity ID: Chassis Specific (%u)\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", entity_id); else if (IPMI_ENTITY_ID_IS_BOARD_SET_SPECIFIC (entity_id)) pstdout_printf (state_data->pstate, "%s%sEntity ID: Board-Set Specific (%u)\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", entity_id); else if (IPMI_ENTITY_ID_IS_OEM_SYSTEM_INTEGRATOR_DEFINED (entity_id)) pstdout_printf (state_data->pstate, "%s%sEntity ID: OEM System Integrator (%u)\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", entity_id); else pstdout_printf (state_data->pstate, "%s%sEntity ID: %u\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", entity_id); pstdout_printf (state_data->pstate, "%s%sEntity Instance: %u\n", (entity_id_prefix) ? entity_id_prefix : "", (entity_id_prefix) ? " " : "", entity_instance); return (0); } static int _detailed_output_header (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; uint8_t sensor_type; uint8_t event_reading_type_code; uint8_t sensor_owner_id_type, sensor_owner_id; uint8_t sensor_owner_lun, channel_number; uint8_t entity_id, entity_instance, entity_instance_type; const char *sensor_type_string = NULL; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_id_string (state_data->sdr_ctx, NULL, 0, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_sensor_owner_id (state_data->sdr_ctx, NULL, 0, &sensor_owner_id_type, &sensor_owner_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_owner_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_sensor_owner_lun (state_data->sdr_ctx, NULL, 0, &sensor_owner_lun, &channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_owner_lun: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, NULL, 0, &entity_id, &entity_instance, &entity_instance_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_id_instance_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); pstdout_printf (state_data->pstate, "ID String: %s\n", id_string); if (state_data->prog_data->args->interpret_oem_data) sensor_type_string = get_oem_sensor_type_output_string (sensor_type, event_reading_type_code, state_data->oem_data.manufacturer_id, state_data->oem_data.product_id); else sensor_type_string = get_sensor_type_output_string (sensor_type); pstdout_printf (state_data->pstate, "Sensor Type: %s (%Xh)\n", sensor_type_string, sensor_type); pstdout_printf (state_data->pstate, "Sensor Number: %u\n", sensor_number); if (sensor_owner_id_type) pstdout_printf (state_data->pstate, "System Software ID: %Xh\n", sensor_owner_id); else pstdout_printf (state_data->pstate, "IPMB Slave Address: %Xh\n", sensor_owner_id); pstdout_printf (state_data->pstate, "Sensor Owner ID: %Xh\n", (sensor_owner_id << 1) | sensor_owner_id_type); pstdout_printf (state_data->pstate, "Sensor Owner LUN: %Xh\n", sensor_owner_lun); pstdout_printf (state_data->pstate, "Channel Number: %Xh\n", channel_number); if (_detailed_output_entity_id_and_instance (state_data, NULL, entity_id, entity_instance) < 0) return (-1); pstdout_printf (state_data->pstate, "Entity Instance Type: %s\n", (entity_instance_type == IPMI_SDR_PHYSICAL_ENTITY) ? "Physical Entity" : "Logical Container Entity"); pstdout_printf (state_data->pstate, "Event/Reading Type Code: %Xh\n", event_reading_type_code); return (0); } static int _detailed_output_thresholds (ipmi_sensors_state_data_t *state_data, const char *sensor_units_str) { double *lower_non_critical_threshold = NULL; double *lower_critical_threshold = NULL; double *lower_non_recoverable_threshold = NULL; double *upper_non_critical_threshold = NULL; double *upper_critical_threshold = NULL; double *upper_non_recoverable_threshold = NULL; int rv = -1; assert (state_data); assert (sensor_units_str); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sensors_get_thresholds (state_data, &lower_non_critical_threshold, &lower_critical_threshold, &lower_non_recoverable_threshold, &upper_non_critical_threshold, &upper_critical_threshold, &upper_non_recoverable_threshold) < 0) goto cleanup; /* don't output at all if there isn't atleast 1 threshold to output */ if (!lower_critical_threshold && !upper_critical_threshold && !lower_non_critical_threshold && !upper_non_critical_threshold && !lower_non_recoverable_threshold && !upper_non_recoverable_threshold) { rv = 0; goto cleanup; } if (lower_critical_threshold) pstdout_printf (state_data->pstate, "Lower Critical Threshold: %f %s\n", *lower_critical_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Lower Critical Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (upper_critical_threshold) pstdout_printf (state_data->pstate, "Upper Critical Threshold: %f %s\n", *upper_critical_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Upper Critical Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (lower_non_critical_threshold) pstdout_printf (state_data->pstate, "Lower Non-Critical Threshold: %f %s\n", *lower_non_critical_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Lower Non-Critical Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (upper_non_critical_threshold) pstdout_printf (state_data->pstate, "Upper Non-Critical Threshold: %f %s\n", *upper_non_critical_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Upper Non-Critical Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (lower_non_recoverable_threshold) pstdout_printf (state_data->pstate, "Lower Non-Recoverable Threshold: %f %s\n", *lower_non_recoverable_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Lower Non-Recoverable Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (upper_non_recoverable_threshold) pstdout_printf (state_data->pstate, "Upper Non-Recoverable Threshold: %f %s\n", *upper_non_recoverable_threshold, sensor_units_str); else pstdout_printf (state_data->pstate, "Upper Non-Recoverable Threshold: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); rv = 0; cleanup: free (lower_non_critical_threshold); free (lower_critical_threshold); free (lower_non_recoverable_threshold); free (upper_non_critical_threshold); free (upper_critical_threshold); free (upper_non_recoverable_threshold); return (rv); } static int _detailed_output_sensor_reading_ranges (ipmi_sensors_state_data_t *state_data, const char *sensor_units_str) { uint8_t nominal_reading_specified = 0; uint8_t normal_maximum_specified = 0; uint8_t normal_minimum_specified = 0; double *nominal_reading = NULL; double *normal_maximum = NULL; double *normal_minimum = NULL; double *sensor_maximum_reading = NULL; double *sensor_minimum_reading = NULL; int rv = -1; assert (state_data); assert (sensor_units_str); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sdr_parse_sensor_reading_ranges_specified (state_data->sdr_ctx, NULL, 0, &nominal_reading_specified, &normal_maximum_specified, &normal_minimum_specified) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_reading_ranges_specified: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_reading_ranges (state_data->sdr_ctx, NULL, 0, (nominal_reading_specified) ? &nominal_reading : NULL, (normal_maximum_specified) ? &normal_maximum : NULL, (normal_minimum_specified) ? &normal_minimum : NULL, &sensor_maximum_reading, &sensor_minimum_reading) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) == IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_reading_ranges: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* don't output at all if there isn't atleast 1 threshold to output */ if (!sensor_minimum_reading && !sensor_maximum_reading && !normal_minimum && !normal_maximum && !nominal_reading) { rv = 0; goto cleanup; } if (sensor_minimum_reading) pstdout_printf (state_data->pstate, "Sensor Min. Reading: %f %s\n", *sensor_minimum_reading, sensor_units_str); else pstdout_printf (state_data->pstate, "Sensor Min. Reading: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (sensor_maximum_reading) pstdout_printf (state_data->pstate, "Sensor Max. Reading: %f %s\n", *sensor_maximum_reading, sensor_units_str); else pstdout_printf (state_data->pstate, "Sensor Max. Reading: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (normal_minimum) pstdout_printf (state_data->pstate, "Normal Min.: %f %s\n", *normal_minimum, sensor_units_str); else pstdout_printf (state_data->pstate, "Normal Min.: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (normal_maximum) pstdout_printf (state_data->pstate, "Normal Max.: %f %s\n", *normal_maximum, sensor_units_str); else pstdout_printf (state_data->pstate, "Normal Max.: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (nominal_reading) pstdout_printf (state_data->pstate, "Nominal Reading: %f %s\n", *nominal_reading, sensor_units_str); else pstdout_printf (state_data->pstate, "Nominal Reading: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); rv = 0; cleanup: free (nominal_reading); free (normal_maximum); free (normal_minimum); free (sensor_maximum_reading); free (sensor_minimum_reading); return (rv); } static int _detailed_output_sensor_direction (ipmi_sensors_state_data_t *state_data) { uint8_t sensor_direction = 0; int rv = -1; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_sensor_direction (state_data->sdr_ctx, NULL, 0, &sensor_direction) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_direction: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (sensor_direction == IPMI_SDR_SENSOR_DIRECTION_INPUT) pstdout_printf (state_data->pstate, "Sensor Direction: Input\n"); else if (sensor_direction == IPMI_SDR_SENSOR_DIRECTION_OUTPUT) pstdout_printf (state_data->pstate, "Sensor Direction: Output\n"); else pstdout_printf (state_data->pstate, "Sensor Direction: Unspecified\n"); rv = 0; cleanup: return (rv); } static int _detailed_output_tolerance (ipmi_sensors_state_data_t *state_data, const char *sensor_units_str) { double *tolerance = NULL; int rv = -1; assert (state_data); assert (sensor_units_str); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_tolerance (state_data->sdr_ctx, NULL, 0, &tolerance) < 0) { if (ipmi_sdr_ctx_errnum (state_data->sdr_ctx) == IPMI_SDR_ERR_PARSE_CANNOT_PARSE_OR_CALCULATE) { rv = 0; goto cleanup; } pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_tolerance: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (tolerance) { pstdout_printf (state_data->pstate, "Tolerance: %f %s\n", *tolerance, sensor_units_str); } else pstdout_printf (state_data->pstate, "Tolerance: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); rv = 0; cleanup: free (tolerance); return (rv); } static int _detailed_output_resolution (ipmi_sensors_state_data_t *state_data, const char *sensor_units_str) { int8_t r_exponent; int16_t m; double resolution = 0.0; int rv = -1; assert (state_data); assert (sensor_units_str); assert (state_data->prog_data->args->verbose_count >= 2); /* achu: resolution is calculated using the decoding data, nothing * else in the SDR is read/required. See section 36.4.2 in the * spec. */ if (ipmi_sdr_parse_sensor_decoding_data (state_data->sdr_ctx, NULL, 0, &r_exponent, NULL, &m, NULL, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_decoding_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sensor_decode_resolution (r_exponent, m, &resolution) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_resolution: %s\n", strerror (errno)); goto cleanup; } pstdout_printf (state_data->pstate, "Resolution: %f %s\n", resolution, sensor_units_str); rv = 0; cleanup: return (rv); } static int _detailed_output_accuracy (ipmi_sensors_state_data_t *state_data) { double *accuracy = NULL; int rv = -1; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_accuracy (state_data->sdr_ctx, NULL, 0, &accuracy) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_accuracy: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (accuracy) pstdout_printf (state_data->pstate, "Accuracy: %f%\n", *accuracy); else pstdout_printf (state_data->pstate, "Accuracy: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); rv = 0; cleanup: free (accuracy); return (rv); } static int _detailed_output_hysteresis (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number) { fiid_obj_t obj_cmd_rs = NULL; uint8_t record_type; uint8_t positive_going_threshold_hysteresis_raw = 0; uint8_t negative_going_threshold_hysteresis_raw = 0; char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; uint8_t hysteresis_support; uint64_t val; int rv = -1; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); /* achu: first lets check if we have anything to output */ if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, NULL, NULL, &hysteresis_support, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_reading_ranges: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (hysteresis_support == IPMI_SDR_NO_HYSTERESIS_SUPPORT || hysteresis_support == IPMI_SDR_FIXED_UNREADABLE_HYSTERESIS_SUPPORT) { rv = 0; goto cleanup; } /* achu: * * I will admit I'm not entirely sure what the best way is to get * hysteresis. It seems the information is stored/retrievable in * the SDR and through an IPMI command. * * We will try to read it via IPMI like we do with thresholds, since * a change to the hysteresis may not be written to the SDR. */ memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, _abbreviated_units_flag (state_data)) < 0) goto cleanup; if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_hysteresis_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sensor_hysteresis (state_data->ipmi_ctx, sensor_number, IPMI_SENSOR_HYSTERESIS_MASK, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_hysteresis: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if ((ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1)) || (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1))) { /* The hysteresis cannot be gathered for one reason or * another, maybe b/c its a OEM sensor or something. Output * "NA" stuff in output_raw. */ goto output_raw; } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "positive_going_threshold_hysteresis_value", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'positive_going_threshold_hysteresis_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } positive_going_threshold_hysteresis_raw = val; if (FIID_OBJ_GET (obj_cmd_rs, "negative_going_threshold_hysteresis_value", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'negative_going_threshold_hysteresis_value': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } negative_going_threshold_hysteresis_raw = val; /* achu: Well, compact records don't have the values to compute a * hysteresis value. Perhaps that's a typo in the spec? We just * output the integer values? That's the best guess I can make. */ if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (record_type == IPMI_SDR_FORMAT_FULL_SENSOR_RECORD) { double positive_going_threshold_hysteresis_real; double negative_going_threshold_hysteresis_real; if (positive_going_threshold_hysteresis_raw || negative_going_threshold_hysteresis_raw) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; if (ipmi_sdr_parse_sensor_decoding_data (state_data->sdr_ctx, NULL, 0, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_decoding_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* if the sensor is not analog, this is most likely a bug in the * SDR, since we shouldn't be decoding a non-threshold sensor. * * Don't return an error. Output integer value. */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) goto output_raw; /* if the sensor is non-linear, I just don't know what to do * * Don't return an error. Output integer value. */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) goto output_raw; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, positive_going_threshold_hysteresis_raw, &positive_going_threshold_hysteresis_real) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, negative_going_threshold_hysteresis_raw, &negative_going_threshold_hysteresis_real) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } } if (positive_going_threshold_hysteresis_raw) pstdout_printf (state_data->pstate, "Positive Hysteresis: %f %s\n", positive_going_threshold_hysteresis_real, sensor_units_buf); else pstdout_printf (state_data->pstate, "Positive Hysteresis: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (negative_going_threshold_hysteresis_raw) pstdout_printf (state_data->pstate, "Negative Hysteresis: %f %s\n", negative_going_threshold_hysteresis_real, sensor_units_buf); else pstdout_printf (state_data->pstate, "Negative Hysteresis: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); } else { output_raw: if (positive_going_threshold_hysteresis_raw) pstdout_printf (state_data->pstate, "Positive Hysteresis: %u %s\n", positive_going_threshold_hysteresis_raw, sensor_units_buf); else pstdout_printf (state_data->pstate, "Positive Hysteresis: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); if (negative_going_threshold_hysteresis_raw) pstdout_printf (state_data->pstate, "Negative Hysteresis: %u %s\n", negative_going_threshold_hysteresis_raw, sensor_units_buf); else pstdout_printf (state_data->pstate, "Negative Hysteresis: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); } rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _detailed_output_event_enable (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number) { fiid_obj_t obj_cmd_rs = NULL; int event_reading_type_code_class; uint64_t val; uint8_t event_reading_type_code; uint8_t sensor_type; uint8_t all_event_messages; uint8_t scanning_on_this_sensor; uint16_t event_bitmask; char **assertion_event_message_list = NULL; unsigned int assertion_event_message_list_len = 0; char **deassertion_event_message_list = NULL; unsigned int deassertion_event_message_list_len = 0; uint32_t manufacturer_id = 0; uint16_t product_id = 0; unsigned int event_message_flags = IPMI_GET_EVENT_MESSAGES_FLAGS_DEFAULT; unsigned int i; int field_flag; int rv = -1; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); /* achu: * * I will admit I'm not entirely sure what the best way is to get * event enables. It seems the information is stored/retrievable in * the SDR and through an IPMI command. * * We will try to read it via IPMI like we do with thresholds, since * a change to the event enables may not be written to the SDR. */ if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD && event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE && event_reading_type_code_class != IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Cannot handle event enables for event type reading code: 0x%X\n", event_reading_type_code); rv = 0; goto cleanup; } if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE) { if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_event_enable_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sensor_event_enable (state_data->ipmi_ctx, sensor_number, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_event_enable: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_RESPONSE_COULD_NOT_BE_PROVIDED) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_DESTINATION_UNAVAILABLE))) { /* The event enables cannot be gathered for one reason or * another, maybe b/c its a OEM sensor or something. Just * don't output this info. */ rv = 0; goto cleanup; } goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "all_event_messages", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'all_event_messages': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } all_event_messages = val; if (all_event_messages == IPMI_SENSOR_ALL_EVENT_MESSAGES_DISABLE) { if (state_data->prog_data->args->legacy_output) { pstdout_printf (state_data->pstate, "%s[%s]\n", IPMI_SENSORS_ASSERTION_EVENT_PREFIX_LEGACY, ALL_EVENT_MESSAGES_DISABLED); pstdout_printf (state_data->pstate, "%s[%s]\n", IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_LEGACY, ALL_EVENT_MESSAGES_DISABLED); } else { pstdout_printf (state_data->pstate, "%s%s\n", IPMI_SENSORS_ASSERTION_EVENT_PREFIX, ALL_EVENT_MESSAGES_DISABLED); pstdout_printf (state_data->pstate, "%s%s\n", IPMI_SENSORS_DEASSERTION_EVENT_PREFIX, ALL_EVENT_MESSAGES_DISABLED); } rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "scanning_on_this_sensor", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'scanning_on_this_sensor': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } scanning_on_this_sensor = val; if (scanning_on_this_sensor == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) { if (state_data->prog_data->args->legacy_output) { pstdout_printf (state_data->pstate, "%s[%s]\n", IPMI_SENSORS_ASSERTION_EVENT_PREFIX_LEGACY, SENSOR_SCANNING_DISABLED); pstdout_printf (state_data->pstate, "%s[%s]\n", IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_LEGACY, SENSOR_SCANNING_DISABLED); } rv = 0; goto cleanup; } if (!state_data->prog_data->args->verbose_count) event_message_flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_SHORT; if (state_data->prog_data->args->interpret_oem_data) { manufacturer_id = state_data->oem_data.manufacturer_id; product_id = state_data->oem_data.product_id; event_message_flags |= IPMI_GET_EVENT_MESSAGES_FLAGS_INTERPRET_OEM_DATA; } /* achu: According to the spec, bytes 3-6 of the packet should exist * if all event messages are not disabled and sensor scanning is not * disabled. */ if ((field_flag = fiid_obj_get (obj_cmd_rs, "assertion_event_bitmask", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'assertion_event_bitmask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } event_bitmask = val; if (field_flag) { if (ipmi_get_event_messages (event_reading_type_code, sensor_type, sensor_number, event_bitmask, manufacturer_id, product_id, &assertion_event_message_list, &assertion_event_message_list_len, IPMI_SENSORS_NONE_STRING, event_message_flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_event_messages: %s\n", strerror (errno)); goto cleanup; } if (ipmi_sensors_output_event_message_list (state_data, IPMI_SENSORS_EVENT_NORMAL, event_bitmask, assertion_event_message_list, assertion_event_message_list_len, IPMI_SENSORS_ASSERTION_EVENT_PREFIX_OUTPUT, 1) < 0) goto cleanup; } if ((field_flag = fiid_obj_get (obj_cmd_rs, "deassertion_event_bitmask", &val)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'deassertion_event_bitmask': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } event_bitmask = val; if (field_flag) { if (ipmi_get_event_messages (event_reading_type_code, sensor_type, sensor_number, event_bitmask, manufacturer_id, product_id, &deassertion_event_message_list, &deassertion_event_message_list_len, IPMI_SENSORS_NONE_STRING, event_message_flags) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_get_event_messages: %s\n", strerror (errno)); goto cleanup; } if (ipmi_sensors_output_event_message_list (state_data, IPMI_SENSORS_EVENT_NORMAL, event_bitmask, deassertion_event_message_list, deassertion_event_message_list_len, IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_OUTPUT, 1) < 0) goto cleanup; } rv = 0; cleanup: if (assertion_event_message_list) { for (i = 0; i < assertion_event_message_list_len; i++) free (assertion_event_message_list[i]); free (assertion_event_message_list); } if (deassertion_event_message_list) { for (i = 0; i < deassertion_event_message_list_len; i++) free (deassertion_event_message_list[i]); free (deassertion_event_message_list); } fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _detailed_output_event_message_list (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, IPMI_SENSORS_SENSOR_EVENT_PREFIX_OUTPUT, 1) < 0) return (-1); return (0); } static char * _linearization_string (ipmi_sensors_state_data_t *state_data, uint8_t linearization) { switch (linearization) { case IPMI_SDR_LINEARIZATION_LINEAR: return (IPMI_SDR_LINEARIZATION_LINEAR_STRING); case IPMI_SDR_LINEARIZATION_LN: return (IPMI_SDR_LINEARIZATION_LN_STRING); case IPMI_SDR_LINEARIZATION_LOG10: return (IPMI_SDR_LINEARIZATION_LOG10_STRING); case IPMI_SDR_LINEARIZATION_LOG2: return (IPMI_SDR_LINEARIZATION_LOG2_STRING); case IPMI_SDR_LINEARIZATION_E: return (IPMI_SDR_LINEARIZATION_E_STRING); case IPMI_SDR_LINEARIZATION_EXP10: return (IPMI_SDR_LINEARIZATION_EXP10_STRING); case IPMI_SDR_LINEARIZATION_EXP2: return (IPMI_SDR_LINEARIZATION_EXP2_STRING); case IPMI_SDR_LINEARIZATION_INVERSE: return (IPMI_SDR_LINEARIZATION_INVERSE_STRING); case IPMI_SDR_LINEARIZATION_SQR: return (IPMI_SDR_LINEARIZATION_SQR_STRING); case IPMI_SDR_LINEARIZATION_CUBE: return (IPMI_SDR_LINEARIZATION_CUBE_STRING); case IPMI_SDR_LINEARIZATION_SQRT: return (IPMI_SDR_LINEARIZATION_SQRT_STRING); case IPMI_SDR_LINEARIZATION_CUBERT: return (IPMI_SDR_LINEARIZATION_CUBERT_STRING); default: break; } return (IPMI_SDR_LINEARIZATION_NON_LINEAR_STRING); } static char * _analog_data_format_string (ipmi_sensors_state_data_t *state_data, uint8_t analog_data_format) { switch (analog_data_format) { case IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED: return (IPMI_SDR_ANALOG_DATA_FORMAT_UNSIGNED_STRING); case IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT: return (IPMI_SDR_ANALOG_DATA_FORMAT_1S_COMPLEMENT_STRING); case IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT: return (IPMI_SDR_ANALOG_DATA_FORMAT_2S_COMPLEMENT_STRING); default: break; } return (IPMI_SDR_ANALOG_DATA_FORMAT_NOT_ANALOG_STRING); } static int _detailed_output_sensor_state (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask) { assert (state_data); if (state_data->prog_data->args->output_sensor_state) { char *sensor_state_str = NULL; if (ipmi_sensors_get_sensor_state (state_data, event_message_output_type, sensor_event_bitmask, &sensor_state_str) < 0) return (-1); pstdout_printf (state_data->pstate, "Sensor State: %s\n", sensor_state_str); } return (0); } static int _detailed_output_full_record (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { uint8_t event_reading_type_code; int event_reading_type_code_class; char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); assert (state_data->prog_data->args->verbose_count >= 1); if (_detailed_output_header (state_data, sensor_number) < 0) return (-1); if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, _abbreviated_units_flag (state_data)) < 0) return (-1); event_reading_type_code_class = ipmi_event_reading_type_code_class (event_reading_type_code); if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) { if (state_data->prog_data->args->verbose_count >= 2) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; if (ipmi_sdr_parse_sensor_decoding_data (state_data->sdr_ctx, NULL, 0, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_decoding_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "B: %d\n", b); pstdout_printf (state_data->pstate, "M: %d\n", m); pstdout_printf (state_data->pstate, "R Exponent: %d\n", r_exponent); pstdout_printf (state_data->pstate, "B Exponent: %d\n", b_exponent); pstdout_printf (state_data->pstate, "Linearization: %s (%Xh)\n", _linearization_string (state_data, linearization), linearization); pstdout_printf (state_data->pstate, "Analog Data Format: %s (%Xh)\n", _analog_data_format_string (state_data, analog_data_format), analog_data_format); if (_detailed_output_tolerance (state_data, sensor_units_buf) < 0) return (-1); if (_detailed_output_resolution (state_data, sensor_units_buf) < 0) return (-1); } if (_detailed_output_thresholds (state_data, sensor_units_buf) < 0) return (-1); if (_detailed_output_sensor_reading_ranges (state_data, sensor_units_buf) < 0) return (-1); } if (state_data->prog_data->args->verbose_count >= 2) { if (_detailed_output_accuracy (state_data) < 0) return (-1); if (_detailed_output_sensor_direction (state_data) < 0) return (-1); if (_detailed_output_hysteresis (state_data, sensor_number) < 0) return (-1); if (_detailed_output_event_enable (state_data, sensor_number) < 0) return (-1); } if (_detailed_output_sensor_state (state_data, event_message_output_type, sensor_event_bitmask) < 0) return (-1); if (state_data->prog_data->args->legacy_output) { if (sensor_reading) pstdout_printf (state_data->pstate, "Sensor Reading: %f %s\n", *sensor_reading, sensor_units_buf); else pstdout_printf (state_data->pstate, "Sensor Reading: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); } else { /* no need to output "N/A" for discrete sensors */ if (sensor_reading) pstdout_printf (state_data->pstate, "Sensor Reading: %f %s\n", *sensor_reading, sensor_units_buf); else if (event_reading_type_code_class == IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD) pstdout_printf (state_data->pstate, "Sensor Reading: %s\n", IPMI_SENSORS_NA_STRING_OUTPUT); } if (_detailed_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_compact_record (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); assert (state_data->prog_data->args->verbose_count >= 1); if (_detailed_output_header (state_data, sensor_number) < 0) return (-1); if (state_data->prog_data->args->verbose_count >= 2) { uint8_t share_count; uint8_t id_string_instance_modifier_type; uint8_t id_string_instance_modifier_offset; uint8_t entity_instance_sharing; if (_detailed_output_sensor_direction (state_data) < 0) return (-1); if (_detailed_output_hysteresis (state_data, sensor_number) < 0) return (-1); if (_detailed_output_event_enable (state_data, sensor_number) < 0) return (-1); if (ipmi_sdr_parse_sensor_record_sharing (state_data->sdr_ctx, NULL, 0, &share_count, &id_string_instance_modifier_type, &id_string_instance_modifier_offset, &entity_instance_sharing) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_record_sharing: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Share Count: %u\n", share_count); if (id_string_instance_modifier_type == IPMI_SDR_ID_STRING_INSTANCE_MODIFIER_TYPE_ALPHA) pstdout_printf (state_data->pstate, "ID String Instance Modifier Type: Alpha\n"); else pstdout_printf (state_data->pstate, "ID String Instance Modifier Type: Numeric\n"); pstdout_printf (state_data->pstate, "ID String Instance Modifier Offset: %u\n", id_string_instance_modifier_offset); if (entity_instance_sharing == IPMI_SDR_ENTITY_INSTANCE_INCREMENTS_FOR_EACH_SHARED_RECORD) pstdout_printf (state_data->pstate, "Entity Instance Sharing: Increments for reach shared record\n"); else pstdout_printf (state_data->pstate, "Entity Instance Sharing: Same for all records\n"); } if (_detailed_output_sensor_state (state_data, event_message_output_type, sensor_event_bitmask) < 0) return (-1); if (_detailed_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_event_only_record (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 1); if (_detailed_output_header (state_data, sensor_number) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_entity_association_record (ipmi_sensors_state_data_t *state_data) { uint8_t container_entity_id; uint8_t container_entity_instance; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_container_entity (state_data->sdr_ctx, NULL, 0, &container_entity_id, &container_entity_instance) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_container_entity: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); if (_detailed_output_entity_id_and_instance (state_data, "Container", container_entity_id, container_entity_instance) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_device_relative_entity_association_record (ipmi_sensors_state_data_t *state_data) { uint8_t container_entity_id; uint8_t container_entity_instance; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_container_entity (state_data->sdr_ctx, NULL, 0, &container_entity_id, &container_entity_instance) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_container_entity: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); if (_detailed_output_entity_id_and_instance (state_data, "Container", container_entity_id, container_entity_instance) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_header2 (ipmi_sensors_state_data_t *state_data) { char device_id_string[IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1]; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); memset (device_id_string, '\0', IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_device_id_string (state_data->sdr_ctx, NULL, 0, device_id_string, IPMI_SDR_MAX_DEVICE_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); pstdout_printf (state_data->pstate, "Device ID String: %s\n", device_id_string); return (0); } static int _output_device_type_and_modifier (ipmi_sensors_state_data_t *state_data) { uint8_t device_type; uint8_t device_type_modifier; char device_type_modifier_buf[IPMI_SENSORS_DEVICE_TYPE_BUFLEN + 1]; int len; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_device_type (state_data->sdr_ctx, NULL, 0, &device_type, &device_type_modifier) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_device_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (IPMI_DEVICE_TYPE_VALID (device_type)) pstdout_printf (state_data->pstate, "Device Type: %s (%Xh)\n", ipmi_device_types[device_type], device_type); else if (IPMI_DEVICE_TYPE_IS_OEM (device_type)) pstdout_printf (state_data->pstate, "Device Type: %s (%Xh)\n", ipmi_oem_device_type, device_type); else pstdout_printf (state_data->pstate, "Device Type: %Xh\n", device_type); memset (device_type_modifier_buf, '\0', IPMI_SENSORS_DEVICE_TYPE_BUFLEN + 1); if ((len = ipmi_device_type_modifer_message (device_type, device_type_modifier, device_type_modifier_buf, IPMI_SENSORS_DEVICE_TYPE_BUFLEN)) < 0) { /* assume invalid device type and/or modifier */ pstdout_printf (state_data->pstate, "Device Type Modifier: %Xh\n", device_type_modifier); return (0); } if (len) pstdout_printf (state_data->pstate, "Device Type Modifier: %s (%Xh)\n", device_type_modifier_buf, device_type_modifier); else pstdout_printf (state_data->pstate, "Device Type Modifier: %Xh\n", device_type_modifier); return (0); } static int _output_entity_id_and_instance (ipmi_sensors_state_data_t *state_data) { uint8_t entity_id; uint8_t entity_instance; uint8_t entity_instance_type; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_entity_id_instance_type (state_data->sdr_ctx, NULL, 0, &entity_id, &entity_instance, &entity_instance_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_id_and_instance: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_entity_id_and_instance (state_data, NULL, entity_id, entity_instance) < 0) return (-1); pstdout_printf (state_data->pstate, "Entity Instance Type: %s\n", (entity_instance_type == IPMI_SDR_PHYSICAL_ENTITY) ? "Physical Entity" : "Logical Container Entity"); return (0); } static int _detailed_output_generic_device_locator_record (ipmi_sensors_state_data_t *state_data) { uint8_t device_access_address; uint8_t channel_number; uint8_t device_slave_address; uint8_t private_bus_id; uint8_t lun_for_master_write_read_command; uint8_t address_span; uint8_t oem; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_header2 (state_data) < 0) return (-1); if (ipmi_sdr_parse_generic_device_locator_parameters (state_data->sdr_ctx, NULL, 0, &device_access_address, &channel_number, &device_slave_address, &private_bus_id, &lun_for_master_write_read_command, &address_span, &oem) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_generic_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Device Access Address: %Xh\n", device_access_address); pstdout_printf (state_data->pstate, "Channel Number: %Xh\n", channel_number); pstdout_printf (state_data->pstate, "Direct Slave Address: %Xh\n", device_slave_address); pstdout_printf (state_data->pstate, "Private Bus ID: %Xh\n", private_bus_id); pstdout_printf (state_data->pstate, "LUN for Master Write-Read Command: %Xh\n", lun_for_master_write_read_command); pstdout_printf (state_data->pstate, "Address Span: %u\n", address_span); pstdout_printf (state_data->pstate, "OEM: %Xh\n", oem); if (_output_device_type_and_modifier (state_data) < 0) return (-1); if (_output_entity_id_and_instance (state_data) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_fru_device_locator_record (ipmi_sensors_state_data_t *state_data) { uint8_t device_access_address; uint8_t logical_fru_device_device_slave_address; uint8_t private_bus_id; uint8_t lun_for_master_write_read_fru_command; uint8_t logical_physical_fru_device; uint8_t channel_number; uint8_t fru_entity_id; uint8_t fru_entity_instance; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_header2 (state_data) < 0) return (-1); if (ipmi_sdr_parse_fru_device_locator_parameters (state_data->sdr_ctx, NULL, 0, &device_access_address, &logical_fru_device_device_slave_address, &private_bus_id, &lun_for_master_write_read_fru_command, &logical_physical_fru_device, &channel_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_generic_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Device Access Address: %Xh\n", device_access_address); if (logical_physical_fru_device) pstdout_printf (state_data->pstate, "FRU Device ID: %Xh\n", logical_fru_device_device_slave_address); else pstdout_printf (state_data->pstate, "Device Slave Address: %Xh\n", logical_fru_device_device_slave_address); pstdout_printf (state_data->pstate, "Private Bus ID: %Xh\n", private_bus_id); pstdout_printf (state_data->pstate, "LUN for Master Write-Read or FRU Command: %Xh\n", lun_for_master_write_read_fru_command); pstdout_printf (state_data->pstate, "Channel Number: %Xh\n", channel_number); if (_output_device_type_and_modifier (state_data) < 0) return (-1); if (ipmi_sdr_parse_fru_entity_id_and_instance (state_data->sdr_ctx, NULL, 0, &fru_entity_id, &fru_entity_instance) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_fru_entity_id_and_instance: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (_detailed_output_entity_id_and_instance (state_data, "FRU", fru_entity_id, fru_entity_instance) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_management_controller_device_locator_record (ipmi_sensors_state_data_t *state_data) { uint8_t device_slave_address; uint8_t channel_number; uint8_t device_capabilities_sensor_device; uint8_t device_capabilities_sdr_repository_device; uint8_t device_capabilities_sel_device; uint8_t device_capabilities_fru_inventory_device; uint8_t device_capabilities_ipmb_event_receiver; uint8_t device_capabilities_ipmb_event_generator; uint8_t device_capabilities_bridge; uint8_t device_capabilities_chassis_device; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_header2 (state_data) < 0) return (-1); if (ipmi_sdr_parse_management_controller_device_locator_parameters (state_data->sdr_ctx, NULL, 0, &device_slave_address, &channel_number, NULL, NULL, NULL, NULL, NULL, NULL, &device_capabilities_sensor_device, &device_capabilities_sdr_repository_device, &device_capabilities_sel_device, &device_capabilities_fru_inventory_device, &device_capabilities_ipmb_event_receiver, &device_capabilities_ipmb_event_generator, &device_capabilities_bridge, &device_capabilities_chassis_device) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_management_controller_device_locator_parameters: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Device Slave Address: %Xh\n", device_slave_address); pstdout_printf (state_data->pstate, "Channel Number: %Xh\n", channel_number); pstdout_printf (state_data->pstate, "Sensor Device: %s\n", device_capabilities_sensor_device ? "Yes" : "No"); pstdout_printf (state_data->pstate, "SDR Repository Device: %s\n", device_capabilities_sdr_repository_device ? "Yes" : "No"); pstdout_printf (state_data->pstate, "SEL Device: %s\n", device_capabilities_sel_device ? "Yes" : "No"); pstdout_printf (state_data->pstate, "FRU Inventory Device: %s\n", device_capabilities_fru_inventory_device ? "Yes" : "No"); pstdout_printf (state_data->pstate, "IPMB Event Receiver: %s\n", device_capabilities_ipmb_event_receiver ? "Yes" : "No"); pstdout_printf (state_data->pstate, "IPMB Event Generator: %s\n", device_capabilities_ipmb_event_generator ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Bridge Support: %s\n", device_capabilities_bridge ? "Yes" : "No"); pstdout_printf (state_data->pstate, "Chassis Device: %s\n", device_capabilities_chassis_device ? "Yes" : "No"); if (_output_entity_id_and_instance (state_data) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _output_manufacturer_id (ipmi_sensors_state_data_t *state_data) { uint32_t manufacturer_id; char iana_buf[IPMI_SENSORS_IANA_LEN + 1]; int ret; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (ipmi_sdr_parse_manufacturer_id (state_data->sdr_ctx, NULL, 0, &manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_manufacturer_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } memset (iana_buf, '\0', IPMI_SENSORS_IANA_LEN + 1); /* if ret == 0 means no string, < 0 means bad manufacturer id * either way, output just the number */ ret = ipmi_iana_enterprise_numbers_string (manufacturer_id, iana_buf, IPMI_SENSORS_IANA_LEN); if (ret > 0) pstdout_printf (state_data->pstate, "Manufacturer ID: %s (%Xh)\n", iana_buf, manufacturer_id); else pstdout_printf (state_data->pstate, "Manufacturer ID: %Xh\n", manufacturer_id); return (0); } static int _detailed_output_management_controller_confirmation_record (ipmi_sensors_state_data_t *state_data) { uint16_t product_id; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); if (_output_manufacturer_id (state_data) < 0) return (-1); if (ipmi_sdr_parse_product_id (state_data->sdr_ctx, NULL, 0, &product_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_product_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } pstdout_printf (state_data->pstate, "Product ID: %Xh\n", product_id); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_bmc_message_channel_info_record (ipmi_sensors_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); pstdout_printf (state_data->pstate, "\n"); return (0); } static int _detailed_output_oem_record (ipmi_sensors_state_data_t *state_data) { uint32_t manufacturer_id; uint8_t oem_data[IPMI_SENSORS_OEM_DATA_LEN]; int len = 0; int i; assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); if (_detailed_output_record_type_and_id (state_data) < 0) return (-1); if (_output_manufacturer_id (state_data) < 0) return (-1); if (ipmi_sdr_parse_manufacturer_id (state_data->sdr_ctx, NULL, 0, &manufacturer_id) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_manufacturer_id: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if ((len = ipmi_sdr_parse_oem_data (state_data->sdr_ctx, NULL, 0, oem_data, IPMI_SENSORS_OEM_DATA_LEN)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_oem_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (len && state_data->prog_data->args->interpret_oem_data) { int ret; if (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL) { if ((ret = ipmi_sensors_oem_intel_output_oem_record (state_data, manufacturer_id, oem_data, len)) < 0) return (-1); if (ret) goto out; } if (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC) { if ((ret = ipmi_sensors_oem_inventec_output_oem_record (state_data, manufacturer_id, oem_data, len)) < 0) return (-1); if (ret) goto out; } if (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA) { if ((ret = ipmi_sensors_oem_quanta_output_oem_record (state_data, manufacturer_id, oem_data, len)) < 0) return (-1); if (ret) goto out; } if (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON) { if ((ret = ipmi_sensors_oem_wistron_output_oem_record (state_data, manufacturer_id, oem_data, len)) < 0) return (-1); if (ret) goto out; } } pstdout_printf (state_data->pstate, "OEM Data: "); for (i = 0; i < len; i++) pstdout_printf (state_data->pstate, "%02X ", oem_data[i]); pstdout_printf (state_data->pstate, "\n"); out: pstdout_printf (state_data->pstate, "\n"); return (0); } int ipmi_sensors_detailed_output (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { uint8_t record_type; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); assert (state_data->prog_data->args->verbose_count >= 1); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, NULL, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (state_data->prog_data->args->verbose_count >= 2) { switch (record_type) { case IPMI_SDR_FORMAT_FULL_SENSOR_RECORD: return (_detailed_output_full_record (state_data, sensor_number, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); case IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD: return (_detailed_output_compact_record (state_data, sensor_number, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); case IPMI_SDR_FORMAT_EVENT_ONLY_RECORD: return (_detailed_output_event_only_record (state_data, sensor_number)); case IPMI_SDR_FORMAT_ENTITY_ASSOCIATION_RECORD: return (_detailed_output_entity_association_record (state_data)); case IPMI_SDR_FORMAT_DEVICE_RELATIVE_ENTITY_ASSOCIATION_RECORD: return (_detailed_output_device_relative_entity_association_record (state_data)); case IPMI_SDR_FORMAT_GENERIC_DEVICE_LOCATOR_RECORD: return (_detailed_output_generic_device_locator_record (state_data)); case IPMI_SDR_FORMAT_FRU_DEVICE_LOCATOR_RECORD: return (_detailed_output_fru_device_locator_record (state_data)); case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_DEVICE_LOCATOR_RECORD: return (_detailed_output_management_controller_device_locator_record (state_data)); case IPMI_SDR_FORMAT_MANAGEMENT_CONTROLLER_CONFIRMATION_RECORD: return (_detailed_output_management_controller_confirmation_record (state_data)); case IPMI_SDR_FORMAT_BMC_MESSAGE_CHANNEL_INFO_RECORD: return (_detailed_output_bmc_message_channel_info_record (state_data)); case IPMI_SDR_FORMAT_OEM_RECORD: return (_detailed_output_oem_record (state_data)); default: pstdout_fprintf (state_data->pstate, stderr, "Unknown Record Type: %X\n", record_type); break; } } else { switch (record_type) { case IPMI_SDR_FORMAT_FULL_SENSOR_RECORD: return (_detailed_output_full_record (state_data, sensor_number, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); case IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD: return (_detailed_output_compact_record (state_data, sensor_number, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); case IPMI_SDR_FORMAT_EVENT_ONLY_RECORD: /* only in legacy output, I don't know why this was output * under verbose before */ if (state_data->prog_data->args->legacy_output) return (_detailed_output_event_only_record (state_data, sensor_number)); default: /* don't output any other types in verbose mode */ break; } } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-detailed-output.h0000644002055400205540000000243413527331635023625 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_DETAILED_OUTPUT_H #define IPMI_SENSORS_DETAILED_OUTPUT_H #include "ipmi-sensors.h" int ipmi_sensors_detailed_output (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len); #endif /* IPMI_SENSORS_DETAILED_OUTPUT_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel.c0000644002055400205540000001015213527331635022374 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel.h" #include "ipmi-sensors-oem-intel-s5500wb.h" #include "ipmi-sensors-oem-intel-s2600jf.h" #include "ipmi-sensors-oem-intel-quanta-qssc-s4r.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); /* * Intel S5500WB/Penguin Computing Relion 700 */ if (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S5500WB) { if ((ret = ipmi_sensors_oem_intel_s5500wb_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } /* * Intel S2600JF/Appro 512X */ if (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600JF) { if ((ret = ipmi_sensors_oem_intel_s2600jf_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } /* * Intel S2600WP/Appro 512X */ if (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600WP) { if ((ret = ipmi_sensors_oem_intel_s2600wp_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R) { if ((ret = ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel.h0000644002055400205540000000220013527331635022374 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_H #define IPMI_SENSORS_OEM_INTEL_H #include "ipmi-sensors.h" int ipmi_sensors_oem_intel_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INTEL_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-node-manager.c0000644002055400205540000001022513527331635024730 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_node_manager_output_oem_record (ipmi_sensors_state_data_t *state_data) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); if (state_data->intel_node_manager.node_manager_data_found) { uint8_t nm_device_slave_address; uint8_t sensor_owner_lun; uint8_t channel_number; uint8_t nm_health_event_sensor_number; uint8_t nm_exception_event_sensor_number; uint8_t nm_operational_capabilities_sensor_number; uint8_t nm_alert_threshold_exceeded_sensor_number; int ret; if ((ret = ipmi_sdr_oem_parse_intel_node_manager (state_data->sdr_ctx, NULL, 0, &nm_device_slave_address, &sensor_owner_lun, &channel_number, &nm_health_event_sensor_number, &nm_exception_event_sensor_number, &nm_operational_capabilities_sensor_number, &nm_alert_threshold_exceeded_sensor_number)) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_oem_parse_intel_node_manager: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ret) { pstdout_printf (state_data->pstate, "Node Manager Device Slave Address: %Xh\n", nm_device_slave_address); pstdout_printf (state_data->pstate, "Sensor Owner LUN: %Xh\n", sensor_owner_lun); pstdout_printf (state_data->pstate, "Channel Number: %Xh\n", channel_number); pstdout_printf (state_data->pstate, "Node Manager Health Event Sensor Number: %u\n", nm_health_event_sensor_number); pstdout_printf (state_data->pstate, "Node Manager Exception Event Sensor Number: %u\n", nm_exception_event_sensor_number); pstdout_printf (state_data->pstate, "Node Manager Operational Capabilities Sensor Number: %u\n", nm_operational_capabilities_sensor_number); pstdout_printf (state_data->pstate, "Node Manager Alert Threshold Exceeded Sensor Number: %u\n", nm_alert_threshold_exceeded_sensor_number); return (1); } } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-node-manager.h0000644002055400205540000000207513527331635024741 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_NODE_MANAGER_H #define IPMI_SENSORS_OEM_INTEL_NODE_MANAGER_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_node_manager_output_oem_record (ipmi_sensors_state_data_t *state_data); #endif /* IPMI_SENSORS_OEM_INTEL_NODE_MANAGER_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.c0000644002055400205540000000416513527331635023506 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel-s5500wb.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_s5500wb_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S5500WB); /* * Intel S5500WB/Penguin Computing Relion 700 */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s5500wb.h0000644002055400205540000000226013527331635023505 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_S5500WB_H #define IPMI_SENSORS_OEM_INTEL_H #include "ipmi-sensors.h" int ipmi_sensors_oem_intel_s5500wb_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INTEL_S5500WB_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.c0000644002055400205540000000414313527331635023467 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel-s2600jf.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_s2600jf_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600JF); /* * Intel S2600JF/Appro 512X */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s2600jf.h0000644002055400205540000000226013527331635023472 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_S2600JF_H #define IPMI_SENSORS_OEM_INTEL_H #include "ipmi-sensors.h" int ipmi_sensors_oem_intel_s2600jf_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INTEL_S2600JF_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.c0000644002055400205540000000413013527331635023512 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel-s2600wp.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_s2600wp_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_S2600WP); /* * Intel S2600WP */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-s2600wp.h0000644002055400205540000000226013527331635023521 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_S2600WP_H #define IPMI_SENSORS_OEM_INTEL_H #include "ipmi-sensors.h" int ipmi_sensors_oem_intel_s2600wp_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INTEL_S2600WP_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.c0000644002055400205540000003556213527331635025354 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-intel-quanta-qssc-s4r.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "ipmi-sensors-output-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" static void _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (ipmi_sensors_state_data_t *state_data, uint8_t fan_control_profile_support, unsigned int fan_control_profile_number) { assert (state_data); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); pstdout_printf (state_data->pstate, "Fan Control Profile %u Support: %s\n", fan_control_profile_number, fan_control_profile_support == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_VALID ? "Yes" : "No"); } /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL); assert (state_data->oem_data.product_id == IPMI_INTEL_PRODUCT_ID_QUANTA_QSSC_S4R); /* * Quanta QSSC-S4R/Appro GB812X-CN * (Quanta motherboard contains Intel manufacturer ID) */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); if (oem_record_manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INTEL) { uint8_t record_subtype; record_subtype = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_SUBTYPE_INDEX]; if (record_subtype == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_SUBTYPE && oem_data_len >= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_OEM_DATA_LENGTH) { uint8_t memory_throttling_mode; uint8_t fan_control_profile_support_0; uint8_t fan_control_profile_support_1; uint8_t fan_control_profile_support_2; uint8_t fan_control_profile_support_3; uint8_t fan_control_profile_support_4; uint8_t fan_control_profile_support_5; uint8_t fan_control_profile_support_6; uint8_t fan_control_profile_support_7; uint8_t tempinlet; uint8_t temprise; uint16_t airflow; uint16_t dimmpitch; uint8_t throttle_mode; uint8_t thermal_register_lock; uint8_t hysteresis; uint8_t control_event_mode; char *memory_throttling_mode_str; char *throttle_mode_str; char *hysteresis_str; char *control_event_mode_str; memory_throttling_mode = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_INDEX]; memory_throttling_mode &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_BITMASK; memory_throttling_mode >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_SHIFT; fan_control_profile_support_0 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_0 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE0_BITMASK; fan_control_profile_support_0 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE0_SHIFT; fan_control_profile_support_1 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_1 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE1_BITMASK; fan_control_profile_support_1 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE1_SHIFT; fan_control_profile_support_2 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_2 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE2_BITMASK; fan_control_profile_support_2 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE2_SHIFT; fan_control_profile_support_3 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_3 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE3_BITMASK; fan_control_profile_support_3 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE3_SHIFT; fan_control_profile_support_4 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_4 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE4_BITMASK; fan_control_profile_support_4 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE4_SHIFT; fan_control_profile_support_5 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_5 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE5_BITMASK; fan_control_profile_support_5 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE5_SHIFT; fan_control_profile_support_6 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_6 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE6_BITMASK; fan_control_profile_support_6 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE6_SHIFT; fan_control_profile_support_7 = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE_INDEX]; fan_control_profile_support_7 &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE7_BITMASK; fan_control_profile_support_7 >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_FAN_PROFILE7_SHIFT; tempinlet = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_TEMPINLET_INDEX]; temprise = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_TEMPRISE_INDEX]; airflow = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_AIRFLOW_INDEX_START]; airflow |= (oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_AIRFLOW_INDEX_START + 1] << 8); dimmpitch = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_DIMMPITCH_INDEX_START]; dimmpitch |= (oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_DIMMPITCH_INDEX_START + 1] << 8); throttle_mode = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_INDEX]; throttle_mode &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_BITMASK; throttle_mode >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_SHIFT; thermal_register_lock = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_INDEX]; thermal_register_lock &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_BITMASK; thermal_register_lock >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THERMAL_REGISTER_LOCK_SHIFT; hysteresis = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_INDEX]; hysteresis &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_BITMASK; hysteresis >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_SHIFT; control_event_mode = oem_data[IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_INDEX]; control_event_mode &= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_BITMASK; control_event_mode >>= IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_SHIFT; if (memory_throttling_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_NONE_SUPPORTED) memory_throttling_mode_str = "None Supported"; else if (memory_throttling_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_OPEN_LOOP_THROUGHPUT_THROTTLING) memory_throttling_mode_str = "Open-loop throughput throttling (OLTT)"; else if (memory_throttling_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_MEMORY_THROTTLING_MODE_CLOSE_LOOP_THERMAL_THROTTLING) memory_throttling_mode_str = "Close-loop thermal throttling (CLTT)"; else memory_throttling_mode_str = "Unspecified"; pstdout_printf (state_data->pstate, "Memory Throttling Mode: %s\n", memory_throttling_mode_str); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_0, 0); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_1, 1); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_2, 2); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_3, 3); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_4, 4); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_5, 5); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_6, 6); _ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record_fan_control_profile_support (state_data, fan_control_profile_support_7, 7); /* Stored in .5 C units */ pstdout_printf (state_data->pstate, "Temperature at Chassis Inlet: %u C\n", tempinlet/2); /* Stored in .5 C units */ pstdout_printf (state_data->pstate, "Temperature rise from Chassis Inlet to DIMM Local Ambient: %u C\n", temprise/2); /* Stored in mm/sec units */ pstdout_printf (state_data->pstate, "Average air flow velocity in DIMM channel: %u m/sec\n", (float)airflow/1000); /* Stored in 1/1000 in units */ pstdout_printf (state_data->pstate, "Pitch between DIMMS: %.2f in\n", (float)dimmpitch/1000); if (throttle_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_DISABLED) throttle_mode_str = "Disabled"; else if (throttle_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_VTS_ONLY) throttle_mode_str = "VTS Only (OLTT)"; else if (throttle_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_THROTTLE_MODE_SOFTWARE_MODE) throttle_mode_str = "Software Mode"; else throttle_mode_str = "EXTTS CLTT"; pstdout_printf (state_data->pstate, "Throttle Mode: %s\n", throttle_mode_str); pstdout_printf (state_data->pstate, "Thermal Register Lock: %s\n", thermal_register_lock ? "Enabled" : "Disabled"); if (hysteresis == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_DISABLE) hysteresis_str = "disable hysteresis"; else if (hysteresis == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_1_5C) hysteresis_str = "1.5C"; else if (hysteresis == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_HYSTERESIS_3C) hysteresis_str = "3C"; else hysteresis_str = "6C"; pstdout_printf (state_data->pstate, "Hysteresis: %s\n", hysteresis_str); if (control_event_mode == IPMI_SDR_OEM_INTEL_QUANTA_QSSC_S4R_THERMAL_PROFILE_DATA_RECORD_CONTROL_EVENT_MODE_ASSERT_NOT_ONLY_CRITICAL) control_event_mode_str = "Events asserted above high or low in addition to critical"; else control_event_mode_str = "Events asserted only if above critical"; pstdout_printf (state_data->pstate, "Control Event Mode: %s\n", control_event_mode_str); return (1); } } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-intel-quanta-qssc-s4r.h0000644002055400205540000000234013527331635025345 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H #define IPMI_SENSORS_OEM_INTEL_H #include "ipmi-sensors.h" int ipmi_sensors_oem_intel_quanta_qssc_s4r_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INTEL_QUANTA_QSSC_S4R_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec.c0000644002055400205540000000562413527331635023104 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-inventec.h" #include "ipmi-sensors-oem-inventec-5441.h" #include "ipmi-sensors-oem-inventec-5442.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); /* * Inventec 5441/Dell Xanadu II */ if (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5441) { if ((ret = ipmi_sensors_oem_inventec_5441_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } /* * Inventec 5442/Dell Xanadu III */ if (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5442) { if ((ret = ipmi_sensors_oem_inventec_5442_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec.h0000644002055400205540000000240113527331635023077 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INVENTEC_H #define IPMI_SENSORS_OEM_INVENTEC_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INVENTEC_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec-5441.c0000644002055400205540000000415113527331635023471 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-inventec-5441.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_5441_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5441); /* * Inventec 5441/Dell Xanadu II */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec-5441.h0000644002055400205540000000244413527331635023501 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INVENTEC_5441_H #define IPMI_SENSORS_OEM_INVENTEC_5441_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_5441_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INVENTEC_5441_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec-5442.c0000644002055400205540000000415213527331635023473 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-inventec-5442.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_5442_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_INVENTEC); assert (state_data->oem_data.product_id == IPMI_INVENTEC_PRODUCT_ID_5442); /* * Inventec 5442/Dell Xanadu III */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-inventec-5442.h0000644002055400205540000000244413527331635023502 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_INVENTEC_5442_H #define IPMI_SENSORS_OEM_INVENTEC_5442_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_inventec_5442_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_INVENTEC_5442_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-quanta.c0000644002055400205540000000447613527331635022566 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-quanta.h" #include "ipmi-sensors-oem-quanta-s99q.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_quanta_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); /* * Quanta S99Q/Dell FS12-TY */ if (state_data->oem_data.product_id == IPMI_QUANTA_PRODUCT_ID_S99Q) { if ((ret = ipmi_sensors_oem_quanta_s99q_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-quanta.h0000644002055400205540000000236313527331635022564 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_QUANTA_H #define IPMI_SENSORS_OEM_QUANTA_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_quanta_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_QUANTA_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-quanta-s99q.c0000644002055400205540000000412713527331635023362 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-quanta-s99q.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_quanta_s99q_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_QUANTA); assert (state_data->oem_data.product_id == IPMI_QUANTA_PRODUCT_ID_S99Q); /* * Quanta S99Q/Dell FS12-TY */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-quanta-s99q.h0000644002055400205540000000242613527331635023367 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_QUANTA_S99Q_H #define IPMI_SENSORS_OEM_QUANTA_S99Q_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_quanta_s99q_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_QUANTA_S99Q_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-wistron.c0000644002055400205540000000452313527331635022773 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-wistron.h" #include "ipmi-sensors-oem-wistron-c6220.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_wistron_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); /* * Wistron / Dell Poweredge C6200 */ if (state_data->oem_data.product_id == IPMI_WISTRON_PRODUCT_ID_C6220) { if ((ret = ipmi_sensors_oem_wistron_c6220_output_oem_record (state_data, oem_record_manufacturer_id, oem_data, oem_data_len)) < 0) return (-1); if (ret) return (1); } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-wistron.h0000644002055400205540000000237213527331635023000 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_WISTRON_H #define IPMI_SENSORS_OEM_WISTRON_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_wistron_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_WISTRON_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-wistron-c6220.c0000644002055400205540000000415213527331635023523 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-oem-wistron-c6220.h" #include "ipmi-sensors-oem-intel-node-manager.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sensor-common.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_wistron_c6220_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len) { int ret; assert (state_data); assert (oem_data); assert (oem_data_len); assert (state_data->prog_data->args->verbose_count >= 2); assert (state_data->prog_data->args->interpret_oem_data); assert (state_data->oem_data.manufacturer_id == IPMI_IANA_ENTERPRISE_ID_WISTRON); assert (state_data->oem_data.product_id == IPMI_WISTRON_PRODUCT_ID_C6220); /* * Wistron / Dell Poweredge C6200 */ if ((ret = ipmi_sensors_oem_intel_node_manager_output_oem_record (state_data)) < 0) return (-1); if (ret) return (1); return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-oem-wistron-c6220.h0000644002055400205540000000244413527331635023532 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OEM_WISTRON_C6220_H #define IPMI_SENSORS_OEM_WISTRON_C6220_H #include "ipmi-sensors.h" /* return (0) - no OEM match * return (1) - OEM match * return (-1) - error, cleanup and return error */ int ipmi_sensors_oem_wistron_c6220_output_oem_record (ipmi_sensors_state_data_t *state_data, uint32_t oem_record_manufacturer_id, const uint8_t *oem_data, unsigned int oem_data_len); #endif /* IPMI_SENSORS_OEM_WISTRON_C6220_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-output-common.c0000644002055400205540000011631413527331635023340 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-output-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #define IPMI_SENSORS_SPACE_BUFFER 1024 int ipmi_sensors_output_event_message_list (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len, char *prefix, unsigned int each_on_newline) { char spcbuf[IPMI_SENSORS_SPACE_BUFFER + 1]; unsigned int i; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (prefix) pstdout_printf (state_data->pstate, "%s", prefix); memset (spcbuf, '\0', IPMI_SENSORS_SPACE_BUFFER + 1); if (prefix && each_on_newline) { unsigned int len; len = strlen (prefix); if (len > IPMI_SENSORS_SPACE_BUFFER) len = IPMI_SENSORS_SPACE_BUFFER; for (i = 0; i < len; i++) strcat (spcbuf, " "); } if (event_message_output_type == IPMI_SENSORS_EVENT_NA) { if (state_data->prog_data->args->legacy_output) pstdout_printf (state_data->pstate, "[%s]\n", IPMI_SENSORS_NA_STRING_OUTPUT); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) pstdout_printf (state_data->pstate, "%s\n", IPMIMONITORING_NA_STRING_LEGACY); else pstdout_printf (state_data->pstate, "%s\n", IPMI_SENSORS_NA_STRING_OUTPUT); } else if (event_message_output_type == IPMI_SENSORS_EVENT_UNKNOWN) { if (state_data->prog_data->args->legacy_output) pstdout_printf (state_data->pstate, "[%s]\n", "Unknown"); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) pstdout_printf (state_data->pstate, "'%s'\n", IPMIMONITORING_NA_STRING_LEGACY); else pstdout_printf (state_data->pstate, "%s\n", "Unknown"); } else { if (state_data->prog_data->args->legacy_output) pstdout_printf (state_data->pstate, "[%s]", event_message_list[0]); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) pstdout_printf (state_data->pstate, "'%s'", event_message_list[0]); else if (state_data->prog_data->args->output_event_bitmask) pstdout_printf (state_data->pstate, "%04Xh", sensor_event_bitmask); else pstdout_printf (state_data->pstate, "'%s'", event_message_list[0]); if (event_message_list_len > 1) { for (i = 1; i < event_message_list_len; i++) { if (each_on_newline) pstdout_printf (state_data->pstate, "\n"); if (state_data->prog_data->args->legacy_output) pstdout_printf (state_data->pstate, "%s[%s]", spcbuf, event_message_list[i]); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) pstdout_printf (state_data->pstate, " '%s'", event_message_list[i]); else if (prefix) pstdout_printf (state_data->pstate, "%s'%s'", prefix, event_message_list[i]); else pstdout_printf (state_data->pstate, " '%s'", event_message_list[i]); } } pstdout_printf (state_data->pstate, "\n"); } return (0); } /* emulate a call to ipmi_cmd_get_sensor_thresholds succeeding by * stuffing the response with data from the SDR */ static int _get_sdr_sensor_thresholds (ipmi_sensors_state_data_t *state_data, fiid_obj_t obj_get_sensor_thresholds_rs) { uint8_t lower_non_critical_threshold_readable = 0; uint8_t lower_critical_threshold_readable = 0; uint8_t lower_non_recoverable_threshold_readable = 0; uint8_t upper_non_critical_threshold_readable = 0; uint8_t upper_critical_threshold_readable = 0; uint8_t upper_non_recoverable_threshold_readable = 0; uint8_t lower_non_critical_threshold_temp = 0; uint8_t lower_critical_threshold_temp = 0; uint8_t lower_non_recoverable_threshold_temp = 0; uint8_t upper_non_critical_threshold_temp = 0; uint8_t upper_critical_threshold_temp = 0; uint8_t upper_non_recoverable_threshold_temp = 0; uint8_t lower_non_critical_threshold = 0; uint8_t lower_critical_threshold = 0; uint8_t lower_non_recoverable_threshold = 0; uint8_t upper_non_critical_threshold = 0; uint8_t upper_critical_threshold = 0; uint8_t upper_non_recoverable_threshold = 0; int rv = -1; assert (state_data); assert (obj_get_sensor_thresholds_rs); assert (fiid_obj_template_compare (obj_get_sensor_thresholds_rs, tmpl_cmd_get_sensor_thresholds_rs) > 0); if (fiid_obj_set (obj_get_sensor_thresholds_rs, "cmd", IPMI_CMD_GET_SENSOR_THRESHOLDS) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'cmd': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "comp_code", IPMI_COMP_CODE_COMMAND_SUCCESS) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'comp_code': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (ipmi_sdr_parse_threshold_readable (state_data->sdr_ctx, NULL, 0, &lower_non_critical_threshold_readable, &lower_critical_threshold_readable, &lower_non_recoverable_threshold_readable, &upper_non_critical_threshold_readable, &upper_critical_threshold_readable, &upper_non_recoverable_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_threshold_readable: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.lower_non_critical_threshold", lower_non_critical_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.lower_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.lower_critical_threshold", lower_critical_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.lower_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.lower_non_recoverable_threshold", lower_non_recoverable_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.lower_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.upper_non_critical_threshold", upper_non_critical_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.upper_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.upper_critical_threshold", upper_critical_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.upper_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "readable_thresholds.upper_non_recoverable_threshold", upper_non_recoverable_threshold_readable) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'readable_thresholds.upper_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "reserved", 0) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'reserved': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (ipmi_sdr_parse_thresholds_raw (state_data->sdr_ctx, NULL, 0, &lower_non_critical_threshold_temp, &lower_critical_threshold_temp, &lower_non_recoverable_threshold_temp, &upper_non_critical_threshold_temp, &upper_critical_threshold_temp, &upper_non_recoverable_threshold_temp) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_thresholds_raw: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (lower_non_critical_threshold_readable) lower_non_critical_threshold = lower_non_critical_threshold_temp; if (lower_critical_threshold_readable) lower_critical_threshold = lower_critical_threshold_temp; if (lower_non_recoverable_threshold_readable) lower_non_recoverable_threshold = lower_non_recoverable_threshold_temp; if (upper_non_critical_threshold_readable) upper_non_critical_threshold = upper_non_critical_threshold_temp; if (upper_critical_threshold_readable) upper_critical_threshold = upper_critical_threshold_temp; if (upper_non_recoverable_threshold_readable) upper_non_recoverable_threshold = upper_non_recoverable_threshold_temp; if (fiid_obj_set (obj_get_sensor_thresholds_rs, "lower_non_critical_threshold", lower_non_critical_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'lower_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "lower_critical_threshold", lower_critical_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'lower_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "lower_non_recoverable_threshold", lower_non_recoverable_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'lower_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "upper_non_critical_threshold", upper_non_critical_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'upper_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "upper_critical_threshold", upper_critical_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'upper_critical_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } if (fiid_obj_set (obj_get_sensor_thresholds_rs, "upper_non_recoverable_threshold", upper_non_recoverable_threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_set: 'upper_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_get_sensor_thresholds_rs)); goto cleanup; } rv = 0; cleanup: return (rv); } int ipmi_sensors_get_thresholds (ipmi_sensors_state_data_t *state_data, double **lower_non_critical_threshold, double **lower_critical_threshold, double **lower_non_recoverable_threshold, double **upper_non_critical_threshold, double **upper_critical_threshold, double **upper_non_recoverable_threshold) { int8_t r_exponent, b_exponent; int16_t m, b; uint8_t linearization, analog_data_format; uint8_t sensor_number; uint8_t threshold_raw; fiid_obj_t obj_cmd_rs = NULL; double *tmp_lower_non_critical_threshold = NULL; double *tmp_lower_critical_threshold = NULL; double *tmp_lower_non_recoverable_threshold = NULL; double *tmp_upper_non_critical_threshold = NULL; double *tmp_upper_critical_threshold = NULL; double *tmp_upper_non_recoverable_threshold = NULL; double threshold; uint8_t threshold_access_support; uint64_t val; int rv = -1; assert (state_data); if (lower_non_critical_threshold) *lower_non_critical_threshold = NULL; if (lower_critical_threshold) *lower_critical_threshold = NULL; if (lower_non_recoverable_threshold) *lower_non_recoverable_threshold = NULL; if (upper_non_critical_threshold) *upper_non_critical_threshold = NULL; if (upper_critical_threshold) *upper_critical_threshold = NULL; if (upper_non_recoverable_threshold) *upper_non_recoverable_threshold = NULL; /* achu: first lets check if we have anything to output */ if (ipmi_sdr_parse_sensor_capabilities (state_data->sdr_ctx, NULL, 0, NULL, &threshold_access_support, NULL, NULL, NULL) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_capabilities: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* threshold access support is very confusing. From the spec: * * Sensor Threshold Access Support * [3:2] - 00b = no thresholds. * 01b = thresholds are readable, per Reading Mask, below. * 10b = thresholds are readable and settable per Reading Mask and * Settable Threshold Mask, respectively. * 11b = Fixed, unreadable, thresholds. Which thresholds are supported is * reflected by the Reading Mask. The threshold value fields report * the values that hard-coded in the sensor. * * The 11b case is very hard to interpret. Right now, the code * assumes the this means that the thresholds are not readable from * the "Get Sensor Threshold" command. They are only readable from * the SDR. So that's what the code below assumes. */ if (threshold_access_support == IPMI_SDR_NO_THRESHOLDS_SUPPORT) { rv = 0; goto cleanup; } /* achu: * * I will admit I'm not entirely sure what the best way is * to get thresholds. It seems the information is * stored/retrievable in the SDR and through an IPMI command. * * Since the readable_threshold_mask in the SDR record indicates the * mask is for the "Get Sensor Thresholds" command, it suggests the * best/right way is to get the values via that command. Sounds * good to me. Also, I suppose its possible that changes to the * thresholds may not be written to the SDR. * * Also, because the results from the get_sensor_thresholds include * readability flags, we can ignore the readability flags in the * SDR. * */ if (ipmi_sdr_parse_sensor_number (state_data->sdr_ctx, NULL, 0, &sensor_number) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_number: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } if (ipmi_sdr_parse_sensor_decoding_data (state_data->sdr_ctx, NULL, 0, &r_exponent, &b_exponent, &m, &b, &linearization, &analog_data_format) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_decoding_data: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } /* if the sensor is not analog, this is most likely a bug in the * SDR, since we shouldn't be decoding a non-threshold sensor. * * Don't return an error. Allow code to output "NA" or something. */ if (!IPMI_SDR_ANALOG_DATA_FORMAT_VALID (analog_data_format)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Attempting to decode non-analog sensor\n"); rv = 0; goto cleanup; } /* if the sensor is non-linear, I just don't know what to do * * Don't return an error. Allow code to output "NA" or something. */ if (!IPMI_SDR_LINEARIZATION_IS_LINEAR (linearization)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Cannot decode non-linear sensor\n"); rv = 0; goto cleanup; } if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sensor_thresholds_rs))) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_create: %s\n", strerror (errno)); goto cleanup; } if (threshold_access_support == IPMI_SDR_FIXED_UNREADABLE_THRESHOLDS_SUPPORT) { if (_get_sdr_sensor_thresholds (state_data, obj_cmd_rs) < 0) goto cleanup; goto continue_get_sensor_thresholds; } if (ipmi_cmd_get_sensor_thresholds (state_data->ipmi_ctx, sensor_number, obj_cmd_rs) < 0) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "ipmi_cmd_get_sensor_thresholds: %s\n", ipmi_ctx_errormsg (state_data->ipmi_ctx)); if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_COMMAND_ILLEGAL_FOR_SENSOR_OR_RECORD_TYPE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_REQUESTED_SENSOR_DATA_OR_RECORD_NOT_PRESENT) == 1)) { /* The thresholds cannot be gathered for one reason or * another, maybe b/c its a OEM sensor or something. We can * return (0) gracefully. */ rv = 0; goto cleanup; } /* Likely error from failed bridge or something similar. Fall through to SDR */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_BAD_COMPLETION_CODE && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_UNSPECIFIED_ERROR) == 1)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Get Sensor Thresholds failed, using SDR information\n"); if (_get_sdr_sensor_thresholds (state_data, obj_cmd_rs) < 0) goto cleanup; goto continue_get_sensor_thresholds; } /* IPMI Workaround * * HP DL 585 * * Get Sensor Thresholds is an optional IPMI command. If it's * not supported, use the SDR information. * * Vadatech VT001 BMC w/ ATCA blades * * Similar to HP but w/ Parameter out of Range error */ if (ipmi_ctx_errnum (state_data->ipmi_ctx) == IPMI_ERR_COMMAND_INVALID_OR_UNSUPPORTED && (ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_INVALID_COMMAND) == 1 || ipmi_check_completion_code (obj_cmd_rs, IPMI_COMP_CODE_PARAMETER_OUT_OF_RANGE) == 1)) { if (state_data->prog_data->args->common_args.debug) pstdout_fprintf (state_data->pstate, stderr, "Get Sensor Thresholds failed, using SDR information\n"); if (_get_sdr_sensor_thresholds (state_data, obj_cmd_rs) < 0) goto cleanup; goto continue_get_sensor_thresholds; } goto cleanup; } continue_get_sensor_thresholds: if (lower_non_critical_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.lower_non_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.lower_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "lower_non_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lower_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_lower_non_critical_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_lower_non_critical_threshold = threshold; } } if (lower_critical_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.lower_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.lower_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "lower_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lower_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_lower_critical_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_lower_critical_threshold = threshold; } } if (lower_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.lower_non_recoverable_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.lower_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "lower_non_recoverable_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'lower_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_lower_non_recoverable_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_lower_non_recoverable_threshold = threshold; } } if (upper_non_critical_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.upper_non_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.upper_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "upper_non_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'upper_non_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_upper_non_critical_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_upper_non_critical_threshold = threshold; } } if (upper_critical_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.upper_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.upper_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "upper_critical_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'upper_critical_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_upper_critical_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_upper_critical_threshold = threshold; } } if (upper_non_recoverable_threshold) { if (FIID_OBJ_GET (obj_cmd_rs, "readable_thresholds.upper_non_recoverable_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'readable_thresholds.upper_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } if (val) { if (FIID_OBJ_GET (obj_cmd_rs, "upper_non_recoverable_threshold", &val) < 0) { pstdout_fprintf (state_data->pstate, stderr, "fiid_obj_get: 'upper_non_recoverable_threshold': %s\n", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } threshold_raw = val; if (ipmi_sensor_decode_value (r_exponent, b_exponent, m, b, linearization, analog_data_format, threshold_raw, &threshold) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sensor_decode_value: %s\n", strerror (errno)); goto cleanup; } if (!(tmp_upper_non_recoverable_threshold = (double *)malloc (sizeof (double)))) { pstdout_perror (state_data->pstate, "malloc"); goto cleanup; } *tmp_upper_non_recoverable_threshold = threshold; } } if (lower_non_critical_threshold) *lower_non_critical_threshold = tmp_lower_non_critical_threshold; if (lower_critical_threshold) *lower_critical_threshold = tmp_lower_critical_threshold; if (lower_non_recoverable_threshold) *lower_non_recoverable_threshold = tmp_lower_non_recoverable_threshold; if (upper_non_critical_threshold) *upper_non_critical_threshold = tmp_upper_non_critical_threshold; if (upper_critical_threshold) *upper_critical_threshold = tmp_upper_critical_threshold; if (upper_non_recoverable_threshold) *upper_non_recoverable_threshold = tmp_upper_non_recoverable_threshold; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); if (rv < 0) { free (tmp_lower_non_critical_threshold); free (tmp_lower_critical_threshold); free (tmp_lower_non_recoverable_threshold); free (tmp_upper_non_critical_threshold); free (tmp_upper_critical_threshold); free (tmp_upper_non_recoverable_threshold); } return (rv); } int ipmi_sensors_get_sensor_state (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask, char **sensor_state_str) { assert (state_data); assert (state_data->prog_data->args->output_sensor_state); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); assert (sensor_state_str); if (event_message_output_type == IPMI_SENSORS_EVENT_NORMAL) { uint8_t sensor_type; uint8_t event_reading_type_code; unsigned int sensor_state; if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_interpret_sensor (state_data->interpret_ctx, event_reading_type_code, sensor_type, sensor_event_bitmask, &sensor_state) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_interpret_sensor: %s\n", ipmi_interpret_ctx_errormsg (state_data->interpret_ctx)); return (-1); } if (sensor_state == IPMI_INTERPRET_STATE_NOMINAL) (*sensor_state_str) = "Nominal"; else if (sensor_state == IPMI_INTERPRET_STATE_WARNING) (*sensor_state_str) = "Warning"; else if (sensor_state == IPMI_INTERPRET_STATE_CRITICAL) (*sensor_state_str) = "Critical"; else (*sensor_state_str) = IPMI_SENSORS_NA_STRING; } else (*sensor_state_str) = IPMI_SENSORS_NA_STRING; return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-output-common.h0000644002055400205540000000760113527331635023343 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_OUTPUT_COMMON_H #define IPMI_SENSORS_OUTPUT_COMMON_H #include "ipmi-sensors.h" #define IPMI_SENSORS_OEM_DATA_LEN 1024 #define IPMI_SENSORS_NA_STRING "N/A" #define IPMI_SENSORS_NA_STRING_LEGACY "NA" #define IPMI_SENSORS_NONE_STRING "NONE" #define IPMIMONITORING_NA_STRING_LEGACY "N/A" #define IPMI_SENSORS_NA_STRING_OUTPUT \ (state_data->prog_data->args->legacy_output ? IPMI_SENSORS_NA_STRING_LEGACY : IPMI_SENSORS_NA_STRING) #define IPMI_SENSORS_ASSERTION_EVENT_PREFIX "Assertion Event Enabled: " #define IPMI_SENSORS_ASSERTION_EVENT_PREFIX_LEGACY "Assertion Events Enabled: " #define IPMI_SENSORS_ASSERTION_EVENT_PREFIX_OUTPUT \ (state_data->prog_data->args->legacy_output ? IPMI_SENSORS_ASSERTION_EVENT_PREFIX_LEGACY : IPMI_SENSORS_ASSERTION_EVENT_PREFIX) #define IPMI_SENSORS_DEASSERTION_EVENT_PREFIX "Deassertion Event Enabled: " #define IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_LEGACY "Deassertion Events Enabled: " #define IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_OUTPUT \ (state_data->prog_data->args->legacy_output ? IPMI_SENSORS_DEASSERTION_EVENT_PREFIX_LEGACY : IPMI_SENSORS_DEASSERTION_EVENT_PREFIX) #define IPMI_SENSORS_SENSOR_EVENT_PREFIX "Sensor Event: " #define IPMI_SENSORS_SENSOR_EVENT_PREFIX_LEGACY "Sensor Status: " #define IPMI_SENSORS_SENSOR_EVENT_PREFIX_OUTPUT \ (state_data->prog_data->args->legacy_output ? IPMI_SENSORS_SENSOR_EVENT_PREFIX_LEGACY : IPMI_SENSORS_SENSOR_EVENT_PREFIX) #define IPMI_SENSORS_NO_EVENT_STRING "OK" #define IPMI_SENSORS_UNITS_BUFLEN 1024 #define IPMI_SENSORS_EVENT_NORMAL 0x0 #define IPMI_SENSORS_EVENT_NA 0x1 #define IPMI_SENSORS_EVENT_UNKNOWN 0x2 #define IPMI_SENSORS_EVENT_VALID(__val) \ (((__val) == IPMI_SENSORS_EVENT_NORMAL \ || (__val) == IPMI_SENSORS_EVENT_NA \ || (__val) == IPMI_SENSORS_EVENT_UNKNOWN) ? 1 : 0) int ipmi_sensors_output_event_message_list (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len, char *prefix, unsigned int each_on_newline); int ipmi_sensors_get_thresholds (ipmi_sensors_state_data_t *state_data, double **lower_non_critical_threshold, double **lower_critical_threshold, double **lower_non_recoverable_threshold, double **upper_non_critical_threshold, double **upper_critical_threshold, double **upper_non_recoverable_threshold); int ipmi_sensors_get_sensor_state (ipmi_sensors_state_data_t *state_data, int event_message_output_type, uint16_t sensor_event_bitmask, char **sensor_state_str); #endif /* IPMI_SENSORS_OUTPUT_COMMON_H */ freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-simple-output.c0000644002055400205540000014156413527331635023346 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include "ipmi-sensors.h" #include "ipmi-sensors-output-common.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-sdr-cache-common.h" #include "tool-sensor-common.h" #define IPMI_SENSORS_FMT_BUFLEN 1024 int ipmi_sensors_simple_output_setup (ipmi_sensors_state_data_t *state_data) { assert (state_data); if (!state_data->prog_data->args->legacy_output && !state_data->prog_data->args->comma_separated_output) { if (calculate_column_widths (state_data->pstate, state_data->sdr_ctx, state_data->prog_data->args->sensor_types, state_data->prog_data->args->sensor_types_length, state_data->prog_data->args->record_ids, state_data->prog_data->args->record_ids_length, state_data->prog_data->args->non_abbreviated_units, state_data->prog_data->args->shared_sensors, 0, /* count_event_only_records */ 0, /* count_device_locator_records */ 0, /* count_oem_records */ state_data->prog_data->args->entity_sensor_names, &(state_data->column_width)) < 0) return (-1); } return (0); } static double _round_double2 (double d) { double r = 0.0; r = (d - (long) d) * 100.0; if ((r - (long) r) > 0.5) return ((long) d + (((long) r + 1) / 100.0)); return ((long) d + ((long) r / 100.0)); } static int _legacy_simple_output_header (ipmi_sensors_state_data_t *state_data, uint16_t record_id) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; assert (state_data); memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_id_string (state_data->sdr_ctx, NULL, 0, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (state_data->prog_data->args->quiet_readings) pstdout_printf (state_data->pstate, "%u: %s: ", record_id, id_string); else { uint8_t sensor_type; uint8_t event_reading_type_code; const char * sensor_type_string = NULL; if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if ((state_data->prog_data->args->interpret_oem_data) && (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) >= 0)) sensor_type_string = get_oem_sensor_type_output_string (sensor_type, event_reading_type_code, state_data->oem_data.manufacturer_id, state_data->oem_data.product_id); else sensor_type_string = get_sensor_type_output_string (sensor_type); pstdout_printf (state_data->pstate, "%u: %s (%s): ", record_id, id_string, sensor_type_string); } return (0); } static int _legacy_simple_output_full_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { uint8_t event_reading_type_code; double *lower_non_critical_threshold = NULL; double *upper_non_critical_threshold = NULL; double *lower_critical_threshold = NULL; double *upper_critical_threshold = NULL; double *lower_non_recoverable_threshold = NULL; double *upper_non_recoverable_threshold = NULL; int rv = -1; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_legacy_simple_output_header (state_data, record_id) < 0) goto cleanup; if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } switch (ipmi_event_reading_type_code_class (event_reading_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: if (!state_data->prog_data->args->quiet_readings) { char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; double *lower_output_threshold = NULL; double *upper_output_threshold = NULL; memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, 0) < 0) goto cleanup; if (ipmi_sensors_get_thresholds (state_data, &lower_non_critical_threshold, &lower_critical_threshold, &lower_non_recoverable_threshold, &upper_non_critical_threshold, &upper_critical_threshold, &upper_non_recoverable_threshold) < 0) goto cleanup; if (sensor_reading) pstdout_printf (state_data->pstate, "%.2f %s ", _round_double2 (*sensor_reading), sensor_units_buf); else pstdout_printf (state_data->pstate, "%s ", IPMI_SENSORS_NA_STRING_LEGACY); /* default output is critical thresholds, if those aren't * available, move to non-recoverable, and if those aren't * available, move on to non-critical. */ if (lower_critical_threshold || upper_critical_threshold) { lower_output_threshold = lower_critical_threshold; upper_output_threshold = upper_critical_threshold; } else if (lower_non_recoverable_threshold || upper_non_recoverable_threshold) { lower_output_threshold = lower_non_recoverable_threshold; upper_output_threshold = upper_non_recoverable_threshold; } else if (lower_non_critical_threshold || upper_non_critical_threshold) { lower_output_threshold = lower_non_critical_threshold; upper_output_threshold = upper_non_critical_threshold; } if (lower_output_threshold) pstdout_printf (state_data->pstate, "(%.2f/", _round_double2 (*lower_output_threshold)); else pstdout_printf (state_data->pstate, "(%s/", IPMI_SENSORS_NA_STRING_LEGACY); if (upper_output_threshold) pstdout_printf (state_data->pstate, "%.2f): ", _round_double2 (*upper_output_threshold)); else pstdout_printf (state_data->pstate, "%s): ", IPMI_SENSORS_NA_STRING_LEGACY); } /* fall through and also output event messages */ case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: default: if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) goto cleanup; break; } rv = 0; cleanup: free (lower_non_critical_threshold); free (upper_non_critical_threshold); free (lower_critical_threshold); free (upper_critical_threshold); free (lower_non_recoverable_threshold); free (upper_non_recoverable_threshold); return (rv); } static int _legacy_simple_output_compact_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_legacy_simple_output_header (state_data, record_id) < 0) return (-1); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) return (-1); return (0); } static int _ipmimonitoring_legacy_simple_output_header (ipmi_sensors_state_data_t *state_data, uint16_t record_id) { char id_string[IPMI_SDR_MAX_ID_STRING_LENGTH + 1]; uint8_t sensor_type; uint8_t event_reading_type_code; const char * sensor_type_string = NULL; assert (state_data); memset (id_string, '\0', IPMI_SDR_MAX_ID_STRING_LENGTH + 1); if (ipmi_sdr_parse_id_string (state_data->sdr_ctx, NULL, 0, id_string, IPMI_SDR_MAX_ID_STRING_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_id_string: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if ((state_data->prog_data->args->interpret_oem_data) && (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) >= 0)) sensor_type_string = get_oem_sensor_type_output_string (sensor_type, event_reading_type_code, state_data->oem_data.manufacturer_id, state_data->oem_data.product_id); else sensor_type_string = get_sensor_type_output_string (sensor_type); pstdout_printf (state_data->pstate, "%u | %s | %s", record_id, id_string, sensor_type_string); return (0); } static int _ipmimonitoring_legacy_simple_output_full_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { int rv = -1; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_ipmimonitoring_legacy_simple_output_header (state_data, record_id) < 0) goto cleanup; if (state_data->prog_data->args->output_sensor_state) { char *sensor_state_str = NULL; if (ipmi_sensors_get_sensor_state (state_data, event_message_output_type, sensor_event_bitmask, &sensor_state_str) < 0) goto cleanup; pstdout_printf (state_data->pstate, " | %s", sensor_state_str); } if (!state_data->prog_data->args->quiet_readings) { uint8_t event_reading_type_code; if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } switch (ipmi_event_reading_type_code_class (event_reading_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: { char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, 0) < 0) goto cleanup; if (sensor_reading) pstdout_printf (state_data->pstate, " | %s | %f\n", sensor_units_buf, *sensor_reading); else pstdout_printf (state_data->pstate, " | %s | %s\n", sensor_units_buf, IPMIMONITORING_NA_STRING_LEGACY); } break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: default: /* sensor units */ pstdout_printf (state_data->pstate, " | %s | ", IPMIMONITORING_NA_STRING_LEGACY); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) goto cleanup; break; } } else pstdout_printf (state_data->pstate, "\n"); rv = 0; cleanup: return (rv); } static int _ipmimonitoring_legacy_simple_output_compact_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_ipmimonitoring_legacy_simple_output_header (state_data, record_id) < 0) return (-1); if (state_data->prog_data->args->output_sensor_state) { char *sensor_state_str = NULL; if (ipmi_sensors_get_sensor_state (state_data, event_message_output_type, sensor_event_bitmask, &sensor_state_str) < 0) return (-1); pstdout_printf (state_data->pstate, " | %s", sensor_state_str); } if (state_data->prog_data->args->quiet_readings) return (0); pstdout_printf (state_data->pstate, " | %s | ", IPMIMONITORING_NA_STRING_LEGACY); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) return (-1); return (0); } static int _simple_output_header (ipmi_sensors_state_data_t *state_data, uint16_t record_id, uint8_t sensor_number, int event_message_output_type, uint16_t sensor_event_bitmask) { char fmt[IPMI_SENSORS_FMT_BUFLEN + 1]; char sensor_name[IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1]; unsigned int sensor_name_flags = 0; const char *sensor_type_string; uint8_t event_reading_type_code; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); memset (sensor_name, '\0', IPMI_SDR_MAX_SENSOR_NAME_LENGTH + 1); if (!state_data->prog_data->args->shared_sensors) sensor_name_flags |= IPMI_SDR_SENSOR_NAME_FLAGS_IGNORE_SHARED_SENSORS; if (state_data->prog_data->args->entity_sensor_names) { if (ipmi_sdr_parse_entity_sensor_name (state_data->sdr_ctx, NULL, 0, sensor_number, sensor_name_flags, sensor_name, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_entity_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } } else { if (ipmi_sdr_parse_sensor_name (state_data->sdr_ctx, NULL, 0, sensor_number, sensor_name_flags, sensor_name, IPMI_SDR_MAX_SENSOR_NAME_LENGTH) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_name: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } } memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->no_sensor_type_output) { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%u,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%-%du | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name); pstdout_printf (state_data->pstate, fmt, record_id, sensor_name); } else { uint8_t sensor_type; if (ipmi_sdr_parse_sensor_type (state_data->sdr_ctx, NULL, 0, &sensor_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_sensor_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%u,%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%-%du | %%-%ds | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name, state_data->column_width.sensor_type); if ((state_data->prog_data->args->interpret_oem_data) && (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) >= 0)) sensor_type_string = get_oem_sensor_type_output_string (sensor_type, event_reading_type_code, state_data->oem_data.manufacturer_id, state_data->oem_data.product_id); else sensor_type_string = get_sensor_type_output_string (sensor_type); pstdout_printf (state_data->pstate, fmt, record_id, sensor_name, sensor_type_string); } if (state_data->prog_data->args->output_sensor_state) { char *sensor_state_str = NULL; if (ipmi_sensors_get_sensor_state (state_data, event_message_output_type, sensor_event_bitmask, &sensor_state_str) < 0) return (-1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-8s"); pstdout_printf (state_data->pstate, fmt, sensor_state_str); } return (0); } static int _simple_output_full_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { char fmt[IPMI_SENSORS_FMT_BUFLEN + 1]; uint8_t event_reading_type_code; double *lower_non_critical_threshold = NULL; double *upper_non_critical_threshold = NULL; double *lower_critical_threshold = NULL; double *upper_critical_threshold = NULL; double *lower_non_recoverable_threshold = NULL; double *upper_non_recoverable_threshold = NULL; int rv = -1; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_simple_output_header (state_data, record_id, sensor_number, event_message_output_type, sensor_event_bitmask) < 0) goto cleanup; if (ipmi_sdr_parse_event_reading_type_code (state_data->sdr_ctx, NULL, 0, &event_reading_type_code) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_event_reading_type_code: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); goto cleanup; } switch (ipmi_event_reading_type_code_class (event_reading_type_code)) { case IPMI_EVENT_READING_TYPE_CODE_CLASS_THRESHOLD: if (!state_data->prog_data->args->quiet_readings) { char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, state_data->prog_data->args->non_abbreviated_units) < 0) goto cleanup; memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (sensor_reading) { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%.2f,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10.2f | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, _round_double2 (*sensor_reading), sensor_units_buf); } else { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10s | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, IPMI_SENSORS_NA_STRING, sensor_units_buf); } } if (state_data->prog_data->args->output_sensor_thresholds) { char thresholdfmt[IPMI_SENSORS_FMT_BUFLEN + 1]; char nafmt[IPMI_SENSORS_FMT_BUFLEN + 1]; if (ipmi_sensors_get_thresholds (state_data, &lower_non_critical_threshold, &lower_critical_threshold, &lower_non_recoverable_threshold, &upper_non_critical_threshold, &upper_critical_threshold, &upper_non_recoverable_threshold) < 0) goto cleanup; memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) { snprintf (thresholdfmt, IPMI_SENSORS_FMT_BUFLEN, ",%%.2f"); snprintf (nafmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s"); } else { snprintf (thresholdfmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10.2f"); snprintf (nafmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10s"); } if (lower_non_recoverable_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *lower_non_recoverable_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); if (lower_critical_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *lower_critical_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); if (lower_non_critical_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *lower_non_critical_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); if (upper_non_critical_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *upper_non_critical_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); if (upper_critical_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *upper_critical_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); if (upper_non_recoverable_threshold) pstdout_printf (state_data->pstate, thresholdfmt, *upper_non_recoverable_threshold); else pstdout_printf (state_data->pstate, nafmt, IPMI_SENSORS_NA_STRING); } if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ","); else pstdout_printf (state_data->pstate, " | "); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) goto cleanup; break; case IPMI_EVENT_READING_TYPE_CODE_CLASS_GENERIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_SENSOR_SPECIFIC_DISCRETE: case IPMI_EVENT_READING_TYPE_CODE_CLASS_OEM: default: if (!state_data->prog_data->args->quiet_readings) { if (state_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_DISCRETE_READING && sensor_reading) { char sensor_units_buf[IPMI_SENSORS_UNITS_BUFLEN+1]; memset (sensor_units_buf, '\0', IPMI_SENSORS_UNITS_BUFLEN+1); if (get_sensor_units_output_string (state_data->pstate, state_data->sdr_ctx, sensor_units_buf, IPMI_SENSORS_UNITS_BUFLEN, state_data->prog_data->args->non_abbreviated_units) < 0) goto cleanup; memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%.2f,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10.2f | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, _round_double2 (*sensor_reading), sensor_units_buf); } else { memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10s | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); } } if (state_data->prog_data->args->output_sensor_thresholds) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s,%s,%s,%s,%s,%s", IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); else pstdout_printf (state_data->pstate, " | %-10s | %-10s | %-10s | %-10s | %-10s | %-10s", IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); } if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ","); else pstdout_printf (state_data->pstate, " | "); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) goto cleanup; break; } rv = 0; cleanup: free (lower_non_critical_threshold); free (upper_non_critical_threshold); free (lower_critical_threshold); free (upper_critical_threshold); free (lower_non_recoverable_threshold); free (upper_non_recoverable_threshold); return (rv); } static int _simple_output_compact_record (ipmi_sensors_state_data_t *state_data, uint16_t record_id, uint8_t sensor_number, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (_simple_output_header (state_data, record_id, sensor_number, event_message_output_type, sensor_event_bitmask) < 0) return (-1); if (!state_data->prog_data->args->quiet_readings) { char fmt[IPMI_SENSORS_FMT_BUFLEN + 1]; memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-10s | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); } if (state_data->prog_data->args->output_sensor_thresholds) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s,%s,%s,%s,%s,%s", IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); else pstdout_printf (state_data->pstate, " | %-10s | %-10s | %-10s | %-10s | %-10s | %-10s", IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING, IPMI_SENSORS_NA_STRING); } if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ","); else pstdout_printf (state_data->pstate, " | "); if (ipmi_sensors_output_event_message_list (state_data, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len, NULL, 0) < 0) return (-1); return (0); } static void _output_headers (ipmi_sensors_state_data_t *state_data) { char fmt[IPMI_SENSORS_FMT_BUFLEN + 1]; assert (state_data); assert (!state_data->output_headers); if (state_data->prog_data->args->ipmimonitoring_legacy_output) { pstdout_printf (state_data->pstate, "Record ID | Sensor Name | Sensor Group"); if (state_data->prog_data->args->output_sensor_state) pstdout_printf (state_data->pstate, " | Monitoring Status"); if (!state_data->prog_data->args->quiet_readings) pstdout_printf (state_data->pstate, " | Sensor Units | Sensor Reading"); pstdout_printf (state_data->pstate, "\n"); return; } if (state_data->prog_data->args->legacy_output) return; if (state_data->prog_data->args->no_header_output) return; memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->no_sensor_type_output) { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%-%ds | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR); } else { if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%s,%%s,%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, "%%-%ds | %%-%ds | %%-%ds", state_data->column_width.record_id, state_data->column_width.sensor_name, state_data->column_width.sensor_type); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_RECORD_ID_STR, SENSORS_HEADER_NAME_STR, SENSORS_HEADER_TYPE_STR); } if (state_data->prog_data->args->output_sensor_state) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s", SENSORS_HEADER_STATE_STR); else pstdout_printf (state_data->pstate, " | %s ", SENSORS_HEADER_STATE_STR); } if (!state_data->prog_data->args->quiet_readings) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s", SENSORS_HEADER_READING_STR); else pstdout_printf (state_data->pstate, " | %s ", SENSORS_HEADER_READING_STR); memset (fmt, '\0', IPMI_SENSORS_FMT_BUFLEN + 1); if (state_data->prog_data->args->comma_separated_output) snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, ",%%s"); else snprintf (fmt, IPMI_SENSORS_FMT_BUFLEN, " | %%-%ds", state_data->column_width.sensor_units); pstdout_printf (state_data->pstate, fmt, SENSORS_HEADER_UNITS_STR); } if (state_data->prog_data->args->output_sensor_thresholds) { if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",Lower NR,Lower C,Lower NC,Upper NC,Upper C,Upper NR"); else pstdout_printf (state_data->pstate, " | Lower NR | Lower C | Lower NC | Upper NC | Upper C | Upper NR "); } if (state_data->prog_data->args->comma_separated_output) pstdout_printf (state_data->pstate, ",%s\n", SENSORS_HEADER_EVENT_STR); else pstdout_printf (state_data->pstate, " | %s\n", SENSORS_HEADER_EVENT_STR); } int ipmi_sensors_simple_output (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len) { uint16_t record_id; uint8_t record_type; assert (state_data); assert (IPMI_SENSORS_EVENT_VALID (event_message_output_type)); if (ipmi_sdr_parse_record_id_and_type (state_data->sdr_ctx, NULL, 0, &record_id, &record_type) < 0) { pstdout_fprintf (state_data->pstate, stderr, "ipmi_sdr_parse_record_id_and_type: %s\n", ipmi_sdr_ctx_errormsg (state_data->sdr_ctx)); return (-1); } if (!state_data->output_headers) { _output_headers (state_data); state_data->output_headers++; } switch (record_type) { case IPMI_SDR_FORMAT_FULL_SENSOR_RECORD: if (state_data->prog_data->args->legacy_output) return (_legacy_simple_output_full_record (state_data, record_id, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) return (_ipmimonitoring_legacy_simple_output_full_record (state_data, record_id, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); else return (_simple_output_full_record (state_data, record_id, sensor_number, sensor_reading, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); case IPMI_SDR_FORMAT_COMPACT_SENSOR_RECORD: if (state_data->prog_data->args->legacy_output) return (_legacy_simple_output_compact_record (state_data, record_id, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); else if (state_data->prog_data->args->ipmimonitoring_legacy_output) return (_ipmimonitoring_legacy_simple_output_compact_record (state_data, record_id, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); else return (_simple_output_compact_record (state_data, record_id, sensor_number, event_message_output_type, sensor_event_bitmask, event_message_list, event_message_list_len)); default: /* don't output any other types in simple mode */ break; } return (0); } freeipmi-1.6.4/ipmi-sensors/ipmi-sensors-simple-output.h0000644002055400205540000000252713527331635023346 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_SENSORS_SIMPLE_OUTPUT_H #define IPMI_SENSORS_SIMPLE_OUTPUT_H #include "ipmi-sensors.h" int ipmi_sensors_simple_output_setup (ipmi_sensors_state_data_t *state_data); int ipmi_sensors_simple_output (ipmi_sensors_state_data_t *state_data, uint8_t sensor_number, double *sensor_reading, int event_message_output_type, uint16_t sensor_event_bitmask, char **event_message_list, unsigned int event_message_list_len); #endif /* IPMI_SENSORS_SIMPLE_OUTPUT_H */ freeipmi-1.6.4/ipmi-sensors/ipmimonitoring.in0000755002055400205540000000064413527331635021315 0ustar00achuachu00000000000000#!/bin/sh options="--output-sensor-state" verboseset=0 while test $# != 0 do case "$1" in --legacy-output) options="$options --ipmimonitoring-legacy-output" ;; -v) verboseset=1 ;; *) options="$options $1" ;; esac shift done if [ "$verboseset" = "0" ]; then options="$options --ignore-not-available-sensors" fi exec @IPMIMONITORINGSBINDIR@/ipmi-sensors $options freeipmi-1.6.4/ipmi-locate/0000755002055400205540000000000013527342550015463 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmi-locate/Makefile.in0000644002055400205540000006731213527342444017543 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmi-locate$(EXEEXT) subdir = ipmi-locate DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmi_locate_OBJECTS = ipmi_locate-ipmi-locate.$(OBJEXT) \ ipmi_locate-ipmi-locate-argp.$(OBJEXT) ipmi_locate_OBJECTS = $(am_ipmi_locate_OBJECTS) ipmi_locate_DEPENDENCIES = \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmi_locate_SOURCES) DIST_SOURCES = $(ipmi_locate_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmi_locate_CPPFLAGS = \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_locate_LDADD = \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_locate_SOURCES = \ ipmi-locate.c \ ipmi-locate_.h \ ipmi-locate-argp.c \ ipmi-locate-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmi-locate/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmi-locate/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmi-locate$(EXEEXT): $(ipmi_locate_OBJECTS) $(ipmi_locate_DEPENDENCIES) $(EXTRA_ipmi_locate_DEPENDENCIES) @rm -f ipmi-locate$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmi_locate_OBJECTS) $(ipmi_locate_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_locate-ipmi-locate-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmi_locate-ipmi-locate.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmi_locate-ipmi-locate.o: ipmi-locate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_locate-ipmi-locate.o -MD -MP -MF $(DEPDIR)/ipmi_locate-ipmi-locate.Tpo -c -o ipmi_locate-ipmi-locate.o `test -f 'ipmi-locate.c' || echo '$(srcdir)/'`ipmi-locate.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_locate-ipmi-locate.Tpo $(DEPDIR)/ipmi_locate-ipmi-locate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-locate.c' object='ipmi_locate-ipmi-locate.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_locate-ipmi-locate.o `test -f 'ipmi-locate.c' || echo '$(srcdir)/'`ipmi-locate.c ipmi_locate-ipmi-locate.obj: ipmi-locate.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_locate-ipmi-locate.obj -MD -MP -MF $(DEPDIR)/ipmi_locate-ipmi-locate.Tpo -c -o ipmi_locate-ipmi-locate.obj `if test -f 'ipmi-locate.c'; then $(CYGPATH_W) 'ipmi-locate.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-locate.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_locate-ipmi-locate.Tpo $(DEPDIR)/ipmi_locate-ipmi-locate.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-locate.c' object='ipmi_locate-ipmi-locate.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_locate-ipmi-locate.obj `if test -f 'ipmi-locate.c'; then $(CYGPATH_W) 'ipmi-locate.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-locate.c'; fi` ipmi_locate-ipmi-locate-argp.o: ipmi-locate-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_locate-ipmi-locate-argp.o -MD -MP -MF $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Tpo -c -o ipmi_locate-ipmi-locate-argp.o `test -f 'ipmi-locate-argp.c' || echo '$(srcdir)/'`ipmi-locate-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Tpo $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-locate-argp.c' object='ipmi_locate-ipmi-locate-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_locate-ipmi-locate-argp.o `test -f 'ipmi-locate-argp.c' || echo '$(srcdir)/'`ipmi-locate-argp.c ipmi_locate-ipmi-locate-argp.obj: ipmi-locate-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmi_locate-ipmi-locate-argp.obj -MD -MP -MF $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Tpo -c -o ipmi_locate-ipmi-locate-argp.obj `if test -f 'ipmi-locate-argp.c'; then $(CYGPATH_W) 'ipmi-locate-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-locate-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Tpo $(DEPDIR)/ipmi_locate-ipmi-locate-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmi-locate-argp.c' object='ipmi_locate-ipmi-locate-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmi_locate_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmi_locate-ipmi-locate-argp.obj `if test -f 'ipmi-locate-argp.c'; then $(CYGPATH_W) 'ipmi-locate-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmi-locate-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmi-locate/Makefile.am0000644002055400205540000000244313527331635017524 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmi-locate ipmi_locate_CPPFLAGS = \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT ipmi_locate_LDADD = \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmi_locate_SOURCES = \ ipmi-locate.c \ ipmi-locate_.h \ ipmi-locate-argp.c \ ipmi-locate-argp.h $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmi-locate/ipmi-locate.c0000644002055400205540000003462613527331635020047 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmi-locate_.h" #include "ipmi-locate-argp.h" #include "freeipmi-portability.h" #include "tool-common.h" #include "tool-util-common.h" static void display_ipmi_locate_info (struct ipmi_locate_info *info) { assert (info); printf ("IPMI Version: %d.%d\n", info->ipmi_version_major, info->ipmi_version_minor); switch (info->locate_driver_type) { case IPMI_LOCATE_DRIVER_NONE: printf ("IPMI locate driver: NONE\n"); break; case IPMI_LOCATE_DRIVER_DEFAULTS: printf ("IPMI locate driver: DEFAULT\n"); break; case IPMI_LOCATE_DRIVER_SMBIOS: printf ("IPMI locate driver: SMBIOS\n"); break; case IPMI_LOCATE_DRIVER_ACPI: printf ("IPMI locate driver: ACPI\n"); break; case IPMI_LOCATE_DRIVER_PCI: printf ("IPMI locate driver: PCI\n"); break; case IPMI_LOCATE_DRIVER_DMIDECODE: printf ("IPMI locate driver: DMIDECODE\n"); break; default: printf ("IPMI locate driver: UNKNOWN\n"); }; switch (info->interface_type) { case IPMI_INTERFACE_RESERVED: printf ("IPMI interface: RESERVED\n"); break; case IPMI_INTERFACE_KCS: printf ("IPMI interface: KCS\n"); break; case IPMI_INTERFACE_SMIC: printf ("IPMI interface: SMIC\n"); break; case IPMI_INTERFACE_BT: printf ("IPMI interface: BT\n"); break; case IPMI_INTERFACE_SSIF: printf ("IPMI interface: SSIF\n"); break; default: printf ("IPMI interface: UNKNOWN\n"); } printf ("BMC driver device: %s\n", info->driver_device); switch (info->address_space_id) { case IPMI_ADDRESS_SPACE_ID_SYSTEM_MEMORY: printf ("BMC memory base address: 0x" FI_64 "X\n", info->driver_address); break; case IPMI_ADDRESS_SPACE_ID_SYSTEM_IO: printf ("BMC I/O base address: 0x" FI_64 "X\n", info->driver_address); break; case IPMI_ADDRESS_SPACE_ID_SMBUS: printf ("BMC SMBUS slave address: 0x%lX\n", (unsigned long)info->driver_address); break; default: printf ("error: Error parsing base address\n"); } printf ("Register spacing: %d\n", info->register_spacing); return; } static void dmidecode_probe_display (ipmi_locate_ctx_t ctx) { struct ipmi_locate_info info; assert (ctx); printf ("Probing KCS device using DMIDECODE... "); if (!ipmi_locate_dmidecode_get_device_info (ctx, IPMI_INTERFACE_KCS, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SMIC device using DMIDECODE... "); if (!ipmi_locate_dmidecode_get_device_info (ctx, IPMI_INTERFACE_SMIC, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing BT device using DMIDECODE... "); if (!ipmi_locate_dmidecode_get_device_info (ctx, IPMI_INTERFACE_BT, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SSIF device using DMIDECODE... "); if (!ipmi_locate_dmidecode_get_device_info (ctx, IPMI_INTERFACE_SSIF, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); return; } static void smbios_probe_display (ipmi_locate_ctx_t ctx) { struct ipmi_locate_info info; assert (ctx); printf ("Probing KCS device using SMBIOS... "); if (!ipmi_locate_smbios_get_device_info (ctx, IPMI_INTERFACE_KCS, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SMIC device using SMBIOS... "); if (!ipmi_locate_smbios_get_device_info (ctx, IPMI_INTERFACE_SMIC, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing BT device using SMBIOS... "); if (!ipmi_locate_smbios_get_device_info (ctx, IPMI_INTERFACE_BT, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SSIF device using SMBIOS... "); if (!ipmi_locate_smbios_get_device_info (ctx, IPMI_INTERFACE_SSIF, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); return; } static void acpi_probe_display (ipmi_locate_ctx_t ctx) { struct ipmi_locate_info info; assert (ctx); printf ("Probing KCS device using ACPI... "); if (!ipmi_locate_acpi_spmi_get_device_info (ctx, IPMI_INTERFACE_KCS, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SMIC device using ACPI... "); if (!ipmi_locate_acpi_spmi_get_device_info (ctx, IPMI_INTERFACE_SMIC, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing BT device using ACPI... "); if (!ipmi_locate_acpi_spmi_get_device_info (ctx, IPMI_INTERFACE_BT, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SSIF device using ACPI... "); if (!ipmi_locate_acpi_spmi_get_device_info (ctx, IPMI_INTERFACE_SSIF, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); return; } static void pci_probe_display (ipmi_locate_ctx_t ctx) { struct ipmi_locate_info info; assert (ctx); printf ("Probing KCS device using PCI... "); if (!ipmi_locate_pci_get_device_info (ctx, IPMI_INTERFACE_KCS, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SMIC device using PCI... "); if (!ipmi_locate_pci_get_device_info (ctx, IPMI_INTERFACE_SMIC, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing BT device using PCI... "); if (!ipmi_locate_pci_get_device_info (ctx, IPMI_INTERFACE_BT, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("Probing SSIF device using PCI... "); if (!ipmi_locate_pci_get_device_info (ctx, IPMI_INTERFACE_SSIF, &info)) { printf ("done\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); return; } static void defaults_display (ipmi_locate_ctx_t ctx) { struct ipmi_locate_info info; assert (ctx); printf ("KCS device default values: "); if (!ipmi_locate_defaults_get_device_info (ctx, IPMI_INTERFACE_KCS, &info)) { printf ("\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); printf ("SMIC device default values: "); if (!ipmi_locate_defaults_get_device_info (ctx, IPMI_INTERFACE_SMIC, &info)) { printf ("\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); #if 0 /* Default values of BT not known, this will always fail */ printf ("BT device default values: "); if (!ipmi_locate_defaults_get_device_info (ctx, IPMI_INTERFACE_BT, &info)) { printf ("\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); #else /* !0 */ printf ("BT device default values: "); printf ("\n"); #endif /* !0 */ printf ("SSIF device default values: "); if (!ipmi_locate_defaults_get_device_info (ctx, IPMI_INTERFACE_SSIF, &info)) { printf ("\n"); display_ipmi_locate_info (&info); } else { if (ipmi_locate_ctx_errnum (ctx) == IPMI_LOCATE_ERR_SYSTEM_ERROR) printf ("FAILED\n"); else printf ("ERROR: %s\n", ipmi_locate_ctx_errormsg (ctx)); } printf ("\n"); return; } int main (int argc, char **argv) { struct ipmi_locate_arguments cmd_args; ipmi_locate_ctx_t ctx = NULL; ipmi_disable_coredump (); ipmi_locate_argp_parse (argc, argv, &cmd_args); if (!ipmi_is_root ()) { fprintf (stderr, "%s: permission denied\n", argv[0]); exit (EXIT_FAILURE); } if (!(ctx = ipmi_locate_ctx_create ())) { fprintf (stderr, "ipmi_locate_ctx_create(): %s", strerror (errno)); exit (EXIT_FAILURE); } dmidecode_probe_display (ctx); smbios_probe_display (ctx); acpi_probe_display (ctx); pci_probe_display (ctx); if (cmd_args.defaults) defaults_display (ctx); ipmi_locate_ctx_destroy (ctx); return (EXIT_SUCCESS); } freeipmi-1.6.4/ipmi-locate/ipmi-locate_.h0000644002055400205540000000224713527331635020205 0ustar00achuachu00000000000000/* * Copyright (C) 2003-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ /* file is named ipmi-locate_.h to differentiate itself from the * library ipmi-locate.h. * * I am scared of the portability of the #include_next directive, so * that's why I'm doing it this way. */ /* file is "ipmi-locate_.h", so double underscore */ #ifndef IPMI_LOCATE__H #define IPMI_LOCATE__H #include enum ipmi_locate_argp_option_keys { DEFAULTS_KEY = 160, }; struct ipmi_locate_arguments { int defaults; }; #endif /* IPMI_LOCATE__H */ freeipmi-1.6.4/ipmi-locate/ipmi-locate-argp.c0000644002055400205540000000526113527331635020767 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifdef HAVE_CONFIG_H #include #endif /* HAVE_CONFIG_H */ #include #include #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "ipmi-locate_.h" #include "ipmi-locate-argp.h" #include "freeipmi-portability.h" const char *argp_program_version = "ipmi-locate - " PACKAGE_VERSION "\n" "Copyright (C) 2005-2015 FreeIPMI Core Team\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmi-locate - IPMI probing utility"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { { "defaults", DEFAULTS_KEY, NULL, 0, "Display system defaults.", 40}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmi_locate_arguments *cmd_args; assert (state); cmd_args = state->input; switch (key) { case DEFAULTS_KEY: cmd_args->defaults++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (ARGP_ERR_UNKNOWN); } return (0); } void ipmi_locate_argp_parse (int argc, char **argv, struct ipmi_locate_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); cmd_args->defaults = 0; argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); } freeipmi-1.6.4/ipmi-locate/ipmi-locate-argp.h0000644002055400205540000000162213527331635020771 0ustar00achuachu00000000000000/* * Copyright (C) 2005-2015 FreeIPMI Core Team * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see . * */ #ifndef IPMI_LOCATE_ARGP_H #define IPMI_LOCATE_ARGP_H #include "ipmi-locate_.h" void ipmi_locate_argp_parse (int argc, char **argv, struct ipmi_locate_arguments *cmd_args); #endif /* IPMI_LOCATE_ARGP_H */ freeipmi-1.6.4/ipmiconsole/0000755002055400205540000000000013527342550015601 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmiconsole/Makefile.in0000644002055400205540000007017413527342445017662 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmiconsole$(EXEEXT) subdir = ipmiconsole DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmiconsole_OBJECTS = ipmiconsole-ipmiconsole.$(OBJEXT) \ ipmiconsole-ipmiconsole-argp.$(OBJEXT) ipmiconsole_OBJECTS = $(am_ipmiconsole_OBJECTS) ipmiconsole_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmiconsole/libipmiconsole.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmiconsole_SOURCES) DIST_SOURCES = $(ipmiconsole_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmiconsole_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -I$(top_builddir)/libipmiconsole/ \ -D_GNU_SOURCE \ -D_REENTRANT ipmiconsole_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmiconsole/libipmiconsole.la ipmiconsole_SOURCES = \ ipmiconsole.c \ ipmiconsole_.h \ ipmiconsole-argp.c \ ipmiconsole-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmiconsole/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmiconsole/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmiconsole$(EXEEXT): $(ipmiconsole_OBJECTS) $(ipmiconsole_DEPENDENCIES) $(EXTRA_ipmiconsole_DEPENDENCIES) @rm -f ipmiconsole$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmiconsole_OBJECTS) $(ipmiconsole_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiconsole-ipmiconsole-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiconsole-ipmiconsole.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmiconsole-ipmiconsole.o: ipmiconsole.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiconsole-ipmiconsole.o -MD -MP -MF $(DEPDIR)/ipmiconsole-ipmiconsole.Tpo -c -o ipmiconsole-ipmiconsole.o `test -f 'ipmiconsole.c' || echo '$(srcdir)/'`ipmiconsole.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiconsole-ipmiconsole.Tpo $(DEPDIR)/ipmiconsole-ipmiconsole.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole.c' object='ipmiconsole-ipmiconsole.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiconsole-ipmiconsole.o `test -f 'ipmiconsole.c' || echo '$(srcdir)/'`ipmiconsole.c ipmiconsole-ipmiconsole.obj: ipmiconsole.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiconsole-ipmiconsole.obj -MD -MP -MF $(DEPDIR)/ipmiconsole-ipmiconsole.Tpo -c -o ipmiconsole-ipmiconsole.obj `if test -f 'ipmiconsole.c'; then $(CYGPATH_W) 'ipmiconsole.c'; else $(CYGPATH_W) '$(srcdir)/ipmiconsole.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiconsole-ipmiconsole.Tpo $(DEPDIR)/ipmiconsole-ipmiconsole.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole.c' object='ipmiconsole-ipmiconsole.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiconsole-ipmiconsole.obj `if test -f 'ipmiconsole.c'; then $(CYGPATH_W) 'ipmiconsole.c'; else $(CYGPATH_W) '$(srcdir)/ipmiconsole.c'; fi` ipmiconsole-ipmiconsole-argp.o: ipmiconsole-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiconsole-ipmiconsole-argp.o -MD -MP -MF $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Tpo -c -o ipmiconsole-ipmiconsole-argp.o `test -f 'ipmiconsole-argp.c' || echo '$(srcdir)/'`ipmiconsole-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Tpo $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole-argp.c' object='ipmiconsole-ipmiconsole-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiconsole-ipmiconsole-argp.o `test -f 'ipmiconsole-argp.c' || echo '$(srcdir)/'`ipmiconsole-argp.c ipmiconsole-ipmiconsole-argp.obj: ipmiconsole-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiconsole-ipmiconsole-argp.obj -MD -MP -MF $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Tpo -c -o ipmiconsole-ipmiconsole-argp.obj `if test -f 'ipmiconsole-argp.c'; then $(CYGPATH_W) 'ipmiconsole-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmiconsole-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Tpo $(DEPDIR)/ipmiconsole-ipmiconsole-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiconsole-argp.c' object='ipmiconsole-ipmiconsole-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiconsole_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiconsole-ipmiconsole-argp.obj `if test -f 'ipmiconsole-argp.c'; then $(CYGPATH_W) 'ipmiconsole-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmiconsole-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-hook uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmiconsole/libipmiconsole.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmiconsole $(DESTDIR)$(sbindir)/ipmi-console uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-console # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmiconsole/Makefile.am0000644002055400205540000000302613527331635017640 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmiconsole ipmiconsole_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -I$(top_builddir)/libipmiconsole/ \ -D_GNU_SOURCE \ -D_REENTRANT ipmiconsole_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmiconsole/libipmiconsole.la ipmiconsole_SOURCES = \ ipmiconsole.c \ ipmiconsole_.h \ ipmiconsole-argp.c \ ipmiconsole-argp.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmiconsole/libipmiconsole.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmiconsole $(DESTDIR)$(sbindir)/ipmi-console uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-console freeipmi-1.6.4/ipmiconsole/ipmiconsole.c0000644002055400205540000004317713527331635020304 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole.c,v 1.73 2010-06-10 22:18:23 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #include /* lib ipmiconsole.h */ #include "ipmiconsole_.h" /* tool ipmiconsole.h */ #include "ipmiconsole-argp.h" #include "freeipmi-portability.h" static struct termios saved_tty; static int raw_mode_set = 0; #define IPMICONSOLE_BUFLEN 4096 static int _set_mode_raw (void) { struct termios tty; if (tcgetattr (STDIN_FILENO, &saved_tty) < 0) { perror ("tcgetattr"); return (-1); } memcpy (&tty, &saved_tty, sizeof (struct termios)); tty.c_iflag = 0; tty.c_oflag = 0; tty.c_cflag &= ~CSIZE; tty.c_cflag |= CS8; tty.c_cflag &= ~PARENB; tty.c_cflag |= CLOCAL; tty.c_lflag &= ~(ECHO | ICANON | IEXTEN | ISIG); tty.c_cc[VMIN] = 1; tty.c_cc[VTIME] = 0; if (tcsetattr (STDIN_FILENO, TCSADRAIN, &tty) < 0) { perror ("tcsetattr"); return (-1); } raw_mode_set++; return (0); } static int _reset_mode (void) { if (!raw_mode_set) return (0); if (tcsetattr (STDIN_FILENO, TCSAFLUSH, &saved_tty) < 0) { perror ("tcsetattr"); return (-1); } return (0); } static int _stdin (ipmiconsole_ctx_t c, char escape_char, int fd, char *buf, unsigned int buflen) { static int last_char_escape = 0; char tbuf[IPMICONSOLE_BUFLEN]; unsigned int tbuflen = 0; ssize_t n; unsigned int i; assert (c); assert (fd); assert (buf); assert (buflen); for (i = 0; i < buflen; i++) { if (last_char_escape) { last_char_escape = 0; if (buf[i] == '?') { printf ("%c? - this menu\r\n", escape_char); printf ("%c. - exit\r\n", escape_char); printf ("%cB - generate break\r\n", escape_char); printf ("%cD - send DEL character\r\n", escape_char); printf ("%c& - & character\r\n", escape_char); } else if (buf[i] == '.') { if (tbuflen) { n = write (fd, tbuf, tbuflen); if (n < 0) { perror ("write"); return (-1); } if (n != tbuflen) { perror ("write"); return (-1); } } /* b/c we're exitting */ return (-1); } else if (buf[i] == 'B') { if (tbuflen) { n = write (fd, tbuf, tbuflen); /* Clear out data, may still use buffer */ memset (tbuf, '\0', IPMICONSOLE_BUFLEN); if (n < 0) { perror ("write"); return (-1); } if (n != tbuflen) { perror ("write"); return (-1); } } tbuflen = 0; printf ("[generate break]\r\n"); if (ipmiconsole_ctx_generate_break (c) < 0) { fprintf (stderr, "ipmiconsole_ctx_generate_break: %s\r\n", ipmiconsole_ctx_errormsg (c)); return (-1); } } else if (buf[i] == 'D') { /* achu: Some keyboards don't send DEL when you press delete, they send some other funky crap. */ tbuf[tbuflen++] = 0x7F; } else if (buf[i] == escape_char) tbuf[tbuflen++] = escape_char; else { tbuf[tbuflen++] = escape_char; tbuf[tbuflen++] = buf[i]; } } else if (buf[i] == escape_char) last_char_escape = 1; else tbuf[tbuflen++] = buf[i]; } if (tbuflen) { n = write (fd, tbuf, tbuflen); if (n < 0) { if (errno != EPIPE) perror ("write"); else { if (ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_STOLEN) printf ("\r\n[%s]\r\n", ipmiconsole_ctx_errormsg (c)); else printf ("\r\n[error received]: %s\r\n", ipmiconsole_ctx_errormsg (c)); } return (-1); } if (n != tbuflen) { perror ("write"); return (-1); } } return (0); } int main (int argc, char **argv) { struct ipmiconsole_arguments cmd_args; struct ipmiconsole_ipmi_config ipmi_config; struct ipmiconsole_protocol_config protocol_config; struct ipmiconsole_engine_config engine_config; ipmiconsole_ctx_t c = NULL; int debug_flags = 0; int fd = -1; ipmiconsole_argp_parse (argc, argv, &cmd_args); if (cmd_args.common_args.debug) { #ifndef NDEBUG if (cmd_args.debugfile) debug_flags |= IPMICONSOLE_DEBUG_FILE; else debug_flags |= IPMICONSOLE_DEBUG_STDERR; #else debug_flags |= IPMICONSOLE_DEBUG_STDERR; #endif /* NDEBUG */ debug_flags |= IPMICONSOLE_DEBUG_IPMI_PACKETS; } if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) { /* Argh, it doesn't return an errno, oh well */ perror ("signal"); exit (EXIT_FAILURE); } if (ipmiconsole_engine_init (1, debug_flags) < 0) { perror ("ipmiconsole_setup"); exit (EXIT_FAILURE); } /* convert config information to ipmiconsole configuration */ ipmi_config.username = cmd_args.common_args.username; ipmi_config.password = cmd_args.common_args.password; ipmi_config.k_g = cmd_args.common_args.k_g; ipmi_config.k_g_len = cmd_args.common_args.k_g_len; if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_USER) ipmi_config.privilege_level = IPMICONSOLE_PRIVILEGE_USER; else if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR) ipmi_config.privilege_level = IPMICONSOLE_PRIVILEGE_OPERATOR; else if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN) ipmi_config.privilege_level = IPMICONSOLE_PRIVILEGE_ADMIN; else { fprintf (stderr, "Config Error: Invalid privilege level"); exit (EXIT_FAILURE); } ipmi_config.cipher_suite_id = cmd_args.common_args.cipher_suite_id; ipmi_config.workaround_flags = 0; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_AUTHENTICATION_CAPABILITIES; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_INTEL_2_0_SESSION; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_SUPERMICRO_2_0_SESSION; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_SUN_2_0_SESSION; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_OPEN_SESSION_PRIVILEGE; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_NON_EMPTY_INTEGRITY_CHECK_VALUE; if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_NO_CHECKSUM_CHECK; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PAYLOAD_SIZE) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_IGNORE_SOL_PAYLOAD_SIZE; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IGNORE_SOL_PORT) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_IGNORE_SOL_PORT; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_SOL_ACTIVATION_STATUS) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_SKIP_SOL_ACTIVATION_STATUS; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SKIP_CHANNEL_PAYLOAD_SUPPORT) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_SKIP_CHANNEL_PAYLOAD_SUPPORT; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_SERIAL_ALERTS_DEFERRED) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_SERIAL_ALERTS_DEFERRED; if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_INCREMENT_SOL_PACKET_SEQUENCE) ipmi_config.workaround_flags |= IPMICONSOLE_WORKAROUND_INCREMENT_SOL_PACKET_SEQUENCE; protocol_config.session_timeout_len = cmd_args.common_args.session_timeout; protocol_config.retransmission_timeout_len = cmd_args.common_args.retransmission_timeout; protocol_config.retransmission_backoff_count = -1; protocol_config.keepalive_timeout_len = -1; protocol_config.retransmission_keepalive_timeout_len = -1; protocol_config.acceptable_packet_errors_count = -1; protocol_config.maximum_retransmission_count = -1; engine_config.engine_flags = 0; if (cmd_args.serial_keepalive) engine_config.engine_flags |= IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE; if (cmd_args.serial_keepalive_empty) engine_config.engine_flags |= IPMICONSOLE_ENGINE_SERIAL_KEEPALIVE_EMPTY; if (cmd_args.lock_memory) engine_config.engine_flags |= IPMICONSOLE_ENGINE_LOCK_MEMORY; engine_config.behavior_flags = 0; if (cmd_args.dont_steal) engine_config.behavior_flags |= IPMICONSOLE_BEHAVIOR_ERROR_ON_SOL_INUSE; if (cmd_args.deactivate) engine_config.behavior_flags |= IPMICONSOLE_BEHAVIOR_DEACTIVATE_ONLY; if (cmd_args.deactivate_all_instances) engine_config.behavior_flags |= IPMICONSOLE_BEHAVIOR_DEACTIVATE_ALL_INSTANCES; engine_config.debug_flags = debug_flags; if (!(c = ipmiconsole_ctx_create (cmd_args.common_args.hostname, &ipmi_config, &protocol_config, &engine_config))) { perror ("ipmiconsole_ctx_create"); goto cleanup; } if (cmd_args.sol_payload_instance) { if (ipmiconsole_ctx_set_config (c, IPMICONSOLE_CTX_CONFIG_OPTION_SOL_PAYLOAD_INSTANCE, &(cmd_args.sol_payload_instance)) < 0) { fprintf (stderr, "ipmiconsole_submit_block: %s\r\n", ipmiconsole_ctx_errormsg (c)); goto cleanup; } } if (ipmiconsole_engine_submit_block (c) < 0) { if (ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_IPMI_2_0_UNAVAILABLE || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_CIPHER_SUITE_ID_UNAVAILABLE || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_HOSTNAME_INVALID || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_USERNAME_INVALID || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_PASSWORD_INVALID || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_K_G_INVALID || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_UNAVAILABLE || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_INUSE || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_REQUIRES_ENCRYPTION || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_REQUIRES_NO_ENCRYPTION || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_BMC_BUSY || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_BMC_ERROR || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_BMC_IMPLEMENTATION || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_CONNECTION_TIMEOUT || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SESSION_TIMEOUT || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_EXCESS_RETRANSMISSIONS_SENT || ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_EXCESS_ERRORS_RECEIVED) printf ("[error received]: %s\n", ipmiconsole_ctx_errormsg (c)); else fprintf (stderr, "ipmiconsole_submit_block: %s\r\n", ipmiconsole_ctx_errormsg (c)); goto cleanup; } if (cmd_args.deactivate) goto cleanup; if ((fd = ipmiconsole_ctx_fd (c)) < 0) { fprintf (stderr, "ipmiconsole_ctx_fd: %s\r\n", ipmiconsole_ctx_errormsg (c)); goto cleanup; } #ifndef NDEBUG if (!cmd_args.noraw) { if (_set_mode_raw () < 0) goto cleanup; } #else /* !NDEBUG */ if (_set_mode_raw () < 0) goto cleanup; #endif /* !NDEBUG */ printf ("[SOL established]\r\n"); while (1) { char buf[IPMICONSOLE_BUFLEN]; struct timeval tv; ssize_t n; fd_set rds; FD_ZERO (&rds); FD_SET (fd, &rds); FD_SET (STDIN_FILENO, &rds); tv.tv_sec = 0; tv.tv_usec = 250000; if (select (fd + 1, &rds, NULL, NULL, &tv) < 0) { perror ("select"); goto cleanup; } if (FD_ISSET (STDIN_FILENO, &rds)) { if ((n = read (STDIN_FILENO, buf, IPMICONSOLE_BUFLEN)) < 0) { perror ("read"); goto cleanup; } if (!n) goto cleanup; if (_stdin (c, cmd_args.escape_char, fd, buf, n) < 0) goto cleanup; } if (FD_ISSET (fd, &rds)) { if ((n = read (fd, buf, IPMICONSOLE_BUFLEN)) < 0) { perror ("read"); goto cleanup; } if (n) { if (write (STDOUT_FILENO, buf, n) != n) { perror ("write"); goto cleanup; } } else { /* b/c we're exitting */ /* achu: it is possible that errnum can equal success. * Most likely scenario is user sets a flag in the * libipmiconsole.conf file that alters the behavior of * what this tool expects to happen. For example, if * user specifies deactivate on the command line, we * know to quit early. However, if the user does so in * libipmiconsole.conf, we as a tool won't know to * expect it. */ if (ipmiconsole_ctx_errnum (c) == IPMICONSOLE_ERR_SOL_STOLEN) printf ("\r\n[%s]\r\n", ipmiconsole_ctx_errormsg (c)); else if (ipmiconsole_ctx_errnum (c) != IPMICONSOLE_ERR_SUCCESS) printf ("\r\n[error received]: %s\r\n", ipmiconsole_ctx_errormsg (c)); goto cleanup; } } /* Clear out data, may still use buffer */ memset (buf, '\0', IPMICONSOLE_BUFLEN); } cleanup: if (fd >= 0) { printf ("\r\n[closing the connection]\r\n"); /* ignore potential error, cleanup path */ close (fd); } ipmiconsole_ctx_destroy (c); ipmiconsole_engine_teardown (1); #ifndef NDEBUG if (!cmd_args.noraw) _reset_mode (); #else /* !NDEBUG */ _reset_mode (); #endif /* !NDEBUG */ return (EXIT_SUCCESS); } freeipmi-1.6.4/ipmiconsole/ipmiconsole_.h0000644002055400205540000000465313527331635020444 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole_.h,v 1.7 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ /* file is named ipmiconsole_.h to differentiate itself from the * library ipmiconsole.h. * * I am scared of the portability of the #include_next directive, so * that's why I'm doing it this way. */ /* file is "ipmiconsole_.h", so double underscore */ #ifndef IPMICONSOLE__H #define IPMICONSOLE__H #include #include "tool-cmdline-common.h" enum ipmiconsole_argp_option_keys { DONT_STEAL_KEY = 160, DEACTIVATE_KEY = 161, SERIAL_KEEPALIVE_KEY = 162, SERIAL_KEEPALIVE_EMPTY_KEY = 163, SOL_PAYLOAD_INSTANCE_KEY = 164, DEACTIVATE_ALL_INSTANCES_KEY = 165, LOCK_MEMORY_KEY = 166, ESCAPE_CHAR_KEY = 'e', DEBUG_KEY = 167, DEBUGFILE_KEY = 168, NORAW_KEY = 169, }; struct ipmiconsole_arguments { struct common_cmd_args common_args; char escape_char; int dont_steal; int deactivate; int serial_keepalive; int serial_keepalive_empty; unsigned int sol_payload_instance; int deactivate_all_instances; int lock_memory; #ifndef NDEBUG int debugfile; int noraw; #endif /* NDEBUG */ }; #endif /* IPMICONSOLE__H */ freeipmi-1.6.4/ipmiconsole/ipmiconsole-argp.c0000644002055400205540000002304513527331635021223 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole-argp.c,v 1.33 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include /* lib ipmiconsole.h */ #include "ipmiconsole_.h" /* tool ipmiconsole.h */ #include "ipmiconsole-argp.h" #include "freeipmi-portability.h" #include "conffile.h" #include "secure.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" const char *argp_program_version = "ipmiconsole - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.\n" "Copyright (C) 2006-2007 The Regents of the University of California.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmiconsole - IPMI console utility"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_OUTOFBAND, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_OPTIONS_DEBUG, { "escape-char", ESCAPE_CHAR_KEY, "CHAR", 0, "Specify an alternate escape character (default char '&')", 40}, { "dont-steal", DONT_STEAL_KEY, 0, 0, "Do not steal an SOL session if one is already detected as being in use.", 41}, { "deactivate", DEACTIVATE_KEY, 0, 0, "Deactivate a SOL session if one is detected as being in use and exit.", 42}, { "serial-keepalive", SERIAL_KEEPALIVE_KEY, 0, 0, "Occasionally send NUL characters to detect inactive serial connections.", 43}, { "serial-keepalive-empty", SERIAL_KEEPALIVE_EMPTY_KEY, 0, 0, "Occasionally send empty SOL packets to detect inactive serial connections.", 44}, { "sol-payload-instance", SOL_PAYLOAD_INSTANCE_KEY, "NUM", 0, "Specify SOL payload instance number.", 45}, { "deactivate-all-instances", DEACTIVATE_ALL_INSTANCES_KEY, 0, 0, "Deactivate all payload instances instead of just the configured payload instance.", 46}, { "lock-memory", LOCK_MEMORY_KEY, 0, 0, "Lock sensitive information (such as usernames and passwords) in memory.", 47}, { "debugfile", DEBUGFILE_KEY, 0, 0, "Output debugging to files in current directory rather than to standard output.", 48}, #ifndef NDEBUG { "noraw", NORAW_KEY, 0, 0, "Don't enter terminal raw mode.", 49}, #endif { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmiconsole_arguments *cmd_args; char *endptr; int tmp; assert (state); cmd_args = state->input; switch (key) { case ESCAPE_CHAR_KEY: /* --escape-char */ cmd_args->escape_char = *arg; break; case DONT_STEAL_KEY: /* --dont-steal */ cmd_args->dont_steal++; break; case DEACTIVATE_KEY: /* --deactivate */ cmd_args->deactivate++; break; case SERIAL_KEEPALIVE_KEY: /* --serial-keepalive */ cmd_args->serial_keepalive++; break; case SERIAL_KEEPALIVE_EMPTY_KEY: /* --serial-keepalive-empty */ cmd_args->serial_keepalive_empty++; break; case SOL_PAYLOAD_INSTANCE_KEY: /* --sol-payload-instance */ errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || !IPMI_PAYLOAD_INSTANCE_VALID (tmp)) { fprintf (stderr, "invalid sol payload instance\n"); exit (EXIT_FAILURE); } cmd_args->sol_payload_instance = tmp; break; case DEACTIVATE_ALL_INSTANCES_KEY: /* --deactivate-all-instances */ cmd_args->deactivate_all_instances++; break; case LOCK_MEMORY_KEY: /* --lock-memory */ cmd_args->lock_memory++; break; #ifndef NDEBUG case DEBUGFILE_KEY: /* --debugfile */ cmd_args->debugfile++; break; case NORAW_KEY: /* --noraw */ cmd_args->noraw++; break; #endif /* NDEBUG */ case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmiconsole_config_file_parse (struct ipmiconsole_arguments *cmd_args) { struct config_file_data_ipmiconsole config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmiconsole)); if (!cmd_args->common_args.config_file) { /* try legacy file first */ if (!config_file_parse (IPMICONSOLE_CONFIG_FILE_LEGACY, 1, /* do not exit if file not found */ &(cmd_args->common_args), CONFIG_FILE_OUTOFBAND, CONFIG_FILE_TOOL_IPMICONSOLE, &config_file_data)) goto out; } if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_OUTOFBAND, CONFIG_FILE_TOOL_IPMICONSOLE, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } out: if (config_file_data.escape_char_count) cmd_args->escape_char = config_file_data.escape_char; if (config_file_data.dont_steal_count) cmd_args->dont_steal = config_file_data.dont_steal; if (config_file_data.serial_keepalive_count) cmd_args->serial_keepalive = config_file_data.serial_keepalive; if (config_file_data.serial_keepalive_empty_count) cmd_args->serial_keepalive_empty = config_file_data.serial_keepalive_empty; if (config_file_data.lock_memory_count) cmd_args->lock_memory = config_file_data.lock_memory; } static void _ipmiconsole_args_validate (struct ipmiconsole_arguments *cmd_args) { assert (cmd_args); if (!cmd_args->common_args.hostname) { fprintf (stderr, "hostname input required\n"); exit (EXIT_FAILURE); } } void ipmiconsole_argp_parse (int argc, char **argv, struct ipmiconsole_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_admin (&(cmd_args->common_args)); /* ipmiconsole differences */ cmd_args->common_args.driver_type = IPMI_DEVICE_LAN_2_0; cmd_args->common_args.session_timeout = 60000; cmd_args->common_args.retransmission_timeout = 500; cmd_args->escape_char = '&'; cmd_args->dont_steal = 0; cmd_args->deactivate = 0; cmd_args->serial_keepalive = 0; cmd_args->serial_keepalive_empty = 0; cmd_args->sol_payload_instance = 0; cmd_args->deactivate_all_instances = 0; cmd_args->lock_memory = 0; #ifndef NDEBUG cmd_args->debugfile = 0; cmd_args->noraw = 0; #endif /* NDEBUG */ argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmiconsole_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmiconsole_args_validate (cmd_args); } freeipmi-1.6.4/ipmiconsole/ipmiconsole-argp.h0000644002055400205540000000306413527331635021227 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiconsole-argp.h,v 1.7 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMICONSOLE_ARGP_H #define IPMICONSOLE_ARGP_H #include "ipmiconsole.h" void ipmiconsole_argp_parse (int argc, char **argv, struct ipmiconsole_arguments *cmd_args); #endif /* IPMICONSOLE_ARGP_H */ freeipmi-1.6.4/ipmidetect/0000755002055400205540000000000013527342550015407 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmidetect/Makefile.in0000644002055400205540000006660513527342445017474 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmidetect$(EXEEXT) subdir = ipmidetect DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmidetect_OBJECTS = ipmidetect-ipmidetect.$(OBJEXT) \ ipmidetect-ipmidetect-argp.$(OBJEXT) ipmidetect_OBJECTS = $(am_ipmidetect_OBJECTS) ipmidetect_DEPENDENCIES = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmidetect_SOURCES) DIST_SOURCES = $(ipmidetect_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmidetect_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect/ \ -D_GNU_SOURCE \ -D_REENTRANT ipmidetect_LDADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la ipmidetect_SOURCES = \ ipmidetect.c \ ipmidetect_.h \ ipmidetect-argp.c \ ipmidetect-argp.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmidetect/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmidetect/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmidetect$(EXEEXT): $(ipmidetect_OBJECTS) $(ipmidetect_DEPENDENCIES) $(EXTRA_ipmidetect_DEPENDENCIES) @rm -f ipmidetect$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmidetect_OBJECTS) $(ipmidetect_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmidetect-ipmidetect-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmidetect-ipmidetect.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmidetect-ipmidetect.o: ipmidetect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetect-ipmidetect.o -MD -MP -MF $(DEPDIR)/ipmidetect-ipmidetect.Tpo -c -o ipmidetect-ipmidetect.o `test -f 'ipmidetect.c' || echo '$(srcdir)/'`ipmidetect.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetect-ipmidetect.Tpo $(DEPDIR)/ipmidetect-ipmidetect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetect.c' object='ipmidetect-ipmidetect.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetect-ipmidetect.o `test -f 'ipmidetect.c' || echo '$(srcdir)/'`ipmidetect.c ipmidetect-ipmidetect.obj: ipmidetect.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetect-ipmidetect.obj -MD -MP -MF $(DEPDIR)/ipmidetect-ipmidetect.Tpo -c -o ipmidetect-ipmidetect.obj `if test -f 'ipmidetect.c'; then $(CYGPATH_W) 'ipmidetect.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetect.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetect-ipmidetect.Tpo $(DEPDIR)/ipmidetect-ipmidetect.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetect.c' object='ipmidetect-ipmidetect.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetect-ipmidetect.obj `if test -f 'ipmidetect.c'; then $(CYGPATH_W) 'ipmidetect.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetect.c'; fi` ipmidetect-ipmidetect-argp.o: ipmidetect-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetect-ipmidetect-argp.o -MD -MP -MF $(DEPDIR)/ipmidetect-ipmidetect-argp.Tpo -c -o ipmidetect-ipmidetect-argp.o `test -f 'ipmidetect-argp.c' || echo '$(srcdir)/'`ipmidetect-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetect-ipmidetect-argp.Tpo $(DEPDIR)/ipmidetect-ipmidetect-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetect-argp.c' object='ipmidetect-ipmidetect-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetect-ipmidetect-argp.o `test -f 'ipmidetect-argp.c' || echo '$(srcdir)/'`ipmidetect-argp.c ipmidetect-ipmidetect-argp.obj: ipmidetect-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetect-ipmidetect-argp.obj -MD -MP -MF $(DEPDIR)/ipmidetect-ipmidetect-argp.Tpo -c -o ipmidetect-ipmidetect-argp.obj `if test -f 'ipmidetect-argp.c'; then $(CYGPATH_W) 'ipmidetect-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetect-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetect-ipmidetect-argp.Tpo $(DEPDIR)/ipmidetect-ipmidetect-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetect-argp.c' object='ipmidetect-ipmidetect-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetect_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetect-ipmidetect-argp.obj `if test -f 'ipmidetect-argp.c'; then $(CYGPATH_W) 'ipmidetect-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetect-argp.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-hook uninstall-sbinPROGRAMS $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmidetect $(DESTDIR)$(sbindir)/ipmi-detect uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-detect # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmidetect/Makefile.am0000644002055400205540000000256113527331636017452 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: Makefile.am,v 1.11 2008-09-17 22:56:04 chu11 Exp $ ##***************************************************************************** ## Process this file with automake to produce Makefile.in. ##***************************************************************************** sbin_PROGRAMS = ipmidetect ipmidetect_CPPFLAGS = \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect/ \ -D_GNU_SOURCE \ -D_REENTRANT ipmidetect_LDADD = \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la ipmidetect_SOURCES = \ ipmidetect.c \ ipmidetect_.h \ ipmidetect-argp.c \ ipmidetect-argp.h $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmidetect $(DESTDIR)$(sbindir)/ipmi-detect uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-detect freeipmi-1.6.4/ipmidetect/ipmidetect.c0000644002055400205540000002533713527331636017717 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.c,v 1.17 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_GETOPT_H #include #endif /* HAVE_GETOPT_H */ #include #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include /* library ipmidetect.h */ #include "ipmidetect_.h" /* tool ipmidetect.h */ #include "ipmidetect-argp.h" #include "freeipmi-portability.h" #include "error.h" #include "fd.h" #include "fi_hostlist.h" /* * Definitions */ #define IPMIDETECT_BUFFERLEN 65536 #define IPMIDETECT_FORMATLEN 64 #define IPMIDETECT_OPTIONS_LEN 64 #define IPMIDETECT_LONG_OPTIONS_LEN 32 #define IPMIDETECT_MAXPATHLEN 256 /* * Ipmidetect output data */ static char detected_nodes[IPMIDETECT_BUFFERLEN]; static char undetected_nodes[IPMIDETECT_BUFFERLEN]; static char detectedfmt[IPMIDETECT_FORMATLEN]; static char undetectedfmt[IPMIDETECT_FORMATLEN]; static int detected_count = -1; static int undetected_count = -1; static ipmidetect_t handle; struct ipmidetect_arguments cmd_args; /* * _get_input_nodes * * Get the detected or undetected status of nodes specified on the * cmdline or standard input. */ static void _get_input_nodes (char *buf, int buflen, int which) { fi_hostlist_t hl = NULL; fi_hostlist_iterator_t iter = NULL; char *node = NULL; assert (buf && buflen); assert (which == IPMIDETECT_DETECTED_NODES || which == IPMIDETECT_UNDETECTED_NODES); if (!(hl = fi_hostlist_create (NULL))) err_exit ("fi_hostlist_create"); if (!(iter = fi_hostlist_iterator_create (cmd_args.inputted_nodes))) err_exit ("fi_hostlist_iterator_create"); while ((node = fi_hostlist_next (iter))) { int rv; if (which == IPMIDETECT_DETECTED_NODES) rv = ipmidetect_is_node_detected (handle, node); else rv = ipmidetect_is_node_undetected (handle, node); if (rv < 0) { if (ipmidetect_errnum (handle) == IPMIDETECT_ERR_NOTFOUND) err_exit ("Unknown node \"%s\"", node); else { char *msg = ipmidetect_errormsg (handle); if (which == IPMIDETECT_DETECTED_NODES) err_exit ("ipmidetect_is_node_detected: %s", msg); else err_exit ("ipmidetect_is_node_undetected: %s", msg); } } if (rv) { if (!fi_hostlist_push_host (hl, node)) err_exit ("fi_hostlist_push_host"); } free (node); } fi_hostlist_sort (hl); if (fi_hostlist_ranged_string (hl, buflen, buf) < 0) err_exit ("fi_hostlist_ranged_string"); fi_hostlist_iterator_destroy (iter); fi_hostlist_destroy (hl); } /* * _get_all_nodes * * Get the detected or undetected status of all nodes. */ static void _get_all_nodes (char *buf, int buflen, int which) { int rv; assert (buf && buflen > 0); assert (which == IPMIDETECT_DETECTED_NODES || which == IPMIDETECT_UNDETECTED_NODES); if (which == IPMIDETECT_DETECTED_NODES) rv = ipmidetect_get_detected_nodes_string (handle, buf, buflen); else rv = ipmidetect_get_undetected_nodes_string (handle, buf, buflen); if (rv < 0) { char *msg = ipmidetect_errormsg (handle); if (which == IPMIDETECT_DETECTED_NODES) err_exit ("ipmidetect_get_detected_nodes_string: %s", msg); else err_exit ("ipmidetect_get_undetected_nodes_string: %s", msg); } } /* * _get_nodes * * get the detected or undetected status of nodes. The appropriate * function call to _get_input_nodes or _get_all_nodes will be done. */ static void _get_nodes (char *buf, int buflen, int which, int *count) { fi_hostlist_t hl = NULL; assert (buf && buflen > 0 && count); assert (which == IPMIDETECT_DETECTED_NODES || which == IPMIDETECT_UNDETECTED_NODES); if (fi_hostlist_count (cmd_args.inputted_nodes) > 0) _get_input_nodes (buf, buflen, which); else _get_all_nodes (buf, buflen, which); if (!(hl = fi_hostlist_create (buf))) err_exit ("fi_hostlist_create"); *count = fi_hostlist_count (hl); fi_hostlist_destroy (hl); } /* * _output_nodes * * output the nodes specified in the nodebuf to stdout */ static void _output_nodes (char *nodebuf) { assert (nodebuf); if (!cmd_args.output_format) fprintf (stdout, "%s\n", nodebuf); else { char tbuf[IPMIDETECT_BUFFERLEN]; fi_hostlist_t hl = NULL; char *ptr; /* output nodes separated by some break type */ memset (tbuf, '\0', IPMIDETECT_BUFFERLEN); if (!(hl = fi_hostlist_create (nodebuf))) err_exit ("fi_hostlist_create"); if (fi_hostlist_deranged_string (hl, IPMIDETECT_BUFFERLEN, tbuf) < 0) err_exit ("fi_hostlist_deranged_string"); /* convert commas to appropriate break types */ if (cmd_args.output_format != ',') { while ((ptr = strchr (tbuf, ','))) *ptr = (char)cmd_args.output_format; } /* start on the next line if its a newline separator */ if (cmd_args.output_type == IPMIDETECT_DETECTED_AND_UNDETECTED_NODES && cmd_args.output_format == '\n') fprintf (stdout, "\n"); fprintf (stdout,"%s\n", tbuf); fi_hostlist_destroy (hl); } } /* * _log10 * * portable log10() function that also allows us to avoid linking * against the math library. */ static int _log10 (int num) { int count = 0; if (num > 0) { while ((num /= 10) > 0) count++; } return (count); } /* * _create_formats * * create the output formats based on the detected and undetected count. */ static void _create_formats (char *endstr) { int max; assert (detected_count >= 0 && undetected_count >= 0); if (detected_count > undetected_count) max = _log10 (detected_count); else max = _log10 (undetected_count); max++; snprintf (detectedfmt, IPMIDETECT_FORMATLEN, "detected: %%%dd%s", max, endstr); snprintf (undetectedfmt, IPMIDETECT_FORMATLEN, "undetected: %%%dd%s", max, endstr); } /* * _output_data * * Output the current upundetected state based on inputs from the command line * * Returns exit_val; */ int _output_data (void) { int exit_val; if (ipmidetect_load_data (handle, cmd_args.hostname, cmd_args.port, 0) < 0) { int errnum = ipmidetect_errnum (handle); char *msg = ipmidetect_errormsg (handle); /* Check for "legit" errors and output appropriate message */ if (errnum == IPMIDETECT_ERR_CONF_PARSE) err_exit ("Parse error in conf file"); else if (errnum == IPMIDETECT_ERR_CONNECT) err_exit ("Cannot connect to server"); else if (errnum == IPMIDETECT_ERR_CONNECT_TIMEOUT) err_exit ("Timeout connecting to server"); else if (errnum == IPMIDETECT_ERR_HOSTNAME_INVALID) err_exit ("Invalid hostname"); else err_exit ("ipmidetect_load_data: %s", msg); } _get_nodes (detected_nodes, IPMIDETECT_BUFFERLEN, IPMIDETECT_DETECTED_NODES, &detected_count); _get_nodes (undetected_nodes, IPMIDETECT_BUFFERLEN, IPMIDETECT_UNDETECTED_NODES, &undetected_count); /* output up, undetected, or both up and undetected nodes */ if (cmd_args.output_type == IPMIDETECT_DETECTED_AND_UNDETECTED_NODES) { if (cmd_args.output_format == '\n') { /* newline output is funny, thus special */ snprintf (detectedfmt, IPMIDETECT_FORMATLEN, "detected %d:", detected_count); snprintf (undetectedfmt, IPMIDETECT_FORMATLEN, "undetected %d:", undetected_count); } else _create_formats (": "); fprintf (stdout, detectedfmt, detected_count); _output_nodes (detected_nodes); /* handle odd situation with newline output list */ if (cmd_args.output_format == '\n') fprintf (stdout, "\n"); fprintf (stdout, undetectedfmt, undetected_count); _output_nodes (undetected_nodes); } else if (cmd_args.output_type == IPMIDETECT_DETECTED_NODES) _output_nodes (detected_nodes); else _output_nodes (undetected_nodes); if (cmd_args.output_type == IPMIDETECT_DETECTED_AND_UNDETECTED_NODES) exit_val = EXIT_SUCCESS; else if (cmd_args.output_type == IPMIDETECT_DETECTED_NODES) exit_val = (!undetected_count) ? EXIT_SUCCESS : EXIT_FAILURE; else exit_val = (!detected_count) ? EXIT_SUCCESS : EXIT_FAILURE; return (exit_val); } int main (int argc, char *argv[]) { int exit_val; err_init (argv[0]); err_init_exit_value (2); err_set_flags (ERROR_STDERR); ipmidetect_argp_parse (argc, argv, &cmd_args); if (!(handle = ipmidetect_handle_create ())) err_exit ("ipmidetect_handle_create: %s", strerror (errno)); exit_val = _output_data (); (void)ipmidetect_handle_destroy (handle); fi_hostlist_destroy (cmd_args.inputted_nodes); exit (exit_val); } freeipmi-1.6.4/ipmidetect/ipmidetect_.h0000644002055400205540000000463513527331636020061 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ /* file is named ipmidetect_.h to differentiate itself from the * library ipmidetect.h. * * I am scared of the portability of the #include_next directive, so * that's why I'm doing it this way. */ /* file is "ipmidetect_.h", so double underscore */ #ifndef IPMIDETECT__H #define IPMIDETECT__H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "fi_hostlist.h" enum ipmidetect_argp_option_keys { IPMIDETECT_HOSTNAME_KEY = 'h', IPMIDETECT_LEGACY_HOSTNAME_KEY = 'o', /* legacy */ IPMIDETECT_PORT_KEY = 'p', IPMIDETECT_DETECTED_KEY = 'd', IPMIDETECT_UNDETECTED_KEY = 'u', IPMIDETECT_HOSTRANGE_KEY = 'q', IPMIDETECT_COMMA_KEY = 'c', IPMIDETECT_NEWLINE_KEY = 'n', IPMIDETECT_SPACE_KEY = 's', }; enum ipmidetect_output_type { IPMIDETECT_DETECTED_NODES, IPMIDETECT_UNDETECTED_NODES, IPMIDETECT_DETECTED_AND_UNDETECTED_NODES, }; struct ipmidetect_arguments { char *hostname; int port; int output_type; char output_format; fi_hostlist_t inputted_nodes; }; #endif /* IPMIDETECT__H */ freeipmi-1.6.4/ipmidetect/ipmidetect-argp.c0000644002055400205540000001512413527331636020637 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include #include "ipmidetect_.h" #include "ipmidetect-argp.h" #include "freeipmi-portability.h" #include "error.h" #include "fd.h" #include "fi_hostlist.h" const char *argp_program_version = "ipmidetect - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.\n" "Copyright (C) 2007 The Regents of the University of California.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmidetect - IPMI node detection client"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { { "hostname", IPMIDETECT_HOSTNAME_KEY, "HOST", 0, "Specify alternate server hostname", 1}, { "hostname_legacy", IPMIDETECT_LEGACY_HOSTNAME_KEY, "HOST", OPTION_HIDDEN, "Specify alternate server hostname", 2}, { "port", IPMIDETECT_PORT_KEY, "PORT", 0, "Specify alternate server port", 3}, { "detected", IPMIDETECT_DETECTED_KEY, 0, 0, "Output only detected nodes", 4}, { "undetected", IPMIDETECT_UNDETECTED_KEY, 0, 0, "Output only undetected nodes", 5}, { "hostrange", IPMIDETECT_HOSTRANGE_KEY, 0, 0, "Output in hostrange format", 6}, { "comma", IPMIDETECT_COMMA_KEY, 0, 0, "Output in comma separated format", 7}, { "newline", IPMIDETECT_NEWLINE_KEY, 0, 0, "Output in newline separated format", 8}, { "space", IPMIDETECT_SPACE_KEY, 0, 0, "Output in space separated format", 9}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; #define IPMIDETECT_STDIN_BUFFERLEN 65536 static void _push_inputted_nodes (struct ipmidetect_arguments *cmd_args, const char *nodes) { assert (cmd_args); assert (nodes); /* Error if nodes aren't short hostnames */ if (strchr (nodes, '.')) err_exit ("nodes must be listed in short hostname format"); if (!fi_hostlist_push (cmd_args->inputted_nodes, nodes)) err_exit ("nodes improperly formatted"); } static void _read_nodes_from_stdin (struct ipmidetect_arguments *cmd_args) { char buf[IPMIDETECT_STDIN_BUFFERLEN]; int n; assert (cmd_args); memset (buf, '\0', IPMIDETECT_STDIN_BUFFERLEN); if ((n = fd_read_n (STDIN_FILENO, buf, IPMIDETECT_STDIN_BUFFERLEN)) < 0) err_exit ("error reading from standard input: %s", strerror (errno)); if (n == IPMIDETECT_STDIN_BUFFERLEN) err_exit ("overflow in standard input buffer"); if (n > 0) { char *ptr = strtok (buf, " \t\n\0"); while (ptr) { _push_inputted_nodes (cmd_args, ptr); ptr = strtok (NULL, " \t\n\0"); } } } static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmidetect_arguments *cmd_args; char *endptr; assert (state); cmd_args = state->input; switch (key) { case IPMIDETECT_HOSTNAME_KEY: case IPMIDETECT_LEGACY_HOSTNAME_KEY: if (!(cmd_args->hostname = strdup (arg))) err_exit ("strdup: %s", strerror (errno)); break; case IPMIDETECT_PORT_KEY: errno = 0; cmd_args->port = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0') err_exit ("invalid port specified"); break; case IPMIDETECT_DETECTED_KEY: cmd_args->output_type = IPMIDETECT_DETECTED_NODES; break; case IPMIDETECT_UNDETECTED_KEY: cmd_args->output_type = IPMIDETECT_UNDETECTED_NODES; break; case IPMIDETECT_HOSTRANGE_KEY: cmd_args->output_format = 0; break; case IPMIDETECT_COMMA_KEY: cmd_args->output_format = ','; break; case IPMIDETECT_NEWLINE_KEY: cmd_args->output_format = '\n'; break; case IPMIDETECT_SPACE_KEY: cmd_args->output_format = ' '; break; case ARGP_KEY_ARG: if (!strcmp (arg, "-")) _read_nodes_from_stdin (cmd_args); else _push_inputted_nodes (cmd_args, arg); fi_hostlist_uniq (cmd_args->inputted_nodes); break; case ARGP_KEY_END: break; default: return (ARGP_ERR_UNKNOWN); } return (0); } void ipmidetect_argp_parse (int argc, char **argv, struct ipmidetect_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); cmd_args->hostname = NULL; cmd_args->port = 0; cmd_args->output_type = IPMIDETECT_DETECTED_AND_UNDETECTED_NODES; cmd_args->output_format = 0; if (!(cmd_args->inputted_nodes = fi_hostlist_create (NULL))) err_exit ("fi_hostlist_create"); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); } freeipmi-1.6.4/ipmidetect/ipmidetect-argp.h0000644002055400205540000000305313527331636020642 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetect.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifndef IPMIDETECT_ARGP_H #define IPMIDETECT_ARGP_H #include "ipmidetect.h" void ipmidetect_argp_parse (int argc, char **argv, struct ipmidetect_arguments *cmd_args); #endif /* IPMIDETECT_ARGP_H */ freeipmi-1.6.4/ipmidetectd/0000755002055400205540000000000013527342550015553 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmidetectd/Makefile.in0000644002055400205540000007345513527342445017641 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmidetectd$(EXEEXT) subdir = ipmidetectd DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmidetectd_OBJECTS = ipmidetectd-ipmidetectd.$(OBJEXT) \ ipmidetectd-ipmidetectd-argp.$(OBJEXT) \ ipmidetectd-ipmidetectd-config.$(OBJEXT) ipmidetectd_OBJECTS = $(am_ipmidetectd_OBJECTS) ipmidetectd_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmidetectd_SOURCES) DIST_SOURCES = $(ipmidetectd_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmidetectd_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DIPMIDETECTD_LOCALSTATEDIR='"$(localstatedir)"' ipmidetectd_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmidetectd_SOURCES = \ ipmidetectd.c \ ipmidetectd.h \ ipmidetectd-argp.c \ ipmidetectd-argp.h \ ipmidetectd-config.c \ ipmidetectd-config.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmidetectd/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmidetectd/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmidetectd$(EXEEXT): $(ipmidetectd_OBJECTS) $(ipmidetectd_DEPENDENCIES) $(EXTRA_ipmidetectd_DEPENDENCIES) @rm -f ipmidetectd$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmidetectd_OBJECTS) $(ipmidetectd_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmidetectd-ipmidetectd-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmidetectd-ipmidetectd-config.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmidetectd-ipmidetectd.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmidetectd-ipmidetectd.o: ipmidetectd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd.o -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd.Tpo -c -o ipmidetectd-ipmidetectd.o `test -f 'ipmidetectd.c' || echo '$(srcdir)/'`ipmidetectd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd.c' object='ipmidetectd-ipmidetectd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd.o `test -f 'ipmidetectd.c' || echo '$(srcdir)/'`ipmidetectd.c ipmidetectd-ipmidetectd.obj: ipmidetectd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd.obj -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd.Tpo -c -o ipmidetectd-ipmidetectd.obj `if test -f 'ipmidetectd.c'; then $(CYGPATH_W) 'ipmidetectd.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd.c' object='ipmidetectd-ipmidetectd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd.obj `if test -f 'ipmidetectd.c'; then $(CYGPATH_W) 'ipmidetectd.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd.c'; fi` ipmidetectd-ipmidetectd-argp.o: ipmidetectd-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd-argp.o -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Tpo -c -o ipmidetectd-ipmidetectd-argp.o `test -f 'ipmidetectd-argp.c' || echo '$(srcdir)/'`ipmidetectd-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd-argp.c' object='ipmidetectd-ipmidetectd-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd-argp.o `test -f 'ipmidetectd-argp.c' || echo '$(srcdir)/'`ipmidetectd-argp.c ipmidetectd-ipmidetectd-argp.obj: ipmidetectd-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd-argp.obj -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Tpo -c -o ipmidetectd-ipmidetectd-argp.obj `if test -f 'ipmidetectd-argp.c'; then $(CYGPATH_W) 'ipmidetectd-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd-argp.c' object='ipmidetectd-ipmidetectd-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd-argp.obj `if test -f 'ipmidetectd-argp.c'; then $(CYGPATH_W) 'ipmidetectd-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd-argp.c'; fi` ipmidetectd-ipmidetectd-config.o: ipmidetectd-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd-config.o -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd-config.Tpo -c -o ipmidetectd-ipmidetectd-config.o `test -f 'ipmidetectd-config.c' || echo '$(srcdir)/'`ipmidetectd-config.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd-config.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd-config.c' object='ipmidetectd-ipmidetectd-config.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd-config.o `test -f 'ipmidetectd-config.c' || echo '$(srcdir)/'`ipmidetectd-config.c ipmidetectd-ipmidetectd-config.obj: ipmidetectd-config.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmidetectd-ipmidetectd-config.obj -MD -MP -MF $(DEPDIR)/ipmidetectd-ipmidetectd-config.Tpo -c -o ipmidetectd-ipmidetectd-config.obj `if test -f 'ipmidetectd-config.c'; then $(CYGPATH_W) 'ipmidetectd-config.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd-config.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmidetectd-ipmidetectd-config.Tpo $(DEPDIR)/ipmidetectd-ipmidetectd-config.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmidetectd-config.c' object='ipmidetectd-ipmidetectd-config.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmidetectd_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmidetectd-ipmidetectd-config.obj `if test -f 'ipmidetectd-config.c'; then $(CYGPATH_W) 'ipmidetectd-config.c'; else $(CYGPATH_W) '$(srcdir)/ipmidetectd-config.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-html install-html-am install-info \ install-info-am install-man install-pdf install-pdf-am \ install-ps install-ps-am install-sbinPROGRAMS install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-compile \ mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \ tags tags-am uninstall uninstall-am uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmidetectd/Makefile.am0000644002055400205540000000302613527331636017613 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: Makefile.am,v 1.11 2008-09-17 22:56:04 chu11 Exp $ ##***************************************************************************** ## Process this file with automake to produce Makefile.in. ##***************************************************************************** sbin_PROGRAMS = ipmidetectd ipmidetectd_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DIPMIDETECTD_LOCALSTATEDIR='"$(localstatedir)"' ipmidetectd_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmidetectd_SOURCES = \ ipmidetectd.c \ ipmidetectd.h \ ipmidetectd-argp.c \ ipmidetectd-argp.h \ ipmidetectd-config.c \ ipmidetectd-config.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: freeipmi-1.6.4/ipmidetectd/ipmidetectd.c0000644002055400205540000005334413527331636020226 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd.c,v 1.17 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include #include #include #include #include "ipmidetectd.h" #include "ipmidetectd-argp.h" #include "ipmidetectd-config.h" #include "freeipmi-portability.h" #include "error.h" #include "fd.h" #include "fi_hostlist.h" #include "hash.h" #include "list.h" #include "network.h" #include "timeval.h" #include "tool-daemon-common.h" #define IPMIDETECTD_PIDFILE IPMIDETECTD_LOCALSTATEDIR "/run/ipmidetectd.pid" #define IPMIDETECTD_BUFLEN 1024 #define IPMIDETECTD_NODES_PER_SOCKET 8 #define IPMIDETECTD_SERVER_BACKLOG 5 /* IPMI has a 6 bit sequence number */ #define IPMI_RQ_SEQ_MAX 0x3F struct ipmidetectd_arguments cmd_args; struct ipmidetectd_config conf; static struct timeval ipmidetectd_next_send; struct ipmidetectd_info { char *hostname; int fd; struct sockaddr *destaddr; socklen_t destaddr_len; struct sockaddr_in destaddr4; struct sockaddr_in6 destaddr6; char ipstr[IPMIDETECTD_BUFLEN + 1]; unsigned int sequence_number; struct timeval last_received; }; int *fds = NULL; unsigned int fds_count = 0; List nodes = NULL; unsigned int nodes_count = 0; hash_t nodes_index = NULL; int server_fd = 0; extern int h_errno; static int exit_flag = 1; static void _fds_setup (void) { struct sockaddr_in6 addr6; struct sockaddr_in6 servaddr; int option_value; socklen_t option_value_len; unsigned int i; assert (!fds); assert (!fds_count); assert (!nodes_count); assert (!server_fd); /* IPv4 and IPv6 fds are not needed in the general sense, however b/c * we're doing up/down based on IP/string matching, we need binding so * that what is received back on recvfrom() calls matches what we sent * via IPv4 or IPv6. */ nodes_count = fi_hostlist_count (conf.hosts); fds_count = nodes_count/IPMIDETECTD_NODES_PER_SOCKET; if (nodes_count % IPMIDETECTD_NODES_PER_SOCKET) fds_count++; if (!(fds = (int *)malloc (fds_count * sizeof (int)))) err_exit ("malloc: %s", strerror (errno)); for (i = 0; i < fds_count; i++) { if ((fds[i] = socket (AF_INET6, SOCK_DGRAM, 0)) < 0) err_exit ("socket: %s", strerror (errno)); memset (&addr6, '\0', sizeof (struct sockaddr_in6)); addr6.sin6_family = AF_INET6; addr6.sin6_port = htons (0); if (bind (fds[i], (struct sockaddr *)&addr6, sizeof (struct sockaddr_in6)) < 0) err_exit ("bind: %s", strerror (errno)); } if ((server_fd = socket (AF_INET6, SOCK_STREAM, 0)) < 0) err_exit ("socket: %s", strerror (errno)); memset (&servaddr, '\0', sizeof (struct sockaddr_in6)); servaddr.sin6_family = AF_INET6; servaddr.sin6_port = htons (conf.ipmidetectd_server_port); if (bind (server_fd, (struct sockaddr *)&servaddr, sizeof (struct sockaddr_in6)) < 0) err_exit ("bind: %s", strerror (errno)); /* For quick start/restart */ option_value = 1; option_value_len = sizeof(option_value); if (setsockopt (server_fd, SOL_SOCKET, SO_REUSEADDR, &option_value, option_value_len) < 0) err_exit ("setsockopt: %s", strerror (errno)); if (listen (server_fd, IPMIDETECTD_SERVER_BACKLOG) < 0) err_exit ("listen: %s", strerror (errno)); } static void _nodes_setup (void) { fi_hostlist_iterator_t itr = NULL; char *host = NULL; int count = 0; assert (fds); assert (fds_count); assert (!nodes); assert (nodes_count); assert (!nodes_index); if (!(nodes = list_create ((ListDelF)free))) err_exit ("list_create: %s", strerror (errno)); if (!(nodes_index = hash_create (nodes_count, (hash_key_f)hash_key_string, (hash_cmp_f)strcmp, NULL))) err_exit ("hash_create: %s", strerror (errno)); if (!(itr = fi_hostlist_iterator_create (conf.hosts))) err_exit ("fi_hostlist_iterator_create: %s", strerror (errno)); while ((host = fi_hostlist_next (itr))) { struct ipmidetectd_info *info = NULL; int len; char *host_copy = NULL; char *host_ptr = NULL; char *port_copy = NULL; char *port_ptr = NULL; uint16_t port = RMCP_PRIMARY_RMCP_PORT; char port_str[IPMIDETECTD_BUFLEN + 1]; struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; int ret; if (!(info = (struct ipmidetectd_info *)malloc (sizeof (struct ipmidetectd_info)))) err_exit ("malloc: %s", strerror (errno)); memset (info, '\0', sizeof (struct ipmidetectd_info)); if ((ret = host_is_host_with_port (host, &host_copy, &port_copy)) < 0) err_exit ("host_is_host_with_port: %s", strerror (errno)); if (ret) { host_ptr = host_copy; port_ptr = port_copy; } else host_ptr = host; if ((ret = host_is_valid (host_ptr, port_ptr, &port)) < 0) err_exit ("host_is_valid: %s", strerror (errno)); if (!ret) err_exit ("Invalid host specified: %s", host); if (!(info->hostname = strdup (host_ptr))) err_exit ("strdup: %s", strerror (errno)); /* Use random number for starting sequence number to avoid probability of * duplicates and "hanging" BMC issue. */ if ((len = ipmi_get_random (&(info->sequence_number), sizeof (info->sequence_number))) < 0) err_exit ("ipmi_get_random: %s", strerror (errno)); if (len != sizeof (info->sequence_number)) err_exit ("ipmi_get_random: invalid len returned"); memset (port_str, '\0', IPMIDETECTD_BUFLEN + 1); snprintf (port_str, IPMIDETECTD_BUFLEN, "%d", port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if ((ret = getaddrinfo (host_ptr, port_str, &ai_hints, &ai_res))) { if (ret == EAI_NODATA) err_exit ("Invalid hostname: %s", host_ptr); else err_exit ("getaddrinfo %s: %s", host_ptr, gai_strerror (ret)); } /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if (ai->ai_family == AF_INET) { char tmpipv4buf[IPMIDETECTD_BUFLEN + 1]; char tmpipv6buf[IPMIDETECTD_BUFLEN + 1]; struct in6_addr in6; memcpy (&(info->destaddr4), ai->ai_addr, ai->ai_addrlen); info->destaddr = (struct sockaddr *)&(info->destaddr4); info->destaddr_len = sizeof (struct sockaddr_in); /* We're using a IPv6 socket, so get IPv4 mapped IPv6 string */ memset (tmpipv4buf, '\0', IPMIDETECTD_BUFLEN + 1); if (!inet_ntop (AF_INET, &(info->destaddr4.sin_addr), tmpipv4buf, IPMIDETECTD_BUFLEN)) err_exit ("inet_ntop: %s", strerror (errno)); memset (tmpipv6buf, '\0', IPMIDETECTD_BUFLEN + 1); snprintf (tmpipv6buf, IPMIDETECTD_BUFLEN, "::ffff:%s", tmpipv4buf); if (inet_pton (AF_INET6, tmpipv6buf, &in6) != 1) err_exit ("inet_pton: %s", strerror (errno)); /* We inet_ntop() one more time to get the consistent * string result we can always expect from inet_ntop(), * b/c inet_ntop() may not use the style format we use * above */ if (!inet_ntop (AF_INET6, &in6, info->ipstr, IPMIDETECTD_BUFLEN)) err_exit ("inet_ntop: %s", strerror (errno)); info->fd = fds[count/IPMIDETECTD_NODES_PER_SOCKET]; count++; } else if (ai->ai_family == AF_INET6) { memcpy (&(info->destaddr6), ai->ai_addr, ai->ai_addrlen); info->destaddr = (struct sockaddr *)&(info->destaddr6); info->destaddr_len = sizeof (struct sockaddr_in6); if (!inet_ntop (AF_INET6, &(info->destaddr6.sin6_addr), info->ipstr, IPMIDETECTD_BUFLEN)) err_exit ("inet_ntop: %s", strerror (errno)); info->fd = fds[count/IPMIDETECTD_NODES_PER_SOCKET]; count++; } else continue; break; } if (!ai) err_exit ("Invalid hostname: %s", host_ptr); freeaddrinfo (ai_res); free (host_copy); free (port_copy); free (host); if (!list_append (nodes, info)) err_exit ("list_append: %s", strerror (errno)); if (hash_find (nodes_index, info->ipstr)) err_exit ("Duplicate host ip: %s", info->ipstr); if (!hash_insert (nodes_index, info->ipstr, info)) err_exit ("hash_insert: %s", strerror (errno)); } fi_hostlist_iterator_destroy (itr); } static void _ipmidetectd_setup (void) { /* Initialize ipmidetectd_next_send to 0 so there is a sweep of pings in the beginning */ memset (&ipmidetectd_next_send, '\0', sizeof (struct timeval)); _fds_setup (); _nodes_setup (); /* Avoid sigpipe exiting during server writes */ if (signal (SIGPIPE, SIG_IGN) == SIG_ERR) err_exit ("signal: %s", strerror (errno)); } static int _ipmi_ping_build (struct ipmidetectd_info *info, uint8_t *buf, unsigned int buflen) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_lan_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; int len; assert (info); assert (buf); assert (buflen); if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_rmcp_hdr_ipmi (obj_rmcp_hdr) < 0) err_exit ("fill_rmcp_hdr_ipmi: %s", strerror (errno)); if (fill_lan_session_hdr (IPMI_AUTHENTICATION_TYPE_NONE, 0, 0, obj_lan_session_hdr) < 0) err_exit ("fill_lan_session_hdr: %s", strerror (errno)); if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, IPMI_NET_FN_APP_RQ, IPMI_BMC_IPMB_LUN_BMC, info->sequence_number % (IPMI_RQ_SEQ_MAX+1), obj_lan_msg_hdr) < 0) err_exit ("fill_lan_msg_hdr: %s", strerror (errno)); if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, IPMI_PRIVILEGE_LEVEL_USER, IPMI_GET_IPMI_V15_DATA, obj_cmd) < 0) err_exit ("fill_cmd_get_channel_authentication_capabilities: %s", strerror (errno)); if ((len = assemble_ipmi_lan_pkt (obj_rmcp_hdr, obj_lan_session_hdr, obj_lan_msg_hdr, obj_cmd, NULL, 0, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) err_exit ("assemble_ipmi_lan_pkt: %s", strerror (errno)); #if 0 if (cmd_args.debug) { if (ipmi_dump_lan_packet (STDERR_FILENO, info->hostname, NULL, buf, len, tmpl_lan_msg_hdr_rq, tmpl_cmd_get_channel_authentication_capabilities_rq) < 0) err_exit ("ipmi_dump_lan_packet: %s", strerror (errno)); } #endif fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_lan_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); info->sequence_number++; return (len); } static void _ipmidetectd_send_pings (void) { uint8_t buf[IPMIDETECTD_BUFLEN]; int len; struct ipmidetectd_info *info; ListIterator itr; assert (nodes); assert (nodes_count); if (!(itr = list_iterator_create (nodes))) err_exit ("list_iterator_create: %s", strerror (errno)); while ((info = list_next (itr))) { memset (buf, '\0', IPMIDETECTD_BUFLEN); if ((len = _ipmi_ping_build (info, buf, IPMIDETECTD_BUFLEN)) < 0) err_exit ("_ipmi_ping_build: %s", strerror (errno)); if (ipmi_lan_sendto (info->fd, buf, len, 0, info->destaddr, info->destaddr_len) < 0) err_exit ("ipmi_lan_sendto: %s", strerror (errno)); if (cmd_args.debug) fprintf (stderr, "Ping Request to %s\n", info->hostname); } list_iterator_destroy (itr); } static void _setup_pfds (struct pollfd *pfds) { unsigned int i; assert (pfds); for (i = 0; i < fds_count; i++) { pfds[i].fd = fds[i]; pfds[i].events = POLLIN; pfds[i].revents = 0; } pfds[fds_count].fd = server_fd; pfds[fds_count].events = POLLIN; pfds[fds_count].revents = 0; } static void _receive_ping (int fd) { struct sockaddr_in6 from6; struct sockaddr *from = (struct sockaddr *)&from6; struct ipmidetectd_info *info; uint8_t buf[IPMIDETECTD_BUFLEN]; char ipbuf[IPMIDETECTD_BUFLEN + 1]; int len; socklen_t fromlen = sizeof (struct sockaddr_in6); /* We're happy as long as we receive something. We don't bother * checking sequence numbers or anything like that. */ len = ipmi_lan_recvfrom (fd, buf, IPMIDETECTD_BUFLEN, 0, from, &fromlen); /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * port denied errors up to the client for UDP responses (i.e. you * need to timeout). But on some OSes (it seems Windows), the * behavior is to return port denied errors up to the user for UDP * responses via ECONNRESET or ECONNREFUSED. * * If this were just the case, we could return or handle errors * properly and move on. However, it's not the case. * * According to Ipmitool, on some motherboards, both the OS and the * BMC are capable of responding to an IPMI request. That means you * can get an ECONNRESET or ECONNREFUSED, then later on, get your * real IPMI response. * * Our solution is copied from Ipmitool, we'll ignore some specific * errors and try to read again. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, the recvfrom later on gets the packet we * want. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC (or IPMI disabled, etc.), just do the recvfrom again to * eventually get a timeout, which is the behavior we'd like. */ if (len < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) return; if (len < 0) err_exit ("ipmi_lan_recvfrom: %s", strerror (errno)); memset (ipbuf, '\0', IPMIDETECTD_BUFLEN + 1); if (from6.sin6_family == AF_INET6) { if (!inet_ntop (AF_INET6, &from6.sin6_addr, ipbuf, IPMIDETECTD_BUFLEN)) err_exit ("inet_ntop: %s", strerror (errno)); } else { /* memcpy hacks to avoid warnings, i.e. * warning: dereferencing pointer 'X' does break strict-aliasing rules */ struct sockaddr_in from4; memcpy (&from4, from, fromlen); if (!inet_ntop (AF_INET, &from4.sin_addr, ipbuf, IPMIDETECTD_BUFLEN)) err_exit ("inet_ntop: %s", strerror (errno)); } if ((info = hash_find (nodes_index, ipbuf))) { if (gettimeofday (&(info->last_received), NULL) < 0) err_exit ("gettimeofday: %s", strerror (errno)); if (cmd_args.debug) fprintf (stderr, "Ping Reply from %s\n", info->hostname); } } static void _send_ping_data (void) { ListIterator itr; struct sockaddr_in6 rhost; struct ipmidetectd_info *info; socklen_t rhost_len = sizeof (struct sockaddr_in6); int rhost_fd; assert (nodes); assert (nodes_count); if ((rhost_fd = accept (server_fd, (struct sockaddr *)&rhost, &rhost_len)) < 0) err_exit ("accept: %s", strerror (errno)); if (cmd_args.debug) fprintf (stderr, "Received ipmidetectd server request\n"); if (!(itr = list_iterator_create (nodes))) err_exit ("list_iterator_create: %s", strerror (errno)); while ((info = list_next (itr))) { char buf[IPMIDETECTD_BUFLEN]; int len, n; len = snprintf (buf, IPMIDETECTD_BUFLEN, "%s %lu\n", info->hostname, info->last_received.tv_sec); if (len >= IPMIDETECTD_BUFLEN) err_exit ("len=%d", len); if ((n = fd_write_n (rhost_fd, buf, len)) < 0) { if (errno == EPIPE) break; else err_exit ("fd_write_n: %s", strerror (errno)); } if (n != len) err_exit ("fd_write_n: n=%d len=%d", n, len); } list_iterator_destroy (itr); /* ignore potential error, done w/ pipe */ close (rhost_fd); } static void _signal_handler_callback (int sig) { exit_flag = 0; } static void _ipmidetectd_loop (void) { struct pollfd *pfds = NULL; unsigned int i; _ipmidetectd_setup (); assert (nodes_count); /* +1 fd for the server fd */ if (!(pfds = (struct pollfd *)malloc ((fds_count + 1)*sizeof (struct pollfd)))) err_exit ("malloc: %s", strerror (errno)); while (exit_flag) { struct timeval now, timeout; unsigned int timeout_ms; int num; if (gettimeofday (&now, NULL) < 0) err_exit ("gettimeofday: %s", strerror (errno)); if (timeval_gt (&now, &ipmidetectd_next_send)) { _ipmidetectd_send_pings (); if (gettimeofday (&now, NULL) < 0) err_exit ("gettimeofday: %s", strerror (errno)); timeval_add_ms (&now, conf.ipmiping_period, &ipmidetectd_next_send); } _setup_pfds (pfds); timeval_sub (&ipmidetectd_next_send, &now, &timeout); timeval_millisecond_calc (&timeout, &timeout_ms); if ((num = poll (pfds, fds_count + 1, timeout_ms)) < 0) err_exit ("poll: %s", strerror (errno)); if (num) { for (i = 0; i < fds_count; i++) { if (pfds[i].revents & POLLERR || pfds[i].revents & POLLIN) _receive_ping (fds[i]); } if (pfds[fds_count].revents & POLLIN) _send_ping_data (); } } } int main (int argc, char **argv) { err_init (argv[0]); err_set_flags (ERROR_STDERR); ipmidetectd_argp_parse (argc, argv, &cmd_args); ipmidetectd_config_setup (argc, argv); if (!cmd_args.debug) { daemonize_common (IPMIDETECTD_PIDFILE); err_set_flags (ERROR_SYSLOG); } else err_set_flags (ERROR_STDERR); daemon_signal_handler_setup (_signal_handler_callback); /* Call after daemonization, since daemonization closes currently * open fds */ if (argv[0][0] == '/') argv[0] = strrchr(argv[0], '/') + 1; openlog (argv[0], LOG_ODELAY | LOG_PID, LOG_DAEMON); _ipmidetectd_loop (); return (0); } freeipmi-1.6.4/ipmidetectd/ipmidetectd.h0000644002055400205540000000361513527331636020227 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifndef IPMIDETECTD_H #define IPMIDETECTD_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include "fi_hostlist.h" enum ipmidetectd_argp_option_keys { IPMIDETECTD_CONFIG_FILE_KEY = 'c', IPMIDETECTD_LEGACY_CONFIG_FILE_KEY = 160, /* legacy */ IPMIDETECTD_DEBUG_KEY = 'd', }; struct ipmidetectd_config { int ipmiping_period; int ipmidetectd_server_port; fi_hostlist_t hosts; }; struct ipmidetectd_arguments { int debug; char *config_file; }; #endif /* IPMIDETECTD_H */ freeipmi-1.6.4/ipmidetectd/ipmidetectd-argp.c0000644002055400205540000000774713527331636021163 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "ipmidetectd.h" #include "ipmidetectd-argp.h" #include "freeipmi-portability.h" #include "error.h" const char *argp_program_version = "ipmidetectd - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.\n" "Copyright (C) 2007 The Regents of the University of California.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmidetectd - IPMI node detection daemon"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { { "config-file", IPMIDETECTD_CONFIG_FILE_KEY, "FILE", 0, "Specify alternate config file", 1}, { "config_file", IPMIDETECTD_LEGACY_CONFIG_FILE_KEY, "FILE", OPTION_HIDDEN, "Specify alternate config file", 2}, { "debug", IPMIDETECTD_DEBUG_KEY, 0, 0, "Turn on debugging and run daemon in foreground", 3}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmidetectd_arguments *cmd_args; assert (state); cmd_args = state->input; switch (key) { case IPMIDETECTD_CONFIG_FILE_KEY: case IPMIDETECTD_LEGACY_CONFIG_FILE_KEY: if (!(cmd_args->config_file = strdup (arg))) err_exit ("strdup: %s", strerror (errno)); break; case IPMIDETECTD_DEBUG_KEY: cmd_args->debug++; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (ARGP_ERR_UNKNOWN); } return (0); } void ipmidetectd_argp_parse (int argc, char **argv, struct ipmidetectd_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); cmd_args->debug = 0; cmd_args->config_file = NULL; argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); } freeipmi-1.6.4/ipmidetectd/ipmidetectd-argp.h0000644002055400205540000000306213527331636021152 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifndef IPMIDETECTD_ARGP_H #define IPMIDETECTD_ARGP_H #include "ipmidetectd.h" void ipmidetectd_argp_parse (int argc, char **argv, struct ipmidetectd_arguments *cmd_args); #endif /* IPMIDETECTD_ARGP_H */ freeipmi-1.6.4/ipmidetectd/ipmidetectd-config.c0000644002055400205540000001216713527331636021467 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd_config.c,v 1.18 2010-06-30 16:36:09 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_GETOPT_H #include #endif /* HAVE_GETOPT_H */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmidetectd.h" #include "ipmidetectd-config.h" #include "freeipmi-portability.h" #include "conffile.h" #include "error.h" extern struct ipmidetectd_arguments cmd_args; extern struct ipmidetectd_config conf; #define IPMIDETECTD_IPMIPING_PERIOD 15000 #define IPMIDETECTD_SERVER_PORT_DEFAULT 9225 static void _config_default (void) { conf.ipmiping_period = IPMIDETECTD_IPMIPING_PERIOD; conf.ipmidetectd_server_port = IPMIDETECTD_SERVER_PORT_DEFAULT; if (!(conf.hosts = fi_hostlist_create (NULL))) err_exit ("fi_hostlist_create: %s", strerror (errno)); } static int _cb_host (conffile_t cf, struct conffile_data *data, char *optionname, int option_type, void *option_ptr, int option_data, void *app_ptr, int app_data) { if (!fi_hostlist_push (conf.hosts, data->string)) err_exit ("fi_hostlist_push: %s", strerror (errno)); return (0); } static void _config_file_parse (void) { int ipmiping_period_flag, ipmidetectd_server_port_flag, host_flag; struct conffile_option options[] = { { "ipmiping_period", CONFFILE_OPTION_INT, -1, conffile_int, 1, 0, &(ipmiping_period_flag), &(conf.ipmiping_period), 0 }, { "ipmidetectd_server_port", CONFFILE_OPTION_INT, -1, conffile_int, 1, 0, &(ipmidetectd_server_port_flag), &(conf.ipmidetectd_server_port), 0, }, { "host", CONFFILE_OPTION_STRING, -1, _cb_host, INT_MAX, 0, &host_flag, NULL, 0 }, }; conffile_t cf = NULL; int legacy_file_loaded = 0; int num; if (!(cf = conffile_handle_create ())) { err_output ("conffile_handle_create"); goto cleanup; } num = sizeof (options)/sizeof (struct conffile_option); /* Try legacy file first */ if (!cmd_args.config_file) { if (!conffile_parse (cf, IPMIDETECTD_CONFIG_FILE_LEGACY, options, num, NULL, 0, 0)) legacy_file_loaded++; } if (!legacy_file_loaded) { if (conffile_parse (cf, cmd_args.config_file ? cmd_args.config_file : IPMIDETECTD_CONFIG_FILE_DEFAULT, options, num, NULL, 0, 0) < 0) { char buf[CONFFILE_MAX_ERRMSGLEN]; /* Its not an error if the default configuration file doesn't exist */ if ((!cmd_args.config_file || !strcmp (cmd_args.config_file, IPMIDETECTD_CONFIG_FILE_DEFAULT)) && conffile_errnum (cf) == CONFFILE_ERR_EXIST) goto cleanup; if (conffile_errmsg (cf, buf, CONFFILE_MAX_ERRMSGLEN) < 0) err_exit ("conffile_parse: %d", conffile_errnum (cf)); else err_exit ("conffile_parse: %s", buf); } } cleanup: conffile_handle_destroy (cf); } void ipmidetectd_config_setup (int argc, char **argv) { assert (argv); _config_default (); _config_file_parse (); if (!fi_hostlist_count (conf.hosts)) err_exit ("No nodes configured"); } freeipmi-1.6.4/ipmidetectd/ipmidetectd-config.h0000644002055400205540000000310113527331636021460 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmidetectd_config.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-228523 * * This file is part of Ipmidetect, tools and libraries for detecting * IPMI nodes in a cluster. For details, see http://www.llnl.gov/linux/. * * Ipmidetect is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmidetect is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmidetect. If not, see . \*****************************************************************************/ #ifndef IPMIDETECTD_CONFIG_H #define IPMIDETECTD_CONFIG_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ void ipmidetectd_config_setup (int argc, char **argv); #endif /* IPMIDETECTD_CONFIG_H */ freeipmi-1.6.4/ipmiping/0000755002055400205540000000000013527342550015074 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmiping/Makefile.in0000644002055400205540000006244213527342445017154 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmiping$(EXEEXT) subdir = ipmiping DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmiping_OBJECTS = ipmiping-ipmiping.$(OBJEXT) ipmiping_OBJECTS = $(am_ipmiping_OBJECTS) ipmiping_DEPENDENCIES = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmiping_SOURCES) DIST_SOURCES = $(ipmiping_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmiping_CPPFLAGS = \ -I$(top_srcdir)/common/pingtool \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE ipmiping_LDADD = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmiping_SOURCES = ipmiping.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmiping/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmiping/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmiping$(EXEEXT): $(ipmiping_OBJECTS) $(ipmiping_DEPENDENCIES) $(EXTRA_ipmiping_DEPENDENCIES) @rm -f ipmiping$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmiping_OBJECTS) $(ipmiping_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiping-ipmiping.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmiping-ipmiping.o: ipmiping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiping-ipmiping.o -MD -MP -MF $(DEPDIR)/ipmiping-ipmiping.Tpo -c -o ipmiping-ipmiping.o `test -f 'ipmiping.c' || echo '$(srcdir)/'`ipmiping.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiping-ipmiping.Tpo $(DEPDIR)/ipmiping-ipmiping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiping.c' object='ipmiping-ipmiping.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiping-ipmiping.o `test -f 'ipmiping.c' || echo '$(srcdir)/'`ipmiping.c ipmiping-ipmiping.obj: ipmiping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiping-ipmiping.obj -MD -MP -MF $(DEPDIR)/ipmiping-ipmiping.Tpo -c -o ipmiping-ipmiping.obj `if test -f 'ipmiping.c'; then $(CYGPATH_W) 'ipmiping.c'; else $(CYGPATH_W) '$(srcdir)/ipmiping.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiping-ipmiping.Tpo $(DEPDIR)/ipmiping-ipmiping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiping.c' object='ipmiping-ipmiping.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiping-ipmiping.obj `if test -f 'ipmiping.c'; then $(CYGPATH_W) 'ipmiping.c'; else $(CYGPATH_W) '$(srcdir)/ipmiping.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-hook uninstall-sbinPROGRAMS $(top_builddir)/common/pingtool/libpingtool.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmiping $(DESTDIR)$(sbindir)/ipmi-ping uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-ping # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmiping/Makefile.am0000644002055400205540000000223613527331636017136 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmiping ipmiping_CPPFLAGS = \ -I$(top_srcdir)/common/pingtool \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE ipmiping_LDADD = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmiping_SOURCES = ipmiping.c $(top_builddir)/common/pingtool/libpingtool.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmiping $(DESTDIR)$(sbindir)/ipmi-ping uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-ping freeipmi-1.6.4/ipmiping/ipmiping.c0000644002055400205540000004266513527331636017074 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiping.c,v 1.75 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155448 * * This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant * remote systems. For details, see http://www.llnl.gov/linux/. * * Ipmiping is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiping is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiping. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "freeipmi-portability.h" #include "debug-util.h" #include "ping-tool-common.h" #define _setstr(x) (x) ? "set" : "clear" /* IPMI has a 6 bit sequence number */ #define IPMI_RQ_SEQ_MAX 0x3F int createpacket (const char *destination, void *buf, unsigned int buflen, unsigned int sequence_number, int version, int debug) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_lan_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; int len; assert (destination); assert (buf); assert (version == IPMI_PING_VERSION_1_5 || version == IPMI_PING_VERSION_2_0); if (!buflen) return (0); if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rq))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_rmcp_hdr_ipmi (obj_rmcp_hdr) < 0) ipmi_ping_err_exit ("fill_rmcp_hdr_ipmi: %s", strerror (errno)); if (fill_lan_session_hdr (IPMI_AUTHENTICATION_TYPE_NONE, 0, 0, obj_lan_session_hdr) < 0) ipmi_ping_err_exit ("fill_lan_session_hdr: %s", strerror (errno)); if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, IPMI_NET_FN_APP_RQ, IPMI_BMC_IPMB_LUN_BMC, sequence_number % (IPMI_RQ_SEQ_MAX+1), obj_lan_msg_hdr) < 0) ipmi_ping_err_exit ("fill_lan_msg_hdr: %s", strerror (errno)); if (version == IPMI_PING_VERSION_1_5) { if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, IPMI_PRIVILEGE_LEVEL_USER, IPMI_GET_IPMI_V15_DATA, obj_cmd) < 0) ipmi_ping_err_exit ("fill_cmd_get_channel_authentication_capabilities: %s", strerror (errno)); } else { if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, IPMI_PRIVILEGE_LEVEL_USER, IPMI_GET_IPMI_V20_EXTENDED_DATA, obj_cmd) < 0) ipmi_ping_err_exit ("fill_cmd_get_channel_authentication_capabilities: %s", strerror (errno)); } if ((len = assemble_ipmi_lan_pkt (obj_rmcp_hdr, obj_lan_session_hdr, obj_lan_msg_hdr, obj_cmd, NULL, 0, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) ipmi_ping_err_exit ("assemble_ipmi_lan_pkt: %s", strerror (errno)); if (debug) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; debug_hdr_cmd ((version == IPMI_PING_VERSION_1_5) ? DEBUG_UTIL_TYPE_IPMI_1_5 : DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_REQUEST, IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES, 0, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_lan_packet (STDERR_FILENO, destination, hdrbuf, NULL, buf, len, tmpl_lan_msg_hdr_rq, tmpl_cmd_get_channel_authentication_capabilities_rq) < 0) ipmi_ping_err_exit ("ipmi_dump_lan_packet: %s", strerror (errno)); } fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_lan_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); return (len); } int parsepacket (const char *destination, const void *buf, unsigned int buflen, const char *from, unsigned int sequence_number, int verbose, int version, int debug) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_lan_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_lan_msg_trlr = NULL; uint8_t req_seq, none, md2, md5, straight_password_key, oem, anonymous_login, null_username, non_null_username, user_level_authentication, per_message_authentication, k_g, ipmi_v20_extended_capabilities_available, ipmi_v15, ipmi_v20; uint64_t val; int ret, rv = -1; assert (destination); assert (buf); assert (from); assert (version == IPMI_PING_VERSION_1_5 || version == IPMI_PING_VERSION_2_0); if (!buflen) return (0); if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rs))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_cmd = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (debug) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN]; debug_hdr_cmd ((version == IPMI_PING_VERSION_1_5) ? DEBUG_UTIL_TYPE_IPMI_1_5 : DEBUG_UTIL_TYPE_IPMI_2_0, DEBUG_UTIL_DIRECTION_RESPONSE, IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES, 0, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_lan_packet (STDERR_FILENO, destination, hdrbuf, NULL, buf, buflen, tmpl_lan_msg_hdr_rs, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) ipmi_ping_err_exit ("ipmi_dump_lan_packet: %s", strerror (errno)); } if ((ret = ipmi_lan_check_packet_checksum (buf, buflen)) < 0) ipmi_ping_err_exit ("ipmi_lan_check_checksum: %s", strerror (errno)); if (!ret) { if (debug) fprintf (stderr, "%s(%d): checksum failed\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } if ((ret = unassemble_ipmi_lan_pkt (buf, buflen, obj_rmcp_hdr, obj_lan_session_hdr, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) ipmi_ping_err_exit ("unassemble_ipmi_lan_pkt: %s", strerror (errno)); if (!ret) { if (debug) fprintf (stderr, "%s(%d): Could not unassemble packet\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } if ((ret = ipmi_lan_check_net_fn (obj_lan_msg_hdr, IPMI_NET_FN_APP_RS)) < 0) ipmi_ping_err_exit ("ipmi_lan_check_net_fn: %s", strerror (errno)); if (!ret) { if (debug) fprintf (stderr, "%s(%d): net_fn failed\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } if ((ret = ipmi_check_cmd (obj_cmd, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES)) < 0) ipmi_ping_err_exit ("ipmi_check_cmd: %s", strerror (errno)); if (!ret) { if (debug) fprintf (stderr, "%s(%d): cmd failed\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } if ((ret = ipmi_check_completion_code_success (obj_cmd)) < 0) ipmi_ping_err_exit ("ipmi_check_comp_code: %s", strerror (errno)); if (!ret) { if (debug) fprintf (stderr, "%s(%d): comp_code failed\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_lan_msg_hdr, "rq_seq", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'rq_seq': %s", fiid_obj_errormsg (obj_lan_msg_hdr)); req_seq = val; if (req_seq != sequence_number % (IPMI_RQ_SEQ_MAX + 1)) { if (debug) fprintf (stderr, "%s(%d): req_seq failed\n", __FUNCTION__, __LINE__); rv = 0; goto cleanup; } printf ("response received from %s: rq_seq=%u", from, req_seq); if (verbose) { if (FIID_OBJ_GET (obj_cmd, "authentication_type.none", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.none': %s", fiid_obj_errormsg (obj_cmd)); none = val; if (FIID_OBJ_GET (obj_cmd, "authentication_type.md2", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.md2': %s", fiid_obj_errormsg (obj_cmd)); md2 = val; if (FIID_OBJ_GET (obj_cmd, "authentication_type.md5", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.md5': %s", fiid_obj_errormsg (obj_cmd)); md5 = val; if (FIID_OBJ_GET (obj_cmd, "authentication_type.straight_password_key", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.straight_password_key': %s", fiid_obj_errormsg (obj_cmd)); straight_password_key = val; if (FIID_OBJ_GET (obj_cmd, "authentication_type.oem_prop", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.oem_prop': %s", fiid_obj_errormsg (obj_cmd)); oem = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.anonymous_login", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.anonymous_login': %s", fiid_obj_errormsg (obj_cmd)); anonymous_login = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.null_username", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.null_username': %s", fiid_obj_errormsg (obj_cmd)); null_username = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.non_null_username", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.non_null_username': %s", fiid_obj_errormsg (obj_cmd)); non_null_username = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.user_level_authentication", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.user_level_authentication': %s", fiid_obj_errormsg (obj_cmd)); user_level_authentication = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.per_message_authentication", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.per_message_authentication': %s", fiid_obj_errormsg (obj_cmd)); per_message_authentication = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.per_message_authentication", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.per_message_authentication': %s", fiid_obj_errormsg (obj_cmd)); per_message_authentication = val; printf (", auth: none=%s md2=%s md5=%s password=%s oem=%s anon=%s null=%s non-null=%s user=%s permsg=%s ", _setstr (none), _setstr (md2), _setstr (md5), _setstr (straight_password_key),_setstr (oem), _setstr (anonymous_login), _setstr (null_username), _setstr (non_null_username), _setstr (user_level_authentication), _setstr (per_message_authentication)); if (version == IPMI_PING_VERSION_2_0) { if (FIID_OBJ_GET (obj_cmd, "authentication_type.ipmi_v2.0_extended_capabilities_available", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_type.ipmi_v2.0_extended_capabilities_available': %s", fiid_obj_errormsg (obj_cmd)); ipmi_v20_extended_capabilities_available = val; if (FIID_OBJ_GET (obj_cmd, "authentication_status.k_g", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'authentication_status.k_g': %s", fiid_obj_errormsg (obj_cmd)); k_g = val; printf ("k_g=%s ipmi_v2.0_extended_capabilities_available=%s ", _setstr (k_g), _setstr (ipmi_v20_extended_capabilities_available)); if (ipmi_v20_extended_capabilities_available) { if (FIID_OBJ_GET (obj_cmd, "channel_supports_ipmi_v1.5_connections", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'channel_supports_ipmi_v1.5_connections': %s", fiid_obj_errormsg (obj_cmd)); ipmi_v15 = val; if (FIID_OBJ_GET (obj_cmd, "channel_supports_ipmi_v2.0_connections", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'channel_supports_ipmi_v2.0_connections': %s", fiid_obj_errormsg (obj_cmd)); ipmi_v20 = val; printf ("ipmi_v1.5=%s ipmi_v2.0=%s ", _setstr (ipmi_v15), _setstr (ipmi_v20)); } } } printf ("\n"); rv = 1; cleanup: fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_lan_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_lan_msg_trlr); return (rv); } void latepacket (unsigned int sequence_number) { printf ("response timed out: rq_seq=%u\n", sequence_number % (IPMI_RQ_SEQ_MAX + 1)); } int endresult (const char *progname, const char *dest, unsigned int sent_count, unsigned int recv_count) { double percent = 0; assert (progname); assert (dest); if (sent_count > 0) percent = ((double)(sent_count - recv_count)/sent_count)*100; printf ("--- %s %s statistics ---\n", progname, dest); printf ("%d requests transmitted, %d responses received in time, " "%2.1f%% packet loss\n", sent_count, recv_count, percent); return ((recv_count > 0) ? 0 : 1); } int main (int argc, char **argv) { ipmi_ping_setup (argc, argv, 0, IPMI_RQ_SEQ_MAX, "hVc:i:I:t:vr:s:d"); ipmi_ping_loop (createpacket, parsepacket, latepacket, endresult); exit (EXIT_FAILURE); /* NOT REACHED */ } freeipmi-1.6.4/ipmipower/0000755002055400205540000000000013527342550015273 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmipower/Makefile.in0000644002055400205540000015014713527342445017353 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmipower$(EXEEXT) subdir = ipmipower DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmipower_OBJECTS = ipmipower-argv.$(OBJEXT) \ ipmipower-ipmipower.$(OBJEXT) \ ipmipower-ipmipower_argp.$(OBJEXT) \ ipmipower-ipmipower_check.$(OBJEXT) \ ipmipower-ipmipower_connection.$(OBJEXT) \ ipmipower-ipmipower_error.$(OBJEXT) \ ipmipower-ipmipower_oem.$(OBJEXT) \ ipmipower-ipmipower_output.$(OBJEXT) \ ipmipower-ipmipower_packet.$(OBJEXT) \ ipmipower-ipmipower_ping.$(OBJEXT) \ ipmipower-ipmipower_powercmd.$(OBJEXT) \ ipmipower-ipmipower_prompt.$(OBJEXT) \ ipmipower-ipmipower_util.$(OBJEXT) ipmipower_OBJECTS = $(am_ipmipower_OBJECTS) ipmipower_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmipower_SOURCES) DIST_SOURCES = $(ipmipower_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmipower_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -DWITH_LSD_FATAL_ERROR_FUNC=1 \ -DWITH_LSD_NOMEM_ERROR_FUNC=1 \ -D_GNU_SOURCE \ -D_REENTRANT ipmipower_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmipower_SOURCES = \ argv.c \ argv.h \ ipmipower.c \ ipmipower.h \ ipmipower_argp.c \ ipmipower_argp.h \ ipmipower_check.c \ ipmipower_check.h \ ipmipower_connection.c \ ipmipower_connection.h \ ipmipower_error.c \ ipmipower_error.h \ ipmipower_oem.c \ ipmipower_oem.h \ ipmipower_output.c \ ipmipower_output.h \ ipmipower_packet.c \ ipmipower_packet.h \ ipmipower_ping.c \ ipmipower_ping.h \ ipmipower_powercmd.c \ ipmipower_powercmd.h \ ipmipower_prompt.c \ ipmipower_prompt.h \ ipmipower_util.c \ ipmipower_util.h all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmipower/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmipower/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmipower$(EXEEXT): $(ipmipower_OBJECTS) $(ipmipower_DEPENDENCIES) $(EXTRA_ipmipower_DEPENDENCIES) @rm -f ipmipower$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmipower_OBJECTS) $(ipmipower_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-argv.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_check.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_connection.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_error.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_oem.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_output.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_packet.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_ping.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_powercmd.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_prompt.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmipower-ipmipower_util.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmipower-argv.o: argv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-argv.o -MD -MP -MF $(DEPDIR)/ipmipower-argv.Tpo -c -o ipmipower-argv.o `test -f 'argv.c' || echo '$(srcdir)/'`argv.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-argv.Tpo $(DEPDIR)/ipmipower-argv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='argv.c' object='ipmipower-argv.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-argv.o `test -f 'argv.c' || echo '$(srcdir)/'`argv.c ipmipower-argv.obj: argv.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-argv.obj -MD -MP -MF $(DEPDIR)/ipmipower-argv.Tpo -c -o ipmipower-argv.obj `if test -f 'argv.c'; then $(CYGPATH_W) 'argv.c'; else $(CYGPATH_W) '$(srcdir)/argv.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-argv.Tpo $(DEPDIR)/ipmipower-argv.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='argv.c' object='ipmipower-argv.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-argv.obj `if test -f 'argv.c'; then $(CYGPATH_W) 'argv.c'; else $(CYGPATH_W) '$(srcdir)/argv.c'; fi` ipmipower-ipmipower.o: ipmipower.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower.Tpo -c -o ipmipower-ipmipower.o `test -f 'ipmipower.c' || echo '$(srcdir)/'`ipmipower.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower.Tpo $(DEPDIR)/ipmipower-ipmipower.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower.c' object='ipmipower-ipmipower.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower.o `test -f 'ipmipower.c' || echo '$(srcdir)/'`ipmipower.c ipmipower-ipmipower.obj: ipmipower.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower.Tpo -c -o ipmipower-ipmipower.obj `if test -f 'ipmipower.c'; then $(CYGPATH_W) 'ipmipower.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower.Tpo $(DEPDIR)/ipmipower-ipmipower.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower.c' object='ipmipower-ipmipower.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower.obj `if test -f 'ipmipower.c'; then $(CYGPATH_W) 'ipmipower.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower.c'; fi` ipmipower-ipmipower_argp.o: ipmipower_argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_argp.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_argp.Tpo -c -o ipmipower-ipmipower_argp.o `test -f 'ipmipower_argp.c' || echo '$(srcdir)/'`ipmipower_argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_argp.Tpo $(DEPDIR)/ipmipower-ipmipower_argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_argp.c' object='ipmipower-ipmipower_argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_argp.o `test -f 'ipmipower_argp.c' || echo '$(srcdir)/'`ipmipower_argp.c ipmipower-ipmipower_argp.obj: ipmipower_argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_argp.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_argp.Tpo -c -o ipmipower-ipmipower_argp.obj `if test -f 'ipmipower_argp.c'; then $(CYGPATH_W) 'ipmipower_argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_argp.Tpo $(DEPDIR)/ipmipower-ipmipower_argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_argp.c' object='ipmipower-ipmipower_argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_argp.obj `if test -f 'ipmipower_argp.c'; then $(CYGPATH_W) 'ipmipower_argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_argp.c'; fi` ipmipower-ipmipower_check.o: ipmipower_check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_check.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_check.Tpo -c -o ipmipower-ipmipower_check.o `test -f 'ipmipower_check.c' || echo '$(srcdir)/'`ipmipower_check.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_check.Tpo $(DEPDIR)/ipmipower-ipmipower_check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_check.c' object='ipmipower-ipmipower_check.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_check.o `test -f 'ipmipower_check.c' || echo '$(srcdir)/'`ipmipower_check.c ipmipower-ipmipower_check.obj: ipmipower_check.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_check.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_check.Tpo -c -o ipmipower-ipmipower_check.obj `if test -f 'ipmipower_check.c'; then $(CYGPATH_W) 'ipmipower_check.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_check.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_check.Tpo $(DEPDIR)/ipmipower-ipmipower_check.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_check.c' object='ipmipower-ipmipower_check.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_check.obj `if test -f 'ipmipower_check.c'; then $(CYGPATH_W) 'ipmipower_check.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_check.c'; fi` ipmipower-ipmipower_connection.o: ipmipower_connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_connection.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_connection.Tpo -c -o ipmipower-ipmipower_connection.o `test -f 'ipmipower_connection.c' || echo '$(srcdir)/'`ipmipower_connection.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_connection.Tpo $(DEPDIR)/ipmipower-ipmipower_connection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_connection.c' object='ipmipower-ipmipower_connection.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_connection.o `test -f 'ipmipower_connection.c' || echo '$(srcdir)/'`ipmipower_connection.c ipmipower-ipmipower_connection.obj: ipmipower_connection.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_connection.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_connection.Tpo -c -o ipmipower-ipmipower_connection.obj `if test -f 'ipmipower_connection.c'; then $(CYGPATH_W) 'ipmipower_connection.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_connection.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_connection.Tpo $(DEPDIR)/ipmipower-ipmipower_connection.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_connection.c' object='ipmipower-ipmipower_connection.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_connection.obj `if test -f 'ipmipower_connection.c'; then $(CYGPATH_W) 'ipmipower_connection.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_connection.c'; fi` ipmipower-ipmipower_error.o: ipmipower_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_error.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_error.Tpo -c -o ipmipower-ipmipower_error.o `test -f 'ipmipower_error.c' || echo '$(srcdir)/'`ipmipower_error.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_error.Tpo $(DEPDIR)/ipmipower-ipmipower_error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_error.c' object='ipmipower-ipmipower_error.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_error.o `test -f 'ipmipower_error.c' || echo '$(srcdir)/'`ipmipower_error.c ipmipower-ipmipower_error.obj: ipmipower_error.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_error.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_error.Tpo -c -o ipmipower-ipmipower_error.obj `if test -f 'ipmipower_error.c'; then $(CYGPATH_W) 'ipmipower_error.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_error.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_error.Tpo $(DEPDIR)/ipmipower-ipmipower_error.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_error.c' object='ipmipower-ipmipower_error.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_error.obj `if test -f 'ipmipower_error.c'; then $(CYGPATH_W) 'ipmipower_error.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_error.c'; fi` ipmipower-ipmipower_oem.o: ipmipower_oem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_oem.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_oem.Tpo -c -o ipmipower-ipmipower_oem.o `test -f 'ipmipower_oem.c' || echo '$(srcdir)/'`ipmipower_oem.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_oem.Tpo $(DEPDIR)/ipmipower-ipmipower_oem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_oem.c' object='ipmipower-ipmipower_oem.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_oem.o `test -f 'ipmipower_oem.c' || echo '$(srcdir)/'`ipmipower_oem.c ipmipower-ipmipower_oem.obj: ipmipower_oem.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_oem.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_oem.Tpo -c -o ipmipower-ipmipower_oem.obj `if test -f 'ipmipower_oem.c'; then $(CYGPATH_W) 'ipmipower_oem.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_oem.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_oem.Tpo $(DEPDIR)/ipmipower-ipmipower_oem.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_oem.c' object='ipmipower-ipmipower_oem.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_oem.obj `if test -f 'ipmipower_oem.c'; then $(CYGPATH_W) 'ipmipower_oem.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_oem.c'; fi` ipmipower-ipmipower_output.o: ipmipower_output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_output.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_output.Tpo -c -o ipmipower-ipmipower_output.o `test -f 'ipmipower_output.c' || echo '$(srcdir)/'`ipmipower_output.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_output.Tpo $(DEPDIR)/ipmipower-ipmipower_output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_output.c' object='ipmipower-ipmipower_output.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_output.o `test -f 'ipmipower_output.c' || echo '$(srcdir)/'`ipmipower_output.c ipmipower-ipmipower_output.obj: ipmipower_output.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_output.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_output.Tpo -c -o ipmipower-ipmipower_output.obj `if test -f 'ipmipower_output.c'; then $(CYGPATH_W) 'ipmipower_output.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_output.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_output.Tpo $(DEPDIR)/ipmipower-ipmipower_output.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_output.c' object='ipmipower-ipmipower_output.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_output.obj `if test -f 'ipmipower_output.c'; then $(CYGPATH_W) 'ipmipower_output.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_output.c'; fi` ipmipower-ipmipower_packet.o: ipmipower_packet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_packet.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_packet.Tpo -c -o ipmipower-ipmipower_packet.o `test -f 'ipmipower_packet.c' || echo '$(srcdir)/'`ipmipower_packet.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_packet.Tpo $(DEPDIR)/ipmipower-ipmipower_packet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_packet.c' object='ipmipower-ipmipower_packet.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_packet.o `test -f 'ipmipower_packet.c' || echo '$(srcdir)/'`ipmipower_packet.c ipmipower-ipmipower_packet.obj: ipmipower_packet.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_packet.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_packet.Tpo -c -o ipmipower-ipmipower_packet.obj `if test -f 'ipmipower_packet.c'; then $(CYGPATH_W) 'ipmipower_packet.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_packet.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_packet.Tpo $(DEPDIR)/ipmipower-ipmipower_packet.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_packet.c' object='ipmipower-ipmipower_packet.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_packet.obj `if test -f 'ipmipower_packet.c'; then $(CYGPATH_W) 'ipmipower_packet.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_packet.c'; fi` ipmipower-ipmipower_ping.o: ipmipower_ping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_ping.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_ping.Tpo -c -o ipmipower-ipmipower_ping.o `test -f 'ipmipower_ping.c' || echo '$(srcdir)/'`ipmipower_ping.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_ping.Tpo $(DEPDIR)/ipmipower-ipmipower_ping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_ping.c' object='ipmipower-ipmipower_ping.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_ping.o `test -f 'ipmipower_ping.c' || echo '$(srcdir)/'`ipmipower_ping.c ipmipower-ipmipower_ping.obj: ipmipower_ping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_ping.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_ping.Tpo -c -o ipmipower-ipmipower_ping.obj `if test -f 'ipmipower_ping.c'; then $(CYGPATH_W) 'ipmipower_ping.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_ping.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_ping.Tpo $(DEPDIR)/ipmipower-ipmipower_ping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_ping.c' object='ipmipower-ipmipower_ping.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_ping.obj `if test -f 'ipmipower_ping.c'; then $(CYGPATH_W) 'ipmipower_ping.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_ping.c'; fi` ipmipower-ipmipower_powercmd.o: ipmipower_powercmd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_powercmd.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_powercmd.Tpo -c -o ipmipower-ipmipower_powercmd.o `test -f 'ipmipower_powercmd.c' || echo '$(srcdir)/'`ipmipower_powercmd.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_powercmd.Tpo $(DEPDIR)/ipmipower-ipmipower_powercmd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_powercmd.c' object='ipmipower-ipmipower_powercmd.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_powercmd.o `test -f 'ipmipower_powercmd.c' || echo '$(srcdir)/'`ipmipower_powercmd.c ipmipower-ipmipower_powercmd.obj: ipmipower_powercmd.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_powercmd.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_powercmd.Tpo -c -o ipmipower-ipmipower_powercmd.obj `if test -f 'ipmipower_powercmd.c'; then $(CYGPATH_W) 'ipmipower_powercmd.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_powercmd.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_powercmd.Tpo $(DEPDIR)/ipmipower-ipmipower_powercmd.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_powercmd.c' object='ipmipower-ipmipower_powercmd.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_powercmd.obj `if test -f 'ipmipower_powercmd.c'; then $(CYGPATH_W) 'ipmipower_powercmd.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_powercmd.c'; fi` ipmipower-ipmipower_prompt.o: ipmipower_prompt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_prompt.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_prompt.Tpo -c -o ipmipower-ipmipower_prompt.o `test -f 'ipmipower_prompt.c' || echo '$(srcdir)/'`ipmipower_prompt.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_prompt.Tpo $(DEPDIR)/ipmipower-ipmipower_prompt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_prompt.c' object='ipmipower-ipmipower_prompt.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_prompt.o `test -f 'ipmipower_prompt.c' || echo '$(srcdir)/'`ipmipower_prompt.c ipmipower-ipmipower_prompt.obj: ipmipower_prompt.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_prompt.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_prompt.Tpo -c -o ipmipower-ipmipower_prompt.obj `if test -f 'ipmipower_prompt.c'; then $(CYGPATH_W) 'ipmipower_prompt.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_prompt.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_prompt.Tpo $(DEPDIR)/ipmipower-ipmipower_prompt.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_prompt.c' object='ipmipower-ipmipower_prompt.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_prompt.obj `if test -f 'ipmipower_prompt.c'; then $(CYGPATH_W) 'ipmipower_prompt.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_prompt.c'; fi` ipmipower-ipmipower_util.o: ipmipower_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_util.o -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_util.Tpo -c -o ipmipower-ipmipower_util.o `test -f 'ipmipower_util.c' || echo '$(srcdir)/'`ipmipower_util.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_util.Tpo $(DEPDIR)/ipmipower-ipmipower_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_util.c' object='ipmipower-ipmipower_util.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_util.o `test -f 'ipmipower_util.c' || echo '$(srcdir)/'`ipmipower_util.c ipmipower-ipmipower_util.obj: ipmipower_util.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmipower-ipmipower_util.obj -MD -MP -MF $(DEPDIR)/ipmipower-ipmipower_util.Tpo -c -o ipmipower-ipmipower_util.obj `if test -f 'ipmipower_util.c'; then $(CYGPATH_W) 'ipmipower_util.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_util.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmipower-ipmipower_util.Tpo $(DEPDIR)/ipmipower-ipmipower_util.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmipower_util.c' object='ipmipower-ipmipower_util.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmipower_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmipower-ipmipower_util.obj `if test -f 'ipmipower_util.c'; then $(CYGPATH_W) 'ipmipower_util.c'; else $(CYGPATH_W) '$(srcdir)/ipmipower_util.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-hook uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmipower $(DESTDIR)$(sbindir)/ipmi-power uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-power # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmipower/Makefile.am0000644002055400205540000000455413527331636017342 0ustar00achuachu00000000000000sbin_PROGRAMS = ipmipower ipmipower_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libipmidetect \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -DWITH_LSD_FATAL_ERROR_FUNC=1 \ -DWITH_LSD_NOMEM_ERROR_FUNC=1 \ -D_GNU_SOURCE \ -D_REENTRANT ipmipower_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libipmidetect/libipmidetect.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmipower_SOURCES = \ argv.c \ argv.h \ ipmipower.c \ ipmipower.h \ ipmipower_argp.c \ ipmipower_argp.h \ ipmipower_check.c \ ipmipower_check.h \ ipmipower_connection.c \ ipmipower_connection.h \ ipmipower_error.c \ ipmipower_error.h \ ipmipower_oem.c \ ipmipower_oem.h \ ipmipower_output.c \ ipmipower_output.h \ ipmipower_packet.c \ ipmipower_packet.h \ ipmipower_ping.c \ ipmipower_ping.h \ ipmipower_powercmd.c \ ipmipower_powercmd.h \ ipmipower_prompt.c \ ipmipower_prompt.h \ ipmipower_util.c \ ipmipower_util.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libipmidetect/libipmidetect.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/ipmipower $(DESTDIR)$(sbindir)/ipmi-power uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/ipmi-power freeipmi-1.6.4/ipmipower/argv.c0000644002055400205540000001113313527331636016400 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: argv.c,v 1.14 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * The code in this file began with the code in the Powerman project. * See below for original copyright information. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . ***************************************************************************** * Copyright (C) 2003 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Andrew Uselton (uselton2@llnl.gov> * UCRL-CODE-2002-008. * * This file is part of PowerMan, a remote power management program. * For details, see . * * PowerMan is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * PowerMan is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with PowerMan; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include "argv.h" #include "freeipmi-portability.h" /* make a copy of the first word in str and advance str past it */ static char *_nextargv(char **strp, char *ignore) { char *str = *strp; char *word; int len; char *cpy = NULL; while (*str && (isspace(*str) || strchr(ignore, *str))) str++; word = str; while (*str && !(isspace(*str) || strchr(ignore, *str))) str++; len = str - word; if (len > 0) { if (!(cpy = (char *)malloc(len + 1))) { fprintf (stderr, "malloc: %s", strerror (errno)); exit (EXIT_FAILURE); } memcpy(cpy, word, len); cpy[len] = '\0'; } *strp = str; return cpy; } /* return number of space seperated words in str */ static int _sizeargv(char *str, char *ignore) { int count = 0; do { while (*str && (isspace(*str) || strchr(ignore, *str))) str++; if (*str) count++; while (*str && !(isspace(*str) || strchr(ignore, *str))) str++; } while (*str); return count; } /* Create a null-terminated argv array given a command line. * Characters in the 'ignore' set are treated like white space. */ char **argv_create(char *cmdline, char *ignore) { int argc = _sizeargv(cmdline, ignore); char **argv; int i; if (!(argv = (char **)malloc(sizeof(char *) * (argc + 1)))) { fprintf (stderr, "malloc: %s", strerror (errno)); exit (EXIT_FAILURE); } for (i = 0; i < argc; i++) { argv[i] = _nextargv(&cmdline, ignore); assert(argv[i] != NULL); } argv[i] = NULL; return argv; } /* Destroy a null-terminated argv array. */ void argv_destroy(char **argv) { int i; for (i = 0; argv[i] != NULL; i++) free((void *)argv[i]); free((void *)argv); } /* * vi:tabstop=4 shiftwidth=4 expandtab */ freeipmi-1.6.4/ipmipower/argv.h0000644002055400205540000000333213527331636016407 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: argv.h,v 1.6 2007-09-05 20:13:33 chu11 Exp $ ***************************************************************************** * Copyright (C) 2003 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Andrew Uselton (uselton2@llnl.gov> * UCRL-CODE-2002-008. * * This file is part of PowerMan, a remote power management program. * For details, see . * * PowerMan is free software; you can redistribute it and/or modify it under * the terms of the GNU General Public License as published by the Free * Software Foundation; either version 2 of the License, or (at your option) * any later version. * * PowerMan is distributed in the hope that it will be useful, but WITHOUT * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with PowerMan; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. \*****************************************************************************/ #ifndef ARGV_H #define ARGV_H /* Create a NULL-terminated argv array suitable for passing to execv() * from 'cmdline' string. Characters in the 'ignore' set are treated as white * space. Caller must free with argv_destroy(). */ char **argv_create(char *cmdline, char *ignore); /* Destroy an argv array created by argv_create. */ void argv_destroy(char **argv); #endif /* ARGV_H */ freeipmi-1.6.4/ipmipower/ipmipower.c0000644002055400205540000005325313527331636017465 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower.c,v 1.94 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include "ipmipower.h" #include "ipmipower_argp.h" #include "ipmipower_connection.h" #include "ipmipower_error.h" #include "ipmipower_oem.h" #include "ipmipower_powercmd.h" #include "ipmipower_prompt.h" #include "ipmipower_ping.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "fi_hostlist.h" #include "tool-common.h" #include "tool-util-common.h" cbuf_t ttyin; cbuf_t ttyout; /* configuration for ipmipower */ struct ipmipower_arguments cmd_args; /* Array of all ipmi "connections" */ struct ipmipower_connection *ics = NULL; unsigned int ics_len = 0; /* Array of fi_hostlists for short output */ int output_hostrange_flag = 0; fi_hostlist_t output_hostrange[IPMIPOWER_MSG_TYPE_NUM_ENTRIES]; /* Array of outputs for determining exit value */ unsigned int output_counts[IPMIPOWER_MSG_TYPE_NUM_ENTRIES]; static void _ipmipower_setup (void) { int i; struct rlimit rlim; /* Make best effort to increase file descriptor limit, if it fails * for any reason, don't worry about it, its no big deal. */ if (getrlimit (RLIMIT_NOFILE, &rlim) == 0) { rlim.rlim_cur = rlim.rlim_max; setrlimit (RLIMIT_NOFILE,&rlim); } if (ipmi_rmcpplus_init () < 0) { if (errno == EPERM) IPMIPOWER_ERROR (("ipmi_rmcpplus_init: incompatible crypto library")); else IPMIPOWER_ERROR (("ipmi_rmcpplus_init: %s", strerror (errno))); exit (EXIT_FAILURE); } /* Create TTY bufs */ if (!(ttyin = cbuf_create (IPMIPOWER_MIN_TTY_BUF, IPMIPOWER_MAX_TTY_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ttyin, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); if (!(ttyout = cbuf_create (IPMIPOWER_MIN_TTY_BUF, IPMIPOWER_MAX_TTY_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ttyout, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); for (i = 0; i < IPMIPOWER_MSG_TYPE_NUM_ENTRIES; i++) { if (!(output_hostrange[i] = fi_hostlist_create (NULL))) { IPMIPOWER_ERROR (("fi_hostlist_create: %s", strerror (errno))); exit (EXIT_FAILURE); } } memset (output_counts, '\0', sizeof (output_counts)); } static void _ipmipower_cleanup (void) { int i; cbuf_destroy (ttyin); /* Flush before destroying. */ cbuf_read_to_fd (ttyout, STDOUT_FILENO, -1); cbuf_destroy (ttyout); ipmipower_connection_array_destroy (ics, ics_len); for (i = 0; i < IPMIPOWER_MSG_TYPE_NUM_ENTRIES; i++) fi_hostlist_destroy (output_hostrange[i]); } static void _eliminate_nodes (void) { if (cmd_args.common_args.eliminate) { ipmidetect_t id = NULL; int i; if (!(id = ipmidetect_handle_create ())) { IPMIPOWER_ERROR (("ipmidetect_handle_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ipmidetect_load_data (id, NULL, 0, 0) < 0) { if (ipmidetect_errnum (id) == IPMIDETECT_ERR_CONNECT || ipmidetect_errnum (id) == IPMIDETECT_ERR_CONNECT_TIMEOUT) IPMIPOWER_ERROR (("Error connecting to ipmidetect daemon")); else IPMIPOWER_ERROR (("ipmidetect_load_data: %s", ipmidetect_errormsg (id))); exit (EXIT_FAILURE); } for (i = 0; i < ics_len; i++) { int ret; if ((ret = ipmidetect_is_node_detected (id, ics[i].hostname)) < 0) { if (ipmidetect_errnum (id) == IPMIDETECT_ERR_NOTFOUND) IPMIPOWER_ERROR (("Node '%s' unrecognized by ipmidetect", ics[i].hostname)); else IPMIPOWER_ERROR (("ipmidetect_is_node_detected: %s", ipmidetect_errormsg (id))); exit (EXIT_FAILURE); } if (!ret) ics[i].skip++; } ipmidetect_handle_destroy (id); } } static void _sendto (cbuf_t cbuf, int fd, struct sockaddr *destaddr, socklen_t destaddrlen) { int n, rv; uint8_t buf[IPMIPOWER_PACKET_BUFLEN]; if ((n = cbuf_read (cbuf, buf, IPMIPOWER_PACKET_BUFLEN)) < 0) { IPMIPOWER_ERROR (("cbuf_read: %s", fd, strerror (errno))); exit (EXIT_FAILURE); } if (n == IPMIPOWER_PACKET_BUFLEN) { IPMIPOWER_ERROR (("cbuf_read: buffer full")); exit (EXIT_FAILURE); } do { if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) rv = ipmi_lan_sendto (fd, buf, n, 0, destaddr, destaddrlen); else { if (ipmi_is_ipmi_1_5_packet (buf, n)) rv = ipmi_lan_sendto (fd, buf, n, 0, destaddr, destaddrlen); else rv = ipmi_rmcpplus_sendto (fd, buf, n, 0, destaddr, destaddrlen); } } while (rv < 0 && errno == EINTR); if (rv < 0) { IPMIPOWER_ERROR (("ipmi_lan/rmcpplus_sendto: %s", strerror (errno))); exit (EXIT_FAILURE); } /* cbuf should be empty now */ if (!cbuf_is_empty (cbuf)) { IPMIPOWER_ERROR (("cbuf not empty")); exit (EXIT_FAILURE); } } static void _recvfrom (cbuf_t cbuf, int fd, struct sockaddr *srcaddr, socklen_t srcaddrlen) { int n, rv, dropped = 0; uint8_t buf[IPMIPOWER_PACKET_BUFLEN]; struct sockaddr_in6 from6; struct sockaddr *from = (struct sockaddr *)&from6; socklen_t fromlen = sizeof (struct sockaddr_in6); do { /* For receive side, ipmi_lan_recvfrom and * ipmi_rmcpplus_recvfrom are identical. So we just use * ipmi_lan_recvfrom for both. * * In event of future change, should use util functions * ipmi_is_ipmi_1_5_packet or ipmi_is_ipmi_2_0_packet * appropriately. */ rv = ipmi_lan_recvfrom (fd, buf, IPMIPOWER_PACKET_BUFLEN, 0, from, &fromlen); } while (rv < 0 && errno == EINTR); /* achu & hliebig: * * Premise from ipmitool (http://ipmitool.sourceforge.net/) * * On some OSes (it seems Unixes), the behavior is to not return * port denied errors up to the client for UDP responses (i.e. you * need to timeout). But on some OSes (it seems Windows), the * behavior is to return port denied errors up to the user for UDP * responses via ECONNRESET or ECONNREFUSED. * * If this were just the case, we could return or handle errors * properly and move on. However, it's not the case. * * According to Ipmitool, on some motherboards, both the OS and the * BMC are capable of responding to an IPMI request. That means you * can get an ECONNRESET or ECONNREFUSED, then later on, get your * real IPMI response. * * Our solution is copied from Ipmitool, we'll ignore some specific * errors and try to read again. * * If the ECONNREFUSED or ECONNRESET is from the OS, but we will get * an IPMI response later, the recvfrom later on gets the packet we * want. * * If the ECONNREFUSED or ECONNRESET is from the OS but there is no * BMC (or IPMI disabled, etc.), just do the recvfrom again to * eventually get a timeout, which is the behavior we'd like. */ if (rv < 0 && (errno == ECONNRESET || errno == ECONNREFUSED)) { IPMIPOWER_DEBUG (("ipmi_lan_recvfrom: connection refused: %s", strerror (errno))); return; } if (rv < 0) { IPMIPOWER_ERROR (("ipmi_lan_recvfrom: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) { IPMIPOWER_ERROR (("ipmi_lan_recvfrom: EOF")); exit (EXIT_FAILURE); } if (from6.sin6_family == AF_INET6) { if (memcmp (&from6.sin6_addr, &(((struct sockaddr_in6 *)srcaddr)->sin6_addr), sizeof (from6.sin6_addr))) return; } else { /* memcpy hacks to avoid warnings, i.e. * warning: dereferencing pointer 'X' does break strict-aliasing rules */ struct sockaddr_in from4; memcpy (&from4, from, fromlen); if (from4.sin_addr.s_addr != ((struct sockaddr_in *)srcaddr)->sin_addr.s_addr) return; } /* cbuf should be empty, but if it isn't, empty it */ if (!cbuf_is_empty (cbuf)) { IPMIPOWER_DEBUG (("cbuf not empty, draining")); do { uint8_t tempbuf[IPMIPOWER_PACKET_BUFLEN]; if (cbuf_read (cbuf, tempbuf, IPMIPOWER_PACKET_BUFLEN) < 0) { IPMIPOWER_ERROR (("cbuf_read: %s", strerror (errno))); exit (EXIT_FAILURE); } } while(!cbuf_is_empty (cbuf)); } if ((n = cbuf_write (cbuf, buf, rv, &dropped)) < 0) { IPMIPOWER_ERROR (("cbuf_write: %s", strerror (errno))); exit (EXIT_FAILURE); } if (n != rv) { IPMIPOWER_ERROR (("cbuf_write: rv=%d n=%d", rv, n)); exit (EXIT_FAILURE); } if (dropped) IPMIPOWER_DEBUG (("cbuf_write: read dropped %d bytes", dropped)); } /* _poll_loop * - poll on all descriptors */ static void _poll_loop (int non_interactive) { int nfds = 0; struct pollfd *pfds = NULL; int extra_fds; /* number of fds for stdin and stdout we'll need when polling * * Right now, always poll stdout. When non-interactive, * don't need stdin */ extra_fds = 1 + (non_interactive ? 0 : 1); while (non_interactive || ipmipower_prompt_process_cmdline ()) { int i, num, timeout; int powercmd_timeout = -1; int ping_timeout = -1; /* If there are no pending commands before this call, * powercmd_timeout will not be set, leaving it at -1 */ num = ipmipower_powercmd_process_pending (&powercmd_timeout); if (non_interactive && !num) break; /* ping timeout is always set if cmd_args.ping_interval > 0 */ ipmipower_ping_process_pings (&ping_timeout); if (cmd_args.ping_interval) { if (powercmd_timeout == -1) timeout = ping_timeout; else timeout = (ping_timeout < powercmd_timeout) ? ping_timeout : powercmd_timeout; } else timeout = powercmd_timeout; /* achu: I always wonder if this poll() loop could be done far * more elegantly and efficiently without all this crazy * indexing, perhaps through a callback/event mechanism. It'd * probably be more efficient, since most callback/event based * models have min-heap like structures inside for determining * what things timed out. Overall though, I don't think the O(n) * (n being hosts/fds) processing is really that inefficient for * this particular application and is not worth going back and * changing. By going to a callback/event mechanism, there will * still be some O(n) activities within the code, so I am only * going to create a more efficient O(n) poll loop. */ /* Has the number of hosts changed? */ if (nfds != (ics_len*2) + extra_fds) { /* The "*2" is for each host's two fds, one for ipmi * (ipmi_fd) and one for rmcp (ping_fd). */ nfds = (ics_len*2) + extra_fds; free (pfds); if (!(pfds = (struct pollfd *)malloc (nfds * sizeof (struct pollfd)))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } } for (i = 0; i < ics_len; i++) { pfds[i*2].fd = ics[i].ipmi_fd; pfds[i*2+1].fd = ics[i].ping_fd; pfds[i*2].events = pfds[i*2+1].events = 0; pfds[i*2].revents = pfds[i*2+1].revents = 0; pfds[i*2].events |= POLLIN; if (!cbuf_is_empty (ics[i].ipmi_out)) pfds[i*2].events |= POLLOUT; if (!cmd_args.ping_interval) continue; pfds[i*2+1].events |= POLLIN; if (!cbuf_is_empty (ics[i].ping_out)) pfds[i*2+1].events |= POLLOUT; } if (!non_interactive) { pfds[nfds-2].fd = STDIN_FILENO; pfds[nfds-2].events = POLLIN; pfds[nfds-2].revents = 0; } pfds[nfds-1].fd = STDOUT_FILENO; if (!cbuf_is_empty (ttyout)) pfds[nfds-1].events = POLLOUT; else pfds[nfds-1].events = 0; pfds[nfds-1].revents = 0; ipmipower_poll (pfds, nfds, timeout); for (i = 0; i < ics_len; i++) { if (pfds[i*2].revents & POLLERR) { IPMIPOWER_DEBUG (("host = %s; IPMI POLLERR", ics[i].hostname)); /* See comments in _ipmi_recvfrom() regarding ECONNRESET/ECONNREFUSED */ _recvfrom (ics[i].ipmi_in, ics[i].ipmi_fd, ics[i].destaddr, ics[i].destaddrlen); } else { if (pfds[i*2].revents & POLLIN) _recvfrom (ics[i].ipmi_in, ics[i].ipmi_fd, ics[i].destaddr, ics[i].destaddrlen); if (pfds[i*2].revents & POLLOUT) _sendto (ics[i].ipmi_out, ics[i].ipmi_fd, ics[i].destaddr, ics[i].destaddrlen); } if (!cmd_args.ping_interval) continue; if (pfds[i*2+1].revents & POLLERR) { IPMIPOWER_DEBUG (("host = %s; PING_POLLERR", ics[i].hostname)); _recvfrom (ics[i].ping_in, ics[i].ping_fd, ics[i].destaddr, ics[i].destaddrlen); } else { if (pfds[i*2+1].revents & POLLIN) _recvfrom (ics[i].ping_in, ics[i].ping_fd, ics[i].destaddr, ics[i].destaddrlen); if (pfds[i*2+1].revents & POLLOUT) _sendto (ics[i].ping_out, ics[i].ping_fd, ics[i].destaddr, ics[i].destaddrlen); } } if (!non_interactive && (pfds[nfds-2].revents & POLLIN)) { int n, dropped = 0; if ((n = cbuf_write_from_fd (ttyin, STDIN_FILENO, -1, &dropped)) < 0) { IPMIPOWER_ERROR (("cbuf_write_from_fd: %s", strerror (errno))); exit (EXIT_FAILURE); } /* achu: If you are running ipmipower in co-process mode * with powerman, this error condition will probably be hit * with the file descriptor STDIN_FILENO. The powerman * daemon is usually closed by /etc/init.d/powerman stop, * which kills a process through a signal. Thus, powerman * closes stdin and stdout pipes to ipmipower and the call * to cbuf_write_from_fd will give us an EOF reading. We'll * consider this EOF an "ok" error. No need to output an * error message. */ if (!n) exit (EXIT_FAILURE); if (dropped) IPMIPOWER_DEBUG (("cbuf_write_from_fd: read dropped %d bytes", dropped)); } if (!cbuf_is_empty (ttyout) && (pfds[nfds-1].revents & POLLOUT)) { if (cbuf_read_to_fd (ttyout, STDOUT_FILENO, -1) < 0) { IPMIPOWER_ERROR (("cbuf_read_to_fd: %s", strerror (errno))); exit (EXIT_FAILURE); } } } free (pfds); } int main (int argc, char *argv[]) { int i; ipmi_disable_coredump (); ipmipower_argp_parse (argc, argv, &cmd_args); /* after ipmipower_argp_parse - IPMIPOWER_ERROR/IPMIPOWER_DEBUG * macros used */ if (cmd_args.powercmd == IPMIPOWER_POWER_CMD_NONE) ipmipower_error_setup (IPMIPOWER_ERROR_STDERR | IPMIPOWER_ERROR_SYSLOG); else ipmipower_error_setup (IPMIPOWER_ERROR_STDERR); _ipmipower_setup (); ipmipower_powercmd_setup (); if (cmd_args.common_args.hostname) { unsigned int len = 0; if (!(ics = ipmipower_connection_array_create (cmd_args.common_args.hostname, &len))) { /* dump error outputs here, most notably invalid hostname output */ cbuf_read_to_fd (ttyout, STDOUT_FILENO, -1); exit (EXIT_FAILURE); } ics_len = len; } /* If power command (i.e. --reset, --stat, etc.) is passed at * command line, put the power control commands in the pending * queue. */ if (cmd_args.powercmd != IPMIPOWER_POWER_CMD_NONE) { struct ipmipower_connection_extra_arg *eanode; char errbuf[IPMIPOWER_OUTPUT_BUFLEN + 1]; /* must be checked in args parsing */ assert (cmd_args.common_args.hostname); cmd_args.ping_interval = 0; memset (errbuf, '\0', IPMIPOWER_OUTPUT_BUFLEN + 1); if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_NONE) { if (ipmipower_power_cmd_check_privilege (cmd_args.powercmd, errbuf, IPMIPOWER_OUTPUT_BUFLEN) <= 0) { IPMIPOWER_ERROR (("%s", errbuf)); exit (EXIT_FAILURE); } } else { if (ipmipower_oem_power_cmd_check_support_and_privilege (cmd_args.powercmd, errbuf, IPMIPOWER_OUTPUT_BUFLEN) <= 0) { IPMIPOWER_ERROR (("%s", errbuf)); exit (EXIT_FAILURE); } } _eliminate_nodes (); /* Because can input multiple hosts, check all args before doing * powercmd queue so we don't do any if any single argument is * invalid */ if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { for (i = 0; i < ics_len; i++) { assert (ics[i].extra_args); if (ics[i].skip) continue; eanode = ics[i].extra_args; while (eanode) { memset (errbuf, '\0', IPMIPOWER_OUTPUT_BUFLEN + 1); if (ipmipower_oem_power_cmd_check_extra_arg (eanode->extra_arg, errbuf, IPMIPOWER_OUTPUT_BUFLEN) <= 0) { IPMIPOWER_ERROR (("%s", errbuf)); exit (EXIT_FAILURE); } eanode = eanode->next; } } } for (i = 0; i < ics_len; i++) { if (ics[i].skip) continue; if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { assert (ics[i].extra_args); eanode = ics[i].extra_args; while (eanode) { ipmipower_powercmd_queue (cmd_args.powercmd, &ics[i], eanode->extra_arg); eanode = eanode->next; } } else ipmipower_powercmd_queue (cmd_args.powercmd, &ics[i], NULL); } } /* immediately send out discovery messages upon startup */ ipmipower_ping_force_discovery_sweep (); _poll_loop ((cmd_args.powercmd != IPMIPOWER_POWER_CMD_NONE) ? 1 : 0); ipmipower_powercmd_cleanup (); _ipmipower_cleanup (); /* If any error messages other than "on", "off", or "ok", then an * error occurred */ for (i = IPMIPOWER_MSG_TYPE_ERROR_MIN; i < IPMIPOWER_MSG_TYPE_ERROR_MAX; i++) { if (output_counts[i]) return (EXIT_FAILURE); } return (EXIT_SUCCESS); } freeipmi-1.6.4/ipmipower/ipmipower.h0000644002055400205540000005107413527331636017471 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower.h,v 1.145 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_H #define IPMIPOWER_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include /* MAXHOSTNAMELEN */ #ifdef HAVE_NETDB_H #include /* MAXHOSTNAMELEN Solaris */ #endif /* HAVE_NETDB_H */ #include #include "cbuf.h" #include "fi_hostlist.h" #include "list.h" #include "tool-cmdline-common.h" #include "ipmidetect.h" #ifndef MAXHOSTNAMELEN #define MAXHOSTNAMELEN 64 #endif /* MAXHOSTNAMELEN */ #define MAXPORTBUFLEN 16 #define IPMIPOWER_MIN_TTY_BUF 1024*4 #define IPMIPOWER_MAX_TTY_BUF 1024*32 #define IPMIPOWER_LAN_INITIAL_OUTBOUND_SEQUENCE_NUMBER 1 #define IPMIPOWER_RMCPPLUS_INITIAL_OUTBOUND_SEQUENCE_NUMBER 0 #define IPMIPOWER_PACKET_BUFLEN 1024 #define IPMIPOWER_OUTPUT_BUFLEN 65536 #define IPMI_MAX_SIK_KEY_LENGTH 64 #define IPMI_MAX_INTEGRITY_KEY_LENGTH 64 #define IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH 64 #define IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH 64 typedef enum { IPMIPOWER_POWER_CMD_NONE = 0x00, IPMIPOWER_POWER_CMD_POWER_OFF = 0x01, IPMIPOWER_POWER_CMD_POWER_ON = 0x02, IPMIPOWER_POWER_CMD_POWER_CYCLE = 0x03, IPMIPOWER_POWER_CMD_POWER_RESET = 0x04, IPMIPOWER_POWER_CMD_POWER_STATUS = 0x05, IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT = 0x06, IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS = 0x07, IPMIPOWER_POWER_CMD_IDENTIFY_ON = 0x08, IPMIPOWER_POWER_CMD_IDENTIFY_OFF = 0x09, IPMIPOWER_POWER_CMD_IDENTIFY_STATUS = 0x0A, } ipmipower_power_cmd_t; #define IPMIPOWER_POWER_CMD_VALID(__c) \ (((__c) >= IPMIPOWER_POWER_CMD_POWER_OFF \ && (__c) <= IPMIPOWER_POWER_CMD_IDENTIFY_STATUS) ? 1 : 0) #define IPMIPOWER_POWER_CMD_REQUIRES_OPERATOR_PRIVILEGE_LEVEL(__c) \ ((__c) == IPMIPOWER_POWER_CMD_POWER_OFF \ || (__c) == IPMIPOWER_POWER_CMD_POWER_ON \ || (__c) == IPMIPOWER_POWER_CMD_POWER_CYCLE \ || (__c) == IPMIPOWER_POWER_CMD_POWER_RESET \ || (__c) == IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT \ || (__c) == IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS \ || (__c) == IPMIPOWER_POWER_CMD_IDENTIFY_ON \ || (__c) == IPMIPOWER_POWER_CMD_IDENTIFY_OFF) typedef enum { IPMIPOWER_OEM_POWER_TYPE_NONE = 0, IPMIPOWER_OEM_POWER_TYPE_C410X = 1, IPMIPOWER_OEM_POWER_TYPE_INVALID = 255 } oem_power_type_t; #define IPMIPOWER_OEM_POWER_TYPE_NONE_STR "none" #define IPMIPOWER_OEM_POWER_TYPE_C410X_STR "c410x" #define IPMIPOWER_OEM_POWER_TYPE_VALID(__v) \ (((__v) == IPMIPOWER_OEM_POWER_TYPE_NONE \ || (__v) == IPMIPOWER_OEM_POWER_TYPE_C410X) ? 1 : 0) #define IPMIPOWER_OEM_POWER_TYPE_REQUIRES_EXTRA_ARGUMENT(__v) \ (((__v) == IPMIPOWER_OEM_POWER_TYPE_C410X) ? 1 : 0) #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_OFF 0x0001 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_ON 0x0002 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_CYCLE 0x0004 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_RESET 0x0008 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_STATUS 0x0010 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_DIAGNOSTIC_INTERRUPT 0x0020 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_SOFT_SHUTDOWN_OS 0x0040 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_ON 0x0080 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_OFF 0x0100 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_STATUS 0x0200 #define IPMIPOWER_OEM_POWER_TYPE_SUPPORT_ALL 0xFFFF struct oem_power_type_data { char *name; unsigned int supported_operations; }; typedef enum { IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ = 0x101, IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS = 0x201, IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ = 0x102, IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS = 0x202, IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ = 0x103, IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS = 0x203, IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST = 0x104, IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE = 0x204, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1 = 0x105, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2 = 0x205, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3 = 0x106, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4 = 0x206, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ = 0x107, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS = 0x207, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ = 0x108, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS = 0x208, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ = 0x109, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS = 0x209, IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ = 0x10A, IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS = 0x20A, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ = 0x10B, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS = 0x20B, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ = 0x10C, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS = 0x20C, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ = 0x10D, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS = 0x20D, } ipmipower_packet_type_t; #define IPMIPOWER_PACKET_TYPE_RQ_MASK 0x100 #define IPMIPOWER_PACKET_TYPE_RS_MASK 0x200 #define IPMIPOWER_PACKET_TYPE_MIN 0x001 #define IPMIPOWER_PACKET_TYPE_MAX 0x00D #define IPMIPOWER_PACKET_TYPE_PACKET_MASK 0x0FF #define IPMIPOWER_PACKET_TYPE_PACKET_VALID(__p) \ (((__p) & IPMIPOWER_PACKET_TYPE_PACKET_MASK) >= IPMIPOWER_PACKET_TYPE_MIN \ && ((__p) & IPMIPOWER_PACKET_TYPE_PACKET_MASK) <= IPMIPOWER_PACKET_TYPE_MAX) #define IPMIPOWER_PACKET_TYPE_RQ(__p) \ ((((__p) & IPMIPOWER_PACKET_TYPE_RQ_MASK) \ && IPMIPOWER_PACKET_TYPE_PACKET_VALID ((__p))) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_RS(__p) \ ((((__p) & IPMIPOWER_PACKET_TYPE_RS_MASK) \ && IPMIPOWER_PACKET_TYPE_PACKET_VALID ((__p))) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_VALID(__p) \ ((IPMIPOWER_PACKET_TYPE_RQ ((__p)) \ || IPMIPOWER_PACKET_TYPE_RS ((__p))) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP(__p) \ ((((__p) == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RQ(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP (__p) \ && IPMIPOWER_PACKET_TYPE_RQ (__p)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP (__p) \ && IPMIPOWER_PACKET_TYPE_RS (__p)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP(__p) \ ((((__p) == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST \ || (__p) == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE \ || (__p) == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1 \ || (__p) == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2 \ || (__p) == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3 \ || (__p) == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP (__p) \ && IPMIPOWER_PACKET_TYPE_RQ (__p)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP (__p) \ && IPMIPOWER_PACKET_TYPE_RS (__p)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET(__p) \ ((((__p) == IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS \ || (__p) == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ \ || (__p) == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET (__p) \ && IPMIPOWER_PACKET_TYPE_RQ (__p)) ? 1 : 0) #define IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS(__p) \ ((IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET (__p) \ && IPMIPOWER_PACKET_TYPE_RS (__p)) ? 1 : 0) typedef enum { IPMIPOWER_PROTOCOL_STATE_START = 0x00, IPMIPOWER_PROTOCOL_STATE_AUTHENTICATION_CAPABILITIES_SENT = 0x01, IPMIPOWER_PROTOCOL_STATE_GET_SESSION_CHALLENGE_SENT = 0x02, IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT = 0x03, IPMIPOWER_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT = 0x04, IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT = 0x05, IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT = 0x06, IPMIPOWER_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT = 0x07, IPMIPOWER_PROTOCOL_STATE_GET_CHASSIS_STATUS_SENT = 0x08, IPMIPOWER_PROTOCOL_STATE_CHASSIS_CONTROL_SENT = 0x09, IPMIPOWER_PROTOCOL_STATE_CHASSIS_IDENTIFY_SENT = 0x0A, IPMIPOWER_PROTOCOL_STATE_C410X_GET_SENSOR_READING_SENT = 0x0B, IPMIPOWER_PROTOCOL_STATE_C410X_SLOT_POWER_CONTROL_SENT = 0x0C, IPMIPOWER_PROTOCOL_STATE_CLOSE_SESSION_SENT = 0x0D, IPMIPOWER_PROTOCOL_STATE_END = 0x0E, } ipmipower_protocol_state_t; #define IPMIPOWER_PROTOCOL_STATE_VALID(__s) \ (((__s) >= IPMIPOWER_PROTOCOL_STATE_START \ && (__s) <= IPMIPOWER_PROTOCOL_STATE_END) ? 1 : 0) typedef enum { IPMIPOWER_DISCOVER_STATE_DISCOVERED = 0x01, IPMIPOWER_DISCOVER_STATE_UNDISCOVERED = 0x02, IPMIPOWER_DISCOVER_STATE_BADCONNECTION = 0x03, } ipmipower_discover_state_t; #define IPMIPOWER_DISCOVER_STATE_VALID(__s) \ (((__s) >= IPMIPOWER_DISCOVER_STATE_DISCOVERED \ && (__s) <= IPMIPOWER_DISCOVER_STATE_BADCONNECTION) ? 1 : 0) typedef enum { IPMIPOWER_LINK_STATE_GOOD = 0x01, IPMIPOWER_LINK_STATE_BAD = 0x02, } ipmipower_link_state_t; #define IPMIPOWER_LINK_STATE_VALID(__s) \ (((__s) >= IPMIPOWER_LINK_STATE_GOOD \ && (__s) <= IPMIPOWER_LINK_STATE_BAD) ? 1 : 0) typedef enum { IPMIPOWER_MSG_TYPE_ON = 0, IPMIPOWER_MSG_TYPE_OFF = 1, IPMIPOWER_MSG_TYPE_OK = 2, IPMIPOWER_MSG_TYPE_UNKNOWN = 3, IPMIPOWER_MSG_TYPE_USERNAME_INVALID = 4, IPMIPOWER_MSG_TYPE_PASSWORD_INVALID = 5, IPMIPOWER_MSG_TYPE_PASSWORD_LENGTH_INVALID = 6, IPMIPOWER_MSG_TYPE_K_G_INVALID = 7, IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED = 8, IPMIPOWER_MSG_TYPE_OPERATION_INVALID = 9, IPMIPOWER_MSG_TYPE_AUTHENTICATION_TYPE_UNAVAILABLE = 10, IPMIPOWER_MSG_TYPE_CIPHER_SUITE_ID_UNAVAILABLE = 11, IPMIPOWER_MSG_TYPE_PASSWORD_VERIFICATION_TIMEOUT = 12, IPMIPOWER_MSG_TYPE_CONNECTION_TIMEOUT = 13, IPMIPOWER_MSG_TYPE_SESSION_TIMEOUT = 14, IPMIPOWER_MSG_TYPE_NOTDISCOVERED = 15, IPMIPOWER_MSG_TYPE_BADCONNECTION = 16, IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID = 17, IPMIPOWER_MSG_TYPE_UNCONFIGURED_HOSTNAME = 18, IPMIPOWER_MSG_TYPE_RESOURCES = 19, IPMIPOWER_MSG_TYPE_IPMI_2_0_UNAVAILABLE = 20, IPMIPOWER_MSG_TYPE_INVALID_ARGUMENT_FOR_OEM_EXTENSION = 21, IPMIPOWER_MSG_TYPE_BMC_BUSY = 22, IPMIPOWER_MSG_TYPE_BMC_ERROR = 23, } ipmipower_msg_type_t; #define IPMIPOWER_MSG_TYPE_VALID(__m) \ ((__m) >= IPMIPOWER_MSG_TYPE_ON \ && (__m) <= IPMIPOWER_MSG_TYPE_BMC_ERROR) #define IPMIPOWER_MSG_TYPE_ERROR_MIN IPMIPOWER_MSG_TYPE_UNKNOWN #define IPMIPOWER_MSG_TYPE_ERROR_MAX IPMIPOWER_MSG_TYPE_BMC_ERROR #define IPMIPOWER_MSG_TYPE_NUM_ENTRIES (IPMIPOWER_MSG_TYPE_BMC_ERROR + 1) /* ipmipower_powercmd * - Stores all information needed to execute a power command */ struct ipmipower_powercmd { ipmipower_power_cmd_t cmd; ipmipower_protocol_state_t protocol_state; /* * Protocol State Machine Variables */ struct timeval time_begin; unsigned int retransmission_count; uint8_t close_timeout; /* * Protocol Maintenance Variables */ unsigned int session_inbound_count; uint32_t highest_received_sequence_number; uint32_t previously_received_list; /* IPMI 1.5 specific */ int permsgauth_enabled; /* IPMI 2.0 specific */ uint8_t requested_maximum_privilege_level; uint8_t authentication_algorithm; uint8_t integrity_algorithm; uint8_t confidentiality_algorithm; uint8_t sik_key[IPMI_MAX_SIK_KEY_LENGTH]; void *sik_key_ptr; unsigned int sik_key_len; uint8_t integrity_key[IPMI_MAX_INTEGRITY_KEY_LENGTH]; void *integrity_key_ptr; unsigned int integrity_key_len; uint8_t confidentiality_key[IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH]; void *confidentiality_key_ptr; unsigned int confidentiality_key_len; uint8_t initial_message_tag; uint8_t message_tag_count; uint32_t session_sequence_number; uint8_t name_only_lookup; uint32_t remote_console_session_id; uint8_t remote_console_random_number[IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH]; /* Ipmipower variables */ int wait_until_on_state; int wait_until_off_state; struct ipmipower_connection *ic; fiid_obj_t obj_rmcp_hdr_rq; fiid_obj_t obj_rmcp_hdr_rs; fiid_obj_t obj_lan_session_hdr_rq; fiid_obj_t obj_lan_session_hdr_rs; fiid_obj_t obj_lan_msg_hdr_rq; fiid_obj_t obj_lan_msg_hdr_rs; fiid_obj_t obj_lan_msg_trlr_rs; fiid_obj_t obj_rmcpplus_session_hdr_rq; fiid_obj_t obj_rmcpplus_session_hdr_rs; fiid_obj_t obj_rmcpplus_payload_rs; fiid_obj_t obj_rmcpplus_session_trlr_rq; fiid_obj_t obj_rmcpplus_session_trlr_rs; fiid_obj_t obj_authentication_capabilities_rq; fiid_obj_t obj_authentication_capabilities_rs; fiid_obj_t obj_get_session_challenge_rq; fiid_obj_t obj_get_session_challenge_rs; fiid_obj_t obj_activate_session_rq; fiid_obj_t obj_activate_session_rs; fiid_obj_t obj_open_session_rq; fiid_obj_t obj_open_session_rs; fiid_obj_t obj_rakp_message_1_rq; fiid_obj_t obj_rakp_message_2_rs; fiid_obj_t obj_rakp_message_3_rq; fiid_obj_t obj_rakp_message_4_rs; fiid_obj_t obj_set_session_privilege_level_rq; fiid_obj_t obj_set_session_privilege_level_rs; fiid_obj_t obj_get_chassis_status_rq; fiid_obj_t obj_get_chassis_status_rs; fiid_obj_t obj_chassis_control_rq; fiid_obj_t obj_chassis_control_rs; fiid_obj_t obj_chassis_identify_rq; fiid_obj_t obj_chassis_identify_rs; fiid_obj_t obj_c410x_get_sensor_reading_rq; fiid_obj_t obj_c410x_get_sensor_reading_rs; fiid_obj_t obj_c410x_slot_power_control_rq; fiid_obj_t obj_c410x_slot_power_control_rs; fiid_obj_t obj_close_session_rq; fiid_obj_t obj_close_session_rs; List sockets_to_close; /* for oem power control ; extra arg passed in via "+extra" at end of hostname */ char *extra_arg; /* for oem power control to the same node */ struct ipmipower_powercmd *next; }; struct ipmipower_connection_extra_arg { struct ipmipower_connection_extra_arg *next; char *extra_arg; }; /* ipmipower_connection * - Stores various information and data for each remote node ipmi * "connection" we have. */ struct ipmipower_connection { int ipmi_fd; int ping_fd; cbuf_t ipmi_in; cbuf_t ipmi_out; cbuf_t ping_in; cbuf_t ping_out; unsigned int ipmi_requester_sequence_number_counter; unsigned int ping_sequence_number_counter; struct timeval last_ipmi_send; struct timeval last_ping_send; struct timeval last_ipmi_recv; struct timeval last_ping_recv; ipmipower_link_state_t link_state; unsigned int ping_last_packet_recv_flag; unsigned int ping_packet_count_send; unsigned int ping_packet_count_recv; unsigned int ping_consec_count; ipmipower_discover_state_t discover_state; char hostname[MAXHOSTNAMELEN+1]; /* for oem power types ; extra arg passed in via "+extra" at end of hostname */ struct ipmipower_connection_extra_arg *extra_args; struct sockaddr *srcaddr; socklen_t srcaddrlen; struct sockaddr_in srcaddr4; struct sockaddr_in6 srcaddr6; struct sockaddr *destaddr; socklen_t destaddrlen; struct sockaddr_in destaddr4; struct sockaddr_in6 destaddr6; /* for eliminate option */ int skip; }; typedef struct ipmipower_powercmd *ipmipower_powercmd_t; typedef struct ipmipower_connection *ipmipower_connection_t; enum ipmipower_argp_option_keys { IPMI_VERSION_KEY = 160, /* legacy option */ RMCPDUMP_KEY = 161, ON_KEY = 'n', OFF_KEY = 'f', CYCLE_KEY = 'c', RESET_KEY = 'r', STAT_KEY = 's', PULSE_KEY = 162, SOFT_KEY = 163, ON_IF_OFF_KEY = 164, WAIT_UNTIL_OFF_KEY = 165, WAIT_UNTIL_ON_KEY = 166, OEM_POWER_TYPE_KEY = 167, RETRY_WAIT_TIMEOUT_KEY = 168, RETRANSMISSION_WAIT_TIMEOUT_KEY = 169, RETRY_BACKOFF_COUNT_KEY = 170, RETRANSMISSION_BACKOFF_COUNT_KEY = 171, PING_INTERVAL_KEY = 172, PING_TIMEOUT_KEY = 173, PING_PACKET_COUNT_KEY = 174, PING_PERCENT_KEY = 175, PING_CONSEC_COUNT_KEY = 176, }; struct ipmipower_arguments { struct common_cmd_args common_args; #ifndef NDEBUG int rmcpdump; #endif /* NDEBUG */ ipmipower_power_cmd_t powercmd; int on_if_off; int wait_until_on; int wait_until_off; oem_power_type_t oem_power_type; unsigned int retransmission_wait_timeout; unsigned int retransmission_backoff_count; unsigned int ping_interval; unsigned int ping_timeout; unsigned int ping_packet_count; unsigned int ping_percent; unsigned int ping_consec_count; }; #endif /* IPMIPOWER_H */ freeipmi-1.6.4/ipmipower/ipmipower_argp.c0000644002055400205540000004060213527331636020470 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_argp.c,v 1.26 2010-07-13 22:09:52 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmipower_argp.h" #include "freeipmi-portability.h" #include "pstdout.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" extern struct ipmipower_connection *ics; const char *argp_program_version = "ipmipower - " PACKAGE_VERSION "\n" "Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC.\n" "Copyright (C) 2003-2007 The Regents of the University of California.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmipower - IPMI power control utility"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, /* maintain "ipmi-version" for backwards compatability */ { "ipmi-version", IPMI_VERSION_KEY, "IPMIVERSION", OPTION_HIDDEN, "Specify the IPMI protocol version to use.", 11}, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, /* removed legacy short options */ ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_HOSTRANGED_OPTIONS, ARGP_COMMON_OPTIONS_DEBUG, { "on", ON_KEY, 0, 0, "Power on the target hosts.", 40}, { "off", OFF_KEY, 0, 0, "Power off the target hosts.", 41}, { "cycle", CYCLE_KEY, 0, 0, "Power cycle the target hosts.", 42}, { "reset", RESET_KEY, 0, 0, "Reset the target hosts.", 43}, { "stat", STAT_KEY, 0, 0, "Get power status of the target hosts.", 44}, { "pulse", PULSE_KEY, 0, 0, "Send power diagnostic interrupt to target hosts.", 45}, { "soft", SOFT_KEY, 0, 0, "Initiate a soft-shutdown of the OS via ACPI.", 46}, { "on-if-off", ON_IF_OFF_KEY, 0, 0, "Issue a power on command instead of a power cycle or hard reset " "command if the remote machine's power is currently off.", 48}, { "wait-until-off", WAIT_UNTIL_OFF_KEY, 0, 0, "Regularly query the remote BMC and return only after the machine has powered off.", 49}, { "wait-until-on", WAIT_UNTIL_ON_KEY, 0, 0, "Regularly query the remote BMC and return only after the machine has powered on.", 50}, { "oem-power-type", OEM_POWER_TYPE_KEY, "OEM-POWER-TYPE", 0, "Specify an OEM power type to be used.", 51}, /* retry-wait-timeout maintained for backwards comptability */ { "retry-wait-timeout", RETRY_WAIT_TIMEOUT_KEY, "MILLISECONDS", OPTION_HIDDEN, "Specify the retransmission timeout length in milliseconds.", 52}, { "retransmission-wait-timeout", RETRANSMISSION_WAIT_TIMEOUT_KEY, "MILLISECONDS", 0, "Specify the retransmission timeout length in milliseconds.", 52}, /* retry-backoff-count maintained for backwards comptability */ { "retry-backoff-count", RETRY_BACKOFF_COUNT_KEY, "COUNT", OPTION_HIDDEN, "Specify the retransmission backoff count for retransmissions.", 53}, { "retransmission-backoff-count", RETRANSMISSION_BACKOFF_COUNT_KEY, "COUNT", 0, "Specify the retransmission backoff count for retransmissions.", 53}, { "ping-interval", PING_INTERVAL_KEY, "MILLISECONDS", 0, "Specify the ping interval length in milliseconds.", 54}, { "ping-timeout", PING_TIMEOUT_KEY, "MILLISECONDS", 0, "Specify the ping timeout length in milliseconds.", 55}, { "ping-packet-count", PING_PACKET_COUNT_KEY, "COUNT", 0, "Specify the ping packet count size.", 56}, { "ping-percent", PING_PERCENT_KEY, "PERCENT", 0, "Specify the ping percent value.", 57}, { "ping-consec-count", PING_CONSEC_COUNT_KEY, "COUNT", 0, "Specify the ping consecutive count.", 58}, #ifndef NDEBUG { "rmcpdump", RMCPDUMP_KEY, 0, 0, "Turn on RMCP packet dump output.", 59}, #endif { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc}; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc}; void _parse_oem_power_type (struct ipmipower_arguments *cmd_args, const char *oem_power_type_str) { assert (cmd_args); assert (oem_power_type_str); if (!strcasecmp (oem_power_type_str, IPMIPOWER_OEM_POWER_TYPE_NONE_STR)) cmd_args->oem_power_type = IPMIPOWER_OEM_POWER_TYPE_NONE; else if (!strcasecmp (oem_power_type_str, IPMIPOWER_OEM_POWER_TYPE_C410X_STR)) cmd_args->oem_power_type = IPMIPOWER_OEM_POWER_TYPE_C410X; else cmd_args->oem_power_type = IPMIPOWER_OEM_POWER_TYPE_INVALID; } static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmipower_arguments *cmd_args; char *endptr; int tmp = 0; assert (state); cmd_args = state->input; switch (key) { /* IPMI_VERSION_KEY for backwards compatability */ case IPMI_VERSION_KEY: /* --ipmi-version */ if (!strcasecmp (arg, "1.5")) tmp = IPMI_DEVICE_LAN; else if (!strcasecmp (arg, "2.0")) tmp = IPMI_DEVICE_LAN_2_0; else { fprintf (stderr, "invalid driver type specified"); exit (EXIT_FAILURE); } cmd_args->common_args.driver_type = tmp; break; #ifndef NDEBUG case RMCPDUMP_KEY: /* --rmcpdump */ cmd_args->rmcpdump++; break; #endif /* !NDEBUG */ case ON_KEY: /* --on */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_POWER_ON; break; case OFF_KEY: /* --off */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_POWER_OFF; break; case CYCLE_KEY: /* --cycle */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_POWER_CYCLE; break; case RESET_KEY: /* --reset */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_POWER_RESET; break; case STAT_KEY: /* --stat */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_POWER_STATUS; break; case PULSE_KEY: /* --pulse */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT; break; case SOFT_KEY: /* --soft */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS; break; case ON_IF_OFF_KEY: /* --on-if-off */ cmd_args->on_if_off++; break; case WAIT_UNTIL_ON_KEY: /* --wait-until-on */ cmd_args->wait_until_on++; break; case WAIT_UNTIL_OFF_KEY: /* --wait-until-off */ cmd_args->wait_until_off++; break; case OEM_POWER_TYPE_KEY: _parse_oem_power_type (cmd_args, arg); break; /* RETRY_WAIT_TIMEOUT for backwards compatability */ case RETRY_WAIT_TIMEOUT_KEY: case RETRANSMISSION_WAIT_TIMEOUT_KEY: /* --retransmission-wait-timeout */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "retransmission wait timeout length invalid"); exit (EXIT_FAILURE); } cmd_args->retransmission_wait_timeout = tmp; break; /* RETRY_BACKOFF_COUNT for backwards compatability */ case RETRY_BACKOFF_COUNT_KEY: case RETRANSMISSION_BACKOFF_COUNT_KEY: /* --retransmission-backoff-count */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "retransmission backoff count invalid"); exit (EXIT_FAILURE); } cmd_args->retransmission_backoff_count = tmp; break; case PING_INTERVAL_KEY: /* --ping-interval */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "ping interval length invalid"); exit (EXIT_FAILURE); } cmd_args->ping_interval = tmp; break; case PING_TIMEOUT_KEY: /* --ping-timeout */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "ping timeout length invalid"); exit (EXIT_FAILURE); } cmd_args->ping_timeout = tmp; break; case PING_PACKET_COUNT_KEY: /* --ping-packet-count */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "ping packet count invalid"); exit (EXIT_FAILURE); } cmd_args->ping_packet_count = tmp; break; case PING_PERCENT_KEY: /* --ping-percent */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "ping percent invalid"); exit (EXIT_FAILURE); } cmd_args->ping_percent = tmp; break; case PING_CONSEC_COUNT_KEY: /* --ping-consec-count */ errno = 0; tmp = strtol (arg, &endptr, 10); if (errno || endptr[0] != '\0' || tmp < 0) { fprintf (stderr, "ping consec count invalid"); exit (EXIT_FAILURE); } cmd_args->ping_consec_count = tmp; break; /* removed legacy short options */ default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmipower_config_file_parse (struct ipmipower_arguments *cmd_args) { struct config_file_data_ipmipower config_file_data; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmipower)); /* try legacy file first */ if (!cmd_args->common_args.config_file) { if (!config_file_parse (IPMIPOWER_CONFIG_FILE_LEGACY, 1, /* do not exit if file not found */ &(cmd_args->common_args), CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMIPOWER, &config_file_data)) goto out; } if (config_file_parse (cmd_args->common_args.config_file, 0, &(cmd_args->common_args), CONFIG_FILE_OUTOFBAND | CONFIG_FILE_HOSTRANGE, CONFIG_FILE_TOOL_IPMIPOWER, &config_file_data) < 0) { fprintf (stderr, "config_file_parse: %s\n", strerror (errno)); exit (EXIT_FAILURE); } out: if (config_file_data.on_if_off_count) cmd_args->on_if_off = config_file_data.on_if_off; if (config_file_data.wait_until_on_count) cmd_args->wait_until_on = config_file_data.wait_until_on; if (config_file_data.wait_until_off_count) cmd_args->wait_until_off = config_file_data.wait_until_off; /* See comments in config file parsing */ if (config_file_data.oem_power_type_str_count) _parse_oem_power_type (cmd_args, config_file_data.oem_power_type_str); if (config_file_data.retransmission_wait_timeout_count) cmd_args->retransmission_wait_timeout = config_file_data.retransmission_wait_timeout; if (config_file_data.retransmission_backoff_count_count) cmd_args->retransmission_backoff_count = config_file_data.retransmission_backoff_count; if (config_file_data.ping_interval_count) cmd_args->ping_interval = config_file_data.ping_interval; if (config_file_data.ping_timeout_count) cmd_args->ping_timeout = config_file_data.ping_timeout; if (config_file_data.ping_packet_count_count) cmd_args->ping_packet_count = config_file_data.ping_packet_count; if (config_file_data.ping_percent_count) cmd_args->ping_percent = config_file_data.ping_percent; if (config_file_data.ping_consec_count_count) cmd_args->ping_consec_count = config_file_data.ping_consec_count; } static void _ipmipower_args_validate (struct ipmipower_arguments *cmd_args) { assert (cmd_args); if (!IPMIPOWER_OEM_POWER_TYPE_VALID (cmd_args->oem_power_type)) { fprintf (stderr, "invalid oem power type\n"); exit (EXIT_FAILURE); } if (cmd_args->retransmission_wait_timeout > cmd_args->common_args.session_timeout) { fprintf (stderr, "retransmission wait timeout larger than session timeout\n"); exit (EXIT_FAILURE); } if (cmd_args->powercmd != IPMIPOWER_POWER_CMD_NONE && !cmd_args->common_args.hostname) { fprintf (stderr, "must specify target hostname(s) in non-interactive mode\n"); exit (EXIT_FAILURE); } if (cmd_args->ping_interval > cmd_args->ping_timeout) { fprintf (stderr, "ping interval larger than ping timeout\n"); exit (EXIT_FAILURE); } if (cmd_args->ping_consec_count > cmd_args->ping_packet_count) { fprintf (stderr, "ping consec count larger than ping packet count\n"); exit (EXIT_FAILURE); } } void ipmipower_argp_parse (int argc, char **argv, struct ipmipower_arguments *cmd_args) { assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_operator (&(cmd_args->common_args)); /* ipmipower differences */ cmd_args->common_args.driver_type = IPMI_DEVICE_LAN; cmd_args->common_args.driver_type_outofband_only = 1; cmd_args->common_args.session_timeout = 20000; /* 20 seconds */ cmd_args->common_args.retransmission_timeout = 400; /* .4 seconds */ #ifndef NDEBUG cmd_args->rmcpdump = 0; #endif /* NDEBUG */ cmd_args->powercmd = IPMIPOWER_POWER_CMD_NONE; cmd_args->on_if_off = 0; cmd_args->wait_until_on = 0; cmd_args->wait_until_off = 0; cmd_args->oem_power_type = IPMIPOWER_OEM_POWER_TYPE_NONE; cmd_args->retransmission_wait_timeout = 500; /* .5 seconds */ cmd_args->retransmission_backoff_count = 8; cmd_args->ping_interval = 5000; /* 5 seconds */ cmd_args->ping_timeout = 30000; /* 30 seconds */ cmd_args->ping_packet_count = 10; cmd_args->ping_percent = 50; cmd_args->ping_consec_count = 5; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmipower_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); /* don't check hostname inputs, ipmipower isn't like most tools */ verify_common_cmd_args_outofband (&(cmd_args->common_args), 0); _ipmipower_args_validate (cmd_args); } freeipmi-1.6.4/ipmipower/ipmipower_argp.h0000644002055400205540000000301613527331636020473 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_argp.h,v 1.5 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_ARGP_H #define IPMIPOWER_ARGP_H #include "ipmipower.h" void ipmipower_argp_parse (int argc, char **argv, struct ipmipower_arguments *cmd_args); #endif /* IPMIPOWER_ARGP_H */ freeipmi-1.6.4/ipmipower/ipmipower_check.c0000644002055400205540000012731513527331636020623 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_check.c,v 1.124 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include "ipmipower_check.h" #include "ipmipower_error.h" #include "ipmipower_packet.h" #include "freeipmi-portability.h" extern struct ipmipower_arguments cmd_args; int ipmipower_check_checksum (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { fiid_obj_t obj_cmd; int rv; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); /* 1.5 or 2.0 */ /* IPMI Workaround (achu) * * Discovered on Supermicro X9SCM-iiF, Supermicro X9DRi-F * * Checksums are computed incorrectly. */ if (cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK || cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK) return (1); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if ((rv = ipmi_lan_check_checksum (ip->obj_lan_msg_hdr_rs, obj_cmd, ip->obj_lan_msg_trlr_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_lan_check_checksum: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; checksum check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } int ipmipower_check_authentication_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen) { char *password; int rv = -1; assert (ip); assert (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); assert (buf && buflen); /* IPMI 1.5 Checks */ if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS || cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) { uint8_t authentication_type; int check_authcode_retry_flag = 0; /* IPMI Workaround (achu) * * Discovered on Xyratex HB-F8-SRAY * * For some reason, the authentication code is always blank when * using "Straight Password Key". */ if (cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK) { rv = 1; goto out; } if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS) authentication_type = cmd_args.common_args.authentication_type; else /* IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt) */ { if (!ip->permsgauth_enabled) { authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; check_authcode_retry_flag++; } else authentication_type = cmd_args.common_args.authentication_type; } if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) password = cmd_args.common_args.password; else password = NULL; if ((rv = ipmi_lan_check_packet_session_authentication_code (buf, buflen, authentication_type, password, password ? strlen (password) : 0)) < 0) { IPMIPOWER_ERROR (("ipmi_lan_check_packet_session_authentication_code: %s", strerror (errno))); exit (EXIT_FAILURE); } /* IPMI Workaround (achu) * * Discovered on Dell PowerEdge 2850 * * When per-message authentication is disabled, and we send a * message to a remote machine with auth-type none, the Dell * motherboard will respond with a message with the auth-type used * in the activate session stage and the appropriate authcode. So * here is our second session-authcode check attempt under these * circumstances. */ if ((cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE) && !rv && check_authcode_retry_flag) { IPMIPOWER_DEBUG (("host = %s; p = %d; retry authcode check", ip->ic->hostname, ip->protocol_state)); authentication_type = cmd_args.common_args.authentication_type; if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) password = cmd_args.common_args.password; else password = NULL; if ((rv = ipmi_lan_check_packet_session_authentication_code (buf, buflen, authentication_type, password, password ? strlen (password) : 0)) < 0) { IPMIPOWER_ERROR (("ipmi_lan_check_packet_session_authentication_code: %s", strerror (errno))); exit (EXIT_FAILURE); } if (rv) IPMIPOWER_DEBUG (("host = %s; p = %d; permsgauth authcode re-check passed", ip->ic->hostname, ip->protocol_state)); } } else /* cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 */ { /* IPMI 2.0 Checks */ uint8_t integrity_algorithm; integrity_algorithm = ip->integrity_algorithm; password = cmd_args.common_args.password; if ((rv = ipmi_rmcpplus_check_packet_session_authentication_code (integrity_algorithm, buf, buflen, ip->integrity_key_ptr, ip->integrity_key_len, password, (password) ? strlen (password) : 0, ip->obj_rmcpplus_session_trlr_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_rmcpplus_check_packet_session_authentication_code: %s", strerror (errno))); exit (EXIT_FAILURE); } } out: if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; authentication code check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } int ipmipower_check_outbound_sequence_number (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint32_t session_sequence_number = 0; uint64_t val; int rv = 0; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); /* achu: This algorithm is more or less from Appendix A of the IPMI * spec. It may not be entirely necessary for ipmipower, since the * requester sequence number puts packets into lock-step mode. Oh * well. * * I know that technically I could remove a lot of code here if I * just let unsigned ints be unsigned ints (i.e. 0x00 - 0xff = 1). * I dunno, I like to see all of the code actually written out b/c * it makes more sense to the casual code reviewer. Maybe I'll * change it later. */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) { if (FIID_OBJ_GET (ip->obj_rmcpplus_session_hdr_rs, "session_sequence_number", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_sequence_number': %s", fiid_obj_errormsg (ip->obj_rmcpplus_session_hdr_rs))); exit (EXIT_FAILURE); } session_sequence_number = val; } else /* cmd_args.common_args.driver_type == IPMI_DEVICE_LAN */ { if (FIID_OBJ_GET (ip->obj_lan_session_hdr_rs, "session_sequence_number", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_sequence_number': %s", fiid_obj_errormsg (ip->obj_lan_session_hdr_rs))); exit (EXIT_FAILURE); } session_sequence_number = val; } /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The session sequence numbers for IPMI 1.5 are the wrong endian. * So we have to flip the bits to workaround it. */ if (cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER) { uint32_t tmp_session_sequence_number = session_sequence_number; session_sequence_number = ((tmp_session_sequence_number & 0xFF000000) >> 24) | ((tmp_session_sequence_number & 0x00FF0000) >> 8) | ((tmp_session_sequence_number & 0x0000FF00) << 8) | ((tmp_session_sequence_number & 0x000000FF) << 24); } /* IPMI Workaround (achu) * * Disocvered on Intel SE7520JR2 with National Semiconductor PC87431M mBMC * * Note: Later changes in ipmipower have removed the need for these * workarounds. I still note them for historical purposes. * * The initial outbound sequence number on activate session response * is off by one. The activate session response packet is supposed * to contain the initial outbound sequence number passed during the * request. The outbound sequence number on a close session reponse * may also be incorrect. */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) { if ((rv = ipmi_check_session_sequence_number_1_5 (session_sequence_number, &(ip->highest_received_sequence_number), &(ip->previously_received_list), 0)) < 0) { IPMIPOWER_ERROR (("ipmi_check_session_sequence_number_1_5: %s", strerror (errno))); exit (EXIT_FAILURE); } } else { if ((rv = ipmi_check_session_sequence_number_2_0 (session_sequence_number, &(ip->highest_received_sequence_number), &(ip->previously_received_list), 0)) < 0) { IPMIPOWER_ERROR (("ipmi_check_session_sequence_number_2_0: %s", strerror (errno))); exit (EXIT_FAILURE); } } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; session_sequence_number failed: %u; high = %u", ip->ic->hostname, ip->protocol_state, session_sequence_number, ip->highest_received_sequence_number)); return (rv); } int ipmipower_check_session_id (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint32_t session_id = 0; uint32_t expected_session_id = 0; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)) { if (FIID_OBJ_GET (ip->obj_lan_session_hdr_rs, "session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_id': %s", fiid_obj_errormsg (ip->obj_lan_session_hdr_rs))); exit (EXIT_FAILURE); } session_id = val; if (FIID_OBJ_GET (ip->obj_activate_session_rs, "session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_id': %s", fiid_obj_errormsg (ip->obj_activate_session_rs))); exit (EXIT_FAILURE); } expected_session_id = val; } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)) { if (FIID_OBJ_GET (ip->obj_rmcpplus_session_hdr_rs, "session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_id': %s", fiid_obj_errormsg (ip->obj_rmcpplus_session_hdr_rs))); exit (EXIT_FAILURE); } session_id = val; expected_session_id = ip->remote_console_session_id; } else /* IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt) */ { fiid_obj_t obj_cmd; obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (FIID_OBJ_GET (obj_cmd, "remote_console_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'remote_console_session_id': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } session_id = val; expected_session_id = ip->remote_console_session_id; } if (session_id != expected_session_id) IPMIPOWER_DEBUG (("host = %s; p = %d; session id failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, session_id, expected_session_id)); /* IPMI Workaround (achu) * * Discovered on Tyan S2882 w/ m3289 BMC * * The remote BMC returns zeroes for the session id instead of the * actual session id. To work around this problem, we'll assume the * session id is correct if it is equal to zero. */ if ((cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO) && !session_id) return (1); return ((session_id == expected_session_id) ? 1 : 0); } int ipmipower_check_network_function (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t netfn = 0; uint8_t expected_netfn; uint64_t val; assert (ip); /* Assert this is not an IPMI 2.0 Session Setup Packet */ assert (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); if (FIID_OBJ_GET (ip->obj_lan_msg_hdr_rs, "net_fn", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'net_fn': %s", fiid_obj_errormsg (ip->obj_lan_msg_hdr_rs))); exit (EXIT_FAILURE); } netfn = val; if (pkt == IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS || pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS || pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS) expected_netfn = IPMI_NET_FN_CHASSIS_RS; else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS) expected_netfn = IPMI_NET_FN_SENSOR_EVENT_RS; else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS) expected_netfn = IPMI_NET_FN_OEM_DELL_GENERIC_RS; else /* pkt == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS || pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS || pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS || pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS */ expected_netfn = IPMI_NET_FN_APP_RS; if (netfn != expected_netfn) IPMIPOWER_DEBUG (("host = %s; p = %d; netfn failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, netfn, expected_netfn)); return ((netfn == expected_netfn) ? 1 : 0); } int ipmipower_check_command (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t cmd = 0; uint8_t expected_cmd = 0; uint64_t val; fiid_obj_t obj_cmd; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (FIID_OBJ_GET (obj_cmd, "cmd", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'cmd': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } cmd = val; switch (pkt) { case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS: expected_cmd = IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES; break; case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS: expected_cmd = IPMI_CMD_GET_SESSION_CHALLENGE; break; case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS: expected_cmd = IPMI_CMD_ACTIVATE_SESSION; break; case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: expected_cmd = IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL; break; case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS: expected_cmd = IPMI_CMD_GET_CHASSIS_STATUS; break; case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS: expected_cmd = IPMI_CMD_CHASSIS_CONTROL; break; case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS: expected_cmd = IPMI_CMD_CHASSIS_IDENTIFY; break; case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS: expected_cmd = IPMI_CMD_GET_SENSOR_READING; break; case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS: expected_cmd = IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL; break; case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS: expected_cmd = IPMI_CMD_CLOSE_SESSION; break; default: IPMIPOWER_ERROR (("ipmipower_check_command: invalid pkt type: %d", pkt)); exit (EXIT_FAILURE); } if (cmd != expected_cmd) IPMIPOWER_DEBUG (("host = %s; p = %d; cmd failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, cmd, expected_cmd)); return ((cmd == expected_cmd) ? 1 : 0); } int ipmipower_check_requester_sequence_number (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t req_seq = 0; uint8_t expected_req_seq = 0; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); expected_req_seq = ip->ic->ipmi_requester_sequence_number_counter % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1); if (FIID_OBJ_GET (ip->obj_lan_msg_hdr_rs, "rq_seq", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'rq_seq': %s", fiid_obj_errormsg (ip->obj_lan_msg_hdr_rs))); exit (EXIT_FAILURE); } req_seq = val; if (req_seq != expected_req_seq) IPMIPOWER_DEBUG (("host = %s; p = %d; req_seq failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, req_seq, expected_req_seq)); return ((req_seq == expected_req_seq) ? 1 : 0); } int ipmipower_check_completion_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t comp_code = 0; fiid_obj_t obj_cmd; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RS (pkt)); assert (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } comp_code = val; if (comp_code != IPMI_COMP_CODE_COMMAND_SUCCESS) IPMIPOWER_DEBUG (("host = %s; p = %d; comp_code failed: %Xh", ip->ic->hostname, ip->protocol_state, comp_code)); return ((comp_code == IPMI_COMP_CODE_COMMAND_SUCCESS) ? 1 : 0); } int ipmipower_check_payload_type (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t payload_type; uint8_t expected_payload_type; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt) || (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt))); if (FIID_OBJ_GET (ip->obj_rmcpplus_session_hdr_rs, "payload_type", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'payload_type': %s", fiid_obj_errormsg (ip->obj_rmcpplus_session_hdr_rs))); exit (EXIT_FAILURE); } payload_type = val; if (pkt == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE) expected_payload_type = IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_RESPONSE; else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2) expected_payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_2; else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4) expected_payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_4; else /* IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt) */ expected_payload_type = IPMI_PAYLOAD_TYPE_IPMI; if (payload_type != expected_payload_type) IPMIPOWER_DEBUG (("host = %s; p = %d; payload_type failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, payload_type, expected_payload_type)); return ((payload_type == expected_payload_type) ? 1 : 0); } int ipmipower_check_message_tag (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t message_tag; uint8_t expected_message_tag; fiid_obj_t obj_cmd; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (FIID_OBJ_GET (obj_cmd, "message_tag", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'message_tag': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } message_tag = val; expected_message_tag = ip->initial_message_tag + ip->message_tag_count; if (message_tag != expected_message_tag) IPMIPOWER_DEBUG (("host = %s; p = %d; message_tag failed: %Xh; expected = %Xh", ip->ic->hostname, ip->protocol_state, message_tag, expected_message_tag)); return ((message_tag == expected_message_tag) ? 1 : 0); } int ipmipower_check_rmcpplus_status_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t rmcpplus_status_code; fiid_obj_t obj_cmd; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (FIID_OBJ_GET (obj_cmd, "rmcpplus_status_code", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'rmcpplus_status_code': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } rmcpplus_status_code = val; if (rmcpplus_status_code != RMCPPLUS_STATUS_NO_ERRORS) IPMIPOWER_DEBUG (("host = %s; p = %d; rmcpplus_status_code failed: %Xh", ip->ic->hostname, ip->protocol_state, rmcpplus_status_code)); return ((rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS) ? 1 : 0); } int ipmipower_check_packet (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { fiid_obj_t obj_cmd; int ret; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if ((ret = fiid_obj_packet_valid (obj_cmd)) < 0) { IPMIPOWER_ERROR (("fiid_obj_packet_valid: %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } if (!ret) IPMIPOWER_DEBUG (("host = %s; p = %d; packet invalid", ip->ic->hostname, ip->protocol_state)); return (ret); } int ipmipower_check_open_session_response_privilege (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t maximum_privilege_level; uint64_t val; int rv; assert (ip); assert (pkt == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE); /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The Intel's don't work with IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL. * So check that we get back what we sent. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { if (FIID_OBJ_GET (ip->obj_open_session_rs, "maximum_privilege_level", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'maximum_privilege_level': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } maximum_privilege_level = val; rv = (maximum_privilege_level == ip->requested_maximum_privilege_level) ? 1 : 0; } else { if ((rv = ipmi_check_open_session_maximum_privilege (cmd_args.common_args.privilege_level, ip->obj_open_session_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_open_session_maximum_privilege: %s", strerror (errno))); exit (EXIT_FAILURE); } } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; invalid privilege: expected = %Xh", ip->ic->hostname, ip->protocol_state, cmd_args.common_args.privilege_level)); return (rv); } int ipmipower_check_rakp_2_key_exchange_authentication_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; uint8_t managed_system_guid[IPMI_MANAGED_SYSTEM_GUID_LENGTH]; int managed_system_guid_len; char *username; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; char *password; unsigned int username_len, password_len; uint32_t managed_system_session_id; uint64_t val; int rv; assert (ip); assert (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2); /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The username must be padded despite explicitly not being * allowed. "No Null characters (00h) are allowed in the name". * Table 13-11 in the IPMI 2.0 spec. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (cmd_args.common_args.username) strcpy (username_buf, cmd_args.common_args.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { username = cmd_args.common_args.username; username_len = (username) ? strlen (username) : 0; } if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION) { uint8_t keybuf[IPMIPOWER_PACKET_BUFLEN]; int keybuf_len; /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * The IPMI 2.0 packet responses for RAKP 2 have payload lengths * that are off by 1 (i.e. if the payload length should be X, * the payload length returned in the packet is X + 1) * * We fix/adjust for the situation here. */ if ((keybuf_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code", keybuf, IPMIPOWER_PACKET_BUFLEN)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } if (ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE && keybuf_len == 1) { if (fiid_obj_clear_field (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code") < 0) { IPMIPOWER_ERROR (("fiid_obj_clear_field: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } } else if (ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1 && keybuf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code", keybuf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) { IPMIPOWER_ERROR (("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } } else if (ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && keybuf_len == (IPMI_HMAC_MD5_DIGEST_LENGTH + 1)) { if (fiid_obj_set_data (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code", keybuf, IPMI_HMAC_MD5_DIGEST_LENGTH) < 0) { IPMIPOWER_ERROR (("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } } } password = cmd_args.common_args.password; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * When the authentication algorithm is HMAC-MD5-128 and the * password is greater than 16 bytes, the Intel BMC truncates the * password to 16 bytes when generating keys, hashes, etc. So we * have to do the same when generating keys, hashes, etc. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION && ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; if (FIID_OBJ_GET (ip->obj_open_session_rs, "managed_system_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } managed_system_session_id = val; if ((managed_system_random_number_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } if ((managed_system_guid_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "managed_system_guid", managed_system_guid, IPMI_MANAGED_SYSTEM_GUID_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'managed_system_guid': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The key exchange authentication code is the wrong length. We * need to shorten it. * * Notes: Cipher suite 1,2,3 are the ones that use HMAC-SHA1 and * have the problem. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION && (ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1)) { uint8_t buf[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int buf_len; if ((buf_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code", buf, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } if (buf_len == (IPMI_HMAC_SHA1_DIGEST_LENGTH + 1)) { if (fiid_obj_clear_field (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code") < 0) { IPMIPOWER_ERROR (("fiid_obj_clear_field: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } if (fiid_obj_set_data (ip->obj_rakp_message_2_rs, "key_exchange_authentication_code", buf, IPMI_HMAC_SHA1_DIGEST_LENGTH) < 0) { IPMIPOWER_ERROR (("fiid_obj_set_data: 'key_exchange_authentication_code': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } } } if ((rv = ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code (ip->authentication_algorithm, password, password_len, ip->remote_console_session_id, managed_system_session_id, ip->remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, managed_system_random_number_len, managed_system_guid, managed_system_guid_len, ip->name_only_lookup, cmd_args.common_args.privilege_level, username, username_len, ip->obj_rakp_message_2_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_rmcpplus_check_rakp_2_key_exchange_authentication_code: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; rakp 2 check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } int ipmipower_check_rakp_4_integrity_check_value (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t managed_system_guid[IPMI_MANAGED_SYSTEM_GUID_LENGTH]; int managed_system_guid_len; uint32_t managed_system_session_id; uint8_t authentication_algorithm = 0; uint64_t val; int rv; assert (ip); assert (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4); /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * For some reason, the intel ipmi 2.0 responds with the integrity * check value based on the integrity algorithm instead of the * authentication algorithm. * * Thanks to the ipmitool folks (ipmitool.sourceforge.net) for this * one. Would have taken me awhile to figure this one out :-) */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { if (ip->integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; else if (ip->integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_SHA1_96) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_SHA1; else if (ip->integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_HMAC_MD5_128) authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5; else if (ip->integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_MD5_128) { /* achu: I have thus far been unable to reverse engineer this * corner case. Since we cannot provide a reasonable two * part authentication, we're going to error out. */ IPMIPOWER_DEBUG (("host = %s; p = %d; rakp 4 check failed", ip->ic->hostname, ip->protocol_state)); return (0); } } else authentication_algorithm = ip->authentication_algorithm; if (FIID_OBJ_GET (ip->obj_open_session_rs, "managed_system_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } managed_system_session_id = val; if ((managed_system_guid_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "managed_system_guid", managed_system_guid, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'managed_system_guid': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } /* IPMI Workaround (achu) * * Discovered on Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * For whatever reason, with cipher suite 0, the RAKP 4 response * returns with an Integrity Check Value when it should be empty. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE && !cmd_args.common_args.cipher_suite_id) { if (fiid_obj_clear_field (ip->obj_rakp_message_4_rs, "integrity_check_value") < 0) { IPMIPOWER_ERROR (("fiid_obj_clear_field: 'integrity_check_value': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } } if ((rv = ipmi_rmcpplus_check_rakp_4_integrity_check_value (authentication_algorithm, ip->sik_key_ptr, ip->sik_key_len, ip->remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_session_id, managed_system_guid, managed_system_guid_len, ip->obj_rakp_message_4_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_rmcpplus_check_rakp_4_integrity_check_value: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; rakp 4 check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } int ipmipower_check_payload_pad (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t confidentiality_algorithm; int rv; assert (ip); assert (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); confidentiality_algorithm = ip->confidentiality_algorithm; if ((rv = ipmi_rmcpplus_check_payload_pad (confidentiality_algorithm, ip->obj_rmcpplus_payload_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_rmcpplus_check_payload_pad: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; payload pad check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } int ipmipower_check_integrity_pad (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { int rv; assert (ip); assert (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)); if (ip->integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) return (1); if ((rv = ipmi_rmcpplus_check_integrity_pad (ip->obj_rmcpplus_session_trlr_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_rmcpplus_check_integrity_pad: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!rv) IPMIPOWER_DEBUG (("host = %s; p = %d; integrity pad check failed", ip->ic->hostname, ip->protocol_state)); return (rv); } freeipmi-1.6.4/ipmipower/ipmipower_check.h0000644002055400205540000001600213527331636020616 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_check.h,v 1.20 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_CHECKS_H #define IPMIPOWER_CHECKS_H #include "ipmipower.h" /* ipmipower_check_checksum * - Check for a valid checksums * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if checksums are valid, 0 if not */ int ipmipower_check_checksum (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_authentication_code * - Check for valid authentication code * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if authentication code is valid, 0 if not */ int ipmipower_check_authentication_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen); /* ipmipower_check_outbound_sequence_number * - Check for valid outbound sequence number * - Function can be passed all packet types * Returns 1 if outbound sequence number is valid, 0 if not */ int ipmipower_check_outbound_sequence_number (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_session_id * - Check for valid session id * - Function can be passed all packet types * Returns 1 if session_id is valid, 0 if not */ int ipmipower_check_session_id (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_network_function * - Check for valid network function * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if network function is valid, 0 if not */ int ipmipower_check_network_function (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_command * - Check for valid command * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if command is valid, 0 if not */ int ipmipower_check_command (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_requester_sequence_number * - Check for valid requester sequence number * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if requester sequence number is valid, 0 if not */ int ipmipower_check_requester_sequence_number (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_completion_code * - Check for valid completion code * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if completion code is valid, 0 if not */ int ipmipower_check_completion_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_payload_type * - Check for valid payload type * - Function can be passed IPMI 2.0 packets * Returns 1 if payload type is valid, 0 if not */ int ipmipower_check_payload_type (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_message_tag * - Check for valid message tag * - Function can be passed IPMI 2.0 RAKP packets * Returns 1 if message tag is valid, 0 if not */ int ipmipower_check_message_tag (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_rmcpplus_status_code * - Check for valid rmcpplus status code * - Function can be passed IPMI 2.0 RAKP packets * Returns 1 if rmcpplus status code is valid, 0 if not */ int ipmipower_check_rmcpplus_status_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_packet * - Check if packet contains everything it should. * - Function can be passed IPMI 1.5 packets and IPMI 2.0 session packets * Returns 1 if packet is valid, 0 if not */ int ipmipower_check_packet (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_open_session_response_privilege * - Check for valid open session response data * - Function can be passed OPEN_SESSION_RES packets * Returns 1 if data is correct, 0 if not */ int ipmipower_check_open_session_response_privilege (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_rakp_2_key_exchange_authentication_code * - Check for valid rakp 2 key exchange authentication code * - Function can be passed RAKP MESSAGE 2 packets * Returns 1 if rakp 2 key exchange authentication code is valid, 0 if not */ int ipmipower_check_rakp_2_key_exchange_authentication_code (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_rakp_4_integrity_check_value * - Check for valid rakp 4 integrity check value * - Function can be passed RAKP MESSAGE 4 packets * Returns 1 if rakp 4 integrity check value is valid, 0 if not */ int ipmipower_check_rakp_4_integrity_check_value (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_payload_pad * - Check for valid payload pad * - Function can be passed IPMI 2.0 session packets * Returns 1 if payload pad is valid, 0 if not */ int ipmipower_check_payload_pad (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_check_integrity_pad * - Check for valid integrity pad * - Function can be passed IPMI 2.0 session packets * Returns 1 if integrity pad is valid, 0 if not */ int ipmipower_check_integrity_pad (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); #endif /* IPMIPOWER_CHECKS_H */ freeipmi-1.6.4/ipmipower/ipmipower_connection.c0000644002055400205540000005574713527331636021716 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_connection.c,v 1.54 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_STRINGS_H #include /* bzero */ #endif /* HAVE_STRINGS_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include #include #include #include #include #include #include #include "ipmipower_connection.h" #include "ipmipower_error.h" #include "ipmipower_output.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "fi_hostlist.h" #include "network.h" extern cbuf_t ttyout; extern struct ipmipower_arguments cmd_args; #define IPMIPOWER_MIN_CONNECTION_BUF 1024*2 #define IPMIPOWER_MAX_CONNECTION_BUF 1024*4 /* _clean_fd * - Remove any extraneous packets sitting on the fd buf */ static void _clean_fd (int fd) { struct pollfd ufds; uint8_t buf[IPMIPOWER_PACKET_BUFLEN]; while (1) { ssize_t rv; ufds.fd = fd; ufds.events = POLLIN; ufds.revents = 0; /* Must use poll, we may go outside of the fd numbers * that select is capable of using */ ipmipower_poll (&ufds, 1, 0); if (ufds.revents & POLLIN) { rv = recvfrom (fd, buf, IPMIPOWER_PACKET_BUFLEN, 0, NULL, NULL); if (rv <= 0) break; } else break; IPMIPOWER_DEBUG (("removed packet: %d", rv)); } } void ipmipower_connection_clear (struct ipmipower_connection *ic) { assert (ic); _clean_fd (ic->ipmi_fd); if (cbuf_drop (ic->ipmi_in, -1) < 0) { IPMIPOWER_ERROR (("cbuf_drop: %s", strerror (errno))); exit (EXIT_FAILURE); } if (cbuf_drop (ic->ipmi_out, -1) < 0) { IPMIPOWER_ERROR (("cbuf_drop: %s", strerror (errno))); exit (EXIT_FAILURE); } return; } static int _connection_setup (struct ipmipower_connection *ic, const char *hostname) { char *hostname_first_parse_copy = NULL; const char *hostname_first_parse_ptr = NULL; char *hostname_second_parse_copy = NULL; char *port_second_parse_copy = NULL; const char *hostname_second_parse_ptr = NULL; uint16_t port = RMCP_PRIMARY_RMCP_PORT; const char *port_ptr = NULL; char port_str[MAXPORTBUFLEN + 1]; struct addrinfo ai_hints, *ai_res = NULL, *ai = NULL; int rv = -1; int ret; assert (ic); assert (hostname); /* Don't use wrapper function, need to exit cleanly on EMFILE errno */ errno = 0; if (!(ic->ipmi_in = cbuf_create (IPMIPOWER_MIN_CONNECTION_BUF, IPMIPOWER_MAX_CONNECTION_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ic->ipmi_in, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); if (!(ic->ipmi_out = cbuf_create (IPMIPOWER_MIN_CONNECTION_BUF, IPMIPOWER_MAX_CONNECTION_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ic->ipmi_out, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); if (!(ic->ping_in = cbuf_create (IPMIPOWER_MIN_CONNECTION_BUF, IPMIPOWER_MAX_CONNECTION_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ic->ping_in, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); if (!(ic->ping_out = cbuf_create (IPMIPOWER_MIN_CONNECTION_BUF, IPMIPOWER_MAX_CONNECTION_BUF))) { IPMIPOWER_ERROR (("cbuf_create: %s", strerror (errno))); exit (EXIT_FAILURE); } cbuf_opt_set (ic->ping_out, CBUF_OPT_OVERWRITE, CBUF_WRAP_MANY); if (ipmi_get_random (&ic->ipmi_requester_sequence_number_counter, sizeof (ic->ipmi_requester_sequence_number_counter)) < 0) { IPMIPOWER_ERROR (("ipmi_get_random: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ipmi_get_random (&ic->ping_sequence_number_counter, sizeof (ic->ping_sequence_number_counter)) < 0) { IPMIPOWER_ERROR (("ipmi_get_random: %s", strerror (errno))); exit (EXIT_FAILURE); } memset (&ic->last_ipmi_send, '\0', sizeof (struct timeval)); memset (&ic->last_ping_send, '\0', sizeof (struct timeval)); memset (&ic->last_ipmi_recv, '\0', sizeof (struct timeval)); memset (&ic->last_ping_recv, '\0', sizeof (struct timeval)); ic->link_state = IPMIPOWER_LINK_STATE_GOOD; /* assumed good to begin with */ ic->ping_last_packet_recv_flag = 0; ic->ping_packet_count_send = 0; ic->ping_packet_count_recv = 0; ic->ping_consec_count = 0; ic->discover_state = IPMIPOWER_DISCOVER_STATE_UNDISCOVERED; if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { struct ipmipower_connection_extra_arg *ea; char *extra_arg = NULL; char *ptr; if (!(hostname_first_parse_copy = strdup (hostname))) { IPMIPOWER_ERROR (("strdup: %s", strerror (errno))); exit (EXIT_FAILURE); } if ((ptr = strchr (hostname_first_parse_copy, '+'))) { *ptr = '\0'; ptr++; extra_arg = ptr; hostname_first_parse_ptr = hostname_first_parse_copy; } else hostname_first_parse_ptr = hostname; /* Hypothetically, some OEM power types may allow extra-args and * not extra args. So store both. */ if (!(ea = (struct ipmipower_connection_extra_arg *)malloc (sizeof (struct ipmipower_connection_extra_arg)))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } if (extra_arg) { if (!(ea->extra_arg = strdup (extra_arg))) { IPMIPOWER_ERROR (("strdup: %s", strerror (errno))); exit (EXIT_FAILURE); } } else ea->extra_arg = NULL; ea->next = NULL; ic->extra_args = ea; } else hostname_first_parse_ptr = hostname; /* Check for host:port or [Ipv6]:port format */ if ((ret = host_is_host_with_port (hostname_first_parse_ptr, &hostname_second_parse_copy, &port_second_parse_copy)) < 0) { IPMIPOWER_ERROR (("host_is_host_with_port: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ret) { hostname_second_parse_ptr = hostname_second_parse_copy; port_ptr = port_second_parse_copy; } else hostname_second_parse_ptr = hostname_first_parse_ptr; if ((ret = host_is_valid (hostname_second_parse_ptr, port_ptr, &port)) < 0) { IPMIPOWER_ERROR (("host_is_valid: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, hostname_second_parse_ptr, NULL); goto cleanup; } strncpy (ic->hostname, hostname_second_parse_ptr, MAXHOSTNAMELEN); ic->hostname[MAXHOSTNAMELEN] = '\0'; memset (port_str, '\0', MAXPORTBUFLEN + 1); snprintf (port_str, MAXPORTBUFLEN, "%d", port); memset (&ai_hints, 0, sizeof (struct addrinfo)); ai_hints.ai_family = AF_UNSPEC; ai_hints.ai_socktype = SOCK_DGRAM; ai_hints.ai_flags = (AI_V4MAPPED | AI_ADDRCONFIG); if ((ret = getaddrinfo (ic->hostname, port_str, &ai_hints, &ai_res))) { if (ret == EAI_NODATA || ret == EAI_NONAME) ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, ic->hostname, NULL); else { IPMIPOWER_ERROR (("getaddrinfo() %s: %s", ic->hostname, gai_strerror (ret))); exit (EXIT_FAILURE); } goto cleanup; } /* Try all of the different answers we got, until we succeed. */ for (ai = ai_res; ai != NULL; ai = ai->ai_next) { if ((ic->ipmi_fd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { if (errno == EMFILE) { IPMIPOWER_DEBUG (("file descriptor limit reached")); return (-1); } } if ((ic->ping_fd = socket (ai->ai_family, ai->ai_socktype, ai->ai_protocol)) < 0) { if (errno == EMFILE) { IPMIPOWER_DEBUG (("file descriptor limit reached")); return (-1); } } if (ai->ai_family == AF_INET) { memcpy (&(ic->destaddr4), ai->ai_addr, ai->ai_addrlen); ic->destaddr = (struct sockaddr *)&(ic->destaddr4); ic->destaddrlen = sizeof (struct sockaddr_in); /* zero everywhere, secure ephemeral port */ memset (&(ic->srcaddr4), '\0', sizeof (struct sockaddr_in)); ic->srcaddr4.sin_family = AF_INET; ic->srcaddr = (struct sockaddr *)&(ic->srcaddr4); ic->srcaddrlen = sizeof (struct sockaddr_in); } else if (ai->ai_family == AF_INET6) { memcpy (&(ic->destaddr6), ai->ai_addr, ai->ai_addrlen); ic->destaddr = (struct sockaddr *)&(ic->destaddr6); ic->destaddrlen = sizeof (struct sockaddr_in6); /* zero everywhere, secure ephemeral port */ memset (&(ic->srcaddr6), '\0', sizeof (struct sockaddr_in6)); ic->srcaddr6.sin6_family = AF_INET6; ic->srcaddr = (struct sockaddr *)&(ic->srcaddr6); ic->srcaddrlen = sizeof (struct sockaddr_in6); } else { close(ic->ipmi_fd); close(ic->ping_fd); continue; } if ((bind (ic->ipmi_fd, ic->srcaddr, ic->srcaddrlen) < 0) || (bind (ic->ping_fd, ic->srcaddr, ic->srcaddrlen) < 0)) { close(ic->ipmi_fd); close(ic->ping_fd); continue; } ic->skip = 0; break; } if (!ai) { ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, hostname_second_parse_ptr, NULL); goto cleanup; } rv = 0; cleanup: freeaddrinfo (ai_res); free (hostname_first_parse_copy); free (hostname_second_parse_copy); free (port_second_parse_copy); return (rv); } static void _connection_add_extra_arg_base (struct ipmipower_connection *ic, const char *extra_arg) { struct ipmipower_connection_extra_arg *ea; struct ipmipower_connection_extra_arg *eanode; assert (ic); assert (ic->extra_args); assert (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE); eanode = ic->extra_args; while (eanode) { /* if duplicate, just return, no need to store */ if (!eanode->extra_arg && !extra_arg) return; if (eanode->extra_arg && extra_arg && !strcmp (eanode->extra_arg, extra_arg)) return; eanode = eanode->next; } if (!(ea = (struct ipmipower_connection_extra_arg *)malloc (sizeof (struct ipmipower_connection_extra_arg)))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } if (extra_arg) { if (!(ea->extra_arg = strdup (extra_arg))) { IPMIPOWER_ERROR (("strdup: %s", strerror (errno))); exit (EXIT_FAILURE); } } else ea->extra_arg = NULL; ea->next = NULL; eanode = ic->extra_args; while (eanode->next) eanode = eanode->next; eanode->next = ea; } static void _connection_add_extra_arg (struct ipmipower_connection *ic, const char *extra_arg) { assert (ic); assert (ic->extra_args); assert (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE); /* Some OEM power types could have ranges for the extra args */ if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X && extra_arg) { fi_hostlist_t h = NULL; /* if invalid to fi_hostlist, it still may be valid in general, so fall through */ if (!(h = fi_hostlist_create (extra_arg))) goto one_extra_arg; if (fi_hostlist_count (h) > 1) { fi_hostlist_iterator_t hitr = NULL; char *extrastr; if (!(hitr = fi_hostlist_iterator_create (h))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((extrastr = fi_hostlist_next (hitr))) { _connection_add_extra_arg_base (ic, extrastr); free (extrastr); } fi_hostlist_iterator_destroy (hitr); fi_hostlist_destroy (h); return; } fi_hostlist_destroy (h); goto one_extra_arg; } one_extra_arg: _connection_add_extra_arg_base (ic, extra_arg); } int _hostname_count (const char *hostname) { fi_hostlist_t h = NULL; fi_hostlist_t h2 = NULL; fi_hostlist_iterator_t hitr = NULL; char *hstr = NULL; int rv = -1; /* achu: * * Possible user inputs are wide given extra-argument possibilities. * * foohost+1,foohost+2 is one host * foohost+[1-3] is one host * foohost[1-3]+A is 3 hosts * foohost[1-3]+[1-3] is 3 hosts * * The issue is that makes this complicated is when something like * foohost[1-3]+[1-3] is parsed with the fi_hostlist library, it can be * parsed as foohost[1-3]+1, foohost[1-3]+2, foohost[1-3]+3. So it * can appear like 9 hosts when in fact it is 3. * * This function will attempt to handle everthing and count up * everything appropriately. */ if (!(h = fi_hostlist_create (hostname))) { ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, hostname, NULL); goto cleanup; } if (!(h2 = fi_hostlist_create (NULL))) { IPMIPOWER_ERROR (("fi_hostlist_create: %s", strerror (errno))); exit (EXIT_FAILURE); } fi_hostlist_uniq (h); if (!(hitr = fi_hostlist_iterator_create (h))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((hstr = fi_hostlist_next (hitr))) { char *ptr; if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { if ((ptr = strchr (hstr, '+'))) *ptr = '\0'; } if (!fi_hostlist_push (h2, hstr)) { IPMIPOWER_ERROR (("fi_hostlist_push: %s", strerror(errno))); exit (EXIT_FAILURE); } free (hstr); } fi_hostlist_uniq (h2); rv = fi_hostlist_count (h2); cleanup: fi_hostlist_iterator_destroy (hitr); fi_hostlist_destroy (h); fi_hostlist_destroy (h2); return (rv); } struct ipmipower_connection * ipmipower_connection_array_create (const char *hostname, unsigned int *len) { int index = 0; fi_hostlist_t h = NULL; fi_hostlist_iterator_t hitr = NULL; fi_hostlist_t h2 = NULL; fi_hostlist_iterator_t h2itr = NULL; char *hstr = NULL; char *h2str = NULL; struct ipmipower_connection *ics = NULL; int host_count; int errflag = 0; int emfilecount = 0; int i; assert (hostname && len); *len = 0; if ((host_count = _hostname_count (hostname)) < 0) return (NULL); if (!(ics = (struct ipmipower_connection *)malloc (sizeof (struct ipmipower_connection) * host_count))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } memset (ics, '\0', (sizeof (struct ipmipower_connection) * host_count)); for (i = 0; i < host_count; i++) { ics[i].ipmi_fd = -1; ics[i].ping_fd = -1; } if (!(h = fi_hostlist_create (hostname))) { ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, hostname, NULL); errflag++; goto cleanup; } fi_hostlist_uniq (h); if (!(hitr = fi_hostlist_iterator_create (h))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((hstr = fi_hostlist_next (hitr))) { /* achu: The double fi_hostlist_create is to handle the corner case * of someone inputting. * * foohost[1-3]+[1-3] * * We need to double fi_hostlist to get all the hosts and extra * args. * * Under most scenarios, this is just inefficient code. * However, this is normally a one time setup cost, so shouldn't * affect the overall running of ipmipower. In addition, the * code logic is simpler to do it this way then have a whole * bunch of wacky if-check scenarios to make it more efficient. */ if (!(h2 = fi_hostlist_create (hstr))) { ipmipower_output (IPMIPOWER_MSG_TYPE_HOSTNAME_INVALID, hostname, NULL); errflag++; goto cleanup; } fi_hostlist_uniq (h2); if (!(h2itr = fi_hostlist_iterator_create (h2))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((h2str = fi_hostlist_next (h2itr))) { /* We need to see if the host has already been saved to the * ics array. It's possible under many circumstances with * extra args, such as * * foohost+1,foohost+2 * * that it's already in the list. */ if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { char *h2str_copy; char *ptr; int found = 0; if (!(h2str_copy = strdup (h2str))) { IPMIPOWER_ERROR (("strdup: %s", strerror(errno))); exit (EXIT_FAILURE); } if ((ptr = strchr (h2str_copy, '+'))) { *ptr = '\0'; ptr++; /* XXX: This is O(n^2) slow. 99% of the time it's a one * time setup cost, so we consider the slowness ok. If * it becomes a problem later, we'll need to * rearchitect. */ for (i = 0; i < index; i++) { if (!strcmp (ics[i].hostname, h2str_copy)) { found++; _connection_add_extra_arg (&ics[i], ptr); break; } } } free (h2str_copy); if (found) { free (h2str); continue; } } if (index >= host_count) { IPMIPOWER_ERROR (("Invalid host count: %d", host_count)); exit (EXIT_FAILURE); } /* cleanup only at the end, gather all error outputs for * later */ if (_connection_setup (&ics[index], h2str) < 0) { if (errno == EMFILE && !emfilecount) { IPMIPOWER_DEBUG (("file descriptor limit reached")); /* XXX return -1? */ emfilecount++; } errflag++; } free (h2str); h2str = NULL; index++; } fi_hostlist_iterator_destroy (h2itr); fi_hostlist_destroy (h2); h2itr = NULL; h2 = NULL; free (hstr); hstr = NULL; } cleanup: fi_hostlist_iterator_destroy (h2itr); fi_hostlist_destroy (h2); fi_hostlist_iterator_destroy (hitr); fi_hostlist_destroy (h); free (h2str); free (hstr); if (errflag) { int i; for (i = 0; i < index; i++) { /* ignore potential error, error path */ close (ics[i].ipmi_fd); /* ignore potential error, error path */ close (ics[i].ping_fd); if (ics[i].ipmi_in) cbuf_destroy (ics[i].ipmi_in); if (ics[i].ipmi_out) cbuf_destroy (ics[i].ipmi_out); if (ics[i].ping_in) cbuf_destroy (ics[i].ping_in); if (ics[i].ping_out) cbuf_destroy (ics[i].ping_out); if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { struct ipmipower_connection_extra_arg *eanode; assert (ics[i].extra_args); eanode = ics[i].extra_args; while (eanode) { struct ipmipower_connection_extra_arg *eatmp; eatmp = eanode->next; free (eanode->extra_arg); free (eanode); eanode = eatmp; } } } free (ics); return (NULL); } *len = index; return (ics); } void ipmipower_connection_array_destroy (struct ipmipower_connection *ics, unsigned int ics_len) { int i; if (!ics) return; for (i = 0; i < ics_len; i++) { /* ignore potential error, cleanup path */ close (ics[i].ipmi_fd); /* ignore potential error, cleanup path */ close (ics[i].ping_fd); cbuf_destroy (ics[i].ipmi_in); cbuf_destroy (ics[i].ipmi_out); cbuf_destroy (ics[i].ping_in); cbuf_destroy (ics[i].ping_out); if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { struct ipmipower_connection_extra_arg *eanode; assert (ics[i].extra_args); eanode = ics[i].extra_args; while (eanode) { struct ipmipower_connection_extra_arg *eatmp; eatmp = eanode->next; free (eanode->extra_arg); free (eanode); eanode = eatmp; } } } free (ics); } int ipmipower_connection_hostname_index (struct ipmipower_connection *ics, unsigned int ics_len, const char *hostname) { int i; assert (ics && ics_len && hostname); for (i = 0; i < ics_len; i++) { if (!strcmp (ics[i].hostname, hostname)) return (i); } IPMIPOWER_DEBUG (("host = %s not found", hostname)); return (-1); } freeipmi-1.6.4/ipmipower/ipmipower_connection.h0000644002055400205540000000467413527331636021714 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_connection.h,v 1.17 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_CONNECTION_H #define IPMIPOWER_CONNECTION_H #include "ipmipower.h" /* ipmipower_connection_clear * - clear per-session data from ipmi_connection structure */ void ipmipower_connection_clear (ipmipower_connection_t ic); /* ipmipower_connection_array_create * - Create ipmipower_connection array * - Returns pointer on success, NULL on error. */ struct ipmipower_connection *ipmipower_connection_array_create (const char *hostname, unsigned int *len); /* ipmipower_connection_array_destroy * - Destroy ipmipower_connection array */ void ipmipower_connection_array_destroy (struct ipmipower_connection *ics, unsigned int ics_len); /* ipmipower_connection_hostname_index * - Find ics entry with given hostname * - Returns index of entry, -1 if not found */ int ipmipower_connection_hostname_index (struct ipmipower_connection *ics, unsigned int ics_len, const char *hostname); #endif /* IPMIPOWER_CONNECTION_H */ freeipmi-1.6.4/ipmipower/ipmipower_error.c0000644002055400205540000001134413527331636020671 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_error.c,v 1.4 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /*****************************************************************************\ * $Id: ipmipower_error.c,v 1.4 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #include #include #include "ipmipower.h" #include "ipmipower_error.h" #include "freeipmi-portability.h" #include "fd.h" static unsigned int power_error_flags = 0; int ipmipower_error_setup (unsigned int error_flags) { assert (!(error_flags & ~(IPMIPOWER_ERROR_STDERR | IPMIPOWER_ERROR_SYSLOG))); power_error_flags = error_flags; return (0); } static void _error (const char *fmt, va_list ap) { char errbuf[IPMIPOWER_ERROR_BUFLEN]; assert (fmt); vsnprintf (errbuf, IPMIPOWER_ERROR_BUFLEN, fmt, ap); if (power_error_flags & IPMIPOWER_ERROR_STDERR) { fprintf (stderr, "%s\r\n", errbuf); fflush (stderr); } if (power_error_flags & IPMIPOWER_ERROR_SYSLOG) syslog (LOG_ERR, "%s", errbuf); } void ipmipower_error (const char *fmt, ...) { va_list ap; assert (fmt); va_start (ap, fmt); _error (fmt, ap); va_end (ap); } static void _debug (const char *fmt, va_list ap) { char errbuf[IPMIPOWER_ERROR_BUFLEN]; assert (fmt); vsnprintf (errbuf, IPMIPOWER_ERROR_BUFLEN, fmt, ap); if (power_error_flags & IPMIPOWER_ERROR_STDERR) { fprintf (stderr, "%s\r\n", errbuf); fflush (stderr); } if (power_error_flags & IPMIPOWER_ERROR_SYSLOG) syslog (LOG_DEBUG, "%s", errbuf); } void ipmipower_debug (const char *fmt, ...) { va_list ap; assert (fmt); va_start (ap, fmt); _debug (fmt, ap); va_end (ap); } char * __error_msg_create (const char *fmt, ...) { char *buffer; va_list ap; assert (fmt); if (!(buffer = malloc (IPMIPOWER_ERROR_BUFLEN))) return (NULL); va_start (ap, fmt); vsnprintf (buffer, IPMIPOWER_ERROR_BUFLEN, fmt, ap); va_end (ap); return (buffer); } freeipmi-1.6.4/ipmipower/ipmipower_error.h0000644002055400205540000001557013527331636020703 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_error.h,v 1.4 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ /*****************************************************************************\ * $Id: ipmipower_error.h,v 1.4 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-221226 * * This file is part of Ipmiconsole, a set of IPMI 2.0 SOL libraries * and utilities. For details, see http://www.llnl.gov/linux/. * * Ipmiconsole is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiconsole is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiconsole. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_ERROR_H #define IPMIPOWER_ERROR_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include "ipmipower.h" #define IPMIPOWER_ERROR_STDERR 0x00000001 #define IPMIPOWER_ERROR_SYSLOG 0x00000002 #define IPMIPOWER_ERROR_BUFLEN 4096 #define IPMIPOWER_ERROR(__msg) \ do { \ char __err[IPMIPOWER_ERROR_BUFLEN + 1]; \ int __len = 0; \ memset (__err, '\0', IPMIPOWER_ERROR_BUFLEN + 1); \ if (cmd_args.common_args.debug) \ __len = snprintf (__err, \ IPMIPOWER_ERROR_BUFLEN, \ "(%s, %s, %d): ", \ __FILE__, \ __FUNCTION__, \ __LINE__); \ if (__len < IPMIPOWER_ERROR_BUFLEN) \ { \ char *__str; \ if ((__str = __error_msg_create __msg)) \ { \ strncat (__err, __str, IPMIPOWER_ERROR_BUFLEN - __len); \ free (__str); \ } \ } \ ipmipower_error (__err); \ } while(0) #define IPMIPOWER_DEBUG(__msg) \ do { \ char __err[IPMIPOWER_ERROR_BUFLEN + 1]; \ int __len = 0; \ if (cmd_args.common_args.debug) \ { \ memset (__err, '\0', IPMIPOWER_ERROR_BUFLEN + 1); \ __len = snprintf (__err, \ IPMIPOWER_ERROR_BUFLEN, \ "(%s, %s, %d): ", \ __FILE__, \ __FUNCTION__, \ __LINE__); \ if (__len < IPMIPOWER_ERROR_BUFLEN) \ { \ char *__str; \ if ((__str = __error_msg_create __msg)) \ { \ strncat (__err, __str, IPMIPOWER_ERROR_BUFLEN - __len); \ free (__str); \ } \ } \ ipmipower_debug (__err); \ } \ } while(0) int ipmipower_error_setup (unsigned int error_flags); void ipmipower_error (const char *fmt, ...); void ipmipower_debug (const char *fmt, ...); char * __error_msg_create (const char *fmt, ...); #endif /* IPMIPOWER_ERROR_H */ freeipmi-1.6.4/ipmipower/ipmipower_oem.c0000644002055400205540000002020313527331636020312 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_util.c,v 1.37 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include "ipmipower_oem.h" #include "ipmipower_error.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" extern struct ipmipower_arguments cmd_args; struct oem_power_type_data oem_power_type_data[] = { /* * IPMIPOWER_OEM_POWER_TYPE_NONE */ { "none", IPMIPOWER_OEM_POWER_TYPE_SUPPORT_ALL, }, /* * IPMIPOWER_OEM_POWER_TYPE_C410X - supports off, on, status */ { "C410x", IPMIPOWER_OEM_POWER_TYPE_SUPPORT_OFF | IPMIPOWER_OEM_POWER_TYPE_SUPPORT_ON | IPMIPOWER_OEM_POWER_TYPE_SUPPORT_STATUS, }, { NULL, 0, }, }; /* OEM fiid templates */ /* Dell Poweredge OEM * * From Dell Provided Docs * * Slot Power Control Request * * 0x30 - OEM network function * 0xF0 - OEM cmd * 0x?? - bit 0 - slot 1 * - bit 1 - slot 2 * - ... * - bit 7 - slot 8 * 0x?? - bit 0 - slot 9 * - bit 1 - slot 10 * - ... * - bit 7 - slot 16 * * only should do one slot at a time * * Slot Power Control Response * * 0xF0 - OEM cmd * 0x?? - Completion Code */ fiid_template_t tmpl_cmd_c410x_slot_power_control_rq = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 16, "slot_number_bitmask", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED}, { 0, "", 0} }; fiid_template_t tmpl_cmd_c410x_slot_power_control_rs = { { 8, "cmd", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 8, "comp_code", FIID_FIELD_REQUIRED | FIID_FIELD_LENGTH_FIXED | FIID_FIELD_MAKES_PACKET_SUFFICIENT}, { 0, "", 0} }; static int _ipmipower_power_cmd_to_oem_power_type_support (ipmipower_power_cmd_t cmd) { assert (IPMIPOWER_POWER_CMD_VALID (cmd)); switch (cmd) { case IPMIPOWER_POWER_CMD_POWER_OFF: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_OFF); case IPMIPOWER_POWER_CMD_POWER_ON: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_ON); case IPMIPOWER_POWER_CMD_POWER_CYCLE: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_CYCLE); case IPMIPOWER_POWER_CMD_POWER_RESET: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_RESET); case IPMIPOWER_POWER_CMD_POWER_STATUS: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_STATUS); case IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_DIAGNOSTIC_INTERRUPT); case IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_SOFT_SHUTDOWN_OS); case IPMIPOWER_POWER_CMD_IDENTIFY_ON: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_ON); case IPMIPOWER_POWER_CMD_IDENTIFY_OFF: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_OFF); case IPMIPOWER_POWER_CMD_IDENTIFY_STATUS: return (IPMIPOWER_OEM_POWER_TYPE_SUPPORT_IDENTIFY_STATUS); default: IPMIPOWER_ERROR (("_ipmipower_power_cmd_to_oem_power_type_support: invalid power cmd: %d", cmd)); exit (EXIT_FAILURE); } return (-1); /* NOT REACHED */ } int ipmipower_oem_power_cmd_check_support_and_privilege (ipmipower_power_cmd_t cmd, char *errbuf, unsigned int errbuflen) { unsigned int oem_power_type_support_mask; char *power_cmd_str; int rv = -1; assert (IPMIPOWER_POWER_CMD_VALID (cmd)); /* errbuf & errbuflen can be NULL/0 if doing an assert check */ assert (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE); oem_power_type_support_mask = _ipmipower_power_cmd_to_oem_power_type_support (cmd); power_cmd_str = ipmipower_power_cmd_to_string (cmd); if (!(oem_power_type_data[cmd_args.oem_power_type].supported_operations & oem_power_type_support_mask)) { if (errbuf && errbuflen) snprintf (errbuf, errbuflen, "'%s' operation not supported by oem power type '%s'", power_cmd_str, oem_power_type_data[cmd_args.oem_power_type].name); rv = 0; goto cleanup; } if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { /* XXX - I'm pretty sure */ if ((cmd == IPMIPOWER_POWER_CMD_POWER_OFF || cmd == IPMIPOWER_POWER_CMD_POWER_ON) && (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_USER || cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR)) { if (errbuf && errbuflen) snprintf (errbuf, errbuflen, "'%s' requires admin privilege for oem power type '%s'", power_cmd_str, oem_power_type_data[cmd_args.oem_power_type].name); rv = 0; goto cleanup; } } rv = 1; cleanup: return (rv); } int ipmipower_oem_power_cmd_check_extra_arg (const char *extra_arg, char *errbuf, unsigned int errbuflen) { int rv = -1; /* extra_arg can be NULL, user didn't input one */ /* errbuf & errbuflen can be NULL/0 if doing an assert check */ assert (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE); if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { char *endptr; unsigned int tmp; if (!extra_arg) { if (errbuf && errbuflen) snprintf (errbuf, errbuflen, "slot number must be specified for oem power type '%s'", oem_power_type_data[cmd_args.oem_power_type].name); rv = 0; goto cleanup; } errno = 0; tmp = strtol (extra_arg, &endptr, 0); if (errno || endptr[0] != '\0') { if (errbuf && errbuflen) snprintf (errbuf, errbuflen, "slot number '%s' for oem power type '%s' invalid", extra_arg, oem_power_type_data[cmd_args.oem_power_type].name); rv = 0; goto cleanup; } if (tmp < IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN || tmp > IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX) { if (errbuf && errbuflen) snprintf (errbuf, errbuflen, "slot number '%s' for oem power type '%s' out of range", extra_arg, oem_power_type_data[cmd_args.oem_power_type].name); rv = 0; goto cleanup; } } rv = 1; cleanup: return (rv); } freeipmi-1.6.4/ipmipower/ipmipower_oem.h0000644002055400205540000000457313527331636020333 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_util.h,v 1.23 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_OEM_H #define IPMIPOWER_OEM_H #include "ipmipower.h" /* * OEM C410x */ extern fiid_template_t tmpl_cmd_c410x_slot_power_control_rq; extern fiid_template_t tmpl_cmd_c410x_slot_power_control_rs; /* ipmipower_oem_power_cmd_check_support_and_privilege * - check if power cmd supported for OEM type and privilege level ok * - returns 1 if ok, 0 if not, -1 on error * - if returns 0 or -1, error message in buf */ int ipmipower_oem_power_cmd_check_support_and_privilege (ipmipower_power_cmd_t cmd, char *errbuf, unsigned int errbuflen); /* ipmipower_oem_power_cmd_check_extra_arg * - check if extra arg is valid * - returns 1 if ok, 0 if not, -1 on error * - if returns 0 or -1, error message in buf */ int ipmipower_oem_power_cmd_check_extra_arg (const char *extra_arg, char *errbuf, unsigned int errbuflen); #endif /* IPMIPOWER_OEM_H */ freeipmi-1.6.4/ipmipower/ipmipower_output.c0000644002055400205540000001204713527331636021101 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_output.c,v 1.58 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmipower.h" #include "ipmipower_error.h" #include "ipmipower_output.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "fi_hostlist.h" extern cbuf_t ttyout; extern struct ipmipower_arguments cmd_args; extern fi_hostlist_t output_hostrange[IPMIPOWER_MSG_TYPE_NUM_ENTRIES]; extern unsigned int output_counts[IPMIPOWER_MSG_TYPE_NUM_ENTRIES]; static char *ipmipower_outputs[] = { "on", "off", "ok", "unknown", "username invalid", "password invalid", "password length invalid", "k_g invalid", "privilege level cannot be obtained for this user", "operation invalid", "authentication type unavailable for attempted privilege level", "cipher suite id unavailable", "password verification timeout", "connection timeout", "session timeout", "not discovered", "bad connection", "invalid hostname", "unconfigured hostname", "out of resources", "ipmi 2.0 unavailable", "invalid argument for OEM extension", "BMC busy", "BMC error" }; void ipmipower_output (ipmipower_msg_type_t num, const char *hostname, const char *extra_arg) { assert (IPMIPOWER_MSG_TYPE_VALID (num)); assert (hostname); /* If extra argument required, then we can't do consolidated output */ if (cmd_args.common_args.consolidate_output && !IPMIPOWER_OEM_POWER_TYPE_REQUIRES_EXTRA_ARGUMENT (cmd_args.oem_power_type)) { if (!fi_hostlist_push_host (output_hostrange[num], hostname)) { IPMIPOWER_ERROR (("fi_hostlist_push_host: %s", strerror(errno))); exit (EXIT_FAILURE); } } else ipmipower_cbuf_printf (ttyout, "%s%s%s: %s\n", hostname, extra_arg ? "+" : "", extra_arg ? extra_arg : "", ipmipower_outputs[num]); output_counts[num]++; return; } void ipmipower_output_finish (void) { if (cmd_args.common_args.consolidate_output && !IPMIPOWER_OEM_POWER_TYPE_REQUIRES_EXTRA_ARGUMENT (cmd_args.oem_power_type)) { int i, rv; char buf[IPMIPOWER_OUTPUT_BUFLEN + 1]; for (i = 0; i < IPMIPOWER_MSG_TYPE_NUM_ENTRIES; i++) { if (fi_hostlist_count (output_hostrange[i]) > 0) { memset (buf, '\0', IPMIPOWER_OUTPUT_BUFLEN + 1); fi_hostlist_sort (output_hostrange[i]); if ((rv = fi_hostlist_ranged_string (output_hostrange[i], IPMIPOWER_OUTPUT_BUFLEN, buf)) < 0) { IPMIPOWER_ERROR (("fi_hostlist_ranged_string: %s", strerror(errno))); exit (EXIT_FAILURE); } if (rv > 0) { ipmipower_cbuf_printf (ttyout, "----------------\n"); ipmipower_cbuf_printf (ttyout, "%s\n", buf); ipmipower_cbuf_printf (ttyout, "----------------\n"); ipmipower_cbuf_printf (ttyout, " %s\n", ipmipower_outputs[i]); fi_hostlist_delete (output_hostrange[i], buf); } assert (!fi_hostlist_count (output_hostrange[i])); } } } return; } freeipmi-1.6.4/ipmipower/ipmipower_output.h0000644002055400205540000000324413527331636021105 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_output.h,v 1.16 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_OUTPUT_H #define IPMIPOWER_OUTPUT_H #include "ipmipower.h" void ipmipower_output (ipmipower_msg_type_t num, const char *hostname, const char *extra_arg); /* ipmipower_output_finish * - Output final results, mostly notably w/ consolidated output. */ void ipmipower_output_finish (void); #endif /* IPMIPOWER_OUTPUT_H */ freeipmi-1.6.4/ipmipower/ipmipower_packet.c0000644002055400205540000016173713527331636021023 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_packet.c,v 1.127 2010-06-11 16:29:34 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "ipmipower_packet.h" #include "ipmipower_error.h" #include "ipmipower_oem.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "debug-util.h" extern struct ipmipower_arguments cmd_args; fiid_field_t * ipmipower_packet_cmd_template (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { assert (ip); assert (IPMIPOWER_PACKET_TYPE_VALID (pkt)); switch (pkt) { case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ: return (&tmpl_cmd_get_channel_authentication_capabilities_rq[0]); case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS: return (&tmpl_cmd_get_channel_authentication_capabilities_rs[0]); case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ: return (&tmpl_cmd_get_session_challenge_rq[0]); case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS: return (&tmpl_cmd_get_session_challenge_rs[0]); case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ: return (&tmpl_cmd_activate_session_rq[0]); case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS: return (&tmpl_cmd_activate_session_rs[0]); case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST: return (&tmpl_rmcpplus_open_session_request[0]); case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE: return (&tmpl_rmcpplus_open_session_response[0]); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1: return (&tmpl_rmcpplus_rakp_message_1[0]); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2: return (&tmpl_rmcpplus_rakp_message_2[0]); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3: return (&tmpl_rmcpplus_rakp_message_3[0]); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4: return (&tmpl_rmcpplus_rakp_message_4[0]); case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: return (&tmpl_cmd_set_session_privilege_level_rq[0]); case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: return (&tmpl_cmd_set_session_privilege_level_rs[0]); case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ: return (&tmpl_cmd_get_chassis_status_rq[0]); case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS: return (&tmpl_cmd_get_chassis_status_rs[0]); case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ: return (&tmpl_cmd_chassis_control_rq[0]); case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS: return (&tmpl_cmd_chassis_control_rs[0]); case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ: return (&tmpl_cmd_chassis_identify_rq[0]); case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS: return (&tmpl_cmd_chassis_identify_rs[0]); case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ: return (&tmpl_cmd_get_sensor_reading_rq[0]); case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS: return (&tmpl_cmd_get_sensor_reading_rs[0]); case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ: return (&tmpl_cmd_c410x_slot_power_control_rq[0]); case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS: return (&tmpl_cmd_c410x_slot_power_control_rs[0]); case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ: return (&tmpl_cmd_close_session_rq[0]); case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS: return (&tmpl_cmd_close_session_rs[0]); default: IPMIPOWER_ERROR (("ipmipower_packet_cmd_template: invalid packet type: %d", pkt)); exit (EXIT_FAILURE); } return (NULL); /* NOT REACHED */ } fiid_obj_t ipmipower_packet_cmd_obj (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { assert (ip); assert (IPMIPOWER_PACKET_TYPE_VALID (pkt)); switch (pkt) { case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ: return (ip->obj_authentication_capabilities_rq); case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS: return (ip->obj_authentication_capabilities_rs); case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ: return (ip->obj_get_session_challenge_rq); case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS: return (ip->obj_get_session_challenge_rs); case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ: return (ip->obj_activate_session_rq); case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS: return (ip->obj_activate_session_rs); case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST: return (ip->obj_open_session_rq); case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE: return (ip->obj_open_session_rs); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1: return (ip->obj_rakp_message_1_rq); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2: return (ip->obj_rakp_message_2_rs); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3: return (ip->obj_rakp_message_3_rq); case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4: return (ip->obj_rakp_message_4_rs); case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: return (ip->obj_set_session_privilege_level_rq); case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: return (ip->obj_set_session_privilege_level_rs); case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ: return (ip->obj_get_chassis_status_rq); case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS: return (ip->obj_get_chassis_status_rs); case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ: return (ip->obj_chassis_control_rq); case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS: return (ip->obj_chassis_control_rs); case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ: return (ip->obj_chassis_identify_rq); case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS: return (ip->obj_chassis_identify_rs); case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ: return (ip->obj_c410x_get_sensor_reading_rq); case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS: return (ip->obj_c410x_get_sensor_reading_rs); case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ: return (ip->obj_c410x_slot_power_control_rq); case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS: return (ip->obj_c410x_slot_power_control_rs); case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ: return (ip->obj_close_session_rq); case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS: return (ip->obj_close_session_rs); default: IPMIPOWER_ERROR (("ipmipower_packet_cmd_obj: invalid packet type: %d", pkt)); exit (EXIT_FAILURE); } return (NULL); /* NOT REACHED */ } void ipmipower_packet_dump (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen) { assert (ip); assert (IPMIPOWER_PACKET_TYPE_VALID (pkt)); assert (buf); if (cmd_args.common_args.debug) { fiid_field_t *tmpl_lan_msg_hdr; char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; uint8_t packet_type; uint8_t packet_direction; const char *str_cmd = NULL; if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) packet_type = DEBUG_UTIL_TYPE_IPMI_1_5; else packet_type = DEBUG_UTIL_TYPE_IPMI_2_0; switch (pkt) { case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ: case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES); break; case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ: case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_SESSION_CHALLENGE); break; case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ: case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_ACTIVATE_SESSION); break; case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST: case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE: str_cmd = DEBUG_UTIL_OPEN_SESSION_STR; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1: str_cmd = DEBUG_UTIL_RAKP_1_STR; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2: str_cmd = DEBUG_UTIL_RAKP_2_STR; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3: str_cmd = DEBUG_UTIL_RAKP_3_STR; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4: str_cmd = DEBUG_UTIL_RAKP_4_STR; break; case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_SET_SESSION_PRIVILEGE_LEVEL); break; case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ: case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_CHASSIS_RQ, IPMI_CMD_GET_CHASSIS_STATUS); break; case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ: case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_CHASSIS_RQ, IPMI_CMD_CHASSIS_CONTROL); break; case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ: case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_CHASSIS_RQ, IPMI_CMD_CHASSIS_IDENTIFY); break; case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ: case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_SENSOR_EVENT_RQ, IPMI_CMD_GET_SENSOR_READING); break; case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ: case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS: str_cmd = "C410x Slot Power Control"; break; case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ: case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS: str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_CLOSE_SESSION); break; default: IPMIPOWER_ERROR (("ipmipower_packet_dump: invalid packet type: %d", pkt)); exit (EXIT_FAILURE); } if (IPMIPOWER_PACKET_TYPE_RQ (pkt)) packet_direction = DEBUG_UTIL_DIRECTION_REQUEST; else packet_direction = DEBUG_UTIL_DIRECTION_RESPONSE; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (packet_type, packet_direction, DEBUG_UTIL_FLAGS_DEFAULT, str_cmd, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (IPMIPOWER_PACKET_TYPE_RQ (pkt)) tmpl_lan_msg_hdr = &tmpl_lan_msg_hdr_rq[0]; else tmpl_lan_msg_hdr = &tmpl_lan_msg_hdr_rs[0]; if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP (pkt)) { if (ipmi_dump_rmcpplus_packet (STDERR_FILENO, ip->ic->hostname, hdrbuf, NULL, IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, buf, buflen, tmpl_lan_msg_hdr, ipmipower_packet_cmd_template (ip, pkt)) < 0) { IPMIPOWER_ERROR (("ipmi_dump_rmcpplus_packet: %s", strerror (errno))); exit (EXIT_FAILURE); } } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET (pkt)) { if (ipmi_dump_rmcpplus_packet (STDERR_FILENO, ip->ic->hostname, hdrbuf, NULL, ip->authentication_algorithm, ip->integrity_algorithm, ip->confidentiality_algorithm, ip->integrity_key_ptr, ip->integrity_key_len, ip->confidentiality_key_ptr, ip->confidentiality_key_len, buf, buflen, tmpl_lan_msg_hdr, ipmipower_packet_cmd_template (ip, pkt)) < 0) { IPMIPOWER_ERROR (("ipmi_dump_rmcpplus_packet: %s", strerror (errno))); exit (EXIT_FAILURE); } } else /* cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET (pkt)) */ { if (ipmi_dump_lan_packet (STDERR_FILENO, ip->ic->hostname, hdrbuf, NULL, buf, buflen, tmpl_lan_msg_hdr, ipmipower_packet_cmd_template (ip, pkt)) < 0) { IPMIPOWER_ERROR (("ipmi_dump_lan_packet: %s", strerror (errno))); exit (EXIT_FAILURE); } } } } int ipmipower_packet_store (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen) { fiid_obj_t obj; int rv = -1; assert (ip); assert (buf); assert (buflen); assert (IPMIPOWER_PACKET_TYPE_RS (pkt)); obj = ipmipower_packet_cmd_obj (ip, pkt); if (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RS (pkt) || cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) { if ((rv = unassemble_ipmi_lan_pkt (buf, buflen, ip->obj_rmcp_hdr_rs, ip->obj_lan_session_hdr_rs, ip->obj_lan_msg_hdr_rs, obj, ip->obj_lan_msg_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("unassemble_ipmi_lan_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } } else { if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt)) { if ((rv = unassemble_ipmi_rmcpplus_pkt (IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE, IPMI_INTEGRITY_ALGORITHM_NONE, IPMI_CONFIDENTIALITY_ALGORITHM_NONE, NULL, 0, NULL, 0, buf, buflen, ip->obj_rmcp_hdr_rs, ip->obj_rmcpplus_session_hdr_rs, ip->obj_rmcpplus_payload_rs, ip->obj_lan_msg_hdr_rs, obj, ip->obj_lan_msg_trlr_rs, ip->obj_rmcpplus_session_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("unassemble_ipmi_rmcpplus_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } } else { if ((rv = unassemble_ipmi_rmcpplus_pkt (ip->authentication_algorithm, ip->integrity_algorithm, ip->confidentiality_algorithm, ip->integrity_key_ptr, ip->integrity_key_len, ip->confidentiality_key_ptr, ip->confidentiality_key_len, buf, buflen, ip->obj_rmcp_hdr_rs, ip->obj_rmcpplus_session_hdr_rs, ip->obj_rmcpplus_payload_rs, ip->obj_lan_msg_hdr_rs, obj, ip->obj_lan_msg_trlr_rs, ip->obj_rmcpplus_session_trlr_rs, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("unassemble_ipmi_rmcpplus_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } } } return (rv); } static int _ipmi_1_5_packet_create (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, uint8_t authentication_type, uint32_t inbound_sequence_number, uint32_t session_id, void *authentication_code_data, unsigned int authentication_code_data_len, uint8_t net_fn, fiid_obj_t obj_cmd_rq, void *buf, unsigned int buflen) { int len; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RQ (pkt)); assert (fiid_obj_valid (obj_cmd_rq)); assert (buf); assert (buflen); if (fill_rmcp_hdr_ipmi (ip->obj_rmcp_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcp_hdr_ipmi: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_lan_session_hdr (authentication_type, inbound_sequence_number, session_id, ip->obj_lan_session_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_lan_session_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, IPMI_BMC_IPMB_LUN_BMC, (ip->ic->ipmi_requester_sequence_number_counter % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1)), ip->obj_lan_msg_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_lan_msg_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if ((len = assemble_ipmi_lan_pkt (ip->obj_rmcp_hdr_rq, ip->obj_lan_session_hdr_rq, ip->obj_lan_msg_hdr_rq, obj_cmd_rq, authentication_code_data, authentication_code_data_len, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("assemble_ipmi_lan_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } return (len); } static int _ipmi_2_0_packet_create (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, uint8_t payload_type, uint8_t payload_authenticated, uint8_t payload_encrypted, uint32_t session_id, uint32_t session_sequence_number, void *authentication_code_data, unsigned int authentication_code_data_len, uint8_t net_fn, uint8_t authentication_algorithm, uint8_t integrity_algorithm, uint8_t confidentiality_algorithm, void *integrity_key, unsigned int integrity_key_len, void *confidentiality_key, unsigned int confidentiality_key_len, fiid_obj_t obj_cmd_rq, void *buf, unsigned int buflen) { int len; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RQ (pkt)); assert (fiid_obj_valid (obj_cmd_rq)); assert (buf); assert (buflen); if (fill_rmcp_hdr_ipmi (ip->obj_rmcp_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcp_hdr_ipmi: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_rmcpplus_session_hdr (payload_type, payload_authenticated, payload_encrypted, 0, /* oem_iana */ 0, /* oem_payload_id */ session_id, session_sequence_number, ip->obj_rmcpplus_session_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcpplus_session_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, net_fn, IPMI_BMC_IPMB_LUN_BMC, (ip->ic->ipmi_requester_sequence_number_counter % (IPMI_LAN_REQUESTER_SEQUENCE_NUMBER_MAX + 1)), ip->obj_lan_msg_hdr_rq) < 0) { IPMIPOWER_ERROR (("fill_lan_msg_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_rmcpplus_session_trlr (ip->obj_rmcpplus_session_trlr_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcpplus_session_trlr: %s", strerror (errno))); exit (EXIT_FAILURE); } if ((len = assemble_ipmi_rmcpplus_pkt (authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, authentication_code_data, authentication_code_data_len, ip->obj_rmcp_hdr_rq, ip->obj_rmcpplus_session_hdr_rq, ip->obj_lan_msg_hdr_rq, obj_cmd_rq, ip->obj_rmcpplus_session_trlr_rq, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("assemble_ipmi_rmcpplus_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } return (len); } int ipmipower_packet_create (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, void *buf, unsigned int buflen) { char *username = NULL; char *password = NULL; void *integrity_key = NULL; void *confidentiality_key = NULL; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; unsigned int username_len; uint32_t session_id, managed_system_session_id = 0; uint32_t sequence_number = 0; unsigned int integrity_key_len = 0; unsigned int confidentiality_key_len = 0; uint8_t authentication_type = 0; uint8_t net_fn = 0; uint8_t payload_authenticated = 0; uint8_t payload_encrypted = 0; uint8_t payload_type = 0; uint8_t authentication_algorithm = 0; uint8_t integrity_algorithm = 0; uint8_t confidentiality_algorithm = 0; fiid_obj_t obj_cmd_rq = NULL; uint64_t val; int rv = 0; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RQ (pkt)); assert (buf); assert (buflen); if (pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ || pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1 || pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3) { username = cmd_args.common_args.username; /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The username must be padded despite explicitly not being * allowed. "No Null characters (00h) are allowed in the name". * Table 13-11 in the IPMI 2.0 spec. */ if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1 && (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION)) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (username) strcpy (username_buf, username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else username_len = (username) ? strlen (username) : 0; } else { username = NULL; username_len = 0; } /* Calculate Password */ if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ || IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt) || IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) password = cmd_args.common_args.password; else password = NULL; /* Calculate Session ID */ if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ) { if (FIID_OBJ_GET (ip->obj_get_session_challenge_rs, "temp_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'temp_session_id': %s", fiid_obj_errormsg (ip->obj_get_session_challenge_rs))); exit (EXIT_FAILURE); } session_id = val; } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) { if (FIID_OBJ_GET (ip->obj_activate_session_rs, "session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_id': %s", fiid_obj_errormsg (ip->obj_activate_session_rs))); exit (EXIT_FAILURE); } session_id = val; } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) { if (FIID_OBJ_GET (ip->obj_open_session_rs, "managed_system_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } session_id = val; } else session_id = 0; /* Calculate Sequence Number */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) { uint32_t initial_inbound_sequence_number; if (FIID_OBJ_GET (ip->obj_activate_session_rs, "initial_inbound_sequence_number", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'initial_inbound_sequence_number': %s", fiid_obj_errormsg (ip->obj_activate_session_rs))); exit (EXIT_FAILURE); } initial_inbound_sequence_number = val; sequence_number = initial_inbound_sequence_number + ip->session_inbound_count; } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) sequence_number = ip->session_sequence_number; else sequence_number = 0; /* Calculate Network Function */ if (pkt == IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ || pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ || pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ) net_fn = IPMI_NET_FN_CHASSIS_RQ; else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ) net_fn = IPMI_NET_FN_SENSOR_EVENT_RQ; else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ) net_fn = IPMI_NET_FN_OEM_DELL_GENERIC_RQ; else /* pkt == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ || pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ || pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ || pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ */ net_fn = IPMI_NET_FN_APP_RQ; /* Calculate Authentication Type */ if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ) authentication_type = cmd_args.common_args.authentication_type; else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) { if (!ip->permsgauth_enabled) authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; else authentication_type = cmd_args.common_args.authentication_type; if (authentication_type == IPMI_AUTHENTICATION_TYPE_NONE) password = NULL; } else authentication_type = IPMI_AUTHENTICATION_TYPE_NONE; if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) { /* Calculate Payload Type */ if (pkt == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST) payload_type = IPMI_PAYLOAD_TYPE_RMCPPLUS_OPEN_SESSION_REQUEST; else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1) payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_1; else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3) payload_type = IPMI_PAYLOAD_TYPE_RAKP_MESSAGE_3; else payload_type = IPMI_PAYLOAD_TYPE_IPMI; /* achu: "session_id" above is for the session headers. This is * for the RAKP session setup protocol. The values will be * different. */ if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1 || pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3) { if (FIID_OBJ_GET (ip->obj_open_session_rs, "managed_system_session_id", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'managed_system_session_id': %s", fiid_obj_errormsg (ip->obj_open_session_rs))); exit (EXIT_FAILURE); } managed_system_session_id = val; } /* Setup authentication/integrity/confidentiality keys */ if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt)) { authentication_algorithm = IPMI_AUTHENTICATION_ALGORITHM_RAKP_NONE; integrity_algorithm = IPMI_INTEGRITY_ALGORITHM_NONE; confidentiality_algorithm = IPMI_CONFIDENTIALITY_ALGORITHM_NONE; integrity_key = NULL; integrity_key_len = 0; confidentiality_key = NULL; confidentiality_key_len = 0; } else /* IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt) */ { authentication_algorithm = ip->authentication_algorithm; integrity_algorithm = ip->integrity_algorithm; confidentiality_algorithm = ip->confidentiality_algorithm; integrity_key = ip->integrity_key_ptr; integrity_key_len = ip->integrity_key_len; confidentiality_key = ip->confidentiality_key_ptr; confidentiality_key_len = ip->confidentiality_key_len; } /* Calculate Payload Authenticated */ if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt) || integrity_algorithm == IPMI_INTEGRITY_ALGORITHM_NONE) payload_authenticated = IPMI_PAYLOAD_FLAG_UNAUTHENTICATED; else payload_authenticated = IPMI_PAYLOAD_FLAG_AUTHENTICATED; /* Calculate Payload Encrypted */ if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt) || confidentiality_algorithm == IPMI_CONFIDENTIALITY_ALGORITHM_NONE) payload_encrypted = IPMI_PAYLOAD_FLAG_UNENCRYPTED; else payload_encrypted = IPMI_PAYLOAD_FLAG_ENCRYPTED; } /* Calculate/Fill Command Object */ if (pkt == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ) { uint8_t get_ipmi_v20_extended_data; if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) get_ipmi_v20_extended_data = IPMI_GET_IPMI_V20_EXTENDED_DATA; else get_ipmi_v20_extended_data = IPMI_GET_IPMI_V15_DATA; if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, cmd_args.common_args.privilege_level, get_ipmi_v20_extended_data, ip->obj_authentication_capabilities_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_get_channel_authentication_capabilities: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_authentication_capabilities_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ) { /* Note: The session_authentication_type is none, this authentication type may be different. */ if (fill_cmd_get_session_challenge (cmd_args.common_args.authentication_type, username, username_len, ip->obj_get_session_challenge_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_get_session_challenge: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_get_session_challenge_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ) { uint8_t challenge_string[IPMI_CHALLENGE_STRING_LENGTH]; int challenge_string_len; if ((challenge_string_len = fiid_obj_get_data (ip->obj_get_session_challenge_rs, "challenge_string", challenge_string, IPMI_CHALLENGE_STRING_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'challenge_string': %s", fiid_obj_errormsg (ip->obj_get_session_challenge_rs))); exit (EXIT_FAILURE); } if (!challenge_string_len) { IPMIPOWER_ERROR (("host = %s; p = %d; empty challenge string", ip->ic->hostname, ip->protocol_state)); exit (EXIT_FAILURE); } if (fill_cmd_activate_session (authentication_type, cmd_args.common_args.privilege_level, challenge_string, challenge_string_len, IPMIPOWER_LAN_INITIAL_OUTBOUND_SEQUENCE_NUMBER, ip->obj_activate_session_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_activate_session: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_activate_session_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST) { if (fill_rmcpplus_open_session (ip->initial_message_tag + ip->message_tag_count, ip->requested_maximum_privilege_level, ip->remote_console_session_id, ip->authentication_algorithm, ip->integrity_algorithm, ip->confidentiality_algorithm, ip->obj_open_session_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcpplus_open_session: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_open_session_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1) { if (fill_rmcpplus_rakp_message_1 (ip->initial_message_tag + ip->message_tag_count, managed_system_session_id, ip->remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, cmd_args.common_args.privilege_level, ip->name_only_lookup, username, username_len, ip->obj_rakp_message_1_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcpplus_rakp_message_1: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_rakp_message_1_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; uint8_t key_exchange_authentication_code[IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH]; int key_exchange_authentication_code_len; uint8_t name_only_lookup; unsigned int password_len; if ((managed_system_random_number_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * For some reason we have to create this key with the name only * lookup turned off. I was skeptical about this actually being * a bug until I saw that the ipmitool folks implemented the * same workaround. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) name_only_lookup = IPMI_USER_NAME_PRIVILEGE_LOOKUP; else name_only_lookup = ip->name_only_lookup; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * When the authentication algorithm is HMAC-MD5-128 and the * password is greater than 16 bytes, the Intel BMC truncates the * password to 16 bytes when generating keys, hashes, etc. So we * have to do the same when generating keys, hashes, etc. */ if ((cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) && ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; if ((key_exchange_authentication_code_len = ipmi_calculate_rakp_3_key_exchange_authentication_code (ip->authentication_algorithm, password, password_len, managed_system_random_number, managed_system_random_number_len, ip->remote_console_session_id, name_only_lookup, cmd_args.common_args.privilege_level, username, username_len, key_exchange_authentication_code, IPMI_MAX_KEY_EXCHANGE_AUTHENTICATION_CODE_LENGTH)) < 0) { IPMIPOWER_ERROR (("ipmi_calculate_rakp_3_key_exchange_authentication_code: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_rmcpplus_rakp_message_3 (ip->initial_message_tag + ip->message_tag_count, RMCPPLUS_STATUS_NO_ERRORS, managed_system_session_id, key_exchange_authentication_code, key_exchange_authentication_code_len, ip->obj_rakp_message_3_rq) < 0) { IPMIPOWER_ERROR (("fill_rmcpplus_rakp_message_3: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_rakp_message_3_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ) { if (fill_cmd_set_session_privilege_level (cmd_args.common_args.privilege_level, ip->obj_set_session_privilege_level_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_set_session_privilege_level: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_set_session_privilege_level_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ) { if (fill_cmd_get_chassis_status (ip->obj_get_chassis_status_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_get_chassis_status: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_get_chassis_status_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ) { uint8_t command = 0; assert (ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF || ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON || ip->cmd == IPMIPOWER_POWER_CMD_POWER_CYCLE || ip->cmd == IPMIPOWER_POWER_CMD_POWER_RESET || ip->cmd == IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT || ip->cmd == IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS); if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF) command = IPMI_CHASSIS_CONTROL_POWER_DOWN; else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) command = IPMI_CHASSIS_CONTROL_POWER_UP; else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_CYCLE) command = IPMI_CHASSIS_CONTROL_POWER_CYCLE; else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_RESET) command = IPMI_CHASSIS_CONTROL_HARD_RESET; else if (ip->cmd == IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT) command = IPMI_CHASSIS_CONTROL_PULSE_DIAGNOSTIC_INTERRUPT; else if (ip->cmd == IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS) command = IPMI_CHASSIS_CONTROL_INITIATE_SOFT_SHUTDOWN; if (fill_cmd_chassis_control (command, ip->obj_chassis_control_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_chassis_control: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_chassis_control_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ) { uint8_t identify_interval; uint8_t force_identify; uint8_t *identify_interval_ptr = NULL; uint8_t *force_identify_ptr = NULL; assert (ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_ON || ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_OFF); if (ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_ON) { /* must pass interval for force to be taken */ identify_interval = 0xFF; identify_interval_ptr = &identify_interval; force_identify = IPMI_CHASSIS_FORCE_IDENTIFY_ON; force_identify_ptr = &force_identify; } else { identify_interval = 0; identify_interval_ptr = &identify_interval; } if (fill_cmd_chassis_identify (identify_interval_ptr, force_identify_ptr, ip->obj_chassis_identify_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_chassis_identify: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_chassis_identify_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ) { char *endptr; unsigned int slot_number; assert (ip->extra_arg); errno = 0; slot_number = strtol (ip->extra_arg, &endptr, 0); /* tons of error checks by now, should not error out here */ assert (!errno); assert (endptr[0] == '\0'); assert (slot_number >= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN && slot_number <= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX); if (fill_cmd_get_sensor_reading (IPMI_SENSOR_NUMBER_OEM_DELL_C410X_PCIE_1_WATT + (slot_number - 1), ip->obj_c410x_get_sensor_reading_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_get_sensor_reading: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_c410x_get_sensor_reading_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ) { char *endptr; unsigned int slot_number; uint16_t slot_number_bitmask; assert (ip->extra_arg); errno = 0; slot_number = strtol (ip->extra_arg, &endptr, 0); /* tons of error checks by now, should not error out here */ assert (!errno); assert (endptr[0] == '\0'); assert (slot_number >= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MIN && slot_number <= IPMI_OEM_DELL_SLOT_POWER_CONTROL_SLOT_NUMBER_MAX); if (fiid_obj_set (ip->obj_c410x_slot_power_control_rq, "cmd", IPMI_CMD_OEM_DELL_SLOT_POWER_CONTROL) < 0) { IPMIPOWER_ERROR (("fiid_obj_set: 'cmd': %s", fiid_obj_errormsg (ip->obj_c410x_slot_power_control_rq))); exit (EXIT_FAILURE); } slot_number_bitmask = (0x1 << (slot_number - 1)); if (fiid_obj_set (ip->obj_c410x_slot_power_control_rq, "slot_number_bitmask", slot_number_bitmask) < 0) { IPMIPOWER_ERROR (("fiid_obj_set: 'slot_number_bitmask': %s", fiid_obj_errormsg (ip->obj_c410x_slot_power_control_rq))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_c410x_slot_power_control_rq; } else if (pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ) { if (fill_cmd_close_session (session_id, NULL, ip->obj_close_session_rq) < 0) { IPMIPOWER_ERROR (("fill_cmd_close_session: %s", strerror (errno))); exit (EXIT_FAILURE); } obj_cmd_rq = ip->obj_close_session_rq; } /* Construct packets */ if (IPMIPOWER_PACKET_TYPE_IPMI_1_5_SETUP_RQ (pkt) || (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt))) rv = _ipmi_1_5_packet_create (ip, pkt, authentication_type, sequence_number, session_id, password, (password) ? strlen (password) : 0, net_fn, obj_cmd_rq, buf, buflen); else if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt) || (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt))) rv = _ipmi_2_0_packet_create (ip, pkt, payload_type, payload_authenticated, payload_encrypted, session_id, sequence_number, password, (password) ? strlen (password) : 0, net_fn, authentication_algorithm, integrity_algorithm, confidentiality_algorithm, integrity_key, integrity_key_len, confidentiality_key, confidentiality_key_len, obj_cmd_rq, buf, buflen); else { IPMIPOWER_ERROR (("host = %s; p = %d; invalid logic", ip->ic->hostname, ip->protocol_state)); exit (EXIT_FAILURE); } return (rv); } ipmipower_msg_type_t ipmipower_packet_errmsg (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { fiid_obj_t obj_cmd; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RS (pkt)); obj_cmd = ipmipower_packet_cmd_obj (ip, pkt); if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt)) { uint8_t rmcpplus_status_code; uint64_t val; if (FIID_OBJ_GET (obj_cmd, "rmcpplus_status_code", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'rmcpplus_status_code': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } rmcpplus_status_code = val; /* achu: At this point in time, my belief is that the following RMCPPLUS Status Codes: RMCPPLUS_STATUS_INVALID_AUTHENTICATION_ALGORITHM RMCPPLUS_STATUS_INVALID_INTEGRITY_ALGORITHM RMCPPLUS_STATUS_INVALID_CONFIDENTIALITY_ALGORITHM RMCPPLUS_STATUS_INVALID_ROLE RMCPPLUS_STATUS_NO_MATCHING_AUTHENTICATION_PAYLOAD RMCPPLUS_STATUS_NO_MATCHING_INTEGRITY_PAYLOAD Imply that an incorrect algorithm/role/payload value was sent. *NOT* an unsupported algorithm/role/payload. I assume unsupported algorithm/role/payloads will get different error codes. If my assumption is later proven incorrect, then I need to redo some of this. */ if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_ERRORS) { IPMIPOWER_ERROR (("host = %s; p = %d; pkt = %d; called with good rmcpplus_status_code", ip->ic->hostname, ip->protocol_state, pkt)); exit (EXIT_FAILURE); } else if (rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION || rmcpplus_status_code == RMCPPLUS_STATUS_INSUFFICIENT_RESOURCES_TO_CREATE_A_SESSION_AT_THE_REQUESTED_TIME) return (IPMIPOWER_MSG_TYPE_BMC_BUSY); else if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_ROLE_OR_PRIVILEGE_LEVEL_REQUESTED || rmcpplus_status_code == RMCPPLUS_STATUS_INVALID_ROLE) return (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else if (rmcpplus_status_code == RMCPPLUS_STATUS_UNAUTHORIZED_NAME) return (IPMIPOWER_MSG_TYPE_USERNAME_INVALID); else if (rmcpplus_status_code == RMCPPLUS_STATUS_NO_CIPHER_SUITE_MATCH_WITH_PROPOSED_SECURITY_ALGORITHMS) return (IPMIPOWER_MSG_TYPE_CIPHER_SUITE_ID_UNAVAILABLE); } else { uint8_t comp_code; uint64_t val; if (FIID_OBJ_GET (obj_cmd, "comp_code", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'comp_code': %s", fiid_obj_errormsg (obj_cmd))); exit (EXIT_FAILURE); } comp_code = val; if (comp_code == IPMI_COMP_CODE_COMMAND_SUCCESS) { IPMIPOWER_ERROR (("host = %s; p = %d; pkt = %d; called with good comp_code", ip->ic->hostname, ip->protocol_state, pkt)); exit (EXIT_FAILURE); } else if (pkt == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS && cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && comp_code == IPMI_COMP_CODE_INVALID_DATA_FIELD_IN_REQUEST) return (IPMIPOWER_MSG_TYPE_IPMI_2_0_UNAVAILABLE); else if (pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS && (comp_code == IPMI_COMP_CODE_GET_SESSION_CHALLENGE_INVALID_USERNAME || comp_code == IPMI_COMP_CODE_GET_SESSION_CHALLENGE_NULL_USERNAME_NOT_ENABLED)) return (IPMIPOWER_MSG_TYPE_USERNAME_INVALID); else if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS && comp_code == IPMI_COMP_CODE_ACTIVATE_SESSION_EXCEEDS_PRIVILEGE_LEVEL) return (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS && (comp_code == IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SESSION_SLOT_AVAILABLE || comp_code == IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_FOR_GIVEN_USER || comp_code == IPMI_COMP_CODE_ACTIVATE_SESSION_NO_SLOT_AVAILABLE_TO_SUPPORT_USER)) return (IPMIPOWER_MSG_TYPE_BMC_BUSY); /* * IPMI Workaround * * Discovered on Xyratex HB-F8-SRAY * * For some reason on this system, if you do not specify a * privilege level of Admin, this completion code will always be * returned. Reason unknown. This isn't the best/right error * to return, but it will atleast point the user to a way to * work around the problem. */ else if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS && comp_code == IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) return (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); else if (pkt == IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS && (comp_code == IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_NOT_AVAILABLE_FOR_USER || comp_code == IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_REQUESTED_LEVEL_EXCEEDS_USER_PRIVILEGE_LIMIT || comp_code == IPMI_COMP_CODE_SET_SESSION_PRIVILEGE_LEVEL_CANNOT_DISABLE_USER_LEVEL_AUTHENTICATION)) return (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED); #if 0 /* Should not reach this point, should be handled by other code */ else if (pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS && comp_code == IPMI_COMP_CODE_INSUFFICIENT_PRIVILEGE_LEVEL) return (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_INSUFFICIENT); #endif else if (pkt == IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS && comp_code == IPMI_COMP_CODE_REQUEST_PARAMETER_NOT_SUPPORTED) return (IPMIPOWER_MSG_TYPE_OPERATION_INVALID); } return (IPMIPOWER_MSG_TYPE_BMC_ERROR); } freeipmi-1.6.4/ipmipower/ipmipower_packet.h0000644002055400205540000000575713527331636021027 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_packet.h,v 1.24 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_PACKETS_H #define IPMIPOWER_PACKETS_H #include "ipmipower.h" fiid_field_t *ipmipower_packet_cmd_template (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); fiid_obj_t ipmipower_packet_cmd_obj (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); /* ipmipower_packet_store * - Store pkt into ipmipower_powercmd_t structure * - if buf too long, packet truncated * - Only works with response packet types * - Returns 1 if packet unparsed properly, 0 if not */ int ipmipower_packet_store (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen); void ipmipower_packet_dump (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, const void *buf, unsigned int buflen); /* ipmipower_packet_create * - Create packet of the specified packet type * - Only works with request packet types * - Returns length of packet stored in buf */ int ipmipower_packet_create (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt, void *buf, unsigned int buflen); /* ipmipower_packet_errmsg * - Get error message type * - Only works with response packet types * Returns message error code for appropriate error message */ ipmipower_msg_type_t ipmipower_packet_errmsg (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt); #endif /* IPMIPOWER_PACKETS_H */ freeipmi-1.6.4/ipmipower/ipmipower_ping.c0000644002055400205540000006064213527331636020502 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_ping.c,v 1.54 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include "ipmipower_ping.h" #include "ipmipower_error.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "debug-util.h" #include "timeval.h" extern struct ipmipower_arguments cmd_args; extern struct ipmipower_connection *ics; extern unsigned int ics_len; /* next_ping_sends_time, when the next round of pings should be sent */ static struct timeval next_ping_sends_time; /* force discovery sweep when user reconfigures hostnames */ static int force_discovery_sweep; /* IPMI has a 6 bit sequence number */ #define IPMI_RQ_SEQ_MAX 0x3F void ipmipower_ping_force_discovery_sweep () { force_discovery_sweep = 1; } void ipmipower_ping_process_pings (int *timeout) { int i, send_pings_flag = 0; struct timeval cur_time, result; unsigned int ms_time; assert (timeout); if (!cmd_args.common_args.hostname) return; if (!cmd_args.ping_interval) return; if (gettimeofday (&cur_time, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } if (timeval_gt (&cur_time, &next_ping_sends_time) || force_discovery_sweep) { force_discovery_sweep = 0; timeval_add_ms (&cur_time, cmd_args.ping_interval, &next_ping_sends_time); send_pings_flag++; } for (i = 0; i < ics_len; i++) { uint8_t buf[IPMIPOWER_PACKET_BUFLEN]; int ret, len; if (send_pings_flag) { int dropped = 0; /* deal with packet heuristics */ if (cmd_args.ping_packet_count && cmd_args.ping_percent) { if (ics[i].ping_packet_count_send == cmd_args.ping_packet_count) { if ((((double)(ics[i].ping_packet_count_send - ics[i].ping_packet_count_recv))/ics[i].ping_packet_count_send) > ((double)cmd_args.ping_percent/100)) ics[i].link_state = IPMIPOWER_LINK_STATE_BAD; else ics[i].link_state = IPMIPOWER_LINK_STATE_GOOD; ics[i].ping_packet_count_send = 0; ics[i].ping_packet_count_recv = 0; } } if (cmd_args.ping_consec_count) { if (!ics[i].ping_last_packet_recv_flag) ics[i].ping_consec_count = 0; ics[i].ping_last_packet_recv_flag = 0; } /* must increment count before setting message tag, so we * can check sequence number correctly later on */ ics[i].ping_sequence_number_counter++; /* Workaround * * Some motherboards don't support RMCP ping/pong :-( * * Discovered on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill */ if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_lan_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_cmd = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_rmcp_hdr_ipmi (obj_rmcp_hdr) < 0) { IPMIPOWER_ERROR (("fill_rmcp_hdr_ipmi: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_lan_session_hdr (IPMI_AUTHENTICATION_TYPE_NONE, 0, 0, obj_lan_session_hdr) < 0) { IPMIPOWER_ERROR (("fill_lan_session_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_lan_msg_hdr (IPMI_SLAVE_ADDRESS_BMC, IPMI_NET_FN_APP_RQ, IPMI_BMC_IPMB_LUN_BMC, (ics[i].ping_sequence_number_counter % (IPMI_RQ_SEQ_MAX + 1)), obj_lan_msg_hdr) < 0) { IPMIPOWER_ERROR (("fill_lan_msg_hdr: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_cmd_get_channel_authentication_capabilities (IPMI_CHANNEL_NUMBER_CURRENT_CHANNEL, IPMI_PRIVILEGE_LEVEL_USER, IPMI_GET_IPMI_V15_DATA, obj_cmd) < 0) { IPMIPOWER_ERROR (("fill_cmd_get_channel_authentication_capabilities: %s", strerror (errno))); exit (EXIT_FAILURE); } if ((len = assemble_ipmi_lan_pkt (obj_rmcp_hdr, obj_lan_session_hdr, obj_lan_msg_hdr, obj_cmd, NULL, 0, buf, IPMIPOWER_PACKET_BUFLEN, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("assemble_ipmi_lan_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } #ifndef NDEBUG if (cmd_args.rmcpdump) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; const char *str_cmd = NULL; str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES); memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_IPMI_1_5, DEBUG_UTIL_DIRECTION_REQUEST, DEBUG_UTIL_FLAGS_DEFAULT, str_cmd, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_lan_packet (STDERR_FILENO, ics[i].hostname, hdrbuf, NULL, buf, len, tmpl_lan_msg_hdr_rq, tmpl_cmd_get_channel_authentication_capabilities_rq) < 0) IPMIPOWER_DEBUG (("ipmi_dump_lan_packet: %s", strerror (errno))); } #endif /* NDEBUG */ fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_lan_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); } else /* !IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING */ { fiid_obj_t rmcp_hdr = NULL; fiid_obj_t rmcp_ping = NULL; if (!(rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(rmcp_ping = fiid_obj_create (tmpl_cmd_asf_presence_ping))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_rmcp_hdr_asf (rmcp_hdr) < 0) { IPMIPOWER_ERROR (("fill_rmcp_hdr_asf: %s", strerror (errno))); exit (EXIT_FAILURE); } if (fill_cmd_asf_presence_ping ((ics[i].ping_sequence_number_counter % (RMCP_ASF_MESSAGE_TAG_MAX + 1)), rmcp_ping) < 0) { IPMIPOWER_ERROR (("fill_cmd_asf_presence_ping: %s", strerror (errno))); exit (EXIT_FAILURE); } if ((len = assemble_rmcp_pkt (rmcp_hdr, rmcp_ping, buf, IPMIPOWER_PACKET_BUFLEN, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("assemble_rmcp_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } #ifndef NDEBUG if (cmd_args.rmcpdump) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, DEBUG_UTIL_RMCPPING_STR, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_rmcp_packet (STDERR_FILENO, ics[i].hostname, hdrbuf, NULL, buf, len, tmpl_cmd_asf_presence_ping) < 0) IPMIPOWER_DEBUG (("ipmi_dump_rmcp_packet: %s", strerror (errno))); } #endif /* NDEBUG */ fiid_obj_destroy (rmcp_hdr); fiid_obj_destroy (rmcp_ping); } /* !IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING */ if ((ret = cbuf_write (ics[i].ping_out, buf, len, &dropped)) < 0) { IPMIPOWER_ERROR (("cbuf_write: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ret != len) { IPMIPOWER_ERROR (("cbuf_write: incorrect bytes written %d", ret)); exit (EXIT_FAILURE); } if (dropped) IPMIPOWER_DEBUG (("cbuf_write: dropped %d bytes", dropped)); ics[i].last_ping_send.tv_sec = cur_time.tv_sec; ics[i].last_ping_send.tv_usec = cur_time.tv_usec; if (cmd_args.ping_packet_count && cmd_args.ping_percent) ics[i].ping_packet_count_send++; } /* Did we receive something? */ len = ipmipower_cbuf_peek_and_drop (ics[i].ping_in, buf, IPMIPOWER_PACKET_BUFLEN); if (len > 0) { uint8_t message_type = 0, ipmi_supported = 0; uint64_t val; /* Workaround * * Some motherboards don't support RMCP ping/pong :-( * * Discovered on Intel Windmill, Quanta Winterfell, and Wiwynn Windmill */ if (cmd_args.common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_lan_session_hdr = NULL; fiid_obj_t obj_lan_msg_hdr = NULL; fiid_obj_t obj_cmd = NULL; fiid_obj_t obj_lan_msg_trlr = NULL; int checksum_ret = 0; int unassemble_ret = 0; int cmd_ret = 0; if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_lan_session_hdr = fiid_obj_create (tmpl_lan_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_lan_msg_hdr = fiid_obj_create (tmpl_lan_msg_hdr_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_cmd = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(obj_lan_msg_trlr = fiid_obj_create (tmpl_lan_msg_trlr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } #ifndef NDEBUG if (cmd_args.rmcpdump) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; const char *str_cmd = NULL; str_cmd = ipmi_cmd_str (IPMI_NET_FN_APP_RQ, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES); memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_IPMI_1_5, DEBUG_UTIL_DIRECTION_RESPONSE, DEBUG_UTIL_FLAGS_DEFAULT, str_cmd, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_lan_packet (STDERR_FILENO, ics[i].hostname, hdrbuf, NULL, buf, len, tmpl_lan_msg_hdr_rs, tmpl_cmd_get_channel_authentication_capabilities_rs) < 0) IPMIPOWER_DEBUG (("ipmi_dump_lan_packet: %s", strerror (errno))); } #endif /* NDEBUG */ if ((checksum_ret = ipmi_lan_check_packet_checksum (buf, len)) < 0) { IPMIPOWER_ERROR (("ipmi_lan_check_packet_checksum: %s", strerror (errno))); exit (EXIT_FAILURE); } if (checksum_ret && ((unassemble_ret = unassemble_ipmi_lan_pkt (buf, len, obj_rmcp_hdr, obj_lan_session_hdr, obj_lan_msg_hdr, obj_cmd, obj_lan_msg_trlr, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0)) { IPMIPOWER_ERROR (("unassemble_ipmi_lan_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } /* achu: check for cmd type, but don't bother checking * sequence numbers or completion code. The fact it * returns is sufficient. We just need to make sure we * get something back from the BMC to ensure the machine * is still there. */ if (checksum_ret && unassemble_ret && ((cmd_ret = ipmi_check_cmd (obj_cmd, IPMI_CMD_GET_CHANNEL_AUTHENTICATION_CAPABILITIES)) < 0)) { IPMIPOWER_ERROR (("ipmi_check_cmd: %s", strerror (errno))); exit (EXIT_FAILURE); } if (checksum_ret && unassemble_ret && cmd_ret) { /* We'll say this is equivalent to what pong response from RMCP */ message_type = RMCP_ASF_MESSAGE_TYPE_PRESENCE_PONG; ipmi_supported = 1; } fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_lan_session_hdr); fiid_obj_destroy (obj_lan_msg_hdr); fiid_obj_destroy (obj_cmd); fiid_obj_destroy (obj_lan_msg_trlr); } else /* !IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING */ { fiid_obj_t rmcp_hdr = NULL; fiid_obj_t rmcp_pong = NULL; if (!(rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(rmcp_pong = fiid_obj_create (tmpl_cmd_asf_presence_pong))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } #ifndef NDEBUG if (cmd_args.rmcpdump) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, DEBUG_UTIL_RMCPPING_STR, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_rmcp_packet (STDERR_FILENO, ics[i].hostname, hdrbuf, NULL, buf, len, tmpl_cmd_asf_presence_pong) < 0) IPMIPOWER_DEBUG (("ipmi_dump_rmcp_packet: %s", strerror (errno))); } #endif /* NDEBUG */ if ((ret = unassemble_rmcp_pkt (buf, len, rmcp_hdr, rmcp_pong, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) { IPMIPOWER_ERROR (("unassemble_rmcp_pkt: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ret) { /* achu: check for ipmi_support and pong type, but don't * check for message tag. On occassion, I have witnessed * BMCs send message tags "out of sync". For example, you * send 8, BMC returns 7. You send 9, BMC returns 8. We * really don't care if the BMC is out of sync. We just * need to make sure we get something back from the BMC to * ensure the machine is still there. */ if (FIID_OBJ_GET (rmcp_pong, "message_type", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'message_type': %s", fiid_obj_errormsg (rmcp_pong))); exit (EXIT_FAILURE); } message_type = val; if (FIID_OBJ_GET (rmcp_pong, "supported_entities.ipmi_supported", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'supported_entities.ipmi_supported': %s", fiid_obj_errormsg (rmcp_pong))); exit (EXIT_FAILURE); } ipmi_supported = val; } fiid_obj_destroy (rmcp_hdr); fiid_obj_destroy (rmcp_pong); } if (message_type == RMCP_ASF_MESSAGE_TYPE_PRESENCE_PONG && ipmi_supported) { if (cmd_args.ping_packet_count && cmd_args.ping_percent) ics[i].ping_packet_count_recv++; if (cmd_args.ping_consec_count) { /* Don't increment twice, its possible a previous pong * response was late, and we quickly receive two * pong responses */ if (!ics[i].ping_last_packet_recv_flag) ics[i].ping_consec_count++; ics[i].ping_last_packet_recv_flag++; } if (cmd_args.ping_packet_count && cmd_args.ping_percent) { if (ics[i].link_state == IPMIPOWER_LINK_STATE_GOOD) ics[i].discover_state = IPMIPOWER_DISCOVER_STATE_DISCOVERED; else { if (cmd_args.ping_consec_count && ics[i].ping_consec_count >= cmd_args.ping_consec_count) ics[i].discover_state = IPMIPOWER_DISCOVER_STATE_DISCOVERED; else ics[i].discover_state = IPMIPOWER_DISCOVER_STATE_BADCONNECTION; } } else { ics[i].discover_state = IPMIPOWER_DISCOVER_STATE_DISCOVERED; } ics[i].last_ping_recv.tv_sec = cur_time.tv_sec; ics[i].last_ping_recv.tv_usec = cur_time.tv_usec; } } /* !IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING */ /* Is the node gone?? */ timeval_sub (&cur_time, &ics[i].last_ping_recv, &result); timeval_millisecond_calc (&result, &ms_time); if (ms_time >= cmd_args.ping_timeout) ics[i].discover_state = IPMIPOWER_DISCOVER_STATE_UNDISCOVERED; } timeval_sub (&next_ping_sends_time, &cur_time, &result); timeval_millisecond_calc (&result, &ms_time); *timeout = ms_time; } freeipmi-1.6.4/ipmipower/ipmipower_ping.h0000644002055400205540000000302713527331636020501 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_ping.h,v 1.14 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_PING_H #define IPMIPOWER_PING_H #include "ipmipower.h" void ipmipower_ping_force_discovery_sweep (); void ipmipower_ping_process_pings (int *timeout); #endif /* IPMIPOWER_PING_H */ freeipmi-1.6.4/ipmipower/ipmipower_powercmd.c0000644002055400205540000025101013527331636021354 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_powercmd.c,v 1.206 2010-08-03 00:10:59 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_STRINGS_H #include #endif /* HAVE_STRINGS_H */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmipower.h" #include "ipmipower_connection.h" #include "ipmipower_error.h" #include "ipmipower_oem.h" #include "ipmipower_output.h" #include "ipmipower_powercmd.h" #include "ipmipower_packet.h" #include "ipmipower_check.h" #include "ipmipower_util.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "list.h" #include "secure.h" #include "timeval.h" extern struct ipmipower_arguments cmd_args; /* Queue of all pending power commands */ static List pending = NULL; /* Queue of power commands to be added to the pending, for serializing * OEM power control to the same host */ static List add_to_pending = NULL; /* Count of currently executing power commands for fanout */ static unsigned int executing_count = 0; static int _find_ipmipower_powercmd (void *x, void *key) { ipmipower_powercmd_t ip; char *hostname; assert (x); assert (key); ip = (ipmipower_powercmd_t)x; hostname = (char *)key; return (!strcasecmp (ip->ic->hostname, hostname)); } static void _destroy_ipmipower_powercmd (void *x) { ipmipower_powercmd_t ip; assert (x); ip = (ipmipower_powercmd_t)x; fiid_obj_destroy (ip->obj_rmcp_hdr_rq); fiid_obj_destroy (ip->obj_rmcp_hdr_rs); fiid_obj_destroy (ip->obj_lan_session_hdr_rq); fiid_obj_destroy (ip->obj_lan_session_hdr_rs); fiid_obj_destroy (ip->obj_lan_msg_hdr_rq); fiid_obj_destroy (ip->obj_lan_msg_hdr_rs); fiid_obj_destroy (ip->obj_lan_msg_trlr_rs); fiid_obj_destroy (ip->obj_rmcpplus_session_hdr_rq); fiid_obj_destroy (ip->obj_rmcpplus_session_hdr_rs); fiid_obj_destroy (ip->obj_rmcpplus_payload_rs); fiid_obj_destroy (ip->obj_rmcpplus_session_trlr_rq); fiid_obj_destroy (ip->obj_rmcpplus_session_trlr_rs); fiid_obj_destroy (ip->obj_authentication_capabilities_rq); fiid_obj_destroy (ip->obj_authentication_capabilities_rs); fiid_obj_destroy (ip->obj_get_session_challenge_rq); fiid_obj_destroy (ip->obj_get_session_challenge_rs); fiid_obj_destroy (ip->obj_activate_session_rq); fiid_obj_destroy (ip->obj_activate_session_rs); fiid_obj_destroy (ip->obj_open_session_rq); fiid_obj_destroy (ip->obj_open_session_rs); fiid_obj_destroy (ip->obj_rakp_message_1_rq); fiid_obj_destroy (ip->obj_rakp_message_2_rs); fiid_obj_destroy (ip->obj_rakp_message_3_rq); fiid_obj_destroy (ip->obj_rakp_message_4_rs); fiid_obj_destroy (ip->obj_set_session_privilege_level_rq); fiid_obj_destroy (ip->obj_set_session_privilege_level_rs); fiid_obj_destroy (ip->obj_get_chassis_status_rq); fiid_obj_destroy (ip->obj_get_chassis_status_rs); fiid_obj_destroy (ip->obj_chassis_control_rq); fiid_obj_destroy (ip->obj_chassis_control_rs); fiid_obj_destroy (ip->obj_chassis_identify_rq); fiid_obj_destroy (ip->obj_chassis_identify_rs); if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { fiid_obj_destroy (ip->obj_c410x_get_sensor_reading_rq); fiid_obj_destroy (ip->obj_c410x_get_sensor_reading_rs); fiid_obj_destroy (ip->obj_c410x_slot_power_control_rq); fiid_obj_destroy (ip->obj_c410x_slot_power_control_rs); } } fiid_obj_destroy (ip->obj_close_session_rq); fiid_obj_destroy (ip->obj_close_session_rs); /* Close all sockets that were saved during the Get Session * Challenge phase of the IPMI protocol. */ if (list_count (ip->sockets_to_close) > 0) { int *fd; while ((fd = list_pop (ip->sockets_to_close))) { /* cleanup path, ignore potential error */ close (*fd); free (fd); } } list_destroy (ip->sockets_to_close); free (ip->extra_arg); /* Any additional queued commands should be moved to add_to_pending * before destroy */ assert (!ip->next); free (ip); } void ipmipower_powercmd_setup () { assert (!pending); /* need to cleanup first! */ pending = list_create ((ListDelF)_destroy_ipmipower_powercmd); if (!pending) { IPMIPOWER_ERROR (("list_create: %s", strerror (errno))); exit (EXIT_FAILURE); } add_to_pending = list_create (NULL); if (!add_to_pending) { IPMIPOWER_ERROR (("list_create: %s", strerror (errno))); exit (EXIT_FAILURE); } } void ipmipower_powercmd_cleanup () { assert (pending); /* did not run ipmipower_powercmd_setup() */ list_destroy (pending); list_destroy (add_to_pending); pending = NULL; add_to_pending = NULL; } void ipmipower_powercmd_queue (ipmipower_power_cmd_t cmd, struct ipmipower_connection *ic, const char *extra_arg) { ipmipower_powercmd_t ip; assert (pending); /* did not run ipmipower_powercmd_setup() */ assert (ic); assert (IPMIPOWER_POWER_CMD_VALID (cmd)); ipmipower_connection_clear (ic); if (!(ip = (ipmipower_powercmd_t)malloc (sizeof (struct ipmipower_powercmd)))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } ip->cmd = cmd; ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_START; /* * Protocol State Machine Variables */ #if 0 /* Initialize when protocol really begins. Necessary b/c of fanout support * For now just clear it. */ if (gettimeofday (&(ip->time_begin), NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } #else /* 0 */ memset (&(ip->time_begin), '\0', sizeof (struct timeval)); #endif /* 0 */ ip->retransmission_count = 0; ip->close_timeout = 0; /* * Protocol Maintenance Variables */ ip->session_inbound_count = 0; if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) { if (ipmi_check_session_sequence_number_1_5_init (&(ip->highest_received_sequence_number), &(ip->previously_received_list)) < 0) { IPMIPOWER_ERROR (("ipmi_check_session_sequence_number_1_5_init: %s", strerror (errno))); exit (EXIT_FAILURE); } } else { if (ipmi_check_session_sequence_number_2_0_init (&(ip->highest_received_sequence_number), &(ip->previously_received_list)) < 0) { IPMIPOWER_ERROR (("ipmi_check_session_sequence_number_2_0_init: %s", strerror (errno))); exit (EXIT_FAILURE); } } /* IPMI 1.5 */ #if 0 if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) { /* ip->permsgauth_enabled is set after the Get Authentication * Capabilities Response and/or Activate Session Response is * received */ /* set to 0 below for time being */ } #else /* 0 */ ip->permsgauth_enabled = 0; #endif /* 0 */ /* IPMI 2.0 */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) { if (ipmi_cipher_suite_id_to_algorithms (cmd_args.common_args.cipher_suite_id, &(ip->authentication_algorithm), &(ip->integrity_algorithm), &(ip->confidentiality_algorithm)) < 0) { IPMIPOWER_ERROR (("ipmipower_powercmd_queue: ipmi_cipher_suite_id_to_algorithms: ", "cmd_args.common_args.cipher_suite_id: %d: %s", cmd_args.common_args.cipher_suite_id, strerror (errno))); exit (EXIT_FAILURE); } /* * IPMI Workaround (achu) * * Forgotten Motherboard * * Cipher suite IDs are attached to specific privilege levels * rather than a maximum privilege level limit. So you can only * authenticate at the configured privilege level rather than a * privilege level <= to it. * * To deal with this situation. We send the "request highest * privilege" flag in the open session request. This should be * enough to work around this issue but still work with other * motherboards. */ /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The Intel's return IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL instead * of an actual privilege, so have to pass the actual privilege * we want to use. */ /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100, Inventec 5441/Dell Xanadu II, * Supermicro X8DTH, Supermicro X8DTG, Supermicro X8DTU, Intel * S5500WBV/Penguin Relion 700 * * The remote BMC incorrectly calculates keys using the privilege * specified in the open session stage rather than the privilege * used during the RAKP1 stage. This can be problematic if you * specify IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL during that stage * instead of a real privilege level. So we must pass the actual * privilege we want to use. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION || cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION || cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE) ip->requested_maximum_privilege_level = cmd_args.common_args.privilege_level; else ip->requested_maximum_privilege_level = IPMI_PRIVILEGE_LEVEL_HIGHEST_LEVEL; memset (ip->sik_key, '\0', IPMI_MAX_SIK_KEY_LENGTH); ip->sik_key_ptr = ip->sik_key; ip->sik_key_len = IPMI_MAX_SIK_KEY_LENGTH; memset (ip->integrity_key, '\0', IPMI_MAX_INTEGRITY_KEY_LENGTH); ip->integrity_key_ptr = ip->integrity_key; ip->integrity_key_len = IPMI_MAX_INTEGRITY_KEY_LENGTH; memset (ip->confidentiality_key, '\0', IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH); ip->confidentiality_key_ptr = ip->confidentiality_key; ip->confidentiality_key_len = IPMI_MAX_CONFIDENTIALITY_KEY_LENGTH; if (ipmi_get_random (&ip->initial_message_tag, sizeof (ip->initial_message_tag)) < 0) { IPMIPOWER_ERROR (("ipmi_get_random: %s", strerror (errno))); exit (EXIT_FAILURE); } ip->message_tag_count = 0; ip->session_sequence_number = 0; ip->name_only_lookup = IPMI_NAME_ONLY_LOOKUP; /* In IPMI 2.0, session_ids of 0 are special */ do { if (ipmi_get_random (&ip->remote_console_session_id, sizeof (ip->remote_console_session_id)) < 0) { IPMIPOWER_ERROR (("ipmi_get_random: %s", strerror (errno))); exit (EXIT_FAILURE); } } while (!ip->remote_console_session_id); if (ipmi_get_random (ip->remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH) < 0) { IPMIPOWER_ERROR (("ipmi_get_random: %s", strerror (errno))); exit (EXIT_FAILURE); } } ip->wait_until_on_state = 0; ip->wait_until_off_state = 0; ip->ic = ic; if (!(ip->obj_rmcp_hdr_rq = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcp_hdr_rs = fiid_obj_create (tmpl_rmcp_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_lan_session_hdr_rq = fiid_obj_create (tmpl_lan_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_lan_session_hdr_rs = fiid_obj_create (tmpl_lan_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_lan_msg_hdr_rq = fiid_obj_create (tmpl_lan_msg_hdr_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_lan_msg_hdr_rs = fiid_obj_create (tmpl_lan_msg_hdr_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_lan_msg_trlr_rs = fiid_obj_create (tmpl_lan_msg_trlr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcpplus_session_hdr_rq = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcpplus_session_hdr_rs = fiid_obj_create (tmpl_rmcpplus_session_hdr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcpplus_payload_rs = fiid_obj_create (tmpl_rmcpplus_payload))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcpplus_session_trlr_rq = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rmcpplus_session_trlr_rs = fiid_obj_create (tmpl_rmcpplus_session_trlr))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_authentication_capabilities_rq = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_authentication_capabilities_rs = fiid_obj_create (tmpl_cmd_get_channel_authentication_capabilities_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_get_session_challenge_rq = fiid_obj_create (tmpl_cmd_get_session_challenge_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_get_session_challenge_rs = fiid_obj_create (tmpl_cmd_get_session_challenge_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_activate_session_rq = fiid_obj_create (tmpl_cmd_activate_session_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_activate_session_rs = fiid_obj_create (tmpl_cmd_activate_session_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_open_session_rq = fiid_obj_create (tmpl_rmcpplus_open_session_request))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_open_session_rs = fiid_obj_create (tmpl_rmcpplus_open_session_response))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rakp_message_1_rq = fiid_obj_create (tmpl_rmcpplus_rakp_message_1))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rakp_message_2_rs = fiid_obj_create (tmpl_rmcpplus_rakp_message_2))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rakp_message_3_rq = fiid_obj_create (tmpl_rmcpplus_rakp_message_3))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_rakp_message_4_rs = fiid_obj_create (tmpl_rmcpplus_rakp_message_4))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_set_session_privilege_level_rq = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_set_session_privilege_level_rs = fiid_obj_create (tmpl_cmd_set_session_privilege_level_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_get_chassis_status_rq = fiid_obj_create (tmpl_cmd_get_chassis_status_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_get_chassis_status_rs = fiid_obj_create (tmpl_cmd_get_chassis_status_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_chassis_control_rq = fiid_obj_create (tmpl_cmd_chassis_control_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_chassis_control_rs = fiid_obj_create (tmpl_cmd_chassis_control_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_chassis_identify_rq = fiid_obj_create (tmpl_cmd_chassis_identify_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_chassis_identify_rs = fiid_obj_create (tmpl_cmd_chassis_identify_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { if (!(ip->obj_c410x_get_sensor_reading_rq = fiid_obj_create (tmpl_cmd_get_sensor_reading_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_c410x_get_sensor_reading_rs = fiid_obj_create (tmpl_cmd_get_sensor_reading_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_c410x_slot_power_control_rq = fiid_obj_create (tmpl_cmd_c410x_slot_power_control_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_c410x_slot_power_control_rs = fiid_obj_create (tmpl_cmd_c410x_slot_power_control_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } } } else { ip->obj_c410x_get_sensor_reading_rq = NULL; ip->obj_c410x_get_sensor_reading_rs = NULL; ip->obj_c410x_slot_power_control_rq = NULL; ip->obj_c410x_slot_power_control_rs = NULL; } if (!(ip->obj_close_session_rq = fiid_obj_create (tmpl_cmd_close_session_rq))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->obj_close_session_rs = fiid_obj_create (tmpl_cmd_close_session_rs))) { IPMIPOWER_ERROR (("fiid_obj_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(ip->sockets_to_close = list_create (NULL))) { IPMIPOWER_ERROR (("list_create: %s", strerror (errno))); exit (EXIT_FAILURE); } if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { assert (ipmipower_oem_power_cmd_check_support_and_privilege (cmd, NULL, 0) > 0); assert (ipmipower_oem_power_cmd_check_extra_arg (extra_arg, NULL, 0) > 0); if (extra_arg) { if (!(ip->extra_arg = strdup (extra_arg))) { IPMIPOWER_ERROR (("strdup")); exit (EXIT_FAILURE); } } else ip->extra_arg = NULL; } else ip->extra_arg = NULL; /* When doing OEM power control, it is possible the user may specify * the same host multiple times. This wouldn't be possible under * normal cases. For example, under normal circumstances if the user did * * -h foohost,foohost --on * * foohost would be collapsed to just one "foohost" (through a call * to hostlist_uniq()), because it doesn't make sense to turn it on * twice. * * However, now someone might want to do * * --oem-power-type=FOO -h foohost+1,foohost+2 --on * * Which logically can make sense now. * * We do not want to do power control to the host in parallel b/c * many BMCs can't handle parallel sessions (you will BUSY errors). * So we will serialize power control operations to the same host. */ /* XXX: The constant strcmp and searching of this list can be slow * (O(n^2)), but for the time being it is assumed this will not * be an overall performance issue for ipmipower. If it does become * an issue, a bigger rearchitecture will be required. */ ip->next = NULL; if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { ipmipower_powercmd_t iptmp; if ((iptmp = list_find_first (pending, _find_ipmipower_powercmd, ip->ic->hostname))) { /* find the last one in the list */ while (iptmp->next) iptmp = iptmp->next; iptmp->next = ip; return; } } if (!list_append (pending, ip)) { IPMIPOWER_ERROR (("list_append: %s", strerror (errno))); exit (EXIT_FAILURE); } } int ipmipower_powercmd_pending () { assert (pending); /* did not run ipmipower_powercmd_setup() */ return (!list_is_empty (pending)); } /* _send_packet * - Send a packet of the specified type * - updates state and counts * - if this is a retransmission, do not update inbound and rqseq * count. BMC may need to know if this is a retransmission. Must * increment outbound sequence number, since BMC may increase outbound * sequence number. */ static void _send_packet (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t buf[IPMIPOWER_PACKET_BUFLEN]; int ret, len = 0, dropped = 0; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RQ (pkt)); /* The following sequence number counts must be set before * ipmipower_packet_create, so the same value that is sent can be * matched later. */ ip->ic->ipmi_requester_sequence_number_counter++; if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RQ (pkt)) ip->message_tag_count++; else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) { /* IPMI 2.0 is special, sequence numbers of 0 don't count */ ip->session_sequence_number++; if (!ip->session_sequence_number) ip->session_sequence_number++; } len = ipmipower_packet_create (ip, pkt, buf, IPMIPOWER_PACKET_BUFLEN); ipmipower_packet_dump (ip, pkt, buf, len); if ((ret = cbuf_write (ip->ic->ipmi_out, buf, len, &dropped)) < 0) { IPMIPOWER_ERROR (("cbuf_write: %s", strerror (errno))); exit (EXIT_FAILURE); } if (ret != len) { IPMIPOWER_ERROR (("cbuf_write: incorrect bytes written %d", ret)); exit (EXIT_FAILURE); } if (dropped) IPMIPOWER_DEBUG (("cbuf_write: dropped %d bytes", dropped)); if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) secure_memset (buf, '\0', IPMIPOWER_PACKET_BUFLEN); switch (pkt) { case IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_AUTHENTICATION_CAPABILITIES_SENT; break; case IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_GET_SESSION_CHALLENGE_SENT; break; case IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT; /* IPMI Workaround (achu) * * Close all sockets that were saved during the Get Session * Challenge phase of the IPMI protocol. See comments in * _retry_packets(). */ if (list_count (ip->sockets_to_close) > 0) { int *fd; while ((fd = list_pop (ip->sockets_to_close))) { /* cleanup path, ignore potential error */ close (*fd); free (fd); } } break; case IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT; break; case IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT; break; case IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT; break; case IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_GET_CHASSIS_STATUS_SENT; break; case IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_CHASSIS_CONTROL_SENT; break; case IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_CHASSIS_IDENTIFY_SENT; break; case IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_C410X_GET_SENSOR_READING_SENT; break; case IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_C410X_SLOT_POWER_CONTROL_SENT; break; case IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_CLOSE_SESSION_SENT; break; default: IPMIPOWER_ERROR (("_send_packet: invalid pkt type: %d", pkt)); exit (EXIT_FAILURE); } /* Session inbound count is incremented after the packet is sent, * since the first inbound sequence number is specified by the * activate session command. */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RQ (pkt)) ip->session_inbound_count++; if (gettimeofday (&(ip->ic->last_ipmi_send), NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } } /* _recv_packet * - Receive a packet * Returns 1 if packet is of correct size and passes checks * Returns 0 if no packet received yet or packet should be ignored * Returns -1 if packet returned error */ static int _recv_packet (ipmipower_powercmd_t ip, ipmipower_packet_type_t pkt) { uint8_t recv_buf[IPMIPOWER_PACKET_BUFLEN]; int recv_len = 0; int rv = -1; uint64_t val; assert (ip); assert (IPMIPOWER_PACKET_TYPE_RS (pkt)); if (!(recv_len = ipmipower_cbuf_peek_and_drop (ip->ic->ipmi_in, recv_buf, IPMIPOWER_PACKET_BUFLEN))) return (0); ipmipower_packet_dump (ip, pkt, recv_buf, recv_len); /* rv = 0 if the packet is unparseable */ if (!ipmipower_packet_store (ip, pkt, recv_buf, recv_len)) { rv = 0; goto cleanup; } if (pkt == IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS || pkt == IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS) { if (!ipmipower_check_checksum (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_network_function (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_command (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_requester_sequence_number (ip, pkt)) { rv = 0; goto cleanup; } /* If everything else is correct besides completion code, packet * returned an error. */ if (!ipmipower_check_completion_code (ip, pkt)) { ipmipower_output (ipmipower_packet_errmsg (ip, pkt), ip->ic->hostname, ip->extra_arg); ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } goto cleanup; } /* If packet is no good though, ignore it, treat it like a * checksum error. Note, you must check after checking * completion code. */ if (!ipmipower_check_packet (ip, pkt)) { rv = 0; goto cleanup; } } else if (pkt == IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS) { if (!ipmipower_check_checksum (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_authentication_code (ip, pkt, recv_buf, recv_len)) { rv = 0; goto cleanup; } if (!ipmipower_check_network_function (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_command (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_requester_sequence_number (ip, pkt)) { rv = 0; goto cleanup; } /* If everything else is correct besides completion code, packet * returned an error. */ if (!ipmipower_check_completion_code (ip, pkt)) { ipmipower_output (ipmipower_packet_errmsg (ip, pkt), ip->ic->hostname, ip->extra_arg); ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } goto cleanup; } /* If packet is no good though, ignore it, treat it like a * checksum error. Note, you must check after checking * completion code. */ if (!ipmipower_check_packet (ip, pkt)) { rv = 0; goto cleanup; } /* achu: * * this should really be done in _process_ipmi_packets(), but * because we are going to clear out the lan session header (b/c * it has sensitive information in it), we'll do this here. */ if (FIID_OBJ_GET (ip->obj_lan_session_hdr_rs, "session_sequence_number", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'session_sequence_number': %s", fiid_obj_errormsg (ip->obj_lan_session_hdr_rs))); exit (EXIT_FAILURE); } ip->highest_received_sequence_number = val; /* IPMI Workaround (achu) * * Discovered on Sun Fire 4100. * * The session sequence numbers for IPMI 1.5 are the wrong endian. * So we have to flip the bits to workaround it. */ if (cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER) { uint32_t tmp_session_sequence_number = ip->highest_received_sequence_number; ip->highest_received_sequence_number = ((tmp_session_sequence_number & 0xFF000000) >> 24) | ((tmp_session_sequence_number & 0x00FF0000) >> 8) | ((tmp_session_sequence_number & 0x0000FF00) << 8) | ((tmp_session_sequence_number & 0x000000FF) << 24); } } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)) { if (!ipmipower_check_checksum (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_authentication_code (ip, pkt, recv_buf, recv_len)) { rv = 0; goto cleanup; } if (!ipmipower_check_outbound_sequence_number (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_session_id (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_network_function (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_command (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_requester_sequence_number (ip, pkt)) { if (pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS) goto close_session_workaround; rv = 0; goto cleanup; } /* If everything else is correct besides completion code, packet * returned an error. */ if (!ipmipower_check_completion_code (ip, pkt)) { if (pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS) goto close_session_workaround; ipmipower_output (ipmipower_packet_errmsg (ip, pkt), ip->ic->hostname, ip->extra_arg); ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } goto cleanup; } /* If packet is no good though, ignore it, treat it like a * checksum error. Note, you must check after checking * completion code. */ if (!ipmipower_check_packet (ip, pkt)) { rv = 0; goto cleanup; } } else if (IPMIPOWER_PACKET_TYPE_IPMI_2_0_SETUP_RS (pkt)) { if (!ipmipower_check_payload_type (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_message_tag (ip, pkt)) { rv = 0; goto cleanup; } /* I don't think there is a guarantee the data (authentication * keys, session id's, etc.) in the RAKP response will be valid * if there is a status code error. So we check this status * code first, then the other stuff afterwards. */ if (!ipmipower_check_rmcpplus_status_code (ip, pkt)) { ipmipower_output (ipmipower_packet_errmsg (ip, pkt), ip->ic->hostname, ip->extra_arg); ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } goto cleanup; } if (!ipmipower_check_session_id (ip, pkt)) { rv = 0; goto cleanup; } if (pkt == IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE) { if (!ipmipower_check_open_session_response_privilege (ip, pkt)) { ipmipower_output (IPMIPOWER_MSG_TYPE_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED, ip->ic->hostname, ip->extra_arg); goto cleanup; } } else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2) { if (!ipmipower_check_rakp_2_key_exchange_authentication_code (ip, pkt)) { /* IPMI Compliance Issue * * On some systems, password could be correct, but * privilege is too high. The error is b/c the * privilege error is not handled properly in the open * session stage (i.e. they tell me I can authenticate * at a high privilege level, that in reality is not * allowed). Dunno how to deal with this. */ ipmipower_output (IPMIPOWER_MSG_TYPE_PASSWORD_INVALID, ip->ic->hostname, ip->extra_arg); goto cleanup; } } else if (pkt == IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4) { if (!ipmipower_check_rakp_4_integrity_check_value (ip, pkt)) { ipmipower_output (IPMIPOWER_MSG_TYPE_K_G_INVALID, ip->ic->hostname, ip->extra_arg); goto cleanup; } } /* If packet is no good though, ignore it, treat it like a * checksum error. Note, you must check after checking * completion code. */ if (!ipmipower_check_packet (ip, pkt)) { rv = 0; goto cleanup; } } else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && IPMIPOWER_PACKET_TYPE_IPMI_SESSION_PACKET_RS (pkt)) { if (!ipmipower_check_payload_type (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_payload_pad (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_integrity_pad (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_checksum (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_authentication_code (ip, pkt, recv_buf, recv_len)) { rv = 0; goto cleanup; } if (!ipmipower_check_outbound_sequence_number (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_session_id (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_network_function (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_command (ip, pkt)) { rv = 0; goto cleanup; } if (!ipmipower_check_requester_sequence_number (ip, pkt)) { if (pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS) goto close_session_workaround; rv = 0; goto cleanup; } /* If everything else is correct besides completion code, packet * returned an error. */ if (!ipmipower_check_completion_code (ip, pkt)) { if (pkt == IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS) goto close_session_workaround; ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } goto cleanup; } /* If packet is no good though, ignore it, treat it like a * checksum error. Note, you must check after checking * completion code. */ if (!ipmipower_check_packet (ip, pkt)) { rv = 0; goto cleanup; } } /* Yipee everything passed, the packet is good. Continue */ /* achu: If this is the close session response and the packet is * mostly legit, go ahead and just accept the packet. We'll * close the session anyways. */ close_session_workaround: ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } rv = 1; cleanup: /* Clear out data */ if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) { secure_memset (recv_buf, '\0', IPMIPOWER_PACKET_BUFLEN); if (fiid_obj_clear (ip->obj_lan_session_hdr_rs) < 0) { IPMIPOWER_ERROR (("fiid_obj_clear: %s", fiid_obj_errormsg (ip->obj_lan_session_hdr_rs))); exit (EXIT_FAILURE); } } return (rv); } /* _has_timed_out * - Check if command timed out * Returns 1 if timed out, 0 if not */ static int _has_timed_out (ipmipower_powercmd_t ip) { struct timeval cur_time, result; unsigned int session_timeout; assert (ip); /* If we haven't started yet */ if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_START) return (0); if (gettimeofday (&cur_time, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } timeval_sub (&cur_time, &(ip->time_begin), &result); timeval_millisecond_calc (&result, &session_timeout); /* Must use >=, otherwise we could potentially spin */ if (session_timeout >= cmd_args.common_args.session_timeout) { /* Don't bother outputting timeout if we have finished the power control operation */ if (ip->protocol_state != IPMIPOWER_PROTOCOL_STATE_CLOSE_SESSION_SENT) { /* Special cases */ if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_AUTHENTICATION_CAPABILITIES_SENT) ipmipower_output (IPMIPOWER_MSG_TYPE_CONNECTION_TIMEOUT, ip->ic->hostname, ip->extra_arg); else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT) ipmipower_output (IPMIPOWER_MSG_TYPE_PASSWORD_VERIFICATION_TIMEOUT, ip->ic->hostname, ip->extra_arg); else ipmipower_output (IPMIPOWER_MSG_TYPE_SESSION_TIMEOUT, ip->ic->hostname, ip->extra_arg); } return (1); } return (0); } /* _retry_packets * - Check if we should retransmit and retransmit if necessary * Returns 1 if we sent a packet, 0 if not */ static int _retry_packets (ipmipower_powercmd_t ip) { struct timeval cur_time, end_time, result; unsigned int time_since_last_ipmi_send; unsigned int time_left; unsigned int retransmission_timeout; assert (ip); /* Don't retransmit if any of the following are true */ if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_START) /* we haven't started yet */ return (0); /* Did we timeout on this packet? */ if ((ip->wait_until_on_state && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) || (ip->wait_until_off_state && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF)) retransmission_timeout = cmd_args.retransmission_wait_timeout * (1 + (ip->retransmission_count/cmd_args.retransmission_backoff_count)); else retransmission_timeout = cmd_args.common_args.retransmission_timeout * (1 + (ip->retransmission_count/cmd_args.retransmission_backoff_count)); if (gettimeofday (&cur_time, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } timeval_sub (&cur_time, &(ip->ic->last_ipmi_send), &result); timeval_millisecond_calc (&result, &time_since_last_ipmi_send); if (time_since_last_ipmi_send < retransmission_timeout) return (0); /* Do we have enough time to retransmit? */ timeval_add_ms (&cur_time, cmd_args.common_args.session_timeout, &end_time); timeval_sub (&end_time, &cur_time, &result); timeval_millisecond_calc (&result, &time_left); if (time_left < retransmission_timeout) return (0); ip->retransmission_count++; IPMIPOWER_DEBUG (("host = %s; p = %d; Sending retry, retry count=%d", ip->ic->hostname, ip->protocol_state, ip->retransmission_count)); switch (ip->protocol_state) { case IPMIPOWER_PROTOCOL_STATE_AUTHENTICATION_CAPABILITIES_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ); break; case IPMIPOWER_PROTOCOL_STATE_GET_SESSION_CHALLENGE_SENT: { /* IPMI Workaround (achu) * * Discovered on Intel Tiger4 (SR870BN4) * * If the reply from a previous Get Session Challenge request is * lost on the network, the following retransmission will make * the BMC confused and it will not respond to future packets. * * The problem seems to exist only when the retransmitted packet * is transmitted from the same source port. Therefore, the fix * is to send the retransmission from a different source port. * So we'll create a new socket, re-bind to an ephemereal port * (guaranteeing us a brand new port), and store this new * socket. * * In the event we need to resend this packet multiple times, we * do not want the chance that old ports will be used again. We * store the old file descriptrs (which are bound to the old * ports) on a list, and close all of them after we have gotten * past the Get Session Challenge phase of the protocol. */ int new_fd, *old_fd; if ((new_fd = socket (ip->ic->srcaddr->sa_family, SOCK_DGRAM, 0)) < 0) { if (errno != EMFILE) { IPMIPOWER_ERROR (("socket: %s", strerror (errno))); exit (EXIT_FAILURE); } ipmipower_output (IPMIPOWER_MSG_TYPE_RESOURCES, ip->ic->hostname, ip->extra_arg); return (-1); } if (bind (new_fd, ip->ic->srcaddr, ip->ic->srcaddrlen) < 0) { IPMIPOWER_ERROR (("bind: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!(old_fd = (int *)malloc (sizeof (int)))) { IPMIPOWER_ERROR (("malloc: %s", strerror (errno))); exit (EXIT_FAILURE); } *old_fd = ip->ic->ipmi_fd; list_push (ip->sockets_to_close, old_fd); ip->ic->ipmi_fd = new_fd; _send_packet (ip, IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ); } break; case IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ); break; case IPMIPOWER_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST); break; case IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1); break; case IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3); break; case IPMIPOWER_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ); break; case IPMIPOWER_PROTOCOL_STATE_GET_CHASSIS_STATUS_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ); break; case IPMIPOWER_PROTOCOL_STATE_CHASSIS_CONTROL_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ); break; case IPMIPOWER_PROTOCOL_STATE_CHASSIS_IDENTIFY_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ); break; case IPMIPOWER_PROTOCOL_STATE_C410X_GET_SENSOR_READING_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ); break; case IPMIPOWER_PROTOCOL_STATE_C410X_SLOT_POWER_CONTROL_SENT: _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ); break; case IPMIPOWER_PROTOCOL_STATE_CLOSE_SESSION_SENT: { /* * It's pointless to retransmit a close-session. * * 1) The power control operation has already completed. * * 2) There is no guarantee the remote BMC will respond. If the * previous close session response was dropped by the network, * then the session has already been closed by the BMC. Any * retransmission will send a session id that is unknown to the * BMC, and they will either respond with an error or ignore the * packet. * * _send_packet(ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); */ ip->close_timeout++; return (0); } break; default: IPMIPOWER_ERROR (("_retry_packets: invalid protocol state: %d\n", ip->protocol_state)); exit (EXIT_FAILURE); } return (1); } /* _check_ipmi_1_5_authentication_capabilities * * Check the contents of a ipmi 1.5 or 2.0 authentication capabilities * response. * * Returns 0 if authentication passed and the protocol should continue * Returns -1 on ipmi protocol error or discovery error */ static int _check_ipmi_1_5_authentication_capabilities (ipmipower_powercmd_t ip) { uint8_t authentication_status_per_message_authentication; uint64_t val; int ret; assert (ip); if (FIID_OBJ_GET (ip->obj_authentication_capabilities_rs, "authentication_status.per_message_authentication", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'authentication_status.per_message_authentication': %s", fiid_obj_errormsg (ip->obj_authentication_capabilities_rs))); exit (EXIT_FAILURE); } authentication_status_per_message_authentication = val; /* IPMI Workaround (achu) * * Discovered on an ASUS P5M2 motherboard. * * The ASUS motherboard reports incorrect settings of anonymous * vs. null vs non-null username capabilities. The workaround is to * skip these checks. */ if (!(cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES)) { if ((ret = ipmi_check_authentication_capabilities_username (cmd_args.common_args.username, cmd_args.common_args.password, ip->obj_authentication_capabilities_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_authentication_capabilities_username: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_USERNAME_INVALID, ip->ic->hostname, ip->extra_arg); return (-1); } } /* IPMI Workaround (achu) * * Not discovered yet, assume some motherboard will have it some * day. * * Authentication capabilities flags are not listed properly in the * response. The workaround is to skip these checks. */ if (!(cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES)) { if ((ret = ipmi_check_authentication_capabilities_authentication_type (cmd_args.common_args.authentication_type, ip->obj_authentication_capabilities_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_authentication_capabilities_authentication_type: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_AUTHENTICATION_TYPE_UNAVAILABLE, ip->ic->hostname, ip->extra_arg); return (-1); } } /* IPMI Workaround (achu) * * Discovered on IBM eServer 325 * * The remote BMC ignores if permsg authentiction is enabled * or disabled. So we need to force it no matter what. */ if (!(cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION)) { if (!authentication_status_per_message_authentication) ip->permsgauth_enabled = 1; else ip->permsgauth_enabled = 0; } else ip->permsgauth_enabled = 1; return (0); } /* _check_ipmi_2_0_authentication_capabilities * * Check the contents of a ipmi 2.0 authentication capabilities response. * * Returns 0 if authentication passed * Returns -1 on ipmi protocol error */ static int _check_ipmi_2_0_authentication_capabilities (ipmipower_powercmd_t ip) { void *tmp_k_g_ptr = NULL; int ret; assert (ip); if ((ret = ipmi_check_authentication_capabilities_ipmi_2_0 (ip->obj_authentication_capabilities_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_authentication_capabilities_ipmi_2_0: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_IPMI_2_0_UNAVAILABLE, ip->ic->hostname, ip->extra_arg); return (-1); } /* IPMI Workaround (achu) * * Discovered on an ASUS P5M2 motherboard. * * The ASUS motherboard reports incorrect settings of anonymous * vs. null vs non-null username capabilities. The workaround is to * skip these checks. * * Discovered on an ASUS P5MT-R motherboard * * K_g status is reported incorrectly too. Again, skip the checks. */ if (!(cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES)) { if ((ret = ipmi_check_authentication_capabilities_username (cmd_args.common_args.username, cmd_args.common_args.password, ip->obj_authentication_capabilities_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_authentication_capabilities_username: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_USERNAME_INVALID, ip->ic->hostname, ip->extra_arg); return (-1); } if (cmd_args.common_args.k_g_len) tmp_k_g_ptr = cmd_args.common_args.k_g; if ((ret = ipmi_check_authentication_capabilities_k_g (tmp_k_g_ptr, ip->obj_authentication_capabilities_rs)) < 0) { IPMIPOWER_ERROR (("ipmi_check_authentication_capabilities_k_g: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!ret) { ipmipower_output (IPMIPOWER_MSG_TYPE_K_G_INVALID, ip->ic->hostname, ip->extra_arg); return (-1); } } return (0); } /* _check_activate_session_authentication_type * * Check if the activate session response has the appropriate * authentication type. * * Returns 0 if yes * Returns -1 if no, which is an ipmi protocol error */ static int _check_activate_session_authentication_type (ipmipower_powercmd_t ip) { uint8_t authentication_type; uint64_t val; assert (ip); assert (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT); if (FIID_OBJ_GET (ip->obj_activate_session_rs, "authentication_type", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'authentication_type': %s", fiid_obj_errormsg (ip->obj_activate_session_rs))); exit (EXIT_FAILURE); } authentication_type = val; if (cmd_args.common_args.workaround_flags_outofband & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION) return (0); /* IPMI Workaround (achu) * * Discovered on Supermicro H8QME with SIMSO daughter card. * * (Note: This could work for "IBM eServer 325" per msg auth * problem. But I don't have hardware to test it :-() * * The remote BMC ignores if permsg authentiction is disabled. * Handle it appropriately by just not doing permsg authentication. */ if (!ip->permsgauth_enabled) { if (authentication_type != IPMI_AUTHENTICATION_TYPE_NONE) { IPMIPOWER_DEBUG (("host = %s; p = %d; not none authentcation", ip->ic->hostname, ip->protocol_state)); ip->permsgauth_enabled = 1; } } if (ip->permsgauth_enabled) { if (authentication_type != cmd_args.common_args.authentication_type) { IPMIPOWER_DEBUG (("host = %s; p = %d; authentication_type mismatch", ip->ic->hostname, ip->protocol_state)); ipmipower_output (IPMIPOWER_MSG_TYPE_BMC_ERROR, ip->ic->hostname, ip->extra_arg); ip->retransmission_count = 0; /* important to reset */ if (gettimeofday (&ip->ic->last_ipmi_recv, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } return (-1); } } return (0); } /* _calculate_cipher_keys * * Calculate cipher keys for the remaining IPMI 2.0 protocol * * Returns 0 on success * Returns -1 on ipmi protocol error */ static int _calculate_cipher_keys (ipmipower_powercmd_t ip) { uint8_t managed_system_random_number[IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH]; int managed_system_random_number_len; char *username; char username_buf[IPMI_MAX_USER_NAME_LENGTH+1]; unsigned int username_len; char *password; unsigned int password_len; void *k_g; assert (ip); assert (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT); /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * The username must be padded despite explicitly not being * allowed. "No Null characters (00h) are allowed in the name". * Table 13-11 in the IPMI 2.0 spec. */ if (cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) { memset (username_buf, '\0', IPMI_MAX_USER_NAME_LENGTH+1); if (cmd_args.common_args.username) strcpy (username_buf, cmd_args.common_args.username); username = username_buf; username_len = IPMI_MAX_USER_NAME_LENGTH; } else { username = cmd_args.common_args.username; username_len = (username) ? strlen (username) : 0; } password = cmd_args.common_args.password; password_len = (password) ? strlen (password) : 0; /* IPMI Workaround (achu) * * Discovered on SE7520AF2 with Intel Server Management Module * (Professional Edition) * * When the authentication algorithm is HMAC-MD5-128 and the * password is greater than 16 bytes, the Intel BMC truncates the * password to 16 bytes when generating keys, hashes, etc. So we * have to do the same when generating keys, hashes, etc. */ if ((cmd_args.common_args.workaround_flags_outofband_2_0 & IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION) && ip->authentication_algorithm == IPMI_AUTHENTICATION_ALGORITHM_RAKP_HMAC_MD5 && password_len > IPMI_1_5_MAX_PASSWORD_LENGTH) password_len = IPMI_1_5_MAX_PASSWORD_LENGTH; if (cmd_args.common_args.k_g_len) k_g = cmd_args.common_args.k_g; else k_g = NULL; if ((managed_system_random_number_len = fiid_obj_get_data (ip->obj_rakp_message_2_rs, "managed_system_random_number", managed_system_random_number, IPMI_MANAGED_SYSTEM_RANDOM_NUMBER_LENGTH)) < 0) { IPMIPOWER_ERROR (("fiid_obj_get_data: 'managed_system_random_number': %s", fiid_obj_errormsg (ip->obj_rakp_message_2_rs))); exit (EXIT_FAILURE); } if (ipmi_calculate_rmcpplus_session_keys (ip->authentication_algorithm, ip->integrity_algorithm, ip->confidentiality_algorithm, password, password_len, k_g, (k_g) ? cmd_args.common_args.k_g_len : 0, ip->remote_console_random_number, IPMI_REMOTE_CONSOLE_RANDOM_NUMBER_LENGTH, managed_system_random_number, managed_system_random_number_len, ip->name_only_lookup, cmd_args.common_args.privilege_level, username, username_len, &(ip->sik_key_ptr), &(ip->sik_key_len), &(ip->integrity_key_ptr), &(ip->integrity_key_len), &(ip->confidentiality_key_ptr), &(ip->confidentiality_key_len)) < 0) { IPMIPOWER_ERROR (("_calculate_cipher_keys(%s:%d): ipmi_calculate_rmcpplus_session_keys: %s", ip->ic->hostname, ip->protocol_state, strerror (errno))); exit (EXIT_FAILURE); } return (0); } /* _process_ipmi_packets * - Main function that handles packet sends/receives for * the power control protocol * - Returns timeout length, or < 0 if command completed and should * be removed from pending. */ static int _process_ipmi_packets (ipmipower_powercmd_t ip) { struct timeval cur_time, end_time, result; unsigned int timeout; uint64_t val; int rv; assert (ip); assert (IPMIPOWER_PROTOCOL_STATE_VALID (ip->protocol_state)); assert (IPMIPOWER_OEM_POWER_TYPE_VALID (cmd_args.oem_power_type)); /* if timeout, give up */ if (_has_timed_out (ip)) return (-1); /* retransmit? */ if ((rv = _retry_packets (ip))) { if (rv < 0) return (-1); goto done; } if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_START) { /* Don't execute if fanout turned on and we're in the middle of too * many power commands. */ if (cmd_args.common_args.fanout && (executing_count >= cmd_args.common_args.fanout)) return (cmd_args.common_args.session_timeout); _send_packet (ip, IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RQ); if (gettimeofday (&(ip->time_begin), NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } executing_count++; } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_AUTHENTICATION_CAPABILITIES_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_AUTHENTICATION_CAPABILITIES_RS)) != 1) { if (rv < 0) return (-1); goto done; } if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) { if (_check_ipmi_2_0_authentication_capabilities (ip) < 0) return (-1); _send_packet (ip, IPMIPOWER_PACKET_TYPE_OPEN_SESSION_REQUEST); } else { if (_check_ipmi_1_5_authentication_capabilities (ip) < 0) return (-1); _send_packet (ip, IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RQ); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_GET_SESSION_CHALLENGE_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_GET_SESSION_CHALLENGE_RS)) != 1) { if (rv < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); goto done; } _send_packet (ip, IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RQ); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_ACTIVATE_SESSION_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_ACTIVATE_SESSION_RS)) != 1) { if (rv < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); goto done; } if (_check_activate_session_authentication_type (ip) < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); _send_packet (ip, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_OPEN_SESSION_REQUEST_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_OPEN_SESSION_RESPONSE)) != 1) { if (rv < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); goto done; } _send_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_1); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_1_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_2)) != 1) { if (rv < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); goto done; } if (_calculate_cipher_keys (ip) < 0) return (-1); _send_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_3); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_RAKP_MESSAGE_3_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_RAKP_MESSAGE_4)) != 1) { if (rv < 0) /* XXX Session is not up, is it ok to quit here? Or * should we timeout?? */ return (-1); goto done; } _send_packet (ip, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RQ); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_SET_SESSION_PRIVILEGE_LEVEL_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_SET_SESSION_PRIVILEGE_LEVEL_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_NONE) { if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_STATUS || ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_STATUS || (cmd_args.on_if_off && (ip->cmd == IPMIPOWER_POWER_CMD_POWER_CYCLE || ip->cmd == IPMIPOWER_POWER_CMD_POWER_RESET))) _send_packet (ip, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ); else if (ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_ON || ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_OFF) _send_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RQ); else /* on, off, cycle, reset, pulse diag interupt, soft shutdown */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ); } else /* cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X */ { assert (ip->cmd == IPMIPOWER_POWER_CMD_POWER_STATUS || ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF || ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON); _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_GET_CHASSIS_STATUS_SENT) { uint8_t power_state; if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } if (FIID_OBJ_GET (ip->obj_get_chassis_status_rs, "current_power_state.power_is_on", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'current_power_state.power_is_on': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } power_state = val; if (cmd_args.wait_until_on && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON && ip->wait_until_on_state) { if (power_state == IPMI_SYSTEM_POWER_IS_ON) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); ip->wait_until_on_state = 0; _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (cmd_args.wait_until_off && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF && ip->wait_until_off_state) { if (power_state == IPMI_SYSTEM_POWER_IS_OFF) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); ip->wait_until_off_state = 0; _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_STATUS) { ipmipower_output ((power_state == IPMI_SYSTEM_POWER_IS_ON) ? IPMIPOWER_MSG_TYPE_ON : IPMIPOWER_MSG_TYPE_OFF, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else if (cmd_args.on_if_off && (ip->cmd == IPMIPOWER_POWER_CMD_POWER_CYCLE || ip->cmd == IPMIPOWER_POWER_CMD_POWER_RESET)) { if (!power_state) { /* This is now a power-on operation */ ip->cmd = IPMIPOWER_POWER_CMD_POWER_ON; } _send_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RQ); } else if (ip->cmd == IPMIPOWER_POWER_CMD_IDENTIFY_STATUS) { uint8_t identify_status_supported; if (FIID_OBJ_GET (ip->obj_get_chassis_status_rs, "misc_chassis_state.chassis_identify_command_and_state_info_supported", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'misc_chassis_state.chassis_identify_command_and_state_info_supported': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } identify_status_supported = val; if (identify_status_supported) { uint8_t identify_status; if (FIID_OBJ_GET (ip->obj_get_chassis_status_rs, "misc_chassis_state.chassis_identify_state", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'misc_chassis_state.chassis_identify_state': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } identify_status = val; if (identify_status == IPMI_CHASSIS_IDENTIFY_STATE_OFF) ipmipower_output (IPMIPOWER_MSG_TYPE_OFF, ip->ic->hostname, ip->extra_arg); else if (identify_status == IPMI_CHASSIS_IDENTIFY_STATE_TEMPORARY_ON || identify_status == IPMI_CHASSIS_IDENTIFY_STATE_INDEFINITE_ON) ipmipower_output (IPMIPOWER_MSG_TYPE_ON, ip->ic->hostname, ip->extra_arg); else ipmipower_output (IPMIPOWER_MSG_TYPE_UNKNOWN, ip->ic->hostname, ip->extra_arg); } else ipmipower_output (IPMIPOWER_MSG_TYPE_UNKNOWN, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else { IPMIPOWER_ERROR (("_process_ipmi_packets: invalid command state: %d", ip->cmd)); exit (EXIT_FAILURE); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_CHASSIS_CONTROL_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_CONTROL_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } if ((cmd_args.wait_until_on && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) || (cmd_args.wait_until_off && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF)) { if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) ip->wait_until_on_state++; else ip->wait_until_off_state++; _send_packet (ip, IPMIPOWER_PACKET_TYPE_GET_CHASSIS_STATUS_RQ); } else { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); /* IPMI Workaround (achu) * * Discovered on Intel Tiger4 (SR870BN4) * * There is no response from the IPMI close command if the * IPMIPOWER_POWER_CMD_POWER_RESET power control command is * successful. So just skip the close session. */ if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_RESET) goto finish_up; else _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_CHASSIS_IDENTIFY_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_CHASSIS_IDENTIFY_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_C410X_GET_SENSOR_READING_SENT) { uint8_t sensor_reading; uint8_t reading_state; uint8_t sensor_scanning; int slot_power_on_flag; if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } if (FIID_OBJ_GET (ip->obj_c410x_get_sensor_reading_rs, "sensor_reading", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'sensor_reading': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } sensor_reading = val; if (FIID_OBJ_GET (ip->obj_c410x_get_sensor_reading_rs, "reading_state", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'reading_state': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } reading_state = val; if (FIID_OBJ_GET (ip->obj_c410x_get_sensor_reading_rs, "sensor_scanning", &val) < 0) { IPMIPOWER_ERROR (("FIID_OBJ_GET: 'sensor_scanning': %s", fiid_obj_errormsg (ip->obj_get_chassis_status_rs))); exit (EXIT_FAILURE); } sensor_scanning = val; if (reading_state == IPMI_SENSOR_READING_STATE_UNAVAILABLE || sensor_scanning == IPMI_SENSOR_SCANNING_ON_THIS_SENSOR_DISABLE) { ipmipower_output (IPMIPOWER_MSG_TYPE_BMC_ERROR, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } /* If non-zero, then it's on */ /* achu: Sometimes "off" is 2.0 Watts, which equates to a sensor reading of 1 */ if (sensor_reading > 1) slot_power_on_flag = 1; else slot_power_on_flag = 0; if (cmd_args.wait_until_on && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON && ip->wait_until_on_state) { if (slot_power_on_flag) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); ip->wait_until_on_state = 0; _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (cmd_args.wait_until_off && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF && ip->wait_until_off_state) { if (!slot_power_on_flag) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); ip->wait_until_off_state = 0; _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_STATUS) { ipmipower_output ((slot_power_on_flag) ? IPMIPOWER_MSG_TYPE_ON : IPMIPOWER_MSG_TYPE_OFF, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) { if (slot_power_on_flag) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ); } else if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF) { if (!slot_power_on_flag) { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } else _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RQ); } else { IPMIPOWER_ERROR (("_process_ipmi_packets: invalid command state: %d", ip->cmd)); exit (EXIT_FAILURE); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_C410X_SLOT_POWER_CONTROL_SENT) { if ((rv = _recv_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_SLOT_POWER_CONTROL_RS)) != 1) { if (rv < 0) /* Session is up, so close it */ _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); goto done; } if ((cmd_args.wait_until_on && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) || (cmd_args.wait_until_off && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF)) { if (ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) ip->wait_until_on_state++; else ip->wait_until_off_state++; _send_packet (ip, IPMIPOWER_PACKET_TYPE_C410X_GET_SENSOR_READING_RQ); } else { ipmipower_output (IPMIPOWER_MSG_TYPE_OK, ip->ic->hostname, ip->extra_arg); _send_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RQ); } } else if (ip->protocol_state == IPMIPOWER_PROTOCOL_STATE_CLOSE_SESSION_SENT) { /* achu: Note that it's possible we're timing out too early and * the close session response will still arrive. It's no * matter. If we are in non-interactive mode, the file * descriptor will be closed and the packet lost. If we are in * interactive mode, the next power control command will call * 'ipmipower_connection_clear' and get rid of the packet if it * is sitting on a buf. */ if (ip->close_timeout) { IPMIPOWER_DEBUG (("host = %s; p = %d; close session timeout, skip retransmission", ip->ic->hostname, ip->protocol_state)); goto finish_up; } if (!_recv_packet (ip, IPMIPOWER_PACKET_TYPE_CLOSE_SESSION_RS)) goto done; /* Regardless of packet error or success, finish up */ finish_up: ip->protocol_state = IPMIPOWER_PROTOCOL_STATE_END; return (-1); /* don't goto done and calculate timeout */ } else { IPMIPOWER_ERROR (("_process_ipmi_packets: invalid state: %d", ip->protocol_state)); exit (EXIT_FAILURE); } done: if (gettimeofday (&cur_time, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } timeval_add_ms (&(ip->time_begin), cmd_args.common_args.session_timeout, &end_time); timeval_sub (&end_time, &cur_time, &result); timeval_millisecond_calc (&result, &timeout); /* shorter timeout b/c of retransmission timeout */ if ((ip->wait_until_on_state && ip->cmd == IPMIPOWER_POWER_CMD_POWER_ON) || (ip->wait_until_off_state && ip->cmd == IPMIPOWER_POWER_CMD_POWER_OFF)) { int retransmission_wait_timeout = cmd_args.retransmission_wait_timeout * (1 + (ip->retransmission_count/cmd_args.retransmission_backoff_count)); if (timeout > retransmission_wait_timeout) timeout = retransmission_wait_timeout; } else { int retransmission_timeout = cmd_args.common_args.retransmission_timeout * (1 + (ip->retransmission_count/cmd_args.retransmission_backoff_count)); if (timeout > retransmission_timeout) timeout = retransmission_timeout; } return (timeout); } int ipmipower_powercmd_process_pending (int *timeout) { ListIterator itr; ipmipower_powercmd_t ip; int min_timeout = cmd_args.common_args.session_timeout; int num_pending; assert (pending); /* did not run ipmipower_powercmd_setup() */ assert (timeout); /* if there are no pending jobs, don't edit the timeout */ if (list_is_empty (pending)) return (0); /* If we have a fanout, powercmds should be executed "in order" on * this list. So no need to iterate through this list twice. */ if (!(itr = list_iterator_create (pending))) { IPMIPOWER_ERROR (("list_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((ip = (ipmipower_powercmd_t)list_next (itr))) { int tmp_timeout = -1; if ((tmp_timeout = _process_ipmi_packets (ip)) < 0) { if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_C410X) { if (ip->next) { if (!list_append (add_to_pending, ip->next)) { IPMIPOWER_ERROR (("list_append: %s", strerror (errno))); exit (EXIT_FAILURE); } ip->next = NULL; } } if (!list_delete (itr)) { IPMIPOWER_ERROR (("list_delete")); exit (EXIT_FAILURE); } executing_count--; continue; } if (tmp_timeout < min_timeout) min_timeout = tmp_timeout; } list_iterator_destroy (itr); if (list_count (add_to_pending) > 0) { ListIterator addtoitr; if (!(addtoitr = list_iterator_create (add_to_pending))) { IPMIPOWER_ERROR (("list_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((ip = list_next (addtoitr))) { ipmipower_connection_clear (ip->ic); if (!list_append (pending, ip)) { IPMIPOWER_ERROR (("list_append: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!list_delete (addtoitr)) { IPMIPOWER_ERROR (("list_delete")); exit (EXIT_FAILURE); } } list_iterator_destroy (addtoitr); /* If by chance all commands are going to the same host, then * the next powercmd will start after a default timeout. We * don't want that. We'll shorten the timeout to a * retransmission timeout so it appears more normal. */ if (cmd_args.common_args.retransmission_timeout < min_timeout) min_timeout = cmd_args.common_args.retransmission_timeout; } if (!(num_pending = list_count (pending))) ipmipower_output_finish (); /* If the last pending power control command finished, the timeout * is 0 to get the primary poll loop to "re-init" at the start of * the loop. */ if (num_pending) *timeout = min_timeout; else *timeout = 0; return (num_pending); } freeipmi-1.6.4/ipmipower/ipmipower_powercmd.h0000644002055400205540000000425113527331636021364 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_powercmd.h,v 1.17 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_POWERCMD_H #define IPMIPOWER_POWERCMD_H #include "ipmipower.h" void ipmipower_powercmd_setup (); void ipmipower_powercmd_cleanup (); void ipmipower_powercmd_queue (ipmipower_power_cmd_t cmd, struct ipmipower_connection *ic, const char *extra_arg); /* ipmipower_powercmd_pending * - Determines if any commands are still pending * Returns 1 if commands are still being executed, 0 if not */ int ipmipower_powercmd_pending (); /* ipmipower_powercmd_process_pending * - Process remaining commands still in the queue * - Sets timeout to min timeout of all pending requests * - Does not set timeout if no pending requests exist * Returns number of pending requests, 0 if none */ int ipmipower_powercmd_process_pending (int *timeout); #endif /* IPMIPOWER_POWERCMD_H */ freeipmi-1.6.4/ipmipower/ipmipower_prompt.c0000644002055400205540000015373713527331636021076 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_prompt.c,v 1.121 2010-08-06 18:38:37 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include "ipmipower_prompt.h" #include "ipmipower_error.h" #include "ipmipower_connection.h" #include "ipmipower_oem.h" #include "ipmipower_ping.h" #include "ipmipower_powercmd.h" #include "ipmipower_output.h" #include "ipmipower_util.h" #include "argv.h" #include "freeipmi-portability.h" #include "cbuf.h" #include "fi_hostlist.h" #include "pstdout.h" #include "tool-cmdline-common.h" #include "tool-util-common.h" extern cbuf_t ttyout; extern cbuf_t ttyin; extern struct ipmipower_arguments cmd_args; extern struct ipmipower_connection *ics; extern unsigned int ics_len; extern struct oem_power_type_data *oem_power_type_data; extern unsigned int output_counts[IPMIPOWER_MSG_TYPE_NUM_ENTRIES]; /* eliminate * * Note: only for non-interactive mode on the command line. Won't be * anywhere in this file. */ static void _cmd_driver_type (char **argv) { assert (argv); if (argv[1]) { int tmp; if ((tmp = parse_outofband_driver_type (argv[1])) < 0) ipmipower_cbuf_printf (ttyout, "invalid driver type '%s' specified\n", argv[1]); else { cmd_args.common_args.driver_type = tmp; ipmipower_cbuf_printf (ttyout, "driver type is now %s\n", argv[1]); } } else ipmipower_cbuf_printf (ttyout, "driver_type must be specified: %s, %s\n", IPMI_PARSE_DEVICE_LAN_STR, IPMI_PARSE_DEVICE_LAN_2_0_STR); } static void _cmd_hostname_clear (void) { free (cmd_args.common_args.hostname); cmd_args.common_args.hostname = NULL; ipmipower_connection_array_destroy (ics, ics_len); ics = NULL; ics_len = 0; } static void _cmd_hostname (char **argv) { assert (argv); if (!argv[1]) { _cmd_hostname_clear (); ipmipower_cbuf_printf (ttyout, "hostname(s) unconfigured\n"); } else { struct ipmipower_connection *icsPtr; unsigned int len = 0; if (!(icsPtr = ipmipower_connection_array_create (argv[1], &len))) { /* dump error outputs here, most notably invalid hostname output */ if (cbuf_read_to_fd (ttyout, STDOUT_FILENO, -1) > 0) return; else ipmipower_cbuf_printf (ttyout, "ipmipower_connection_array_create: %s\n", strerror (errno)); return; } _cmd_hostname_clear (); ics = icsPtr; ics_len = len; if (!(cmd_args.common_args.hostname = strdup (argv[1]))) { IPMIPOWER_ERROR (("strdup: %s", strerror(errno))); exit (EXIT_FAILURE); } ipmipower_ping_force_discovery_sweep (); ipmipower_cbuf_printf (ttyout, "hostname: %s\n", cmd_args.common_args.hostname); } } static void _cmd_username (char **argv) { assert (argv); if (!argv[1] || (argv[1] && strlen (argv[1]) <= IPMI_MAX_USER_NAME_LENGTH)) { free (cmd_args.common_args.username); cmd_args.common_args.username = NULL; if (argv[1]) { if (!(cmd_args.common_args.username = strdup (argv[1]))) { IPMIPOWER_ERROR (("strdup: %s", strerror(errno))); exit (EXIT_FAILURE); } } ipmipower_cbuf_printf (ttyout, "username: %s\n", (cmd_args.common_args.username) ? cmd_args.common_args.username : "NULL"); } else ipmipower_cbuf_printf (ttyout, "username invalid length\n"); } static void _cmd_password (char **argv) { assert (argv); if (argv[1] && cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_NONE) ipmipower_cbuf_printf (ttyout, "password cannot be set for authentication_type '%s'\n", IPMI_PARSE_AUTHENTICATION_TYPE_NONE_STR); else if (!argv[1] || (argv[1] && ((cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0 && strlen (argv[1]) <= IPMI_2_0_MAX_PASSWORD_LENGTH) || (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN && strlen (argv[1]) <= IPMI_1_5_MAX_PASSWORD_LENGTH)))) { free (cmd_args.common_args.password); cmd_args.common_args.password = NULL; if (argv[1]) { if (!(cmd_args.common_args.password = strdup (argv[1]))) { IPMIPOWER_ERROR (("strdup: %s", strerror(errno))); exit (EXIT_FAILURE); } } #ifdef NDEBUG ipmipower_cbuf_printf (ttyout, "password changed\n"); #else /* !NDEBUG */ ipmipower_cbuf_printf (ttyout, "password: %s\n", (cmd_args.common_args.password) ? cmd_args.common_args.password : "NULL"); #endif /* !NDEBUG */ } else ipmipower_cbuf_printf (ttyout, "password invalid length\n"); } static void _cmd_k_g (char **argv) { int rv = 0; #ifndef NDEBUG char buf[IPMI_MAX_K_G_LENGTH*2+3]; #endif /* !NDEBUG */ assert (argv); if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) ipmipower_cbuf_printf (ttyout, "k_g is only used for IPMI 2.0"); else { memset (cmd_args.common_args.k_g, '\0', IPMI_MAX_K_G_LENGTH + 1); if (argv[1]) rv = parse_kg (cmd_args.common_args.k_g, IPMI_MAX_K_G_LENGTH, argv[1]); if (rv < 0) ipmipower_cbuf_printf (ttyout, "k_g invalid\n"); else { cmd_args.common_args.k_g_len = rv; #ifdef NDEBUG ipmipower_cbuf_printf (ttyout, "k_g changed\n"); #else /* !NDEBUG */ ipmipower_cbuf_printf (ttyout, "k_g: %s\n", (cmd_args.common_args.k_g_len) ? format_kg (buf, IPMI_MAX_K_G_LENGTH*2+3, cmd_args.common_args.k_g) : "NULL"); #endif /* !NDEBUG */ } } } static void _cmd_authentication_type (char **argv) { assert (argv); if (argv[1]) { int tmp; if ((tmp = parse_authentication_type (argv[1])) < 0) ipmipower_cbuf_printf (ttyout, "%s invalid authentication_type\n", argv[1]); else { cmd_args.common_args.authentication_type = tmp; ipmipower_cbuf_printf (ttyout, "authentication type is now %s\n", argv[1]); } } else ipmipower_cbuf_printf (ttyout, "authentication_type must be specified: %s, %s, %s, %s\n", IPMI_PARSE_AUTHENTICATION_TYPE_NONE_STR, IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR, IPMI_PARSE_AUTHENTICATION_TYPE_MD2_STR, IPMI_PARSE_AUTHENTICATION_TYPE_MD5_STR); } static void _cmd_cipher_suite_id (char **argv) { assert (argv); if (argv[1]) { char *endptr; int tmp; errno = 0; tmp = strtol (argv[1], &endptr, 10); if (errno || endptr[0] != '\0' || tmp < IPMI_CIPHER_SUITE_ID_MIN || tmp > IPMI_CIPHER_SUITE_ID_MAX) ipmipower_cbuf_printf (ttyout, "%s invalid cipher suite id\n", argv[1]); else if (!IPMI_CIPHER_SUITE_ID_SUPPORTED (tmp)) ipmipower_cbuf_printf (ttyout, "%s unsupported cipher suite id\n", argv[1]); else { cmd_args.common_args.cipher_suite_id = tmp; ipmipower_cbuf_printf (ttyout, "cipher suite id is now %s\n", argv[1]); } } else ipmipower_cbuf_printf (ttyout, "cipher_suite_id must be specified: 0, 1, 2, 3, 6, 7, 8, 11, 12\n"); } static void _cmd_privilege_level (char **argv) { assert (argv); if (argv[1]) { int tmp; if ((tmp = parse_privilege_level (argv[1])) < 0) ipmipower_cbuf_printf (ttyout, "%s invalid privilege_level\n", argv[1]); else { cmd_args.common_args.authentication_type = tmp; ipmipower_cbuf_printf (ttyout, "privilege_level type is now %s\n", argv[1]); } } else ipmipower_cbuf_printf (ttyout, "privilege must be specified: %s, %s, %s\n", IPMI_PARSE_PRIVILEGE_LEVEL_USER_STR, IPMI_PARSE_PRIVILEGE_LEVEL_OPERATOR_STR, IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR); } static void _cmd_workaround_flags (char **argv) { assert (argv); if (argv[1]) { unsigned int outofband_flags, outofband_2_0_flags; if (parse_workaround_flags_tool (argv[1], &outofband_flags, &outofband_2_0_flags, NULL, NULL, NULL) < 0) ipmipower_cbuf_printf (ttyout, "%s invalid workaround flags specified\n", argv[1]); else { cmd_args.common_args.workaround_flags_outofband = outofband_flags; cmd_args.common_args.workaround_flags_outofband_2_0 = outofband_2_0_flags; ipmipower_cbuf_printf (ttyout, "workaround flags are now %s\n", argv[1]); } } else ipmipower_cbuf_printf (ttyout, "workaround_flags must be specified: %s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s,%s\n", IPMI_PARSE_WORKAROUND_FLAGS_NONE_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE_STR, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE_STR, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING_STR); } static void _cmd_power_all_nodes (ipmipower_power_cmd_t cmd) { struct ipmipower_connection_extra_arg *eanode; unsigned int nodes_queued = 0; int i; assert (IPMIPOWER_POWER_CMD_VALID (cmd)); memset (output_counts, '\0', sizeof (output_counts)); for (i = 0; i < ics_len; i++) { if (cmd_args.ping_interval && ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_UNDISCOVERED) ipmipower_output (IPMIPOWER_MSG_TYPE_NOTDISCOVERED, ics[i].hostname, NULL); else if (cmd_args.ping_interval && cmd_args.ping_packet_count && cmd_args.ping_percent && ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_BADCONNECTION) ipmipower_output (IPMIPOWER_MSG_TYPE_BADCONNECTION, ics[i].hostname, NULL); else { if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { eanode = ics[i].extra_args; while (eanode) { if (ipmipower_oem_power_cmd_check_extra_arg (eanode->extra_arg, NULL, 0) <= 0) ipmipower_output (IPMIPOWER_MSG_TYPE_INVALID_ARGUMENT_FOR_OEM_EXTENSION, ics[i].hostname, eanode->extra_arg); else { ipmipower_connection_clear (&ics[i]); ipmipower_powercmd_queue (cmd, &ics[i], eanode->extra_arg); nodes_queued++; } eanode = eanode->next; } } else { ipmipower_connection_clear (&ics[i]); ipmipower_powercmd_queue (cmd, &ics[i], NULL); nodes_queued++; } } } /* Special corner case when no nodes are discovered */ if (!nodes_queued) ipmipower_output_finish (); } static void _cmd_power_specific_nodes (char **argv, ipmipower_power_cmd_t cmd) { fi_hostlist_t h = NULL; fi_hostlist_iterator_t hitr = NULL; fi_hostlist_t h2 = NULL; fi_hostlist_iterator_t h2itr = NULL; char *hstr = NULL; char *h2str = NULL; assert (argv); assert (IPMIPOWER_POWER_CMD_VALID (cmd)); assert (IPMIPOWER_OEM_POWER_TYPE_VALID (cmd_args.oem_power_type)); if (!(h = fi_hostlist_create (argv[1]))) { ipmipower_cbuf_printf (ttyout, "invalid hostname(s) specified\n"); goto cleanup; } if (!(hitr = fi_hostlist_iterator_create (h))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } memset (output_counts, '\0', sizeof (output_counts)); while ((hstr = fi_hostlist_next (hitr))) { /* achu: The double fi_hostlist_create is to handle the corner case * of someone inputting. * * foohost[1-3]+[1-3] * * We need to double fi_hostlist to get all the hosts and extra * args. * * Under most scenarios, this is just inefficient code. But we * feel the performance hit isn't egregious. In addition, the * code logic is simpler to do it this way then have a whole * bunch of wacky if-check scenarios to make it more efficient. * We'll revisit as necessary in the future. */ if (!(h2 = fi_hostlist_create (hstr))) { ipmipower_cbuf_printf (ttyout, "invalid hostname(s) specified\n"); goto cleanup; } fi_hostlist_uniq (h2); if (!(h2itr = fi_hostlist_iterator_create (h2))) { IPMIPOWER_ERROR (("fi_hostlist_iterator_create: %s", strerror (errno))); exit (EXIT_FAILURE); } while ((h2str = fi_hostlist_next (h2itr))) { char *h2str_extra_arg = NULL; int i; if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { char *ptr; if ((ptr = strchr (h2str, '+'))) { *ptr = '\0'; ptr++; if (!(h2str_extra_arg = strdup (ptr))) { IPMIPOWER_ERROR (("strdup: %s", strerror(errno))); exit (EXIT_FAILURE); } } } i = ipmipower_connection_hostname_index (ics, ics_len, h2str); if (i < 0) ipmipower_output (IPMIPOWER_MSG_TYPE_UNCONFIGURED_HOSTNAME, h2str, NULL); else if (cmd_args.ping_interval && ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_UNDISCOVERED) ipmipower_output (IPMIPOWER_MSG_TYPE_NOTDISCOVERED, ics[i].hostname, NULL); else if (cmd_args.ping_interval && cmd_args.ping_packet_count && cmd_args.ping_percent && ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_BADCONNECTION) ipmipower_output (IPMIPOWER_MSG_TYPE_BADCONNECTION, ics[i].hostname, NULL); else { if (cmd_args.oem_power_type != IPMIPOWER_OEM_POWER_TYPE_NONE) { if (ipmipower_oem_power_cmd_check_extra_arg (h2str_extra_arg, NULL, 0) <= 0) { ipmipower_output (IPMIPOWER_MSG_TYPE_INVALID_ARGUMENT_FOR_OEM_EXTENSION, ics[i].hostname, h2str_extra_arg); goto end_inner_loop; } ipmipower_connection_clear (&ics[i]); ipmipower_powercmd_queue (cmd, &ics[i], h2str_extra_arg); } else { ipmipower_connection_clear (&ics[i]); ipmipower_powercmd_queue (cmd, &ics[i], NULL); } } end_inner_loop: free (h2str_extra_arg); free (h2str); h2str = NULL; } fi_hostlist_iterator_destroy (h2itr); fi_hostlist_destroy (h2); h2itr = NULL; h2 = NULL; } cleanup: fi_hostlist_iterator_destroy (h2itr); fi_hostlist_destroy (h2); fi_hostlist_iterator_destroy (hitr); fi_hostlist_destroy (h); free (hstr); free (h2str); } static void _cmd_power (char **argv, ipmipower_power_cmd_t cmd) { char errbuf[IPMIPOWER_OUTPUT_BUFLEN + 1]; assert (argv); assert (IPMIPOWER_POWER_CMD_VALID (cmd)); assert (IPMIPOWER_OEM_POWER_TYPE_VALID (cmd_args.oem_power_type)); if (!cmd_args.common_args.hostname) { ipmipower_cbuf_printf (ttyout, "no hostname(s) configured\n"); return; } memset (errbuf, '\0', IPMIPOWER_OUTPUT_BUFLEN + 1); if (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_NONE) { if (ipmipower_power_cmd_check_privilege (cmd, errbuf, IPMIPOWER_OUTPUT_BUFLEN) <= 0) { ipmipower_cbuf_printf (ttyout, "%s\n", errbuf); return; } } else { if (ipmipower_oem_power_cmd_check_support_and_privilege (cmd, errbuf, IPMIPOWER_OUTPUT_BUFLEN) <= 0) { ipmipower_cbuf_printf (ttyout, "%s\n", errbuf); return; } } /* all nodes */ if (!argv[1]) _cmd_power_all_nodes (cmd); else _cmd_power_specific_nodes (argv, cmd); } static void _cmd_help (void) { ipmipower_cbuf_printf (ttyout, "driver-type IPMIDRIVER - Specify the ipmi driver to use.\n" "hostname [IPMIHOST] - Specify a new set of hosts. No input to unconfigure all hosts.\n" "username [USERNAME] - Specify a new username. No input for null username.\n" "password [PASSWORD] - Specify a new password. No input for null password.\n" "k_g [K_G] - Specify a new K_g BMC Key. No input for null key.\n" "session-timeout MILLISECONDS - Specify a new session timeout length.\n" "retransmission-timeout MILLISECONDS - Specify a new retransmission timeout length.\n" "authentication-type AUTHENTICATION-TYPE - Specify the authentication type to use.\n" "cipher-suite-id CIPHER-SUITE-ID - Specify the cipher suite id to use.\n" "privilege-level PRIVILEGE-LEVEL - Specify the privilege level to use.\n" "workaround-flags WORKAROUNDS - Specify workaround flags.\n" "debug [on|off] - Toggle debug to stderr.\n"); #ifndef NDEBUG ipmipower_cbuf_printf (ttyout, "rmcpdump [on|off] - Toggle RMCP dump output.\n"); #endif /* NDEBUG */ ipmipower_cbuf_printf (ttyout, "on [IPMIHOST(s)] - Turn on all configured hosts or specified hosts.\n" "off [IPMIHOST(s)] - Turn off all configured hosts or specified hosts.\n" "cycle [IPMIHOST(s)] - Power cycle all configured hosts or specified hosts.\n" "reset [IPMIHOST(s)] - Reset all configured hosts or specified hosts.\n" "stat [IPMIHOST(s)] - Query power status for all configured hosts or specified hosts.\n" "pulse [IPMIHOST(s)] - Pulse diagnostic interrupt all configured hosts or specified hosts.\n" "soft [IPMIHOST(s)] - Initiate a soft-shutdown for all configured hosts or specified hosts.\n" "identify-on [IPMIHOST(s)] - Turn on physical system identification.\n" "identify-off [IPMIHOST(s)] - Turn off physical system identification.\n" "identify-status [IPMIHOST(s)] - Query physical system identification status.\n" "on-if-off [on|off] - Toggle on-if-off functionality.\n" "wait-until-on [on|off] - Toggle wait-until-on functionality.\n" "wait-until-off [on|off] - Toggle wait-until-off functionality.\n" "retransmission-wait-timeout MILLISECONDS - Specify a new retransmission timeout length.\n" "retransmission-backoff-count COUNT - Specify a new retransmission backoff count.\n" "ping-interval MILLISECONDS - Specify a new ping interval length.\n" "ping-timeout MILLISECONDS - Specify a new ping timeout length.\n" "ping-packet-count COUNT - Specify a new ping packet count.\n" "ping-percent COUNT - Specify a new ping percent number.\n" "ping-consec-count COUNT - Specify a new ping consec count.\n" "buffer-output [on|off] - Toggle buffer-output functionality.\n" "consolidate-output [on|off] - Toggle consolidate-output functionality.\n" "fanout COUNT - Specify a fanout.\n" "always-prefix [on|off] - Toggle always-prefix functionality.\n" "help - Output help menu.\n" "version - Output version.\n" "config - Output current configuration.\n" "quit - Quit program.\n"); } static void _cmd_version (void) { ipmipower_cbuf_printf (ttyout, "ipmipower %s\n", VERSION); } static void _workarounds_strcat (char *strbuf, unsigned int bitmask, unsigned int mask, const char *str, int *is_first) { assert (strbuf && str && is_first); if (bitmask & mask) { if ((*is_first)) strcat (strbuf, ","); strcat (strbuf, str); (*is_first)++; } } static void _cmd_debug (char **argv) { assert (argv); if (!argv[1]) cmd_args.common_args.debug = !cmd_args.common_args.debug; else { if (!strcasecmp (argv[1], "on")) cmd_args.common_args.debug = 1; else if (!strcasecmp (argv[1], "off")) cmd_args.common_args.debug = 0; else { ipmipower_cbuf_printf (ttyout, "invalid parameter\n"); return; } } ipmipower_cbuf_printf (ttyout, "debugging is now %s\n", (cmd_args.common_args.debug) ? "on" : "off"); } static void _cmd_config (void) { #ifndef NDEBUG char kgbuf[IPMI_MAX_K_G_LENGTH*2+3]; #endif /* NDEBUG */ char strbuf[IPMIPOWER_OUTPUT_BUFLEN]; char *str; int is_first = 0; str = ""; if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN) str = IPMI_PARSE_DEVICE_LAN_STR; else if (cmd_args.common_args.driver_type == IPMI_DEVICE_LAN_2_0) str = IPMI_PARSE_DEVICE_LAN_2_0_STR; ipmipower_cbuf_printf (ttyout, "Driver_Type: %s\n", str); if (cmd_args.common_args.hostname) { #ifndef NDEBUG int i; fi_hostlist_t discovered = NULL; fi_hostlist_t undiscovered = NULL; fi_hostlist_t badconnection = NULL; char buf[IPMIPOWER_OUTPUT_BUFLEN]; int rv; #endif /* NDEBUG */ ipmipower_cbuf_printf (ttyout, "Hostname: %s\n", cmd_args.common_args.hostname); #ifndef NDEBUG if (!(discovered = fi_hostlist_create (NULL))) goto cleanup; if (!(undiscovered = fi_hostlist_create (NULL))) goto cleanup; if (!(badconnection = fi_hostlist_create (NULL))) goto cleanup; for (i = 0; i < ics_len; i++) { if (ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_DISCOVERED) rv = fi_hostlist_push_host (discovered, ics[i].hostname); else if (ics[i].discover_state == IPMIPOWER_DISCOVER_STATE_UNDISCOVERED) rv = fi_hostlist_push_host (undiscovered, ics[i].hostname); else rv = fi_hostlist_push_host (badconnection, ics[i].hostname); if (!rv) goto cleanup; } fi_hostlist_sort (discovered); fi_hostlist_sort (undiscovered); fi_hostlist_sort (badconnection); if ((rv = fi_hostlist_ranged_string (discovered, IPMIPOWER_OUTPUT_BUFLEN, buf)) < 0) { IPMIPOWER_ERROR (("fi_hostlist_ranged_string: %s", strerror (errno))); exit (EXIT_FAILURE); } if (rv > 0) ipmipower_cbuf_printf (ttyout, "Discovered: %s\n", buf); if ((rv = fi_hostlist_ranged_string (undiscovered, IPMIPOWER_OUTPUT_BUFLEN, buf)) < 0) { IPMIPOWER_ERROR (("fi_hostlist_ranged_string: %s", strerror (errno))); exit (EXIT_FAILURE); } if (rv > 0) ipmipower_cbuf_printf (ttyout, "Undiscovered: %s\n", buf); if ((rv = fi_hostlist_ranged_string (badconnection, IPMIPOWER_OUTPUT_BUFLEN, buf)) < 0) { IPMIPOWER_ERROR (("fi_hostlist_ranged_string: %s", strerror (errno))); exit (EXIT_FAILURE); } if (rv > 0) ipmipower_cbuf_printf (ttyout, "BadConnection: %s\n", buf); cleanup: fi_hostlist_destroy (discovered); fi_hostlist_destroy (undiscovered); fi_hostlist_destroy (badconnection); #endif /* NDEBUG */ } else ipmipower_cbuf_printf (ttyout, "Hostname: NONE\n"); ipmipower_cbuf_printf (ttyout, "Username: %s\n", (cmd_args.common_args.username) ? cmd_args.common_args.username : "NULL"); #ifndef NDEBUG ipmipower_cbuf_printf (ttyout, "Password: %s\n", (cmd_args.common_args.password) ? cmd_args.common_args.password : "NULL"); ipmipower_cbuf_printf (ttyout, "K_g: %s\n", (cmd_args.common_args.k_g_len) ? format_kg (kgbuf, IPMI_MAX_K_G_LENGTH*2+3, cmd_args.common_args.k_g) : "NULL"); #else /* !NDEBUG */ ipmipower_cbuf_printf (ttyout, "Password: *****\n"); ipmipower_cbuf_printf (ttyout, "K_g: *****\n"); #endif /* !NDEBUG */ ipmipower_cbuf_printf (ttyout, "Session Timeout: %u ms\n", cmd_args.common_args.session_timeout); ipmipower_cbuf_printf (ttyout, "Retransmission Timeout: %u ms\n", cmd_args.common_args.retransmission_timeout); str = ""; if (cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_NONE) str = IPMI_PARSE_AUTHENTICATION_TYPE_NONE_STR; else if (cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_MD2) str = IPMI_PARSE_AUTHENTICATION_TYPE_MD2_STR; else if (cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_MD5) str = IPMI_PARSE_AUTHENTICATION_TYPE_MD5_STR; else if (cmd_args.common_args.authentication_type == IPMI_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY) str = IPMI_PARSE_AUTHENTICATION_TYPE_STRAIGHT_PASSWORD_KEY_STR; ipmipower_cbuf_printf (ttyout, "Authentication_Type: %s\n", str); str = ""; if (cmd_args.common_args.cipher_suite_id == 0) str = "0"; else if (cmd_args.common_args.cipher_suite_id == 1) str = "1"; else if (cmd_args.common_args.cipher_suite_id == 2) str = "2"; else if (cmd_args.common_args.cipher_suite_id == 3) str = "3"; else if (cmd_args.common_args.cipher_suite_id == 6) str = "6"; else if (cmd_args.common_args.cipher_suite_id == 7) str = "7"; else if (cmd_args.common_args.cipher_suite_id == 8) str = "8"; else if (cmd_args.common_args.cipher_suite_id == 11) str = "11"; else if (cmd_args.common_args.cipher_suite_id == 12) str = "12"; ipmipower_cbuf_printf (ttyout, "Cipher Suite Id: %s\n", str); str = ""; if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_USER) str = IPMI_PARSE_PRIVILEGE_LEVEL_USER_STR; else if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_OPERATOR) str = IPMI_PARSE_PRIVILEGE_LEVEL_OPERATOR_STR; else if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_ADMIN) str = IPMI_PARSE_PRIVILEGE_LEVEL_ADMIN_STR; ipmipower_cbuf_printf (ttyout, "Privilege_Level: %s\n", str); memset (strbuf, '\0', IPMIPOWER_OUTPUT_BUFLEN); is_first = 0; _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_AUTHENTICATION_CAPABILITIES_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_ACCEPT_SESSION_ID_ZERO_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_FORCE_PERMSG_AUTHENTICATION_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_CHECK_UNEXPECTED_AUTHCODE_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_BIG_ENDIAN_SEQUENCE_NUMBER_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_AUTH_CODE_CHECK_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_NO_CHECKSUM_CHECK_STR, &is_first); /* This is a duplicate of the IPMI 1.5 version */ #if 0 _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_AUTHENTICATION_CAPABILITIES_STR, &is_first); #endif _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_INTEL_2_0_SESSION_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUPERMICRO_2_0_SESSION_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_SUN_2_0_SESSION_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_OPEN_SESSION_PRIVILEGE_STR, &is_first); _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NON_EMPTY_INTEGRITY_CHECK_VALUE_STR, &is_first); /* This is a duplicate of the IPMI 1.5 version */ #if 0 _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK, IPMI_PARSE_WORKAROUND_FLAGS_OUTOFBAND_2_0_NO_CHECKSUM_CHECK_STR, &is_first); #endif _workarounds_strcat (strbuf, cmd_args.common_args.workaround_flags_outofband_2_0, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING, IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_IPMIPING_STR, &is_first); ipmipower_cbuf_printf (ttyout, "WorkaroundFlags: %s\n", strbuf); ipmipower_cbuf_printf (ttyout, "Debug: %s\n", cmd_args.common_args.debug ? "on" : "off"); #ifndef NDEBUG ipmipower_cbuf_printf (ttyout, "Rmcpdump: %s\n", (cmd_args.rmcpdump) ? "on" : "off"); #endif /* NDEBUG */ ipmipower_cbuf_printf (ttyout, "On-If-Off: %s\n", (cmd_args.on_if_off) ? "enabled" : "disabled"); ipmipower_cbuf_printf (ttyout, "Wait-Until-On: %s\n", (cmd_args.wait_until_on) ? "enabled" : "disabled"); ipmipower_cbuf_printf (ttyout, "Wait-Until-Off: %s\n", (cmd_args.wait_until_off) ? "enabled" : "disabled"); ipmipower_cbuf_printf (ttyout, "Retransmission Wait Timeout: %u ms\n", cmd_args.retransmission_wait_timeout); ipmipower_cbuf_printf (ttyout, "Retransmission Backoff Count: %u\n", cmd_args.retransmission_backoff_count); ipmipower_cbuf_printf (ttyout, "Ping Interval: %u ms\n", cmd_args.ping_interval); ipmipower_cbuf_printf (ttyout, "Ping Timeout: %u ms\n", cmd_args.ping_timeout); ipmipower_cbuf_printf (ttyout, "Ping Packet Count: %u\n", cmd_args.ping_packet_count); ipmipower_cbuf_printf (ttyout, "Ping Percent: %u percent\n", cmd_args.ping_percent); ipmipower_cbuf_printf (ttyout, "Ping Consec Count: %u\n", cmd_args.ping_consec_count); ipmipower_cbuf_printf (ttyout, "Buffer-Output: %s\n", (cmd_args.common_args.buffer_output) ? "enabled" : "disabled"); ipmipower_cbuf_printf (ttyout, "Consolidate-Output: %s\n", (cmd_args.common_args.consolidate_output) ? "enabled" : "disabled"); ipmipower_cbuf_printf (ttyout, "Fanout: %u\n", cmd_args.common_args.fanout); ipmipower_cbuf_printf (ttyout, "Always-Prefix: %s\n", (cmd_args.common_args.always_prefix) ? "enabled" : "disabled"); } static void _cmd_set_unsigned_int (char **argv, unsigned int *value, const char *str, int allow_zero) { assert (argv && value && str); if (!argv[1]) ipmipower_cbuf_printf (ttyout, "%s not specified\n", str); else { char *endptr; unsigned int temp; errno = 0; temp = strtoul (argv[1], &endptr, 10); if (errno || endptr[0] != '\0') ipmipower_cbuf_printf (ttyout, "invalid %s input\n", str); else if (allow_zero && !temp) { *value = temp; ipmipower_cbuf_printf (ttyout, "%s is now %d\n", str, *value); } else ipmipower_cbuf_printf (ttyout, "invalid %s input\n", str); } } static void _cmd_set_unsigned_int_ranged (char **argv, unsigned int *value, const char *str, int allow_zero, int min, int max) { assert (argv && value && str); if (!argv[1]) ipmipower_cbuf_printf (ttyout, "%s not specified\n", str); else { char *endptr; int temp; errno = 0; temp = strtol (argv[1], &endptr, 10); if (errno || endptr[0] != '\0') ipmipower_cbuf_printf (ttyout, "invalid %s input\n", str); else if ((allow_zero && !temp) || (temp <= max && temp >= min)) { *value = temp; ipmipower_cbuf_printf (ttyout, "%s is now %d\n", str, *value); } else ipmipower_cbuf_printf (ttyout, "invalid %s input, range is %d <=> %d\n", str, min, max); } } static void _cmd_set_flag (char **argv, int *flag, const char *str) { assert (argv && flag && str); if (!argv[1]) *flag = !(*flag); else { if (!strcasecmp (argv[1], "on")) *flag = 1; else if (!strcasecmp (argv[1], "off")) *flag = 0; else { ipmipower_cbuf_printf (ttyout, "invalid parameter\n"); return; } } ipmipower_cbuf_printf (ttyout, "%s is now %s\n", str, (*flag) ? "on" : "off"); } /* _readcmd * - Read a command line from the tty and return it in buf. * If no commands are available, return a null-terminated empty string. */ static void _readcmd (char *buf, int buflen) { int dropped, bytes_peeked, len = 0; buf[0] = '\0'; if ((bytes_peeked = cbuf_peek (ttyin, buf, buflen)) < 0) { IPMIPOWER_ERROR (("cbuf_peek: %s", strerror (errno))); exit (EXIT_FAILURE); } if (!bytes_peeked) return; for (len = 0; len < bytes_peeked; len++) { if (buf[len] == '\n') { buf[len+1] = '\0'; break; } } if (len == bytes_peeked) return; len++; if ((dropped = cbuf_drop (ttyin, len)) != len) IPMIPOWER_DEBUG (("cbuf_drop returned %d != %d)", dropped, len)); } int ipmipower_prompt_process_cmdline (void) { static int need_prompt = 1; char *buf; int quit = 0; if (!(buf = (char *)malloc (IPMIPOWER_MAX_TTY_BUF))) { IPMIPOWER_ERROR (("malloc: %s", strerror(errno))); exit (EXIT_FAILURE); } do { if (ipmipower_powercmd_pending ()) break; if (need_prompt) { ipmipower_cbuf_printf (ttyout, "ipmipower> "); need_prompt = 0; } buf[0] = '\0'; _readcmd (buf, IPMIPOWER_MAX_TTY_BUF); if (strlen (buf) > 0) { char **argv = argv_create (buf, ""); int i; if (argv[0]) { /* support "ipmi_version" and "ipmi-version" for backwards compatability */ if (!strcmp (argv[0], "driver-type") || !strcmp (argv[0], "ipmi_version") || !strcmp (argv[0], "ipmi-version")) _cmd_driver_type (argv); /* support hostnames (plural) for backwards compatability */ else if (!strcmp (argv[0], "hostnames") || !strcmp (argv[0], "hostname")) _cmd_hostname (argv); else if (!strcmp (argv[0], "username")) _cmd_username (argv); else if (!strcmp (argv[0], "password")) _cmd_password (argv); else if (!strcmp (argv[0], "k_g")) _cmd_k_g (argv); /* support "timeout" for backwards compatability */ else if (!strcmp (argv[0], "timeout") || !strcmp (argv[0], "session-timeout")) _cmd_set_unsigned_int (argv, &cmd_args.common_args.session_timeout, "timeout", 0); /* support "retry-timeout" for backwards compatability */ else if (!strcmp (argv[0], "retry-timeout") || !strcmp (argv[0], "retransmission-timeout")) _cmd_set_unsigned_int_ranged (argv, &cmd_args.common_args.retransmission_timeout, "retransmission-timeout", 0, 1, cmd_args.common_args.session_timeout); /* support underscored version for backwards compatability */ else if (!strcmp (argv[0], "authentication_type") || !strcmp (argv[0], "authentication-type")) _cmd_authentication_type (argv); /* support underscored version for backwards compatability */ else if (!strcmp (argv[0], "cipher_suite_id") || !strcmp (argv[0], "cipher-suite-id")) _cmd_cipher_suite_id (argv); /* support "privilege" command for backwards compatability */ else if (!strcmp (argv[0], "privilege") || !strcmp (argv[0], "privilege-level")) _cmd_privilege_level (argv); else if (!strcmp (argv[0], "workaround-flags")) _cmd_workaround_flags (argv); else if (!strcmp (argv[0], "debug")) _cmd_debug (argv); #ifndef NDEBUG else if (!strcmp (argv[0], "rmcpdump")) _cmd_set_flag (argv, &cmd_args.rmcpdump, "rmcp dump"); #endif /* NDEBUG */ else if (!strcmp (argv[0], "happyeaster")) ipmipower_cbuf_printf (ttyout, "by Albert Chu \n"); else if (!strcmp (argv[0], "on")) _cmd_power (argv, IPMIPOWER_POWER_CMD_POWER_ON); else if (!strcmp (argv[0], "off")) _cmd_power (argv, IPMIPOWER_POWER_CMD_POWER_OFF); else if (!strcmp (argv[0], "cycle")) _cmd_power (argv, IPMIPOWER_POWER_CMD_POWER_CYCLE); else if (!strcmp (argv[0], "reset")) _cmd_power (argv, IPMIPOWER_POWER_CMD_POWER_RESET); else if (!strcmp (argv[0], "stat")) _cmd_power (argv, IPMIPOWER_POWER_CMD_POWER_STATUS); else if (!strcmp (argv[0], "pulse")) _cmd_power (argv, IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT); else if (!strcmp (argv[0], "soft")) _cmd_power (argv, IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS); else if (!strcmp (argv[0], "identify-on")) _cmd_power (argv, IPMIPOWER_POWER_CMD_IDENTIFY_ON); else if (!strcmp (argv[0], "identify-off")) _cmd_power (argv, IPMIPOWER_POWER_CMD_IDENTIFY_OFF); else if (!strcmp (argv[0], "identify-status")) _cmd_power (argv, IPMIPOWER_POWER_CMD_IDENTIFY_STATUS); else if (!strcmp (argv[0], "on-if-off")) _cmd_set_flag (argv, &cmd_args.on_if_off, "on-if-off"); else if (!strcmp (argv[0], "wait-until-on")) _cmd_set_flag (argv, &cmd_args.wait_until_on, "wait-until-on"); else if (!strcmp (argv[0], "wait-until-off")) _cmd_set_flag (argv, &cmd_args.wait_until_off, "wait-until-off"); /* support "retry-wait-timeout" for backwards compatability */ else if (!strcmp (argv[0], "retry-wait-timeout") || !strcmp (argv[0], "retransmission-wait-timeout")) _cmd_set_unsigned_int_ranged (argv, &cmd_args.retransmission_wait_timeout, "retransmission-wait-timeout", 0, 1, cmd_args.common_args.session_timeout); /* support "retry-backoff-count" for backwards compatability */ else if (!strcmp (argv[0], "retry-backoff-count") || !strcmp (argv[0], "retransmission-backoff-count")) _cmd_set_unsigned_int (argv, &cmd_args.retransmission_backoff_count, "retransmission-backoff-count", 0); else if (!strcmp (argv[0], "ping-interval")) _cmd_set_unsigned_int_ranged (argv, &cmd_args.ping_interval, "ping-interval", 1, 0, cmd_args.ping_timeout); else if (!strcmp (argv[0], "ping-timeout")) _cmd_set_unsigned_int (argv, &cmd_args.ping_timeout, "ping-timeout", 1); else if (!strcmp (argv[0], "ping-packet-count")) _cmd_set_unsigned_int (argv, &cmd_args.ping_packet_count, "ping-packet-count", 1); else if (!strcmp (argv[0], "ping-percent")) _cmd_set_unsigned_int (argv, &cmd_args.ping_percent, "ping-percent", 1); else if (!strcmp (argv[0], "ping-consec-count")) _cmd_set_unsigned_int_ranged (argv, &cmd_args.ping_consec_count, "ping-consec-count", 1, 0, cmd_args.ping_packet_count); else if (!strcmp (argv[0], "buffer-output")) _cmd_set_flag (argv, &cmd_args.common_args.buffer_output, "buffer-output"); else if (!strcmp (argv[0], "consolidate-output")) _cmd_set_flag (argv, &cmd_args.common_args.consolidate_output, "consolidate-output"); else if (!strcmp (argv[0], "always-prefix")) _cmd_set_flag (argv, &cmd_args.common_args.always_prefix, "always-prefix"); else if (!strcmp (argv[0], "fanout")) _cmd_set_unsigned_int_ranged (argv, &cmd_args.common_args.fanout, "fanout", 1, PSTDOUT_FANOUT_MIN, PSTDOUT_FANOUT_MAX); else if (!strcmp (argv[0], "help") || !strcmp (argv[0], "?") || !strcmp (argv[0], "advanced") /* legacy */ || !strcmp (argv[0], "network")) /* legacy */ _cmd_help (); else if (!strcmp (argv[0], "version")) _cmd_version (); else if (!strcmp (argv[0], "config")) _cmd_config (); else if (!strcmp (argv[0], "quit")) quit = 1; else ipmipower_cbuf_printf (ttyout, "unknown command - type \"help\"\n"); } need_prompt = 1; /* Clear out argv data for generic security purposes since * usernames or passwords could be stored here. argv_create * guarantees a null terminated pointer, so this loop is * safe */ i = 0; while (argv[i]) { memset (argv[i], '\0', strlen (argv[i])); i++; } argv_destroy (argv); } } while (!quit && strlen (buf) > 0); free (buf); return (!quit); } freeipmi-1.6.4/ipmipower/ipmipower_prompt.h0000644002055400205540000000324513527331636021067 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_prompt.h,v 1.14 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_PROMPT_H #define IPMIPOWER_PROMPT_H #include "ipmipower.h" /* ipmipower_prompt_process_cmdline * - Process a single line * - Do nothing if power commands still pending and processing * Returns 1 if we should continue, 0 if we should quit */ int ipmipower_prompt_process_cmdline (void); #endif /* IPMIPOWER_PROMPT_H */ freeipmi-1.6.4/ipmipower/ipmipower_util.c0000644002055400205540000001475313527331636020524 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_util.c,v 1.37 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include "ipmipower_util.h" #include "ipmipower_error.h" #include "freeipmi-portability.h" #include "cbuf.h" extern struct ipmipower_arguments cmd_args; char * ipmipower_power_cmd_to_string (ipmipower_power_cmd_t cmd) { assert (IPMIPOWER_POWER_CMD_VALID (cmd)); switch (cmd) { case IPMIPOWER_POWER_CMD_POWER_OFF: return ("off"); case IPMIPOWER_POWER_CMD_POWER_ON: return ("on"); case IPMIPOWER_POWER_CMD_POWER_CYCLE: return ("cycle"); case IPMIPOWER_POWER_CMD_POWER_RESET: return ("reset"); case IPMIPOWER_POWER_CMD_POWER_STATUS: return ("status"); case IPMIPOWER_POWER_CMD_PULSE_DIAGNOSTIC_INTERRUPT: return ("diagnostic interrupt"); case IPMIPOWER_POWER_CMD_SOFT_SHUTDOWN_OS: return ("soft shutdown os"); case IPMIPOWER_POWER_CMD_IDENTIFY_ON: return ("identify on"); case IPMIPOWER_POWER_CMD_IDENTIFY_OFF: return ("identify off"); case IPMIPOWER_POWER_CMD_IDENTIFY_STATUS: return ("identify status"); default: IPMIPOWER_ERROR (("ipmipower_power_cmd_to_string: invalid power cmd type: %d", cmd)); exit (EXIT_FAILURE); } return (NULL); /* NOT REACHED */ } int ipmipower_power_cmd_check_privilege (ipmipower_power_cmd_t cmd, char *errbuf, unsigned int errbuflen) { int rv = -1; assert (IPMIPOWER_POWER_CMD_VALID (cmd)); assert (errbuf); assert (errbuflen); assert (cmd_args.oem_power_type == IPMIPOWER_OEM_POWER_TYPE_NONE); if (cmd_args.common_args.privilege_level == IPMI_PRIVILEGE_LEVEL_USER && IPMIPOWER_POWER_CMD_REQUIRES_OPERATOR_PRIVILEGE_LEVEL (cmd)) { char *power_cmd_str; power_cmd_str = ipmipower_power_cmd_to_string (cmd); snprintf (errbuf, errbuflen, "'%s' requires atleast operator privilege", power_cmd_str); rv = 0; goto cleanup; } rv = 1; cleanup: return (rv); } int ipmipower_poll (struct pollfd *ufds, unsigned int nfds, int timeout) { int n; struct timeval tv, tv_orig; struct timeval start, end, delta; /* prep for EINTR handling */ if (timeout >= 0) { /* poll uses timeout in milliseconds */ tv_orig.tv_sec = (long)timeout/1000; tv_orig.tv_usec = (timeout % 1000) * 1000; if (gettimeofday(&start, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } } else { tv_orig.tv_sec = 0; tv_orig.tv_usec = 0; } /* repeat poll if interrupted */ do { n = poll(ufds, nfds, timeout); /* unrecov error */ if (n < 0 && errno != EINTR) { IPMIPOWER_ERROR (("poll: %s", strerror (errno))); exit (EXIT_FAILURE); } if (n < 0 && timeout >= 0) /* EINTR - adjust timeout */ { if (gettimeofday(&end, NULL) < 0) { IPMIPOWER_ERROR (("gettimeofday: %s", strerror (errno))); exit (EXIT_FAILURE); } timersub(&end, &start, &delta); /* delta = end-start */ timersub(&tv_orig, &delta, &tv); /* tv = tvsave-delta */ timeout = (tv.tv_sec * 1000) + (tv.tv_usec/1000); } } while (n < 0); return n; } void ipmipower_cbuf_printf(cbuf_t cbuf, const char *fmt, ...) { char buf[IPMIPOWER_OUTPUT_BUFLEN]; va_list ap; int written, dropped; int len; va_start(ap, fmt); /* overflow ignored */ len = vsnprintf (buf, IPMIPOWER_OUTPUT_BUFLEN, fmt, ap); written = cbuf_write (cbuf, buf, len, &dropped); if (written < 0) { IPMIPOWER_ERROR (("cbuf_write: %s", strerror (errno))); exit (EXIT_FAILURE); } va_end(ap); } int ipmipower_cbuf_peek_and_drop (cbuf_t buf, void *buffer, int len) { int rv, r_len, dropped = 0; assert (buf); assert (buffer); assert (len > 0); if ((r_len = cbuf_peek (buf, buffer, len)) < 0) { IPMIPOWER_ERROR (("cbuf_peek: %s", strerror (errno))); exit (EXIT_FAILURE); } /* Nothing there */ if (!r_len) return (0); if ((dropped = cbuf_drop (buf, len)) < 0) { IPMIPOWER_ERROR (("cbuf_drop: %s", strerror (errno))); exit (EXIT_FAILURE); } if (dropped != r_len) { IPMIPOWER_ERROR (("cbuf_drop: dropped incorrect bytes: %d", dropped)); exit (EXIT_FAILURE); } if ((rv = cbuf_drop (buf, -1)) < 0) { IPMIPOWER_ERROR (("cbuf_drop: %s", strerror (errno))); exit (EXIT_FAILURE); } if (rv > 0) IPMIPOWER_DEBUG (("cbuf_drop dropped data: %d", rv)); return (r_len); } freeipmi-1.6.4/ipmipower/ipmipower_util.h0000644002055400205540000000466613527331636020533 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmipower_util.h,v 1.23 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155698 * * This file is part of Ipmipower, a remote power control utility. * For details, see http://www.llnl.gov/linux/. * * Ipmipower is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmipower is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmipower. If not, see . \*****************************************************************************/ #ifndef IPMIPOWER_UTIL_H #define IPMIPOWER_UTIL_H #include #include "ipmipower.h" #include "cbuf.h" char *ipmipower_power_cmd_to_string (ipmipower_power_cmd_t cmd); /* ipmipower_power_cmd_check_privilege * - check if privilege level ok for power cmd * - returns 1 if ok, 0 if not, -1 on error * - if returns 0 or -1, error message in buf */ int ipmipower_power_cmd_check_privilege (ipmipower_power_cmd_t cmd, char *errbuf, unsigned int errbuflen); /* ipmipower_poll * - safe poll() * - Returns number of fds */ int ipmipower_poll (struct pollfd *ufds, unsigned int nfds, int timeout); /* ipmipower_cbuf_printf * - wrapper for vsnprintf and cbuf_write */ void ipmipower_cbuf_printf(cbuf_t cbuf, const char *fmt, ...); /* ipmipower_cbuf_peek_and_drop * - wrapper for cbuf_peek and cbuf_drop * - will drop remaining data in cbuf if buffer not large enough * Returns length of packet received, 0 if no packet seen */ int ipmipower_cbuf_peek_and_drop (cbuf_t buf, void *buffer, int len); #endif /* IPMIPOWER_UTIL_H */ freeipmi-1.6.4/ipmiseld/0000755002055400205540000000000013527342550015066 5ustar00achuachu00000000000000freeipmi-1.6.4/ipmiseld/Makefile.in0000644002055400205540000011534313527342445017145 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = ipmiseld$(EXEEXT) subdir = ipmiseld DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_ipmiseld_OBJECTS = ipmiseld-ipmiseld.$(OBJEXT) \ ipmiseld-ipmiseld-argp.$(OBJEXT) \ ipmiseld-ipmiseld-cache.$(OBJEXT) \ ipmiseld-ipmiseld-common.$(OBJEXT) \ ipmiseld-ipmiseld-debug.$(OBJEXT) \ ipmiseld-ipmiseld-ipmi-communication.$(OBJEXT) \ ipmiseld-ipmiseld-threadpool.$(OBJEXT) ipmiseld_OBJECTS = $(am_ipmiseld_OBJECTS) ipmiseld_DEPENDENCIES = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(ipmiseld_SOURCES) DIST_SOURCES = $(ipmiseld_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ipmiseld_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DIPMISELD_LOCALSTATEDIR='"$(localstatedir)"' ipmiseld_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmiseld_SOURCES = \ ipmiseld.c \ ipmiseld.h \ ipmiseld-argp.c \ ipmiseld-argp.h \ ipmiseld-cache.c \ ipmiseld-cache.h \ ipmiseld-common.c \ ipmiseld-common.h \ ipmiseld-debug.c \ ipmiseld-debug.h \ ipmiseld-ipmi-communication.c \ ipmiseld-ipmi-communication.h \ ipmiseld-threadpool.c \ ipmiseld-threadpool.h IPMISELDCACHEdir = $(IPMISELD_CACHE_DIRECTORY) all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu ipmiseld/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu ipmiseld/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list ipmiseld$(EXEEXT): $(ipmiseld_OBJECTS) $(ipmiseld_DEPENDENCIES) $(EXTRA_ipmiseld_DEPENDENCIES) @rm -f ipmiseld$(EXEEXT) $(AM_V_CCLD)$(LINK) $(ipmiseld_OBJECTS) $(ipmiseld_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-argp.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-cache.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-common.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-debug.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld-threadpool.Po@am__quote@ @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/ipmiseld-ipmiseld.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< ipmiseld-ipmiseld.o: ipmiseld.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld.Tpo -c -o ipmiseld-ipmiseld.o `test -f 'ipmiseld.c' || echo '$(srcdir)/'`ipmiseld.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld.Tpo $(DEPDIR)/ipmiseld-ipmiseld.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld.c' object='ipmiseld-ipmiseld.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld.o `test -f 'ipmiseld.c' || echo '$(srcdir)/'`ipmiseld.c ipmiseld-ipmiseld.obj: ipmiseld.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld.Tpo -c -o ipmiseld-ipmiseld.obj `if test -f 'ipmiseld.c'; then $(CYGPATH_W) 'ipmiseld.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld.Tpo $(DEPDIR)/ipmiseld-ipmiseld.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld.c' object='ipmiseld-ipmiseld.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld.obj `if test -f 'ipmiseld.c'; then $(CYGPATH_W) 'ipmiseld.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld.c'; fi` ipmiseld-ipmiseld-argp.o: ipmiseld-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-argp.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-argp.Tpo -c -o ipmiseld-ipmiseld-argp.o `test -f 'ipmiseld-argp.c' || echo '$(srcdir)/'`ipmiseld-argp.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-argp.Tpo $(DEPDIR)/ipmiseld-ipmiseld-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-argp.c' object='ipmiseld-ipmiseld-argp.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-argp.o `test -f 'ipmiseld-argp.c' || echo '$(srcdir)/'`ipmiseld-argp.c ipmiseld-ipmiseld-argp.obj: ipmiseld-argp.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-argp.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-argp.Tpo -c -o ipmiseld-ipmiseld-argp.obj `if test -f 'ipmiseld-argp.c'; then $(CYGPATH_W) 'ipmiseld-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-argp.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-argp.Tpo $(DEPDIR)/ipmiseld-ipmiseld-argp.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-argp.c' object='ipmiseld-ipmiseld-argp.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-argp.obj `if test -f 'ipmiseld-argp.c'; then $(CYGPATH_W) 'ipmiseld-argp.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-argp.c'; fi` ipmiseld-ipmiseld-cache.o: ipmiseld-cache.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-cache.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-cache.Tpo -c -o ipmiseld-ipmiseld-cache.o `test -f 'ipmiseld-cache.c' || echo '$(srcdir)/'`ipmiseld-cache.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-cache.Tpo $(DEPDIR)/ipmiseld-ipmiseld-cache.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-cache.c' object='ipmiseld-ipmiseld-cache.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-cache.o `test -f 'ipmiseld-cache.c' || echo '$(srcdir)/'`ipmiseld-cache.c ipmiseld-ipmiseld-cache.obj: ipmiseld-cache.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-cache.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-cache.Tpo -c -o ipmiseld-ipmiseld-cache.obj `if test -f 'ipmiseld-cache.c'; then $(CYGPATH_W) 'ipmiseld-cache.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-cache.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-cache.Tpo $(DEPDIR)/ipmiseld-ipmiseld-cache.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-cache.c' object='ipmiseld-ipmiseld-cache.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-cache.obj `if test -f 'ipmiseld-cache.c'; then $(CYGPATH_W) 'ipmiseld-cache.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-cache.c'; fi` ipmiseld-ipmiseld-common.o: ipmiseld-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-common.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-common.Tpo -c -o ipmiseld-ipmiseld-common.o `test -f 'ipmiseld-common.c' || echo '$(srcdir)/'`ipmiseld-common.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-common.Tpo $(DEPDIR)/ipmiseld-ipmiseld-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-common.c' object='ipmiseld-ipmiseld-common.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-common.o `test -f 'ipmiseld-common.c' || echo '$(srcdir)/'`ipmiseld-common.c ipmiseld-ipmiseld-common.obj: ipmiseld-common.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-common.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-common.Tpo -c -o ipmiseld-ipmiseld-common.obj `if test -f 'ipmiseld-common.c'; then $(CYGPATH_W) 'ipmiseld-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-common.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-common.Tpo $(DEPDIR)/ipmiseld-ipmiseld-common.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-common.c' object='ipmiseld-ipmiseld-common.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-common.obj `if test -f 'ipmiseld-common.c'; then $(CYGPATH_W) 'ipmiseld-common.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-common.c'; fi` ipmiseld-ipmiseld-debug.o: ipmiseld-debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-debug.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-debug.Tpo -c -o ipmiseld-ipmiseld-debug.o `test -f 'ipmiseld-debug.c' || echo '$(srcdir)/'`ipmiseld-debug.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-debug.Tpo $(DEPDIR)/ipmiseld-ipmiseld-debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-debug.c' object='ipmiseld-ipmiseld-debug.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-debug.o `test -f 'ipmiseld-debug.c' || echo '$(srcdir)/'`ipmiseld-debug.c ipmiseld-ipmiseld-debug.obj: ipmiseld-debug.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-debug.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-debug.Tpo -c -o ipmiseld-ipmiseld-debug.obj `if test -f 'ipmiseld-debug.c'; then $(CYGPATH_W) 'ipmiseld-debug.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-debug.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-debug.Tpo $(DEPDIR)/ipmiseld-ipmiseld-debug.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-debug.c' object='ipmiseld-ipmiseld-debug.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-debug.obj `if test -f 'ipmiseld-debug.c'; then $(CYGPATH_W) 'ipmiseld-debug.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-debug.c'; fi` ipmiseld-ipmiseld-ipmi-communication.o: ipmiseld-ipmi-communication.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-ipmi-communication.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Tpo -c -o ipmiseld-ipmiseld-ipmi-communication.o `test -f 'ipmiseld-ipmi-communication.c' || echo '$(srcdir)/'`ipmiseld-ipmi-communication.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Tpo $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-ipmi-communication.c' object='ipmiseld-ipmiseld-ipmi-communication.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-ipmi-communication.o `test -f 'ipmiseld-ipmi-communication.c' || echo '$(srcdir)/'`ipmiseld-ipmi-communication.c ipmiseld-ipmiseld-ipmi-communication.obj: ipmiseld-ipmi-communication.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-ipmi-communication.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Tpo -c -o ipmiseld-ipmiseld-ipmi-communication.obj `if test -f 'ipmiseld-ipmi-communication.c'; then $(CYGPATH_W) 'ipmiseld-ipmi-communication.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-ipmi-communication.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Tpo $(DEPDIR)/ipmiseld-ipmiseld-ipmi-communication.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-ipmi-communication.c' object='ipmiseld-ipmiseld-ipmi-communication.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-ipmi-communication.obj `if test -f 'ipmiseld-ipmi-communication.c'; then $(CYGPATH_W) 'ipmiseld-ipmi-communication.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-ipmi-communication.c'; fi` ipmiseld-ipmiseld-threadpool.o: ipmiseld-threadpool.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-threadpool.o -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Tpo -c -o ipmiseld-ipmiseld-threadpool.o `test -f 'ipmiseld-threadpool.c' || echo '$(srcdir)/'`ipmiseld-threadpool.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Tpo $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-threadpool.c' object='ipmiseld-ipmiseld-threadpool.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-threadpool.o `test -f 'ipmiseld-threadpool.c' || echo '$(srcdir)/'`ipmiseld-threadpool.c ipmiseld-ipmiseld-threadpool.obj: ipmiseld-threadpool.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT ipmiseld-ipmiseld-threadpool.obj -MD -MP -MF $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Tpo -c -o ipmiseld-ipmiseld-threadpool.obj `if test -f 'ipmiseld-threadpool.c'; then $(CYGPATH_W) 'ipmiseld-threadpool.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-threadpool.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Tpo $(DEPDIR)/ipmiseld-ipmiseld-threadpool.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='ipmiseld-threadpool.c' object='ipmiseld-ipmiseld-threadpool.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(ipmiseld_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o ipmiseld-ipmiseld-threadpool.obj `if test -f 'ipmiseld-threadpool.c'; then $(CYGPATH_W) 'ipmiseld-threadpool.c'; else $(CYGPATH_W) '$(srcdir)/ipmiseld-threadpool.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-data-local install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS .MAKE: install-am install-strip .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-data-local install-dvi install-dvi-am \ install-exec install-exec-am install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-sbinPROGRAMS $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(IPMISELDCACHEdir) # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/ipmiseld/Makefile.am0000644002055400205540000000401213527331636017122 0ustar00achuachu00000000000000##***************************************************************************** ## $Id: Makefile.am,v 1.11 2008-09-17 22:56:04 chu11 Exp $ ##***************************************************************************** ## Process this file with automake to produce Makefile.in. ##***************************************************************************** sbin_PROGRAMS = ipmiseld ipmiseld_CPPFLAGS = \ -I$(top_srcdir)/common/toolcommon \ -I$(top_srcdir)/common/miscutil \ -I$(top_srcdir)/common/parsecommon \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE \ -D_REENTRANT \ -DIPMISELD_LOCALSTATEDIR='"$(localstatedir)"' ipmiseld_LDADD = \ $(top_builddir)/common/toolcommon/libtoolcommon.la \ $(top_builddir)/common/miscutil/libmiscutil.la \ $(top_builddir)/common/parsecommon/libparsecommon.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la ipmiseld_SOURCES = \ ipmiseld.c \ ipmiseld.h \ ipmiseld-argp.c \ ipmiseld-argp.h \ ipmiseld-cache.c \ ipmiseld-cache.h \ ipmiseld-common.c \ ipmiseld-common.h \ ipmiseld-debug.c \ ipmiseld-debug.h \ ipmiseld-ipmi-communication.c \ ipmiseld-ipmi-communication.h \ ipmiseld-threadpool.c \ ipmiseld-threadpool.h $(top_builddir)/common/toolcommon/libtoolcommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/miscutil/libmiscutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/parsecommon/libparsecommon.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: IPMISELDCACHEdir = $(IPMISELD_CACHE_DIRECTORY) install-data-local: $(INSTALL) -m 755 -d $(DESTDIR)$(IPMISELDCACHEdir) freeipmi-1.6.4/ipmiseld/ipmiseld.c0000644002055400205540000016670713527331636017064 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.c,v 1.17 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include #include #include #include #include "ipmiseld.h" #include "ipmiseld-argp.h" #include "ipmiseld-cache.h" #include "ipmiseld-common.h" #include "ipmiseld-debug.h" #include "ipmiseld-ipmi-communication.h" #include "ipmiseld-threadpool.h" #include "freeipmi-portability.h" #include "error.h" #include "fi_hostlist.h" #include "heap.h" #include "pstdout.h" #include "tool-common.h" #include "tool-daemon-common.h" #include "tool-event-common.h" #include "tool-util-common.h" #define IPMISELD_PIDFILE IPMISELD_LOCALSTATEDIR "/run/ipmiseld.pid" #define IPMISELD_FORMAT_BUFLEN 4096 #define IPMISELD_EVENT_OUTPUT_BUFLEN 4096 #define IPMISELD_RETRY_ATTEMPT_MAX 3 static Heap host_data_heap = NULL; static pthread_mutex_t host_data_heap_lock = PTHREAD_MUTEX_INITIALIZER; static int exit_flag = 1; static int ipmiseld_sel_info_get (ipmiseld_host_data_t *host_data, ipmiseld_sel_info_t *sel_info) { fiid_obj_t obj_cmd_rs = NULL; uint64_t val; int rv = -1; assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->ipmi_ctx); assert (sel_info); if (!(obj_cmd_rs = fiid_obj_create (tmpl_cmd_get_sel_info_rs))) { ipmiseld_err_output (host_data, "fiid_obj_create: %s", strerror (errno)); goto cleanup; } if (ipmi_cmd_get_sel_info (host_data->host_poll->ipmi_ctx, obj_cmd_rs) < 0) { ipmiseld_err_output (host_data, "ipmi_cmd_get_sel_info: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); goto cleanup; } if (FIID_OBJ_GET (obj_cmd_rs, "entries", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'entries': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->entries = val; if (FIID_OBJ_GET (obj_cmd_rs, "free_space", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'free_space': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->free_space = val; if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_addition_timestamp", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'most_recent_addition_timestamp': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->most_recent_addition_timestamp = val; if (FIID_OBJ_GET (obj_cmd_rs, "most_recent_erase_timestamp", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'most_recent_erase_timestamp': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->most_recent_erase_timestamp = val; if (FIID_OBJ_GET (obj_cmd_rs, "delete_sel_command_supported", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'delete_sel_command_supported': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->delete_sel_command_supported = val; if (FIID_OBJ_GET (obj_cmd_rs, "reserve_sel_command_supported", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'reserve_sel_command_supported': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->reserve_sel_command_supported = val; if (FIID_OBJ_GET (obj_cmd_rs, "overflow_flag", &val) < 0) { ipmiseld_err_output (host_data, "fiid_obj_get: 'overflow_flag': %s", fiid_obj_errormsg (obj_cmd_rs)); goto cleanup; } sel_info->overflow_flag = val; rv = 0; cleanup: fiid_obj_destroy (obj_cmd_rs); return (rv); } static int _sel_last_record_id_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmiseld_last_record_id_t *last_record_id; assert (ctx); assert (callback_data); last_record_id = (ipmiseld_last_record_id_t *)callback_data; if (ipmi_sel_parse_read_record_id (ctx, NULL, 0, &(last_record_id->record_id)) < 0) { err_output ("ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errormsg (ctx)); return (-1); } last_record_id->loaded = 1; return (0); } static int ipmiseld_get_last_record_id (ipmiseld_host_data_t *host_data, ipmiseld_last_record_id_t *last_record_id) { assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->sel_ctx); assert (last_record_id); last_record_id->loaded = 0; if (ipmi_sel_parse (host_data->host_poll->sel_ctx, IPMI_SEL_RECORD_ID_LAST, IPMI_SEL_RECORD_ID_LAST, _sel_last_record_id_callback, last_record_id) < 0) { /* A general IPMI error (busy, timeout, etc.) is ok, it happens */ if (ipmi_sel_ctx_errnum (host_data->host_poll->sel_ctx) != IPMI_SEL_ERR_IPMI_ERROR) ipmiseld_err_output (host_data, "ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } return (0); } static unsigned int ipmiseld_calc_percent_full (ipmiseld_host_data_t *host_data, ipmiseld_sel_info_t *sel_info) { unsigned int used_bytes; unsigned int total_bytes; unsigned int percent; assert (host_data); assert (sel_info); used_bytes = (sel_info->entries * IPMI_SEL_RECORD_MAX_RECORD_LENGTH); total_bytes = used_bytes + sel_info->free_space; percent = (int)(100 * (double)used_bytes/total_bytes); if (percent > 100) { /* Some rounding errors could occur, we accept small ones */ if (percent > 105) { if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL percent calc error: %u", percent); } percent = 100; } return (percent); } static int ipmiseld_host_state_init (ipmiseld_host_data_t *host_data) { unsigned int percent; int rv = -1; assert (host_data); if (ipmiseld_get_last_record_id (host_data, &(host_data->last_host_state.last_record_id)) < 0) goto cleanup; /* possible SEL is empty */ if (!host_data->last_host_state.last_record_id.loaded) { host_data->last_host_state.last_record_id.record_id = 0; host_data->last_host_state.last_record_id.loaded = 1; } if (ipmiseld_sel_info_get (host_data, &(host_data->last_host_state.sel_info)) < 0) goto cleanup; percent = ipmiseld_calc_percent_full (host_data, &(host_data->last_host_state.sel_info)); host_data->last_host_state.last_percent_full = percent; host_data->last_host_state.initialized = 1; rv = 0; cleanup: return (rv); } /* return (-1), real error */ static int _sel_parse_err_handle (ipmiseld_host_data_t *host_data, char *func) { assert (host_data); assert (func); if (ipmi_sel_ctx_errnum (host_data->host_poll->sel_ctx) == IPMI_SEL_ERR_INVALID_SEL_ENTRY) { /* maybe a bad SEL entry returned from remote system, don't error out */ if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "Invalid SEL entry read"); return (0); } ipmiseld_err_output (host_data, "%s: %s", func, ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } /* returns 0 on success, 1 on success but w/ truncation */ static int _snprintf (char *buf, unsigned int buflen, unsigned int *wlen, const char *fmt, ...) { va_list ap; int ret; assert (buf); assert (buflen); assert (wlen); assert (fmt); va_start (ap, fmt); ret = vsnprintf (buf + *wlen, buflen - *wlen, fmt, ap); va_end (ap); if (ret >= (buflen - *wlen)) { (*wlen) = buflen; return (1); } (*wlen) += ret; return (0); } static int _sel_log_format (ipmiseld_host_data_t *host_data, const char *fmt_str, char *fmtbuf, unsigned int fmtbuf_len) { unsigned int wlen = 0; int percent_flag = 0; char *ptr; assert (host_data); assert (fmt_str); ptr = (char *)fmt_str; while (*ptr) { if (*ptr == '%') { if (percent_flag) { if (_snprintf (fmtbuf, fmtbuf_len, &wlen, "%%")) return (0); percent_flag = 0; } else percent_flag = 1; goto end_loop; } else if (percent_flag && *ptr == 'h') { if (_snprintf (fmtbuf, fmtbuf_len, &wlen, "%s", host_data->hostname ? host_data->hostname : "localhost")) return (0); percent_flag = 0; } else { if (percent_flag) { if (_snprintf (fmtbuf, fmtbuf_len, &wlen, "%%%c", *ptr)) return (0); percent_flag = 0; } else { if (_snprintf (fmtbuf, fmtbuf_len, &wlen, "%c", *ptr)) return (0); } } end_loop: ptr++; } return (0); } static int _sel_log_output (ipmiseld_host_data_t *host_data, uint8_t record_type) { char fmtbuf[IPMISELD_FORMAT_BUFLEN + 1]; char outbuf[IPMISELD_EVENT_OUTPUT_BUFLEN + 1]; int outbuf_len; unsigned int flags; int record_type_class; char *format_str; uint16_t record_id; assert (host_data); memset (fmtbuf, '\0', IPMISELD_FORMAT_BUFLEN + 1); memset (outbuf, '\0', IPMISELD_EVENT_OUTPUT_BUFLEN + 1); if (ipmi_sel_parse_read_record_id (host_data->host_poll->sel_ctx, NULL, 0, &record_id) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_parse_read_record_id: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug) IPMISELD_HOST_DEBUG (("SEL Record parsed: Record ID = %u", record_id)); /* achu: * * Algorithmically we can "find" the next entry to log several ways, * but there are two reasonable ways. * * 1) Whatever the last record id is, add 1 to it and iterate until * you reach the next valid SEL record id. * * 2) Read the last record id, and use that to get the next record * id to log. * * While '1' will be faster on most systems, there are a number of * systems were vendors jump semi-big chunks of record ids on new * events (I have no idea why, it makes no sense). We will * implement '2' as the most reasonable average solution. So when * we hit this callback with the already logged last record id, we * need to not log it. '2' is also the safer implementation, in the * event there is a bug in the firmware, and we could loop endlessly * looking for the next entry to log when there is none. */ if (host_data->now_host_state.last_record_id.record_id == record_id) return (0); flags = IPMI_SEL_STRING_FLAGS_IGNORE_UNAVAILABLE_FIELD; flags |= IPMI_SEL_STRING_FLAGS_OUTPUT_NOT_AVAILABLE; flags |= IPMI_SEL_STRING_FLAGS_DATE_MONTH_STRING; if (host_data->prog_data->args->verbose_count) flags |= IPMI_SEL_STRING_FLAGS_VERBOSE; if (host_data->prog_data->args->entity_sensor_names) flags |= IPMI_SEL_STRING_FLAGS_ENTITY_SENSOR_NAMES; if (host_data->prog_data->args->non_abbreviated_units) flags |= IPMI_SEL_STRING_FLAGS_NON_ABBREVIATED_UNITS; if (host_data->prog_data->args->interpret_oem_data) flags |= IPMI_SEL_STRING_FLAGS_INTERPRET_OEM_DATA; record_type_class = ipmi_sel_record_type_class (record_type); if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { if (host_data->prog_data->args->system_event_format_str) format_str = host_data->prog_data->args->system_event_format_str; else { if (host_data->hostname) format_str = IPMISELD_SYSTEM_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT; else format_str = IPMISELD_SYSTEM_EVENT_FORMAT_STR_DEFAULT; } } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if (host_data->prog_data->args->oem_timestamped_event_format_str) format_str = host_data->prog_data->args->oem_timestamped_event_format_str; else { if (host_data->hostname) format_str = IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT; else format_str = IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_STR_DEFAULT; } } else if (record_type_class == IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { if (host_data->prog_data->args->oem_non_timestamped_event_format_str) format_str = host_data->prog_data->args->oem_non_timestamped_event_format_str; else { if (host_data->hostname) format_str = IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT; else format_str = IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_STR_DEFAULT; } } else { if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL Event: Unknown SEL Record Type: %Xh", record_type); return (0); } if (_sel_log_format (host_data, format_str, fmtbuf, IPMISELD_FORMAT_BUFLEN) < 0) return (-1); if ((outbuf_len = ipmi_sel_parse_read_record_string (host_data->host_poll->sel_ctx, fmtbuf, NULL, 0, outbuf, IPMISELD_EVENT_OUTPUT_BUFLEN, flags)) < 0) { if (_sel_parse_err_handle (host_data, "ipmi_sel_parse_read_record_string") < 0) return (-1); return (0); } if (outbuf_len) ipmiseld_syslog (host_data, "%s", outbuf); host_data->now_host_state.last_record_id.record_id = record_id; return (0); } static int _sel_parse_callback (ipmi_sel_ctx_t ctx, void *callback_data) { ipmiseld_host_data_t *host_data; uint8_t record_type; int record_type_class; int rv = -1; assert (ctx); assert (callback_data); host_data = (ipmiseld_host_data_t *)callback_data; if (host_data->prog_data->args->sensor_types_length || host_data->prog_data->args->exclude_sensor_types_length) { uint8_t sensor_type; int flag; if (ipmi_sel_parse_read_sensor_type (host_data->host_poll->sel_ctx, NULL, 0, &sensor_type) < 0) { if (_sel_parse_err_handle (host_data, "ipmi_sel_parse_read_record_type") < 0) goto cleanup; goto out; } if (host_data->prog_data->args->sensor_types_length) { if ((flag = sensor_type_listed (NULL, sensor_type, host_data->prog_data->args->sensor_types, host_data->prog_data->args->sensor_types_length)) < 0) goto cleanup; if (!flag) goto out; } if (host_data->prog_data->args->exclude_sensor_types_length) { if ((flag = sensor_type_listed (NULL, sensor_type, host_data->prog_data->args->exclude_sensor_types, host_data->prog_data->args->exclude_sensor_types_length)) < 0) goto cleanup; if (flag) goto out; } } if (ipmi_sel_parse_read_record_type (host_data->host_poll->sel_ctx, NULL, 0, &record_type) < 0) { if (_sel_parse_err_handle (host_data, "ipmi_sel_parse_read_record_type") < 0) goto cleanup; goto out; } /* IPMI Workaround * * HP DL 380 G5 * Intel S2600JF/Appro 512X * * Motherboard is reporting invalid SEL Records types (0x00 on HP DL * 380 G5, 0x03 on Intel S2600JF/Appro 512X) */ if (host_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT && (!IPMI_SEL_RECORD_TYPE_VALID (record_type))) record_type = IPMI_SEL_RECORD_TYPE_SYSTEM_EVENT_RECORD; record_type_class = ipmi_sel_record_type_class (record_type); if (host_data->prog_data->args->system_event_only && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) goto out; if (host_data->prog_data->args->oem_event_only && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD && record_type_class != IPMI_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) goto out; if (host_data->prog_data->event_state_filter_mask) { char sel_record[IPMI_SEL_RECORD_MAX_RECORD_LENGTH]; int sel_record_len; unsigned int event_state = 0; if ((sel_record_len = ipmi_sel_parse_read_record (host_data->host_poll->sel_ctx, sel_record, IPMI_SEL_RECORD_MAX_RECORD_LENGTH)) < 0) { if (_sel_parse_err_handle (host_data, "ipmi_sel_parse_read_record_type") < 0) goto cleanup; goto out; } if (ipmi_interpret_sel (host_data->host_poll->interpret_ctx, sel_record, sel_record_len, &event_state) < 0) { ipmiseld_err_output (host_data, "ipmi_interpret_sel: %s", ipmi_interpret_ctx_errormsg (host_data->host_poll->interpret_ctx)); goto cleanup; } if ((host_data->prog_data->event_state_filter_mask & IPMISELD_NOMINAL_FILTER) && event_state == IPMI_INTERPRET_STATE_NOMINAL) goto out; if ((host_data->prog_data->event_state_filter_mask & IPMISELD_WARNING_FILTER) && event_state == IPMI_INTERPRET_STATE_WARNING) goto out; if ((host_data->prog_data->event_state_filter_mask & IPMISELD_CRITICAL_FILTER) && event_state == IPMI_INTERPRET_STATE_CRITICAL) goto out; if ((host_data->prog_data->event_state_filter_mask & IPMISELD_NA_FILTER) && event_state == IPMI_INTERPRET_STATE_UNKNOWN) goto out; } if (_sel_log_output (host_data, record_type) < 0) goto cleanup; out: rv = 0; cleanup: return (rv); } static int ipmiseld_sel_parse_test_run (ipmiseld_host_data_t *host_data) { assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->sel_ctx); if (ipmi_sel_parse (host_data->host_poll->sel_ctx, IPMI_SEL_RECORD_ID_FIRST, IPMI_SEL_RECORD_ID_LAST, _sel_parse_callback, host_data) < 0) { /* A general IPMI error (busy, timeout, etc.) is ok, it happens */ if (ipmi_sel_ctx_errnum (host_data->host_poll->sel_ctx) != IPMI_SEL_ERR_IPMI_ERROR) ipmiseld_err_output (host_data, "ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } return (0); } static void _dump_sel_info (ipmiseld_host_data_t *host_data, ipmiseld_sel_info_t *sel_info, const char *prefix) { assert (host_data); assert (host_data->prog_data->args->foreground); assert (host_data->prog_data->args->common_args.debug); assert (sel_info); assert (prefix); IPMISELD_HOST_DEBUG (("%s: Entries = %u", prefix, sel_info->entries)); IPMISELD_HOST_DEBUG (("%s: Free Space = %u", prefix, sel_info->free_space)); IPMISELD_HOST_DEBUG (("%s: Most Recent Addition Timestamp = %u", prefix, sel_info->most_recent_addition_timestamp)); IPMISELD_HOST_DEBUG (("%s: Most Recent Erase Timestamp = %u", prefix, sel_info->most_recent_erase_timestamp)); IPMISELD_HOST_DEBUG (("%s: Delete Sel Command Supported = %u", prefix, sel_info->delete_sel_command_supported)); IPMISELD_HOST_DEBUG (("%s: Reserve Sel Command Supported = %u", prefix, sel_info->reserve_sel_command_supported)); IPMISELD_HOST_DEBUG (("%s: Overflow Flag = %u", prefix, sel_info->overflow_flag)); } static void _dump_host_state (ipmiseld_host_data_t *host_data, ipmiseld_host_state_t *host_state, const char *prefix) { assert (host_data); assert (host_data->prog_data->args->foreground); assert (host_data->prog_data->args->common_args.debug); assert (host_state); assert (prefix); IPMISELD_HOST_DEBUG (("%s: Last Record ID = %u", prefix, host_state->last_record_id.record_id)); IPMISELD_HOST_DEBUG (("%s: Last Percent Full = %u", prefix, host_state->last_percent_full)); _dump_sel_info (host_data, &(host_state->sel_info), prefix); } /* returns 1 to log events, 0 if not, -1 on error */ static int ipmiseld_check_sel_info (ipmiseld_host_data_t *host_data, uint16_t *record_id_start) { int log_entries_flag = 0; int rv = -1; assert (host_data); assert (record_id_start); if (host_data->now_host_state.sel_info.most_recent_addition_timestamp < host_data->last_host_state.sel_info.most_recent_addition_timestamp || host_data->now_host_state.sel_info.most_recent_erase_timestamp < host_data->last_host_state.sel_info.most_recent_erase_timestamp) { /* This shouldn't be possible under normal circumstances, but * could occur if the user changes the SEL timestamp or clock. * Or perhaps a vendor firmware update or similar action * modified the clock. * * Under this circumstance, we will treat the timestamps has * having changed (note that all checks below are for "not equal * to" and not "greater than" or "less than". We just log to * note this. */ if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL timestamps modified to earlier time"); } if (host_data->now_host_state.sel_info.entries == host_data->last_host_state.sel_info.entries) { /* Small chance entry count is the same after a * out-of-daemon clear. Need to do some checks to handle * for this */ /* Timestamps unchanged - this is the most common/normal case, no new log entries to log. */ if (host_data->now_host_state.sel_info.most_recent_addition_timestamp == host_data->last_host_state.sel_info.most_recent_addition_timestamp && host_data->now_host_state.sel_info.most_recent_erase_timestamp == host_data->last_host_state.sel_info.most_recent_erase_timestamp) { /* nothing to do except this single copy/save */ host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; } /* If erase timestamp changed but addition timestamp has * not. An out-of-daemon delete/clear occurred, but * there are no new entries to log. */ else if (host_data->now_host_state.sel_info.most_recent_addition_timestamp == host_data->last_host_state.sel_info.most_recent_addition_timestamp && host_data->now_host_state.sel_info.most_recent_erase_timestamp != host_data->last_host_state.sel_info.most_recent_erase_timestamp) { if (host_data->now_host_state.sel_info.delete_sel_command_supported) { /* We don't know if the erase was for some old entries or if it was a clear. * We will look at the last_record_id to take a guess */ ipmiseld_last_record_id_t last_record_id; if (ipmiseld_get_last_record_id (host_data, &last_record_id) < 0) goto cleanup; /* If new last_record_id has changed or there are no * records, we assume the erase was a clear */ if (!last_record_id.loaded || last_record_id.record_id != host_data->last_host_state.last_record_id.record_id) host_data->now_host_state.last_record_id.record_id = 0; else host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; } else { /* If delete not supported, the erase must have been a clear. * Reset last_record_id to zero. */ host_data->now_host_state.last_record_id.record_id = 0; } } /* An erase and addition occured, must determine the type of action that occurred */ else if (host_data->now_host_state.sel_info.most_recent_addition_timestamp != host_data->last_host_state.sel_info.most_recent_addition_timestamp && host_data->now_host_state.sel_info.most_recent_erase_timestamp != host_data->last_host_state.sel_info.most_recent_erase_timestamp) { if (host_data->now_host_state.sel_info.delete_sel_command_supported) { /* We don't know if the erase was for some old entries or if it was a clear. * We will look at the last_record_id to take a guess */ ipmiseld_last_record_id_t last_record_id; if (ipmiseld_get_last_record_id (host_data, &last_record_id) < 0) goto cleanup; /* If new last_record_id is greater, we assume it's some additional entries * and the erase was only deleting some old entries. */ if (last_record_id.loaded && last_record_id.record_id > host_data->last_host_state.last_record_id.record_id) { host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; if (host_data->last_host_state.last_record_id.record_id) (*record_id_start) = host_data->last_host_state.last_record_id.record_id; else (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } else { /* We assume a clear occurred so start from the beginning */ host_data->now_host_state.last_record_id.record_id = 0; (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } else { /* If delete not supported, the erase must have been a clear * So log all the new entries if some are available and * reset last_record_id to zero. */ host_data->now_host_state.last_record_id.record_id = 0; if (host_data->now_host_state.sel_info.entries) { (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } } else /* host_data->now_host_state.sel_info.most_recent_addition_timestamp != host_data->last_host_state.sel_info.most_recent_addition_timestamp && host_data->now_host_state.sel_info.most_recent_erase_timestamp == host_data->last_host_state.sel_info.most_recent_erase_timestamp */ { /* This shouldn't be possible and is likely a bug in the * IPMI firmware (user erased entries but timestamp didn't * update, SEL added entries and updated timestamp but * didn't update entry count, etc.) we'll only save off the * host state for later. */ if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL illegal timestamp situation"); host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; } } else if (host_data->now_host_state.sel_info.entries > host_data->last_host_state.sel_info.entries) { ipmiseld_last_record_id_t last_record_id; if (host_data->now_host_state.sel_info.most_recent_addition_timestamp == host_data->last_host_state.sel_info.most_recent_addition_timestamp) { /* This shouldn't be possible and is likely a bug in the * IPMI firmware. Log this, but for rest of this chunk of * code, we assume the addition timestamp must have changed. */ if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL timestamp error, more entries without addition"); } if (ipmiseld_get_last_record_id (host_data, &last_record_id) < 0) goto cleanup; /* There is a small race chance that the last time we got sel * info, a new SEL event occurred after it, but before the call * to ipmi_sel_parse(). So we check what the last record id to * see if that happened. If the last record id is the same, * then we already logged it. So no new logging needs to * happen. */ if (last_record_id.loaded && host_data->last_host_state.last_record_id.record_id == last_record_id.record_id) { /* nothing to do except this single copy/save */ host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; } else if (host_data->now_host_state.sel_info.most_recent_erase_timestamp == host_data->last_host_state.sel_info.most_recent_erase_timestamp) { /* This is the most normal case we should expect, there * are more entries in the SEL than last time we checked * and must log them. */ host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; if (host_data->last_host_state.last_record_id.record_id) (*record_id_start) = host_data->last_host_state.last_record_id.record_id; else (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } else { if (host_data->now_host_state.sel_info.delete_sel_command_supported) { /* If new last_record_id is greater, we assume it's some additional entries * and the erase was only deleting some old entries. */ if (last_record_id.loaded && last_record_id.record_id > host_data->last_host_state.last_record_id.record_id) { host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; if (host_data->last_host_state.last_record_id.record_id) (*record_id_start) = host_data->last_host_state.last_record_id.record_id; else (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } else { /* We assume a clear occurred so start from the beginning */ host_data->now_host_state.last_record_id.record_id = 0; (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } else { /* If delete not supported, the erase must have been a clear * So log all the new entries if some are available and * reset last_record_id to zero. */ host_data->now_host_state.last_record_id.record_id = 0; if (host_data->now_host_state.sel_info.entries) { (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } } } else /* host_data->now_host_state.sel_info.entries < host_data->host_state.sel_info.entries) */ { if (host_data->now_host_state.sel_info.most_recent_erase_timestamp == host_data->last_host_state.sel_info.most_recent_erase_timestamp) { /* This shouldn't be possible and is likely a bug in the * IPMI firmware. Log this, but for rest of this chunk of * code, we assume the erase timestamp must have changed. */ if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "SEL timestamp error, fewer entries without erase"); } /* if no additional entries, nothing to log */ if (host_data->now_host_state.sel_info.most_recent_addition_timestamp != host_data->last_host_state.sel_info.most_recent_addition_timestamp) { if (host_data->now_host_state.sel_info.delete_sel_command_supported) { /* We don't know if the erase was for some old entries or if it was a clear. * We will look at the last_record_id to take a guess */ ipmiseld_last_record_id_t last_record_id; if (ipmiseld_get_last_record_id (host_data, &last_record_id) < 0) goto cleanup; /* If new last_record_id is greater, we assume it's some additional entries * and the erase was only deleting some old entries. */ if (last_record_id.loaded && last_record_id.record_id > host_data->last_host_state.last_record_id.record_id) { host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; if (host_data->last_host_state.last_record_id.record_id) (*record_id_start) = host_data->last_host_state.last_record_id.record_id; else (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } else { /* We assume a clear occurred so start from the beginning */ host_data->now_host_state.last_record_id.record_id = 0; (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } else { /* If delete not supported, the erase must have been a clear * So log all the new entries if some are available and * reset last_record_id to zero. */ host_data->now_host_state.last_record_id.record_id = 0; if (host_data->now_host_state.sel_info.entries) { (*record_id_start) = IPMI_SEL_RECORD_ID_FIRST; log_entries_flag++; } } } else { if (!host_data->now_host_state.sel_info.entries) host_data->now_host_state.last_record_id.record_id = 0; else host_data->now_host_state.last_record_id.record_id = host_data->last_host_state.last_record_id.record_id; } } if (log_entries_flag) rv = 1; else rv = 0; cleanup: return (rv); } /* returns 1 if clear should occur, 0 if not, -1 on error */ static int ipmiseld_check_thresholds (ipmiseld_host_data_t *host_data) { int do_clear_flag = 0; unsigned int percent; int rv = -1; assert (host_data); percent = ipmiseld_calc_percent_full (host_data, &(host_data->now_host_state.sel_info)); if (host_data->prog_data->args->warning_threshold) { if (percent > host_data->prog_data->args->warning_threshold) { if (percent > host_data->last_host_state.last_percent_full) ipmiseld_syslog_host (host_data, "SEL is %d%% full", percent); } } if (!host_data->last_host_state.sel_info.overflow_flag && host_data->now_host_state.sel_info.overflow_flag) ipmiseld_syslog_host (host_data, "SEL Overflow, events have been dropped due to lack of space in the SEL"); if (host_data->prog_data->args->clear_threshold) { if (percent > host_data->prog_data->args->clear_threshold) do_clear_flag = 1; } host_data->now_host_state.last_percent_full = percent; if (do_clear_flag) rv = 1; else rv = 0; return (rv); } /* returns 1 if reserve successful, 0 if not, -1 on error */ static int ipmiseld_sel_reserve (ipmiseld_host_data_t *host_data) { assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->sel_ctx); if (host_data->now_host_state.sel_info.reserve_sel_command_supported) { if (ipmi_sel_ctx_register_reservation_id (host_data->host_poll->sel_ctx, NULL) < 0) { /* If an IPMI error, we assume just can't do reservation, no biggie */ if (ipmi_sel_ctx_errnum (host_data->host_poll->sel_ctx) == IPMI_SEL_ERR_IPMI_ERROR) return (0); ipmiseld_err_output (host_data, "ipmi_sel_ctx_register_reservation_id: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } return (1); } return (0); } static int ipmiseld_sel_log_entries (ipmiseld_host_data_t *host_data, uint16_t record_id_start) { assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->sel_ctx); if (ipmi_sel_parse (host_data->host_poll->sel_ctx, record_id_start, IPMI_SEL_RECORD_ID_LAST, _sel_parse_callback, host_data) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_parse: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } return (0); } static int ipmiseld_save_state (ipmiseld_host_data_t *host_data) { assert (host_data); memcpy (&(host_data->last_host_state), &(host_data->now_host_state), sizeof (ipmiseld_host_state_t)); /* ignore error, continue on even if it fails */ ipmiseld_data_cache_store (host_data); return (0); } /* return 1 - retry immediately, return 0 general success, -1 error */ static int ipmiseld_sel_parse_log (ipmiseld_host_data_t *host_data) { uint16_t record_id_start = 0; int log_entries_flag = 0; int do_clear_flag = 0; int reserve_flag = 0; int retry_flag = 0; int rv = -1; int ret; assert (host_data); if (host_data->prog_data->args->clear_sel && !host_data->clear_sel_done) { if (ipmi_sel_clear_sel (host_data->host_poll->sel_ctx) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_clear_sel: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); goto cleanup; } host_data->clear_sel_done = 1; } if (!host_data->last_host_state.initialized) { if ((ret = ipmiseld_data_cache_load (host_data)) < 0) { if (host_data->prog_data->args->verbose_count) ipmiseld_syslog_host (host_data, "Failed to load cached previous state, some SEL entries maybe missed"); } if (ret <= 0) { if (ipmiseld_host_state_init (host_data) < 0) goto cleanup; if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug) _dump_host_state (host_data, &(host_data->last_host_state), "Initial State"); goto out; } else { if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug) _dump_host_state (host_data, &(host_data->last_host_state), "Loaded State"); } } if (ipmiseld_sel_info_get (host_data, &(host_data->now_host_state.sel_info)) < 0) goto cleanup; if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug) { _dump_host_state (host_data, &(host_data->last_host_state), "Last State"); _dump_sel_info (host_data, &host_data->now_host_state.sel_info, "Current State"); } if ((do_clear_flag = ipmiseld_check_thresholds (host_data)) < 0) goto cleanup; if ((log_entries_flag = ipmiseld_check_sel_info (host_data, &record_id_start)) < 0) goto cleanup; if (do_clear_flag) { if ((reserve_flag = ipmiseld_sel_reserve (host_data)) < 0) goto cleanup; } if (log_entries_flag) { if (ipmiseld_sel_log_entries (host_data, record_id_start) < 0) goto cleanup; } if (do_clear_flag) { ipmiseld_sel_info_t tmp_sel_info; if ((ret = ipmi_sel_clear_sel (host_data->host_poll->sel_ctx)) < 0) { if (reserve_flag && ipmi_sel_ctx_errnum (host_data->host_poll->sel_ctx) == IPMI_SEL_ERR_RESERVATION_CANCELED) retry_flag++; else { ipmiseld_err_output (host_data, "ipmi_sel_clear_sel: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); goto save_state_out; } } ipmiseld_syslog_host (host_data, "SEL cleared"); if (ipmiseld_sel_info_get (host_data, &tmp_sel_info) < 0) goto save_state_out; memcpy (&(host_data->now_host_state.sel_info), &tmp_sel_info, sizeof (ipmiseld_sel_info_t)); host_data->now_host_state.last_record_id.record_id = 0; } save_state_out: host_data->now_host_state.initialized = 1; if (ipmiseld_save_state (host_data) < 0) goto cleanup; out: if (retry_flag) rv = 1; else rv = 0; cleanup: return (rv); } static int ipmiseld_sel_parse (ipmiseld_host_data_t *host_data) { unsigned int retry_count = 0; int rv; assert (host_data); if (host_data->prog_data->args->test_run) return (ipmiseld_sel_parse_test_run (host_data)); while (retry_count < IPMISELD_RETRY_ATTEMPT_MAX) { if ((rv = ipmiseld_sel_parse_log (host_data)) < 0) break; if (!rv) break; retry_count++; } return (rv); } static int _ipmiseld_poll (void *arg) { ipmiseld_host_data_t *host_data; ipmiseld_host_poll_t host_poll; unsigned int sel_flags = 0; unsigned int interpret_flags = 0; int exit_code = EXIT_FAILURE; assert (arg); host_data = (ipmiseld_host_data_t *)arg; assert (!host_data->host_poll); if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug) IPMISELD_DEBUG (("Poll %s", host_data->hostname ? host_data->hostname : "localhost")); memset (&host_poll, '\0', sizeof (ipmiseld_host_poll_t)); host_data->host_poll = &host_poll; if (ipmiseld_ipmi_setup (host_data) < 0) goto cleanup; if (!host_data->prog_data->args->ignore_sdr) { if (ipmiseld_sdr_cache_create_and_load (host_data) < 0) goto cleanup; } else host_data->host_poll->sdr_ctx = NULL; if (!(host_data->host_poll->sel_ctx = ipmi_sel_ctx_create (host_data->host_poll->ipmi_ctx, host_data->host_poll->sdr_ctx))) { ipmiseld_err_output (host_data, "ipmi_sel_ctx_create: %s", strerror (errno)); goto cleanup; } if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug > 1) sel_flags |= IPMI_SEL_FLAGS_DEBUG_DUMP; if (host_data->prog_data->args->common_args.section_specific_workaround_flags & IPMI_PARSE_SECTION_SPECIFIC_WORKAROUND_FLAGS_ASSUME_SYSTEM_EVENT) sel_flags |= IPMI_SEL_FLAGS_ASSUME_SYTEM_EVENT_RECORDS; if (sel_flags) { /* Don't error out, if this fails we can still continue */ if (ipmi_sel_ctx_set_flags (host_data->host_poll->sel_ctx, sel_flags) < 0) ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_flags: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); } if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug > 1 && host_data->hostname) { if (ipmi_sel_ctx_set_debug_prefix (host_data->host_poll->sel_ctx, host_data->hostname) < 0) ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_debug_prefix: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); } if (!(host_data->host_poll->interpret_ctx = ipmi_interpret_ctx_create ())) { ipmiseld_err_output (host_data, "ipmi_interpret_ctx_create: %s", strerror (errno)); goto cleanup; } if (ipmi_interpret_load_sel_config (host_data->host_poll->interpret_ctx, host_data->prog_data->args->event_state_config_file) < 0) { /* if default file is missing its ok */ if (!(!host_data->prog_data->args->event_state_config_file && ipmi_interpret_ctx_errnum (host_data->host_poll->interpret_ctx) == IPMI_INTERPRET_ERR_SEL_CONFIG_FILE_DOES_NOT_EXIST)) { ipmiseld_err_output (host_data, "ipmi_interpret_load_sel_config: %s", ipmi_interpret_ctx_errormsg (host_data->host_poll->interpret_ctx)); goto cleanup; } } if (host_data->prog_data->args->interpret_oem_data) interpret_flags |= IPMI_INTERPRET_FLAGS_INTERPRET_OEM_DATA; if (interpret_flags) { if (ipmi_interpret_ctx_set_flags (host_data->host_poll->interpret_ctx, interpret_flags) < 0) { ipmiseld_err_output (host_data, "ipmi_interpret_ctx_set_flags: %s", ipmi_interpret_ctx_errormsg (host_data->host_poll->interpret_ctx)); goto cleanup; } } if (ipmi_sel_ctx_set_parameter (host_data->host_poll->sel_ctx, IPMI_SEL_PARAMETER_INTERPRET_CONTEXT, &(host_data->host_poll->interpret_ctx)) < 0) { err_output("ipmi_sel_ctx_set_interpret: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); goto cleanup; } if (ipmi_sel_ctx_set_separator (host_data->host_poll->sel_ctx, EVENT_OUTPUT_SEPARATOR) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_separator: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } if (host_data->prog_data->args->interpret_oem_data || host_data->prog_data->args->output_oem_event_strings) { if (ipmi_get_oem_data (NULL, host_data->host_poll->ipmi_ctx, &host_data->host_poll->oem_data) < 0) return (-1); if (ipmi_sel_ctx_set_manufacturer_id (host_data->host_poll->sel_ctx, host_data->host_poll->oem_data.manufacturer_id) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_manufacturer_id: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } if (ipmi_sel_ctx_set_product_id (host_data->host_poll->sel_ctx, host_data->host_poll->oem_data.product_id) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_product_id: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } if (ipmi_sel_ctx_set_ipmi_version (host_data->host_poll->sel_ctx, host_data->host_poll->oem_data.ipmi_version_major, host_data->host_poll->oem_data.ipmi_version_minor) < 0) { ipmiseld_err_output (host_data, "ipmi_sel_ctx_set_ipmi_version: %s", ipmi_sel_ctx_errormsg (host_data->host_poll->sel_ctx)); return (-1); } if (host_data->prog_data->args->interpret_oem_data) { if (ipmi_interpret_ctx_set_manufacturer_id (host_data->host_poll->interpret_ctx, host_data->host_poll->oem_data.manufacturer_id) < 0) { ipmiseld_err_output (host_data, "ipmi_interpret_ctx_set_manufacturer_id: %s", ipmi_interpret_ctx_errormsg (host_data->host_poll->interpret_ctx)); return (-1); } if (ipmi_interpret_ctx_set_product_id (host_data->host_poll->interpret_ctx, host_data->host_poll->oem_data.product_id) < 0) { ipmiseld_err_output (host_data, "ipmi_interpret_ctx_set_product_id: %s", ipmi_interpret_ctx_errormsg (host_data->host_poll->interpret_ctx)); return (-1); } } } if (ipmiseld_sel_parse (host_data) < 0) goto cleanup; exit_code = EXIT_SUCCESS; cleanup: ipmi_interpret_ctx_destroy (host_data->host_poll->interpret_ctx); ipmi_sel_ctx_destroy (host_data->host_poll->sel_ctx); ipmi_sdr_ctx_destroy (host_data->host_poll->sdr_ctx); ipmi_ctx_close (host_data->host_poll->ipmi_ctx); ipmi_ctx_destroy (host_data->host_poll->ipmi_ctx); host_data->host_poll = NULL; return (exit_code); } static int _ipmiseld_poll_postprocess (void *arg) { ipmiseld_host_data_t *host_data; struct timeval tv; int rv = -1; assert (arg); host_data = (ipmiseld_host_data_t *)arg; assert (!host_data->host_poll); gettimeofday (&tv, NULL); host_data->next_poll_time = tv.tv_sec + host_data->prog_data->args->poll_interval; pthread_mutex_lock (&host_data_heap_lock); if (!heap_insert (host_data_heap, host_data)) { pthread_mutex_unlock (&host_data_heap_lock); ipmiseld_err_output (host_data, "heap_insert: %s", strerror (errno)); goto cleanup; } pthread_mutex_unlock (&host_data_heap_lock); rv = 0; cleanup: return (rv); } static void _signal_handler_callback (int sig) { exit_flag = 0; } static void _free_host_data (void *x) { ipmiseld_host_data_t *host_data;; assert (x); host_data = (ipmiseld_host_data_t *)x; free (host_data->hostname); free (host_data); } static ipmiseld_host_data_t * _alloc_host_data (ipmiseld_prog_data_t *prog_data, const char *hostname) { ipmiseld_host_data_t *host_data; assert (prog_data); if (!(host_data = (ipmiseld_host_data_t *) malloc (sizeof (ipmiseld_host_data_t)))) { err_output ("malloc: %s", strerror (errno)); return (NULL); } memset (host_data, '\0', sizeof (ipmiseld_host_data_t)); host_data->prog_data = prog_data; if (hostname) { if (!(host_data->hostname = strdup (hostname))) { err_output ("strdup: %s", strerror (errno)); free (host_data); return (NULL); } } else host_data->hostname = NULL; host_data->host_poll = NULL; host_data->re_download_sdr_done = 0; host_data->clear_sel_done = 0; host_data->next_poll_time = 0; /* 0 will first immediate check first time through */ host_data->last_ipmi_errnum = 0; host_data->last_ipmi_errnum_count = 0; return (host_data); } static int hostdata_timecmp (void *x, void *y) { ipmiseld_host_data_t *hd1, *hd2; assert (x); assert (y); hd1 = (ipmiseld_host_data_t *)x; hd2 = (ipmiseld_host_data_t *)y; if (hd1->next_poll_time < hd2->next_poll_time) return (1); else if (hd1->next_poll_time > hd2->next_poll_time) return (-1); return (0); } static int _ipmiseld (ipmiseld_prog_data_t *prog_data) { int hosts_count = 0; fi_hostlist_t hlist = NULL; fi_hostlist_iterator_t hitr = NULL; ipmiseld_host_data_t *host_data; char *host = NULL; int rv = -1; int ret; assert (prog_data); assert (!host_data_heap); if (prog_data->args->common_args.hostname) { if ((hosts_count = pstdout_hostnames_count (prog_data->args->common_args.hostname)) < 0) { err_output ("pstdout_hostnames_count: %s", pstdout_strerror (pstdout_errnum)); goto cleanup; } if (!hosts_count) { err_output ("invalid number of hosts specified"); goto cleanup; } } else /* inband communication, hosts_count = 1 */ hosts_count = 1; /* don't need more threads than hosts */ if (hosts_count < prog_data->args->threadpool_count) prog_data->args->threadpool_count = hosts_count; if (!(host_data_heap = heap_create (hosts_count, (HeapCmpF)hostdata_timecmp, (HeapDelF)_free_host_data))) { err_output ("heap_create: %s", strerror (errno)); goto cleanup; } if ((ret = pthread_mutex_init (&host_data_heap_lock, NULL))) { err_output ("pthread_mutex_init: %s", strerror (ret)); goto cleanup; } if (hosts_count == 1) { if (!(host_data = _alloc_host_data (prog_data, prog_data->args->common_args.hostname))) goto cleanup; if (!heap_insert (host_data_heap, host_data)) { err_output ("heap_insert: %s", strerror (errno)); goto cleanup; } } else { if (!(hlist = fi_hostlist_create (prog_data->args->common_args.hostname))) { err_output ("fi_hostlist_create: %s", strerror (errno)); goto cleanup; } if (!(hitr = fi_hostlist_iterator_create (hlist))) { err_output ("fi_hostlist_iterator_create: %s", strerror (errno)); goto cleanup; } while ((host = fi_hostlist_next (hitr))) { if (!(host_data = _alloc_host_data (prog_data, host))) goto cleanup; if (!heap_insert (host_data_heap, host_data)) { err_output ("heap_insert: %s", strerror (errno)); goto cleanup; } free(host); } host = NULL; } if (ipmiseld_threadpool_init (prog_data, _ipmiseld_poll, _ipmiseld_poll_postprocess) < 0) goto cleanup; if (prog_data->args->test_run) { while (!heap_is_empty (host_data_heap)) { if (!(host_data = heap_pop (host_data_heap))) { err_output ("heap_pop: %s", strerror (errno)); goto cleanup; } _ipmiseld_poll (host_data); } } else { while (exit_flag) { pthread_mutex_lock (&host_data_heap_lock); host_data = heap_pop (host_data_heap); pthread_mutex_unlock (&host_data_heap_lock); /* empty heap, small chance of this happening, but * everything is processing and previous sleeps didn't sleep * long enough. So we just need to wait until something * else finishes. * * There's no way to know the exact right amount of time, so * we're going to make an estimate. What we'll do is * estimate 1/5th the time of a IPMI session timeout. So in * the event the previous poll fully timed out, we will * interrupt and go through this loop only 5 times. */ if (!host_data) { unsigned int waittime; if (prog_data->args->common_args.session_timeout) waittime = prog_data->args->common_args.session_timeout; else waittime = IPMI_SESSION_TIMEOUT_DEFAULT; /* session timeout is in milliseconds */ waittime /= 1000; /* now take a 5th of it */ waittime /= 5; if (!waittime) waittime = 1; daemon_sleep (waittime); continue; } if (ipmiseld_threadpool_queue (host_data) < 0) { pthread_mutex_lock (&host_data_heap_lock); if (!heap_insert (host_data_heap, host_data)) ipmiseld_err_output (host_data, "heap_insert: %s", strerror (errno)); pthread_mutex_unlock (&host_data_heap_lock); } pthread_mutex_lock (&host_data_heap_lock); host_data = heap_peek (host_data_heap); pthread_mutex_unlock (&host_data_heap_lock); /* empty heap, everything must be processing, so we'll sleep * for the poll interval, b/c no one should be scheduled * until after this time has passed anyways. */ if (!host_data) daemon_sleep (prog_data->args->poll_interval + 1); else { struct timeval tv; gettimeofday (&tv, NULL); /* If next_poll_time == 0, no sleep, its the first time through */ if (host_data->next_poll_time && (host_data->next_poll_time > tv.tv_sec)) daemon_sleep ((host_data->next_poll_time - tv.tv_sec) + 1); } } } rv = 0; cleanup: ipmiseld_threadpool_destroy (); heap_destroy (host_data_heap); fi_hostlist_iterator_destroy (hitr); fi_hostlist_destroy (hlist); free (host); return (rv); } int main (int argc, char **argv) { ipmiseld_prog_data_t prog_data; struct ipmiseld_arguments cmd_args; err_init (argv[0]); err_set_flags (ERROR_STDERR); ipmi_disable_coredump (); prog_data.progname = argv[0]; ipmiseld_argp_parse (argc, argv, &cmd_args); prog_data.args = &cmd_args; if (prog_data.args->event_state_filter_str) prog_data.event_state_filter_mask = ipmiseld_event_state_filter_parse (prog_data.args->event_state_filter_str); else prog_data.event_state_filter_mask = 0; if (prog_data.args->log_facility_str) prog_data.log_facility = ipmiseld_log_facility_parse (prog_data.args->log_facility_str); else prog_data.log_facility = LOG_DAEMON; if (prog_data.args->log_priority_str) prog_data.log_priority = ipmiseld_log_priority_parse (prog_data.args->log_priority_str); else prog_data.log_priority = LOG_ERR; if (!cmd_args.test_run) { if (!cmd_args.foreground) { daemonize_common (IPMISELD_PIDFILE); err_set_flags (ERROR_SYSLOG); } else err_set_flags (ERROR_STDERR); daemon_signal_handler_setup (_signal_handler_callback); /* Call after daemonization, since daemonization closes currently * open fds */ if (argv[0][0] == '/') argv[0] = strrchr(argv[0], '/') + 1; openlog (argv[0], LOG_ODELAY | LOG_PID, prog_data.log_facility); } return (_ipmiseld (&prog_data)); } freeipmi-1.6.4/ipmiseld/ipmiseld.h0000644002055400205540000001414613527331636017056 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_H #define IPMISELD_H #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #if TIME_WITH_SYS_TIME #include #include #else /* !TIME_WITH_SYS_TIME */ #if HAVE_SYS_TIME_H #include #else /* !HAVE_SYS_TIME_H */ #include #endif /* !HAVE_SYS_TIME_H */ #endif /* !TIME_WITH_SYS_TIME */ #include #include "tool-cmdline-common.h" #include "tool-oem-common.h" #include "tool-sensor-common.h" #define IPMISELD_WARNING_THRESHOLD_DEFAULT 80 #define IPMISELD_CLEAR_THRESHOLD_DEFAULT 0 #define IPMISELD_SYSTEM_EVENT_FORMAT_STR_DEFAULT "SEL System Event: %d, %t, %s, %I, %E" #define IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_STR_DEFAULT "SEL OEM Event: %d, %t, %I, %o" #define IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_STR_DEFAULT "SEL OEM Event: %I, %o" #define IPMISELD_SYSTEM_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT "SEL System Event(%h): %d, %t, %s, %I, %E" #define IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT "SEL OEM Event(%h): %d, %t, %I, %o" #define IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_OUTOFBAND_STR_DEFAULT "SEL OEM Event(%h): %I, %o" #define IPMISELD_POLL_INTERVAL_DEFAULT 300 #define IPMISELD_THREADPOOL_COUNT 8 #define IPMISELD_ERROR_OUTPUT_LIMIT 20 enum ipmiseld_argp_option_keys { IPMISELD_VERBOSE_KEY = 'v', IPMISELD_SENSOR_TYPES_KEY = 't', IPMISELD_EXCLUDE_SENSOR_TYPES_KEY = 'T', IPMISELD_SYSTEM_EVENT_ONLY_KEY = 160, IPMISELD_OEM_EVENT_ONLY_KEY = 161, IPMISELD_EVENT_STATE_CONFIG_FILE_KEY = 162, IPMISELD_INTERPRET_OEM_DATA_KEY = 163, IPMISELD_OUTPUT_OEM_EVENT_STRINGS_KEY = 164, IPMISELD_ENTITY_SENSOR_NAMES_KEY = 165, IPMISELD_NON_ABBREVIATED_UNITS_KEY = 166, IPMISELD_EVENT_STATE_FILTER_KEY = 167, IPMISELD_WARNING_THRESHOLD_KEY = 168, IPMISELD_CLEAR_THRESHOLD_KEY = 169, IPMISELD_SYSTEM_EVENT_FORMAT_KEY = 170, IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_KEY = 171, IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_KEY = 172, IPMISELD_POLL_INTERVAL_KEY = 173, IPMISELD_LOG_FACILITY_KEY = 174, IPMISELD_LOG_PRIORITY_KEY = 175, IPMISELD_CACHE_DIRECTORY_KEY = 176, IPMISELD_IGNORE_SDR_KEY = 177, IPMISELD_RE_DOWNLOAD_SDR_KEY = 178, IPMISELD_CLEAR_SEL_KEY = 179, IPMISELD_THREADPOOL_COUNT_KEY = 180, IPMISELD_TEST_RUN_KEY = 181, IPMISELD_FOREGROUND_KEY = 182, }; struct ipmiseld_arguments { struct common_cmd_args common_args; unsigned int verbose_count; char sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int sensor_types_length; char exclude_sensor_types[MAX_SENSOR_TYPES][MAX_SENSOR_TYPES_STRING_LENGTH+1]; unsigned int exclude_sensor_types_length; int system_event_only; int oem_event_only; char *event_state_config_file; int interpret_oem_data; int output_oem_event_strings; int entity_sensor_names; int non_abbreviated_units; char *event_state_filter_str; unsigned int warning_threshold; unsigned int clear_threshold; char *system_event_format_str; char *oem_timestamped_event_format_str; char *oem_non_timestamped_event_format_str; unsigned int poll_interval; char *log_facility_str; char *log_priority_str; char *cache_directory; int ignore_sdr; int re_download_sdr; int clear_sel; unsigned int threadpool_count; int test_run; int foreground; }; typedef struct ipmiseld_prog_data { char *progname; int event_state_filter_mask; int log_facility; int log_priority; struct ipmiseld_arguments *args; } ipmiseld_prog_data_t; typedef struct ipmiseld_last_record_id { uint16_t record_id; int loaded; } ipmiseld_last_record_id_t; typedef struct ipmiseld_sel_info { uint16_t entries; uint16_t free_space; uint32_t most_recent_addition_timestamp; uint32_t most_recent_erase_timestamp; uint8_t delete_sel_command_supported; uint8_t reserve_sel_command_supported; uint8_t overflow_flag; } ipmiseld_sel_info_t; typedef struct ipmiseld_host_state { ipmiseld_last_record_id_t last_record_id; unsigned int last_percent_full; ipmiseld_sel_info_t sel_info; int initialized; } ipmiseld_host_state_t; typedef struct ipmiseld_host_poll { ipmi_ctx_t ipmi_ctx; ipmi_sdr_ctx_t sdr_ctx; ipmi_sel_ctx_t sel_ctx; ipmi_interpret_ctx_t interpret_ctx; struct ipmi_oem_data oem_data; } ipmiseld_host_poll_t; typedef struct ipmiseld_host_data { ipmiseld_prog_data_t *prog_data; char *hostname; ipmiseld_host_state_t last_host_state; ipmiseld_host_state_t now_host_state; ipmiseld_host_poll_t *host_poll; int re_download_sdr_done; int clear_sel_done; time_t next_poll_time; int last_ipmi_errnum; unsigned int last_ipmi_errnum_count; } ipmiseld_host_data_t; #endif /* IPMISELD_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-argp.c0000644002055400205540000004740313527331636020002 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_ARGP_H #include #else /* !HAVE_ARGP_H */ #include "freeipmi-argp.h" #endif /* !HAVE_ARGP_H */ #include #include "ipmiseld.h" #include "ipmiseld-argp.h" #include "ipmiseld-common.h" #include "freeipmi-portability.h" #include "tool-cmdline-common.h" #include "tool-config-file-common.h" #include "error.h" const char *argp_program_version = "ipmiseld - " PACKAGE_VERSION "\n" "Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC.\n" "This program is free software; you may redistribute it under the terms of\n" "the GNU General Public License. This program has absolutely no warranty."; const char *argp_program_bug_address = "<" PACKAGE_BUGREPORT ">"; static char cmdline_doc[] = "ipmiseld - IPMI SEL syslog logging daemon"; static char cmdline_args_doc[] = ""; static struct argp_option cmdline_options[] = { ARGP_COMMON_OPTIONS_DRIVER, ARGP_COMMON_OPTIONS_INBAND, ARGP_COMMON_OPTIONS_OUTOFBAND_HOSTRANGED, ARGP_COMMON_OPTIONS_AUTHENTICATION_TYPE, ARGP_COMMON_OPTIONS_CIPHER_SUITE_ID, ARGP_COMMON_OPTIONS_PRIVILEGE_LEVEL, ARGP_COMMON_OPTIONS_CONFIG_FILE, ARGP_COMMON_OPTIONS_WORKAROUND_FLAGS, ARGP_COMMON_OPTIONS_DEBUG, { "verbose", IPMISELD_VERBOSE_KEY, 0, 0, "Increase verbosity in output.", 40}, { "sensor-types", IPMISELD_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Show sensors of a specific type.", 41}, { "exclude-sensor-types", IPMISELD_EXCLUDE_SENSOR_TYPES_KEY, "SENSOR-TYPES-LIST", 0, "Do not show sensors of a specific type.", 42}, { "system-event-only", IPMISELD_SYSTEM_EVENT_ONLY_KEY, 0, 0, "Output only system event records (i.e. don't output OEM records).", 43}, { "oem-event-only", IPMISELD_OEM_EVENT_ONLY_KEY, 0, 0, "Output only OEM event records.", 44}, { "event-state-config-file", IPMISELD_EVENT_STATE_CONFIG_FILE_KEY, "FILE", 0, "Specify an alternate event state configuration file.", 45}, { "interpret-oem-data", IPMISELD_INTERPRET_OEM_DATA_KEY, NULL, 0, "Attempt to interpret OEM data.", 46}, { "output-oem-event-strings", IPMISELD_OUTPUT_OEM_EVENT_STRINGS_KEY, NULL, 0, "Attempt to output OEM event strings.", 47}, { "entity-sensor-names", IPMISELD_ENTITY_SENSOR_NAMES_KEY, NULL, 0, "Output sensor names with entity ids and instances.", 48}, { "non-abbreviated-units", IPMISELD_NON_ABBREVIATED_UNITS_KEY, 0, 0, "Output non-abbreviated units (e.g. 'Amps' instead of 'A').", 49}, { "event-state-filter", IPMISELD_EVENT_STATE_FILTER_KEY, "FILTERSTRING", 0, "Specify event states to filter out and not log.", 50}, { "warning-threshold", IPMISELD_WARNING_THRESHOLD_KEY, "PERCENTINT", 0, "Specify SEL fullness warning threshold as an integer percentage.", 51}, { "clear-threshold", IPMISELD_CLEAR_THRESHOLD_KEY, "PERCENTINT", 0, "Specify SEL fullness clear threshold as an integer percentage.", 52}, { "system-event-format", IPMISELD_SYSTEM_EVENT_FORMAT_KEY, "FORMATSTRING", 0, "Specify format for system event outputs.", 53}, { "oem-timestamped-event-format", IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_KEY, "FORMATSTRING", 0, "Specify format for oem timestamped event outputs.", 54}, { "oem-non-timestamped-event-format", IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_KEY, "FORMATSTRING", 0, "Specify format for oem non-timestamped event outputs.", 55}, { "poll-interval", IPMISELD_POLL_INTERVAL_KEY, "SECONDS", 0, "Specify poll interval to check the SEL for new events.", 56}, { "log-facility", IPMISELD_LOG_FACILITY_KEY, "STRING", 0, "Specify syslog log facility.", 57}, { "log-priority", IPMISELD_LOG_PRIORITY_KEY, "STRING", 0, "Specify syslog log priority.", 58}, { "cache-directory", IPMISELD_CACHE_DIRECTORY_KEY, "DIRECTORY", 0, "Specify alternate cache directory.", 59}, { "ignore-sdr", IPMISELD_IGNORE_SDR_KEY, 0, 0, "Ignore SDR related processing.", 60}, { "re-download-sdr", IPMISELD_RE_DOWNLOAD_SDR_KEY, 0, 0, "Re-download the SDR even if it is not out of date.", 61}, { "clear-sel", IPMISELD_CLEAR_SEL_KEY, 0, 0, "Clear SEL on startup.", 62}, { "threadpool-count", IPMISELD_THREADPOOL_COUNT_KEY, "NUM", 0, "Specify threadpool count for parallel SEL polling.", 63}, { "test-run", IPMISELD_TEST_RUN_KEY, 0, 0, "Do not daemonize, output current SEL as test of current settings.", 64}, { "foreground", IPMISELD_FOREGROUND_KEY, 0, 0, "Run daemon in foreground.", 65}, { NULL, 0, NULL, 0, NULL, 0} }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state); static struct argp cmdline_argp = { cmdline_options, cmdline_parse, cmdline_args_doc, cmdline_doc }; static struct argp cmdline_config_file_argp = { cmdline_options, cmdline_config_file_parse, cmdline_args_doc, cmdline_doc }; static error_t cmdline_parse (int key, char *arg, struct argp_state *state) { struct ipmiseld_arguments *cmd_args; char *endptr; int tmp; assert (state); cmd_args = state->input; switch (key) { case IPMISELD_VERBOSE_KEY: cmd_args->verbose_count++; break; case IPMISELD_SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_ALL_STRING, cmd_args->sensor_types, &(cmd_args->sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case IPMISELD_EXCLUDE_SENSOR_TYPES_KEY: if (parse_sensor_types (SENSOR_PARSE_NONE_STRING, cmd_args->exclude_sensor_types, &(cmd_args->exclude_sensor_types_length), arg) < 0) exit (EXIT_FAILURE); break; case IPMISELD_SYSTEM_EVENT_ONLY_KEY: cmd_args->system_event_only = 1; break; case IPMISELD_OEM_EVENT_ONLY_KEY: cmd_args->oem_event_only = 1; break; case IPMISELD_EVENT_STATE_CONFIG_FILE_KEY: if (!(cmd_args->event_state_config_file = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_INTERPRET_OEM_DATA_KEY: cmd_args->interpret_oem_data = 1; break; case IPMISELD_OUTPUT_OEM_EVENT_STRINGS_KEY: cmd_args->output_oem_event_strings = 1; break; case IPMISELD_ENTITY_SENSOR_NAMES_KEY: cmd_args->entity_sensor_names = 1; break; case IPMISELD_NON_ABBREVIATED_UNITS_KEY: cmd_args->non_abbreviated_units = 1; break; case IPMISELD_EVENT_STATE_FILTER_KEY: if (!(cmd_args->event_state_filter_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_WARNING_THRESHOLD_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0 || tmp > 100) { fprintf (stderr, "invalid warning threshold\n"); exit (EXIT_FAILURE); } cmd_args->warning_threshold = tmp; break; case IPMISELD_CLEAR_THRESHOLD_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp < 0 || tmp > 100) { fprintf (stderr, "invalid clear threshold\n"); exit (EXIT_FAILURE); } cmd_args->clear_threshold = tmp; break; case IPMISELD_SYSTEM_EVENT_FORMAT_KEY: if (!(cmd_args->system_event_format_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_OEM_TIMESTAMPED_EVENT_FORMAT_KEY: if (!(cmd_args->oem_timestamped_event_format_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_OEM_NON_TIMESTAMPED_EVENT_FORMAT_KEY: if (!(cmd_args->oem_non_timestamped_event_format_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_POLL_INTERVAL_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid poll interval\n"); exit (EXIT_FAILURE); } cmd_args->poll_interval = tmp; break; case IPMISELD_LOG_FACILITY_KEY: if (!(cmd_args->log_facility_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_LOG_PRIORITY_KEY: if (!(cmd_args->log_priority_str = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_CACHE_DIRECTORY_KEY: if (!(cmd_args->cache_directory = strdup (arg))) { perror ("strdup"); exit (EXIT_FAILURE); } break; case IPMISELD_IGNORE_SDR_KEY: cmd_args->ignore_sdr = 1; break; case IPMISELD_RE_DOWNLOAD_SDR_KEY: cmd_args->re_download_sdr = 1; break; case IPMISELD_CLEAR_SEL_KEY: cmd_args->clear_sel = 1; break; case IPMISELD_THREADPOOL_COUNT_KEY: errno = 0; tmp = strtol (arg, &endptr, 0); if (errno || endptr[0] != '\0' || tmp <= 0) { fprintf (stderr, "invalid threadpool count\n"); exit (EXIT_FAILURE); } cmd_args->threadpool_count = tmp; break; case IPMISELD_TEST_RUN_KEY: cmd_args->test_run = 1; break; case IPMISELD_FOREGROUND_KEY: cmd_args->foreground = 1; break; case ARGP_KEY_ARG: /* Too many arguments. */ argp_usage (state); break; case ARGP_KEY_END: break; default: return (common_parse_opt (key, arg, &(cmd_args->common_args))); } return (0); } static void _ipmiseld_config_file_parse (struct ipmiseld_arguments *cmd_args) { struct config_file_data_ipmiseld config_file_data; char *filename; int no_error_if_not_found; assert (cmd_args); memset (&config_file_data, '\0', sizeof (struct config_file_data_ipmiseld)); /* Force use of ipmiseld config file, we don't want the standard freeipmi one */ if (cmd_args->common_args.config_file) { filename = cmd_args->common_args.config_file; no_error_if_not_found = 0; } else { filename = IPMISELD_CONFIG_FILE_DEFAULT; no_error_if_not_found = 1; } /* if returns < 0, file not found * will exit on fatal error within func */ if (config_file_parse (filename, no_error_if_not_found, &(cmd_args->common_args), CONFIG_FILE_INBAND | CONFIG_FILE_OUTOFBAND, CONFIG_FILE_TOOL_IPMISELD, &config_file_data) < 0) return; /* normally require user to input on command line, but because this * is a daemon, we allow hostname config */ if (config_file_data.hostname_count) cmd_args->common_args.hostname = config_file_data.hostname; if (config_file_data.verbose_count_count) cmd_args->verbose_count = config_file_data.verbose_count; if (config_file_data.sensor_types_count && config_file_data.sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.sensor_types_length; i++) strncpy (cmd_args->sensor_types[i], config_file_data.sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->sensor_types_length = config_file_data.sensor_types_length; } if (config_file_data.exclude_sensor_types_count && config_file_data.exclude_sensor_types_length) { unsigned int i; assert(MAX_SENSOR_TYPES == CONFIG_FILE_MAX_SENSOR_TYPES); assert(MAX_SENSOR_TYPES_STRING_LENGTH == CONFIG_FILE_MAX_SENSOR_TYPES_STRING_LENGTH); for (i = 0; i < config_file_data.exclude_sensor_types_length; i++) strncpy (cmd_args->exclude_sensor_types[i], config_file_data.exclude_sensor_types[i], MAX_SENSOR_TYPES_STRING_LENGTH); cmd_args->exclude_sensor_types_length = config_file_data.exclude_sensor_types_length; } if (config_file_data.system_event_only_count) cmd_args->system_event_only = config_file_data.system_event_only; if (config_file_data.oem_event_only_count) cmd_args->oem_event_only = config_file_data.oem_event_only; if (config_file_data.event_state_config_file_count) cmd_args->event_state_config_file = config_file_data.event_state_config_file; if (config_file_data.interpret_oem_data_count) cmd_args->interpret_oem_data = config_file_data.interpret_oem_data; if (config_file_data.output_oem_event_strings_count) cmd_args->output_oem_event_strings = config_file_data.output_oem_event_strings; if (config_file_data.entity_sensor_names_count) cmd_args->entity_sensor_names = config_file_data.entity_sensor_names; if (config_file_data.non_abbreviated_units_count) cmd_args->non_abbreviated_units = config_file_data.non_abbreviated_units; if (config_file_data.event_state_filter_str_count) cmd_args->event_state_filter_str = config_file_data.event_state_filter_str; if (config_file_data.warning_threshold_count) cmd_args->warning_threshold = config_file_data.warning_threshold; if (config_file_data.clear_threshold_count) cmd_args->clear_threshold = config_file_data.clear_threshold; if (config_file_data.system_event_format_str_count) cmd_args->system_event_format_str = config_file_data.system_event_format_str; if (config_file_data.oem_timestamped_event_format_str_count) cmd_args->oem_timestamped_event_format_str = config_file_data.oem_timestamped_event_format_str; if (config_file_data.oem_non_timestamped_event_format_str_count) cmd_args->oem_non_timestamped_event_format_str = config_file_data.oem_non_timestamped_event_format_str; if (config_file_data.poll_interval_count) cmd_args->poll_interval = config_file_data.poll_interval; if (config_file_data.log_facility_str_count) cmd_args->log_facility_str = config_file_data.log_facility_str; if (config_file_data.log_priority_str_count) cmd_args->log_priority_str = config_file_data.log_priority_str; if (config_file_data.cache_directory_count) cmd_args->cache_directory = config_file_data.cache_directory; if (config_file_data.ignore_sdr_count) cmd_args->ignore_sdr = config_file_data.ignore_sdr; if (config_file_data.re_download_sdr_count) cmd_args->re_download_sdr = config_file_data.re_download_sdr; if (config_file_data.clear_sel_count) cmd_args->clear_sel = config_file_data.clear_sel; if (config_file_data.threadpool_count_count) cmd_args->threadpool_count = config_file_data.threadpool_count; } static void _ipmiseld_args_validate (struct ipmiseld_arguments *cmd_args) { assert (cmd_args); if (cmd_args->sensor_types_length) { if (valid_sensor_types (cmd_args->sensor_types, cmd_args->sensor_types_length) < 0) exit (EXIT_FAILURE); } if (cmd_args->exclude_sensor_types_length) { if (valid_sensor_types (cmd_args->exclude_sensor_types, cmd_args->exclude_sensor_types_length) < 0) exit (EXIT_FAILURE); } if (cmd_args->event_state_filter_str) { if (ipmiseld_event_state_filter_parse (cmd_args->event_state_filter_str) < 0) err_exit ("Invalid event state filter specified\n"); } if (cmd_args->log_facility_str) { if (ipmiseld_log_facility_parse (cmd_args->log_facility_str) < 0) err_exit ("Invalid log facility specified\n"); } if (cmd_args->log_priority_str) { if (ipmiseld_log_priority_parse (cmd_args->log_priority_str) < 0) err_exit ("Invalid log priority specified\n"); } if (cmd_args->cache_directory) { if (access (cmd_args->cache_directory, R_OK|W_OK|X_OK) < 0) { err_exit ("insufficient permission on cache directory '%s'", cmd_args->cache_directory); exit (EXIT_FAILURE); } } } void ipmiseld_argp_parse (int argc, char **argv, struct ipmiseld_arguments *cmd_args) { unsigned int i; assert (argc >= 0); assert (argv); assert (cmd_args); init_common_cmd_args_operator (&(cmd_args->common_args)); cmd_args->verbose_count = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->sensor_types_length = 0; for (i = 0; i < MAX_SENSOR_TYPES; i++) memset (cmd_args->exclude_sensor_types[i], '\0', MAX_SENSOR_TYPES_STRING_LENGTH+1); cmd_args->exclude_sensor_types_length = 0; cmd_args->system_event_only = 0; cmd_args->oem_event_only = 0; cmd_args->event_state_config_file = NULL; cmd_args->interpret_oem_data = 0; cmd_args->output_oem_event_strings = 0; cmd_args->entity_sensor_names = 0; cmd_args->non_abbreviated_units = 0; cmd_args->event_state_filter_str = NULL; cmd_args->warning_threshold = IPMISELD_WARNING_THRESHOLD_DEFAULT; cmd_args->clear_threshold = IPMISELD_CLEAR_THRESHOLD_DEFAULT; cmd_args->system_event_format_str = NULL; cmd_args->oem_timestamped_event_format_str = NULL; cmd_args->oem_non_timestamped_event_format_str = NULL; cmd_args->poll_interval = IPMISELD_POLL_INTERVAL_DEFAULT; cmd_args->log_facility_str = NULL; cmd_args->log_priority_str = NULL; cmd_args->cache_directory = NULL; cmd_args->ignore_sdr = 0; cmd_args->re_download_sdr = 0; cmd_args->clear_sel = 0; cmd_args->threadpool_count = IPMISELD_THREADPOOL_COUNT; cmd_args->test_run = 0; cmd_args->foreground = 0; argp_parse (&cmdline_config_file_argp, argc, argv, ARGP_IN_ORDER, NULL, &(cmd_args->common_args)); _ipmiseld_config_file_parse (cmd_args); argp_parse (&cmdline_argp, argc, argv, ARGP_IN_ORDER, NULL, cmd_args); verify_common_cmd_args (&(cmd_args->common_args)); _ipmiseld_args_validate (cmd_args); } freeipmi-1.6.4/ipmiseld/ipmiseld-argp.h0000644002055400205540000000267113527331636020005 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_ARGP_H #define IPMISELD_ARGP_H #include "ipmiseld.h" void ipmiseld_argp_parse (int argc, char **argv, struct ipmiseld_arguments *cmd_args); #endif /* IPMISELD_ARGP_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-cache.c0000644002055400205540000004247713527331636020122 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifdef HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #if HAVE_FCNTL_H #include #endif /* HAVE_FCNTL_H */ #include /* MAXPATHLEN */ #include #include #include "ipmiseld.h" #include "ipmiseld-cache.h" #include "ipmiseld-common.h" #include "ipmiseld-debug.h" #include "freeipmi-portability.h" #include "error.h" #include "fd.h" #ifndef MAXPATHLEN #define MAXPATHLEN 4096 #endif /* MAXPATHLEN */ #define IPMISELD_CACHE_INBAND "localhost" #define IPMISELD_SDR_CACHE_FILENAME "ipmiseldsdrcache" /* * Data Cache Format * * All numbers stored little endian * * uint32_t file_magic * uint32_t file_version_ * uint16_t last_record_id * uint32_t last_percent_full * uint16_t entries * uint16_t free_space; * uint32_t most_recent_addition_timestamp; * uint32_t most_recent_erase_timestamp; * uint8_t delete_sel_command_supported; * uint8_t reserve_sel_command_supported; * uint8_t overflow_flag; * uint8_t zerosumchecksum; */ #define IPMISELD_DATA_CACHE_FILENAME "ipmiselddata" #define IPMISELD_DATA_CACHE_FILE_MAGIC 0x4A1B11E6 #define IPMISELD_DATA_CACHE_FILE_VERSION 0x00000001 #define IPMISELD_DATA_CACHE_LENGTH (4 + 4 + 2 + 4 + 2 + 2 + 4 + 4 + 1 + 1 + 1 + 1) static int _ipmiseld_sdr_cache_create (ipmiseld_host_data_t *host_data, char *filename) { assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->sdr_ctx); assert (host_data->host_poll->ipmi_ctx); assert (filename && strlen (filename)); if (ipmi_sdr_cache_create (host_data->host_poll->sdr_ctx, host_data->host_poll->ipmi_ctx, filename, IPMI_SDR_CACHE_CREATE_FLAGS_DEFAULT, NULL, NULL) < 0) { if (ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_FILENAME_INVALID || ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_FILESYSTEM || ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_PERMISSION) ipmiseld_err_output (host_data, "Error creating SDR cache '%s': %s", filename, ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); else ipmiseld_err_output (host_data, "ipmi_sdr_cache_create: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); return (-1); } return (0); } int ipmiseld_sdr_cache_create_and_load (ipmiseld_host_data_t *host_data) { char filename[MAXPATHLEN+1]; char *sdr_cache_dir; char *hostname; assert (host_data); assert (host_data->host_poll); assert (host_data->host_poll->ipmi_ctx); memset (filename, '\0', MAXPATHLEN + 1); if (!(host_data->host_poll->sdr_ctx = ipmi_sdr_ctx_create ())) { ipmiseld_err_output (host_data, "ipmi_sdr_ctx_create: %s", strerror (errno)); goto cleanup; } if (host_data->prog_data->args->foreground && host_data->prog_data->args->common_args.debug > 1) { /* Don't error out, if this fails we can still continue */ if (ipmi_sdr_ctx_set_flags (host_data->host_poll->sdr_ctx, IPMI_SDR_FLAGS_DEBUG_DUMP) < 0) ipmiseld_err_output (host_data, "ipmi_sdr_ctx_set_flags: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); if (host_data->hostname) { if (ipmi_sdr_ctx_set_debug_prefix (host_data->host_poll->sdr_ctx, host_data->hostname) < 0) ipmiseld_err_output (host_data, "ipmi_sdr_ctx_set_debug_prefix: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); } } if (host_data->prog_data->args->cache_directory) sdr_cache_dir = host_data->prog_data->args->cache_directory; else sdr_cache_dir = IPMISELD_CACHE_DIRECTORY; hostname = host_data->hostname; if (!hostname) hostname = IPMISELD_CACHE_INBAND; snprintf (filename, MAXPATHLEN, "%s/%s.%s", sdr_cache_dir, IPMISELD_SDR_CACHE_FILENAME, hostname); if (host_data->prog_data->args->re_download_sdr && !host_data->re_download_sdr_done) { if (host_data->prog_data->args->common_args.debug) IPMISELD_HOST_DEBUG (("SDR cache - deleting")); if (ipmi_sdr_cache_delete (host_data->host_poll->sdr_ctx, filename) < 0) { ipmiseld_err_output (host_data, "ipmi_sdr_cache_delete: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); goto cleanup; } host_data->re_download_sdr_done = 1; } if (ipmi_sdr_cache_open (host_data->host_poll->sdr_ctx, host_data->host_poll->ipmi_ctx, filename) < 0) { if (ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_CACHE_READ_CACHE_DOES_NOT_EXIST) { if (host_data->prog_data->args->common_args.debug) IPMISELD_HOST_DEBUG (("SDR cache not available - creating")); if (_ipmiseld_sdr_cache_create (host_data, filename) < 0) goto cleanup; } else if (ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_CACHE_INVALID || ipmi_sdr_ctx_errnum (host_data->host_poll->sdr_ctx) == IPMI_SDR_ERR_CACHE_OUT_OF_DATE) { if (host_data->prog_data->args->common_args.debug) IPMISELD_HOST_DEBUG (("SDR cache invalid - delete and recreate cache")); if (ipmi_sdr_cache_delete (host_data->host_poll->sdr_ctx, filename) < 0) { ipmiseld_err_output (host_data, "ipmi_sdr_cache_delete: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); goto cleanup; } if (_ipmiseld_sdr_cache_create (host_data, filename) < 0) goto cleanup; } else { ipmiseld_err_output (host_data, "ipmi_sdr_cache_open: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); goto cleanup; } /* 2nd try after the sdr was retrieved */ if (ipmi_sdr_cache_open (host_data->host_poll->sdr_ctx, host_data->host_poll->ipmi_ctx, filename) < 0) { ipmiseld_err_output (host_data, "ipmi_sdr_cache_open: %s", ipmi_sdr_ctx_errormsg (host_data->host_poll->sdr_ctx)); goto cleanup; } } return (0); cleanup: if (strlen (filename)) ipmi_sdr_cache_delete (host_data->host_poll->sdr_ctx, filename); ipmi_sdr_ctx_destroy (host_data->host_poll->sdr_ctx); return (-1); } static void _data_cache_filename (ipmiseld_host_data_t *host_data, char *filename_buf, unsigned int filename_buflen) { char *sdr_cache_dir; char *hostname; assert (host_data); assert (filename_buf); assert (filename_buflen); if (host_data->prog_data->args->cache_directory) sdr_cache_dir = host_data->prog_data->args->cache_directory; else sdr_cache_dir = IPMISELD_CACHE_DIRECTORY; hostname = host_data->hostname; if (!hostname) hostname = IPMISELD_CACHE_INBAND; snprintf (filename_buf, filename_buflen, "%s/%s.%s", sdr_cache_dir, IPMISELD_DATA_CACHE_FILENAME, hostname); } static unsigned int _unmarshall_uint32 (uint8_t *databuf, uint32_t *value) { assert (databuf); assert (value); /* stored little endian */ (*value) = databuf[0]; (*value) |= (databuf[1] << 8); (*value) |= (databuf[2] << 16); (*value) |= (databuf[3] << 24); return (sizeof (uint32_t)); } static unsigned int _unmarshall_uint16 (uint8_t *databuf, uint16_t *value) { assert (databuf); assert (value); /* stored little endian */ (*value) = databuf[0]; (*value) |= (databuf[1] << 8); return (sizeof (uint16_t)); } static unsigned int _unmarshall_uint8 (uint8_t *databuf, uint8_t *value) { assert (databuf); assert (value); (*value) = databuf[0]; return (sizeof (uint8_t)); } /* returns 1 on data found/loaded, 0 if not found, -1 on error loading * (permission, corrupted, etc.) */ int ipmiseld_data_cache_load (ipmiseld_host_data_t *host_data) { uint32_t file_magic; uint32_t file_version; uint8_t zerosumchecksum = 0; char filename[MAXPATHLEN+1]; uint8_t databuf[IPMISELD_DATA_CACHE_LENGTH]; unsigned int databuf_offset = 0; int databuflen; unsigned int i; int fd = -1; int rv = -1; assert (host_data); memset (filename, '\0', MAXPATHLEN + 1); _data_cache_filename (host_data, filename, MAXPATHLEN); if (access (filename, F_OK) < 0) { if (errno != ENOENT) { ipmiseld_err_output (host_data,"Error finding '%s': %s", filename, strerror (errno)); goto cleanup; } rv = 0; goto cleanup; } else { if (access (filename, R_OK) < 0) { ipmiseld_err_output (host_data, "Error read accesing '%s': %s", filename, strerror (errno)); goto cleanup; } } if ((fd = open (filename, O_RDONLY)) < 0) { ipmiseld_err_output (host_data, "Error opening '%s': %s", filename, strerror (errno)); goto cleanup; } if ((databuflen = fd_read_n (fd, databuf, IPMISELD_DATA_CACHE_LENGTH)) < 0) { ipmiseld_err_output (host_data, "fd_write_n: %s", strerror (errno)); goto cleanup; } if (databuflen < IPMISELD_DATA_CACHE_LENGTH) { ipmiseld_err_output (host_data, "invalid read length = %d", databuflen); goto cleanup; } for (i = 0; i < databuflen; i++) zerosumchecksum += databuf[i]; if (zerosumchecksum) { ipmiseld_err_output (host_data, "data cache corrupted"); goto cleanup; } databuf_offset += _unmarshall_uint32 (databuf + databuf_offset, &file_magic); if (file_magic != IPMISELD_DATA_CACHE_FILE_MAGIC) { ipmiseld_err_output (host_data, "data cache corrupted"); goto cleanup; } databuf_offset += _unmarshall_uint32 (databuf + databuf_offset, &file_version); if (file_version != IPMISELD_DATA_CACHE_FILE_VERSION) { ipmiseld_err_output (host_data, "data cache out of date"); goto cleanup; } databuf_offset += _unmarshall_uint16 (databuf + databuf_offset, &host_data->last_host_state.last_record_id.record_id); host_data->last_host_state.last_record_id.loaded = 1; databuf_offset += _unmarshall_uint32 (databuf + databuf_offset, &host_data->last_host_state.last_percent_full); databuf_offset += _unmarshall_uint16 (databuf + databuf_offset, &host_data->last_host_state.sel_info.entries); databuf_offset += _unmarshall_uint16 (databuf + databuf_offset, &host_data->last_host_state.sel_info.free_space); databuf_offset += _unmarshall_uint32 (databuf + databuf_offset, &host_data->last_host_state.sel_info.most_recent_addition_timestamp); databuf_offset += _unmarshall_uint32 (databuf + databuf_offset, &host_data->last_host_state.sel_info.most_recent_erase_timestamp); databuf_offset += _unmarshall_uint8 (databuf + databuf_offset, &host_data->last_host_state.sel_info.delete_sel_command_supported); databuf_offset += _unmarshall_uint8 (databuf + databuf_offset, &host_data->last_host_state.sel_info.reserve_sel_command_supported); databuf_offset += _unmarshall_uint8 (databuf + databuf_offset, &host_data->last_host_state.sel_info.overflow_flag); host_data->last_host_state.initialized = 1; rv = 1; cleanup: close (fd); return (rv); } static unsigned int _marshall_uint32 (uint8_t *databuf, uint32_t value) { assert (databuf); /* store little endian */ databuf[0] = (value & 0x000000FF); databuf[1] = (value & 0x0000FF00) >> 8; databuf[2] = (value & 0x00FF0000) >> 16; databuf[3] = (value & 0xFF000000) >> 24; return (sizeof (uint32_t)); } static unsigned int _marshall_uint16 (uint8_t *databuf, uint16_t value) { assert (databuf); /* store little endian */ databuf[0] = (value & 0x00FF); databuf[1] = (value & 0xFF00) >> 8; return (sizeof (uint16_t)); } static unsigned int _marshall_uint8 (uint8_t *databuf, uint8_t value) { assert (databuf); databuf[0] = value; return (sizeof (uint8_t)); } int ipmiseld_data_cache_store (ipmiseld_host_data_t *host_data) { uint32_t file_magic = IPMISELD_DATA_CACHE_FILE_MAGIC; uint32_t file_version = IPMISELD_DATA_CACHE_FILE_VERSION; char filename[MAXPATHLEN+1]; uint8_t databuf[IPMISELD_DATA_CACHE_LENGTH]; unsigned int databuf_offset = 0; uint8_t zerosumchecksum = 0; unsigned int i; int n; int open_flags; int file_found = 0; int fd = -1; int rv = -1; assert (host_data); memset (filename, '\0', MAXPATHLEN + 1); _data_cache_filename (host_data, filename, MAXPATHLEN); if (access (filename, F_OK) < 0) { if (errno != ENOENT) { ipmiseld_err_output (host_data, "Error finding '%s': %s", filename, strerror (errno)); goto cleanup; } } else { if (access (filename, W_OK) < 0) { ipmiseld_err_output (host_data, "Error write accesing '%s': %s", filename, strerror (errno)); goto cleanup; } file_found++; } if (file_found) open_flags = O_CREAT | O_TRUNC | O_WRONLY; else open_flags = O_CREAT | O_EXCL | O_WRONLY; if ((fd = open (filename, open_flags, 0644)) < 0) { ipmiseld_err_output (host_data, "Error opening '%s': %s", filename, strerror (errno)); goto cleanup; } databuf_offset += _marshall_uint32 (databuf + databuf_offset, file_magic); databuf_offset += _marshall_uint32 (databuf + databuf_offset, file_version); databuf_offset += _marshall_uint16 (databuf + databuf_offset, host_data->last_host_state.last_record_id.record_id); databuf_offset += _marshall_uint32 (databuf + databuf_offset, host_data->last_host_state.last_percent_full); databuf_offset += _marshall_uint16 (databuf + databuf_offset, host_data->last_host_state.sel_info.entries); databuf_offset += _marshall_uint16 (databuf + databuf_offset, host_data->last_host_state.sel_info.free_space); databuf_offset += _marshall_uint32 (databuf + databuf_offset, host_data->last_host_state.sel_info.most_recent_addition_timestamp); databuf_offset += _marshall_uint32 (databuf + databuf_offset, host_data->last_host_state.sel_info.most_recent_erase_timestamp); databuf_offset += _marshall_uint8 (databuf + databuf_offset, host_data->last_host_state.sel_info.delete_sel_command_supported); databuf_offset += _marshall_uint8 (databuf + databuf_offset, host_data->last_host_state.sel_info.reserve_sel_command_supported); databuf_offset += _marshall_uint8 (databuf + databuf_offset, host_data->last_host_state.sel_info.overflow_flag); for (i = 0; i < databuf_offset; i++) zerosumchecksum += databuf[i]; databuf_offset += _marshall_uint8 (databuf + databuf_offset, 0xFF - zerosumchecksum + 1); assert (databuf_offset == IPMISELD_DATA_CACHE_LENGTH); if ((n = fd_write_n (fd, databuf, databuf_offset)) < 0) { ipmiseld_err_output (host_data, "fd_write_n: %s", strerror (errno)); goto cleanup; } if (n != databuf_offset) { ipmiseld_err_output (host_data, "incomplete write"); goto cleanup; } if (fsync (fd) < 0) { ipmiseld_err_output (host_data, "fsync: %s", strerror (errno)); goto cleanup; } if (close (fd) < 0) { ipmiseld_err_output (host_data, "close: %s", strerror (errno)); goto cleanup; } rv = 0; cleanup: if (rv < 0) { unlink (filename); close (fd); } return (rv); } freeipmi-1.6.4/ipmiseld/ipmiseld-cache.h0000644002055400205540000000323713527331636020116 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_CACHE_H #define IPMISELD_CACHE_H #include "ipmiseld.h" int ipmiseld_sdr_cache_create_and_load (ipmiseld_host_data_t *host_data); /* returns 1 on data found/loaded, 0 if not found, -1 on error loading * (permission, corrupted, etc.) */ int ipmiseld_data_cache_load (ipmiseld_host_data_t *host_data); int ipmiseld_data_cache_store (ipmiseld_host_data_t *host_data); #endif /* IPMISELD_CACHE_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-common.c0000644002055400205540000001353313527331636020336 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include #include "ipmiseld.h" #include "ipmiseld-common.h" #include "freeipmi-portability.h" #include "error.h" #define IPMISELD_ERR_BUFLEN 1024 int ipmiseld_event_state_filter_parse (const char *str) { char *strtmp; char *tok; int rv = -1; int filter_mask = 0; assert (str); if (!(strtmp = strdup (str))) err_exit ("strdup: %s", strerror (errno)); tok = strtok (strtmp, " ,"); while (tok) { if (!strcasecmp (tok, "NOMINAL")) filter_mask |= IPMISELD_NOMINAL_FILTER; else if (!strcasecmp (tok, "WARNING")) filter_mask |= IPMISELD_WARNING_FILTER; else if (!strcasecmp (tok, "CRITICAL")) filter_mask |= IPMISELD_CRITICAL_FILTER; else if (!strcasecmp (tok, "NA")) filter_mask |= IPMISELD_NA_FILTER; else if (!strcasecmp (tok, "none")) { filter_mask = 0; break; } else { filter_mask = -1; break; } tok = strtok (NULL, " ,"); } rv = filter_mask; free (strtmp); return (rv); } int ipmiseld_log_facility_parse (const char *str) { assert (str); if (!strcasecmp (str, "LOG_DAEMON")) return (LOG_DAEMON); else if (!strcasecmp (str, "LOG_USER")) return (LOG_USER); else if (!strcasecmp (str, "LOG_LOCAL0")) return (LOG_LOCAL0); else if (!strcasecmp (str, "LOG_LOCAL1")) return (LOG_LOCAL1); else if (!strcasecmp (str, "LOG_LOCAL2")) return (LOG_LOCAL2); else if (!strcasecmp (str, "LOG_LOCAL3")) return (LOG_LOCAL3); else if (!strcasecmp (str, "LOG_LOCAL4")) return (LOG_LOCAL4); else if (!strcasecmp (str, "LOG_LOCAL5")) return (LOG_LOCAL5); else if (!strcasecmp (str, "LOG_LOCAL6")) return (LOG_LOCAL6); else if (!strcasecmp (str, "LOG_LOCAL7")) return (LOG_LOCAL7); return (-1); } int ipmiseld_log_priority_parse (const char *str) { assert (str); if (!strcasecmp (str, "LOG_EMERG")) return (LOG_EMERG); else if (!strcasecmp (str, "LOG_ALERT")) return (LOG_ALERT); else if (!strcasecmp (str, "LOG_CRIT")) return (LOG_CRIT); else if (!strcasecmp (str, "LOG_ERR")) return (LOG_ERR); else if (!strcasecmp (str, "LOG_WARNING")) return (LOG_WARNING); else if (!strcasecmp (str, "LOG_NOTICE")) return (LOG_NOTICE); else if (!strcasecmp (str, "LOG_INFO")) return (LOG_INFO); else if (!strcasecmp (str, "LOG_DEBUG")) return (LOG_DEBUG); return (-1); } static void _ipmiseld_syslog (ipmiseld_host_data_t *host_data, const char *message, va_list ap) { char buf[IPMISELD_ERR_BUFLEN + 1]; memset (buf, '\0', IPMISELD_ERR_BUFLEN + 1); vsnprintf(buf, IPMISELD_ERR_BUFLEN, message, ap); if (host_data->prog_data->args->test_run || host_data->prog_data->args->foreground) printf ("%s\n", buf); else syslog (host_data->prog_data->log_priority, "%s", buf); } void ipmiseld_syslog (ipmiseld_host_data_t *host_data, const char *message, ...) { va_list ap; assert (host_data); assert (message); va_start (ap, message); _ipmiseld_syslog (host_data, message, ap); va_end (ap); } void ipmiseld_syslog_host (ipmiseld_host_data_t *host_data, const char *message, ...) { va_list ap; assert (host_data); assert (message); va_start (ap, message); if (!host_data->hostname) _ipmiseld_syslog (host_data, message, ap); else { char buf[IPMISELD_ERR_BUFLEN + 1]; memset (buf, '\0', IPMISELD_ERR_BUFLEN + 1); vsnprintf(buf, IPMISELD_ERR_BUFLEN, message, ap); if (host_data->prog_data->args->test_run || host_data->prog_data->args->foreground) printf ("%s: %s\n", host_data->hostname, buf); else syslog (host_data->prog_data->log_priority, "%s: %s", host_data->hostname, buf); } va_end (ap); } void ipmiseld_err_output (ipmiseld_host_data_t *host_data, const char *message, ...) { char buf[IPMISELD_ERR_BUFLEN + 1]; va_list ap; assert (host_data); assert (message); memset (buf, '\0', IPMISELD_ERR_BUFLEN + 1); va_start (ap, message); vsnprintf(buf, IPMISELD_ERR_BUFLEN, message, ap); if (!host_data->hostname) err_output ("%s", buf); else err_output ("%s: %s", host_data->hostname, buf); va_end (ap); } freeipmi-1.6.4/ipmiseld/ipmiseld-common.h0000644002055400205540000000407213527331636020341 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_COMMON_H #define IPMISELD_COMMON_H #include "ipmiseld.h" #define IPMISELD_NOMINAL_FILTER 0x01 #define IPMISELD_WARNING_FILTER 0x02 #define IPMISELD_CRITICAL_FILTER 0x04 #define IPMISELD_NA_FILTER 0x08 int ipmiseld_event_state_filter_parse (const char *str); int ipmiseld_log_facility_parse (const char *str); int ipmiseld_log_priority_parse (const char *str); void ipmiseld_syslog (ipmiseld_host_data_t *host_data, const char *message, ...); void ipmiseld_syslog_host (ipmiseld_host_data_t *host_data, const char *message, ...); void ipmiseld_err_output (ipmiseld_host_data_t *host_data, const char *message, ...); #endif /* IPMISELD_COMMON_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-debug.c0000644002055400205540000000341113527331636020126 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: debug.c,v 1.9 2010-02-06 01:16:35 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include "ipmiseld-debug.h" #include "freeipmi-portability.h" char * ipmiseld_debug_msg_create (const char *fmt, ...) { char *buffer; va_list ap; assert (fmt); if (!(buffer = malloc (IPMISELD_DEBUG_BUFFER_LEN))) return NULL; va_start (ap, fmt); vsnprintf (buffer, IPMISELD_DEBUG_BUFFER_LEN, fmt, ap); va_end (ap); return (buffer); } freeipmi-1.6.4/ipmiseld/ipmiseld-debug.h0000644002055400205540000000656313527331636020146 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_DEBUG_H #define IPMISELD_DEBUG_H #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include "ipmiseld.h" #include "error.h" #define IPMISELD_DEBUG_BUFFER_LEN 8192 #ifndef NDEBUG #define IPMISELD_HOST_DEBUG(__msg) \ do { \ char __err[IPMISELD_DEBUG_BUFFER_LEN + 1]; \ int __len; \ memset (__err, '\0', IPMISELD_DEBUG_BUFFER_LEN + 1); \ __len = snprintf (__err, \ IPMISELD_DEBUG_BUFFER_LEN, \ "(%s, %s, %d): hostname = %s; ", \ __FILE__, \ __FUNCTION__, \ __LINE__, \ host_data->hostname ? host_data->hostname : "localhost"); \ if (__len < IPMISELD_DEBUG_BUFFER_LEN) \ { \ char *__str; \ if ((__str = ipmiseld_debug_msg_create __msg)) \ { \ strncat (__err, __str, IPMISELD_DEBUG_BUFFER_LEN - __len); \ free (__str); \ } \ } \ err_debug (__err); \ } while (0) #else /* !NDEBUG */ #define IPMISELD_HOST_DEBUG(__msg) \ do { \ char __err[IPMISELD_DEBUG_BUFFER_LEN + 1]; \ int __len; \ memset (__err, '\0', IPMISELD_DEBUG_BUFFER_LEN + 1); \ __len = snprintf (__err, \ IPMISELD_DEBUG_BUFFER_LEN, \ "hostname = %s ; ", \ host_data->hostname ? host_data->hostname : "localhost"); \ if (__len < IPMISELD_DEBUG_BUFFER_LEN) \ { \ char *__str; \ if ((__str = ipmiseld_debug_msg_create __msg)) \ { \ strncat (__err, __str, IPMISELD_DEBUG_BUFFER_LEN - __len); \ free (__str); \ } \ } \ err_debug (__err); \ } while (0) #endif /* NDEBUG */ #define IPMISELD_DEBUG(__msg) \ do { \ err_debug __msg; \ } while (0) /* * ipmiseld_debug_msg_create * * create a buffer and put the a message inside it * * Returns message buffer or NULL on error */ char *ipmiseld_debug_msg_create(const char *fmt, ...); #endif /* IPMISELD_DEBUG_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-ipmi-communication.c0000644002055400205540000003176313527331636022654 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #include #endif /* STDC_HEADERS */ #include #include #include #include #include "ipmiseld.h" #include "ipmiseld-common.h" #include "ipmiseld-ipmi-communication.h" #include "freeipmi-portability.h" #include "error.h" #include "network.h" #include "tool-util-common.h" static void _last_errnum_manage (ipmiseld_host_data_t *host_data) { assert (host_data); if (host_data->last_ipmi_errnum != ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx)) { host_data->last_ipmi_errnum = ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx); host_data->last_ipmi_errnum_count = 1; } else { host_data->last_ipmi_errnum_count++; if (host_data->last_ipmi_errnum_count > IPMISELD_ERROR_OUTPUT_LIMIT) { host_data->last_ipmi_errnum = 0; host_data->last_ipmi_errnum_count = 0; } } } int ipmiseld_ipmi_setup (ipmiseld_host_data_t *host_data) { struct common_cmd_args *common_args; unsigned int workaround_flags = 0; int rv = -1; assert (host_data); assert (host_data->host_poll); common_args = &(host_data->prog_data->args->common_args); if (!(host_data->host_poll->ipmi_ctx = ipmi_ctx_create ())) { ipmiseld_err_output (host_data, "ipmi_ctx_create: %s", strerror (errno)); goto cleanup; } if (host_data->hostname && !host_is_localhost (host_data->hostname)) { if (common_args->driver_type == IPMI_DEVICE_LAN_2_0) { parse_get_freeipmi_outofband_2_0_flags (common_args->workaround_flags_outofband_2_0, &workaround_flags); if (ipmi_ctx_open_outofband_2_0 (host_data->host_poll->ipmi_ctx, host_data->hostname, common_args->username, common_args->password, (common_args->k_g_len) ? common_args->k_g : NULL, (common_args->k_g_len) ? common_args->k_g_len : 0, common_args->privilege_level, common_args->cipher_suite_id, common_args->session_timeout, common_args->retransmission_timeout, workaround_flags, (common_args->debug > 1) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT) < 0) { if (host_data->last_ipmi_errnum != ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) || host_data->prog_data->args->verbose_count) { if (ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_USERNAME_INVALID || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_K_G_INVALID || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_CIPHER_SUITE_ID_UNAVAILABLE || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_IPMI_2_0_UNAVAILABLE || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_SESSION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID) ipmiseld_err_output (host_data, "Error connecting: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); else ipmiseld_err_output (host_data, "ipmi_ctx_open_outofband_2_0: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); } _last_errnum_manage (host_data); goto cleanup; } } else { if (ipmi_ctx_open_outofband (host_data->host_poll->ipmi_ctx, host_data->hostname, common_args->username, common_args->password, common_args->authentication_type, common_args->privilege_level, common_args->session_timeout, common_args->retransmission_timeout, workaround_flags, (common_args->debug > 1) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT) < 0) { if (host_data->last_ipmi_errnum != ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) || host_data->prog_data->args->verbose_count) { if (ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_USERNAME_INVALID || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PASSWORD_INVALID || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_INSUFFICIENT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PRIVILEGE_LEVEL_CANNOT_BE_OBTAINED || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_AUTHENTICATION_TYPE_UNAVAILABLE || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PASSWORD_VERIFICATION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_CONNECTION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_SESSION_TIMEOUT || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_HOSTNAME_INVALID) ipmiseld_err_output (host_data, "Error connecting: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); else ipmiseld_err_output (host_data, "ipmi_ctx_open_outofband: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); } _last_errnum_manage (host_data); goto cleanup; } } } else { if (!ipmi_is_root ()) { ipmiseld_err_output (host_data, "%s", ipmi_ctx_strerror (IPMI_ERR_PERMISSION)); goto cleanup; } parse_get_freeipmi_inband_flags (common_args->workaround_flags_inband, &workaround_flags); if (common_args->driver_type == IPMI_DEVICE_UNKNOWN) { int ret; if ((ret = ipmi_ctx_find_inband (host_data->host_poll->ipmi_ctx, NULL, common_args->disable_auto_probe, common_args->driver_address, common_args->register_spacing, common_args->driver_device, workaround_flags, (common_args->debug > 1) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT)) < 0) { if (host_data->last_ipmi_errnum != ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) || host_data->prog_data->args->verbose_count) { if (ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PERMISSION || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_DRIVER_BUSY || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_DRIVER_TIMEOUT) ipmiseld_err_output (host_data, "Error loading driver: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); else ipmiseld_err_output (host_data, "ipmi_ctx_find_inband: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); } _last_errnum_manage (host_data); goto cleanup; } if (!ret) { /* XXX deal w/ specific errors */ ipmiseld_err_output (host_data, "could not find inband device"); goto cleanup; } } else { if (ipmi_ctx_open_inband (host_data->host_poll->ipmi_ctx, common_args->driver_type, common_args->disable_auto_probe, common_args->driver_address, common_args->register_spacing, common_args->driver_device, workaround_flags, (common_args->debug > 1) ? IPMI_FLAGS_DEBUG_DUMP : IPMI_FLAGS_DEFAULT) < 0) { if (host_data->last_ipmi_errnum != ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) || host_data->prog_data->args->verbose_count) { if (ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_PERMISSION || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_DEVICE_NOT_FOUND || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_DRIVER_BUSY || ipmi_ctx_errnum (host_data->host_poll->ipmi_ctx) == IPMI_ERR_DRIVER_TIMEOUT) ipmiseld_err_output (host_data, "Error loading driver: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); else ipmiseld_err_output (host_data, "ipmi_ctx_open_inband: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); } _last_errnum_manage (host_data); goto cleanup; } } } if (common_args->target_channel_number_is_set || common_args->target_slave_address_is_set) { if (ipmi_ctx_set_target (host_data->host_poll->ipmi_ctx, common_args->target_channel_number_is_set ? &common_args->target_channel_number : NULL, common_args->target_slave_address_is_set ? &common_args->target_slave_address : NULL) < 0) { ipmiseld_err_output (host_data, "ipmi_ctx_set_target: %s", ipmi_ctx_errormsg (host_data->host_poll->ipmi_ctx)); goto cleanup; } } rv = 0; cleanup: if (rv < 0) { ipmi_ctx_close (host_data->host_poll->ipmi_ctx); ipmi_ctx_destroy (host_data->host_poll->ipmi_ctx); } return (rv); } freeipmi-1.6.4/ipmiseld/ipmiseld-ipmi-communication.h0000644002055400205540000000270713527331636022655 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_IPMI_COMMUNICATION_H #define IPMISELD_IPMI_COMMUNICATION_H #include "ipmiseld.h" int ipmiseld_ipmi_setup (ipmiseld_host_data_t *host_data); #endif /* IPMISELD_IPMI_COMMUNICATION_H */ freeipmi-1.6.4/ipmiseld/ipmiseld-threadpool.c0000644002055400205540000001467013527331636021212 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #include #include #include #include #include "ipmiseld.h" #include "ipmiseld-debug.h" #include "ipmiseld-threadpool.h" #include "freeipmi-portability.h" #include "error.h" #include "list.h" struct ipmiseld_threadpool_data { pthread_t tid; int threadpool_num; IpmiSeldThreadPoolCallback callback; IpmiSeldThreadPoolPostProcess postprocess; int exit_flag; }; static struct ipmiseld_threadpool_data *threadpool_data_array = NULL; static unsigned int threadpool_data_array_len = 0; static List threadpool_queue = NULL; static pthread_mutex_t threadpool_queue_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t threadpool_queue_cond = PTHREAD_COND_INITIALIZER; static unsigned int threadpool_count = 0; static pthread_mutex_t threadpool_count_lock = PTHREAD_MUTEX_INITIALIZER; static pthread_cond_t threadpool_count_cond = PTHREAD_COND_INITIALIZER; static void * _threadpool_func (void *arg) { struct ipmiseld_threadpool_data *threadpool_data; assert (arg); threadpool_data = (struct ipmiseld_threadpool_data *)arg; while (!threadpool_data->exit_flag) { void *queue_arg; pthread_mutex_lock (&threadpool_queue_lock); while (!list_count (threadpool_queue) && !threadpool_data->exit_flag) pthread_cond_wait (&threadpool_queue_cond, &threadpool_queue_lock); if (threadpool_data->exit_flag) { pthread_mutex_unlock (&threadpool_queue_lock); break; } if (!(queue_arg = list_dequeue (threadpool_queue))) err_output ("list_dequeue: %s", strerror (errno)); pthread_mutex_unlock (&threadpool_queue_lock); if (queue_arg) { threadpool_data->callback (queue_arg); if (threadpool_data->postprocess) threadpool_data->postprocess (queue_arg); } } pthread_mutex_lock (&threadpool_count_lock); threadpool_count--; pthread_cond_signal (&threadpool_count_cond); pthread_mutex_unlock (&threadpool_count_lock); return (NULL); } int ipmiseld_threadpool_init (struct ipmiseld_prog_data *prog_data, IpmiSeldThreadPoolCallback callback, IpmiSeldThreadPoolPostProcess postprocess) { int i; int ret; int rv = -1; assert (prog_data); assert (prog_data->args->threadpool_count); assert (callback); /* postprocess can be NULL */ assert (!threadpool_data_array); if (!(threadpool_data_array = (struct ipmiseld_threadpool_data *)malloc (sizeof (struct ipmiseld_threadpool_data) * prog_data->args->threadpool_count))) { err_output ("malloc: %s", strerror (errno)); goto cleanup; } if (!(threadpool_queue = list_create (NULL))) { err_output ("list_create: %s", strerror (errno)); goto cleanup; } if ((ret = pthread_mutex_init (&threadpool_queue_lock, NULL))) { err_output ("pthread_mutex_init: %s", strerror (ret)); goto cleanup; } for (i = 0; i < prog_data->args->threadpool_count; i++) { threadpool_data_array[i].threadpool_num = i; threadpool_data_array[i].callback = callback; threadpool_data_array[i].postprocess = postprocess; threadpool_data_array[i].exit_flag = 0; if ((ret = pthread_create (&threadpool_data_array[i].tid, NULL, _threadpool_func, &threadpool_data_array[i]))) { err_output ("pthread_create: %s", strerror (ret)); goto cleanup; } pthread_mutex_lock (&threadpool_count_lock); threadpool_count++; pthread_mutex_unlock (&threadpool_count_lock); } threadpool_data_array_len = prog_data->args->threadpool_count; rv = 0; cleanup: return (rv); } void ipmiseld_threadpool_destroy (void) { int i; int ret; /* achu: We want any current SEL poll to complete, so we won't * pthread_cancel() here (and likewise won't use * pthread_cleanup_push/pthread_cleanup_pop). * * Instead we set this flag and wait for the threads to finish up. */ pthread_mutex_lock (&threadpool_count_lock); for (i = 0; i < threadpool_data_array_len; i++) threadpool_data_array[i].exit_flag = 1; for (i = 0; i < threadpool_data_array_len; i++) { if ((ret = pthread_cond_signal (&threadpool_queue_cond))) err_output ("pthread_cond_signal: %s", strerror (ret)); } while (threadpool_count > 0) pthread_cond_wait (&threadpool_count_cond, &threadpool_count_lock); pthread_mutex_unlock (&threadpool_count_lock); free (threadpool_data_array); if (threadpool_queue) list_destroy (threadpool_queue); } int ipmiseld_threadpool_queue (void *arg) { assert (arg); pthread_mutex_lock (&threadpool_queue_lock); if (!list_enqueue (threadpool_queue, arg)) { pthread_mutex_unlock (&threadpool_queue_lock); err_output ("list_enqueue: %s", strerror (errno)); return (-1); } pthread_cond_signal (&threadpool_queue_cond); pthread_mutex_unlock (&threadpool_queue_lock); return (0); } freeipmi-1.6.4/ipmiseld/ipmiseld-threadpool.h0000644002055400205540000000341413527331636021211 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmiseld.h,v 1.11 2010-02-08 22:02:30 chu11 Exp $ ***************************************************************************** * Copyright (C) 2012-2015 Lawrence Livermore National Security, LLC. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * LLNL-CODE-559172 * * This file is part of Ipmiseld, an IPMI SEL syslog logging daemon. * For details, see http://www.llnl.gov/linux/. * * Ipmiseld is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiseld is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiseld. If not, see . \*****************************************************************************/ #ifndef IPMISELD_THREADPOOL_H #define IPMISELD_THREADPOOL_H #include "ipmiseld.h" typedef int (*IpmiSeldThreadPoolCallback)(void *arg); typedef int (*IpmiSeldThreadPoolPostProcess)(void *arg); int ipmiseld_threadpool_init (struct ipmiseld_prog_data *prog_data, IpmiSeldThreadPoolCallback callback, IpmiSeldThreadPoolPostProcess postprocess); void ipmiseld_threadpool_destroy (void); int ipmiseld_threadpool_queue (void *arg); #endif /* IPMISELD_THREADPOOL_H */ freeipmi-1.6.4/rmcpping/0000755002055400205540000000000013527342551015100 5ustar00achuachu00000000000000freeipmi-1.6.4/rmcpping/Makefile.in0000644002055400205540000006244213527342446017160 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ sbin_PROGRAMS = rmcpping$(EXEEXT) subdir = rmcpping DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am \ $(top_srcdir)/config/depcomp ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = am__installdirs = "$(DESTDIR)$(sbindir)" PROGRAMS = $(sbin_PROGRAMS) am_rmcpping_OBJECTS = rmcpping-rmcpping.$(OBJEXT) rmcpping_OBJECTS = $(am_rmcpping_OBJECTS) rmcpping_DEPENDENCIES = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la AM_V_lt = $(am__v_lt_@AM_V@) am__v_lt_ = $(am__v_lt_@AM_DEFAULT_V@) am__v_lt_0 = --silent am__v_lt_1 = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = DEFAULT_INCLUDES = -I.@am__isrc@ -I$(top_builddir)/config depcomp = $(SHELL) $(top_srcdir)/config/depcomp am__depfiles_maybe = depfiles am__mv = mv -f COMPILE = $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) LTCOMPILE = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) \ $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) \ $(AM_CFLAGS) $(CFLAGS) AM_V_CC = $(am__v_CC_@AM_V@) am__v_CC_ = $(am__v_CC_@AM_DEFAULT_V@) am__v_CC_0 = @echo " CC " $@; am__v_CC_1 = CCLD = $(CC) LINK = $(LIBTOOL) $(AM_V_lt) --tag=CC $(AM_LIBTOOLFLAGS) \ $(LIBTOOLFLAGS) --mode=link $(CCLD) $(AM_CFLAGS) $(CFLAGS) \ $(AM_LDFLAGS) $(LDFLAGS) -o $@ AM_V_CCLD = $(am__v_CCLD_@AM_V@) am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@) am__v_CCLD_0 = @echo " CCLD " $@; am__v_CCLD_1 = SOURCES = $(rmcpping_SOURCES) DIST_SOURCES = $(rmcpping_SOURCES) am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is # *not* preserved. am__uniquify_input = $(AWK) '\ BEGIN { nonempty = 0; } \ { items[$$0] = 1; nonempty = 1; } \ END { if (nonempty) { for (i in items) print i; }; } \ ' # Make sure the list of sources is unique. This is necessary because, # e.g., the same source file might be shared among _SOURCES variables # for different programs/libraries. am__define_uniq_tagged_files = \ list='$(am__tagged_files)'; \ unique=`for i in $$list; do \ if test -f "$$i"; then echo $$i; else echo $(srcdir)/$$i; fi; \ done | $(am__uniquify_input)` ETAGS = etags CTAGS = ctags DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ rmcpping_CPPFLAGS = \ -I$(top_srcdir)/common/pingtool \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE rmcpping_LDADD = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la rmcpping_SOURCES = rmcpping.c all: all-am .SUFFIXES: .SUFFIXES: .c .lo .o .obj $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu rmcpping/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu rmcpping/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): install-sbinPROGRAMS: $(sbin_PROGRAMS) @$(NORMAL_INSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(sbindir)'"; \ $(MKDIR_P) "$(DESTDIR)$(sbindir)" || exit 1; \ fi; \ for p in $$list; do echo "$$p $$p"; done | \ sed 's/$(EXEEXT)$$//' | \ while read p p1; do if test -f $$p \ || test -f $$p1 \ ; then echo "$$p"; echo "$$p"; else :; fi; \ done | \ sed -e 'p;s,.*/,,;n;h' \ -e 's|.*|.|' \ -e 'p;x;s,.*/,,;s/$(EXEEXT)$$//;$(transform);s/$$/$(EXEEXT)/' | \ sed 'N;N;N;s,\n, ,g' | \ $(AWK) 'BEGIN { files["."] = ""; dirs["."] = 1 } \ { d=$$3; if (dirs[d] != 1) { print "d", d; dirs[d] = 1 } \ if ($$2 == $$4) files[d] = files[d] " " $$1; \ else { print "f", $$3 "/" $$4, $$1; } } \ END { for (d in files) print "f", d, files[d] }' | \ while read type dir files; do \ if test "$$dir" = .; then dir=; else dir=/$$dir; fi; \ test -z "$$files" || { \ echo " $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files '$(DESTDIR)$(sbindir)$$dir'"; \ $(INSTALL_PROGRAM_ENV) $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL_PROGRAM) $$files "$(DESTDIR)$(sbindir)$$dir" || exit $$?; \ } \ ; done uninstall-sbinPROGRAMS: @$(NORMAL_UNINSTALL) @list='$(sbin_PROGRAMS)'; test -n "$(sbindir)" || list=; \ files=`for p in $$list; do echo "$$p"; done | \ sed -e 'h;s,^.*/,,;s/$(EXEEXT)$$//;$(transform)' \ -e 's/$$/$(EXEEXT)/' \ `; \ test -n "$$list" || exit 0; \ echo " ( cd '$(DESTDIR)$(sbindir)' && rm -f" $$files ")"; \ cd "$(DESTDIR)$(sbindir)" && rm -f $$files clean-sbinPROGRAMS: @list='$(sbin_PROGRAMS)'; test -n "$$list" || exit 0; \ echo " rm -f" $$list; \ rm -f $$list || exit $$?; \ test -n "$(EXEEXT)" || exit 0; \ list=`for p in $$list; do echo "$$p"; done | sed 's/$(EXEEXT)$$//'`; \ echo " rm -f" $$list; \ rm -f $$list rmcpping$(EXEEXT): $(rmcpping_OBJECTS) $(rmcpping_DEPENDENCIES) $(EXTRA_rmcpping_DEPENDENCIES) @rm -f rmcpping$(EXEEXT) $(AM_V_CCLD)$(LINK) $(rmcpping_OBJECTS) $(rmcpping_LDADD) $(LIBS) mostlyclean-compile: -rm -f *.$(OBJEXT) distclean-compile: -rm -f *.tab.c @AMDEP_TRUE@@am__include@ @am__quote@./$(DEPDIR)/rmcpping-rmcpping.Po@am__quote@ .c.o: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.o$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ $< .c.obj: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.obj$$||'`;\ @am__fastdepCC_TRUE@ $(COMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ `$(CYGPATH_W) '$<'` &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(COMPILE) -c -o $@ `$(CYGPATH_W) '$<'` .c.lo: @am__fastdepCC_TRUE@ $(AM_V_CC)depbase=`echo $@ | sed 's|[^/]*$$|$(DEPDIR)/&|;s|\.lo$$||'`;\ @am__fastdepCC_TRUE@ $(LTCOMPILE) -MT $@ -MD -MP -MF $$depbase.Tpo -c -o $@ $< &&\ @am__fastdepCC_TRUE@ $(am__mv) $$depbase.Tpo $$depbase.Plo @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='$<' object='$@' libtool=yes @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(LTCOMPILE) -c -o $@ $< rmcpping-rmcpping.o: rmcpping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rmcpping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rmcpping-rmcpping.o -MD -MP -MF $(DEPDIR)/rmcpping-rmcpping.Tpo -c -o rmcpping-rmcpping.o `test -f 'rmcpping.c' || echo '$(srcdir)/'`rmcpping.c @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rmcpping-rmcpping.Tpo $(DEPDIR)/rmcpping-rmcpping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rmcpping.c' object='rmcpping-rmcpping.o' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rmcpping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rmcpping-rmcpping.o `test -f 'rmcpping.c' || echo '$(srcdir)/'`rmcpping.c rmcpping-rmcpping.obj: rmcpping.c @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rmcpping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -MT rmcpping-rmcpping.obj -MD -MP -MF $(DEPDIR)/rmcpping-rmcpping.Tpo -c -o rmcpping-rmcpping.obj `if test -f 'rmcpping.c'; then $(CYGPATH_W) 'rmcpping.c'; else $(CYGPATH_W) '$(srcdir)/rmcpping.c'; fi` @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) $(DEPDIR)/rmcpping-rmcpping.Tpo $(DEPDIR)/rmcpping-rmcpping.Po @AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='rmcpping.c' object='rmcpping-rmcpping.obj' libtool=no @AMDEPBACKSLASH@ @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(rmcpping_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o rmcpping-rmcpping.obj `if test -f 'rmcpping.c'; then $(CYGPATH_W) 'rmcpping.c'; else $(CYGPATH_W) '$(srcdir)/rmcpping.c'; fi` mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs ID: $(am__tagged_files) $(am__define_uniq_tagged_files); mkid -fID $$unique tags: tags-am TAGS: tags tags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) set x; \ here=`pwd`; \ $(am__define_uniq_tagged_files); \ shift; \ if test -z "$(ETAGS_ARGS)$$*$$unique"; then :; else \ test -n "$$unique" || unique=$$empty_fix; \ if test $$# -gt 0; then \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ "$$@" $$unique; \ else \ $(ETAGS) $(ETAGSFLAGS) $(AM_ETAGSFLAGS) $(ETAGS_ARGS) \ $$unique; \ fi; \ fi ctags: ctags-am CTAGS: ctags ctags-am: $(TAGS_DEPENDENCIES) $(am__tagged_files) $(am__define_uniq_tagged_files); \ test -z "$(CTAGS_ARGS)$$unique" \ || $(CTAGS) $(CTAGSFLAGS) $(AM_CTAGSFLAGS) $(CTAGS_ARGS) \ $$unique GTAGS: here=`$(am__cd) $(top_builddir) && pwd` \ && $(am__cd) $(top_srcdir) \ && gtags -i $(GTAGS_ARGS) "$$here" cscopelist: cscopelist-am cscopelist-am: $(am__tagged_files) list='$(am__tagged_files)'; \ case "$(srcdir)" in \ [\\/]* | ?:[\\/]*) sdir="$(srcdir)" ;; \ *) sdir=$(subdir)/$(srcdir) ;; \ esac; \ for i in $$list; do \ if test -f "$$i"; then \ echo "$(subdir)/$$i"; \ else \ echo "$$sdir/$$i"; \ fi; \ done >> $(top_builddir)/cscope.files distclean-tags: -rm -f TAGS ID GTAGS GRTAGS GSYMS GPATH tags distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(PROGRAMS) installdirs: for dir in "$(DESTDIR)$(sbindir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool clean-sbinPROGRAMS \ mostlyclean-am distclean: distclean-am -rm -rf ./$(DEPDIR) -rm -f Makefile distclean-am: clean-am distclean-compile distclean-generic \ distclean-tags dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) install-exec-hook install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -rf ./$(DEPDIR) -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-compile mostlyclean-generic \ mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-sbinPROGRAMS @$(NORMAL_INSTALL) $(MAKE) $(AM_MAKEFLAGS) uninstall-hook .MAKE: install-am install-exec-am install-strip uninstall-am .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \ clean-libtool clean-sbinPROGRAMS cscopelist-am ctags ctags-am \ distclean distclean-compile distclean-generic \ distclean-libtool distclean-tags distdir dvi dvi-am html \ html-am info info-am install install-am install-data \ install-data-am install-dvi install-dvi-am install-exec \ install-exec-am install-exec-hook install-html install-html-am \ install-info install-info-am install-man install-pdf \ install-pdf-am install-ps install-ps-am install-sbinPROGRAMS \ install-strip installcheck installcheck-am installdirs \ maintainer-clean maintainer-clean-generic mostlyclean \ mostlyclean-compile mostlyclean-generic mostlyclean-libtool \ pdf pdf-am ps ps-am tags tags-am uninstall uninstall-am \ uninstall-hook uninstall-sbinPROGRAMS $(top_builddir)/common/pingtool/libpingtool.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/rmcpping $(DESTDIR)$(sbindir)/rmcp-ping uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/rmcp-ping # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/rmcpping/Makefile.am0000644002055400205540000000223613527331640017134 0ustar00achuachu00000000000000sbin_PROGRAMS = rmcpping rmcpping_CPPFLAGS = \ -I$(top_srcdir)/common/pingtool \ -I$(top_srcdir)/common/debugutil \ -I$(top_srcdir)/common/portability \ -I$(top_builddir)/libfreeipmi/include \ -I$(top_srcdir)/libfreeipmi/include \ -D_GNU_SOURCE rmcpping_LDADD = \ $(top_builddir)/common/pingtool/libpingtool.la \ $(top_builddir)/common/debugutil/libdebugutil.la \ $(top_builddir)/common/portability/libportability.la \ $(top_builddir)/libfreeipmi/libfreeipmi.la rmcpping_SOURCES = rmcpping.c $(top_builddir)/common/pingtool/libpingtool.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/debugutil/libdebugutil.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/common/portability/libportability.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` $(top_builddir)/libfreeipmi/libfreeipmi.la : force-dependency-check @cd `dirname $@` && $(MAKE) `basename $@` force-dependency-check: install-exec-hook: $(install_sh) -d -m 755 $(DESTDIR)$(sbindir) $(LN_S) -f $(sbindir)/rmcpping $(DESTDIR)$(sbindir)/rmcp-ping uninstall-hook: $(RM) $(DESTDIR)$(sbindir)/rmcp-ping freeipmi-1.6.4/rmcpping/rmcpping.c0000644002055400205540000002016613527331640017065 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: rmcpping.c,v 1.55 2010-02-08 22:02:31 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2003-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-155448 * * This file is part of Ipmiping, tools for pinging IPMI and RMCP compliant * remote systems. For details, see http://www.llnl.gov/linux/. * * Ipmiping is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmiping is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmiping. If not, see . \*****************************************************************************/ #if HAVE_CONFIG_H #include "config.h" #endif /* HAVE_CONFIG_H */ #include #include #if STDC_HEADERS #include #endif /* STDC_HEADERS */ #if HAVE_UNISTD_H #include #endif /* HAVE_UNISTD_H */ #include #include #include #include "freeipmi-portability.h" #include "debug-util.h" #include "ping-tool-common.h" #define _supported(x) (x) ? "supported" : "not-supported" int createpacket (const char *destination, void *buf, unsigned int buflen, unsigned int sequence_number, int version, int debug) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_rmcp_cmd = NULL; int len; assert (destination); assert (buf); if (!buflen) return (0); if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_rmcp_cmd = fiid_obj_create (tmpl_cmd_asf_presence_ping))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (fill_rmcp_hdr_asf (obj_rmcp_hdr) < 0) ipmi_ping_err_exit ("fill_rmcp_hdr_asf: %s", strerror (errno)); /* Avoid use of message tag number 0xFF. Behavior of message tag 0xFF * is unpredictable. See IPMI 1.5 Specification and DMTF RMCP * specification for details. */ if (fill_cmd_asf_presence_ping (sequence_number % (RMCP_ASF_MESSAGE_TAG_MAX + 1), obj_rmcp_cmd) < 0) ipmi_ping_err_exit ("fill_cmd_asf_presence_ping: %s", strerror (errno)); if ((len = assemble_rmcp_pkt (obj_rmcp_hdr, obj_rmcp_cmd, buf, buflen, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) ipmi_ping_err_exit ("assemble_rmcp_pkt: %s", strerror (errno)); if (debug) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, DEBUG_UTIL_RMCPPING_STR, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_rmcp_packet (STDERR_FILENO, destination, hdrbuf, NULL, buf, len, tmpl_cmd_asf_presence_ping) < 0) ipmi_ping_err_exit ("ipmi_dump_rmcp_packet: %s", strerror (errno)); } fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_rmcp_cmd); return (len); } int parsepacket (const char *destination, const void *buf, unsigned int buflen, const char *from, unsigned int sequence_number, int verbose, int version, int debug) { fiid_obj_t obj_rmcp_hdr = NULL; fiid_obj_t obj_rmcp_cmd = NULL; uint8_t message_type, message_tag; uint64_t val; int ret, rv = -1; assert (destination); assert (buf); assert (from); if (!buflen) return (0); if (!(obj_rmcp_hdr = fiid_obj_create (tmpl_rmcp_hdr))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (!(obj_rmcp_cmd = fiid_obj_create (tmpl_cmd_asf_presence_pong))) ipmi_ping_err_exit ("fiid_obj_create: %s", strerror (errno)); if (debug) { char hdrbuf[DEBUG_UTIL_HDR_BUFLEN + 1]; memset (hdrbuf, '\0', DEBUG_UTIL_HDR_BUFLEN + 1); debug_hdr_str (DEBUG_UTIL_TYPE_NONE, DEBUG_UTIL_DIRECTION_NONE, DEBUG_UTIL_FLAGS_DEFAULT, DEBUG_UTIL_RMCPPONG_STR, hdrbuf, DEBUG_UTIL_HDR_BUFLEN); if (ipmi_dump_rmcp_packet (STDERR_FILENO, destination, hdrbuf, NULL, buf, buflen, tmpl_cmd_asf_presence_pong) < 0) ipmi_ping_err_exit ("ipmi_dump_rmcp_packet: %s", strerror (errno)); } if ((ret = unassemble_rmcp_pkt (buf, buflen, obj_rmcp_hdr, obj_rmcp_cmd, IPMI_INTERFACE_FLAGS_DEFAULT)) < 0) ipmi_ping_err_exit ("unassemble_rmcp_pkt: %s", strerror (errno)); if (!ret) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_rmcp_cmd, "message_type", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'message_type': %s", fiid_obj_errormsg (obj_rmcp_cmd)); message_type = val; if (message_type != RMCP_ASF_MESSAGE_TYPE_PRESENCE_PONG) { rv = 0; goto cleanup; } if (FIID_OBJ_GET (obj_rmcp_cmd, "message_tag", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'message_tag': %s", fiid_obj_errormsg (obj_rmcp_cmd)); message_tag = val; if (message_tag != (sequence_number % (RMCP_ASF_MESSAGE_TAG_MAX + 1))) { rv = 0; goto cleanup; } printf ("pong received from %s: message_tag=%u", from, message_tag); if (verbose) { uint8_t ipmi_supported; if (FIID_OBJ_GET (obj_rmcp_cmd, "supported_entities.ipmi_supported", &val) < 0) ipmi_ping_err_exit ("fiid_obj_get: 'supported_entities.ipmi_supported': %s", fiid_obj_errormsg (obj_rmcp_cmd)); ipmi_supported = val; printf (", ipmi %s", _supported (ipmi_supported)); } printf ("\n"); rv = 1; cleanup: fiid_obj_destroy (obj_rmcp_hdr); fiid_obj_destroy (obj_rmcp_cmd); return (rv); } void latepacket (unsigned int sequence_number) { printf ("pong timed out: message_tag=%u\n", sequence_number % (RMCP_ASF_MESSAGE_TAG_MAX + 1)); } int endresult (const char *progname, const char *destination, unsigned int sent_count, unsigned int recv_count) { double percent = 0; assert (progname); assert (destination); if (sent_count > 0) percent = ((double)(sent_count - recv_count)/sent_count)*100; printf ("--- %s %s statistics ---\n", progname, destination); printf ("%d pings transmitted, %d pongs received in time, " "%2.1f%% packet loss\n", sent_count, recv_count, percent); return ((recv_count > 0) ? 0 : 1); } int main (int argc, char **argv) { ipmi_ping_setup (argc, argv, 0, RMCP_ASF_MESSAGE_TAG_MAX, "hVc:i:I:t:vs:d"); ipmi_ping_loop (createpacket, parsepacket, latepacket, endresult); exit (EXIT_FAILURE); /* NOT REACHED */ } freeipmi-1.6.4/contrib/0000755002055400205540000000000013527342551014721 5ustar00achuachu00000000000000freeipmi-1.6.4/contrib/ganglia/0000755002055400205540000000000013527342551016323 5ustar00achuachu00000000000000freeipmi-1.6.4/contrib/ganglia/README0000644002055400205540000000113713527331635017206 0ustar00achuachu00000000000000ganglia_ipmi_sensors.pl ----------------------- This script can be used to monitor IPMI sensors in ganglia via FreeIPMI's ipmi-sensors. Please see instructions found at the top of the script for detailed instructions. By default, this tool will monitor the sensor state (Nominal, Warning, or Critical) of each sensor as determined by libfreeipmi's interpret library and the sensor readings of temperature, fan and voltage sensors. See ipmi-sensors(8) for more general info on ipmi-sensors and freeipmi_interpret_sensors.conf(5) for more information on sensor states. Albert Chu chu11 at llnl dot gov freeipmi-1.6.4/contrib/ganglia/ganglia_ipmi_sensors.pl0000755002055400205540000002753513527331635023074 0ustar00achuachu00000000000000#!/usr/bin/perl ############################################################################# # Copyright (C) 2003-2010 FreeIPMI Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################################# # # ganglia_ipmi_sensors.pl # # Author: # # Albert Chu # # Description: # # This script can be used to monitor IPMI sensors in ganglia via # FreeIPMI's ipmi-sensors. # # By default, this tool will monitor the sensor state (Nominal, # Warning, or Critical) of each sensor as determined by libfreeipmi's # interpret library and the sensor readings of temperature, fan and # voltage sensors. See ipmi-sensors(8) for more general info on # ipmi-sensors and freeipmi_interpret_sensors.conf(5) for more # information on sensor states. # # Options: # # -h - specify hostname(s) to remotely access (don't specify for inband) # -r - specify search and replace substitution expressions (separated by a colon) to # modify a hostname before being passed to gmetric. This is useful if # the IPMI hostname differs from the desired hostname to input to gmetric. # For example "ipmi:my" would turn "ipmihost4" into "myhost4". Not specifying # a colon results in a degenerate string removal. For example, # "-ipmi" would turn "host4-ipmi" into "host4". # -S - specify an alternate ipmi-sensors location # -s - specify additional ipmi-sensors arguments # -G - specify an alternate gmetric location # -g - specify additional gmetric arguments # -d - print debug info # -D - do not send sensor data to ganglia (useful during debugging) # -H - output help # # Environment Variables: # # IPMI_HOSTS - specify hostname(s) to remotely access (don't specify for inband) # IPMI_HOSTS_SUBST - specify search and replace substitution # expressions (separated by a colon) to modify a # hostname before being passed to gmetric. This is # useful if the IPMI hostname differs from the # desired hostname to input to gmetric. # IPMI_SENSORS_PATH - specify an alternate ipmi-sensors location # IPMI_SENSORS_ARGS - specify additional ipmi-sensors arguments # GMETRIC_PATH - specify an alternate gmetric location # GMETRIC_ARGS - specify additional gmetric arguments # # Setup Notes: # # Specify the remote hosts you wish to access IPMI information from # via the -h option or IPMI_HOSTS environment variable. If you wish # only to monitor the local node, do not specify an ipmi host. The # input to the -h option is passed directly to ipmi-sensors. So you # may specify anything the ipmi-sensors tool accepts including # hostranged (e.g. foo[0-127]) or comma separated # (e.g. foo0,foo1,foo2,foo3) inputs. If you wish to monitor both # remote and local system, remember to specify one of the hosts as # "localhost". # # If stored in a non-default location the -S option or # IPMI_SENSORS_PATH environment variable must be specified to # determine the ipmi-sensors location. # # If stored in a non-default location the -G option or GMETRIC_PATH # environment variable must be specified to determine the gmetric # location. # # In order to specify non-defaults for ipmi-sensors use the -s # argument or IPMI_SENSORS_ARGS environment variable. Typically, # this option is necessary for non-default communication information # or authentication information (e.g. driver path, driver type, # username, password, etc.). Non-default communication information # can also be stored in the FreeIPMI configuration file. This is the # suggested method because passwords and other sensitive information # could show up in ps(1). If you wish to limit the sensors being # monitored, you can also specify which record-ids are to be monitored # (-r option). # # In order to specify non-defaults for gmetric, use the -g argument # or GMETRIC_ARGS environment variable. Typically, this option is # necessary for non-default gmond.conf paths (i.e. -c # /myspecial/gmond.conf). # # Most users will want to set this script to execute in cron(8). # Using cron you may monitor at whatever interval you wish. The # recommended interval should be atleast longer than 20 seconds, since # that is the default session timeout length. # # Help: # # Report bugs to freeipmi-users@gnu.org or freeipmi-devel@gnu.org. # ############################################################################# use strict; use Getopt::Std; use Socket; my $no_sensor_state = 0; my $no_sensor_readings = 0; my $debug = 0; my $no_ganglia = 0; my $IPMI_HOSTS = undef; my $IPMI_HOSTS_SUBST = undef; my $IPMI_SENSORS_PATH = "/usr/sbin/ipmi-sensors"; my $IPMI_SENSORS_ARGS = ""; my $GMETRIC_PATH = "/usr/bin/gmetric"; my $GMETRIC_ARGS = ""; my $IPMI_SENSORS_EXTRA_ARGS = ""; my $IPMI_SENSORS_OUTPUT; my @IPMI_SENSORS_OUTPUT_LINES; my $line; my $cmd; my @subst; sub usage { my $prog = $0; print "Usage: $prog [-h ] [-r ] [-S ] [-s ] [-G ] [-g ] [-T] [-t] [-d] [-H]\n"; print " -h specify hostname(s) to remotely access\n"; print " -r specify search and replace substitution expressions on the hostname (e.g. 'ipmi:host')\n"; print " -S specify an alternate ipmi-sensors path\n"; print " -s specify additional ipmi-sensors arguments\n"; print " -G specify an alternate gmetric path\n"; print " -g specify additional gmetric arguments\n"; print " -T do not monitor sensor state\n"; print " -t do not monitor sensor readings\n"; print " -d print debug info\n"; print " -D do not send sensor data to ganglia (useful during debugging)\n"; print " -H output help\n"; exit 0; } if (!getopts("h:r:S:s:G:g:TtdDH")) { usage(); } if (defined($main::opt_H)) { usage(); } if (defined($main::opt_h)) { $IPMI_HOSTS = $main::opt_h; } if (defined($main::opt_r)) { $IPMI_HOSTS_SUBST = $main::opt_r; } if (defined($main::opt_S)) { $IPMI_SENSORS_PATH = $main::opt_S; } if (defined($main::opt_s)) { $IPMI_SENSORS_ARGS = $main::opt_s; } if (defined($main::opt_G)) { $GMETRIC_PATH = $main::opt_G; } if (defined($main::opt_g)) { $GMETRIC_ARGS = $main::opt_g; } if (defined($main::opt_T)) { $no_sensor_state = 1; } if (defined($main::opt_t)) { $no_sensor_readings = 1; } if (defined($main::opt_d)) { $debug = 1; } if (defined($main::opt_D)) { $no_ganglia = 1; } if ($ENV{"IPMI_HOSTS"}) { $IPMI_HOSTS = $ENV{"IPMI_HOSTS"}; } if ($ENV{"IPMI_HOSTS_SUBST"}) { $IPMI_HOSTS_SUBST = $ENV{"IPMI_HOSTS_SUBST"}; } if ($ENV{"IPMI_SENSORS_PATH"}) { $IPMI_SENSORS_PATH = $ENV{"IPMI_SENSORS_PATH"}; } if ($ENV{"IPMI_SENSORS_ARGS"}) { $IPMI_SENSORS_ARGS = $ENV{"IPMI_SENSORS_ARGS"}; } if ($ENV{"GMETRIC_PATH"}) { $GMETRIC_PATH = $ENV{"GMETRIC_PATH"}; } if ($ENV{"GMETRIC_ARGS"}) { $GMETRIC_ARGS = $ENV{"GMETRIC_ARGS"}; } if ($debug) { print "IPMI_HOSTS=$IPMI_HOSTS\n"; print "IPMI_HOSTS_SUBST=$IPMI_HOSTS_SUBST\n"; print "IPMI_SENSORS_PATH=$IPMI_SENSORS_PATH\n"; print "IPMI_SENSORS_ARGS=$IPMI_SENSORS_ARGS\n"; print "GMETRIC_PATH=$GMETRIC_PATH\n"; print "GMETRIC_ARGS=$GMETRIC_ARGS\n"; } if (!(-x $IPMI_SENSORS_PATH)) { print "$IPMI_SENSORS_PATH cannot be executed\n"; exit(1); } if (!$no_ganglia) { if (!(-x $GMETRIC_PATH)) { print "$GMETRIC_PATH cannot be executed\n"; exit(1); } } if ($no_sensor_state && $no_sensor_readings) { print "Must monitor atleast sensor state or sensor readings\n"; exit(1); } if ($IPMI_HOSTS) { $cmd = "$IPMI_SENSORS_PATH $IPMI_SENSORS_ARGS -h $IPMI_HOSTS --quiet-cache --sdr-cache-recreate --always-prefix --no-header-output --output-sensor-state"; } else { $cmd = "$IPMI_SENSORS_PATH $IPMI_SENSORS_ARGS --quiet-cache --sdr-cache-recreate --always-prefix --no-header-output --output-sensor-state" } if ($debug) { print "ipmi-sensors command: $cmd\n"; } $IPMI_SENSORS_OUTPUT = `$cmd`; if ($? != 0) { print "$IPMI_SENSORS_PATH: exited with error\n"; } @IPMI_SENSORS_OUTPUT_LINES = split(/\n/, $IPMI_SENSORS_OUTPUT); foreach $line (@IPMI_SENSORS_OUTPUT_LINES) { my $hostname; my $record_id; my $id_string; my $type; my $state; my $reading; my $units; my $event; my $id_string_state; my $ip_address; my $cmd_state; my $cmd_reading; if ($debug) { print "Parsing: $line\n"; } if ($line =~ /(.+)\: (\d+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)/) { $hostname = $1; $record_id = $2; $id_string = $4; $type = $6; $state = $8; $reading = $10; $units = $12; $event = $14; # trim whitespace off end of string $record_id =~ s/\s+$//; $id_string =~ s/\s+$//; $type =~ s/\s+$//; $state =~ s/\s+$//; $reading =~ s/\s+$//; $units =~ s/\s+$//; } else { print "Line not parsable\n"; next; } # make name better, convert spaces and slashes into underscores $id_string =~ s/ /_/g; $id_string =~ s/\//_/g; if ($IPMI_HOSTS_SUBST) { @subst = split(/:/, $IPMI_HOSTS_SUBST); $hostname =~ s/$subst[0]/$subst[1]/; } if ($hostname ne "localhost" && $hostname ne "127.0.0.1") { my $packet_ip = gethostbyname($hostname); if (defined($packet_ip)) { $ip_address = inet_ntoa($packet_ip); } else { print "Cannot resolve ip: $hostname\n"; next; } } if (!$no_sensor_state) { if ($state ne "N/A") { $id_string_state = $id_string . "_State"; if ($hostname ne "localhost" && $hostname ne "127.0.0.1") { $cmd_state = "$GMETRIC_PATH $GMETRIC_ARGS -n $id_string_state -v $state -t string -S $ip_address:$hostname"; } else { $cmd_state = "$GMETRIC_PATH $GMETRIC_ARGS -n $id_string_state -v $state -t string"; } } } if (!$no_sensor_readings) { if ((($type eq "Temperature" && ($units eq "C" || $units eq "F")) || ($type eq "Voltage" && $units eq "V") || ($type eq "Fan" && $units eq "RPM")) && $reading ne "N/A") { if ($hostname ne "localhost" && $hostname ne "127.0.0.1") { $cmd_reading = "$GMETRIC_PATH $GMETRIC_ARGS -n $id_string -v $reading -t double -u $units -S $ip_address:$hostname"; } else { $cmd_reading = "$GMETRIC_PATH $GMETRIC_ARGS -n $id_string -v $reading -t double -u $units"; } } } if ($debug) { if ($cmd_state) { print "gmetric command = $cmd_state\n"; } if ($cmd_reading) { print "gmetric command = $cmd_reading\n"; } } if (!$no_ganglia) { if ($cmd_state) { `$cmd_state`; if ($? != 0) { print "\"$cmd_state\": failed\n"; exit(1); } } if ($cmd_reading) { `$cmd_reading`; if ($? != 0) { print "\"$cmd_reading\": failed\n"; exit(1); } } } } freeipmi-1.6.4/contrib/libipmimonitoring/0000755002055400205540000000000013527342551020454 5ustar00achuachu00000000000000freeipmi-1.6.4/contrib/libipmimonitoring/ipmimonitoring-sel.c0000644002055400205540000005641713527331635024463 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmimonitoring-sel.c,v 1.3 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ /* This is an example of how to use the libipmimonitoring library to * read and monitor the SEL. * * At the top of this file, you'll find a number of variables for * configuration of IPMI communication and what SEL records you are * interested in monitoring. Those variables are used in the * libipmimonitoring calls below. * * Hopefully this example will be sufficient to help anyone program * IPMI monitoring software for their environment. * * To compile, linking against the library should be sufficient for * most environments. e.g. * * gcc -o ipmimonitoring-sel ipmimonitoring-sel.c -lipmimonitoring */ #include #include #include #include #include #include #include #include /* Communication Configuration - Initialize accordingly */ /* Hostname, NULL for In-band communication, non-null for a hostname */ char *hostname = NULL; /* In-band Communication Configuration */ /* On linux, you may wish to change driver_type to * IPMI_MONITORING_DRIVER_TYPE_OPENIPMI if you use /dev/ipmi0 */ int driver_type = IPMI_MONITORING_DRIVER_TYPE_KCS; /* or -1 for default */ int disable_auto_probe = 0; /* probe for in-band device */ unsigned int driver_address = 0; /* not used if probing */ unsigned int register_spacing = 0; /* not used if probing */ char *driver_device = NULL; /* not used if probing */ /* Out-of-band Communication Configuration */ int protocol_version = IPMI_MONITORING_PROTOCOL_VERSION_1_5; /* or -1 for default */ char *username = "foousername"; char *password = "foopassword"; unsigned char *k_g = NULL; unsigned int k_g_len = 0; int privilege_level = IPMI_MONITORING_PRIVILEGE_LEVEL_USER; /* or -1 for default */ int authentication_type = IPMI_MONITORING_AUTHENTICATION_TYPE_MD5; /* or -1 for default */ int cipher_suite_id = 0; /* or -1 for default */ int session_timeout = 0; /* 0 for default */ int retransmission_timeout = 0; /* 0 for default */ /* Workarounds - specify workaround flags if necessary */ unsigned int workaround_flags = 0; /* Initialize w/ record id numbers to only monitor specific record ids */ unsigned int record_ids[] = {0}; unsigned int record_ids_length = 0; /* Initialize w/ sensor types to only monitor specific sensor types * see ipmi_monitoring.h sensor types list. */ unsigned int sensor_types[] = {0}; unsigned int sensor_types_length = 0; /* Initialize w/ date range to only monitoring specific date range */ char *date_begin = NULL; /* use MM/DD/YYYY format */ char *date_end = NULL; /* use MM/DD/YYYY format */ /* Set to an appropriate alternate if desired */ char *sdr_cache_directory = "/tmp"; char *sel_config_file = NULL; /* Set to 1 or 0 to enable these SEL flags * - See ipmi_monitoring.h for descriptions of these flags. */ int reread_sdr_cache = 0; int interpret_oem_data = 0; int assume_system_event_record = 0; int entity_sensor_names = 0; /* Initialization flags * * Most commonly bitwise OR IPMI_MONITORING_FLAGS_DEBUG and/or * IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS for extra debugging * information. */ unsigned int ipmimonitoring_init_flags = 0; static const char * _get_sensor_type_string (int sensor_type) { switch (sensor_type) { case IPMI_MONITORING_SENSOR_TYPE_RESERVED: return ("Reserved"); case IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE: return ("Temperature"); case IPMI_MONITORING_SENSOR_TYPE_VOLTAGE: return ("Voltage"); case IPMI_MONITORING_SENSOR_TYPE_CURRENT: return ("Current"); case IPMI_MONITORING_SENSOR_TYPE_FAN: return ("Fan"); case IPMI_MONITORING_SENSOR_TYPE_PHYSICAL_SECURITY: return ("Physical Security"); case IPMI_MONITORING_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return ("Platform Security Violation Attempt"); case IPMI_MONITORING_SENSOR_TYPE_PROCESSOR: return ("Processor"); case IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY: return ("Power Supply"); case IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT: return ("Power Unit"); case IPMI_MONITORING_SENSOR_TYPE_COOLING_DEVICE: return ("Cooling Device"); case IPMI_MONITORING_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR: return ("Other Units Based Sensor"); case IPMI_MONITORING_SENSOR_TYPE_MEMORY: return ("Memory"); case IPMI_MONITORING_SENSOR_TYPE_DRIVE_SLOT: return ("Drive Slot"); case IPMI_MONITORING_SENSOR_TYPE_POST_MEMORY_RESIZE: return ("POST Memory Resize"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return ("System Firmware Progress"); case IPMI_MONITORING_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return ("Event Logging Disabled"); case IPMI_MONITORING_SENSOR_TYPE_WATCHDOG1: return ("Watchdog 1"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_EVENT: return ("System Event"); case IPMI_MONITORING_SENSOR_TYPE_CRITICAL_INTERRUPT: return ("Critical Interrupt"); case IPMI_MONITORING_SENSOR_TYPE_BUTTON_SWITCH: return ("Button/Switch"); case IPMI_MONITORING_SENSOR_TYPE_MODULE_BOARD: return ("Module/Board"); case IPMI_MONITORING_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR: return ("Microcontroller/Coprocessor"); case IPMI_MONITORING_SENSOR_TYPE_ADD_IN_CARD: return ("Add In Card"); case IPMI_MONITORING_SENSOR_TYPE_CHASSIS: return ("Chassis"); case IPMI_MONITORING_SENSOR_TYPE_CHIP_SET: return ("Chip Set"); case IPMI_MONITORING_SENSOR_TYPE_OTHER_FRU: return ("Other Fru"); case IPMI_MONITORING_SENSOR_TYPE_CABLE_INTERCONNECT: return ("Cable/Interconnect"); case IPMI_MONITORING_SENSOR_TYPE_TERMINATOR: return ("Terminator"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return ("System Boot Initiated"); case IPMI_MONITORING_SENSOR_TYPE_BOOT_ERROR: return ("Boot Error"); case IPMI_MONITORING_SENSOR_TYPE_OS_BOOT: return ("OS Boot"); case IPMI_MONITORING_SENSOR_TYPE_OS_CRITICAL_STOP: return ("OS Critical Stop"); case IPMI_MONITORING_SENSOR_TYPE_SLOT_CONNECTOR: return ("Slot/Connector"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return ("System ACPI Power State"); case IPMI_MONITORING_SENSOR_TYPE_WATCHDOG2: return ("Watchdog 2"); case IPMI_MONITORING_SENSOR_TYPE_PLATFORM_ALERT: return ("Platform Alert"); case IPMI_MONITORING_SENSOR_TYPE_ENTITY_PRESENCE: return ("Entity Presence"); case IPMI_MONITORING_SENSOR_TYPE_MONITOR_ASIC_IC: return ("Monitor ASIC/IC"); case IPMI_MONITORING_SENSOR_TYPE_LAN: return ("LAN"); case IPMI_MONITORING_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return ("Management Subsystem Health"); case IPMI_MONITORING_SENSOR_TYPE_BATTERY: return ("Battery"); case IPMI_MONITORING_SENSOR_TYPE_SESSION_AUDIT: return ("Session Audit"); case IPMI_MONITORING_SENSOR_TYPE_VERSION_CHANGE: return ("Version Change"); case IPMI_MONITORING_SENSOR_TYPE_FRU_STATE: return ("FRU State"); } return ("Unrecognized"); } static int _ipmimonitoring (struct ipmi_monitoring_ipmi_config *ipmi_config) { ipmi_monitoring_ctx_t ctx = NULL; unsigned int sel_flags = 0; unsigned int i; int sel_count; int errnum; int rv = -1; if (ipmi_monitoring_init (ipmimonitoring_init_flags, &errnum) < 0) { fprintf (stderr, "ipmi_monitoring_init: %s\n", ipmi_monitoring_ctx_strerror (errnum)); goto cleanup; } if (!(ctx = ipmi_monitoring_ctx_create ())) { perror ("ipmi_monitoring_ctx_create:"); goto cleanup; } if (sdr_cache_directory) { if (ipmi_monitoring_ctx_sdr_cache_directory (ctx, sdr_cache_directory) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sdr_cache_directory: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } /* Must call otherwise only default interpretations ever used */ if (sel_config_file) { if (ipmi_monitoring_ctx_sel_config_file (ctx, sel_config_file) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sel_config_file: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else { if (ipmi_monitoring_ctx_sel_config_file (ctx, NULL) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sel_config_file: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } if (reread_sdr_cache) sel_flags |= IPMI_MONITORING_SEL_FLAGS_REREAD_SDR_CACHE; if (interpret_oem_data) sel_flags |= IPMI_MONITORING_SEL_FLAGS_INTERPRET_OEM_DATA; if (assume_system_event_record) sel_flags |= IPMI_MONITORING_SEL_FLAGS_ASSUME_SYSTEM_EVENT_RECORD; if (entity_sensor_names) sel_flags |= IPMI_MONITORING_SEL_FLAGS_ENTITY_SENSOR_NAMES; if (record_ids_length) { if ((sel_count = ipmi_monitoring_sel_by_record_id (ctx, hostname, ipmi_config, sel_flags, record_ids, record_ids_length, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_by_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else if (sensor_types_length) { if ((sel_count = ipmi_monitoring_sel_by_sensor_type (ctx, hostname, ipmi_config, sel_flags, sensor_types, sensor_types_length, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_by_sensor_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else if (date_begin || date_end) { if ((sel_count = ipmi_monitoring_sel_by_date_range (ctx, hostname, ipmi_config, sel_flags, date_begin, date_end, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_by_sensor_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else { if ((sel_count = ipmi_monitoring_sel_by_record_id (ctx, hostname, ipmi_config, sel_flags, NULL, 0, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_by_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } printf ("%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s\n", "Record ID", "Record Type", "SEL State", "Timestamp", "Sensor Name", "Sensor Type", "Event Direction", "Event Type Code", "Event Data", "Event Offset", "Event Offset String"); for (i = 0; i < sel_count; i++, ipmi_monitoring_sel_iterator_next (ctx)) { int record_id, record_type, sel_state, sensor_type, sensor_number, event_direction, event_offset_type, event_offset, event_type_code, manufacturer_id; unsigned int timestamp, event_data1, event_data2, event_data3; int record_type_class; char *event_offset_string = NULL; const char *sensor_type_str; const char *event_direction_str; const char *sel_state_str; char *sensor_name = NULL; unsigned char oem_data[64]; int oem_data_len; unsigned int j; if ((record_id = ipmi_monitoring_sel_read_record_id (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((record_type = ipmi_monitoring_sel_read_record_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_record_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((record_type_class = ipmi_monitoring_sel_read_record_type_class (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_record_type_class: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sel_state = ipmi_monitoring_sel_read_sel_state (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_sel_state: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (sel_state == IPMI_MONITORING_STATE_NOMINAL) sel_state_str = "Nominal"; else if (sel_state == IPMI_MONITORING_STATE_WARNING) sel_state_str = "Warning"; else if (sel_state == IPMI_MONITORING_STATE_CRITICAL) sel_state_str = "Critical"; else sel_state_str = "N/A"; printf ("%u, %u, %s", record_id, record_type, sel_state_str); if (record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD || record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if (ipmi_monitoring_sel_read_timestamp (ctx, ×tamp) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_timestamp: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } /* XXX: This should be converted to a nice date output using * your favorite timestamp -> string conversion functions. */ printf (", %u", timestamp); } else printf (", N/A"); if (record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_SYSTEM_EVENT_RECORD) { /* If you are integrating ipmimonitoring SEL into a monitoring application, * you may wish to count the number of times a specific error occurred * and report that to the monitoring application. * * In this particular case, you'll probably want to check out * what sensor type each SEL event is reporting, the * event offset type, and the specific event offset that occurred. * * See ipmi_monitoring_offsets.h for a list of event offsets * and types. */ if (!(sensor_name = ipmi_monitoring_sel_read_sensor_name (ctx))) { fprintf (stderr, "ipmi_monitoring_sel_read_sensor_name: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_type = ipmi_monitoring_sel_read_sensor_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_sensor_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_number = ipmi_monitoring_sel_read_sensor_number (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_sensor_number: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((event_direction = ipmi_monitoring_sel_read_event_direction (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_event_direction: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((event_type_code = ipmi_monitoring_sel_read_event_type_code (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_event_type_code: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (ipmi_monitoring_sel_read_event_data (ctx, &event_data1, &event_data2, &event_data3) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_event_data: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((event_offset_type = ipmi_monitoring_sel_read_event_offset_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_event_offset_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((event_offset = ipmi_monitoring_sel_read_event_offset (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_event_offset: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (!(event_offset_string = ipmi_monitoring_sel_read_event_offset_string (ctx))) { fprintf (stderr, "ipmi_monitoring_sel_read_event_offset_string: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (!strlen (sensor_name)) sensor_name = "N/A"; sensor_type_str = _get_sensor_type_string (sensor_type); if (event_direction == IPMI_MONITORING_SEL_EVENT_DIRECTION_ASSERTION) event_direction_str = "Assertion"; else event_direction_str = "Deassertion"; printf (", %s, %s, %u, %s, %Xh, %Xh-%Xh-%Xh", sensor_name, sensor_type_str, sensor_number, event_direction_str, event_type_code, event_data1, event_data2, event_data3); if (event_offset_type != IPMI_MONITORING_EVENT_OFFSET_TYPE_UNKNOWN) printf (", %Xh", event_offset); else printf (", N/A"); if (event_offset_type != IPMI_MONITORING_EVENT_OFFSET_TYPE_UNKNOWN) printf (", %s", event_offset_string); else printf (", N/A"); } else if (record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD || record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_NON_TIMESTAMPED_OEM_RECORD) { if (record_type_class == IPMI_MONITORING_SEL_RECORD_TYPE_CLASS_TIMESTAMPED_OEM_RECORD) { if ((manufacturer_id = ipmi_monitoring_sel_read_manufacturer_id (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_manufacturer_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } printf (", Manufacturer ID = %Xh", manufacturer_id); } if ((oem_data_len = ipmi_monitoring_sel_read_oem_data (ctx, oem_data, 1024)) < 0) { fprintf (stderr, "ipmi_monitoring_sel_read_oem_data: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } printf (", OEM Data = "); for (j = 0; j < oem_data_len; j++) printf ("%02Xh ", oem_data[j]); } else printf (", N/A, N/A, N/A, N/A, N/A, N/A, N/A"); printf ("\n"); } rv = 0; cleanup: if (ctx) ipmi_monitoring_ctx_destroy (ctx); return (rv); } static void _init_ipmi_config (struct ipmi_monitoring_ipmi_config *ipmi_config) { assert (ipmi_config); ipmi_config->driver_type = driver_type; ipmi_config->disable_auto_probe = disable_auto_probe; ipmi_config->driver_address = driver_address; ipmi_config->register_spacing = register_spacing; ipmi_config->driver_device = driver_device; ipmi_config->protocol_version = protocol_version; ipmi_config->username = username; ipmi_config->password = password; ipmi_config->k_g = k_g; ipmi_config->k_g_len = k_g_len; ipmi_config->privilege_level = privilege_level; ipmi_config->authentication_type = authentication_type; ipmi_config->cipher_suite_id = cipher_suite_id; ipmi_config->session_timeout_len = session_timeout; ipmi_config->retransmission_timeout_len = retransmission_timeout; ipmi_config->workaround_flags = workaround_flags; } int main (int argc, char **argv) { struct ipmi_monitoring_ipmi_config ipmi_config; _init_ipmi_config (&ipmi_config); if (_ipmimonitoring (&ipmi_config) < 0) exit (1); exit (0); } freeipmi-1.6.4/contrib/libipmimonitoring/ipmimonitoring-sensors.c0000644002055400205540000005326613527331635025373 0ustar00achuachu00000000000000/*****************************************************************************\ * $Id: ipmimonitoring-sensors.c,v 1.6 2010-07-22 21:49:00 chu11 Exp $ ***************************************************************************** * Copyright (C) 2007-2015 Lawrence Livermore National Security, LLC. * Copyright (C) 2006-2007 The Regents of the University of California. * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER). * Written by Albert Chu * UCRL-CODE-222073 * * This file is part of Ipmimonitoring, an IPMI sensor monitoring * library. For details, see http://www.llnl.gov/linux/. * * Ipmimonitoring is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by the * Free Software Foundation; either version 3 of the License, or (at your * option) any later version. * * Ipmimonitoring is distributed in the hope that it will be useful, but * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License * for more details. * * You should have received a copy of the GNU General Public License along * with Ipmimonitoring. If not, see . \*****************************************************************************/ /* This is an example of how to use the libipmimonitoring library to * read and monitor sensors. * * At the top of this file, you'll find a number of variables for * configuration of IPMI communication and what sensors you are * interested in monitoring. Those variables are used in the * libipmimonitoring calls below. * * Hopefully this example will be sufficient to help anyone program * IPMI monitoring software for their environment. * * To compile, linking against the library should be sufficient for * most environments. e.g. * * gcc -o ipmimonitoring-sensors ipmimonitoring-sensors.c -lipmimonitoring */ #include #include #include #include #include #include #include #include /* Communication Configuration - Initialize accordingly */ /* Hostname, NULL for In-band communication, non-null for a hostname */ char *hostname = NULL; /* In-band Communication Configuration */ /* On linux, you may wish to change driver_type to * IPMI_MONITORING_DRIVER_TYPE_OPENIPMI if you use /dev/ipmi0 */ int driver_type = IPMI_MONITORING_DRIVER_TYPE_KCS; /* or -1 for default */ int disable_auto_probe = 0; /* probe for in-band device */ unsigned int driver_address = 0; /* not used if probing */ unsigned int register_spacing = 0; /* not used if probing */ char *driver_device = NULL; /* not used if probing */ /* Out-of-band Communication Configuration */ int protocol_version = IPMI_MONITORING_PROTOCOL_VERSION_1_5; /* or -1 for default */ char *username = "foousername"; char *password = "foopassword"; unsigned char *k_g = NULL; unsigned int k_g_len = 0; int privilege_level = IPMI_MONITORING_PRIVILEGE_LEVEL_USER; /* or -1 for default */ int authentication_type = IPMI_MONITORING_AUTHENTICATION_TYPE_MD5; /* or -1 for default */ int cipher_suite_id = 0; /* or -1 for default */ int session_timeout = 0; /* 0 for default */ int retransmission_timeout = 0; /* 0 for default */ /* Workarounds - specify workaround flags if necessary */ unsigned int workaround_flags = 0; /* Initialize w/ record id numbers to only monitor specific record ids */ unsigned int record_ids[] = {0}; unsigned int record_ids_length = 0; /* Initialize w/ sensor types to only monitor specific sensor types * see ipmi_monitoring.h sensor types list. */ unsigned int sensor_types[] = {0}; unsigned int sensor_types_length = 0; /* Set to an appropriate alternate if desired */ char *sdr_cache_directory = "/tmp"; char *sensor_config_file = NULL; /* Set to 1 or 0 to enable these sensor reading flags * - See ipmi_monitoring.h for descriptions of these flags. */ int reread_sdr_cache = 0; int ignore_non_interpretable_sensors = 1; int bridge_sensors = 0; int interpret_oem_data = 0; int shared_sensors = 0; int discrete_reading = 0; int ignore_scanning_disabled = 0; int assume_bmc_owner = 0; int entity_sensor_names = 0; /* Initialization flags * * Most commonly bitwise OR IPMI_MONITORING_FLAGS_DEBUG and/or * IPMI_MONITORING_FLAGS_DEBUG_IPMI_PACKETS for extra debugging * information. */ unsigned int ipmimonitoring_init_flags = 0; static const char * _get_sensor_type_string (int sensor_type) { switch (sensor_type) { case IPMI_MONITORING_SENSOR_TYPE_RESERVED: return ("Reserved"); case IPMI_MONITORING_SENSOR_TYPE_TEMPERATURE: return ("Temperature"); case IPMI_MONITORING_SENSOR_TYPE_VOLTAGE: return ("Voltage"); case IPMI_MONITORING_SENSOR_TYPE_CURRENT: return ("Current"); case IPMI_MONITORING_SENSOR_TYPE_FAN: return ("Fan"); case IPMI_MONITORING_SENSOR_TYPE_PHYSICAL_SECURITY: return ("Physical Security"); case IPMI_MONITORING_SENSOR_TYPE_PLATFORM_SECURITY_VIOLATION_ATTEMPT: return ("Platform Security Violation Attempt"); case IPMI_MONITORING_SENSOR_TYPE_PROCESSOR: return ("Processor"); case IPMI_MONITORING_SENSOR_TYPE_POWER_SUPPLY: return ("Power Supply"); case IPMI_MONITORING_SENSOR_TYPE_POWER_UNIT: return ("Power Unit"); case IPMI_MONITORING_SENSOR_TYPE_COOLING_DEVICE: return ("Cooling Device"); case IPMI_MONITORING_SENSOR_TYPE_OTHER_UNITS_BASED_SENSOR: return ("Other Units Based Sensor"); case IPMI_MONITORING_SENSOR_TYPE_MEMORY: return ("Memory"); case IPMI_MONITORING_SENSOR_TYPE_DRIVE_SLOT: return ("Drive Slot"); case IPMI_MONITORING_SENSOR_TYPE_POST_MEMORY_RESIZE: return ("POST Memory Resize"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_FIRMWARE_PROGRESS: return ("System Firmware Progress"); case IPMI_MONITORING_SENSOR_TYPE_EVENT_LOGGING_DISABLED: return ("Event Logging Disabled"); case IPMI_MONITORING_SENSOR_TYPE_WATCHDOG1: return ("Watchdog 1"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_EVENT: return ("System Event"); case IPMI_MONITORING_SENSOR_TYPE_CRITICAL_INTERRUPT: return ("Critical Interrupt"); case IPMI_MONITORING_SENSOR_TYPE_BUTTON_SWITCH: return ("Button/Switch"); case IPMI_MONITORING_SENSOR_TYPE_MODULE_BOARD: return ("Module/Board"); case IPMI_MONITORING_SENSOR_TYPE_MICROCONTROLLER_COPROCESSOR: return ("Microcontroller/Coprocessor"); case IPMI_MONITORING_SENSOR_TYPE_ADD_IN_CARD: return ("Add In Card"); case IPMI_MONITORING_SENSOR_TYPE_CHASSIS: return ("Chassis"); case IPMI_MONITORING_SENSOR_TYPE_CHIP_SET: return ("Chip Set"); case IPMI_MONITORING_SENSOR_TYPE_OTHER_FRU: return ("Other Fru"); case IPMI_MONITORING_SENSOR_TYPE_CABLE_INTERCONNECT: return ("Cable/Interconnect"); case IPMI_MONITORING_SENSOR_TYPE_TERMINATOR: return ("Terminator"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_BOOT_INITIATED: return ("System Boot Initiated"); case IPMI_MONITORING_SENSOR_TYPE_BOOT_ERROR: return ("Boot Error"); case IPMI_MONITORING_SENSOR_TYPE_OS_BOOT: return ("OS Boot"); case IPMI_MONITORING_SENSOR_TYPE_OS_CRITICAL_STOP: return ("OS Critical Stop"); case IPMI_MONITORING_SENSOR_TYPE_SLOT_CONNECTOR: return ("Slot/Connector"); case IPMI_MONITORING_SENSOR_TYPE_SYSTEM_ACPI_POWER_STATE: return ("System ACPI Power State"); case IPMI_MONITORING_SENSOR_TYPE_WATCHDOG2: return ("Watchdog 2"); case IPMI_MONITORING_SENSOR_TYPE_PLATFORM_ALERT: return ("Platform Alert"); case IPMI_MONITORING_SENSOR_TYPE_ENTITY_PRESENCE: return ("Entity Presence"); case IPMI_MONITORING_SENSOR_TYPE_MONITOR_ASIC_IC: return ("Monitor ASIC/IC"); case IPMI_MONITORING_SENSOR_TYPE_LAN: return ("LAN"); case IPMI_MONITORING_SENSOR_TYPE_MANAGEMENT_SUBSYSTEM_HEALTH: return ("Management Subsystem Health"); case IPMI_MONITORING_SENSOR_TYPE_BATTERY: return ("Battery"); case IPMI_MONITORING_SENSOR_TYPE_SESSION_AUDIT: return ("Session Audit"); case IPMI_MONITORING_SENSOR_TYPE_VERSION_CHANGE: return ("Version Change"); case IPMI_MONITORING_SENSOR_TYPE_FRU_STATE: return ("FRU State"); } return ("Unrecognized"); } static int _ipmimonitoring (struct ipmi_monitoring_ipmi_config *ipmi_config) { ipmi_monitoring_ctx_t ctx = NULL; unsigned int sensor_reading_flags = 0; unsigned int i; int sensor_count; int errnum; int rv = -1; if (ipmi_monitoring_init (ipmimonitoring_init_flags, &errnum) < 0) { fprintf (stderr, "ipmi_monitoring_init: %s\n", ipmi_monitoring_ctx_strerror (errnum)); goto cleanup; } if (!(ctx = ipmi_monitoring_ctx_create ())) { perror ("ipmi_monitoring_ctx_create:"); goto cleanup; } if (sdr_cache_directory) { if (ipmi_monitoring_ctx_sdr_cache_directory (ctx, sdr_cache_directory) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sdr_cache_directory: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } /* Must call otherwise only default interpretations ever used */ if (sensor_config_file) { if (ipmi_monitoring_ctx_sensor_config_file (ctx, sensor_config_file) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sensor_config_file: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else { if (ipmi_monitoring_ctx_sensor_config_file (ctx, NULL) < 0) { fprintf (stderr, "ipmi_monitoring_ctx_sensor_config_file: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } if (reread_sdr_cache) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_REREAD_SDR_CACHE; if (ignore_non_interpretable_sensors) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_NON_INTERPRETABLE_SENSORS; if (bridge_sensors) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_BRIDGE_SENSORS; if (interpret_oem_data) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_INTERPRET_OEM_DATA; if (shared_sensors) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_SHARED_SENSORS; if (discrete_reading) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_DISCRETE_READING; if (ignore_scanning_disabled) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_IGNORE_SCANNING_DISABLED; if (assume_bmc_owner) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_ASSUME_BMC_OWNER; if (entity_sensor_names) sensor_reading_flags |= IPMI_MONITORING_SENSOR_READING_FLAGS_ENTITY_SENSOR_NAMES; if (!record_ids_length && !sensor_types_length) { if ((sensor_count = ipmi_monitoring_sensor_readings_by_record_id (ctx, hostname, ipmi_config, sensor_reading_flags, NULL, 0, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_readings_by_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else if (record_ids_length) { if ((sensor_count = ipmi_monitoring_sensor_readings_by_record_id (ctx, hostname, ipmi_config, sensor_reading_flags, record_ids, record_ids_length, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_readings_by_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } else { if ((sensor_count = ipmi_monitoring_sensor_readings_by_sensor_type (ctx, hostname, ipmi_config, sensor_reading_flags, sensor_types, sensor_types_length, NULL, NULL)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_readings_by_sensor_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } } printf ("%s, %s, %s, %s, %s, %s, %s, %s, %s, %s\n", "Record ID", "Sensor Name", "Sensor Number", "Sensor Type", "Sensor State", "Sensor Reading", "Sensor Units", "Sensor Event/Reading Type Code", "Sensor Event Bitmask", "Sensor Event String"); for (i = 0; i < sensor_count; i++, ipmi_monitoring_sensor_iterator_next (ctx)) { int record_id, sensor_number, sensor_type, sensor_state, sensor_units, sensor_bitmask_type, sensor_bitmask, sensor_reading_type, event_reading_type_code; char **sensor_bitmask_strings = NULL; const char *sensor_type_str; const char *sensor_state_str; char *sensor_name = NULL; void *sensor_reading; if ((record_id = ipmi_monitoring_sensor_read_record_id (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_record_id: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_number = ipmi_monitoring_sensor_read_sensor_number (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_number: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_type = ipmi_monitoring_sensor_read_sensor_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (!(sensor_name = ipmi_monitoring_sensor_read_sensor_name (ctx))) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_name: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_state = ipmi_monitoring_sensor_read_sensor_state (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_state: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_units = ipmi_monitoring_sensor_read_sensor_units (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_units: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_bitmask_type = ipmi_monitoring_sensor_read_sensor_bitmask_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_bitmask_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if ((sensor_bitmask = ipmi_monitoring_sensor_read_sensor_bitmask (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_bitmask: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } /* it's ok for this to be NULL, i.e. sensor_bitmask == * IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN */ sensor_bitmask_strings = ipmi_monitoring_sensor_read_sensor_bitmask_strings (ctx); if ((sensor_reading_type = ipmi_monitoring_sensor_read_sensor_reading_type (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_sensor_reading_type: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } sensor_reading = ipmi_monitoring_sensor_read_sensor_reading (ctx); if ((event_reading_type_code = ipmi_monitoring_sensor_read_event_reading_type_code (ctx)) < 0) { fprintf (stderr, "ipmi_monitoring_sensor_read_event_reading_type_code: %s\n", ipmi_monitoring_ctx_errormsg (ctx)); goto cleanup; } if (!strlen (sensor_name)) sensor_name = "N/A"; sensor_type_str = _get_sensor_type_string (sensor_type); printf ("%u, %s, %u, %s", record_id, sensor_name, sensor_number, sensor_type_str); if (sensor_state == IPMI_MONITORING_STATE_NOMINAL) sensor_state_str = "Nominal"; else if (sensor_state == IPMI_MONITORING_STATE_WARNING) sensor_state_str = "Warning"; else if (sensor_state == IPMI_MONITORING_STATE_CRITICAL) sensor_state_str = "Critical"; else sensor_state_str = "N/A"; printf (", %s", sensor_state_str); if (sensor_reading) { const char *sensor_units_str; if (sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER8_BOOL) printf (", %s", (*((uint8_t *)sensor_reading) ? "true" : "false")); else if (sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_UNSIGNED_INTEGER32) printf (", %u", *((uint32_t *)sensor_reading)); else if (sensor_reading_type == IPMI_MONITORING_SENSOR_READING_TYPE_DOUBLE) printf (", %.2f", *((double *)sensor_reading)); else printf (", N/A"); if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_CELSIUS) sensor_units_str = "C"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_FAHRENHEIT) sensor_units_str = "F"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_VOLTS) sensor_units_str = "V"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_AMPS) sensor_units_str = "A"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_RPM) sensor_units_str = "RPM"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_WATTS) sensor_units_str = "W"; else if (sensor_units == IPMI_MONITORING_SENSOR_UNITS_PERCENT) sensor_units_str = "%"; else sensor_units_str = "N/A"; printf (", %s", sensor_units_str); } else printf (", N/A, N/A"); printf (", %Xh", event_reading_type_code); /* It is possible you may want to monitor specific event * conditions that may occur. If that is the case, you may want * to check out what specific bitmask type and bitmask events * occurred. See ipmi_monitoring_bitmasks.h for a list of * bitmasks and types. */ if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN) printf (", %Xh", sensor_bitmask); else printf (", N/A"); if (sensor_bitmask_type != IPMI_MONITORING_SENSOR_BITMASK_TYPE_UNKNOWN && sensor_bitmask_strings) { unsigned int i = 0; printf (","); while (sensor_bitmask_strings[i]) { printf (" "); printf ("'%s'", sensor_bitmask_strings[i]); i++; } } else printf (", N/A"); printf ("\n"); } rv = 0; cleanup: if (ctx) ipmi_monitoring_ctx_destroy (ctx); return (rv); } static void _init_ipmi_config (struct ipmi_monitoring_ipmi_config *ipmi_config) { assert (ipmi_config); ipmi_config->driver_type = driver_type; ipmi_config->disable_auto_probe = disable_auto_probe; ipmi_config->driver_address = driver_address; ipmi_config->register_spacing = register_spacing; ipmi_config->driver_device = driver_device; ipmi_config->protocol_version = protocol_version; ipmi_config->username = username; ipmi_config->password = password; ipmi_config->k_g = k_g; ipmi_config->k_g_len = k_g_len; ipmi_config->privilege_level = privilege_level; ipmi_config->authentication_type = authentication_type; ipmi_config->cipher_suite_id = cipher_suite_id; ipmi_config->session_timeout_len = session_timeout; ipmi_config->retransmission_timeout_len = retransmission_timeout; ipmi_config->workaround_flags = workaround_flags; } int main (int argc, char **argv) { struct ipmi_monitoring_ipmi_config ipmi_config; _init_ipmi_config (&ipmi_config); if (_ipmimonitoring (&ipmi_config) < 0) exit (1); exit (0); } freeipmi-1.6.4/contrib/nagios/0000755002055400205540000000000013527342551016201 5ustar00achuachu00000000000000freeipmi-1.6.4/contrib/nagios/README0000644002055400205540000000137213527331635017065 0ustar00achuachu00000000000000nagios_ipmi_sensors.pl ----------------------- This script can be used to monitor IPMI sensors in nagios via FreeIPMI's ipmi-sensors. Please see instructions found at the top of the script for detailed instructions. This tool will monitor the sensor state (Nominal, Warning, or Critical) of each sensor as determined by libfreeipmi's interpret library. The Nominal, Warning, and Critical states of each sensor will be collected and counted. The overall IPMI sensor status will be mapped into a Nagios status of OK, Warning, or Critical. Details will then be output for Nagios to read. See ipmi-sensors(8) for more general info on ipmi-sensors and freeipmi_interpret_sensors.conf(5) for more information on sensor states. Albert Chu chu11 at llnl dot gov freeipmi-1.6.4/contrib/nagios/nagios_ipmi_sensors.pl0000755002055400205540000002003413527331635022613 0ustar00achuachu00000000000000#!/usr/bin/perl ############################################################################# # Copyright (C) 2003-2009 FreeIPMI Core Team # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 3, or (at your option) # any later version. # # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with this program. If not, see . ############################################################################# # # nagios_ipmi_sensors.pl # # Author: # # Albert Chu # # Description: # # This script can be used to monitor IPMI sensors in nagios via # FreeIPMI's ipmi-sensors. # # This tool will monitor the sensor state (Nominal, Warning, or # Critical) of each sensor as determined by libfreeipmi's interpret # library. The Nominal, Warning, and Critical states of each sensor # will be collected and counted. The overall IPMI sensor status will # be mapped into a Nagios status of OK, Warning, or Critical. Details # will then be output for Nagios to read. See ipmi-sensors(8) for # more general info on ipmi-sensors and # freeipmi_interpret_sensors.conf(5) for more information on sensor # states. # # Options: # # -h - specify hostname(s) to remotely access (don't specify for inband) # -S - specify an alternate ipmi_sensors location # -s - specify additional ipmi_sensors arguments # -d - print debug info # -H - output help # # Environment Variables: # # IPMI_HOSTS - specify hostname(s) to remotely access (don't specify for inband) # IPMI_SENSORS_PATH - specify an alternate ipmi-ssensors location # IPMI_SENSORS_ARGS - specify additional ipmi-sensors arguments # # Setup Notes: # # Specify the remote hosts you wish to access IPMI information from # via the -h option or IPMI_HOSTS environment variable. If you wish # only to monitor the local node, do not specify an ipmi host. The # input to the -h option is passed directly to ipmimonitoring. So you # may specify anything the ipmimonitoring tool accepts including # hostranged (e.g. foo[0-127]) or comma separated # (e.g. foo0,foo1,foo2,foo3) inputs. If you wish to monitor both # remote and local system, remember to specify one of the hosts as # "localhost". Most will probably want to monitor just one host (get # the IPMI status for each individual machine being monitored), # however more than one host can be analyzed for a collective result. # # If stored in a non-default location the -S option or # IPMI_SENSORS_PATH environment variable must be specified to # determine the ipmimonitoring location. # # In order to specify non-defaults for ipmimonitoring use the -s # argument or IPMI_SENSORS_ARGS environment variable. Typically, # this option is necessary for non-default communication information # or authentication information (e.g. driver path, driver type, # username, password, etc.). Non-default communication information # can also be stored in the FreeIPMI configuration file. This is the # suggested method because passwords and other sensitive information # could show up in ps(1). If you wish to limit the sensors being # monitored, you can also specify which record-ids are to be monitored # (-s option). # # The setup for this can vary depending on your environment and nagios # setup, but most will need to set this up in nagios by defining a # command and then a service. # # define command { # command_name nagios_ipmi_sensors # command_line /path/nagios_ipmi_sensors.pl -h $ARG1$ # } # # define service { # host_name foohost # service_description ipmi # check_command nagios_ipmi_sensors!foohost # } # # The default session timeout length in ipmi-sensors is 20 seconds. # We would recommend that IPMI not be monitored more frequently than # that. # # Help: # # Report bugs to freeipmi-users@gnu.org or freeipmi-devel@gnu.org. # ############################################################################# use strict; use Getopt::Std; my $debug = 0; my $IPMI_HOSTS = undef; my $IPMI_SENSORS_PATH = "/usr/sbin/ipmi-sensors"; my $IPMI_SENSORS_ARGS = ""; my $IPMI_SENSORS_OUTPUT; my @IPMI_SENSORS_OUTPUT_LINES; my $line; my $cmd; my $num_output = 0; my $warning_num = 0; my $critical_num = 0; my $fatal_error = 0; sub usage { my $prog = $0; print "Usage: $prog [-h ] [-S ] [-s ] [-d] [-H]\n"; print " -h specify hostname(s) to remotely access\n"; print " -S specify an alternate ipmi-sensors path\n"; print " -s specify additional ipmi-sensors arguments\n"; print " -d print debug info\n"; print " -H output help\n"; exit 0; } if (!getopts("h:S:s:dH")) { usage(); } if (defined($main::opt_H)) { usage(); } if (defined($main::opt_h)) { $IPMI_HOSTS = $main::opt_h; } if (defined($main::opt_S)) { $IPMI_SENSORS_PATH = $main::opt_S; } if (defined($main::opt_s)) { $IPMI_SENSORS_ARGS = $main::opt_s; } if (defined($main::opt_d)) { $debug = 1; } if ($ENV{"IPMI_HOSTS"}) { $IPMI_HOSTS = $ENV{"IPMI_HOSTS"}; } if ($ENV{"IPMI_SENSORS_PATH"}) { $IPMI_SENSORS_PATH = $ENV{"IPMI_SENSORS_PATH"}; } if ($ENV{"IPMI_SENSORS_ARGS"}) { $IPMI_SENSORS_ARGS = $ENV{"IPMI_SENSORS_ARGS"}; } if ($debug) { print "IPMI_HOSTS=$IPMI_HOSTS\n"; print "IPMI_SENSORS_PATH=$IPMI_SENSORS_PATH\n"; print "IPMI_SENSORS_ARGS=$IPMI_SENSORS_ARGS\n"; } if (!(-x $IPMI_SENSORS_PATH)) { print "$IPMI_SENSORS_PATH cannot be executed\n"; exit(1); } # note, don't need --ignore-non-interpretable-sensors, legacy output handles it if ($IPMI_HOSTS) { $cmd = "$IPMI_SENSORS_PATH $IPMI_SENSORS_ARGS -h $IPMI_HOSTS --quiet-cache --sdr-cache-recreate --always-prefix --no-header-output --output-sensor-state"; } else { $cmd = "$IPMI_SENSORS_PATH $IPMI_SENSORS_ARGS --quiet-cache --sdr-cache-recreate --always-prefix --no-header-output --output-sensor-state" } if ($debug) { print "ipmi-sensors command: $cmd\n"; } $IPMI_SENSORS_OUTPUT = `$cmd`; if ($? != 0) { print "$IPMI_SENSORS_PATH: exited with error\n"; } @IPMI_SENSORS_OUTPUT_LINES = split(/\n/, $IPMI_SENSORS_OUTPUT); foreach $line (@IPMI_SENSORS_OUTPUT_LINES) { my $hostname; my $record_id; my $id_string; my $type; my $state; my $reading; my $units; my $event; my $id_string_state; my $output_str; if ($debug) { print "Parsing: $line\n"; } if ($line =~ /(.+)\: (\d+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)(\s+)\| (.+)/) { $hostname = $1; $record_id = $2; $id_string = $4; $type = $6; $state = $8; $reading = $10; $units = $12; $event = $14; # trim whitespace off end of string $record_id =~ s/\s+$//; $id_string =~ s/\s+$//; $type =~ s/\s+$//; $state =~ s/\s+$//; $reading =~ s/\s+$//; $units =~ s/\s+$//; } else { print "Line not parsable\n"; $fatal_error++; next; } # make name better, convert spaces and slashes into underscores $id_string =~ s/ /_/g; $id_string =~ s/\//_/g; if ($state eq "Nominal") { next; } if ($state eq "N/A") { next; } if ($state eq "Warning") { $warning_num++; $output_str = "WARNING"; } elsif ($state eq "Critical") { $critical_num++; $output_str = "CRITICAL"; } else { print "State not parsable\n"; $fatal_error++; next; } if ($num_output) { print "; "; } print "$id_string - $output_str"; $num_output++; } # Nagios Exit Codes # 0 = OK # 1 = WARNING # 2 = CRITICAL # 3 = UNKNOWN if ($fatal_error) { exit 3; } if ($critical_num) { exit 2; } if ($warning_num) { exit 1; } exit 0; freeipmi-1.6.4/contrib/pet/0000755002055400205540000000000013527342551015511 5ustar00achuachu00000000000000freeipmi-1.6.4/contrib/pet/README0000644002055400205540000004213113527331635016373 0ustar00achuachu00000000000000petalert.pl ----------------------- This is a snmptrapd handler script to alert when Platform Event Traps (PET) occur. It was written because traptoemail distributed with net-snmp-5.3.2.2 is incapable of handling multi-line hexstrings and restricted to email alert. This script operates in two modes, traphandle or embperl. When in traphandle mode, it concatenates the quoted hex string into one long line, then builds structures to resemble embperl mode. Both modes then invokes helper decoder, ipmi-pet(8) from FreeIPMI, parses the output and alerts in given way like email, nagios external command, nsca, etc. 1. REQUIREMENTS freeipmi-1.1.1 and above is required for the script to function. Both FreeIPMI and the script imply Unix-like system, notably GNU/Linux; Windows is not supported as of this writing, Dec 13, 2011. Net-SNMP 5.3.2.2 and above is required to make a complete alerting solution. Actually only snmptrapd is related which acts as the trap receiver. If you prefer to running it as embedded perl handler, your version of Net-SNMP should have embedded perl support enabled, see "Embedded Perl Support" from snmpd.conf(8) for more infomration. Usually it's enabled, and you can verify with the following command: # net-snmp-config --configure-options | tr ' ' '\n' | grep perl '--enable-embedded-perl' If you prefer to invoking the handler directly rather than invoking it with perl(1), make sure the script itself has execute permission. Both cases require a working Perl installation, better Perl-5.8.8. If you prefer to built-in email alerting, make sure Net::SMTP is installed. If you prefer to Nagios monitoring system, make sure the Nagios process and snmptrapd is on the same host. Usually you don't need to worry about write permission of Nagios external command file, because the handler is invoked as root by snmptrapd. If that's not your case, you need to ensure write permission on the command file. You might prefer to other alerting methods, bad news is it is not implemented yet. Please drop me a mail, then I might take my time to go on with plugin support. Paranoids might check firewall rules allowing only traffic from trusted hosts. 2. CONFIGURATION (Note backslash-newline concatenates adjacent lines, so put them in one) Put a line like these in your snmptrapd.conf file: traphandle .1.3.6.1.4.1.3183.1.1 /usr/bin/perl \ /usr/share/doc/freeipmi/contrib/pet/petalert.pl --mode=traphandle \ --alert=email --sdrcache SDRCONF -- -f FROM -s SMTPSERVER ADDRESSES Or, if you prefer embedded perl, perl do "/usr/share/doc/freeipmi/contrib/pet/petalert.pl"; perl IpmiPET::main(qw(--mode=embperl --trapoid=OID --sdrcache=SDRCONF \ --alert=email -- -s SMTPSERVER -f FROM ADDRESSES)); where: only --mode is required, see "petalert.pl -h". Make sure execute permission is granted to execute handlers, for example, authCommunity execute COMMUNITY_STRING see "ACCESS CONTROL" from snmptrapd.conf(8) for more information. Bad news is that you have to use numeric representation, so in addition add "-Of -On" to snmptrapd options. You have to enable PET on IPMI nodes as well, including LAN access, PEF alerting, community, alert policy and destination. You may use ipmi-config from FreeIPMI to do the configuration (use --category to checkout core and pef category of configuration). See "IPMI NODES". You might wish to set up PTR records for IPMI nodes, otherwise, snmptrapd reports to traphandle and the script will fall back to use ip. 2.1 ACKNOWLEDGE Platform event trap is over UDP, you might worry about trap loss. IPMI spec allows the trap receiver to acknowledge the trap. Use --ack to acknowledge the trap before alerting. You may need workarounds for acknowledgement. See BUGS. So in a acknowlege setup, it might be like this: perl do "/usr/share/doc/freeipmi/contrib/pet/petalert.pl"; perl IpmiPET::main(qw(--mode=embperl --trapoid=OID --sdrcache=SDRCONF \ --ack -W malformedack \ --alert=email -- -s SMTPSERVER -f FROM ADDRESSES)); 2.2 NAGIOS INTEGRATION Nagios monitoring system could be plugged into by writing to its external command file as passive check. See ipminodes.cfg and check_rmcping for related Nagios configuration. Assuming Nagios process is local, use: perl do "/usr/share/doc/freeipmi/contrib/pet/petalert.pl"; perl IpmiPET::main(qw(--mode=embperl --trapoid=OID --sdrcache=SDRCONF \ --alert=nagios -- -H short -S PET NAGIOS_COMMAND_FILE)); where "-H short" means if 10.2.3.4 resolves to foo.example.com, Nagios passive check gets foo as host; use "-H fqdn" to pass foo.example.com to Nagios. In addition, "-S PET" sets service description. If Nagios process is on remote host, normally you turns to NSCA which consists of NSCA daemon on the Nagios host and the send_nsca client program. To alert by send_nsca, perl do "/usr/share/doc/freeipmi/contrib/pet/petalert.pl"; perl IpmiPET::main(qw(--mode=embperl --trapoid=OID --sdrcache=SDRCONF \ --alert=nsca -- --prog /usr/bin/send_nsca -H short -S PET \ -- -H NAGIOS_HOST -c SEND_NSCA_CONF)); Notice the unattached -- appears two times in the configuration line separating three steps of arguments processing, namely generic args, alert specific args, and external helper args. 3. SDR CACHE FILE MAPPING Notice the underlying helper program ipmi-pet(8) normally depends on some sdr cache file, either preinitialized or created on demand. If no credential is supplied, ipmi-pet(8) simply assumes localhost and creates sdr cache which is usually ~/.freeipmi/sdr-cache/sdr-cache-.localhost. You may wish to supply preinitialized ones, then use -c sdrmapping.conf to associate them with IPMI nodes. The sdr cache config syntax is: every unindented line starts an sdr cache file, followed by any number of indented lines of IPMI nodes. Every IPMI node line may consist of multiple nodes delimited by whitespaces. Comments follow Shell-style, trailing whitespaces are trimmed, empty lines skipped. For example, |/path/to/sdr-cache-file-1 | 10.2.3.10 # comment | |/path/to/sdr-cache-file-2 | 10.2.3.4 # one node | 10.2.3.5 10.2.3.6 # two nodes | 10.2.3.[7-9] # trhee nodes in range form | ^-- this is the beginning of lines 3.1 SDR CACHE INITIALIZATION The sdr cache file can be initialized by ipmi-sel(8) and the --sdr-cache-file option. # ipmi-sel -h 10.2.3.4 -u root -P --sdr-cache-file=/path/to/sdr-cache-file-X Password: Caching SDR repository information: /path/to/sdr-cache-file-X Caching SDR record 125 of 125 (current record ID 125) ID | Date | Time | Name | Type | Event 1 | Dec-12-2011 | 16:41:51 | SEL | Event Logging Disabled | Log Area Reset/Cleared ... 4. IPMI NODES For PET to be generated, configurations on IPMI nodes have to be done, including LAN access, PEF alerting, trap community, alert policy and destination. You may use ipmi-config from FreeIPMI to do the configuration (use --category to checkout core and pef category of configuration). However, before doing configurations and facing unexpected firmware issues, you'd better verify that the trap receiver end works well. Simply modify the following example traphandle input to meet your setup, then feed it to stdin of petalert.pl like this, assuming you prefer to alert email: # perl petalert.pl -D :all --mode=traphandle --sdrcache SDRCONF \ --alert=email -- -f FROM -s SMTPSERVER ADDRESSES <; $x=eval "@v"; print join(" ", $x->[0], @{$x->[1]})."\n"' [ '/usr/sbin/ipmi-pet', [ '--pet-acknowledge', '-h', '10.2.3.4', '356096', '44', '45', '4C', '4C', ... ] ] Ctrl-D /usr/sbin/ipmi-pet --pet-acknowledge -h 10.2.3.4 356096 44 45 4C 4C ... Then you could simply paste the command in the shell to simulate a manual acknowledge. Looks like acknowledge requests without previous PET is also accepted and responded as usual. snmptrapd(8) itself allows for logging of traps into syslog which requires log permission, see "ACCESS CONTROL" from snmptrapd.conf for more information. NSCA daemon logs to syslog, set "debug=1" in nsca.cfg to get detailed connection handling. Nagios is also able to log to syslog, set "use_syslog=1" in nagios.cfg to help debugging alert. 6. PET TRAFFIC On a no-acknowledge setup, usually there should be only one packet on behalf of the PET from the ipmi node targeting the trap receiver, however, firmware defect was spotted resulting in additional traffic, see BUGS. On an acknowledge setup, there should be three packets per event, one PET, one PET acknowledge request from trap receiver targeting the ipmi node, and one PET acknowledge response in the other direction. More bugs were spotted, see BUGS. Any setup, packets could be captured like this # tcpdump -i any -nn -vvv -s0 -w pet.pcap 'host 10.2.3.4 and udp' Then you can browse the interactions with the help of Wireshark. 7. BUGS It's spotted that factory default rules of iDRAC Express on Dell PowerEdge R610 don't match software generated events. You need to make a catch-all filter rule to report those events. However, hardware gernerated events are not subject to such limitation. To verify this situation, open the case to generate a hardware generated intrusion event. Dell PowerEdge 1950 with BMC has similiar problem. The difference is that 1950 has 31 filter rules, so you don't worry about overwriting an existent one. It's spotted that Dell PowerEdge 1950 with BMC suffers clock drift, remarkably SEL timestamps. bmc-device(8) from FreeIPMI could be used to adjust SEL time and SDR repository time, # bmc-device --set-sdr-repository-time=now # bmc-device --set-sel-time=now Notice that 'now' refers to current timestamp on the host where the commands are issued. bmc-device(8) works out of band, so simply issue the commands on a host where clock is synchronized. It's spotted that iDRAC Express on Dell PowerEdge R610 generates two traps per hardware event. Notice session id from the two traps differ, they are different traps instead of duplication, even though other contents of payload are identical. It's spotted that iDRAC Express on Dell PowerEdge R610 produces malformed PET acknowledge responses. In this case, ipmi-pet exits with timeout error "ipmi_cmd_pet_acknowledge: message timeout". You may use '-W malformedack', which is simply passed through, to instruct the underlying helper ipmi-pet(8) to disable such detection and to immediately return. Timeout hurts snmptrapd because slow handler hinders the main loop. To discover potential time consuming cases, use "-D perf" and observe the log. It's spotted that some DNS servers return "localhost" on private ip addresses rather than NXDOMAIN, in this case, snmptrapd(8) passes "localhost" as resolved hostname to petalert.pl which is confused. You'd better switch to a correctly configured DNS server, or contact the administrator to solve the problem. Kaiwang Chen kaiwang.chen@gmail.com freeipmi-1.6.4/contrib/pet/check_rmcpping0000644002055400205540000000224013527331635020407 0ustar00achuachu00000000000000#!/bin/bash # Checks ipmi nodes by RMCP ping/pong # Mon 12 Dec 2011 kaiwang.chen@gmail.com PACKETS=3 while getopts ":H:w:c:p:" opt do case $opt in H) HOST=$OPTARG ;; w) WARNING=$OPTARG ;; c) CRITICAL=$OPTARG ;; p) PACKETS=$OPTARG ;; \?) echo "RMCPPING UNKNOWN - invalid option -$OPTARG" exit 3 ;; :) echo "RMCPPING UNKNOWN - Option -$OPTARG requires an argument." exit 3 ;; esac done [[ "$HOST"x == x ]] && { echo "RMCPPING UNKNOWN - which ipmi node to ping" exit 3 } PROG=/usr/sbin/rmcpping [[ -x $PROG ]] || { echo "RMCPPING UNKNOWN - check $PROG executable" exit 3 } LOSS=`$PROG -c $PACKETS $HOST | sed -n '/packet loss/{s/^.*, \([0-9]*\)[.][0-9]*% packet loss$/\1/;p}'` [[ "$WARNING"x == "x" || "$CRITICAL"x == "x" ]] && { echo "RMCPPING UNKNOWN - Packet loss $LOSS%" exit 3 } WARNING=`echo $WARNING|sed s/%//` CRITICAL=`echo $CRITICAL|sed s/%//` if [[ $LOSS -ge $CRITICAL ]] then echo "RMCPPING CRITICAL - Packet loss $LOSS%" exit 2 elif [[ $LOSS -ge $WARNING ]] then echo "RMCPPING WARNING - Packet loss $LOSS%" exit 1 else echo "RMCPPING OK - Packet loss $LOSS%" exit 0 fi freeipmi-1.6.4/contrib/pet/ipminodes.cfg0000644002055400205540000000334313527331635020165 0ustar00achuachu00000000000000; commands define command{ command_name check-ipminode-alive command_line $USER1$/check_rmcpping -H $HOSTADDRESS$ -w $ARG1$ -c $ARG2$ -p 3 } define command{ command_name check_dummy command_line $USER1$/check_dummy 3 'It is a volatile passive check' } ; templates define service{ name pet-service use generic-service flap_detection_enabled 0 active_checks_enabled 0 passive_checks_enabled 1 max_check_attempts 1 is_volatile 1 register 0 check_command check_dummy } define host{ name ipmi-node use generic-host check_period 24x7 check_interval 5 retry_interval 1 max_check_attempts 10 check_command check-ipminode-alive!20%!60% notification_period workhours notification_interval 120 notification_options d,u,r contact_groups admins register 0 } ; ipmi nodes and services define host{ use ipmi-node host_name foo ; short alias foo.example.com ; fqdn address 10.2.3.4 } define service{ use pet-service host_name foo service_description PET } freeipmi-1.6.4/contrib/pet/petalert.pl0000644002055400205540000005535513527331635017704 0ustar00achuachu00000000000000#!/usr/bin/perl -w # This is snmptrapd handler script to alert Platform Event Traps (PET). # I wrote it because traptoemail distributed with net-snmp-5.3.2.2 is # incapable of handling multi-line hexstrings and restricted to email alert. # # This script operates in two modes, traphandle or embperl. When in # traphandle mode, it concatenates the quoted hex string into one long line, # then builds structures to resemble embperl mode. Both modes then invokes # helper decoder, ipmi-pet(8) from FreeIPMI, parses the output and alerts # in given way like email, nagios external command, etc. See README for # a simple tutorial. # # This script is tested on Dell PowerEdge 1950 and PowerEdge R610 servers. # Feel free to adjust to meet your need. It's BSD-licensed. # # ChangeLog # # * Fri 16 Dec 2011 kaiwang.chen@gmail.com # - Re-add nsca support. # - Protect against hex string for traphandle missing ending whitespace. # # * Wed 14 Dec 2011 kaiwang.chen@gmail.com # - Add performance logging support with 'perf' token # # * Mon 12 Dec 2011 kaiwang.chen@gmail.com # - Remove nsca support because snmptrapd is meant to run on the Nagios host # - Fix nagios external command file support # - Map FreeIPMI Nominal state to Nagios OK # - Fix Net::SMTP typos and options handling # - Remove USAGE section, please refer to README # # * Sun 11 Dec 2011 kaiwang.chen@gmail.com # - Add -W to pass workaround flags to ipmi-pet # # * Wed 7 Dec 2011 kaiwang.chen@gmail.com # - Add --ack support # - capture exit code of helper # # * Mon 14 Nov 2011 kaiwang.chen@gmail.com # - complete rewritten, supports embperl mode and additional alert methods # # * Sat 12 Nov 2011 kaiwang.chen@gmail.com # - support sdr cache file mapping with -c option # - add debug log # - in case of no PTR, fallback to ip # # * Sun 06 Nov 2011 kaiwang.chen@gmail.com # - Inital version package IpmiPET::Perf; use Time::HiRes qw(tv_interval gettimeofday); sub new { bless { _elapsed => 0, }, __PACKAGE__; } sub start { shift->{_start} = [gettimeofday] } sub stop { my ($obj,$name) = @_; my $t1 = [gettimeofday]; my $t = tv_interval($obj->{_start}, $t1); $obj->{_elapsed} += $t; if ($name) { $obj->{_laps}{$name} = $t; } return $t; } sub reset { my ($obj) = @_; $obj->{_elapsed} = 0; if ($obj->{_start}) { delete $obj->{_start} } if ($obj->{_laps}) { delete $obj->{_laps} } } sub elapsed { shift->{_elapsed} } sub laps { shift->{_laps} } 1; package IpmiPET; use strict; use Getopt::Long; # mapping IPMI nodes to preinitialized sdr caches my %cache_mapping=(); # options my %opts = (); # options and args pass to specific alert mechanisms my %alert_opts = (); # when use builtin features to alert my $alert_prog = ""; # when use external program to alert # logger my $log_filename = "/var/log/petalert.log"; my %logger_token = ('warn' => 1); # always warn # performance ticker my $perf; sub usage { print <<"EOF"; USAGE $0 [OPTIONS] -- [ALERT_SPECIFIC_OPTIONS] ALERT_SPECIFIC_ARGS OPTIONS -m --mode {traphandle|embperl} Specify mode of execution. Required. --ack Acknowledge the trap before alert. -W --workaround Sets workaround flags for ipmi-pet to acknowledge the trap. -o --trapoid OID Sets trapoid in embperl mode, or defaults to "all". -c --sdrcache sdr_cache_config Specify the sdr cache configuration file. -f --log log_file Specify logging file -n --alert {mail|nagios|nsca|noop|MODULE} Specify alert method. Defaults to "noop". ALERT SPECIFIC OPTIONS AND ARGS email --prog mailer Sets mailer. If not specified, falls back to Net::SMTP. mailer_options_and_args --server smtp_server Sets the smtpserver for Net::SMTP to send the mail through. Defaults to "localhost". --from from_address Sets the email for Net:SNMP to be used on the From: line. Defaults to "root". to_addresses Sets where you want Net::SMTP to send the email to. Required. nagios --host {fqdn|short} Sets host in nagios external commands. Defaults to short (first component). --service Sets service in nagios external commands. Defaults to PET. command_file Sets Nagios external command file, a named pipe (FIFO). Required. nsca --prog send_nsca Sets path to send_nsca binary, required. --host {fqdn|short} Sets host for the passive check. Defaults to short (first component). --service Sets service for the passive check. Defaults to PET. -- send_nsca_options_and_args Pass options and args through to send_nsca binary. noop Yes, it is a no-op. MODULE --prog plugin Path to plugin script, which must provides.. plugin_options_and_args Additional arguments passed to plugin as \@ARGV. EOF exit; } sub logger { my ($token, $msg, $variable) = @_; $token ||= ""; if (open my $fh, ">>", $log_filename) { if ($logger_token{":all"} || $logger_token{$token}) { if ($variable) { use Data::Dumper; my $t = $Data::Dumper::Terse; $Data::Dumper::Terse = 1; print $fh "[".localtime()."] $token $msg " . Dumper($variable); $Data::Dumper::Terse = $t; } else { print $fh "[".localtime()."] $token $msg\n"; } } close $fh; } } # extract ip from value like "UDP: [172.23.252.107]:32768" sub extract_ip { my ($ip) = ($_[0] =~ /\[([\d.]+)\]:/); return $ip || "0.0.0.0"; } # decode specified event hexstring into hash like # 'Time' => '13:16:24', # 'Event' => 'General Chassis Intrusion ; Intrusion while system On', # 'System_ID' => '256', # 'State' => 'Critical', # 'GUID' => '44454c4c-5000-1059-8043-b2c04f333358', # 'Date' => 'Oct-15-2011', # 'Manufacturer_ID' => 'Dell Inc.', # 'Name' => 'Sensor #115', # 'Severity' => 'N/A', # 'Event_Direction' => 'Assertion Event', # 'Type' => 'Physical_Security' # sub decode_pet { my ($specific, $event_hexstring, $sdrcache) = @_; my $ipmi_pet = "/usr/sbin/ipmi-pet"; my @o = qw(-v -v --output-event-severity --output-event-state --interpret-oem-data --comma-separated-output); if ($sdrcache) { push @o, "--sdr-cache-file", $sdrcache } push @o, $specific; $event_hexstring =~ tr/0-9a-fA-F/ /cs; # sanity check $event_hexstring =~ s/^\s+//; # in case of (split/\s+/)[0] being "" push @o, split /\s+/, $event_hexstring; my @x = (); logger("decode", "command line ", [$ipmi_pet, \@o]); if (open my $fh, "-|", $ipmi_pet, @o) { @x = <$fh>; close $fh; if ($? >> 8) { logger("warn", "decode failure with CHILD_ERROR: $?"); return; } } else { logger("warn", "decoder failure: $!"); return; } chomp(@x); logger("decode", "output ", \@x); my @headers = split /,/, $x[0]; my @values = split /,/, $x[1]; # TODO support doubly quoted value if (@headers != @values) { logger("warn", "Spot malicious comma separated value", \@x); } my %event = (); for my $i (0..$#headers) { my $h = $headers[$i]; $h =~ s/ /_/g; $event{$h} = $values[$i]; } logger("decode", "event ", \%event); return \%event; } sub ack_pet { my ($specific, $event_hexstring, $host, $workaround) = @_; my $ipmi_pet = "/usr/sbin/ipmi-pet"; my @o = qw(--pet-acknowledge); if ($workaround) { push @o, "-W", $workaround; } push @o, "-h", $host; push @o, $specific; $event_hexstring =~ tr/0-9a-fA-F/ /cs; # sanity check $event_hexstring =~ s/^\s+//; # in case of (split/\s+/)[0] being "" push @o, split /\s+/, $event_hexstring; my @x = (); logger("ack", "command line ", [$ipmi_pet, \@o]); if (open my $fh, "-|", $ipmi_pet, @o) { @x = <$fh>; close $fh; if ($? >> 8) { logger("warn", "ackhelper failure with CHILD_ERROR: $?"); } } else { logger("warn", "ackhelper failure: $!"); } } # ipmi-pet localtime to calendar time sub pettime { my ($event) = @_; require POSIX; my ($hour,$min,$sec) = split /:/, $event->{Time}; my ($mon,$mday,$year) = split /-/, $event->{Date}; $year -= 1900; my %m = ( Jan => 0, Feb => 1, Mar => 2, Apr => 3, May => 4, Jun => 5, Jul => 6, Aug => 7, Sep => 8, Oct => 9, Nov => 10, Dec => 11, ); if (exists $m{$mon}) { $mon = $m{$mon} } else { logger("warn", "pettime month $mon will map to 0, please check ipmi-pet"); $mon = 0; } return POSIX::mktime($sec, $min, $hour, $mday, $mon, $year); } # convert event to nagios plugin output # See http://nagios.sourceforge.net/docs/3_0/pluginapi.html sub nagios_check { my ($event) = @_; my ($code, $state); $state = uc($event->{State}); if ($state eq "WARNING") {$code = 1} elsif ($state eq "CRITICAL") {$code = 2} elsif ($state eq "OK") {$code = 0} elsif ($state eq "NOMINAL") {$code = 0; $state = "OK"} else {$code = 3; $state = "UNKNOWN"} my $plugin_output = join(" ", $state, "-", map { defined $_ ? $_ : "" } @{%{$event}}{qw(Name Type Event_Direction Event)}); $plugin_output =~ tr/\n\t;|/@:/; return ($code, $plugin_output); } sub nagios_host { my ($pdu_info, $opt) = @_; my $h = $pdu_info->{hostname}; if ($opt eq 'short') { ($h) = ($pdu_info->{hostname} =~ m/([^.]+)/); } return $h; } # assemble SMTP DATA, http://cr.yp.to/smtp/mail.html # TODO return encoded data sub mail_data { my ($from, $to, $pdu_info, $uptime, $event) = @_; local $" = ", "; # " balance my $data = <<"DATA"; To: @{$to} From: $from Subject: PET from $pdu_info->{hostname}: $event->{State} - $event->{Event} Host: $pdu_info->{hostname} ($pdu_info->{receivedfrom}) uptime $uptime DATA for my $k (qw(Date Time Name Type Event Event_Direction State Severity GUID Manufacturer_ID System_ID)) { $data .= "$k: $event->{$k}\n"; } return $data; } # embperl NetSNMP::TrapReceiver trap receiver sub my_receiver { my ($pdu_info, $varbindings) = @_; #use Data::Dumper;print Dumper($pdu_info); print Dumper($varbindings); logger("embperl", "original input is ", \@_); # inject hostname unless (exists $pdu_info->{hostname}) { use Socket; my $ip = extract_ip($pdu_info->{receivedfrom}); $perf->start; $pdu_info->{hostname} = gethostbyaddr(inet_aton($ip), AF_INET) || $ip; $perf->stop("resolv"); } # do cleanup before processing; values are untouched if -OQ, see snmpcmd(1) for (@$varbindings) { $_->[1] =~ s/^OID: //; $_->[1] =~ s/^IpAddress: //; $_->[1] =~ s/^STRING: //; $_->[1] =~ s/^Hex-STRING: //; if ($_->[1] =~ s/^Timeticks: //) { $_->[1] =~ s/^\(\d+\) //; $_->[1] =~ s/ days, /:/; } } logger("embperl", "input after cleanup is ", \@_); process($pdu_info, $varbindings); my $laps = $perf->laps; logger("perf", join(", ", map { $_ . "=" . $laps->{$_} } keys %{$laps})); $perf->reset; } # you got it.. sub process { my ($pdu_info, $varbindings) = @_; my ($event_oid, $specific, $uptime, $event); # locate the PET event hex string, and extract specific trap number for my $v (@{$varbindings}) { if ($v->[0] =~ /^\Q.1.3.6.1.6.3.1.1.4.3.0\E$/) { $event_oid = $v->[1]; } if ($v->[0]=~ /^\Q.1.3.6.1.6.3.1.1.4.1.0\E$/) { ($specific)=($v->[1]=~/(\d+)$/); } if ($v->[0] =~ /^\Q.1.3.6.1.2.1.1.3.0\E$/) { $uptime = $v->[1]; } } $event_oid .= ".1"; $uptime ||= "00:00:00:00.00"; if (my ($d,$H,$M,$S,$x) = ($uptime =~ /(\d+):(\d+):(\d+):(\d+)\.(\d+)/)) { if ($d > 0) { $uptime = "${d}d${H}h" } elsif ($H > 0) { $uptime = "${H}h${M}m" } elsif ($M > 0) { $uptime = "${M}m${S}s" } else { $uptime = "${S}.${x}s" } } # convert event string to human readable form for my $v (@{$varbindings}) { if ($v->[0] =~ /^\Q$event_oid\E$/) { my $ip = extract_ip($pdu_info->{receivedfrom}); if ($opts{ack}) { $perf->start; ack_pet($specific, $v->[1], $ip, $opts{workaround}); $perf->stop("ack"); } my $sdrcache = resolve_sdrcache($ip); # decode octet hex string $event = decode_pet($specific, $v->[1], $sdrcache); } } # invalid events cease here return unless $event; alert($pdu_info, $uptime, $event); return; } # build NetSNMP::TrapReceiver style structures from standard input # See NOTIFICATION PROCESSING snmptrapd.conf(5) sub get_from_stdin { my ($stdin) = @_; my $hostname = shift @{$stdin}; my $ipaddress = shift @{$stdin}; chomp($hostname); chomp($ipaddress); # in case of no PTR records available for the IPMI node if($hostname eq "" && (my $ip = extract_ip($ipaddress))) { $hostname = $ip; } # some defaults, blindly.. to resemble those by NetSNMP::TrapReceiver my %pdu_info = ( notificationtype => "TRAP", hostname => $hostname, receivedfrom => $ipaddress, version => 0, errorstatus => 0, messageid => 0, transactionid => 1, errorindex => 0, requestid => 0, ); my @varbindings= (); my ($oid,$value); my $more = 0; my $line = ""; for (@{$stdin}) { if ($more == 0 && $line) { $line =~ s/\n\Z//s; ($oid, $value) = ($line =~ /([^\s]+)\s+(.*)/s); $line = ""; push @varbindings, [$oid, $value, "="]; } # recognize doubly quoted context my $count = 0; my $x = -1; $x=index($_, q{"}); while ($x >= 0) { unless ($x > 0 && substr($_, $x-1, 1) eq "\\") { $count++; } $x += 1; $x=index($_, q{"}, $x); } if ($count % 2 == 1) { $more = $more == 1 ? 0 : 1; } $line .= "$_\n"; } if ($line) { $line =~ s/\n\Z//s; ($oid, $value) = ($line =~ /([^\s]+)\s+(.*)/s); $line = ""; push @varbindings, [$oid, $value]; } # Notice the assembled varbindings slightly differs from that in embperl. # For instance, hex string is surrounded by doubly quote, and never # prefixed by "Hex-STRING: ". return (\%pdu_info, \@varbindings); } # traphandle handler sub handle_trap { chomp(my @stdin = ); logger("traphandle", "input text is ", \@stdin); my ($pdu_info, $varbindings) = get_from_stdin(\@stdin); logger("traphandle", "got pdu_info and varbindings ", [$pdu_info,$varbindings]); process($pdu_info, $varbindings); my $laps = $perf->laps; logger("perf", join(", ", map { sprintf '%s=%f', $_,$laps->{$_} } keys %{$laps})); $perf->reset; } # alert dispatcher sub alert { my ($pdu_info, $uptime, $event) = @_; if ($opts{'alert'} eq 'email') { my $data = mail_data($alert_opts{'from'}, \@ARGV, $pdu_info, $uptime, $event); logger("alert", "mail data is", [\$data]); if ($alert_prog) { logger("alert", "mailer invoked with ", [$alert_prog,\@ARGV]); $perf->start; if (open MAILER, "|-", $alert_prog, @ARGV) { print MAILER $data; close MAILER; } else { logger("warn", "Unable to alert through mailer[$alert_prog @ARGV]: $!"); } $perf->stop("mailer"); } else { logger("alert", "mail by Net::SMTP ", [$alert_opts{'server'},$alert_opts{'from'}, \@ARGV]); $perf->start; eval { my $message = Net::SMTP->new($alert_opts{'server'}) || die "ERROR: can't talk to server $alert_opts{'server'}\n"; $message->mail($alert_opts{'from'}); $message->to(@ARGV) || die "ERROR: failed to send to the recepients ",join(",",@ARGV),": $!"; $message->data(); $message->datasend($data); $message->dataend(); $message->quit; }; $perf->stop("netsmtp"); if ($@) { logger("warn", "alert mail failure ", $@); } } } elsif ($opts{'alert'} eq 'nagios') { my $command_file = $ARGV[0]; logger("alert", "nagios external command file is $command_file"); my $t = pettime($event); my ($code,$plugin_output) = nagios_check($event); my $nagios_host = nagios_host($pdu_info, $alert_opts{host}); my $nagios_service = $alert_opts{service}; # http://nagios.sourceforge.net/docs/3_0/extcommands.html my $cmd = "[$t] PROCESS_SERVICE_CHECK_RESULT;$nagios_host;$nagios_service;$code;$plugin_output"; logger("alert", "nagios command is", $cmd); $perf->start; if (open NAGIOS, ">>", $command_file) { print NAGIOS "$cmd\n"; close NAGIOS; } else { logger("warn", "nagios failure with $command_file: $!"); } $perf->stop("nagios"); } elsif ($opts{'alert'} eq 'nsca') { logger("alert", "send_nsca invoked as ", [$alert_prog, \@ARGV]); my ($code,$plugin_output) = nagios_check($event); my $nagios_host = nagios_host($pdu_info, $alert_opts{host}); my $nagios_service = $alert_opts{service}; # http://nagios.sourceforge.net/download/contrib/documentation/misc/NSCA_Setup.pdf my $cmd= "$nagios_host\t$nagios_service\t$code\t$plugin_output"; logger("alert", "nsca command is", $cmd); $perf->start; if (open NSCA, "|-", $alert_prog, @ARGV) { print NSCA "$cmd\n"; close NSCA; if ($? >> 8) { logger("warn", "nsca failure with CHILD_ERROR: $?"); } } else { logger("warn", "nsca failure: $!"); } $perf->stop("nsca"); } elsif ($opts{'alert'} eq 'noop') { logger('alert', 'noop alert selected'); } else { logger("alert", "alert module"); # TODO module die "alert module is not implemented!"; } } # load sdr cache config into global mapping hash sub load_sdrcache_config { my ($conf) = @_; my $cache_file = ""; my $nl = 0; for (@{$conf}) { $nl++; chomp; s/#.*$//; # trim comment s/\s+$//; # trim trailing whitespaces next if /^$/; if (/^\S/) { if (-e $_) { $cache_file = $_; } else { return "ERROR: no such sdr cache file[$_] at line #$nl"; } } if (/^\s/) { s/^\s+//; # trim leading whitespaces if ($cache_file) { for (split /\s+/) { $cache_mapping{$_} = $cache_file; } } else { return "ERROR: missing sdr cache file for host[$_] at line #$nl"; } } } return; } # given an ipv4 address, resolve to related sdr cache sub resolve_sdrcache { my ($ipmi_node) = @_; my $sdrcache = ""; if (exists $cache_mapping{$ipmi_node}) { $sdrcache = $cache_mapping{$ipmi_node}; logger("sdrcache", "$ipmi_node resolved to $sdrcache"); } else { my $re = qr/^(.*)\[([-\d,]+)\](.*)$/; # to match against eg. 10.2.3.[4-7] for my $k (keys %cache_mapping) { if (my ($prefix,$range,$suffix) = ($k =~ m/$re/)) { if (my ($item) = ($ipmi_node =~ /^\Q$prefix\E(.+)\Q$suffix\E$/)) { for (split /,+/, $range) { my ($f,$t); if ( ((($f,$t) = m/^(\d+)-(\d+)$/) && $f <= $item && $item <= $t) || $item == $_ ) { # got it $sdrcache = $cache_mapping{$k}; logger("sdrcache", "$ipmi_node resolved to ", [$k => $sdrcache]); } } } } } } $sdrcache || logger("sdrcache", "$ipmi_node will use default cache"); return $sdrcache; } # process and verify args sub process_args { # parse global ARGV for this package GetOptions(\%opts, 'help!', 'quiet!', 'mode|m=s', 'ack!', 'workaround|W=s', 'trapoid|o=s', 'sdrcache|c=s', 'log|f=s', 'Debug|D=s', 'alert|n=s'); if ($opts{'help'}) { usage(); } # log file if ($opts{'log'}) { if (-w $opts{'log'}) { $log_filename = $opts{'log'}; } else { die "log file $opts{'log'} is not writable"; } } unless ($opts{'quiet'}) { print STDERR "petalert.pl is logging to $log_filename, use -q to suppress this tip\n"; } # comma-separted debug tokens if ($opts{'Debug'}) { $logger_token{$_} = 1 for split /,+/, $opts{'Debug'}; } # logging now ready logger("argv", "parsed options is ", \%opts); if ($opts{'sdrcache'}) { my $conf = $opts{'sdrcache'}; logger("sdrcache", "config is [$conf]"); open CONF, "<", $conf || logger("warn", "assumes default cache because failed to config file[$conf]: $!"); chomp(my @lines = ); close CONF; load_sdrcache_config(\@lines); logger("sdrcache", "cache_mapping is ", \%cache_mapping); if ($opts{'syntax-only'}) { exit; } } if ($opts{'mode'} eq 'embperl') { unless (exists $opts{trapoid}) { $opts{trapoid} = "all"; logger("argv", "no trapoid specified, defaults to all"); } require NetSNMP::TrapReceiver; } elsif ($opts{'mode'} eq 'traphandle') { } else { print STDERR "Unknown operation mode: $opts{mode}\n"; usage(); } # alert method defaults to no-op unless (exists $opts{'alert'}) { $opts{'alert'} = 'noop'; logger("argv", "no alert method specified, defaults to noop"); } # alert methods if ($opts{'alert'} eq 'email') { # use external mail program if ($ARGV[0] && $ARGV[0] eq "--prog") { shift @ARGV; $alert_prog = shift @ARGV; unless (-x $alert_prog) { die "mailer[$alert_prog] is not executable\n"; } } # or use perl module else { GetOptions(\%alert_opts, "server=s", "from=s"); require Net::SMTP; } } elsif ($opts{'alert'} eq 'nagios' || $opts{'alert'} eq 'nsca') { GetOptions(\%alert_opts, "prog=s", "host|H=s", "service|S=s"); $alert_opts{host} ||= "short"; $alert_opts{service} ||= "PET"; if ($alert_opts{host} ne "fqdn" && $alert_opts{host} ne "short") { # TODO die "Unknown host mapping $alert_opts{host}\n"; } if ($opts{'alert'} eq 'nagios' && !($ARGV[0] && -w $ARGV[0])) { die "nagios external command file[$ARGV[0]] is not writable\n"; } if ($opts{'alert'} eq 'nsca' && ! $alert_opts{prog}) { die "send_nsca binary is not set\n"; } $alert_prog = $alert_opts{prog} || ""; } elsif ($opts{'alert'} eq 'noop') { } else { my $module = $opts{'alert'}; if (-r $module) { require "$module"; # TODO die ""; } else { die "Unknown alert module to load: $module\n"; } # invokes handler } # @ARGV now holds alert specific arguments } sub main { @ARGV = @_; # set global ARGV for this package process_args(); $perf = IpmiPET::Perf->new; if ($opts{'mode'} eq 'traphandle') { logger("main", "running as traphandle"); handle_trap(); } elsif ($opts{'mode'} eq 'embperl') { logger("main", "running as embperl"); NetSNMP::TrapReceiver::register($opts{trapoid}, \&my_receiver) || warn "failed to register our perl trap handler\n"; } else { die "Should never reach here!\n"; } return 0; } # run the program if ( !caller ) { exit main(@ARGV); } 1; freeipmi-1.6.4/contrib/Makefile.in0000644002055400205540000005117013527342444016773 0ustar00achuachu00000000000000# Makefile.in generated by automake 1.13.4 from Makefile.am. # @configure_input@ # Copyright (C) 1994-2013 Free Software Foundation, Inc. # This Makefile.in is free software; the Free Software Foundation # gives unlimited permission to copy and/or distribute it, # with or without modifications, as long as this notice is preserved. # This program is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY, to the extent permitted by law; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A # PARTICULAR PURPOSE. @SET_MAKE@ VPATH = @srcdir@ am__is_gnu_make = test -n '$(MAKEFILE_LIST)' && test -n '$(MAKELEVEL)' am__make_running_with_option = \ case $${target_option-} in \ ?) ;; \ *) echo "am__make_running_with_option: internal error: invalid" \ "target option '$${target_option-}' specified" >&2; \ exit 1;; \ esac; \ has_opt=no; \ sane_makeflags=$$MAKEFLAGS; \ if $(am__is_gnu_make); then \ sane_makeflags=$$MFLAGS; \ else \ case $$MAKEFLAGS in \ *\\[\ \ ]*) \ bs=\\; \ sane_makeflags=`printf '%s\n' "$$MAKEFLAGS" \ | sed "s/$$bs$$bs[$$bs $$bs ]*//g"`;; \ esac; \ fi; \ skip_next=no; \ strip_trailopt () \ { \ flg=`printf '%s\n' "$$flg" | sed "s/$$1.*$$//"`; \ }; \ for flg in $$sane_makeflags; do \ test $$skip_next = yes && { skip_next=no; continue; }; \ case $$flg in \ *=*|--*) continue;; \ -*I) strip_trailopt 'I'; skip_next=yes;; \ -*I?*) strip_trailopt 'I';; \ -*O) strip_trailopt 'O'; skip_next=yes;; \ -*O?*) strip_trailopt 'O';; \ -*l) strip_trailopt 'l'; skip_next=yes;; \ -*l?*) strip_trailopt 'l';; \ -[dEDm]) skip_next=yes;; \ -[JT]) skip_next=yes;; \ esac; \ case $$flg in \ *$$target_option*) has_opt=yes; break;; \ esac; \ done; \ test $$has_opt = yes am__make_dryrun = (target_option=n; $(am__make_running_with_option)) am__make_keepgoing = (target_option=k; $(am__make_running_with_option)) pkgdatadir = $(datadir)/@PACKAGE@ pkgincludedir = $(includedir)/@PACKAGE@ pkglibdir = $(libdir)/@PACKAGE@ pkglibexecdir = $(libexecdir)/@PACKAGE@ am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd install_sh_DATA = $(install_sh) -c -m 644 install_sh_PROGRAM = $(install_sh) -c install_sh_SCRIPT = $(install_sh) -c INSTALL_HEADER = $(INSTALL_DATA) transform = $(program_transform_name) NORMAL_INSTALL = : PRE_INSTALL = : POST_INSTALL = : NORMAL_UNINSTALL = : PRE_UNINSTALL = : POST_UNINSTALL = : build_triplet = @build@ host_triplet = @host@ subdir = contrib DIST_COMMON = $(srcdir)/Makefile.in $(srcdir)/Makefile.am ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/config/ac_dont_check_for_root.m4 \ $(top_srcdir)/config/ac_freeipmi_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sel_config_file.m4 \ $(top_srcdir)/config/ac_freeipmi_interpret_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sdr_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmi_monitoring_sensor_config_file.m4 \ $(top_srcdir)/config/ac_ipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetect_config_file.m4 \ $(top_srcdir)/config/ac_ipmidetectd_config_file.m4 \ $(top_srcdir)/config/ac_ipmipower_config_file.m4 \ $(top_srcdir)/config/ac_ipmiseld_cache_dir.m4 \ $(top_srcdir)/config/ac_ipmiseld_config_file.m4 \ $(top_srcdir)/config/ac_libipmiconsole_config_file.m4 \ $(top_srcdir)/config/ac_lsh_gcc_attributes.m4 \ $(top_srcdir)/config/acx_pthread.m4 \ $(top_srcdir)/config/systemd.m4 $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config/config.h CONFIG_CLEAN_FILES = CONFIG_CLEAN_VPATH_FILES = AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) am__v_P_0 = false am__v_P_1 = : AM_V_GEN = $(am__v_GEN_@AM_V@) am__v_GEN_ = $(am__v_GEN_@AM_DEFAULT_V@) am__v_GEN_0 = @echo " GEN " $@; am__v_GEN_1 = AM_V_at = $(am__v_at_@AM_V@) am__v_at_ = $(am__v_at_@AM_DEFAULT_V@) am__v_at_0 = @ am__v_at_1 = SOURCES = DIST_SOURCES = am__can_run_installinfo = \ case $$AM_UPDATE_INFO_DIR in \ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`; am__vpath_adj = case $$p in \ $(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \ *) f=$$p;; \ esac; am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`; am__install_max = 40 am__nobase_strip_setup = \ srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'` am__nobase_strip = \ for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||" am__nobase_list = $(am__nobase_strip_setup); \ for p in $$list; do echo "$$p $$p"; done | \ sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \ $(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \ if (++n[$$2] == $(am__install_max)) \ { print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \ END { for (dir in files) print dir, files[dir] }' am__base_list = \ sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \ sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g' am__uninstall_files_from_dir = { \ test -z "$$files" \ || { test ! -d "$$dir" && test ! -f "$$dir" && test ! -r "$$dir"; } \ || { echo " ( cd '$$dir' && rm -f" $$files ")"; \ $(am__cd) "$$dir" && rm -f $$files; }; \ } am__installdirs = "$(DESTDIR)$(ganglia_docdir)" \ "$(DESTDIR)$(libipmimonitoring_docdir)" \ "$(DESTDIR)$(nagios_docdir)" "$(DESTDIR)$(pet_docdir)" DATA = $(ganglia_doc_DATA) $(libipmimonitoring_doc_DATA) \ $(nagios_doc_DATA) $(pet_doc_DATA) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST) ACLOCAL = @ACLOCAL@ ALLOCA = @ALLOCA@ AMTAR = @AMTAR@ AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@ AR = @AR@ AUTOCONF = @AUTOCONF@ AUTOHEADER = @AUTOHEADER@ AUTOMAKE = @AUTOMAKE@ AWK = @AWK@ CC = @CC@ CCDEPMODE = @CCDEPMODE@ CFLAGS = @CFLAGS@ CPP = @CPP@ CPPFLAGS = @CPPFLAGS@ CPP_FOR_BUILD = @CPP_FOR_BUILD@ CYGPATH_W = @CYGPATH_W@ DEFS = @DEFS@ DEPDIR = @DEPDIR@ DLLTOOL = @DLLTOOL@ DSYMUTIL = @DSYMUTIL@ DUMPBIN = @DUMPBIN@ ECHO_C = @ECHO_C@ ECHO_N = @ECHO_N@ ECHO_T = @ECHO_T@ EGREP = @EGREP@ EXEEXT = @EXEEXT@ FGREP = @FGREP@ FREEIPMI_CONFIG_FILE_DEFAULT = @FREEIPMI_CONFIG_FILE_DEFAULT@ FREEIPMI_PACKAGE_VERSION_MAJOR = @FREEIPMI_PACKAGE_VERSION_MAJOR@ FREEIPMI_PACKAGE_VERSION_MINOR = @FREEIPMI_PACKAGE_VERSION_MINOR@ FREEIPMI_PACKAGE_VERSION_PATCH = @FREEIPMI_PACKAGE_VERSION_PATCH@ FREEIPMI_SYSCONFDIR = @FREEIPMI_SYSCONFDIR@ GCRYPT_LIBS = @GCRYPT_LIBS@ GREP = @GREP@ INSTALL = @INSTALL@ INSTALL_DAEMON_SCRIPTS = @INSTALL_DAEMON_SCRIPTS@ INSTALL_DATA = @INSTALL_DATA@ INSTALL_IPMISDRCACHEDIR = @INSTALL_IPMISDRCACHEDIR@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ INSTALL_SCRIPT = @INSTALL_SCRIPT@ INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@ INTERPRET_SEL_CONFIG_FILE_DEFAULT = @INTERPRET_SEL_CONFIG_FILE_DEFAULT@ INTERPRET_SENSOR_CONFIG_FILE_DEFAULT = @INTERPRET_SENSOR_CONFIG_FILE_DEFAULT@ IPMICONSOLE_CONFIG_FILE_LEGACY = @IPMICONSOLE_CONFIG_FILE_LEGACY@ IPMIDETECTD_CONFIG_FILE_DEFAULT = @IPMIDETECTD_CONFIG_FILE_DEFAULT@ IPMIDETECT_CONFIG_FILE_DEFAULT = @IPMIDETECT_CONFIG_FILE_DEFAULT@ IPMIPOWER_CONFIG_FILE_LEGACY = @IPMIPOWER_CONFIG_FILE_LEGACY@ IPMISELD_CACHE_DIRECTORY = @IPMISELD_CACHE_DIRECTORY@ IPMISELD_CONFIG_FILE_DEFAULT = @IPMISELD_CONFIG_FILE_DEFAULT@ IPMI_MONITORING_SDR_CACHE_DIR = @IPMI_MONITORING_SDR_CACHE_DIR@ IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY = @IPMI_MONITORING_SENSOR_CONFIG_FILE_LEGACY@ ISODATE = @ISODATE@ LD = @LD@ LDFLAGS = @LDFLAGS@ LIBFREEIPMI_VERSION = @LIBFREEIPMI_VERSION@ LIBFREEIPMI_VERSION_INFO = @LIBFREEIPMI_VERSION_INFO@ LIBFREEIPMI_VERSION_MAJOR = @LIBFREEIPMI_VERSION_MAJOR@ LIBFREEIPMI_VERSION_MINOR = @LIBFREEIPMI_VERSION_MINOR@ LIBFREEIPMI_VERSION_PATCH = @LIBFREEIPMI_VERSION_PATCH@ LIBIPMICONSOLE_CONFIG_FILE_DEFAULT = @LIBIPMICONSOLE_CONFIG_FILE_DEFAULT@ LIBIPMICONSOLE_VERSION_INFO = @LIBIPMICONSOLE_VERSION_INFO@ LIBIPMICONSOLE_VERSION_MAJOR = @LIBIPMICONSOLE_VERSION_MAJOR@ LIBIPMICONSOLE_VERSION_MINOR = @LIBIPMICONSOLE_VERSION_MINOR@ LIBIPMICONSOLE_VERSION_PATCH = @LIBIPMICONSOLE_VERSION_PATCH@ LIBIPMIDETECT_VERSION_INFO = @LIBIPMIDETECT_VERSION_INFO@ LIBIPMIDETECT_VERSION_MAJOR = @LIBIPMIDETECT_VERSION_MAJOR@ LIBIPMIDETECT_VERSION_MINOR = @LIBIPMIDETECT_VERSION_MINOR@ LIBIPMIDETECT_VERSION_PATCH = @LIBIPMIDETECT_VERSION_PATCH@ LIBIPMIMONITORING_VERSION_INFO = @LIBIPMIMONITORING_VERSION_INFO@ LIBIPMIMONITORING_VERSION_MAJOR = @LIBIPMIMONITORING_VERSION_MAJOR@ LIBIPMIMONITORING_VERSION_MINOR = @LIBIPMIMONITORING_VERSION_MINOR@ LIBIPMIMONITORING_VERSION_PATCH = @LIBIPMIMONITORING_VERSION_PATCH@ LIBOBJS = @LIBOBJS@ LIBS = @LIBS@ LIBTOOL = @LIBTOOL@ LIPO = @LIPO@ LN_S = @LN_S@ LTLIBOBJS = @LTLIBOBJS@ MAKEINFO = @MAKEINFO@ MANIFEST_TOOL = @MANIFEST_TOOL@ MKDIR_P = @MKDIR_P@ NM = @NM@ NMEDIT = @NMEDIT@ OBJDUMP = @OBJDUMP@ OBJEXT = @OBJEXT@ OTOOL = @OTOOL@ OTOOL64 = @OTOOL64@ PACKAGE = @PACKAGE@ PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@ PACKAGE_NAME = @PACKAGE_NAME@ PACKAGE_STRING = @PACKAGE_STRING@ PACKAGE_TARNAME = @PACKAGE_TARNAME@ PACKAGE_URL = @PACKAGE_URL@ PACKAGE_VERSION = @PACKAGE_VERSION@ PATH_SEPARATOR = @PATH_SEPARATOR@ PKG_CONFIG = @PKG_CONFIG@ PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@ PKG_CONFIG_PATH = @PKG_CONFIG_PATH@ PTHREAD_CC = @PTHREAD_CC@ PTHREAD_CFLAGS = @PTHREAD_CFLAGS@ PTHREAD_LIBS = @PTHREAD_LIBS@ RANLIB = @RANLIB@ SED = @SED@ SET_MAKE = @SET_MAKE@ SHELL = @SHELL@ STRIP = @STRIP@ UNINSTALL_DAEMON_SCRIPTS = @UNINSTALL_DAEMON_SCRIPTS@ VERSION = @VERSION@ WITH_DEBUG = @WITH_DEBUG@ abs_builddir = @abs_builddir@ abs_srcdir = @abs_srcdir@ abs_top_builddir = @abs_top_builddir@ abs_top_srcdir = @abs_top_srcdir@ ac_ct_AR = @ac_ct_AR@ ac_ct_CC = @ac_ct_CC@ ac_ct_DUMPBIN = @ac_ct_DUMPBIN@ am__include = @am__include@ am__leading_dot = @am__leading_dot@ am__quote = @am__quote@ am__tar = @am__tar@ am__untar = @am__untar@ bindir = @bindir@ build = @build@ build_alias = @build_alias@ build_cpu = @build_cpu@ build_os = @build_os@ build_vendor = @build_vendor@ builddir = @builddir@ datadir = @datadir@ datarootdir = @datarootdir@ docdir = @docdir@ dvidir = @dvidir@ exec_prefix = @exec_prefix@ host = @host@ host_alias = @host_alias@ host_cpu = @host_cpu@ host_os = @host_os@ host_vendor = @host_vendor@ htmldir = @htmldir@ includedir = @includedir@ infodir = @infodir@ install_sh = @install_sh@ libdir = @libdir@ libexecdir = @libexecdir@ localedir = @localedir@ localstatedir = @localstatedir@ mandir = @mandir@ mkdir_p = @mkdir_p@ oldincludedir = @oldincludedir@ pdfdir = @pdfdir@ pkgconfigdir = @pkgconfigdir@ prefix = @prefix@ program_transform_name = @program_transform_name@ psdir = @psdir@ sbindir = @sbindir@ sharedstatedir = @sharedstatedir@ srcdir = @srcdir@ sysconfdir = @sysconfdir@ systemdsystemunitdir = @systemdsystemunitdir@ target_alias = @target_alias@ top_build_prefix = @top_build_prefix@ top_builddir = @top_builddir@ top_srcdir = @top_srcdir@ ganglia_docdir = $(docdir)/contrib/ganglia ganglia_doc_DATA = \ ganglia/README \ ganglia/ganglia_ipmi_sensors.pl libipmimonitoring_docdir = $(docdir)/contrib/libipmimonitoring libipmimonitoring_doc_DATA = \ libipmimonitoring/ipmimonitoring-sel.c \ libipmimonitoring/ipmimonitoring-sensors.c nagios_docdir = $(docdir)/contrib/nagios nagios_doc_DATA = \ nagios/README \ nagios/nagios_ipmi_sensors.pl pet_docdir = $(docdir)/contrib/pet pet_doc_DATA = \ pet/README \ pet/check_rmcpping \ pet/ipminodes.cfg \ pet/petalert.pl EXTRA_DIST = \ $(ganglia_doc_DATA) \ $(libipmimonitoring_doc_DATA) \ $(nagios_doc_DATA) \ $(pet_doc_DATA) all: all-am .SUFFIXES: $(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps) @for dep in $?; do \ case '$(am__configure_deps)' in \ *$$dep*) \ ( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \ && { if test -f $@; then exit 0; else break; fi; }; \ exit 1;; \ esac; \ done; \ echo ' cd $(top_srcdir) && $(AUTOMAKE) --gnu contrib/Makefile'; \ $(am__cd) $(top_srcdir) && \ $(AUTOMAKE) --gnu contrib/Makefile .PRECIOUS: Makefile Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status @case '$?' in \ *config.status*) \ cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \ *) \ echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \ cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \ esac; $(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(top_srcdir)/configure: $(am__configure_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(ACLOCAL_M4): $(am__aclocal_m4_deps) cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh $(am__aclocal_m4_deps): mostlyclean-libtool: -rm -f *.lo clean-libtool: -rm -rf .libs _libs install-ganglia_docDATA: $(ganglia_doc_DATA) @$(NORMAL_INSTALL) @list='$(ganglia_doc_DATA)'; test -n "$(ganglia_docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(ganglia_docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(ganglia_docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(ganglia_docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(ganglia_docdir)" || exit $$?; \ done uninstall-ganglia_docDATA: @$(NORMAL_UNINSTALL) @list='$(ganglia_doc_DATA)'; test -n "$(ganglia_docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(ganglia_docdir)'; $(am__uninstall_files_from_dir) install-libipmimonitoring_docDATA: $(libipmimonitoring_doc_DATA) @$(NORMAL_INSTALL) @list='$(libipmimonitoring_doc_DATA)'; test -n "$(libipmimonitoring_docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(libipmimonitoring_docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(libipmimonitoring_docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(libipmimonitoring_docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(libipmimonitoring_docdir)" || exit $$?; \ done uninstall-libipmimonitoring_docDATA: @$(NORMAL_UNINSTALL) @list='$(libipmimonitoring_doc_DATA)'; test -n "$(libipmimonitoring_docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(libipmimonitoring_docdir)'; $(am__uninstall_files_from_dir) install-nagios_docDATA: $(nagios_doc_DATA) @$(NORMAL_INSTALL) @list='$(nagios_doc_DATA)'; test -n "$(nagios_docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(nagios_docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(nagios_docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(nagios_docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(nagios_docdir)" || exit $$?; \ done uninstall-nagios_docDATA: @$(NORMAL_UNINSTALL) @list='$(nagios_doc_DATA)'; test -n "$(nagios_docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(nagios_docdir)'; $(am__uninstall_files_from_dir) install-pet_docDATA: $(pet_doc_DATA) @$(NORMAL_INSTALL) @list='$(pet_doc_DATA)'; test -n "$(pet_docdir)" || list=; \ if test -n "$$list"; then \ echo " $(MKDIR_P) '$(DESTDIR)$(pet_docdir)'"; \ $(MKDIR_P) "$(DESTDIR)$(pet_docdir)" || exit 1; \ fi; \ for p in $$list; do \ if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \ echo "$$d$$p"; \ done | $(am__base_list) | \ while read files; do \ echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(pet_docdir)'"; \ $(INSTALL_DATA) $$files "$(DESTDIR)$(pet_docdir)" || exit $$?; \ done uninstall-pet_docDATA: @$(NORMAL_UNINSTALL) @list='$(pet_doc_DATA)'; test -n "$(pet_docdir)" || list=; \ files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \ dir='$(DESTDIR)$(pet_docdir)'; $(am__uninstall_files_from_dir) tags TAGS: ctags CTAGS: cscope cscopelist: distdir: $(DISTFILES) @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ list='$(DISTFILES)'; \ dist_files=`for file in $$list; do echo $$file; done | \ sed -e "s|^$$srcdirstrip/||;t" \ -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \ case $$dist_files in \ */*) $(MKDIR_P) `echo "$$dist_files" | \ sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \ sort -u` ;; \ esac; \ for file in $$dist_files; do \ if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \ if test -d $$d/$$file; then \ dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \ if test -d "$(distdir)/$$file"; then \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \ cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \ find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \ fi; \ cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \ else \ test -f "$(distdir)/$$file" \ || cp -p $$d/$$file "$(distdir)/$$file" \ || exit 1; \ fi; \ done check-am: all-am check: check-am all-am: Makefile $(DATA) installdirs: for dir in "$(DESTDIR)$(ganglia_docdir)" "$(DESTDIR)$(libipmimonitoring_docdir)" "$(DESTDIR)$(nagios_docdir)" "$(DESTDIR)$(pet_docdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ done install: install-am install-exec: install-exec-am install-data: install-data-am uninstall: uninstall-am install-am: all-am @$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am installcheck: installcheck-am install-strip: if test -z '$(STRIP)'; then \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ install; \ else \ $(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \ install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \ "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'" install; \ fi mostlyclean-generic: clean-generic: distclean-generic: -test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES) -test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES) maintainer-clean-generic: @echo "This command is intended for maintainers to use" @echo "it deletes files that may require special tools to rebuild." clean: clean-am clean-am: clean-generic clean-libtool mostlyclean-am distclean: distclean-am -rm -f Makefile distclean-am: clean-am distclean-generic dvi: dvi-am dvi-am: html: html-am html-am: info: info-am info-am: install-data-am: install-ganglia_docDATA \ install-libipmimonitoring_docDATA install-nagios_docDATA \ install-pet_docDATA install-dvi: install-dvi-am install-dvi-am: install-exec-am: install-html: install-html-am install-html-am: install-info: install-info-am install-info-am: install-man: install-pdf: install-pdf-am install-pdf-am: install-ps: install-ps-am install-ps-am: installcheck-am: maintainer-clean: maintainer-clean-am -rm -f Makefile maintainer-clean-am: distclean-am maintainer-clean-generic mostlyclean: mostlyclean-am mostlyclean-am: mostlyclean-generic mostlyclean-libtool pdf: pdf-am pdf-am: ps: ps-am ps-am: uninstall-am: uninstall-ganglia_docDATA \ uninstall-libipmimonitoring_docDATA uninstall-nagios_docDATA \ uninstall-pet_docDATA .MAKE: install-am install-strip .PHONY: all all-am check check-am clean clean-generic clean-libtool \ cscopelist-am ctags-am distclean distclean-generic \ distclean-libtool distdir dvi dvi-am html html-am info info-am \ install install-am install-data install-data-am install-dvi \ install-dvi-am install-exec install-exec-am \ install-ganglia_docDATA install-html install-html-am \ install-info install-info-am install-libipmimonitoring_docDATA \ install-man install-nagios_docDATA install-pdf install-pdf-am \ install-pet_docDATA install-ps install-ps-am install-strip \ installcheck installcheck-am installdirs maintainer-clean \ maintainer-clean-generic mostlyclean mostlyclean-generic \ mostlyclean-libtool pdf pdf-am ps ps-am tags-am uninstall \ uninstall-am uninstall-ganglia_docDATA \ uninstall-libipmimonitoring_docDATA uninstall-nagios_docDATA \ uninstall-pet_docDATA # Tell versions [3.59,3.63) of GNU make to not export all variables. # Otherwise a system limit (for SysV at least) may be exceeded. .NOEXPORT: freeipmi-1.6.4/contrib/Makefile.am0000644002055400205540000000121113527331635016751 0ustar00achuachu00000000000000ganglia_docdir = $(docdir)/contrib/ganglia ganglia_doc_DATA = \ ganglia/README \ ganglia/ganglia_ipmi_sensors.pl libipmimonitoring_docdir = $(docdir)/contrib/libipmimonitoring libipmimonitoring_doc_DATA = \ libipmimonitoring/ipmimonitoring-sel.c \ libipmimonitoring/ipmimonitoring-sensors.c nagios_docdir = $(docdir)/contrib/nagios nagios_doc_DATA = \ nagios/README \ nagios/nagios_ipmi_sensors.pl pet_docdir = $(docdir)/contrib/pet pet_doc_DATA = \ pet/README \ pet/check_rmcpping \ pet/ipminodes.cfg \ pet/petalert.pl EXTRA_DIST = \ $(ganglia_doc_DATA) \ $(libipmimonitoring_doc_DATA) \ $(nagios_doc_DATA) \ $(pet_doc_DATA)